Add gsoap 2.7 source.

Change-Id: I1e0cf10092009f24a6073640db2e421da668668f
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ff6170f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,31 @@
+/build
+/source/build
+*.mode1v3
+*.pbxuser
+*.pbxindex/
+!user.pbxuser
+/*.log
+*.user
+*.ncb
+*.suo
+*.pdb
+*.pdf
+*.html
+*.idb
+*.o
+*.lo
+*.a
+*.so
+*.so.0
+*.la
+.deps
+.libs
+*.pyc
+.DS_Store
+# Emacs and other editor backup files
+*~
+
+# builds on Windows
+Debug/
+Release/
+release/
diff --git a/ABOUT MEMORY LEAKS.txt b/ABOUT MEMORY LEAKS.txt
new file mode 100644
index 0000000..0aea2a2
--- /dev/null
+++ b/ABOUT MEMORY LEAKS.txt
@@ -0,0 +1,6 @@
+2 sources of leaks were fixed as of 8/29/08
+
+1) In some cases objects that are pointers to other objects and hich are themsleves contained in a vector would leak (the pointed object was lost). 
+2) Objects that contained pointers where not deleted when the destructor was called
+
+The file src\symbol2.c was fixed accordingly and therefore extreme care should be taken in upgrading or recompiling gSOAP (in other words make sure that this change is not lost)
\ No newline at end of file
diff --git a/NOTES.txt b/NOTES.txt
new file mode 100644
index 0000000..2a84f4e
--- /dev/null
+++ b/NOTES.txt
@@ -0,0 +1,115 @@
+
+DISTRIBUTION NOTES
+
+To install gSOAP, unpack the archive. You will get the following files:
+
+README.txt	read this first
+NOTES.txt	this file
+changelog.html	changes
+license.html	gSOAP public license (HTML)
+license.pdf	gSOAP public license (PDF)
+gpl.txt		GPL license
+soapcpp2	executable gSOAP 2 compiler
+wsdl2h		executable gSOAP WSDL parser
+soapdoc2.html	documentation (HTML)
+soapdoc2.pdf	documentation (PDF)
+stdsoap2.h	header file for stdsoap2.c[pp]
+stdsoap2.c	library and gSOAP runtime
+stdsoap2.cpp	library (identical to stdsoap2.c)
+dom.html	gSOAP DOM parser (HTML)
+dom.pdf		gSOAP DOM parser (PDF)
+dom.h		header file for dom.c
+dom.c		C DOM parser
+dom++.h		header file for dom++.cpp
+dom++.cpp	C++ DOM parser
+typemap.dat	XML schema to C/C++ type mapper for wsdl2h WSDL parser
+
+... and the following subdirectories:
+
+samples		examples
+extras		(contributed) extras
+import		#import-ed header files for soapcpp2 compiler
+plugin		plug-in examples
+custom		custom serializers for various data types
+mod_gsoap	Apache mod_gsoap, IIS, and WinInet support
+src		gSOAP compiler sources
+wsdl		WSDL parser sources
+
+Examples are included in the 'samples' subdirectory. The examples are:
+
+DIRECTORY			DESCRIPTION
+calc:				Simple calculator client and server
+ck:				HTTP cookie client and server
+components/c, components/cpp:	Multiple clients/services in one executable
+dime:				DIME attachment client and server
+events:				Asynchronous one-way messaging
+factory:			Remote object factory and simple ORB
+factorytest:			Test client for remote object factory
+googleapi:			Google Web API client
+listing:			XMethod service listing client
+localtime:			Get localtime client
+lu:				Linear solver client and server
+magic:				Magic Squares client and server
+mtom:				MTOM attachment client and server
+oneliners:			Several one-liner clients and services
+polytest:			Polymorphic object exchange
+quote:				Get delayed stock quote
+quote2:				Get delayed stock quote (SOAP async messages)
+quote3:				Get delayed stock quote (with Stock class)
+quote4:				Get delayed stock quote (using XML DOM)
+quotex:				Combined client/server example in one
+router:				Router of HTTP messages over TCP/IP
+rss:				RSS 0.91, 0.92, and 2.0 server
+ssl:				HTTPS/SSL example (requires OpenSSL)
+udp:				SOAP-over-UDP example client and server
+varparam:			Variable polymorphic parameters client/server
+webserver:			Stand-alone Web server with a lot of features
+xml-rpc:			XML-RPC support
+
+To build the example services and clients, type "make" in the 'samples'
+directory (Sun Solaris users should type "make -f MakefileSolaris"). See
+also http://www.cs.fsu.edu/~engelen/soapexamples.html
+for details and explanations for some of these examples.
+
+For Windows users, the archive includes 'magic_VC' and 'quote_VC' Visual
+Studio projects in the 'samples' directory.
+
+For Mac users, the archive includes a 'quote_MAC_ProjBuild' Project Builder
+example in the 'samples' directory.
+
+To try the SSL-secure SOAP server, install OpenSSL and change the occurrences
+of "linprog2.cs.fsu.edu" in sslclient.c and sslserver.c to the machine name
+(or machine IP) you are using. Example .pem files are included but you need to
+create your own .pem files (see OpenSSL documentation).
+
+The sslclient and sslserver codes can then be build as follows:
+
+soapcpp2 -c ssl.h
+gcc -DWITH_OPENSSL -o sslclient sslclient.c stdsoap2.c soapC.c soapClient.c -lssl -lcrypto
+gcc -DWITH_OPENSSL -o sslserver sslserver.c stdsoap2.c soapC.c soapServer.c -lssl -lcrypto -lpthread
+
+The 'gsoap_mod' directory includes Apache 1.x and 2.0 mods for gSOAP, IIS, and
+WinInet support. WinInet allows gsoap to use the WinInet API instead of calls
+to the socket API. The primary benefit of this arrangement is that "if IE
+works, your program will work". There is no need to read proxy settings from
+the registry, deal with proxy configuration scripts, etc. Changes in the
+"Internet Options" dialog box will immediately take effect in your program.
+Additionally, this will allow gsoap to handle forms of authentication not yet
+supported natively, such as NTLM (Integrated Windows Authentication), etc.
+
+Contributions are included in the 'extras' directory:
+
+ckdb.h ckdb.c:
+HTTP cookie database load and store operations for persistant cookie support.
+Cookies are saved in XML format using gSOAP's serializers.
+
+ckdbtest.h ckdbtest.c:
+Test client program for cookie database.
+
+soapdefs.h logging.cpp:
+C++ message logging with streams.
+
+DISCLAIMER: WE TRY OUR BEST TO PROVIDE YOU WITH "REAL-WORLD" EXAMPLES BUT WE
+CANNOT GUARANTEE THAT ALL CLIENT EXAMPLES CAN CONNECT TO THIRD PARTY WEB
+SERVICES WHEN THESE SERVICES ARE DOWN OR HAVE BEEN REMOVED.
+
diff --git a/README.txt b/README.txt
new file mode 100644
index 0000000..398d3ba
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,196 @@
+
+Thanks for using gSOAP!
+
+gSOAP provides a cross-platform development toolkit for developing server,
+client, and peer Web service applications in C and C++.
+
+* The gSOAP 'soapcpp2' compiler and 'stdsoap2' runtime are stable since
+  version release 2.1.3.
+
+* The gSOAP 'wsdl2h' WSDL parser is stable since wsdl2h version release 1.1.0.
+  The WSDL parser fully supports WSDL 1.1 and XML schemas.
+
+The software is provided "as is", without any warranty.  However, gSOAP
+has received a lot of support from users and has been extensively tested
+in the "real world".  We also continue to improve gSOAP and add new features.
+
+WHAT'S COOL?
+
+The gSOAP WSDL parser is a gSOAP application itself, which demonstrates the
+capabilities of the generic XML handling by the toolkit to parse WSDL, XML
+schemas, and SOAP/XML.
+
+gSOAP supports streaming technologies to expedite SOAP/XML and binary DIME
+attachment transfers.  It is the only toolkit that supports streaming DIME
+transfers of potentially unlimited binary data lengths.
+
+gSOAP is the only toolkit that supports the serialization of native C and C++
+data types.  You can use it to export and import your application data in XML
+without having to write wrapper routines.
+
+gSOAP ensures as small memory footprint, because XML is a processed as a
+transient format and not buffered.  Many optimizations have been applied to
+reduce resource requirements and to expedite XML parsing.
+
+INSTALLATION
+
+See NOTES.txt for distribution notes and installation instructions.
+
+See the 'doc' directory doc/index.html for documentation.
+
+See the 'samples' directory for example gSOAP Web service applications.
+
+See the 'uddi2' directory to build UDDI v2 registries.
+
+See the 'WS' directory for WS-* protocol support. This part of the software is
+under development as new WS-* protocols are published.
+
+See the 'import' directory for WS-* protocols you can import.
+
+See the 'plugin' directory for plugins.
+
+See the 'custom' directory for example custom serializers.
+
+See the 'mod_gsoap' directory for Apache mod_gsoap, IIS modules, and WinInet.
+
+See the 'extras' directory with third-party contributions.
+
+GETTING STARTED
+
+The gSOAP WSDL parser converts WSDL into a gSOAP header file for processing
+with the gSOAP stub and skeleton compiler to build your Web services
+applications.  You can use the WSDL parser to translate WSDL and/or XML schemas
+into C or C++ data structures and XML parsers. You can also use the gSOAP
+compiler separately to create XML serialization routines for application data.
+
+For example:
+
+$ wsdl2h -s -o XMethodsQuery.h http://www.xmethods.net/wsdl/query.wsdl
+
+$ soapcpp2 XMethodsQuery.h
+
+The XMethodsQuery.h header file contains a translation of the services and XML
+schemas to C/C++ and other useful information copied from the WSDL.  The
+header file is then processed by the gSOAP stub and skeleton compiler to
+generate the following files:
+
+soapClient.cpp		client-side stub routines for service invocation
+soapServer.cpp		server-side skeleton routines for server development
+soapC.cpp		C/C++ parameter marshalling code
+
+To develop a C++ client application, you can also use the generated
+'soapXMethodsQuerySoapProxy.h' class and 'XMethodsQuerySoap.nsmap' XML
+namespace table to access the XMethods Web service. Both need to be
+'#include'-d in your source. Then compile and link the soapC.cpp,
+soapClient.cpp, and stdsoap2.cpp sources to complete the build.  More
+information can be found in the gSOAP documentation and the Quick How-To page
+on the gSOAP Web site.
+
+See also the 'wsdl/README.txt' for more details on the WSDL parser and
+installation (in case you don't have the wsdl2h executable).
+
+LICENSE
+
+gSOAP is distributed under three licenses:
+
+* The gSOAP public open source license (which is based on the Mozilla public
+  license 1.1). See license.html or license.pdf for further details.
+
+* GPL (GNU Public License).
+
+* License for commercial use.
+
+Most parts are distributed under the gSOAP public license and GPL.  You can
+choose which license applies best to your use.  Some parts of gSOAP are
+strictly distributed under the GPL.  A commercial use license is available
+from Genivia Inc, see http://genivia.com/Products/gsoap/contract.html
+
+Please refer to the README files and/or header information in source code files
+for the appropriate licensing specific to that part of the source code.  The
+gSOAP public license, unlike GPL, allows for commercial use of gSOAP.  It also
+allows products to be built on top and distributed under any license (including
+commercial).  Products developed with gSOAP should include a notice of
+copyright and a disclaimer of warranty in the product's documentation (License
+Exhibit B).  The source code generated by the gSOAP compiler 'soapcpp2' is also
+covered by the gSOAP public license, which means that you can use it for
+commercial purposes.
+
+The parts of the code that are strictly distributed under the GPL (i.e. the code
+that is only distributed under GPL and not jointly under GPL and gSOAP public
+license) cannot be used for commercial purposes. These parts are:
+
+* The wsdl2h WSDL parser source code and the code generated by it.
+
+* The examples included in the gSOAP distribution package 'samples' directory.
+
+A commercial license is available for the GPL licensed software. Please refer
+to the license details at http://www.genivia.com/Products/gsoap/contract.html
+for further details.
+
+COPYRIGHT
+
+gSOAP is copyrighted by Robert A. van Engelen, Genivia, Inc.
+Copyright (C) 2000-2005 Robert A. van Engelen, Genivia, Inc.
+All Rights Reserved.
+
+USE RESTRICTIONS
+
+You may not: (i) transfer rights to gSOAP or claim authorship; or (ii) remove
+any product identification, copyright, proprietary notices or labels from gSOAP.
+
+WARRANTY 
+
+GENIVIA INC. EXPRESSLY DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS, IMPLIED OR
+STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD
+PARTY INTELLECTUAL PROPERTY RIGHTS, AND ANY WARRANTY THAT MAY ARISE BY REASON
+OF TRADE USAGE, CUSTOM, OR COURSE OF DEALING.  WITHOUT LIMITING THE
+FOREGOING, YOU ACKNOWLEDGE THAT THE SOFTWARE IS PROVIDED "AS IS" AND THAT
+GENIVIA INC. DO NOT WARRANT THE SOFTWARE WILL RUN UNINTERRUPTED OR ERROR FREE.
+LIMITED LIABILITY: THE ENTIRE RISK AS TO RESULTS AND PERFORMANCE OF THE
+SOFTWARE IS ASSUMED BY YOU.  UNDER NO CIRCUMSTANCES WILL GENIVIA INC. BE LIABLE
+FOR ANY SPECIAL, INDIRECT, INCIDENTAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES OF
+ANY KIND OR NATURE WHATSOEVER, WHETHER BASED ON CONTRACT, WARRANTY, TORT
+(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, ARISING OUT OF OR IN
+ANY WAY RELATED TO THE SOFTWARE, EVEN IF GENIVIA INC. HAS BEEN ADVISED ON THE
+POSSIBILITY OF SUCH DAMAGE OR IF SUCH DAMAGE COULD HAVE BEEN REASONABLY
+FORESEEN, AND NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY
+EXCLUSIVE REMEDY PROVIDED.  SUCH LIMITATION ON DAMAGES INCLUDES, BUT IS NOT
+LIMITED TO, DAMAGES FOR LOSS OF GOODWILL, LOST PROFITS, LOSS OF DATA OR
+SOFTWARE, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION OR IMPAIRMENT OF
+OTHER GOODS.  IN NO EVENT WILL GENIVIA INC. BE LIABLE FOR THE COSTS OF
+PROCUREMENT OF SUBSTITUTE SOFTWARE OR SERVICES.  YOU ACKNOWLEDGE THAT THIS
+SOFTWARE IS NOT DESIGNED FOR USE IN ON-LINE EQUIPMENT IN HAZARDOUS
+ENVIRONMENTS SUCH AS OPERATION OF NUCLEAR FACILITIES, AIRCRAFT NAVIGATION OR
+CONTROL, OR LIFE-CRITICAL APPLICATIONS.  GENIVIA INC. EXPRESSLY DISCLAIM ANY
+LIABILITY RESULTING FROM USE OF THE SOFTWARE IN ANY SUCH ON-LINE EQUIPMENT IN
+HAZARDOUS ENVIRONMENTS AND ACCEPTS NO LIABILITY IN RESPECT OF ANY ACTIONS OR
+CLAIMS BASED ON THE USE OF THE SOFTWARE IN ANY SUCH ON-LINE EQUIPMENT IN
+HAZARDOUS ENVIRONMENTS BY YOU.  FOR PURPOSES OF THIS PARAGRAPH, THE TERM
+"LIFE-CRITICAL APPLICATION" MEANS AN APPLICATION IN WHICH THE FUNCTIONING OR
+MALFUNCTIONING OF THE SOFTWARE MAY RESULT DIRECTLY OR INDIRECTLY IN PHYSICAL
+INJURY OR LOSS OF HUMAN LIFE.
+
+LIBRARIES
+
+gSOAP is self-contained and does not require any third-party software, except
+for the Zlib and OpenSSL libraries that must be installed to support
+compression and encryption. Compression and encryption are optional.
+
+To build the gSOAP 'soapcpp2' compiler, you must have Bison and Flex installed
+(or the older Yacc and Lex equivalents).
+
+Win32 build of clients and services requires winsock.dll. To do this in
+Visual C++ 6.0, go to "Project", "settings", select the "Link" tab (the
+project file needs to be selected in the file view) and add "wsock32.lib" to
+the "Object/library modules" entry. The Win32 distribution contains two
+MSVC++ project examples. The custom build in VC++ 6.0 has been configured to
+invoke the gSOAP compiler automatically. The VC++ projects can be converted to
+MSVC++ 7.0.
+
+DISCLAIMER
+
+WE TRY OUR BEST TO PROVIDE YOU WITH "REAL-WORLD" EXAMPLES BUT WE CANNOT
+GUARANTEE THAT ALL CLIENT EXAMPLES CAN CONNECT TO THIRD PARTY WEB SERVICES
+WHEN THESE SERVICES ARE DOWN OR HAVE BEEN REMOVED.
+
diff --git a/WS/README.txt b/WS/README.txt
new file mode 100644
index 0000000..57411a7
--- /dev/null
+++ b/WS/README.txt
@@ -0,0 +1,14 @@
+This directory contains a number of WS-* specs. It serves as a repository for
+generating header files stored in the 'import' directory.
+
+The 'WS-typemap.dat' contains bindings for these WS-* specs to C (and C++).
+This file is used by wsdl2h to customize the generated bindings.
+
+For example, the 'import/wsa.h' WS-Addressing definitions were generated by:
+wsdl2h -cgy -o wsa.h -t WS/WS-typemap.dat WS/WS-Addressing.xsd
+which generated the 'import/wsa.h' file that can be #import-ed in a gSOAP
+header file to enable WS-Addressing support.
+
+All importable WS-* specs in header format are located in the 'import'
+directory of the package.
+
diff --git a/WS/WS-Addressing.xsd b/WS/WS-Addressing.xsd
new file mode 100644
index 0000000..6f66e74
--- /dev/null
+++ b/WS/WS-Addressing.xsd
@@ -0,0 +1,133 @@
+<?xml version="1.0"?>
+<!-- 
+Copyright © 2002-2004 BEA Systems Inc., International Business Machines Corporation, 
+Microsoft Corporation, Inc, SAP AG, and Sun Microsystems, Inc.. All rights reserved. 
+
+Permission to copy, display, perform, modify and distribute the WS-Addressing Specification, 
+and to authorize others to do the foregoing, in any medium without fee or royalty is hereby
+granted for the purpose of developing and evaluating the WS-Addressing Specification.
+
+BEA, IBM, Microsoft, SAP AG, and Sun Microsystems (collectively, the "Authors") each agree 
+to grant a license to third parties, under royalty-free  and otherwise reasonable, 
+non-discriminatory terms and conditions, to their respective essential patent claims that
+they deem necessary to implement the WS-Addressing Specification.
+
+DISCLAIMERS:
+
+THE WS-Addressing Specification IS PROVIDED "AS IS", AND THE AUTHORS MAKE NO REPRESENTATIONS
+OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF 
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE 
+CONTENTS OF THE WS-Addressing Specification IS SUITABLE FOR ANY PURPOSE; NOR THAT THE 
+IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, 
+TRADEMARKS OR OTHER RIGHTS.
+
+THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL 
+DAMAGES ARISING OUT OF ANY USE OF THE WS-Addressing Specification OR THE PERFORMANCE OR 
+IMPLEMENTATION OF THE CONTENTS THEREOF.
+
+You may remove these disclaimers from your modified versions of the WS-Addressing 
+Specification provided that you effectively disclaim all warranties and liabilities on behalf 
+of all copyright holders in the copies of any such modified versions you distribute.
+
+The name and trademarks of the Authors may NOT be used in any manner, including advertising 
+or publicity pertaining to the WS-Addressing Specification or its contents without specific, 
+written prior permission. Title to copyright in the WS-Addressing Specification will at all 
+times remain with the Authors.
+
+No other rights are granted by implication, estoppel or otherwise.
+
+-->
+<xs:schema targetNamespace="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" elementFormDefault="qualified" blockDefault="#all">
+  <!-- //////////////////// WS-Addressing //////////////////// -->
+  <!-- Endpoint reference -->
+  <xs:element name="EndpointReference" type="wsa:EndpointReferenceType"/>
+  <xs:complexType name="EndpointReferenceType">
+    <xs:sequence>
+      <xs:element name="Address" type="wsa:AttributedURI"/>
+      <xs:element name="ReferenceProperties" type="wsa:ReferencePropertiesType" minOccurs="0"/>
+      <xs:element name="ReferenceParameters" type="wsa:ReferenceParametersType" minOccurs="0"/>
+      <xs:element name="PortType" type="wsa:AttributedQName" minOccurs="0"/>
+      <xs:element name="ServiceName" type="wsa:ServiceNameType" minOccurs="0"/>
+      <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
+        <xs:annotation>
+          <xs:documentation>
+					 If "Policy" elements from namespace "http://schemas.xmlsoap.org/ws/2002/12/policy#policy" are used, they must appear first (before any extensibility elements).
+					</xs:documentation>
+        </xs:annotation>
+      </xs:any>
+    </xs:sequence>
+    <xs:anyAttribute namespace="##other" processContents="lax"/>
+  </xs:complexType>
+  <xs:complexType name="ReferencePropertiesType">
+    <xs:sequence>
+      <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="ReferenceParametersType">
+    <xs:sequence>
+      <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="ServiceNameType">
+    <xs:simpleContent>
+      <xs:extension base="xs:QName">
+        <xs:attribute name="PortName" type="xs:NCName"/>
+        <xs:anyAttribute namespace="##other" processContents="lax"/>
+      </xs:extension>
+    </xs:simpleContent>
+  </xs:complexType>
+  <!-- Message information header blocks -->
+  <xs:element name="MessageID" type="wsa:AttributedURI"/>
+  <xs:element name="RelatesTo" type="wsa:Relationship"/>
+  <xs:element name="To" type="wsa:AttributedURI"/>
+  <xs:element name="Action" type="wsa:AttributedURI"/>
+  <xs:element name="From" type="wsa:EndpointReferenceType"/>
+  <xs:element name="ReplyTo" type="wsa:EndpointReferenceType"/>
+  <xs:element name="FaultTo" type="wsa:EndpointReferenceType"/>
+  <xs:complexType name="Relationship">
+    <xs:simpleContent>
+      <xs:extension base="xs:anyURI">
+        <xs:attribute name="RelationshipType" type="xs:QName" use="optional"/>
+        <xs:anyAttribute namespace="##other" processContents="lax"/>
+      </xs:extension>
+    </xs:simpleContent>
+  </xs:complexType>
+  <xs:simpleType name="RelationshipTypeValues">
+    <xs:restriction base="xs:QName">
+      <xs:enumeration value="wsa:Reply"/>
+    </xs:restriction>
+  </xs:simpleType>
+  <xs:element name="ReplyAfter" type="wsa:ReplyAfterType"/>
+  <xs:complexType name="ReplyAfterType">
+    <xs:simpleContent>
+      <xs:extension base="xs:nonNegativeInteger">
+        <xs:anyAttribute namespace="##other"/>
+      </xs:extension>
+    </xs:simpleContent>
+  </xs:complexType>
+  <xs:simpleType name="FaultSubcodeValues">
+    <xs:restriction base="xs:QName">
+      <xs:enumeration value="wsa:InvalidMessageInformationHeader"/>
+      <xs:enumeration value="wsa:MessageInformationHeaderRequired"/>
+      <xs:enumeration value="wsa:DestinationUnreachable"/>
+      <xs:enumeration value="wsa:ActionNotSupported"/>
+      <xs:enumeration value="wsa:EndpointUnavailable"/>
+    </xs:restriction>
+  </xs:simpleType>
+  <xs:attribute name="Action" type="xs:anyURI"/>
+  <!-- Common declarations and definitions -->
+  <xs:complexType name="AttributedQName">
+    <xs:simpleContent>
+      <xs:extension base="xs:QName">
+        <xs:anyAttribute namespace="##other" processContents="lax"/>
+      </xs:extension>
+    </xs:simpleContent>
+  </xs:complexType>
+  <xs:complexType name="AttributedURI">
+    <xs:simpleContent>
+      <xs:extension base="xs:anyURI">
+        <xs:anyAttribute namespace="##other" processContents="lax"/>
+      </xs:extension>
+    </xs:simpleContent>
+  </xs:complexType>
+</xs:schema>
diff --git a/WS/WS-Addressing03.xsd b/WS/WS-Addressing03.xsd
new file mode 100644
index 0000000..1610a8c
--- /dev/null
+++ b/WS/WS-Addressing03.xsd
@@ -0,0 +1,112 @@
+<?xml version="1.0"?>
+<!-- 
+ 
+Legal Disclaimer
+
+The presentation, distribution or other dissemination of the information 
+contained in this document is not a license, either expressly or impliedly, 
+to any intellectual property owned or controlled by BEA or IBM or Microsoft
+and\or any other third party.  BEA and IBM and Microsoft and\or any other
+third party may have patents, patent applications, trademarks, copyrights, 
+or other intellectual property rights covering subject matter in this 
+document.  The furnishing of this document does not give you any license 
+to BEA's and IBM's and Microsoft's or any other third party's patents, 
+trademarks, copyrights, or other intellectual property.
+
+This document and the information contained herein is provided on an "AS IS"
+basis and to the maximum extent permitted by applicable law, BEA and IBM 
+and Microsoft provide the document AS IS AND WITH ALL FAULTS, and hereby 
+disclaims all other warranties and conditions, either express, implied or 
+statutory, including, but not limited to, any (if any) implied warranties, 
+duties or conditions of merchantability, of fitness for a particular 
+purpose, of accuracy or completeness of responses, of results, of 
+workmanlike effort, of lack of viruses, and of lack of negligence, all with
+regard to the document. ALSO, THERE IS NO WARRANTY OR CONDITION OF 
+TITLE, QUIET ENJOYMENT, QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR 
+NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS WITH REGARD TO THE 
+DOCUMENT.
+
+IN NO EVENT WILL BEA or IBM or MICROSOFT BE LIABLE TO ANY OTHER PARTY FOR THE
+COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS OF USE, 
+LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT, INDIRECT, OR SPECIAL 
+DAMAGES WHETHER UNDER CONTRACT, TORT, WARRANTY, OR OTHERWISE, ARISING IN ANY 
+WAY OUT OF THIS OR ANY OTHER AGREEMENT RELATING TO THIS DOCUMENT, WHETHER OR 
+NOT SUCH PARTY HAD ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Copyright Notice
+
+Copyright 2003 BEA Systems Inc. and IBM Corporation and Microsoft Corporation. All rights reserved.
+
+-->
+<xs:schema targetNamespace="http://schemas.xmlsoap.org/ws/2003/03/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" blockDefault="#all">
+
+   <!-- //////////////////// WS-Addressing //////////////////// -->
+	<!-- Endpoint reference -->
+	<xs:element name="EndpointReference" type="wsa:EndpointReferenceType"/>
+	<xs:complexType name="EndpointReferenceType">
+		<xs:sequence>
+			<xs:element name="Address" type="wsa:AttributedURI"/>
+			<xs:element name="ReferenceProperties" type="wsa:ReferencePropertiesType" minOccurs="0"/>
+			<xs:element name="PortType" type="wsa:AttributedQName" minOccurs="0"/>
+			<xs:element name="ServiceName" type="wsa:ServiceNameType" minOccurs="0"/>
+			<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
+				<xs:annotation>
+					<xs:documentation>
+					 If "Policy" elements from namespace "http://schemas.xmlsoap.org/ws/2002/12/policy#policy" are used, they must appear first (before any extensibility elements).
+					</xs:documentation>
+				</xs:annotation>
+                        </xs:any>			
+		</xs:sequence>
+		<xs:anyAttribute namespace="##other" processContents="lax"/>
+	</xs:complexType>
+	<xs:complexType name="ReferencePropertiesType">
+		<xs:sequence>
+			<xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+		</xs:sequence>
+	</xs:complexType>
+	<xs:complexType name="ServiceNameType">
+		<xs:simpleContent>
+			<xs:extension base="xs:QName">
+				<xs:attribute name="PortName" type="xs:NCName"/>
+				<xs:anyAttribute namespace="##other" processContents="lax"/>
+			</xs:extension>
+		</xs:simpleContent>
+	</xs:complexType>
+	<!-- Message information header blocks -->
+	<xs:element name="MessageID" type="wsa:AttributedURI"/>
+	<xs:element name="RelatesTo" type="wsa:Relationship"/>
+	<xs:element name="To" type="wsa:AttributedURI"/>
+	<xs:element name="Action" type="wsa:AttributedURI"/>
+	<xs:element name="From" type="wsa:EndpointReferenceType"/>
+	<xs:element name="ReplyTo" type="wsa:EndpointReferenceType"/>
+	<xs:element name="FaultTo" type="wsa:EndpointReferenceType"/>
+	<xs:element name="Recipient" type="wsa:EndpointReferenceType"/>
+	<xs:complexType name="Relationship">
+		<xs:simpleContent>
+			<xs:extension base="xs:anyURI">
+				<xs:attribute name="RelationshipType" type="xs:QName" use="optional"/>
+				<xs:anyAttribute namespace="##other" processContents="lax"/>
+			</xs:extension>
+		</xs:simpleContent>
+	</xs:complexType>
+	<xs:simpleType name="RelationshipTypeValues">
+		<xs:restriction base="xs:QName">
+			<xs:enumeration value="wsa:Response"/>
+		</xs:restriction>
+	</xs:simpleType>
+	<!-- Common declarations and definitions -->
+	<xs:complexType name="AttributedQName">
+		<xs:simpleContent>
+			<xs:extension base="xs:QName">
+				<xs:anyAttribute namespace="##other" processContents="lax"/>
+			</xs:extension>
+		</xs:simpleContent>
+	</xs:complexType>
+	<xs:complexType name="AttributedURI">
+		<xs:simpleContent>
+			<xs:extension base="xs:anyURI">
+				<xs:anyAttribute namespace="##other" processContents="lax"/>
+			</xs:extension>
+		</xs:simpleContent>
+	</xs:complexType>
+</xs:schema>
\ No newline at end of file
diff --git a/WS/WS-Discovery.wsdl b/WS/WS-Discovery.wsdl
new file mode 100644
index 0000000..0460620
--- /dev/null
+++ b/WS/WS-Discovery.wsdl
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+From: http://schemas.xmlsoap.org/ws/2004/02/discovery/discovery.wsdl
+
+(c) 2004 Microsoft Corporation, Inc. All rights reserved.
+The Web Services Dynamic Discovery WSDL, a/k/a WS-Discovery WSDL (the "Document"), 
+was developed by Microsoft, with the assistance of BEA Systems, Canon, Inc, and Intel 
+(collectively, the "Co-Developers"). 
+
+The copyright is owned by Microsoft, and Microsoft hereby grants you permission to copy and 
+display the Document, in any medium without fee or royalty, provided that you include 
+the following on ALL copies of the Document, or portions thereof, that you make: 
+1.	A link or URL to the Document at this location: 
+http://schemas.xmlsoap.org/ws/2004/02/discovery/discovery.wsdl 
+2.	The copyright notice as shown in the Document. 
+
+EXCEPT FOR THE COPYRIGHT LICENSE GRANTED ABOVE, MICROSOFT AND THE CO-DEVELOPERS DO NOT GRANT, 
+EITHER EXPRESSLY OR IMPLIEDLY, A LICENSE TO ANY INTELLECTUAL PROPERTY, INCLUDING PATENTS, 
+THEY, OR ANY OTHER THIRD PARTIES, OWN OR CONTROL.  TITLE TO THE COPYRIGHT IN THE DOCUMENT 
+WILL AT ALL TIMES REMAIN WITH MICROSOFT. 
+
+THE DOCUMENT IS PROVIDED "AS IS," MICROSOFT AND THE CO-DEVELOPERS MAKE NO REPRESENTATIONS 
+OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, 
+FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE 
+DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL 
+NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. 
+
+MICROSOFT AND THE CO-DEVELOPERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL 
+OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THE 
+DOCUMENT. 
+
+The Document may change before final release and you are cautioned against relying on the 
+content of this Document. 
+
+No other rights are granted by implication, estoppel or otherwise.
+-->
+<wsdl:definitions
+    targetNamespace='http://schemas.xmlsoap.org/ws/2004/02/discovery'
+    xmlns:tns='http://schemas.xmlsoap.org/ws/2004/02/discovery'
+    xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/' 
+    xmlns:xs='http://www.w3.org/2001/XMLSchema' >
+
+  <wsdl:types>
+    <xs:schema>
+      <xs:import
+          namespace='http://schemas.xmlsoap.org/ws/2004/02/discovery'
+          schemaLocation='discovery.xsd' />
+    </xs:schema>
+  </wsdl:types>
+
+  <wsdl:message name='HelloMsg' >
+    <wsdl:part name='body' element='tns:Hello' />
+  </wsdl:message>
+
+  <wsdl:message name='ByeMsg' >
+    <wsdl:part name='body' element='tns:Bye' />
+  </wsdl:message>
+
+  <wsdl:message name='ProbeMsg' >
+    <wsdl:part name='body' element='tns:Probe' />
+  </wsdl:message>
+
+  <wsdl:message name='ProbeMatchMsg' >
+    <wsdl:part name='body' element='tns:ProbeMatch' />
+  </wsdl:message>
+
+  <wsdl:message name='ResolveMsg' />
+
+  <wsdl:message name='ResolveMatchMsg' >
+    <wsdl:part name='body' element='tns:ResolveMatch' />
+  </wsdl:message>
+
+  <wsdl:portType name='Discovery' >
+    <wsdl:operation name='HelloOp' >
+      <wsdl:output message='tns:HelloMsg' />
+    </wsdl:operation>
+    <wsdl:operation name='ByeOp' >
+      <wsdl:output message='tns:ByeMsg' />
+    </wsdl:operation>
+    <wsdl:operation name='ProbeOp' >
+      <wsdl:input message='tns:ProbeMsg' />
+    </wsdl:operation>
+    <wsdl:operation name='ProbeMatchOp' >
+      <wsdl:output message='tns:ProbeMatchMsg' />
+    </wsdl:operation>
+  </wsdl:portType>
+
+  <wsdl:portType name='TargetService' >
+    <wsdl:operation name='ResolveOp' >
+      <wsdl:input message='tns:ResolveMsg' />
+    </wsdl:operation>
+    <wsdl:operation name='ResolveMatchOp' >
+      <wsdl:output message='tns:ResolveMatchMsg' />
+    </wsdl:operation>
+  </wsdl:portType>
+
+  <!-- If this portType is included in EndpointReference/Types, it
+       indicates the Target Service is a Discovery Proxy.  Because
+       this specification does not define proxy-specific operations,
+       no operations are defined within this portType; Discovery
+       Proxies implement other types that define proxy-specific
+       operations.  Discovery Proxies also implement
+       TargetService. -->
+  <wsdl:portType name='DiscoveryProxy' />
+
+</wsdl:definitions>
\ No newline at end of file
diff --git a/WS/WS-Enumeration.wsdl b/WS/WS-Enumeration.wsdl
new file mode 100644
index 0000000..669c968
--- /dev/null
+++ b/WS/WS-Enumeration.wsdl
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+(c) 2004 BEA Systems Inc., Computer Associates, Microsoft Corporation, Inc., Sonic Software, and Systinet Corporation. All rights reserved.
+
+Permission to copy and display the WS-Enumeration (the "Specification", which includes WSDL and schema documents), in any medium without fee or royalty is hereby granted, provided that you include the following on ALL copies of the Specification that you make:
+
+1.	A link or URL to the Specification at one of the Co-Developers' websites.
+2.	The copyright notice as shown in the Specification.
+
+BEA Systems, Computer Associates, Microsoft, Sonic Software, and Systinet (collectively, the "Co-Developers") each agree to grant you a license, under royalty-free and otherwise reasonable, non-discriminatory terms and conditions, to their respective essential patent claims that they deem necessary to implement the Specification.
+
+THE SPECIFICATION IS PROVIDED "AS IS," AND THE CO-DEVELOPERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE SPECIFICATION ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+THE CO-DEVELOPERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THE SPECIFICATIONS.
+
+The name and trademarks of the Co-Developers may NOT be used in any manner, including advertising or publicity pertaining to the Specifications or their contents without specific, written prior permission. Title to copyright in the Specifications will at all times remain with the Co-Developers.
+No other rights are granted by implication, estoppel or otherwise.
+-->
+<wsdl:definitions
+    targetNamespace="http://schemas.xmlsoap.org/ws/2004/09/enumeration" 
+    xmlns:wsen="http://schemas.xmlsoap.org/ws/2004/09/enumeration"
+    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:xs="http://www.w3.org/2001/XMLSchema" >
+
+  <wsdl:types>
+    <xs:schema targetNamespace="http://schemas.xmlsoap.org/ws/2004/09/enumeration">
+      <xs:include schemaLocation="enumeration.xsd" />
+    </xs:schema>
+  </wsdl:types>
+
+  <wsdl:message name="EnumerateMsg">
+    <wsdl:part name="body" element="wsen:Enumerate" />
+  </wsdl:message>
+  <wsdl:message name="EnumerateResponseMsg">
+    <wsdl:part name="body" element="wsen:EnumerateResponse" />
+  </wsdl:message>
+  <wsdl:message name="PullMsg">
+    <wsdl:part name="body" element="wsen:Pull" />
+  </wsdl:message>
+  <wsdl:message name="PullResponseMsg">
+    <wsdl:part name="body" element="wsen:PullResponse" />
+  </wsdl:message>
+  <wsdl:message name="RenewMsg" >
+    <wsdl:part name="body" element="wsen:Renew" />
+  </wsdl:message>
+  <wsdl:message name="RenewResponseMsg" >
+    <wsdl:part name="body" element="wsen:RenewResponse" />
+  </wsdl:message>
+  <wsdl:message name="GetStatusMsg" >
+    <wsdl:part name="body" element="wsen:GetStatus" />
+  </wsdl:message>
+  <wsdl:message name="GetStatusResponseMsg" >
+    <wsdl:part name="body" element="wsen:GetStatusResponse" />
+  </wsdl:message>
+  <wsdl:message name="ReleaseMsg">
+    <wsdl:part name="body" element="wsen:Release" />
+  </wsdl:message>
+  <wsdl:message name="ReleaseResponseMsg" />
+  <wsdl:message name="EnumerationEndMsg" >
+    <wsdl:part name="body" element="wsen:EnumerationEnd" />
+  </wsdl:message>
+  
+  <wsdl:portType name="DataSource">
+    <wsdl:operation name="EnumerateOp">
+      <wsdl:input message="wsen:EnumerateMsg" />
+      <wsdl:output message="wsen:EnumerateResponseMsg" />
+    </wsdl:operation>
+    <wsdl:operation name="PullOp">
+      <wsdl:input message="wsen:PullMsg" />
+      <wsdl:output message="wsen:PullResponseMsg" />
+    </wsdl:operation>
+    <wsdl:operation name="RenewOp" >
+      <wsdl:input message="wsen:RenewMsg" />
+      <wsdl:output message="wsen:RenewResponseMsg" />
+    </wsdl:operation>
+    <wsdl:operation name="GetStatusOp" >
+      <wsdl:input message="wsen:GetStatusMsg" />
+      <wsdl:output message="wsen:GetStatusResponseMsg" />
+    </wsdl:operation>
+    <wsdl:operation name="ReleaseOp">
+      <wsdl:input message="wsen:ReleaseMsg" />
+      <wsdl:output message="wsen:ReleaseResponseMsg" />
+    </wsdl:operation>
+    <wsdl:operation name="EnumerationEndOp" >
+      <wsdl:output message="wsen:EnumerationEnd" />
+    </wsdl:operation>
+  </wsdl:portType>
+</wsdl:definitions>
diff --git a/WS/WS-Policy.xsd b/WS/WS-Policy.xsd
new file mode 100644
index 0000000..e5faa30
--- /dev/null
+++ b/WS/WS-Policy.xsd
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+(c) 2001-2004 BEA Systems Inc., International Business Machines Corporation, Microsoft Corporation, Inc., SAP AG, Sonic Software, and VeriSign, Inc. All rights reserved.
+
+Permission to copy and display the WS-Policy Specification (the "Specification", which includes WSDL and schema documents), in any medium without fee or royalty is hereby granted, provided that you include the following on ALL copies of the WS-Policy Specification, that you make:
+
+1.	A link or URL to the WS-Policy Specification at one of the Authors' websites
+2.	The copyright notice as shown in the WS-Policy Specification.
+
+BEA Systems, IBM, Microsoft, SAP, Sonic Software, and VeriSign (collectively, the "Authors") each agree to grant you a license, under royalty-free and otherwise reasonable, non-discriminatory terms and conditions, to their respective essential patent claims that they deem necessary to implement the WS-Policy Specification.
+
+THE WS-POLICY SPECIFICATION IS PROVIDED "AS IS," AND THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE WS-POLICY SPECIFICATION ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THE WS-POLICY SPECIFICATION.
+
+The name and trademarks of the Authors may NOT be used in any manner, including advertising or publicity pertaining to the WS-Policy Specification or its contents without specific, written prior permission. Title to copyright in the WS-Policy Specification will at all times remain with the Authors.
+
+No other rights are granted by implication, estoppel or otherwise.
+-->
+<xs:schema targetNamespace="http://schemas.xmlsoap.org/ws/2004/09/policy"
+           xmlns:tns="http://schemas.xmlsoap.org/ws/2004/09/policy"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema"
+           xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
+           xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+           elementFormDefault="qualified"
+           blockDefault="#all" >
+
+  <xs:import namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
+             schemaLocation="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" />
+
+  <xs:import namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+             schemaLocation="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" />
+
+  <!-- ////////// WS-Policy ////////// -->
+
+  <xs:element name="Policy" >
+    <xs:complexType>
+      <xs:complexContent>
+        <xs:extension base="tns:OperatorContentType" >
+          <xs:attribute name="TargetNamespace"
+                        type="xs:anyURI"
+                        use="optional" />
+          <xs:attribute ref="wsu:Id" use="optional" />
+          <xs:anyAttribute namespace="##any" processContents="lax" />
+        </xs:extension>
+      </xs:complexContent>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="All" type="tns:OperatorContentType" />
+  <xs:element name="ExactlyOne" type="tns:OperatorContentType" />
+
+  <xs:complexType name="OperatorContentType" >
+    <xs:choice minOccurs="0" maxOccurs="unbounded" >
+      <xs:element ref="tns:Policy" />
+      <xs:element ref="tns:All" />
+      <xs:element ref="tns:ExactlyOne" />
+      <xs:element ref="tns:PolicyReference" />
+      <xs:any namespace="##other" processContents="lax" />
+    </xs:choice>
+  </xs:complexType>
+
+  <xs:element name="PolicyReference" >
+    <xs:complexType>
+      <xs:attribute name="URI" type="xs:anyURI" />
+      <xs:attribute name="Digest" type="xs:base64Binary" use="optional" />
+      <xs:attribute name="DigestAlgorithm" type="xs:anyURI" use="optional" />
+      <xs:anyAttribute namespace="##any" processContents="lax" />
+    </xs:complexType>
+  </xs:element>
+
+  <xs:attribute name="Optional" type="xs:boolean" />
+
+  <!-- ////////// WS-PolicyAttachment ////////// -->
+
+  <xs:element name="UsingPolicy" >
+    <xs:complexType>
+      <xs:anyAttribute namespace="##any" processContents="lax" />
+    </xs:complexType>
+  </xs:element>
+
+  <xs:attribute name="PolicyURIs" >
+    <xs:simpleType>
+      <xs:list itemType="xs:anyURI" />
+    </xs:simpleType>
+  </xs:attribute>
+
+  <xs:element name="PolicyAttachment" >
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element ref="tns:AppliesTo" />
+        <xs:choice maxOccurs="unbounded" >
+          <xs:element ref="tns:Policy" />
+          <xs:element ref="tns:PolicyReference" />
+        </xs:choice>
+<!-- omitted only because it causes the content model to be non-determistic
+        <xs:element ref="wsse:Security" minOccurs="0" />
+-->
+        <xs:any namespace="##other"
+                processContents="lax"
+                minOccurs="0"
+                maxOccurs="unbounded" />
+      </xs:sequence>
+      <xs:anyAttribute namespace="##any" processContents="lax" />
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name="AppliesTo" >
+    <xs:complexType>
+      <xs:sequence>
+        <xs:any namespace="##any"
+                processContents="lax"
+                maxOccurs="unbounded" />
+      </xs:sequence>
+      <xs:anyAttribute namespace="##any" processContents="lax" />
+    </xs:complexType>
+  </xs:element>
+
+</xs:schema>
diff --git a/WS/WS-Routing.xsd b/WS/WS-Routing.xsd
new file mode 100644
index 0000000..ebc6e80
--- /dev/null
+++ b/WS/WS-Routing.xsd
@@ -0,0 +1,138 @@
+<?xml version='1.0'?>
+<!-- XML Schema for SOAP-RP -->
+<!-- Copyright 2001 Microsoft Corporation. All rights reserved.
+
+The presentation, distribution or other dissemination of the
+information contained herein by Microsoft is not a license, either
+expressly or impliedly, to any intellectual property owned or
+controlled by Microsoft.
+
+This document and the information contained herein is provided on an
+"AS IS" basis and to the maximum extent permitted by applicable law,
+Microsoft provides the document AS IS AND WITH ALL FAULTS, and hereby
+disclaims all other warranties and conditions, either express, implied
+or statutory, including, but not limited to, any (if any) implied
+warranties, duties or conditions of merchantability, of fitness for a
+particular purpose, of accuracy or completeness of responses, of
+results, of workmanlike effort, of lack of viruses, and of lack of
+negligence, all with regard to the document. ALSO, THERE IS NO
+WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT, QUIET POSSESSION,
+CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT WITH REGARD TO THE
+DOCUMENT.
+
+IN NO EVENT WILL MICROSOFT BE LIABLE TO ANY OTHER PARTY FOR THE COST
+OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS OF USE,
+LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT, INDIRECT, OR
+SPECIAL DAMAGES WHETHER UNDER CONTRACT, TORT, WARRANTY, OR OTHERWISE,
+ARISING IN ANY WAY OUT OF THIS OR ANY OTHER AGREEMENT RELATING TO THIS
+DOCUMENT, WHETHER OR NOT SUCH PARTY HAD ADVANCE NOTICE OF THE
+POSSIBILITY OF SUCH DAMAGES.  -->
+<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd" >
+<schema xmlns='http://www.w3.org/2001/XMLSchema' xmlns:tns='http://schemas.xmlsoap.org/rp/' targetNamespace='http://schemas.xmlsoap.org/rp/' finalDefault='#all'>
+     
+<!-- SOAP-RP path construct -->
+  
+<element name='path' type='tns:path_t'/>
+<complexType name='path_t'>
+ <sequence>
+  <element ref='tns:action'/>
+  <element ref='tns:to' minOccurs='0'/>
+  <element ref='tns:fwd' minOccurs='0'/>
+  <element ref='tns:rev' minOccurs='0'/>
+  <element ref='tns:from' minOccurs='0'/>
+  <element ref='tns:id' minOccurs='0'/>
+  <element ref='tns:relatesTo' minOccurs='0'/>
+  <element ref='tns:fault' minOccurs='0'/>
+ </sequence>
+ <anyAttribute/>
+</complexType>
+          
+<element name='action' type='tns:action_t'/>
+<simpleType name='action_t'>
+ <restriction base='anyURI'/>
+</simpleType>
+
+<element name='to' type='tns:to_t'/>
+<simpleType name='to_t'>
+ <restriction base='anyURI'/>
+</simpleType>
+
+<element name='via' type='tns:via_t'/>
+<complexType name='via_t'>
+ <simpleContent>
+  <extension base='anyURI'>
+   <attribute name='vid' type='anyURI' use='optional'/>
+  </extension>
+ </simpleContent>
+</complexType>
+
+<element name='fwd' type='tns:fwd_t'/>
+<complexType name='fwd_t'>
+ <sequence>
+  <element ref='tns:via' minOccurs='0' maxOccurs='unbounded'/>
+ </sequence>
+ <anyAttribute/>
+</complexType>
+
+<element name='rev' type='tns:rev_t'/>
+<complexType name='rev_t'>
+ <sequence>
+  <element ref='tns:via' minOccurs='0' maxOccurs='unbounded'/>
+ </sequence>
+ <anyAttribute/>
+</complexType>
+
+<element name='from' type='tns:from_t'/>
+<simpleType name='from_t'>
+ <restriction base='anyURI'/>
+</simpleType>
+
+<element name='id' type='tns:id_t'/>
+<simpleType name='id_t'>
+ <restriction base='anyURI'/>
+</simpleType>
+
+<element name='relatesTo' type='tns:relatesTo_t'/>
+<simpleType name='relatesTo_t'>
+ <restriction base='anyURI'/>
+</simpleType>
+
+<!-- SOAP-RP fault -->
+
+<element name='faultcode' type='tns:faultcode_t'/>
+<simpleType name='faultcode_t'>
+  <restriction base='integer'/>
+</simpleType>
+
+<element name='faultreason' type='tns:faultreason_t'/>
+<simpleType name='faultreason_t'>
+ <restriction base='string'>
+ </restriction>
+</simpleType>
+
+<!-- Only certain combinations of the following are
+     valid and they tie into the fault code -->
+
+<element name='found' type='tns:found_t'/>
+<complexType name='found_t'>
+ <sequence>
+  <element name='at' type='anyURI' maxOccurs='unbounded'/>
+ </sequence>
+ <anyAttribute/>
+</complexType>
+
+<element name='fault' type='tns:fault_t'/>
+<complexType name='fault_t'>
+ <sequence>
+  <element ref='tns:faultcode'/>
+  <element ref='tns:faultreason'/>
+  <element name='endpoint' type='anyURI' minOccurs='0'/>
+  <element name='found' type='tns:found_t' minOccurs='0'/>
+  <element name='maxsize' type='integer' minOccurs='0'/>
+  <element name='maxtime' type='integer' minOccurs='0'/>
+  <element name='retryAfter' type='integer' minOccurs='0'/>  
+ </sequence>
+ <anyAttribute/>
+</complexType>
+
+</schema>
diff --git a/WS/WS-typemap.dat b/WS/WS-typemap.dat
new file mode 100644
index 0000000..aa2aa87
--- /dev/null
+++ b/WS/WS-typemap.dat
@@ -0,0 +1,328 @@
+#	WS-typemap.dat
+#
+#-------------------------------------------------------------------------------
+#gSOAP XML Web services tools
+#Copyright (C) 2004-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+#This software is released under one of the following two licenses:
+#GPL or Genivia's license for commercial use.
+#-------------------------------------------------------------------------------
+#GPL license.
+#
+#This program is free software; you can redistribute it and/or modify it under
+#the terms of the GNU General Public License as published by the Free Software
+#Foundation; either version 2 of the License, or (at your option) any later
+#version.
+#
+#This program is distributed in the hope that it will be useful, but WITHOUT ANY
+#WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+#PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+#You should have received a copy of the GNU General Public License along with
+#this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+#Place, Suite 330, Boston, MA 02111-1307 USA
+#
+#Author contact information:
+#engelen@genivia.com / engelen@acm.org
+#-------------------------------------------------------------------------------
+#A commercial use license is available from Genivia, Inc., contact@genivia.com
+#-------------------------------------------------------------------------------
+
+#	Bindings for WS-* protocols:
+
+wsrp	= "http://schemas.xmlsoap.org/rp/"
+wsen	= "http://schemas.xmlsoap.org/ws/2004/09/enumeration"
+wsa	= <http://schemas.xmlsoap.org/ws/2004/08/addressing>
+wsa3	= <http://schemas.xmlsoap.org/ws/2003/03/addressing>
+wsp	= "http://schemas.xmlsoap.org/ws/2004/09/policy"
+
+#	wsa:AttributedQName is a QName element extensible with attributes.
+#	We redeclare it as a QName string, assuming we don't need attributes:
+
+wsa__AttributedQName	= | _QName
+wsa3__AttributedQName	= | _QName
+
+#	wsa:AttributedURI is an anyURI element extensible with attributes.
+#	We redeclare it as a regular string, assuming we don't need attributes:
+
+wsa__AttributedURI	= | char*
+wsa3__AttributedURI	= | char*
+
+#	wsa:ReplyAfterType is an nonnegativeInteger extensible with attributes.
+#	We redeclare it here, assuming we don't need attributes:
+
+wsa__ReplyAfterType	= | unsigned int
+
+#	wsse, wsu, ds, and xenc bindings
+
+wsse	= <http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd>
+wsu	= <http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd>
+ds	= <http://www.w3.org/2000/09/xmldsig#>
+xenc	= <http://www.w3.org/2001/04/xmlenc#>
+
+wsse2	= <http://schemas.xmlsoap.org/ws/2002/12/secext>
+
+################################################################################
+#
+#	wsu redefinitions
+#
+################################################################################
+
+_wsu__Id		= | char*
+_wsu__Created		= | char*
+_wsu__Expires		= | char*
+
+wsu__AttributedDateTime	= | time_t
+wsu__AttributedURI	= | char*
+
+wsu__TimestampType	=
+
+_wsu__Timestamp =\
+typedef struct _wsu__Timestamp\n\
+{	@char*	wsu__Id;	// use qualified form to enable signature\n\
+	char*	Created;\n\
+	char*	Expires;\n\
+} _wsu__Timestamp;
+
+################################################################################
+#
+#	wsse redefinitions
+#
+################################################################################
+
+# wsse:AttributedString has a wsu:Id we don't need
+wsse__AttributedString = | char*
+
+# wsse:EncodedString has an EncodingType attribute we don't need for Nonce
+wsse__EncodedString = | char*
+
+# Don't use global wsse:Nonce
+_wsse__Nonce =
+
+# Don't use wsse:tUsage and global wsse:Usage
+wsse__tUsage =
+_wsse__Usage =
+
+# Don't use wsse:PasswordString
+wsse__PasswordString =
+
+# But use wsse:Password element with similar content
+_wsse__Password =\
+typedef struct _wsse__Password\n\
+{	char*					__item;\n\
+	@char*					Type;\n\
+} _wsse__Password;
+
+# Don't use wsse:UsernameTokenType
+wsse__UsernameTokenType =
+
+# But use wsse:UsernameToken element with similar content
+_wsse__UsernameToken =\
+typedef struct _wsse__UsernameToken\n\
+{	char*					Username;\n\
+	struct _wsse__Password*			Password;\n\
+	char*					Nonce;\n\
+	char*					wsu__Created;\n\
+	@char*					wsu__Id;\n\
+} _wsse__UsernameToken;
+
+# Don't use wsse:BinarySecurityTokenType
+wsse__BinarySecurityTokenType =
+
+# But use wsse:BinarySecurityToken element with similar content
+_wsse__BinarySecurityToken =\
+typedef struct _wsse__BinarySecurityToken\n\
+{	char*					__item;\n\
+	@char*					wsu__Id;\n\
+	@char*					ValueType;\n\
+	@char*					EncodingType;\n\
+} _wsse__BinarySecurityToken;
+
+# Don't use wsse:SecurityTokenReferenceType
+wsse__SecurityTokenReferenceType =
+
+# But use wsse:SecurityTokenReference element
+_wsse__SecurityTokenReference =\
+typedef struct _wsse__SecurityTokenReference\n\
+{	struct _wsse__Reference*		Reference;\n\
+	struct _wsse__KeyIdentifier*		KeyIdentifier;\n\
+	struct _wsse__Embedded*			Embedded;\n\
+	@char*					wsu__Id;\n\
+	@char*					Usage;\n\
+} _wsse__SecurityTokenReference;
+
+# Don't use wsse:ReferenceType
+wsse__ReferenceType =
+
+# But use wsse:Reference element
+_wsse__Reference =\
+typedef struct _wsse__Reference\n\
+{	@char*					URI;\n\
+	@char*					ValueType;\n\
+} _wsse__Reference;
+
+# Don't use wsse:KeyIdentifierType
+wsse__KeyIdentifierType =
+
+# But use wsse:KeyIdentifier
+_wsse__KeyIdentifier =\
+typedef struct _wsse__KeyIdentifier\n\
+{	char*					__item;\n\
+	@char*					wsu__Id;\n\
+	@char*					ValueType;\n\
+	@char*					EncodingType;\n\
+} _wsse__KeyIdentifier;
+
+# Don't use wsse:EmbeddedType
+wsse__EmbeddedType =
+
+# But use wsse:KeyIdentifier
+_wsse__Embedded =\
+typedef struct _wsse__Embedded\n\
+{	/* Extensible with embedded tokens and assertions */\n\
+	@char*					wsu__Id;\n\
+	@char*					ValueType;\n\
+} _wsse__Embedded;
+
+# Don't use wsse:TransformationParametersType
+wsse__TransformationParametersType =
+
+# Don't use wsse:TransformationParameters
+_wsse__TransformationParameters =
+
+# Don't use wsse:SecurityHeaderType
+wsse__SecurityHeaderType =
+
+# But use wsse:Security element with additional content
+_wsse__Security =\
+#import "ds.h"\n\
+typedef struct _wsse__Security\n\
+{	struct _wsu__Timestamp*			wsu__Timestamp;\n\
+	struct _wsse__UsernameToken*		UsernameToken;\n\
+	struct _wsse__BinarySecurityToken*	BinarySecurityToken;\n\
+	struct ds__SignatureType*		ds__Signature;\n\
+	@char*					SOAP_ENV__actor;\n\
+	@char*					SOAP_ENV__role;\n\
+} _wsse__Security;
+
+################################################################################
+#
+#	ds redefinitions
+#
+################################################################################
+
+ds__CryptoBinary = | char* /*base64*/
+
+ds__DigestValueType = | char* /*base64*/
+
+ds__HMACOutputLengthType = | int
+
+ds__TransformType = #import "c14n.h"\n\
+typedef struct ds__TransformType\n\
+{	_c14n__InclusiveNamespaces*		c14n__InclusiveNamespaces;\n\
+        _XML					__any;\n\
+	@char*					Algorithm;\n\
+} ds__TransformType;
+
+ds__KeyInfoType =\
+typedef struct ds__KeyInfoType\n\
+{	char*					KeyName;\n\
+	struct ds__KeyValueType*		KeyValue;\n\
+	struct ds__RetrievalMethodType*		RetrievalMethod;\n\
+	struct ds__X509DataType*		X509Data;\n\
+	struct _wsse__SecurityTokenReference*	wsse__SecurityTokenReference;\n\
+	@char*					Id;\n\
+} ds__KeyInfoType;
+
+ds__SignatureType =\
+typedef struct ds__SignatureType\n\
+{	struct ds__SignedInfoType*		SignedInfo;\n\
+	char*					SignatureValue;\n\
+	struct ds__KeyInfoType*			KeyInfo;\n\
+	@char*					Id;\n\
+} ds__SignatureType;
+
+# Add c14n:InclusiveNamespaces element to ds:CanonicalizationMethodType
+ds__CanonicalizationMethodType = $\
+    _c14n__InclusiveNamespaces*		c14n__InclusiveNamespaces;
+
+# ds:SignatureValueType has an Id we don't need
+ds__SignatureValueType =
+
+ds__ObjectType =
+
+ds__ManifestType =
+
+ds__SignaturePropertyType =
+
+ds__SignaturePropertiesType =
+
+ds__PGPDataType =
+
+ds__SPKIDataType =
+
+################################################################################
+#
+#	Common definitions
+#
+################################################################################
+
+#	Use regular char* strings for ID
+
+xsd__ID			= | char* /*ID*/
+
+#	Use regular char* strings for NCName
+
+xsd__NCName		= | char* /*NCName*/
+
+#	Use regular char* strings for anyURI
+
+xsd__anyURI		= | char* /*URI*/
+
+#	Use built-in gSOAP _QName
+
+xsd__QName		= | _QName | _QName
+
+#	Map xsd:integer to int
+
+xsd__integer		= | int
+
+#	Map xsd:nonNegativeInteger to unsigned int
+
+xsd__nonNegativeInteger	= | unsigned int
+
+#	Map xsd:base64Binary to char* and manipulate base64 data internally
+
+xsd__base64Binary	= | char* /*base64*/
+
+#	Map xsd:boolean to xsd__boolean_ to avoid redefs
+
+xsd__boolean		= enum xsd__boolean_ { _false, _true }; | enum xsd__boolean_
+
+#	Redeclare wsrp:action_t
+
+wsrp__action_USCOREt	= | char*
+
+#	Redeclare wsrp:to_t
+
+wsrp__to_USCOREt	= | char*
+
+#	Redeclare wsrp:from_t
+
+wsrp__from_USCOREt	= | char*
+
+#	Redeclare wsrp:id_t
+
+wsrp__id_USCOREt	= | char*
+
+#	Redeclare wsrp:relatesTo_t
+
+wsrp__relatesTo_USCOREt	= | char*
+
+#	Redeclare wsrp:faultcode_t
+
+wsrp__faultcode_USCOREt	= | char*
+
+#	Redeclare wsrp:faultreason_t
+
+wsrp__faultreason_USCOREt = | char*
+
diff --git a/WS/discovery.xsd b/WS/discovery.xsd
new file mode 100644
index 0000000..c864e80
--- /dev/null
+++ b/WS/discovery.xsd
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+(c) 2004 Microsoft Corporation, Inc. All rights reserved.
+The Web Services Dynamic Discovery Schema, a/k/a WS-Discovery Schema (the "Document"), 
+was developed by Microsoft, with the assistance of BEA Systems, Canon, Inc, and Intel 
+(collectively, the "Co-Developers"). 
+
+The copyright is owned by Microsoft, and Microsoft hereby grants you permission to copy and 
+display the Document, in any medium without fee or royalty, provided that you include 
+the following on ALL copies of the Document, or portions thereof, that you make: 
+1.	A link or URL to the Document at this location: 
+http://schemas.xmlsoap.org/ws/2004/02/discovery/discovery.xsd 
+2.	The copyright notice as shown in the Document. 
+
+EXCEPT FOR THE COPYRIGHT LICENSE GRANTED ABOVE, MICROSOFT AND THE CO-DEVELOPERS DO NOT GRANT, 
+EITHER EXPRESSLY OR IMPLIEDLY, A LICENSE TO ANY INTELLECTUAL PROPERTY, INCLUDING PATENTS, 
+THEY, OR ANY OTHER THIRD PARTIES, OWN OR CONTROL.  TITLE TO THE COPYRIGHT IN THE DOCUMENT 
+WILL AT ALL TIMES REMAIN WITH MICROSOFT. 
+
+THE DOCUMENT IS PROVIDED "AS IS," MICROSOFT AND THE CO-DEVELOPERS MAKE NO REPRESENTATIONS 
+OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, 
+FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE 
+DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL 
+NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. 
+
+MICROSOFT AND THE CO-DEVELOPERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL 
+OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THE 
+DOCUMENT. 
+
+The Document may change before final release and you are cautioned against relying on the 
+content of this Document. 
+
+No other rights are granted by implication, estoppel or otherwise.
+-->
+<xs:schema
+    targetNamespace='http://schemas.xmlsoap.org/ws/2004/02/discovery'
+    xmlns:tns='http://schemas.xmlsoap.org/ws/2004/02/discovery'
+    xmlns:wsa='http://schemas.xmlsoap.org/ws/2003/03/addressing'
+    xmlns:xs='http://www.w3.org/2001/XMLSchema'
+    elementFormDefault='qualified'
+    blockDefault='#all' >
+
+  <xs:import
+      namespace='http://schemas.xmlsoap.org/ws/2003/03/addressing'
+      schemaLocation='http://schemas.xmlsoap.org/ws/2003/03/addressing' />
+
+  <!-- //////////////////// WS-Discovery //////////////////// -->
+
+  <!-- Messages -->
+
+  <xs:element name='Hello' type='tns:DiscoveryReferenceType' />
+
+  <xs:complexType name='DiscoveryReferenceType' >
+    <xs:sequence>
+      <xs:element ref='wsa:EndpointReference' />
+      <xs:element ref='tns:Types' minOccurs='0' />
+      <xs:element ref='tns:Scopes' minOccurs='0' />
+      <xs:element ref='tns:MetadataVersion' />
+      <xs:any namespace='##other'
+              processContents='lax'
+              minOccurs='0'
+              maxOccurs='unbounded' />
+    </xs:sequence>
+    <xs:anyAttribute namespace='##other' processContents='lax' />
+  </xs:complexType>
+
+  <xs:element name='Bye' >
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element ref='wsa:EndpointReference' />
+        <xs:any namespace='##any'
+                processContents='lax'
+                minOccurs='0'
+                maxOccurs='unbounded' />
+        <!-- ##any allows simplifying an implementation to
+             send the same children in Bye as in Hello -->
+      </xs:sequence>
+      <xs:anyAttribute namespace='##other' processContents='lax' />
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name='Probe' >
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element ref='tns:Types' minOccurs='0' />
+        <xs:element ref='tns:Scope' minOccurs='0' />
+        <xs:any namespace='##other'
+                processContents='lax'
+                minOccurs='0'
+                maxOccurs='unbounded' />
+      </xs:sequence>
+      <xs:anyAttribute namespace='##other' processContents='lax' />
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name='ProbeMatch' type='tns:DiscoveryReferenceType' />
+
+  <!-- No body defined for Resolve -->
+
+  <xs:element name='ResolveMatch' type='tns:DiscoveryReferenceType' />
+
+  <!-- Shared global elements -->
+
+  <xs:element name='Types' >
+    <xs:simpleType>
+      <xs:list itemType='xs:QName' />
+    </xs:simpleType>
+  </xs:element>
+
+  <xs:element name='Scope' >
+    <xs:complexType>
+      <xs:simpleContent>
+        <xs:extension base='xs:anyURI' >
+          <xs:attribute name='MatchBy' type='xs:anyURI' />
+        </xs:extension>
+      </xs:simpleContent>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name='Scopes' >
+    <xs:simpleType>
+      <xs:list itemType='xs:anyURI' />
+    </xs:simpleType>
+  </xs:element>
+
+  <xs:element name='MetadataVersion' type='xs:nonNegativeInteger' />
+
+  <!-- //////////////////// General Headers //////////////////// -->
+
+  <xs:element name='AppSequence' >
+   <xs:complexType>
+    <xs:complexContent>
+     <xs:restriction base='xs:anyType' >
+      <xs:attribute name='InstanceId'
+                    type='xs:positiveInteger'
+                    use='required' />
+      <xs:attribute name='SequenceId' type='xs:anyURI' />
+      <xs:attribute name='MessageNumber'
+                    type='xs:positiveInteger'
+                    use='required' />
+     </xs:restriction>
+    </xs:complexContent>
+   </xs:complexType>
+  </xs:element>
+
+  <!-- //////////////////// Policy Assertions //////////////////// -->
+
+  <xs:element name='SoapHttpRequestReplyAddress' >
+    <xs:complexType>
+      <xs:simpleContent>
+        <xs:extension base='xs:anyURI' >
+          <xs:anyAttribute namespace='##other' processContents='lax' />
+        </xs:extension>
+      </xs:simpleContent>
+    </xs:complexType>
+  </xs:element>
+
+</xs:schema>
\ No newline at end of file
diff --git a/WS/ds.xsd b/WS/ds.xsd
new file mode 100644
index 0000000..df126b3
--- /dev/null
+++ b/WS/ds.xsd
@@ -0,0 +1,318 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE schema
+  PUBLIC "-//W3C//DTD XMLSchema 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd"
+ [
+   <!ATTLIST schema 
+     xmlns:ds CDATA #FIXED "http://www.w3.org/2000/09/xmldsig#">
+   <!ENTITY dsig 'http://www.w3.org/2000/09/xmldsig#'>
+   <!ENTITY % p ''>
+   <!ENTITY % s ''>
+  ]>
+
+<!-- Schema for XML Signatures
+    http://www.w3.org/2000/09/xmldsig#
+    $Revision: 1.1 $ on $Date: 2002/02/08 20:32:26 $ by $Author: reagle $
+
+    Copyright 2001 The Internet Society and W3C (Massachusetts Institute
+    of Technology, Institut National de Recherche en Informatique et en
+    Automatique, Keio University). All Rights Reserved.
+    http://www.w3.org/Consortium/Legal/
+
+    This document is governed by the W3C Software License [1] as described
+    in the FAQ [2].
+
+    [1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
+    [2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
+-->
+
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+        xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
+        targetNamespace="http://www.w3.org/2000/09/xmldsig#"
+        version="0.1" elementFormDefault="qualified"> 
+
+<!-- Basic Types Defined for Signatures -->
+
+<simpleType name="CryptoBinary">
+  <restriction base="base64Binary">
+  </restriction>
+</simpleType>
+
+<!-- Start Signature -->
+
+<element name="Signature" type="ds:SignatureType"/>
+<complexType name="SignatureType">
+  <sequence> 
+    <element ref="ds:SignedInfo"/> 
+    <element ref="ds:SignatureValue"/> 
+    <element ref="ds:KeyInfo" minOccurs="0"/> 
+    <element ref="ds:Object" minOccurs="0" maxOccurs="unbounded"/> 
+  </sequence>  
+  <attribute name="Id" type="ID" use="optional"/>
+</complexType>
+
+  <element name="SignatureValue" type="ds:SignatureValueType"/> 
+  <complexType name="SignatureValueType">
+    <simpleContent>
+      <extension base="base64Binary">
+        <attribute name="Id" type="ID" use="optional"/>
+      </extension>
+    </simpleContent>
+  </complexType>
+
+<!-- Start SignedInfo -->
+
+<element name="SignedInfo" type="ds:SignedInfoType"/>
+<complexType name="SignedInfoType">
+  <sequence> 
+    <element ref="ds:CanonicalizationMethod"/> 
+    <element ref="ds:SignatureMethod"/> 
+    <element ref="ds:Reference" maxOccurs="unbounded"/> 
+  </sequence>  
+  <attribute name="Id" type="ID" use="optional"/> 
+</complexType>
+
+  <element name="CanonicalizationMethod" type="ds:CanonicalizationMethodType"/> 
+  <complexType name="CanonicalizationMethodType" mixed="true">
+    <sequence>
+      <any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
+      <!-- (0,unbounded) elements from (1,1) namespace -->
+    </sequence>
+    <attribute name="Algorithm" type="anyURI" use="required"/> 
+  </complexType>
+
+  <element name="SignatureMethod" type="ds:SignatureMethodType"/>
+  <complexType name="SignatureMethodType" mixed="true">
+    <sequence>
+      <element name="HMACOutputLength" minOccurs="0" type="ds:HMACOutputLengthType"/>
+      <any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
+      <!-- (0,unbounded) elements from (1,1) external namespace -->
+    </sequence>
+    <attribute name="Algorithm" type="anyURI" use="required"/> 
+  </complexType>
+
+<!-- Start Reference -->
+
+<element name="Reference" type="ds:ReferenceType"/>
+<complexType name="ReferenceType">
+  <sequence> 
+    <element ref="ds:Transforms" minOccurs="0"/> 
+    <element ref="ds:DigestMethod"/> 
+    <element ref="ds:DigestValue"/> 
+  </sequence>
+  <attribute name="Id" type="ID" use="optional"/> 
+  <attribute name="URI" type="anyURI" use="optional"/> 
+  <attribute name="Type" type="anyURI" use="optional"/> 
+</complexType>
+
+  <element name="Transforms" type="ds:TransformsType"/>
+  <complexType name="TransformsType">
+    <sequence>
+      <element ref="ds:Transform" maxOccurs="unbounded"/>  
+    </sequence>
+  </complexType>
+
+  <element name="Transform" type="ds:TransformType"/>
+  <complexType name="TransformType" mixed="true">
+    <choice minOccurs="0" maxOccurs="unbounded"> 
+      <any namespace="##other" processContents="lax"/>
+      <!-- (1,1) elements from (0,unbounded) namespaces -->
+      <element name="XPath" type="string"/> 
+    </choice>
+    <attribute name="Algorithm" type="anyURI" use="required"/> 
+  </complexType>
+
+<!-- End Reference -->
+
+<element name="DigestMethod" type="ds:DigestMethodType"/>
+<complexType name="DigestMethodType" mixed="true"> 
+  <sequence>
+    <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+  </sequence>    
+  <attribute name="Algorithm" type="anyURI" use="required"/> 
+</complexType>
+
+<element name="DigestValue" type="ds:DigestValueType"/>
+<simpleType name="DigestValueType">
+  <restriction base="base64Binary"/>
+</simpleType>
+
+<!-- End SignedInfo -->
+
+<!-- Start KeyInfo -->
+
+<element name="KeyInfo" type="ds:KeyInfoType"/> 
+<complexType name="KeyInfoType" mixed="true">
+  <choice maxOccurs="unbounded">     
+    <element ref="ds:KeyName"/> 
+    <element ref="ds:KeyValue"/> 
+    <element ref="ds:RetrievalMethod"/> 
+    <element ref="ds:X509Data"/> 
+    <element ref="ds:PGPData"/> 
+    <element ref="ds:SPKIData"/>
+    <element ref="ds:MgmtData"/>
+    <any processContents="lax" namespace="##other"/>
+    <!-- (1,1) elements from (0,unbounded) namespaces -->
+  </choice>
+  <attribute name="Id" type="ID" use="optional"/> 
+</complexType>
+
+  <element name="KeyName" type="string"/>
+  <element name="MgmtData" type="string"/>
+
+  <element name="KeyValue" type="ds:KeyValueType"/> 
+  <complexType name="KeyValueType" mixed="true">
+   <choice>
+     <element ref="ds:DSAKeyValue"/>
+     <element ref="ds:RSAKeyValue"/>
+     <any namespace="##other" processContents="lax"/>
+   </choice>
+  </complexType>
+
+  <element name="RetrievalMethod" type="ds:RetrievalMethodType"/> 
+  <complexType name="RetrievalMethodType">
+    <sequence>
+      <element ref="ds:Transforms" minOccurs="0"/> 
+    </sequence>  
+    <attribute name="URI" type="anyURI"/>
+    <attribute name="Type" type="anyURI" use="optional"/>
+  </complexType>
+
+<!-- Start X509Data -->
+
+<element name="X509Data" type="ds:X509DataType"/> 
+<complexType name="X509DataType">
+  <sequence maxOccurs="unbounded">
+    <choice>
+      <element name="X509IssuerSerial" type="ds:X509IssuerSerialType"/>
+      <element name="X509SKI" type="base64Binary"/>
+      <element name="X509SubjectName" type="string"/>
+      <element name="X509Certificate" type="base64Binary"/>
+      <element name="X509CRL" type="base64Binary"/>
+      <any namespace="##other" processContents="lax"/>
+    </choice>
+  </sequence>
+</complexType>
+
+<complexType name="X509IssuerSerialType"> 
+  <sequence> 
+    <element name="X509IssuerName" type="string"/> 
+    <element name="X509SerialNumber" type="integer"/> 
+  </sequence>
+</complexType>
+
+<!-- End X509Data -->
+
+<!-- Begin PGPData -->
+
+<element name="PGPData" type="ds:PGPDataType"/> 
+<complexType name="PGPDataType"> 
+  <choice>
+    <sequence>
+      <element name="PGPKeyID" type="base64Binary"/> 
+      <element name="PGPKeyPacket" type="base64Binary" minOccurs="0"/> 
+      <any namespace="##other" processContents="lax" minOccurs="0"
+       maxOccurs="unbounded"/>
+    </sequence>
+    <sequence>
+      <element name="PGPKeyPacket" type="base64Binary"/> 
+      <any namespace="##other" processContents="lax" minOccurs="0"
+       maxOccurs="unbounded"/>
+    </sequence>
+  </choice>
+</complexType>
+
+<!-- End PGPData -->
+
+<!-- Begin SPKIData -->
+
+<element name="SPKIData" type="ds:SPKIDataType"/> 
+<complexType name="SPKIDataType">
+  <sequence maxOccurs="unbounded">
+    <element name="SPKISexp" type="base64Binary"/>
+    <any namespace="##other" processContents="lax" minOccurs="0"/>
+  </sequence>
+</complexType> 
+
+<!-- End SPKIData -->
+
+<!-- End KeyInfo -->
+
+<!-- Start Object (Manifest, SignatureProperty) -->
+
+<element name="Object" type="ds:ObjectType"/> 
+<complexType name="ObjectType" mixed="true">
+  <sequence minOccurs="0" maxOccurs="unbounded">
+    <any namespace="##any" processContents="lax"/>
+  </sequence>
+  <attribute name="Id" type="ID" use="optional"/> 
+  <attribute name="MimeType" type="string" use="optional"/> <!-- add a grep facet -->
+  <attribute name="Encoding" type="anyURI" use="optional"/> 
+</complexType>
+
+<element name="Manifest" type="ds:ManifestType"/> 
+<complexType name="ManifestType">
+  <sequence>
+    <element ref="ds:Reference" maxOccurs="unbounded"/> 
+  </sequence>
+  <attribute name="Id" type="ID" use="optional"/> 
+</complexType>
+
+<element name="SignatureProperties" type="ds:SignaturePropertiesType"/> 
+<complexType name="SignaturePropertiesType">
+  <sequence>
+    <element ref="ds:SignatureProperty" maxOccurs="unbounded"/> 
+  </sequence>
+  <attribute name="Id" type="ID" use="optional"/> 
+</complexType>
+
+   <element name="SignatureProperty" type="ds:SignaturePropertyType"/> 
+   <complexType name="SignaturePropertyType" mixed="true">
+     <choice maxOccurs="unbounded">
+       <any namespace="##other" processContents="lax"/>
+       <!-- (1,1) elements from (1,unbounded) namespaces -->
+     </choice>
+     <attribute name="Target" type="anyURI" use="required"/> 
+     <attribute name="Id" type="ID" use="optional"/> 
+   </complexType>
+
+<!-- End Object (Manifest, SignatureProperty) -->
+
+<!-- Start Algorithm Parameters -->
+
+<simpleType name="HMACOutputLengthType">
+  <restriction base="integer"/>
+</simpleType>
+
+<!-- Start KeyValue Element-types -->
+
+<element name="DSAKeyValue" type="ds:DSAKeyValueType"/>
+<complexType name="DSAKeyValueType">
+  <sequence>
+    <sequence minOccurs="0">
+      <element name="P" type="ds:CryptoBinary"/>
+      <element name="Q" type="ds:CryptoBinary"/>
+    </sequence>
+    <element name="G" type="ds:CryptoBinary" minOccurs="0"/>
+    <element name="Y" type="ds:CryptoBinary"/>
+    <element name="J" type="ds:CryptoBinary" minOccurs="0"/>
+    <sequence minOccurs="0">
+      <element name="Seed" type="ds:CryptoBinary"/>
+      <element name="PgenCounter" type="ds:CryptoBinary"/>
+    </sequence>
+  </sequence>
+</complexType>
+
+<element name="RSAKeyValue" type="ds:RSAKeyValueType"/>
+<complexType name="RSAKeyValueType">
+  <sequence>
+    <element name="Modulus" type="ds:CryptoBinary"/> 
+    <element name="Exponent" type="ds:CryptoBinary"/> 
+  </sequence>
+</complexType> 
+
+<!-- End KeyValue Element-types -->
+
+<!-- End Signature -->
+
+</schema>
diff --git a/WS/enumeration.xsd b/WS/enumeration.xsd
new file mode 100644
index 0000000..218f051
--- /dev/null
+++ b/WS/enumeration.xsd
@@ -0,0 +1,221 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!-- 
+(c) 2004 BEA Systems Inc., Computer Associates, Microsoft Corporation, Inc., Sonic Software, and Systinet Corporation. All rights reserved.
+
+Permission to copy and display the WS-Enumeration (the "Specification", which includes WSDL and schema documents), in any medium without fee or royalty is hereby granted, provided that you include the following on ALL copies of the Specification that you make:
+
+1.	A link or URL to the Specification at one of the Co-Developers' websites.
+2.	The copyright notice as shown in the Specification.
+
+BEA Systems, Computer Associates, Microsoft, Sonic Software, and Systinet (collectively, the "Co-Developers") each agree to grant you a license, under royalty-free and otherwise reasonable, non-discriminatory terms and conditions, to their respective essential patent claims that they deem necessary to implement the Specification.
+
+THE SPECIFICATION IS PROVIDED "AS IS," AND THE CO-DEVELOPERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE SPECIFICATION ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+THE CO-DEVELOPERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THE SPECIFICATIONS.
+
+The name and trademarks of the Co-Developers may NOT be used in any manner, including advertising or publicity pertaining to the Specifications or their contents without specific, written prior permission. Title to copyright in the Specifications will at all times remain with the Co-Developers.
+No other rights are granted by implication, estoppel or otherwise.
+-->
+<xs:schema
+	targetNamespace="http://schemas.xmlsoap.org/ws/2004/09/enumeration"
+	xmlns:tns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"
+	xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
+	xmlns:xs="http://www.w3.org/2001/XMLSchema" 
+	elementFormDefault="qualified" 
+	blockDefault="#all">
+
+	<xs:import namespace='http://www.w3.org/XML/1998/namespace' />
+	<xs:import namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing" />
+
+	<!-- Types and global elements -->
+	<xs:complexType name="FilterType" mixed="true">
+		<xs:sequence>
+			<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+		</xs:sequence>
+		<xs:attribute name="Dialect" type="xs:anyURI" />
+		<xs:anyAttribute namespace="##other" processContents="lax" />
+	</xs:complexType>
+	
+	<xs:simpleType name="PositiveDurationType">
+		<xs:restriction base="xs:duration">
+			<xs:minExclusive value="P0Y0M0DT0H0M0S" />
+		</xs:restriction>
+	</xs:simpleType>
+
+	<xs:simpleType name="NonNegativeDurationType">
+		<xs:restriction base="xs:duration">
+			<xs:minInclusive value="P0Y0M0DT0H0M0S" />
+		</xs:restriction>
+	</xs:simpleType>
+
+	<xs:simpleType name="ExpirationType">
+		<xs:union memberTypes="xs:dateTime tns:NonNegativeDurationType" />
+	</xs:simpleType>
+
+	<xs:complexType name="EnumerationContextType">
+		<xs:complexContent mixed="true">
+			<xs:restriction base="xs:anyType">
+				<xs:sequence>
+					<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+				</xs:sequence>
+				<xs:anyAttribute namespace="##other" processContents="lax" />
+			</xs:restriction>
+		</xs:complexContent>
+	</xs:complexType>
+	
+	<xs:complexType name="ItemListType">
+		<xs:sequence maxOccurs="unbounded">
+			<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+		</xs:sequence>
+	</xs:complexType>
+
+	<xs:complexType name="LanguageSpecificStringType">
+		<xs:simpleContent>
+			<xs:extension base="xs:string">
+				<xs:attribute ref="xml:lang" />
+				<xs:anyAttribute namespace="##other" processContents="lax" />
+			</xs:extension>
+		</xs:simpleContent>
+	</xs:complexType>
+
+	<!-- Enumerate request -->
+	<xs:element name="Enumerate">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element name="EndTo" type="wsa:EndpointReferenceType" minOccurs="0" />
+				<xs:element name="Expires" type="tns:ExpirationType" minOccurs="0" />
+				<xs:element name="Filter" type="tns:FilterType" minOccurs="0" />
+				<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+			</xs:sequence>
+			<xs:anyAttribute namespace="##other" processContents="lax" />
+		</xs:complexType>
+	</xs:element>
+	
+	<!-- Used for a fault response -->
+	<xs:element name="SupportedDialect" type="xs:anyURI" />
+	
+	<!-- Enumerate response -->
+	<xs:element name="EnumerateResponse">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element name="Expires" type="tns:ExpirationType" minOccurs="0" />
+				<xs:element name="EnumerationContext" type="tns:EnumerationContextType" />
+				<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+			</xs:sequence>
+			<xs:anyAttribute namespace="##other" processContents="lax" />
+		</xs:complexType>
+	</xs:element>
+	
+	<!-- Pull request -->
+	<xs:element name="Pull">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element name="EnumerationContext" type="tns:EnumerationContextType" />
+				<xs:element name="MaxTime" type="tns:PositiveDurationType" minOccurs="0" />
+				<xs:element name="MaxElements" type="xs:positiveInteger" minOccurs="0" />
+				<xs:element name="MaxCharacters" type="xs:positiveInteger" minOccurs="0" />
+				<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+			</xs:sequence>
+			<xs:anyAttribute namespace="##other" processContents="lax" />
+		</xs:complexType>
+	</xs:element>
+	
+	<!-- Pull response -->
+	<xs:element name="PullResponse">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element name="EnumerationContext" type="tns:EnumerationContextType" minOccurs="0" />
+				<xs:element name="Items" type="tns:ItemListType" minOccurs="0" />
+				<xs:element name="EndOfSequence" minOccurs="0" />
+			</xs:sequence>
+			<xs:anyAttribute namespace="##other" processContents="lax" />
+		</xs:complexType>
+	</xs:element>
+	
+	<!-- Renew request -->
+	<xs:element name="Renew">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element name="EnumerationContext" type="tns:EnumerationContextType" />
+				<xs:element name="Expires" type="tns:ExpirationType" minOccurs="0" />
+				<xs:any namespace="##other" processContents="lax" 
+					minOccurs="0" maxOccurs="unbounded" />
+			</xs:sequence>
+			<xs:anyAttribute namespace="##other" processContents="lax" />
+		</xs:complexType>
+	</xs:element>
+
+	<!-- Renew response -->
+	<xs:element name="RenewResponse">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element name="Expires" type="tns:ExpirationType" minOccurs="0" />
+				<xs:element name="EnumerationContext" type="tns:EnumerationContextType" minOccurs="0" />
+				<xs:any namespace="##other" processContents="lax" 
+					minOccurs="0" maxOccurs="unbounded" />
+			</xs:sequence>
+			<xs:anyAttribute namespace="##other" processContents="lax" />
+		</xs:complexType>
+	</xs:element>
+
+	<!-- GetStatus request -->
+	<xs:element name="GetStatus">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element name="EnumerationContext" type="tns:EnumerationContextType" />
+				<xs:any namespace="##other" processContents="lax" 
+					minOccurs="0" maxOccurs="unbounded" />
+			</xs:sequence>
+			<xs:anyAttribute namespace="##other" processContents="lax" />
+		</xs:complexType>
+	</xs:element>
+
+	<!-- GetStatus response -->
+	<xs:element name="GetStatusResponse">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element name="Expires" type="tns:ExpirationType" minOccurs="0" />
+				<xs:any namespace="##other" processContents="lax" 
+					minOccurs="0" maxOccurs="unbounded" />
+			</xs:sequence>
+			<xs:anyAttribute namespace="##other" processContents="lax" />
+		</xs:complexType>
+	</xs:element>
+
+	<!-- Release request -->
+	<xs:element name="Release">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element name="EnumerationContext" type="tns:EnumerationContextType" />
+			</xs:sequence>
+			<xs:anyAttribute namespace="##other" processContents="lax" />
+		</xs:complexType>
+	</xs:element>
+	
+	<!-- Release response has an empty body -->
+	
+	<!-- EnumerationEnd message -->
+	<xs:element name="EnumerationEnd">
+		<xs:complexType>
+		<xs:sequence>
+			<xs:element name="EnumerationContext" type="tns:EnumerationContextType" />
+			<xs:element name="Code" type="tns:OpenEnumerationEndCodeType" />
+			<xs:element name="Reason" type="tns:LanguageSpecificStringType" minOccurs="0" maxOccurs="unbounded" />
+			<xs:any namespace="##other" processContents="lax" 
+			minOccurs="0" maxOccurs="unbounded" />
+		</xs:sequence>
+		<xs:anyAttribute namespace="##other" processContents="lax" />
+		</xs:complexType>
+	</xs:element>
+
+	<xs:simpleType name="EnumerationEndCodeType">
+		<xs:restriction base="xs:anyURI">
+		<xs:enumeration value="http://schemas.xmlsoap.org/ws/2004/09/enumeration/SourceShuttingDown" />
+		<xs:enumeration value="http://schemas.xmlsoap.org/ws/2004/09/enumeration/SourceCancelling" />
+		</xs:restriction>
+	</xs:simpleType>
+
+	<xs:simpleType name="OpenEnumerationEndCodeType">
+		<xs:union memberTypes="tns:EnumerationEndCodeType xs:anyURI" />
+	</xs:simpleType>
+</xs:schema>
diff --git a/WS/wsse.xsd b/WS/wsse.xsd
new file mode 100644
index 0000000..641798b
--- /dev/null
+++ b/WS/wsse.xsd
@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS's procedures with respect to rights in OASIS specifications can be found at the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification, can be obtained from the OASIS Executive Director.
+OASIS invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to implement this specification. Please address the information to the OASIS Executive Director.
+Copyright © OASIS Open 2002-2004. All Rights Reserved.
+This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself does not be modified in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications, in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate it into languages other than English.
+The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns.
+This document and the information contained herein is provided on an “AS IS” basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+-->
+<xsd:schema targetNamespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified" attributeFormDefault="unqualified" blockDefault="#all" version="0.2">
+	<xsd:import namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" schemaLocation="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
+	<xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+	<xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+	<xsd:complexType name="AttributedString">
+		<xsd:annotation>
+			<xsd:documentation>This type represents an element with arbitrary attributes.</xsd:documentation>
+		</xsd:annotation>
+		<xsd:simpleContent>
+			<xsd:extension base="xsd:string">
+				<xsd:attribute ref="wsu:Id"/>
+				<xsd:anyAttribute namespace="##other" processContents="lax"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<xsd:complexType name="PasswordString">
+		<xsd:annotation>
+			<xsd:documentation>This type is used for password elements per Section 4.1.</xsd:documentation>
+		</xsd:annotation>
+		<xsd:simpleContent>
+			<xsd:extension base="wsse:AttributedString">
+				<xsd:attribute name="Type" type="xsd:anyURI"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<xsd:complexType name="EncodedString">
+		<xsd:annotation>
+			<xsd:documentation>This type is used for elements containing stringified binary data.</xsd:documentation>
+		</xsd:annotation>
+		<xsd:simpleContent>
+			<xsd:extension base="wsse:AttributedString">
+				<xsd:attribute name="EncodingType" type="xsd:anyURI"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<xsd:complexType name="UsernameTokenType">
+		<xsd:annotation>
+			<xsd:documentation>This type represents a username token per Section 4.1</xsd:documentation>
+		</xsd:annotation>
+		<xsd:sequence>
+			<xsd:element name="Username" type="wsse:AttributedString"/>
+			<xsd:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute ref="wsu:Id"/>
+		<xsd:anyAttribute namespace="##other" processContents="lax"/>
+	</xsd:complexType>
+	<xsd:complexType name="BinarySecurityTokenType">
+		<xsd:annotation>
+			<xsd:documentation>A security token that is encoded in binary</xsd:documentation>
+		</xsd:annotation>
+		<xsd:simpleContent>
+			<xsd:extension base="wsse:EncodedString">
+				<xsd:attribute name="ValueType" type="xsd:anyURI"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<xsd:complexType name="KeyIdentifierType">
+		<xsd:annotation>
+			<xsd:documentation>A security token key identifier</xsd:documentation>
+		</xsd:annotation>
+		<xsd:simpleContent>
+			<xsd:extension base="wsse:EncodedString">
+				<xsd:attribute name="ValueType" type="xsd:anyURI"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<xsd:simpleType name="tUsage">
+		<xsd:annotation>
+			<xsd:documentation>Typedef to allow a list of usages (as URIs).</xsd:documentation>
+		</xsd:annotation>
+		<xsd:list itemType="xsd:anyURI"/>
+	</xsd:simpleType>
+	<xsd:attribute name="Usage" type="tUsage">
+		<xsd:annotation>
+			<xsd:documentation>This global attribute is used to indicate the usage of a referenced or indicated token within the containing context</xsd:documentation>
+		</xsd:annotation>
+	</xsd:attribute>
+	<xsd:complexType name="ReferenceType">
+		<xsd:annotation>
+			<xsd:documentation>This type represents a reference to an external security token.</xsd:documentation>
+		</xsd:annotation>
+		<xsd:attribute name="URI" type="xsd:anyURI"/>
+		<xsd:attribute name="ValueType" type="xsd:anyURI"/>
+		<xsd:anyAttribute namespace="##other" processContents="lax"/>
+	</xsd:complexType>
+	<xsd:complexType name="EmbeddedType">
+		<xsd:annotation>
+			<xsd:documentation>This type represents a reference to an embedded security token.</xsd:documentation>
+		</xsd:annotation>
+		<xsd:choice minOccurs="0" maxOccurs="unbounded">
+			<xsd:any processContents="lax"/>
+		</xsd:choice>
+		<xsd:attribute name="ValueType" type="xsd:anyURI"/>
+		<xsd:anyAttribute namespace="##other" processContents="lax"/>
+	</xsd:complexType>
+	<xsd:complexType name="SecurityTokenReferenceType">
+		<xsd:annotation>
+			<xsd:documentation>This type is used reference a security token.</xsd:documentation>
+		</xsd:annotation>
+		<xsd:choice minOccurs="0" maxOccurs="unbounded">
+			<xsd:any processContents="lax"/>
+		</xsd:choice>
+		<xsd:attribute ref="wsu:Id"/>
+		<xsd:attribute ref="wsse:Usage"/>
+		<xsd:anyAttribute namespace="##other" processContents="lax"/>
+	</xsd:complexType>
+	<xsd:complexType name="SecurityHeaderType">
+		<xsd:annotation>
+			<xsd:documentation>This complexType defines header block to use for security-relevant data directed at a specific SOAP actor.</xsd:documentation>
+		</xsd:annotation>
+		<xsd:sequence>
+			<xsd:any processContents="lax" minOccurs="0" maxOccurs="unbounded">
+				<xsd:annotation>
+					<xsd:documentation>The use of "any" is to allow extensibility and different forms of security data.</xsd:documentation>
+				</xsd:annotation>
+			</xsd:any>
+		</xsd:sequence>
+		<xsd:anyAttribute namespace="##other" processContents="lax"/>
+	</xsd:complexType>
+	<xsd:complexType name="TransformationParametersType">
+		<xsd:annotation>
+			<xsd:documentation>This complexType defines a container for elements to be specified from any namespace as properties/parameters of a DSIG transformation.</xsd:documentation>
+		</xsd:annotation>
+		<xsd:sequence>
+			<xsd:any processContents="lax" minOccurs="0" maxOccurs="unbounded">
+				<xsd:annotation>
+					<xsd:documentation>The use of "any" is to allow extensibility from any namespace.</xsd:documentation>
+				</xsd:annotation>
+			</xsd:any>
+		</xsd:sequence>
+		<xsd:anyAttribute namespace="##other" processContents="lax"/>
+	</xsd:complexType>
+	<xsd:element name="UsernameToken" type="wsse:UsernameTokenType">
+		<xsd:annotation>
+			<xsd:documentation>This element defines the wsse:UsernameToken element per Section 4.1.</xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+	<xsd:element name="BinarySecurityToken" type="wsse:BinarySecurityTokenType">
+		<xsd:annotation>
+			<xsd:documentation>This element defines the wsse:BinarySecurityToken element per Section 4.2.</xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+	<xsd:element name="Reference" type="wsse:ReferenceType">
+		<xsd:annotation>
+			<xsd:documentation>This element defines a security token reference</xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+	<xsd:element name="Embedded" type="wsse:EmbeddedType">
+		<xsd:annotation>
+			<xsd:documentation>This element defines a security token embedded reference</xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+	<xsd:element name="KeyIdentifier" type="wsse:KeyIdentifierType">
+		<xsd:annotation>
+			<xsd:documentation>This element defines a key identifier reference</xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+	<xsd:element name="SecurityTokenReference" type="wsse:SecurityTokenReferenceType">
+		<xsd:annotation>
+			<xsd:documentation>This element defines the wsse:SecurityTokenReference per Section 4.3.</xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+	<xsd:element name="Security" type="wsse:SecurityHeaderType">
+		<xsd:annotation>
+			<xsd:documentation>This element defines the wsse:Security SOAP header element per Section 4.</xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+	<xsd:element name="TransformationParameters" type="wsse:TransformationParametersType">
+		<xsd:annotation>
+			<xsd:documentation>This element contains properties for transformations from any namespace, including DSIG.</xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+	<xsd:element name="Password" type="wsse:PasswordString"/>
+	<xsd:element name="Nonce" type="wsse:EncodedString"/>
+	<xsd:simpleType name="FaultcodeEnum">
+		<xsd:restriction base="xsd:QName">
+			<xsd:enumeration value="wsse:UnsupportedSecurityToken"/>
+			<xsd:enumeration value="wsse:UnsupportedAlgorithm"/>
+			<xsd:enumeration value="wsse:InvalidSecurity"/>
+			<xsd:enumeration value="wsse:InvalidSecurityToken"/>
+			<xsd:enumeration value="wsse:FailedAuthentication"/>
+			<xsd:enumeration value="wsse:FailedCheck"/>
+			<xsd:enumeration value="wsse:SecurityTokenUnavailable"/>
+		</xsd:restriction>
+	</xsd:simpleType>
+</xsd:schema>
diff --git a/WS/wsu.xsd b/WS/wsu.xsd
new file mode 100644
index 0000000..f8d74e9
--- /dev/null
+++ b/WS/wsu.xsd
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS's procedures with respect to rights in OASIS specifications can be found at the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification, can be obtained from the OASIS Executive Director.
+OASIS invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to implement this specification. Please address the information to the OASIS Executive Director.
+Copyright © OASIS Open 2002-2004. All Rights Reserved.
+This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself does not be modified in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications, in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate it into languages other than English.
+The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns.
+This document and the information contained herein is provided on an “AS IS” basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+-->
+<xsd:schema targetNamespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
+
+
+
+xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
+elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.1">
+	<!-- // Fault Codes /////////////////////////////////////////// -->
+	<xsd:simpleType name="tTimestampFault">
+		<xsd:annotation>
+			<xsd:documentation>
+This type defines the fault code value for Timestamp message expiration.
+          </xsd:documentation>
+		</xsd:annotation>
+		<xsd:restriction base="xsd:QName">
+			<xsd:enumeration value="wsu:MessageExpired"/>
+		</xsd:restriction>
+	</xsd:simpleType>
+	<!-- // Global attributes //////////////////////////////////// -->
+	<xsd:attribute name="Id" type="xsd:ID">
+		<xsd:annotation>
+			<xsd:documentation>
+This global attribute supports annotating arbitrary elements with an ID.
+          </xsd:documentation>
+		</xsd:annotation>
+	</xsd:attribute>
+	<xsd:attributeGroup name="commonAtts">
+		<xsd:annotation>
+			<xsd:documentation>
+Convenience attribute group used to simplify this schema.
+          </xsd:documentation>
+		</xsd:annotation>
+		<xsd:attribute ref="wsu:Id" use="optional"/>
+		<xsd:anyAttribute namespace="##other" processContents="lax"/>
+	</xsd:attributeGroup>
+	<!-- // Utility types //////////////////////////////////////// -->
+	<xsd:complexType name="AttributedDateTime">
+		<xsd:annotation>
+			<xsd:documentation>
+This type is for elements whose [children] is a psuedo-dateTime and can have arbitrary attributes. 
+      </xsd:documentation>
+		</xsd:annotation>
+		<xsd:simpleContent>
+			<xsd:extension base="xsd:string">
+				<xsd:attributeGroup ref="wsu:commonAtts"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<xsd:complexType name="AttributedURI">
+		<xsd:annotation>
+			<xsd:documentation>
+This type is for elements whose [children] is an anyURI and can have arbitrary attributes.
+      </xsd:documentation>
+		</xsd:annotation>
+		<xsd:simpleContent>
+			<xsd:extension base="xsd:anyURI">
+				<xsd:attributeGroup ref="wsu:commonAtts"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<!-- // Timestamp header components /////////////////////////// -->
+	<xsd:complexType name="TimestampType">
+		<xsd:annotation>
+			<xsd:documentation>
+This complex type ties together the timestamp related elements into a composite type.
+            </xsd:documentation>
+		</xsd:annotation>
+		<xsd:sequence>
+			<xsd:element ref="wsu:Created" minOccurs="0"/>
+			<xsd:element ref="wsu:Expires" minOccurs="0"/>
+			<xsd:choice minOccurs="0" maxOccurs="unbounded">
+				<xsd:any namespace="##other" processContents="lax"/>
+			</xsd:choice>
+		</xsd:sequence>
+		<xsd:attributeGroup ref="wsu:commonAtts"/>
+	</xsd:complexType>
+	<xsd:element name="Timestamp" type="wsu:TimestampType">
+		<xsd:annotation>
+			<xsd:documentation>
+This element allows Timestamps to be applied anywhere element wildcards are present,
+including as a SOAP header.
+            </xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+	<!-- global element decls to allow individual elements to appear anywhere -->
+	<xsd:element name="Expires" type="wsu:AttributedDateTime">
+		<xsd:annotation>
+			<xsd:documentation>
+This element allows an expiration time to be applied anywhere element wildcards are present.
+            </xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+	<xsd:element name="Created" type="wsu:AttributedDateTime">
+		<xsd:annotation>
+			<xsd:documentation>
+This element allows a creation time to be applied anywhere element wildcards are present.
+            </xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+</xsd:schema>
diff --git a/changelog.html b/changelog.html
new file mode 100644
index 0000000..ea92157
--- /dev/null
+++ b/changelog.html
@@ -0,0 +1,620 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">

+<html>

+<head>

+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

+   <meta name="Author" content="Robert A. van Engelen">

+   <meta name="GENERATOR" content="Mozilla/4.76 [en] (X11; U; SunOS 5.8 sun4u) [Netscape]">

+</head>

+<body bgcolor="#e6e6e6">

+

+<h1>Changelog</h1>

+

+<ul>

+<li>Version 1.1</li>

+<ul>

+<li>Added typedef conventions</li>

+<li>Added enumerations</li>

+<li>Added hexBinary encoding</li>

+<li>Added base64 encoding</li>

+<li>Enable pass by reference operator (&amp;) for output parameter</li>

+<li>Enable specification of methods in classes</li>

+</ul>

+<li>Version 1.2 (9/9/2001)</li>

+<ul>

+<li>Added WSDL&nbsp;generator</li>

+</ul>

+<li>Version 1.2w (9/14/2001)</li>

+<ul>

+<li>Win32 port</li>

+<li>Fixed a socket communication problem in win32 version</li>

+<li>Added namespace name pattern matching to ease validation</li>

+</ul>

+<li>Version 1.2.1 (10/24/2001)</li>

+<ul>

+<li>Chunked HTTP 1.1 transfer support</li>

+<li>Improved buffering</li>

+<li>Fixed a problem with nested vector allocation</li>

+</ul>

+<li>Version 1.2.2 (11/2/2001)</li>

+<ul>

+<li>Support for special XML element names with dots, underscores, and center dots (see documentation section 5.3)</li>

+<li>Fixed a decoding problem with dynamic array of pointers to polymorphic objects</li>

+<li>Fixed an encoding problem with enumerations</li>

+<li>Added a "safe-mode" flag to disable serialization of multi-referenced objects:

+<pre>

+soap_disable_href = 1;

+</pre>

+You can set this global flag anywere in the code, but at least before serialization is performed.

+It will disable the use of href attributes when sending multi-reference data. Instead, the data is copied

+in the payload.

+<b>When set, this flag will hang the serializer when sending cyclic data structures.</b>

+</li>

+</ul>

+<li>Version 1.2.3 (12/5/2001)</li>

+<ul>

+<li>Added <i>bool</i> type encoding/decoding.</li>

+<li>Added dynamic multi-dimensional arrays.</li>

+<li>Added support for primitive polymorphic types.</li>

+<li>Added full support for CDATA content decoding.</li>

+<li>More convenient customization of SOAP Headers and Faults. No separate <tt>soapheader.h</tt> and <tt>soapfault.h</tt> files

+required (and therefore no <tt>.cpp</tt> files have to be created for these). Instead, the compiler generates customized SOAP

+Header and SOAP Fault marshalling routines when struct/class <tt>SOAP_ENV__Fault</tt> and/or <tt>SOAP_ENV__Header</tt> are

+specified in the header file input to the compiler.

+</li>

+<li>On-demand generation of the marshalling routines for the primitive types, which reduces the size of the executables.</li>

+<li>Fixed a WSDL incompatibility problem in the WSDL generator.</li>

+<li>Improved decoding of multi-reference elements (no <tt>xsi:type</tt> required anymore in receiving message so gSOAP does not break).</li> 

+<li>Improved support for encoding/decoding indirect data (e.g. pointers to pointers to data).</li>

+<li>

+Improved encoding of data with the same pointers to shared data but with the shared data declared with different XML schema types

+(formerly encoded as multi-reference data which could cause type incmpatibilities at the receiving side).  For example, in the

+declarations <tt>typedef char *xsd__NCName; xsd__NCName *s="SOAP"; char *t = s;</tt> the pointers <tt>s</tt> and <tt>t</tt> point

+to the same data, but will not be encoded as multi-reference data since the types are different.

+</li>

+<li>Added flag:

+<pre>

+soap_enable_null = 1;

+</pre>

+When set, all NULL pointers will be explicitly encoded. By default, NULL pointers are omitted from the SOAP payload.  For example,

+with this flag set all NULL strings and other NULL pointer data will appear as nil values in the SOAP payload.

+</li>

+<li>Added flag:

+<pre>

+soap_enable_embedding = 1;

+</pre>

+When set, multi-reference data will be encoded inline which will guarantee the exact preservation of the structure of the data

+transmitted. However, some SOAP implementations do not support embedding inline multi-reference data although this encoding style

+is likely to be included in future verions of the SOAP protocol.  The flag is useful when creating C++ applications that need to

+communicate data to eachother and the data structures need to be preserved. Setting this flag may cause a duplication of

+multi-reference data by the receiver created with the SOAP stub compiler when the data is part of a struct/class or array.  The

+data is not copied by the receiver when the struct/class or arrays use pointers to the data type.

+</li>

+<li>Added the ability to declare virtual destructors.</li>

+<li>Fixed a compilation error with fixed-size array of pointers.</li>

+<li>Fixed a problem with padding in Base64 (en/de)coding.</li>

+<li>Fixed XML entity decoding (hexadecimal).</li>

+<li>Added encoding of sparse arrays. A sparse array MUST be declared as a (fixed-size of dynamic) array of pointers. NULL pointer

+values are omitted from the output and SOAP-ENC:position attributes are used for non-NULL elements.</li>

+<li>Changed soap_put and soap_get functions to include explicit schema type parameters.  This fixed a problem with Web services that need to return typedef-ed XML schema types The new stdsoap.cpp and stdsoap.h files are incompatible with the previous version(s).

+</li>

+<li>Added the ability to ignore the names of accessors when decoding fields through the use of a leading

+<tt>_</tt> in a field name. For example:

+<pre>

+ns__mymethod(xsd__string in, xsd__string &amp;_return);

+</pre>

+When used to invoke a remote method, the actual element name of the remote return parameter used by the service is insignificant.

+</li>

+<li>Improved memory management. Added new function: <tt>soap_destroy()</tt> to remove all class instances.</li>

+<li>Improved documentation.</li>

+<li>Added <i>time_t</i> type support, but still need to add encoding/decoding routines to the runtime (next version).</li>

+<li>Added <i>wchar_t</i> type support, but still need to add encoding/decoding routines to the runtime (next version).</li>

+</ul>

+<li>Version 1.2.4 (12/17/2001)</li>

+<ul>

+<li>Added support for wide character strings (<i>wchar_t*</i>).</li>

+<li>Added support for <i>time_t</i> type.</li>

+<li>Added support for SOAP literal encoding.</li>

+<li>Fixed an obscure bug in the deserialization of data from the SOAP4R toolkit that caused the deserializer to hang.</li>

+<li>Fixed a problem with the soap_disable_href flag.</li>

+<li>Fixed a problem with the position attributes in sparse multi-dimensional arrays.</li>

+<li>Fixed a problem with the generation of .nsmap files.</li>

+<li>Fixed a problem with mixed content decoding in strings.</li>

+</ul>

+<li>Version 1.2.5 (12/27/2001)</li>

+<ul>

+<li>Fixed a memory leak in the block allocation scheme used for strings, hexBinary, and base64 types.</li>

+<li>Fixed a bug in the WSDL generator for fixed-size arrays.</li>

+<li>Fixed a problem with the use of trailing underscores in field names in struct/class declarations.</li>

+</ul>

+<li>Version 1.2.6 (1/25/2002)</li>

+<ul>

+<li>Improved portability.</li>

+<li>Improved id/href hash table efficiency and storage.</li>

+<li>Improved namespace URI matching with wildcards.</li>

+<li>Improved stand-alone deployment.</li>

+<li>Added <tt>soap_disable_response_count</tt> flag.</li>

+<li>Fixed operator declaration parsing (cast operators).</li>

+<li>Fixed a WSDL generator bug for output parameters and enumeration types.</li>

+<li>Renamed function <tt>soap_return_fault()</tt> into <tt>soap_send_fault()</tt>.</li>

+</ul>

+<li>Version 2.0 (2/2/2002)</li>

+<ul>

+<li>Rewrote the compiler and the run-time to create a thread safe implementation.</li>

+</ul>

+<li>Versions 1.2.7 and 2.0.1 (2/11/2002)</li>

+<ul>

+<li>Added compiler options (-h -c -d -p).</li>

+<li>Added optional specification of service name, location, and namespace URI in header file.</li>

+<li>Improved interoperability.</li>

+</ul>

+<li>Versions 1.2.8 and 2.0.2 (2/24/2002)</li>

+<ul>

+<li>Added function callbacks to support customized I/O and HTTP operations. This allows for plug-in HTTP code, NSAPI interface code,

+reading/writing from/to files or string buffers, etc.</li>

+<li>Added HTTP 1.0/1.1 keep-alive support.</li>

+<li>Added HTTP 1.1 chunked transfer support.</li>

+<li>Added <tt>soap_disable_request_count</tt> flag.</li>

+<li>Added <tt>soap_enable_array_overflow</tt> flag.</li>

+<li>Added type naming conventions to serialize elements without generating <tt>xsi:type</tt> attributes.</li>

+<li>Fixed a fixed-size array decoding problem (type mismatch).</li>

+<li>Fixed &lt;/sequence/&gt; bug in the WSDL generators.</li>

+</ul>

+<li>Versions 1.3 and 2.1 (3/10/2002)</li>

+<ul>

+<li>Added client-side SSL (HTTPS) support (thanks to Massimo Cafaro for his suggestions).</li>

+<li>Added a naming convention for dynamic array <tt>__ptr</tt> fields which enables the naming of the XML tags of array elements.</li>

+<li>Added WSDL Header and Fault schema generation.</li>

+<li>Improved doc/literal encoding style.</li>

+<li>Improved WSDL service/schema namespace generation.</li>

+<li>Fixed SOAP-ENV:Headers to be self contained.</li>

+<li>Fixed WSDL generation of xsd schema types declared as string.</li>

+<li>Fixed a method overriding type clash for derived classes.</li>

+<li>Fixed spurious occurrence of id="-1" with soap_enable_null flag enabled.</li>

+<li>Fixed a front-end gSOAP compiler problem with forward and cyclic struct declarations.</li>

+</ul>

+<li>Versions 1.3.1 and 2.1.1 (3/25/2002)</li>

+<ul>

+<li>Added header file source constructs to support transient data types and transient struct/class fields to control gSOAP's code generatiion window for (de)serialization routines.</li>

+<li>Added callback for handling XML elements that are ignored on the receiving side (e.g. because of schema type problems). This feature is intended to enhance the reliability of services/clients.</li>

+<li>Added server-side SSL support and included an example multi-threaded stand-alone SSL secure SOAP server example.</li>

+<li>Added proxy server support.</li>

+<li>Improved message logging in gSOAP 2.1.1 (thanks to Jessie Ragsdale for his suggestions).</li>

+<li>Fixed WSDL generation for dynamic arrays.</li>

+<li>Fixed deserialization of empty multi-ref derived class instances.</li>

+</ul>

+<li>Versions 1.3.2 and 2.1.2 (4/15/2002)</li>

+<ul>

+<li>Added socket timeout management.</li>

+<li>Added optional client and server cookie support.</li>

+<li>Added support for maxOccurs="unbounded" for arbitrary elements in complexTypes (not just limited to SOAP arrays).</li>

+<li>Improved generation of schema &lt;extension&gt; definitions to allow XML validation in the presence of class overriding.</li>

+<li>Fixed ULONG64 type handling.</li>

+<li>Fixed light validation problem (now rejects invalid XML schema URIs).</li>

+<li>Fixed a deserialization type mismatch with typedef-ed pointer primitives.</li>

+<li>Fixed WSDL and schema interoperability problems.</li>

+</ul>

+<li>Versions 1.3.3 and 2.1.3 (4/27/2002)</li>

+<ul>

+<li>Added 'mustUnderstand' declaration qualifier for SOAP Header processing.</li>

+<li>Added soap.actor attribute for SOAP Header processing.</li>

+<li>Added method-header-part directive to identify methods with header message associations (WSDL requirement).</li>

+<li>Added bitmask (de)serialization.</li>

+<li>Added FastCGI support.</li>

+<li>Improved DLL build support (gSOAP 2.1.3 only).</li>

+<li>Improved WinCE support (gSOAP 2.1.3 only, thanks to Sean Ryan for his suggestions).</li>

+<li>Improved Mac OS X support.</li>

+<li>WSDL generator improvements and fixes.</li>

+<li>Workaround a bug in .NET SOAP Headers (non-unique id name values in .NET).</li>

+<li>Fixed disable_href=1 bug.</li>

+<li>Fixed `XML in string parsing' code generation problem.</li>

+</ul>

+<li>Versions 1.3.4 and 2.1.4 (6/9/2002)</li>

+<ul>

+<li>Added non-blocking soap_accept() with timeout management.</li>

+<li>Added support for SOAP Header and Fault declared as classes.</li>

+<li>Added syntax for 'extern' declarations for transient types and fields.</li>

+<li>Added support for SOAP Headers in SOAP Fault messages.</li>

+<li>Added one-way SOAP messages (2.1.4 only).</li>

+<li>Added support for user-defined (de)serializers (2.1.4 only).</li>

+<li>Improved object memory management.</li>

+<li>Improved support for AIX and HP platforms.</li>

+<li>Fixed proxy server connect bug.</li>

+<li>Fixed an OpenSSL bug.</li>

+<li>Fixed soap_instantiate_ClassX() derived class allocation problem.</li>

+<li>Fixed generation of spurious .xsd files when lots of trailing underscores are used by identifiers in the header file.</li>

+<li>Fixed syntax error that occured with header files containing cyclic class declarations.</li>

+<li>Fixed 'class in struct' and 'vector of classes' VMT initialization bugs.</li>

+</ul>

+<li>Version 2.1.5 (6/22/2002)</li>

+<ul>

+<li>Added non-blocking remote method calls (not supported in win32 version).</li>

+<li>Added specification of default values for struct/class fields.</li>

+<li>Added specification of minOccurs and maxOccurs for struct/class fields.</li>

+<li>Added resolution operator '::' parsing.</li>

+<li>Added abstract method declaration support.</li>

+<li>Fixed WSDL generation of SOAP doc/lit.</li>

+<li>Fixed WITH_FASTCGI option.</li>

+</ul>

+<li>Version 2.1.6 (7/10/2002)</li>

+<ul>

+<li>Added DIME attachment support.</li>

+<li>Added win32 non-blocking sockets.</li>

+<li>Changed "%lld"/"%llu" format strings into "%I64d"/"%I64u" format string for win32.</li>

+<li>Improved I/O.</li>

+<li>Fixed multi-dimensional dynamic array (de)serialization.</li>

+<li>Fixed WSDL enum and header namespace generation.</li>

+</ul>

+<li>Version 2.1.7 (8/6/2002)</li>

+<ul>

+<li>Added generation of example SOAP/XML request and response messages by the compiler.</li>

+<li>Added RSA to SSL stack.</li>

+<li>Added two callbacks to the HTTP stack for efficient handling of HTTP headers in Apache-mod and IIS.</li>

+<li>Added compiler option -m (malloc() memory control) and updated doc on memory allocation policies.</li>

+<li>Added compiler option -i to support #include and #define directives.</li>

+<li>Improved HTTP cookie support to handle new and old cookie protocols.</li>

+<li>Improved external class (de)serialization support (std::string example is included).</li>

+<li>Fixed a SSL+proxy connect problem.</li>

+<li>Fixed uninitialized '//gsoap..executable:' string which caused sporadic exits.</li>

+<li>Fixed XML literal string encoding problem introduced with DIME.</li>

+<li>Fixed and removed WSDL duplicate response elements.</li>

+<li>Fixed LONG64 and ULONG64 types for WinCE.</li>

+</ul>

+<li>Version 2.1.8 (8/28/2002)</li>

+<ul>

+<li>Added client-side proxy class source code generation.</li>

+<li>Added soap.enable_strict flag to enable very strict validation of messages (unknown namespace URIs and XML elements are not allowed).</li>

+<li>Added soap.socket_flags to control socket send() and recv() flags, e.g. to disable broken pipe signals (soap.socket_flags=MSG_NOSIGNAL).</li>

+<li>Added '//gsoap ns service method-action' header file directive.</li>

+<li>Added server-side soap_receiver_fault() and soap_sender_fault() functions to return SOAP 1.1 and SOAP 1.2 faults.</li>

+<li>Added seeding of the PRNG for SSL.</li>

+<li>Added soapcpp2 compiler option '-2' to automate SOAP 1.2 support (SOAP 1.2 features are Beta-release).</li>

+<li>Changed keep-alive support (see docs).</li>

+<li>Improved WSDL output.</li>

+<li>Workaround Bison 1.6 for win32 bug in gSOAP win32 version.</li>

+<li>Fixed a wild-card matching bug in soap_tag_cmp()</li>

+<li>Fixed a string deserialization problem.</li>

+<li>Fixed a deserialization bug that can occur in a client-server combination with gSOAP and Apache Axis.</li>

+</ul>

+<li>Version 2.1.9 (9/08/2002)</li>

+<ul>

+<li>Added HTTP proxy authentication.</li>

+<li>Added plug-in registry (Beta).</li>

+<li>Changed compiler exit status for compilation errors.</li>

+<li>Fixed stdin/stdout binary mode for DIME transfer with gSOAP for win32.</li>

+<li>Fixed win32 soapcpp2.exe bug in .res.xml file generation.</li>

+</ul>

+<li>Version 2.1.10 (10/14/2002)</li>

+<ul>

+<li>Added '//gsoap ns service method-documentation:' directive.</li>

+<li>Added provision for additional documentation text with '//gsoap ns service name:' directive.</li>

+<li>Added #import directive to (recursively) import gSOAP header files.</li>

+<li>Added plugin features and included a plugin example in 'extras' directory.</li>

+<li>Added automake/autoconf to generic gSOAP package (thanks to Christian Aberger).</li>

+<li>Added -DWITH_LOCALTIME compilation option to control time_t (de)serialization.</li>

+<li>Changed time_t (de)serialization (now uses timegm() and gmtime() to handle UTC). Found that mktime() library call is buggy on some systems.</li>

+<li>Improved and reorganized package directory structure.</li>

+<li>Fixed DDL linkage problem with instantiate/delete routines dealing with class instance memory management.</li>

+<li>Fixed compilation problem with Sun Workshop CC compiler and other compilers that adopt a specfic class VMT structure that could break object (de)serializers.</li>

+<li>Fixed bug in WSDL generator with multiple service namespaces.</li>

+</ul>

+<li>Version 2.1.11 (11/10/2002)</li>

+<ul>

+<li>Added a multi-functional SOAP router application (message forwarding and

+message relay server).</li>

+<li>Added keep-alive support for asynchronous one-way messages.</li>

+<li>Improved parsing and handling of function prototypes and class methods.</li>

+<li>Improved modular design to enable the compilation and linkage of multiple client and service modules.</li>

+<li>Improved user-defined SOAP Fault detail handling.</li>

+<li>Fixed SSL_accept bug.</li>

+<li>Fixed serialization of pointers to dynamic arrays with multi-references.</li>

+</ul>

+<li>Version 2.2 (12/12/2002)</li>

+<ul>

+<li>Added XML attribute (de)serialization support.</li>

+<li>Added XSD QName parsing and conversion support (typedef char *xsd__QName).</li>

+<li>Added compression support (-DWITH_ZLIB requires Zlib).</li>

+<li>Changed and improved transport and encoding settings by splitting up sending and

+receiving side flags into separate sets. Depricated soap.enable_X and soap.disable_X flags.</li>

+<li>Improved keep-alive support (automatic client and server sides).</li>

+<li>Fixed a bug in mustUnderstand handling.</li>

+<li>Fixed a sporadic crash of the gSOAP compiler under win32.</li>

+<li>Fixed user-defined SOAP Fault output in WSDL generator.</li>

+</ul>

+<li>Version 2.2.1 (12/18/2002)</li>

+<ul>

+<li>Added callbacks to enable custom streaming of DIME attachments.</li>

+<li>Fixed broken serialization of pointers to dynamic arrays with NULL

+__ptr</li>

+<li>Fixed some WSDL issues.</li>

+</ul>

+<li>Version 2.2.2 (1/25/2003)</li>

+<ul>

+<li>Added gzip support (-DWITH_GZIP requires Zlib).</li>

+<li>Added faccept() callback.</li>

+<li>Improved HTTP chunking.</li>

+<li>Fixed OpenSSL and accept_timeout (OpenSSL requires blocking sockets).</li>

+<li>Fixed HTTP header buffering.</li>

+<li>Fixed UTF8 decoding of a subset of characters (2-octet UTF).</li>

+<li>Fixed 'operator==' parsing.</li>

+<li>Fixed a couple of WSDL issues.</li>

+</ul>

+<li>Version 2.2.3 (3/2/2003)</li>

+<ul>

+<li>Added server-side HTTP basic authentication.</li>

+<li>Improved speed.</li>

+<li>Improved Tru64 portability.</li>

+<li>Changed fpost() function callback signature: added 'int port' argument and

+added port number to the Host: HTTP header.</li>

+<li>Fixed memory leak in SSL connect when using OpenSSL DH.</li>

+<li>Fixed custom (de)serializer definitions parsing.</li>

+<li>Fixed a gzip/deflate bug with large transfers.</li>

+<li>Fixed use of ftime() for time_t (de)serialization with timezones.</li>

+<li>Fixed a problem with concurrent access to global namespace table by multiple threads.</li>

+<li>Fixed crash with //gsoap name directive.</li>

+<li>Fixed deserialization bug with multi-ref object encoding by Apache Axis.</li>

+</ul>

+<li>Version 2.3.1-8 (9/24/2003)</li>

+<ul>

+<li>Updated SOAP 1.2 support (implements the SOAP 1.2 recommendation).</li>

+<li>Added STL container support and built-in std::string encoding.</li>

+<li>Added stand-alone Web server example to serve static and dynamic pages

+with a new HTTP GET plugin.</li>

+<li>Added void* (de)serialization, e.g. useful to support polymorphism with C

+applications and as an alternative to union types.</li>

+<li>Added XML DOM parser to support SOAP document encoding and for mixing of application data (de)serialization within an XML DOM.</li>

+<li>Added WITH_LEAN and WITH_LEANER compilation flags to improve support for

+small-memory devices such as WinCE and Palm.</li>

+<li>Added SOAP_XML_CANONICAL flag for canonical XML output (XML-C14N support

+and SOAP 1.2 normalization support).</li>

+<li>Added '//gsoap ns method-encoding:' directive.</li>

+<li>Added '//gsoap ns schema import:' directive.</li>

+<li>Added optional class getter and setter methods for object (de)serialization.</li>

+<li>Added 'volatile' qualifier to indicate that certain type declarations

+should be treated 'as-is' when types are declared externally (e.g. part of a

+library).</li>

+<li>Added a new string notation for declarations to specify simpleType restriction patterns.</li>

+<li>Added soapcpp2 -I option to indicate #import path.</li>

+<li>Added support for (de)serialization of application data to C++ iostreams.</li>

+<li>Added fsslauth() callback.</li>

+<li>Added HTTP code error values.</li>

+<li>Added SOAP_MALLOC and SOAP_FREE macros to replace malloc() and free().</li>

+<li>Added soap_strdup(soap, string) to copy strings in gSOAP's memory space.</li>

+<li>Added chunked streaming DIME output (thanks to J. Li for his

+suggestions).</li>

+<li>Added SOAP_SOCKET for win32 support (thanks to B. Gille for his suggestions).</li>

+<li>Added SO_LINGER support (soap.connect_flags).</li>

+<li>Added support for iso-8859-1 encoded XML parsing (default is utf8).</li>

+<li>Added #module directive to build shared libraries.</li>

+<li>Added C++ namespaces support to enable the compilation and linkage of

+multiple client and service codes.</li>

+<li>Added WITH_CASEINSENSITIVETAGS compilation flag to enable case insensitive

+XML parsing.</li>

+<li>Improved WSDL types schema output.</li>

+<li>Improved custom (de)serialization (note: extras/stringtest example

+has been changed).</li>

+<li>Improved SOAP literal encoding.</li>

+<li>Improved speed.</li>

+<li>Improved HTTP1.0/1.1 support.</li>

+<li>Removed soap.defaultNamespace in favor of automatic SOAP literal output based on soap.encodingStyle value.</li>

+<li>Fixed GMT to DST localtime conversion, but still issues with Sun Solaris.</li>

+<li>Fixed dynamic array __offset handling.</li>

+<li>Fixed class definition order.</li>

+<li>Fixed sporadic memory leak in HTTP cookie reader.</li>

+<li>Fixed multi-threaded server-side OpenSSL initialization.</li>

+<li>Fixed enumeration-based XML attribute deserialiation.</li>

+<li>Fixed SOAP-ENC:position attribute placement when arrays of pointers are

+mixed with nillable data.</li>

+<li>Fixed crash when parsing incorrect SOAP/XML attribute content.</li>

+</ul>

+<li>Version 2.4 (12/20/2003)</li>

+<ul>

+<li>New WSDL parser and importer with improved support for SOAP document style and literal encoding.</li>

+<li>Added optional full schema validation (partial by default). Use SOAP_XML_STRICT flag.</li>

+<li>Added SSL session caching.</li>

+<li>Added soap_set_namespaces() to switch namespace tables.</li>

+<li>Fixed plugin memory leak. REQUIRED CHANGE to plugin allocation and copying.</li>

+<li>Fixed server-side blocking SSL accept.</li>

+</ul>

+<li>Version 2.4.1 (01/07/2004)</li>

+<ul>

+<li>Changed _USCORE_ and _DOT_ naming conventions into _USCORE and _DOT to improve name

+mapping.</li>

+<li>Updated DOM parser (integrated into core gSOAP library).</li>

+<li>Improved WSDL parser and included several new features.</li>

+<li>Fixed WSDL schema import and WSDL literal output.</li>

+</ul>

+<li>Version 2.5 (01/28/2004)</li>

+<ul>

+<li>Changed default encoding to SOAP RPC literal, as mandated by WS-I Basic

+Profile 1.0a and best practices.</li>

+<li>Added soapcpp2 compiler option -e for backward compatibility to gSOAP

+2.4.1 and earlier that use SOAP RPC

+encoding defaults (helpful when migrating gSOAP projects to 2.5).</li>

+<li>Added automatic compiler-side WS-I Basic Profile 1.0a compliance warnings

+(warns before deployment).</li>

+<li>Added fget() callback for HTTP GET responses.</li>

+<li>Added IPv6 support contributed by Wind River Systems.</li>

+<li>Added VxWorks support contributed by Wind River Systems.</li>

+<li>Improved SOAP Fault handling.</li>

+<li>Improved interop with Axis RPC encoded response messages.</li>

+<li>Fixed std::string xsi:type attribute value.</li>

+<li>Fixed gSOAP 2.4 problems with serialization of enumeration values outside enumeration range.</li>

+<li>Fixed gSOAP 2.4 Pocket PC build problem.</li>

+<li>Fixed wsdl2h SOAP Fault and Header output.</li>

+</ul>

+<li>Version 2.5.1 (02/12/2004)</li>

+<ul>

+<li>Improved WSDL output and WS-I BP1.0a compliance.</li>

+<li>Improved WSDL parser stability.</li>

+<li>Fixed problem parsing empty xsd:base64Binary elements.</li>

+<li>Fixed VxWorks and TRU64 portability issues.</li>

+<li>Fixed HTTP 400 error problem.</li>

+<li>Fixed soapcpp2 2.5 stability problem with one-way messages.</li>

+</ul>

+<li>Version 2.5.2 (02/23/2004)</li>

+<ul>

+<li>Fixed WSDL generation warnings.</li>

+<li>Fixed LONG64 problem for PalmOS.</li>

+<li>Fixed module build link problem and 'components' example.</li>

+</ul>

+<li>Version 2.6.0 (03/28/2004)</li>

+<ul>

+<li>Changed default style to doc/lit.</li>

+<li>Improved doc/lit WSDL handling.</li>

+<li>Improved soapcpp2 sample SOAP/XML message output.</li>

+<li>Added proxy support for wsdl2h.</li>

+<li>Fixed CONNECT method for proxy+SSL+gzip.</li>

+</ul>

+<li>Version 2.6.1 (06/07/2004)</li>

+<ul>

+<li>Added optional multibyte character support.</li>

+<li>Improved WSDL output.</li>

+<li>Fixed STL container multi-ref deserialization problem with missing data.</li>

+<li>Fixed doc/lit server code generation from doc/lit WSDL definitions.</li>

+</ul>

+<li>Version 2.6.2 (06/12/2004)</li>

+<ul>

+<li>Added Matlab(tm) code output (documentation is not availabel yet).</li>

+<li>Improved wsdl2h output for schema facets.</li>

+<li>Updated dom.cpp.</li>

+<li>Changed wsdl2h std::string* --&gt; std::string generation (to avoid double

+pointers std::string**). To obtain old behavior, add entry "xsd:string =

+| std::string* | std::string*" to typemap.dat.</li>

+<li>Fixed wsdl2h handling of &lt;xs:include&gt;.</li>

+<li>Fixed wsdl2h handling of empty namespaces and absent targetNamespace

+schema attributes.</li>

+<li>Fixed MB char handling.</li>

+</ul>

+<li>Version 2.7.0a/b/c/d/e/f (09/10/2004, 2/1/2005)</li>

+<ul>

+<li>Added multipart/related support for SOAP with MIME attachments (SwA).</li>

+<li>Added API functions for DIME open and closed layout support.</li>

+<li>Added //gsoap schema elementForm/attributeForm directive.</li>

+<li>Added fclosesocket, fshutdownsocket, fpoll, fserveloop callbacks.</li>

+<li>Added soap.authrealm string attribute to set basic authentication realm.</li>

+<li>Added soap.prolog string attribute to output optional XML prolog with processing instructions and directives.</li>

+<li>Added soapcpp2 option -t.</li>

+<li>Added wsdl2h options -e and -i.</li>

+<li>Added Palm OS and Symbian instructions and examples.</li>

+<li>Added xml-rpc support and examples.</li>

+<li>New mod_gsoap directory with modules for Apache 1.x/2.x, IIS, and WinInet</li>

+<li>Improved XML validation with SOAP_XML_STRICT flag.</li>

+<li>Improved memory footprint (reduced code size and reduced serialization overhead).</li>

+<li>Improved runtime id-ref serialization and deserialization.</li>

+<li>Improved wsdl2h translation.</li>

+<li>Updated dom.cpp.</li>

+<li>Updated webserver.c.</li>

+<li>Fixed issues with namespace qualification in doc/lit messages.</li>

+<li>Fixed SOAP_HREF error.</li>

+<li>Fixed proxy+SSL+zlib+chunking.</li>

+<li>Fixed SSL select() polling in frecv().</li>

+<li>Fixed wsdl2h multidimensional SOAP arrays generate problem.</li>

+</ul>

+<li>Version 2.7.1 (03/31/2005)</li>

+<ul>

+<li>Added new style of C++ proxy/object generation (objects derived from

+soap struct), enabled with soapcpp2 option -i.</li>

+<li>Added new features to wsdl2h generation to enable user-defined class/struct extensions such as member data and functions which are declared in typemap.dat.</li>

+<li>Added MIME multipart/form-data parsing to support HTTP POST HTML form handling (example included in samples/webserver).</li>

+<li>Added built-in memory leak detection enabled with -DDEBUG.</li>

+<li>Added UDDI v2 API and examples.</li>

+<li>Added 'WS' directory with WS-* protocols, such as WS-Addressing. This part will mature as more WS-* protocols will be added over time.</li>

+<li>Added fseterror() callback.</li>

+<li>Improved wsdl2h code output.</li>

+<li>Enhanced Web server sample code, and httpget and logging plugins.</li>

+<li>Fixed base64/hexBinary XML attribute serialization.</li>

+<li>Fixed a missing min/maxOccurs check for validation.</li>

+</ul>

+<li>Version 2.7.2 (05/11/2005)</li>

+<ul>

+<li>Added SOAP-over-UDP IPv4/IPv6 support with examples.</li>

+<li>Added UDDI v2 API publish example.</li>

+<li>Improved wsdl2h parser accepting multiple WSDL/XSD files from the command

+line.</li>

+<li>Fixed wsdl2h schema import from included schema bug.</li>

+<li>Fixed SOAP 1.2 Fault Subcode handling.</li>

+</ul>

+<li>Version 2.7.3 (06/27/2005)</li>

+<ul>

+<li>Added MTOM attachment support.</li>

+<li>Added 'plugin' directory with example plug-ins.</li>

+<li>Added 'import' directory for commonly #import-ed files such as stlvector.h.</li>

+<li>Added HTTP digest authentication plug-in 'plugins/httpda.h'.</li>

+<li>Added new import feature to wsdl2h using ns=&lt;uri&gt; convention for

+typemap.dat files, which enables wsdl2h to parse a WSDL that imports known

+WSDLs/schemas such as XOP, XML MIME, and WS-Addressing without actually

+reading the imported WSDL/schemas.</li>

+<li>Added soapcpp2 options -C and -S to generate client- or server-only

+codes.</li>

+<li>Added multi-path support for soappcpp2 option -I.</li>

+<li>Added C and C++ examples to combine multiple clients and services into one

+executable, see the samples/components directory in the package.</li>

+<li>Improved soapcpp2 option -e to generate SOAP RPC encoding style client/server codes by

+default (instead of document/literal by default).</li>

+<li>Fixed wsdl2h circular import of schemas.</li>

+<li>Fixed attributeGroup handling in wsdl2h.</li>

+<li>Fixed soapcpp2 handling of 'invisible' tags, e.g. __any, that should only be

+populated after all else failed to match the delivered XML content.</li>

+<li>Fixed validation of numeric enum constants with SOAP_XML_STRICT validation.</li>

+<li>Fixed engine's spurious log file generation issue.</li>

+</ul>

+<li>Version 2.7.4 (07/24/2005)</li>

+<ul>

+<li>Added union serialization.</li>

+<li>Added '//gsoap ... type-documentation:' directive.</li>

+<li>Added '//gsoap ... method-mime-type:' directive.</li>

+<li>Added wsdl2h option -g for generating global element/attribute declarations for building modular .h files.</li>

+<li>Added wsdl2 option -y for generating typedef synonyms for structs and enums, with improved handling of typedefs by soapcpp2.</li>

+<li>Added wsdl2 option -u to disable union generation for xs:choice.</li>

+<li>Improved wsdl2h documentation generation.</li>

+<li>Improved wsdl2h and soapcpp2 MIME bindings.</li>

+<li>Improved dynamic memory allocation in engine with look-aside buffering.</li>

+<li>Fixed wsdl2h xs:complexContent/extension/attributeGroup translation.</li>

+<li>Fixed wsdl2h xs:choice with min/maxOccurs != 1 translation.</li>

+<li>Fixed wsdl2h soap:body parts attribute.</li>

+</ul>

+<li>Version 2.7.5 (08/01/2005)</li>

+<ul>

+<li>Added xs:redefine support to wsdl2h.</li>

+<li>Added HTML POST application/x-www-form-urlencoded plugin httpform.c

+(demo samples/webserver).</li>

+<li>Improved wsdl2h output.</li>

+<li>Fixed wsdl2h handling of duplicate values in single enum list.</li>

+</ul>

+<li>Version 2.7.6 revision a/b/c/d/e (08/19/2005-02/18/06)</li>

+<ul>

+<li>Added WS-Security authentication, tokens, and signatures with new 'wsse'

+plugin, see documentation in 'doc' directory and 'samples/wsse'.</li>

+<li>Added 'doc' directory for documentation and moved soapdoc2.html and soapdoc2.pdf.</li>

+<li>Added SOAP_XML_INDENT flag.</li>

+<li>Added soap_sender_fault_subcode() and soap_receiver_fault_subcode() for SOAP 1.2 subcodes.</li>

+<li>Added WITH_DOM compile flag to enable flushing serialized and deserialized

+data to DOM (as well as a stream).</li>

+<li>Added soapcpp2 option -L.</li>

+<li>Added soapcpp2 option -a.</li>

+<li>Added wsdl2h option -a (for backward compatibility).</li>

+<li>Added wsdl2h option -d.</li>

+<li>Added WITH_TCPFIN comile flag to enable optional shutdown with how=1 (TCPFIN) after final sends to force EOF on other side (used to be the default behavior).</li>

+<li>Added schema substitutionGroup support.</li>

+<li>Added soap_ssl_init().</li>

+<li>Improved DOM implementation and documentation.</li>

+<li>Improved AS400 portability.</li>

+<li>Improved schema choice support.</li>

+<li>Fixed wsdl2h multiple schema include issue.</li>

+<li>Fixed soaps2dateTime and soap_timegm functions when timegm is not available.</li>

+<li>Fixed exc-c14n formatting.</li>

+<li>Fixed SOAP 1.2 fault handling.</li>

+<li>Fixed missing soap_flag___item2 issue.</li>

+<li>Fixed partial MIME boundary parsing issue.</li>

+<li>Fixed base64 parsing with WITH_FAST.</li>

+<li>Fixed MIME encoding of \r\r sequence.</li>

+<li>Fixed QName normalization issue.</li>

+<li>Fixed relative path schema import.</li>

+<li>Fixed MTOM cid matching with URL encoded IDs.</li>

+<li>Fixed wide-character (wchar_t*) XML attribute handling.</li>

+<li>Fixed std::vector element id-ref ordering in deserializer.</li>

+</ul>

+</ul>

+

+</body>

+</html>

diff --git a/custom/README.txt b/custom/README.txt
new file mode 100644
index 0000000..dc12d84
--- /dev/null
+++ b/custom/README.txt
@@ -0,0 +1,8 @@
+This directory contains custom serializers for common data types.
+
+Custom serializers replace the soapcpp2-generated serialization routines.
+See the notes in the source files on specific usage.
+
+The following serializers are available:
+
+struct_tm.*	Serializes <time.h> struct tm
diff --git a/custom/struct_tm.c b/custom/struct_tm.c
new file mode 100644
index 0000000..5ab92f9
--- /dev/null
+++ b/custom/struct_tm.c
@@ -0,0 +1,134 @@
+/*
+
+struct_tm.c
+
+Custom serializer for <time.h> struct tm
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia, Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+// soapH.h generated by soapcpp2 from .h file containing #import "struct_tm.h":
+#include "soapH.h"
+
+void soap_default_xsd__dateTime(struct soap *soap, struct tm *a)
+{ memset(a, 0, sizeof(struct tm));
+}
+
+void soap_serialize_xsd__dateTime(struct soap *soap, struct tm const *a)
+{ }
+
+int soap_out_xsd__dateTime(struct soap *soap, const char *tag, int id, const struct tm *a, const char *type)
+{ if (!soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_xsd__dateTime), type))
+  { strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", a);
+    if (soap_string_out(soap, soap->tmpbuf, 0))
+      return soap->error;
+  }
+  else
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+
+struct tm *soap_in_xsd__dateTime(struct soap *soap, const char *tag, struct tm *a, const char *type)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":dateTime"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  a = (struct tm*)soap_id_enter(soap, soap->id, a, SOAP_TYPE_xsd__dateTime, sizeof(struct tm), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    a = (struct tm*)soap_id_forward(soap, soap->href, a, SOAP_TYPE_xsd__dateTime, 0, sizeof(struct tm), 0, NULL);
+  else if (a)
+  { const char *s = soap_value(soap);
+    memset((void*)a, 0, sizeof(struct tm));
+    if (s)
+    { char zone[16];
+      const char *t;
+      zone[sizeof(zone)-1] = '\0';
+      if (strchr(s, '-'))
+        t = "%d-%d-%dT%d:%d:%d%15s";
+      else if (strchr(s, ':'))
+        t = "%4d%2d%2dT%d:%d:%d%15s";
+      else /* parse non-XSD-standard alternative ISO 8601 format */
+        t = "%4d%2d%2dT%2d%2d%2d%15s";
+      sscanf(s, t, &a->tm_year, &a->tm_mon, &a->tm_mday, &a->tm_hour, &a->tm_min, &a->tm_sec, zone);
+      if (a->tm_year == 1)
+        a->tm_year = 70;
+      else
+        a->tm_year -= 1900;
+      a->tm_mon--;
+      if (*zone)
+      { if (*zone == '.')
+        { for (s = zone + 1; *s; s++)
+            if (*s < '0' || *s > '9')
+              break;
+        }
+        else
+          s = zone;
+        if (*s == '+' || *s == '-')
+        { int h = 0, m = 0;
+          if (s[3] == ':')
+          { sscanf(s, "%d:%d", &h, &m);
+            if (h < 0)
+              m = -m;
+          }
+          else
+          { m = (int)atol(s);
+            h = m / 100;
+            m = m % 100;
+          }
+          a->tm_hour -= h;
+          a->tm_min -= m;
+        }
+        a->tm_isdst = 0;
+      }
+      else
+        a->tm_isdst = -1;
+    }
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return a;
+}
+
+
diff --git a/custom/struct_tm.h b/custom/struct_tm.h
new file mode 100644
index 0000000..7d65e68
--- /dev/null
+++ b/custom/struct_tm.h
@@ -0,0 +1,67 @@
+/*
+
+struct_tm.h
+
+Custom serializer for <time.h> struct tm
+
+#import this file into your gSOAP .h file to enable struct tm serialization.
+
+To serialize struct tm data as an xsd:dateTime XSD type, use the xsd__dateTime
+typedef in your declarations. Link your code with struct_tm.c
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia, Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include <time.h>
+
+volatile struct tm
+{	int	tm_sec;		// seconds (0 - 60)
+	int	tm_min;		// minutes (0 - 59)
+	int	tm_hour;	// hours (0 - 23)
+	int	tm_mday;	// day of month (1 - 31)
+	int	tm_mon;		// month of year (0 - 11)
+	int	tm_year;	// year - 1900
+	int	tm_wday;	// day of week (Sunday = 0)
+	int	tm_yday;	// day of year (0 - 365)
+	int	tm_isdst;	// is summer time in effect?
+	char*	tm_zone;	// abbreviation of timezone
+};
+
+extern typedef struct tm xsd__dateTime;
diff --git a/doc/dom/html/annotated.html b/doc/dom/html/annotated.html
new file mode 100644
index 0000000..cefdcb1
--- /dev/null
+++ b/doc/dom/html/annotated.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Class List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindexHL" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>gSOAP level-2 DOM Class List</h1>Here are the classes, structs, unions and interfaces with brief descriptions:<table>

+  <tr><td class="indexkey"><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a></td><td class="indexvalue"></td></tr>

+  <tr><td class="indexkey"><a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a></td><td class="indexvalue"></td></tr>

+  <tr><td class="indexkey"><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td class="indexvalue"></td></tr>

+  <tr><td class="indexkey"><a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a></td><td class="indexvalue"></td></tr>

+</table>

+<hr size="1"><address style="align: right;"><small>Generated on Sat Aug 20 12:24:36 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/classsoap__dom__attribute__iterator-members.html b/doc/dom/html/classsoap__dom__attribute__iterator-members.html
new file mode 100644
index 0000000..eb478ed
--- /dev/null
+++ b/doc/dom/html/classsoap__dom__attribute__iterator-members.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_dom_attribute_iterator Member List</h1>This is the complete list of members for <a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__attribute__iterator.html#o0">att</a></td><td><a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__attribute__iterator.html#o2">name</a></td><td><a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__attribute__iterator.html#o1">nstr</a></td><td><a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__attribute__iterator.html#a2">operator *</a>() const</td><td><a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__attribute__iterator.html#a1">operator!=</a>(const soap_dom_attribute_iterator &amp;) const</td><td><a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__attribute__iterator.html#a3">operator++</a>()</td><td><a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__attribute__iterator.html#a0">operator==</a>(const soap_dom_attribute_iterator &amp;) const</td><td><a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__attribute__iterator.html#a4">soap_dom_attribute_iterator</a>()</td><td><a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__attribute__iterator.html#a5">soap_dom_attribute_iterator</a>(struct soap_dom_attribute *)</td><td><a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__attribute__iterator.html#a6">~soap_dom_attribute_iterator</a>()</td><td><a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Sat Aug 20 12:24:36 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/classsoap__dom__attribute__iterator.html b/doc/dom/html/classsoap__dom__attribute__iterator.html
new file mode 100644
index 0000000..e79e4c2
--- /dev/null
+++ b/doc/dom/html/classsoap__dom__attribute__iterator.html
@@ -0,0 +1,309 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: soap_dom_attribute_iterator Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_dom_attribute_iterator Class Reference</h1><code>#include &lt;stdsoap2.h&gt;</code>

+<p>

+Collaboration diagram for soap_dom_attribute_iterator:<p><center><img src="classsoap__dom__attribute__iterator__coll__graph.png" border="0" usemap="#soap__dom__attribute__iterator__coll__map" alt="Collaboration graph"></center>

+<map name="soap__dom__attribute__iterator__coll__map">

+<area href="structsoap__dom__attribute.html" shape="rect" coords="32,17,160,44" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classsoap__dom__attribute__iterator-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__attribute__iterator.html#a0">operator==</a> (const <a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a> &amp;) const</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__attribute__iterator.html#a1">operator!=</a> (const <a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a> &amp;) const</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__attribute__iterator.html#a2">operator *</a> () const</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__attribute__iterator.html#a3">operator++</a> ()</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__attribute__iterator.html#a4">soap_dom_attribute_iterator</a> ()</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__attribute__iterator.html#a5">soap_dom_attribute_iterator</a> (struct <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a> *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__attribute__iterator.html#a6">~soap_dom_attribute_iterator</a> ()</td></tr>

+

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__attribute__iterator.html#o0">att</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__attribute__iterator.html#o1">nstr</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__attribute__iterator.html#o2">name</a></td></tr>

+

+</table>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a4" doxytag="soap_dom_attribute_iterator::soap_dom_attribute_iterator" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> soap_dom_attribute_iterator::soap_dom_attribute_iterator           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a5" doxytag="soap_dom_attribute_iterator::soap_dom_attribute_iterator" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> soap_dom_attribute_iterator::soap_dom_attribute_iterator           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a6" doxytag="soap_dom_attribute_iterator::~soap_dom_attribute_iterator" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> soap_dom_attribute_iterator::~<a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a>           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a2" doxytag="soap_dom_attribute_iterator::operator *" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a>&amp; soap_dom_attribute_iterator::operator *           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap> const</td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="soap_dom_attribute_iterator::operator!=" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> bool soap_dom_attribute_iterator::operator!=           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const <a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a> &amp;&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap> const</td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a3" doxytag="soap_dom_attribute_iterator::operator++" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a>&amp; soap_dom_attribute_iterator::operator++           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a0" doxytag="soap_dom_attribute_iterator::operator==" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> bool soap_dom_attribute_iterator::operator==           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const <a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a> &amp;&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap> const</td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="soap_dom_attribute_iterator::att" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a>* <a class="el" href="classsoap__dom__attribute__iterator.html#o0">soap_dom_attribute_iterator::att</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="soap_dom_attribute_iterator::name" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="classsoap__dom__attribute__iterator.html#o2">soap_dom_attribute_iterator::name</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_dom_attribute_iterator::nstr" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="classsoap__dom__attribute__iterator.html#o1">soap_dom_attribute_iterator::nstr</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Sat Aug 20 12:24:36 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/classsoap__dom__attribute__iterator__coll__graph.map b/doc/dom/html/classsoap__dom__attribute__iterator__coll__graph.map
new file mode 100644
index 0000000..3c60f30
--- /dev/null
+++ b/doc/dom/html/classsoap__dom__attribute__iterator__coll__graph.map
@@ -0,0 +1,2 @@
+base referer
+rect $structsoap__dom__attribute.html 32,17 160,44
diff --git a/doc/dom/html/classsoap__dom__attribute__iterator__coll__graph.md5 b/doc/dom/html/classsoap__dom__attribute__iterator__coll__graph.md5
new file mode 100644
index 0000000..b9d296c
--- /dev/null
+++ b/doc/dom/html/classsoap__dom__attribute__iterator__coll__graph.md5
@@ -0,0 +1 @@
+04c7bc73ca80f042a86dbfdb64a9fce7
\ No newline at end of file
diff --git a/doc/dom/html/classsoap__dom__attribute__iterator__coll__graph.png b/doc/dom/html/classsoap__dom__attribute__iterator__coll__graph.png
new file mode 100644
index 0000000..f97a919
--- /dev/null
+++ b/doc/dom/html/classsoap__dom__attribute__iterator__coll__graph.png
Binary files differ
diff --git a/doc/dom/html/classsoap__dom__element__iterator-members.html b/doc/dom/html/classsoap__dom__element__iterator-members.html
new file mode 100644
index 0000000..17e735b
--- /dev/null
+++ b/doc/dom/html/classsoap__dom__element__iterator-members.html
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_dom_element_iterator Member List</h1>This is the complete list of members for <a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__element__iterator.html#o0">elt</a></td><td><a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__element__iterator.html#o2">name</a></td><td><a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__element__iterator.html#o1">nstr</a></td><td><a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__element__iterator.html#a2">operator *</a>() const</td><td><a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__element__iterator.html#a1">operator!=</a>(const soap_dom_element_iterator &amp;) const</td><td><a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__element__iterator.html#a3">operator++</a>()</td><td><a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__element__iterator.html#a0">operator==</a>(const soap_dom_element_iterator &amp;) const</td><td><a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__element__iterator.html#a4">soap_dom_element_iterator</a>()</td><td><a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__element__iterator.html#a5">soap_dom_element_iterator</a>(struct soap_dom_element *)</td><td><a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__element__iterator.html#o3">type</a></td><td><a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__element__iterator.html#a6">~soap_dom_element_iterator</a>()</td><td><a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Sat Aug 20 12:24:36 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/classsoap__dom__element__iterator.html b/doc/dom/html/classsoap__dom__element__iterator.html
new file mode 100644
index 0000000..f57fda1
--- /dev/null
+++ b/doc/dom/html/classsoap__dom__element__iterator.html
@@ -0,0 +1,335 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: soap_dom_element_iterator Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_dom_element_iterator Class Reference</h1><code>#include &lt;stdsoap2.h&gt;</code>

+<p>

+Collaboration diagram for soap_dom_element_iterator:<p><center><img src="classsoap__dom__element__iterator__coll__graph.png" border="0" usemap="#soap__dom__element__iterator__coll__map" alt="Collaboration graph"></center>

+<map name="soap__dom__element__iterator__coll__map">

+<area href="structsoap__dom__element.html" shape="rect" coords="31,119,161,145" alt="">

+<area href="structsoap__dom__attribute.html" shape="rect" coords="32,17,160,44" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classsoap__dom__element__iterator-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__element__iterator.html#a0">operator==</a> (const <a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a> &amp;) const</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__element__iterator.html#a1">operator!=</a> (const <a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a> &amp;) const</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dom__element.html">soap_dom_element</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__element__iterator.html#a2">operator *</a> () const</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__element__iterator.html#a3">operator++</a> ()</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__element__iterator.html#a4">soap_dom_element_iterator</a> ()</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__element__iterator.html#a5">soap_dom_element_iterator</a> (struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__element__iterator.html#a6">~soap_dom_element_iterator</a> ()</td></tr>

+

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__element__iterator.html#o0">elt</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__element__iterator.html#o1">nstr</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__element__iterator.html#o2">name</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__element__iterator.html#o3">type</a></td></tr>

+

+</table>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a4" doxytag="soap_dom_element_iterator::soap_dom_element_iterator" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> soap_dom_element_iterator::soap_dom_element_iterator           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a5" doxytag="soap_dom_element_iterator::soap_dom_element_iterator" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> soap_dom_element_iterator::soap_dom_element_iterator           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a6" doxytag="soap_dom_element_iterator::~soap_dom_element_iterator" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> soap_dom_element_iterator::~<a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a>           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a2" doxytag="soap_dom_element_iterator::operator *" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a>&amp; soap_dom_element_iterator::operator *           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap> const</td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="soap_dom_element_iterator::operator!=" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> bool soap_dom_element_iterator::operator!=           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const <a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a> &amp;&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap> const</td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a3" doxytag="soap_dom_element_iterator::operator++" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a>&amp; soap_dom_element_iterator::operator++           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a0" doxytag="soap_dom_element_iterator::operator==" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> bool soap_dom_element_iterator::operator==           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const <a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a> &amp;&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap> const</td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="soap_dom_element_iterator::elt" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a>* <a class="el" href="classsoap__dom__element__iterator.html#o0">soap_dom_element_iterator::elt</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="soap_dom_element_iterator::name" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="classsoap__dom__element__iterator.html#o2">soap_dom_element_iterator::name</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_dom_element_iterator::nstr" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="classsoap__dom__element__iterator.html#o1">soap_dom_element_iterator::nstr</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="soap_dom_element_iterator::type" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="classsoap__dom__element__iterator.html#o3">soap_dom_element_iterator::type</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Sat Aug 20 12:24:36 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/classsoap__dom__element__iterator__coll__graph.map b/doc/dom/html/classsoap__dom__element__iterator__coll__graph.map
new file mode 100644
index 0000000..5a41a78
--- /dev/null
+++ b/doc/dom/html/classsoap__dom__element__iterator__coll__graph.map
@@ -0,0 +1,3 @@
+base referer
+rect $structsoap__dom__element.html 31,119 161,145
+rect $structsoap__dom__attribute.html 32,17 160,44
diff --git a/doc/dom/html/classsoap__dom__element__iterator__coll__graph.md5 b/doc/dom/html/classsoap__dom__element__iterator__coll__graph.md5
new file mode 100644
index 0000000..1568aa8
--- /dev/null
+++ b/doc/dom/html/classsoap__dom__element__iterator__coll__graph.md5
@@ -0,0 +1 @@
+983ab45578004a7d86bd9a451bfb5e86
\ No newline at end of file
diff --git a/doc/dom/html/classsoap__dom__element__iterator__coll__graph.png b/doc/dom/html/classsoap__dom__element__iterator__coll__graph.png
new file mode 100644
index 0000000..0cf638a
--- /dev/null
+++ b/doc/dom/html/classsoap__dom__element__iterator__coll__graph.png
Binary files differ
diff --git a/doc/dom/html/classsoap__dom__iterator-members.html b/doc/dom/html/classsoap__dom__iterator-members.html
new file mode 100644
index 0000000..a6701ae
--- /dev/null
+++ b/doc/dom/html/classsoap__dom__iterator-members.html
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_dom_iterator Member List</h1>This is the complete list of members for <a class="el" href="classsoap__dom__iterator.html">soap_dom_iterator</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__iterator.html#o0">elt</a></td><td><a class="el" href="classsoap__dom__iterator.html">soap_dom_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__iterator.html#o2">name</a></td><td><a class="el" href="classsoap__dom__iterator.html">soap_dom_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__iterator.html#o1">nstr</a></td><td><a class="el" href="classsoap__dom__iterator.html">soap_dom_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__iterator.html#a2">operator *</a>() const</td><td><a class="el" href="classsoap__dom__iterator.html">soap_dom_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__iterator.html#a1">operator!=</a>(const soap_dom_iterator &amp;) const</td><td><a class="el" href="classsoap__dom__iterator.html">soap_dom_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__iterator.html#a3">operator++</a>()</td><td><a class="el" href="classsoap__dom__iterator.html">soap_dom_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__iterator.html#a0">operator==</a>(const soap_dom_iterator &amp;) const</td><td><a class="el" href="classsoap__dom__iterator.html">soap_dom_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__iterator.html#a4">soap_dom_iterator</a>()</td><td><a class="el" href="classsoap__dom__iterator.html">soap_dom_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__iterator.html#a5">soap_dom_iterator</a>(struct soap_dom_element *)</td><td><a class="el" href="classsoap__dom__iterator.html">soap_dom_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__iterator.html#o3">type</a></td><td><a class="el" href="classsoap__dom__iterator.html">soap_dom_iterator</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classsoap__dom__iterator.html#a6">~soap_dom_iterator</a>()</td><td><a class="el" href="classsoap__dom__iterator.html">soap_dom_iterator</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 23:10:23 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/classsoap__dom__iterator.html b/doc/dom/html/classsoap__dom__iterator.html
new file mode 100644
index 0000000..f65d731
--- /dev/null
+++ b/doc/dom/html/classsoap__dom__iterator.html
@@ -0,0 +1,335 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: soap_dom_iterator Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_dom_iterator Class Reference</h1><code>#include &lt;stdsoap2.h&gt;</code>

+<p>

+Collaboration diagram for soap_dom_iterator:<p><center><img src="classsoap__dom__iterator__coll__graph.png" border="0" usemap="#soap__dom__iterator__coll__map" alt="Collaboration graph"></center>

+<map name="soap__dom__iterator__coll__map">

+<area href="structsoap__dom__element.html" shape="rect" coords="7,119,137,145" alt="">

+<area href="structsoap__dom__attribute.html" shape="rect" coords="8,17,136,44" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classsoap__dom__iterator-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__iterator.html#a0">operator==</a> (const <a class="el" href="classsoap__dom__iterator.html">soap_dom_iterator</a> &amp;) const</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__iterator.html#a1">operator!=</a> (const <a class="el" href="classsoap__dom__iterator.html">soap_dom_iterator</a> &amp;) const</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dom__element.html">soap_dom_element</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__iterator.html#a2">operator *</a> () const</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classsoap__dom__iterator.html">soap_dom_iterator</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__iterator.html#a3">operator++</a> ()</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__iterator.html#a4">soap_dom_iterator</a> ()</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__iterator.html#a5">soap_dom_iterator</a> (struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__iterator.html#a6">~soap_dom_iterator</a> ()</td></tr>

+

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__iterator.html#o0">elt</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__iterator.html#o1">nstr</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__iterator.html#o2">name</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__iterator.html#o3">type</a></td></tr>

+

+</table>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a4" doxytag="soap_dom_iterator::soap_dom_iterator" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> soap_dom_iterator::soap_dom_iterator           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a5" doxytag="soap_dom_iterator::soap_dom_iterator" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> soap_dom_iterator::soap_dom_iterator           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a6" doxytag="soap_dom_iterator::~soap_dom_iterator" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> soap_dom_iterator::~<a class="el" href="classsoap__dom__iterator.html">soap_dom_iterator</a>           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a2" doxytag="soap_dom_iterator::operator *" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a>&amp; soap_dom_iterator::operator *           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap> const</td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="soap_dom_iterator::operator!=" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> bool soap_dom_iterator::operator!=           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const <a class="el" href="classsoap__dom__iterator.html">soap_dom_iterator</a> &amp;&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap> const</td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a3" doxytag="soap_dom_iterator::operator++" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classsoap__dom__iterator.html">soap_dom_iterator</a>&amp; soap_dom_iterator::operator++           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a0" doxytag="soap_dom_iterator::operator==" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> bool soap_dom_iterator::operator==           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const <a class="el" href="classsoap__dom__iterator.html">soap_dom_iterator</a> &amp;&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap> const</td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="soap_dom_iterator::elt" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a>* <a class="el" href="classsoap__dom__iterator.html#o0">soap_dom_iterator::elt</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="soap_dom_iterator::name" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="classsoap__dom__iterator.html#o2">soap_dom_iterator::name</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_dom_iterator::nstr" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="classsoap__dom__iterator.html#o1">soap_dom_iterator::nstr</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="soap_dom_iterator::type" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="classsoap__dom__iterator.html#o3">soap_dom_iterator::type</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 23:10:23 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/classsoap__dom__iterator__coll__graph.map b/doc/dom/html/classsoap__dom__iterator__coll__graph.map
new file mode 100644
index 0000000..827a917
--- /dev/null
+++ b/doc/dom/html/classsoap__dom__iterator__coll__graph.map
@@ -0,0 +1,3 @@
+base referer
+rect $structsoap__dom__element.html 7,119 137,145
+rect $structsoap__dom__attribute.html 8,17 136,44
diff --git a/doc/dom/html/classsoap__dom__iterator__coll__graph.md5 b/doc/dom/html/classsoap__dom__iterator__coll__graph.md5
new file mode 100644
index 0000000..49fed57
--- /dev/null
+++ b/doc/dom/html/classsoap__dom__iterator__coll__graph.md5
@@ -0,0 +1 @@
+f389ba8834f8310ac935f14d2a2a015a
\ No newline at end of file
diff --git a/doc/dom/html/classsoap__dom__iterator__coll__graph.png b/doc/dom/html/classsoap__dom__iterator__coll__graph.png
new file mode 100644
index 0000000..9b3981f
--- /dev/null
+++ b/doc/dom/html/classsoap__dom__iterator__coll__graph.png
Binary files differ
diff --git a/doc/dom/html/dom.html b/doc/dom/html/dom.html
new file mode 100644
index 0000000..070953f
--- /dev/null
+++ b/doc/dom/html/dom.html
@@ -0,0 +1,114 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: The gSOAP level-2 DOM parser</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+The gSOAP level-2 DOM parser features "smart" XML namespace handling and can be used to mix gSOAP XML serializers with plain XML parsing. The DOM parser is also an essential component of the wsse plugin to verify digital signatures.<p>

+The DOM parser is not a stand-alone application. The DOM parser invokes the SOAP engine to populate a node set and to render a node set in XML.<h2><a class="anchor" name="dom_1">

+Using DOM Node Sets in a gSOAP Header File</a></h2>

+To use the DOM node set in a data structure defined in a gSOAP header file, import the <a class="el" href="dom_8h.html">dom.h</a> file into the header file:<p>

+<div class="fragment"><pre><span class="preprocessor">    #import "<a class="code" href="dom_8h.html">dom.h</a>"</span>

+</pre></div><p>

+By importing <a class="el" href="dom_8h.html">dom.h</a> a special data type <a class="el" href="dom_8h.html#a0">xsd__anyType</a> is available that represents a hierarchical DOM node set. DOM nodes can be used with structs, classes, STL containers, and as arguments of service operations in your gSOAP header file declarations. For example:<p>

+<div class="fragment"><pre><span class="preprocessor">    #import "<a class="code" href="dom_8h.html">dom.h</a>"</span>

+<span class="preprocessor">    #import "wsu.h"</span>

+    <span class="keyword">class </span>ns__myProduct

+    { <span class="keyword">public</span>:

+        @<span class="keywordtype">char</span>*          wsu__Id;

+        _wsu__Timestamp wsu__Timestamp;

+        <span class="keywordtype">char</span>*           name;

+        <span class="keywordtype">int</span>             SKU;

+        <span class="keywordtype">double</span>          price;

+        <a class="code" href="structsoap__dom__element.html">xsd__anyType</a>*   any;

+                        ns__myProduct();

+                        ~ns__myProduct();

+    };

+</pre></div><p>

+It is important that we add <a class="el" href="dom_8h.html#a0">xsd__anyType</a> at the end of the struct or class, since it consumes any XML element (the field name, 'any' in this case, is irrelavant). Thus, the other fields must be defined first to ensure they are populated first before the DOM node set is populated with any non-previously matched XML element.<p>

+Note that we also imported wsu.h to use the wsu:Id attribute in case we want to digitally sign product instances and a wsu:Created timestamp element to record creation and expiration times.<p>

+To compile, run soapcpp2 (with -Iimport) and compile your code by linking dom.cpp (or dom.c for C). Note that the DOM data structures are declared in <a class="el" href="stdsoap2_8h.html">stdsoap2.h</a>, while the DOM operations are defined in dom.cpp (or dom.c).<h2><a class="anchor" name="dom_2">

+Populating a DOM Node Set</a></h2>

+When a structure with a DOM node set (as shown in the example in the previous section) is deserialized, the node set is automatically populated.<p>

+In addition, the C++ iostream operators are overloaded to parse and display XML of a node set:<p>

+<div class="fragment"><pre>    <span class="keyword">struct </span>soap *soap = soap_new();

+    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> dom(soap);

+    cin &gt;&gt; dom; <span class="comment">// parse XML</span>

+    <span class="keywordflow">if</span> (soap.error)

+      ... <span class="comment">// parse error</span>

+    cout &lt;&lt; dom; <span class="comment">// display XML</span>

+</pre></div><p>

+In C we use the DOM "serializers" as follows:<p>

+<div class="fragment"><pre>    <span class="keyword">struct </span>soap *soap = soap_new();

+    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> dom;

+    dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a> = soap;

+    soap-&gt;recvfd = stdin;

+    <span class="keywordflow">if</span> (soap_begin_recv(soap)

+     || soap_in_xsd__anyType(soap, NULL, &amp;dom, NULL) != NULL

+     || soap_end_recv(soap))

+      ... <span class="comment">// parse error</span>

+    soap-&gt;sendfd = stdout;

+    <span class="keywordflow">if</span> (soap_begin_send(soap)

+     || soap_out_xsd__anyType(soap, NULL, 0, &amp;dom, NULL)

+     || soap_end_send(soap))

+      ... <span class="comment">// send error</span>

+</pre></div><p>

+The SOAP_DOM_NODE flag is used to instruct the parser to populate a DOM node set with deserialized C and C++ data structures using the data type's deserializers generated with soapcpp2. Suppose for example that the following header file was used (in fact, the declaration appears in wsu.h):<p>

+<div class="fragment"><pre>    <span class="keyword">struct </span>_wsu__Timestamp

+    {   @<span class="keywordtype">char</span>*  wsu_Id;

+        <span class="keywordtype">char</span>*   Created;

+        <span class="keywordtype">char</span>*   Expires;

+    };

+</pre></div><p>

+Note that the leading underscore of the type name indicate XML element definitions (rather than complexTypes), so the name of the data type is relevant when comparing XML element tags to C/C++ data types by the deserializers.<p>

+When a &lt;wsu:Timestamp&gt; element appears in XML, the DOM node will be automatically populated with the _wsu__Timestamp object using the SOAP_DOM_NODE flag:<p>

+<div class="fragment"><pre>    <span class="keyword">struct </span>soap *soap = soap_new1(SOAP_DOM_NODE);

+    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> dom(soap);

+    cin &gt;&gt; dom; <span class="comment">// parse XML</span>

+    <span class="keywordflow">if</span> (soap.error)

+      ... <span class="comment">// parse error</span>

+</pre></div><h2><a class="anchor" name="dom_3">

+Traversing a DOM Node Set</a></h2>

+The DOM node set is traversed with a C++ iterator or with the C functions <a class="el" href="stdsoap2_8h.html#a1">soap_dom_next_element</a> and <a class="el" href="stdsoap2_8h.html#a2">soap_dom_next_attribute</a>. For example, to walk over the node set with an in-order traversal use:<p>

+<div class="fragment"><pre>    <span class="keyword">struct </span>soap *soap = soap_new();

+    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> dom(soap);

+    ...

+    <span class="keywordflow">for</span> (<a class="code" href="classsoap__dom__iterator.html">soap_dom_element::iterator</a> walker = dom.begin(); walker != dom.end(); ++walker)

+      ...

+</pre></div><p>

+In C, use<p>

+<div class="fragment"><pre>    <span class="keyword">struct </span>soap *soap = soap_new();

+    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> dom, *walker;

+    dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a> = soap;

+    ...

+    <span class="keywordflow">for</span> (walker = &amp;dom; walker; walker = <a class="code" href="stdsoap2_8h.html#a1">soap_dom_next_element</a>(walker))

+      ...

+</pre></div><p>

+The <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> and <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a> structs form essentially linked lists, so it is not too difficult to write your own tree walkers.<h2><a class="anchor" name="dom_4">

+Searching and filtering a DOM Node Set</a></h2>

+<h2><a class="anchor" name="dom_5">

+Using a DOM with Embedded Application Data</a></h2>

+<h2><a class="anchor" name="dom_6">

+Tips and Tricks</a></h2>

+DOM element nodes and attribute nodes can have an optional namespace names. The namespace prefix and name bindings (xmlns in XML) are automatically resolved.<p>

+The DOM elements can be used anywhere within a C/C++ data structure and also as the arguments to a service method. For example: struct SOAP_ENV__Header { xsd__anyType *authentication; }; int ns__test(xsd__anyType in, xsd__anyType *out); which defines a custom SOAP Header with an authentication element parsed as a DOM.<p>

+DOM node fields: prnt pointer to parent node elts list of child elements (list of DOM nodes) atts list of attributes const char *nstr optional element namespace name (URI) char *name element name with optional ns: prefix char *data optional element data (see comment below) wchar_t *wide optional element data (see comment below) int type optional type SOAP_TYPE_X as defined in soapH.h void *node and optional pointer to C/C++ data type char *head leading whitespace to start tag (render only) char *tail leading whitespace to end tag (render only) soap the context that manages this instance<p>

+DOM Parsing: The namespace name (URI) parsing is smart and fills the 'nstr' field with the namespace URIs. The algorithm checks the names in the nsmap table first. After parsing, the 'nstr' namespace strings will point to the nsmap table contents in case the names (URIs) match a table entry. Otherwise, the names are dynamically allocated. This enables quick pointer-based checks on the DOM node's namespace names by comparing the pointer to the namespace table entries 'namespaces[i].ns'.<p>

+Character data parsing: The parser fills the 'wide' string fields of the DOM nodes only (the 'wide' fields contain Unicode XML cdata), unless the input-mode flag SOAP_C_UTFSTRING or SOAP_C_MBSTRING is set using soap_init2() or soap_set_imode(). In that case the 'data' fields are set with UTF8 contents or multibyte character strings.<p>

+The following input-mode flags (set with soap_set_imode()) control the parsing of C/C++ data types (stored in the 'node' and 'type' fields):<p>

+default: only elements with an 'id' attribute are deserialized as C/C++ data types (when a deserializer is available) SOAP_DOM_TREE: never deserialize C/C++ types (produces DOM tree) SOAP_DOM_NODE: always deserialize C/C++ types (when a deserializer is available and the xsi:type attribute is present in the XML node or the XML element tag matches the type name) SOAP_DOM_ASIS: never insert xmlns bindings for URIs stored in nstr, but assume the DOM is self-contained<p>

+The following output-mode flag (set with soap_set_omode()) controls the serialization of XML:<p>

+SOAP_XML_INDENT: serialize XML with indentation SOAP_XML_CANONICAL: serialize XML in canonical form<p>

+The entire deserialized DOM is freed with soap_destroy(DOM.soap); soap_end(DOM.soap);<p>

+Examples (XML parsing and generation):<p>

+struct soap *soap = soap_new(); xsd__anyType dom(soap); // need a soap struct to parse XML using '&gt;&gt;' cin &gt;&gt; dom; // parse XML if (soap-&gt;error) ... input error ... soap_destroy(soap); // delete DOM soap_end(soap); // delete data soap_done(soap); // finalize free(soap);<p>

+struct soap *soap = soap_new(); xsd__anyType dom(soap, ...); // populate the DOM cout &lt;&lt; dom; // print if (soap-&gt;error) ... output error ... soap_destroy(soap); // clean up objects soap_end(soap); // clean up soap_done(soap); // finalize free(soap);<p>

+To retain the DOM but remove all other data, use: dom.unlink();<p>

+Compile: soapcpp2 <a class="el" href="dom_8h.html">dom.h</a> g++ -c dom.cpp<p>

+To use a DOM in your Web service application, add to the gSOAP header file that defines your service: #import "dom.h" Then use the xsd__anyType to refer to the DOM in your data structures.<p>

+Link the application with dom.o <hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 20:55:54 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/dom_8cpp.html b/doc/dom/html/dom_8cpp.html
new file mode 100644
index 0000000..aaf0f10
--- /dev/null
+++ b/doc/dom/html/dom_8cpp.html
@@ -0,0 +1,774 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: /Users/engelen/Projects/gsoap/doc/dom/dom.cpp File Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>/Users/engelen/Projects/gsoap/doc/dom/dom.cpp File Reference</h1><code>#include "<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a>"</code><br>

+

+<p>

+Include dependency graph for dom.cpp:<p><center><img src="dom_8cpp__incl.png" border="0" usemap="#dom.cpp_map" alt="Include dependency graph"></center>

+<map name="dom.cpp_map">

+<area href="stdsoap2_8h.html" shape="rect" coords="7,17,81,44" alt="">

+</map>

+<table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Defines</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="dom_8cpp.html#a0">SOAP_DOMID_FORMAT</a>&nbsp;&nbsp;&nbsp;"dom%d"</td></tr>

+

+<tr><td colspan=2><br><h2>Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>SOAP_FMAC3 void SOAP_FMAC4&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="dom_8cpp.html#a1">soap_serialize_xsd__anyType</a> (struct soap *, struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> const *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>SOAP_FMAC1 void SOAP_FMAC2&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="dom_8cpp.html#a2">soap_default_xsd__anyType</a> (struct soap *, struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>SOAP_FMAC3 int SOAP_FMAC4&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="dom_8cpp.html#a3">soap_put_xsd__anyType</a> (struct soap *, const struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *, const char *, const char *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>SOAP_FMAC1 int SOAP_FMAC2&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="dom_8cpp.html#a4">soap_out_xsd__anyType</a> (struct soap *, const char *, int, const struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *, const char *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>SOAP_FMAC3 struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> <br>

+*SOAP_FMAC4&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="dom_8cpp.html#a5">soap_get_xsd__anyType</a> (struct soap *, struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *, const char *, const char *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>SOAP_FMAC1 struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> <br>

+*SOAP_FMAC2&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="dom_8cpp.html#a6">soap_in_xsd__anyType</a> (struct soap *, const char *, struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *, const char *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>SOAP_FMAC3 void SOAP_FMAC4&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="dom_8cpp.html#a7">soap_markelement</a> (struct soap *, const void *, int)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>SOAP_FMAC3 int SOAP_FMAC4&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="dom_8cpp.html#a8">soap_putelement</a> (struct soap *, const void *, const char *, int, int)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>SOAP_FMAC3 void *SOAP_FMAC4&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="dom_8cpp.html#a9">soap_getelement</a> (struct soap *, int *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>soap_ilist *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="dom_8cpp.html#a10">soap_lookup_ns</a> (struct soap *, const char *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>soap_ilist *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="dom_8cpp.html#a11">soap_enter_ns</a> (struct soap *, const char *, const char *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="dom_8cpp.html#a12">out_element</a> (struct soap *soap, const struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *node, const char *prefix, const char *name, const char *nstr)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="dom_8cpp.html#a13">out_attribute</a> (struct soap *soap, const char *prefix, const char *name, const char *data)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>SOAP_FMAC1 const char *SOAP_FMAC2&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="dom_8cpp.html#a14">soap_dom_current_nstr</a> (struct soap *soap, const char *tag)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>SOAP_FMAC1 struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> <br>

+*SOAP_FMAC2&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="dom_8cpp.html#a15">soap_dom_next_element</a> (struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *elt)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="dom_8cpp.html#a16">soap_dom_next_attribute</a> (struct <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a> *att)</td></tr>

+

+</table>

+<hr><h2>Define Documentation</h2>

+<a class="anchor" name="a0" doxytag="dom.cpp::SOAP_DOMID_FORMAT" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> #define SOAP_DOMID_FORMAT&nbsp;&nbsp;&nbsp;"dom%d"          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr><h2>Function Documentation</h2>

+<a class="anchor" name="a13" doxytag="dom.cpp::out_attribute" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int out_attribute           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>prefix</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>name</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>data</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"><code> [static]</code></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a12" doxytag="dom.cpp::out_element" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int out_element           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>node</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>prefix</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>name</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>nstr</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"><code> [static]</code></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a2" doxytag="dom.cpp::soap_default_xsd__anyType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> SOAP_FMAC1 void SOAP_FMAC2 soap_default_xsd__anyType           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *&nbsp;</td>

+          <td class="mdname" nowrap></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a14" doxytag="dom.cpp::soap_dom_current_nstr" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> SOAP_FMAC1 const char* SOAP_FMAC2 soap_dom_current_nstr           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>tag</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a16" doxytag="dom.cpp::soap_dom_next_attribute" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a>* soap_dom_next_attribute           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>att</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a15" doxytag="dom.cpp::soap_dom_next_element" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> SOAP_FMAC1 struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a>* SOAP_FMAC2 soap_dom_next_element           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>elt</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a11" doxytag="dom.cpp::soap_enter_ns" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct soap_ilist * soap_enter_ns           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"><code> [static]</code></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a5" doxytag="dom.cpp::soap_get_xsd__anyType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> SOAP_FMAC3 struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a>* SOAP_FMAC4 soap_get_xsd__anyType           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a9" doxytag="dom.cpp::soap_getelement" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> SOAP_FMAC3 void* SOAP_FMAC4 soap_getelement           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int *&nbsp;</td>

+          <td class="mdname" nowrap></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a6" doxytag="dom.cpp::soap_in_xsd__anyType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> SOAP_FMAC1 struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *SOAP_FMAC2 soap_in_xsd__anyType           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a10" doxytag="dom.cpp::soap_lookup_ns" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct soap_ilist * soap_lookup_ns           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"><code> [static]</code></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a7" doxytag="dom.cpp::soap_markelement" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> SOAP_FMAC3 void SOAP_FMAC4 soap_markelement           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const void *&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a4" doxytag="dom.cpp::soap_out_xsd__anyType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> SOAP_FMAC1 int SOAP_FMAC2 soap_out_xsd__anyType           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a3" doxytag="dom.cpp::soap_put_xsd__anyType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> SOAP_FMAC3 int SOAP_FMAC4 soap_put_xsd__anyType           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a8" doxytag="dom.cpp::soap_putelement" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> SOAP_FMAC3 int SOAP_FMAC4 soap_putelement           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const void *&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="dom.cpp::soap_serialize_xsd__anyType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> SOAP_FMAC1 void SOAP_FMAC2 soap_serialize_xsd__anyType           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> const *&nbsp;</td>

+          <td class="mdname" nowrap></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr size="1"><address style="align: right;"><small>Generated on Sat Aug 20 12:24:36 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/dom_8cpp__incl.map b/doc/dom/html/dom_8cpp__incl.map
new file mode 100644
index 0000000..2adcc6a
--- /dev/null
+++ b/doc/dom/html/dom_8cpp__incl.map
@@ -0,0 +1,2 @@
+base referer
+rect $stdsoap2_8h.html 7,17 81,44
diff --git a/doc/dom/html/dom_8cpp__incl.md5 b/doc/dom/html/dom_8cpp__incl.md5
new file mode 100644
index 0000000..a41112e
--- /dev/null
+++ b/doc/dom/html/dom_8cpp__incl.md5
@@ -0,0 +1 @@
+1e1adaec18a539c36e4b6d4bfd1552c8
\ No newline at end of file
diff --git a/doc/dom/html/dom_8cpp__incl.png b/doc/dom/html/dom_8cpp__incl.png
new file mode 100644
index 0000000..fb995d7
--- /dev/null
+++ b/doc/dom/html/dom_8cpp__incl.png
Binary files differ
diff --git a/doc/dom/html/dom_8h.html b/doc/dom/html/dom_8h.html
new file mode 100644
index 0000000..0358499
--- /dev/null
+++ b/doc/dom/html/dom_8h.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: /Users/engelen/Projects/gsoap/doc/dom/dom.h File Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>/Users/engelen/Projects/gsoap/doc/dom/dom.h File Reference</h1><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Typedefs</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="structsoap__dom__element.html">soap_dom_element</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="dom_8h.html#a0">xsd__anyType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The custom serializer for DOM nodes is represented by xsd__anyType.  <a href="#a0"></a><br></td></tr>

+</table>

+<hr><h2>Typedef Documentation</h2>

+<a class="anchor" name="a0" doxytag="dom.h::xsd__anyType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> <a class="el" href="structsoap__dom__element.html">xsd__anyType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+The custom serializer for DOM nodes is represented by xsd__anyType. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr size="1"><address style="align: right;"><small>Generated on Sat Aug 20 12:24:36 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/doxygen.css b/doc/dom/html/doxygen.css
new file mode 100644
index 0000000..df2e582
--- /dev/null
+++ b/doc/dom/html/doxygen.css
@@ -0,0 +1,216 @@
+H1 {
+	text-align: center;
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+}
+H2 {
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+}
+CAPTION { font-weight: bold }
+DIV.qindex {
+	width: 100%;
+	background-color: #eeeeff;
+	border: 1px solid #B0B0B0;
+	text-align: center;
+	margin: 2px;
+	padding: 2px;
+	line-height: 120%;
+}
+A.qindex {
+       text-decoration: none;
+       font-weight: bold;
+       color: #1A419D;
+       padding: 2px;
+}
+A.qindex:visited {
+       text-decoration: none;
+       font-weight: bold;
+       color: #1A419D
+       padding: 2px;
+}
+A.qindex:hover {
+	text-decoration: none;
+	background-color: #ddddff;
+	padding: 2px;
+}
+A.qindexHL {
+	text-decoration: none;
+	font-weight: bold;
+	background-color: #6666cc;
+	color: #ffffff;
+	padding: 2px 6px;
+	border: 1px double #9295C2;
+}
+A.qindexHL:hover {
+	text-decoration: none;
+	background-color: #6666cc;
+	color: #ffffff;
+	padding: 2px 6px;
+}
+A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
+A.el { text-decoration: none; font-weight: bold }
+A.elRef { font-weight: bold }
+A.code { text-decoration: none; font-weight: normal; color: #1A419D}
+A.codeRef { font-weight: normal; color: #1A419D}
+A:hover { text-decoration: none; background-color: #f2f2ff }
+DL.el { margin-left: -1cm }
+PRE.fragment {
+	border: 1px solid #CCCCCC;
+	background-color: #f5f5f5;
+	margin-top: 4px;
+	margin-bottom: 4px;
+	margin-left: 2px;
+	margin-right: 8px;
+	padding-left: 6px;
+	padding-right: 6px;
+	padding-top: 4px;
+	padding-bottom: 4px;
+}
+DIV.fragment {
+	border: 1px solid #CCCCCC;
+	background-color: #f5f5f5;
+	padding: 6px;
+}
+DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
+TD.md { background-color: #F4F4FB; font-weight: bold; }
+TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; }
+TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; }
+DIV.groupHeader {
+       margin-left: 16px;
+       margin-top: 12px;
+       margin-bottom: 6px;
+       font-weight: bold;
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+}
+DIV.groupText { margin-left: 16px; font-style: italic; font-size: 14px }
+BODY {
+	background: white;
+	color: black;
+	margin-right: 20px;
+	margin-left: 20px;
+}
+TD.indexkey {
+	background-color: #eeeeff;
+	font-weight: bold;
+	padding-right  : 10px;
+	padding-top    : 2px;
+	padding-left   : 10px;
+	padding-bottom : 2px;
+	margin-left    : 0px;
+	margin-right   : 0px;
+	margin-top     : 2px;
+	margin-bottom  : 2px;
+	border: 1px solid #CCCCCC;
+}
+TD.indexvalue {
+	background-color: #eeeeff;
+	font-style: italic;
+	padding-right  : 10px;
+	padding-top    : 2px;
+	padding-left   : 10px;
+	padding-bottom : 2px;
+	margin-left    : 0px;
+	margin-right   : 0px;
+	margin-top     : 2px;
+	margin-bottom  : 2px;
+	border: 1px solid #CCCCCC;
+}
+TR.memlist {
+   background-color: #f0f0f0; 
+}
+P.formulaDsp { text-align: center; }
+IMG.formulaDsp { }
+IMG.formulaInl { vertical-align: middle; }
+SPAN.keyword       { color: #008000 }
+SPAN.keywordtype   { color: #604020 }
+SPAN.keywordflow   { color: #e08000 }
+SPAN.comment       { color: #800000 }
+SPAN.preprocessor  { color: #806020 }
+SPAN.stringliteral { color: #002080 }
+SPAN.charliteral   { color: #008080 }
+.mdTable {
+	border: 1px solid #868686;
+	background-color: #F4F4FB;
+}
+.mdRow {
+	padding: 8px 10px;
+}
+.mdescLeft {
+       padding: 0px 8px 4px 8px;
+	font-size: 14px;
+	font-style: italic;
+	background-color: #FAFAFA;
+	border-top: 1px none #E0E0E0;
+	border-right: 1px none #E0E0E0;
+	border-bottom: 1px none #E0E0E0;
+	border-left: 1px none #E0E0E0;
+	margin: 0px;
+}
+.mdescRight {
+       padding: 0px 8px 4px 8px;
+	font-size: 14px;
+	font-style: italic;
+	background-color: #FAFAFA;
+	border-top: 1px none #E0E0E0;
+	border-right: 1px none #E0E0E0;
+	border-bottom: 1px none #E0E0E0;
+	border-left: 1px none #E0E0E0;
+	margin: 0px;
+}
+.memItemLeft {
+	padding: 1px 0px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-style: solid;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+	font-size: 12px;
+}
+.memItemRight {
+	padding: 1px 8px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-style: solid;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+	font-size: 13px;
+}
+.search     { color: #003399;
+              font-weight: bold;
+}
+FORM.search {
+              margin-bottom: 0px;
+              margin-top: 0px;
+}
+INPUT.search { font-size: 75%;
+               color: #000080;
+               font-weight: normal;
+               background-color: #eeeeff;
+}
+TD.tiny      { font-size: 75%;
+}
+a {
+	color: #252E78;
+}
+a:visited {
+	color: #3D2185;
+}
diff --git a/doc/dom/html/doxygen.png b/doc/dom/html/doxygen.png
new file mode 100644
index 0000000..9da55f9
--- /dev/null
+++ b/doc/dom/html/doxygen.png
Binary files differ
diff --git a/doc/dom/html/files.html b/doc/dom/html/files.html
new file mode 100644
index 0000000..628ab8b
--- /dev/null
+++ b/doc/dom/html/files.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: File Index</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindexHL" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>gSOAP level-2 DOM File List</h1>Here is a list of all files with brief descriptions:<table>

+  <tr><td class="indexkey">/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="dom_8cpp.html">dom.cpp</a></td><td class="indexvalue"></td></tr>

+  <tr><td class="indexkey">/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="dom_8h.html">dom.h</a></td><td class="indexvalue"></td></tr>

+  <tr><td class="indexkey">/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></td><td class="indexvalue"></td></tr>

+</table>

+<hr size="1"><address style="align: right;"><small>Generated on Sat Aug 20 12:24:36 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/functions.html b/doc/dom/html/functions.html
new file mode 100644
index 0000000..0b9e922
--- /dev/null
+++ b/doc/dom/html/functions.html
@@ -0,0 +1,82 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Class Members</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindexHL" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<div class="qindex"><a class="qindexHL" href="functions.html">All</a> | <a class="qindex" href="functions_func.html">Functions</a> | <a class="qindex" href="functions_vars.html">Variables</a> | <a class="qindex" href="functions_type.html">Typedefs</a></div>

+<div class="qindex"><a class="qindex" href="#index_a">a</a> | <a class="qindex" href="#index_b">b</a> | <a class="qindex" href="#index_d">d</a> | <a class="qindex" href="#index_e">e</a> | <a class="qindex" href="#index_f">f</a> | <a class="qindex" href="#index_h">h</a> | <a class="qindex" href="#index_i">i</a> | <a class="qindex" href="#index_n">n</a> | <a class="qindex" href="#index_o">o</a> | <a class="qindex" href="#index_p">p</a> | <a class="qindex" href="#index_s">s</a> | <a class="qindex" href="#index_t">t</a> | <a class="qindex" href="#index_u">u</a> | <a class="qindex" href="#index_w">w</a> | <a class="qindex" href="#index_~">~</a></div>

+

+<p>

+

+<p>

+Here is a list of all class members with links to the classes they belong to:<h3><a class="anchor" name="index_a">- a -</a></h3><ul>

+<li>add()

+: <a class="el" href="structsoap__dom__element.html#a6">soap_dom_element</a><li>att

+: <a class="el" href="classsoap__dom__attribute__iterator.html#o0">soap_dom_attribute_iterator</a><li>atts

+: <a class="el" href="structsoap__dom__element.html#o3">soap_dom_element</a></ul>

+<h3><a class="anchor" name="index_b">- b -</a></h3><ul>

+<li>begin()

+: <a class="el" href="structsoap__dom__element.html#a7">soap_dom_element</a>, <a class="el" href="structsoap__dom__attribute.html#a2">soap_dom_attribute</a></ul>

+<h3><a class="anchor" name="index_d">- d -</a></h3><ul>

+<li>data

+: <a class="el" href="structsoap__dom__element.html#o6">soap_dom_element</a>, <a class="el" href="structsoap__dom__attribute.html#o3">soap_dom_attribute</a></ul>

+<h3><a class="anchor" name="index_e">- e -</a></h3><ul>

+<li>elt

+: <a class="el" href="classsoap__dom__element__iterator.html#o0">soap_dom_element_iterator</a><li>elts

+: <a class="el" href="structsoap__dom__element.html#o2">soap_dom_element</a><li>end()

+: <a class="el" href="structsoap__dom__element.html#a8">soap_dom_element</a>, <a class="el" href="structsoap__dom__attribute.html#a3">soap_dom_attribute</a></ul>

+<h3><a class="anchor" name="index_f">- f -</a></h3><ul>

+<li>find()

+: <a class="el" href="structsoap__dom__element.html#a10">soap_dom_element</a>, <a class="el" href="structsoap__dom__attribute.html#a4">soap_dom_attribute</a></ul>

+<h3><a class="anchor" name="index_h">- h -</a></h3><ul>

+<li>head

+: <a class="el" href="structsoap__dom__element.html#o10">soap_dom_element</a></ul>

+<h3><a class="anchor" name="index_i">- i -</a></h3><ul>

+<li>iterator

+: <a class="el" href="structsoap__dom__element.html#w0">soap_dom_element</a>, <a class="el" href="structsoap__dom__attribute.html#w0">soap_dom_attribute</a></ul>

+<h3><a class="anchor" name="index_n">- n -</a></h3><ul>

+<li>name

+: <a class="el" href="structsoap__dom__element.html#o5">soap_dom_element</a>, <a class="el" href="classsoap__dom__element__iterator.html#o2">soap_dom_element_iterator</a>, <a class="el" href="structsoap__dom__attribute.html#o2">soap_dom_attribute</a>, <a class="el" href="classsoap__dom__attribute__iterator.html#o2">soap_dom_attribute_iterator</a><li>next

+: <a class="el" href="structsoap__dom__element.html#o0">soap_dom_element</a>, <a class="el" href="structsoap__dom__attribute.html#o0">soap_dom_attribute</a><li>node

+: <a class="el" href="structsoap__dom__element.html#o9">soap_dom_element</a><li>nstr

+: <a class="el" href="structsoap__dom__element.html#o4">soap_dom_element</a>, <a class="el" href="classsoap__dom__element__iterator.html#o1">soap_dom_element_iterator</a>, <a class="el" href="structsoap__dom__attribute.html#o1">soap_dom_attribute</a>, <a class="el" href="classsoap__dom__attribute__iterator.html#o1">soap_dom_attribute_iterator</a></ul>

+<h3><a class="anchor" name="index_o">- o -</a></h3><ul>

+<li>operator *()

+: <a class="el" href="classsoap__dom__element__iterator.html#a2">soap_dom_element_iterator</a>, <a class="el" href="classsoap__dom__attribute__iterator.html#a2">soap_dom_attribute_iterator</a><li>operator!=()

+: <a class="el" href="classsoap__dom__element__iterator.html#a1">soap_dom_element_iterator</a>, <a class="el" href="classsoap__dom__attribute__iterator.html#a1">soap_dom_attribute_iterator</a><li>operator++()

+: <a class="el" href="classsoap__dom__element__iterator.html#a3">soap_dom_element_iterator</a>, <a class="el" href="classsoap__dom__attribute__iterator.html#a3">soap_dom_attribute_iterator</a><li>operator==()

+: <a class="el" href="classsoap__dom__element__iterator.html#a0">soap_dom_element_iterator</a>, <a class="el" href="classsoap__dom__attribute__iterator.html#a0">soap_dom_attribute_iterator</a></ul>

+<h3><a class="anchor" name="index_p">- p -</a></h3><ul>

+<li>prnt

+: <a class="el" href="structsoap__dom__element.html#o1">soap_dom_element</a></ul>

+<h3><a class="anchor" name="index_s">- s -</a></h3><ul>

+<li>set()

+: <a class="el" href="structsoap__dom__element.html#a2">soap_dom_element</a>, <a class="el" href="structsoap__dom__attribute.html#a1">soap_dom_attribute</a><li>soap

+: <a class="el" href="structsoap__dom__element.html#o12">soap_dom_element</a>, <a class="el" href="structsoap__dom__attribute.html#o5">soap_dom_attribute</a><li>soap_dom_attribute()

+: <a class="el" href="structsoap__dom__attribute.html#a8">soap_dom_attribute</a><li>soap_dom_attribute_iterator()

+: <a class="el" href="classsoap__dom__attribute__iterator.html#a5">soap_dom_attribute_iterator</a><li>soap_dom_element()

+: <a class="el" href="structsoap__dom__element.html#a16">soap_dom_element</a><li>soap_dom_element_iterator()

+: <a class="el" href="classsoap__dom__element__iterator.html#a5">soap_dom_element_iterator</a></ul>

+<h3><a class="anchor" name="index_t">- t -</a></h3><ul>

+<li>tail

+: <a class="el" href="structsoap__dom__element.html#o11">soap_dom_element</a><li>type

+: <a class="el" href="structsoap__dom__element.html#o8">soap_dom_element</a>, <a class="el" href="classsoap__dom__element__iterator.html#o3">soap_dom_element_iterator</a></ul>

+<h3><a class="anchor" name="index_u">- u -</a></h3><ul>

+<li>unlink()

+: <a class="el" href="structsoap__dom__element.html#a11">soap_dom_element</a>, <a class="el" href="structsoap__dom__attribute.html#a5">soap_dom_attribute</a></ul>

+<h3><a class="anchor" name="index_w">- w -</a></h3><ul>

+<li>wide

+: <a class="el" href="structsoap__dom__element.html#o7">soap_dom_element</a>, <a class="el" href="structsoap__dom__attribute.html#o4">soap_dom_attribute</a></ul>

+<h3><a class="anchor" name="index_~">- ~ -</a></h3><ul>

+<li>~soap_dom_attribute()

+: <a class="el" href="structsoap__dom__attribute.html#a9">soap_dom_attribute</a><li>~soap_dom_attribute_iterator()

+: <a class="el" href="classsoap__dom__attribute__iterator.html#a6">soap_dom_attribute_iterator</a><li>~soap_dom_element()

+: <a class="el" href="structsoap__dom__element.html#a17">soap_dom_element</a><li>~soap_dom_element_iterator()

+: <a class="el" href="classsoap__dom__element__iterator.html#a6">soap_dom_element_iterator</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Sat Aug 20 12:24:36 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/functions_func.html b/doc/dom/html/functions_func.html
new file mode 100644
index 0000000..42d162c
--- /dev/null
+++ b/doc/dom/html/functions_func.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Class Members - Functions</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindexHL" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<div class="qindex"><a class="qindex" href="functions.html">All</a> | <a class="qindexHL" href="functions_func.html">Functions</a> | <a class="qindex" href="functions_vars.html">Variables</a> | <a class="qindex" href="functions_type.html">Typedefs</a></div>

+

+<p>

+<ul>

+<li>add()

+: <a class="el" href="structsoap__dom__element.html#a6">soap_dom_element</a><li>begin()

+: <a class="el" href="structsoap__dom__element.html#a7">soap_dom_element</a>, <a class="el" href="structsoap__dom__attribute.html#a2">soap_dom_attribute</a><li>end()

+: <a class="el" href="structsoap__dom__element.html#a8">soap_dom_element</a>, <a class="el" href="structsoap__dom__attribute.html#a3">soap_dom_attribute</a><li>find()

+: <a class="el" href="structsoap__dom__element.html#a10">soap_dom_element</a>, <a class="el" href="structsoap__dom__attribute.html#a4">soap_dom_attribute</a><li>operator *()

+: <a class="el" href="classsoap__dom__element__iterator.html#a2">soap_dom_element_iterator</a>, <a class="el" href="classsoap__dom__attribute__iterator.html#a2">soap_dom_attribute_iterator</a><li>operator!=()

+: <a class="el" href="classsoap__dom__element__iterator.html#a1">soap_dom_element_iterator</a>, <a class="el" href="classsoap__dom__attribute__iterator.html#a1">soap_dom_attribute_iterator</a><li>operator++()

+: <a class="el" href="classsoap__dom__element__iterator.html#a3">soap_dom_element_iterator</a>, <a class="el" href="classsoap__dom__attribute__iterator.html#a3">soap_dom_attribute_iterator</a><li>operator==()

+: <a class="el" href="classsoap__dom__element__iterator.html#a0">soap_dom_element_iterator</a>, <a class="el" href="classsoap__dom__attribute__iterator.html#a0">soap_dom_attribute_iterator</a><li>set()

+: <a class="el" href="structsoap__dom__element.html#a2">soap_dom_element</a>, <a class="el" href="structsoap__dom__attribute.html#a1">soap_dom_attribute</a><li>soap_dom_attribute()

+: <a class="el" href="structsoap__dom__attribute.html#a8">soap_dom_attribute</a><li>soap_dom_attribute_iterator()

+: <a class="el" href="classsoap__dom__attribute__iterator.html#a5">soap_dom_attribute_iterator</a><li>soap_dom_element()

+: <a class="el" href="structsoap__dom__element.html#a16">soap_dom_element</a><li>soap_dom_element_iterator()

+: <a class="el" href="classsoap__dom__element__iterator.html#a5">soap_dom_element_iterator</a><li>unlink()

+: <a class="el" href="structsoap__dom__element.html#a11">soap_dom_element</a>, <a class="el" href="structsoap__dom__attribute.html#a5">soap_dom_attribute</a><li>~soap_dom_attribute()

+: <a class="el" href="structsoap__dom__attribute.html#a9">soap_dom_attribute</a><li>~soap_dom_attribute_iterator()

+: <a class="el" href="classsoap__dom__attribute__iterator.html#a6">soap_dom_attribute_iterator</a><li>~soap_dom_element()

+: <a class="el" href="structsoap__dom__element.html#a17">soap_dom_element</a><li>~soap_dom_element_iterator()

+: <a class="el" href="classsoap__dom__element__iterator.html#a6">soap_dom_element_iterator</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Sat Aug 20 12:24:36 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/functions_type.html b/doc/dom/html/functions_type.html
new file mode 100644
index 0000000..54b46b8
--- /dev/null
+++ b/doc/dom/html/functions_type.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Class Members - Typedefs</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindexHL" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<div class="qindex"><a class="qindex" href="functions.html">All</a> | <a class="qindex" href="functions_func.html">Functions</a> | <a class="qindex" href="functions_vars.html">Variables</a> | <a class="qindexHL" href="functions_type.html">Typedefs</a></div>

+

+<p>

+<ul>

+<li>iterator

+: <a class="el" href="structsoap__dom__element.html#w0">soap_dom_element</a>, <a class="el" href="structsoap__dom__attribute.html#w0">soap_dom_attribute</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Sat Aug 20 12:24:36 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/functions_vars.html b/doc/dom/html/functions_vars.html
new file mode 100644
index 0000000..82c1bf8
--- /dev/null
+++ b/doc/dom/html/functions_vars.html
@@ -0,0 +1,32 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Class Members - Variables</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindexHL" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<div class="qindex"><a class="qindex" href="functions.html">All</a> | <a class="qindex" href="functions_func.html">Functions</a> | <a class="qindexHL" href="functions_vars.html">Variables</a> | <a class="qindex" href="functions_type.html">Typedefs</a></div>

+

+<p>

+<ul>

+<li>att

+: <a class="el" href="classsoap__dom__attribute__iterator.html#o0">soap_dom_attribute_iterator</a><li>atts

+: <a class="el" href="structsoap__dom__element.html#o3">soap_dom_element</a><li>data

+: <a class="el" href="structsoap__dom__element.html#o6">soap_dom_element</a>, <a class="el" href="structsoap__dom__attribute.html#o3">soap_dom_attribute</a><li>elt

+: <a class="el" href="classsoap__dom__element__iterator.html#o0">soap_dom_element_iterator</a><li>elts

+: <a class="el" href="structsoap__dom__element.html#o2">soap_dom_element</a><li>head

+: <a class="el" href="structsoap__dom__element.html#o10">soap_dom_element</a><li>name

+: <a class="el" href="structsoap__dom__element.html#o5">soap_dom_element</a>, <a class="el" href="classsoap__dom__element__iterator.html#o2">soap_dom_element_iterator</a>, <a class="el" href="structsoap__dom__attribute.html#o2">soap_dom_attribute</a>, <a class="el" href="classsoap__dom__attribute__iterator.html#o2">soap_dom_attribute_iterator</a><li>next

+: <a class="el" href="structsoap__dom__element.html#o0">soap_dom_element</a>, <a class="el" href="structsoap__dom__attribute.html#o0">soap_dom_attribute</a><li>node

+: <a class="el" href="structsoap__dom__element.html#o9">soap_dom_element</a><li>nstr

+: <a class="el" href="structsoap__dom__element.html#o4">soap_dom_element</a>, <a class="el" href="classsoap__dom__element__iterator.html#o1">soap_dom_element_iterator</a>, <a class="el" href="structsoap__dom__attribute.html#o1">soap_dom_attribute</a>, <a class="el" href="classsoap__dom__attribute__iterator.html#o1">soap_dom_attribute_iterator</a><li>prnt

+: <a class="el" href="structsoap__dom__element.html#o1">soap_dom_element</a><li>soap

+: <a class="el" href="structsoap__dom__element.html#o12">soap_dom_element</a>, <a class="el" href="structsoap__dom__attribute.html#o5">soap_dom_attribute</a><li>tail

+: <a class="el" href="structsoap__dom__element.html#o11">soap_dom_element</a><li>type

+: <a class="el" href="structsoap__dom__element.html#o8">soap_dom_element</a>, <a class="el" href="classsoap__dom__element__iterator.html#o3">soap_dom_element_iterator</a><li>wide

+: <a class="el" href="structsoap__dom__element.html#o7">soap_dom_element</a>, <a class="el" href="structsoap__dom__attribute.html#o4">soap_dom_attribute</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Sat Aug 20 12:24:36 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/globals.html b/doc/dom/html/globals.html
new file mode 100644
index 0000000..30c2a52
--- /dev/null
+++ b/doc/dom/html/globals.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: File Members</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindexHL" href="globals.html">File&nbsp;Members</a></div>

+<div class="qindex"><a class="qindexHL" href="globals.html">All</a> | <a class="qindex" href="globals_func.html">Functions</a> | <a class="qindex" href="globals_type.html">Typedefs</a> | <a class="qindex" href="globals_defs.html">Defines</a></div>

+

+<p>

+Here is a list of all file members with links to the files they belong to:<ul>

+<li>operator&lt;&lt;()

+: <a class="el" href="stdsoap2_8h.html#a3">stdsoap2.h</a><li>operator&gt;&gt;()

+: <a class="el" href="stdsoap2_8h.html#a4">stdsoap2.h</a><li>out_attribute()

+: <a class="el" href="dom_8cpp.html#a13">dom.cpp</a><li>out_element()

+: <a class="el" href="dom_8cpp.html#a12">dom.cpp</a><li>soap_default_xsd__anyType()

+: <a class="el" href="dom_8cpp.html#a2">dom.cpp</a><li>soap_dom_current_nstr()

+: <a class="el" href="stdsoap2_8h.html#a0">stdsoap2.h</a>, <a class="el" href="dom_8cpp.html#a14">dom.cpp</a><li>soap_dom_next_attribute()

+: <a class="el" href="stdsoap2_8h.html#a2">stdsoap2.h</a>, <a class="el" href="dom_8cpp.html#a16">dom.cpp</a><li>soap_dom_next_element()

+: <a class="el" href="stdsoap2_8h.html#a1">stdsoap2.h</a>, <a class="el" href="dom_8cpp.html#a15">dom.cpp</a><li>SOAP_DOMID_FORMAT

+: <a class="el" href="dom_8cpp.html#a0">dom.cpp</a><li>soap_enter_ns()

+: <a class="el" href="dom_8cpp.html#a11">dom.cpp</a><li>soap_get_xsd__anyType()

+: <a class="el" href="dom_8cpp.html#a5">dom.cpp</a><li>soap_getelement()

+: <a class="el" href="dom_8cpp.html#a9">dom.cpp</a><li>soap_in_xsd__anyType()

+: <a class="el" href="dom_8cpp.html#a6">dom.cpp</a><li>soap_lookup_ns()

+: <a class="el" href="dom_8cpp.html#a10">dom.cpp</a><li>soap_markelement()

+: <a class="el" href="dom_8cpp.html#a7">dom.cpp</a><li>soap_out_xsd__anyType()

+: <a class="el" href="dom_8cpp.html#a4">dom.cpp</a><li>soap_put_xsd__anyType()

+: <a class="el" href="dom_8cpp.html#a3">dom.cpp</a><li>soap_putelement()

+: <a class="el" href="dom_8cpp.html#a8">dom.cpp</a><li>soap_serialize_xsd__anyType()

+: <a class="el" href="dom_8cpp.html#a1">dom.cpp</a><li>xsd__anyType

+: <a class="el" href="dom_8h.html#a0">dom.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Sat Aug 20 12:24:36 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/globals_defs.html b/doc/dom/html/globals_defs.html
new file mode 100644
index 0000000..3ac605c
--- /dev/null
+++ b/doc/dom/html/globals_defs.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: File Members - Defines</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindexHL" href="globals.html">File&nbsp;Members</a></div>

+<div class="qindex"><a class="qindex" href="globals.html">All</a> | <a class="qindex" href="globals_func.html">Functions</a> | <a class="qindex" href="globals_type.html">Typedefs</a> | <a class="qindexHL" href="globals_defs.html">Defines</a></div>

+

+<p>

+<ul>

+<li>SOAP_DOMID_FORMAT

+: <a class="el" href="dom_8cpp.html#a0">dom.cpp</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Sat Aug 20 12:24:36 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/globals_enum.html b/doc/dom/html/globals_enum.html
new file mode 100644
index 0000000..dcf2af1
--- /dev/null
+++ b/doc/dom/html/globals_enum.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: File Members - Enumerations</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindexHL" href="globals.html">File&nbsp;Members</a></div>

+<div class="qindex"><a class="qindex" href="globals.html">All</a> | <a class="qindex" href="globals_func.html">Functions</a> | <a class="qindex" href="globals_vars.html">Variables</a> | <a class="qindex" href="globals_type.html">Typedefs</a> | <a class="qindexHL" href="globals_enum.html">Enumerations</a> | <a class="qindex" href="globals_eval.html">Enumeration&nbsp;values</a> | <a class="qindex" href="globals_defs.html">Defines</a></div>

+

+<p>

+<ul>

+<li>soap_mime_encoding

+: <a class="el" href="stdsoap2_8h.html#a469">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/globals_eval.html b/doc/dom/html/globals_eval.html
new file mode 100644
index 0000000..8e78d4c
--- /dev/null
+++ b/doc/dom/html/globals_eval.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: File Members - Enumeration values</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindexHL" href="globals.html">File&nbsp;Members</a></div>

+<div class="qindex"><a class="qindex" href="globals.html">All</a> | <a class="qindex" href="globals_func.html">Functions</a> | <a class="qindex" href="globals_vars.html">Variables</a> | <a class="qindex" href="globals_type.html">Typedefs</a> | <a class="qindex" href="globals_enum.html">Enumerations</a> | <a class="qindexHL" href="globals_eval.html">Enumeration&nbsp;values</a> | <a class="qindex" href="globals_defs.html">Defines</a></div>

+

+<p>

+<ul>

+<li>SOAP_MIME_7BIT

+: <a class="el" href="stdsoap2_8h.html#a469a198">stdsoap2.h</a><li>SOAP_MIME_8BIT

+: <a class="el" href="stdsoap2_8h.html#a469a199">stdsoap2.h</a><li>SOAP_MIME_BASE64

+: <a class="el" href="stdsoap2_8h.html#a469a202">stdsoap2.h</a><li>SOAP_MIME_BINARY

+: <a class="el" href="stdsoap2_8h.html#a469a200">stdsoap2.h</a><li>SOAP_MIME_IETF_TOKEN

+: <a class="el" href="stdsoap2_8h.html#a469a203">stdsoap2.h</a><li>SOAP_MIME_NONE

+: <a class="el" href="stdsoap2_8h.html#a469a197">stdsoap2.h</a><li>SOAP_MIME_QUOTED_PRINTABLE

+: <a class="el" href="stdsoap2_8h.html#a469a201">stdsoap2.h</a><li>SOAP_MIME_X_TOKEN

+: <a class="el" href="stdsoap2_8h.html#a469a204">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/globals_func.html b/doc/dom/html/globals_func.html
new file mode 100644
index 0000000..8022d29
--- /dev/null
+++ b/doc/dom/html/globals_func.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: File Members - Functions</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindexHL" href="globals.html">File&nbsp;Members</a></div>

+<div class="qindex"><a class="qindex" href="globals.html">All</a> | <a class="qindexHL" href="globals_func.html">Functions</a> | <a class="qindex" href="globals_type.html">Typedefs</a> | <a class="qindex" href="globals_defs.html">Defines</a></div>

+

+<p>

+<ul>

+<li>operator&lt;&lt;()

+: <a class="el" href="stdsoap2_8h.html#a3">stdsoap2.h</a><li>operator&gt;&gt;()

+: <a class="el" href="stdsoap2_8h.html#a4">stdsoap2.h</a><li>out_attribute()

+: <a class="el" href="dom_8cpp.html#a13">dom.cpp</a><li>out_element()

+: <a class="el" href="dom_8cpp.html#a12">dom.cpp</a><li>soap_default_xsd__anyType()

+: <a class="el" href="dom_8cpp.html#a2">dom.cpp</a><li>soap_dom_current_nstr()

+: <a class="el" href="stdsoap2_8h.html#a0">stdsoap2.h</a>, <a class="el" href="dom_8cpp.html#a14">dom.cpp</a><li>soap_dom_next_attribute()

+: <a class="el" href="stdsoap2_8h.html#a2">stdsoap2.h</a>, <a class="el" href="dom_8cpp.html#a16">dom.cpp</a><li>soap_dom_next_element()

+: <a class="el" href="stdsoap2_8h.html#a1">stdsoap2.h</a>, <a class="el" href="dom_8cpp.html#a15">dom.cpp</a><li>soap_enter_ns()

+: <a class="el" href="dom_8cpp.html#a11">dom.cpp</a><li>soap_get_xsd__anyType()

+: <a class="el" href="dom_8cpp.html#a5">dom.cpp</a><li>soap_getelement()

+: <a class="el" href="dom_8cpp.html#a9">dom.cpp</a><li>soap_in_xsd__anyType()

+: <a class="el" href="dom_8cpp.html#a6">dom.cpp</a><li>soap_lookup_ns()

+: <a class="el" href="dom_8cpp.html#a10">dom.cpp</a><li>soap_markelement()

+: <a class="el" href="dom_8cpp.html#a7">dom.cpp</a><li>soap_out_xsd__anyType()

+: <a class="el" href="dom_8cpp.html#a4">dom.cpp</a><li>soap_put_xsd__anyType()

+: <a class="el" href="dom_8cpp.html#a3">dom.cpp</a><li>soap_putelement()

+: <a class="el" href="dom_8cpp.html#a8">dom.cpp</a><li>soap_serialize_xsd__anyType()

+: <a class="el" href="dom_8cpp.html#a1">dom.cpp</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Sat Aug 20 12:24:36 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/globals_type.html b/doc/dom/html/globals_type.html
new file mode 100644
index 0000000..ad3a03e
--- /dev/null
+++ b/doc/dom/html/globals_type.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: File Members - Typedefs</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindexHL" href="globals.html">File&nbsp;Members</a></div>

+<div class="qindex"><a class="qindex" href="globals.html">All</a> | <a class="qindex" href="globals_func.html">Functions</a> | <a class="qindexHL" href="globals_type.html">Typedefs</a> | <a class="qindex" href="globals_defs.html">Defines</a></div>

+

+<p>

+<ul>

+<li>xsd__anyType

+: <a class="el" href="dom_8h.html#a0">dom.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Sat Aug 20 12:24:36 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/globals_vars.html b/doc/dom/html/globals_vars.html
new file mode 100644
index 0000000..ff94603
--- /dev/null
+++ b/doc/dom/html/globals_vars.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: File Members - Variables</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindexHL" href="globals.html">File&nbsp;Members</a></div>

+<div class="qindex"><a class="qindex" href="globals.html">All</a> | <a class="qindex" href="globals_func.html">Functions</a> | <a class="qindexHL" href="globals_vars.html">Variables</a> | <a class="qindex" href="globals_type.html">Typedefs</a> | <a class="qindex" href="globals_enum.html">Enumerations</a> | <a class="qindex" href="globals_eval.html">Enumeration&nbsp;values</a> | <a class="qindex" href="globals_defs.html">Defines</a></div>

+

+<p>

+<ul>

+<li>namespaces

+: <a class="el" href="stdsoap2_8h.html#a196">stdsoap2.h</a><li>soap_double_nan

+: <a class="el" href="stdsoap2_8h.html#a193">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/graph_legend.dot b/doc/dom/html/graph_legend.dot
new file mode 100644
index 0000000..5420927
--- /dev/null
+++ b/doc/dom/html/graph_legend.dot
@@ -0,0 +1,22 @@
+digraph G
+{
+  edge [fontname="Helvetica",fontsize=10,labelfontname="Helvetica",labelfontsize=10];
+  node [fontname="Helvetica",fontsize=10,shape=record];
+  Node9 [shape="box",label="Inherited",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",style="filled" fontcolor="white"];
+  Node10 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="Helvetica"];
+  Node10 [shape="box",label="PublicBase",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classPublicBase.html"];
+  Node11 -> Node10 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="Helvetica"];
+  Node11 [shape="box",label="Truncated",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="red",URL="$classTruncated.html"];
+  Node13 -> Node9 [dir=back,color="darkgreen",fontsize=10,style="solid",fontname="Helvetica"];
+  Node13 [shape="box",label="ProtectedBase",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classProtectedBase.html"];
+  Node14 -> Node9 [dir=back,color="firebrick4",fontsize=10,style="solid",fontname="Helvetica"];
+  Node14 [shape="box",label="PrivateBase",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classPrivateBase.html"];
+  Node15 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="Helvetica"];
+  Node15 [shape="box",label="Undocumented",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="grey75"];
+  Node16 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="Helvetica"];
+  Node16 [shape="box",label="Templ< int >",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classTempl.html"];
+  Node17 -> Node16 [dir=back,color="orange",fontsize=10,style="dashed",label="< int >",fontname="Helvetica"];
+  Node17 [shape="box",label="Templ< T >",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classTempl.html"];
+  Node18 -> Node9 [dir=back,color="darkorchid3",fontsize=10,style="dashed",label="m_usedClass",fontname="Helvetica"];
+  Node18 [shape="box",label="Used",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classUsed.html"];
+}
diff --git a/doc/dom/html/graph_legend.html b/doc/dom/html/graph_legend.html
new file mode 100644
index 0000000..2b05de7
--- /dev/null
+++ b/doc/dom/html/graph_legend.html
@@ -0,0 +1,74 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Graph Legend</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>Graph Legend</h1>This page explains how to interpret the graphs that are generated by doxygen.<p>

+Consider the following example: <div class="fragment"><pre><span class="comment">/*! Invisible class because of truncation */</span>

+<span class="keyword">class </span>Invisible { };

+<span class="comment"></span>

+<span class="comment">/*! Truncated class, inheritance relation is hidden */</span>

+<span class="keyword">class </span>Truncated : <span class="keyword">public</span> Invisible { };

+

+<span class="comment">/* Class not documented with doxygen comments */</span>

+<span class="keyword">class </span>Undocumented { };

+<span class="comment"></span>

+<span class="comment">/*! Class that is inherited using public inheritance */</span>

+<span class="keyword">class </span>PublicBase : <span class="keyword">public</span> Truncated { };

+<span class="comment"></span>

+<span class="comment">/*! A template class */</span>

+<span class="keyword">template</span>&lt;<span class="keyword">class</span> T&gt; <span class="keyword">class </span>Templ { };

+<span class="comment"></span>

+<span class="comment">/*! Class that is inherited using protected inheritance */</span>

+<span class="keyword">class </span>ProtectedBase { };

+<span class="comment"></span>

+<span class="comment">/*! Class that is inherited using private inheritance */</span>

+<span class="keyword">class </span>PrivateBase { };

+<span class="comment"></span>

+<span class="comment">/*! Class that is used by the Inherited class */</span>

+<span class="keyword">class </span>Used { };

+<span class="comment"></span>

+<span class="comment">/*! Super class that inherits a number of other classes */</span>

+<span class="keyword">class </span>Inherited : <span class="keyword">public</span> PublicBase,

+                  <span class="keyword">protected</span> ProtectedBase,

+                  <span class="keyword">private</span> PrivateBase,

+                  <span class="keyword">public</span> Undocumented

+                  <span class="keyword">public</span> Templ&lt;int&gt;

+{

+  <span class="keyword">private</span>:

+    Used *m_usedClass;

+};

+</pre></div>If the <code>MAX_DOT_GRAPH_HEIGHT</code> tag in the configuration file is set to 240 this will result in the following graph:<p>

+<center><div align="center">

+<img src="graph_legend.png" alt="graph_legend.png" alt>

+</div>

+</center> <p>

+The boxes in the above graph have the following meaning: <ul>

+<li>

+A filled black box represents the struct or class for which the graph is generated. </li>

+<li>

+A box with a black border denotes a documented struct or class. </li>

+<li>

+A box with a grey border denotes an undocumented struct or class. </li>

+<li>

+A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries. </li>

+</ul>

+The arrows have the following meaning: <ul>

+<li>

+A dark blue arrow is used to visualize a public inheritance relation between two classes. </li>

+<li>

+A dark green arrow is used for protected inheritance. </li>

+<li>

+A dark red arrow is used for private inheritance. </li>

+<li>

+A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible. </li>

+<li>

+A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance. </li>

+</ul>

+<hr size="1"><address style="align: right;"><small>Generated on Sat Aug 20 12:24:36 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/graph_legend.png b/doc/dom/html/graph_legend.png
new file mode 100644
index 0000000..99342b5
--- /dev/null
+++ b/doc/dom/html/graph_legend.png
Binary files differ
diff --git a/doc/dom/html/index.html b/doc/dom/html/index.html
new file mode 100644
index 0000000..aaf3412
--- /dev/null
+++ b/doc/dom/html/index.html
@@ -0,0 +1,340 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: The gSOAP level-2 DOM parser</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindexHL" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>The gSOAP level-2 DOM parser </h1>

+<p>

+The gSOAP level-2 DOM parser features "smart" XML namespace handling and can be used to mix gSOAP XML serializers with plain XML parsing. The DOM parser is also an essential component of the wsse plugin to verify digital signatures.<p>

+The DOM parser is not a stand-alone application. The DOM parser is integrated with the SOAP engine to populate a node set and to render a node set in XML.<p>

+Two files are needed to work with DOM node sets:<p>

+<ul>

+<li><a class="el" href="dom_8h.html">dom.h</a> to use a DOM node set in a gSOAP header file with service definitions.</li><li><a class="el" href="dom_8cpp.html">dom.cpp</a> (or dom.c) to be linked with your application code.</li></ul>

+<h2><a class="anchor" name="dom_1">

+Declaring DOM Node Sets in a gSOAP Header File</a></h2>

+To use the DOM node set with the data structures defined in a gSOAP header file, import the <a class="el" href="dom_8h.html">dom.h</a> file into your header file:<p>

+<div class="fragment"><pre><span class="preprocessor">    #import "<a class="code" href="dom_8h.html">dom.h</a>"</span>

+</pre></div><p>

+By importing <a class="el" href="dom_8h.html">dom.h</a> a special data type <a class="el" href="dom_8h.html#a0">xsd__anyType</a> is available that represents a hierarchical DOM node set. The DOM node set data structure can be used within structs, classes, STL containers, and as arguments of service operations. For example:<p>

+<div class="fragment"><pre><span class="preprocessor">    #import "<a class="code" href="dom_8h.html">dom.h</a>"</span>

+<span class="preprocessor">    #import "wsu.h"</span>

+    <span class="keyword">class </span>ns__myProduct

+    { <span class="keyword">public</span>:

+        @<span class="keywordtype">char</span>*            wsu__Id;

+        _wsu__Timestamp*  wsu__Timestamp;

+        <span class="keywordtype">char</span>*             name;

+        <span class="keywordtype">int</span>               SKU;

+        <span class="keywordtype">double</span>            price;

+        <a class="code" href="structsoap__dom__element.html">xsd__anyType</a>*     any;

+                          ns__myProduct();

+                          ~ns__myProduct();

+    };

+</pre></div><p>

+It is important to declare the <a class="el" href="dom_8h.html#a0">xsd__anyType</a> at the end of the struct or class, since the DOM parser consumes any XML element (the field name, 'any' in this case, is irrelavant). Thus, the other fields must be defined first to ensure they are populated first before the DOM node set is populated with any non-previously matched XML element.<p>

+Note that we also imported wsu.h as an example to show how to add a wsu:Id attribute to a struct or class if we want to digitally sign instances, and how to add a standardized wsu:Timestamp element to record creation and expiration times.<p>

+To compile, run soapcpp2 (with -Iimport) and compile your code by linking <a class="el" href="dom_8cpp.html">dom.cpp</a> (or dom.c for C). Note that the DOM data structures are declared in <a class="el" href="stdsoap2_8h.html">stdsoap2.h</a>, while the DOM operations are defined in <a class="el" href="dom_8cpp.html">dom.cpp</a> (or dom.c for C).<p>

+Methods to populate and traverse DOM node sets will be explained later. First, let's take a look at parsing and generating XML documents.<h2><a class="anchor" name="dom_2">

+Parsing and Generating XML</a></h2>

+The following examples assume that the soapcpp2 compiler was used on a header file (just the <a class="el" href="dom_8h.html">dom.h</a> file will do) and the generated soapC.cpp or (soapC.c for C) code was compiled and linked with <a class="el" href="dom_8cpp.html">dom.cpp</a> (or dom.c for C), stdsoap2.cpp (or stdsoap2.c) and the example application code. The generated namespace table should also be used, since the namespace bindings are relevant for consuming and producing XML for DOM node sets. Therefore, each of the example codes in this documentation is assumed to start with the following two includes:<p>

+<div class="fragment"><pre><span class="preprocessor">    #include "soapH.h"</span>  <span class="comment">// generated by soapcpp2</span>

+<span class="preprocessor">    #include "ns.nsmap"</span> <span class="comment">// a namespace table with the XML namespace used</span>

+</pre></div><p>

+The C++ std::iostream operators are overloaded to parse XML octet streams into node sets and to emit XML from node sets:<p>

+<div class="fragment"><pre>    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> dom;

+    dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a> = soap_new1(SOAP_DOM_TREE | SOAP_C_UTFSTRING);

+    cin &gt;&gt; dom; <span class="comment">// parse XML</span>

+    <span class="keywordflow">if</span> (dom.soap-&gt;error)

+      ... <span class="comment">// parse error</span>

+    cout &lt;&lt; dom; <span class="comment">// display XML</span>

+    <span class="keywordflow">if</span> (dom.soap-&gt;error)

+      ... <span class="comment">// output error</span>

+    soap_destroy(dom.soap);

+    soap_end(dom.soap);

+    soap_done(dom.soap);

+    free(dom.soap);

+</pre></div><p>

+In the example above we copied an XML document from stdin to stdout.<p>

+In C we use the DOM "serializers" to accomplish this as follows:<p>

+<div class="fragment"><pre>    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> dom;

+    dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a> = soap_new1(SOAP_DOM_TREE | SOAP_C_UTFSTRING);

+    dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a>-&gt;recvfd = stdin;

+    <span class="keywordflow">if</span> (soap_begin_recv(dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a>)

+     || NULL != <a class="code" href="dom_8cpp.html#a6">soap_in_xsd__anyType</a>(dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a>, NULL, &amp;dom, NULL)

+     || soap_end_recv(dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a>))

+      ... <span class="comment">// parse error</span>

+    dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a>-&gt;sendfd = stdout;

+    <span class="keywordflow">if</span> (soap_begin_send(dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a>)

+     || <a class="code" href="dom_8cpp.html#a4">soap_out_xsd__anyType</a>(dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a>, NULL, 0, &amp;dom, NULL)

+     || soap_end_send(dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a>))

+      ... <span class="comment">// output error</span>

+    soap_end(dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a>);

+    soap_done(dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a>);

+    free(dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a>);

+</pre></div><p>

+The SOAP_DOM_NODE flag is used to instruct the parser to populate a DOM node set with deserialized C and C++ data structures using the data type's deserializers that were generated with soapcpp2 from a header file with the data type declarations. Suppose for example that the following header file was used (in fact, this declaration appears in wsu.h):<p>

+<div class="fragment"><pre>    <span class="keyword">typedef</span> <span class="keyword">struct </span>_wsu__Timestamp

+    {   @<span class="keywordtype">char</span>*  wsu__Id;

+        <span class="keywordtype">char</span>*   Created;

+        <span class="keywordtype">char</span>*   Expires;

+    } _wsu__Timestamp;

+</pre></div><p>

+Note that the leading underscore of the type name indicates an XML element definition (rather than a complexType definition), so the name of the data type is relevant when comparing XML element tags to C/C++ data types by the deserializers.<p>

+When an XML document is parsed with one or more &lt;wsu:Timestamp&gt; elements, the DOM will be automatically populated with the _wsu__Timestamp objects. Suppose the XML document root is a &lt;wsu:Timestamp&gt;, then the root node of the DOM is a _wsu__Timestamp object:<p>

+<div class="fragment"><pre>    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> dom;

+    dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a> = soap_new1(SOAP_DOM_NODE);

+    cin &gt;&gt; dom; <span class="comment">// parse XML</span>

+    <span class="keywordflow">if</span> (dom.soap-&gt;error)

+      ... <span class="comment">// parse error</span>

+    <span class="keywordflow">if</span> (dom.type == SOAP_TYPE__wsu__Timestamp)

+    { _wsu__Timestamp *t = (_wsu__Timestamp*)dom.<a class="code" href="structsoap__dom__element.html#o9">node</a>;

+      cout &lt;&lt; <span class="stringliteral">"Start "</span> &lt;&lt; (t-&gt;Created ? t-&gt;Created : <span class="stringliteral">""</span>)

+           &lt;&lt; <span class="stringliteral">" till "</span> &lt;&lt; (t-&gt;Expires ? t-&gt;Expires : <span class="stringliteral">""</span>) &lt;&lt; endl;

+    }

+</pre></div><p>

+Note that the soapcpp2 compiler generates a unique type identification constant SOAP_TYPE_X for each data type X, which is used to determine the node's type in the example above.<p>

+When objects occur deeper within the DOM node set then the DOM tree should be traversed. This subject will be discussed next.<h2><a class="anchor" name="dom_3">

+Traversing a DOM Node Set</a></h2>

+The DOM node set is traversed with a C++ iterator or with the C functions <a class="el" href="stdsoap2_8h.html#a1">soap_dom_next_element</a> and <a class="el" href="stdsoap2_8h.html#a2">soap_dom_next_attribute</a>. For example, to walk the node set visiting nodes in the same order as they appeared in the document, use:<p>

+<div class="fragment"><pre>    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> dom;

+    dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a> = soap_new1(SOAP_DOM_TREE | SOAP_C_UTFSTRING);

+    ...

+    <span class="keywordflow">for</span> (<a class="code" href="classsoap__dom__element__iterator.html">soap_dom_element::iterator</a> iter = dom.<a class="code" href="structsoap__dom__element.html#a7">begin</a>(); iter != dom.<a class="code" href="structsoap__dom__element.html#a8">end</a>(); ++iter)

+      <span class="keywordflow">for</span> (<a class="code" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute::iterator</a> attr = (*iter).atts.begin(); attr != (*iter).atts.end(); ++attr)

+        ...

+</pre></div><p>

+In C code, use:<p>

+<div class="fragment"><pre>    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> dom, *iter;

+    <a class="code" href="structsoap__dom__attribute.html">soap_dom_attribute</a> *attr;

+    dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a> = soap_new1(SOAP_DOM_TREE | SOAP_C_UTFSTRING);

+    ...

+    <span class="keywordflow">for</span> (iter = &amp;dom; iter; iter = <a class="code" href="dom_8cpp.html#a15">soap_dom_next_element</a>(iter))

+      <span class="keywordflow">for</span> (attr = iter-&gt;<a class="code" href="structsoap__dom__element.html#o3">atts</a>; attr; attr = <a class="code" href="dom_8cpp.html#a16">soap_dom_next_attribute</a>(attr))

+         ...

+</pre></div><p>

+The <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> and <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a> structs form essentially linked lists, so it would not be too difficult to write your own tree walkers:<p>

+<ul>

+<li><a class="el" href="structsoap__dom__element.html#o1">soap_dom_element::prnt</a> points to the parent <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> node.</li><li><a class="el" href="structsoap__dom__element.html#o2">soap_dom_element::elts</a> points to the linked list of child element nodes.</li><li><a class="el" href="structsoap__dom__element.html#o3">soap_dom_element::atts</a> points to the linked list of attribute nodes.</li></ul>

+<p>

+The linked lists of sibling elements nodes and attribute nodes are respectively:<p>

+<ul>

+<li><a class="el" href="structsoap__dom__element.html#o0">soap_dom_element::next</a> points to the next sibling element node.</li><li><a class="el" href="structsoap__dom__attribute.html#o0">soap_dom_attribute::next</a> points to the next attribute in the attribute list of an element node.</li></ul>

+<p>

+Note that for a root node, the <a class="el" href="structsoap__dom__element.html#o1">soap_dom_element::prnt</a> and <a class="el" href="structsoap__dom__element.html#o0">soap_dom_element::next</a> are both NULL.<p>

+Tag names of elements and attributes are stored in <a class="el" href="structsoap__dom__element.html#o5">soap_dom_element::name</a> and <a class="el" href="structsoap__dom__attribute.html#o2">soap_dom_attribute::name</a> strings, respectively. The names are UTF-8 encoded.<p>

+XML namespace bindings are explicitly propagated throughout the DOM node set for those elements and attributes that are namespace qualified (either with a namespace prefix or when they occur in a xmlns default namespace scope). The namespaces are stored in the <a class="el" href="structsoap__dom__element.html#o4">soap_dom_element::nstr</a> and <a class="el" href="structsoap__dom__attribute.html#o1">soap_dom_attribute::nstr</a> strings. The following example shows how to traverse a DOM node set and print the elements with their namespace URIs when present:<p>

+<div class="fragment"><pre>    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> dom;

+    dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a> = soap_new1(SOAP_DOM_TREE | SOAP_C_UTFSTRING);

+    cin &gt;&gt; dom;

+    <span class="keywordflow">for</span> (<a class="code" href="classsoap__dom__element__iterator.html">soap_dom_element::iterator</a> iter = dom.<a class="code" href="structsoap__dom__element.html#a7">begin</a>(); iter != dom.end(); ++iter)

+    { cout &lt;&lt; <span class="stringliteral">"Element "</span> &lt;&lt; (*iter).<a class="code" href="classsoap__dom__element__iterator.html#o2">name</a>;

+      <span class="keywordflow">if</span> ((*iter).nstr)

+        cout &lt;&lt; <span class="stringliteral">" has namespace "</span> &lt;&lt; (*iter).nstr;

+      cout &lt;&lt; endl;

+    }

+    soap_destroy(dom.soap);

+    soap_end(dom.soap);

+    soap_done(dom.soap);

+    free(dom.soap);

+</pre></div><p>

+Text content of a node is stored in the <a class="el" href="structsoap__dom__element.html#o6">soap_dom_element::data</a> string in UTF-8 format. This string is populated if the SOAP_C_UTFSTRING flag was set. Otherwise the data content will be stored in the <a class="el" href="structsoap__dom__element.html#o7">soap_dom_element::wide</a> wide-character string.<p>

+The following example prints those element nodes that have text content (in UTF-8 format):<p>

+<div class="fragment"><pre>    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> dom;

+    ...

+    <span class="keywordflow">for</span> (<a class="code" href="classsoap__dom__element__iterator.html">soap_dom_element::iterator</a> iter = dom.<a class="code" href="structsoap__dom__element.html#a7">begin</a>(); iter != dom.<a class="code" href="structsoap__dom__element.html#a8">end</a>(); ++iter)

+    { cout &lt;&lt; <span class="stringliteral">"Element "</span> &lt;&lt; (*iter).<a class="code" href="classsoap__dom__element__iterator.html#o2">name</a>;

+      <span class="keywordflow">if</span> ((*iter).data)

+        cout &lt;&lt; <span class="stringliteral">" = "</span> &lt;&lt; (*iter).data;

+      cout &lt;&lt; endl;

+    }

+    ...

+</pre></div><p>

+When a DOM node set contains deserialized objects (enabled with the SOAP_DOM_NODE flag), the <a class="el" href="structsoap__dom__element.html#o8">soap_dom_element::type</a> and <a class="el" href="structsoap__dom__element.html#o9">soap_dom_element::node</a> values are set:<p>

+<div class="fragment"><pre>    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> dom;

+    ...

+    <span class="keywordflow">for</span> (<a class="code" href="classsoap__dom__element__iterator.html">soap_dom_element::iterator</a> iter = dom.<a class="code" href="structsoap__dom__element.html#a7">begin</a>(); iter != dom.<a class="code" href="structsoap__dom__element.html#a8">end</a>(); ++iter)

+    { cout &lt;&lt; <span class="stringliteral">"Element "</span> &lt;&lt; (*iter).<a class="code" href="classsoap__dom__element__iterator.html#o2">name</a>;

+      <span class="keywordflow">if</span> ((*iter).type)

+        cout &lt;&lt; <span class="stringliteral">"Element "</span> &lt;&lt; (*iter).name &lt;&lt; <span class="stringliteral">" contains a deserialized object"</span> &lt;&lt; endl;

+      cout &lt;&lt; endl;

+    }

+    ...

+</pre></div><p>

+The <a class="el" href="structsoap__dom__element.html#o8">soap_dom_element::type</a> is 0 or a SOAP_TYPE_X constant, where X is the name of the deserialized type. The <a class="el" href="structsoap__dom__element.html#o9">soap_dom_element::node</a> points to the deserialized object. If this is a char* string, it points directly to the character sequence.<p>

+Note: the SOAP_DOM_TREE flag restricts the parser to DOM content only, so deserializers is not used. When the SOAP_DOM_TREE flag is not used, an appropriate deserializer MAY be used by gSOAP when an element contains an id attribute and gSOAP can determine the type from the id attribute reference and/or the xsi:type attribute of an element.<h2><a class="anchor" name="dom_4">

+Searching</a></h2>

+Common operations on DOM node sets in level-2 DOM parsers are searching and filtering.<p>

+For C++ code, the built-in <a class="el" href="structsoap__dom__element.html#w0">soap_dom_element::iterator</a> can be used to search for matching element nodes. C programmers are out of luck as they should write looping code to search for nodes explicitly.<p>

+The <a class="el" href="structsoap__dom__element.html#a9">soap_dom_element::find</a> method returns a search iterator. The method takes an optional namespace URI and element name to match elements in the DOM node set. For example, to iterate over all "product" elements:<p>

+<div class="fragment"><pre>    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> dom;

+    ...

+    <span class="keywordflow">for</span> (<a class="code" href="classsoap__dom__element__iterator.html">soap_dom_element::iterator</a> iter = dom.<a class="code" href="structsoap__dom__element.html#a9">find</a>(NULL, <span class="stringliteral">"product"</span>); iter != dom.<a class="code" href="structsoap__dom__element.html#a8">end</a>(); ++iter)

+      cout &lt;&lt; <span class="stringliteral">"Element "</span> &lt;&lt; (*iter).<a class="code" href="classsoap__dom__element__iterator.html#o2">name</a> &lt;&lt; endl;

+    ...

+</pre></div><p>

+To iterate over all elements in a particular namespace:<p>

+<div class="fragment"><pre>    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> dom;

+    ...

+    <span class="keywordflow">for</span> (<a class="code" href="classsoap__dom__element__iterator.html">soap_dom_element::iterator</a> iter = dom.<a class="code" href="structsoap__dom__element.html#a9">find</a>(<span class="stringliteral">"http://www.w3.org/2001/XMLSchema"</span>, NULL); iter != dom.<a class="code" href="structsoap__dom__element.html#a8">end</a>(); ++iter)

+      cout &lt;&lt; <span class="stringliteral">"Element "</span> &lt;&lt; (*iter).<a class="code" href="classsoap__dom__element__iterator.html#o2">name</a> &lt;&lt; endl;

+    ...

+</pre></div><p>

+Since namespaces may have different version, a '*' wildcard can be used with the namespace string. Likewise, tag names may be namespace qualified with prefixes that are not relevant to the search:<p>

+<div class="fragment"><pre>    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> dom;

+    ...

+    <span class="keywordflow">for</span> (<a class="code" href="classsoap__dom__element__iterator.html">soap_dom_element::iterator</a> iter = dom.<a class="code" href="structsoap__dom__element.html#a9">find</a>(<span class="stringliteral">"http://www.w3.org/*XMLSchema"</span>, <span class="stringliteral">"*:schema"</span>); iter != dom.<a class="code" href="structsoap__dom__element.html#a8">end</a>(); ++iter)

+      cout &lt;&lt; <span class="stringliteral">"Element "</span> &lt;&lt; (*iter).<a class="code" href="classsoap__dom__element__iterator.html#o2">name</a> &lt;&lt; endl;

+    ...

+</pre></div><p>

+This searches for qualified elements in one of the XSD namespaces.<h2><a class="anchor" name="dom_5">

+Constructing DOM Node Sets</a></h2>

+The <a class="el" href="structsoap__dom__element.html#a0">soap_dom_element::set</a> and <a class="el" href="structsoap__dom__element.html#a3">soap_dom_element::add</a> methods are used to decorate a DOM node set with child element nodes and attribute nodes. Application data with serializers can be incorporated in the node set as well.<p>

+The following examples are shown in C++. C programmers can use the <a class="el" href="structsoap__dom__element.html">soap_dom_element</a>:elts list and soap_dom_elements::atts list to add child nodes and attribute nodes, respectively.<p>

+<div class="fragment"><pre>    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> dom;

+    dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a> = soap_new1(SOAP_C_UTFSTRING | SOAP_XML_INDENT);

+    <span class="keyword">const</span> <span class="keywordtype">char</span> *myURI = <span class="stringliteral">"http://www.mydomain.com/myproducts"</span>;

+    ns__myProduct product();

+    product.soap_default(dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a>); <span class="comment">// method generated by soapcpp2</span>

+    product.name = <span class="stringliteral">"Ernie"</span>;

+    product.SKU = 123;

+    product.price = 9.95;

+    dom.<a class="code" href="structsoap__dom__element.html#a0">set</a>(myURI, <span class="stringliteral">"list"</span>);

+    dom.<a class="code" href="structsoap__dom__element.html#a3">add</a>(<a class="code" href="structsoap__dom__attribute.html">soap_dom_attribute</a>(dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a>, myURI, <span class="stringliteral">"version"</span>, <span class="stringliteral">"0.9"</span>));

+    dom.<a class="code" href="structsoap__dom__element.html#a3">add</a>(<a class="code" href="structsoap__dom__element.html">soap_dom_element</a>(dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a>, myURI, <span class="stringliteral">"documentation"</span>, <span class="stringliteral">"List of products"</span>));

+    dom.<a class="code" href="structsoap__dom__element.html#a3">add</a>(<a class="code" href="structsoap__dom__element.html">soap_dom_element</a>(dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a>, myURI, <span class="stringliteral">"product"</span>, SOAP_TYPE_ns__myProduct, &amp;product);

+    cout &lt;&lt; dom;

+    ...

+</pre></div><p>

+Assuming that myURI is associated with namespace prefix "ns" in the namespace table, the rendition is<p>

+<div class="fragment"><pre>&lt;?xml version=<span class="stringliteral">"1.0"</span> encoding=<span class="stringliteral">"UTF-8"</span>?&gt;

+&lt;ns:list

+  xmlns:SOAP-ENV=<span class="stringliteral">"http://schemas.xmlsoap.org/soap/envelope/"</span>

+  xmlns:SOAP-ENC=<span class="stringliteral">"http://schemas.xmlsoap.org/soap/encoding/"</span>

+  xmlns:xsi=<span class="stringliteral">"http://www.w3.org/2001/XMLSchema-instance"</span>

+  xmlns:xsd=<span class="stringliteral">"http://www.w3.org/2001/XMLSchema"</span>

+  xmlns:ns=<span class="stringliteral">"http://domain/schemas/product.xsd"</span>

+  version=<span class="stringliteral">"0.9"</span> &gt;

+        &lt;ns:documentation&gt;List of products&lt;/ns:documentation&gt;

+        &lt;ns:product&gt;

+                &lt;name&gt;Ernie&lt;/name&gt;

+                &lt;SKU&gt;123&lt;/SKU&gt;

+                &lt;price&gt;9.95&lt;/price&gt;

+        &lt;/ns:product&gt;

+&lt;/ns:list&gt;

+</pre></div><p>

+Note that the namespace table content is "dumped" into the XML rendition.<p>

+The global namespace mapping table "namespaces[]" contains the namespace bindings that should be meaningful to the application. The soap context can be set to a new table as follows:<p>

+<div class="fragment"><pre>    Namespace myNamespaces[] = { { <span class="stringliteral">"ns"</span>, <span class="stringliteral">"..."</span> }, ... , { NULL } };

+    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> dom;

+    dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a> = soap_new1(SOAP_C_UTFSTRING | SOAP_XML_INDENT);

+    dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a>-&gt;namespaces = myNamespaces;

+</pre></div><p>

+To produce cleaner XML, use the SOAP_XML_CANONICAL flag to initiate the soap context:<p>

+<div class="fragment"><pre>&lt;ns:list xmlns:ns=<span class="stringliteral">"http://domain/schemas/product.xsd"</span> version=<span class="stringliteral">"0.9"</span> &gt;

+        &lt;ns:documentation&gt;List of products&lt;/ns:documentation&gt;

+        &lt;ns:product&gt;

+                &lt;name&gt;Ernie&lt;/name&gt;

+                &lt;SKU&gt;123&lt;/SKU&gt;

+                &lt;price&gt;9.95&lt;/price&gt;

+        &lt;/ns:product&gt;

+&lt;/ns:list&gt;

+</pre></div><p>

+Note that the xmlns bindings are rendered automatically. When parsing an XML document, xmlns bindings are not added to the attribute node set. The <a class="el" href="structsoap__dom__element.html#o4">soap_dom_element::nstr</a> and <a class="el" href="structsoap__dom__attribute.html#o1">soap_dom_attribute::nstr</a> namespace strings are set to retain namespace URIs. The XML rendering algorithm uses the namespace strings to add xmlns bindings that are not already in the namespace table.<p>

+When it is desirable to render XML exactly as represented in the DOM node set, e.g. when xmlns bindings are explicitly included in the attribute node set, use the SOAP_DOM_ASIS flag:<p>

+<div class="fragment"><pre>    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> dom;

+    dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a> = soap_new1(SOAP_C_UTFSTRING | SOAP_DOM_ASIS);

+</pre></div><h2><a class="anchor" name="dom_6">

+Example</a></h2>

+The gSOAP header file below imports DOM and declares xsd:float to enable serializing floats embedded within DOM node sets and deserializing floats to populate DOM node sets:<p>

+<div class="fragment"><pre><span class="preprocessor">    #import "<a class="code" href="dom_8h.html">dom.h</a>"</span>

+    <span class="keyword">typedef</span> <span class="keywordtype">float</span> xsd__float;

+</pre></div><p>

+Consider invoking the XMethods delayed stock quote service to obtain a stock quote. The float deserializer is used to store the floating-point value of a stock given that the &lt;result&gt; element has an xsi:type="xsd:float" attribute.<p>

+<div class="fragment"><pre>    <span class="keyword">struct </span>soap *soap = soap_new1(SOAP_C_UTFSTRING | SOAP_DOM_NODE);

+    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> envelope(soap, <span class="stringliteral">"http://schemas.xmlsoap.org/soap/envelope/"</span>, <span class="stringliteral">"Envelope"</span>);

+    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> body(soap, <span class="stringliteral">"http://schemas.xmlsoap.org/soap/envelope/"</span>, <span class="stringliteral">"Body"</span>);

+    <a class="code" href="structsoap__dom__attribute.html">soap_dom_attribute</a> encodingStyle(soap, <span class="stringliteral">"http://schemas.xmlsoap.org/soap/envelope/"</span>, <span class="stringliteral">"encodingStyle"</span>, <span class="stringliteral">"http://schemas.xmlsoap.org/soap/encoding/"</span>);

+    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> request(soap, <span class="stringliteral">"urn:xmethods-delayed-quotes"</span>, <span class="stringliteral">"getQuote"</span>);

+    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> symbol(soap, NULL, <span class="stringliteral">"symbol"</span>, <span class="stringliteral">"IBM"</span>);

+    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> response(soap);

+    envelope.add(body);

+    body.add(encodingStyle);

+    body.add(request);

+    request.add(symbol);

+    cout &lt;&lt; <span class="stringliteral">"Request message:"</span> &lt;&lt; endl &lt;&lt; envelope &lt;&lt; endl;

+    <span class="keywordflow">if</span> (soap_connect(soap, <span class="stringliteral">"http://services.xmethods.net/soap"</span>, <span class="stringliteral">""</span>)

+     || <a class="code" href="dom_8cpp.html#a4">soap_out_xsd__anyType</a>(soap, NULL, 0, &amp;envelope, NULL)

+     || soap_end_send(soap)

+     || soap_begin_recv(soap)

+     || NULL != <a class="code" href="dom_8cpp.html#a6">soap_in_xsd__anyType</a>(soap, NULL, &amp;response, NULL)

+     || soap_end_recv(soap)

+     || soap_closesock(soap))

+    { soap_print_fault(soap, stderr);

+      soap_print_fault_location(soap, stderr);

+    }

+    <span class="keywordflow">else</span>

+    { cout &lt;&lt; <span class="stringliteral">"Response message:"</span> &lt;&lt; endl &lt;&lt; response &lt;&lt; endl;

+      <span class="keywordflow">for</span> (<a class="code" href="classsoap__dom__element__iterator.html">soap_dom_element::iterator</a> walker = response.find(SOAP_TYPE_xsd__float); walker != response.end(); ++walker)

+        cout &lt;&lt; <span class="stringliteral">"Quote = "</span> &lt;&lt; *(xsd__float*)(*walker).node &lt;&lt; endl;

+    }

+    soap_destroy(soap);

+    soap_end(soap);

+    soap_done(soap);

+    free(soap);

+</pre></div><h2><a class="anchor" name="dom_7">

+Summary</a></h2>

+The DOM parser needs a soap context to allocate nodes:<p>

+<div class="fragment"><pre>    <a class="code" href="structsoap__dom__element.html">soap_dom_element</a> dom;

+    dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a> = soap_new1(... flags ...);

+    ...

+    soap_destroy(dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a>);

+    soap_end(dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a>);

+    soap_done(dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a>);

+    soap_free(dom.<a class="code" href="structsoap__dom__element.html#o12">soap</a>);

+</pre></div><p>

+The nodes are removed with soap_destroy (for C++) and soap_end. The soap_done function should only be used before the soap context is deallocated.<p>

+The soap context flags that control the parsing and rendition of XML are:<p>

+<ul>

+<li>(no flag): only elements with an id attribute are deserialized as C/C++ data types (when a deserializer is available). XML elements with character data are deserialized into the <a class="el" href="structsoap__dom__element.html#o7">soap_dom_element::wide</a> field.</li><li>SOAP_C_UTFSTRING: store character data in UTF-8 format in <a class="el" href="structsoap__dom__element.html#o6">soap_dom_element::data</a>.</li><li>SOAP_C_MBSTRING: store character data in multi-byte format in <a class="el" href="structsoap__dom__element.html#o6">soap_dom_element::data</a>, where the decoding depends on the current localication. The platform must support MB strings (HAVE_MBTOWC).</li><li>SOAP_DOM_TREE: prevents deserialization of C/C++ data structures into the DOM.</li><li>SOAP_DOM_NODE: attempt to deserialize C/C++ data structures when a deserializer is available. A deserializer is selected based on the element name or the xsi:type attribute.</li><li>SOAP_DOM_ASIS: render XML "as is", i.e. do not insert xmlns bindings for URIs stored in nstr. Assumes the DOM is self-contained.</li><li>SOAP_XML_INDENT: render XML with indent.</li><li>SOAP_XML_CANONICAL: render XML in exc-c14n form.</li></ul>

+<p>

+The DOM traversal operations:<p>

+<ul>

+<li><a class="el" href="stdsoap2_8h.html#a1">soap_dom_next_element</a> returns the next element in an in-order traversal.</li><li><a class="el" href="stdsoap2_8h.html#a2">soap_dom_next_attribute</a> returns the next attribute of a node.</li></ul>

+<p>

+The <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> fields:<p>

+<ul>

+<li><a class="el" href="structsoap__dom__element.html#o0">soap_dom_element::next</a> pointer to next sibling in list.</li><li><a class="el" href="structsoap__dom__element.html#o1">soap_dom_element::prnt</a> pointer to parent node.</li><li><a class="el" href="structsoap__dom__element.html#o2">soap_dom_element::elts</a> pointer to list of child element nodes.</li><li><a class="el" href="structsoap__dom__element.html#o3">soap_dom_element::atts</a> pointer to list of attribute nodes.</li><li><a class="el" href="structsoap__dom__element.html#o4">soap_dom_element::nstr</a> optional namespace string of this node.</li><li><a class="el" href="structsoap__dom__element.html#o5">soap_dom_element::name</a> the name of the element node (with optional prefix).</li><li><a class="el" href="structsoap__dom__element.html#o6">soap_dom_element::data</a> optional character data in UTF-8 format.</li><li><a class="el" href="structsoap__dom__element.html#o7">soap_dom_element::wide</a> optional character data in wide string format.</li><li><a class="el" href="structsoap__dom__element.html#o8">soap_dom_element::type</a> optional SOAP_TYPE_X type of a C/C++ data structure stored with this node.</li><li><a class="el" href="structsoap__dom__element.html#o9">soap_dom_element::node</a> optional pointer to the C/C++ data structure stored with this node.</li><li><a class="el" href="structsoap__dom__element.html#o10">soap_dom_element::head</a> optional leading whitespace to the start tag.</li><li><a class="el" href="structsoap__dom__element.html#o11">soap_dom_element::tail</a> optional leading whitespace to the end tag.</li><li><a class="el" href="structsoap__dom__element.html#o12">soap_dom_element::soap</a> the soap context that manages this node.</li></ul>

+<p>

+The <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> types:<p>

+<ul>

+<li><a class="el" href="structsoap__dom__element.html#w0">soap_dom_element::iterator</a></li></ul>

+<p>

+The <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> methods:<p>

+<ul>

+<li><a class="el" href="structsoap__dom__element.html#a0">soap_dom_element::set</a>(nstr, name);</li><li><a class="el" href="structsoap__dom__element.html#a0">soap_dom_element::set</a>(data);</li><li><a class="el" href="structsoap__dom__element.html#a0">soap_dom_element::set</a>(node, type);</li><li><a class="el" href="structsoap__dom__element.html#a3">soap_dom_element::add</a>(<a class="el" href="structsoap__dom__element.html">soap_dom_element</a>);</li><li><a class="el" href="structsoap__dom__element.html#a3">soap_dom_element::add</a>(<a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a>);</li><li><a class="el" href="structsoap__dom__element.html#a7">soap_dom_element::begin</a>();</li><li><a class="el" href="structsoap__dom__element.html#a8">soap_dom_element::end</a>();</li><li><a class="el" href="structsoap__dom__element.html#a9">soap_dom_element::find</a>(nstr, name);</li><li><a class="el" href="structsoap__dom__element.html#a9">soap_dom_element::find</a>(type);</li><li><a class="el" href="structsoap__dom__element.html#a11">soap_dom_element::unlink</a>();</li></ul>

+<p>

+The <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> constructors:<p>

+<ul>

+<li><a class="el" href="structsoap__dom__element.html">soap_dom_element</a>();</li><li><a class="el" href="structsoap__dom__element.html">soap_dom_element</a>(soap);</li><li><a class="el" href="structsoap__dom__element.html">soap_dom_element</a>(soap, nstr, name);</li><li><a class="el" href="structsoap__dom__element.html">soap_dom_element</a>(soap, nstr, name, data);</li><li><a class="el" href="structsoap__dom__element.html">soap_dom_element</a>(soap, nstr, name, node, type);</li></ul>

+<p>

+The <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a> fields:<p>

+<ul>

+<li><a class="el" href="structsoap__dom__attribute.html#o0">soap_dom_attribute::next</a> pointer to next attribute node in list.</li><li><a class="el" href="structsoap__dom__attribute.html#o1">soap_dom_attribute::nstr</a> optional namespace string of this node.</li><li><a class="el" href="structsoap__dom__attribute.html#o2">soap_dom_attribute::name</a> the name of the attribute (with optional prefix).</li><li><a class="el" href="structsoap__dom__attribute.html#o3">soap_dom_attribute::data</a> optional character data in UTF-8 format.</li><li><a class="el" href="structsoap__dom__attribute.html#o5">soap_dom_attribute::soap</a> the soap context that manages this node.</li></ul>

+<p>

+The <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a> types:<p>

+<ul>

+<li><a class="el" href="structsoap__dom__attribute.html#w0">soap_dom_attribute::iterator</a></li></ul>

+<p>

+The <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a> methods:<p>

+<ul>

+<li><a class="el" href="structsoap__dom__attribute.html#a0">soap_dom_attribute::set</a>(nstr, name);</li><li><a class="el" href="structsoap__dom__attribute.html#a0">soap_dom_attribute::set</a>(data);</li><li><a class="el" href="structsoap__dom__attribute.html#a2">soap_dom_attribute::begin</a>();</li><li><a class="el" href="structsoap__dom__attribute.html#a3">soap_dom_attribute::end</a>();</li><li><a class="el" href="structsoap__dom__attribute.html#a4">soap_dom_attribute::find</a>(nstr, name);</li><li><a class="el" href="structsoap__dom__attribute.html#a5">soap_dom_attribute::unlink</a>();</li></ul>

+<p>

+The <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a> constructors:<p>

+<ul>

+<li><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a>();</li><li><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a>(soap);</li><li><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a>(soap, nstr, name, data); </li></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Sat Aug 20 12:24:36 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/pages.html b/doc/dom/html/pages.html
new file mode 100644
index 0000000..21e0d39
--- /dev/null
+++ b/doc/dom/html/pages.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Page Index</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindexHL" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>gSOAP level-2 DOM Related Pages</h1>Here is a list of all related documentation pages:<ul>

+<li><a class="el" href="dom.html">The gSOAP level-2 DOM parser</a>

+

+</ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 20:55:54 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/stdsoap2_8h.html b/doc/dom/html/stdsoap2_8h.html
new file mode 100644
index 0000000..b133514
--- /dev/null
+++ b/doc/dom/html/stdsoap2_8h.html
@@ -0,0 +1,211 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: /Users/engelen/Projects/gsoap/doc/dom/stdsoap2.h File Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>/Users/engelen/Projects/gsoap/doc/dom/stdsoap2.h File Reference</h1>

+<p>

+This graph shows which files directly or indirectly include this file:<p><center><img src="stdsoap2_8h__dep__incl.png" border="0" usemap="#stdsoap2.hdep_map" alt="Included by dependency graph"></center>

+<map name="stdsoap2.hdep_map">

+<area href="dom_8cpp.html" shape="rect" coords="13,17,75,44" alt="">

+</map>

+<table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Classes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td></tr>

+

+<tr><td colspan=2><br><h2>Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>SOAP_FMAC1 const char *SOAP_FMAC2&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="stdsoap2_8h.html#a0">soap_dom_current_nstr</a> (struct soap *soap, const char *tag)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>SOAP_FMAC1 struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> <br>

+*SOAP_FMAC2&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="stdsoap2_8h.html#a1">soap_dom_next_element</a> (struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *elt)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>SOAP_FMAC1 struct <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a> <br>

+*SOAP_FMAC2&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="stdsoap2_8h.html#a2">soap_dom_next_attribute</a> (struct <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a> *att)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::ostream &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="stdsoap2_8h.html#a3">operator&lt;&lt;</a> (std::ostream &amp;, const struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> &amp;)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::istream &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="stdsoap2_8h.html#a4">operator&gt;&gt;</a> (std::istream &amp;, struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> &amp;)</td></tr>

+

+</table>

+<hr><h2>Function Documentation</h2>

+<a class="anchor" name="a3" doxytag="stdsoap2.h::operator<<" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::ostream&amp; operator&lt;&lt;           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">std::ostream &amp;&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> &amp;&nbsp;</td>

+          <td class="mdname" nowrap></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a4" doxytag="stdsoap2.h::operator>>" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::istream&amp; operator&gt;&gt;           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">std::istream &amp;&nbsp;</td>

+          <td class="mdname" nowrap>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> &amp;&nbsp;</td>

+          <td class="mdname" nowrap></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a0" doxytag="stdsoap2.h::soap_dom_current_nstr" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> SOAP_FMAC1 const char* SOAP_FMAC2 soap_dom_current_nstr           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>tag</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a2" doxytag="stdsoap2.h::soap_dom_next_attribute" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> SOAP_FMAC1 struct <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a>* SOAP_FMAC2 soap_dom_next_attribute           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>att</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="stdsoap2.h::soap_dom_next_element" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> SOAP_FMAC1 struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a>* SOAP_FMAC2 soap_dom_next_element           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>elt</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr size="1"><address style="align: right;"><small>Generated on Sat Aug 20 12:24:36 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/stdsoap2_8h__dep__incl.map b/doc/dom/html/stdsoap2_8h__dep__incl.map
new file mode 100644
index 0000000..9e5a488
--- /dev/null
+++ b/doc/dom/html/stdsoap2_8h__dep__incl.map
@@ -0,0 +1,2 @@
+base referer
+rect $dom_8cpp.html 13,17 75,44
diff --git a/doc/dom/html/stdsoap2_8h__dep__incl.md5 b/doc/dom/html/stdsoap2_8h__dep__incl.md5
new file mode 100644
index 0000000..69fd784
--- /dev/null
+++ b/doc/dom/html/stdsoap2_8h__dep__incl.md5
@@ -0,0 +1 @@
+f39a138f6cdd5a1f9e0c584590a4129c
\ No newline at end of file
diff --git a/doc/dom/html/stdsoap2_8h__dep__incl.png b/doc/dom/html/stdsoap2_8h__dep__incl.png
new file mode 100644
index 0000000..d3c6faa
--- /dev/null
+++ b/doc/dom/html/stdsoap2_8h__dep__incl.png
Binary files differ
diff --git a/doc/dom/html/stdsoap2_8h__incl.map b/doc/dom/html/stdsoap2_8h__incl.map
new file mode 100644
index 0000000..5a14779
--- /dev/null
+++ b/doc/dom/html/stdsoap2_8h__incl.map
@@ -0,0 +1 @@
+base referer
diff --git a/doc/dom/html/stdsoap2_8h__incl.md5 b/doc/dom/html/stdsoap2_8h__incl.md5
new file mode 100644
index 0000000..1b3faa8
--- /dev/null
+++ b/doc/dom/html/stdsoap2_8h__incl.md5
@@ -0,0 +1 @@
+b8f29355f43494b95136d5fd57ee1d74
\ No newline at end of file
diff --git a/doc/dom/html/stdsoap2_8h__incl.png b/doc/dom/html/stdsoap2_8h__incl.png
new file mode 100644
index 0000000..c8ce213
--- /dev/null
+++ b/doc/dom/html/stdsoap2_8h__incl.png
Binary files differ
diff --git a/doc/dom/html/struct_namespace-members.html b/doc/dom/html/struct_namespace-members.html
new file mode 100644
index 0000000..0d04aa8
--- /dev/null
+++ b/doc/dom/html/struct_namespace-members.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>Namespace Member List</h1>This is the complete list of members for <a class="el" href="struct_namespace.html">Namespace</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="struct_namespace.html#o0">id</a></td><td><a class="el" href="struct_namespace.html">Namespace</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct_namespace.html#o2">in</a></td><td><a class="el" href="struct_namespace.html">Namespace</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct_namespace.html#o1">ns</a></td><td><a class="el" href="struct_namespace.html">Namespace</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct_namespace.html#o3">out</a></td><td><a class="el" href="struct_namespace.html">Namespace</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/struct_namespace.html b/doc/dom/html/struct_namespace.html
new file mode 100644
index 0000000..4421f0f
--- /dev/null
+++ b/doc/dom/html/struct_namespace.html
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Namespace Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>Namespace Struct Reference</h1><code>#include &lt;stdsoap2.h&gt;</code>

+<p>

+<a href="struct_namespace-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct_namespace.html#o0">id</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct_namespace.html#o1">ns</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct_namespace.html#o2">in</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct_namespace.html#o3">out</a></td></tr>

+

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="Namespace::id" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="struct_namespace.html#o0">Namespace::id</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="Namespace::in" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="struct_namespace.html#o2">Namespace::in</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="Namespace::ns" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="struct_namespace.html#o1">Namespace::ns</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="Namespace::out" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct_namespace.html#o3">Namespace::out</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap-members.html b/doc/dom/html/structsoap-members.html
new file mode 100644
index 0000000..8e20390
--- /dev/null
+++ b/doc/dom/html/structsoap-members.html
@@ -0,0 +1,156 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap Member List</h1>This is the complete list of members for <a class="el" href="structsoap.html">soap</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o19">accept_flags</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o15">accept_timeout</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o114">action</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o11">actor</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o77">ahead</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o25">alist</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o107">alloced</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o95">arrayOffset</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o94">arraySize</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o93">arrayType</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o100">attributes</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o115">authrealm</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o18">bind_flags</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o23">blist</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o79">body</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o86">buf</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o75">bufidx</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o76">buflen</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o136">c14nexclude</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o135">c14ninclude</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o78">cdata</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o110">chunkbuflen</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o109">chunksize</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o24">clist</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o17">connect_flags</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o14">connect_timeout</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o138">cookie_domain</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o140">cookie_max</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o139">cookie_path</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o137">cookies</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o1">copy</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o81">count</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o129">dime</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o7">dime_id_format</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o128">dom</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o6">double_format</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o101">encoding</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o10">encodingStyle</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o111">endpoint</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o126">errmode</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o127">errnum</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o125">error</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o50">faccept</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o31">fault</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o51">fclose</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o47">fclosesocket</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o45">fconnect</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o133">fdebug</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o67">fdimeread</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o65">fdimereadclose</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o63">fdimereadopen</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o68">fdimewrite</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o66">fdimewriteclose</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o64">fdimewriteopen</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o46">fdisconnect</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o39">fform</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o38">fget</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o56">fignore</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o5">float_format</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o49">fopen</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o42">fparse</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o43">fparsehdr</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o58">fplugin</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o54">fpoll</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o37">fpost</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o40">fposthdr</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o62">fpreparefinal</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o59">fprepareinit</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o61">fpreparerecv</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o60">fpreparesend</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o53">frecv</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o44">fresolve</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o41">fresponse</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o52">fsend</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o57">fserveloop</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o55">fseterror</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o48">fshutdownsocket</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o30">header</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o113">host</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o91">href</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o9">http_content</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o8">http_version</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o90">id</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o32">idnum</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o26">iht</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o3">imode</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o117">ip</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o72">is</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o103">keep_alive</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o83">labbuf</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o85">labidx</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o84">lablen</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o82">length</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o80">level</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o21">local_namespaces</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o132">logfile</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o69">master</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o119">max_keep_alive</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o134">mht</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o130">mime</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o2">mode</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o88">msgbuf</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o102">mustUnderstand</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o20">namespaces</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o22">nlist</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o105">ns</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o104">null</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o4">omode</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o71">os</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o96">other</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o106">part</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o36">passwd</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o112">path</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o28">pblk</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o108">peeked</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o141">peer</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o142">peerlen</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o27">pht</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o29">pidx</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o34">plugins</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o118">port</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o97">position</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o98">positions</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o116">prolog</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o120">proxy_host</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o123">proxy_passwd</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o121">proxy_port</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o122">proxy_userid</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o12">recv_timeout</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o74">recvfd</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o99">root</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o13">send_timeout</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o73">sendfd</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o70">socket</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o16">socket_flags</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o124">status</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o89">tag</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o87">tmpbuf</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o92">type</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o33">user</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o35">userid</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o0">version</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap.html#o131">xlist</a></td><td><a class="el" href="structsoap.html">soap</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap.html b/doc/dom/html/structsoap.html
new file mode 100644
index 0000000..1a4f79f
--- /dev/null
+++ b/doc/dom/html/structsoap.html
@@ -0,0 +1,3613 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: soap Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap Struct Reference</h1><code>#include &lt;stdsoap2.h&gt;</code>

+<p>

+Collaboration diagram for soap:<p><center><img src="structsoap__coll__graph.png" border="0" usemap="#soap__coll__map" alt="Collaboration graph"></center>

+<map name="soap__coll__map">

+<area href="structsoap__dom__element.html" shape="rect" coords="540,511,671,537" alt="">

+<area href="structsoap__plist.html" shape="rect" coords="19,48,91,75" alt="">

+<area href="structsoap__pblk.html" shape="rect" coords="175,111,249,137" alt="">

+<area href="structsoap__nlist.html" shape="rect" coords="176,201,248,228" alt="">

+<area href="struct_namespace.html" shape="rect" coords="171,252,253,279" alt="">

+<area href="structsoap__xlist.html" shape="rect" coords="176,343,248,369" alt="">

+<area href="structsoap__attribute.html" shape="rect" coords="165,433,259,460" alt="">

+<area href="structsoap__ilist.html" shape="rect" coords="179,524,245,551" alt="">

+<area href="structsoap__mime.html" shape="rect" coords="172,575,252,601" alt="">

+<area href="structsoap__plugin.html" shape="rect" coords="171,665,253,692" alt="">

+<area href="structsoap__cookie.html" shape="rect" coords="169,756,255,783" alt="">

+<area href="structsoap__clist.html" shape="rect" coords="176,847,248,873" alt="">

+<area href="structsoap__blist.html" shape="rect" coords="176,937,248,964" alt="">

+<area href="structsoap__dime.html" shape="rect" coords="173,988,251,1015" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structsoap-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o0">version</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o1">copy</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="stdsoap2_8h.html#a194">soap_mode</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o2">mode</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="stdsoap2_8h.html#a194">soap_mode</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o3">imode</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="stdsoap2_8h.html#a194">soap_mode</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o4">omode</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o5">float_format</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o6">double_format</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o7">dime_id_format</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o8">http_version</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o9">http_content</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o10">encodingStyle</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o11">actor</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o12">recv_timeout</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o13">send_timeout</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o14">connect_timeout</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o15">accept_timeout</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o16">socket_flags</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o17">connect_flags</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o18">bind_flags</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o19">accept_flags</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const struct <a class="el" href="struct_namespace.html">Namespace</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o20">namespaces</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct_namespace.html">Namespace</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o21">local_namespaces</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__nlist.html">soap_nlist</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o22">nlist</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__blist.html">soap_blist</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o23">blist</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__clist.html">soap_clist</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o24">clist</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o25">alist</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__ilist.html">soap_ilist</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o26">iht</a> [SOAP_IDHASH]</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__plist.html">soap_plist</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o27">pht</a> [SOAP_PTRHASH]</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__pblk.html">soap_pblk</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o28">pblk</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o29">pidx</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>SOAP_ENV__Header *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o30">header</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>SOAP_ENV__Fault *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o31">fault</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o32">idnum</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o33">user</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__plugin.html">soap_plugin</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o34">plugins</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o35">userid</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o36">passwd</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o37">fpost</a> )(struct <a class="el" href="structsoap.html">soap</a> *, const char *, const char *, int, const char *, const char *, size_t)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o38">fget</a> )(struct <a class="el" href="structsoap.html">soap</a> *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o39">fform</a> )(struct <a class="el" href="structsoap.html">soap</a> *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o40">fposthdr</a> )(struct <a class="el" href="structsoap.html">soap</a> *, const char *, const char *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o41">fresponse</a> )(struct <a class="el" href="structsoap.html">soap</a> *, int, size_t)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o42">fparse</a> )(struct <a class="el" href="structsoap.html">soap</a> *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o43">fparsehdr</a> )(struct <a class="el" href="structsoap.html">soap</a> *, const char *, const char *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o44">fresolve</a> )(struct <a class="el" href="structsoap.html">soap</a> *, const char *, struct in_addr *inaddr)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o45">fconnect</a> )(struct <a class="el" href="structsoap.html">soap</a> *, const char *, const char *, int)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o46">fdisconnect</a> )(struct <a class="el" href="structsoap.html">soap</a> *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o47">fclosesocket</a> )(struct <a class="el" href="structsoap.html">soap</a> *, SOAP_SOCKET)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o48">fshutdownsocket</a> )(struct <a class="el" href="structsoap.html">soap</a> *, SOAP_SOCKET, int)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o49">fopen</a> )(struct <a class="el" href="structsoap.html">soap</a> *, const char *, const char *, int)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o50">faccept</a> )(struct <a class="el" href="structsoap.html">soap</a> *, int, struct sockaddr *, int *n)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o51">fclose</a> )(struct <a class="el" href="structsoap.html">soap</a> *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o52">fsend</a> )(struct <a class="el" href="structsoap.html">soap</a> *, const char *, size_t)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>size_t(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o53">frecv</a> )(struct <a class="el" href="structsoap.html">soap</a> *, char *, size_t)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o54">fpoll</a> )(struct <a class="el" href="structsoap.html">soap</a> *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>void(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o55">fseterror</a> )(struct <a class="el" href="structsoap.html">soap</a> *, const char **c, const char **s)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o56">fignore</a> )(struct <a class="el" href="structsoap.html">soap</a> *, const char *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o57">fserveloop</a> )(struct <a class="el" href="structsoap.html">soap</a> *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>void *(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o58">fplugin</a> )(struct <a class="el" href="structsoap.html">soap</a> *, const char *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o59">fprepareinit</a> )(struct <a class="el" href="structsoap.html">soap</a> *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o60">fpreparesend</a> )(struct <a class="el" href="structsoap.html">soap</a> *, const char *, size_t)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o61">fpreparerecv</a> )(struct <a class="el" href="structsoap.html">soap</a> *, const char *, size_t)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o62">fpreparefinal</a> )(struct <a class="el" href="structsoap.html">soap</a> *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>void *(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o63">fdimereadopen</a> )(struct <a class="el" href="structsoap.html">soap</a> *, void *, const char *, const char *, const char *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>void *(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o64">fdimewriteopen</a> )(struct <a class="el" href="structsoap.html">soap</a> *, const char *, const char *, const char *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>void(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o65">fdimereadclose</a> )(struct <a class="el" href="structsoap.html">soap</a> *, void *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>void(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o66">fdimewriteclose</a> )(struct <a class="el" href="structsoap.html">soap</a> *, void *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>size_t(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o67">fdimeread</a> )(struct <a class="el" href="structsoap.html">soap</a> *, void *, char *, size_t)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o68">fdimewrite</a> )(struct <a class="el" href="structsoap.html">soap</a> *, void *, const char *, size_t)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o69">master</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o70">socket</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o71">os</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o72">is</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o73">sendfd</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o74">recvfd</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o75">bufidx</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o76">buflen</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="stdsoap2_8h.html#a195">soap_wchar</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o77">ahead</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o78">cdata</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o79">body</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o80">level</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o81">count</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o82">length</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o83">labbuf</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o84">lablen</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o85">labidx</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o86">buf</a> [SOAP_BUFLEN]</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o87">tmpbuf</a> [1024]</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o88">msgbuf</a> [1024]</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o89">tag</a> [SOAP_TAGLEN]</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o90">id</a> [SOAP_TAGLEN]</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o91">href</a> [SOAP_TAGLEN]</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o92">type</a> [SOAP_TAGLEN]</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o93">arrayType</a> [SOAP_TAGLEN]</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o94">arraySize</a> [SOAP_TAGLEN]</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o95">arrayOffset</a> [SOAP_TAGLEN]</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o96">other</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o97">position</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o98">positions</a> [SOAP_MAXDIMS]</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o99">root</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__attribute.html">soap_attribute</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o100">attributes</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o101">encoding</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o102">mustUnderstand</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o103">keep_alive</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o104">null</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o105">ns</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o106">part</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o107">alloced</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o108">peeked</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o109">chunksize</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o110">chunkbuflen</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o111">endpoint</a> [SOAP_TAGLEN]</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o112">path</a> [SOAP_TAGLEN]</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o113">host</a> [SOAP_TAGLEN]</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o114">action</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o115">authrealm</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o116">prolog</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned long&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o117">ip</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o118">port</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o119">max_keep_alive</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o120">proxy_host</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o121">proxy_port</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o122">proxy_userid</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o123">proxy_passwd</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o124">status</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o125">error</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o126">errmode</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o127">errnum</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o128">dom</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dime.html">soap_dime</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o129">dime</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__mime.html">soap_mime</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o130">mime</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__xlist.html">soap_xlist</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o131">xlist</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o132">logfile</a> [SOAP_MAXLOGS]</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>FILE *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o133">fdebug</a> [SOAP_MAXLOGS]</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>soap_mlist *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o134">mht</a> [SOAP_PTRHASH]</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o135">c14ninclude</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o136">c14nexclude</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__cookie.html">soap_cookie</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o137">cookies</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o138">cookie_domain</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o139">cookie_path</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o140">cookie_max</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>sockaddr_in&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o141">peer</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap.html#o142">peerlen</a></td></tr>

+

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o19" doxytag="soap::accept_flags" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap.html#o19">soap::accept_flags</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o15" doxytag="soap::accept_timeout" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap.html#o15">soap::accept_timeout</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o114" doxytag="soap::action" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structsoap.html#o114">soap::action</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o11" doxytag="soap::actor" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap.html#o11">soap::actor</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o77" doxytag="soap::ahead" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="stdsoap2_8h.html#a195">soap_wchar</a> <a class="el" href="structsoap.html#o77">soap::ahead</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o25" doxytag="soap::alist" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void* <a class="el" href="structsoap.html#o25">soap::alist</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o107" doxytag="soap::alloced" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> short <a class="el" href="structsoap.html#o107">soap::alloced</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o95" doxytag="soap::arrayOffset" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char <a class="el" href="structsoap.html#o95">soap::arrayOffset</a>[SOAP_TAGLEN]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o94" doxytag="soap::arraySize" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char <a class="el" href="structsoap.html#o94">soap::arraySize</a>[SOAP_TAGLEN]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o93" doxytag="soap::arrayType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char <a class="el" href="structsoap.html#o93">soap::arrayType</a>[SOAP_TAGLEN]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o100" doxytag="soap::attributes" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__attribute.html">soap_attribute</a>* <a class="el" href="structsoap.html#o100">soap::attributes</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o115" doxytag="soap::authrealm" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structsoap.html#o115">soap::authrealm</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o18" doxytag="soap::bind_flags" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap.html#o18">soap::bind_flags</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o23" doxytag="soap::blist" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__blist.html">soap_blist</a>* <a class="el" href="structsoap.html#o23">soap::blist</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o79" doxytag="soap::body" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> short <a class="el" href="structsoap.html#o79">soap::body</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o86" doxytag="soap::buf" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char <a class="el" href="structsoap.html#o86">soap::buf</a>[SOAP_BUFLEN]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o75" doxytag="soap::bufidx" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> size_t <a class="el" href="structsoap.html#o75">soap::bufidx</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o76" doxytag="soap::buflen" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> size_t <a class="el" href="structsoap.html#o76">soap::buflen</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o136" doxytag="soap::c14nexclude" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap.html#o136">soap::c14nexclude</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o135" doxytag="soap::c14ninclude" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap.html#o135">soap::c14ninclude</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o78" doxytag="soap::cdata" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> short <a class="el" href="structsoap.html#o78">soap::cdata</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o110" doxytag="soap::chunkbuflen" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> size_t <a class="el" href="structsoap.html#o110">soap::chunkbuflen</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o109" doxytag="soap::chunksize" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> size_t <a class="el" href="structsoap.html#o109">soap::chunksize</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o24" doxytag="soap::clist" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__clist.html">soap_clist</a>* <a class="el" href="structsoap.html#o24">soap::clist</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o17" doxytag="soap::connect_flags" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap.html#o17">soap::connect_flags</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o14" doxytag="soap::connect_timeout" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap.html#o14">soap::connect_timeout</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o138" doxytag="soap::cookie_domain" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap.html#o138">soap::cookie_domain</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o140" doxytag="soap::cookie_max" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap.html#o140">soap::cookie_max</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o139" doxytag="soap::cookie_path" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap.html#o139">soap::cookie_path</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o137" doxytag="soap::cookies" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__cookie.html">soap_cookie</a>* <a class="el" href="structsoap.html#o137">soap::cookies</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap::copy" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> short <a class="el" href="structsoap.html#o1">soap::copy</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o81" doxytag="soap::count" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> size_t <a class="el" href="structsoap.html#o81">soap::count</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o129" doxytag="soap::dime" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dime.html">soap_dime</a> <a class="el" href="structsoap.html#o129">soap::dime</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o7" doxytag="soap::dime_id_format" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap.html#o7">soap::dime_id_format</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o128" doxytag="soap::dom" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a>* <a class="el" href="structsoap.html#o128">soap::dom</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o6" doxytag="soap::double_format" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap.html#o6">soap::double_format</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o101" doxytag="soap::encoding" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> short <a class="el" href="structsoap.html#o101">soap::encoding</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o10" doxytag="soap::encodingStyle" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap.html#o10">soap::encodingStyle</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o111" doxytag="soap::endpoint" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char <a class="el" href="structsoap.html#o111">soap::endpoint</a>[SOAP_TAGLEN]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o126" doxytag="soap::errmode" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap.html#o126">soap::errmode</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o127" doxytag="soap::errnum" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap.html#o127">soap::errnum</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o125" doxytag="soap::error" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap.html#o125">soap::error</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o50" doxytag="soap::faccept" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap.html#o50">soap::faccept</a>)(struct <a class="el" href="structsoap.html">soap</a> *, int, struct sockaddr *, int *n)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o31" doxytag="soap::fault" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct SOAP_ENV__Fault* <a class="el" href="structsoap.html#o31">soap::fault</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o51" doxytag="soap::fclose" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap.html#o51">soap::fclose</a>)(struct <a class="el" href="structsoap.html">soap</a> *)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o47" doxytag="soap::fclosesocket" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap.html#o47">soap::fclosesocket</a>)(struct <a class="el" href="structsoap.html">soap</a> *, SOAP_SOCKET)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o45" doxytag="soap::fconnect" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap.html#o45">soap::fconnect</a>)(struct <a class="el" href="structsoap.html">soap</a> *, const char *, const char *, int)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o133" doxytag="soap::fdebug" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> FILE* <a class="el" href="structsoap.html#o133">soap::fdebug</a>[SOAP_MAXLOGS]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o67" doxytag="soap::fdimeread" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> size_t(* <a class="el" href="structsoap.html#o67">soap::fdimeread</a>)(struct <a class="el" href="structsoap.html">soap</a> *, void *, char *, size_t)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o65" doxytag="soap::fdimereadclose" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void(* <a class="el" href="structsoap.html#o65">soap::fdimereadclose</a>)(struct <a class="el" href="structsoap.html">soap</a> *, void *)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o63" doxytag="soap::fdimereadopen" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void*(* <a class="el" href="structsoap.html#o63">soap::fdimereadopen</a>)(struct <a class="el" href="structsoap.html">soap</a> *, void *, const char *, const char *, const char *)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o68" doxytag="soap::fdimewrite" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap.html#o68">soap::fdimewrite</a>)(struct <a class="el" href="structsoap.html">soap</a> *, void *, const char *, size_t)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o66" doxytag="soap::fdimewriteclose" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void(* <a class="el" href="structsoap.html#o66">soap::fdimewriteclose</a>)(struct <a class="el" href="structsoap.html">soap</a> *, void *)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o64" doxytag="soap::fdimewriteopen" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void*(* <a class="el" href="structsoap.html#o64">soap::fdimewriteopen</a>)(struct <a class="el" href="structsoap.html">soap</a> *, const char *, const char *, const char *)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o46" doxytag="soap::fdisconnect" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap.html#o46">soap::fdisconnect</a>)(struct <a class="el" href="structsoap.html">soap</a> *)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o39" doxytag="soap::fform" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap.html#o39">soap::fform</a>)(struct <a class="el" href="structsoap.html">soap</a> *)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o38" doxytag="soap::fget" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap.html#o38">soap::fget</a>)(struct <a class="el" href="structsoap.html">soap</a> *)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o56" doxytag="soap::fignore" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap.html#o56">soap::fignore</a>)(struct <a class="el" href="structsoap.html">soap</a> *, const char *)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="soap::float_format" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap.html#o5">soap::float_format</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o49" doxytag="soap::fopen" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap.html#o49">soap::fopen</a>)(struct <a class="el" href="structsoap.html">soap</a> *, const char *, const char *, int)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o42" doxytag="soap::fparse" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap.html#o42">soap::fparse</a>)(struct <a class="el" href="structsoap.html">soap</a> *)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o43" doxytag="soap::fparsehdr" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap.html#o43">soap::fparsehdr</a>)(struct <a class="el" href="structsoap.html">soap</a> *, const char *, const char *)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o58" doxytag="soap::fplugin" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void*(* <a class="el" href="structsoap.html#o58">soap::fplugin</a>)(struct <a class="el" href="structsoap.html">soap</a> *, const char *)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o54" doxytag="soap::fpoll" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap.html#o54">soap::fpoll</a>)(struct <a class="el" href="structsoap.html">soap</a> *)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o37" doxytag="soap::fpost" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap.html#o37">soap::fpost</a>)(struct <a class="el" href="structsoap.html">soap</a> *, const char *, const char *, int, const char *, const char *, size_t)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o40" doxytag="soap::fposthdr" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap.html#o40">soap::fposthdr</a>)(struct <a class="el" href="structsoap.html">soap</a> *, const char *, const char *)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o62" doxytag="soap::fpreparefinal" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap.html#o62">soap::fpreparefinal</a>)(struct <a class="el" href="structsoap.html">soap</a> *)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o59" doxytag="soap::fprepareinit" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap.html#o59">soap::fprepareinit</a>)(struct <a class="el" href="structsoap.html">soap</a> *)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o61" doxytag="soap::fpreparerecv" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap.html#o61">soap::fpreparerecv</a>)(struct <a class="el" href="structsoap.html">soap</a> *, const char *, size_t)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o60" doxytag="soap::fpreparesend" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap.html#o60">soap::fpreparesend</a>)(struct <a class="el" href="structsoap.html">soap</a> *, const char *, size_t)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o53" doxytag="soap::frecv" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> size_t(* <a class="el" href="structsoap.html#o53">soap::frecv</a>)(struct <a class="el" href="structsoap.html">soap</a> *, char *, size_t)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o44" doxytag="soap::fresolve" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap.html#o44">soap::fresolve</a>)(struct <a class="el" href="structsoap.html">soap</a> *, const char *, struct in_addr *inaddr)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o41" doxytag="soap::fresponse" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap.html#o41">soap::fresponse</a>)(struct <a class="el" href="structsoap.html">soap</a> *, int, size_t)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o52" doxytag="soap::fsend" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap.html#o52">soap::fsend</a>)(struct <a class="el" href="structsoap.html">soap</a> *, const char *, size_t)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o57" doxytag="soap::fserveloop" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap.html#o57">soap::fserveloop</a>)(struct <a class="el" href="structsoap.html">soap</a> *)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o55" doxytag="soap::fseterror" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void(* <a class="el" href="structsoap.html#o55">soap::fseterror</a>)(struct <a class="el" href="structsoap.html">soap</a> *, const char **c, const char **s)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o48" doxytag="soap::fshutdownsocket" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap.html#o48">soap::fshutdownsocket</a>)(struct <a class="el" href="structsoap.html">soap</a> *, SOAP_SOCKET, int)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o30" doxytag="soap::header" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct SOAP_ENV__Header* <a class="el" href="structsoap.html#o30">soap::header</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o113" doxytag="soap::host" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char <a class="el" href="structsoap.html#o113">soap::host</a>[SOAP_TAGLEN]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o91" doxytag="soap::href" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char <a class="el" href="structsoap.html#o91">soap::href</a>[SOAP_TAGLEN]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o9" doxytag="soap::http_content" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap.html#o9">soap::http_content</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o8" doxytag="soap::http_version" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap.html#o8">soap::http_version</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o90" doxytag="soap::id" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char <a class="el" href="structsoap.html#o90">soap::id</a>[SOAP_TAGLEN]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o32" doxytag="soap::idnum" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap.html#o32">soap::idnum</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o26" doxytag="soap::iht" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__ilist.html">soap_ilist</a>* <a class="el" href="structsoap.html#o26">soap::iht</a>[SOAP_IDHASH]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="soap::imode" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="stdsoap2_8h.html#a194">soap_mode</a> <a class="el" href="structsoap.html#o3">soap::imode</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o117" doxytag="soap::ip" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> unsigned long <a class="el" href="structsoap.html#o117">soap::ip</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o72" doxytag="soap::is" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void* <a class="el" href="structsoap.html#o72">soap::is</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o103" doxytag="soap::keep_alive" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> short <a class="el" href="structsoap.html#o103">soap::keep_alive</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o83" doxytag="soap::labbuf" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structsoap.html#o83">soap::labbuf</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o85" doxytag="soap::labidx" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> size_t <a class="el" href="structsoap.html#o85">soap::labidx</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o84" doxytag="soap::lablen" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> size_t <a class="el" href="structsoap.html#o84">soap::lablen</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o82" doxytag="soap::length" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> size_t <a class="el" href="structsoap.html#o82">soap::length</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o80" doxytag="soap::level" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> unsigned int <a class="el" href="structsoap.html#o80">soap::level</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o21" doxytag="soap::local_namespaces" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="struct_namespace.html">Namespace</a>* <a class="el" href="structsoap.html#o21">soap::local_namespaces</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o132" doxytag="soap::logfile" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap.html#o132">soap::logfile</a>[SOAP_MAXLOGS]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o69" doxytag="soap::master" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap.html#o69">soap::master</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o119" doxytag="soap::max_keep_alive" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> unsigned int <a class="el" href="structsoap.html#o119">soap::max_keep_alive</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o134" doxytag="soap::mht" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct soap_mlist* <a class="el" href="structsoap.html#o134">soap::mht</a>[SOAP_PTRHASH]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o130" doxytag="soap::mime" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__mime.html">soap_mime</a> <a class="el" href="structsoap.html#o130">soap::mime</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="soap::mode" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="stdsoap2_8h.html#a194">soap_mode</a> <a class="el" href="structsoap.html#o2">soap::mode</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o88" doxytag="soap::msgbuf" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char <a class="el" href="structsoap.html#o88">soap::msgbuf</a>[1024]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o102" doxytag="soap::mustUnderstand" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> short <a class="el" href="structsoap.html#o102">soap::mustUnderstand</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o20" doxytag="soap::namespaces" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const struct <a class="el" href="struct_namespace.html">Namespace</a>* <a class="el" href="structsoap.html#o20">soap::namespaces</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o22" doxytag="soap::nlist" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__nlist.html">soap_nlist</a>* <a class="el" href="structsoap.html#o22">soap::nlist</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o105" doxytag="soap::ns" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> short <a class="el" href="structsoap.html#o105">soap::ns</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o104" doxytag="soap::null" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> short <a class="el" href="structsoap.html#o104">soap::null</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="soap::omode" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="stdsoap2_8h.html#a194">soap_mode</a> <a class="el" href="structsoap.html#o4">soap::omode</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o71" doxytag="soap::os" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void* <a class="el" href="structsoap.html#o71">soap::os</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o96" doxytag="soap::other" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> short <a class="el" href="structsoap.html#o96">soap::other</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o106" doxytag="soap::part" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> short <a class="el" href="structsoap.html#o106">soap::part</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o36" doxytag="soap::passwd" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structsoap.html#o36">soap::passwd</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o112" doxytag="soap::path" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char <a class="el" href="structsoap.html#o112">soap::path</a>[SOAP_TAGLEN]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o28" doxytag="soap::pblk" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__pblk.html">soap_pblk</a>* <a class="el" href="structsoap.html#o28">soap::pblk</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o108" doxytag="soap::peeked" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> short <a class="el" href="structsoap.html#o108">soap::peeked</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o141" doxytag="soap::peer" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct sockaddr_in <a class="el" href="structsoap.html#o141">soap::peer</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o142" doxytag="soap::peerlen" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> size_t <a class="el" href="structsoap.html#o142">soap::peerlen</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o27" doxytag="soap::pht" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__plist.html">soap_plist</a>* <a class="el" href="structsoap.html#o27">soap::pht</a>[SOAP_PTRHASH]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o29" doxytag="soap::pidx" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> short <a class="el" href="structsoap.html#o29">soap::pidx</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o34" doxytag="soap::plugins" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__plugin.html">soap_plugin</a>* <a class="el" href="structsoap.html#o34">soap::plugins</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o118" doxytag="soap::port" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap.html#o118">soap::port</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o97" doxytag="soap::position" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> short <a class="el" href="structsoap.html#o97">soap::position</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o98" doxytag="soap::positions" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap.html#o98">soap::positions</a>[SOAP_MAXDIMS]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o116" doxytag="soap::prolog" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structsoap.html#o116">soap::prolog</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o120" doxytag="soap::proxy_host" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap.html#o120">soap::proxy_host</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o123" doxytag="soap::proxy_passwd" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap.html#o123">soap::proxy_passwd</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o121" doxytag="soap::proxy_port" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap.html#o121">soap::proxy_port</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o122" doxytag="soap::proxy_userid" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap.html#o122">soap::proxy_userid</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o12" doxytag="soap::recv_timeout" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap.html#o12">soap::recv_timeout</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o74" doxytag="soap::recvfd" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap.html#o74">soap::recvfd</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o99" doxytag="soap::root" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> short <a class="el" href="structsoap.html#o99">soap::root</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o13" doxytag="soap::send_timeout" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap.html#o13">soap::send_timeout</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o73" doxytag="soap::sendfd" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap.html#o73">soap::sendfd</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o70" doxytag="soap::socket" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap.html#o70">soap::socket</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o16" doxytag="soap::socket_flags" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap.html#o16">soap::socket_flags</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o124" doxytag="soap::status" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap.html#o124">soap::status</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o89" doxytag="soap::tag" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char <a class="el" href="structsoap.html#o89">soap::tag</a>[SOAP_TAGLEN]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o87" doxytag="soap::tmpbuf" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char <a class="el" href="structsoap.html#o87">soap::tmpbuf</a>[1024]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o92" doxytag="soap::type" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char <a class="el" href="structsoap.html#o92">soap::type</a>[SOAP_TAGLEN]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o33" doxytag="soap::user" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void* <a class="el" href="structsoap.html#o33">soap::user</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o35" doxytag="soap::userid" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structsoap.html#o35">soap::userid</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="soap::version" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> short <a class="el" href="structsoap.html#o0">soap::version</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o131" doxytag="soap::xlist" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__xlist.html">soap_xlist</a>* <a class="el" href="structsoap.html#o131">soap::xlist</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__array-members.html b/doc/dom/html/structsoap__array-members.html
new file mode 100644
index 0000000..206d17c
--- /dev/null
+++ b/doc/dom/html/structsoap__array-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_array Member List</h1>This is the complete list of members for <a class="el" href="structsoap__array.html">soap_array</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structsoap__array.html#o0">__ptr</a></td><td><a class="el" href="structsoap__array.html">soap_array</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__array.html#o1">__size</a></td><td><a class="el" href="structsoap__array.html">soap_array</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__array.html b/doc/dom/html/structsoap__array.html
new file mode 100644
index 0000000..6b368c6
--- /dev/null
+++ b/doc/dom/html/structsoap__array.html
@@ -0,0 +1,71 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: soap_array Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_array Struct Reference</h1><code>#include &lt;stdsoap2.h&gt;</code>

+<p>

+<a href="structsoap__array-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__array.html#o0">__ptr</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__array.html#o1">__size</a></td></tr>

+

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="soap_array::__ptr" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void* <a class="el" href="structsoap__array.html#o0">soap_array::__ptr</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_array::__size" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap__array.html#o1">soap_array::__size</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__attribute-members.html b/doc/dom/html/structsoap__attribute-members.html
new file mode 100644
index 0000000..1ccd089
--- /dev/null
+++ b/doc/dom/html/structsoap__attribute-members.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_attribute Member List</h1>This is the complete list of members for <a class="el" href="structsoap__attribute.html">soap_attribute</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structsoap__attribute.html#o5">name</a></td><td><a class="el" href="structsoap__attribute.html">soap_attribute</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__attribute.html#o0">next</a></td><td><a class="el" href="structsoap__attribute.html">soap_attribute</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__attribute.html#o3">ns</a></td><td><a class="el" href="structsoap__attribute.html">soap_attribute</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__attribute.html#o2">size</a></td><td><a class="el" href="structsoap__attribute.html">soap_attribute</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__attribute.html#o1">value</a></td><td><a class="el" href="structsoap__attribute.html">soap_attribute</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__attribute.html#o4">visible</a></td><td><a class="el" href="structsoap__attribute.html">soap_attribute</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__attribute.html b/doc/dom/html/structsoap__attribute.html
new file mode 100644
index 0000000..196a232
--- /dev/null
+++ b/doc/dom/html/structsoap__attribute.html
@@ -0,0 +1,172 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: soap_attribute Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_attribute Struct Reference</h1><code>#include &lt;stdsoap2.h&gt;</code>

+<p>

+Collaboration diagram for soap_attribute:<p><center><img src="structsoap__attribute__coll__graph.png" border="0" usemap="#soap__attribute__coll__map" alt="Collaboration graph"></center>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structsoap__attribute-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__attribute.html">soap_attribute</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__attribute.html#o0">next</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__attribute.html#o1">value</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__attribute.html#o2">size</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__attribute.html#o3">ns</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__attribute.html#o4">visible</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__attribute.html#o5">name</a> [1]</td></tr>

+

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o5" doxytag="soap_attribute::name" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char <a class="el" href="structsoap__attribute.html#o5">soap_attribute::name</a>[1]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="soap_attribute::next" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__attribute.html">soap_attribute</a>* <a class="el" href="structsoap__attribute.html#o0">soap_attribute::next</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="soap_attribute::ns" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structsoap__attribute.html#o3">soap_attribute::ns</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="soap_attribute::size" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> size_t <a class="el" href="structsoap__attribute.html#o2">soap_attribute::size</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_attribute::value" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structsoap__attribute.html#o1">soap_attribute::value</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="soap_attribute::visible" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> short <a class="el" href="structsoap__attribute.html#o4">soap_attribute::visible</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__attribute__coll__graph.map b/doc/dom/html/structsoap__attribute__coll__graph.map
new file mode 100644
index 0000000..5a14779
--- /dev/null
+++ b/doc/dom/html/structsoap__attribute__coll__graph.map
@@ -0,0 +1 @@
+base referer
diff --git a/doc/dom/html/structsoap__attribute__coll__graph.md5 b/doc/dom/html/structsoap__attribute__coll__graph.md5
new file mode 100644
index 0000000..33f7c83
--- /dev/null
+++ b/doc/dom/html/structsoap__attribute__coll__graph.md5
@@ -0,0 +1 @@
+ac326373e38975f9b6bd691567834ceb
\ No newline at end of file
diff --git a/doc/dom/html/structsoap__attribute__coll__graph.png b/doc/dom/html/structsoap__attribute__coll__graph.png
new file mode 100644
index 0000000..46d8ce7
--- /dev/null
+++ b/doc/dom/html/structsoap__attribute__coll__graph.png
Binary files differ
diff --git a/doc/dom/html/structsoap__blist-members.html b/doc/dom/html/structsoap__blist-members.html
new file mode 100644
index 0000000..c6756b8
--- /dev/null
+++ b/doc/dom/html/structsoap__blist-members.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_blist Member List</h1>This is the complete list of members for <a class="el" href="structsoap__blist.html">soap_blist</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structsoap__blist.html#o0">next</a></td><td><a class="el" href="structsoap__blist.html">soap_blist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__blist.html#o1">ptr</a></td><td><a class="el" href="structsoap__blist.html">soap_blist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__blist.html#o2">size</a></td><td><a class="el" href="structsoap__blist.html">soap_blist</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__blist.html b/doc/dom/html/structsoap__blist.html
new file mode 100644
index 0000000..bf1d790
--- /dev/null
+++ b/doc/dom/html/structsoap__blist.html
@@ -0,0 +1,97 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: soap_blist Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_blist Struct Reference</h1><code>#include &lt;stdsoap2.h&gt;</code>

+<p>

+Collaboration diagram for soap_blist:<p><center><img src="structsoap__blist__coll__graph.png" border="0" usemap="#soap__blist__coll__map" alt="Collaboration graph"></center>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structsoap__blist-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__blist.html">soap_blist</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__blist.html#o0">next</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__blist.html#o1">ptr</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__blist.html#o2">size</a></td></tr>

+

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="soap_blist::next" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__blist.html">soap_blist</a>* <a class="el" href="structsoap__blist.html#o0">soap_blist::next</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_blist::ptr" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structsoap__blist.html#o1">soap_blist::ptr</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="soap_blist::size" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> size_t <a class="el" href="structsoap__blist.html#o2">soap_blist::size</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__blist__coll__graph.map b/doc/dom/html/structsoap__blist__coll__graph.map
new file mode 100644
index 0000000..5a14779
--- /dev/null
+++ b/doc/dom/html/structsoap__blist__coll__graph.map
@@ -0,0 +1 @@
+base referer
diff --git a/doc/dom/html/structsoap__blist__coll__graph.md5 b/doc/dom/html/structsoap__blist__coll__graph.md5
new file mode 100644
index 0000000..bf52387
--- /dev/null
+++ b/doc/dom/html/structsoap__blist__coll__graph.md5
@@ -0,0 +1 @@
+5baf3a133ae93c251fb38253757105df
\ No newline at end of file
diff --git a/doc/dom/html/structsoap__blist__coll__graph.png b/doc/dom/html/structsoap__blist__coll__graph.png
new file mode 100644
index 0000000..6f73dc4
--- /dev/null
+++ b/doc/dom/html/structsoap__blist__coll__graph.png
Binary files differ
diff --git a/doc/dom/html/structsoap__clist-members.html b/doc/dom/html/structsoap__clist-members.html
new file mode 100644
index 0000000..2e7f658
--- /dev/null
+++ b/doc/dom/html/structsoap__clist-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_clist Member List</h1>This is the complete list of members for <a class="el" href="structsoap__clist.html">soap_clist</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structsoap__clist.html#o4">fdelete</a></td><td><a class="el" href="structsoap__clist.html">soap_clist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__clist.html#o0">next</a></td><td><a class="el" href="structsoap__clist.html">soap_clist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__clist.html#o1">ptr</a></td><td><a class="el" href="structsoap__clist.html">soap_clist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__clist.html#o3">size</a></td><td><a class="el" href="structsoap__clist.html">soap_clist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__clist.html#o2">type</a></td><td><a class="el" href="structsoap__clist.html">soap_clist</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__clist.html b/doc/dom/html/structsoap__clist.html
new file mode 100644
index 0000000..64416f5
--- /dev/null
+++ b/doc/dom/html/structsoap__clist.html
@@ -0,0 +1,147 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: soap_clist Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_clist Struct Reference</h1><code>#include &lt;stdsoap2.h&gt;</code>

+<p>

+Collaboration diagram for soap_clist:<p><center><img src="structsoap__clist__coll__graph.png" border="0" usemap="#soap__clist__coll__map" alt="Collaboration graph"></center>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structsoap__clist-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__clist.html">soap_clist</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__clist.html#o0">next</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__clist.html#o1">ptr</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__clist.html#o2">type</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__clist.html#o3">size</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>void(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__clist.html#o4">fdelete</a> )(struct <a class="el" href="structsoap__clist.html">soap_clist</a> *)</td></tr>

+

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o4" doxytag="soap_clist::fdelete" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void(* <a class="el" href="structsoap__clist.html#o4">soap_clist::fdelete</a>)(struct <a class="el" href="structsoap__clist.html">soap_clist</a> *)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="soap_clist::next" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__clist.html">soap_clist</a>* <a class="el" href="structsoap__clist.html#o0">soap_clist::next</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_clist::ptr" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void* <a class="el" href="structsoap__clist.html#o1">soap_clist::ptr</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="soap_clist::size" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap__clist.html#o3">soap_clist::size</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="soap_clist::type" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap__clist.html#o2">soap_clist::type</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__clist__coll__graph.map b/doc/dom/html/structsoap__clist__coll__graph.map
new file mode 100644
index 0000000..5a14779
--- /dev/null
+++ b/doc/dom/html/structsoap__clist__coll__graph.map
@@ -0,0 +1 @@
+base referer
diff --git a/doc/dom/html/structsoap__clist__coll__graph.md5 b/doc/dom/html/structsoap__clist__coll__graph.md5
new file mode 100644
index 0000000..9c39d21
--- /dev/null
+++ b/doc/dom/html/structsoap__clist__coll__graph.md5
@@ -0,0 +1 @@
+4f4a74599a88b921c31c54491484344b
\ No newline at end of file
diff --git a/doc/dom/html/structsoap__clist__coll__graph.png b/doc/dom/html/structsoap__clist__coll__graph.png
new file mode 100644
index 0000000..e6c654d
--- /dev/null
+++ b/doc/dom/html/structsoap__clist__coll__graph.png
Binary files differ
diff --git a/doc/dom/html/structsoap__code__map-members.html b/doc/dom/html/structsoap__code__map-members.html
new file mode 100644
index 0000000..153f66c
--- /dev/null
+++ b/doc/dom/html/structsoap__code__map-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_code_map Member List</h1>This is the complete list of members for <a class="el" href="structsoap__code__map.html">soap_code_map</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structsoap__code__map.html#o0">code</a></td><td><a class="el" href="structsoap__code__map.html">soap_code_map</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__code__map.html#o1">string</a></td><td><a class="el" href="structsoap__code__map.html">soap_code_map</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__code__map.html b/doc/dom/html/structsoap__code__map.html
new file mode 100644
index 0000000..f4021d0
--- /dev/null
+++ b/doc/dom/html/structsoap__code__map.html
@@ -0,0 +1,71 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: soap_code_map Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_code_map Struct Reference</h1><code>#include &lt;stdsoap2.h&gt;</code>

+<p>

+<a href="structsoap__code__map-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>long&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__code__map.html#o0">code</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__code__map.html#o1">string</a></td></tr>

+

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="soap_code_map::code" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> long <a class="el" href="structsoap__code__map.html#o0">soap_code_map::code</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_code_map::string" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap__code__map.html#o1">soap_code_map::string</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__coll__graph.map b/doc/dom/html/structsoap__coll__graph.map
new file mode 100644
index 0000000..9206f82
--- /dev/null
+++ b/doc/dom/html/structsoap__coll__graph.map
@@ -0,0 +1,15 @@
+base referer
+rect $structsoap__dom__element.html 540,511 671,537
+rect $structsoap__plist.html 19,48 91,75
+rect $structsoap__pblk.html 175,111 249,137
+rect $structsoap__nlist.html 176,201 248,228
+rect $struct_namespace.html 171,252 253,279
+rect $structsoap__xlist.html 176,343 248,369
+rect $structsoap__attribute.html 165,433 259,460
+rect $structsoap__ilist.html 179,524 245,551
+rect $structsoap__mime.html 172,575 252,601
+rect $structsoap__plugin.html 171,665 253,692
+rect $structsoap__cookie.html 169,756 255,783
+rect $structsoap__clist.html 176,847 248,873
+rect $structsoap__blist.html 176,937 248,964
+rect $structsoap__dime.html 173,988 251,1015
diff --git a/doc/dom/html/structsoap__coll__graph.md5 b/doc/dom/html/structsoap__coll__graph.md5
new file mode 100644
index 0000000..bda704c
--- /dev/null
+++ b/doc/dom/html/structsoap__coll__graph.md5
@@ -0,0 +1 @@
+366186b2ba449d48c1c83fcdf8099e41
\ No newline at end of file
diff --git a/doc/dom/html/structsoap__coll__graph.png b/doc/dom/html/structsoap__coll__graph.png
new file mode 100644
index 0000000..11a321d
--- /dev/null
+++ b/doc/dom/html/structsoap__coll__graph.png
Binary files differ
diff --git a/doc/dom/html/structsoap__cookie-members.html b/doc/dom/html/structsoap__cookie-members.html
new file mode 100644
index 0000000..6983c19
--- /dev/null
+++ b/doc/dom/html/structsoap__cookie-members.html
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_cookie Member List</h1>This is the complete list of members for <a class="el" href="structsoap__cookie.html">soap_cookie</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structsoap__cookie.html#o3">domain</a></td><td><a class="el" href="structsoap__cookie.html">soap_cookie</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__cookie.html#o9">env</a></td><td><a class="el" href="structsoap__cookie.html">soap_cookie</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__cookie.html#o5">expire</a></td><td><a class="el" href="structsoap__cookie.html">soap_cookie</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__cookie.html#o10">modified</a></td><td><a class="el" href="structsoap__cookie.html">soap_cookie</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__cookie.html#o1">name</a></td><td><a class="el" href="structsoap__cookie.html">soap_cookie</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__cookie.html#o0">next</a></td><td><a class="el" href="structsoap__cookie.html">soap_cookie</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__cookie.html#o4">path</a></td><td><a class="el" href="structsoap__cookie.html">soap_cookie</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__cookie.html#o7">secure</a></td><td><a class="el" href="structsoap__cookie.html">soap_cookie</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__cookie.html#o8">session</a></td><td><a class="el" href="structsoap__cookie.html">soap_cookie</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__cookie.html#o2">value</a></td><td><a class="el" href="structsoap__cookie.html">soap_cookie</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__cookie.html#o6">version</a></td><td><a class="el" href="structsoap__cookie.html">soap_cookie</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__cookie.html b/doc/dom/html/structsoap__cookie.html
new file mode 100644
index 0000000..75693e2
--- /dev/null
+++ b/doc/dom/html/structsoap__cookie.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: soap_cookie Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_cookie Struct Reference</h1><code>#include &lt;stdsoap2.h&gt;</code>

+<p>

+Collaboration diagram for soap_cookie:<p><center><img src="structsoap__cookie__coll__graph.png" border="0" usemap="#soap__cookie__coll__map" alt="Collaboration graph"></center>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structsoap__cookie-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__cookie.html">soap_cookie</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__cookie.html#o0">next</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__cookie.html#o1">name</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__cookie.html#o2">value</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__cookie.html#o3">domain</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__cookie.html#o4">path</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>long&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__cookie.html#o5">expire</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__cookie.html#o6">version</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__cookie.html#o7">secure</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__cookie.html#o8">session</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__cookie.html#o9">env</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__cookie.html#o10">modified</a></td></tr>

+

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o3" doxytag="soap_cookie::domain" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structsoap__cookie.html#o3">soap_cookie::domain</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o9" doxytag="soap_cookie::env" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> short <a class="el" href="structsoap__cookie.html#o9">soap_cookie::env</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="soap_cookie::expire" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> long <a class="el" href="structsoap__cookie.html#o5">soap_cookie::expire</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o10" doxytag="soap_cookie::modified" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> short <a class="el" href="structsoap__cookie.html#o10">soap_cookie::modified</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_cookie::name" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structsoap__cookie.html#o1">soap_cookie::name</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="soap_cookie::next" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__cookie.html">soap_cookie</a>* <a class="el" href="structsoap__cookie.html#o0">soap_cookie::next</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="soap_cookie::path" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structsoap__cookie.html#o4">soap_cookie::path</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o7" doxytag="soap_cookie::secure" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> short <a class="el" href="structsoap__cookie.html#o7">soap_cookie::secure</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o8" doxytag="soap_cookie::session" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> short <a class="el" href="structsoap__cookie.html#o8">soap_cookie::session</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="soap_cookie::value" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structsoap__cookie.html#o2">soap_cookie::value</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o6" doxytag="soap_cookie::version" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> unsigned int <a class="el" href="structsoap__cookie.html#o6">soap_cookie::version</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__cookie__coll__graph.map b/doc/dom/html/structsoap__cookie__coll__graph.map
new file mode 100644
index 0000000..5a14779
--- /dev/null
+++ b/doc/dom/html/structsoap__cookie__coll__graph.map
@@ -0,0 +1 @@
+base referer
diff --git a/doc/dom/html/structsoap__cookie__coll__graph.md5 b/doc/dom/html/structsoap__cookie__coll__graph.md5
new file mode 100644
index 0000000..786f9f3
--- /dev/null
+++ b/doc/dom/html/structsoap__cookie__coll__graph.md5
@@ -0,0 +1 @@
+84f50629195b91b57c62f45295902332
\ No newline at end of file
diff --git a/doc/dom/html/structsoap__cookie__coll__graph.png b/doc/dom/html/structsoap__cookie__coll__graph.png
new file mode 100644
index 0000000..a6c9154
--- /dev/null
+++ b/doc/dom/html/structsoap__cookie__coll__graph.png
Binary files differ
diff --git a/doc/dom/html/structsoap__dime-members.html b/doc/dom/html/structsoap__dime-members.html
new file mode 100644
index 0000000..fd23297
--- /dev/null
+++ b/doc/dom/html/structsoap__dime-members.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_dime Member List</h1>This is the complete list of members for <a class="el" href="structsoap__dime.html">soap_dime</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structsoap__dime.html#o3">buflen</a></td><td><a class="el" href="structsoap__dime.html">soap_dime</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dime.html#o2">chunksize</a></td><td><a class="el" href="structsoap__dime.html">soap_dime</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dime.html#o0">count</a></td><td><a class="el" href="structsoap__dime.html">soap_dime</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dime.html#o10">first</a></td><td><a class="el" href="structsoap__dime.html">soap_dime</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dime.html#o4">flags</a></td><td><a class="el" href="structsoap__dime.html">soap_dime</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dime.html#o6">id</a></td><td><a class="el" href="structsoap__dime.html">soap_dime</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dime.html#o11">last</a></td><td><a class="el" href="structsoap__dime.html">soap_dime</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dime.html#o9">list</a></td><td><a class="el" href="structsoap__dime.html">soap_dime</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dime.html#o8">options</a></td><td><a class="el" href="structsoap__dime.html">soap_dime</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dime.html#o5">ptr</a></td><td><a class="el" href="structsoap__dime.html">soap_dime</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dime.html#o1">size</a></td><td><a class="el" href="structsoap__dime.html">soap_dime</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dime.html#o7">type</a></td><td><a class="el" href="structsoap__dime.html">soap_dime</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__dime.html b/doc/dom/html/structsoap__dime.html
new file mode 100644
index 0000000..77b8628
--- /dev/null
+++ b/doc/dom/html/structsoap__dime.html
@@ -0,0 +1,325 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: soap_dime Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_dime Struct Reference</h1><code>#include &lt;stdsoap2.h&gt;</code>

+<p>

+Collaboration diagram for soap_dime:<p><center><img src="structsoap__dime__coll__graph.png" border="0" usemap="#soap__dime__coll__map" alt="Collaboration graph"></center>

+<map name="soap__dime__coll__map">

+<area href="structsoap__multipart.html" shape="rect" coords="7,17,105,44" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structsoap__dime-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dime.html#o0">count</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dime.html#o1">size</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dime.html#o2">chunksize</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dime.html#o3">buflen</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dime.html#o4">flags</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dime.html#o5">ptr</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dime.html#o6">id</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dime.html#o7">type</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dime.html#o8">options</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__multipart.html">soap_multipart</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dime.html#o9">list</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__multipart.html">soap_multipart</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dime.html#o10">first</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__multipart.html">soap_multipart</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dime.html#o11">last</a></td></tr>

+

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o3" doxytag="soap_dime::buflen" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> size_t <a class="el" href="structsoap__dime.html#o3">soap_dime::buflen</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="soap_dime::chunksize" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> size_t <a class="el" href="structsoap__dime.html#o2">soap_dime::chunksize</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="soap_dime::count" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> size_t <a class="el" href="structsoap__dime.html#o0">soap_dime::count</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o10" doxytag="soap_dime::first" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__multipart.html">soap_multipart</a>* <a class="el" href="structsoap__dime.html#o10">soap_dime::first</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="soap_dime::flags" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char <a class="el" href="structsoap__dime.html#o4">soap_dime::flags</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o6" doxytag="soap_dime::id" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap__dime.html#o6">soap_dime::id</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o11" doxytag="soap_dime::last" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__multipart.html">soap_multipart</a> * <a class="el" href="structsoap__dime.html#o11">soap_dime::last</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o9" doxytag="soap_dime::list" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__multipart.html">soap_multipart</a>* <a class="el" href="structsoap__dime.html#o9">soap_dime::list</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o8" doxytag="soap_dime::options" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap__dime.html#o8">soap_dime::options</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="soap_dime::ptr" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structsoap__dime.html#o5">soap_dime::ptr</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_dime::size" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> size_t <a class="el" href="structsoap__dime.html#o1">soap_dime::size</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o7" doxytag="soap_dime::type" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap__dime.html#o7">soap_dime::type</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__dime__coll__graph.map b/doc/dom/html/structsoap__dime__coll__graph.map
new file mode 100644
index 0000000..b90318b
--- /dev/null
+++ b/doc/dom/html/structsoap__dime__coll__graph.map
@@ -0,0 +1,2 @@
+base referer
+rect $structsoap__multipart.html 7,17 105,44
diff --git a/doc/dom/html/structsoap__dime__coll__graph.md5 b/doc/dom/html/structsoap__dime__coll__graph.md5
new file mode 100644
index 0000000..eee0182
--- /dev/null
+++ b/doc/dom/html/structsoap__dime__coll__graph.md5
@@ -0,0 +1 @@
+85a27f3301b1f05b6475f25f6c4486af
\ No newline at end of file
diff --git a/doc/dom/html/structsoap__dime__coll__graph.png b/doc/dom/html/structsoap__dime__coll__graph.png
new file mode 100644
index 0000000..fbfe643
--- /dev/null
+++ b/doc/dom/html/structsoap__dime__coll__graph.png
Binary files differ
diff --git a/doc/dom/html/structsoap__dom__attribute-members.html b/doc/dom/html/structsoap__dom__attribute-members.html
new file mode 100644
index 0000000..3e38288
--- /dev/null
+++ b/doc/dom/html/structsoap__dom__attribute-members.html
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_dom_attribute Member List</h1>This is the complete list of members for <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__attribute.html#a2">begin</a>()</td><td><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__attribute.html#o3">data</a></td><td><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__attribute.html#a3">end</a>()</td><td><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__attribute.html#a4">find</a>(const char *nstr, const char *name)</td><td><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__attribute.html#w0">iterator</a> typedef</td><td><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__attribute.html#o2">name</a></td><td><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__attribute.html#o0">next</a></td><td><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__attribute.html#o1">nstr</a></td><td><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__attribute.html#a0">set</a>(const char *nstr, const char *name)</td><td><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__attribute.html#a1">set</a>(const char *data)</td><td><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__attribute.html#o5">soap</a></td><td><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__attribute.html#a6">soap_dom_attribute</a>()</td><td><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__attribute.html#a7">soap_dom_attribute</a>(struct soap *soap)</td><td><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__attribute.html#a8">soap_dom_attribute</a>(struct soap *soap, const char *nstr, const char *name, const char *data)</td><td><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__attribute.html#a5">unlink</a>()</td><td><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__attribute.html#o4">wide</a></td><td><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__attribute.html#a9">~soap_dom_attribute</a>()</td><td><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Sat Aug 20 12:24:36 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__dom__attribute.html b/doc/dom/html/structsoap__dom__attribute.html
new file mode 100644
index 0000000..0808ca0
--- /dev/null
+++ b/doc/dom/html/structsoap__dom__attribute.html
@@ -0,0 +1,536 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: soap_dom_attribute Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_dom_attribute Struct Reference</h1><code>#include &lt;stdsoap2.h&gt;</code>

+<p>

+Collaboration diagram for soap_dom_attribute:<p><center><img src="structsoap__dom__attribute__coll__graph.png" border="0" usemap="#soap__dom__attribute__coll__map" alt="Collaboration graph"></center>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structsoap__dom__attribute-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Types</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__attribute.html#w0">iterator</a></td></tr>

+

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__attribute.html#a0">set</a> (const char *<a class="el" href="structsoap__dom__attribute.html#o1">nstr</a>, const char *<a class="el" href="structsoap__dom__attribute.html#o2">name</a>)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__attribute.html#a1">set</a> (const char *<a class="el" href="structsoap__dom__attribute.html#o3">data</a>)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__attribute.html#a2">begin</a> ()</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__attribute.html#a3">end</a> ()</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__attribute.html#a4">find</a> (const char *<a class="el" href="structsoap__dom__attribute.html#o1">nstr</a>, const char *<a class="el" href="structsoap__dom__attribute.html#o2">name</a>)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__attribute.html#a5">unlink</a> ()</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__attribute.html#a6">soap_dom_attribute</a> ()</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__attribute.html#a7">soap_dom_attribute</a> (struct <a class="el" href="structsoap__dom__attribute.html#o5">soap</a> *<a class="el" href="structsoap__dom__attribute.html#o5">soap</a>)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__attribute.html#a8">soap_dom_attribute</a> (struct <a class="el" href="structsoap__dom__attribute.html#o5">soap</a> *<a class="el" href="structsoap__dom__attribute.html#o5">soap</a>, const char *<a class="el" href="structsoap__dom__attribute.html#o1">nstr</a>, const char *<a class="el" href="structsoap__dom__attribute.html#o2">name</a>, const char *<a class="el" href="structsoap__dom__attribute.html#o3">data</a>)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__attribute.html#a9">~soap_dom_attribute</a> ()</td></tr>

+

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__attribute.html#o0">next</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__attribute.html#o1">nstr</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__attribute.html#o2">name</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__attribute.html#o3">data</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>wchar_t *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__attribute.html#o4">wide</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dom__attribute.html#o5">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__attribute.html#o5">soap</a></td></tr>

+

+</table>

+<hr><h2>Member Typedef Documentation</h2>

+<a class="anchor" name="w0" doxytag="soap_dom_attribute::iterator" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef <a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a> <a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute::iterator</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a6" doxytag="soap_dom_attribute::soap_dom_attribute" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> soap_dom_attribute::soap_dom_attribute           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a7" doxytag="soap_dom_attribute::soap_dom_attribute" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> soap_dom_attribute::soap_dom_attribute           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="structsoap__dom__attribute.html#o5">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a8" doxytag="soap_dom_attribute::soap_dom_attribute" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> soap_dom_attribute::soap_dom_attribute           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="structsoap__dom__attribute.html#o5">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>nstr</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>name</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>data</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a9" doxytag="soap_dom_attribute::~soap_dom_attribute" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> soap_dom_attribute::~<a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a>           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a2" doxytag="soap_dom_attribute::begin" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a> soap_dom_attribute::begin           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a3" doxytag="soap_dom_attribute::end" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a> soap_dom_attribute::end           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a4" doxytag="soap_dom_attribute::find" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classsoap__dom__attribute__iterator.html">soap_dom_attribute_iterator</a> soap_dom_attribute::find           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>nstr</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>name</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="soap_dom_attribute::set" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a>&amp; soap_dom_attribute::set           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>data</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a0" doxytag="soap_dom_attribute::set" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a>&amp; soap_dom_attribute::set           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>nstr</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>name</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a5" doxytag="soap_dom_attribute::unlink" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void soap_dom_attribute::unlink           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o3" doxytag="soap_dom_attribute::data" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structsoap__dom__attribute.html#o3">soap_dom_attribute::data</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="soap_dom_attribute::name" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structsoap__dom__attribute.html#o2">soap_dom_attribute::name</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="soap_dom_attribute::next" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a>* <a class="el" href="structsoap__dom__attribute.html#o0">soap_dom_attribute::next</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_dom_attribute::nstr" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap__dom__attribute.html#o1">soap_dom_attribute::nstr</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="soap_dom_attribute::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dom__attribute.html#o5">soap</a>* <a class="el" href="structsoap__dom__attribute.html#o5">soap_dom_attribute::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="soap_dom_attribute::wide" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> wchar_t* <a class="el" href="structsoap__dom__attribute.html#o4">soap_dom_attribute::wide</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Sat Aug 20 12:24:36 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__dom__attribute__coll__graph.map b/doc/dom/html/structsoap__dom__attribute__coll__graph.map
new file mode 100644
index 0000000..5a14779
--- /dev/null
+++ b/doc/dom/html/structsoap__dom__attribute__coll__graph.map
@@ -0,0 +1 @@
+base referer
diff --git a/doc/dom/html/structsoap__dom__attribute__coll__graph.md5 b/doc/dom/html/structsoap__dom__attribute__coll__graph.md5
new file mode 100644
index 0000000..7724097
--- /dev/null
+++ b/doc/dom/html/structsoap__dom__attribute__coll__graph.md5
@@ -0,0 +1 @@
+78f0233aef85294ac05a7b11a2a26cf5
\ No newline at end of file
diff --git a/doc/dom/html/structsoap__dom__attribute__coll__graph.png b/doc/dom/html/structsoap__dom__attribute__coll__graph.png
new file mode 100644
index 0000000..9f49678
--- /dev/null
+++ b/doc/dom/html/structsoap__dom__attribute__coll__graph.png
Binary files differ
diff --git a/doc/dom/html/structsoap__dom__element-members.html b/doc/dom/html/structsoap__dom__element-members.html
new file mode 100644
index 0000000..70802e8
--- /dev/null
+++ b/doc/dom/html/structsoap__dom__element-members.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_dom_element Member List</h1>This is the complete list of members for <a class="el" href="structsoap__dom__element.html">soap_dom_element</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#a3">add</a>(struct soap_dom_element *)</td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#a4">add</a>(struct soap_dom_element &amp;)</td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#a5">add</a>(struct soap_dom_attribute *)</td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#a6">add</a>(struct soap_dom_attribute &amp;)</td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#o3">atts</a></td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#a7">begin</a>()</td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#o6">data</a></td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#o2">elts</a></td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#a8">end</a>()</td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#a9">find</a>(const char *nstr, const char *name)</td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#a10">find</a>(int type)</td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#o10">head</a></td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#w0">iterator</a> typedef</td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#o5">name</a></td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#o0">next</a></td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#o9">node</a></td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#o4">nstr</a></td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#o1">prnt</a></td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#a0">set</a>(const char *nstr, const char *name)</td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#a1">set</a>(const char *data)</td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#a2">set</a>(void *node, int type)</td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#o12">soap</a></td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#a12">soap_dom_element</a>()</td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#a13">soap_dom_element</a>(struct soap *soap)</td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#a14">soap_dom_element</a>(struct soap *soap, const char *nstr, const char *name)</td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#a15">soap_dom_element</a>(struct soap *soap, const char *nstr, const char *name, const char *data)</td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#a16">soap_dom_element</a>(struct soap *soap, const char *nstr, const char *name, void *node, int type)</td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#o11">tail</a></td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#o8">type</a></td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#a11">unlink</a>()</td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#o7">wide</a></td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__dom__element.html#a17">~soap_dom_element</a>()</td><td><a class="el" href="structsoap__dom__element.html">soap_dom_element</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Sat Aug 20 12:24:36 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__dom__element.html b/doc/dom/html/structsoap__dom__element.html
new file mode 100644
index 0000000..327d526
--- /dev/null
+++ b/doc/dom/html/structsoap__dom__element.html
@@ -0,0 +1,1005 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: soap_dom_element Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_dom_element Struct Reference</h1><code>#include &lt;stdsoap2.h&gt;</code>

+<p>

+Collaboration diagram for soap_dom_element:<p><center><img src="structsoap__dom__element__coll__graph.png" border="0" usemap="#soap__dom__element__coll__map" alt="Collaboration graph"></center>

+<map name="soap__dom__element__coll__map">

+<area href="structsoap__dom__attribute.html" shape="rect" coords="8,17,136,44" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structsoap__dom__element-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Types</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#w0">iterator</a></td></tr>

+

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dom__element.html">soap_dom_element</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#a0">set</a> (const char *<a class="el" href="structsoap__dom__element.html#o4">nstr</a>, const char *<a class="el" href="structsoap__dom__element.html#o5">name</a>)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dom__element.html">soap_dom_element</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#a1">set</a> (const char *<a class="el" href="structsoap__dom__element.html#o6">data</a>)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dom__element.html">soap_dom_element</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#a2">set</a> (void *<a class="el" href="structsoap__dom__element.html#o9">node</a>, int <a class="el" href="structsoap__dom__element.html#o8">type</a>)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dom__element.html">soap_dom_element</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#a3">add</a> (struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dom__element.html">soap_dom_element</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#a4">add</a> (struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> &amp;)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dom__element.html">soap_dom_element</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#a5">add</a> (struct <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a> *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dom__element.html">soap_dom_element</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#a6">add</a> (struct <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a> &amp;)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#a7">begin</a> ()</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#a8">end</a> ()</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#a9">find</a> (const char *<a class="el" href="structsoap__dom__element.html#o4">nstr</a>, const char *<a class="el" href="structsoap__dom__element.html#o5">name</a>)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#a10">find</a> (int <a class="el" href="structsoap__dom__element.html#o8">type</a>)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#a11">unlink</a> ()</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#a12">soap_dom_element</a> ()</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#a13">soap_dom_element</a> (struct <a class="el" href="structsoap__dom__element.html#o12">soap</a> *<a class="el" href="structsoap__dom__element.html#o12">soap</a>)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#a14">soap_dom_element</a> (struct <a class="el" href="structsoap__dom__element.html#o12">soap</a> *<a class="el" href="structsoap__dom__element.html#o12">soap</a>, const char *<a class="el" href="structsoap__dom__element.html#o4">nstr</a>, const char *<a class="el" href="structsoap__dom__element.html#o5">name</a>)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#a15">soap_dom_element</a> (struct <a class="el" href="structsoap__dom__element.html#o12">soap</a> *<a class="el" href="structsoap__dom__element.html#o12">soap</a>, const char *<a class="el" href="structsoap__dom__element.html#o4">nstr</a>, const char *<a class="el" href="structsoap__dom__element.html#o5">name</a>, const char *<a class="el" href="structsoap__dom__element.html#o6">data</a>)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#a16">soap_dom_element</a> (struct <a class="el" href="structsoap__dom__element.html#o12">soap</a> *<a class="el" href="structsoap__dom__element.html#o12">soap</a>, const char *<a class="el" href="structsoap__dom__element.html#o4">nstr</a>, const char *<a class="el" href="structsoap__dom__element.html#o5">name</a>, void *<a class="el" href="structsoap__dom__element.html#o9">node</a>, int <a class="el" href="structsoap__dom__element.html#o8">type</a>)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#a17">~soap_dom_element</a> ()</td></tr>

+

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#o0">next</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#o1">prnt</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#o2">elts</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#o3">atts</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#o4">nstr</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#o5">name</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#o6">data</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>wchar_t *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#o7">wide</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#o8">type</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#o9">node</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#o10">head</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#o11">tail</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__dom__element.html#o12">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__dom__element.html#o12">soap</a></td></tr>

+

+</table>

+<hr><h2>Member Typedef Documentation</h2>

+<a class="anchor" name="w0" doxytag="soap_dom_element::iterator" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef <a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a> <a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element::iterator</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a12" doxytag="soap_dom_element::soap_dom_element" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> soap_dom_element::soap_dom_element           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a13" doxytag="soap_dom_element::soap_dom_element" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> soap_dom_element::soap_dom_element           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="structsoap__dom__element.html#o12">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a14" doxytag="soap_dom_element::soap_dom_element" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> soap_dom_element::soap_dom_element           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="structsoap__dom__element.html#o12">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>nstr</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>name</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a15" doxytag="soap_dom_element::soap_dom_element" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> soap_dom_element::soap_dom_element           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="structsoap__dom__element.html#o12">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>nstr</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>name</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>data</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a16" doxytag="soap_dom_element::soap_dom_element" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> soap_dom_element::soap_dom_element           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="structsoap__dom__element.html#o12">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>nstr</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>name</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>void *&nbsp;</td>

+          <td class="mdname" nowrap> <em>node</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>type</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a17" doxytag="soap_dom_element::~soap_dom_element" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> soap_dom_element::~<a class="el" href="structsoap__dom__element.html">soap_dom_element</a>           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a6" doxytag="soap_dom_element::add" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a>&amp; soap_dom_element::add           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a> &amp;&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a5" doxytag="soap_dom_element::add" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a>&amp; soap_dom_element::add           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a4" doxytag="soap_dom_element::add" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a>&amp; soap_dom_element::add           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> &amp;&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a3" doxytag="soap_dom_element::add" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a>&amp; soap_dom_element::add           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a7" doxytag="soap_dom_element::begin" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a> soap_dom_element::begin           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a8" doxytag="soap_dom_element::end" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a> soap_dom_element::end           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a10" doxytag="soap_dom_element::find" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a> soap_dom_element::find           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">int&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>type</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a9" doxytag="soap_dom_element::find" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classsoap__dom__element__iterator.html">soap_dom_element_iterator</a> soap_dom_element::find           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>nstr</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>name</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a2" doxytag="soap_dom_element::set" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a>&amp; soap_dom_element::set           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">void *&nbsp;</td>

+          <td class="mdname" nowrap> <em>node</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>type</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="soap_dom_element::set" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a>&amp; soap_dom_element::set           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>data</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a0" doxytag="soap_dom_element::set" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a>&amp; soap_dom_element::set           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>nstr</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>name</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a11" doxytag="soap_dom_element::unlink" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void soap_dom_element::unlink           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o3" doxytag="soap_dom_element::atts" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dom__attribute.html">soap_dom_attribute</a>* <a class="el" href="structsoap__dom__element.html#o3">soap_dom_element::atts</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o6" doxytag="soap_dom_element::data" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structsoap__dom__element.html#o6">soap_dom_element::data</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="soap_dom_element::elts" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a>* <a class="el" href="structsoap__dom__element.html#o2">soap_dom_element::elts</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o10" doxytag="soap_dom_element::head" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structsoap__dom__element.html#o10">soap_dom_element::head</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="soap_dom_element::name" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structsoap__dom__element.html#o5">soap_dom_element::name</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="soap_dom_element::next" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a>* <a class="el" href="structsoap__dom__element.html#o0">soap_dom_element::next</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o9" doxytag="soap_dom_element::node" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void* <a class="el" href="structsoap__dom__element.html#o9">soap_dom_element::node</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="soap_dom_element::nstr" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap__dom__element.html#o4">soap_dom_element::nstr</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_dom_element::prnt" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dom__element.html">soap_dom_element</a>* <a class="el" href="structsoap__dom__element.html#o1">soap_dom_element::prnt</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o12" doxytag="soap_dom_element::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__dom__element.html#o12">soap</a>* <a class="el" href="structsoap__dom__element.html#o12">soap_dom_element::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o11" doxytag="soap_dom_element::tail" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structsoap__dom__element.html#o11">soap_dom_element::tail</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o8" doxytag="soap_dom_element::type" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap__dom__element.html#o8">soap_dom_element::type</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o7" doxytag="soap_dom_element::wide" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> wchar_t* <a class="el" href="structsoap__dom__element.html#o7">soap_dom_element::wide</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Sat Aug 20 12:24:36 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__dom__element__coll__graph.map b/doc/dom/html/structsoap__dom__element__coll__graph.map
new file mode 100644
index 0000000..d499156
--- /dev/null
+++ b/doc/dom/html/structsoap__dom__element__coll__graph.map
@@ -0,0 +1,2 @@
+base referer
+rect $structsoap__dom__attribute.html 8,17 136,44
diff --git a/doc/dom/html/structsoap__dom__element__coll__graph.md5 b/doc/dom/html/structsoap__dom__element__coll__graph.md5
new file mode 100644
index 0000000..71059bc
--- /dev/null
+++ b/doc/dom/html/structsoap__dom__element__coll__graph.md5
@@ -0,0 +1 @@
+7467a33c92f67ea78a81e6dac50e4964
\ No newline at end of file
diff --git a/doc/dom/html/structsoap__dom__element__coll__graph.png b/doc/dom/html/structsoap__dom__element__coll__graph.png
new file mode 100644
index 0000000..6a02a7f
--- /dev/null
+++ b/doc/dom/html/structsoap__dom__element__coll__graph.png
Binary files differ
diff --git a/doc/dom/html/structsoap__double__nan-members.html b/doc/dom/html/structsoap__double__nan-members.html
new file mode 100644
index 0000000..5136e38
--- /dev/null
+++ b/doc/dom/html/structsoap__double__nan-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_double_nan Member List</h1>This is the complete list of members for <a class="el" href="structsoap__double__nan.html">soap_double_nan</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structsoap__double__nan.html#o0">n1</a></td><td><a class="el" href="structsoap__double__nan.html">soap_double_nan</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__double__nan.html#o1">n2</a></td><td><a class="el" href="structsoap__double__nan.html">soap_double_nan</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__double__nan.html b/doc/dom/html/structsoap__double__nan.html
new file mode 100644
index 0000000..dfd2df5
--- /dev/null
+++ b/doc/dom/html/structsoap__double__nan.html
@@ -0,0 +1,71 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: soap_double_nan Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_double_nan Struct Reference</h1><code>#include &lt;stdsoap2.h&gt;</code>

+<p>

+<a href="structsoap__double__nan-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__double__nan.html#o0">n1</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__double__nan.html#o1">n2</a></td></tr>

+

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="soap_double_nan::n1" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> unsigned int <a class="el" href="structsoap__double__nan.html#o0">soap_double_nan::n1</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_double_nan::n2" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> unsigned int <a class="el" href="structsoap__double__nan.html#o1">soap_double_nan::n2</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__flist-members.html b/doc/dom/html/structsoap__flist-members.html
new file mode 100644
index 0000000..43af4c0
--- /dev/null
+++ b/doc/dom/html/structsoap__flist-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_flist Member List</h1>This is the complete list of members for <a class="el" href="structsoap__flist.html">soap_flist</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structsoap__flist.html#o4">fcopy</a></td><td><a class="el" href="structsoap__flist.html">soap_flist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__flist.html#o3">level</a></td><td><a class="el" href="structsoap__flist.html">soap_flist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__flist.html#o0">next</a></td><td><a class="el" href="structsoap__flist.html">soap_flist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__flist.html#o2">ptr</a></td><td><a class="el" href="structsoap__flist.html">soap_flist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__flist.html#o1">type</a></td><td><a class="el" href="structsoap__flist.html">soap_flist</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__flist.html b/doc/dom/html/structsoap__flist.html
new file mode 100644
index 0000000..040e469
--- /dev/null
+++ b/doc/dom/html/structsoap__flist.html
@@ -0,0 +1,147 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: soap_flist Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_flist Struct Reference</h1><code>#include &lt;stdsoap2.h&gt;</code>

+<p>

+Collaboration diagram for soap_flist:<p><center><img src="structsoap__flist__coll__graph.png" border="0" usemap="#soap__flist__coll__map" alt="Collaboration graph"></center>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structsoap__flist-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__flist.html">soap_flist</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__flist.html#o0">next</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__flist.html#o1">type</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__flist.html#o2">ptr</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__flist.html#o3">level</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>void(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__flist.html#o4">fcopy</a> )(struct <a class="el" href="structsoap.html">soap</a> *, int, int, void *, const void *, size_t)</td></tr>

+

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o4" doxytag="soap_flist::fcopy" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void(* <a class="el" href="structsoap__flist.html#o4">soap_flist::fcopy</a>)(struct <a class="el" href="structsoap.html">soap</a> *, int, int, void *, const void *, size_t)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="soap_flist::level" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> unsigned int <a class="el" href="structsoap__flist.html#o3">soap_flist::level</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="soap_flist::next" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__flist.html">soap_flist</a>* <a class="el" href="structsoap__flist.html#o0">soap_flist::next</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="soap_flist::ptr" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void* <a class="el" href="structsoap__flist.html#o2">soap_flist::ptr</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_flist::type" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap__flist.html#o1">soap_flist::type</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__flist__coll__graph.map b/doc/dom/html/structsoap__flist__coll__graph.map
new file mode 100644
index 0000000..5a14779
--- /dev/null
+++ b/doc/dom/html/structsoap__flist__coll__graph.map
@@ -0,0 +1 @@
+base referer
diff --git a/doc/dom/html/structsoap__flist__coll__graph.md5 b/doc/dom/html/structsoap__flist__coll__graph.md5
new file mode 100644
index 0000000..2e65667
--- /dev/null
+++ b/doc/dom/html/structsoap__flist__coll__graph.md5
@@ -0,0 +1 @@
+ad7a38a1f3ea34f97d9ccc80fd340b31
\ No newline at end of file
diff --git a/doc/dom/html/structsoap__flist__coll__graph.png b/doc/dom/html/structsoap__flist__coll__graph.png
new file mode 100644
index 0000000..9e81586
--- /dev/null
+++ b/doc/dom/html/structsoap__flist__coll__graph.png
Binary files differ
diff --git a/doc/dom/html/structsoap__ilist-members.html b/doc/dom/html/structsoap__ilist-members.html
new file mode 100644
index 0000000..4e0fd10
--- /dev/null
+++ b/doc/dom/html/structsoap__ilist-members.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_ilist Member List</h1>This is the complete list of members for <a class="el" href="structsoap__ilist.html">soap_ilist</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structsoap__ilist.html#o4">copy</a></td><td><a class="el" href="structsoap__ilist.html">soap_ilist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__ilist.html#o5">flist</a></td><td><a class="el" href="structsoap__ilist.html">soap_ilist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__ilist.html#o8">id</a></td><td><a class="el" href="structsoap__ilist.html">soap_ilist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__ilist.html#o7">level</a></td><td><a class="el" href="structsoap__ilist.html">soap_ilist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__ilist.html#o3">link</a></td><td><a class="el" href="structsoap__ilist.html">soap_ilist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__ilist.html#o0">next</a></td><td><a class="el" href="structsoap__ilist.html">soap_ilist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__ilist.html#o6">ptr</a></td><td><a class="el" href="structsoap__ilist.html">soap_ilist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__ilist.html#o2">size</a></td><td><a class="el" href="structsoap__ilist.html">soap_ilist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__ilist.html#o1">type</a></td><td><a class="el" href="structsoap__ilist.html">soap_ilist</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__ilist.html b/doc/dom/html/structsoap__ilist.html
new file mode 100644
index 0000000..3fba683
--- /dev/null
+++ b/doc/dom/html/structsoap__ilist.html
@@ -0,0 +1,250 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: soap_ilist Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_ilist Struct Reference</h1><code>#include &lt;stdsoap2.h&gt;</code>

+<p>

+Collaboration diagram for soap_ilist:<p><center><img src="structsoap__ilist__coll__graph.png" border="0" usemap="#soap__ilist__coll__map" alt="Collaboration graph"></center>

+<map name="soap__ilist__coll__map">

+<area href="structsoap__flist.html" shape="rect" coords="7,17,73,44" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structsoap__ilist-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__ilist.html">soap_ilist</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__ilist.html#o0">next</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__ilist.html#o1">type</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__ilist.html#o2">size</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__ilist.html#o3">link</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__ilist.html#o4">copy</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__flist.html">soap_flist</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__ilist.html#o5">flist</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__ilist.html#o6">ptr</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__ilist.html#o7">level</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__ilist.html#o8">id</a> [1]</td></tr>

+

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o4" doxytag="soap_ilist::copy" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void* <a class="el" href="structsoap__ilist.html#o4">soap_ilist::copy</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="soap_ilist::flist" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__flist.html">soap_flist</a>* <a class="el" href="structsoap__ilist.html#o5">soap_ilist::flist</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o8" doxytag="soap_ilist::id" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char <a class="el" href="structsoap__ilist.html#o8">soap_ilist::id</a>[1]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o7" doxytag="soap_ilist::level" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> unsigned int <a class="el" href="structsoap__ilist.html#o7">soap_ilist::level</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="soap_ilist::link" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void* <a class="el" href="structsoap__ilist.html#o3">soap_ilist::link</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="soap_ilist::next" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__ilist.html">soap_ilist</a>* <a class="el" href="structsoap__ilist.html#o0">soap_ilist::next</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o6" doxytag="soap_ilist::ptr" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void* <a class="el" href="structsoap__ilist.html#o6">soap_ilist::ptr</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="soap_ilist::size" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> size_t <a class="el" href="structsoap__ilist.html#o2">soap_ilist::size</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_ilist::type" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap__ilist.html#o1">soap_ilist::type</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__ilist__coll__graph.map b/doc/dom/html/structsoap__ilist__coll__graph.map
new file mode 100644
index 0000000..6adc9d2
--- /dev/null
+++ b/doc/dom/html/structsoap__ilist__coll__graph.map
@@ -0,0 +1,2 @@
+base referer
+rect $structsoap__flist.html 7,17 73,44
diff --git a/doc/dom/html/structsoap__ilist__coll__graph.md5 b/doc/dom/html/structsoap__ilist__coll__graph.md5
new file mode 100644
index 0000000..4e91561
--- /dev/null
+++ b/doc/dom/html/structsoap__ilist__coll__graph.md5
@@ -0,0 +1 @@
+7186c4c02030804a4c36cec3355244a8
\ No newline at end of file
diff --git a/doc/dom/html/structsoap__ilist__coll__graph.png b/doc/dom/html/structsoap__ilist__coll__graph.png
new file mode 100644
index 0000000..c716171
--- /dev/null
+++ b/doc/dom/html/structsoap__ilist__coll__graph.png
Binary files differ
diff --git a/doc/dom/html/structsoap__mime-members.html b/doc/dom/html/structsoap__mime-members.html
new file mode 100644
index 0000000..dc78f19
--- /dev/null
+++ b/doc/dom/html/structsoap__mime-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_mime Member List</h1>This is the complete list of members for <a class="el" href="structsoap__mime.html">soap_mime</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structsoap__mime.html#o0">boundary</a></td><td><a class="el" href="structsoap__mime.html">soap_mime</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__mime.html#o3">first</a></td><td><a class="el" href="structsoap__mime.html">soap_mime</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__mime.html#o4">last</a></td><td><a class="el" href="structsoap__mime.html">soap_mime</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__mime.html#o2">list</a></td><td><a class="el" href="structsoap__mime.html">soap_mime</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__mime.html#o1">start</a></td><td><a class="el" href="structsoap__mime.html">soap_mime</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__mime.html b/doc/dom/html/structsoap__mime.html
new file mode 100644
index 0000000..f1d20c7
--- /dev/null
+++ b/doc/dom/html/structsoap__mime.html
@@ -0,0 +1,150 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: soap_mime Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_mime Struct Reference</h1><code>#include &lt;stdsoap2.h&gt;</code>

+<p>

+Collaboration diagram for soap_mime:<p><center><img src="structsoap__mime__coll__graph.png" border="0" usemap="#soap__mime__coll__map" alt="Collaboration graph"></center>

+<map name="soap__mime__coll__map">

+<area href="structsoap__multipart.html" shape="rect" coords="7,17,105,44" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structsoap__mime-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__mime.html#o0">boundary</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__mime.html#o1">start</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__multipart.html">soap_multipart</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__mime.html#o2">list</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__multipart.html">soap_multipart</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__mime.html#o3">first</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__multipart.html">soap_multipart</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__mime.html#o4">last</a></td></tr>

+

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="soap_mime::boundary" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structsoap__mime.html#o0">soap_mime::boundary</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="soap_mime::first" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__multipart.html">soap_multipart</a>* <a class="el" href="structsoap__mime.html#o3">soap_mime::first</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="soap_mime::last" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__multipart.html">soap_multipart</a> * <a class="el" href="structsoap__mime.html#o4">soap_mime::last</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="soap_mime::list" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__multipart.html">soap_multipart</a>* <a class="el" href="structsoap__mime.html#o2">soap_mime::list</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_mime::start" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap__mime.html#o1">soap_mime::start</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__mime__coll__graph.map b/doc/dom/html/structsoap__mime__coll__graph.map
new file mode 100644
index 0000000..b90318b
--- /dev/null
+++ b/doc/dom/html/structsoap__mime__coll__graph.map
@@ -0,0 +1,2 @@
+base referer
+rect $structsoap__multipart.html 7,17 105,44
diff --git a/doc/dom/html/structsoap__mime__coll__graph.md5 b/doc/dom/html/structsoap__mime__coll__graph.md5
new file mode 100644
index 0000000..56fc5bb
--- /dev/null
+++ b/doc/dom/html/structsoap__mime__coll__graph.md5
@@ -0,0 +1 @@
+ab7ff92d7ec690a5ac9ee04f7c11a763
\ No newline at end of file
diff --git a/doc/dom/html/structsoap__mime__coll__graph.png b/doc/dom/html/structsoap__mime__coll__graph.png
new file mode 100644
index 0000000..df767ae
--- /dev/null
+++ b/doc/dom/html/structsoap__mime__coll__graph.png
Binary files differ
diff --git a/doc/dom/html/structsoap__multipart-members.html b/doc/dom/html/structsoap__multipart-members.html
new file mode 100644
index 0000000..911fac7
--- /dev/null
+++ b/doc/dom/html/structsoap__multipart-members.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_multipart Member List</h1>This is the complete list of members for <a class="el" href="structsoap__multipart.html">soap_multipart</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structsoap__multipart.html#o8">description</a></td><td><a class="el" href="structsoap__multipart.html">soap_multipart</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__multipart.html#o6">encoding</a></td><td><a class="el" href="structsoap__multipart.html">soap_multipart</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__multipart.html#o3">id</a></td><td><a class="el" href="structsoap__multipart.html">soap_multipart</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__multipart.html#o7">location</a></td><td><a class="el" href="structsoap__multipart.html">soap_multipart</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__multipart.html#o0">next</a></td><td><a class="el" href="structsoap__multipart.html">soap_multipart</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__multipart.html#o5">options</a></td><td><a class="el" href="structsoap__multipart.html">soap_multipart</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__multipart.html#o1">ptr</a></td><td><a class="el" href="structsoap__multipart.html">soap_multipart</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__multipart.html#o2">size</a></td><td><a class="el" href="structsoap__multipart.html">soap_multipart</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__multipart.html#o4">type</a></td><td><a class="el" href="structsoap__multipart.html">soap_multipart</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__multipart.html b/doc/dom/html/structsoap__multipart.html
new file mode 100644
index 0000000..e7e97b9
--- /dev/null
+++ b/doc/dom/html/structsoap__multipart.html
@@ -0,0 +1,247 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: soap_multipart Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_multipart Struct Reference</h1><code>#include &lt;stdsoap2.h&gt;</code>

+<p>

+Collaboration diagram for soap_multipart:<p><center><img src="structsoap__multipart__coll__graph.png" border="0" usemap="#soap__multipart__coll__map" alt="Collaboration graph"></center>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structsoap__multipart-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__multipart.html">soap_multipart</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__multipart.html#o0">next</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__multipart.html#o1">ptr</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__multipart.html#o2">size</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__multipart.html#o3">id</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__multipart.html#o4">type</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__multipart.html#o5">options</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>enum <a class="el" href="stdsoap2_8h.html#a469">soap_mime_encoding</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__multipart.html#o6">encoding</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__multipart.html#o7">location</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__multipart.html#o8">description</a></td></tr>

+

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o8" doxytag="soap_multipart::description" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap__multipart.html#o8">soap_multipart::description</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o6" doxytag="soap_multipart::encoding" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> enum <a class="el" href="stdsoap2_8h.html#a469">soap_mime_encoding</a> <a class="el" href="structsoap__multipart.html#o6">soap_multipart::encoding</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="soap_multipart::id" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap__multipart.html#o3">soap_multipart::id</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o7" doxytag="soap_multipart::location" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap__multipart.html#o7">soap_multipart::location</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="soap_multipart::next" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__multipart.html">soap_multipart</a>* <a class="el" href="structsoap__multipart.html#o0">soap_multipart::next</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="soap_multipart::options" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap__multipart.html#o5">soap_multipart::options</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_multipart::ptr" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structsoap__multipart.html#o1">soap_multipart::ptr</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="soap_multipart::size" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> size_t <a class="el" href="structsoap__multipart.html#o2">soap_multipart::size</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="soap_multipart::type" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap__multipart.html#o4">soap_multipart::type</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__multipart__coll__graph.map b/doc/dom/html/structsoap__multipart__coll__graph.map
new file mode 100644
index 0000000..5a14779
--- /dev/null
+++ b/doc/dom/html/structsoap__multipart__coll__graph.map
@@ -0,0 +1 @@
+base referer
diff --git a/doc/dom/html/structsoap__multipart__coll__graph.md5 b/doc/dom/html/structsoap__multipart__coll__graph.md5
new file mode 100644
index 0000000..c451f80
--- /dev/null
+++ b/doc/dom/html/structsoap__multipart__coll__graph.md5
@@ -0,0 +1 @@
+9f8785cdd01065cb992a05228c4e0c96
\ No newline at end of file
diff --git a/doc/dom/html/structsoap__multipart__coll__graph.png b/doc/dom/html/structsoap__multipart__coll__graph.png
new file mode 100644
index 0000000..29d360a
--- /dev/null
+++ b/doc/dom/html/structsoap__multipart__coll__graph.png
Binary files differ
diff --git a/doc/dom/html/structsoap__nlist-members.html b/doc/dom/html/structsoap__nlist-members.html
new file mode 100644
index 0000000..7d42b22
--- /dev/null
+++ b/doc/dom/html/structsoap__nlist-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_nlist Member List</h1>This is the complete list of members for <a class="el" href="structsoap__nlist.html">soap_nlist</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structsoap__nlist.html#o4">id</a></td><td><a class="el" href="structsoap__nlist.html">soap_nlist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__nlist.html#o2">index</a></td><td><a class="el" href="structsoap__nlist.html">soap_nlist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__nlist.html#o1">level</a></td><td><a class="el" href="structsoap__nlist.html">soap_nlist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__nlist.html#o0">next</a></td><td><a class="el" href="structsoap__nlist.html">soap_nlist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__nlist.html#o3">ns</a></td><td><a class="el" href="structsoap__nlist.html">soap_nlist</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__nlist.html b/doc/dom/html/structsoap__nlist.html
new file mode 100644
index 0000000..a17c7e3
--- /dev/null
+++ b/doc/dom/html/structsoap__nlist.html
@@ -0,0 +1,147 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: soap_nlist Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_nlist Struct Reference</h1><code>#include &lt;stdsoap2.h&gt;</code>

+<p>

+Collaboration diagram for soap_nlist:<p><center><img src="structsoap__nlist__coll__graph.png" border="0" usemap="#soap__nlist__coll__map" alt="Collaboration graph"></center>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structsoap__nlist-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__nlist.html">soap_nlist</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__nlist.html#o0">next</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__nlist.html#o1">level</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__nlist.html#o2">index</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__nlist.html#o3">ns</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__nlist.html#o4">id</a> [1]</td></tr>

+

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o4" doxytag="soap_nlist::id" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char <a class="el" href="structsoap__nlist.html#o4">soap_nlist::id</a>[1]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="soap_nlist::index" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> short <a class="el" href="structsoap__nlist.html#o2">soap_nlist::index</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_nlist::level" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> unsigned int <a class="el" href="structsoap__nlist.html#o1">soap_nlist::level</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="soap_nlist::next" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__nlist.html">soap_nlist</a>* <a class="el" href="structsoap__nlist.html#o0">soap_nlist::next</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="soap_nlist::ns" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structsoap__nlist.html#o3">soap_nlist::ns</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__nlist__coll__graph.map b/doc/dom/html/structsoap__nlist__coll__graph.map
new file mode 100644
index 0000000..5a14779
--- /dev/null
+++ b/doc/dom/html/structsoap__nlist__coll__graph.map
@@ -0,0 +1 @@
+base referer
diff --git a/doc/dom/html/structsoap__nlist__coll__graph.md5 b/doc/dom/html/structsoap__nlist__coll__graph.md5
new file mode 100644
index 0000000..c5d9836
--- /dev/null
+++ b/doc/dom/html/structsoap__nlist__coll__graph.md5
@@ -0,0 +1 @@
+316af0250fb1cffa6858ddb3d7d287d1
\ No newline at end of file
diff --git a/doc/dom/html/structsoap__nlist__coll__graph.png b/doc/dom/html/structsoap__nlist__coll__graph.png
new file mode 100644
index 0000000..81f2121
--- /dev/null
+++ b/doc/dom/html/structsoap__nlist__coll__graph.png
Binary files differ
diff --git a/doc/dom/html/structsoap__pblk-members.html b/doc/dom/html/structsoap__pblk-members.html
new file mode 100644
index 0000000..5d3af94
--- /dev/null
+++ b/doc/dom/html/structsoap__pblk-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_pblk Member List</h1>This is the complete list of members for <a class="el" href="structsoap__pblk.html">soap_pblk</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structsoap__pblk.html#o0">next</a></td><td><a class="el" href="structsoap__pblk.html">soap_pblk</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__pblk.html#o1">plist</a></td><td><a class="el" href="structsoap__pblk.html">soap_pblk</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__pblk.html b/doc/dom/html/structsoap__pblk.html
new file mode 100644
index 0000000..22212eb
--- /dev/null
+++ b/doc/dom/html/structsoap__pblk.html
@@ -0,0 +1,76 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: soap_pblk Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_pblk Struct Reference</h1><code>#include &lt;stdsoap2.h&gt;</code>

+<p>

+Collaboration diagram for soap_pblk:<p><center><img src="structsoap__pblk__coll__graph.png" border="0" usemap="#soap__pblk__coll__map" alt="Collaboration graph"></center>

+<map name="soap__pblk__coll__map">

+<area href="structsoap__plist.html" shape="rect" coords="9,108,81,134" alt="">

+<area href="structsoap__array.html" shape="rect" coords="6,17,84,44" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structsoap__pblk-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__pblk.html">soap_pblk</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__pblk.html#o0">next</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__plist.html">soap_plist</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__pblk.html#o1">plist</a> [SOAP_PTRBLK]</td></tr>

+

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="soap_pblk::next" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__pblk.html">soap_pblk</a>* <a class="el" href="structsoap__pblk.html#o0">soap_pblk::next</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_pblk::plist" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__plist.html">soap_plist</a> <a class="el" href="structsoap__pblk.html#o1">soap_pblk::plist</a>[SOAP_PTRBLK]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__pblk__coll__graph.map b/doc/dom/html/structsoap__pblk__coll__graph.map
new file mode 100644
index 0000000..8a539e0
--- /dev/null
+++ b/doc/dom/html/structsoap__pblk__coll__graph.map
@@ -0,0 +1,3 @@
+base referer
+rect $structsoap__plist.html 9,108 81,134
+rect $structsoap__array.html 6,17 84,44
diff --git a/doc/dom/html/structsoap__pblk__coll__graph.md5 b/doc/dom/html/structsoap__pblk__coll__graph.md5
new file mode 100644
index 0000000..6ab2ab8
--- /dev/null
+++ b/doc/dom/html/structsoap__pblk__coll__graph.md5
@@ -0,0 +1 @@
+47c49fd860703f6b4f933acc7755c2e9
\ No newline at end of file
diff --git a/doc/dom/html/structsoap__pblk__coll__graph.png b/doc/dom/html/structsoap__pblk__coll__graph.png
new file mode 100644
index 0000000..8bc4a5e
--- /dev/null
+++ b/doc/dom/html/structsoap__pblk__coll__graph.png
Binary files differ
diff --git a/doc/dom/html/structsoap__plist-members.html b/doc/dom/html/structsoap__plist-members.html
new file mode 100644
index 0000000..f64715d
--- /dev/null
+++ b/doc/dom/html/structsoap__plist-members.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_plist Member List</h1>This is the complete list of members for <a class="el" href="structsoap__plist.html">soap_plist</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structsoap__plist.html#o2">array</a></td><td><a class="el" href="structsoap__plist.html">soap_plist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__plist.html#o4">id</a></td><td><a class="el" href="structsoap__plist.html">soap_plist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__plist.html#o5">mark1</a></td><td><a class="el" href="structsoap__plist.html">soap_plist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__plist.html#o6">mark2</a></td><td><a class="el" href="structsoap__plist.html">soap_plist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__plist.html#o0">next</a></td><td><a class="el" href="structsoap__plist.html">soap_plist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__plist.html#o1">ptr</a></td><td><a class="el" href="structsoap__plist.html">soap_plist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__plist.html#o3">type</a></td><td><a class="el" href="structsoap__plist.html">soap_plist</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__plist.html b/doc/dom/html/structsoap__plist.html
new file mode 100644
index 0000000..61034c8
--- /dev/null
+++ b/doc/dom/html/structsoap__plist.html
@@ -0,0 +1,200 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: soap_plist Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_plist Struct Reference</h1><code>#include &lt;stdsoap2.h&gt;</code>

+<p>

+Collaboration diagram for soap_plist:<p><center><img src="structsoap__plist__coll__graph.png" border="0" usemap="#soap__plist__coll__map" alt="Collaboration graph"></center>

+<map name="soap__plist__coll__map">

+<area href="structsoap__array.html" shape="rect" coords="7,17,84,44" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structsoap__plist-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__plist.html">soap_plist</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__plist.html#o0">next</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__plist.html#o1">ptr</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const struct <a class="el" href="structsoap__array.html">soap_array</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__plist.html#o2">array</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__plist.html#o3">type</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__plist.html#o4">id</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__plist.html#o5">mark1</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__plist.html#o6">mark2</a></td></tr>

+

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o2" doxytag="soap_plist::array" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const struct <a class="el" href="structsoap__array.html">soap_array</a>* <a class="el" href="structsoap__plist.html#o2">soap_plist::array</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="soap_plist::id" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap__plist.html#o4">soap_plist::id</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="soap_plist::mark1" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char <a class="el" href="structsoap__plist.html#o5">soap_plist::mark1</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o6" doxytag="soap_plist::mark2" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char <a class="el" href="structsoap__plist.html#o6">soap_plist::mark2</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="soap_plist::next" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__plist.html">soap_plist</a>* <a class="el" href="structsoap__plist.html#o0">soap_plist::next</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_plist::ptr" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const void* <a class="el" href="structsoap__plist.html#o1">soap_plist::ptr</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="soap_plist::type" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap__plist.html#o3">soap_plist::type</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__plist__coll__graph.map b/doc/dom/html/structsoap__plist__coll__graph.map
new file mode 100644
index 0000000..a8ca580
--- /dev/null
+++ b/doc/dom/html/structsoap__plist__coll__graph.map
@@ -0,0 +1,2 @@
+base referer
+rect $structsoap__array.html 7,17 84,44
diff --git a/doc/dom/html/structsoap__plist__coll__graph.md5 b/doc/dom/html/structsoap__plist__coll__graph.md5
new file mode 100644
index 0000000..7ba3071
--- /dev/null
+++ b/doc/dom/html/structsoap__plist__coll__graph.md5
@@ -0,0 +1 @@
+924df83dea6e9d51f50b92af5512f3da
\ No newline at end of file
diff --git a/doc/dom/html/structsoap__plist__coll__graph.png b/doc/dom/html/structsoap__plist__coll__graph.png
new file mode 100644
index 0000000..6325ce9
--- /dev/null
+++ b/doc/dom/html/structsoap__plist__coll__graph.png
Binary files differ
diff --git a/doc/dom/html/structsoap__plugin-members.html b/doc/dom/html/structsoap__plugin-members.html
new file mode 100644
index 0000000..0d14bb6
--- /dev/null
+++ b/doc/dom/html/structsoap__plugin-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_plugin Member List</h1>This is the complete list of members for <a class="el" href="structsoap__plugin.html">soap_plugin</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structsoap__plugin.html#o2">data</a></td><td><a class="el" href="structsoap__plugin.html">soap_plugin</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__plugin.html#o3">fcopy</a></td><td><a class="el" href="structsoap__plugin.html">soap_plugin</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__plugin.html#o4">fdelete</a></td><td><a class="el" href="structsoap__plugin.html">soap_plugin</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__plugin.html#o1">id</a></td><td><a class="el" href="structsoap__plugin.html">soap_plugin</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__plugin.html#o0">next</a></td><td><a class="el" href="structsoap__plugin.html">soap_plugin</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__plugin.html b/doc/dom/html/structsoap__plugin.html
new file mode 100644
index 0000000..c888961
--- /dev/null
+++ b/doc/dom/html/structsoap__plugin.html
@@ -0,0 +1,147 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: soap_plugin Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_plugin Struct Reference</h1><code>#include &lt;stdsoap2.h&gt;</code>

+<p>

+Collaboration diagram for soap_plugin:<p><center><img src="structsoap__plugin__coll__graph.png" border="0" usemap="#soap__plugin__coll__map" alt="Collaboration graph"></center>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structsoap__plugin-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__plugin.html">soap_plugin</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__plugin.html#o0">next</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__plugin.html#o1">id</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__plugin.html#o2">data</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__plugin.html#o3">fcopy</a> )(struct <a class="el" href="structsoap.html">soap</a> *<a class="el" href="structsoap.html">soap</a>, struct <a class="el" href="structsoap__plugin.html">soap_plugin</a> *dst, struct <a class="el" href="structsoap__plugin.html">soap_plugin</a> *src)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>void(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__plugin.html#o4">fdelete</a> )(struct <a class="el" href="structsoap.html">soap</a> *<a class="el" href="structsoap.html">soap</a>, struct <a class="el" href="structsoap__plugin.html">soap_plugin</a> *p)</td></tr>

+

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o2" doxytag="soap_plugin::data" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void* <a class="el" href="structsoap__plugin.html#o2">soap_plugin::data</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="soap_plugin::fcopy" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap__plugin.html#o3">soap_plugin::fcopy</a>)(struct <a class="el" href="structsoap.html">soap</a> *<a class="el" href="structsoap.html">soap</a>, struct <a class="el" href="structsoap__plugin.html">soap_plugin</a> *dst, struct <a class="el" href="structsoap__plugin.html">soap_plugin</a> *src)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="soap_plugin::fdelete" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void(* <a class="el" href="structsoap__plugin.html#o4">soap_plugin::fdelete</a>)(struct <a class="el" href="structsoap.html">soap</a> *<a class="el" href="structsoap.html">soap</a>, struct <a class="el" href="structsoap__plugin.html">soap_plugin</a> *p)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_plugin::id" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="structsoap__plugin.html#o1">soap_plugin::id</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="soap_plugin::next" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__plugin.html">soap_plugin</a>* <a class="el" href="structsoap__plugin.html#o0">soap_plugin::next</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__plugin__coll__graph.map b/doc/dom/html/structsoap__plugin__coll__graph.map
new file mode 100644
index 0000000..5a14779
--- /dev/null
+++ b/doc/dom/html/structsoap__plugin__coll__graph.map
@@ -0,0 +1 @@
+base referer
diff --git a/doc/dom/html/structsoap__plugin__coll__graph.md5 b/doc/dom/html/structsoap__plugin__coll__graph.md5
new file mode 100644
index 0000000..cd127d7
--- /dev/null
+++ b/doc/dom/html/structsoap__plugin__coll__graph.md5
@@ -0,0 +1 @@
+7e5514a191049255b91d83a738fef214
\ No newline at end of file
diff --git a/doc/dom/html/structsoap__plugin__coll__graph.png b/doc/dom/html/structsoap__plugin__coll__graph.png
new file mode 100644
index 0000000..5881913
--- /dev/null
+++ b/doc/dom/html/structsoap__plugin__coll__graph.png
Binary files differ
diff --git a/doc/dom/html/structsoap__xlist-members.html b/doc/dom/html/structsoap__xlist-members.html
new file mode 100644
index 0000000..893a685
--- /dev/null
+++ b/doc/dom/html/structsoap__xlist-members.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_xlist Member List</h1>This is the complete list of members for <a class="el" href="structsoap__xlist.html">soap_xlist</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structsoap__xlist.html#o3">id</a></td><td><a class="el" href="structsoap__xlist.html">soap_xlist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__xlist.html#o0">next</a></td><td><a class="el" href="structsoap__xlist.html">soap_xlist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__xlist.html#o5">options</a></td><td><a class="el" href="structsoap__xlist.html">soap_xlist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__xlist.html#o1">ptr</a></td><td><a class="el" href="structsoap__xlist.html">soap_xlist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__xlist.html#o2">size</a></td><td><a class="el" href="structsoap__xlist.html">soap_xlist</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__xlist.html#o4">type</a></td><td><a class="el" href="structsoap__xlist.html">soap_xlist</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__xlist.html b/doc/dom/html/structsoap__xlist.html
new file mode 100644
index 0000000..4947caa
--- /dev/null
+++ b/doc/dom/html/structsoap__xlist.html
@@ -0,0 +1,172 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP level-2 DOM: soap_xlist Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>

+<h1>soap_xlist Struct Reference</h1><code>#include &lt;stdsoap2.h&gt;</code>

+<p>

+Collaboration diagram for soap_xlist:<p><center><img src="structsoap__xlist__coll__graph.png" border="0" usemap="#soap__xlist__coll__map" alt="Collaboration graph"></center>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structsoap__xlist-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__xlist.html">soap_xlist</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__xlist.html#o0">next</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned char **&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__xlist.html#o1">ptr</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__xlist.html#o2">size</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__xlist.html#o3">id</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char **&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__xlist.html#o4">type</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char **&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__xlist.html#o5">options</a></td></tr>

+

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o3" doxytag="soap_xlist::id" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structsoap__xlist.html#o3">soap_xlist::id</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="soap_xlist::next" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__xlist.html">soap_xlist</a>* <a class="el" href="structsoap__xlist.html#o0">soap_xlist::next</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="soap_xlist::options" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char** <a class="el" href="structsoap__xlist.html#o5">soap_xlist::options</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_xlist::ptr" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> unsigned char** <a class="el" href="structsoap__xlist.html#o1">soap_xlist::ptr</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="soap_xlist::size" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int* <a class="el" href="structsoap__xlist.html#o2">soap_xlist::size</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="soap_xlist::type" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char** <a class="el" href="structsoap__xlist.html#o4">soap_xlist::type</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/dom/<a class="el" href="stdsoap2_8h.html">stdsoap2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 18 11:29:57 2005 for gSOAP level-2 DOM by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/dom/html/structsoap__xlist__coll__graph.map b/doc/dom/html/structsoap__xlist__coll__graph.map
new file mode 100644
index 0000000..5a14779
--- /dev/null
+++ b/doc/dom/html/structsoap__xlist__coll__graph.map
@@ -0,0 +1 @@
+base referer
diff --git a/doc/dom/html/structsoap__xlist__coll__graph.md5 b/doc/dom/html/structsoap__xlist__coll__graph.md5
new file mode 100644
index 0000000..e7d85a6
--- /dev/null
+++ b/doc/dom/html/structsoap__xlist__coll__graph.md5
@@ -0,0 +1 @@
+298fbfb769e607ab94e770cee32405b8
\ No newline at end of file
diff --git a/doc/dom/html/structsoap__xlist__coll__graph.png b/doc/dom/html/structsoap__xlist__coll__graph.png
new file mode 100644
index 0000000..985aff5
--- /dev/null
+++ b/doc/dom/html/structsoap__xlist__coll__graph.png
Binary files differ
diff --git a/doc/index.css b/doc/index.css
new file mode 100644
index 0000000..df2e582
--- /dev/null
+++ b/doc/index.css
@@ -0,0 +1,216 @@
+H1 {
+	text-align: center;
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+}
+H2 {
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+}
+CAPTION { font-weight: bold }
+DIV.qindex {
+	width: 100%;
+	background-color: #eeeeff;
+	border: 1px solid #B0B0B0;
+	text-align: center;
+	margin: 2px;
+	padding: 2px;
+	line-height: 120%;
+}
+A.qindex {
+       text-decoration: none;
+       font-weight: bold;
+       color: #1A419D;
+       padding: 2px;
+}
+A.qindex:visited {
+       text-decoration: none;
+       font-weight: bold;
+       color: #1A419D
+       padding: 2px;
+}
+A.qindex:hover {
+	text-decoration: none;
+	background-color: #ddddff;
+	padding: 2px;
+}
+A.qindexHL {
+	text-decoration: none;
+	font-weight: bold;
+	background-color: #6666cc;
+	color: #ffffff;
+	padding: 2px 6px;
+	border: 1px double #9295C2;
+}
+A.qindexHL:hover {
+	text-decoration: none;
+	background-color: #6666cc;
+	color: #ffffff;
+	padding: 2px 6px;
+}
+A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
+A.el { text-decoration: none; font-weight: bold }
+A.elRef { font-weight: bold }
+A.code { text-decoration: none; font-weight: normal; color: #1A419D}
+A.codeRef { font-weight: normal; color: #1A419D}
+A:hover { text-decoration: none; background-color: #f2f2ff }
+DL.el { margin-left: -1cm }
+PRE.fragment {
+	border: 1px solid #CCCCCC;
+	background-color: #f5f5f5;
+	margin-top: 4px;
+	margin-bottom: 4px;
+	margin-left: 2px;
+	margin-right: 8px;
+	padding-left: 6px;
+	padding-right: 6px;
+	padding-top: 4px;
+	padding-bottom: 4px;
+}
+DIV.fragment {
+	border: 1px solid #CCCCCC;
+	background-color: #f5f5f5;
+	padding: 6px;
+}
+DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
+TD.md { background-color: #F4F4FB; font-weight: bold; }
+TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; }
+TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; }
+DIV.groupHeader {
+       margin-left: 16px;
+       margin-top: 12px;
+       margin-bottom: 6px;
+       font-weight: bold;
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+}
+DIV.groupText { margin-left: 16px; font-style: italic; font-size: 14px }
+BODY {
+	background: white;
+	color: black;
+	margin-right: 20px;
+	margin-left: 20px;
+}
+TD.indexkey {
+	background-color: #eeeeff;
+	font-weight: bold;
+	padding-right  : 10px;
+	padding-top    : 2px;
+	padding-left   : 10px;
+	padding-bottom : 2px;
+	margin-left    : 0px;
+	margin-right   : 0px;
+	margin-top     : 2px;
+	margin-bottom  : 2px;
+	border: 1px solid #CCCCCC;
+}
+TD.indexvalue {
+	background-color: #eeeeff;
+	font-style: italic;
+	padding-right  : 10px;
+	padding-top    : 2px;
+	padding-left   : 10px;
+	padding-bottom : 2px;
+	margin-left    : 0px;
+	margin-right   : 0px;
+	margin-top     : 2px;
+	margin-bottom  : 2px;
+	border: 1px solid #CCCCCC;
+}
+TR.memlist {
+   background-color: #f0f0f0; 
+}
+P.formulaDsp { text-align: center; }
+IMG.formulaDsp { }
+IMG.formulaInl { vertical-align: middle; }
+SPAN.keyword       { color: #008000 }
+SPAN.keywordtype   { color: #604020 }
+SPAN.keywordflow   { color: #e08000 }
+SPAN.comment       { color: #800000 }
+SPAN.preprocessor  { color: #806020 }
+SPAN.stringliteral { color: #002080 }
+SPAN.charliteral   { color: #008080 }
+.mdTable {
+	border: 1px solid #868686;
+	background-color: #F4F4FB;
+}
+.mdRow {
+	padding: 8px 10px;
+}
+.mdescLeft {
+       padding: 0px 8px 4px 8px;
+	font-size: 14px;
+	font-style: italic;
+	background-color: #FAFAFA;
+	border-top: 1px none #E0E0E0;
+	border-right: 1px none #E0E0E0;
+	border-bottom: 1px none #E0E0E0;
+	border-left: 1px none #E0E0E0;
+	margin: 0px;
+}
+.mdescRight {
+       padding: 0px 8px 4px 8px;
+	font-size: 14px;
+	font-style: italic;
+	background-color: #FAFAFA;
+	border-top: 1px none #E0E0E0;
+	border-right: 1px none #E0E0E0;
+	border-bottom: 1px none #E0E0E0;
+	border-left: 1px none #E0E0E0;
+	margin: 0px;
+}
+.memItemLeft {
+	padding: 1px 0px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-style: solid;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+	font-size: 12px;
+}
+.memItemRight {
+	padding: 1px 8px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-style: solid;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+	font-size: 13px;
+}
+.search     { color: #003399;
+              font-weight: bold;
+}
+FORM.search {
+              margin-bottom: 0px;
+              margin-top: 0px;
+}
+INPUT.search { font-size: 75%;
+               color: #000080;
+               font-weight: normal;
+               background-color: #eeeeff;
+}
+TD.tiny      { font-size: 75%;
+}
+a {
+	color: #252E78;
+}
+a:visited {
+	color: #3D2185;
+}
diff --git a/doc/index.html b/doc/index.html
new file mode 100644
index 0000000..471c024
--- /dev/null
+++ b/doc/index.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP Documentation</title>

+<link href="index.css" rel="stylesheet" type="text/css">

+</head><body>

+<h1>gSOAP Documentation</h1>

+<p>

+<h3 align="center">Overview</h3>

+<ul>

+<li><a class="el" href="soapdoc2.html">The gSOAP User Guide</a>.</li>

+<li><a class="el" href="dom/html/index.html">The gSOAP level-2 DOM</a>.</li>

+<li><a class="el" href="uddi2/html/index.html">The UDDI v2 API</a> documents the gSOAP UDDI v2 API.</li>

+<li><a class="el" href="wsse/html/index.html">The wsse plugin</a> documents the wsse plugin for WS-Security 1.0 support.</li>

+<li><a class="el" href="../changelog.html">The changelog</a> history of changes.</li>

+</ul>

+<hr size="1">

+</body>

+</html>

diff --git a/doc/soapdoc2.html b/doc/soapdoc2.html
new file mode 100644
index 0000000..791338c
--- /dev/null
+++ b/doc/soapdoc2.html
@@ -0,0 +1,13081 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"

+           "http://www.w3.org/TR/REC-html40/loose.dtd">

+<html>

+<meta name="GENERATOR" content="TtH 3.72">

+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

+ <style type="text/css"> div.p { margin-top: 7pt;}</style>

+ <style type="text/css"><!--

+ td div.comp { margin-top: -0.6ex; margin-bottom: -1ex;}

+ td div.comb { margin-top: -0.6ex; margin-bottom: -.6ex;}

+ td div.hrcomp { line-height: 0.9; margin-top: -0.8ex; margin-bottom: -1ex;}

+ td div.norm {line-height:normal;}

+ span.roman {font-family: serif; font-style: normal; font-weight: normal;} 

+ span.overacc2 {position: relative;  left: .8em; top: -1.2ex;}

+ span.overacc1 {position: relative;  left: .6em; top: -1.2ex;} --></style>

+

+<body bgcolor="#FFFFFF">

+

+

+

+<title> gSOAP 2.7.6 User Guide</title>

+    

+<h1 align="center">gSOAP 2.7.6 User Guide </h1>

+

+<h3 align="center">Robert van Engelen <br />Florida State University <br />and Genivia, Inc. <br />engelen@genivia.com &amp; engelen@acm.org </h3>

+

+<h3 align="center">Feb 19, 2006

+<br /><a href="soapdoc2.pdf"><font color="#FF0000"><b>[This document is also available in PDF format (black and white only)]</b></font></a></h3>

+ <br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<h1>Contents </h1><a href="#tth_sEc1"

+>1&nbsp; <font color="#0000FF">Introduction</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc1.1"

+>1.1&nbsp; <font color="#0000FF">Getting Started</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc1.2"

+>1.2&nbsp; <font color="#0000FF">Your First Web Service Client Application</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc1.3"

+>1.3&nbsp; <font color="#0000FF">Your First Web Service in CGI</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc1.4"

+>1.4&nbsp; <font color="#0000FF">Features</font></a><br />

+<a href="#tth_sEc2"

+>2&nbsp; <font color="#0000FF">Notational Conventions</font></a><br />

+<a href="#tth_sEc3"

+>3&nbsp; <font color="#0000FF">Differences Between gSOAP Versions 2.4 (and Earlier) and 2.5</font></a><br />

+<a href="#tth_sEc4"

+>4&nbsp; <font color="#0000FF">Differences Between gSOAP Versions 2.1 (and Earlier) and 2.2</font></a><br />

+<a href="#tth_sEc5"

+>5&nbsp; <font color="#0000FF">Differences Between gSOAP Versions 1.X and 2.X</font></a><br />

+<a href="#tth_sEc6"

+>6&nbsp; <font color="#0000FF">Interoperability</font></a><br />

+<a href="#tth_sEc7"

+>7&nbsp; <font color="#0000FF">Quick User Guide</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.1"

+>7.1&nbsp; <font color="#0000FF">How to Use the gSOAP Stub and Skeleton Compiler to Build SOAP Clients</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.1.1"

+>7.1.1&nbsp; <font color="#0000FF">Example</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.1.2"

+>7.1.2&nbsp; <font color="#0000FF">Namespace Considerations</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.1.3"

+>7.1.3&nbsp; <font color="#0000FF">Example</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.1.4"

+>7.1.4&nbsp; <font color="#0000FF">How to Generate C++ Client Proxy Classes</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.1.5"

+>7.1.5&nbsp; <font color="#0000FF">XSD Type Encoding Considerations</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.1.6"

+>7.1.6&nbsp; <font color="#0000FF">Example</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.1.7"

+>7.1.7&nbsp; <font color="#0000FF">How to Change the Response Element Name</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.1.8"

+>7.1.8&nbsp; <font color="#0000FF">Example</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.1.9"

+>7.1.9&nbsp; <font color="#0000FF">How to Specify Multiple Output Parameters</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.1.10"

+>7.1.10&nbsp; <font color="#0000FF">Example</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.1.11"

+>7.1.11&nbsp; <font color="#0000FF">How to Specify Output Parameters With struct/class Compound Data Types</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.1.12"

+>7.1.12&nbsp; <font color="#0000FF">Example</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.1.13"

+>7.1.13&nbsp; <font color="#0000FF">How to Specify Anonymous Parameter Names</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.1.14"

+>7.1.14&nbsp; <font color="#0000FF">How to Specify a Method with No Input Parameters</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.1.15"

+>7.1.15&nbsp; <font color="#0000FF">How to Specify a Method with No Output Parameters</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.2"

+>7.2&nbsp; <font color="#0000FF">How to Use the gSOAP Stub and Skeleton Compiler to Build SOAP Web Services</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.2.1"

+>7.2.1&nbsp; <font color="#0000FF">Example</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.2.2"

+>7.2.2&nbsp; <font color="#0000FF">MSVC++ Builds</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.2.3"

+>7.2.3&nbsp; <font color="#0000FF">How to Create a Stand-Alone gSOAP Service</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.2.4"

+>7.2.4&nbsp; <font color="#0000FF">How to Create a Multi-Threaded Stand-Alone Service</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.2.5"

+>7.2.5&nbsp; <font color="#0000FF">How to Pass Application Data to Service Methods</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.2.6"

+>7.2.6&nbsp; <font color="#0000FF">Some Web Service Implementation Issues</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.2.7"

+>7.2.7&nbsp; <font color="#0000FF">How to Generate C++ Server Object Classes</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.2.8"

+>7.2.8&nbsp; <font color="#0000FF">How to Generate WSDL Service Descriptions</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.2.9"

+>7.2.9&nbsp; <font color="#0000FF">Example</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.2.10"

+>7.2.10&nbsp; <font color="#0000FF">How to Parse and Import WSDL Service Descriptions to Develop Clients and Servers</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.2.11"

+>7.2.11&nbsp; <font color="#0000FF">The typemap.dat File</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.2.12"

+>7.2.12&nbsp; <font color="#0000FF">How to Use Client Functionalities Within a Service</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.3"

+>7.3&nbsp; <font color="#0000FF">How to Use gSOAP for Asynchronous One-Way Message Passing</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.4"

+>7.4&nbsp; <font color="#0000FF">One-Way Message Passing over HTTP</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.5"

+>7.5&nbsp; <font color="#0000FF">How to Use the SOAP Serializers and Deserializers to Save and Load Application Data</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.5.1"

+>7.5.1&nbsp; <font color="#0000FF">Serializing a Data Type</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.5.2"

+>7.5.2&nbsp; <font color="#0000FF">Deserializing a Data Type</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.5.3"

+>7.5.3&nbsp; <font color="#0000FF">Example</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.5.4"

+>7.5.4&nbsp; <font color="#0000FF">Serializing and Deserializing Class Instances to Streams</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc7.5.5"

+>7.5.5&nbsp; <font color="#0000FF">How to Specify Default Values for Omitted Data</font></a><br />

+<a href="#tth_sEc8"

+>8&nbsp; <font color="#0000FF">Using the gSOAP Stub and Skeleton Compiler</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc8.1"

+>8.1&nbsp; <font color="#0000FF">Compiler Options</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc8.2"

+>8.2&nbsp; <font color="#0000FF">SOAP 1.1 Versus SOAP 1.2</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc8.3"

+>8.3&nbsp; <font color="#0000FF">The soapdefs.h Header File</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc8.4"

+>8.4&nbsp; <font color="#0000FF">How to Build Modules and Libraries with the gSOAP #module Directive</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc8.5"

+>8.5&nbsp; <font color="#0000FF">How to use the gSOAP #import Directive</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc8.6"

+>8.6&nbsp; <font color="#0000FF">How to Use #include and #define Directives</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc8.7"

+>8.7&nbsp; <font color="#0000FF">Compiling a gSOAP Client</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc8.8"

+>8.8&nbsp; <font color="#0000FF">Compiling a gSOAP Web Service</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc8.9"

+>8.9&nbsp; <font color="#0000FF">Using gSOAP for Creating Web Services and Clients in Pure C</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc8.10"

+>8.10&nbsp; <font color="#0000FF">Limitations of gSOAP</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc8.11"

+>8.11&nbsp; <font color="#0000FF">Compile Time Flags</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc8.12"

+>8.12&nbsp; <font color="#0000FF">Run Time Flags</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc8.13"

+>8.13&nbsp; <font color="#0000FF">Memory Management</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc8.13.1"

+>8.13.1&nbsp; <font color="#0000FF">Memory Management Policies</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc8.13.2"

+>8.13.2&nbsp; <font color="#0000FF">Intra-Class Memory Management</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc8.14"

+>8.14&nbsp; <font color="#0000FF">Debugging</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc8.15"

+>8.15&nbsp; <font color="#0000FF">Required Libraries</font></a><br />

+<a href="#tth_sEc9"

+>9&nbsp; <font color="#0000FF">The gSOAP Remote Method Specification Format</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc9.1"

+>9.1&nbsp; <font color="#0000FF">Remote Method Parameter Passing</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc9.2"

+>9.2&nbsp; <font color="#0000FF">Error Codes</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc9.3"

+>9.3&nbsp; <font color="#0000FF">C/C++ Identifier Name to XML Name Translations</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc9.4"

+>9.4&nbsp; <font color="#0000FF">Namespace Mapping Table</font></a><br />

+<a href="#tth_sEc10"

+>10&nbsp; <font color="#0000FF">gSOAP Serialization and Deserialization Rules</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.1"

+>10.1&nbsp; <font color="#0000FF">Primitive Type Encoding</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.2"

+>10.2&nbsp; <font color="#0000FF">How to Encode and Decode Primitive Types as XSD Types</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.2.1"

+>10.2.1&nbsp; <font color="#0000FF">How to Use Multiple C/C++ Types for a Single Primitive XSD Type</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.2.2"

+>10.2.2&nbsp; <font color="#0000FF">How to use Wrapper Classes to Specify Polymorphic Primitive Types</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.2.3"

+>10.2.3&nbsp; <font color="#0000FF">XSD Schema Type Decoding Rules</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.2.4"

+>10.2.4&nbsp; <font color="#0000FF">Multi-Reference Strings</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.2.5"

+>10.2.5&nbsp; <font color="#0000FF">"Smart String" Mixed-Content Decoding</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.2.6"

+>10.2.6&nbsp; <font color="#0000FF">STL Strings</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.2.7"

+>10.2.7&nbsp; <font color="#0000FF">Changing the Encoding Precision of <b>float</b>&nbsp;and <b>double</b>&nbsp;Types</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.2.8"

+>10.2.8&nbsp; <font color="#0000FF">INF, -INF, and NaN Values of <b>float</b>&nbsp;and <b>double</b>&nbsp;Types</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.3"

+>10.3&nbsp; <font color="#0000FF">Enumeration Serialization</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.3.1"

+>10.3.1&nbsp; <font color="#0000FF">Serialization of Symbolic Enumeration Constants</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.3.2"

+>10.3.2&nbsp; <font color="#0000FF">Encoding of Enumeration Constants</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.3.3"

+>10.3.3&nbsp; <font color="#0000FF">Initialized Enumeration Constants</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.3.4"

+>10.3.4&nbsp; <font color="#0000FF">How to "Reuse" Symbolic Enumeration Constants</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.3.5"

+>10.3.5&nbsp; <font color="#0000FF">Boolean Enumeration Serialization for C</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.3.6"

+>10.3.6&nbsp; <font color="#0000FF">Bitmask Enumeration Serialization</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.4"

+>10.4&nbsp; <font color="#0000FF">Struct Serialization</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.5"

+>10.5&nbsp; <font color="#0000FF">Class Instance Serialization</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.5.1"

+>10.5.1&nbsp; <font color="#0000FF">Example</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.5.2"

+>10.5.2&nbsp; <font color="#0000FF">Initialized <b>static</b>&nbsp;<b>const</b>&nbsp;Fields</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.5.3"

+>10.5.3&nbsp; <font color="#0000FF">Class Methods</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.5.4"

+>10.5.4&nbsp; <font color="#0000FF">Getter and Setter Methods</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.5.5"

+>10.5.5&nbsp; <font color="#0000FF">Streaming XML with Getter and Setter Methods</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.5.6"

+>10.5.6&nbsp; <font color="#0000FF">Polymorphism, Derived Classes, and Dynamic Binding</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.5.7"

+>10.5.7&nbsp; <font color="#0000FF">XML Attributes</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.5.8"

+>10.5.8&nbsp; <font color="#0000FF">QName Attributes and Elements</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.6"

+>10.6&nbsp; <font color="#0000FF">Union Serialization</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.7"

+>10.7&nbsp; <font color="#0000FF">Serializing Pointer Types</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.7.1"

+>10.7.1&nbsp; <font color="#0000FF">Multi-Referenced Data</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.7.2"

+>10.7.2&nbsp; <font color="#0000FF">NULL Pointers and Nil Elements</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.8"

+>10.8&nbsp; <font color="#0000FF">Void Pointers</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.9"

+>10.9&nbsp; <font color="#0000FF">Fixed-Size Arrays</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.10"

+>10.10&nbsp; <font color="#0000FF">Dynamic Arrays</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.10.1"

+>10.10.1&nbsp; <font color="#0000FF">SOAP Array Bounds Limits</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.10.2"

+>10.10.2&nbsp; <font color="#0000FF">One-Dimensional Dynamic Arrays</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.10.3"

+>10.10.3&nbsp; <font color="#0000FF">Example</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.10.4"

+>10.10.4&nbsp; <font color="#0000FF">One-Dimensional Dynamic Arrays With Non-Zero Offset</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.10.5"

+>10.10.5&nbsp; <font color="#0000FF">Nested One-Dimensional Dynamic Arrays</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.10.6"

+>10.10.6&nbsp; <font color="#0000FF">Multi-Dimensional Dynamic Arrays</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.10.7"

+>10.10.7&nbsp; <font color="#0000FF">Encoding XML Generics Containing Dynamic Arrays</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.10.8"

+>10.10.8&nbsp; <font color="#0000FF">STL Containers</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.10.9"

+>10.10.9&nbsp; <font color="#0000FF">Polymorphic Dynamic Arrays and Lists</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.10.10"

+>10.10.10&nbsp; <font color="#0000FF">How to Change the Tag Names of the Elements of a SOAP Array or List</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.11"

+>10.11&nbsp; <font color="#0000FF">Base64Binary XML Schema Type Encoding</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.12"

+>10.12&nbsp; <font color="#0000FF">hexBinary XML Schema Type Encoding</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.13"

+>10.13&nbsp; <font color="#0000FF">Literal XML Encoding Style</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc10.13.1"

+>10.13.1&nbsp; <font color="#0000FF">Serializing and Deserializing Mixed Content XML With Strings</font></a><br />

+<a href="#tth_sEc11"

+>11&nbsp; <font color="#0000FF">SOAP Fault Processing</font></a><br />

+<a href="#tth_sEc12"

+>12&nbsp; <font color="#0000FF">SOAP Header Processing</font></a><br />

+<a href="#tth_sEc13"

+>13&nbsp; <font color="#0000FF">MIME Attachments</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc13.1"

+>13.1&nbsp; <font color="#0000FF">Sending a Collection of MIME Attachments</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc13.2"

+>13.2&nbsp; <font color="#0000FF">Retrieving a Collection of MIME Attachments</font></a><br />

+<a href="#tth_sEc14"

+>14&nbsp; <font color="#0000FF">DIME Attachments</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc14.1"

+>14.1&nbsp; <font color="#0000FF">Sending a Collection of DIME Attachments</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc14.2"

+>14.2&nbsp; <font color="#0000FF">Retrieving a Collection of DIME Attachments</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc14.3"

+>14.3&nbsp; <font color="#0000FF">Serializing Binary Data in DIME</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc14.4"

+>14.4&nbsp; <font color="#0000FF">Streaming DIME</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc14.5"

+>14.5&nbsp; <font color="#0000FF">Streaming Chunked DIME</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc14.6"

+>14.6&nbsp; <font color="#0000FF">WSDL Bindings for DIME Attachments</font></a><br />

+<a href="#tth_sEc15"

+>15&nbsp; <font color="#0000FF">MTOM Attachments</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc15.1"

+>15.1&nbsp; <font color="#0000FF">Generating MultipartRelated MIME Attachment Bindings in WSDL</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc15.2"

+>15.2&nbsp; <font color="#0000FF">Sending and Receiving MTOM Attachments</font></a><br />

+<a href="#tth_sEc16"

+>16&nbsp; <font color="#0000FF">XML Validation</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc16.1"

+>16.1&nbsp; <font color="#0000FF">Occurrence Constraints</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc16.1.1"

+>16.1.1&nbsp; <font color="#0000FF">Elements with minOccurs and maxOccurs Restrictions</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc16.1.2"

+>16.1.2&nbsp; <font color="#0000FF">Required and Prohibited Attributes</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc16.1.3"

+>16.1.3&nbsp; <font color="#0000FF">Data Length Restrictions</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc16.2"

+>16.2&nbsp; <font color="#0000FF">Other Constraints</font></a><br />

+<a href="#tth_sEc17"

+>17&nbsp; <font color="#0000FF">SOAP-over-UDP</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc17.1"

+>17.1&nbsp; <font color="#0000FF">Using WS-Addressing with SOAP-over-UDP</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc17.2"

+>17.2&nbsp; <font color="#0000FF">Client-side One-way Unicast</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc17.3"

+>17.3&nbsp; <font color="#0000FF">Client-side One-way Multicast</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc17.4"

+>17.4&nbsp; <font color="#0000FF">Client-side Request-Response Unicast</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc17.5"

+>17.5&nbsp; <font color="#0000FF">Client-side Request-Response Multicast</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc17.6"

+>17.6&nbsp; <font color="#0000FF">SOAP-over-UDP Server</font></a><br />

+<a href="#tth_sEc18"

+>18&nbsp; <font color="#0000FF">Advanced Features</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.1"

+>18.1&nbsp; <font color="#0000FF">Internationalization</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.2"

+>18.2&nbsp; <font color="#0000FF">Customizing the WSDL and Namespace Mapping Table File Contents With gSOAP Directives</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.2.1"

+>18.2.1&nbsp; <font color="#0000FF">Example</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.3"

+>18.3&nbsp; <font color="#0000FF">Transient Data Types</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.4"

+>18.4&nbsp; <font color="#0000FF">Volatile Data Types</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.5"

+>18.5&nbsp; <font color="#0000FF">How to Declare User-Defined Serializers and Deserializers</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.6"

+>18.6&nbsp; <font color="#0000FF">How to Serialize Data Without Generating XSD Type Attributes</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.7"

+>18.7&nbsp; <font color="#0000FF">Function Callbacks for Customized I/O and HTTP Handling</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.8"

+>18.8&nbsp; <font color="#0000FF">HTTP 1.0 and 1.1</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.9"

+>18.9&nbsp; <font color="#0000FF">HTTP 307 Temporary Redirect Support</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.10"

+>18.10&nbsp; <font color="#0000FF">HTTP GET Support</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.11"

+>18.11&nbsp; <font color="#0000FF">HTTP Keep-Alive</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.12"

+>18.12&nbsp; <font color="#0000FF">HTTP Chunked Transfer Encoding</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.13"

+>18.13&nbsp; <font color="#0000FF">HTTP Buffered Sends</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.14"

+>18.14&nbsp; <font color="#0000FF">HTTP Authentication</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.15"

+>18.15&nbsp; <font color="#0000FF">HTTP Proxy Authentication</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.16"

+>18.16&nbsp; <font color="#0000FF">Speed Improvement Tips</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.17"

+>18.17&nbsp; <font color="#0000FF">Timeout Management for Non-Blocking Operations</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.18"

+>18.18&nbsp; <font color="#0000FF">Socket Options and Flags</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.19"

+>18.19&nbsp; <font color="#0000FF">Secure SOAP Web Services with HTTPS/SSL</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.20"

+>18.20&nbsp; <font color="#0000FF">Secure SOAP Clients with HTTPS/SSL</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.21"

+>18.21&nbsp; <font color="#0000FF">SSL Authentication Callback</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.22"

+>18.22&nbsp; <font color="#0000FF">SSL Certificates</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.23"

+>18.23&nbsp; <font color="#0000FF">SSL Hardware Acceleration</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.24"

+>18.24&nbsp; <font color="#0000FF">SSL on Windows</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.25"

+>18.25&nbsp; <font color="#0000FF">Zlib Compression</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.26"

+>18.26&nbsp; <font color="#0000FF">Client-Side Cookie Support</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.27"

+>18.27&nbsp; <font color="#0000FF">Server-Side Cookie Support</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.28"

+>18.28&nbsp; <font color="#0000FF">Connecting Clients Through Proxy Servers</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.29"

+>18.29&nbsp; <font color="#0000FF">FastCGI Support</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.30"

+>18.30&nbsp; <font color="#0000FF">How to Create gSOAP Applications With a Small Memory Footprint</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.31"

+>18.31&nbsp; <font color="#0000FF">How to Eliminate BSD Socket Library Linkage</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.32"

+>18.32&nbsp; <font color="#0000FF">How to Combine Multiple Client and Server Implementations into one Executable</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.33"

+>18.33&nbsp; <font color="#0000FF">How to Build a Client or Server in a C++ Code Namespace</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.34"

+>18.34&nbsp; <font color="#0000FF">How to Create Client/Server Libraries</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.34.1"

+>18.34.1&nbsp; <font color="#0000FF">C++ Example</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.34.2"

+>18.34.2&nbsp; <font color="#0000FF">C Example</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.35"

+>18.35&nbsp; <font color="#0000FF">How to Create DLLs</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.35.1"

+>18.35.1&nbsp; <font color="#0000FF">Create the Base stdsoap2.dll</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.35.2"

+>18.35.2&nbsp; <font color="#0000FF">Creating Client and Server DLLs</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.36"

+>18.36&nbsp; <font color="#0000FF">gSOAP Plug-ins</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.36.1"

+>18.36.1&nbsp; <font color="#0000FF">The Message Logging and Statistics Plug-in</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.36.2"

+>18.36.2&nbsp; <font color="#0000FF">The HTTP GET Plug-in</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.36.3"

+>18.36.3&nbsp; <font color="#0000FF">The HTTP MD5 Plug-in</font></a><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#tth_sEc18.36.4"

+>18.36.4&nbsp; <font color="#0000FF">The HTTP Digest Authentication Plug-in</font></a><br />

+

+</td></tr></table><br></span>

+<i>Copyright (C) 2000-2006 Robert A. van Engelen, Genivia, Inc., All Rights Reserved.</i>

+

+

+<div class="p"><!----></div>

+ <h2><a name="tth_sEc1">

+1</a>&nbsp;&nbsp;<font color="#0000FF">Introduction</font></h2>

+

+<div class="p"><!----></div>

+The gSOAP tools provide a SOAP/XML-to-C/C++ language binding

+to ease the development of SOAP/XML Web services and client application in C

+and C++.  Most toolkits for C++ Web services adopt a SOAP-centric view and

+offer APIs that require the use of class libraries for SOAP-specific

+data structures.  This often forces a user to adapt the application logic to

+these libraries.  In contrast, gSOAP provides a C/C++ transparent SOAP API

+through the use of compiler technology that hides irrelevant SOAP-specific

+details from the user.  The gSOAP stub and skeleton compiler automatically

+maps native and user-defined C and C++ data types to semantically equivalent

+XML data types and vice-versa.  As a result, full SOAP interoperability is

+achieved with a simple API relieving the user from the burden of SOAP details,

+thus enabling him or her to concentrate on the application-essential logic.

+

+<div class="p"><!----></div>

+The gSOAP compiler enables the integration of (legacy) C/C++ and Fortran codes

+(through a Fortran to C interface), embedded systems, and real-time software in

+SOAP applications that share computational resources and information with other

+SOAP applications, possibly across different platforms, language environments,

+and disparate organizations located behind firewalls.

+

+<div class="p"><!----></div>

+     <h3><a name="tth_sEc1.1">

+1.1</a>&nbsp;&nbsp;<font color="#0000FF">Getting Started</font></h3>

+

+<div class="p"><!----></div>

+To start building Web services applications with gSOAP, you need:

+

+<ul>

+<li> The gSOAP package from <a href="http://sourceforge.net/projects/gsoap2"><tt>http://sourceforge.net/projects/gsoap2</tt></a>

+<div class="p"><!----></div>

+</li>

+

+<li> A C or C++ compiler.

+<div class="p"><!----></div>

+</li>

+

+<li> You may want to install OpenSSL and the Zlib libraries to enable SSL (HTTPS) and compression. These libraries are available for most platforms and are often already installed.

+<div class="p"><!----></div>

+</li>

+</ul>

+gSOAP is self-contained, so there is no need to download any third-party

+software (unless you want to use OpenSSL and the library is not already

+installed).

+

+<div class="p"><!----></div>

+Although gSOAP is available in binary format for several platforms, the code

+generated by the gSOAP stub and skeleton compiler and the gSOAP runtime codes

+are equivalent. This means that the generated codes can be transferred to other

+platforms and compiled.

+

+<div class="p"><!----></div>

+The gSOAP packages available from SourceForge include pre-build tools:

+

+<ul>

+<li> The <i>wsdl2h</i> WSDL/schema parser tool.

+<div class="p"><!----></div>

+</li>

+

+<li> The <i>soapcpp2</i> stub/skeleton compiler.

+<div class="p"><!----></div>

+</li>

+</ul>

+Win32 versions of these two are included in the Win32 gSOAP package only.

+If you don't have the binaries or if you want to rebuild them, you need

+

+<ul>

+<li> A C++ compiler to build <i>wsdl2h</i>.

+<div class="p"><!----></div>

+</li>

+

+<li> A C compiler and Bison or Yacc to build <i>soapcpp2</i>.

+<div class="p"><!----></div>

+</li>

+

+<li> A C compiler and Flex or Lex to build <i>soapcpp2</i>.

+<div class="p"><!----></div>

+</li>

+</ul>

+Bison and Flex are preferred.

+

+<div class="p"><!----></div>

+The tools are used to generate code that is linked with the gSOAP engine

+<i>soapcpp2.c</i> (C version) or <i>soapcpp2.cpp</i> (C++ version) and your

+application code. The engine is also available as a library <i>libgsoap.a</i> and

+<i>libgsoap++.a</i> with separate versions that support SSL. See the

+<i>README.txt</i> instructions on how to build these libraries with the

+platform-independent gSOAP package's autoconf and automake.

+

+<div class="p"><!----></div>

+The gSOAP packages contain numerous examples in the <i>samples</i> directory.

+Run <i>make</i> to build the example applications. The examples are also meant

+to demonstrate different features of gSOAP. The simplest examples are the

+one-liners in <i>samples/oneliners</i>. Indeed, you can write a one-line Web

+service with CGI!. A streaming DIME attachment server and client application

+demonstrate efficient file exchanges in <i>samples/dime</i>. An SSL-secure Web

+server application demonstrates the generation of dynamic content for Web

+browsing and Web services functionality at the same time, see

+<i>samples/webservice</i>. And much more.

+

+<div class="p"><!----></div>

+     <h3><a name="tth_sEc1.2">

+1.2</a>&nbsp;&nbsp;<font color="#0000FF">Your First Web Service Client Application</font></h3>

+

+<div class="p"><!----></div>

+The gSOAP tools minimize application adaptation efforts for building Web

+Services.  The gSOAP <i>wsdl2h</i> tool imports one or more WSDLs and XML

+schemas to generate a header file with the Web service operations and the C/C++

+data types used by the services. The gSOAP <i>soapcpp2</i> compiler takes the

+header file and generates XML serializers for the data types (<i>soapH.h</i> and

+<i>soapC.cpp</i>), the client-side stubs (<i>soapClient.cpp</i>), and server-side

+skeletons (<i>soapServer.cpp</i>).

+

+<div class="p"><!----></div>

+The gSOAP <i>soapcpp2</i> compiler can also generate WSDL definitions for

+implementing a service from scratch, i.e.&nbsp;without defining a WSDL first. This

+"closes the circle" in that it enables Web services development from WSDL or

+directly from a set op C/C++ operations in a header file without the need for

+users to analyze Web service details.

+

+<div class="p"><!----></div>

+You only need to follow a few steps to execute the tools from the command line

+or Makefile (see also MSVC++ project examples in the <i>samples</i> directory

+with tool integration in the MSVC++ IDE). For example, to generate code for the

+XMethods service listing Web service, we run the <i>wsdl2h</i> tool from the

+command line on the URL of the WSDL and use option <i>-o</i> to specify the

+output file:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>$ wsdl2h -o XMethodsQuery.h http://www.xmethods.net/wsdl/query.wsdl</i>

+</td></tr></table><br></span>

+This generates the <i>XMethodsQuery.h</i> header file with Web service

+operations and the data types that the service uses. This header file is to be

+processed with <i>soapcpp2</i> to generate the stub and/or skeleton code. The

+<i>XMethodsQuery.h</i> file includes all documentation, so you can use Doxygen

+(<a href="http://www.doxygen.org"><tt>http://www.doxygen.org</tt></a>) to automatically generate the documentation pages for

+your development.

+

+<div class="p"><!----></div>

+In this example we are developing a C++ API for the XMethods service. By

+default, gSOAP assumes you will use C++ with STL.  To build without STL, use option

+<i>-s</i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>$ wsdl2h -s -o XMethodsQuery.h http://www.xmethods.net/wsdl/query.wsdl</i>

+</td></tr></table><br></span>

+To build a pure C application, use option <i>-c</i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>$ wsdl2h -c -o XMethodsQuery.h http://www.xmethods.net/wsdl/query.wsdl</i>

+</td></tr></table><br></span>

+We have not yet generated the stubs for the C/C++ API. To do so, run the <i>soapcpp2</i> compiler:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>$ soapcpp2 -C -Iimport XMethodsQuery.h</i>

+</td></tr></table><br></span>

+Where option <i>-C</i> indicates client-side only files (<i>soapcpp2</i>

+generates both client and server stubs and skeletons by default). Option

+<i>-I</i> is needed to import the <i>stlvector.h</i> file to support STL vectors.

+

+<div class="p"><!----></div>

+Suppose we develop a C++ client for the XMethods service. In this case we use

+the generated <i>soapXMethodsQuerySoapProxy</i> class and

+<i>XMethodsQuerySoap.nsmap</i> XML namespace mapping table to access the Web

+service. The <i>soapXMethodsQuerySoapProxy</i> class is a proxy to invoke the

+service:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "soapXMethodsQuerySoapProxy.h" <br />

+#include "XMethodsQuerySoap.nsmap" <br />

+main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;XMethodsQuerySoap service; <br />

+&nbsp;&nbsp;&nbsp;ns3__getAllServiceNamesResponse response; <br />

+&nbsp;&nbsp;&nbsp;// get all service names from the XMethods database: <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(service.ns3__getAllServiceNames(response) == SOAP_OK) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;std::cout <tt>&lt;&lt;</tt> "The first XMethods service is: " <tt>&lt;&lt;</tt> (*response._Result<tt>-&gt;</tt>__ptr[0]<tt>-&gt;</tt>name) <tt>&lt;&lt;</tt> std::endl; <br />

+&nbsp;&nbsp;&nbsp;<b>else</b><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(service.soap, stderr); <br />

+}

+</td></tr></table><br></i>

+The <i>response</i> data structure is defined in <i>XMethodsQuery.h</i>, and

+contains a SOAP encoded array (<i>__ptr[n]</i>) of pointers to ID-Name pairs

+(<i>__ptr[n]</i><tt>-&gt;</tt><i>id</i> and <i>__ptr[n]</i><tt>-&gt;</tt><i>name</i>). (Note: you may

+want to add NULL checks before dereferencing the pointers.)

+To complete the build, compile and link the generated <i>soapC.cpp</i>,

+<i>soapClient.cpp</i>, and the run-time gSOAP engine <i>stdsoap2.cpp</i> with

+your code.

+

+<div class="p"><!----></div>

+     <h3><a name="tth_sEc1.3">

+1.3</a>&nbsp;&nbsp;<font color="#0000FF">Your First Web Service in CGI</font></h3>

+

+<div class="p"><!----></div>

+Developing a service application is easy too.

+

+<div class="p"><!----></div>

+Suppose we implement a CGI-based service that returns the time in GMT. The

+Common Gateway Interface (CGI) is a simple mechanism to publish services on

+your Web site, but it is certainly not the most efficient way. You can also

+develop high-performance stand-alone gSOAP services with built-in HTTP/S stacks

+or you can use Apache mod_gsoap and IIS (see the <i>extras</i> directory).

+

+<div class="p"><!----></div>

+Our <i>currentTime</i> service only has an output parameter, which is the

+current time:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// File: currentTime.h <br />

+//gsoap ns service name: currentTime <br />

+//gsoap ns service namespace: urn:currentTime <br />

+//gsoap ns service location: http://www.yourdomain.com/currentTime.cgi <br />

+<b>int</b>&nbsp;ns__currentTime(time_t&amp; response);

+</td></tr></table><br></i>

+Note that we must associate an XML namespace with a service. The gSOAP tools

+use a special convention for identifier names that are part of a namespace: a

+namespace prefix (<i>ns</i> in this case) followed by a double underscore

+<i>__</i>. This convention is used to resolve namespaces and to avoid name

+clashes. The <i>ns</i> namespace prefix is bound to the <i>urn:currentTime</i>

+namespace name with the <i>//gsoap</i> directive. The <i>//gsoap</i> directives

+are used to set the properties of the service, in this case the name,

+namespace, and location endpoint.

+

+<div class="p"><!----></div>

+The service implementation for CGI is

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// File: currentTime.cpp <br />

+main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;// create soap context and serve one CGI-based request: <br />

+&nbsp;&nbsp;&nbsp;soap_serve(soap_new()); <br />

+}

+<br />

+<b>int</b>&nbsp;ns__currentTime(<b>struct</b>&nbsp;soap *soap, time_t&amp; response) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;response = time(0); <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+}

+</td></tr></table><br></i>

+Note that we pass the soap struct with the gSOAP context information to the

+service routine, which can be handy to determine properties of the connection

+and to dynamically allocate data with <i>soap_malloc(soap, num_bytes)</i> that

+will be automatically deleted when the service is finished.

+We run the <i>soapcpp2</i> compiler on the header file to generate the

+server-side code:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>$ soapcpp2 -S currentTime.h</i>

+</td></tr></table><br></span>

+and then compile the CGI binary:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>$ c++ -o currentTime.cgi currentTime.cpp soapC.cpp soapServer.cpp stdsoap2.cpp</i>

+</td></tr></table><br></span>

+To activate the service, copy the <i>currentTime.cgi</i> binary to your

+<i>bin-cgi</i> directory with the proper file permissions.

+

+<div class="p"><!----></div>

+The <i>soapcpp2</i> compiler generated the WSDL definitions

+<i>currentTime.wsdl</i>. You can use the WSDL to advertize your service.

+You don't need to use this WSDL to develop a gSOAP client. You can use the

+<i>currentTime.h</i> file with the <i>soapcpp2 -C</i> command to generate

+client-side code.

+

+<div class="p"><!----></div>

+When you contribute a Web service with interesting capabilities, you can

+contact www.XMethods.com to publish your service and see it with the client

+application for the XMethods service listing you developed in the previous

+section.

+

+<div class="p"><!----></div>

+     <h3><a name="tth_sEc1.4">

+1.4</a>&nbsp;&nbsp;<font color="#0000FF">Features</font></h3>

+

+<div class="p"><!----></div>

+The highlights of gSOAP are:

+

+<ul>

+<li>Unique interoperability features: the gSOAP compiler generates SOAP marshalling routines that (de)serialize native and

+user-defined C and C++ data structures.

+<div class="p"><!----></div>

+</li>

+

+<li>

+gSOAP supports WSDL 1.1, SOAP 1.1, SOAP 1.2, SOAP RPC encoding style, and document/literal style.

+<div class="p"><!----></div>

+</li>

+

+<li>

+gSOAP is one of the few SOAP toolkits that support the full range of SOAP 1.1 RPC encoding features

+including sparse multi-dimensional arrays and polymorphic types. For example, a remote method with a base class parameter may accept

+derived class instances from a client. Derived class instances keep their identity through dynamic binding.

+<div class="p"><!----></div>

+</li>

+

+<li>

+gSOAP supports MIME (SwA), DIME, and MTOM attachments.

+<div class="p"><!----></div>

+</li>

+

+<li>

+gSOAP is the only toolkit that supports <em>streaming</em> DIME attachment transfers, which allows you to exchange binary data of practically unlimited size in the fastest possible way (streaming) while ensuring the usefulness of XML interoperability.

+<div class="p"><!----></div>

+</li>

+

+<li>

+gSOAP supports SOAP-over-UDP.

+<div class="p"><!----></div>

+</li>

+

+<li>

+gSOAP supports IPv4 and IPv6.

+<div class="p"><!----></div>

+</li>

+

+<li>

+gSOAP supports Zlib deflate and gzip compression (for HTTP, TCP/IP, and XML file storage).

+<div class="p"><!----></div>

+</li>

+

+<li>

+gSOAP supports SSL (HTTPS).

+<div class="p"><!----></div>

+</li>

+

+<li>

+gSOAP supports HTTP/1.0, HTTP/1.1 keep-alive, chunking, basic authentication, and digest authentication using a plugin.

+<div class="p"><!----></div>

+</li>

+

+<li>

+gSOAP supports SOAP one-way messaging.

+<div class="p"><!----></div>

+</li>

+

+<li>

+The schema-specific XML pull parser is fast and efficient and does not require intermediate data storage for

+demarshalling to save space and time.

+<div class="p"><!----></div>

+</li>

+

+<li>

+The gSOAP <i>soapcpp2</i> compiler includes a WSDL generator for convenient Web Service publishing.

+<div class="p"><!----></div>

+</li>

+

+<li>

+gSOAP includes a WSDL parser <i>wsld2h</i> (WSDL converter to gSOAP header files) for automated client and server development.

+<div class="p"><!----></div>

+</li>

+

+<li>

+Generates source code for stand-alone Web Services and client applications.

+<div class="p"><!----></div>

+</li>

+

+<li>

+Ideal for small devices such as Palm OS, Symbian, Pocket PC, because the memory footprint is small.

+<div class="p"><!----></div>

+</li>

+

+<li>

+Ideal for building web services that are compute-intensive and are therefore best written in C and C++.

+<div class="p"><!----></div>

+</li>

+

+<li>

+Platform independent: Windows, Unix, Linux, Mac OS X, Pocket PC, Palm OS, Symbian, etc.

+<div class="p"><!----></div>

+</li>

+

+<li>

+Supports serializing of application's native C and C++ data structures, which allows you to save and load of XML serialized data structures to and from files.

+<div class="p"><!----></div>

+</li>

+

+<li>

+Selective input and output buffering is used to increase efficiency, but full message buffering to determine HTTP message length

+is not used. Instead, a three-phase serialization method is used to determine message length. As a result, large data sets

+such as base64-encoded images can be transmitted with or without DIME attachments by small-memory devices such as PDAs.

+<div class="p"><!----></div>

+</li>

+

+<li>

+Supports C++ single class inheritance, dynamic binding, overloading, arbitrary pointer structures such as lists, trees, graphs,

+cyclic graphs, fixed-size arrays, (multi-dimensional) dynamic arrays, enumerations, built-in XSD Schema types including

+base64Binary encoding, and hexBinary encoding.

+<div class="p"><!----></div>

+</li>

+

+<li>

+No need to rewrite existing C/C++ applications for Web service deployment. However, parts of an application that use unions,

+pointers to sequences of elements in memory, and <i><b>void</b>*</i> need to be modified, but <b>only</b> if the data structures that

+adopt them are required to be serialized or deserialized as part of a remote method invocation.

+<div class="p"><!----></div>

+</li>

+

+<li>

+Three-phase marshalling: 1) analysis of pointers, single-reference, multi-reference, and cyclic data structures, 2) HTTP

+message-length determination, and 3) serialization as per SOAP 1.1 encoding style or user-defined encoding styles.

+<div class="p"><!----></div>

+</li>

+

+<li>

+Two-phase demarshalling: 1) SOAP parsing and decoding, which involves the reconstruction of multi-reference and cyclic data

+structures from the payload, and 2) resolution of "forward" pointers (i.e. resolution of the forward <tt>href</tt> attributes in SOAP).

+<div class="p"><!----></div>

+</li>

+

+<li>

+Full and customizable SOAP Fault processing (client receive and service send).

+<div class="p"><!----></div>

+</li>

+

+<li>

+Customizable SOAP Header processing (send and receive), which for example enables easy transaction processing for the service to

+keep state information.

+<div class="p"><!----></div>

+</li>

+</ul>

+

+<div class="p"><!----></div>

+ <h2><a name="tth_sEc2">

+2</a>&nbsp;&nbsp;<font color="#0000FF">Notational Conventions</font></h2>

+

+<div class="p"><!----></div>

+The typographical conventions used by this document are:

+

+<dl compact="compact">

+ <dt><b><span class="roman"><i>Sans serif or italics font</i></b></dt>

+	<dd> denotes C and C++ source code, file names, and shell/batch commands.</span></dd>

+ <dt><b><i><b>Bold font</b></i></b></dt>

+	<dd> denotes C and C++ keywords.</dd>

+ <dt><b><tt>Courier font</tt></b></dt>

+	<dd> denotes HTTP header content, HTML, XML, XML Schema content and WSDL content.</dd>

+ <dt><b><span class="roman"><font size="+1"><span class="roman">[</span></font>Optional<font size="+1"><span class="roman">]</span></font></b></dt>

+	<dd> denotes an optional construct.</span></dd>

+</dl>

+

+<div class="p"><!----></div>

+The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and

+"OPTIONAL" in this document are to be interpreted as described in RFC-2119.

+

+<div class="p"><!----></div>

+ <h2><a name="tth_sEc3">

+3</a>&nbsp;&nbsp;<font color="#0000FF">Differences Between gSOAP Versions 2.4 (and Earlier) and 2.5</font></h2>

+

+<div class="p"><!----></div>

+To comply with WS-I Basic Profile 1.0a, gSOAP 2.5 and higher adopts SOAP document/literal by default.

+There is no need for concern, because the WSDL parser <i>wsdl2h</i> automatically takes care of the differences when you provide a WSDL document, because SOAP RPC encoding, literal, and document style are supported.

+A new soapcpp2 compiler option was added <i>-e</i> for backward compatibility with gSOAP 2.4 and earlier to adopt SOAP RPC encoding by default in case you want to develop a service that uses SOAP encoding. You can also use the gSOAP compiler directives to specify SOAP encoding for individual operarations, when desired.

+

+<div class="p"><!----></div>

+ <h2><a name="tth_sEc4">

+4</a>&nbsp;&nbsp;<font color="#0000FF">Differences Between gSOAP Versions 2.1 (and Earlier) and 2.2</font></h2>

+

+<div class="p"><!----></div>

+You should read this section only if you are upgrading from gSOAP 2.1 to 2.2 and later.

+

+<div class="p"><!----></div>

+Run-time options and flags have been changed to enable separate recv/send

+settings for transport, content encodings, and mappings.  The flags are divided

+into four classes: transport (IO), content encoding (ENC), XML marshalling

+(XML), and C/C++ data mapping (C).  The old-style flags <i>soap_disable_X</i>

+and <i>soap_enable_X</i>, where <i>X</i> is a particular feature, are

+deprecated.  See Section&nbsp;<a href="#sec:flags">8.12</a> for more details.

+

+<div class="p"><!----></div>

+ <h2><a name="tth_sEc5">

+5</a>&nbsp;&nbsp;<font color="#0000FF">Differences Between gSOAP Versions 1.X and 2.X</font></h2>

+

+<div class="p"><!----></div>

+You should read this section only if you are upgrading from gSOAP 1.X to 2.X.

+

+<div class="p"><!----></div>

+gSOAP versions 2.0 and later have been rewritten based on versions 1.X.

+gSOAP 2.0 and later is thread-safe, while 1.X is not.

+All files in the gSOAP 2.X distribution are renamed to avoid confusion with gSOAP version 1.X files:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td><font color="#FF0000"><b>gSOAP 1.X</b></font>	</td><td><font color="#FF0000"><b>gSOAP 2.X</b></font> </td></tr>

+<tr><td>soapcpp		</td><td>soapcpp2 </td></tr>

+<tr><td>soapcpp.exe	</td><td>soapcpp2.exe </td></tr>

+<tr><td>stdsoap.h	</td><td>stdsoap2.h </td></tr>

+<tr><td>stdsoap.c	</td><td>stdsoap2.c </td></tr>

+<tr><td>stdsoap.cpp	</td><td>stdsoap2.cpp </td></tr></table>

+

+</td></tr></table><br></span>

+Changing the version 1.X application codes to accommodate gSOAP 2.X does not require a significant amount of recoding.

+The change to gSOAP 2.X affects all functions defined in <i>stdsoap2.c[pp]</i> (the gSOAP runtime environment API) and the functions in the

+sources generated by the gSOAP compiler (the gSOAP RPC+marshalling API).

+Therefore, clients and services developed with gSOAP 1.X need to be modified to accommodate a change in the calling convention used in 2.X:

+In 2.X, <b>all</b> gSOAP functions (including the remote method proxy routines) take an additional parameter which is an instance of the gSOAP runtime

+environment that includes file descriptors, tables, buffers, and flags.

+This additional parameter is <b>always</b> the first parameter of any gSOAP function.

+

+<div class="p"><!----></div>

+The gSOAP runtime environment is stored in a <i><b>struct</b>&nbsp;soap</i> type. A <i><b>struct</b></i> was chosen to support application development in

+C without the need for a separate gSOAP implementation.  An object-oriented approach with a class for the gSOAP runtime environment would have prohibited the implementation of pure C applications.

+Before a client can invoke remote methods or before a service can accept requests, a runtime environment need to be allocated and

+initialized.

+Three new functions are added to gSOAP 2.X:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td><font color="#FF0000"><b>Function</b></font> </td><td width="351"><font color="#FF0000"><b>Description</b></font> </td></tr>

+<tr><td><i>soap_init(<b>struct</b>&nbsp;soap *soap)</i> </td><td width="351">Initializes a runtime environment (required only once) </td></tr>

+<tr><td><i><b>struct</b>&nbsp;soap *soap_new()</i> </td><td width="351">Allocates, initializes, and returns a pointer to a runtime environment </td></tr>

+<tr><td><i><b>struct</b>&nbsp;soap *soap_copy(<b>struct</b>&nbsp;soap *soap)</i> </td><td width="351">Allocates a new runtime environment and copies contents of

+the argument environment such that the new environment does not share any data

+with the original environment </td></tr></table>

+

+</td></tr></table><br></span>

+An environment can be reused as many times as necessary and does not need to be reinitialized in doing so.

+A new environment is only required for each new thread to guarantee exclusive access

+to a new runtime environment by each thread.

+For example, the following code stack-allocates the runtime environment which is used for multiple remote method calls:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); // initialize runtime environment <br />

+&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;soap_call_ns__method1(&amp;soap, ...); // make a remote call <br />

+&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;soap_call_ns__method2(&amp;soap, ...); // make another remote call <br />

+&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;soap_destroy(&amp;soap); // remove deserialized class instances (C++ only) <br />

+&nbsp;&nbsp;&nbsp;soap_end(&amp;soap); // clean up and remove deserialized data <br />

+&nbsp;&nbsp;&nbsp;soap_done(&amp;soap); // detach environment (last use and no longer in scope)<br />

+&nbsp;&nbsp;&nbsp;... <br />

+}

+</td></tr></table><br></i>

+The runtime environment can also be heap allocated:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap *soap; <br />

+&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;soap = soap_new(); // allocate and initialize runtime environment <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!soap) // couldn't allocate: stop <br />

+&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;soap_call_ns__method1(soap, ...); // make a remote call <br />

+&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;soap_call_ns__method2(soap, ...); // make another remote call <br />

+&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;soap_destroy(soap); // remove deserialized class instances (C++ only) <br />

+&nbsp;&nbsp;&nbsp;soap_end(soap); // clean up and remove deserialized data <br />

+&nbsp;&nbsp;&nbsp;soap_done(soap); // detach runtime environment <br />

+&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;free(soap); // deallocate runtime environment <br />

+}

+</td></tr></table><br></i>

+A service need to allocate and initialize an environment before calling <i>soap_serve</i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;soap_serve(&amp;soap); <br />

+}

+</td></tr></table><br></i>

+Or alternatively:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;soap_serve(soap_new()); <br />

+}

+</td></tr></table><br></i>

+The <i>soap_serve</i> dispatcher handles one request or multiple requests when HTTP keep-alive is enabled (with the <i>SOAP_IO_KEEPALIVE</i> flag see Section&nbsp;<a href="#sec:keepalive">18.11</a>).

+

+<div class="p"><!----></div>

+A service can use multi-threading to handle requests while running some other code that invokes remote methods:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap1, soap2; <br />

+&nbsp;&nbsp;&nbsp;pthread_t tid; <br />

+&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap1); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_bind(&amp;soap1, host, port, backlog)  &lt;  0) exit(1); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_accept(&amp;soap1)  &lt;  0) exit(1); <br />

+&nbsp;&nbsp;&nbsp;pthread_create(&amp;tid, NULL, (<b>void</b>*(*)(<b>void</b>*))soap_serve, (<b>void</b>*)&amp;soap1); <br />

+&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap2); <br />

+&nbsp;&nbsp;&nbsp;soap_call_ns__method(&amp;soap2, ...); // make a remote call <br />

+&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;soap_end(&amp;soap2); <br />

+&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;pthread_join(tid, NULL); // wait for thread to terminate <br />

+&nbsp;&nbsp;&nbsp;soap_end(&amp;soap1); // release its data <br />

+}

+</td></tr></table><br></i>

+In the example above, two runtime environments are required.

+In comparison, gSOAP 1.X statically allocates the runtime environment, which prohibits multi-threading (only one thread can invoke

+remote methods and/or accept requests due to the single runtime environment).

+

+<div class="p"><!----></div>

+Section&nbsp;<a href="#sec:mt">7.2.4</a> presents a multi-threaded stand-alone Web Service that handles multiple SOAP requests by spawning a thread for each request.

+

+<div class="p"><!----></div>

+ <h2><a name="tth_sEc6">

+6</a>&nbsp;&nbsp;<font color="#0000FF">Interoperability</font></h2>

+

+<div class="p"><!----></div>

+gSOAP interoperability has been verified with the following SOAP implementations and toolkits:

+

+<dl compact="compact">

+ <dt><b>Apache 2.2</b></dt>

+	<dd></dd>

+ <dt><b>Apache Axis</b></dt>

+	<dd></dd>

+ <dt><b>ASP.NET</b></dt>

+	<dd></dd>

+ <dt><b>Cape Connect</b></dt>

+	<dd></dd>

+ <dt><b>Delphi</b></dt>

+	<dd></dd>

+ <dt><b>easySOAP++</b></dt>

+	<dd></dd>

+ <dt><b>eSOAP</b></dt>

+	<dd></dd>

+ <dt><b>Frontier</b></dt>

+	<dd></dd>

+ <dt><b>GLUE</b></dt>

+	<dd></dd>

+ <dt><b>Iona XMLBus</b></dt>

+	<dd></dd>

+ <dt><b>kSOAP</b></dt>

+	<dd></dd>

+ <dt><b>MS SOAP</b></dt>

+	<dd></dd>

+ <dt><b>Phalanx</b></dt>

+	<dd></dd>

+ <dt><b>SIM</b></dt>

+	<dd></dd>

+ <dt><b>SOAP::Lite</b></dt>

+	<dd></dd>

+ <dt><b>SOAP4R</b></dt>

+	<dd></dd>

+ <dt><b>Spray</b></dt>

+	<dd></dd>

+ <dt><b>SQLData</b></dt>

+	<dd></dd>

+ <dt><b>Wasp Adv.</b></dt>

+	<dd></dd>

+ <dt><b>Wasp C++</b></dt>

+	<dd></dd>

+ <dt><b>White Mesa</b></dt>

+	<dd></dd>

+ <dt><b>xSOAP</b></dt>

+	<dd></dd>

+ <dt><b>ZSI</b></dt>

+	<dd></dd>

+ <dt><b>4S4C</b></dt>

+	<dd></dd>

+</dl>

+

+<div class="p"><!----></div>

+ <h2><a name="tth_sEc7">

+7</a>&nbsp;&nbsp;<font color="#0000FF">Quick User Guide</font></h2>

+

+<div class="p"><!----></div>

+This user guide offers a quick way to get started with gSOAP.  This section

+requires a basic understanding of the SOAP 1.1 protocol and some familiarity

+with C and/or C++. In principle, SOAP clients and SOAP Web services can be

+developed in C and C++ with the gSOAP compiler without a detailed understanding

+of the SOAP protocol when gSOAP client-server applications are built as an

+ensamble and only communicate within this group (i.e.&nbsp;meaning that you don't

+have to worry about interoperability with other SOAP implementations).  This

+section is intended to illustrate the implementation of gSOAP Web services and

+clients that connect to and interoperate with other SOAP implementations such

+as Apache Axis, SOAP::Lite, and .NET.  This requires some details of the SOAP

+and WSDL protocols to be understood.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc7.1">

+7.1</a>&nbsp;&nbsp;<font color="#0000FF">How to Use the gSOAP Stub and Skeleton Compiler to Build SOAP Clients</font></h3><a name="sec:client">

+</a>

+

+<div class="p"><!----></div>

+In general, the implementation of a SOAP client application requires a <b>

+stub</b> routine for each remote method that the client application needs to

+invoke.  The primary stub's responsibility is to marshall the parameter data, send

+the request with the parameters to the designated SOAP service over the wire, to wait for the

+response, and to demarshall the parameter data of the response when it arrives. The client

+application invokes the stub routine for a remote method as if it would invoke

+a local method.  To write a stub routine in C or C++ by hand is a tedious task,

+especially if the input and/or output parameters of a remote method contain

+elaborate data structures such as records, arrays, and graphs. Fortunately, the

+gSOAP 'wsdl2h' WSDL parser and 'soapcpp2' stub and skeleton compiler automate the

+development of Web service client and server applications.

+

+<div class="p"><!----></div>

+The gSOAP stub and skeleton compiler is a <b>preprocessor</b> that generates the

+necessary C++ sources to build SOAP C++ clients. The input to the gSOAP stub

+and skeleton compiler consists of a standard C/C++ <b>header file</b>.  The

+header file can be generated from a WSDL (Web Service Description Language)

+documentation of a service with the gSOAP WSDL parser.

+

+<div class="p"><!----></div>

+Consider the following command (entered at the command prompt):

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+$ wsdl2h -o quote.h http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl

+</td></tr></table><br></span>

+This generates the file <i>quote.h</i> in C++ format from the WSDL at the specified URL.

+

+<div class="p"><!----></div>

+To generate a header file to develop a pure C client application, issue the command:

+Consider the following command (entered at the command prompt):

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+$ wsdl2h -c -o quote.h http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl

+</td></tr></table><br></span>

+For more details on the WSDL parser and its options, see&nbsp;<a href="#sec:wsdlin">7.2.10</a>.

+

+<div class="p"><!----></div>

+The <i>quote.h</i> header file is then processed by the gSOAP compiler to generate the stubs to develop client applications

+(and skeletons to develop a service).

+

+<div class="p"><!----></div>

+The SOAP service methods are specified in the header file as <b>function

+prototypes</b>. Stub routines in C/C++ source form are automatically generated by

+the gSOAP compiler for these function prototypes of remote methods.  The

+resulting stub routines allow C and C++ client applications to seamlessly

+interact with existing SOAP Web services.

+

+<div class="p"><!----></div>

+The gSOAP stub and skeleton compiler also generates <b>skeleton</b> routines for

+each of the remote methods specified in the header file. The skeleton routines

+can be readily used to implement one or more of the remote methods in a new

+SOAP Web service. These skeleton routines are not used for building SOAP

+clients in C++, although they can be used to build mixed SOAP client/server

+applications (peer applications).

+

+<div class="p"><!----></div>

+The input and output parameters of a SOAP service method may be simple data

+types or compound data types, either generated by the WSDL parser or specified by hand.

+The gSOAP stub and skeleton compiler automatically generates <b>

+serializers</b> and <b>deserializers</b> for the data types to enable the generated

+stub routines to encode and decode the contents of the parameters of the remote

+methods in XML.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.1.1">

+7.1.1</a>&nbsp;&nbsp;<font color="#0000FF">Example</font></h4><a name="sec:example1">

+</a>

+

+<div class="p"><!----></div>

+The <i>getQuote</i> remote method of XMethods Delayed Stock Quote service (defined in the <i>quote.h</i> file obtained with the 'wsdl2h' WSDL parser)

+provides a delayed stock quote for a given ticker name.

+The WSDL description of the XMethods Delayed Stock Quote service provides the following details:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td>Endpoint URL: </td><td><tt>http://services.xmethods.net:80/soap</tt> </td></tr>

+<tr><td>SOAP action: </td><td>"" (2 quotes) </td></tr>

+<tr><td>Remote method namespace: </td><td><tt>urn:xmethods-delayed-quotes</tt> </td></tr>

+<tr><td>Remote method name: </td><td><tt>getQuote</tt> </td></tr>

+<tr><td>&nbsp;&nbsp;&nbsp;Input parameter: </td><td><tt>symbol</tt> of type <tt>xsd:string</tt> </td></tr>

+<tr><td>&nbsp;&nbsp;&nbsp;Output parameter: </td><td><tt>Result</tt> of type <tt>xsd:float</tt>

+</td></tr></table>

+

+</td></tr></table><br></span>

+The following <i>getQuote.h</i> header file for C is created from the WSDL description with the WSDL parser

+(the actual contents may vary depending on the 'wsdl2h' release version and the options used to determine the output):

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap ns1 service name:       net_DOTxmethods_DOTservices_DOTstockquote_DOTStockQuoteBinding  <br />

+//gsoap ns1 service type:       net_DOTxmethods_DOTservices_DOTstockquote_DOTStockQuotePortType  <br />

+//gsoap ns1 service port:       http://66.28.98.121:9090/soap <br />

+//gsoap ns1 service namespace:  urn:xmethods-delayed-quotes <br />

+//gsoap ns1 service documentation:      Definitions generated by the gSOAP WSDL parser 1.0  <br />

+// Service net.xmethods.services.stockquote.StockQuoteService : net.xmethods.services.stockquote.StockQuote web service <br />

+<br />

+//gsoap ns1 service method-style:       getQuote rpc <br />

+//gsoap ns1 service method-encoding:    getQuote http://schemas.xmlsoap.org/soap/encoding/ <br />

+//gsoap ns1 service method-action:      getQuote urn:xmethods-delayed-quotes#getQuote <br />

+<b>int</b>&nbsp;ns1__getQuote(<b>char</b>&nbsp;*symbol, <b>float</b>&nbsp;&amp;Result);

+</td></tr></table><br></i>

+The header file essentially specifies the service details in C/C++ with

+directives for the gSOAP compiler.  The remote method is declared as a

+<i>ns1__getQuote</i> <b>function prototype</b> which specifies all of the

+necessary details for the gSOAP compiler to generate the stub routine for a

+client application to interact with the Delayed Stock Quote service.

+

+<div class="p"><!----></div>

+The Delayed Stock Quote service description requires that the <b>input

+parameter</b> of the <i>getQuote</i> remote method is a <i>symbol</i> parameter of

+type string. The description also indicates that the <i>Result</i> <b>output

+parameter</b> is a floating point number that represents the current unit price of

+the stock in dollars. The gSOAP compiler uses the convention the <b>last

+parameter</b> of the function prototype must be the output parameter of the remote

+method, which is required to be passed by reference using the reference

+operator (<i>&amp;</i>) or by using a pointer type. All other parameters except the

+last are input parameters of the remote method, which are required to be passed

+by value or passed using a pointer to a value (by reference is not allowed).

+The function prototype associated with a remote method is required to return an

+<i><b>int</b></i>, whose value indicates to the caller whether the connection to a

+SOAP Web service was successful or resulted in an exception, see

+Section&nbsp;<a href="#sec:errcodes">9.2</a> for the error codes. 

+

+<div class="p"><!----></div>

+The use of the namespace prefix <i>ns1__</i> in the remote method name in the

+function prototype declaration is discussed in detail in&nbsp;<a href="#sec:namespace">7.1.2</a>.

+Basically, a namespace prefix is distinguished by a <b>pair of underscores</b>

+in the function name, as in <i>ns1__getQuote</i> where <i>ns1</i> is the

+namespace prefix and <i>getQuote</i> is the remote method name.  (A single

+underscore in an identifier name will be translated into a dash in XML, because

+dashes are more frequently used in XML compared to underscores, see

+Section&nbsp;<a href="#sec:idtrans">9.3</a>.)

+

+<div class="p"><!----></div>

+The gSOAP compiler is invoked from the command line with:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>soapcpp2 getQuote.h</i>

+</td></tr></table><br></span>

+The compiler generates the stub routine for the <i>getQuote</i> remote method

+specified in the <i>getQuote.h</i> header file. This stub routine can be called

+by a client program at any time to request a stock quote from the Delayed Stock

+Quote service. The interface to the generated stub routine is the following

+function prototype generated by the gSOAP compiler:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;soap_call_ns1__getQuote(<b>struct</b>&nbsp;soap *soap, <b>char</b>&nbsp;*URL, <b>char</b>&nbsp;*action, <b>char</b>&nbsp;*symbol, <b>float</b>&nbsp;&amp;Result);

+</td></tr></table><br></i>

+The stub routine is saved in <i>soapClient.cpp</i>. The file <i>soapC.cpp</i>

+contains the <b>serializer</b> and <b>deserializer</b> routines for the data

+types used by the stub. You can use option <i>-c</i> for the <i>soapcpp2</i> compiler to

+generate pure C code.

+

+<div class="p"><!----></div>

+Note that the parameters of the <i>soap_call_ns1__getQuote</i> function are

+identical to the <i>ns1__getQuote</i> function prototype with three additional

+input parameters: <i>soap</i> must be a valid pointer to a gSOAP runtime

+environment, <i>URL</i> is the SOAP Web service <b>endpoint URL</b> passed as a

+string, and <i>action</i> is a string that denotes the <b>SOAP action</b>

+required by the Web service.

+Note that the XMethods Delayed Stock Quote service endpoint URL is

+<tt>http://66.28.98.121:9090/soap</tt> and the SOAP action required is

+<tt>""</tt> (two quotes). You can change the endpoint and action dynamically. The endpoint and action are the second and third parameters of the <i>soap_call_ns1__getQuote</i>. When NULL, the values specified in the header file will be used.

+

+<div class="p"><!----></div>

+The following example mixed C/C++ client program invokes the stub to retrieve the latest IBM stock quote from the XMethods Delayed Stock

+Quote service:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include <tt>"soapH.h"</tt> // obtain the generated stub <br />

+#include <tt>"net_DOT_xmethods_DOT_services_DOT_stockquote_DOT_StockQuoteBinding.nsmap"</tt> // obtain the namespace mapping table <br />

+<b>int</b>&nbsp;main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; // gSOAP runtime environment <br />

+&nbsp;&nbsp;&nbsp;<b>float</b>&nbsp;quote; <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); // initialize runtime environment (only once) <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_call_ns1__getQuote(&amp;soap, NULL, NULL, <tt>"IBM"</tt>, &amp;quote) == SOAP_OK) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;std::cout  &lt;&lt;  "Current IBM Stock Quote = "  &lt;&lt;  quote  &lt;&lt;  std::endl; <br />

+&nbsp;&nbsp;&nbsp;<b>else</b>&nbsp;// an error occurred <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); // display the SOAP fault message on the stderr stream <br />

+&nbsp;&nbsp;&nbsp;soap_destroy(&amp;soap); // delete deserialized class instances (for C++ only) <br />

+&nbsp;&nbsp;&nbsp;soap_end(&amp;soap); // remove deserialized data and clean up <br />

+&nbsp;&nbsp;&nbsp;soap_done(&amp;soap); // detach the gSOAP environment <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;0; <br />

+}

+</td></tr></table><br></i>

+When successful, the stub returns <i>SOAP_OK</i> and

+<i>quote</i> contains the latest stock quote.  Otherwise, an error occurred and

+the SOAP fault is displayed with the <i>soap_print_fault</i> function.

+

+<div class="p"><!----></div>

+The gSOAP compiler also generates a proxy class for C++ client applications. This generated proxy class can be included into a client application together with the generated namespace table as shown in this example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include <tt>"soapnet_DOT_xmethods_DOT_services_DOT_stockquote_DOT_StockQuoteBindingProxy.h"</tt> // get proxy <br />

+#include <tt>"net_DOT_xmethods_DOT_services_DOT_stockquote_DOT_StockQuoteBinding.nsmap"</tt> // obtain the namespace mapping table <br />

+<b>int</b>&nbsp;main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;net q; // "net" is the proxy class with a name that is the short name of the service <br />

+&nbsp;&nbsp;&nbsp;<b>float</b>&nbsp;r; <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(q.ns1__getQuote("IBM", r) == SOAP_OK) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;std::cout  &lt;&lt;  r  &lt;&lt;  std::endl; <br />

+&nbsp;&nbsp;&nbsp;<b>else</b><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(q.soap, stderr); <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;0; <br />

+}

+</td></tr></table><br></i>

+The proxy class constructor allocates and initializes a gSOAP environment for the instance.

+All the HTTP and SOAP/XML processing is hidden and performed on the background.

+Note that you can change the name of the service in the header file generated by the WSDL parser.

+The name is extracted from the WSDL content and may not always be in a short format. Feel free to change the entry

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap ns1 service name:       net_DOT_xmethods_DOT_services_DOT_stockquote_DOT_StockQuoteBinding

+</td></tr></table><br></i>

+to use a more suitable name. The name will control the file name of the proxy class file and the XML namespace mapping table.

+

+<div class="p"><!----></div>

+The following functions can be used to explicitly setup a gSOAP runtime environment (<i><b>struct</b>&nbsp;soap</i>):

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td><font color="#FF0000"><b>Function</b></font> </td><td width="351"><font color="#FF0000"><b>Description</b></font> </td></tr>

+<tr><td><i>soap_init(<b>struct</b>&nbsp;soap *soap)</i> </td><td width="351">Initializes a runtime environment (required only once) </td></tr>

+<tr><td><i>soap_init1(<b>struct</b>&nbsp;soap *soap, soap_mode iomode)</i> </td><td width="351">Initializes a runtime environment and set in/out mode flags </td></tr>

+<tr><td><i>soap_init2(<b>struct</b>&nbsp;soap *soap, soap_mode imode, soap_mode omode)</i> </td><td width="351">Initializes a runtime environment and set separate in/out mode flags </td></tr>

+<tr><td><i><b>struct</b>&nbsp;soap *soap_new()</i> </td><td width="351">Allocates, initializes, and returns a pointer to a runtime environment </td></tr>

+<tr><td><i><b>struct</b>&nbsp;soap *soap_new1(soap_mode iomode)</i> </td><td width="351">Allocates, initializes, and returns a pointer to a runtime environment and set in/out mode flags </td></tr>

+<tr><td><i><b>struct</b>&nbsp;soap *soap_new2(soap_mode imode, soap_mode omode)</i> </td><td width="351">Allocates, initializes, and returns a pointer to a runtime environment and set separate in/out mode flags </td></tr>

+<tr><td><i><b>struct</b>&nbsp;soap *soap_copy(<b>struct</b>&nbsp;soap *soap)</i> </td><td width="351">Allocates a new runtime environment and copies contents of

+the argument environment such that the new environment does not share data with the argument environment </td></tr>

+<tr><td><i>soap_done(<b>struct</b>&nbsp;soap *soap)</i> </td><td width="351">Reset, close communications, and remove callbacks </td></tr></table>

+

+</td></tr></table><br></span>

+An environment can be reused as many times as necessary for client-side remote calls and does not need to be reinitialized in doing so.

+A new environment is required for each new thread to guarantee exclusive access

+to runtime environments by threads.  Also the use of any client calls within an active service method requires a new environment.

+

+<div class="p"><!----></div>

+When the example client application is invoked, the SOAP request is performed by the stub routine <i>soap_call_ns1__getQuote</i>, which

+generates the following SOAP RPC request message:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+POST /soap HTTP/1.1 <br />

+Host: services.xmethods.net <br />

+Content-Type: text/xml <br />

+Content-Length: 529 <br />

+SOAPAction: "" <br />

+<br />

+&lt;?xml version="1.0" encoding="UTF-8"?&#62; <br />

+&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" <br />

+&nbsp;&nbsp;&nbsp;xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" <br />

+&nbsp;&nbsp;&nbsp;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <br />

+&nbsp;&nbsp;&nbsp;xmlns:xsd="http://www.w3.org/2001/XMLSchema" <br />

+&nbsp;&nbsp;&nbsp;xmlns:ns1="urn:xmethods-delayed-quotes" <br />

+&nbsp;&nbsp;&nbsp;SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&#62; <br />

+&lt;SOAP-ENV:Body&#62; <br />

+&lt;ns1:getQuote&#62; <br />

+&lt;symbol&#62;IBM&lt;/symbol&#62; <br />

+&lt;/ns1:getQuote&#62; <br />

+&lt;/SOAP-ENV:Body&#62; <br />

+&lt;/SOAP-ENV:Envelope&#62;

+</td></tr></table><br></tt>

+The XMethods Delayed Stock Quote service responds with the SOAP response message:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+HTTP/1.1 200 OK <br />

+Date: Sat, 25 Aug 2001 19:28:59 GMT <br />

+Content-Type: text/xml <br />

+Server: Electric/1.0 <br />

+Connection: Keep-Alive <br />

+Content-Length: 491 <br />

+<br />

+&lt;?xml version="1.0" encoding="UTF-8"?&#62; <br />

+&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" <br />

+&nbsp;&nbsp;&nbsp;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <br />

+&nbsp;&nbsp;&nbsp;xmlns:xsd="http://www.w3.org/2001/XMLSchema" <br />

+&nbsp;&nbsp;&nbsp;xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" <br />

+&nbsp;&nbsp;&nbsp;soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/&#187; <br />

+&lt;soap:Body&#62; <br />

+&lt;n:getQuoteResponse xmlns:n="urn:xmethods-delayed-quotes&#187; <br />

+&lt;Result xsi:type="xsd:float&#187;41.81&lt;/Result&#62; <br />

+&lt;/n:getQuoteResponse&#62; <br />

+&lt;/soap:Body&#62; <br />

+&lt;/soap:Envelope&#62;

+</td></tr></table><br></tt>

+The server's SOAP RPC response is parsed by the stub. The stub routine further demarshalls the data of <tt>Result</tt>

+element of the SOAP response and stores it in the <i>quote</i> parameter of <i>soap_call_ns1__getQuote</i>.

+

+<div class="p"><!----></div>

+A client program can invoke a remote method at any time and multiple times if necessary. Consider for example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+... <br />

+<b>struct</b>&nbsp;soap soap; <br />

+<b>float</b>&nbsp;quotes[3]; char *myportfolio[] = {<tt>"IBM"</tt>, <tt>"MSDN"</tt>}; <br />

+soap_init(&amp;soap); // need to initialize only once <br />

+<b>for</b>&nbsp;(<b>int</b>&nbsp;i = 0; i  &lt;  3; i++) <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_call_ns1__getQuote(&amp;soap, <tt>"http://services.xmethods.net:80/soap"</tt>, <tt>""</tt>, myportfolio[i], &amp;quotes[i]) != SOAP_OK) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>break</b>; <br />

+<b>if</b>&nbsp;(soap.error) // an error occurred <br />

+&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); <br />

+soap_end(&amp;soap); // clean up all deserialized data <br />

+...

+</td></tr></table><br></i>

+This client composes an array of stock quotes by calling the <i>ns1__getQuote</i> stub routine for each symbol in a portfolio array.

+

+<div class="p"><!----></div>

+This example demonstrated how easy it is to build a SOAP client with gSOAP once the details of a Web service are available 

+in the form of a WSDL document.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.1.2">

+7.1.2</a>&nbsp;&nbsp;<font color="#0000FF">Namespace Considerations</font></h4><a name="sec:namespace">

+</a>

+

+<div class="p"><!----></div>

+The declaration of the <i>ns1__getQuote</i> function prototype (discussed in the previous section) uses the namespace prefix

+<i>ns1__</i> of the remote method namespace, which is distinguished by a <b>pair of underscores</b> in the function name to

+separate the namespace prefix from the remote method name.  The purpose of a namespace prefix is to associate a remote

+method name with a service in order to prevent naming conflicts, e.g.&nbsp;to distinguish identical remote method names used

+by different services.

+

+<div class="p"><!----></div>

+Note that the XML response of the XMethods Delayed Stock Quote service example uses the <b>namespace prefix</b> <tt>n</tt> which is

+bound to the <b>namespace name</b> <tt>urn:xmethods-delayed-quotes</tt> through the <tt>xmlns:n="urn:xmethods-delayed-quotes</tt>

+binding.  The use of namespace prefixes and namespace names is also required to enable SOAP applications to validate the content of

+SOAP messages.  The namespace name in the service response is verified by the stub routine by using the

+information supplied in a <b>namespace mapping table</b> that is required to be part of gSOAP client and service application codes.  The table is accessed

+at run time to resolve namespace bindings, both by the generated stub's data structure serializer for encoding the client request

+and by the generated stub's data structure deserializer to decode and validate the service response. The namespace mapping table

+should <b>not</b> be part of the header file input to the gSOAP stub and skeleton compiler. Service details including namespace bindings may be provided with gSOAP directives in a header file, see Section&nbsp;<a href="#sec:directives">18.2</a>.

+

+<div class="p"><!----></div>

+The namespace mapping table for the Delayed Stock Quote client is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;Namespace namespaces[] = <br />

+{&nbsp;&nbsp;&nbsp;// {"ns-prefix", "ns-name"} <br />

+&nbsp;&nbsp;&nbsp;{<font color="#FF0000">"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"</font>}, // MUST be first <br />

+&nbsp;&nbsp;&nbsp;{<font color="#0000FF">"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/"</font>}, // MUST be second <br />

+&nbsp;&nbsp;&nbsp;{<font color="#FF00FF">"xsi",      "http://www.w3.org/2001/XMLSchema-instance"</font>}, // MUST be third <br />

+&nbsp;&nbsp;&nbsp;{<font color="#00FFFF">"xsd",      "http://www.w3.org/2001/XMLSchema"</font>}, // 2001 XML Schema <br />

+&nbsp;&nbsp;&nbsp;{<font color="#00FF00">"ns1",      "urn:xmethods-delayed-quotes"</font>}, // given by the service description <br />

+&nbsp;&nbsp;&nbsp;{NULL, NULL} // end of table <br />

+};

+</td></tr></table><br></i> 

+The first four namespace entries in the table consist of the standard namespaces used by the SOAP 1.1 protocol. In fact, the

+namespace mapping table is explicitly declared to enable a programmer to specify the SOAP encoding style and to allow the

+inclusion of namespace-prefix with namespace-name bindings to comply to the namespace requirements of a specific SOAP service. For

+example, the namespace prefix <tt>ns1</tt>, which is bound to <tt>urn:xmethods-delayed-quotes</tt> by the namespace mapping table shown

+above, is used by the generated stub routine to encode the <i>getQuote</i> request. This is performed automatically by the gSOAP

+compiler by using the <i>ns1</i> prefix of the <i>ns1__getQuote</i> method name specified in the <i>getQuote.h</i> header file. In

+general, if a function name of a remote method, <i><b>struct</b></i> name, <i><b>class</b></i> name, <i><b>enum</b></i> name, or field name of a

+<i><b>struct</b></i> or <i><b>class</b></i> has a pair of underscores, the name has a namespace prefix that must be defined in the namespace

+mapping table.

+

+<div class="p"><!----></div>

+The namespace mapping table will be output as part of the SOAP Envelope by the stub routine. For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+... <br />

+&lt;SOAP-ENV:Envelope xmlns:<font color="#FF0000">SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"</font> <br />

+&nbsp;&nbsp;&nbsp;xmlns:<font color="#0000FF">SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"</font> <br />

+&nbsp;&nbsp;&nbsp;xmlns:<font color="#FF00FF">xsi="http://www.w3.org/2001/XMLSchema-instance"</font> <br />

+&nbsp;&nbsp;&nbsp;xmlns:<font color="#00FFFF">xsd="http://www.w3.org/2001/XMLSchema"</font> <br />

+&nbsp;&nbsp;&nbsp;xmlns:<font color="#00FF00">ns1="urn:xmethods-delayed-quotes"</font> <br />

+&nbsp;&nbsp;&nbsp;SOAP-ENV:encodingStyle=<font color="#0000FF">"http://schemas.xmlsoap.org/soap/encoding/"</font>&#62; <br />

+...

+</td></tr></table><br></tt>

+The namespace bindings will be used by a SOAP service to validate the SOAP request.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.1.3">

+7.1.3</a>&nbsp;&nbsp;<font color="#0000FF">Example</font></h4><a name="sec:example2">

+</a>

+

+<div class="p"><!----></div>

+The incorporation of namespace prefixes into C++ identifier names is necessary to distinguish remote methods that

+share the same name but are provided by separate Web services and/or organizations. Consider for example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of file "getQuote.h": <br />

+<b>int</b>&nbsp;ns1__getQuote(<b>char</b>&nbsp;*symbol, <b>float</b>&nbsp;&amp;Result); <br />

+<b>int</b>&nbsp;ns2__getQuote(<b>char</b>&nbsp;*ticker, <b>char</b>&nbsp;*&amp;quote);

+</td></tr></table><br></i>

+Recall that the namespace prefix is always separated from the name of a remote method by a pair of underscores (<i>__</i>).

+

+<div class="p"><!----></div>

+This example enables a client program to connect to a (hypothetical) Stock Quote service with remote methods that can only be

+distinguished by their namespaces. Consequently, two different namespace prefixes had to be used as part of the remote method

+names.

+

+<div class="p"><!----></div>

+The namespace prefix convention can also be applied to <i><b>class</b></i> declarations that contain SOAP compound values

+that share the same name but have different namespaces that refer to different XML Schemas. For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>class</b>&nbsp;<font color="#FF0000">e__Address</font> // an electronic address <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;char *email; <br />

+&nbsp;&nbsp;&nbsp;char *url; <br />

+}; <br />

+<b>class</b>&nbsp;<font color="#0000FF">s__Address</font> // a street address <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;char *street; <br />

+&nbsp;&nbsp;&nbsp;int number; <br />

+&nbsp;&nbsp;&nbsp;char *city; <br />

+};

+</td></tr></table><br></i>

+The namespace prefix is separated from the name of a data type by a pair of underscores (<i>__</i>).

+

+<div class="p"><!----></div>

+An instance of <i><font color="#FF0000">e__Address</font></i> is encoded by the generated serializer for this type as an Address element with namespace prefix <i><font color="#FF0000">e</font></i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;<font color="#FF0000">e:Address</font> xsi:type="<font color="#FF0000">e:Address</font>"&#62; <br />

+&lt;email xsi:type="string"&#62;me@home&lt;/email&#62; <br />

+&lt;url xsi:type="string"&#62;www.me.com&lt;/url&#62; <br />

+&lt;/<font color="#FF0000">e:Address</font>&#62;

+</td></tr></table><br></tt>

+While an instance of <i><font color="#0000FF">s__Address</font></i> is encoded by the generated serializer for this type as an Address element with namespace prefix <i><font color="#0000FF">s</font></i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;<font color="#0000FF">s:Address</font> xsi:type="<font color="#0000FF">s:Address</font>"&#62; <br />

+&lt;street xsi:type="string"&#62;Technology Drive&lt;/street&#62; <br />

+&lt;number xsi:type="int"&#62;5&lt;/number&#62; <br />

+&lt;city xsi:type="string"&#62;Softcity&lt;/city&#62; <br />

+&lt;/<font color="#0000FF">s:Address</font>&#62;

+</td></tr></table><br></tt>

+The namespace mapping table of the client program must have entries for <i><font color="#FF0000">e</font></i> and <i><font color="#0000FF">s</font></i> that refer to the XML Schemas of the data types:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;Namespace namespaces[] = <br />

+{ ... <br />

+&nbsp;&nbsp;&nbsp;{"<font color="#FF0000">e</font>", "http://www.me.com/schemas/electronic-address"}, <br />

+&nbsp;&nbsp;&nbsp;{"<font color="#0000FF">s</font>", "http://www.me.com/schemas/street-address"}, <br />

+...

+</td></tr></table><br></i> 

+This table is required to be part of the client application to allow access by the serializers and deserializers of the data types at run time.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.1.4">

+7.1.4</a>&nbsp;&nbsp;<font color="#0000FF">How to Generate C++ Client Proxy Classes</font></h4><a name="sec:proxy">

+</a>

+

+<div class="p"><!----></div>

+Proxy classes for C++ client applications are automatically generated by the gSOAP compiler.

+To illustrate the generation of a proxy class, the <i>getQuote.h</i> header file example of the previous section is augmented with the appropriate directives to enable the gSOAP compiler to

+generate the proxy class. Similar directives are included in the header file by the WSDL importer.

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Content of file <tt>"getQuote.h"</tt>: <br />

+//gsoap ns1 service name: Quote <br />

+//gsoap ns1 service location: http://services.xmethods.net/soap <br />

+//gsoap ns1 service namespace: urn:xmethods-delayed-quotes <br />

+//gsoap ns1 service style: rpc <br />

+//gsoap ns1 service encoding: encoded <br />

+//gsoap ns1 service method-action: getQuote "" <br />

+<b>int</b>&nbsp;ns1__getQuote(<b>char</b>&nbsp;*symbol, <b>float</b>&nbsp;&amp;Result);

+</td></tr></table><br></i>

+The first three directives provide the service name which is used to name the proxy class, the service location (endpoint), and

+the schema. The forth and fifth directives specify that SOAP RPC encoding is used, which is required by this service. The last directive defines the optional SOAPAction, which is a string associated with SOAP 1.1 operations.

+This directive must be provided for each remote method when the SOAPAction is required.

+Compilation of this header file with the gSOAP compiler <i>soapcpp2</i> creates a new file <i>soapQuoteProxy.h</i> with the

+following contents:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "soapH.h" <br />

+<b>class</b>&nbsp;Quote <br />

+{ <b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap *soap; <br />

+&nbsp;&nbsp;&nbsp;<b>const</b>&nbsp;<b>char</b>&nbsp;*endpoint; <br />

+&nbsp;&nbsp;&nbsp;Quote() { soap = soap_new(); endpoint = "http://services.xmethods.net/soap"; }; <br />

+&nbsp;&nbsp;&nbsp;~Quote() { <b>if</b>&nbsp;(soap) { soap_destroy(soap); soap_end(soap); soap_done(soap); free((void*)soap); }}; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;getQuote(<b>char</b>&nbsp;*symbol, <b>float</b>&nbsp;&amp;Result) { <b>return</b>&nbsp;soap ? soap_call_ns1__getQuote(soap, endpoint, "", symbol, Result) : SOAP_EOM; }; <br />

+};

+</td></tr></table><br></i>

+The gSOAP environment and endpoint are declared public to enable access for run-time customization.

+

+<div class="p"><!----></div>

+This generated proxy class can be included into a client application together with the generated namespace table as shown in this example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "soapQuoteProxy.h"	// get proxy <br />

+#include "Quote.nsmap"		// get namespace bindings <br />

+<b>int</b>&nbsp;main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;Quote q; <br />

+&nbsp;&nbsp;&nbsp;<b>float</b>&nbsp;r; <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(q.ns1__getQuote("IBM", r) == SOAP_OK) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;std::cout  &lt;&lt;  r  &lt;&lt;  std::endl; <br />

+&nbsp;&nbsp;&nbsp;<b>else</b><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(q.soap, stderr); <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;0; <br />

+}

+</td></tr></table><br></i>

+The <i>Quote</i> constructor allocates and initializes a gSOAP environment for the instance.

+All the HTTP and SOAP/XML processing is hidden and performed on the background.

+

+<div class="p"><!----></div>

+You can use soapcpp2 compiler option <i>-n</i> together with <i>-p</i> to create a local namespaces table to avoid link conflicts when you need multiple namespace tables or need to combine multiple clients, see also Sections&nbsp;<a href="#sec:options">8.1</a> and&nbsp;<a href="#sec:dylibs">18.34</a>, and you can use a C++ code <i><b>namespace</b></i> to create a namespace qualified proxy class, see Section&nbsp;<a href="#sec:codenamespace">18.33</a>.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.1.5">

+7.1.5</a>&nbsp;&nbsp;<font color="#0000FF">XSD Type Encoding Considerations</font></h4><a name="sec:encoding">

+</a>

+

+<div class="p"><!----></div>

+Many SOAP services require the explicit use of XML Schema types in the SOAP payload. The default encoding, which is also adopted

+by the gSOAP compiler, assumes SOAP RPC encoding which only requires the use of types to handle polymorphic cases.

+Nevertheless, the use of XSD typed messages is advised to improve interoperability.

+XSD types are introduced with <i><b>typedef</b></i> definitions in

+the header file input to the gSOAP compiler. The type name defined by a <i><b>typedef</b></i> definition corresponds to an XML Schema

+type (XSD type). For example, the following <i><b>typedef</b></i> declarations

+define various built-in XSD types implemented as primitive C/C++ types:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of header file: <br />

+... <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__string; // encode xsd__string value as the <span class="roman"><tt>xsd:string</tt></span> schema type <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__anyURI; // encode xsd__anyURI value as the <span class="roman"><tt>xsd:anyURI</tt></span> schema type <br />

+<b>typedef</b>&nbsp;<b>float</b>&nbsp;xsd__float; // encode xsd__float value as the <span class="roman"><tt>xsd:float</tt></span> schema type <br />

+<b>typedef</b>&nbsp;<b>long</b>&nbsp;xsd__int; // encode xsd__int value as the <span class="roman"><tt>xsd:int</tt></span> schema type <br />

+<b>typedef</b>&nbsp;<b>bool</b>&nbsp;xsd__boolean; // encode xsd__boolean value as the <span class="roman"><tt>xsd:boolean</tt></span> schema type <br />

+<b>typedef</b>&nbsp;<b>unsigned</b>&nbsp;<b>long</b>&nbsp;<b>long</b>&nbsp;xsd__positiveInteger; // encode xsd__positiveInteger value as the <span class="roman"><tt>xsd:positiveInteger</tt></span>  schema type<br />

+...

+</td></tr></table><br></i>

+This simple mechanism informs the gSOAP compiler to generate serializers and deserializers that explicitly encode and decode the

+primitive C++ types as built-in primitive XSD types when the <i>typedef</i>ed type is used in the parameter signature of a

+remote method (or when used nested within structs, classes, and arrays).  At the same time, the use of <i><b>typedef</b></i> 

+does not force any recoding of a C++ client or Web service application as the internal C++ types used by the application

+are not required to be changed (but still have to be primitive C++ types, see Section&nbsp;<a href="#sec:primclass">10.2.2</a> for alternative class

+implementations of primitive XSD types which allows for the marshalling of polymorphic primitive types).

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.1.6">

+7.1.6</a>&nbsp;&nbsp;<font color="#0000FF">Example</font></h4><a name="sec:example3">

+</a>

+

+<div class="p"><!----></div>

+Reconsider the <i>getQuote</i> example, now rewritten with explicit XSD types to illustrate the effect:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of file "getQuote.h": <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*<font color="#FF0000">xsd__string</font>; <br />

+<b>typedef</b>&nbsp;<b>float</b>&nbsp;<font color="#0000FF">xsd__float</font>; <br />

+<b>int</b>&nbsp;<font color="#00FF00">ns1__getQuote</font>(<font color="#FF0000">xsd__string</font> <font color="#FF00FF">symbol</font>, <font color="#0000FF">xsd__float</font> &amp;<font color="#00FFFF">Result</font>);

+</td></tr></table><br></i>

+This header file is compiled by the gSOAP stub and skeleton compiler and the compiler generates source code for the function

+<i>soap_call_ns1__getQuote</i>, which is identical to the "old" proxy:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;soap_call_ns1__getQuote(<b>struct</b>&nbsp;soap *soap, <b>char</b>&nbsp;*URL, <b>char</b>&nbsp;*action, <b>char</b>&nbsp;*symbol, <b>float</b>&nbsp;&amp;Result);

+</td></tr></table><br></i>

+The client application does not need to be rewritten and can still call the proxy using the "old" parameter signature. In contrast to

+the previous implementation of the stub however, the encoding and decoding of the data types by the stub has been changed to

+explicitly use the XSD types in the message payload.

+

+<div class="p"><!----></div>

+For example, when the client application calls the proxy, the proxy produces a SOAP request with an <tt>xsd:string</tt>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+... <br />

+&lt;SOAP-ENV:Body&#62; <br />

+&lt;<font color="#00FF00">ns1:getQuote</font>&#62;&lt;<font color="#FF00FF">symbol</font> xsi:type="<font color="#FF0000">xsd:string</font>"&#62;IBM&lt;/<font color="#FF00FF">symbol</font>&#62; <br />

+&lt;/<font color="#00FF00">ns1:getQuote</font>&#62; <br />

+&lt;/SOAP-ENV:Body&#62; <br />

+...

+</td></tr></table><br></tt>

+The service response is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+... <br />

+&lt;soap:Body&#62; <br />

+&lt;<font color="#00FF00">n:getQuote</font>Response xmlns:n="urn:xmethods-delayed-quotes&#187; <br />

+&lt;<font color="#00FFFF">Result</font> xsi:type="<font color="#0000FF">xsd:float</font>&#187;41.81&lt;/<font color="#00FFFF">Result</font>&#62; <br />

+&lt;/<font color="#00FF00">n:getQuote</font>Response&#62; <br />

+&lt;/soap:Body&#62; <br />

+...

+</td></tr></table><br></tt>

+The validation of this service response by the stub routine takes place by matching the namespace names (URIs) that are bound to the

+<tt>xsd</tt> namespace prefix. The stub also expects the <tt>getQuoteResponse</tt> element to be associated with URI

+<tt>urn:xmethods-delayed-quotes</tt> through the binding of the namespace prefix <tt>ns1</tt> in the namespace mapping table. The

+service response uses namespace prefix <tt>n</tt> for the <tt>getQuoteResponse</tt> element. This namespace prefix is bound to the same

+URI <tt>urn:xmethods-delayed-quotes</tt> and therefore the service response is assumed to be valid.  The response is

+rejected and a SOAP fault is generated when the URIs do not match.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.1.7">

+7.1.7</a>&nbsp;&nbsp;<font color="#0000FF">How to Change the Response Element Name</font></h4><a name="sec:response">

+</a>

+

+<div class="p"><!----></div>

+There is no standardized convention for the response element name in a SOAP response message, although it is recommended that the response

+element name is the method name ending with "<tt>Response</tt>". For example, the response element of <tt>getQuote</tt> is

+<tt>getQuoteResponse</tt>.

+

+<div class="p"><!----></div>

+The response element name can be specified explicitly using a <i><b>struct</b></i> or <i><b>class</b></i> declaration in the header file. The

+<i><b>struct</b></i> or <i><b>class</b></i> name represents the SOAP response element name used by the service. Consequently, the output

+parameter of the remote method must be declared as a field of the <i><b>struct</b></i> or <i><b>class</b></i>.  The use of a <i><b>struct</b></i> or a

+<i><b>class</b></i> for the service response is fully SOAP 1.1 compliant. In fact, the absence of a <i><b>struct</b></i> or <i><b>class</b></i>

+indicates to the gSOAP compiler to automatically generate a <i>struct</i> for the response which is internally used by a stub.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.1.8">

+7.1.8</a>&nbsp;&nbsp;<font color="#0000FF">Example</font></h4><a name="sec:example4">

+</a>

+

+<div class="p"><!----></div>

+Reconsider the <i>getQuote</i> remote method specification which can be rewritten with an explicit declaration of a SOAP response

+element as follows:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of "getQuote.h": <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*<font color="#FF0000">xsd__string</font>; <br />

+<b>typedef</b>&nbsp;<b>float</b>&nbsp;<font color="#0000FF">xsd__float</font>; <br />

+<b>struct</b>&nbsp;<font color="#FFFF00">ns1__getQuoteResponse</font> {<font color="#0000FF">xsd__float</font> <font color="#00FFFF">Result</font>;}; <br />

+<b>int</b>&nbsp;<font color="#00FF00">ns1__getQuote</font>(<font color="#FF0000">xsd__string</font> <font color="#FF00FF">symbol</font>, <b>struct</b>&nbsp;<font color="#FFFF00">ns1__getQuoteResponse</font> &amp;r);

+</td></tr></table><br></i>

+The SOAP request is the same as before:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+... <br />

+&lt;SOAP-ENV:Body&#62; <br />

+&lt;<font color="#00FF00">ns1:getQuote</font>&#62;&lt;<font color="#FF00FF">symbol</font> xsi:type="<font color="#FF0000">xsd:string</font>"&#62;IBM&lt;/<font color="#FF00FF">symbol</font>&#62; <br />

+&lt;/<font color="#00FF00">ns1:getQuote</font>&#62; <br />

+&lt;/SOAP-ENV:Body&#62; <br />

+...

+</td></tr></table><br></tt>

+The difference is that the service response is required to match the specified <i>getQuoteResponse</i> name and its namespace URI:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+... <br />

+&lt;soap:Body&#62; <br />

+&lt;<font color="#FFFF00">n:getQuoteResponse</font> xmlns:n='urn:xmethods-delayed-quotes'&#62; <br />

+&lt;<font color="#00FFFF">Result</font> xsi:type='<font color="#0000FF">xsd:float</font>'&#62;41.81&lt;/<font color="#00FFFF">Result</font>&#62; <br />

+&lt;/<font color="#FFFF00">n:getQuoteResponse</font>&#62; <br />

+&lt;/soap:Body&#62; <br />

+...

+</td></tr></table><br></tt>

+This use of a <i><b>struct</b></i> or <i><b>class</b></i> enables the adaptation of the default SOAP response element name and/or namespace URI when required.

+

+<div class="p"><!----></div>

+Note that the <i><b>struct</b></i> (or <i><b>class</b></i>) declaration may appear within the function prototype declaration. For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of "getQuote.h": <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*<font color="#FF0000">xsd__string</font>; <br />

+<b>typedef</b>&nbsp;<b>float</b>&nbsp;<font color="#0000FF">xsd__float</font>; <br />

+<b>int</b>&nbsp;<font color="#00FF00">ns1__getQuote</font>(<font color="#FF0000">xsd__string</font> <font color="#FF00FF">symbol</font>, <b>struct</b>&nbsp;<font color="#FFFF00">ns1__getQuoteResponse</font> {<font color="#0000FF">xsd__float</font> <font color="#00FFFF">Result</font>;} &amp;r);

+</td></tr></table><br></i>

+This example combines the declaration of the response element of the remote method with the function prototype of the remote method.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.1.9">

+7.1.9</a>&nbsp;&nbsp;<font color="#0000FF">How to Specify Multiple Output Parameters</font></h4><a name="sec:multiple">

+</a>

+

+<div class="p"><!----></div>

+The gSOAP stub and skeleton compiler uses the convention that the 

+<b>last parameter</b> of the function prototype declaration of a remove method in a header file

+is also the <b>only single output parameter</b> of the method.

+All other parameters are considered input parameters of the remote method. To specify a remote method

+with <b>multiple output parameters</b>, a <i><b>struct</b></i> or <i><b>class</b></i> must be declared for the remote method response, see

+also&nbsp;<a href="#sec:response">7.1.7</a>.  The fields of the <i><b>struct</b></i> or <i><b>class</b></i> are the output parameters of the remote method.

+Both the order of the input parameters in the function prototype and the order of the output parameters (the fields in the

+<i><b>struct</b></i> or <i><b>class</b></i>) is not significant. However, the SOAP 1.1 specification states that input and output parameters may be

+treated as having anonymous parameter names which requires a particular ordering, see Section&nbsp;<a href="#sec:anonymous">7.1.13</a>.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.1.10">

+7.1.10</a>&nbsp;&nbsp;<font color="#0000FF">Example</font></h4><a name="sec:example5">

+</a>

+

+<div class="p"><!----></div>

+As an example, consider a hypothetical remote method <i>getNames</i> with a single input parameter <i><font color="#FF00FF">SSN</font></i> 

+and two output parameters <i><font color="#FF0000">first</font></i> and <i><font color="#0000FF">last</font></i>. This can be specified as:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of file "getNames.h": <br />

+<b>int</b>&nbsp;<font color="#00FF00">ns3__getNames</font>(<b>char</b>&nbsp;*<font color="#FF00FF">SSN</font>, <b>struct</b>&nbsp;<font color="#FFFF00">ns3__getNamesResponse</font> {<b>char</b>&nbsp;*<font color="#FF0000">first</font>; <b>char</b>&nbsp;*<font color="#0000FF">last</font>;} &amp;r);

+</td></tr></table><br></i>

+The gSOAP stub and skeleton compiler takes this header file as input and generates source code for the function <i>soap_call_ns3__getNames</i>. When invoked by a client application, the proxy produces the SOAP request:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+... <br />

+&lt;SOAP-ENV:Envelope ... xmlns:ns3="urn:names" ...&#62; <br />

+... <br />

+&lt;<font color="#00FF00">ns3:getNames</font>&#62; <br />

+&lt;<font color="#FF00FF">SSN</font>&#62;999 99 9999&lt;/<font color="#FF00FF">SSN</font>&#62; <br />

+&lt;/<font color="#00FF00">ns3:getNames</font>&#62; <br />

+...

+</td></tr></table><br></tt>

+The response by a SOAP service could be:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+... <br />

+&lt;<font color="#FFFF00">m:getNamesResponse</font> xmlns:m="urn:names"&#62; <br />

+&lt;<font color="#FF0000">first</font>&#62;John&lt;/<font color="#FF0000">first</font>&#62; <br />

+&lt;<font color="#0000FF">last</font>&#62;Doe&lt;/<font color="#0000FF">last</font>&#62; <br />

+&lt;/<font color="#FFFF00">m:getNamesResponse</font>&#62; <br />

+...

+</td></tr></table><br></tt>

+where <tt><font color="#FF0000">first</font></tt> and <tt><font color="#0000FF">last</font></tt> are the output parameters of the <i>getNames</i> remote method of the service.

+

+<div class="p"><!----></div>

+As another example, consider a remote method <i>copy</i> with an input parameter and an output parameter with identical

+parameter names (this is not prohibited by the SOAP 1.1 protocol). This can be specified as well using a response <i><b>struct</b></i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Content of file "copy.h": <br />

+<b>int</b>&nbsp;<font color="#00FF00">X_rox__copy_name</font>(<b>char</b>&nbsp;*<font color="#FF00FF">name</font>, <b>struct</b>&nbsp;<font color="#FFFF00">X_rox__copy_nameResponse</font> {<b>char</b>&nbsp;*<font color="#FF0000">name</font>;} &amp;r);

+</td></tr></table><br></i>

+The use of a <i><b>struct</b></i> or <i><b>class</b></i> for the remote method response enables the declaration of remote methods that have

+parameters that are passed both as input and output parameters.

+

+<div class="p"><!----></div>

+The gSOAP compiler takes the <i>copy.h</i> header file as input and generates the <i>soap_call_X_rox__copy_name</i> proxy. When invoked by a client application, the proxy produces the SOAP request:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+... <br />

+&lt;SOAP-ENV:Envelope ... xmlns:X-rox="urn:copy" ...&#62; <br />

+... <br />

+&lt;<font color="#00FF00">X-rox:copy-name</font>&#62; <br />

+&lt;<font color="#FF00FF">name</font>&#62;SOAP&lt;/<font color="#FF00FF">name</font>&#62; <br />

+&lt;/<font color="#00FF00">X-rox:copy-name</font>&#62; <br />

+...

+</td></tr></table><br></tt>

+The response by a SOAP copy service could be something like:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+... <br />

+&lt;<font color="#FFFF00">m:copy-nameResponse</font> xmlns:m="urn:copy"&#62; <br />

+&lt;<font color="#FF0000">name</font>&#62;SOAP&lt;/<font color="#FF0000">name</font>&#62; <br />

+&lt;/<font color="#FFFF00">m:copy-nameResponse</font>&#62; <br />

+...

+</td></tr></table><br></tt>

+The name will be parsed and decoded by the proxy and returned in the <i>name</i> field of the <i><b>struct</b>&nbsp;X_rox__copy_nameResponse &amp;r</i> parameter.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.1.11">

+7.1.11</a>&nbsp;&nbsp;<font color="#0000FF">How to Specify Output Parameters With struct/class Compound Data Types</font></h4><a name="sec:compound">

+</a>

+

+<div class="p"><!----></div>

+If the single output parameter of a remote method is a complex data type such as a <i><b>struct</b></i> or <i><b>class</b></i> it is necessary to

+specify the response element of the remote method as a <i><b>struct</b></i> or <i><b>class</b></i> <b>at all times</b>.

+Otherwise, the output parameter will

+be considered the response element (!), because of the response element specification convention used by gSOAP,

+as discussed in&nbsp;<a href="#sec:response">7.1.7</a>.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.1.12">

+7.1.12</a>&nbsp;&nbsp;<font color="#0000FF">Example</font></h4><a name="sec:example6">

+</a>

+

+<div class="p"><!----></div>

+This is is best illustrated with an example. The Flighttracker service by ObjectSpace provides real time flight information for

+flights in the air. It requires an airline code and flight number as parameters.

+The remote method name is <i>getFlightInfo</i> and

+the method has two string parameters: the airline code and flight number, both of which must be encoded as <tt>xsd:string</tt> types.

+The method returns a <i>getFlightResponse</i> response element with a <i>return</i> output parameter that is of complex type

+<i>FlightInfo</i>. The type <i>FlightInfo</i> is represented by a <i><b>class</b></i> in the header file, whose field names correspond to

+the <i>FlightInfo</i> accessors:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of file "flight.h": <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__string; <br />

+<b>class</b>&nbsp;ns2__FlightInfo <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;xsd__string airline; <br />

+&nbsp;&nbsp;&nbsp;xsd__string flightNumber; <br />

+&nbsp;&nbsp;&nbsp;xsd__string altitude; <br />

+&nbsp;&nbsp;&nbsp;xsd__string currentLocation; <br />

+&nbsp;&nbsp;&nbsp;xsd__string equipment; <br />

+&nbsp;&nbsp;&nbsp;xsd__string speed; <br />

+}; <br />

+<b>struct</b>&nbsp;ns1__getFlightInfoResponse {ns2__FlightInfo _return;}; <br />

+<b>int</b>&nbsp;ns1__getFlightInfo(xsd__string param1, xsd__string param2, <b>struct</b>&nbsp;ns1__getFlightInfoResponse &amp;r);

+</td></tr></table><br></i>

+The response element <i>ns1__getFlightInfoResponse</i> is explicitly declared and it has one field: <i>return_</i> of type

+<i>ns2__FlightInfo</i>.  Note that <i>return_</i> has a trailing underscore to avoid a name clash with the <i><b>return</b></i> keyword,

+see Section&nbsp;<a href="#sec:idtrans">9.3</a> for details on the translation of C++ identifiers to XML element names.

+

+<div class="p"><!----></div>

+The gSOAP compiler generates the <i>soap_call_ns1__getFlightInfo</i> proxy. Here is an example fragment of a client application that uses this proxy to request flight information:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap soap; <br />

+... <br />

+soap_init(&amp;soap); <br />

+... <br />

+soap_call_ns1__getFlightInfo(&amp;soap, <tt>"testvger.objectspace.com/soap/servlet/rpcrouter"</tt>, <br />

+&nbsp;&nbsp;&nbsp;<tt>"urn:galdemo:flighttracker"</tt>, <tt>"UAL"</tt>, <tt>"184"</tt>, r); <br />

+... <br />

+<b>struct</b>&nbsp;Namespace namespaces[] = <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;{"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"}, <br />

+&nbsp;&nbsp;&nbsp;{"SOAP-ENC","http://schemas.xmlsoap.org/soap/encoding/"}, <br />

+&nbsp;&nbsp;&nbsp;{"xsi", "http://www.w3.org/2001/XMLSchema-instance"}, <br />

+&nbsp;&nbsp;&nbsp;{"xsd", "http://www.w3.org/2001/XMLSchema"}, <br />

+&nbsp;&nbsp;&nbsp;{"ns1", "urn:galdemo:flighttracker"}, <br />

+&nbsp;&nbsp;&nbsp;{"ns2", "http://galdemo.flighttracker.com"}, <br />

+&nbsp;&nbsp;&nbsp;{NULL, NULL} <br />

+};

+</td></tr></table><br></i>

+When invoked by a client application, the proxy produces the SOAP request:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+POST /soap/servlet/rpcrouter HTTP/1.1 <br />

+Host: testvger.objectspace.com <br />

+Content-Type: text/xml <br />

+Content-Length: 634 <br />

+SOAPAction: "urn:galdemo:flighttracker" <br />

+<br />

+&lt;?xml version="1.0" encoding="UTF-8"?&#62; <br />

+&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" <br />

+&nbsp;&nbsp;&nbsp;xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" <br />

+&nbsp;&nbsp;&nbsp;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <br />

+&nbsp;&nbsp;&nbsp;xmlns:xsd="http://www.w3.org/2001/XMLSchema" <br />

+&nbsp;&nbsp;&nbsp;xmlns:ns1="urn:galdemo:flighttracker" <br />

+&nbsp;&nbsp;&nbsp;xmlns:ns2="http://galdemo.flighttracker.com" <br />

+&nbsp;&nbsp;&nbsp;SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&#62; <br />

+&lt;SOAP-ENV:Body&#62; <br />

+&lt;ns1:getFlightInfo xsi:type="ns1:getFlightInfo"&#62; <br />

+&lt;param1 xsi:type="xsd:string"&#62;UAL&lt;/param1&#62; <br />

+&lt;param2 xsi:type="xsd:string"&#62;184&lt;/param2&#62; <br />

+&lt;/ns1:getFlightInfo&#62; <br />

+&lt;/SOAP-ENV:Body&#62; <br />

+&lt;/SOAP-ENV:Envelope&#62;

+</td></tr></table><br></tt>

+The Flighttracker service responds with:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+HTTP/1.1 200 ok <br />

+Date: Thu, 30 Aug 2001 00:34:17 GMT <br />

+Server: IBM_HTTP_Server/1.3.12.3 Apache/1.3.12 (Win32) <br />

+Set-Cookie: sesessionid=2GFVTOGC30D0LGRGU2L4HFA;Path=/ <br />

+Cache-Control: no-cache="set-cookie,set-cookie2" <br />

+Expires: Thu, 01 Dec 1994 16:00:00 GMT <br />

+Content-Length: 861 <br />

+Content-Type: text/xml; charset=utf-8 <br />

+Content-Language: en <br />

+<br />

+&lt;?xml version="1.0" encoding="UTF-8"?&#62; <br />

+&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" <br />

+&nbsp;&nbsp;&nbsp;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <br />

+&nbsp;&nbsp;&nbsp;xmlns:xsd="http://www.w3.org/2001/XMLSchema"&#62; <br />

+&lt;SOAP-ENV:Body&#62; <br />

+&lt;ns1:getFlightInfoResponse xmlns:ns1="urn:galdemo:flighttracker" <br />

+&nbsp;&nbsp;&nbsp;SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&#62; <br />

+&lt;return xmlns:ns2="http://galdemo.flighttracker.com" xsi:type="ns2:FlightInfo"&#62; <br />

+&lt;equipment xsi:type="xsd:string"&#62;A320&lt;/equipment&#62; <br />

+&lt;airline xsi:type="xsd:string"&#62;UAL&lt;/airline&#62; <br />

+&lt;currentLocation xsi:type="xsd:string"&#62;188 mi W of Lincoln, NE&lt;/currentLocation&#62; <br />

+&lt;altitude xsi:type="xsd:string"&#62;37000&lt;/altitude&#62; <br />

+&lt;speed xsi:type="xsd:string"&#62;497&lt;/speed&#62; <br />

+&lt;flightNumber xsi:type="xsd:string"&#62;184&lt;/flightNumber&#62; <br />

+&lt;/return&#62; <br />

+&lt;/ns1:getFlightInfoResponse&#62; <br />

+&lt;/SOAP-ENV:Body&#62; <br />

+&lt;/SOAP-ENV:Envelope&#62;

+</td></tr></table><br></tt>

+The proxy returns the service response in variable <i>r</i> of type <i><b>struct</b>&nbsp;ns1__getFlightInfoResponse</i> and this information can be displayed by the client application with the following code fragment:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+cout  &lt;&lt;  r.return_.equipment  &lt;&lt;  " flight "  &lt;&lt;  r.return_.airline  &lt;&lt;  r.return_.flightNumber <br />

+&nbsp;&nbsp;&nbsp; &lt;&lt;  " traveling "  &lt;&lt;  r.return_.speed  &lt;&lt;  " mph "  &lt;&lt;  " at "  &lt;&lt;  r.return_.altitude <br />

+&nbsp;&nbsp;&nbsp; &lt;&lt;  " ft, is located "  &lt;&lt;  r.return_.currentLocation  &lt;&lt;  endl;

+</td></tr></table><br></i>

+This code displays the service response as:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<tt>A320 flight UAL184 traveling 497 mph at 37000 ft, is located 188 mi W of Lincoln, NE</tt>

+</td></tr></table><br></span>

+Note: the flight tracker service is no longer available since 9/11/2001. It is kept in the documentation as an example to illustrate the use of structs/classes and response types.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.1.13">

+7.1.13</a>&nbsp;&nbsp;<font color="#0000FF">How to Specify Anonymous Parameter Names</font></h4><a name="sec:anonymous">

+</a>

+

+<div class="p"><!----></div>

+The SOAP 1.1 protocol allows parameter names to be anonymous.  That is, the name(s) of the output

+parameters of a remote method are not strictly required to match a client's view of the parameters names.  Also, the

+input parameter names of a remote method are not strictly required to match a service's view of the parameter names.  Although

+this convention is likely to be deprecated in SOAP 1.2, the gSOAP compiler can generate stub and skeleton

+routines that support anonymous parameters.  Parameter names are implicitly

+anonymous by omitting the parameter names in the function prototype of the

+remote method. For

+example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of "getQuote.h": <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__string; <br />

+<b>typedef</b>&nbsp;<b>float</b>&nbsp;xsd__float; <br />

+<b>int</b>&nbsp;ns1__getQuote(xsd__string, xsd__float&amp;);

+</td></tr></table><br></i>

+To make parameter names explicitly anonymous on the receiving side (client or service),

+the parameter names should start with an underscore (<i>_</i>) in the function prototype in the header file.

+

+<div class="p"><!----></div>

+For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of "getQuote.h": <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__string; <br />

+<b>typedef</b>&nbsp;<b>float</b>&nbsp;xsd__float; <br />

+<b>int</b>&nbsp;ns1__getQuote(xsd__string symbol, xsd__float &amp;_return);

+</td></tr></table><br></i>

+Or, alternatively with a response <i><b>struct</b></i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of "getQuote.h": <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__string; <br />

+<b>typedef</b>&nbsp;<b>float</b>&nbsp;xsd__float; <br />

+<b>struct</b>&nbsp;ns1__getQuoteResponse {xsd__float _return;}; <br />

+<b>int</b>&nbsp;ns1__getQuote(xsd__string symbol, <b>struct</b>&nbsp;ns1__getQuoteResponse &amp;r);

+</td></tr></table><br></i>

+In this example, <i>_return</i> is an anonymous output parameter.

+As a consequence, the service response to a request made by a client created with gSOAP using this header file specification

+may include any name for the output parameter in the SOAP payload.

+The input parameters may also be anonymous. This affects the implementation of Web services in gSOAP

+and the matching of parameter names by the service.

+

+<div class="p"><!----></div>

+<font color="#FF0000"><b>Caution</b></font>: when anonymous parameter names are used, the order of the parameters in the function prototype of a remote method is

+significant.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.1.14">

+7.1.14</a>&nbsp;&nbsp;<font color="#0000FF">How to Specify a Method with No Input Parameters</font></h4>

+

+<div class="p"><!----></div>

+To specify a remote method that has no input parameters, just provide a function prototype with one parameter which is the output

+parameter.  However, some C/C++ compilers (notably Visual C++<sup><span class="roman">TM</span></sup>) will not compile and complain about an empty

+<i><b>struct</b></i>.  This <i><b>struct</b></i> is generated by gSOAP to contain the SOAP request message.  To fix this, provide one input

+parameter of type <i><b>void</b>*</i> (gSOAP can not serialize <i>void*</i> data).  For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;ns3__SOAPService <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;ID; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*name; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*owner; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*description; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*homepageURL; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*endpoint; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*SOAPAction; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*methodNamespaceURI; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*serviceStatus; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*methodName; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*dateCreated; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*downloadURL; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*wsdlURL; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*instructions; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*contactEmail; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*serverImplementation; <br />

+}; <br />

+<b>struct</b>&nbsp;ArrayOfSOAPService {<b>struct</b>&nbsp;ns3__SOAPService *__ptr; <b>int</b>&nbsp;__size;}; <br />

+<b>int</b>&nbsp;ns__getAllSOAPServices(<b>void</b>&nbsp;*_, <b>struct</b>&nbsp;ArrayOfSOAPService &amp;_return);

+</td></tr></table><br></i>

+The <i>ns__getAllSOAPServices</i> method has one <i><b>void</b>*</i> input parameter which is ignored by the serializer to produce the

+request message.

+

+<div class="p"><!----></div>

+Most C/C++ compilers allow empty <i><b>struct</b></i>s and therefore the <i><b>void</b>*</i> parameter is not required.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.1.15">

+7.1.15</a>&nbsp;&nbsp;<font color="#0000FF">How to Specify a Method with No Output Parameters</font></h4>

+

+<div class="p"><!----></div>

+To specify a remote method that has no output parameters, just provide a function prototype with a response struct that is

+empty. For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>enum</b>&nbsp;ns__event { off, on, stand_by }; <br />

+<b>int</b>&nbsp;ns__signal(<b>enum</b>&nbsp;ns__event in, <b>struct</b>&nbsp;ns__signalResponse { } *out);

+</td></tr></table><br></i>

+Since the response struct is empty, no output parameters are specified.

+Most C/C++ compilers allow empty <i><b>struct</b></i>s. For those that don't, use a <i><b>void</b>*</i> parameter in the struct.

+This parameter is not (de)serialized.

+

+<div class="p"><!----></div>

+Some SOAP resources refer to SOAP RPC with empty responses as <b>one way</b> SOAP messaging. However, we refer to one-way massaging

+by asynchronous explicit send and receive operations as described in Section&nbsp;<a href="#sec:oneway1">7.3</a>.  The latter view of one-way SOAP messaging is also in line with Basic Profile 1.0.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc7.2">

+7.2</a>&nbsp;&nbsp;<font color="#0000FF">How to Use the gSOAP Stub and Skeleton Compiler to Build SOAP Web Services</font></h3>

+

+<div class="p"><!----></div>

+The gSOAP stub and skeleton compiler generates <b>skeleton</b> routines in C++ source form for each of the remote methods specified

+as function prototypes in the header file processed by the gSOAP compiler.  The skeleton routines can be readily used to implement

+the remote methods in a new SOAP Web service. The compound data types used by the input and output parameters of SOAP remote

+methods must be declared in the header file, such as structs, classes, arrays, and pointer-based data structures (graphs) that are

+used as the data types of the parameters of a remote method. The gSOAP compiler automatically generates serializers and

+deserializers for the data types to enable the generated skeleton routines to encode and decode the contents of the parameters of

+the remote methods.  The gSOAP compiler also generates a remote method request dispatcher routine that will serve requests by

+calling the appropriate skeleton when the SOAP service application is installed as a CGI application on a Web server.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.2.1">

+7.2.1</a>&nbsp;&nbsp;<font color="#0000FF">Example</font></h4><a name="sec:example7">

+</a>

+

+<div class="p"><!----></div>

+The following example specifies three remote methods to be implemented by a new SOAP Web service:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of file "calc.h": <br />

+<b>typedef</b>&nbsp;<b>double</b>&nbsp;xsd__double; <br />

+<b>int</b>&nbsp;ns__add(xsd__double a, xsd__double b, xsd__double &amp;result); <br />

+<b>int</b>&nbsp;ns__sub(xsd__double a, xsd__double b, xsd__double &amp;result); <br />

+<b>int</b>&nbsp;ns__sqrt(xsd__double a, xsd__double &amp;result); <br />

+</td></tr></table><br></i>

+The <i>add</i> and <i>sub</i> methods are intended to add and subtract two double floating point numbers stored in input parameters

+<i>a</i> and <i>b</i> and should return the result of the operation in the <i>result</i> output parameter. The <i>qsrt</i> method is

+intended to take the square root of input parameter <i>a</i> and to return the result in the output parameter <i>result</i>.

+The <i>xsd__double</i> type is recognized by the gSOAP compiler as the <tt>xsd:double</tt> XSD Schema data type.

+The use of <i><b>typedef</b></i> is a convenient way to associate primitive C types with primitive XML Schema data types.

+

+<div class="p"><!----></div>

+To generate the skeleton routines, the gSOAP compiler is invoked from the command line with:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>soapcpp2 calc.h</i>

+</td></tr></table><br></span>

+The compiler generates the skeleton routines for the <i>add</i>, <i>sub</i>, and <i>sqrt</i> remote methods specified in the

+<i>calc.h</i> header file. The skeleton routines are respectively, <i>soap_serve_ns__add</i>, <i>soap_serve_ns__sub</i>, and

+<i>soap_serve_ns__sqrt</i> and saved in the file <i>soapServer.cpp</i>. The generated file <i>soapC.cpp</i> contains serializers

+and deserializers for the skeleton. The compiler also generates a service dispatcher: the <i>soap_serve</i> function handles

+client requests on the standard input stream and dispatches the remote method requests to the appropriate skeletons to serve the

+requests. The skeleton in turn calls the remote method implementation function. The function prototype of the remote method

+implementation function is specified in the header file that is input to the gSOAP compiler.

+

+<div class="p"><!----></div>

+Here is an example Calculator service application that uses the generated <i>soap_serve</i> routine to handle client requests:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of file "calc.cpp": <br />

+#include "soapH.h" <br />

+#include  &lt; math.h &gt;  // for sqrt() <br />

+main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;soap_serve(soap_new()); // use the remote method request dispatcher <br />

+} <br />

+// Implementation of the "add" remote method: <br />

+<b>int</b>&nbsp;ns__add(<b>struct</b>&nbsp;soap *soap, <b>double</b>&nbsp;a, <b>double</b>&nbsp;b, <b>double</b>&nbsp;&amp;result) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;result = a + b; <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+} <br />

+// Implementation of the "sub" remote method: <br />

+<b>int</b>&nbsp;ns__sub(<b>struct</b>&nbsp;soap *soap, <b>double</b>&nbsp;a, <b>double</b>&nbsp;b, <b>double</b>&nbsp;&amp;result) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;result = a - b; <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+} <br />

+// Implementation of the "sqrt" remote method: <br />

+<b>int</b>&nbsp;ns__sqrt(<b>struct</b>&nbsp;soap *soap, <b>double</b>&nbsp;a, <b>double</b>&nbsp;&amp;result) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(a  &gt; = 0) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result = sqrt(a); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>else</b><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;soap_receiver_fault(soap, "Square root of negative number", "I can only take the square root of a non-negative number"); <br />

+} <br />

+// As always, a namespace mapping table is needed: <br />

+<b>struct</b>&nbsp;Namespace namespaces[] = <br />

+{&nbsp;&nbsp;&nbsp;// {"ns-prefix", "ns-name"} <br />

+&nbsp;&nbsp;&nbsp;{"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"}, <br />

+&nbsp;&nbsp;&nbsp;{"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/"}, <br />

+&nbsp;&nbsp;&nbsp;{"xsi",      "http://www.w3.org/2001/XMLSchema-instance"}, <br />

+&nbsp;&nbsp;&nbsp;{"xsd",      "http://www.w3.org/2001/XMLSchema"}, <br />

+&nbsp;&nbsp;&nbsp;{"ns",       "urn:simple-calc"}, // bind "ns" namespace prefix <br />

+&nbsp;&nbsp;&nbsp;{NULL, NULL} <br />

+};

+</td></tr></table><br></i>

+Note that the remote methods have an extra input parameter which is a pointer to the gSOAP runtime environment.

+The implementation of the remote methods MUST return a SOAP error code. The code <i>SOAP_OK</i> denotes success, while

+<i>SOAP_FAULT</i> denotes an exception with details that can be defined by the user. The exception description can be assigned to

+the <i>soap</i><tt>-&gt;</tt><i>fault</i><tt>-&gt;</tt><i>faultstring</i> string and details can be assigned to the

+<i>soap</i><tt>-&gt;</tt><i>fault</i><tt>-&gt;</tt><i>detail</i> string. This is SOAP 1.1 specific. SOAP 1.2 requires

+the <i>soap</i><tt>-&gt;</tt><i>fault</i><tt>-&gt;</tt><i>SOAP_ENV__Reason</i> and the

+<i>soap</i><tt>-&gt;</tt><i>fault</i><tt>-&gt;</tt><i>SOAP_ENV__Detail</i> strings to be assigned.

+Better is to use the

+<i>soap_receiver_fault</i> function that allocates a fault struct and sets the SOAP Fault string and details

+regardless of the SOAP 1.1 or SOAP 1.2 version used. The <i>soap_receiver_fault</i> function returns

+<i>SOAP_FAULT</i>, i.e.&nbsp;an application-specific fault. The fault exception will be passed on to the client of this service.

+

+<div class="p"><!----></div>

+This service application can be readily installed as a CGI application. The service description would be:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td>Endpoint URL: </td><td>the URL of the CGI application </td></tr>

+<tr><td>SOAP action: </td><td>"" (2 quotes) </td></tr>

+<tr><td>Remote method namespace: </td><td><tt>urn:simple-calc</tt> </td></tr>

+<tr><td>Remote method name: </td><td><tt>add</tt> </td></tr>

+<tr><td>&nbsp;&nbsp;&nbsp;Input parameters: </td><td><tt>a</tt> of type <tt>xsd:double</tt> and <tt>b</tt> of type <tt>xsd:double</tt> </td></tr>

+<tr><td>&nbsp;&nbsp;&nbsp;Output parameter: </td><td><tt>result</tt> of type <tt>xsd:double</tt> </td></tr>

+<tr><td>Remote method name: </td><td><tt>sub</tt> </td></tr>

+<tr><td>&nbsp;&nbsp;&nbsp;Input parameters: </td><td><tt>a</tt> of type <tt>xsd:double</tt> and <tt>b</tt> of type <tt>xsd:double</tt> </td></tr>

+<tr><td>&nbsp;&nbsp;&nbsp;Output parameter: </td><td><tt>result</tt> of type <tt>xsd:double</tt> </td></tr>

+<tr><td>Remote method name: </td><td><tt>sqrt</tt> </td></tr>

+<tr><td>&nbsp;&nbsp;&nbsp;Input parameter: </td><td><tt>a</tt> of type <tt>xsd:double</tt> </td></tr>

+<tr><td>&nbsp;&nbsp;&nbsp;Output parameter: </td><td><tt>result</tt> of type <tt>xsd:double</tt> or a SOAP Fault

+</td></tr></table>

+

+</td></tr></table><br></span>

+The <i>soapcpp2</i> compile generates a WSDL file for this service, see Section&nbsp;<a href="#sec:wsdl">7.2.8</a>.

+

+<div class="p"><!----></div>

+Unless the CGI application inspects and checks the environment variable <i>SOAPAction</i> which contains the SOAP action request by

+a client, the SOAP action is ignored by the CGI application.  SOAP actions are specific to the SOAP protocol and provide a means

+for routing requests and for security reasons (e.g.&nbsp;firewall software can inspect SOAP action headers to grant or deny the

+SOAP request. Note that this requires the SOAP service to check the SOAP action header as well to match it with the remote method.)

+

+<div class="p"><!----></div>

+The header file input to the gSOAP compiler does not need to be modified to generate client stubs for accessing this

+service.  Client applications can be developed by using the same header file as for which the service application

+was developed.  For example, the <i>soap_call_ns__add</i> stub routine is available from the <i>soapClient.cpp</i> file after invoking

+the gSOAP compiler on the <i>calc.h</i> header file. As a result, client and service applications can be developed without

+the need to know the details of the SOAP encoding used.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.2.2">

+7.2.2</a>&nbsp;&nbsp;<font color="#0000FF">MSVC++ Builds</font></h4>

+

+<div class="p"><!----></div>

+

+<ul>

+<li> Win32 builds need winsock.dll (MS Visual C++ "wsock32.lib")

+To do this in Visual C++ 6.0, go to "Project", &#223;ettings", select the "Link"

+tab (the project file needs to be selected in the file view) and add

+"wsock32.lib" to the &#214;bject/library modules" entry.

+<div class="p"><!----></div>

+</li>

+

+<li> Use files with extension .cpp only (don't mix .c with .cpp).

+<div class="p"><!----></div>

+</li>

+

+<li> Turn pre-compiled headers off.

+<div class="p"><!----></div>

+</li>

+

+<li> When creating a new project, you can specify a custom build step to automatically invoke the gSOAP compiler on a gSOAP header file. In this way you can incrementally build a new service by adding new operations and data types to the header file. To specify a custom build step, select the "Project" menu item "Settings" and select the header file in the File view pane. Select the "Custom Build" tab and enter '<i>soapcpp2.exe "$(inputPath)"</i>' in the "Command" pane. Enter '<i>soapStub.h soapH.h soapC.cpp soapClient.cpp soapServer.cpp soapClientLib.cpp soapServerLib.cpp</i>'. Don't forget to add the <i>soapXYZProxy.h soapXYZProxy.cpp soapXYZObject.h soapXYZObject.cpp</i> files that are generated for C++ class proxies and server objects named XYZ. Click &#214;K". Run the soapcpp2 compiler once to generate these files (you can simply do this by selecting your header file and select "Compile"). Add the files to your project. Each time you make a change to the header file, the project sources are updated automatically.

+<div class="p"><!----></div>

+</li>

+

+<li> You may want to use the WinInet interface available in the <i>mod_gsoap</i> directory of the gSOAP package to simplify Internet access and deal with encryption, proxies, and authentication. API instructions are included in the source.

+<div class="p"><!----></div>

+</li>

+

+<li> For the PocketPC, run the <i>wsdl2h</i> WSDL parser with option <i>-s</i> to prevent the generation of STL code. In addition, <i>time_t</i> serialization is not supported, which means that you should add the following line to <i>typemap.dat</i> indicating a mapping of <i>xsd__dateTime</i> to <i><b>char</b>*</i>: <tt>xsd__dateTime =  -  char*  -  char*</tt>.

+<div class="p"><!----></div>

+</li>

+</ul>

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.2.3">

+7.2.3</a>&nbsp;&nbsp;<font color="#0000FF">How to Create a Stand-Alone gSOAP Service</font></h4>

+

+<div class="p"><!----></div>

+The deployment of a Web service as a CGI application is an easy means to provide your service on the Internet.

+gSOAP services can also run as stand-alone services on any port by utilizing the built-in HTTP and TCP/IP stacks.

+The stand-alone services can be run on port 80 thereby providing Web server capabilities restricted to SOAP RPC.

+

+<div class="p"><!----></div>

+To create a stand-alone service, only the <i>main</i> routine of the service needs to be modified as follows.  Instead of just calling the

+<i>soap_serve</i> routine, the <i>main</i> routine is changed into:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;main() <br />

+{<br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;m, s; // master and slave sockets <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;m = soap_bind(&amp;soap, <tt>"machine.cs.fsu.edu"</tt>, 18083, 100); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(m  &lt;  0) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); <br />

+&nbsp;&nbsp;&nbsp;<b>else</b><br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, <tt>"Socket&nbsp;connection&nbsp;successful:&nbsp;master&nbsp;socket&nbsp;=&nbsp;%d\n"</tt>, m); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>for</b>&nbsp;(<b>int</b>&nbsp;i = 1; ; i++) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s = soap_accept(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(s  &lt;  0) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, <tt>"%d:&nbsp;accepted&nbsp;connection&nbsp;from&nbsp;IP=%d.%d.%d.%d&nbsp;socket=%d"</tt>, i, <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(soap.ip &gt;&gt; 24)&amp;0xFF, (soap.ip &gt;&gt; 16)&amp;0xFF, (soap.ip &gt;&gt; 8)&amp;0xFF, soap.ip&amp;0xFF, s); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_serve(&amp;soap) != SOAP_OK)	// process RPC request <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); // print error <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, <tt>"request&nbsp;served\n"</tt>); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_destroy(&amp;soap);	// clean up class instances <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_end(&amp;soap);	// clean up everything and close socket <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;soap_done(&amp;soap); // close master socket and detach environment <br />

+}

+</td></tr></table><br></i>

+The <i>soap_serve</i> dispatcher handles one request or multiple requests when HTTP keep-alive is enabled (with the <i>SOAP_IO_KEEPALIVE</i> flag see Section&nbsp;<a href="#sec:keepalive">18.11</a>).

+

+<div class="p"><!----></div>

+The gSOAP functions that can be used are:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td width="301"><font color="#FF0000"><b>Function</b></font> </td><td width="301"><font color="#FF0000"><b>Description</b></font> </td></tr>

+<tr><td width="301"><i>soap_init(<b>struct</b>&nbsp;soap *soap)</i> </td><td width="301">Initializes gSOAP runtime environment (required once) </td></tr>

+<tr><td width="301"><i>soap_bind(<b>struct</b>&nbsp;soap *soap, <b>char</b>&nbsp;*host, <b>int</b>&nbsp;port, <b>int</b>&nbsp;backlog)</i> </td><td width="301">Returns master socket (backlog = max.&nbsp;queue

+size for requests). When <i>host==NULL</i>: host is the machine on which the service runs </td></tr>

+<tr><td width="301"><i>soap_accept(<b>struct</b>&nbsp;soap *soap)</i> </td><td width="301">Returns slave socket </td></tr>

+<tr><td width="301"><i>soap_end(<b>struct</b>&nbsp;soap *soap)</i> </td><td width="301">Clean up deserialized data (except class instances) and temporary data </td></tr>

+<tr><td width="301"><i>soap_free(<b>struct</b>&nbsp;soap *soap)</i> </td><td width="301">Clean up temporary data only </td></tr>

+<tr><td width="301"><i>soap_destroy(<b>struct</b>&nbsp;soap *soap)</i> </td><td width="301">Clean up deserialized class instances (note: this function will be renamed with option <i>-n</i> </td></tr>

+<tr><td width="301"><i>soap_done(<b>struct</b>&nbsp;soap *soap)</i> </td><td width="301">Reset: close master/slave sockets and remove callbacks </td></tr>

+<tr><td width="301"></td><td width="301">(see Section&nbsp;<a href="#sec:callback">18.7</a> </td></tr></table>

+

+</td></tr></table><br></span>

+The <i>host</i> name in <i>soap_bind</i> may be NULL to indicate that the current host should be used.

+

+<div class="p"><!----></div>

+The <i>soap.accept_timeout</i> attribute of the gSOAP run-time environment specifies the timeout value for a non-blocking

+<i>soap_accept(&amp;soap)</i> call. See Section&nbsp;<a href="#sec:timeout">18.17</a> for more details on timeout management.

+

+<div class="p"><!----></div>

+See Section&nbsp;<a href="#sec:memory">8.13</a> for more details on memory management.

+

+<div class="p"><!----></div>

+A client application connects to this stand-alone service with the endpoint

+<i>machine.cs.fsu.edu:18083</i>.

+A client may use the <i>http://</i> prefix. When absent, no HTTP header is send and no HTTP-based information will be communicated

+to the service.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.2.4">

+7.2.4</a>&nbsp;&nbsp;<font color="#0000FF">How to Create a Multi-Threaded Stand-Alone Service</font></h4><a name="sec:mt">

+</a>

+

+<div class="p"><!----></div>

+Multi-threading a Web Service is essential when the response times for handling requests by the service are (potentially) long or when keep-alive is enabled, see Section&nbsp;<a href="#sec:keepalive">18.11</a>.

+In case of long response times, the latencies introduced by the unrelated requests may become prohibitive for a successful

+deployment of a stand-alone service. When HTTP keep-alive is enabled, a client may not close the socket on time, thereby preventing other clients from connecting.

+

+<div class="p"><!----></div>

+gSOAP 2.0 and higher is thread safe and supports the implementation of multi-threaded stand-alone services in which

+a thread is used to handle a request.

+

+<div class="p"><!----></div>

+The following example illustrates the use of threads to improve the quality of service by handling new requests in separate threads:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "soapH.h" <br />

+#include  &lt; pthread.h &gt;  <br />

+#define BACKLOG (100)	// Max. request backlog <br />

+<b>int</b>&nbsp;main(<b>int</b>&nbsp;argc, <b>char</b>&nbsp;**argv) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(argc  &lt;  2) // no args: assume this is a CGI application <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_serve(&amp;soap); // serve request, one thread, CGI style <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_destroy(&amp;soap); // dealloc C++ data <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_end(&amp;soap); // dealloc data and clean up <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>else</b>&nbsp;<br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap.send_timeout = 60; // 60 seconds <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap.recv_timeout = 60; // 60 seconds <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap.accept_timeout = 3600; // server stops after 1 hour of inactivity <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap.max_keep_alive = 100; // max keep-alive sequence <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>void</b>&nbsp;*process_request(<b>void</b>*); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap *tsoap; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pthread_t tid; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;port = atoi(argv[1]); // first command-line arg is port <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SOAP_SOCKET m, s; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m = soap_bind(&amp;soap, NULL, port, BACKLOG); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!soap_valid_socket(m)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(1); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, <tt>"Socket&nbsp;connection&nbsp;successful&nbsp;%d\n"</tt>, m); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>for</b>&nbsp;(;;) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s = soap_accept(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!soap_valid_socket(s)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap.errnum) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(1); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, <tt>"server&nbsp;timed&nbsp;out\n"</tt>); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>break</b>; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, <tt>"Thread&nbsp;%d&nbsp;accepts&nbsp;socket&nbsp;%d&nbsp;connection&nbsp;from&nbsp;IP&nbsp;%d.%d.%d.%d\n"</tt>, i, s, (soap.ip &gt;&gt; 24)&amp;0xFF,

+(soap.ip &gt;&gt; 16)&amp;0xFF, (soap.ip &gt;&gt; 8)&amp;0xFF, soap.ip&amp;0xFF); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tsoap = soap_copy(&amp;soap); // make a safe copy <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!tsoap) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>break</b>; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pthread_create(&amp;tid, NULL, (<b>void</b>*(*)(<b>void</b>*))process_request, (<b>void</b>*)tsoap); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;soap_done(&amp;soap); // detach soap struct <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;0; <br />

+} <br />

+<b>void</b>&nbsp;*process_request(<b>void</b>&nbsp;*soap) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;pthread_detach(pthread_self()); <br />

+&nbsp;&nbsp;&nbsp;soap_serve((<b>struct</b>&nbsp;soap*)soap); <br />

+&nbsp;&nbsp;&nbsp;soap_destroy((<b>struct</b>&nbsp;soap*)soap); // dealloc C++ data <br />

+&nbsp;&nbsp;&nbsp;soap_end((<b>struct</b>&nbsp;soap*)soap); // dealloc data and clean up <br />

+&nbsp;&nbsp;&nbsp;soap_done((<b>struct</b>&nbsp;soap*)soap); // detach soap struct <br />

+&nbsp;&nbsp;&nbsp;free(soap); <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;NULL; <br />

+}

+</td></tr></table><br></i>

+Note: the code does not wait for threads to join the main thread upon program termination.

+

+<div class="p"><!----></div>

+The <i>soap_serve</i> dispatcher handles one request or multiple requests when

+HTTP keep-alive is set with <i>SOAP_IO_KEEPALIVE</i>. The

+<i>soap.max_keep_alive</i> value can be set to the maximum keep-alive calls

+allowed, which is important to avoid a client from holding a thread

+indefinitely. The send and receive timeouts are set to avoid (intentionally)

+slow clients from holding a socket connection too long. The accept timeout is used

+to let the server terminate automatically after a period of inactivity.

+

+<div class="p"><!----></div>

+The following example uses a pool of servers to limit the machine's resource utilization:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "soapH.h" <br />

+#include  &lt; pthread.h &gt;  <br />

+#define BACKLOG (100)	// Max. request backlog <br />

+#define MAX_THR (10)	// Max. threads to serve requests <br />

+<b>int</b>&nbsp;main(<b>int</b>&nbsp;argc, <b>char</b>&nbsp;**argv) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(argc  &lt;  2) // no args: assume this is a CGI application <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_serve(&amp;soap); // serve request, one thread, CGI style <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_destroy(&amp;soap); // dealloc C++ data <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_end(&amp;soap); // dealloc data and clean up <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>else</b>&nbsp;<br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap *soap_thr[MAX_THR]; // each thread needs a runtime environment <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pthread_t tid[MAX_THR]; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;port = atoi(argv[1]); // first command-line arg is port <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SOAP_SOCKET m, s; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;i; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m = soap_bind(&amp;soap, NULL, port, BACKLOG); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!soap_valid_socket(m)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(1); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, <tt>"Socket&nbsp;connection&nbsp;successful&nbsp;%d\n"</tt>, m); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>for</b>&nbsp;(i = 0; i  &lt;  MAX_THR; i++) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_thr[i] = NULL; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>for</b>&nbsp;(;;) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>for</b>&nbsp;(i = 0; i  &lt;  MAX_THR; i++) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s = soap_accept(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!soap_valid_socket(s)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap.errnum) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>continue</b>; // retry<br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>else</b><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, <tt>"Server&nbsp;timed&nbsp;out\n"</tt>); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>break</b>; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, <tt>"Thread&nbsp;%d&nbsp;accepts&nbsp;socket&nbsp;%d&nbsp;connection&nbsp;from&nbsp;IP&nbsp;%d.%d.%d.%d\n"</tt>, i, s, (soap.ip &gt;&gt; 24)&amp;0xFF,

+(soap.ip &gt;&gt; 16)&amp;0xFF, (soap.ip &gt;&gt; 8)&amp;0xFF, soap.ip&amp;0xFF); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!soap_thr[i]) // first time around <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_thr[i] = soap_copy(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!soap_thr[i]) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(1); // could not allocate <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>else</b>// recycle soap environment <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pthread_join(tid[i], NULL); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, "Thread <tt>%</tt>d completed<tt>\</tt>n", i); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_destroy(soap_thr[i]); // deallocate C++ data of old thread <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_end(soap_thr[i]); // deallocate data of old thread <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_thr[i]<tt>-&gt;</tt>socket = s; // new socket fd <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pthread_create(&amp;tid[i], NULL, (<b>void</b>*(*)(<b>void</b>*))soap_serve, (<b>void</b>*)soap_thr[i]); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>for</b>&nbsp;(i = 0; i  &lt;  MAX_THR; i++) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_thr[i]) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_done(soap_thr[i]); // detach context <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(soap_thr[i]); // free up <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;0; <br />

+}

+</td></tr></table><br></i>

+The following functions can be used to setup a gSOAP runtime environment (<i><b>struct</b>&nbsp;soap</i>):

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td><font color="#FF0000"><b>Function</b></font> </td><td width="351"><font color="#FF0000"><b>Description</b></font> </td></tr>

+<tr><td><i>soap_init(<b>struct</b>&nbsp;soap *soap)</i> </td><td width="351">Initializes a runtime environment (required only once) </td></tr>

+<tr><td><i><b>struct</b>&nbsp;soap *soap_new()</i> </td><td width="351">Allocates, initializes, and returns a pointer to a runtime environment </td></tr>

+<tr><td><i><b>struct</b>&nbsp;soap *soap_copy(<b>struct</b>&nbsp;soap *soap)</i> </td><td width="351">Allocates a new runtime environment and copies contents of

+the argument environment such that the new environment does not share data with the argument environment </td></tr>

+<tr><td><i>soap_done(<b>struct</b>&nbsp;soap *soap)</i> </td><td width="351">Reset, close communications, and remove callbacks </td></tr></table>

+

+</td></tr></table><br></span>

+A new environment is initiated for each thread to guarantee exclusive access

+to runtime environments.

+

+<div class="p"><!----></div>

+For clean termination of the server, the master socket can be closed and callbacks removed with <i>soap_done(<b>struct</b>&nbsp;soap *soap)</i>.

+

+<div class="p"><!----></div>

+The advantage of the code shown above is that the machine cannot be overloaded with requests, since the number of active services is limited. However, threads are still started and terminated. This overhead can be eliminated using a queue of requests (open sockets) as is shown in the code below.

+

+<div class="p"><!----></div>

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "soapH.h" <br />

+#include  &lt; pthread.h &gt;  <br />

+#define BACKLOG (100)	// Max. request backlog <br />

+#define MAX_THR (10) // Size of thread pool <br />

+#define MAX_QUEUE (1000) // Max. size of request queue <br />

+SOAP_SOCKET queue[MAX_QUEUE]; // The global request queue of sockets <br />

+<b>int</b>&nbsp;head = 0, tail = 0; // Queue head and tail <br />

+<b>void</b>&nbsp;*process_queue(<b>void</b>*); <br />

+<b>int</b>&nbsp;enqueue(SOAP_SOCKET); <br />

+SOAP_SOCKET dequeue(); <br />

+pthread_mutex_t queue_cs; <br />

+pthread_cond_t queue_cv; <br />

+<b>int</b>&nbsp;main(<b>int</b>&nbsp;argc, <b>char</b>&nbsp;**argv) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(argc  &lt;  2) // no args: assume this is a CGI application <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_serve(&amp;soap); // serve request, one thread, CGI style <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_destroy(&amp;soap); // dealloc C++ data <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_end(&amp;soap); // dealloc data and clean up <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>else</b><br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap *soap_thr[MAX_THR]; // each thread needs a runtime environment <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pthread_t tid[MAX_THR]; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;port = atoi(argv[1]); // first command-line arg is port <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SOAP_SOCKET m, s; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;i; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m = soap_bind(&amp;soap, NULL, port, BACKLOG); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!soap_valid_socket(m)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(1); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, <tt>"Socket&nbsp;connection&nbsp;successful&nbsp;%d\n"</tt>, m); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pthread_mutex_init(&amp;queue_cs, NULL); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pthread_cond_init(&amp;queue_cv, NULL); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>for</b>&nbsp;(i = 0; i  &lt;  MAX_THR; i++) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_thr[i] = soap_copy(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, <tt>"Starting&nbsp;thread&nbsp;%d\n"</tt>, i); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pthread_create(&amp;tid[i], NULL, (<b>void</b>*(*)(<b>void</b>*))process_queue, (<b>void</b>*)soap_thr[i]); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>for</b>&nbsp;(;;) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s = soap_accept(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!soap_valid_socket(s)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap.errnum) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>continue</b>; // retry <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>else</b><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, <tt>"Server&nbsp;timed&nbsp;out\n"</tt>); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>break</b>; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, <tt>"Thread&nbsp;%d&nbsp;accepts&nbsp;socket&nbsp;%d&nbsp;connection&nbsp;from&nbsp;IP&nbsp;%d.%d.%d.%d\n"</tt>, i, s, (soap.ip &gt;&gt; 24)&amp;0xFF, (soap.ip &gt;&gt; 16)&amp;0xFF, (soap.ip &gt;&gt; 8)&amp;0xFF, soap.ip&amp;0xFF); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>while</b>&nbsp;(enqueue(s) == SOAP_EOM) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sleep(1); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>for</b>&nbsp;(i = 0; i  &lt;  MAX_THR; i++) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>while</b>&nbsp;(enqueue(SOAP_INVALID_SOCKET) == SOAP_EOM) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sleep(1); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>for</b>&nbsp;(i = 0; i  &lt;  MAX_THR; i++) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, <tt>"Waiting&nbsp;for&nbsp;thread&nbsp;%d&nbsp;to&nbsp;terminate...&nbsp;"</tt>, i); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pthread_join(tid[i], NULL); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, <tt>"terminated\n"</tt>); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_done(soap_thr[i]); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(soap_thr[i]); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pthread_mutex_destroy(&amp;queue_cs); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pthread_cond_destroy(&amp;queue_cv); <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;soap_done(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;0; <br />

+} <br />

+<b>void</b>&nbsp;*process_queue(<b>void</b>&nbsp;*soap) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap *tsoap = (<b>struct</b>&nbsp;soap*)soap; <br />

+&nbsp;&nbsp;&nbsp;<b>for</b>&nbsp;(;;) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tsoap<tt>-&gt;</tt>socket = dequeue(); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!soap_valid_socket(tsoap<tt>-&gt;</tt>socket)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>break</b>; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_serve(tsoap); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_destroy(tsoap); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_end(tsoap); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, <tt>"served\n"</tt>); <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;NULL; <br />

+} <br />

+<b>int</b>&nbsp;enqueue(SOAP_SOCKET sock) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;status = SOAP_OK; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;next; <br />

+&nbsp;&nbsp;&nbsp;pthread_mutex_lock(&amp;queue_cs); <br />

+&nbsp;&nbsp;&nbsp;next = tail + 1; <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(next  &gt; = MAX_QUEUE) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;next = 0; <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(next == head) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;status = SOAP_EOM; <br />

+&nbsp;&nbsp;&nbsp;<b>else</b><br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue[tail] = sock; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tail = next; <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;pthread_cond_signal(&amp;queue_cv); <br />

+&nbsp;&nbsp;&nbsp;pthread_mutex_unlock(&amp;queue_cs); <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;status; <br />

+} <br />

+SOAP_SOCKET dequeue() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;SOAP_SOCKET sock; <br />

+&nbsp;&nbsp;&nbsp;pthread_mutex_lock(&amp;queue_cs); <br />

+&nbsp;&nbsp;&nbsp;pthread_cond_wait(&amp;queue_cv, &amp;queue_cs); <br />

+&nbsp;&nbsp;&nbsp;sock = queue[head++]; <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(head  &gt; = MAX_QUEUE) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;head = 0; <br />

+&nbsp;&nbsp;&nbsp;pthread_mutex_unlock(&amp;queue_cs); <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;sock; <br />

+}

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.2.5">

+7.2.5</a>&nbsp;&nbsp;<font color="#0000FF">How to Pass Application Data to Service Methods</font></h4>

+

+<div class="p"><!----></div>

+The <i><b>void</b>&nbsp;*soap.user</i> field can be used to pass application data to service methods. This field should be set before the <i>soap_serve()</i> call. The service method can access this field to use the application-dependent data. The following example shows how a non-static database handle is initialized and passed to the service methods:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+{ ... <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;database_handle_type database_handle; <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap);

+&nbsp;&nbsp;&nbsp;soap.user = (void*)database_handle; <br />

+&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;soap_serve(&amp;soap); // call the remove method dispatcher to handle request <br />

+&nbsp;&nbsp;&nbsp;... <br />

+} <br />

+<b>int</b>&nbsp;ns__myMethod(<b>struct</b>&nbsp;soap *soap, ...) <br />

+{ ... <br />

+&nbsp;&nbsp;&nbsp;fetch((database_handle_type*)soap<tt>-&gt;</tt>user); <br />// get data

+&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+}

+</td></tr></table><br></span>

+Another way to pass application data around in a more organized way is accomplished with plugins, see Section&nbsp;<a href="#sec:plugins">18.36</a>.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.2.6">

+7.2.6</a>&nbsp;&nbsp;<font color="#0000FF">Some Web Service Implementation Issues</font></h4>

+

+<div class="p"><!----></div>

+The same client header file specification issues apply to the specification and implementation of a SOAP Web service. Refer to

+

+<ul>

+<li> <a href="#sec:namespace">7.1.2</a> for namespace considerations.

+<div class="p"><!----></div>

+</li>

+

+<li> <a href="#sec:encoding">7.1.5</a> for an explanation on how to change the encoding of the primitive types.

+<div class="p"><!----></div>

+</li>

+

+<li> <a href="#sec:response">7.1.7</a> for a discussion on how the response element format can be controlled.

+<div class="p"><!----></div>

+</li>

+

+<li> <a href="#sec:multiple">7.1.9</a> for details on how to pass multiple output parameters from a remote method.

+<div class="p"><!----></div>

+</li>

+

+<li> <a href="#sec:compound">7.1.11</a> for passing complex data types as output parameters.

+<div class="p"><!----></div>

+</li>

+

+<li> <a href="#sec:anonymous">7.1.13</a> for anonymizing the input and output parameter names.

+<div class="p"><!----></div>

+</li>

+</ul>

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.2.7">

+7.2.7</a>&nbsp;&nbsp;<font color="#0000FF">How to Generate C++ Server Object Classes</font></h4><a name="sec:object">

+</a>

+

+<div class="p"><!----></div>

+Server object classes for C++ server applications are automatically generated by the gSOAP compiler.

+We illustrate the generation of an object class with a calculator example.

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Content of file <tt>"calc.h"</tt>: <br />

+//gsoap ns service name: Calculator <br />

+//gsoap ns service style: rpc <br />

+//gsoap ns service encoding: encoded <br />

+//gsoap ns service location: http://www.cs.fsu.edu/~engelen/calc.cgi <br />

+//gsoap ns schema namespace: urn:calc <br />

+//gsoap ns service method-action: add "" <br />

+<b>int</b>&nbsp;ns__add(<b>double</b>&nbsp;a, <b>double</b>&nbsp;b, <b>double</b>&nbsp;&amp;result);

+<b>int</b>&nbsp;ns__sub(<b>double</b>&nbsp;a, <b>double</b>&nbsp;b, <b>double</b>&nbsp;&amp;result);

+<b>int</b>&nbsp;ns__mul(<b>double</b>&nbsp;a, <b>double</b>&nbsp;b, <b>double</b>&nbsp;&amp;result);

+<b>int</b>&nbsp;ns__div(<b>double</b>&nbsp;a, <b>double</b>&nbsp;b, <b>double</b>&nbsp;&amp;result);

+</td></tr></table><br></i>

+The first three directives provide the service name which is used to name the service class, the service location (endpoint), and

+the schema. The fourth directive defines the optional SOAPAction for the method, which is a string associated with SOAP 1.1 operations.

+Compilation of this header file with the gSOAP compiler <i>soapcpp2</i> creates a new file <i>soapCalculatorObject.h</i> with the

+following contents:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "soapH.h" <br />

+<b>class</b>&nbsp;Calculator : <b>public</b>&nbsp;soap <br />

+{ <b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;Quote() { soap_init(<b>this</b>); }; <br />

+&nbsp;&nbsp;&nbsp;~Quote() { soap_destroy(<b>this</b>); soap_end(<b>this</b>); soap_done(<b>this</b>); }}; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;serve() { <b>return</b>&nbsp;soap_serve(<b>this</b>); }; <br />

+};

+</td></tr></table><br></i>

+This generated server object class can be included into a server application together with the generated namespace table as shown in this example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "soapCalculatorObject.h"	// get server object <br />

+#include "Calculator.nsmap"		// get namespace bindings <br />

+<b>int</b>&nbsp;main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;Calculator c; <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;c.serve(); // calls <i>soap_serve</i> to serve as CGI application (using stdin/out) <br />

+} <br />

+<b>int</b>&nbsp;ns__add(<b>double</b>&nbsp;a, <b>double</b>&nbsp;b, <b>double</b>&nbsp;&amp;result) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;result = a + b; <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+} <br />

+... sub(), mul(), and div() implementations ...

+</td></tr></table><br></i>

+You can use soapcpp2 compiler option <i>-n</i> together with <i>-p</i> to create a local namespaces table to avoid link conflict when you need to combine multiple tables and/or multiple servers, see also Sections&nbsp;<a href="#sec:options">8.1</a> and&nbsp;<a href="#sec:dylibs">18.34</a>, and you can use a C++ code <i><b>namespace</b></i> to create a namespace qualified server object class, see Section&nbsp;<a href="#sec:codenamespace">18.33</a>.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.2.8">

+7.2.8</a>&nbsp;&nbsp;<font color="#0000FF">How to Generate WSDL Service Descriptions</font></h4><a name="sec:wsdl">

+</a>

+

+<div class="p"><!----></div>

+The gSOAP stub and skeleton compiler <i>soapcpp2</i> generates WSDL (Web Service Description Language) service descriptions and XML Schema files

+when processing a header file.  The compiler produces one WSDL file for a set of remote methods.  The names of the function

+prototypes of the remote methods must use the same namespace prefix and the namespace prefix is used to name the WSDL file.  If

+multiple namespace prefixes are used to define remote methods, multiple WSDL files will be created and each file describes the set

+of remote methods belonging to a namespace prefix.

+

+<div class="p"><!----></div>

+In addition to the generation of the <tt>ns.wsdl</tt> file, a file with a namespace mapping table is generated by the gSOAP

+compiler. An example mapping table is shown below:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;Namespace namespaces[] = <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;{"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"}, <br />

+&nbsp;&nbsp;&nbsp;{"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/"}, <br />

+&nbsp;&nbsp;&nbsp;{"xsi", "http://www.w3.org/2001/XMLSchema-instance", \"http://www.w3.org/*/XMLSchema-instance"}, <br />

+&nbsp;&nbsp;&nbsp;{"xsd", "http://www.w3.org/2001/XMLSchema", \"http://www.w3.org/*/XMLSchema"}, <br />

+&nbsp;&nbsp;&nbsp;{"ns", "http://tempuri.org"}, <br />

+&nbsp;&nbsp;&nbsp;{NULL, NULL} <br />

+};

+</td></tr></table><br></i>

+This file can be incorporated in the

+client/service application, see Section&nbsp;<a href="#sec:nstable">9.4</a> for details on namespace mapping tables.

+

+<div class="p"><!----></div>

+To deploy a Web service, copy the compiled CGI service application to the designated CGI directory of your Web server.

+Make sure the proper file permissions are set (<tt>chmod 755 calc.cgi</tt> for Unix/Linux).

+You can then publish the WSDL file on the Web by placing it in the appropriate Web server directory.

+

+<div class="p"><!----></div>

+The gSOAP compiler also generates XML Schema files for all C/C++

+complex types (e.g.&nbsp;<i><b>struct</b></i>s and <i><b>class</b></i>es) when declared with a namespace prefix.

+These files are named <tt>ns.xsd</tt>, where <tt>ns</tt> is the namespace prefix used in the declaration of the complex type.

+The XML Schema files do not have to be published as the WSDL file already contains the appropriate XML Schema definitions.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.2.9">

+7.2.9</a>&nbsp;&nbsp;<font color="#0000FF">Example</font></h4><a name="sec:example8">

+</a>

+

+<div class="p"><!----></div>

+For example, suppose the following methods are defined in the header file:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>double</b>&nbsp;xsd__double; <br />

+<b>int</b>&nbsp;ns__add(xsd__double a, xsd__double b, xsd__double &amp;result); <br />

+<b>int</b>&nbsp;ns__sub(xsd__double a, xsd__double b, xsd__double &amp;result); <br />

+<b>int</b>&nbsp;ns__sqrt(xsd__double a, xsd__double &amp;result); <br />

+</td></tr></table><br></i>

+Then, one WSDL file will be created with the file name <tt>ns.wsdl</tt> that describes all three remote methods:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;?xml version="1.0" encoding="UTF-8"?&#62; <br />

+&lt;definitions name="Service" <br />

+&nbsp;&nbsp;&nbsp;xmlns="http://schemas.xmlsoap.org/wsdl/" <br />

+&nbsp;&nbsp;&nbsp;targetNamespace="http://location/Service.wsdl" <br />

+&nbsp;&nbsp;&nbsp;xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" <br />

+&nbsp;&nbsp;&nbsp;xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" <br />

+&nbsp;&nbsp;&nbsp;xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/" <br />

+&nbsp;&nbsp;&nbsp;xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/" <br />

+&nbsp;&nbsp;&nbsp;xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" <br />

+&nbsp;&nbsp;&nbsp;xmlns:tns="http://location/Service.wsdl" <br />

+&nbsp;&nbsp;&nbsp;xmlns:ns="http://tempuri.org"&#62; <br />

+&lt;types&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;schema <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xmlns="http://www.w3.org/2000/10/XMLSchema" <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;targetNamespace="http://tempuri.org" <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;complexType name="addResponse"&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;all&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;element name="result" type="double" minOccurs="0" maxOccurs="1"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/all&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;anyAttribute namespace="##other"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/complexType&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;complexType name="subResponse"&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;all&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;element name="result" type="double" minOccurs="0" maxOccurs="1"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/all&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;anyAttribute namespace="##other"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/complexType&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;complexType name="sqrtResponse"&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;all&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;element name="result" type="double" minOccurs="0" maxOccurs="1"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/all&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;anyAttribute namespace="##other"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/complexType&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;/schema&#62; <br />

+&lt;/types&#62; <br />

+&lt;message name="addRequest"&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;part name="a" type="xsd:double"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;part name="b" type="xsd:double"/&#62; <br />

+&lt;/message&#62; <br />

+&lt;message name="addResponse"&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;part name="result" type="xsd:double"/&#62; <br />

+&lt;/message&#62; <br />

+&lt;message name="subRequest"&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;part name="a" type="xsd:double"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;part name="b" type="xsd:double"/&#62; <br />

+&lt;/message&#62; <br />

+&lt;message name="subResponse"&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;part name="result" type="xsd:double"/&#62; <br />

+&lt;/message&#62; <br />

+&lt;message name="sqrtRequest"&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;part name="a" type="xsd:double"/&#62; <br />

+&lt;/message&#62; <br />

+&lt;message name="sqrtResponse"&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;part name="result" type="xsd:double"/&#62; <br />

+&lt;/message&#62; <br />

+&lt;portType name="ServicePortType"&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;operation name="add"&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input message="tns:addRequest"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;output message="tns:addResponse"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;/operation&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;operation name="sub"&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input message="tns:subRequest"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;output message="tns:subResponse"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;/operation&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;operation name="sqrt"&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input message="tns:sqrtRequest"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;output message="tns:sqrtResponse"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;/operation&#62; <br />

+&lt;/portType&#62; <br />

+&lt;binding name="ServiceBinding" type="tns:ServicePortType"&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;SOAP:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;operation name="add"&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SOAP:operation soapAction="http://tempuri.org#add"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SOAP:body use="encoded" namespace="http://tempuri.org" <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/input&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;output&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SOAP:body use="encoded" namespace="http://tempuri.org" <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/output&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;/operation&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;operation name="sub"&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SOAP:operation soapAction="http://tempuri.org#sub"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SOAP:body use="encoded" namespace="http://tempuri.org" <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/input&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;output&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SOAP:body use="encoded" namespace="http://tempuri.org" <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/output&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;/operation&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;operation name="sqrt"&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SOAP:operation soapAction="http://tempuri.org#sqrt"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SOAP:body use="encoded" namespace="http://tempuri.org" <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/input&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;output&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SOAP:body use="encoded" namespace="http://tempuri.org" <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/output&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;/operation&#62; <br />

+&lt;/binding&#62; <br />

+&lt;service name="Service"&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;port name="ServicePort" binding="tns:ServiceBinding"&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SOAP:address location="http://location/Service.cgi"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;/port&#62; <br />

+&lt;/service&#62; <br />

+&lt;/definitions&#62;

+</td></tr></table><br></tt>

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.2.10">

+7.2.10</a>&nbsp;&nbsp;<font color="#0000FF">How to Parse and Import WSDL Service Descriptions to Develop Clients and Servers</font></h4><a name="sec:wsdlin">

+</a>

+

+<div class="p"><!----></div>

+Note: see <i>README.txt</i> in the <i>wsdl</i> directory for installation

+instructions for the WSDL parser and importer.

+

+<div class="p"><!----></div>

+The creation of SOAP Web Services applications from a WSDL service description is a

+two-step process.

+

+<div class="p"><!----></div>

+First, execute <i>wsdl2h <u><span class="roman">file</span></u>.wsdl</i> which generates the

+a C++ header file <i><u><span class="roman">file</span></u>.h</i>

+(use <i>wsdl2h -c <u><span class="roman">file</span></u>.wsdl</i> to generate pure C code).

+You can provide a URL instead of a file name, when applicable.

+The generated header file is a Web service specification that contains the parameter types and service function definitions.

+The functions are represented as function prototypes. The file contains various annotations related to the Web service.

+The header file must be processed by the gSOAP compiler. You cannot use it with a C/C++ compiler directly.

+

+<div class="p"><!----></div>

+Second, the header file <i><u><span class="roman">file</span></u>.h</i> is processed by the

+gSOAP compiler by executing <i>soapcpp2 -i <u><span class="roman">file</span></u>.h</i>.  This

+creates the C/C++ source files to build a client application,

+see&nbsp;<a href="#sec:client">7.1</a>.  In addition, this generates a client proxy object

+declared in <i>soap<u><span class="roman">Service</span></u>Proxy.h</i>, where

+<span class="roman"><u>Service</u></span> is the name of the service defined in the WSDL.  To

+use this object, include the <i>soap<u><span class="roman">Service</span></u>Proxy.h</i> and

+<i><u><span class="roman">Service</span></u>.nsmap</i> files in your C++ client application.  The

+<span class="roman"><u>Service</u></span> class provides the remote Web service methods as class

+members.

+

+<div class="p"><!----></div>

+Consider the following example commands (entered at the command prompt):

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+$ wsdl2h -o XMethodsQuery.h http://www.xmethods.net/wsdl/query.wsdl <br />

+... <br />

+$ soapcpp2 -i XMethodsQuery.h

+</td></tr></table><br></span>

+The first command generates <i>XMethodsQuery.h</i> from the WSDL at the specified URL.

+The header file is then processed by the gSOAP compiler to generate the stubs

+and skeletons.

+See XMethodsQuery.h for the types and service functions. A C++ client application may

+use the generated <i>soapXMethodsQuerySoapProxy.h</i> class and

+<i>XMethodsQuerySoap.nsmap</i> XML namespace table to access the Web

+service. Both need to be <i>#include</i>-d in your source. Then compile and link

+the <i>soapC.cpp</i>, <i>soapClient.cpp</i>, and <i>stdsoap2.cpp</i> sources to complete the build.

+

+<div class="p"><!----></div>

+When parsing a WSDL, the output file name is the WSDL input file name with

+extension <i>.h</i> instead of <i>.wsdl</i>. When an input file is absent or a WSDL file

+from a Web location is accessed, the header output will be produced on the

+standard output. Schema files (<i>.xsd</i>) can also be parsed and processed.

+

+<div class="p"><!----></div>

+The <i>wsdl2h</i> command-line options are:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td><font color="#FF0000"><b>Option</b></font>	</td><td><font color="#FF0000"><b>Description</b></font> </td></tr>

+<tr><td><i>-a</i>	</td><td>generate indexed struct names for local elements with anonymous types </td></tr>

+<tr><td><i>-c</i>	</td><td>generate C source code </td></tr>

+<tr><td><i>-d</i>	</td><td>use DOM to populate xs:any and xsd:anyType elements </td></tr>

+<tr><td><i>-e</i>	</td><td>don't qualify enum names </td></tr>

+<tr><td></td><td>This option is for backward compatibility with gSOAP 2.4.1 and earlier. </td></tr>

+<tr><td></td><td>The option does not produce code that conforms to WS-I Basic Profile 1.0a. </td></tr>

+<tr><td><i>-f</i>      </td><td>generate flat C++ class hierarchy for schema extensions </td></tr>

+<tr><td><i>-g</i>	</td><td>generate global top-level element declarations </td></tr>

+<tr><td><i>-h</i>      </td><td>print help information </td></tr>

+<tr><td><i>-I path</i>	</td><td>use path to find files </td></tr>

+<tr><td><i>-l</i>	</td><td>include license information in output </td></tr>

+<tr><td><i>-m</i>	</td><td>use xsd.h module to import primitive types </td></tr>

+<tr><td><i>-n name</i>	</td><td>use <i>name</i> as the base namespace prefix name instead of <i>ns</i> </td></tr>

+<tr><td><i>-N name</i>	</td><td>use <i>name</i> as the base namespace prefix name for service namespaces </td></tr>

+<tr><td><i>-o file</i>  </td><td>output to file </td></tr>

+<tr><td><i>-p</i>      </td><td>create polymorphic types with C++ inheritance hierarchy with base <i>xsd__anyType</i> </td></tr>

+<tr><td></td><td>This is automatically performed when WSDL contains polymorphic definitions </td></tr>

+<tr><td><i>-r host:port</i>      </td><td>connect via proxy host and port </td></tr>

+<tr><td><i>-s</i>      </td><td>don't generate STL code (no std::string and no std::vector) </td></tr>

+<tr><td><i>-t file</i>  </td><td>use type map file instead of the default file typemap.dat </td></tr>

+<tr><td><i>-u</i>	</td><td>don't generate unions </td></tr>

+<tr><td><i>-v</i>      </td><td>verbose output </td></tr>

+<tr><td><i>-w</i>      </td><td>always wrap response parameters in a response struct </td></tr>

+<tr><td><i>-x</i>	</td><td>don't generate <i>_XML any/anyAttribute</i> extensibility elements </td></tr>

+<tr><td><i>-y</i>	</td><td>generate typedef synonyms for structs and enums </td></tr>

+<tr><td><i>-?</i>      </td><td>print help information </td></tr></table>

+

+</td></tr></table><br></span>

+

+<div class="p"><!----></div>

+      <h4><a name="tth_sEc7.2.11">

+7.2.11</a>&nbsp;&nbsp;<font color="#0000FF">The typemap.dat File</font></h4><a name="sec:typemap">

+</a>

+

+<div class="p"><!----></div>

+A <i>typemap.dat</i> file for <i>wsdl2h</i> contains custom XML Schema and C/C++

+type bindings. An internal table is used by default.

+

+<div class="p"><!----></div>

+An example typemap file is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+#       This file contains custom definitions of the XML Schema types and <br />

+#       C/C++ types for your project, and XML namespace prefix definitions. <br />

+#       The wsdl2h WSDL importer consults this file to determine bindings. <br />

+  <br />

+<tt>[</tt> <br />

+// This comment will be included in the generated .h file <br />

+// You can include any additional declarations, includes, imports, etc. <br />

+// within <tt>[</tt> <tt>]</tt> sections. The brackets MUST appear at the start of a line <br />

+<tt>]</tt> <br />

+#       XML namespace prefix definitions can be provided to override the <br />

+#       default choice of ns1, ns2, ... prefixes. For example: <br />

+ <br />

+i       = "http://www.soapinterop.org/" <br />

+s       = "http://www.soapinterop.org/xsd" <br />

+ <br />

+#       Type definitions are of the form:

+#       type = declaration <font face="symbol">|</font

+> use <font face="symbol">|</font

+> pointer-use <br />

+#       where <br />

+#       type is the XML Schema type (or an application type in a namespace <br />

+#               that has a prefix definition given as above). <br />

+#       declaration is an optional C/C++ type declaration <br />

+#       use is how the type is referred to in code <br />

+#       pointer-use is how the type should be referred to as a pointer (opt) <br />

+#       Example XML Schema and C/C++ type bindings: <br />

+ <br />

+xsd__int        = <font face="symbol">|</font

+> int <br />

+xsd__string     = <font face="symbol">|</font

+> char* <font face="symbol">|</font

+> char* <br />

+xsd__boolean = enum xsd__boolean  false_, true_ ; <font face="symbol">|</font

+> enum xsd__boolean <br />

+xsd__base64Binary = class xsd__base64Binary  unsigned char *__ptr; int __size; ; <font face="symbol">|</font

+> xsd__base64Binary <font face="symbol">|</font

+> xsd__base64Binary <br />

+#	You can extend structs and classes with member data and functions. <br />

+#      For example, adding a constructor to ns__myClass:

+ns__myClass     = $ ns__myClass(); <br />

+#	The general form is

+#	class_name = $ member; <br />

+</td></tr></table><br></tt>

+The <i>i</i> and <i>s</i> prefixes are declared such that the header file output by the WSDL parser will use these to produce C/C++ code.

+XML Schema types are associated with an optional C/C++ type declaration, a use reference, and a pointer-use reference. The pointer-use reference of the <i>xsd__byte</i> type for example, is <i><b>int</b>*</i> because <i><b>char</b>*</i> is reserved for strings.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.2.12">

+7.2.12</a>&nbsp;&nbsp;<font color="#0000FF">How to Use Client Functionalities Within a Service</font></h4>

+

+<div class="p"><!----></div>

+A gSOAP service implemented with CGI may make direct client calls to other services from within its service operations, without setting up a new context. A stand-alone service application must setup a new soap struct context, e.g.&nbsp;using <i>soap_copy</i> and delete it after the call.

+

+<div class="p"><!----></div>

+The server-side client call is best illustrated with an example.  The following example is a

+more sophisticated example that combines the functionality of two Web services

+into one new SOAP Web service.  The service provides a currency-converted stock

+quote.  To serve a request, the service in turn requests the stock quote and

+the currency-exchange rate from two XMethods services.

+

+<div class="p"><!----></div>

+In addition to being a client of two XMethods services, this service

+application can also be used as a client of itself to test the implementation.

+As a client invoked from the command-line, it will return a currency-converted

+stock quote by connecting to a copy of itself installed as a CGI application on

+the Web to retrieve the quote after which it will print the quote on the

+terminal.

+

+<div class="p"><!----></div>

+The header file input to the gSOAP compiler is given below:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of file "quotex.h": <br />

+<b>int</b>&nbsp;ns1__getQuote(<b>char</b>&nbsp;*symbol, <b>float</b>&nbsp;&amp;result); // XMethods delayed stock quote service remote method <br />

+<b>int</b>&nbsp;ns2__getRate(<b>char</b>&nbsp;*country1, <b>char</b>&nbsp;*country2, <b>float</b>&nbsp;&amp;result); // XMethods currency-exchange service remote method <br />

+<b>int</b>&nbsp;ns3__getQuote(<b>char</b>&nbsp;*symbol, <b>char</b>&nbsp;*country, <b>float</b>&nbsp;&amp;result); // the new currency-converted stock quote service <br />

+</td></tr></table><br></i>

+The <i>quotex.cpp</i> client/service application source is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of file "quotex.cpp": <br />

+#include "soapH.h"	// include generated proxy and SOAP support <br />

+<b>int</b>&nbsp;main(<b>int</b>&nbsp;argc, <b>char</b>&nbsp;**argv) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;<b>float</b>&nbsp;q; <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(argc  &lt; = 2) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_serve(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;<b>else</b>&nbsp;<b>if</b>&nbsp;(soap_call_ns3__getQuote(&amp;soap, <tt>"http://www.cs.fsu.edu/~engelen/quotex.cgi"</tt>, <tt>""</tt>, argv[1], argv[2], q)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); <br />

+&nbsp;&nbsp;&nbsp;<b>else</b>&nbsp;<br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(<tt>"\nCompany&nbsp;%s:&nbsp;%f&nbsp;(%s)\n"</tt>, argv[1], q, argv[2]); <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;0; <br />

+} <br />

+<b>int</b>&nbsp;ns3__getQuote(<b>struct</b>&nbsp;soap *soap, <b>char</b>&nbsp;*symbol, <b>char</b>&nbsp;*country, <b>float</b>&nbsp;&amp;result) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>float</b>&nbsp;q, r; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;socket = soap<tt>-&gt;</tt>socket; // save socket (stand-alone service only, does not support keep-alive) <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_call_ns1__getQuote(soap, <tt>"http://services.xmethods.net/soap"</tt>, <tt>""</tt>, symbol, &amp;q) == 0 &amp;&amp; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_call_ns2__getRate(soap, <tt>"http://services.xmethods.net/soap"</tt>, NULL, <tt>"us"</tt>, country, &amp;r) == 0) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result = q*r; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>socket = socket; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>socket = socket; <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_FAULT;	// pass soap fault messages on to the client of this app <br />

+} <br />

+/* Since this app is a combined client-server, it is put together with <br />

+ * one header file that describes all remote methods. However, as a consequence we <br />

+ * have to implement the methods that are not ours. Since these implementations are <br />

+ * never called (this code is client-side), we can make them dummies as below. <br />

+ */ <br />

+<b>int</b>&nbsp;ns1__getQuote(<b>struct</b>&nbsp;soap *soap, <b>char</b>&nbsp;*symbol, <b>float</b>&nbsp;&amp;result) <br />

+{ <b>return</b>&nbsp;SOAP_NO_METHOD; } // dummy: will never be called <br />

+<b>int</b>&nbsp;ns2__getRate(<b>struct</b>&nbsp;soap *soap, <b>char</b>&nbsp;*country1, <b>char</b>&nbsp;*country2, <b>float</b>&nbsp;&amp;result) <br />

+{ <b>return</b>&nbsp;SOAP_NO_METHOD; } // dummy: will never be called <br />

+ <br />

+<b>struct</b>&nbsp;Namespace namespaces[] = <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;{"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"}, <br />

+&nbsp;&nbsp;&nbsp;{"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/"}, <br />

+&nbsp;&nbsp;&nbsp;{"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance"}, <br />

+&nbsp;&nbsp;&nbsp;{"xsd", "http://www.w3.org/2001/XMLSchema",          "http://www.w3.org/*/XMLSchema"}, <br />

+&nbsp;&nbsp;&nbsp;{"ns1", "urn:xmethods-delayed-quotes"}, <br />

+&nbsp;&nbsp;&nbsp;{"ns2", "urn:xmethods-CurrencyExchange"}, <br />

+&nbsp;&nbsp;&nbsp;{"ns3", "urn:quotex"}, <br />

+&nbsp;&nbsp;&nbsp;{NULL, NULL} <br />

+};

+</td></tr></table><br></i>

+To compile:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>soapcpp2 quotex.h</i> <br />

+<i>g++ -o quotex.cgi quotex.cpp soapC.cpp soapClient.cpp soapServer.cpp stdsoap2.cpp -lsocket -lxnet -lnsl</i>

+</td></tr></table><br></span>

+Note: under Linux and Mac OS X you can often omit the <tt>-l</tt> libraries.

+

+<div class="p"><!----></div>

+The <i>quotex.cgi</i> executable is installed as a CGI application on the Web by

+copying it in the designated directory specific to your Web server.  After

+this, the executable can also serve to test the service.  For example

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>quotex.cgi IBM uk</i>

+</td></tr></table><br></span>

+returns the quote of <i>IBM</i> in <i>uk</i> pounds by communicating the request

+and response quote from the CGI application.  See

+<a href="http://xmethods.com/detail.html?id=5"><tt>http://xmethods.com/detail.html?id=5</tt></a> for details on the currency

+abbreviations.

+

+<div class="p"><!----></div>

+When combining clients and service functionalities, it is required to use one

+header file input to the compiler.  As a consequence, however, stubs and

+skeletons are available for <b>all</b> remote methods, while the client part

+will only use the stubs and the service part will use the skeletons.  Thus,

+dummy implementations of the unused remote methods need to be given which are

+never called.

+

+<div class="p"><!----></div>

+Three WSDL files are created by gSOAP: <tt>ns1.wsdl</tt>, <tt>ns2.wsdl</tt>, and

+<tt>ns3.wsdl</tt>. Only the <tt>ns3.wsdl</tt> file is required to be published as it

+contains the description of the combined service, while the others are

+generated as a side-effect (and in case you want to develop these separate

+services).

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc7.3">

+7.3</a>&nbsp;&nbsp;<font color="#0000FF">How to Use gSOAP for Asynchronous One-Way Message Passing</font></h3><a name="sec:oneway1">

+</a>

+

+<div class="p"><!----></div>

+SOAP RPC client-server interaction is synchronous: the client blocks until the server responds to the request.

+gSOAP also supports asynchronous one-way message passing and the interoperable synchronous one-way message passing over HTTP. The two styles are similar, but only the latter is interoperable and is compliant to Basic Profile 1.0. The interoperable synchronous one-way message passing style over HTTP is discussed in Section&nbsp;<a href="#sec:oneway2">7.4</a> below.

+

+<div class="p"><!----></div>

+SOAP messaging routines are declared as function prototypes, just like remote methods for SOAP RPC.  However, the output parameter is a

+<i><b>void</b></i> type to indicate the absence of a return value.

+

+<div class="p"><!----></div>

+For example, the following header file specifies a event message for SOAP messaging:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;ns__event(<b>int</b>&nbsp;eventNo, <b>void</b>&nbsp;dummy);

+</td></tr></table><br></i>

+The gSOAP stub and skeleton compiler generates the following functions in <i>soapClient.cpp</i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;soap_send_ns__event(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;URL, <b>const</b>&nbsp;<b>char</b>&nbsp;action, <b>int</b>&nbsp;event); <br />

+<b>int</b>&nbsp;soap_recv_ns__event(<b>struct</b>&nbsp;soap *soap, <b>struct</b>&nbsp;ns__event *dummy); <br />

+</td></tr></table><br></i>

+The <i>soap_send_ns__event</i> function transmits the message to the destination URL by opening a socket and sending the SOAP encoded

+message. The socket will remain

+open after the send and has to be closed with <i>soap_closesock()</i>.  The open socket connection can also be used to obtain a service

+response, e.g. with a <i>soap_recv</i> function call.

+

+<div class="p"><!----></div>

+The <i>soap_recv_ns__event</i> function waits for a SOAP message on the currently open socket (<i>soap.socket</i>) and fills the

+<i><b>struct</b>&nbsp;ns__event</i> with the <i>ns__event</i> parameters (e.g. <i><b>int</b>&nbsp;eventNo</i>).

+The <i><b>struct</b>&nbsp;ns__event</i> is automatically created by gSOAP and is a mirror image of the <i>ns__event</i> parameters:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;ns__event <br />

+{ <b>int</b>&nbsp;eventNo; <br />

+}

+</td></tr></table><br></i>

+The gSOAP generated <i>soapServer.cpp</i> code includes a skeleton routine to accept the message.

+(The skeleton routine does not respond with a SOAP response message.)

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;soap_serve_ns__event(<b>struct</b>&nbsp;soap *soap);

+</td></tr></table><br></i>

+The skeleton routine calls the user-implemented <i>ns__event(<b>struct</b>&nbsp;soap *soap, <b>int</b>&nbsp;eventNo)</i> routine (note the absence of the void

+parameter!).

+

+<div class="p"><!----></div>

+As usual, the skeleton will be automatically called by the remote method request dispatcher that handles both the remote method

+requests (RPCs) and messages:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+main() <br />

+{ soap_serve(soap_new()); <br />

+} <br />

+<b>int</b>&nbsp;ns__event(<b>struct</b>&nbsp;soap *soap, <b>int</b>&nbsp;eventNo) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;... // handle event <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+}

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc7.4">

+7.4</a>&nbsp;&nbsp;<font color="#0000FF">One-Way Message Passing over HTTP</font></h3><a name="sec:oneway2">

+</a>

+

+<div class="p"><!----></div>

+One-way SOAP message passing over HTTP as defined by the SOAP specification and Basic Profile 1.0 is synchrounous, meaning that the server must respond with an HTTP OK header and an empty body. To implement synchrounous one-way messaging, the same setup for asynchrounous one-way messaing discussed in Section&nbsp;<a href="#sec:oneway1">7.3</a> is used, but with one simple addition at the client and server side.

+

+<div class="p"><!----></div>

+At the server side, we need to return an empty HTTP OK response. This is accomplished as follows. For each one-way operation implemented in C/C++, we replace the <i><b>return</b>&nbsp;SOAP_OK</i> with:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;ns__event(<b>struct</b>&nbsp;soap *soap, <b>int</b>&nbsp;eventNo) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;... // handle event <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;soap_send_empty_response(soap); <br />

+}

+</td></tr></table><br></i>

+At the client side, the empty response header must be parsed as follows:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>if</b>&nbsp;(soap_send_ns__event(soap, eventNo) != SOAP_OK <br />

+&nbsp;&nbsp;&nbsp;<font face="symbol">|</font

+><font face="symbol">|</font

+> soap_recv_empty_response(soap) != SOAP_OK) <br />

+&nbsp;&nbsp;&nbsp;soap_print_fault(soap, stderr); <br />

+...

+</td></tr></table><br></i>

+The synchronous (and asynchronous) one-way messaging supports HTTP keep-alive and chunking.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc7.5">

+7.5</a>&nbsp;&nbsp;<font color="#0000FF">How to Use the SOAP Serializers and Deserializers to Save and Load Application Data</font></h3>

+

+<div class="p"><!----></div>

+The gSOAP stub and skeleton compiler generates serializers and deserializers for all user-defined data structures that are

+specified in the header file input to the compiler. The serializers and deserializers can be found in the generated

+<i>soapC.cpp</i> file. These serializers and deserializers can be used separately by an application without the need to build a

+full client or service application.  This is useful for applications that need to save or export their data in XML or need to

+import or load data stored in XML format.

+

+<div class="p"><!----></div>

+The following attributes can be set to control the destination and source for serialization and deserialization:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td><font color="#FF0000"><b>Variable</b></font> </td><td><font color="#FF0000"><b>Description</b></font> </td></tr>

+<tr><td><i><b>int</b>&nbsp;soap.socket</i> </td><td>socket file descriptor for input and output or -1 </td></tr>

+<tr><td><i>ostream *soap.os</i>	</td><td>(C++ only) output stream used for send operations </td></tr>

+<tr><td><i>istream *soap.is</i>	</td><td>(C++ only) input stream used for receive operations </td></tr>

+<tr><td><i><b>int</b>&nbsp;soap.sendfd</i> </td><td>when <i>soap_socket</i> &lt; 0, this fd is used for send operations </td></tr>

+<tr><td><i><b>int</b>&nbsp;soap.recvfd</i> </td><td>when <i>soap_socket</i> &lt; 0, this fd is used for receive operations </td></tr></table>

+

+</td></tr></table><br></span>

+The following initializing and finalizing functions can be used:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td><font color="#FF0000"><b>Function</b></font> </td><td><font color="#FF0000"><b>Description</b></font> </td></tr>

+<tr><td><i><b>void</b>&nbsp;soap_begin_send(<b>struct</b>&nbsp;soap*)</i>	</td><td>start a send/write phase </td></tr>

+<tr><td><i><b>int</b>&nbsp;soap_end_send(<b>struct</b>&nbsp;soap*)</i> 	</td><td>flush the buffer </td></tr>

+<tr><td><i><b>int</b>&nbsp;soap_begin_recv(<b>struct</b>&nbsp;soap*)</i>	</td><td>start a rec/read phase (if an HTTP header is present, parse it first) </td></tr>

+<tr><td><i><b>int</b>&nbsp;soap_end_recv(<b>struct</b>&nbsp;soap*)</i> 	</td><td>perform a id/href consistency check on deserialized data </td></tr></table>

+

+</td></tr></table><br></span>

+These operations do not open or close the connections. The application should open and close connections or files and set the <i>soap.socket</i>, <i>soap.os</i> or <i>soap.sendfd</i>, <i>soap.is</i> or <i>soap.recvfd</i> streams or descriptors.

+When <i>soap.socket</i> &lt; 0 and none of the streams and descriptors are set, then the standard input and output will be used.

+

+<div class="p"><!----></div>

+See also Section&nbsp;<a href="#sec:flags">8.12</a> to control the I/O buffering and content encoding such as compression and DIME encoding.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.5.1">

+7.5.1</a>&nbsp;&nbsp;<font color="#0000FF">Serializing a Data Type</font></h4><a name="sec:serialize">

+</a>

+

+<div class="p"><!----></div>

+To serialize a data type to a stream, two functions should be called to prepare

+for serialization of the data and to send the data, respectively.  The first function,

+<i>soap_serialize</i>, analyzes pointers and determines if multi-references

+are required to encode the data and if cycles are present the object graph.

+The second function, <i>soap_put</i>, produces the XML output on a stream.

+

+<div class="p"><!----></div>

+The <i>soap_serialize</i> and <i>soap_put</i> function names are specific to a

+data type. For example, <i>soap_serialize_float(&amp;soap, &amp;d)</i> is called to

+serialize an <i><b>float</b></i> value and <i>soap_put_float(&amp;soap, &amp;d,

+"number", NULL)</i> is called to output the floating point value in SOAP tagged

+with the name <tt>&lt;number&#62;</tt>.  To initialize data, the <i>soap_default</i>

+function of a data type can be used.  For example,

+<i>soap_default_float(&amp;soap, &amp;d)</i> initializes the float to 0.0.  The

+<i>soap_default</i> functions are useful to initialize complex data types such

+as arrays, <i><b>struct</b></i>s, and <i><b>class</b></i> instances.  Note that the

+<i>soap_default</i> functions do not need the gSOAP runtime environment as a

+first parameter.

+

+<div class="p"><!----></div>

+The following table lists the type naming conventions used by gSOAP:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td><font color="#FF0000"><b>Type</b></font> </td><td><font color="#FF0000"><b>Type Name</b></font> </td></tr>

+<tr><td><i><b>char</b>*</i> </td><td><i>string</i> </td></tr>

+<tr><td><i>wchar_t*</i> </td><td><i>wstring</i> </td></tr>

+<tr><td><i><b>char</b></i> </td><td><i>byte</i> </td></tr>

+<tr><td><i><b>bool</b></i> </td><td><i>bool</i> </td></tr>

+<tr><td><i><b>double</b></i> </td><td><i>double</i> </td></tr>

+<tr><td><i><b>int</b></i> </td><td><i>int</i> </td></tr>

+<tr><td><i><b>float</b></i> </td><td><i>float</i> </td></tr>

+<tr><td><i><b>long</b></i> </td><td><i>long</i> </td></tr>

+<tr><td><i>LONG64</i> </td><td><i>LONG64</i> (Win32) </td></tr>

+<tr><td><i><b>long</b>&nbsp;<b>long</b></i> </td><td><i>LONG64</i> (Unix/Linux) </td></tr>

+<tr><td><i><b>short</b></i> </td><td><i>short</i> </td></tr>

+<tr><td><i>time_t</i> </td><td><i>time</i> </td></tr>

+<tr><td><i><b>unsigned</b>&nbsp;<b>char</b></i> </td><td><i>unsignedByte</i> </td></tr>

+<tr><td><i><b>unsigned</b>&nbsp;<b>int</b></i> </td><td><i>unsignedInt</i> </td></tr>

+<tr><td><i><b>unsigned</b>&nbsp;<b>long</b></i> </td><td><i>unsignedLong</i> </td></tr>

+<tr><td><i>ULONG64</i> </td><td><i>unsignedLONG64</i> (Win32)</td></tr>

+<tr><td><i><b>unsigned</b>&nbsp;<b>long</b>&nbsp;<b>long</b></i> </td><td><i>unsignedLONG64</i> (Unix/Linux) </td></tr>

+<tr><td><i><b>unsigned</b>&nbsp;<b>short</b></i> </td><td><i>unsignedShort</i> </td></tr>

+<tr><td><i><u><span class="roman">T</span></u><span class="roman">[</span><u><span class="roman">N</span></u><span class="roman">]</span></i> </td><td><i>Array<u><span class="roman">N</span></u>Of<u><span class="roman">Type</span></u></i> where <u>Type</u> is the type name of <u>T</u> </td></tr>

+<tr><td><i><u><span class="roman">T</span></u>*</i> </td><td><i>PointerTo<u><span class="roman">Type</span></u></i> where <u>Type</u> is the type name of <u>T</u> </td></tr>

+<tr><td><i><b>struct</b>&nbsp;Name</i> </td><td><i>Name</i> </td></tr>

+<tr><td><i><b>class</b>&nbsp;Name</i> </td><td><i>Name</i> </td></tr>

+<tr><td><i><b>enum</b>&nbsp;Name</i> </td><td><i>Name</i> </td></tr></table>

+

+</td></tr></table><br></span>

+Consider for example the following C code with a declaration of <i>p</i> as a

+pointer to a <i><b>struct</b>&nbsp;ns__Person</i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;ns__Person { <b>char</b>&nbsp;*name; } *p;

+</td></tr></table><br></i>

+To serialize <i>p</i>, its address is passed to the function

+<i>soap_serialize_PointerTons__Person</i> generated for this type by the

+gSOAP compiler:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+soap_serialize_PointerTons__Person(&amp;soap, &amp;p);

+</td></tr></table><br></i>

+The <b>address of</b> <i>p</i> is passed, so the serializer can determine whether

+<i>p</i> was already serialized and to discover cycles in graph data structures.

+To generate the output, the address of <i>p</i> is passed to the function

+<i>soap_put_PointerTons__Person</i> together with the name of an XML element

+and an optional type string (to omit a type, use <i>NULL</i>):

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+soap_begin_send(&amp;soap); <br />

+soap_put_PointerTons__Person(&amp;soap, &amp;p, "ns:element-name", "ns:type-name"); <br />

+soap_end_send(&amp;soap);

+</td></tr></table><br></i>

+This produces:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;ns:element-name xmlns:SOAP-ENV="..." xmlns:SOAP-ENC="..." xmlns:ns="..." <br />

+&nbsp;&nbsp;&nbsp;... xsi:type="ns:type-name"&#62; <br />

+&lt;name xsi:type="xsd:string"&#62;...&lt;/name&#62; <br />

+&lt;/ns:element-name&#62;

+</td></tr></table><br></tt>

+The serializer is initialized with the <i>soap_begin_send(soap)</i> function

+and closed with <i>soap_end_send(soap)</i>. All temporary data structures and

+data structures deserialized on the heap are destroyed with the

+<i>soap_end()</i> function.  The <i>soap_free()</i> function can be used to

+remove the temporary data only and keep the deserialized data on the heap.

+Temporary data structures are only created if the encoded data uses pointers.

+Each pointer in the encoded data has an internal hash table entry to determine

+all multi-reference parts and cyclic parts of the complete data structure.

+

+<div class="p"><!----></div>

+You can assign an

+output stream to <i>soap.os</i> or a file descriptor to <i>soap.sendfd</i>.

+For example

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+soap.sendfd = open(file, O_RDWR | O_CREAT, S_IWUSR | S_IRUSR); <br />

+soap_serialize_PointerTons__Person(&amp;soap, &amp;p); <br />

+soap_begin_send(&amp;soap); <br />

+soap_put_PointerTons__Person(&amp;soap, &amp;p, "ns:element-name", "ns:type-name"); <br />

+soap_end_send(&amp;soap);

+</td></tr></table><br></i>

+The <i>soap_serialize</i> function is optional. It MUST be used when

+the object graph contains cycles.

+It MUST be called to preserved the logical coherence of pointer-based

+data structures, where pointers may refer to co-referenced objects.

+By calling <i>soap_serialize</i>, data structures shared through pointers are serialized only once and

+referenced in XML using id-refs attributes.

+This actual id-refs used depend on the SOAP encoding. To turn off SOAP encoding,

+remove or avoid using the SOAP-ENV and SOAP-ENC namespace bindings in the namespace table.

+In addition, the <i>SOAP_XML_TREE</i> and <i>SOAP_XML_GRAPH</i> flags can be used

+to control the output.

+

+<div class="p"><!----></div>

+To save the data as an XML tree (with one root) without any id-ref attributes, use the

+<i>SOAP_XML_TREE</i> flag. The data structure MUST NOT contain pointer-based cycles.

+

+<div class="p"><!----></div>

+To preserve the exact structure of the data object graph and create XML with one root, use

+the <i>SOAP_XML_GRAPH</i> output-mode flag (see

+Section&nbsp;<a href="#sec:flags">8.12</a>). Use this flag and the <i>soap_serialize</i> function

+to prepare the serialization of data with in-line id-ref attributes.

+Using the <i>SOAP_XML_GRAPH</i> flag assures the preservation of the logical structure of the data

+

+<div class="p"><!----></div>

+For example, to encode the contents of two variables <i>var1</i> and <i>var2</i> that may

+share data throug pointer structures,

+the serializers are called before the output routines:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<u><span class="roman">T1</span></u> var1; <br />

+<u><span class="roman">T2</span></u> var2; <br />

+<b>struct</b>&nbsp;soap soap; <br />

+... <br />

+soap_init(&amp;soap); // initialize <br />

+<font size="+1"><span class="roman">[</span></font>soap_omode(&amp;soap, flags);<font size="+1"><span class="roman">]</span></font> // set output-mode flags (e.g. SOAP_ENC_XML<tt>|</tt>SOAP_ENC_ZLIB) <br />

+soap_begin(&amp;soap); // start new (de)serialization phase <br />

+soap_set_omode(&amp;soap, SOAP_XML_GRAPH); <br />

+soap_serialize_<u><span class="roman">Type1</span></u>(&amp;soap, &amp;var1); <br />

+soap_serialize_<u><span class="roman">Type2</span></u>(&amp;soap, &amp;var2); <br />

+... <br />

+<font size="+1"><span class="roman">[</span></font>soap.socket = a_socket_file_descriptor;<font size="+1"><span class="roman">]</span></font> // when using sockets <br />

+<font size="+1"><span class="roman">[</span></font>soap.os = an_output_stream;<font size="+1"><span class="roman">]</span></font> // C++ <br />

+<font size="+1"><span class="roman">[</span></font>soap.sendfd = an_output_file_descriptor;<font size="+1"><span class="roman">]</span></font> // C <br />

+soap_begin_send(&amp;soap); <br />

+soap_put_<u><span class="roman">Type1</span></u>(&amp;soap, &amp;var1, "<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>element-name1", "<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>type-name1"); <br />

+soap_put_<u><span class="roman">Type2</span></u>(&amp;soap, &amp;var2, "<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>element-name2", "<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>type-name2"); <br />

+... <br />

+soap_end_send(&amp;soap); // flush <br />

+soap_end(&amp;soap); // remove temporary data structures after phase <br />

+soap_done(&amp;soap); // finalize last use of this environment <br />

+...

+</td></tr></table><br></i>

+where <u>Type1</u> is the type name of <u>T1</u> and

+<u>Type2</u> is the type name of <u>T2</u> (see table above).  The

+strings <i><font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>type-name1</i> and

+<i><font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>type-name2</i> describe the schema types of the

+elements.  Use <i>NULL</i> to omit this type information.

+

+<div class="p"><!----></div>

+For serializing class instances, method invocations MUST be used instead of function calls, for example

+<i>obj.soap_serialize(&amp;soap)</i> and <i>obj.soap_put(&amp;soap, "elt", "type")</i>.  This ensures that the proper serializers are used for

+serializing instances of derived classes.

+

+<div class="p"><!----></div>

+You can serialize a class instance to a stream as follows:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap soap; <br />

+myClass obj; <br />

+soap_init(&amp;soap); // initialize <br />

+soap_begin(&amp;soap); // start new (de)serialization phase <br />

+soap_set_omode(&amp;soap, SOAP_XML_GRAPH); <br />

+obj.serialize(&amp;soap); <br />

+soap.os = cout; // send to cout <br />

+soap_begin_send(&amp;soap); <br />

+obj.put(&amp;soap, "<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>element-name1", "<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>type-name1"); <br />

+... <br />

+soap_end_send(&amp;soap); // flush <br />

+soap_end(&amp;soap); // remove temporary data structures after phase <br />

+soap_done(&amp;soap); // finalize last use of this environment

+</td></tr></table><br></i>

+When you declare a soap struct pointer as a data member in a class, you can overload the <tt>&lt;&lt;</tt> operator to serialize the class to streams:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+ostream &amp;operator<tt>&lt;&lt;</tt>(ostream &amp;o, <b>const</b>&nbsp;myClass &amp;e) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!e.soap) <br />

+&nbsp;&nbsp;&nbsp;... error: need a soap struct to serialize (could use global struct) ... <br />

+&nbsp;&nbsp;&nbsp;<b>else</b>&nbsp;<br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ostream *os = e.soap<tt>-&gt;</tt>os; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e.soap<tt>-&gt;</tt>os = &amp;o; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_set_omode(e.soap, SOAP_XML_GRAPH);

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e.serialize(e.soap); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_begin_send(e.soap); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e.put(e.soap, "myClass", NULL); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_end_send(e.soap); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e.soap<tt>-&gt;</tt>os = os; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_clr_omode(e.soap, SOAP_XML_GRAPH); <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;o; <br />

+}

+</td></tr></table><br></i>

+Of course, when you construct an instance you must set its soap struct to a valid environment.  Deserialized class instances with a soap struct data member will have their soap structs set automatically, see Section&nbsp;<a href="#sec:classmemory">8.13.2</a>.

+

+<div class="p"><!----></div>

+In principle, XML output for a data structure can be produced with <i>soap_put</i>

+without calling the <i>soap_serialize</i> function first.

+In this case, the result is similar to <i>SOAP_XML_TREE</i> which

+means that no id-refs are output. Cycles in the data structure will crash the serialization

+algorithm, even when the <i>SOAP_XML_GRAPH</i> is set.

+

+<div class="p"><!----></div>

+Consider the following <i><b>struct</b></i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of file "tricky.h": <br />

+<b>struct</b>&nbsp;Tricky<br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;*p; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;n; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;*q; <br />

+};

+</td></tr></table><br></i>

+The following fragment initializes the pointer fields <i>p</i> and <i>q</i> to the value of field <i>n</i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap soap; <br />

+<b>struct</b>&nbsp;Tricky X; <br />

+X.n = 1; <br />

+X.p = &amp;X.n; <br />

+X.q = &amp;X.n; <br />

+soap_init(&amp;soap); <br />

+soap_begin(&amp;soap); <br />

+soap_serialize_Tricky(&amp;soap, &amp;X); <br />

+soap_put_Tricky(&amp;soap, &amp;X, <tt>"Tricky"</tt>, NULL); <br />

+soap_end(&amp;soap); // Clean up temporary data used by the serializer

+</td></tr></table><br></i>

+What is special about this data structure is that <i>n</i> is 'fixed' in the <i>Tricky</i> structure, and <i>p</i> and <i>q</i> both point to <i>n</i>. The gSOAP serializers strategically place the id-ref attributes such that <i>n</i> will be identified as the primary data source, while <i>p</i> and <i>q</i> are serialized with ref/href attributes.

+

+<div class="p"><!----></div>

+The resulting output is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;Tricky xsi:type="Tricky"&#62; <br />

+&lt;p href="#2"/&#62;

+&lt;n xsi:type="int"&#62;1&lt;/n&#62;

+&lt;q href="#2"/&#62;

+&lt;r xsi:type="int"&#62;2&lt;/r&#62;

+&lt;/Tricky&#62;

+&lt;id id="2" xsi:type="int"&#62;1&lt;/id&#62;

+</td></tr></table><br></tt>

+which uses an independent element at the end to represent the multi-referenced integer, assuming the <i>SOAP-ENV</i> and <i>SOAP-ENC</i> namespaces indicate SOAP 1.1 encoding.

+

+<div class="p"><!----></div>

+With the <i>SOAP_XML_GRAPH</i> flag the output is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;Tricky xsi:type="Tricky"&#62; <br />

+&lt;p href="#2"/&#62;

+&lt;n id="2" xsi:type="int"&#62;1&lt;/n&#62;

+&lt;q href="#2"/&#62;

+&lt;/Tricky&#62;

+</td></tr></table><br></tt>

+In this case, the XML is self-contained and multi-referenced data is accurately serialized.

+The gSOAP generated deserializer for this data type will be able to accurately reconstruct the data from the XML (on the heap).

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.5.2">

+7.5.2</a>&nbsp;&nbsp;<font color="#0000FF">Deserializing a Data Type</font></h4><a name="sec:deserialize">

+</a>

+

+<div class="p"><!----></div>

+To deserialize a data type, its <i>soap_get</i> function is used. The outline of a program that deserializes two variables <i>var1</i> and <i>var2</i> is for example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<u><span class="roman">T1</span></u> var1; <br />

+<u><span class="roman">T2</span></u> var2; <br />

+<b>struct</b>&nbsp;soap soap; <br />

+... <br />

+soap_init(&amp;soap); // initialize at least once <br />

+<font size="+1"><span class="roman">[</span></font>soap_imode(&amp;soap, flags);<font size="+1"><span class="roman">]</span></font> // set input-mode flags <br />

+soap_begin(&amp;soap); // begin new decoding phase <br />

+<font size="+1"><span class="roman">[</span></font>soap.is = an_input_stream;<font size="+1"><span class="roman">]</span></font> // C++ <br />

+<font size="+1"><span class="roman">[</span></font>soap.recvfd = an_input_file_desriptpr;<font size="+1"><span class="roman">]</span></font> // C <br />

+soap_begin_recv(&amp;soap); // if HTTP/MIME/DIME/GZIP headers are present, parse them <br />

+<b>if</b>&nbsp;(!soap_get_<u><span class="roman">Type1</span></u>(&amp;soap, &amp;var1, "<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>element-name1", "<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>type-name1")) <br />

+&nbsp;&nbsp;&nbsp;... error ... <br />

+<b>if</b>&nbsp;(!soap_get_<u><span class="roman">Type2</span></u>(&amp;soap, &amp;var2, "<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>element-name2", "<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>type-name1")) <br />

+&nbsp;&nbsp;&nbsp;... error ... <br />

+... <br />

+soap_end_recv(&amp;soap); // check consistency of id/hrefs <br />

+soap_destroy(&amp;soap); // remove deserialized class instances <br />

+soap_end(&amp;soap); // remove temporary data, including the decoded data on the heap <br />

+soap_done(&amp;soap); // finalize last use of the environment

+</td></tr></table><br></i>

+The strings <i><font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>type-name1</i> and

+<i><font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>type-name2</i> are the schema types of the elements

+and should match the <tt>xsi:type</tt> attribute of the receiving message. To omit

+the match, use <i>NULL</i> as the type.  For class instances, method invocation

+can be used instead of a function call if the object is already instantiated,

+i.e. <i>obj.soap_get(&amp;soap, "...", "...")</i>.

+

+<div class="p"><!----></div>

+The <i>soap_begin</i> call resets the deserializers. The <i>soap_destroy</i>

+and <i>soap_end</i> calls remove the temporary data structures <b>and</b> the

+decoded data that was placed on the heap.

+

+<div class="p"><!----></div>

+To remove temporary data while retaining the deserialized data on the heap, the

+function <i>soap_free</i> should be called instead of <i>soap_destroy</i> and

+<i>soap_end</i>.

+

+<div class="p"><!----></div>

+One call to the <i>soap_get_Type</i> function of a type <i>Type</i> scans the

+entire input to process its XML content and to capture SOAP 1.1 independent

+elements (which contain multi-referenced objects). As a result, <i>soap.error</i> will set to <i>SOAP_EOF</i>.

+Also storing

+multiple objects into one file will fail to decode them properly with multiple <i>soap_get</i> calls. A well-formed XML document should

+only have one root anyway, so don't save multiple objects into one file. If you

+must save multiple objects, create a linked list or an array of objects and save

+the linked list or array. You could use the <i>soap_in_Type</i> function instead of the <i>soap_get_Type</i> function. The <i>soap_in_Type</i> function parses one XML element at a time.

+

+<div class="p"><!----></div>

+You can deserialize class instances from a stream as follows:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+myClass obj; <br />

+<b>struct</b>&nbsp;soap soap; <br />

+soap_init(&amp;soap); // initialize <br />

+soap_begin(&amp;soap); // begin new decoding phase <br />

+soap.is = cin; // read from cin <br />

+soap_begin_recv(&amp;soap); // if HTTP header is present, parse it <br />

+<b>if</b>&nbsp;(!obj.get(&amp;soap, "myClass", NULL) <br />

+&nbsp;&nbsp;&nbsp;... error ... <br />

+soap_end_recv(&amp;soap); // check consistency of id/hrefs <br />

+... <br />

+soap_destroy(&amp;soap); // remove deserialized class instances <br />

+soap_end(&amp;soap); // remove temporary data, including the decoded data on the heap <br />

+soap_done(&amp;soap); // finalize last use of the environment

+</td></tr></table><br></i>

+When you declare a soap struct pointer as a data member in a class, you can overload the <tt>&gt;&gt;</tt> operator to parse and deserialize a class instance from a stream:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+istream &amp;operator<tt>&gt;&gt;</tt>(istream &amp;i, myClass &amp;e) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!e.soap) <br />

+&nbsp;&nbsp;&nbsp;... error: need soap struct to deserialize (could use global struct)... <br />

+&nbsp;&nbsp;&nbsp;istream *is = e.soap<tt>-&gt;</tt>is; <br />

+&nbsp;&nbsp;&nbsp;e.soap<tt>-&gt;</tt>is = &amp;i; <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_begin_recv(e.soap) <tt>||</tt> e.in(e.soap, NULL, NULL) <tt>||</tt> soap_end_recv(e.soap)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... error ... <br />

+&nbsp;&nbsp;&nbsp;e.soap<tt>-&gt;</tt>is = is; <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;i; <br />

+}

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.5.3">

+7.5.3</a>&nbsp;&nbsp;<font color="#0000FF">Example</font></h4><a name="sec:example9">

+</a>

+

+<div class="p"><!----></div>

+As an example, consider the following data type declarations:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of file "person.h": <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__string; <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__Name; <br />

+<b>typedef</b>&nbsp;<b>unsigned</b>&nbsp;<b>int</b>&nbsp;xsd__unsignedInt; <br />

+<b>enum</b>&nbsp;ns__Gender {male, female}; <br />

+<b>class</b>&nbsp;ns__Address <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;xsd__string street; <br />

+&nbsp;&nbsp;&nbsp;xsd__unsignedInt number; <br />

+&nbsp;&nbsp;&nbsp;xsd__string city; <br />

+}; <br />

+<b>class</b>&nbsp;ns__Person <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;xsd__Name name; <br />

+&nbsp;&nbsp;&nbsp;<b>enum</b>&nbsp;ns__Gender gender; <br />

+&nbsp;&nbsp;&nbsp;ns__Address address; <br />

+&nbsp;&nbsp;&nbsp;ns__Person *mother; <br />

+&nbsp;&nbsp;&nbsp;ns__Person *father; <br />

+};

+</td></tr></table><br></i>

+The following program uses these data types to write to standard output a data structure that contains the data of a person named "John" living at Downing st. 10 in Londen. He has a mother

+"Mary" and a father "Stuart". After initialization, the class instance for "John" is serialized and encoded in XML to the

+standard output stream using gzip compression (requires the Zlib library, compile sources with -DWITH_GZIP):

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of file "person.cpp": <br />

+#include "soapH.h" <br />

+<b>int</b>&nbsp;main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;ns__Person mother, father, john; <br />

+&nbsp;&nbsp;&nbsp;mother.name = <tt>"Mary"</tt>; <br />

+&nbsp;&nbsp;&nbsp;mother.gender = female; <br />

+&nbsp;&nbsp;&nbsp;mother.address.street = <tt>"Downing&nbsp;st."</tt>; <br />

+&nbsp;&nbsp;&nbsp;mother.address.number = 10; <br />

+&nbsp;&nbsp;&nbsp;mother.address.city = <tt>"London"</tt>; <br />

+&nbsp;&nbsp;&nbsp;mother.mother = NULL; <br />

+&nbsp;&nbsp;&nbsp;mother.father = NULL; <br />

+&nbsp;&nbsp;&nbsp;father.name = <tt>"Stuart"</tt>; <br />

+&nbsp;&nbsp;&nbsp;father.gender = male; <br />

+&nbsp;&nbsp;&nbsp;father.address.street = <tt>"Main&nbsp;st."</tt>; <br />

+&nbsp;&nbsp;&nbsp;father.address.number = 5; <br />

+&nbsp;&nbsp;&nbsp;father.address.city = <tt>"London"</tt>; <br />

+&nbsp;&nbsp;&nbsp;father.mother = NULL; <br />

+&nbsp;&nbsp;&nbsp;father.father = NULL; <br />

+&nbsp;&nbsp;&nbsp;john.name = <tt>"John"</tt>; <br />

+&nbsp;&nbsp;&nbsp;john.gender = male; <br />

+&nbsp;&nbsp;&nbsp;john.address = mother.address; <br />

+&nbsp;&nbsp;&nbsp;john.mother = &amp;mother; <br />

+&nbsp;&nbsp;&nbsp;john.father = &amp;father; <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;soap_omode(&amp;soap, SOAP_ENC_ZLIB | SOAP_XML_GRAPH); // see&nbsp;<a href="#sec:flags">8.12</a> <br />

+&nbsp;&nbsp;&nbsp;soap_begin(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;soap_begin_send(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;john.soap_serialize(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;john.soap_put(&amp;soap, <tt>"johnnie"</tt>, NULL); <br />

+&nbsp;&nbsp;&nbsp;soap_end_send(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;soap_end(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;soap_done(&amp;soap); <br />

+} <br />

+<b>struct</b>&nbsp;Namespace namespaces[] = <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;{"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"}, <br />

+&nbsp;&nbsp;&nbsp;{"SOAP-ENC","http://schemas.xmlsoap.org/soap/encoding/"}, <br />

+&nbsp;&nbsp;&nbsp;{"xsi", "http://www.w3.org/2001/XMLSchema-instance"}, <br />

+&nbsp;&nbsp;&nbsp;{"xsd", "http://www.w3.org/2001/XMLSchema"}, <br />

+&nbsp;&nbsp;&nbsp;{"ns", "urn:person"}, // Namespace URI of the "Person" data type <br />

+&nbsp;&nbsp;&nbsp;{NULL, NULL} <br />

+};

+</td></tr></table><br></i>

+The header file is processed and the application compiled on Linux/Unix with:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>soapcpp2 person.h</i> <br />

+<i>g++ -DWITH_GZIP -o person person.cpp soapC.cpp stdsoap2.cpp -lsocket -lxnet -lnsl -lz</i>

+</td></tr></table><br></span>

+(Depending on your system configuration, the libraries <i>libsocket.a</i>,

+<i>libxnet.a</i>, <i>libnsl.a</i>

+are required. Compiling on Linux typically does not require the inclusion of those

+libraries.)

+See&nbsp;<a href="#sec:compression">18.25</a> for details on compression with gSOAP.

+

+<div class="p"><!----></div>

+Running the <i>person</i> application results in the compressed XML output:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;johnnie xsi:type="ns:Person" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" <br />

+&nbsp;&nbsp;&nbsp;xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" <br />

+&nbsp;&nbsp;&nbsp;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <br />

+&nbsp;&nbsp;&nbsp;xmlns:xsd="http://www.w3.org/2001/XMLSchema" <br />

+&nbsp;&nbsp;&nbsp;xmlns:ns="urn:person" <br />

+&nbsp;&nbsp;&nbsp;SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&#62; <br />

+&lt;name xsi:type="xsd:Name"&#62;John&lt;/name&#62; <br />

+&lt;gender xsi:type="ns:Gender"&#62;male&lt;/gender&#62; <br />

+&lt;address xsi:type="ns:Address"&#62; <br />

+&lt;street id="3" xsi:type="xsd:string"&#62;Dowling st.&lt;/street&#62; <br />

+&lt;number xsi:type="unsignedInt"&#62;10&lt;/number&#62; <br />

+&lt;city id="4" xsi:type="xsd:string"&#62;London&lt;/city&#62; <br />

+&lt;/address&#62; <br />

+&lt;mother xsi:type="ns:Person"&#62; <br />

+&lt;name xsi:type="xsd:Name"&#62;Mary&lt;/name&#62; <br />

+&lt;gender xsi:type="ns:Gender"&#62;female&lt;/gender&#62; <br />

+&lt;address xsi:type="ns:Address"&#62; <br />

+&lt;street href="#3"/&#62; <br />

+&lt;number xsi:type="unsignedInt"&#62;5&lt;/number&#62; <br />

+&lt;city href="#4"/&#62; <br />

+&lt;/address&#62; <br />

+&lt;/mother&#62; <br />

+&lt;father xsi:type="ns:Person"&#62; <br />

+&lt;name xsi:type="xsd:Name"&#62;Stuart&lt;/name&#62; <br />

+&lt;gender xsi:type="ns:Gender"&#62;male&lt;/gender&#62; <br />

+&lt;address xsi:type="ns:Address"&#62; <br />

+&lt;street xsi:type="xsd:string"&#62;Main st.&lt;/street&#62; <br />

+&lt;number xsi:type="unsignedInt"&#62;13&lt;/number&#62; <br />

+&lt;city href="#4"/&#62; <br />

+&lt;/address&#62; <br />

+&lt;/father&#62; <br />

+&lt;/johnnie&#62;

+</td></tr></table><br></tt>

+The following program fragment decodes this content from standard input and reconstructs the original data structure on the heap:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "soapH.h" <br />

+<b>int</b>&nbsp;main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;ns__Person *mother, *father, *john = NULL; <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;soap_imode(&amp;soap, SOAP_ENC_ZLIB); // optional: gzip is detected automatically <br />

+&nbsp;&nbsp;&nbsp;soap_begin(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;soap_begin_recv(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_get_ns__Person(&amp;soap, john, "johnnie", NULL) == NULL) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... error ... <br />

+&nbsp;&nbsp;&nbsp;mother = john<tt>-&gt;</tt>mother; <br />

+&nbsp;&nbsp;&nbsp;father = john<tt>-&gt;</tt>father; <br />

+&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;soap_end_recv(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;soap_free(&amp;soap); // Clean up temporary data but keep deserialized data <br />

+} <br />

+<b>struct</b>&nbsp;Namespace namespaces[] = <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;{"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"}, <br />

+&nbsp;&nbsp;&nbsp;{"SOAP-ENC","http://schemas.xmlsoap.org/soap/encoding/"}, <br />

+&nbsp;&nbsp;&nbsp;{"xsi", "http://www.w3.org/2001/XMLSchema-instance"}, <br />

+&nbsp;&nbsp;&nbsp;{"xsd", "http://www.w3.org/2001/XMLSchema"}, <br />

+&nbsp;&nbsp;&nbsp;{"ns", "urn:person"}, // Namespace URI of the "Person" data type <br />

+&nbsp;&nbsp;&nbsp;{NULL, NULL} <br />

+};

+</td></tr></table><br></i>

+It is REQUIRED to either pass <i>NULL</i> to the <i>soap_get</i> routine, or a valid pointer to a data structure that can

+hold the decoded content. The following example explicitly passes <i>NULL</i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+&nbsp;&nbsp;&nbsp;john = soap_get_ns__Person(&amp;soap, NULL, "johnnie", NULL); <br />

+</td></tr></table><br></i>

+Note: the second <i>NULL</i> parameter indicates that the schema type attribute of the receiving message can be ignored.

+The deserializer stores the SOAP contents on the heap, and returns the address. The allocated storage is released with the

+<i>soap_end</i> call, which removes all temporary and deserialized data from the heap, or with the <i>soap_free</i> call, which removes all

+temporary data only.

+

+<div class="p"><!----></div>

+Alternatively, the XML content can be decoded within an existing allocated data structure.

+The following program fragment decodes the SOAP content in a <i><b>struct</b>&nbsp;ns__Person</i> allocated on the stack:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "soapH.h" <br />

+main() <br />

+{<br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;ns__Person *mother, *father, john; <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;soap_imode(&amp;soap, SOAP_ENC_ZLIB); // optional <br />

+&nbsp;&nbsp;&nbsp;soap_begin(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;soap_begin_recv(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;soap_default_ns__Person(&amp;soap, &amp;john); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_get_ns__Person(&amp;soap, &amp;john, "johnnie", NULL) == NULL) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... error ... <br />

+&nbsp;&nbsp;&nbsp;... <br />

+} <br />

+<b>struct</b>&nbsp;Namespace namespaces[] = <br />

+&nbsp;&nbsp;&nbsp;...

+</td></tr></table><br></i>

+Note the use of <i>soap_default_ns__Person</i>. This routine is generated by the gSOAP stub and skeleton compiler and assigns default

+values to the fields of <i>john</i>.

+

+<div class="p"><!----></div>

+	      <h4><a name="tth_sEc7.5.4">

+7.5.4</a>&nbsp;&nbsp;<font color="#0000FF">Serializing and Deserializing Class Instances to Streams</font></h4>

+

+<div class="p"><!----></div>

+C++ applications can define appropriate stream operations on objects for (de)serialization of objects on streams.

+This is best illustrated with an example.

+Consider the class

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>class</b>&nbsp;ns__person <br />

+{ <b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*name; <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap *soap; // we need this, see below <br />

+&nbsp;&nbsp;&nbsp;ns__person(); <br />

+&nbsp;&nbsp;&nbsp;~ns__person(); <br />

+};

+</td></tr></table><br></i>

+The <i><b>struct</b>&nbsp;soap</i> member is used to bind the instances to a gSOAP

+environment for (de)serialization.  We use the gSOAP compiler from the command

+prompt to generate the class (de)serializers (assuming that <i>person.h</i>

+contains the class declaration):

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>soapcpp2 person.h</i>

+</td></tr></table><br></span>

+gSOAP generates the (de)serializers and an instantiation function for the class

+<i>soap_new_ns__person(<b>struct</b>&nbsp;soap *soap, <b>int</b>&nbsp;array)</i> to instantiate

+one or more objects and associate them with a gSOAP environment.  The

+<i>array</i> parameter should be -1 to instantiate one object or should be the

+number of objects to instantiate as an array of objects.

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "soapH.h" <br />

+#include "ns.nsmap" <br />

+... <br />

+<b>struct</b>&nbsp;soap *soap = soap_new(); <br />

+ns__person *p = soap_new_ns__person(soap, -1); <br />

+... <br />

+cout  &lt;&lt;  p; // serialize p in XML <br />

+... <br />

+in  &gt;&gt;  p; // parse XML and deserialize p <br />

+... <br />

+soap_destroy(soap); // deletes p too <br />

+soap_end(soap); <br />

+soap_done(soap);

+</td></tr></table><br></i>

+The stream operations are implemented as follows

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+ostream &amp;<b>operator</b><tt>&lt;&lt;</tt>(ostream &amp;o, <b>const</b>&nbsp;ns__person &amp;p) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!p<tt>-&gt;</tt>soap) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;o; // need a gSOAP environment to serialize <br />

+&nbsp;&nbsp;&nbsp;p.soap<tt>-&gt;</tt>os = &amp;o; <br />

+&nbsp;&nbsp;&nbsp;soap_omode(p.soap, SOAP_XML_GRAPH); // XML tree or graph <br />

+&nbsp;&nbsp;&nbsp;p<tt>-&gt;</tt>soap_serialize(p.soap); <br />

+&nbsp;&nbsp;&nbsp;soap_begin_send(p.soap); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(p<tt>-&gt;</tt>soap_put(p.soap, "person", NULL) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |  |  soap_end_send(p.soap)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;; // handle I/O error <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;o; <br />

+} <br />

+istream &amp;<b>operator</b><tt>&gt;&gt;</tt>(istream &amp;i, ns__person &amp;p) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!p<tt>-&gt;</tt>soap) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;o; // need a gSOAP environment to parse XML and deserialize <br />

+&nbsp;&nbsp;&nbsp;p.soap<tt>-&gt;</tt>is = &amp;i; <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_begin_recv(p.soap) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |  |  p<tt>-&gt;</tt>soap_in(p.soap, NULL, NULL) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |  |  soap_end_recv(p.soap)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;; // handle I/O error <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;i; <br />

+}

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc7.5.5">

+7.5.5</a>&nbsp;&nbsp;<font color="#0000FF">How to Specify Default Values for Omitted Data</font></h4>

+

+<div class="p"><!----></div>

+The gSOAP compiler generates <i>soap_default</i> functions for all data types.  The default values of the primitive types can be

+easily changed by defining any of the following macros in the <i>stdsoap2.h</i> file:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#define SOAP_DEFAULT_bool <br />

+#define SOAP_DEFAULT_byte <br />

+#define SOAP_DEFAULT_double <br />

+#define SOAP_DEFAULT_float <br />

+#define SOAP_DEFAULT_int <br />

+#define SOAP_DEFAULT_long <br />

+#define SOAP_DEFAULT_LONG64 <br />

+#define SOAP_DEFAULT_short <br />

+#define SOAP_DEFAULT_string <br />

+#define SOAP_DEFAULT_time <br />

+#define SOAP_DEFAULT_unsignedByte <br />

+#define SOAP_DEFAULT_unsignedInt <br />

+#define SOAP_DEFAULT_unsignedLong <br />

+#define SOAP_DEFAULT_unsignedLONG64 <br />

+#define SOAP_DEFAULT_unsignedShort <br />

+#define SOAP_DEFAULT_wstring

+</td></tr></table><br></i>

+Instead of adding these to <i>stdsoap2.h</i>, you can also compile with option <i>-DWITH_SOAPDEFS_H</i> and include your

+definitions in file <i>userdefs.h</i>.

+The absence of a data value in a receiving SOAP message will result in the assignment of a default value to a primitive type upon

+deserialization.

+

+<div class="p"><!----></div>

+Default values can also be assigned to individual <i><b>struct</b></i> and <i><b>class</b></i> fields of primitive type. For example,

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;MyRecord <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*name = "Unknown"; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;value = 9999; <br />

+&nbsp;&nbsp;&nbsp;<b>enum</b>&nbsp;Status { active, passive } status = passive; <br />

+}

+</td></tr></table><br></i>

+Default values are assigned to the fields on receiving a SOAP/XML message in which the data values are absent.

+

+<div class="p"><!----></div>

+Because method requests and responses are essentially structs, default values can also be assigned to method parameters. The

+default parameter values do not control the parameterization of C/C++ function calls, i.e. all actual parameters must be present

+when calling a function. The default parameter values are used in case an inbound request or response message lacks the XML

+elements with parameter values. For example, a Web service can use default values to fill-in absent parameters in a

+SOAP/XML request:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;ns__login(<b>char</b>&nbsp;*uid = "anonymous", <b>char</b>&nbsp;*pwd = "guest", <b>bool</b>&nbsp;granted);

+</td></tr></table><br></i>

+When the request message lacks uid and pwd parameters, e.g.:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;?xml version="1.0" encoding="UTF-8"?&#62; <br />

+&lt;SOAP-ENV:Envelope <br />

+&nbsp;&nbsp;&nbsp;xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" <br />

+&nbsp;&nbsp;&nbsp;xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" <br />

+&nbsp;&nbsp;&nbsp;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <br />

+&nbsp;&nbsp;&nbsp;xmlns:xsd="http://www.w3.org/2001/XMLSchema" <br />

+&nbsp;&nbsp;&nbsp;xmlns:ns="http://tempuri.org"&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;SOAP-ENV:Body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ns:login&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ns:login&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;/SOAP-ENV:Body&#62; <br />

+&lt;/SOAP-ENV:Envelope&#62;

+</td></tr></table><br></tt>

+then the service uses the default values.

+In addition, the default values will show up in the SOAP/XML request and response message examples generated by the gSOAP

+compiler.

+

+<div class="p"><!----></div>

+ <h2><a name="tth_sEc8">

+8</a>&nbsp;&nbsp;<font color="#0000FF">Using the gSOAP Stub and Skeleton Compiler</font></h2>

+

+<div class="p"><!----></div>

+The gSOAP stub and skeleton compiler is invoked from the command line and optionally takes the name of a header file as an

+argument or, when the file name is absent, parses the standard input:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>soapcpp2 <font size="+1"><span class="roman">[</span></font>aheaderfile.h<font size="+1"><span class="roman">]</span></font></i>

+</td></tr></table><br></span>

+where <i>aheaderfile.h</i> is a standard C++ header file. The compiler acts as a preprocessor and produces C++ source files that

+can be used to build SOAP client and Web service applications in C++. The files generated by the compiler are:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td><font color="#FF0000"><b>File Name</b></font> </td><td width="501"><font color="#FF0000"><b>Description</b></font> </td></tr>

+<tr><td><i>soapStub.h</i> </td><td width="501">A modified and annotated header file produced from the input header file </td></tr>

+<tr><td><i>soapH.h</i> </td><td width="501">Main header file to be included by all client and service sources </td></tr>

+<tr><td><i>soapC.cpp</i> </td><td width="501">Serializers and deserializers for the specified data structures </td></tr>

+<tr><td><i>soapClient.cpp</i> </td><td width="501">Client stub routines for remote operations </td></tr>

+<tr><td><i>soapServer.cpp</i> </td><td width="501">Service skeleton routines </td></tr>

+<tr><td><i>soapClientLib.cpp</i> </td><td width="501">Client stubs combined with local static (de)serializers </td></tr>

+<tr><td><i>soapServerLib.cpp</i> </td><td width="501">Service skeletons combined with local static (de)serializers </td></tr>

+<tr><td><i>soapXYZProxy.h</i> </td><td width="501">A C++ proxy object (can be used instead of soapClient.cpp) </td></tr>

+<tr><td><i>soapXYZProxy.cpp</i> </td><td width="501">Implementation of C++ proxy object </td></tr>

+<tr><td><i>soapXYZObject.h</i> </td><td width="501">A C++ server object (can be used instead of soapServer.cpp) </td></tr>

+<tr><td><i>soapXYZObject.cpp</i> </td><td width="501">Implementation of C++ server object </td></tr>

+<tr><td><i>.xsd</i> </td><td width="501">An <i>ns.xsd</i> file is generated with an XML Schema for each namespace prefix <i>ns</i> used by a data structure in the header

+file input to the compiler, see Section&nbsp;<a href="#sec:wsdl">7.2.8</a> </td></tr>

+<tr><td><i>.wsdl</i> </td><td width="501">A <i>ns.wsdl</i> file is generated with an WSDL description for each namespace prefix <i>ns</i> used by a remote method in the

+header file input to the compiler, see Section&nbsp;<a href="#sec:wsdl">7.2.8</a> </td></tr>

+<tr><td><i>.xml</i> </td><td width="501">Several SOAP/XML request and response files are generated. These are example message files are valid provided

+that sufficient schema namespace directives are added to the header file or the generated .nsmap namespace table for the

+client/service is not modified by hand </td></tr>

+<tr><td><i>.nsmap</i> </td><td width="501">A <i>ns.nsmap</i> file is generated for each namespace prefix <i>ns</i> used by a remote method in the

+header file input to the compiler, see Section&nbsp;<a href="#sec:wsdl">7.2.8</a>.  The file contains a namespace mapping table that can be used in the client/service sources </td></tr></table>

+

+</td></tr></table><br></span>

+Both client and service applications are developed from a header file that specifies the remote methods. If client and

+service applications are developed with the same header file, the applications are guaranteed to be compatible because the stub and skeleton routines use

+the same serializers and deserializers to encode and decode the parameters. Note that when client and service applications are developed together, an application developer does

+not need to know the details of the internal SOAP encoding used by the client and service.

+

+<div class="p"><!----></div>

+The <i>soapClientLib.cpp</i> and <i>soapServerLib.cpp</i> can be used to build (dynamic) client and server libraries. The serialization routines are local (static) to avoid link symbol conflicts. You must create a separate library for SOAP Header and Fault handling, as described in Section&nbsp;<a href="#sec:dylibs">18.34</a>.

+

+<div class="p"><!----></div>

+The following files are part of the gSOAP package and are required to build client and service applications:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td><font color="#FF0000"><b>File Name</b></font> </td><td><font color="#FF0000"><b>Description</b></font> </td></tr>

+<tr><td><i>stdsoap2.h</i> </td><td>Header file of <i>stdsoap2.cpp</i> runtime library </td></tr>

+<tr><td><i>stdsoap2.c</i> </td><td>Runtime C library with XML parser and run-time support routines </td></tr>

+<tr><td><i>stdsoap2.cpp</i> </td><td>Runtime C++ library identical to <i>stdsoap2.c</i> </td></tr></table>

+

+</td></tr></table><br></span>

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc8.1">

+8.1</a>&nbsp;&nbsp;<font color="#0000FF">Compiler Options</font></h3><a name="sec:options">

+</a>

+

+<div class="p"><!----></div>

+The compiler supports the following options:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td><font color="#FF0000"><b>Option</b></font> </td><td><font color="#FF0000"><b>Description</b></font> </td></tr>

+<tr><td><i>-1</i>	</td><td>Use SOAP 1.1 namespaces and encodings (default) </td></tr>

+<tr><td><i>-2</i>	</td><td>Use SOAP 1.2 namespaces and encodings </td></tr>

+<tr><td><i>-C</i>	</td><td>Generate client-side code only </td></tr>

+<tr><td><i>-S</i>	</td><td>Generate server-side code only </td></tr>

+<tr><td><i>-L</i>	</td><td>Do not generate soapClientLib/soapServerLib </td></tr>

+<tr><td><i>-a</i>	</td><td>use value of SOAPAction HTTP header to dispatch method at server side </td></tr>

+<tr><td><i>-c</i>	</td><td>Generate pure C code </td></tr>

+<tr><td><i>-d  &lt; path &gt; </i>	</td><td>Save sources in directory specified by <i> &lt; path &gt; </i> </td></tr>

+<tr><td><i>-e</i>	</td><td>Generate SOAP RPC encoding style bindings </td></tr>

+<tr><td><i>-h</i>	</td><td>Print a brief usage message </td></tr>

+<tr><td><i>-i</i>	</td><td>Generate service proxies and objects inherited from soap struct </td></tr>

+<tr><td><i>-I  &lt; path &gt; </i>	</td><td>Use <i> &lt; path &gt; </i> (or paths separated with `:') for <i>#import</i> </td></tr>

+<tr><td><i>-l</i>	</td><td>Generate linkable modules (experimental) </td></tr>

+<tr><td><i>-m</i>	</td><td>Generate Matlab<sup><span class="roman">tm</span></sup> code for MEX compiler </td></tr>

+<tr><td><i>-n</i>	</td><td>When used with <i>-p</i>, enables multi-client and multi-server builds: </td></tr>

+<tr><td></td><td>Sets compiler option <i>WITH_NONAMESPACES</i>, see Section&nbsp;<a href="#sec:compilerflags">8.11</a> </td></tr>

+<tr><td></td><td>Saves the namespace mapping table with name <i> &lt; name &gt; _namespaces</i> instead of <i>namespaces</i> </td></tr>

+<tr><td></td><td>Renames <i>soap_serve()</i> into <i> &lt; name &gt; _serve()</i> and <i>soap_destroy()</i> into <i> &lt; name &gt; _destroy()</i> </td></tr>

+<tr><td><i>-p  &lt; name &gt; </i>	</td><td>Save sources with file name prefix <i> &lt; name &gt; </i> instead of "<i>soap</i>" </td></tr>

+<tr><td><i>-t</i>	</td><td>Generates code to send typed messages (with the <tt>xsi:type</tt> attribute) </td></tr>

+<tr><td><i>-v</i>	</td><td>Display version info</td></tr>

+<tr><td><i>-w</i>	</td><td>Do not generate WSDL and schema files </td></tr>

+<tr><td><i>-x</i>	</td><td>Do not generate sample XML message files </td></tr></table>

+

+</td></tr></table><br></span>

+For example

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>soapcpp2 -cd '../projects' -pmy file.h</i>

+</td></tr></table><br></span>

+Saves the sources:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>../projects/myH.h</i> <br />

+<i>../projects/myC.c</i> <br />

+<i>../projects/myClient.c</i> <br />

+<i>../projects/myServer.c</i> <br />

+<i>../projects/myStub.h</i> <br />

+</td></tr></table><br></span>

+MS Windows users can use the usual "<i>/</i>" for options, for example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>soapcpp2 /cd '..\projects' /pmy file.h</i>

+</td></tr></table><br></span>

+Compiler options <i>c, i, n, l, w</i> can be set in the gSOAP header file using the <i>//gsoapopt</i> directive. For example,

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Generate pure C and do not produce WSDL output: <br />

+//gsoapopt cw <br />

+<b>int</b>&nbsp;ns__myMethod(<b>char</b>*,<b>char</b>**); // takes a string and returns a string

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc8.2">

+8.2</a>&nbsp;&nbsp;<font color="#0000FF">SOAP 1.1 Versus SOAP 1.2</font></h3>

+

+<div class="p"><!----></div>

+gSOAP supports SOAP 1.1 by default. SOAP 1.2 support is automatically turned on when the appropriate SOAP 1.2 namespace is used

+in the namespace mapping table:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;Namespace namespaces[] = <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;{"SOAP-ENV", "http://www.w3.org/2002/06/soap-envelope"}, <br />

+&nbsp;&nbsp;&nbsp;{"SOAP-ENC", "http://www.w3.org/2002/06/soap-encoding"}, <br />

+&nbsp;&nbsp;&nbsp;{"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance"}, <br />

+&nbsp;&nbsp;&nbsp;{"xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema"},

+&nbsp;&nbsp;&nbsp;... <br />

+}

+</td></tr></table><br></i>

+gSOAP Web services and clients can automatically switch from SOAP 1.1 to SOAP 1.2 by providing the SOAP 1.2 namespace

+as a pattern in the third column of a namespace table:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;Namespace namespaces[] = <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;{"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/", "http://www.w3.org/2002/06/soap-encoding"}, <br />

+&nbsp;&nbsp;&nbsp;{"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/", "http://www.w3.org/2002/06/soap-envelope"}, <br />

+&nbsp;&nbsp;&nbsp;{"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance"}, <br />

+&nbsp;&nbsp;&nbsp;{"xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema"},

+&nbsp;&nbsp;&nbsp;... <br />

+}

+</td></tr></table><br></i>

+This way, gSOAP Web services can respond to either SOAP 1.1 or SOAP 1.2 requests.  gSOAP will automatically return SOAP 1.2 responses for SOAP 1.2 requests.

+

+<div class="p"><!----></div>

+The gSOAP <i>soapcpp2</i> compiler generates a <i>.nsmap</i> file with <i>SOAP-ENV</i> and <i>SOAP-ENC</i> namespace patterns similar to the above.

+Since clients issue a send first, they will always use SOAP 1.1 for requests when the namespace table is similar as shown above.

+Clients can accept SOAP 1.2 responses by inspecting the response message.

+To restrict gSOAP services and clients to SOAP 1.2 and to generate SOAP 1.2 service WSDLs, use <i>soapcpp2</i>

+compiler option <i>-2</i> to generate SOAP 1.2 conformant <i>.nsmap</i> and <i>.wsdl</i> files.

+

+<div class="p"><!----></div>

+<font color="#FF0000"><b>Caution</b></font>: SOAP 1.2 does not support partially transmitted arrays. So the <i>__offset</i> field of a dynamic array is meaningless.

+

+<div class="p"><!----></div>

+<font color="#FF0000"><b>Caution</b></font>: SOAP 1.2 requires the use of <i>SOAP_ENV__Code</i>, <i>SOAP_ENV__Reason</i>, and <i>SOAP_ENV__Detail</i> fields

+in a <i>SOAP_ENV__Fault</i> fault struct, while SOAP 1.1 uses <i>faultcode</i>, <i>faultstring</i>, and <i>detail</i> fields.

+Use <i>soap_receiver_fault_subcode(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*subcode, <b>const</b>&nbsp;<b>char</b>&nbsp;*faultstring, <b>const</b>&nbsp;<b>char</b>&nbsp;*detail)</i> to set a SOAP 1.1/1.2

+fault at the server-side with a fault subcode (SOAP 1.2).

+Use <i>soap_sender_fault_subcode(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*subcode, <b>const</b>&nbsp;<b>char</b>&nbsp;*faultstring, <b>const</b>&nbsp;<b>char</b>&nbsp;*detail)</i> to set a SOAP 1.1/1.2

+unrecoverable Bad Request fault at the server-side with a fault subcode (SOAP 1.2).

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc8.3">

+8.3</a>&nbsp;&nbsp;<font color="#0000FF">The soapdefs.h Header File</font></h3><a name="sec:soapdefs">

+</a>

+

+<div class="p"><!----></div>

+The <i>soapdefs.h</i> header file is included in <i>stdsoap2.h</i> when compiling with option <i>-DWITH_SOAPDEFS_H</i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>g++ -DWITH_SOAPDEFS_H -c stdsoap2.cpp</i>

+</td></tr></table><br></span>

+The <i>soapdefs.h</i> file allows users to include definitions and add includes without requiring changes to <i>stdsoap2.h</i>.

+For example,

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of soapdefs.h <br />

+#include  &lt; ostream &gt;  <br />

+#define SOAP_BUFLEN 20480 // use large send/recv buffer <br />

+</td></tr></table><br></i>

+The following header file can now refer to <i>ostream</i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>extern</b>&nbsp;<b>class</b>&nbsp;ostream; // ostream can't be (de)serialized, but need to be declared to make it visible to gSOAP <br />

+<b>class</b>&nbsp;ns__myClass <br />

+{ ... <br />

+&nbsp;&nbsp;&nbsp;<b>virtual</b>&nbsp;<b>void</b>&nbsp;print(ostream &amp;s) <b>const</b>; // need ostream here <br />

+&nbsp;&nbsp;&nbsp;... <br />

+};

+</td></tr></table><br></i>

+See also Section&nbsp;<a href="#sec:transient">18.3</a>.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc8.4">

+8.4</a>&nbsp;&nbsp;<font color="#0000FF">How to Build Modules and Libraries with the gSOAP #module Directive</font></h3><a name="sec:module">

+</a>

+

+<div class="p"><!----></div>

+The <i>#module</i> directive is used to build modules. A library can be build from a module and linked with multiple Web services applications. The directive should appear at the top of the header file and has the following format:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#module "<i>name</i>" <br />

+</td></tr></table><br></i>

+where <i>name</i> is a unique name for the module. The name is case insensitive and MUST not exceed 4 characters in length.

+The rest of the content of the header file should include type declarations and optionally the declarations of remote methods and SOAP Headers/Faults. When the gSOAP compiler processes the header file module, it will generate the source codes for a library. The Web services application that uses the library should use a header file that imports the module with the <i>#import</i> directive.

+

+<div class="p"><!----></div>

+For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+/* Contents of module.h */ <br />

+#module "test" <br />

+<b>long</b>; <br />

+<b>char</b>*; <br />

+<b>struct</b>&nbsp;ns__S <br />

+{ ... }

+</td></tr></table><br></i>

+The <i>module.h</i> header file declares a <b>long</b>, <b>char</b>*, and a <i><b>struct</b>&nbsp;ns__X</i>. The module name is "test", so the gSOAP compiler produces a <i>testC.cpp</i> file with the (de)serializers for these types. The <i>testC.cpp</i> library can be separately compiled and linked with an application that is built from a header file that imports "module.h" using <i>#import "module.h"</i>. You should also compile <i>testClient.cpp</i> when you want to build a library that includes the remote methods that you defined in the module header file.

+

+<div class="p"><!----></div>

+A module MUST be imported into another header file to use it and you cannot use a module alone to build a SOAP or XML application. That is, the top most header file in the import tree SHOULD NOT be a module.

+

+<div class="p"><!----></div>

+When multiple modules are linked, the types that they declare MUST be declared in one module only to avoid name clashes and link errors. You cannot create two modules that share the same type declaration and link the modules. When necessary, you should consider creating a module hierarchy such that types are declared only once and by only one module when these modules must be linked.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc8.5">

+8.5</a>&nbsp;&nbsp;<font color="#0000FF">How to use the gSOAP #import Directive</font></h3><a name="sec:import">

+</a>

+

+<div class="p"><!----></div>

+The <i>#import</i> directive is used to include gSOAP header files into other gSOAP header files for processing with

+the gSOAP compiler <i>soapcpp2</i>.

+The C <i>#include</i> directive cannot be used to include gSOAP header files.

+The <i>#include</i> directive is reserved to control the post-gSOAP compilation process, see&nbsp;<a href="#sec:pragmas">8.6</a>.

+

+<div class="p"><!----></div>

+The <i>#import</i> directive is used for two purposes: you can use it to include the contents of a header file into another header file and you can use it to import a module, see&nbsp;<a href="#sec:module">8.4</a>.

+

+<div class="p"><!----></div>

+An example of the <i>#import</i> directive:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#import "mydefs.gsoap" <br />

+<b>int</b>&nbsp;ns__mymethod(xsd__string in, xsd__int *out);

+</td></tr></table><br></i>

+where <i>"mydefs.gsoap"</i> is a gSOAP header file that defines <i>xsd__string</i> and <i>xsd__int</i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__string; <br />

+<b>typedef</b>&nbsp;<b>int</b>&nbsp;xsd__int;

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc8.6">

+8.6</a>&nbsp;&nbsp;<font color="#0000FF">How to Use #include and #define Directives</font></h3><a name="sec:pragmas">

+</a>

+

+<div class="p"><!----></div>

+The <i>#include</i> and <i>#define</i> directives are normally ignored by the gSOAP compiler.

+The use of the directives is enabled with the <i>-i</i> option of the gSOAP compiler, see Section&nbsp;<a href="#sec:options">8.1</a>.

+However, the gSOAP compiler will not actually parse the contents of the header files provided by the <i>#include</i> directives in a header file.

+Instead, the <i>#include</i> and <i>#define</i> directives will be added to the generated <i>soapH.h</i> header file <b>before</b>

+any other header file is included. Therefore, <i>#include</i> and <i>#define</i> directives can be used to control the C/C++

+compilation process of the sources of an application.

+

+<div class="p"><!----></div>

+The following example header file refers to <i>ostream</i> by including <i> &lt; ostream &gt; </i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include  &lt; ostream &gt;  <br />

+#define WITH_COOKIES // use HTTP cookie support (you must compile stdsoap2.cpp with -DWITH_COOKIES) <br />

+#define WITH_OPENSSL // enable HTTPS (SSL) support (you must compile stdsoap2.cpp with -DWITH_OPENSSL) <br />

+#define SOAP_DEFAULT_float FLT_NAN // use NaN instead of 0.0 <br />

+<b>extern</b>&nbsp;<b>class</b>&nbsp;ostream; // ostream can't be (de)serialized, but need to be declared to make it visible to gSOAP <br />

+<b>class</b>&nbsp;ns__myClass <br />

+{ ... <br />

+&nbsp;&nbsp;&nbsp;<b>virtual</b>&nbsp;<b>void</b>&nbsp;print(ostream &amp;s) <b>const</b>; // need ostream here <br />

+&nbsp;&nbsp;&nbsp;... <br />

+};

+</td></tr></table><br></i>

+This example also uses <i>#define</i> directives for various settings.

+

+<div class="p"><!----></div>

+<font color="#FF0000"><b>Caution</b></font>: Note that the use of <i>#define</i> in the header file does not automatically result in compiling

+<i>stdsoap2.cpp</i> with these directives. You MUST use the <i>-DWITH_COOKIES</i> and <i>-DWITH_OPENSSL</i> options when

+compiling <i>stdsoap2.cpp</i> before linking the object file with your codes. As an alternative, you can use <i>#define

+WITH_SOAPDEFS_H</i> and put the <i>#define</i> directives in the <i>soapdefs.h</i> file.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc8.7">

+8.7</a>&nbsp;&nbsp;<font color="#0000FF">Compiling a gSOAP Client</font></h3>

+

+<div class="p"><!----></div>

+After invoking the gSOAP stub and skeleton compiler on a header file description of a service, the client application can be compiled on a Linux machine as follows:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>g++ -o myclient myclient.cpp stdsoap2.cpp soapC.cpp soapClient.cpp</i>

+</td></tr></table><br></span>

+Or on a Unix machine:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>g++ -o myclient myclient.cpp stdsoap2.cpp soapC.cpp soapClient.cpp -lsocket -lxnet -lnsl</i>

+</td></tr></table><br></span>

+(Depending on your system configuration, the libraries <i>libsocket.a</i>,

+<i>libxnet.a</i>, <i>libnsl.a</i> or dynamic <i>*.so</i> versions of those libraries are required.)

+

+<div class="p"><!----></div>

+The <i>myclient.cpp</i> file must include <i>soapH.h</i> and must define a global namespace mapping table. A typical client program layout with namespace mapping table is shown below:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of file "myclient.cpp" <br />

+#include "soapH.h"; <br />

+... <br />

+// A remote method invocation: <br />

+&nbsp;&nbsp;&nbsp;soap_call_some_remote_method(...); <br />

+... <br />

+<b>struct</b>&nbsp;Namespace namespaces[] = <br />

+{&nbsp;&nbsp;&nbsp;// {"ns-prefix", "ns-name"} <br />

+&nbsp;&nbsp;&nbsp;{"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"}, <br />

+&nbsp;&nbsp;&nbsp;{"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/"}, <br />

+&nbsp;&nbsp;&nbsp;{"xsi",      "http://www.w3.org/2001/XMLSchema-instance"}, <br />

+&nbsp;&nbsp;&nbsp;{"xsd",      "http://www.w3.org/2001/XMLSchema"}, <br />

+&nbsp;&nbsp;&nbsp;{"ns1",      "urn:my-remote-method"}, <br />

+&nbsp;&nbsp;&nbsp;{NULL, NULL} <br />

+}; <br />

+...

+</td></tr></table><br></i>

+A mapping table is generated by the gSOAP compiler that can be used in the source, see Section&nbsp;<a href="#sec:wsdl">7.2.8</a>.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc8.8">

+8.8</a>&nbsp;&nbsp;<font color="#0000FF">Compiling a gSOAP Web Service</font></h3>

+

+<div class="p"><!----></div>

+After invoking the gSOAP stub and skeleton compiler on a header file description of the service, the server application can be compiled on a Linux machine as follows:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>g++ -o myserver myserver.cpp stdsoap2.cpp soapC.cpp soapServer.cpp</i>

+</td></tr></table><br></span>

+Or on a Unix machine:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>g++ -o myserver myserver.cpp stdsoap2.cpp soapC.cpp soapServer.cpp -lsocket -lxnet -lnsl</i>

+</td></tr></table><br></span>

+(Depending on your system configuration, the libraries <i>libsocket.a</i>,

+<i>libxnet.a</i>, <i>libnsl.a</i> or dynamic <i>*.so</i> versions of those libraries are required.)

+

+<div class="p"><!----></div>

+The <i>myserver.cpp</i> file must include <i>soapH.h</i> and must define a global namespace mapping table. A typical service program layout with namespace mapping table is shown below:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of file "myserver.cpp" <br />

+#include "soapH.h"; <br />

+<b>int</b>&nbsp;main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;soap_serve(soap_new()); <br />

+} <br />

+... <br />

+// Implementations of the remote methods as C++ functions <br />

+... <br />

+<b>struct</b>&nbsp;Namespace namespaces[] = <br />

+{&nbsp;&nbsp;&nbsp;// {"ns-prefix", "ns-name"} <br />

+&nbsp;&nbsp;&nbsp;{"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"}, <br />

+&nbsp;&nbsp;&nbsp;{"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/"}, <br />

+&nbsp;&nbsp;&nbsp;{"xsi",      "http://www.w3.org/2001/XMLSchema-instance"}, <br />

+&nbsp;&nbsp;&nbsp;{"xsd",      "http://www.w3.org/2001/XMLSchema"}, <br />

+&nbsp;&nbsp;&nbsp;{"ns1",      "urn:my-remote-method"}, <br />

+&nbsp;&nbsp;&nbsp;{NULL, NULL} <br />

+}; <br />

+...

+</td></tr></table><br></i>

+When the gSOAP service is compiled and installed as a CGI application, the <i>soap_serve</i> function acts as a service dispatcher. It listens to standard input and

+invokes the method via a skeleton routine to serve a SOAP client request. After the request is served, the response is encoded in

+SOAP and send to standard output. The method must be implemented in the server application and the type signature of the method

+must be identical to the remote method specified in the header file. That is, the function prototype in the header file must be a

+valid prototype of the method implemented as a C/C++ function.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc8.9">

+8.9</a>&nbsp;&nbsp;<font color="#0000FF">Using gSOAP for Creating Web Services and Clients in Pure C</font></h3>

+

+<div class="p"><!----></div>

+The gSOAP compiler can be used to create pure C Web services and clients. The gSOAP stub and skeleton compiler

+<i>soapcpp2</i> generates <i>.cpp</i> files by default. The compiler generates <i>.c</i> files with the <i>-c</i> option.

+However, these files only use C syntax and data types <b>if</b> the header

+file input to <i>soapcpp2</i> uses C syntax and data types. For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>soapcpp2 -c quote.h</i> <br />

+<i>gcc -o quote quote.c stdsoap2.c soapC.c soapClient.c</i>

+</td></tr></table><br></span>

+Warnings will be issued by the compiler when C++ class declarations occur in the header file.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc8.10">

+8.10</a>&nbsp;&nbsp;<font color="#0000FF">Limitations of gSOAP</font></h3><a name="sec:limitations">

+</a>

+

+<div class="p"><!----></div>

+gSOAP is SOAP 1.1 and SOAP 1.2 compliant and supports SOAP RPC and document/literal operations.

+

+<div class="p"><!----></div>

+From the perspective of the C/C++ language, a few C++ language features are not supported by gSOAP and these features cannot be used in the specification of SOAP remote methods.

+

+<div class="p"><!----></div>

+There are certain limitations for the following C++ language constructs:

+

+<dl compact="compact">

+ <dt><b>STL and STL templates</b></dt>

+	<dd> The gSOAP compiler supports STL strings <i>std::string</i> and <i>std::wstring</i> (see Section&nbsp;<a href="#sec:strings">10.2.6</a>) and the STL containers <i>std::deque</i>, <i>std::list</i>, <i>std::vector</i>, and <i>std::set</i>, (see Section&nbsp;<a href="#sec:templates">10.10.8</a>).</dd>

+ <dt><b>Templates</b></dt>

+	<dd> The gSOAP compiler is a preprocessor that cannot determine the template instantations used by the main program, nor can it generate templated code. You can however implement containers similar to the STL containers.</dd>

+ <dt><b>Multiple inheritance</b></dt>

+	<dd> Single class inheritance is supported. Multiple inheritance cannot be supported due to limitations of the SOAP protocol.</dd>

+ <dt><b>Abstract methods</b></dt>

+	<dd> A class must be instantiatable to allow decoding of instances of the class.</dd>

+ <dt><b>Directives</b></dt>

+	<dd> Directives and pragmas such as <i>#include</i> and <i>#define</i> are interpreted by the gSOAP compiler.

+However, the interpretation is different compared to the usual handling of directives, see Section&nbsp;<a href="#sec:pragmas">8.6</a>. If necessary, a traditional C++

+preprocessor can be used for the interpretation of directives. For example, Unix and Linux users can use "<tt>cpp -B</tt>"

+to expand the header file, e.g. <tt>cpp -B myfile.h  -  soapcpp2</tt>.

+Use the gSOAP <i>#import</i> directive to import gSOAP header files, see&nbsp;<a href="#sec:import">8.5</a>.</dd>

+ <dt><b>C and C++ programming statements</b></dt>

+	<dd> All class methods of a class should be declared within the class declaration in the header file, but the methods should not be implemented in code. All class method implementations must be defined within another C++ source file and linked to the application.</dd>

+</dl>

+The following data types require some attention to ensure they are serialized:

+

+<dl compact="compact">

+ <dt><b><i><b>union</b></i> types</b></dt>

+	<dd> A <i><b>union</b></i> data type can not be serialized unless run-time information is associated with a <i><b>union</b></i> in a struct/class as discussed in Section&nbsp;<a href="#sec:union">10.6</a>. An alternative is to use a <i><b>struct</b></i> with a pointer type for each field. Because <i>NULL</i> pointers are not encoded, the resulting encoding will appear as a union type if only one pointer field is valid (i.e.&nbsp;non-<i>NULL</i>) at the time that the data type is encoded.</dd>

+ <dt><b><i><b>void</b></i> and <i><b>void</b>*</i> types</b></dt>

+	<dd> The <i><b>void</b></i> data type cannot be serialized unless run-time type information is associated with the pointer using a <i><b>int</b>&nbsp;__type</i> field in the struct/class that contains the <i><b>void</b>*</i>. The <i><b>void</b>*</i> data type is typically used to point to some object or to some array of some type of objects at run-time. The compiler cannot determine the type of data pointed to and the size of the array pointed to. A struct or class with a <i><b>void</b>*</i> field can be augmented to support the (de)serialization of the <i><b>void</b>*</i> using a <i><b>int</b>&nbsp;__type</i> field as described in Section&nbsp;<a href="#sec:void">10.8</a>.</dd>

+ <dt><b>Pointers to sequences of elements in memory</b></dt>

+	<dd> Any pointer, except for C strings which are pointers to a sequence of

+characters, are treated by the compiler as if the pointer points to <b>only one element in memory</b> at run-time. Consequently,

+the encoding and decoding routines will ignore any subsequent elements that follow the first in memory. For the same reason,

+arrays of undetermined length, e.g.&nbsp;<i><b>float</b>&nbsp;a[]</i> cannot be used. gSOAP supports dynamic arrays using a special type convention,

+see Section&nbsp;<a href="#sec:dynarray">10.10</a>.</dd>

+ <dt><b>Uninitialized pointers</b></dt>

+	<dd> Obviously, all pointers that are part of a data structure must be valid or <i>NULL</i> to enable

+serialization of the data structure at run time.</dd>

+</dl>

+There are a number of programming solutions that can be adopted to circumvent these limitations. Instead of using <i><b>void</b>*</i>, a program

+can in some cases be modified to use a pointer to a known type. If the pointer is intended to point to different types of objects, a generic

+base class can be declared and the pointer is declared to point to the base class. All the other types are declared to be derived

+classes of this base class. For pointers that point to a sequence of elements in memory dynamic arrays should be used instead,

+see <a href="#sec:dynarray">10.10</a>.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc8.11">

+8.11</a>&nbsp;&nbsp;<font color="#0000FF">Compile Time Flags</font></h3><a name="sec:compilerflags">

+</a>

+

+<div class="p"><!----></div>

+The following macros (<i>#define</i>s) can be used to enable certain optional features:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td><font color="#FF0000"><b>Macro</b></font> </td><td><font color="#FF0000"><b>Description</b></font> </td></tr>

+<tr><td><i>WITH_SOAPDEFS_H</i>	</td><td>includes the <i>soapdefs.h</i> file for custom settings, see Section&nbsp;<a href="#sec:soapdefs">8.3</a> </td></tr>

+<tr><td><i>WITH_COOKIES</i>	</td><td>enables HTTP cookies, see Sections&nbsp;<a href="#sec:clientcookie">18.26</a>&nbsp;<a href="#sec:servercookie">18.27</a> </td></tr>

+<tr><td><i>WITH_OPENSSL</i>	</td><td>enables OpenSSL, see Sections&nbsp;<a href="#sec:clientopenssl">18.20</a>&nbsp;<a href="#sec:serveropenssl">18.19</a> </td></tr>

+<tr><td><i>WITH_IPV6</i>	</td><td>enables IPv6 support </td></tr>

+<tr><td><i>WITH_TCPFIN</i>	</td><td>use TCP FIN after sends when socket is ready to close </td></tr>

+<tr><td><i>WITH_FASTCGI</i>	</td><td>enables FastCGI, see Sections&nbsp;<a href="#sec:fastcgi">18.29</a> </td></tr>

+<tr><td><i>WITH_GZIP</i>	</td><td>enables gzip and deflate compression, see Section&nbsp;<a href="#sec:compression">18.25</a> </td></tr>

+<tr><td><i>WITH_ZLIB</i>	</td><td>enables deflate compression only, see Section&nbsp;<a href="#sec:compression">18.25</a> </td></tr>

+<tr><td><i>WITH_UDP</i>		</td><td>enables UDP support (SOAP-over-UDP), see Section&nbsp;<a href="#sec:udp">17</a> </td></tr>

+<tr><td><i>WITH_FAST</i>	</td><td>(obsolete) </td></tr>

+<tr><td><i>WITH_NOIO</i>	</td><td>eliminates need for file IO and BSD socket library, see Section&nbsp;<a href="#sec:noio">18.31</a> </td></tr>

+<tr><td><i>WITH_NOHTTP</i>	</td><td>eliminates HTTP stack to reduce code size </td></tr>

+<tr><td><i>WITH_LEAN</i>	</td><td>creates a small-footprint executable, see Section&nbsp;<a href="#sec:lean">18.30</a> </td></tr>

+<tr><td><i>WITH_LEANER</i>	</td><td>creates an even smaller footprint executable, see Section&nbsp;<a href="#sec:lean">18.30</a> </td></tr>

+<tr><td><i>WITH_NONAMESPACES</i></td><td>omit initialization of soap struct with global <i>namespaces</i> table </td></tr>

+<tr><td></td><td>and you MUST explicitly initialize <i>soap.namespaces</i> to point to a table </td></tr>

+<tr><td></td><td>see also Section&nbsp;<a href="#sec:nstable">9.4</a> </td></tr>

+<tr><td><i>WITH_NOGLOBAL</i>	</td><td>omit SOAP Header and Fault serialization code </td></tr>

+<tr><td><i>WITH_CDATA</i>	</td><td>retain the parsed CDATA sections in literal XML strings (no conversion) </td></tr>

+<tr><td><i>WITH_CASEINSENSITIVETAGS</i>	</td><td>enable case insensitive XML parsing </td></tr></table>

+

+</td></tr></table><br></span>

+<font color="#FF0000"><b>Caution</b></font>: it is important that the macros MUST be consistently defined to

+compile the sources, such as <i>stdsoap2.cpp</i>, <i>soapC.cpp</i>,

+<i>soapClient.cpp</i>, <i>soapServer.cpp</i>, and all application sources that

+include <i>stdsoap2.h</i> or <i>soapH.h</i>. If the macros are not consistently

+used, the application will crash due to a mismatches in the declaration and

+access of the gSOAP environment.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc8.12">

+8.12</a>&nbsp;&nbsp;<font color="#0000FF">Run Time Flags</font></h3><a name="sec:flags">

+</a>

+

+<div class="p"><!----></div>

+gSOAP provides flags to control the input and output mode settings at runtime.

+These flags are divided into four categories: transport (IO), content encoding

+(ENC), XML marshalling (XML), and C/C++ data mapping (C).

+

+<div class="p"><!----></div>

+Although gSOAP is fully SOAP 1.1 compliant, some SOAP implementations may have

+trouble accepting multi-reference data and/or require explicit nil data so

+these flags can be used to put gSOAP in "safe mode".  In addition, the

+embedding (or inlining) of multi-reference data is adopted in the SOAP 1.2

+specification, which gSOAP automatically supports when handling with SOAP 1.2

+messages.  The flags are:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td><font color="#FF0000"><b>Flag</b></font> </td><td><font color="#FF0000"><b>Description</b></font> </td></tr>

+<tr><td><i>SOAP_IO_FLUSH</i> </td><td>Disable buffering and flush output (default for all file-based output) </td></tr>

+<tr><td><i>SOAP_IO_BUFFER</i> </td><td>Enable buffering (default for all socket-oriented connections) </td></tr>

+<tr><td><i>SOAP_IO_STORE</i> </td><td>Store entire message to calculate HTTP content length </td></tr>

+<tr><td><i>SOAP_IO_CHUNK</i> </td><td>Use HTTP chunking </td></tr>

+<tr><td><i>SOAP_IO_LENGTH</i> </td><td>Require apriori calculation of content length (this is automatic) </td></tr>

+<tr><td><i>SOAP_IO_KEEPALIVE</i> </td><td>Attempt to keep socket connections alive (open) </td></tr>

+<tr><td><i>SOAP_IO_UDP</i> </td><td>Use UDP (datagram) transport, maximum message length is <i>SOAP_BUFLEN</i> </td></tr>

+<tr><td><i>SOAP_ENC_XML</i> </td><td>Use plain XML encoding without HTTP headers (useful with <i>SOAP_ENC_ZLIB</i>) </td></tr>

+<tr><td><i>SOAP_ENC_DIME</i> </td><td>Use DIME encoding (automatic when DIME attachments are used) </td></tr>

+<tr><td><i>SOAP_ENC_MIME</i> </td><td>Use MIME encoding (activate using <i>soap_set_mime</i>) </td></tr>

+<tr><td><i>SOAP_ENC_MTOM</i> </td><td>Use MTOM XOP attachments (instead of DIME) </td></tr>

+<tr><td><i>SOAP_ENC_ZLIB</i> </td><td>Compress encoding with Zlib (deflate or gzip format) </td></tr>

+<tr><td><i>SOAP_ENC_SSL</i> </td><td>Encrypt encoding with SSL (automatic with "https:" endpoints) </td></tr>

+<tr><td><i>SOAP_XML_INDENT</i> </td><td>Produce indented XML output </td></tr>

+<tr><td><i>SOAP_XML_CANONICAL</i> </td><td>Produce canonical XML output </td></tr>

+<tr><td><i>SOAP_XML_STRICT</i> </td><td>XML strict validation </td></tr>

+<tr><td><i>SOAP_XML_TREE</i> </td><td>Serialize data as XML trees (no multi-ref, duplicate data when necessary) </td></tr>

+<tr><td><i>SOAP_XML_GRAPH</i> </td><td>Serialize data as an XML graph with inline multi-ref (SOAP 1.2 default) </td></tr>

+<tr><td><i>SOAP_XML_NIL</i> </td><td>Serialize NULL data as xsi:nil elements (omit by default) </td></tr>

+<tr><td><i>SOAP_C_NOIOB</i> </td><td>Do not fault with <i>SOAP_IOB</i> </td></tr>

+<tr><td><i>SOAP_C_UTFSTRING</i> </td><td>(De)serialize 8-bit strings "as is" (strings MUST have UTF-8 encoded content) </td></tr>

+<tr><td><i>SOAP_C_MBSTRING</i> </td><td>Activate multibyte character support (depends on locale) </td></tr></table>

+

+</td></tr></table><br></span>

+The flags can be selectively turned on/off at any time, for example when

+multiple Web services are accessed by a client that require special treatment.

+

+<div class="p"><!----></div>

+All flags are orthogonal, except

+<i>SOAP_IO_FLUSH</i>,

+<i>SOAP_IO_BUFFER</i>,

+<i>SOAP_IO_STORE</i>, and

+<i>SOAP_IO_CHUNK</i>

+which are enumerations and only one of these I/O flags can be used.  Also the

+XML serialization flags

+<i>SOAP_XML_TREE</i> and

+<i>SOAP_XML_GRAPH</i> should not be mixed.

+

+<div class="p"><!----></div>

+The flags control the inbound and outbound message transport, encoding, and

+(de)serialization.  The following functions are used to set and reset the flags

+for input and output modes:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td><font color="#FF0000"><b>Function</b></font> </td><td><font color="#FF0000"><b>Description</b></font> </td></tr>

+<tr><td><i>soap_init2(<b>struct</b>&nbsp;soap *soap, int imode, int omode)</i> </td><td>Initialize the runtime and set flags </td></tr>

+<tr><td><i>soap_imode(<b>struct</b>&nbsp;soap *soap, int imode)</i> </td><td>Set all input mode flags </td></tr>

+<tr><td><i>soap_omode(<b>struct</b>&nbsp;soap *soap, int omode)</i> </td><td>Set all output mode flags </td></tr>

+<tr><td><i>soap_set_imode(<b>struct</b>&nbsp;soap *soap, int imode)</i> </td><td>Enable input mode flags </td></tr>

+<tr><td><i>soap_set_omode(<b>struct</b>&nbsp;soap *soap, int omode)</i> </td><td>Enable output mode flags </td></tr>

+<tr><td><i>soap_clr_imode(<b>struct</b>&nbsp;soap *soap, int omode)</i> </td><td>Disable input mode flags </td></tr>

+<tr><td><i>soap_clr_omode(<b>struct</b>&nbsp;soap *soap, int omode)</i> </td><td>Disable output mode flags </td></tr></table>

+

+</td></tr></table><br></span>

+The default setting is <i>SOAP_IO_DEFAULT</i> for both input and output modes.

+

+<div class="p"><!----></div>

+For example

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap soap; <br />

+soap_init2(&amp;soap, SOAP_IO_KEEPALIVE, <br />

+&nbsp;&nbsp;&nbsp;SOAP_IO_KEEPALIVE | SOAP_ENC_ZLIB | SOAP_XML_TREE | SOAP_XML_CANONICAL); <br />

+<b>if</b>&nbsp;(soap_call_ns__myMethod(&amp;soap, ...)) <br />

+...

+</td></tr></table><br></i>

+sends a compressed client request with keep-alive enabled and all data serialized as canonical XML trees.

+

+<div class="p"><!----></div>

+In many cases, setting the input mode will have no effect, especially with HTTP

+transport because gSOAP will determine the optimal input buffering and the

+encoding used for an inbound message. The flags that have an effect on

+handling inbound messages are <i>SOAP_IO_KEEPALIVE</i>, <i>SOAP_ENC_SSL</i>

+(but automatic when "https:" endpoints are used or <i>soap_ssl_accept</i>),

+<i>SOAP_C_NOIOB</i>, <i>SOAP_C_UTFSTRING</i>, and <i>SOAP_C_MBSTRING</i>.

+

+<div class="p"><!----></div>

+<font color="#FF0000"><b>Caution</b></font>: The <i>SOAP_XML_TREE</i> serialization flag can be used to

+improve interoperability with SOAP implementations that are not fully SOAP 1.1

+compliant.  However, a tree serialization will duplicate data when necessary

+and will crash the serializer for cyclic data structures.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc8.13">

+8.13</a>&nbsp;&nbsp;<font color="#0000FF">Memory Management</font></h3><a name="sec:memory">

+</a>

+

+<div class="p"><!----></div>

+Understanding gSOAP's run-time memory management is important to optimize

+client and service applications by eliminating memory leaks and/or dangling

+references.

+

+<div class="p"><!----></div>

+There are two forms of dynamic (heap) allocations made by gSOAP's runtime for

+serialization and deserialization of data.  Temporary data is created by the

+runtime such as hash tables to keep pointer reference information for

+serialization and hash tables to keep XML id/href information for

+multi-reference object deserialization.  Deserialized data is created upon

+receiving SOAP messages.  This data is stored on the heap and requires several

+calls to the <i>malloc</i> library function to allocate space for the data and

+<i><b>new</b></i> to create class instances.  All such allocations are tracked by

+gSOAP's runtime by linked lists for later deallocation.  The linked list for

+<i>malloc</i> allocations uses some extra space in each <i>malloc</i>ed block to

+form a chain of pointers through the <i>malloc</i>ed blocks.  A separate

+<i>malloc</i>ed linked list is used to keep track of class instance allocations.

+

+<div class="p"><!----></div>

+gSOAP does not enforce a deallocation policy and the user can adopt a

+deallocation policy that works best for a particular application.  As a

+consequence, deserialized data is never deallocated by the gSOAP runtime unless

+the user explicitly forces deallocation by calling functions to deallocate data

+collectively or individually.

+

+<div class="p"><!----></div>

+The deallocation functions are:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td><font color="#FF0000"><b>Function Call</b></font> </td><td><font color="#FF0000"><b>Description</b></font> </td></tr>

+<tr><td><i>soap_end(<b>struct</b>&nbsp;soap *soap)</i> </td><td>Remove temporary data and deserialized data except </td></tr>

+<tr><td></td><td>class instances </td></tr>

+<tr><td><i>soap_free(<b>struct</b>&nbsp;soap *soap)</i> </td><td>Remove temporary data only </td></tr>

+<tr><td><i>soap_destroy(<b>struct</b>&nbsp;soap *soap)</i> </td><td>Remove all dynamically allocated class instances. </td></tr>

+<tr><td></td><td>Need to be called before <i>soap_end()</i> </td></tr>

+<tr><td><i>soap_dealloc(<b>struct</b>&nbsp;soap *soap, <b>void</b>&nbsp;*p)</i> </td><td>Remove malloced data at <i>p</i>. When <i>p==NULL</i>: remove all </td></tr>

+<tr><td></td><td>dynamically allocated (deserialized) data except class instances </td></tr>

+<tr><td><i>soap_delete(<b>struct</b>&nbsp;soap *soap, <b>void</b>&nbsp;*p)</i> </td><td>Remove class instance at <i>p</i>. When <i>p==NULL</i>: remove all </td></tr>

+<tr><td></td><td>dynamically allocated (deserialized) class instances </td></tr>

+<tr><td></td><td>(this is identical to calling soap_destroy(<b>struct</b>&nbsp;soap *soap)) </td></tr>

+<tr><td><i>soap_unlink(<b>struct</b>&nbsp;soap *soap, <b>void</b>&nbsp;*p)</i> </td><td>Unlink data/object at <i>p</i> from gSOAP's deallocation chain </td></tr>

+<tr><td></td><td>so gSOAP won't deallocate it </td></tr>

+<tr><td><i>soap_done(<b>struct</b>&nbsp;soap *soap)</i> </td><td>Reset: close master/slave sockets and remove callbacks </td></tr>

+<tr><td></td><td>(see Section&nbsp;<a href="#sec:callback">18.7</a> </td></tr></table>

+

+</td></tr></table><br></span>

+Temporary data (i.e.&nbsp;the hash tables) are automatically removed with calls to

+the <i>soap_free</i> function which is made within <i>soap_end</i> and

+<i>soap_done</i> or when the next call to a stub or skeleton routine is made to

+send a message or receive a message.  Deallocation of non-class based data is

+straightforward: <i>soap_end</i> removes all dynamically allocated deserialized

+data (data allocated with <i>soap_malloc</i>.  That is, when the client/service

+application does not use any class instances that are (de)marshalled, but uses

+structs, arrays, etc., then calling the <i>soap_end</i> function is safe to

+remove all deserialized data.  The function can be called after processing the

+deserialized data of a remote method call or after a number of remote method

+calls have been made.  The function is also typically called after

+<i>soap_serve</i>, when the service finished sending the response to a client

+and the deserialized client request data can be removed.

+

+<div class="p"><!----></div>

+Individual data objects can be unlinked from the deallocation chain if

+necessary, to prevent deallocation by the collective <i>soap_end</i> or

+<i>soap_destroy</i> functions.

+

+<div class="p"><!----></div>

+	      <h4><a name="tth_sEc8.13.1">

+8.13.1</a>&nbsp;&nbsp;<font color="#0000FF">Memory Management Policies</font></h4>

+

+<div class="p"><!----></div>

+There are three situations to consider for memory deallocation policies for class instances:

+

+<ol type="1">

+<li> the program code deletes the class

+instances and the class destructors in turn SHOULD delete and free any dynamically allocated data (deep deallocation) without

+calling the <i>soap_end</i> and <i>soap_destroy</i> functions,

+<div class="p"><!----></div>

+</li>

+

+<li> or the class

+destructors SHOULD NOT deallocate any data and the <i>soap_end</i> and <i>soap_destroy</i> functions can be called to remove

+the data.

+<div class="p"><!----></div>

+</li>

+

+<li> or the class

+destructors SHOULD mark their own deallocation and mark the deallocation of any other data deallocated by it's destructors

+by calling the <i>soap_unlink</i> function. This allows

+<i>soap_destroy</i> and <i>soap_end</i> to remove the remaining instances and data without causing duplicate deallocations.

+<div class="p"><!----></div>

+</li>

+</ol>

+It is advised to use pointers to class instances that are used within other structs and classes to avoid the creation of temporary

+class instances during deserialization. The problem with temporary class instances is that the destructor of the temporary may affect data used by

+other instances through the sharing of data parts accessed with pointers. Temporaries and even whole copies of class instances

+can be created when deserializing SOAP multi-referenced objects.

+A dynamic array of class instances is similar: temporaries may be created to fill the array upon deserialization. To avoid

+problems, use dynamic arrays of pointers to class instances. This also enables the exchange of polymorphic arrays when the

+elements are instances of classes in an inheritance hierarchy.

+In addition, allocate data and class instances with <i>soap_malloc</i> and <i>soap_new_X</i> functions (more details below).

+

+<div class="p"><!----></div>

+To summarize, it is advised to pass class data types by pointer to a remote method. For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>class</b>&nbsp;X { ... }; <br />

+ns__remoteMethod(X *in, ...);

+</td></tr></table><br></i>

+Response elements that are class data types can be passed by reference, as in:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>class</b>&nbsp;X { ... }; <br />

+<b>class</b>&nbsp;ns__remoteMethodResponse { ... }; <br />

+ns__remoteMethod(X *in, ns__remoteMethodResponse &amp;out);

+</td></tr></table><br></i>

+But dynamic arrays declared as class data types should use a pointer to a valid object that will be overwritten when the

+function is called, as in:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>int</b>&nbsp;xsd__int; <br />

+<b>class</b>&nbsp;X { ... }; <br />

+<b>class</b>&nbsp;ArrayOfint { xsd__int *__ptr; <b>int</b>&nbsp;__size; }; <br />

+ns__remoteMethod(X *in, ArrayOfint *out);

+</td></tr></table><br></i>

+Or a reference to a valid or <i>NULL</i> pointer, as in:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>int</b>&nbsp;xsd__int; <br />

+<b>class</b>&nbsp;X { ... }; <br />

+<b>class</b>&nbsp;ArrayOfint { xsd__int *__ptr; <b>int</b>&nbsp;__size; }; <br />

+ns__remoteMethod(X *in, ArrayOfint *&amp;out);

+</td></tr></table><br></i>

+The gSOAP memory allocation functions can be used in client and/or service code to allocate temporary data that will be

+automatically deallocated.

+These functions are:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td><font color="#FF0000"><b>Function Call</b></font> </td><td><font color="#FF0000"><b>Description</b></font> </td></tr>

+<tr><td><i><b>void</b>&nbsp;*soap_malloc(<b>struct</b>&nbsp;soap *soap, size_t n)</i> </td><td>return pointer to <i>n</i> bytes </td></tr>

+<tr><td><i><u><span class="roman">Class</span></u> *soap_new_<u><span class="roman">Class</span></u>(<b>struct</b>&nbsp;soap *soap, <b>int</b>&nbsp;n)</i> </td><td>instantiate <i>n</i> <u><span class="roman">Class</span></u> objects </td></tr></table>

+

+</td></tr></table><br></span>

+The <i>soap_new_X</i> functions are generated by the gSOAP compiler for every class <i>X</i> in the header file.

+Parameter <i>n</i> MUST be <i>-1</i> to instantiate a single object, or larger or equal to 0 to instantiate an array of <i>n</i> objects.

+

+<div class="p"><!----></div>

+Space allocated with <i>soap_malloc</i> will be released with the <i>soap_end</i> and <i>soap_dealloc</i> functions.

+Objects instantiated with <i>soap_new_X(<b>struct</b>&nbsp;soap*)</i> are removed altogether with <i>soap_destroy(<b>struct</b>&nbsp;soap*)</i>.

+Individual objects instantiated with <i>soap_new_X</i> are removed with <i>soap_delete_X(<b>struct</b>&nbsp;soap*, X*)</i>.

+For example, the following service uses temporary data in the remote method implementation:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;main() <br />

+{ ... <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;soap_serve(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;soap_end(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;... <br />

+}

+</td></tr></table><br></i>

+An example remote method that allocates a temporary string is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;ns__itoa(<b>struct</b>&nbsp;soap *soap, <b>int</b>&nbsp;i, <b>char</b>&nbsp;**a) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;*a = (char*)soap_malloc(soap, 11); <br />

+&nbsp;&nbsp;&nbsp;sprintf(*a, "%d", i); <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+}

+</td></tr></table><br></i>

+This temporary allocation can also be used to allocate strings for the SOAP Fault data structure. For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;ns__mymethod(...) <br />

+{ ... <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(exception) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*msg = (<b>char</b>*)soap_malloc(soap, 1024); // allocate temporary space for detailed message <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sprintf(msg, "...", ...); // produce the detailed message <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;soap_receiver_fault(soap, &#196;n exception occurred", msg); // return the server-side fault <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;... <br />

+}

+</td></tr></table><br></i>

+Use <i>soap_receiver_fault(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*faultstring, <b>const</b>&nbsp;<b>char</b>&nbsp;*detail)</i> to set a SOAP 1.1/1.2 fault at the server-side.

+Use <i>soap_sender_fault(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*faultstring,

+<b>const</b>&nbsp;<b>char</b>&nbsp;*detail)</i> to set a SOAP 1.1/1.2 unrecoverable Bad Request fault

+at the server-side. Sending clients are not supposed to retry messages after a

+Bad Request, while errors at the receiver-side indicate temporary problems.

+

+<div class="p"><!----></div>

+The above functions do not include a SOAP 1.2 Subcode element. To include Subcode element, use <i>soap_receiver_fault_subcode(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*subcode, <b>const</b>&nbsp;<b>char</b>&nbsp;*faultstring, <b>const</b>&nbsp;<b>char</b>&nbsp;*detail)</i> to set a SOAP 1.1/1.2 fault with Subcode at the server-side.

+Use <i>soap_sender_fault_subcode(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*subcode, <b>const</b>&nbsp;<b>char</b>&nbsp;*faultstring, <b>const</b>&nbsp;<b>char</b>&nbsp;*detail)</i> to set a SOAP 1.1/1.2 unrecoverable Bad Request fault with Subcode at the server-side.

+

+<div class="p"><!----></div>

+gSOAP provides a function to duplicate a string into gSOAP's memory space:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i><b>char</b>&nbsp;*soap_strdup(<b>struct</b>&nbsp;soap *soap, const char *s)</i>

+</td></tr></table><br></span>

+The function allocates space for <i>s</i> with <i>soap_malloc</i>, copies the

+string, and returns a pointer to the duplicated string. When <i>s</i> is NULL,

+the function does not allocate and copy the string and returns NULL.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc8.13.2">

+8.13.2</a>&nbsp;&nbsp;<font color="#0000FF">Intra-Class Memory Management</font></h4><a name="sec:classmemory">

+</a>

+

+<div class="p"><!----></div>

+When a class declaration has a <i><b>struct</b>&nbsp;soap *</i> field, this field will be set to point to the current gSOAP run-time environment by

+gSOAP's deserializers and by the <i>soap_new_Class</i> functions.

+This simplifies memory management for class instances.

+The <i><b>struct</b>&nbsp;soap*</i> pointer is implicitly set by the gSOAP deserializer for

+the class or explicitly by calling the <i>soap_new_X</i> function for class <i>X</i>.

+For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>class</b>&nbsp;Sample <br />

+{ <b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap *soap; // reference to gSOAP's run-time <br />

+&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;Sample(); <br />

+&nbsp;&nbsp;&nbsp;~Sample(); <br />

+};

+</td></tr></table><br></i>

+The constructor and destructor for class <i>Sample</i> are:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+Sample::Sample() <br />

+{ this<tt>-&gt;</tt>soap = NULL; <br />

+} <br />

+Sample::~Sample() <br />

+{ soap_unlink(this<tt>-&gt;</tt>soap, this); <br />

+}

+</td></tr></table><br></i>

+The <i>soap_unlink()</i> call removes the object from gSOAP's deallocation chain.

+In that way, <i>soap_destroy</i> can be safely called to remove all class instances.

+The following code illustrates the explicit creation of a <i>Sample</i> object and cleanup:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap *soap = soap_new(); // new gSOAP runtime <br />

+Sample *obj = soap_new_Sample(soap, -1); // new Sample object with obj<tt>-&gt;</tt>soap set to runtime <br />

+... <br />

+<b>delete</b>&nbsp;obj; // also calls soap_unlink to remove obj from the deallocation chain <br />

+soap_destroy(soap); // deallocate all (other) class instances <br />

+soap_end(soap); // clean up

+</td></tr></table><br></i>

+Here is another example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>class</b>&nbsp;ns__myClass <br />

+{ ... <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap *soap; // set by soap_new_ns__myClass() <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*name; <br />

+&nbsp;&nbsp;&nbsp;<b>void</b>&nbsp;setName(<b>const</b>&nbsp;<b>char</b>&nbsp;*s); <br />

+&nbsp;&nbsp;&nbsp;... <br />

+};

+</td></tr></table><br></i>

+Calls to <i>soap_new_ns__myClass(soap, n)</i> will set the <i>soap</i> field in the class instance to the current gSOAP

+environment. Because the deserializers invoke the <i>soap_new</i> functions, the <i>soap</i> field of the <i>ns__myClass</i>

+instances are set as well.

+This mechanism is convenient when Web Service methods need to return objects that are instantiated in the methods.

+For example

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;ns__myMethod(<b>struct</b>&nbsp;soap *soap, ...) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;ns__myClass *p = soap_new_ns__myClass(soap, -1); <br />

+&nbsp;&nbsp;&nbsp;p<tt>-&gt;</tt>setName("SOAP"); <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+} <br />

+<b>void</b>&nbsp;ns__myClass::ns__setName(<b>const</b>&nbsp;<b>char</b>&nbsp;*s) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name = (<b>char</b>*)soap_malloc(soap, strlen(s)+1); <br />

+&nbsp;&nbsp;&nbsp;<b>else</b>&nbsp;<br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name = (<b>char</b>*)malloc(strlen(s)+1); <br />

+&nbsp;&nbsp;&nbsp;strcpy(name, s); <br />

+} <br />

+ns__myClass::ns__myClass() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;soap = NULL; <br />

+&nbsp;&nbsp;&nbsp;name = NULL; <br />

+} <br />

+ns__myClass::~ns__myClass() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!soap &amp;&amp; name) free(name); <br />

+&nbsp;&nbsp;&nbsp;soap_unlink(soap, this); <br />

+} 

+</td></tr></table><br></i>

+Calling <i>soap_destroy</i> right after <i>soap_serve</i> in the Web Service will destroy all dynamically allocated

+class instances.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc8.14">

+8.14</a>&nbsp;&nbsp;<font color="#0000FF">Debugging</font></h3>

+

+<div class="p"><!----></div>

+To activate message logging for debugging, un-comment the <i>#define DEBUG</i> directive in <i>stdsoap2.h</i>. Compile the client and/or

+server applications as described above (or simply use <i>g++ -DDEBUG ...</i> to compile with debugging activated). When the client and server applications run, they will log their activity in three

+separate files:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td><font color="#FF0000"><b>File</b></font> </td><td><font color="#FF0000"><b>Description</b></font> </td></tr>

+<tr><td><i>SENT.log</i> </td><td>The SOAP content transmitted by the application </td></tr>

+<tr><td><i>RECV.log</i> </td><td>The SOAP content received by the application </td></tr>

+<tr><td><i>TEST.log</i> </td><td>A log containing various activities performed by the application </td></tr></table>

+

+</td></tr></table><br></span>

+<font color="#FF0000"><b>Caution</b></font>: The client and server applications may run slow due to the logging activity.

+

+<div class="p"><!----></div>

+<font color="#FF0000"><b>Caution</b></font>: When installing a CGI application on the Web with debugging activated, the log files may sometimes not be created due to file

+access permission restrictions imposed on CGI applications. To get around this, create empty log files with universal write

+permissions. Be careful about the security implication of this.

+

+<div class="p"><!----></div>

+You can test a service CGI application without deploying it on the Web.

+To do this, create a client application for the service and activate message logging by this client.

+Remove any old <i>SENT.log</i> file and run the client (which connects to the Web service or to another dummy, but valid address)

+and copy the <i>SENT.log</i> file to another file, e.g. <i>SENT.tst</i>.

+Then redirect the <i>SENT.tst</i> file to the service CGI application.  For example,

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>myservice.cgi</i>  &lt;  <i>SENT.tst</i>

+</td></tr></table><br></span>

+This should display the service response on the terminal.

+

+<div class="p"><!----></div>

+The file names of the log files and the logging activity can be controlled at the application level. This allows the creation of

+separate log files by separate services, clients, and threads.

+For example, the following service logs all SOAP messages (but no debug messages) in separate directories:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap soap; <br />

+soap_init(&amp;soap); <br />

+... <br />

+soap_set_recv_logfile(&amp;soap, "logs/recv/service12.log"); // append all messages received in /logs/recv/service12.log <br />

+soap_set_sent_logfile(&amp;soap, "logs/sent/service12.log"); // append all messages sent in /logs/sent/service12.log <br />

+soap_set_test_logfile(&amp;soap, NULL); // no file name: do not save debug messages <br />

+... <br />

+soap_serve(&amp;soap); <br />

+...

+</td></tr></table><br></i>

+Likewise, messages can be logged for individual client-side remote method calls.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc8.15">

+8.15</a>&nbsp;&nbsp;<font color="#0000FF">Required Libraries</font></h3>

+

+<div class="p"><!----></div>

+

+<ul>

+<li> The socket library is essential and requires the inclusion of the appropriate libraries with the compile command for Sun

+Solaris systems:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>g++ -o myclient myclient.cpp stdsoap2.cpp soapC.cpp soapClient.cpp -lsocket -lxnet -lnsl</i>

+</td></tr></table><br></span>

+These library loading options are not required with Linux.

+<div class="p"><!----></div>

+</li>

+

+<li> The gSOAP runtime uses the math library for the <tt>NaN</tt>, <tt>INF</tt>, and <tt>-INF</tt> floating point representations.  The library

+is not strictly necessary and the <i> &lt; math.h &gt; </i> header file import can be commented out from the <i>stdsoap2.h</i> header file.

+The application can be linked without the <i>-lm</i> math library e.g. under Sun Solaris:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>g++ -o myclient myclient.cpp stdsoap2.cpp soapC.cpp soapClient.cpp -lsocket -lxnet -lnsl</i>

+</td></tr></table><br></span>

+<div class="p"><!----></div>

+</li>

+</ul>

+

+<div class="p"><!----></div>

+ <h2><a name="tth_sEc9">

+9</a>&nbsp;&nbsp;<font color="#0000FF">The gSOAP Remote Method Specification Format</font></h2>

+

+<div class="p"><!----></div>

+A SOAP remote method is specified as a C/C++ function prototype in a header

+file. The function is REQUIRED to return <i><b>int</b></i>, which is used to represent

+a SOAP error code, see Section&nbsp;<a href="#sec:errcodes">9.2</a>. Multiple remote methods MAY

+be declared together in one header file.

+

+<div class="p"><!----></div>

+The general form of a SOAP remote method specification is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<font size="+1"><span class="roman">[</span></font><b>int</b><font size="+1"><span class="roman">]</span></font> <font size="+1"><span class="roman">[</span></font>namespace_prefix__<font size="+1"><span class="roman">]</span></font>method_name(<font size="+1"><span class="roman">[</span></font>inparam1, inparam2, ...,<font size="+1"><span class="roman">]</span></font> outparam);

+</td></tr></table><br></i>

+where

+

+<dl compact="compact">

+ <dt><b><span class="roman"><i>namespace_prefix__</i></b></dt>

+	<dd> is the optional namespace prefix of the method (see identifier translation rules&nbsp;<a href="#sec:idtrans">9.3</a>)</span></dd>

+ <dt><b><span class="roman"><i>method_name</i></b></dt>

+	<dd>	 it the remote method name (see identifier translation rules&nbsp;<a href="#sec:idtrans">9.3</a>)</span></dd>

+ <dt><b><span class="roman"><i>inparam</i></b></dt>

+	<dd>		 is the declaration of an input parameter of the remote method</span></dd>

+ <dt><b><span class="roman"><i>outparam</i></b></dt>

+	<dd>	 is the declaration of the output parameter of the remote method</span></dd>

+</dl>

+This simple form can only pass a single, non-<i><b>struct</b></i> and non-<i><b>class</b></i>

+type output parameter. See&nbsp;<a href="#sec:param">9.1</a> for passing multiple output

+parameters. The name of the declared function <i>namespace_prefix__

+method_name</i> must be unique and cannot match the name of a <i><b>struct</b></i>,

+<i><b>class</b></i>, or <i><b>enum</b></i> declared in the same header file.

+

+<div class="p"><!----></div>

+The method request is encoded in SOAP as an XML element and the namespace prefix, method name, and input parameters are encoded using the format:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>method_name xsi:type="<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>method_name&#62; <br />

+&lt;inparam-name1 xsi:type="..."&#62;...&lt;/inparam-name1&#62; <br />

+&lt;inparam-name2 xsi:type="..."&#62;...&lt;/inparam-name2&#62; <br />

+... <br />

+&lt;/<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>method_name&#62;

+</td></tr></table><br></tt>

+where the <tt>inparam-name</tt> accessors are the element-name representations of the <i>inparam</i> parameter name declarations, see

+Section&nbsp;<a href="#sec:idtrans">9.3</a>. (The optional parts are shown enclosed in <font size="+1"><span class="roman">[</span></font><font size="+1"><span class="roman">]</span></font>.)

+

+<div class="p"><!----></div>

+The XML response by the Web service is of the form:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>method-nameResponse xsi:type="<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>method-nameResponse&#62; <br />

+&lt;outparam-name xsi:type="..."&#62;...&lt;/outparam-name&#62; <br />

+&lt;/<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>method-nameResponse&#62;

+</td></tr></table><br></tt>

+where the <tt>outparam-name</tt> accessor is the element-name representation of the <i>outparam</i> parameter name declaration, see

+Section&nbsp;<a href="#sec:idtrans">9.3</a>. By convention, the response element name is the method name ending in <tt>Response</tt>.

+See&nbsp;<a href="#sec:param">9.1</a> on how to change the declaration if the service response element name is different.

+

+<div class="p"><!----></div>

+The gSOAP stub and skeleton compiler generates a stub routine for the remote

+method. This stub is of the form:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;soap_call_<font size="+1"><span class="roman">[</span></font>namespace_prefix__<font size="+1"><span class="roman">]</span></font>method_name(<b>struct</b>&nbsp;soap *soap, <b>char</b>&nbsp;*URL, <b>char</b>&nbsp;*action, <font size="+1"><span class="roman">[</span></font>inparam1, inparam2, ...,<font size="+1"><span class="roman">]</span></font> outparam);

+</td></tr></table><br></i>

+This proxy can be called by a client application to perform the remote method

+call.

+

+<div class="p"><!----></div>

+The gSOAP stub and skeleton compiler generates a skeleton routine for the

+remote method. The skeleton function is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;soap_serve_<font size="+1"><span class="roman">[</span></font>namespace_prefix__<font size="+1"><span class="roman">]</span></font>method_name(<b>struct</b>&nbsp;soap *soap);

+</td></tr></table><br></i>

+The skeleton routine, when called by a service application, will attempt to

+serve a request on the standard input. If no request is present or if the

+request does not match the method name, <i>SOAP_NO_METHOD</i> is returned.

+The skeleton routines are automatically called by the generated

+<i>soap_serve</i> routine that handles all requests.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc9.1">

+9.1</a>&nbsp;&nbsp;<font color="#0000FF">Remote Method Parameter Passing</font></h3><a name="sec:param">

+</a>

+

+<div class="p"><!----></div>

+The input parameters of a remote method MUST be passed by value.  Input

+parameters cannot be passed by reference with the <i>&amp;</i> reference operator,

+but an input parameter value MAY be passed by a pointer to the data.  Of

+course, passing a pointer to the data is preferred when the size of the data of

+the parameter is large.  Also, to pass instances of (derived) classes, pointers

+to the instance need to be used to avoid passing the instance by value which

+requires a temporary and prohibits passing derived class instances.  When two

+input parameter values are identical, passing them using a pointer has the

+advantage that the value will be encoded only once as multi-reference (hence,

+the parameters are aliases).  When input parameters are passed using a pointer,

+the data pointed to will not be modified by the remote method and returned to

+the caller.

+

+<div class="p"><!----></div>

+The output parameter MUST be passed by reference using <i>&amp;</i> or by using a

+pointer. Arrays are passed by reference by default and do not require the use

+of the reference operator <i>&amp;</i>.

+

+<div class="p"><!----></div>

+The input and output parameter types have certain limitations, see

+Section&nbsp;<a href="#sec:limitations">8.10</a>

+

+<div class="p"><!----></div>

+If the output parameter is a <i><b>struct</b></i> or <i><b>class</b></i> type, it is

+considered a SOAP remote method response element instead of a simple output

+parameter value. That is, the name of the <i><b>struct</b></i> or <i><b>class</b></i> is the

+name of the response element and the <i><b>struct</b></i> or <i><b>class</b></i> fields are

+the output parameters of the remote method, see also&nbsp;<a href="#sec:response">7.1.7</a>. Hence,

+if the output parameter has to be a <i><b>struct</b></i> or <i><b>class</b></i>, a response

+<i><b>struct</b></i> or <i><b>class</b></i> MUST be declared as well.  In addition, if a

+remote method returns multiple output parameters, a response <i><b>struct</b></i> or

+<i><b>class</b></i> MUST be declared. By convention, the response element is the

+remote method name ending with "<tt>Response</tt>".

+

+<div class="p"><!----></div>

+The general form of a response element declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;<font size="+1"><span class="roman">[</span></font>namespace_prefix__<font size="+1"><span class="roman">]</span></font>response_element_name <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;outparam1; <br />

+&nbsp;&nbsp;&nbsp;outparam2; <br />

+&nbsp;&nbsp;&nbsp;... <br />

+};

+</td></tr></table><br></i>

+where

+

+<dl compact="compact">

+ <dt><b><span class="roman"><i>namespace_prefix__</i></b></dt>

+	<dd> is the optional namespace prefix of the response element (see identifier translation rules&nbsp;<a href="#sec:idtrans">9.3</a>)</span></dd>

+ <dt><b><span class="roman"><i>response_element_name</i></b></dt>

+	<dd>	 it the name of the response element (see identifier translation rules&nbsp;<a href="#sec:idtrans">9.3</a>)</span></dd>

+ <dt><b><span class="roman"><i>outparam</i></b></dt>

+	<dd>	 is the declaration of an output parameter of the remote method</span></dd>

+</dl>

+The general form of a remote method specification with a response element declaration for (multiple) output parameters is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<font size="+1"><span class="roman">[</span></font><b>int</b><font size="+1"><span class="roman">]</span></font> <font size="+1"><span class="roman">[</span></font>namespace_prefix__<font size="+1"><span class="roman">]</span></font>method_name(<font size="+1"><span class="roman">[</span></font>inparam1, inparam2, ...,<font size="+1"><span class="roman">]</span></font> <b>struct</b>&nbsp;<font size="+1"><span class="roman">[</span></font>namespace_prefix__<font size="+1"><span class="roman">]</span></font>response_element_name {outparam1<font size="+1"><span class="roman">[</span></font>, outparam2, ...<font size="+1"><span class="roman">]</span></font>} &amp;anyparam);

+</td></tr></table><br></i>

+The choice of name for <i>anyparam</i> has no effect on the SOAP encoding and decoding and is only used as a place holder for the

+response.

+

+<div class="p"><!----></div>

+The method request is encoded in SOAP as an independent element and the

+namespace prefix, method name, and input parameters are encoded using the

+format:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>method-name xsi:type="<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>method-name&#62; <br />

+&lt;inparam-name1 xsi:type="..."&#62;...&lt;/inparam-name1&#62; <br />

+&lt;inparam-name2 xsi:type="..."&#62;...&lt;/inparam-name2&#62; <br />

+... <br />

+&lt;/<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>method-name&#62;

+</td></tr></table><br></tt>

+where the <tt>inparam-name</tt> accessors are the element-name representations of

+the <i>inparam</i> parameter name declarations, see Section&nbsp;<a href="#sec:idtrans">9.3</a>.

+(The optional parts resulting from the specification are shown enclosed in

+<font size="+1"><span class="roman">[</span></font><font size="+1"><span class="roman">]</span></font>.)

+

+<div class="p"><!----></div>

+The method response is expected to be of the form:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>response-element-name xsi:type="<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>response-element-name&#62; <br />

+&lt;outparam-name1 xsi:type="..."&#62;...&lt;/outparam-name1&#62; <br />

+&lt;outparam-name2 xsi:type="..."&#62;...&lt;/outparam-name2&#62; <br />

+... <br />

+&lt;/<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>response-element-name&#62;

+</td></tr></table><br></tt>

+where the <tt>outparam-name</tt> accessors are the element-name representations of

+the <i>outparam</i> parameter name declarations, see Section&nbsp;<a href="#sec:idtrans">9.3</a>.

+(The optional parts resulting from the specification are shown enclosed in

+<font size="+1"><span class="roman">[</span></font><font size="+1"><span class="roman">]</span></font>.)

+

+<div class="p"><!----></div>

+The input and/or output parameters can be made anonymous, which allows the

+deserialization of requests/responses with different parameter names as is

+endorsed by the SOAP 1.1 specification, see Section&nbsp;<a href="#sec:anonymous">7.1.13</a>.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc9.2">

+9.2</a>&nbsp;&nbsp;<font color="#0000FF">Error Codes</font></h3><a name="sec:errcodes">

+</a>

+

+<div class="p"><!----></div>

+The error codes returned by the stub and skeleton routines are listed below.

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td align="right"><font color="#FF0000"><b>Code</b></font> </td><td><font color="#FF0000"><b>Description</b></font> </td></tr>

+<tr><td align="right"><i>SOAP_OK</i> </td><td>No error </td></tr>

+<tr><td align="right"><i>SOAP_CLI_FAULT</i>* </td><td>The service returned a client fault (SOAP 1.2 Sender fault)</td></tr>

+<tr><td align="right"><i>SOAP_SVR_FAULT</i>* </td><td>The service returned a server fault (SOAP 1.2 Receiver fault)</td></tr>

+<tr><td align="right"><i>SOAP_TAG_MISMATCH</i> </td><td>An XML element didn't correspond to anything expected </td></tr>

+<tr><td align="right"><i>SOAP_TYPE</i> </td><td>An XML Schema type mismatch </td></tr>

+<tr><td align="right"><i>SOAP_SYNTAX_ERROR</i> </td><td>An XML syntax error occurred on the input </td></tr>

+<tr><td align="right"><i>SOAP_NO_TAG</i> </td><td>Begin of an element expected, but not found </td></tr>

+<tr><td align="right"><i>SOAP_IOB</i> </td><td>Array index out of bounds </td></tr>

+<tr><td align="right"><i>SOAP_MUSTUNDERSTAND</i>* </td><td>An element needs to be ignored that need to be understood </td></tr>

+<tr><td align="right"><i>SOAP_NAMESPACE</i> </td><td>Namespace name mismatch (validation error) </td></tr>

+<tr><td align="right"><i>SOAP_OBJ_MISMATCH</i> </td><td>Mismatch in the size and/or shape of an object </td></tr>

+<tr><td align="right"><i>SOAP_FATAL_ERROR</i> </td><td>Internal error </td></tr>

+<tr><td align="right"><i>SOAP_FAULT</i> </td><td>An exception raised by the service </td></tr>

+<tr><td align="right"><i>SOAP_NO_METHOD</i> </td><td>Skeleton error: the skeleton cannot serve the method </td></tr>

+<tr><td align="right"><i>SOAP_GET_METHOD</i> </td><td>Unsupported HTTP GET </td></tr>

+<tr><td align="right"><i>SOAP_EOM</i> </td><td>Out of memory </td></tr>

+<tr><td align="right"><i>SOAP_NULL</i> </td><td>An element was null, while it is not supposed to be null </td></tr>

+<tr><td align="right"><i>SOAP_MULTI_ID</i> </td><td>Multiple occurrences of the same element ID on the input </td></tr>

+<tr><td align="right"><i>SOAP_MISSING_ID</i> </td><td>Element ID missing for an HREF on the input </td></tr>

+<tr><td align="right"><i>SOAP_HREF</i> </td><td>Reference to object is incompatible with the object refered to </td></tr>

+<tr><td align="right"><i>SOAP_UDP_ERROR</i> </td><td>Message too large to store in UDP packet </td></tr>

+<tr><td align="right"><i>SOAP_TCP_ERROR</i> </td><td>A connection error occured </td></tr>

+<tr><td align="right"><i>SOAP_HTTP_ERROR</i> </td><td>An HTTP error occured </td></tr>

+<tr><td align="right"><i>SOAP_SSL_ERROR</i> </td><td>An SSL error occured </td></tr>

+<tr><td align="right"><i>SOAP_ZLIB_ERROR</i> </td><td>A Zlib error occured </td></tr>

+<tr><td align="right"><i>SOAP_PLUGIN_ERROR</i> </td><td>Failed to register plugin </td></tr>

+<tr><td align="right"><i>SOAP_MIME_ERROR</i> </td><td>MIME parsing error </td></tr>

+<tr><td align="right"><i>SOAP_DIME_ERROR</i> </td><td>DIME parsing error </td></tr>

+<tr><td align="right"><i>SOAP_DIME_END</i> </td><td>End of DIME error </td></tr>

+<tr><td align="right"><i>SOAP_DIME_HREF</i> </td><td>DIME attachment has no href from SOAP body </td></tr>

+<tr><td align="right"></td><td>(and no DIME callbacks were defined to save the attachment) </td></tr>

+<tr><td align="right"><i>SOAP_DIME_MISMATCH</i> </td><td>DIME version/transmission error </td></tr>

+<tr><td align="right"><i>SOAP_VERSIONMISMATCH</i>* </td><td>SOAP version mismatch or no SOAP message </td></tr>

+<tr><td align="right"><i>SOAP_DATAENCODINGUNKNOWN</i> </td><td>SOAP 1.2 DataEncodingUnknown fault </td></tr>

+<tr><td align="right"><i>SOAP_REQUIRED</i> </td><td>Attributed required validation error </td></tr>

+<tr><td align="right"><i>SOAP_PROHIBITED</i> </td><td>Attributed prohibited validation error </td></tr>

+<tr><td align="right"><i>SOAP_OCCURS</i> </td><td>Element minOccurs/maxOccurs validation error </td></tr>

+<tr><td align="right"><i>SOAP_LENGTH</i> </td><td>Element length validation error </td></tr>

+<tr><td align="right"><i>SOAP_EOF</i> </td><td>Unexpected end of file, no input, or timeout while receiving data </td></tr></table>

+

+</td></tr></table><br></span>

+The error codes that are returned by a stub routine (proxy) upon receiving a

+SOAP Fault from the server are marked (*).  The remaining error codes are

+generated by the proxy itself as a result of problems with a SOAP payload.  The

+error code is <i>SOAP_OK</i> when the remote method call was successful (the

+<i>SOAP_OK</i> predefined constant is guaranteed to be <i>0</i>).  The error

+code is also stored in <i>soap.error</i>, where <i>soap</i> is a variable that

+contains the current runtime environment. The function

+<i>soap_print_fault(<b>struct</b>&nbsp;soap *soap, FILE *fd)</i> can be called to

+display an error message on <i>fd</i> where current value of the

+<i>soap.error</i> variable is used by the function to display the error.  The

+function <i>soap_print_fault_location(<b>struct</b>&nbsp;soap *soap, FILE *fd)</i>

+prints the location of the error if the error is a result from parsing XML.

+

+<div class="p"><!----></div>

+A remote method implemented in a SOAP service MUST return an error code as the

+function's return value. <i>SOAP_OK</i> denotes success and <i>SOAP_FAULT</i>

+denotes an exception. The exception details can be assigned with the

+<i>soap_receiver_fault(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*faultstring,

+<b>const</b>&nbsp;<b>char</b>&nbsp;*detail)</i> which sets the strings

+<i>soap.fault</i><tt>-&gt;</tt><i>faultstring</i> and

+<i>soap.fault</i><tt>-&gt;</tt><i>detail</i> for SOAP 1.1, and

+<i>soap.fault</i><tt>-&gt;</tt><i>SOAP_ENV__Reason</i> and

+<i>soap.fault</i><tt>-&gt;</tt><i>SOAP_ENV__Detail</i> for SOAP 1.2, where

+<i>soap</i> is a variable that contains the current runtime environment, see

+Section&nbsp;<a href="#sec:fault">11</a>.

+A receiver error indicates that the service can't handle the request, but can possibly recover from the error.

+To return an unrecoverable error, use <i>soap_receiver_fault(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*faultstring,

+<b>const</b>&nbsp;<b>char</b>&nbsp;*detail)</i>.

+

+<div class="p"><!----></div>

+To return a HTTP error code a service method can simply return the HTTP error code number.

+For example, <i><b>return</b>&nbsp;404;</i> returns a "404 Not Found" HTTP error back to the client.  The <i>soap.error</i>

+is set to the HTTP error code at the client side.

+The HTTP 1.1 error codes are:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td align="right"><font color="#FF0000"><b>#</b></font> </td><td><font color="#FF0000"><b>Error</b></font> </td></tr>

+<tr><td align="right">201 </td><td>Created </td></tr>

+<tr><td align="right">202 </td><td>Accepted </td></tr>

+<tr><td align="right">203 </td><td>Non-Authoritative Information </td></tr>

+<tr><td align="right">204 </td><td>No Content </td></tr>

+<tr><td align="right">205 </td><td>Reset Content </td></tr>

+<tr><td align="right">206 </td><td>Partial Content </td></tr>

+<tr><td align="right">300 </td><td>Multiple Choices </td></tr>

+<tr><td align="right">301 </td><td>Moved Permanently </td></tr>

+<tr><td align="right">302 </td><td>Found </td></tr>

+<tr><td align="right">303 </td><td>See Other </td></tr>

+<tr><td align="right">304 </td><td>Not Modified </td></tr>

+<tr><td align="right">305 </td><td>Use Proxy </td></tr>

+<tr><td align="right">307 </td><td>Temporary Redirect </td></tr>

+<tr><td align="right">400 </td><td>Bad Request </td></tr>

+<tr><td align="right">401 </td><td>Unauthorized </td></tr>

+<tr><td align="right">402 </td><td>Payment Required </td></tr>

+<tr><td align="right">403 </td><td>Forbidden </td></tr>

+<tr><td align="right">404 </td><td>Not Found </td></tr>

+<tr><td align="right">405 </td><td>Method Not Allowed </td></tr>

+<tr><td align="right">406 </td><td>Not Acceptable </td></tr>

+<tr><td align="right">407 </td><td>Proxy Authentication Required </td></tr>

+<tr><td align="right">408 </td><td>Request Time-out </td></tr>

+<tr><td align="right">409 </td><td>Conflict </td></tr>

+<tr><td align="right">410 </td><td>Gone </td></tr>

+<tr><td align="right">411 </td><td>Length Required </td></tr>

+<tr><td align="right">412 </td><td>Precondition Failed </td></tr>

+<tr><td align="right">413 </td><td>Request Entity Too Large </td></tr>

+<tr><td align="right">414 </td><td>Request-URI Too Large </td></tr>

+<tr><td align="right">415 </td><td>Unsupported Media Type </td></tr>

+<tr><td align="right">416 </td><td>Requested range not satisfiable </td></tr>

+<tr><td align="right">417 </td><td>Expectation Failed </td></tr>

+<tr><td align="right">500 </td><td>Internal Server Error </td></tr>

+<tr><td align="right">501 </td><td>Not Implemented </td></tr>

+<tr><td align="right">502 </td><td>Bad Gateway </td></tr>

+<tr><td align="right">503 </td><td>Service Unavailable </td></tr>

+<tr><td align="right">504 </td><td>Gateway Time-out </td></tr>

+<tr><td align="right">505 </td><td>HTTP Version not supported </td></tr></table>

+

+</td></tr></table><br></span>

+The error codes are given for informational purposes only. The HTTP protocol requires the proper actions after an error is issued. gSOAP's HTTP 1.0/1.1 handling is automatic.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc9.3">

+9.3</a>&nbsp;&nbsp;<font color="#0000FF">C/C++ Identifier Name to XML Name Translations</font></h3><a name="sec:idtrans">

+</a>

+

+<div class="p"><!----></div>

+One of the "secrets" behind the power and flexibility of gSOAP's encoding and

+decoding of remote method names, class names, type identifiers, and struct or

+class fields is the ability to specify namespace prefixes with these names that

+are used to denote their encoding style. More specifically, a C/C++ identifier

+name of the form

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<font size="+1"><span class="roman">[</span></font>namespace_prefix__<font size="+1"><span class="roman">]</span></font>element_name

+</td></tr></table><br></i>

+will be encoded in XML as

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>element-name ...&#62;

+</td></tr></table><br></tt>

+The <b>underscore pair</b> (<i>__</i>) separates the namespace prefix from the

+element name.  Each namespace prefix has a namespace URI specified by a

+namespace mapping table&nbsp;<a href="#sec:nstable">9.4</a>, see also

+Section&nbsp;<a href="#sec:namespace">7.1.2</a>.  The namespace URI is a unique identification that

+can be associated with the remote methods and data types.  The namespace URI

+disambiguates potentially identical remote method names and data type names

+used by disparate organizations.

+

+<div class="p"><!----></div>

+XML element names are NCNames (restricted strings) that MAY contain <b>

+hyphens</b>, <b>dots</b>, and <b>underscores</b>.  The special characters in the XML

+element names of remote methods, structs, classes, typedefs, and fields can be

+controlled using the following conventions: A <b>single underscore</b> in a

+namespace prefix or identifier name is replaced by a hyphen (<tt>-</tt>) in the

+XML element name.  For example, the identifier name <i>SOAP_ENC__ur_type</i>

+is represented in XML as <tt>SOAP-ENC:ur-type</tt>.  The sequence <i>_DOT</i> is

+replaced by a dot (<tt>.</tt>), and the sequence <i>_USCORE</i> is replaced by

+an underscore (<tt>_</tt>) in the corresponding XML element name.  For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>class</b>&nbsp;n_s__biz_DOTcom <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*n_s__biz_USCOREname; <br />

+};

+</td></tr></table><br></i>

+is encoded in XML as:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;n-s:biz.com xsi:type="n-s:biz.com"&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;n-s:biz_name xsi:type="string"&#62;Bizybiz&lt;/n-s:biz_name&#62; <br />

+&lt;/n-s:biz.com&#62;

+</td></tr></table><br></tt>

+Trailing underscores of an identifier name are not translated into the XML

+representation. This is useful when an identifier name clashes with a C++

+keyword. For example, <tt>return</tt> is often used as an accessor name in a SOAP

+response element.  The <tt>return</tt> element can be specified as <i>return_</i>

+in the C++ source code. Note that XML should be treated as case sensitive, so

+the use of e.g. <i>Return</i> may not always work to avoid a name clash with the

+<i><b>return</b></i> keyword.  The use of trailing underscores also allows for

+defining <i><b>struct</b></i>s and <i><b>class</b></i>es with essentially the same XML Schema

+type name, but that have to be distinguished as seperate C/C++ types.

+

+<div class="p"><!----></div>

+For decoding, the underscores in identifier names act as wildcards. An XML

+element is parsed and matches the name of an identifier if the name is

+identical to the element name (case insensitive) and the underscores in the

+identifier name are allowed to match any character in the element name. For

+example, the identifier name <i>I_want__soap_fun_the_bea___DOTcom</i>

+matches the element name <tt>I-want:SOAP4fun@the-beach.com</tt>.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc9.4">

+9.4</a>&nbsp;&nbsp;<font color="#0000FF">Namespace Mapping Table</font></h3><a name="sec:nstable">

+</a>

+

+<div class="p"><!----></div>

+A namespace mapping table MUST be defined by clients and service applications.

+The mapping table is used by the serializers and deserializers of the stub and

+skeleton routines to produce a valid SOAP payload and to validate an incoming

+SOAP payload.  A typical mapping table is shown below:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;Namespace namespaces[] = <br />

+{&nbsp;&nbsp;&nbsp;// {"ns-prefix", "ns-name"} <br />

+&nbsp;&nbsp;&nbsp;{"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"}, // MUST be first <br />

+&nbsp;&nbsp;&nbsp;{"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/"}, // MUST be second <br />

+&nbsp;&nbsp;&nbsp;{"xsi",      "http://www.w3.org/2001/XMLSchema-instance"}, // MUST be third <br />

+&nbsp;&nbsp;&nbsp;{"xsd",      "http://www.w3.org/2001/XMLSchema"}, // Required for XML Schema types <br />

+&nbsp;&nbsp;&nbsp;{"ns1",      "urn:my-service-URI"}, // The namespace URI of the remote methods <br />

+&nbsp;&nbsp;&nbsp;{NULL, NULL} // end of table <br />

+}; <br />

+</td></tr></table><br></i>

+Each namespace prefix used by a identifier name in the header file

+specification (see Section&nbsp;<a href="#sec:idtrans">9.3</a>) MUST have a binding to a

+namespace URI in the mapping table. The end of the namespace mapping table MUST

+be indicated by the <i>NULL</i> pair.  The namespace URI matching is case

+insensitive. A namespace prefix is distinguished by the occurrence of a pair

+of underscores (<i>__</i>) in an identifier.

+

+<div class="p"><!----></div>

+An optional namespace pattern MAY be provided with each namespace mapping table

+entry.  The patterns provide an alternative namespace matching for the

+validation of decoded SOAP messages.  In this pattern, dashes (<i>-</i>) are

+single-character wildcards and asterisks (<i>*</i>) are multi-character

+wildcards.  For example, to decode different versions of XML Schema type with

+different authoring dates, four dashes can be used in place of the specific

+dates in the namespace mapping table pattern:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;Namespace namespaces[] = <br />

+{&nbsp;&nbsp;&nbsp;// {"ns-prefix", "ns-name", "ns-name validation pattern"} <br />

+... <br />

+&nbsp;&nbsp;&nbsp;{"xsi",      "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/<tt>----</tt>/XMLSchema-instance"}, <br />

+&nbsp;&nbsp;&nbsp;{"xsd",      "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/<tt>----</tt>/XMLSchema"}, <br />

+...

+</td></tr></table><br></i>

+Or alternatively, asterisks can be used as wildcards for multiple characters:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;Namespace namespaces[] = <br />

+{&nbsp;&nbsp;&nbsp;// {"ns-prefix", "ns-name", "ns-name validation pattern"} <br />

+... <br />

+&nbsp;&nbsp;&nbsp;{"xsi",      "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance"}, <br />

+&nbsp;&nbsp;&nbsp;{"xsd",      "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema"}, <br />

+...

+</td></tr></table><br></i>

+A namespace mapping table is automatically generated together with a WSDL file

+for each namespace prefix that is used for a remote method in the header file.

+This namespace mapping table has entries for all namespace prefixes.  The

+namespace URIs need to be filled in. These appear as <i>http://tempuri.org</i>

+in the table.  See Section&nbsp;<a href="#sec:directives">18.2</a> on how to specify the namespace

+URIs in the header file.

+

+<div class="p"><!----></div>

+For decoding elements with namespace prefixes, the namespace URI associated with the namespace prefix (through the <tt>xmlns</tt>

+attribute of an XML element) is searched from the

+beginning to the end in a namespace mapping table,

+and for every row the following tests are performed as part of the validation process:

+

+<ol type="1">

+<li> the string in the second column matches the namespace URI (case insensitive)

+<div class="p"><!----></div>

+</li>

+

+<li> the string in the optional third column matches the namespace URI (case insensitive), where <i>-</i> is a one-character wildcard and <i>*</i> is a

+   multi-character wildcard

+<div class="p"><!----></div>

+</li>

+</ol>

+When a match is found, the namespace prefix in the first column of the table is considered semantically identical to the namespace prefix used

+by the XML element to be decoded, though the prefix names may differ.

+A service will respond with the namespace that it received from a client in case it matches a pattern in the third column.

+

+<div class="p"><!----></div>

+For example, let's say we have the following structs:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;a__elt { ... }; <br />

+<b>struct</b>&nbsp;b__elt { ... }; <br />

+<b>struct</b>&nbsp;k__elt { ... }; <br />

+</td></tr></table><br></i>

+and a namespace mapping table in the program:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;Namespace namespaces[] = <br />

+{&nbsp;&nbsp;&nbsp;// {"ns-prefix", "ns-name", "ns-name validation pattern"} <br />

+... <br />

+&nbsp;&nbsp;&nbsp;{"a", "some uri"}, <br />

+&nbsp;&nbsp;&nbsp;{"b", "other uri"}, <br />

+&nbsp;&nbsp;&nbsp;{"c", "his uri", "* uri"}, <br />

+...

+</td></tr></table><br></i>

+Then, the following XML elements will match the structs:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;n:elt xmlns:n="some URI"&#62; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;matches the struct name <i>a__elt</i> <br />

+... <br />

+&lt;m:elt xmlns:m="other URI"&#62; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;matches the struct name <i>b__elt</i> <br />

+... <br />

+&lt;k:elt xmlns:k="my URI"&#62; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;matches the struct name <i>c__elt</i> <br />

+... <br />

+</td></tr></table><br></tt>

+The response of a service to a client request that uses the namespaces listed above,

+will include <tt>my URI</tt> for the name space of element <tt>k</tt>.

+

+<div class="p"><!----></div>

+It is possible to use a number of different namespace tables and select the one that is appropriate.

+For example, an application might contact many different Web services all using different namespace URIs.

+If all the URIs are stored in one table, each remote method invocation will dump the whole namespace

+table in the SOAP payload.  There is no technical problem with that, but it can be ugly when the table is large.

+To use different namespace tables, declare a pointer to a table and set the pointer to a particular table before remote method

+invocation.  For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;Namespace namespacesTable1[] = { ... }; <br />

+<b>struct</b>&nbsp;Namespace namespacesTable2[] = { ... }; <br />

+<b>struct</b>&nbsp;Namespace namespacesTable3[] = { ... }; <br />

+<b>struct</b>&nbsp;Namespace *namespaces; <br />

+... <br />

+<b>struct</b>&nbsp;soap soap; <br />

+... <br />

+soap_init(&amp;soap); <br />

+soap_set_namespaces(&amp;soap, namespaceTable1); <br />

+soap_call_remote_method(&amp;soap, URL, Action, ...); <br />

+...

+</td></tr></table><br></i> 

+

+<div class="p"><!----></div>

+ <h2><a name="tth_sEc10">

+10</a>&nbsp;&nbsp;<font color="#0000FF">gSOAP Serialization and Deserialization Rules</font></h2>

+

+<div class="p"><!----></div>

+This section describes the serialization and deserialization of C and C++ data types for SOAP 1.1 and 1.2 compliant encoding and decoding.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc10.1">

+10.1</a>&nbsp;&nbsp;<font color="#0000FF">Primitive Type Encoding</font></h3>

+

+<div class="p"><!----></div>

+The default encoding rules for the primitive C and C++ data types are given in the table below:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td><font color="#FF0000"><b>Type</b></font> </td><td><font color="#FF0000"><b>XSD Type</b></font> </td></tr>

+<tr><td><i><b>bool</b></i> </td><td><tt>boolean</tt> </td></tr>

+<tr><td><i><b>char</b>*</i> (C string) </td><td><tt>string</tt> </td></tr>

+<tr><td><i><b>char</b></i> </td><td><tt>byte</tt> </td></tr>

+<tr><td><i><b>double</b></i> </td><td><tt>double</tt> </td></tr>

+<tr><td><i><b>float</b></i> </td><td><tt>float</tt> </td></tr>

+<tr><td><i><b>int</b></i> </td><td><tt>int</tt> </td></tr>

+<tr><td><i><b>long</b></i> </td><td><tt>long</tt> </td></tr>

+<tr><td><i>LONG64</i> </td><td><tt>long</tt> </td></tr>

+<tr><td><i><b>long</b>&nbsp;<b>long</b></i> </td><td><tt>long</tt> </td></tr>

+<tr><td><i><b>short</b></i> </td><td><tt>short</tt> </td></tr>

+<tr><td><i>time_t</i> </td><td><tt>dateTime</tt> </td></tr>

+<tr><td><i><b>unsigned</b>&nbsp;<b>char</b></i> </td><td><tt>unsignedByte</tt> </td></tr>

+<tr><td><i><b>unsigned</b>&nbsp;<b>int</b></i> </td><td><tt>unsignedInt</tt> </td></tr>

+<tr><td><i><b>unsigned</b>&nbsp;<b>long</b></i> </td><td><tt>unsignedLong</tt> </td></tr>

+<tr><td><i>ULONG64</i> </td><td><tt>unsignedLong</tt> </td></tr>

+<tr><td><i><b>unsigned</b>&nbsp;<b>long</b>&nbsp;<b>long</b></i> </td><td><tt>unsignedLong</tt> </td></tr>

+<tr><td><i><b>unsigned</b>&nbsp;<b>short</b></i> </td><td><tt>unsignedShort</tt> </td></tr>

+<tr><td><i>wchar_t*</i> </td><td><tt>string</tt> </td></tr></table>

+

+</td></tr></table><br></span>

+Objects of type <i><b>void</b></i> and <i><b>void</b>*</i> cannot be encoded.

+Enumerations and bit masks are supported as well, see&nbsp;<a href="#sec:enum">10.3</a>.

+

+<div class="p"><!----></div>

+		     <h3><a name="tth_sEc10.2">

+10.2</a>&nbsp;&nbsp;<font color="#0000FF">How to Encode and Decode Primitive Types as XSD Types</font></h3><a name="sec:primitive">

+</a>

+

+<div class="p"><!----></div>

+By default, encoding of the primitive types will take place as per SOAP

+encoding style.  The encoding can be changed to any XML Schema type (XSD type) with an

+optional namespace prefix by using a <i><b>typedef</b></i> in the header file input to

+the gSOAP stub and skeleton compiler. The declaration enables the

+implementation of built-in XML Schema types (also known as XSD types) such as

+<tt>positiveInteger</tt>, <tt>xsd:anyURI</tt>, and <tt>xsd:date</tt> for which no

+built-in data structures in C and C++ exist but which can be represented using

+standard data structures such as strings, integers, and floats.

+

+<div class="p"><!----></div>

+The <i><b>typedef</b></i> declaration is frequently used for convenience in C. A

+<i><b>typedef</b></i> declares a type name for a (complex) type expression. The type

+name can then be used in other declarations in place of the more complex type

+expression, which often improves the readability of the program code.

+

+<div class="p"><!----></div>

+The gSOAP compiler interprets <i><b>typedef</b></i> declarations the same way as a

+regular C compiler interprets them, i.e.&nbsp;as types in declarations. In addition

+however, the gSOAP compiler will also use the type name in the encoding of the

+data in SOAP.  The <i><b>typedef</b></i> name will appear as the XML element name of

+an independent element and as the value of the <tt>xsi:type</tt> attribute in the

+SOAP payload.

+

+<div class="p"><!----></div>

+Many built-in primitive and derived XSD types such as <tt>xsd:anyURI</tt>,

+<tt>positiveInteger</tt>, and <tt>decimal</tt> can be stored by standard primitive

+data structures in C++ as well such as strings, integers, floats, and doubles.

+To serialize strings, integers, floats, and doubles as built-in primitive and

+derived XSD types. To this end, a <i><b>typedef</b></i> declaration can be used

+to declare an XSD type.

+

+<div class="p"><!----></div>

+For example, the declaration

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>unsigned</b>&nbsp;<b>int</b>&nbsp;xsd__positiveInteger;

+</td></tr></table><br></i>

+creates a named type <i>positiveInteger</i> which is represented by <i><b>unsigned</b>&nbsp;<b>int</b></i> in C++. For example, the encoding of a

+<i>positiveInteger</i> value <i>3</i> is

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;positiveInteger xsi:type="xsd:positiveInteger"&#62;3&lt;/positiveInteger&#62;

+</td></tr></table><br></tt>

+The built-in XML Schema datatype hierarchy from the XML Schema Part 2 documentation <a href="http://www.w3.org/TR/xmlschema-2"><tt>http://www.w3.org/TR/xmlschema-2</tt></a> is depicted below.

+

+<div class="p"><!----></div>

+<a name="tth_fIg1">

+</a> 

+<center><img src="http://www.w3.org/TR/xmlschema-2/type-hierarchy.gif"/>

+</center>

+

+<center>Figure 1: Built-in Datatype Hierarchy</center>

+

+<div class="p"><!----></div>

+The built-in primitive and derived numerical XML Schema types are listed below together with their recommended <i><b>typedef</b></i>

+declarations. Note that the SOAP encoding schemas for primitive types are derived from the built-in XML Schema types, so

+<i>SOAP_ENC__</i> can be used as a namespace prefix instead of <i>xsd__</i>.

+

+<dl compact="compact">

+ <dt><b><tt>xsd:anyURI</tt></b></dt>

+	<dd>

+Represents a Uniform Resource Identifier Reference (URI).

+Each URI scheme imposes specialized syntax rules for URIs in that scheme, including restrictions

+on the syntax of allowed fragment identifiers.

+It is recommended to use strings to store <tt>xsd:anyURI</tt> XML Schema types. The recommended type declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__anyURI;

+</td></tr></table><br></i></dd>

+ <dt><b><tt>xsd:base64Binary</tt></b></dt>

+	<dd>

+Represents Base64-encoded arbitrary binary data.

+For using the <tt>xsd:base64Binary</tt> XSD Schema type, the use of the base64Binary representation of a dynamic array is <b>strongly</b> recommended,

+see Section&nbsp;<a href="#sec:base64binary">10.11</a>. However, the

+type can also be declared as a string and the encoding will be string-based:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__base64Binary;

+</td></tr></table><br></i>

+With this approach, it is solely the responsibility of the application to make sure the string content is according to the Base64 Content-Transfer-Encoding defined in Section 6.8 of RFC 2045.</dd>

+ <dt><b><tt>xsd:boolean</tt></b></dt>

+	<dd>

+For declaring an <tt>xsd:boolean</tt> XSD Schema type, the use of a bool is <b>strongly</b> recommended.

+If a pure C compiler is used that does not support the <i>bool</i> type, see Section&nbsp;<a href="#sec:boolean">10.3.5</a>.

+The corresponding type declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>bool</b>&nbsp;xsd__boolean;

+</td></tr></table><br></i>

+Type <i>xsd__boolean</i> declares a Boolean (0 or 1), which is encoded as

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;xsd:boolean xsi:type="xsd:boolean"&#62;...&lt;/xsd:boolean&#62;

+</td></tr></table><br></tt></dd>

+ <dt><b><tt>xsd:byte</tt></b></dt>

+	<dd>

+Represents a byte (-128...127). The corresponding type declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;xsd__byte;

+</td></tr></table><br></i>

+Type <i>xsd__byte</i> declares a byte which is encoded as 

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;xsd:byte xsi:type="xsd:byte"&#62;...&lt;/xsd:byte&#62;

+</td></tr></table><br></tt></dd>

+ <dt><b><tt>xsd:dateTime</tt></b></dt>

+	<dd>

+Represents a date and time. The lexical representation is according to the ISO 8601 extended format CCYY-MM-DDThh:mm:ss where "CC"

+represents the century, "YY" the year, "MM" the month and "DD" the day, preceded by an optional leading "-" sign to indicate a

+negative number. If the sign is omitted, "+" is assumed. The letter "T" is the date/time separator and "hh", "mm", "ss" represent

+hour, minute and second respectively.

+It is recommended to use the <i>time_t</i> type to store <tt>xsd:dateTime</tt> XSD Schema types and the type declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;time_t xsd__dateTime;

+</td></tr></table><br></i>

+However, note that calendar times  before  the year 1902  or after

+the year 2037 cannot be represented. Upon receiving a date outside this range,

+the <i>time_t</i> value will be set to -1.

+

+<div class="p"><!----></div>

+Strings (<i><b>char</b>*</i>) can be used to store <tt>xsd:dateTime</tt> XSD Schema types. The type declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__dateTime;

+</td></tr></table><br></i>

+In this case, it is up to the application to read and set the dateTime representation.</dd>

+ <dt><b><tt>xsd:date</tt></b></dt>

+	<dd>

+Represents a date.

+The lexical representation for date is the reduced (right truncated) lexical representation for dateTime: CCYY-MM-DD.

+It is recommended to use strings (<i><b>char</b>*</i>) to store <tt>xsd:date</tt> XSD Schema types. The type declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__date;

+</td></tr></table><br></i></dd>

+ <dt><b><tt>xsd:decimal</tt></b></dt>

+	<dd>

+Represents arbitrary precision decimal numbers.

+It is recommended to use the <b>double</b> type to store <tt>xsd:decimal</tt> XSD Schema types and the type declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>double</b>&nbsp;xsd__decimal;

+</td></tr></table><br></i>

+Type <i>xsd__decimal</i> declares a double floating point number which is encoded as 

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;xsd:double xsi:type="xsd:decimal"&#62;...&lt;/xsd:double&#62;

+</td></tr></table><br></tt></dd>

+ <dt><b><tt>xsd:double</tt></b></dt>

+	<dd>

+Corresponds to the IEEE double-precision 64-bit floating point type. The type declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>double</b>&nbsp;xsd__double;

+</td></tr></table><br></i>

+Type <i>xsd__double</i> declares a double floating point number which is encoded as 

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;xsd:double xsi:type="xsd:double"&#62;...&lt;/xsd:double&#62;

+</td></tr></table><br></tt></dd>

+ <dt><b><tt>xsd:duration</tt></b></dt>

+	<dd>

+Represents a duration of time.

+The lexical representation for duration is the ISO 8601 extended format PnYn MnDTnH nMnS, where nY represents

+the number of years, nM the number of months, nD the number of days, T is the date/time separator, nH the number of

+hours, nM the number of minutes and nS the number of seconds. The number of seconds can include decimal digits to

+arbitrary precision.

+It is recommended to use strings (<i><b>char</b>*</i>) to store <tt>xsd:duration</tt> XSD Schema types. The type declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__duration;

+</td></tr></table><br></i></dd>

+ <dt><b><tt>xsd:float</tt></b></dt>

+	<dd>

+Corresponds to the IEEE single-precision 32-bit floating point type. The type declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>float</b>&nbsp;xsd__float;

+</td></tr></table><br></i>

+Type <i>xsd__float</i> declares a floating point number which is encoded as 

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;xsd:float xsi:type="xsd:float"&#62;...&lt;/xsd:float&#62;

+</td></tr></table><br></tt></dd>

+ <dt><b><tt>xsd:hexBinary</tt></b></dt>

+	<dd>

+Represents arbitrary hex-encoded binary data.  It has a lexical representation where each binary octet is encoded as a character

+tuple, consisting of two hexadecimal digits ([0-9a-fA-F]) representing the octet code. For example, "0FB7" is a hex encoding for

+the 16-bit integer 4023 (whose binary representation is 111110110111.

+For using the <tt>xsd:hexBinary</tt> XSD Schema type, the use of the hexBinary representation of a dynamic array is <b>strongly</b> recommended,

+see Section&nbsp;<a href="#sec:hexbinary">10.12</a>. However, the

+type can also be declared as a string and the encoding will be string-based:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__hexBinary;

+</td></tr></table><br></i>

+With this approach, it is solely the responsibility of the application to make sure the string content consists of a sequence of octets.</dd>

+ <dt><b><tt>xsd:int</tt></b></dt>

+	<dd>

+Corresponds to a 32-bit integer in the range -2147483648 to 2147483647.

+If the C++ compiler supports 32-bit <i><b>int</b></i> types, the type declaration can use the <i><b>int</b></i> type:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>int</b>&nbsp;xsd__int;

+</td></tr></table><br></i>

+Otherwise, the C++ compiler supports 16-bit <i><b>int</b></i> types and the type declaration should use the <i><b>long</b></i> type:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>long</b>&nbsp;xsd__int;

+</td></tr></table><br></i>

+Type <i>xsd__int</i> declares a 32-bit integer which is encoded as 

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;xsd:int xsi:type="xsd:int"&#62;...&lt;/xsd:int&#62;

+</td></tr></table><br></tt></dd>

+ <dt><b><tt>xsd:integer</tt></b></dt>

+	<dd>

+Corresponds to an unbounded integer.

+Since C++ does not support unbounded integers as a standard feature, the recommended type declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>long</b>&nbsp;<b>long</b>&nbsp;xsd__integer;

+</td></tr></table><br></i>

+Type <i>xsd__integer</i> declares a 64-bit integer which is encoded as an unbounded <tt>xsd:integer</tt>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;xsd:integer xsi:type="xsd:integer"&#62;...&lt;/xsd:integer&#62;

+</td></tr></table><br></tt>

+Another possibility is to use strings to represent unbounded integers and do the translation in code.</dd>

+ <dt><b><tt>xsd:long</tt></b></dt>

+	<dd>

+Corresponds to a 64-bit integer in the range -9223372036854775808 to 9223372036854775807.

+The type declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>long</b>&nbsp;<b>long</b>&nbsp;xsd__long;

+</td></tr></table><br></i>

+Or in Visual C++:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;LONG64 xsd__long;

+</td></tr></table><br></i>

+Type <i>xsd__long</i> declares a 64-bit integer which is encoded as 

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;xsd:long xsi:type="xsd:long"&#62;...&lt;/xsd:long&#62;

+</td></tr></table><br></tt></dd>

+ <dt><b><tt>xsd:negativeInteger</tt></b></dt>

+	<dd>

+Corresponds to a negative unbounded integer ( &lt; 0).

+Since C++ does not support unbounded integers as a standard feature, the recommended type declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>long</b>&nbsp;<b>long</b>&nbsp;xsd__negativeInteger;

+</td></tr></table><br></i>

+Type <i>xsd__negativeInteger</i> declares a 64-bit integer which is encoded as a <tt>xsd:negativeInteger</tt>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;xsd:negativeInteger xsi:type="xsd:negativeInteger"&#62;...&lt;/xsd:negativeInteger&#62;

+</td></tr></table><br></tt>

+Another possibility is to use strings to represent unbounded integers and do the translation in code.</dd>

+ <dt><b><tt>xsd:nonNegativeInteger</tt></b></dt>

+	<dd>

+Corresponds to a non-negative unbounded integer ( &gt; 0).

+Since C++ does not support unbounded integers as a standard feature, the recommended type declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>unsigned</b>&nbsp;<b>long</b>&nbsp;<b>long</b>&nbsp;xsd__nonNegativeInteger;

+</td></tr></table><br></i>

+Type <i>xsd__nonNegativeInteger</i> declares a 64-bit unsigned integer which is encoded as a non-negative unbounded <tt>xsd:nonNegativeInteger</tt>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;xsd:nonNegativeInteger xsi:type="xsd:nonNegativeInteger"&#62;...&lt;/xsd:nonNegativeInteger&#62;

+</td></tr></table><br></tt>

+Another possibility is to use strings to represent unbounded integers and do the translation in code.</dd>

+ <dt><b><tt>xsd:nonPositiveInteger</tt></b></dt>

+	<dd>

+Corresponds to a non-positive unbounded integer ( <font face="symbol">£</font

+> 0).

+Since C++ does not support unbounded integers as a standard feature, the recommended type declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>long</b>&nbsp;<b>long</b>&nbsp;xsd__nonPositiveInteger;

+</td></tr></table><br></i>

+Type <i>xsd__nonPositiveInteger</i> declares a 64-bit integer which is encoded as a <tt>xsd:nonPositiveInteger</tt>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;xsd:nonPositiveInteger xsi:type="xsd:nonPositiveInteger"&#62;...&lt;/xsd:nonPositiveInteger&#62;

+</td></tr></table><br></tt>

+Another possibility is to use strings to represent unbounded integers and do the translation in code.</dd>

+ <dt><b><tt>xsd:normalizedString</tt></b></dt>

+	<dd>

+Represents normalized character strings.

+Normalized character strings do not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters.

+It is recommended to use strings to store <tt>xsd:normalizeString</tt> XSD Schema types.

+The type declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__normalizedString;

+</td></tr></table><br></i>

+Type <i>xsd__normalizedString</i> declares a string type which is encoded as 

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;xsd:normalizedString xsi:type="xsd:normalizedString"&#62;...&lt;/xsd:normalizedString&#62;

+</td></tr></table><br></tt>

+It is solely the responsibility of the application to make sure the strings do not contain carriage return (#xD), line feed (#xA)

+and tab (#x9) characters.</dd>

+ <dt><b><tt>xsd:positiveInteger</tt></b></dt>

+	<dd>

+Corresponds to a positive unbounded integer ( <font face="symbol">³</font

+> 0).

+Since C++ does not support unbounded integers as a standard feature, the recommended type declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>unsigned</b>&nbsp;<b>long</b>&nbsp;<b>long</b>&nbsp;xsd__positiveInteger;

+</td></tr></table><br></i>

+Type <i>xsd__positiveInteger</i> declares a 64-bit unsigned integer which is encoded as a <tt>xsd:positiveInteger</tt>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;xsd:positiveInteger xsi:type="xsd:positiveInteger"&#62;...&lt;/xsd:positiveInteger&#62;

+</td></tr></table><br></tt>

+Another possibility is to use strings to represent unbounded integers and do the translation in code.</dd>

+ <dt><b><tt>xsd:short</tt></b></dt>

+	<dd>

+Corresponds to a 16-bit integer in the range -32768 to 32767.

+The type declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>short</b>&nbsp;xsd__short;

+</td></tr></table><br></i>

+Type <i>xsd__short</i> declares a short 16-bit integer which is encoded as 

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;xsd:short xsi:type="xsd:short"&#62;...&lt;/xsd:short&#62;

+</td></tr></table><br></tt></dd>

+ <dt><b><tt>xsd:string</tt></b></dt>

+	<dd>

+Represents character strings. The type declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__string;

+</td></tr></table><br></i>

+Type <i>xsd__string</i> declares a string type which is encoded as 

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;xsd:string xsi:type="xsd:string"&#62;...&lt;/xsd:string&#62;

+</td></tr></table><br></tt>

+The type declaration for wide character strings is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;wchar_t *xsd__string;

+</td></tr></table><br></i>

+Both type of strings can be used at the same time, but requires one typedef name to be changed by appending an underscore which is

+invisible in XML. For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;wchar_t *xsd__string_;

+</td></tr></table><br></i></dd>

+ <dt><b><tt>xsd:time</tt></b></dt>

+	<dd>

+Represents a time.  The lexical representation for time is the left truncated lexical representation for dateTime: hh:mm:ss.sss

+with optional following time zone indicator.

+It is recommended to use strings (<i><b>char</b>*</i>) to store <tt>xsd:time</tt> XSD Schema types. The type declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__time;

+</td></tr></table><br></i></dd>

+ <dt><b><tt>xsd:token</tt></b></dt>

+	<dd>

+Represents tokenized strings.

+Tokens are strings that do not contain the

+line feed (#xA) nor tab (#x9) characters, that have no leading or trailing spaces (#x20) and that have no internal

+sequences of two or more spaces.

+It is recommended to use strings to store <tt>xsd:token</tt> XSD Schema types.

+The type declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__token;

+</td></tr></table><br></i>

+Type <i>xsd__token</i> declares a string type which is encoded as 

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;xsd:token xsi:type="xsd:token"&#62;...&lt;/xsd:token&#62;

+</td></tr></table><br></tt>

+It is solely the responsibility of the application to make sure the strings do not contain the line feed (#xA) nor tab (#x9)

+characters, that have no leading or trailing spaces (#x20) and that have no internal sequences of two or more spaces.</dd>

+ <dt><b><tt>xsd:unsignedByte</tt></b></dt>

+	<dd>

+Corresponds to an 8-bit unsigned integer in the range 0 to 255.

+The type declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>unsigned</b>&nbsp;<b>char</b>&nbsp;xsd__unsignedByte;

+</td></tr></table><br></i>

+Type <i>xsd__unsignedByte</i> declares a unsigned 8-bit integer which is encoded as 

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;xsd:unsignedByte xsi:type="xsd:unsignedByte"&#62;...&lt;/xsd:unsignedByte&#62;

+</td></tr></table><br></tt></dd>

+ <dt><b><tt>xsd:unsignedInt</tt></b></dt>

+	<dd>

+Corresponds to a 32-bit unsigned integer in the range 0 to 4294967295.

+If the C++ compiler supports 32-bit <i><b>int</b></i> types, the type declaration can use the <i><b>int</b></i> type:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>unsigned</b>&nbsp;<b>int</b>&nbsp;xsd__unsignedInt;

+</td></tr></table><br></i>

+Otherwise, the C++ compiler supports 16-bit <i><b>int</b></i> types and the type declaration should use the <i><b>long</b></i> type:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>unsigned</b>&nbsp;<b>long</b>&nbsp;xsd__unsignedInt;

+</td></tr></table><br></i>

+Type <i>xsd__unsignedInt</i> declares an unsigned 32-bit integer which is encoded as 

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;xsd:unsignedInt xsi:type="xsd:unsignedInt"&#62;...&lt;/xsd:unsignedInt&#62;

+</td></tr></table><br></tt></dd>

+ <dt><b><tt>xsd:unsignedLong</tt></b></dt>

+	<dd>

+Corresponds to a 64-bit unsigned integer in the range 0 to 18446744073709551615.

+The type declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>unsigned</b>&nbsp;<b>long</b>&nbsp;<b>long</b>&nbsp;xsd__unsignedLong;

+</td></tr></table><br></i>

+Or in Visual C++:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;ULONG64 xsd__unsignedLong;

+</td></tr></table><br></i>

+Type <i>xsd__unsignedLong</i> declares an unsigned 64-bit integer which is encoded as 

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;xsd:unsignedLong xsi:type="xsd:unsignedLong"&#62;...&lt;/xsd:unsignedLong&#62;

+</td></tr></table><br></tt></dd>

+ <dt><b><tt>xsd:unsignedShort</tt></b></dt>

+	<dd>

+Corresponds to a 16-bit unsigned integer in the range 0 to 65535.

+The type declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>unsigned</b>&nbsp;<b>short</b>&nbsp;xsd__unsignedShort;

+</td></tr></table><br></i>

+Type <i>xsd__unsginedShort</i> declares an unsigned short 16-bit integer which is encoded as 

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;xsd:unsignedShort xsi:type="xsd:unsignedShort"&#62;...&lt;/xsd:unsignedShort&#62;

+</td></tr></table><br></tt></dd>

+</dl>

+Other XSD Schema types such as <tt>gYearMonth</tt>, <tt>gYear</tt>, <tt>gMonthDay</tt>, <tt>gDay</tt>, <tt>xsd:gMonth</tt>, <tt>QName</tt>,

+<tt>NOTATION</tt>, etc., can be encoded similarly using a <i><b>typedef</b></i> declaration.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.2.1">

+10.2.1</a>&nbsp;&nbsp;<font color="#0000FF">How to Use Multiple C/C++ Types for a Single Primitive XSD Type</font></h4>

+

+<div class="p"><!----></div>

+Trailing underscores (see Section&nbsp;<a href="#sec:idtrans">9.3</a>) can be used in the type

+name in a <i><b>typedef</b></i> to enable the declaration of multiple storage formats

+for a single XML Schema type. For example, one part of a C/C++ application's

+data structure may use plain strings while another part may use wide character

+strings.  To enable this simultaneous use, declare:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__string; <br />

+<b>typedef</b>&nbsp;wchar_t *xsd__string_;

+</td></tr></table><br></i>

+Now, the <i>xsd__string</i> and <i>xsd__string_</i> types will both be encoded

+and decoded as XML string types and the use of trailing underscores allows

+multiple declarations for a single XML Schema type.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.2.2">

+10.2.2</a>&nbsp;&nbsp;<font color="#0000FF">How to use Wrapper Classes to Specify Polymorphic Primitive Types</font></h4><a name="sec:primclass">

+</a>

+

+<div class="p"><!----></div>

+SOAP 1.1 supports polymorphic types, because XSD Schema types form a hierarchy.

+The root of the hierarchy is called <tt>xsd:anyType</tt> (<tt>xsd:ur-type</tt> in the

+older 1999 schema).  So, for example, an array of <tt>xsd:anyType</tt> in SOAP may

+actually contain any mix of element types that are the derived types of the

+root type.  The use of polymorphic types is indicated by the WSDL and schema

+descriptions of a Web service and can therefore be predicted/expected for each

+particular case.

+

+<div class="p"><!----></div>

+On the one hand, the <i><b>typedef</b></i> construct provides a convenient way to

+associate C/C++ types with XML Schema types and makes it easy to incorporate

+these types in a (legacy) C/C++ application.  However, on the other hand the

+<i><b>typedef</b></i> declarations cannot be used to support polymorphic XML Schema

+types.  Most SOAP clients and services do not use polymorphic types.  In case

+they do, the primitive polymorphic types can be declared as a hierarchy of C++

+<i><b>class</b></i>es that can be used simultaneously with the <i><b>typedef</b></i>

+declarations.

+

+<div class="p"><!----></div>

+The general form of a primitive type declaration that is derived from a super type is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>class</b>&nbsp;xsd__type_name: <font size="+1"><span class="roman">[</span></font><b>public</b>&nbsp;xsd__super_type_name<font size="+1"><span class="roman">]</span></font> <br />

+{ <b>public</b>: <u><span class="roman">Type</span></u> __item; <br />

+&nbsp;&nbsp;&nbsp;<font size="+1"><span class="roman">[</span></font><b>public</b>:<font size="+1"><span class="roman">]</span></font> <font size="+1"><span class="roman">[</span></font><b>private</b><font size="+1"><span class="roman">]</span></font> <font size="+1"><span class="roman">[</span></font><b>protected</b>:<font size="+1"><span class="roman">]</span></font> <br />

+&nbsp;&nbsp;&nbsp;method1; <br />

+&nbsp;&nbsp;&nbsp;method2; <br />

+&nbsp;&nbsp;&nbsp;... <br />

+};

+</td></tr></table><br></i>

+where <u><span class="roman">Type</span></u> is a primitive C type. The <i>__item</i> field MUST be the first

+field in this wrapper class.

+

+<div class="p"><!----></div>

+For example, the XML Schema type hierarchy can be copied to C++ with the following declarations:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>class</b>&nbsp;xsd__anyType { }; <br />

+<b>class</b>&nbsp;xsd__anySimpleType: <b>public</b>&nbsp;xsd__anyType { }; <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__anyURI; <br />

+<b>class</b>&nbsp;xsd__anyURI_: <b>public</b>&nbsp;xsd__anySimpleType { <b>public</b>: xsd__anyURI __item; }; <br />

+<b>typedef</b>&nbsp;<b>bool</b>&nbsp;xsd__boolean; <br />

+<b>class</b>&nbsp;xsd__boolean_: <b>public</b>&nbsp;xsd__anySimpleType { <b>public</b>: xsd__boolean __item; }; <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__date; <br />

+<b>class</b>&nbsp;xsd__date_: <b>public</b>&nbsp;xsd__anySimpleType { <b>public</b>: xsd__date __item; }; <br />

+<b>typedef</b>&nbsp;time_t xsd__dateTime; <br />

+<b>class</b>&nbsp;xsd__dateTime_: <b>public</b>&nbsp;xsd__anySimpleType { <b>public</b>: xsd__dateTime __item; }; <br />

+<b>typedef</b>&nbsp;<b>double</b>&nbsp;xsd__double; <br />

+<b>class</b>&nbsp;xsd__double_: <b>public</b>&nbsp;xsd__anySimpleType { <b>public</b>: xsd__double __item; }; <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__duration; <br />

+<b>class</b>&nbsp;xsd__duration_: <b>public</b>&nbsp;xsd__anySimpleType { <b>public</b>: xsd__duration __item; }; <br />

+<b>typedef</b>&nbsp;<b>float</b>&nbsp;xsd__float; <br />

+<b>class</b>&nbsp;xsd__float_: <b>public</b>&nbsp;xsd__anySimpleType { <b>public</b>: xsd__float __item; }; <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__time; <br />

+<b>class</b>&nbsp;xsd__time_: <b>public</b>&nbsp;xsd__anySimpleType { <b>public</b>: xsd__time __item; }; <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__decimal; <br />

+<b>class</b>&nbsp;xsd__decimal_: <b>public</b>&nbsp;xsd__anySimpleType { <b>public</b>: xsd__decimal __item; }; <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__integer; <br />

+<b>class</b>&nbsp;xsd__integer_: <b>public</b>&nbsp;xsd__decimal_ { <b>public</b>: xsd__integer __item; }; <br />

+<b>typedef</b>&nbsp;LONG64 xsd__long; <br />

+<b>class</b>&nbsp;xsd__long_: <b>public</b>&nbsp;xsd__integer_ { <b>public</b>: xsd__long __item; }; <br />

+<b>typedef</b>&nbsp;<b>long</b>&nbsp;xsd__int; <br />

+<b>class</b>&nbsp;xsd__int_: <b>public</b>&nbsp;xsd__long_ { <b>public</b>: xsd__int __item; }; <br />

+<b>typedef</b>&nbsp;<b>short</b>&nbsp;xsd__short; <br />

+<b>class</b>&nbsp;xsd__short_: <b>public</b>&nbsp;xsd__int_ { <b>public</b>: xsd__short __item; }; <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;xsd__byte; <br />

+<b>class</b>&nbsp;xsd__byte_: <b>public</b>&nbsp;xsd__short_ { <b>public</b>: xsd__byte __item; }; <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__nonPositiveInteger; <br />

+<b>class</b>&nbsp;xsd__nonPositiveInteger_: <b>public</b>&nbsp;xsd__integer_ { <b>public</b>: xsd__nonPositiveInteger __item; }; <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__negativeInteger; <br />

+<b>class</b>&nbsp;xsd__negativeInteger_: <b>public</b>&nbsp;xsd__nonPositiveInteger_ { <b>public</b>: xsd__negativeInteger __item; }; <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__nonNegativeInteger; <br />

+<b>class</b>&nbsp;xsd__nonNegativeInteger_: <b>public</b>&nbsp;xsd__integer_ { <b>public</b>: xsd__nonNegativeInteger __item; }; <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__positiveInteger; <br />

+<b>class</b>&nbsp;xsd__positiveInteger_: <b>public</b>&nbsp;xsd__nonNegativeInteger_ { <b>public</b>: xsd__positiveInteger __item; }; <br />

+<b>typedef</b>&nbsp;ULONG64 xsd__unsignedLong; <br />

+<b>class</b>&nbsp;xsd__unsignedLong_: <b>public</b>&nbsp;xsd__nonNegativeInteger_ { <b>public</b>: xsd__unsignedLong __item; }; <br />

+<b>typedef</b>&nbsp;<b>unsigned</b>&nbsp;<b>long</b>&nbsp;xsd__unsignedInt; <br />

+<b>class</b>&nbsp;xsd__unsignedInt_: <b>public</b>&nbsp;xsd__unsginedLong_ { <b>public</b>: xsd__unsignedInt __item; }; <br />

+<b>typedef</b>&nbsp;<b>unsigned</b>&nbsp;<b>short</b>&nbsp;xsd__unsignedShort; <br />

+<b>class</b>&nbsp;xsd__unsignedShort_: <b>public</b>&nbsp;xsd__unsignedInt_ { <b>public</b>: xsd__unsignedShort __item; }; <br />

+<b>typedef</b>&nbsp;<b>unsigned</b>&nbsp;<b>char</b>&nbsp;xsd__unsignedByte; <br />

+<b>class</b>&nbsp;xsd__unsignedByte_: <b>public</b>&nbsp;xsd__unsignedShort_ { <b>public</b>: xsd__unsignedByte __item; }; <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__string; <br />

+<b>class</b>&nbsp;xsd__string_: <b>public</b>&nbsp;xsd__anySimpleType { <b>public</b>: xsd__string __item; }; <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__normalizedString; <br />

+<b>class</b>&nbsp;xsd__normalizedString_: <b>public</b>&nbsp;xsd__string_ { <b>public</b>: xsd__normalizedString __item; }; <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__token; <br />

+<b>class</b>&nbsp;xsd__token_: <b>public</b>&nbsp;xsd__normalizedString_ { <b>public</b>: xsd__token __item; }; <br />

+</td></tr></table><br></i>

+Note the use of the trailing underscores for the <i><b>class</b></i> names to distinguish the <i><b>typedef</b></i> type names from the

+<i><b>class</b></i> names.  Only the most frequently used built-in schema types are shown.

+It is also allowed to include the <i>xsd:base64Binary</i> and <i>xsd:hexBinary</i> types in the hierarchy:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>class</b>&nbsp;xsd__base64Binary: <b>public</b>&nbsp;xsd__anySimpleType { <b>public</b>: <b>unsigned</b>&nbsp;<b>char</b>&nbsp;*__ptr; <b>int</b>&nbsp;__size; }; <br />

+<b>class</b>&nbsp;xsd__hexBinary: <b>public</b>&nbsp;xsd__anySimpleType { <b>public</b>: <b>unsigned</b>&nbsp;<b>char</b>&nbsp;*__ptr; <b>int</b>&nbsp;__size; };

+</td></tr></table><br></i>

+See Sections&nbsp;<a href="#sec:base64binary">10.11</a> and&nbsp;<a href="#sec:hexbinary">10.12</a>.

+

+<div class="p"><!----></div>

+Methods are allowed to be added to the classes above, such as constructors and getter/setter methods, see Section&nbsp;<a href="#sec:gettersetter">10.5.4</a>.

+

+<div class="p"><!----></div>

+Wrapper structs are supported as well, similar to wrapper classes.  But they cannot be used

+to implement polymorphism.  Rather, the wrapper structs facilitate the use of XML attributes

+with a primitive typed object, see&nbsp;<a href="#sec:attributes">10.5.7</a>.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.2.3">

+10.2.3</a>&nbsp;&nbsp;<font color="#0000FF">XSD Schema Type Decoding Rules</font></h4>

+

+<div class="p"><!----></div>

+The decoding rules for the primitive C and C++ data types is given in the table below:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td><font color="#FF0000"><b>Type</b></font> </td><td><font color="#FF0000"><b>Allows Decoding of</b></font> </td><td><font color="#FF0000"><b>Precision Lost?</b></font> </td></tr>

+<tr><td><i><b>bool</b></i> </td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>boolean</tt> </td><td>no </td></tr>

+<tr><td><i><b>char</b>*</i> (C string) </td><td>any type, see&nbsp;<a href="#sec:smart">10.2.5</a> </td><td>no </td></tr>

+<tr><td><i>wchar_t *</i> (wide string) </td><td>any type, see&nbsp;<a href="#sec:smart">10.2.5</a> </td><td>no </td></tr>

+<tr><td></td></tr>

+<tr><td><i><b>double</b></i>	</td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>double</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>float</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>long</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>int</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>short</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>byte</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedLong</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedInt</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedShort</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedByte</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>decimal</tt> </td><td>possibly </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>integer</tt> </td><td>possibly </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>positiveInteger</tt> </td><td>possibly </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>negativeInteger</tt> </td><td>possibly </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>nonPositiveInteger</tt> </td><td>possibly </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>nonNegativeInteger</tt> </td><td>possibly </td></tr>

+<tr><td></td></tr>

+<tr><td><i><b>float</b></i>	</td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>float</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>long</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>int</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>short</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>byte</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedLong</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedInt</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedShort</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedByte</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>decimal</tt> </td><td>possibly </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>integer</tt> </td><td>possibly </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>positiveInteger</tt> </td><td>possibly </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>negativeInteger</tt> </td><td>possibly </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>nonPositiveInteger</tt> </td><td>possibly </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>nonNegativeInteger</tt> </td><td>possibly </td></tr>

+<tr><td></td></tr>

+<tr><td><i><b>long</b>&nbsp;<b>long</b></i> </td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>long</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>int</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>short</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>byte</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedLong</tt> </td><td>possibly </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedInt</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedShort</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedByte</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>integer</tt> </td><td>possibly </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>positiveInteger</tt> </td><td>possibly </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>negativeInteger</tt> </td><td>possibly </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>nonPositiveInteger</tt> </td><td>possibly </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>nonNegativeInteger</tt> </td><td>possibly </td></tr></table>

+

+</td></tr></table><br></span>

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td><font color="#FF0000"><b>Type</b></font> </td><td><font color="#FF0000"><b>Allows Decoding of</b></font> </td><td><font color="#FF0000"><b>Precision Lost?</b></font> </td></tr>

+<tr><td><i><b>long</b></i>	</td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>long</tt> </td><td>possibly, if <i><b>long</b></i> is 32 bit </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>int</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>short</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>byte</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedLong</tt> </td><td>possibly </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedInt</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedShort</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedByte</tt> </td><td>no </td></tr>

+<tr><td></td></tr>

+<tr><td><i><b>int</b></i>	</td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>int</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>short</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>byte</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedInt</tt> </td><td>possibly </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedShort</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedByte</tt> </td><td>no </td></tr>

+<tr><td></td></tr>

+<tr><td><i><b>short</b></i>	</td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>short</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>byte</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedShort</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedByte</tt> </td><td>no </td></tr>

+<tr><td></td></tr>

+<tr><td><i><b>char</b></i>	</td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>byte</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedByte</tt> </td><td>possibly </td></tr>

+<tr><td></td></tr>

+<tr><td><i><b>unsigned</b>&nbsp;<b>long</b>&nbsp;<b>long</b></i> </td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedLong</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedInt</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedShort</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedByte</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>positiveInteger</tt> </td><td>possibly </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>nonNegativeInteger</tt> </td><td>possibly </td></tr>

+<tr><td></td></tr>

+<tr><td><i><b>unsigned</b>&nbsp;<b>long</b></i> </td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedLong</tt> </td><td>possibly, if <i><b>long</b></i> is 32 bit </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedInt</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedShort</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedByte</tt> </td><td>no </td></tr>

+<tr><td></td></tr>

+<tr><td><i><b>unsigned</b>&nbsp;<b>int</b></i> </td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedInt</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedShort</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedByte</tt> </td><td>no </td></tr>

+<tr><td></td></tr>

+<tr><td><i><b>unsigned</b>&nbsp;<b>short</b></i> </td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedShort</tt> </td><td>no </td></tr>

+<tr><td></td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedByte</tt> </td><td>no </td></tr>

+<tr><td></td></tr>

+<tr><td><i><b>unsigned</b>&nbsp;<b>char</b></i> </td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>unsignedByte</tt> </td><td>no </td></tr>

+<tr><td></td></tr>

+<tr><td><i>time_t</i>	</td><td><tt><font size="+1"><span class="roman">[</span></font>xsd:<font size="+1"><span class="roman">]</span></font>dateTime</tt> </td><td>no(?) </td></tr>

+<tr><td></td></tr></table>

+

+</td></tr></table><br></span>

+Due to limitations in representation of certain primitive C++ types, a possible loss of accuracy may occur with the decoding of certain XSD Schema types as is indicated in the table. The table does not indicate the possible loss of precision of floating point values due to the textual representation of floating point values in SOAP.

+

+<div class="p"><!----></div>

+All explicitly declared XSD Schema encoded primitive types adhere to the same decoding rules. For example, the following declaration:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>unsigned</b>&nbsp;<b>long</b>&nbsp;<b>long</b>&nbsp;xsd__nonNegativeInteger;

+</td></tr></table><br></i>

+enables the encoding and decoding of <tt>xsd:nonNegativeInteger</tt> XSD Schema types (although decoding takes place with a possible

+loss of precision).

+The declaration also allows decoding of <tt>xsd:positiveInteger</tt> XSD Schema types, because of the storage as a <i><b>unsigned</b>&nbsp;<b>long</b>&nbsp;<b>long</b></i> data type.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.2.4">

+10.2.4</a>&nbsp;&nbsp;<font color="#0000FF">Multi-Reference Strings</font></h4>

+

+<div class="p"><!----></div>

+If more than one <i><b>char</b></i> pointer points to the same string, the string is encoded as a multi-reference value.

+Consider for example

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>char</b>&nbsp;*s = "hello", *t = s;

+</td></tr></table><br></i>

+The <i>s</i> and <i>t</i> variables are assigned the same string, and when serialized, <i>t</i> refers to the content of <i>s</i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;string id="123" xsi:type="string"&#62;hello&lt;/string&#62; <br />

+... <br />

+&lt;string href="#123"/&#62;

+</td></tr></table><br></tt>

+The example assumed that <i>s</i> and <i>t</i> are encoded as independent elements.

+

+<div class="p"><!----></div>

+Note: the use of <i><b>typedef</b></i> to declare a string type such as <i>xsd__string</i> will not affect the multi-reference string

+encoding.  However, strings declared with different <i><b>typedef</b></i>s will never be considered multi-reference even when they point

+to the same string.  For example

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__string; <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__anyURI; <br />

+xsd__anyURI *s = "http://www.myservice.com"; <br />

+xsd__string *t = s;

+</td></tr></table><br></i>

+The variables <i>s</i> and <i>t</i> point to the same string, but since they are considered different types their content will not

+be shared in the SOAP payload through a multi-referenced string.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.2.5">

+10.2.5</a>&nbsp;&nbsp;<font color="#0000FF">"Smart String" Mixed-Content Decoding</font></h4><a name="sec:smart">

+</a>

+

+<div class="p"><!----></div>

+The implementation of string decoding in gSOAP allows for mixed content decoding. If the SOAP payload contains a complex data type in place of

+a string, the complex data type is decoded in the string as plain XML text.

+

+<div class="p"><!----></div>

+For example, suppose the <i>getInfo</i> remote method returns some detailed information. The remote method is declared as:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of header file "getInfo.h": <br />

+getInfo(<b>char</b>&nbsp;*detail);

+</td></tr></table><br></i>

+The proxy of the remote method is used by a client to request a piece of information and the service responds with:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+HTTP/1.1 200 OK <br />

+Content-Type: text/xml <br />

+Content-Length: nnn <br />

+<br />

+&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" <br />

+&nbsp;&nbsp;&nbsp;xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" <br />

+&nbsp;&nbsp;&nbsp;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <br />

+&nbsp;&nbsp;&nbsp;xmlns:xsd="http://www.w3.org/2001/XMLSchema" <br />

+&lt;SOAP-ENV:Body&#62; <br />

+&lt;getInfoResponse&#62; <br />

+&lt;detail&#62; <br />

+&lt;picture&#62;Mona Lisa by &lt;i&#62;Leonardo da Vinci&lt;/i&#62;&lt;/picture&#62; <br />

+&lt;/detail&#62; <br />

+&lt;/getInfoResponse&#62; <br />

+&lt;/SOAP-ENV:Body&#62; <br />

+&lt;/SOAP-ENV:Envelope&#62;

+</td></tr></table><br></tt>

+As a result of the mixed content decoding, the <i>detail</i> string contains "<tt>&lt;picture&#62;Mona Lisa by &lt;i&#62;Leonardo da Vinci&lt;/i&#62;&lt;/picture&#62;</tt>".

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.2.6">

+10.2.6</a>&nbsp;&nbsp;<font color="#0000FF">STL Strings</font></h4><a name="sec:strings">

+</a>

+

+<div class="p"><!----></div>

+gSOAP supports STL strings <i>std::string</i> and <i>std::wstring</i>.

+For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;std::string xsd__string; <br />

+<b>class</b>&nbsp;ns__myClass <br />

+{ <b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;xsd__string s; // serialized with xsi:type="xsd:string" <br />

+&nbsp;&nbsp;&nbsp;std::string t; // serialized without xsi:type <br />

+... <br />

+};

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+<font color="#FF0000"><b>Caution:</b></font> Please avoid mixing <i>std::string</i> and C strings (<i><b>char</b>*</i>) in the header file when using SOAP 1.1 encoding. The problem is that multi-referenced strings in SOAP encoded messages cannot be assigned simultaneously to a <i>std::string</i> and a <i><b>char</b>*</i> string.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.2.7">

+10.2.7</a>&nbsp;&nbsp;<font color="#0000FF">Changing the Encoding Precision of <b>float</b>&nbsp;and <b>double</b>&nbsp;Types</font></h4>

+

+<div class="p"><!----></div>

+The <i>double</i> encoding format is by default set to "<i>%.18G</i>" (see a manual on <i>printf</i> text formatting in C),

+i.e.&nbsp;at most 18 digits of precision to limit a loss in accuracy.

+The <i>float</i> encoding format is by default "<i>%.9G</i>", i.e.&nbsp;at most 9 digits of precision.

+

+<div class="p"><!----></div>

+The encoding format of a double type can be set by assigning a format string to <i>soap.double_format</i>, where <i>soap</i> is a

+variable that contains the

+current runtime environment. For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap soap; <br />

+soap_init(&amp;soap); // sets double_format = "%.18G" <br />

+soap.double_format = "%e"; // redefine

+</td></tr></table><br></i>

+which causes all doubles to be encoded in scientific notation.

+Likewise, the encoding format of a float type can be set by assigning a format string to the static <i>soap_float_format</i> string variable. For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap soap; <br />

+soap_init(&amp;soap); // sets float_format = "%.9G" <br />

+soap.float_format = "%.4f"; // redefine

+</td></tr></table><br></i>

+which causes all floats to be encoded with four digits precision.

+

+<div class="p"><!----></div>

+<font color="#FF0000"><b>Caution</b></font>: The format strings are not automatically reset before or after SOAP communications. An error in the format string may result in the incorrect encoding of floating point values.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.2.8">

+10.2.8</a>&nbsp;&nbsp;<font color="#0000FF">INF, -INF, and NaN Values of <b>float</b>&nbsp;and <b>double</b>&nbsp;Types</font></h4>

+

+<div class="p"><!----></div>

+The gSOAP runtime <i>stdsoap2.cpp</i> and header file <i>stdsoap2.h</i> support the marshalling of IEEE INF, -INF, and NaN

+representations.  Under certain circumstances this may break if the hardware and/or C/C++ compiler does not support these

+representations.

+To remove the representations, remove the inclusion of the <i> &lt; math.h &gt; </i> header file from the <i>stdsoap2.h</i> file.

+You can control the representations as well, which are defined by the macros:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#define FLT_NAN <br />

+#define FLT_PINFTY <br />

+#define FLT_NINFTY <br />

+#define DBL_NAN <br />

+#define DBL_PINFTY <br />

+#define DBL_NINFTY

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc10.3">

+10.3</a>&nbsp;&nbsp;<font color="#0000FF">Enumeration Serialization</font></h3><a name="sec:enum">

+</a>

+

+<div class="p"><!----></div>

+Enumerations are generally useful for the declaration of named integer-valued constants, also called enumeration constants.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.3.1">

+10.3.1</a>&nbsp;&nbsp;<font color="#0000FF">Serialization of Symbolic Enumeration Constants</font></h4>

+

+<div class="p"><!----></div>

+The gSOAP stub and skeleton compiler encodes the constants of enumeration-typed variables in symbolic form using the names of the constants when possible to comply to SOAP's enumeration encoding style. Consider for example the following enumeration of weekdays:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>enum</b>&nbsp;weekday {Mon, Tue, Wed, Thu, Fri, Sat, Sun};

+</td></tr></table><br></i>

+The enumeration-constant <i>Mon</i>, for example, is encoded as

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;weekday xsi:type="weekday"&#62;Mon&lt;/weekday&#62;

+</td></tr></table><br></tt>

+The value of the <tt>xsi:type</tt> attribute is the enumeration-type identifier's name. If the element is independent as in the example above, the element name is the enumeration-type identifier's name.

+

+<div class="p"><!----></div>

+The encoding of complex types such as enumerations requires a reference to an XML Schema through the use of a namespace prefix. The namespace prefix can be specified as part of the enumeration-type identifier's name, with the usual namespace prefix conventions for identifiers. This can be used to explicitly specify the encoding style. For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>enum</b>&nbsp;ns1__weekday {Mon, Tue, Wed, Thu, Fri, Sat, Sun};

+</td></tr></table><br></i>

+The enumeration-constant <i>Sat</i>, for example, is encoded as:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;ns1:weekday xsi:type="ns1:weekday"&#62;Sat&lt;/ns1:weekday&#62;

+</td></tr></table><br></tt>

+The corresponding XML Schema for this enumeration data type would be:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;xsd:element name="weekday" type="tns:weekday"/&#62; <br />

+&lt;xsd:simpleType name="weekday"&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;xsd:restriction base="xsd:string"&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;xsd:enumeration value="Mon"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;xsd:enumeration value="Tue"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;xsd:enumeration value="Wed"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;xsd:enumeration value="Thu"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;xsd:enumeration value="Fri"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;xsd:enumeration value="Sat"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;xsd:enumeration value="Sun"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;/xsd:restriction&#62; <br />

+&lt;/xsd:simpleType&#62;

+</td></tr></table><br></tt>

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.3.2">

+10.3.2</a>&nbsp;&nbsp;<font color="#0000FF">Encoding of Enumeration Constants</font></h4>

+

+<div class="p"><!----></div>

+If the value of an enumeration-typed variable has no corresponding named constant, the value is encoded as a signed integer literal. For example, the following declaration of a <i>workday</i> enumeration type lacks named constants for Saturday and Sunday:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>enum</b>&nbsp;ns1__workday {Mon, Tue, Wed, Thu, Fri};

+</td></tr></table><br></i>

+If the constant <i>5</i> (Saturday) or <i>6</i> (Sunday) is assigned to a variable of the <i>workday</i> enumeration type, the variable will be encoded with the integer literals <tt>5</tt> and <tt>6</tt>, respectively. For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;ns1:workday xsi:type="ns1:workday"&#62;5&lt;/ns1:workday&#62;

+</td></tr></table><br></tt>

+Since this is legal in C++ and SOAP allows enumeration constants to be integer literals, this method ensures that non-symbolic

+enumeration constants are correctly communicated to another party if the other party accepts literal enumeration constants (as

+with the gSOAP stub and skeleton compiler).

+

+<div class="p"><!----></div>

+Both symbolic and literal enumeration constants can be decoded.

+

+<div class="p"><!----></div>

+To enforce the literal enumeration constant encoding and to get the literal constants in the WSDL file, use the following trick:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>enum</b>&nbsp;ns1__nums { _1 = 1, _2 = 2, _3 = 3 };

+</td></tr></table><br></i>

+The difference with an enumeration type without a list of values and the enumeration type above is that the enumeration constants

+will appear in the WSDL service description.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.3.3">

+10.3.3</a>&nbsp;&nbsp;<font color="#0000FF">Initialized Enumeration Constants</font></h4>

+

+<div class="p"><!----></div>

+The gSOAP compiler supports the initialization of enumeration constants, as in:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>enum</b>&nbsp;ns1__relation {LESS = -1, EQUAL = 0, GREATER = 1};

+</td></tr></table><br></i>

+The symbolic names <tt>LESS</tt>, <tt>EQUAL</tt>, and <tt>GREATER</tt> will appear in the SOAP payload for the encoding of the <i>ns1__relation</i> enumeration values <i>-1</i>, <i>0</i>, and <i>1</i>, respectively.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.3.4">

+10.3.4</a>&nbsp;&nbsp;<font color="#0000FF">How to "Reuse" Symbolic Enumeration Constants</font></h4>

+

+<div class="p"><!----></div>

+A well-known deficiency of C and C++ enumeration types is the lack of support for the reuse of symbolic names by multiple enumerations. That is, the names of all the symbolic constants defined by an enumeration cannot be reused by another enumeration. To force encoding of the same symbolic name by different enumerations, the identifier of the symbolic name can end in an underscore (<i>_</i>) or any number of underscores to distinguish it from other symbolic names in C++. This guarantees that the SOAP encoding will use the same name, while the symbolic names can be distinguished in C++. Effectively, the underscores are removed from a symbolic name prior to encoding.

+

+<div class="p"><!----></div>

+Consider for example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>enum</b>&nbsp;ns1__workday {Mon, Tue, Wed, Thu, Fri}; <br />

+<b>enum</b>&nbsp;ns1__weekday {Mon_, Tue_, Wed_, Thu_, Fri_, Sat_, Sun_};

+</td></tr></table><br></i>

+which will result in the encoding of the constants of <i>enum ns1__weekday</i> without the underscore, for example as <tt>Mon</tt>.

+

+<div class="p"><!----></div>

+<font color="#FF0000"><b>Caution</b></font>: The following declaration:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>enum</b>&nbsp;ns1__workday {Mon, Tue, Wed, Thu, Fri}; <br />

+<b>enum</b>&nbsp;ns1__weekday {Sat = 5, Sun = 6};

+</td></tr></table><br></i>

+will not properly encode the <i>weekday</i> enumeration, because it lacks the named constants for <i>workday</i> in its enumeration list.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.3.5">

+10.3.5</a>&nbsp;&nbsp;<font color="#0000FF">Boolean Enumeration Serialization for C</font></h4><a name="sec:boolean">

+</a>

+

+<div class="p"><!----></div>

+When developing a C Web service application, the C++ <i>bool</i> type should not be used since it is not usually supported by the C compiler.

+Instead, an enumeration type should be used to serialize true/false values as <tt>xsd:boolean</tt> Schema type enumeration values.

+The <tt>xsd:boolean</tt> XML Schema type is defined as:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>enum</b>&nbsp;xsd__boolean {false_, true_};

+</td></tr></table><br></i>

+The value <i>false_</i>, for example, is encoded as:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;xsd:boolean xsi:type="xsd:boolean"&#62;false&lt;/xsd:boolean&#62; <br />

+</td></tr></table><br></tt>

+Peculiar of the SOAP boolean type encoding is that it only defines the values <tt>0</tt> and <tt>1</tt>, while the built-in XML Schema boolean type also defines the <tt>false</tt> and <tt>true</tt> symbolic constants as valid values. The following example declaration of an enumeration type lacks named constants altogether to force encoding of the enumeration values as literal constants:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>enum</b>&nbsp;SOAP_ENC__boolean {};

+</td></tr></table><br></i>

+The value <i>0</i>, for example, is encoded with an integer literal:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;SOAP-ENC:boolean xsi:type="SOAP-ENC:boolean"&#62;0&lt;SOAP-ENC:boolean&#62;

+</td></tr></table><br></tt>

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.3.6">

+10.3.6</a>&nbsp;&nbsp;<font color="#0000FF">Bitmask Enumeration Serialization</font></h4>

+

+<div class="p"><!----></div>

+A bitmask is an enumeration of flags such as declared with C#'s [Flags] <i><b>enum</b></i> annotation.

+gSOAP supports bitmask encoding and decoding for interoperability. However, bitmask types are not standardized with SOAP RPC.

+

+<div class="p"><!----></div>

+A special syntactic convention is used in the header file input to the gSOAP compiler to indicate the use of bitmasks with an

+asterisk:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>enum</b>&nbsp;* <i>name</i> { <i>enum-constant</i>, <i>enum-constant</i>, ... };

+</td></tr></table><br></i>

+The gSOAP compiler will encode the enumeration constants as flags, i.e. as a series of powers of 2 starting with 1.

+The enumeration constants can be or-ed to form a bitvector (bitmask) which is encoded and decoded as a list of symbolic values

+in SOAP.

+For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>enum</b>&nbsp;* ns__machineStatus { ON, BELT, VALVE, HATCH}; <br />

+<b>int</b>&nbsp;ns__getMachineStatus(<b>char</b>&nbsp;*name, <b>char</b>&nbsp;*<b>enum</b>&nbsp;ns__machineStatus result);

+</td></tr></table><br></i>

+Note that the use of the <i><b>enum</b></i> does not require the asterisk, only the definition.

+The gSOAP compiler generates the enumeration:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>enum</b>&nbsp;ns__machineStatus { ON=1, BELT=2, VALVE=4, HATCH=8};

+</td></tr></table><br></i>

+A remote method implementation in a Web service can return:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;ns__getMachineStatus(<b>struct</b>&nbsp;soap *soap, <b>char</b>&nbsp;*name, <b>enum</b>&nbsp;ns__machineStatus result) <br />

+{ ... <br />

+&nbsp;&nbsp;&nbsp;*result = BELT  -  HATCH; <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+}

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc10.4">

+10.4</a>&nbsp;&nbsp;<font color="#0000FF">Struct Serialization</font></h3><a name="sec:struct">

+</a>

+

+<div class="p"><!----></div>

+A <i><b>struct</b></i> data type is encoded as an XML Schema complexType (SOAP-encoded compound data type) such that the

+<i><b>struct</b></i> name forms the data type's element name and schema type and the

+fields of the <i><b>struct</b></i> are the data type's accessors. This encoding is

+identical to the <i><b>class</b></i> instance encoding without inheritance and method

+declarations, see Section&nbsp;<a href="#sec:class">10.5</a> for further details.  However, the

+encoding and decoding of <i><b>struct</b></i>s is more efficient compared to

+<i><b>class</b></i> instances due to the lack of inheritance and the requirement by

+the serialization routines to check inheritance properties at run time.

+

+<div class="p"><!----></div>

+Certain type of fields of a <i><b>struct</b></i> can be (de)serialized as XML attributes.

+See&nbsp;<a href="#sec:attributes">10.5.7</a> for more details.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc10.5">

+10.5</a>&nbsp;&nbsp;<font color="#0000FF">Class Instance Serialization</font></h3><a name="sec:class">

+</a>

+

+<div class="p"><!----></div>

+A <i><b>class</b></i> instance is serialized as an XML Schema complexType (SOAP-encoded compound data type) such that the

+<i><b>class</b></i> name forms the data type's element name and schema type and the

+data member fields are the data type's accessors. Only the data member fields

+are encoded in the SOAP payload. Class methods are not encoded.

+

+<div class="p"><!----></div>

+The general form of a <i><b>class</b></i> declaration is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>class</b>&nbsp;<font size="+1"><span class="roman">[</span></font>namespace_prefix__<font size="+1"><span class="roman">]</span></font>class_name1 <font size="+1"><span class="roman">[</span></font>:<font size="+1"><span class="roman">[</span></font><b>public</b>:<font size="+1"><span class="roman">]</span></font> <font size="+1"><span class="roman">[</span></font><b>private</b>:<font size="+1"><span class="roman">]</span></font> <font size="+1"><span class="roman">[</span></font><b>protected</b>:<font size="+1"><span class="roman">]</span></font> <font size="+1"><span class="roman">[</span></font>namespace_prefix__<font size="+1"><span class="roman">]</span></font>class_name2<font size="+1"><span class="roman">]</span></font> <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<font size="+1"><span class="roman">[</span></font><b>public</b>:<font size="+1"><span class="roman">]</span></font> <font size="+1"><span class="roman">[</span></font><b>private</b>:<font size="+1"><span class="roman">]</span></font> <font size="+1"><span class="roman">[</span></font><b>protected</b>:<font size="+1"><span class="roman">]</span></font> <br />

+&nbsp;&nbsp;&nbsp;field1; <br />

+&nbsp;&nbsp;&nbsp;field2; <br />

+&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;<font size="+1"><span class="roman">[</span></font><b>public</b>:<font size="+1"><span class="roman">]</span></font> <font size="+1"><span class="roman">[</span></font><b>private</b>:<font size="+1"><span class="roman">]</span></font> <font size="+1"><span class="roman">[</span></font><b>protected</b>:<font size="+1"><span class="roman">]</span></font> <br />

+&nbsp;&nbsp;&nbsp;method1; <br />

+&nbsp;&nbsp;&nbsp;method2; <br />

+&nbsp;&nbsp;&nbsp;... <br />

+}; <br />

+</td></tr></table><br></i>

+where

+

+<dl compact="compact">

+ <dt><b><span class="roman"><i>namespace_prefix__</i></b></dt>

+	<dd> is the optional namespace prefix of the compound data type (see identifier translation rules&nbsp;<a href="#sec:idtrans">9.3</a>)</span></dd>

+ <dt><b><span class="roman"><i>class_name1</i></b></dt>

+	<dd>	 is the element name of the compound data type (see identifier translation rules&nbsp;<a href="#sec:idtrans">9.3</a>).</span></dd>

+ <dt><b><span class="roman"><i>class_name2</i></b></dt>

+	<dd>	 is an optional base class.</span></dd>

+ <dt><b><span class="roman"><i>field</i></b></dt>

+	<dd>	 is a field declaration (data member). A field MAY be declared <i><b>static</b></i> and <i><b>const</b></i> and MAY be initialized.</span></dd>

+ <dt><b><span class="roman"><i>method</i></b></dt>

+	<dd> is a method declaration. A method MAY be declared <i><b>virtual</b></i>, but abstract methods are not allowed. The method parameter declarations are REQUIRED to have parameter identifier names.</span></dd>

+ <dt><b><font size="+1"><span class="roman">[</span></font><b>public</b>:<font size="+1"><span class="roman">]</span></font> <font size="+1"><span class="roman">[</span></font><b>private</b>:<font size="+1"><span class="roman">]</span></font> <font size="+1"><span class="roman">[</span></font><b>protected</b>:<font size="+1"><span class="roman">]</span></font></b></dt>

+	<dd> are OPTIONAL. Only members with <i><b>public</b></i> acces permission can be serialized.</dd>

+</dl>

+A class name is REQUIRED to be unique and cannot have the same name as a

+<i><b>struct</b></i>, <i><b>enum</b></i>, or remote method name specified in the header file

+input to the gSOAP compiler.  The reason is that remote method requests are

+encoded similarly to class instances in SOAP and they are in principle

+undistinguishable (the method parameters are encoded just as the fields of a

+<i><b>class</b></i>).

+

+<div class="p"><!----></div>

+Only single inheritance is supported by the gSOAP compiler. Multiple

+inheritance is not supported, because of the limitations of the SOAP protocol.

+

+<div class="p"><!----></div>

+If a constructor method is present, there MUST also be a constructor

+declaration with empty parameter list.

+

+<div class="p"><!----></div>

+Classes should be declared "volatile" if you don't want gSOAP to add serialization methods to these classes, see Section&nbsp;<a href="#sec:volatile">18.4</a> for more details.

+

+<div class="p"><!----></div>

+Class templates are not supported by the gSOAP compiler, but you can use STL containers,

+see Section&nbsp;<a href="#sec:templates">10.10.8</a>. You can also define your own

+containers similar to STL containers.

+

+<div class="p"><!----></div>

+Certain fields of a <i><b>class</b></i> can be (de)serialized as XML attributes.

+See&nbsp;<a href="#sec:attributes">10.5.7</a> for more details.

+

+<div class="p"><!----></div>

+Arrays may be embedded within a class (and struct) using a pointer field and

+size information, see Section&nbsp;<a href="#sec:list">10.10.7</a>. This defines what is sometimes

+referred to in SOAP as "generics".

+

+<div class="p"><!----></div>

+Void pointers may be used in a class (or struct), but you have to add a type

+field so the gSOAP runtime can determine the type of object pointed to, see

+Section&nbsp;<a href="#sec:void">10.8</a>.

+

+<div class="p"><!----></div>

+A <i><b>class</b></i> instance is encoded as:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>class-name xsi:type="<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>class-name"&#62; <br />

+&lt;basefield-name1 xsi:type="..."&#62;...&lt;/basefield-name1&#62; <br />

+&lt;basefield-name2 xsi:type="..."&#62;...&lt;/basefield-name2&#62; <br />

+... <br />

+&lt;field-name1 xsi:type="..."&#62;...&lt;/field-name1&#62; <br />

+&lt;field-name2 xsi:type="..."&#62;...&lt;/field-name2&#62; <br />

+... <br />

+&lt;/<font size="+1"><span class="roman">[</span></font>namespace-prefix:<font size="+1"><span class="roman">]</span></font>class-name&#62;

+</td></tr></table><br></tt>

+where the <tt>field-name</tt> accessors have element-name representations of the

+class fields and the <tt>basefield-name</tt> accessors have element-name

+representations of the base class fields. (The optional parts resulting from

+the specification are shown enclosed in <font size="+1"><span class="roman">[</span></font><font size="+1"><span class="roman">]</span></font>.)

+

+<div class="p"><!----></div>

+The decoding of a class instance allows any ordering of the accessors in the

+SOAP payload. However, if a base class field name is identical to a derived

+class field name because the field is overloaded, the base class field name

+MUST precede the derived class field name in the SOAP payload for decoding.

+gSOAP guarantees this, but interoperability with other SOAP implementations is

+cannot be guaranteed.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.5.1">

+10.5.1</a>&nbsp;&nbsp;<font color="#0000FF">Example</font></h4>

+

+<div class="p"><!----></div>

+The following example declares a base class <i>ns__Object</i> and a derived class <i>ns__Shape</i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of file "shape.h": <br />

+<b>class</b>&nbsp;ns__Object <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*name; <br />

+}; <br />

+<b>class</b>&nbsp;ns__Shape : <b>public</b>&nbsp;ns__Object <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;sides; <br />

+&nbsp;&nbsp;&nbsp;<b>enum</b>&nbsp;ns__Color {Red, Green, Blue} color; <br />

+&nbsp;&nbsp;&nbsp;ns__Shape(); <br />

+&nbsp;&nbsp;&nbsp;ns__Shape(<b>int</b>&nbsp;sides, <b>enum</b>&nbsp;ns__Green color); <br />

+&nbsp;&nbsp;&nbsp;~ns__Shape(); <br />

+};

+</td></tr></table><br></i>

+The implementation of the methods of <i><b>class</b>&nbsp;ns__Shape</i> must not be part of the header file and need to be defined elsewhere.

+

+<div class="p"><!----></div>

+An instance of <i><b>class</b>&nbsp;ns__Shape</i> with name Triangle, 3 sides, and color Green is encoded as:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;ns:Shape xsi:type="ns:Shape"&#62; <br />

+&lt;name xsi:type="string"&#62;Triangle&lt;/name&#62; <br />

+&lt;sides xsi:type="int"&#62;3&lt;/sides&#62; <br />

+&lt;color xsi:type="ns:Color"&#62;Green&lt;/color&#62; <br />

+&lt;/ns:shape&#62;

+</td></tr></table><br></tt>

+The namespace URI of the namespace prefix <tt>ns</tt> must be defined by a namespace mapping table, see Section&nbsp;<a href="#sec:nstable">9.4</a>.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.5.2">

+10.5.2</a>&nbsp;&nbsp;<font color="#0000FF">Initialized <b>static</b>&nbsp;<b>const</b>&nbsp;Fields</font></h4>

+

+<div class="p"><!----></div>

+A data member field of a class declared as <i><b>static</b>&nbsp;<b>const</b></i> is initialized

+with a constant value at compile time. This field is encoded in the

+serialization process, but is not decoded in the deserialization process. For

+example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of file "triangle.h": <br />

+<b>class</b>&nbsp;ns__Triangle : <b>public</b>&nbsp;ns__Object <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;size; <br />

+&nbsp;&nbsp;&nbsp;<b>static</b>&nbsp;<b>const</b>&nbsp;<b>int</b>&nbsp;sides = 3; <br />

+};

+</td></tr></table><br></i>

+An instance of <i><b>class</b>&nbsp;ns__Triangle</i> is encoded in SOAP as:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;ns:Triangle xsi:type="ns:Triangle"&#62; <br />

+&lt;name xsi:type="string"&#62;Triangle&lt;/name&#62; <br />

+&lt;size xsi:type="int"&#62;15&lt;/size&#62; <br />

+&lt;sides xsi:type="int"&#62;3&#62;/sides&#62; <br />

+&lt;/ns:Triangle&#62;

+</td></tr></table><br></tt>

+Decoding will ignore the <i>sides</i> field's value.

+

+<div class="p"><!----></div>

+<font color="#FF0000"><b>Caution</b></font>: The current gSOAP implementation does not support encoding

+<i><b>static</b>&nbsp;<b>const</b></i> fields, due to C++ compiler compatibility differences.

+This feature may be provided the future.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.5.3">

+10.5.3</a>&nbsp;&nbsp;<font color="#0000FF">Class Methods</font></h4>

+

+<div class="p"><!----></div>

+A <i><b>class</b></i> declaration in the header file input to the gSOAP compiler MAY

+include method declarations.  The method implementations MUST NOT be part of

+the header file but are required to be defined in another C++ source that is

+externally linked with the application. This convention is also used for the

+constructors and destructors of the <i><b>class</b></i>.

+

+<div class="p"><!----></div>

+Dynamic binding is supported, so a method MAY be declared <i><b>virtual</b></i>.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.5.4">

+10.5.4</a>&nbsp;&nbsp;<font color="#0000FF">Getter and Setter Methods</font></h4><a name="sec:gettersetter">

+</a>

+

+<div class="p"><!----></div>

+Setter and getter methods are invoked at run time upon serialization and

+deserialization of class instances, respectively. The use of setter and getter methods adds more flexibility to the serialization and deserialization process.

+

+<div class="p"><!----></div>

+A setter method is called in the serialization phase from the virtual

+<i>soap_serialization</i> method generated by the gSOAP compiler.  You can use

+setter methods to process a class instance just before it is serialized. A

+setter method can be used to convert application data, such as translating

+transient application data into serializable data, for example. You can also

+use setter methods to retrieve dynamic content and use it to update a class

+instance right before serialization. Remember setters

+as &#223;et to serialize" operations.

+

+<div class="p"><!----></div>

+Getter methods are invoked after deserialization of the instance. You can use

+them to adjust the contents of class instances after all their members have been

+deserialized. Getters can be used to convert deserialized members into

+transient members and even invoke methods to process the deserialized data on

+the fly.

+

+<div class="p"><!----></div>

+Getter and setter methods have the following signature:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<font size="+1"><span class="roman">[</span></font><b>virtual</b><font size="+1"><span class="roman">]</span></font> <b>int</b>&nbsp;get(<b>struct</b>&nbsp;soap *soap) <font size="+1"><span class="roman">[</span></font><b>const</b><font size="+1"><span class="roman">]</span></font>; <br />

+<font size="+1"><span class="roman">[</span></font><b>virtual</b><font size="+1"><span class="roman">]</span></font> <b>int</b>&nbsp;set(<b>struct</b>&nbsp;soap *soap);

+</td></tr></table><br></i>

+The active soap struct will be passed to the <i>get</i> and <i>set</i> methods. The methods should return <i>SOAP_OK</i> when successful. A setter method should prepare the contents of the class instance for serialization. A getter method should process the instance after deserialization.

+

+<div class="p"><!----></div>

+Here is an example of a base64 binary class:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>class</b>&nbsp;xsd__base64Binary <br />

+{ <b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;<b>unsigned</b>char *__ptr; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>__size; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;get(struct soap *soap); <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;set(struct soap *soap); <br />

+};

+</td></tr></table><br></i>

+Suppose that the type and options members of the attachment should be set when

+the class is about to be serialized. This can be accomplished with the

+<i>set</i> method from the information provided by the <i>__ptr</i> to the data

+and the soap struct passed to the <i>set</i> method (you can pass data via the

+<i><b>void</b>*soap.user</i> field).

+

+<div class="p"><!----></div>

+The <i>get</i> method is invoked after the base64 data has been processed. You

+can use it for post-processing purposes.

+

+<div class="p"><!----></div>

+Here is another example. It defines a primitive <i>update</i> type. The class is a wrapper for the <i>time_t</i> type, see Section&nbsp;<a href="#sec:primclass">10.2.2</a>. Therefore, elements of this type contain <tt>xsd:dateType</tt> data.

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>class</b>&nbsp;update <br />

+{ <b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;time_t __item; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;set(<b>struct</b>&nbsp;soap *soap); <br />

+};

+</td></tr></table><br></i>

+The setter method assigns the current time:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;update::set(<b>struct</b>&nbsp;soap *soap) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;this<tt>-&gt;</tt>__item = time(NULL); <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+}

+</td></tr></table><br></i>

+Therefore, serialization results in the inclusion of a time stamp in XML.

+

+<div class="p"><!----></div>

+<font color="#FF0000"><b>Caution</b></font>: a <i>get</i> method is invoked only when the XML element with its data

+was completely parsed. The method is not invoked when the element is an <tt>xsi:nil</tt> element or has an 

+<tt>href</tt> attribute.

+

+<div class="p"><!----></div>

+<font color="#FF0000"><b>Caution:</b></font> The <i>soap_serialize</i> method of a class calls the setter (when

+provided). However, the <i>soap_serialize</i> method is declared <i><b>const</b></i>

+while the setter should be allowed to modify the contents of the class

+instance. Therefore, the gSOAP-generated code recasts the instance and the

+<i><b>const</b></i> is removed when invoking the setter.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.5.5">

+10.5.5</a>&nbsp;&nbsp;<font color="#0000FF">Streaming XML with Getter and Setter Methods</font></h4><a name="sec:streaming">

+</a>

+

+<div class="p"><!----></div>

+Getter methods enable streaming XML operations. A getter method is invoked

+when the object is deserialized and the rest of the SOAP/XML message has not

+been processed yet. For example, you can add a getter method to the SOAP Header

+class to implement header processing logic that is activated as soon as the

+SOAP Header is received.  An example code is shown below:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>class</b>&nbsp;h__Authentication <br />

+{ <b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*id; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;get(<b>struct</b>&nbsp;soap *soap); <br />

+}; <br />

+<b>class</b>&nbsp;SOAP_ENV__Header <br />

+{ <b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;h__Authentication *h__authentication; <br />

+};

+</td></tr></table><br></i>

+The <i>Authentication</i> SOAP Header field is instantiated and decoded. After

+decoding, the getter method is invoked, which can be used to check the <i>id</i>

+before the rest of the SOAP message is processed.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.5.6">

+10.5.6</a>&nbsp;&nbsp;<font color="#0000FF">Polymorphism, Derived Classes, and Dynamic Binding</font></h4><a name="sec:polymorph">

+</a>

+

+<div class="p"><!----></div>

+Interoperability between client and service applications developed with gSOAP

+is established even when clients and/or services use derived classes instead of

+the base classes used in the declaration of the remote method parameters.  A

+client application MAY use pointers to instances of derived classes for the

+input parameters of a remote method. If the service was compiled with a

+declaration and implementation of the derived class, the remote method base

+class input parameters are demarshalled and a derived class instance is created

+instead of a base class instance. If the service did not include a declaration

+of the derived class, the derived class fields are ignored and a base class

+instance is created. Therefore, interoperability is guaranteed even when the

+client sends an instance of a derived classes and when a service returns an

+instance of a derived class.

+

+<div class="p"><!----></div>

+The following example declares Base and Derived classes and a remote method

+that takes a pointer to a Base class instance and returns a Base class

+instance:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of file "derived.h" <br />

+<b>class</b>&nbsp;Base <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*name; <br />

+&nbsp;&nbsp;&nbsp;Base(); <br />

+&nbsp;&nbsp;&nbsp;<b>virtual</b>&nbsp;<b>void</b>&nbsp;print(); <br />

+}; <br />

+<b>class</b>&nbsp;Derived : <b>public</b>&nbsp;Base <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;num; <br />

+&nbsp;&nbsp;&nbsp;Derived(); <br />

+&nbsp;&nbsp;&nbsp;<b>virtual</b>&nbsp;<b>void</b>&nbsp;print(); <br />

+}; <br />

+<b>int</b>&nbsp;method(Base *in, <b>struct</b>&nbsp;methodResponse { Base *out; } &amp;result);

+</td></tr></table><br></i>

+This header file specification is processed by the gSOAP compiler to produce the stub and skeleton routines which are used to implement a client and service.

+The pointer of the remote method is also allowed to point to Derived class instances and these instances will be marshalled as Derived class instances and send to a service, which is in accord to the usual semantics of parameter passing in C++ with dynamic binding.

+

+<div class="p"><!----></div>

+The Base and Derived class method implementations are:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Method implementations of the Base and Derived classes: <br />

+#include "soapH.h" <br />

+... <br />

+Base::Base() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;cout  &lt;&lt;  "created a Base class instance"  &lt;&lt;  endl; <br />

+} <br />

+Derived::Derived() <br />

+{<br />

+&nbsp;&nbsp;&nbsp;cout  &lt;&lt;  "created a Derived class instance"  &lt;&lt;  endl; <br />

+} <br />

+Base::print() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;cout  &lt;&lt;  "print(): Base class instance "  &lt;&lt;  name  &lt;&lt;  endl; <br />

+} <br />

+Derived::print() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;cout  &lt;&lt;  "print(): Derived class instance "  &lt;&lt;  name  &lt;&lt;  " "  &lt;&lt;  num  &lt;&lt;  endl; <br />

+}

+</td></tr></table><br></i>

+Below is an example <i>CLIENT</i> application that creates a Derived class instance that is passed as the input parameter of the remote method:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// CLIENT <br />

+#include "soapH.h" <br />

+<b>int</b>&nbsp;main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;Derived obj1; <br />

+&nbsp;&nbsp;&nbsp;Base *obj2; <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;methodResponse r; <br />

+&nbsp;&nbsp;&nbsp;obj1.name = "X"; <br />

+&nbsp;&nbsp;&nbsp;obj1.num = 3; <br />

+&nbsp;&nbsp;&nbsp;soap_call_method(&amp;soap, url, action, &amp;obj1, r); <br />

+&nbsp;&nbsp;&nbsp;r.obj2<tt>-&gt;</tt>print(); <br />

+} <br />

+...

+</td></tr></table><br></i>

+The following example <i>SERVER1</i> application copies a class instance (Base or Derived class) from the input to the output parameter:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// SERVER1 <br />

+#include "soapH.h" <br />

+<b>int</b>&nbsp;main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;soap_serve(soap_new()); <br />

+} <br />

+<b>int</b>&nbsp;method(<b>struct</b>&nbsp;soap *soap, Base *obj1, <b>struct</b>&nbsp;methodResponse &amp;result) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;obj1<tt>-&gt;</tt>print(); <br />

+&nbsp;&nbsp;&nbsp;result.obj2 = obj1; <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+} <br />

+...

+</td></tr></table><br></i>

+The following messages are produced by the <i>CLIENT</i> and <i>SERVER1</i> applications:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+CLIENT: created a Derived class instance <br />

+SERVER1: created a Derived class instance <br />

+SERVER1: print(): Derived class instance X 3 <br />

+CLIENT: created a Derived class instance <br />

+CLIENT: print(): Derived class instance X 3

+</td></tr></table><br></span>

+Which indicates that the derived class kept its identity when it passed through <i>SERVER1</i>. Note that instances are created both by the <i>CLIENT</i> and <i>SERVER1</i> by the demarshalling process.

+

+<div class="p"><!----></div>

+Now suppose a service application is developed that only accepts Base class instances. The header file is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of file "base.h": <br />

+<b>class</b>&nbsp;Base <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*name; <br />

+&nbsp;&nbsp;&nbsp;Base(); <br />

+&nbsp;&nbsp;&nbsp;<b>virtual</b>&nbsp;<b>void</b>&nbsp;print(); <br />

+}; <br />

+<b>int</b>&nbsp;method(Base *in, Base *out);

+</td></tr></table><br></i>

+This header file specification is processed by the gSOAP stub and skeleton compiler to produce skeleton routine which is used to implement a service (so the client will still use the derived classes).

+

+<div class="p"><!----></div>

+The method implementation of the Base class are:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Method implementations of the Base class: <br />

+#include "soapH.h" <br />

+... <br />

+Base::Base() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;cout  &lt;&lt;  "created a Base class instance"  &lt;&lt;  endl; <br />

+} <br />

+Base::print() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;cout  &lt;&lt;  "print(): Base class instance "  &lt;&lt;  name  &lt;&lt;  endl; <br />

+} <br />

+</td></tr></table><br></i>

+And the <i>SERVER2</i> application is that uses the Base class is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// SERVER2 <br />

+#include "soapH.h" <br />

+<b>int</b>&nbsp;main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;soap_serve(soap_new()); <br />

+} <br />

+<b>int</b>&nbsp;method(<b>struct</b>&nbsp;soap *soap, Base *obj1, <b>struct</b>&nbsp;methodResponse &amp;result) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;obj1<tt>-&gt;</tt>print(); <br />

+&nbsp;&nbsp;&nbsp;result.obj2 = obj1; <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+} <br />

+...

+</td></tr></table><br></i>

+Here are the messages produced by the <i>CLIENT</i> and <i>SERVER2</i> applications:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+CLIENT: created a Derived class instance <br />

+SERVER2: created a Base class instance <br />

+SERVER2: print(): Base class instance X <br />

+CLIENT: created a Base class instance <br />

+CLIENT: print(): Base class instance X

+</td></tr></table><br></span>

+In this example, the object was passed as a Derived class instance to <i>SERVER2</i>. Since <i>SERVER2</i> only implements the Base class, this object is converted to a Base class instance and send back to <i>CLIENT</i>.

+

+<div class="p"><!----></div>

+	      <h4><a name="tth_sEc10.5.7">

+10.5.7</a>&nbsp;&nbsp;<font color="#0000FF">XML Attributes</font></h4><a name="sec:attributes">

+</a>

+

+<div class="p"><!----></div>

+The SOAP RPC/LIT and SOAP DOC/LIT encoding styles support XML attributes in

+SOAP messages while SOAP RPC with "Section 5" encoding does not support XML

+attributes other than the SOAP and XSD specific attributes. SOAP RPC "Section

+5" encoding has advantages for cross-language interoperability and data

+encodings such as graph serialization. However, RPC/LIT and DOC/LIT enables

+direct exchange of XML documents, which may include encoded application data

+structures. Language interoperability is compromised, because no mapping

+between XML and the typical language data types is defined. The meaning of the

+RPC/LIT and DOC/LIT XML content is Schema driven rather than

+application/language driven.

+

+<div class="p"><!----></div>

+gSOAP supports XML attribute (de)serialization of members in structs and classes.

+Attributes are primitive XSD types, such as strings, enumerations, boolean, and

+numeric types. To declare an XML attribute in a struct/class, the qualifier

+<i>@</i> is used with the type of the attribute. The type must be

+primitive type (including enumerations and strings), which can be declared with or without

+a <i><b>typedef</b></i> to associate a XSD type with the C/C+ type.  For example

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__string; <br />

+<b>typedef</b>&nbsp;<b>bool</b>&nbsp;*xsd__boolean; <br />

+<b>enum</b>&nbsp;ns__state { _0, _1, _2 }; <br />

+<b>struct</b>&nbsp;ns__myStruct <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;@xsd__string ns__type; // encode as XML attribute 'ns:type' of type 'xsd:string' <br />

+&nbsp;&nbsp;&nbsp;@xsd__boolean ns__flag = false; // encode as XML attribute 'ns:flag' of type 'xsd:boolean' <br />

+&nbsp;&nbsp;&nbsp;@<b>enum</b>&nbsp;ns__state ns__state = _2; // encode as XML attribute 'ns:state' of type 'ns:state' <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;ns__myStruct *next; <br />

+};

+</td></tr></table><br></i>

+The <i>@</i> qualifier indicates XML attribute encoding for the

+<i>ns__type</i>, <i>ns__flag</i>, and <i>ns__state</i> fields. Note that the

+namespace prefix <i>ns</i> is used to distinguish these attributes from any

+other attributes such as <tt>xsi:type</tt> (<tt>ns:type</tt> is not to be confused

+with <tt>xsi:type</tt>).

+

+<div class="p"><!----></div>

+Default values can be associated with any field that has

+a primitive type in a struct/class, as is illustrated in this example. The

+default values are used when the receiving message does not contain the

+corresponding values.

+

+<div class="p"><!----></div>

+String attributes are optional. Other type of attributes should be declared as pointers to make them optional:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;ns__myStruct <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;@<b>int</b>&nbsp;*a; // omitted when NULL

+};

+</td></tr></table><br></i>

+Because a remote method request and response is essentially a struct, XML

+attributes can also be associated with method requests and responses. For

+example

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;ns__myMethod(@<b>char</b>&nbsp;*ns__name, ...);

+</td></tr></table><br></i>

+Attributes can also be attached to the dynamic arrays, binary types, and wrapper classes/structs of primitive

+types. Wrapper classes are described in Section&nbsp;<a href="#sec:primclass">10.2.2</a>.  For

+example

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;xsd__string <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*__item; <br />

+&nbsp;&nbsp;&nbsp;@xsd__boolean flag; <br />

+};

+</td></tr></table><br></i>

+and

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;xsd__base64Binary <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>unsigned</b>&nbsp;<b>char</b>&nbsp;*__ptr; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size; <br />

+&nbsp;&nbsp;&nbsp;@xsd__boolean flag; <br />

+};

+</td></tr></table><br></i>

+The attribute declarations MUST follow the <i>__item</i>, <i>__ptr</i>, and <i>__size</i> fields

+which define the characteristics of wrapper structs/classes and dynamic arrays.

+

+<div class="p"><!----></div>

+<font color="#FF0000"><b>Caution</b></font>: Do not use XML attributes with SOAP RPC encoding. You can only use attributes with RPC literal encoding.

+

+<div class="p"><!----></div>

+	      <h4><a name="tth_sEc10.5.8">

+10.5.8</a>&nbsp;&nbsp;<font color="#0000FF">QName Attributes and Elements</font></h4>

+

+<div class="p"><!----></div>

+gSOAP ensures the proper decoding of XSD QNames.

+An element or attribute with type QName (Qualified Name) contains a namespace prefix and a local name.

+You can declare a QName type as a <i><b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__QName</i>. Values of type QName

+are internally handled as regular strings.

+gSOAP takes care of the proper namespace prefix mappings when deserializing QName values.

+For example

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__QName; <br />

+<b>struct</b>&nbsp;ns__myStruct <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;xsd__QName elt = "ns:xyz"; // QName element with default value "ns:xyz" <br />

+&nbsp;&nbsp;&nbsp;@xsd__QName att = "ns:abc"; // QName attribute with default value "ns:abc" <br />

+};

+</td></tr></table><br></i>

+When the <i>elt</i> and <i>att</i> fields are serialized,

+their string contents are just transmitted (which means that the application is responsible to

+ensure proper formatting of the QName strings prior to transmission). When the

+fields are deserialized however, gSOAP takes care mapping the qualifiers to the

+appropriate namespace prefixes. Suppose that the inbound value

+for the <i>elt</i> is <tt>x:def</tt>, where the namespace name associated with the

+prefix <tt>x</tt> matches the namespace name of the prefix <tt>ns</tt> (as defined in

+the namespace mapping table). Then, the value is automatically converted into <tt>ns:def</tt>.

+If the namespace name is not in the table, then

+<tt>x:def</tt> is converted to <i>&#220;RI":def</i> where <tt>&#220;RI"</tt> is the namespace

+URI bound to <tt>x</tt> in the message received.  This enables an application to

+retrieve the namespace information, whether it is in the namespace mapping

+table or not.

+

+<div class="p"><!----></div>

+Note: <i>QName</i> is a pre-defined typedef type and used by gSOAP to

+(de)serialize SOAP Fault codes which are QName elements.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc10.6">

+10.6</a>&nbsp;&nbsp;<font color="#0000FF">Union Serialization</font></h3><a name="sec:union">

+</a>

+

+<div class="p"><!----></div>

+A <i><b>union</b></i> is only serialized if the <i><b>union</b></i> is used within a

+<i><b>struct</b></i> or <i><b>class</b></i> declaration that includes a <i><b>int</b>&nbsp;__union</i>

+field that acts as a <em>discriminant</em> or <em>selector</em> for the <i><b>union</b></i>

+fields. The selector stores run-time usage information about the <i><b>union</b></i>

+fields. That is, the selector is used to enumerate the <i><b>union</b></i> fields such

+that the gSOAP engine is able to select the correct <i><b>union</b></i> field to

+serialize.

+

+<div class="p"><!----></div>

+A <i><b>union</b></i> within a <i><b>struct</b></i> or <i><b>class</b></i> with a selector field

+represents <tt>xs:choice</tt> within a Schema complexType component. For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;ns__PO <br />

+{ ... }; <br />

+<b>struct</b>&nbsp;ns__Invoice <br />

+{ ... }; <br />

+<b>union</b>&nbsp;ns__PO_or_Invoice <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;ns__PO po; <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;ns__Invoice invoice; <br />

+};

+<b>struct</b>&nbsp;ns__composite <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*name; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__union; <br />

+&nbsp;&nbsp;&nbsp;<b>union</b>&nbsp;ns__PO_or_Invoice value; <br />

+};

+</td></tr></table><br></i>

+The <i><b>union</b>&nbsp;ns__PO_or_Invoice</i> is expanded as a <tt>xs:choice</tt>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;complexType name="composite&#187; <br />

+&nbsp;&nbsp;&nbsp;&lt;sequence&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;element name="name" type="xsd:string"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;choice&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;element name="po" type="ns:PO"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;element name="invoice" type="ns:Invoice"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/choice&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;/sequence&#62; <br />

+&lt;/complexType&#62;

+</td></tr></table><br></tt>

+Therefore, the name of the <i><b>union</b></i> and field can be freely chosen.

+However, the <i><b>union</b></i> name should be qualified (as shown in the example) to

+ensure instances of XML Schemas with <tt>elementFormDefault="qualified"</tt> are

+correctly serialized (<i>po</i> and <i>invoice</i> are <tt>ns:</tt> qualified).

+

+<div class="p"><!----></div>

+The <i><b>int</b>&nbsp;__union</i> field selector's values are determined by the

+<i>soapcpp2</i> compiler. Each <i><b>union</b></i> field name has a selector value

+formed by:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+SOAP_UNION_<i>union-name</i>_<i>field-name</i>

+</td></tr></table><br></i>

+These selector values enumerate the <i><b>union</b></i> fields starting with 1. The

+value 0 can be assigned to omit the serialization of the <i><b>union</b></i>, but only

+if explicitly allowed by validation rules, which requires <tt>minOccurs="0"</tt>

+for the <tt>xs:choice</tt> as follows:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;ns__composite <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*name; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__union 0; // <tt>&lt;choice minOccurs="0&#187;</tt> <br />

+&nbsp;&nbsp;&nbsp;<b>union</b>&nbsp;ns__PO_or_Invoice value; <br />

+};

+</td></tr></table><br></i>

+This way we can treat the <i><b>union</b></i> as an optional data item by setting <i>__union=0</i>.

+

+<div class="p"><!----></div>

+The following example shows how the <i><b>struct</b>&nbsp;ns__composite</i> instance is

+initialized for serialization:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;ns__composite data; <br />

+data.name = "..."; <br />

+data.__union = SOAP_UNION_ns__PO_or_Invoice_po; // select PO <br />

+data.value.po.number = ...; // populate the PO

+</td></tr></table><br></i>

+Note that failing to set the selector to a valid <i><b>union</b></i> field can lead to

+a crash of the gSOAP serializer because it will attempt to serialize an invalid

+<i><b>union</b></i> field.

+

+<div class="p"><!----></div>

+For deserialization of <i><b>union</b></i> types, the <i>__union</i> selector will be

+ser to 0 (when permitted) by the gSOAP deserializer or set to one of the

+<i><b>union</b></i> field selector values as determined by the XML payload.

+

+<div class="p"><!----></div>

+When more than one <i><b>union</b></i> is used in a <i><b>struct</b></i> or <i><b>class</b></i>, the

+<i>__union</i> selectors must be renamed to avoid name clashes by using

+suffixes as in:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;ns__composite <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*name; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__union_value; // added suffix "_value" <br />

+&nbsp;&nbsp;&nbsp;<b>union</b>&nbsp;ns__PO_or_Invoice value; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__union_data; // added suffix "_data" <br />

+&nbsp;&nbsp;&nbsp;<b>union</b>&nbsp;ns__Email_or_Fax data; <br />

+};

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc10.7">

+10.7</a>&nbsp;&nbsp;<font color="#0000FF">Serializing Pointer Types</font></h3><a name="sec:pointer">

+</a>

+

+<div class="p"><!----></div>

+The serialization of a pointer to a data type amounts to the serialization of

+the data type in SOAP and the SOAP encoded representation of a pointer to the

+data type is indistinguishable from the encoded representation of the data

+type pointed to.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.7.1">

+10.7.1</a>&nbsp;&nbsp;<font color="#0000FF">Multi-Referenced Data</font></h4>

+

+<div class="p"><!----></div>

+A data structure pointed to by more than one pointer is serialized as SOAP

+multi-reference data. This means that the data will be serialized only once and

+identified with a unique <tt>id</tt> attribute. The encoding of the pointers to

+the shared data is done through the use of <tt>href</tt> attributes to refer to

+the multi-reference data (also see Section&nbsp;<a href="#sec:flags">8.12</a> on options to

+control the serialization of multi-reference data).  Cyclic C/C++ data

+structures are encoded with multi-reference SOAP encoding.  Consider for

+example the following a linked list data structure:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__string; <br />

+<b>struct</b>&nbsp;ns__list<br />

+{ <br />

+&nbsp;&nbsp;&nbsp;xsd__string value; <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;ns__list *next; <br />

+};

+</td></tr></table><br></i>

+Suppose a cyclic linked list is created. The first node contains the value "<tt>abc</tt>" and points to a node with value

+"<tt>def</tt>" which in turn points to the first node. This is encoded as:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;ns:list id="1" xsi:type="ns:list"&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;value xsi:type="xsd:string"&#62;abc&lt;/value&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;next xsi:type="ns:list"&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;value xsi:type="xsd:string"&#62;def&lt;/value&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;next href="#1"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;/next&#62; <br />

+&lt;/ns:list&#62;

+</td></tr></table><br></tt>

+In case multi-referenced data is received that "does not fit in a pointer-based structure", the data is copied.

+For example, the following two <i><b>struct</b></i>s are similar, except that the first uses pointer-based fields while the other uses

+non-pointer-based fields:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>long</b>&nbsp;xsd__int; <br />

+<b>struct</b>&nbsp;ns__record <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;xsd__int *a; <br />

+&nbsp;&nbsp;&nbsp;xsd__int *b; <br />

+} P; <br />

+<b>struct</b>&nbsp;ns__record<br />

+{ <br />

+&nbsp;&nbsp;&nbsp;xsd__int a; <br />

+&nbsp;&nbsp;&nbsp;xsd__int b; <br />

+} R; <br />

+... <br />

+&nbsp;&nbsp;&nbsp;P.a = &amp;n; <br />

+&nbsp;&nbsp;&nbsp;P.b = &amp;n; <br />

+...

+</td></tr></table><br></i>

+Since both <i>a</i> and <i>b</i> fields of <i>P</i> point to the same integer, the encoding of <i>P</i> is multi-reference:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;ns:record xsi:type="ns:record"&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;a href="#1"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;b href="#1"/&#62; <br />

+&lt;/ns:record&#62; <br />

+&lt;id id="1" xsi:type="xsd:int"&#62;123&lt;/id&#62;

+</td></tr></table><br></tt>

+Now, the decoding of the content in the <i>R</i> data structure that does not use pointers to integers results in a copy of each

+multi-reference integer.  Note that the two <i><b>struct</b></i>s resemble the same XML data type because the trailing underscore will be

+ignored in XML encoding and decoding.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.7.2">

+10.7.2</a>&nbsp;&nbsp;<font color="#0000FF">NULL Pointers and Nil Elements</font></h4>

+

+<div class="p"><!----></div>

+A <i>NULL</i> pointer is <b>not</b> serialized, unless the pointer itself is pointed to by another pointer (but see

+Section&nbsp;<a href="#sec:flags">8.12</a> to control the serialization of NULLs).

+For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;X <br />

+{<br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;*p; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;**q; <br />

+}

+</td></tr></table><br></i>

+Suppose pointer <i>q</i> points to pointer <i>p</i> and suppose <i>p=NULL</i>.

+In that case the <i>p</i> pointer is serialized as

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;... id="123" xsi:nil="true"/&#62;

+</td></tr></table><br></tt>

+and the serialization of <i>q</i> refers to <tt>href="#123"</tt>.

+Note that SOAP 1.1 does not support

+pointer to pointer types (!), so this encoding is specific to gSOAP. The pointer to pointer encoding is rarely used in codes

+anyway.  More common is a pointer to a data type such as a <i><b>struct</b></i> with pointer fields.

+

+<div class="p"><!----></div>

+<font color="#FF0000"><b>Caution</b></font>: When the deserializer encounters an XML element that has a <tt>xsi:nil="true"</tt> attribute but the corresponding C++ data is not a pointer or reference,

+the deserializer will terminate with a <i>SOAP_NULL</i> fault when the <i>SOAP_XML_STRICT</i> flag is set.

+The types section of a WSDL description contains information on the "nilability" of data.

+

+<div class="p"><!----></div>

+		     <h3><a name="tth_sEc10.8">

+10.8</a>&nbsp;&nbsp;<font color="#0000FF">Void Pointers</font></h3><a name="sec:void">

+</a>

+

+<div class="p"><!----></div>

+In general, void pointers (<i><b>void</b>*</i>) cannot be (de)serialized because the

+type of data referred to is untyped.  To enable the (de)serialization of the

+void pointers that are members of structs or classes, you can insert a

+<i><b>int</b>&nbsp;__type</i> field right before the void pointer field.  The <i><b>int</b>&nbsp;__

+type</i> field contains run time information on the type of the data pointed to by

+<i><b>void</b>*</i> member in a struct/class to enable the (de)serialization of this

+data.  The <i><b>int</b>&nbsp;__type</i> field is set to a <i>SOAP_TYPE_X</i> value, where <i>X</i> is the name of a type.  gSOAP generates the <i>SOAP_TYPE_X</i> definitions in <i>soapH.h</i> and uses them internally to uniquely identify the type of each object.

+The type naming conventions outlined in

+Section&nbsp;<a href="#sec:serialize">7.5.1</a> are used to determine the type name for <i>X</i>.

+

+<div class="p"><!----></div>

+Here is an example to illustrate the (de)serialization of a <i><b>void</b>*</i> field in a struct:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;myStruct <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__type; // the SOAP_TYPE pointed to by p <br />

+&nbsp;&nbsp;&nbsp;<b>void</b>&nbsp;*p; <br />

+};

+</td></tr></table><br></i>

+The <i>__type</i> integer can be set to 0 at run time to omit the serialization

+of the void pointer field.

+

+<div class="p"><!----></div>

+The following example illustrates the initialization of <i>myStruct</i> with a

+void pointer to an int:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;myStruct S; <br />

+<b>int</b>&nbsp;n; <br />

+S.p = &amp;n; <br />

+S.__type = SOAP_TYPE_int; <br />

+</td></tr></table><br></i>

+The serialized output of <i>S</i> contains the integer.

+

+<div class="p"><!----></div>

+The deserializer for <i>myStruct</i> will automatically set the <i>__type</i>

+field and void pointer to the deserialized data, provided that the XML content

+for <i>p</i> carries the <tt>xsi:type</tt> attribute from which gSOAP can determine

+the type.

+

+<div class="p"><!----></div>

+<font color="#FF0000"><b>Important</b></font>: when (de)serializing strings via a <i><b>void</b>*</i> field, the <i><b>void</b>*</i> pointer MUST directly point to the string value rather than indirectly as with all other types. For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;myStruct S; <br />

+S.p = (<b>void</b>*)"Hello"; <br />

+S.__type = SOAP_TYPE_string; <br />

+</td></tr></table><br></i>

+This is the case for all string-based types, including types defined with <i><b>typedef</b>&nbsp;<b>char</b>*</i>.

+

+<div class="p"><!----></div>

+You may use an arbitrary suffix with the <i>__type</i> fields to handle

+multiple void pointers in structs/classes.  For example

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;myStruct <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__typeOfp; // the SOAP_TYPE pointed to by p <br />

+&nbsp;&nbsp;&nbsp;<b>void</b>&nbsp;*p; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__typeOfq; // the SOAP_TYPE pointed to by q <br />

+&nbsp;&nbsp;&nbsp;<b>void</b>&nbsp;*q; <br />

+};

+</td></tr></table><br></i>

+Because service method parameters are stored within structs, you can use

+<i>__type</i> and <i><b>void</b>*</i> parameters to pass polymorphic arguments without

+having to define a C++ class hierarchy (Section&nbsp;<a href="#sec:polymorph">10.5.6</a>).  For

+example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__string; <br />

+<b>typedef</b>&nbsp;<b>int</b>&nbsp;xsd__int; <br />

+<b>typedef</b>&nbsp;<b>float</b>&nbsp;xsd__float; <br />

+<b>enum</b>&nbsp;ns__status { on, off }; <br />

+<b>struct</b>&nbsp;ns__widget { xsd__string name; xsd__int part; };

+<b>int</b>&nbsp;ns__myMethod(<b>int</b>&nbsp;__type, <b>void</b>&nbsp;*data, <b>struct</b>&nbsp;ns__myMethodResponse { <b>int</b>&nbsp;__type; <b>void</b>&nbsp;*return_; } *out);

+</td></tr></table><br></i>

+This method has a polymorphic input parameter <i>data</i> and a polymorphic

+output parameter <i>return_</i>.  The <i>__type</i> parameters can be one of

+<i>SOAP_TYPE_xsd__string</i>, <i>SOAP_TYPE_xsd__int</i>,

+<i>SOAP_TYPE_xsd__float</i>, <i>SOAP_TYPE_ns__status</i>, or

+<i>SOAP_TYPE_ns__widget</i>.  The WSDL produced by the gSOAP compiler

+declares the polymorphic parameters of type <tt>xsd:anyType</tt> which is "too

+loose" and doesn't allow the gSOAP importer to handle the WSDL accurately.

+Future gSOAP releases might replace <tt>xsd:anyType</tt> with a <tt>choice</tt>

+schema type that limits the choice of types to the types declared in the

+header file.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc10.9">

+10.9</a>&nbsp;&nbsp;<font color="#0000FF">Fixed-Size Arrays</font></h3>

+

+<div class="p"><!----></div>

+Fixed size arrays are encoded as per SOAP 1.1 one-dimensional array types.

+Multi-dimensional fixed size arrays are encoded by gSOAP as nested

+one-dimensional arrays in SOAP.  Encoding of fixed size arrays supports

+partially transmitted and sparse array SOAP formats.

+

+<div class="p"><!----></div>

+The decoding of (multi-dimensional) fixed-size arrays supports the SOAP multi-dimensional array format as well as partially transmitted and sparse array formats.

+

+<div class="p"><!----></div>

+An example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of header file "fixed.h": <br />

+<b>struct</b>&nbsp;Example <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>float</b>&nbsp;a[2][3]; <br />

+};

+</td></tr></table><br></i>

+This specifies a fixed-size array part of the <i><b>struct</b>&nbsp;Example</i>. The encoding of array <i>a</i> is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;a xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="float[][2]"&#62; <br />

+&lt;SOAP-ENC:Array xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="float[3]" <br />

+&lt;float xsi:type="float"&#62;...&lt;/float&#62; <br />

+&lt;float xsi:type="float"&#62;...&lt;/float&#62; <br />

+&lt;float xsi:type="float"&#62;...&lt;/float&#62; <br />

+&lt;/SOAP-ENC:Array&#62; <br />

+&lt;SOAP-ENC:Array xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="float[3]" <br />

+&lt;float xsi:type="float"&#62;...&lt;/float&#62; <br />

+&lt;float xsi:type="float"&#62;...&lt;/float&#62; <br />

+&lt;float xsi:type="float"&#62;...&lt;/float&#62; <br />

+&lt;/SOAP-ENC:Array&#62; <br />

+&lt;/a&#62;

+</td></tr></table><br></tt>

+<font color="#FF0000"><b>Caution</b></font>: Any decoded parts of a (multi-dimensional) array that do not "fit" in the fixed size array are ignored by the deserializer.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc10.10">

+10.10</a>&nbsp;&nbsp;<font color="#0000FF">Dynamic Arrays</font></h3><a name="sec:dynarray">

+</a>

+

+<div class="p"><!----></div>

+As the name suggests, dynamic arrays are much more flexible than fixed-size

+arrays and dynamic arrays are better adaptable to the SOAP encoding and decoding

+rules for arrays.  In addition, a typical C application allocates a dynamic

+array using <i>malloc</i>, assigns the location to a pointer variable, and

+deallocates the array later with <i>free</i>.  A typical C++ application

+allocates a dynamic array using <i>new</i>, assigns the location to a pointer

+variable, and deallocates the array later with <i>delete</i>.  Such dynamic

+allocations are flexible, but pose a problem for the serialization of data: how

+does the array serializer know the length of the array to be serialized given

+only a pointer to the sequence of elements?  The application stores the size

+information somewhere. This information is crucial for the array serializer and

+has to be made explicitly known to the array serializer by packaging the

+pointer and array size information within a <i><b>struct</b></i> or <i><b>class</b></i>.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.10.1">

+10.10.1</a>&nbsp;&nbsp;<font color="#0000FF">SOAP Array Bounds Limits</font></h4>

+

+<div class="p"><!----></div>

+SOAP encoded arrays use the <tt>SOAP-ENC:Array</tt> type and the <tt>SOAP-ENC:arrayType</tt> attribute to define the array dimensionality and size. As a security measure to avoid denial of service attacks based on sending a huge array size value requiring the allocation of large chunks of memory, the total number of array elements set by the <tt>SOAP-ENC:arrayType</tt> attribute cannot exceed <i>SOAP_MAXARRAYSIZE</i>, which is set to 100,000 by default. This constant is defined in <i>stdsoap2.h</i>. This constant <b>only</b> affects multi-dimensional arrays and the dimensionality of the receiving array will be lost when the number of elements exceeds 100,000. One-dimensional arrays will be populated in sequential order as expected.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.10.2">

+10.10.2</a>&nbsp;&nbsp;<font color="#0000FF">One-Dimensional Dynamic Arrays</font></h4>

+

+<div class="p"><!----></div>

+A special form of <i><b>struct</b></i> or <i><b>class</b></i> is used for one-dimensional

+dynamic arrays that contains a pointer variable and a field that records the

+number of elements the pointer points to in memory.

+

+<div class="p"><!----></div>

+The general form of the <i><b>struct</b></i> declaration for one-dimensional dynamic SOAP arrays is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;some_name <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<u><span class="roman">Type</span></u> *__ptr; // pointer to array <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size; // number of elements pointed to <br />

+&nbsp;&nbsp;&nbsp;<font size="+1"><span class="roman">[</span></font><font size="+1"><span class="roman">[</span></font><b>static</b>&nbsp;<b>const</b><font size="+1"><span class="roman">]</span></font> <b>int</b>&nbsp;__offset <font size="+1"><span class="roman">[</span></font>= ...<font size="+1"><span class="roman">]</span></font>;<font size="+1"><span class="roman">]</span></font> // optional SOAP 1.1 array offset <br />

+&nbsp;&nbsp;&nbsp;... // anything that follows here will be ignored <br />

+};

+</td></tr></table><br></i>

+where <i><u><span class="roman">Type</span></u></i> MUST be a type associated with an XML Schema or MUST be a primitive type.

+If these conditions are not met, a vector-like XML (de)serialization is used (see Section&nbsp;<a href="#sec:list">10.10.7</a>).

+A primitive type can be used with or without a <i><b>typedef</b></i>.

+If the array elements are structs or classes, then the <i>struct</i>/<i>class</i> type names should have a namespace prefix for schema

+association, or they should be other (nested) dynamic arrays. 

+

+<div class="p"><!----></div>

+An alternative to a <i><b>struct</b></i> is to use a <i><b>class</b></i> with optional methods that MUST appear after the <i>__ptr</i> and

+<i>__size</i> fields:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>class</b>&nbsp;some_name <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;<u><span class="roman">Type</span></u> *__ptr; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size; <br />

+&nbsp;&nbsp;&nbsp;<font size="+1"><span class="roman">[</span></font><font size="+1"><span class="roman">[</span></font><b>static</b>&nbsp;<b>const</b><font size="+1"><span class="roman">]</span></font> <b>int</b>&nbsp;__offset <font size="+1"><span class="roman">[</span></font>= ...<font size="+1"><span class="roman">]</span></font>;<font size="+1"><span class="roman">]</span></font> <br />

+&nbsp;&nbsp;&nbsp;method1; <br />

+&nbsp;&nbsp;&nbsp;method2; <br />

+&nbsp;&nbsp;&nbsp;... // any fields that follow will be ignored <br />

+};

+</td></tr></table><br></i>

+To encode the data type as an array, the name of the <i><b>struct</b></i> or

+<i><b>class</b></i> SHOULD NOT have a namespace prefix, otherwise the data type will

+be encoded and decoded as a generic vector, see Section&nbsp;<a href="#sec:list">10.10.7</a>.

+

+<div class="p"><!----></div>

+The deserializer of a dynamic array can decode partially transmitted and/or

+SOAP sparse arrays, and even multi-dimensional arrays which will be collapsed

+into a one-dimensional array with row-major ordering.

+

+<div class="p"><!----></div>

+<font color="#FF0000"><b>Caution</b></font>: SOAP 1.2 does not support partially transmitted arrays. So the <i>__offset</i> field of a dynamic array is ignored.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.10.3">

+10.10.3</a>&nbsp;&nbsp;<font color="#0000FF">Example</font></h4>

+

+<div class="p"><!----></div>

+The following example header file specifies the XMethods Service Listing service <i>getAllSOAPServices</i> remote method and an array of <i>SOAPService</i> data structures:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of file "listing.h": <br />

+<b>class</b>&nbsp;ns3__SOAPService <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;ID; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*name; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*owner; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*description; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*homepageURL; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*endpoint; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*SOAPAction; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*methodNamespaceURI; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*serviceStatus; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*methodName; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*dateCreated; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*downloadURL; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*wsdlURL; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*instructions; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*contactEmail; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*serverImplementation; <br />

+}; <br />

+<b>class</b>&nbsp;ServiceArray <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;ns3__SOAPService *__ptr; // points to array elements <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size; // number of elements pointed to <br />

+&nbsp;&nbsp;&nbsp;ServiceArray(); <br />

+&nbsp;&nbsp;&nbsp;~ServiceArray(); <br />

+&nbsp;&nbsp;&nbsp;<b>void</b>&nbsp;print(); <br />

+}; <br />

+<b>int</b>&nbsp;ns__getAllSOAPServices(ServiceArray &amp;return_);

+</td></tr></table><br></i>

+An example client application:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "soapH.h"

+... <br />

+// ServiceArray class method implementations: <br />

+ServiceArray::ServiceArray() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;__ptr = NULL; <br />

+&nbsp;&nbsp;&nbsp;__size = 0; <br />

+} <br />

+ServiceArray::~ServiceArray() <br />

+{ // destruction handled by gSOAP <br />

+} <br />

+<b>void</b>&nbsp;ServiceArray::print() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>for</b>&nbsp;(<b>int</b>&nbsp;i = 0; i &lt; __size; i++) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cout  &lt;&lt;  __ptr[i].name  &lt;&lt;  ": "  &lt;&lt;  __ptr[i].homepage  &lt;&lt;  endl; <br />

+} <br />

+... <br />

+// Request a service listing and display results: <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;ServiceArray result; <br />

+&nbsp;&nbsp;&nbsp;<b>const</b>&nbsp;<b>char</b>&nbsp;*endpoint = "www.xmethods.net:80/soap/servlet/rpcrouter"; <br />

+&nbsp;&nbsp;&nbsp;<b>const</b>&nbsp;<b>char</b>&nbsp;*action = "urn:xmethodsServicesManager#getAllSOAPServices"; <br />

+&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;soap_call_ns__getAllSOAPServices(&amp;soap, endpoint, action, result); <br />

+&nbsp;&nbsp;&nbsp;result.print(); <br />

+&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;soap_destroy(&amp;soap); // dealloc class instances <br />

+&nbsp;&nbsp;&nbsp;soap_end(&amp;soap); // dealloc deserialized data <br />

+&nbsp;&nbsp;&nbsp;soap_done(&amp;soap); // cleanup and detach soap struct <br />

+}

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.10.4">

+10.10.4</a>&nbsp;&nbsp;<font color="#0000FF">One-Dimensional Dynamic Arrays With Non-Zero Offset</font></h4>

+

+<div class="p"><!----></div>

+The declaration of a dynamic array as described in&nbsp;<a href="#sec:dynarray">10.10</a> MAY

+include an <i><b>int</b>&nbsp;__offset</i> field. When set to an integer value, the

+serializer of the dynamic array will use this field as the start index of the

+array and the SOAP array offset attribute will be used in the SOAP payload.

+Note that array offsets is a SOAP 1.1 specific feature which is not supported

+in SOAP 1.2.

+

+<div class="p"><!----></div>

+For example, the following header file declares a mathematical <i>Vector</i>

+class, which is a dynamic array of floating point values with an index that

+starts at 1:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of file "vector.h": <br />

+<b>typedef</b>&nbsp;<b>float</b>&nbsp;xsd__float; <br />

+<b>class</b>&nbsp;Vector <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;xsd__float *__ptr; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__offset; <br />

+&nbsp;&nbsp;&nbsp;Vector(); <br />

+&nbsp;&nbsp;&nbsp;Vector(<b>int</b>&nbsp;n); <br />

+&nbsp;&nbsp;&nbsp;<b>float</b>&amp; <b>operator</b>[](<b>int</b>&nbsp;i); <br />

+}

+</td></tr></table><br></i>

+The implementations of the <i>Vector</i> methods are:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+Vector::Vector() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;__ptr = NULL; <br />

+&nbsp;&nbsp;&nbsp;__size = 0; <br />

+&nbsp;&nbsp;&nbsp;__offset = 1; <br />

+} <br />

+Vector::Vector(<b>int</b>&nbsp;n) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;__ptr = (<b>float</b>*)malloc(n*<b>sizeof</b>(<b>float</b>)); <br />

+&nbsp;&nbsp;&nbsp;__size = n; <br />

+&nbsp;&nbsp;&nbsp;__offset = 1; <br />

+} <br />

+Vector::~Vector() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(__ptr) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(__ptr); <br />

+} <br />

+<b>float</b>&amp; Vector::<b>operator</b>[](<b>int</b>&nbsp;i) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;__ptr[i-__offset]; <br />

+}

+</td></tr></table><br></i>

+An example program fragment that serializes a vector of 3 elements:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap soap; <br />

+soap_init(&amp;soap); <br />

+Vector v(3); <br />

+v[1] = 1.0; <br />

+v[2] = 2.0; <br />

+v[3] = 3.0; <br />

+soap_begin(&amp;soap); <br />

+v.serialize(&amp;soap); <br />

+v.put(<tt>"vec"</tt>); <br />

+soap_end(&amp;soap);

+</td></tr></table><br></i>

+The output is a partially transmitted array:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;vec xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:float[4]" SOAP-ENC:offset="[1]"&#62; <br />

+&lt;item xsi:type="xsd:float"&#62;1.0&lt;/item&#62; <br />

+&lt;item xsi:type="xsd:float"&#62;2.0&lt;/item&#62; <br />

+&lt;item xsi:type="xsd:float"&#62;3.0&lt;/item&#62; <br />

+&lt;/vec&#62;

+</td></tr></table><br></tt>

+Note that the size of the encoded array is necessarily set to 4 and that the encoding omits the non-existent element at index 0.

+

+<div class="p"><!----></div>

+The decoding of a dynamic array with an <i>__offset</i> field is more efficient than decoding a dynamic array without an <i>__offset</i> field, because the <i>__offset</i> field will be assigned the value of the <tt>SOAP-ENC:offset</tt> attribute instead of padding the initial part of the array with default values.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.10.5">

+10.10.5</a>&nbsp;&nbsp;<font color="#0000FF">Nested One-Dimensional Dynamic Arrays</font></h4><a name="sec:nested">

+</a>

+

+<div class="p"><!----></div>

+One-dimensional dynamic arrays MAY be nested.

+For example, using <i><b>class</b>&nbsp;Vector</i> declared in the previous section, <i><b>class</b>&nbsp;Matrix</i> is declared:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// Contents of file "matrix.h": <br />

+<b>class</b>&nbsp;Matrix <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;Vector *__ptr; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__offset; <br />

+&nbsp;&nbsp;&nbsp;Matrix(); <br />

+&nbsp;&nbsp;&nbsp;Matrix(<b>int</b>&nbsp;n, <b>int</b>&nbsp;m); <br />

+&nbsp;&nbsp;&nbsp;~Matrix(); <br />

+&nbsp;&nbsp;&nbsp;Vector&amp; <b>operator</b>[](<b>int</b>&nbsp;i); <br />

+}; 

+</td></tr></table><br></i>

+The Matrix type is essentially an array of pointers to arrays which make up the rows of a matrix.

+The encoding of the two-dimensional dynamic array in SOAP will be in nested form.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.10.6">

+10.10.6</a>&nbsp;&nbsp;<font color="#0000FF">Multi-Dimensional Dynamic Arrays</font></h4>

+

+<div class="p"><!----></div>

+The general form of the <i><b>struct</b></i> declaration for K-dimensional (K &gt; 1) dynamic arrays is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;some_name <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<u><span class="roman">Type</span></u> *__ptr; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size[K]; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__offset[K]; <br />

+&nbsp;&nbsp;&nbsp;... // anything that follows here will be ignored <br />

+};

+</td></tr></table><br></i>

+where <i><u><span class="roman">Type</span></u></i> MUST be a type associated with an XML Schema, which means that it must be a <i><b>typedef</b></i>ed type

+in case of a primitive type, or a <i><b>struct</b></i>/<i><b>class</b></i> name with a namespace prefix for schema association, or another dynamic array. If these conditions are not met, a generic vector XML (de)serialization is used (see Section&nbsp;<a href="#sec:list">10.10.7</a>).

+

+<div class="p"><!----></div>

+An alternative is to use a <i><b>class</b></i> with optional methods:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>class</b>&nbsp;some_name <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;<u><span class="roman">Type</span></u> *__ptr; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size[K]; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__offset[K]; <br />

+&nbsp;&nbsp;&nbsp;method1; <br />

+&nbsp;&nbsp;&nbsp;method2; <br />

+&nbsp;&nbsp;&nbsp;... // any fields that follow will be ignored <br />

+};

+</td></tr></table><br></i>

+In the above, K is a constant denoting the number of dimensions of the multi-dimensional array.

+

+<div class="p"><!----></div>

+To encode the data type as an array, the name of the <i><b>struct</b></i> or <i><b>class</b></i> SHOULD NOT have a namespace prefix, otherwise

+the data type will be encoded and decoded as a generic vector, see Section&nbsp;<a href="#sec:list">10.10.7</a>.

+

+<div class="p"><!----></div>

+The deserializer of a dynamic array can decode partially transmitted multi-dimensional arrays.

+

+<div class="p"><!----></div>

+For example, the following declaration specifies a matrix class:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>double</b>&nbsp;xsd__double; <br />

+<b>class</b>&nbsp;Matrix <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;xsd__double *__ptr; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size[2]; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__offset[2]; <br />

+}; 

+</td></tr></table><br></i>

+In contrast to the matrix class of Section&nbsp;<a href="#sec:nested">10.10.5</a> that defined a matrix as an array of pointers to matrix rows, this

+class has one pointer to a matrix stored in row-major order.  The size of the matrix is determined by the <i>__size</i> field:

+<i>__size[0]</i> holds the number of rows and <i>__size[1]</i> holds the number of columns of the matrix.  Likewise, <i>__

+offset[0]</i> is the row offset and <i>__offset[1]</i> is the columns offset.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.10.7">

+10.10.7</a>&nbsp;&nbsp;<font color="#0000FF">Encoding XML Generics Containing Dynamic Arrays</font></h4><a name="sec:list">

+</a>

+

+<div class="p"><!----></div>

+XML "generics" extend the concept of a struct by allowing repetitions of elements within the struct.

+A simple generic is an array-like data structure with a repetition of one element.

+To achieve this, declare a dynamic array as a <i><b>struct</b></i> or <i><b>class</b></i> with a name that is qualified with

+a namespace prefix.  SOAP arrays are declared without prefix.

+

+<div class="p"><!----></div>

+For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;ns__Map <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;ns__Binding {<b>char</b>&nbsp;*key; <b>char</b>&nbsp;*val;} *__ptr; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size; <br />

+};

+</td></tr></table><br></i>

+This declares a dynamic array, but the array will be serialized and deserialized as a generic with a list-like data structure. For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;ns:Map xsi:type="ns:Map"&#62; <br />

+&lt;ns:Binding xsi:type="ns:Binding"&#62; <br />

+&lt;key&#62;Joe&lt;/key&#62; <br />

+&lt;val&#62;555 77 1234&lt;/val&#62; <br />

+&lt;/ns:Binding&#62; <br />

+&lt;ns:Binding xsi:type="ns:Binding"&#62; <br />

+&lt;key&#62;Susan&lt;/key&#62; <br />

+&lt;val&#62;555 12 6725&lt;/val&#62; <br />

+&lt;/ns:Binding&#62; <br />

+&lt;ns:Binding xsi:type="ns:Binding"&#62; <br />

+&lt;key&#62;Pete&lt;/key&#62; <br />

+&lt;val&#62;555 99 4321&lt;/val&#62; <br />

+&lt;/ns:Binding&#62; <br />

+&lt;/ns:Map&#62;

+</td></tr></table><br></tt>

+Deserialization is less efficient compared to an array, because the size of the

+list is not part of the SOAP encoding. Internal buffering is used by the

+deserializer to collect the elements. When the end of the list is reached, the

+buffered elements are copied to a newly allocated space on the heap for the

+dynamic array.

+

+<div class="p"><!----></div>

+Multiple arrays can be used in a struct/class to support the concept of

+generics.  Each array results in a repetition of elements in the struct/class.

+This is achieved with a <i><b>int</b>&nbsp;__size</i> field in the struct/class where the

+next field (i.e.&nbsp;below the <i>__size</i> field) is a pointer type.  The pointer

+type is assumed to point to an array of values at run time.  The <i>__size</i>

+field holds the number of values at run time.  Multiple arrays can be embedded

+in a struct/class with <i>__size</i> fields that have a distinct names.  To

+make the <i>__size</i> fields distinct, you can end them with a unique name

+suffix such as <i>__sizeOfstrings</i>, for example.

+

+<div class="p"><!----></div>

+The general convention for embedding arrays is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;ns__SomeStruct <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size<u><span class="roman">name1</span></u>; // number of elements pointed to <br />

+&nbsp;&nbsp;&nbsp;<u><span class="roman">Type1</span></u> *<u>field1</u>; // by this field <br />

+&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size<u><span class="roman">name2</span></u>; // number of elements pointed to <br />

+&nbsp;&nbsp;&nbsp;<u><span class="roman">Type2</span></u> *<u>field2</u>; // by this field <br />

+&nbsp;&nbsp;&nbsp;... <br />

+};

+</td></tr></table><br></i>

+where <i><u><span class="roman">name1</span></u></i> and <i><u><span class="roman">name2</span></u></i> are identifiers used as a suffix to distinguish the <i>__

+size</i> field. These names can be arbitrary and are not visible in XML.

+

+<div class="p"><!----></div>

+For example, the following struct has two embedded arrays:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;ns__Contact <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*firstName; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*lastName; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__sizePhones; <br />

+&nbsp;&nbsp;&nbsp;ULONG64 *phoneNumber; // array of phone numbers <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__sizeEmails; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;**emailAddress; // array of email addresses <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*socSecNumber; <br />

+};

+</td></tr></table><br></i>

+The XML serialization of an example <i>ns__Contact</i> is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;mycontact xsi:type="ns:Contact"&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;firstName&#62;Joe&lt;/firstName&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;lastName&#62;Smith&lt;/lastName&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;phoneNumber&#62;5551112222&lt;/phoneNumber&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;phoneNumber&#62;5551234567&lt;/phoneNumber&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;phoneNumber&#62;5552348901&lt;/phoneNumber&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;emailAddress&#62;Joe.Smith@mail.com&lt;/emailAddress&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;emailAddress&#62;Joe@Smith.com&lt;/emailAddress&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;socSecNumber&#62;999999999&lt;/socSecNumber&#62; <br />

+&lt;/mycontact&#62;

+</td></tr></table><br></tt>

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.10.8">

+10.10.8</a>&nbsp;&nbsp;<font color="#0000FF">STL Containers</font></h4><a name="sec:templates">

+</a>

+

+<div class="p"><!----></div>

+gSOAP supports the STL containers <i>std::deque</i>, <i>std::list</i>,

+<i>std::set</i>, and <i>std::vector</i>.

+

+<div class="p"><!----></div>

+STL containers can only be used within classes to declare members that contain

+multiple values.  This is somewhat similar to the embedding of arrays in

+structs in C as explained in Section&nbsp;<a href="#sec:list">10.10.7</a>, but the STL container

+approach is more flexible.

+

+<div class="p"><!----></div>

+You need to import <i>stldeque.h</i>, <i>stllist.h</i>, <i>stlset.h</i>, or

+<i>stlvector.h</i> to enable <i>std::deque</i>, <i>std::list</i>, <i>std::set</i>,

+and <i>std::vector</i> (de)serialization.

+Here is an example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#import "stlvector.h" <br />

+<b>class</b>&nbsp;ns__myClass <br />

+{ <b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;std::vector &lt; int &gt;  *number; <br />

+&nbsp;&nbsp;&nbsp;std::vector &lt; xsd__string &gt;  *name; <br />

+&nbsp;&nbsp;&nbsp;... <br />

+};

+</td></tr></table><br></i>

+The use of pointer members is not required but advised. The reason is that

+interoperability with other SOAP toolkits may lead to copying of <i>ns__

+myClass</i> instances at run time when (de)serializing multi-referenced data.

+When a copy is made, certain parts of the containers will be shared between the

+copies which could lead to disaster when the classes with their containers are

+deallocated.  Another way to avoid this is to declare class <i>ns__myClass</i>

+within other data types via a pointer.  (Interoperability between gSOAP clients

+and services does not lead to copying.)

+

+<div class="p"><!----></div>

+The XML Schema that corresponds to the <i>ns__myClass</i> type is

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;complexType name="myClass&#187; <br />

+&nbsp;&nbsp;&nbsp;&lt;sequence&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;element name="number" type="xsd:int" minOccurs="1" maxOccurs="unbounded"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;element name="name" type="xsd:string" minOccurs="1" maxOccurs="unbounded"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;&lt;/sequence&#62; <br />

+&lt;/complexType&#62;

+</td></tr></table><br></tt>

+You can specify the minOccurs and maxOccurs values as explained in Section&nbsp;<a href="#sec:directives">18.2</a>.

+

+<div class="p"><!----></div>

+You can also implement your own

+containers similar to STL containers. The containers must be class templates and should define an iterator type, and <i><b>void</b>&nbsp;clear()</i>, <i>iterator begin()</i>, <i>iterator end()</i>, and <i>iterator insert(iterator pos, const_reference val)</i>.

+The <i>iterator</i> should have a dereference operator to

+access the container's elements.  The dereference operator is used by gSOAP to

+send a sequence of XML element values.  The <i>insert</i> method can be used as

+a setter method.  gSOAP reads a sequence of XML element values and inserts them

+in the container via this method.  

+

+<div class="p"><!----></div>

+Here is in example user-defined container template class:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+// simpleVector.h <br />

+<b>template</b>&nbsp; &lt; <b>class</b>&nbsp;T &gt;  <br />

+<b>class</b>&nbsp;simpleVector <br />

+{ <br />

+<b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;<b>typedef</b>&nbsp;T			  value_type; <br />

+&nbsp;&nbsp;&nbsp;<b>typedef</b>&nbsp;value_type		* pointer; <br />

+&nbsp;&nbsp;&nbsp;<b>typedef</b>&nbsp;const value_type	* const_pointer; <br />

+&nbsp;&nbsp;&nbsp;<b>typedef</b>&nbsp;value_type		&amp; reference; <br />

+&nbsp;&nbsp;&nbsp;<b>typedef</b>&nbsp;const value_type	&amp; const_reference; <br />

+&nbsp;&nbsp;&nbsp;<b>typedef</b>&nbsp;pointer		  iterator; <br />

+&nbsp;&nbsp;&nbsp;<b>typedef</b>&nbsp;const_pointer		  const_iterator; <br />

+<b>protected</b>: <br />

+&nbsp;&nbsp;&nbsp;iterator			  start; <br />

+&nbsp;&nbsp;&nbsp;iterator			  finish; <br />

+&nbsp;&nbsp;&nbsp;size_t			  length; <br />

+<b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;simpleVector()	{ clear(); } <br />

+&nbsp;&nbsp;&nbsp;~simpleVector()	{ <b>delete</b>[] start; } <br />

+&nbsp;&nbsp;&nbsp;<b>void</b>\				  clear()		{ start = finish = NULL; } <br />

+&nbsp;&nbsp;&nbsp;iterator			  begin()		{ <b>return</b>&nbsp;start; } <br />

+&nbsp;&nbsp;&nbsp;const_iterator		  begin() <b>const</b>\		{ <b>return</b>&nbsp;start; } <br />

+&nbsp;&nbsp;&nbsp;iterator			  end()			{ <b>return</b>&nbsp;finish; } <br />

+&nbsp;&nbsp;&nbsp;const_iterator		  end() <b>const</b>\		{ <b>return</b>&nbsp;finish; } <br />

+&nbsp;&nbsp;&nbsp;size_t		  size() <b>const</b>\		{ <b>return</b>&nbsp;finish-start; } <br />

+&nbsp;&nbsp;&nbsp;iterator			  insert(iterator pos, const_reference val) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!start) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;start = finish = <b>new</b>&nbsp;value_type[length = 4]; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>else</b>&nbsp;<b>if</b>&nbsp;(finish  &gt; = start + length) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iterator i = start; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iterator j = <b>new</b>&nbsp;value_type[2 * length]; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;start = j; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;finish = start + length; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;length *= 2; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(pos) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pos = j + (pos - i); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>while</b>&nbsp;(i != finish) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*j++ = *i++; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(pos &amp;&amp; pos != finish) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ iterator i = finish; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iterator j = i - 1; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>while</b>&nbsp;(j != pos) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*i- = *j-; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*finish++ = val; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;pos; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+};

+</td></tr></table><br></i>

+To enable the container, we add the following two lines to our gSOAP header file:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "simpleVector.h" <br />

+<b>template</b>&nbsp; &lt; class T &gt;  <b>class</b>&nbsp;simpleVector;

+</td></tr></table><br></i>

+The container class

+should not be defined in the gSOAP header file. It must be defined in

+a separate header file (e.g.&nbsp;"simpleVector.h"). The <i><b>template</b>&nbsp; &lt; class T &gt;  <b>class</b>&nbsp;simpleVector</i> declaration ensures that gSOAP will recognize <i>simpleVector</i> as a container class.

+

+<div class="p"><!----></div>

+<font color="#FF0000"><b>Caution</b></font>: when parsing XML content the container elements may not be stored in the same order given in

+the XML content.  When gSOAP parses XML it uses the <i>insert</i> container methods to

+store elements one by one.  However, element content that is "forwarded" with

+<tt>href</tt> attributes will be appended to the container.  Forwarding can take

+place with multi-referenced data that is referred to from the main part of the

+SOAP 1.1 XML message to the independent elements that carry <tt>id</tt>s.

+Therefore, your application should not rely on the preservation of the order of

+elements in a container.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.10.9">

+10.10.9</a>&nbsp;&nbsp;<font color="#0000FF">Polymorphic Dynamic Arrays and Lists</font></h4>

+

+<div class="p"><!----></div>

+Polymorphic arrays (arrays of polymorphic element types) can be encoded when

+declared as an array of pointers to class instances.  and lists.  For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>class</b>&nbsp;ns__Object <br />

+{<br />

+&nbsp;&nbsp;&nbsp;<b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;... <br />

+}; <br />

+<b>class</b>&nbsp;ns__Data: <b>public</b>&nbsp;ns__Object <br />

+{<br />

+&nbsp;&nbsp;&nbsp;<b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;... <br />

+}; <br />

+<b>class</b>&nbsp;ArrayOfObject <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;ns__Object **__ptr; // pointer to array of pointers to Objects <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size; // number of Objects pointed to <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__offset; // optional SOAP 1.1 array offset <br />

+}; 

+</td></tr></table><br></i>

+The pointers in the array can point to the <i>ns__Object</i> base class or

+<i>ns__Data</i> derived class instances which will be serialized and

+deserialized accordingly in SOAP.  That is, the array elements are polymorphic.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc10.10.10">

+10.10.10</a>&nbsp;&nbsp;<font color="#0000FF">How to Change the Tag Names of the Elements of a SOAP Array or List</font></h4>

+

+<div class="p"><!----></div>

+The <i>__ptr</i> field in a <i><b>struct</b></i> or <i><b>class</b></i> declaration of a dynamic array may have an optional suffix part that

+describes the name of the tags of the SOAP array XML elements.

+The suffix is part of the field name:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<u><span class="roman">Type</span></u> *__ptr<u><span class="roman">array_elt_name</span></u>

+</td></tr></table><br></i>

+The suffix describes the tag name to be used for all array elements. The usual identifier to XML translations apply, see

+Section&nbsp;<a href="#sec:idtrans">9.3</a>.

+The default XML element tag name for array elements is <tt>item</tt> (which corresponds to the use of field name <i>__ptritem</i>).

+

+<div class="p"><!----></div>

+Consider for example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;ArrayOfstring <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;xsd__string *__ptrstring;

+&nbsp;&nbsp;&nbsp;int __size;

+};

+</td></tr></table><br></i>

+The array is serialized as:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;array xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[2]&#187; <br />

+&lt;string xsi:type="xsd:string&#187;Hello&lt;/string&#62; <br />

+&lt;string xsi:type="xsd:string&#187;World&lt;/string&#62; <br />

+&lt;/array&#62;

+</td></tr></table><br></tt>

+SOAP 1.1 and 1.2 do not require the use of a specific tag name for array elements.  gSOAP will deserialize a SOAP array while

+ignoring the tag names. Certain XML Schemas used in doc/literal encoding may require the declaration of array element tag names.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc10.11">

+10.11</a>&nbsp;&nbsp;<font color="#0000FF">Base64Binary XML Schema Type Encoding</font></h3><a name="sec:base64binary">

+</a>

+

+<div class="p"><!----></div>

+The <tt>base64Binary</tt> XML Schema type is a special form of dynamic array declared with a pointer (<i>__ptr</i>) to an

+<i><b>unsigned</b>&nbsp;<b>char</b></i> array.

+

+<div class="p"><!----></div>

+For example using a <i><b>struct</b></i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;xsd__base64Binary <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>unsigned</b>&nbsp;<b>char</b>&nbsp;*__ptr; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size; <br />

+};

+</td></tr></table><br></i>

+Or with a <i><b>class</b></i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>class</b>&nbsp;xsd__base64Binary <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;<b>unsigned</b>&nbsp;<b>char</b>&nbsp;*__ptr; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size; <br />

+};

+</td></tr></table><br></i>

+When compiled by the gSOAP stub and skeleton compiler, this header file specification will generate <tt>base64Binary</tt> serializers and deserializers.

+

+<div class="p"><!----></div>

+The <tt>SOAP_ENC:base64</tt> encoding is another type for base 64 binary encoding

+specified by the SOAP data type schema and some SOAP applications may use this form

+(as indicated by their WSDL descriptions). It is declared by:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;SOAP_ENC__base64 <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>unsigned</b>&nbsp;<b>char</b>&nbsp;*__ptr; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size; <br />

+};

+</td></tr></table><br></i>

+Or with a <i><b>class</b></i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>class</b>&nbsp;SOAP_ENC__base64 <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>unsigned</b>&nbsp;<b>char</b>&nbsp;*__ptr; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size; <br />

+};

+</td></tr></table><br></i>

+When compiled by the gSOAP stub and skeleton compiler, this header file specification will generate <tt>SOAP-ENC:base64</tt> serializers and deserializers.

+

+<div class="p"><!----></div>

+The advantage of using a <i><b>class</b></i> is that methods can be used to initialize and manipulate the <i>__ptr</i> and <i>__size</i> fields. The user can add methods to this class to do this. For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>class</b>&nbsp;xsd__base64Binary <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;<b>unsigned</b>&nbsp;<b>char</b>&nbsp;*__ptr; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size; <br />

+&nbsp;&nbsp;&nbsp;xsd__base64Binary(); // Constructor <br />

+&nbsp;&nbsp;&nbsp;xsd__base64Binary(<b>struct</b>&nbsp;soap *soap, <b>int</b>&nbsp;n); // Constructor <br />

+&nbsp;&nbsp;&nbsp;~xsd__base64Binary(); // Destructor <br />

+&nbsp;&nbsp;&nbsp;<b>unsigned</b>&nbsp;<b>char</b>&nbsp;*location(); // returns the memory location <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;size(); // returns the number of bytes <br />

+};

+</td></tr></table><br></i>

+Here are example method implementations:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+xsd__base64Binary::xsd__base64Binary() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;__ptr = NULL; <br />

+&nbsp;&nbsp;&nbsp;__size = 0; <br />

+} <br />

+xsd__base64Binary::xsd__base64Binary(<b>struct</b>&nbsp;soap *soap, <b>int</b>&nbsp;n) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;__ptr = (<b>unsigned</b>&nbsp;<b>char</b>*)soap_malloc(soap, n); <br />

+&nbsp;&nbsp;&nbsp;__size = n; <br />

+} <br />

+xsd__base64Binary::~xsd__base64Binary() <br />

+{ } <br />

+<b>unsigned</b>&nbsp;<b>char</b>&nbsp;*xsd__base64Binary::location() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;__ptr; <br />

+} <br />

+<b>int</b>&nbsp;xsd__base64Binary::size() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;__size; <br />

+}

+</td></tr></table><br></i>

+The following example in C/C++ reads from a raw image file and encodes the image in SOAP using the <tt>base64Binary</tt> type:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+... <br />

+FILE *fd = fopen(<tt>"image.jpg"</tt>, <tt>"rb"</tt>); <br />

+xsd__base64Binary image(&amp;soap, filesize(fd)); <br />

+fread(image.location(), image.size(), 1, fd); <br />

+fclose(fd); <br />

+soap_begin(&amp;soap); <br />

+image.soap_serialize(&amp;soap); <br />

+image.soap_put(&amp;soap, <tt>"jpegimage"</tt>, NULL); <br />

+soap_end(&amp;soap); <br />

+...

+</td></tr></table><br></i>

+where <i>filesize</i> is a function that returns the size of a file given a file descriptor.

+

+<div class="p"><!----></div>

+Reading the <tt>xsd:base64Binary</tt> encoded image.

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+... <br />

+xsd__base64Binary image; <br />

+soap_begin(&amp;soap); <br />

+image.get(&amp;soap, <tt>"jpegimage"</tt>); <br />

+soap_end(&amp;soap); <br />

+...

+</td></tr></table><br></i>

+The <i><b>struct</b></i> or <i><b>class</b></i> name <i>soap_enc__base64</i> should be used for <tt>SOAP-ENC:base64</tt> schema type instead of

+<i>xsd__base64Binary</i>.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc10.12">

+10.12</a>&nbsp;&nbsp;<font color="#0000FF">hexBinary XML Schema Type Encoding</font></h3><a name="sec:hexbinary">

+</a>

+

+<div class="p"><!----></div>

+The <tt>hexBinary</tt> XML Schema type is a special form of dynamic array declared with the name <i>xsd__hexBinary</i> and a pointer (<i>__ptr</i>) to an <i><b>unsigned</b>&nbsp;<b>char</b></i> array.

+

+<div class="p"><!----></div>

+For example, using a <i><b>struct</b></i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;xsd__hexBinary <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>unsigned</b>&nbsp;<b>char</b>&nbsp;*__ptr; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size; <br />

+};

+</td></tr></table><br></i>

+Or using a <i><b>class</b></i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>class</b>&nbsp;xsd__hexBinary <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>public</b>: <br />

+&nbsp;&nbsp;&nbsp;<b>unsigned</b>&nbsp;<b>char</b>&nbsp;*__ptr; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size; <br />

+};

+</td></tr></table><br></i>

+When compiled by the gSOAP stub and skeleton compiler, this header file specification will generate <tt>base64Binary</tt> serializers and deserializers.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc10.13">

+10.13</a>&nbsp;&nbsp;<font color="#0000FF">Literal XML Encoding Style</font></h3><a name="sec:literal">

+</a>

+

+<div class="p"><!----></div>

+gSOAP supports document/literal encoding by default.

+Just as with SOAP RPC encoding, literal encoding requires the XML Schema of the message data to be provided

+e.g.&nbsp;in WSDL in order for the

+gSOAP compiler to generate the (de)serialization routines.  Alternatively, the

+optional DOM parser (<i>dom.c</i> and <i>dom++.cpp</i>) can be used to handle generic XML or

+arbitrary XML documents can be (de)serialized into regular C strings or wide

+character strings (<i>wchar_t*</i>) by gSOAP (see Section&nbsp;<a href="#sec:literal2">10.13.1</a>).

+

+<div class="p"><!----></div>

+The <i>//gsoap service encoding</i>, <i>//gsoap service method-encoding</i>, and <i>//gsoap service method-response-encoding</i> directives explicitly enable SOAP encoded or literal encoded messages. For example, to enable RPC encoding style for the entire service, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap ns service encoding: encoded

+</td></tr></table><br></i>

+To enable encoding for particular service methods, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap ns service method-encoding: myMethod encoded <br />

+<b>int</b>&nbsp;ns__myMethod(...)

+</td></tr></table><br></i>

+To enable encoding for particular service methods responses when the method request is literal, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap ns service method-response-encoding: myMethod encoded <br />

+<b>int</b>&nbsp;ns__myMethod(...)

+</td></tr></table><br></i>

+Instead of the <i>encoded</i> value, you can use <i>literal</i>, or a specific encoding style value.

+

+<div class="p"><!----></div>

+Consider the following example that uses the directive to make the literal encoding explicit.

+The <i>LocalTimeByZipCode</i> remote service method of the LocalTime service provides

+the local time given a zip code and uses literal encoding (with MS

+.NET).  The following header file declares the method: <br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>int

+LocalTimeByZipCode(<b>char</b>&nbsp;*ZipCode, <b>char</b>&nbsp;**LocalTimeByZipCodeResult);

+</td></tr></table><br></i> Note that none of the data types need to be namespace qualified using

+namespace prefixes.

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap ns service name: localtime <br />

+//gsoap ns service encoding: literal <br />

+//gsoap ns service namespace: http://alethea.net/webservices/ <br />

+<b>int</b>&nbsp;ns__LocalTimeByZipCode(<b>char</b>&nbsp;*ZipCode, <b>char</b>&nbsp;**LocalTimeByZipCodeResult);

+</td></tr></table><br></i>

+In this case, the method name requires to be associated with a schema through a namespace prefix, e.g. <i>ns</i> is used in this example.

+See Section&nbsp;<a href="#sec:directives">18.2</a> for more details on gSOAP directives.

+With these directives, the gSOAP compiler generates client and server sources with the specified settings.

+

+<div class="p"><!----></div>

+The example client program is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "soapH.h" <br />

+#include "localtime.nsmap" // include generated map file <br />

+<b>int</b>&nbsp;main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*t; <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_call_ns__LocalTimeByZipCode(&amp;soap, "http://alethea.net/webservices/LocalTime.asmx", "http://alethea.net/webservices/LocalTimeByZipCode", "32306", &amp;t)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); <br />

+&nbsp;&nbsp;&nbsp;<b>else</b><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf("Time = %s<tt>\n</tt>", t); <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;0; <br />

+} <br />

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+To illustrate the manual doc/literal setting, the following client program sets

+the required properties before the call:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "soapH.h" <br />

+#include "localtime.nsmap" // include generated map file <br />

+<b>int</b>&nbsp;main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*t; <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;soap.encodingStyle = NULL; // don't use SOAP encoding <br />

+&nbsp;&nbsp;&nbsp;soap_set_omode(&amp;soap, SOAP_XML_TREE);" // don't produce multi-ref data (but can accept) <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_call_ns__LocalTimeByZipCode(&amp;soap, "http://alethea.net/webservices/LocalTime.asmx", "http://alethea.net/webservices/LocalTimeByZipCode", "32306", &amp;t)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); <br />

+&nbsp;&nbsp;&nbsp;<b>else</b><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf("Time = %s<tt>\n</tt>", t); <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;0; <br />

+}

+</td></tr></table><br></i>

+The SOAP request is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+POST /webservices/LocalTime.asmx HTTP/1.0 <br />

+Host: alethea.net <br />

+Content-Type: text/xml; charset=utf-8 <br />

+Content-Length: 479 <br />

+SOAPAction: "http://alethea.net/webservices/LocalTimeByZipCode" <br />

+<br />

+&lt;?xml version="1.0" encoding=&#220;TF-8"?&#62; <br />

+&lt;SOAP-ENV:Envelope <br />

+&nbsp;&nbsp;&nbsp;xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" <br />

+&nbsp;&nbsp;&nbsp;xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" <br />

+&nbsp;&nbsp;&nbsp;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <br />

+&nbsp;&nbsp;&nbsp;xmlns:xsd="http://www.w3.org/2001/XMLSchema" <br />

+&nbsp;&nbsp;&nbsp;&lt;SOAP-ENV:Body&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;LocalTimeByZipCode xmlns="http://alethea.net/webservices/"&#62; <br />

+&lt;ZipCode&#62;32306&lt;/ZipCode&#62;&lt;/LocalTimeByZipCode&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;/SOAP-ENV:Body&#62; <br />

+&lt;/SOAP-ENV:Envelope&#62;

+</td></tr></table><br></tt>

+

+<div class="p"><!----></div>

+	      <h4><a name="tth_sEc10.13.1">

+10.13.1</a>&nbsp;&nbsp;<font color="#0000FF">Serializing and Deserializing Mixed Content XML With Strings</font></h4><a name="sec:literal2">

+</a>

+

+<div class="p"><!----></div>

+To declare a literal XML "type" to hold XML documents in regular strings, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*XML;

+</td></tr></table><br></i>

+To declare a literal XML "type" to hold XML documents in wide character strings, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;wchar_t *XML;

+</td></tr></table><br></i>

+Note: only one of the two storage formats can be used.

+The differences between the use of regular strings versus wide character strings for XML documents are:

+

+<ul>

+<li> Regular strings for XML documents MUST hold UTF-8 encoded XML documents. That is, the string MUST contain the proper UTF-8

+encoding to exchange the XML document in SOAP messages.

+<div class="p"><!----></div>

+</li>

+

+<li> Wide character strings for XML documents SHOULD NOT hold UTF-8 encoded XML documents. Instead, the UTF-8 translation is done automatically by

+the gSOAP runtime marshalling routines.

+<div class="p"><!----></div>

+</li>

+</ul>

+Here is an example of a remote method specification in which the parameters of the remote method uses literal XML encoding to pass

+an XML document to a service and back:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*XML; <br />

+ns__GetDocument(XML m__XMLDoc, XML &amp;m__XMLDoc_);

+</td></tr></table><br></i>

+The <i>ns__Document</i> is essentially a <i><b>struct</b></i> that forms the root of the XML document.

+The use of the underscore in the <i>ns__Document</i> response part of the message avoids the name clash between the

+<i><b>struct</b></i>s.

+Assuming that the namespace mapping table contains the binding of <i>ns</i> to <tt>http://my.org/</tt>

+and the binding of <i>m</i> to <tt>http://my.org/mydoc.xsd</tt>, the XML message is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;?xml version="1.0" encoding="UTF-8"?&#62; <br />

+&lt;SOAP-ENV:Envelope <br />

+&nbsp;&nbsp;&nbsp;xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" <br />

+&nbsp;&nbsp;&nbsp;xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" <br />

+&nbsp;&nbsp;&nbsp;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <br />

+&nbsp;&nbsp;&nbsp;xmlns:xsd="http://www.w3.org/2001/XMLSchema" <br />

+&nbsp;&nbsp;&nbsp;xmlns:ns="http://my.org/" <br />

+&nbsp;&nbsp;&nbsp;xmlns:m="http://my.org/mydoc.xsd" <br />

+&nbsp;&nbsp;&nbsp;SOAP-ENV:encodingStyle=""&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;SOAP-ENV:Body&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ns:GetDocument&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;XMLDoc xmlns="http://my.org/mydoc.xsd"&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/XMLDoc&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ns:Document&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;/SOAP-ENV:Body&#62; <br />

+&lt;/SOAP-ENV:Envelope&#62;

+</td></tr></table><br></tt>

+When using literal encoding of method parameters and response as shown in the example above, the literal XML encoding style MUST be specified by setting <i>soap.encodingStyle</i>.

+For example, to specify no constraints on the encoding style (which is typical) use NULL:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap soap; <br />

+soap_init(&amp;soap); <br />

+soap.encodingStyle = NULL;

+</td></tr></table><br></i>

+As a result, the <tt>SOAP-ENV:encodingStyle</tt> attribute will not appear in the SOAP payload.

+

+<div class="p"><!----></div>

+For interoperability with Apache SOAP, use

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap soap; <br />

+soap_init(&amp;soap); <br />

+soap.encodingStyle = "http://xml.apache.org/xml-soap/literalxml";

+</td></tr></table><br></i>

+When the response parameter is an XML type, it will store the entire XML response content but without the enveloping response element.

+

+<div class="p"><!----></div>

+The XML type can be used as part of any data structure to enable the rendering and parsing of custom XML documents. For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*XML; <br />

+<b>struct</b>&nbsp;ns__Data /* data in namespace 'ns' */ <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;number; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*name; <br />

+&nbsp;&nbsp;&nbsp;XML m__document; /* XML document in default namespace 'm' */ <br />

+}; <br />

+ns__Example(<b>struct</b>&nbsp;ns__Data data, <b>struct</b>&nbsp;ns__ExampleResponse { <b>struct</b>&nbsp;ns__Data data; } *out);

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+ <h2><a name="tth_sEc11">

+11</a>&nbsp;&nbsp;<font color="#0000FF">SOAP Fault Processing</font></h2><a name="sec:fault">

+</a>

+

+<div class="p"><!----></div>

+A predeclared standard SOAP Fault data structure is generated by the gSOAP stub and skeleton compiler for exchanging exception messages.

+The built-in <i><b>struct</b>&nbsp;SOAP_ENV__Fault</i> data structure is defined as:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;SOAP_ENV__Fault <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;_QName faultcode; // _QName is builtin <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*faultstring; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*faultactor; <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;SOAP_ENC__Detail *detail; <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;SOAP_ENV__Code *SOAP_ENV__Code; // MUST be a SOAP_ENV__Code struct defined below <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*SOAP_ENV__Reason; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*SOAP_ENV__Node; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*SOAP_ENV__Role; <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;SOAP_ENV__Detail SOAP_ENV__Detail; // SOAP 1.2 detail field <br />

+};

+<b>struct</b>&nbsp;SOAP_ENV__Code <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;_QName SOAP_ENV__Value; <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;SOAP_ENV__Code *SOAP_ENV__Subcode;

+}; <br />

+<b>struct</b>&nbsp;SOAP_ENV__Detail <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__type; // The SOAP_TYPE_ of the object serialized as Fault detail <br />

+&nbsp;&nbsp;&nbsp;<b>void</b>&nbsp;*fault; // pointer to the fault object, or NULL <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*__any; // any other detail element content (stored in XML format) <br />

+};

+</td></tr></table><br></i>

+The first four fields in <i>SOAP_ENV__Fault</i> are SOAP 1.1 specific. The last five fields are SOAP 1.2 specific.

+You can redefine these structures in the header file. For example, you can use a <i>class</i> for the <i>SOAP_ENV__Fault</i> and add methods for convenience.

+

+<div class="p"><!----></div>

+The data structure content can be changed to the need of an application, but this is generally not necessary because the application-specific SOAP Fault details can be serialized via the <i>__type</i> and <i>fault</i> fields in the <i>SOAP_ENV__Detail</i> field, see Section&nbsp;<a href="#sec:void">10.8</a> on the serialization of data refered to by <i>__type</i> and <i>fault</i>.

+

+<div class="p"><!----></div>

+The <i>__type</i> field allows application data to be serialized as part of the SOAP Fault. The application data SHOULD be defined as XML elements, which requires you to declare the type names with a leading underscore to ensure that the types are compatible with XML elements and not just simpleTypes and complexTypes.

+

+<div class="p"><!----></div>

+When the skeleton of a remote method returns an error (see Section&nbsp;<a href="#sec:errcodes">9.2</a>), then <i>soap.fault</i> contains the SOAP

+Fault data at the receiving side (client).

+

+<div class="p"><!----></div>

+Server-side faults are raised with <i>soap_sender_fault</i> or <i>soap_receiver_fault</i>. The <i>soap_sender_fault</i> call should be used to inform that the sender is at fault and the sender (client) should not resend the request. The <i>soap_receiver_fault</i> call should be used to indicate a temporary server-side problem, so a sender (client) can resend the request later. For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;ns1__myMethod(<b>struct</b>&nbsp;soap *soap, ...) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;soap_receiver_fault(soap, "Resource temporarily unavailable", NULL); // return fault to sender <br />

+}

+</td></tr></table><br></i>

+In the example, the SOAP Fault details were empty (NULL). You may pass an XML fragment, which will be literally included in the SOAP Fault message. For WS-I Basic Profile compliance, you must pass an XML string with one or more namespace qualified elements, such as:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>return</b>&nbsp;soap_receiver_fault(soap, "Resource temporarily unavailable", " &lt; errorcode xmlns='http://tempuri.org' &gt; 123 &lt; /errorcode &gt;  &lt; errorinfo xmlns='http://tempuri.org' &gt; abc &lt; /errorinfo &gt; ");

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+When a remote method must raise an exception with application SOAP Fault details, it does so by assigning the <i>soap.fault</i> field of the current reference to the

+runtime environment with 

+appropriate data associated with the exception and by returning the error <i>SOAP_FAULT</i>.

+For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+&nbsp;&nbsp;&nbsp;soap_receiver_fault(soap, "Stack dump", NULL); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap<tt>-&gt;</tt>version == 2) // SOAP 1.2 is used <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>fault<tt>-&gt;</tt>SOAP_ENV__Detail = (<b>struct</b>&nbsp;SOAP_ENV__Detail*)soap_malloc(soap, sizeof(<b>struct</b>&nbsp;SOAP_ENV__Detail); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>fault<tt>-&gt;</tt>SOAP_ENV__Detail<tt>-&gt;</tt>__type = SOAP_TYPE_ns1__myStackDataType; // stack type <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>fault<tt>-&gt;</tt>SOAP_ENV__Detail<tt>-&gt;</tt>fault = sp; // point to stack <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>fault<tt>-&gt;</tt>SOAP_ENV__Detail<tt>-&gt;</tt>__any = NULL; // no other XML data <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>else</b>&nbsp;<br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>fault<tt>-&gt;</tt>detail = (<b>struct</b>&nbsp;SOAP_ENV__Detail*)soap_malloc(soap, sizeof(<b>struct</b>&nbsp;SOAP_ENV__Detail); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>fault<tt>-&gt;</tt>detail<tt>-&gt;</tt>__type = SOAP_TYPE_ns1__myStackDataType; // stack type <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>fault<tt>-&gt;</tt>detail<tt>-&gt;</tt>fault = sp; // point to stack <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>fault<tt>-&gt;</tt>detail<tt>-&gt;</tt>__any = NULL; // no other XML data <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_FAULT; // return from remote method call

+</td></tr></table><br></i>

+When <i>soap_receiver_fault</i> allocates a fault struct, this data is removed with the <i>soap_end</i> call (or <i>soap_dealloc</i>).

+Note that the <i>soap_receiver_fault</i> function is called to allocate the fault struct and set the fault string and detail

+fields, i.e. <i>soap_receiver_fault(soap, "Stack dump", NULL)</i>. The advantage is that this is independent of SOAP 1.1 and

+SOAP 1.2.  However, setting the custom detail fields requires inspecting the SOAP version used, using the <i>soap</i><tt>-&gt;</tt><i>version</i>

+attribute which is 1 for SOAP 1.1 and 2 for SOAP 1.2.

+

+<div class="p"><!----></div>

+Each remote method implementation in a service application can return a SOAP Fault upon an exception by returning an error code,

+see Section&nbsp;<a href="#sec:example7">7.2.1</a> for details and an example.

+In addition, a SOAP Fault can be returned by a service application through calling the <i>soap_send_fault</i> function.

+This is useful in case the initialization of the application fails, as illustrated in the example below:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;main() <br />

+{<br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;some initialization code <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(initialization failed) <br />

+&nbsp;&nbsp;&nbsp;{<br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap.error = soap_receiver_fault(&amp;soap, <tt>"Init&nbsp;failed"</tt>, NULL); // set the error condition (SOAP_FAULT) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_send_fault(&amp;soap); // Send SOAP Fault to client <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;0; // Terminate <br />

+&nbsp;&nbsp;&nbsp;} <br />

+}

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+ <h2><a name="tth_sEc12">

+12</a>&nbsp;&nbsp;<font color="#0000FF">SOAP Header Processing</font></h2><a name="sec:header">

+</a>

+

+<div class="p"><!----></div>

+A predeclared standard SOAP Header data structure is generated by the gSOAP stub and skeleton compiler for exchanging SOAP

+messages with SOAP Headers.

+This predeclared data structure is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;SOAP_ENV__Header <br />

+{ <b>void</b>&nbsp;*dummy; <br />

+};

+</td></tr></table><br></i>

+which declares and empty header (some C and C++ compilers don't accept empty structs so a transient dummy field is provided).

+

+<div class="p"><!----></div>

+To adapt the data structure to a specific need for SOAP Header processing, a

+new <i><b>struct</b>&nbsp;SOAP_ENV__Header</i> can be added to the header file input to the gSOAP

+compiler.  A <i><b>class</b></i> for the SOAP Header data structure can be used instead of a <i><b>struct</b></i>.

+

+<div class="p"><!----></div>

+For example, the following header can be used for transaction control:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;SOAP_ENV__Header <br />

+{ <b>char</b>&nbsp;*t__transaction; <br />

+};

+</td></tr></table><br></i>

+with client-side code:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); <br />

+... <br />

+soap.header = NULL; // do not use a SOAP Header for the request (as set with soap_init) <br />

+soap.actor = NULL; // do not use an actor (receiver is actor) <br />

+soap_call_method(&amp;soap, ...); <br />

+<b>if</b>&nbsp;(soap.header) // a SOAP Header was received <br />

+&nbsp;&nbsp;&nbsp;cout  &lt;&lt;  soap.header<tt>-&gt;</tt>t__transaction; <br />

+// Can reset, modify, or set soap.header here before next call <br />

+soap_call_method(&amp;soap, ...); // reuse the SOAP Header of the service response for the request <br />

+...

+</td></tr></table><br></i>

+The SOAP Web service response can include a SOAP Header with a transaction number that the client is supposed to use for the next remote method invocation to the service. Therefore, the next request includes a transaction number:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+... <br />

+&lt;SOAP-ENV:Envelope ...&#62; <br />

+&lt;SOAP-ENV:Header&#62; <br />

+&lt;transaction xmlns="..." xsi:type="int"&#62;12345&lt;/transaction&#62; <br />

+&lt;/SOAP-ENV:Header&#62; <br />

+&lt;SOAP-ENV:Body&#62; <br />

+... <br />

+&lt;/SOAP-ENV:Body&#62; <br />

+&lt;/SOAP-ENV:Envelope&#62;

+</td></tr></table><br></tt>

+This is just an example and the transaction control is not a feature of SOAP but can be added on by the application layer

+to implement stateful transactions between clients and services.

+At the client side, the <i>soap.actor</i> attribute can be set to

+indicate the recipient of the header (the SOAP <tt>SOAP-ENV:actor</tt> attribute).

+

+<div class="p"><!----></div>

+A Web service can read and set the SOAP Header as follows:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;soap.actor = NULL; // use this to accept all headers (default) <br />

+&nbsp;&nbsp;&nbsp;soap.actor = "http://some/actor"; // accept headers destined for "http://some/actor" only <br />

+&nbsp;&nbsp;&nbsp;soap_serve(&amp;soap);<br />

+} <br />

+... <br />

+<b>int</b>&nbsp;method(<b>struct</b>&nbsp;soap *soap, ...) <br />

+{<br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap<tt>-&gt;</tt>header) // a Header was received <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... = soap<tt>-&gt;</tt>header<tt>-&gt;</tt>t__transaction; <br />

+&nbsp;&nbsp;&nbsp;<b>else</b>&nbsp;<br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>header = soap_malloc(<b>sizeof</b>(<b>struct</b>&nbsp;SOAP_ENV__Header)); // alloc new header <br />

+...

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>header<tt>-&gt;</tt>t__transaction = ...; <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+}

+</td></tr></table><br></i>

+See Section&nbsp;<a href="#sec:directives">18.2</a> on how to generate WSDL with the proper method-to-header-part bindings.

+

+<div class="p"><!----></div>

+The <tt>SOAP-ENV:mustUnderstand</tt> attribute indicates the requirement that the recipient of the SOAP Header (who must

+correspond to the <tt>SOAP-ENV:actor</tt> attribute when present or when the attribute has the value

+<tt>SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next"</tt>) MUST handle the Header part that carries the attribute.

+gSOAP handles this automatically on the background. However, an application still needs to inspect the header part's value

+and handle it appropriately. If a remote method in a Web service is not able to do this, it should return

+<i>SOAP_MUSTUNDERSTAND</i> to indicate this failure.

+

+<div class="p"><!----></div>

+The syntax for the header file input to the gSOAP compiler is extended with a special storage qualifier <i>mustUnderstand</i>.

+This qualifier can be used in the SOAP Header declaration to indicate which parts should carry a <i>SOAP-ENV:mustUnderstand="1"</i>

+attribute. For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;SOAP_ENV__Header <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*t__transaction; <br />

+&nbsp;&nbsp;&nbsp;mustUnderstand <b>char</b>&nbsp;*t__authentication; <br />

+};

+</td></tr></table><br></i>

+When both fields are set and <i>soap.actor="http://some/actor"</i> then the message contains:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;SOAP-ENV:Envelope ...&#62; <br />

+&lt;SOAP-ENV:Header&#62; <br />

+&lt;transaction xmlns="...&#187;5&lt;/transaction&#62; <br />

+&lt;authentication xmlns="..." SOAP-ENV:actor="http://some/actor" SOAP-ENV:mustUnderstand="1"&#62;XX <br />

+&lt;/authentication&#62; <br />

+&lt;/SOAP-ENV:Header&#62; <br />

+&lt;SOAP-ENV:Body&#62; <br />

+... <br />

+&lt;/SOAP-ENV:Body&#62; <br />

+&lt;/SOAP-ENV:Envelope&#62;

+</td></tr></table><br></tt>

+

+<div class="p"><!----></div>

+ <h2><a name="tth_sEc13">

+13</a>&nbsp;&nbsp;<font color="#0000FF">MIME Attachments</font></h2><a name="sec:MIME">

+</a>

+

+<div class="p"><!----></div>

+The gSOAP toolkit supports MIME attachments as per SOAP with Attachments (SwA)

+specification (http://www.w3.org/TR/SOAP-attachments). MIME attachment data must be memory resident for sending

+operations and MIME attachments received will be stored in memory. DIME

+attachments on the other hand can be streamed and therefore DIME attachment

+data does not need to be stored in memory, see

+Section&nbsp;<a href="#sec:DIME">14</a>.

+

+<div class="p"><!----></div>

+Transmitting multipart/related MIME attachments with a SOAP/XML message is

+accomplished with two functions, <i>soap_set_mime</i> and

+<i>soap_set_mime_attachment</i>. The first function is for initialization

+purposes and the latter function is used to specify meta data and content data

+for each attachment.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc13.1">

+13.1</a>&nbsp;&nbsp;<font color="#0000FF">Sending a Collection of MIME Attachments</font></h3>

+

+<div class="p"><!----></div>

+The following functions should be used to set up a collection of

+multipart/related MIME attachments for transmission with a SOAP/XML message.

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td width="602"><font color="#FF0000"><b>Function</b></font> </td></tr>

+<tr><td width="602"><i><b>void</b>&nbsp;soap_set_mime(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*boundary, <b>const</b>&nbsp;<b>char</b>&nbsp;*start)</i> </td></tr>

+<tr><td width="602">This function must be called first to initialize MIME attachment send operations (receives are automatic). The function specifies a MIME boundary and start content ID used for the SOAP message body. When <i>boundary</i> is NULL, an appropriate MIME boundary will be choosen (important: boundaries cannot occur in the SOAP/XML message and cannot occur in any of the MIME attachments content). When a specific boundary value is provided, gSOAP will NOT verify that the boundary is valid. When <i>start</i> is NULL, the start ID of the SOAP message is <tt>&lt;</tt><tt>SOAP-ENV:Envelope</tt><tt>&gt;</tt>.

+</td></tr>

+<tr><td width="602"><i><b>int</b>&nbsp;soap_set_mime_attachment(<b>struct</b>&nbsp;soap *soap, <b>char</b>&nbsp;*ptr, size_t size, <b>enum</b>&nbsp;soap_mime_encoding encoding, <b>const</b>&nbsp;<b>char</b>&nbsp;*type, <b>const</b>&nbsp;<b>char</b>&nbsp;*id, <b>const</b>&nbsp;<b>char</b>&nbsp;*location, <b>const</b>&nbsp;<b>char</b>&nbsp;*description)</i> </td></tr>

+<tr><td width="602">This function adds a new attachment to the list of attachments, where <i>ptr</i> and <i>size</i> refer to the block of memory that holds the attachment data. The <i>encoding</i> parameter specifies the content encoding of this block, where the value of <i>encoding</i> is one of <i>SOAP_MIME_7BIT</i>, <i>SOAP_MIME_8BIT</i>, <i>SOAP_MIME_BINARY</i>, <i>SOAP_MIME_QUOTED_PRINTABLE</i>, <i>SOAP_MIME_BASE64</i>, <i>SOAP_MIME_IETF_TOKEN</i>, or <i>SOAP_MIME_X_TOKEN</i>. These constants reflect the content encoding defined in RFC2045 and you MUST adhere to the content encoding rules defined by RFC2045. When in doubt, use <i>SOAP_MIME_BINARY</i>, since this encoding type covers any content. The mandatory <i>type</i> string parameter is the MIME type of the data. The <i>id</i> string parameter is the content ID of the MIME attachment. The optional <i>location</i> string parameter is the content location of the attachment. The optional <i>description</i> string parameter holds a textual description of the attachment (it may not contain any control characters). All parameter values are copied, except <i>ptr</i> which must point to a valid location of the attachment data during the transfer.

+The value <i>SOAP_OK</i> is returned when the attachment was added. Otherwise a gSOAP error code is returned.

+</td></tr>

+<tr><td width="602"><i><b>void</b>&nbsp;soap_clr_mime(<b>struct</b>&nbsp;soap *soap)</i> </td></tr>

+<tr><td width="602">Disables MIME attachments, e.g.&nbsp;to avoid MIME attachments to be part of a SOAP Fault response message. </td></tr></table>

+

+</td></tr></table><br></span>

+When providing a MIME boundary with <i>soap_set_mime</i>, you have to make

+sure the boundary cannot match any SOAP/XML message content. Therefore, it is

+recommended to include an invalid XML sequence such as <tt>&lt;&gt;</tt>. Or you can

+simply pass NULL and let gSOAP select a safe boundary for you.

+

+<div class="p"><!----></div>

+The internal list of attachments is destroyed with <i>soap_end</i>, you should

+call this function sometime after the message exchange was completed (the

+content of the block of memory referred to by the <i>ptr</i> parameter is

+unaffected).

+

+<div class="p"><!----></div>

+The following example shows how a multipart/related HTTP message with three

+MIME attachments is set up and transmitted to a server. The first attachment

+contains the SOAP message. The second and third attachments contain image data.

+In this example we let the SOAP message body refer to the attachments using

+<tt>href</tt> attributes.  The <i><b>struct</b>&nbsp;claim__form</i> data type includes a

+definition of a <i>href</i> attribute for this purpose.

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;claim__form form1, form2; <br />

+form1.href = <tt>"cid:claim061400a.tiff@claiming-it.com"</tt>; <br />

+form2.href = <tt>"cid:claim061400a.jpeg@claiming-it.com"</tt>; <br />

+/* initialize and enable MIME */ <br />

+soap_set_mime(soap, <tt>"MIME_boundary"</tt>, <tt>"&lt;claim061400a.xml@claiming-it.com&gt;"</tt>); <br />

+/* add a base64 encoded tiff image (tiffImage points to base64 data) */ <br />

+soap_set_mime_attachment(soap, tiffImage, tiffLen, SOAP_MIME_BASE64, <tt>"image/tiff"</tt>, <tt>"&lt;claim061400a.tiff@claiming-it.com&gt;"</tt>, NULL, NULL); <br />

+/* add a raw binary jpeg image (jpegImage points to raw data) */ <br />

+soap_set_mime_attachment(soap, jpegImage, jpegLen, SOAP_MIME_BINARY, <tt>"image/jpeg"</tt>, <tt>"&lt;claim061400a.jpeg@claiming-it.com&gt;"</tt>, NULL, NULL); <br />

+/* send the forms as MIME attachments with this invocation */ <br />

+<b>if</b>&nbsp;(soap_call_claim__insurance_claim_auto(soap, form1, form2, ...)) <br />

+&nbsp;&nbsp;&nbsp;// an error occurred <br />

+<b>else</b><br />

+&nbsp;&nbsp;&nbsp;// process response

+</td></tr></table><br></i>

+Note: the above example assumes that the boundary <tt>MIME_boundary</tt> does not occur in the SOAP/XML message.

+

+<div class="p"><!----></div>

+The <i>claim__form</i> struct is declared in the gSOAP header file as:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;claim__form <br />

+{ @<b>char</b>&nbsp;*href; <br />

+};

+</td></tr></table><br></i>	

+This data type defines the parameter data of the operation. The claim forms in

+the SOAP/XML message consist of <tt>href</tt>s to the claim forms attached.  The

+produced message is similar to the last example shown in the SOAP with

+Attachments specification (http://www.w3.org/TR/SOAP-attachments).  Note that

+the use of <tt>href</tt> or other attributes for referring to the MIME attachments

+is optional according to the SwA standard.

+

+<div class="p"><!----></div>

+To associate MIME attachments with the request and response of a service operation in the generated WSDL, please see Section&nbsp;<a href="#sec:MIMEWSDL">15.1</a>.

+

+<div class="p"><!----></div>

+The server-side code to transmit MIME attachments back to a client is similar:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;claim__insurance_claim_auto(<b>struct</b>&nbsp;soap *soap, ...) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;soap_set_mime(soap, NULL, NULL); // enable MIME<br />

+&nbsp;&nbsp;&nbsp;// add a HTML document (htmlDoc points to data, where the HTML doc is stored in compliance with 7bit encoding RFC2045) <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_set_mime_attachment(soap, htmlDoc, strlen(htmlDoc), SOAP_MIME_7BIT, <tt>"text/html"</tt>, <tt>"&lt;claim061400a.html@claiming-it.com&gt;"</tt>, NULL, NULL)) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_clr_mime(soap); // don't want fault with attachments <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;soap<tt>-&gt;</tt>error; <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+}

+</td></tr></table><br></i>

+It is also possible to attach data to a SOAP fault message.

+

+<div class="p"><!----></div>

+<font color="#FF0000"><b>Caution:</b></font> DIME in MIME is supported. However, gSOAP will not verify whether

+the MIME boundary is present in the DIME attachments and therefore will not

+select a boundary that is guaranteed to be unique. Therefore, you must provide

+a MIME boundary with <i>soap_set_mime</i> that is unique when using DIME in

+MIME.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc13.2">

+13.2</a>&nbsp;&nbsp;<font color="#0000FF">Retrieving a Collection of MIME Attachments</font></h3>

+

+<div class="p"><!----></div>

+MIME attachments are automatically parsed and stored in memory.

+After receiving a set of MIME attachments, either at the client-side or

+the server-side, the list of MIME attachments can be traversed to extract

+meta data and the attachment content. The first attachment in the collection of

+MIME attachments always contains meta data about the SOAP message

+itself (because the SOAP message was processed the attachment does not contain

+any useful data).

+

+<div class="p"><!----></div>

+To traverse the list of MIME attachments in C, you use a loop similar to:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap_multipart *attachment; <br />

+<b>for</b>&nbsp;(attachment = soap.mime.list; attachment; attachment = attachment<tt>-&gt;</tt>next) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;printf(<tt>"MIME&nbsp;attachment:\n"</tt>); <br />

+&nbsp;&nbsp;&nbsp;printf(<tt>"Memory=%p\n"</tt>, (*attachment).ptr); <br />

+&nbsp;&nbsp;&nbsp;printf(<tt>"Size=%ul\n"</tt>, (*attachment).size); <br />

+&nbsp;&nbsp;&nbsp;printf(<tt>"Encoding=%d\n"</tt>, (<b>int</b>)(*attachment).encoding); <br />

+&nbsp;&nbsp;&nbsp;printf(<tt>"Type=%s\n"</tt>, (*attachment).type?(*attachment).type:"null"); <br />

+&nbsp;&nbsp;&nbsp;printf(<tt>"ID=%s\n"</tt>, (*attachment).id?(*attachment).id:"null"); <br />

+&nbsp;&nbsp;&nbsp;printf(<tt>"Location=%s\n"</tt>, (*attachment).location?(*attachment).location:"null"); <br />

+&nbsp;&nbsp;&nbsp;printf(<tt>"Description=%s\n"</tt>, (*attachment).description?(*attachment).description:"null"); <br />

+}

+</td></tr></table><br></i>

+C++ programmers can use an iterator instead, as in:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>for</b>&nbsp;(soap_multipart::iterator attachment = soap.mime.begin(); attachment != soap.mime.end(); ++attachment) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;cout <tt>&lt;&lt;</tt> "MIME attachment:" <tt>&lt;&lt;</tt> endl; <br />

+&nbsp;&nbsp;&nbsp;cout <tt>&lt;&lt;</tt> "Memory=" <tt>&lt;&lt;</tt> (<b>void</b>*)(*attachment).ptr <tt>&lt;&lt;</tt> endl; <br />

+&nbsp;&nbsp;&nbsp;cout <tt>&lt;&lt;</tt> "Size=" <tt>&lt;&lt;</tt> (*attachment).size <tt>&lt;&lt;</tt> endl; <br />

+&nbsp;&nbsp;&nbsp;cout <tt>&lt;&lt;</tt> &#203;ncoding=" <tt>&lt;&lt;</tt> (*attachment).encoding <tt>&lt;&lt;</tt> endl; <br />

+&nbsp;&nbsp;&nbsp;cout <tt>&lt;&lt;</tt> "Type=" <tt>&lt;&lt;</tt> ((*attachment).type?(*attachment).type:"null") <tt>&lt;&lt;</tt> endl; <br />

+&nbsp;&nbsp;&nbsp;cout <tt>&lt;&lt;</tt> "ID=" <tt>&lt;&lt;</tt> ((*attachment).id?(*attachment).id:"null") <tt>&lt;&lt;</tt> endl; <br />

+&nbsp;&nbsp;&nbsp;cout <tt>&lt;&lt;</tt> "Location=" <tt>&lt;&lt;</tt> ((*attachment).location?(*attachment).location:"null") <tt>&lt;&lt;</tt> endl; <br />

+&nbsp;&nbsp;&nbsp;cout <tt>&lt;&lt;</tt> "Description=" <tt>&lt;&lt;</tt> ((*attachment).description?(*attachment).description:"null") <tt>&lt;&lt;</tt> endl; <br />

+}

+</td></tr></table><br></i>

+Note: keep in mind that the first attachment is associated with the SOAP

+message and you may want to ignore it.

+

+<div class="p"><!----></div>

+A call to <i>soap_end</i> removes all of the received MIME data. To preserve an

+attachment in memory, use <i>soap_unlink</i> on the <i>ptr</i> field of the

+<i>soap_multipart</i> struct. Recall that the <i>soap_unlink</i> function is

+commonly used to prevent deallocation of deserialized data.

+

+<div class="p"><!----></div>

+ <h2><a name="tth_sEc14">

+14</a>&nbsp;&nbsp;<font color="#0000FF">DIME Attachments</font></h2><a name="sec:DIME">

+</a>

+

+<div class="p"><!----></div>

+The gSOAP toolkit supports DIME attachments as per DIME

+specification, see for example (http://msdn.microsoft.com/library/en-us/dnglobspec/html/draft-nielsen-dime-02.txt)

+

+<div class="p"><!----></div>

+Applications developed with gSOAP can transmit binary DIME

+attachments with or without streaming. Without streaming, all data is stored and retrieved in memory, which can be prohibitive when transmitting large files on small devices. In contrast with DIME 

+streaming, data handlers are used to pass the data to and from a resource, such as a file or device.

+With DIME output streaming, raw binary data is send from a data source in

+chunks on the fly without buffering the entire content to save memory. With DIME input streaming,

+raw binary data will be passed to data handlers (callbacks).

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc14.1">

+14.1</a>&nbsp;&nbsp;<font color="#0000FF">Sending a Collection of DIME Attachments</font></h3>

+

+<div class="p"><!----></div>

+The following functions should be used to set up a collection of

+multipart/related MIME attachments for transmission with a SOAP/XML message.

+The attachments can be streamed, as described in Section&nbsp;<a href="#sec:DIMEstreaming">14.4</a>.

+Without streaming, each attachment must refer to a block of data in memory.

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td width="602"><font color="#FF0000"><b>Function</b></font> </td></tr>

+<tr><td width="602"><i><b>void</b>&nbsp;soap_set_dime(<b>struct</b>&nbsp;soap *soap)</i> </td></tr>

+<tr><td width="602">This function must be called first to initialize DIME attachment send operations (receives are automatic).

+</td></tr>

+<tr><td width="602"><i><b>int</b>&nbsp;soap_set_dime_attachment(<b>struct</b>&nbsp;soap *soap, <b>char</b>&nbsp;*ptr, size_t size, <b>const</b>&nbsp;<b>char</b>&nbsp;*type, <b>const</b>&nbsp;<b>char</b>&nbsp;*id, <b>unsigned</b>&nbsp;<b>short</b>&nbsp;optype, <b>const</b>&nbsp;<b>char</b>&nbsp;*option)</i> </td></tr>

+<tr><td width="602">This function adds a new attachment to the list of attachments, where <i>ptr</i> and <i>size</i> refer to the block of memory that holds the attachment data (except when DIME streaming callback handlers are used as described in Section&nbsp;<a href="#sec:DIMEstreaming">14.4</a>. The <i>type</i> string parameter is the MIME type of the data. The <i>id</i> string parameter is the content ID of the DIME attachment. The <i>option</i> string parameter holds optional text (gSOAP supports DIME options, but it can send only one) and <i>optype</i> is a user-defined option type (as per DIME option specification format). All parameter values are copied, except <i>ptr</i>.

+The value <i>SOAP_OK</i> is returned when the attachment was added. Otherwise a gSOAP error code is returned.

+</td></tr>

+<tr><td width="602"><i><b>void</b>&nbsp;soap_clr_mime(<b>struct</b>&nbsp;soap *soap)</i> </td></tr>

+<tr><td width="602">Disables DIME attachments, unless the serialized SOAP message contains attachments for transmission.

+</td></tr></table>

+

+</td></tr></table><br></span>

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc14.2">

+14.2</a>&nbsp;&nbsp;<font color="#0000FF">Retrieving a Collection of DIME Attachments</font></h3>

+

+<div class="p"><!----></div>

+DIME attachments are automatically parsed and stored in memory (or passed to the streaming handlers).

+After receiving a set of DIME attachments, either at the client-side or

+the server-side, the list of DIME attachments can be traversed to extract

+meta data and the attachment content.

+

+<div class="p"><!----></div>

+To traverse the list of DIME attachments in C, you use a loop similar to:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap_multipart *attachment; <br />

+<b>for</b>&nbsp;(attachment = soap.dime.list; attachment; attachment = attachment<tt>-&gt;</tt>next) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;printf(<tt>"DIME&nbsp;attachment:\n"</tt>); <br />

+&nbsp;&nbsp;&nbsp;printf(<tt>"Memory=%p\n"</tt>, (*attachment).ptr); <br />

+&nbsp;&nbsp;&nbsp;printf(<tt>"Size=%ul\n"</tt>, (*attachment).size); <br />

+&nbsp;&nbsp;&nbsp;printf(<tt>"Type=%s\n"</tt>, (*attachment).type?(*attachment).type:"null"); <br />

+&nbsp;&nbsp;&nbsp;printf(<tt>"ID=%s\n"</tt>, (*attachment).id?(*attachment).id:"null"); <br />

+}

+</td></tr></table><br></i>

+C++ programmers can use an iterator instead, as in:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>for</b>&nbsp;(soap_multipart::iterator attachment = soap.dime.begin(); attachment != soap.dime.end(); ++attachment) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;cout <tt>&lt;&lt;</tt> "DIME attachment:" <tt>&lt;&lt;</tt> endl; <br />

+&nbsp;&nbsp;&nbsp;cout <tt>&lt;&lt;</tt> "Memory=" <tt>&lt;&lt;</tt> (<b>void</b>*)(*attachment).ptr <tt>&lt;&lt;</tt> endl; <br />

+&nbsp;&nbsp;&nbsp;cout <tt>&lt;&lt;</tt> "Size=" <tt>&lt;&lt;</tt> (*attachment).size <tt>&lt;&lt;</tt> endl; <br />

+&nbsp;&nbsp;&nbsp;cout <tt>&lt;&lt;</tt> "Type=" <tt>&lt;&lt;</tt> ((*attachment).type?(*attachment).type:"null") <tt>&lt;&lt;</tt> endl; <br />

+&nbsp;&nbsp;&nbsp;cout <tt>&lt;&lt;</tt> "ID=" <tt>&lt;&lt;</tt> ((*attachment).id?(*attachment).id:"null") <tt>&lt;&lt;</tt> endl; <br />

+}

+</td></tr></table><br></i>

+The <i>options</i> field is available as well. The <i>options</i> content is

+formatted according to the DIME specification: the first two bytes are reserved

+for the option type, the next two bytes store the size of the option data,

+followed by the (binary) option data.

+

+<div class="p"><!----></div>

+A call to <i>soap_end</i> removes all of the received DIME data. To preserve an

+attachment in memory, use <i>soap_unlink</i> on the <i>ptr</i> field of the

+<i>soap_multipart</i> struct. Recall that the <i>soap_unlink</i> function is

+commonly used to prevent deallocation of deserialized data.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc14.3">

+14.3</a>&nbsp;&nbsp;<font color="#0000FF">Serializing Binary Data in DIME</font></h3>

+

+<div class="p"><!----></div>

+Binary data stored in extended <tt>xsd:base64Binary</tt> and <tt>xsd:hexBinary</tt>

+types can be serialized and deserialized as DIME attachments. These attachments

+will be transmitted prior to the sequence of secondary DIME attachments defined

+by the user with <i>soap_set_dime_attachment</i> as explained in the

+previous section. The serialization process is automated and DIME attachments

+will be send even when <i>soap_set_dime</i> or

+<i>soap_set_dime_attachment</i> are not used.

+

+<div class="p"><!----></div>

+The <tt>xsd:base64Binary</tt> XSD type is defined in gSOAP as a struct or class by

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;xsd__base64Binary <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>unsigned</b>&nbsp;<b>char</b>&nbsp;*__ptr; // pointer to raw binary data <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size; // size of the block of data <br />

+};

+</td></tr></table><br></i>

+To enable serialization of the data in DIME, we extend this type with three

+additional fields:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;xsd__base64Binary <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>unsigned</b>&nbsp;<b>char</b>&nbsp;*__ptr; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*id; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*type; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*options; <br />

+};

+</td></tr></table><br></i>

+The three additional fields consist of an <i>id</i> field for attachment

+referencing (typically a content id (CID) or UUID), a <i>type</i> field to

+specify the MIME type of the binary data, and an <i>options</i> field to

+piggy-back additional information with a DIME attachment.  The order of the

+declaration of the fields is significant. In addition, no other fields or

+methods may be declared before any of these fields in the struct/class, but

+additional fields and methods may appear after the field declarations. An

+extended <i>xsd__hexBinary</i> declaration is similar.

+

+<div class="p"><!----></div>

+The <i>id</i> and <i>type</i> fields contain text. The set the DIME-specific

+options field, you can use the <i>soap_dime_option</i> function: <br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>char</b>&nbsp;*soap_dime_option(<b>struct</b>&nbsp;soap *soap, <b>unsigned</b>&nbsp;<b>short</b>&nbsp;type, <b>const</b>&nbsp;<b>char</b>&nbsp;*option)

+</td></tr></table><br></i>

+returns a string with this encoding. For example

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;xsd__base64Binary image; <br />

+image.__ptr = ...; <br />

+image.__size = ...; <br />

+image.id = <tt>"uuid:09233523-345b-4351-b623-5dsf35sgs5d6"</tt>; <br />

+image.type = <tt>"image/jpeg"</tt>; <br />

+image.options = soap_dime_option(soap, 0, <tt>"My&nbsp;wedding&nbsp;picture"</tt>);

+</td></tr></table><br></i>

+When either the <i>id</i> or <i>type</i> field values are non-NULL at run time,

+the data will be serialized as a DIME attachment. The SOAP/XML message refers

+to the attachments using <tt>href</tt> attributes. This generally works will with

+SOAP RPC, because <tt>href</tt> attributes are permitted. However, with document/literal style the referencing mechanism must be explicitly defined

+in the schema of the binary type. The gSOAP

+declaration of an extended binary type is

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;ns__myBinaryDataType <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>unsigned</b>&nbsp;<b>char</b>&nbsp;*__ptr; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*id; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*type; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*options; <br />

+};

+</td></tr></table><br></i>

+C++ programmers can use inheritance instead of textual extension required in C, as in

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>class</b>&nbsp;xsd__base64Binary <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>unsigned</b>&nbsp;<b>char</b>&nbsp;*__ptr; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size; <br />

+}; <br />

+<b>class</b>&nbsp;ns__myBinaryDataType : xsd__base64Binary <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*id; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*type; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*options; <br />

+};

+</td></tr></table><br></i>

+This defines an extension of <tt>xsd:base64Binary</tt>, such that the data can be 

+serialized as DIME attachments using <tt>href</tt> attributes for referencing.

+When a different attribute name is in fact used, it must be explicitly defined:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap WSref schema import: http://schemas.xmlsoap.org/ws/2002/04/reference/ <br />

+<b>struct</b>&nbsp;ns__myBinaryDataType <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>unsigned</b>&nbsp;<b>char</b>&nbsp;*__ptr; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*id; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*type; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*options; <br />

+&nbsp;&nbsp;&nbsp;@<b>char</b>&nbsp;*WSref__location; <br />

+};

+</td></tr></table><br></i>

+The example above uses the <tt>location</tt> attribute defined in the content reference schema, as defined in one of the vendor's specific WSDL extensions for DIME (http://www.gotdotnet.com/team/xml_wsspecs/dime/WSDL-Extension-for-DIME.htm).

+

+<div class="p"><!----></div>

+When receiving DIME attachments, the DIME meta data and binary data content is

+stored in binary data types only when the XML parts of the message uses

+<tt>href</tt> attributes to refer to these attachments. The gSOAP toolkit may

+support automatic (de)serialization with other user-defined (or WSDL-defined)

+attributes in future releases.

+

+<div class="p"><!----></div>

+Messages may contain binary data that references external resources not

+provided as attachments. In that case, the <i>__ptr</i> field is NULL and the

+<i>id</i> field refers to the external data source.

+

+<div class="p"><!----></div>

+The <i>dime_id_format</i> attribute of the current gSOAP run-time environment

+can be set to the default format of DIME id fields.  The format string MUST

+contain a <i>%d</i> format specifier (or any other <i><b>int</b></i>-based format

+specifier). The value of this specifier is a non-negative integer, with zero

+being the value of the DIME attachment id for the SOAP message.  For example,

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap soap;<br />

+soap_init(&amp;soap); <br />

+soap.dime_id_format = <tt>"uuid:09233523-345b-4351-b623-5dsf35sgs5d6-%x"</tt>; <br />

+</td></tr></table><br></i>

+As a result, all attachments with a NULL <i>id</i> field will use a

+gSOAP-generated id value based on the format string.

+

+<div class="p"><!----></div>

+<font color="#FF0000"><b>Caution:</b></font> Care must be taken not to introduce duplicate content id values,

+when assigning content id values to the id fields of DIME extended binary data

+types. Content ids must be unique.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc14.4">

+14.4</a>&nbsp;&nbsp;<font color="#0000FF">Streaming DIME</font></h3><a name="sec:DIMEstreaming">

+</a>

+

+<div class="p"><!----></div>

+Streaming DIME is achieved with callback functions to fetch and store data

+during transmission.  Three function callbacks for streaming DIME output and

+three callbacks for streaming DIME input are available.

+

+<div class="p"><!----></div>

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td width="602"><font color="#FF0000"><b>Callback (function pointer)</b></font> </td></tr>

+<tr><td width="602"><i><b>void</b>&nbsp;*(*soap.fdimereadopen)(<b>struct</b>&nbsp;soap *soap, <b>void</b>&nbsp;*handle, <b>const</b>&nbsp;<b>char</b>&nbsp;*id, <b>const</b>&nbsp;<b>char</b>&nbsp;*type, <b>const</b>&nbsp;<b>char</b>&nbsp;*options)</i> </td></tr>

+<tr><td width="602">Called by the gSOAP run-time DIME attachment sender to start reading from a

+(binary) data source for outbound transmission. The content will be read from the

+application's data source in chunks using the <i>fdimeread</i> callback and

+streamed into the SOAP/XML/DIME output stream. The <i>handle</i> contains the

+value of the <i>__ptr</i> field of an attachment struct/class, which could be a

+pointer to specific information such as a file descriptor or a pointer to a

+string to be passed to this callback.  Both <i>__ptr</i> and <i>__size</i>

+fields should have been set by the application prior to the serialization of

+the content. The <i>id</i>, <i>type</i>, and <i>options</i> arguments are the DIME

+id, type, and options, respectively. The callback should return <i>handle</i>,

+or another pointer value which will be passed as a handle to <i>fdimeread</i>

+and <i>fdimereadclose</i>.  The callback should return NULL and set

+<i>soap</i><tt>-&gt;</tt><i>error</i> when an error occurred. The callback should return

+NULL (and not set <i>soap</i><tt>-&gt;</tt><i>error</i>) when this particular DIME

+attachment is not to be streamed.

+</td></tr>

+<tr><td width="602"><i>size_t (*soap.fdimeread)(<b>struct</b>&nbsp;soap *soap, <b>void</b>&nbsp;*handle, <b>char</b>&nbsp;*buf, size_t len)</i> </td></tr>

+<tr><td width="602">Called by the gSOAP run-time DIME attachment sender to read more data from a

+(binary) data source for streaming into the output stream.  The <i>handle</i>

+contains the value returned by the <i>fdimereadopen</i> callback.  The <i>buf</i>

+argument is the buffer of length <i>len</i> into which a chunk of data should be

+stored.  The actual amount of data stored in the buffer may be less than

+<i>len</i> and this amount should be returned by the application.  A return value

+of 0 indicates an error (the callback may set <i>soap</i><tt>-&gt;</tt><i>errnum</i> to errno).

+The <i>__size</i> field of the attachment

+struct/class should have been set by the application prior to the serialization

+of the content.  The value of <i>__size</i> indicates the total size of the

+content to be transmitted.  When the <i>__size</i> is zero then DIME chunked

+transfers can be used under certain circumstances to stream content without

+prior determination of attachment size, see Section&nbsp;<a href="#sec:dimechunking">14.5</a> below.

+</td></tr>

+<tr><td width="602"><i><b>void</b>(*soap.fdimereadclose)(<b>struct</b>&nbsp;soap *soap, <b>void</b>&nbsp;*handle)</i> </td></tr>

+<tr><td width="602">Called by the gSOAP run-time DIME attachment sender at the end of the

+streaming process to close the data source.  The <i>handle</i> contains the

+value returned by the <i>fdimereadopen</i> callback.  The <i>fdimewriteclose</i>

+callback is called after successfully transmitting the data or when an error

+occurred.

+</td></tr>

+<tr><td width="602"><i><b>void</b>&nbsp;*(*soap.fdimewriteopen)(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*id, <b>const</b>&nbsp;<b>char</b>&nbsp;*type, <b>const</b>&nbsp;<b>char</b>&nbsp;*options)</i> </td></tr>

+<tr><td width="602">Called by the gSOAP run-time DIME attachment receiver to start writing an

+inbound DIME attachment to an application's data store. The content is streamed

+into an application data store through multiple <i>fdimewrite</i> calls from the

+gSOAP attachment receiver.  The <i>id</i>, <i>type</i>, and <i>options</i>

+arguments are the DIME id, type, and options respectively. The callback should

+return a handle which is passed to the <i>fdimewrite</i> and

+<i>fdimewriteclose</i> callbacks. The <i>__ptr</i> field of the attachment

+struct/class is set to the value of this handle. The <i>__size</i> field is set

+to the total size of the attachment after receiving the entire content. The size

+is unknown in advance because DIME attachments may be chunked.

+</td></tr>

+<tr><td width="602"><i><b>int</b>&nbsp;(*soap.fdimewrite)(<b>struct</b>&nbsp;soap *soap, <b>void</b>&nbsp;*handle, <b>const</b>&nbsp;<b>char</b>&nbsp;*buf, size_t len)</i> </td></tr>

+<tr><td width="602">Called by the gSOAP run-time DIME attachment receiver to write part of

+an inbound DIME attachment to an application's data store.

+The <i>handle</i>

+contains the value returned by the <i>fdimewriteopen</i> callback.  The <i>buf</i>

+argument contains the data of length <i>len</i>.

+The callback should return a gSOAP error code (e.g.&nbsp;<i>SOAP_OK</i> when no error occurred).

+</td></tr>

+<tr><td width="602"><i><b>void</b>(*soap.fdimewriteclose)(<b>struct</b>&nbsp;soap *soap, <b>void</b>&nbsp;*handle)</i> </td></tr>

+<tr><td width="602">Called by the gSOAP run-time DIME attachment receiver at the end of the

+streaming process to close the data store.  The <i>fdimewriteclose</i> callback

+is called after successfully receiving the data or when an error occurred.  The

+<i>handle</i> contains the value returned by the <i>fdimewriteopen</i> callback.

+</td></tr></table>

+

+</td></tr></table><br></span>

+In addition, a <i><b>void</b>*user</i> field in the <i><b>struct</b>&nbsp;soap</i> data structure

+is available to pass user-defined data to the callbacks.  This way, you can set

+<i>soap.user</i> to point to application data that the callbacks need such as a

+file name for example.

+

+<div class="p"><!----></div>

+The following example illustrates the client-side initialization of an image

+attachment struct to stream a file into a DIME attachment:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;xsd__base64Binary image; <br />

+&nbsp;&nbsp;&nbsp;FILE *fd; <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;stat sb; <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!fstat(fileno(fd), &amp;sb) &amp;&amp; sb.st_size  &gt;  0) <br />

+&nbsp;&nbsp;&nbsp;{ // because we can get the length of the file, we can stream it <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap.fdimereadopen = dime_read_open; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap.fdimereadclose = dime_read_close; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap.fdimeread = dime_read; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;image.__ptr = (<b>unsigned</b>&nbsp;<b>char</b>*)fd; // must set to non-NULL (this is our fd handle which we need in the callbacks) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;image.__size = sb.st_size; // must set size <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>else</b><br />

+&nbsp;&nbsp;&nbsp;{ // don't know the size, so buffer it <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;size_t i; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;c; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;image.__ptr = (<b>unsigned</b>&nbsp;<b>char</b>*)soap_malloc(&amp;soap, MAX_FILE_SIZE); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>for</b>&nbsp;(i = 0; i  &lt;  MAX_FILE_SIZE; i++) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;((c = fgetc(fd)) == EOF) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>break</b>; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;image.__ptr[i] = c; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fclose(fd); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;image.__size = i; <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;image.type = "image/jpeg"; <br />

+&nbsp;&nbsp;&nbsp;image.options = soap_dime_option(&amp;soap, 0, "My picture"); <br />

+&nbsp;&nbsp;&nbsp;soap_call_ns__method(&amp;soap, ...); <br />

+&nbsp;&nbsp;&nbsp;... <br />

+} <br />

+<b>void</b>&nbsp;*dime_read_open(<b>struct</b>&nbsp;soap *soap, <b>void</b>&nbsp;*handle, <b>const</b>&nbsp;<b>char</b>&nbsp;*id, <b>const</b>&nbsp;<b>char</b>&nbsp;*type, <b>const</b>&nbsp;<b>char</b>&nbsp;*options) <br />

+{ <b>return</b>&nbsp;handle; <br />

+} <br />

+<b>void</b>&nbsp;dime_read_close(<b>struct</b>&nbsp;soap *soap, <b>void</b>&nbsp;*handle) <br />

+{ fclose((FILE*)handle); <br />

+} <br />

+size_t dime_read(<b>struct</b>&nbsp;soap *soap, <b>void</b>&nbsp;*handle, <b>char</b>&nbsp;*buf, size_t len) <br />

+{ <b>return</b>&nbsp;fread(buf, 1, len, (FILE*)handle); <br />

+}

+</td></tr></table><br></i>

+The following example illustrates the streaming of a DIME attachment into a file by a client:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;main() <br />

+{ <b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;soap.fdimewriteopen = dime_write_open; <br />

+&nbsp;&nbsp;&nbsp;soap.fdimewriteclose = dime_write_close; <br />

+&nbsp;&nbsp;&nbsp;soap.fdimewrite = dime_write; <br />

+&nbsp;&nbsp;&nbsp;soap_call_ns__method(&amp;soap, ...); <br />

+&nbsp;&nbsp;&nbsp;... <br />

+} <br />

+<b>void</b>&nbsp;*dime_write_open(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*id, <b>const</b>&nbsp;<b>char</b>&nbsp;*type, <b>const</b>&nbsp;<b>char</b>&nbsp;*options) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;FILE *handle = fopen("somefile", "wb"); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!handle) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>error = SOAP_EOF; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>errnum = errno; // get reason <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;(<b>void</b>*)handle; <br />

+} <br />

+<b>void</b>&nbsp;dime_write_close(<b>struct</b>&nbsp;soap *soap, <b>void</b>&nbsp;*handle) <br />

+{ fclose((FILE*)handle); <br />

+} <br />

+<b>int</b>&nbsp;dime_write(<b>struct</b>&nbsp;soap *soap, <b>void</b>&nbsp;*handle, <b>const</b>&nbsp;<b>char</b>&nbsp;*buf, size_t len) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;size_t nwritten; <br />

+&nbsp;&nbsp;&nbsp;<b>while</b>&nbsp;(len) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nwritten = fwrite(buf, 1, len, (FILE*)handle); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!nwritten) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>errnum = errno; // get reason <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_EOF; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;len -= nwritten; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;buf += nwritten; <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+}

+</td></tr></table><br></i>

+Note that compression can be used with DIME to compress the entire message.

+However, compression requires buffering to determine the HTTP content length

+header, which cancels the benefits of streaming DIME. To avoid this, you should

+use chunked HTTP (with the output-mode <i>SOAP_IO_CHUNK</i> flag) with

+compression and streaming DIME. At the server side, when you set

+<i>SOAP_IO_CHUNK</i> before calling <i>soap_serve</i>, gSOAP will

+automatically revert to buffering (<i>SOAP_IO_STORE</i> flag is set).  You can

+check this flag with <i>(soap-&#62;omode &amp; SOAP_IO) == SOAP_IO_CHUNK</i> to see

+if the client accepts chunking. More information about streaming chunked DIME

+can be found in Section&nbsp;<a href="#sec:dimechunking">14.5</a>.

+

+<div class="p"><!----></div>

+<font color="#FF0000"><b>C</b></font>aution: The <i>options</i> field is a DIME-specific data structure,

+consisting of a 4 byte header containing the option type info (hi byte, lo

+byte), option string length (hi byte, lo byte), followed by a non-<tt>'\0'</tt>

+terminated string. The gSOAP DIME handler recognizes one option at most.

+

+<div class="p"><!----></div>

+		     <h3><a name="tth_sEc14.5">

+14.5</a>&nbsp;&nbsp;<font color="#0000FF">Streaming Chunked DIME</font></h3><a name="sec:dimechunking">

+</a>

+

+<div class="p"><!----></div>

+gSOAP automatically handles inbound chunked DIME attachments (streaming or

+non-streaming).  To transmit outbound DIME attachments, the attachment sizes

+MUST be determined in advance to calculate HTTP message length required to

+stream DIME over HTTP.  However, gSOAP also supports the transmission of

+outbound chunked DIME attachments without prior determination of DIME

+attachment sizes when certain conditions are met.  These conditions require

+either non-HTTP transport (use the output-mode <i>SOAP_ENC_XML</i> flag), or

+chunked HTTP transport (use the output-mode <i>SOAP_IO_CHUNK</i> flag).  You

+can also use the <i>SOAP_IO_STORE</i> flag (which is also used automatically

+with compression to determine the HTTP content length header) but that cancels

+the benefits of streaming DIME.

+

+<div class="p"><!----></div>

+To stream chunked DIME, set the <i>__size</i> field of an attachment to zero

+and enable HTTP chunking.  The DIME <i>fdimeread</i> callback then fetches data

+in chunks and it is important to fill the entire buffer unless the end of the

+data has been reached and the last chunk is to be send.  That is,

+<i>fdimeread</i> should return the value of the last <i>len</i> parameter and

+fill the entire buffer <i>buf</i> for all chunks except the last.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc14.6">

+14.6</a>&nbsp;&nbsp;<font color="#0000FF">WSDL Bindings for DIME Attachments</font></h3>

+

+<div class="p"><!----></div>

+The <i>wsdl2h</i> WSDL parser recognizes DIME attachments and produces an annotated header file. Both open and closed layouts are supported for transmitting DIME attachments. For closed formats, all DIME attachments must be referenced from the SOAP message, e.g.&nbsp;using hrefs with SOAP encoding and using the application-specific reference attribute included in the <i>base64Binary</i> struct/class for doc/lit.

+

+<div class="p"><!----></div>

+As of this writing, the gSOAP compiler <i>soapcpp2</i> does not yet produce a WSDL with DIME extensions.

+

+<div class="p"><!----></div>

+ <h2><a name="tth_sEc15">

+15</a>&nbsp;&nbsp;<font color="#0000FF">MTOM Attachments</font></h2><a name="sec:MTOM">

+</a>

+

+<div class="p"><!----></div>

+MTOM (Message Transmission Optimization Mechanism) is a relatively new format

+for transmitting attachments with SOAP messages (see

+<a href="http://www.w3.org/TR/soap12-mtom"><tt>http://www.w3.org/TR/soap12-mtom</tt></a>). MTOM is a W3C working draft as of this

+writing. MTOM attachments are essentially MIME attachments with standardized

+mechanisms for cross referencing attachments from the SOAP body, which is

+absent in (plain) MIME attachments and optional with DIME attachments.

+

+<div class="p"><!----></div>

+Unlike the name suggests, the speed by which attached data is transmitted is

+not increased compared to MIME, DIME, or even XML encoded base64 data (at least

+the performance differences in gSOAP will be small). The advantage of the

+format is the standardized attachment reference mechanism, which should improve

+interoperability.

+

+<div class="p"><!----></div>

+The MTOM specification mandates SOAP 1.2 and the use of the XOP namespace. The

+XOP Include element <tt>xop:Include</tt> is used to reference attachment(s) from the SOAP message body.

+

+<div class="p"><!----></div>

+Because references from within the SOAP message body to attachments are

+mandatory with MTOM, the implementation of the serialization and deserialization of MTOM

+MIME attachments in gSOAP uses the extended binary type comparable to DIME support in gSOAP. This binary type is predefined in the <i>import/xop.h</i> file:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap xop schema import: http://www.w3.org/2004/08/xop/include <br />

+<b>struct</b>&nbsp;_xop__Include <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>unsigned</b>&nbsp;<b>char</b>&nbsp;*__ptr; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*id; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*type; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*options; <br />

+}; <br />

+<b>typedef</b>&nbsp;<b>struct</b>&nbsp;_xop__Include _xop__Include;

+</td></tr></table><br></i>

+The additional <i>id</i>, <i>type</i>, and <i>option</i> fields

+enable MTOM attachments for the data pointed to by <i>__ptr</i> of size <i>__size</i>. The process for sending and receiving MTOM XOP

+attachments is fully automated. Streaming techniques however, such as for DIME

+are not (yet) available.

+The <i>id</i> field references the attachment (typically a content id CID or UUID). When set to NULL, gSOAP assigns a unique CID. The <i>type</i>

+field specifies the required MIME type of the binary data, and the optional

+<i>options</i> field can be used to piggy-back descriptive text with an attachment.  The order of the

+declaration of the fields is significant.

+

+<div class="p"><!----></div>

+You can explicitly import the <i>xop.h</i> in your header file to use the MTOM attachments in your service, for example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#import &#239;mport/soap12.h" <br />

+/* alternatively, without the import above, use: <br />

+//gsoap SOAP-ENV schema namespace: http://www.w3.org/2003/05/soap-envelope <br />

+//gsoap SOAP-ENC schema namespace: http://www.w3.org/2003/05/soap-encoding <br />

+*/ <br />

+#import &#239;mport/xop.h" <br />

+#import &#239;mport/xmlmime.h" <br />

+<br />

+//gsoap x schema namespace: http://my.first.mtom.net <br />

+<b>struct</b>&nbsp;x__myData <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;_xop__Include xop__Include; // attachment <br />

+&nbsp;&nbsp;&nbsp;@<b>char</b>&nbsp;*xmlmime__contentType; // and its contentType <br />

+}; <br />

+<b>int</b>&nbsp;x__myMTOMtest(<b>struct</b>&nbsp;x__myData *in, <b>struct</b>&nbsp;x__myData *out);

+</td></tr></table><br></i>

+As you can see, there is really no difference between the specification of MTOM

+and DIME attachments in a gSOAP header file. Except that you MUST use SOAP 1.2

+and the <i>xop__Include</i> element.

+

+<div class="p"><!----></div>

+When an instance of <i>x__myDataType</i> is serialized and either or both the

+<i>id</i> and <i>type</i> fields are non-NULL, the data is transmitted as MTOM

+MIME attachment if the <i>SOAP_ENC_MTOM</i> flag is set in the gSOAP's soap

+struct context:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap *soap = soap_new1(SOAP_ENC_MTOM);

+</td></tr></table><br></i>

+Without this flag, the attachments will be transmitted in DIME format

+(Section&nbsp;<a href="#sec:DIME">14</a>). If your current clients and services are based on

+non-streaming DIME attachments using the SOAP body reference mechanism (thus,

+without using the <i>soap_set_dime_attachment</i> function) or plain base64

+binary XML data elements, it is very easy to adopt MTOM by renaming the binary types to <i>xop__Include</i> and using the

+<i>SOAP_ENC_MTOM</i> flag with the SOAP 1.2 namespace.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc15.1">

+15.1</a>&nbsp;&nbsp;<font color="#0000FF">Generating MultipartRelated MIME Attachment Bindings in WSDL</font></h3><a name="sec:MIMEWSDL">

+</a>

+

+<div class="p"><!----></div>

+To generate multipartRelated bindings in the WSDL file, use the <i>//gsoap

+... service method-mime-type</i> directive (see also Section&nbsp;<a href="#sec:directives">18.2</a>. The

+directive can be repeated for each attachment you want to associate with a

+method's request and response messages.

+

+<div class="p"><!----></div>

+For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#import &#239;mport/soap12.h" <br />

+#import &#239;mport/xop.h" <br />

+#import &#239;mport/xmlmime.h" <br />

+<br />

+//gsoap x schema namespace: http://my.first.mtom.net <br />

+<b>struct</b>&nbsp;x__myData <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;_xop__Include xop__Include; // attachment <br />

+&nbsp;&nbsp;&nbsp;@<b>char</b>&nbsp;*xmlmime__contentType; // and its contentType <br />

+}; <br />

+//gsoap x service method-mime-type: myMTOMtest text/xml <br />

+<b>int</b>&nbsp;x__myMTOMtest(<b>struct</b>&nbsp;x__myData *in, <b>struct</b>&nbsp;x__myData *out);

+</td></tr></table><br></i>

+The <i>//gsoap x service method-mime-type</i> directive indicates that this

+operation accepts <tt>text/xml</tt> MIME attachments. See the SOAP-with-Attachment

+specification for the MIME types to use (for example, <tt>*/*</tt> is a wildcard).

+If the operation has more than one attachment, just repeat this directive for

+each attachment you want to bind to the operation.

+

+<div class="p"><!----></div>

+To bind attachments only to the request message of an operation, use

+<i>//gsoap x service method-input-mime-type</i>. Similarly, to bind attachments

+only to the response message of an operation, use <i>//gsoap x service

+method-ouput-mime-type</i>.

+

+<div class="p"><!----></div>

+The <i>wsdl2h</i> WSDL parser recognizes MIME attachments and produces an

+annotated header file. However, the ordering of MIME parts in the

+multipartRelated elements is not reflected in the header file. Application

+developers should adhere the standards and ensure that multipart/related

+attachments are transmitted in compliance with the WSDL operation declarations.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc15.2">

+15.2</a>&nbsp;&nbsp;<font color="#0000FF">Sending and Receiving MTOM Attachments</font></h3>

+

+<div class="p"><!----></div>

+A receiver must be told to recognize MTOM attachments by setting

+the <i>SOAP_ENC_MTOM</i> flag of the gSOAP context. Otherwise, the regular MIME

+attachment mechanism will be used to store attachments and in this process the references from the SOAP message body to the attachments are lost.

+

+<div class="p"><!----></div>

+When using <i>wsdl2h</i> to build clients and/or services, you should use the <i>typemap.dat</i> file included in the distribution package. The <i>typemap.dat</i> file defines the XOP namespace and XML MIME namespaces as imported namespaces:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+xop     =  &lt; http://www.w3.org/2004/08/xop/include &gt;  <br />

+xmime   =  &lt; http://www.w3.org/2004/06/xmlmime &gt;  <br />

+xmlmime =  &lt; http://www.w3.org/2004/11/xmlmime &gt; 

+</td></tr></table><br></i>

+The <i>wsdl2h</i> tool uses the <i>typemap.dat</i> file (see also option -t) to

+convert WSDL into a gSOAP header file. In this case we don't want the

+<i>wsdl2h</i> tool to read the XOP schema and translate it, since we have a

+special <i>_xop__Include</i> element already defined in <i>xop.h</i>.

+Therefore, the above bindings will not translate the XOP and XML MIME schemas,

+but instead generates <i>#import</i> statements:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#import "xop.h" <br />

+#import "xmlmime.h"

+</td></tr></table><br></i>

+The <i>#import</i> statements are only added for those namespaces that are

+actually used by the service.

+

+<div class="p"><!----></div>

+Let's take a look at an example.

+The <i>wsdl2h</i> importer generates a header file with <i>#import "xop.h"</i> from a WSDL that references XOP, for example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#import "xop.h" <br />

+#import "xmlmime.h" <br />

+<b>struct</b>&nbsp;ns__Data <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;_xop__Include xop__Include; <br />

+&nbsp;&nbsp;&nbsp;@<b>char</b>&nbsp;*xmlmime__contentType;  <br />

+};

+</td></tr></table><br></i>

+Suppose the WSDL defines an operation:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;ns__echoData(<b>struct</b>&nbsp;ns__Data *in, <b>struct</b>&nbsp;ns__Data *out);

+</td></tr></table><br></i>

+After generating the stubs/proxies with the <i>soapcpp2</i> compiler, we can invoke the stub at the client side with:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap *soap = soap_new1(SOAP_ENC_MTOM); <br />

+<b>struct</b>&nbsp;ns__Data data; <br />

+data.xop__Include.__ptr = (<b>unsigned</b>&nbsp;<b>char</b>*)"<tt>&lt;b&gt;Hello&nbsp;world!&lt;/b&gt;</tt>"; <br />

+data.xop__Include.__size = 20; <br />

+data.xop__Include.id = NULL; // CID automatically generated by gSOAP engine <br />

+data.xop__Include.type = "text/html"; // MIME type <br />

+data.xop__Include.options = NULL; // no descriptive info added <br />

+data.xmlmime__contentType = "text/html"; // MIME type <br />

+<b>if</b>&nbsp;(soap_call_ns__echoData(soap, endpoint, action, &amp;data, &amp;data))

+&nbsp;&nbsp;&nbsp;soap_print_fault(soap, stderr);

+<b>else</b><br />

+&nbsp;&nbsp;&nbsp;printf("<tt>Got&nbsp;data\n</tt>"); <br />

+soap_destroy(soap); // remove deserialized class instances (C++ only) <br />

+soap_end(soap); // remove temporary and deserialized data <br />

+soap_done(soap); // detach <br />

+free(soap);

+</td></tr></table><br></i>

+Note that the <i>xop__Include.type</i> field must be set to transmit MTOM attachments, otherwise plain base64 XML will be used.

+

+<div class="p"><!----></div>

+At the server side, we can implement an operation handler that just copies the input data to output to implement the echo operation as follows:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;ns__echoData(<b>struct</b>&nbsp;soap *soap, <b>struct</b>&nbsp;ns__Data *in, <b>struct</b>&nbsp;ns__data *out) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;*out = *in; <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+}

+</td></tr></table><br></i>

+The server must use the <i>SOAP_ENC_MTOM</i> flag to initialize the soap struct to receive and send MTOM attachments.

+

+<div class="p"><!----></div>

+ <h2><a name="tth_sEc16">

+16</a>&nbsp;&nbsp;<font color="#0000FF">XML Validation</font></h2><a name="sec:validation">

+</a>

+

+<div class="p"><!----></div>

+The gSOAP XML parser applies basic rules to validate content. However,

+occurrence constraints are not automatically verified unless explicitly

+indicated.  This helps to avoid interoperability problems with toolkits that do

+not strictly enforce validation rules. In addition, we cannot always use strict

+validation for SOAP RPC encoded messages, since SOAP RPC encoding adopts a very

+loose serialization format.

+

+<div class="p"><!----></div>

+Validation constraints are checked by gSOAP with the <i>SOAP_XML_STRICT</i> input mode

+flag set, e.g.&nbsp;with <i>soap_set_imode(soap, SOAP_XML_STRICT)</i> or

+<i>soap_new(SOAP_XML_STRICT)</i>, see Section&nbsp;<a href="#sec:flags">8.12</a> for a complete list

+of flags. 

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc16.1">

+16.1</a>&nbsp;&nbsp;<font color="#0000FF">Occurrence Constraints</font></h3>

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc16.1.1">

+16.1.1</a>&nbsp;&nbsp;<font color="#0000FF">Elements with minOccurs and maxOccurs Restrictions</font></h4>

+

+<div class="p"><!----></div>

+To force the validation of minOccurs and maxOccurs contraints the <i>SOAP_XML_STRICT</i> input mode flag must be set.

+The minOccurs and maxOccurs constraints are specified for fields of a struct and members of a class in a header file using the following syntax:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<u><span class="roman">Type</span></u> <u><span class="roman">fieldname</span></u> <font size="+1"><span class="roman">[</span></font><u><span class="roman">minOccurs</span></u><font size="+1"><span class="roman">[</span></font>:<u><span class="roman">maxOccurs</span></u><font size="+1"><span class="roman">]</span></font><font size="+1"><span class="roman">]</span></font> <font size="+1"><span class="roman">[</span></font>= value<font size="+1"><span class="roman">]</span></font>

+</td></tr></table><br></i>

+The minOccurs and maxOccurs values must be integer literals. A default value can be provided when minOccurs is zero. Default values must be primitive types, integer, float, string, etc. By default the minOccurs constraint is zero.

+

+<div class="p"><!----></div>

+For example

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;ns__MyRecord <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;n = 5; // element with default value 5, minOccurs=0, maxOccurs=1<br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;m 1; // element with minOccurs=1 <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;__size 0:10; // sequence &lt;item&#62; with minOccurs=0, maxOccurs=10<br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;*item; <br />

+&nbsp;&nbsp;&nbsp;std::vector<tt>&lt;</tt>double<tt>&gt;</tt> nums 2; // sequence &lt;nums&#62; with minOccurs=2, maxOccurs=unbounded <br />

+}; <br />

+<b>struct</b>&nbsp;arrayOfint <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;*__ptr 1:100; // minOccurs=1, maxOccurs=100 <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;size; <br />

+};

+</td></tr></table><br></i>

+Pointer-based struct fields and class members are allowed to be nillable when minOccurs is zero.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc16.1.2">

+16.1.2</a>&nbsp;&nbsp;<font color="#0000FF">Required and Prohibited Attributes</font></h4>

+

+<div class="p"><!----></div>

+Similar to the minOccurs and maxOccurs annotations defined in the previous

+section, attributes in a struct or class can be annotated with occurrence

+constraints to make them optional (0), required (1), or prohibited (0:0).

+Default values can be assigned to optional attributes.

+

+<div class="p"><!----></div>

+For example

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;ns__MyRecord <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;@<b>int</b>&nbsp;m 1; // required attribute (occurs at least once) <br />

+&nbsp;&nbsp;&nbsp;@<b>int</b>&nbsp;n = 5; // optional attribute with default value 5<br />

+&nbsp;&nbsp;&nbsp;@<b>int</b>&nbsp;o 0; // optional attribute (may or may not occur) <br />

+&nbsp;&nbsp;&nbsp;@<b>int</b>&nbsp;p 0:0; // prohibited attribute <br />

+};

+</td></tr></table><br></i>

+Remember to set the <i>SOAP_XML_STRICT</i> input mode flag to

+enable the validation of attribute occurrence constraints.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc16.1.3">

+16.1.3</a>&nbsp;&nbsp;<font color="#0000FF">Data Length Restrictions</font></h4>

+

+<div class="p"><!----></div>

+A schema simpleType is defined with a <i><b>typedef</b></i> by taking a base primitive to defined a derived simpleType.  For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>int</b>&nbsp;time__seconds;

+</td></tr></table><br></i>

+This defines the following schema type in <i>time.xsd</i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;simpleType name="seconds&#187; <br />

+&nbsp;&nbsp;&nbsp;&lt;restriction base="xsd:int"/&#62; <br />

+&lt;/simpleType&#62;

+</td></tr></table><br></tt>

+A complexType with simpleContent is defined with a wrapper struct/class:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;time__date <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*__item; // some custom format date (restriction of string) <br />

+&nbsp;&nbsp;&nbsp;@<b>enum</b>&nbsp;time__zone { EST, GMT, ... } zone; <br />

+}

+</td></tr></table><br></i>

+This defines the following schema type in <i>time.xsd</i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;complexType name="date&#187; <br />

+&nbsp;&nbsp;&nbsp;&lt;simpleContent&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;extension base="xsd:string"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;/simpleContent&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;attribute name="zone" type="time:zone" use="optional"/&#62; <br />

+&lt;/complexType&#62;

+&lt;simpleType name="zone&#187; <br />

+&nbsp;&nbsp;&nbsp;&lt;restriction base="xsd:string&#187; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;enumeration value="EST"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;enumeration value="GMT"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;&lt;/restriction&#62; <br />

+&lt;/simpleType&#62;

+</td></tr></table><br></tt>

+Data value length constraints of simpleTypes and complexTypes with simpleContent are defined as follows.

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*ns__string256 0:256; // simpleType restriction of string with max length 256 characters <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*ns__string10 10:10; // simpleType restriction of string with length of 10 characters <br />

+<b>typedef</b>&nbsp;std::string *ns__string8 8; // simpleType restriction of string with at least 8 characters <br />

+<b>struct</b>&nbsp;ns__data <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*__item :256; // simpleContent with at most 256 characters <br />

+&nbsp;&nbsp;&nbsp;@<b>char</b>&nbsp;*name 1; // required name attribute <br />

+};

+<b>struct</b>&nbsp;time__date <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*__item :100;

+&nbsp;&nbsp;&nbsp;@<b>enum</b>&nbsp;time__zone { EST, GMT, ... } zone = GMT; <br />

+}

+</td></tr></table><br></i>

+Remember to set the <i>SOAP_XML_STRICT</i> input mode flag to

+enable the validation of value length constraints.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc16.2">

+16.2</a>&nbsp;&nbsp;<font color="#0000FF">Other Constraints</font></h3>

+

+<div class="p"><!----></div>

+To associate a pattern with a simpleType, you can define a simpleType with a <i><b>typedef</b></i> and a pattern string:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>int</b>&nbsp;time__second "[1-5]?[0-9] - 60";

+</td></tr></table><br></i>

+This defines the following schema type in <i>time.xsd</i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+&lt;simpleType name="second&#187; <br />

+&nbsp;&nbsp;&nbsp;&lt;restriction base="xsd:int&#187; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;pattern value="[1-5]?[0-9] - 60"/&#62; <br />

+&nbsp;&nbsp;&nbsp;&lt;/restriction base="xsd:int"/&#62; <br />

+&lt;/simpleType&#62;

+</td></tr></table><br></tt>

+The pattern string MUST contain a valid regular expression.

+

+<div class="p"><!----></div>

+Patterns are currently not checked in the validation process.

+

+<div class="p"><!----></div>

+ <h2><a name="tth_sEc17">

+17</a>&nbsp;&nbsp;<font color="#0000FF">SOAP-over-UDP</font></h2><a name="sec:udp">

+</a>

+

+<div class="p"><!----></div>

+UDP is a simple, unreliable datagram protocol: UDP sockets are connectionless.

+UDP address formats are identical to those used by TCP.  In particular UDP

+provides a port identifier in addition to the normal Internet address format.

+The UDP port space is separate from the TCP port space (i.e. a UDP port may not

+be "connected" to a TCP port).  In addition broadcast packets may be sent

+(assuming the underlying network supports this) by using a reserved "broadcast

+address"; this address is network interface dependent.

+

+<div class="p"><!----></div>

+To enable SOAP-over-UDP with gSOAP, <i>stdsoap2.c</i> and <i>stdsoap2.cpp</i>

+MUST be compiled with <i>-DWITH_UDP</i> prior to linking with your application.

+

+<div class="p"><!----></div>

+Client-side messages with SOAP-over-UDP endpoint URLs

+(<i>soap.udp://...</i>) will be automatically transmitted as datagrams.

+Server-side applications should set the <i>SOAP_IO_UDP</i> mode flag to

+accept UDP requests, e.g. using <i>soap_init1</i> or <i>soap_set_mode</i>.

+

+<div class="p"><!----></div>

+The maximum message length for datagram packets is restricted by the buffer

+size <i>SOAP_BUFLEN</i>, which is 65536 by default, unless

+compiled with <i>WITH_LEAN</i> to support small-scale embedded systems.

+For UDP transport <i>SOAP_BUFLEN</i> must not exceed the maximum UDP packet size

+65536 (the size of datagram messages is constrained by the

+UDP packet size 2<sup>16</sup>=65536 as per UDP standard). You can use gzip compression

+to reduce the message size, but note that compressed SOAP-over-UDP is a

+gSOAP-specific feature because it is not part of the SOAP-over-UDP

+specification.

+

+<div class="p"><!----></div>

+The SOAP-over-UDP specification relies on WS-Addressing. The <i>wsa.h</i>

+file in the <i>import</i> directory defines the WS-Addressing elements for

+client and server applications.

+

+<div class="p"><!----></div>

+The gSOAP implementation conforms to the SOAP-over-UDP requirements:

+

+<ul>

+<li> SOAP-over-UDP server endpoint URL format: <i>soap.udp://host:port/path</i>

+<div class="p"><!----></div>

+</li>

+

+<li> Support one-way message-exchange pattern (MEP) where a SOAP envelope is

+  carried in a user datagram.

+<div class="p"><!----></div>

+</li>

+

+<li> Support request-response message-exchange pattern (MEP) where SOAP envelopes

+  are carried in user datagrams.

+<div class="p"><!----></div>

+</li>

+

+<li> Support multicast transmission of SOAP envelopes carried in user datagrams.

+<div class="p"><!----></div>

+</li>

+

+<li> Support both SOAP 1.1 and SOAP 1.2 envelopes.

+<div class="p"><!----></div>

+</li>

+</ul>

+The following additional features are also available, but are not supported by the SOAP-over-UDP specification:

+

+<ul>

+<li> Zlib/gzip message compression (compile <i>-DWITH_GZIP</i>).

+<div class="p"><!----></div>

+</li>

+

+<li> SOAP with DIME attachments over UDP.

+<div class="p"><!----></div>

+</li>

+

+<li> SOAP with MIME attachments (SwA) over UDP.

+<div class="p"><!----></div>

+</li>

+

+<li> Support for IPv6 (compile <i>-DWITH_IPV6</i>)

+<div class="p"><!----></div>

+</li>

+</ul>

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc17.1">

+17.1</a>&nbsp;&nbsp;<font color="#0000FF">Using WS-Addressing with SOAP-over-UDP</font></h3><a name="sec:udp.h">

+</a>

+

+<div class="p"><!----></div>

+A SOAP-over-UDP application MUST use WS-Addressing to control message delivery

+as per SOAP-over-UDP specification.

+

+<div class="p"><!----></div>

+The <i>wsa.h</i> file in the <i>import</i> directory defines the

+WS-Addressing elements.  To include the WS-Addressing elements in the SOAP

+Header for messaging, a <i><b>struct</b>&nbsp;SOAP_ENV__Header</i> structure must be

+defined in your header file with the appropriate WS-Addressing elements.

+For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#import "wsa.h" <br />

+<b>struct</b>&nbsp;SOAP_ENV__Header <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;mustUnderstand _wsa__MessageID  wsa__MessageID 0; <br />

+&nbsp;&nbsp;&nbsp;mustUnderstand _wsa__RelatesTo *wsa__RelatesTo 0; <br />

+&nbsp;&nbsp;&nbsp;mustUnderstand _wsa__From      *wsa__From      0; <br />

+&nbsp;&nbsp;&nbsp;mustUnderstand _wsa__ReplyTo   *wsa__ReplyTo   0; <br />

+&nbsp;&nbsp;&nbsp;mustUnderstand _wsa__FaultTo   *wsa__FaultTo   0; <br />

+&nbsp;&nbsp;&nbsp;mustUnderstand _wsa__To         wsa__To        0; <br />

+&nbsp;&nbsp;&nbsp;mustUnderstand _wsa__Action     wsa__Action    0; <br />

+};

+</td></tr></table><br></i>

+We also included a <i>//gsoap wsa schema import</i> directive in the <i>wsa.h</i> file to enable the generation of WSDL

+specifications that import (instead of includes) the WS-Addressing elements.

+Note that the <i>//gsoapopt w</i> directive must not be present in your header file to enable WSDL generation.

+

+<div class="p"><!----></div>

+One-way SOAP-over-UDP messages (see Section&nbsp;<a href="#sec:oneway1">7.3</a>) should be

+declared to include the <i>wsa:MessageID</i>, <i>wsa:To</i>, and <i>wsa:Action</i>

+elements in the SOAP Header of the request message as follows:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap ns service method-header-part:          sendString wsa__MessageID <br />

+//gsoap ns service method-header-part:          sendString wsa__To <br />

+//gsoap ns service method-header-part:          sendString wsa__Action <br />

+<b>int</b>&nbsp;ns__sendString(<b>char</b>&nbsp;*str, <b>void</b>);

+</td></tr></table><br></i>

+Request-response SOAP-over-UDP messages should be declared to include the

+<i>wsa:MessageID</i>, <i>wsa:To</i>, <i>wsa:Action</i>, and <i>wsa:ReplyTo</i>

+elements in the SOAP Header of the request message, and the the

+<i>wsa:MessageID</i>, <i>wsa:To</i>, <i>wsa:Action</i>, and <i>wsa:RelatesTo</i>

+elements in the SOAP Header of the response message:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap ns service method-header-part:          echoString wsa__MessageID <br />

+//gsoap ns service method-header-part:          echoString wsa__To <br />

+//gsoap ns service method-header-part:          echoString wsa__Action <br />

+//gsoap ns service method-input-header-part:    sendString wsa__ReplyTo <br />

+//gsoap ns service method-output-header-part:   echoString wsa__RelatesTo <br />

+<b>int</b>&nbsp;ns__echoString(<b>char</b>&nbsp;*str, <b>char</b>&nbsp;**res);

+</td></tr></table><br></i>

+For the content requirements of these elements, please consult the

+SOAP-over-UDP specification and/or read the next sections explaining

+SOAP-over-UDP unicast, multicast, one-way, and request-response client and

+server applications.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc17.2">

+17.2</a>&nbsp;&nbsp;<font color="#0000FF">Client-side One-way Unicast</font></h3>

+

+<div class="p"><!----></div>

+This example assumes that the gSOAP header file includes the SOAP Header with

+WS-Addressing elements and the <i>ns__sendString</i> function discussed in

+Section&nbsp;<a href="#sec:udp.h">17.1</a>

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap soap; <br />

+<b>struct</b>&nbsp;SOAP_ENV__Header header; // the SOAP Header <br />

+soap_init(&amp;soap); <br />

+soap.send_timeout = 1; // 1s timeout <br />

+soap_default_SOAP_ENV__Header(&amp;soap, &amp;header); // init SOAP Header <br />

+header.wsa__MessageID = "<i>message ID</i>"; <br />

+header.wsa__To = "<i>server URL</i>"; <br />

+header.wsa__Action = "<i>server action</i>"; <br />

+soap.header = &amp;header; // bind the SOAP Header for transport <br />

+// Send the message over UDP: <br />

+<b>if</b>&nbsp;(soap_send_ns__echoString(&amp;soap, "soap.udp://...", NULL, "hello world!")) <br />

+&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); // report error <br />

+soap_end(&amp;soap); // cleanup <br />

+soap_destroy(&amp;soap); // cleanup <br />

+soap_done(&amp;soap); // close connection (should not use soap struct after this)

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc17.3">

+17.3</a>&nbsp;&nbsp;<font color="#0000FF">Client-side One-way Multicast</font></h3>

+

+<div class="p"><!----></div>

+This example is similar to the one-way unicast example discussed above, but

+uses a broadcast address and the <i>SO_BROADCAST</i> socket option:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap soap; <br />

+<b>struct</b>&nbsp;SOAP_ENV__Header header; // the SOAP Header <br />

+soap_init(&amp;soap); <br />

+soap.send_timeout = 1; // 1s timeout <br />

+soap.connect_flags = SO_BROADCAST; // required for broadcast <br />

+soap_default_SOAP_ENV__Header(&amp;soap, &amp;header); // init SOAP Header <br />

+header.wsa__MessageID = "<i>message ID</i>"; <br />

+header.wsa__To = "<i>server URL</i>"; <br />

+header.wsa__Action = "<i>server action</i>"; <br />

+soap.header = &amp;header; // bind the SOAP Header for transport <br />

+// Send the message over UDP to a broadcast address: <br />

+<b>if</b>&nbsp;(soap_send_ns__echoString(&amp;soap, "soap.udp://...", NULL, "hello world!")) <br />

+&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); // report error <br />

+soap_end(&amp;soap); // cleanup <br />

+soap_destroy(&amp;soap); // cleanup <br />

+soap_done(&amp;soap); // close connection (should not use soap struct after this)

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc17.4">

+17.4</a>&nbsp;&nbsp;<font color="#0000FF">Client-side Request-Response Unicast</font></h3>

+

+<div class="p"><!----></div>

+This example assumes that the gSOAP header file includes the SOAP Header with

+WS-Addressing elements and the <i>ns__echoString</i> function discussed in

+Section&nbsp;<a href="#sec:udp.h">17.1</a>

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap soap; <br />

+<b>struct</b>&nbsp;SOAP_ENV__Header header; // the SOAP Header <br />

+<b>struct</b>&nbsp;wsa__EndpointReferenceType replyTo; // (anonymous) reply address <br />

+<b>char</b>&nbsp;*res; // server response <br />

+soap_init(&amp;soap); <br />

+soap.send_timeout = 1; // 1s timeout <br />

+soap.recv_timeout = 1; // 1s timeout <br />

+soap_default_SOAP_ENV__Header(&amp;soap, &amp;header); // init SOAP Header <br />

+soap_default_wsa__EndpointReferenceType(&amp;soap, &amp;replyTo); // init reply address <br />

+replyTo.Address = "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"; <br />

+header.wsa__MessageID = "<i>message ID</i>"; <br />

+header.wsa__To = "<i>server URL</i>"; <br />

+header.wsa__Action = "<i>server action</i>"; <br />

+header.wsa__ReplyTo = &amp;replyTo; <br />

+soap.header = &amp;header; // bind the SOAP Header for transport <br />

+// Send and receive messages over UDP: <br />

+<b>if</b>&nbsp;(soap_call_ns__echoString(&amp;soap, "soap.udp://...", NULL, "hello world!", &amp;res)) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap.error == SOAP_EOF &amp;&amp; soap.errnum == 0) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Timeout: no response from server (message already delivered?) <br />

+&nbsp;&nbsp;&nbsp;<b>else</b><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); <br />

+} <br />

+<b>else</b><br />

+&nbsp;&nbsp;&nbsp;// UDP server response is stored in 'res' <br />

+// check SOAP header received, if applicable <br />

+check_header(&amp;soap.header); <br />

+soap_end(&amp;soap); // cleanup <br />

+soap_destroy(&amp;soap); // cleanup <br />

+soap_done(&amp;soap); // close connection (should not use soap struct after this)

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc17.5">

+17.5</a>&nbsp;&nbsp;<font color="#0000FF">Client-side Request-Response Multicast</font></h3>

+

+<div class="p"><!----></div>

+This example is similar to the request-response unicast example discussed

+above, but uses a broadcast address and the <i>SO_BROADCAST</i> socket option.

+Because we expect to receive multiple responses, we also need to use separate

+request-response messages to send one request and consume multiple responses.

+In this example we defined a <i>bcastString</i> request and a

+<i>bcastStringResponse</i> response message, which are essentially declared as

+one-way messages in the header file:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap ns service method-header-part:          bcastString wsa__MessageID <br />

+//gsoap ns service method-header-part:          bcastString wsa__To <br />

+//gsoap ns service method-header-part:          bcastString wsa__Action <br />

+//gsoap ns service method-header-part:          bcastString wsa__ReplyTo <br />

+<b>int</b>&nbsp;ns__bcastString(<b>char</b>&nbsp;*str, <b>void</b>); <br />

+//gsoap ns service method-header-part:          bcastStringResponse wsa__MessageID <br />

+//gsoap ns service method-header-part:          bcastStringResponse wsa__To <br />

+//gsoap ns service method-header-part:          bcastStringResponse wsa__Action <br />

+//gsoap ns service method-header-part:          bcastStringResponse wsa__RelatesTo <br />

+<b>int</b>&nbsp;ns__bcastStringResponse(<b>char</b>&nbsp;*res, <b>void</b>);

+</td></tr></table><br></i>

+The cliend code includes a loop to receive response messages until a timeout occurs:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap soap; <br />

+<b>struct</b>&nbsp;SOAP_ENV__Header header; <br />

+<b>struct</b>&nbsp;wsa__EndpointReferenceType replyTo; <br />

+<b>char</b>&nbsp;*res; <br />

+soap_init(&amp;soap); <br />

+soap.connect_flags = SO_BROADCAST; <br />

+soap.send_timeout = 1; // 1s timeout <br />

+soap.recv_timeout = 1; // 1s timeout <br />

+soap_default_SOAP_ENV__Header(&amp;soap, &amp;header); <br />

+soap.header = &amp;header; <br />

+soap_default_wsa__EndpointReferenceType(&amp;soap, &amp;replyTo); <br />

+replyTo.Address = "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"; <br />

+header.wsa__MessageID = "<i>message ID</i>"; <br />

+header.wsa__To = "<i>server URL</i>"; <br />

+header.wsa__Action = "<i>server action</i>"; <br />

+header.wsa__ReplyTo = &amp;replyTo; <br />

+<b>if</b>&nbsp;(soap_send_ns__bcastString(&amp;soap, "soap.udp://...", NULL, "hello world!")) <br />

+&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); <br />

+<b>else</b><br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>for</b>&nbsp;(;;) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_recv_ns__bcastStringResponse(&amp;soap, &amp;res)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>break</b>; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Got response 'res' from a server <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap.error == SOAP_EOF &amp;&amp; soap.errnum == 0) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Timeout: no more messages received <br />

+&nbsp;&nbsp;&nbsp;<b>else</b><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); <br />

+} <br />

+soap_end(&amp;soap); // cleanup <br />

+soap_destroy(&amp;soap); // cleanup <br />

+soap_done(&amp;soap); // close connection (should not use soap struct after this)

+</td></tr></table><br></i>

+Note that a server for the <i>bcastString</i> does not need to use two-one way

+messages.  Thus, multicast request-response message pattern can be declared and

+implemented as request-response operations at the server side.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc17.6">

+17.6</a>&nbsp;&nbsp;<font color="#0000FF">SOAP-over-UDP Server</font></h3>

+

+<div class="p"><!----></div>

+The following example code illustrates a SOAP-over-UDP server for one-way <i>sendString</i> and request-response <i>echoString</i> messages.

+This example assumes that the gSOAP header file includes the SOAP Header with

+WS-Addressing elements and the <i>ns__echoString</i> function discussed in

+Section&nbsp;<a href="#sec:udp.h">17.1</a>.

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;soap_init1(&amp;soap, SOAP_IO_UDP); // must set UDP flag <br />

+&nbsp;&nbsp;&nbsp;// bind to host (NULL=current host) and port: <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!soap_valid_socket(soap_bind(&amp;soap, host, port, 100))) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(1); <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>for</b>&nbsp;(;;) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_serve(&amp;soap)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); // report the problem <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_destroy(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_end(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;soap_done(&amp;soap); // close connection <br />

+} <br />

+<b>int</b>&nbsp;ns__echoString(<b>struct</b>&nbsp;soap *soap, <b>char</b>&nbsp;*str, <b>char</b>&nbsp;**res) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!soap<tt>-&gt;</tt>header) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;soap_sender_fault(soap, "No SOAP header", NULL); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!soap<tt>-&gt;</tt>header<tt>-&gt;</tt>wsa__MessageID) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;soap_sender_fault(soap, "No WS-Addressing MessageID", NULL); <br />

+&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>header<tt>-&gt;</tt>wsa__RelatesTo = (<b>struct</b>&nbsp;wsa__Relationship*)soap_malloc(soap, <b>sizeof</b>(<b>struct</b>&nbsp;wsa__Relationship)); <br />

+&nbsp;&nbsp;&nbsp;soap_default_wsa__Relationship(soap, soap<tt>-&gt;</tt>header<tt>-&gt;</tt>wsa__RelatesTo); <br />

+&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>header<tt>-&gt;</tt>wsa__RelatesTo<tt>-&gt;</tt>__item = soap<tt>-&gt;</tt>header<tt>-&gt;</tt>wsa__MessageID; <br />

+&nbsp;&nbsp;&nbsp;// must check for duplicate messages <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(check_received(soap<tt>-&gt;</tt>header<tt>-&gt;</tt>wsa__MessageID)) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Request message already received <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_STOP; // don't return response <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!soap<tt>-&gt;</tt>header<tt>-&gt;</tt>wsa__ReplyTo <font face="symbol">|</font

+><font face="symbol">|</font

+> !soap<tt>-&gt;</tt>header<tt>-&gt;</tt>wsa__ReplyTo<tt>-&gt;</tt>Address) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;soap_sender_fault(soap, "No WS-Addressing ReplyTo address", NULL); <br />

+&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>header<tt>-&gt;</tt>wsa__To = soap<tt>-&gt;</tt>header<tt>-&gt;</tt>wsa__ReplyTo<tt>-&gt;</tt>Address; <br />

+&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>header<tt>-&gt;</tt>wsa__MessageID = soap_strdup(soap, soap_int2s(soap, id_count++)) ; <br />

+&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>header<tt>-&gt;</tt>wsa__Action = "http://genivia.com/udp/echoStringResponse"; <br />

+&nbsp;&nbsp;&nbsp;*res = str; <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+} <br />

+<b>int</b>&nbsp;ns__sendString(<b>struct</b>&nbsp;soap *soap, <b>char</b>&nbsp;*str) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!soap<tt>-&gt;</tt>header) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_STOP; <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!soap<tt>-&gt;</tt>header<tt>-&gt;</tt>wsa__MessageID) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_STOP; <br />

+&nbsp;&nbsp;&nbsp;// must check for duplicate messages <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(check_received(soap<tt>-&gt;</tt>header<tt>-&gt;</tt>wsa__MessageID)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_STOP; <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+} <br />

+<b>int</b>&nbsp;ns__sendStringResponse(<b>struct</b>&nbsp;soap *soap, <b>char</b>&nbsp;*res) <br />

+{ <b>return</b>&nbsp;SOAP_NO_METHOD; } // we don't expect to serve this message

+</td></tr></table><br></i>

+The server binds to a host and port and accepts messages in a tight sequential

+loop.  Because UDP does not have the equivalent of an accept the messages

+cannot be dispatched to threads, the <i>soap_serve</i> waits for a message and

+immediately accepts it. You can use a receive timeout to make <i>soap_serve</i>

+non-blocking.

+

+<div class="p"><!----></div>

+ <h2><a name="tth_sEc18">

+18</a>&nbsp;&nbsp;<font color="#0000FF">Advanced Features</font></h2><a name="sec:advanced">

+</a>

+

+<div class="p"><!----></div>

+		     <h3><a name="tth_sEc18.1">

+18.1</a>&nbsp;&nbsp;<font color="#0000FF">Internationalization</font></h3>

+

+<div class="p"><!----></div>

+gSOAP uses regular strings by default.  Regular strings cannot be used to hold

+UCS characters outside of the character range [1,255].  gSOAP can handle

+wide-character content in two ways. First, applications can utilize

+wide-character strings (<i>wchar_t*</i>) instead of regular strings to store

+wide-character content.  For example, the <tt>xsd:string</tt> string schema type

+can be declared as a wide-character string and used subsequently:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;wchar_t *xsd__string; <br />

+... <br />

+<b>int</b>&nbsp;ns__myMethod(xsd__string input, xsd__string *output);

+</td></tr></table><br></i>

+Second, regular strings can be used to hold wide-character content in UTF-8

+format.  This is accomplished with the <i>SOAP_C_UTFSTRING</i> flag (for both input/output mode), see Section&nbsp;<a href="#sec:flags">8.12</a>.

+With this flag set, gSOAP will deserialize XML into

+regular strings in UTF-8 format.  An application is responsible for filling

+regular strings with UTF-8 content to ensure that strings can be correctly serialized XML.

+Third, the <i>SOAP_C_MBSTRING</i> flag (for both input/output mode) can be used to activate multibyte character support. Multibyte support depends on the locale settings for dealing with extended natural language encodings.

+

+<div class="p"><!----></div>

+Both regular strings and wide-character strings can be used together within an application.

+For example, the following header file declaration introduces two string schema types:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;wchar_t *xsd__string; <br />

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*xsd__string_; // trailing '_' avoids name clash <br />

+... <br />

+<b>int</b>&nbsp;ns__myMethod(xsd__string input, xsd__string_ *output);

+</td></tr></table><br></i>

+The <i>input</i> string parameter is a wide-character string and the <i>output</i> string

+parameter is a regular string.  The regular string has UCS character content 

+in the range [1,255] unless the

+<i>SOAP_C_UTFSTRING</i> flag is set.  With this flag, the string has UTF-8

+encoded content.

+

+<div class="p"><!----></div>

+Please consult the UTF-8 specification for details on the UTF-8 format.

+Note that the ASCII character set [1-127] is a subset of UTF-8. Therefore, with the <i>SOAP_C_UTFSTRING</i> flag set, strings may hold ASCII character data and UTF-8 extensions.

+

+<div class="p"><!----></div>

+		     <h3><a name="tth_sEc18.2">

+18.2</a>&nbsp;&nbsp;<font color="#0000FF">Customizing the WSDL and Namespace Mapping Table File Contents With gSOAP Directives</font></h3><a name="sec:directives">

+</a>

+

+<div class="p"><!----></div>

+A header file can be augmented with directives for the gSOAP Stub and Skeleton compiler to automatically generate customized WSDL and namespace mapping tables contents. The WSDL and namespace mapping table files do not need to be modified by hand (Sections&nbsp;<a href="#sec:wsdl">7.2.8</a> and&nbsp;<a href="#sec:nstable">9.4</a>).

+In addition, the sample SOAP/XML request and response files generated by the compiler are valid provided that XML Schema namespace

+information is added to the header file with directives so that the gSOAP compiler can produce example SOAP/XML messages that are correctly namespace qualified.

+These compiler directive are specified as <i>//</i>-comments.

+(Note: blanks can be used anywhere in the directive, except between <i>//</i> and <i>gsoap</i>.)

+

+<div class="p"><!----></div>

+Three directives are currently supported that can be used to specify details associated with namespace prefixes used by the remote

+method names in the header file.

+To specify the name of a Web Service in the header file, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service name: <i>service-name</i>

+</td></tr></table><br></i>

+where <i>namespace-prefix</i> is a namespace prefix used by identifiers in the header file and <i>service-name</i> is the name

+of a Web Service (only required to create new Web Services).

+The name may be followed by text up to the end of the line which is incorporated into the WSDL service documentation. Alternatively, the service documentation can be provided with the directive below.

+

+<div class="p"><!----></div>

+To specify the name of the WSDL definitions in the header file, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service definitions: <i>definitions-name</i>

+</td></tr></table><br></i>

+where <i>namespace-prefix</i> is a namespace prefix used by identifiers in the header file and <i>definitions-name</i> is the name of the WSDL definitions. By default, the WSDL definitions name is the same as the service name.

+

+<div class="p"><!----></div>

+To specify the documentation of a Web Service in the header file, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service documentation: <i>text</i>

+</td></tr></table><br></i>

+where <i>namespace-prefix</i> is a namespace prefix used by identifiers in the header file and <i>text</i> is the documentation text up to the end of the line.

+The text is incorporated into the WSDL service documentation.

+

+<div class="p"><!----></div>

+To specify the portType of a Web Service in the header file, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service portType: <i>portType-name</i>

+</td></tr></table><br></i>

+or

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service type: <i>portType-name</i>

+</td></tr></table><br></i>

+where <i>namespace-prefix</i> is a namespace prefix used by identifiers in the header file and <i>portType-name</i> is the portType name of the WSDL service portType.

+

+<div class="p"><!----></div>

+To specify the binding name of a Web Service in the header file, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service binding: <i>binding-name</i>

+</td></tr></table><br></i>

+where <i>namespace-prefix</i> is a namespace prefix used by identifiers in the header file and <i>binding-name</i> is the binding name of the WSDL service binding element. By default, the binding name is the same as the service name.

+

+<div class="p"><!----></div>

+To specify the binding's transport protocol of a Web Service in the header file, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service transport: <i>transport-URL</i>

+</td></tr></table><br></i>

+where <i>namespace-prefix</i> is a namespace prefix used by identifiers in the header file and <i>transport-URL</i> is the URL of the transport protocol such as <i>http://schemas.xmlsoap.org/soap/http</i> for HTTP. HTTP transport is assumed by default.

+

+<div class="p"><!----></div>

+To specify the location (or port endpoint) of a Web Service in the header file, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service location: <i>URL</i>

+</td></tr></table><br></i>

+or alternatively

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service port: <i>URL</i>

+</td></tr></table><br></i>

+where <i>URL</i> is the location of the Web Service (only required to create new Web Services).

+The <i>URL</i> specifies the path to the service executable (so <i><i>URL</i>/<i>service-executable</i></i>

+is the actual location of the executable when declared).

+

+<div class="p"><!----></div>

+To specify the name of the executable of a Web Service in the header file, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service executable: <i>executable-name</i>

+</td></tr></table><br></i>

+where <i>executable-name</i> is the name of the executable of the Web Service.

+

+<div class="p"><!----></div>

+When doc/literal encoding is required for the entire service, the service encoding can be specified in the header file as follows:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service encoding: literal

+</td></tr></table><br></i>

+or when the <tt>SOAP-ENV:encodingStyle</tt> attribute is different from the SOAP 1.1/1.2 encoding style:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service encoding: <i>encoding-style</i>

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+To specify the namespace URI of a Web Service in the header file, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service namespace: <i>namespace-URI</i>

+</td></tr></table><br></i>

+where <i>namespace-URI</i> is the URI associated with the namespace prefix.

+

+<div class="p"><!----></div>

+In addition, the schema namespace URI can be specified in the header file:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> schema namespace: <i>namespace-URI</i>

+</td></tr></table><br></i>

+where <i>namespace-URI</i> is the schema URI associated with the namespace prefix.

+If present, it defines the schema-part of the generated WSDL file and the URI in the namespace mapping table.

+This declaration is useful when the service declares its own data types that need to be associated with a namespace.

+Furthermore, the header file for client applications do not need the full service details and the specification of the schema

+namespaces for namespace prefixes suffices.

+

+<div class="p"><!----></div>

+The directive above specifies a new schema and the gSOAP compiler generates a schema files (.xsd) file for the schema.

+An existing schema namespace URI can be imported with:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> schema import: <i>namespace-URI</i>

+</td></tr></table><br></i>

+where <i>namespace-URI</i> is the schema URI associated with the namespace prefix.

+gSOAP does not produce XML Schema files for imported schemas and imports the schema namespaces in the generated WSDL file.

+

+<div class="p"><!----></div>

+A schema namespace URI can be imported from a location with:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> schema namespace: <i>namespace-URI</i> <br />

+//gsoap <i>namespace-prefix</i> schema import: <i>schema-location</i>

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+The elementFormDefault and attributeFormDefault qualification of a schema can be defined with:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> schema elementForm: qualified <br />

+//gsoap <i>namespace-prefix</i> schema attributeForm: qualified

+</td></tr></table><br></i>

+or:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> schema elementForm: unqualified <br />

+//gsoap <i>namespace-prefix</i> schema attributeForm: unqualified

+</td></tr></table><br></i>

+A shortcut to define the default qualification of elements and attributes of a schema:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> schema form: qualified

+</td></tr></table><br></i>

+or:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> schema form: unqualified

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+To document a data type, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> schema type-documentation: <i>type-name</i> //<i>text</i>

+</td></tr></table><br></i>

+where <i>type-name</i> is the unqualified name of the data type and <i>text</i>

+is a line of text terminated by a newline. Do not use any XML reserved

+characters in <i>text</i> such as  &lt;  and  &gt; . Use well-formed XML and XHTML markup instead.

+For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap ns schema type-documentation: tdata stores <tt>&lt;a&nbsp;href="transaction.html"&gt;</tt>transaction<tt>&lt;/a&gt;</tt> data <br />

+<b>class</b>&nbsp;ns__tdata <br />

+{ ... }

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+To document a method, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service method-documentation: <i>method-name</i> //<i>text</i>

+</td></tr></table><br></i>

+where <i>method-name</i> is the unqualified name of the method and <i>text</i>

+is a line of text terminated by a newline. Do not use any XML reserved

+characters in <i>text</i> such as  &lt;  and  &gt; . Use well-formed XML and XHTML markup instead.

+For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap ns service method-documentation: getQuote returns a <tt>&lt;i&gt;</tt>stock quote<tt>&lt;/i&gt;</tt> <br />

+<b>int</b>&nbsp;ns__getQuote(<b>char</b>&nbsp;*symbol, <b>float</b>&nbsp;&amp;_result);

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+To specify the SOAPAction for a method, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service method-action: <i>method-name</i> <i>action</i>

+</td></tr></table><br></i>

+where <i>method-name</i> is the unqualified name of the method and <i>action</i>

+is a quoted or non-quoted string (spaces and blanks are not allowed).

+For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap ns service method-action: getQuote "" <br />

+<b>int</b>&nbsp;ns__getQuote(<b>char</b>&nbsp;*symbol, <b>float</b>&nbsp;&amp;_result);

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+When document style is preferred for a particular service method, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service method-style: <i>method-name</i> document

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+When SOAP RPC encoding is required for a particular service method, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service method-encoding: <i>method-name</i> encoded

+</td></tr></table><br></i>

+When literal encoding is required for a particular service method, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service method-encoding: <i>method-name</i> literal

+</td></tr></table><br></i>

+or when the <tt>SOAP-ENV:encodingStyle</tt> attribute is different from the SOAP 1.1/1.2 encoding style, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service method-encoding: <i>method-name</i> <i>encoding-style</i>

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+When SOAP RPC encoding is required for a particular service method response when the request message is literal, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service method-response-encoding: <i>method-name</i> encoded

+</td></tr></table><br></i>

+When literal encoding is required for a particular service method response when the request message is encoded, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service method-response-encoding: <i>method-name</i> literal

+</td></tr></table><br></i>

+or when the <tt>SOAP-ENV:encodingStyle</tt> attribute is different from the SOAP 1.1/1.2 encoding style, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service method-response-encoding: <i>method-name</i> <i>encoding-style</i>

+</td></tr></table><br></i>

+Note that the <i>method-response-encoding</i> is set to the value of <i>method-encoding</i> by default.

+

+<div class="p"><!----></div>

+When header processing is required, each method declared in the WSDL should provide a binding to the parts of the header that may

+appear as part of a method request message. Such a binding is given by:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service method-header-part: <i>method-name</i> <i>header-part</i>

+</td></tr></table><br></i>

+For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;SOAP_ENV__Header <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*h__transaction; <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;UserAuth *h__authentication; <br />

+};

+</td></tr></table><br></i>

+Suppose method <i>ns__login</i> uses both header parts (at most), then this is declared as:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap ns service method-header-part: login h__transaction <br />

+//gsoap ns service method-header-part: login h__authentication <br />

+<b>int</b>&nbsp;ns__login(...);

+</td></tr></table><br></i>

+Suppose method <i>ns__search</i> uses only the first header part, then this is declared as:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap ns service method-header-part: search h__transaction <br />

+int ns__search(...);

+</td></tr></table><br></i>

+Note that the method name and header part names MUST be namespace qualified.

+The headers MUST be present in all operations that declared the header parts.

+

+<div class="p"><!----></div>

+To specify the header parts for the method input (method request message), use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service method-input-header-part: <i>method-name</i> <i>header-part</i>

+</td></tr></table><br></i>

+Similarly, to specify the header parts for the method output (method response message), use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service method-output-header-part: <i>method-name</i> <i>header-part</i>

+</td></tr></table><br></i>

+The declarations above only affect the WSDL.

+For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;SOAP_ENV__Header <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*h__transaction; <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;UserAuth *h__authentication; <br />

+}; <br />

+//gsoap ns service method-input-header-part: login h__authentication <br />

+//gsoap ns service method-input-header-part: login h__transaction <br />

+//gsoap ns service method-output-header-part: login h__transaction <br />

+<b>int</b>&nbsp;ns__login(...);

+</td></tr></table><br></i>

+The headers MUST be present in all operations that declared the header parts.

+

+<div class="p"><!----></div>

+To specify MIME attachments for the method input and output (method request and response messages), use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service method-mime-type: <i>method-name</i> <i>mime-type</i>

+</td></tr></table><br></i>

+You can repeat this directive for all multipartRelated MIME attachments you want to associate with the method.

+

+<div class="p"><!----></div>

+To specify MIME attachments for the method input (method request message), use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service method-input-mime-type: <i>method-name</i> <i>mime-type</i>

+</td></tr></table><br></i>

+Similarly, to specify MIME attachments for the method output (method response message), use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap <i>namespace-prefix</i> service method-output-mime-type: <i>method-name</i> <i>mime-type</i>

+</td></tr></table><br></i>

+You can repeat these directives for all multipartRelated MIME attachments you want to associate with the method.

+

+<div class="p"><!----></div>

+	      <h4><a name="tth_sEc18.2.1">

+18.2.1</a>&nbsp;&nbsp;<font color="#0000FF">Example</font></h4>

+

+<div class="p"><!----></div>

+The use of directives is best illustrated with an example.

+The <i>quotex.h</i> header file of the <i>quotex</i> example in the gSOAP distribution for Unix/Linux is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap ns1 service namespace:	urn:xmethods-delayed-quotes <br />

+<b>int</b>&nbsp;ns1__getQuote(<b>char</b>&nbsp;*symbol, <b>float</b>&nbsp;&amp;result); <br />

+ <br />

+//gsoap ns2 service namespace:	urn:xmethods-CurrencyExchange <br />

+<b>int</b>&nbsp;ns2__getRate(<b>char</b>&nbsp;*country1, <b>char</b>&nbsp;*country2, <b>float</b>&nbsp;&amp;result); <br />

+ <br />

+//gsoap ns3 service name:	quotex <br />

+//gsoap ns3 service style:	rpc <br />

+//gsoap ns3 service encoding:	encoded <br />

+//gsoap ns3 service location:	http://www.cs.fsu.edu/~engelen <br />

+//gsoap ns3 service namespace:	urn:quotex <br />

+<b>int</b>&nbsp;ns3__getQuote(<b>char</b>&nbsp;*symbol, <b>char</b>&nbsp;*country, <b>float</b>&nbsp;&amp;result);

+</td></tr></table><br></i>

+The <i>quotex</i> example is a new Web Service created by combining two existing Web Services:

+the XMethods Delayed Stock Quote service and XMethods Currency Exchange service.

+

+<div class="p"><!----></div>

+Namespace prefix <i>ns3</i> is used for the new <i>quotex</i> Web Service with namespace URI <i>urn:quotex</i>,

+service name <i>quotex</i>, and location <i>http://www.cs.fsu.edu/~engelen</i>.

+Since the new Web Service invokes the <i>ns1__getQuote</i> and <i>ns2__getRate</i> remote methods,

+the service namespaces of these methods are given.

+The service names and locations of these methods are not given because they

+are only required for setting up a new Web Service for these methods

+(but may also be provided in the header file for documentation purposes).

+After invoking the gSOAP Stub and Skeleton compiler on the <i>quotex.h</i> header file:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>soapcpp2 quotex.h</i>

+</td></tr></table><br></span>

+the WSDL of the new <i>quotex</i> Web Service is saved as <i>quotex.wsdl</i>.

+Since the service name (<i>quotex</i>), location (<i>http://www.cs.fsu.edu/~engelen</i>), and namespace URI

+(<i>urn:quotex</i>) were provided in the header file, the generated WSDL file does not need to be changed by hand and can be published

+immediately together with the compiled Web Service installed as a CGI application at the designated URL

+(<i>http://www.cs.fsu.edu/~engelen/quotex.cgi</i>

+and <i>http://www.cs.fsu.edu/~engelen/quotex.wsdl</i>).

+

+<div class="p"><!----></div>

+The namespace mapping table for the <i>quotex.cpp</i> Web Service implementation

+is saved as <i>quotex.nsmap</i>.  This file can be directly included in

+<i>quotex.cpp</i> instead of specified by hand in the source of

+<i>quotex.cpp</i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "quotex.nsmap"

+</td></tr></table><br></i>

+The automatic generation and inclusion of the namespace mapping table requires

+compiler directives for <b>all</b> namespace prefixes to associate each

+namespace prefix with a namespace URI. Otherwise, namespace URIs have to be

+manually added to the table (they appear as <i>http://tempuri.org</i>).

+

+<div class="p"><!----></div>

+		     <h3><a name="tth_sEc18.3">

+18.3</a>&nbsp;&nbsp;<font color="#0000FF">Transient Data Types</font></h3><a name="sec:transient">

+</a>

+

+<div class="p"><!----></div>

+There are situations when certain data types have to be ignored by gSOAP for

+the compilation of (de)marshalling routines.  For example, in certain cases

+only a few members of a class or struct need not be (de)serialized, or the base

+class of a derived class should not be (de)serialized. Certain built-in classes

+such as <i>ostream</i> cannot be (de)serialized.  Data parts that should be kept

+invisible to gSOAP are called "transient".  Transient data types and

+transient struct/class members are declared with the <i><b>extern</b></i> keyword or

+are declared within <i>[</i> and <i>]</i> blocks in the header file.  The

+<i><b>extern</b></i> keyword has a special meaning to the gSOAP compiler and won't

+affect the generated codes.  The special <i>[</i> and <i>]</i> block construct

+can be used with data type declarations and within <i><b>struct</b></i> and

+<i><b>class</b></i> declarations. The use of <i><b>extern</b></i> or <i>[ ]</i> achieve the

+same effect, but <i>[ ]</i> may be more convenient to encapsulate transient

+types in a larger part of the header file. The use of <i><b>extern</b></i> with

+<i><b>typedef</b></i> is reserved for the declaration of user-defined external

+(de)serializers for data types, see Section&nbsp;<a href="#sec:extern">18.5</a>.

+

+<div class="p"><!----></div>

+First example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>extern</b>&nbsp;<b>class</b>&nbsp;ostream; // ostream can't be (de)serialized, but need to be declared to make it visible to gSOAP <br />

+<b>class</b>&nbsp;ns__myClass <br />

+{ ... <br />

+&nbsp;&nbsp;&nbsp;<b>virtual</b>&nbsp;<b>void</b>&nbsp;print(ostream &amp;s) <b>const</b>; // need ostream here <br />

+&nbsp;&nbsp;&nbsp;... <br />

+};

+</td></tr></table><br></i>

+Second example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+[ <br />

+&nbsp;&nbsp;&nbsp;<b>class</b>&nbsp;myBase // base class need not be (de)serialized <br />

+&nbsp;&nbsp;&nbsp;{ ... }; <br />

+] <br />

+<b>class</b>&nbsp;ns__myDerived : myBase <br />

+{ ... }; <br />

+</td></tr></table><br></i>

+Third example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+[ <b>typedef</b>&nbsp;<b>int</b>&nbsp;transientInt; ] <br />

+<b>class</b>&nbsp;ns__myClass <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;a; // will be (de)serialized <br />

+&nbsp;&nbsp;&nbsp;[ <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;b; // transient field <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;s[256]; // transient field <br />

+&nbsp;&nbsp;&nbsp;]  <br />

+&nbsp;&nbsp;&nbsp;<b>extern</b>&nbsp;<b>float</b>&nbsp;d; // transient field <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*t; // will be (de)serialized <br />

+&nbsp;&nbsp;&nbsp;transientInt *n; // transient field <br />

+&nbsp;&nbsp;&nbsp;[ <br />

+&nbsp;&nbsp;&nbsp;<b>virtual</b>&nbsp;<b>void</b>&nbsp;method(<b>char</b>&nbsp;buf[1024]); // does not create a <b>char</b>[1024] (de)serializer <br />

+&nbsp;&nbsp;&nbsp;]  <br />

+};

+</td></tr></table><br></i>

+In this example, <i><b>class</b>&nbsp;ns__myClass</i> has three transient fields:

+<i>b</i>, <i>s</i>, and <i>n</i> which will not be (de)serialized in SOAP. Field

+<i>n</i> is transient because the type is declared within a transient block.

+Pointers, references, and arrays of transient types are transient.  The single

+class method is encapsulated within <i>[</i> and <i>]</i> to prevent gSOAP from

+creating (de)serializers for the <i><b>char</b>[1024]</i> type. gSOAP will generate

+(de)serializers for all types that are not declared within a <i>[</i> and

+<i>]</i> transient block.

+

+<div class="p"><!----></div>

+		     <h3><a name="tth_sEc18.4">

+18.4</a>&nbsp;&nbsp;<font color="#0000FF">Volatile Data Types</font></h3><a name="sec:volatile">

+</a>

+

+<div class="p"><!----></div>

+While transient data types are supposed to be hidden from gSOAP, volatile data

+types are visible to gSOAP but their declaration and implementation is assumed

+to be hidden. That is, volatile data types are assumed to be part of an

+existing non-modifiable software package, such as a built-in library. It would

+not make sense to redefine the data types in a gSOAP header file. When you need

+to (de)serialize such data types, you must declare them in a gSOAP header file

+and use the <i><b>volatile</b></i> qualifier.

+

+<div class="p"><!----></div>

+Consider for example <i><b>struct</b>&nbsp;tm</i>, declared in <i>time.h</i>. The structure may actually vary between platforms, but the tm structure includes at least the following fields:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>volatile</b>&nbsp;<b>struct</b>&nbsp;tm <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;tm_sec;         /* seconds (0 - 60) */ <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;tm_min;         /* minutes (0 - 59) */ <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;tm_hour;        /* hours (0 - 23) */ <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;tm_mday;        /* day of month (1 - 31) */ <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;tm_mon;         /* month of year (0 - 11) */ <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;tm_year;        /* year - 1900 */ <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;tm_wday;        /* day of week (Sunday = 0) */ <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;tm_yday;        /* day of year (0 - 365) */ <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;tm_isdst;       /* is summer time in effect? */ <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*tm_zone;        /* abbreviation of timezone name */ <br />

+&nbsp;&nbsp;&nbsp;<b>long</b>&nbsp;tm_gmtoff;      /* offset from UTC in seconds */ <br />

+};

+</td></tr></table><br></i>

+Note that we qualified the structure <i><b>volatile</b></i> in the gSOAP header file to inform the gSOAP compiler that it should not attempt to redeclare it.

+We can now readily serialize and deserialize the tm structure. The following program fragment serializes the local time stored in a tm structure to stdout:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+time_t T = time(NULL); <br />

+<b>struct</b>&nbsp;tm *t = localtime(&amp;T); <br />

+<b>struct</b>&nbsp;soap *soap = soap_new(); <br />

+soap_set_omode(soap, SOAP_XML_GRAPH); // good habit to use this <br />

+soap_begin_send(soap); <br />

+soap_put_tm(soap, t, "myLocalTime", NULL); <br />

+soap_end_send(soap); <br />

+soap_end(soap); <br />

+soap_done(soap); <br />

+free(soap);

+</td></tr></table><br></i>

+It is also possible to serialize the tm fields as XML attributes using the

+@qualifier, see Section&nbsp;<a href="#sec:attributes">10.5.7</a>.

+

+<div class="p"><!----></div>

+If you must produce a schema file, say <i>time.xsd</i>, that defines an XML

+schema and namespace for the tm struct, you can add a <i><b>typedef</b></i>

+declaration to the header file:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>struct</b>&nbsp;tm time__struct_tm;

+</td></tr></table><br></i>

+We used the <i><b>typedef</b></i> name <i>time__struct_tm</i> rather than <i>time__

+tm</i>, because a schema name clash will occur with the latter since taking off

+the <i>time</i> prefix will result in the same name being used.

+

+<div class="p"><!----></div>

+Classes should be declared volatile to prevent modification of these classes by gSOAP.

+gSOAP adds serialization methods to classes to support polymorphism.  However,

+this is a problem when you can't modify class declarations because they are

+part of a non-modifiable software package.  The solution is to declare these

+classes <i><b>volatile</b></i>, similar to the tm structure example illustrated above. 

+You can also use a <i><b>typedef</b></i> to associate a schema with a class.

+

+<div class="p"><!----></div>

+		     <h3><a name="tth_sEc18.5">

+18.5</a>&nbsp;&nbsp;<font color="#0000FF">How to Declare User-Defined Serializers and Deserializers</font></h3><a name="sec:extern">

+</a>

+

+<div class="p"><!----></div>

+Users can declare their own (de)serializers for specific data types instead of relying on the gSOAP-generated (de)serializers.

+To declare a external (de)serializer, declare a type with <i><b>extern</b>&nbsp;<b>typedef</b></i>. gSOAP will not generate the (de)serializers

+for the type name that is declared. For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>extern</b>&nbsp;<b>typedef</b>&nbsp;<b>char</b>&nbsp;*MyData; <br />

+<b>struct</b>&nbsp;Sample <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;MyData s; // use user-defined (de)serializer for this field <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*t; // use gSOAP (de)serializer for this field <br />

+};

+</td></tr></table><br></i>

+The user is required to supply the following routines for each <i><b>extern</b>&nbsp;<b>typedef</b></i>'ed name <u>T</u>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>void</b>&nbsp;soap_serialize_<u><span class="roman">T</span></u>(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<u><span class="roman">T</span></u> *a) <br />

+<b>void</b>&nbsp;soap_default_<u><span class="roman">T</span></u>(<b>struct</b>&nbsp;soap *soap, <u><span class="roman">T</span></u> *a) <br />

+<b>void</b>&nbsp;soap_out_<u><span class="roman">T</span></u>(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*tag, <b>int</b>&nbsp;id, <b>const</b>&nbsp;<u><span class="roman">T</span></u> *a, <b>const</b>&nbsp;<b>char</b>&nbsp;*type) <br />

+<u><span class="roman">T</span></u> *soap_in_<u><span class="roman">T</span></u>(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*tag, <u><span class="roman">T</span></u> *a, <b>const</b>&nbsp;<b>char</b>&nbsp;*type) 

+</td></tr></table><br></i>

+The function prototypes can be found in <i>soapH.h</i>.

+

+<div class="p"><!----></div>

+For example, the (de)serialization of <i>MyData</i> can be done with the following code:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>void</b>&nbsp;soap_serialize_MyData(<b>struct</b>&nbsp;soap *soap, MyData *<b>const</b>*a) <br />

+{ } // no need to mark this node (for multi-ref and cycle detection) <br />

+<b>void</b>&nbsp;soap_default_MyData(&amp;soap, MyData **a) <br />

+{ *a = NULL } <br />

+<b>void</b>&nbsp;soap_out_MyData(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*tag, <b>int</b>&nbsp;id, MyData *<b>const</b>*a, <b>const</b>&nbsp;<b>char</b>&nbsp;*type) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;soap_element_begin_out(soap, tag, id, type); // print XML beginning tag <br />

+&nbsp;&nbsp;&nbsp;soap_send(soap, *a); // just print the string (no XML conversion) <br />

+&nbsp;&nbsp;&nbsp;soap_element_end_out(soap, tag); // print XML ending tag <br />

+} <br />

+MyData **soap_in_MyData(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*tag, MyData **a, <b>const</b>&nbsp;<b>char</b>&nbsp;*type) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_element_begin_in(soap, tag)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;NULL; <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!a) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a = (MyData**)soap_malloc(soap, <b>sizeof</b>(MyData*)); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap<tt>-&gt;</tt>null) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*a = NULL; // xsi:nil element <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(*soap<tt>-&gt;</tt>type &amp;&amp; soap_match_tag(soap, soap<tt>-&gt;</tt>type, type)) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>error = SOAP_TYPE; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;NULL; // type mismatch <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(*soap<tt>-&gt;</tt>href) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a = (MyData**)soap_id_forward(soap, soap<tt>-&gt;</tt>href, a, SOAP_MyData, <b>sizeof</b>(MyData*)) <br />

+&nbsp;&nbsp;&nbsp;<b>else</b>&nbsp;<b>if</b>&nbsp;(soap<tt>-&gt;</tt>body) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*s = soap_value(soap); // fill buffer <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*a = (<b>char</b>*)soap_malloc(soap, strlen(s)+1); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;strcpy(*a, s); <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap<tt>-&gt;</tt>body &amp;&amp; soap_element_end_in(soap, tag)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;NULL; <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;a;

+</td></tr></table><br></i>

+More information on custom (de)serialization will be provided in this document or in a separate document in the future.

+The writing of the (de)serializer code requires the use of the low-level gSOAP API.

+

+<div class="p"><!----></div>

+		     <h3><a name="tth_sEc18.6">

+18.6</a>&nbsp;&nbsp;<font color="#0000FF">How to Serialize Data Without Generating XSD Type Attributes</font></h3>

+

+<div class="p"><!----></div>

+gSOAP serializes data in XML with <tt>xsi:type</tt> attributes when the types are

+declared with namespace prefixes to indicate the schema type of the data

+contained in the elements. SOAP 1.1 and 1.2 requires <tt>xsi:type</tt> attributes

+in the presence of polymorphic data or when the type of the data cannot be

+deduced from the SOAP payload.  The namespace prefixes are associated with the

+type names of <i><b>typedef</b></i>s (Section&nbsp;<a href="#sec:primitive">10.2</a>) for primitive data

+types, <i><b>struct</b></i>/<i>class</i> names, and <i><b>enum</b></i> names.

+

+<div class="p"><!----></div>

+To prevent the output of these <tt>xsi:type</tt> attributes in the XML

+serialization, you can simply use type declarations that do not include these

+namespace prefixes.  That is, don't use the <i><b>typedef</b></i>s for primitive types

+and use unqualified type names with <i><b>struct</b></i>s, <i><b>class</b></i>es, and

+<i>enum</i>s.

+

+<div class="p"><!----></div>

+However, there are two issues.  Firstly, if you want to use a primitive schema

+type that has no C/C++ counterpart, you must declare it as a <i><b>typedef</b></i>

+name with a leading underscore, as in:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>typedef</b>&nbsp;<b>char</b>&nbsp;*_xsd__date;

+</td></tr></table><br></i>

+This will produce the necessary <tt>xsd:date</tt> information in the WSDL output

+by the gSOAP compiler.  But the XML serialization of this type at run time

+won't include the <tt>xsi:type</tt> attribute.  Secondly, to include the proper

+schema definitions in the WSDL produced by the gSOAP compiler, you should

+use qualified <i><b>struct</b></i>, <i><b>class</b></i>, and <i><b>enum</b></i> names with a leading

+underscore, as in: 

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;_ns__myStruct <br />

+{ ... };

+</td></tr></table><br></i>

+This ensures that <i>myStruct</i> is associated with a schema, and therefore

+included in the appropriate schema in the generated WSDL.  The leading

+underscore prevents the XML serialization of <tt>xsi:type</tt> attributes for this

+type in the SOAP/XML payload.

+

+<div class="p"><!----></div>

+		     <h3><a name="tth_sEc18.7">

+18.7</a>&nbsp;&nbsp;<font color="#0000FF">Function Callbacks for Customized I/O and HTTP Handling</font></h3><a name="sec:callback">

+</a>

+

+<div class="p"><!----></div>

+gSOAP provides five callback functions for customized I/O and HTTP handling:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td width="602"><font color="#FF0000"><b>Callback (function pointer)</b></font> </td></tr>

+<tr><td width="602"><i><b>int</b>&nbsp;(*soap.fopen)(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*endpoint, <b>const</b>&nbsp;<b>char</b>&nbsp;*host, <b>int</b>&nbsp;port)</i> </td></tr>

+<tr><td width="602">Called from a client proxy to open a connection to a Web Service located at <i>endpoint</i>.

+Input parameters <i>host</i> and <i>port</i> are micro-parsed from <i>endpoint</i>.

+Should return a valid file descriptor, or <i>SOAP_INVALID_SOCKET</i> and <i>soap</i><tt>-&gt;</tt><i>error</i> set to an error code.

+Built-in gSOAP function: <i>tcp_connect</i>

+</td></tr>

+<tr><td width="602"><i><b>int</b>&nbsp;(*soap.fget)(<b>struct</b>&nbsp;soap *soap)</i> </td></tr>

+<tr><td width="602">Called by the main server loop upon an HTTP GET request. The <i>SOAP_GET_METHOD</i> error is returned by the default <i>fget</i> routine. This callback can be used to respond to HTTP GET methods with content, see Section&nbsp;<a href="#sec:get">18.10</a>.

+Should return <i>SOAP_OK</i>, or a gSOAP error code.

+Built-in gSOAP function: <i>http_get</i>

+</td></tr>

+<tr><td width="602"><i><b>int</b>&nbsp;(*soap.fform)(<b>struct</b>&nbsp;soap *soap)</i> </td></tr>

+<tr><td width="602">Called by the main server loop when a user-defined <i>fparsehdr</i> callback returned <i>SOAP_FORM</i> to signal that the HTTP body must be processed by this form handler callback. The HTTP POST form data MUST be read, otherwise keep-alive messages will end up out of sync.

+Should return <i>SOAP_OK</i> or a gSOAP error code.

+Built-in gSOAP function: none.

+</td></tr>

+<tr><td width="602"><i><b>int</b>&nbsp;(*soap.fpost)(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*endpoint, <b>const</b>&nbsp;<b>char</b>&nbsp;*host, <b>int</b>&nbsp;port, <b>const</b>&nbsp;<b>char</b>&nbsp;*path, <b>const</b>&nbsp;<b>char</b>&nbsp;*action, size_t count)</i> </td></tr>

+<tr><td width="602">Called from a client proxy to generate the HTTP header to connect to <i>endpoint</i>.

+Input parameters <i>host</i>, <i>port</i>, and <i>path</i> are micro-parsed from <i>endpoint</i>, <i>action</i> is the SOAP action,

+and <i>count</i> is the length of the SOAP message or 0 when <i>SOAP_ENC_XML</i> is set or when <i>SOAP_IO_LENGTH</i> is reset.

+Use function <i>soap_send(<b>struct</b>&nbsp;soap *soap, <b>char</b>&nbsp;*s)</i> to write the header contents.

+Should return SOAP_OK, or a gSOAP error code.

+Built-in gSOAP function: <i>http_post</i>.

+</td></tr>

+<tr><td width="602"><i><b>int</b>&nbsp;(*soap.fposthdr)(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*key, <b>const</b>&nbsp;<b>char</b>&nbsp;*val)</i> </td></tr>

+<tr><td width="602">Called by <i>http_post</i> and <i>http_response</i> (through the callbacks).

+Emits HTTP <i>key</i>: <i>val</i> header entries.

+Should return SOAP_OK, or a gSOAP error code.

+Built-in gSOAP function: <i>http_post_header</i>.

+</td></tr>

+<tr><td width="602"><i><b>int</b>&nbsp;(*soap.fresponse)(<b>struct</b>&nbsp;soap *soap, <b>int</b>&nbsp;soap_error_code, size_t count)</i> </td></tr>

+<tr><td width="602">Called from a service to generate the response HTTP header.

+Input parameter <i>soap_error_code</i> is a gSOAP error code (see Section&nbsp;<a href="#sec:errcodes">9.2</a> and

+<i>count</i> is the length of the SOAP message or 0 when <i>SOAP_ENC_XML</i> is set or when <i>SOAP_IO_LENGTH</i> is reset.

+Use function <i>soap_send(<b>struct</b>&nbsp;soap *soap, <b>char</b>&nbsp;*s)</i> to write the header contents.

+Should return SOAP_OK, or a gSOAP error code

+Built-in gSOAP function: <i>http_response</i>

+</td></tr>

+<tr><td width="602"><i><b>int</b>&nbsp;(*soap.fparse)(<b>struct</b>&nbsp;soap *soap)</i> </td></tr>

+<tr><td width="602">Called by client proxy and service to parse an HTTP header (if present).

+When user-defined, this routine must at least skip the header.

+Use function <i><b>int</b>&nbsp;soap_getline(<b>struct</b>&nbsp;soap *soap, <b>char</b>&nbsp;*buf, <b>int</b>&nbsp;len)</i> to read HTTP header lines into

+a buffer <i>buf</i> of length <i>len</i> (returns empty line at end of HTTP header).

+Should return <i>SOAP_OK</i>, or a gSOAP error code.

+Built-in gSOAP function: <i>http_parse</i>

+</td></tr>

+<tr><td width="602"><i><b>int</b>&nbsp;(*soap.fparsehdr)(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*key, <b>const</b>&nbsp;<b>char</b>&nbsp;*val)</i> </td></tr>

+<tr><td width="602">Called by <i>http_parse</i> (through the <i>fparse</i> callback).

+Handles HTTP <i>key</i>: <i>val</i> header entries to set gSOAP's internals.

+Should return <i>SOAP_OK</i>, <i>SOAP_STOP</i> (see <i>fstop</i>) or a gSOAP error code.

+Built-in gSOAP function: <i>http_parse_header</i>

+</td></tr>

+<tr><td width="602"><i><b>int</b>&nbsp;(*soap.fclose)(<b>struct</b>&nbsp;soap *soap)</i> </td></tr>

+<tr><td width="602">Called by client proxy <b>multiple times</b>, to close a socket connection before a new socket

+connection is established and at the end of communications when the <i>SOAP_IO_KEEPALIVE</i> flag is not set

+and <i>soap.keep_alive</i> <font face="symbol">¹</font

+> 0 (indicating that the other party supports keep alive).

+Should return SOAP_OK, or a gSOAP error code.

+Built-in gSOAP function: <i>tcp_disconnect</i>

+</td></tr>

+<tr><td width="602"><i><b>int</b>&nbsp;(*soap.fsend)(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*s, size_t n)</i> </td></tr>

+<tr><td width="602">Called for all send operations to emit contents of <i>s</i> of length <i>n</i>.

+Should return SOAP_OK, or a gSOAP error code.

+Built-in gSOAP function: <i>fsend</i>

+</td></tr>

+<tr><td width="602"><i>size_t (*soap.frecv)(<b>struct</b>&nbsp;soap *soap, <b>char</b>&nbsp;*s, size_t n)</i> </td></tr>

+<tr><td width="602">Called for all receive operations to fill buffer <i>s</i> of maximum length <i>n</i>.

+Should return the number of bytes read or 0 in case of an error, e.g.&nbsp;EOF.

+Built-in gSOAP function: <i>frecv</i>

+</td></tr>

+<tr><td width="602"><i><b>int</b>&nbsp;(*soap.fignore)(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*tag)</i> </td></tr>

+<tr><td width="602">Called when an unknown XML element was encountered on the input. The <i>tag</i> parameter is the offending XML element tag name.

+Should return <i>SOAP_OK</i>, or a gSOAP error code such as <i>SOAP_TAG_MISMATCH</i> to throw an exception.

+Built-in gSOAP function: none.

+</td></tr>

+<tr><td width="602"><i><b>int</b>&nbsp;(*soap.fconnect)(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*endpoint, <b>const</b>&nbsp;<b>char</b>&nbsp;*host, <b>int</b>&nbsp;port)</i> </td></tr>

+<tr><td width="602">When non-NULL, this callback is called for all client-to-server connect operations instead of the built-in socket connect code. Therefore, it can be used to override the built-in connection establishment. Parameter <i>endpoint</i> contains the server endpoint URL, <i>host</i> the domain name or IP, and <i>port</i> the port number.

+Should return SOAP_OK, or a gSOAP error code.

+Built-in gSOAP function: none

+</td></tr>

+<tr><td width="602"><i><b>int</b>&nbsp;(*soap.faccept)(<b>struct</b>&nbsp;soap *soap, <b>struct</b>&nbsp;sockaddr *a, <b>int</b>&nbsp;*n)</i> </td></tr>

+<tr><td width="602">Called by <i>soap_accept</i>. This is a wrapper routine for <i>accept</i>.

+Should return a valid socket descriptor or <i>SOAP_INVALID_SOCKET</i> and set <i>soap</i><tt>-&gt;</tt><i>error</i> to an error code.

+Built-in gSOAP function: <i>tcp_accept</i>

+</td></tr>

+<tr><td width="602"><i><b>int</b>&nbsp;(*soap.fresolve)(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*addr, <b>struct</b>&nbsp;in_addr *inaddr)</i> </td></tr>

+<tr><td width="602">Called by <i>soap_bind</i> if a host name is given and <i>soap_connect</i> to resolve a domain name <i>addr</i>.

+Should set <i>in_addr *a</i> and return <i>SOAP_OK</i> or return <i>SOAP_ERR</i> upon failure.

+</td></tr>

+<tr><td width="602">Built-in gSOAP function: <i>tcp_gethost</i> </td></tr>

+<tr><td width="602"><i><b>int</b>&nbsp;(*soap.fpoll)(<b>struct</b>&nbsp;soap *soap)</i> </td></tr>

+<tr><td width="602">Used by clients to check if the server is still responsive.

+</td></tr>

+<tr><td width="602">Built-in gSOAP function: <i>soap_poll</i> </td></tr>

+<tr><td width="602"><i><b>int</b>&nbsp;(*soap.fserveloop)(<b>struct</b>&nbsp;soap *soap)</i> </td></tr>

+<tr><td width="602">Called after successful invocation of a server operation in the server loop, immediately after sending the response to a client.

+Can be used to clean up resources (e.g.&nbsp;using <i>soap_end()</i>) while serving a long sequence of keep-alive connections.

+Should return <i>SOAP_OK</i>, or set <i>soap</i><tt>-&gt;</tt><i>error</i> to a gSOAP error code and return <i>soap</i><tt>-&gt;</tt><i>error</i>.

+Built-in gSOAP function: none.

+</td></tr>

+<tr><td width="602"><i><b>void</b>&nbsp;(*soap.fseterror)(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;**code, <b>const</b>&nbsp;<b>char</b>&nbsp;**string)</i> </td></tr>

+<tr><td width="602">Called to set the SOAP Fault <i>code</i> and <i>string</i> values based on the value of <i>soap</i><tt>-&gt;</tt><i>error</i>. Allows user-defined messages to be associated with gSOAP error codes to override gSOAP's built-in error messages.

+

+<div class="p"><!----></div>

+Built-in gSOAP function: none.

+</td></tr></table>

+

+</td></tr></table><br></span>

+In addition, a <i><b>void</b>*user</i> field in the <i><b>struct</b>&nbsp;soap</i> data structure is available to pass user-defined data to the callbacks.

+

+<div class="p"><!----></div>

+The following example uses I/O function callbacks for customized serialization of data into a buffer and deserialization back into a

+datastructure:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>char</b>&nbsp;buf[10000]; // XML buffer <br />

+<b>int</b>&nbsp;len1 = 0;	// #chars written <br />

+<b>int</b>&nbsp;len2 = 0;	// #chars read <br />

+// mysend: put XML in buf[] <br />

+<b>int</b>&nbsp;mysend(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*s, size_t n) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(len1 + n  &gt;  <b>sizeof</b>(buf)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_EOF; <br />

+&nbsp;&nbsp;&nbsp;strcpy(buf + len1, s); <br />

+&nbsp;&nbsp;&nbsp;len1 += n; <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+} <br />

+// myrecv: get XML from buf[] <br />

+size_t myrecv(<b>struct</b>&nbsp;soap *soap, <b>char</b>&nbsp;*s, size_t n) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(len2 + n  &gt;  len1) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;n = len1 - len2; <br />

+&nbsp;&nbsp;&nbsp;strncpy(s, buf + len2, n); <br />

+&nbsp;&nbsp;&nbsp;len2 += n; <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;n; <br />

+} <br />

+main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;ns__person p; <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;len1 = len2 = 0;	// reset buffer pointers <br />

+&nbsp;&nbsp;&nbsp;p.name = "John Doe"; <br />

+&nbsp;&nbsp;&nbsp;p.age = 25; <br />

+&nbsp;&nbsp;&nbsp;soap.fsend = mysend; // assign callback <br />

+&nbsp;&nbsp;&nbsp;soap.frecv = myrecv; // assign callback <br />

+&nbsp;&nbsp;&nbsp;soap_begin(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;soap_set_omode(&amp;soap, SOAP_XML_GRAPH); <br />

+&nbsp;&nbsp;&nbsp;soap_serialize_ns__person(&amp;soap, &amp;p); <br />

+&nbsp;&nbsp;&nbsp;soap_put_ns__person(&amp;soap, &amp;p, "ns:person", NULL); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap.error) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stdout); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(1); <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;soap_end(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;soap_begin(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;soap_get_ns__person(&amp;soap, &amp;p, "ns:person", NULL); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap.error) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stdout); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(1); <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;soap_end(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); // disable callbacks <br />

+}

+</td></tr></table><br></i>

+The <i>soap_done</i> function can be called to reset the callback to the default internal gSOAP I/O and HTTP handlers.

+

+<div class="p"><!----></div>

+The following example illustrates customized I/O and (HTTP) header handling. The SOAP request is saved to a file. The client proxy

+then reads the file contents as the service response. To perform this trick, the service response has exactly the same structure as the

+request. This is declared by the <i><b>struct</b>&nbsp;ns__test</i> output parameter part of the remote method declaration.

+This struct resembles the service request (see the generated <i>soapStub.h</i> file created from the header file).

+

+<div class="p"><!----></div>

+The header file is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap ns service name: callback <br />

+//gsoap ns service namespace: urn:callback <br />

+<b>struct</b>&nbsp;ns__person <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*name; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;age; <br />

+}; <br />

+<b>int</b>&nbsp;ns__test(<b>struct</b>&nbsp;ns__person in, <b>struct</b>&nbsp;ns__test &amp;out);

+</td></tr></table><br></i>

+The client program is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "soapH.h" <br />

+... <br />

+<b>int</b>&nbsp;myopen(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*endpoint, <b>const</b>&nbsp;<b>char</b>&nbsp;*host, <b>int</b>&nbsp;port) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(strncmp(endpoint, "file:", 5)) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf("File name expected<tt>\</tt>n"); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_EOF; <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;((soap<tt>-&gt;</tt>sendfd = soap<tt>-&gt;</tt>recvfd = open(host, O_RDWR | O_CREAT, S_IWUSR | S_IRUSR))  &lt;  0) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_EOF; <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+} <br />

+<b>void</b>&nbsp;myclose(<b>struct</b>&nbsp;soap *soap) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;if (soap<tt>-&gt;</tt>sendfd  &gt;  2) // still open? <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;close(soap<tt>-&gt;</tt>sendfd); // then close it <br />

+&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>recvfd = 0; // set back to stdin <br />

+&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>sendfd = 1; // set back to stdout <br />

+} <br />

+<b>int</b>&nbsp;mypost(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*endpoint, <b>const</b>&nbsp;<b>char</b>&nbsp;*host, <b>const</b>&nbsp;<b>char</b>&nbsp;*path, <b>const</b>&nbsp;<b>char</b>&nbsp;*action, size_t count) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;soap_send(soap, "Custom-generated file<tt>\</tt>n"); // writes to soap<tt>-&gt;</tt>sendfd <br />

+} <br />

+<b>int</b>&nbsp;myparse(<b>struct</b>&nbsp;soap *soap) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;buf[256]; <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(lseek(soap<tt>-&gt;</tt>recvfd, 0, SEEK_SET)  &lt;  0 <tt>||</tt> soap_getline(soap, buf, 256)) // go to begin and skip custom header <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_EOF; <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+} <br />

+main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;ns__test r; <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;ns__person p; <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); // reset <br />

+&nbsp;&nbsp;&nbsp;p.name = "John Doe"; <br />

+&nbsp;&nbsp;&nbsp;p.age = 99; <br />

+&nbsp;&nbsp;&nbsp;soap.fopen = myopen; // use custom open <br />

+&nbsp;&nbsp;&nbsp;soap.fpost = mypost; // use custom post <br />

+&nbsp;&nbsp;&nbsp;soap.fparse = myparse; // use custom response parser <br />

+&nbsp;&nbsp;&nbsp;soap.fclose = myclose; // use custom close <br />

+&nbsp;&nbsp;&nbsp;soap_call_ns__test(&amp;soap, "file://test.xml", "", p, r); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap.error) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stdout); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(1); <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;soap_end(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); // reset to default callbacks <br />

+}

+</td></tr></table><br></i>

+SOAP 1.1 and 1.2 specify that XML elements may be ignored when present in a SOAP payload on the receiving side.

+gSOAP ignores XML elements that are unknown, unless the XML attribute <tt>mustUnderstand="true"</tt> is present in the XML element.

+It may be undesirable for elements to be ignored when the outcome of the omission is uncertain.

+The <i>soap.fignore</i> callback can be set to a function that returns <i>SOAP_OK</i> in case the element can be safely ignored, or

+<i>SOAP_MUSTUNDERSTAND</i> to throw an exception, or to perform some application-specific action.

+For example, to throw an exception as soon as an unknown element is encountered on the input, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;myignore(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*tag) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_MUSTUNDERSTAND; // never skip elements (secure) <br />

+} <br />

+... <br />

+soap.fignore = myignore; <br />

+soap_call_ns__method(&amp;soap, ...); // or soap_serve(&amp;soap);

+</td></tr></table><br></i>

+To selectively throw an exception as soon as an unknown element is encountered but element <tt>ns:xyz</tt> can be safely ignored, use:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;myignore(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*tag) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_match_tag(soap, tag, "ns:xyz") != SOAP_OK) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_MUSTUNDERSTAND; <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+} <br />

+... <br />

+soap.fignore = myignore; <br />

+soap_call_ns__method(&amp;soap, ...); // or soap_serve(&amp;soap) <br />

+... <br />

+<b>struct</b>&nbsp;Namespace namespaces[] = <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;{"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"}, <br />

+&nbsp;&nbsp;&nbsp;{"SOAP-ENC","http://schemas.xmlsoap.org/soap/encoding/"}, <br />

+&nbsp;&nbsp;&nbsp;{"xsi", "http://www.w3.org/2001/XMLSchema-instance"}, <br />

+&nbsp;&nbsp;&nbsp;{"xsd", "http://www.w3.org/2001/XMLSchema"}, <br />

+&nbsp;&nbsp;&nbsp;{"ns", "some-URI"}, // the namespace of element ns:xyz <br />

+&nbsp;&nbsp;&nbsp;{NULL, NULL} <br />

+</td></tr></table><br></i>

+Function <i>soap_match_tag</i> compares two tags. The third parameter may be a pattern where <i>*</i> is a wildcard

+and <i>-</i> is a single character wildcard. So for example

+<i>soap_match_tag(tag, "ns:*")</i> will match any element in namespace <i>ns</i> or when no namespace prefix is present in the XML

+message.

+

+<div class="p"><!----></div>

+The callback can also be used to keep track of unknown elements in an internal data structure such as a list:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;Unknown <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*tag; <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;Unknown *next; <br />

+}; <br />

+<b>int</b>&nbsp;myignore(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*tag) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*s = (<b>char</b>*)soap_malloc(soap, strlen(tag)+1); <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;Unknown *u = (<b>struct</b>&nbsp;Unknown*)soap_malloc(soap, <b>sizeof</b>(<b>struct</b>&nbsp;Unknown)); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(s &amp;&amp; u) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;strcpy(s, tag); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;u<tt>-&gt;</tt>tag = s; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;u<tt>-&gt;</tt>next = ulist; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ulist = u; <br />

+&nbsp;&nbsp;&nbsp;} <br />

+} <br />

+... <br />

+<b>struct</b>&nbsp;soap *soap; <br />

+<b>struct</b>&nbsp;Unknown *ulist = NULL; <br />

+soap_init(&amp;soap); <br />

+soap.fignore = myignore; <br />

+soap_call_ns__method(&amp;soap, ...); // or soap_serve(&amp;soap) <br />

+// print the list of unknown elements <br />

+soap_end(&amp;soap); // clean up

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.8">

+18.8</a>&nbsp;&nbsp;<font color="#0000FF">HTTP 1.0 and 1.1</font></h3>

+

+<div class="p"><!----></div>

+gSOAP uses HTTP 1.1 by default. You can revert to HTTP 1.0 as follows:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap soap; <br />

+soap_init(&amp;soap); <br />

+... <br />

+soap.http_version = "1.0";

+</td></tr></table><br></i>

+This sets the HTTP version and reconfigures the engine to revert to HTTP 1.0.

+Note that you cannot use HTTP chunking with HTTP 1.0.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.9">

+18.9</a>&nbsp;&nbsp;<font color="#0000FF">HTTP 307 Temporary Redirect Support</font></h3>

+

+<div class="p"><!----></div>

+The client-side handling of HTTP 307 code "Temporary Redirect" and any of the redirect codes 301, 302, and 303 are not automated in gSOAP. Client application developers may want to consider adding a few lines of code to support redirects. It was decided not to automatically support redirects for the following reasons:

+

+<ul>

+<li> Redirecting a secure HTTPS address to a non-secure HTTP address via 307 creates a security vulnerability.

+<div class="p"><!----></div>

+</li>

+

+<li> Cyclic redirects must be detected (e.g. allowing only a limited number of redirect levels).

+<div class="p"><!----></div>

+</li>

+

+<li> Redirecting HTTP POST will result in re-serialization and re-post of the entire SOAP request. The SOAP request message must be re-posted in its entirity when re-issuing the SOAP operation to a new address.

+<div class="p"><!----></div>

+</li>

+</ul>

+To implement client-side 307 redirect, add the following lines of code:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>char</b>&nbsp;*endpoint = NULL; // use default endpoint given in WSDL (or add another one here) <br />

+<b>int</b>&nbsp;n = 10; // max redirect count <br />

+<b>while</b>&nbsp;(n-) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_call_ns1__myMethod(soap, endpoint, ...)) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;((soap<tt>-&gt;</tt>error <tt>&gt;=</tt> 301 <tt>&amp;&amp;</tt> soap<tt>-&gt;</tt>error <tt>&lt;=</tt> 303) <tt>||</tt> soap<tt>-&gt;</tt>error == 307) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;endpoint = soap<tt>-&gt;</tt>endpoint; // endpoint from HTTP 301, 302, 303, 307 Location header <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>else</b><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ ... report and handle error <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>break</b>; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>else</b><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>break</b>; <br />

+}

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.10">

+18.10</a>&nbsp;&nbsp;<font color="#0000FF">HTTP GET Support</font></h3><a name="sec:get">

+</a>

+

+<div class="p"><!----></div>

+A gSOAP server normally only grants HTTP (and HTTPS) POST requests. To support HTTP (HTTPS) GET, you need to set the <i>soap.fget</i> callback. The callback is required to produce a response to the request in textual form, such as a Web page or a SOAP/XML response.

+

+<div class="p"><!----></div>

+The following example produces a Web page upon a HTTP GET request (e.g. from a browser):

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap *soap = soap_new(); <br />

+soap<tt>-&gt;</tt>fget = http_get(); <br />

+... <br />

+soap_serve(soap); <br />

+... <br />

+<b>int</b>&nbsp;http_get(<b>struct</b>&nbsp;soap *soap) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;soap_response(soap, SOAP_HTML); // HTTP response header with text/html <br />

+&nbsp;&nbsp;&nbsp;soap_send(soap, "&lt;HTML&#62;My Web server is operational.&lt;/HTML&#62;"); <br />

+&nbsp;&nbsp;&nbsp;soap_end_send(soap); <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+}

+</td></tr></table><br></i>

+The example below produces a WSDL file upon a HTTP GET with path <i>?wsdl</i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;http_get(<b>struct</b>&nbsp;soap *soap) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*s = strchr(soap<tt>-&gt;</tt>path, '?'); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!s <tt>||</tt> strcmp(s, "?wsdl")) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_GET_METHOD; <br />

+&nbsp;&nbsp;&nbsp;fd = fopen("myservice.wsdl", "rb"); // open WSDL file to copy <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!fd) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;404; // return HTTP not found error <br />

+&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>http_content = "text/xml"; // HTTP header with text/xml content <br />

+&nbsp;&nbsp;&nbsp;soap_response(soap, SOAP_FILE); <br />

+&nbsp;&nbsp;&nbsp;<b>for</b>&nbsp;(;;) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;r = fread(soap<tt>-&gt;</tt>tmpbuf, 1, sizeof(soap<tt>-&gt;</tt>tmpbuf), fd); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!r) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>break</b>; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_send_raw(soap, soap<tt>-&gt;</tt>tmpbuf, r)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>break</b>; // can't send, but little we can do about that <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;fclose(fd); <br />

+&nbsp;&nbsp;&nbsp;soap_end_send(soap); <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+}

+</td></tr></table><br></i>

+Using one-way SOAP/XML message, you can also return a SOAP/XML response:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;http_get(<b>struct</b>&nbsp;soap *soap) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;((soap<tt>-&gt;</tt>omode &amp; SOAP_IO) != SOAP_IO_CHUNK) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_set_omode(soap, SOAP_IO_STORE); // if not chunking we MUST buffer entire content to determine content length <br />

+&nbsp;&nbsp;&nbsp;soap_response(soap, SOAP_OK); <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;soap_send_ns1__mySendMethodResponse(soap, "", NULL, ... params ...); <br />

+} <br />

+</td></tr></table><br></i>

+where <i>ns1__mySendMethodResponse</i> is a one-way message declared in a gSOAP header file as:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;ns1__mySendMethodResponse(... params ..., <b>void</b>);

+</td></tr></table><br></i>

+The generated <i>soapClient.cpp</i> includes the sending-side stub function.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.11">

+18.11</a>&nbsp;&nbsp;<font color="#0000FF">HTTP Keep-Alive</font></h3><a name="sec:keepalive">

+</a>

+

+<div class="p"><!----></div>

+gSOAP supports keep-alive socket connections. To activate keep-alive support,

+set the <i>SOAP_IO_KEEPALIVE</i> flag for both input and output modes, see Section&nbsp;<a href="#sec:flags">8.12</a>.

+For example

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap soap; <br />

+soap_init2(&amp;soap, SOAP_IO_KEEPALIVE, SOAP_IO_KEEPALIVE); <br />

+</td></tr></table><br></i>

+When a client or a service communicates with another client or service that supports keep alive, the

+attribute <i>soap.keep_alive</i> will be set to 1, otherwise it is reset to 0 (indicating that the other party 

+will close the connection).

+The connection maybe terminated on either end before the communication completed, for example when the server keep-alive

+connection has timed out.

+This generates a "Broken Pipe" signal on Unix/Linux platforms. This signal can be caught with a signal handler:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+signal(SIGPIPE, sigpipe_handle);

+</td></tr></table><br></i>

+where, for example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>void</b>&nbsp;sigpipe_handle(<b>int</b>&nbsp;x) { }

+</td></tr></table><br></i>

+Alternatively, broken pipes can be kept silent by setting:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+soap.socket_flags = MSG_NOSIGNAL;

+</td></tr></table><br></i>

+This setting will not generate a sigpipe but read/write operations return <i>SOAP_EOF</i> instead.

+Note that Win32 systems do not support signals and lack the <i>MSG_NOSIGNAL</i> flag.

+The sigpipe handling and flags are not very portable.

+

+<div class="p"><!----></div>

+A connection will be kept open only if the request contains an HTTP 1.0 header

+with "<tt>Connection: Keep-Alive</tt>" or an HTTP 1.1 header that does not contain

+"<tt>Connection: close</tt>". This means that a gSOAP client method call should

+use "<tt>http://</tt>" in the endpoint URL of the request to the stand-alone

+service to ensure HTTP headers are used.

+

+<div class="p"><!----></div>

+If the client does not close the connection, the server will wait forever when

+no <i>recv_timeout</i> is specified.  In addition, other clients will be denied

+service as long as a client keeps the connection to the server open.  To

+prevent this from happening, the service should be multi-threaded such that

+each thread handles the client connection:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;main(<b>int</b>&nbsp;argc, <b>char</b>&nbsp;**argv) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap, *tsoap; <br />

+&nbsp;&nbsp;&nbsp;pthread_t tid; <br />

+&nbsp;&nbsp;&nbsp;int m, s; <br />

+&nbsp;&nbsp;&nbsp;soap_init2(&amp;soap, SOAP_IO_KEEPALIVE, SOAP_IO_KEEPALIVE); <br />

+&nbsp;&nbsp;&nbsp;soap.max_keep_alive = 100; // optional: at most 100 calls per keep-alive session <br />

+&nbsp;&nbsp;&nbsp;soap.accept_timeout = 600; // optional: let server time out after ten minutes of inactivity <br />

+&nbsp;&nbsp;&nbsp;m = soap_bind(&amp;soap, NULL, 18000, BACKLOG); // use port 18000 on the current machine <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(m  &lt;  0) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(1); <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;fprintf(stderr, <tt>"Socket&nbsp;connection&nbsp;successful&nbsp;%d\n"</tt>, m); <br />

+&nbsp;&nbsp;&nbsp;<b>for</b>&nbsp;(count = 0; count  &gt; = 0; count++) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap.socket_flags = MSG_NOSIGNAL; // use this <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap.accept_flags = SO_NOSIGPIPE; // or this to prevent sigpipe <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s = soap_accept(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(s  &lt;  0) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap.errnum) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>else</b><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, <tt>"Server&nbsp;timed&nbsp;out\n"</tt>); // Assume timeout is long enough for threads to complete serving requests <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>break</b>; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, <tt>"Accepts&nbsp;socket&nbsp;%d&nbsp;connection&nbsp;from&nbsp;IP&nbsp;%d.%d.%d.%d\n"</tt>, s, (<b>int</b>)(soap.ip &gt;&gt; 24)&amp;0xFF, (<b>int</b>)(soap.ip &gt;&gt; 16)&amp;0xFF, (<b>int</b>)(soap.ip &gt;&gt; 8)&amp;0xFF, (<b>int</b>)soap.ip&amp;0xFF); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tsoap = soap_copy(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pthread_create(&amp;tid, NULL, (void*(*)(void*))process_request, (void*)tsoap); <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;0; <br />

+} <br />

+<b>void</b>&nbsp;*process_request(<b>void</b>&nbsp;*soap) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;pthread_detach(pthread_self()); <br />

+&nbsp;&nbsp;&nbsp;((<b>struct</b>&nbsp;soap*)soap)<tt>-&gt;</tt>recv_timeout = 300; // Timeout after 5 minutes stall on recv <br />

+&nbsp;&nbsp;&nbsp;((<b>struct</b>&nbsp;soap*)soap)<tt>-&gt;</tt>send_timeout = 60; // Timeout after 1 minute stall on send <br />

+&nbsp;&nbsp;&nbsp;soap_serve((<b>struct</b>&nbsp;soap*)soap); <br />

+&nbsp;&nbsp;&nbsp;soap_destroy((<b>struct</b>&nbsp;soap*)soap); <br />

+&nbsp;&nbsp;&nbsp;soap_end((<b>struct</b>&nbsp;soap*)soap); <br />

+&nbsp;&nbsp;&nbsp;soap_done((<b>struct</b>&nbsp;soap*)soap); <br />

+&nbsp;&nbsp;&nbsp;free(soap); <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;NULL; <br />

+}

+</td></tr></table><br></i>

+To prevent a malicious client from keeping a thread waiting forever by keeping

+the connection open, timeouts are set in the <i>process_request</i> routine.

+See Section&nbsp;<a href="#sec:timeout">18.17</a> for more details on timeout settings.

+

+<div class="p"><!----></div>

+A gSOAP client call will automatically attempt to re-establish a connection to

+a server when the server has terminated the connection for any reason.  This

+way, a sequence of calls can be made to the server while keeping the connection

+open.  Client stubs will poll the server to check if the connection is still

+open.  When the connection was terminated by the server, the client will

+automatically reconnect.  

+

+<div class="p"><!----></div>

+A client should reset <i>SOAP_IO_KEEPALIVE</i> just before the last call to a

+server to close the connection after this last call. This will close the socket

+after the call and also informs the server to gracefully close the connection.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.12">

+18.12</a>&nbsp;&nbsp;<font color="#0000FF">HTTP Chunked Transfer Encoding</font></h3><a name="sec:chunked">

+</a>

+

+<div class="p"><!----></div>

+gSOAP supports HTTP chunked transfer encoding. Un-chunking of inbound messages

+takes place automatically. Outbound messages are never chunked, except when the

+<i>SOAP_IO_CHUNK</i> flag is set for the output mode.  Most Web services,

+however, will not accept chunked inbound messages.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.13">

+18.13</a>&nbsp;&nbsp;<font color="#0000FF">HTTP Buffered Sends</font></h3>

+

+<div class="p"><!----></div>

+The entire outbound message can be stored to determine the HTTP content length

+rather than the two-phase encoding used by gSOAP which requires a separate pass

+over the data to determine the length of the outbound message.  Setting the

+flag <i>SOAP_IO_STORE</i> for the output mode will buffer the entire message.

+This can speed up the transmission of messages, depending on the content, but

+may require significant storage space to hold the verbose XML message.

+

+<div class="p"><!----></div>

+Zlib compressed transfers require buffering. The <i>SOAP_IO_STORE</i> flag is

+set when the <i>SOAP_ENC_ZLIB</i> flag is set to send compressed messages. The use of chunking

+significantly reduces memory usage and may speed up the transmission of compressed SOAP/XML messages.

+This is accomplished by setting the <i>SOAP_IO_CHUNK</i> flag with

+<i>SOAP_ENC_ZLIB</i> for the output mode.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.14">

+18.14</a>&nbsp;&nbsp;<font color="#0000FF">HTTP Authentication</font></h3>

+

+<div class="p"><!----></div>

+HTTP authentication (basic) is enabled at the client-side by setting the

+<i>soap.userid</i> and <i>soap.passwd</i> strings to a username and password,

+respectively.  A server may request user authentication

+and denies access (HTTP 401 error) when the client tries to connect without HTTP authentication (or with the wrong authentication information).

+

+<div class="p"><!----></div>

+Here is an example client code fragment to set the HTTP authentication username and password:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap soap; <br />

+soap_init(&amp;soap); <br />

+soap.userid = "guest"; <br />

+soap.passwd = "visit"; <br />

+...

+</td></tr></table><br></i>

+A client SOAP request will have the following HTTP header:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+POST /XXX HTTP/1.0 <br />

+Host: YYY <br />

+User-Agent: gSOAP/2.2 <br />

+Content-Type: text/xml; charset=utf-8 <br />

+Content-Length: nnn <br />

+Authorization: Basic Z3Vlc3Q6Z3Vlc3Q= <br />

+...

+</td></tr></table><br></tt>

+A client MUST set the <i>soap.userid</i> and <i>soap.passwd</i> strings for each call that requires client authentication. The strings are reset after each successful or unsuccessful call.

+

+<div class="p"><!----></div>

+When present, the value of the <i>WWW-Authenticate</i> HTTP header with the authentication realm can be obtained from the <i>soap.authrealm</i> string. This is useful for clients to respond intelligently to authentication requests.

+

+<div class="p"><!----></div>

+A stand-alone gSOAP Web Service can enforce HTTP authentication upon clients, by checking the <i>soap.userid</i> and <i>soap.passwd</i> strings. These strings are set when a client request contains HTTP authentication headers. The strings SHOULD be checked in each service method (that requires authentication to execute).

+

+<div class="p"><!----></div>

+Here is an example service method implementation that enforced client authentication:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;ns__method(<b>struct</b>&nbsp;soap *soap, ...) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!soap<tt>-&gt;</tt>.userid <tt>||</tt> !soap<tt>-&gt;</tt>.passwd <tt>||</tt>

+strcmp(soap<tt>-&gt;</tt>.userid, "guest") <tt>||</tt>

+strcmp(soap<tt>-&gt;</tt>.passwd, "visit"))

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;401;

+... <br />

+}

+</td></tr></table><br></i>

+When the authentication fails, the service response with a SOAP Fault message and a HTTP error code "401 Unauthorized".

+The HTTP error codes are described in Section&nbsp;<a href="#sec:errcodes">9.2</a>.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.15">

+18.15</a>&nbsp;&nbsp;<font color="#0000FF">HTTP Proxy Authentication</font></h3>

+

+<div class="p"><!----></div>

+HTTP proxy authentication (basic) is enabled at the client-side by setting the

+<i>soap.proxy_userid</i> and <i>soap.proxy_passwd</i> strings to a username and

+password, respectively.  For example, a proxy server may request user

+authentication. Otherwise, access is denied by the proxy (HTTP 407 error).

+Example client code fragment to set proxy server, username, and password:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap soap; <br />

+soap_init(&amp;soap); <br />

+soap.proxy_host = "xx.xx.xx.xx"; // IP <br />

+soap.proxy_port = 8080; <br />

+soap.proxy_userid = "guest"; <br />

+soap.proxy_passwd = "guest"; <br />

+...

+</td></tr></table><br></i>

+A client SOAP request will have the following HTTP header:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0B0D0"><tr><td><tt>

+POST /XXX HTTP/1.0 <br />

+Host: YYY <br />

+User-Agent: gSOAP/2.2 <br />

+Content-Type: text/xml; charset=utf-8 <br />

+Content-Length: nnn <br />

+Proxy-Authorization: Basic Z3Vlc3Q6Z3Vlc3Q= <br />

+...

+</td></tr></table><br></tt>

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.16">

+18.16</a>&nbsp;&nbsp;<font color="#0000FF">Speed Improvement Tips</font></h3>

+

+<div class="p"><!----></div>

+Here are some tips you can use to speed up gSOAP. gSOAP's default settings are choosen to maximize portability and compatibility. The settings can be tweaked to optimize the performance as follows:

+

+<ul>

+<li> Increase the buffer size <i>SOAP_BUFLEN</i> by changing the <i>SOAP_BUFLEN</i> macro in <i>stdsoap2.h</i>. Use buffer size 2<sup>1</sup>8=262144 for example.

+<div class="p"><!----></div>

+</li>

+

+<li> Use HTTP keep-alive at the client-side, see&nbsp;<a href="#sec:keepalive">18.11</a>, when the client needs to make a series of calls to the same server. Server-side keep-alive support can greatly improve performance of both client and server. But be aware that clients and services under Unix/Linux require signal handlers to catch dropped connections.

+<div class="p"><!----></div>

+</li>

+

+<li> Use HTTP chunked transfers, see&nbsp;<a href="#sec:chunked">18.12</a>.

+<div class="p"><!----></div>

+</li>

+

+<li> Do NOT use gzip compression, even when transferring data over a modem connection. Modems already compress data transfers.

+<div class="p"><!----></div>

+</li>

+</ul>

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.17">

+18.17</a>&nbsp;&nbsp;<font color="#0000FF">Timeout Management for Non-Blocking Operations</font></h3><a name="sec:timeout">

+</a>

+

+<div class="p"><!----></div>

+Socket connect, accept, send, and receive timeout values can be set to manage

+socket communication timeouts.  The <i>soap.connect_timeout</i>,

+<i>soap.accept_timeout</i>, <i>soap.send_timeout</i>, and

+<i>soap.recv_timeout</i> attributes of the current gSOAP runtime environment

+<i>soap</i> can be set to the appropriate user-defined socket send, receive, and

+accept timeout values.  A positive value measures the timeout in seconds. A

+negative timeout value measures the timeout in microseconds (10<sup><font face="symbol">-</font

+>6</sup> sec).

+

+<div class="p"><!----></div>

+The <i>soap.connect_timeout</i> specifies the timeout value for

+<i>soap_call_ns__method</i> calls.

+

+<div class="p"><!----></div>

+The <i>soap.accept_timeout</i> specifies the timeout value for

+<i>soap_accept(&amp;soap)</i> calls.

+

+<div class="p"><!----></div>

+The <i>soap.send_timeout</i> and <i>soap.recv_timeout</i> specify the timeout

+values for non-blocking socket I/O operations.

+

+<div class="p"><!----></div>

+Example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap soap; <br />

+soap_init(&amp;soap); <br />

+soap.send_timeout = 10; <br />

+soap.recv_timeout = 10; 

+</td></tr></table><br></i>

+This will result in a timeout if no data can be send in 10 seconds and no data is received within 10 seconds after initiating

+a send or receive operation over the socket. A value of zero disables timeout, for example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+soap.send_timeout = 0; <br />

+soap.recv_timeout = 0; 

+</td></tr></table><br></i>

+When a timeout occurs in send/receive operations, a <i>SOAP_EOF</i> exception will be raised ("end of file or no input").

+Negative timeout values measure timeouts in microseconds, for example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#define uSec *-1 <br />

+#define mSec *-1000 <br />

+soap.accept_timeout = 10 uSec; <br />

+soap.send_timeout = 20 mSec; <br />

+soap.recv_timeout = 20 mSec;

+</td></tr></table><br></i>

+The macros improve readability.

+

+<div class="p"><!----></div>

+<font color="#FF0000"><b>Caution</b></font>: Many Linux versions do not support non-blocking <i>connect()</i>. Therefore, setting <i>soap.connect_timeout</i> for

+non-blocking <i>soap_call_ns__method</i> calls may not work under Linux.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.18">

+18.18</a>&nbsp;&nbsp;<font color="#0000FF">Socket Options and Flags</font></h3>

+

+<div class="p"><!----></div>

+gSOAP's socket communications can be controlled with socket options and flags.

+The gSOAP run-time environment <i><b>struct</b>&nbsp;soap</i> flags are:

+<i><b>int</b>&nbsp;soap.socket_flags</i> to control socket send() and recv() calls,

+<i><b>int</b>&nbsp;soap.connect_flags</i> to set client connection socket options,

+<i><b>int</b>&nbsp;soap.bind_flags</i> to set server-side port bind socket options,

+<i><b>int</b>&nbsp;soap.accept_flags</i> to set server-side request message accept

+socket options. See the manual pages of <i>send</i> and <i>recv</i> for

+<i>soap.socket_flags</i> values and see the manual pages of

+<i>setsockopt</i> for

+<i>soap.connect_flags</i>, <i>soap.bind_flags</i>, and

+<i>soap.accept_flags</i> (SOL_SOCKET) values.

+These <i>SO_</i> socket option flags (see <i>setsockopt</i> manual pages)

+can be bit-wise or-ed to set multiple

+socket options at once.

+The client-side flag <i>soap.connect_flags=SO_LINGER</i> is supported with values <i>l_onoff=1</i> and <i>l_linger=0</i>.

+

+<div class="p"><!----></div>

+For example, to disable sigpipe signals on Unix/Linux platforms use: 

+<i>soap.socket_flags=MSG_NOSIGNAL</i> and/or

+<i>soap.connect_flags=SO_NOSIGPIPE</i> (i.e.&nbsp;client-side connect) depending

+on your platform.

+

+<div class="p"><!----></div>

+Use <i>soap.bind_flags=SO_REUSEADDR</i> to enable server-side port reuse and

+local port

+sharing (but be aware of the security issues when the port is not blocked by a

+firewall and open to the Internet).

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.19">

+18.19</a>&nbsp;&nbsp;<font color="#0000FF">Secure SOAP Web Services with HTTPS/SSL</font></h3>&nbsp;<a name="sec:serveropenssl">

+</a>

+

+<div class="p"><!----></div>

+When a Web Service is installed as CGI, it uses standard I/O that is encrypted/decrypted by the Web server that runs the CGI

+application.

+Therefore, HTTPS/SSL support must be configured for the Web server (not CGI-based Web Service application itself).

+

+<div class="p"><!----></div>

+To enable OpenSSL, first install OpenSSL and use option <i>-DWITH_OPENSSL</i> to compile the sources with your C or C++ compiler, for example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>g++ -DWITH_OPENSSL -o myprog myprog.cpp stdsoap2.cpp soapC.cpp soapServer.cpp -lssl -lcrypto</i>

+</td></tr></table><br></span>

+SSL support for stand-alone gSOAP Web services is enabled by calling <i>soap_ssl_accept</i> after <i>soap_accept</i>.

+In addition, a key file, a CA file (or path to certificates), DH file (if RSA is not used), and password need to be supplied. Instructions on how to do this can be found in the

+OpenSSL documentation <i>http://www.openssl.org</i>. See also Section&nbsp;<a href="#sec:ssl">18.22</a>.

+

+<div class="p"><!----></div>

+Let's take a look at an example SSL secure

+multi-threaded stand-alone SOAP Web Service:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;m, s; <br />

+&nbsp;&nbsp;&nbsp;pthread_t tid; <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap, *tsoap; <br />

+&nbsp;&nbsp;&nbsp;soap_ssl_init(); /* init OpenSSL (just once) */<br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(CRYPTO_thread_setup()) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, "Cannot setup thread mutex\n"); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(1); <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_ssl_server_context(&amp;soap, <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SOAP_SSL_DEFAULT, <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"server.pem",	/* keyfile: required when server must authenticate to clients (see SSL docs on how to obtain this file) */ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"password",	/* password to read the key file */ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"cacert.pem",	/* optional cacert file to store trusted certificates */ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NULL,		/* optional capath to directory with trusted certificates */ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"dh512.pem",	/* DH file, if NULL use RSA */ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NULL,		/* if randfile!=NULL: use a file with random data to seed randomness */  <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NULL		/* optional server identification to enable SSL session cache (must be a unique name) */

+&nbsp;&nbsp;&nbsp;)) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(1); <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;m = soap_bind(&amp;soap, NULL, 18000, 100); // use port 18000 <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(m  &lt;  0) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(1); <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;fprintf(stderr, "Socket connection successful: master socket = %d<tt>\</tt>n", m); <br />

+&nbsp;&nbsp;&nbsp;<b>for</b>&nbsp;(;;) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s = soap_accept(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, "Socket connection successful: slave socket = %d<tt>\</tt>n", s); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(s  &lt;  0) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>break</b>; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tsoap = soap_copy(&amp;soap); /* should call soap_ssl_accept on a copy */ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!tsoap) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>break</b>; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_ssl_accept(tsoap)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(tsoap, stderr); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_done(tsoap); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(tsoap); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>continue</b>; /* when soap_ssl_accept fails, we should just go on */ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pthread_create(&amp;tid, NULL, &amp;process_request, (<b>void</b>*)tsoap); <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;soap_done(&amp;soap); /* deallocates SSL context */<br />

+&nbsp;&nbsp;&nbsp;CRYPTO_thread_cleanup(); <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;0; <br />

+}  <br />

+<b>void</b>&nbsp;*process_request(<b>void</b>&nbsp;*soap) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;pthread_detach(pthread_self()); <br />

+&nbsp;&nbsp;&nbsp;soap_serve((<b>struct</b>&nbsp;soap*)soap); <br />

+&nbsp;&nbsp;&nbsp;soap_destroy((<b>struct</b>&nbsp;soap*)soap); <br />

+&nbsp;&nbsp;&nbsp;soap_end((<b>struct</b>&nbsp;soap*)soap); <br />

+&nbsp;&nbsp;&nbsp;soap_done((<b>struct</b>&nbsp;soap*)soap); <br />

+&nbsp;&nbsp;&nbsp;free(soap); <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;NULL; <br />

+}

+</td></tr></table><br></i>

+The <i>soap_ssl_server_context</i> function initializes the server-side SSL context. The <i>server.pem</i> key file is the server's private key. The <i>cacert.pem</i> is used to authenticate clients and contains the client certificates. Alternatively a directory name can be specified. This directory is assumed to contain the certificates. The <i>dh512.pem</i> file specifies that DH will be used for key agreement instead of RSA. The randfile entry can be used to seed the PRNG. The last entry enable server-side session caching. A unique server name is required.

+

+<div class="p"><!----></div>

+The <i>CRYPTO_thread_setup()</i> and <i>CRYPTO_thread_cleanup()</i> routines can be found in <i>openssl/crypto/threads/th-lock.c</i>. These routines are required to setup locks for multi-threaded applications that use SSL.

+We give a Windows and POSIX threads implementation of these here:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include  &lt; unistd.h &gt; 		/* defines _POSIX_THREADS if pthreads are available */ <br />

+#ifdef _POSIX_THREADS <br />

+# include  &lt; pthread.h &gt;  <br />

+#endif <br />

+#if defined(WIN32) <br />

+# define MUTEX_TYPE             HANDLE <br />

+# define MUTEX_SETUP(x)         (x) = CreateMutex(NULL, FALSE, NULL) <br />

+# define MUTEX_CLEANUP(x)       CloseHandle(x) <br />

+# define MUTEX_LOCK(x)          WaitForSingleObject((x), INFINITE) <br />

+# define MUTEX_UNLOCK(x)        ReleaseMutex(x) <br />

+# define THREAD_ID              GetCurrentThreadID() <br />

+#elif defined(_POSIX_THREADS) <br />

+# define MUTEX_TYPE             pthread_mutex_t <br />

+# define MUTEX_SETUP(x)         pthread_mutex_init(&amp;(x), NULL) <br />

+# define MUTEX_CLEANUP(x)       pthread_mutex_destroy(&amp;(x)) <br />

+# define MUTEX_LOCK(x)          pthread_mutex_lock(&amp;(x)) <br />

+# define MUTEX_UNLOCK(x)        pthread_mutex_unlock(&amp;(x)) <br />

+# define THREAD_ID              pthread_self() <br />

+#else <br />

+# error "You must define mutex operations appropriate for your platform" <br />

+# error "See OpenSSL /threads/th-lock.c on how to implement mutex on your platform" <br />

+#endif <br />

+<b>struct</b>&nbsp;CRYPTO_dynlock_value { MUTEX_TYPE mutex; }; <br />

+<b>static</b>&nbsp;MUTEX_TYPE *mutex_buf; <br />

+<b>static</b>&nbsp;<b>struct</b>&nbsp;CRYPTO_dynlock_value *dyn_create_function(<b>const</b>&nbsp;<b>char</b>&nbsp;*file, <b>int</b>&nbsp;line) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;CRYPTO_dynlock_value *value; <br />

+&nbsp;&nbsp;&nbsp;value = (<b>struct</b>&nbsp;CRYPTO_dynlock_value*)malloc(<b>sizeof</b>(<b>struct</b>&nbsp;CRYPTO_dynlock_value)); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(value) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MUTEX_SETUP(value<tt>-&gt;</tt>mutex); <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;value; <br />

+} <br />

+<b>static</b>&nbsp;<b>void</b>&nbsp;dyn_lock_function(<b>int</b>&nbsp;mode, <b>struct</b>&nbsp;CRYPTO_dynlock_value *l, <b>const</b>&nbsp;<b>char</b>&nbsp;*file, <b>int</b>&nbsp;line) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(mode &amp; CRYPTO_LOCK) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MUTEX_LOCK(l<tt>-&gt;</tt>mutex); <br />

+&nbsp;&nbsp;&nbsp;<b>else</b><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MUTEX_UNLOCK(l<tt>-&gt;</tt>mutex); <br />

+} <br />

+<b>static</b>&nbsp;<b>void</b>&nbsp;dyn_destroy_function(<b>struct</b>&nbsp;CRYPTO_dynlock_value *l, <b>const</b>&nbsp;<b>char</b>&nbsp;*file, <b>int</b>&nbsp;line) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;MUTEX_CLEANUP(l<tt>-</tt>&#62;mutex); <br />

+&nbsp;&nbsp;&nbsp;free(l); <br />

+} <br />

+<b>void</b>&nbsp;locking_function(<b>int</b>&nbsp;mode, <b>int</b>&nbsp;n, <b>const</b>&nbsp;<b>char</b>&nbsp;*file, <b>int</b>&nbsp;line) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(mode &amp; CRYPTO_LOCK) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MUTEX_LOCK(mutex_buf[n]); <br />

+&nbsp;&nbsp;&nbsp;<b>else</b><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MUTEX_UNLOCK(mutex_buf[n]); <br />

+} <br />

+<b>unsigned</b>&nbsp;<b>long</b>&nbsp;id_function() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;(<b>unsigned</b>&nbsp;<b>long</b>)THREAD_ID; <br />

+} <br />

+<b>int</b>&nbsp;CRYPTO_thread_setup() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;i; <br />

+&nbsp;&nbsp;&nbsp;mutex_buf = (MUTEX_TYPE*)malloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t)); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!mutex_buf) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_EOM; <br />

+&nbsp;&nbsp;&nbsp;<b>for</b>&nbsp;(i = 0; i  &lt;  CRYPTO_num_locks(); i++) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MUTEX_SETUP(mutex_buf[i]); <br />

+&nbsp;&nbsp;&nbsp;CRYPTO_set_id_callback(id_function); <br />

+&nbsp;&nbsp;&nbsp;CRYPTO_set_locking_callback(locking_function); <br />

+&nbsp;&nbsp;&nbsp;CRYPTO_set_dynlock_create_callback(dyn_create_function); <br />

+&nbsp;&nbsp;&nbsp;CRYPTO_set_dynlock_lock_callback(dyn_lock_function); <br />

+&nbsp;&nbsp;&nbsp;CRYPTO_set_dynlock_destroy_callback(dyn_destroy_function); <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+} <br />

+<b>void</b>&nbsp;CRYPTO_thread_cleanup() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;i; <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!mutex_buf) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>; <br />

+&nbsp;&nbsp;&nbsp;CRYPTO_set_id_callback(NULL); <br />

+&nbsp;&nbsp;&nbsp;CRYPTO_set_locking_callback(NULL); <br />

+&nbsp;&nbsp;&nbsp;CRYPTO_set_dynlock_create_callback(NULL); <br />

+&nbsp;&nbsp;&nbsp;CRYPTO_set_dynlock_lock_callback(NULL); <br />

+&nbsp;&nbsp;&nbsp;CRYPTO_set_dynlock_destroy_callback(NULL); <br />

+&nbsp;&nbsp;&nbsp;<b>for</b>&nbsp;(i = 0; i  &lt;  CRYPTO_num_locks(); i++) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MUTEX_CLEANUP(mutex_buf[i]); <br />

+&nbsp;&nbsp;&nbsp;free(mutex_buf); <br />

+&nbsp;&nbsp;&nbsp;mutex_buf = NULL; <br />

+}

+</td></tr></table><br></i>

+For Unix and Linux, make sure you have signal handlers set in your service and/or client applications to catch broken connections (<i>SIGPIPE</i>):

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+signal(SIGPIPE, sigpipe_handle);

+</td></tr></table><br></i>

+where, for example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>void</b>&nbsp;sigpipe_handle(<b>int</b>&nbsp;x) { }

+</td></tr></table><br></i>

+By default, clients are not required to authenticate. To support client authentication use the following:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_ssl_server_context(&amp;soap, <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION, <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"server.pem", <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"password", <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"cacert.pem", <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NULL, <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"dh512.pem", <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NULL, <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NULL <br />

+&nbsp;&nbsp;&nbsp;)) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(1); <br />

+&nbsp;&nbsp;&nbsp;}

+</td></tr></table><br></i>

+This requires each client to authenticate with its certificate.

+

+<div class="p"><!----></div>

+The <i>cacert</i> file and <i>capath</i> are optional. Either one can be

+specified when clients must run on non-trusted systems. We want to avoid

+storing trusted certificates in the default location on the file system when

+that is not secure. Therefore, a flat <i>cacert.pem</i> file or directory can be

+specified to store trusted certificates.

+

+<div class="p"><!----></div>

+The gSOAP distribution includes a <i>cacerts.pem</i> file with the certificates

+of all certificate authorities such as Verisign. You can use this file to

+verify the authentication of servers that provide certificates issued by these

+CAs.

+

+<div class="p"><!----></div>

+The <i>cacert.pem</i>, <i>client.pem</i>, and <i>server.pem</i> files in the gSOAP

+distribution are examples of self-signed certificates.

+

+<div class="p"><!----></div>

+<font color="#FF0000"><b>Caution</b></font>: it is important that the <i>WITH_OPENSSL</i> macro MUST be consistently defined to

+compile the sources, such as <i>stdsoap2.cpp</i>, <i>soapC.cpp</i>,

+<i>soapClient.cpp</i>, <i>soapServer.cpp</i>, and all application sources that

+include <i>stdsoap2.h</i> or <i>soapH.h</i>. If the macros are not consistently

+used, the application will crash due to a mismatches in the declaration and

+access of the gSOAP environment.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.20">

+18.20</a>&nbsp;&nbsp;<font color="#0000FF">Secure SOAP Clients with HTTPS/SSL</font></h3><a name="sec:clientopenssl">

+</a>

+

+<div class="p"><!----></div>

+You need to install the OpenSSL library on your platform to enable secure SOAP clients to utilize HTTPS/SSL.

+After installation, compile all the sources of your application with option <i>-DWITH_OPENSSL</i>. For example on Linux:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>g++ -DWITH_OPENSSL myclient.cpp stdsoap.cpp soapC.cpp soapClient.cpp -lssl -lcrypto</i>

+</td></tr></table><br></span>

+or Unix:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>g++ -DWITH_OPENSSL myclient.cpp stdsoap.cpp soapC.cpp soapClient.cpp -lxnet -lsocket -lnsl -lssl -lcrypto</i>

+</td></tr></table><br></span>

+or you can add the following line to <i>soapdefs.h</i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#define WITH_OPENSSL

+</td></tr></table><br></i>

+and compile with option <i>-DWITH_SOAPDEFS_H</i> to include <i>soapdefs.h</i> in your project.

+A client program simply uses the prefix <i>https:</i> instead of <i>http:</i> in the endpoint URL of a remote method call to a

+Web Service to use encrypted transfers (if the service supports HTTPS). You need to specify the client-side key file and password of the keyfile:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+soap_ssl_init(); /* init OpenSSL (just once) */<br />

+<b>if</b>&nbsp;(soap_ssl_client_context(&amp;soap, <br />

+&nbsp;&nbsp;&nbsp;SOAP_SSL_DEFAULT, <br />

+&nbsp;&nbsp;&nbsp;"client.pem",	/* keyfile: required only when client must authenticate to server (see SSL docs on how to obtain this file) */ <br />

+&nbsp;&nbsp;&nbsp;"password",		/* password to read the key file */ <br />

+&nbsp;&nbsp;&nbsp;"cacert.pem", 	/* optional cacert file to store trusted certificates (needed to verify server) */

+&nbsp;&nbsp;&nbsp;NULL,		/* optional capath to direcoty with trusted certificates */ <br />

+&nbsp;&nbsp;&nbsp;NULL		/* if randfile!=NULL: use a file with random data to seed randomness */  <br />

+)) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); <br />

+&nbsp;&nbsp;&nbsp;exit(1); <br />

+} <br />

+soap_call_ns__mymethod(&amp;soap, "https://domain/path/secure.cgi", "", ...);

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+By default, server authentication is enabled. To disable server authentication for testing purposes, use the following:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>if</b>&nbsp;(soap_ssl_client_context(&amp;soap, <br />

+&nbsp;&nbsp;&nbsp;SOAP_SSL_NO_AUTHENTICATION, <br />

+&nbsp;&nbsp;&nbsp;NULL, <br />

+&nbsp;&nbsp;&nbsp;NULL, <br />

+&nbsp;&nbsp;&nbsp;NULL, <br />

+&nbsp;&nbsp;&nbsp;NULL, <br />

+&nbsp;&nbsp;&nbsp;NULL	<br />

+)) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); <br />

+&nbsp;&nbsp;&nbsp;exit(1); <br />

+} <br />

+</td></tr></table><br></i>

+This also assumes that the server does not require clients to authenticate (the keyfile is absent).

+

+<div class="p"><!----></div>

+The <i>cacert</i> file and <i>capath</i> are optional. Either one can be specified when clients must run on non-trusted systems. We want to avoid storing trusted certificates in the default location on the file system when that is not secure. Therefore, a flat <i>cacert.pem</i> file or directory can be specified to store trusted certificates.

+

+<div class="p"><!----></div>

+Make sure you have signal handlers set in your application to catch broken connections (<i>SIGPIPE</i>):

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+signal(SIGPIPE, sigpipe_handle);

+</td></tr></table><br></i>

+where, for example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>void</b>&nbsp;sigpipe_handle(<b>int</b>&nbsp;x) { }

+</td></tr></table><br></i>

+<font color="#FF0000"><b>Caution</b></font>: it is important that the <i>WITH_OPENSSL</i> macro MUST be consistently defined to

+compile the sources, such as <i>stdsoap2.cpp</i>, <i>soapC.cpp</i>,

+<i>soapClient.cpp</i>, <i>soapServer.cpp</i>, and all application sources that

+include <i>stdsoap2.h</i> or <i>soapH.h</i>. If the macros are not consistently

+used, the application will crash due to a mismatches in the declaration and

+access of the gSOAP environment.

+<font color="#FF0000"><b>Caution</b></font>: concurrent client calls MUST be made using separate soap structs copied with <i>soap_copy</i> from an originating struct initialized with <i>soap_ssl_client_context</i>. In addition, the thread initialization code discussed in Section&nbsp;<a href="#sec:serveropenssl">18.19</a> MUST be used to properly setup OpenSSL in a multi-threaded client application.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.21">

+18.21</a>&nbsp;&nbsp;<font color="#0000FF">SSL Authentication Callback</font></h3>

+

+<div class="p"><!----></div>

+gSOAP provides a callback function for authentication initialization:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td width="602"><font color="#FF0000"><b>Callback (function pointer)</b></font> </td></tr>

+<tr><td width="602"><i><b>int</b>&nbsp;(*soap.fsslauth)(<b>struct</b>&nbsp;soap *soap)</i> </td></tr>

+<tr><td width="602">Initialize the authentication information for clients and services, such as the

+certificate chain, password, read the key and/or DH file, generate an RSA key,

+and initialization of the RNG.  Should return a gSOAP error code or

+<i>SOAP_OK</i>.  Built-in gSOAP function: <i>ssl_auth_init</i>

+</td></tr></table>

+

+</td></tr></table><br></span>

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.22">

+18.22</a>&nbsp;&nbsp;<font color="#0000FF">SSL Certificates</font></h3><a name="sec:ssl">

+</a>

+

+<div class="p"><!----></div>

+The gSOAP distribution includes a <i>cacerts.pem</i> file with the certificates

+of all certificate authorities (such as Verisign). You can use this file to

+verify the authentication of servers that provide certificates issued by these

+CAs. Just set the <i>cafile</i> parameter to the location of this file on your file system.

+Therefore, when you obtain a certifice signed by a trusted CA such as Verisign, you

+can simply use the <i>cacerts.pem</i> file to develop client applications

+that can verify the authenticity of your server.

+

+<div class="p"><!----></div>

+The other <i>.pem</i> files in the gSOAP distribution are examples

+of self-signed certificates for testing purposes (<i>cacert.pem</i>, <i>client.pem</i>, <i>server.pem</i>).

+

+<div class="p"><!----></div>

+You can also create your own self-signed certificates.

+There is more than one way to generate the necessary files for clients and servers.

+See <i>http://www.openssl.org</i> for information on OpenSSL and

+<i>http://sial.org/howto/openssl/ca/</i> on how to setup and manage a local CA

+and <i>http://sial.org/howto/openssl/self-signed/</i> on how to setup self-signed

+test certificates.

+

+<div class="p"><!----></div>

+It is also possible to convert IIS-generated certificates to PEM format, see <i>http://www.icewarp.com/Knowledgebase/617.htm</i> for a discussion and examples.

+

+<div class="p"><!----></div>

+Here is the simplest way to setup self-signed certificates. First you need to create a private Certificate Authority (CA).  The CA is used in SSL to verify the authenticity of a given

+certificate. The CA acts as a trusted third party who has authenticated the

+user of the signed certificate as being who they say. The certificate is

+signed by the CA, and if the client trusts the CA, it will trust your

+certificate. For use within your organization, a private CA will probably

+serve your needs. However, if you intend use your certificates for a public

+service, you should probably obtain a certificate from a known CA (e.g.&nbsp;VeriSign).

+In addition to identification, your certificate is also used for encryption.

+

+<div class="p"><!----></div>

+Creating certificates should be done through a CA to obtain signed certificates. But you can create your own certificates for testing purposes as follows.

+

+<ul>

+<li> Go to the OpenSSL bin directory (<i>/usr/local/ssl</i> by default and

+<i>/System/Library/OpenSSL</i> on Mac OS X)

+<div class="p"><!----></div>

+</li>

+

+<li> There should be a file called openssl.cnf

+<div class="p"><!----></div>

+</li>

+

+<li> Create a new directory in your home account, e.g. $HOME/CA, and copy the openssl.cnf file to this directory

+<div class="p"><!----></div>

+</li>

+

+<li> Modify openssl.cnf by changing the 'dir' value to HOME/CA

+<div class="p"><!----></div>

+</li>

+

+<li> Copy the README.txt, root.sh, and cert.sh scripts from the gSOAP distribution package located in the samples/ssl directory to HOME/CA

+<div class="p"><!----></div>

+</li>

+

+<li> Follow the README.txt instructions

+<div class="p"><!----></div>

+</li>

+</ul>

+You now have a self-signed CA root certificate cacert.pem and a server.pem (or client.pem) certificate in PEM format.

+The cacert.pem certificate is used in the <i>cafile</i> parameter of the <i>soap_ssl_client_context</i> (or <i>soap_ssl_server_context</i>) at the client (or server) side to verify the authenticity of the peer. You can also provide a capath parameter to these trusted certificates. The server.pem (or client.pem) must be provided with the <i>soap_ssl_server_context</i> at the server side (or <i>soap_ssl_client_context</i> at the client side) together with the password you entered when generating the certificate using cert.sh to access the file. These certificates must be present to grant authentication requests by peers. In addition, the server.pem (and client.pem) include the host name of the machine on which the application runs (e.g. localhost), so you need to generate new certificates when migrating a server (or client).

+

+<div class="p"><!----></div>

+Finally you need to generate Diffie-Helmann parameters for the server if you don't want to use RSA.

+Do the following at the prompt:

+

+<div class="p"><!----></div>

+<i>openssl dhparam -outform PEM -out dh.pem 512</i>

+

+<div class="p"><!----></div>

+File <i>dh512.pem</i> is the output file and 512 is the number of bits used.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.23">

+18.23</a>&nbsp;&nbsp;<font color="#0000FF">SSL Hardware Acceleration</font></h3>

+

+<div class="p"><!----></div>

+You can specify a hardware engine to enable hardware support for cryptographic acceleration. This can be done once in a server or client with the following statements:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>static</b>&nbsp;<b>const</b>&nbsp;<b>char</b>&nbsp;*engine = "cswift"; /* engine name */ <br />

+<b>int</b>&nbsp;main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;ENGINE *e; <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!(e = ENGINE_by_id(engine))) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, "Error finding engine %s\n", engine); <br />

+&nbsp;&nbsp;&nbsp;<b>else</b>&nbsp;<b>if</b>&nbsp;(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, "Error using engine %s\n", engine); <br />

+&nbsp;&nbsp;&nbsp;...

+</td></tr></table><br></i>

+The following table lists the names of the hardware and software engines:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td><font color="#FF0000"><b>Name</b></font> </td><td width="501"><font color="#FF0000"><b>Description</b></font> </td></tr>

+<tr><td>openssl	</td><td width="501">The default software engine for cryptographic operations </td></tr>

+<tr><td>openbsd_dev_crypto	</td><td width="501">OpenBSD supports kernel level cryptography </td></tr>

+<tr><td>cswift		</td><td width="501">CryptoSwift acceleration hardware </td></tr>

+<tr><td>chil		</td><td width="501">nCipher CHIL acceleration hardware </td></tr>

+<tr><td>atalla		</td><td width="501">Compaq Atalla acceleration hardware </td></tr>

+<tr><td>nuron		</td><td width="501">Nuron acceleration hardware </td></tr>

+<tr><td>ubsec		</td><td width="501">Broadcom uBSec acceleration hardware </td></tr>

+<tr><td>aep		</td><td width="501">Aep acceleration hardware </td></tr>

+<tr><td>sureware	</td><td width="501">SureWare acceleration hardware </td></tr></table>

+

+</td></tr></table><br></span>

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.24">

+18.24</a>&nbsp;&nbsp;<font color="#0000FF">SSL on Windows</font></h3>

+

+<div class="p"><!----></div>

+Set the full path to libssl.lib and libcrypto.lib 

+under the MSVC++ "Projects" menu, then choose "Link": &#214;bject/Modules". The path 

+to libssl32.dll and libeay32.dll need to be specified in the PATH 

+environment variable when running gSOAP applications.

+

+<div class="p"><!----></div>

+Alternatively, you can use the WinInet interface available in the <i>mod_gsoap</i> directory of the gSOAP package. API instructions are included in the source.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.25">

+18.25</a>&nbsp;&nbsp;<font color="#0000FF">Zlib Compression</font></h3><a name="sec:compression">

+</a>

+

+<div class="p"><!----></div>

+To enable deflate and gzip compression with Zlib, install Zlib from

+<tt>http://www.zlib.org</tt> if not already installed on your system.  Compile

+<i>stdsoap2.cpp</i> (or <i>stdsoap2.c</i>) and <b>all</b> your sources that include

+<i>stdsoap2.h</i> or <i>soapH.h</i> with compiler option <i>-DWITH_GZIP</i> and

+link your code with the Zlib library, e.g. <i>-lz</i> on Unix/Linux platforms.

+

+<div class="p"><!----></div>

+The gzip compression is orthogonal to all transport encodings such as HTTP,

+SSL, DIME, and can be used with other transport layers.  You can even save and

+load compressed XML data to/from files.

+

+<div class="p"><!----></div>

+gSOAP supports two compression formats: deflate and gzip. The gzip format is

+used by default. The gzip format has several benefits over deflate. Firstly,

+gSOAP can automatically detect gzip compressed inbound messages, even without

+HTTP headers, by checking for the presence of a gzip header in the message

+content. Secondly, gzip includes a CRC32 checksum to ensure messages have been

+correctly received. Thirdly, gzip compressed content can be decompressed with

+other compression software, so you can decompress XML data saved by gSOAP in

+gzip format.

+

+<div class="p"><!----></div>

+Gzip compression is enabled by compiling the sources with <i>-DWITH_GZIP</i>.

+To transmit gzip compressed SOAP/XML data, set the output mode flags to

+<i>SOAP_ENC_ZLIB</i>. For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+soap_init(&amp;soap); <br />

+... <br />

+soap_set_omode(&amp;soap, SOAP_ENC_ZLIB); // enable Zlib's gzip <br />

+<b>if</b>&nbsp;(soap_call_ns__myMethod(&amp;soap, ...)) <br />

+... <br />

+soap_clr_omode(&amp;soap, SOAP_ENC_ZLIB); // disable Zlib's gzip <br />

+...

+</td></tr></table><br></i>

+This will send a compressed SOAP/XML request to a service, provided that Zlib is

+installed and linked with the application and the <i>-DWITH_GZIP</i> option was used to compile the sources.

+Receiving compressed SOAP/XML over HTTP either in gzip or deflate formats is automatic. The <i>SOAP_ENC_ZLIB</i> flag does not have

+to be set at the server side to accept compressed messages. Reading and receiving gzip compressed SOAP/XML without HTTP headers (e.g. with other transport protocols) is also automatic.

+

+<div class="p"><!----></div>

+To control the level of compression for outbound messages, you can set the <i>soap.z_level</i> to a value between 1 and 9, where 1 is the best speed and 9 is the best compression (default is 6).  For example

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+soap_init(&amp;soap); <br />

+... <br />

+soap_set_omode(&amp;soap, SOAP_ENC_ZLIB); <br />

+soap.z_level = 9; // best compression <br />

+...

+</td></tr></table><br></i>

+To verify and monitor compression rates, you can use the values <i>soap.z_ratio_in</i> and <i>soap.z_ratio_out</i>. These two float values lie between 0.0 and 1.0 and express the ratio of the compressed message length over uncompressed message length.

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+soap_call_ns__myMethod(&amp;soap, ...); <br />

+... <br />

+printf("Compression ratio: %f%% (in) %f%% (out)\n", 100*soap.z_ratio_out, 100*soap.z_ratio_in); <br />

+...

+</td></tr></table><br></i>

+Note: lower ratios mean higher compression rates.

+

+<div class="p"><!----></div>

+Compressed transfers require buffering the entire output message to determine HTTP message length.

+This means that the <i>SOAP_IO_STORE</i> flag is

+automatically set when the <i>SOAP_ENC_ZLIB</i> flag is set to send compressed messages. The use of HTTP chunking

+significantly reduces memory usage and may speed up the transmission of compressed SOAP/XML messages.

+This is accomplished by setting the <i>SOAP_IO_CHUNK</i> flag with

+<i>SOAP_ENC_ZLIB</i> for the output mode.

+However, some Web servers do not accept HTTP chunked request messages (even when they return HTTP chunked messages!). Stand-alone gSOAP services always accept chunked request messages.

+

+<div class="p"><!----></div>

+To restrict the compression to the deflate format only, compile the sources with <i>-DWITH_ZLIB</i>. This limits compression and decompression to the deflate format. Only plain and deflated messages can be exchanged, gzip is not supported with this option.

+Receiving gzip compressed content is automatic, even in the absence of HTTP headers.

+Receiving deflate compressed content is not automatic in the absence of HTTP headers and requires the flag

+<i>SOAP_ENC_ZLIB</i> to be set for the input mode to decompress deflated data.

+

+<div class="p"><!----></div>

+<font color="#FF0000"><b>Caution</b></font>: it is important that the <i>WITH_GZIP</i> and <i>WITH_ZLIB</i> macros MUST be consistently defined to

+compile the sources, such as <i>stdsoap2.cpp</i>, <i>soapC.cpp</i>,

+<i>soapClient.cpp</i>, <i>soapServer.cpp</i>, and all application sources that

+include <i>stdsoap2.h</i> or <i>soapH.h</i>. If the macros are not consistently

+used, the application will crash due to a mismatches in the declaration and

+access of the gSOAP environment.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.26">

+18.26</a>&nbsp;&nbsp;<font color="#0000FF">Client-Side Cookie Support</font></h3><a name="sec:clientcookie">

+</a>

+

+<div class="p"><!----></div>

+Client-side cookie support is optional. To enable cookie support, compile all sources with option <i>-DWITH_COOKIES</i>, for example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>g++ -DWITH_COOKIES -o myclient stdsoap2.cpp soapC.cpp soapClient.cpp</i>

+</td></tr></table><br></span>

+or add the following line to <i>stdsoap.h</i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#define WITH_COOKIES

+</td></tr></table><br></i>

+Client-side cookie support is fully automatic. So just (re)compile <i>stdsoap2.cpp</i> with <i>-DWITH_COOKIES</i> to enable

+cookie-based session control in your client.

+

+<div class="p"><!----></div>

+A database of cookies is kept and returned to the appropriate servers.

+Cookies are not automatically saved to a file by a client. An example cookie

+file manager is included as an extras in the distribution. You should

+explicitly remove all cookies before terminating a gSOAP environment by

+calling <i>soap_free_cookies(soap)</i> or by calling <i>soap_done(soap)</i>.

+

+<div class="p"><!----></div>

+To avoid "cookie storms" caused by malicious servers that return an 

+unreasonable amount of cookies, gSOAP clients/servers are restricted to

+a database size that the user can limit (32 cookies by default), for example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap soap; <br />

+soap_init(&amp;soap); <br />

+soap.cookie_max = 10;

+</td></tr></table><br></i>

+The cookie database is a linked list pointed to by <i>soap.cookies</i> where each node is declared as:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap_cookie <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*name; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*value; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*domain; <br />

+&nbsp;&nbsp;&nbsp;<b>char</b>&nbsp;*path; <br />

+&nbsp;&nbsp;&nbsp;<b>long</b>&nbsp;expire; /* client-side: local time to expire; server-side: seconds to expire */ <br />

+&nbsp;&nbsp;&nbsp;<b>unsigned</b>&nbsp;<b>int</b>&nbsp;version; <br />

+&nbsp;&nbsp;&nbsp;<b>short</b>&nbsp;secure; <br />

+&nbsp;&nbsp;&nbsp;<b>short</b>&nbsp;session; /* server-side */ <br />

+&nbsp;&nbsp;&nbsp;<b>short</b>&nbsp;env; /* server-side: 1 = got cookie from client */ <br />

+&nbsp;&nbsp;&nbsp;<b>short</b>&nbsp;modified; /* server-side: 1 = client cookie was modified */ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap_cookie *next; <br />

+};

+</td></tr></table><br></i>

+Since the cookie database is linked to a <i>soap</i> struct, each thread has a local cookie database in a multi-threaded

+implementation.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.27">

+18.27</a>&nbsp;&nbsp;<font color="#0000FF">Server-Side Cookie Support</font></h3><a name="sec:servercookie">

+</a>

+

+<div class="p"><!----></div>

+Server-side cookie support is optional. To enable cookie support, compile all sources with option <i>-DWITH_COOKIES</i>, for example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>g++ -DWITH_COOKIES -o myserver ...</i>

+</td></tr></table><br></span>

+gSOAP provides the following cookie API for server-side cookie session control:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td width="602"><font color="#FF0000"><b>Function</b></font> </td></tr>

+<tr><td width="602"><i><b>struct</b>&nbsp;soap_cookie *soap_set_cookie(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*name, <b>const</b>&nbsp;<b>char</b>&nbsp;*value, <b>const</b>&nbsp;<b>char</b>&nbsp;*domain, <b>const</b>&nbsp;<b>char</b>&nbsp;*path);</i> </td></tr>

+<tr><td width="602">Add a cookie to the database with name <i>name</i> and value <i>value</i>.

+<i>domain</i> and <i>path</i> may be NULL to use the current domain and path given by <i>soap_cookie_domain</i> and <i>soap_cookie_path</i>.

+If successful, returns pointer to a cookie node in the linked list, or NULL otherwise.

+</td></tr>

+<tr><td width="602"><i><b>struct</b>&nbsp;soap_cookie *soap_cookie(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*name, <b>const</b>&nbsp;<b>char</b>&nbsp;*domain, <b>const</b>&nbsp;<b>char</b>&nbsp;*path);</i> </td></tr>

+<tr><td width="602">Find a cookie in the database with name <i>name</i> and value <i>value</i>.

+<i>domain</i> and <i>path</i> may be NULL to use the current domain and path given by <i>soap_cookie_domain</i> and <i>soap_cookie_path</i>.

+If successful, returns pointer to a cookie node in the linked list, or NULL otherwise.

+</td></tr>

+<tr><td width="602"><i><b>char</b>&nbsp;*soap_cookie_value(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*name, <b>const</b>&nbsp;<b>char</b>&nbsp;*domain, <b>const</b>&nbsp;<b>char</b>&nbsp;*path);</i> </td></tr>

+<tr><td width="602">Get value of a cookie in the database with name <i>name</i>.

+<i>domain</i> and <i>path</i> may be NULL to use the current domain and path given by <i>soap_cookie_domain</i> and <i>soap_cookie_path</i>.

+If successful, returns the string pointer to the value, or NULL otherwise.

+</td></tr>

+<tr><td width="602"><i><b>long</b>&nbsp;soap_cookie_expire(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*name, <b>const</b>&nbsp;<b>char</b>&nbsp;*domain, <b>const</b>&nbsp;<b>char</b>&nbsp;*path);</i> </td></tr>

+<tr><td width="602">Get expiration value of the cookie in the database with name <i>name</i> (in seconds).

+<i>domain</i> and <i>path</i> may be NULL to use the current domain and path given by <i>soap_cookie_domain</i> and <i>soap_cookie_path</i>.

+Returns the expiration value, or -1 if cookie does not exist.

+</td></tr>

+<tr><td width="602"><i><b>int</b>&nbsp;soap_set_cookie_expire(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*name, <b>long</b>&nbsp;expire, <b>const</b>&nbsp;<b>char</b>&nbsp;*domain, <b>const</b>&nbsp;<b>char</b>&nbsp;*path);</i> </td></tr>

+<tr><td width="602">Set expiration value <i>expire</i> of the cookie in the database with name <i>name</i> (in seconds).

+<i>domain</i> and <i>path</i> may be NULL to use the current domain and path given by <i>soap_cookie_domain</i> and <i>soap_cookie_path</i>.

+If successful, returns <i>SOAP_OK</i>, or <i>SOAP_EOF</i> otherwise.

+</td></tr>

+<tr><td width="602"><i><b>int</b>&nbsp;soap_set_cookie_session(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*name, <b>const</b>&nbsp;<b>char</b>&nbsp;*domain, <b>const</b>&nbsp;<b>char</b>&nbsp;*path);</i> </td></tr>

+<tr><td width="602">Set cookie in the database with name <i>name</i> to be a session cookie.

+This means that the cookie will be returned to the client.

+(Only cookies that are modified are returned to the client).

+<i>domain</i> and <i>path</i> may be NULL to use the current domain and path given by <i>soap_cookie_domain</i> and <i>soap_cookie_path</i>.

+If successful, returns <i>SOAP_OK</i>, or <i>SOAP_EOF</i> otherwise.

+</td></tr>

+<tr><td width="602"><i><b>int</b>&nbsp;soap_clr_cookie_session(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*name, <b>const</b>&nbsp;<b>char</b>&nbsp;*domain, <b>const</b>&nbsp;<b>char</b>&nbsp;*path);</i> </td></tr>

+<tr><td width="602">Clear cookie in the database with name <i>name</i> to be a session cookie.

+<i>domain</i> and <i>path</i> may be NULL to use the current domain and path given by <i>soap_cookie_domain</i> and <i>soap_cookie_path</i>.

+If successful, returns <i>SOAP_OK</i>, or <i>SOAP_EOF</i> otherwise.

+</td></tr>

+<tr><td width="602"><i><b>void</b>&nbsp;soap_clr_cookie(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*name, <b>const</b>&nbsp;<b>char</b>&nbsp;*domain, <b>const</b>&nbsp;<b>char</b>&nbsp;*path);</i> </td></tr>

+<tr><td width="602">Remove cookie from the database with name <i>name</i>.

+<i>domain</i> and <i>path</i> may be NULL to use the current domain and path given by <i>soap_cookie_domain</i> and <i>soap_cookie_path</i>.

+</td></tr>

+<tr><td width="602"><i><b>int</b>&nbsp;soap_getenv_cookies(<b>struct</b>&nbsp;soap *soap);</i> </td></tr>

+<tr><td width="602">Initializes cookie database by reading the 'HTTP_COOKIE' environment variable.

+This provides a means for a CGI application to read cookies send by a client.

+If successful, returns <i>SOAP_OK</i>, or <i>SOAP_EOF</i> otherwise.

+</td></tr>

+<tr><td width="602"><i><b>void</b>&nbsp;soap_free_cookies(<b>struct</b>&nbsp;soap *soap);</i> </td></tr>

+<tr><td width="602">Release cookie database. </td></tr></table>

+

+</td></tr></table><br></span>

+The following global variables are used to define the current domain and path:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+

+<table>

+<tr><td><font color="#FF0000"><b>Attribute</b></font> </td><td><font color="#FF0000"><b>value</b></font> </td></tr>

+<tr><td><i><b>const</b>&nbsp;<b>char</b>&nbsp;*cookie_domain</i> </td><td>MUST be set to the domain (host) of the service </td></tr>

+<tr><td><i><b>const</b>&nbsp;<b>char</b>&nbsp;*cookie_path</i> </td><td>MAY be set to the default path to the service </td></tr>

+<tr><td><i><b>int</b>&nbsp;cookie_max</i> </td><td>maximum cookie database size (default=32) </td></tr></table>

+

+</td></tr></table><br></span>

+The <i>cookie_path</i> value is used to filter cookies intended for this service according to the path prefix rules outlined in

+RFC2109.

+

+<div class="p"><!----></div>

+The following example server adopts cookies for session control:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;m, s; <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;soap.cookie_domain = "..."; <br />

+&nbsp;&nbsp;&nbsp;soap.cookie_path = "/"; // the path which is used to filter/set cookies with this destination <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(argc  &lt;  2) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_getenv_cookies(&amp;soap); // CGI app: grab cookies from 'HTTP_COOKIE' env var <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_serve(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>else</b><br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m = soap_bind(&amp;soap, NULL, atoi(argv[1]), 100); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(m  &lt;  0) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(1); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>for</b>&nbsp;(<b>int</b>&nbsp;i = 1; ; i++) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s = soap_accept(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(s  &lt;  0) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(1); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_serve(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_end(&amp;soap);		// clean up  <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_free_cookies(&amp;soap);	// remove all old cookies from database so no interference occurs with the arrival of new cookies <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;0; <br />

+} <br />

+<b>int</b>&nbsp;ck__demo(<b>struct</b>&nbsp;soap *soap, ...) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;n; <br />

+&nbsp;&nbsp;&nbsp;<b>const</b>&nbsp;<b>char</b>&nbsp;*s; <br />

+&nbsp;&nbsp;&nbsp;s = soap_cookie_value(soap, "demo", NULL, NULL); // cookie returned by client? <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!s) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s = "init-value"; // no: set initial cookie value <br />

+&nbsp;&nbsp;&nbsp;<b>else</b>&nbsp;<br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... // modify 's' to reflect session control <br />

+&nbsp;&nbsp;&nbsp;soap_set_cookie(soap, "demo", s, NULL, NULL); <br />

+&nbsp;&nbsp;&nbsp;soap_set_cookie_expire(soap, "demo", 5, NULL, NULL); // cookie may expire at client-side in 5 seconds <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+}

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.28">

+18.28</a>&nbsp;&nbsp;<font color="#0000FF">Connecting Clients Through Proxy Servers</font></h3>

+

+<div class="p"><!----></div>

+When a client needs to connect to a Web Service through a proxy server, set the <i>soap.proxy_host</i> string and

+<i>soap.proxy_port</i> integer attributes of the current <i>soap</i> runtime environment to the proxy's host name and port, respectively. For example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap soap; <br />

+soap_init(&amp;soap); <br />

+soap.proxy_host = "proxyhostname"; <br />

+soap.proxy_port = 8080; <br />

+<b>if</b>&nbsp;(soap_call_ns__method(&amp;soap, "http://host:port/path", "action", ...)) <br />

+&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); <br />

+<b>else</b><br />

+&nbsp;&nbsp;&nbsp;...

+</td></tr></table><br></i>

+The attributes <i>soap.proxy_host</i> and <i>soap.proxy_port</i> keep their values through the remote method calls,

+so they only need to be set once.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.29">

+18.29</a>&nbsp;&nbsp;<font color="#0000FF">FastCGI Support</font></h3><a name="sec:fastcgi">

+</a>

+

+<div class="p"><!----></div>

+To enable FastCGI support, install FastCGI and compile <em>all</em> sources (including your application sources that use <i>stdsoap2.h</i>) with option <i>-DWITH_FASTCGI</i> or add

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#define WITH_FASTCGI

+</td></tr></table><br></i>

+to <i>stdsoap2.h</i>.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.30">

+18.30</a>&nbsp;&nbsp;<font color="#0000FF">How to Create gSOAP Applications With a Small Memory Footprint</font></h3><a name="sec:lean">

+</a>

+

+<div class="p"><!----></div>

+To compile gSOAP applications intended for small memory devices, you may want

+to remove all non-essential features that consume precious code and data space.

+To do this, compile the gSOAP sources with <i>-DWITH_LEAN</i> (i.e.&nbsp;<i>#define WITH_LEAN</i>) to remove many

+non-essential features. The features that will be disabled are:

+

+<ul>

+<li> No I/O timeouts. Note that many socket operations already obey some form of timeout handling, such as a connect timeout for example.

+<div class="p"><!----></div>

+</li>

+

+<li> No HTTP keep alive

+<div class="p"><!----></div>

+</li>

+

+<li> No HTTP cookies

+<div class="p"><!----></div>

+</li>

+

+<li> No HTTP authentication

+<div class="p"><!----></div>

+</li>

+

+<li> No HTTP chunked output (but input is OK)

+<div class="p"><!----></div>

+</li>

+

+<li> No HTTP compressed output (but input is OK when compiled with <i>WITH_GZIP</i>)

+<div class="p"><!----></div>

+</li>

+

+<li> No send/recv timeouts

+<div class="p"><!----></div>

+</li>

+

+<li> No socket flags (no <i>soap.socket_flag, soap.connect_flag, soap.bind_flag, soap.accept_flag</i>)

+<div class="p"><!----></div>

+</li>

+

+<li> No canonical XML output

+<div class="p"><!----></div>

+</li>

+

+<li> No logging

+<div class="p"><!----></div>

+</li>

+

+<li> Limited TCP/IP and HTTP error diagnostic messages

+<div class="p"><!----></div>

+</li>

+

+<li> No support for <i>time_t</i> serialization

+<div class="p"><!----></div>

+</li>

+

+<li> No support for <i>LONG64</i>/<i>ULONG64</i> serialization (use <i><b>typedef</b>&nbsp;<b>long</b>&nbsp;xsd__long</i>)

+<div class="p"><!----></div>

+</li>

+</ul>

+Use <i>-DWITH_LEANER</i> to make the executable even smaller by removing DIME

+and MIME attachment handling, <i>wchar_t*</i> serialization, and support for XML DOM operations.

+Note that DIME/MIME attachments are not essential to achieve

+SOAP/XML interoperability.  DIME attachments are a convenient way to exchange

+non-text-based (i.e.&nbsp;binary) content, but are not required for basic SOAP/XML

+interoperability.  Attachment requirements are predictable.  That is,

+applications won't suddenly decide to use DIME or MIME instead of XML to exchange

+content.

+

+<div class="p"><!----></div>

+It is safe to try to compile your application with <i>-DWITH_LEAN</i>, provided

+that your application does not rely on I/O timeouts. When no linkage error

+occurs in the compilation process, it is safe to assume that your application

+will run just fine.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.31">

+18.31</a>&nbsp;&nbsp;<font color="#0000FF">How to Eliminate BSD Socket Library Linkage</font></h3><a name="sec:noio">

+</a>

+

+<div class="p"><!----></div>

+The <i>stdsoap2.c</i> and <i>stdsoap2.cpp</i> gSOAP runtime libraries should be linked with a BSD socket library in the project build, e.g. winsock for Win32. To eliminate the need to link a socket library, you can compile <i>stdsoap2.c</i> (for C) and <i>stdsoap2.cpp</i> (for C++) with the <i>-DWITH_NOIO</i> macro set (i.e.&nbsp;<i>#define WITH_NOIO</i>). This eliminates the dependency on the BSD socket API, IO streams, <i>FILE</i> type, and <i>errno</i>.

+

+<div class="p"><!----></div>

+As a consequence, you MUST define callbacks to replace the missing socket stack. To do so, add to your code the following definitions:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap soap; <br />

+soap_init(&amp;soap); <br />

+/* fsend is used to transmit data in blocks */ <br />

+soap.fsend = my_send; <br />

+/* frecv is used to receive data in blocks */ <br />

+soap.frecv = my_recv; <br />

+/* fopen is used to connect */ <br />

+soap.fopen = my_tcp_connect; <br />

+/* fclose is used to disconnect */ <br />

+soap.fclose = my_tcp_disconnect; <br />

+/* fclosesocket is used only to close the master socket in a server upon soap_done() */ <br />

+soap.fclosesocket = my_tcp_closesocket; <br />

+/* fshutdownsocket is used after completing a send operation to send TCP FIN */ <br />

+soap.fshutdownsocket = my_tcp_shutdownsocket; <br />

+/* setting fpoll is optional, leave it NULL to omit polling the server */ <br />

+soap.fpoll = my_poll; <br />

+/* faccept is used only by a server application */ <br />

+soap.faccept = my_accept;

+</td></tr></table><br></i>

+These functions are supposed to provide a (minimal) transport stack.

+See Section&nbsp;<a href="#sec:callback">18.7</a> for more details on the use of these callbacks.

+All callback function pointers should be non-NULL, except <i>fpoll</i>.

+

+<div class="p"><!----></div>

+You cannot use <i>soap_print_fault</i> and <i>soap_print_fault_location</i> to print error diagnostics. Instead, the value of <i>soap.error</i>, which contains the gSOAP error code, can be used to determine the cause of a fault.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.32">

+18.32</a>&nbsp;&nbsp;<font color="#0000FF">How to Combine Multiple Client and Server Implementations into one Executable</font></h3>

+

+<div class="p"><!----></div>

+The <i>wsdl2h</i> tool can be used to import multiple WSDLs and schemas at once.

+The service definitions are combined in one header file to be parsed by

+<i>soapcpp2</i>. It is important to assign namespace prefixes to namespace URIs

+using the <i>typemap.dat</i> file. Otherwise, <i>wsdl2h</i> will assign namespace

+prefixes <i>ns1</i>, <i>ns2</i>, and so on to the service operations and schema

+types. Thus, any change to a WSDL or schema may result in a new prefix

+assignment. For more details, please see Section&nbsp;<a href="#sec:typemap">7.2.11</a>.

+

+<div class="p"><!----></div>

+For example, consider the XMethods delayed stock quote and exchange rate services. We can import both WSDLs at once with:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>wsdl2h -s -o qx.h http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl http://www.xmethods.net/sd/2001/CurrencyExchangeService.wsdl</i>

+</td></tr></table><br></span>

+This generates the <i>qx.h</i> file for C++ (option -s for non-STL).  The

+next step is to use the <i>soapcpp2</i> compiler on this file to generate client

+code (option -C):

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>soapcpp2 -C qx.h</i>

+</td></tr></table><br></span>

+The resuling header file can be viewed with Doxygen to pretty-print the service definitions in HTML.

+

+<div class="p"><!----></div>

+You will notice that the <i>qx.h</i> file contains a very lengthy service

+name "net_x002exmethods_x002eservices_x002estockquote_x002eStockQuoteBinding".

+Since this is undesirable for naming files, operations, and proxies, we

+manually change its name into "StockQuote" and re-run <i>soapcpp2</i>.

+

+<div class="p"><!----></div>

+This gives us a couple of files we need to build the application in C++:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+soapStub.h <br />

+soapH.h <br />

+soapC.cpp <br />

+soapClient.cpp <br />

+soapStockQuoteProxy.h <br />

+soapCurrencyExchangeBindingProxy.h <br />

+StockQuote.nsmap

+</td></tr></table><br></span>

+The two .cpp files and <i>stdsoap2.cpp</i> are compiled and linked with the main application:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "soapStockQuoteProxy.h" <br />

+#include "soapCurrencyExchangeBindingProxy.h" <br />

+#include "StockQuote.nsmap" <br />

+main() <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;StockQuote stock; <br />

+&nbsp;&nbsp;&nbsp;CurrencyExchangeBinding exchange; <br />

+&nbsp;&nbsp;&nbsp;float quote, rate; <br />

+&nbsp;&nbsp;&nbsp;stock.ns1__getQuote("IBM", quote); // get quote for IBM <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(stock.soap<tt>-&gt;</tt>error) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(1); <br />

+&nbsp;&nbsp;&nbsp;exchange.ns2__getRate(&#252;s", &#252;k", rate); // get US to UK rate <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(exchange.soap<tt>-&gt;</tt>error) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(1); <br />

+&nbsp;&nbsp;&nbsp;cout <tt>&lt;&lt;</tt> "IBM in UK pounds = " <tt>&lt;&lt;</tt> rate*quote <tt>&lt;&lt;</tt> endl; <br />

+}

+</td></tr></table><br></i>

+This application prints the value of the IBM stock in UK pounds.

+

+<div class="p"><!----></div>

+Note that the prefixes <i>ns1</i> and <i>ns2</i> can be changed using the

+<i>typemap.dat</i> file for <i>wsdl2h</i>, see Section&nbsp;<a href="#sec:typemap">7.2.11</a>.

+

+<div class="p"><!----></div>

+Another approach to combine multiple client and service applications into one

+executable is by using C++ namespaces to logically separate the definitions or

+by creating C libraries for the client/server objects as explained in

+subsequent sections.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.33">

+18.33</a>&nbsp;&nbsp;<font color="#0000FF">How to Build a Client or Server in a C++ Code Namespace</font></h3><a name="sec:codenamespace">

+</a>

+

+<div class="p"><!----></div>

+You can use a C++ code namespace of your choice in your header file to build

+a client or server in that code namespace. In this way, you can create multiple

+clients and servers that can be combined and linked together without conflicts,

+which is explained in more detail in the next section (which also shows an

+example combining two client libraries defined in two C++ code namespaces).

+

+<div class="p"><!----></div>

+At most one namespace can be defined for the entire gSOAP header file. The code

+namespace MUST completely encapsulate the entire contents of the header file:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>namespace</b>&nbsp;myNamespaceName { <br />

+... gSOAP header file contents ... <br />

+}

+</td></tr></table><br></i>

+When compiling this header file with the gSOAP compiler, all type definitions,

+the (de)serializers for these types, and the stub/skeleton codes will be placed

+in this namespace. The XML namespace mapping table (saved in a <i>.nsmap</i>

+file) will not be placed in the code namespace to allow it to be linked as a

+global object. You can use option <i>-n</i> to create local XML namespace

+tables, see Section&nbsp;<a href="#sec:options">8.1</a> (but remember that you explicitly need to

+initialize the <i>soap.namespaces</i> to point to a table at run time). The

+generated files are prefixed with the code namespace name instead of the usual

+<i>soap</i> file name prefix to enable multiple client/server codes to be build

+in the same project directory (a code namespace automatically sets the <i>-p</i>

+compiler option, see Section&nbsp;<a href="#sec:options">8.1</a> for options).

+

+<div class="p"><!----></div>

+Because the SOAP Header and Fault serialization codes will also be placed in

+the namespace, they cannot be called from the <i>stdsoap2.cpp</i> run time

+library code and are therefore rendered unusable. Therefore, these serializers

+are not compiled at all (enforced with <i>#define WITH_NOGLOBAL</i>). To add SOAP

+Header and Fault serializers, you MUST compile them separately as follows.

+First, create a new header file <i>env.h</i> with the SOAP Header and Fault

+definitions.  You can leave this header file empty if you want to use the

+default SOAP Header and Fault. Then compile this header file with:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>soapcpp2 -penv env.h</i>

+</td></tr></table><br></span>

+The generated <i>envC.cpp</i> file holds the SOAP Header and Fault serializers and you can

+link this file with your client or server application.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.34">

+18.34</a>&nbsp;&nbsp;<font color="#0000FF">How to Create Client/Server Libraries</font></h3><a name="sec:dylibs">

+</a>

+

+<div class="p"><!----></div>

+The gSOAP compiler produces <i>soapClientLib.cpp</i> and <i>soapServerLib.cpp</i>

+codes that are specifically intended for building static or dynamic

+client/server libraries. These codes export the stubs and skeletons, but keep

+all marshaling code (i.e.&nbsp;parameter serializers and deserializers) local (i.e.&nbsp;

+as static functions) to avoid link symbol conflicts when combining multiple

+clients and/or servers into one executable. Note that it is far simpler to use

+the <i>wsdl2h</i> tool on multiple WSDL files to generate a header file that

+combines all service definitions. However, the approach presented in this

+section is useful when creating (dynamic) libraries for client and server

+objects, such as DLLs as described in Section&nbsp;<a href="#sec:dll">18.35</a>.

+

+<div class="p"><!----></div>

+To build multiple libraries in the same project directory, you can define a C++

+code namespace in your header file (see Section&nbsp;<a href="#sec:codenamespace">18.33</a>) or you

+can use <i>soapcpp2</i> with option <i>-p</i> to rename the generated

+<i>soapClientLib.cpp</i> and <i>soapServerLib.cpp</i> (and associated) files. The

+<i>-p</i> option specifies the file name prefix to replace the <i>soap</i>

+prefix.  The libraries don't have to be C++ codes. You can use option <i>-c</i>

+to generate C code. A clean separation of libraries can also be achieved with

+C++ code namespaces, see Section&nbsp;<a href="#sec:codenamespace">18.33</a>.

+

+<div class="p"><!----></div>

+The library codes do not define SOAP Header and Fault serializers.  You MUST

+add SOAP Header and Fault serializers to your application, which are compiled

+separately as follows.  First, create a new header file <i>env.h</i> with the

+SOAP Header and Fault definitions.  You can leave this header file empty if you

+want to use the default SOAP Header and Fault. Then compile this header file

+with:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>soapcpp2 -c -penv env.h</i>

+</td></tr></table><br></span>

+The generated <i>envC.cpp</i> file holds the SOAP Header and Fault serializers and you can

+create a (dynamic) library for it to link this code with your client or server application.

+

+<div class="p"><!----></div>

+You MUST compile the <i>stdsoap2.cpp</i> library using <i>-DWITH_NONAMESPACES</i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>g++ -DWITH_NONAMESPACES -c stdsoap2.cpp</i>

+</td></tr></table><br></span>

+This omits the reference to the global namespaces table, which is nowhere

+to be defined since we will use XML namespaces for each client/service separately. Therefore, you MUST explicitly set the

+namespaces value of the gSOAP environment in your code every time after initialization of the soap struct.

+

+<div class="p"><!----></div>

+For example, suppose we have two clients defined in header files <i>client1.h</i> and <i>client2.h</i>. We first generate the <i>envH.h</i> file for the SOAP Header and Fault definitions:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>soapcpp2 -c -penv env.h</i>

+</td></tr></table><br></span>

+Then we generate the code for client1 and client2:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>soapcpp2 -c -n -pmyClient1 client1.h</i> <br />

+<i>soapcpp2 -c -n -pmyClient2 client2.h</i>

+</td></tr></table><br></span>

+This generates <i>myClient1ClientLib.c</i> and <i>myClient2ClientLib.c</i> (among many other files).

+These two files should be compiled and linked with your application.

+The source code of your application should include the generated <i>envH.h</i>, <i>myClient1H.h</i>, <i>myClient2.h</i> files and <i>myClient1.nsmap</i>, <i>myClient2.nsmap</i> files:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "envH.h" // include this file first! <br />

+#include "myClient1H.h" // include client 1 stubs <br />

+#include "myClient2H.h" // include client 2 stubs <br />

+... <br />

+#include "myClient1H.nsmap" // include client 1 nsmap <br />

+#include "myClient2H.nsmap" // include client 2 nsmap <br />

+... <br />

+soap_init(&amp;soap); <br />

+soap_set_namespaces(&amp;soap, myClient1_namespaces); <br />

+... make Client 1 invocations ... <br />

+... <br />

+soap_set_namespaces(&amp;soap, myClient2_namespaces); <br />

+... make Client 2 invocations ...

+</td></tr></table><br></i>

+It is important to use <i>soapcpp2</i> option <i>-n</i>, see Section&nbsp;<a href="#sec:options">8.1</a>, to rename the namespace tables so we can include them all without running into redefinitions.

+

+<div class="p"><!----></div>

+Note: Link conflicts may still occur in the unlikely situation that identical remote method names are defined in

+two or more client stubs or server skeletons when these methods share the same XML namespace prefix.  You may have to use C++ code

+namespaces to avoid these link conflicts or rename the namespace prefixes used by the remote method defined in the header files.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc18.34.1">

+18.34.1</a>&nbsp;&nbsp;<font color="#0000FF">C++ Example</font></h4>

+

+<div class="p"><!----></div>

+As an example we will build a Delayed Stock Quote client library and a Currency Exchange Rate client library.

+

+<div class="p"><!----></div>

+First, we create an empty header file <i>env.h</i> (which may contain optional SOAP Header and Fault definitions), and compile it as follows:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>soapcpp2 -penv env.h</i> <br />

+<i>g++ -c envC.cpp</i> <br />

+</td></tr></table><br></span>

+We also compile <i>stdsoap2.cpp</i> without namespaces:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>g++ -c -DWITH_NONAMESPACES stdsoap2.cpp</i>

+</td></tr></table><br></span>

+Note: when you forget to use <i>-DWITH_NONAMESPACES</i> you will get an unresolved link error for the global <i>namespaces</i> table. You can define a dummy table to avoid having to recompile <i>stdsoap2.cpp</i>.

+

+<div class="p"><!----></div>

+Second, we create the Delayed Stock Quote header file specification, which may be obtained using the WSDL importer. If you want to use C++ namespaces then you need to manually add the <i><b>namespace</b></i> declaration to the generated header file:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>namespace</b>&nbsp;quote { <br />

+//gsoap ns service name: Service <br />

+//gsoap ns service style: rpc <br />

+//gsoap ns service encoding: encoded <br />

+//gsoap ns service location: http://services.xmethods.net/soap <br />

+//gsoap ns schema namespace: urn:xmethods-delayed-quotes <br />

+//gsoap ns service method-action: getQuote "" <br />

+<b>int</b>&nbsp;ns__getQuote(<b>char</b>&nbsp;*symbol, <b>float</b>&nbsp;&amp;Result); <br />

+}

+</td></tr></table><br></i>

+We then compile it as a library and we use option <i>-n</i> to rename the namespace table to avoid link conflicts later:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>soapcpp2 -n quote.h</i> <br />

+<i>g++ -c quoteClientLib.cpp</i>

+</td></tr></table><br></span>

+If you don't want to use a C++ code namespace, you should compile <i>quote.h</i> "as is" with soapcpp2 option <i>-pquote</i>:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>soapcpp2 -n -pquote quote.h</i> <br />

+<i>g++ -c quoteClientLib.cpp</i>

+</td></tr></table><br></span>

+Third, we create the Currency Exchange Rate header file specification:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>namespace</b>&nbsp;rate { <br />

+//gsoap ns service name: Service <br />

+//gsoap ns service style: rpc <br />

+//gsoap ns service encoding: encoded <br />

+//gsoap ns service location: http://services.xmethods.net/soap <br />

+//gsoap ns schema namespace: urn:xmethods-CurrencyExchange <br />

+//gsoap ns service method-action: getRate "" <br />

+<b>int</b>&nbsp;ns__getRate(<b>char</b>&nbsp;*country1, <b>char</b>&nbsp;*country2, <b>float</b>&nbsp;&amp;Result); <br />

+}

+</td></tr></table><br></i>

+Similar to the Quote example above, we compile it as a library and we use option <i>-n</i> to rename the namespace table to avoid link conflicts:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>soapcpp2 -n rate.h</i> <br />

+<i>g++ -c rateServerProxy.cpp</i> <br />

+</td></tr></table><br></span>

+Fourth, we consider linking the libraries to the main program.

+The main program can import the <i>quoteServiceProxy.h</i> and <i>rateServiceProxy.h</i> files to obtain client proxies to invoke the services. The proxy implementations are defined in the <i>quoteServiceProxy.cpp</i> and <i>rateServiceProxy.cpp</i> files compiled above.

+The <i>-n</i> option also affects the generation of the <i>quoteServiceProxy.cpp</i> and <i>rateServiceProxy.cpp</i> C++ proxy codes to ensure that the gSOAP environment is properly initialized with the appropriate namespace table (so you don't have to initialize explicitly - this feature is only available with C++ proxy and server object classes).

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "quoteServiceProxy.h" // get quote Service proxy <br />

+#include "rateServiceProxy.h" // get rate Service proxy <br />

+#include "quote.nsmap" // get quote namespace bindings <br />

+#include "rate.nsmap" // get rate namespace bindings <br />

+<b>int</b>&nbsp;main(<b>int</b>&nbsp;argc, <b>char</b>&nbsp;*argv[]) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(argc  &lt; = 1) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;std::cerr <tt>&lt;&lt;</tt> "Usage: main ticker [currency]" <tt>&lt;&lt;</tt> std::endl <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(0); <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;quote::Service quote; <br />

+&nbsp;&nbsp;&nbsp;<b>float</b>&nbsp;q; <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(quote.getQuote(argv[1], q)) // get quote <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(quote.soap, stderr); <br />

+&nbsp;&nbsp;&nbsp;<b>else</b><br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(argc  &gt;  2) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rate::Service rate; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>float</b>&nbsp;r; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(rate.getRate("us", argv[2], r)) // get rate in US dollars <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(rate.soap, stderr); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>else</b><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;q *= r; // convert the quote <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;std::cout <tt>&lt;&lt;</tt> argv[1] <tt>&lt;&lt;</tt> ": " <tt>&lt;&lt;</tt> q <tt>&lt;&lt;</tt> std::endl; <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;0; <br />

+}

+</td></tr></table><br></i>

+Compile and link this application with <i>stdsoap2.o</i>, <i>envC.o</i>, <i>quoteServerProxy.o</i>, and <i>rateServerProxy.o</i>.

+

+<div class="p"><!----></div>

+To compile and link a server object is very similar. For example, assume that we need to implement a calculator service and we want to create a library for it.

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>namespace</b>&nbsp;calc { <br />

+//gsoap ns service name: Service <br />

+//gsoap ns service style: rpc <br />

+//gsoap ns service encoding: encoded <br />

+//gsoap ns service location: http://www.cs.fsu.edu/&nbsp;engelen/calc.cgi <br />

+//gsoap ns schema namespace: urn:calc <br />

+<b>int</b>&nbsp;ns__add(<b>double</b>&nbsp;a, <b>double</b>&nbsp;b, <b>double</b>&nbsp;&amp;result); <br />

+<b>int</b>&nbsp;ns__sub(<b>double</b>&nbsp;a, <b>double</b>&nbsp;b, <b>double</b>&nbsp;&amp;result); <br />

+<b>int</b>&nbsp;ns__mul(<b>double</b>&nbsp;a, <b>double</b>&nbsp;b, <b>double</b>&nbsp;&amp;result); <br />

+<b>int</b>&nbsp;ns__div(<b>double</b>&nbsp;a, <b>double</b>&nbsp;b, <b>double</b>&nbsp;&amp;result); <br />

+}

+</td></tr></table><br></i>

+We compile this with:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>soapcpp2 -n calc.h</i> <br />

+<i>g++ -c calcServiceObject.cpp</i>

+</td></tr></table><br></span>

+The effect of the <i>-n</i> option is that it creates local namespace tables, and a modified <i>calcServiceObject.h</i> server class definitions that properly initialize the gSOAP run time with the table.

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "calcServiceObject.h" // get Service object <br />

+#include "calc.nsmap" // get calc namespace bindings <br />

+... <br />

+calc::Service calc; <br />

+calc.serve(); // calls request dispatcher to invoke one of the functions below <br />

+... <br />

+<b>int</b>&nbsp;calc::Service::add(<b>double</b>&nbsp;a, <b>double</b>&nbsp;b, <b>double</b>&nbsp;&amp;result); <br />

+{ result = a + b; <b>return</b>SOAP_OK; } <br />

+<b>int</b>&nbsp;calc::Service::sub(<b>double</b>&nbsp;a, <b>double</b>&nbsp;b, <b>double</b>&nbsp;&amp;result); <br />

+{ result = a - b; <b>return</b>SOAP_OK; } <br />

+<b>int</b>&nbsp;calc::Service::mul(<b>double</b>&nbsp;a, <b>double</b>&nbsp;b, <b>double</b>&nbsp;&amp;result); <br />

+{ result = a * b; <b>return</b>SOAP_OK; } <br />

+<b>int</b>&nbsp;calc::Service::div(<b>double</b>&nbsp;a, <b>double</b>&nbsp;b, <b>double</b>&nbsp;&amp;result); <br />

+{ result = a / b; <b>return</b>SOAP_OK; } <br />

+</td></tr></table><br></i>

+In fact, the <i>calc::Service</i> class is derived from the <i><b>struct</b>&nbsp;soap</i>. So the environment

+is available as <i>this</i>, which can be passed to all gSOAP functions that require a soap struct

+context.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc18.34.2">

+18.34.2</a>&nbsp;&nbsp;<font color="#0000FF">C Example</font></h4>

+

+<div class="p"><!----></div>

+This is the same example as above, but the clients are build with pure C.

+

+<div class="p"><!----></div>

+First, we create an empty header file (which may contain optional SOAP Header and Fault definitions), and compile it as follows:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>soapcpp2 -c -penv env.h</i> <br />

+<i>gcc -c envC.c</i> <br />

+</td></tr></table><br></span>

+We also compile <i>stdsoap2.c</i> without namespaces:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>gcc -c -DWITH_NONAMESPACES stdsoap2.c</i>

+</td></tr></table><br></span>

+Second, we create the Delayed Stock Quote header file specification, which may be obtained using the WSDL importer.

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap ns service name: Service <br />

+//gsoap ns service style: rpc <br />

+//gsoap ns service encoding: encoded <br />

+//gsoap ns service location: http://services.xmethods.net/soap <br />

+//gsoap ns schema namespace: urn:xmethods-delayed-quotes <br />

+//gsoap ns service method-action: getQuote "" <br />

+<b>int</b>&nbsp;ns__getQuote(<b>char</b>&nbsp;*symbol, <b>float</b>&nbsp;*Result);

+</td></tr></table><br></i>

+We compile it as a library and we use options <i>-n</i> and <i>-p</i> to rename the namespace table to avoid link conflicts:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>soapcpp2 -c -n -pquote quote.h</i> <br />

+<i>gcc -c quoteClientLib.c</i>

+</td></tr></table><br></span>

+Third, we create the Currency Exchange Rate header file specification:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+//gsoap ns service name: Service <br />

+//gsoap ns service style: rpc <br />

+//gsoap ns service encoding: encoded <br />

+//gsoap ns service location: http://services.xmethods.net/soap <br />

+//gsoap ns schema namespace: urn:xmethods-CurrencyExchange <br />

+//gsoap ns service method-action: getRate "" <br />

+<b>int</b>&nbsp;ns__getRate(<b>char</b>&nbsp;*country1, <b>char</b>&nbsp;*country2, <b>float</b>&nbsp;*Result);

+</td></tr></table><br></i>

+We compile it as a library and we use options <i>-n</i> and <i>-p</i> to rename the namespace table to avoid link conflicts:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>soapcpp2 -c -n -prate rate.h</i> <br />

+<i>gcc -c rateClientLib.c</i>

+</td></tr></table><br></span>

+The main program is:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "quoteStub.h" // get quote Service stub <br />

+#include "rateStub.h" // get rate Service stub <br />

+#include "quote.nsmap" // get quote namespace bindings <br />

+#include "rate.nsmap" // get rate namespace bindings <br />

+<b>int</b>&nbsp;main(<b>int</b>&nbsp;argc, <b>char</b>&nbsp;*argv[]) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(argc  &lt; = 1) <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, "Usage: main ticker [currency]\n"); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(0); <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;soap soap; <br />

+&nbsp;&nbsp;&nbsp;<b>float</b>&nbsp;q; <br />

+&nbsp;&nbsp;&nbsp;soap_init(&amp;soap); <br />

+&nbsp;&nbsp;&nbsp;soap_set_namespaces(&amp;soap, quote_namespaces); <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_call_ns__getQuote(&amp;soap, "http://services.xmethods.net/soap", "", argv[1], &amp;q)) // get quote <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); <br />

+&nbsp;&nbsp;&nbsp;<b>else</b><br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(argc  &gt;  2) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_set_namespaces(&amp;soap, rate_namespaces); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>float</b>&nbsp;r; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_call_ns__getRate(&amp;soap, "http://services.xmethods.net/soap", "", "us", argv[2], &amp;r)) // get rate in US dollars <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>else</b><br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;q *= r; // convert the quote <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf("%s: %f \n", argv[1], q); <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;0; <br />

+}

+</td></tr></table><br></i>

+Compile and link this application with <i>stdsoap2.o</i>, <i>envC.o</i>, <i>quoteClientLib.o</i>, and <i>rateClientLib.o</i>.

+

+<div class="p"><!----></div>

+To compile and link a server library is very similar. Assuming that the server is named "<i>calc</i>" (as specified with options <i>-n</i> and <i>-p</i>), the application needs to include the <i>calcStub.h</i> file, link the <i>calcServerLib.o</i> file, and call <i>calc_serve(&amp;soap)</i> function at run time.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.35">

+18.35</a>&nbsp;&nbsp;<font color="#0000FF">How to Create DLLs</font></h3><a name="sec:dll">

+</a>

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc18.35.1">

+18.35.1</a>&nbsp;&nbsp;<font color="#0000FF">Create the Base stdsoap2.dll</font></h4>

+

+<div class="p"><!----></div>

+First, create a new header file <i>env.h</i> with the SOAP Header and Fault

+definitions.  You can leave this header file empty if you want to use the

+default SOAP Header and Fault. Then compile this header file with:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i>soapcpp2 -penv env.h</i>

+</td></tr></table><br></span>

+The generated <i>envC.cpp</i> file holds the SOAP Header and Fault serializers, which need to be part of the base library functions.

+

+<div class="p"><!----></div>

+The next step is to create <i>stdsoap2.dll</i> which consists of the file

+<i>stdsoap2.cpp</i> and <i>envC.cpp</i>. This DLL contains all common functions

+needed for all other clients and servers based on gSOAP.  Compile

+<i>envC.cpp</i> and <i>stdsoap2.cpp</i> into <i>stdsoap2.dll</i> using the C++

+compiler option <i>-DWITH_NONAMESPACES</i> and the MSVC Pre-Processor

+definitions <i>SOAP_FMAC1=__declspec(dllexport)</i> and <i>SOAP_FMAC3=__declspec(dllexport)</i> (or you

+can compile with

+<i>-DWITH_SOAPDEFS_H</i> and put the macro definitions in <i>soapdefs.h</i>).

+This exports all functions which are preceded by the macro <i>SOAP_FMAC1</i> in

+the <i>soapcpp2.cpp</i> source file and macro <i>SOAP_FMAC3</i> in the <i>envC.cpp</i> source file.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc18.35.2">

+18.35.2</a>&nbsp;&nbsp;<font color="#0000FF">Creating Client and Server DLLs</font></h4>

+

+<div class="p"><!----></div>

+Compile the <i>soapClientLib.cpp</i> and <i>soapServerLib.cpp</i> sources as DLLs

+by using the MSVC Pre-Processor definitions <i>SOAP_FMAC5=__declspec(dllexport)</i> and <i>SOAP_CMAC=__(dllexport)</i>, and by using the C++ compiler option <i>-DWITH_NONAMESPACES</i>.

+This DLL links to <i>stdsoap2.dll</i>.

+

+<div class="p"><!----></div>

+To create multiple DLLs in the same project directory, you SHOULD use option

+<i>-p</i> to rename the generated <i>soapClientLib.cpp</i> and

+<i>soapServerLib.cpp</i> (and associated) files. The <i>-p</i> option specifies

+the file name prefix to replace the <i>soap</i> prefix.

+A clean separation of libraries can also be achieved with C++ namespaces, see Section&nbsp;<a href="#sec:codenamespace">18.33</a>.

+

+<div class="p"><!----></div>

+Unless you use the client proxy and server object classes (<i>soapXProxy.h</i> and <i>soapXObject.h</i> where <i>X</i> is the name of the service), all client and server applications MUST explicitly set the namespaces value of the gSOAP environment:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+soap_init(&amp;soap); <br />

+soap_set_namespaces(&amp;soap, namespaces);

+</td></tr></table><br></i>

+where the <i>namespaces[]</i> table should be defined in the client/server source. These tables are generated in the <i>.nsmap</i> files. You can rename the tables using option <i>-n</i>, see Section&nbsp;<a href="#sec:options">8.1</a>.

+

+<div class="p"><!----></div>

+	     <h3><a name="tth_sEc18.36">

+18.36</a>&nbsp;&nbsp;<font color="#0000FF">gSOAP Plug-ins</font></h3><a name="sec:plugins">

+</a>

+

+<div class="p"><!----></div>

+The gSOAP plug-in feature enables a convenient extension mechanism of gSOAP

+capabilities. When the plug-in registers with gSOAP, it has full access

+to the run-time settings and the gSOAP function callbacks.

+Upon registry, the plug-in's local data is associated with the gSOAP run-time.

+By overriding gSOAP's function callbacks with the plug-in's function callbacks,

+the plug-in can extend gSOAP's capabilities. The local plug-in data can be

+accessed through a lookup function, usually invoked within a callback function

+to access the plug-in data. 

+The registry and lookup functions are:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i><b>int</b>&nbsp;soap_register_plugin_arg(<b>struct</b>&nbsp;soap *soap, <b>int</b>&nbsp;(*fcreate)(<b>struct</b>&nbsp;soap *soap, <b>struct</b>&nbsp;soap_plugin *p, <b>void</b>&nbsp;*arg), <b>void</b>&nbsp;*arg)</i> <br />

+<i><b>void</b>* soap_lookup_plugin(<b>struct</b>&nbsp;soap*, <b>const</b>&nbsp;<b>char</b>*);</i>

+</td></tr></table><br></span>

+Other functions that deal with plug-ins are:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#D0D0D0"><tr><td><span class="roman">

+<i><b>int</b>&nbsp;soap_copy(<b>struct</b>&nbsp;soap *soap);</i> <br />

+<i><b>void</b>&nbsp;soap_done(<b>struct</b>&nbsp;soap *soap);</i>

+</td></tr></table><br></span>

+The <i>soap_copy</i> function returns a new dynamically allocated gSOAP

+environment that is a copy of another, such that no data is shared between the

+copy and the original environment. The <i>soap_copy</i> function invokes the

+plug-in copy callbacks to copy the plug-ins' local data.

+The <i>soap_copy</i> function returns a gSOAP error code or <i>SOAP_OK</i>.

+The <i>soap_done</i> function de-registers all plugin-ins, so this function

+should be called to cleanly terminate a gSOAP run-time environment.

+

+<div class="p"><!----></div>

+An example will be used to illustrate these functions.

+This example overrides the send and receive callbacks to copy all messages

+that are sent and received to the terminal (stderr).

+

+<div class="p"><!----></div>

+First, we write a header file <i>plugin.h</i> to define the local plug-in data

+structure(s) and we define a global name to identify the plug-in:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "stdsoap2.h" <br />

+#define PLUGIN_ID "PLUGIN-1.0" // some name to identify plugin <br />

+<b>struct</b>&nbsp;plugin_data // local plugin data <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>int</b>&nbsp;(*fsend)(<b>struct</b>&nbsp;soap*, <b>const</b>&nbsp;<b>char</b>*, size_t); // to save and use send callback <br />

+&nbsp;&nbsp;&nbsp;size_t (*frecv)(<b>struct</b>&nbsp;soap*, <b>char</b>*, size_t); // to save and use recv callback <br />

+}; <br />

+<b>int</b>&nbsp;plugin(<b>struct</b>&nbsp;soap *soap, <b>struct</b>&nbsp;soap_plugin *plugin, <b>void</b>&nbsp;*arg);

+</td></tr></table><br></i>

+Then, we write the plugin registry function and the callbacks:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "plugin.h" <br />

+<b>static</b>&nbsp;<b>const</b>&nbsp;<b>char</b>&nbsp;plugin_id[] = PLUGIN_ID; // the plugin id <br />

+<b>static</b>&nbsp;<b>int</b>&nbsp;plugin_init(<b>struct</b>&nbsp;soap *soap, <b>struct</b>&nbsp;plugin_data *data); <br />

+<b>static</b>&nbsp;<b>int</b>&nbsp;plugin_copy(<b>struct</b>&nbsp;soap *soap, <b>struct</b>&nbsp;soap_plugin *dst, <b>struct</b>&nbsp;soap_plugin *src); <br />

+<b>static</b>&nbsp;<b>void</b>&nbsp;plugin_delete(<b>struct</b>&nbsp;soap *soap, <b>struct</b>&nbsp;soap_plugin *p); <br />

+<b>static</b>&nbsp;<b>int</b>&nbsp;plugin_send(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*buf, size_t len); <br />

+<b>static</b>&nbsp;size_t plugin_recv(<b>struct</b>&nbsp;soap *soap, <b>char</b>&nbsp;*buf, size_t len); <br />

+// the registry function: <br />

+<b>int</b>&nbsp;plugin(<b>struct</b>&nbsp;soap *soap, <b>struct</b>&nbsp;soap_plugin *p, <b>void</b>&nbsp;*arg) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;p<tt>-&gt;</tt>id = plugin_id; <br />

+&nbsp;&nbsp;&nbsp;p<tt>-&gt;</tt>data = (<b>void</b>*)malloc(<b>sizeof</b>(<b>struct</b>&nbsp;plugin_data)); <br />

+&nbsp;&nbsp;&nbsp;p<tt>-&gt;</tt>fcopy = plugin_copy; /* optional: when set the plugin must copy its local data */<br />

+&nbsp;&nbsp;&nbsp;p<tt>-&gt;</tt>fdelete = plugin_delete; <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(p<tt>-&gt;</tt>data) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(plugin_init(soap, (<b>struct</b>&nbsp;plugin_data*)p<tt>-&gt;</tt>data)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(p<tt>-&gt;</tt>data); // error: could not init <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_EOM; // return error <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+} <br />

+<b>static</b>&nbsp;<b>int</b>&nbsp;plugin_init(<b>struct</b>&nbsp;soap *soap, <b>struct</b>&nbsp;plugin_data *data) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;data<tt>-&gt;</tt>fsend = soap<tt>-&gt;</tt>fsend; // save old recv callback <br />

+&nbsp;&nbsp;&nbsp;data<tt>-&gt;</tt>frecv = soap<tt>-&gt;</tt>frecv; // save old send callback <br />

+&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>fsend = plugin_send; // replace send callback with new <br />

+&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>frecv = plugin_recv; // replace recv callback with new <br />

+&nbsp;&nbsp;&nbsp;return SOAP_OK; <br />

+} <br />

+// copy plugin data, called by soap_copy()

+// This is important: we need a deep copy to avoid data sharing by two run-time environments <br />

+<b>static</b>&nbsp;<b>int</b>&nbsp;plugin_copy(<b>struct</b>&nbsp;soap *soap, struct soap_plugin *dst, <b>struct</b>&nbsp;soap_plugin *src) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!(dst<tt>-&gt;</tt>data = (<b>struct</b>&nbsp;plugin_data*)malloc(<b>sizeof</b>(<b>struct</b>&nbsp;plugin_data)))) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_EOM; <br />

+&nbsp;&nbsp;&nbsp;*dst<tt>-&gt;</tt>data = *src<tt>-&gt;</tt>data; <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+} <br />

+// plugin deletion, called by soap_done() <br />

+<b>static</b>&nbsp;<b>void</b>&nbsp;plugin_delete(<b>struct</b>&nbsp;soap *soap, <b>struct</b>&nbsp;soap_plugin *p) <br />

+{ free(p<tt>-&gt;</tt>data); // free allocated plugin data <br />

+} <br />

+// the new send callback <br />

+<b>static</b>&nbsp;<b>int</b>&nbsp;plugin_send(<b>struct</b>&nbsp;soap *soap, <b>const</b>&nbsp;<b>char</b>&nbsp;*buf, size_t len) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;plugin_data *data = (<b>struct</b>&nbsp;plugin_data*)soap_lookup_plugin(soap, plugin_id); // fetch plugin's local data <br />

+&nbsp;&nbsp;&nbsp;fwrite(buf, len, 1, stderr); // write message to stderr <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;data<tt>-&gt;</tt>fsend(soap, buf, len); // pass data on to old send callback <br />

+} <br />

+// the new receive callback <br />

+<b>static</b>&nbsp;size_t plugin_recv(<b>struct</b>&nbsp;soap *soap, <b>char</b>&nbsp;*buf, size_t len) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;plugin_data *data = (<b>struct</b>&nbsp;plugin_data*)soap_lookup_plugin(soap, plugin_id); // fetch plugin's local data <br />

+&nbsp;&nbsp;&nbsp;size_t res = data<tt>-&gt;</tt>frecv(soap, buf, len); // get data from old recv callback <br />

+&nbsp;&nbsp;&nbsp;fwrite(buf, res, 1, stderr); <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;res; <br />

+}

+</td></tr></table><br></i>

+The <i>fdelete</i> callback of <i><b>struct</b>&nbsp;soap_plugin</i>

+MUST be set to register the plugin. It is the responsibility of the plug-in to

+handle registry (init), copy, and deletion of the plug-in data and callbacks.

+

+<div class="p"><!----></div>

+A plugin is copied with the <i>soap_copy()</i> call. This function copies a soap struct

+and the chain of plugins. It is up to the plugin implementation to share the plugin data

+or not: 

+

+<ol type="1">

+<li> if the <i>fcopy()</i> callback is set by the plugin initialization, this callback will be called to allow

+the plugin to copy its local data upon a <i>soap_copy()</i> call. When <i>soap_done()</i> is called on

+the soap struct copy, the <i>fdelete()</i> callback is called for deallocation and cleanup of the local data.

+<div class="p"><!----></div>

+</li>

+

+<li>

+if the <i>fcopy()</i> callback is not set, then the plugin data

+will be shared (i.e. the data pointer points to the same address).

+The <i>fdelete()</i> callback will not be called upon a <i>soap_done()</i> on a

+copy of the soap struct. The <i>fdelete()</i> callback will be called for

+the original soap struct with which the plugin was registered.

+<div class="p"><!----></div>

+</li>

+</ol>

+The example plug-in should be used as follows:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>struct</b>&nbsp;soap soap; <br />

+soap_init(&amp;soap); <br />

+soap_register_plugin(&amp;soap, plugin); <br />

+... <br />

+soap_done(&amp;soap);

+</td></tr></table><br></i>

+Note: <i>soap_register_plugin(...)</i> is an alias for

+<i>soap_register_plugin_arg(..., NULL)</i>. That is, it passes NULL as an

+argument to plug-in's registry callback.

+

+<div class="p"><!----></div>

+A number of example plug-ins are included in the gSOAP package's <i>plugin</i> directory. Some of these plug-ins are discussed.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc18.36.1">

+18.36.1</a>&nbsp;&nbsp;<font color="#0000FF">The Message Logging and Statistics Plug-in</font></h4>

+

+<div class="p"><!----></div>

+The message logging and access statistics plug-in can be used to selectively log inbound and outbound messages to a file or stream. It also keeps access statistics to log the total number of bytes sent and received.

+

+<div class="p"><!----></div>

+To use the plug-in, compile and link your application with <i>logging.c</i> located in the <i>plugin</i> directory of the package.

+To enable the plug-in in your code, register the plug-in and set the streams as follows:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "logging.h" <br />

+... <br />

+<b>if</b>&nbsp;(soap_register_plugin(&amp;soap, logging)) <br />

+&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); // failed to register <br />

+... <br />

+<b>struct</b>&nbsp;logging_data *logdata; <br />

+logdata = (<b>struct</b>&nbsp;logging_data*)soap_lookup_plugin(&amp;soap, logging_id); <br />

+<b>if</b>&nbsp;(!logdata) <br />

+&nbsp;&nbsp;&nbsp;... // if the plug-in registered OK, there is certainly data but can't hurt to check <br />

+logdata<tt>-&gt;</tt>inbound = stdout; // log to stdout <br />

+logdata<tt>-&gt;</tt>outbound = stdout; // log to stdout <br />

+... process messages ... <br />

+logdata<tt>-&gt;</tt>inbound = NULL; // don't log <br />

+logdata<tt>-&gt;</tt>outbound = NULL; // don't log <br />

+... process messages ... <br />

+size_t bytes_in = logdata<tt>-&gt;</tt>stat_recv; <br />

+size_t bytes_out = logdata<tt>-&gt;</tt>stat_sent;

+</td></tr></table><br></i>

+If you use <i>soap_copy</i> to copy the soap struct with the plug-in, the plug-in's data will be shared by the copy.

+Therefore, the statistics are not 100% guaranteed to be accurate for multi-threaded services since race conditions on the counters may occur. Mutex is not used to update the counters to avoid introducing expensive synchronization points. If 100% server-side accuracy is required, add mutex at the points indicated in the <i>logging.c</i> code.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc18.36.2">

+18.36.2</a>&nbsp;&nbsp;<font color="#0000FF">The HTTP GET Plug-in</font></h4>

+

+<div class="p"><!----></div>

+The HTTP GET plug-in allows your server to handle HTTP GET requests as well as SOAP-based POST request.

+HTTP GET requests can also be handled with the <i>fget</i> callback, see Section&nbsp;<a href="#sec:callback">18.7</a>. However, the HTTP GET plug-in also keeps statistics on the number of successful POST and GET exchanges and failed operations (HTTP faults, SOAP Faults, etc.). It also keeps hit histograms accumulated for up to a year.

+

+<div class="p"><!----></div>

+To use the plug-in, compile and link your application with <i>httpget.c</i> located in the <i>plugin</i> directory of the package.

+To enable the plug-in in your code, register the plug-in with your HTTP GET handler function as follows:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "httpget.h" <br />

+... <br />

+<b>if</b>&nbsp;(soap_register_plugin_arg(&amp;soap, httpget, (<b>void</b>*)my_http_get_handler)) <br />

+&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); // failed to register <br />

+... <br />

+<b>struct</b>&nbsp;http_get_data *httpgetdata; <br />

+httpgetdata = (<b>struct</b>&nbsp;http_get_data*)soap_lookup_plugin(&amp;soap, http_get_id); <br />

+<b>if</b>&nbsp;(!httpgetdata) <br />

+&nbsp;&nbsp;&nbsp;... // if the plug-in registered OK, there is certainly data but can't hurt to check <br />

+... process messages ... <br />

+size_t get_ok = httpgetdata<tt>-&gt;</tt>stat_get; <br />

+size_t post_ok = httpgetdata<tt>-&gt;</tt>stat_post; <br />

+size_t errors = httpgetdata<tt>-&gt;</tt>stat_fail; <br />

+... <br />

+time_t now = time(NULL); <br />

+<b>struct</b>&nbsp;tm *T; <br />

+T = localtime(&amp;now); <br />

+size_t hitsthisminute = httpgetdata<tt>-&gt;</tt>min[T<tt>-&gt;</tt>tm_min]; <br />

+size_t hitsthishour = httpgetdata<tt>-&gt;</tt>hour[T<tt>-&gt;</tt>tm_hour]; <br />

+size_t hitstoday = httpgetdata<tt>-&gt;</tt>day[T<tt>-&gt;</tt>tm_yday];

+</td></tr></table><br></i>

+An HTTP GET handler can simply produce HTML content, or any other type of information:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+<b>int</b>&nbsp;my_http_get_handler(<b>struct</b>&nbsp;soap) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>http_content = "text/html"; <br />

+&nbsp;&nbsp;&nbsp;soap_response(soap, SOAP_FILE); <br />

+&nbsp;&nbsp;&nbsp;soap_send(soap, &#171;html&#62;Hello&lt;/html&#62;"); <br />

+&nbsp;&nbsp;&nbsp;soap_end_send(soap); <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; // return SOAP_OK or HTTP error code, e.g. 404 <br />

+}

+</td></tr></table><br></i>

+If you use <i>soap_copy</i> to copy the soap struct with the plug-in, the plug-in's data will be shared by the copy.

+Therefore, the statistics are not 100% guaranteed to be accurate for multi-threaded services since race conditions on the counters may occur. Mutex is not used to update the counters to avoid introducing expensive synchronization points. If 100% server-side accuracy is required, add mutex at the points indicated in the <i>httpget.c</i> code.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc18.36.3">

+18.36.3</a>&nbsp;&nbsp;<font color="#0000FF">The HTTP MD5 Plug-in</font></h4>

+

+<div class="p"><!----></div>

+The HTTP MD5 plug-in works in the background to automatically verify the

+content of messages using MD5 checksums. With the plug-in, messages can be

+transferred over (trusted but) unreliable connections. The plug-in can be used

+on the client side and server side.

+

+<div class="p"><!----></div>

+To use the plug-in, compile and link your application with <i>httpmd5.c</i> and <i>md5evp.c</i> located in the <i>plugin</i> directory of the package. The <i>md5evp.c</i> implementation uses the EVP interface to compute MD5 checksums with OpenSSL (compiled with <i>-DWITH_OPENSSL</i>).

+

+<div class="p"><!----></div>

+To enable the plug-in in your code, register the plug-in as follows:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "httpmd5.h" <br />

+... <br />

+<b>if</b>&nbsp;(soap_register_plugin(&amp;soap, http_md5)) <br />

+&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); // failed to register

+</td></tr></table><br></i>

+Once registered, MD5 checksums are produced for all outbound messages. Inbound messages with MD5 checksums in the HTTP header are automatically verified.

+

+<div class="p"><!----></div>

+The plug-in requires you to set the <i>SOAP_IO_STORE</i> flag when sending SOAP with attachments:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "httpmd5.h" <br />

+... <br />

+<b>struct</b>&nbsp;soap soap; <br />

+soap_init1(&amp;soap, SOAP_IO_STORE); <br />

+<b>if</b>&nbsp;(soap_register_plugin(&amp;soap, http_md5) <br />

+&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); // failed to register <br />

+... now safe to send SOAP with attachments ...

+</td></tr></table><br></i>

+Unfortunately, this eliminates streaming.

+

+<div class="p"><!----></div>

+		      <h4><a name="tth_sEc18.36.4">

+18.36.4</a>&nbsp;&nbsp;<font color="#0000FF">The HTTP Digest Authentication Plug-in</font></h4>

+

+<div class="p"><!----></div>

+The HTTP digest authentication plug-in enables a more secure authentication

+scheme compared to basic authentication. HTTP basic authentication sends

+unencrypted userids and passwords over the net, while digest authentication

+does not exchange passwords but exchanges checksums of passwords (and other

+data such as nonces to avoid replay attacks). For more details, please see

+RFC 2617.

+

+<div class="p"><!----></div>

+The HTTP digest authentication can be used next to the built-in basic

+authentication, or basic authentication can be rejected to tighten security.

+The server must have a database with userid's and passwords (in plain text

+form). The client, when challenged by the server, checks the authentication

+realm provided by the server and sets the userid and passwords for digest

+authentication. The client application can temporarily store the userid and

+password for a sequence of message exchanges with the server, which is faster

+than repeated authorization challenges and authentication responses.

+

+<div class="p"><!----></div>

+At the client side, the plug-in is registered and service invocations are

+checked for authorization challenges (HTTP error code 401). When the server

+challenges the client, the client should set the userid and password and retry

+the invocation. The client can determine the userid and password based on the

+authentication realm part of the server's challenge. The authentication information can be temporarily saved for multiple invocations.

+

+<div class="p"><!----></div>

+Client-side example:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "httpda.h" <br />

+... <br />

+<b>if</b>&nbsp;soap_register_plugin(&amp;soap, http_da)) <br />

+&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); // failed to register <br />

+... <br />

+<b>if</b>&nbsp;(soap_call_ns__method(&amp;soap, ...) != SOAP_OK) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap.error == 401) // challenge: HTTP authentication required <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!strcmp(soap.authrealm, authrealm)) // determine authentication realm

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>struct</b>&nbsp;http_da_info info; // to store userid and passwd <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;http_da_save(&amp;soap, &amp;info, authrealm, userid, passwd); // set userid and passwd for this realm<br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap_call_ns__method(&amp;soap, ...) == SOAP_OK) // retry <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ ... <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soap_end(&amp;soap); // userid and passwd were deallocated <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;http_da_restore(&amp;soap, &amp;info); // restore userid and passwd <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!soap_call_ns__method(&amp;soap, ...) == SOAP_OK) // another call <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;http_da_release(&amp;soap, &amp;info); // remove userid and passwd

+</td></tr></table><br></i>

+This code supports both basic and digest authentication.

+

+<div class="p"><!----></div>

+The server can challenge a client using HTTP code 401. With the plug-in, HTTP digest authentication challenges are send. Without the plug-in, basic authentication challenges are send.

+

+<div class="p"><!----></div>

+Each server method can implement authentication as desired and may enforce

+digest authentication or may also accept basic authentication responses. To

+verify digest authentication responses, the server should compute and compare

+the checksums using the plug-in's <i>http_da_verify_post</i> function for

+HTTP POST requests (and <i>http_da_verify_get</i> for HTTP GET requests with

+the HTTP GET plugin) as follows:

+<br><br><table border=0 width="100%" cellpadding="8" bgcolor="#B0D0B0"><tr><td><i>

+#include "httpda.h" <br />

+... <br />

+<b>if</b>&nbsp;(soap_register_plugin(&amp;soap, http_da)) <br />

+&nbsp;&nbsp;&nbsp;soap_print_fault(&amp;soap, stderr); // failed to register <br />

+... <br />

+soap_serve(&amp;soap); <br />

+... <br />

+<b>int</b>&nbsp;ns__method(<b>struct</b>&nbsp;soap *soap, ...) <br />

+{ <br />

+&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(soap<tt>-&gt;</tt>userid &amp;&amp; soap<tt>-&gt;</tt>passwd) // client used basic authentication

+&nbsp;&nbsp;&nbsp;{ // may decide not to handle, but if ok then go ahead and compare info:

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!strcmp(soap<tt>-&gt;</tt>userid, userid) &amp;&amp; !strcmp(soap<tt>-&gt;</tt>passwd, passwd)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ ... handle request ... <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;<b>else</b>&nbsp;<b>if</b>&nbsp;(soap<tt>-&gt;</tt>authrealm &amp;&amp; soap<tt>-&gt;</tt>userid) // Digest authentication <br />

+&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;passwd = ... // database lookup on userid and authrealm to find passwd <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!strcmp(soap<tt>-&gt;</tt>authrealm, authrealm) &amp;&amp; !strcmp(soap<tt>-&gt;</tt>userid, userid)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(!http_da_verify_post(soap, passwd)) <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ ... handle request ... <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;SOAP_OK; <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;} <br />

+&nbsp;&nbsp;&nbsp;soap<tt>-&gt;</tt>authrealm = authrealm; // set realm for challenge <br />

+&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;401; // Not authorized, challenge digest authentication <br />

+}

+</td></tr></table><br></i>

+

+<div class="p"><!----></div>

+</body>

+

+<br /><br /><hr /><small>File translated from

+T<sub><font size="-1">E</font></sub>X

+by <a href="http://hutchinson.belmont.ma.us/tth/">

+T<sub><font size="-1">T</font></sub>H</a>,

+version 3.72.<br />On 19 Feb 2006, 11:36.</small>

+</html>

diff --git a/doc/soapdoc2.pdf b/doc/soapdoc2.pdf
new file mode 100644
index 0000000..de69ce3
--- /dev/null
+++ b/doc/soapdoc2.pdf
Binary files differ
diff --git a/doc/uddi2/html/annotated.html b/doc/uddi2/html/annotated.html
new file mode 100644
index 0000000..dd96204
--- /dev/null
+++ b/doc/uddi2/html/annotated.html
@@ -0,0 +1,98 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Class List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindexHL" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>gSOAP UDDI v2 Class List</h1>Here are the classes, structs, unions and interfaces with brief descriptions:<table>

+  <tr><td class="indexkey"><a class="el" href="class__disposition_report.html">_dispositionReport</a></td><td class="indexvalue">The SOAP Fault Detail element contains one of the following types serialized </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____access_point.html">uddi2__accessPoint</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"accessPoint" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html">uddi2__add_USCOREpublisherAssertions</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"add_publisherAssertions" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____address.html">uddi2__address</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"address" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____address_line.html">uddi2__addressLine</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"addressLine" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____assertion_status_item.html">uddi2__assertionStatusItem</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"assertionStatusItem" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____assertion_status_report.html">uddi2__assertionStatusReport</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"assertionStatusReport" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____auth_token.html">uddi2__authToken</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"authToken" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"bindingDetail" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____binding_template.html">uddi2__bindingTemplate</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"bindingTemplate" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____binding_templates.html">uddi2__bindingTemplates</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"bindingTemplates" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____business_detail.html">uddi2__businessDetail</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"businessDetail" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____business_detail_ext.html">uddi2__businessDetailExt</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"businessDetailExt" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"businessEntity" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____business_entity_ext.html">uddi2__businessEntityExt</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"businessEntityExt" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____business_info.html">uddi2__businessInfo</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"businessInfo" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____business_infos.html">uddi2__businessInfos</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"businessInfos" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____business_list.html">uddi2__businessList</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"businessList" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____business_service.html">uddi2__businessService</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"businessService" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____business_services.html">uddi2__businessServices</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"businessServices" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____category_bag.html">uddi2__categoryBag</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"categoryBag" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____contact.html">uddi2__contact</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"contact" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____contacts.html">uddi2__contacts</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"contacts" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html">uddi2__delete_USCOREbinding</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"delete_binding" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html">uddi2__delete_USCOREbusiness</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"delete_business" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html">uddi2__delete_USCOREpublisherAssertions</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"delete_publisherAssertions" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html">uddi2__delete_USCOREservice</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"delete_service" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html">uddi2__delete_USCOREtModel</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"delete_tModel" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____description.html">uddi2__description</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"description" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html">uddi2__discard_USCOREauthToken</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"discard_authToken" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____discovery_u_r_l.html">uddi2__discoveryURL</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"discoveryURL" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____discovery_u_r_ls.html">uddi2__discoveryURLs</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"discoveryURLs" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"dispositionReport" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____email.html">uddi2__email</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"email" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____err_info.html">uddi2__errInfo</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"errInfo" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html">uddi2__find_USCOREbinding</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"find_binding" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html">uddi2__find_USCOREbusiness</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"find_business" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html">uddi2__find_USCORErelatedBusinesses</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"find_relatedBusinesses" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html">uddi2__find_USCOREservice</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"find_service" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html">uddi2__find_USCOREtModel</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"find_tModel" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____find_qualifiers.html">uddi2__findQualifiers</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"findQualifiers" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html">uddi2__get_USCOREassertionStatusReport</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"get_assertionStatusReport" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html">uddi2__get_USCOREauthToken</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"get_authToken" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html">uddi2__get_USCOREbindingDetail</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"get_bindingDetail" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html">uddi2__get_USCOREbusinessDetail</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"get_businessDetail" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html">uddi2__get_USCOREbusinessDetailExt</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"get_businessDetailExt" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html">uddi2__get_USCOREpublisherAssertions</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"get_publisherAssertions" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html">uddi2__get_USCOREregisteredInfo</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"get_registeredInfo" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html">uddi2__get_USCOREserviceDetail</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"get_serviceDetail" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html">uddi2__get_USCOREtModelDetail</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"get_tModelDetail" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____hosting_redirector.html">uddi2__hostingRedirector</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"hostingRedirector" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____identifier_bag.html">uddi2__identifierBag</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"identifierBag" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____instance_details.html">uddi2__instanceDetails</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"instanceDetails" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"keyedReference" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____keys_owned.html">uddi2__keysOwned</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"keysOwned" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____name.html">uddi2__name</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"name" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____overview_doc.html">uddi2__overviewDoc</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"overviewDoc" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____phone.html">uddi2__phone</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"phone" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____publisher_assertion.html">uddi2__publisherAssertion</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"publisherAssertion" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____publisher_assertions.html">uddi2__publisherAssertions</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"publisherAssertions" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____registered_info.html">uddi2__registeredInfo</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"registeredInfo" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____related_businesses_list.html">uddi2__relatedBusinessesList</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"relatedBusinessesList" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____related_business_info.html">uddi2__relatedBusinessInfo</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"relatedBusinessInfo" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____related_business_infos.html">uddi2__relatedBusinessInfos</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"relatedBusinessInfos" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____result.html">uddi2__result</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"result" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html">uddi2__save_USCOREbinding</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"save_binding" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html">uddi2__save_USCOREbusiness</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"save_business" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html">uddi2__save_USCOREservice</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"save_service" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html">uddi2__save_USCOREtModel</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"save_tModel" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____service_detail.html">uddi2__serviceDetail</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"serviceDetail" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____service_info.html">uddi2__serviceInfo</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"serviceInfo" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____service_infos.html">uddi2__serviceInfos</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"serviceInfos" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____service_list.html">uddi2__serviceList</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"serviceList" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html">uddi2__set_USCOREpublisherAssertions</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"set_publisherAssertions" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____shared_relationships.html">uddi2__sharedRelationships</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"sharedRelationships" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____t_model.html">uddi2__tModel</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"tModel" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____t_model_bag.html">uddi2__tModelBag</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"tModelBag" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____t_model_detail.html">uddi2__tModelDetail</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"tModelDetail" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____t_model_info.html">uddi2__tModelInfo</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"tModelInfo" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____t_model_infos.html">uddi2__tModelInfos</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"tModelInfos" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____t_model_instance_details.html">uddi2__tModelInstanceDetails</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"tModelInstanceDetails" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____t_model_instance_info.html">uddi2__tModelInstanceInfo</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"tModelInstanceInfo" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____t_model_list.html">uddi2__tModelList</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"tModelList" </td></tr>

+  <tr><td class="indexkey"><a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html">uddi2__validate_USCOREvalues</a></td><td class="indexvalue">Schema urn:uddi-org:api_v2:"validate_values" </td></tr>

+</table>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/class__disposition_report-members.html b/doc/uddi2/html/class__disposition_report-members.html
new file mode 100644
index 0000000..ca49b56
--- /dev/null
+++ b/doc/uddi2/html/class__disposition_report-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>_dispositionReport Member List</h1>This is the complete list of members for <a class="el" href="class__disposition_report.html">_dispositionReport</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="class__disposition_report.html#o1">soap</a></td><td><a class="el" href="class__disposition_report.html">_dispositionReport</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="class__disposition_report.html#o0">uddi2__dispositionReport_</a></td><td><a class="el" href="class__disposition_report.html">_dispositionReport</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/class__disposition_report.html b/doc/uddi2/html/class__disposition_report.html
new file mode 100644
index 0000000..002e295
--- /dev/null
+++ b/doc/uddi2/html/class__disposition_report.html
@@ -0,0 +1,77 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: _dispositionReport Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>_dispositionReport Class Reference</h1>The SOAP Fault Detail element contains one of the following types serialized.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="class__disposition_report-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class__disposition_report.html#o0">uddi2__dispositionReport_</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="class__disposition_report.html#o1">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class__disposition_report.html#o1">soap</a></td></tr>

+

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+The SOAP Fault Detail element contains one of the following types serialized. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o1" doxytag="_dispositionReport::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="class__disposition_report.html#o1">soap</a>* <a class="el" href="class__disposition_report.html#o1">_dispositionReport::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="_dispositionReport::uddi2__dispositionReport_" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a>* <a class="el" href="class__disposition_report.html#o0">_dispositionReport::uddi2__dispositionReport_</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____access_point-members.html b/doc/uddi2/html/classuddi2____access_point-members.html
new file mode 100644
index 0000000..c26aaa9
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____access_point-members.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__accessPoint Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____access_point.html">uddi2__accessPoint</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____access_point.html#o0">__item</a></td><td><a class="el" href="classuddi2____access_point.html">uddi2__accessPoint</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____access_point.html#o2">soap</a></td><td><a class="el" href="classuddi2____access_point.html">uddi2__accessPoint</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____access_point.html#o1">URLType</a></td><td><a class="el" href="classuddi2____access_point.html">uddi2__accessPoint</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____access_point.html b/doc/uddi2/html/classuddi2____access_point.html
new file mode 100644
index 0000000..ff31b9b
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____access_point.html
@@ -0,0 +1,108 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__accessPoint Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__accessPoint Class Reference</h1>Schema urn:uddi-org:api_v2:"accessPoint".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____access_point-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____access_point.html#o0">__item</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>enum <a class="el" href="uddi__v2_8h.html#a49">uddi2__URLType</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____access_point.html#o1">URLType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute URLType of type "urn:uddi-org:api_v2":URLType.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____access_point.html#o2">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____access_point.html#o2">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o2"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"accessPoint". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__accessPoint::__item" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____access_point.html#o0">uddi2__accessPoint::__item</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__accessPoint::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____access_point.html#o2">soap</a>* <a class="el" href="classuddi2____access_point.html#o2">uddi2__accessPoint::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__accessPoint::URLType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> enum <a class="el" href="uddi__v2_8h.html#a49">uddi2__URLType</a> <a class="el" href="classuddi2____access_point.html#o1">uddi2__accessPoint::URLType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute URLType of type "urn:uddi-org:api_v2":URLType. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____add___u_s_c_o_r_epublisher_assertions-members.html b/doc/uddi2/html/classuddi2____add___u_s_c_o_r_epublisher_assertions-members.html
new file mode 100644
index 0000000..fe988d4
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____add___u_s_c_o_r_epublisher_assertions-members.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__add_USCOREpublisherAssertions Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html">uddi2__add_USCOREpublisherAssertions</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o0">authInfo</a></td><td><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html">uddi2__add_USCOREpublisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o2">generic</a></td><td><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html">uddi2__add_USCOREpublisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o1">publisherAssertion</a></td><td><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html">uddi2__add_USCOREpublisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#a2">send</a>(const char *endpoint, char *authInfo)</td><td><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html">uddi2__add_USCOREpublisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o3">soap</a></td><td><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html">uddi2__add_USCOREpublisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#a0">uddi2__add_USCOREpublisherAssertions</a>(struct soap *)</td><td><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html">uddi2__add_USCOREpublisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#a1">uddi2__add_USCOREpublisherAssertions</a>(struct soap *, std::vector&lt; uddi2__publisherAssertion * &gt; publisherAssertions)</td><td><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html">uddi2__add_USCOREpublisherAssertions</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____add___u_s_c_o_r_epublisher_assertions.html b/doc/uddi2/html/classuddi2____add___u_s_c_o_r_epublisher_assertions.html
new file mode 100644
index 0000000..71e184f
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____add___u_s_c_o_r_epublisher_assertions.html
@@ -0,0 +1,280 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__add_USCOREpublisherAssertions Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__add_USCOREpublisherAssertions Class Reference</h1>Schema urn:uddi-org:api_v2:"add_publisherAssertions".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____add___u_s_c_o_r_epublisher_assertions-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#a0">uddi2__add_USCOREpublisherAssertions</a> (struct <a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o3">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#a1">uddi2__add_USCOREpublisherAssertions</a> (struct <a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o3">soap</a> *, std::vector&lt; <a class="el" href="classuddi2____publisher_assertion.html">uddi2__publisherAssertion</a> * &gt; publisherAssertions)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#a2">send</a> (const char *endpoint, char *<a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o0">authInfo</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o0">authInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":authInfo.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____publisher_assertion.html">uddi2__publisherAssertion</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o1">publisherAssertion</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__publisherAssertion* with length 0..unbounded.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o2">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o3">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o3">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o3"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"add_publisherAssertions". 

+<p>

+Represents a request to add one or more publisher assertions to the assertion collection for an individual publisher.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137731">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137731</a> 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__add_USCOREpublisherAssertions::uddi2__add_USCOREpublisherAssertions" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__add_USCOREpublisherAssertions::uddi2__add_USCOREpublisherAssertions           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the add_USCOREpublisherAssertions class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi2__add_USCOREpublisherAssertions::uddi2__add_USCOREpublisherAssertions" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__add_USCOREpublisherAssertions::uddi2__add_USCOREpublisherAssertions           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>std::vector&lt; <a class="el" href="classuddi2____publisher_assertion.html">uddi2__publisherAssertion</a> * &gt;&nbsp;</td>

+          <td class="mdname" nowrap> <em>publisherAssertions</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>publisherAssertions</em>&nbsp;</td><td>collection of publisher assertions</td></tr>

+  </table>

+</dl>

+Creates an instance of the add_USCOREpublisherAssertions class using the specified publisher assertions.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a2" doxytag="uddi2__add_USCOREpublisherAssertions::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> * uddi2__add_USCOREpublisherAssertions::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>endpoint</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>authInfo</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>authInfo</em>&nbsp;</td><td>authorization token provided by the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> object or NULL on error</dd></dl>

+Send a request to a UDDI server to add one or more publisher assertions to the assertion collection for an individual publisher.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__add_USCOREpublisherAssertions::authInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o0">uddi2__add_USCOREpublisherAssertions::authInfo</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":authInfo. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__add_USCOREpublisherAssertions::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o2">uddi2__add_USCOREpublisherAssertions::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__add_USCOREpublisherAssertions::publisherAssertion" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____publisher_assertion.html">uddi2__publisherAssertion</a>*&gt; <a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o1">uddi2__add_USCOREpublisherAssertions::publisherAssertion</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__publisherAssertion* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__add_USCOREpublisherAssertions::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o3">soap</a>* <a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o3">uddi2__add_USCOREpublisherAssertions::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____address-members.html b/doc/uddi2/html/classuddi2____address-members.html
new file mode 100644
index 0000000..34334ad
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____address-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__address Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____address.html">uddi2__address</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____address.html#o0">addressLine</a></td><td><a class="el" href="classuddi2____address.html">uddi2__address</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____address.html#o4">soap</a></td><td><a class="el" href="classuddi2____address.html">uddi2__address</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____address.html#o2">sortCode</a></td><td><a class="el" href="classuddi2____address.html">uddi2__address</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____address.html#o3">tModelKey</a></td><td><a class="el" href="classuddi2____address.html">uddi2__address</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____address.html#o1">useType</a></td><td><a class="el" href="classuddi2____address.html">uddi2__address</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____address.html b/doc/uddi2/html/classuddi2____address.html
new file mode 100644
index 0000000..b80edab
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____address.html
@@ -0,0 +1,167 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__address Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__address Class Reference</h1>Schema urn:uddi-org:api_v2:"address".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____address-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____address_line.html">uddi2__addressLine</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____address.html#o0">addressLine</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__addressLine* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____address.html#o1">useType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute useType of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____address.html#o2">sortCode</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute sortCode of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a5">uddi2__tModelKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____address.html#o3">tModelKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____address.html#o4">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____address.html#o4">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o4"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"address". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__address::addressLine" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____address_line.html">uddi2__addressLine</a>* &gt; <a class="el" href="classuddi2____address.html#o0">uddi2__address::addressLine</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__addressLine* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__address::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____address.html#o4">soap</a>* <a class="el" href="classuddi2____address.html#o4">uddi2__address::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__address::sortCode" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____address.html#o2">uddi2__address::sortCode</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute sortCode of type xs:string. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__address::tModelKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a5">uddi2__tModelKey</a> <a class="el" href="classuddi2____address.html#o3">uddi2__address::tModelKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__address::useType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____address.html#o1">uddi2__address::useType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute useType of type xs:string. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____address_line-members.html b/doc/uddi2/html/classuddi2____address_line-members.html
new file mode 100644
index 0000000..3990a4e
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____address_line-members.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__addressLine Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____address_line.html">uddi2__addressLine</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____address_line.html#o0">__item</a></td><td><a class="el" href="classuddi2____address_line.html">uddi2__addressLine</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____address_line.html#o1">keyName</a></td><td><a class="el" href="classuddi2____address_line.html">uddi2__addressLine</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____address_line.html#o2">keyValue</a></td><td><a class="el" href="classuddi2____address_line.html">uddi2__addressLine</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____address_line.html#o3">soap</a></td><td><a class="el" href="classuddi2____address_line.html">uddi2__addressLine</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____address_line.html b/doc/uddi2/html/classuddi2____address_line.html
new file mode 100644
index 0000000..3c49ce1
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____address_line.html
@@ -0,0 +1,136 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__addressLine Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__addressLine Class Reference</h1>Schema urn:uddi-org:api_v2:"addressLine".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____address_line-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____address_line.html#o0">__item</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____address_line.html#o1">keyName</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute keyName of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____address_line.html#o2">keyValue</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute keyValue of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____address_line.html#o3">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____address_line.html#o3">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o3"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"addressLine". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__addressLine::__item" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____address_line.html#o0">uddi2__addressLine::__item</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__addressLine::keyName" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____address_line.html#o1">uddi2__addressLine::keyName</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute keyName of type xs:string. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__addressLine::keyValue" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____address_line.html#o2">uddi2__addressLine::keyValue</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute keyValue of type xs:string. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__addressLine::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____address_line.html#o3">soap</a>* <a class="el" href="classuddi2____address_line.html#o3">uddi2__addressLine::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____assertion_status_item-members.html b/doc/uddi2/html/classuddi2____assertion_status_item-members.html
new file mode 100644
index 0000000..ca0aeaa
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____assertion_status_item-members.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__assertionStatusItem Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____assertion_status_item.html">uddi2__assertionStatusItem</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____assertion_status_item.html#o4">completionStatus</a></td><td><a class="el" href="classuddi2____assertion_status_item.html">uddi2__assertionStatusItem</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____assertion_status_item.html#o0">fromKey</a></td><td><a class="el" href="classuddi2____assertion_status_item.html">uddi2__assertionStatusItem</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____assertion_status_item.html#o2">keyedReference</a></td><td><a class="el" href="classuddi2____assertion_status_item.html">uddi2__assertionStatusItem</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____assertion_status_item.html#o3">keysOwned</a></td><td><a class="el" href="classuddi2____assertion_status_item.html">uddi2__assertionStatusItem</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____assertion_status_item.html#o5">soap</a></td><td><a class="el" href="classuddi2____assertion_status_item.html">uddi2__assertionStatusItem</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____assertion_status_item.html#o1">toKey</a></td><td><a class="el" href="classuddi2____assertion_status_item.html">uddi2__assertionStatusItem</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____assertion_status_item.html b/doc/uddi2/html/classuddi2____assertion_status_item.html
new file mode 100644
index 0000000..245611a
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____assertion_status_item.html
@@ -0,0 +1,195 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__assertionStatusItem Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__assertionStatusItem Class Reference</h1>Schema urn:uddi-org:api_v2:"assertionStatusItem".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____assertion_status_item-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____assertion_status_item.html#o0">fromKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":fromKey.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____assertion_status_item.html#o1">toKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":toKey.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____assertion_status_item.html#o2">keyedReference</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":keyedReference.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____keys_owned.html">uddi2__keysOwned</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____assertion_status_item.html#o3">keysOwned</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":keysOwned.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____assertion_status_item.html#o4">completionStatus</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute completionStatus of type xs:string.  <a href="#o4"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____assertion_status_item.html#o5">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____assertion_status_item.html#o5">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o5"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"assertionStatusItem". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o4" doxytag="uddi2__assertionStatusItem::completionStatus" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____assertion_status_item.html#o4">uddi2__assertionStatusItem::completionStatus</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute completionStatus of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__assertionStatusItem::fromKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a> <a class="el" href="classuddi2____assertion_status_item.html#o0">uddi2__assertionStatusItem::fromKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":fromKey. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__assertionStatusItem::keyedReference" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a>* <a class="el" href="classuddi2____assertion_status_item.html#o2">uddi2__assertionStatusItem::keyedReference</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":keyedReference. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__assertionStatusItem::keysOwned" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____keys_owned.html">uddi2__keysOwned</a>* <a class="el" href="classuddi2____assertion_status_item.html#o3">uddi2__assertionStatusItem::keysOwned</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":keysOwned. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="uddi2__assertionStatusItem::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____assertion_status_item.html#o5">soap</a>* <a class="el" href="classuddi2____assertion_status_item.html#o5">uddi2__assertionStatusItem::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__assertionStatusItem::toKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a> <a class="el" href="classuddi2____assertion_status_item.html#o1">uddi2__assertionStatusItem::toKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":toKey. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____assertion_status_report-members.html b/doc/uddi2/html/classuddi2____assertion_status_report-members.html
new file mode 100644
index 0000000..3fee02a
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____assertion_status_report-members.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__assertionStatusReport Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____assertion_status_report.html">uddi2__assertionStatusReport</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____assertion_status_report.html#o0">assertionStatusItem</a></td><td><a class="el" href="classuddi2____assertion_status_report.html">uddi2__assertionStatusReport</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____assertion_status_report.html#o1">generic</a></td><td><a class="el" href="classuddi2____assertion_status_report.html">uddi2__assertionStatusReport</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____assertion_status_report.html#o2">operator_</a></td><td><a class="el" href="classuddi2____assertion_status_report.html">uddi2__assertionStatusReport</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____assertion_status_report.html#o3">soap</a></td><td><a class="el" href="classuddi2____assertion_status_report.html">uddi2__assertionStatusReport</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____assertion_status_report.html b/doc/uddi2/html/classuddi2____assertion_status_report.html
new file mode 100644
index 0000000..ccc51de
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____assertion_status_report.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__assertionStatusReport Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__assertionStatusReport Class Reference</h1>Schema urn:uddi-org:api_v2:"assertionStatusReport".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____assertion_status_report-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____assertion_status_item.html">uddi2__assertionStatusItem</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____assertion_status_report.html#o0">assertionStatusItem</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__assertionStatusItem* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____assertion_status_report.html#o1">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____assertion_status_report.html#o2">operator_</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute operator of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____assertion_status_report.html#o3">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____assertion_status_report.html#o3">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o3"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"assertionStatusReport". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__assertionStatusReport::assertionStatusItem" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____assertion_status_item.html">uddi2__assertionStatusItem</a>*&gt; <a class="el" href="classuddi2____assertion_status_report.html#o0">uddi2__assertionStatusReport::assertionStatusItem</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__assertionStatusItem* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__assertionStatusReport::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____assertion_status_report.html#o1">uddi2__assertionStatusReport::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__assertionStatusReport::operator_" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____assertion_status_report.html#o2">uddi2__assertionStatusReport::operator_</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute operator of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__assertionStatusReport::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____assertion_status_report.html#o3">soap</a>* <a class="el" href="classuddi2____assertion_status_report.html#o3">uddi2__assertionStatusReport::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____auth_token-members.html b/doc/uddi2/html/classuddi2____auth_token-members.html
new file mode 100644
index 0000000..5aabe86
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____auth_token-members.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__authToken Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____auth_token.html">uddi2__authToken</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____auth_token.html#o0">authInfo</a></td><td><a class="el" href="classuddi2____auth_token.html">uddi2__authToken</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____auth_token.html#o1">generic</a></td><td><a class="el" href="classuddi2____auth_token.html">uddi2__authToken</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____auth_token.html#o2">operator_</a></td><td><a class="el" href="classuddi2____auth_token.html">uddi2__authToken</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____auth_token.html#o3">soap</a></td><td><a class="el" href="classuddi2____auth_token.html">uddi2__authToken</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____auth_token.html b/doc/uddi2/html/classuddi2____auth_token.html
new file mode 100644
index 0000000..adbf7f2
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____auth_token.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__authToken Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__authToken Class Reference</h1>Schema urn:uddi-org:api_v2:"authToken".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____auth_token-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____auth_token.html#o0">authInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":authInfo.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____auth_token.html#o1">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____auth_token.html#o2">operator_</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute operator of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____auth_token.html#o3">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____auth_token.html#o3">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o3"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"authToken". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__authToken::authInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____auth_token.html#o0">uddi2__authToken::authInfo</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":authInfo. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__authToken::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____auth_token.html#o1">uddi2__authToken::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__authToken::operator_" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____auth_token.html#o2">uddi2__authToken::operator_</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute operator of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__authToken::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____auth_token.html#o3">soap</a>* <a class="el" href="classuddi2____auth_token.html#o3">uddi2__authToken::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____binding_detail-members.html b/doc/uddi2/html/classuddi2____binding_detail-members.html
new file mode 100644
index 0000000..36626cf
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____binding_detail-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__bindingDetail Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____binding_detail.html#o0">bindingTemplate</a></td><td><a class="el" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____binding_detail.html#o1">generic</a></td><td><a class="el" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____binding_detail.html#o2">operator_</a></td><td><a class="el" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____binding_detail.html#o4">soap</a></td><td><a class="el" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____binding_detail.html#o3">truncated</a></td><td><a class="el" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____binding_detail.html b/doc/uddi2/html/classuddi2____binding_detail.html
new file mode 100644
index 0000000..2d9bf79
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____binding_detail.html
@@ -0,0 +1,167 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__bindingDetail Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__bindingDetail Class Reference</h1>Schema urn:uddi-org:api_v2:"bindingDetail".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____binding_detail-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____binding_template.html">uddi2__bindingTemplate</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____binding_detail.html#o0">bindingTemplate</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__bindingTemplate* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____binding_detail.html#o1">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____binding_detail.html#o2">operator_</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute operator of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>enum <a class="el" href="uddi__v2_8h.html#a48">uddi2__truncated</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____binding_detail.html#o3">truncated</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute truncated of type "urn:uddi-org:api_v2":truncated.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____binding_detail.html#o4">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____binding_detail.html#o4">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o4"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"bindingDetail". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__bindingDetail::bindingTemplate" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____binding_template.html">uddi2__bindingTemplate</a>*&gt; <a class="el" href="classuddi2____binding_detail.html#o0">uddi2__bindingDetail::bindingTemplate</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__bindingTemplate* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__bindingDetail::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____binding_detail.html#o1">uddi2__bindingDetail::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__bindingDetail::operator_" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____binding_detail.html#o2">uddi2__bindingDetail::operator_</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute operator of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__bindingDetail::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____binding_detail.html#o4">soap</a>* <a class="el" href="classuddi2____binding_detail.html#o4">uddi2__bindingDetail::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__bindingDetail::truncated" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> enum <a class="el" href="uddi__v2_8h.html#a48">uddi2__truncated</a>* <a class="el" href="classuddi2____binding_detail.html#o3">uddi2__bindingDetail::truncated</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute truncated of type "urn:uddi-org:api_v2":truncated. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____binding_template-members.html b/doc/uddi2/html/classuddi2____binding_template-members.html
new file mode 100644
index 0000000..9285edd
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____binding_template-members.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__bindingTemplate Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____binding_template.html">uddi2__bindingTemplate</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____binding_template.html#o2">accessPoint</a></td><td><a class="el" href="classuddi2____binding_template.html">uddi2__bindingTemplate</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____binding_template.html#o5">bindingKey</a></td><td><a class="el" href="classuddi2____binding_template.html">uddi2__bindingTemplate</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____binding_template.html#o0">description</a></td><td><a class="el" href="classuddi2____binding_template.html">uddi2__bindingTemplate</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____binding_template.html#o3">hostingRedirector</a></td><td><a class="el" href="classuddi2____binding_template.html">uddi2__bindingTemplate</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____binding_template.html#o4">serviceKey</a></td><td><a class="el" href="classuddi2____binding_template.html">uddi2__bindingTemplate</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____binding_template.html#o6">soap</a></td><td><a class="el" href="classuddi2____binding_template.html">uddi2__bindingTemplate</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____binding_template.html#o1">tModelInstanceDetails</a></td><td><a class="el" href="classuddi2____binding_template.html">uddi2__bindingTemplate</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____binding_template.html b/doc/uddi2/html/classuddi2____binding_template.html
new file mode 100644
index 0000000..8af8b82
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____binding_template.html
@@ -0,0 +1,223 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__bindingTemplate Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__bindingTemplate Class Reference</h1>Schema urn:uddi-org:api_v2:"bindingTemplate".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____binding_template-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____description.html">uddi2__description</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____binding_template.html#o0">description</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__description* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____t_model_instance_details.html">uddi2__tModelInstanceDetails</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____binding_template.html#o1">tModelInstanceDetails</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Required element.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____access_point.html">uddi2__accessPoint</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____binding_template.html#o2">accessPoint</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":accessPoint.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____hosting_redirector.html">uddi2__hostingRedirector</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____binding_template.html#o3">hostingRedirector</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Required element.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a4">uddi2__serviceKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____binding_template.html#o4">serviceKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute serviceKey of type "urn:uddi-org:api_v2":serviceKey.  <a href="#o4"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a2">uddi2__bindingKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____binding_template.html#o5">bindingKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute bindingKey of type "urn:uddi-org:api_v2":bindingKey.  <a href="#o5"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____binding_template.html#o6">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____binding_template.html#o6">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o6"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"bindingTemplate". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o2" doxytag="uddi2__bindingTemplate::accessPoint" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____access_point.html">uddi2__accessPoint</a>* <a class="el" href="classuddi2____binding_template.html#o2">uddi2__bindingTemplate::accessPoint</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":accessPoint. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="uddi2__bindingTemplate::bindingKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a2">uddi2__bindingKey</a> <a class="el" href="classuddi2____binding_template.html#o5">uddi2__bindingTemplate::bindingKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute bindingKey of type "urn:uddi-org:api_v2":bindingKey. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__bindingTemplate::description" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____description.html">uddi2__description</a>* &gt; <a class="el" href="classuddi2____binding_template.html#o0">uddi2__bindingTemplate::description</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__description* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__bindingTemplate::hostingRedirector" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____hosting_redirector.html">uddi2__hostingRedirector</a>* <a class="el" href="classuddi2____binding_template.html#o3">uddi2__bindingTemplate::hostingRedirector</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Required element. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__bindingTemplate::serviceKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a4">uddi2__serviceKey</a> <a class="el" href="classuddi2____binding_template.html#o4">uddi2__bindingTemplate::serviceKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute serviceKey of type "urn:uddi-org:api_v2":serviceKey. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o6" doxytag="uddi2__bindingTemplate::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____binding_template.html#o6">soap</a>* <a class="el" href="classuddi2____binding_template.html#o6">uddi2__bindingTemplate::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__bindingTemplate::tModelInstanceDetails" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____t_model_instance_details.html">uddi2__tModelInstanceDetails</a>* <a class="el" href="classuddi2____binding_template.html#o1">uddi2__bindingTemplate::tModelInstanceDetails</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Required element. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____binding_templates-members.html b/doc/uddi2/html/classuddi2____binding_templates-members.html
new file mode 100644
index 0000000..3b47f25
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____binding_templates-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__bindingTemplates Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____binding_templates.html">uddi2__bindingTemplates</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____binding_templates.html#o0">bindingTemplate</a></td><td><a class="el" href="classuddi2____binding_templates.html">uddi2__bindingTemplates</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____binding_templates.html#o1">soap</a></td><td><a class="el" href="classuddi2____binding_templates.html">uddi2__bindingTemplates</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____binding_templates.html b/doc/uddi2/html/classuddi2____binding_templates.html
new file mode 100644
index 0000000..2a323ac
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____binding_templates.html
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__bindingTemplates Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__bindingTemplates Class Reference</h1>Schema urn:uddi-org:api_v2:"bindingTemplates".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____binding_templates-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____binding_template.html">uddi2__bindingTemplate</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____binding_templates.html#o0">bindingTemplate</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__bindingTemplate* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____binding_templates.html#o1">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____binding_templates.html#o1">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o1"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"bindingTemplates". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__bindingTemplates::bindingTemplate" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____binding_template.html">uddi2__bindingTemplate</a>*&gt; <a class="el" href="classuddi2____binding_templates.html#o0">uddi2__bindingTemplates::bindingTemplate</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__bindingTemplate* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__bindingTemplates::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____binding_templates.html#o1">soap</a>* <a class="el" href="classuddi2____binding_templates.html#o1">uddi2__bindingTemplates::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____business_detail-members.html b/doc/uddi2/html/classuddi2____business_detail-members.html
new file mode 100644
index 0000000..fd638a7
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____business_detail-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__businessDetail Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____business_detail.html">uddi2__businessDetail</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_detail.html#o0">businessEntity</a></td><td><a class="el" href="classuddi2____business_detail.html">uddi2__businessDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_detail.html#o1">generic</a></td><td><a class="el" href="classuddi2____business_detail.html">uddi2__businessDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_detail.html#o2">operator_</a></td><td><a class="el" href="classuddi2____business_detail.html">uddi2__businessDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_detail.html#o4">soap</a></td><td><a class="el" href="classuddi2____business_detail.html">uddi2__businessDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_detail.html#o3">truncated</a></td><td><a class="el" href="classuddi2____business_detail.html">uddi2__businessDetail</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____business_detail.html b/doc/uddi2/html/classuddi2____business_detail.html
new file mode 100644
index 0000000..5189a7e
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____business_detail.html
@@ -0,0 +1,167 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__businessDetail Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__businessDetail Class Reference</h1>Schema urn:uddi-org:api_v2:"businessDetail".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____business_detail-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_detail.html#o0">businessEntity</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__businessEntity* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_detail.html#o1">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_detail.html#o2">operator_</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute operator of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>enum <a class="el" href="uddi__v2_8h.html#a48">uddi2__truncated</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_detail.html#o3">truncated</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute truncated of type "urn:uddi-org:api_v2":truncated.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____business_detail.html#o4">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_detail.html#o4">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o4"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"businessDetail". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__businessDetail::businessEntity" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a>* &gt; <a class="el" href="classuddi2____business_detail.html#o0">uddi2__businessDetail::businessEntity</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__businessEntity* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__businessDetail::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____business_detail.html#o1">uddi2__businessDetail::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__businessDetail::operator_" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____business_detail.html#o2">uddi2__businessDetail::operator_</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute operator of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__businessDetail::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____business_detail.html#o4">soap</a>* <a class="el" href="classuddi2____business_detail.html#o4">uddi2__businessDetail::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__businessDetail::truncated" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> enum <a class="el" href="uddi__v2_8h.html#a48">uddi2__truncated</a>* <a class="el" href="classuddi2____business_detail.html#o3">uddi2__businessDetail::truncated</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute truncated of type "urn:uddi-org:api_v2":truncated. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____business_detail_ext-members.html b/doc/uddi2/html/classuddi2____business_detail_ext-members.html
new file mode 100644
index 0000000..d5e161d
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____business_detail_ext-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__businessDetailExt Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____business_detail_ext.html">uddi2__businessDetailExt</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_detail_ext.html#o0">businessEntityExt</a></td><td><a class="el" href="classuddi2____business_detail_ext.html">uddi2__businessDetailExt</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_detail_ext.html#o1">generic</a></td><td><a class="el" href="classuddi2____business_detail_ext.html">uddi2__businessDetailExt</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_detail_ext.html#o2">operator_</a></td><td><a class="el" href="classuddi2____business_detail_ext.html">uddi2__businessDetailExt</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_detail_ext.html#o4">soap</a></td><td><a class="el" href="classuddi2____business_detail_ext.html">uddi2__businessDetailExt</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_detail_ext.html#o3">truncated</a></td><td><a class="el" href="classuddi2____business_detail_ext.html">uddi2__businessDetailExt</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____business_detail_ext.html b/doc/uddi2/html/classuddi2____business_detail_ext.html
new file mode 100644
index 0000000..bbb89e5
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____business_detail_ext.html
@@ -0,0 +1,167 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__businessDetailExt Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__businessDetailExt Class Reference</h1>Schema urn:uddi-org:api_v2:"businessDetailExt".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____business_detail_ext-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____business_entity_ext.html">uddi2__businessEntityExt</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_detail_ext.html#o0">businessEntityExt</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__businessEntityExt* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_detail_ext.html#o1">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_detail_ext.html#o2">operator_</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute operator of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>enum <a class="el" href="uddi__v2_8h.html#a48">uddi2__truncated</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_detail_ext.html#o3">truncated</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute truncated of type "urn:uddi-org:api_v2":truncated.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____business_detail_ext.html#o4">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_detail_ext.html#o4">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o4"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"businessDetailExt". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__businessDetailExt::businessEntityExt" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____business_entity_ext.html">uddi2__businessEntityExt</a>*&gt; <a class="el" href="classuddi2____business_detail_ext.html#o0">uddi2__businessDetailExt::businessEntityExt</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__businessEntityExt* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__businessDetailExt::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____business_detail_ext.html#o1">uddi2__businessDetailExt::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__businessDetailExt::operator_" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____business_detail_ext.html#o2">uddi2__businessDetailExt::operator_</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute operator of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__businessDetailExt::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____business_detail_ext.html#o4">soap</a>* <a class="el" href="classuddi2____business_detail_ext.html#o4">uddi2__businessDetailExt::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__businessDetailExt::truncated" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> enum <a class="el" href="uddi__v2_8h.html#a48">uddi2__truncated</a>* <a class="el" href="classuddi2____business_detail_ext.html#o3">uddi2__businessDetailExt::truncated</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute truncated of type "urn:uddi-org:api_v2":truncated. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____business_entity-members.html b/doc/uddi2/html/classuddi2____business_entity-members.html
new file mode 100644
index 0000000..269c475
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____business_entity-members.html
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__businessEntity Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_entity.html#o9">authorizedName</a></td><td><a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_entity.html#o7">businessKey</a></td><td><a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_entity.html#o4">businessServices</a></td><td><a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_entity.html#o6">categoryBag</a></td><td><a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_entity.html#o3">contacts</a></td><td><a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_entity.html#o2">description</a></td><td><a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_entity.html#o0">discoveryURLs</a></td><td><a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_entity.html#o5">identifierBag</a></td><td><a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_entity.html#o1">name</a></td><td><a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_entity.html#o8">operator_</a></td><td><a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_entity.html#o10">soap</a></td><td><a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____business_entity.html b/doc/uddi2/html/classuddi2____business_entity.html
new file mode 100644
index 0000000..0c35556
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____business_entity.html
@@ -0,0 +1,335 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__businessEntity Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__businessEntity Class Reference</h1>Schema urn:uddi-org:api_v2:"businessEntity".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____business_entity-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____discovery_u_r_ls.html">uddi2__discoveryURLs</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_entity.html#o0">discoveryURLs</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":discoveryURLs.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____name.html">uddi2__name</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_entity.html#o1">name</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__name* with length 0..unbounded.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____description.html">uddi2__description</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_entity.html#o2">description</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__description* with length 0..unbounded.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____contacts.html">uddi2__contacts</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_entity.html#o3">contacts</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":contacts.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____business_services.html">uddi2__businessServices</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_entity.html#o4">businessServices</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":businessServices.  <a href="#o4"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____identifier_bag.html">uddi2__identifierBag</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_entity.html#o5">identifierBag</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":identifierBag.  <a href="#o5"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____category_bag.html">uddi2__categoryBag</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_entity.html#o6">categoryBag</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":categoryBag.  <a href="#o6"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_entity.html#o7">businessKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute businessKey of type "urn:uddi-org:api_v2":businessKey.  <a href="#o7"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_entity.html#o8">operator_</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute operator of type xs:string.  <a href="#o8"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_entity.html#o9">authorizedName</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute authorizedName of type xs:string.  <a href="#o9"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____business_entity.html#o10">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_entity.html#o10">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o10"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"businessEntity". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o9" doxytag="uddi2__businessEntity::authorizedName" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____business_entity.html#o9">uddi2__businessEntity::authorizedName</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute authorizedName of type xs:string. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o7" doxytag="uddi2__businessEntity::businessKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a> <a class="el" href="classuddi2____business_entity.html#o7">uddi2__businessEntity::businessKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute businessKey of type "urn:uddi-org:api_v2":businessKey. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__businessEntity::businessServices" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____business_services.html">uddi2__businessServices</a>* <a class="el" href="classuddi2____business_entity.html#o4">uddi2__businessEntity::businessServices</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":businessServices. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o6" doxytag="uddi2__businessEntity::categoryBag" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____category_bag.html">uddi2__categoryBag</a>* <a class="el" href="classuddi2____business_entity.html#o6">uddi2__businessEntity::categoryBag</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":categoryBag. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__businessEntity::contacts" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____contacts.html">uddi2__contacts</a>* <a class="el" href="classuddi2____business_entity.html#o3">uddi2__businessEntity::contacts</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":contacts. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__businessEntity::description" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____description.html">uddi2__description</a>* &gt; <a class="el" href="classuddi2____business_entity.html#o2">uddi2__businessEntity::description</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__description* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__businessEntity::discoveryURLs" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____discovery_u_r_ls.html">uddi2__discoveryURLs</a>* <a class="el" href="classuddi2____business_entity.html#o0">uddi2__businessEntity::discoveryURLs</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":discoveryURLs. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="uddi2__businessEntity::identifierBag" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____identifier_bag.html">uddi2__identifierBag</a>* <a class="el" href="classuddi2____business_entity.html#o5">uddi2__businessEntity::identifierBag</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":identifierBag. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__businessEntity::name" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____name.html">uddi2__name</a>* &gt; <a class="el" href="classuddi2____business_entity.html#o1">uddi2__businessEntity::name</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__name* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o8" doxytag="uddi2__businessEntity::operator_" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____business_entity.html#o8">uddi2__businessEntity::operator_</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute operator of type xs:string. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o10" doxytag="uddi2__businessEntity::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____business_entity.html#o10">soap</a>* <a class="el" href="classuddi2____business_entity.html#o10">uddi2__businessEntity::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____business_entity_ext-members.html b/doc/uddi2/html/classuddi2____business_entity_ext-members.html
new file mode 100644
index 0000000..75654d9
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____business_entity_ext-members.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__businessEntityExt Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____business_entity_ext.html">uddi2__businessEntityExt</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_entity_ext.html#o1">__any</a></td><td><a class="el" href="classuddi2____business_entity_ext.html">uddi2__businessEntityExt</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_entity_ext.html#o0">businessEntity</a></td><td><a class="el" href="classuddi2____business_entity_ext.html">uddi2__businessEntityExt</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_entity_ext.html#o2">soap</a></td><td><a class="el" href="classuddi2____business_entity_ext.html">uddi2__businessEntityExt</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____business_entity_ext.html b/doc/uddi2/html/classuddi2____business_entity_ext.html
new file mode 100644
index 0000000..aede5a8
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____business_entity_ext.html
@@ -0,0 +1,108 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__businessEntityExt Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__businessEntityExt Class Reference</h1>Schema urn:uddi-org:api_v2:"businessEntityExt".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____business_entity_ext-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_entity_ext.html#o0">businessEntity</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Required element.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>_XML&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_entity_ext.html#o1">__any</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____business_entity_ext.html#o2">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_entity_ext.html#o2">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o2"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"businessEntityExt". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o1" doxytag="uddi2__businessEntityExt::__any" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> _XML <a class="el" href="classuddi2____business_entity_ext.html#o1">uddi2__businessEntityExt::__any</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Catch any element content in XML string     </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__businessEntityExt::businessEntity" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a>* <a class="el" href="classuddi2____business_entity_ext.html#o0">uddi2__businessEntityExt::businessEntity</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Required element. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__businessEntityExt::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____business_entity_ext.html#o2">soap</a>* <a class="el" href="classuddi2____business_entity_ext.html#o2">uddi2__businessEntityExt::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____business_info-members.html b/doc/uddi2/html/classuddi2____business_info-members.html
new file mode 100644
index 0000000..e846ced
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____business_info-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__businessInfo Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____business_info.html">uddi2__businessInfo</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_info.html#o3">businessKey</a></td><td><a class="el" href="classuddi2____business_info.html">uddi2__businessInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_info.html#o1">description</a></td><td><a class="el" href="classuddi2____business_info.html">uddi2__businessInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_info.html#o0">name</a></td><td><a class="el" href="classuddi2____business_info.html">uddi2__businessInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_info.html#o2">serviceInfos</a></td><td><a class="el" href="classuddi2____business_info.html">uddi2__businessInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_info.html#o4">soap</a></td><td><a class="el" href="classuddi2____business_info.html">uddi2__businessInfo</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____business_info.html b/doc/uddi2/html/classuddi2____business_info.html
new file mode 100644
index 0000000..a019f0b
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____business_info.html
@@ -0,0 +1,167 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__businessInfo Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__businessInfo Class Reference</h1>Schema urn:uddi-org:api_v2:"businessInfo".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____business_info-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____name.html">uddi2__name</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_info.html#o0">name</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__name* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____description.html">uddi2__description</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_info.html#o1">description</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__description* with length 0..unbounded.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____service_infos.html">uddi2__serviceInfos</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_info.html#o2">serviceInfos</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":serviceInfos.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_info.html#o3">businessKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute businessKey of type "urn:uddi-org:api_v2":businessKey.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____business_info.html#o4">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_info.html#o4">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o4"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"businessInfo". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o3" doxytag="uddi2__businessInfo::businessKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a> <a class="el" href="classuddi2____business_info.html#o3">uddi2__businessInfo::businessKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute businessKey of type "urn:uddi-org:api_v2":businessKey. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__businessInfo::description" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____description.html">uddi2__description</a>* &gt; <a class="el" href="classuddi2____business_info.html#o1">uddi2__businessInfo::description</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__description* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__businessInfo::name" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____name.html">uddi2__name</a>* &gt; <a class="el" href="classuddi2____business_info.html#o0">uddi2__businessInfo::name</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__name* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__businessInfo::serviceInfos" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____service_infos.html">uddi2__serviceInfos</a>* <a class="el" href="classuddi2____business_info.html#o2">uddi2__businessInfo::serviceInfos</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":serviceInfos. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__businessInfo::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____business_info.html#o4">soap</a>* <a class="el" href="classuddi2____business_info.html#o4">uddi2__businessInfo::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____business_infos-members.html b/doc/uddi2/html/classuddi2____business_infos-members.html
new file mode 100644
index 0000000..1175e6c
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____business_infos-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__businessInfos Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____business_infos.html">uddi2__businessInfos</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_infos.html#o0">businessInfo</a></td><td><a class="el" href="classuddi2____business_infos.html">uddi2__businessInfos</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_infos.html#o1">soap</a></td><td><a class="el" href="classuddi2____business_infos.html">uddi2__businessInfos</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____business_infos.html b/doc/uddi2/html/classuddi2____business_infos.html
new file mode 100644
index 0000000..e2c0c7a
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____business_infos.html
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__businessInfos Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__businessInfos Class Reference</h1>Schema urn:uddi-org:api_v2:"businessInfos".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____business_infos-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____business_info.html">uddi2__businessInfo</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_infos.html#o0">businessInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__businessInfo* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____business_infos.html#o1">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_infos.html#o1">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o1"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"businessInfos". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__businessInfos::businessInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____business_info.html">uddi2__businessInfo</a>* &gt; <a class="el" href="classuddi2____business_infos.html#o0">uddi2__businessInfos::businessInfo</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__businessInfo* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__businessInfos::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____business_infos.html#o1">soap</a>* <a class="el" href="classuddi2____business_infos.html#o1">uddi2__businessInfos::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____business_list-members.html b/doc/uddi2/html/classuddi2____business_list-members.html
new file mode 100644
index 0000000..871b857
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____business_list-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__businessList Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____business_list.html">uddi2__businessList</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_list.html#o0">businessInfos</a></td><td><a class="el" href="classuddi2____business_list.html">uddi2__businessList</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_list.html#o1">generic</a></td><td><a class="el" href="classuddi2____business_list.html">uddi2__businessList</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_list.html#o2">operator_</a></td><td><a class="el" href="classuddi2____business_list.html">uddi2__businessList</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_list.html#o4">soap</a></td><td><a class="el" href="classuddi2____business_list.html">uddi2__businessList</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_list.html#o3">truncated</a></td><td><a class="el" href="classuddi2____business_list.html">uddi2__businessList</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____business_list.html b/doc/uddi2/html/classuddi2____business_list.html
new file mode 100644
index 0000000..86db602
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____business_list.html
@@ -0,0 +1,167 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__businessList Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__businessList Class Reference</h1>Schema urn:uddi-org:api_v2:"businessList".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____business_list-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____business_infos.html">uddi2__businessInfos</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_list.html#o0">businessInfos</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":businessInfos.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_list.html#o1">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_list.html#o2">operator_</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute operator of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>enum <a class="el" href="uddi__v2_8h.html#a48">uddi2__truncated</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_list.html#o3">truncated</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute truncated of type "urn:uddi-org:api_v2":truncated.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____business_list.html#o4">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_list.html#o4">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o4"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"businessList". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__businessList::businessInfos" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____business_infos.html">uddi2__businessInfos</a>* <a class="el" href="classuddi2____business_list.html#o0">uddi2__businessList::businessInfos</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":businessInfos. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__businessList::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____business_list.html#o1">uddi2__businessList::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__businessList::operator_" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____business_list.html#o2">uddi2__businessList::operator_</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute operator of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__businessList::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____business_list.html#o4">soap</a>* <a class="el" href="classuddi2____business_list.html#o4">uddi2__businessList::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__businessList::truncated" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> enum <a class="el" href="uddi__v2_8h.html#a48">uddi2__truncated</a>* <a class="el" href="classuddi2____business_list.html#o3">uddi2__businessList::truncated</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute truncated of type "urn:uddi-org:api_v2":truncated. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____business_service-members.html b/doc/uddi2/html/classuddi2____business_service-members.html
new file mode 100644
index 0000000..2ec7f2f
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____business_service-members.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__businessService Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____business_service.html">uddi2__businessService</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_service.html#o2">bindingTemplates</a></td><td><a class="el" href="classuddi2____business_service.html">uddi2__businessService</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_service.html#o5">businessKey</a></td><td><a class="el" href="classuddi2____business_service.html">uddi2__businessService</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_service.html#o3">categoryBag</a></td><td><a class="el" href="classuddi2____business_service.html">uddi2__businessService</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_service.html#o1">description</a></td><td><a class="el" href="classuddi2____business_service.html">uddi2__businessService</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_service.html#o0">name</a></td><td><a class="el" href="classuddi2____business_service.html">uddi2__businessService</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_service.html#o4">serviceKey</a></td><td><a class="el" href="classuddi2____business_service.html">uddi2__businessService</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_service.html#o6">soap</a></td><td><a class="el" href="classuddi2____business_service.html">uddi2__businessService</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____business_service.html b/doc/uddi2/html/classuddi2____business_service.html
new file mode 100644
index 0000000..1d6bb93
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____business_service.html
@@ -0,0 +1,223 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__businessService Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__businessService Class Reference</h1>Schema urn:uddi-org:api_v2:"businessService".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____business_service-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____name.html">uddi2__name</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_service.html#o0">name</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__name* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____description.html">uddi2__description</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_service.html#o1">description</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__description* with length 0..unbounded.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____binding_templates.html">uddi2__bindingTemplates</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_service.html#o2">bindingTemplates</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":bindingTemplates.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____category_bag.html">uddi2__categoryBag</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_service.html#o3">categoryBag</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":categoryBag.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a4">uddi2__serviceKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_service.html#o4">serviceKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute serviceKey of type "urn:uddi-org:api_v2":serviceKey.  <a href="#o4"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_service.html#o5">businessKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute businessKey of type "urn:uddi-org:api_v2":businessKey.  <a href="#o5"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____business_service.html#o6">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_service.html#o6">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o6"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"businessService". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o2" doxytag="uddi2__businessService::bindingTemplates" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____binding_templates.html">uddi2__bindingTemplates</a>* <a class="el" href="classuddi2____business_service.html#o2">uddi2__businessService::bindingTemplates</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":bindingTemplates. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="uddi2__businessService::businessKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a> <a class="el" href="classuddi2____business_service.html#o5">uddi2__businessService::businessKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute businessKey of type "urn:uddi-org:api_v2":businessKey. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__businessService::categoryBag" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____category_bag.html">uddi2__categoryBag</a>* <a class="el" href="classuddi2____business_service.html#o3">uddi2__businessService::categoryBag</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":categoryBag. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__businessService::description" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____description.html">uddi2__description</a>* &gt; <a class="el" href="classuddi2____business_service.html#o1">uddi2__businessService::description</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__description* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__businessService::name" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____name.html">uddi2__name</a>* &gt; <a class="el" href="classuddi2____business_service.html#o0">uddi2__businessService::name</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__name* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__businessService::serviceKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a4">uddi2__serviceKey</a> <a class="el" href="classuddi2____business_service.html#o4">uddi2__businessService::serviceKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute serviceKey of type "urn:uddi-org:api_v2":serviceKey. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o6" doxytag="uddi2__businessService::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____business_service.html#o6">soap</a>* <a class="el" href="classuddi2____business_service.html#o6">uddi2__businessService::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____business_services-members.html b/doc/uddi2/html/classuddi2____business_services-members.html
new file mode 100644
index 0000000..300bd51
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____business_services-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__businessServices Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____business_services.html">uddi2__businessServices</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_services.html#o0">businessService</a></td><td><a class="el" href="classuddi2____business_services.html">uddi2__businessServices</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____business_services.html#o1">soap</a></td><td><a class="el" href="classuddi2____business_services.html">uddi2__businessServices</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____business_services.html b/doc/uddi2/html/classuddi2____business_services.html
new file mode 100644
index 0000000..f64c25e
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____business_services.html
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__businessServices Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__businessServices Class Reference</h1>Schema urn:uddi-org:api_v2:"businessServices".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____business_services-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____business_service.html">uddi2__businessService</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_services.html#o0">businessService</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__businessService* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____business_services.html#o1">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_services.html#o1">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o1"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"businessServices". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__businessServices::businessService" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____business_service.html">uddi2__businessService</a>*&gt; <a class="el" href="classuddi2____business_services.html#o0">uddi2__businessServices::businessService</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__businessService* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__businessServices::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____business_services.html#o1">soap</a>* <a class="el" href="classuddi2____business_services.html#o1">uddi2__businessServices::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____category_bag-members.html b/doc/uddi2/html/classuddi2____category_bag-members.html
new file mode 100644
index 0000000..b1ed160
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____category_bag-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__categoryBag Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____category_bag.html">uddi2__categoryBag</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____category_bag.html#o0">keyedReference</a></td><td><a class="el" href="classuddi2____category_bag.html">uddi2__categoryBag</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____category_bag.html#o1">soap</a></td><td><a class="el" href="classuddi2____category_bag.html">uddi2__categoryBag</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____category_bag.html b/doc/uddi2/html/classuddi2____category_bag.html
new file mode 100644
index 0000000..f4f4a5d
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____category_bag.html
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__categoryBag Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__categoryBag Class Reference</h1>Schema urn:uddi-org:api_v2:"categoryBag".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____category_bag-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____category_bag.html#o0">keyedReference</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__keyedReference* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____category_bag.html#o1">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____category_bag.html#o1">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o1"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"categoryBag". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__categoryBag::keyedReference" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a>* &gt; <a class="el" href="classuddi2____category_bag.html#o0">uddi2__categoryBag::keyedReference</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__keyedReference* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__categoryBag::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____category_bag.html#o1">soap</a>* <a class="el" href="classuddi2____category_bag.html#o1">uddi2__categoryBag::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____contact-members.html b/doc/uddi2/html/classuddi2____contact-members.html
new file mode 100644
index 0000000..997c0a7
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____contact-members.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__contact Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____contact.html">uddi2__contact</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____contact.html#o4">address</a></td><td><a class="el" href="classuddi2____contact.html">uddi2__contact</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____contact.html#o0">description</a></td><td><a class="el" href="classuddi2____contact.html">uddi2__contact</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____contact.html#o3">email</a></td><td><a class="el" href="classuddi2____contact.html">uddi2__contact</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____contact.html#o1">personName</a></td><td><a class="el" href="classuddi2____contact.html">uddi2__contact</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____contact.html#o2">phone</a></td><td><a class="el" href="classuddi2____contact.html">uddi2__contact</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____contact.html#o6">soap</a></td><td><a class="el" href="classuddi2____contact.html">uddi2__contact</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____contact.html#o5">useType</a></td><td><a class="el" href="classuddi2____contact.html">uddi2__contact</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____contact.html b/doc/uddi2/html/classuddi2____contact.html
new file mode 100644
index 0000000..3bc40f7
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____contact.html
@@ -0,0 +1,223 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__contact Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__contact Class Reference</h1>Schema urn:uddi-org:api_v2:"contact".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____contact-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____description.html">uddi2__description</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____contact.html#o0">description</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__description* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____contact.html#o1">personName</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":personName.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____phone.html">uddi2__phone</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____contact.html#o2">phone</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__phone* with length 0..unbounded.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____email.html">uddi2__email</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____contact.html#o3">email</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__email* with length 0..unbounded.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____address.html">uddi2__address</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____contact.html#o4">address</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__address* with length 0..unbounded.  <a href="#o4"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____contact.html#o5">useType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute useType of type xs:string.  <a href="#o5"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____contact.html#o6">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____contact.html#o6">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o6"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"contact". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o4" doxytag="uddi2__contact::address" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____address.html">uddi2__address</a>* &gt; <a class="el" href="classuddi2____contact.html#o4">uddi2__contact::address</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__address* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__contact::description" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____description.html">uddi2__description</a>* &gt; <a class="el" href="classuddi2____contact.html#o0">uddi2__contact::description</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__description* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__contact::email" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____email.html">uddi2__email</a>* &gt; <a class="el" href="classuddi2____contact.html#o3">uddi2__contact::email</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__email* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__contact::personName" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____contact.html#o1">uddi2__contact::personName</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":personName. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__contact::phone" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____phone.html">uddi2__phone</a>* &gt; <a class="el" href="classuddi2____contact.html#o2">uddi2__contact::phone</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__phone* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o6" doxytag="uddi2__contact::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____contact.html#o6">soap</a>* <a class="el" href="classuddi2____contact.html#o6">uddi2__contact::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="uddi2__contact::useType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____contact.html#o5">uddi2__contact::useType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute useType of type xs:string. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____contacts-members.html b/doc/uddi2/html/classuddi2____contacts-members.html
new file mode 100644
index 0000000..6fb77f3
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____contacts-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__contacts Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____contacts.html">uddi2__contacts</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____contacts.html#o0">contact</a></td><td><a class="el" href="classuddi2____contacts.html">uddi2__contacts</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____contacts.html#o1">soap</a></td><td><a class="el" href="classuddi2____contacts.html">uddi2__contacts</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____contacts.html b/doc/uddi2/html/classuddi2____contacts.html
new file mode 100644
index 0000000..fef5d7e
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____contacts.html
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__contacts Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__contacts Class Reference</h1>Schema urn:uddi-org:api_v2:"contacts".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____contacts-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____contact.html">uddi2__contact</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____contacts.html#o0">contact</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__contact* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____contacts.html#o1">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____contacts.html#o1">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o1"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"contacts". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__contacts::contact" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____contact.html">uddi2__contact</a>* &gt; <a class="el" href="classuddi2____contacts.html#o0">uddi2__contacts::contact</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__contact* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__contacts::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____contacts.html#o1">soap</a>* <a class="el" href="classuddi2____contacts.html#o1">uddi2__contacts::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_ebinding-members.html b/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_ebinding-members.html
new file mode 100644
index 0000000..b1f2e09
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_ebinding-members.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__delete_USCOREbinding Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html">uddi2__delete_USCOREbinding</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o0">authInfo</a></td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html">uddi2__delete_USCOREbinding</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o1">bindingKey</a></td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html">uddi2__delete_USCOREbinding</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o2">generic</a></td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html">uddi2__delete_USCOREbinding</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#a3">send</a>(const char *endpoint, char *authInfo)</td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html">uddi2__delete_USCOREbinding</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o3">soap</a></td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html">uddi2__delete_USCOREbinding</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#a0">uddi2__delete_USCOREbinding</a>(struct soap *)</td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html">uddi2__delete_USCOREbinding</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#a1">uddi2__delete_USCOREbinding</a>(struct soap *, const char *bindingKey)</td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html">uddi2__delete_USCOREbinding</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#a2">uddi2__delete_USCOREbinding</a>(struct soap *, std::vector&lt; char * &gt; bindingKeys)</td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html">uddi2__delete_USCOREbinding</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_ebinding.html b/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_ebinding.html
new file mode 100644
index 0000000..67ee586
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_ebinding.html
@@ -0,0 +1,323 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__delete_USCOREbinding Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__delete_USCOREbinding Class Reference</h1>Schema urn:uddi-org:api_v2:"delete_binding".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____delete___u_s_c_o_r_ebinding-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#a0">uddi2__delete_USCOREbinding</a> (struct <a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o3">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#a1">uddi2__delete_USCOREbinding</a> (struct <a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o3">soap</a> *, const char *<a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o1">bindingKey</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#a2">uddi2__delete_USCOREbinding</a> (struct <a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o3">soap</a> *, std::vector&lt; char * &gt; bindingKeys)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#a3">send</a> (const char *endpoint, char *<a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o0">authInfo</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a3"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o0">authInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":authInfo.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="uddi__v2_8h.html#a2">uddi2__bindingKey</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o1">bindingKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__bindingKey with length 0..unbounded.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o2">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o3">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o3">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o3"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"delete_binding". 

+<p>

+Represents a request to delete a binding that meets the specified requirements.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137732">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137732</a> 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__delete_USCOREbinding::uddi2__delete_USCOREbinding" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__delete_USCOREbinding::uddi2__delete_USCOREbinding           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+Creates an instance of the delete_USCOREbinding class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi2__delete_USCOREbinding::uddi2__delete_USCOREbinding" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__delete_USCOREbinding::uddi2__delete_USCOREbinding           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>bindingKey</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>bindingKey</em>&nbsp;</td><td>a binding key string</td></tr>

+  </table>

+</dl>

+Creates an instance of the delete_USCOREbinding class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a2" doxytag="uddi2__delete_USCOREbinding::uddi2__delete_USCOREbinding" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__delete_USCOREbinding::uddi2__delete_USCOREbinding           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>std::vector&lt; char * &gt;&nbsp;</td>

+          <td class="mdname" nowrap> <em>bindingKeys</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>bindingKeys</em>&nbsp;</td><td>collection of binding keys</td></tr>

+  </table>

+</dl>

+Creates an instance of the delete_USCOREbinding class using the specified binding keys.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a3" doxytag="uddi2__delete_USCOREbinding::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> * uddi2__delete_USCOREbinding::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>endpoint</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>authInfo</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>authInfo</em>&nbsp;</td><td>authorization token provided by the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> object or NULL on error</dd></dl>

+Send a request to a UDDI service to delete a binding that meets the specified requirements.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__delete_USCOREbinding::authInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o0">uddi2__delete_USCOREbinding::authInfo</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":authInfo. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__delete_USCOREbinding::bindingKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="uddi__v2_8h.html#a2">uddi2__bindingKey</a> &gt; <a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o1">uddi2__delete_USCOREbinding::bindingKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__bindingKey with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__delete_USCOREbinding::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o2">uddi2__delete_USCOREbinding::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__delete_USCOREbinding::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o3">soap</a>* <a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o3">uddi2__delete_USCOREbinding::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_ebusiness-members.html b/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_ebusiness-members.html
new file mode 100644
index 0000000..d85c736
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_ebusiness-members.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__delete_USCOREbusiness Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html">uddi2__delete_USCOREbusiness</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o0">authInfo</a></td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html">uddi2__delete_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o1">businessKey</a></td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html">uddi2__delete_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o2">generic</a></td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html">uddi2__delete_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#a3">send</a>(const char *endpoint, char *authInfo)</td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html">uddi2__delete_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o3">soap</a></td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html">uddi2__delete_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#a0">uddi2__delete_USCOREbusiness</a>(struct soap *)</td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html">uddi2__delete_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#a1">uddi2__delete_USCOREbusiness</a>(struct soap *, const char *businessKey)</td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html">uddi2__delete_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#a2">uddi2__delete_USCOREbusiness</a>(struct soap *, std::vector&lt; char * &gt; businessKeys)</td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html">uddi2__delete_USCOREbusiness</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_ebusiness.html b/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_ebusiness.html
new file mode 100644
index 0000000..d86aa3e
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_ebusiness.html
@@ -0,0 +1,328 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__delete_USCOREbusiness Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__delete_USCOREbusiness Class Reference</h1>Schema urn:uddi-org:api_v2:"delete_business".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____delete___u_s_c_o_r_ebusiness-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#a0">uddi2__delete_USCOREbusiness</a> (struct <a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o3">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#a1">uddi2__delete_USCOREbusiness</a> (struct <a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o3">soap</a> *, const char *<a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o1">businessKey</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#a2">uddi2__delete_USCOREbusiness</a> (struct <a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o3">soap</a> *, std::vector&lt; char * &gt; businessKeys)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#a3">send</a> (const char *endpoint, char *<a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o0">authInfo</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a3"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o0">authInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":authInfo.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o1">businessKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__businessKey with length 0..unbounded.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o2">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o3">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o3">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o3"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"delete_business". 

+<p>

+Represents a request to delete a business that meets the specified requirements.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137733">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137733</a> 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__delete_USCOREbusiness::uddi2__delete_USCOREbusiness" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__delete_USCOREbusiness::uddi2__delete_USCOREbusiness           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the delete_USCOREbusiness class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi2__delete_USCOREbusiness::uddi2__delete_USCOREbusiness" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__delete_USCOREbusiness::uddi2__delete_USCOREbusiness           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>businessKey</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>businessKey</em>&nbsp;</td><td>a business key string</td></tr>

+  </table>

+</dl>

+Creates an instance of the delete_USCOREbusiness class using the specified business key.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a2" doxytag="uddi2__delete_USCOREbusiness::uddi2__delete_USCOREbusiness" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__delete_USCOREbusiness::uddi2__delete_USCOREbusiness           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>std::vector&lt; char * &gt;&nbsp;</td>

+          <td class="mdname" nowrap> <em>businessKeys</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>businessKeys</em>&nbsp;</td><td>collection of business keys</td></tr>

+  </table>

+</dl>

+Creates an instance of the delete_USCOREbusiness class using the specified business keys.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a3" doxytag="uddi2__delete_USCOREbusiness::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> * uddi2__delete_USCOREbusiness::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>endpoint</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>authInfo</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>authInfo</em>&nbsp;</td><td>authorization token provided by the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> object or NULL on error</dd></dl>

+Send a request to a UDDI service to delete a business that meets the specified requirements.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__delete_USCOREbusiness::authInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o0">uddi2__delete_USCOREbusiness::authInfo</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":authInfo. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__delete_USCOREbusiness::businessKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a> &gt; <a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o1">uddi2__delete_USCOREbusiness::businessKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__businessKey with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__delete_USCOREbusiness::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o2">uddi2__delete_USCOREbusiness::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__delete_USCOREbusiness::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o3">soap</a>* <a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o3">uddi2__delete_USCOREbusiness::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_epublisher_assertions-members.html b/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_epublisher_assertions-members.html
new file mode 100644
index 0000000..d40fc9a
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_epublisher_assertions-members.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__delete_USCOREpublisherAssertions Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html">uddi2__delete_USCOREpublisherAssertions</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o0">authInfo</a></td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html">uddi2__delete_USCOREpublisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o2">generic</a></td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html">uddi2__delete_USCOREpublisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o1">publisherAssertion</a></td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html">uddi2__delete_USCOREpublisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#a2">send</a>(const char *endpoint, char *authInfo)</td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html">uddi2__delete_USCOREpublisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o3">soap</a></td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html">uddi2__delete_USCOREpublisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#a0">uddi2__delete_USCOREpublisherAssertions</a>(struct soap *)</td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html">uddi2__delete_USCOREpublisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#a1">uddi2__delete_USCOREpublisherAssertions</a>(struct soap *, std::vector&lt; uddi2__publisherAssertion * &gt; publisherAssertions)</td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html">uddi2__delete_USCOREpublisherAssertions</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_epublisher_assertions.html b/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_epublisher_assertions.html
new file mode 100644
index 0000000..0fa5552
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_epublisher_assertions.html
@@ -0,0 +1,280 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__delete_USCOREpublisherAssertions Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__delete_USCOREpublisherAssertions Class Reference</h1>Schema urn:uddi-org:api_v2:"delete_publisherAssertions".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____delete___u_s_c_o_r_epublisher_assertions-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#a0">uddi2__delete_USCOREpublisherAssertions</a> (struct <a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o3">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#a1">uddi2__delete_USCOREpublisherAssertions</a> (struct <a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o3">soap</a> *, std::vector&lt; <a class="el" href="classuddi2____publisher_assertion.html">uddi2__publisherAssertion</a> * &gt; publisherAssertions)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#a2">send</a> (const char *endpoint, char *<a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o0">authInfo</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o0">authInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":authInfo.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____publisher_assertion.html">uddi2__publisherAssertion</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o1">publisherAssertion</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__publisherAssertion* with length 0..unbounded.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o2">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o3">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o3">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o3"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"delete_publisherAssertions". 

+<p>

+Represents a request to delete publisher assertions meeting the specified requirements.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137734">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137734</a> 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__delete_USCOREpublisherAssertions::uddi2__delete_USCOREpublisherAssertions" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__delete_USCOREpublisherAssertions::uddi2__delete_USCOREpublisherAssertions           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the delete_USCOREpublisherAssertions class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi2__delete_USCOREpublisherAssertions::uddi2__delete_USCOREpublisherAssertions" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__delete_USCOREpublisherAssertions::uddi2__delete_USCOREpublisherAssertions           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>std::vector&lt; <a class="el" href="classuddi2____publisher_assertion.html">uddi2__publisherAssertion</a> * &gt;&nbsp;</td>

+          <td class="mdname" nowrap> <em>publisherAssertions</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>publisherAssertions</em>&nbsp;</td><td>a collection of publisher assertions</td></tr>

+  </table>

+</dl>

+Creates an instance of the delete_USCOREpublisherAssertions class using the specified collection of publisher assertions.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a2" doxytag="uddi2__delete_USCOREpublisherAssertions::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> * uddi2__delete_USCOREpublisherAssertions::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>endpoint</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>authInfo</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>authInfo</em>&nbsp;</td><td>authorization token provided by the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> object or NULL on error</dd></dl>

+Send a request to a UDDI service to delete publisher assertions meeting the specified requirements.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__delete_USCOREpublisherAssertions::authInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o0">uddi2__delete_USCOREpublisherAssertions::authInfo</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":authInfo. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__delete_USCOREpublisherAssertions::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o2">uddi2__delete_USCOREpublisherAssertions::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__delete_USCOREpublisherAssertions::publisherAssertion" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____publisher_assertion.html">uddi2__publisherAssertion</a>*&gt; <a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o1">uddi2__delete_USCOREpublisherAssertions::publisherAssertion</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__publisherAssertion* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__delete_USCOREpublisherAssertions::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o3">soap</a>* <a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o3">uddi2__delete_USCOREpublisherAssertions::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_eservice-members.html b/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_eservice-members.html
new file mode 100644
index 0000000..c59eceb
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_eservice-members.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__delete_USCOREservice Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html">uddi2__delete_USCOREservice</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o0">authInfo</a></td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html">uddi2__delete_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o2">generic</a></td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html">uddi2__delete_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#a3">send</a>(const char *endpoint, char *authInfo)</td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html">uddi2__delete_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o1">serviceKey</a></td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html">uddi2__delete_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o3">soap</a></td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html">uddi2__delete_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#a0">uddi2__delete_USCOREservice</a>(struct soap *)</td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html">uddi2__delete_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#a1">uddi2__delete_USCOREservice</a>(struct soap *, const char *serviceKey)</td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html">uddi2__delete_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#a2">uddi2__delete_USCOREservice</a>(struct soap *, std::vector&lt; char * &gt; serviceKeys)</td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html">uddi2__delete_USCOREservice</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_eservice.html b/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_eservice.html
new file mode 100644
index 0000000..a72c2c1
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_eservice.html
@@ -0,0 +1,328 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__delete_USCOREservice Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__delete_USCOREservice Class Reference</h1>Schema urn:uddi-org:api_v2:"delete_service".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____delete___u_s_c_o_r_eservice-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#a0">uddi2__delete_USCOREservice</a> (struct <a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o3">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#a1">uddi2__delete_USCOREservice</a> (struct <a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o3">soap</a> *, const char *<a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o1">serviceKey</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#a2">uddi2__delete_USCOREservice</a> (struct <a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o3">soap</a> *, std::vector&lt; char * &gt; serviceKeys)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#a3">send</a> (const char *endpoint, char *<a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o0">authInfo</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a3"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o0">authInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":authInfo.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="uddi__v2_8h.html#a4">uddi2__serviceKey</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o1">serviceKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__serviceKey with length 0..unbounded.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o2">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o3">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o3">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o3"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"delete_service". 

+<p>

+Represents a request to delete a service that meets the specified requirements.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137735">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137735</a> 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__delete_USCOREservice::uddi2__delete_USCOREservice" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__delete_USCOREservice::uddi2__delete_USCOREservice           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the delete_USCOREservice class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi2__delete_USCOREservice::uddi2__delete_USCOREservice" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__delete_USCOREservice::uddi2__delete_USCOREservice           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>serviceKey</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>serviceKey</em>&nbsp;</td><td>a service key string</td></tr>

+  </table>

+</dl>

+Creates an instance of the delete_USCOREservice class using the specified service key.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a2" doxytag="uddi2__delete_USCOREservice::uddi2__delete_USCOREservice" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__delete_USCOREservice::uddi2__delete_USCOREservice           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>std::vector&lt; char * &gt;&nbsp;</td>

+          <td class="mdname" nowrap> <em>serviceKeys</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>serviceKeys</em>&nbsp;</td><td>collection of service keys</td></tr>

+  </table>

+</dl>

+Creates an instance of the delete_USCOREservice class using the specified service keys.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a3" doxytag="uddi2__delete_USCOREservice::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> * uddi2__delete_USCOREservice::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>endpoint</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>authInfo</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>authInfo</em>&nbsp;</td><td>authorization token provided by the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> object or NULL on error</dd></dl>

+Send a request to a UDDI service to delete a service that meets the specified requirements.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__delete_USCOREservice::authInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o0">uddi2__delete_USCOREservice::authInfo</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":authInfo. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__delete_USCOREservice::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o2">uddi2__delete_USCOREservice::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__delete_USCOREservice::serviceKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="uddi__v2_8h.html#a4">uddi2__serviceKey</a> &gt; <a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o1">uddi2__delete_USCOREservice::serviceKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__serviceKey with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__delete_USCOREservice::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o3">soap</a>* <a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o3">uddi2__delete_USCOREservice::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_et_model-members.html b/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_et_model-members.html
new file mode 100644
index 0000000..518a204
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_et_model-members.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__delete_USCOREtModel Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html">uddi2__delete_USCOREtModel</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o0">authInfo</a></td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html">uddi2__delete_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o2">generic</a></td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html">uddi2__delete_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#a3">send</a>(const char *endpoint, char *authInfo)</td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html">uddi2__delete_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o3">soap</a></td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html">uddi2__delete_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o1">tModelKey</a></td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html">uddi2__delete_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#a0">uddi2__delete_USCOREtModel</a>(struct soap *)</td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html">uddi2__delete_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#a1">uddi2__delete_USCOREtModel</a>(struct soap *, const char *tModelKey)</td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html">uddi2__delete_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#a2">uddi2__delete_USCOREtModel</a>(struct soap *, std::vector&lt; char * &gt; tModelKeys)</td><td><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html">uddi2__delete_USCOREtModel</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_et_model.html b/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_et_model.html
new file mode 100644
index 0000000..fd6a1f6
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____delete___u_s_c_o_r_et_model.html
@@ -0,0 +1,328 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__delete_USCOREtModel Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__delete_USCOREtModel Class Reference</h1>Schema urn:uddi-org:api_v2:"delete_tModel".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____delete___u_s_c_o_r_et_model-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#a0">uddi2__delete_USCOREtModel</a> (struct <a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o3">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#a1">uddi2__delete_USCOREtModel</a> (struct <a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o3">soap</a> *, const char *<a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o1">tModelKey</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#a2">uddi2__delete_USCOREtModel</a> (struct <a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o3">soap</a> *, std::vector&lt; char * &gt; tModelKeys)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#a3">send</a> (const char *endpoint, char *<a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o0">authInfo</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a3"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o0">authInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":authInfo.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="uddi__v2_8h.html#a5">uddi2__tModelKey</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o1">tModelKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__tModelKey with length 0..unbounded.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o2">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o3">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o3">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o3"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"delete_tModel". 

+<p>

+Represents a request to delete a tModel that meets the specified requirements.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137736">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137736</a> 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__delete_USCOREtModel::uddi2__delete_USCOREtModel" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__delete_USCOREtModel::uddi2__delete_USCOREtModel           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the delete_USCOREtModel class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi2__delete_USCOREtModel::uddi2__delete_USCOREtModel" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__delete_USCOREtModel::uddi2__delete_USCOREtModel           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>tModelKey</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>tModelKey</em>&nbsp;</td><td>a tModel key string</td></tr>

+  </table>

+</dl>

+Creates an instance of the delete_USCOREtModel class using the specified tModel key.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a2" doxytag="uddi2__delete_USCOREtModel::uddi2__delete_USCOREtModel" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__delete_USCOREtModel::uddi2__delete_USCOREtModel           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>std::vector&lt; char * &gt;&nbsp;</td>

+          <td class="mdname" nowrap> <em>tModelKeys</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>tModelKeys</em>&nbsp;</td><td>collection of tModel keys</td></tr>

+  </table>

+</dl>

+Creates an instance of the delete_USCOREtModel class using the specified tModel keys.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a3" doxytag="uddi2__delete_USCOREtModel::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> * uddi2__delete_USCOREtModel::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>endpoint</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>authInfo</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>authInfo</em>&nbsp;</td><td>authorization token provided by the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> object or NULL on error</dd></dl>

+Send a request to a UDDI service to delete a tModel that meets the specified requirements.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__delete_USCOREtModel::authInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o0">uddi2__delete_USCOREtModel::authInfo</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":authInfo. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__delete_USCOREtModel::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o2">uddi2__delete_USCOREtModel::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__delete_USCOREtModel::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o3">soap</a>* <a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o3">uddi2__delete_USCOREtModel::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__delete_USCOREtModel::tModelKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="uddi__v2_8h.html#a5">uddi2__tModelKey</a> &gt; <a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o1">uddi2__delete_USCOREtModel::tModelKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__tModelKey with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____description-members.html b/doc/uddi2/html/classuddi2____description-members.html
new file mode 100644
index 0000000..0e1fac5
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____description-members.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__description Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____description.html">uddi2__description</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____description.html#o0">__item</a></td><td><a class="el" href="classuddi2____description.html">uddi2__description</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____description.html#o2">soap</a></td><td><a class="el" href="classuddi2____description.html">uddi2__description</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____description.html#o1">xml__lang_</a></td><td><a class="el" href="classuddi2____description.html">uddi2__description</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____description.html b/doc/uddi2/html/classuddi2____description.html
new file mode 100644
index 0000000..0b7bf7d
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____description.html
@@ -0,0 +1,108 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__description Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__description Class Reference</h1>Schema urn:uddi-org:api_v2:"description".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____description-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____description.html#o0">__item</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a1">xml__lang</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____description.html#o1">xml__lang_</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute reference xml:lang.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____description.html#o2">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____description.html#o2">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o2"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"description". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__description::__item" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____description.html#o0">uddi2__description::__item</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__description::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____description.html#o2">soap</a>* <a class="el" href="classuddi2____description.html#o2">uddi2__description::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__description::xml__lang_" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a1">xml__lang</a> <a class="el" href="classuddi2____description.html#o1">uddi2__description::xml__lang_</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute reference xml:lang. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____discard___u_s_c_o_r_eauth_token-members.html b/doc/uddi2/html/classuddi2____discard___u_s_c_o_r_eauth_token-members.html
new file mode 100644
index 0000000..22d8053
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____discard___u_s_c_o_r_eauth_token-members.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__discard_USCOREauthToken Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html">uddi2__discard_USCOREauthToken</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#o0">authInfo</a></td><td><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html">uddi2__discard_USCOREauthToken</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#o1">generic</a></td><td><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html">uddi2__discard_USCOREauthToken</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#a2">send</a>(const char *endpoint)</td><td><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html">uddi2__discard_USCOREauthToken</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#o2">soap</a></td><td><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html">uddi2__discard_USCOREauthToken</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#a0">uddi2__discard_USCOREauthToken</a>(struct soap *)</td><td><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html">uddi2__discard_USCOREauthToken</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#a1">uddi2__discard_USCOREauthToken</a>(struct soap *, const char *authInfo)</td><td><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html">uddi2__discard_USCOREauthToken</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____discard___u_s_c_o_r_eauth_token.html b/doc/uddi2/html/classuddi2____discard___u_s_c_o_r_eauth_token.html
new file mode 100644
index 0000000..74b60b3
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____discard___u_s_c_o_r_eauth_token.html
@@ -0,0 +1,242 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__discard_USCOREauthToken Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__discard_USCOREauthToken Class Reference</h1>Schema urn:uddi-org:api_v2:"discard_authToken".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____discard___u_s_c_o_r_eauth_token-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#a0">uddi2__discard_USCOREauthToken</a> (struct <a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#o2">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#a1">uddi2__discard_USCOREauthToken</a> (struct <a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#o2">soap</a> *, const char *<a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#o0">authInfo</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#a2">send</a> (const char *endpoint)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#o0">authInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":authInfo.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#o1">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#o2">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#o2">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o2"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"discard_authToken". 

+<p>

+Represents a request to discard an authorization token obtained with the get_USCOREauthToken class.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137737">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137737</a> 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__discard_USCOREauthToken::uddi2__discard_USCOREauthToken" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__discard_USCOREauthToken::uddi2__discard_USCOREauthToken           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#o2">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the delete_USCOREauthToken class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi2__discard_USCOREauthToken::uddi2__discard_USCOREauthToken" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__discard_USCOREauthToken::uddi2__discard_USCOREauthToken           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#o2">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>authInfo</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>authInfo</em>&nbsp;</td><td>authorization token provided by the UDDI server</td></tr>

+  </table>

+</dl>

+Creates an instance of the delete_USCOREauthToken class using the specified authentication token string.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a2" doxytag="uddi2__discard_USCOREauthToken::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> * uddi2__discard_USCOREauthToken::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>endpoint</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> object or NULL on error</dd></dl>

+Send a request to a UDDI service to discard an authentication token.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__discard_USCOREauthToken::authInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#o0">uddi2__discard_USCOREauthToken::authInfo</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":authInfo. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__discard_USCOREauthToken::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#o1">uddi2__discard_USCOREauthToken::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__discard_USCOREauthToken::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#o2">soap</a>* <a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#o2">uddi2__discard_USCOREauthToken::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____discovery_u_r_l-members.html b/doc/uddi2/html/classuddi2____discovery_u_r_l-members.html
new file mode 100644
index 0000000..f24e4e5
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____discovery_u_r_l-members.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__discoveryURL Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____discovery_u_r_l.html">uddi2__discoveryURL</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____discovery_u_r_l.html#o0">__item</a></td><td><a class="el" href="classuddi2____discovery_u_r_l.html">uddi2__discoveryURL</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____discovery_u_r_l.html#o2">soap</a></td><td><a class="el" href="classuddi2____discovery_u_r_l.html">uddi2__discoveryURL</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____discovery_u_r_l.html#o1">useType</a></td><td><a class="el" href="classuddi2____discovery_u_r_l.html">uddi2__discoveryURL</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____discovery_u_r_l.html b/doc/uddi2/html/classuddi2____discovery_u_r_l.html
new file mode 100644
index 0000000..8a2f0ca
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____discovery_u_r_l.html
@@ -0,0 +1,108 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__discoveryURL Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__discoveryURL Class Reference</h1>Schema urn:uddi-org:api_v2:"discoveryURL".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____discovery_u_r_l-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____discovery_u_r_l.html#o0">__item</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____discovery_u_r_l.html#o1">useType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute useType of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____discovery_u_r_l.html#o2">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____discovery_u_r_l.html#o2">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o2"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"discoveryURL". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__discoveryURL::__item" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____discovery_u_r_l.html#o0">uddi2__discoveryURL::__item</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__discoveryURL::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____discovery_u_r_l.html#o2">soap</a>* <a class="el" href="classuddi2____discovery_u_r_l.html#o2">uddi2__discoveryURL::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__discoveryURL::useType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____discovery_u_r_l.html#o1">uddi2__discoveryURL::useType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute useType of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____discovery_u_r_ls-members.html b/doc/uddi2/html/classuddi2____discovery_u_r_ls-members.html
new file mode 100644
index 0000000..ecf3a7c
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____discovery_u_r_ls-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__discoveryURLs Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____discovery_u_r_ls.html">uddi2__discoveryURLs</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____discovery_u_r_ls.html#o0">discoveryURL</a></td><td><a class="el" href="classuddi2____discovery_u_r_ls.html">uddi2__discoveryURLs</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____discovery_u_r_ls.html#o1">soap</a></td><td><a class="el" href="classuddi2____discovery_u_r_ls.html">uddi2__discoveryURLs</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____discovery_u_r_ls.html b/doc/uddi2/html/classuddi2____discovery_u_r_ls.html
new file mode 100644
index 0000000..e1e9fdb
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____discovery_u_r_ls.html
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__discoveryURLs Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__discoveryURLs Class Reference</h1>Schema urn:uddi-org:api_v2:"discoveryURLs".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____discovery_u_r_ls-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____discovery_u_r_l.html">uddi2__discoveryURL</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____discovery_u_r_ls.html#o0">discoveryURL</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__discoveryURL* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____discovery_u_r_ls.html#o1">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____discovery_u_r_ls.html#o1">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o1"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"discoveryURLs". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__discoveryURLs::discoveryURL" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____discovery_u_r_l.html">uddi2__discoveryURL</a>* &gt; <a class="el" href="classuddi2____discovery_u_r_ls.html#o0">uddi2__discoveryURLs::discoveryURL</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__discoveryURL* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__discoveryURLs::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____discovery_u_r_ls.html#o1">soap</a>* <a class="el" href="classuddi2____discovery_u_r_ls.html#o1">uddi2__discoveryURLs::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____disposition_report-members.html b/doc/uddi2/html/classuddi2____disposition_report-members.html
new file mode 100644
index 0000000..64129a7
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____disposition_report-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__dispositionReport Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____disposition_report.html#o1">generic</a></td><td><a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____disposition_report.html#o2">operator_</a></td><td><a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____disposition_report.html#o0">result</a></td><td><a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____disposition_report.html#o4">soap</a></td><td><a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____disposition_report.html#o3">truncated</a></td><td><a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____disposition_report.html b/doc/uddi2/html/classuddi2____disposition_report.html
new file mode 100644
index 0000000..32ee965
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____disposition_report.html
@@ -0,0 +1,167 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__dispositionReport Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__dispositionReport Class Reference</h1>Schema urn:uddi-org:api_v2:"dispositionReport".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____disposition_report-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____result.html">uddi2__result</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____disposition_report.html#o0">result</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__result* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____disposition_report.html#o1">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____disposition_report.html#o2">operator_</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute operator of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>enum <a class="el" href="uddi__v2_8h.html#a48">uddi2__truncated</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____disposition_report.html#o3">truncated</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute truncated of type "urn:uddi-org:api_v2":truncated.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____disposition_report.html#o4">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____disposition_report.html#o4">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o4"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"dispositionReport". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o1" doxytag="uddi2__dispositionReport::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____disposition_report.html#o1">uddi2__dispositionReport::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__dispositionReport::operator_" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____disposition_report.html#o2">uddi2__dispositionReport::operator_</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute operator of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__dispositionReport::result" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____result.html">uddi2__result</a>* &gt; <a class="el" href="classuddi2____disposition_report.html#o0">uddi2__dispositionReport::result</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__result* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__dispositionReport::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____disposition_report.html#o4">soap</a>* <a class="el" href="classuddi2____disposition_report.html#o4">uddi2__dispositionReport::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__dispositionReport::truncated" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> enum <a class="el" href="uddi__v2_8h.html#a48">uddi2__truncated</a>* <a class="el" href="classuddi2____disposition_report.html#o3">uddi2__dispositionReport::truncated</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute truncated of type "urn:uddi-org:api_v2":truncated. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____email-members.html b/doc/uddi2/html/classuddi2____email-members.html
new file mode 100644
index 0000000..1e0457a
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____email-members.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__email Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____email.html">uddi2__email</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____email.html#o0">__item</a></td><td><a class="el" href="classuddi2____email.html">uddi2__email</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____email.html#o2">soap</a></td><td><a class="el" href="classuddi2____email.html">uddi2__email</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____email.html#o1">useType</a></td><td><a class="el" href="classuddi2____email.html">uddi2__email</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____email.html b/doc/uddi2/html/classuddi2____email.html
new file mode 100644
index 0000000..08c8224
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____email.html
@@ -0,0 +1,108 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__email Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__email Class Reference</h1>Schema urn:uddi-org:api_v2:"email".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____email-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____email.html#o0">__item</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____email.html#o1">useType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute useType of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____email.html#o2">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____email.html#o2">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o2"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"email". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__email::__item" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____email.html#o0">uddi2__email::__item</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__email::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____email.html#o2">soap</a>* <a class="el" href="classuddi2____email.html#o2">uddi2__email::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__email::useType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____email.html#o1">uddi2__email::useType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute useType of type xs:string. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____err_info-members.html b/doc/uddi2/html/classuddi2____err_info-members.html
new file mode 100644
index 0000000..c207555
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____err_info-members.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__errInfo Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____err_info.html">uddi2__errInfo</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____err_info.html#o0">__item</a></td><td><a class="el" href="classuddi2____err_info.html">uddi2__errInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____err_info.html#o1">errCode</a></td><td><a class="el" href="classuddi2____err_info.html">uddi2__errInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____err_info.html#o2">soap</a></td><td><a class="el" href="classuddi2____err_info.html">uddi2__errInfo</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____err_info.html b/doc/uddi2/html/classuddi2____err_info.html
new file mode 100644
index 0000000..281bbba
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____err_info.html
@@ -0,0 +1,108 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__errInfo Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__errInfo Class Reference</h1>Schema urn:uddi-org:api_v2:"errInfo".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____err_info-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____err_info.html#o0">__item</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____err_info.html#o1">errCode</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute errCode of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____err_info.html#o2">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____err_info.html#o2">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o2"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"errInfo". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__errInfo::__item" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____err_info.html#o0">uddi2__errInfo::__item</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__errInfo::errCode" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____err_info.html#o1">uddi2__errInfo::errCode</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute errCode of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__errInfo::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____err_info.html#o2">soap</a>* <a class="el" href="classuddi2____err_info.html#o2">uddi2__errInfo::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____find___u_s_c_o_r_ebinding-members.html b/doc/uddi2/html/classuddi2____find___u_s_c_o_r_ebinding-members.html
new file mode 100644
index 0000000..c2514ed
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____find___u_s_c_o_r_ebinding-members.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__find_USCOREbinding Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html">uddi2__find_USCOREbinding</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o0">findQualifiers</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html">uddi2__find_USCOREbinding</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o2">generic</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html">uddi2__find_USCOREbinding</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o3">maxRows</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html">uddi2__find_USCOREbinding</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#a3">send</a>(const char *endpoint)</td><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html">uddi2__find_USCOREbinding</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o4">serviceKey</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html">uddi2__find_USCOREbinding</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o5">soap</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html">uddi2__find_USCOREbinding</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o1">tModelBag</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html">uddi2__find_USCOREbinding</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#a0">uddi2__find_USCOREbinding</a>(struct soap *)</td><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html">uddi2__find_USCOREbinding</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#a1">uddi2__find_USCOREbinding</a>(struct soap *, const char *tModelKey)</td><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html">uddi2__find_USCOREbinding</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#a2">uddi2__find_USCOREbinding</a>(struct soap *, std::vector&lt; char * &gt; tModelKeys)</td><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html">uddi2__find_USCOREbinding</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____find___u_s_c_o_r_ebinding.html b/doc/uddi2/html/classuddi2____find___u_s_c_o_r_ebinding.html
new file mode 100644
index 0000000..84b8b71
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____find___u_s_c_o_r_ebinding.html
@@ -0,0 +1,374 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__find_USCOREbinding Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__find_USCOREbinding Class Reference</h1>Schema urn:uddi-org:api_v2:"find_binding".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____find___u_s_c_o_r_ebinding-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#a0">uddi2__find_USCOREbinding</a> (struct <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o5">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#a1">uddi2__find_USCOREbinding</a> (struct <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o5">soap</a> *, const char *tModelKey)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#a2">uddi2__find_USCOREbinding</a> (struct <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o5">soap</a> *, std::vector&lt; char * &gt; tModelKeys)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#a3">send</a> (const char *endpoint)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a3"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____find_qualifiers.html">uddi2__findQualifiers</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o0">findQualifiers</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":findQualifiers.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____t_model_bag.html">uddi2__tModelBag</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o1">tModelBag</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":tModelBag.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o2">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o3">maxRows</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute maxRows of type xs:int.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a4">uddi2__serviceKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o4">serviceKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute serviceKey of type "urn:uddi-org:api_v2":serviceKey.  <a href="#o4"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o5">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o5">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o5"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"find_binding". 

+<p>

+Represents a request to locate bindings that meet the specified requirements.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137712">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137712</a> 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__find_USCOREbinding::uddi2__find_USCOREbinding" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__find_USCOREbinding::uddi2__find_USCOREbinding           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o5">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the find_USCOREbinding class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi2__find_USCOREbinding::uddi2__find_USCOREbinding" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__find_USCOREbinding::uddi2__find_USCOREbinding           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o5">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>tModelKey</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>tModelKey</em>&nbsp;</td><td>string</td></tr>

+  </table>

+</dl>

+Creates an instance of the find_USCOREbinding class using the specified tModel key.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a2" doxytag="uddi2__find_USCOREbinding::uddi2__find_USCOREbinding" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__find_USCOREbinding::uddi2__find_USCOREbinding           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o5">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>std::vector&lt; char * &gt;&nbsp;</td>

+          <td class="mdname" nowrap> <em>tModelKeys</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>tModelKeys</em>&nbsp;</td><td>collection of tModel key strings</td></tr>

+  </table>

+</dl>

+Creates an instance of the find_USCOREbinding class using the specified tModel keys.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a3" doxytag="uddi2__find_USCOREbinding::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a> * uddi2__find_USCOREbinding::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>endpoint</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a> object or NULL on error</dd></dl>

+Send a request to a UDDI server to find binding details.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__find_USCOREbinding::findQualifiers" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____find_qualifiers.html">uddi2__findQualifiers</a>* <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o0">uddi2__find_USCOREbinding::findQualifiers</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":findQualifiers. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__find_USCOREbinding::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o2">uddi2__find_USCOREbinding::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__find_USCOREbinding::maxRows" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int* <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o3">uddi2__find_USCOREbinding::maxRows</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute maxRows of type xs:int. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__find_USCOREbinding::serviceKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a4">uddi2__serviceKey</a> <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o4">uddi2__find_USCOREbinding::serviceKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute serviceKey of type "urn:uddi-org:api_v2":serviceKey. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="uddi2__find_USCOREbinding::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o5">soap</a>* <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o5">uddi2__find_USCOREbinding::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__find_USCOREbinding::tModelBag" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____t_model_bag.html">uddi2__tModelBag</a>* <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o1">uddi2__find_USCOREbinding::tModelBag</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":tModelBag. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____find___u_s_c_o_r_ebusiness-members.html b/doc/uddi2/html/classuddi2____find___u_s_c_o_r_ebusiness-members.html
new file mode 100644
index 0000000..e5991fb
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____find___u_s_c_o_r_ebusiness-members.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__find_USCOREbusiness Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html">uddi2__find_USCOREbusiness</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o3">categoryBag</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html">uddi2__find_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o5">discoveryURLs</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html">uddi2__find_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o0">findQualifiers</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html">uddi2__find_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o6">generic</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html">uddi2__find_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o2">identifierBag</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html">uddi2__find_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o7">maxRows</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html">uddi2__find_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o1">name</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html">uddi2__find_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#a4">send</a>(const char *endpoint)</td><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html">uddi2__find_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o8">soap</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html">uddi2__find_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o4">tModelBag</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html">uddi2__find_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#a0">uddi2__find_USCOREbusiness</a>(struct soap *)</td><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html">uddi2__find_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#a1">uddi2__find_USCOREbusiness</a>(struct soap *, const char *name)</td><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html">uddi2__find_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#a2">uddi2__find_USCOREbusiness</a>(struct soap *, std::vector&lt; char * &gt; tModelKeys)</td><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html">uddi2__find_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#a3">uddi2__find_USCOREbusiness</a>(struct soap *, std::vector&lt; uddi2__keyedReference * &gt; keyedReferences)</td><td><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html">uddi2__find_USCOREbusiness</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____find___u_s_c_o_r_ebusiness.html b/doc/uddi2/html/classuddi2____find___u_s_c_o_r_ebusiness.html
new file mode 100644
index 0000000..d99cf4d
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____find___u_s_c_o_r_ebusiness.html
@@ -0,0 +1,505 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__find_USCOREbusiness Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__find_USCOREbusiness Class Reference</h1>Schema urn:uddi-org:api_v2:"find_business".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____find___u_s_c_o_r_ebusiness-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#a0">uddi2__find_USCOREbusiness</a> (struct <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o8">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#a1">uddi2__find_USCOREbusiness</a> (struct <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o8">soap</a> *, const char *<a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o1">name</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#a2">uddi2__find_USCOREbusiness</a> (struct <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o8">soap</a> *, std::vector&lt; char * &gt; tModelKeys)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#a3">uddi2__find_USCOREbusiness</a> (struct <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o8">soap</a> *, std::vector&lt; <a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a> * &gt; keyedReferences)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____business_list.html">uddi2__businessList</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#a4">send</a> (const char *endpoint)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a4"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____find_qualifiers.html">uddi2__findQualifiers</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o0">findQualifiers</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":findQualifiers.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____name.html">uddi2__name</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o1">name</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__name* with length 0..unbounded.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____identifier_bag.html">uddi2__identifierBag</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o2">identifierBag</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":identifierBag.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____category_bag.html">uddi2__categoryBag</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o3">categoryBag</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":categoryBag.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____t_model_bag.html">uddi2__tModelBag</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o4">tModelBag</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":tModelBag.  <a href="#o4"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____discovery_u_r_ls.html">uddi2__discoveryURLs</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o5">discoveryURLs</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":discoveryURLs.  <a href="#o5"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o6">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o6"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o7">maxRows</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute maxRows of type xs:int.  <a href="#o7"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o8">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o8">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o8"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"find_business". 

+<p>

+Represents a request to locate businesses that meet specific requirements. When the send method is called, the instance returns a <a class="el" href="classuddi2____business_list.html">uddi2__businessList</a> object that contains a list of business that matched the search criteria.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137713">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137713</a><p>

+See also <a class="el" href="example2.html">Code Example 2: Finding a business</a>. 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o8">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the find_USCOREbusiness class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o8">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>name</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the find_USCOREbusiness class using the specified name of the requested business.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a2" doxytag="uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o8">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>std::vector&lt; char * &gt;&nbsp;</td>

+          <td class="mdname" nowrap> <em>tModelKeys</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the find_USCOREbusiness class using the specified tModel keys.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a3" doxytag="uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o8">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>std::vector&lt; <a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a> * &gt;&nbsp;</td>

+          <td class="mdname" nowrap> <em>keyedReferences</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the find_USCOREbusiness class using the specified category references.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a4" doxytag="uddi2__find_USCOREbusiness::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____business_list.html">uddi2__businessList</a> * uddi2__find_USCOREbusiness::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>endpoint</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____business_list.html">uddi2__businessList</a> object or NULL on error</dd></dl>

+Send a request to a UDDI server to find a list of businesses.<p>

+See also <a class="el" href="example2.html">Code Example 2: Finding a business</a>.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o3" doxytag="uddi2__find_USCOREbusiness::categoryBag" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____category_bag.html">uddi2__categoryBag</a>* <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o3">uddi2__find_USCOREbusiness::categoryBag</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":categoryBag. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="uddi2__find_USCOREbusiness::discoveryURLs" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____discovery_u_r_ls.html">uddi2__discoveryURLs</a>* <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o5">uddi2__find_USCOREbusiness::discoveryURLs</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":discoveryURLs. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__find_USCOREbusiness::findQualifiers" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____find_qualifiers.html">uddi2__findQualifiers</a>* <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o0">uddi2__find_USCOREbusiness::findQualifiers</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":findQualifiers. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o6" doxytag="uddi2__find_USCOREbusiness::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o6">uddi2__find_USCOREbusiness::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__find_USCOREbusiness::identifierBag" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____identifier_bag.html">uddi2__identifierBag</a>* <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o2">uddi2__find_USCOREbusiness::identifierBag</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":identifierBag. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o7" doxytag="uddi2__find_USCOREbusiness::maxRows" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int* <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o7">uddi2__find_USCOREbusiness::maxRows</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute maxRows of type xs:int. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__find_USCOREbusiness::name" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____name.html">uddi2__name</a>* &gt; <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o1">uddi2__find_USCOREbusiness::name</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__name* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o8" doxytag="uddi2__find_USCOREbusiness::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o8">soap</a>* <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o8">uddi2__find_USCOREbusiness::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__find_USCOREbusiness::tModelBag" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____t_model_bag.html">uddi2__tModelBag</a>* <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o4">uddi2__find_USCOREbusiness::tModelBag</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":tModelBag. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____find___u_s_c_o_r_erelated_businesses-members.html b/doc/uddi2/html/classuddi2____find___u_s_c_o_r_erelated_businesses-members.html
new file mode 100644
index 0000000..35502f3
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____find___u_s_c_o_r_erelated_businesses-members.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__find_USCORErelatedBusinesses Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html">uddi2__find_USCORErelatedBusinesses</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o1">businessKey</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html">uddi2__find_USCORErelatedBusinesses</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o0">findQualifiers</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html">uddi2__find_USCORErelatedBusinesses</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o3">generic</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html">uddi2__find_USCORErelatedBusinesses</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o2">keyedReference</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html">uddi2__find_USCORErelatedBusinesses</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o4">maxRows</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html">uddi2__find_USCORErelatedBusinesses</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#a2">send</a>(const char *endpoint)</td><td><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html">uddi2__find_USCORErelatedBusinesses</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o5">soap</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html">uddi2__find_USCORErelatedBusinesses</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#a0">uddi2__find_USCORErelatedBusinesses</a>(struct soap *)</td><td><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html">uddi2__find_USCORErelatedBusinesses</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#a1">uddi2__find_USCORErelatedBusinesses</a>(struct soap *, const char *businessKey)</td><td><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html">uddi2__find_USCORErelatedBusinesses</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____find___u_s_c_o_r_erelated_businesses.html b/doc/uddi2/html/classuddi2____find___u_s_c_o_r_erelated_businesses.html
new file mode 100644
index 0000000..317d558
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____find___u_s_c_o_r_erelated_businesses.html
@@ -0,0 +1,326 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__find_USCORErelatedBusinesses Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__find_USCORErelatedBusinesses Class Reference</h1>Schema urn:uddi-org:api_v2:"find_relatedBusinesses".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____find___u_s_c_o_r_erelated_businesses-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#a0">uddi2__find_USCORErelatedBusinesses</a> (struct <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o5">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#a1">uddi2__find_USCORErelatedBusinesses</a> (struct <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o5">soap</a> *, const char *<a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o1">businessKey</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____related_businesses_list.html">uddi2__relatedBusinessesList</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#a2">send</a> (const char *endpoint)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____find_qualifiers.html">uddi2__findQualifiers</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o0">findQualifiers</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":findQualifiers.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o1">businessKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":businessKey.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o2">keyedReference</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":keyedReference.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o3">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o4">maxRows</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute maxRows of type xs:int.  <a href="#o4"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o5">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o5">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o5"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"find_relatedBusinesses". 

+<p>

+Represents a request to locate businesses that are related to a specific business. When the send method is called, the instance returns a uddi2__relatedBusinessList object that contains a list of business that matched the relationship set.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137714">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137714</a> 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__find_USCORErelatedBusinesses::uddi2__find_USCORErelatedBusinesses" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__find_USCORErelatedBusinesses::uddi2__find_USCORErelatedBusinesses           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o5">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the find_USCORErelatedBusiness class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi2__find_USCORErelatedBusinesses::uddi2__find_USCORErelatedBusinesses" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__find_USCORErelatedBusinesses::uddi2__find_USCORErelatedBusinesses           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o5">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>businessKey</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>businessKey</em>&nbsp;</td><td>string</td></tr>

+  </table>

+</dl>

+Creates an instance of the find_USCORErelatedBusiness class using the specified business key.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a2" doxytag="uddi2__find_USCORErelatedBusinesses::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____related_businesses_list.html">uddi2__relatedBusinessesList</a> * uddi2__find_USCORErelatedBusinesses::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>endpoint</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a uddi2__relatedBusinessList object or NULL on error</dd></dl>

+Send a request to a UDDI server to find a list of related businesses.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o1" doxytag="uddi2__find_USCORErelatedBusinesses::businessKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a> <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o1">uddi2__find_USCORErelatedBusinesses::businessKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":businessKey. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__find_USCORErelatedBusinesses::findQualifiers" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____find_qualifiers.html">uddi2__findQualifiers</a>* <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o0">uddi2__find_USCORErelatedBusinesses::findQualifiers</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":findQualifiers. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__find_USCORErelatedBusinesses::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o3">uddi2__find_USCORErelatedBusinesses::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__find_USCORErelatedBusinesses::keyedReference" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a>* <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o2">uddi2__find_USCORErelatedBusinesses::keyedReference</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":keyedReference. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__find_USCORErelatedBusinesses::maxRows" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int* <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o4">uddi2__find_USCORErelatedBusinesses::maxRows</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute maxRows of type xs:int. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="uddi2__find_USCORErelatedBusinesses::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o5">soap</a>* <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o5">uddi2__find_USCORErelatedBusinesses::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____find___u_s_c_o_r_eservice-members.html b/doc/uddi2/html/classuddi2____find___u_s_c_o_r_eservice-members.html
new file mode 100644
index 0000000..9c91b8d
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____find___u_s_c_o_r_eservice-members.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__find_USCOREservice Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html">uddi2__find_USCOREservice</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o6">businessKey</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html">uddi2__find_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o2">categoryBag</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html">uddi2__find_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o0">findQualifiers</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html">uddi2__find_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o4">generic</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html">uddi2__find_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o5">maxRows</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html">uddi2__find_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o1">name</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html">uddi2__find_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#a4">send</a>(const char *endpoint)</td><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html">uddi2__find_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o7">soap</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html">uddi2__find_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o3">tModelBag</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html">uddi2__find_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#a0">uddi2__find_USCOREservice</a>(struct soap *)</td><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html">uddi2__find_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#a1">uddi2__find_USCOREservice</a>(struct soap *, const char *name)</td><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html">uddi2__find_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#a2">uddi2__find_USCOREservice</a>(struct soap *, std::vector&lt; char * &gt; tModelKeys)</td><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html">uddi2__find_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#a3">uddi2__find_USCOREservice</a>(struct soap *, std::vector&lt; uddi2__keyedReference * &gt; keyedReferences)</td><td><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html">uddi2__find_USCOREservice</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____find___u_s_c_o_r_eservice.html b/doc/uddi2/html/classuddi2____find___u_s_c_o_r_eservice.html
new file mode 100644
index 0000000..88d7121
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____find___u_s_c_o_r_eservice.html
@@ -0,0 +1,480 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__find_USCOREservice Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__find_USCOREservice Class Reference</h1>Schema urn:uddi-org:api_v2:"find_service".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____find___u_s_c_o_r_eservice-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#a0">uddi2__find_USCOREservice</a> (struct <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o7">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#a1">uddi2__find_USCOREservice</a> (struct <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o7">soap</a> *, const char *<a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o1">name</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#a2">uddi2__find_USCOREservice</a> (struct <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o7">soap</a> *, std::vector&lt; char * &gt; tModelKeys)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#a3">uddi2__find_USCOREservice</a> (struct <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o7">soap</a> *, std::vector&lt; <a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a> * &gt; keyedReferences)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____service_list.html">uddi2__serviceList</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#a4">send</a> (const char *endpoint)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a4"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____find_qualifiers.html">uddi2__findQualifiers</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o0">findQualifiers</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":findQualifiers.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____name.html">uddi2__name</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o1">name</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__name* with length 0..unbounded.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____category_bag.html">uddi2__categoryBag</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o2">categoryBag</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":categoryBag.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____t_model_bag.html">uddi2__tModelBag</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o3">tModelBag</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":tModelBag.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o4">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o4"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o5">maxRows</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute maxRows of type xs:int.  <a href="#o5"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o6">businessKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute businessKey of type "urn:uddi-org:api_v2":businessKey.  <a href="#o6"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o7">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o7">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o7"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"find_service". 

+<p>

+Represents a request to locate services that meet the specified requirements.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137715">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137715</a><p>

+See also <a class="el" href="example1.html">Code Example 1: Finding a service</a>. 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__find_USCOREservice::uddi2__find_USCOREservice" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__find_USCOREservice::uddi2__find_USCOREservice           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o7">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the find_USCOREservice class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi2__find_USCOREservice::uddi2__find_USCOREservice" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__find_USCOREservice::uddi2__find_USCOREservice           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o7">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>name</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>name</em>&nbsp;</td><td>of the service</td></tr>

+  </table>

+</dl>

+Creates an instance of the find_USCOREservice class using the specified name.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a2" doxytag="uddi2__find_USCOREservice::uddi2__find_USCOREservice" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__find_USCOREservice::uddi2__find_USCOREservice           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o7">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>std::vector&lt; char * &gt;&nbsp;</td>

+          <td class="mdname" nowrap> <em>tModelKeys</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>tModelKeys</em>&nbsp;</td><td>collection of tModel key strings</td></tr>

+  </table>

+</dl>

+Creates an instance of the find_USCOREservice class using the specified tModel keys.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a3" doxytag="uddi2__find_USCOREservice::uddi2__find_USCOREservice" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__find_USCOREservice::uddi2__find_USCOREservice           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o7">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>std::vector&lt; <a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a> * &gt;&nbsp;</td>

+          <td class="mdname" nowrap> <em>keyedReferences</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>keyedReferences</em>&nbsp;</td><td>collection of category keys</td></tr>

+  </table>

+</dl>

+Creates an instance of the find_USCOREservice class using the specified category keys.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a4" doxytag="uddi2__find_USCOREservice::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____service_list.html">uddi2__serviceList</a> * uddi2__find_USCOREservice::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>endpoint</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____service_list.html">uddi2__serviceList</a> object or NULL on error</dd></dl>

+Send a request to a UDDI server to find a list of services.<p>

+See also <a class="el" href="example1.html">Code Example 1: Finding a service</a>.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o6" doxytag="uddi2__find_USCOREservice::businessKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a> <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o6">uddi2__find_USCOREservice::businessKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute businessKey of type "urn:uddi-org:api_v2":businessKey. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__find_USCOREservice::categoryBag" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____category_bag.html">uddi2__categoryBag</a>* <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o2">uddi2__find_USCOREservice::categoryBag</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":categoryBag. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__find_USCOREservice::findQualifiers" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____find_qualifiers.html">uddi2__findQualifiers</a>* <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o0">uddi2__find_USCOREservice::findQualifiers</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":findQualifiers. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__find_USCOREservice::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o4">uddi2__find_USCOREservice::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="uddi2__find_USCOREservice::maxRows" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int* <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o5">uddi2__find_USCOREservice::maxRows</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute maxRows of type xs:int. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__find_USCOREservice::name" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____name.html">uddi2__name</a>* &gt; <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o1">uddi2__find_USCOREservice::name</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__name* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o7" doxytag="uddi2__find_USCOREservice::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o7">soap</a>* <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o7">uddi2__find_USCOREservice::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__find_USCOREservice::tModelBag" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____t_model_bag.html">uddi2__tModelBag</a>* <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o3">uddi2__find_USCOREservice::tModelBag</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":tModelBag. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____find___u_s_c_o_r_et_model-members.html b/doc/uddi2/html/classuddi2____find___u_s_c_o_r_et_model-members.html
new file mode 100644
index 0000000..53476c1
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____find___u_s_c_o_r_et_model-members.html
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__find_USCOREtModel Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html">uddi2__find_USCOREtModel</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o3">categoryBag</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html">uddi2__find_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o0">findQualifiers</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html">uddi2__find_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o4">generic</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html">uddi2__find_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o2">identifierBag</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html">uddi2__find_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o5">maxRows</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html">uddi2__find_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o1">name</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html">uddi2__find_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#a3">send</a>(const char *endpoint)</td><td><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html">uddi2__find_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o6">soap</a></td><td><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html">uddi2__find_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#a0">uddi2__find_USCOREtModel</a>(struct soap *)</td><td><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html">uddi2__find_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#a1">uddi2__find_USCOREtModel</a>(struct soap *, const char *name)</td><td><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html">uddi2__find_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#a2">uddi2__find_USCOREtModel</a>(struct soap *, std::vector&lt; uddi2__keyedReference * &gt; keyedReferences)</td><td><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html">uddi2__find_USCOREtModel</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____find___u_s_c_o_r_et_model.html b/doc/uddi2/html/classuddi2____find___u_s_c_o_r_et_model.html
new file mode 100644
index 0000000..eae002f
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____find___u_s_c_o_r_et_model.html
@@ -0,0 +1,402 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__find_USCOREtModel Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__find_USCOREtModel Class Reference</h1>Schema urn:uddi-org:api_v2:"find_tModel".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____find___u_s_c_o_r_et_model-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#a0">uddi2__find_USCOREtModel</a> (struct <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o6">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#a1">uddi2__find_USCOREtModel</a> (struct <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o6">soap</a> *, const char *<a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o1">name</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#a2">uddi2__find_USCOREtModel</a> (struct <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o6">soap</a> *, std::vector&lt; <a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a> * &gt; keyedReferences)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____t_model_list.html">uddi2__tModelList</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#a3">send</a> (const char *endpoint)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a3"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____find_qualifiers.html">uddi2__findQualifiers</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o0">findQualifiers</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":findQualifiers.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____name.html">uddi2__name</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o1">name</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":name.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____identifier_bag.html">uddi2__identifierBag</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o2">identifierBag</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":identifierBag.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____category_bag.html">uddi2__categoryBag</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o3">categoryBag</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":categoryBag.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o4">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o4"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o5">maxRows</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute maxRows of type xs:int.  <a href="#o5"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o6">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o6">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o6"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"find_tModel". 

+<p>

+Represents a request to locate a list of tModel entries that match a set of specific criteria. The result of a search is a <a class="el" href="classuddi2____t_model_list.html">uddi2__tModelList</a> object that contains information about registered tModel data that matches the criteria.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137716">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137716</a> 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__find_USCOREtModel::uddi2__find_USCOREtModel" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__find_USCOREtModel::uddi2__find_USCOREtModel           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o6">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the find_USCOREtModel class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi2__find_USCOREtModel::uddi2__find_USCOREtModel" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__find_USCOREtModel::uddi2__find_USCOREtModel           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o6">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>name</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>name</em>&nbsp;</td><td>of the tModel</td></tr>

+  </table>

+</dl>

+Creates an instance of the find_USCOREtModel class using the specified tModel name.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a2" doxytag="uddi2__find_USCOREtModel::uddi2__find_USCOREtModel" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__find_USCOREtModel::uddi2__find_USCOREtModel           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o6">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>std::vector&lt; <a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a> * &gt;&nbsp;</td>

+          <td class="mdname" nowrap> <em>keyedReferences</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>keyedReferences</em>&nbsp;</td><td>collection of category keys</td></tr>

+  </table>

+</dl>

+Creates an instance of the find_USCOREtModel class using the specified category keys.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a3" doxytag="uddi2__find_USCOREtModel::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____t_model_list.html">uddi2__tModelList</a> * uddi2__find_USCOREtModel::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>endpoint</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____t_model_list.html">uddi2__tModelList</a> object or NULL on error</dd></dl>

+Send a request to a UDDI server to find a tModelList.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o3" doxytag="uddi2__find_USCOREtModel::categoryBag" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____category_bag.html">uddi2__categoryBag</a>* <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o3">uddi2__find_USCOREtModel::categoryBag</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":categoryBag. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__find_USCOREtModel::findQualifiers" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____find_qualifiers.html">uddi2__findQualifiers</a>* <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o0">uddi2__find_USCOREtModel::findQualifiers</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":findQualifiers. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__find_USCOREtModel::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o4">uddi2__find_USCOREtModel::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__find_USCOREtModel::identifierBag" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____identifier_bag.html">uddi2__identifierBag</a>* <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o2">uddi2__find_USCOREtModel::identifierBag</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":identifierBag. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="uddi2__find_USCOREtModel::maxRows" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int* <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o5">uddi2__find_USCOREtModel::maxRows</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute maxRows of type xs:int. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__find_USCOREtModel::name" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____name.html">uddi2__name</a>* <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o1">uddi2__find_USCOREtModel::name</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":name. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o6" doxytag="uddi2__find_USCOREtModel::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o6">soap</a>* <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o6">uddi2__find_USCOREtModel::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____find_qualifiers-members.html b/doc/uddi2/html/classuddi2____find_qualifiers-members.html
new file mode 100644
index 0000000..9a028f6
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____find_qualifiers-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__findQualifiers Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____find_qualifiers.html">uddi2__findQualifiers</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find_qualifiers.html#o0">findQualifier</a></td><td><a class="el" href="classuddi2____find_qualifiers.html">uddi2__findQualifiers</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____find_qualifiers.html#o1">soap</a></td><td><a class="el" href="classuddi2____find_qualifiers.html">uddi2__findQualifiers</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____find_qualifiers.html b/doc/uddi2/html/classuddi2____find_qualifiers.html
new file mode 100644
index 0000000..d6d878e
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____find_qualifiers.html
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__findQualifiers Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__findQualifiers Class Reference</h1>Schema urn:uddi-org:api_v2:"findQualifiers".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____find_qualifiers-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; char * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find_qualifiers.html#o0">findQualifier</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of char* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____find_qualifiers.html#o1">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find_qualifiers.html#o1">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o1"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"findQualifiers". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__findQualifiers::findQualifier" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;char* &gt; <a class="el" href="classuddi2____find_qualifiers.html#o0">uddi2__findQualifiers::findQualifier</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of char* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__findQualifiers::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____find_qualifiers.html#o1">soap</a>* <a class="el" href="classuddi2____find_qualifiers.html#o1">uddi2__findQualifiers::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____get___u_s_c_o_r_eassertion_status_report-members.html b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_eassertion_status_report-members.html
new file mode 100644
index 0000000..27551ff
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_eassertion_status_report-members.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__get_USCOREassertionStatusReport Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html">uddi2__get_USCOREassertionStatusReport</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o0">authInfo</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html">uddi2__get_USCOREassertionStatusReport</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o1">completionStatus</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html">uddi2__get_USCOREassertionStatusReport</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o2">generic</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html">uddi2__get_USCOREassertionStatusReport</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#a2">send</a>(const char *endpoint, char *authInfo)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html">uddi2__get_USCOREassertionStatusReport</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o3">soap</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html">uddi2__get_USCOREassertionStatusReport</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#a0">uddi2__get_USCOREassertionStatusReport</a>(struct soap *)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html">uddi2__get_USCOREassertionStatusReport</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#a1">uddi2__get_USCOREassertionStatusReport</a>(struct soap *, const char *completionStatus)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html">uddi2__get_USCOREassertionStatusReport</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____get___u_s_c_o_r_eassertion_status_report.html b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_eassertion_status_report.html
new file mode 100644
index 0000000..48f7151
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_eassertion_status_report.html
@@ -0,0 +1,280 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__get_USCOREassertionStatusReport Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__get_USCOREassertionStatusReport Class Reference</h1>Schema urn:uddi-org:api_v2:"get_assertionStatusReport".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____get___u_s_c_o_r_eassertion_status_report-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#a0">uddi2__get_USCOREassertionStatusReport</a> (struct <a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o3">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#a1">uddi2__get_USCOREassertionStatusReport</a> (struct <a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o3">soap</a> *, const char *<a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o1">completionStatus</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____assertion_status_report.html">uddi2__assertionStatusReport</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#a2">send</a> (const char *endpoint, char *<a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o0">authInfo</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o0">authInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":authInfo.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o1">completionStatus</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":completionStatus.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o2">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o3">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o3">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o3"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"get_assertionStatusReport". 

+<p>

+Provides the ability to determine the status of current and outstanding publisher assertions. The results can be restricted by setting the completionStatus property.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137738">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137738</a> 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__get_USCOREassertionStatusReport::uddi2__get_USCOREassertionStatusReport" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__get_USCOREassertionStatusReport::uddi2__get_USCOREassertionStatusReport           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the get_USCOREassertionStatusReport class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi2__get_USCOREassertionStatusReport::uddi2__get_USCOREassertionStatusReport" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__get_USCOREassertionStatusReport::uddi2__get_USCOREassertionStatusReport           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>completionStatus</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>completionStatus</em>&nbsp;</td><td>completion status string</td></tr>

+  </table>

+</dl>

+Creates an instance of the get_USCOREassertionStatusReport class using the specified completion status.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a2" doxytag="uddi2__get_USCOREassertionStatusReport::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____assertion_status_report.html">uddi2__assertionStatusReport</a> * uddi2__get_USCOREassertionStatusReport::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>endpoint</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>authInfo</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>authInfo</em>&nbsp;</td><td>authorization token provided by the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____assertion_status_report.html">uddi2__assertionStatusReport</a> object or NULL on error</dd></dl>

+Send a request to a UDDI service to get the status of current and outstanding publisher assertions.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__get_USCOREassertionStatusReport::authInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o0">uddi2__get_USCOREassertionStatusReport::authInfo</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":authInfo. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__get_USCOREassertionStatusReport::completionStatus" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o1">uddi2__get_USCOREassertionStatusReport::completionStatus</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":completionStatus. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__get_USCOREassertionStatusReport::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o2">uddi2__get_USCOREassertionStatusReport::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__get_USCOREassertionStatusReport::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o3">soap</a>* <a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o3">uddi2__get_USCOREassertionStatusReport::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____get___u_s_c_o_r_eauth_token-members.html b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_eauth_token-members.html
new file mode 100644
index 0000000..c22eb95
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_eauth_token-members.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__get_USCOREauthToken Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html">uddi2__get_USCOREauthToken</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o2">cred</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html">uddi2__get_USCOREauthToken</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o0">generic</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html">uddi2__get_USCOREauthToken</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#a2">send</a>(const char *endpoint)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html">uddi2__get_USCOREauthToken</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o3">soap</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html">uddi2__get_USCOREauthToken</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#a0">uddi2__get_USCOREauthToken</a>(struct soap *)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html">uddi2__get_USCOREauthToken</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#a1">uddi2__get_USCOREauthToken</a>(struct soap *, const char *userid, const char *passwd)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html">uddi2__get_USCOREauthToken</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o1">userID</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html">uddi2__get_USCOREauthToken</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____get___u_s_c_o_r_eauth_token.html b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_eauth_token.html
new file mode 100644
index 0000000..d7b95fa
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_eauth_token.html
@@ -0,0 +1,277 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__get_USCOREauthToken Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__get_USCOREauthToken Class Reference</h1>Schema urn:uddi-org:api_v2:"get_authToken".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____get___u_s_c_o_r_eauth_token-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#a0">uddi2__get_USCOREauthToken</a> (struct <a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o3">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#a1">uddi2__get_USCOREauthToken</a> (struct <a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o3">soap</a> *, const char *userid, const char *passwd)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____auth_token.html">uddi2__authToken</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#a2">send</a> (const char *endpoint)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o0">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o1">userID</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute userID of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o2">cred</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute cred of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o3">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o3">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o3"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"get_authToken". 

+<p>

+Represents a request to obtain an authorization token, which is represented by the <a class="el" href="classuddi2____auth_token.html">uddi2__authToken</a> class.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137739">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137739</a> 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__get_USCOREauthToken::uddi2__get_USCOREauthToken" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__get_USCOREauthToken::uddi2__get_USCOREauthToken           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the get_USCOREauthToken class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi2__get_USCOREauthToken::uddi2__get_USCOREauthToken" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__get_USCOREauthToken::uddi2__get_USCOREauthToken           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>userid</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>passwd</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>userid</em>&nbsp;</td><td>the user ID string </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>passwd</em>&nbsp;</td><td>the password string</td></tr>

+  </table>

+</dl>

+Creates an instance of the get_USCOREauthToken class using the specified user ID and password.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a2" doxytag="uddi2__get_USCOREauthToken::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____auth_token.html">uddi2__authToken</a> * uddi2__get_USCOREauthToken::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>endpoint</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____auth_token.html">uddi2__authToken</a> object or NULL on error</dd></dl>

+Send a request to a UDDI service to get a authorization token given a user ID and password.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o2" doxytag="uddi2__get_USCOREauthToken::cred" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o2">uddi2__get_USCOREauthToken::cred</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute cred of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__get_USCOREauthToken::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o0">uddi2__get_USCOREauthToken::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__get_USCOREauthToken::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o3">soap</a>* <a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o3">uddi2__get_USCOREauthToken::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__get_USCOREauthToken::userID" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o1">uddi2__get_USCOREauthToken::userID</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute userID of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____get___u_s_c_o_r_ebinding_detail-members.html b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_ebinding_detail-members.html
new file mode 100644
index 0000000..14294ac
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_ebinding_detail-members.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__get_USCOREbindingDetail Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html">uddi2__get_USCOREbindingDetail</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#o0">bindingKey</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html">uddi2__get_USCOREbindingDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#o1">generic</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html">uddi2__get_USCOREbindingDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#a3">send</a>(const char *endpoint)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html">uddi2__get_USCOREbindingDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#o2">soap</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html">uddi2__get_USCOREbindingDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#a0">uddi2__get_USCOREbindingDetail</a>(struct soap *)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html">uddi2__get_USCOREbindingDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#a1">uddi2__get_USCOREbindingDetail</a>(struct soap *, const char *bindingKey)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html">uddi2__get_USCOREbindingDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#a2">uddi2__get_USCOREbindingDetail</a>(struct soap *, std::vector&lt; char * &gt; bindingKeys)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html">uddi2__get_USCOREbindingDetail</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____get___u_s_c_o_r_ebinding_detail.html b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_ebinding_detail.html
new file mode 100644
index 0000000..d864911
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_ebinding_detail.html
@@ -0,0 +1,290 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__get_USCOREbindingDetail Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__get_USCOREbindingDetail Class Reference</h1>Schema urn:uddi-org:api_v2:"get_bindingDetail".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____get___u_s_c_o_r_ebinding_detail-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#a0">uddi2__get_USCOREbindingDetail</a> (struct <a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#o2">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#a1">uddi2__get_USCOREbindingDetail</a> (struct <a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#o2">soap</a> *, const char *<a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#o0">bindingKey</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#a2">uddi2__get_USCOREbindingDetail</a> (struct <a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#o2">soap</a> *, std::vector&lt; char * &gt; bindingKeys)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#a3">send</a> (const char *endpoint)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a3"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="uddi__v2_8h.html#a2">uddi2__bindingKey</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#o0">bindingKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__bindingKey with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#o1">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#o2">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#o2">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o2"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"get_bindingDetail". 

+<p>

+Represents a request to get binding details from a UDDI server.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137717">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137717</a> 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__get_USCOREbindingDetail::uddi2__get_USCOREbindingDetail" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__get_USCOREbindingDetail::uddi2__get_USCOREbindingDetail           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#o2">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the get_USCOREbindingDetail class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi2__get_USCOREbindingDetail::uddi2__get_USCOREbindingDetail" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__get_USCOREbindingDetail::uddi2__get_USCOREbindingDetail           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#o2">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>bindingKey</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>bindingKey</em>&nbsp;</td><td>string</td></tr>

+  </table>

+</dl>

+Creates an instance of the get_USCOREbindingDetail class using the specified binding key.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a2" doxytag="uddi2__get_USCOREbindingDetail::uddi2__get_USCOREbindingDetail" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__get_USCOREbindingDetail::uddi2__get_USCOREbindingDetail           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#o2">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>std::vector&lt; char * &gt;&nbsp;</td>

+          <td class="mdname" nowrap> <em>bindingKeys</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>bindingKeys</em>&nbsp;</td><td>collection of key strings</td></tr>

+  </table>

+</dl>

+Creates an instance of the get_USCOREbindingDetail class using the specified collection of binding keys.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a3" doxytag="uddi2__get_USCOREbindingDetail::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a> * uddi2__get_USCOREbindingDetail::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>endpoint</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a> object or NULL on error</dd></dl>

+Send a request to a UDDI server to get the binding details.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__get_USCOREbindingDetail::bindingKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="uddi__v2_8h.html#a2">uddi2__bindingKey</a> &gt; <a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#o0">uddi2__get_USCOREbindingDetail::bindingKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__bindingKey with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__get_USCOREbindingDetail::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#o1">uddi2__get_USCOREbindingDetail::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__get_USCOREbindingDetail::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#o2">soap</a>* <a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#o2">uddi2__get_USCOREbindingDetail::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____get___u_s_c_o_r_ebusiness_detail-members.html b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_ebusiness_detail-members.html
new file mode 100644
index 0000000..79aa3ad
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_ebusiness_detail-members.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__get_USCOREbusinessDetail Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html">uddi2__get_USCOREbusinessDetail</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#o0">businessKey</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html">uddi2__get_USCOREbusinessDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#o1">generic</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html">uddi2__get_USCOREbusinessDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#a3">send</a>(const char *endpoint)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html">uddi2__get_USCOREbusinessDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#o2">soap</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html">uddi2__get_USCOREbusinessDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#a0">uddi2__get_USCOREbusinessDetail</a>(struct soap *)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html">uddi2__get_USCOREbusinessDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#a1">uddi2__get_USCOREbusinessDetail</a>(struct soap *, const char *businessKey)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html">uddi2__get_USCOREbusinessDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#a2">uddi2__get_USCOREbusinessDetail</a>(struct soap *, std::vector&lt; char * &gt; businessKeys)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html">uddi2__get_USCOREbusinessDetail</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____get___u_s_c_o_r_ebusiness_detail.html b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_ebusiness_detail.html
new file mode 100644
index 0000000..d93c624
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_ebusiness_detail.html
@@ -0,0 +1,290 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__get_USCOREbusinessDetail Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__get_USCOREbusinessDetail Class Reference</h1>Schema urn:uddi-org:api_v2:"get_businessDetail".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____get___u_s_c_o_r_ebusiness_detail-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#a0">uddi2__get_USCOREbusinessDetail</a> (struct <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#o2">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#a1">uddi2__get_USCOREbusinessDetail</a> (struct <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#o2">soap</a> *, const char *<a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#o0">businessKey</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#a2">uddi2__get_USCOREbusinessDetail</a> (struct <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#o2">soap</a> *, std::vector&lt; char * &gt; businessKeys)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____business_detail.html">uddi2__businessDetail</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#a3">send</a> (const char *endpoint)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a3"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#o0">businessKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__businessKey with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#o1">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#o2">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#o2">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o2"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"get_businessDetail". 

+<p>

+Represents a request to get business details from a UDDI server.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137718">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137718</a> 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__get_USCOREbusinessDetail::uddi2__get_USCOREbusinessDetail" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__get_USCOREbusinessDetail::uddi2__get_USCOREbusinessDetail           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#o2">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the get_USCOREbusinessDetail class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi2__get_USCOREbusinessDetail::uddi2__get_USCOREbusinessDetail" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__get_USCOREbusinessDetail::uddi2__get_USCOREbusinessDetail           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#o2">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>businessKey</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>businessKey</em>&nbsp;</td><td>string</td></tr>

+  </table>

+</dl>

+Creates an instance of the get_USCOREbusinessDetail class using the specified business key.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a2" doxytag="uddi2__get_USCOREbusinessDetail::uddi2__get_USCOREbusinessDetail" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__get_USCOREbusinessDetail::uddi2__get_USCOREbusinessDetail           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#o2">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>std::vector&lt; char * &gt;&nbsp;</td>

+          <td class="mdname" nowrap> <em>businessKeys</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>businessKeys</em>&nbsp;</td><td>collection of key strings</td></tr>

+  </table>

+</dl>

+Creates an instance of the get_USCOREbusinessDetail class using the specified collection of business keys.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a3" doxytag="uddi2__get_USCOREbusinessDetail::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____business_detail.html">uddi2__businessDetail</a> * uddi2__get_USCOREbusinessDetail::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>endpoint</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____business_detail.html">uddi2__businessDetail</a> object or NULL on error</dd></dl>

+Send a request to a UDDI server to get the business details.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__get_USCOREbusinessDetail::businessKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a> &gt; <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#o0">uddi2__get_USCOREbusinessDetail::businessKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__businessKey with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__get_USCOREbusinessDetail::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#o1">uddi2__get_USCOREbusinessDetail::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__get_USCOREbusinessDetail::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#o2">soap</a>* <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#o2">uddi2__get_USCOREbusinessDetail::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____get___u_s_c_o_r_ebusiness_detail_ext-members.html b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_ebusiness_detail_ext-members.html
new file mode 100644
index 0000000..525ce2d
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_ebusiness_detail_ext-members.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__get_USCOREbusinessDetailExt Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html">uddi2__get_USCOREbusinessDetailExt</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#o0">businessKey</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html">uddi2__get_USCOREbusinessDetailExt</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#o1">generic</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html">uddi2__get_USCOREbusinessDetailExt</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#a3">send</a>(const char *endpoint)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html">uddi2__get_USCOREbusinessDetailExt</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#o2">soap</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html">uddi2__get_USCOREbusinessDetailExt</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#a0">uddi2__get_USCOREbusinessDetailExt</a>(struct soap *)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html">uddi2__get_USCOREbusinessDetailExt</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#a1">uddi2__get_USCOREbusinessDetailExt</a>(struct soap *, const char *businessKey)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html">uddi2__get_USCOREbusinessDetailExt</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#a2">uddi2__get_USCOREbusinessDetailExt</a>(struct soap *, std::vector&lt; char * &gt; businessKeys)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html">uddi2__get_USCOREbusinessDetailExt</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html
new file mode 100644
index 0000000..dab1633
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html
@@ -0,0 +1,290 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__get_USCOREbusinessDetailExt Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__get_USCOREbusinessDetailExt Class Reference</h1>Schema urn:uddi-org:api_v2:"get_businessDetailExt".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#a0">uddi2__get_USCOREbusinessDetailExt</a> (struct <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#o2">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#a1">uddi2__get_USCOREbusinessDetailExt</a> (struct <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#o2">soap</a> *, const char *<a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#o0">businessKey</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#a2">uddi2__get_USCOREbusinessDetailExt</a> (struct <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#o2">soap</a> *, std::vector&lt; char * &gt; businessKeys)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____business_detail_ext.html">uddi2__businessDetailExt</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#a3">send</a> (const char *endpoint)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a3"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#o0">businessKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__businessKey with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#o1">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#o2">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#o2">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o2"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"get_businessDetailExt". 

+<p>

+Represents a request to get business details from a UDDI server.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137719">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137719</a> 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__get_USCOREbusinessDetailExt::uddi2__get_USCOREbusinessDetailExt" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__get_USCOREbusinessDetailExt::uddi2__get_USCOREbusinessDetailExt           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#o2">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the get_USCOREbusinessDetailExt class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi2__get_USCOREbusinessDetailExt::uddi2__get_USCOREbusinessDetailExt" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__get_USCOREbusinessDetailExt::uddi2__get_USCOREbusinessDetailExt           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#o2">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>businessKey</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>businessKey</em>&nbsp;</td><td>string</td></tr>

+  </table>

+</dl>

+Creates an instance of the get_USCOREbusinessDetailExt class using the specified business key.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a2" doxytag="uddi2__get_USCOREbusinessDetailExt::uddi2__get_USCOREbusinessDetailExt" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__get_USCOREbusinessDetailExt::uddi2__get_USCOREbusinessDetailExt           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#o2">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>std::vector&lt; char * &gt;&nbsp;</td>

+          <td class="mdname" nowrap> <em>businessKeys</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>businessKeys</em>&nbsp;</td><td>collection of key strings</td></tr>

+  </table>

+</dl>

+Creates an instance of the get_USCOREbusinessDetailExt class using the specified collection of business keys.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a3" doxytag="uddi2__get_USCOREbusinessDetailExt::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____business_detail_ext.html">uddi2__businessDetailExt</a> * uddi2__get_USCOREbusinessDetailExt::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>endpoint</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____business_detail_ext.html">uddi2__businessDetailExt</a> object or NULL on error</dd></dl>

+Send a request to a UDDI server to get the business details.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__get_USCOREbusinessDetailExt::businessKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a> &gt; <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#o0">uddi2__get_USCOREbusinessDetailExt::businessKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__businessKey with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__get_USCOREbusinessDetailExt::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#o1">uddi2__get_USCOREbusinessDetailExt::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__get_USCOREbusinessDetailExt::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#o2">soap</a>* <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#o2">uddi2__get_USCOREbusinessDetailExt::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____get___u_s_c_o_r_epublisher_assertions-members.html b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_epublisher_assertions-members.html
new file mode 100644
index 0000000..4b1f05f
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_epublisher_assertions-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__get_USCOREpublisherAssertions Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html">uddi2__get_USCOREpublisherAssertions</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#o0">authInfo</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html">uddi2__get_USCOREpublisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#o1">generic</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html">uddi2__get_USCOREpublisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#a1">send</a>(const char *endpoint, char *authInfo)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html">uddi2__get_USCOREpublisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#o2">soap</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html">uddi2__get_USCOREpublisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#a0">uddi2__get_USCOREpublisherAssertions</a>(struct soap *)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html">uddi2__get_USCOREpublisherAssertions</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____get___u_s_c_o_r_epublisher_assertions.html b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_epublisher_assertions.html
new file mode 100644
index 0000000..15d3544
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_epublisher_assertions.html
@@ -0,0 +1,204 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__get_USCOREpublisherAssertions Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__get_USCOREpublisherAssertions Class Reference</h1>Schema urn:uddi-org:api_v2:"get_publisherAssertions".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____get___u_s_c_o_r_epublisher_assertions-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#a0">uddi2__get_USCOREpublisherAssertions</a> (struct <a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#o2">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____publisher_assertions.html">uddi2__publisherAssertions</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#a1">send</a> (const char *endpoint, char *<a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#o0">authInfo</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#o0">authInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":authInfo.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#o1">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#o2">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#o2">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o2"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"get_publisherAssertions". 

+<p>

+Represents a request to obtain the full set of publisher assertions that are associated with an individual publisher.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137740">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137740</a> 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__get_USCOREpublisherAssertions::uddi2__get_USCOREpublisherAssertions" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__get_USCOREpublisherAssertions::uddi2__get_USCOREpublisherAssertions           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#o2">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the get_USCOREpublisherAssetions class.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a1" doxytag="uddi2__get_USCOREpublisherAssertions::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____publisher_assertions.html">uddi2__publisherAssertions</a> * uddi2__get_USCOREpublisherAssertions::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>endpoint</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>authInfo</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>authInfo</em>&nbsp;</td><td>authorization token provided by the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____publisher_assertions.html">uddi2__publisherAssertions</a> object or NULL on error</dd></dl>

+Send a request to a UDDI service to get publisher assertions.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__get_USCOREpublisherAssertions::authInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#o0">uddi2__get_USCOREpublisherAssertions::authInfo</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":authInfo. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__get_USCOREpublisherAssertions::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#o1">uddi2__get_USCOREpublisherAssertions::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__get_USCOREpublisherAssertions::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#o2">soap</a>* <a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#o2">uddi2__get_USCOREpublisherAssertions::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____get___u_s_c_o_r_eregistered_info-members.html b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_eregistered_info-members.html
new file mode 100644
index 0000000..e3d317f
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_eregistered_info-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__get_USCOREregisteredInfo Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html">uddi2__get_USCOREregisteredInfo</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#o0">authInfo</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html">uddi2__get_USCOREregisteredInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#o1">generic</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html">uddi2__get_USCOREregisteredInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#a1">send</a>(const char *endpoint, char *authInfo)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html">uddi2__get_USCOREregisteredInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#o2">soap</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html">uddi2__get_USCOREregisteredInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#a0">uddi2__get_USCOREregisteredInfo</a>(struct soap *)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html">uddi2__get_USCOREregisteredInfo</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____get___u_s_c_o_r_eregistered_info.html b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_eregistered_info.html
new file mode 100644
index 0000000..321515b
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_eregistered_info.html
@@ -0,0 +1,204 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__get_USCOREregisteredInfo Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__get_USCOREregisteredInfo Class Reference</h1>Schema urn:uddi-org:api_v2:"get_registeredInfo".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____get___u_s_c_o_r_eregistered_info-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#a0">uddi2__get_USCOREregisteredInfo</a> (struct <a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#o2">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____registered_info.html">uddi2__registeredInfo</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#a1">send</a> (const char *endpoint, char *<a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#o0">authInfo</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#o0">authInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":authInfo.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#o1">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#o2">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#o2">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o2"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"get_registeredInfo". 

+<p>

+Represents a request to get all registered business entities and tModels controlled by an individual.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137741">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137741</a> 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__get_USCOREregisteredInfo::uddi2__get_USCOREregisteredInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__get_USCOREregisteredInfo::uddi2__get_USCOREregisteredInfo           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#o2">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the get_USCOREregisteredInfo class.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a1" doxytag="uddi2__get_USCOREregisteredInfo::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____registered_info.html">uddi2__registeredInfo</a> * uddi2__get_USCOREregisteredInfo::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>endpoint</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>authInfo</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>authInfo</em>&nbsp;</td><td>authorization token provided by the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____registered_info.html">uddi2__registeredInfo</a> object or NULL on error</dd></dl>

+Send a request to a UDDI service to get all registered business entities and tModels controlled by an individual.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__get_USCOREregisteredInfo::authInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#o0">uddi2__get_USCOREregisteredInfo::authInfo</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":authInfo. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__get_USCOREregisteredInfo::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#o1">uddi2__get_USCOREregisteredInfo::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__get_USCOREregisteredInfo::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#o2">soap</a>* <a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#o2">uddi2__get_USCOREregisteredInfo::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____get___u_s_c_o_r_eservice_detail-members.html b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_eservice_detail-members.html
new file mode 100644
index 0000000..7e1b18a
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_eservice_detail-members.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__get_USCOREserviceDetail Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html">uddi2__get_USCOREserviceDetail</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#o1">generic</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html">uddi2__get_USCOREserviceDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#a3">send</a>(const char *endpoint)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html">uddi2__get_USCOREserviceDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#o0">serviceKey</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html">uddi2__get_USCOREserviceDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#o2">soap</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html">uddi2__get_USCOREserviceDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#a0">uddi2__get_USCOREserviceDetail</a>(struct soap *)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html">uddi2__get_USCOREserviceDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#a1">uddi2__get_USCOREserviceDetail</a>(struct soap *, const char *serviceKey)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html">uddi2__get_USCOREserviceDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#a2">uddi2__get_USCOREserviceDetail</a>(struct soap *, std::vector&lt; char * &gt; serviceKeys)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html">uddi2__get_USCOREserviceDetail</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____get___u_s_c_o_r_eservice_detail.html b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_eservice_detail.html
new file mode 100644
index 0000000..1e49cf8
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_eservice_detail.html
@@ -0,0 +1,290 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__get_USCOREserviceDetail Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__get_USCOREserviceDetail Class Reference</h1>Schema urn:uddi-org:api_v2:"get_serviceDetail".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____get___u_s_c_o_r_eservice_detail-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#a0">uddi2__get_USCOREserviceDetail</a> (struct <a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#o2">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#a1">uddi2__get_USCOREserviceDetail</a> (struct <a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#o2">soap</a> *, const char *<a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#o0">serviceKey</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#a2">uddi2__get_USCOREserviceDetail</a> (struct <a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#o2">soap</a> *, std::vector&lt; char * &gt; serviceKeys)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____service_detail.html">uddi2__serviceDetail</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#a3">send</a> (const char *endpoint)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a3"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="uddi__v2_8h.html#a4">uddi2__serviceKey</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#o0">serviceKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__serviceKey with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#o1">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#o2">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#o2">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o2"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"get_serviceDetail". 

+<p>

+Represents a request to get service details from a UDDI server.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137720">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137720</a> 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__get_USCOREserviceDetail::uddi2__get_USCOREserviceDetail" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__get_USCOREserviceDetail::uddi2__get_USCOREserviceDetail           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#o2">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the get_USCOREserviceDetail class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi2__get_USCOREserviceDetail::uddi2__get_USCOREserviceDetail" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__get_USCOREserviceDetail::uddi2__get_USCOREserviceDetail           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#o2">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>serviceKey</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>serviceKey</em>&nbsp;</td><td>string</td></tr>

+  </table>

+</dl>

+Creates an instance of the get_USCOREserviceDetail class using the specified service key.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a2" doxytag="uddi2__get_USCOREserviceDetail::uddi2__get_USCOREserviceDetail" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__get_USCOREserviceDetail::uddi2__get_USCOREserviceDetail           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#o2">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>std::vector&lt; char * &gt;&nbsp;</td>

+          <td class="mdname" nowrap> <em>serviceKeys</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>serviceKeys</em>&nbsp;</td><td>collection of key strings</td></tr>

+  </table>

+</dl>

+Creates an instance of the get_USCOREserviceDetail class using the specified collection of service keys.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a3" doxytag="uddi2__get_USCOREserviceDetail::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____service_detail.html">uddi2__serviceDetail</a> * uddi2__get_USCOREserviceDetail::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>endpoint</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____service_detail.html">uddi2__serviceDetail</a> object or NULL on error</dd></dl>

+Send a request to a UDDI server to get the service details.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o1" doxytag="uddi2__get_USCOREserviceDetail::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#o1">uddi2__get_USCOREserviceDetail::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__get_USCOREserviceDetail::serviceKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="uddi__v2_8h.html#a4">uddi2__serviceKey</a> &gt; <a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#o0">uddi2__get_USCOREserviceDetail::serviceKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__serviceKey with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__get_USCOREserviceDetail::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#o2">soap</a>* <a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#o2">uddi2__get_USCOREserviceDetail::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____get___u_s_c_o_r_et_model_detail-members.html b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_et_model_detail-members.html
new file mode 100644
index 0000000..17ca5b5
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_et_model_detail-members.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__get_USCOREtModelDetail Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html">uddi2__get_USCOREtModelDetail</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#o1">generic</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html">uddi2__get_USCOREtModelDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#a3">send</a>(const char *endpoint)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html">uddi2__get_USCOREtModelDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#o2">soap</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html">uddi2__get_USCOREtModelDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#o0">tModelKey</a></td><td><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html">uddi2__get_USCOREtModelDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#a0">uddi2__get_USCOREtModelDetail</a>(struct soap *)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html">uddi2__get_USCOREtModelDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#a1">uddi2__get_USCOREtModelDetail</a>(struct soap *, const char *tModelKey)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html">uddi2__get_USCOREtModelDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#a2">uddi2__get_USCOREtModelDetail</a>(struct soap *, std::vector&lt; char * &gt; tModelKeys)</td><td><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html">uddi2__get_USCOREtModelDetail</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____get___u_s_c_o_r_et_model_detail.html b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_et_model_detail.html
new file mode 100644
index 0000000..1fdc7de
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____get___u_s_c_o_r_et_model_detail.html
@@ -0,0 +1,290 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__get_USCOREtModelDetail Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__get_USCOREtModelDetail Class Reference</h1>Schema urn:uddi-org:api_v2:"get_tModelDetail".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____get___u_s_c_o_r_et_model_detail-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#a0">uddi2__get_USCOREtModelDetail</a> (struct <a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#o2">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#a1">uddi2__get_USCOREtModelDetail</a> (struct <a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#o2">soap</a> *, const char *<a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#o0">tModelKey</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#a2">uddi2__get_USCOREtModelDetail</a> (struct <a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#o2">soap</a> *, std::vector&lt; char * &gt; tModelKeys)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____t_model_detail.html">uddi2__tModelDetail</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#a3">send</a> (const char *endpoint)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a3"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="uddi__v2_8h.html#a5">uddi2__tModelKey</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#o0">tModelKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__tModelKey with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#o1">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#o2">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#o2">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o2"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"get_tModelDetail". 

+<p>

+Represents a request to get tModel details from a UDDI server.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137721">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137721</a> 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__get_USCOREtModelDetail::uddi2__get_USCOREtModelDetail" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__get_USCOREtModelDetail::uddi2__get_USCOREtModelDetail           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#o2">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the get_USCOREtModelDetail class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi2__get_USCOREtModelDetail::uddi2__get_USCOREtModelDetail" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__get_USCOREtModelDetail::uddi2__get_USCOREtModelDetail           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#o2">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>tModelKey</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>tModelKey</em>&nbsp;</td><td>string</td></tr>

+  </table>

+</dl>

+Creates an instance of the get_USCOREtModelDetail class using the specified tModel key.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a2" doxytag="uddi2__get_USCOREtModelDetail::uddi2__get_USCOREtModelDetail" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__get_USCOREtModelDetail::uddi2__get_USCOREtModelDetail           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#o2">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>std::vector&lt; char * &gt;&nbsp;</td>

+          <td class="mdname" nowrap> <em>tModelKeys</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>tModelKeys</em>&nbsp;</td><td>collection of key strings</td></tr>

+  </table>

+</dl>

+Creates an instance of the get_USCOREtModelDetail class using the specified collection of tModel keys.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a3" doxytag="uddi2__get_USCOREtModelDetail::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____t_model_detail.html">uddi2__tModelDetail</a> * uddi2__get_USCOREtModelDetail::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>endpoint</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____t_model_detail.html">uddi2__tModelDetail</a> object or NULL on error</dd></dl>

+Send a request to a UDDI server to get the tModel details.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o1" doxytag="uddi2__get_USCOREtModelDetail::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#o1">uddi2__get_USCOREtModelDetail::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__get_USCOREtModelDetail::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#o2">soap</a>* <a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#o2">uddi2__get_USCOREtModelDetail::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__get_USCOREtModelDetail::tModelKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="uddi__v2_8h.html#a5">uddi2__tModelKey</a> &gt; <a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#o0">uddi2__get_USCOREtModelDetail::tModelKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__tModelKey with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____hosting_redirector-members.html b/doc/uddi2/html/classuddi2____hosting_redirector-members.html
new file mode 100644
index 0000000..55e972e
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____hosting_redirector-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__hostingRedirector Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____hosting_redirector.html">uddi2__hostingRedirector</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____hosting_redirector.html#o0">bindingKey</a></td><td><a class="el" href="classuddi2____hosting_redirector.html">uddi2__hostingRedirector</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____hosting_redirector.html#o1">soap</a></td><td><a class="el" href="classuddi2____hosting_redirector.html">uddi2__hostingRedirector</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____hosting_redirector.html b/doc/uddi2/html/classuddi2____hosting_redirector.html
new file mode 100644
index 0000000..f0ea65b
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____hosting_redirector.html
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__hostingRedirector Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__hostingRedirector Class Reference</h1>Schema urn:uddi-org:api_v2:"hostingRedirector".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____hosting_redirector-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a2">uddi2__bindingKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____hosting_redirector.html#o0">bindingKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute bindingKey of type "urn:uddi-org:api_v2":bindingKey.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____hosting_redirector.html#o1">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____hosting_redirector.html#o1">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o1"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"hostingRedirector". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__hostingRedirector::bindingKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a2">uddi2__bindingKey</a> <a class="el" href="classuddi2____hosting_redirector.html#o0">uddi2__hostingRedirector::bindingKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute bindingKey of type "urn:uddi-org:api_v2":bindingKey. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__hostingRedirector::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____hosting_redirector.html#o1">soap</a>* <a class="el" href="classuddi2____hosting_redirector.html#o1">uddi2__hostingRedirector::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____identifier_bag-members.html b/doc/uddi2/html/classuddi2____identifier_bag-members.html
new file mode 100644
index 0000000..94fa737
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____identifier_bag-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__identifierBag Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____identifier_bag.html">uddi2__identifierBag</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____identifier_bag.html#o0">keyedReference</a></td><td><a class="el" href="classuddi2____identifier_bag.html">uddi2__identifierBag</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____identifier_bag.html#o1">soap</a></td><td><a class="el" href="classuddi2____identifier_bag.html">uddi2__identifierBag</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____identifier_bag.html b/doc/uddi2/html/classuddi2____identifier_bag.html
new file mode 100644
index 0000000..386783e
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____identifier_bag.html
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__identifierBag Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__identifierBag Class Reference</h1>Schema urn:uddi-org:api_v2:"identifierBag".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____identifier_bag-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____identifier_bag.html#o0">keyedReference</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__keyedReference* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____identifier_bag.html#o1">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____identifier_bag.html#o1">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o1"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"identifierBag". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__identifierBag::keyedReference" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a>* &gt; <a class="el" href="classuddi2____identifier_bag.html#o0">uddi2__identifierBag::keyedReference</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__keyedReference* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__identifierBag::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____identifier_bag.html#o1">soap</a>* <a class="el" href="classuddi2____identifier_bag.html#o1">uddi2__identifierBag::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____instance_details-members.html b/doc/uddi2/html/classuddi2____instance_details-members.html
new file mode 100644
index 0000000..cf8473a
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____instance_details-members.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__instanceDetails Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____instance_details.html">uddi2__instanceDetails</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____instance_details.html#o0">description</a></td><td><a class="el" href="classuddi2____instance_details.html">uddi2__instanceDetails</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____instance_details.html#o2">instanceParms</a></td><td><a class="el" href="classuddi2____instance_details.html">uddi2__instanceDetails</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____instance_details.html#o1">overviewDoc</a></td><td><a class="el" href="classuddi2____instance_details.html">uddi2__instanceDetails</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____instance_details.html#o3">soap</a></td><td><a class="el" href="classuddi2____instance_details.html">uddi2__instanceDetails</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____instance_details.html b/doc/uddi2/html/classuddi2____instance_details.html
new file mode 100644
index 0000000..1f8842a
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____instance_details.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__instanceDetails Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__instanceDetails Class Reference</h1>Schema urn:uddi-org:api_v2:"instanceDetails".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____instance_details-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____description.html">uddi2__description</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____instance_details.html#o0">description</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__description* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____overview_doc.html">uddi2__overviewDoc</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____instance_details.html#o1">overviewDoc</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":overviewDoc.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____instance_details.html#o2">instanceParms</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":instanceParms.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____instance_details.html#o3">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____instance_details.html#o3">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o3"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"instanceDetails". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__instanceDetails::description" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____description.html">uddi2__description</a>* &gt; <a class="el" href="classuddi2____instance_details.html#o0">uddi2__instanceDetails::description</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__description* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__instanceDetails::instanceParms" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____instance_details.html#o2">uddi2__instanceDetails::instanceParms</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":instanceParms. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__instanceDetails::overviewDoc" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____overview_doc.html">uddi2__overviewDoc</a>* <a class="el" href="classuddi2____instance_details.html#o1">uddi2__instanceDetails::overviewDoc</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":overviewDoc. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__instanceDetails::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____instance_details.html#o3">soap</a>* <a class="el" href="classuddi2____instance_details.html#o3">uddi2__instanceDetails::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____keyed_reference-members.html b/doc/uddi2/html/classuddi2____keyed_reference-members.html
new file mode 100644
index 0000000..bbc3236
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____keyed_reference-members.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__keyedReference Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____keyed_reference.html#o1">keyName</a></td><td><a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____keyed_reference.html#o2">keyValue</a></td><td><a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____keyed_reference.html#o3">soap</a></td><td><a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____keyed_reference.html#o0">tModelKey</a></td><td><a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____keyed_reference.html b/doc/uddi2/html/classuddi2____keyed_reference.html
new file mode 100644
index 0000000..da7dbe3
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____keyed_reference.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__keyedReference Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__keyedReference Class Reference</h1>Schema urn:uddi-org:api_v2:"keyedReference".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____keyed_reference-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a5">uddi2__tModelKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____keyed_reference.html#o0">tModelKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____keyed_reference.html#o1">keyName</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute keyName of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____keyed_reference.html#o2">keyValue</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute keyValue of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____keyed_reference.html#o3">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____keyed_reference.html#o3">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o3"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"keyedReference". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o1" doxytag="uddi2__keyedReference::keyName" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____keyed_reference.html#o1">uddi2__keyedReference::keyName</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute keyName of type xs:string. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__keyedReference::keyValue" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____keyed_reference.html#o2">uddi2__keyedReference::keyValue</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute keyValue of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__keyedReference::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____keyed_reference.html#o3">soap</a>* <a class="el" href="classuddi2____keyed_reference.html#o3">uddi2__keyedReference::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__keyedReference::tModelKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a5">uddi2__tModelKey</a> <a class="el" href="classuddi2____keyed_reference.html#o0">uddi2__keyedReference::tModelKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____keys_owned-members.html b/doc/uddi2/html/classuddi2____keys_owned-members.html
new file mode 100644
index 0000000..efcea95
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____keys_owned-members.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__keysOwned Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____keys_owned.html">uddi2__keysOwned</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____keys_owned.html#o0">fromKey</a></td><td><a class="el" href="classuddi2____keys_owned.html">uddi2__keysOwned</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____keys_owned.html#o2">soap</a></td><td><a class="el" href="classuddi2____keys_owned.html">uddi2__keysOwned</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____keys_owned.html#o1">toKey</a></td><td><a class="el" href="classuddi2____keys_owned.html">uddi2__keysOwned</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____keys_owned.html b/doc/uddi2/html/classuddi2____keys_owned.html
new file mode 100644
index 0000000..d17886a
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____keys_owned.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__keysOwned Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__keysOwned Class Reference</h1>Schema urn:uddi-org:api_v2:"keysOwned".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____keys_owned-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____keys_owned.html#o0">fromKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":fromKey.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____keys_owned.html#o1">toKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":toKey.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____keys_owned.html#o2">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____keys_owned.html#o2">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o2"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"keysOwned". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__keysOwned::fromKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a> <a class="el" href="classuddi2____keys_owned.html#o0">uddi2__keysOwned::fromKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":fromKey. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__keysOwned::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____keys_owned.html#o2">soap</a>* <a class="el" href="classuddi2____keys_owned.html#o2">uddi2__keysOwned::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__keysOwned::toKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a> <a class="el" href="classuddi2____keys_owned.html#o1">uddi2__keysOwned::toKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":toKey. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____name-members.html b/doc/uddi2/html/classuddi2____name-members.html
new file mode 100644
index 0000000..b610bf4
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____name-members.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__name Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____name.html">uddi2__name</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____name.html#o0">__item</a></td><td><a class="el" href="classuddi2____name.html">uddi2__name</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____name.html#o2">soap</a></td><td><a class="el" href="classuddi2____name.html">uddi2__name</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____name.html#o1">xml__lang_</a></td><td><a class="el" href="classuddi2____name.html">uddi2__name</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____name.html b/doc/uddi2/html/classuddi2____name.html
new file mode 100644
index 0000000..4fe5b5e
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____name.html
@@ -0,0 +1,108 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__name Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__name Class Reference</h1>Schema urn:uddi-org:api_v2:"name".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____name-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____name.html#o0">__item</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a1">xml__lang</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____name.html#o1">xml__lang_</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute reference xml:lang.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____name.html#o2">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____name.html#o2">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o2"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"name". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__name::__item" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____name.html#o0">uddi2__name::__item</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__name::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____name.html#o2">soap</a>* <a class="el" href="classuddi2____name.html#o2">uddi2__name::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__name::xml__lang_" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a1">xml__lang</a> <a class="el" href="classuddi2____name.html#o1">uddi2__name::xml__lang_</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute reference xml:lang. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____overview_doc-members.html b/doc/uddi2/html/classuddi2____overview_doc-members.html
new file mode 100644
index 0000000..53c7d0b
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____overview_doc-members.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__overviewDoc Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____overview_doc.html">uddi2__overviewDoc</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____overview_doc.html#o0">description</a></td><td><a class="el" href="classuddi2____overview_doc.html">uddi2__overviewDoc</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____overview_doc.html#o1">overviewURL</a></td><td><a class="el" href="classuddi2____overview_doc.html">uddi2__overviewDoc</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____overview_doc.html#o2">soap</a></td><td><a class="el" href="classuddi2____overview_doc.html">uddi2__overviewDoc</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____overview_doc.html b/doc/uddi2/html/classuddi2____overview_doc.html
new file mode 100644
index 0000000..54ab638
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____overview_doc.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__overviewDoc Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__overviewDoc Class Reference</h1>Schema urn:uddi-org:api_v2:"overviewDoc".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____overview_doc-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____description.html">uddi2__description</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____overview_doc.html#o0">description</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__description* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____overview_doc.html#o1">overviewURL</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":overviewURL.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____overview_doc.html#o2">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____overview_doc.html#o2">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o2"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"overviewDoc". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__overviewDoc::description" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____description.html">uddi2__description</a>* &gt; <a class="el" href="classuddi2____overview_doc.html#o0">uddi2__overviewDoc::description</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__description* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__overviewDoc::overviewURL" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____overview_doc.html#o1">uddi2__overviewDoc::overviewURL</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":overviewURL. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__overviewDoc::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____overview_doc.html#o2">soap</a>* <a class="el" href="classuddi2____overview_doc.html#o2">uddi2__overviewDoc::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____phone-members.html b/doc/uddi2/html/classuddi2____phone-members.html
new file mode 100644
index 0000000..82ae57b
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____phone-members.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__phone Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____phone.html">uddi2__phone</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____phone.html#o0">__item</a></td><td><a class="el" href="classuddi2____phone.html">uddi2__phone</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____phone.html#o2">soap</a></td><td><a class="el" href="classuddi2____phone.html">uddi2__phone</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____phone.html#o1">useType</a></td><td><a class="el" href="classuddi2____phone.html">uddi2__phone</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____phone.html b/doc/uddi2/html/classuddi2____phone.html
new file mode 100644
index 0000000..d271f17
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____phone.html
@@ -0,0 +1,108 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__phone Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__phone Class Reference</h1>Schema urn:uddi-org:api_v2:"phone".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____phone-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____phone.html#o0">__item</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____phone.html#o1">useType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute useType of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____phone.html#o2">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____phone.html#o2">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o2"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"phone". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__phone::__item" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____phone.html#o0">uddi2__phone::__item</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__phone::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____phone.html#o2">soap</a>* <a class="el" href="classuddi2____phone.html#o2">uddi2__phone::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__phone::useType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____phone.html#o1">uddi2__phone::useType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute useType of type xs:string. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____publisher_assertion-members.html b/doc/uddi2/html/classuddi2____publisher_assertion-members.html
new file mode 100644
index 0000000..8ca6b89
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____publisher_assertion-members.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__publisherAssertion Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____publisher_assertion.html">uddi2__publisherAssertion</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____publisher_assertion.html#o0">fromKey</a></td><td><a class="el" href="classuddi2____publisher_assertion.html">uddi2__publisherAssertion</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____publisher_assertion.html#o2">keyedReference</a></td><td><a class="el" href="classuddi2____publisher_assertion.html">uddi2__publisherAssertion</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____publisher_assertion.html#o3">soap</a></td><td><a class="el" href="classuddi2____publisher_assertion.html">uddi2__publisherAssertion</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____publisher_assertion.html#o1">toKey</a></td><td><a class="el" href="classuddi2____publisher_assertion.html">uddi2__publisherAssertion</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____publisher_assertion.html b/doc/uddi2/html/classuddi2____publisher_assertion.html
new file mode 100644
index 0000000..a2c5eaa
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____publisher_assertion.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__publisherAssertion Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__publisherAssertion Class Reference</h1>Schema urn:uddi-org:api_v2:"publisherAssertion".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____publisher_assertion-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____publisher_assertion.html#o0">fromKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":fromKey.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____publisher_assertion.html#o1">toKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":toKey.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____publisher_assertion.html#o2">keyedReference</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":keyedReference.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____publisher_assertion.html#o3">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____publisher_assertion.html#o3">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o3"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"publisherAssertion". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__publisherAssertion::fromKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a> <a class="el" href="classuddi2____publisher_assertion.html#o0">uddi2__publisherAssertion::fromKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":fromKey. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__publisherAssertion::keyedReference" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a>* <a class="el" href="classuddi2____publisher_assertion.html#o2">uddi2__publisherAssertion::keyedReference</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":keyedReference. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__publisherAssertion::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____publisher_assertion.html#o3">soap</a>* <a class="el" href="classuddi2____publisher_assertion.html#o3">uddi2__publisherAssertion::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__publisherAssertion::toKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a> <a class="el" href="classuddi2____publisher_assertion.html#o1">uddi2__publisherAssertion::toKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":toKey. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:59 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____publisher_assertions-members.html b/doc/uddi2/html/classuddi2____publisher_assertions-members.html
new file mode 100644
index 0000000..462e2d6
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____publisher_assertions-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__publisherAssertions Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____publisher_assertions.html">uddi2__publisherAssertions</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____publisher_assertions.html#o3">authorizedName</a></td><td><a class="el" href="classuddi2____publisher_assertions.html">uddi2__publisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____publisher_assertions.html#o1">generic</a></td><td><a class="el" href="classuddi2____publisher_assertions.html">uddi2__publisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____publisher_assertions.html#o2">operator_</a></td><td><a class="el" href="classuddi2____publisher_assertions.html">uddi2__publisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____publisher_assertions.html#o0">publisherAssertion</a></td><td><a class="el" href="classuddi2____publisher_assertions.html">uddi2__publisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____publisher_assertions.html#o4">soap</a></td><td><a class="el" href="classuddi2____publisher_assertions.html">uddi2__publisherAssertions</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____publisher_assertions.html b/doc/uddi2/html/classuddi2____publisher_assertions.html
new file mode 100644
index 0000000..82fb84a
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____publisher_assertions.html
@@ -0,0 +1,167 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__publisherAssertions Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__publisherAssertions Class Reference</h1>Schema urn:uddi-org:api_v2:"publisherAssertions".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____publisher_assertions-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____publisher_assertion.html">uddi2__publisherAssertion</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____publisher_assertions.html#o0">publisherAssertion</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__publisherAssertion* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____publisher_assertions.html#o1">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____publisher_assertions.html#o2">operator_</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute operator of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____publisher_assertions.html#o3">authorizedName</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute authorizedName of type xs:string.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____publisher_assertions.html#o4">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____publisher_assertions.html#o4">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o4"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"publisherAssertions". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o3" doxytag="uddi2__publisherAssertions::authorizedName" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____publisher_assertions.html#o3">uddi2__publisherAssertions::authorizedName</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute authorizedName of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__publisherAssertions::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____publisher_assertions.html#o1">uddi2__publisherAssertions::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__publisherAssertions::operator_" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____publisher_assertions.html#o2">uddi2__publisherAssertions::operator_</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute operator of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__publisherAssertions::publisherAssertion" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____publisher_assertion.html">uddi2__publisherAssertion</a>*&gt; <a class="el" href="classuddi2____publisher_assertions.html#o0">uddi2__publisherAssertions::publisherAssertion</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__publisherAssertion* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__publisherAssertions::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____publisher_assertions.html#o4">soap</a>* <a class="el" href="classuddi2____publisher_assertions.html#o4">uddi2__publisherAssertions::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____registered_info-members.html b/doc/uddi2/html/classuddi2____registered_info-members.html
new file mode 100644
index 0000000..dd08b31
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____registered_info-members.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__registeredInfo Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____registered_info.html">uddi2__registeredInfo</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____registered_info.html#o0">businessInfos</a></td><td><a class="el" href="classuddi2____registered_info.html">uddi2__registeredInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____registered_info.html#o2">generic</a></td><td><a class="el" href="classuddi2____registered_info.html">uddi2__registeredInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____registered_info.html#o3">operator_</a></td><td><a class="el" href="classuddi2____registered_info.html">uddi2__registeredInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____registered_info.html#o5">soap</a></td><td><a class="el" href="classuddi2____registered_info.html">uddi2__registeredInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____registered_info.html#o1">tModelInfos</a></td><td><a class="el" href="classuddi2____registered_info.html">uddi2__registeredInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____registered_info.html#o4">truncated</a></td><td><a class="el" href="classuddi2____registered_info.html">uddi2__registeredInfo</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____registered_info.html b/doc/uddi2/html/classuddi2____registered_info.html
new file mode 100644
index 0000000..cf47747
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____registered_info.html
@@ -0,0 +1,195 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__registeredInfo Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__registeredInfo Class Reference</h1>Schema urn:uddi-org:api_v2:"registeredInfo".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____registered_info-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____business_infos.html">uddi2__businessInfos</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____registered_info.html#o0">businessInfos</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":businessInfos.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____t_model_infos.html">uddi2__tModelInfos</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____registered_info.html#o1">tModelInfos</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":tModelInfos.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____registered_info.html#o2">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____registered_info.html#o3">operator_</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute operator of type xs:string.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>enum <a class="el" href="uddi__v2_8h.html#a48">uddi2__truncated</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____registered_info.html#o4">truncated</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute truncated of type "urn:uddi-org:api_v2":truncated.  <a href="#o4"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____registered_info.html#o5">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____registered_info.html#o5">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o5"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"registeredInfo". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__registeredInfo::businessInfos" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____business_infos.html">uddi2__businessInfos</a>* <a class="el" href="classuddi2____registered_info.html#o0">uddi2__registeredInfo::businessInfos</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":businessInfos. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__registeredInfo::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____registered_info.html#o2">uddi2__registeredInfo::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__registeredInfo::operator_" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____registered_info.html#o3">uddi2__registeredInfo::operator_</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute operator of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="uddi2__registeredInfo::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____registered_info.html#o5">soap</a>* <a class="el" href="classuddi2____registered_info.html#o5">uddi2__registeredInfo::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__registeredInfo::tModelInfos" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____t_model_infos.html">uddi2__tModelInfos</a>* <a class="el" href="classuddi2____registered_info.html#o1">uddi2__registeredInfo::tModelInfos</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":tModelInfos. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__registeredInfo::truncated" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> enum <a class="el" href="uddi__v2_8h.html#a48">uddi2__truncated</a>* <a class="el" href="classuddi2____registered_info.html#o4">uddi2__registeredInfo::truncated</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute truncated of type "urn:uddi-org:api_v2":truncated. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____related_business_info-members.html b/doc/uddi2/html/classuddi2____related_business_info-members.html
new file mode 100644
index 0000000..6c660ca
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____related_business_info-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__relatedBusinessInfo Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____related_business_info.html">uddi2__relatedBusinessInfo</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____related_business_info.html#o0">businessKey</a></td><td><a class="el" href="classuddi2____related_business_info.html">uddi2__relatedBusinessInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____related_business_info.html#o2">description</a></td><td><a class="el" href="classuddi2____related_business_info.html">uddi2__relatedBusinessInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____related_business_info.html#o1">name</a></td><td><a class="el" href="classuddi2____related_business_info.html">uddi2__relatedBusinessInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____related_business_info.html#o3">sharedRelationships</a></td><td><a class="el" href="classuddi2____related_business_info.html">uddi2__relatedBusinessInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____related_business_info.html#o4">soap</a></td><td><a class="el" href="classuddi2____related_business_info.html">uddi2__relatedBusinessInfo</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____related_business_info.html b/doc/uddi2/html/classuddi2____related_business_info.html
new file mode 100644
index 0000000..a9a4176
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____related_business_info.html
@@ -0,0 +1,167 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__relatedBusinessInfo Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__relatedBusinessInfo Class Reference</h1>Schema urn:uddi-org:api_v2:"relatedBusinessInfo".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____related_business_info-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____related_business_info.html#o0">businessKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":businessKey.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____name.html">uddi2__name</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____related_business_info.html#o1">name</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__name* with length 0..unbounded.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____description.html">uddi2__description</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____related_business_info.html#o2">description</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__description* with length 0..unbounded.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____shared_relationships.html">uddi2__sharedRelationships</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____related_business_info.html#o3">sharedRelationships</a>:2</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__sharedRelationships* with length 0..2.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____related_business_info.html#o4">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____related_business_info.html#o4">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o4"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"relatedBusinessInfo". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__relatedBusinessInfo::businessKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a> <a class="el" href="classuddi2____related_business_info.html#o0">uddi2__relatedBusinessInfo::businessKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":businessKey. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__relatedBusinessInfo::description" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____description.html">uddi2__description</a>* &gt; <a class="el" href="classuddi2____related_business_info.html#o2">uddi2__relatedBusinessInfo::description</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__description* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__relatedBusinessInfo::name" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____name.html">uddi2__name</a>* &gt; <a class="el" href="classuddi2____related_business_info.html#o1">uddi2__relatedBusinessInfo::name</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__name* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__relatedBusinessInfo::sharedRelationships" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____shared_relationships.html">uddi2__sharedRelationships</a>*&gt; <a class="el" href="classuddi2____related_business_info.html#o3">uddi2__relatedBusinessInfo::sharedRelationships</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__sharedRelationships* with length 0..2. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__relatedBusinessInfo::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____related_business_info.html#o4">soap</a>* <a class="el" href="classuddi2____related_business_info.html#o4">uddi2__relatedBusinessInfo::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____related_business_infos-members.html b/doc/uddi2/html/classuddi2____related_business_infos-members.html
new file mode 100644
index 0000000..f92260b
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____related_business_infos-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__relatedBusinessInfos Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____related_business_infos.html">uddi2__relatedBusinessInfos</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____related_business_infos.html#o0">relatedBusinessInfo</a></td><td><a class="el" href="classuddi2____related_business_infos.html">uddi2__relatedBusinessInfos</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____related_business_infos.html#o1">soap</a></td><td><a class="el" href="classuddi2____related_business_infos.html">uddi2__relatedBusinessInfos</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____related_business_infos.html b/doc/uddi2/html/classuddi2____related_business_infos.html
new file mode 100644
index 0000000..e15c9be
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____related_business_infos.html
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__relatedBusinessInfos Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__relatedBusinessInfos Class Reference</h1>Schema urn:uddi-org:api_v2:"relatedBusinessInfos".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____related_business_infos-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____related_business_info.html">uddi2__relatedBusinessInfo</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____related_business_infos.html#o0">relatedBusinessInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__relatedBusinessInfo* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____related_business_infos.html#o1">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____related_business_infos.html#o1">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o1"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"relatedBusinessInfos". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__relatedBusinessInfos::relatedBusinessInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____related_business_info.html">uddi2__relatedBusinessInfo</a>*&gt; <a class="el" href="classuddi2____related_business_infos.html#o0">uddi2__relatedBusinessInfos::relatedBusinessInfo</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__relatedBusinessInfo* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__relatedBusinessInfos::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____related_business_infos.html#o1">soap</a>* <a class="el" href="classuddi2____related_business_infos.html#o1">uddi2__relatedBusinessInfos::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____related_businesses_list-members.html b/doc/uddi2/html/classuddi2____related_businesses_list-members.html
new file mode 100644
index 0000000..af91bf9
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____related_businesses_list-members.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__relatedBusinessesList Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____related_businesses_list.html">uddi2__relatedBusinessesList</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____related_businesses_list.html#o0">businessKey</a></td><td><a class="el" href="classuddi2____related_businesses_list.html">uddi2__relatedBusinessesList</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____related_businesses_list.html#o2">generic</a></td><td><a class="el" href="classuddi2____related_businesses_list.html">uddi2__relatedBusinessesList</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____related_businesses_list.html#o3">operator_</a></td><td><a class="el" href="classuddi2____related_businesses_list.html">uddi2__relatedBusinessesList</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____related_businesses_list.html#o1">relatedBusinessInfos</a></td><td><a class="el" href="classuddi2____related_businesses_list.html">uddi2__relatedBusinessesList</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____related_businesses_list.html#o5">soap</a></td><td><a class="el" href="classuddi2____related_businesses_list.html">uddi2__relatedBusinessesList</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____related_businesses_list.html#o4">truncated</a></td><td><a class="el" href="classuddi2____related_businesses_list.html">uddi2__relatedBusinessesList</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____related_businesses_list.html b/doc/uddi2/html/classuddi2____related_businesses_list.html
new file mode 100644
index 0000000..df04004
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____related_businesses_list.html
@@ -0,0 +1,195 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__relatedBusinessesList Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__relatedBusinessesList Class Reference</h1>Schema urn:uddi-org:api_v2:"relatedBusinessesList".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____related_businesses_list-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____related_businesses_list.html#o0">businessKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":businessKey.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____related_business_infos.html">uddi2__relatedBusinessInfos</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____related_businesses_list.html#o1">relatedBusinessInfos</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":relatedBusinessInfos.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____related_businesses_list.html#o2">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____related_businesses_list.html#o3">operator_</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute operator of type xs:string.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>enum <a class="el" href="uddi__v2_8h.html#a48">uddi2__truncated</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____related_businesses_list.html#o4">truncated</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute truncated of type "urn:uddi-org:api_v2":truncated.  <a href="#o4"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____related_businesses_list.html#o5">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____related_businesses_list.html#o5">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o5"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"relatedBusinessesList". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__relatedBusinessesList::businessKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a> <a class="el" href="classuddi2____related_businesses_list.html#o0">uddi2__relatedBusinessesList::businessKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":businessKey. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__relatedBusinessesList::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____related_businesses_list.html#o2">uddi2__relatedBusinessesList::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__relatedBusinessesList::operator_" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____related_businesses_list.html#o3">uddi2__relatedBusinessesList::operator_</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute operator of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__relatedBusinessesList::relatedBusinessInfos" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____related_business_infos.html">uddi2__relatedBusinessInfos</a>* <a class="el" href="classuddi2____related_businesses_list.html#o1">uddi2__relatedBusinessesList::relatedBusinessInfos</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":relatedBusinessInfos. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="uddi2__relatedBusinessesList::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____related_businesses_list.html#o5">soap</a>* <a class="el" href="classuddi2____related_businesses_list.html#o5">uddi2__relatedBusinessesList::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__relatedBusinessesList::truncated" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> enum <a class="el" href="uddi__v2_8h.html#a48">uddi2__truncated</a>* <a class="el" href="classuddi2____related_businesses_list.html#o4">uddi2__relatedBusinessesList::truncated</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute truncated of type "urn:uddi-org:api_v2":truncated. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____result-members.html b/doc/uddi2/html/classuddi2____result-members.html
new file mode 100644
index 0000000..83ebd41
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____result-members.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__result Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____result.html">uddi2__result</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____result.html#o0">errInfo</a></td><td><a class="el" href="classuddi2____result.html">uddi2__result</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____result.html#o2">errno_</a></td><td><a class="el" href="classuddi2____result.html">uddi2__result</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____result.html#o1">keyType</a></td><td><a class="el" href="classuddi2____result.html">uddi2__result</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____result.html#o3">soap</a></td><td><a class="el" href="classuddi2____result.html">uddi2__result</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____result.html b/doc/uddi2/html/classuddi2____result.html
new file mode 100644
index 0000000..b10ddc8
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____result.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__result Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__result Class Reference</h1>Schema urn:uddi-org:api_v2:"result".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____result-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____err_info.html">uddi2__errInfo</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____result.html#o0">errInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":errInfo.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>enum <a class="el" href="uddi__v2_8h.html#a50">uddi2__keyType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____result.html#o1">keyType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute keyType of type "urn:uddi-org:api_v2":keyType.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____result.html#o2">errno_</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute errno of type xs:int.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____result.html#o3">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____result.html#o3">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o3"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"result". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__result::errInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____err_info.html">uddi2__errInfo</a>* <a class="el" href="classuddi2____result.html#o0">uddi2__result::errInfo</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":errInfo. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__result::errno_" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="classuddi2____result.html#o2">uddi2__result::errno_</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute errno of type xs:int. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__result::keyType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> enum <a class="el" href="uddi__v2_8h.html#a50">uddi2__keyType</a>* <a class="el" href="classuddi2____result.html#o1">uddi2__result::keyType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute keyType of type "urn:uddi-org:api_v2":keyType. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__result::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____result.html#o3">soap</a>* <a class="el" href="classuddi2____result.html#o3">uddi2__result::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____save___u_s_c_o_r_ebinding-members.html b/doc/uddi2/html/classuddi2____save___u_s_c_o_r_ebinding-members.html
new file mode 100644
index 0000000..14152c2
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____save___u_s_c_o_r_ebinding-members.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__save_USCOREbinding Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html">uddi2__save_USCOREbinding</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o0">authInfo</a></td><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html">uddi2__save_USCOREbinding</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o1">bindingTemplate</a></td><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html">uddi2__save_USCOREbinding</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o2">generic</a></td><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html">uddi2__save_USCOREbinding</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#a3">send</a>(const char *endpoint, char *authInfo)</td><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html">uddi2__save_USCOREbinding</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o3">soap</a></td><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html">uddi2__save_USCOREbinding</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#a0">uddi2__save_USCOREbinding</a>(struct soap *)</td><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html">uddi2__save_USCOREbinding</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#a1">uddi2__save_USCOREbinding</a>(struct soap *, uddi2__bindingTemplate &amp;bindingTemplate)</td><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html">uddi2__save_USCOREbinding</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#a2">uddi2__save_USCOREbinding</a>(struct soap *, std::vector&lt; uddi2__bindingTemplate * &gt; bindingTemplates)</td><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html">uddi2__save_USCOREbinding</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____save___u_s_c_o_r_ebinding.html b/doc/uddi2/html/classuddi2____save___u_s_c_o_r_ebinding.html
new file mode 100644
index 0000000..0504f12
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____save___u_s_c_o_r_ebinding.html
@@ -0,0 +1,328 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__save_USCOREbinding Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__save_USCOREbinding Class Reference</h1>Schema urn:uddi-org:api_v2:"save_binding".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____save___u_s_c_o_r_ebinding-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#a0">uddi2__save_USCOREbinding</a> (struct <a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o3">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#a1">uddi2__save_USCOREbinding</a> (struct <a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o3">soap</a> *, <a class="el" href="classuddi2____binding_template.html">uddi2__bindingTemplate</a> &amp;<a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o1">bindingTemplate</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#a2">uddi2__save_USCOREbinding</a> (struct <a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o3">soap</a> *, std::vector&lt; <a class="el" href="classuddi2____binding_template.html">uddi2__bindingTemplate</a> * &gt; bindingTemplates)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#a3">send</a> (const char *endpoint, char *<a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o0">authInfo</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a3"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o0">authInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":authInfo.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____binding_template.html">uddi2__bindingTemplate</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o1">bindingTemplate</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__bindingTemplate* with length 0..unbounded.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o2">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o3">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o3">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o3"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"save_binding". 

+<p>

+Represents a request to post binding information on a UDDI server.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137742">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137742</a> 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__save_USCOREbinding::uddi2__save_USCOREbinding" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__save_USCOREbinding::uddi2__save_USCOREbinding           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the save_USCOREbinding class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi2__save_USCOREbinding::uddi2__save_USCOREbinding" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__save_USCOREbinding::uddi2__save_USCOREbinding           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____binding_template.html">uddi2__bindingTemplate</a> &amp;&nbsp;</td>

+          <td class="mdname" nowrap> <em>bindingTemplate</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>bindingTemplate</em>&nbsp;</td><td>binding template</td></tr>

+  </table>

+</dl>

+Creates an instance of the save_USCOREbinding class using the specified binding template.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a2" doxytag="uddi2__save_USCOREbinding::uddi2__save_USCOREbinding" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__save_USCOREbinding::uddi2__save_USCOREbinding           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>std::vector&lt; <a class="el" href="classuddi2____binding_template.html">uddi2__bindingTemplate</a> * &gt;&nbsp;</td>

+          <td class="mdname" nowrap> <em>bindingTemplates</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>bindingTemplates</em>&nbsp;</td><td>collection of binding templates</td></tr>

+  </table>

+</dl>

+Creates an instance of the save_USCOREbinding class using the specified binding templates.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a3" doxytag="uddi2__save_USCOREbinding::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a> * uddi2__save_USCOREbinding::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>endpoint</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>authInfo</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>authInfo</em>&nbsp;</td><td>authorization token provided by the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a> object or NULL on error</dd></dl>

+Send a request to a UDDI server to post binding information on the server.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__save_USCOREbinding::authInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o0">uddi2__save_USCOREbinding::authInfo</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":authInfo. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__save_USCOREbinding::bindingTemplate" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____binding_template.html">uddi2__bindingTemplate</a>*&gt; <a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o1">uddi2__save_USCOREbinding::bindingTemplate</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__bindingTemplate* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__save_USCOREbinding::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o2">uddi2__save_USCOREbinding::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__save_USCOREbinding::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o3">soap</a>* <a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o3">uddi2__save_USCOREbinding::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____save___u_s_c_o_r_ebusiness-members.html b/doc/uddi2/html/classuddi2____save___u_s_c_o_r_ebusiness-members.html
new file mode 100644
index 0000000..64ee3aa
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____save___u_s_c_o_r_ebusiness-members.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__save_USCOREbusiness Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html">uddi2__save_USCOREbusiness</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o0">authInfo</a></td><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html">uddi2__save_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o1">businessEntity</a></td><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html">uddi2__save_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o3">generic</a></td><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html">uddi2__save_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#a3">send</a>(const char *endpoint, char *authInfo)</td><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html">uddi2__save_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o4">soap</a></td><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html">uddi2__save_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#a0">uddi2__save_USCOREbusiness</a>(struct soap *)</td><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html">uddi2__save_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#a1">uddi2__save_USCOREbusiness</a>(struct soap *, uddi2__businessEntity &amp;businessEntity)</td><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html">uddi2__save_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#a2">uddi2__save_USCOREbusiness</a>(struct soap *, std::vector&lt; uddi2__businessEntity * &gt; businessEntities)</td><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html">uddi2__save_USCOREbusiness</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o2">uploadRegister</a></td><td><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html">uddi2__save_USCOREbusiness</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____save___u_s_c_o_r_ebusiness.html b/doc/uddi2/html/classuddi2____save___u_s_c_o_r_ebusiness.html
new file mode 100644
index 0000000..365839b
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____save___u_s_c_o_r_ebusiness.html
@@ -0,0 +1,356 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__save_USCOREbusiness Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__save_USCOREbusiness Class Reference</h1>Schema urn:uddi-org:api_v2:"save_business".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____save___u_s_c_o_r_ebusiness-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#a0">uddi2__save_USCOREbusiness</a> (struct <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o4">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#a1">uddi2__save_USCOREbusiness</a> (struct <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o4">soap</a> *, <a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a> &amp;<a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o1">businessEntity</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#a2">uddi2__save_USCOREbusiness</a> (struct <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o4">soap</a> *, std::vector&lt; <a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a> * &gt; businessEntities)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____business_detail.html">uddi2__businessDetail</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#a3">send</a> (const char *endpoint, char *<a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o0">authInfo</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a3"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o0">authInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":authInfo.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o1">businessEntity</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__businessEntity* with length 0..unbounded.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; char * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o2">uploadRegister</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of char* with length 0..unbounded.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o3">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o4">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o4">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o4"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"save_business". 

+<p>

+Represents a request to post business information on a UDDI server.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137743">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137743</a> 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__save_USCOREbusiness::uddi2__save_USCOREbusiness" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__save_USCOREbusiness::uddi2__save_USCOREbusiness           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o4">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the save_USCOREbusiness class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi2__save_USCOREbusiness::uddi2__save_USCOREbusiness" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__save_USCOREbusiness::uddi2__save_USCOREbusiness           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o4">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a> &amp;&nbsp;</td>

+          <td class="mdname" nowrap> <em>businessEntity</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>businessEntity</em>&nbsp;</td><td>business entity</td></tr>

+  </table>

+</dl>

+Creates an instance of the save_USCOREbusiness class using the specified business entity.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a2" doxytag="uddi2__save_USCOREbusiness::uddi2__save_USCOREbusiness" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__save_USCOREbusiness::uddi2__save_USCOREbusiness           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o4">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>std::vector&lt; <a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a> * &gt;&nbsp;</td>

+          <td class="mdname" nowrap> <em>businessEntities</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>businessEntities</em>&nbsp;</td><td>collection of business entities</td></tr>

+  </table>

+</dl>

+Creates an instance of the save_USCOREbusiness class using the specified business entities.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a3" doxytag="uddi2__save_USCOREbusiness::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____business_detail.html">uddi2__businessDetail</a> * uddi2__save_USCOREbusiness::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>endpoint</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>authInfo</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>authInfo</em>&nbsp;</td><td>authorization token provided by the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____business_detail.html">uddi2__businessDetail</a> object or NULL on error</dd></dl>

+Send a request to a UDDI server to post business information on the server.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__save_USCOREbusiness::authInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o0">uddi2__save_USCOREbusiness::authInfo</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":authInfo. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__save_USCOREbusiness::businessEntity" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a>* &gt; <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o1">uddi2__save_USCOREbusiness::businessEntity</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__businessEntity* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__save_USCOREbusiness::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o3">uddi2__save_USCOREbusiness::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__save_USCOREbusiness::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o4">soap</a>* <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o4">uddi2__save_USCOREbusiness::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__save_USCOREbusiness::uploadRegister" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;char* &gt; <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o2">uddi2__save_USCOREbusiness::uploadRegister</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of char* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____save___u_s_c_o_r_eservice-members.html b/doc/uddi2/html/classuddi2____save___u_s_c_o_r_eservice-members.html
new file mode 100644
index 0000000..dd10128
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____save___u_s_c_o_r_eservice-members.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__save_USCOREservice Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html">uddi2__save_USCOREservice</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o0">authInfo</a></td><td><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html">uddi2__save_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o1">businessService</a></td><td><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html">uddi2__save_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o2">generic</a></td><td><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html">uddi2__save_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#a3">send</a>(const char *endpoint, char *authInfo)</td><td><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html">uddi2__save_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o3">soap</a></td><td><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html">uddi2__save_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#a0">uddi2__save_USCOREservice</a>(struct soap *)</td><td><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html">uddi2__save_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#a1">uddi2__save_USCOREservice</a>(struct soap *, uddi2__businessService &amp;businessService)</td><td><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html">uddi2__save_USCOREservice</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#a2">uddi2__save_USCOREservice</a>(struct soap *, std::vector&lt; uddi2__businessService * &gt; businessServices)</td><td><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html">uddi2__save_USCOREservice</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____save___u_s_c_o_r_eservice.html b/doc/uddi2/html/classuddi2____save___u_s_c_o_r_eservice.html
new file mode 100644
index 0000000..6fca04a
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____save___u_s_c_o_r_eservice.html
@@ -0,0 +1,328 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__save_USCOREservice Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__save_USCOREservice Class Reference</h1>Schema urn:uddi-org:api_v2:"save_service".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____save___u_s_c_o_r_eservice-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#a0">uddi2__save_USCOREservice</a> (struct <a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o3">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#a1">uddi2__save_USCOREservice</a> (struct <a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o3">soap</a> *, <a class="el" href="classuddi2____business_service.html">uddi2__businessService</a> &amp;<a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o1">businessService</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#a2">uddi2__save_USCOREservice</a> (struct <a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o3">soap</a> *, std::vector&lt; <a class="el" href="classuddi2____business_service.html">uddi2__businessService</a> * &gt; businessServices)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____service_detail.html">uddi2__serviceDetail</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#a3">send</a> (const char *endpoint, char *<a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o0">authInfo</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a3"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o0">authInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":authInfo.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____business_service.html">uddi2__businessService</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o1">businessService</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__businessService* with length 0..unbounded.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o2">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o3">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o3">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o3"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"save_service". 

+<p>

+Represents a request to post service information on a UDDI server.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137744">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137744</a> 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__save_USCOREservice::uddi2__save_USCOREservice" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__save_USCOREservice::uddi2__save_USCOREservice           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the save_USCOREservice class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi2__save_USCOREservice::uddi2__save_USCOREservice" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__save_USCOREservice::uddi2__save_USCOREservice           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____business_service.html">uddi2__businessService</a> &amp;&nbsp;</td>

+          <td class="mdname" nowrap> <em>businessService</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>businessService</em>&nbsp;</td><td>business service</td></tr>

+  </table>

+</dl>

+Creates an instance of the save_USCOREservice class using the specified service.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a2" doxytag="uddi2__save_USCOREservice::uddi2__save_USCOREservice" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__save_USCOREservice::uddi2__save_USCOREservice           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>std::vector&lt; <a class="el" href="classuddi2____business_service.html">uddi2__businessService</a> * &gt;&nbsp;</td>

+          <td class="mdname" nowrap> <em>businessServices</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>businessServices</em>&nbsp;</td><td>collection of business services</td></tr>

+  </table>

+</dl>

+Creates an instance of the save_USCOREservice class using the specified services.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a3" doxytag="uddi2__save_USCOREservice::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____service_detail.html">uddi2__serviceDetail</a> * uddi2__save_USCOREservice::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>endpoint</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>authInfo</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>authInfo</em>&nbsp;</td><td>authorization token provided by the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____service_detail.html">uddi2__serviceDetail</a> object or NULL on error</dd></dl>

+Send a request to a UDDI server to post service information on the server.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__save_USCOREservice::authInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o0">uddi2__save_USCOREservice::authInfo</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":authInfo. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__save_USCOREservice::businessService" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____business_service.html">uddi2__businessService</a>*&gt; <a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o1">uddi2__save_USCOREservice::businessService</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__businessService* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__save_USCOREservice::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o2">uddi2__save_USCOREservice::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__save_USCOREservice::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o3">soap</a>* <a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o3">uddi2__save_USCOREservice::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____save___u_s_c_o_r_et_model-members.html b/doc/uddi2/html/classuddi2____save___u_s_c_o_r_et_model-members.html
new file mode 100644
index 0000000..45925cd
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____save___u_s_c_o_r_et_model-members.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__save_USCOREtModel Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html">uddi2__save_USCOREtModel</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o0">authInfo</a></td><td><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html">uddi2__save_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o3">generic</a></td><td><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html">uddi2__save_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#a3">send</a>(const char *endpoint, char *authInfo)</td><td><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html">uddi2__save_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o4">soap</a></td><td><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html">uddi2__save_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o1">tModel</a></td><td><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html">uddi2__save_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#a0">uddi2__save_USCOREtModel</a>(struct soap *)</td><td><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html">uddi2__save_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#a1">uddi2__save_USCOREtModel</a>(struct soap *, uddi2__tModel &amp;tModel)</td><td><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html">uddi2__save_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#a2">uddi2__save_USCOREtModel</a>(struct soap *, std::vector&lt; uddi2__tModel * &gt; tModels)</td><td><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html">uddi2__save_USCOREtModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o2">uploadRegister</a></td><td><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html">uddi2__save_USCOREtModel</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____save___u_s_c_o_r_et_model.html b/doc/uddi2/html/classuddi2____save___u_s_c_o_r_et_model.html
new file mode 100644
index 0000000..2ef343f
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____save___u_s_c_o_r_et_model.html
@@ -0,0 +1,356 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__save_USCOREtModel Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__save_USCOREtModel Class Reference</h1>Schema urn:uddi-org:api_v2:"save_tModel".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____save___u_s_c_o_r_et_model-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#a0">uddi2__save_USCOREtModel</a> (struct <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o4">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#a1">uddi2__save_USCOREtModel</a> (struct <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o4">soap</a> *, <a class="el" href="classuddi2____t_model.html">uddi2__tModel</a> &amp;<a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o1">tModel</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#a2">uddi2__save_USCOREtModel</a> (struct <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o4">soap</a> *, std::vector&lt; <a class="el" href="classuddi2____t_model.html">uddi2__tModel</a> * &gt; tModels)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____t_model_detail.html">uddi2__tModelDetail</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#a3">send</a> (const char *endpoint, char *<a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o0">authInfo</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a3"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o0">authInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":authInfo.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____t_model.html">uddi2__tModel</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o1">tModel</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__tModel* with length 0..unbounded.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; char * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o2">uploadRegister</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of char* with length 0..unbounded.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o3">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o4">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o4">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o4"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"save_tModel". 

+<p>

+Represents a request to post tModel information on a UDDI server.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137745">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137745</a> 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__save_USCOREtModel::uddi2__save_USCOREtModel" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__save_USCOREtModel::uddi2__save_USCOREtModel           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o4">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the save_USCOREtModel class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi2__save_USCOREtModel::uddi2__save_USCOREtModel" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__save_USCOREtModel::uddi2__save_USCOREtModel           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o4">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____t_model.html">uddi2__tModel</a> &amp;&nbsp;</td>

+          <td class="mdname" nowrap> <em>tModel</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>tModel</em>&nbsp;</td><td>a tModel</td></tr>

+  </table>

+</dl>

+Creates an instance of the save_USCOREtModel class using the specified tModel.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a2" doxytag="uddi2__save_USCOREtModel::uddi2__save_USCOREtModel" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__save_USCOREtModel::uddi2__save_USCOREtModel           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o4">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>std::vector&lt; <a class="el" href="classuddi2____t_model.html">uddi2__tModel</a> * &gt;&nbsp;</td>

+          <td class="mdname" nowrap> <em>tModels</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>tModels</em>&nbsp;</td><td>collection of tModels</td></tr>

+  </table>

+</dl>

+Creates an instance of the save_USCOREtModel class using the specified tModels.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a3" doxytag="uddi2__save_USCOREtModel::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____t_model_detail.html">uddi2__tModelDetail</a> * uddi2__save_USCOREtModel::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>endpoint</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>authInfo</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>authInfo</em>&nbsp;</td><td>authorization token provided by the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____t_model_detail.html">uddi2__tModelDetail</a> object or NULL on error</dd></dl>

+Send a request to a UDDI server to post tModel information on the server.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__save_USCOREtModel::authInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o0">uddi2__save_USCOREtModel::authInfo</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":authInfo. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__save_USCOREtModel::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o3">uddi2__save_USCOREtModel::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__save_USCOREtModel::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o4">soap</a>* <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o4">uddi2__save_USCOREtModel::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__save_USCOREtModel::tModel" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____t_model.html">uddi2__tModel</a>* &gt; <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o1">uddi2__save_USCOREtModel::tModel</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__tModel* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__save_USCOREtModel::uploadRegister" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;char* &gt; <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o2">uddi2__save_USCOREtModel::uploadRegister</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of char* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____service_detail-members.html b/doc/uddi2/html/classuddi2____service_detail-members.html
new file mode 100644
index 0000000..d44450b
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____service_detail-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__serviceDetail Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____service_detail.html">uddi2__serviceDetail</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____service_detail.html#o0">businessService</a></td><td><a class="el" href="classuddi2____service_detail.html">uddi2__serviceDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____service_detail.html#o1">generic</a></td><td><a class="el" href="classuddi2____service_detail.html">uddi2__serviceDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____service_detail.html#o2">operator_</a></td><td><a class="el" href="classuddi2____service_detail.html">uddi2__serviceDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____service_detail.html#o4">soap</a></td><td><a class="el" href="classuddi2____service_detail.html">uddi2__serviceDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____service_detail.html#o3">truncated</a></td><td><a class="el" href="classuddi2____service_detail.html">uddi2__serviceDetail</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____service_detail.html b/doc/uddi2/html/classuddi2____service_detail.html
new file mode 100644
index 0000000..d39865b
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____service_detail.html
@@ -0,0 +1,167 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__serviceDetail Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__serviceDetail Class Reference</h1>Schema urn:uddi-org:api_v2:"serviceDetail".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____service_detail-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____business_service.html">uddi2__businessService</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____service_detail.html#o0">businessService</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__businessService* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____service_detail.html#o1">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____service_detail.html#o2">operator_</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute operator of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>enum <a class="el" href="uddi__v2_8h.html#a48">uddi2__truncated</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____service_detail.html#o3">truncated</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute truncated of type "urn:uddi-org:api_v2":truncated.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____service_detail.html#o4">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____service_detail.html#o4">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o4"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"serviceDetail". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__serviceDetail::businessService" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____business_service.html">uddi2__businessService</a>*&gt; <a class="el" href="classuddi2____service_detail.html#o0">uddi2__serviceDetail::businessService</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__businessService* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__serviceDetail::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____service_detail.html#o1">uddi2__serviceDetail::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__serviceDetail::operator_" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____service_detail.html#o2">uddi2__serviceDetail::operator_</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute operator of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__serviceDetail::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____service_detail.html#o4">soap</a>* <a class="el" href="classuddi2____service_detail.html#o4">uddi2__serviceDetail::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__serviceDetail::truncated" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> enum <a class="el" href="uddi__v2_8h.html#a48">uddi2__truncated</a>* <a class="el" href="classuddi2____service_detail.html#o3">uddi2__serviceDetail::truncated</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute truncated of type "urn:uddi-org:api_v2":truncated. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____service_info-members.html b/doc/uddi2/html/classuddi2____service_info-members.html
new file mode 100644
index 0000000..94551eb
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____service_info-members.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__serviceInfo Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____service_info.html">uddi2__serviceInfo</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____service_info.html#o2">businessKey</a></td><td><a class="el" href="classuddi2____service_info.html">uddi2__serviceInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____service_info.html#o0">name</a></td><td><a class="el" href="classuddi2____service_info.html">uddi2__serviceInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____service_info.html#o1">serviceKey</a></td><td><a class="el" href="classuddi2____service_info.html">uddi2__serviceInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____service_info.html#o3">soap</a></td><td><a class="el" href="classuddi2____service_info.html">uddi2__serviceInfo</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____service_info.html b/doc/uddi2/html/classuddi2____service_info.html
new file mode 100644
index 0000000..f49a7e4
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____service_info.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__serviceInfo Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__serviceInfo Class Reference</h1>Schema urn:uddi-org:api_v2:"serviceInfo".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____service_info-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____name.html">uddi2__name</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____service_info.html#o0">name</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__name* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a4">uddi2__serviceKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____service_info.html#o1">serviceKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute serviceKey of type "urn:uddi-org:api_v2":serviceKey.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____service_info.html#o2">businessKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute businessKey of type "urn:uddi-org:api_v2":businessKey.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____service_info.html#o3">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____service_info.html#o3">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o3"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"serviceInfo". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o2" doxytag="uddi2__serviceInfo::businessKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a> <a class="el" href="classuddi2____service_info.html#o2">uddi2__serviceInfo::businessKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute businessKey of type "urn:uddi-org:api_v2":businessKey. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__serviceInfo::name" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____name.html">uddi2__name</a>* &gt; <a class="el" href="classuddi2____service_info.html#o0">uddi2__serviceInfo::name</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__name* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__serviceInfo::serviceKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a4">uddi2__serviceKey</a> <a class="el" href="classuddi2____service_info.html#o1">uddi2__serviceInfo::serviceKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute serviceKey of type "urn:uddi-org:api_v2":serviceKey. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__serviceInfo::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____service_info.html#o3">soap</a>* <a class="el" href="classuddi2____service_info.html#o3">uddi2__serviceInfo::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____service_infos-members.html b/doc/uddi2/html/classuddi2____service_infos-members.html
new file mode 100644
index 0000000..e73731e
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____service_infos-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__serviceInfos Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____service_infos.html">uddi2__serviceInfos</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____service_infos.html#o0">serviceInfo</a></td><td><a class="el" href="classuddi2____service_infos.html">uddi2__serviceInfos</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____service_infos.html#o1">soap</a></td><td><a class="el" href="classuddi2____service_infos.html">uddi2__serviceInfos</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____service_infos.html b/doc/uddi2/html/classuddi2____service_infos.html
new file mode 100644
index 0000000..fa47fd6
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____service_infos.html
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__serviceInfos Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__serviceInfos Class Reference</h1>Schema urn:uddi-org:api_v2:"serviceInfos".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____service_infos-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____service_info.html">uddi2__serviceInfo</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____service_infos.html#o0">serviceInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__serviceInfo* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____service_infos.html#o1">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____service_infos.html#o1">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o1"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"serviceInfos". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__serviceInfos::serviceInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____service_info.html">uddi2__serviceInfo</a>* &gt; <a class="el" href="classuddi2____service_infos.html#o0">uddi2__serviceInfos::serviceInfo</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__serviceInfo* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__serviceInfos::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____service_infos.html#o1">soap</a>* <a class="el" href="classuddi2____service_infos.html#o1">uddi2__serviceInfos::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____service_list-members.html b/doc/uddi2/html/classuddi2____service_list-members.html
new file mode 100644
index 0000000..762da3e
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____service_list-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__serviceList Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____service_list.html">uddi2__serviceList</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____service_list.html#o1">generic</a></td><td><a class="el" href="classuddi2____service_list.html">uddi2__serviceList</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____service_list.html#o2">operator_</a></td><td><a class="el" href="classuddi2____service_list.html">uddi2__serviceList</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____service_list.html#o0">serviceInfos</a></td><td><a class="el" href="classuddi2____service_list.html">uddi2__serviceList</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____service_list.html#o4">soap</a></td><td><a class="el" href="classuddi2____service_list.html">uddi2__serviceList</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____service_list.html#o3">truncated</a></td><td><a class="el" href="classuddi2____service_list.html">uddi2__serviceList</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____service_list.html b/doc/uddi2/html/classuddi2____service_list.html
new file mode 100644
index 0000000..c436640
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____service_list.html
@@ -0,0 +1,167 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__serviceList Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__serviceList Class Reference</h1>Schema urn:uddi-org:api_v2:"serviceList".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____service_list-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____service_infos.html">uddi2__serviceInfos</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____service_list.html#o0">serviceInfos</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":serviceInfos.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____service_list.html#o1">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____service_list.html#o2">operator_</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute operator of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>enum <a class="el" href="uddi__v2_8h.html#a48">uddi2__truncated</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____service_list.html#o3">truncated</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute truncated of type "urn:uddi-org:api_v2":truncated.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____service_list.html#o4">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____service_list.html#o4">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o4"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"serviceList". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o1" doxytag="uddi2__serviceList::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____service_list.html#o1">uddi2__serviceList::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__serviceList::operator_" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____service_list.html#o2">uddi2__serviceList::operator_</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute operator of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__serviceList::serviceInfos" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____service_infos.html">uddi2__serviceInfos</a>* <a class="el" href="classuddi2____service_list.html#o0">uddi2__serviceList::serviceInfos</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":serviceInfos. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__serviceList::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____service_list.html#o4">soap</a>* <a class="el" href="classuddi2____service_list.html#o4">uddi2__serviceList::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__serviceList::truncated" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> enum <a class="el" href="uddi__v2_8h.html#a48">uddi2__truncated</a>* <a class="el" href="classuddi2____service_list.html#o3">uddi2__serviceList::truncated</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute truncated of type "urn:uddi-org:api_v2":truncated. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____set___u_s_c_o_r_epublisher_assertions-members.html b/doc/uddi2/html/classuddi2____set___u_s_c_o_r_epublisher_assertions-members.html
new file mode 100644
index 0000000..99f5f46
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____set___u_s_c_o_r_epublisher_assertions-members.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__set_USCOREpublisherAssertions Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html">uddi2__set_USCOREpublisherAssertions</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o0">authInfo</a></td><td><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html">uddi2__set_USCOREpublisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o2">generic</a></td><td><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html">uddi2__set_USCOREpublisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o1">publisherAssertion</a></td><td><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html">uddi2__set_USCOREpublisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#a2">send</a>(const char *endpoint, char *authInfo)</td><td><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html">uddi2__set_USCOREpublisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o3">soap</a></td><td><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html">uddi2__set_USCOREpublisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#a0">uddi2__set_USCOREpublisherAssertions</a>(struct soap *)</td><td><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html">uddi2__set_USCOREpublisherAssertions</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#a1">uddi2__set_USCOREpublisherAssertions</a>(struct soap *, std::vector&lt; uddi2__publisherAssertion * &gt; publisherAssertions)</td><td><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html">uddi2__set_USCOREpublisherAssertions</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____set___u_s_c_o_r_epublisher_assertions.html b/doc/uddi2/html/classuddi2____set___u_s_c_o_r_epublisher_assertions.html
new file mode 100644
index 0000000..57b24ff
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____set___u_s_c_o_r_epublisher_assertions.html
@@ -0,0 +1,280 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__set_USCOREpublisherAssertions Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__set_USCOREpublisherAssertions Class Reference</h1>Schema urn:uddi-org:api_v2:"set_publisherAssertions".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____set___u_s_c_o_r_epublisher_assertions-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#a0">uddi2__set_USCOREpublisherAssertions</a> (struct <a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o3">soap</a> *)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#a1">uddi2__set_USCOREpublisherAssertions</a> (struct <a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o3">soap</a> *, std::vector&lt; <a class="el" href="classuddi2____publisher_assertion.html">uddi2__publisherAssertion</a> * &gt; publisherAssertions)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____publisher_assertions.html">uddi2__publisherAssertions</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#a2">send</a> (const char *endpoint, char *<a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o0">authInfo</a>)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in uddi2-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o0">authInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":authInfo.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____publisher_assertion.html">uddi2__publisherAssertion</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o1">publisherAssertion</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__publisherAssertion* with length 0..unbounded.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o2">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o3">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o3">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o3"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"set_publisherAssertions". 

+<p>

+Represents a request to modify the existing publisher assertions for an individual publisher.<p>

+See  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137746">http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137746</a> 

+<p>

+<hr><h2>Constructor &amp; Destructor Documentation</h2>

+<a class="anchor" name="a0" doxytag="uddi2__set_USCOREpublisherAssertions::uddi2__set_USCOREpublisherAssertions" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__set_USCOREpublisherAssertions::uddi2__set_USCOREpublisherAssertions           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context</td></tr>

+  </table>

+</dl>

+Creates an instance of the set_USCOREpublisherAssertions class.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi2__set_USCOREpublisherAssertions::uddi2__set_USCOREpublisherAssertions" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> uddi2__set_USCOREpublisherAssertions::uddi2__set_USCOREpublisherAssertions           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct <a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o3">soap</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>std::vector&lt; <a class="el" href="classuddi2____publisher_assertion.html">uddi2__publisherAssertion</a> * &gt;&nbsp;</td>

+          <td class="mdname" nowrap> <em>publisherAssertions</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>gSOAP context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>publisherAssertions</em>&nbsp;</td><td>collection of publisher assertions</td></tr>

+  </table>

+</dl>

+Creates an instance of the set_USCOREpublisherAssertions class using the specified collection of publisher assertions.     </td>

+  </tr>

+</table>

+<hr><h2>Member Function Documentation</h2>

+<a class="anchor" name="a2" doxytag="uddi2__set_USCOREpublisherAssertions::send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____publisher_assertions.html">uddi2__publisherAssertions</a> * uddi2__set_USCOREpublisherAssertions::send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>endpoint</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>authInfo</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in uddi2-typemap.dat. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>endpoint</em>&nbsp;</td><td>URL of the UDDI server </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>authInfo</em>&nbsp;</td><td>authorization token provided by the UDDI server </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="classuddi2____publisher_assertions.html">uddi2__publisherAssertions</a> object or NULL on error</dd></dl>

+Send a request to a UDDI server to post tModel information on the server.     </td>

+  </tr>

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__set_USCOREpublisherAssertions::authInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o0">uddi2__set_USCOREpublisherAssertions::authInfo</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":authInfo. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__set_USCOREpublisherAssertions::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o2">uddi2__set_USCOREpublisherAssertions::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__set_USCOREpublisherAssertions::publisherAssertion" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____publisher_assertion.html">uddi2__publisherAssertion</a>*&gt; <a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o1">uddi2__set_USCOREpublisherAssertions::publisherAssertion</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__publisherAssertion* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__set_USCOREpublisherAssertions::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o3">soap</a>* <a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o3">uddi2__set_USCOREpublisherAssertions::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____shared_relationships-members.html b/doc/uddi2/html/classuddi2____shared_relationships-members.html
new file mode 100644
index 0000000..38f84d8
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____shared_relationships-members.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__sharedRelationships Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____shared_relationships.html">uddi2__sharedRelationships</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____shared_relationships.html#o1">direction</a></td><td><a class="el" href="classuddi2____shared_relationships.html">uddi2__sharedRelationships</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____shared_relationships.html#o0">keyedReference</a></td><td><a class="el" href="classuddi2____shared_relationships.html">uddi2__sharedRelationships</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____shared_relationships.html#o2">soap</a></td><td><a class="el" href="classuddi2____shared_relationships.html">uddi2__sharedRelationships</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____shared_relationships.html b/doc/uddi2/html/classuddi2____shared_relationships.html
new file mode 100644
index 0000000..d71e6e7
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____shared_relationships.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__sharedRelationships Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__sharedRelationships Class Reference</h1>Schema urn:uddi-org:api_v2:"sharedRelationships".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____shared_relationships-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____shared_relationships.html#o0">keyedReference</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__keyedReference* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>enum <a class="el" href="uddi__v2_8h.html#a47">uddi2__direction</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____shared_relationships.html#o1">direction</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute direction of type "urn:uddi-org:api_v2":direction.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____shared_relationships.html#o2">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____shared_relationships.html#o2">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o2"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"sharedRelationships". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o1" doxytag="uddi2__sharedRelationships::direction" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> enum <a class="el" href="uddi__v2_8h.html#a47">uddi2__direction</a> <a class="el" href="classuddi2____shared_relationships.html#o1">uddi2__sharedRelationships::direction</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute direction of type "urn:uddi-org:api_v2":direction. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__sharedRelationships::keyedReference" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a>* &gt; <a class="el" href="classuddi2____shared_relationships.html#o0">uddi2__sharedRelationships::keyedReference</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__keyedReference* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__sharedRelationships::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____shared_relationships.html#o2">soap</a>* <a class="el" href="classuddi2____shared_relationships.html#o2">uddi2__sharedRelationships::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____t_model-members.html b/doc/uddi2/html/classuddi2____t_model-members.html
new file mode 100644
index 0000000..8c3bc53
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____t_model-members.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__tModel Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____t_model.html">uddi2__tModel</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model.html#o7">authorizedName</a></td><td><a class="el" href="classuddi2____t_model.html">uddi2__tModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model.html#o4">categoryBag</a></td><td><a class="el" href="classuddi2____t_model.html">uddi2__tModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model.html#o1">description</a></td><td><a class="el" href="classuddi2____t_model.html">uddi2__tModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model.html#o3">identifierBag</a></td><td><a class="el" href="classuddi2____t_model.html">uddi2__tModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model.html#o0">name</a></td><td><a class="el" href="classuddi2____t_model.html">uddi2__tModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model.html#o6">operator_</a></td><td><a class="el" href="classuddi2____t_model.html">uddi2__tModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model.html#o2">overviewDoc</a></td><td><a class="el" href="classuddi2____t_model.html">uddi2__tModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model.html#o8">soap</a></td><td><a class="el" href="classuddi2____t_model.html">uddi2__tModel</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model.html#o5">tModelKey</a></td><td><a class="el" href="classuddi2____t_model.html">uddi2__tModel</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____t_model.html b/doc/uddi2/html/classuddi2____t_model.html
new file mode 100644
index 0000000..b313998
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____t_model.html
@@ -0,0 +1,279 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__tModel Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__tModel Class Reference</h1>Schema urn:uddi-org:api_v2:"tModel".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____t_model-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____name.html">uddi2__name</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model.html#o0">name</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":name.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____description.html">uddi2__description</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model.html#o1">description</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__description* with length 0..unbounded.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____overview_doc.html">uddi2__overviewDoc</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model.html#o2">overviewDoc</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":overviewDoc.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____identifier_bag.html">uddi2__identifierBag</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model.html#o3">identifierBag</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":identifierBag.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____category_bag.html">uddi2__categoryBag</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model.html#o4">categoryBag</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":categoryBag.  <a href="#o4"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a5">uddi2__tModelKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model.html#o5">tModelKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey.  <a href="#o5"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model.html#o6">operator_</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute operator of type xs:string.  <a href="#o6"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model.html#o7">authorizedName</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute authorizedName of type xs:string.  <a href="#o7"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____t_model.html#o8">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model.html#o8">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o8"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"tModel". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o7" doxytag="uddi2__tModel::authorizedName" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____t_model.html#o7">uddi2__tModel::authorizedName</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute authorizedName of type xs:string. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__tModel::categoryBag" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____category_bag.html">uddi2__categoryBag</a>* <a class="el" href="classuddi2____t_model.html#o4">uddi2__tModel::categoryBag</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":categoryBag. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__tModel::description" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____description.html">uddi2__description</a>* &gt; <a class="el" href="classuddi2____t_model.html#o1">uddi2__tModel::description</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__description* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__tModel::identifierBag" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____identifier_bag.html">uddi2__identifierBag</a>* <a class="el" href="classuddi2____t_model.html#o3">uddi2__tModel::identifierBag</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":identifierBag. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__tModel::name" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____name.html">uddi2__name</a>* <a class="el" href="classuddi2____t_model.html#o0">uddi2__tModel::name</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":name. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o6" doxytag="uddi2__tModel::operator_" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____t_model.html#o6">uddi2__tModel::operator_</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute operator of type xs:string. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__tModel::overviewDoc" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____overview_doc.html">uddi2__overviewDoc</a>* <a class="el" href="classuddi2____t_model.html#o2">uddi2__tModel::overviewDoc</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":overviewDoc. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o8" doxytag="uddi2__tModel::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____t_model.html#o8">soap</a>* <a class="el" href="classuddi2____t_model.html#o8">uddi2__tModel::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="uddi2__tModel::tModelKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a5">uddi2__tModelKey</a> <a class="el" href="classuddi2____t_model.html#o5">uddi2__tModel::tModelKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____t_model_bag-members.html b/doc/uddi2/html/classuddi2____t_model_bag-members.html
new file mode 100644
index 0000000..5977410
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____t_model_bag-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__tModelBag Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____t_model_bag.html">uddi2__tModelBag</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model_bag.html#o1">soap</a></td><td><a class="el" href="classuddi2____t_model_bag.html">uddi2__tModelBag</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model_bag.html#o0">tModelKey</a></td><td><a class="el" href="classuddi2____t_model_bag.html">uddi2__tModelBag</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____t_model_bag.html b/doc/uddi2/html/classuddi2____t_model_bag.html
new file mode 100644
index 0000000..e1af3c2
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____t_model_bag.html
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__tModelBag Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__tModelBag Class Reference</h1>Schema urn:uddi-org:api_v2:"tModelBag".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____t_model_bag-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="uddi__v2_8h.html#a5">uddi2__tModelKey</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_bag.html#o0">tModelKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__tModelKey with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____t_model_bag.html#o1">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_bag.html#o1">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o1"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"tModelBag". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o1" doxytag="uddi2__tModelBag::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____t_model_bag.html#o1">soap</a>* <a class="el" href="classuddi2____t_model_bag.html#o1">uddi2__tModelBag::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__tModelBag::tModelKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="uddi__v2_8h.html#a5">uddi2__tModelKey</a> &gt; <a class="el" href="classuddi2____t_model_bag.html#o0">uddi2__tModelBag::tModelKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__tModelKey with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____t_model_detail-members.html b/doc/uddi2/html/classuddi2____t_model_detail-members.html
new file mode 100644
index 0000000..2f2965c
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____t_model_detail-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__tModelDetail Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____t_model_detail.html">uddi2__tModelDetail</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model_detail.html#o1">generic</a></td><td><a class="el" href="classuddi2____t_model_detail.html">uddi2__tModelDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model_detail.html#o2">operator_</a></td><td><a class="el" href="classuddi2____t_model_detail.html">uddi2__tModelDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model_detail.html#o4">soap</a></td><td><a class="el" href="classuddi2____t_model_detail.html">uddi2__tModelDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model_detail.html#o0">tModel</a></td><td><a class="el" href="classuddi2____t_model_detail.html">uddi2__tModelDetail</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model_detail.html#o3">truncated</a></td><td><a class="el" href="classuddi2____t_model_detail.html">uddi2__tModelDetail</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____t_model_detail.html b/doc/uddi2/html/classuddi2____t_model_detail.html
new file mode 100644
index 0000000..5197818
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____t_model_detail.html
@@ -0,0 +1,167 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__tModelDetail Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__tModelDetail Class Reference</h1>Schema urn:uddi-org:api_v2:"tModelDetail".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____t_model_detail-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____t_model.html">uddi2__tModel</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_detail.html#o0">tModel</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__tModel* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_detail.html#o1">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_detail.html#o2">operator_</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute operator of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>enum <a class="el" href="uddi__v2_8h.html#a48">uddi2__truncated</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_detail.html#o3">truncated</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute truncated of type "urn:uddi-org:api_v2":truncated.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____t_model_detail.html#o4">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_detail.html#o4">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o4"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"tModelDetail". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o1" doxytag="uddi2__tModelDetail::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____t_model_detail.html#o1">uddi2__tModelDetail::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__tModelDetail::operator_" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____t_model_detail.html#o2">uddi2__tModelDetail::operator_</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute operator of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__tModelDetail::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____t_model_detail.html#o4">soap</a>* <a class="el" href="classuddi2____t_model_detail.html#o4">uddi2__tModelDetail::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__tModelDetail::tModel" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____t_model.html">uddi2__tModel</a>* &gt; <a class="el" href="classuddi2____t_model_detail.html#o0">uddi2__tModelDetail::tModel</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__tModel* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__tModelDetail::truncated" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> enum <a class="el" href="uddi__v2_8h.html#a48">uddi2__truncated</a>* <a class="el" href="classuddi2____t_model_detail.html#o3">uddi2__tModelDetail::truncated</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute truncated of type "urn:uddi-org:api_v2":truncated. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____t_model_info-members.html b/doc/uddi2/html/classuddi2____t_model_info-members.html
new file mode 100644
index 0000000..6edc6ce
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____t_model_info-members.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__tModelInfo Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____t_model_info.html">uddi2__tModelInfo</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model_info.html#o0">name</a></td><td><a class="el" href="classuddi2____t_model_info.html">uddi2__tModelInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model_info.html#o2">soap</a></td><td><a class="el" href="classuddi2____t_model_info.html">uddi2__tModelInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model_info.html#o1">tModelKey</a></td><td><a class="el" href="classuddi2____t_model_info.html">uddi2__tModelInfo</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____t_model_info.html b/doc/uddi2/html/classuddi2____t_model_info.html
new file mode 100644
index 0000000..436b9d5
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____t_model_info.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__tModelInfo Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__tModelInfo Class Reference</h1>Schema urn:uddi-org:api_v2:"tModelInfo".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____t_model_info-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____name.html">uddi2__name</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_info.html#o0">name</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":name.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a5">uddi2__tModelKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_info.html#o1">tModelKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____t_model_info.html#o2">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_info.html#o2">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o2"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"tModelInfo". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__tModelInfo::name" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____name.html">uddi2__name</a>* <a class="el" href="classuddi2____t_model_info.html#o0">uddi2__tModelInfo::name</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":name. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__tModelInfo::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____t_model_info.html#o2">soap</a>* <a class="el" href="classuddi2____t_model_info.html#o2">uddi2__tModelInfo::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__tModelInfo::tModelKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a5">uddi2__tModelKey</a> <a class="el" href="classuddi2____t_model_info.html#o1">uddi2__tModelInfo::tModelKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____t_model_infos-members.html b/doc/uddi2/html/classuddi2____t_model_infos-members.html
new file mode 100644
index 0000000..e64a200
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____t_model_infos-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__tModelInfos Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____t_model_infos.html">uddi2__tModelInfos</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model_infos.html#o1">soap</a></td><td><a class="el" href="classuddi2____t_model_infos.html">uddi2__tModelInfos</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model_infos.html#o0">tModelInfo</a></td><td><a class="el" href="classuddi2____t_model_infos.html">uddi2__tModelInfos</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____t_model_infos.html b/doc/uddi2/html/classuddi2____t_model_infos.html
new file mode 100644
index 0000000..09067aa
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____t_model_infos.html
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__tModelInfos Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__tModelInfos Class Reference</h1>Schema urn:uddi-org:api_v2:"tModelInfos".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____t_model_infos-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____t_model_info.html">uddi2__tModelInfo</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_infos.html#o0">tModelInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__tModelInfo* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____t_model_infos.html#o1">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_infos.html#o1">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o1"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"tModelInfos". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o1" doxytag="uddi2__tModelInfos::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____t_model_infos.html#o1">soap</a>* <a class="el" href="classuddi2____t_model_infos.html#o1">uddi2__tModelInfos::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__tModelInfos::tModelInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____t_model_info.html">uddi2__tModelInfo</a>* &gt; <a class="el" href="classuddi2____t_model_infos.html#o0">uddi2__tModelInfos::tModelInfo</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__tModelInfo* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____t_model_instance_details-members.html b/doc/uddi2/html/classuddi2____t_model_instance_details-members.html
new file mode 100644
index 0000000..0bb6464
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____t_model_instance_details-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__tModelInstanceDetails Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____t_model_instance_details.html">uddi2__tModelInstanceDetails</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model_instance_details.html#o1">soap</a></td><td><a class="el" href="classuddi2____t_model_instance_details.html">uddi2__tModelInstanceDetails</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model_instance_details.html#o0">tModelInstanceInfo</a></td><td><a class="el" href="classuddi2____t_model_instance_details.html">uddi2__tModelInstanceDetails</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____t_model_instance_details.html b/doc/uddi2/html/classuddi2____t_model_instance_details.html
new file mode 100644
index 0000000..9ed1789
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____t_model_instance_details.html
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__tModelInstanceDetails Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__tModelInstanceDetails Class Reference</h1>Schema urn:uddi-org:api_v2:"tModelInstanceDetails".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____t_model_instance_details-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____t_model_instance_info.html">uddi2__tModelInstanceInfo</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_instance_details.html#o0">tModelInstanceInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__tModelInstanceInfo* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____t_model_instance_details.html#o1">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_instance_details.html#o1">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o1"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"tModelInstanceDetails". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o1" doxytag="uddi2__tModelInstanceDetails::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____t_model_instance_details.html#o1">soap</a>* <a class="el" href="classuddi2____t_model_instance_details.html#o1">uddi2__tModelInstanceDetails::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__tModelInstanceDetails::tModelInstanceInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____t_model_instance_info.html">uddi2__tModelInstanceInfo</a>*&gt; <a class="el" href="classuddi2____t_model_instance_details.html#o0">uddi2__tModelInstanceDetails::tModelInstanceInfo</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__tModelInstanceInfo* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____t_model_instance_info-members.html b/doc/uddi2/html/classuddi2____t_model_instance_info-members.html
new file mode 100644
index 0000000..eb630d0
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____t_model_instance_info-members.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__tModelInstanceInfo Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____t_model_instance_info.html">uddi2__tModelInstanceInfo</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model_instance_info.html#o0">description</a></td><td><a class="el" href="classuddi2____t_model_instance_info.html">uddi2__tModelInstanceInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model_instance_info.html#o1">instanceDetails</a></td><td><a class="el" href="classuddi2____t_model_instance_info.html">uddi2__tModelInstanceInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model_instance_info.html#o3">soap</a></td><td><a class="el" href="classuddi2____t_model_instance_info.html">uddi2__tModelInstanceInfo</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model_instance_info.html#o2">tModelKey</a></td><td><a class="el" href="classuddi2____t_model_instance_info.html">uddi2__tModelInstanceInfo</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____t_model_instance_info.html b/doc/uddi2/html/classuddi2____t_model_instance_info.html
new file mode 100644
index 0000000..d3d16f4
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____t_model_instance_info.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__tModelInstanceInfo Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__tModelInstanceInfo Class Reference</h1>Schema urn:uddi-org:api_v2:"tModelInstanceInfo".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____t_model_instance_info-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____description.html">uddi2__description</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_instance_info.html#o0">description</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__description* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____instance_details.html">uddi2__instanceDetails</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_instance_info.html#o1">instanceDetails</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":instanceDetails.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="uddi__v2_8h.html#a5">uddi2__tModelKey</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_instance_info.html#o2">tModelKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____t_model_instance_info.html#o3">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_instance_info.html#o3">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o3"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"tModelInstanceInfo". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__tModelInstanceInfo::description" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____description.html">uddi2__description</a>* &gt; <a class="el" href="classuddi2____t_model_instance_info.html#o0">uddi2__tModelInstanceInfo::description</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__description* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__tModelInstanceInfo::instanceDetails" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____instance_details.html">uddi2__instanceDetails</a>* <a class="el" href="classuddi2____t_model_instance_info.html#o1">uddi2__tModelInstanceInfo::instanceDetails</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":instanceDetails. 

+<p>

+Optional element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__tModelInstanceInfo::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____t_model_instance_info.html#o3">soap</a>* <a class="el" href="classuddi2____t_model_instance_info.html#o3">uddi2__tModelInstanceInfo::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__tModelInstanceInfo::tModelKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="uddi__v2_8h.html#a5">uddi2__tModelKey</a> <a class="el" href="classuddi2____t_model_instance_info.html#o2">uddi2__tModelInstanceInfo::tModelKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____t_model_list-members.html b/doc/uddi2/html/classuddi2____t_model_list-members.html
new file mode 100644
index 0000000..63c7cec
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____t_model_list-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__tModelList Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____t_model_list.html">uddi2__tModelList</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model_list.html#o1">generic</a></td><td><a class="el" href="classuddi2____t_model_list.html">uddi2__tModelList</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model_list.html#o2">operator_</a></td><td><a class="el" href="classuddi2____t_model_list.html">uddi2__tModelList</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model_list.html#o4">soap</a></td><td><a class="el" href="classuddi2____t_model_list.html">uddi2__tModelList</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model_list.html#o0">tModelInfos</a></td><td><a class="el" href="classuddi2____t_model_list.html">uddi2__tModelList</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____t_model_list.html#o3">truncated</a></td><td><a class="el" href="classuddi2____t_model_list.html">uddi2__tModelList</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____t_model_list.html b/doc/uddi2/html/classuddi2____t_model_list.html
new file mode 100644
index 0000000..38cc1b2
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____t_model_list.html
@@ -0,0 +1,167 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__tModelList Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__tModelList Class Reference</h1>Schema urn:uddi-org:api_v2:"tModelList".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____t_model_list-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____t_model_infos.html">uddi2__tModelInfos</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_list.html#o0">tModelInfos</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "urn:uddi-org:api_v2":tModelInfos.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_list.html#o1">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_list.html#o2">operator_</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute operator of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>enum <a class="el" href="uddi__v2_8h.html#a48">uddi2__truncated</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_list.html#o3">truncated</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute truncated of type "urn:uddi-org:api_v2":truncated.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____t_model_list.html#o4">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_list.html#o4">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o4"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"tModelList". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o1" doxytag="uddi2__tModelList::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____t_model_list.html#o1">uddi2__tModelList::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__tModelList::operator_" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____t_model_list.html#o2">uddi2__tModelList::operator_</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute operator of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__tModelList::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____t_model_list.html#o4">soap</a>* <a class="el" href="classuddi2____t_model_list.html#o4">uddi2__tModelList::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="uddi2__tModelList::tModelInfos" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="classuddi2____t_model_infos.html">uddi2__tModelInfos</a>* <a class="el" href="classuddi2____t_model_list.html#o0">uddi2__tModelList::tModelInfos</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "urn:uddi-org:api_v2":tModelInfos. 

+<p>

+Required element     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__tModelList::truncated" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> enum <a class="el" href="uddi__v2_8h.html#a48">uddi2__truncated</a>* <a class="el" href="classuddi2____t_model_list.html#o3">uddi2__tModelList::truncated</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute truncated of type "urn:uddi-org:api_v2":truncated. 

+<p>

+Optional attribute     </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____validate___u_s_c_o_r_evalues-members.html b/doc/uddi2/html/classuddi2____validate___u_s_c_o_r_evalues-members.html
new file mode 100644
index 0000000..6193527
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____validate___u_s_c_o_r_evalues-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__validate_USCOREvalues Member List</h1>This is the complete list of members for <a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html">uddi2__validate_USCOREvalues</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o0">businessEntity</a></td><td><a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html">uddi2__validate_USCOREvalues</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o1">businessService</a></td><td><a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html">uddi2__validate_USCOREvalues</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o3">generic</a></td><td><a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html">uddi2__validate_USCOREvalues</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o4">soap</a></td><td><a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html">uddi2__validate_USCOREvalues</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o2">tModel</a></td><td><a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html">uddi2__validate_USCOREvalues</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/classuddi2____validate___u_s_c_o_r_evalues.html b/doc/uddi2/html/classuddi2____validate___u_s_c_o_r_evalues.html
new file mode 100644
index 0000000..18b8a55
--- /dev/null
+++ b/doc/uddi2/html/classuddi2____validate___u_s_c_o_r_evalues.html
@@ -0,0 +1,167 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: uddi2__validate_USCOREvalues Class Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>uddi2__validate_USCOREvalues Class Reference</h1>Schema urn:uddi-org:api_v2:"validate_values".  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;uddi_v2.h&gt;</code>

+<p>

+<a href="classuddi2____validate___u_s_c_o_r_evalues-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o0">businessEntity</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__businessEntity* with length 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____business_service.html">uddi2__businessService</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o1">businessService</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__businessService* with length 0..unbounded.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classuddi2____t_model.html">uddi2__tModel</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o2">tModel</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vector of uddi2__tModel* with length 0..unbounded.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o3">generic</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute generic of type xs:string.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o4">soap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o4">soap</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A handle to the soap struct context that manages this class instance.  <a href="#o4"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Schema urn:uddi-org:api_v2:"validate_values". 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="uddi2__validate_USCOREvalues::businessEntity" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a>* &gt; <a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o0">uddi2__validate_USCOREvalues::businessEntity</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__businessEntity* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="uddi2__validate_USCOREvalues::businessService" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____business_service.html">uddi2__businessService</a>*&gt; <a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o1">uddi2__validate_USCOREvalues::businessService</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__businessService* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="uddi2__validate_USCOREvalues::generic" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o3">uddi2__validate_USCOREvalues::generic</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute generic of type xs:string. 

+<p>

+Required attribute     </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="uddi2__validate_USCOREvalues::soap" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o4">soap</a>* <a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o4">uddi2__validate_USCOREvalues::soap</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+A handle to the soap struct context that manages this class instance. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="uddi2__validate_USCOREvalues::tModel" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classuddi2____t_model.html">uddi2__tModel</a>* &gt; <a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o2">uddi2__validate_USCOREvalues::tModel</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Vector of uddi2__tModel* with length 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this class was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/doxygen.css b/doc/uddi2/html/doxygen.css
new file mode 100644
index 0000000..df2e582
--- /dev/null
+++ b/doc/uddi2/html/doxygen.css
@@ -0,0 +1,216 @@
+H1 {
+	text-align: center;
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+}
+H2 {
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+}
+CAPTION { font-weight: bold }
+DIV.qindex {
+	width: 100%;
+	background-color: #eeeeff;
+	border: 1px solid #B0B0B0;
+	text-align: center;
+	margin: 2px;
+	padding: 2px;
+	line-height: 120%;
+}
+A.qindex {
+       text-decoration: none;
+       font-weight: bold;
+       color: #1A419D;
+       padding: 2px;
+}
+A.qindex:visited {
+       text-decoration: none;
+       font-weight: bold;
+       color: #1A419D
+       padding: 2px;
+}
+A.qindex:hover {
+	text-decoration: none;
+	background-color: #ddddff;
+	padding: 2px;
+}
+A.qindexHL {
+	text-decoration: none;
+	font-weight: bold;
+	background-color: #6666cc;
+	color: #ffffff;
+	padding: 2px 6px;
+	border: 1px double #9295C2;
+}
+A.qindexHL:hover {
+	text-decoration: none;
+	background-color: #6666cc;
+	color: #ffffff;
+	padding: 2px 6px;
+}
+A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
+A.el { text-decoration: none; font-weight: bold }
+A.elRef { font-weight: bold }
+A.code { text-decoration: none; font-weight: normal; color: #1A419D}
+A.codeRef { font-weight: normal; color: #1A419D}
+A:hover { text-decoration: none; background-color: #f2f2ff }
+DL.el { margin-left: -1cm }
+PRE.fragment {
+	border: 1px solid #CCCCCC;
+	background-color: #f5f5f5;
+	margin-top: 4px;
+	margin-bottom: 4px;
+	margin-left: 2px;
+	margin-right: 8px;
+	padding-left: 6px;
+	padding-right: 6px;
+	padding-top: 4px;
+	padding-bottom: 4px;
+}
+DIV.fragment {
+	border: 1px solid #CCCCCC;
+	background-color: #f5f5f5;
+	padding: 6px;
+}
+DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
+TD.md { background-color: #F4F4FB; font-weight: bold; }
+TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; }
+TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; }
+DIV.groupHeader {
+       margin-left: 16px;
+       margin-top: 12px;
+       margin-bottom: 6px;
+       font-weight: bold;
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+}
+DIV.groupText { margin-left: 16px; font-style: italic; font-size: 14px }
+BODY {
+	background: white;
+	color: black;
+	margin-right: 20px;
+	margin-left: 20px;
+}
+TD.indexkey {
+	background-color: #eeeeff;
+	font-weight: bold;
+	padding-right  : 10px;
+	padding-top    : 2px;
+	padding-left   : 10px;
+	padding-bottom : 2px;
+	margin-left    : 0px;
+	margin-right   : 0px;
+	margin-top     : 2px;
+	margin-bottom  : 2px;
+	border: 1px solid #CCCCCC;
+}
+TD.indexvalue {
+	background-color: #eeeeff;
+	font-style: italic;
+	padding-right  : 10px;
+	padding-top    : 2px;
+	padding-left   : 10px;
+	padding-bottom : 2px;
+	margin-left    : 0px;
+	margin-right   : 0px;
+	margin-top     : 2px;
+	margin-bottom  : 2px;
+	border: 1px solid #CCCCCC;
+}
+TR.memlist {
+   background-color: #f0f0f0; 
+}
+P.formulaDsp { text-align: center; }
+IMG.formulaDsp { }
+IMG.formulaInl { vertical-align: middle; }
+SPAN.keyword       { color: #008000 }
+SPAN.keywordtype   { color: #604020 }
+SPAN.keywordflow   { color: #e08000 }
+SPAN.comment       { color: #800000 }
+SPAN.preprocessor  { color: #806020 }
+SPAN.stringliteral { color: #002080 }
+SPAN.charliteral   { color: #008080 }
+.mdTable {
+	border: 1px solid #868686;
+	background-color: #F4F4FB;
+}
+.mdRow {
+	padding: 8px 10px;
+}
+.mdescLeft {
+       padding: 0px 8px 4px 8px;
+	font-size: 14px;
+	font-style: italic;
+	background-color: #FAFAFA;
+	border-top: 1px none #E0E0E0;
+	border-right: 1px none #E0E0E0;
+	border-bottom: 1px none #E0E0E0;
+	border-left: 1px none #E0E0E0;
+	margin: 0px;
+}
+.mdescRight {
+       padding: 0px 8px 4px 8px;
+	font-size: 14px;
+	font-style: italic;
+	background-color: #FAFAFA;
+	border-top: 1px none #E0E0E0;
+	border-right: 1px none #E0E0E0;
+	border-bottom: 1px none #E0E0E0;
+	border-left: 1px none #E0E0E0;
+	margin: 0px;
+}
+.memItemLeft {
+	padding: 1px 0px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-style: solid;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+	font-size: 12px;
+}
+.memItemRight {
+	padding: 1px 8px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-style: solid;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+	font-size: 13px;
+}
+.search     { color: #003399;
+              font-weight: bold;
+}
+FORM.search {
+              margin-bottom: 0px;
+              margin-top: 0px;
+}
+INPUT.search { font-size: 75%;
+               color: #000080;
+               font-weight: normal;
+               background-color: #eeeeff;
+}
+TD.tiny      { font-size: 75%;
+}
+a {
+	color: #252E78;
+}
+a:visited {
+	color: #3D2185;
+}
diff --git a/doc/uddi2/html/doxygen.png b/doc/uddi2/html/doxygen.png
new file mode 100644
index 0000000..9da55f9
--- /dev/null
+++ b/doc/uddi2/html/doxygen.png
Binary files differ
diff --git a/doc/uddi2/html/example1.html b/doc/uddi2/html/example1.html
new file mode 100644
index 0000000..e2dd837
--- /dev/null
+++ b/doc/uddi2/html/example1.html
@@ -0,0 +1,68 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Code Example 1: Finding a service</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1><a class="anchor" name="example1">Code Example 1: Finding a service</a></h1>This example shows you how to find Web services. In this case, the example finds Web services with names that begin with the word "magic".<p>

+<div class="fragment"><pre><span class="preprocessor">#include "inqH.h"</span>

+

+<span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)

+{ 

+  <span class="keywordtype">char</span> *search_string = <span class="stringliteral">"magic"</span>;

+

+  <span class="keywordflow">if</span> (argc &gt; 1)

+    search_string = argv[1];

+

+  <span class="comment">// Create a gSOAP context</span>

+  <span class="keyword">struct </span>soap *soap = soap_new();

+

+  <span class="comment">// Create an object to find a business</span>

+  <a class="code" href="classuddi2____find___u_s_c_o_r_eservice.html">uddi2__find_USCOREservice</a> fs(soap, search_string);

+

+  <span class="comment">// Send the request</span>

+  <a class="code" href="classuddi2____service_list.html">uddi2__serviceList</a> *sl = fs.send(<span class="stringliteral">"http://uddi.xmethods.net/inquire"</span>);

+

+  <span class="comment">// Check if result is OK</span>

+  <span class="keywordflow">if</span> (!sl)

+    soap_print_fault(soap, stderr);

+

+  <span class="comment">// If OK, report the service name(s) and unique identification keys</span>

+  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (sl-&gt;<a class="code" href="classuddi2____service_list.html#o0">serviceInfos</a>)

+  {

+    std::cout &lt;&lt; <span class="stringliteral">"Search results on "</span> &lt;&lt; search_string &lt;&lt; <span class="stringliteral">":"</span> &lt;&lt; std::endl &lt;&lt; std::endl;

+

+    <span class="keywordflow">for</span> (std::vector&lt;uddi2__serviceInfo*&gt;::const_iterator si = sl-&gt;<a class="code" href="classuddi2____service_list.html#o0">serviceInfos</a>-&gt;<a class="code" href="classuddi2____service_infos.html#o0">serviceInfo</a>.begin(); si != sl-&gt;<a class="code" href="classuddi2____service_list.html#o0">serviceInfos</a>-&gt;<a class="code" href="classuddi2____service_infos.html#o0">serviceInfo</a>.end(); ++si)

+    {

+      <span class="comment">// Report serviceKey and businessKey</span>

+      std::cout &lt;&lt; <span class="stringliteral">"serviceKey="</span> &lt;&lt; (*si)-&gt;serviceKey &lt;&lt; std::endl &lt;&lt; <span class="stringliteral">"businessKey="</span> &lt;&lt; (*si)-&gt;businessKey &lt;&lt; std::endl;

+

+      <span class="comment">// Report names</span>

+      <span class="keywordflow">for</span> (std::vector&lt;uddi2__name*&gt;::const_iterator n = (*si)-&gt;name.begin(); n != (*si)-&gt;name.end(); ++n)

+        std::cout &lt;&lt; <span class="stringliteral">"name="</span> &lt;&lt; (*n)-&gt;__item &lt;&lt; std::endl;

+

+      std::cout &lt;&lt; std::endl;

+    }

+  }

+

+  <span class="comment">// Remove deserialized objects</span>

+  soap_destroy(soap);

+

+  <span class="comment">// Remove temporary data</span>

+  soap_end(soap);

+

+  <span class="comment">// Detach and free context</span>

+  soap_done(soap);

+  free(soap);

+

+  <span class="keywordflow">return</span> 0;

+}

+</pre></div><p>

+To compile:<ul>

+<li>wsdl2h -tuddi2-typemap.dat inquire_v2.wsdl</li><li>soapcpp2 -I.. -pinq inquire_v2.h</li><li>g++ -DWITH_NONAMESPACES -I.. -o example1 example1.cpp inquire_v2.cpp inqC.cpp inqClient.cpp ../stdsoap2.cpp </li></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/example2.html b/doc/uddi2/html/example2.html
new file mode 100644
index 0000000..97b0e2f
--- /dev/null
+++ b/doc/uddi2/html/example2.html
@@ -0,0 +1,68 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Code Example 2: Finding a business</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1><a class="anchor" name="example2">Code Example 2: Finding a business</a></h1>This example shows you how to find a business from a UDDI server.<p>

+<div class="fragment"><pre><span class="preprocessor">#include "inqH.h"</span>

+

+<span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)

+{ 

+  <span class="keywordtype">char</span> *search_string = <span class="stringliteral">"xmethods"</span>;

+

+  <span class="keywordflow">if</span> (argc &gt; 1)

+    search_string = argv[1];

+

+  <span class="comment">// Create a gSOAP context</span>

+  <span class="keyword">struct </span>soap *soap = soap_new();

+

+  <span class="comment">// Create an object to find a business</span>

+  <a class="code" href="classuddi2____find___u_s_c_o_r_ebusiness.html">uddi2__find_USCOREbusiness</a> fb(soap, search_string);

+

+  <span class="comment">// Send the request</span>

+  <a class="code" href="classuddi2____business_list.html">uddi2__businessList</a> *bl = fb.send(<span class="stringliteral">"http://uddi.xmethods.net/inquire"</span>);

+

+  <span class="comment">// Check if result is OK</span>

+  <span class="keywordflow">if</span> (!bl)

+    soap_print_fault(soap, stderr);

+

+  <span class="comment">// If OK, report the business name(s) and unique identification keys</span>

+  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (bl-&gt;<a class="code" href="classuddi2____business_list.html#o0">businessInfos</a>)

+  {

+    std::cout &lt;&lt; <span class="stringliteral">"Search results on "</span> &lt;&lt; search_string &lt;&lt; <span class="stringliteral">":"</span> &lt;&lt; std::endl &lt;&lt; std::endl;

+

+    <span class="keywordflow">for</span> (std::vector&lt;uddi2__businessInfo*&gt;::const_iterator bi = bl-&gt;<a class="code" href="classuddi2____business_list.html#o0">businessInfos</a>-&gt;<a class="code" href="classuddi2____business_infos.html#o0">businessInfo</a>.begin(); bi != bl-&gt;<a class="code" href="classuddi2____business_list.html#o0">businessInfos</a>-&gt;<a class="code" href="classuddi2____business_infos.html#o0">businessInfo</a>.end(); ++bi)

+    {

+      <span class="comment">// Report businessKey</span>

+      std::cout &lt;&lt; <span class="stringliteral">"businessKey="</span> &lt;&lt; (*bi)-&gt;businessKey &lt;&lt; std::endl;

+

+      <span class="comment">// Report names</span>

+      <span class="keywordflow">for</span> (std::vector&lt;uddi2__name*&gt;::const_iterator n = (*bi)-&gt;name.begin(); n != (*bi)-&gt;name.end(); ++n)

+        std::cout &lt;&lt; <span class="stringliteral">"name="</span> &lt;&lt; (*n)-&gt;__item &lt;&lt; std::endl;

+

+      std::cout &lt;&lt; std::endl;

+    }

+  }

+

+  <span class="comment">// Remove deserialized objects</span>

+  soap_destroy(soap);

+

+  <span class="comment">// Remove temporary data</span>

+  soap_end(soap);

+

+  <span class="comment">// Detach and free context</span>

+  soap_done(soap);

+  free(soap);

+

+  <span class="keywordflow">return</span> 0;

+}

+</pre></div><p>

+To compile:<ul>

+<li>wsdl2h -tuddi2-typemap.dat inquire_v2.wsdl</li><li>soapcpp2 -I.. -pinq inquire_v2.h</li><li>g++ -DWITH_NONAMESPACES -I.. -o example2 example2.cpp inquire_v2.cpp inqC.cpp inqClient.cpp ../stdsoap2.cpp </li></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/example3.html b/doc/uddi2/html/example3.html
new file mode 100644
index 0000000..fbdaa14
--- /dev/null
+++ b/doc/uddi2/html/example3.html
@@ -0,0 +1,159 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Code Example 3: Publishing a WSDL and service on XMethods</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1><a class="anchor" name="example3">Code Example 3: Publishing a WSDL and service on XMethods</a></h1>This example shows you how to publish a Web service. In this case, the example template code obtains an authorization token, saves the tModel with the WSDL URL in the server, and saves the business service information in the server.<p>

+<div class="fragment"><pre><span class="preprocessor">#include "pubH.h"</span>

+

+<span class="keyword">const</span> <span class="keywordtype">char</span> *server = <span class="stringliteral">"https://uddi.xmethods.net/publish"</span>;

+

+<span class="keyword">const</span> <span class="keywordtype">char</span> *userid = <span class="stringliteral">"..."</span>; <span class="comment">// user ID to access UDDI server</span>

+<span class="keyword">const</span> <span class="keywordtype">char</span> *passwd = <span class="stringliteral">"..."</span>; <span class="comment">// password to access UDDI server</span>

+

+<span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)

+{ 

+  <span class="comment">// Create a gSOAP context</span>

+  <span class="keyword">struct </span>soap *soap = soap_new();

+

+  <span class="comment">// Setup SSL context (optional) to verify server's credentials</span>

+  <span class="keywordflow">if</span> (soap_ssl_client_context(soap, SOAP_SSL_DEFAULT, NULL, NULL, <span class="stringliteral">"cacerts.pem"</span>, NULL, NULL))

+  { 

+    soap_print_fault(soap, stderr);

+    exit(1);

+  }

+

+  <span class="comment">// Step 1: Get an authorization token from the UDDI server</span>

+  <a class="code" href="classuddi2____get___u_s_c_o_r_eauth_token.html">uddi2__get_USCOREauthToken</a> get_authToken(soap, userid, passwd);

+  <a class="code" href="classuddi2____auth_token.html">uddi2__authToken</a> *authToken = get_authToken.send(server);

+

+  <span class="comment">// Check if authorized</span>

+  <span class="keywordflow">if</span> (!authToken)

+  {

+    soap_print_fault(soap, stderr);

+    exit(1);

+  }

+

+  <span class="comment">// Authorization info provided by server for this session</span>

+  <span class="keywordtype">char</span> *authInfo = authToken-&gt;<a class="code" href="classuddi2____auth_token.html#o0">authInfo</a>;

+

+  <span class="comment">// Step 2: Create a tModel for the WSDL to be published</span>

+  <a class="code" href="classuddi2____t_model.html">uddi2__tModel</a> tModel;

+  tModel.soap_default(soap);

+

+  <span class="comment">// Create the tModel and service name</span>

+  tModel.<a class="code" href="classuddi2____t_model.html#o0">name</a> = soap_new_uddi2__name(soap, -1);

+  tModel.<a class="code" href="classuddi2____t_model.html#o0">name</a>-&gt;<a class="code" href="classuddi2____name.html#o0">__item</a> = <span class="stringliteral">"..."</span>;

+  tModel.<a class="code" href="classuddi2____t_model.html#o0">name</a>-&gt;<a class="code" href="classuddi2____name.html#o1">xml__lang_</a> = <span class="stringliteral">"en"</span>;

+

+  <span class="comment">// Create XMethods description elements (see http://www.xmethods.net/ve2/UDDI.po)</span>

+  <a class="code" href="classuddi2____description.html">uddi2__description</a> *description = soap_new_uddi2__description(soap, 6);

+  description[0].<a class="code" href="classuddi2____description.html#o0">__item</a> = <span class="stringliteral">"SHORT DESCRIPTION: ..."</span>;

+  description[0].<a class="code" href="classuddi2____description.html#o1">xml__lang_</a> = <span class="stringliteral">"en"</span>;

+  description[1].<a class="code" href="classuddi2____description.html#o0">__item</a> = <span class="stringliteral">"SHORT DESCRIPTION: ..."</span>;

+  description[1].<a class="code" href="classuddi2____description.html#o1">xml__lang_</a> = <span class="stringliteral">"en"</span>;

+  description[2].<a class="code" href="classuddi2____description.html#o0">__item</a> = <span class="stringliteral">"USAGE NOTES: ..."</span>;

+  description[2].<a class="code" href="classuddi2____description.html#o1">xml__lang_</a> = <span class="stringliteral">"en"</span>;

+  description[3].<a class="code" href="classuddi2____description.html#o0">__item</a> = <span class="stringliteral">"HOMEPAGE URL: ..."</span>;

+  description[3].<a class="code" href="classuddi2____description.html#o1">xml__lang_</a> = <span class="stringliteral">"en"</span>;

+  description[4].<a class="code" href="classuddi2____description.html#o0">__item</a> = <span class="stringliteral">"CONTACT EMAIL: ..."</span>;

+  description[4].<a class="code" href="classuddi2____description.html#o1">xml__lang_</a> = <span class="stringliteral">"en"</span>;

+  description[5].<a class="code" href="classuddi2____description.html#o0">__item</a> = <span class="stringliteral">"IMPLEMENTATION: ..."</span>;

+  description[5].<a class="code" href="classuddi2____description.html#o1">xml__lang_</a> = <span class="stringliteral">"en"</span>;

+

+  <span class="comment">// Add the four description elements to the tModel</span>

+  tModel.<a class="code" href="classuddi2____t_model.html#o1">description</a>.push_back(description + 0);

+  tModel.<a class="code" href="classuddi2____t_model.html#o1">description</a>.push_back(description + 1);

+  tModel.<a class="code" href="classuddi2____t_model.html#o1">description</a>.push_back(description + 2);

+  tModel.<a class="code" href="classuddi2____t_model.html#o1">description</a>.push_back(description + 4);

+

+  <span class="comment">// Add an overviewDoc element with description and overviewURL</span>

+  tModel.<a class="code" href="classuddi2____t_model.html#o2">overviewDoc</a> = soap_new_uddi2__overviewDoc(soap, -1);

+  tModel.<a class="code" href="classuddi2____t_model.html#o2">overviewDoc</a>-&gt;soap_default(soap);

+  tModel.<a class="code" href="classuddi2____t_model.html#o2">overviewDoc</a>-&gt;<a class="code" href="classuddi2____overview_doc.html#o0">description</a>.push_back(soap_new_uddi2__description(soap, -1));

+  tModel.<a class="code" href="classuddi2____t_model.html#o2">overviewDoc</a>-&gt;<a class="code" href="classuddi2____overview_doc.html#o0">description</a>[0]-&gt;__item = <span class="stringliteral">"WSDL source document"</span>;

+  tModel.<a class="code" href="classuddi2____t_model.html#o2">overviewDoc</a>-&gt;<a class="code" href="classuddi2____overview_doc.html#o0">description</a>[0]-&gt;xml__lang_ = <span class="stringliteral">"en"</span>;

+  tModel.<a class="code" href="classuddi2____t_model.html#o2">overviewDoc</a>-&gt;<a class="code" href="classuddi2____overview_doc.html#o1">overviewURL</a> = <span class="stringliteral">"http://.../my.wsdl#bindingName"</span>;

+

+  <span class="comment">// Omit identifier bag</span>

+  tModel.<a class="code" href="classuddi2____t_model.html#o3">identifierBag</a> = NULL;

+

+  <span class="comment">// Add a category with a WSDL-specific keyedReference</span>

+  tModel.<a class="code" href="classuddi2____t_model.html#o4">categoryBag</a> = soap_new_uddi2__categoryBag(soap, -1);

+  tModel.<a class="code" href="classuddi2____t_model.html#o4">categoryBag</a>-&gt;soap_default(soap);

+  tModel.<a class="code" href="classuddi2____t_model.html#o4">categoryBag</a>-&gt;<a class="code" href="classuddi2____category_bag.html#o0">keyedReference</a>.push_back(soap_new_uddi2__keyedReference(soap, -1));

+  tModel.<a class="code" href="classuddi2____t_model.html#o4">categoryBag</a>-&gt;<a class="code" href="classuddi2____category_bag.html#o0">keyedReference</a>[0]-&gt;tModelKey = <span class="stringliteral">"..."</span>;

+  tModel.<a class="code" href="classuddi2____t_model.html#o4">categoryBag</a>-&gt;<a class="code" href="classuddi2____category_bag.html#o0">keyedReference</a>[0]-&gt;keyName = <span class="stringliteral">"uddi-org:types"</span>;

+  tModel.<a class="code" href="classuddi2____t_model.html#o4">categoryBag</a>-&gt;<a class="code" href="classuddi2____category_bag.html#o0">keyedReference</a>[0]-&gt;keyValue = <span class="stringliteral">"wsdlSpec"</span>;

+

+  tModel.<a class="code" href="classuddi2____t_model.html#o7">authorizedName</a> = <span class="stringliteral">"..."</span>;

+  tModel.<a class="code" href="classuddi2____t_model.html#o6">operator_</a> = <span class="stringliteral">"..."</span>;

+  tModel.<a class="code" href="classuddi2____t_model.html#o5">tModelKey</a> = <span class="stringliteral">"..."</span>;

+

+  <span class="comment">// Save the tModel</span>

+  <a class="code" href="classuddi2____save___u_s_c_o_r_et_model.html">uddi2__save_USCOREtModel</a> save_tModel(soap, tModel);

+  <a class="code" href="classuddi2____t_model_detail.html">uddi2__tModelDetail</a> *tModelDetail = save_tModel.send(server, authInfo);

+

+  <span class="comment">// Step 3: Create a new service to be published</span>

+  <a class="code" href="classuddi2____business_service.html">uddi2__businessService</a> service;

+  service.soap_default(soap);

+

+  <span class="comment">// Service name is the tModel name (XMethods)</span>

+  service.<a class="code" href="classuddi2____business_service.html#o0">name</a>.push_back(tModel.<a class="code" href="classuddi2____t_model.html#o0">name</a>);

+

+  <span class="comment">// Add two description elements to the service</span>

+  service.<a class="code" href="classuddi2____business_service.html#o1">description</a>.push_back(description + 4);

+  service.<a class="code" href="classuddi2____business_service.html#o1">description</a>.push_back(description + 5);

+

+  <span class="comment">// Create binding template</span>

+  <a class="code" href="classuddi2____binding_template.html">uddi2__bindingTemplate</a> bindingTemplate;

+  bindingTemplate.soap_default(soap);

+  bindingTemplate.<a class="code" href="classuddi2____binding_template.html#o1">tModelInstanceDetails</a> = soap_new_uddi2__tModelInstanceDetails(soap, -1);

+  bindingTemplate.<a class="code" href="classuddi2____binding_template.html#o1">tModelInstanceDetails</a>-&gt;<a class="code" href="classuddi2____t_model_instance_details.html#o0">tModelInstanceInfo</a>.push_back(soap_new_uddi2__tModelInstanceInfo(soap, -1));

+  bindingTemplate.<a class="code" href="classuddi2____binding_template.html#o1">tModelInstanceDetails</a>-&gt;<a class="code" href="classuddi2____t_model_instance_details.html#o0">tModelInstanceInfo</a>[0]-&gt;instanceDetails = NULL;

+  bindingTemplate.<a class="code" href="classuddi2____binding_template.html#o1">tModelInstanceDetails</a>-&gt;<a class="code" href="classuddi2____t_model_instance_details.html#o0">tModelInstanceInfo</a>[0]-&gt;tModelKey = tModel.<a class="code" href="classuddi2____t_model.html#o5">tModelKey</a>;

+  bindingTemplate.<a class="code" href="classuddi2____binding_template.html#o2">accessPoint</a> = soap_new_uddi2__accessPoint(soap, -1);

+  bindingTemplate.<a class="code" href="classuddi2____binding_template.html#o2">accessPoint</a>-&gt;<a class="code" href="classuddi2____access_point.html#o0">__item</a> = <span class="stringliteral">"..."</span>;

+  bindingTemplate.<a class="code" href="classuddi2____binding_template.html#o2">accessPoint</a>-&gt;<a class="code" href="classuddi2____access_point.html#o1">URLType</a> = <a class="code" href="uddi__v2_8h.html#a49a11">uddi2__URLType__http</a>;

+  bindingTemplate.<a class="code" href="classuddi2____binding_template.html#o3">hostingRedirector</a> = NULL;

+  bindingTemplate.<a class="code" href="classuddi2____binding_template.html#o4">serviceKey</a> = <span class="stringliteral">"..."</span>;

+  bindingTemplate.<a class="code" href="classuddi2____binding_template.html#o5">bindingKey</a> = <span class="stringliteral">"..."</span>;

+

+  <span class="comment">// Add binding Template to service</span>

+  service.<a class="code" href="classuddi2____business_service.html#o2">bindingTemplates</a> = soap_new_uddi2__bindingTemplates(soap, -1);

+  service.<a class="code" href="classuddi2____business_service.html#o2">bindingTemplates</a>-&gt;soap_default(soap);

+  service.<a class="code" href="classuddi2____business_service.html#o2">bindingTemplates</a>-&gt;<a class="code" href="classuddi2____binding_templates.html#o0">bindingTemplate</a>.push_back(&amp;bindingTemplate);

+

+  service.<a class="code" href="classuddi2____business_service.html#o3">categoryBag</a> = NULL;

+  service.<a class="code" href="classuddi2____business_service.html#o4">serviceKey</a> = <span class="stringliteral">"..."</span>;

+  service.<a class="code" href="classuddi2____business_service.html#o5">businessKey</a> = <span class="stringliteral">"..."</span>;

+

+  <span class="comment">// Save the service</span>

+  <a class="code" href="classuddi2____save___u_s_c_o_r_eservice.html">uddi2__save_USCOREservice</a> save_service(soap, service);

+  <a class="code" href="classuddi2____service_detail.html">uddi2__serviceDetail</a> *serviceDetail = save_service.send(server, authInfo);

+

+  <span class="comment">// Step 4: Discard authorization token</span>

+  <a class="code" href="classuddi2____discard___u_s_c_o_r_eauth_token.html">uddi2__discard_USCOREauthToken</a> discard_authToken(soap, authInfo);

+  <a class="code" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> *dispositionReport = discard_authToken.send(server);

+

+  <span class="comment">// Remove deserialized objects</span>

+  soap_destroy(soap);

+

+  <span class="comment">// Remove temporary data</span>

+  soap_end(soap);

+

+  <span class="comment">// Detach and free context</span>

+  soap_done(soap);

+  free(soap);

+

+  <span class="keywordflow">return</span> 0;

+}

+</pre></div>To compile:<ul>

+<li>wsdl2h -tuddi2-typemap.dat publish_v2.wsdl</li><li>soapcpp2 -I.. -ppub publish_v2.h</li><li>g++ -DWITH_OPENSSL -DWITH_NONAMESPACES -I.. -o example3 example3.cpp publish_v2.cpp pubC.cpp pubClient.cpp ../stdsoap2.cpp </li></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/files.html b/doc/uddi2/html/files.html
new file mode 100644
index 0000000..b6f83e3
--- /dev/null
+++ b/doc/uddi2/html/files.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: File Index</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindexHL" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>gSOAP UDDI v2 File List</h1>Here is a list of all files with brief descriptions:<table>

+  <tr><td class="indexkey">/Users/engelen/Projects/gsoap/doc/uddi2/<a class="el" href="uddi__v2_8h.html">uddi_v2.h</a></td><td class="indexvalue"></td></tr>

+</table>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:57 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/ftv2blank.png b/doc/uddi2/html/ftv2blank.png
new file mode 100644
index 0000000..493c3c0
--- /dev/null
+++ b/doc/uddi2/html/ftv2blank.png
Binary files differ
diff --git a/doc/uddi2/html/ftv2doc.png b/doc/uddi2/html/ftv2doc.png
new file mode 100644
index 0000000..f72999f
--- /dev/null
+++ b/doc/uddi2/html/ftv2doc.png
Binary files differ
diff --git a/doc/uddi2/html/ftv2folderclosed.png b/doc/uddi2/html/ftv2folderclosed.png
new file mode 100644
index 0000000..d6d0634
--- /dev/null
+++ b/doc/uddi2/html/ftv2folderclosed.png
Binary files differ
diff --git a/doc/uddi2/html/ftv2folderopen.png b/doc/uddi2/html/ftv2folderopen.png
new file mode 100644
index 0000000..bbe2c91
--- /dev/null
+++ b/doc/uddi2/html/ftv2folderopen.png
Binary files differ
diff --git a/doc/uddi2/html/ftv2lastnode.png b/doc/uddi2/html/ftv2lastnode.png
new file mode 100644
index 0000000..e7b9ba9
--- /dev/null
+++ b/doc/uddi2/html/ftv2lastnode.png
Binary files differ
diff --git a/doc/uddi2/html/ftv2link.png b/doc/uddi2/html/ftv2link.png
new file mode 100644
index 0000000..14f3fed
--- /dev/null
+++ b/doc/uddi2/html/ftv2link.png
Binary files differ
diff --git a/doc/uddi2/html/ftv2mlastnode.png b/doc/uddi2/html/ftv2mlastnode.png
new file mode 100644
index 0000000..09ceb6a
--- /dev/null
+++ b/doc/uddi2/html/ftv2mlastnode.png
Binary files differ
diff --git a/doc/uddi2/html/ftv2mnode.png b/doc/uddi2/html/ftv2mnode.png
new file mode 100644
index 0000000..3254c05
--- /dev/null
+++ b/doc/uddi2/html/ftv2mnode.png
Binary files differ
diff --git a/doc/uddi2/html/ftv2node.png b/doc/uddi2/html/ftv2node.png
new file mode 100644
index 0000000..c9f06a5
--- /dev/null
+++ b/doc/uddi2/html/ftv2node.png
Binary files differ
diff --git a/doc/uddi2/html/ftv2plastnode.png b/doc/uddi2/html/ftv2plastnode.png
new file mode 100644
index 0000000..0b07e00
--- /dev/null
+++ b/doc/uddi2/html/ftv2plastnode.png
Binary files differ
diff --git a/doc/uddi2/html/ftv2pnode.png b/doc/uddi2/html/ftv2pnode.png
new file mode 100644
index 0000000..2001b79
--- /dev/null
+++ b/doc/uddi2/html/ftv2pnode.png
Binary files differ
diff --git a/doc/uddi2/html/ftv2vertline.png b/doc/uddi2/html/ftv2vertline.png
new file mode 100644
index 0000000..b330f3a
--- /dev/null
+++ b/doc/uddi2/html/ftv2vertline.png
Binary files differ
diff --git a/doc/uddi2/html/functions.html b/doc/uddi2/html/functions.html
new file mode 100644
index 0000000..b07e247
--- /dev/null
+++ b/doc/uddi2/html/functions.html
@@ -0,0 +1,161 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Class Members</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindexHL" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<div class="qindex"><a class="qindexHL" href="functions.html">All</a> | <a class="qindex" href="functions_func.html">Functions</a> | <a class="qindex" href="functions_vars.html">Variables</a></div>

+<div class="qindex"><a class="qindex" href="#index__">_</a> | <a class="qindex" href="#index_a">a</a> | <a class="qindex" href="#index_b">b</a> | <a class="qindex" href="#index_c">c</a> | <a class="qindex" href="#index_d">d</a> | <a class="qindex" href="#index_e">e</a> | <a class="qindex" href="#index_f">f</a> | <a class="qindex" href="#index_g">g</a> | <a class="qindex" href="#index_h">h</a> | <a class="qindex" href="#index_i">i</a> | <a class="qindex" href="#index_k">k</a> | <a class="qindex" href="#index_m">m</a> | <a class="qindex" href="#index_n">n</a> | <a class="qindex" href="#index_o">o</a> | <a class="qindex" href="#index_p">p</a> | <a class="qindex" href="#index_r">r</a> | <a class="qindex" href="#index_s">s</a> | <a class="qindex" href="#index_t">t</a> | <a class="qindex" href="#index_u">u</a> | <a class="qindex" href="#index_x">x</a></div>

+

+<p>

+

+<p>

+Here is a list of all class members with links to the classes they belong to:<h3><a class="anchor" name="index__">- _ -</a></h3><ul>

+<li>__any

+: <a class="el" href="classuddi2____business_entity_ext.html#o1">uddi2__businessEntityExt</a><li>__item

+: <a class="el" href="classuddi2____phone.html#o0">uddi2__phone</a>, <a class="el" href="classuddi2____name.html#o0">uddi2__name</a>, <a class="el" href="classuddi2____err_info.html#o0">uddi2__errInfo</a>, <a class="el" href="classuddi2____email.html#o0">uddi2__email</a>, <a class="el" href="classuddi2____discovery_u_r_l.html#o0">uddi2__discoveryURL</a>, <a class="el" href="classuddi2____description.html#o0">uddi2__description</a>, <a class="el" href="classuddi2____address_line.html#o0">uddi2__addressLine</a>, <a class="el" href="classuddi2____access_point.html#o0">uddi2__accessPoint</a></ul>

+<h3><a class="anchor" name="index_a">- a -</a></h3><ul>

+<li>accessPoint

+: <a class="el" href="classuddi2____binding_template.html#o2">uddi2__bindingTemplate</a><li>address

+: <a class="el" href="classuddi2____contact.html#o4">uddi2__contact</a><li>addressLine

+: <a class="el" href="classuddi2____address.html#o0">uddi2__address</a><li>assertionStatusItem

+: <a class="el" href="classuddi2____assertion_status_report.html#o0">uddi2__assertionStatusReport</a><li>authInfo

+: <a class="el" href="classuddi2____auth_token.html#o0">uddi2__authToken</a>, <a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o0">uddi2__set_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o0">uddi2__save_USCOREtModel</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o0">uddi2__save_USCOREservice</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o0">uddi2__save_USCOREbusiness</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o0">uddi2__save_USCOREbinding</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#o0">uddi2__get_USCOREregisteredInfo</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#o0">uddi2__get_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o0">uddi2__get_USCOREassertionStatusReport</a>, <a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#o0">uddi2__discard_USCOREauthToken</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o0">uddi2__delete_USCOREtModel</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o0">uddi2__delete_USCOREservice</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o0">uddi2__delete_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o0">uddi2__delete_USCOREbusiness</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o0">uddi2__delete_USCOREbinding</a>, <a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o0">uddi2__add_USCOREpublisherAssertions</a><li>authorizedName

+: <a class="el" href="classuddi2____publisher_assertions.html#o3">uddi2__publisherAssertions</a>, <a class="el" href="classuddi2____t_model.html#o7">uddi2__tModel</a>, <a class="el" href="classuddi2____business_entity.html#o9">uddi2__businessEntity</a></ul>

+<h3><a class="anchor" name="index_b">- b -</a></h3><ul>

+<li>bindingKey

+: <a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#o0">uddi2__get_USCOREbindingDetail</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o1">uddi2__delete_USCOREbinding</a>, <a class="el" href="classuddi2____hosting_redirector.html#o0">uddi2__hostingRedirector</a>, <a class="el" href="classuddi2____binding_template.html#o5">uddi2__bindingTemplate</a><li>bindingTemplate

+: <a class="el" href="classuddi2____binding_detail.html#o0">uddi2__bindingDetail</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o1">uddi2__save_USCOREbinding</a>, <a class="el" href="classuddi2____binding_templates.html#o0">uddi2__bindingTemplates</a><li>bindingTemplates

+: <a class="el" href="classuddi2____business_service.html#o2">uddi2__businessService</a><li>businessEntity

+: <a class="el" href="classuddi2____business_detail.html#o0">uddi2__businessDetail</a>, <a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o0">uddi2__validate_USCOREvalues</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o1">uddi2__save_USCOREbusiness</a>, <a class="el" href="classuddi2____business_entity_ext.html#o0">uddi2__businessEntityExt</a><li>businessEntityExt

+: <a class="el" href="classuddi2____business_detail_ext.html#o0">uddi2__businessDetailExt</a><li>businessInfo

+: <a class="el" href="classuddi2____business_infos.html#o0">uddi2__businessInfos</a><li>businessInfos

+: <a class="el" href="classuddi2____registered_info.html#o0">uddi2__registeredInfo</a>, <a class="el" href="classuddi2____business_list.html#o0">uddi2__businessList</a><li>businessKey

+: <a class="el" href="classuddi2____related_businesses_list.html#o0">uddi2__relatedBusinessesList</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#o0">uddi2__get_USCOREbusinessDetailExt</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#o0">uddi2__get_USCOREbusinessDetail</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o6">uddi2__find_USCOREservice</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o1">uddi2__find_USCORErelatedBusinesses</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o1">uddi2__delete_USCOREbusiness</a>, <a class="el" href="classuddi2____service_info.html#o2">uddi2__serviceInfo</a>, <a class="el" href="classuddi2____related_business_info.html#o0">uddi2__relatedBusinessInfo</a>, <a class="el" href="classuddi2____business_service.html#o5">uddi2__businessService</a>, <a class="el" href="classuddi2____business_info.html#o3">uddi2__businessInfo</a>, <a class="el" href="classuddi2____business_entity.html#o7">uddi2__businessEntity</a><li>businessService

+: <a class="el" href="classuddi2____service_detail.html#o0">uddi2__serviceDetail</a>, <a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o1">uddi2__validate_USCOREvalues</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o1">uddi2__save_USCOREservice</a>, <a class="el" href="classuddi2____business_services.html#o0">uddi2__businessServices</a><li>businessServices

+: <a class="el" href="classuddi2____business_entity.html#o4">uddi2__businessEntity</a></ul>

+<h3><a class="anchor" name="index_c">- c -</a></h3><ul>

+<li>categoryBag

+: <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o3">uddi2__find_USCOREtModel</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o2">uddi2__find_USCOREservice</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o3">uddi2__find_USCOREbusiness</a>, <a class="el" href="classuddi2____t_model.html#o4">uddi2__tModel</a>, <a class="el" href="classuddi2____business_service.html#o3">uddi2__businessService</a>, <a class="el" href="classuddi2____business_entity.html#o6">uddi2__businessEntity</a><li>completionStatus

+: <a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o1">uddi2__get_USCOREassertionStatusReport</a>, <a class="el" href="classuddi2____assertion_status_item.html#o4">uddi2__assertionStatusItem</a><li>contact

+: <a class="el" href="classuddi2____contacts.html#o0">uddi2__contacts</a><li>contacts

+: <a class="el" href="classuddi2____business_entity.html#o3">uddi2__businessEntity</a><li>cred

+: <a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o2">uddi2__get_USCOREauthToken</a></ul>

+<h3><a class="anchor" name="index_d">- d -</a></h3><ul>

+<li>description

+: <a class="el" href="classuddi2____t_model_instance_info.html#o0">uddi2__tModelInstanceInfo</a>, <a class="el" href="classuddi2____t_model.html#o1">uddi2__tModel</a>, <a class="el" href="classuddi2____related_business_info.html#o2">uddi2__relatedBusinessInfo</a>, <a class="el" href="classuddi2____overview_doc.html#o0">uddi2__overviewDoc</a>, <a class="el" href="classuddi2____instance_details.html#o0">uddi2__instanceDetails</a>, <a class="el" href="classuddi2____contact.html#o0">uddi2__contact</a>, <a class="el" href="classuddi2____business_service.html#o1">uddi2__businessService</a>, <a class="el" href="classuddi2____business_info.html#o1">uddi2__businessInfo</a>, <a class="el" href="classuddi2____business_entity.html#o2">uddi2__businessEntity</a>, <a class="el" href="classuddi2____binding_template.html#o0">uddi2__bindingTemplate</a><li>direction

+: <a class="el" href="classuddi2____shared_relationships.html#o1">uddi2__sharedRelationships</a><li>discoveryURL

+: <a class="el" href="classuddi2____discovery_u_r_ls.html#o0">uddi2__discoveryURLs</a><li>discoveryURLs

+: <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o5">uddi2__find_USCOREbusiness</a>, <a class="el" href="classuddi2____business_entity.html#o0">uddi2__businessEntity</a></ul>

+<h3><a class="anchor" name="index_e">- e -</a></h3><ul>

+<li>email

+: <a class="el" href="classuddi2____contact.html#o3">uddi2__contact</a><li>errCode

+: <a class="el" href="classuddi2____err_info.html#o1">uddi2__errInfo</a><li>errInfo

+: <a class="el" href="classuddi2____result.html#o0">uddi2__result</a><li>errno_

+: <a class="el" href="classuddi2____result.html#o2">uddi2__result</a></ul>

+<h3><a class="anchor" name="index_f">- f -</a></h3><ul>

+<li>findQualifier

+: <a class="el" href="classuddi2____find_qualifiers.html#o0">uddi2__findQualifiers</a><li>findQualifiers

+: <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o0">uddi2__find_USCOREtModel</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o0">uddi2__find_USCOREservice</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o0">uddi2__find_USCORErelatedBusinesses</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o0">uddi2__find_USCOREbusiness</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o0">uddi2__find_USCOREbinding</a><li>fromKey

+: <a class="el" href="classuddi2____publisher_assertion.html#o0">uddi2__publisherAssertion</a>, <a class="el" href="classuddi2____keys_owned.html#o0">uddi2__keysOwned</a>, <a class="el" href="classuddi2____assertion_status_item.html#o0">uddi2__assertionStatusItem</a></ul>

+<h3><a class="anchor" name="index_g">- g -</a></h3><ul>

+<li>generic

+: <a class="el" href="classuddi2____t_model_list.html#o1">uddi2__tModelList</a>, <a class="el" href="classuddi2____t_model_detail.html#o1">uddi2__tModelDetail</a>, <a class="el" href="classuddi2____service_list.html#o1">uddi2__serviceList</a>, <a class="el" href="classuddi2____service_detail.html#o1">uddi2__serviceDetail</a>, <a class="el" href="classuddi2____related_businesses_list.html#o2">uddi2__relatedBusinessesList</a>, <a class="el" href="classuddi2____registered_info.html#o2">uddi2__registeredInfo</a>, <a class="el" href="classuddi2____publisher_assertions.html#o1">uddi2__publisherAssertions</a>, <a class="el" href="classuddi2____business_list.html#o1">uddi2__businessList</a>, <a class="el" href="classuddi2____business_detail_ext.html#o1">uddi2__businessDetailExt</a>, <a class="el" href="classuddi2____business_detail.html#o1">uddi2__businessDetail</a>, <a class="el" href="classuddi2____binding_detail.html#o1">uddi2__bindingDetail</a>, <a class="el" href="classuddi2____auth_token.html#o1">uddi2__authToken</a>, <a class="el" href="classuddi2____assertion_status_report.html#o1">uddi2__assertionStatusReport</a>, <a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o3">uddi2__validate_USCOREvalues</a>, <a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o2">uddi2__set_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o3">uddi2__save_USCOREtModel</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o2">uddi2__save_USCOREservice</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o3">uddi2__save_USCOREbusiness</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o2">uddi2__save_USCOREbinding</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#o1">uddi2__get_USCOREtModelDetail</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#o1">uddi2__get_USCOREserviceDetail</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#o1">uddi2__get_USCOREregisteredInfo</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#o1">uddi2__get_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#o1">uddi2__get_USCOREbusinessDetailExt</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#o1">uddi2__get_USCOREbusinessDetail</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#o1">uddi2__get_USCOREbindingDetail</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o0">uddi2__get_USCOREauthToken</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o2">uddi2__get_USCOREassertionStatusReport</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o4">uddi2__find_USCOREtModel</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o4">uddi2__find_USCOREservice</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o3">uddi2__find_USCORErelatedBusinesses</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o6">uddi2__find_USCOREbusiness</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o2">uddi2__find_USCOREbinding</a>, <a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#o1">uddi2__discard_USCOREauthToken</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o2">uddi2__delete_USCOREtModel</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o2">uddi2__delete_USCOREservice</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o2">uddi2__delete_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o2">uddi2__delete_USCOREbusiness</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o2">uddi2__delete_USCOREbinding</a>, <a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o2">uddi2__add_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____disposition_report.html#o1">uddi2__dispositionReport</a></ul>

+<h3><a class="anchor" name="index_h">- h -</a></h3><ul>

+<li>hostingRedirector

+: <a class="el" href="classuddi2____binding_template.html#o3">uddi2__bindingTemplate</a></ul>

+<h3><a class="anchor" name="index_i">- i -</a></h3><ul>

+<li>identifierBag

+: <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o2">uddi2__find_USCOREtModel</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o2">uddi2__find_USCOREbusiness</a>, <a class="el" href="classuddi2____t_model.html#o3">uddi2__tModel</a>, <a class="el" href="classuddi2____business_entity.html#o5">uddi2__businessEntity</a><li>instanceDetails

+: <a class="el" href="classuddi2____t_model_instance_info.html#o1">uddi2__tModelInstanceInfo</a><li>instanceParms

+: <a class="el" href="classuddi2____instance_details.html#o2">uddi2__instanceDetails</a></ul>

+<h3><a class="anchor" name="index_k">- k -</a></h3><ul>

+<li>keyedReference

+: <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o2">uddi2__find_USCORErelatedBusinesses</a>, <a class="el" href="classuddi2____shared_relationships.html#o0">uddi2__sharedRelationships</a>, <a class="el" href="classuddi2____publisher_assertion.html#o2">uddi2__publisherAssertion</a>, <a class="el" href="classuddi2____identifier_bag.html#o0">uddi2__identifierBag</a>, <a class="el" href="classuddi2____category_bag.html#o0">uddi2__categoryBag</a>, <a class="el" href="classuddi2____assertion_status_item.html#o2">uddi2__assertionStatusItem</a><li>keyName

+: <a class="el" href="classuddi2____address_line.html#o1">uddi2__addressLine</a>, <a class="el" href="classuddi2____keyed_reference.html#o1">uddi2__keyedReference</a><li>keysOwned

+: <a class="el" href="classuddi2____assertion_status_item.html#o3">uddi2__assertionStatusItem</a><li>keyType

+: <a class="el" href="classuddi2____result.html#o1">uddi2__result</a><li>keyValue

+: <a class="el" href="classuddi2____address_line.html#o2">uddi2__addressLine</a>, <a class="el" href="classuddi2____keyed_reference.html#o2">uddi2__keyedReference</a></ul>

+<h3><a class="anchor" name="index_m">- m -</a></h3><ul>

+<li>maxRows

+: <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o5">uddi2__find_USCOREtModel</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o5">uddi2__find_USCOREservice</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o4">uddi2__find_USCORErelatedBusinesses</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o7">uddi2__find_USCOREbusiness</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o3">uddi2__find_USCOREbinding</a></ul>

+<h3><a class="anchor" name="index_n">- n -</a></h3><ul>

+<li>name

+: <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o1">uddi2__find_USCOREtModel</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o1">uddi2__find_USCOREservice</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o1">uddi2__find_USCOREbusiness</a>, <a class="el" href="classuddi2____t_model_info.html#o0">uddi2__tModelInfo</a>, <a class="el" href="classuddi2____t_model.html#o0">uddi2__tModel</a>, <a class="el" href="classuddi2____service_info.html#o0">uddi2__serviceInfo</a>, <a class="el" href="classuddi2____related_business_info.html#o1">uddi2__relatedBusinessInfo</a>, <a class="el" href="classuddi2____business_service.html#o0">uddi2__businessService</a>, <a class="el" href="classuddi2____business_info.html#o0">uddi2__businessInfo</a>, <a class="el" href="classuddi2____business_entity.html#o1">uddi2__businessEntity</a></ul>

+<h3><a class="anchor" name="index_o">- o -</a></h3><ul>

+<li>operator_

+: <a class="el" href="classuddi2____t_model_list.html#o2">uddi2__tModelList</a>, <a class="el" href="classuddi2____t_model_detail.html#o2">uddi2__tModelDetail</a>, <a class="el" href="classuddi2____service_list.html#o2">uddi2__serviceList</a>, <a class="el" href="classuddi2____service_detail.html#o2">uddi2__serviceDetail</a>, <a class="el" href="classuddi2____related_businesses_list.html#o3">uddi2__relatedBusinessesList</a>, <a class="el" href="classuddi2____registered_info.html#o3">uddi2__registeredInfo</a>, <a class="el" href="classuddi2____publisher_assertions.html#o2">uddi2__publisherAssertions</a>, <a class="el" href="classuddi2____business_list.html#o2">uddi2__businessList</a>, <a class="el" href="classuddi2____business_detail_ext.html#o2">uddi2__businessDetailExt</a>, <a class="el" href="classuddi2____business_detail.html#o2">uddi2__businessDetail</a>, <a class="el" href="classuddi2____binding_detail.html#o2">uddi2__bindingDetail</a>, <a class="el" href="classuddi2____auth_token.html#o2">uddi2__authToken</a>, <a class="el" href="classuddi2____assertion_status_report.html#o2">uddi2__assertionStatusReport</a>, <a class="el" href="classuddi2____t_model.html#o6">uddi2__tModel</a>, <a class="el" href="classuddi2____disposition_report.html#o2">uddi2__dispositionReport</a>, <a class="el" href="classuddi2____business_entity.html#o8">uddi2__businessEntity</a><li>overviewDoc

+: <a class="el" href="classuddi2____t_model.html#o2">uddi2__tModel</a>, <a class="el" href="classuddi2____instance_details.html#o1">uddi2__instanceDetails</a><li>overviewURL

+: <a class="el" href="classuddi2____overview_doc.html#o1">uddi2__overviewDoc</a></ul>

+<h3><a class="anchor" name="index_p">- p -</a></h3><ul>

+<li>personName

+: <a class="el" href="classuddi2____contact.html#o1">uddi2__contact</a><li>phone

+: <a class="el" href="classuddi2____contact.html#o2">uddi2__contact</a><li>publisherAssertion

+: <a class="el" href="classuddi2____publisher_assertions.html#o0">uddi2__publisherAssertions</a>, <a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o1">uddi2__set_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o1">uddi2__delete_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o1">uddi2__add_USCOREpublisherAssertions</a></ul>

+<h3><a class="anchor" name="index_r">- r -</a></h3><ul>

+<li>relatedBusinessInfo

+: <a class="el" href="classuddi2____related_business_infos.html#o0">uddi2__relatedBusinessInfos</a><li>relatedBusinessInfos

+: <a class="el" href="classuddi2____related_businesses_list.html#o1">uddi2__relatedBusinessesList</a><li>result

+: <a class="el" href="classuddi2____disposition_report.html#o0">uddi2__dispositionReport</a></ul>

+<h3><a class="anchor" name="index_s">- s -</a></h3><ul>

+<li>send()

+: <a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#a2">uddi2__set_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#a3">uddi2__save_USCOREtModel</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#a3">uddi2__save_USCOREservice</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#a3">uddi2__save_USCOREbusiness</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#a3">uddi2__save_USCOREbinding</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#a3">uddi2__get_USCOREtModelDetail</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#a3">uddi2__get_USCOREserviceDetail</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#a1">uddi2__get_USCOREregisteredInfo</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#a1">uddi2__get_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#a3">uddi2__get_USCOREbusinessDetailExt</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#a3">uddi2__get_USCOREbusinessDetail</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#a3">uddi2__get_USCOREbindingDetail</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#a2">uddi2__get_USCOREauthToken</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#a2">uddi2__get_USCOREassertionStatusReport</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#a3">uddi2__find_USCOREtModel</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#a4">uddi2__find_USCOREservice</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#a2">uddi2__find_USCORErelatedBusinesses</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#a4">uddi2__find_USCOREbusiness</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#a3">uddi2__find_USCOREbinding</a>, <a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#a2">uddi2__discard_USCOREauthToken</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#a3">uddi2__delete_USCOREtModel</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#a3">uddi2__delete_USCOREservice</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#a2">uddi2__delete_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#a3">uddi2__delete_USCOREbusiness</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#a3">uddi2__delete_USCOREbinding</a>, <a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#a2">uddi2__add_USCOREpublisherAssertions</a><li>serviceInfo

+: <a class="el" href="classuddi2____service_infos.html#o0">uddi2__serviceInfos</a><li>serviceInfos

+: <a class="el" href="classuddi2____service_list.html#o0">uddi2__serviceList</a>, <a class="el" href="classuddi2____business_info.html#o2">uddi2__businessInfo</a><li>serviceKey

+: <a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#o0">uddi2__get_USCOREserviceDetail</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o4">uddi2__find_USCOREbinding</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o1">uddi2__delete_USCOREservice</a>, <a class="el" href="classuddi2____service_info.html#o1">uddi2__serviceInfo</a>, <a class="el" href="classuddi2____business_service.html#o4">uddi2__businessService</a>, <a class="el" href="classuddi2____binding_template.html#o4">uddi2__bindingTemplate</a><li>sharedRelationships

+: <a class="el" href="classuddi2____related_business_info.html#o3">uddi2__relatedBusinessInfo</a><li>soap

+: <a class="el" href="class__disposition_report.html#o1">_dispositionReport</a>, <a class="el" href="classuddi2____phone.html#o2">uddi2__phone</a>, <a class="el" href="classuddi2____name.html#o2">uddi2__name</a>, <a class="el" href="classuddi2____err_info.html#o2">uddi2__errInfo</a>, <a class="el" href="classuddi2____email.html#o2">uddi2__email</a>, <a class="el" href="classuddi2____discovery_u_r_l.html#o2">uddi2__discoveryURL</a>, <a class="el" href="classuddi2____description.html#o2">uddi2__description</a>, <a class="el" href="classuddi2____address_line.html#o3">uddi2__addressLine</a>, <a class="el" href="classuddi2____access_point.html#o2">uddi2__accessPoint</a>, <a class="el" href="classuddi2____t_model_list.html#o4">uddi2__tModelList</a>, <a class="el" href="classuddi2____t_model_detail.html#o4">uddi2__tModelDetail</a>, <a class="el" href="classuddi2____service_list.html#o4">uddi2__serviceList</a>, <a class="el" href="classuddi2____service_detail.html#o4">uddi2__serviceDetail</a>, <a class="el" href="classuddi2____related_businesses_list.html#o5">uddi2__relatedBusinessesList</a>, <a class="el" href="classuddi2____registered_info.html#o5">uddi2__registeredInfo</a>, <a class="el" href="classuddi2____publisher_assertions.html#o4">uddi2__publisherAssertions</a>, <a class="el" href="classuddi2____business_list.html#o4">uddi2__businessList</a>, <a class="el" href="classuddi2____business_detail_ext.html#o4">uddi2__businessDetailExt</a>, <a class="el" href="classuddi2____business_detail.html#o4">uddi2__businessDetail</a>, <a class="el" href="classuddi2____binding_detail.html#o4">uddi2__bindingDetail</a>, <a class="el" href="classuddi2____auth_token.html#o3">uddi2__authToken</a>, <a class="el" href="classuddi2____assertion_status_report.html#o3">uddi2__assertionStatusReport</a>, <a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o4">uddi2__validate_USCOREvalues</a>, <a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o3">uddi2__set_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o4">uddi2__save_USCOREtModel</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o3">uddi2__save_USCOREservice</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o4">uddi2__save_USCOREbusiness</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o3">uddi2__save_USCOREbinding</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#o2">uddi2__get_USCOREtModelDetail</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#o2">uddi2__get_USCOREserviceDetail</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#o2">uddi2__get_USCOREregisteredInfo</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#o2">uddi2__get_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#o2">uddi2__get_USCOREbusinessDetailExt</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#o2">uddi2__get_USCOREbusinessDetail</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#o2">uddi2__get_USCOREbindingDetail</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o3">uddi2__get_USCOREauthToken</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o3">uddi2__get_USCOREassertionStatusReport</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o6">uddi2__find_USCOREtModel</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o7">uddi2__find_USCOREservice</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o5">uddi2__find_USCORErelatedBusinesses</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o8">uddi2__find_USCOREbusiness</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o5">uddi2__find_USCOREbinding</a>, <a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#o2">uddi2__discard_USCOREauthToken</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o3">uddi2__delete_USCOREtModel</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o3">uddi2__delete_USCOREservice</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o3">uddi2__delete_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o3">uddi2__delete_USCOREbusiness</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o3">uddi2__delete_USCOREbinding</a>, <a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o3">uddi2__add_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____t_model_instance_info.html#o3">uddi2__tModelInstanceInfo</a>, <a class="el" href="classuddi2____t_model_instance_details.html#o1">uddi2__tModelInstanceDetails</a>, <a class="el" href="classuddi2____t_model_infos.html#o1">uddi2__tModelInfos</a>, <a class="el" href="classuddi2____t_model_info.html#o2">uddi2__tModelInfo</a>, <a class="el" href="classuddi2____t_model_bag.html#o1">uddi2__tModelBag</a>, <a class="el" href="classuddi2____t_model.html#o8">uddi2__tModel</a>, <a class="el" href="classuddi2____shared_relationships.html#o2">uddi2__sharedRelationships</a>, <a class="el" href="classuddi2____service_infos.html#o1">uddi2__serviceInfos</a>, <a class="el" href="classuddi2____service_info.html#o3">uddi2__serviceInfo</a>, <a class="el" href="classuddi2____result.html#o3">uddi2__result</a>, <a class="el" href="classuddi2____related_business_infos.html#o1">uddi2__relatedBusinessInfos</a>, <a class="el" href="classuddi2____related_business_info.html#o4">uddi2__relatedBusinessInfo</a>, <a class="el" href="classuddi2____publisher_assertion.html#o3">uddi2__publisherAssertion</a>, <a class="el" href="classuddi2____overview_doc.html#o2">uddi2__overviewDoc</a>, <a class="el" href="classuddi2____keys_owned.html#o2">uddi2__keysOwned</a>, <a class="el" href="classuddi2____keyed_reference.html#o3">uddi2__keyedReference</a>, <a class="el" href="classuddi2____instance_details.html#o3">uddi2__instanceDetails</a>, <a class="el" href="classuddi2____identifier_bag.html#o1">uddi2__identifierBag</a>, <a class="el" href="classuddi2____hosting_redirector.html#o1">uddi2__hostingRedirector</a>, <a class="el" href="classuddi2____find_qualifiers.html#o1">uddi2__findQualifiers</a>, <a class="el" href="classuddi2____disposition_report.html#o4">uddi2__dispositionReport</a>, <a class="el" href="classuddi2____discovery_u_r_ls.html#o1">uddi2__discoveryURLs</a>, <a class="el" href="classuddi2____contacts.html#o1">uddi2__contacts</a>, <a class="el" href="classuddi2____contact.html#o6">uddi2__contact</a>, <a class="el" href="classuddi2____category_bag.html#o1">uddi2__categoryBag</a>, <a class="el" href="classuddi2____business_services.html#o1">uddi2__businessServices</a>, <a class="el" href="classuddi2____business_service.html#o6">uddi2__businessService</a>, <a class="el" href="classuddi2____business_infos.html#o1">uddi2__businessInfos</a>, <a class="el" href="classuddi2____business_info.html#o4">uddi2__businessInfo</a>, <a class="el" href="classuddi2____business_entity_ext.html#o2">uddi2__businessEntityExt</a>, <a class="el" href="classuddi2____business_entity.html#o10">uddi2__businessEntity</a>, <a class="el" href="classuddi2____binding_templates.html#o1">uddi2__bindingTemplates</a>, <a class="el" href="classuddi2____binding_template.html#o6">uddi2__bindingTemplate</a>, <a class="el" href="classuddi2____assertion_status_item.html#o5">uddi2__assertionStatusItem</a>, <a class="el" href="classuddi2____address.html#o4">uddi2__address</a><li>sortCode

+: <a class="el" href="classuddi2____address.html#o2">uddi2__address</a></ul>

+<h3><a class="anchor" name="index_t">- t -</a></h3><ul>

+<li>tModel

+: <a class="el" href="classuddi2____t_model_detail.html#o0">uddi2__tModelDetail</a>, <a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o2">uddi2__validate_USCOREvalues</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o1">uddi2__save_USCOREtModel</a><li>tModelBag

+: <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o3">uddi2__find_USCOREservice</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o4">uddi2__find_USCOREbusiness</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o1">uddi2__find_USCOREbinding</a><li>tModelInfo

+: <a class="el" href="classuddi2____t_model_infos.html#o0">uddi2__tModelInfos</a><li>tModelInfos

+: <a class="el" href="classuddi2____t_model_list.html#o0">uddi2__tModelList</a>, <a class="el" href="classuddi2____registered_info.html#o1">uddi2__registeredInfo</a><li>tModelInstanceDetails

+: <a class="el" href="classuddi2____binding_template.html#o1">uddi2__bindingTemplate</a><li>tModelInstanceInfo

+: <a class="el" href="classuddi2____t_model_instance_details.html#o0">uddi2__tModelInstanceDetails</a><li>tModelKey

+: <a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#o0">uddi2__get_USCOREtModelDetail</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o1">uddi2__delete_USCOREtModel</a>, <a class="el" href="classuddi2____t_model_instance_info.html#o2">uddi2__tModelInstanceInfo</a>, <a class="el" href="classuddi2____t_model_info.html#o1">uddi2__tModelInfo</a>, <a class="el" href="classuddi2____t_model_bag.html#o0">uddi2__tModelBag</a>, <a class="el" href="classuddi2____t_model.html#o5">uddi2__tModel</a>, <a class="el" href="classuddi2____keyed_reference.html#o0">uddi2__keyedReference</a>, <a class="el" href="classuddi2____address.html#o3">uddi2__address</a><li>toKey

+: <a class="el" href="classuddi2____publisher_assertion.html#o1">uddi2__publisherAssertion</a>, <a class="el" href="classuddi2____keys_owned.html#o1">uddi2__keysOwned</a>, <a class="el" href="classuddi2____assertion_status_item.html#o1">uddi2__assertionStatusItem</a><li>truncated

+: <a class="el" href="classuddi2____t_model_list.html#o3">uddi2__tModelList</a>, <a class="el" href="classuddi2____t_model_detail.html#o3">uddi2__tModelDetail</a>, <a class="el" href="classuddi2____service_list.html#o3">uddi2__serviceList</a>, <a class="el" href="classuddi2____service_detail.html#o3">uddi2__serviceDetail</a>, <a class="el" href="classuddi2____related_businesses_list.html#o4">uddi2__relatedBusinessesList</a>, <a class="el" href="classuddi2____registered_info.html#o4">uddi2__registeredInfo</a>, <a class="el" href="classuddi2____business_list.html#o3">uddi2__businessList</a>, <a class="el" href="classuddi2____business_detail_ext.html#o3">uddi2__businessDetailExt</a>, <a class="el" href="classuddi2____business_detail.html#o3">uddi2__businessDetail</a>, <a class="el" href="classuddi2____binding_detail.html#o3">uddi2__bindingDetail</a>, <a class="el" href="classuddi2____disposition_report.html#o3">uddi2__dispositionReport</a></ul>

+<h3><a class="anchor" name="index_u">- u -</a></h3><ul>

+<li>uddi2__add_USCOREpublisherAssertions()

+: <a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#a1">uddi2__add_USCOREpublisherAssertions</a><li>uddi2__delete_USCOREbinding()

+: <a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#a2">uddi2__delete_USCOREbinding</a><li>uddi2__delete_USCOREbusiness()

+: <a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#a2">uddi2__delete_USCOREbusiness</a><li>uddi2__delete_USCOREpublisherAssertions()

+: <a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#a1">uddi2__delete_USCOREpublisherAssertions</a><li>uddi2__delete_USCOREservice()

+: <a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#a2">uddi2__delete_USCOREservice</a><li>uddi2__delete_USCOREtModel()

+: <a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#a2">uddi2__delete_USCOREtModel</a><li>uddi2__discard_USCOREauthToken()

+: <a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#a1">uddi2__discard_USCOREauthToken</a><li>uddi2__dispositionReport_

+: <a class="el" href="class__disposition_report.html#o0">_dispositionReport</a><li>uddi2__find_USCOREbinding()

+: <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#a2">uddi2__find_USCOREbinding</a><li>uddi2__find_USCOREbusiness()

+: <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#a3">uddi2__find_USCOREbusiness</a><li>uddi2__find_USCORErelatedBusinesses()

+: <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#a1">uddi2__find_USCORErelatedBusinesses</a><li>uddi2__find_USCOREservice()

+: <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#a3">uddi2__find_USCOREservice</a><li>uddi2__find_USCOREtModel()

+: <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#a2">uddi2__find_USCOREtModel</a><li>uddi2__get_USCOREassertionStatusReport()

+: <a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#a1">uddi2__get_USCOREassertionStatusReport</a><li>uddi2__get_USCOREauthToken()

+: <a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#a1">uddi2__get_USCOREauthToken</a><li>uddi2__get_USCOREbindingDetail()

+: <a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#a2">uddi2__get_USCOREbindingDetail</a><li>uddi2__get_USCOREbusinessDetail()

+: <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#a2">uddi2__get_USCOREbusinessDetail</a><li>uddi2__get_USCOREbusinessDetailExt()

+: <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#a2">uddi2__get_USCOREbusinessDetailExt</a><li>uddi2__get_USCOREpublisherAssertions()

+: <a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#a0">uddi2__get_USCOREpublisherAssertions</a><li>uddi2__get_USCOREregisteredInfo()

+: <a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#a0">uddi2__get_USCOREregisteredInfo</a><li>uddi2__get_USCOREserviceDetail()

+: <a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#a2">uddi2__get_USCOREserviceDetail</a><li>uddi2__get_USCOREtModelDetail()

+: <a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#a2">uddi2__get_USCOREtModelDetail</a><li>uddi2__save_USCOREbinding()

+: <a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#a2">uddi2__save_USCOREbinding</a><li>uddi2__save_USCOREbusiness()

+: <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#a2">uddi2__save_USCOREbusiness</a><li>uddi2__save_USCOREservice()

+: <a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#a2">uddi2__save_USCOREservice</a><li>uddi2__save_USCOREtModel()

+: <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#a2">uddi2__save_USCOREtModel</a><li>uddi2__set_USCOREpublisherAssertions()

+: <a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#a1">uddi2__set_USCOREpublisherAssertions</a><li>uploadRegister

+: <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o2">uddi2__save_USCOREtModel</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o2">uddi2__save_USCOREbusiness</a><li>URLType

+: <a class="el" href="classuddi2____access_point.html#o1">uddi2__accessPoint</a><li>userID

+: <a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o1">uddi2__get_USCOREauthToken</a><li>useType

+: <a class="el" href="classuddi2____phone.html#o1">uddi2__phone</a>, <a class="el" href="classuddi2____email.html#o1">uddi2__email</a>, <a class="el" href="classuddi2____discovery_u_r_l.html#o1">uddi2__discoveryURL</a>, <a class="el" href="classuddi2____contact.html#o5">uddi2__contact</a>, <a class="el" href="classuddi2____address.html#o1">uddi2__address</a></ul>

+<h3><a class="anchor" name="index_x">- x -</a></h3><ul>

+<li>xml__lang_

+: <a class="el" href="classuddi2____name.html#o1">uddi2__name</a>, <a class="el" href="classuddi2____description.html#o1">uddi2__description</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/functions_func.html b/doc/uddi2/html/functions_func.html
new file mode 100644
index 0000000..fa76229
--- /dev/null
+++ b/doc/uddi2/html/functions_func.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Class Members - Functions</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindexHL" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<div class="qindex"><a class="qindex" href="functions.html">All</a> | <a class="qindexHL" href="functions_func.html">Functions</a> | <a class="qindex" href="functions_vars.html">Variables</a></div>

+

+<p>

+<ul>

+<li>send()

+: <a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#a2">uddi2__set_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#a3">uddi2__save_USCOREtModel</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#a3">uddi2__save_USCOREservice</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#a3">uddi2__save_USCOREbusiness</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#a3">uddi2__save_USCOREbinding</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#a3">uddi2__get_USCOREtModelDetail</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#a3">uddi2__get_USCOREserviceDetail</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#a1">uddi2__get_USCOREregisteredInfo</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#a1">uddi2__get_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#a3">uddi2__get_USCOREbusinessDetailExt</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#a3">uddi2__get_USCOREbusinessDetail</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#a3">uddi2__get_USCOREbindingDetail</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#a2">uddi2__get_USCOREauthToken</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#a2">uddi2__get_USCOREassertionStatusReport</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#a3">uddi2__find_USCOREtModel</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#a4">uddi2__find_USCOREservice</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#a2">uddi2__find_USCORErelatedBusinesses</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#a4">uddi2__find_USCOREbusiness</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#a3">uddi2__find_USCOREbinding</a>, <a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#a2">uddi2__discard_USCOREauthToken</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#a3">uddi2__delete_USCOREtModel</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#a3">uddi2__delete_USCOREservice</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#a2">uddi2__delete_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#a3">uddi2__delete_USCOREbusiness</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#a3">uddi2__delete_USCOREbinding</a>, <a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#a2">uddi2__add_USCOREpublisherAssertions</a><li>uddi2__add_USCOREpublisherAssertions()

+: <a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#a1">uddi2__add_USCOREpublisherAssertions</a><li>uddi2__delete_USCOREbinding()

+: <a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#a2">uddi2__delete_USCOREbinding</a><li>uddi2__delete_USCOREbusiness()

+: <a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#a2">uddi2__delete_USCOREbusiness</a><li>uddi2__delete_USCOREpublisherAssertions()

+: <a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#a1">uddi2__delete_USCOREpublisherAssertions</a><li>uddi2__delete_USCOREservice()

+: <a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#a2">uddi2__delete_USCOREservice</a><li>uddi2__delete_USCOREtModel()

+: <a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#a2">uddi2__delete_USCOREtModel</a><li>uddi2__discard_USCOREauthToken()

+: <a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#a1">uddi2__discard_USCOREauthToken</a><li>uddi2__find_USCOREbinding()

+: <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#a2">uddi2__find_USCOREbinding</a><li>uddi2__find_USCOREbusiness()

+: <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#a3">uddi2__find_USCOREbusiness</a><li>uddi2__find_USCORErelatedBusinesses()

+: <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#a1">uddi2__find_USCORErelatedBusinesses</a><li>uddi2__find_USCOREservice()

+: <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#a3">uddi2__find_USCOREservice</a><li>uddi2__find_USCOREtModel()

+: <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#a2">uddi2__find_USCOREtModel</a><li>uddi2__get_USCOREassertionStatusReport()

+: <a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#a1">uddi2__get_USCOREassertionStatusReport</a><li>uddi2__get_USCOREauthToken()

+: <a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#a1">uddi2__get_USCOREauthToken</a><li>uddi2__get_USCOREbindingDetail()

+: <a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#a2">uddi2__get_USCOREbindingDetail</a><li>uddi2__get_USCOREbusinessDetail()

+: <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#a2">uddi2__get_USCOREbusinessDetail</a><li>uddi2__get_USCOREbusinessDetailExt()

+: <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#a2">uddi2__get_USCOREbusinessDetailExt</a><li>uddi2__get_USCOREpublisherAssertions()

+: <a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#a0">uddi2__get_USCOREpublisherAssertions</a><li>uddi2__get_USCOREregisteredInfo()

+: <a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#a0">uddi2__get_USCOREregisteredInfo</a><li>uddi2__get_USCOREserviceDetail()

+: <a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#a2">uddi2__get_USCOREserviceDetail</a><li>uddi2__get_USCOREtModelDetail()

+: <a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#a2">uddi2__get_USCOREtModelDetail</a><li>uddi2__save_USCOREbinding()

+: <a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#a2">uddi2__save_USCOREbinding</a><li>uddi2__save_USCOREbusiness()

+: <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#a2">uddi2__save_USCOREbusiness</a><li>uddi2__save_USCOREservice()

+: <a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#a2">uddi2__save_USCOREservice</a><li>uddi2__save_USCOREtModel()

+: <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#a2">uddi2__save_USCOREtModel</a><li>uddi2__set_USCOREpublisherAssertions()

+: <a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#a1">uddi2__set_USCOREpublisherAssertions</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/functions_vars.html b/doc/uddi2/html/functions_vars.html
new file mode 100644
index 0000000..d4b6a41
--- /dev/null
+++ b/doc/uddi2/html/functions_vars.html
@@ -0,0 +1,134 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Class Members - Variables</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindexHL" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<div class="qindex"><a class="qindex" href="functions.html">All</a> | <a class="qindex" href="functions_func.html">Functions</a> | <a class="qindexHL" href="functions_vars.html">Variables</a></div>

+<div class="qindex"><a class="qindex" href="#index__">_</a> | <a class="qindex" href="#index_a">a</a> | <a class="qindex" href="#index_b">b</a> | <a class="qindex" href="#index_c">c</a> | <a class="qindex" href="#index_d">d</a> | <a class="qindex" href="#index_e">e</a> | <a class="qindex" href="#index_f">f</a> | <a class="qindex" href="#index_g">g</a> | <a class="qindex" href="#index_h">h</a> | <a class="qindex" href="#index_i">i</a> | <a class="qindex" href="#index_k">k</a> | <a class="qindex" href="#index_m">m</a> | <a class="qindex" href="#index_n">n</a> | <a class="qindex" href="#index_o">o</a> | <a class="qindex" href="#index_p">p</a> | <a class="qindex" href="#index_r">r</a> | <a class="qindex" href="#index_s">s</a> | <a class="qindex" href="#index_t">t</a> | <a class="qindex" href="#index_u">u</a> | <a class="qindex" href="#index_x">x</a></div>

+

+<p>

+

+<p>

+<h3><a class="anchor" name="index__">- _ -</a></h3><ul>

+<li>__any

+: <a class="el" href="classuddi2____business_entity_ext.html#o1">uddi2__businessEntityExt</a><li>__item

+: <a class="el" href="classuddi2____phone.html#o0">uddi2__phone</a>, <a class="el" href="classuddi2____name.html#o0">uddi2__name</a>, <a class="el" href="classuddi2____err_info.html#o0">uddi2__errInfo</a>, <a class="el" href="classuddi2____email.html#o0">uddi2__email</a>, <a class="el" href="classuddi2____discovery_u_r_l.html#o0">uddi2__discoveryURL</a>, <a class="el" href="classuddi2____description.html#o0">uddi2__description</a>, <a class="el" href="classuddi2____address_line.html#o0">uddi2__addressLine</a>, <a class="el" href="classuddi2____access_point.html#o0">uddi2__accessPoint</a></ul>

+<h3><a class="anchor" name="index_a">- a -</a></h3><ul>

+<li>accessPoint

+: <a class="el" href="classuddi2____binding_template.html#o2">uddi2__bindingTemplate</a><li>address

+: <a class="el" href="classuddi2____contact.html#o4">uddi2__contact</a><li>addressLine

+: <a class="el" href="classuddi2____address.html#o0">uddi2__address</a><li>assertionStatusItem

+: <a class="el" href="classuddi2____assertion_status_report.html#o0">uddi2__assertionStatusReport</a><li>authInfo

+: <a class="el" href="classuddi2____auth_token.html#o0">uddi2__authToken</a>, <a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o0">uddi2__set_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o0">uddi2__save_USCOREtModel</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o0">uddi2__save_USCOREservice</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o0">uddi2__save_USCOREbusiness</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o0">uddi2__save_USCOREbinding</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#o0">uddi2__get_USCOREregisteredInfo</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#o0">uddi2__get_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o0">uddi2__get_USCOREassertionStatusReport</a>, <a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#o0">uddi2__discard_USCOREauthToken</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o0">uddi2__delete_USCOREtModel</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o0">uddi2__delete_USCOREservice</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o0">uddi2__delete_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o0">uddi2__delete_USCOREbusiness</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o0">uddi2__delete_USCOREbinding</a>, <a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o0">uddi2__add_USCOREpublisherAssertions</a><li>authorizedName

+: <a class="el" href="classuddi2____publisher_assertions.html#o3">uddi2__publisherAssertions</a>, <a class="el" href="classuddi2____t_model.html#o7">uddi2__tModel</a>, <a class="el" href="classuddi2____business_entity.html#o9">uddi2__businessEntity</a></ul>

+<h3><a class="anchor" name="index_b">- b -</a></h3><ul>

+<li>bindingKey

+: <a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#o0">uddi2__get_USCOREbindingDetail</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o1">uddi2__delete_USCOREbinding</a>, <a class="el" href="classuddi2____hosting_redirector.html#o0">uddi2__hostingRedirector</a>, <a class="el" href="classuddi2____binding_template.html#o5">uddi2__bindingTemplate</a><li>bindingTemplate

+: <a class="el" href="classuddi2____binding_detail.html#o0">uddi2__bindingDetail</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o1">uddi2__save_USCOREbinding</a>, <a class="el" href="classuddi2____binding_templates.html#o0">uddi2__bindingTemplates</a><li>bindingTemplates

+: <a class="el" href="classuddi2____business_service.html#o2">uddi2__businessService</a><li>businessEntity

+: <a class="el" href="classuddi2____business_detail.html#o0">uddi2__businessDetail</a>, <a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o0">uddi2__validate_USCOREvalues</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o1">uddi2__save_USCOREbusiness</a>, <a class="el" href="classuddi2____business_entity_ext.html#o0">uddi2__businessEntityExt</a><li>businessEntityExt

+: <a class="el" href="classuddi2____business_detail_ext.html#o0">uddi2__businessDetailExt</a><li>businessInfo

+: <a class="el" href="classuddi2____business_infos.html#o0">uddi2__businessInfos</a><li>businessInfos

+: <a class="el" href="classuddi2____registered_info.html#o0">uddi2__registeredInfo</a>, <a class="el" href="classuddi2____business_list.html#o0">uddi2__businessList</a><li>businessKey

+: <a class="el" href="classuddi2____related_businesses_list.html#o0">uddi2__relatedBusinessesList</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#o0">uddi2__get_USCOREbusinessDetailExt</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#o0">uddi2__get_USCOREbusinessDetail</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o6">uddi2__find_USCOREservice</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o1">uddi2__find_USCORErelatedBusinesses</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o1">uddi2__delete_USCOREbusiness</a>, <a class="el" href="classuddi2____service_info.html#o2">uddi2__serviceInfo</a>, <a class="el" href="classuddi2____related_business_info.html#o0">uddi2__relatedBusinessInfo</a>, <a class="el" href="classuddi2____business_service.html#o5">uddi2__businessService</a>, <a class="el" href="classuddi2____business_info.html#o3">uddi2__businessInfo</a>, <a class="el" href="classuddi2____business_entity.html#o7">uddi2__businessEntity</a><li>businessService

+: <a class="el" href="classuddi2____service_detail.html#o0">uddi2__serviceDetail</a>, <a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o1">uddi2__validate_USCOREvalues</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o1">uddi2__save_USCOREservice</a>, <a class="el" href="classuddi2____business_services.html#o0">uddi2__businessServices</a><li>businessServices

+: <a class="el" href="classuddi2____business_entity.html#o4">uddi2__businessEntity</a></ul>

+<h3><a class="anchor" name="index_c">- c -</a></h3><ul>

+<li>categoryBag

+: <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o3">uddi2__find_USCOREtModel</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o2">uddi2__find_USCOREservice</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o3">uddi2__find_USCOREbusiness</a>, <a class="el" href="classuddi2____t_model.html#o4">uddi2__tModel</a>, <a class="el" href="classuddi2____business_service.html#o3">uddi2__businessService</a>, <a class="el" href="classuddi2____business_entity.html#o6">uddi2__businessEntity</a><li>completionStatus

+: <a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o1">uddi2__get_USCOREassertionStatusReport</a>, <a class="el" href="classuddi2____assertion_status_item.html#o4">uddi2__assertionStatusItem</a><li>contact

+: <a class="el" href="classuddi2____contacts.html#o0">uddi2__contacts</a><li>contacts

+: <a class="el" href="classuddi2____business_entity.html#o3">uddi2__businessEntity</a><li>cred

+: <a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o2">uddi2__get_USCOREauthToken</a></ul>

+<h3><a class="anchor" name="index_d">- d -</a></h3><ul>

+<li>description

+: <a class="el" href="classuddi2____t_model_instance_info.html#o0">uddi2__tModelInstanceInfo</a>, <a class="el" href="classuddi2____t_model.html#o1">uddi2__tModel</a>, <a class="el" href="classuddi2____related_business_info.html#o2">uddi2__relatedBusinessInfo</a>, <a class="el" href="classuddi2____overview_doc.html#o0">uddi2__overviewDoc</a>, <a class="el" href="classuddi2____instance_details.html#o0">uddi2__instanceDetails</a>, <a class="el" href="classuddi2____contact.html#o0">uddi2__contact</a>, <a class="el" href="classuddi2____business_service.html#o1">uddi2__businessService</a>, <a class="el" href="classuddi2____business_info.html#o1">uddi2__businessInfo</a>, <a class="el" href="classuddi2____business_entity.html#o2">uddi2__businessEntity</a>, <a class="el" href="classuddi2____binding_template.html#o0">uddi2__bindingTemplate</a><li>direction

+: <a class="el" href="classuddi2____shared_relationships.html#o1">uddi2__sharedRelationships</a><li>discoveryURL

+: <a class="el" href="classuddi2____discovery_u_r_ls.html#o0">uddi2__discoveryURLs</a><li>discoveryURLs

+: <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o5">uddi2__find_USCOREbusiness</a>, <a class="el" href="classuddi2____business_entity.html#o0">uddi2__businessEntity</a></ul>

+<h3><a class="anchor" name="index_e">- e -</a></h3><ul>

+<li>email

+: <a class="el" href="classuddi2____contact.html#o3">uddi2__contact</a><li>errCode

+: <a class="el" href="classuddi2____err_info.html#o1">uddi2__errInfo</a><li>errInfo

+: <a class="el" href="classuddi2____result.html#o0">uddi2__result</a><li>errno_

+: <a class="el" href="classuddi2____result.html#o2">uddi2__result</a></ul>

+<h3><a class="anchor" name="index_f">- f -</a></h3><ul>

+<li>findQualifier

+: <a class="el" href="classuddi2____find_qualifiers.html#o0">uddi2__findQualifiers</a><li>findQualifiers

+: <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o0">uddi2__find_USCOREtModel</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o0">uddi2__find_USCOREservice</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o0">uddi2__find_USCORErelatedBusinesses</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o0">uddi2__find_USCOREbusiness</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o0">uddi2__find_USCOREbinding</a><li>fromKey

+: <a class="el" href="classuddi2____publisher_assertion.html#o0">uddi2__publisherAssertion</a>, <a class="el" href="classuddi2____keys_owned.html#o0">uddi2__keysOwned</a>, <a class="el" href="classuddi2____assertion_status_item.html#o0">uddi2__assertionStatusItem</a></ul>

+<h3><a class="anchor" name="index_g">- g -</a></h3><ul>

+<li>generic

+: <a class="el" href="classuddi2____t_model_list.html#o1">uddi2__tModelList</a>, <a class="el" href="classuddi2____t_model_detail.html#o1">uddi2__tModelDetail</a>, <a class="el" href="classuddi2____service_list.html#o1">uddi2__serviceList</a>, <a class="el" href="classuddi2____service_detail.html#o1">uddi2__serviceDetail</a>, <a class="el" href="classuddi2____related_businesses_list.html#o2">uddi2__relatedBusinessesList</a>, <a class="el" href="classuddi2____registered_info.html#o2">uddi2__registeredInfo</a>, <a class="el" href="classuddi2____publisher_assertions.html#o1">uddi2__publisherAssertions</a>, <a class="el" href="classuddi2____business_list.html#o1">uddi2__businessList</a>, <a class="el" href="classuddi2____business_detail_ext.html#o1">uddi2__businessDetailExt</a>, <a class="el" href="classuddi2____business_detail.html#o1">uddi2__businessDetail</a>, <a class="el" href="classuddi2____binding_detail.html#o1">uddi2__bindingDetail</a>, <a class="el" href="classuddi2____auth_token.html#o1">uddi2__authToken</a>, <a class="el" href="classuddi2____assertion_status_report.html#o1">uddi2__assertionStatusReport</a>, <a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o3">uddi2__validate_USCOREvalues</a>, <a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o2">uddi2__set_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o3">uddi2__save_USCOREtModel</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o2">uddi2__save_USCOREservice</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o3">uddi2__save_USCOREbusiness</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o2">uddi2__save_USCOREbinding</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#o1">uddi2__get_USCOREtModelDetail</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#o1">uddi2__get_USCOREserviceDetail</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#o1">uddi2__get_USCOREregisteredInfo</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#o1">uddi2__get_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#o1">uddi2__get_USCOREbusinessDetailExt</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#o1">uddi2__get_USCOREbusinessDetail</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#o1">uddi2__get_USCOREbindingDetail</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o0">uddi2__get_USCOREauthToken</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o2">uddi2__get_USCOREassertionStatusReport</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o4">uddi2__find_USCOREtModel</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o4">uddi2__find_USCOREservice</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o3">uddi2__find_USCORErelatedBusinesses</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o6">uddi2__find_USCOREbusiness</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o2">uddi2__find_USCOREbinding</a>, <a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#o1">uddi2__discard_USCOREauthToken</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o2">uddi2__delete_USCOREtModel</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o2">uddi2__delete_USCOREservice</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o2">uddi2__delete_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o2">uddi2__delete_USCOREbusiness</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o2">uddi2__delete_USCOREbinding</a>, <a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o2">uddi2__add_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____disposition_report.html#o1">uddi2__dispositionReport</a></ul>

+<h3><a class="anchor" name="index_h">- h -</a></h3><ul>

+<li>hostingRedirector

+: <a class="el" href="classuddi2____binding_template.html#o3">uddi2__bindingTemplate</a></ul>

+<h3><a class="anchor" name="index_i">- i -</a></h3><ul>

+<li>identifierBag

+: <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o2">uddi2__find_USCOREtModel</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o2">uddi2__find_USCOREbusiness</a>, <a class="el" href="classuddi2____t_model.html#o3">uddi2__tModel</a>, <a class="el" href="classuddi2____business_entity.html#o5">uddi2__businessEntity</a><li>instanceDetails

+: <a class="el" href="classuddi2____t_model_instance_info.html#o1">uddi2__tModelInstanceInfo</a><li>instanceParms

+: <a class="el" href="classuddi2____instance_details.html#o2">uddi2__instanceDetails</a></ul>

+<h3><a class="anchor" name="index_k">- k -</a></h3><ul>

+<li>keyedReference

+: <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o2">uddi2__find_USCORErelatedBusinesses</a>, <a class="el" href="classuddi2____shared_relationships.html#o0">uddi2__sharedRelationships</a>, <a class="el" href="classuddi2____publisher_assertion.html#o2">uddi2__publisherAssertion</a>, <a class="el" href="classuddi2____identifier_bag.html#o0">uddi2__identifierBag</a>, <a class="el" href="classuddi2____category_bag.html#o0">uddi2__categoryBag</a>, <a class="el" href="classuddi2____assertion_status_item.html#o2">uddi2__assertionStatusItem</a><li>keyName

+: <a class="el" href="classuddi2____address_line.html#o1">uddi2__addressLine</a>, <a class="el" href="classuddi2____keyed_reference.html#o1">uddi2__keyedReference</a><li>keysOwned

+: <a class="el" href="classuddi2____assertion_status_item.html#o3">uddi2__assertionStatusItem</a><li>keyType

+: <a class="el" href="classuddi2____result.html#o1">uddi2__result</a><li>keyValue

+: <a class="el" href="classuddi2____address_line.html#o2">uddi2__addressLine</a>, <a class="el" href="classuddi2____keyed_reference.html#o2">uddi2__keyedReference</a></ul>

+<h3><a class="anchor" name="index_m">- m -</a></h3><ul>

+<li>maxRows

+: <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o5">uddi2__find_USCOREtModel</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o5">uddi2__find_USCOREservice</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o4">uddi2__find_USCORErelatedBusinesses</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o7">uddi2__find_USCOREbusiness</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o3">uddi2__find_USCOREbinding</a></ul>

+<h3><a class="anchor" name="index_n">- n -</a></h3><ul>

+<li>name

+: <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o1">uddi2__find_USCOREtModel</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o1">uddi2__find_USCOREservice</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o1">uddi2__find_USCOREbusiness</a>, <a class="el" href="classuddi2____t_model_info.html#o0">uddi2__tModelInfo</a>, <a class="el" href="classuddi2____t_model.html#o0">uddi2__tModel</a>, <a class="el" href="classuddi2____service_info.html#o0">uddi2__serviceInfo</a>, <a class="el" href="classuddi2____related_business_info.html#o1">uddi2__relatedBusinessInfo</a>, <a class="el" href="classuddi2____business_service.html#o0">uddi2__businessService</a>, <a class="el" href="classuddi2____business_info.html#o0">uddi2__businessInfo</a>, <a class="el" href="classuddi2____business_entity.html#o1">uddi2__businessEntity</a></ul>

+<h3><a class="anchor" name="index_o">- o -</a></h3><ul>

+<li>operator_

+: <a class="el" href="classuddi2____t_model_list.html#o2">uddi2__tModelList</a>, <a class="el" href="classuddi2____t_model_detail.html#o2">uddi2__tModelDetail</a>, <a class="el" href="classuddi2____service_list.html#o2">uddi2__serviceList</a>, <a class="el" href="classuddi2____service_detail.html#o2">uddi2__serviceDetail</a>, <a class="el" href="classuddi2____related_businesses_list.html#o3">uddi2__relatedBusinessesList</a>, <a class="el" href="classuddi2____registered_info.html#o3">uddi2__registeredInfo</a>, <a class="el" href="classuddi2____publisher_assertions.html#o2">uddi2__publisherAssertions</a>, <a class="el" href="classuddi2____business_list.html#o2">uddi2__businessList</a>, <a class="el" href="classuddi2____business_detail_ext.html#o2">uddi2__businessDetailExt</a>, <a class="el" href="classuddi2____business_detail.html#o2">uddi2__businessDetail</a>, <a class="el" href="classuddi2____binding_detail.html#o2">uddi2__bindingDetail</a>, <a class="el" href="classuddi2____auth_token.html#o2">uddi2__authToken</a>, <a class="el" href="classuddi2____assertion_status_report.html#o2">uddi2__assertionStatusReport</a>, <a class="el" href="classuddi2____t_model.html#o6">uddi2__tModel</a>, <a class="el" href="classuddi2____disposition_report.html#o2">uddi2__dispositionReport</a>, <a class="el" href="classuddi2____business_entity.html#o8">uddi2__businessEntity</a><li>overviewDoc

+: <a class="el" href="classuddi2____t_model.html#o2">uddi2__tModel</a>, <a class="el" href="classuddi2____instance_details.html#o1">uddi2__instanceDetails</a><li>overviewURL

+: <a class="el" href="classuddi2____overview_doc.html#o1">uddi2__overviewDoc</a></ul>

+<h3><a class="anchor" name="index_p">- p -</a></h3><ul>

+<li>personName

+: <a class="el" href="classuddi2____contact.html#o1">uddi2__contact</a><li>phone

+: <a class="el" href="classuddi2____contact.html#o2">uddi2__contact</a><li>publisherAssertion

+: <a class="el" href="classuddi2____publisher_assertions.html#o0">uddi2__publisherAssertions</a>, <a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o1">uddi2__set_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o1">uddi2__delete_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o1">uddi2__add_USCOREpublisherAssertions</a></ul>

+<h3><a class="anchor" name="index_r">- r -</a></h3><ul>

+<li>relatedBusinessInfo

+: <a class="el" href="classuddi2____related_business_infos.html#o0">uddi2__relatedBusinessInfos</a><li>relatedBusinessInfos

+: <a class="el" href="classuddi2____related_businesses_list.html#o1">uddi2__relatedBusinessesList</a><li>result

+: <a class="el" href="classuddi2____disposition_report.html#o0">uddi2__dispositionReport</a></ul>

+<h3><a class="anchor" name="index_s">- s -</a></h3><ul>

+<li>serviceInfo

+: <a class="el" href="classuddi2____service_infos.html#o0">uddi2__serviceInfos</a><li>serviceInfos

+: <a class="el" href="classuddi2____service_list.html#o0">uddi2__serviceList</a>, <a class="el" href="classuddi2____business_info.html#o2">uddi2__businessInfo</a><li>serviceKey

+: <a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#o0">uddi2__get_USCOREserviceDetail</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o4">uddi2__find_USCOREbinding</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o1">uddi2__delete_USCOREservice</a>, <a class="el" href="classuddi2____service_info.html#o1">uddi2__serviceInfo</a>, <a class="el" href="classuddi2____business_service.html#o4">uddi2__businessService</a>, <a class="el" href="classuddi2____binding_template.html#o4">uddi2__bindingTemplate</a><li>sharedRelationships

+: <a class="el" href="classuddi2____related_business_info.html#o3">uddi2__relatedBusinessInfo</a><li>soap

+: <a class="el" href="class__disposition_report.html#o1">_dispositionReport</a>, <a class="el" href="classuddi2____phone.html#o2">uddi2__phone</a>, <a class="el" href="classuddi2____name.html#o2">uddi2__name</a>, <a class="el" href="classuddi2____err_info.html#o2">uddi2__errInfo</a>, <a class="el" href="classuddi2____email.html#o2">uddi2__email</a>, <a class="el" href="classuddi2____discovery_u_r_l.html#o2">uddi2__discoveryURL</a>, <a class="el" href="classuddi2____description.html#o2">uddi2__description</a>, <a class="el" href="classuddi2____address_line.html#o3">uddi2__addressLine</a>, <a class="el" href="classuddi2____access_point.html#o2">uddi2__accessPoint</a>, <a class="el" href="classuddi2____t_model_list.html#o4">uddi2__tModelList</a>, <a class="el" href="classuddi2____t_model_detail.html#o4">uddi2__tModelDetail</a>, <a class="el" href="classuddi2____service_list.html#o4">uddi2__serviceList</a>, <a class="el" href="classuddi2____service_detail.html#o4">uddi2__serviceDetail</a>, <a class="el" href="classuddi2____related_businesses_list.html#o5">uddi2__relatedBusinessesList</a>, <a class="el" href="classuddi2____registered_info.html#o5">uddi2__registeredInfo</a>, <a class="el" href="classuddi2____publisher_assertions.html#o4">uddi2__publisherAssertions</a>, <a class="el" href="classuddi2____business_list.html#o4">uddi2__businessList</a>, <a class="el" href="classuddi2____business_detail_ext.html#o4">uddi2__businessDetailExt</a>, <a class="el" href="classuddi2____business_detail.html#o4">uddi2__businessDetail</a>, <a class="el" href="classuddi2____binding_detail.html#o4">uddi2__bindingDetail</a>, <a class="el" href="classuddi2____auth_token.html#o3">uddi2__authToken</a>, <a class="el" href="classuddi2____assertion_status_report.html#o3">uddi2__assertionStatusReport</a>, <a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o4">uddi2__validate_USCOREvalues</a>, <a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#o3">uddi2__set_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o4">uddi2__save_USCOREtModel</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html#o3">uddi2__save_USCOREservice</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o4">uddi2__save_USCOREbusiness</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html#o3">uddi2__save_USCOREbinding</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#o2">uddi2__get_USCOREtModelDetail</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html#o2">uddi2__get_USCOREserviceDetail</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html#o2">uddi2__get_USCOREregisteredInfo</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#o2">uddi2__get_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#o2">uddi2__get_USCOREbusinessDetailExt</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#o2">uddi2__get_USCOREbusinessDetail</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#o2">uddi2__get_USCOREbindingDetail</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o3">uddi2__get_USCOREauthToken</a>, <a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#o3">uddi2__get_USCOREassertionStatusReport</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html#o6">uddi2__find_USCOREtModel</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o7">uddi2__find_USCOREservice</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#o5">uddi2__find_USCORErelatedBusinesses</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o8">uddi2__find_USCOREbusiness</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o5">uddi2__find_USCOREbinding</a>, <a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html#o2">uddi2__discard_USCOREauthToken</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o3">uddi2__delete_USCOREtModel</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html#o3">uddi2__delete_USCOREservice</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#o3">uddi2__delete_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html#o3">uddi2__delete_USCOREbusiness</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html#o3">uddi2__delete_USCOREbinding</a>, <a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#o3">uddi2__add_USCOREpublisherAssertions</a>, <a class="el" href="classuddi2____t_model_instance_info.html#o3">uddi2__tModelInstanceInfo</a>, <a class="el" href="classuddi2____t_model_instance_details.html#o1">uddi2__tModelInstanceDetails</a>, <a class="el" href="classuddi2____t_model_infos.html#o1">uddi2__tModelInfos</a>, <a class="el" href="classuddi2____t_model_info.html#o2">uddi2__tModelInfo</a>, <a class="el" href="classuddi2____t_model_bag.html#o1">uddi2__tModelBag</a>, <a class="el" href="classuddi2____t_model.html#o8">uddi2__tModel</a>, <a class="el" href="classuddi2____shared_relationships.html#o2">uddi2__sharedRelationships</a>, <a class="el" href="classuddi2____service_infos.html#o1">uddi2__serviceInfos</a>, <a class="el" href="classuddi2____service_info.html#o3">uddi2__serviceInfo</a>, <a class="el" href="classuddi2____result.html#o3">uddi2__result</a>, <a class="el" href="classuddi2____related_business_infos.html#o1">uddi2__relatedBusinessInfos</a>, <a class="el" href="classuddi2____related_business_info.html#o4">uddi2__relatedBusinessInfo</a>, <a class="el" href="classuddi2____publisher_assertion.html#o3">uddi2__publisherAssertion</a>, <a class="el" href="classuddi2____overview_doc.html#o2">uddi2__overviewDoc</a>, <a class="el" href="classuddi2____keys_owned.html#o2">uddi2__keysOwned</a>, <a class="el" href="classuddi2____keyed_reference.html#o3">uddi2__keyedReference</a>, <a class="el" href="classuddi2____instance_details.html#o3">uddi2__instanceDetails</a>, <a class="el" href="classuddi2____identifier_bag.html#o1">uddi2__identifierBag</a>, <a class="el" href="classuddi2____hosting_redirector.html#o1">uddi2__hostingRedirector</a>, <a class="el" href="classuddi2____find_qualifiers.html#o1">uddi2__findQualifiers</a>, <a class="el" href="classuddi2____disposition_report.html#o4">uddi2__dispositionReport</a>, <a class="el" href="classuddi2____discovery_u_r_ls.html#o1">uddi2__discoveryURLs</a>, <a class="el" href="classuddi2____contacts.html#o1">uddi2__contacts</a>, <a class="el" href="classuddi2____contact.html#o6">uddi2__contact</a>, <a class="el" href="classuddi2____category_bag.html#o1">uddi2__categoryBag</a>, <a class="el" href="classuddi2____business_services.html#o1">uddi2__businessServices</a>, <a class="el" href="classuddi2____business_service.html#o6">uddi2__businessService</a>, <a class="el" href="classuddi2____business_infos.html#o1">uddi2__businessInfos</a>, <a class="el" href="classuddi2____business_info.html#o4">uddi2__businessInfo</a>, <a class="el" href="classuddi2____business_entity_ext.html#o2">uddi2__businessEntityExt</a>, <a class="el" href="classuddi2____business_entity.html#o10">uddi2__businessEntity</a>, <a class="el" href="classuddi2____binding_templates.html#o1">uddi2__bindingTemplates</a>, <a class="el" href="classuddi2____binding_template.html#o6">uddi2__bindingTemplate</a>, <a class="el" href="classuddi2____assertion_status_item.html#o5">uddi2__assertionStatusItem</a>, <a class="el" href="classuddi2____address.html#o4">uddi2__address</a><li>sortCode

+: <a class="el" href="classuddi2____address.html#o2">uddi2__address</a></ul>

+<h3><a class="anchor" name="index_t">- t -</a></h3><ul>

+<li>tModel

+: <a class="el" href="classuddi2____t_model_detail.html#o0">uddi2__tModelDetail</a>, <a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html#o2">uddi2__validate_USCOREvalues</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o1">uddi2__save_USCOREtModel</a><li>tModelBag

+: <a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html#o3">uddi2__find_USCOREservice</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html#o4">uddi2__find_USCOREbusiness</a>, <a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html#o1">uddi2__find_USCOREbinding</a><li>tModelInfo

+: <a class="el" href="classuddi2____t_model_infos.html#o0">uddi2__tModelInfos</a><li>tModelInfos

+: <a class="el" href="classuddi2____t_model_list.html#o0">uddi2__tModelList</a>, <a class="el" href="classuddi2____registered_info.html#o1">uddi2__registeredInfo</a><li>tModelInstanceDetails

+: <a class="el" href="classuddi2____binding_template.html#o1">uddi2__bindingTemplate</a><li>tModelInstanceInfo

+: <a class="el" href="classuddi2____t_model_instance_details.html#o0">uddi2__tModelInstanceDetails</a><li>tModelKey

+: <a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html#o0">uddi2__get_USCOREtModelDetail</a>, <a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html#o1">uddi2__delete_USCOREtModel</a>, <a class="el" href="classuddi2____t_model_instance_info.html#o2">uddi2__tModelInstanceInfo</a>, <a class="el" href="classuddi2____t_model_info.html#o1">uddi2__tModelInfo</a>, <a class="el" href="classuddi2____t_model_bag.html#o0">uddi2__tModelBag</a>, <a class="el" href="classuddi2____t_model.html#o5">uddi2__tModel</a>, <a class="el" href="classuddi2____keyed_reference.html#o0">uddi2__keyedReference</a>, <a class="el" href="classuddi2____address.html#o3">uddi2__address</a><li>toKey

+: <a class="el" href="classuddi2____publisher_assertion.html#o1">uddi2__publisherAssertion</a>, <a class="el" href="classuddi2____keys_owned.html#o1">uddi2__keysOwned</a>, <a class="el" href="classuddi2____assertion_status_item.html#o1">uddi2__assertionStatusItem</a><li>truncated

+: <a class="el" href="classuddi2____t_model_list.html#o3">uddi2__tModelList</a>, <a class="el" href="classuddi2____t_model_detail.html#o3">uddi2__tModelDetail</a>, <a class="el" href="classuddi2____service_list.html#o3">uddi2__serviceList</a>, <a class="el" href="classuddi2____service_detail.html#o3">uddi2__serviceDetail</a>, <a class="el" href="classuddi2____related_businesses_list.html#o4">uddi2__relatedBusinessesList</a>, <a class="el" href="classuddi2____registered_info.html#o4">uddi2__registeredInfo</a>, <a class="el" href="classuddi2____business_list.html#o3">uddi2__businessList</a>, <a class="el" href="classuddi2____business_detail_ext.html#o3">uddi2__businessDetailExt</a>, <a class="el" href="classuddi2____business_detail.html#o3">uddi2__businessDetail</a>, <a class="el" href="classuddi2____binding_detail.html#o3">uddi2__bindingDetail</a>, <a class="el" href="classuddi2____disposition_report.html#o3">uddi2__dispositionReport</a></ul>

+<h3><a class="anchor" name="index_u">- u -</a></h3><ul>

+<li>uddi2__dispositionReport_

+: <a class="el" href="class__disposition_report.html#o0">_dispositionReport</a><li>uploadRegister

+: <a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html#o2">uddi2__save_USCOREtModel</a>, <a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html#o2">uddi2__save_USCOREbusiness</a><li>URLType

+: <a class="el" href="classuddi2____access_point.html#o1">uddi2__accessPoint</a><li>userID

+: <a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html#o1">uddi2__get_USCOREauthToken</a><li>useType

+: <a class="el" href="classuddi2____phone.html#o1">uddi2__phone</a>, <a class="el" href="classuddi2____email.html#o1">uddi2__email</a>, <a class="el" href="classuddi2____discovery_u_r_l.html#o1">uddi2__discoveryURL</a>, <a class="el" href="classuddi2____contact.html#o5">uddi2__contact</a>, <a class="el" href="classuddi2____address.html#o1">uddi2__address</a></ul>

+<h3><a class="anchor" name="index_x">- x -</a></h3><ul>

+<li>xml__lang_

+: <a class="el" href="classuddi2____name.html#o1">uddi2__name</a>, <a class="el" href="classuddi2____description.html#o1">uddi2__description</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/globals.html b/doc/uddi2/html/globals.html
new file mode 100644
index 0000000..0bcb00c
--- /dev/null
+++ b/doc/uddi2/html/globals.html
@@ -0,0 +1,75 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: File Members</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindexHL" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<div class="qindex"><a class="qindexHL" href="globals.html">All</a> | <a class="qindex" href="globals_func.html">Functions</a> | <a class="qindex" href="globals_type.html">Typedefs</a> | <a class="qindex" href="globals_enum.html">Enumerations</a> | <a class="qindex" href="globals_eval.html">Enumeration&nbsp;values</a></div>

+<div class="qindex"><a class="qindex" href="#index__">_</a> | <a class="qindex" href="#index_u">u</a> | <a class="qindex" href="#index_x">x</a></div>

+

+<p>

+

+<p>

+Here is a list of all file members with links to the files they belong to:<h3><a class="anchor" name="index__">- _ -</a></h3><ul>

+<li>__inq2__find_USCOREbinding()

+: <a class="el" href="uddi__v2_8h.html#a21">uddi_v2.h</a><li>__inq2__find_USCOREbusiness()

+: <a class="el" href="uddi__v2_8h.html#a22">uddi_v2.h</a><li>__inq2__find_USCORErelatedBusinesses()

+: <a class="el" href="uddi__v2_8h.html#a23">uddi_v2.h</a><li>__inq2__find_USCOREservice()

+: <a class="el" href="uddi__v2_8h.html#a24">uddi_v2.h</a><li>__inq2__find_USCOREtModel()

+: <a class="el" href="uddi__v2_8h.html#a25">uddi_v2.h</a><li>__inq2__get_USCOREbindingDetail()

+: <a class="el" href="uddi__v2_8h.html#a26">uddi_v2.h</a><li>__inq2__get_USCOREbusinessDetail()

+: <a class="el" href="uddi__v2_8h.html#a27">uddi_v2.h</a><li>__inq2__get_USCOREbusinessDetailExt()

+: <a class="el" href="uddi__v2_8h.html#a28">uddi_v2.h</a><li>__inq2__get_USCOREserviceDetail()

+: <a class="el" href="uddi__v2_8h.html#a29">uddi_v2.h</a><li>__inq2__get_USCOREtModelDetail()

+: <a class="el" href="uddi__v2_8h.html#a30">uddi_v2.h</a><li>__pub2__add_USCOREpublisherAssertions()

+: <a class="el" href="uddi__v2_8h.html#a31">uddi_v2.h</a><li>__pub2__delete_USCOREbinding()

+: <a class="el" href="uddi__v2_8h.html#a32">uddi_v2.h</a><li>__pub2__delete_USCOREbusiness()

+: <a class="el" href="uddi__v2_8h.html#a33">uddi_v2.h</a><li>__pub2__delete_USCOREpublisherAssertions()

+: <a class="el" href="uddi__v2_8h.html#a34">uddi_v2.h</a><li>__pub2__delete_USCOREservice()

+: <a class="el" href="uddi__v2_8h.html#a35">uddi_v2.h</a><li>__pub2__delete_USCOREtModel()

+: <a class="el" href="uddi__v2_8h.html#a36">uddi_v2.h</a><li>__pub2__discard_USCOREauthToken()

+: <a class="el" href="uddi__v2_8h.html#a37">uddi_v2.h</a><li>__pub2__get_USCOREassertionStatusReport()

+: <a class="el" href="uddi__v2_8h.html#a38">uddi_v2.h</a><li>__pub2__get_USCOREauthToken()

+: <a class="el" href="uddi__v2_8h.html#a39">uddi_v2.h</a><li>__pub2__get_USCOREpublisherAssertions()

+: <a class="el" href="uddi__v2_8h.html#a40">uddi_v2.h</a><li>__pub2__get_USCOREregisteredInfo()

+: <a class="el" href="uddi__v2_8h.html#a41">uddi_v2.h</a><li>__pub2__save_USCOREbinding()

+: <a class="el" href="uddi__v2_8h.html#a42">uddi_v2.h</a><li>__pub2__save_USCOREbusiness()

+: <a class="el" href="uddi__v2_8h.html#a43">uddi_v2.h</a><li>__pub2__save_USCOREservice()

+: <a class="el" href="uddi__v2_8h.html#a44">uddi_v2.h</a><li>__pub2__save_USCOREtModel()

+: <a class="el" href="uddi__v2_8h.html#a45">uddi_v2.h</a><li>__pub2__set_USCOREpublisherAssertions()

+: <a class="el" href="uddi__v2_8h.html#a46">uddi_v2.h</a></ul>

+<h3><a class="anchor" name="index_u">- u -</a></h3><ul>

+<li>uddi2__bindingKey

+: <a class="el" href="uddi__v2_8h.html#a2">uddi_v2.h</a><li>uddi2__businessKey

+: <a class="el" href="uddi__v2_8h.html#a3">uddi_v2.h</a><li>uddi2__direction

+: <a class="el" href="uddi__v2_8h.html#a47">uddi_v2.h</a><li>uddi2__direction__fromKey

+: <a class="el" href="uddi__v2_8h.html#a47a6">uddi_v2.h</a><li>uddi2__direction__toKey

+: <a class="el" href="uddi__v2_8h.html#a47a7">uddi_v2.h</a><li>uddi2__keyType

+: <a class="el" href="uddi__v2_8h.html#a50">uddi_v2.h</a><li>uddi2__keyType__bindingKey

+: <a class="el" href="uddi__v2_8h.html#a50a20">uddi_v2.h</a><li>uddi2__keyType__businessKey

+: <a class="el" href="uddi__v2_8h.html#a50a17">uddi_v2.h</a><li>uddi2__keyType__serviceKey

+: <a class="el" href="uddi__v2_8h.html#a50a19">uddi_v2.h</a><li>uddi2__keyType__tModelKey

+: <a class="el" href="uddi__v2_8h.html#a50a18">uddi_v2.h</a><li>uddi2__serviceKey

+: <a class="el" href="uddi__v2_8h.html#a4">uddi_v2.h</a><li>uddi2__tModelKey

+: <a class="el" href="uddi__v2_8h.html#a5">uddi_v2.h</a><li>uddi2__truncated

+: <a class="el" href="uddi__v2_8h.html#a48">uddi_v2.h</a><li>uddi2__truncated__false_

+: <a class="el" href="uddi__v2_8h.html#a48a9">uddi_v2.h</a><li>uddi2__truncated__true_

+: <a class="el" href="uddi__v2_8h.html#a48a8">uddi_v2.h</a><li>uddi2__URLType

+: <a class="el" href="uddi__v2_8h.html#a49">uddi_v2.h</a><li>uddi2__URLType__fax

+: <a class="el" href="uddi__v2_8h.html#a49a14">uddi_v2.h</a><li>uddi2__URLType__ftp

+: <a class="el" href="uddi__v2_8h.html#a49a13">uddi_v2.h</a><li>uddi2__URLType__http

+: <a class="el" href="uddi__v2_8h.html#a49a11">uddi_v2.h</a><li>uddi2__URLType__https

+: <a class="el" href="uddi__v2_8h.html#a49a12">uddi_v2.h</a><li>uddi2__URLType__mailto

+: <a class="el" href="uddi__v2_8h.html#a49a10">uddi_v2.h</a><li>uddi2__URLType__other

+: <a class="el" href="uddi__v2_8h.html#a49a16">uddi_v2.h</a><li>uddi2__URLType__phone

+: <a class="el" href="uddi__v2_8h.html#a49a15">uddi_v2.h</a></ul>

+<h3><a class="anchor" name="index_x">- x -</a></h3><ul>

+<li>xml__lang

+: <a class="el" href="uddi__v2_8h.html#a1">uddi_v2.h</a><li>xsd__NMTOKEN

+: <a class="el" href="uddi__v2_8h.html#a0">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/globals_enum.html b/doc/uddi2/html/globals_enum.html
new file mode 100644
index 0000000..0e44e5e
--- /dev/null
+++ b/doc/uddi2/html/globals_enum.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: File Members - Enumerations</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindexHL" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<div class="qindex"><a class="qindex" href="globals.html">All</a> | <a class="qindex" href="globals_func.html">Functions</a> | <a class="qindex" href="globals_type.html">Typedefs</a> | <a class="qindexHL" href="globals_enum.html">Enumerations</a> | <a class="qindex" href="globals_eval.html">Enumeration&nbsp;values</a></div>

+

+<p>

+<ul>

+<li>uddi2__direction

+: <a class="el" href="uddi__v2_8h.html#a47">uddi_v2.h</a><li>uddi2__keyType

+: <a class="el" href="uddi__v2_8h.html#a50">uddi_v2.h</a><li>uddi2__truncated

+: <a class="el" href="uddi__v2_8h.html#a48">uddi_v2.h</a><li>uddi2__URLType

+: <a class="el" href="uddi__v2_8h.html#a49">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/globals_eval.html b/doc/uddi2/html/globals_eval.html
new file mode 100644
index 0000000..f65eafc
--- /dev/null
+++ b/doc/uddi2/html/globals_eval.html
@@ -0,0 +1,32 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: File Members - Enumeration values</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindexHL" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<div class="qindex"><a class="qindex" href="globals.html">All</a> | <a class="qindex" href="globals_func.html">Functions</a> | <a class="qindex" href="globals_type.html">Typedefs</a> | <a class="qindex" href="globals_enum.html">Enumerations</a> | <a class="qindexHL" href="globals_eval.html">Enumeration&nbsp;values</a></div>

+

+<p>

+<ul>

+<li>uddi2__direction__fromKey

+: <a class="el" href="uddi__v2_8h.html#a47a6">uddi_v2.h</a><li>uddi2__direction__toKey

+: <a class="el" href="uddi__v2_8h.html#a47a7">uddi_v2.h</a><li>uddi2__keyType__bindingKey

+: <a class="el" href="uddi__v2_8h.html#a50a20">uddi_v2.h</a><li>uddi2__keyType__businessKey

+: <a class="el" href="uddi__v2_8h.html#a50a17">uddi_v2.h</a><li>uddi2__keyType__serviceKey

+: <a class="el" href="uddi__v2_8h.html#a50a19">uddi_v2.h</a><li>uddi2__keyType__tModelKey

+: <a class="el" href="uddi__v2_8h.html#a50a18">uddi_v2.h</a><li>uddi2__truncated__false_

+: <a class="el" href="uddi__v2_8h.html#a48a9">uddi_v2.h</a><li>uddi2__truncated__true_

+: <a class="el" href="uddi__v2_8h.html#a48a8">uddi_v2.h</a><li>uddi2__URLType__fax

+: <a class="el" href="uddi__v2_8h.html#a49a14">uddi_v2.h</a><li>uddi2__URLType__ftp

+: <a class="el" href="uddi__v2_8h.html#a49a13">uddi_v2.h</a><li>uddi2__URLType__http

+: <a class="el" href="uddi__v2_8h.html#a49a11">uddi_v2.h</a><li>uddi2__URLType__https

+: <a class="el" href="uddi__v2_8h.html#a49a12">uddi_v2.h</a><li>uddi2__URLType__mailto

+: <a class="el" href="uddi__v2_8h.html#a49a10">uddi_v2.h</a><li>uddi2__URLType__other

+: <a class="el" href="uddi__v2_8h.html#a49a16">uddi_v2.h</a><li>uddi2__URLType__phone

+: <a class="el" href="uddi__v2_8h.html#a49a15">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/globals_func.html b/doc/uddi2/html/globals_func.html
new file mode 100644
index 0000000..c5c3ba7
--- /dev/null
+++ b/doc/uddi2/html/globals_func.html
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: File Members - Functions</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindexHL" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<div class="qindex"><a class="qindex" href="globals.html">All</a> | <a class="qindexHL" href="globals_func.html">Functions</a> | <a class="qindex" href="globals_type.html">Typedefs</a> | <a class="qindex" href="globals_enum.html">Enumerations</a> | <a class="qindex" href="globals_eval.html">Enumeration&nbsp;values</a></div>

+

+<p>

+<ul>

+<li>__inq2__find_USCOREbinding()

+: <a class="el" href="uddi__v2_8h.html#a21">uddi_v2.h</a><li>__inq2__find_USCOREbusiness()

+: <a class="el" href="uddi__v2_8h.html#a22">uddi_v2.h</a><li>__inq2__find_USCORErelatedBusinesses()

+: <a class="el" href="uddi__v2_8h.html#a23">uddi_v2.h</a><li>__inq2__find_USCOREservice()

+: <a class="el" href="uddi__v2_8h.html#a24">uddi_v2.h</a><li>__inq2__find_USCOREtModel()

+: <a class="el" href="uddi__v2_8h.html#a25">uddi_v2.h</a><li>__inq2__get_USCOREbindingDetail()

+: <a class="el" href="uddi__v2_8h.html#a26">uddi_v2.h</a><li>__inq2__get_USCOREbusinessDetail()

+: <a class="el" href="uddi__v2_8h.html#a27">uddi_v2.h</a><li>__inq2__get_USCOREbusinessDetailExt()

+: <a class="el" href="uddi__v2_8h.html#a28">uddi_v2.h</a><li>__inq2__get_USCOREserviceDetail()

+: <a class="el" href="uddi__v2_8h.html#a29">uddi_v2.h</a><li>__inq2__get_USCOREtModelDetail()

+: <a class="el" href="uddi__v2_8h.html#a30">uddi_v2.h</a><li>__pub2__add_USCOREpublisherAssertions()

+: <a class="el" href="uddi__v2_8h.html#a31">uddi_v2.h</a><li>__pub2__delete_USCOREbinding()

+: <a class="el" href="uddi__v2_8h.html#a32">uddi_v2.h</a><li>__pub2__delete_USCOREbusiness()

+: <a class="el" href="uddi__v2_8h.html#a33">uddi_v2.h</a><li>__pub2__delete_USCOREpublisherAssertions()

+: <a class="el" href="uddi__v2_8h.html#a34">uddi_v2.h</a><li>__pub2__delete_USCOREservice()

+: <a class="el" href="uddi__v2_8h.html#a35">uddi_v2.h</a><li>__pub2__delete_USCOREtModel()

+: <a class="el" href="uddi__v2_8h.html#a36">uddi_v2.h</a><li>__pub2__discard_USCOREauthToken()

+: <a class="el" href="uddi__v2_8h.html#a37">uddi_v2.h</a><li>__pub2__get_USCOREassertionStatusReport()

+: <a class="el" href="uddi__v2_8h.html#a38">uddi_v2.h</a><li>__pub2__get_USCOREauthToken()

+: <a class="el" href="uddi__v2_8h.html#a39">uddi_v2.h</a><li>__pub2__get_USCOREpublisherAssertions()

+: <a class="el" href="uddi__v2_8h.html#a40">uddi_v2.h</a><li>__pub2__get_USCOREregisteredInfo()

+: <a class="el" href="uddi__v2_8h.html#a41">uddi_v2.h</a><li>__pub2__save_USCOREbinding()

+: <a class="el" href="uddi__v2_8h.html#a42">uddi_v2.h</a><li>__pub2__save_USCOREbusiness()

+: <a class="el" href="uddi__v2_8h.html#a43">uddi_v2.h</a><li>__pub2__save_USCOREservice()

+: <a class="el" href="uddi__v2_8h.html#a44">uddi_v2.h</a><li>__pub2__save_USCOREtModel()

+: <a class="el" href="uddi__v2_8h.html#a45">uddi_v2.h</a><li>__pub2__set_USCOREpublisherAssertions()

+: <a class="el" href="uddi__v2_8h.html#a46">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/globals_type.html b/doc/uddi2/html/globals_type.html
new file mode 100644
index 0000000..f3e9231
--- /dev/null
+++ b/doc/uddi2/html/globals_type.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: File Members - Typedefs</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindexHL" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<div class="qindex"><a class="qindex" href="globals.html">All</a> | <a class="qindex" href="globals_func.html">Functions</a> | <a class="qindexHL" href="globals_type.html">Typedefs</a> | <a class="qindex" href="globals_enum.html">Enumerations</a> | <a class="qindex" href="globals_eval.html">Enumeration&nbsp;values</a></div>

+

+<p>

+<ul>

+<li>uddi2__bindingKey

+: <a class="el" href="uddi__v2_8h.html#a2">uddi_v2.h</a><li>uddi2__businessKey

+: <a class="el" href="uddi__v2_8h.html#a3">uddi_v2.h</a><li>uddi2__serviceKey

+: <a class="el" href="uddi__v2_8h.html#a4">uddi_v2.h</a><li>uddi2__tModelKey

+: <a class="el" href="uddi__v2_8h.html#a5">uddi_v2.h</a><li>xml__lang

+: <a class="el" href="uddi__v2_8h.html#a1">uddi_v2.h</a><li>xsd__NMTOKEN

+: <a class="el" href="uddi__v2_8h.html#a0">uddi_v2.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/index.html b/doc/uddi2/html/index.html
new file mode 100644
index 0000000..4729ddd
--- /dev/null
+++ b/doc/uddi2/html/index.html
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: gSOAP UDDI v2</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindexHL" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>gSOAP UDDI v2 </h1>

+<p>

+Universal Description, Discovery and Integration, or UDDI, is the name of a group of web-based registries that expose information about a business or other entity and its technical interfaces.<p>

+See the UDDI v2 specification  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm">http://uddi.org/pubs/ProgrammersAPI_v2.htm</a> for more details.<h2><a class="anchor" name="UDDI2_CLASSES">

+Classes</a></h2>

+See Related Pages for examples.<p>

+UDDI Inquire classes<p>

+<ul>

+<li><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html">uddi2__find_USCOREbinding</a></li><li><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html">uddi2__find_USCOREbusiness</a></li><li><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html">uddi2__find_USCORErelatedBusinesses</a></li><li><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html">uddi2__find_USCOREservice</a></li><li><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html">uddi2__find_USCOREtModel</a></li><li><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html">uddi2__get_USCOREbindingDetail</a></li><li><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html">uddi2__get_USCOREbusinessDetail</a></li><li><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html">uddi2__get_USCOREbusinessDetailExt</a></li><li><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html">uddi2__get_USCOREserviceDetail</a></li><li><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html">uddi2__get_USCOREtModelDetail</a></li></ul>

+<p>

+UDDI Publish classes<p>

+<ul>

+<li><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html">uddi2__add_USCOREpublisherAssertions</a></li><li><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html">uddi2__delete_USCOREbinding</a></li><li><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html">uddi2__delete_USCOREbusiness</a></li><li><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html">uddi2__delete_USCOREservice</a></li><li><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html">uddi2__delete_USCOREtModel</a></li><li><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html">uddi2__delete_USCOREpublisherAssertions</a></li><li><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html">uddi2__discard_USCOREauthToken</a></li><li><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html">uddi2__get_USCOREassertionStatusReport</a></li><li><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html">uddi2__get_USCOREauthToken</a></li><li><a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html">uddi2__get_USCOREpublisherAssertions</a></li><li><a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html">uddi2__get_USCOREregisteredInfo</a></li><li><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html">uddi2__save_USCOREbinding</a></li><li><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html">uddi2__save_USCOREbusiness</a></li><li><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html">uddi2__save_USCOREservice</a></li><li><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html">uddi2__save_USCOREtModel</a></li><li><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html">uddi2__set_USCOREpublisherAssertions</a></li></ul>

+<h2><a class="anchor" name="UDDI2_BINDINGS">

+Binding Reference</a></h2>

+<ul>

+<li><a class="el" href="inquiresoap.html">InquireSoap</a></li><li><a class="el" href="publishsoap.html">PublishSoap</a> </li></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:57 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/inquiresoap.html b/doc/uddi2/html/inquiresoap.html
new file mode 100644
index 0000000..c4276d9
--- /dev/null
+++ b/doc/uddi2/html/inquiresoap.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Binding &quot;InquireSoap&quot;</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h2><a class="anchor" name="InquireSoap_operations">

+Operations of Binding  "InquireSoap"</a></h2>

+<ul>

+<li><a class="el" href="uddi__v2_8h.html#a21">__inq2__find_USCOREbinding</a></li><li><a class="el" href="uddi__v2_8h.html#a22">__inq2__find_USCOREbusiness</a></li><li><a class="el" href="uddi__v2_8h.html#a23">__inq2__find_USCORErelatedBusinesses</a></li><li><a class="el" href="uddi__v2_8h.html#a24">__inq2__find_USCOREservice</a></li><li><a class="el" href="uddi__v2_8h.html#a25">__inq2__find_USCOREtModel</a></li><li><a class="el" href="uddi__v2_8h.html#a26">__inq2__get_USCOREbindingDetail</a></li><li><a class="el" href="uddi__v2_8h.html#a27">__inq2__get_USCOREbusinessDetail</a></li><li><a class="el" href="uddi__v2_8h.html#a28">__inq2__get_USCOREbusinessDetailExt</a></li><li><a class="el" href="uddi__v2_8h.html#a29">__inq2__get_USCOREserviceDetail</a></li><li><a class="el" href="uddi__v2_8h.html#a30">__inq2__get_USCOREtModelDetail</a></li></ul>

+<h2><a class="anchor" name="InquireSoap_ports">

+Endpoints of Binding  "InquireSoap"</a></h2>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/main.html b/doc/uddi2/html/main.html
new file mode 100644
index 0000000..d4eaf51
--- /dev/null
+++ b/doc/uddi2/html/main.html
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: gSOAP UDDI v2</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindexHL" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>gSOAP UDDI v2 </h1>

+<p>

+Universal Description, Discovery and Integration, or UDDI, is the name of a group of web-based registries that expose information about a business or other entity and its technical interfaces.<p>

+See the UDDI v2 specification  <a href="http://uddi.org/pubs/ProgrammersAPI_v2.htm">http://uddi.org/pubs/ProgrammersAPI_v2.htm</a> for more details.<h2><a class="anchor" name="UDDI2_CLASSES">

+Classes</a></h2>

+See Related Pages for examples.<p>

+UDDI Inquire classes<p>

+<ul>

+<li><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html">uddi2__find_USCOREbinding</a></li><li><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html">uddi2__find_USCOREbusiness</a></li><li><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html">uddi2__find_USCORErelatedBusinesses</a></li><li><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html">uddi2__find_USCOREservice</a></li><li><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html">uddi2__find_USCOREtModel</a></li><li><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html">uddi2__get_USCOREbindingDetail</a></li><li><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html">uddi2__get_USCOREbusinessDetail</a></li><li><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html">uddi2__get_USCOREbusinessDetailExt</a></li><li><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html">uddi2__get_USCOREserviceDetail</a></li><li><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html">uddi2__get_USCOREtModelDetail</a></li></ul>

+<p>

+UDDI Publish classes<p>

+<ul>

+<li><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html">uddi2__add_USCOREpublisherAssertions</a></li><li><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html">uddi2__delete_USCOREbinding</a></li><li><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html">uddi2__delete_USCOREbusiness</a></li><li><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html">uddi2__delete_USCOREservice</a></li><li><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html">uddi2__delete_USCOREtModel</a></li><li><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html">uddi2__delete_USCOREpublisherAssertions</a></li><li><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html">uddi2__discard_USCOREauthToken</a></li><li><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html">uddi2__get_USCOREassertionStatusReport</a></li><li><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html">uddi2__get_USCOREauthToken</a></li><li><a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html">uddi2__get_USCOREpublisherAssertions</a></li><li><a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html">uddi2__get_USCOREregisteredInfo</a></li><li><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html">uddi2__save_USCOREbinding</a></li><li><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html">uddi2__save_USCOREbusiness</a></li><li><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html">uddi2__save_USCOREservice</a></li><li><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html">uddi2__save_USCOREtModel</a></li><li><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html">uddi2__set_USCOREpublisherAssertions</a></li></ul>

+<h2><a class="anchor" name="UDDI2_BINDINGS">

+Binding Reference</a></h2>

+<ul>

+<li><a class="el" href="inquiresoap.html">InquireSoap</a></li><li><a class="el" href="publishsoap.html">PublishSoap</a> </li></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:08:39 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/pages.html b/doc/uddi2/html/pages.html
new file mode 100644
index 0000000..9d22135
--- /dev/null
+++ b/doc/uddi2/html/pages.html
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Page Index</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindexHL" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>gSOAP UDDI v2 Related Pages</h1>Here is a list of all related documentation pages:<ul>

+<li><a class="el" href="example1.html">Code Example 1: Finding a service</a>

+

+<li><a class="el" href="example2.html">Code Example 2: Finding a business</a>

+

+<li><a class="el" href="example3.html">Code Example 3: Publishing a WSDL and service on XMethods</a>

+

+<li><a class="el" href="inquiresoap.html">Binding "InquireSoap"</a>

+

+<li><a class="el" href="publishsoap.html">Binding "PublishSoap"</a>

+

+</ul>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/publishsoap.html b/doc/uddi2/html/publishsoap.html
new file mode 100644
index 0000000..7e2e12c
--- /dev/null
+++ b/doc/uddi2/html/publishsoap.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: Binding &quot;PublishSoap&quot;</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h2><a class="anchor" name="PublishSoap_operations">

+Operations of Binding  "PublishSoap"</a></h2>

+<ul>

+<li><a class="el" href="uddi__v2_8h.html#a31">__pub2__add_USCOREpublisherAssertions</a></li><li><a class="el" href="uddi__v2_8h.html#a32">__pub2__delete_USCOREbinding</a></li><li><a class="el" href="uddi__v2_8h.html#a33">__pub2__delete_USCOREbusiness</a></li><li><a class="el" href="uddi__v2_8h.html#a34">__pub2__delete_USCOREpublisherAssertions</a></li><li><a class="el" href="uddi__v2_8h.html#a35">__pub2__delete_USCOREservice</a></li><li><a class="el" href="uddi__v2_8h.html#a36">__pub2__delete_USCOREtModel</a></li><li><a class="el" href="uddi__v2_8h.html#a37">__pub2__discard_USCOREauthToken</a></li><li><a class="el" href="uddi__v2_8h.html#a38">__pub2__get_USCOREassertionStatusReport</a></li><li><a class="el" href="uddi__v2_8h.html#a39">__pub2__get_USCOREauthToken</a></li><li><a class="el" href="uddi__v2_8h.html#a40">__pub2__get_USCOREpublisherAssertions</a></li><li><a class="el" href="uddi__v2_8h.html#a41">__pub2__get_USCOREregisteredInfo</a></li><li><a class="el" href="uddi__v2_8h.html#a42">__pub2__save_USCOREbinding</a></li><li><a class="el" href="uddi__v2_8h.html#a43">__pub2__save_USCOREbusiness</a></li><li><a class="el" href="uddi__v2_8h.html#a44">__pub2__save_USCOREservice</a></li><li><a class="el" href="uddi__v2_8h.html#a45">__pub2__save_USCOREtModel</a></li><li><a class="el" href="uddi__v2_8h.html#a46">__pub2__set_USCOREpublisherAssertions</a></li></ul>

+<h2><a class="anchor" name="PublishSoap_ports">

+Endpoints of Binding  "PublishSoap"</a></h2>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:17:00 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/uddi2/html/tree.html b/doc/uddi2/html/tree.html
new file mode 100644
index 0000000..c7ddae2
--- /dev/null
+++ b/doc/uddi2/html/tree.html
@@ -0,0 +1,218 @@
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

+  <head>

+    <meta http-equiv="Content-Type" content="text/xhtml;charset="iso-8859-1" />

+    <meta http-equiv="Content-Style-Type" content="text/css" />

+    <meta http-equiv="Content-Language" content="en" />

+    <link rel="stylesheet" href="doxygen.css">

+    <title>TreeView</title>

+    <style type="text/css">

+    <!--

+    .directory { font-size: 10pt; font-weight: bold; }

+    .directory h3 { margin: 0px; margin-top: 1em; font-size: 11pt; }

+    .directory p { margin: 0px; white-space: nowrap; }

+    .directory div { display: none; margin: 0px; }

+    .directory img { vertical-align: middle; }

+    -->

+    </style>

+    <script type="text/javascript">

+    <!-- // Hide script from old browsers

+    

+    function findChildNode(node, name) 

+    {

+      var temp;

+      if (node == null) 

+      {

+        return null;

+      } 

+      node = node.firstChild;

+      while (node != null) 

+      {

+        if (node.nodeName == name) 

+        {

+          return node;

+        }

+        temp = findChildNode(node, name);

+        if (temp != null) 

+        {

+          return temp;

+        }

+        node = node.nextSibling;

+      }

+      return null;

+    }

+

+    function toggleFolder(id, imageNode) 

+    {

+      var folder = document.getElementById(id);

+      var l = 0;

+      var vl = "ftv2vertline.png";

+      if (imageNode != null && imageNode.nodeName != "IMG") 

+      {

+        imageNode = findChildNode(imageNode, "IMG");

+        if (imageNode!=null) l = imageNode.src.length;

+      }

+      if (folder == null) 

+      {

+      } 

+      else if (folder.style.display == "block") 

+      {

+        while (imageNode != null && 

+               imageNode.src.substring(l-vl.length,l) == vl)

+        {

+          imageNode = imageNode.nextSibling;

+          l = imageNode.src.length;

+        }

+        if (imageNode != null) 

+        {

+          l = imageNode.src.length;

+          imageNode.nextSibling.src = "ftv2folderclosed.png";

+          if (imageNode.src.substring(l-13,l) == "ftv2mnode.png")

+          {

+            imageNode.src = "ftv2pnode.png";

+          }

+          else if (imageNode.src.substring(l-17,l) == "ftv2mlastnode.png")

+          {

+            imageNode.src = "ftv2plastnode.png";

+          }

+        }

+        folder.style.display = "none";

+      } 

+      else 

+      {

+        while (imageNode != null && 

+               imageNode.src.substring(l-vl.length,l) == vl)

+        {

+          imageNode = imageNode.nextSibling;

+          l = imageNode.src.length;

+        }

+        if (imageNode != null) 

+        {

+          l = imageNode.src.length;

+          imageNode.nextSibling.src = "ftv2folderopen.png";

+          if (imageNode.src.substring(l-13,l) == "ftv2pnode.png")

+          {

+            imageNode.src = "ftv2mnode.png";

+          }

+          else if (imageNode.src.substring(l-17,l) == "ftv2plastnode.png")

+          {

+            imageNode.src = "ftv2mlastnode.png";

+          }

+        }

+        folder.style.display = "block";

+      }

+    }

+

+    // End script hiding -->        

+    </script>

+  </head>

+

+  <body>

+    <div class="directory">

+      <h3>gSOAP UDDI v2</h3>

+      <div style="display: block;">

+        <p><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="main.html" target="basefrm">gSOAP UDDI v2</a></p>

+        <p><img src="ftv2pnode.png" alt="o" width=16 height=22 onclick="toggleFolder('folder1', this)"/><img src="ftv2folderclosed.png" alt="+" width=24 height=22 onclick="toggleFolder('folder1', this)"/><a class="el" href="files.html" target="basefrm">File List</a></p>

+        <div id="folder1">

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2lastnode.png" alt="\" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="uddi__v2_8h.html" target="basefrm">/Users/engelen/Projects/gsoap/doc/uddi2/uddi_v2.h</a></p>

+        </div>

+        <p><img src="ftv2pnode.png" alt="o" width=16 height=22 onclick="toggleFolder('folder2', this)"/><img src="ftv2folderclosed.png" alt="+" width=24 height=22 onclick="toggleFolder('folder2', this)"/><a class="el" href="annotated.html" target="basefrm">Class List</a></p>

+        <div id="folder2">

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="class__disposition_report.html" target="basefrm">_dispositionReport</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____access_point.html" target="basefrm">uddi2__accessPoint</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html" target="basefrm">uddi2__add_USCOREpublisherAssertions</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____address.html" target="basefrm">uddi2__address</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____address_line.html" target="basefrm">uddi2__addressLine</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____assertion_status_item.html" target="basefrm">uddi2__assertionStatusItem</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____assertion_status_report.html" target="basefrm">uddi2__assertionStatusReport</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____auth_token.html" target="basefrm">uddi2__authToken</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____binding_detail.html" target="basefrm">uddi2__bindingDetail</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____binding_template.html" target="basefrm">uddi2__bindingTemplate</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____binding_templates.html" target="basefrm">uddi2__bindingTemplates</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____business_detail.html" target="basefrm">uddi2__businessDetail</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____business_detail_ext.html" target="basefrm">uddi2__businessDetailExt</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____business_entity.html" target="basefrm">uddi2__businessEntity</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____business_entity_ext.html" target="basefrm">uddi2__businessEntityExt</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____business_info.html" target="basefrm">uddi2__businessInfo</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____business_infos.html" target="basefrm">uddi2__businessInfos</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____business_list.html" target="basefrm">uddi2__businessList</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____business_service.html" target="basefrm">uddi2__businessService</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____business_services.html" target="basefrm">uddi2__businessServices</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____category_bag.html" target="basefrm">uddi2__categoryBag</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____contact.html" target="basefrm">uddi2__contact</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____contacts.html" target="basefrm">uddi2__contacts</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html" target="basefrm">uddi2__delete_USCOREbinding</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html" target="basefrm">uddi2__delete_USCOREbusiness</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html" target="basefrm">uddi2__delete_USCOREpublisherAssertions</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html" target="basefrm">uddi2__delete_USCOREservice</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html" target="basefrm">uddi2__delete_USCOREtModel</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____description.html" target="basefrm">uddi2__description</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html" target="basefrm">uddi2__discard_USCOREauthToken</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____discovery_u_r_l.html" target="basefrm">uddi2__discoveryURL</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____discovery_u_r_ls.html" target="basefrm">uddi2__discoveryURLs</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____disposition_report.html" target="basefrm">uddi2__dispositionReport</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____email.html" target="basefrm">uddi2__email</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____err_info.html" target="basefrm">uddi2__errInfo</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html" target="basefrm">uddi2__find_USCOREbinding</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html" target="basefrm">uddi2__find_USCOREbusiness</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html" target="basefrm">uddi2__find_USCORErelatedBusinesses</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html" target="basefrm">uddi2__find_USCOREservice</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html" target="basefrm">uddi2__find_USCOREtModel</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____find_qualifiers.html" target="basefrm">uddi2__findQualifiers</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html" target="basefrm">uddi2__get_USCOREassertionStatusReport</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html" target="basefrm">uddi2__get_USCOREauthToken</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html" target="basefrm">uddi2__get_USCOREbindingDetail</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html" target="basefrm">uddi2__get_USCOREbusinessDetail</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html" target="basefrm">uddi2__get_USCOREbusinessDetailExt</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html" target="basefrm">uddi2__get_USCOREpublisherAssertions</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html" target="basefrm">uddi2__get_USCOREregisteredInfo</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html" target="basefrm">uddi2__get_USCOREserviceDetail</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html" target="basefrm">uddi2__get_USCOREtModelDetail</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____hosting_redirector.html" target="basefrm">uddi2__hostingRedirector</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____identifier_bag.html" target="basefrm">uddi2__identifierBag</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____instance_details.html" target="basefrm">uddi2__instanceDetails</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____keyed_reference.html" target="basefrm">uddi2__keyedReference</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____keys_owned.html" target="basefrm">uddi2__keysOwned</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____name.html" target="basefrm">uddi2__name</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____overview_doc.html" target="basefrm">uddi2__overviewDoc</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____phone.html" target="basefrm">uddi2__phone</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____publisher_assertion.html" target="basefrm">uddi2__publisherAssertion</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____publisher_assertions.html" target="basefrm">uddi2__publisherAssertions</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____registered_info.html" target="basefrm">uddi2__registeredInfo</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____related_businesses_list.html" target="basefrm">uddi2__relatedBusinessesList</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____related_business_info.html" target="basefrm">uddi2__relatedBusinessInfo</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____related_business_infos.html" target="basefrm">uddi2__relatedBusinessInfos</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____result.html" target="basefrm">uddi2__result</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html" target="basefrm">uddi2__save_USCOREbinding</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html" target="basefrm">uddi2__save_USCOREbusiness</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html" target="basefrm">uddi2__save_USCOREservice</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html" target="basefrm">uddi2__save_USCOREtModel</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____service_detail.html" target="basefrm">uddi2__serviceDetail</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____service_info.html" target="basefrm">uddi2__serviceInfo</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____service_infos.html" target="basefrm">uddi2__serviceInfos</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____service_list.html" target="basefrm">uddi2__serviceList</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html" target="basefrm">uddi2__set_USCOREpublisherAssertions</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____shared_relationships.html" target="basefrm">uddi2__sharedRelationships</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____t_model.html" target="basefrm">uddi2__tModel</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____t_model_bag.html" target="basefrm">uddi2__tModelBag</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____t_model_detail.html" target="basefrm">uddi2__tModelDetail</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____t_model_info.html" target="basefrm">uddi2__tModelInfo</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____t_model_infos.html" target="basefrm">uddi2__tModelInfos</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____t_model_instance_details.html" target="basefrm">uddi2__tModelInstanceDetails</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____t_model_instance_info.html" target="basefrm">uddi2__tModelInstanceInfo</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____t_model_list.html" target="basefrm">uddi2__tModelList</a></p>

+          <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2lastnode.png" alt="\" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html" target="basefrm">uddi2__validate_USCOREvalues</a></p>

+        </div>

+        <p><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="functions.html" target="basefrm">Class Members</a></p>

+        <p><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="globals.html" target="basefrm">File Members</a></p>

+        <p><img src="ftv2plastnode.png" alt="\" width=16 height=22 onclick="toggleFolder('folder3', this)"/><img src="ftv2folderclosed.png" alt="+" width=24 height=22 onclick="toggleFolder('folder3', this)"/><a class="el" href="pages.html" target="basefrm">Related Pages</a></p>

+        <div id="folder3">

+          <p><img src="ftv2blank.png" alt="&nbsp;" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="example1.html" target="basefrm">Code Example 1: Finding a service</a></p>

+          <p><img src="ftv2blank.png" alt="&nbsp;" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="example2.html" target="basefrm">Code Example 2: Finding a business</a></p>

+          <p><img src="ftv2blank.png" alt="&nbsp;" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="example3.html" target="basefrm">Code Example 3: Publishing a WSDL and service on XMethods</a></p>

+          <p><img src="ftv2blank.png" alt="&nbsp;" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="inquiresoap.html" target="basefrm">Binding "InquireSoap"</a></p>

+          <p><img src="ftv2blank.png" alt="&nbsp;" width=16 height=22 /><img src="ftv2lastnode.png" alt="\" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="publishsoap.html" target="basefrm">Binding "PublishSoap"</a></p>

+        </div>

+      </div>

+    </div>

+  </body>

+</html>

diff --git a/doc/uddi2/html/uddi__v2_8h.html b/doc/uddi2/html/uddi__v2_8h.html
new file mode 100644
index 0000000..7e9ab13
--- /dev/null
+++ b/doc/uddi2/html/uddi__v2_8h.html
@@ -0,0 +1,2178 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP UDDI v2: /Users/engelen/Projects/gsoap/doc/uddi2/uddi_v2.h File Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>/Users/engelen/Projects/gsoap/doc/uddi2/uddi_v2.h File Reference</h1><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Classes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____address.html">uddi2__address</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"address".  <a href="classuddi2____address.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____assertion_status_item.html">uddi2__assertionStatusItem</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"assertionStatusItem".  <a href="classuddi2____assertion_status_item.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____binding_template.html">uddi2__bindingTemplate</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"bindingTemplate".  <a href="classuddi2____binding_template.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____binding_templates.html">uddi2__bindingTemplates</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"bindingTemplates".  <a href="classuddi2____binding_templates.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_entity.html">uddi2__businessEntity</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"businessEntity".  <a href="classuddi2____business_entity.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_entity_ext.html">uddi2__businessEntityExt</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"businessEntityExt".  <a href="classuddi2____business_entity_ext.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_info.html">uddi2__businessInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"businessInfo".  <a href="classuddi2____business_info.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_infos.html">uddi2__businessInfos</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"businessInfos".  <a href="classuddi2____business_infos.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_service.html">uddi2__businessService</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"businessService".  <a href="classuddi2____business_service.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_services.html">uddi2__businessServices</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"businessServices".  <a href="classuddi2____business_services.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____category_bag.html">uddi2__categoryBag</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"categoryBag".  <a href="classuddi2____category_bag.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____contact.html">uddi2__contact</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"contact".  <a href="classuddi2____contact.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____contacts.html">uddi2__contacts</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"contacts".  <a href="classuddi2____contacts.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____discovery_u_r_ls.html">uddi2__discoveryURLs</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"discoveryURLs".  <a href="classuddi2____discovery_u_r_ls.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"dispositionReport".  <a href="classuddi2____disposition_report.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find_qualifiers.html">uddi2__findQualifiers</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"findQualifiers".  <a href="classuddi2____find_qualifiers.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____hosting_redirector.html">uddi2__hostingRedirector</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"hostingRedirector".  <a href="classuddi2____hosting_redirector.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____identifier_bag.html">uddi2__identifierBag</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"identifierBag".  <a href="classuddi2____identifier_bag.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____instance_details.html">uddi2__instanceDetails</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"instanceDetails".  <a href="classuddi2____instance_details.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____keyed_reference.html">uddi2__keyedReference</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"keyedReference".  <a href="classuddi2____keyed_reference.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____keys_owned.html">uddi2__keysOwned</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"keysOwned".  <a href="classuddi2____keys_owned.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____overview_doc.html">uddi2__overviewDoc</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"overviewDoc".  <a href="classuddi2____overview_doc.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____publisher_assertion.html">uddi2__publisherAssertion</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"publisherAssertion".  <a href="classuddi2____publisher_assertion.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____related_business_info.html">uddi2__relatedBusinessInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"relatedBusinessInfo".  <a href="classuddi2____related_business_info.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____related_business_infos.html">uddi2__relatedBusinessInfos</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"relatedBusinessInfos".  <a href="classuddi2____related_business_infos.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____result.html">uddi2__result</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"result".  <a href="classuddi2____result.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____service_info.html">uddi2__serviceInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"serviceInfo".  <a href="classuddi2____service_info.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____service_infos.html">uddi2__serviceInfos</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"serviceInfos".  <a href="classuddi2____service_infos.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____shared_relationships.html">uddi2__sharedRelationships</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"sharedRelationships".  <a href="classuddi2____shared_relationships.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model.html">uddi2__tModel</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"tModel".  <a href="classuddi2____t_model.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_bag.html">uddi2__tModelBag</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"tModelBag".  <a href="classuddi2____t_model_bag.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_info.html">uddi2__tModelInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"tModelInfo".  <a href="classuddi2____t_model_info.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_infos.html">uddi2__tModelInfos</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"tModelInfos".  <a href="classuddi2____t_model_infos.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_instance_details.html">uddi2__tModelInstanceDetails</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"tModelInstanceDetails".  <a href="classuddi2____t_model_instance_details.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_instance_info.html">uddi2__tModelInstanceInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"tModelInstanceInfo".  <a href="classuddi2____t_model_instance_info.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html">uddi2__add_USCOREpublisherAssertions</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"add_publisherAssertions".  <a href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html">uddi2__delete_USCOREbinding</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"delete_binding".  <a href="classuddi2____delete___u_s_c_o_r_ebinding.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html">uddi2__delete_USCOREbusiness</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"delete_business".  <a href="classuddi2____delete___u_s_c_o_r_ebusiness.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html">uddi2__delete_USCOREpublisherAssertions</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"delete_publisherAssertions".  <a href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html">uddi2__delete_USCOREservice</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"delete_service".  <a href="classuddi2____delete___u_s_c_o_r_eservice.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html">uddi2__delete_USCOREtModel</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"delete_tModel".  <a href="classuddi2____delete___u_s_c_o_r_et_model.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html">uddi2__discard_USCOREauthToken</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"discard_authToken".  <a href="classuddi2____discard___u_s_c_o_r_eauth_token.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html">uddi2__find_USCOREbinding</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"find_binding".  <a href="classuddi2____find___u_s_c_o_r_ebinding.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html">uddi2__find_USCOREbusiness</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"find_business".  <a href="classuddi2____find___u_s_c_o_r_ebusiness.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html">uddi2__find_USCORErelatedBusinesses</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"find_relatedBusinesses".  <a href="classuddi2____find___u_s_c_o_r_erelated_businesses.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html">uddi2__find_USCOREservice</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"find_service".  <a href="classuddi2____find___u_s_c_o_r_eservice.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html">uddi2__find_USCOREtModel</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"find_tModel".  <a href="classuddi2____find___u_s_c_o_r_et_model.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html">uddi2__get_USCOREassertionStatusReport</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"get_assertionStatusReport".  <a href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html">uddi2__get_USCOREauthToken</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"get_authToken".  <a href="classuddi2____get___u_s_c_o_r_eauth_token.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html">uddi2__get_USCOREbindingDetail</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"get_bindingDetail".  <a href="classuddi2____get___u_s_c_o_r_ebinding_detail.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html">uddi2__get_USCOREbusinessDetail</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"get_businessDetail".  <a href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html">uddi2__get_USCOREbusinessDetailExt</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"get_businessDetailExt".  <a href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html">uddi2__get_USCOREpublisherAssertions</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"get_publisherAssertions".  <a href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html">uddi2__get_USCOREregisteredInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"get_registeredInfo".  <a href="classuddi2____get___u_s_c_o_r_eregistered_info.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html">uddi2__get_USCOREserviceDetail</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"get_serviceDetail".  <a href="classuddi2____get___u_s_c_o_r_eservice_detail.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html">uddi2__get_USCOREtModelDetail</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"get_tModelDetail".  <a href="classuddi2____get___u_s_c_o_r_et_model_detail.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html">uddi2__save_USCOREbinding</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"save_binding".  <a href="classuddi2____save___u_s_c_o_r_ebinding.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html">uddi2__save_USCOREbusiness</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"save_business".  <a href="classuddi2____save___u_s_c_o_r_ebusiness.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html">uddi2__save_USCOREservice</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"save_service".  <a href="classuddi2____save___u_s_c_o_r_eservice.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html">uddi2__save_USCOREtModel</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"save_tModel".  <a href="classuddi2____save___u_s_c_o_r_et_model.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html">uddi2__set_USCOREpublisherAssertions</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"set_publisherAssertions".  <a href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____validate___u_s_c_o_r_evalues.html">uddi2__validate_USCOREvalues</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"validate_values".  <a href="classuddi2____validate___u_s_c_o_r_evalues.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____assertion_status_report.html">uddi2__assertionStatusReport</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"assertionStatusReport".  <a href="classuddi2____assertion_status_report.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____auth_token.html">uddi2__authToken</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"authToken".  <a href="classuddi2____auth_token.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"bindingDetail".  <a href="classuddi2____binding_detail.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_detail.html">uddi2__businessDetail</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"businessDetail".  <a href="classuddi2____business_detail.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_detail_ext.html">uddi2__businessDetailExt</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"businessDetailExt".  <a href="classuddi2____business_detail_ext.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____business_list.html">uddi2__businessList</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"businessList".  <a href="classuddi2____business_list.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____publisher_assertions.html">uddi2__publisherAssertions</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"publisherAssertions".  <a href="classuddi2____publisher_assertions.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____registered_info.html">uddi2__registeredInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"registeredInfo".  <a href="classuddi2____registered_info.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____related_businesses_list.html">uddi2__relatedBusinessesList</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"relatedBusinessesList".  <a href="classuddi2____related_businesses_list.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____service_detail.html">uddi2__serviceDetail</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"serviceDetail".  <a href="classuddi2____service_detail.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____service_list.html">uddi2__serviceList</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"serviceList".  <a href="classuddi2____service_list.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_detail.html">uddi2__tModelDetail</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"tModelDetail".  <a href="classuddi2____t_model_detail.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____t_model_list.html">uddi2__tModelList</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"tModelList".  <a href="classuddi2____t_model_list.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____access_point.html">uddi2__accessPoint</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"accessPoint".  <a href="classuddi2____access_point.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____address_line.html">uddi2__addressLine</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"addressLine".  <a href="classuddi2____address_line.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____description.html">uddi2__description</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"description".  <a href="classuddi2____description.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____discovery_u_r_l.html">uddi2__discoveryURL</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"discoveryURL".  <a href="classuddi2____discovery_u_r_l.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____email.html">uddi2__email</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"email".  <a href="classuddi2____email.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____err_info.html">uddi2__errInfo</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"errInfo".  <a href="classuddi2____err_info.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____name.html">uddi2__name</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"name".  <a href="classuddi2____name.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classuddi2____phone.html">uddi2__phone</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema urn:uddi-org:api_v2:"phone".  <a href="classuddi2____phone.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class__disposition_report.html">_dispositionReport</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The SOAP Fault Detail element contains one of the following types serialized.  <a href="class__disposition_report.html#_details">More...</a><br></td></tr>

+<tr><td colspan=2><br><h2>Typedefs</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a0">xsd__NMTOKEN</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Primitive built-in type "xs:NMTOKEN".  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a1">xml__lang</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Built-in attribute "xml:lang".  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a2">uddi2__bindingKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema "urn:uddi-org:api_v2":bindingKey simpleType restriction of xs:string.  <a href="#a2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema "urn:uddi-org:api_v2":businessKey simpleType restriction of xs:string.  <a href="#a3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a4">uddi2__serviceKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema "urn:uddi-org:api_v2":serviceKey simpleType restriction of xs:string.  <a href="#a4"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a5">uddi2__tModelKey</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema "urn:uddi-org:api_v2":tModelKey simpleType restriction of xs:string.  <a href="#a5"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Enumerations</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a47">uddi2__direction</a> { <a class="el" href="uddi__v2_8h.html#a47a6">uddi2__direction__fromKey</a>, 

+<a class="el" href="uddi__v2_8h.html#a47a7">uddi2__direction__toKey</a>

+ }</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema "urn:uddi-org:api_v2":direction simpleType restriction of xs:NMTOKEN Note: enum values are prefixed with 'uddi2__direction' to avoid name clashes, please use wsdl2h option -e to omit this prefix.  <a href="#a47">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a48">uddi2__truncated</a> { <a class="el" href="uddi__v2_8h.html#a48a8">uddi2__truncated__true_</a>, 

+<a class="el" href="uddi__v2_8h.html#a48a9">uddi2__truncated__false_</a>

+ }</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema "urn:uddi-org:api_v2":truncated simpleType restriction of xs:NMTOKEN Note: enum values are prefixed with 'uddi2__truncated' to avoid name clashes, please use wsdl2h option -e to omit this prefix.  <a href="#a48">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a49">uddi2__URLType</a> { <br>

+&nbsp;&nbsp;<a class="el" href="uddi__v2_8h.html#a49a10">uddi2__URLType__mailto</a>, 

+<a class="el" href="uddi__v2_8h.html#a49a11">uddi2__URLType__http</a>, 

+<a class="el" href="uddi__v2_8h.html#a49a12">uddi2__URLType__https</a>, 

+<a class="el" href="uddi__v2_8h.html#a49a13">uddi2__URLType__ftp</a>, 

+<br>

+&nbsp;&nbsp;<a class="el" href="uddi__v2_8h.html#a49a14">uddi2__URLType__fax</a>, 

+<a class="el" href="uddi__v2_8h.html#a49a15">uddi2__URLType__phone</a>, 

+<a class="el" href="uddi__v2_8h.html#a49a16">uddi2__URLType__other</a>

+<br>

+ }</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema "urn:uddi-org:api_v2":URLType simpleType restriction of xs:NMTOKEN Note: enum values are prefixed with 'uddi2__URLType' to avoid name clashes, please use wsdl2h option -e to omit this prefix.  <a href="#a49">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a50">uddi2__keyType</a> { <a class="el" href="uddi__v2_8h.html#a50a17">uddi2__keyType__businessKey</a>, 

+<a class="el" href="uddi__v2_8h.html#a50a18">uddi2__keyType__tModelKey</a>, 

+<a class="el" href="uddi__v2_8h.html#a50a19">uddi2__keyType__serviceKey</a>, 

+<a class="el" href="uddi__v2_8h.html#a50a20">uddi2__keyType__bindingKey</a>

+ }</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schema "urn:uddi-org:api_v2":keyType simpleType restriction of xs:NMTOKEN Note: enum values are prefixed with 'uddi2__keyType' to avoid name clashes, please use wsdl2h option -e to omit this prefix.  <a href="#a50">More...</a><br></td></tr>

+<tr><td colspan=2><br><h2>Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a21">__inq2__find_USCOREbinding</a> (<a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html">uddi2__find_USCOREbinding</a> *uddi2__find_USCOREbinding_, <a class="el" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a> *uddi2__bindingDetail_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__inq2__find_USCOREbinding" of service binding "InquireSoap".  <a href="#a21"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a22">__inq2__find_USCOREbusiness</a> (<a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html">uddi2__find_USCOREbusiness</a> *uddi2__find_USCOREbusiness_, <a class="el" href="classuddi2____business_list.html">uddi2__businessList</a> *uddi2__businessList_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__inq2__find_USCOREbusiness" of service binding "InquireSoap".  <a href="#a22"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a23">__inq2__find_USCORErelatedBusinesses</a> (<a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html">uddi2__find_USCORErelatedBusinesses</a> *uddi2__find_USCORErelatedBusinesses_, <a class="el" href="classuddi2____related_businesses_list.html">uddi2__relatedBusinessesList</a> *uddi2__relatedBusinessesList_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__inq2__find_USCORErelatedBusinesses" of service binding "InquireSoap".  <a href="#a23"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a24">__inq2__find_USCOREservice</a> (<a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html">uddi2__find_USCOREservice</a> *uddi2__find_USCOREservice_, <a class="el" href="classuddi2____service_list.html">uddi2__serviceList</a> *uddi2__serviceList_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__inq2__find_USCOREservice" of service binding "InquireSoap".  <a href="#a24"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a25">__inq2__find_USCOREtModel</a> (<a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html">uddi2__find_USCOREtModel</a> *uddi2__find_USCOREtModel_, <a class="el" href="classuddi2____t_model_list.html">uddi2__tModelList</a> *uddi2__tModelList_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__inq2__find_USCOREtModel" of service binding "InquireSoap".  <a href="#a25"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a26">__inq2__get_USCOREbindingDetail</a> (<a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html">uddi2__get_USCOREbindingDetail</a> *uddi2__get_USCOREbindingDetail_, <a class="el" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a> *uddi2__bindingDetail_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__inq2__get_USCOREbindingDetail" of service binding "InquireSoap".  <a href="#a26"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a27">__inq2__get_USCOREbusinessDetail</a> (<a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html">uddi2__get_USCOREbusinessDetail</a> *uddi2__get_USCOREbusinessDetail_, <a class="el" href="classuddi2____business_detail.html">uddi2__businessDetail</a> *uddi2__businessDetail_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__inq2__get_USCOREbusinessDetail" of service binding "InquireSoap".  <a href="#a27"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a28">__inq2__get_USCOREbusinessDetailExt</a> (<a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html">uddi2__get_USCOREbusinessDetailExt</a> *uddi2__get_USCOREbusinessDetailExt_, <a class="el" href="classuddi2____business_detail_ext.html">uddi2__businessDetailExt</a> *uddi2__businessDetailExt_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__inq2__get_USCOREbusinessDetailExt" of service binding "InquireSoap".  <a href="#a28"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a29">__inq2__get_USCOREserviceDetail</a> (<a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html">uddi2__get_USCOREserviceDetail</a> *uddi2__get_USCOREserviceDetail_, <a class="el" href="classuddi2____service_detail.html">uddi2__serviceDetail</a> *uddi2__serviceDetail_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__inq2__get_USCOREserviceDetail" of service binding "InquireSoap".  <a href="#a29"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a30">__inq2__get_USCOREtModelDetail</a> (<a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html">uddi2__get_USCOREtModelDetail</a> *uddi2__get_USCOREtModelDetail_, <a class="el" href="classuddi2____t_model_detail.html">uddi2__tModelDetail</a> *uddi2__tModelDetail_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__inq2__get_USCOREtModelDetail" of service binding "InquireSoap".  <a href="#a30"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a31">__pub2__add_USCOREpublisherAssertions</a> (<a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html">uddi2__add_USCOREpublisherAssertions</a> *uddi2__add_USCOREpublisherAssertions_, <a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> *uddi2__dispositionReport_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__pub2__add_USCOREpublisherAssertions" of service binding "PublishSoap".  <a href="#a31"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a32">__pub2__delete_USCOREbinding</a> (<a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html">uddi2__delete_USCOREbinding</a> *uddi2__delete_USCOREbinding_, <a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> *uddi2__dispositionReport_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__pub2__delete_USCOREbinding" of service binding "PublishSoap".  <a href="#a32"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a33">__pub2__delete_USCOREbusiness</a> (<a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html">uddi2__delete_USCOREbusiness</a> *uddi2__delete_USCOREbusiness_, <a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> *uddi2__dispositionReport_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__pub2__delete_USCOREbusiness" of service binding "PublishSoap".  <a href="#a33"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a34">__pub2__delete_USCOREpublisherAssertions</a> (<a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html">uddi2__delete_USCOREpublisherAssertions</a> *uddi2__delete_USCOREpublisherAssertions_, <a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> *uddi2__dispositionReport_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__pub2__delete_USCOREpublisherAssertions" of service binding "PublishSoap".  <a href="#a34"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a35">__pub2__delete_USCOREservice</a> (<a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html">uddi2__delete_USCOREservice</a> *uddi2__delete_USCOREservice_, <a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> *uddi2__dispositionReport_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__pub2__delete_USCOREservice" of service binding "PublishSoap".  <a href="#a35"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a36">__pub2__delete_USCOREtModel</a> (<a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html">uddi2__delete_USCOREtModel</a> *uddi2__delete_USCOREtModel_, <a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> *uddi2__dispositionReport_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__pub2__delete_USCOREtModel" of service binding "PublishSoap".  <a href="#a36"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a37">__pub2__discard_USCOREauthToken</a> (<a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html">uddi2__discard_USCOREauthToken</a> *uddi2__discard_USCOREauthToken_, <a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> *uddi2__dispositionReport_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__pub2__discard_USCOREauthToken" of service binding "PublishSoap".  <a href="#a37"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a38">__pub2__get_USCOREassertionStatusReport</a> (<a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html">uddi2__get_USCOREassertionStatusReport</a> *uddi2__get_USCOREassertionStatusReport_, <a class="el" href="classuddi2____assertion_status_report.html">uddi2__assertionStatusReport</a> *uddi2__assertionStatusReport_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__pub2__get_USCOREassertionStatusReport" of service binding "PublishSoap".  <a href="#a38"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a39">__pub2__get_USCOREauthToken</a> (<a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html">uddi2__get_USCOREauthToken</a> *uddi2__get_USCOREauthToken_, <a class="el" href="classuddi2____auth_token.html">uddi2__authToken</a> *uddi2__authToken_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__pub2__get_USCOREauthToken" of service binding "PublishSoap".  <a href="#a39"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a40">__pub2__get_USCOREpublisherAssertions</a> (<a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html">uddi2__get_USCOREpublisherAssertions</a> *uddi2__get_USCOREpublisherAssertions_, <a class="el" href="classuddi2____publisher_assertions.html">uddi2__publisherAssertions</a> *uddi2__publisherAssertions_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__pub2__get_USCOREpublisherAssertions" of service binding "PublishSoap".  <a href="#a40"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a41">__pub2__get_USCOREregisteredInfo</a> (<a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html">uddi2__get_USCOREregisteredInfo</a> *uddi2__get_USCOREregisteredInfo_, <a class="el" href="classuddi2____registered_info.html">uddi2__registeredInfo</a> *uddi2__registeredInfo_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__pub2__get_USCOREregisteredInfo" of service binding "PublishSoap".  <a href="#a41"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a42">__pub2__save_USCOREbinding</a> (<a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html">uddi2__save_USCOREbinding</a> *uddi2__save_USCOREbinding_, <a class="el" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a> *uddi2__bindingDetail_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__pub2__save_USCOREbinding" of service binding "PublishSoap".  <a href="#a42"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a43">__pub2__save_USCOREbusiness</a> (<a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html">uddi2__save_USCOREbusiness</a> *uddi2__save_USCOREbusiness_, <a class="el" href="classuddi2____business_detail.html">uddi2__businessDetail</a> *uddi2__businessDetail_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__pub2__save_USCOREbusiness" of service binding "PublishSoap".  <a href="#a43"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a44">__pub2__save_USCOREservice</a> (<a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html">uddi2__save_USCOREservice</a> *uddi2__save_USCOREservice_, <a class="el" href="classuddi2____service_detail.html">uddi2__serviceDetail</a> *uddi2__serviceDetail_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__pub2__save_USCOREservice" of service binding "PublishSoap".  <a href="#a44"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a45">__pub2__save_USCOREtModel</a> (<a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html">uddi2__save_USCOREtModel</a> *uddi2__save_USCOREtModel_, <a class="el" href="classuddi2____t_model_detail.html">uddi2__tModelDetail</a> *uddi2__tModelDetail_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__pub2__save_USCOREtModel" of service binding "PublishSoap".  <a href="#a45"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="uddi__v2_8h.html#a46">__pub2__set_USCOREpublisherAssertions</a> (<a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html">uddi2__set_USCOREpublisherAssertions</a> *uddi2__set_USCOREpublisherAssertions_, <a class="el" href="classuddi2____publisher_assertions.html">uddi2__publisherAssertions</a> *uddi2__publisherAssertions_)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Operation "__pub2__set_USCOREpublisherAssertions" of service binding "PublishSoap".  <a href="#a46"></a><br></td></tr>

+</table>

+<hr><h2>Typedef Documentation</h2>

+<a class="anchor" name="a2" doxytag="uddi_v2.h::uddi2__bindingKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef char* <a class="el" href="uddi__v2_8h.html#a2">uddi2__bindingKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Schema "urn:uddi-org:api_v2":bindingKey simpleType restriction of xs:string. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a3" doxytag="uddi_v2.h::uddi2__businessKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef char* <a class="el" href="uddi__v2_8h.html#a3">uddi2__businessKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Schema "urn:uddi-org:api_v2":businessKey simpleType restriction of xs:string. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a4" doxytag="uddi_v2.h::uddi2__serviceKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef char* <a class="el" href="uddi__v2_8h.html#a4">uddi2__serviceKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Schema "urn:uddi-org:api_v2":serviceKey simpleType restriction of xs:string. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a5" doxytag="uddi_v2.h::uddi2__tModelKey" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef char* <a class="el" href="uddi__v2_8h.html#a5">uddi2__tModelKey</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Schema "urn:uddi-org:api_v2":tModelKey simpleType restriction of xs:string. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="uddi_v2.h::xml__lang" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef char* <a class="el" href="uddi__v2_8h.html#a1">xml__lang</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Built-in attribute "xml:lang". 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a0" doxytag="uddi_v2.h::xsd__NMTOKEN" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef char* <a class="el" href="uddi__v2_8h.html#a0">xsd__NMTOKEN</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Primitive built-in type "xs:NMTOKEN". 

+<p>

+    </td>

+  </tr>

+</table>

+<hr><h2>Enumeration Type Documentation</h2>

+<a class="anchor" name="a47" doxytag="uddi_v2.h::uddi2__direction" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> enum <a class="el" href="uddi__v2_8h.html#a47">uddi2__direction</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Schema "urn:uddi-org:api_v2":direction simpleType restriction of xs:NMTOKEN Note: enum values are prefixed with 'uddi2__direction' to avoid name clashes, please use wsdl2h option -e to omit this prefix. 

+<p>

+<dl compact><dt><b>Enumeration values: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em><a class="anchor" name="a47a6" doxytag="uddi2__direction__fromKey" ></a>uddi2__direction__fromKey</em>&nbsp;</td><td>

+xs:NMTOKEN value="fromKey" </td></tr>

+<tr><td valign=top><em><a class="anchor" name="a47a7" doxytag="uddi2__direction__toKey" ></a>uddi2__direction__toKey</em>&nbsp;</td><td>

+xs:NMTOKEN value="toKey" </td></tr>

+</table>

+</dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a50" doxytag="uddi_v2.h::uddi2__keyType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> enum <a class="el" href="uddi__v2_8h.html#a50">uddi2__keyType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Schema "urn:uddi-org:api_v2":keyType simpleType restriction of xs:NMTOKEN Note: enum values are prefixed with 'uddi2__keyType' to avoid name clashes, please use wsdl2h option -e to omit this prefix. 

+<p>

+<dl compact><dt><b>Enumeration values: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em><a class="anchor" name="a50a17" doxytag="uddi2__keyType__businessKey" ></a>uddi2__keyType__businessKey</em>&nbsp;</td><td>

+xs:NMTOKEN value="businessKey" </td></tr>

+<tr><td valign=top><em><a class="anchor" name="a50a18" doxytag="uddi2__keyType__tModelKey" ></a>uddi2__keyType__tModelKey</em>&nbsp;</td><td>

+xs:NMTOKEN value="tModelKey" </td></tr>

+<tr><td valign=top><em><a class="anchor" name="a50a19" doxytag="uddi2__keyType__serviceKey" ></a>uddi2__keyType__serviceKey</em>&nbsp;</td><td>

+xs:NMTOKEN value="serviceKey" </td></tr>

+<tr><td valign=top><em><a class="anchor" name="a50a20" doxytag="uddi2__keyType__bindingKey" ></a>uddi2__keyType__bindingKey</em>&nbsp;</td><td>

+xs:NMTOKEN value="bindingKey" </td></tr>

+</table>

+</dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a48" doxytag="uddi_v2.h::uddi2__truncated" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> enum <a class="el" href="uddi__v2_8h.html#a48">uddi2__truncated</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Schema "urn:uddi-org:api_v2":truncated simpleType restriction of xs:NMTOKEN Note: enum values are prefixed with 'uddi2__truncated' to avoid name clashes, please use wsdl2h option -e to omit this prefix. 

+<p>

+<dl compact><dt><b>Enumeration values: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em><a class="anchor" name="a48a8" doxytag="uddi2__truncated__true_" ></a>uddi2__truncated__true_</em>&nbsp;</td><td>

+xs:NMTOKEN value="true" </td></tr>

+<tr><td valign=top><em><a class="anchor" name="a48a9" doxytag="uddi2__truncated__false_" ></a>uddi2__truncated__false_</em>&nbsp;</td><td>

+xs:NMTOKEN value="false" </td></tr>

+</table>

+</dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a49" doxytag="uddi_v2.h::uddi2__URLType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> enum <a class="el" href="uddi__v2_8h.html#a49">uddi2__URLType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Schema "urn:uddi-org:api_v2":URLType simpleType restriction of xs:NMTOKEN Note: enum values are prefixed with 'uddi2__URLType' to avoid name clashes, please use wsdl2h option -e to omit this prefix. 

+<p>

+<dl compact><dt><b>Enumeration values: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em><a class="anchor" name="a49a10" doxytag="uddi2__URLType__mailto" ></a>uddi2__URLType__mailto</em>&nbsp;</td><td>

+xs:NMTOKEN value="mailto" </td></tr>

+<tr><td valign=top><em><a class="anchor" name="a49a11" doxytag="uddi2__URLType__http" ></a>uddi2__URLType__http</em>&nbsp;</td><td>

+xs:NMTOKEN value="http" </td></tr>

+<tr><td valign=top><em><a class="anchor" name="a49a12" doxytag="uddi2__URLType__https" ></a>uddi2__URLType__https</em>&nbsp;</td><td>

+xs:NMTOKEN value="https" </td></tr>

+<tr><td valign=top><em><a class="anchor" name="a49a13" doxytag="uddi2__URLType__ftp" ></a>uddi2__URLType__ftp</em>&nbsp;</td><td>

+xs:NMTOKEN value="ftp" </td></tr>

+<tr><td valign=top><em><a class="anchor" name="a49a14" doxytag="uddi2__URLType__fax" ></a>uddi2__URLType__fax</em>&nbsp;</td><td>

+xs:NMTOKEN value="fax" </td></tr>

+<tr><td valign=top><em><a class="anchor" name="a49a15" doxytag="uddi2__URLType__phone" ></a>uddi2__URLType__phone</em>&nbsp;</td><td>

+xs:NMTOKEN value="phone" </td></tr>

+<tr><td valign=top><em><a class="anchor" name="a49a16" doxytag="uddi2__URLType__other" ></a>uddi2__URLType__other</em>&nbsp;</td><td>

+xs:NMTOKEN value="other" </td></tr>

+</table>

+</dl>

+    </td>

+  </tr>

+</table>

+<hr><h2>Function Documentation</h2>

+<a class="anchor" name="a21" doxytag="uddi_v2.h::__inq2__find_USCOREbinding" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __inq2__find_USCOREbinding           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____find___u_s_c_o_r_ebinding.html">uddi2__find_USCOREbinding</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__find_USCOREbinding_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__bindingDetail_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__inq2__find_USCOREbinding" of service binding "InquireSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="find_binding"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___inq2__find_USCOREbinding(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____find___u_s_c_o_r_ebinding.html">uddi2__find_USCOREbinding</a>*          uddi2__find_USCOREbinding_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a>*               uddi2__bindingDetail_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapInquireSoapProxy.h): class InquireSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__bindingDetail_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a22" doxytag="uddi_v2.h::__inq2__find_USCOREbusiness" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __inq2__find_USCOREbusiness           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____find___u_s_c_o_r_ebusiness.html">uddi2__find_USCOREbusiness</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__find_USCOREbusiness_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____business_list.html">uddi2__businessList</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__businessList_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__inq2__find_USCOREbusiness" of service binding "InquireSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="find_business"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___inq2__find_USCOREbusiness(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____find___u_s_c_o_r_ebusiness.html">uddi2__find_USCOREbusiness</a>*         uddi2__find_USCOREbusiness_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____business_list.html">uddi2__businessList</a>*                uddi2__businessList_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapInquireSoapProxy.h): class InquireSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__businessList_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a23" doxytag="uddi_v2.h::__inq2__find_USCORErelatedBusinesses" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __inq2__find_USCORErelatedBusinesses           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html">uddi2__find_USCORErelatedBusinesses</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__find_USCORErelatedBusinesses_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____related_businesses_list.html">uddi2__relatedBusinessesList</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__relatedBusinessesList_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__inq2__find_USCORErelatedBusinesses" of service binding "InquireSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="find_relatedBusinesses"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___inq2__find_USCORErelatedBusinesses(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____find___u_s_c_o_r_erelated_businesses.html">uddi2__find_USCORErelatedBusinesses</a>* uddi2__find_USCORErelatedBusinesses_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____related_businesses_list.html">uddi2__relatedBusinessesList</a>*       uddi2__relatedBusinessesList_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapInquireSoapProxy.h): class InquireSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__relatedBusinessesList_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a24" doxytag="uddi_v2.h::__inq2__find_USCOREservice" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __inq2__find_USCOREservice           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____find___u_s_c_o_r_eservice.html">uddi2__find_USCOREservice</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__find_USCOREservice_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____service_list.html">uddi2__serviceList</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__serviceList_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__inq2__find_USCOREservice" of service binding "InquireSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="find_service"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___inq2__find_USCOREservice(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____find___u_s_c_o_r_eservice.html">uddi2__find_USCOREservice</a>*          uddi2__find_USCOREservice_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____service_list.html">uddi2__serviceList</a>*                 uddi2__serviceList_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapInquireSoapProxy.h): class InquireSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__serviceList_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a25" doxytag="uddi_v2.h::__inq2__find_USCOREtModel" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __inq2__find_USCOREtModel           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____find___u_s_c_o_r_et_model.html">uddi2__find_USCOREtModel</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__find_USCOREtModel_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____t_model_list.html">uddi2__tModelList</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__tModelList_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__inq2__find_USCOREtModel" of service binding "InquireSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="find_tModel"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___inq2__find_USCOREtModel(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____find___u_s_c_o_r_et_model.html">uddi2__find_USCOREtModel</a>*           uddi2__find_USCOREtModel_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____t_model_list.html">uddi2__tModelList</a>*                  uddi2__tModelList_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapInquireSoapProxy.h): class InquireSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__tModelList_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a26" doxytag="uddi_v2.h::__inq2__get_USCOREbindingDetail" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __inq2__get_USCOREbindingDetail           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html">uddi2__get_USCOREbindingDetail</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__get_USCOREbindingDetail_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__bindingDetail_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__inq2__get_USCOREbindingDetail" of service binding "InquireSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="get_bindingDetail"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___inq2__get_USCOREbindingDetail(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____get___u_s_c_o_r_ebinding_detail.html">uddi2__get_USCOREbindingDetail</a>*     uddi2__get_USCOREbindingDetail_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a>*               uddi2__bindingDetail_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapInquireSoapProxy.h): class InquireSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__bindingDetail_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a27" doxytag="uddi_v2.h::__inq2__get_USCOREbusinessDetail" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __inq2__get_USCOREbusinessDetail           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html">uddi2__get_USCOREbusinessDetail</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__get_USCOREbusinessDetail_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____business_detail.html">uddi2__businessDetail</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__businessDetail_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__inq2__get_USCOREbusinessDetail" of service binding "InquireSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="get_businessDetail"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___inq2__get_USCOREbusinessDetail(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____get___u_s_c_o_r_ebusiness_detail.html">uddi2__get_USCOREbusinessDetail</a>*    uddi2__get_USCOREbusinessDetail_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____business_detail.html">uddi2__businessDetail</a>*              uddi2__businessDetail_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapInquireSoapProxy.h): class InquireSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__businessDetail_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a28" doxytag="uddi_v2.h::__inq2__get_USCOREbusinessDetailExt" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __inq2__get_USCOREbusinessDetailExt           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html">uddi2__get_USCOREbusinessDetailExt</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__get_USCOREbusinessDetailExt_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____business_detail_ext.html">uddi2__businessDetailExt</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__businessDetailExt_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__inq2__get_USCOREbusinessDetailExt" of service binding "InquireSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="get_businessDetailExt"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___inq2__get_USCOREbusinessDetailExt(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____get___u_s_c_o_r_ebusiness_detail_ext.html">uddi2__get_USCOREbusinessDetailExt</a>* uddi2__get_USCOREbusinessDetailExt_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____business_detail_ext.html">uddi2__businessDetailExt</a>*           uddi2__businessDetailExt_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapInquireSoapProxy.h): class InquireSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__businessDetailExt_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a29" doxytag="uddi_v2.h::__inq2__get_USCOREserviceDetail" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __inq2__get_USCOREserviceDetail           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____get___u_s_c_o_r_eservice_detail.html">uddi2__get_USCOREserviceDetail</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__get_USCOREserviceDetail_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____service_detail.html">uddi2__serviceDetail</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__serviceDetail_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__inq2__get_USCOREserviceDetail" of service binding "InquireSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="get_serviceDetail"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___inq2__get_USCOREserviceDetail(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____get___u_s_c_o_r_eservice_detail.html">uddi2__get_USCOREserviceDetail</a>*     uddi2__get_USCOREserviceDetail_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____service_detail.html">uddi2__serviceDetail</a>*               uddi2__serviceDetail_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapInquireSoapProxy.h): class InquireSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__serviceDetail_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a30" doxytag="uddi_v2.h::__inq2__get_USCOREtModelDetail" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __inq2__get_USCOREtModelDetail           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____get___u_s_c_o_r_et_model_detail.html">uddi2__get_USCOREtModelDetail</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__get_USCOREtModelDetail_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____t_model_detail.html">uddi2__tModelDetail</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__tModelDetail_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__inq2__get_USCOREtModelDetail" of service binding "InquireSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="get_tModelDetail"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___inq2__get_USCOREtModelDetail(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____get___u_s_c_o_r_et_model_detail.html">uddi2__get_USCOREtModelDetail</a>*      uddi2__get_USCOREtModelDetail_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____t_model_detail.html">uddi2__tModelDetail</a>*                uddi2__tModelDetail_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapInquireSoapProxy.h): class InquireSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__tModelDetail_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a31" doxytag="uddi_v2.h::__pub2__add_USCOREpublisherAssertions" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __pub2__add_USCOREpublisherAssertions           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html">uddi2__add_USCOREpublisherAssertions</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__add_USCOREpublisherAssertions_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__dispositionReport_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__pub2__add_USCOREpublisherAssertions" of service binding "PublishSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="add_publisherAssertions"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___pub2__add_USCOREpublisherAssertions(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____add___u_s_c_o_r_epublisher_assertions.html">uddi2__add_USCOREpublisherAssertions</a>* uddi2__add_USCOREpublisherAssertions_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a>*           uddi2__dispositionReport_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapPublishSoapProxy.h): class PublishSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__dispositionReport_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a32" doxytag="uddi_v2.h::__pub2__delete_USCOREbinding" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __pub2__delete_USCOREbinding           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____delete___u_s_c_o_r_ebinding.html">uddi2__delete_USCOREbinding</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__delete_USCOREbinding_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__dispositionReport_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__pub2__delete_USCOREbinding" of service binding "PublishSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="delete_binding"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___pub2__delete_USCOREbinding(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____delete___u_s_c_o_r_ebinding.html">uddi2__delete_USCOREbinding</a>*        uddi2__delete_USCOREbinding_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a>*           uddi2__dispositionReport_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapPublishSoapProxy.h): class PublishSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__dispositionReport_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a33" doxytag="uddi_v2.h::__pub2__delete_USCOREbusiness" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __pub2__delete_USCOREbusiness           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____delete___u_s_c_o_r_ebusiness.html">uddi2__delete_USCOREbusiness</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__delete_USCOREbusiness_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__dispositionReport_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__pub2__delete_USCOREbusiness" of service binding "PublishSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="delete_business"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___pub2__delete_USCOREbusiness(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____delete___u_s_c_o_r_ebusiness.html">uddi2__delete_USCOREbusiness</a>*       uddi2__delete_USCOREbusiness_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a>*           uddi2__dispositionReport_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapPublishSoapProxy.h): class PublishSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__dispositionReport_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a34" doxytag="uddi_v2.h::__pub2__delete_USCOREpublisherAssertions" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __pub2__delete_USCOREpublisherAssertions           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html">uddi2__delete_USCOREpublisherAssertions</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__delete_USCOREpublisherAssertions_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__dispositionReport_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__pub2__delete_USCOREpublisherAssertions" of service binding "PublishSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="delete_publisherAssertions"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___pub2__delete_USCOREpublisherAssertions(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____delete___u_s_c_o_r_epublisher_assertions.html">uddi2__delete_USCOREpublisherAssertions</a>* uddi2__delete_USCOREpublisherAssertions_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a>*           uddi2__dispositionReport_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapPublishSoapProxy.h): class PublishSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__dispositionReport_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a35" doxytag="uddi_v2.h::__pub2__delete_USCOREservice" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __pub2__delete_USCOREservice           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____delete___u_s_c_o_r_eservice.html">uddi2__delete_USCOREservice</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__delete_USCOREservice_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__dispositionReport_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__pub2__delete_USCOREservice" of service binding "PublishSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="delete_service"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___pub2__delete_USCOREservice(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____delete___u_s_c_o_r_eservice.html">uddi2__delete_USCOREservice</a>*        uddi2__delete_USCOREservice_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a>*           uddi2__dispositionReport_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapPublishSoapProxy.h): class PublishSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__dispositionReport_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a36" doxytag="uddi_v2.h::__pub2__delete_USCOREtModel" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __pub2__delete_USCOREtModel           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____delete___u_s_c_o_r_et_model.html">uddi2__delete_USCOREtModel</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__delete_USCOREtModel_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__dispositionReport_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__pub2__delete_USCOREtModel" of service binding "PublishSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="delete_tModel"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___pub2__delete_USCOREtModel(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____delete___u_s_c_o_r_et_model.html">uddi2__delete_USCOREtModel</a>*         uddi2__delete_USCOREtModel_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a>*           uddi2__dispositionReport_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapPublishSoapProxy.h): class PublishSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__dispositionReport_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a37" doxytag="uddi_v2.h::__pub2__discard_USCOREauthToken" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __pub2__discard_USCOREauthToken           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____discard___u_s_c_o_r_eauth_token.html">uddi2__discard_USCOREauthToken</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__discard_USCOREauthToken_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__dispositionReport_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__pub2__discard_USCOREauthToken" of service binding "PublishSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="discard_authToken"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___pub2__discard_USCOREauthToken(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____discard___u_s_c_o_r_eauth_token.html">uddi2__discard_USCOREauthToken</a>*     uddi2__discard_USCOREauthToken_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____disposition_report.html">uddi2__dispositionReport</a>*           uddi2__dispositionReport_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapPublishSoapProxy.h): class PublishSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__dispositionReport_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a38" doxytag="uddi_v2.h::__pub2__get_USCOREassertionStatusReport" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __pub2__get_USCOREassertionStatusReport           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html">uddi2__get_USCOREassertionStatusReport</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__get_USCOREassertionStatusReport_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____assertion_status_report.html">uddi2__assertionStatusReport</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__assertionStatusReport_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__pub2__get_USCOREassertionStatusReport" of service binding "PublishSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="get_assertionStatusReport"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___pub2__get_USCOREassertionStatusReport(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____get___u_s_c_o_r_eassertion_status_report.html">uddi2__get_USCOREassertionStatusReport</a>* uddi2__get_USCOREassertionStatusReport_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____assertion_status_report.html">uddi2__assertionStatusReport</a>*       uddi2__assertionStatusReport_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapPublishSoapProxy.h): class PublishSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__assertionStatusReport_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a39" doxytag="uddi_v2.h::__pub2__get_USCOREauthToken" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __pub2__get_USCOREauthToken           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____get___u_s_c_o_r_eauth_token.html">uddi2__get_USCOREauthToken</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__get_USCOREauthToken_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____auth_token.html">uddi2__authToken</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__authToken_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__pub2__get_USCOREauthToken" of service binding "PublishSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="get_authToken"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___pub2__get_USCOREauthToken(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____get___u_s_c_o_r_eauth_token.html">uddi2__get_USCOREauthToken</a>*         uddi2__get_USCOREauthToken_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____auth_token.html">uddi2__authToken</a>*                   uddi2__authToken_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapPublishSoapProxy.h): class PublishSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__authToken_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a40" doxytag="uddi_v2.h::__pub2__get_USCOREpublisherAssertions" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __pub2__get_USCOREpublisherAssertions           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html">uddi2__get_USCOREpublisherAssertions</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__get_USCOREpublisherAssertions_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____publisher_assertions.html">uddi2__publisherAssertions</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__publisherAssertions_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__pub2__get_USCOREpublisherAssertions" of service binding "PublishSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="get_publisherAssertions"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___pub2__get_USCOREpublisherAssertions(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____get___u_s_c_o_r_epublisher_assertions.html">uddi2__get_USCOREpublisherAssertions</a>* uddi2__get_USCOREpublisherAssertions_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____publisher_assertions.html">uddi2__publisherAssertions</a>*         uddi2__publisherAssertions_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapPublishSoapProxy.h): class PublishSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__publisherAssertions_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a41" doxytag="uddi_v2.h::__pub2__get_USCOREregisteredInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __pub2__get_USCOREregisteredInfo           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____get___u_s_c_o_r_eregistered_info.html">uddi2__get_USCOREregisteredInfo</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__get_USCOREregisteredInfo_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____registered_info.html">uddi2__registeredInfo</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__registeredInfo_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__pub2__get_USCOREregisteredInfo" of service binding "PublishSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="get_registeredInfo"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___pub2__get_USCOREregisteredInfo(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____get___u_s_c_o_r_eregistered_info.html">uddi2__get_USCOREregisteredInfo</a>*    uddi2__get_USCOREregisteredInfo_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____registered_info.html">uddi2__registeredInfo</a>*              uddi2__registeredInfo_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapPublishSoapProxy.h): class PublishSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__registeredInfo_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a42" doxytag="uddi_v2.h::__pub2__save_USCOREbinding" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __pub2__save_USCOREbinding           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____save___u_s_c_o_r_ebinding.html">uddi2__save_USCOREbinding</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__save_USCOREbinding_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__bindingDetail_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__pub2__save_USCOREbinding" of service binding "PublishSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="save_binding"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___pub2__save_USCOREbinding(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____save___u_s_c_o_r_ebinding.html">uddi2__save_USCOREbinding</a>*          uddi2__save_USCOREbinding_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____binding_detail.html">uddi2__bindingDetail</a>*               uddi2__bindingDetail_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapPublishSoapProxy.h): class PublishSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__bindingDetail_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a43" doxytag="uddi_v2.h::__pub2__save_USCOREbusiness" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __pub2__save_USCOREbusiness           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____save___u_s_c_o_r_ebusiness.html">uddi2__save_USCOREbusiness</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__save_USCOREbusiness_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____business_detail.html">uddi2__businessDetail</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__businessDetail_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__pub2__save_USCOREbusiness" of service binding "PublishSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="save_business"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___pub2__save_USCOREbusiness(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____save___u_s_c_o_r_ebusiness.html">uddi2__save_USCOREbusiness</a>*         uddi2__save_USCOREbusiness_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____business_detail.html">uddi2__businessDetail</a>*              uddi2__businessDetail_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapPublishSoapProxy.h): class PublishSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__businessDetail_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a44" doxytag="uddi_v2.h::__pub2__save_USCOREservice" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __pub2__save_USCOREservice           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____save___u_s_c_o_r_eservice.html">uddi2__save_USCOREservice</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__save_USCOREservice_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____service_detail.html">uddi2__serviceDetail</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__serviceDetail_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__pub2__save_USCOREservice" of service binding "PublishSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="save_service"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___pub2__save_USCOREservice(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____save___u_s_c_o_r_eservice.html">uddi2__save_USCOREservice</a>*          uddi2__save_USCOREservice_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____service_detail.html">uddi2__serviceDetail</a>*               uddi2__serviceDetail_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapPublishSoapProxy.h): class PublishSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__serviceDetail_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a45" doxytag="uddi_v2.h::__pub2__save_USCOREtModel" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __pub2__save_USCOREtModel           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____save___u_s_c_o_r_et_model.html">uddi2__save_USCOREtModel</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__save_USCOREtModel_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____t_model_detail.html">uddi2__tModelDetail</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__tModelDetail_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__pub2__save_USCOREtModel" of service binding "PublishSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="save_tModel"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___pub2__save_USCOREtModel(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____save___u_s_c_o_r_et_model.html">uddi2__save_USCOREtModel</a>*           uddi2__save_USCOREtModel_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____t_model_detail.html">uddi2__tModelDetail</a>*                uddi2__tModelDetail_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapPublishSoapProxy.h): class PublishSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__tModelDetail_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<a class="anchor" name="a46" doxytag="uddi_v2.h::__pub2__set_USCOREpublisherAssertions" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int __pub2__set_USCOREpublisherAssertions           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top"><a class="el" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html">uddi2__set_USCOREpublisherAssertions</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__set_USCOREpublisherAssertions_</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="classuddi2____publisher_assertions.html">uddi2__publisherAssertions</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>uddi2__publisherAssertions_</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Operation "__pub2__set_USCOREpublisherAssertions" of service binding "PublishSoap". 

+<p>

+Operation details:<p>

+<ul>

+<li>SOAP document/literal style</li><li>SOAP action="set_publisherAssertions"</li><li>SOAP Fault: <a class="el" href="class__disposition_report.html">_dispositionReport</a></li></ul>

+<p>

+C stub function (defined in soapClient.c[pp]): <div class="fragment"><pre>  <span class="keywordtype">int</span> soap_call___pub2__set_USCOREpublisherAssertions(<span class="keyword">struct</span> soap *soap,

+    NULL, <span class="comment">// char *endpoint = NULL selects default endpoint for this operation</span>

+    NULL, <span class="comment">// char *action = NULL selects default action for this operation</span>

+    <span class="comment">// request parameters:</span>

+    <a class="code" href="classuddi2____set___u_s_c_o_r_epublisher_assertions.html">uddi2__set_USCOREpublisherAssertions</a>* uddi2__set_USCOREpublisherAssertions_,

+    <span class="comment">// response parameters:</span>

+    <a class="code" href="classuddi2____publisher_assertions.html">uddi2__publisherAssertions</a>*         uddi2__publisherAssertions_

+  );

+</pre></div><p>

+C++ proxy class (defined in soapPublishSoapProxy.h): class PublishSoap; <dl compact><dt><b>Parameters: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em>uddi2__publisherAssertions_</em>&nbsp;</td><td>

+response parameter </td></tr>

+</table>

+</dl>    </td>

+  </tr>

+</table>

+<hr size="1"><address style="align: right;"><small>Generated on Wed Aug 17 16:16:58 2005 for gSOAP UDDI v2 by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/annotated.html b/doc/wsse/html/annotated.html
new file mode 100644
index 0000000..92bc56b
--- /dev/null
+++ b/doc/wsse/html/annotated.html
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Class List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindexHL" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>gSOAP WS-Security Class List</h1>Here are the classes, structs, unions and interfaces with brief descriptions:<table>

+  <tr><td class="indexkey"><a class="el" href="struct__c14n_____inclusive_namespaces.html">_c14n__InclusiveNamespaces</a></td><td class="indexvalue"></td></tr>

+  <tr><td class="indexkey"><a class="el" href="struct__wsse_____binary_security_token.html">_wsse__BinarySecurityToken</a></td><td class="indexvalue">This element defines the wsse:BinarySecurityToken element per Section 4.2. Imported element _wsse__BinarySecurityToken from typemap WS/WS-typemap.dat </td></tr>

+  <tr><td class="indexkey"><a class="el" href="struct__wsse_____embedded.html">_wsse__Embedded</a></td><td class="indexvalue">This element defines a security token embedded reference Imported element _wsse__Embedded from typemap WS/WS-typemap.dat </td></tr>

+  <tr><td class="indexkey"><a class="el" href="struct__wsse_____key_identifier.html">_wsse__KeyIdentifier</a></td><td class="indexvalue">This element defines a key identifier reference Imported element _wsse__KeyIdentifier from typemap WS/WS-typemap.dat </td></tr>

+  <tr><td class="indexkey"><a class="el" href="struct__wsse_____password.html">_wsse__Password</a></td><td class="indexvalue">This element contains properties for transformations from any namespace, including DSIG. '_wsse__TransformationParameters' element definition intentionally left blank </td></tr>

+  <tr><td class="indexkey"><a class="el" href="struct__wsse_____reference.html">_wsse__Reference</a></td><td class="indexvalue">This element defines a security token reference Imported element _wsse__Reference from typemap WS/WS-typemap.dat </td></tr>

+  <tr><td class="indexkey"><a class="el" href="struct__wsse_____security.html">_wsse__Security</a></td><td class="indexvalue">This element defines the wsse:Security SOAP header element per Section 4. Imported element _wsse__Security from typemap WS/WS-typemap.dat </td></tr>

+  <tr><td class="indexkey"><a class="el" href="struct__wsse_____security_token_reference.html">_wsse__SecurityTokenReference</a></td><td class="indexvalue">This element defines the wsse:SecurityTokenReference per Section 4.3. Imported element _wsse__SecurityTokenReference from typemap WS/WS-typemap.dat </td></tr>

+  <tr><td class="indexkey"><a class="el" href="struct__wsse_____username_token.html">_wsse__UsernameToken</a></td><td class="indexvalue">This element defines the wsse:UsernameToken element per Section 4.1. Imported element _wsse__UsernameToken from typemap WS/WS-typemap.dat </td></tr>

+  <tr><td class="indexkey"><a class="el" href="struct__wsu_____timestamp.html">_wsu__Timestamp</a></td><td class="indexvalue">This element allows Timestamps to be applied anywhere element wildcards are present, including as a SOAP header. Imported element _wsu__Timestamp from typemap WS/WS-typemap.dat </td></tr>

+  <tr><td class="indexkey"><a class="el" href="structds_____canonicalization_method_type.html">ds__CanonicalizationMethodType</a></td><td class="indexvalue">"http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethodType is a complexType </td></tr>

+  <tr><td class="indexkey"><a class="el" href="structds_____digest_method_type.html">ds__DigestMethodType</a></td><td class="indexvalue">"http://www.w3.org/2000/09/xmldsig#":DigestMethodType is a complexType </td></tr>

+  <tr><td class="indexkey"><a class="el" href="structds_____d_s_a_key_value_type.html">ds__DSAKeyValueType</a></td><td class="indexvalue">"http://www.w3.org/2000/09/xmldsig#":DSAKeyValueType is a complexType </td></tr>

+  <tr><td class="indexkey"><a class="el" href="structds_____key_info_type.html">ds__KeyInfoType</a></td><td class="indexvalue">Imported complexType "http://www.w3.org/2000/09/xmldsig#":KeyInfoType from typemap WS/WS-typemap.dat </td></tr>

+  <tr><td class="indexkey"><a class="el" href="structds_____key_value_type.html">ds__KeyValueType</a></td><td class="indexvalue">"http://www.w3.org/2000/09/xmldsig#":KeyValueType is a complexType </td></tr>

+  <tr><td class="indexkey"><a class="el" href="structds_____reference_type.html">ds__ReferenceType</a></td><td class="indexvalue">"http://www.w3.org/2000/09/xmldsig#":ReferenceType is a complexType </td></tr>

+  <tr><td class="indexkey"><a class="el" href="structds_____retrieval_method_type.html">ds__RetrievalMethodType</a></td><td class="indexvalue">"http://www.w3.org/2000/09/xmldsig#":RetrievalMethodType is a complexType </td></tr>

+  <tr><td class="indexkey"><a class="el" href="structds_____r_s_a_key_value_type.html">ds__RSAKeyValueType</a></td><td class="indexvalue">"http://www.w3.org/2000/09/xmldsig#":RSAKeyValueType is a complexType </td></tr>

+  <tr><td class="indexkey"><a class="el" href="structds_____signature_method_type.html">ds__SignatureMethodType</a></td><td class="indexvalue">"http://www.w3.org/2000/09/xmldsig#":SignatureMethodType is a complexType </td></tr>

+  <tr><td class="indexkey"><a class="el" href="structds_____signature_type.html">ds__SignatureType</a></td><td class="indexvalue">Imported complexType "http://www.w3.org/2000/09/xmldsig#":SignatureType from typemap WS/WS-typemap.dat </td></tr>

+  <tr><td class="indexkey"><a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a></td><td class="indexvalue">"http://www.w3.org/2000/09/xmldsig#":SignedInfoType is a complexType </td></tr>

+  <tr><td class="indexkey"><a class="el" href="structds_____transforms_type.html">ds__TransformsType</a></td><td class="indexvalue">"http://www.w3.org/2000/09/xmldsig#":TransformsType is a complexType </td></tr>

+  <tr><td class="indexkey"><a class="el" href="structds_____transform_type.html">ds__TransformType</a></td><td class="indexvalue">Imported complexType "http://www.w3.org/2000/09/xmldsig#":TransformType from typemap WS/WS-typemap.dat </td></tr>

+  <tr><td class="indexkey"><a class="el" href="structds_____x509_data_type.html">ds__X509DataType</a></td><td class="indexvalue">"http://www.w3.org/2000/09/xmldsig#":X509DataType is a complexType </td></tr>

+  <tr><td class="indexkey"><a class="el" href="structds_____x509_issuer_serial_type.html">ds__X509IssuerSerialType</a></td><td class="indexvalue">"http://www.w3.org/2000/09/xmldsig#":X509IssuerSerialType is a complexType </td></tr>

+  <tr><td class="indexkey"><a class="el" href="structsoap__smd__data.html">soap_smd_data</a></td><td class="indexvalue">The smdevp engine context data </td></tr>

+  <tr><td class="indexkey"><a class="el" href="structsoap__wsse__data.html">soap_wsse_data</a></td><td class="indexvalue">Wssepi plugin data </td></tr>

+  <tr><td class="indexkey"><a class="el" href="structsoap__wsse__digest.html">soap_wsse_digest</a></td><td class="indexvalue">Digest dictionary: linked list of ID-hash pairs </td></tr>

+  <tr><td class="indexkey"><a class="el" href="structsoap__wsse__session.html">soap_wsse_session</a></td><td class="indexvalue">Digest authentication session data </td></tr>

+</table>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/c14n_8h.html b/doc/wsse/html/c14n_8h.html
new file mode 100644
index 0000000..01d61c7
--- /dev/null
+++ b/doc/wsse/html/c14n_8h.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: /Users/engelen/Projects/gsoap/doc/wsse/c14n.h File Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>/Users/engelen/Projects/gsoap/doc/wsse/c14n.h File Reference</h1><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Classes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__c14n_____inclusive_namespaces.html">_c14n__InclusiveNamespaces</a></td></tr>

+

+<tr><td colspan=2><br><h2>Typedefs</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="struct__c14n_____inclusive_namespaces.html">_c14n__InclusiveNamespaces</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="c14n_8h.html#a0">_c14n__InclusiveNamespaces</a></td></tr>

+

+</table>

+<hr><h2>Typedef Documentation</h2>

+<a class="anchor" name="a0" doxytag="c14n.h::_c14n__InclusiveNamespaces" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="struct__c14n_____inclusive_namespaces.html">_c14n__InclusiveNamespaces</a>  <a class="el" href="struct__c14n_____inclusive_namespaces.html">_c14n__InclusiveNamespaces</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/doxygen.css b/doc/wsse/html/doxygen.css
new file mode 100644
index 0000000..df2e582
--- /dev/null
+++ b/doc/wsse/html/doxygen.css
@@ -0,0 +1,216 @@
+H1 {
+	text-align: center;
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+}
+H2 {
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+}
+CAPTION { font-weight: bold }
+DIV.qindex {
+	width: 100%;
+	background-color: #eeeeff;
+	border: 1px solid #B0B0B0;
+	text-align: center;
+	margin: 2px;
+	padding: 2px;
+	line-height: 120%;
+}
+A.qindex {
+       text-decoration: none;
+       font-weight: bold;
+       color: #1A419D;
+       padding: 2px;
+}
+A.qindex:visited {
+       text-decoration: none;
+       font-weight: bold;
+       color: #1A419D
+       padding: 2px;
+}
+A.qindex:hover {
+	text-decoration: none;
+	background-color: #ddddff;
+	padding: 2px;
+}
+A.qindexHL {
+	text-decoration: none;
+	font-weight: bold;
+	background-color: #6666cc;
+	color: #ffffff;
+	padding: 2px 6px;
+	border: 1px double #9295C2;
+}
+A.qindexHL:hover {
+	text-decoration: none;
+	background-color: #6666cc;
+	color: #ffffff;
+	padding: 2px 6px;
+}
+A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
+A.el { text-decoration: none; font-weight: bold }
+A.elRef { font-weight: bold }
+A.code { text-decoration: none; font-weight: normal; color: #1A419D}
+A.codeRef { font-weight: normal; color: #1A419D}
+A:hover { text-decoration: none; background-color: #f2f2ff }
+DL.el { margin-left: -1cm }
+PRE.fragment {
+	border: 1px solid #CCCCCC;
+	background-color: #f5f5f5;
+	margin-top: 4px;
+	margin-bottom: 4px;
+	margin-left: 2px;
+	margin-right: 8px;
+	padding-left: 6px;
+	padding-right: 6px;
+	padding-top: 4px;
+	padding-bottom: 4px;
+}
+DIV.fragment {
+	border: 1px solid #CCCCCC;
+	background-color: #f5f5f5;
+	padding: 6px;
+}
+DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
+TD.md { background-color: #F4F4FB; font-weight: bold; }
+TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; }
+TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; }
+DIV.groupHeader {
+       margin-left: 16px;
+       margin-top: 12px;
+       margin-bottom: 6px;
+       font-weight: bold;
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+}
+DIV.groupText { margin-left: 16px; font-style: italic; font-size: 14px }
+BODY {
+	background: white;
+	color: black;
+	margin-right: 20px;
+	margin-left: 20px;
+}
+TD.indexkey {
+	background-color: #eeeeff;
+	font-weight: bold;
+	padding-right  : 10px;
+	padding-top    : 2px;
+	padding-left   : 10px;
+	padding-bottom : 2px;
+	margin-left    : 0px;
+	margin-right   : 0px;
+	margin-top     : 2px;
+	margin-bottom  : 2px;
+	border: 1px solid #CCCCCC;
+}
+TD.indexvalue {
+	background-color: #eeeeff;
+	font-style: italic;
+	padding-right  : 10px;
+	padding-top    : 2px;
+	padding-left   : 10px;
+	padding-bottom : 2px;
+	margin-left    : 0px;
+	margin-right   : 0px;
+	margin-top     : 2px;
+	margin-bottom  : 2px;
+	border: 1px solid #CCCCCC;
+}
+TR.memlist {
+   background-color: #f0f0f0; 
+}
+P.formulaDsp { text-align: center; }
+IMG.formulaDsp { }
+IMG.formulaInl { vertical-align: middle; }
+SPAN.keyword       { color: #008000 }
+SPAN.keywordtype   { color: #604020 }
+SPAN.keywordflow   { color: #e08000 }
+SPAN.comment       { color: #800000 }
+SPAN.preprocessor  { color: #806020 }
+SPAN.stringliteral { color: #002080 }
+SPAN.charliteral   { color: #008080 }
+.mdTable {
+	border: 1px solid #868686;
+	background-color: #F4F4FB;
+}
+.mdRow {
+	padding: 8px 10px;
+}
+.mdescLeft {
+       padding: 0px 8px 4px 8px;
+	font-size: 14px;
+	font-style: italic;
+	background-color: #FAFAFA;
+	border-top: 1px none #E0E0E0;
+	border-right: 1px none #E0E0E0;
+	border-bottom: 1px none #E0E0E0;
+	border-left: 1px none #E0E0E0;
+	margin: 0px;
+}
+.mdescRight {
+       padding: 0px 8px 4px 8px;
+	font-size: 14px;
+	font-style: italic;
+	background-color: #FAFAFA;
+	border-top: 1px none #E0E0E0;
+	border-right: 1px none #E0E0E0;
+	border-bottom: 1px none #E0E0E0;
+	border-left: 1px none #E0E0E0;
+	margin: 0px;
+}
+.memItemLeft {
+	padding: 1px 0px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-style: solid;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+	font-size: 12px;
+}
+.memItemRight {
+	padding: 1px 8px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-style: solid;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+	font-size: 13px;
+}
+.search     { color: #003399;
+              font-weight: bold;
+}
+FORM.search {
+              margin-bottom: 0px;
+              margin-top: 0px;
+}
+INPUT.search { font-size: 75%;
+               color: #000080;
+               font-weight: normal;
+               background-color: #eeeeff;
+}
+TD.tiny      { font-size: 75%;
+}
+a {
+	color: #252E78;
+}
+a:visited {
+	color: #3D2185;
+}
diff --git a/doc/wsse/html/doxygen.png b/doc/wsse/html/doxygen.png
new file mode 100644
index 0000000..9da55f9
--- /dev/null
+++ b/doc/wsse/html/doxygen.png
Binary files differ
diff --git a/doc/wsse/html/ds_8h.html b/doc/wsse/html/ds_8h.html
new file mode 100644
index 0000000..bc67a99
--- /dev/null
+++ b/doc/wsse/html/ds_8h.html
@@ -0,0 +1,483 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: /Users/engelen/Projects/gsoap/doc/wsse/ds.h File Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>/Users/engelen/Projects/gsoap/doc/wsse/ds.h File Reference</h1><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Classes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____signature_type.html">ds__SignatureType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Imported complexType "http://www.w3.org/2000/09/xmldsig#":SignatureType from typemap WS/WS-typemap.dat.  <a href="structds_____signature_type.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____transform_type.html">ds__TransformType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Imported complexType "http://www.w3.org/2000/09/xmldsig#":TransformType from typemap WS/WS-typemap.dat.  <a href="structds_____transform_type.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____key_info_type.html">ds__KeyInfoType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Imported complexType "http://www.w3.org/2000/09/xmldsig#":KeyInfoType from typemap WS/WS-typemap.dat.  <a href="structds_____key_info_type.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">"http://www.w3.org/2000/09/xmldsig#":SignedInfoType is a complexType.  <a href="structds_____signed_info_type.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____canonicalization_method_type.html">ds__CanonicalizationMethodType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">"http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethodType is a complexType.  <a href="structds_____canonicalization_method_type.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____signature_method_type.html">ds__SignatureMethodType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">"http://www.w3.org/2000/09/xmldsig#":SignatureMethodType is a complexType.  <a href="structds_____signature_method_type.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____reference_type.html">ds__ReferenceType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">"http://www.w3.org/2000/09/xmldsig#":ReferenceType is a complexType.  <a href="structds_____reference_type.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____transforms_type.html">ds__TransformsType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">"http://www.w3.org/2000/09/xmldsig#":TransformsType is a complexType.  <a href="structds_____transforms_type.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____digest_method_type.html">ds__DigestMethodType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">"http://www.w3.org/2000/09/xmldsig#":DigestMethodType is a complexType.  <a href="structds_____digest_method_type.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____key_value_type.html">ds__KeyValueType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">"http://www.w3.org/2000/09/xmldsig#":KeyValueType is a complexType.  <a href="structds_____key_value_type.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____retrieval_method_type.html">ds__RetrievalMethodType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">"http://www.w3.org/2000/09/xmldsig#":RetrievalMethodType is a complexType.  <a href="structds_____retrieval_method_type.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____x509_data_type.html">ds__X509DataType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">"http://www.w3.org/2000/09/xmldsig#":X509DataType is a complexType.  <a href="structds_____x509_data_type.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____x509_issuer_serial_type.html">ds__X509IssuerSerialType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">"http://www.w3.org/2000/09/xmldsig#":X509IssuerSerialType is a complexType.  <a href="structds_____x509_issuer_serial_type.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____d_s_a_key_value_type.html">ds__DSAKeyValueType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">"http://www.w3.org/2000/09/xmldsig#":DSAKeyValueType is a complexType.  <a href="structds_____d_s_a_key_value_type.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____r_s_a_key_value_type.html">ds__RSAKeyValueType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">"http://www.w3.org/2000/09/xmldsig#":RSAKeyValueType is a complexType.  <a href="structds_____r_s_a_key_value_type.html#_details">More...</a><br></td></tr>

+<tr><td colspan=2><br><h2>Typedefs</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="structds_____signature_type.html">ds__SignatureType</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ds_8h.html#a0">ds__SignatureType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Imported complexType "http://www.w3.org/2000/09/xmldsig#":SignatureType from typemap WS/WS-typemap.dat.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ds_8h.html#a1">ds__SignedInfoType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Typedef synonym for struct <a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a>.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="structds_____canonicalization_method_type.html">ds__CanonicalizationMethodType</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ds_8h.html#a2">ds__CanonicalizationMethodType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Typedef synonym for struct <a class="el" href="structds_____canonicalization_method_type.html">ds__CanonicalizationMethodType</a>.  <a href="#a2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="structds_____signature_method_type.html">ds__SignatureMethodType</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ds_8h.html#a3">ds__SignatureMethodType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Typedef synonym for struct <a class="el" href="structds_____signature_method_type.html">ds__SignatureMethodType</a>.  <a href="#a3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="structds_____reference_type.html">ds__ReferenceType</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ds_8h.html#a4">ds__ReferenceType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Typedef synonym for struct <a class="el" href="structds_____reference_type.html">ds__ReferenceType</a>.  <a href="#a4"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="structds_____transforms_type.html">ds__TransformsType</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ds_8h.html#a5">ds__TransformsType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Typedef synonym for struct <a class="el" href="structds_____transforms_type.html">ds__TransformsType</a>.  <a href="#a5"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="structds_____transform_type.html">ds__TransformType</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ds_8h.html#a6">ds__TransformType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Imported complexType "http://www.w3.org/2000/09/xmldsig#":TransformType from typemap WS/WS-typemap.dat.  <a href="#a6"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="structds_____digest_method_type.html">ds__DigestMethodType</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ds_8h.html#a7">ds__DigestMethodType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Typedef synonym for struct <a class="el" href="structds_____digest_method_type.html">ds__DigestMethodType</a>.  <a href="#a7"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="structds_____key_info_type.html">ds__KeyInfoType</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ds_8h.html#a8">ds__KeyInfoType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Imported complexType "http://www.w3.org/2000/09/xmldsig#":KeyInfoType from typemap WS/WS-typemap.dat.  <a href="#a8"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="structds_____key_value_type.html">ds__KeyValueType</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ds_8h.html#a9">ds__KeyValueType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Typedef synonym for struct <a class="el" href="structds_____key_value_type.html">ds__KeyValueType</a>.  <a href="#a9"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="structds_____retrieval_method_type.html">ds__RetrievalMethodType</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ds_8h.html#a10">ds__RetrievalMethodType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Typedef synonym for struct <a class="el" href="structds_____retrieval_method_type.html">ds__RetrievalMethodType</a>.  <a href="#a10"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="structds_____x509_data_type.html">ds__X509DataType</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ds_8h.html#a11">ds__X509DataType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Typedef synonym for struct <a class="el" href="structds_____x509_data_type.html">ds__X509DataType</a>.  <a href="#a11"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="structds_____x509_issuer_serial_type.html">ds__X509IssuerSerialType</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ds_8h.html#a12">ds__X509IssuerSerialType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Typedef synonym for struct <a class="el" href="structds_____x509_issuer_serial_type.html">ds__X509IssuerSerialType</a>.  <a href="#a12"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="structds_____d_s_a_key_value_type.html">ds__DSAKeyValueType</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ds_8h.html#a13">ds__DSAKeyValueType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Typedef synonym for struct <a class="el" href="structds_____d_s_a_key_value_type.html">ds__DSAKeyValueType</a>.  <a href="#a13"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="structds_____r_s_a_key_value_type.html">ds__RSAKeyValueType</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ds_8h.html#a14">ds__RSAKeyValueType</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Typedef synonym for struct <a class="el" href="structds_____r_s_a_key_value_type.html">ds__RSAKeyValueType</a>.  <a href="#a14"></a><br></td></tr>

+</table>

+<hr><h2>Typedef Documentation</h2>

+<a class="anchor" name="a2" doxytag="ds.h::ds__CanonicalizationMethodType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="structds_____canonicalization_method_type.html">ds__CanonicalizationMethodType</a> <a class="el" href="structds_____canonicalization_method_type.html">ds__CanonicalizationMethodType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Typedef synonym for struct <a class="el" href="structds_____canonicalization_method_type.html">ds__CanonicalizationMethodType</a>. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a7" doxytag="ds.h::ds__DigestMethodType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="structds_____digest_method_type.html">ds__DigestMethodType</a> <a class="el" href="structds_____digest_method_type.html">ds__DigestMethodType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Typedef synonym for struct <a class="el" href="structds_____digest_method_type.html">ds__DigestMethodType</a>. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a13" doxytag="ds.h::ds__DSAKeyValueType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="structds_____d_s_a_key_value_type.html">ds__DSAKeyValueType</a> <a class="el" href="structds_____d_s_a_key_value_type.html">ds__DSAKeyValueType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Typedef synonym for struct <a class="el" href="structds_____d_s_a_key_value_type.html">ds__DSAKeyValueType</a>. 

+<p>

+Imported complexType "http://www.w3.org/2000/09/xmldsig#":SignaturePropertyType from typemap WS/WS-typemap.dat. complexType definition intentionally left blank.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a8" doxytag="ds.h::ds__KeyInfoType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="structds_____key_info_type.html">ds__KeyInfoType</a>  <a class="el" href="structds_____key_info_type.html">ds__KeyInfoType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Imported complexType "http://www.w3.org/2000/09/xmldsig#":KeyInfoType from typemap WS/WS-typemap.dat. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a9" doxytag="ds.h::ds__KeyValueType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="structds_____key_value_type.html">ds__KeyValueType</a> <a class="el" href="structds_____key_value_type.html">ds__KeyValueType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Typedef synonym for struct <a class="el" href="structds_____key_value_type.html">ds__KeyValueType</a>. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a4" doxytag="ds.h::ds__ReferenceType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="structds_____reference_type.html">ds__ReferenceType</a> <a class="el" href="structds_____reference_type.html">ds__ReferenceType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Typedef synonym for struct <a class="el" href="structds_____reference_type.html">ds__ReferenceType</a>. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a10" doxytag="ds.h::ds__RetrievalMethodType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="structds_____retrieval_method_type.html">ds__RetrievalMethodType</a> <a class="el" href="structds_____retrieval_method_type.html">ds__RetrievalMethodType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Typedef synonym for struct <a class="el" href="structds_____retrieval_method_type.html">ds__RetrievalMethodType</a>. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a14" doxytag="ds.h::ds__RSAKeyValueType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="structds_____r_s_a_key_value_type.html">ds__RSAKeyValueType</a> <a class="el" href="structds_____r_s_a_key_value_type.html">ds__RSAKeyValueType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Typedef synonym for struct <a class="el" href="structds_____r_s_a_key_value_type.html">ds__RSAKeyValueType</a>. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a3" doxytag="ds.h::ds__SignatureMethodType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="structds_____signature_method_type.html">ds__SignatureMethodType</a> <a class="el" href="structds_____signature_method_type.html">ds__SignatureMethodType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Typedef synonym for struct <a class="el" href="structds_____signature_method_type.html">ds__SignatureMethodType</a>. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a0" doxytag="ds.h::ds__SignatureType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="structds_____signature_type.html">ds__SignatureType</a>  <a class="el" href="structds_____signature_type.html">ds__SignatureType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Imported complexType "http://www.w3.org/2000/09/xmldsig#":SignatureType from typemap WS/WS-typemap.dat. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="ds.h::ds__SignedInfoType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a> <a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Typedef synonym for struct <a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a>. 

+<p>

+Imported complexType "http://www.w3.org/2000/09/xmldsig#":SignatureValueType from typemap WS/WS-typemap.dat. complexType definition intentionally left blank.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a5" doxytag="ds.h::ds__TransformsType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="structds_____transforms_type.html">ds__TransformsType</a> <a class="el" href="structds_____transforms_type.html">ds__TransformsType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Typedef synonym for struct <a class="el" href="structds_____transforms_type.html">ds__TransformsType</a>. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a6" doxytag="ds.h::ds__TransformType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="structds_____transform_type.html">ds__TransformType</a>  <a class="el" href="structds_____transform_type.html">ds__TransformType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Imported complexType "http://www.w3.org/2000/09/xmldsig#":TransformType from typemap WS/WS-typemap.dat. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a11" doxytag="ds.h::ds__X509DataType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="structds_____x509_data_type.html">ds__X509DataType</a> <a class="el" href="structds_____x509_data_type.html">ds__X509DataType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Typedef synonym for struct <a class="el" href="structds_____x509_data_type.html">ds__X509DataType</a>. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a12" doxytag="ds.h::ds__X509IssuerSerialType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="structds_____x509_issuer_serial_type.html">ds__X509IssuerSerialType</a> <a class="el" href="structds_____x509_issuer_serial_type.html">ds__X509IssuerSerialType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Typedef synonym for struct <a class="el" href="structds_____x509_issuer_serial_type.html">ds__X509IssuerSerialType</a>. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/files.html b/doc/wsse/html/files.html
new file mode 100644
index 0000000..70680e5
--- /dev/null
+++ b/doc/wsse/html/files.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: File Index</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindexHL" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>gSOAP WS-Security File List</h1>Here is a list of all files with brief descriptions:<table>

+  <tr><td class="indexkey">/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="c14n_8h.html">c14n.h</a></td><td class="indexvalue"></td></tr>

+  <tr><td class="indexkey">/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="ds_8h.html">ds.h</a></td><td class="indexvalue"></td></tr>

+  <tr><td class="indexkey">/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="smdevp_8c.html">smdevp.c</a></td><td class="indexvalue"></td></tr>

+  <tr><td class="indexkey">/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="smdevp_8h.html">smdevp.h</a></td><td class="indexvalue"></td></tr>

+  <tr><td class="indexkey">/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="wsse_8h.html">wsse.h</a></td><td class="indexvalue"></td></tr>

+  <tr><td class="indexkey">/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="wsseapi_8c.html">wsseapi.c</a></td><td class="indexvalue"></td></tr>

+  <tr><td class="indexkey">/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="wsseapi_8h.html">wsseapi.h</a></td><td class="indexvalue"></td></tr>

+  <tr><td class="indexkey">/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="wsu_8h.html">wsu.h</a></td><td class="indexvalue"></td></tr>

+</table>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/functions.html b/doc/wsse/html/functions.html
new file mode 100644
index 0000000..fdb1cef
--- /dev/null
+++ b/doc/wsse/html/functions.html
@@ -0,0 +1,155 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Class Members</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindexHL" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<div class="qindex"><a class="qindexHL" href="functions.html">All</a> | <a class="qindex" href="functions_vars.html">Variables</a></div>

+<div class="qindex"><a class="qindex" href="#index__">_</a> | <a class="qindex" href="#index_a">a</a> | <a class="qindex" href="#index_b">b</a> | <a class="qindex" href="#index_c">c</a> | <a class="qindex" href="#index_d">d</a> | <a class="qindex" href="#index_e">e</a> | <a class="qindex" href="#index_f">f</a> | <a class="qindex" href="#index_g">g</a> | <a class="qindex" href="#index_h">h</a> | <a class="qindex" href="#index_i">i</a> | <a class="qindex" href="#index_j">j</a> | <a class="qindex" href="#index_k">k</a> | <a class="qindex" href="#index_l">l</a> | <a class="qindex" href="#index_m">m</a> | <a class="qindex" href="#index_n">n</a> | <a class="qindex" href="#index_p">p</a> | <a class="qindex" href="#index_q">q</a> | <a class="qindex" href="#index_r">r</a> | <a class="qindex" href="#index_s">s</a> | <a class="qindex" href="#index_t">t</a> | <a class="qindex" href="#index_u">u</a> | <a class="qindex" href="#index_v">v</a> | <a class="qindex" href="#index_w">w</a> | <a class="qindex" href="#index_x">x</a> | <a class="qindex" href="#index_y">y</a></div>

+

+<p>

+

+<p>

+Here is a list of all class members with links to the classes they belong to:<h3><a class="anchor" name="index__">- _ -</a></h3><ul>

+<li>__any

+: <a class="el" href="structds_____transform_type.html#o1">ds__TransformType</a><li>__item

+: <a class="el" href="struct__wsse_____password.html#o0">_wsse__Password</a>, <a class="el" href="struct__wsse_____key_identifier.html#o0">_wsse__KeyIdentifier</a>, <a class="el" href="struct__wsse_____binary_security_token.html#o0">_wsse__BinarySecurityToken</a><li>__sizeReference

+: <a class="el" href="structds_____signed_info_type.html#o2">ds__SignedInfoType</a><li>__sizeTransform

+: <a class="el" href="structds_____transforms_type.html#o0">ds__TransformsType</a></ul>

+<h3><a class="anchor" name="index_a">- a -</a></h3><ul>

+<li>alg

+: <a class="el" href="structsoap__smd__data.html#o0">soap_smd_data</a><li>Algorithm

+: <a class="el" href="structds_____digest_method_type.html#o0">ds__DigestMethodType</a>, <a class="el" href="structds_____signature_method_type.html#o1">ds__SignatureMethodType</a>, <a class="el" href="structds_____canonicalization_method_type.html#o0">ds__CanonicalizationMethodType</a>, <a class="el" href="structds_____transform_type.html#o2">ds__TransformType</a></ul>

+<h3><a class="anchor" name="index_b">- b -</a></h3><ul>

+<li>BinarySecurityToken

+: <a class="el" href="struct__wsse_____security.html#o2">_wsse__Security</a></ul>

+<h3><a class="anchor" name="index_c">- c -</a></h3><ul>

+<li>c14n__InclusiveNamespaces

+: <a class="el" href="structds_____canonicalization_method_type.html#o1">ds__CanonicalizationMethodType</a>, <a class="el" href="structds_____transform_type.html#o0">ds__TransformType</a><li>CanonicalizationMethod

+: <a class="el" href="structds_____signed_info_type.html#o0">ds__SignedInfoType</a><li>Created

+: <a class="el" href="struct__wsu_____timestamp.html#o1">_wsu__Timestamp</a><li>ctx

+: <a class="el" href="structsoap__smd__data.html#o1">soap_smd_data</a></ul>

+<h3><a class="anchor" name="index_d">- d -</a></h3><ul>

+<li>digest

+: <a class="el" href="structsoap__wsse__data.html#o6">soap_wsse_data</a><li>DigestMethod

+: <a class="el" href="structds_____reference_type.html#o1">ds__ReferenceType</a><li>DigestValue

+: <a class="el" href="structds_____reference_type.html#o2">ds__ReferenceType</a><li>ds__Signature

+: <a class="el" href="struct__wsse_____security.html#o3">_wsse__Security</a><li>DSAKeyValue

+: <a class="el" href="structds_____key_value_type.html#o0">ds__KeyValueType</a></ul>

+<h3><a class="anchor" name="index_e">- e -</a></h3><ul>

+<li>Embedded

+: <a class="el" href="struct__wsse_____security_token_reference.html#o2">_wsse__SecurityTokenReference</a><li>EncodingType

+: <a class="el" href="struct__wsse_____key_identifier.html#o3">_wsse__KeyIdentifier</a>, <a class="el" href="struct__wsse_____binary_security_token.html#o3">_wsse__BinarySecurityToken</a><li>expired

+: <a class="el" href="structsoap__wsse__session.html#o1">soap_wsse_session</a><li>Expires

+: <a class="el" href="struct__wsu_____timestamp.html#o2">_wsu__Timestamp</a><li>Exponent

+: <a class="el" href="structds_____r_s_a_key_value_type.html#o1">ds__RSAKeyValueType</a></ul>

+<h3><a class="anchor" name="index_f">- f -</a></h3><ul>

+<li>fdisconnect

+: <a class="el" href="structsoap__wsse__data.html#o10">soap_wsse_data</a><li>fpreparefinal

+: <a class="el" href="structsoap__wsse__data.html#o9">soap_wsse_data</a><li>fprepareinit

+: <a class="el" href="structsoap__wsse__data.html#o7">soap_wsse_data</a><li>fpreparesend

+: <a class="el" href="structsoap__wsse__data.html#o8">soap_wsse_data</a><li>frecv

+: <a class="el" href="structsoap__smd__data.html#o4">soap_smd_data</a><li>fsend

+: <a class="el" href="structsoap__smd__data.html#o3">soap_smd_data</a></ul>

+<h3><a class="anchor" name="index_g">- g -</a></h3><ul>

+<li>G

+: <a class="el" href="structds_____d_s_a_key_value_type.html#o0">ds__DSAKeyValueType</a></ul>

+<h3><a class="anchor" name="index_h">- h -</a></h3><ul>

+<li>hash

+: <a class="el" href="structsoap__wsse__digest.html#o3">soap_wsse_digest</a>, <a class="el" href="structsoap__wsse__session.html#o2">soap_wsse_session</a><li>HMACOutputLength

+: <a class="el" href="structds_____signature_method_type.html#o0">ds__SignatureMethodType</a></ul>

+<h3><a class="anchor" name="index_i">- i -</a></h3><ul>

+<li>id

+: <a class="el" href="structsoap__wsse__digest.html#o4">soap_wsse_digest</a><li>Id

+: <a class="el" href="structds_____reference_type.html#o3">ds__ReferenceType</a>, <a class="el" href="structds_____signed_info_type.html#o4">ds__SignedInfoType</a>, <a class="el" href="structds_____key_info_type.html#o5">ds__KeyInfoType</a>, <a class="el" href="structds_____signature_type.html#o3">ds__SignatureType</a></ul>

+<h3><a class="anchor" name="index_j">- j -</a></h3><ul>

+<li>J

+: <a class="el" href="structds_____d_s_a_key_value_type.html#o2">ds__DSAKeyValueType</a></ul>

+<h3><a class="anchor" name="index_k">- k -</a></h3><ul>

+<li>key

+: <a class="el" href="structsoap__smd__data.html#o2">soap_smd_data</a><li>KeyIdentifier

+: <a class="el" href="struct__wsse_____security_token_reference.html#o1">_wsse__SecurityTokenReference</a><li>KeyInfo

+: <a class="el" href="structds_____signature_type.html#o2">ds__SignatureType</a><li>KeyName

+: <a class="el" href="structds_____key_info_type.html#o0">ds__KeyInfoType</a><li>KeyValue

+: <a class="el" href="structds_____key_info_type.html#o1">ds__KeyInfoType</a></ul>

+<h3><a class="anchor" name="index_l">- l -</a></h3><ul>

+<li>level

+: <a class="el" href="structsoap__wsse__digest.html#o1">soap_wsse_digest</a></ul>

+<h3><a class="anchor" name="index_m">- m -</a></h3><ul>

+<li>mode

+: <a class="el" href="structsoap__smd__data.html#o5">soap_smd_data</a><li>Modulus

+: <a class="el" href="structds_____r_s_a_key_value_type.html#o0">ds__RSAKeyValueType</a></ul>

+<h3><a class="anchor" name="index_n">- n -</a></h3><ul>

+<li>next

+: <a class="el" href="structsoap__wsse__digest.html#o0">soap_wsse_digest</a>, <a class="el" href="structsoap__wsse__session.html#o0">soap_wsse_session</a><li>nonce

+: <a class="el" href="structsoap__wsse__session.html#o3">soap_wsse_session</a><li>Nonce

+: <a class="el" href="struct__wsse_____username_token.html#o2">_wsse__UsernameToken</a></ul>

+<h3><a class="anchor" name="index_p">- p -</a></h3><ul>

+<li>P

+: <a class="el" href="structds_____d_s_a_key_value_type.html#o3">ds__DSAKeyValueType</a><li>Password

+: <a class="el" href="struct__wsse_____username_token.html#o1">_wsse__UsernameToken</a><li>PgenCounter

+: <a class="el" href="structds_____d_s_a_key_value_type.html#o6">ds__DSAKeyValueType</a><li>PrefixList

+: <a class="el" href="struct__c14n_____inclusive_namespaces.html#o0">_c14n__InclusiveNamespaces</a></ul>

+<h3><a class="anchor" name="index_q">- q -</a></h3><ul>

+<li>Q

+: <a class="el" href="structds_____d_s_a_key_value_type.html#o4">ds__DSAKeyValueType</a></ul>

+<h3><a class="anchor" name="index_r">- r -</a></h3><ul>

+<li>Reference

+: <a class="el" href="struct__wsse_____security_token_reference.html#o0">_wsse__SecurityTokenReference</a>, <a class="el" href="structds_____signed_info_type.html#o3">ds__SignedInfoType</a><li>RetrievalMethod

+: <a class="el" href="structds_____key_info_type.html#o2">ds__KeyInfoType</a><li>RSAKeyValue

+: <a class="el" href="structds_____key_value_type.html#o1">ds__KeyValueType</a></ul>

+<h3><a class="anchor" name="index_s">- s -</a></h3><ul>

+<li>Seed

+: <a class="el" href="structds_____d_s_a_key_value_type.html#o5">ds__DSAKeyValueType</a><li>sign_alg

+: <a class="el" href="structsoap__wsse__data.html#o0">soap_wsse_data</a><li>sign_key

+: <a class="el" href="structsoap__wsse__data.html#o1">soap_wsse_data</a><li>sign_keylen

+: <a class="el" href="structsoap__wsse__data.html#o2">soap_wsse_data</a><li>SignatureMethod

+: <a class="el" href="structds_____signed_info_type.html#o1">ds__SignedInfoType</a><li>SignatureValue

+: <a class="el" href="structds_____signature_type.html#o1">ds__SignatureType</a><li>SignedInfo

+: <a class="el" href="structds_____signature_type.html#o0">ds__SignatureType</a><li>smd

+: <a class="el" href="structsoap__wsse__digest.html#o2">soap_wsse_digest</a><li>SOAP_ENV__actor

+: <a class="el" href="struct__wsse_____security.html#o4">_wsse__Security</a><li>SOAP_ENV__role

+: <a class="el" href="struct__wsse_____security.html#o5">_wsse__Security</a></ul>

+<h3><a class="anchor" name="index_t">- t -</a></h3><ul>

+<li>Transform

+: <a class="el" href="structds_____transforms_type.html#o1">ds__TransformsType</a><li>Transforms

+: <a class="el" href="structds_____retrieval_method_type.html#o0">ds__RetrievalMethodType</a>, <a class="el" href="structds_____reference_type.html#o0">ds__ReferenceType</a><li>Type

+: <a class="el" href="struct__wsse_____password.html#o1">_wsse__Password</a>, <a class="el" href="structds_____retrieval_method_type.html#o2">ds__RetrievalMethodType</a>, <a class="el" href="structds_____reference_type.html#o5">ds__ReferenceType</a></ul>

+<h3><a class="anchor" name="index_u">- u -</a></h3><ul>

+<li>URI

+: <a class="el" href="struct__wsse_____reference.html#o0">_wsse__Reference</a>, <a class="el" href="structds_____retrieval_method_type.html#o1">ds__RetrievalMethodType</a>, <a class="el" href="structds_____reference_type.html#o4">ds__ReferenceType</a><li>Usage

+: <a class="el" href="struct__wsse_____security_token_reference.html#o4">_wsse__SecurityTokenReference</a><li>user

+: <a class="el" href="structsoap__smd__data.html#o6">soap_smd_data</a><li>Username

+: <a class="el" href="struct__wsse_____username_token.html#o0">_wsse__UsernameToken</a><li>UsernameToken

+: <a class="el" href="struct__wsse_____security.html#o1">_wsse__Security</a></ul>

+<h3><a class="anchor" name="index_v">- v -</a></h3><ul>

+<li>ValueType

+: <a class="el" href="struct__wsse_____key_identifier.html#o2">_wsse__KeyIdentifier</a>, <a class="el" href="struct__wsse_____embedded.html#o1">_wsse__Embedded</a>, <a class="el" href="struct__wsse_____reference.html#o1">_wsse__Reference</a>, <a class="el" href="struct__wsse_____binary_security_token.html#o2">_wsse__BinarySecurityToken</a><li>vrfy_alg

+: <a class="el" href="structsoap__wsse__data.html#o3">soap_wsse_data</a><li>vrfy_key

+: <a class="el" href="structsoap__wsse__data.html#o4">soap_wsse_data</a><li>vrfy_keylen

+: <a class="el" href="structsoap__wsse__data.html#o5">soap_wsse_data</a></ul>

+<h3><a class="anchor" name="index_w">- w -</a></h3><ul>

+<li>wsse__SecurityTokenReference

+: <a class="el" href="structds_____key_info_type.html#o4">ds__KeyInfoType</a><li>wsu__Created

+: <a class="el" href="struct__wsse_____username_token.html#o3">_wsse__UsernameToken</a><li>wsu__Id

+: <a class="el" href="struct__wsu_____timestamp.html#o0">_wsu__Timestamp</a>, <a class="el" href="struct__wsse_____security_token_reference.html#o3">_wsse__SecurityTokenReference</a>, <a class="el" href="struct__wsse_____key_identifier.html#o1">_wsse__KeyIdentifier</a>, <a class="el" href="struct__wsse_____embedded.html#o0">_wsse__Embedded</a>, <a class="el" href="struct__wsse_____binary_security_token.html#o1">_wsse__BinarySecurityToken</a>, <a class="el" href="struct__wsse_____username_token.html#o4">_wsse__UsernameToken</a><li>wsu__Timestamp

+: <a class="el" href="struct__wsse_____security.html#o0">_wsse__Security</a></ul>

+<h3><a class="anchor" name="index_x">- x -</a></h3><ul>

+<li>X509Certificate

+: <a class="el" href="structds_____x509_data_type.html#o3">ds__X509DataType</a><li>X509CRL

+: <a class="el" href="structds_____x509_data_type.html#o4">ds__X509DataType</a><li>X509Data

+: <a class="el" href="structds_____key_info_type.html#o3">ds__KeyInfoType</a><li>X509IssuerName

+: <a class="el" href="structds_____x509_issuer_serial_type.html#o0">ds__X509IssuerSerialType</a><li>X509IssuerSerial

+: <a class="el" href="structds_____x509_data_type.html#o0">ds__X509DataType</a><li>X509SerialNumber

+: <a class="el" href="structds_____x509_issuer_serial_type.html#o1">ds__X509IssuerSerialType</a><li>X509SKI

+: <a class="el" href="structds_____x509_data_type.html#o1">ds__X509DataType</a><li>X509SubjectName

+: <a class="el" href="structds_____x509_data_type.html#o2">ds__X509DataType</a></ul>

+<h3><a class="anchor" name="index_y">- y -</a></h3><ul>

+<li>Y

+: <a class="el" href="structds_____d_s_a_key_value_type.html#o1">ds__DSAKeyValueType</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/functions_vars.html b/doc/wsse/html/functions_vars.html
new file mode 100644
index 0000000..54f2ab0
--- /dev/null
+++ b/doc/wsse/html/functions_vars.html
@@ -0,0 +1,155 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Class Members - Variables</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindexHL" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<div class="qindex"><a class="qindex" href="functions.html">All</a> | <a class="qindexHL" href="functions_vars.html">Variables</a></div>

+<div class="qindex"><a class="qindex" href="#index__">_</a> | <a class="qindex" href="#index_a">a</a> | <a class="qindex" href="#index_b">b</a> | <a class="qindex" href="#index_c">c</a> | <a class="qindex" href="#index_d">d</a> | <a class="qindex" href="#index_e">e</a> | <a class="qindex" href="#index_f">f</a> | <a class="qindex" href="#index_g">g</a> | <a class="qindex" href="#index_h">h</a> | <a class="qindex" href="#index_i">i</a> | <a class="qindex" href="#index_j">j</a> | <a class="qindex" href="#index_k">k</a> | <a class="qindex" href="#index_l">l</a> | <a class="qindex" href="#index_m">m</a> | <a class="qindex" href="#index_n">n</a> | <a class="qindex" href="#index_p">p</a> | <a class="qindex" href="#index_q">q</a> | <a class="qindex" href="#index_r">r</a> | <a class="qindex" href="#index_s">s</a> | <a class="qindex" href="#index_t">t</a> | <a class="qindex" href="#index_u">u</a> | <a class="qindex" href="#index_v">v</a> | <a class="qindex" href="#index_w">w</a> | <a class="qindex" href="#index_x">x</a> | <a class="qindex" href="#index_y">y</a></div>

+

+<p>

+

+<p>

+<h3><a class="anchor" name="index__">- _ -</a></h3><ul>

+<li>__any

+: <a class="el" href="structds_____transform_type.html#o1">ds__TransformType</a><li>__item

+: <a class="el" href="struct__wsse_____password.html#o0">_wsse__Password</a>, <a class="el" href="struct__wsse_____key_identifier.html#o0">_wsse__KeyIdentifier</a>, <a class="el" href="struct__wsse_____binary_security_token.html#o0">_wsse__BinarySecurityToken</a><li>__sizeReference

+: <a class="el" href="structds_____signed_info_type.html#o2">ds__SignedInfoType</a><li>__sizeTransform

+: <a class="el" href="structds_____transforms_type.html#o0">ds__TransformsType</a></ul>

+<h3><a class="anchor" name="index_a">- a -</a></h3><ul>

+<li>alg

+: <a class="el" href="structsoap__smd__data.html#o0">soap_smd_data</a><li>Algorithm

+: <a class="el" href="structds_____digest_method_type.html#o0">ds__DigestMethodType</a>, <a class="el" href="structds_____signature_method_type.html#o1">ds__SignatureMethodType</a>, <a class="el" href="structds_____canonicalization_method_type.html#o0">ds__CanonicalizationMethodType</a>, <a class="el" href="structds_____transform_type.html#o2">ds__TransformType</a></ul>

+<h3><a class="anchor" name="index_b">- b -</a></h3><ul>

+<li>BinarySecurityToken

+: <a class="el" href="struct__wsse_____security.html#o2">_wsse__Security</a></ul>

+<h3><a class="anchor" name="index_c">- c -</a></h3><ul>

+<li>c14n__InclusiveNamespaces

+: <a class="el" href="structds_____canonicalization_method_type.html#o1">ds__CanonicalizationMethodType</a>, <a class="el" href="structds_____transform_type.html#o0">ds__TransformType</a><li>CanonicalizationMethod

+: <a class="el" href="structds_____signed_info_type.html#o0">ds__SignedInfoType</a><li>Created

+: <a class="el" href="struct__wsu_____timestamp.html#o1">_wsu__Timestamp</a><li>ctx

+: <a class="el" href="structsoap__smd__data.html#o1">soap_smd_data</a></ul>

+<h3><a class="anchor" name="index_d">- d -</a></h3><ul>

+<li>digest

+: <a class="el" href="structsoap__wsse__data.html#o6">soap_wsse_data</a><li>DigestMethod

+: <a class="el" href="structds_____reference_type.html#o1">ds__ReferenceType</a><li>DigestValue

+: <a class="el" href="structds_____reference_type.html#o2">ds__ReferenceType</a><li>ds__Signature

+: <a class="el" href="struct__wsse_____security.html#o3">_wsse__Security</a><li>DSAKeyValue

+: <a class="el" href="structds_____key_value_type.html#o0">ds__KeyValueType</a></ul>

+<h3><a class="anchor" name="index_e">- e -</a></h3><ul>

+<li>Embedded

+: <a class="el" href="struct__wsse_____security_token_reference.html#o2">_wsse__SecurityTokenReference</a><li>EncodingType

+: <a class="el" href="struct__wsse_____key_identifier.html#o3">_wsse__KeyIdentifier</a>, <a class="el" href="struct__wsse_____binary_security_token.html#o3">_wsse__BinarySecurityToken</a><li>expired

+: <a class="el" href="structsoap__wsse__session.html#o1">soap_wsse_session</a><li>Expires

+: <a class="el" href="struct__wsu_____timestamp.html#o2">_wsu__Timestamp</a><li>Exponent

+: <a class="el" href="structds_____r_s_a_key_value_type.html#o1">ds__RSAKeyValueType</a></ul>

+<h3><a class="anchor" name="index_f">- f -</a></h3><ul>

+<li>fdisconnect

+: <a class="el" href="structsoap__wsse__data.html#o10">soap_wsse_data</a><li>fpreparefinal

+: <a class="el" href="structsoap__wsse__data.html#o9">soap_wsse_data</a><li>fprepareinit

+: <a class="el" href="structsoap__wsse__data.html#o7">soap_wsse_data</a><li>fpreparesend

+: <a class="el" href="structsoap__wsse__data.html#o8">soap_wsse_data</a><li>frecv

+: <a class="el" href="structsoap__smd__data.html#o4">soap_smd_data</a><li>fsend

+: <a class="el" href="structsoap__smd__data.html#o3">soap_smd_data</a></ul>

+<h3><a class="anchor" name="index_g">- g -</a></h3><ul>

+<li>G

+: <a class="el" href="structds_____d_s_a_key_value_type.html#o0">ds__DSAKeyValueType</a></ul>

+<h3><a class="anchor" name="index_h">- h -</a></h3><ul>

+<li>hash

+: <a class="el" href="structsoap__wsse__digest.html#o3">soap_wsse_digest</a>, <a class="el" href="structsoap__wsse__session.html#o2">soap_wsse_session</a><li>HMACOutputLength

+: <a class="el" href="structds_____signature_method_type.html#o0">ds__SignatureMethodType</a></ul>

+<h3><a class="anchor" name="index_i">- i -</a></h3><ul>

+<li>id

+: <a class="el" href="structsoap__wsse__digest.html#o4">soap_wsse_digest</a><li>Id

+: <a class="el" href="structds_____reference_type.html#o3">ds__ReferenceType</a>, <a class="el" href="structds_____signed_info_type.html#o4">ds__SignedInfoType</a>, <a class="el" href="structds_____key_info_type.html#o5">ds__KeyInfoType</a>, <a class="el" href="structds_____signature_type.html#o3">ds__SignatureType</a></ul>

+<h3><a class="anchor" name="index_j">- j -</a></h3><ul>

+<li>J

+: <a class="el" href="structds_____d_s_a_key_value_type.html#o2">ds__DSAKeyValueType</a></ul>

+<h3><a class="anchor" name="index_k">- k -</a></h3><ul>

+<li>key

+: <a class="el" href="structsoap__smd__data.html#o2">soap_smd_data</a><li>KeyIdentifier

+: <a class="el" href="struct__wsse_____security_token_reference.html#o1">_wsse__SecurityTokenReference</a><li>KeyInfo

+: <a class="el" href="structds_____signature_type.html#o2">ds__SignatureType</a><li>KeyName

+: <a class="el" href="structds_____key_info_type.html#o0">ds__KeyInfoType</a><li>KeyValue

+: <a class="el" href="structds_____key_info_type.html#o1">ds__KeyInfoType</a></ul>

+<h3><a class="anchor" name="index_l">- l -</a></h3><ul>

+<li>level

+: <a class="el" href="structsoap__wsse__digest.html#o1">soap_wsse_digest</a></ul>

+<h3><a class="anchor" name="index_m">- m -</a></h3><ul>

+<li>mode

+: <a class="el" href="structsoap__smd__data.html#o5">soap_smd_data</a><li>Modulus

+: <a class="el" href="structds_____r_s_a_key_value_type.html#o0">ds__RSAKeyValueType</a></ul>

+<h3><a class="anchor" name="index_n">- n -</a></h3><ul>

+<li>next

+: <a class="el" href="structsoap__wsse__digest.html#o0">soap_wsse_digest</a>, <a class="el" href="structsoap__wsse__session.html#o0">soap_wsse_session</a><li>nonce

+: <a class="el" href="structsoap__wsse__session.html#o3">soap_wsse_session</a><li>Nonce

+: <a class="el" href="struct__wsse_____username_token.html#o2">_wsse__UsernameToken</a></ul>

+<h3><a class="anchor" name="index_p">- p -</a></h3><ul>

+<li>P

+: <a class="el" href="structds_____d_s_a_key_value_type.html#o3">ds__DSAKeyValueType</a><li>Password

+: <a class="el" href="struct__wsse_____username_token.html#o1">_wsse__UsernameToken</a><li>PgenCounter

+: <a class="el" href="structds_____d_s_a_key_value_type.html#o6">ds__DSAKeyValueType</a><li>PrefixList

+: <a class="el" href="struct__c14n_____inclusive_namespaces.html#o0">_c14n__InclusiveNamespaces</a></ul>

+<h3><a class="anchor" name="index_q">- q -</a></h3><ul>

+<li>Q

+: <a class="el" href="structds_____d_s_a_key_value_type.html#o4">ds__DSAKeyValueType</a></ul>

+<h3><a class="anchor" name="index_r">- r -</a></h3><ul>

+<li>Reference

+: <a class="el" href="struct__wsse_____security_token_reference.html#o0">_wsse__SecurityTokenReference</a>, <a class="el" href="structds_____signed_info_type.html#o3">ds__SignedInfoType</a><li>RetrievalMethod

+: <a class="el" href="structds_____key_info_type.html#o2">ds__KeyInfoType</a><li>RSAKeyValue

+: <a class="el" href="structds_____key_value_type.html#o1">ds__KeyValueType</a></ul>

+<h3><a class="anchor" name="index_s">- s -</a></h3><ul>

+<li>Seed

+: <a class="el" href="structds_____d_s_a_key_value_type.html#o5">ds__DSAKeyValueType</a><li>sign_alg

+: <a class="el" href="structsoap__wsse__data.html#o0">soap_wsse_data</a><li>sign_key

+: <a class="el" href="structsoap__wsse__data.html#o1">soap_wsse_data</a><li>sign_keylen

+: <a class="el" href="structsoap__wsse__data.html#o2">soap_wsse_data</a><li>SignatureMethod

+: <a class="el" href="structds_____signed_info_type.html#o1">ds__SignedInfoType</a><li>SignatureValue

+: <a class="el" href="structds_____signature_type.html#o1">ds__SignatureType</a><li>SignedInfo

+: <a class="el" href="structds_____signature_type.html#o0">ds__SignatureType</a><li>smd

+: <a class="el" href="structsoap__wsse__digest.html#o2">soap_wsse_digest</a><li>SOAP_ENV__actor

+: <a class="el" href="struct__wsse_____security.html#o4">_wsse__Security</a><li>SOAP_ENV__role

+: <a class="el" href="struct__wsse_____security.html#o5">_wsse__Security</a></ul>

+<h3><a class="anchor" name="index_t">- t -</a></h3><ul>

+<li>Transform

+: <a class="el" href="structds_____transforms_type.html#o1">ds__TransformsType</a><li>Transforms

+: <a class="el" href="structds_____retrieval_method_type.html#o0">ds__RetrievalMethodType</a>, <a class="el" href="structds_____reference_type.html#o0">ds__ReferenceType</a><li>Type

+: <a class="el" href="struct__wsse_____password.html#o1">_wsse__Password</a>, <a class="el" href="structds_____retrieval_method_type.html#o2">ds__RetrievalMethodType</a>, <a class="el" href="structds_____reference_type.html#o5">ds__ReferenceType</a></ul>

+<h3><a class="anchor" name="index_u">- u -</a></h3><ul>

+<li>URI

+: <a class="el" href="struct__wsse_____reference.html#o0">_wsse__Reference</a>, <a class="el" href="structds_____retrieval_method_type.html#o1">ds__RetrievalMethodType</a>, <a class="el" href="structds_____reference_type.html#o4">ds__ReferenceType</a><li>Usage

+: <a class="el" href="struct__wsse_____security_token_reference.html#o4">_wsse__SecurityTokenReference</a><li>user

+: <a class="el" href="structsoap__smd__data.html#o6">soap_smd_data</a><li>Username

+: <a class="el" href="struct__wsse_____username_token.html#o0">_wsse__UsernameToken</a><li>UsernameToken

+: <a class="el" href="struct__wsse_____security.html#o1">_wsse__Security</a></ul>

+<h3><a class="anchor" name="index_v">- v -</a></h3><ul>

+<li>ValueType

+: <a class="el" href="struct__wsse_____key_identifier.html#o2">_wsse__KeyIdentifier</a>, <a class="el" href="struct__wsse_____embedded.html#o1">_wsse__Embedded</a>, <a class="el" href="struct__wsse_____reference.html#o1">_wsse__Reference</a>, <a class="el" href="struct__wsse_____binary_security_token.html#o2">_wsse__BinarySecurityToken</a><li>vrfy_alg

+: <a class="el" href="structsoap__wsse__data.html#o3">soap_wsse_data</a><li>vrfy_key

+: <a class="el" href="structsoap__wsse__data.html#o4">soap_wsse_data</a><li>vrfy_keylen

+: <a class="el" href="structsoap__wsse__data.html#o5">soap_wsse_data</a></ul>

+<h3><a class="anchor" name="index_w">- w -</a></h3><ul>

+<li>wsse__SecurityTokenReference

+: <a class="el" href="structds_____key_info_type.html#o4">ds__KeyInfoType</a><li>wsu__Created

+: <a class="el" href="struct__wsse_____username_token.html#o3">_wsse__UsernameToken</a><li>wsu__Id

+: <a class="el" href="struct__wsu_____timestamp.html#o0">_wsu__Timestamp</a>, <a class="el" href="struct__wsse_____security_token_reference.html#o3">_wsse__SecurityTokenReference</a>, <a class="el" href="struct__wsse_____key_identifier.html#o1">_wsse__KeyIdentifier</a>, <a class="el" href="struct__wsse_____embedded.html#o0">_wsse__Embedded</a>, <a class="el" href="struct__wsse_____binary_security_token.html#o1">_wsse__BinarySecurityToken</a>, <a class="el" href="struct__wsse_____username_token.html#o4">_wsse__UsernameToken</a><li>wsu__Timestamp

+: <a class="el" href="struct__wsse_____security.html#o0">_wsse__Security</a></ul>

+<h3><a class="anchor" name="index_x">- x -</a></h3><ul>

+<li>X509Certificate

+: <a class="el" href="structds_____x509_data_type.html#o3">ds__X509DataType</a><li>X509CRL

+: <a class="el" href="structds_____x509_data_type.html#o4">ds__X509DataType</a><li>X509Data

+: <a class="el" href="structds_____key_info_type.html#o3">ds__KeyInfoType</a><li>X509IssuerName

+: <a class="el" href="structds_____x509_issuer_serial_type.html#o0">ds__X509IssuerSerialType</a><li>X509IssuerSerial

+: <a class="el" href="structds_____x509_data_type.html#o0">ds__X509DataType</a><li>X509SerialNumber

+: <a class="el" href="structds_____x509_issuer_serial_type.html#o1">ds__X509IssuerSerialType</a><li>X509SKI

+: <a class="el" href="structds_____x509_data_type.html#o1">ds__X509DataType</a><li>X509SubjectName

+: <a class="el" href="structds_____x509_data_type.html#o2">ds__X509DataType</a></ul>

+<h3><a class="anchor" name="index_y">- y -</a></h3><ul>

+<li>Y

+: <a class="el" href="structds_____d_s_a_key_value_type.html#o1">ds__DSAKeyValueType</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/globals.html b/doc/wsse/html/globals.html
new file mode 100644
index 0000000..2de3198
--- /dev/null
+++ b/doc/wsse/html/globals.html
@@ -0,0 +1,166 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: File Members</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindexHL" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<div class="qindex"><a class="qindexHL" href="globals.html">All</a> | <a class="qindex" href="globals_func.html">Functions</a> | <a class="qindex" href="globals_vars.html">Variables</a> | <a class="qindex" href="globals_type.html">Typedefs</a> | <a class="qindex" href="globals_enum.html">Enumerations</a> | <a class="qindex" href="globals_eval.html">Enumeration&nbsp;values</a> | <a class="qindex" href="globals_defs.html">Defines</a></div>

+<div class="qindex"><a class="qindex" href="#index__">_</a> | <a class="qindex" href="#index_c">c</a> | <a class="qindex" href="#index_d">d</a> | <a class="qindex" href="#index_s">s</a> | <a class="qindex" href="#index_w">w</a></div>

+

+<p>

+

+<p>

+Here is a list of all file members with links to the files they belong to:<h3><a class="anchor" name="index__">- _ -</a></h3><ul>

+<li>_c14n__InclusiveNamespaces

+: <a class="el" href="c14n_8h.html#a0">c14n.h</a><li>_wsse__BinarySecurityToken

+: <a class="el" href="wsse_8h.html#a2">wsse.h</a><li>_wsse__Embedded

+: <a class="el" href="wsse_8h.html#a4">wsse.h</a><li>_wsse__KeyIdentifier

+: <a class="el" href="wsse_8h.html#a5">wsse.h</a><li>_wsse__Password

+: <a class="el" href="wsse_8h.html#a8">wsse.h</a><li>_wsse__Reference

+: <a class="el" href="wsse_8h.html#a3">wsse.h</a><li>_wsse__Security

+: <a class="el" href="wsse_8h.html#a7">wsse.h</a><li>_wsse__SecurityTokenReference

+: <a class="el" href="wsse_8h.html#a6">wsse.h</a><li>_wsse__UsernameToken

+: <a class="el" href="wsse_8h.html#a1">wsse.h</a><li>_wsu__Timestamp

+: <a class="el" href="wsu_8h.html#a1">wsu.h</a></ul>

+<h3><a class="anchor" name="index_c">- c -</a></h3><ul>

+<li>c14n_URI

+: <a class="el" href="wsseapi_8h.html#a12">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a15">wsseapi.c</a><li>calc_digest()

+: <a class="el" href="wsseapi_8c.html#a21">wsseapi.c</a><li>calc_nonce()

+: <a class="el" href="wsseapi_8c.html#a22">wsseapi.c</a></ul>

+<h3><a class="anchor" name="index_d">- d -</a></h3><ul>

+<li>ds__CanonicalizationMethodType

+: <a class="el" href="ds_8h.html#a2">ds.h</a><li>ds__DigestMethodType

+: <a class="el" href="ds_8h.html#a7">ds.h</a><li>ds__DSAKeyValueType

+: <a class="el" href="ds_8h.html#a13">ds.h</a><li>ds__KeyInfoType

+: <a class="el" href="ds_8h.html#a8">ds.h</a><li>ds__KeyValueType

+: <a class="el" href="ds_8h.html#a9">ds.h</a><li>ds__ReferenceType

+: <a class="el" href="ds_8h.html#a4">ds.h</a><li>ds__RetrievalMethodType

+: <a class="el" href="ds_8h.html#a10">ds.h</a><li>ds__RSAKeyValueType

+: <a class="el" href="ds_8h.html#a14">ds.h</a><li>ds__SignatureMethodType

+: <a class="el" href="ds_8h.html#a3">ds.h</a><li>ds__SignatureType

+: <a class="el" href="ds_8h.html#a0">ds.h</a><li>ds__SignedInfoType

+: <a class="el" href="ds_8h.html#a1">ds.h</a><li>ds__TransformsType

+: <a class="el" href="ds_8h.html#a5">ds.h</a><li>ds__TransformType

+: <a class="el" href="ds_8h.html#a6">ds.h</a><li>ds__X509DataType

+: <a class="el" href="ds_8h.html#a11">ds.h</a><li>ds__X509IssuerSerialType

+: <a class="el" href="ds_8h.html#a12">ds.h</a><li>ds_dsa_sha1URI

+: <a class="el" href="wsseapi_8h.html#a9">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a12">wsseapi.c</a><li>ds_hmac_sha1URI

+: <a class="el" href="wsseapi_8h.html#a8">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a11">wsseapi.c</a><li>ds_rsa_sha1URI

+: <a class="el" href="wsseapi_8h.html#a10">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a13">wsseapi.c</a><li>ds_sha1URI

+: <a class="el" href="wsseapi_8h.html#a7">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a10">wsseapi.c</a><li>ds_URI

+: <a class="el" href="wsseapi_8h.html#a11">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a14">wsseapi.c</a></ul>

+<h3><a class="anchor" name="index_s">- s -</a></h3><ul>

+<li>soap_smd_begin()

+: <a class="el" href="smdevp_8h.html#a13">smdevp.h</a>, <a class="el" href="smdevp_8c.html#a4">smdevp.c</a><li>soap_smd_check()

+: <a class="el" href="smdevp_8c.html#a2">smdevp.c</a><li>SOAP_SMD_DGST_MD5

+: <a class="el" href="smdevp_8h.html#a5">smdevp.h</a><li>SOAP_SMD_DGST_SHA1

+: <a class="el" href="smdevp_8h.html#a6">smdevp.h</a><li>soap_smd_end()

+: <a class="el" href="smdevp_8h.html#a14">smdevp.h</a>, <a class="el" href="smdevp_8c.html#a5">smdevp.c</a><li>soap_smd_final()

+: <a class="el" href="smdevp_8h.html#a17">smdevp.h</a>, <a class="el" href="smdevp_8c.html#a8">smdevp.c</a><li>SOAP_SMD_HMAC_SHA1

+: <a class="el" href="smdevp_8h.html#a7">smdevp.h</a><li>soap_smd_init()

+: <a class="el" href="smdevp_8h.html#a15">smdevp.h</a>, <a class="el" href="smdevp_8c.html#a6">smdevp.c</a><li>SOAP_SMD_KEY_TYPE

+: <a class="el" href="smdevp_8h.html#a0">smdevp.h</a><li>SOAP_SMD_MAX_SIZE

+: <a class="el" href="smdevp_8h.html#a1">smdevp.h</a><li>SOAP_SMD_MD5_SIZE

+: <a class="el" href="smdevp_8h.html#a2">smdevp.h</a><li>SOAP_SMD_NONE

+: <a class="el" href="smdevp_8h.html#a4">smdevp.h</a><li>soap_smd_recv()

+: <a class="el" href="smdevp_8c.html#a1">smdevp.c</a><li>soap_smd_send()

+: <a class="el" href="smdevp_8c.html#a0">smdevp.c</a><li>SOAP_SMD_SHA1_SIZE

+: <a class="el" href="smdevp_8h.html#a3">smdevp.h</a><li>SOAP_SMD_SIGN_DSA_SHA1

+: <a class="el" href="smdevp_8h.html#a8">smdevp.h</a><li>SOAP_SMD_SIGN_RSA_SHA1

+: <a class="el" href="smdevp_8h.html#a9">smdevp.h</a><li>soap_smd_size()

+: <a class="el" href="smdevp_8h.html#a12">smdevp.h</a>, <a class="el" href="smdevp_8c.html#a3">smdevp.c</a><li>soap_smd_update()

+: <a class="el" href="smdevp_8h.html#a16">smdevp.h</a>, <a class="el" href="smdevp_8c.html#a7">smdevp.c</a><li>SOAP_SMD_VRFY_DSA_SHA1

+: <a class="el" href="smdevp_8h.html#a10">smdevp.h</a><li>SOAP_SMD_VRFY_RSA_SHA1

+: <a class="el" href="smdevp_8h.html#a11">smdevp.h</a><li>soap_wsse()

+: <a class="el" href="wsseapi_8h.html#a58">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a75">wsseapi.c</a><li>soap_wsse_add_BinarySecurityToken()

+: <a class="el" href="wsseapi_8h.html#a29">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a46">wsseapi.c</a><li>soap_wsse_add_BinarySecurityTokenPEM()

+: <a class="el" href="wsseapi_8h.html#a31">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a48">wsseapi.c</a><li>soap_wsse_add_BinarySecurityTokenX509()

+: <a class="el" href="wsseapi_8h.html#a30">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a47">wsseapi.c</a><li>soap_wsse_add_KeyInfo()

+: <a class="el" href="wsseapi_8h.html#a45">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a62">wsseapi.c</a><li>soap_wsse_add_KeyInfo_KeyName()

+: <a class="el" href="wsseapi_8h.html#a47">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a64">wsseapi.c</a><li>soap_wsse_add_KeyInfo_SecurityTokenReferenceEmbedded()

+: <a class="el" href="wsseapi_8h.html#a56">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a73">wsseapi.c</a><li>soap_wsse_add_KeyInfo_SecurityTokenReferenceKeyIdentifier()

+: <a class="el" href="wsseapi_8h.html#a53">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a70">wsseapi.c</a><li>soap_wsse_add_KeyInfo_SecurityTokenReferenceURI()

+: <a class="el" href="wsseapi_8h.html#a49">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a66">wsseapi.c</a><li>soap_wsse_add_KeyInfo_SecurityTokenReferenceX509()

+: <a class="el" href="wsseapi_8h.html#a50">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a67">wsseapi.c</a><li>soap_wsse_add_Security()

+: <a class="el" href="wsseapi_8h.html#a14">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a31">wsseapi.c</a><li>soap_wsse_add_Security_actor()

+: <a class="el" href="wsseapi_8h.html#a15">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a32">wsseapi.c</a><li>soap_wsse_add_Signature()

+: <a class="el" href="wsseapi_8h.html#a18">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a35">wsseapi.c</a><li>soap_wsse_add_SignatureValue()

+: <a class="el" href="wsseapi_8h.html#a41">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a58">wsseapi.c</a><li>soap_wsse_add_SignedInfo()

+: <a class="el" href="wsseapi_8h.html#a36">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a53">wsseapi.c</a><li>soap_wsse_add_SignedInfo_Reference()

+: <a class="el" href="wsseapi_8h.html#a37">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a54">wsseapi.c</a><li>soap_wsse_add_SignedInfo_SignatureMethod()

+: <a class="el" href="wsseapi_8h.html#a38">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a55">wsseapi.c</a><li>soap_wsse_add_Timestamp()

+: <a class="el" href="wsseapi_8h.html#a21">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a38">wsseapi.c</a><li>soap_wsse_add_UsernameTokenDigest()

+: <a class="el" href="wsseapi_8h.html#a25">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a42">wsseapi.c</a><li>soap_wsse_add_UsernameTokenText()

+: <a class="el" href="wsseapi_8h.html#a24">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a41">wsseapi.c</a><li>soap_wsse_BinarySecurityToken()

+: <a class="el" href="wsseapi_8h.html#a32">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a49">wsseapi.c</a><li>SOAP_WSSE_CLKSKEW

+: <a class="el" href="wsseapi_8c.html#a1">wsseapi.c</a><li>soap_wsse_copy()

+: <a class="el" href="wsseapi_8c.html#a24">wsseapi.c</a><li>soap_wsse_delete()

+: <a class="el" href="wsseapi_8c.html#a25">wsseapi.c</a><li>soap_wsse_delete_Security()

+: <a class="el" href="wsseapi_8h.html#a16">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a33">wsseapi.c</a><li>soap_wsse_delete_Signature()

+: <a class="el" href="wsseapi_8h.html#a19">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a36">wsseapi.c</a><li>soap_wsse_disconnect()

+: <a class="el" href="wsseapi_8c.html#a30">wsseapi.c</a><li>soap_wsse_fault()

+: <a class="el" href="wsseapi_8h.html#a57">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a74">wsseapi.c</a><li>soap_wsse_get_BinarySecurityToken()

+: <a class="el" href="wsseapi_8h.html#a33">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a50">wsseapi.c</a><li>soap_wsse_get_BinarySecurityTokenX509()

+: <a class="el" href="wsseapi_8h.html#a34">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a51">wsseapi.c</a><li>soap_wsse_get_KeyInfo_KeyName()

+: <a class="el" href="wsseapi_8h.html#a48">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a65">wsseapi.c</a><li>soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifier()

+: <a class="el" href="wsseapi_8h.html#a55">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a72">wsseapi.c</a><li>soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifierValueType()

+: <a class="el" href="wsseapi_8h.html#a54">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a71">wsseapi.c</a><li>soap_wsse_get_KeyInfo_SecurityTokenReferenceURI()

+: <a class="el" href="wsseapi_8h.html#a51">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a68">wsseapi.c</a><li>soap_wsse_get_KeyInfo_SecurityTokenReferenceX509()

+: <a class="el" href="wsseapi_8h.html#a52">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a69">wsseapi.c</a><li>soap_wsse_get_SignedInfo_SignatureMethod()

+: <a class="el" href="wsseapi_8h.html#a40">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a57">wsseapi.c</a><li>soap_wsse_get_Username()

+: <a class="el" href="wsseapi_8h.html#a27">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a44">wsseapi.c</a><li>SOAP_WSSE_ID

+: <a class="el" href="wsseapi_8h.html#a0">wsseapi.h</a><li>soap_wsse_id

+: <a class="el" href="wsseapi_8h.html#a1">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a4">wsseapi.c</a><li>soap_wsse_init()

+: <a class="el" href="wsseapi_8c.html#a23">wsseapi.c</a><li>soap_wsse_KeyInfo()

+: <a class="el" href="wsseapi_8h.html#a46">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a63">wsseapi.c</a><li>SOAP_WSSE_MAX_REF

+: <a class="el" href="wsseapi_8c.html#a0">wsseapi.c</a><li>SOAP_WSSE_NONCELEN

+: <a class="el" href="wsseapi_8c.html#a2">wsseapi.c</a><li>SOAP_WSSE_NONCETIME

+: <a class="el" href="wsseapi_8c.html#a3">wsseapi.c</a><li>soap_wsse_preparecleanup()

+: <a class="el" href="wsseapi_8c.html#a29">wsseapi.c</a><li>soap_wsse_preparefinal()

+: <a class="el" href="wsseapi_8c.html#a28">wsseapi.c</a><li>soap_wsse_prepareinit()

+: <a class="el" href="wsseapi_8c.html#a26">wsseapi.c</a><li>soap_wsse_preparesend()

+: <a class="el" href="wsseapi_8c.html#a27">wsseapi.c</a><li>soap_wsse_Security()

+: <a class="el" href="wsseapi_8h.html#a17">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a34">wsseapi.c</a><li>soap_wsse_session

+: <a class="el" href="wsseapi_8c.html#a17">wsseapi.c</a><li>soap_wsse_session_cleanup()

+: <a class="el" href="wsseapi_8c.html#a20">wsseapi.c</a><li>soap_wsse_session_lock

+: <a class="el" href="wsseapi_8c.html#a18">wsseapi.c</a><li>soap_wsse_session_verify()

+: <a class="el" href="wsseapi_8c.html#a19">wsseapi.c</a><li>soap_wsse_sign()

+: <a class="el" href="wsseapi_8h.html#a59">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a76">wsseapi.c</a><li>soap_wsse_sign_body()

+: <a class="el" href="wsseapi_8h.html#a60">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a77">wsseapi.c</a><li>soap_wsse_Signature()

+: <a class="el" href="wsseapi_8h.html#a20">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a37">wsseapi.c</a><li>soap_wsse_SignedInfo()

+: <a class="el" href="wsseapi_8h.html#a39">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a56">wsseapi.c</a><li>soap_wsse_Timestamp()

+: <a class="el" href="wsseapi_8h.html#a22">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a39">wsseapi.c</a><li>soap_wsse_UsernameToken()

+: <a class="el" href="wsseapi_8h.html#a26">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a43">wsseapi.c</a><li>soap_wsse_verify_auto()

+: <a class="el" href="wsseapi_8h.html#a62">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a79">wsseapi.c</a><li>soap_wsse_verify_digest()

+: <a class="el" href="wsseapi_8h.html#a44">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a61">wsseapi.c</a><li>soap_wsse_verify_done()

+: <a class="el" href="wsseapi_8h.html#a63">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a80">wsseapi.c</a><li>soap_wsse_verify_init()

+: <a class="el" href="wsseapi_8h.html#a61">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a78">wsseapi.c</a><li>soap_wsse_verify_Password()

+: <a class="el" href="wsseapi_8h.html#a28">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a45">wsseapi.c</a><li>soap_wsse_verify_SignatureValue()

+: <a class="el" href="wsseapi_8h.html#a42">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a59">wsseapi.c</a><li>soap_wsse_verify_SignedInfo()

+: <a class="el" href="wsseapi_8h.html#a43">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a60">wsseapi.c</a><li>soap_wsse_verify_Timestamp()

+: <a class="el" href="wsseapi_8h.html#a23">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a40">wsseapi.c</a><li>soap_wsse_verify_X509()

+: <a class="el" href="wsseapi_8h.html#a35">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a52">wsseapi.c</a></ul>

+<h3><a class="anchor" name="index_w">- w -</a></h3><ul>

+<li>wsse__FailedAuthentication

+: <a class="el" href="wsse_8h.html#a16a13">wsse.h</a><li>wsse__FailedCheck

+: <a class="el" href="wsse_8h.html#a16a14">wsse.h</a><li>wsse__FaultcodeEnum

+: <a class="el" href="wsse_8h.html#a16">wsse.h</a><li>wsse__InvalidSecurity

+: <a class="el" href="wsse_8h.html#a16a11">wsse.h</a><li>wsse__InvalidSecurityToken

+: <a class="el" href="wsse_8h.html#a16a12">wsse.h</a><li>wsse__SecurityTokenUnavailable

+: <a class="el" href="wsse_8h.html#a16a15">wsse.h</a><li>wsse__UnsupportedAlgorithm

+: <a class="el" href="wsse_8h.html#a16a10">wsse.h</a><li>wsse__UnsupportedSecurityToken

+: <a class="el" href="wsse_8h.html#a16a9">wsse.h</a><li>wsse_Base64BinaryURI

+: <a class="el" href="wsseapi_8h.html#a4">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a7">wsseapi.c</a><li>wsse_PasswordDigestURI

+: <a class="el" href="wsseapi_8h.html#a3">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a6">wsseapi.c</a><li>wsse_PasswordTextURI

+: <a class="el" href="wsseapi_8h.html#a2">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a5">wsseapi.c</a><li>wsse_X509v3SubjectKeyIdentifierURI

+: <a class="el" href="wsseapi_8h.html#a6">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a9">wsseapi.c</a><li>wsse_X509v3URI

+: <a class="el" href="wsseapi_8h.html#a5">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a8">wsseapi.c</a><li>wsu__MessageExpired

+: <a class="el" href="wsu_8h.html#a3a2">wsu.h</a><li>wsu__tTimestampFault

+: <a class="el" href="wsu_8h.html#a3">wsu.h</a><li>wsu_URI

+: <a class="el" href="wsseapi_8h.html#a13">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a16">wsseapi.c</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/globals_defs.html b/doc/wsse/html/globals_defs.html
new file mode 100644
index 0000000..292adbf
--- /dev/null
+++ b/doc/wsse/html/globals_defs.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: File Members - Defines</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindexHL" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<div class="qindex"><a class="qindex" href="globals.html">All</a> | <a class="qindex" href="globals_func.html">Functions</a> | <a class="qindex" href="globals_vars.html">Variables</a> | <a class="qindex" href="globals_type.html">Typedefs</a> | <a class="qindex" href="globals_enum.html">Enumerations</a> | <a class="qindex" href="globals_eval.html">Enumeration&nbsp;values</a> | <a class="qindexHL" href="globals_defs.html">Defines</a></div>

+

+<p>

+<ul>

+<li>SOAP_SMD_DGST_MD5

+: <a class="el" href="smdevp_8h.html#a5">smdevp.h</a><li>SOAP_SMD_DGST_SHA1

+: <a class="el" href="smdevp_8h.html#a6">smdevp.h</a><li>SOAP_SMD_HMAC_SHA1

+: <a class="el" href="smdevp_8h.html#a7">smdevp.h</a><li>SOAP_SMD_KEY_TYPE

+: <a class="el" href="smdevp_8h.html#a0">smdevp.h</a><li>SOAP_SMD_MAX_SIZE

+: <a class="el" href="smdevp_8h.html#a1">smdevp.h</a><li>SOAP_SMD_MD5_SIZE

+: <a class="el" href="smdevp_8h.html#a2">smdevp.h</a><li>SOAP_SMD_NONE

+: <a class="el" href="smdevp_8h.html#a4">smdevp.h</a><li>SOAP_SMD_SHA1_SIZE

+: <a class="el" href="smdevp_8h.html#a3">smdevp.h</a><li>SOAP_SMD_SIGN_DSA_SHA1

+: <a class="el" href="smdevp_8h.html#a8">smdevp.h</a><li>SOAP_SMD_SIGN_RSA_SHA1

+: <a class="el" href="smdevp_8h.html#a9">smdevp.h</a><li>SOAP_SMD_VRFY_DSA_SHA1

+: <a class="el" href="smdevp_8h.html#a10">smdevp.h</a><li>SOAP_SMD_VRFY_RSA_SHA1

+: <a class="el" href="smdevp_8h.html#a11">smdevp.h</a><li>SOAP_WSSE_CLKSKEW

+: <a class="el" href="wsseapi_8c.html#a1">wsseapi.c</a><li>SOAP_WSSE_ID

+: <a class="el" href="wsseapi_8h.html#a0">wsseapi.h</a><li>SOAP_WSSE_MAX_REF

+: <a class="el" href="wsseapi_8c.html#a0">wsseapi.c</a><li>SOAP_WSSE_NONCELEN

+: <a class="el" href="wsseapi_8c.html#a2">wsseapi.c</a><li>SOAP_WSSE_NONCETIME

+: <a class="el" href="wsseapi_8c.html#a3">wsseapi.c</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/globals_enum.html b/doc/wsse/html/globals_enum.html
new file mode 100644
index 0000000..f2cb295
--- /dev/null
+++ b/doc/wsse/html/globals_enum.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: File Members - Enumerations</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindexHL" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<div class="qindex"><a class="qindex" href="globals.html">All</a> | <a class="qindex" href="globals_func.html">Functions</a> | <a class="qindex" href="globals_vars.html">Variables</a> | <a class="qindex" href="globals_type.html">Typedefs</a> | <a class="qindexHL" href="globals_enum.html">Enumerations</a> | <a class="qindex" href="globals_eval.html">Enumeration&nbsp;values</a> | <a class="qindex" href="globals_defs.html">Defines</a></div>

+

+<p>

+<ul>

+<li>wsse__FaultcodeEnum

+: <a class="el" href="wsse_8h.html#a16">wsse.h</a><li>wsu__tTimestampFault

+: <a class="el" href="wsu_8h.html#a3">wsu.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/globals_eval.html b/doc/wsse/html/globals_eval.html
new file mode 100644
index 0000000..6f0ec6b
--- /dev/null
+++ b/doc/wsse/html/globals_eval.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: File Members - Enumeration values</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindexHL" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<div class="qindex"><a class="qindex" href="globals.html">All</a> | <a class="qindex" href="globals_func.html">Functions</a> | <a class="qindex" href="globals_vars.html">Variables</a> | <a class="qindex" href="globals_type.html">Typedefs</a> | <a class="qindex" href="globals_enum.html">Enumerations</a> | <a class="qindexHL" href="globals_eval.html">Enumeration&nbsp;values</a> | <a class="qindex" href="globals_defs.html">Defines</a></div>

+

+<p>

+<ul>

+<li>wsse__FailedAuthentication

+: <a class="el" href="wsse_8h.html#a16a13">wsse.h</a><li>wsse__FailedCheck

+: <a class="el" href="wsse_8h.html#a16a14">wsse.h</a><li>wsse__InvalidSecurity

+: <a class="el" href="wsse_8h.html#a16a11">wsse.h</a><li>wsse__InvalidSecurityToken

+: <a class="el" href="wsse_8h.html#a16a12">wsse.h</a><li>wsse__SecurityTokenUnavailable

+: <a class="el" href="wsse_8h.html#a16a15">wsse.h</a><li>wsse__UnsupportedAlgorithm

+: <a class="el" href="wsse_8h.html#a16a10">wsse.h</a><li>wsse__UnsupportedSecurityToken

+: <a class="el" href="wsse_8h.html#a16a9">wsse.h</a><li>wsu__MessageExpired

+: <a class="el" href="wsu_8h.html#a3a2">wsu.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/globals_func.html b/doc/wsse/html/globals_func.html
new file mode 100644
index 0000000..31c26cc
--- /dev/null
+++ b/doc/wsse/html/globals_func.html
@@ -0,0 +1,93 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: File Members - Functions</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindexHL" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<div class="qindex"><a class="qindex" href="globals.html">All</a> | <a class="qindexHL" href="globals_func.html">Functions</a> | <a class="qindex" href="globals_vars.html">Variables</a> | <a class="qindex" href="globals_type.html">Typedefs</a> | <a class="qindex" href="globals_enum.html">Enumerations</a> | <a class="qindex" href="globals_eval.html">Enumeration&nbsp;values</a> | <a class="qindex" href="globals_defs.html">Defines</a></div>

+<div class="qindex"><a class="qindex" href="#index_c">c</a> | <a class="qindex" href="#index_s">s</a></div>

+

+<p>

+

+<p>

+<h3><a class="anchor" name="index_c">- c -</a></h3><ul>

+<li>calc_digest()

+: <a class="el" href="wsseapi_8c.html#a21">wsseapi.c</a><li>calc_nonce()

+: <a class="el" href="wsseapi_8c.html#a22">wsseapi.c</a></ul>

+<h3><a class="anchor" name="index_s">- s -</a></h3><ul>

+<li>soap_smd_begin()

+: <a class="el" href="smdevp_8h.html#a13">smdevp.h</a>, <a class="el" href="smdevp_8c.html#a4">smdevp.c</a><li>soap_smd_check()

+: <a class="el" href="smdevp_8c.html#a2">smdevp.c</a><li>soap_smd_end()

+: <a class="el" href="smdevp_8h.html#a14">smdevp.h</a>, <a class="el" href="smdevp_8c.html#a5">smdevp.c</a><li>soap_smd_final()

+: <a class="el" href="smdevp_8h.html#a17">smdevp.h</a>, <a class="el" href="smdevp_8c.html#a8">smdevp.c</a><li>soap_smd_init()

+: <a class="el" href="smdevp_8h.html#a15">smdevp.h</a>, <a class="el" href="smdevp_8c.html#a6">smdevp.c</a><li>soap_smd_recv()

+: <a class="el" href="smdevp_8c.html#a1">smdevp.c</a><li>soap_smd_send()

+: <a class="el" href="smdevp_8c.html#a0">smdevp.c</a><li>soap_smd_size()

+: <a class="el" href="smdevp_8h.html#a12">smdevp.h</a>, <a class="el" href="smdevp_8c.html#a3">smdevp.c</a><li>soap_smd_update()

+: <a class="el" href="smdevp_8h.html#a16">smdevp.h</a>, <a class="el" href="smdevp_8c.html#a7">smdevp.c</a><li>soap_wsse()

+: <a class="el" href="wsseapi_8h.html#a58">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a75">wsseapi.c</a><li>soap_wsse_add_BinarySecurityToken()

+: <a class="el" href="wsseapi_8h.html#a29">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a46">wsseapi.c</a><li>soap_wsse_add_BinarySecurityTokenPEM()

+: <a class="el" href="wsseapi_8h.html#a31">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a48">wsseapi.c</a><li>soap_wsse_add_BinarySecurityTokenX509()

+: <a class="el" href="wsseapi_8h.html#a30">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a47">wsseapi.c</a><li>soap_wsse_add_KeyInfo()

+: <a class="el" href="wsseapi_8h.html#a45">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a62">wsseapi.c</a><li>soap_wsse_add_KeyInfo_KeyName()

+: <a class="el" href="wsseapi_8h.html#a47">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a64">wsseapi.c</a><li>soap_wsse_add_KeyInfo_SecurityTokenReferenceEmbedded()

+: <a class="el" href="wsseapi_8h.html#a56">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a73">wsseapi.c</a><li>soap_wsse_add_KeyInfo_SecurityTokenReferenceKeyIdentifier()

+: <a class="el" href="wsseapi_8h.html#a53">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a70">wsseapi.c</a><li>soap_wsse_add_KeyInfo_SecurityTokenReferenceURI()

+: <a class="el" href="wsseapi_8h.html#a49">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a66">wsseapi.c</a><li>soap_wsse_add_KeyInfo_SecurityTokenReferenceX509()

+: <a class="el" href="wsseapi_8h.html#a50">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a67">wsseapi.c</a><li>soap_wsse_add_Security()

+: <a class="el" href="wsseapi_8h.html#a14">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a31">wsseapi.c</a><li>soap_wsse_add_Security_actor()

+: <a class="el" href="wsseapi_8h.html#a15">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a32">wsseapi.c</a><li>soap_wsse_add_Signature()

+: <a class="el" href="wsseapi_8h.html#a18">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a35">wsseapi.c</a><li>soap_wsse_add_SignatureValue()

+: <a class="el" href="wsseapi_8h.html#a41">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a58">wsseapi.c</a><li>soap_wsse_add_SignedInfo()

+: <a class="el" href="wsseapi_8h.html#a36">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a53">wsseapi.c</a><li>soap_wsse_add_SignedInfo_Reference()

+: <a class="el" href="wsseapi_8h.html#a37">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a54">wsseapi.c</a><li>soap_wsse_add_SignedInfo_SignatureMethod()

+: <a class="el" href="wsseapi_8h.html#a38">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a55">wsseapi.c</a><li>soap_wsse_add_Timestamp()

+: <a class="el" href="wsseapi_8h.html#a21">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a38">wsseapi.c</a><li>soap_wsse_add_UsernameTokenDigest()

+: <a class="el" href="wsseapi_8h.html#a25">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a42">wsseapi.c</a><li>soap_wsse_add_UsernameTokenText()

+: <a class="el" href="wsseapi_8h.html#a24">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a41">wsseapi.c</a><li>soap_wsse_BinarySecurityToken()

+: <a class="el" href="wsseapi_8h.html#a32">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a49">wsseapi.c</a><li>soap_wsse_copy()

+: <a class="el" href="wsseapi_8c.html#a24">wsseapi.c</a><li>soap_wsse_delete()

+: <a class="el" href="wsseapi_8c.html#a25">wsseapi.c</a><li>soap_wsse_delete_Security()

+: <a class="el" href="wsseapi_8h.html#a16">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a33">wsseapi.c</a><li>soap_wsse_delete_Signature()

+: <a class="el" href="wsseapi_8h.html#a19">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a36">wsseapi.c</a><li>soap_wsse_disconnect()

+: <a class="el" href="wsseapi_8c.html#a30">wsseapi.c</a><li>soap_wsse_fault()

+: <a class="el" href="wsseapi_8h.html#a57">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a74">wsseapi.c</a><li>soap_wsse_get_BinarySecurityToken()

+: <a class="el" href="wsseapi_8h.html#a33">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a50">wsseapi.c</a><li>soap_wsse_get_BinarySecurityTokenX509()

+: <a class="el" href="wsseapi_8h.html#a34">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a51">wsseapi.c</a><li>soap_wsse_get_KeyInfo_KeyName()

+: <a class="el" href="wsseapi_8h.html#a48">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a65">wsseapi.c</a><li>soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifier()

+: <a class="el" href="wsseapi_8h.html#a55">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a72">wsseapi.c</a><li>soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifierValueType()

+: <a class="el" href="wsseapi_8h.html#a54">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a71">wsseapi.c</a><li>soap_wsse_get_KeyInfo_SecurityTokenReferenceURI()

+: <a class="el" href="wsseapi_8h.html#a51">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a68">wsseapi.c</a><li>soap_wsse_get_KeyInfo_SecurityTokenReferenceX509()

+: <a class="el" href="wsseapi_8h.html#a52">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a69">wsseapi.c</a><li>soap_wsse_get_SignedInfo_SignatureMethod()

+: <a class="el" href="wsseapi_8h.html#a40">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a57">wsseapi.c</a><li>soap_wsse_get_Username()

+: <a class="el" href="wsseapi_8h.html#a27">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a44">wsseapi.c</a><li>soap_wsse_init()

+: <a class="el" href="wsseapi_8c.html#a23">wsseapi.c</a><li>soap_wsse_KeyInfo()

+: <a class="el" href="wsseapi_8h.html#a46">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a63">wsseapi.c</a><li>soap_wsse_preparecleanup()

+: <a class="el" href="wsseapi_8c.html#a29">wsseapi.c</a><li>soap_wsse_preparefinal()

+: <a class="el" href="wsseapi_8c.html#a28">wsseapi.c</a><li>soap_wsse_prepareinit()

+: <a class="el" href="wsseapi_8c.html#a26">wsseapi.c</a><li>soap_wsse_preparesend()

+: <a class="el" href="wsseapi_8c.html#a27">wsseapi.c</a><li>soap_wsse_Security()

+: <a class="el" href="wsseapi_8h.html#a17">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a34">wsseapi.c</a><li>soap_wsse_session_cleanup()

+: <a class="el" href="wsseapi_8c.html#a20">wsseapi.c</a><li>soap_wsse_session_verify()

+: <a class="el" href="wsseapi_8c.html#a19">wsseapi.c</a><li>soap_wsse_sign()

+: <a class="el" href="wsseapi_8h.html#a59">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a76">wsseapi.c</a><li>soap_wsse_sign_body()

+: <a class="el" href="wsseapi_8h.html#a60">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a77">wsseapi.c</a><li>soap_wsse_Signature()

+: <a class="el" href="wsseapi_8h.html#a20">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a37">wsseapi.c</a><li>soap_wsse_SignedInfo()

+: <a class="el" href="wsseapi_8h.html#a39">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a56">wsseapi.c</a><li>soap_wsse_Timestamp()

+: <a class="el" href="wsseapi_8h.html#a22">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a39">wsseapi.c</a><li>soap_wsse_UsernameToken()

+: <a class="el" href="wsseapi_8h.html#a26">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a43">wsseapi.c</a><li>soap_wsse_verify_auto()

+: <a class="el" href="wsseapi_8h.html#a62">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a79">wsseapi.c</a><li>soap_wsse_verify_digest()

+: <a class="el" href="wsseapi_8h.html#a44">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a61">wsseapi.c</a><li>soap_wsse_verify_done()

+: <a class="el" href="wsseapi_8h.html#a63">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a80">wsseapi.c</a><li>soap_wsse_verify_init()

+: <a class="el" href="wsseapi_8h.html#a61">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a78">wsseapi.c</a><li>soap_wsse_verify_Password()

+: <a class="el" href="wsseapi_8h.html#a28">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a45">wsseapi.c</a><li>soap_wsse_verify_SignatureValue()

+: <a class="el" href="wsseapi_8h.html#a42">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a59">wsseapi.c</a><li>soap_wsse_verify_SignedInfo()

+: <a class="el" href="wsseapi_8h.html#a43">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a60">wsseapi.c</a><li>soap_wsse_verify_Timestamp()

+: <a class="el" href="wsseapi_8h.html#a23">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a40">wsseapi.c</a><li>soap_wsse_verify_X509()

+: <a class="el" href="wsseapi_8h.html#a35">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a52">wsseapi.c</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/globals_type.html b/doc/wsse/html/globals_type.html
new file mode 100644
index 0000000..e706aa8
--- /dev/null
+++ b/doc/wsse/html/globals_type.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: File Members - Typedefs</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindexHL" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<div class="qindex"><a class="qindex" href="globals.html">All</a> | <a class="qindex" href="globals_func.html">Functions</a> | <a class="qindex" href="globals_vars.html">Variables</a> | <a class="qindexHL" href="globals_type.html">Typedefs</a> | <a class="qindex" href="globals_enum.html">Enumerations</a> | <a class="qindex" href="globals_eval.html">Enumeration&nbsp;values</a> | <a class="qindex" href="globals_defs.html">Defines</a></div>

+

+<p>

+<ul>

+<li>_c14n__InclusiveNamespaces

+: <a class="el" href="c14n_8h.html#a0">c14n.h</a><li>_wsse__BinarySecurityToken

+: <a class="el" href="wsse_8h.html#a2">wsse.h</a><li>_wsse__Embedded

+: <a class="el" href="wsse_8h.html#a4">wsse.h</a><li>_wsse__KeyIdentifier

+: <a class="el" href="wsse_8h.html#a5">wsse.h</a><li>_wsse__Password

+: <a class="el" href="wsse_8h.html#a8">wsse.h</a><li>_wsse__Reference

+: <a class="el" href="wsse_8h.html#a3">wsse.h</a><li>_wsse__Security

+: <a class="el" href="wsse_8h.html#a7">wsse.h</a><li>_wsse__SecurityTokenReference

+: <a class="el" href="wsse_8h.html#a6">wsse.h</a><li>_wsse__UsernameToken

+: <a class="el" href="wsse_8h.html#a1">wsse.h</a><li>_wsu__Timestamp

+: <a class="el" href="wsu_8h.html#a1">wsu.h</a><li>ds__CanonicalizationMethodType

+: <a class="el" href="ds_8h.html#a2">ds.h</a><li>ds__DigestMethodType

+: <a class="el" href="ds_8h.html#a7">ds.h</a><li>ds__DSAKeyValueType

+: <a class="el" href="ds_8h.html#a13">ds.h</a><li>ds__KeyInfoType

+: <a class="el" href="ds_8h.html#a8">ds.h</a><li>ds__KeyValueType

+: <a class="el" href="ds_8h.html#a9">ds.h</a><li>ds__ReferenceType

+: <a class="el" href="ds_8h.html#a4">ds.h</a><li>ds__RetrievalMethodType

+: <a class="el" href="ds_8h.html#a10">ds.h</a><li>ds__RSAKeyValueType

+: <a class="el" href="ds_8h.html#a14">ds.h</a><li>ds__SignatureMethodType

+: <a class="el" href="ds_8h.html#a3">ds.h</a><li>ds__SignatureType

+: <a class="el" href="ds_8h.html#a0">ds.h</a><li>ds__SignedInfoType

+: <a class="el" href="ds_8h.html#a1">ds.h</a><li>ds__TransformsType

+: <a class="el" href="ds_8h.html#a5">ds.h</a><li>ds__TransformType

+: <a class="el" href="ds_8h.html#a6">ds.h</a><li>ds__X509DataType

+: <a class="el" href="ds_8h.html#a11">ds.h</a><li>ds__X509IssuerSerialType

+: <a class="el" href="ds_8h.html#a12">ds.h</a><li>wsse__FaultcodeEnum

+: <a class="el" href="wsse_8h.html#a16">wsse.h</a><li>wsu__tTimestampFault

+: <a class="el" href="wsu_8h.html#a3">wsu.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/globals_vars.html b/doc/wsse/html/globals_vars.html
new file mode 100644
index 0000000..24e074b
--- /dev/null
+++ b/doc/wsse/html/globals_vars.html
@@ -0,0 +1,32 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: File Members - Variables</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindexHL" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<div class="qindex"><a class="qindex" href="globals.html">All</a> | <a class="qindex" href="globals_func.html">Functions</a> | <a class="qindexHL" href="globals_vars.html">Variables</a> | <a class="qindex" href="globals_type.html">Typedefs</a> | <a class="qindex" href="globals_enum.html">Enumerations</a> | <a class="qindex" href="globals_eval.html">Enumeration&nbsp;values</a> | <a class="qindex" href="globals_defs.html">Defines</a></div>

+

+<p>

+<ul>

+<li>c14n_URI

+: <a class="el" href="wsseapi_8h.html#a12">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a15">wsseapi.c</a><li>ds_dsa_sha1URI

+: <a class="el" href="wsseapi_8h.html#a9">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a12">wsseapi.c</a><li>ds_hmac_sha1URI

+: <a class="el" href="wsseapi_8h.html#a8">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a11">wsseapi.c</a><li>ds_rsa_sha1URI

+: <a class="el" href="wsseapi_8h.html#a10">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a13">wsseapi.c</a><li>ds_sha1URI

+: <a class="el" href="wsseapi_8h.html#a7">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a10">wsseapi.c</a><li>ds_URI

+: <a class="el" href="wsseapi_8h.html#a11">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a14">wsseapi.c</a><li>soap_wsse_id

+: <a class="el" href="wsseapi_8h.html#a1">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a4">wsseapi.c</a><li>soap_wsse_session

+: <a class="el" href="wsseapi_8c.html#a17">wsseapi.c</a><li>soap_wsse_session_lock

+: <a class="el" href="wsseapi_8c.html#a18">wsseapi.c</a><li>wsse_Base64BinaryURI

+: <a class="el" href="wsseapi_8h.html#a4">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a7">wsseapi.c</a><li>wsse_PasswordDigestURI

+: <a class="el" href="wsseapi_8h.html#a3">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a6">wsseapi.c</a><li>wsse_PasswordTextURI

+: <a class="el" href="wsseapi_8h.html#a2">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a5">wsseapi.c</a><li>wsse_X509v3SubjectKeyIdentifierURI

+: <a class="el" href="wsseapi_8h.html#a6">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a9">wsseapi.c</a><li>wsse_X509v3URI

+: <a class="el" href="wsseapi_8h.html#a5">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a8">wsseapi.c</a><li>wsu_URI

+: <a class="el" href="wsseapi_8h.html#a13">wsseapi.h</a>, <a class="el" href="wsseapi_8c.html#a16">wsseapi.c</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/graph_legend.dot b/doc/wsse/html/graph_legend.dot
new file mode 100644
index 0000000..5420927
--- /dev/null
+++ b/doc/wsse/html/graph_legend.dot
@@ -0,0 +1,22 @@
+digraph G
+{
+  edge [fontname="Helvetica",fontsize=10,labelfontname="Helvetica",labelfontsize=10];
+  node [fontname="Helvetica",fontsize=10,shape=record];
+  Node9 [shape="box",label="Inherited",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",style="filled" fontcolor="white"];
+  Node10 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="Helvetica"];
+  Node10 [shape="box",label="PublicBase",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classPublicBase.html"];
+  Node11 -> Node10 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="Helvetica"];
+  Node11 [shape="box",label="Truncated",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="red",URL="$classTruncated.html"];
+  Node13 -> Node9 [dir=back,color="darkgreen",fontsize=10,style="solid",fontname="Helvetica"];
+  Node13 [shape="box",label="ProtectedBase",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classProtectedBase.html"];
+  Node14 -> Node9 [dir=back,color="firebrick4",fontsize=10,style="solid",fontname="Helvetica"];
+  Node14 [shape="box",label="PrivateBase",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classPrivateBase.html"];
+  Node15 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="Helvetica"];
+  Node15 [shape="box",label="Undocumented",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="grey75"];
+  Node16 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="Helvetica"];
+  Node16 [shape="box",label="Templ< int >",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classTempl.html"];
+  Node17 -> Node16 [dir=back,color="orange",fontsize=10,style="dashed",label="< int >",fontname="Helvetica"];
+  Node17 [shape="box",label="Templ< T >",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classTempl.html"];
+  Node18 -> Node9 [dir=back,color="darkorchid3",fontsize=10,style="dashed",label="m_usedClass",fontname="Helvetica"];
+  Node18 [shape="box",label="Used",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classUsed.html"];
+}
diff --git a/doc/wsse/html/graph_legend.html b/doc/wsse/html/graph_legend.html
new file mode 100644
index 0000000..19be6bf
--- /dev/null
+++ b/doc/wsse/html/graph_legend.html
@@ -0,0 +1,74 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Graph Legend</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>Graph Legend</h1>This page explains how to interpret the graphs that are generated by doxygen.<p>

+Consider the following example: <div class="fragment"><pre><span class="comment">/*! Invisible class because of truncation */</span>

+<span class="keyword">class </span>Invisible { };

+<span class="comment"></span>

+<span class="comment">/*! Truncated class, inheritance relation is hidden */</span>

+<span class="keyword">class </span>Truncated : <span class="keyword">public</span> Invisible { };

+

+<span class="comment">/* Class not documented with doxygen comments */</span>

+<span class="keyword">class </span>Undocumented { };

+<span class="comment"></span>

+<span class="comment">/*! Class that is inherited using public inheritance */</span>

+<span class="keyword">class </span>PublicBase : <span class="keyword">public</span> Truncated { };

+<span class="comment"></span>

+<span class="comment">/*! A template class */</span>

+<span class="keyword">template</span>&lt;<span class="keyword">class</span> T&gt; <span class="keyword">class </span>Templ { };

+<span class="comment"></span>

+<span class="comment">/*! Class that is inherited using protected inheritance */</span>

+<span class="keyword">class </span>ProtectedBase { };

+<span class="comment"></span>

+<span class="comment">/*! Class that is inherited using private inheritance */</span>

+<span class="keyword">class </span>PrivateBase { };

+<span class="comment"></span>

+<span class="comment">/*! Class that is used by the Inherited class */</span>

+<span class="keyword">class </span>Used { };

+<span class="comment"></span>

+<span class="comment">/*! Super class that inherits a number of other classes */</span>

+<span class="keyword">class </span>Inherited : <span class="keyword">public</span> PublicBase,

+                  <span class="keyword">protected</span> ProtectedBase,

+                  <span class="keyword">private</span> PrivateBase,

+                  <span class="keyword">public</span> Undocumented

+                  <span class="keyword">public</span> Templ&lt;int&gt;

+{

+  <span class="keyword">private</span>:

+    Used *m_usedClass;

+};

+</pre></div>If the <code>MAX_DOT_GRAPH_HEIGHT</code> tag in the configuration file is set to 240 this will result in the following graph:<p>

+<center><div align="center">

+<img src="graph_legend.png" alt="graph_legend.png" alt>

+</div>

+</center> <p>

+The boxes in the above graph have the following meaning: <ul>

+<li>

+A filled black box represents the struct or class for which the graph is generated. </li>

+<li>

+A box with a black border denotes a documented struct or class. </li>

+<li>

+A box with a grey border denotes an undocumented struct or class. </li>

+<li>

+A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries. </li>

+</ul>

+The arrows have the following meaning: <ul>

+<li>

+A dark blue arrow is used to visualize a public inheritance relation between two classes. </li>

+<li>

+A dark green arrow is used for protected inheritance. </li>

+<li>

+A dark red arrow is used for private inheritance. </li>

+<li>

+A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible. </li>

+<li>

+A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance. </li>

+</ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/graph_legend.png b/doc/wsse/html/graph_legend.png
new file mode 100644
index 0000000..99342b5
--- /dev/null
+++ b/doc/wsse/html/graph_legend.png
Binary files differ
diff --git a/doc/wsse/html/index.html b/doc/wsse/html/index.html
new file mode 100644
index 0000000..e53d211
--- /dev/null
+++ b/doc/wsse/html/index.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Main Page</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindexHL" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>gSOAP WS-Security Documentation</h1>

+<p>

+<h3 align="center">Beta release </h3><ul>

+<li><a class="el" href="wsse.html">The wsse plugin</a> documents the wsse plugin for WS-Security 1.0 support.</li><li><a class="el" href="smdevp.html">The smdevp engine</a> documents the smdevp engine used by the wsse plugin. </li></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/pages.html b/doc/wsse/html/pages.html
new file mode 100644
index 0000000..910ebca
--- /dev/null
+++ b/doc/wsse/html/pages.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Page Index</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindexHL" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>gSOAP WS-Security Related Pages</h1>Here is a list of all related documentation pages:<ul>

+<li><a class="el" href="smdevp.html">The smdevp engine</a>

+

+<li><a class="el" href="wsse.html">The wsse plugin</a>

+

+</ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/smdevp.html b/doc/wsse/html/smdevp.html
new file mode 100644
index 0000000..cd8dc02
--- /dev/null
+++ b/doc/wsse/html/smdevp.html
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: The smdevp engine</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1><a class="anchor" name="smdevp">The smdevp engine</a></h1>The gSOAP smdevp engine computes (signed) message digests over any type of data using the EVP interface of OpenSSL. It currently supports MD5, SHA1, HMAC_SHA1, DSA_SHA1, and RSA_SHA1.<p>

+A digest or signature algorithm is selected with one the following constants:<p>

+<ul>

+<li><a class="el" href="smdevp_8h.html#a5">SOAP_SMD_DGST_MD5</a> to compute MD5 128-bit digests</li><li><a class="el" href="smdevp_8h.html#a6">SOAP_SMD_DGST_SHA1</a> to compute MD5 160-bit digests</li><li><a class="el" href="smdevp_8h.html#a7">SOAP_SMD_HMAC_SHA1</a> to compute HMAC-SHA1 message authentication code</li><li><a class="el" href="smdevp_8h.html#a8">SOAP_SMD_SIGN_DSA_SHA1</a> to compute DSA-SHA1 signatures</li><li><a class="el" href="smdevp_8h.html#a9">SOAP_SMD_SIGN_RSA_SHA1</a> to compute RSA-SHA1 signatures</li><li><a class="el" href="smdevp_8h.html#a10">SOAP_SMD_VRFY_DSA_SHA1</a> to verify DSA-SHA1 signatures</li><li><a class="el" href="smdevp_8h.html#a11">SOAP_SMD_VRFY_RSA_SHA1</a> to verify RSA-SHA1 signatures</li></ul>

+<p>

+The smdevp engine wraps the EVP API with three new functions:<p>

+<ul>

+<li><a class="el" href="smdevp_8h.html#a15">soap_smd_init</a> to initialize the engine</li><li><a class="el" href="smdevp_8h.html#a16">soap_smd_update</a> to update the state with a message part</li><li><a class="el" href="smdevp_8h.html#a17">soap_smd_final</a> to compute the digest, signature, or verify a signature</li></ul>

+<p>

+A higher-level interface for computing (signed) message digests over messages produced by the gSOAP enginre is defined by two new functions:<p>

+<ul>

+<li><a class="el" href="smdevp_8h.html#a13">soap_smd_begin</a> to start a digest or signature computation/verification</li><li><a class="el" href="smdevp_8h.html#a14">soap_smd_end</a> to complete a digest/signature computation/verification</li></ul>

+<p>

+Here is an example to sign an XML serialized C++ object using an RSA private key applied to the SHA1 digest of the serialized object:<p>

+<div class="fragment"><pre>    ns__Object *object = ...;

+    <span class="keywordtype">int</span> alg = <a class="code" href="smdevp_8h.html#a9">SOAP_SMD_SIGN_RSA_SHA1</a>;

+    FILE *fd = fopen(<span class="stringliteral">"key.pem"</span>, <span class="stringliteral">"r"</span>);

+    EVP_PKEY *key = PEM_read_PrivateKey(fd, NULL, NULL, <span class="stringliteral">"password"</span>);

+    <span class="keywordtype">char</span> *sig = (<span class="keywordtype">char</span>*)SOAP_MALLOC(soap, <a class="code" href="smdevp_8c.html#a3">soap_smd_size</a>(alg, key));

+    <span class="keywordtype">int</span> siglen;

+    fclose(fd);

+    <span class="keywordflow">if</span> (<a class="code" href="smdevp_8c.html#a4">soap_smd_begin</a>(soap, alg, key, 0)

+     || soap_out_ns__Object(soap, <span class="stringliteral">"ns:Object"</span>, 0, object, NULL)

+     || <a class="code" href="smdevp_8c.html#a5">soap_smd_end</a>(soap, sig, &amp;siglen))

+      soap_print_fault(soap, stderr);

+    <span class="keywordflow">else</span>

+      ... <span class="comment">// sig contains RSA-SHA1 signature of length siglen </span>

+</pre></div><p>

+To verify the signature, we use the RSA public key and re-run the octet stream (by re-serialization in this example) through the smdevp engine using the SOAP_SMD_VRFY_RSA_SHA1 algorithm. Note that a PEM file may contain both the (encrypted) private and public keys.<p>

+<div class="fragment"><pre>    <span class="keywordtype">char</span> *sig = ...;

+    <span class="keywordtype">int</span> siglen = ...;

+    ns__Object *object = ...;

+    <span class="keywordtype">int</span> alg = <a class="code" href="smdevp_8h.html#a11">SOAP_SMD_VRFY_RSA_SHA1</a>;

+    FILE *fd = fopen(<span class="stringliteral">"key.pem"</span>, <span class="stringliteral">"r"</span>);

+    EVP_PKEY *key = PEM_read_PUBKEY(fd, NULL, NULL, NULL);

+    fclose(fd);

+    <span class="keywordflow">if</span> (<a class="code" href="smdevp_8c.html#a4">soap_smd_begin</a>(soap, alg, key, 0)

+     || soap_out_ns__Object(soap, <span class="stringliteral">"ns:Object"</span>, 0, object, NULL)

+     || <a class="code" href="smdevp_8c.html#a5">soap_smd_end</a>(soap, sig, &amp;siglen))

+      soap_print_fault(soap, stderr);

+    <span class="keywordflow">else</span>

+      ... <span class="comment">// sig verified, i.e. signed object was not changed</span>

+</pre></div><p>

+The HMAC algorithm uses a secret key (which both the sender and receiver must keep secret) to sign and verify a message:<p>

+<div class="fragment"><pre>    ns__Object *object = ...;

+    <span class="keywordtype">int</span> alg = <a class="code" href="smdevp_8h.html#a7">SOAP_SMD_HMAC_SHA1</a>;

+    <span class="keyword">static</span> <span class="keywordtype">char</span> key[16] =

+    { 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88,

+      0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00 };

+    <span class="keywordtype">char</span> *sig = (<span class="keywordtype">char</span>*)SOAP_MALLOC(soap, <a class="code" href="smdevp_8c.html#a3">soap_smd_size</a>(alg, NULL));

+    <span class="keywordtype">int</span> siglen;

+    <span class="keywordflow">if</span> (<a class="code" href="smdevp_8c.html#a4">soap_smd_begin</a>(soap, alg, key, <span class="keyword">sizeof</span>(key))

+     || soap_out_ns__Object(soap, <span class="stringliteral">"ns:Object"</span>, 0, object, NULL)

+     || <a class="code" href="smdevp_8c.html#a5">soap_smd_end</a>(soap, sig, &amp;siglen))

+      soap_print_fault(soap, stderr);

+    <span class="keywordflow">else</span>

+      ... <span class="comment">// sig holds the signature</span>

+</pre></div><p>

+Note: HMAC signature verification proceeds by recomputing the signature value for comparison.<p>

+A digest is a hash value of an octet stream computed using the MD5 or SHA1 algorithms:<p>

+<div class="fragment"><pre>    ns__Object *object = ...;

+    <span class="keywordtype">int</span> alg = <a class="code" href="smdevp_8h.html#a6">SOAP_SMD_DGST_SHA1</a>;

+    <span class="keywordtype">char</span> *digest = (<span class="keywordtype">char</span>*)SOAP_MALLOC(soap, <a class="code" href="smdevp_8c.html#a3">soap_smd_size</a>(alg, NULL));

+    <span class="keywordtype">int</span> digestlen;

+    <span class="keywordflow">if</span> (<a class="code" href="smdevp_8c.html#a4">soap_smd_begin</a>(soap, alg, NULL, 0)

+     || soap_out_ns__Object(soap, <span class="stringliteral">"ns:Object"</span>, 0, object, NULL)

+     || <a class="code" href="smdevp_8c.html#a5">soap_smd_end</a>(soap, digest, &amp;digestlen))

+      soap_print_fault(soap, stderr);

+    <span class="keywordflow">else</span>

+      ... <span class="comment">// digest holds hash value of serialized object</span>

+</pre></div><p>

+Note that indentation (SOAP_XML_INDENT) and exc-c14n canonicalization (SOAP_XML_CANONICAL) affects the XML serialization format and, therefore, the digest or signature produced. <hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/smdevp_8c.html b/doc/wsse/html/smdevp_8c.html
new file mode 100644
index 0000000..b94555f
--- /dev/null
+++ b/doc/wsse/html/smdevp_8c.html
@@ -0,0 +1,561 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: /Users/engelen/Projects/gsoap/doc/wsse/smdevp.c File Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>/Users/engelen/Projects/gsoap/doc/wsse/smdevp.c File Reference</h1><code>#include "<a class="el" href="smdevp_8h.html">smdevp.h</a>"</code><br>

+

+<p>

+Include dependency graph for smdevp.c:<p><center><img src="smdevp_8c__incl.png" border="0" usemap="#smdevp.c_map" alt="Include dependency graph"></center>

+<map name="smdevp.c_map">

+<area href="smdevp_8h.html" shape="rect" coords="11,92,77,118" alt="">

+</map>

+<table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8c.html#a0">soap_smd_send</a> (struct soap *soap, const char *buf, size_t len)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Callback to intercept messages for digest or signature computation.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8c.html#a1">soap_smd_recv</a> (struct soap *soap, char *buf, size_t len)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Dummy callback to avoid read operations from blocking.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8c.html#a2">soap_smd_check</a> (struct soap *soap, struct <a class="el" href="structsoap__smd__data.html">soap_smd_data</a> *data, int err, const char *msg)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check result of init/update/final smdevp engine operations.  <a href="#a2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8c.html#a3">soap_smd_size</a> (int alg, const void *key)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of octets needed to store the digest or signature returned by soap_smd_end.  <a href="#a3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8c.html#a4">soap_smd_begin</a> (struct soap *soap, int alg, const void *key, int keylen)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initiates a digest or signature computation.  <a href="#a4"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8c.html#a5">soap_smd_end</a> (struct soap *soap, char *buf, int *len)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Completes a digest or signature computation.  <a href="#a5"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8c.html#a6">soap_smd_init</a> (struct soap *soap, struct <a class="el" href="structsoap__smd__data.html">soap_smd_data</a> *data, int alg, const void *key, int keylen)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initiates a (signed) digest computation.  <a href="#a6"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8c.html#a7">soap_smd_update</a> (struct soap *soap, struct <a class="el" href="structsoap__smd__data.html">soap_smd_data</a> *data, const char *buf, size_t len)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Updates (signed) digest computation with message part.  <a href="#a7"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8c.html#a8">soap_smd_final</a> (struct soap *soap, struct <a class="el" href="structsoap__smd__data.html">soap_smd_data</a> *data, char *buf, int *len)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Finalizes (signed) digest computation and returns digest or signature.  <a href="#a8"></a><br></td></tr>

+</table>

+<hr><h2>Function Documentation</h2>

+<a class="anchor" name="a4" doxytag="smdevp.c::soap_smd_begin" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_smd_begin           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>alg</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const void *&nbsp;</td>

+          <td class="mdname" nowrap> <em>key</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>keylen</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Initiates a digest or signature computation. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>alg</em>&nbsp;</td><td>is the digest or signature (sign/verification) algorithm used </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>key</em>&nbsp;</td><td>is a HMAC key or pointer to EVP_PKEY object or NULL for digests </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>keylen</em>&nbsp;</td><td>is the length of the HMAC key or 0 </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK, SOAP_EOM, or SOAP_SSL_ERROR </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a2" doxytag="smdevp.c::soap_smd_check" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_smd_check           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>struct <a class="el" href="structsoap__smd__data.html">soap_smd_data</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>data</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>err</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>msg</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"><code> [static]</code></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Check result of init/update/final smdevp engine operations. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in,out]</tt>&nbsp;</td><td valign=top><em>data</em>&nbsp;</td><td>smdevp engine context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>err</em>&nbsp;</td><td>OpenSSL error value </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>msg</em>&nbsp;</td><td>error message </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or SOAP_SSL_ERROR </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a5" doxytag="smdevp.c::soap_smd_end" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_smd_end           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>buf</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int *&nbsp;</td>

+          <td class="mdname" nowrap> <em>len</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Completes a digest or signature computation. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>buf</em>&nbsp;</td><td>contains signature for verification (when using a SOAP_SMD_VRFY algorithm) </td></tr>

+    <tr><td><tt>[out]</tt>&nbsp;</td><td valign=top><em>buf</em>&nbsp;</td><td>is populated with the digest or signature </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>len</em>&nbsp;</td><td>points to length of signature to verify (when using a SOAP_SMD_VRFY algorithm) </td></tr>

+    <tr><td><tt>[out]</tt>&nbsp;</td><td valign=top><em>len</em>&nbsp;</td><td>points to length of stored digest or signature (when not NULL) </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK, SOAP_USER_ERROR, or SOAP_SSL_ERROR </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a8" doxytag="smdevp.c::soap_smd_final" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_smd_final           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>struct <a class="el" href="structsoap__smd__data.html">soap_smd_data</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>data</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>buf</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int *&nbsp;</td>

+          <td class="mdname" nowrap> <em>len</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Finalizes (signed) digest computation and returns digest or signature. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in,out]</tt>&nbsp;</td><td valign=top><em>data</em>&nbsp;</td><td>smdevp engine context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>buf</em>&nbsp;</td><td>contains signature for verification (SOAP_SMD_VRFY algorithms) </td></tr>

+    <tr><td><tt>[out]</tt>&nbsp;</td><td valign=top><em>buf</em>&nbsp;</td><td>is populated with the digest or signature </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>len</em>&nbsp;</td><td>points to length of signature to verify (SOAP_SMD_VRFY algorithms) </td></tr>

+    <tr><td><tt>[out]</tt>&nbsp;</td><td valign=top><em>len</em>&nbsp;</td><td>points to length of stored digest or signature (pass NULL if you are not interested in this value) </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or SOAP_SSL_ERROR </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a6" doxytag="smdevp.c::soap_smd_init" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_smd_init           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>struct <a class="el" href="structsoap__smd__data.html">soap_smd_data</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>data</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>alg</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const void *&nbsp;</td>

+          <td class="mdname" nowrap> <em>key</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>keylen</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Initiates a (signed) digest computation. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in,out]</tt>&nbsp;</td><td valign=top><em>data</em>&nbsp;</td><td>smdevp engine context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>alg</em>&nbsp;</td><td>is algorithm to use </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>key</em>&nbsp;</td><td>is key to use or NULL for digests </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>keylen</em>&nbsp;</td><td>is length of HMAC key (when provided) </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or SOAP_SSL_ERROR </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="smdevp.c::soap_smd_recv" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> size_t soap_smd_recv           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>buf</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>size_t&nbsp;</td>

+          <td class="mdname" nowrap> <em>len</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"><code> [static]</code></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Dummy callback to avoid read operations from blocking. 

+<p>

+<dl compact><dt><b>Returns:</b></dt><dd>0 </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a0" doxytag="smdevp.c::soap_smd_send" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_smd_send           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>buf</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>size_t&nbsp;</td>

+          <td class="mdname" nowrap> <em>len</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"><code> [static]</code></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Callback to intercept messages for digest or signature computation. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>buf</em>&nbsp;</td><td>message </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>len</em>&nbsp;</td><td>message length </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or SOAP_SSL_ERROR </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a3" doxytag="smdevp.c::soap_smd_size" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> size_t soap_smd_size           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">int&nbsp;</td>

+          <td class="mdname" nowrap> <em>alg</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const void *&nbsp;</td>

+          <td class="mdname" nowrap> <em>key</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns the number of octets needed to store the digest or signature returned by soap_smd_end. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>alg</em>&nbsp;</td><td>is the digest or signature algorithm to be used </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>key</em>&nbsp;</td><td>is a pointer to an EVP_PKEY object for RSA/DSA signatures or NULL for digests and HMAC </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>size_t number of octets that is needed to hold digest or signature </dd></dl>

+<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="smdevp_8h.html#a14">soap_smd_end</a></dd></dl>

+The values returned for digests are SOAP_SMD_MD5_SIZE and SOAP_SMD_SHA1_SIZE.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a7" doxytag="smdevp.c::soap_smd_update" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_smd_update           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>struct <a class="el" href="structsoap__smd__data.html">soap_smd_data</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>data</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>buf</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>size_t&nbsp;</td>

+          <td class="mdname" nowrap> <em>len</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Updates (signed) digest computation with message part. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in,out]</tt>&nbsp;</td><td valign=top><em>data</em>&nbsp;</td><td>smdevp engine context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>buf</em>&nbsp;</td><td>contains message part </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>len</em>&nbsp;</td><td>of message part </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or SOAP_SSL_ERROR </dd></dl>

+    </td>

+  </tr>

+</table>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/smdevp_8c__incl.map b/doc/wsse/html/smdevp_8c__incl.map
new file mode 100644
index 0000000..42712ee
--- /dev/null
+++ b/doc/wsse/html/smdevp_8c__incl.map
@@ -0,0 +1,2 @@
+base referer
+rect $smdevp_8h.html 11,92 77,118
diff --git a/doc/wsse/html/smdevp_8c__incl.md5 b/doc/wsse/html/smdevp_8c__incl.md5
new file mode 100644
index 0000000..1a6c2fe
--- /dev/null
+++ b/doc/wsse/html/smdevp_8c__incl.md5
@@ -0,0 +1 @@
+decd345412f47d6dc07e522a2d4eba03
\ No newline at end of file
diff --git a/doc/wsse/html/smdevp_8c__incl.png b/doc/wsse/html/smdevp_8c__incl.png
new file mode 100644
index 0000000..0ad1c4b
--- /dev/null
+++ b/doc/wsse/html/smdevp_8c__incl.png
Binary files differ
diff --git a/doc/wsse/html/smdevp_8h.html b/doc/wsse/html/smdevp_8h.html
new file mode 100644
index 0000000..5a64e52
--- /dev/null
+++ b/doc/wsse/html/smdevp_8h.html
@@ -0,0 +1,704 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: /Users/engelen/Projects/gsoap/doc/wsse/smdevp.h File Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>/Users/engelen/Projects/gsoap/doc/wsse/smdevp.h File Reference</h1><code>#include "stdsoap2.h"</code><br>

+

+<p>

+Include dependency graph for smdevp.h:<p><center><img src="smdevp_8h__incl.png" border="0" usemap="#smdevp.h_map" alt="Include dependency graph"></center>

+

+<p>

+This graph shows which files directly or indirectly include this file:<p><center><img src="smdevp_8h__dep__incl.png" border="0" usemap="#smdevp.hdep_map" alt="Included by dependency graph"></center>

+<map name="smdevp.hdep_map">

+<area href="smdevp_8c.html" shape="rect" coords="6,92,76,118" alt="">

+<area href="wsseapi_8h.html" shape="rect" coords="150,92,220,118" alt="">

+<area href="wsseapi_8c.html" shape="rect" coords="114,17,184,44" alt="">

+</map>

+<table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Classes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__smd__data.html">soap_smd_data</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The smdevp engine context data.  <a href="structsoap__smd__data.html#_details">More...</a><br></td></tr>

+<tr><td colspan=2><br><h2>Defines</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8h.html#a0">SOAP_SMD_KEY_TYPE</a>&nbsp;&nbsp;&nbsp;EVP_PKEY</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8h.html#a1">SOAP_SMD_MAX_SIZE</a>&nbsp;&nbsp;&nbsp;EVP_MAX_MD_SIZE</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8h.html#a2">SOAP_SMD_MD5_SIZE</a>&nbsp;&nbsp;&nbsp;(16)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8h.html#a3">SOAP_SMD_SHA1_SIZE</a>&nbsp;&nbsp;&nbsp;(20)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8h.html#a4">SOAP_SMD_NONE</a>&nbsp;&nbsp;&nbsp;(0)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8h.html#a5">SOAP_SMD_DGST_MD5</a>&nbsp;&nbsp;&nbsp;(1)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8h.html#a6">SOAP_SMD_DGST_SHA1</a>&nbsp;&nbsp;&nbsp;(2)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8h.html#a7">SOAP_SMD_HMAC_SHA1</a>&nbsp;&nbsp;&nbsp;(3)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8h.html#a8">SOAP_SMD_SIGN_DSA_SHA1</a>&nbsp;&nbsp;&nbsp;(4)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8h.html#a9">SOAP_SMD_SIGN_RSA_SHA1</a>&nbsp;&nbsp;&nbsp;(5)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8h.html#a10">SOAP_SMD_VRFY_DSA_SHA1</a>&nbsp;&nbsp;&nbsp;(6)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8h.html#a11">SOAP_SMD_VRFY_RSA_SHA1</a>&nbsp;&nbsp;&nbsp;(7)</td></tr>

+

+<tr><td colspan=2><br><h2>Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8h.html#a12">soap_smd_size</a> (int alg, const void *key)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of octets needed to store the digest or signature returned by soap_smd_end.  <a href="#a12"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8h.html#a13">soap_smd_begin</a> (struct soap *soap, int alg, const void *key, int keylen)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initiates a digest or signature computation.  <a href="#a13"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8h.html#a14">soap_smd_end</a> (struct soap *soap, char *buf, int *len)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Completes a digest or signature computation.  <a href="#a14"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8h.html#a15">soap_smd_init</a> (struct soap *soap, struct <a class="el" href="structsoap__smd__data.html">soap_smd_data</a> *data, int alg, const void *key, int keylen)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initiates a (signed) digest computation.  <a href="#a15"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8h.html#a16">soap_smd_update</a> (struct soap *soap, struct <a class="el" href="structsoap__smd__data.html">soap_smd_data</a> *data, const char *buf, size_t len)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Updates (signed) digest computation with message part.  <a href="#a16"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="smdevp_8h.html#a17">soap_smd_final</a> (struct soap *soap, struct <a class="el" href="structsoap__smd__data.html">soap_smd_data</a> *data, char *buf, int *len)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Finalizes (signed) digest computation and returns digest or signature.  <a href="#a17"></a><br></td></tr>

+</table>

+<hr><h2>Define Documentation</h2>

+<a class="anchor" name="a5" doxytag="smdevp.h::SOAP_SMD_DGST_MD5" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> #define SOAP_SMD_DGST_MD5&nbsp;&nbsp;&nbsp;(1)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+MD5 digest algorithm     </td>

+  </tr>

+</table>

+<a class="anchor" name="a6" doxytag="smdevp.h::SOAP_SMD_DGST_SHA1" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> #define SOAP_SMD_DGST_SHA1&nbsp;&nbsp;&nbsp;(2)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+SHA1 digest algorithm     </td>

+  </tr>

+</table>

+<a class="anchor" name="a7" doxytag="smdevp.h::SOAP_SMD_HMAC_SHA1" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> #define SOAP_SMD_HMAC_SHA1&nbsp;&nbsp;&nbsp;(3)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+HMAC-SHA1 shared key signature algorithm     </td>

+  </tr>

+</table>

+<a class="anchor" name="a0" doxytag="smdevp.h::SOAP_SMD_KEY_TYPE" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> #define SOAP_SMD_KEY_TYPE&nbsp;&nbsp;&nbsp;EVP_PKEY          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Expose EVP_PKEY in a portable representation     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="smdevp.h::SOAP_SMD_MAX_SIZE" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> #define SOAP_SMD_MAX_SIZE&nbsp;&nbsp;&nbsp;EVP_MAX_MD_SIZE          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Expose EVP_MAX_MD_SIZE in a portable representation     </td>

+  </tr>

+</table>

+<a class="anchor" name="a2" doxytag="smdevp.h::SOAP_SMD_MD5_SIZE" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> #define SOAP_SMD_MD5_SIZE&nbsp;&nbsp;&nbsp;(16)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+MD5 digest size in octets     </td>

+  </tr>

+</table>

+<a class="anchor" name="a4" doxytag="smdevp.h::SOAP_SMD_NONE" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> #define SOAP_SMD_NONE&nbsp;&nbsp;&nbsp;(0)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a3" doxytag="smdevp.h::SOAP_SMD_SHA1_SIZE" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> #define SOAP_SMD_SHA1_SIZE&nbsp;&nbsp;&nbsp;(20)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+SHA1 digest size in octets     </td>

+  </tr>

+</table>

+<a class="anchor" name="a8" doxytag="smdevp.h::SOAP_SMD_SIGN_DSA_SHA1" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> #define SOAP_SMD_SIGN_DSA_SHA1&nbsp;&nbsp;&nbsp;(4)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+DSA-SHA1 secret key signature algorithm     </td>

+  </tr>

+</table>

+<a class="anchor" name="a9" doxytag="smdevp.h::SOAP_SMD_SIGN_RSA_SHA1" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> #define SOAP_SMD_SIGN_RSA_SHA1&nbsp;&nbsp;&nbsp;(5)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+RSA-SHA1 secret key signature algorithm     </td>

+  </tr>

+</table>

+<a class="anchor" name="a10" doxytag="smdevp.h::SOAP_SMD_VRFY_DSA_SHA1" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> #define SOAP_SMD_VRFY_DSA_SHA1&nbsp;&nbsp;&nbsp;(6)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+DSA-SHA1 secret key signature verification algorithm     </td>

+  </tr>

+</table>

+<a class="anchor" name="a11" doxytag="smdevp.h::SOAP_SMD_VRFY_RSA_SHA1" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> #define SOAP_SMD_VRFY_RSA_SHA1&nbsp;&nbsp;&nbsp;(7)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+RSA-SHA1 secret key signature verification algorithm     </td>

+  </tr>

+</table>

+<hr><h2>Function Documentation</h2>

+<a class="anchor" name="a13" doxytag="smdevp.h::soap_smd_begin" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_smd_begin           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>alg</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const void *&nbsp;</td>

+          <td class="mdname" nowrap> <em>key</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>keylen</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Initiates a digest or signature computation. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>alg</em>&nbsp;</td><td>is the digest or signature (sign/verification) algorithm used </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>key</em>&nbsp;</td><td>is a HMAC key or pointer to EVP_PKEY object or NULL for digests </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>keylen</em>&nbsp;</td><td>is the length of the HMAC key or 0 </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK, SOAP_EOM, or SOAP_SSL_ERROR </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a14" doxytag="smdevp.h::soap_smd_end" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_smd_end           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>buf</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int *&nbsp;</td>

+          <td class="mdname" nowrap> <em>len</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Completes a digest or signature computation. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>buf</em>&nbsp;</td><td>contains signature for verification (when using a SOAP_SMD_VRFY algorithm) </td></tr>

+    <tr><td><tt>[out]</tt>&nbsp;</td><td valign=top><em>buf</em>&nbsp;</td><td>is populated with the digest or signature </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>len</em>&nbsp;</td><td>points to length of signature to verify (when using a SOAP_SMD_VRFY algorithm) </td></tr>

+    <tr><td><tt>[out]</tt>&nbsp;</td><td valign=top><em>len</em>&nbsp;</td><td>points to length of stored digest or signature (when not NULL) </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK, SOAP_USER_ERROR, or SOAP_SSL_ERROR </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a17" doxytag="smdevp.h::soap_smd_final" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_smd_final           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>struct <a class="el" href="structsoap__smd__data.html">soap_smd_data</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>data</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>buf</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int *&nbsp;</td>

+          <td class="mdname" nowrap> <em>len</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Finalizes (signed) digest computation and returns digest or signature. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in,out]</tt>&nbsp;</td><td valign=top><em>data</em>&nbsp;</td><td>smdevp engine context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>buf</em>&nbsp;</td><td>contains signature for verification (SOAP_SMD_VRFY algorithms) </td></tr>

+    <tr><td><tt>[out]</tt>&nbsp;</td><td valign=top><em>buf</em>&nbsp;</td><td>is populated with the digest or signature </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>len</em>&nbsp;</td><td>points to length of signature to verify (SOAP_SMD_VRFY algorithms) </td></tr>

+    <tr><td><tt>[out]</tt>&nbsp;</td><td valign=top><em>len</em>&nbsp;</td><td>points to length of stored digest or signature (pass NULL if you are not interested in this value) </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or SOAP_SSL_ERROR </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a15" doxytag="smdevp.h::soap_smd_init" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_smd_init           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>struct <a class="el" href="structsoap__smd__data.html">soap_smd_data</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>data</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>alg</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const void *&nbsp;</td>

+          <td class="mdname" nowrap> <em>key</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>keylen</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Initiates a (signed) digest computation. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in,out]</tt>&nbsp;</td><td valign=top><em>data</em>&nbsp;</td><td>smdevp engine context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>alg</em>&nbsp;</td><td>is algorithm to use </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>key</em>&nbsp;</td><td>is key to use or NULL for digests </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>keylen</em>&nbsp;</td><td>is length of HMAC key (when provided) </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or SOAP_SSL_ERROR </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a12" doxytag="smdevp.h::soap_smd_size" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> size_t soap_smd_size           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">int&nbsp;</td>

+          <td class="mdname" nowrap> <em>alg</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const void *&nbsp;</td>

+          <td class="mdname" nowrap> <em>key</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns the number of octets needed to store the digest or signature returned by soap_smd_end. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>alg</em>&nbsp;</td><td>is the digest or signature algorithm to be used </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>key</em>&nbsp;</td><td>is a pointer to an EVP_PKEY object for RSA/DSA signatures or NULL for digests and HMAC </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>size_t number of octets that is needed to hold digest or signature </dd></dl>

+<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="smdevp_8h.html#a14">soap_smd_end</a></dd></dl>

+The values returned for digests are SOAP_SMD_MD5_SIZE and SOAP_SMD_SHA1_SIZE.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a16" doxytag="smdevp.h::soap_smd_update" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_smd_update           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>struct <a class="el" href="structsoap__smd__data.html">soap_smd_data</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>data</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>buf</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>size_t&nbsp;</td>

+          <td class="mdname" nowrap> <em>len</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Updates (signed) digest computation with message part. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in,out]</tt>&nbsp;</td><td valign=top><em>data</em>&nbsp;</td><td>smdevp engine context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>buf</em>&nbsp;</td><td>contains message part </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>len</em>&nbsp;</td><td>of message part </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or SOAP_SSL_ERROR </dd></dl>

+    </td>

+  </tr>

+</table>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/smdevp_8h__dep__incl.map b/doc/wsse/html/smdevp_8h__dep__incl.map
new file mode 100644
index 0000000..54d2858
--- /dev/null
+++ b/doc/wsse/html/smdevp_8h__dep__incl.map
@@ -0,0 +1,4 @@
+base referer
+rect $smdevp_8c.html 6,92 76,118
+rect $wsseapi_8h.html 150,92 220,118
+rect $wsseapi_8c.html 114,17 184,44
diff --git a/doc/wsse/html/smdevp_8h__dep__incl.md5 b/doc/wsse/html/smdevp_8h__dep__incl.md5
new file mode 100644
index 0000000..c40560c
--- /dev/null
+++ b/doc/wsse/html/smdevp_8h__dep__incl.md5
@@ -0,0 +1 @@
+95a7e0c3d579b9fe65e7b7cb102a0ccb
\ No newline at end of file
diff --git a/doc/wsse/html/smdevp_8h__dep__incl.png b/doc/wsse/html/smdevp_8h__dep__incl.png
new file mode 100644
index 0000000..2e01475
--- /dev/null
+++ b/doc/wsse/html/smdevp_8h__dep__incl.png
Binary files differ
diff --git a/doc/wsse/html/smdevp_8h__incl.map b/doc/wsse/html/smdevp_8h__incl.map
new file mode 100644
index 0000000..5a14779
--- /dev/null
+++ b/doc/wsse/html/smdevp_8h__incl.map
@@ -0,0 +1 @@
+base referer
diff --git a/doc/wsse/html/smdevp_8h__incl.md5 b/doc/wsse/html/smdevp_8h__incl.md5
new file mode 100644
index 0000000..ba3c974
--- /dev/null
+++ b/doc/wsse/html/smdevp_8h__incl.md5
@@ -0,0 +1 @@
+2eefbd7af22c1e8e040809721490a36b
\ No newline at end of file
diff --git a/doc/wsse/html/smdevp_8h__incl.png b/doc/wsse/html/smdevp_8h__incl.png
new file mode 100644
index 0000000..4ee25cd
--- /dev/null
+++ b/doc/wsse/html/smdevp_8h__incl.png
Binary files differ
diff --git a/doc/wsse/html/struct__c14n_____inclusive_namespaces-members.html b/doc/wsse/html/struct__c14n_____inclusive_namespaces-members.html
new file mode 100644
index 0000000..2caa7f2
--- /dev/null
+++ b/doc/wsse/html/struct__c14n_____inclusive_namespaces-members.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>_c14n__InclusiveNamespaces Member List</h1>This is the complete list of members for <a class="el" href="struct__c14n_____inclusive_namespaces.html">_c14n__InclusiveNamespaces</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="struct__c14n_____inclusive_namespaces.html#o0">PrefixList</a></td><td><a class="el" href="struct__c14n_____inclusive_namespaces.html">_c14n__InclusiveNamespaces</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/struct__c14n_____inclusive_namespaces.html b/doc/wsse/html/struct__c14n_____inclusive_namespaces.html
new file mode 100644
index 0000000..a2bf4f3
--- /dev/null
+++ b/doc/wsse/html/struct__c14n_____inclusive_namespaces.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: _c14n__InclusiveNamespaces Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>_c14n__InclusiveNamespaces Struct Reference</h1><code>#include &lt;c14n.h&gt;</code>

+<p>

+<a href="struct__c14n_____inclusive_namespaces-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__c14n_____inclusive_namespaces.html#o0">PrefixList</a></td></tr>

+

+</table>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="_c14n__InclusiveNamespaces::PrefixList" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__c14n_____inclusive_namespaces.html#o0">_c14n__InclusiveNamespaces::PrefixList</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="c14n_8h.html">c14n.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/struct__wsse_____binary_security_token-members.html b/doc/wsse/html/struct__wsse_____binary_security_token-members.html
new file mode 100644
index 0000000..8f9c7db
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____binary_security_token-members.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>_wsse__BinarySecurityToken Member List</h1>This is the complete list of members for <a class="el" href="struct__wsse_____binary_security_token.html">_wsse__BinarySecurityToken</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____binary_security_token.html#o0">__item</a></td><td><a class="el" href="struct__wsse_____binary_security_token.html">_wsse__BinarySecurityToken</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____binary_security_token.html#o3">EncodingType</a></td><td><a class="el" href="struct__wsse_____binary_security_token.html">_wsse__BinarySecurityToken</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____binary_security_token.html#o2">ValueType</a></td><td><a class="el" href="struct__wsse_____binary_security_token.html">_wsse__BinarySecurityToken</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____binary_security_token.html#o1">wsu__Id</a></td><td><a class="el" href="struct__wsse_____binary_security_token.html">_wsse__BinarySecurityToken</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/struct__wsse_____binary_security_token.html b/doc/wsse/html/struct__wsse_____binary_security_token.html
new file mode 100644
index 0000000..f88f3d0
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____binary_security_token.html
@@ -0,0 +1,129 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: _wsse__BinarySecurityToken Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>_wsse__BinarySecurityToken Struct Reference</h1>This element defines the wsse:BinarySecurityToken element per Section 4.2. Imported element _wsse__BinarySecurityToken from typemap WS/WS-typemap.dat.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;wsse.h&gt;</code>

+<p>

+<a href="struct__wsse_____binary_security_token-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____binary_security_token.html#o0">__item</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____binary_security_token.html#o1">wsu__Id</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____binary_security_token.html#o2">ValueType</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____binary_security_token.html#o3">EncodingType</a></td></tr>

+

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+This element defines the wsse:BinarySecurityToken element per Section 4.2. Imported element _wsse__BinarySecurityToken from typemap WS/WS-typemap.dat. 

+<p>

+Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":BinarySecurityToken of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":BinarySecurityTokenType. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="_wsse__BinarySecurityToken::__item" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsse_____binary_security_token.html#o0">_wsse__BinarySecurityToken::__item</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="_wsse__BinarySecurityToken::EncodingType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsse_____binary_security_token.html#o3">_wsse__BinarySecurityToken::EncodingType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="_wsse__BinarySecurityToken::ValueType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsse_____binary_security_token.html#o2">_wsse__BinarySecurityToken::ValueType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="_wsse__BinarySecurityToken::wsu__Id" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsse_____binary_security_token.html#o1">_wsse__BinarySecurityToken::wsu__Id</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="wsse_8h.html">wsse.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/struct__wsse_____embedded-members.html b/doc/wsse/html/struct__wsse_____embedded-members.html
new file mode 100644
index 0000000..cb3104b
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____embedded-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>_wsse__Embedded Member List</h1>This is the complete list of members for <a class="el" href="struct__wsse_____embedded.html">_wsse__Embedded</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____embedded.html#o1">ValueType</a></td><td><a class="el" href="struct__wsse_____embedded.html">_wsse__Embedded</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____embedded.html#o0">wsu__Id</a></td><td><a class="el" href="struct__wsse_____embedded.html">_wsse__Embedded</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/struct__wsse_____embedded.html b/doc/wsse/html/struct__wsse_____embedded.html
new file mode 100644
index 0000000..48397c1
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____embedded.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: _wsse__Embedded Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>_wsse__Embedded Struct Reference</h1>This element defines a security token embedded reference Imported element _wsse__Embedded from typemap WS/WS-typemap.dat.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;wsse.h&gt;</code>

+<p>

+<a href="struct__wsse_____embedded-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____embedded.html#o0">wsu__Id</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____embedded.html#o1">ValueType</a></td></tr>

+

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+This element defines a security token embedded reference Imported element _wsse__Embedded from typemap WS/WS-typemap.dat. 

+<p>

+Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":Embedded of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":EmbeddedType. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o1" doxytag="_wsse__Embedded::ValueType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsse_____embedded.html#o1">_wsse__Embedded::ValueType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="_wsse__Embedded::wsu__Id" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsse_____embedded.html#o0">_wsse__Embedded::wsu__Id</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="wsse_8h.html">wsse.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/struct__wsse_____key_identifier-members.html b/doc/wsse/html/struct__wsse_____key_identifier-members.html
new file mode 100644
index 0000000..f5baa12
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____key_identifier-members.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>_wsse__KeyIdentifier Member List</h1>This is the complete list of members for <a class="el" href="struct__wsse_____key_identifier.html">_wsse__KeyIdentifier</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____key_identifier.html#o0">__item</a></td><td><a class="el" href="struct__wsse_____key_identifier.html">_wsse__KeyIdentifier</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____key_identifier.html#o3">EncodingType</a></td><td><a class="el" href="struct__wsse_____key_identifier.html">_wsse__KeyIdentifier</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____key_identifier.html#o2">ValueType</a></td><td><a class="el" href="struct__wsse_____key_identifier.html">_wsse__KeyIdentifier</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____key_identifier.html#o1">wsu__Id</a></td><td><a class="el" href="struct__wsse_____key_identifier.html">_wsse__KeyIdentifier</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/struct__wsse_____key_identifier.html b/doc/wsse/html/struct__wsse_____key_identifier.html
new file mode 100644
index 0000000..3234a60
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____key_identifier.html
@@ -0,0 +1,129 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: _wsse__KeyIdentifier Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>_wsse__KeyIdentifier Struct Reference</h1>This element defines a key identifier reference Imported element _wsse__KeyIdentifier from typemap WS/WS-typemap.dat.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;wsse.h&gt;</code>

+<p>

+<a href="struct__wsse_____key_identifier-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____key_identifier.html#o0">__item</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____key_identifier.html#o1">wsu__Id</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____key_identifier.html#o2">ValueType</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____key_identifier.html#o3">EncodingType</a></td></tr>

+

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+This element defines a key identifier reference Imported element _wsse__KeyIdentifier from typemap WS/WS-typemap.dat. 

+<p>

+Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":KeyIdentifier of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":KeyIdentifierType. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="_wsse__KeyIdentifier::__item" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsse_____key_identifier.html#o0">_wsse__KeyIdentifier::__item</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="_wsse__KeyIdentifier::EncodingType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsse_____key_identifier.html#o3">_wsse__KeyIdentifier::EncodingType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="_wsse__KeyIdentifier::ValueType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsse_____key_identifier.html#o2">_wsse__KeyIdentifier::ValueType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="_wsse__KeyIdentifier::wsu__Id" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsse_____key_identifier.html#o1">_wsse__KeyIdentifier::wsu__Id</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="wsse_8h.html">wsse.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/struct__wsse_____password-members.html b/doc/wsse/html/struct__wsse_____password-members.html
new file mode 100644
index 0000000..7603235
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____password-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>_wsse__Password Member List</h1>This is the complete list of members for <a class="el" href="struct__wsse_____password.html">_wsse__Password</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____password.html#o0">__item</a></td><td><a class="el" href="struct__wsse_____password.html">_wsse__Password</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____password.html#o1">Type</a></td><td><a class="el" href="struct__wsse_____password.html">_wsse__Password</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/struct__wsse_____password.html b/doc/wsse/html/struct__wsse_____password.html
new file mode 100644
index 0000000..f600469
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____password.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: _wsse__Password Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>_wsse__Password Struct Reference</h1>This element contains properties for transformations from any namespace, including DSIG. '_wsse__TransformationParameters' element definition intentionally left blank.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;wsse.h&gt;</code>

+<p>

+<a href="struct__wsse_____password-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____password.html#o0">__item</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____password.html#o1">Type</a></td></tr>

+

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+This element contains properties for transformations from any namespace, including DSIG. '_wsse__TransformationParameters' element definition intentionally left blank. 

+<p>

+Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":Password of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":PasswordString. Imported element _wsse__Password from typemap WS/WS-typemap.dat. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="_wsse__Password::__item" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsse_____password.html#o0">_wsse__Password::__item</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="_wsse__Password::Type" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsse_____password.html#o1">_wsse__Password::Type</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="wsse_8h.html">wsse.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/struct__wsse_____reference-members.html b/doc/wsse/html/struct__wsse_____reference-members.html
new file mode 100644
index 0000000..d70e756
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____reference-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>_wsse__Reference Member List</h1>This is the complete list of members for <a class="el" href="struct__wsse_____reference.html">_wsse__Reference</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____reference.html#o0">URI</a></td><td><a class="el" href="struct__wsse_____reference.html">_wsse__Reference</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____reference.html#o1">ValueType</a></td><td><a class="el" href="struct__wsse_____reference.html">_wsse__Reference</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/struct__wsse_____reference.html b/doc/wsse/html/struct__wsse_____reference.html
new file mode 100644
index 0000000..0ae5788
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____reference.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: _wsse__Reference Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>_wsse__Reference Struct Reference</h1>This element defines a security token reference Imported element _wsse__Reference from typemap WS/WS-typemap.dat.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;wsse.h&gt;</code>

+<p>

+<a href="struct__wsse_____reference-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____reference.html#o0">URI</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____reference.html#o1">ValueType</a></td></tr>

+

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+This element defines a security token reference Imported element _wsse__Reference from typemap WS/WS-typemap.dat. 

+<p>

+Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":Reference of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":ReferenceType. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="_wsse__Reference::URI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsse_____reference.html#o0">_wsse__Reference::URI</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="_wsse__Reference::ValueType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsse_____reference.html#o1">_wsse__Reference::ValueType</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="wsse_8h.html">wsse.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/struct__wsse_____security-members.html b/doc/wsse/html/struct__wsse_____security-members.html
new file mode 100644
index 0000000..4a2c78d
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____security-members.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>_wsse__Security Member List</h1>This is the complete list of members for <a class="el" href="struct__wsse_____security.html">_wsse__Security</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____security.html#o2">BinarySecurityToken</a></td><td><a class="el" href="struct__wsse_____security.html">_wsse__Security</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____security.html#o3">ds__Signature</a></td><td><a class="el" href="struct__wsse_____security.html">_wsse__Security</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____security.html#o4">SOAP_ENV__actor</a></td><td><a class="el" href="struct__wsse_____security.html">_wsse__Security</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____security.html#o5">SOAP_ENV__role</a></td><td><a class="el" href="struct__wsse_____security.html">_wsse__Security</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____security.html#o1">UsernameToken</a></td><td><a class="el" href="struct__wsse_____security.html">_wsse__Security</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____security.html#o0">wsu__Timestamp</a></td><td><a class="el" href="struct__wsse_____security.html">_wsse__Security</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/struct__wsse_____security.html b/doc/wsse/html/struct__wsse_____security.html
new file mode 100644
index 0000000..2067453
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____security.html
@@ -0,0 +1,189 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: _wsse__Security Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>_wsse__Security Struct Reference</h1>This element defines the wsse:Security SOAP header element per Section 4. Imported element _wsse__Security from typemap WS/WS-typemap.dat.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;wsse.h&gt;</code>

+<p>

+Collaboration diagram for _wsse__Security:<p><center><img src="struct__wsse_____security__coll__graph.png" border="0" usemap="#__wsse_____security__coll__map" alt="Collaboration graph"></center>

+<map name="__wsse_____security__coll__map">

+<area href="structds_____signature_type.html" shape="rect" coords="84,108,209,134" alt="">

+<area href="structds_____signed_info_type.html" shape="rect" coords="7,17,140,44" alt="">

+<area href="structds_____key_info_type.html" shape="rect" coords="164,17,279,44" alt="">

+<area href="struct__wsse_____binary_security_token.html" shape="rect" coords="233,108,417,134" alt="">

+<area href="struct__wsse_____username_token.html" shape="rect" coords="441,108,601,134" alt="">

+<area href="struct__wsse_____password.html" shape="rect" coords="460,17,583,44" alt="">

+<area href="struct__wsu_____timestamp.html" shape="rect" coords="625,108,748,134" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="struct__wsse_____security-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__wsu_____timestamp.html">_wsu__Timestamp</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____security.html#o0">wsu__Timestamp</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__wsse_____username_token.html">_wsse__UsernameToken</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____security.html#o1">UsernameToken</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__wsse_____binary_security_token.html">_wsse__BinarySecurityToken</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____security.html#o2">BinarySecurityToken</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____signature_type.html">ds__SignatureType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____security.html#o3">ds__Signature</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____security.html#o4">SOAP_ENV__actor</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____security.html#o5">SOAP_ENV__role</a></td></tr>

+

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+This element defines the wsse:Security SOAP header element per Section 4. Imported element _wsse__Security from typemap WS/WS-typemap.dat. 

+<p>

+Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":Security of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":SecurityHeaderType. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o2" doxytag="_wsse__Security::BinarySecurityToken" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="struct__wsse_____binary_security_token.html">_wsse__BinarySecurityToken</a>* <a class="el" href="struct__wsse_____security.html#o2">_wsse__Security::BinarySecurityToken</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="_wsse__Security::ds__Signature" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structds_____signature_type.html">ds__SignatureType</a>* <a class="el" href="struct__wsse_____security.html#o3">_wsse__Security::ds__Signature</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="_wsse__Security::SOAP_ENV__actor" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsse_____security.html#o4">_wsse__Security::SOAP_ENV__actor</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="_wsse__Security::SOAP_ENV__role" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsse_____security.html#o5">_wsse__Security::SOAP_ENV__role</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="_wsse__Security::UsernameToken" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="struct__wsse_____username_token.html">_wsse__UsernameToken</a>* <a class="el" href="struct__wsse_____security.html#o1">_wsse__Security::UsernameToken</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="_wsse__Security::wsu__Timestamp" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="struct__wsu_____timestamp.html">_wsu__Timestamp</a>* <a class="el" href="struct__wsse_____security.html#o0">_wsse__Security::wsu__Timestamp</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="wsse_8h.html">wsse.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/struct__wsse_____security__coll__graph.map b/doc/wsse/html/struct__wsse_____security__coll__graph.map
new file mode 100644
index 0000000..df2cb4c
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____security__coll__graph.map
@@ -0,0 +1,8 @@
+base referer
+rect $structds_____signature_type.html 84,108 209,134
+rect $structds_____signed_info_type.html 7,17 140,44
+rect $structds_____key_info_type.html 164,17 279,44
+rect $struct__wsse_____binary_security_token.html 233,108 417,134
+rect $struct__wsse_____username_token.html 441,108 601,134
+rect $struct__wsse_____password.html 460,17 583,44
+rect $struct__wsu_____timestamp.html 625,108 748,134
diff --git a/doc/wsse/html/struct__wsse_____security__coll__graph.md5 b/doc/wsse/html/struct__wsse_____security__coll__graph.md5
new file mode 100644
index 0000000..9a44676
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____security__coll__graph.md5
@@ -0,0 +1 @@
+75d06f70af889a36881124155b3bef71
\ No newline at end of file
diff --git a/doc/wsse/html/struct__wsse_____security__coll__graph.png b/doc/wsse/html/struct__wsse_____security__coll__graph.png
new file mode 100644
index 0000000..f1e7add
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____security__coll__graph.png
Binary files differ
diff --git a/doc/wsse/html/struct__wsse_____security_token_reference-members.html b/doc/wsse/html/struct__wsse_____security_token_reference-members.html
new file mode 100644
index 0000000..d64c580
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____security_token_reference-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>_wsse__SecurityTokenReference Member List</h1>This is the complete list of members for <a class="el" href="struct__wsse_____security_token_reference.html">_wsse__SecurityTokenReference</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____security_token_reference.html#o2">Embedded</a></td><td><a class="el" href="struct__wsse_____security_token_reference.html">_wsse__SecurityTokenReference</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____security_token_reference.html#o1">KeyIdentifier</a></td><td><a class="el" href="struct__wsse_____security_token_reference.html">_wsse__SecurityTokenReference</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____security_token_reference.html#o0">Reference</a></td><td><a class="el" href="struct__wsse_____security_token_reference.html">_wsse__SecurityTokenReference</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____security_token_reference.html#o4">Usage</a></td><td><a class="el" href="struct__wsse_____security_token_reference.html">_wsse__SecurityTokenReference</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____security_token_reference.html#o3">wsu__Id</a></td><td><a class="el" href="struct__wsse_____security_token_reference.html">_wsse__SecurityTokenReference</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/struct__wsse_____security_token_reference.html b/doc/wsse/html/struct__wsse_____security_token_reference.html
new file mode 100644
index 0000000..5cf709d
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____security_token_reference.html
@@ -0,0 +1,160 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: _wsse__SecurityTokenReference Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>_wsse__SecurityTokenReference Struct Reference</h1>This element defines the wsse:SecurityTokenReference per Section 4.3. Imported element _wsse__SecurityTokenReference from typemap WS/WS-typemap.dat.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;wsse.h&gt;</code>

+<p>

+Collaboration diagram for _wsse__SecurityTokenReference:<p><center><img src="struct__wsse_____security_token_reference__coll__graph.png" border="0" usemap="#__wsse_____security_token_reference__coll__map" alt="Collaboration graph"></center>

+<map name="__wsse_____security_token_reference__coll__map">

+<area href="struct__wsse_____embedded.html" shape="rect" coords="7,17,137,44" alt="">

+<area href="struct__wsse_____key_identifier.html" shape="rect" coords="161,17,300,44" alt="">

+<area href="struct__wsse_____reference.html" shape="rect" coords="324,17,449,44" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="struct__wsse_____security_token_reference-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__wsse_____reference.html">_wsse__Reference</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____security_token_reference.html#o0">Reference</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__wsse_____key_identifier.html">_wsse__KeyIdentifier</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____security_token_reference.html#o1">KeyIdentifier</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__wsse_____embedded.html">_wsse__Embedded</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____security_token_reference.html#o2">Embedded</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____security_token_reference.html#o3">wsu__Id</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____security_token_reference.html#o4">Usage</a></td></tr>

+

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+This element defines the wsse:SecurityTokenReference per Section 4.3. Imported element _wsse__SecurityTokenReference from typemap WS/WS-typemap.dat. 

+<p>

+Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":SecurityTokenReference of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":SecurityTokenReferenceType. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o2" doxytag="_wsse__SecurityTokenReference::Embedded" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="struct__wsse_____embedded.html">_wsse__Embedded</a>* <a class="el" href="struct__wsse_____security_token_reference.html#o2">_wsse__SecurityTokenReference::Embedded</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="_wsse__SecurityTokenReference::KeyIdentifier" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="struct__wsse_____key_identifier.html">_wsse__KeyIdentifier</a>* <a class="el" href="struct__wsse_____security_token_reference.html#o1">_wsse__SecurityTokenReference::KeyIdentifier</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="_wsse__SecurityTokenReference::Reference" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="struct__wsse_____reference.html">_wsse__Reference</a>* <a class="el" href="struct__wsse_____security_token_reference.html#o0">_wsse__SecurityTokenReference::Reference</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="_wsse__SecurityTokenReference::Usage" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsse_____security_token_reference.html#o4">_wsse__SecurityTokenReference::Usage</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="_wsse__SecurityTokenReference::wsu__Id" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsse_____security_token_reference.html#o3">_wsse__SecurityTokenReference::wsu__Id</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="wsse_8h.html">wsse.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/struct__wsse_____security_token_reference__coll__graph.map b/doc/wsse/html/struct__wsse_____security_token_reference__coll__graph.map
new file mode 100644
index 0000000..5932289
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____security_token_reference__coll__graph.map
@@ -0,0 +1,4 @@
+base referer
+rect $struct__wsse_____embedded.html 7,17 137,44
+rect $struct__wsse_____key_identifier.html 161,17 300,44
+rect $struct__wsse_____reference.html 324,17 449,44
diff --git a/doc/wsse/html/struct__wsse_____security_token_reference__coll__graph.md5 b/doc/wsse/html/struct__wsse_____security_token_reference__coll__graph.md5
new file mode 100644
index 0000000..c53baa4
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____security_token_reference__coll__graph.md5
@@ -0,0 +1 @@
+a8e5c991e7eeb6728881325912f4ae13
\ No newline at end of file
diff --git a/doc/wsse/html/struct__wsse_____security_token_reference__coll__graph.png b/doc/wsse/html/struct__wsse_____security_token_reference__coll__graph.png
new file mode 100644
index 0000000..d9f2520
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____security_token_reference__coll__graph.png
Binary files differ
diff --git a/doc/wsse/html/struct__wsse_____username_token-members.html b/doc/wsse/html/struct__wsse_____username_token-members.html
new file mode 100644
index 0000000..38074f4
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____username_token-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>_wsse__UsernameToken Member List</h1>This is the complete list of members for <a class="el" href="struct__wsse_____username_token.html">_wsse__UsernameToken</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____username_token.html#o2">Nonce</a></td><td><a class="el" href="struct__wsse_____username_token.html">_wsse__UsernameToken</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____username_token.html#o1">Password</a></td><td><a class="el" href="struct__wsse_____username_token.html">_wsse__UsernameToken</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____username_token.html#o0">Username</a></td><td><a class="el" href="struct__wsse_____username_token.html">_wsse__UsernameToken</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____username_token.html#o3">wsu__Created</a></td><td><a class="el" href="struct__wsse_____username_token.html">_wsse__UsernameToken</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct__wsse_____username_token.html#o4">wsu__Id</a></td><td><a class="el" href="struct__wsse_____username_token.html">_wsse__UsernameToken</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/struct__wsse_____username_token.html b/doc/wsse/html/struct__wsse_____username_token.html
new file mode 100644
index 0000000..e1773ef
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____username_token.html
@@ -0,0 +1,158 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: _wsse__UsernameToken Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>_wsse__UsernameToken Struct Reference</h1>This element defines the wsse:UsernameToken element per Section 4.1. Imported element _wsse__UsernameToken from typemap WS/WS-typemap.dat.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;wsse.h&gt;</code>

+<p>

+Collaboration diagram for _wsse__UsernameToken:<p><center><img src="struct__wsse_____username_token__coll__graph.png" border="0" usemap="#__wsse_____username_token__coll__map" alt="Collaboration graph"></center>

+<map name="__wsse_____username_token__coll__map">

+<area href="struct__wsse_____password.html" shape="rect" coords="25,17,148,44" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="struct__wsse_____username_token-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____username_token.html#o0">Username</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__wsse_____password.html">_wsse__Password</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____username_token.html#o1">Password</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____username_token.html#o2">Nonce</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____username_token.html#o3">wsu__Created</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____username_token.html#o4">wsu__Id</a></td></tr>

+

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+This element defines the wsse:UsernameToken element per Section 4.1. Imported element _wsse__UsernameToken from typemap WS/WS-typemap.dat. 

+<p>

+Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":UsernameToken of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":UsernameTokenType. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o2" doxytag="_wsse__UsernameToken::Nonce" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsse_____username_token.html#o2">_wsse__UsernameToken::Nonce</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="_wsse__UsernameToken::Password" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="struct__wsse_____password.html">_wsse__Password</a>* <a class="el" href="struct__wsse_____username_token.html#o1">_wsse__UsernameToken::Password</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="_wsse__UsernameToken::Username" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsse_____username_token.html#o0">_wsse__UsernameToken::Username</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="_wsse__UsernameToken::wsu__Created" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsse_____username_token.html#o3">_wsse__UsernameToken::wsu__Created</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="_wsse__UsernameToken::wsu__Id" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsse_____username_token.html#o4">_wsse__UsernameToken::wsu__Id</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="wsse_8h.html">wsse.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/struct__wsse_____username_token__coll__graph.map b/doc/wsse/html/struct__wsse_____username_token__coll__graph.map
new file mode 100644
index 0000000..01eb1cb
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____username_token__coll__graph.map
@@ -0,0 +1,2 @@
+base referer
+rect $struct__wsse_____password.html 25,17 148,44
diff --git a/doc/wsse/html/struct__wsse_____username_token__coll__graph.md5 b/doc/wsse/html/struct__wsse_____username_token__coll__graph.md5
new file mode 100644
index 0000000..9f2a04e
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____username_token__coll__graph.md5
@@ -0,0 +1 @@
+a81ab6591210521abd3aa3bf22f6ca99
\ No newline at end of file
diff --git a/doc/wsse/html/struct__wsse_____username_token__coll__graph.png b/doc/wsse/html/struct__wsse_____username_token__coll__graph.png
new file mode 100644
index 0000000..0fb64ad
--- /dev/null
+++ b/doc/wsse/html/struct__wsse_____username_token__coll__graph.png
Binary files differ
diff --git a/doc/wsse/html/struct__wsu_____timestamp-members.html b/doc/wsse/html/struct__wsu_____timestamp-members.html
new file mode 100644
index 0000000..cd313f5
--- /dev/null
+++ b/doc/wsse/html/struct__wsu_____timestamp-members.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>_wsu__Timestamp Member List</h1>This is the complete list of members for <a class="el" href="struct__wsu_____timestamp.html">_wsu__Timestamp</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="struct__wsu_____timestamp.html#o1">Created</a></td><td><a class="el" href="struct__wsu_____timestamp.html">_wsu__Timestamp</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct__wsu_____timestamp.html#o2">Expires</a></td><td><a class="el" href="struct__wsu_____timestamp.html">_wsu__Timestamp</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="struct__wsu_____timestamp.html#o0">wsu__Id</a></td><td><a class="el" href="struct__wsu_____timestamp.html">_wsu__Timestamp</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/struct__wsu_____timestamp.html b/doc/wsse/html/struct__wsu_____timestamp.html
new file mode 100644
index 0000000..927753a
--- /dev/null
+++ b/doc/wsse/html/struct__wsu_____timestamp.html
@@ -0,0 +1,104 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: _wsu__Timestamp Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>_wsu__Timestamp Struct Reference</h1>This element allows Timestamps to be applied anywhere element wildcards are present, including as a SOAP header. Imported element _wsu__Timestamp from typemap WS/WS-typemap.dat.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;wsu.h&gt;</code>

+<p>

+<a href="struct__wsu_____timestamp-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsu_____timestamp.html#o0">wsu__Id</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsu_____timestamp.html#o1">Created</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsu_____timestamp.html#o2">Expires</a></td></tr>

+

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+This element allows Timestamps to be applied anywhere element wildcards are present, including as a SOAP header. Imported element _wsu__Timestamp from typemap WS/WS-typemap.dat. 

+<p>

+Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd":Timestamp of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd":TimestampType. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o1" doxytag="_wsu__Timestamp::Created" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsu_____timestamp.html#o1">_wsu__Timestamp::Created</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="_wsu__Timestamp::Expires" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsu_____timestamp.html#o2">_wsu__Timestamp::Expires</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="_wsu__Timestamp::wsu__Id" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="struct__wsu_____timestamp.html#o0">_wsu__Timestamp::wsu__Id</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="wsu_8h.html">wsu.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____canonicalization_method_type-members.html b/doc/wsse/html/structds_____canonicalization_method_type-members.html
new file mode 100644
index 0000000..5b2de65
--- /dev/null
+++ b/doc/wsse/html/structds_____canonicalization_method_type-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__CanonicalizationMethodType Member List</h1>This is the complete list of members for <a class="el" href="structds_____canonicalization_method_type.html">ds__CanonicalizationMethodType</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structds_____canonicalization_method_type.html#o0">Algorithm</a></td><td><a class="el" href="structds_____canonicalization_method_type.html">ds__CanonicalizationMethodType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____canonicalization_method_type.html#o1">c14n__InclusiveNamespaces</a></td><td><a class="el" href="structds_____canonicalization_method_type.html">ds__CanonicalizationMethodType</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____canonicalization_method_type.html b/doc/wsse/html/structds_____canonicalization_method_type.html
new file mode 100644
index 0000000..becf920
--- /dev/null
+++ b/doc/wsse/html/structds_____canonicalization_method_type.html
@@ -0,0 +1,84 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: ds__CanonicalizationMethodType Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__CanonicalizationMethodType Struct Reference</h1>"http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethodType is a complexType.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;ds.h&gt;</code>

+<p>

+Collaboration diagram for ds__CanonicalizationMethodType:<p><center><img src="structds_____canonicalization_method_type__coll__graph.png" border="0" usemap="#ds_____canonicalization_method_type__coll__map" alt="Collaboration graph"></center>

+<map name="ds_____canonicalization_method_type__coll__map">

+<area href="struct__c14n_____inclusive_namespaces.html" shape="rect" coords="14,17,209,44" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structds_____canonicalization_method_type-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____canonicalization_method_type.html#o0">Algorithm</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__c14n_____inclusive_namespaces.html">_c14n__InclusiveNamespaces</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____canonicalization_method_type.html#o1">c14n__InclusiveNamespaces</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Member declared in WS/WS-typemap.dat.  <a href="#o1"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+"http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethodType is a complexType. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="ds__CanonicalizationMethodType::Algorithm" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____canonicalization_method_type.html#o0">ds__CanonicalizationMethodType::Algorithm</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Required attribute.     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="ds__CanonicalizationMethodType::c14n__InclusiveNamespaces" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="struct__c14n_____inclusive_namespaces.html">_c14n__InclusiveNamespaces</a>* <a class="el" href="structds_____canonicalization_method_type.html#o1">ds__CanonicalizationMethodType::c14n__InclusiveNamespaces</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Member declared in WS/WS-typemap.dat. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="ds_8h.html">ds.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____canonicalization_method_type__coll__graph.map b/doc/wsse/html/structds_____canonicalization_method_type__coll__graph.map
new file mode 100644
index 0000000..0ed7150
--- /dev/null
+++ b/doc/wsse/html/structds_____canonicalization_method_type__coll__graph.map
@@ -0,0 +1,2 @@
+base referer
+rect $struct__c14n_____inclusive_namespaces.html 14,17 209,44
diff --git a/doc/wsse/html/structds_____canonicalization_method_type__coll__graph.md5 b/doc/wsse/html/structds_____canonicalization_method_type__coll__graph.md5
new file mode 100644
index 0000000..5725764
--- /dev/null
+++ b/doc/wsse/html/structds_____canonicalization_method_type__coll__graph.md5
@@ -0,0 +1 @@
+7d52682b5a90dc4a64ecef5cdd607130
\ No newline at end of file
diff --git a/doc/wsse/html/structds_____canonicalization_method_type__coll__graph.png b/doc/wsse/html/structds_____canonicalization_method_type__coll__graph.png
new file mode 100644
index 0000000..564f42e
--- /dev/null
+++ b/doc/wsse/html/structds_____canonicalization_method_type__coll__graph.png
Binary files differ
diff --git a/doc/wsse/html/structds_____d_s_a_key_value_type-members.html b/doc/wsse/html/structds_____d_s_a_key_value_type-members.html
new file mode 100644
index 0000000..6431229
--- /dev/null
+++ b/doc/wsse/html/structds_____d_s_a_key_value_type-members.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__DSAKeyValueType Member List</h1>This is the complete list of members for <a class="el" href="structds_____d_s_a_key_value_type.html">ds__DSAKeyValueType</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structds_____d_s_a_key_value_type.html#o0">G</a></td><td><a class="el" href="structds_____d_s_a_key_value_type.html">ds__DSAKeyValueType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____d_s_a_key_value_type.html#o2">J</a></td><td><a class="el" href="structds_____d_s_a_key_value_type.html">ds__DSAKeyValueType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____d_s_a_key_value_type.html#o3">P</a></td><td><a class="el" href="structds_____d_s_a_key_value_type.html">ds__DSAKeyValueType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____d_s_a_key_value_type.html#o6">PgenCounter</a></td><td><a class="el" href="structds_____d_s_a_key_value_type.html">ds__DSAKeyValueType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____d_s_a_key_value_type.html#o4">Q</a></td><td><a class="el" href="structds_____d_s_a_key_value_type.html">ds__DSAKeyValueType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____d_s_a_key_value_type.html#o5">Seed</a></td><td><a class="el" href="structds_____d_s_a_key_value_type.html">ds__DSAKeyValueType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____d_s_a_key_value_type.html#o1">Y</a></td><td><a class="el" href="structds_____d_s_a_key_value_type.html">ds__DSAKeyValueType</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____d_s_a_key_value_type.html b/doc/wsse/html/structds_____d_s_a_key_value_type.html
new file mode 100644
index 0000000..e78e6de
--- /dev/null
+++ b/doc/wsse/html/structds_____d_s_a_key_value_type.html
@@ -0,0 +1,223 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: ds__DSAKeyValueType Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__DSAKeyValueType Struct Reference</h1>"http://www.w3.org/2000/09/xmldsig#":DSAKeyValueType is a complexType.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;ds.h&gt;</code>

+<p>

+<a href="structds_____d_s_a_key_value_type-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____d_s_a_key_value_type.html#o0">G</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element G of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____d_s_a_key_value_type.html#o1">Y</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element Y of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____d_s_a_key_value_type.html#o2">J</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element J of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____d_s_a_key_value_type.html#o3">P</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element P of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____d_s_a_key_value_type.html#o4">Q</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element Q of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.  <a href="#o4"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____d_s_a_key_value_type.html#o5">Seed</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element Seed of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.  <a href="#o5"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____d_s_a_key_value_type.html#o6">PgenCounter</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Required element.  <a href="#o6"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+"http://www.w3.org/2000/09/xmldsig#":DSAKeyValueType is a complexType. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="ds__DSAKeyValueType::G" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____d_s_a_key_value_type.html#o0">ds__DSAKeyValueType::G</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element G of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary. 

+<p>

+Optional element.     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="ds__DSAKeyValueType::J" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____d_s_a_key_value_type.html#o2">ds__DSAKeyValueType::J</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element J of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary. 

+<p>

+Optional element.     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="ds__DSAKeyValueType::P" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____d_s_a_key_value_type.html#o3">ds__DSAKeyValueType::P</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element P of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary. 

+<p>

+Required element.     </td>

+  </tr>

+</table>

+<a class="anchor" name="o6" doxytag="ds__DSAKeyValueType::PgenCounter" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____d_s_a_key_value_type.html#o6">ds__DSAKeyValueType::PgenCounter</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Required element. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="ds__DSAKeyValueType::Q" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____d_s_a_key_value_type.html#o4">ds__DSAKeyValueType::Q</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element Q of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary. 

+<p>

+Required element.     </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="ds__DSAKeyValueType::Seed" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____d_s_a_key_value_type.html#o5">ds__DSAKeyValueType::Seed</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element Seed of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary. 

+<p>

+Required element.     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="ds__DSAKeyValueType::Y" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____d_s_a_key_value_type.html#o1">ds__DSAKeyValueType::Y</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element Y of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary. 

+<p>

+Required element.     </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="ds_8h.html">ds.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____digest_method_type-members.html b/doc/wsse/html/structds_____digest_method_type-members.html
new file mode 100644
index 0000000..8747ecf
--- /dev/null
+++ b/doc/wsse/html/structds_____digest_method_type-members.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__DigestMethodType Member List</h1>This is the complete list of members for <a class="el" href="structds_____digest_method_type.html">ds__DigestMethodType</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structds_____digest_method_type.html#o0">Algorithm</a></td><td><a class="el" href="structds_____digest_method_type.html">ds__DigestMethodType</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____digest_method_type.html b/doc/wsse/html/structds_____digest_method_type.html
new file mode 100644
index 0000000..2c98a12
--- /dev/null
+++ b/doc/wsse/html/structds_____digest_method_type.html
@@ -0,0 +1,55 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: ds__DigestMethodType Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__DigestMethodType Struct Reference</h1>"http://www.w3.org/2000/09/xmldsig#":DigestMethodType is a complexType.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;ds.h&gt;</code>

+<p>

+<a href="structds_____digest_method_type-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____digest_method_type.html#o0">Algorithm</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Required attribute.  <a href="#o0"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+"http://www.w3.org/2000/09/xmldsig#":DigestMethodType is a complexType. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="ds__DigestMethodType::Algorithm" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____digest_method_type.html#o0">ds__DigestMethodType::Algorithm</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Required attribute. 

+<p>

+TODO: &lt;any namespace="##other" minoccurs="0" maxoccurs="unbounded"&gt; Schema extensibility is user-definable. Consult the protocol documentation to change and/or insert declarations. Use wsdl2h option -x to remove this element. Attribute Algorithm of type xs:anyURI.     </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="ds_8h.html">ds.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____key_info_type-members.html b/doc/wsse/html/structds_____key_info_type-members.html
new file mode 100644
index 0000000..023a4f5
--- /dev/null
+++ b/doc/wsse/html/structds_____key_info_type-members.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__KeyInfoType Member List</h1>This is the complete list of members for <a class="el" href="structds_____key_info_type.html">ds__KeyInfoType</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structds_____key_info_type.html#o5">Id</a></td><td><a class="el" href="structds_____key_info_type.html">ds__KeyInfoType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____key_info_type.html#o0">KeyName</a></td><td><a class="el" href="structds_____key_info_type.html">ds__KeyInfoType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____key_info_type.html#o1">KeyValue</a></td><td><a class="el" href="structds_____key_info_type.html">ds__KeyInfoType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____key_info_type.html#o2">RetrievalMethod</a></td><td><a class="el" href="structds_____key_info_type.html">ds__KeyInfoType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____key_info_type.html#o4">wsse__SecurityTokenReference</a></td><td><a class="el" href="structds_____key_info_type.html">ds__KeyInfoType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____key_info_type.html#o3">X509Data</a></td><td><a class="el" href="structds_____key_info_type.html">ds__KeyInfoType</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____key_info_type.html b/doc/wsse/html/structds_____key_info_type.html
new file mode 100644
index 0000000..180247c
--- /dev/null
+++ b/doc/wsse/html/structds_____key_info_type.html
@@ -0,0 +1,184 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: ds__KeyInfoType Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__KeyInfoType Struct Reference</h1>Imported complexType "http://www.w3.org/2000/09/xmldsig#":KeyInfoType from typemap WS/WS-typemap.dat.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;ds.h&gt;</code>

+<p>

+Collaboration diagram for ds__KeyInfoType:<p><center><img src="structds_____key_info_type__coll__graph.png" border="0" usemap="#ds_____key_info_type__coll__map" alt="Collaboration graph"></center>

+<map name="ds_____key_info_type__coll__map">

+<area href="structds_____key_value_type.html" shape="rect" coords="6,17,134,44" alt="">

+<area href="structds_____retrieval_method_type.html" shape="rect" coords="158,17,324,44" alt="">

+<area href="struct__wsse_____security_token_reference.html" shape="rect" coords="348,17,558,44" alt="">

+<area href="structds_____x509_data_type.html" shape="rect" coords="605,17,736,44" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structds_____key_info_type-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____key_info_type.html#o0">KeyName</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____key_value_type.html">ds__KeyValueType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____key_info_type.html#o1">KeyValue</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____retrieval_method_type.html">ds__RetrievalMethodType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____key_info_type.html#o2">RetrievalMethod</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____x509_data_type.html">ds__X509DataType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____key_info_type.html#o3">X509Data</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__wsse_____security_token_reference.html">_wsse__SecurityTokenReference</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____key_info_type.html#o4">wsse__SecurityTokenReference</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____key_info_type.html#o5">Id</a></td></tr>

+

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Imported complexType "http://www.w3.org/2000/09/xmldsig#":KeyInfoType from typemap WS/WS-typemap.dat. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o5" doxytag="ds__KeyInfoType::Id" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____key_info_type.html#o5">ds__KeyInfoType::Id</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="ds__KeyInfoType::KeyName" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____key_info_type.html#o0">ds__KeyInfoType::KeyName</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="ds__KeyInfoType::KeyValue" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structds_____key_value_type.html">ds__KeyValueType</a>* <a class="el" href="structds_____key_info_type.html#o1">ds__KeyInfoType::KeyValue</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="ds__KeyInfoType::RetrievalMethod" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structds_____retrieval_method_type.html">ds__RetrievalMethodType</a>* <a class="el" href="structds_____key_info_type.html#o2">ds__KeyInfoType::RetrievalMethod</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="ds__KeyInfoType::wsse__SecurityTokenReference" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="struct__wsse_____security_token_reference.html">_wsse__SecurityTokenReference</a>* <a class="el" href="structds_____key_info_type.html#o4">ds__KeyInfoType::wsse__SecurityTokenReference</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="ds__KeyInfoType::X509Data" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structds_____x509_data_type.html">ds__X509DataType</a>* <a class="el" href="structds_____key_info_type.html#o3">ds__KeyInfoType::X509Data</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="ds_8h.html">ds.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____key_info_type__coll__graph.map b/doc/wsse/html/structds_____key_info_type__coll__graph.map
new file mode 100644
index 0000000..0e292e4
--- /dev/null
+++ b/doc/wsse/html/structds_____key_info_type__coll__graph.map
@@ -0,0 +1,5 @@
+base referer
+rect $structds_____key_value_type.html 6,17 134,44
+rect $structds_____retrieval_method_type.html 158,17 324,44
+rect $struct__wsse_____security_token_reference.html 348,17 558,44
+rect $structds_____x509_data_type.html 605,17 736,44
diff --git a/doc/wsse/html/structds_____key_info_type__coll__graph.md5 b/doc/wsse/html/structds_____key_info_type__coll__graph.md5
new file mode 100644
index 0000000..e3570fc
--- /dev/null
+++ b/doc/wsse/html/structds_____key_info_type__coll__graph.md5
@@ -0,0 +1 @@
+3f5d538fd177bf133aef949b06570139
\ No newline at end of file
diff --git a/doc/wsse/html/structds_____key_info_type__coll__graph.png b/doc/wsse/html/structds_____key_info_type__coll__graph.png
new file mode 100644
index 0000000..57e2dd3
--- /dev/null
+++ b/doc/wsse/html/structds_____key_info_type__coll__graph.png
Binary files differ
diff --git a/doc/wsse/html/structds_____key_value_type-members.html b/doc/wsse/html/structds_____key_value_type-members.html
new file mode 100644
index 0000000..7f77e0d
--- /dev/null
+++ b/doc/wsse/html/structds_____key_value_type-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__KeyValueType Member List</h1>This is the complete list of members for <a class="el" href="structds_____key_value_type.html">ds__KeyValueType</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structds_____key_value_type.html#o0">DSAKeyValue</a></td><td><a class="el" href="structds_____key_value_type.html">ds__KeyValueType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____key_value_type.html#o1">RSAKeyValue</a></td><td><a class="el" href="structds_____key_value_type.html">ds__KeyValueType</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____key_value_type.html b/doc/wsse/html/structds_____key_value_type.html
new file mode 100644
index 0000000..9085e2d
--- /dev/null
+++ b/doc/wsse/html/structds_____key_value_type.html
@@ -0,0 +1,85 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: ds__KeyValueType Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__KeyValueType Struct Reference</h1>"http://www.w3.org/2000/09/xmldsig#":KeyValueType is a complexType.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;ds.h&gt;</code>

+<p>

+Collaboration diagram for ds__KeyValueType:<p><center><img src="structds_____key_value_type__coll__graph.png" border="0" usemap="#ds_____key_value_type__coll__map" alt="Collaboration graph"></center>

+<map name="ds_____key_value_type__coll__map">

+<area href="structds_____r_s_a_key_value_type.html" shape="rect" coords="6,17,161,44" alt="">

+<area href="structds_____d_s_a_key_value_type.html" shape="rect" coords="185,17,340,44" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structds_____key_value_type-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____d_s_a_key_value_type.html">ds__DSAKeyValueType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____key_value_type.html#o0">DSAKeyValue</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____r_s_a_key_value_type.html">ds__RSAKeyValueType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____key_value_type.html#o1">RSAKeyValue</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "http://www.w3.org/2000/09/xmldsig#":RSAKeyValue.  <a href="#o1"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+"http://www.w3.org/2000/09/xmldsig#":KeyValueType is a complexType. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="ds__KeyValueType::DSAKeyValue" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structds_____d_s_a_key_value_type.html">ds__DSAKeyValueType</a>* <a class="el" href="structds_____key_value_type.html#o0">ds__KeyValueType::DSAKeyValue</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Required element.     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="ds__KeyValueType::RSAKeyValue" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structds_____r_s_a_key_value_type.html">ds__RSAKeyValueType</a>* <a class="el" href="structds_____key_value_type.html#o1">ds__KeyValueType::RSAKeyValue</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "http://www.w3.org/2000/09/xmldsig#":RSAKeyValue. 

+<p>

+Required element.     </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="ds_8h.html">ds.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____key_value_type__coll__graph.map b/doc/wsse/html/structds_____key_value_type__coll__graph.map
new file mode 100644
index 0000000..b106c61
--- /dev/null
+++ b/doc/wsse/html/structds_____key_value_type__coll__graph.map
@@ -0,0 +1,3 @@
+base referer
+rect $structds_____r_s_a_key_value_type.html 6,17 161,44
+rect $structds_____d_s_a_key_value_type.html 185,17 340,44
diff --git a/doc/wsse/html/structds_____key_value_type__coll__graph.md5 b/doc/wsse/html/structds_____key_value_type__coll__graph.md5
new file mode 100644
index 0000000..1544f21
--- /dev/null
+++ b/doc/wsse/html/structds_____key_value_type__coll__graph.md5
@@ -0,0 +1 @@
+8a3b04e8d27981ca478f93c1e92999ae
\ No newline at end of file
diff --git a/doc/wsse/html/structds_____key_value_type__coll__graph.png b/doc/wsse/html/structds_____key_value_type__coll__graph.png
new file mode 100644
index 0000000..db11c1f
--- /dev/null
+++ b/doc/wsse/html/structds_____key_value_type__coll__graph.png
Binary files differ
diff --git a/doc/wsse/html/structds_____r_s_a_key_value_type-members.html b/doc/wsse/html/structds_____r_s_a_key_value_type-members.html
new file mode 100644
index 0000000..5549f86
--- /dev/null
+++ b/doc/wsse/html/structds_____r_s_a_key_value_type-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__RSAKeyValueType Member List</h1>This is the complete list of members for <a class="el" href="structds_____r_s_a_key_value_type.html">ds__RSAKeyValueType</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structds_____r_s_a_key_value_type.html#o1">Exponent</a></td><td><a class="el" href="structds_____r_s_a_key_value_type.html">ds__RSAKeyValueType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____r_s_a_key_value_type.html#o0">Modulus</a></td><td><a class="el" href="structds_____r_s_a_key_value_type.html">ds__RSAKeyValueType</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____r_s_a_key_value_type.html b/doc/wsse/html/structds_____r_s_a_key_value_type.html
new file mode 100644
index 0000000..75c1a3e
--- /dev/null
+++ b/doc/wsse/html/structds_____r_s_a_key_value_type.html
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: ds__RSAKeyValueType Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__RSAKeyValueType Struct Reference</h1>"http://www.w3.org/2000/09/xmldsig#":RSAKeyValueType is a complexType.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;ds.h&gt;</code>

+<p>

+<a href="structds_____r_s_a_key_value_type-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____r_s_a_key_value_type.html#o0">Modulus</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element Modulus of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____r_s_a_key_value_type.html#o1">Exponent</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Required element.  <a href="#o1"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+"http://www.w3.org/2000/09/xmldsig#":RSAKeyValueType is a complexType. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o1" doxytag="ds__RSAKeyValueType::Exponent" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____r_s_a_key_value_type.html#o1">ds__RSAKeyValueType::Exponent</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Required element. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="ds__RSAKeyValueType::Modulus" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____r_s_a_key_value_type.html#o0">ds__RSAKeyValueType::Modulus</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element Modulus of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary. 

+<p>

+Required element.     </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="ds_8h.html">ds.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____reference_type-members.html b/doc/wsse/html/structds_____reference_type-members.html
new file mode 100644
index 0000000..21b053f
--- /dev/null
+++ b/doc/wsse/html/structds_____reference_type-members.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__ReferenceType Member List</h1>This is the complete list of members for <a class="el" href="structds_____reference_type.html">ds__ReferenceType</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structds_____reference_type.html#o1">DigestMethod</a></td><td><a class="el" href="structds_____reference_type.html">ds__ReferenceType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____reference_type.html#o2">DigestValue</a></td><td><a class="el" href="structds_____reference_type.html">ds__ReferenceType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____reference_type.html#o3">Id</a></td><td><a class="el" href="structds_____reference_type.html">ds__ReferenceType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____reference_type.html#o0">Transforms</a></td><td><a class="el" href="structds_____reference_type.html">ds__ReferenceType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____reference_type.html#o5">Type</a></td><td><a class="el" href="structds_____reference_type.html">ds__ReferenceType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____reference_type.html#o4">URI</a></td><td><a class="el" href="structds_____reference_type.html">ds__ReferenceType</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____reference_type.html b/doc/wsse/html/structds_____reference_type.html
new file mode 100644
index 0000000..1673cfe
--- /dev/null
+++ b/doc/wsse/html/structds_____reference_type.html
@@ -0,0 +1,202 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: ds__ReferenceType Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__ReferenceType Struct Reference</h1>"http://www.w3.org/2000/09/xmldsig#":ReferenceType is a complexType.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;ds.h&gt;</code>

+<p>

+Collaboration diagram for ds__ReferenceType:<p><center><img src="structds_____reference_type__coll__graph.png" border="0" usemap="#ds_____reference_type__coll__map" alt="Collaboration graph"></center>

+<map name="ds_____reference_type__coll__map">

+<area href="structds_____digest_method_type.html" shape="rect" coords="7,199,159,225" alt="">

+<area href="structds_____transforms_type.html" shape="rect" coords="183,199,316,225" alt="">

+<area href="structds_____transform_type.html" shape="rect" coords="185,108,313,135" alt="">

+<area href="struct__c14n_____inclusive_namespaces.html" shape="rect" coords="152,17,347,44" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structds_____reference_type-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____transforms_type.html">ds__TransformsType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____reference_type.html#o0">Transforms</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "http://www.w3.org/2000/09/xmldsig#":Transforms.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____digest_method_type.html">ds__DigestMethodType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____reference_type.html#o1">DigestMethod</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "http://www.w3.org/2000/09/xmldsig#":DigestMethod.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____reference_type.html#o2">DigestValue</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "http://www.w3.org/2000/09/xmldsig#":DigestValue.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____reference_type.html#o3">Id</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute Id of type xs:ID.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____reference_type.html#o4">URI</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute URI of type xs:anyURI.  <a href="#o4"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____reference_type.html#o5">Type</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Optional attribute.  <a href="#o5"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+"http://www.w3.org/2000/09/xmldsig#":ReferenceType is a complexType. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o1" doxytag="ds__ReferenceType::DigestMethod" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structds_____digest_method_type.html">ds__DigestMethodType</a>* <a class="el" href="structds_____reference_type.html#o1">ds__ReferenceType::DigestMethod</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "http://www.w3.org/2000/09/xmldsig#":DigestMethod. 

+<p>

+Required element.     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="ds__ReferenceType::DigestValue" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____reference_type.html#o2">ds__ReferenceType::DigestValue</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "http://www.w3.org/2000/09/xmldsig#":DigestValue. 

+<p>

+Required element.     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="ds__ReferenceType::Id" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____reference_type.html#o3">ds__ReferenceType::Id</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute Id of type xs:ID. 

+<p>

+Optional attribute.     </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="ds__ReferenceType::Transforms" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structds_____transforms_type.html">ds__TransformsType</a>* <a class="el" href="structds_____reference_type.html#o0">ds__ReferenceType::Transforms</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "http://www.w3.org/2000/09/xmldsig#":Transforms. 

+<p>

+Optional element.     </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="ds__ReferenceType::Type" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____reference_type.html#o5">ds__ReferenceType::Type</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Optional attribute. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="ds__ReferenceType::URI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____reference_type.html#o4">ds__ReferenceType::URI</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute URI of type xs:anyURI. 

+<p>

+Optional attribute.     </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="ds_8h.html">ds.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____reference_type__coll__graph.map b/doc/wsse/html/structds_____reference_type__coll__graph.map
new file mode 100644
index 0000000..2249217
--- /dev/null
+++ b/doc/wsse/html/structds_____reference_type__coll__graph.map
@@ -0,0 +1,5 @@
+base referer
+rect $structds_____digest_method_type.html 7,199 159,225
+rect $structds_____transforms_type.html 183,199 316,225
+rect $structds_____transform_type.html 185,108 313,135
+rect $struct__c14n_____inclusive_namespaces.html 152,17 347,44
diff --git a/doc/wsse/html/structds_____reference_type__coll__graph.md5 b/doc/wsse/html/structds_____reference_type__coll__graph.md5
new file mode 100644
index 0000000..67839c1
--- /dev/null
+++ b/doc/wsse/html/structds_____reference_type__coll__graph.md5
@@ -0,0 +1 @@
+c7591f6e86ed0258d1da1bf90fe2d224
\ No newline at end of file
diff --git a/doc/wsse/html/structds_____reference_type__coll__graph.png b/doc/wsse/html/structds_____reference_type__coll__graph.png
new file mode 100644
index 0000000..c65a6e1
--- /dev/null
+++ b/doc/wsse/html/structds_____reference_type__coll__graph.png
Binary files differ
diff --git a/doc/wsse/html/structds_____retrieval_method_type-members.html b/doc/wsse/html/structds_____retrieval_method_type-members.html
new file mode 100644
index 0000000..822fdc4
--- /dev/null
+++ b/doc/wsse/html/structds_____retrieval_method_type-members.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__RetrievalMethodType Member List</h1>This is the complete list of members for <a class="el" href="structds_____retrieval_method_type.html">ds__RetrievalMethodType</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structds_____retrieval_method_type.html#o0">Transforms</a></td><td><a class="el" href="structds_____retrieval_method_type.html">ds__RetrievalMethodType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____retrieval_method_type.html#o2">Type</a></td><td><a class="el" href="structds_____retrieval_method_type.html">ds__RetrievalMethodType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____retrieval_method_type.html#o1">URI</a></td><td><a class="el" href="structds_____retrieval_method_type.html">ds__RetrievalMethodType</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____retrieval_method_type.html b/doc/wsse/html/structds_____retrieval_method_type.html
new file mode 100644
index 0000000..abb45c4
--- /dev/null
+++ b/doc/wsse/html/structds_____retrieval_method_type.html
@@ -0,0 +1,117 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: ds__RetrievalMethodType Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__RetrievalMethodType Struct Reference</h1>"http://www.w3.org/2000/09/xmldsig#":RetrievalMethodType is a complexType.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;ds.h&gt;</code>

+<p>

+Collaboration diagram for ds__RetrievalMethodType:<p><center><img src="structds_____retrieval_method_type__coll__graph.png" border="0" usemap="#ds_____retrieval_method_type__coll__map" alt="Collaboration graph"></center>

+<map name="ds_____retrieval_method_type__coll__map">

+<area href="structds_____transforms_type.html" shape="rect" coords="37,199,170,225" alt="">

+<area href="structds_____transform_type.html" shape="rect" coords="40,108,168,135" alt="">

+<area href="struct__c14n_____inclusive_namespaces.html" shape="rect" coords="6,17,201,44" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structds_____retrieval_method_type-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____transforms_type.html">ds__TransformsType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____retrieval_method_type.html#o0">Transforms</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "http://www.w3.org/2000/09/xmldsig#":Transforms.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____retrieval_method_type.html#o1">URI</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attribute URI of type xs:anyURI.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____retrieval_method_type.html#o2">Type</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Optional attribute.  <a href="#o2"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+"http://www.w3.org/2000/09/xmldsig#":RetrievalMethodType is a complexType. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="ds__RetrievalMethodType::Transforms" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structds_____transforms_type.html">ds__TransformsType</a>* <a class="el" href="structds_____retrieval_method_type.html#o0">ds__RetrievalMethodType::Transforms</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "http://www.w3.org/2000/09/xmldsig#":Transforms. 

+<p>

+Optional element.     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="ds__RetrievalMethodType::Type" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____retrieval_method_type.html#o2">ds__RetrievalMethodType::Type</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Optional attribute. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="ds__RetrievalMethodType::URI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____retrieval_method_type.html#o1">ds__RetrievalMethodType::URI</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Attribute URI of type xs:anyURI. 

+<p>

+Optional attribute.     </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="ds_8h.html">ds.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____retrieval_method_type__coll__graph.map b/doc/wsse/html/structds_____retrieval_method_type__coll__graph.map
new file mode 100644
index 0000000..29ea9d4
--- /dev/null
+++ b/doc/wsse/html/structds_____retrieval_method_type__coll__graph.map
@@ -0,0 +1,4 @@
+base referer
+rect $structds_____transforms_type.html 37,199 170,225
+rect $structds_____transform_type.html 40,108 168,135
+rect $struct__c14n_____inclusive_namespaces.html 6,17 201,44
diff --git a/doc/wsse/html/structds_____retrieval_method_type__coll__graph.md5 b/doc/wsse/html/structds_____retrieval_method_type__coll__graph.md5
new file mode 100644
index 0000000..93c53ca
--- /dev/null
+++ b/doc/wsse/html/structds_____retrieval_method_type__coll__graph.md5
@@ -0,0 +1 @@
+86fff7e53d8f39c7b2d57d8c98fecd00
\ No newline at end of file
diff --git a/doc/wsse/html/structds_____retrieval_method_type__coll__graph.png b/doc/wsse/html/structds_____retrieval_method_type__coll__graph.png
new file mode 100644
index 0000000..950def6
--- /dev/null
+++ b/doc/wsse/html/structds_____retrieval_method_type__coll__graph.png
Binary files differ
diff --git a/doc/wsse/html/structds_____signature_method_type-members.html b/doc/wsse/html/structds_____signature_method_type-members.html
new file mode 100644
index 0000000..5dd8d3a
--- /dev/null
+++ b/doc/wsse/html/structds_____signature_method_type-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__SignatureMethodType Member List</h1>This is the complete list of members for <a class="el" href="structds_____signature_method_type.html">ds__SignatureMethodType</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structds_____signature_method_type.html#o1">Algorithm</a></td><td><a class="el" href="structds_____signature_method_type.html">ds__SignatureMethodType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____signature_method_type.html#o0">HMACOutputLength</a></td><td><a class="el" href="structds_____signature_method_type.html">ds__SignatureMethodType</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____signature_method_type.html b/doc/wsse/html/structds_____signature_method_type.html
new file mode 100644
index 0000000..757c2cf
--- /dev/null
+++ b/doc/wsse/html/structds_____signature_method_type.html
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: ds__SignatureMethodType Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__SignatureMethodType Struct Reference</h1>"http://www.w3.org/2000/09/xmldsig#":SignatureMethodType is a complexType.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;ds.h&gt;</code>

+<p>

+<a href="structds_____signature_method_type-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____signature_method_type.html#o0">HMACOutputLength</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element HMACOutputLength of type "http://www.w3.org/2000/09/xmldsig#":HMACOutputLengthType.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____signature_method_type.html#o1">Algorithm</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Required attribute.  <a href="#o1"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+"http://www.w3.org/2000/09/xmldsig#":SignatureMethodType is a complexType. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o1" doxytag="ds__SignatureMethodType::Algorithm" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____signature_method_type.html#o1">ds__SignatureMethodType::Algorithm</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Required attribute. 

+<p>

+TODO: &lt;any namespace="##other" minoccurs="0" maxoccurs="unbounded"&gt; Schema extensibility is user-definable. Consult the protocol documentation to change and/or insert declarations. Use wsdl2h option -x to remove this element. Attribute Algorithm of type xs:anyURI.     </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="ds__SignatureMethodType::HMACOutputLength" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int* <a class="el" href="structds_____signature_method_type.html#o0">ds__SignatureMethodType::HMACOutputLength</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element HMACOutputLength of type "http://www.w3.org/2000/09/xmldsig#":HMACOutputLengthType. 

+<p>

+Optional element.     </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="ds_8h.html">ds.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____signature_type-members.html b/doc/wsse/html/structds_____signature_type-members.html
new file mode 100644
index 0000000..1f3dc64
--- /dev/null
+++ b/doc/wsse/html/structds_____signature_type-members.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__SignatureType Member List</h1>This is the complete list of members for <a class="el" href="structds_____signature_type.html">ds__SignatureType</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structds_____signature_type.html#o3">Id</a></td><td><a class="el" href="structds_____signature_type.html">ds__SignatureType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____signature_type.html#o2">KeyInfo</a></td><td><a class="el" href="structds_____signature_type.html">ds__SignatureType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____signature_type.html#o1">SignatureValue</a></td><td><a class="el" href="structds_____signature_type.html">ds__SignatureType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____signature_type.html#o0">SignedInfo</a></td><td><a class="el" href="structds_____signature_type.html">ds__SignatureType</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____signature_type.html b/doc/wsse/html/structds_____signature_type.html
new file mode 100644
index 0000000..ef40c1f
--- /dev/null
+++ b/doc/wsse/html/structds_____signature_type.html
@@ -0,0 +1,132 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: ds__SignatureType Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__SignatureType Struct Reference</h1>Imported complexType "http://www.w3.org/2000/09/xmldsig#":SignatureType from typemap WS/WS-typemap.dat.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;ds.h&gt;</code>

+<p>

+Collaboration diagram for ds__SignatureType:<p><center><img src="structds_____signature_type__coll__graph.png" border="0" usemap="#ds_____signature_type__coll__map" alt="Collaboration graph"></center>

+<map name="ds_____signature_type__coll__map">

+<area href="structds_____signed_info_type.html" shape="rect" coords="7,17,140,44" alt="">

+<area href="structds_____key_info_type.html" shape="rect" coords="164,17,279,44" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structds_____signature_type-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____signature_type.html#o0">SignedInfo</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____signature_type.html#o1">SignatureValue</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____key_info_type.html">ds__KeyInfoType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____signature_type.html#o2">KeyInfo</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____signature_type.html#o3">Id</a></td></tr>

+

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Imported complexType "http://www.w3.org/2000/09/xmldsig#":SignatureType from typemap WS/WS-typemap.dat. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o3" doxytag="ds__SignatureType::Id" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____signature_type.html#o3">ds__SignatureType::Id</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="ds__SignatureType::KeyInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structds_____key_info_type.html">ds__KeyInfoType</a>* <a class="el" href="structds_____signature_type.html#o2">ds__SignatureType::KeyInfo</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="ds__SignatureType::SignatureValue" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____signature_type.html#o1">ds__SignatureType::SignatureValue</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="ds__SignatureType::SignedInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a>* <a class="el" href="structds_____signature_type.html#o0">ds__SignatureType::SignedInfo</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="ds_8h.html">ds.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____signature_type__coll__graph.map b/doc/wsse/html/structds_____signature_type__coll__graph.map
new file mode 100644
index 0000000..1f8ac17
--- /dev/null
+++ b/doc/wsse/html/structds_____signature_type__coll__graph.map
@@ -0,0 +1,3 @@
+base referer
+rect $structds_____signed_info_type.html 7,17 140,44
+rect $structds_____key_info_type.html 164,17 279,44
diff --git a/doc/wsse/html/structds_____signature_type__coll__graph.md5 b/doc/wsse/html/structds_____signature_type__coll__graph.md5
new file mode 100644
index 0000000..d3f74c3
--- /dev/null
+++ b/doc/wsse/html/structds_____signature_type__coll__graph.md5
@@ -0,0 +1 @@
+5176fbc3adf2a13d9add8871d3a90408
\ No newline at end of file
diff --git a/doc/wsse/html/structds_____signature_type__coll__graph.png b/doc/wsse/html/structds_____signature_type__coll__graph.png
new file mode 100644
index 0000000..fb006ad
--- /dev/null
+++ b/doc/wsse/html/structds_____signature_type__coll__graph.png
Binary files differ
diff --git a/doc/wsse/html/structds_____signed_info_type-members.html b/doc/wsse/html/structds_____signed_info_type-members.html
new file mode 100644
index 0000000..59b9329
--- /dev/null
+++ b/doc/wsse/html/structds_____signed_info_type-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__SignedInfoType Member List</h1>This is the complete list of members for <a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structds_____signed_info_type.html#o2">__sizeReference</a></td><td><a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____signed_info_type.html#o0">CanonicalizationMethod</a></td><td><a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____signed_info_type.html#o4">Id</a></td><td><a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____signed_info_type.html#o3">Reference</a></td><td><a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____signed_info_type.html#o1">SignatureMethod</a></td><td><a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____signed_info_type.html b/doc/wsse/html/structds_____signed_info_type.html
new file mode 100644
index 0000000..1defb6a
--- /dev/null
+++ b/doc/wsse/html/structds_____signed_info_type.html
@@ -0,0 +1,179 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: ds__SignedInfoType Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__SignedInfoType Struct Reference</h1>"http://www.w3.org/2000/09/xmldsig#":SignedInfoType is a complexType.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;ds.h&gt;</code>

+<p>

+Collaboration diagram for ds__SignedInfoType:<p><center><img src="structds_____signed_info_type__coll__graph.png" border="0" usemap="#ds_____signed_info_type__coll__map" alt="Collaboration graph"></center>

+<map name="ds_____signed_info_type__coll__map">

+<area href="structds_____reference_type.html" shape="rect" coords="184,300,314,326" alt="">

+<area href="structds_____digest_method_type.html" shape="rect" coords="6,209,158,236" alt="">

+<area href="structds_____transforms_type.html" shape="rect" coords="182,209,316,236" alt="">

+<area href="structds_____transform_type.html" shape="rect" coords="168,108,296,134" alt="">

+<area href="struct__c14n_____inclusive_namespaces.html" shape="rect" coords="242,17,437,44" alt="">

+<area href="structds_____canonicalization_method_type.html" shape="rect" coords="340,158,550,185" alt="">

+<area href="structds_____signature_method_type.html" shape="rect" coords="454,300,625,326" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structds_____signed_info_type-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____canonicalization_method_type.html">ds__CanonicalizationMethodType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____signed_info_type.html#o0">CanonicalizationMethod</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethod.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____signature_method_type.html">ds__SignatureMethodType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____signed_info_type.html#o1">SignatureMethod</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element reference "http://www.w3.org/2000/09/xmldsig#":SignatureMethod.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____signed_info_type.html#o2">__sizeReference</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Size of the dynamic array of struct ds__ReferenceType* is 0..unbounded.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____reference_type.html">ds__ReferenceType</a> **&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____signed_info_type.html#o3">Reference</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pointer to array of struct ds__ReferenceType*.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____signed_info_type.html#o4">Id</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Optional attribute.  <a href="#o4"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+"http://www.w3.org/2000/09/xmldsig#":SignedInfoType is a complexType. 

+<p>

+Imported simpleType "http://www.w3.org/2000/09/xmldsig#":HMACOutputLengthType from typemap WS/WS-typemap.dat. simpleType definition intentionally left blank. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o2" doxytag="ds__SignedInfoType::__sizeReference" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structds_____signed_info_type.html#o2">ds__SignedInfoType::__sizeReference</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Size of the dynamic array of struct ds__ReferenceType* is 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="ds__SignedInfoType::CanonicalizationMethod" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structds_____canonicalization_method_type.html">ds__CanonicalizationMethodType</a>* <a class="el" href="structds_____signed_info_type.html#o0">ds__SignedInfoType::CanonicalizationMethod</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethod. 

+<p>

+Required element.     </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="ds__SignedInfoType::Id" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____signed_info_type.html#o4">ds__SignedInfoType::Id</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Optional attribute. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="ds__SignedInfoType::Reference" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structds_____reference_type.html">ds__ReferenceType</a>* * <a class="el" href="structds_____signed_info_type.html#o3">ds__SignedInfoType::Reference</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Pointer to array of struct ds__ReferenceType*. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="ds__SignedInfoType::SignatureMethod" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structds_____signature_method_type.html">ds__SignatureMethodType</a>* <a class="el" href="structds_____signed_info_type.html#o1">ds__SignedInfoType::SignatureMethod</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element reference "http://www.w3.org/2000/09/xmldsig#":SignatureMethod. 

+<p>

+Required element.     </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="ds_8h.html">ds.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____signed_info_type__coll__graph.map b/doc/wsse/html/structds_____signed_info_type__coll__graph.map
new file mode 100644
index 0000000..5b2358e
--- /dev/null
+++ b/doc/wsse/html/structds_____signed_info_type__coll__graph.map
@@ -0,0 +1,8 @@
+base referer
+rect $structds_____reference_type.html 184,300 314,326
+rect $structds_____digest_method_type.html 6,209 158,236
+rect $structds_____transforms_type.html 182,209 316,236
+rect $structds_____transform_type.html 168,108 296,134
+rect $struct__c14n_____inclusive_namespaces.html 242,17 437,44
+rect $structds_____canonicalization_method_type.html 340,158 550,185
+rect $structds_____signature_method_type.html 454,300 625,326
diff --git a/doc/wsse/html/structds_____signed_info_type__coll__graph.md5 b/doc/wsse/html/structds_____signed_info_type__coll__graph.md5
new file mode 100644
index 0000000..570d6d4
--- /dev/null
+++ b/doc/wsse/html/structds_____signed_info_type__coll__graph.md5
@@ -0,0 +1 @@
+b90b285744c1ef3645afb8519a1ed1c2
\ No newline at end of file
diff --git a/doc/wsse/html/structds_____signed_info_type__coll__graph.png b/doc/wsse/html/structds_____signed_info_type__coll__graph.png
new file mode 100644
index 0000000..a76278d
--- /dev/null
+++ b/doc/wsse/html/structds_____signed_info_type__coll__graph.png
Binary files differ
diff --git a/doc/wsse/html/structds_____transform_type-members.html b/doc/wsse/html/structds_____transform_type-members.html
new file mode 100644
index 0000000..685065b
--- /dev/null
+++ b/doc/wsse/html/structds_____transform_type-members.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__TransformType Member List</h1>This is the complete list of members for <a class="el" href="structds_____transform_type.html">ds__TransformType</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structds_____transform_type.html#o1">__any</a></td><td><a class="el" href="structds_____transform_type.html">ds__TransformType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____transform_type.html#o2">Algorithm</a></td><td><a class="el" href="structds_____transform_type.html">ds__TransformType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____transform_type.html#o0">c14n__InclusiveNamespaces</a></td><td><a class="el" href="structds_____transform_type.html">ds__TransformType</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____transform_type.html b/doc/wsse/html/structds_____transform_type.html
new file mode 100644
index 0000000..6a940b0
--- /dev/null
+++ b/doc/wsse/html/structds_____transform_type.html
@@ -0,0 +1,106 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: ds__TransformType Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__TransformType Struct Reference</h1>Imported complexType "http://www.w3.org/2000/09/xmldsig#":TransformType from typemap WS/WS-typemap.dat.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;ds.h&gt;</code>

+<p>

+Collaboration diagram for ds__TransformType:<p><center><img src="structds_____transform_type__coll__graph.png" border="0" usemap="#ds_____transform_type__coll__map" alt="Collaboration graph"></center>

+<map name="ds_____transform_type__coll__map">

+<area href="struct__c14n_____inclusive_namespaces.html" shape="rect" coords="6,17,201,44" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structds_____transform_type-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__c14n_____inclusive_namespaces.html">_c14n__InclusiveNamespaces</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____transform_type.html#o0">c14n__InclusiveNamespaces</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>_XML&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____transform_type.html#o1">__any</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____transform_type.html#o2">Algorithm</a></td></tr>

+

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Imported complexType "http://www.w3.org/2000/09/xmldsig#":TransformType from typemap WS/WS-typemap.dat. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o1" doxytag="ds__TransformType::__any" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> _XML <a class="el" href="structds_____transform_type.html#o1">ds__TransformType::__any</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="ds__TransformType::Algorithm" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____transform_type.html#o2">ds__TransformType::Algorithm</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="ds__TransformType::c14n__InclusiveNamespaces" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="struct__c14n_____inclusive_namespaces.html">_c14n__InclusiveNamespaces</a>* <a class="el" href="structds_____transform_type.html#o0">ds__TransformType::c14n__InclusiveNamespaces</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="ds_8h.html">ds.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____transform_type__coll__graph.map b/doc/wsse/html/structds_____transform_type__coll__graph.map
new file mode 100644
index 0000000..2f874fa
--- /dev/null
+++ b/doc/wsse/html/structds_____transform_type__coll__graph.map
@@ -0,0 +1,2 @@
+base referer
+rect $struct__c14n_____inclusive_namespaces.html 6,17 201,44
diff --git a/doc/wsse/html/structds_____transform_type__coll__graph.md5 b/doc/wsse/html/structds_____transform_type__coll__graph.md5
new file mode 100644
index 0000000..850ed4b
--- /dev/null
+++ b/doc/wsse/html/structds_____transform_type__coll__graph.md5
@@ -0,0 +1 @@
+103af4e6d1db6a2938ab50bdfa89c0d7
\ No newline at end of file
diff --git a/doc/wsse/html/structds_____transform_type__coll__graph.png b/doc/wsse/html/structds_____transform_type__coll__graph.png
new file mode 100644
index 0000000..361f359
--- /dev/null
+++ b/doc/wsse/html/structds_____transform_type__coll__graph.png
Binary files differ
diff --git a/doc/wsse/html/structds_____transforms_type-members.html b/doc/wsse/html/structds_____transforms_type-members.html
new file mode 100644
index 0000000..8db84ab
--- /dev/null
+++ b/doc/wsse/html/structds_____transforms_type-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__TransformsType Member List</h1>This is the complete list of members for <a class="el" href="structds_____transforms_type.html">ds__TransformsType</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structds_____transforms_type.html#o0">__sizeTransform</a></td><td><a class="el" href="structds_____transforms_type.html">ds__TransformsType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____transforms_type.html#o1">Transform</a></td><td><a class="el" href="structds_____transforms_type.html">ds__TransformsType</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____transforms_type.html b/doc/wsse/html/structds_____transforms_type.html
new file mode 100644
index 0000000..bc687ed
--- /dev/null
+++ b/doc/wsse/html/structds_____transforms_type.html
@@ -0,0 +1,88 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: ds__TransformsType Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__TransformsType Struct Reference</h1>"http://www.w3.org/2000/09/xmldsig#":TransformsType is a complexType.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;ds.h&gt;</code>

+<p>

+Collaboration diagram for ds__TransformsType:<p><center><img src="structds_____transforms_type__coll__graph.png" border="0" usemap="#ds_____transforms_type__coll__map" alt="Collaboration graph"></center>

+<map name="ds_____transforms_type__coll__map">

+<area href="structds_____transform_type.html" shape="rect" coords="40,108,168,134" alt="">

+<area href="struct__c14n_____inclusive_namespaces.html" shape="rect" coords="6,17,201,44" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structds_____transforms_type-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____transforms_type.html#o0">__sizeTransform</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Size of the dynamic array of <a class="el" href="structds_____transform_type.html">ds__TransformType</a> is 0..unbounded.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____transform_type.html">ds__TransformType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____transforms_type.html#o1">Transform</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pointer to array of <a class="el" href="structds_____transform_type.html">ds__TransformType</a>.  <a href="#o1"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+"http://www.w3.org/2000/09/xmldsig#":TransformsType is a complexType. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="ds__TransformsType::__sizeTransform" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structds_____transforms_type.html#o0">ds__TransformsType::__sizeTransform</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Size of the dynamic array of <a class="el" href="structds_____transform_type.html">ds__TransformType</a> is 0..unbounded. 

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="ds__TransformsType::Transform" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="structds_____transform_type.html">ds__TransformType</a>* <a class="el" href="structds_____transforms_type.html#o1">ds__TransformsType::Transform</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Pointer to array of <a class="el" href="structds_____transform_type.html">ds__TransformType</a>. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="ds_8h.html">ds.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____transforms_type__coll__graph.map b/doc/wsse/html/structds_____transforms_type__coll__graph.map
new file mode 100644
index 0000000..ee1320f
--- /dev/null
+++ b/doc/wsse/html/structds_____transforms_type__coll__graph.map
@@ -0,0 +1,3 @@
+base referer
+rect $structds_____transform_type.html 40,108 168,134
+rect $struct__c14n_____inclusive_namespaces.html 6,17 201,44
diff --git a/doc/wsse/html/structds_____transforms_type__coll__graph.md5 b/doc/wsse/html/structds_____transforms_type__coll__graph.md5
new file mode 100644
index 0000000..b2970e7
--- /dev/null
+++ b/doc/wsse/html/structds_____transforms_type__coll__graph.md5
@@ -0,0 +1 @@
+c9d9ff5a12f7494a7a605590e92a9200
\ No newline at end of file
diff --git a/doc/wsse/html/structds_____transforms_type__coll__graph.png b/doc/wsse/html/structds_____transforms_type__coll__graph.png
new file mode 100644
index 0000000..71e6a9e
--- /dev/null
+++ b/doc/wsse/html/structds_____transforms_type__coll__graph.png
Binary files differ
diff --git a/doc/wsse/html/structds_____x509_data_type-members.html b/doc/wsse/html/structds_____x509_data_type-members.html
new file mode 100644
index 0000000..e52aa0c
--- /dev/null
+++ b/doc/wsse/html/structds_____x509_data_type-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__X509DataType Member List</h1>This is the complete list of members for <a class="el" href="structds_____x509_data_type.html">ds__X509DataType</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structds_____x509_data_type.html#o3">X509Certificate</a></td><td><a class="el" href="structds_____x509_data_type.html">ds__X509DataType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____x509_data_type.html#o4">X509CRL</a></td><td><a class="el" href="structds_____x509_data_type.html">ds__X509DataType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____x509_data_type.html#o0">X509IssuerSerial</a></td><td><a class="el" href="structds_____x509_data_type.html">ds__X509DataType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____x509_data_type.html#o1">X509SKI</a></td><td><a class="el" href="structds_____x509_data_type.html">ds__X509DataType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____x509_data_type.html#o2">X509SubjectName</a></td><td><a class="el" href="structds_____x509_data_type.html">ds__X509DataType</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____x509_data_type.html b/doc/wsse/html/structds_____x509_data_type.html
new file mode 100644
index 0000000..1d2fb73
--- /dev/null
+++ b/doc/wsse/html/structds_____x509_data_type.html
@@ -0,0 +1,168 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: ds__X509DataType Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__X509DataType Struct Reference</h1>"http://www.w3.org/2000/09/xmldsig#":X509DataType is a complexType.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;ds.h&gt;</code>

+<p>

+Collaboration diagram for ds__X509DataType:<p><center><img src="structds_____x509_data_type__coll__graph.png" border="0" usemap="#ds_____x509_data_type__coll__map" alt="Collaboration graph"></center>

+<map name="ds_____x509_data_type__coll__map">

+<area href="structds_____x509_issuer_serial_type.html" shape="rect" coords="6,17,180,44" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structds_____x509_data_type-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____x509_issuer_serial_type.html">ds__X509IssuerSerialType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____x509_data_type.html#o0">X509IssuerSerial</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____x509_data_type.html#o1">X509SKI</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element X509SKI of type xs:base64Binary.  <a href="#o1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____x509_data_type.html#o2">X509SubjectName</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element X509SubjectName of type xs:string.  <a href="#o2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____x509_data_type.html#o3">X509Certificate</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element X509Certificate of type xs:base64Binary.  <a href="#o3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____x509_data_type.html#o4">X509CRL</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element X509CRL of type xs:base64Binary.  <a href="#o4"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+"http://www.w3.org/2000/09/xmldsig#":X509DataType is a complexType. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o3" doxytag="ds__X509DataType::X509Certificate" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____x509_data_type.html#o3">ds__X509DataType::X509Certificate</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element X509Certificate of type xs:base64Binary. 

+<p>

+Required element.     </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="ds__X509DataType::X509CRL" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____x509_data_type.html#o4">ds__X509DataType::X509CRL</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element X509CRL of type xs:base64Binary. 

+<p>

+Required element.     </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="ds__X509DataType::X509IssuerSerial" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structds_____x509_issuer_serial_type.html">ds__X509IssuerSerialType</a>* <a class="el" href="structds_____x509_data_type.html#o0">ds__X509DataType::X509IssuerSerial</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Required element.     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="ds__X509DataType::X509SKI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____x509_data_type.html#o1">ds__X509DataType::X509SKI</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element X509SKI of type xs:base64Binary. 

+<p>

+Required element.     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="ds__X509DataType::X509SubjectName" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____x509_data_type.html#o2">ds__X509DataType::X509SubjectName</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element X509SubjectName of type xs:string. 

+<p>

+Required element.     </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="ds_8h.html">ds.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____x509_data_type__coll__graph.map b/doc/wsse/html/structds_____x509_data_type__coll__graph.map
new file mode 100644
index 0000000..73dbba0
--- /dev/null
+++ b/doc/wsse/html/structds_____x509_data_type__coll__graph.map
@@ -0,0 +1,2 @@
+base referer
+rect $structds_____x509_issuer_serial_type.html 6,17 180,44
diff --git a/doc/wsse/html/structds_____x509_data_type__coll__graph.md5 b/doc/wsse/html/structds_____x509_data_type__coll__graph.md5
new file mode 100644
index 0000000..1534dfb
--- /dev/null
+++ b/doc/wsse/html/structds_____x509_data_type__coll__graph.md5
@@ -0,0 +1 @@
+cc9b2a4131af1cdc2a3321eb0a1c19f7
\ No newline at end of file
diff --git a/doc/wsse/html/structds_____x509_data_type__coll__graph.png b/doc/wsse/html/structds_____x509_data_type__coll__graph.png
new file mode 100644
index 0000000..5a4bc4a
--- /dev/null
+++ b/doc/wsse/html/structds_____x509_data_type__coll__graph.png
Binary files differ
diff --git a/doc/wsse/html/structds_____x509_issuer_serial_type-members.html b/doc/wsse/html/structds_____x509_issuer_serial_type-members.html
new file mode 100644
index 0000000..be1e4fc
--- /dev/null
+++ b/doc/wsse/html/structds_____x509_issuer_serial_type-members.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__X509IssuerSerialType Member List</h1>This is the complete list of members for <a class="el" href="structds_____x509_issuer_serial_type.html">ds__X509IssuerSerialType</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structds_____x509_issuer_serial_type.html#o0">X509IssuerName</a></td><td><a class="el" href="structds_____x509_issuer_serial_type.html">ds__X509IssuerSerialType</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structds_____x509_issuer_serial_type.html#o1">X509SerialNumber</a></td><td><a class="el" href="structds_____x509_issuer_serial_type.html">ds__X509IssuerSerialType</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structds_____x509_issuer_serial_type.html b/doc/wsse/html/structds_____x509_issuer_serial_type.html
new file mode 100644
index 0000000..c60e5a4
--- /dev/null
+++ b/doc/wsse/html/structds_____x509_issuer_serial_type.html
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: ds__X509IssuerSerialType Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>ds__X509IssuerSerialType Struct Reference</h1>"http://www.w3.org/2000/09/xmldsig#":X509IssuerSerialType is a complexType.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;ds.h&gt;</code>

+<p>

+<a href="structds_____x509_issuer_serial_type-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____x509_issuer_serial_type.html#o0">X509IssuerName</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element X509IssuerName of type xs:string.  <a href="#o0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structds_____x509_issuer_serial_type.html#o1">X509SerialNumber</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Required element.  <a href="#o1"></a><br></td></tr>

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+"http://www.w3.org/2000/09/xmldsig#":X509IssuerSerialType is a complexType. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="ds__X509IssuerSerialType::X509IssuerName" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char* <a class="el" href="structds_____x509_issuer_serial_type.html#o0">ds__X509IssuerSerialType::X509IssuerName</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Element X509IssuerName of type xs:string. 

+<p>

+Required element.     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="ds__X509IssuerSerialType::X509SerialNumber" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structds_____x509_issuer_serial_type.html#o1">ds__X509IssuerSerialType::X509SerialNumber</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Required element. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="ds_8h.html">ds.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structsoap__smd__data-members.html b/doc/wsse/html/structsoap__smd__data-members.html
new file mode 100644
index 0000000..4bd6ed6
--- /dev/null
+++ b/doc/wsse/html/structsoap__smd__data-members.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>soap_smd_data Member List</h1>This is the complete list of members for <a class="el" href="structsoap__smd__data.html">soap_smd_data</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structsoap__smd__data.html#o0">alg</a></td><td><a class="el" href="structsoap__smd__data.html">soap_smd_data</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__smd__data.html#o1">ctx</a></td><td><a class="el" href="structsoap__smd__data.html">soap_smd_data</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__smd__data.html#o4">frecv</a></td><td><a class="el" href="structsoap__smd__data.html">soap_smd_data</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__smd__data.html#o3">fsend</a></td><td><a class="el" href="structsoap__smd__data.html">soap_smd_data</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__smd__data.html#o2">key</a></td><td><a class="el" href="structsoap__smd__data.html">soap_smd_data</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__smd__data.html#o5">mode</a></td><td><a class="el" href="structsoap__smd__data.html">soap_smd_data</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__smd__data.html#o6">user</a></td><td><a class="el" href="structsoap__smd__data.html">soap_smd_data</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structsoap__smd__data.html b/doc/wsse/html/structsoap__smd__data.html
new file mode 100644
index 0000000..02489d7
--- /dev/null
+++ b/doc/wsse/html/structsoap__smd__data.html
@@ -0,0 +1,202 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: soap_smd_data Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>soap_smd_data Struct Reference</h1>The smdevp engine context data.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;smdevp.h&gt;</code>

+<p>

+<a href="structsoap__smd__data-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__smd__data.html#o0">alg</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__smd__data.html#o1">ctx</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__smd__data.html#o2">key</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__smd__data.html#o3">fsend</a> )(struct soap *, const char *, size_t)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>size_t(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__smd__data.html#o4">frecv</a> )(struct soap *, char *, size_t)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>soap_mode&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__smd__data.html#o5">mode</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__smd__data.html#o6">user</a></td></tr>

+

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+The smdevp engine context data. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o0" doxytag="soap_smd_data::alg" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap__smd__data.html#o0">soap_smd_data::alg</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+The digest or signature algorithm used     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_smd_data::ctx" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void* <a class="el" href="structsoap__smd__data.html#o1">soap_smd_data::ctx</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+EVP_MD_CTX or HMAC_CTX     </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="soap_smd_data::frecv" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> size_t(* <a class="el" href="structsoap__smd__data.html#o4">soap_smd_data::frecv</a>)(struct soap *, char *, size_t)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="soap_smd_data::fsend" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap__smd__data.html#o3">soap_smd_data::fsend</a>)(struct soap *, const char *, size_t)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="soap_smd_data::key" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const void* <a class="el" href="structsoap__smd__data.html#o2">soap_smd_data::key</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+EVP_PKEY     </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="soap_smd_data::mode" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> soap_mode <a class="el" href="structsoap__smd__data.html#o5">soap_smd_data::mode</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o6" doxytag="soap_smd_data::user" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void* <a class="el" href="structsoap__smd__data.html#o6">soap_smd_data::user</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="smdevp_8h.html">smdevp.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structsoap__wsse__data-members.html b/doc/wsse/html/structsoap__wsse__data-members.html
new file mode 100644
index 0000000..34bec18
--- /dev/null
+++ b/doc/wsse/html/structsoap__wsse__data-members.html
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>soap_wsse_data Member List</h1>This is the complete list of members for <a class="el" href="structsoap__wsse__data.html">soap_wsse_data</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structsoap__wsse__data.html#o6">digest</a></td><td><a class="el" href="structsoap__wsse__data.html">soap_wsse_data</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__wsse__data.html#o10">fdisconnect</a></td><td><a class="el" href="structsoap__wsse__data.html">soap_wsse_data</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__wsse__data.html#o9">fpreparefinal</a></td><td><a class="el" href="structsoap__wsse__data.html">soap_wsse_data</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__wsse__data.html#o7">fprepareinit</a></td><td><a class="el" href="structsoap__wsse__data.html">soap_wsse_data</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__wsse__data.html#o8">fpreparesend</a></td><td><a class="el" href="structsoap__wsse__data.html">soap_wsse_data</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__wsse__data.html#o0">sign_alg</a></td><td><a class="el" href="structsoap__wsse__data.html">soap_wsse_data</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__wsse__data.html#o1">sign_key</a></td><td><a class="el" href="structsoap__wsse__data.html">soap_wsse_data</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__wsse__data.html#o2">sign_keylen</a></td><td><a class="el" href="structsoap__wsse__data.html">soap_wsse_data</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__wsse__data.html#o3">vrfy_alg</a></td><td><a class="el" href="structsoap__wsse__data.html">soap_wsse_data</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__wsse__data.html#o4">vrfy_key</a></td><td><a class="el" href="structsoap__wsse__data.html">soap_wsse_data</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__wsse__data.html#o5">vrfy_keylen</a></td><td><a class="el" href="structsoap__wsse__data.html">soap_wsse_data</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structsoap__wsse__data.html b/doc/wsse/html/structsoap__wsse__data.html
new file mode 100644
index 0000000..f6c5c13
--- /dev/null
+++ b/doc/wsse/html/structsoap__wsse__data.html
@@ -0,0 +1,309 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: soap_wsse_data Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>soap_wsse_data Struct Reference</h1>wssepi plugin data  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;wsseapi.h&gt;</code>

+<p>

+Collaboration diagram for soap_wsse_data:<p><center><img src="structsoap__wsse__data__coll__graph.png" border="0" usemap="#soap__wsse__data__coll__map" alt="Collaboration graph"></center>

+<map name="soap__wsse__data__coll__map">

+<area href="structsoap__wsse__digest.html" shape="rect" coords="7,108,132,134" alt="">

+<area href="structsoap__smd__data.html" shape="rect" coords="15,17,124,44" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structsoap__wsse__data-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__wsse__data.html#o0">sign_alg</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__wsse__data.html#o1">sign_key</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__wsse__data.html#o2">sign_keylen</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__wsse__data.html#o3">vrfy_alg</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__wsse__data.html#o4">vrfy_key</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__wsse__data.html#o5">vrfy_keylen</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__wsse__digest.html">soap_wsse_digest</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__wsse__data.html#o6">digest</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__wsse__data.html#o7">fprepareinit</a> )(struct soap *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__wsse__data.html#o8">fpreparesend</a> )(struct soap *, const char *, size_t)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__wsse__data.html#o9">fpreparefinal</a> )(struct soap *)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__wsse__data.html#o10">fdisconnect</a> )(struct soap *)</td></tr>

+

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+wssepi plugin data 

+<p>

+The signature key (private) and verification key (public) are kept separate. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o6" doxytag="soap_wsse_data::digest" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__wsse__digest.html">soap_wsse_digest</a>* <a class="el" href="structsoap__wsse__data.html#o6">soap_wsse_data::digest</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+List of ID-hash pairs     </td>

+  </tr>

+</table>

+<a class="anchor" name="o10" doxytag="soap_wsse_data::fdisconnect" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap__wsse__data.html#o10">soap_wsse_data::fdisconnect</a>)(struct soap *)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o9" doxytag="soap_wsse_data::fpreparefinal" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap__wsse__data.html#o9">soap_wsse_data::fpreparefinal</a>)(struct soap *)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o7" doxytag="soap_wsse_data::fprepareinit" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap__wsse__data.html#o7">soap_wsse_data::fprepareinit</a>)(struct soap *)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o8" doxytag="soap_wsse_data::fpreparesend" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int(* <a class="el" href="structsoap__wsse__data.html#o8">soap_wsse_data::fpreparesend</a>)(struct soap *, const char *, size_t)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="soap_wsse_data::sign_alg" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap__wsse__data.html#o0">soap_wsse_data::sign_alg</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+The digest or signature algorithm used     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_wsse_data::sign_key" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const void* <a class="el" href="structsoap__wsse__data.html#o1">soap_wsse_data::sign_key</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+EVP_PKEY or key string for HMAC     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="soap_wsse_data::sign_keylen" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap__wsse__data.html#o2">soap_wsse_data::sign_keylen</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+HMAC key length     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="soap_wsse_data::vrfy_alg" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap__wsse__data.html#o3">soap_wsse_data::vrfy_alg</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+The signature verify algorithm used     </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="soap_wsse_data::vrfy_key" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const void* <a class="el" href="structsoap__wsse__data.html#o4">soap_wsse_data::vrfy_key</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+EVP_PKEY or key string for HMAC verify     </td>

+  </tr>

+</table>

+<a class="anchor" name="o5" doxytag="soap_wsse_data::vrfy_keylen" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int <a class="el" href="structsoap__wsse__data.html#o5">soap_wsse_data::vrfy_keylen</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+HMAC key length     </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="wsseapi_8h.html">wsseapi.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structsoap__wsse__data__coll__graph.map b/doc/wsse/html/structsoap__wsse__data__coll__graph.map
new file mode 100644
index 0000000..837df11
--- /dev/null
+++ b/doc/wsse/html/structsoap__wsse__data__coll__graph.map
@@ -0,0 +1,3 @@
+base referer
+rect $structsoap__wsse__digest.html 7,108 132,134
+rect $structsoap__smd__data.html 15,17 124,44
diff --git a/doc/wsse/html/structsoap__wsse__data__coll__graph.md5 b/doc/wsse/html/structsoap__wsse__data__coll__graph.md5
new file mode 100644
index 0000000..fa9885d
--- /dev/null
+++ b/doc/wsse/html/structsoap__wsse__data__coll__graph.md5
@@ -0,0 +1 @@
+95873a91bb2f831d2333637b39c65374
\ No newline at end of file
diff --git a/doc/wsse/html/structsoap__wsse__data__coll__graph.png b/doc/wsse/html/structsoap__wsse__data__coll__graph.png
new file mode 100644
index 0000000..f8476fc
--- /dev/null
+++ b/doc/wsse/html/structsoap__wsse__data__coll__graph.png
Binary files differ
diff --git a/doc/wsse/html/structsoap__wsse__digest-members.html b/doc/wsse/html/structsoap__wsse__digest-members.html
new file mode 100644
index 0000000..6981973
--- /dev/null
+++ b/doc/wsse/html/structsoap__wsse__digest-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>soap_wsse_digest Member List</h1>This is the complete list of members for <a class="el" href="structsoap__wsse__digest.html">soap_wsse_digest</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structsoap__wsse__digest.html#o3">hash</a></td><td><a class="el" href="structsoap__wsse__digest.html">soap_wsse_digest</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__wsse__digest.html#o4">id</a></td><td><a class="el" href="structsoap__wsse__digest.html">soap_wsse_digest</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__wsse__digest.html#o1">level</a></td><td><a class="el" href="structsoap__wsse__digest.html">soap_wsse_digest</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__wsse__digest.html#o0">next</a></td><td><a class="el" href="structsoap__wsse__digest.html">soap_wsse_digest</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__wsse__digest.html#o2">smd</a></td><td><a class="el" href="structsoap__wsse__digest.html">soap_wsse_digest</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structsoap__wsse__digest.html b/doc/wsse/html/structsoap__wsse__digest.html
new file mode 100644
index 0000000..eb2f5c7
--- /dev/null
+++ b/doc/wsse/html/structsoap__wsse__digest.html
@@ -0,0 +1,158 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: soap_wsse_digest Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>soap_wsse_digest Struct Reference</h1>Digest dictionary: linked list of ID-hash pairs.  

+<a href="#_details">More...</a>

+<p>

+<code>#include &lt;wsseapi.h&gt;</code>

+<p>

+Collaboration diagram for soap_wsse_digest:<p><center><img src="structsoap__wsse__digest__coll__graph.png" border="0" usemap="#soap__wsse__digest__coll__map" alt="Collaboration graph"></center>

+<map name="soap__wsse__digest__coll__map">

+<area href="structsoap__smd__data.html" shape="rect" coords="15,17,124,44" alt="">

+</map>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structsoap__wsse__digest-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__wsse__digest.html">soap_wsse_digest</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__wsse__digest.html#o0">next</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__wsse__digest.html#o1">level</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__smd__data.html">soap_smd_data</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__wsse__digest.html#o2">smd</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__wsse__digest.html#o3">hash</a> [SOAP_SMD_MAX_SIZE]</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__wsse__digest.html#o4">id</a> [1]</td></tr>

+

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Digest dictionary: linked list of ID-hash pairs. 

+<p>

+The digest dictionary is populated by the soap_wsse_preparesend callback. The callback intercepts XML elements with wsu:Id attributes and computes the digest during the preprocessing of a message transmission. The 'level' field is used to determine when the end of an element is reached. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o3" doxytag="soap_wsse_digest::hash" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> unsigned char <a class="el" href="structsoap__wsse__digest.html#o3">soap_wsse_digest::hash</a>[SOAP_SMD_MAX_SIZE]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Digest hash value     </td>

+  </tr>

+</table>

+<a class="anchor" name="o4" doxytag="soap_wsse_digest::id" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char <a class="el" href="structsoap__wsse__digest.html#o4">soap_wsse_digest::id</a>[1]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+String flows down the struct     </td>

+  </tr>

+</table>

+<a class="anchor" name="o1" doxytag="soap_wsse_digest::level" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> unsigned int <a class="el" href="structsoap__wsse__digest.html#o1">soap_wsse_digest::level</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+XML parser depth level     </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="soap_wsse_digest::next" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__wsse__digest.html">soap_wsse_digest</a>* <a class="el" href="structsoap__wsse__digest.html#o0">soap_wsse_digest::next</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Next in list     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="soap_wsse_digest::smd" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__smd__data.html">soap_smd_data</a> <a class="el" href="structsoap__wsse__digest.html#o2">soap_wsse_digest::smd</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+smdevp engine context     </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="wsseapi_8h.html">wsseapi.h</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structsoap__wsse__digest__coll__graph.map b/doc/wsse/html/structsoap__wsse__digest__coll__graph.map
new file mode 100644
index 0000000..9920491
--- /dev/null
+++ b/doc/wsse/html/structsoap__wsse__digest__coll__graph.map
@@ -0,0 +1,2 @@
+base referer
+rect $structsoap__smd__data.html 15,17 124,44
diff --git a/doc/wsse/html/structsoap__wsse__digest__coll__graph.md5 b/doc/wsse/html/structsoap__wsse__digest__coll__graph.md5
new file mode 100644
index 0000000..e80a5d4
--- /dev/null
+++ b/doc/wsse/html/structsoap__wsse__digest__coll__graph.md5
@@ -0,0 +1 @@
+5134a2c2d5e053b0be06ee84df2ccb6c
\ No newline at end of file
diff --git a/doc/wsse/html/structsoap__wsse__digest__coll__graph.png b/doc/wsse/html/structsoap__wsse__digest__coll__graph.png
new file mode 100644
index 0000000..8763175
--- /dev/null
+++ b/doc/wsse/html/structsoap__wsse__digest__coll__graph.png
Binary files differ
diff --git a/doc/wsse/html/structsoap__wsse__session-members.html b/doc/wsse/html/structsoap__wsse__session-members.html
new file mode 100644
index 0000000..3224282
--- /dev/null
+++ b/doc/wsse/html/structsoap__wsse__session-members.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: Member List</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>soap_wsse_session Member List</h1>This is the complete list of members for <a class="el" href="structsoap__wsse__session.html">soap_wsse_session</a>, including all inherited members.<p><table>

+  <tr class="memlist"><td><a class="el" href="structsoap__wsse__session.html#o1">expired</a></td><td><a class="el" href="structsoap__wsse__session.html">soap_wsse_session</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__wsse__session.html#o2">hash</a></td><td><a class="el" href="structsoap__wsse__session.html">soap_wsse_session</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__wsse__session.html#o0">next</a></td><td><a class="el" href="structsoap__wsse__session.html">soap_wsse_session</a></td><td></td></tr>

+  <tr class="memlist"><td><a class="el" href="structsoap__wsse__session.html#o3">nonce</a></td><td><a class="el" href="structsoap__wsse__session.html">soap_wsse_session</a></td><td></td></tr>

+</table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structsoap__wsse__session.html b/doc/wsse/html/structsoap__wsse__session.html
new file mode 100644
index 0000000..8623906
--- /dev/null
+++ b/doc/wsse/html/structsoap__wsse__session.html
@@ -0,0 +1,126 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: soap_wsse_session Struct Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>soap_wsse_session Struct Reference</h1>Digest authentication session data.  

+<a href="#_details">More...</a>

+<p>

+Collaboration diagram for soap_wsse_session:<p><center><img src="structsoap__wsse__session__coll__graph.png" border="0" usemap="#soap__wsse__session__coll__map" alt="Collaboration graph"></center>

+<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structsoap__wsse__session-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__wsse__session.html">soap_wsse_session</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__wsse__session.html#o0">next</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>time_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__wsse__session.html#o1">expired</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__wsse__session.html#o2">hash</a> [SOAP_SMD_SHA1_SIZE]</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__wsse__session.html#o3">nonce</a> [1]</td></tr>

+

+</table>

+<hr><a name="_details"></a><h2>Detailed Description</h2>

+Digest authentication session data. 

+<p>

+<hr><h2>Member Data Documentation</h2>

+<a class="anchor" name="o1" doxytag="soap_wsse_session::expired" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> time_t <a class="el" href="structsoap__wsse__session.html#o1">soap_wsse_session::expired</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Session expiration     </td>

+  </tr>

+</table>

+<a class="anchor" name="o2" doxytag="soap_wsse_session::hash" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char <a class="el" href="structsoap__wsse__session.html#o2">soap_wsse_session::hash</a>[SOAP_SMD_SHA1_SIZE]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+SHA1 digest     </td>

+  </tr>

+</table>

+<a class="anchor" name="o0" doxytag="soap_wsse_session::next" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__wsse__session.html">soap_wsse_session</a>* <a class="el" href="structsoap__wsse__session.html#o0">soap_wsse_session::next</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Next session in list     </td>

+  </tr>

+</table>

+<a class="anchor" name="o3" doxytag="soap_wsse_session::nonce" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> char <a class="el" href="structsoap__wsse__session.html#o3">soap_wsse_session::nonce</a>[1]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Nonce string flows into region below this struct     </td>

+  </tr>

+</table>

+<hr>The documentation for this struct was generated from the following file:<ul>

+<li>/Users/engelen/Projects/gsoap/doc/wsse/<a class="el" href="wsseapi_8c.html">wsseapi.c</a></ul>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/structsoap__wsse__session__coll__graph.map b/doc/wsse/html/structsoap__wsse__session__coll__graph.map
new file mode 100644
index 0000000..5a14779
--- /dev/null
+++ b/doc/wsse/html/structsoap__wsse__session__coll__graph.map
@@ -0,0 +1 @@
+base referer
diff --git a/doc/wsse/html/structsoap__wsse__session__coll__graph.md5 b/doc/wsse/html/structsoap__wsse__session__coll__graph.md5
new file mode 100644
index 0000000..f7091da
--- /dev/null
+++ b/doc/wsse/html/structsoap__wsse__session__coll__graph.md5
@@ -0,0 +1 @@
+83dab939f303d6003cd1258a0d5f1d3a
\ No newline at end of file
diff --git a/doc/wsse/html/structsoap__wsse__session__coll__graph.png b/doc/wsse/html/structsoap__wsse__session__coll__graph.png
new file mode 100644
index 0000000..fbcdae0
--- /dev/null
+++ b/doc/wsse/html/structsoap__wsse__session__coll__graph.png
Binary files differ
diff --git a/doc/wsse/html/wsse.html b/doc/wsse/html/wsse.html
new file mode 100644
index 0000000..cf42bb4
--- /dev/null
+++ b/doc/wsse/html/wsse.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: The wsse plugin</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1><a class="anchor" name="wsse">The wsse plugin</a></h1><h2><a class="anchor" name="wsse_5">

+Security Header</a></h2>

+The material in this section relates to the WS-Security specification section 5.<p>

+To use the wsse plugin:<ol>

+<li>Run wsdl2h -t typemap.dat on a WSDL of a service that requires WS-Security headers. The typemap.dat file is used to recognize and translate Security header blocks.</li><li>Run soapcpp2 on the header file produced by wsdl2h.</li><li>(Re-)compile stdsoap2.c/pp, dom.c/pp, <a class="el" href="smdevp_8c.html">smdevp.c</a>, <a class="el" href="wsseapi_8c.html">wsseapi.c</a> and the generated source files with the -DWITH_DOM and -DWITH_OPENSSL compile flags set. The <a class="el" href="smdevp_8c.html">smdevp.c</a> and wssapi.c files are located in the 'plugin' directory.</li><li>Use the wsse plugin API functions described below to add and verify Security headers.</li></ol>

+<p>

+An example wsse client/server application can be found in samples/wsse.<p>

+The Security header block was generated from the WS-Security schema with the wsdl2h tool and WS/WS-typemap.dat:<p>

+<div class="fragment"><pre>    $ wsdl2h -cegxy -o wsse.h -t WS/WS-typemap.dat WS/wsse.xsd

+</pre></div><p>

+The same process was used to generate the header file <a class="el" href="ds_8h.html">ds.h</a> from the XML digital signatures core schema.<p>

+The import/wsse.h file has the following definition for the Security header block:<p>

+<div class="fragment"><pre><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__wsse_____security.html">_wsse__Security</a>

+{       <span class="keyword">struct </span><a class="code" href="struct__wsu_____timestamp.html">_wsu__Timestamp</a>*                 wsu__Timestamp;

+        <span class="keyword">struct </span><a class="code" href="struct__wsse_____username_token.html">_wsse__UsernameToken</a>*            UsernameToken;

+        <span class="keyword">struct </span><a class="code" href="struct__wsse_____binary_security_token.html">_wsse__BinarySecurityToken</a>*      BinarySecurityToken;

+        <span class="keyword">struct </span><a class="code" href="structds_____signature_type.html">ds__SignatureType</a>*               ds__Signature;

+        @<span class="keywordtype">char</span>*                                  SOAP_ENV__actor;

+        @<span class="keywordtype">char</span>*                                  SOAP_ENV__role;

+} <a class="code" href="struct__wsse_____security.html">_wsse__Security</a>;

+</pre></div><p>

+To add an empty Security header block to the SOAP header, use:<p>

+<div class="fragment"><pre>    <a class="code" href="wsseapi_8c.html#a31">soap_wsse_add_Security</a>(soap);

+</pre></div><p>

+To delete a Security header, use:<p>

+<div class="fragment"><pre>    <a class="code" href="wsseapi_8c.html#a33">soap_wsse_delete_Security</a>(soap);

+</pre></div><p>

+Adding an empty Security header block is not very useful. We will mainly make use of the higher-level functions of the wsse plugin to populate and verify Security header content.<p>

+Note: The soap context includes an actor value soap.actor that is populated and rendered as the SOAP-ENV:actor (SOAP 1.1) or SOAP-ENV:role (SOAP 1.2) attribute in XML within the generic SOAP Header. The attribute is optional, but should be used to target a recipient such as an intermediate node to process the SOAP header. In contrast, actor or role attributes within Security header blocks target specific recipients to process the Security header block. The gSOAP implementation does not automate this feature and application should set and check the actor/role attribute when necessary. In addition, the current implementation supports the inclusion of a single Security header block in the SOAP header.<p>

+To populate the SOAP-ENV:actor or SOAP-ENV:role attribute within the Security header, use:<p>

+<div class="fragment"><pre>    <a class="code" href="wsseapi_8c.html#a32">soap_wsse_add_Security_actor</a>(soap, <span class="stringliteral">"recipient"</span>);

+</pre></div><p>

+To obtain the actor or role value (e.g. after receiving a message), use:<p>

+<div class="fragment"><pre>    <a class="code" href="struct__wsse_____security.html">_wsse__Security</a> *security = <a class="code" href="wsseapi_8c.html#a34">soap_wsse_Security</a>(soap);

+    <span class="keywordflow">if</span> (security)

+    { ... = security-&gt;<a class="code" href="struct__wsse_____security.html#o4">SOAP_ENV__actor</a>; <span class="comment">// SOAP 1.1</span>

+      ... = security-&gt;<a class="code" href="struct__wsse_____security.html#o5">SOAP_ENV__role</a>;  <span class="comment">// SOAP 1.2</span>

+</pre></div><p>

+The SOAP-ENV:mustUnderstand attribute is automatically added and checked by the gSOAP engine. A gSOAP application compiled without Security support will reject Security headers.<p>

+Security header blocks are attached to the soap context, which means that the information will be automatically kept to support multiple invocations.<h2><a class="anchor" name="wsse_6">

+Security Tokens</a></h2>

+The material in this section relates to the WS-Security specification section 6.<h3><a class="anchor" name="wsse_6_2">

+User Name Token</a></h3>

+To add a user name token to the Security header block, use:<p>

+<div class="fragment"><pre>    <a class="code" href="wsseapi_8c.html#a41">soap_wsse_add_UsernameTokenText</a>(soap, <span class="stringliteral">"Id"</span>, <span class="stringliteral">"username"</span>, NULL);

+</pre></div><p>

+The Id value is optional. When non-NULL the user name token is included in the digital signature to protect its integrity. It is common for the wsse plugin functions to accept such Ids, which are serialized as wsu:Id identifiers for cross-referencing XML elements. The signature engine of the wsse plugin is designed to automatically sign all wsu:Id attributed elements to simplify the code you need to write to implement the signing process.<p>

+To add a user name token with clear text password, use:<p>

+<div class="fragment"><pre>    <a class="code" href="wsseapi_8c.html#a41">soap_wsse_add_UsernameTokenText</a>(soap, <span class="stringliteral">"Id"</span>, <span class="stringliteral">"username"</span>, <span class="stringliteral">"password"</span>);

+</pre></div><p>

+It is strongly recommended to use <a class="el" href="wsseapi_8h.html#a24">soap_wsse_add_UsernameTokenText</a> only in combination with HTTPS encrypted transmission or not at all. A better alternative is to use password digests. With password digest authentication, the digest value of a password (with message creation time and a random nonce) is compared on both sides, thus eliminating the need to exchange a password over the wire.<p>

+To add a user name token with password digest, use:<p>

+<div class="fragment"><pre>    <a class="code" href="wsseapi_8c.html#a42">soap_wsse_add_UsernameTokenDigest</a>(soap, <span class="stringliteral">"Id"</span>, <span class="stringliteral">"username"</span>, <span class="stringliteral">"password"</span>);

+</pre></div><p>

+Although the password string is passed to this function, it is not rendered in XML or stored in a message log. It has been argued that this approach adopted by the WS-Security protocol is still vulnerable since the application retrieves the password in text form requiring a database to store passwords in clear text. However, a digest algorithm can be used to hash the passwords and store their digests instead, which eliminates the need to store clear-text passwords. Note that this is a common approach adopted by Unix for decades.<p>

+By setting the Id value to a unique string, the user name token is also digitally signed by the signature engine further preventing tampering with its value.<p>

+You must use <a class="el" href="wsseapi_8h.html#a25">soap_wsse_add_UsernameTokenDigest</a> for each message exchange to refresh the password digest even when the user name and password are not changed. Otherwise, the receiver might flag the message as a replay attack.<p>

+Clear-text passwords and password digests are verified with <a class="el" href="wsseapi_8h.html#a28">soap_wsse_verify_Password</a>. To verify a password at the receiving side to authorize a request (e.g. within a Web service operation), use:<p>

+<div class="fragment"><pre>    <span class="keywordtype">int</span> ns__myMethod(<span class="keyword">struct</span> soap *soap, ...)

+    { <span class="keyword">const</span> <span class="keywordtype">char</span> *username = <a class="code" href="wsseapi_8c.html#a44">soap_wsse_get_Username</a>(soap);

+      <span class="keyword">const</span> <span class="keywordtype">char</span> *password;

+      <span class="keywordflow">if</span> (!username)

+        <span class="keywordflow">return</span> soap-&gt;error; <span class="comment">// no username: return FailedAuthentication</span>

+      password = ...; <span class="comment">// lookup password of username</span>

+      <span class="keywordflow">if</span> (<a class="code" href="wsseapi_8c.html#a45">soap_wsse_verify_Password</a>(soap, password))

+        <span class="keywordflow">return</span> soap-&gt;error; <span class="comment">// password verification failed: return FailedAuthentication</span>

+      ... <span class="comment">// process request</span>

+      <span class="keywordflow">return</span> SOAP_OK;

+    }

+</pre></div><p>

+Note that the <a class="el" href="wsseapi_8h.html#a27">soap_wsse_get_Username</a> functions sets the wsse:FailedAuthentication fault. It is common for the wsse plugin functions to return SOAP_OK or a wsse fault that should be passed to the sender by returning soap-&gt;error from service operations. The fault is displayed with the soap_print_fault function.<p>

+Password digest authentication prevents message replay attacks. The wsse plugin keeps a database of password digests to thwart replay attacks. This is the only part in the plugin code that requires mutex provided by threads.h. Of course, this only works correctly if the server is persistent, such as a stand-alone service. Note that CGI-based services do not keep state. Machine clocks must be synchronized and clock skew should not exceed <a class="el" href="wsseapi_8c.html#a1">SOAP_WSSE_CLKSKEW</a> at the server side.<h3><a class="anchor" name="wsse_6_3">

+Binary Security Tokens</a></h3>

+X509 certificates are commonly included in Security header blocks as binary security tokens. A certificate is used to verify the digital signature of a digitally signed message using the public key embedded within the certificate. The certificate itself is signed by a certificate authority (CA) that vouches for the authenticity of the certificate, i.e. to prove the identify of the message originator. This verification process is important, because digital signatures are useless without verification: an attacker could simply replace the message, sign it, and replace the certificate.<p>

+Certificates are automatically verified by the wsse plugin signature engine when received and accessed, which means that the certificates of the CAs must be made accessible to the wsse plugin as follows:<p>

+<div class="fragment"><pre>    soap-&gt;cafile = <span class="stringliteral">"cacerts.pem"</span>;  <span class="comment">// use this</span>

+    soap-&gt;capath = <span class="stringliteral">"dir/to/certs"</span>; <span class="comment">// and/or point to CA certs</span>

+    soap-&gt;crlfile = <span class="stringliteral">"revoked.pem"</span>; <span class="comment">// use CRL (optional)</span>

+</pre></div><p>

+The <a class="el" href="wsseapi_8h.html#a35">soap_wsse_verify_X509</a> function checks the validity of a certificate. The check is automatically performed. The check is also performed when retrieving the certificate from a Security header block, either automatically by the wsse plugin's signature verification engine or manually as follows:<p>

+<div class="fragment"><pre>    X509 *cert = <a class="code" href="wsseapi_8c.html#a51">soap_wsse_get_BinarySecurityTokenX509</a>(soap, <span class="stringliteral">"Id"</span>);

+</pre></div><p>

+where Id is the identification string of the binary security token or NULL.<p>

+The verification is an expensive process that will be optimized in future releases by caching the certificate chain.<p>

+To attach a binary security token stored in a PEM file to a Security header block for transmission, use:<p>

+<div class="fragment"><pre>    <a class="code" href="wsseapi_8c.html#a48">soap_wsse_add_BinarySecurityTokenPEM</a>(soap, NULL, <span class="stringliteral">"mycert.pem"</span>)

+</pre></div><p>

+A binary security token can be automatically signed by setting its Id attribute:<p>

+<div class="fragment"><pre>    <a class="code" href="wsseapi_8c.html#a48">soap_wsse_add_BinarySecurityTokenPEM</a>(soap, <span class="stringliteral">"X509Token"</span>, <span class="stringliteral">"mycert.pem"</span>)

+</pre></div><p>

+Repeatedly loading a certificate from a PEM file is inefficient. To reuse a certificate loaded from a PEM file for multiple invocations, use:<p>

+<div class="fragment"><pre>    FILE *fd = fopen(<span class="stringliteral">"mycert.pem"</span>, <span class="stringliteral">"r"</span>);

+    X509 *cert = PEM_read_X509(fd, NULL, NULL, NULL);

+    fclose(fd);

+    <span class="keywordflow">if</span> (<a class="code" href="wsseapi_8c.html#a47">soap_wsse_add_BinarySecurityTokenX509</a>(soap, <span class="stringliteral">"X509Token"</span>, cert))

+      ... <span class="comment">// an error occurred</span>

+</pre></div><p>

+Other types of binary security tokens can be added to the Security header block using:<p>

+<div class="fragment"><pre>    <a class="code" href="wsseapi_8c.html#a46">soap_wsse_add_BinarySecurityToken</a>(soap, <span class="stringliteral">"Id"</span>, <span class="stringliteral">"valueType"</span>, data, datalen);

+</pre></div><h2><a class="anchor" name="wsse_6_4">

+XML Tokens</a></h2>

+The use and processing rules for XML tokens such as SAML assertions is specific to an application. The wsse plugin does not automate the use of XML tokens. The developer is encouraged to generate code for the SAML schema with wsdl2h and add the necessary assertions to the Security header block:<p>

+<div class="fragment"><pre><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__wsse_____security.html">_wsse__Security</a>

+{       <span class="keyword">struct </span><a class="code" href="struct__wsu_____timestamp.html">_wsu__Timestamp</a>*                 wsu__Timestamp;

+        <span class="keyword">struct </span><a class="code" href="struct__wsse_____username_token.html">_wsse__UsernameToken</a>*            UsernameToken;

+        <span class="keyword">struct </span><a class="code" href="struct__wsse_____binary_security_token.html">_wsse__BinarySecurityToken</a>*      BinarySecurityToken;

+        <span class="keyword">struct </span>_saml__Assertion*                saml__Assertion; <span class="comment">// added</span>

+        <span class="keyword">struct </span><a class="code" href="structds_____signature_type.html">ds__SignatureType</a>*               ds__Signature;

+        @<span class="keywordtype">char</span>*                                  SOAP_ENV__actor;

+        @<span class="keywordtype">char</span>*                                  SOAP_ENV__role;

+} <a class="code" href="struct__wsse_____security.html">_wsse__Security</a>;

+</pre></div><p>

+Alternatively, a DOM can be used to store and retrieve XML tokens:<p>

+<div class="fragment"><pre><span class="preprocessor">#import "dom.h"</span>

+<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__wsse_____security.html">_wsse__Security</a>

+{       <span class="keyword">struct </span><a class="code" href="struct__wsu_____timestamp.html">_wsu__Timestamp</a>*                 wsu__Timestamp;

+        <span class="keyword">struct </span><a class="code" href="struct__wsse_____username_token.html">_wsse__UsernameToken</a>*            UsernameToken;

+        <span class="keyword">struct </span><a class="code" href="struct__wsse_____binary_security_token.html">_wsse__BinarySecurityToken</a>*      BinarySecurityToken;

+        <span class="keyword">struct </span><a class="code" href="structds_____signature_type.html">ds__SignatureType</a>*               ds__Signature;

+        <span class="keywordtype">int</span>                                     __size;

+        xsd__anyType*                           any;

+        @<span class="keywordtype">char</span>*                                  SOAP_ENV__actor;

+        @<span class="keywordtype">char</span>*                                  SOAP_ENV__role;

+} <a class="code" href="struct__wsse_____security.html">_wsse__Security</a>;

+</pre></div><h2><a class="anchor" name="wsse_7">

+Token References</a></h2>

+The material in this section relates to the WS-Security specification section 7.<p>

+To use a certificate for signature verification, add a direct security token reference URI for the token to the KeyInfo, for example:<p>

+<div class="fragment"><pre>    <a class="code" href="wsseapi_8c.html#a66">soap_wsse_add_KeyInfo_SecurityTokenReferenceURI</a>(soap, <span class="stringliteral">"URI"</span>, <span class="stringliteral">"valueType"</span>);

+</pre></div><p>

+and:<p>

+<div class="fragment"><pre>    <a class="code" href="wsseapi_8c.html#a67">soap_wsse_add_KeyInfo_SecurityTokenReferenceX509</a>(soap, <span class="stringliteral">"URI"</span>);

+</pre></div><p>

+For X509 certificates we use this to add a binary security token with the certificate and a reference to the local token:<p>

+<div class="fragment"><pre>    <span class="keywordflow">if</span> (<a class="code" href="wsseapi_8c.html#a47">soap_wsse_add_BinarySecurityTokenX509</a>(soap, <span class="stringliteral">"X509Token"</span>, cert)

+     || <a class="code" href="wsseapi_8c.html#a67">soap_wsse_add_KeyInfo_SecurityTokenReferenceX509</a>(soap, <span class="stringliteral">"#X509Token"</span>))

+      ... <span class="comment">// an error occurred</span>

+</pre></div><p>

+This follows the recommended practice to place Security token references in the KeyInfo element of a Signature. The KeyInfo is used to verify the validity of a signature value.<p>

+Key identifiers can be used as well:<p>

+<div class="fragment"><pre>    <a class="code" href="wsseapi_8c.html#a70">soap_wsse_add_KeyInfo_SecurityTokenReferenceKeyIdentifier</a>(soap, <span class="stringliteral">"Id"</span>, <span class="stringliteral">"valueType"</span>, data, datalen);

+</pre></div><p>

+Embedded references are added with:<p>

+<div class="fragment"><pre>    <a class="code" href="wsseapi_8c.html#a73">soap_wsse_add_KeyInfo_SecurityTokenReferenceEmbedded</a>(soap, <span class="stringliteral">"Id"</span>, <span class="stringliteral">"valueType"</span>);

+</pre></div><p>

+TODO item: full support for embedded reference is currently under construction.<p>

+The use of key names is not recommended, but in case they are required they can be added with:<p>

+<div class="fragment"><pre>    <a class="code" href="wsseapi_8c.html#a64">soap_wsse_add_KeyInfo_KeyName</a>(soap, <span class="stringliteral">"name"</span>);

+</pre></div><h2><a class="anchor" name="wsse_8">

+Signatures</a></h2>

+The material in this section relates to the WS-Security specification section 8.<p>

+The wsse plugin must be registered to sign and verify messages:<p>

+<div class="fragment"><pre>    soap_register_plugin(soap, soap_wsse);

+</pre></div><p>

+XML signatures are usually computed over normalized XML (to ensure the XML processors of intermediate nodes can accurately reproduce the XML). To this end, the exclusive canonical XML standard (exc-c14n) is required, which is set using the SOAP_XML_CANONICAL flag:<p>

+<div class="fragment"><pre>    <span class="keyword">struct </span>soap *soap = soap_new1(SOAP_XML_CANONICAL);

+    soap_register_plugin(soap, soap_wsse);

+</pre></div><p>

+If you prefer XML indentation, use:<p>

+<div class="fragment"><pre>    <span class="keyword">struct </span>soap *soap = soap_new1(SOAP_XML_CANONICAL | SOAP_XML_INDENT);

+    soap_register_plugin(soap, soap_wsse);

+</pre></div><p>

+Next, we decide which signature algorithm is appropriate to use:<ul>

+<li>HMAC-SHA1 uses a secret key (also known as a shared key in symmetric cryptography) to sign the SHA1 digest of the SignedInfo element.</li><li>DSA-SHA1 uses a DSA private key to sign the SHA1 digest of the SignedInfo element.</li><li>RSA-SHA1 uses a RSA private key to sign the SHA1 digest of the SignedInfo element.</li></ul>

+<p>

+HMAC-SHA1 is the simplest method, but relies on the fact that you have to make absolutely sure the key is kept secret on both the sending and receiving side. As long as the secret key is confidential, messages are securely signed. However, this is virtually impossible when exchanging messages with untrusted disparate parties. The advantage of HMAC-SHA1 is the speed by which messages are signed and verified.<p>

+DSA-SHA1 and RSA-SHA1 rely on public key cryptography. In simplified terms, a message is signed using the (confidential!) private key. The public key is used to verify the signature. Since only the originating party could have used its private key to sign the message, the integrity of the message is guaranteed. Of course, we must trust the public key came from the originator (it is often included as an X509 certificate in the message). To this end, a trusted certificate authority should have signed the public key, thereby creating a X509 certificate that contains the public key and the identity of the message originator.<h3><a class="anchor" name="wsse_8_2a">

+Signing Messages</a></h3>

+After the plugin is registered and a signature algorithm selected, the <a class="el" href="wsseapi_8h.html#a59">soap_wsse_sign</a> function or the <a class="el" href="wsseapi_8h.html#a60">soap_wsse_sign_body</a> function is used to initiate the signature engine to automatically sign outbound messages.<p>

+The code to sign the SOAP Body of a message using HMAC-SHA1 is:<p>

+<div class="fragment"><pre>    <span class="keyword">static</span> <span class="keywordtype">char</span> hmac_key[16] =

+    { 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88,

+      0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00 };

+    <span class="keyword">struct </span>soap *soap = soap_new1(SOAP_XML_CANONICAL | SOAP_XML_INDENT);

+    soap_register_plugin(soap, soap_wsse);

+    <span class="keywordflow">if</span> (<a class="code" href="wsseapi_8c.html#a77">soap_wsse_sign_body</a>(soap, SOAP_SMD_HMAC_SHA1, hmac_key, <span class="keyword">sizeof</span>(hmac_key))

+      ... <span class="comment">// an error occurred</span>

+    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (soap_call_ns__myMethod(soap, ...))

+      ... <span class="comment">// a transmission error occurred</span>

+</pre></div><p>

+The hmac_key is some secret key you generated for the sending side and receiving side (don't use the one shown here).<p>

+As always, use soap_print_fault to display the error message.<p>

+To sign the body of an outbound SOAP message using RSA-SHA1 (DSA-SHA1 is similar), we include the X509 certificate with the public key as a BinarySecurityToken in the header and a KeyInfo reference to the token to let receivers use the public key in the certificate to verify the authenticity of the message:<p>

+<div class="fragment"><pre>    FILE *fd;

+    EVP_PKEY *rsa_private_key;

+    X509 *cert;

+    <span class="keyword">struct </span>soap *soap = soap_new1(SOAP_XML_CANONICAL | SOAP_XML_INDENT);

+    soap_register_plugin(soap, soap_wsse);

+    fd = fopen(<span class="stringliteral">"privkey.pem"</span>, <span class="stringliteral">"r"</span>);

+    rsa_private_key = PEM_read_PrivateKey(fd, NULL, NULL, <span class="stringliteral">"password"</span>);

+    fclose(fd);

+    fd = fopen(<span class="stringliteral">"cert.pem"</span>, <span class="stringliteral">"r"</span>);

+    X509 *cert = PEM_read_X509(fd, NULL, NULL, NULL);

+    fclose(fd);

+    <span class="keywordflow">if</span> (<a class="code" href="wsseapi_8c.html#a47">soap_wsse_add_BinarySecurityTokenX509</a>(soap, <span class="stringliteral">"X509Token"</span>, cert)

+     || <a class="code" href="wsseapi_8c.html#a67">soap_wsse_add_KeyInfo_SecurityTokenReferenceX509</a>(soap, <span class="stringliteral">"#X509Token"</span>)

+     || <a class="code" href="wsseapi_8c.html#a77">soap_wsse_sign_body</a>(soap, SOAP_SMD_SIGN_RSA_SHA1, rsa_private_key, 0))

+      ... <span class="comment">// an error occurred</span>

+    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (soap_call_ns__myMethod(soap, ...))

+      ... <span class="comment">// a transmission error occurred</span>

+</pre></div><p>

+The private key and its certificate are often placed in the same file, see e.g. server.pem in the package.<p>

+To summarize the signing process:<ol>

+<li>Register the wsse plugin.</li><li>Obtain an HMAC secret key or a DSA or RSA private key.</li><li>For DSA or RSA, obtain the X509 certificate with the public key signed by a certificate authority.</li><li>Add the X509 certificate as a BinarySecurityToken to the header.</li><li>Add a KeyInfo BinarySecurityTokenReference.</li><li>Invoke <a class="el" href="wsseapi_8h.html#a59">soap_wsse_sign</a> or <a class="el" href="wsseapi_8h.html#a60">soap_wsse_sign_body</a> to sign the message.</li><li>Always check the function return values for errors. You don't want to produce and accept messages with an invalid Security headers.</li></ol>

+<h3><a class="anchor" name="wsse_8_2b">

+Signing Message Parts</a></h3>

+The <a class="el" href="wsseapi_8h.html#a60">soap_wsse_sign_body</a> function signs the entire SOAP body. If it is desirable to sign individual parts of a message the <a class="el" href="wsseapi_8h.html#a59">soap_wsse_sign</a> function should be used. Message parts with wsu:Id attributes are signed. These message parts should not be nested (nested elements will not be separately signed).<p>

+For example, consider a transaction in which we only want to sign a contract in the SOAP Body. This allows us to modify the rest of the message or extract the contract in XML and pass it on with the signature.<p>

+The gSOAP header file includes a myContract declaration:<p>

+<div class="fragment"><pre>    <span class="keyword">struct </span>ns__myContract

+    { @<span class="keywordtype">char</span>* wsu_Id = <span class="stringliteral">"Contract"</span>;

+      <span class="keywordtype">char</span>* name;

+      <span class="keywordtype">char</span>* title;

+      <span class="keywordtype">char</span>* terms;

+    };

+    <span class="keywordtype">int</span> ns__myMethod(<span class="keyword">struct</span> ns__myContract agreement, <span class="keywordtype">bool</span>* accepted);

+</pre></div><p>

+The default value of the wsu:Id is "Contract" so that we can instantiate the struct, automatically sign it, and send it as follows:<p>

+<div class="fragment"><pre>    <span class="keyword">struct </span>ns__myContract contract;

+    <span class="keywordtype">bool</span> accept;

+    soap_default_ns__myContract(soap, &amp;contract);

+    contract.name = ...;

+    contract.title = ...;

+    contract.terms = ...;

+    <span class="keywordflow">if</span> (<a class="code" href="wsseapi_8c.html#a47">soap_wsse_add_BinarySecurityTokenX509</a>(soap, <span class="stringliteral">"X509Token"</span>, cert)

+     || <a class="code" href="wsseapi_8c.html#a67">soap_wsse_add_KeyInfo_SecurityTokenReferenceX509</a>(soap, <span class="stringliteral">"#X509Token"</span>)

+     || <a class="code" href="wsseapi_8c.html#a76">soap_wsse_sign</a>(soap, SOAP_SMD_SIGN_RSA_SHA1, rsa_private_key, 0))

+      ... <span class="comment">// an error occurred</span>

+    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (soap_call_ns__myMethod(soap, contract, &amp;accept))

+      ... <span class="comment">// a transmission error occurred</span>

+</pre></div><h3><a class="anchor" name="wsse_8_3">

+Signing Tokens</a></h3>

+To sign security tokens such as user names, passwords, and binary security tokens, just assign their Id values with a unique string, such as "Time" for timestamps and "User" for user names. For example:<p>

+<div class="fragment"><pre>    <a class="code" href="wsseapi_8c.html#a38">soap_wsse_add_Timestamp</a>(soap, <span class="stringliteral">"Time"</span>, 600);

+    <a class="code" href="wsseapi_8c.html#a42">soap_wsse_add_UsernameTokenDigest</a>(soap, <span class="stringliteral">"User"</span>, <span class="stringliteral">"username"</span>, <span class="stringliteral">"password"</span>);

+    ... <span class="comment">// the rest of the signing code</span>

+</pre></div><h3><a class="anchor" name="wsse_8_4">

+Signature Validation</a></h3>

+To automatically verify the signature of an inbound message signed with DSA or RSA algorithms, assuming the message contains the X509 certificate as a binary security token, use:<p>

+<div class="fragment"><pre>    <span class="keyword">struct </span>soap *soap = soap_new1(SOAP_XML_CANONICAL | SOAP_XML_INDENT);

+    soap_register_plugin(soap, soap_wsse);

+    <a class="code" href="wsseapi_8c.html#a79">soap_wsse_verify_auto</a>(soap, SOAP_SMD_NONE, NULL, 0);

+

+    <span class="comment">// server:</span>

+    <span class="keywordflow">if</span> (soap_serve(soap))

+      ... <span class="comment">// an error occurred</span>

+

+    <span class="comment">// client:</span>

+    <span class="keywordflow">if</span> (soap_call_ns__myMethod(soap, ...))

+      ... <span class="comment">// an error occurred</span>

+</pre></div><p>

+All locally referenced elements in the signed message will be verified. Elements referenced with absolute URIs are not automatically verified. The received message is stored in a DOM accessible with soap-&gt;dom. This enables further analysis of the message content.<p>

+The <a class="el" href="wsseapi_8h.html#a62">soap_wsse_verify_auto</a> function keeps processing signed (and unsigned) messages as they arrive. For unsigned messages this can be expensive and the verification engine should be shut down using <a class="el" href="wsseapi_8h.html#a63">soap_wsse_verify_done</a>.<p>

+To verify the HMAC signature of an inbound message, the HMAC key must be supplied:<p>

+<div class="fragment"><pre>    <span class="keyword">static</span> <span class="keywordtype">char</span> hmac_key[16] = <span class="comment">// the same secret key that was used to sign</span>

+    { 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88,

+      0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00 };

+    <span class="keyword">struct </span>soap *soap = soap_new1(SOAP_XML_CANONICAL | SOAP_XML_INDENT);

+    soap_register_plugin(soap, soap_wsse);

+    <a class="code" href="wsseapi_8c.html#a79">soap_wsse_verify_auto</a>(soap, SOAP_SMD_HMAC_SHA1, hmac_key, <span class="keyword">sizeof</span>(hmac_key));

+

+    <span class="comment">// server:</span>

+    <span class="keywordflow">if</span> (soap_serve(soap))

+      ... <span class="comment">// an error occurred</span>

+

+    <span class="comment">// client:</span>

+    <span class="keywordflow">if</span> (soap_call_ns__myMethod(soap, ...))

+      ... <span class="comment">// an error occurred</span>

+</pre></div><p>

+To summarize the signature verification process:<ol>

+<li>Register the wsse plugin.</li><li>For HMAC, obtain the HMAC secret key</li><li>Use <a class="el" href="wsseapi_8h.html#a62">soap_wsse_verify_auto</a> to verify inbound messages.</li><li>After receiving a message, the DOM in soap-&gt;dom can be traversed for further analysis.</li><li>Always check the function return values for errors. You don't want to accept a request or response message with an invalid Security header.</li><li>Use <a class="el" href="wsseapi_8h.html#a63">soap_wsse_verify_done</a> to terminate verification, e.g. to consume plain messages more efficiently.</li></ol>

+<h2><a class="anchor" name="wsse_9">

+Encryption</a></h2>

+The material in this section relates to the WS-Security specification section 9.<p>

+TODO item: encryption support is under construction.<h2><a class="anchor" name="wsse_10">

+Security Timestamps</a></h2>

+The material in this section relates to the WS-Security specification section 10.<p>

+To add a timestamp with the creation time to the Security header, use:<p>

+<div class="fragment"><pre>    <a class="code" href="wsseapi_8c.html#a38">soap_wsse_add_Timestamp</a>(soap, NULL, 0); <span class="comment">// no expiration</span>

+</pre></div><p>

+The lifetime of a message (in seconds) is passed as the third argument, which will be displayed as the timestamp expiration time:<p>

+<div class="fragment"><pre>    <a class="code" href="wsseapi_8c.html#a38">soap_wsse_add_Timestamp</a>(soap, NULL, 10); <span class="comment">// 10 seconds lifetime</span>

+</pre></div><p>

+Timestamps, like other header elements, are not automatically secured with a digital signature. To secure a timestamp, we add an identifier (wsu:Id) to each element we want the WS-Security plugin to sign thereby making it impossible for someone to tamper with that part of the message. To do this for the timestamp, we simply pass a unique identification string as the second argument:<p>

+<div class="fragment"><pre>    <a class="code" href="wsseapi_8c.html#a38">soap_wsse_add_Timestamp</a>(soap, <span class="stringliteral">"Time"</span>, 10); <span class="comment">// timestamp will be signed</span>

+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:46 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/wsse_8h.html b/doc/wsse/html/wsse_8h.html
new file mode 100644
index 0000000..fab89a2
--- /dev/null
+++ b/doc/wsse/html/wsse_8h.html
@@ -0,0 +1,352 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: /Users/engelen/Projects/gsoap/doc/wsse/wsse.h File Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>/Users/engelen/Projects/gsoap/doc/wsse/wsse.h File Reference</h1><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Classes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____username_token.html">_wsse__UsernameToken</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This element defines the wsse:UsernameToken element per Section 4.1. Imported element _wsse__UsernameToken from typemap WS/WS-typemap.dat.  <a href="struct__wsse_____username_token.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____binary_security_token.html">_wsse__BinarySecurityToken</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This element defines the wsse:BinarySecurityToken element per Section 4.2. Imported element _wsse__BinarySecurityToken from typemap WS/WS-typemap.dat.  <a href="struct__wsse_____binary_security_token.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____reference.html">_wsse__Reference</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This element defines a security token reference Imported element _wsse__Reference from typemap WS/WS-typemap.dat.  <a href="struct__wsse_____reference.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____embedded.html">_wsse__Embedded</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This element defines a security token embedded reference Imported element _wsse__Embedded from typemap WS/WS-typemap.dat.  <a href="struct__wsse_____embedded.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____key_identifier.html">_wsse__KeyIdentifier</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This element defines a key identifier reference Imported element _wsse__KeyIdentifier from typemap WS/WS-typemap.dat.  <a href="struct__wsse_____key_identifier.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____security_token_reference.html">_wsse__SecurityTokenReference</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This element defines the wsse:SecurityTokenReference per Section 4.3. Imported element _wsse__SecurityTokenReference from typemap WS/WS-typemap.dat.  <a href="struct__wsse_____security_token_reference.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____security.html">_wsse__Security</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This element defines the wsse:Security SOAP header element per Section 4. Imported element _wsse__Security from typemap WS/WS-typemap.dat.  <a href="struct__wsse_____security.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsse_____password.html">_wsse__Password</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This element contains properties for transformations from any namespace, including DSIG. '_wsse__TransformationParameters' element definition intentionally left blank.  <a href="struct__wsse_____password.html#_details">More...</a><br></td></tr>

+<tr><td colspan=2><br><h2>Typedefs</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef enum <a class="el" href="wsse_8h.html#a0">wsse__FaultcodeEnum</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsse_8h.html#a0">wsse__FaultcodeEnum</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Typedef synonym for enum wsse__FaultcodeEnum.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="struct__wsse_____username_token.html">_wsse__UsernameToken</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsse_8h.html#a1">_wsse__UsernameToken</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This element defines the wsse:UsernameToken element per Section 4.1. Imported element <a class="el" href="struct__wsse_____username_token.html">_wsse__UsernameToken</a> from typemap WS/WS-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="struct__wsse_____binary_security_token.html">_wsse__BinarySecurityToken</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsse_8h.html#a2">_wsse__BinarySecurityToken</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This element defines the wsse:BinarySecurityToken element per Section 4.2. Imported element <a class="el" href="struct__wsse_____binary_security_token.html">_wsse__BinarySecurityToken</a> from typemap WS/WS-typemap.dat.  <a href="#a2"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="struct__wsse_____reference.html">_wsse__Reference</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsse_8h.html#a3">_wsse__Reference</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This element defines a security token reference Imported element <a class="el" href="struct__wsse_____reference.html">_wsse__Reference</a> from typemap WS/WS-typemap.dat.  <a href="#a3"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="struct__wsse_____embedded.html">_wsse__Embedded</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsse_8h.html#a4">_wsse__Embedded</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This element defines a security token embedded reference Imported element <a class="el" href="struct__wsse_____embedded.html">_wsse__Embedded</a> from typemap WS/WS-typemap.dat.  <a href="#a4"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="struct__wsse_____key_identifier.html">_wsse__KeyIdentifier</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsse_8h.html#a5">_wsse__KeyIdentifier</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This element defines a key identifier reference Imported element <a class="el" href="struct__wsse_____key_identifier.html">_wsse__KeyIdentifier</a> from typemap WS/WS-typemap.dat.  <a href="#a5"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="struct__wsse_____security_token_reference.html">_wsse__SecurityTokenReference</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsse_8h.html#a6">_wsse__SecurityTokenReference</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This element defines the wsse:SecurityTokenReference per Section 4.3. Imported element <a class="el" href="struct__wsse_____security_token_reference.html">_wsse__SecurityTokenReference</a> from typemap WS/WS-typemap.dat.  <a href="#a6"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="struct__wsse_____security.html">_wsse__Security</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsse_8h.html#a7">_wsse__Security</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This element defines the wsse:Security SOAP header element per Section 4. Imported element <a class="el" href="struct__wsse_____security.html">_wsse__Security</a> from typemap WS/WS-typemap.dat.  <a href="#a7"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="struct__wsse_____password.html">_wsse__Password</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsse_8h.html#a8">_wsse__Password</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This element contains properties for transformations from any namespace, including DSIG. '_wsse__TransformationParameters' element definition intentionally left blank.  <a href="#a8"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Enumerations</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsse_8h.html#a16">wsse__FaultcodeEnum</a> { <br>

+&nbsp;&nbsp;<a class="el" href="wsse_8h.html#a16a9">wsse__UnsupportedSecurityToken</a>, 

+<a class="el" href="wsse_8h.html#a16a10">wsse__UnsupportedAlgorithm</a>, 

+<a class="el" href="wsse_8h.html#a16a11">wsse__InvalidSecurity</a>, 

+<a class="el" href="wsse_8h.html#a16a12">wsse__InvalidSecurityToken</a>, 

+<br>

+&nbsp;&nbsp;<a class="el" href="wsse_8h.html#a16a13">wsse__FailedAuthentication</a>, 

+<a class="el" href="wsse_8h.html#a16a14">wsse__FailedCheck</a>, 

+<a class="el" href="wsse_8h.html#a16a15">wsse__SecurityTokenUnavailable</a>

+<br>

+ }</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":FaultcodeEnum is a simpleType restriction of xs:QName.  <a href="#a16">More...</a><br></td></tr>

+</table>

+<hr><h2>Typedef Documentation</h2>

+<a class="anchor" name="a2" doxytag="wsse.h::_wsse__BinarySecurityToken" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="struct__wsse_____binary_security_token.html">_wsse__BinarySecurityToken</a>  <a class="el" href="struct__wsse_____binary_security_token.html">_wsse__BinarySecurityToken</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+This element defines the wsse:BinarySecurityToken element per Section 4.2. Imported element <a class="el" href="struct__wsse_____binary_security_token.html">_wsse__BinarySecurityToken</a> from typemap WS/WS-typemap.dat. 

+<p>

+Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":BinarySecurityToken of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":BinarySecurityTokenType.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a4" doxytag="wsse.h::_wsse__Embedded" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="struct__wsse_____embedded.html">_wsse__Embedded</a>  <a class="el" href="struct__wsse_____embedded.html">_wsse__Embedded</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+This element defines a security token embedded reference Imported element <a class="el" href="struct__wsse_____embedded.html">_wsse__Embedded</a> from typemap WS/WS-typemap.dat. 

+<p>

+Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":Embedded of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":EmbeddedType.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a5" doxytag="wsse.h::_wsse__KeyIdentifier" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="struct__wsse_____key_identifier.html">_wsse__KeyIdentifier</a>  <a class="el" href="struct__wsse_____key_identifier.html">_wsse__KeyIdentifier</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+This element defines a key identifier reference Imported element <a class="el" href="struct__wsse_____key_identifier.html">_wsse__KeyIdentifier</a> from typemap WS/WS-typemap.dat. 

+<p>

+Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":KeyIdentifier of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":KeyIdentifierType.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a8" doxytag="wsse.h::_wsse__Password" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="struct__wsse_____password.html">_wsse__Password</a>  <a class="el" href="struct__wsse_____password.html">_wsse__Password</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+This element contains properties for transformations from any namespace, including DSIG. '_wsse__TransformationParameters' element definition intentionally left blank. 

+<p>

+Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":Password of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":PasswordString. Imported element <a class="el" href="struct__wsse_____password.html">_wsse__Password</a> from typemap WS/WS-typemap.dat.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a3" doxytag="wsse.h::_wsse__Reference" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="struct__wsse_____reference.html">_wsse__Reference</a>  <a class="el" href="struct__wsse_____reference.html">_wsse__Reference</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+This element defines a security token reference Imported element <a class="el" href="struct__wsse_____reference.html">_wsse__Reference</a> from typemap WS/WS-typemap.dat. 

+<p>

+Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":Reference of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":ReferenceType.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a7" doxytag="wsse.h::_wsse__Security" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="struct__wsse_____security.html">_wsse__Security</a>  <a class="el" href="struct__wsse_____security.html">_wsse__Security</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+This element defines the wsse:Security SOAP header element per Section 4. Imported element <a class="el" href="struct__wsse_____security.html">_wsse__Security</a> from typemap WS/WS-typemap.dat. 

+<p>

+Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":Security of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":SecurityHeaderType.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a6" doxytag="wsse.h::_wsse__SecurityTokenReference" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="struct__wsse_____security_token_reference.html">_wsse__SecurityTokenReference</a>  <a class="el" href="struct__wsse_____security_token_reference.html">_wsse__SecurityTokenReference</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+This element defines the wsse:SecurityTokenReference per Section 4.3. Imported element <a class="el" href="struct__wsse_____security_token_reference.html">_wsse__SecurityTokenReference</a> from typemap WS/WS-typemap.dat. 

+<p>

+Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":SecurityTokenReference of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":SecurityTokenReferenceType.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="wsse.h::_wsse__UsernameToken" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="struct__wsse_____username_token.html">_wsse__UsernameToken</a>  <a class="el" href="struct__wsse_____username_token.html">_wsse__UsernameToken</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+This element defines the wsse:UsernameToken element per Section 4.1. Imported element <a class="el" href="struct__wsse_____username_token.html">_wsse__UsernameToken</a> from typemap WS/WS-typemap.dat. 

+<p>

+Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":UsernameToken of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":UsernameTokenType.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a0" doxytag="wsse.h::wsse__FaultcodeEnum" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef enum <a class="el" href="wsse_8h.html#a0">wsse__FaultcodeEnum</a> <a class="el" href="wsse_8h.html#a0">wsse__FaultcodeEnum</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Typedef synonym for enum wsse__FaultcodeEnum. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr><h2>Enumeration Type Documentation</h2>

+<a class="anchor" name="a16" doxytag="wsse.h::wsse__FaultcodeEnum" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> enum <a class="el" href="wsse_8h.html#a0">wsse__FaultcodeEnum</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":FaultcodeEnum is a simpleType restriction of xs:QName. 

+<p>

+Imported simpleType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":tUsage from typemap WS/WS-typemap.dat. <dl compact><dt><b>Enumeration values: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em><a class="anchor" name="a16a9" doxytag="wsse__UnsupportedSecurityToken" ></a>wsse__UnsupportedSecurityToken</em>&nbsp;</td><td>

+xs:QName value=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":UnsupportedSecurityToken" </td></tr>

+<tr><td valign=top><em><a class="anchor" name="a16a10" doxytag="wsse__UnsupportedAlgorithm" ></a>wsse__UnsupportedAlgorithm</em>&nbsp;</td><td>

+xs:QName value=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":UnsupportedAlgorithm" </td></tr>

+<tr><td valign=top><em><a class="anchor" name="a16a11" doxytag="wsse__InvalidSecurity" ></a>wsse__InvalidSecurity</em>&nbsp;</td><td>

+xs:QName value=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":InvalidSecurity" </td></tr>

+<tr><td valign=top><em><a class="anchor" name="a16a12" doxytag="wsse__InvalidSecurityToken" ></a>wsse__InvalidSecurityToken</em>&nbsp;</td><td>

+xs:QName value=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":InvalidSecurityToken" </td></tr>

+<tr><td valign=top><em><a class="anchor" name="a16a13" doxytag="wsse__FailedAuthentication" ></a>wsse__FailedAuthentication</em>&nbsp;</td><td>

+xs:QName value=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":FailedAuthentication" </td></tr>

+<tr><td valign=top><em><a class="anchor" name="a16a14" doxytag="wsse__FailedCheck" ></a>wsse__FailedCheck</em>&nbsp;</td><td>

+xs:QName value=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":FailedCheck" </td></tr>

+<tr><td valign=top><em><a class="anchor" name="a16a15" doxytag="wsse__SecurityTokenUnavailable" ></a>wsse__SecurityTokenUnavailable</em>&nbsp;</td><td>

+xs:QName value=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":SecurityTokenUnavailable" </td></tr>

+</table>

+</dl>

+    </td>

+  </tr>

+</table>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/wsseapi_8c.html b/doc/wsse/html/wsseapi_8c.html
new file mode 100644
index 0000000..8f5d1cd
--- /dev/null
+++ b/doc/wsse/html/wsseapi_8c.html
@@ -0,0 +1,3613 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: /Users/engelen/Projects/gsoap/doc/wsse/wsseapi.c File Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>/Users/engelen/Projects/gsoap/doc/wsse/wsseapi.c File Reference</h1><code>#include "<a class="el" href="wsseapi_8h.html">wsseapi.h</a>"</code><br>

+<code>#include "<a class="el" href="smdevp_8h.html">smdevp.h</a>"</code><br>

+<code>#include "threads.h"</code><br>

+

+<p>

+Include dependency graph for wsseapi.c:<p><center><img src="wsseapi_8c__incl.png" border="0" usemap="#wsseapi.c_map" alt="Include dependency graph"></center>

+<map name="wsseapi.c_map">

+<area href="wsseapi_8h.html" shape="rect" coords="16,167,85,193" alt="">

+<area href="smdevp_8h.html" shape="rect" coords="89,92,156,119" alt="">

+</map>

+<table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Classes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__wsse__session.html">soap_wsse_session</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Digest authentication session data.  <a href="structsoap__wsse__session.html#_details">More...</a><br></td></tr>

+<tr><td colspan=2><br><h2>Defines</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a0">SOAP_WSSE_MAX_REF</a>&nbsp;&nbsp;&nbsp;(100)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a1">SOAP_WSSE_CLKSKEW</a>&nbsp;&nbsp;&nbsp;(600)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a2">SOAP_WSSE_NONCELEN</a>&nbsp;&nbsp;&nbsp;(20)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a3">SOAP_WSSE_NONCETIME</a>&nbsp;&nbsp;&nbsp;(SOAP_WSSE_CLKSKEW + 240)</td></tr>

+

+<tr><td colspan=2><br><h2>Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a19">soap_wsse_session_verify</a> (struct soap *soap, const char hash[SOAP_SMD_SHA1_SIZE], const char *created, const char *nonce)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Verifies and updates the digest, nonce, and creation time against the digest authentication session database to prevent replay attacks.  <a href="#a19"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a20">soap_wsse_session_cleanup</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Removes expired authentication data from the digest authentication session database.  <a href="#a20"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a21">calc_digest</a> (struct soap *soap, const char *created, const char *nonce, int noncelen, const char *password, char hash[SOAP_SMD_SHA1_SIZE])</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculates digest value SHA1(created, nonce, password).  <a href="#a21"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a22">calc_nonce</a> (struct soap *soap, char nonce[SOAP_WSSE_NONCELEN])</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculates randomized nonce.  <a href="#a22"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a23">soap_wsse_init</a> (struct soap *soap, struct <a class="el" href="structsoap__wsse__data.html">soap_wsse_data</a> *data)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initializes plugin data.  <a href="#a23"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a24">soap_wsse_copy</a> (struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copies plugin data to localize plugin data for threads.  <a href="#a24"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a25">soap_wsse_delete</a> (struct soap *soap, struct soap_plugin *p)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes plugin data.  <a href="#a25"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a26">soap_wsse_prepareinit</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initiates message preprocessing with gSOAP engine's prepareinit callback.  <a href="#a26"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a27">soap_wsse_preparesend</a> (struct soap *soap, const char *buf, size_t len)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Takes a piece of the XML message (tokenized) to compute digest.  <a href="#a27"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a28">soap_wsse_preparefinal</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Collects the digests of all the wsu:Id elements and populates the SignedInfo.  <a href="#a28"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a29">soap_wsse_preparecleanup</a> (struct soap *soap, struct <a class="el" href="structsoap__wsse__data.html">soap_wsse_data</a> *data)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Restores engine state.  <a href="#a29"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a30">soap_wsse_disconnect</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Verify signature and SignedInfo digests initiated with soap_wsse_verify_auto.  <a href="#a30"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__wsse_____security.html">_wsse__Security</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a31">soap_wsse_add_Security</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds Security header element.  <a href="#a31"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__wsse_____security.html">_wsse__Security</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a32">soap_wsse_add_Security_actor</a> (struct soap *soap, const char *actor)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds Security header element with actor or role attribute.  <a href="#a32"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a33">soap_wsse_delete_Security</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes Security header element.  <a href="#a33"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__wsse_____security.html">_wsse__Security</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a34">soap_wsse_Security</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns Security header element if present.  <a href="#a34"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____signature_type.html">ds__SignatureType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a35">soap_wsse_add_Signature</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds Signature header element.  <a href="#a35"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a36">soap_wsse_delete_Signature</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes Signature header element.  <a href="#a36"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____signature_type.html">ds__SignatureType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a37">soap_wsse_Signature</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns Signature header element if present.  <a href="#a37"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a38">soap_wsse_add_Timestamp</a> (struct soap *soap, const char *id, time_t lifetime)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds Timestamp element with optional expiration date+time (lifetime).  <a href="#a38"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__wsu_____timestamp.html">_wsu__Timestamp</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a39">soap_wsse_Timestamp</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns Timestamp element if present.  <a href="#a39"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a40">soap_wsse_verify_Timestamp</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Verifies the Timestamp/Expires element against the current time.  <a href="#a40"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a41">soap_wsse_add_UsernameTokenText</a> (struct soap *soap, const char *id, const char *username, const char *password)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds UsernameToken element with optional clear-text password.  <a href="#a41"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a42">soap_wsse_add_UsernameTokenDigest</a> (struct soap *soap, const char *id, const char *username, const char *password)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds UsernameToken element for digest authentication.  <a href="#a42"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__wsse_____username_token.html">_wsse__UsernameToken</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a43">soap_wsse_UsernameToken</a> (struct soap *soap, const char *id)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns UsernameToken element if present.  <a href="#a43"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a44">soap_wsse_get_Username</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns UsernameToken/username string or wsse:FailedAuthentication fault.  <a href="#a44"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a45">soap_wsse_verify_Password</a> (struct soap *soap, const char *password)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Verifies the supplied password or sets wsse:FailedAuthentication fault.  <a href="#a45"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a46">soap_wsse_add_BinarySecurityToken</a> (struct soap *soap, const char *id, const char *valueType, const unsigned char *data, int size)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds BinarySecurityToken element.  <a href="#a46"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a47">soap_wsse_add_BinarySecurityTokenX509</a> (struct soap *soap, const char *id, X509 *cert)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds BinarySecurityToken element with X509 certificate.  <a href="#a47"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a48">soap_wsse_add_BinarySecurityTokenPEM</a> (struct soap *soap, const char *id, const char *filename)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds BinarySecurityToken element from a PEM file.  <a href="#a48"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__wsse_____binary_security_token.html">_wsse__BinarySecurityToken</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a49">soap_wsse_BinarySecurityToken</a> (struct soap *soap, const char *id)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns BinarySecurityToken element if present.  <a href="#a49"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a50">soap_wsse_get_BinarySecurityToken</a> (struct soap *soap, const char *id, char **valueType, unsigned char **data, int *size)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get wsse:BinarySecurityToken element token data in binary form.  <a href="#a50"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>X509 *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a51">soap_wsse_get_BinarySecurityTokenX509</a> (struct soap *soap, const char *id)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get X509 wsse:BinarySecurityToken certificate and verify its content.  <a href="#a51"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a52">soap_wsse_verify_X509</a> (struct soap *soap, X509 *cert)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Verifies X509 certificate against soap-&gt;cafile, soap-&gt;capath, and soap-&gt;crlfile.  <a href="#a52"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a53">soap_wsse_add_SignedInfo</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds SignedInfo element.  <a href="#a53"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a54">soap_wsse_add_SignedInfo_Reference</a> (struct soap *soap, const char *URI, const char *transform, const char *inclusiveNamespaces, const char *HA)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds SignedInfo element with Reference URI, transform algorithm used, and digest value.  <a href="#a54"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a55">soap_wsse_add_SignedInfo_SignatureMethod</a> (struct soap *soap, const char *method, int canonical)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds SignedInfo element with SignatureMethod.  <a href="#a55"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a56">soap_wsse_SignedInfo</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns SignedInfo element if present.  <a href="#a56"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a57">soap_wsse_get_SignedInfo_SignatureMethod</a> (struct soap *soap, int *alg)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get SignatureMethod algorithm.  <a href="#a57"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a58">soap_wsse_add_SignatureValue</a> (struct soap *soap, int alg, const void *key, int keylen)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds SignedInfo/SignatureMethod element, signs the SignedInfo element, and adds the resulting SignatureValue element.  <a href="#a58"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a59">soap_wsse_verify_SignatureValue</a> (struct soap *soap, int alg, const void *key, int keylen)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Verifies the SignatureValue of a SignedInfo element.  <a href="#a59"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a60">soap_wsse_verify_SignedInfo</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Verifies the digest values of the XML elements referenced by the SignedInfo References.  <a href="#a60"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a61">soap_wsse_verify_digest</a> (struct soap *soap, int alg, const char *id, unsigned char hash[SOAP_SMD_MAX_SIZE])</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Verifies the digest value of an XML element referenced by id against the hash.  <a href="#a61"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____key_info_type.html">ds__KeyInfoType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a62">soap_wsse_add_KeyInfo</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds KeyInfo element.  <a href="#a62"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____key_info_type.html">ds__KeyInfoType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a63">soap_wsse_KeyInfo</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns KeyInfo element if present.  <a href="#a63"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a64">soap_wsse_add_KeyInfo_KeyName</a> (struct soap *soap, const char *name)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds KeyName element.  <a href="#a64"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a65">soap_wsse_get_KeyInfo_KeyName</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns KeyName element if present.  <a href="#a65"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a66">soap_wsse_add_KeyInfo_SecurityTokenReferenceURI</a> (struct soap *soap, const char *URI, const char *valueType)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds KeyInfo element with SecurityTokenReference URI.  <a href="#a66"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a67">soap_wsse_add_KeyInfo_SecurityTokenReferenceX509</a> (struct soap *soap, const char *URI)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds KeyInfo element with SecurityTokenReference URI to an X509 cert.  <a href="#a67"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a68">soap_wsse_get_KeyInfo_SecurityTokenReferenceURI</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a SecurityTokenReference URI if present.  <a href="#a68"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>X509 *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a69">soap_wsse_get_KeyInfo_SecurityTokenReferenceX509</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a X509 certificate if present as a BinarySecurity token.  <a href="#a69"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a70">soap_wsse_add_KeyInfo_SecurityTokenReferenceKeyIdentifier</a> (struct soap *soap, const char *id, const char *valueType, unsigned char *data, int size)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds KeyInfo element with SecurityTokenReference/KeyIdentifier binary data.  <a href="#a70"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a71">soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifierValueType</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns KeyInfo/SecurityTokenReference/KeyIdentifier/ValueType if present.  <a href="#a71"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>const unsigned char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a72">soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifier</a> (struct soap *soap, int *size)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns KeyInfo/SecurityTokenReference/KeyIdentifier binary data.  <a href="#a72"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a73">soap_wsse_add_KeyInfo_SecurityTokenReferenceEmbedded</a> (struct soap *soap, const char *id, const char *valueType)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds KeyInfo element with Embedded SecurityTokenReference.  <a href="#a73"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a74">soap_wsse_fault</a> (struct soap *soap, <a class="el" href="wsse_8h.html#a0">wsse__FaultcodeEnum</a> fault, const char *detail)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets SOAP Fault (sub)code for server response.  <a href="#a74"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a75">soap_wsse</a> (struct soap *soap, struct soap_plugin *p, void *arg)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Plugin registry function, used with soap_register_plugin.  <a href="#a75"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a76">soap_wsse_sign</a> (struct soap *soap, int alg, const void *key, int keylen)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Uses the wsse plugin to sign all wsu:Id attributed elements.  <a href="#a76"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a77">soap_wsse_sign_body</a> (struct soap *soap, int alg, const void *key, int keylen)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Uses the wsse plugin to sign all wsu:Id attributed elements, including the SOAP Body (by adding a wsu:Id="Body" attribute).  <a href="#a77"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a78">soap_wsse_verify_init</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Uses the wsse plugin to initiate the verification of the signature and SignedInfo Reference digests.  <a href="#a78"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a79">soap_wsse_verify_auto</a> (struct soap *soap, int alg, const void *key, size_t keylen)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Uses the wsse plugin to initiate the automatic verification of the signature and SignedInfo Reference digests.  <a href="#a79"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a80">soap_wsse_verify_done</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Terminates the automatic verification of signatures.  <a href="#a80"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Variables</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a4">soap_wsse_id</a> [14] = SOAP_WSSE_ID</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a5">wsse_PasswordTextURI</a> = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a6">wsse_PasswordDigestURI</a> = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest"</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a7">wsse_Base64BinaryURI</a> = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a8">wsse_X509v3URI</a> = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a9">wsse_X509v3SubjectKeyIdentifierURI</a> = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier"</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a10">ds_sha1URI</a> = "http://www.w3.org/2000/09/xmldsig#sha1"</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a11">ds_hmac_sha1URI</a> = "http://www.w3.org/2000/09/xmldsig#hmac-sha1"</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a12">ds_dsa_sha1URI</a> = "http://www.w3.org/2000/09/xmldsig#dsa-sha1"</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a13">ds_rsa_sha1URI</a> = "http://www.w3.org/2000/09/xmldsig#rsa-sha1"</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a14">ds_URI</a> = "http://www.w3.org/2000/09/xmldsig#"</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a15">c14n_URI</a> = "http://www.w3.org/2001/10/xml-exc-c14n#"</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a16">wsu_URI</a> = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structsoap__wsse__session.html">soap_wsse_session</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a17">soap_wsse_session</a> = NULL</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>MUTEX_TYPE&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8c.html#a18">soap_wsse_session_lock</a></td></tr>

+

+</table>

+<hr><h2>Define Documentation</h2>

+<a class="anchor" name="a1" doxytag="wsseapi.c::SOAP_WSSE_CLKSKEW" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> #define SOAP_WSSE_CLKSKEW&nbsp;&nbsp;&nbsp;(600)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Clock skew between machines (in sec) to fit message expiration in window     </td>

+  </tr>

+</table>

+<a class="anchor" name="a0" doxytag="wsseapi.c::SOAP_WSSE_MAX_REF" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> #define SOAP_WSSE_MAX_REF&nbsp;&nbsp;&nbsp;(100)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Maximum number of SignedInfo References     </td>

+  </tr>

+</table>

+<a class="anchor" name="a2" doxytag="wsseapi.c::SOAP_WSSE_NONCELEN" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> #define SOAP_WSSE_NONCELEN&nbsp;&nbsp;&nbsp;(20)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Size of the random nonce     </td>

+  </tr>

+</table>

+<a class="anchor" name="a3" doxytag="wsseapi.c::SOAP_WSSE_NONCETIME" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> #define SOAP_WSSE_NONCETIME&nbsp;&nbsp;&nbsp;(SOAP_WSSE_CLKSKEW + 240)          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Digest authentication accepts messages that are not older than creation time + SOAP_WSSE_NONCETIME     </td>

+  </tr>

+</table>

+<hr><h2>Function Documentation</h2>

+<a class="anchor" name="a21" doxytag="wsseapi.c::calc_digest" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void calc_digest           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>created</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>nonce</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>noncelen</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>password</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>char&nbsp;</td>

+          <td class="mdname" nowrap> <em>hash</em>[SOAP_SMD_SHA1_SIZE]</td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"><code> [static]</code></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Calculates digest value SHA1(created, nonce, password). 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>created</em>&nbsp;</td><td>string (XSD dateTime format) </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>nonce</em>&nbsp;</td><td>value </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>noncelen</em>&nbsp;</td><td>length of nonce value </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>password</em>&nbsp;</td><td>string </td></tr>

+    <tr><td><tt>[out]</tt>&nbsp;</td><td valign=top><em>hash</em>&nbsp;</td><td>SHA1 digest </td></tr>

+  </table>

+</dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a22" doxytag="wsseapi.c::calc_nonce" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void calc_nonce           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>char&nbsp;</td>

+          <td class="mdname" nowrap> <em>nonce</em>[SOAP_WSSE_NONCELEN]</td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"><code> [static]</code></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Calculates randomized nonce. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[out]</tt>&nbsp;</td><td valign=top><em>nonce</em>&nbsp;</td><td>value </td></tr>

+  </table>

+</dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a75" doxytag="wsseapi.c::soap_wsse" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>struct soap_plugin *&nbsp;</td>

+          <td class="mdname" nowrap> <em>p</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>void *&nbsp;</td>

+          <td class="mdname" nowrap> <em>arg</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Plugin registry function, used with soap_register_plugin. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in,out]</tt>&nbsp;</td><td valign=top><em>p</em>&nbsp;</td><td>plugin created in registry </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>arg</em>&nbsp;</td><td>passed from soap_register_plugin_arg </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a46" doxytag="wsseapi.c::soap_wsse_add_BinarySecurityToken" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_BinarySecurityToken           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>valueType</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const unsigned char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>data</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>size</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds BinarySecurityToken element. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>string for signature referencing or NULL </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>valueType</em>&nbsp;</td><td>string </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>data</em>&nbsp;</td><td>points to binary token data </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>size</em>&nbsp;</td><td>is length of binary token </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a48" doxytag="wsseapi.c::soap_wsse_add_BinarySecurityTokenPEM" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_BinarySecurityTokenPEM           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>filename</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds BinarySecurityToken element from a PEM file. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>string for signature reference </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>filename</em>&nbsp;</td><td></td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or SOAP_FAULT with wsse__InvalidSecurity fault when file cannot be read or does not contain a valid certificate</dd></dl>

+This function uses PEM_read_X509 from the the OpenSSL library to read a certificate from a PEM formatted file.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a47" doxytag="wsseapi.c::soap_wsse_add_BinarySecurityTokenX509" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_BinarySecurityTokenX509           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>X509 *&nbsp;</td>

+          <td class="mdname" nowrap> <em>cert</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds BinarySecurityToken element with X509 certificate. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>string for signature reference </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>cert</em>&nbsp;</td><td>points to the X509 certificate </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or SOAP_EOM</dd></dl>

+This function uses i2d_X509 from the the OpenSSL library to convert an X509 object to binary DER format.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a62" doxytag="wsseapi.c::soap_wsse_add_KeyInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="structds_____key_info_type.html">ds__KeyInfoType</a> * soap_wsse_add_KeyInfo           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds KeyInfo element. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>ds__KeyInfo object </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a64" doxytag="wsseapi.c::soap_wsse_add_KeyInfo_KeyName" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_KeyInfo_KeyName           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>name</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds KeyName element. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>name</em>&nbsp;</td><td>string of the KeyName </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK</dd></dl>

+Note: the recommended method to add Key information is to utilize KeyIdentifier instead of KeyName. A KeyName is useful mainly for internal use.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a73" doxytag="wsseapi.c::soap_wsse_add_KeyInfo_SecurityTokenReferenceEmbedded" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_KeyInfo_SecurityTokenReferenceEmbedded           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>valueType</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds KeyInfo element with Embedded SecurityTokenReference. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>string for signature reference </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>valueType</em>&nbsp;</td><td>string </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK</dd></dl>

+Note: this function is under construction and the result depends on usage scenarios deployed in practice.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a70" doxytag="wsseapi.c::soap_wsse_add_KeyInfo_SecurityTokenReferenceKeyIdentifier" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_KeyInfo_SecurityTokenReferenceKeyIdentifier           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>valueType</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>unsigned char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>data</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>size</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds KeyInfo element with SecurityTokenReference/KeyIdentifier binary data. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>string for signature reference </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>valueType</em>&nbsp;</td><td>string </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>data</em>&nbsp;</td><td>binary data </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>size</em>&nbsp;</td><td>of binary data </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a66" doxytag="wsseapi.c::soap_wsse_add_KeyInfo_SecurityTokenReferenceURI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_KeyInfo_SecurityTokenReferenceURI           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>URI</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>valueType</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds KeyInfo element with SecurityTokenReference URI. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>URI</em>&nbsp;</td><td>string referencing a security token </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>valueType</em>&nbsp;</td><td>string or NULL </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a67" doxytag="wsseapi.c::soap_wsse_add_KeyInfo_SecurityTokenReferenceX509" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_KeyInfo_SecurityTokenReferenceX509           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>URI</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds KeyInfo element with SecurityTokenReference URI to an X509 cert. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>URI</em>&nbsp;</td><td>string referencing an X509 certificate </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a31" doxytag="wsseapi.c::soap_wsse_add_Security" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="struct__wsse_____security.html">_wsse__Security</a> * soap_wsse_add_Security           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds Security header element. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="struct__wsse_____security.html">_wsse__Security</a> object </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a32" doxytag="wsseapi.c::soap_wsse_add_Security_actor" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="struct__wsse_____security.html">_wsse__Security</a> * soap_wsse_add_Security_actor           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>actor</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds Security header element with actor or role attribute. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td></td><td valign=top><em>actor</em>&nbsp;</td><td>string </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="struct__wsse_____security.html">_wsse__Security</a> object </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a35" doxytag="wsseapi.c::soap_wsse_add_Signature" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="structds_____signature_type.html">ds__SignatureType</a> * soap_wsse_add_Signature           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds Signature header element. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="structds_____signature_type.html">ds__SignatureType</a> object </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a58" doxytag="wsseapi.c::soap_wsse_add_SignatureValue" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_SignatureValue           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>alg</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const void *&nbsp;</td>

+          <td class="mdname" nowrap> <em>key</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>keylen</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds SignedInfo/SignatureMethod element, signs the SignedInfo element, and adds the resulting SignatureValue element. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>alg</em>&nbsp;</td><td>is SOAP_SMD_HMAC_SHA1, SOAP_SMD_SIGN_DSA_SHA1, or SOAP_SMD_SIGN_RSA_SHA1 </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>key</em>&nbsp;</td><td>to use to sign (HMAC or EVP_PKEY) </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>keylen</em>&nbsp;</td><td>length of HMAC key </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK, SOAP_EOM, or fault</dd></dl>

+To sign the SignedInfo element with this function, populate SignedInfo with Reference elements first using soap_wsse_add_SignedInfo_Reference. The SignedInfo element must not be modified after signing.<p>

+The SOAP_XML_INDENT and SOAP_XML_CANONICAL flags are used to serialize the SignedInfo to compute the signature.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a53" doxytag="wsseapi.c::soap_wsse_add_SignedInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a> * soap_wsse_add_SignedInfo           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds SignedInfo element. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a> object </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a54" doxytag="wsseapi.c::soap_wsse_add_SignedInfo_Reference" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_SignedInfo_Reference           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>URI</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>transform</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>inclusiveNamespaces</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>HA</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds SignedInfo element with Reference URI, transform algorithm used, and digest value. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>URI</em>&nbsp;</td><td>reference </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>transform</em>&nbsp;</td><td>string should be c14n_URI for exc-c14n or NULL </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>inclusiveNamespaces</em>&nbsp;</td><td>used by the exc-c14n transform or NULL </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>HA</em>&nbsp;</td><td>is the SHA1 digest in binary form (length=SOAP_SMD_SHA1_SIZE) </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or SOAP_EOM when references exceed SOAP_WSSE_MAX_REF</dd></dl>

+This function can be called to add more references to the wsse:SignedInfo element. A maximum number of SOAP_WSSE_MAX_REF references can be added. The digest method is always SHA1. Note: XPath transforms cannot be specified in this release.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a55" doxytag="wsseapi.c::soap_wsse_add_SignedInfo_SignatureMethod" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_SignedInfo_SignatureMethod           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>method</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>canonical</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds SignedInfo element with SignatureMethod. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>method</em>&nbsp;</td><td>is the URI of the signature algorithm (e.g. ds_rsa_sha1) </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>canonical</em>&nbsp;</td><td>flag indicating that SignedInfo is signed in exc-c14n form </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK</dd></dl>

+Note: the c14n:InclusiveNamespaces/PrefixList is set to "SOAP-ENV wsse".     </td>

+  </tr>

+</table>

+<a class="anchor" name="a38" doxytag="wsseapi.c::soap_wsse_add_Timestamp" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_Timestamp           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>time_t&nbsp;</td>

+          <td class="mdname" nowrap> <em>lifetime</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds Timestamp element with optional expiration date+time (lifetime). 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>for signature referencing or NULL </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>lifetime</em>&nbsp;</td><td>expressed in time_t units, or 0 for no expiration </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a42" doxytag="wsseapi.c::soap_wsse_add_UsernameTokenDigest" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_UsernameTokenDigest           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>username</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>password</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds UsernameToken element for digest authentication. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>string for signature referencing or NULL </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>username</em>&nbsp;</td><td>string </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>password</em>&nbsp;</td><td>string </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK</dd></dl>

+Computes SHA1 digest of the time stamp, a nonce, and the password. The digest provides the authentication credentials. Passwords are NOT sent in the clear. Note: this release supports the use of at most one UsernameToken in the header.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a41" doxytag="wsseapi.c::soap_wsse_add_UsernameTokenText" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_UsernameTokenText           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>username</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>password</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds UsernameToken element with optional clear-text password. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>string for signature referencing or NULL </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>username</em>&nbsp;</td><td>string </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>password</em>&nbsp;</td><td>string or NULL to omit the password </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK</dd></dl>

+Passwords are sent in the clear, so transport-level encryption is required. Note: this release supports the use of at most one UsernameToken in the header.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a49" doxytag="wsseapi.c::soap_wsse_BinarySecurityToken" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="struct__wsse_____binary_security_token.html">_wsse__BinarySecurityToken</a> * soap_wsse_BinarySecurityToken           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns BinarySecurityToken element if present. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>string of token to get or NULL </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="struct__wsse_____binary_security_token.html">_wsse__BinarySecurityToken</a> object or NULL </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a24" doxytag="wsseapi.c::soap_wsse_copy" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_copy           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>struct soap_plugin *&nbsp;</td>

+          <td class="mdname" nowrap> <em>dst</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>struct soap_plugin *&nbsp;</td>

+          <td class="mdname" nowrap> <em>src</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"><code> [static]</code></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Copies plugin data to localize plugin data for threads. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[out]</tt>&nbsp;</td><td valign=top><em>dst</em>&nbsp;</td><td>target plugin </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>src</em>&nbsp;</td><td>source plugin </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a25" doxytag="wsseapi.c::soap_wsse_delete" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void soap_wsse_delete           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>struct soap_plugin *&nbsp;</td>

+          <td class="mdname" nowrap> <em>p</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"><code> [static]</code></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Deletes plugin data. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in,out]</tt>&nbsp;</td><td valign=top><em>p</em>&nbsp;</td><td>plugin </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a33" doxytag="wsseapi.c::soap_wsse_delete_Security" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void soap_wsse_delete_Security           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Deletes Security header element. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a36" doxytag="wsseapi.c::soap_wsse_delete_Signature" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void soap_wsse_delete_Signature           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Deletes Signature header element. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a30" doxytag="wsseapi.c::soap_wsse_disconnect" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_disconnect           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap><code> [static]</code></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Verify signature and SignedInfo digests initiated with soap_wsse_verify_auto. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or fault </dd></dl>

+<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="wsseapi_8h.html#a62">soap_wsse_verify_auto</a></dd></dl>

+This callback is invoked just after a message was received.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a74" doxytag="wsseapi.c::soap_wsse_fault" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_fault           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap><a class="el" href="wsse_8h.html#a0">wsse__FaultcodeEnum</a>&nbsp;</td>

+          <td class="mdname" nowrap> <em>fault</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>detail</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Sets SOAP Fault (sub)code for server response. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>fault</em>&nbsp;</td><td>is one of wsse:FaultcodeEnum </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>detail</em>&nbsp;</td><td>string with optional text message </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_FAULT </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a50" doxytag="wsseapi.c::soap_wsse_get_BinarySecurityToken" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_get_BinarySecurityToken           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>char **&nbsp;</td>

+          <td class="mdname" nowrap> <em>valueType</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>unsigned char **&nbsp;</td>

+          <td class="mdname" nowrap> <em>data</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int *&nbsp;</td>

+          <td class="mdname" nowrap> <em>size</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Get wsse:BinarySecurityToken element token data in binary form. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>string of token to get or NULL </td></tr>

+    <tr><td><tt>[out]</tt>&nbsp;</td><td valign=top><em>valueType</em>&nbsp;</td><td>string </td></tr>

+    <tr><td><tt>[out]</tt>&nbsp;</td><td valign=top><em>data</em>&nbsp;</td><td>points to binary token data </td></tr>

+    <tr><td><tt>[out]</tt>&nbsp;</td><td valign=top><em>size</em>&nbsp;</td><td>is length of binary token </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or SOAP_FAULT with wsse:SecurityTokenUnavailable fault </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a51" doxytag="wsseapi.c::soap_wsse_get_BinarySecurityTokenX509" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> X509 * soap_wsse_get_BinarySecurityTokenX509           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Get X509 wsse:BinarySecurityToken certificate and verify its content. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>string of token to get or NULL </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>X509 certificate (dynamically allocated) or NULL with wsse:SecurityTokenUnavailable fault </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a65" doxytag="wsseapi.c::soap_wsse_get_KeyInfo_KeyName" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_get_KeyInfo_KeyName           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns KeyName element if present. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>string or NULL </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a72" doxytag="wsseapi.c::soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifier" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const unsigned char * soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifier           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int *&nbsp;</td>

+          <td class="mdname" nowrap> <em>size</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns KeyInfo/SecurityTokenReference/KeyIdentifier binary data. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[out]</tt>&nbsp;</td><td valign=top><em>size</em>&nbsp;</td><td>is set to the size of the decoded data </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>data or NULL </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a71" doxytag="wsseapi.c::soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifierValueType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char * soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifierValueType           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns KeyInfo/SecurityTokenReference/KeyIdentifier/ValueType if present. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>string or NULL </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a68" doxytag="wsseapi.c::soap_wsse_get_KeyInfo_SecurityTokenReferenceURI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char * soap_wsse_get_KeyInfo_SecurityTokenReferenceURI           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns a SecurityTokenReference URI if present. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>string or NULL </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a69" doxytag="wsseapi.c::soap_wsse_get_KeyInfo_SecurityTokenReferenceX509" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> X509 * soap_wsse_get_KeyInfo_SecurityTokenReferenceX509           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns a X509 certificate if present as a BinarySecurity token. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>X509 object or NULL with wsse:SecurityTokenUnavailable fault </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a57" doxytag="wsseapi.c::soap_wsse_get_SignedInfo_SignatureMethod" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_get_SignedInfo_SignatureMethod           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int *&nbsp;</td>

+          <td class="mdname" nowrap> <em>alg</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Get SignatureMethod algorithm. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[out]</tt>&nbsp;</td><td valign=top><em>alg</em>&nbsp;</td><td>is SOAP_SMD_HMAC_SHA1, SOAP_SMD_VRFY_DSA_SHA1, or SOAP_SMD_VRFY_RSA_SHA1 </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or SOAP_FAULT with wsse:UnsupportedAlgorithm or wsse:FailedCheck fault </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a44" doxytag="wsseapi.c::soap_wsse_get_Username" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char * soap_wsse_get_Username           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns UsernameToken/username string or wsse:FailedAuthentication fault. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>UsernameToken/username string or NULL with wsse:FailedAuthentication fault error set </dd></dl>

+<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="wsseapi_8h.html#a28">soap_wsse_verify_Password</a></dd></dl>

+The returned username should be used to lookup the user's password in a dictionary or database for server-side authentication with soap_wsse_verify_Password.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a23" doxytag="wsseapi.c::soap_wsse_init" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_init           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>struct <a class="el" href="structsoap__wsse__data.html">soap_wsse_data</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>data</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"><code> [static]</code></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Initializes plugin data. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in,out]</tt>&nbsp;</td><td valign=top><em>data</em>&nbsp;</td><td>plugin data </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a63" doxytag="wsseapi.c::soap_wsse_KeyInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="structds_____key_info_type.html">ds__KeyInfoType</a> * soap_wsse_KeyInfo           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns KeyInfo element if present. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>ds__KeyInfo object or NULL </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a29" doxytag="wsseapi.c::soap_wsse_preparecleanup" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void soap_wsse_preparecleanup           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>struct <a class="el" href="structsoap__wsse__data.html">soap_wsse_data</a> *&nbsp;</td>

+          <td class="mdname" nowrap> <em>data</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"><code> [static]</code></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Restores engine state. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in,out]</tt>&nbsp;</td><td valign=top><em>data</em>&nbsp;</td><td>plugin data </td></tr>

+  </table>

+</dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a28" doxytag="wsseapi.c::soap_wsse_preparefinal" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_preparefinal           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap><code> [static]</code></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Collects the digests of all the wsu:Id elements and populates the SignedInfo. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or fault</dd></dl>

+This callback is invoked just before the message is send.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a26" doxytag="wsseapi.c::soap_wsse_prepareinit" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_prepareinit           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap><code> [static]</code></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Initiates message preprocessing with gSOAP engine's prepareinit callback. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or fault</dd></dl>

+This callback is invoked to analyze a message before transmission.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a27" doxytag="wsseapi.c::soap_wsse_preparesend" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_preparesend           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>buf</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>size_t&nbsp;</td>

+          <td class="mdname" nowrap> <em>len</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"><code> [static]</code></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Takes a piece of the XML message (tokenized) to compute digest. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>buf</em>&nbsp;</td><td>string (XML "tokenized") to be send </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>len</em>&nbsp;</td><td>buf length </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or fault</dd></dl>

+This callback is invoked to analyze a message (usually during the HTTP content length phase). Note: nested elements with wsu:Id attributes cannot be individually signed in this release.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a34" doxytag="wsseapi.c::soap_wsse_Security" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="struct__wsse_____security.html">_wsse__Security</a> * soap_wsse_Security           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns Security header element if present. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="struct__wsse_____security.html">_wsse__Security</a> object or NULL </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a20" doxytag="wsseapi.c::soap_wsse_session_cleanup" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void soap_wsse_session_cleanup           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap><code> [static]</code></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Removes expired authentication data from the digest authentication session database. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a19" doxytag="wsseapi.c::soap_wsse_session_verify" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_session_verify           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char&nbsp;</td>

+          <td class="mdname" nowrap> <em>hash</em>[SOAP_SMD_SHA1_SIZE], </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>created</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>nonce</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"><code> [static]</code></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Verifies and updates the digest, nonce, and creation time against the digest authentication session database to prevent replay attacks. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>hash</em>&nbsp;</td><td>binary digest value of PasswordDigest </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>created</em>&nbsp;</td><td>string </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>nonce</em>&nbsp;</td><td>string (base64) </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or SOAP_FAULT </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a76" doxytag="wsseapi.c::soap_wsse_sign" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_sign           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>alg</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const void *&nbsp;</td>

+          <td class="mdname" nowrap> <em>key</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>keylen</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Uses the wsse plugin to sign all wsu:Id attributed elements. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>alg</em>&nbsp;</td><td>is the signature algorithm SOAP_SMD_HMAC_SHA1, SOAP_SMD_SIGN_DSA_SHA1, or SOAP_SMD_SIGN_RSA_SHA1 </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>key</em>&nbsp;</td><td>is the HMAC secret key or DSA/RSA private EVP_PKEY </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>keylen</em>&nbsp;</td><td>is the HMAC key length </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or fault</dd></dl>

+This function does not actually sign the message, but initiates the plugin's signature algorithm to sign the message upon message transfer.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a77" doxytag="wsseapi.c::soap_wsse_sign_body" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_sign_body           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>alg</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const void *&nbsp;</td>

+          <td class="mdname" nowrap> <em>key</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>keylen</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Uses the wsse plugin to sign all wsu:Id attributed elements, including the SOAP Body (by adding a wsu:Id="Body" attribute). 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>alg</em>&nbsp;</td><td>is the signature algorithm SOAP_SMD_HMAC_SHA1, SOAP_SMD_SIGN_DSA_SHA1, or SOAP_SMD_SIGN_RSA_SHA1 </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>key</em>&nbsp;</td><td>is the HMAC secret key or DSA/RSA private EVP_PKEY </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>keylen</em>&nbsp;</td><td>is the HMAC key length </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK</dd></dl>

+This function does not actually sign the message, but initiates the plugin's signature algorithm to sign the message upon message transfer.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a37" doxytag="wsseapi.c::soap_wsse_Signature" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="structds_____signature_type.html">ds__SignatureType</a> * soap_wsse_Signature           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns Signature header element if present. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="structds_____signature_type.html">ds__SignatureType</a> object or NULL </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a56" doxytag="wsseapi.c::soap_wsse_SignedInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a> * soap_wsse_SignedInfo           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns SignedInfo element if present. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a> object or NULL </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a39" doxytag="wsseapi.c::soap_wsse_Timestamp" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="struct__wsu_____timestamp.html">_wsu__Timestamp</a> * soap_wsse_Timestamp           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns Timestamp element if present. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="struct__wsu_____timestamp.html">_wsu__Timestamp</a> object or NULL </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a43" doxytag="wsseapi.c::soap_wsse_UsernameToken" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> <a class="el" href="struct__wsse_____username_token.html">_wsse__UsernameToken</a> * soap_wsse_UsernameToken           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns UsernameToken element if present. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>string of UsernameToken or NULL </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="struct__wsse_____username_token.html">_wsse__UsernameToken</a> object or NULL</dd></dl>

+Note: this release supports the use of at most one UsernameToken in the header.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a79" doxytag="wsseapi.c::soap_wsse_verify_auto" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_verify_auto           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>alg</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const void *&nbsp;</td>

+          <td class="mdname" nowrap> <em>key</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>size_t&nbsp;</td>

+          <td class="mdname" nowrap> <em>keylen</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Uses the wsse plugin to initiate the automatic verification of the signature and SignedInfo Reference digests. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>alg</em>&nbsp;</td><td>to verify signature if signature has no secret or public key, use SOAP_SMD_NONE to omit </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>key</em>&nbsp;</td><td>is HMAC key or EVP_PKEY </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>keylen</em>&nbsp;</td><td>is HMAC key length </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK</dd></dl>

+This function does not actually verify the message, but initiates the plugin's algorithm to store the message in a DOM to automatically verify the signature and digestes. If the message does not contain a key to verify the signature, the alg, key, and keylen parameters are used. It is important that the X509 certificate used to verify the signature is verified, which requires soap-&gt;cafile and/or soap-&gt;capath to be set.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a61" doxytag="wsseapi.c::soap_wsse_verify_digest" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_verify_digest           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>alg</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>unsigned char&nbsp;</td>

+          <td class="mdname" nowrap> <em>hash</em>[SOAP_SMD_MAX_SIZE]</td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Verifies the digest value of an XML element referenced by id against the hash. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>alg</em>&nbsp;</td><td>digest algorithm </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>string of the XML element to verify </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>hash</em>&nbsp;</td><td>digest value to verify against </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or fault </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a80" doxytag="wsseapi.c::soap_wsse_verify_done" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_verify_done           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Terminates the automatic verification of signatures. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a78" doxytag="wsseapi.c::soap_wsse_verify_init" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_verify_init           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Uses the wsse plugin to initiate the verification of the signature and SignedInfo Reference digests. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK</dd></dl>

+This function does not actually verify the message, but initiates the plugin's data to store the message in a DOM to verify the signature. The signature and digests in the DOM must be verified manually.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a45" doxytag="wsseapi.c::soap_wsse_verify_Password" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_verify_Password           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>password</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Verifies the supplied password or sets wsse:FailedAuthentication fault. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>password</em>&nbsp;</td><td>string to verify against </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK (authorized) or SOAP_FAULT with wsse:FailedAuthentication fault</dd></dl>

+The verification supports both clear-text password verification and digest password authentication. For digest authentication a history mechanism with a digest authentication session database ensures protection against replay attacks. Note: this release supports the use of at most one UsernameToken in the header.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a59" doxytag="wsseapi.c::soap_wsse_verify_SignatureValue" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_verify_SignatureValue           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>alg</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const void *&nbsp;</td>

+          <td class="mdname" nowrap> <em>key</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>keylen</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Verifies the SignatureValue of a SignedInfo element. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>alg</em>&nbsp;</td><td>is SOAP_SMD_HMAC_SHA1, SOAP_SMD_VRFY_DSA_SHA1, or SOAP_SMD_VRFY_RSA_SHA1 determined by the SignedInfo/SignatureMethod </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>key</em>&nbsp;</td><td>to use to verify (HMAC or EVP_PKEY) </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>keylen</em>&nbsp;</td><td>length of HMAC key </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK, SOAP_EOM, or fault</dd></dl>

+This function searches for the SignedInfo element in the soap-&gt;dom DOM tree to verify the signature in the SignatureValue element. Using the DOM ensures we will verify the signature of a SignedInfo as it was exactly received by the parser, by using the -DWITH_DOM compile flag and SOAP_XML_DOM runtime flag. If there is no DOM, it verifies the signature of the deserialized SignedInfo element in the SOAP Header. However, serializing deserialized data may change the octet stream that was signed, unless we're using gSOAP as producers and consumers (with the SOAP_XML_INDENT flag reset).     </td>

+  </tr>

+</table>

+<a class="anchor" name="a60" doxytag="wsseapi.c::soap_wsse_verify_SignedInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_verify_SignedInfo           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Verifies the digest values of the XML elements referenced by the SignedInfo References. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or fault</dd></dl>

+This function searches for the SignedInfo element in the soap-&gt;dom DOM tree to verify the digests contained therein. Using the DOM ensures we will verify the digests of the locally signed elements as they were exactly received by the parser, by using the -DWITH_DOM compile flag and SOAP_XML_DOM runtime flag. If there is no DOM, the function fails.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a40" doxytag="wsseapi.c::soap_wsse_verify_Timestamp" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_verify_Timestamp           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Verifies the Timestamp/Expires element against the current time. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or SOAP_FAULT with wsse:FailedAuthentication fault</dd></dl>

+Sets wsse:FailedAuthentication fault if wsu:Timestamp is expired. The SOAP_WSSE_CLKSKEW value is used as a margin to mitigate clock skew. Keeps silent when no timestamp is supplied or no expiration date is included in the wsu:Timestamp element.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a52" doxytag="wsseapi.c::soap_wsse_verify_X509" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_verify_X509           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>X509 *&nbsp;</td>

+          <td class="mdname" nowrap> <em>cert</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Verifies X509 certificate against soap-&gt;cafile, soap-&gt;capath, and soap-&gt;crlfile. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>cert</em>&nbsp;</td><td>X509 certificate </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or fault</dd></dl>

+This is an expensive operation, since we read the cafile and create the objects every time we need to verify a certificate. For future releases, we should store this data permanently in the gSOAP engine or plugin.     </td>

+  </tr>

+</table>

+<hr><h2>Variable Documentation</h2>

+<a class="anchor" name="a15" doxytag="wsseapi.c::c14n_URI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="wsseapi_8h.html#a12">c14n_URI</a> = "http://www.w3.org/2001/10/xml-exc-c14n#"          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a12" doxytag="wsseapi.c::ds_dsa_sha1URI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="wsseapi_8h.html#a9">ds_dsa_sha1URI</a> = "http://www.w3.org/2000/09/xmldsig#dsa-sha1"          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a11" doxytag="wsseapi.c::ds_hmac_sha1URI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="wsseapi_8h.html#a8">ds_hmac_sha1URI</a> = "http://www.w3.org/2000/09/xmldsig#hmac-sha1"          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a13" doxytag="wsseapi.c::ds_rsa_sha1URI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="wsseapi_8h.html#a10">ds_rsa_sha1URI</a> = "http://www.w3.org/2000/09/xmldsig#rsa-sha1"          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a10" doxytag="wsseapi.c::ds_sha1URI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="wsseapi_8h.html#a7">ds_sha1URI</a> = "http://www.w3.org/2000/09/xmldsig#sha1"          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a14" doxytag="wsseapi.c::ds_URI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="wsseapi_8h.html#a11">ds_URI</a> = "http://www.w3.org/2000/09/xmldsig#"          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a4" doxytag="wsseapi.c::soap_wsse_id" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char <a class="el" href="wsseapi_8h.html#a1">soap_wsse_id</a>[14] = SOAP_WSSE_ID          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Plugin identification for plugin registry     </td>

+  </tr>

+</table>

+<a class="anchor" name="a17" doxytag="wsseapi.c::soap_wsse_session" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structsoap__wsse__session.html">soap_wsse_session</a>* <a class="el" href="structsoap__wsse__session.html">soap_wsse_session</a> = NULL<code> [static]</code>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+The digest authentication session database     </td>

+  </tr>

+</table>

+<a class="anchor" name="a18" doxytag="wsseapi.c::soap_wsse_session_lock" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> MUTEX_TYPE <a class="el" href="wsseapi_8c.html#a18">soap_wsse_session_lock</a><code> [static]</code>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Lock for digest authentication session database exclusive access     </td>

+  </tr>

+</table>

+<a class="anchor" name="a7" doxytag="wsseapi.c::wsse_Base64BinaryURI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="wsseapi_8h.html#a4">wsse_Base64BinaryURI</a> = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a6" doxytag="wsseapi.c::wsse_PasswordDigestURI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="wsseapi_8h.html#a3">wsse_PasswordDigestURI</a> = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest"          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a5" doxytag="wsseapi.c::wsse_PasswordTextURI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="wsseapi_8h.html#a2">wsse_PasswordTextURI</a> = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a9" doxytag="wsseapi.c::wsse_X509v3SubjectKeyIdentifierURI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="wsseapi_8h.html#a6">wsse_X509v3SubjectKeyIdentifierURI</a> = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier"          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a8" doxytag="wsseapi.c::wsse_X509v3URI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="wsseapi_8h.html#a5">wsse_X509v3URI</a> = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a16" doxytag="wsseapi.c::wsu_URI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="wsseapi_8h.html#a13">wsu_URI</a> = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/wsseapi_8c__incl.map b/doc/wsse/html/wsseapi_8c__incl.map
new file mode 100644
index 0000000..e186616
--- /dev/null
+++ b/doc/wsse/html/wsseapi_8c__incl.map
@@ -0,0 +1,3 @@
+base referer
+rect $wsseapi_8h.html 16,167 85,193
+rect $smdevp_8h.html 89,92 156,119
diff --git a/doc/wsse/html/wsseapi_8c__incl.md5 b/doc/wsse/html/wsseapi_8c__incl.md5
new file mode 100644
index 0000000..8400285
--- /dev/null
+++ b/doc/wsse/html/wsseapi_8c__incl.md5
@@ -0,0 +1 @@
+c416f1d7a21db271a9b981a8ae0e0d9d
\ No newline at end of file
diff --git a/doc/wsse/html/wsseapi_8c__incl.png b/doc/wsse/html/wsseapi_8c__incl.png
new file mode 100644
index 0000000..111e7bc
--- /dev/null
+++ b/doc/wsse/html/wsseapi_8c__incl.png
Binary files differ
diff --git a/doc/wsse/html/wsseapi_8h.html b/doc/wsse/html/wsseapi_8h.html
new file mode 100644
index 0000000..4122573
--- /dev/null
+++ b/doc/wsse/html/wsseapi_8h.html
@@ -0,0 +1,2883 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: /Users/engelen/Projects/gsoap/doc/wsse/wsseapi.h File Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>/Users/engelen/Projects/gsoap/doc/wsse/wsseapi.h File Reference</h1><code>#include "soapH.h"</code><br>

+<code>#include "<a class="el" href="smdevp_8h.html">smdevp.h</a>"</code><br>

+

+<p>

+Include dependency graph for wsseapi.h:<p><center><img src="wsseapi_8h__incl.png" border="0" usemap="#wsseapi.h_map" alt="Include dependency graph"></center>

+<map name="wsseapi.h_map">

+<area href="smdevp_8h.html" shape="rect" coords="89,92,156,118" alt="">

+</map>

+

+<p>

+This graph shows which files directly or indirectly include this file:<p><center><img src="wsseapi_8h__dep__incl.png" border="0" usemap="#wsseapi.hdep_map" alt="Included by dependency graph"></center>

+<map name="wsseapi.hdep_map">

+<area href="wsseapi_8c.html" shape="rect" coords="6,17,76,44" alt="">

+</map>

+<table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Classes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__wsse__data.html">soap_wsse_data</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">wssepi plugin data  <a href="structsoap__wsse__data.html#_details">More...</a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structsoap__wsse__digest.html">soap_wsse_digest</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Digest dictionary: linked list of ID-hash pairs.  <a href="structsoap__wsse__digest.html#_details">More...</a><br></td></tr>

+<tr><td colspan=2><br><h2>Defines</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a0">SOAP_WSSE_ID</a>&nbsp;&nbsp;&nbsp;"SOAP-WSSE-0.9"</td></tr>

+

+<tr><td colspan=2><br><h2>Functions</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__wsse_____security.html">_wsse__Security</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a14">soap_wsse_add_Security</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds Security header element.  <a href="#a14"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__wsse_____security.html">_wsse__Security</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a15">soap_wsse_add_Security_actor</a> (struct soap *soap, const char *actor)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds Security header element with actor or role attribute.  <a href="#a15"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a16">soap_wsse_delete_Security</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes Security header element.  <a href="#a16"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__wsse_____security.html">_wsse__Security</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a17">soap_wsse_Security</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns Security header element if present.  <a href="#a17"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____signature_type.html">ds__SignatureType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a18">soap_wsse_add_Signature</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds Signature header element.  <a href="#a18"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a19">soap_wsse_delete_Signature</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes Signature header element.  <a href="#a19"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____signature_type.html">ds__SignatureType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a20">soap_wsse_Signature</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns Signature header element if present.  <a href="#a20"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a21">soap_wsse_add_Timestamp</a> (struct soap *soap, const char *id, time_t lifetime)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds Timestamp element with optional expiration date+time (lifetime).  <a href="#a21"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__wsu_____timestamp.html">_wsu__Timestamp</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a22">soap_wsse_Timestamp</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns Timestamp element if present.  <a href="#a22"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a23">soap_wsse_verify_Timestamp</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Verifies the Timestamp/Expires element against the current time.  <a href="#a23"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a24">soap_wsse_add_UsernameTokenText</a> (struct soap *soap, const char *id, const char *username, const char *password)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds UsernameToken element with optional clear-text password.  <a href="#a24"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a25">soap_wsse_add_UsernameTokenDigest</a> (struct soap *soap, const char *id, const char *username, const char *password)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds UsernameToken element for digest authentication.  <a href="#a25"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__wsse_____username_token.html">_wsse__UsernameToken</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a26">soap_wsse_UsernameToken</a> (struct soap *soap, const char *id)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns UsernameToken element if present.  <a href="#a26"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a27">soap_wsse_get_Username</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns UsernameToken/username string or wsse:FailedAuthentication fault.  <a href="#a27"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a28">soap_wsse_verify_Password</a> (struct soap *soap, const char *password)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Verifies the supplied password or sets wsse:FailedAuthentication fault.  <a href="#a28"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a29">soap_wsse_add_BinarySecurityToken</a> (struct soap *soap, const char *id, const char *valueType, const unsigned char *data, int size)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds BinarySecurityToken element.  <a href="#a29"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a30">soap_wsse_add_BinarySecurityTokenX509</a> (struct soap *soap, const char *id, X509 *cert)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds BinarySecurityToken element with X509 certificate.  <a href="#a30"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a31">soap_wsse_add_BinarySecurityTokenPEM</a> (struct soap *soap, const char *id, const char *filename)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds BinarySecurityToken element from a PEM file.  <a href="#a31"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__wsse_____binary_security_token.html">_wsse__BinarySecurityToken</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a32">soap_wsse_BinarySecurityToken</a> (struct soap *soap, const char *id)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns BinarySecurityToken element if present.  <a href="#a32"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a33">soap_wsse_get_BinarySecurityToken</a> (struct soap *soap, const char *id, char **valueType, unsigned char **data, int *size)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get wsse:BinarySecurityToken element token data in binary form.  <a href="#a33"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>X509 *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a34">soap_wsse_get_BinarySecurityTokenX509</a> (struct soap *soap, const char *id)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get X509 wsse:BinarySecurityToken certificate and verify its content.  <a href="#a34"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a35">soap_wsse_verify_X509</a> (struct soap *soap, X509 *cert)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Verifies X509 certificate against soap-&gt;cafile, soap-&gt;capath, and soap-&gt;crlfile.  <a href="#a35"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a36">soap_wsse_add_SignedInfo</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds SignedInfo element.  <a href="#a36"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a37">soap_wsse_add_SignedInfo_Reference</a> (struct soap *soap, const char *URI, const char *transform, const char *inclusiveNamespaces, const char *HA)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds SignedInfo element with Reference URI, transform algorithm used, and digest value.  <a href="#a37"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a38">soap_wsse_add_SignedInfo_SignatureMethod</a> (struct soap *soap, const char *method, int canonical)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds SignedInfo element with SignatureMethod.  <a href="#a38"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a39">soap_wsse_SignedInfo</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns SignedInfo element if present.  <a href="#a39"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a40">soap_wsse_get_SignedInfo_SignatureMethod</a> (struct soap *soap, int *alg)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get SignatureMethod algorithm.  <a href="#a40"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a41">soap_wsse_add_SignatureValue</a> (struct soap *soap, int alg, const void *key, int keylen)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds SignedInfo/SignatureMethod element, signs the SignedInfo element, and adds the resulting SignatureValue element.  <a href="#a41"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a42">soap_wsse_verify_SignatureValue</a> (struct soap *soap, int alg, const void *key, int keylen)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Verifies the SignatureValue of a SignedInfo element.  <a href="#a42"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a43">soap_wsse_verify_SignedInfo</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Verifies the digest values of the XML elements referenced by the SignedInfo References.  <a href="#a43"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a44">soap_wsse_verify_digest</a> (struct soap *soap, int alg, const char *id, unsigned char hash[SOAP_SMD_MAX_SIZE])</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Verifies the digest value of an XML element referenced by id against the hash.  <a href="#a44"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____key_info_type.html">ds__KeyInfoType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a45">soap_wsse_add_KeyInfo</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds KeyInfo element.  <a href="#a45"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structds_____key_info_type.html">ds__KeyInfoType</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a46">soap_wsse_KeyInfo</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns KeyInfo element if present.  <a href="#a46"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a47">soap_wsse_add_KeyInfo_KeyName</a> (struct soap *soap, const char *name)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds KeyName element.  <a href="#a47"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a48">soap_wsse_get_KeyInfo_KeyName</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns KeyName element if present.  <a href="#a48"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a49">soap_wsse_add_KeyInfo_SecurityTokenReferenceURI</a> (struct soap *soap, const char *URI, const char *valueType)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds KeyInfo element with SecurityTokenReference URI.  <a href="#a49"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a50">soap_wsse_add_KeyInfo_SecurityTokenReferenceX509</a> (struct soap *soap, const char *URI)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds KeyInfo element with SecurityTokenReference URI to an X509 cert.  <a href="#a50"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a51">soap_wsse_get_KeyInfo_SecurityTokenReferenceURI</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a SecurityTokenReference URI if present.  <a href="#a51"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>X509 *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a52">soap_wsse_get_KeyInfo_SecurityTokenReferenceX509</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a X509 certificate if present as a BinarySecurity token.  <a href="#a52"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a53">soap_wsse_add_KeyInfo_SecurityTokenReferenceKeyIdentifier</a> (struct soap *soap, const char *id, const char *valueType, unsigned char *data, int size)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds KeyInfo element with SecurityTokenReference/KeyIdentifier binary data.  <a href="#a53"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a54">soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifierValueType</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns KeyInfo/SecurityTokenReference/KeyIdentifier/ValueType if present.  <a href="#a54"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>const unsigned char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a55">soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifier</a> (struct soap *soap, int *size)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns KeyInfo/SecurityTokenReference/KeyIdentifier binary data.  <a href="#a55"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a56">soap_wsse_add_KeyInfo_SecurityTokenReferenceEmbedded</a> (struct soap *soap, const char *id, const char *valueType)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds KeyInfo element with Embedded SecurityTokenReference.  <a href="#a56"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a57">soap_wsse_fault</a> (struct soap *soap, enum <a class="el" href="wsse_8h.html#a0">wsse__FaultcodeEnum</a> fault, const char *detail)</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a58">soap_wsse</a> (struct soap *soap, struct soap_plugin *p, void *arg)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Plugin registry function, used with soap_register_plugin.  <a href="#a58"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a59">soap_wsse_sign</a> (struct soap *soap, int alg, const void *key, int keylen)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Uses the wsse plugin to sign all wsu:Id attributed elements.  <a href="#a59"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a60">soap_wsse_sign_body</a> (struct soap *soap, int alg, const void *key, int keylen)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Uses the wsse plugin to sign all wsu:Id attributed elements, including the SOAP Body (by adding a wsu:Id="Body" attribute).  <a href="#a60"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a61">soap_wsse_verify_init</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Uses the wsse plugin to initiate the verification of the signature and SignedInfo Reference digests.  <a href="#a61"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a62">soap_wsse_verify_auto</a> (struct soap *soap, int alg, const void *key, size_t keylen)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Uses the wsse plugin to initiate the automatic verification of the signature and SignedInfo Reference digests.  <a href="#a62"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a63">soap_wsse_verify_done</a> (struct soap *soap)</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Terminates the automatic verification of signatures.  <a href="#a63"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Variables</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a1">soap_wsse_id</a> []</td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a2">wsse_PasswordTextURI</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a3">wsse_PasswordDigestURI</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a4">wsse_Base64BinaryURI</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a5">wsse_X509v3URI</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a6">wsse_X509v3SubjectKeyIdentifierURI</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a7">ds_sha1URI</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a8">ds_hmac_sha1URI</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a9">ds_dsa_sha1URI</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a10">ds_rsa_sha1URI</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a11">ds_URI</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a12">c14n_URI</a></td></tr>

+

+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsseapi_8h.html#a13">wsu_URI</a></td></tr>

+

+</table>

+<hr><h2>Define Documentation</h2>

+<a class="anchor" name="a0" doxytag="wsseapi.h::SOAP_WSSE_ID" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> #define SOAP_WSSE_ID&nbsp;&nbsp;&nbsp;"SOAP-WSSE-0.9"          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+plugin identification for plugin registry     </td>

+  </tr>

+</table>

+<hr><h2>Function Documentation</h2>

+<a class="anchor" name="a58" doxytag="wsseapi.h::soap_wsse" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>struct soap_plugin *&nbsp;</td>

+          <td class="mdname" nowrap> <em>p</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>void *&nbsp;</td>

+          <td class="mdname" nowrap> <em>arg</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Plugin registry function, used with soap_register_plugin. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in,out]</tt>&nbsp;</td><td valign=top><em>p</em>&nbsp;</td><td>plugin created in registry </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>arg</em>&nbsp;</td><td>passed from soap_register_plugin_arg </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a29" doxytag="wsseapi.h::soap_wsse_add_BinarySecurityToken" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_BinarySecurityToken           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>valueType</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const unsigned char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>data</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>size</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds BinarySecurityToken element. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>string for signature referencing or NULL </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>valueType</em>&nbsp;</td><td>string </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>data</em>&nbsp;</td><td>points to binary token data </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>size</em>&nbsp;</td><td>is length of binary token </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a31" doxytag="wsseapi.h::soap_wsse_add_BinarySecurityTokenPEM" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_BinarySecurityTokenPEM           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>filename</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds BinarySecurityToken element from a PEM file. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>string for signature reference </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>filename</em>&nbsp;</td><td></td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or SOAP_FAULT with wsse__InvalidSecurity fault when file cannot be read or does not contain a valid certificate</dd></dl>

+This function uses PEM_read_X509 from the the OpenSSL library to read a certificate from a PEM formatted file.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a30" doxytag="wsseapi.h::soap_wsse_add_BinarySecurityTokenX509" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_BinarySecurityTokenX509           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>X509 *&nbsp;</td>

+          <td class="mdname" nowrap> <em>cert</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds BinarySecurityToken element with X509 certificate. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>string for signature reference </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>cert</em>&nbsp;</td><td>points to the X509 certificate </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or SOAP_EOM</dd></dl>

+This function uses i2d_X509 from the the OpenSSL library to convert an X509 object to binary DER format.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a45" doxytag="wsseapi.h::soap_wsse_add_KeyInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structds_____key_info_type.html">ds__KeyInfoType</a>* soap_wsse_add_KeyInfo           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds KeyInfo element. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>ds__KeyInfo object </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a47" doxytag="wsseapi.h::soap_wsse_add_KeyInfo_KeyName" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_KeyInfo_KeyName           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>name</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds KeyName element. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>name</em>&nbsp;</td><td>string of the KeyName </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK</dd></dl>

+Note: the recommended method to add Key information is to utilize KeyIdentifier instead of KeyName. A KeyName is useful mainly for internal use.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a56" doxytag="wsseapi.h::soap_wsse_add_KeyInfo_SecurityTokenReferenceEmbedded" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_KeyInfo_SecurityTokenReferenceEmbedded           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>valueType</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds KeyInfo element with Embedded SecurityTokenReference. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>string for signature reference </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>valueType</em>&nbsp;</td><td>string </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK</dd></dl>

+Note: this function is under construction and the result depends on usage scenarios deployed in practice.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a53" doxytag="wsseapi.h::soap_wsse_add_KeyInfo_SecurityTokenReferenceKeyIdentifier" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_KeyInfo_SecurityTokenReferenceKeyIdentifier           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>valueType</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>unsigned char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>data</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>size</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds KeyInfo element with SecurityTokenReference/KeyIdentifier binary data. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>string for signature reference </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>valueType</em>&nbsp;</td><td>string </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>data</em>&nbsp;</td><td>binary data </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>size</em>&nbsp;</td><td>of binary data </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a49" doxytag="wsseapi.h::soap_wsse_add_KeyInfo_SecurityTokenReferenceURI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_KeyInfo_SecurityTokenReferenceURI           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>URI</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>valueType</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds KeyInfo element with SecurityTokenReference URI. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>URI</em>&nbsp;</td><td>string referencing a security token </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>valueType</em>&nbsp;</td><td>string or NULL </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a50" doxytag="wsseapi.h::soap_wsse_add_KeyInfo_SecurityTokenReferenceX509" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_KeyInfo_SecurityTokenReferenceX509           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>URI</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds KeyInfo element with SecurityTokenReference URI to an X509 cert. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>URI</em>&nbsp;</td><td>string referencing an X509 certificate </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a14" doxytag="wsseapi.h::soap_wsse_add_Security" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="struct__wsse_____security.html">_wsse__Security</a>* soap_wsse_add_Security           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds Security header element. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="struct__wsse_____security.html">_wsse__Security</a> object </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a15" doxytag="wsseapi.h::soap_wsse_add_Security_actor" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="struct__wsse_____security.html">_wsse__Security</a>* soap_wsse_add_Security_actor           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>actor</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds Security header element with actor or role attribute. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td></td><td valign=top><em>actor</em>&nbsp;</td><td>string </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="struct__wsse_____security.html">_wsse__Security</a> object </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a18" doxytag="wsseapi.h::soap_wsse_add_Signature" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structds_____signature_type.html">ds__SignatureType</a>* soap_wsse_add_Signature           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds Signature header element. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="structds_____signature_type.html">ds__SignatureType</a> object </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a41" doxytag="wsseapi.h::soap_wsse_add_SignatureValue" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_SignatureValue           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>alg</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const void *&nbsp;</td>

+          <td class="mdname" nowrap> <em>key</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>keylen</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds SignedInfo/SignatureMethod element, signs the SignedInfo element, and adds the resulting SignatureValue element. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>alg</em>&nbsp;</td><td>is SOAP_SMD_HMAC_SHA1, SOAP_SMD_SIGN_DSA_SHA1, or SOAP_SMD_SIGN_RSA_SHA1 </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>key</em>&nbsp;</td><td>to use to sign (HMAC or EVP_PKEY) </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>keylen</em>&nbsp;</td><td>length of HMAC key </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK, SOAP_EOM, or fault</dd></dl>

+To sign the SignedInfo element with this function, populate SignedInfo with Reference elements first using soap_wsse_add_SignedInfo_Reference. The SignedInfo element must not be modified after signing.<p>

+The SOAP_XML_INDENT and SOAP_XML_CANONICAL flags are used to serialize the SignedInfo to compute the signature.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a36" doxytag="wsseapi.h::soap_wsse_add_SignedInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a>* soap_wsse_add_SignedInfo           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds SignedInfo element. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a> object </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a37" doxytag="wsseapi.h::soap_wsse_add_SignedInfo_Reference" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_SignedInfo_Reference           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>URI</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>transform</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>inclusiveNamespaces</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>HA</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds SignedInfo element with Reference URI, transform algorithm used, and digest value. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>URI</em>&nbsp;</td><td>reference </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>transform</em>&nbsp;</td><td>string should be c14n_URI for exc-c14n or NULL </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>inclusiveNamespaces</em>&nbsp;</td><td>used by the exc-c14n transform or NULL </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>HA</em>&nbsp;</td><td>is the SHA1 digest in binary form (length=SOAP_SMD_SHA1_SIZE) </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or SOAP_EOM when references exceed SOAP_WSSE_MAX_REF</dd></dl>

+This function can be called to add more references to the wsse:SignedInfo element. A maximum number of SOAP_WSSE_MAX_REF references can be added. The digest method is always SHA1. Note: XPath transforms cannot be specified in this release.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a38" doxytag="wsseapi.h::soap_wsse_add_SignedInfo_SignatureMethod" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_SignedInfo_SignatureMethod           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>method</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>canonical</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds SignedInfo element with SignatureMethod. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>method</em>&nbsp;</td><td>is the URI of the signature algorithm (e.g. ds_rsa_sha1) </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>canonical</em>&nbsp;</td><td>flag indicating that SignedInfo is signed in exc-c14n form </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK</dd></dl>

+Note: the c14n:InclusiveNamespaces/PrefixList is set to "SOAP-ENV wsse".     </td>

+  </tr>

+</table>

+<a class="anchor" name="a21" doxytag="wsseapi.h::soap_wsse_add_Timestamp" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_Timestamp           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>time_t&nbsp;</td>

+          <td class="mdname" nowrap> <em>lifetime</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds Timestamp element with optional expiration date+time (lifetime). 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>for signature referencing or NULL </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>lifetime</em>&nbsp;</td><td>expressed in time_t units, or 0 for no expiration </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a25" doxytag="wsseapi.h::soap_wsse_add_UsernameTokenDigest" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_UsernameTokenDigest           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>username</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>password</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds UsernameToken element for digest authentication. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>string for signature referencing or NULL </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>username</em>&nbsp;</td><td>string </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>password</em>&nbsp;</td><td>string </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK</dd></dl>

+Computes SHA1 digest of the time stamp, a nonce, and the password. The digest provides the authentication credentials. Passwords are NOT sent in the clear. Note: this release supports the use of at most one UsernameToken in the header.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a24" doxytag="wsseapi.h::soap_wsse_add_UsernameTokenText" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_add_UsernameTokenText           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>username</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>password</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Adds UsernameToken element with optional clear-text password. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>string for signature referencing or NULL </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>username</em>&nbsp;</td><td>string </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>password</em>&nbsp;</td><td>string or NULL to omit the password </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK</dd></dl>

+Passwords are sent in the clear, so transport-level encryption is required. Note: this release supports the use of at most one UsernameToken in the header.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a32" doxytag="wsseapi.h::soap_wsse_BinarySecurityToken" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="struct__wsse_____binary_security_token.html">_wsse__BinarySecurityToken</a>* soap_wsse_BinarySecurityToken           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns BinarySecurityToken element if present. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>string of token to get or NULL </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="struct__wsse_____binary_security_token.html">_wsse__BinarySecurityToken</a> object or NULL </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a16" doxytag="wsseapi.h::soap_wsse_delete_Security" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void soap_wsse_delete_Security           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Deletes Security header element. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a19" doxytag="wsseapi.h::soap_wsse_delete_Signature" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> void soap_wsse_delete_Signature           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Deletes Signature header element. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a57" doxytag="wsseapi.h::soap_wsse_fault" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_fault           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>enum <a class="el" href="wsse_8h.html#a0">wsse__FaultcodeEnum</a>&nbsp;</td>

+          <td class="mdname" nowrap> <em>fault</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>detail</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a33" doxytag="wsseapi.h::soap_wsse_get_BinarySecurityToken" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_get_BinarySecurityToken           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>char **&nbsp;</td>

+          <td class="mdname" nowrap> <em>valueType</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>unsigned char **&nbsp;</td>

+          <td class="mdname" nowrap> <em>data</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int *&nbsp;</td>

+          <td class="mdname" nowrap> <em>size</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Get wsse:BinarySecurityToken element token data in binary form. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>string of token to get or NULL </td></tr>

+    <tr><td><tt>[out]</tt>&nbsp;</td><td valign=top><em>valueType</em>&nbsp;</td><td>string </td></tr>

+    <tr><td><tt>[out]</tt>&nbsp;</td><td valign=top><em>data</em>&nbsp;</td><td>points to binary token data </td></tr>

+    <tr><td><tt>[out]</tt>&nbsp;</td><td valign=top><em>size</em>&nbsp;</td><td>is length of binary token </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or SOAP_FAULT with wsse:SecurityTokenUnavailable fault </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a34" doxytag="wsseapi.h::soap_wsse_get_BinarySecurityTokenX509" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> X509* soap_wsse_get_BinarySecurityTokenX509           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Get X509 wsse:BinarySecurityToken certificate and verify its content. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>string of token to get or NULL </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>X509 certificate (dynamically allocated) or NULL with wsse:SecurityTokenUnavailable fault </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a48" doxytag="wsseapi.h::soap_wsse_get_KeyInfo_KeyName" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* soap_wsse_get_KeyInfo_KeyName           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns KeyName element if present. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>string or NULL </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a55" doxytag="wsseapi.h::soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifier" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const unsigned char* soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifier           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int *&nbsp;</td>

+          <td class="mdname" nowrap> <em>size</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns KeyInfo/SecurityTokenReference/KeyIdentifier binary data. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[out]</tt>&nbsp;</td><td valign=top><em>size</em>&nbsp;</td><td>is set to the size of the decoded data </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>data or NULL </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a54" doxytag="wsseapi.h::soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifierValueType" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifierValueType           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns KeyInfo/SecurityTokenReference/KeyIdentifier/ValueType if present. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>string or NULL </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a51" doxytag="wsseapi.h::soap_wsse_get_KeyInfo_SecurityTokenReferenceURI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* soap_wsse_get_KeyInfo_SecurityTokenReferenceURI           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns a SecurityTokenReference URI if present. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>string or NULL </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a52" doxytag="wsseapi.h::soap_wsse_get_KeyInfo_SecurityTokenReferenceX509" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> X509* soap_wsse_get_KeyInfo_SecurityTokenReferenceX509           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns a X509 certificate if present as a BinarySecurity token. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>X509 object or NULL with wsse:SecurityTokenUnavailable fault </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a40" doxytag="wsseapi.h::soap_wsse_get_SignedInfo_SignatureMethod" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_get_SignedInfo_SignatureMethod           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int *&nbsp;</td>

+          <td class="mdname" nowrap> <em>alg</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Get SignatureMethod algorithm. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[out]</tt>&nbsp;</td><td valign=top><em>alg</em>&nbsp;</td><td>is SOAP_SMD_HMAC_SHA1, SOAP_SMD_VRFY_DSA_SHA1, or SOAP_SMD_VRFY_RSA_SHA1 </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or SOAP_FAULT with wsse:UnsupportedAlgorithm or wsse:FailedCheck fault </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a27" doxytag="wsseapi.h::soap_wsse_get_Username" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* soap_wsse_get_Username           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns UsernameToken/username string or wsse:FailedAuthentication fault. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>UsernameToken/username string or NULL with wsse:FailedAuthentication fault error set </dd></dl>

+<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="wsseapi_8h.html#a28">soap_wsse_verify_Password</a></dd></dl>

+The returned username should be used to lookup the user's password in a dictionary or database for server-side authentication with soap_wsse_verify_Password.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a46" doxytag="wsseapi.h::soap_wsse_KeyInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structds_____key_info_type.html">ds__KeyInfoType</a>* soap_wsse_KeyInfo           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns KeyInfo element if present. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>ds__KeyInfo object or NULL </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a17" doxytag="wsseapi.h::soap_wsse_Security" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="struct__wsse_____security.html">_wsse__Security</a>* soap_wsse_Security           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns Security header element if present. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="struct__wsse_____security.html">_wsse__Security</a> object or NULL </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a59" doxytag="wsseapi.h::soap_wsse_sign" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_sign           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>alg</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const void *&nbsp;</td>

+          <td class="mdname" nowrap> <em>key</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>keylen</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Uses the wsse plugin to sign all wsu:Id attributed elements. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>alg</em>&nbsp;</td><td>is the signature algorithm SOAP_SMD_HMAC_SHA1, SOAP_SMD_SIGN_DSA_SHA1, or SOAP_SMD_SIGN_RSA_SHA1 </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>key</em>&nbsp;</td><td>is the HMAC secret key or DSA/RSA private EVP_PKEY </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>keylen</em>&nbsp;</td><td>is the HMAC key length </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or fault</dd></dl>

+This function does not actually sign the message, but initiates the plugin's signature algorithm to sign the message upon message transfer.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a60" doxytag="wsseapi.h::soap_wsse_sign_body" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_sign_body           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>alg</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const void *&nbsp;</td>

+          <td class="mdname" nowrap> <em>key</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>keylen</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Uses the wsse plugin to sign all wsu:Id attributed elements, including the SOAP Body (by adding a wsu:Id="Body" attribute). 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>alg</em>&nbsp;</td><td>is the signature algorithm SOAP_SMD_HMAC_SHA1, SOAP_SMD_SIGN_DSA_SHA1, or SOAP_SMD_SIGN_RSA_SHA1 </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>key</em>&nbsp;</td><td>is the HMAC secret key or DSA/RSA private EVP_PKEY </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>keylen</em>&nbsp;</td><td>is the HMAC key length </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK</dd></dl>

+This function does not actually sign the message, but initiates the plugin's signature algorithm to sign the message upon message transfer.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a20" doxytag="wsseapi.h::soap_wsse_Signature" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structds_____signature_type.html">ds__SignatureType</a>* soap_wsse_Signature           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns Signature header element if present. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="structds_____signature_type.html">ds__SignatureType</a> object or NULL </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a39" doxytag="wsseapi.h::soap_wsse_SignedInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a>* soap_wsse_SignedInfo           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns SignedInfo element if present. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="structds_____signed_info_type.html">ds__SignedInfoType</a> object or NULL </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a22" doxytag="wsseapi.h::soap_wsse_Timestamp" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="struct__wsu_____timestamp.html">_wsu__Timestamp</a>* soap_wsse_Timestamp           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns Timestamp element if present. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="struct__wsu_____timestamp.html">_wsu__Timestamp</a> object or NULL </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a26" doxytag="wsseapi.h::soap_wsse_UsernameToken" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> struct <a class="el" href="struct__wsse_____username_token.html">_wsse__UsernameToken</a>* soap_wsse_UsernameToken           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Returns UsernameToken element if present. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>string of UsernameToken or NULL </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="struct__wsse_____username_token.html">_wsse__UsernameToken</a> object or NULL</dd></dl>

+Note: this release supports the use of at most one UsernameToken in the header.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a62" doxytag="wsseapi.h::soap_wsse_verify_auto" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_verify_auto           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>alg</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const void *&nbsp;</td>

+          <td class="mdname" nowrap> <em>key</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>size_t&nbsp;</td>

+          <td class="mdname" nowrap> <em>keylen</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Uses the wsse plugin to initiate the automatic verification of the signature and SignedInfo Reference digests. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>alg</em>&nbsp;</td><td>to verify signature if signature has no secret or public key, use SOAP_SMD_NONE to omit </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>key</em>&nbsp;</td><td>is HMAC key or EVP_PKEY </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>keylen</em>&nbsp;</td><td>is HMAC key length </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK</dd></dl>

+This function does not actually verify the message, but initiates the plugin's algorithm to store the message in a DOM to automatically verify the signature and digestes. If the message does not contain a key to verify the signature, the alg, key, and keylen parameters are used. It is important that the X509 certificate used to verify the signature is verified, which requires soap-&gt;cafile and/or soap-&gt;capath to be set.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a44" doxytag="wsseapi.h::soap_wsse_verify_digest" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_verify_digest           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>alg</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>id</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>unsigned char&nbsp;</td>

+          <td class="mdname" nowrap> <em>hash</em>[SOAP_SMD_MAX_SIZE]</td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Verifies the digest value of an XML element referenced by id against the hash. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>alg</em>&nbsp;</td><td>digest algorithm </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>id</em>&nbsp;</td><td>string of the XML element to verify </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>hash</em>&nbsp;</td><td>digest value to verify against </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or fault </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a63" doxytag="wsseapi.h::soap_wsse_verify_done" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_verify_done           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Terminates the automatic verification of signatures. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK </dd></dl>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a61" doxytag="wsseapi.h::soap_wsse_verify_init" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_verify_init           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Uses the wsse plugin to initiate the verification of the signature and SignedInfo Reference digests. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK</dd></dl>

+This function does not actually verify the message, but initiates the plugin's data to store the message in a DOM to verify the signature. The signature and digests in the DOM must be verified manually.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a28" doxytag="wsseapi.h::soap_wsse_verify_Password" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_verify_Password           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const char *&nbsp;</td>

+          <td class="mdname" nowrap> <em>password</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Verifies the supplied password or sets wsse:FailedAuthentication fault. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>password</em>&nbsp;</td><td>string to verify against </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK (authorized) or SOAP_FAULT with wsse:FailedAuthentication fault</dd></dl>

+The verification supports both clear-text password verification and digest password authentication. For digest authentication a history mechanism with a digest authentication session database ensures protection against replay attacks. Note: this release supports the use of at most one UsernameToken in the header.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a42" doxytag="wsseapi.h::soap_wsse_verify_SignatureValue" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_verify_SignatureValue           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>alg</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>const void *&nbsp;</td>

+          <td class="mdname" nowrap> <em>key</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>int&nbsp;</td>

+          <td class="mdname" nowrap> <em>keylen</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Verifies the SignatureValue of a SignedInfo element. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>alg</em>&nbsp;</td><td>is SOAP_SMD_HMAC_SHA1, SOAP_SMD_VRFY_DSA_SHA1, or SOAP_SMD_VRFY_RSA_SHA1 determined by the SignedInfo/SignatureMethod </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>key</em>&nbsp;</td><td>to use to verify (HMAC or EVP_PKEY) </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>keylen</em>&nbsp;</td><td>length of HMAC key </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK, SOAP_EOM, or fault</dd></dl>

+This function searches for the SignedInfo element in the soap-&gt;dom DOM tree to verify the signature in the SignatureValue element. Using the DOM ensures we will verify the signature of a SignedInfo as it was exactly received by the parser, by using the -DWITH_DOM compile flag and SOAP_XML_DOM runtime flag. If there is no DOM, it verifies the signature of the deserialized SignedInfo element in the SOAP Header. However, serializing deserialized data may change the octet stream that was signed, unless we're using gSOAP as producers and consumers (with the SOAP_XML_INDENT flag reset).     </td>

+  </tr>

+</table>

+<a class="anchor" name="a43" doxytag="wsseapi.h::soap_wsse_verify_SignedInfo" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_verify_SignedInfo           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Verifies the digest values of the XML elements referenced by the SignedInfo References. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or fault</dd></dl>

+This function searches for the SignedInfo element in the soap-&gt;dom DOM tree to verify the digests contained therein. Using the DOM ensures we will verify the digests of the locally signed elements as they were exactly received by the parser, by using the -DWITH_DOM compile flag and SOAP_XML_DOM runtime flag. If there is no DOM, the function fails.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a23" doxytag="wsseapi.h::soap_wsse_verify_Timestamp" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_verify_Timestamp           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname1" valign="top" nowrap> <em>soap</em>          </td>

+          <td class="md" valign="top">&nbsp;)&nbsp;</td>

+          <td class="md" nowrap></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Verifies the Timestamp/Expires element against the current time. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or SOAP_FAULT with wsse:FailedAuthentication fault</dd></dl>

+Sets wsse:FailedAuthentication fault if wsu:Timestamp is expired. The SOAP_WSSE_CLKSKEW value is used as a margin to mitigate clock skew. Keeps silent when no timestamp is supplied or no expiration date is included in the wsu:Timestamp element.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a35" doxytag="wsseapi.h::soap_wsse_verify_X509" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> int soap_wsse_verify_X509           </td>

+          <td class="md" valign="top">(&nbsp;</td>

+          <td class="md" nowrap valign="top">struct soap *&nbsp;</td>

+          <td class="mdname" nowrap> <em>soap</em>, </td>

+        </tr>

+        <tr>

+          <td class="md" nowrap align="right"></td>

+          <td></td>

+          <td class="md" nowrap>X509 *&nbsp;</td>

+          <td class="mdname" nowrap> <em>cert</em></td>

+        </tr>

+        <tr>

+          <td></td>

+          <td class="md">)&nbsp;</td>

+          <td class="md" colspan="2"></td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Verifies X509 certificate against soap-&gt;cafile, soap-&gt;capath, and soap-&gt;crlfile. 

+<p>

+<dl compact><dt><b>Parameters:</b></dt><dd>

+  <table border="0" cellspacing="2" cellpadding="0">

+    <tr><td></td><td valign=top><em>soap</em>&nbsp;</td><td>context </td></tr>

+    <tr><td><tt>[in]</tt>&nbsp;</td><td valign=top><em>cert</em>&nbsp;</td><td>X509 certificate </td></tr>

+  </table>

+</dl>

+<dl compact><dt><b>Returns:</b></dt><dd>SOAP_OK or fault</dd></dl>

+This is an expensive operation, since we read the cafile and create the objects every time we need to verify a certificate. For future releases, we should store this data permanently in the gSOAP engine or plugin.     </td>

+  </tr>

+</table>

+<hr><h2>Variable Documentation</h2>

+<a class="anchor" name="a12" doxytag="wsseapi.h::c14n_URI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="wsseapi_8h.html#a12">c14n_URI</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a9" doxytag="wsseapi.h::ds_dsa_sha1URI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="wsseapi_8h.html#a9">ds_dsa_sha1URI</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a8" doxytag="wsseapi.h::ds_hmac_sha1URI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="wsseapi_8h.html#a8">ds_hmac_sha1URI</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a10" doxytag="wsseapi.h::ds_rsa_sha1URI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="wsseapi_8h.html#a10">ds_rsa_sha1URI</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a7" doxytag="wsseapi.h::ds_sha1URI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="wsseapi_8h.html#a7">ds_sha1URI</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a11" doxytag="wsseapi.h::ds_URI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="wsseapi_8h.html#a11">ds_URI</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a1" doxytag="wsseapi.h::soap_wsse_id" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char <a class="el" href="wsseapi_8h.html#a1">soap_wsse_id</a>[]          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Plugin identification for plugin registry     </td>

+  </tr>

+</table>

+<a class="anchor" name="a4" doxytag="wsseapi.h::wsse_Base64BinaryURI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="wsseapi_8h.html#a4">wsse_Base64BinaryURI</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a3" doxytag="wsseapi.h::wsse_PasswordDigestURI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="wsseapi_8h.html#a3">wsse_PasswordDigestURI</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a2" doxytag="wsseapi.h::wsse_PasswordTextURI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="wsseapi_8h.html#a2">wsse_PasswordTextURI</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a6" doxytag="wsseapi.h::wsse_X509v3SubjectKeyIdentifierURI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="wsseapi_8h.html#a6">wsse_X509v3SubjectKeyIdentifierURI</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a5" doxytag="wsseapi.h::wsse_X509v3URI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="wsseapi_8h.html#a5">wsse_X509v3URI</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<a class="anchor" name="a13" doxytag="wsseapi.h::wsu_URI" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> const char* <a class="el" href="wsseapi_8h.html#a13">wsu_URI</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+    </td>

+  </tr>

+</table>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/doc/wsse/html/wsseapi_8h__dep__incl.map b/doc/wsse/html/wsseapi_8h__dep__incl.map
new file mode 100644
index 0000000..ec84672
--- /dev/null
+++ b/doc/wsse/html/wsseapi_8h__dep__incl.map
@@ -0,0 +1,2 @@
+base referer
+rect $wsseapi_8c.html 6,17 76,44
diff --git a/doc/wsse/html/wsseapi_8h__dep__incl.md5 b/doc/wsse/html/wsseapi_8h__dep__incl.md5
new file mode 100644
index 0000000..c1023b6
--- /dev/null
+++ b/doc/wsse/html/wsseapi_8h__dep__incl.md5
@@ -0,0 +1 @@
+7bcd116442a44c7b19cd6b9cfea18af7
\ No newline at end of file
diff --git a/doc/wsse/html/wsseapi_8h__dep__incl.png b/doc/wsse/html/wsseapi_8h__dep__incl.png
new file mode 100644
index 0000000..fb4fef2
--- /dev/null
+++ b/doc/wsse/html/wsseapi_8h__dep__incl.png
Binary files differ
diff --git a/doc/wsse/html/wsseapi_8h__incl.map b/doc/wsse/html/wsseapi_8h__incl.map
new file mode 100644
index 0000000..8d67c23
--- /dev/null
+++ b/doc/wsse/html/wsseapi_8h__incl.map
@@ -0,0 +1,2 @@
+base referer
+rect $smdevp_8h.html 89,92 156,118
diff --git a/doc/wsse/html/wsseapi_8h__incl.md5 b/doc/wsse/html/wsseapi_8h__incl.md5
new file mode 100644
index 0000000..9aa915d
--- /dev/null
+++ b/doc/wsse/html/wsseapi_8h__incl.md5
@@ -0,0 +1 @@
+cffc94f6a7aaec589c565221d3a3d031
\ No newline at end of file
diff --git a/doc/wsse/html/wsseapi_8h__incl.png b/doc/wsse/html/wsseapi_8h__incl.png
new file mode 100644
index 0000000..a48120b
--- /dev/null
+++ b/doc/wsse/html/wsseapi_8h__incl.png
Binary files differ
diff --git a/doc/wsse/html/wsu_8h.html b/doc/wsse/html/wsu_8h.html
new file mode 100644
index 0000000..c122350
--- /dev/null
+++ b/doc/wsse/html/wsu_8h.html
@@ -0,0 +1,114 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

+<title>gSOAP WS-Security: /Users/engelen/Projects/gsoap/doc/wsse/wsu.h File Reference</title>

+<link href="doxygen.css" rel="stylesheet" type="text/css">

+</head><body>

+<!-- Generated by Doxygen 1.3.8 -->

+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>

+<h1>/Users/engelen/Projects/gsoap/doc/wsse/wsu.h File Reference</h1><table border=0 cellpadding=0 cellspacing=0>

+<tr><td></td></tr>

+<tr><td colspan=2><br><h2>Classes</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="struct__wsu_____timestamp.html">_wsu__Timestamp</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This element allows Timestamps to be applied anywhere element wildcards are present, including as a SOAP header. Imported element _wsu__Timestamp from typemap WS/WS-typemap.dat.  <a href="struct__wsu_____timestamp.html#_details">More...</a><br></td></tr>

+<tr><td colspan=2><br><h2>Typedefs</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef enum <a class="el" href="wsu_8h.html#a0">wsu__tTimestampFault</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsu_8h.html#a0">wsu__tTimestampFault</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Typedef synonym for enum wsu__tTimestampFault.  <a href="#a0"></a><br></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="struct__wsu_____timestamp.html">_wsu__Timestamp</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsu_8h.html#a1">_wsu__Timestamp</a></td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This element allows Timestamps to be applied anywhere element wildcards are present, including as a SOAP header. Imported element <a class="el" href="struct__wsu_____timestamp.html">_wsu__Timestamp</a> from typemap WS/WS-typemap.dat.  <a href="#a1"></a><br></td></tr>

+<tr><td colspan=2><br><h2>Enumerations</h2></td></tr>

+<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="wsu_8h.html#a3">wsu__tTimestampFault</a> { <a class="el" href="wsu_8h.html#a3a2">wsu__MessageExpired</a>

+ }</td></tr>

+

+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This type is for elements whose [children] is a psuedo-dateTime and can have arbitrary attributes. complexType definition intentionally left blank. This type is for elements whose [children] is an anyURI and can have arbitrary attributes. complexType definition intentionally left blank. This complex type ties together the timestamp related elements into a composite type. complexType definition intentionally left blank. This type defines the fault code value for Timestamp message expiration. Note: enum values are prefixed with 'wsu__tTimestampFault' to avoid name clashes, please use wsdl2h option -e to omit this prefix.  <a href="#a3">More...</a><br></td></tr>

+</table>

+<hr><h2>Typedef Documentation</h2>

+<a class="anchor" name="a1" doxytag="wsu.h::_wsu__Timestamp" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="struct__wsu_____timestamp.html">_wsu__Timestamp</a>  <a class="el" href="struct__wsu_____timestamp.html">_wsu__Timestamp</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+This element allows Timestamps to be applied anywhere element wildcards are present, including as a SOAP header. Imported element <a class="el" href="struct__wsu_____timestamp.html">_wsu__Timestamp</a> from typemap WS/WS-typemap.dat. 

+<p>

+Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd":Timestamp of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd":TimestampType.     </td>

+  </tr>

+</table>

+<a class="anchor" name="a0" doxytag="wsu.h::wsu__tTimestampFault" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> typedef enum <a class="el" href="wsu_8h.html#a0">wsu__tTimestampFault</a> <a class="el" href="wsu_8h.html#a0">wsu__tTimestampFault</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+Typedef synonym for enum wsu__tTimestampFault. 

+<p>

+    </td>

+  </tr>

+</table>

+<hr><h2>Enumeration Type Documentation</h2>

+<a class="anchor" name="a3" doxytag="wsu.h::wsu__tTimestampFault" ></a><p>

+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">

+  <tr>

+    <td class="mdRow">

+      <table cellpadding="0" cellspacing="0" border="0">

+        <tr>

+          <td class="md" nowrap valign="top"> enum <a class="el" href="wsu_8h.html#a0">wsu__tTimestampFault</a>          </td>

+        </tr>

+      </table>

+    </td>

+  </tr>

+</table>

+<table cellspacing=5 cellpadding=0 border=0>

+  <tr>

+    <td>

+      &nbsp;

+    </td>

+    <td>

+

+<p>

+This type is for elements whose [children] is a psuedo-dateTime and can have arbitrary attributes. complexType definition intentionally left blank. This type is for elements whose [children] is an anyURI and can have arbitrary attributes. complexType definition intentionally left blank. This complex type ties together the timestamp related elements into a composite type. complexType definition intentionally left blank. This type defines the fault code value for Timestamp message expiration. Note: enum values are prefixed with 'wsu__tTimestampFault' to avoid name clashes, please use wsdl2h option -e to omit this prefix. 

+<p>

+"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd":tTimestampFault is a simpleType restriction of xs:QName. <dl compact><dt><b>Enumeration values: </b></dt><dd>

+<table border=0 cellspacing=2 cellpadding=0>

+<tr><td valign=top><em><a class="anchor" name="a3a2" doxytag="wsu__MessageExpired" ></a>wsu__MessageExpired</em>&nbsp;</td><td>

+xs:QName value=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd":MessageExpired" </td></tr>

+</table>

+</dl>

+    </td>

+  </tr>

+</table>

+<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 19 10:41:45 2005 for gSOAP WS-Security by

+<a href="http://www.doxygen.org/index.html">

+<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>

+</body>

+</html>

diff --git a/dom.c b/dom.c
new file mode 100644
index 0000000..db14996
--- /dev/null
+++ b/dom.c
@@ -0,0 +1,909 @@
+/*
+
+dom.c[pp]
+
+gSOAP DOM implementation
+
+gSOAP XML Web services tools
+Copyright (C) 2001-2005, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2004 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+	Development note:
+	Reused the gSOAP struct soap id hash table for handling namespace
+	bindings when transmitting DOMs
+
+Changes:
+	Renamed __type to type (correction)
+	dom.c, dom++.cpp, and dom.cpp are equivalent
+	Renamed SOAP_XML_TREE to SOAP_DOM_TREE
+	Renamed SOAP_XML_GRAPH to SOAP_DOM_NODE
+	Added SOAP_DOM_ASIS
+
+TODO:	Improve mixed content handling
+*/
+
+#include "stdsoap2.h"
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_xsd__anyType(struct soap*, struct soap_dom_element const*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_default_xsd__anyType(struct soap*, struct soap_dom_element *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_xsd__anyType(struct soap*, const struct soap_dom_element *, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_out_xsd__anyType(struct soap*, const char*, int, const struct soap_dom_element *, const char*);
+SOAP_FMAC3 struct soap_dom_element * SOAP_FMAC4 soap_get_xsd__anyType(struct soap*, struct soap_dom_element *, const char*, const char*);
+SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_in_xsd__anyType(struct soap*, const char*, struct soap_dom_element *, const char*);
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_markelement(struct soap*, const void*, int);
+SOAP_FMAC3 int SOAP_FMAC4 soap_putelement(struct soap*, const void*, const char*, int, int);
+SOAP_FMAC3 void *SOAP_FMAC4 soap_getelement(struct soap*, int*);
+
+/* format string for generating DOM namespace prefixes (<= 16 chars total) */
+#define SOAP_DOMID_FORMAT "dom%d"
+
+/* namespace name (URI) lookup and store routines */
+static struct soap_ilist *soap_lookup_ns(struct soap*, const char*);
+static struct soap_ilist *soap_enter_ns(struct soap*, const char*, const char*);
+
+/******************************************************************************\
+ *
+ *	DOM custom (de)serializers
+ *
+\******************************************************************************/
+
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_serialize_xsd__anyType(struct soap *soap, const struct soap_dom_element *node)
+{ if (node)
+  { if (node->type && node->node)
+      soap_markelement(soap, node->node, node->type);
+    else
+    { const struct soap_dom_element *elt;
+      for (elt = node->elts; elt; elt = elt->next)
+        soap_serialize_xsd__anyType(soap, elt);
+    }
+  }
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_default_xsd__anyType(struct soap *soap, struct soap_dom_element *node)
+{ node->next = NULL;
+  node->prnt = NULL;
+  node->elts = NULL;
+  node->atts = NULL;
+  node->nstr = NULL;
+  node->name = NULL;
+  node->data = NULL;
+  node->wide = NULL;
+  node->node = NULL;
+  node->type = 0;
+  node->head = NULL;
+  node->tail = NULL;
+  node->soap = soap;
+}
+
+/******************************************************************************/
+static int 
+out_element(struct soap *soap, const struct soap_dom_element *node, const char *prefix, const char *name, const char *nstr)
+{ if (node->head && soap_send(soap, node->head))
+    return soap->error;
+  if (!prefix)
+  { if (node->type && node->node)
+      return soap_putelement(soap, node->node, name, 0, node->type);
+    return soap_element(soap, name, 0, NULL); /* element() */
+  }
+  if (node->type && node->node)
+  { char *s = (char*)SOAP_MALLOC(soap, strlen(prefix) + strlen(name) + 2);
+    if (!s)
+      return soap->error = SOAP_EOM;
+    sprintf(s, "%s:%s", prefix, name);
+    soap_putelement(soap, node->node, s, 0, node->type);
+    SOAP_FREE(soap, s);
+  }
+  else
+  { char *s;
+    if (strlen(prefix) + strlen(name) < sizeof(soap->msgbuf))
+      s = soap->msgbuf;
+    else
+    { s = (char*)SOAP_MALLOC(soap, strlen(prefix) + strlen(name) + 2);
+      if (!s)
+        return soap->error = SOAP_EOM;
+    }
+    sprintf(s, "%s:%s", prefix, name);
+    if (soap_element(soap, s, 0, NULL)) /* element() */
+      return soap->error;
+    if (nstr)
+    { sprintf(s, "xmlns:%s", prefix);
+      soap_attribute(soap, s, nstr);
+    }
+    if (s != soap->msgbuf)
+      SOAP_FREE(soap, s);
+  }
+  return soap->error;
+}
+
+/******************************************************************************/
+static int
+out_attribute(struct soap *soap, const char *prefix, const char *name, const char *data)
+{ char *s;
+  const char *t;
+  if (!prefix)
+    return soap_attribute(soap, name, data);
+  t = strchr(name, ':');
+  if (t)
+    t++;
+  else
+    t = name;
+  if (strlen(prefix) + strlen(t) < sizeof(soap->msgbuf))
+    s = soap->msgbuf;
+  else
+  { s = (char*)SOAP_MALLOC(soap, strlen(prefix) + strlen(t) + 2);
+    if (!s)
+      return soap->error = SOAP_EOM;
+  } 
+  sprintf(s, "%s:%s", prefix, t);
+  soap_attribute(soap, s, data);
+  if (s != soap->msgbuf)
+    SOAP_FREE(soap, s);
+  return soap->error;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_out_xsd__anyType(struct soap *soap, const char *tag, int id, const struct soap_dom_element *node, const char *type)
+{ if (node)
+  { register struct soap_ilist *p = NULL;
+    const char *prefix;		/* namespace prefix, if namespace is present */
+    size_t colon;
+    if (!(soap->mode & SOAP_DOM_ASIS))
+    { struct soap_dom_attribute *att;
+      for (att = node->atts; att; att = att->next)
+      { if (att->name && att->nstr)
+        { if ((prefix = strchr(att->name, ':')))
+          { colon = prefix - att->name + 1;
+            if (colon > sizeof(soap->tag))
+              colon = sizeof(soap->tag);
+	    strncpy(soap->tag, att->name, colon - 1);
+            soap->tag[colon - 1] = '\0';
+            if (!(soap_enter_ns(soap, soap->tag, att->nstr)))
+              return soap->error = SOAP_EOM;
+          }
+        }
+      }
+    }
+    if (node->name)
+      tag = node->name;
+    else if (!tag)
+      tag = "-";
+    if ((prefix = strchr(tag, ':')))
+    { colon = prefix - tag + 1;
+      if (colon > sizeof(soap->tag))
+        colon = sizeof(soap->tag);
+    }
+    else
+      colon = 0;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DOM node '%s'\n", tag));
+    prefix = NULL;
+    if (node->nstr && !(soap->mode & SOAP_DOM_ASIS))
+    { if (colon)
+      { strncpy(soap->tag, tag, colon - 1);
+        soap->tag[colon - 1] = '\0';
+        if (!(p = soap_enter_ns(soap, soap->tag, node->nstr)))
+          return soap->error = SOAP_EOM;
+        prefix = p->id;
+        if (out_element(soap, node, prefix, tag + colon, node->nstr))
+          return soap->error;
+      }
+      else
+      { struct Namespace *ns;
+        for (ns = soap->local_namespaces; ns && ns->id; ns++)
+        { if (ns->ns == node->nstr || !strcmp(ns->ns, node->nstr))
+          { /* if (soap->encodingStyle || ns == soap->local_namespaces) */
+              prefix = ns->id;
+            if (out_element(soap, node, ns->id, tag + colon, NULL))
+              return soap->error;
+            break;
+          }
+	}
+        if (!ns || !ns->id)
+        { if ((p = soap_lookup_ns(soap, node->nstr)))
+          { prefix = p->id;
+            p = NULL;
+            if (out_element(soap, node, prefix, tag + colon, NULL))
+              return soap->error;
+          }
+	  else
+          { sprintf(soap->tag, SOAP_DOMID_FORMAT, soap->idnum++);
+            if (!(p = soap_enter_ns(soap, soap->tag, node->nstr)))
+              return soap->error = SOAP_EOM;
+            prefix = p->id;
+            if (out_element(soap, node, prefix, tag + colon, node->nstr))
+              return soap->error;
+	  }
+        }
+      }
+    }
+    else
+    { colon = 0;
+      if (out_element(soap, node, NULL, tag, NULL))
+        return soap->error;
+    }
+    if (!node->type || !node->node)
+    { struct soap_dom_attribute *att;
+      for (att = node->atts; att; att = att->next)
+      { if (att->name)
+        { if (att->nstr)
+          { register struct soap_ilist *q;
+            if ((att->nstr == node->nstr || (node->nstr && !strcmp(att->nstr, node->nstr))) && prefix)
+	    { if (out_attribute(soap, prefix, att->name, att->data))
+	        return soap->error;
+	    }
+	    else if ((q = soap_lookup_ns(soap, att->nstr)))
+	    { if (out_attribute(soap, q->id, att->name, att->data))
+	        return soap->error;
+	    }
+	    else
+            { struct Namespace *ns;
+	      for (ns = soap->local_namespaces; ns && ns->id; ns++)
+              { if (ns->ns == att->nstr || !strcmp(ns->ns, att->nstr))
+	        { if (out_attribute(soap, ns->id, att->name, att->data))
+	            return soap->error;
+	          break;
+	        }
+	      }
+	      if (!ns || !ns->id)
+              { sprintf(soap->msgbuf, "xmlns:"SOAP_DOMID_FORMAT, soap->idnum++);
+	        if (soap_attribute(soap, soap->msgbuf, att->nstr))
+	          return soap->error;
+	        strcat(soap->msgbuf, ":");
+	        strcat(soap->msgbuf, att->name);
+	        if (soap_attribute(soap, soap->msgbuf + 6, att->data))
+	          return soap->error;
+              }
+            }
+          }
+	  else if (soap_attribute(soap, att->name, att->data))
+            return soap->error;
+        }
+      }
+      if (soap_element_start_end_out(soap, NULL))
+        return soap->error;
+      struct soap_dom_element *elt;
+      if (node->data)
+      { if (soap_string_out(soap, node->data, 0))
+          return soap->error;
+      }
+      else if (node->wide)
+      { if (soap_wstring_out(soap, node->wide, 0))
+          return soap->error;
+      }
+      for (elt = node->elts; elt; elt = elt->next)
+      { if (soap_out_xsd__anyType(soap, tag, 0, elt, NULL))
+          return soap->error;
+      }
+      if (node->tail && soap_send(soap, node->tail))
+        return soap->error;
+      if (!prefix)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of DOM node '%s'\n", tag + colon));
+        if (soap_element_end_out(soap, tag + colon))
+          return soap->error;
+      }
+      else
+      { char *s;
+        if (strlen(prefix) + strlen(tag + colon) < sizeof(soap->msgbuf))
+	  s = soap->msgbuf;
+	else
+	{ s = (char*)SOAP_MALLOC(soap, strlen(prefix) + strlen(tag + colon) + 2);
+          if (!s)
+            return soap->error = SOAP_EOM;
+	}
+	sprintf(s, "%s:%s", prefix, tag + colon);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of DOM node '%s'\n", s));
+        if (soap_element_end_out(soap, s))
+          return soap->error;
+        if (s != soap->msgbuf)
+	  SOAP_FREE(soap, s);
+      }
+      if (p)
+        p->level = 0; /* xmlns binding is out of scope */
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_dom_element *
+SOAP_FMAC2
+soap_in_xsd__anyType(struct soap *soap, const char *tag, struct soap_dom_element *node, const char *type)
+{ register struct soap_attribute *tp;
+  register struct soap_dom_attribute **att;
+  if (soap_peek_element(soap))
+    return NULL;
+  if (!node)
+  { if (!(node = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element))))
+    { soap->error = SOAP_EOM;
+      return NULL;
+    }
+  }
+  soap_default_xsd__anyType(soap, node);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DOM node %s\n", soap->tag));
+  node->nstr = soap_current_namespace(soap, soap->tag);
+  node->name = soap_strdup(soap, soap->tag);
+  if ((soap->mode & SOAP_DOM_NODE) || (!(soap->mode & SOAP_DOM_TREE) && *soap->id))
+  { if ((node->node = soap_getelement(soap, &node->type)))
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DOM node contains type %d from xsi:type\n", node->type));
+      return node;
+    }
+    if (soap->error == SOAP_TAG_MISMATCH)
+      soap->error = SOAP_OK;
+    else
+      return NULL;
+  }
+  att = &node->atts;
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DOM node attribute='%s'\n", tp->name));
+      *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+      if (!*att)
+      { soap->error = SOAP_EOM;
+        return NULL;
+      }
+      (*att)->next = NULL;
+      (*att)->nstr = soap_current_namespace(soap, tp->name);
+      (*att)->name = soap_strdup(soap, tp->name);
+      if (tp->visible == 2)
+        (*att)->data = soap_strdup(soap, tp->value);
+      else
+        (*att)->data = NULL;
+      (*att)->wide = NULL;
+      (*att)->soap = soap;
+      att = &(*att)->next;
+      tp->visible = 0;
+    }
+  }
+  soap_element_begin_in(soap, NULL, 1);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DOM node '%s' accepted\n", node->name));
+  if (soap->body)
+  { if (!soap_peek_element(soap))
+    { struct soap_dom_element **elt;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DOM node '%s' has subelements\n", node->name));
+      elt = &node->elts;
+      for (;;)
+      { if (!(*elt = soap_in_xsd__anyType(soap, NULL, NULL, NULL)))
+        { if (soap->error == SOAP_NO_TAG)
+            soap->error = SOAP_OK;
+          else
+            return NULL;
+          break;
+        }
+	(*elt)->prnt = node;
+        elt = &(*elt)->next;
+      }
+    }
+    else if (soap->error == SOAP_NO_TAG)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DOM node '%s' has cdata\n", node->name));
+      if ((soap->mode & SOAP_C_UTFSTRING) || (soap->mode & SOAP_C_MBSTRING))
+      { if (!(node->data = soap_string_in(soap, 1, -1, -1)))
+          return NULL;
+      }
+      else if (!(node->wide = soap_wstring_in(soap, 1, -1, -1)))
+        return NULL;
+    }
+    else
+      return NULL;
+    if (soap_element_end_in(soap, node->name))
+      return NULL;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of DOM node '%s'\n", node->name));
+  }
+  return node;
+}
+
+/******************************************************************************\
+ *
+ *	DOM traversing
+ *
+\******************************************************************************/
+
+SOAP_FMAC1
+struct soap_dom_element *
+SOAP_FMAC2
+soap_dom_next_element(struct soap_dom_element *elt)
+{ if (elt->elts)
+    return elt->elts;
+  if (elt->next)
+    return elt->next;
+  do elt = elt->prnt;
+  while (elt && !elt->next);
+  if (elt)
+    elt = elt->next;
+  return elt;
+}
+
+/******************************************************************************/
+struct soap_dom_attribute *soap_dom_next_attribute(struct soap_dom_attribute *att)
+{ return att->next;
+}
+
+/******************************************************************************\
+ *
+ *	Namespace prefix lookup/store
+ *
+\******************************************************************************/
+
+static struct soap_ilist *
+soap_lookup_ns(struct soap *soap, const char *nstr)
+{ register struct soap_ilist *ip;
+  for (ip = soap->iht[soap_hash(nstr)]; ip; ip = ip->next)
+    if (!strcmp((char*)ip->ptr, nstr) && ip->level)
+      return ip;
+  return NULL;
+}
+
+/******************************************************************************/
+static struct soap_ilist *
+soap_enter_ns(struct soap *soap, const char *prefix, const char *nstr)
+{ int h;
+  register struct soap_ilist *ip;
+  for (ip = soap->iht[soap_hash(nstr)]; ip; ip = ip->next)
+  { if (!strcmp((char*)ip->ptr, nstr) && !ip->level)
+    { strcpy(ip->id, prefix);
+      ip->level = 1;
+      return ip;
+    }
+  }
+  ip = (struct soap_ilist*)SOAP_MALLOC(soap, sizeof(struct soap_ilist) + strlen(nstr) + SOAP_TAGLEN);
+  if (ip)
+  { h = soap_hash(nstr);
+    strcpy(ip->id, prefix);
+    ip->ptr = ip->id + SOAP_TAGLEN;
+    strcpy((char*)ip->ptr, nstr);
+    ip->next = soap->iht[h];
+    soap->iht[h] = ip;
+    ip->flist = NULL;
+    ip->copy = NULL;
+    ip->level = 1;
+    return ip;
+  }
+  return NULL;
+}
+
+#ifdef __cplusplus
+
+/******************************************************************************\
+ *
+ *	soap_dom_element class
+ *
+\******************************************************************************/
+
+soap_dom_element::soap_dom_element()
+{ soap_default_xsd__anyType(NULL, this);
+}
+
+/******************************************************************************/
+soap_dom_element::soap_dom_element(struct soap *soap)
+{ soap_default_xsd__anyType(soap, this);
+}
+
+/******************************************************************************/
+soap_dom_element::soap_dom_element(struct soap *soap, const char *nstr, const char *name)
+{ soap_default_xsd__anyType(soap, this);
+  this->nstr = soap_strdup(soap, nstr);
+  this->name = soap_strdup(soap, name);
+}
+
+/******************************************************************************/
+soap_dom_element::soap_dom_element(struct soap *soap, const char *nstr, const char *name, const char *data)
+{ soap_default_xsd__anyType(soap, this);
+  this->nstr = soap_strdup(soap, nstr);
+  this->name = soap_strdup(soap, name);
+  this->data = soap_strdup(soap, data);
+}
+
+/******************************************************************************/
+soap_dom_element::soap_dom_element(struct soap *soap, const char *nstr, const char *name, void *node, int type)
+{ soap_default_xsd__anyType(soap, this);
+  this->nstr = soap_strdup(soap, nstr);
+  this->name = soap_strdup(soap, name);
+  this->node = node;
+  this->type = type;
+}
+
+/******************************************************************************/
+soap_dom_element::~soap_dom_element()
+{ }
+
+/******************************************************************************/
+soap_dom_element &soap_dom_element::set(const char *nstr, const char *name)
+{ this->nstr = soap_strdup(soap, nstr);
+  this->name = soap_strdup(soap, name);
+  return *this;
+}
+
+/******************************************************************************/
+soap_dom_element &soap_dom_element::set(const char *data)
+{ this->data = soap_strdup(soap, data);
+  return *this;
+}
+
+/******************************************************************************/
+soap_dom_element &soap_dom_element::set(void *node, int type)
+{ this->node = node;
+  this->type = type;
+  return *this;
+}
+
+/******************************************************************************/
+soap_dom_element &soap_dom_element::add(struct soap_dom_element *elt)
+{ elt->prnt = this;
+  for (struct soap_dom_element *e = elts; e; e = e->next)
+  { if (!e->next)
+    { e->next = elt;
+      return *this;
+    }
+  }
+  elts = elt;
+  return *this;
+}
+
+/******************************************************************************/
+soap_dom_element &soap_dom_element::add(struct soap_dom_element &elt)
+{ return add(&elt);
+}
+
+/******************************************************************************/
+soap_dom_element &soap_dom_element::add(struct soap_dom_attribute *att)
+{ for (struct soap_dom_attribute *a = atts; a; a = a->next)
+  { if (!a->next)
+    { a->next = att;
+      return *this;
+    }
+  }
+  atts = att;
+  return *this;
+}
+
+/******************************************************************************/
+soap_dom_element &soap_dom_element::add(struct soap_dom_attribute &att)
+{ return add(&att);
+}
+
+/******************************************************************************/
+soap_dom_element_iterator soap_dom_element::begin()
+{ soap_dom_element_iterator iter(this);
+  return iter;
+}
+
+/******************************************************************************/
+soap_dom_element_iterator soap_dom_element::end()
+{ soap_dom_element_iterator iter(NULL);
+  return iter;
+}
+
+/******************************************************************************/
+soap_dom_element_iterator soap_dom_element::find(const char *nstr, const char *name)
+{ soap_dom_element_iterator iter(this);
+  iter.nstr = nstr;
+  iter.name = name;
+  if (name && soap_tag_cmp(this->name, name))
+    return ++iter;
+  if (nstr && this->nstr && soap_tag_cmp(this->nstr, nstr))
+    return ++iter;
+  return iter;
+}
+
+/******************************************************************************/
+soap_dom_element_iterator soap_dom_element::find(int type)
+{ soap_dom_element_iterator iter(this);
+  iter.type = type;
+  if (this->type != type)
+    return ++iter;
+  return iter;
+}
+
+/******************************************************************************/
+void soap_dom_element::unlink()
+{ soap_unlink(soap, this);
+  soap_unlink(soap, nstr);
+  soap_unlink(soap, name);
+  soap_unlink(soap, data);
+  soap_unlink(soap, wide);
+  if (elts)
+    elts->unlink();
+  if (atts)
+    elts->unlink();
+  if (next)
+    next->unlink();
+  node = NULL;
+  type = 0;
+}
+
+/******************************************************************************\
+ *
+ *	soap_dom_attribute class
+ *
+\******************************************************************************/
+
+soap_dom_attribute::soap_dom_attribute()
+{ this->soap = NULL;
+  this->next = NULL;
+  this->nstr = NULL;
+  this->name = NULL;
+  this->data = NULL;
+  this->wide = NULL;
+}
+
+/******************************************************************************/
+soap_dom_attribute::soap_dom_attribute(struct soap *soap)
+{ this->soap = soap;
+  this->next = NULL;
+  this->nstr = NULL;
+  this->name = NULL;
+  this->data = NULL;
+  this->wide = NULL;
+}
+
+/******************************************************************************/
+soap_dom_attribute::soap_dom_attribute(struct soap *soap, const char *nstr, const char *name, const char *data)
+{ this->soap = soap;
+  this->next = NULL;
+  this->nstr = soap_strdup(soap, nstr);
+  this->name = soap_strdup(soap, name);
+  this->data = soap_strdup(soap, data);
+  this->wide = NULL;
+}
+
+/******************************************************************************/
+soap_dom_attribute::~soap_dom_attribute()
+{ }
+
+/******************************************************************************/
+soap_dom_attribute_iterator soap_dom_attribute::begin()
+{ soap_dom_attribute_iterator iter(this);
+  return iter;
+}
+
+/******************************************************************************/
+soap_dom_attribute_iterator soap_dom_attribute::end()
+{ soap_dom_attribute_iterator iter(NULL);
+  return iter;
+}
+
+/******************************************************************************/
+soap_dom_attribute_iterator soap_dom_attribute::find(const char *nstr, const char *name)
+{ soap_dom_attribute_iterator iter(this);
+  iter.nstr = nstr;
+  iter.name = name;
+  if (name && soap_tag_cmp(this->name, name))
+    return ++iter;
+  if (nstr && this->nstr && soap_tag_cmp(this->nstr, nstr))
+    return ++iter;
+  return iter;
+}
+
+/******************************************************************************/
+void soap_dom_attribute::unlink()
+{ soap_unlink(soap, this);
+  soap_unlink(soap, nstr);
+  soap_unlink(soap, name);
+  soap_unlink(soap, data);
+  soap_unlink(soap, wide);
+  if (next)
+    next->unlink();
+}
+
+/******************************************************************************\
+ *
+ *	soap_dom_element_iterator class
+ *
+\******************************************************************************/
+
+soap_dom_element_iterator::soap_dom_element_iterator()
+{ elt = NULL;
+  nstr = NULL;
+  name = NULL;
+  type = 0;
+}
+
+/******************************************************************************/
+soap_dom_element_iterator::soap_dom_element_iterator(struct soap_dom_element *elt)
+{ this->elt = elt;
+  nstr = NULL;
+  name = NULL;
+  type = 0;
+}
+
+/******************************************************************************/
+soap_dom_element_iterator::~soap_dom_element_iterator()
+{ }
+
+/******************************************************************************/
+bool soap_dom_element_iterator::operator==(const soap_dom_element_iterator &iter) const
+{ return this->elt == iter.elt;
+}
+
+/******************************************************************************/
+bool soap_dom_element_iterator::operator!=(const soap_dom_element_iterator &iter) const
+{ return this->elt != iter.elt;
+}
+
+/******************************************************************************/
+struct soap_dom_element &soap_dom_element_iterator::operator*() const
+{ return *this->elt;
+}
+
+/******************************************************************************/
+soap_dom_element_iterator &soap_dom_element_iterator::operator++()
+{ while (elt)
+  { elt = soap_dom_next_element(elt);
+    if (!elt)
+      break;
+    if (name && elt->name)
+    { if (!soap_tag_cmp(elt->name, name))
+      { if (nstr && elt->nstr)
+        { if (!soap_tag_cmp(elt->nstr, nstr))
+	    break;
+        }
+        else
+          break;
+      }
+    }
+    else if (type)
+    { if (elt->type == type)
+        break;
+    }
+    else
+      break;
+  }
+  return *this;
+}
+
+/******************************************************************************\
+ *
+ *	soap_dom_attribute_iterator class
+ *
+\******************************************************************************/
+
+soap_dom_attribute_iterator::soap_dom_attribute_iterator()
+{ att = NULL;
+  nstr = NULL;
+  name = NULL;
+}
+
+/******************************************************************************/
+soap_dom_attribute_iterator::soap_dom_attribute_iterator(struct soap_dom_attribute *att)
+{ this->att = att;
+  nstr = NULL;
+  name = NULL;
+}
+
+/******************************************************************************/
+soap_dom_attribute_iterator::~soap_dom_attribute_iterator()
+{ }
+
+/******************************************************************************/
+bool soap_dom_attribute_iterator::operator==(const soap_dom_attribute_iterator &iter) const
+{ return this->att == iter.att;
+}
+
+/******************************************************************************/
+bool soap_dom_attribute_iterator::operator!=(const soap_dom_attribute_iterator &iter) const
+{ return this->att != iter.att;
+}
+
+/******************************************************************************/
+struct soap_dom_attribute &soap_dom_attribute_iterator::operator*() const
+{ return *this->att;
+}
+
+/******************************************************************************/
+soap_dom_attribute_iterator &soap_dom_attribute_iterator::operator++()
+{ while (att)
+  { att = soap_dom_next_attribute(att);
+    if (!att)
+      break;
+    if (name && att->name)
+    { if (!soap_tag_cmp(att->name, name))
+      { if (nstr && att->nstr)
+        { if (!soap_tag_cmp(att->nstr, nstr))
+	    break;
+        }
+        else
+          break;
+      }
+    }
+    else
+      break;
+  }
+  return *this;
+}
+
+/******************************************************************************\
+ *
+ *	I/O
+ *
+\******************************************************************************/
+
+#ifndef UNDER_CE
+
+std::ostream &operator<<(std::ostream &o, const struct soap_dom_element &e)
+{ if (!e.soap)
+  { struct soap soap;
+    soap_init2(&soap, SOAP_IO_DEFAULT, SOAP_XML_GRAPH);
+    soap_serialize_xsd__anyType(&soap, &e);
+    soap_begin_send(&soap);
+    soap_out_xsd__anyType(&soap, NULL, 0, &e, NULL);
+    soap_end_send(&soap);
+    soap_end(&soap);
+    soap_done(&soap);
+  }
+  else
+  { std::ostream *os = e.soap->os;
+    e.soap->os = &o;
+    short omode = e.soap->omode;
+    soap_set_omode(e.soap, SOAP_XML_GRAPH);
+    soap_serialize_xsd__anyType(e.soap, &e);
+    soap_begin_send(e.soap);
+    soap_out_xsd__anyType(e.soap, NULL, 0, &e, NULL);
+    soap_end_send(e.soap);
+    e.soap->os = os;
+    e.soap->omode = omode;
+  }
+  return o;
+}
+
+/******************************************************************************/
+std::istream &operator>>(std::istream &i, struct soap_dom_element &e)
+{ if (!e.soap)
+    e.soap = soap_new();
+  std::istream *is = e.soap->is;
+  e.soap->is = &i;
+  if (soap_begin_recv(e.soap)
+   || !soap_in_xsd__anyType(e.soap, NULL, &e, NULL)
+   || soap_end_recv(e.soap))
+    ; /* handle error? Note: e.soap->error is set and app should check */
+  e.soap->is = is;
+  return i;
+}
+
+#endif
+
+#endif
diff --git a/dom.cpp b/dom.cpp
new file mode 100644
index 0000000..db14996
--- /dev/null
+++ b/dom.cpp
@@ -0,0 +1,909 @@
+/*
+
+dom.c[pp]
+
+gSOAP DOM implementation
+
+gSOAP XML Web services tools
+Copyright (C) 2001-2005, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2004 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+	Development note:
+	Reused the gSOAP struct soap id hash table for handling namespace
+	bindings when transmitting DOMs
+
+Changes:
+	Renamed __type to type (correction)
+	dom.c, dom++.cpp, and dom.cpp are equivalent
+	Renamed SOAP_XML_TREE to SOAP_DOM_TREE
+	Renamed SOAP_XML_GRAPH to SOAP_DOM_NODE
+	Added SOAP_DOM_ASIS
+
+TODO:	Improve mixed content handling
+*/
+
+#include "stdsoap2.h"
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_xsd__anyType(struct soap*, struct soap_dom_element const*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_default_xsd__anyType(struct soap*, struct soap_dom_element *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_xsd__anyType(struct soap*, const struct soap_dom_element *, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_out_xsd__anyType(struct soap*, const char*, int, const struct soap_dom_element *, const char*);
+SOAP_FMAC3 struct soap_dom_element * SOAP_FMAC4 soap_get_xsd__anyType(struct soap*, struct soap_dom_element *, const char*, const char*);
+SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_in_xsd__anyType(struct soap*, const char*, struct soap_dom_element *, const char*);
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_markelement(struct soap*, const void*, int);
+SOAP_FMAC3 int SOAP_FMAC4 soap_putelement(struct soap*, const void*, const char*, int, int);
+SOAP_FMAC3 void *SOAP_FMAC4 soap_getelement(struct soap*, int*);
+
+/* format string for generating DOM namespace prefixes (<= 16 chars total) */
+#define SOAP_DOMID_FORMAT "dom%d"
+
+/* namespace name (URI) lookup and store routines */
+static struct soap_ilist *soap_lookup_ns(struct soap*, const char*);
+static struct soap_ilist *soap_enter_ns(struct soap*, const char*, const char*);
+
+/******************************************************************************\
+ *
+ *	DOM custom (de)serializers
+ *
+\******************************************************************************/
+
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_serialize_xsd__anyType(struct soap *soap, const struct soap_dom_element *node)
+{ if (node)
+  { if (node->type && node->node)
+      soap_markelement(soap, node->node, node->type);
+    else
+    { const struct soap_dom_element *elt;
+      for (elt = node->elts; elt; elt = elt->next)
+        soap_serialize_xsd__anyType(soap, elt);
+    }
+  }
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_default_xsd__anyType(struct soap *soap, struct soap_dom_element *node)
+{ node->next = NULL;
+  node->prnt = NULL;
+  node->elts = NULL;
+  node->atts = NULL;
+  node->nstr = NULL;
+  node->name = NULL;
+  node->data = NULL;
+  node->wide = NULL;
+  node->node = NULL;
+  node->type = 0;
+  node->head = NULL;
+  node->tail = NULL;
+  node->soap = soap;
+}
+
+/******************************************************************************/
+static int 
+out_element(struct soap *soap, const struct soap_dom_element *node, const char *prefix, const char *name, const char *nstr)
+{ if (node->head && soap_send(soap, node->head))
+    return soap->error;
+  if (!prefix)
+  { if (node->type && node->node)
+      return soap_putelement(soap, node->node, name, 0, node->type);
+    return soap_element(soap, name, 0, NULL); /* element() */
+  }
+  if (node->type && node->node)
+  { char *s = (char*)SOAP_MALLOC(soap, strlen(prefix) + strlen(name) + 2);
+    if (!s)
+      return soap->error = SOAP_EOM;
+    sprintf(s, "%s:%s", prefix, name);
+    soap_putelement(soap, node->node, s, 0, node->type);
+    SOAP_FREE(soap, s);
+  }
+  else
+  { char *s;
+    if (strlen(prefix) + strlen(name) < sizeof(soap->msgbuf))
+      s = soap->msgbuf;
+    else
+    { s = (char*)SOAP_MALLOC(soap, strlen(prefix) + strlen(name) + 2);
+      if (!s)
+        return soap->error = SOAP_EOM;
+    }
+    sprintf(s, "%s:%s", prefix, name);
+    if (soap_element(soap, s, 0, NULL)) /* element() */
+      return soap->error;
+    if (nstr)
+    { sprintf(s, "xmlns:%s", prefix);
+      soap_attribute(soap, s, nstr);
+    }
+    if (s != soap->msgbuf)
+      SOAP_FREE(soap, s);
+  }
+  return soap->error;
+}
+
+/******************************************************************************/
+static int
+out_attribute(struct soap *soap, const char *prefix, const char *name, const char *data)
+{ char *s;
+  const char *t;
+  if (!prefix)
+    return soap_attribute(soap, name, data);
+  t = strchr(name, ':');
+  if (t)
+    t++;
+  else
+    t = name;
+  if (strlen(prefix) + strlen(t) < sizeof(soap->msgbuf))
+    s = soap->msgbuf;
+  else
+  { s = (char*)SOAP_MALLOC(soap, strlen(prefix) + strlen(t) + 2);
+    if (!s)
+      return soap->error = SOAP_EOM;
+  } 
+  sprintf(s, "%s:%s", prefix, t);
+  soap_attribute(soap, s, data);
+  if (s != soap->msgbuf)
+    SOAP_FREE(soap, s);
+  return soap->error;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_out_xsd__anyType(struct soap *soap, const char *tag, int id, const struct soap_dom_element *node, const char *type)
+{ if (node)
+  { register struct soap_ilist *p = NULL;
+    const char *prefix;		/* namespace prefix, if namespace is present */
+    size_t colon;
+    if (!(soap->mode & SOAP_DOM_ASIS))
+    { struct soap_dom_attribute *att;
+      for (att = node->atts; att; att = att->next)
+      { if (att->name && att->nstr)
+        { if ((prefix = strchr(att->name, ':')))
+          { colon = prefix - att->name + 1;
+            if (colon > sizeof(soap->tag))
+              colon = sizeof(soap->tag);
+	    strncpy(soap->tag, att->name, colon - 1);
+            soap->tag[colon - 1] = '\0';
+            if (!(soap_enter_ns(soap, soap->tag, att->nstr)))
+              return soap->error = SOAP_EOM;
+          }
+        }
+      }
+    }
+    if (node->name)
+      tag = node->name;
+    else if (!tag)
+      tag = "-";
+    if ((prefix = strchr(tag, ':')))
+    { colon = prefix - tag + 1;
+      if (colon > sizeof(soap->tag))
+        colon = sizeof(soap->tag);
+    }
+    else
+      colon = 0;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DOM node '%s'\n", tag));
+    prefix = NULL;
+    if (node->nstr && !(soap->mode & SOAP_DOM_ASIS))
+    { if (colon)
+      { strncpy(soap->tag, tag, colon - 1);
+        soap->tag[colon - 1] = '\0';
+        if (!(p = soap_enter_ns(soap, soap->tag, node->nstr)))
+          return soap->error = SOAP_EOM;
+        prefix = p->id;
+        if (out_element(soap, node, prefix, tag + colon, node->nstr))
+          return soap->error;
+      }
+      else
+      { struct Namespace *ns;
+        for (ns = soap->local_namespaces; ns && ns->id; ns++)
+        { if (ns->ns == node->nstr || !strcmp(ns->ns, node->nstr))
+          { /* if (soap->encodingStyle || ns == soap->local_namespaces) */
+              prefix = ns->id;
+            if (out_element(soap, node, ns->id, tag + colon, NULL))
+              return soap->error;
+            break;
+          }
+	}
+        if (!ns || !ns->id)
+        { if ((p = soap_lookup_ns(soap, node->nstr)))
+          { prefix = p->id;
+            p = NULL;
+            if (out_element(soap, node, prefix, tag + colon, NULL))
+              return soap->error;
+          }
+	  else
+          { sprintf(soap->tag, SOAP_DOMID_FORMAT, soap->idnum++);
+            if (!(p = soap_enter_ns(soap, soap->tag, node->nstr)))
+              return soap->error = SOAP_EOM;
+            prefix = p->id;
+            if (out_element(soap, node, prefix, tag + colon, node->nstr))
+              return soap->error;
+	  }
+        }
+      }
+    }
+    else
+    { colon = 0;
+      if (out_element(soap, node, NULL, tag, NULL))
+        return soap->error;
+    }
+    if (!node->type || !node->node)
+    { struct soap_dom_attribute *att;
+      for (att = node->atts; att; att = att->next)
+      { if (att->name)
+        { if (att->nstr)
+          { register struct soap_ilist *q;
+            if ((att->nstr == node->nstr || (node->nstr && !strcmp(att->nstr, node->nstr))) && prefix)
+	    { if (out_attribute(soap, prefix, att->name, att->data))
+	        return soap->error;
+	    }
+	    else if ((q = soap_lookup_ns(soap, att->nstr)))
+	    { if (out_attribute(soap, q->id, att->name, att->data))
+	        return soap->error;
+	    }
+	    else
+            { struct Namespace *ns;
+	      for (ns = soap->local_namespaces; ns && ns->id; ns++)
+              { if (ns->ns == att->nstr || !strcmp(ns->ns, att->nstr))
+	        { if (out_attribute(soap, ns->id, att->name, att->data))
+	            return soap->error;
+	          break;
+	        }
+	      }
+	      if (!ns || !ns->id)
+              { sprintf(soap->msgbuf, "xmlns:"SOAP_DOMID_FORMAT, soap->idnum++);
+	        if (soap_attribute(soap, soap->msgbuf, att->nstr))
+	          return soap->error;
+	        strcat(soap->msgbuf, ":");
+	        strcat(soap->msgbuf, att->name);
+	        if (soap_attribute(soap, soap->msgbuf + 6, att->data))
+	          return soap->error;
+              }
+            }
+          }
+	  else if (soap_attribute(soap, att->name, att->data))
+            return soap->error;
+        }
+      }
+      if (soap_element_start_end_out(soap, NULL))
+        return soap->error;
+      struct soap_dom_element *elt;
+      if (node->data)
+      { if (soap_string_out(soap, node->data, 0))
+          return soap->error;
+      }
+      else if (node->wide)
+      { if (soap_wstring_out(soap, node->wide, 0))
+          return soap->error;
+      }
+      for (elt = node->elts; elt; elt = elt->next)
+      { if (soap_out_xsd__anyType(soap, tag, 0, elt, NULL))
+          return soap->error;
+      }
+      if (node->tail && soap_send(soap, node->tail))
+        return soap->error;
+      if (!prefix)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of DOM node '%s'\n", tag + colon));
+        if (soap_element_end_out(soap, tag + colon))
+          return soap->error;
+      }
+      else
+      { char *s;
+        if (strlen(prefix) + strlen(tag + colon) < sizeof(soap->msgbuf))
+	  s = soap->msgbuf;
+	else
+	{ s = (char*)SOAP_MALLOC(soap, strlen(prefix) + strlen(tag + colon) + 2);
+          if (!s)
+            return soap->error = SOAP_EOM;
+	}
+	sprintf(s, "%s:%s", prefix, tag + colon);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of DOM node '%s'\n", s));
+        if (soap_element_end_out(soap, s))
+          return soap->error;
+        if (s != soap->msgbuf)
+	  SOAP_FREE(soap, s);
+      }
+      if (p)
+        p->level = 0; /* xmlns binding is out of scope */
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_dom_element *
+SOAP_FMAC2
+soap_in_xsd__anyType(struct soap *soap, const char *tag, struct soap_dom_element *node, const char *type)
+{ register struct soap_attribute *tp;
+  register struct soap_dom_attribute **att;
+  if (soap_peek_element(soap))
+    return NULL;
+  if (!node)
+  { if (!(node = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element))))
+    { soap->error = SOAP_EOM;
+      return NULL;
+    }
+  }
+  soap_default_xsd__anyType(soap, node);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DOM node %s\n", soap->tag));
+  node->nstr = soap_current_namespace(soap, soap->tag);
+  node->name = soap_strdup(soap, soap->tag);
+  if ((soap->mode & SOAP_DOM_NODE) || (!(soap->mode & SOAP_DOM_TREE) && *soap->id))
+  { if ((node->node = soap_getelement(soap, &node->type)))
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DOM node contains type %d from xsi:type\n", node->type));
+      return node;
+    }
+    if (soap->error == SOAP_TAG_MISMATCH)
+      soap->error = SOAP_OK;
+    else
+      return NULL;
+  }
+  att = &node->atts;
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DOM node attribute='%s'\n", tp->name));
+      *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+      if (!*att)
+      { soap->error = SOAP_EOM;
+        return NULL;
+      }
+      (*att)->next = NULL;
+      (*att)->nstr = soap_current_namespace(soap, tp->name);
+      (*att)->name = soap_strdup(soap, tp->name);
+      if (tp->visible == 2)
+        (*att)->data = soap_strdup(soap, tp->value);
+      else
+        (*att)->data = NULL;
+      (*att)->wide = NULL;
+      (*att)->soap = soap;
+      att = &(*att)->next;
+      tp->visible = 0;
+    }
+  }
+  soap_element_begin_in(soap, NULL, 1);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DOM node '%s' accepted\n", node->name));
+  if (soap->body)
+  { if (!soap_peek_element(soap))
+    { struct soap_dom_element **elt;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DOM node '%s' has subelements\n", node->name));
+      elt = &node->elts;
+      for (;;)
+      { if (!(*elt = soap_in_xsd__anyType(soap, NULL, NULL, NULL)))
+        { if (soap->error == SOAP_NO_TAG)
+            soap->error = SOAP_OK;
+          else
+            return NULL;
+          break;
+        }
+	(*elt)->prnt = node;
+        elt = &(*elt)->next;
+      }
+    }
+    else if (soap->error == SOAP_NO_TAG)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DOM node '%s' has cdata\n", node->name));
+      if ((soap->mode & SOAP_C_UTFSTRING) || (soap->mode & SOAP_C_MBSTRING))
+      { if (!(node->data = soap_string_in(soap, 1, -1, -1)))
+          return NULL;
+      }
+      else if (!(node->wide = soap_wstring_in(soap, 1, -1, -1)))
+        return NULL;
+    }
+    else
+      return NULL;
+    if (soap_element_end_in(soap, node->name))
+      return NULL;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of DOM node '%s'\n", node->name));
+  }
+  return node;
+}
+
+/******************************************************************************\
+ *
+ *	DOM traversing
+ *
+\******************************************************************************/
+
+SOAP_FMAC1
+struct soap_dom_element *
+SOAP_FMAC2
+soap_dom_next_element(struct soap_dom_element *elt)
+{ if (elt->elts)
+    return elt->elts;
+  if (elt->next)
+    return elt->next;
+  do elt = elt->prnt;
+  while (elt && !elt->next);
+  if (elt)
+    elt = elt->next;
+  return elt;
+}
+
+/******************************************************************************/
+struct soap_dom_attribute *soap_dom_next_attribute(struct soap_dom_attribute *att)
+{ return att->next;
+}
+
+/******************************************************************************\
+ *
+ *	Namespace prefix lookup/store
+ *
+\******************************************************************************/
+
+static struct soap_ilist *
+soap_lookup_ns(struct soap *soap, const char *nstr)
+{ register struct soap_ilist *ip;
+  for (ip = soap->iht[soap_hash(nstr)]; ip; ip = ip->next)
+    if (!strcmp((char*)ip->ptr, nstr) && ip->level)
+      return ip;
+  return NULL;
+}
+
+/******************************************************************************/
+static struct soap_ilist *
+soap_enter_ns(struct soap *soap, const char *prefix, const char *nstr)
+{ int h;
+  register struct soap_ilist *ip;
+  for (ip = soap->iht[soap_hash(nstr)]; ip; ip = ip->next)
+  { if (!strcmp((char*)ip->ptr, nstr) && !ip->level)
+    { strcpy(ip->id, prefix);
+      ip->level = 1;
+      return ip;
+    }
+  }
+  ip = (struct soap_ilist*)SOAP_MALLOC(soap, sizeof(struct soap_ilist) + strlen(nstr) + SOAP_TAGLEN);
+  if (ip)
+  { h = soap_hash(nstr);
+    strcpy(ip->id, prefix);
+    ip->ptr = ip->id + SOAP_TAGLEN;
+    strcpy((char*)ip->ptr, nstr);
+    ip->next = soap->iht[h];
+    soap->iht[h] = ip;
+    ip->flist = NULL;
+    ip->copy = NULL;
+    ip->level = 1;
+    return ip;
+  }
+  return NULL;
+}
+
+#ifdef __cplusplus
+
+/******************************************************************************\
+ *
+ *	soap_dom_element class
+ *
+\******************************************************************************/
+
+soap_dom_element::soap_dom_element()
+{ soap_default_xsd__anyType(NULL, this);
+}
+
+/******************************************************************************/
+soap_dom_element::soap_dom_element(struct soap *soap)
+{ soap_default_xsd__anyType(soap, this);
+}
+
+/******************************************************************************/
+soap_dom_element::soap_dom_element(struct soap *soap, const char *nstr, const char *name)
+{ soap_default_xsd__anyType(soap, this);
+  this->nstr = soap_strdup(soap, nstr);
+  this->name = soap_strdup(soap, name);
+}
+
+/******************************************************************************/
+soap_dom_element::soap_dom_element(struct soap *soap, const char *nstr, const char *name, const char *data)
+{ soap_default_xsd__anyType(soap, this);
+  this->nstr = soap_strdup(soap, nstr);
+  this->name = soap_strdup(soap, name);
+  this->data = soap_strdup(soap, data);
+}
+
+/******************************************************************************/
+soap_dom_element::soap_dom_element(struct soap *soap, const char *nstr, const char *name, void *node, int type)
+{ soap_default_xsd__anyType(soap, this);
+  this->nstr = soap_strdup(soap, nstr);
+  this->name = soap_strdup(soap, name);
+  this->node = node;
+  this->type = type;
+}
+
+/******************************************************************************/
+soap_dom_element::~soap_dom_element()
+{ }
+
+/******************************************************************************/
+soap_dom_element &soap_dom_element::set(const char *nstr, const char *name)
+{ this->nstr = soap_strdup(soap, nstr);
+  this->name = soap_strdup(soap, name);
+  return *this;
+}
+
+/******************************************************************************/
+soap_dom_element &soap_dom_element::set(const char *data)
+{ this->data = soap_strdup(soap, data);
+  return *this;
+}
+
+/******************************************************************************/
+soap_dom_element &soap_dom_element::set(void *node, int type)
+{ this->node = node;
+  this->type = type;
+  return *this;
+}
+
+/******************************************************************************/
+soap_dom_element &soap_dom_element::add(struct soap_dom_element *elt)
+{ elt->prnt = this;
+  for (struct soap_dom_element *e = elts; e; e = e->next)
+  { if (!e->next)
+    { e->next = elt;
+      return *this;
+    }
+  }
+  elts = elt;
+  return *this;
+}
+
+/******************************************************************************/
+soap_dom_element &soap_dom_element::add(struct soap_dom_element &elt)
+{ return add(&elt);
+}
+
+/******************************************************************************/
+soap_dom_element &soap_dom_element::add(struct soap_dom_attribute *att)
+{ for (struct soap_dom_attribute *a = atts; a; a = a->next)
+  { if (!a->next)
+    { a->next = att;
+      return *this;
+    }
+  }
+  atts = att;
+  return *this;
+}
+
+/******************************************************************************/
+soap_dom_element &soap_dom_element::add(struct soap_dom_attribute &att)
+{ return add(&att);
+}
+
+/******************************************************************************/
+soap_dom_element_iterator soap_dom_element::begin()
+{ soap_dom_element_iterator iter(this);
+  return iter;
+}
+
+/******************************************************************************/
+soap_dom_element_iterator soap_dom_element::end()
+{ soap_dom_element_iterator iter(NULL);
+  return iter;
+}
+
+/******************************************************************************/
+soap_dom_element_iterator soap_dom_element::find(const char *nstr, const char *name)
+{ soap_dom_element_iterator iter(this);
+  iter.nstr = nstr;
+  iter.name = name;
+  if (name && soap_tag_cmp(this->name, name))
+    return ++iter;
+  if (nstr && this->nstr && soap_tag_cmp(this->nstr, nstr))
+    return ++iter;
+  return iter;
+}
+
+/******************************************************************************/
+soap_dom_element_iterator soap_dom_element::find(int type)
+{ soap_dom_element_iterator iter(this);
+  iter.type = type;
+  if (this->type != type)
+    return ++iter;
+  return iter;
+}
+
+/******************************************************************************/
+void soap_dom_element::unlink()
+{ soap_unlink(soap, this);
+  soap_unlink(soap, nstr);
+  soap_unlink(soap, name);
+  soap_unlink(soap, data);
+  soap_unlink(soap, wide);
+  if (elts)
+    elts->unlink();
+  if (atts)
+    elts->unlink();
+  if (next)
+    next->unlink();
+  node = NULL;
+  type = 0;
+}
+
+/******************************************************************************\
+ *
+ *	soap_dom_attribute class
+ *
+\******************************************************************************/
+
+soap_dom_attribute::soap_dom_attribute()
+{ this->soap = NULL;
+  this->next = NULL;
+  this->nstr = NULL;
+  this->name = NULL;
+  this->data = NULL;
+  this->wide = NULL;
+}
+
+/******************************************************************************/
+soap_dom_attribute::soap_dom_attribute(struct soap *soap)
+{ this->soap = soap;
+  this->next = NULL;
+  this->nstr = NULL;
+  this->name = NULL;
+  this->data = NULL;
+  this->wide = NULL;
+}
+
+/******************************************************************************/
+soap_dom_attribute::soap_dom_attribute(struct soap *soap, const char *nstr, const char *name, const char *data)
+{ this->soap = soap;
+  this->next = NULL;
+  this->nstr = soap_strdup(soap, nstr);
+  this->name = soap_strdup(soap, name);
+  this->data = soap_strdup(soap, data);
+  this->wide = NULL;
+}
+
+/******************************************************************************/
+soap_dom_attribute::~soap_dom_attribute()
+{ }
+
+/******************************************************************************/
+soap_dom_attribute_iterator soap_dom_attribute::begin()
+{ soap_dom_attribute_iterator iter(this);
+  return iter;
+}
+
+/******************************************************************************/
+soap_dom_attribute_iterator soap_dom_attribute::end()
+{ soap_dom_attribute_iterator iter(NULL);
+  return iter;
+}
+
+/******************************************************************************/
+soap_dom_attribute_iterator soap_dom_attribute::find(const char *nstr, const char *name)
+{ soap_dom_attribute_iterator iter(this);
+  iter.nstr = nstr;
+  iter.name = name;
+  if (name && soap_tag_cmp(this->name, name))
+    return ++iter;
+  if (nstr && this->nstr && soap_tag_cmp(this->nstr, nstr))
+    return ++iter;
+  return iter;
+}
+
+/******************************************************************************/
+void soap_dom_attribute::unlink()
+{ soap_unlink(soap, this);
+  soap_unlink(soap, nstr);
+  soap_unlink(soap, name);
+  soap_unlink(soap, data);
+  soap_unlink(soap, wide);
+  if (next)
+    next->unlink();
+}
+
+/******************************************************************************\
+ *
+ *	soap_dom_element_iterator class
+ *
+\******************************************************************************/
+
+soap_dom_element_iterator::soap_dom_element_iterator()
+{ elt = NULL;
+  nstr = NULL;
+  name = NULL;
+  type = 0;
+}
+
+/******************************************************************************/
+soap_dom_element_iterator::soap_dom_element_iterator(struct soap_dom_element *elt)
+{ this->elt = elt;
+  nstr = NULL;
+  name = NULL;
+  type = 0;
+}
+
+/******************************************************************************/
+soap_dom_element_iterator::~soap_dom_element_iterator()
+{ }
+
+/******************************************************************************/
+bool soap_dom_element_iterator::operator==(const soap_dom_element_iterator &iter) const
+{ return this->elt == iter.elt;
+}
+
+/******************************************************************************/
+bool soap_dom_element_iterator::operator!=(const soap_dom_element_iterator &iter) const
+{ return this->elt != iter.elt;
+}
+
+/******************************************************************************/
+struct soap_dom_element &soap_dom_element_iterator::operator*() const
+{ return *this->elt;
+}
+
+/******************************************************************************/
+soap_dom_element_iterator &soap_dom_element_iterator::operator++()
+{ while (elt)
+  { elt = soap_dom_next_element(elt);
+    if (!elt)
+      break;
+    if (name && elt->name)
+    { if (!soap_tag_cmp(elt->name, name))
+      { if (nstr && elt->nstr)
+        { if (!soap_tag_cmp(elt->nstr, nstr))
+	    break;
+        }
+        else
+          break;
+      }
+    }
+    else if (type)
+    { if (elt->type == type)
+        break;
+    }
+    else
+      break;
+  }
+  return *this;
+}
+
+/******************************************************************************\
+ *
+ *	soap_dom_attribute_iterator class
+ *
+\******************************************************************************/
+
+soap_dom_attribute_iterator::soap_dom_attribute_iterator()
+{ att = NULL;
+  nstr = NULL;
+  name = NULL;
+}
+
+/******************************************************************************/
+soap_dom_attribute_iterator::soap_dom_attribute_iterator(struct soap_dom_attribute *att)
+{ this->att = att;
+  nstr = NULL;
+  name = NULL;
+}
+
+/******************************************************************************/
+soap_dom_attribute_iterator::~soap_dom_attribute_iterator()
+{ }
+
+/******************************************************************************/
+bool soap_dom_attribute_iterator::operator==(const soap_dom_attribute_iterator &iter) const
+{ return this->att == iter.att;
+}
+
+/******************************************************************************/
+bool soap_dom_attribute_iterator::operator!=(const soap_dom_attribute_iterator &iter) const
+{ return this->att != iter.att;
+}
+
+/******************************************************************************/
+struct soap_dom_attribute &soap_dom_attribute_iterator::operator*() const
+{ return *this->att;
+}
+
+/******************************************************************************/
+soap_dom_attribute_iterator &soap_dom_attribute_iterator::operator++()
+{ while (att)
+  { att = soap_dom_next_attribute(att);
+    if (!att)
+      break;
+    if (name && att->name)
+    { if (!soap_tag_cmp(att->name, name))
+      { if (nstr && att->nstr)
+        { if (!soap_tag_cmp(att->nstr, nstr))
+	    break;
+        }
+        else
+          break;
+      }
+    }
+    else
+      break;
+  }
+  return *this;
+}
+
+/******************************************************************************\
+ *
+ *	I/O
+ *
+\******************************************************************************/
+
+#ifndef UNDER_CE
+
+std::ostream &operator<<(std::ostream &o, const struct soap_dom_element &e)
+{ if (!e.soap)
+  { struct soap soap;
+    soap_init2(&soap, SOAP_IO_DEFAULT, SOAP_XML_GRAPH);
+    soap_serialize_xsd__anyType(&soap, &e);
+    soap_begin_send(&soap);
+    soap_out_xsd__anyType(&soap, NULL, 0, &e, NULL);
+    soap_end_send(&soap);
+    soap_end(&soap);
+    soap_done(&soap);
+  }
+  else
+  { std::ostream *os = e.soap->os;
+    e.soap->os = &o;
+    short omode = e.soap->omode;
+    soap_set_omode(e.soap, SOAP_XML_GRAPH);
+    soap_serialize_xsd__anyType(e.soap, &e);
+    soap_begin_send(e.soap);
+    soap_out_xsd__anyType(e.soap, NULL, 0, &e, NULL);
+    soap_end_send(e.soap);
+    e.soap->os = os;
+    e.soap->omode = omode;
+  }
+  return o;
+}
+
+/******************************************************************************/
+std::istream &operator>>(std::istream &i, struct soap_dom_element &e)
+{ if (!e.soap)
+    e.soap = soap_new();
+  std::istream *is = e.soap->is;
+  e.soap->is = &i;
+  if (soap_begin_recv(e.soap)
+   || !soap_in_xsd__anyType(e.soap, NULL, &e, NULL)
+   || soap_end_recv(e.soap))
+    ; /* handle error? Note: e.soap->error is set and app should check */
+  e.soap->is = is;
+  return i;
+}
+
+#endif
+
+#endif
diff --git a/extras/README.txt b/extras/README.txt
new file mode 100644
index 0000000..9f62be8
--- /dev/null
+++ b/extras/README.txt
@@ -0,0 +1,16 @@
+
+The 'extras' directory contains contributions and other useful additions.
+
+All contributions are covered by the gSOAP public license, unless specifically
+stated otherwise in the source. The following authors provided the
+contributions included in this directory:
+
+ckdb.h ckdb.c			Simple Cookie database manager (store/load)
+ckdbtest.h ckdbtest.c		Test code for Simple Cookie database manager
+fault.cpp			Print SOAP Fault messages to C++ streams
+logging.cpp			Log send, receive, and trace messages on streams
+
+fault.cpp contributed by A. Kelly
+logging.cpp contributed by M. Helmick
+
+The soapdefs.h file contains supporting declarations (see notes in the sources).
diff --git a/extras/ckdb.c b/extras/ckdb.c
new file mode 100644
index 0000000..c2ea242
--- /dev/null
+++ b/extras/ckdb.c
@@ -0,0 +1,87 @@
+/*	ckdb.c
+
+	HTTP cookie database manager.
+
+The contents of this file are subject to the gSOAP Public License Version 1.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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2002 Robert A. van Engelen. All Rights Reserved.
+
+1. Compile ckdb.h:
+   soapcpp2 -cpckdb ckdb.h
+2. Compile ckdb.c:
+   gcc -DWITH_COOKIES -DWITH_NOGLOBAL -c ckdb.c
+3. Compile and link with main program, e.g. ckdbtest.c:
+   soapcpp2 -c ckdbtest.h
+   gcc -DWITH_COOKIES ckdbtest.c ckdb.o stdsoap2.c soapC.c soapClient.c
+
+*/
+
+#include <sys/stat.h>
+#include "stdsoap2.h"
+#undef SOAP_FMAC1
+#define SOAP_FMAC1 static
+#include "ckdbC.c"
+
+int soap_save_cookies(struct soap *soap, const char *pathname)
+{ int socket = soap->socket;
+  int sendfd = soap->sendfd;
+  soap_begin(soap);
+  soap->socket = -1;	/* make sure plain I/O is used */
+  soap->sendfd = open(pathname, O_CREAT|O_TRUNC|O_WRONLY, S_IREAD|S_IWRITE);
+  if (soap->sendfd >= 0)
+  { soap_serialize_cookie(soap, (struct cookie*)soap->cookies);
+    soap_begin_send(soap);
+    soap_put_cookie(soap, (struct cookie*)soap->cookies, "jar", NULL);
+    soap_end_send(soap);
+    close(soap->sendfd);
+    soap->socket = socket;
+    soap->sendfd = sendfd;
+    return SOAP_OK;
+  }
+  soap->socket = socket;
+  soap->sendfd = sendfd;
+  return SOAP_EOF;
+}
+
+int soap_load_cookies(struct soap *soap, const char *pathname)
+{ int socket = soap->socket;
+  int recvfd = soap->recvfd;
+  soap_begin(soap);
+  soap->socket = -1;	/* make sure plain I/O is used */
+  soap->recvfd = open(pathname, O_RDONLY);
+  if (soap->recvfd >= 0)
+  { if (soap_begin_recv(soap))
+    { close(soap->recvfd);
+      soap->socket = socket;
+      soap->recvfd = recvfd;
+      return soap->error;
+    }
+    soap->cookies = (struct soap_cookie*)soap_get_cookie(soap, NULL, "jar", NULL);
+    if (!soap->cookies && soap->error)
+    { close(soap->recvfd);
+      soap->socket = socket;
+      soap->recvfd = recvfd;
+      return soap->error;
+    }
+    if (soap_end_recv(soap))
+    { close(soap->recvfd);
+      soap->socket = socket;
+      soap->recvfd = recvfd;
+      return soap->error;
+    }
+    close(soap->recvfd);
+    soap->socket = socket;
+    soap->recvfd = recvfd;
+    return SOAP_OK;
+  }
+  soap->socket = socket;
+  soap->recvfd = recvfd;
+  return SOAP_EOF;
+}
diff --git a/extras/ckdb.h b/extras/ckdb.h
new file mode 100644
index 0000000..75dfe2e
--- /dev/null
+++ b/extras/ckdb.h
@@ -0,0 +1,33 @@
+/*	ckdb.h
+
+	HTTP cookie database manager. See ckdb.c for more details.
+
+The contents of this file are subject to the gSOAP Public License Version 1.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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2002 Robert A. van Engelen. All Rights Reserved.
+
+*/
+
+/* struct cookie must be a mirror image of struct soap_cookie in stdsoap2.h */
+struct cookie
+{ struct cookie *next;
+  char *name;
+  char *value;
+  char *domain;
+  char *path;
+  long expire;
+  unsigned int version;
+  short secure;
+  [
+  short session;	/* transient: do not (de)serialize */
+  short env;		/* transient: do not (de)serialize */
+  short modified;	/* transient: do not (de)serialize */
+  ]
+};
diff --git a/extras/ckdbtest.c b/extras/ckdbtest.c
new file mode 100644
index 0000000..bdeec33
--- /dev/null
+++ b/extras/ckdbtest.c
@@ -0,0 +1,52 @@
+/*	ckdbtest.c
+
+	Test client for HTTP cookie database manager.
+
+	Copyright (C) 2000-2002 Robert A. van Engelen. All Rights Reserved.
+
+1. Compile ckdb.h:
+   soapcpp2 -cpckdb ckdb.h
+2. Compile ckdb.c:
+   gcc -DWITH_COOKIES -DWITH_NOGLOBAL -c ckdb.c
+3. Compile and link ckdbtest.c:
+   soapcpp2 -c ckdbtest.h
+   gcc -DWITH_COOKIES ckdbtest.c ckdb.o stdsoap2.c soapC.c soapClient.c
+4. Execute
+   Cookies will be stored in 'jar.xml'
+
+*/
+
+#include "soapH.h"
+#include "ckdbtest.nsmap"
+
+char ckserver[] = "http://www.cs.fsu.edu/~engelen/ck.cgi";
+
+int main()
+{ struct soap soap;
+  char *r;
+  soap_init(&soap);
+  if (soap_call_ck__demo(&soap, ckserver, NULL, &r))
+  { soap_print_fault(&soap, stderr);
+    soap_print_fault_location(&soap, stderr);
+    exit(-1);
+  }
+  printf("The server responded with: %s\n", r);
+  if (soap_save_cookies(&soap, "jar.xml"))
+    fprintf(stderr, "Cannot store cookies\n");
+  soap_free_cookies(&soap);
+  if (soap_load_cookies(&soap, "jar.xml"))
+    fprintf(stderr, "Cannot restore cookies\n");
+  else
+    printf("Got cookies (%s=%s)\n", soap.cookies->name, soap.cookies->value);
+  if (soap_call_ck__demo(&soap, ckserver, NULL, &r))
+  { soap_print_fault(&soap, stderr);
+    soap_print_fault_location(&soap, stderr);
+    exit(-1);
+  }
+  printf("The server responded with: %s\n", r);
+  if (soap_save_cookies(&soap, "jar.xml"))
+    fprintf(stderr, "Cannot store cookies\n");
+  soap_end(&soap);	/* This will delete the deserialized cookies too! */
+  soap.cookies = NULL;	/* so make sure this is NULL */
+  return 0;
+}
diff --git a/extras/ckdbtest.h b/extras/ckdbtest.h
new file mode 100644
index 0000000..60356e9
--- /dev/null
+++ b/extras/ckdbtest.h
@@ -0,0 +1,6 @@
+//gsoap ck service name: ckdbtest
+//gsoap ck service location: http://www.cs.fsu.edu/~engelen
+//gsoap ck service namespace: http://www.cs.fsu.edu/~engelen/ck.wsdl
+//gsoap ck service encoding: encoded
+//gsoap ck schema  namespace: urn:ck
+int ck__demo(char **r);
diff --git a/extras/fault.cpp b/extras/fault.cpp
new file mode 100644
index 0000000..b96e4d5
--- /dev/null
+++ b/extras/fault.cpp
@@ -0,0 +1,47 @@
+/*	Contributed by Allan Kelly, June 17, 2002
+	Provides C++ alternatives for
+	soap_print_fault and soap_print_fault_location functions
+*/
+
+/******************************************************************************/
+
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault(struct soap *soap, std::ostream& msg)
+{ if (soap->error)
+  { if (!*soap_faultcode(soap))
+      soap_set_fault(soap);
+    if (!*soap_faultstring(soap))
+      *soap_faultstring(soap) = "";
+    msg << "SOAP FAULT: "
+        << *soap_faultcode(soap) << std::endl
+        << "\"" << *soap_faultstring(soap) << "\"" << std::endl;
+    if (*soap_faultdetail(soap))
+      msg << "Detail: " << *soap_faultdetail(soap) << std::endl;
+  }
+}
+
+/******************************************************************************/
+
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault_location(struct soap *soap, std::ostream& msg)
+{ int c;
+  if (soap->error && soap->buflen > 0)
+  { if (soap->bufidx == 0)
+      soap->bufidx = 1;
+    c = soap->buf[soap->bufidx-1];
+    soap->buf[soap->bufidx-1] = '\0';
+    if (soap->bufidx < soap->buflen)
+      msg << soap->buf << static_cast<char> (c) << std::endl
+          << "** HERE **" << std::endl << soap->buf+soap->bufidx
+          << std::endl;
+    else
+      msg << soap->buf << static_cast<char> (c) << std::endl
+          << "** HERE **" << std::endl;
+  }
+}
+
+/******************************************************************************/
diff --git a/extras/logging.cpp b/extras/logging.cpp
new file mode 100644
index 0000000..0ada173
--- /dev/null
+++ b/extras/logging.cpp
@@ -0,0 +1,64 @@
+//	logging.cpp
+//
+//	Place this file in the same direcory as stdsoap2.h
+//	Requires soapdefs.h (compile stdsoap2.cpp with -DWITH_SOAPDEFS_H
+//	and -DDEBUG_CALLBACKS)
+//
+//	Runtime/Customer logging by Mike Helmick
+//	Copyright (c) 2002 - Mike Helmick. Convergys IMG. All Rights Reserved.
+//	This contributed code is covered under the MPL 1.1 license
+
+#include "stdsoap2.h"	// includes "soapdefs.h" when compiled with -DWITH_SOAPDEFS_H
+
+void soap_recv_callback(struct soap*, const char*, size_t len);
+void soap_sent_callback(struct soap*, const char*, size_t len);
+void soap_test_callback(struct soap*, const char*, size_t len);
+
+void
+soap_dispatch_callback(struct soap *soap, int idx, const char *msg, size_t len)
+{	if (!soap->user)
+	{	// you can set stuff up here, streams etc.
+		// soap->user is used to pass user-defined data
+		// soap->user is never set nor cleared by gSOAP
+		soap->user = (void*)&cout;
+		// don't forget to clean up the streams in the main code
+		// (before discarding the soap runtime environment)
+	}
+	switch (idx)
+	{	case SOAP_INDEX_RECV:
+			soap_recv_callback(soap, msg, len);
+			break;
+	 	case SOAP_INDEX_SENT:
+			soap_sent_callback(soap, msg, len);
+			break;
+	 	case SOAP_INDEX_TEST:
+			soap_test_callback(soap, msg, len);
+			break;
+	}
+}
+
+// Note: 'msg' is not 0-terminated!
+void
+soap_recv_callback(struct soap *soap, const char *msg, size_t len)
+{ ostream& os = *(ostream*)soap->user;
+  os << endl
+	<< "Received:" << endl
+	<< "----------------------------------------" << endl;
+  os.write(msg, len);
+  os << "----------------------------------------" << endl;
+}
+
+void
+soap_sent_callback(struct soap *soap, const char *msg, size_t len)
+{ ostream& os = *(ostream*)soap->user;
+  os << endl
+	<< "Sent:" << endl
+	<< "----------------------------------------" << endl;
+  os.write(msg, len);
+  os << "----------------------------------------" << endl;
+}
+
+void
+soap_test_callback(struct soap *soap, const char *msg, size_t len)
+{ (*(ostream*)soap->user << "Trace: ").write(msg, len);
+}
diff --git a/extras/soapdefs.h b/extras/soapdefs.h
new file mode 100644
index 0000000..bbc08a1
--- /dev/null
+++ b/extras/soapdefs.h
@@ -0,0 +1,28 @@
+//	soapdefs.h
+//	Place this file in the same directory as stdsoap2.h
+//	This file will be included in stdsoap2.h when compiling with
+//	-DWITH_SOAPDEFS_H (see stdsoap2.h line 16)
+//	See extras/logging.cpp for customer logging
+//	
+//	Runtime/Customer logging by Mike Helmick
+//	Copyright (c) 2002 - Mike Helmick. Convergys IMG. All Rights Reserved.
+//	This contributed code si covered under the MPL 1.1 license
+
+#ifndef SOAPDEFS_H
+#define SOAPDEFS_H
+
+#ifdef DEBUG_CALLBACKS
+#ifndef DEBUG
+#define DEBUG
+#endif
+#define SOAP_MESSAGE sprintf
+#define DBGLOG(DBGFILE, CMD) \
+{ char fdebug[SOAP_BUFLEN+1];\
+  CMD;\
+  soap_dispatch_callback(soap, SOAP_INDEX_##DBGFILE, fdebug, strlen(fdebug));\
+}
+#define DBGMSG(DBGFILE, MSG, LEN) soap_dispatch_callback(soap, SOAP_INDEX_##DBGFILE, MSG, LEN);
+void soap_dispatch_callback(struct soap*, int, const char*, size_t);
+#endif
+
+#endif
diff --git a/gpl.txt b/gpl.txt
new file mode 100644
index 0000000..b34237a
--- /dev/null
+++ b/gpl.txt
@@ -0,0 +1,309 @@
+The GNU General Public License (GPL)
+
+Version 2, June 1991
+
+Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite
+330, Boston, MA 02111-1307 USA
+
+Everyone is permitted to copy and distribute verbatim copies of this license
+document, but changing it is not allowed.
+
+Preamble
+
+The licenses for most software are designed to take away your freedom to share
+and change it. By contrast, the GNU General Public License is intended to
+guarantee your freedom to share and change free software--to make sure the
+software is free for all its users. This General Public License applies to most
+of the Free Software Foundation's software and to any other program whose
+authors commit to using it. (Some other Free Software Foundation software is
+covered by the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+When we speak of free software, we are referring to freedom, not price. Our
+General Public Licenses are designed to make sure that you have the freedom to
+distribute copies of free software (and charge for this service if you wish),
+that you receive source code or can get it if you want it, that you can change
+the software or use pieces of it in new free programs; and that you know you
+can do these things.
+
+To protect your rights, we need to make restrictions that forbid anyone to deny
+you these rights or to ask you to surrender the rights. These restrictions
+translate to certain responsibilities for you if you distribute copies of the
+software, or if you modify it.
+
+For example, if you distribute copies of such a program, whether gratis or for
+a fee, you must give the recipients all the rights that you have. You must make
+sure that they, too, receive or can get the source code. And you must show them
+these terms so they know their rights.
+
+We protect your rights with two steps: (1) copyright the software, and (2)
+offer you this license which gives you legal permission to copy, distribute
+and/or modify the software.
+
+Also, for each author's protection and ours, we want to make certain that
+everyone understands that there is no warranty for this free software. If the
+software is modified by someone else and passed on, we want its recipients to
+know that what they have is not the original, so that any problems introduced
+by others will not reflect on the original authors' reputations.
+
+Finally, any free program is threatened constantly by software patents. We wish
+to avoid the danger that redistributors of a free program will individually
+obtain patent licenses, in effect making the program proprietary.  To prevent
+this, we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+The precise terms and conditions for copying, distribution and modification
+follow.
+
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+0. This License applies to any program or other work which contains a notice
+placed by the copyright holder saying it may be distributed under the terms of
+this General Public License. The "Program", below, refers to any such program
+or work, and a "work based on the Program" means either the Program or any
+derivative work under copyright law: that is to say, a work containing the
+Program or a portion of it, either verbatim or with modifications and/or
+translated into another language. (Hereinafter, translation is included without
+limitation in the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not covered by
+this License; they are outside its scope. The act of running the Program is not
+restricted, and the output from the Program is covered only if its contents
+constitute a work based on the Program (independent of having been made by
+running the Program). Whether that is true depends on what the Program does.
+
+1. You may copy and distribute verbatim copies of the Program's source code as
+you receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice and
+disclaimer of warranty; keep intact all the notices that refer to this License
+and to the absence of any warranty; and give any other recipients of the
+Program a copy of this License along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and you may
+at your option offer warranty protection in exchange for a fee.
+
+2. You may modify your copy or copies of the Program or any portion of it, thus
+forming a work based on the Program, and copy and distribute such modifications
+or work under the terms of Section 1 above, provided that you also meet all of
+these conditions:
+
+a) You must cause the modified files to carry prominent notices stating that
+you changed the files and the date of any change.
+
+b) You must cause any work that you distribute or publish, that in whole or in
+part contains or is derived from the Program or any part thereof, to be
+licensed as a whole at no charge to all third parties under the terms of this
+License.
+
+c) If the modified program normally reads commands interactively when run, you
+must cause it, when started running for such interactive use in the most
+ordinary way, to print or display an announcement including an appropriate
+copyright notice and a notice that there is no warranty (or else, saying that
+you provide a warranty) and that users may redistribute the program under these
+conditions, and telling the user how to view a copy of this License.
+(Exception: if the Program itself is interactive but does not normally print
+such an announcement, your work based on the Program is not required to print
+an announcement.)
+
+These requirements apply to the modified work as a whole. If identifiable
+sections of that work are not derived from the Program, and can be reasonably
+considered independent and separate works in themselves, then this License, and
+its terms, do not apply to those sections when you distribute them as separate
+works. But when you distribute the same sections as part of a whole which is a
+work based on the Program, the distribution of the whole must be on the terms
+of this License, whose permissions for other licensees extend to the entire
+whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest your
+rights to work written entirely by you; rather, the intent is to exercise the
+right to control the distribution of derivative or collective works based on
+the Program.
+
+In addition, mere aggregation of another work not based on the Program with the
+Program (or with a work based on the Program) on a volume of a storage or
+distribution medium does not bring the other work under the scope of this
+License.
+
+3. You may copy and distribute the Program (or a work based on it, under
+Section 2) in object code or executable form under the terms of Sections 1 and
+2 above provided that you also do one of the following:
+
+a) Accompany it with the complete corresponding machine-readable source code,
+which must be distributed under the terms of Sections 1 and 2 above on a medium
+customarily used for software interchange; or,
+
+b) Accompany it with a written offer, valid for at least three years, to give
+any third party, for a charge no more than your cost of physically performing
+source distribution, a complete machine-readable copy of the corresponding
+source code, to be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange; or,
+
+c) Accompany it with the information you received as to the offer to distribute
+corresponding source code. (This alternative is allowed only for noncommercial
+distribution and only if you received the program in object code or executable
+form with such an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for making
+modifications to it. For an executable work, complete source code means all the
+source code for all modules it contains, plus any associated interface
+definition files, plus the scripts used to control compilation and installation
+of the executable. However, as a special exception, the source code distributed
+need not include anything that is normally distributed (in either source or
+binary form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component itself
+accompanies the executable.
+
+If distribution of executable or object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the source
+code from the same place counts as distribution of the source code, even though
+third parties are not compelled to copy the source along with the object code.
+
+4. You may not copy, modify, sublicense, or distribute the Program except as
+expressly provided under this License. Any attempt otherwise to copy, modify,
+sublicense or distribute the Program is void, and will automatically terminate
+your rights under this License. However, parties who have received copies, or
+rights, from you under this License will not have their licenses terminated so
+long as such parties remain in full compliance.
+
+5. You are not required to accept this License, since you have not signed it.
+However, nothing else grants you permission to modify or distribute the Program
+or its derivative works. These actions are prohibited by law if you do not
+accept this License. Therefore, by modifying or distributing the Program (or
+any work based on the Program), you indicate your acceptance of this License to
+do so, and all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+6. Each time you redistribute the Program (or any work based on the Program),
+the recipient automatically receives a license from the original licensor to
+copy, distribute or modify the Program subject to these terms and conditions.
+You may not impose any further restrictions on the recipients' exercise of the
+rights granted herein. You are not responsible for enforcing compliance by
+third parties to this License.
+
+7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues), conditions
+are imposed on you (whether by court order, agreement or otherwise) that
+contradict the conditions of this License, they do not excuse you from the
+conditions of this License. If you cannot distribute so as to satisfy
+simultaneously your obligations under this License and any other pertinent
+obligations, then as a consequence you may not distribute the Program at all.
+For example, if a patent license would not permit royalty-free redistribution
+of the Program by all those who receive copies directly or indirectly through
+you, then the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply and
+the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any patents or
+other property right claims or to contest validity of any such claims; this
+section has the sole purpose of protecting the integrity of the free software
+distribution system, which is implemented by public license practices. Many
+people have made generous contributions to the wide range of software
+distributed through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing to
+distribute software through any other system and a licensee cannot impose that
+choice.
+
+This section is intended to make thoroughly clear what is believed to be a
+consequence of the rest of this License.
+
+8. If the distribution and/or use of the Program is restricted in certain
+countries either by patents or by copyrighted interfaces, the original
+copyright holder who places the Program under this License may add an explicit
+geographical distribution limitation excluding those countries, so that
+distribution is permitted only in or among countries not thus excluded.  In
+such case, this License incorporates the limitation as if written in the body
+of this License.
+
+9. The Free Software Foundation may publish revised and/or new versions of the
+General Public License from time to time. Such new versions will be similar in
+spirit to the present version, but may differ in detail to address new problems
+or concerns.
+
+Each version is given a distinguishing version number. If the Program specifies
+a version number of this License which applies to it and "any later version",
+you have the option of following the terms and conditions either of that
+version or of any later version published by the Free Software Foundation.  If
+the Program does not specify a version number of this License, you may choose
+any version ever published by the Free Software Foundation.
+
+10. If you wish to incorporate parts of the Program into other free programs
+whose distribution conditions are different, write to the author to ask for
+permission. For software which is copyrighted by the Free Software Foundation,
+write to the Free Software Foundation; we sometimes make exceptions for this.
+Our decision will be guided by the two goals of preserving the free status of
+all derivatives of our free software and of promoting the sharing and reuse of
+software generally.
+
+NO WARRANTY
+
+11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
+THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
+STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
+PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
+PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU
+ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
+ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE
+PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
+INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
+BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
+OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+END OF TERMS AND CONDITIONS
+
+How to Apply These Terms to Your New Programs
+
+If you develop a new program, and you want it to be of the greatest possible
+use to the public, the best way to achieve this is to make it free software
+which everyone can redistribute and change under these terms.
+
+To do so, attach the following notices to the program. It is safest to attach
+them to the start of each source file to most effectively convey the exclusion
+of warranty; and each file should have at least the "copyright" line and a
+pointer to where the full notice is found.
+
+gSOAP XML Web services tools
+Copyright (C) 2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Also add information on how to contact you by electronic and paper mail:
+engelen@genivia.com / engelen@acm.org
+
+If the program is interactive, make it output a short notice like this when it
+starts in an interactive mode:
+
+gSOAP version X.Y.Z, Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc.
+gSOAP comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is
+free software, and you are welcome to redistribute it under certain conditions;
+type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may be
+called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may consider
+it more useful to permit linking proprietary applications with the library. If
+this is what you want to do, use the GNU Library General Public License instead
+of this License.
diff --git a/gsoap-palm/README.txt b/gsoap-palm/README.txt
new file mode 100644
index 0000000..19f3776
--- /dev/null
+++ b/gsoap-palm/README.txt
@@ -0,0 +1,44 @@
+This directory contains Palm OS support.
+
+Two example applications are included in the 'interop' and 'stockquote'
+directories. MetroWerks CodeWarrior project files are included.
+
+The 'interop' example performs interop checks with SOAP RPC 1.1 round 2 A/B/C
+tests against interop servers. (Note: the debug mode reports a memory leak,
+which is in the displayText() function for the GUI and not harmful.)
+
+The 'stockquote' example reports the value of a stock (ticker symbol).
+
+The stdsoap2.c/.cpp runtime library fits in a 64K segment. Some functionality
+is not available (implicitly disabled with the WITH_LEAN compiler option): no
+HTTP keep-alive, no HTTP cookies, no HTTP authentication, no message logging,
+limited error diagnostics, no send/recv timeouts, and no time_t, unsigned
+short, or Int64 serialization. To make the footprint as small as possible,
+compile the sources with the /DWITH_LEANER compile option. This disables MIME
+and DIME support.
+
+To help develop multi-segmented applications, the stdsoap2.c/.cpp is split in
+two parts: palmsoap1.c/.cpp and palmsoap2.c/.cpp. You should use these instead
+of stdsoap2.c/.cpp.
+
+To develop an application from a WSDL, run wsdl2h.exe (or a wsdl2h executable
+for any other platform) on the WSDL file. Mind the command line options. For
+example, wsdl2h.exe -c generates C code and wsdl2h.exe -s generates C++ code
+without requiring STL. This command generated a C or C++ header file.
+
+To generate serializers and stub routines, run soapcpp2.exe (or a soapcpp2
+executable for any other platform) on the header file. The soapcpp2.exe
+generates platform-independent code, including:
+soapH.h		header file for serializers
+soapC.cpp	serializers
+soapStub.h	header file for stubs
+soapClient.cpp	stubs
+
+The 'interop' and 'stockquote' examples already included these files.
+
+Because the generated code is platform-independent, it is strongly advised to
+try to build a simple test application on a non-Palm platform first to verify
+interoperability and data exchange. Because logging is disabled on Palm, it
+will be hard to find the source of an interop problem. After testing the
+application, you can use the same sources to build a Palm OS application.
+
diff --git a/gsoap-palm/interop/Multi-Segment Read Me.txt b/gsoap-palm/interop/Multi-Segment Read Me.txt
new file mode 100644
index 0000000..21cc5db
--- /dev/null
+++ b/gsoap-palm/interop/Multi-Segment Read Me.txt
@@ -0,0 +1,36 @@
+###############################################################################
+#
+# Copyright (c) 1999-2000 Palm, Inc. or its subsidiaries.
+# All rights reserved.
+#
+# File: Multi-Segment Read Me.txt
+#
+###############################################################################
+
+This is a stationery project for a multi-segment application that 
+runs on Palm OS devices.  Even though you can create applications 
+with multiple segments, you must follow the example used in this
+project.  See the "Targetting Palm OS" manual in the CodeWarrior 
+Documentation folder for more information on working with multi-
+segment applications.
+
+Segments are numbered from 0.  Segment 0 contains information for 
+the segment loader and is created by the linker.  Segment 1 contains 
+your application code and the startup code.  This segment __must__ 
+contain "MSL Runtime Palm OS (xx).lib", PilotMain(), and any code that 
+is executed when PilotMain() receives a launch command other than 
+sysAppLaunchCmdNormalLaunch.  This stipulation is caused by the fact 
+that A5-relative data is not relocated when the application is called 
+with any other launch code, thus all global variable addresses will be
+wrong and cause a crash.
+
+The best way to determine what files can go into segments other
+than 1 is to comment out the code in PilotMain() that handles the
+sysAppLaunchCmdNormalLaunch command, select the "Link Map" option
+from the 68K Linker preferences, and rebuild.  Any file that shows
+up in the link map on a line beginning with "Code:" must be in the
+first segment.  
+
+If you follow the coding style used by the Palm OS examples, form 
+handlers and the static functions called by the form handlers are
+good candidates to be placed in secondary segments.
diff --git a/gsoap-palm/interop/interop.mcp b/gsoap-palm/interop/interop.mcp
new file mode 100644
index 0000000..cbc6f74
--- /dev/null
+++ b/gsoap-palm/interop/interop.mcp
Binary files differ
diff --git a/gsoap-palm/interop/interop_data/CWSettingsWindows.stg b/gsoap-palm/interop/interop_data/CWSettingsWindows.stg
new file mode 100644
index 0000000..107592b
--- /dev/null
+++ b/gsoap-palm/interop/interop_data/CWSettingsWindows.stg
Binary files differ
diff --git a/gsoap-palm/interop/interop_data/starter-debug/TargetDataWindows.tdt b/gsoap-palm/interop/interop_data/starter-debug/TargetDataWindows.tdt
new file mode 100644
index 0000000..9680997
--- /dev/null
+++ b/gsoap-palm/interop/interop_data/starter-debug/TargetDataWindows.tdt
Binary files differ
diff --git a/gsoap-palm/interop/interop_data/starter-release/TargetDataWindows.tdt b/gsoap-palm/interop/interop_data/starter-release/TargetDataWindows.tdt
new file mode 100644
index 0000000..b2560e1
--- /dev/null
+++ b/gsoap-palm/interop/interop_data/starter-release/TargetDataWindows.tdt
Binary files differ
diff --git a/gsoap-palm/interop/obj/Starter-d.tmp b/gsoap-palm/interop/obj/Starter-d.tmp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/gsoap-palm/interop/obj/Starter-d.tmp
diff --git a/gsoap-palm/interop/obj/Starter.prc b/gsoap-palm/interop/obj/Starter.prc
new file mode 100644
index 0000000..7862b68
--- /dev/null
+++ b/gsoap-palm/interop/obj/Starter.prc
Binary files differ
diff --git a/gsoap-palm/interop/obj/Starter.prc.psym b/gsoap-palm/interop/obj/Starter.prc.psym
new file mode 100644
index 0000000..5bc3c7b
--- /dev/null
+++ b/gsoap-palm/interop/obj/Starter.prc.psym
Binary files differ
diff --git a/gsoap-palm/interop/obj/Starter.tmp b/gsoap-palm/interop/obj/Starter.tmp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/gsoap-palm/interop/obj/Starter.tmp
diff --git a/gsoap-palm/interop/obj/resource.frk/Starter-d.tmp b/gsoap-palm/interop/obj/resource.frk/Starter-d.tmp
new file mode 100644
index 0000000..ed84e25
--- /dev/null
+++ b/gsoap-palm/interop/obj/resource.frk/Starter-d.tmp
Binary files differ
diff --git a/gsoap-palm/interop/obj/resource.frk/Starter.tmp b/gsoap-palm/interop/obj/resource.frk/Starter.tmp
new file mode 100644
index 0000000..2ba2206
--- /dev/null
+++ b/gsoap-palm/interop/obj/resource.frk/Starter.tmp
Binary files differ
diff --git a/gsoap-palm/interop/rsc/Starter.rsrc b/gsoap-palm/interop/rsc/Starter.rsrc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/gsoap-palm/interop/rsc/Starter.rsrc
diff --git a/gsoap-palm/interop/rsc/StarterRsc.h b/gsoap-palm/interop/rsc/StarterRsc.h
new file mode 100644
index 0000000..c75861e
--- /dev/null
+++ b/gsoap-palm/interop/rsc/StarterRsc.h
@@ -0,0 +1,90 @@
+//	Header generated by Constructor for Palm OS (R) 1.8
+//
+//	Generated at 9:14:34 AM on Wednesday, February 25, 2004
+//
+//	Generated for file: C:\gsoap.2.5.2\interop\cw\Rsc\Starter.rsrc
+//
+//	THIS IS AN AUTOMATICALLY GENERATED HEADER FILE
+//	DO NOT EDIT - CHANGES MADE TO THIS FILE WILL BE LOST
+//
+//	Palm App Name:   		"interoptA"
+//
+//	Palm App Version:		"1.0"
+
+
+//	Resource: tFRM 1000
+#define MainForm                                  1000	//(Left Origin = 0, Top Origin = 0, Width = 160, Height = 160, Usable = 1, Modal = 0, Save Behind = 0, Help ID = 0, Menu Bar ID = 1000, Default Button ID = 0)
+#define MainRunAButton                            1001	//(Left Origin = 9, Top Origin = 145, Width = 40, Height = 14, Usable = 1, Anchor Left = 1, Frame = 1, Non-bold Frame = 1, Font = Standard)
+#define MainRunBButton                            1004	//(Left Origin = 65, Top Origin = 145, Width = 40, Height = 14, Usable = 1, Anchor Left = 1, Frame = 1, Non-bold Frame = 1, Font = Standard)
+#define MainRunCButton                            1005	//(Left Origin = 113, Top Origin = 145, Width = 40, Height = 14, Usable = 1, Anchor Left = 1, Frame = 1, Non-bold Frame = 1, Font = Standard)
+#define MainUnnamed1003Label                      1003	//(Left Origin = 8, Top Origin = 16, Usable = 1, Font = Standard)
+#define MainUnnamed1006Label                      1006	//(Left Origin = 8, Top Origin = 112, Usable = 1, Font = Standard)
+#define MainResultsList                           1002	//(Left Origin = 8, Top Origin = 33, Width = 150, Usable = 1, Font = Standard, Visible Items = 7)
+#define MainURLList                               1008	//(Left Origin = 9, Top Origin = 73, Width = 142, Usable = 0, Font = Standard, Visible Items = 6)
+#define MainURLPopTrigger                         1007	//(Left Origin = 8, Top Origin = 128, Width = 152, Height = 16, Usable = 1, Anchor Left = 1, Font = Standard, List ID = 1008)
+
+//	Resource: tFRM 1100
+#define AboutForm                                 1100	//(Left Origin = 2, Top Origin = 2, Width = 156, Height = 156, Usable = 1, Modal = 1, Save Behind = 1, Help ID = 0, Menu Bar ID = 0, Default Button ID = 0)
+#define AboutOKButton                             1105	//(Left Origin = 58, Top Origin = 133, Width = 40, Height = 12, Usable = 1, Anchor Left = 1, Frame = 1, Non-bold Frame = 1, Font = Standard)
+#define AboutTitleLabel                           1102	//(Left Origin = 46, Top Origin = 22, Usable = 1, Font = Large)
+#define AboutText1Label                           1103	//(Left Origin = 23, Top Origin = 54, Usable = 1, Font = Standard)
+#define AboutText2Label                           1104	//(Left Origin = 50, Top Origin = 104, Usable = 1, Font = Bold)
+
+
+//	Resource: Talt 1001
+#define RomIncompatibleAlert                      1001
+#define RomIncompatibleOK                         0
+
+
+//	Resource: MBAR 1000
+#define MainFormMenuBar                           1000
+
+
+//	Resource: MENU 1000
+#define MainOptionsMenu                           1000
+#define MainOptionsAboutStarterApp                1000
+
+
+//	Resource: PICT 1001
+#define Largeicon1bitBitmap                       1001
+
+//	Resource: PICT 1002
+#define Largeicon2bitBitmap                       1002
+
+//	Resource: PICT 1008
+#define Largeicon8bitBitmap                       1008
+
+//	Resource: PICT 1011
+#define Smallicon1bitBitmap                       1011
+
+//	Resource: PICT 1012
+#define Smallicon2bitBitmap                       1012
+
+//	Resource: PICT 1018
+#define Smallicon8bitBitmap                       1018
+
+//	Resource: PICT 21001
+#define LargeiconX21bitBitmap                     21001
+
+//	Resource: PICT 21002
+#define LargeiconX22bitBitmap                     21002
+
+//	Resource: PICT 21008
+#define LargeiconX28bitBitmap                     21008
+
+//	Resource: PICT 21011
+#define SmalliconX21bitBitmap                     21011
+
+//	Resource: PICT 21018
+#define SmalliconX28bitBitmap                     21018
+
+//	Resource: PICT 21012
+#define SmalliconX22bitBitmap                     21012
+
+
+//	Resource: taif 1000
+#define Largeicons12and8bitsAppIconFamily         1000
+
+//	Resource: taif 1001
+#define Smallicons12and8bitsAppIconFamily         1001
+
diff --git a/gsoap-palm/interop/rsc/resource.frk/Starter.rsrc b/gsoap-palm/interop/rsc/resource.frk/Starter.rsrc
new file mode 100644
index 0000000..44ddb04
--- /dev/null
+++ b/gsoap-palm/interop/rsc/resource.frk/Starter.rsrc
Binary files differ
diff --git a/gsoap-palm/interop/src/Starter.cpp b/gsoap-palm/interop/src/Starter.cpp
new file mode 100644
index 0000000..42b0d87
--- /dev/null
+++ b/gsoap-palm/interop/src/Starter.cpp
@@ -0,0 +1,586 @@
+//===================================================================================
+//
+//    (C) COPYRIGHT International Business Machines Corp., 2002 All Rights Reserved
+//    Licensed Materials - Property of IBM
+//    US Government Users Restricted Rights - Use, duplication or
+//    disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
+//
+//    IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+//    ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+//    PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+//    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+//    USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+//    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
+//    OR PERFORMANCE OF THIS SOFTWARE.
+//
+//    The program may be used, executed, copied, modified, and distributed
+//    without royalty for the purpose of developing, using, marketing, or distributing.
+// 
+//=======================================================================================
+/******************************************************************************
+ *
+ * Copyright (c) 1999 Palm Computing, Inc. or its subsidiaries.
+ * All rights reserved.
+ *
+ * File: Starter.cpp
+ *
+ *****************************************************************************/
+#include <PalmOS.h>
+#include "StarterRsc.h"
+#include <unix_string.h>
+#include <unix_stdlib.h>
+
+//#include "interop2H.h"    // include the generated proxy
+//#include "interop2BH.h"    // include the generated proxy
+//#include "interop2CH.h"    // include the generated proxy
+
+extern "C" int interoptA(const char *site);
+extern "C" int interopB(const char *site);
+extern "C" int interopC(const char *site);
+extern "C" void displayText(char *text);
+void initURLList();
+char *getSite(char type);
+
+/***********************************************************************
+ *
+ *	Entry Points
+ *
+ ***********************************************************************/
+
+
+/***********************************************************************
+ *
+ *	Internal Structures
+ *
+ ***********************************************************************/
+typedef struct 
+	{
+	UInt8 replaceme;
+	} StarterPreferenceType;
+
+typedef struct 
+	{
+	UInt8 replaceme;
+	} StarterAppInfoType;
+
+typedef StarterAppInfoType* StarterAppInfoPtr;
+
+
+/***********************************************************************
+ *
+ *	Global variables
+ *
+ ***********************************************************************/
+//static Boolean HideSecretRecords;
+
+char **resultText ;
+int resultLines=0;
+
+#define URL_COUNT 6
+ char * tryURLsA[]={
+   "http://www.cs.fsu.edu/~engelen/interop2.cgi",
+   "http://services.soaplite.com/interop.cgi",
+   "http://interop.capeclear.com/ccx/soapbuilders-round2",
+	"http://nagoya.apache.org:5049/axis/services/echoA",
+	"http://easysoap.sourceforge.net/cgi-bin/interopserver",
+	"http://soapinterop.simdb.com/round2",
+ };
+
+ char * tryURLsB[]={
+   "http://www.cs.fsu.edu/~engelen/interop2B.cgi",
+   "http://services.soaplite.com/interop.cgi",
+   "http://interop.capeclear.com/ccx/soapbuilders-round2",
+   "http://nagoya.apache.org:5049/axis/services/echoB",
+	"http://easysoap.sourceforge.net/cgi-bin/interopserver",
+	"http://soapinterop.simdb.com/round2B",
+ };
+
+ char * tryURLsC[]={
+   "http://www.cs.fsu.edu/~engelen/interop2C.cgi",
+   "http://services.soaplite.com/interop.cgi",
+   "http://interop.capeclear.com/ccx/soapbuilders-round2",
+   "http://nagoya.apache.org:5049/axis/services/echoB",
+	"http://easysoap.sourceforge.net/cgi-bin/interopserver",
+	"http://soapinterop.simdb.com/round2B",
+ };
+
+
+/***********************************************************************
+ *
+ *	Internal Constants
+ *
+ ***********************************************************************/
+#define appFileCreator			'STRT'	// register your own at http://www.palmos.com/dev/creatorid/
+#define appVersionNum			0x01
+#define appPrefID				0x00
+#define appPrefVersionNum		0x01
+
+// Define the minimum OS version we support (2.0 for now).
+#define kOurMinVersion	sysMakeROMVersion(2,0,0,sysROMStageRelease,0)
+#define kPalmOS10Version	sysMakeROMVersion(1,0,0,sysROMStageRelease,0)
+
+
+/***********************************************************************
+ *
+ *	Internal Functions
+ *
+ ***********************************************************************/
+
+/***********************************************************************
+ *
+ * FUNCTION:    RomVersionCompatible
+ *
+ * DESCRIPTION: This routine checks that a ROM version is meet your
+ *              minimum requirement.
+ *
+ * PARAMETERS:  requiredVersion - minimum rom version required
+ *                                (see sysFtrNumROMVersion in SystemMgr.h 
+ *                                for format)
+ *              launchFlags     - flags that indicate if the application 
+ *                                UI is initialized.
+ *
+ * RETURNED:    error code or zero if rom is compatible
+ *
+ * REVISION HISTORY:
+ *
+ *
+ ***********************************************************************/
+static Err RomVersionCompatible(UInt32 requiredVersion, UInt16 launchFlags)
+{
+	UInt32 romVersion;
+	// See if we're on in minimum required version of the ROM or later.
+	FtrGet(sysFtrCreator, sysFtrNumROMVersion, &romVersion);
+	if (romVersion < requiredVersion)
+		{
+		if ((launchFlags & (sysAppLaunchFlagNewGlobals | sysAppLaunchFlagUIApp)) ==
+			(sysAppLaunchFlagNewGlobals | sysAppLaunchFlagUIApp))
+			{
+			FrmAlert (RomIncompatibleAlert);
+		
+			// Palm OS 1.0 will continuously relaunch this app unless we switch to 
+			// another safe one.
+			if (romVersion <= kPalmOS10Version)
+				{
+				AppLaunchWithCommand(sysFileCDefaultApp, sysAppLaunchCmdNormalLaunch, NULL);
+				}
+			}
+		
+		return sysErrRomIncompatible;
+		}
+
+	return errNone;
+}
+
+
+/***********************************************************************
+ *
+ * FUNCTION:    GetObjectPtr
+ *
+ * DESCRIPTION: This routine returns a pointer to an object in the current
+ *              form.
+ *
+ * PARAMETERS:  formId - id of the form to display
+ *
+ * RETURNED:    void *
+ *
+ * REVISION HISTORY:
+ *
+ *
+ ***********************************************************************/
+static void * GetObjectPtr(UInt16 objectID)
+{
+	FormPtr frmP;
+
+	frmP = FrmGetActiveForm();
+	return FrmGetObjectPtr(frmP, FrmGetObjectIndex(frmP, objectID));
+}
+
+
+/***********************************************************************
+ *
+ * FUNCTION:    MainFormInit
+ *
+ * DESCRIPTION: This routine initializes the MainForm form.
+ *
+ * PARAMETERS:  frm - pointer to the MainForm form.
+ *
+ * RETURNED:    nothing
+ *
+ * REVISION HISTORY:
+ *
+ *
+ ***********************************************************************/
+static void MainFormInit(FormPtr /*frmP*/)
+{
+ initURLList();
+}
+
+
+/***********************************************************************
+ *
+ * FUNCTION:    MainFormDoCommand
+ *
+ * DESCRIPTION: This routine performs the menu command specified.
+ *
+ * PARAMETERS:  command  - menu item id
+ *
+ * RETURNED:    nothing
+ *
+ * REVISION HISTORY:
+ *
+ *
+ ***********************************************************************/
+static Boolean MainFormDoCommand(UInt16 command)
+{
+	Boolean handled = false;
+	FormPtr frmP;
+
+	switch (command)
+		{
+		case MainOptionsAboutStarterApp:
+			MenuEraseStatus(0);					// Clear the menu status from the display.
+			frmP = FrmInitForm (AboutForm);
+			FrmDoDialog (frmP);					// Display the About Box.
+			FrmDeleteForm (frmP);
+			handled = true;
+			break;
+
+		}
+	
+	return handled;
+}
+
+
+/***********************************************************************
+ *
+ * FUNCTION:    MainFormHandleEvent
+ *
+ * DESCRIPTION: This routine is the event handler for the 
+ *              "MainForm" of this application.
+ *
+ * PARAMETERS:  eventP  - a pointer to an EventType structure
+ *
+ * RETURNED:    true if the event has handle and should not be passed
+ *              to a higher level handler.
+ *
+ * REVISION HISTORY:
+ *
+ *
+ ***********************************************************************/
+static Boolean MainFormHandleEvent(EventPtr eventP)
+{
+	Boolean handled = false;
+	FormPtr frmP;
+
+	switch (eventP->eType) 
+		{
+		case menuEvent:
+			return MainFormDoCommand(eventP->data.menu.itemID);
+
+		case frmOpenEvent:
+			frmP = FrmGetActiveForm();
+			MainFormInit( frmP);
+			FrmDrawForm ( frmP);
+			handled = true;
+			break;
+			
+		case frmUpdateEvent:
+			// To do any custom drawing here, first call FrmDrawForm(), then do your
+			// drawing, and then set handled to true.
+			break;
+
+		case ctlSelectEvent:
+			switch (eventP->data.ctlSelect.controlID)
+			{
+				case MainRunAButton:
+					interoptA(getSite('A'));
+					break;
+				case MainRunBButton:
+					interopB(getSite('B'));
+					break;
+				case MainRunCButton:
+					interopC(getSite('C'));
+					break;
+			}
+			break;
+
+		default:
+			break;
+		
+		}
+	
+	return handled;
+}
+
+
+/***********************************************************************
+ *
+ * FUNCTION:    AppHandleEvent
+ *
+ * DESCRIPTION: This routine loads form resources and set the event
+ *              handler for the form loaded.
+ *
+ * PARAMETERS:  event  - a pointer to an EventType structure
+ *
+ * RETURNED:    true if the event has handle and should not be passed
+ *              to a higher level handler.
+ *
+ * REVISION HISTORY:
+ *
+ *
+ ***********************************************************************/
+static Boolean AppHandleEvent(EventPtr eventP)
+{
+	UInt16 formId;
+	FormPtr frmP;
+
+	if (eventP->eType == frmLoadEvent)
+		{
+		// Load the form resource.
+		formId = eventP->data.frmLoad.formID;
+		frmP = FrmInitForm(formId);
+		FrmSetActiveForm(frmP);
+
+		// Set the event handler for the form.  The handler of the currently
+		// active form is called by FrmHandleEvent each time is receives an
+		// event.
+		switch (formId)
+			{
+			case MainForm:
+			
+			    switch (eventP->data.ctlSelect.controlID)
+		        {
+//			        case InteroptARunAll:
+//			        interoptA(1);
+//				    break;
+		        }
+			
+				FrmSetEventHandler(frmP, MainFormHandleEvent);
+				break;
+
+			default:
+//				ErrFatalDisplay("Invalid Form Load Event");
+				break;
+
+			}
+		return true;
+		}
+	
+	return false;
+}
+
+
+/***********************************************************************
+ *
+ * FUNCTION:    AppEventLoop
+ *
+ * DESCRIPTION: This routine is the event loop for the application.  
+ *
+ * PARAMETERS:  nothing
+ *
+ * RETURNED:    nothing
+ *
+ * REVISION HISTORY:
+ *
+ *
+ ***********************************************************************/
+static void AppEventLoop(void)
+{
+	UInt16 error;
+	EventType event;
+
+	do {
+		EvtGetEvent(&event, evtWaitForever);
+
+		if (! SysHandleEvent(&event))
+			if (! MenuHandleEvent(0, &event, &error))
+				if (! AppHandleEvent(&event))
+					FrmDispatchEvent(&event);
+
+	} while (event.eType != appStopEvent);
+}
+
+
+/***********************************************************************
+ *
+ * FUNCTION:     AppStart
+ *
+ * DESCRIPTION:  Get the current application's preferences.
+ *
+ * PARAMETERS:   nothing
+ *
+ * RETURNED:     Err value 0 if nothing went wrong
+ *
+ * REVISION HISTORY:
+ *
+ *
+ ***********************************************************************/
+static Err AppStart(void)
+{
+	StarterPreferenceType prefs;
+	UInt16 prefsSize;
+
+	// Read the saved preferences / saved-state information.
+	prefsSize = sizeof(StarterPreferenceType);
+	if (PrefGetAppPreferences(appFileCreator, appPrefID, &prefs, &prefsSize, true) != 
+		noPreferenceFound)
+		{
+		}
+	
+	return errNone;
+}
+
+
+/***********************************************************************
+ *
+ * FUNCTION:    AppStop
+ *
+ * DESCRIPTION: Save the current state of the application.
+ *
+ * PARAMETERS:  nothing
+ *
+ * RETURNED:    nothing
+ *
+ * REVISION HISTORY:
+ *
+ *
+ ***********************************************************************/
+static void AppStop(void)
+{
+	StarterPreferenceType prefs;
+
+	// Write the saved preferences / saved-state information.  This data 
+	// will saved during a HotSync backup.
+	PrefSetAppPreferences (appFileCreator, appPrefID, appPrefVersionNum, 
+		&prefs, sizeof (prefs), true);
+		
+	// Close all the open forms.
+	FrmCloseAllForms ();
+}
+
+
+/***********************************************************************
+ *
+ * FUNCTION:    StarterPalmMain
+ *
+ * DESCRIPTION: This is the main entry point for the application.
+ *
+ * PARAMETERS:  cmd - word value specifying the launch code. 
+ *              cmdPB - pointer to a structure that is associated with the launch code. 
+ *              launchFlags -  word value providing extra information about the launch.
+ *
+ * RETURNED:    Result of launch
+ *
+ * REVISION HISTORY:
+ *
+ *
+ ***********************************************************************/
+static UInt32 StarterPalmMain(UInt16 cmd, MemPtr /*cmdPBP*/, UInt16 launchFlags)
+{
+	Err error;
+
+	error = RomVersionCompatible (kOurMinVersion, launchFlags);
+	if (error) return (error);
+
+	switch (cmd)
+		{
+		case sysAppLaunchCmdNormalLaunch:
+			error = AppStart();
+			if (error) 
+				return error;
+				
+			FrmGotoForm(MainForm);
+			AppEventLoop();
+			AppStop();
+			break;
+
+		default:
+			break;
+
+		}
+	
+	return errNone;
+}
+
+
+/***********************************************************************
+ *
+ * FUNCTION:    PilotMain
+ *
+ * DESCRIPTION: This is the main entry point for the application.
+ *
+ * PARAMETERS:  cmd - word value specifying the launch code. 
+ *              cmdPB - pointer to a structure that is associated with the launch code. 
+ *              launchFlags -  word value providing extra information about the launch.
+ * RETURNED:    Result of launch
+ *
+ * REVISION HISTORY:
+ *
+ *
+ ***********************************************************************/
+UInt32 PilotMain( UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags)
+{
+// int i1=sizeof(size_t);
+// int i2=sizeof(int);
+// int i3=sizeof(struct xsd__base64Binary);
+	return StarterPalmMain(cmd, cmdPBP, launchFlags);
+}
+
+void displayText(char *text)
+{
+	ListPtr lst;
+   char ** newText;
+   char *str =(char*) malloc(1+StrLen(text));
+   strcpy(str,text);
+  int i=0;
+  if (resultLines==0)
+  {
+    newText = (char**)malloc(sizeof(void*));
+  } 
+  else
+  {
+    int size=  resultLines*sizeof(void*);
+    newText =(char**) malloc(size+sizeof(void*));
+    memcpy(newText,resultText,size);
+  }
+  
+  newText[resultLines]=str;
+  resultLines++;
+  resultText=newText;
+
+	lst = (ListPtr) GetObjectPtr(MainResultsList);
+
+	LstSetListChoices(lst, resultText, resultLines);
+	if (resultLines>5)
+	  LstSetTopItem(lst,resultLines-5);
+	LstDrawList(lst);
+
+}
+
+
+char *getSite(char type)
+{
+  int listIndex;
+  listIndex = LstGetSelection((ListPtr)GetObjectPtr(MainURLList));
+  if (type=='A') return tryURLsA[listIndex];
+  if (type=='B') return tryURLsB[listIndex];
+  if (type=='C') return tryURLsC[listIndex];
+  
+  // Shouldn't ever get to this point. Just return A list
+  return tryURLsA[listIndex];
+}
+
+void initURLList()
+{
+	ControlPtr ctl;
+	ListPtr lst;
+//	UInt32	defaultID;
+
+	ctl = (ControlPtr)GetObjectPtr(MainURLPopTrigger);
+	lst = (ListPtr)GetObjectPtr(MainURLList);
+
+	LstSetListChoices(lst, tryURLsA, URL_COUNT);
+	LstSetHeight(lst, 10);
+	CtlSetLabel (ctl, tryURLsA[0]);
+}
+
diff --git a/gsoap-palm/interop/src/interop2Btest.cpp b/gsoap-palm/interop/src/interop2Btest.cpp
new file mode 100644
index 0000000..3e80fc6
--- /dev/null
+++ b/gsoap-palm/interop/src/interop2Btest.cpp
@@ -0,0 +1,211 @@
+//===================================================================================
+//
+//    (C) COPYRIGHT International Business Machines Corp., 2002 All Rights Reserved
+//    Licensed Materials - Property of IBM
+//    US Government Users Restricted Rights - Use, duplication or
+//    disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
+//
+//    IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+//    ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+//    PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+//    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+//    USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+//    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
+//    OR PERFORMANCE OF THIS SOFTWARE.
+//
+//    The program may be used, executed, copied, modified, and distributed
+//    without royalty for the purpose of developing, using, marketing, or distributing.
+// 
+//=======================================================================================
+// gSOAP v2 Interop B test round 2
+#include "soapH.h"
+extern "C" void displayText(char *text);
+extern "C" int interopB(const char *site);
+
+int interopB(const char *url)
+{
+  struct soap *soap;
+  char *site=(char*)url;
+//  char* site ="http://websrv.cs.fsu.edu/~engelen/interop2B.cgi";
+  char* action = "http://soapinterop.org/";
+  
+  bool ok=true;
+  int i, g;
+  xsd__string s = "Hello World! <>&";
+  xsd__int n = 2147483647;
+  xsd__float f = 3.40282e+38;
+  struct ArrayOfstring a;
+  struct ArrayOfstring2D aai;
+  struct ArrayOfstring2D aao;
+
+  struct s__SOAPStruct sti;
+  struct ns__echoStructAsSimpleTypesResponse Ro;
+  struct ns__echoSimpleTypesAsStructResponse Rsto;
+  struct s__SOAPStructStruct ssti;
+  struct ns__echoNestedStructResponse Rssto;
+  struct s__SOAPArrayStruct sati;
+  struct ns__echoNestedArrayResponse Rsato;
+
+  displayText("running test B on");
+  displayText((char*)url);
+  soap = soap_new();
+  soap->namespaces = (struct Namespace *)namespaces;
+
+//  FILE *fd = fopen("interop2Bfaults.html", "a");
+
+//  soap_init(&soap);
+
+  soap->send_timeout = 30;
+  soap->recv_timeout = 30;
+
+  sti.varString = "Hello";
+  sti.varInt = &n;
+  sti.varFloat = &f;
+
+  ssti.varString = "SOAP!";
+  ssti.varInt = &n;
+  ssti.varFloat = &f;
+  ssti.varStruct = &sti;
+
+  a.__size = 5;
+  a.__offset = 2;
+  a.__ptr = (char**)malloc(a.__size*sizeof(char*));
+  a.__ptr[0] = "Interop";
+  a.__ptr[1] = "Test";
+  a.__ptr[2] = "Round";
+  a.__ptr[3] = "2";
+  a.__ptr[4] = a.__ptr[1];
+
+  aai.__size[0] = 2;
+  aai.__size[1] = 3;
+  aai.__offset[0] = 0;
+  aai.__offset[1] = 0;
+  aai.__ptr = (char**)malloc(aai.__size[0]*aai.__size[1]*sizeof(char*));
+  aai.__ptr[0] = "Interop Test";
+  aai.__ptr[1] = NULL;
+  aai.__ptr[2] = "Round";
+  aai.__ptr[3] = "2";
+  aai.__ptr[4] = a.__ptr[1];
+  aai.__ptr[5] = NULL;
+
+  sati.varString = a.__ptr[0];
+  sati.varInt = &n;
+  sati.varFloat = &f;
+  sati.varArray = a;
+   
+  if (soap_call_ns__echoStructAsSimpleTypes(soap, site, "http://soapinterop.org/", sti, Ro))
+  { 
+    displayText("echoStructAsSimpleTypes failed");
+    ok=false;
+  }  else if (!Ro._outputString || strcmp(sti.varString, Ro._outputString) || !Ro._outputInteger || *sti.varInt != *Ro._outputInteger
+  || !Ro._outputFloat || *sti.varFloat != *Ro._outputFloat)
+  {
+  	displayText("echoStructAsSimpleTypes mismatched");
+    ok=false;
+  }
+  else
+  	displayText("echoStructAsSimpleTypes passed");
+
+  if (soap_call_ns__echoSimpleTypesAsStruct(soap, site, "http://soapinterop.org/", s, &n, &f, Rsto))
+  { 
+    displayText("echoSimpleTypesAsStruct failed");
+    ok=false;
+  }
+  else if (!Rsto._return.varString || strcmp(s, Rsto._return.varString) || !Rsto._return.varInt || n != *Rsto._return.varInt || !Rsto._return.varFloat || f != *Rsto._return.varFloat)
+  {
+  	displayText("echoSimpleTypesAsStruct mismatched");
+    ok=false;
+  }
+  else
+  	displayText("echoSimpleTypesAsStruct passed");
+
+  if (soap_call_ns__echo2DStringArray(soap,site, "http://soapinterop.org/", aai, aao))
+  { 
+    displayText("echo2DStringArray failed");
+    ok=false;
+  }
+  else
+  { g = 0;
+    if (aai.__size[0] != aao.__size[0] || aai.__size[1] != aao.__size[1] || !aao.__ptr)
+      g = 1;
+    else
+      for (i = 0; i < aai.__size[0]*aai.__size[1]; i++)
+        if (aai.__ptr[i] && (!aao.__ptr[i] || strcmp(aai.__ptr[i], aao.__ptr[i])))
+	  g = 1;
+    if (g)
+    {
+    	displayText("echo2DStringArray mismatched");
+    ok=false;
+    }
+    else
+	  	displayText("echo2DStringArray passed");
+  }
+
+  if (soap_call_ns__echoNestedStruct(soap, site, "http://soapinterop.org/", ssti, Rssto))
+  { 
+    displayText("echoNestedStruct failed");
+    ok=false;
+  }
+  else if (!Rssto._return.varString || strcmp(ssti.varString, Rssto._return.varString) ||
+  !Rssto._return.varInt || *ssti.varInt != *Rssto._return.varInt ||
+  !Rssto._return.varFloat || *ssti.varFloat != *Rssto._return.varFloat ||
+  !Rssto._return.varStruct || 
+  !Rssto._return.varStruct->varString || strcmp(ssti.varStruct->varString, Rssto._return.varStruct->varString) ||
+  !Rssto._return.varStruct->varInt || *ssti.varStruct->varInt != *Rssto._return.varStruct->varInt || 
+  !Rssto._return.varStruct->varFloat || *ssti.varStruct->varFloat != *Rssto._return.varStruct->varFloat)
+    {
+    	displayText("echoNestedStruct mismatched");
+    ok=false;
+  }
+  else
+  	displayText("echoNestedStruct passed");
+
+  if (soap_call_ns__echoNestedArray(soap, site, "http://soapinterop.org/", sati, Rsato))
+  { 
+    displayText("echoNestedArray failed");
+    ok=false;
+  }
+  else if (!Rsato._return.varString || strcmp(sati.varString, Rsato._return.varString) ||
+  !Rsato._return.varInt || *sati.varInt != *Rsato._return.varInt ||
+  !Rsato._return.varFloat || *sati.varFloat != *Rsato._return.varFloat ||
+  sati.varArray.__size+sati.varArray.__offset != Rsato._return.varArray.__size+Rsato._return.varArray.__offset)
+    {
+    	displayText("echoNestedArray mismatched");
+    ok=false;
+  }
+  else
+  { g = 0;
+    for (i = sati.varArray.__offset; i < sati.varArray.__size+sati.varArray.__offset; i++)
+      if (!Rsato._return.varArray.__ptr[i-Rsato._return.varArray.__offset] ||
+          strcmp(sati.varArray.__ptr[i-sati.varArray.__offset], Rsato._return.varArray.__ptr[i-Rsato._return.varArray.__offset]))
+          g = 1;
+    if (g)
+    {
+    	displayText("echoNestedArray mismatched");
+	    ok=false;
+    }
+    else
+	  	displayText("echoNestedArray passed");
+  }
+
+  soap_end(soap);
+  if (ok)
+  	displayText("All Passed");
+  	else
+	  displayText("FAILURES");
+
+  return 0;
+}
+
+static struct Namespace namespaces[] =
+{
+  {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"},
+  {"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/"},
+  //{"SOAP-ENV", "http://www.w3.org/2002/06/soap-envelope"},	// SOAP 1.2
+  //{"SOAP-ENC", "http://www.w3.org/2002/06/soap-encoding"},	// SOAP 1.2
+  {"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance"},
+  {"xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema"},
+  {"ns", "http://soapinterop.org/"},
+  {"s", "http://soapinterop.org/xsd"},
+  {NULL, NULL}
+};
diff --git a/gsoap-palm/interop/src/interop2Ctest.cpp b/gsoap-palm/interop/src/interop2Ctest.cpp
new file mode 100644
index 0000000..5d943d5
--- /dev/null
+++ b/gsoap-palm/interop/src/interop2Ctest.cpp
@@ -0,0 +1,179 @@
+//===================================================================================
+//
+//    (C) COPYRIGHT International Business Machines Corp., 2002 All Rights Reserved
+//    Licensed Materials - Property of IBM
+//    US Government Users Restricted Rights - Use, duplication or
+//    disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
+//
+//    IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+//    ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+//    PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+//    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+//    USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+//    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
+//    OR PERFORMANCE OF THIS SOFTWARE.
+//
+//    The program may be used, executed, copied, modified, and distributed
+//    without royalty for the purpose of developing, using, marketing, or distributing.
+// 
+//=======================================================================================
+// gSOAP v2 Interop B test round 2
+#include "soapH.h"
+extern "C" void displayText(char *text);
+extern "C" int interopC(const char *site);
+
+
+struct Namespace namespacesC[] =
+{ {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"},
+  {"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/"},
+  {"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance"},
+  {"xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema"},
+  {"m", "http://soapinterop.org/"},
+  {"s", "http://soapinterop.org/xsd"},
+  {"a", "http://xml.apache.org/xml-soap"},
+  {"h", "http://soapinterop.org/echoheader/"},
+  {NULL, NULL}
+};
+int interopC(const char *url)
+{ struct soap *soap;
+  char *site=(char*)url;
+  bool ok=true;
+  xsd__int n = 42;
+  float f  = 3.40282e+38;
+  struct SOAP_ENV__Header h;
+  struct m__echoVoidResponse r;
+  struct s__SOAPStruct s;
+
+  h.h__echoMeStringRequest = NULL;
+  h.h__echoMeStringRequest_ = NULL;
+  h.h__echoMeStringResponse = NULL;
+  h.h__echoMeStructRequest = NULL;
+  h.h__echoMeStructRequest_ = NULL;
+  h.h__echoMeStructResponse = NULL;
+  h.h__someUnknownRequest = NULL;
+  h.h__someUnknownRequest_ = NULL;
+  s.varString = "hello world";
+  s.varInt = &n;
+  s.varFloat = &f;
+
+
+  displayText("running test C on");
+  displayText((char*)url);
+  soap = soap_new();
+  soap->namespaces = (struct Namespace *)namespacesC;
+
+  soap->send_timeout = 300;
+  soap->recv_timeout = 300;
+
+  // request from client (with mustUnderstand="0", recipient is target)
+  h.h__echoMeStringRequest = "hello world";
+  soap->header = &h;
+  soap->actor = "http://schemas.xmlsoap.org/soap/actor/next";
+  if (soap_call_m__echoVoid(soap, site, "http://soapinterop.org/", r))
+  { 
+    displayText("echo1 failed");
+    ok=false;
+  }
+  else
+    displayText("echo1 passed");
+
+  // request from client (with mustUnderstand="0", recipient is not target)
+  soap->header = &h;
+  soap->actor = "http://some/other/actor";
+  if (soap_call_m__echoVoid(soap, site, "http://soapinterop.org/", r))
+  { 
+    displayText("echo2 failed");
+    ok=false;
+  }
+  else
+    displayText("echo2 passed");
+
+  // request from client (with mustUnderstand="1", recipient is target)
+  h.h__echoMeStringRequest = NULL;
+  h.h__echoMeStructRequest_ = &s;
+  soap->header = &h;
+  soap->actor = "http://schemas.xmlsoap.org/soap/actor/next";
+  if (soap_call_m__echoVoid(soap, site, "http://soapinterop.org/", r))
+  { 
+    displayText("echo3 failed");
+    ok=false;
+  }
+  else
+    displayText("echo3 passed");
+
+  // request from client (with mustUnderstand="1", recipient is not target)
+  soap->header = &h;
+  soap->actor = "http://some/other/actor";
+  if (soap_call_m__echoVoid(soap,site, "http://soapinterop.org/", r))
+  { 
+    displayText("echo4 failed");
+    ok=false;
+  }
+  else if (soap->header && soap->header->h__echoMeStructResponse)
+  { 
+    displayText("echo4 should be no response header");
+    ok=false;
+   }
+  else
+    displayText("echo4 passed");
+
+  // Unknown header element: request from client (with mustUnderstand="0", recipient is target)
+  h.h__echoMeStructRequest_ = NULL;
+  h.h__someUnknownRequest = "XYZ";
+  soap->header = &h;
+  soap->actor = "http://schemas.xmlsoap.org/soap/actor/next";
+  if (soap_call_m__echoVoid(soap, site, "http://soapinterop.org/", r))
+  { 
+    displayText("echo5 failed");
+    ok=false;
+  }
+  else
+    displayText("echo5 passed");
+
+  // Unknown header element: request from client (with mustUnderstand="1", recipient is target)
+  h.h__someUnknownRequest = NULL;
+  h.h__someUnknownRequest_ = "XYZ";
+  soap->header = &h;
+  soap->actor = "http://schemas.xmlsoap.org/soap/actor/next";
+  if (soap_call_m__echoVoid(soap, site, "http://soapinterop.org/", r) != SOAP_MUSTUNDERSTAND)
+  { 
+    displayText("echo6 failed");
+    ok=false;
+  }
+  else
+    displayText("echo6 passed");
+
+  // Unknown header element: request from client (with mustUnderstand="0", recipient is not target)
+  h.h__someUnknownRequest_ = NULL;
+  h.h__someUnknownRequest = "XYZ";
+  soap->header = &h;
+  soap->actor = "http://some/other/actor";
+  if (soap_call_m__echoVoid(soap, site, "http://soapinterop.org/", r))
+  { 
+    displayText("echo7 failed");
+    ok=false;
+  }
+  else
+    displayText("echo7 passed");
+
+  // Unknown header element: request from client (with mustUnderstand="1", recipient is not target)
+  h.h__someUnknownRequest = NULL;
+  h.h__someUnknownRequest_ = "XYZ";
+  soap->header = &h;
+  soap->actor = "http://some/other/actor";
+  if (soap_call_m__echoVoid(soap, site, "http://soapinterop.org/", r))
+  { 
+    displayText("echo8 failed");
+    ok=false;
+  }
+  else
+    displayText("echo8 passed");
+
+  soap_end(soap);
+  if (ok)
+  	displayText("All Passed");
+  else
+	  displayText("FAILURES");
+
+  return 0;
+}
diff --git a/gsoap-palm/interop/src/interop2test.cpp b/gsoap-palm/interop/src/interop2test.cpp
new file mode 100644
index 0000000..ed51b39
--- /dev/null
+++ b/gsoap-palm/interop/src/interop2test.cpp
@@ -0,0 +1,387 @@
+//===================================================================================
+//
+//    (C) COPYRIGHT International Business Machines Corp., 2002 All Rights Reserved
+//    Licensed Materials - Property of IBM
+//    US Government Users Restricted Rights - Use, duplication or
+//    disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
+//
+//    IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+//    ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+//    PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+//    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+//    USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+//    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
+//    OR PERFORMANCE OF THIS SOFTWARE.
+//
+//    The program may be used, executed, copied, modified, and distributed
+//    without royalty for the purpose of developing, using, marketing, or distributing.
+// 
+//=======================================================================================
+// gSOAP v2 Interop test round 2 base
+//#include "interoptA.h"
+#include "soapH.h" 
+
+extern "C" void displayText(char *text);
+extern "C" int interoptA(const char *url);
+
+void dumpHex(char *result, const void *p,int count);
+void dumpHex(char *result, const void *p,int count)
+{
+  unsigned char *ptr = (unsigned char *)p;
+  int i=0;
+  for (i=0; i<count; i++)
+  { unsigned char c = *ptr; 
+    ptr++;
+  	sprintf(result," %2x",c);
+  	result+=strlen(result);
+  }
+  
+}
+
+int interoptA(const char *url)
+{ 
+  struct soap *soap;
+  int i, g;
+  xsd__string so, si = "Hello World! <>&";
+  struct ArrayOfstring Asi, Aso;
+  xsd__int no, ni = 1234567890;
+  xsd__int n = 2147483647;
+  struct ArrayOfint Ani, Ano;
+  xsd__float f1 = 123.5678;
+  xsd__float f2 = 3.14;
+  xsd__float fo, fi = 123.5;
+#ifdef SYMBIAN
+  const struct soap_double_nan { unsigned int n1, n2; } soap_double_nan;
+#endif
+  xsd__float nan = FLT_NAN, inf = FLT_PINFTY, ninf = FLT_NINFTY;
+  struct ArrayOffloat Afi, Afo;
+  struct s__SOAPStruct sti, *p;
+  struct ns__echoStructResponse sto;
+  struct ArrayOfSOAPStruct Asti, Asto;
+  struct ns__echoVoidResponse Rv;
+  struct xsd__base64Binary b64i, b64o;
+  xsd__dateTime dto, dti = "1967-12-29T01:02:03";
+  struct xsd__hexBinary hbi, hbo;
+  xsd__decimal Do, Di = "1234567890.123456789";
+  xsd__boolean bo, bi = true;
+  displayText("running test A on");
+  displayText((char*)url);
+  soap = soap_new();
+  soap->namespaces = (struct Namespace *)namespaces;
+
+//  soap.send_timeout = 30;
+//  soap.recv_timeout = 30;
+
+
+  Asi.__size = 8;
+  Asi.__offset = 0;
+  Asi.__ptr = (xsd__string*)malloc(Asi.__size*sizeof(xsd__string));
+  Asi.__ptr[0] = NULL;
+  Asi.__ptr[1] = " Hello\tWorld";
+  Asi.__ptr[2] = NULL;
+  Asi.__ptr[3] = "! ";
+  Asi.__ptr[4] = NULL;
+  Asi.__ptr[5] = si;
+  Asi.__ptr[6] = NULL;
+  Asi.__ptr[7] = si;
+
+  Ani.__size = 0;
+  Ani.__offset = 0;
+  Ani.__ptr = NULL; // (xsd__int*)malloc(Ani.__size*sizeof(xsd__int));
+
+  Afi.__size = 5;
+  Afi.__offset = 0;
+  Afi.__ptr = (xsd__float**)malloc(Afi.__size*sizeof(xsd__float*));
+  Afi.__ptr[0] = &f1;
+  Afi.__ptr[1] = &f1; // FLT_NAN;
+  Afi.__ptr[2] = &inf; // FLT_PINFTY;
+  Afi.__ptr[3] = &ninf; // FLT_NINFTY;
+  Afi.__ptr[4] = &f2;
+
+  sti.varString = "Hello";
+  sti.varInt = &n;
+  sti.varFloat = &f1;
+
+  Asti.__size = 3;
+  Asti.__offset = 2;
+  Asti.__ptr = (struct s__SOAPStruct**)malloc((Asti.__size+1)*sizeof(struct s__SOAPStruct*));
+  p = (struct s__SOAPStruct*)malloc(Asti.__size*sizeof(struct s__SOAPStruct));
+  Asti.__ptr[0] = p;
+  Asti.__ptr[1] = p+1;
+  Asti.__ptr[2] = p+2;
+  Asti.__ptr[3] = p;
+  Asti.__ptr[0]->varString = "Hello";
+  Asti.__ptr[0]->varInt = &n;
+  Asti.__ptr[0]->varFloat = &f1;
+  Asti.__ptr[1]->varString = "World";
+  Asti.__ptr[1]->varInt = &n;
+  Asti.__ptr[1]->varFloat = &f2;
+  Asti.__ptr[2]->varString = "!";
+  Asti.__ptr[2]->varInt = &n;
+  Asti.__ptr[2]->varFloat = &f2;
+
+  unsigned char b64data[4]={0x80, 0x81, 0x82, 0x83};
+  b64i.__ptr = b64data;
+  b64i.__size = 4;
+
+  hbi.__ptr = (unsigned char*)"This is an example HexBinary encoded string";
+  hbi.__size = strlen((char*)hbi.__ptr)+1;
+  char *site=(char*)url;
+  char* action = "http://soapinterop.org/";
+  
+  bool ok=true;
+  
+  if (soap_call_ns__echoString(soap, site, action, si, so))
+  { 
+    displayText("echoString failed");
+    ok=false;
+  }
+  else if (!so || strcmp(si, so))
+  { 
+    ok=false;
+    displayText("echoString mismatch");
+  }
+  else
+    displayText("echoString pass");
+ 
+
+  if (soap_call_ns__echoInteger(soap, site, "http://soapinterop.org/", ni, no))
+  { 
+    ok=false;
+    displayText("echoInteger fail");
+  }
+  else if (ni != no)
+  {  
+    ok=false;
+    displayText("echoInteger mismatch");
+  }
+  else
+    displayText("echoInteger pass");
+
+  if (soap_call_ns__echoFloat(soap, site, "http://soapinterop.org/", fi, fo))
+  { 
+    ok=false;
+    displayText("echoFloat fail");
+  }
+  else if (fi != fo)
+  {  
+    ok=false;
+    displayText("echoFloat mismatch");
+  }
+  else
+    displayText("echoFloat pass");
+
+  if (soap_call_ns__echoStruct(soap, site, "http://soapinterop.org/", sti, sto))
+  { 
+    ok=false;
+  displayText("echoStruct fail");
+  }
+  else if (!sto._return.varString || strcmp(sti.varString, sto._return.varString)
+  	 || !sto._return.varInt || *sti.varInt != *sto._return.varInt 
+  	 || !sto._return.varFloat || *sti.varFloat != *sto._return.varFloat)
+  { 
+    ok=false;
+	  displayText("echoStruct mismatch");
+  }
+  else 
+    displayText("echoStruct pass");
+
+  if (soap_call_ns__echoStringArray(soap, site, "http://soapinterop.org/", Asi, Aso))
+  {
+     soap_set_fault(soap); 
+    soap_faultdetail(soap);
+    ok=false;
+  displayText("echoStringArray fail");
+  }
+  else
+  { g = 0;
+    if (Asi.__size != Aso.__size)
+      g = 1;
+    else
+      for (i = 0; i < Asi.__size; i++)
+        if (Asi.__ptr[i] && Aso.__ptr[i] && strcmp(Asi.__ptr[i], Aso.__ptr[i]))
+          g = 1;
+        else if (!Asi.__ptr[i])
+	  ;
+        else if (Asi.__ptr[i] && !Aso.__ptr[i])
+	  g = 1;
+    if (g)
+    {
+    ok=false;
+    displayText("echoStringArray mismatch"); 
+    }
+    else
+     displayText("echoStringArray pass");
+  }
+
+  if (soap_call_ns__echoIntegerArray(soap, site, "http://soapinterop.org/", Ani, Ano))
+  { displayText("echoIntegerArray fail");
+    ok=false;
+  }
+  else
+  { g = 0;
+    if (Ani.__size != Ano.__size)
+      g = 1;
+    else
+      for (i = 0; i < Ani.__size; i++)
+        if (Ani.__ptr[i] && (!Ano.__ptr[i] || *Ani.__ptr[i] != *Ano.__ptr[i]))
+          g = 1;
+    if (g)
+    { displayText("echoIntegerArray mismatch");
+    ok=false;
+    }
+    else
+      displayText("echoIntegerArray pass");
+  }
+
+  if (soap_call_ns__echoFloatArray(soap, site, "http://soapinterop.org/", Afi, Afo))
+  { displayText("echoFloatArray fail");
+    ok=false;
+  }
+  else
+  { g = 0;
+    if (Afi.__size != Afo.__size)
+      g = 1;
+    else
+      for (i = 0; i < Afi.__size; i++)
+        if (Afi.__ptr[i] && Afo.__ptr[i] && soap_isnan(*Afi.__ptr[i]) && soap_isnan(*Afo.__ptr[i]))
+          ;
+        else if (Afi.__ptr[i] && (!Afo.__ptr[i] || *Afi.__ptr[i] != *Afo.__ptr[i]))
+          g = 1;
+    if (g)
+    { displayText("echoFloatArray mismatch");
+    ok=false;
+    }
+    else
+     displayText("echoFloatArray pass");
+  }
+
+  if (soap_call_ns__echoStructArray(soap, site, "http://soapinterop.org/", Asti, Asto))
+  { displayText("echoStructArray fail");
+    ok=false;
+  }
+  else
+  { g = 0;
+    if (Asti.__size+Asti.__offset != Asto.__size+Asto.__offset)
+      g = 1;
+    else
+      for (i = Asti.__offset; i < Asti.__size+Asti.__offset; i++)
+        if (!Asto.__ptr[i-Asto.__offset] ||
+	!Asto.__ptr[i-Asto.__offset]->varString ||
+	strcmp(Asti.__ptr[i-Asti.__offset]->varString, Asto.__ptr[i-Asto.__offset]->varString) ||
+	!Asto.__ptr[i-Asto.__offset]->varInt ||
+	*Asti.__ptr[i-Asti.__offset]->varInt != *Asto.__ptr[i-Asto.__offset]->varInt ||
+	!Asto.__ptr[i-Asto.__offset]->varFloat ||
+	*Asti.__ptr[i-Asti.__offset]->varFloat != *Asto.__ptr[i-Asto.__offset]->varFloat)
+          g = 1;
+    if (g)
+    { displayText("echoStructArray mismatch");
+    ok=false;
+    }
+    else
+      displayText("echoStructArray pass");
+  }
+
+  if (soap_call_ns__echoVoid(soap, site, "http://soapinterop.org/", Rv))
+  { displayText("echoVoid fail");
+    ok=false;
+  }
+  else
+    displayText("echoVoid pass");
+  
+  {
+    int S1=sizeof(int);
+    int S2= sizeof (size_t);
+    int S3=sizeof(0);
+    }
+
+  if (soap_call_ns__echoBase64(soap, site, "http://soapinterop.org/", b64i, b64o))
+  { displayText("echoBase64 fail");
+    ok=false;
+  }
+  else if ((b64i.__size+2)/3 != (b64o.__size+2)/3 || strncmp((char*)b64i.__ptr, (char*)b64o.__ptr,b64i.__size))
+  { 
+  displayText("echoBase64 mismatch");
+    ok=false;
+  }
+  else
+   displayText("echoBase64 pass");
+
+  if (soap_call_ns__echoDate(soap, site, "http://soapinterop.org/", dti, dto))
+  { 
+  displayText("echoDate fail");
+    ok=false;
+  }
+  else if (!dto || strncmp(dti, dto, 19))
+  { 
+  displayText("echoDate mismatch");
+    ok=false;
+  }
+  else
+    displayText("echoDate pass");
+ 
+
+  if (soap_call_ns__echoHexBinary(soap, site, "http://soapinterop.org/", hbi, hbo))
+  { 
+    ok=false;
+  displayText("echoHexBinary fail");
+  }
+  else if (hbi.__size != hbo.__size || strcmp((char*)hbi.__ptr, (char*)hbo.__ptr))
+  { 
+    ok=false;
+  displayText("echoHexBinary mismatch");
+  }
+  else
+    displayText("echoHexBinary pass");
+ 
+
+  if (soap_call_ns__echoDecimal(soap, site, "http://soapinterop.org/", Di, Do))
+  { 
+    ok=false;
+  displayText("echoDecimal pass");
+  }
+  else if (strcmp(Di, Do))
+  { 
+    ok=false;
+  displayText("echoDecimal mismatch");
+  }
+  else
+    displayText("echoDecimal pass");
+  
+
+  if (soap_call_ns__echoBoolean(soap, site, "http://soapinterop.org/", bi, bo))
+  { 
+    ok=false;
+    displayText("echoBoolean fail");
+  }
+  else if (bi != bo)
+  { 
+    ok=false;
+    displayText("echoBoolean mismatch");
+  }
+  else
+    displayText("echoBoolean pass");
+
+  soap_end(soap);
+  soap_done(soap);
+  if (ok)
+  	displayText("ALL PASS");
+  else
+	displayText("FAILURES");
+  return 0;
+  
+end:
+  return 1;
+}
+
+struct Namespace namespaces[] =
+{ {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"},
+  {"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/"},
+  {"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance"},
+  {"xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema"},
+  {"ns", "http://soapinterop.org/"},
+  {"s", "http://soapinterop.org/xsd"},
+  {"a", "http://xml.apache.org/xml-soap"},
+  {"h", "http://soapinterop.org/echoheader/"},
+  {NULL, NULL}
+};
\ No newline at end of file
diff --git a/gsoap-palm/interop/src/interop_all.h b/gsoap-palm/interop/src/interop_all.h
new file mode 100644
index 0000000..9c98af1
--- /dev/null
+++ b/gsoap-palm/interop/src/interop_all.h
@@ -0,0 +1,136 @@
+// Interop test base round 2
+
+//gsoap ns service name:	interop2
+//gsoap ns service style:	rpc
+//gsoap ns service encoding:	encoded
+//gsoap ns service namespace:	http://soapinterop.org/wsdl
+
+//gsoap ns schema namespace: http://soapinterop.org/
+//gsoap s schema namespace: http://soapinterop.org/xsd
+//gsoap a schema namespace: http://xml.apache.org/xml-soap
+
+typedef char *xsd__string;
+ns__echoString(xsd__string inputString, xsd__string &_return);
+
+struct ArrayOfstring { xsd__string *__ptr; int __size; int __offset; };
+ns__echoStringArray(struct ArrayOfstring inputStringArray, struct ArrayOfstring &_return);
+
+typedef long xsd__int;
+ns__echoInteger(xsd__int inputInteger, xsd__int &_return);
+
+struct ArrayOfint { xsd__int **__ptr; int __size; int __offset; };
+ns__echoIntegerArray(struct ArrayOfint inputIntegerArray, struct ArrayOfint &_return);
+
+typedef float xsd__float;
+ns__echoFloat(xsd__float inputFloat, xsd__float &_return);
+
+struct ArrayOffloat { xsd__float **__ptr; int __size; int __offset; };
+ns__echoFloatArray(struct ArrayOffloat inputFloatArray, struct ArrayOffloat &_return);
+
+struct s__SOAPStruct
+{ xsd__string varString;
+  xsd__int *varInt;
+  xsd__float *varFloat;
+};
+ns__echoStruct(struct s__SOAPStruct _inputStruct, struct ns__echoStructResponse { struct s__SOAPStruct _return; } &result);
+
+struct ArrayOfSOAPStruct { struct s__SOAPStruct **__ptr; int __size; int __offset; };
+ns__echoStructArray(struct ArrayOfSOAPStruct inputStructArray, struct ArrayOfSOAPStruct &_return);
+
+ns__echoVoid(struct ns__echoVoidResponse { } &result);
+
+struct xsd__base64Binary { unsigned char *__ptr; int __size; };
+ns__echoBase64(struct xsd__base64Binary inputBase64, struct xsd__base64Binary &_return);
+
+typedef char *xsd__dateTime;
+ns__echoDate(xsd__dateTime inputDate, xsd__dateTime &_return);
+
+struct xsd__hexBinary { unsigned char *__ptr; int __size; };
+ns__echoHexBinary(struct xsd__hexBinary inputHexBinary, struct xsd__hexBinary &_return);
+
+typedef char *xsd__decimal;
+ns__echoDecimal(xsd__decimal inputDecimal, xsd__decimal &_return);
+
+typedef bool xsd__boolean;
+ns__echoBoolean(xsd__boolean inputBoolean, xsd__boolean &_return);
+
+// Interop test B round 2
+
+ns__echoStructAsSimpleTypes
+(	struct	s__SOAPStruct _inputStruct,
+	struct	ns__echoStructAsSimpleTypesResponse
+	{	xsd__string	_outputString;
+		xsd__int	*_outputInteger;
+		xsd__float	*_outputFloat;
+	} &	result
+);
+
+ns__echoSimpleTypesAsStruct
+(	xsd__string	inputString,
+	xsd__int	*inputInteger,
+	xsd__float	*inputFloat,
+	struct	ns__echoSimpleTypesAsStructResponse
+	{	struct	s__SOAPStruct	_return;
+	} &	result
+);
+
+struct	ArrayOfstring2D
+{	xsd__string *	__ptr;
+	int		__size[2];
+	int		__offset[2];
+};
+
+ns__echo2DStringArray(struct ArrayOfstring2D _input2DStringArray, struct ArrayOfstring2D &_return);
+
+struct	s__SOAPStructStruct
+{	xsd__string		varString;
+	xsd__int *		varInt;
+	xsd__float *		varFloat;
+	struct	s__SOAPStruct *	varStruct;
+};
+
+ns__echoNestedStruct
+(	struct	s__SOAPStructStruct	_inputStruct,
+	struct	ns__echoNestedStructResponse
+	{	struct	s__SOAPStructStruct	_return;
+	} &	result
+);
+
+struct	s__SOAPArrayStruct
+{	xsd__string		varString;
+	xsd__int *		varInt;
+	xsd__float *		varFloat;
+	struct	ArrayOfstring	varArray;
+};
+
+ns__echoNestedArray
+(	struct	s__SOAPArrayStruct	_inputStruct,
+	struct	ns__echoNestedArrayResponse
+	{	struct	s__SOAPArrayStruct	_return;
+	} &	result
+);
+
+// Interop test C round 2
+
+//gsoap h schema namespace: http://soapinterop.org/echoheader/
+struct SOAP_ENV__Header
+{	char *					h__echoMeStringRequest;
+	mustUnderstand char *			h__echoMeStringRequest_;
+	char *					h__echoMeStringResponse;
+	struct s__SOAPStruct *			h__echoMeStructRequest;
+	mustUnderstand struct s__SOAPStruct *	h__echoMeStructRequest_;
+	struct s__SOAPStruct *			h__echoMeStructResponse;
+	char *					h__someUnknownRequest;	// do not include in server
+	mustUnderstand char *			h__someUnknownRequest_;	// do not include in server
+};
+
+//gsoap m service name: interop2C
+//gsoap m service style: rpc
+//gsoap m service encoding: encoded
+//gsoap m service port: http://www.cs.fsu.edu/~engelen/interop2C.cgi
+//gsoap m service namespace: http://soapinterop.org/
+//gsoap m service method-input-header-part: echoVoid h__echoMeStringRequest
+//gsoap m service method-input-header-part: echoVoid h__echoMeStructRequest
+//gsoap m service method-output-header-part: echoVoid h__echoMeStringResponse
+//gsoap m service method-output-header-part: echoVoid h__echoMeStructResponse
+int m__echoVoid(struct m__echoVoidResponse { } &result);
diff --git a/gsoap-palm/interop/src/soapC2.cpp b/gsoap-palm/interop/src/soapC2.cpp
new file mode 100644
index 0000000..e73f5c0
--- /dev/null
+++ b/gsoap-palm/interop/src/soapC2.cpp
@@ -0,0 +1,3114 @@
+
+#include "soapH.h"
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoNestedArray(struct soap *soap, const struct ns__echoNestedArray *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_s__SOAPArrayStruct(soap, &a->_inputStruct);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoNestedArray(struct soap *soap, struct ns__echoNestedArray *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_s__SOAPArrayStruct(soap, &a->_inputStruct);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoNestedArray(struct soap *soap, const struct ns__echoNestedArray *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoNestedArray);
+	if (soap_out_ns__echoNestedArray(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoNestedArray(struct soap *soap, const char *tag, int id, const struct ns__echoNestedArray *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoNestedArray), type);
+	soap_out_s__SOAPArrayStruct(soap, "inputStruct", -1, &a->_inputStruct, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoNestedArray * SOAP_FMAC4 soap_get_ns__echoNestedArray(struct soap *soap, struct ns__echoNestedArray *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoNestedArray(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoNestedArray * SOAP_FMAC4 soap_in_ns__echoNestedArray(struct soap *soap, const char *tag, struct ns__echoNestedArray *a, const char *type)
+{
+	short soap_flag__inputStruct = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoNestedArray *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoNestedArray, sizeof(struct ns__echoNestedArray), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoNestedArray(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag__inputStruct && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_s__SOAPArrayStruct(soap, NULL, &a->_inputStruct, "s:SOAPArrayStruct"))
+				{	soap_flag__inputStruct--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag__inputStruct > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoNestedArray *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoNestedArray, 0, sizeof(struct ns__echoNestedArray), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoNestedArray * SOAP_FMAC6 soap_new_ns__echoNestedArray(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoNestedArray(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoNestedArray(struct soap *soap, struct ns__echoNestedArray *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoNestedArray * SOAP_FMAC4 soap_instantiate_ns__echoNestedArray(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoNestedArray(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoNestedArray, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoNestedArray;
+		if (size)
+			*size = sizeof(struct ns__echoNestedArray);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoNestedArray[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoNestedArray);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoNestedArray*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoNestedArray(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoNestedArray %p -> %p\n", q, p));
+	*(struct ns__echoNestedArray*)p = *(struct ns__echoNestedArray*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoNestedArrayResponse(struct soap *soap, const struct ns__echoNestedArrayResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_s__SOAPArrayStruct(soap, &a->_return);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoNestedArrayResponse(struct soap *soap, struct ns__echoNestedArrayResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_s__SOAPArrayStruct(soap, &a->_return);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoNestedArrayResponse(struct soap *soap, const struct ns__echoNestedArrayResponse *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoNestedArrayResponse);
+	if (soap_out_ns__echoNestedArrayResponse(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoNestedArrayResponse(struct soap *soap, const char *tag, int id, const struct ns__echoNestedArrayResponse *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoNestedArrayResponse), type);
+	soap_element_result(soap, "return");
+	soap_out_s__SOAPArrayStruct(soap, "return", -1, &a->_return, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoNestedArrayResponse * SOAP_FMAC4 soap_get_ns__echoNestedArrayResponse(struct soap *soap, struct ns__echoNestedArrayResponse *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoNestedArrayResponse(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoNestedArrayResponse * SOAP_FMAC4 soap_in_ns__echoNestedArrayResponse(struct soap *soap, const char *tag, struct ns__echoNestedArrayResponse *a, const char *type)
+{
+	short soap_flag__return = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoNestedArrayResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoNestedArrayResponse, sizeof(struct ns__echoNestedArrayResponse), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoNestedArrayResponse(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag__return && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_s__SOAPArrayStruct(soap, NULL, &a->_return, "s:SOAPArrayStruct"))
+				{	soap_flag__return--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag__return > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoNestedArrayResponse *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoNestedArrayResponse, 0, sizeof(struct ns__echoNestedArrayResponse), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoNestedArrayResponse * SOAP_FMAC6 soap_new_ns__echoNestedArrayResponse(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoNestedArrayResponse(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoNestedArrayResponse(struct soap *soap, struct ns__echoNestedArrayResponse *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoNestedArrayResponse * SOAP_FMAC4 soap_instantiate_ns__echoNestedArrayResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoNestedArrayResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoNestedArrayResponse, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoNestedArrayResponse;
+		if (size)
+			*size = sizeof(struct ns__echoNestedArrayResponse);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoNestedArrayResponse[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoNestedArrayResponse);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoNestedArrayResponse*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoNestedArrayResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoNestedArrayResponse %p -> %p\n", q, p));
+	*(struct ns__echoNestedArrayResponse*)p = *(struct ns__echoNestedArrayResponse*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_s__SOAPArrayStruct(struct soap *soap, const struct s__SOAPArrayStruct *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_xsd__string(soap, &a->varString);
+	soap_serialize_PointerToxsd__int(soap, &a->varInt);
+	soap_serialize_PointerToxsd__float(soap, &a->varFloat);
+	soap_serialize_ArrayOfstring(soap, &a->varArray);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_s__SOAPArrayStruct(struct soap *soap, struct s__SOAPArrayStruct *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_xsd__string(soap, &a->varString);
+	a->varInt = NULL;
+	a->varFloat = NULL;
+	soap_default_ArrayOfstring(soap, &a->varArray);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_s__SOAPArrayStruct(struct soap *soap, const struct s__SOAPArrayStruct *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_s__SOAPArrayStruct);
+	if (soap_out_s__SOAPArrayStruct(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_s__SOAPArrayStruct(struct soap *soap, const char *tag, int id, const struct s__SOAPArrayStruct *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_s__SOAPArrayStruct), type);
+	soap_out_xsd__string(soap, "varString", -1, &a->varString, "");
+	soap_out_PointerToxsd__int(soap, "varInt", -1, &a->varInt, "");
+	soap_out_PointerToxsd__float(soap, "varFloat", -1, &a->varFloat, "");
+	soap_out_ArrayOfstring(soap, "varArray", -1, &a->varArray, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct s__SOAPArrayStruct * SOAP_FMAC4 soap_get_s__SOAPArrayStruct(struct soap *soap, struct s__SOAPArrayStruct *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_s__SOAPArrayStruct(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct s__SOAPArrayStruct * SOAP_FMAC4 soap_in_s__SOAPArrayStruct(struct soap *soap, const char *tag, struct s__SOAPArrayStruct *a, const char *type)
+{
+	short soap_flag_varString = 1, soap_flag_varInt = 1, soap_flag_varFloat = 1, soap_flag_varArray = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct s__SOAPArrayStruct *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_s__SOAPArrayStruct, sizeof(struct s__SOAPArrayStruct), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_s__SOAPArrayStruct(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_varString && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
+				if (soap_in_xsd__string(soap, "varString", &a->varString, "xsd:string"))
+				{	soap_flag_varString--;
+					continue;
+				}
+			if (soap_flag_varInt && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_PointerToxsd__int(soap, "varInt", &a->varInt, "xsd:int"))
+				{	soap_flag_varInt--;
+					continue;
+				}
+			if (soap_flag_varFloat && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_PointerToxsd__float(soap, "varFloat", &a->varFloat, "xsd:float"))
+				{	soap_flag_varFloat--;
+					continue;
+				}
+			if (soap_flag_varArray && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_ArrayOfstring(soap, "varArray", &a->varArray, "xsd:string"))
+				{	soap_flag_varArray--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_varArray > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct s__SOAPArrayStruct *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_s__SOAPArrayStruct, 0, sizeof(struct s__SOAPArrayStruct), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct s__SOAPArrayStruct * SOAP_FMAC6 soap_new_s__SOAPArrayStruct(struct soap *soap, int n)
+{	return soap_instantiate_s__SOAPArrayStruct(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_s__SOAPArrayStruct(struct soap *soap, struct s__SOAPArrayStruct *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct s__SOAPArrayStruct * SOAP_FMAC4 soap_instantiate_s__SOAPArrayStruct(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_s__SOAPArrayStruct(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_s__SOAPArrayStruct, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct s__SOAPArrayStruct;
+		if (size)
+			*size = sizeof(struct s__SOAPArrayStruct);
+	}
+	else
+	{	cp->ptr = (void*)new struct s__SOAPArrayStruct[n];
+		if (size)
+			*size = n * sizeof(struct s__SOAPArrayStruct);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct s__SOAPArrayStruct*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_s__SOAPArrayStruct(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct s__SOAPArrayStruct %p -> %p\n", q, p));
+	*(struct s__SOAPArrayStruct*)p = *(struct s__SOAPArrayStruct*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoNestedStruct(struct soap *soap, const struct ns__echoNestedStruct *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_s__SOAPStructStruct(soap, &a->_inputStruct);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoNestedStruct(struct soap *soap, struct ns__echoNestedStruct *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_s__SOAPStructStruct(soap, &a->_inputStruct);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoNestedStruct(struct soap *soap, const struct ns__echoNestedStruct *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoNestedStruct);
+	if (soap_out_ns__echoNestedStruct(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoNestedStruct(struct soap *soap, const char *tag, int id, const struct ns__echoNestedStruct *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoNestedStruct), type);
+	soap_out_s__SOAPStructStruct(soap, "inputStruct", -1, &a->_inputStruct, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoNestedStruct * SOAP_FMAC4 soap_get_ns__echoNestedStruct(struct soap *soap, struct ns__echoNestedStruct *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoNestedStruct(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoNestedStruct * SOAP_FMAC4 soap_in_ns__echoNestedStruct(struct soap *soap, const char *tag, struct ns__echoNestedStruct *a, const char *type)
+{
+	short soap_flag__inputStruct = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoNestedStruct *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoNestedStruct, sizeof(struct ns__echoNestedStruct), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoNestedStruct(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag__inputStruct && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_s__SOAPStructStruct(soap, NULL, &a->_inputStruct, "s:SOAPStructStruct"))
+				{	soap_flag__inputStruct--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag__inputStruct > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoNestedStruct *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoNestedStruct, 0, sizeof(struct ns__echoNestedStruct), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoNestedStruct * SOAP_FMAC6 soap_new_ns__echoNestedStruct(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoNestedStruct(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoNestedStruct(struct soap *soap, struct ns__echoNestedStruct *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoNestedStruct * SOAP_FMAC4 soap_instantiate_ns__echoNestedStruct(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoNestedStruct(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoNestedStruct, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoNestedStruct;
+		if (size)
+			*size = sizeof(struct ns__echoNestedStruct);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoNestedStruct[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoNestedStruct);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoNestedStruct*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoNestedStruct(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoNestedStruct %p -> %p\n", q, p));
+	*(struct ns__echoNestedStruct*)p = *(struct ns__echoNestedStruct*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoNestedStructResponse(struct soap *soap, const struct ns__echoNestedStructResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_s__SOAPStructStruct(soap, &a->_return);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoNestedStructResponse(struct soap *soap, struct ns__echoNestedStructResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_s__SOAPStructStruct(soap, &a->_return);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoNestedStructResponse(struct soap *soap, const struct ns__echoNestedStructResponse *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoNestedStructResponse);
+	if (soap_out_ns__echoNestedStructResponse(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoNestedStructResponse(struct soap *soap, const char *tag, int id, const struct ns__echoNestedStructResponse *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoNestedStructResponse), type);
+	soap_element_result(soap, "return");
+	soap_out_s__SOAPStructStruct(soap, "return", -1, &a->_return, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoNestedStructResponse * SOAP_FMAC4 soap_get_ns__echoNestedStructResponse(struct soap *soap, struct ns__echoNestedStructResponse *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoNestedStructResponse(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoNestedStructResponse * SOAP_FMAC4 soap_in_ns__echoNestedStructResponse(struct soap *soap, const char *tag, struct ns__echoNestedStructResponse *a, const char *type)
+{
+	short soap_flag__return = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoNestedStructResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoNestedStructResponse, sizeof(struct ns__echoNestedStructResponse), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoNestedStructResponse(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag__return && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_s__SOAPStructStruct(soap, NULL, &a->_return, "s:SOAPStructStruct"))
+				{	soap_flag__return--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag__return > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoNestedStructResponse *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoNestedStructResponse, 0, sizeof(struct ns__echoNestedStructResponse), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoNestedStructResponse * SOAP_FMAC6 soap_new_ns__echoNestedStructResponse(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoNestedStructResponse(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoNestedStructResponse(struct soap *soap, struct ns__echoNestedStructResponse *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoNestedStructResponse * SOAP_FMAC4 soap_instantiate_ns__echoNestedStructResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoNestedStructResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoNestedStructResponse, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoNestedStructResponse;
+		if (size)
+			*size = sizeof(struct ns__echoNestedStructResponse);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoNestedStructResponse[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoNestedStructResponse);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoNestedStructResponse*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoNestedStructResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoNestedStructResponse %p -> %p\n", q, p));
+	*(struct ns__echoNestedStructResponse*)p = *(struct ns__echoNestedStructResponse*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_s__SOAPStructStruct(struct soap *soap, const struct s__SOAPStructStruct *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_xsd__string(soap, &a->varString);
+	soap_serialize_PointerToxsd__int(soap, &a->varInt);
+	soap_serialize_PointerToxsd__float(soap, &a->varFloat);
+	soap_serialize_PointerTos__SOAPStruct(soap, &a->varStruct);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_s__SOAPStructStruct(struct soap *soap, struct s__SOAPStructStruct *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_xsd__string(soap, &a->varString);
+	a->varInt = NULL;
+	a->varFloat = NULL;
+	a->varStruct = NULL;
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_s__SOAPStructStruct(struct soap *soap, const struct s__SOAPStructStruct *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_s__SOAPStructStruct);
+	if (soap_out_s__SOAPStructStruct(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_s__SOAPStructStruct(struct soap *soap, const char *tag, int id, const struct s__SOAPStructStruct *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_s__SOAPStructStruct), type);
+	soap_out_xsd__string(soap, "varString", -1, &a->varString, "");
+	soap_out_PointerToxsd__int(soap, "varInt", -1, &a->varInt, "");
+	soap_out_PointerToxsd__float(soap, "varFloat", -1, &a->varFloat, "");
+	soap_out_PointerTos__SOAPStruct(soap, "varStruct", -1, &a->varStruct, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct s__SOAPStructStruct * SOAP_FMAC4 soap_get_s__SOAPStructStruct(struct soap *soap, struct s__SOAPStructStruct *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_s__SOAPStructStruct(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct s__SOAPStructStruct * SOAP_FMAC4 soap_in_s__SOAPStructStruct(struct soap *soap, const char *tag, struct s__SOAPStructStruct *a, const char *type)
+{
+	short soap_flag_varString = 1, soap_flag_varInt = 1, soap_flag_varFloat = 1, soap_flag_varStruct = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct s__SOAPStructStruct *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_s__SOAPStructStruct, sizeof(struct s__SOAPStructStruct), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_s__SOAPStructStruct(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_varString && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
+				if (soap_in_xsd__string(soap, "varString", &a->varString, "xsd:string"))
+				{	soap_flag_varString--;
+					continue;
+				}
+			if (soap_flag_varInt && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_PointerToxsd__int(soap, "varInt", &a->varInt, "xsd:int"))
+				{	soap_flag_varInt--;
+					continue;
+				}
+			if (soap_flag_varFloat && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_PointerToxsd__float(soap, "varFloat", &a->varFloat, "xsd:float"))
+				{	soap_flag_varFloat--;
+					continue;
+				}
+			if (soap_flag_varStruct && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_PointerTos__SOAPStruct(soap, "varStruct", &a->varStruct, "s:SOAPStruct"))
+				{	soap_flag_varStruct--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct s__SOAPStructStruct *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_s__SOAPStructStruct, 0, sizeof(struct s__SOAPStructStruct), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct s__SOAPStructStruct * SOAP_FMAC6 soap_new_s__SOAPStructStruct(struct soap *soap, int n)
+{	return soap_instantiate_s__SOAPStructStruct(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_s__SOAPStructStruct(struct soap *soap, struct s__SOAPStructStruct *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct s__SOAPStructStruct * SOAP_FMAC4 soap_instantiate_s__SOAPStructStruct(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_s__SOAPStructStruct(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_s__SOAPStructStruct, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct s__SOAPStructStruct;
+		if (size)
+			*size = sizeof(struct s__SOAPStructStruct);
+	}
+	else
+	{	cp->ptr = (void*)new struct s__SOAPStructStruct[n];
+		if (size)
+			*size = n * sizeof(struct s__SOAPStructStruct);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct s__SOAPStructStruct*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_s__SOAPStructStruct(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct s__SOAPStructStruct %p -> %p\n", q, p));
+	*(struct s__SOAPStructStruct*)p = *(struct s__SOAPStructStruct*)q;
+}
+
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echo2DStringArray(struct soap *soap, const struct ns__echo2DStringArray *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_ArrayOfstring2D(soap, &a->_input2DStringArray);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echo2DStringArray(struct soap *soap, struct ns__echo2DStringArray *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_ArrayOfstring2D(soap, &a->_input2DStringArray);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echo2DStringArray(struct soap *soap, const struct ns__echo2DStringArray *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echo2DStringArray);
+	if (soap_out_ns__echo2DStringArray(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echo2DStringArray(struct soap *soap, const char *tag, int id, const struct ns__echo2DStringArray *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echo2DStringArray), type);
+	soap_out_ArrayOfstring2D(soap, "input2DStringArray", -1, &a->_input2DStringArray, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echo2DStringArray * SOAP_FMAC4 soap_get_ns__echo2DStringArray(struct soap *soap, struct ns__echo2DStringArray *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echo2DStringArray(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echo2DStringArray * SOAP_FMAC4 soap_in_ns__echo2DStringArray(struct soap *soap, const char *tag, struct ns__echo2DStringArray *a, const char *type)
+{
+	short soap_flag__input2DStringArray = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echo2DStringArray *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echo2DStringArray, sizeof(struct ns__echo2DStringArray), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echo2DStringArray(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag__input2DStringArray && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_ArrayOfstring2D(soap, NULL, &a->_input2DStringArray, "xsd:string"))
+				{	soap_flag__input2DStringArray--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag__input2DStringArray > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echo2DStringArray *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echo2DStringArray, 0, sizeof(struct ns__echo2DStringArray), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echo2DStringArray * SOAP_FMAC6 soap_new_ns__echo2DStringArray(struct soap *soap, int n)
+{	return soap_instantiate_ns__echo2DStringArray(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echo2DStringArray(struct soap *soap, struct ns__echo2DStringArray *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echo2DStringArray * SOAP_FMAC4 soap_instantiate_ns__echo2DStringArray(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echo2DStringArray(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echo2DStringArray, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echo2DStringArray;
+		if (size)
+			*size = sizeof(struct ns__echo2DStringArray);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echo2DStringArray[n];
+		if (size)
+			*size = n * sizeof(struct ns__echo2DStringArray);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echo2DStringArray*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echo2DStringArray(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echo2DStringArray %p -> %p\n", q, p));
+	*(struct ns__echo2DStringArray*)p = *(struct ns__echo2DStringArray*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echo2DStringArrayResponse(struct soap *soap, const struct ns__echo2DStringArrayResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_ArrayOfstring2D(soap, &a->_return);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echo2DStringArrayResponse(struct soap *soap, struct ns__echo2DStringArrayResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_ArrayOfstring2D(soap, &a->_return);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echo2DStringArrayResponse(struct soap *soap, const struct ns__echo2DStringArrayResponse *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echo2DStringArrayResponse);
+	if (soap_out_ns__echo2DStringArrayResponse(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echo2DStringArrayResponse(struct soap *soap, const char *tag, int id, const struct ns__echo2DStringArrayResponse *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echo2DStringArrayResponse), type);
+	soap_element_result(soap, "return");
+	soap_out_ArrayOfstring2D(soap, "return", -1, &a->_return, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echo2DStringArrayResponse * SOAP_FMAC4 soap_get_ns__echo2DStringArrayResponse(struct soap *soap, struct ns__echo2DStringArrayResponse *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echo2DStringArrayResponse(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echo2DStringArrayResponse * SOAP_FMAC4 soap_in_ns__echo2DStringArrayResponse(struct soap *soap, const char *tag, struct ns__echo2DStringArrayResponse *a, const char *type)
+{
+	short soap_flag__return = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echo2DStringArrayResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echo2DStringArrayResponse, sizeof(struct ns__echo2DStringArrayResponse), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echo2DStringArrayResponse(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag__return && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_ArrayOfstring2D(soap, NULL, &a->_return, "xsd:string"))
+				{	soap_flag__return--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag__return > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echo2DStringArrayResponse *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echo2DStringArrayResponse, 0, sizeof(struct ns__echo2DStringArrayResponse), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echo2DStringArrayResponse * SOAP_FMAC6 soap_new_ns__echo2DStringArrayResponse(struct soap *soap, int n)
+{	return soap_instantiate_ns__echo2DStringArrayResponse(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echo2DStringArrayResponse(struct soap *soap, struct ns__echo2DStringArrayResponse *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echo2DStringArrayResponse * SOAP_FMAC4 soap_instantiate_ns__echo2DStringArrayResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echo2DStringArrayResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echo2DStringArrayResponse, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echo2DStringArrayResponse;
+		if (size)
+			*size = sizeof(struct ns__echo2DStringArrayResponse);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echo2DStringArrayResponse[n];
+		if (size)
+			*size = n * sizeof(struct ns__echo2DStringArrayResponse);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echo2DStringArrayResponse*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echo2DStringArrayResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echo2DStringArrayResponse %p -> %p\n", q, p));
+	*(struct ns__echo2DStringArrayResponse*)p = *(struct ns__echo2DStringArrayResponse*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ArrayOfstring2D(struct soap *soap, struct ArrayOfstring2D const*a)
+{
+	int i;
+	if (a->__ptr && !soap_array_reference(soap, a, (struct soap_array*)&a->__ptr, 2, SOAP_TYPE_ArrayOfstring2D))
+		for (i = 0; i < soap_size(a->__size, 2); i++)
+		{
+			soap_serialize_xsd__string(soap, a->__ptr + i);
+		}
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ArrayOfstring2D(struct soap *soap, struct ArrayOfstring2D *a)
+{
+	a->__ptr = NULL;
+	a->__size[0] = 0;
+	a->__offset[0] = 0;
+	a->__size[1] = 0;
+	a->__offset[1] = 0;
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ArrayOfstring2D(struct soap *soap, const struct ArrayOfstring2D *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, (struct soap_array*)&a->__ptr, 2, tag, SOAP_TYPE_ArrayOfstring2D);
+	if (soap_out_ArrayOfstring2D(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ArrayOfstring2D(struct soap *soap, const char *tag, int id, const struct ArrayOfstring2D *a, const char *type)
+{
+	int i, n = soap_size(a->__size, 2);
+	char *t = soap_putsizesoffsets(soap, "xsd:string", a->__size, a->__offset, 2);
+	id = soap_element_id(soap, tag, id, a, (struct soap_array*)&a->__ptr, 2, type, SOAP_TYPE_ArrayOfstring2D);
+	if (id < 0)
+		return soap->error;
+	soap_array_begin_out(soap, tag, id, t, soap_putoffsets(soap, a->__offset, 2));
+	for (i = 0; i < n; i++)
+	{
+		soap->position = 2;
+		soap->positions[0] = i/a->__size[1]%a->__size[0];
+		soap->positions[1] = i%a->__size[1];
+		soap_out_xsd__string(soap, "item", -1, &a->__ptr[i], "");
+	}
+	soap->position = 0;
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ArrayOfstring2D * SOAP_FMAC4 soap_get_ArrayOfstring2D(struct soap *soap, struct ArrayOfstring2D *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ArrayOfstring2D(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ArrayOfstring2D * SOAP_FMAC4 soap_in_ArrayOfstring2D(struct soap *soap, const char *tag, struct ArrayOfstring2D *a, const char *type)
+{	int i, j, n;
+	char **p;
+	if (soap_element_begin_in(soap, tag, 1))
+		return NULL;
+	if (soap_match_array(soap, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ArrayOfstring2D *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ArrayOfstring2D, sizeof(struct ArrayOfstring2D), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ArrayOfstring2D(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		n = soap_getsizes(soap->arraySize, a->__size, 2);
+		n -= j = soap_getoffsets(soap->arrayOffset, a->__size, a->__offset, 2);
+		if (n >= 0)
+		{	a->__ptr = (char **)soap_malloc(soap, n*sizeof(char *));
+			for (i = 0; i < n; i++)
+				a->__ptr[i] = NULL;
+			for (i = 0; i < n; i++)
+			{	soap_peek_element(soap);
+				if (soap->position == 2)
+				{	i = soap->positions[0]*a->__size[1]+soap->positions[1]-j;
+					if (i < 0 || i >= n)
+					{	soap->error = SOAP_IOB;
+						return NULL;
+					}
+				}
+				if (!soap_in_xsd__string(soap, NULL, a->__ptr + i, "xsd:string"))
+				{	if (soap->error != SOAP_NO_TAG)
+						return NULL;
+					soap->error = SOAP_OK;
+					break;
+				}
+			}
+		}
+		else
+		{	soap_new_block(soap);
+			for (a->__size[0] = 0; ; a->__size[0]++)
+			{	p = (char **)soap_push_block(soap, sizeof(char *));
+				if (!p)
+					return NULL;
+				*p = NULL;
+				if (!soap_in_xsd__string(soap, NULL, p, "xsd:string"))
+				{	if (soap->error != SOAP_NO_TAG)
+						return NULL;
+					soap->error = SOAP_OK;
+					break;
+				}
+			}
+			soap_pop_block(soap);
+			a->__ptr = (char **)soap_malloc(soap, soap->blist->size);
+			soap_save_block(soap, (char*)a->__ptr, 1);
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ArrayOfstring2D *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ArrayOfstring2D, 0, sizeof(struct ArrayOfstring2D), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ArrayOfstring2D * SOAP_FMAC6 soap_new_ArrayOfstring2D(struct soap *soap, int n)
+{	return soap_instantiate_ArrayOfstring2D(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ArrayOfstring2D(struct soap *soap, struct ArrayOfstring2D *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ArrayOfstring2D * SOAP_FMAC4 soap_instantiate_ArrayOfstring2D(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ArrayOfstring2D(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ArrayOfstring2D, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ArrayOfstring2D;
+		if (size)
+			*size = sizeof(struct ArrayOfstring2D);
+	}
+	else
+	{	cp->ptr = (void*)new struct ArrayOfstring2D[n];
+		if (size)
+			*size = n * sizeof(struct ArrayOfstring2D);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ArrayOfstring2D*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ArrayOfstring2D(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ArrayOfstring2D %p -> %p\n", q, p));
+	*(struct ArrayOfstring2D*)p = *(struct ArrayOfstring2D*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoSimpleTypesAsStruct(struct soap *soap, const struct ns__echoSimpleTypesAsStruct *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_xsd__string(soap, &a->inputString);
+	soap_serialize_PointerToxsd__int(soap, &a->inputInteger);
+	soap_serialize_PointerToxsd__float(soap, &a->inputFloat);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoSimpleTypesAsStruct(struct soap *soap, struct ns__echoSimpleTypesAsStruct *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_xsd__string(soap, &a->inputString);
+	a->inputInteger = NULL;
+	a->inputFloat = NULL;
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoSimpleTypesAsStruct(struct soap *soap, const struct ns__echoSimpleTypesAsStruct *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoSimpleTypesAsStruct);
+	if (soap_out_ns__echoSimpleTypesAsStruct(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoSimpleTypesAsStruct(struct soap *soap, const char *tag, int id, const struct ns__echoSimpleTypesAsStruct *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoSimpleTypesAsStruct), type);
+	soap_out_xsd__string(soap, "inputString", -1, &a->inputString, "");
+	soap_out_PointerToxsd__int(soap, "inputInteger", -1, &a->inputInteger, "");
+	soap_out_PointerToxsd__float(soap, "inputFloat", -1, &a->inputFloat, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoSimpleTypesAsStruct * SOAP_FMAC4 soap_get_ns__echoSimpleTypesAsStruct(struct soap *soap, struct ns__echoSimpleTypesAsStruct *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoSimpleTypesAsStruct(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoSimpleTypesAsStruct * SOAP_FMAC4 soap_in_ns__echoSimpleTypesAsStruct(struct soap *soap, const char *tag, struct ns__echoSimpleTypesAsStruct *a, const char *type)
+{
+	short soap_flag_inputString = 1, soap_flag_inputInteger = 1, soap_flag_inputFloat = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoSimpleTypesAsStruct *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoSimpleTypesAsStruct, sizeof(struct ns__echoSimpleTypesAsStruct), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoSimpleTypesAsStruct(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_inputString && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
+				if (soap_in_xsd__string(soap, "inputString", &a->inputString, "xsd:string"))
+				{	soap_flag_inputString--;
+					continue;
+				}
+			if (soap_flag_inputInteger && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_PointerToxsd__int(soap, "inputInteger", &a->inputInteger, "xsd:int"))
+				{	soap_flag_inputInteger--;
+					continue;
+				}
+			if (soap_flag_inputFloat && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_PointerToxsd__float(soap, "inputFloat", &a->inputFloat, "xsd:float"))
+				{	soap_flag_inputFloat--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoSimpleTypesAsStruct *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoSimpleTypesAsStruct, 0, sizeof(struct ns__echoSimpleTypesAsStruct), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoSimpleTypesAsStruct * SOAP_FMAC6 soap_new_ns__echoSimpleTypesAsStruct(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoSimpleTypesAsStruct(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoSimpleTypesAsStruct(struct soap *soap, struct ns__echoSimpleTypesAsStruct *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoSimpleTypesAsStruct * SOAP_FMAC4 soap_instantiate_ns__echoSimpleTypesAsStruct(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoSimpleTypesAsStruct(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoSimpleTypesAsStruct, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoSimpleTypesAsStruct;
+		if (size)
+			*size = sizeof(struct ns__echoSimpleTypesAsStruct);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoSimpleTypesAsStruct[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoSimpleTypesAsStruct);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoSimpleTypesAsStruct*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoSimpleTypesAsStruct(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoSimpleTypesAsStruct %p -> %p\n", q, p));
+	*(struct ns__echoSimpleTypesAsStruct*)p = *(struct ns__echoSimpleTypesAsStruct*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoSimpleTypesAsStructResponse(struct soap *soap, const struct ns__echoSimpleTypesAsStructResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_embedded(soap, &a->_return, SOAP_TYPE_s__SOAPStruct);
+	soap_serialize_s__SOAPStruct(soap, &a->_return);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoSimpleTypesAsStructResponse(struct soap *soap, struct ns__echoSimpleTypesAsStructResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_s__SOAPStruct(soap, &a->_return);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoSimpleTypesAsStructResponse(struct soap *soap, const struct ns__echoSimpleTypesAsStructResponse *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoSimpleTypesAsStructResponse);
+	if (soap_out_ns__echoSimpleTypesAsStructResponse(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoSimpleTypesAsStructResponse(struct soap *soap, const char *tag, int id, const struct ns__echoSimpleTypesAsStructResponse *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoSimpleTypesAsStructResponse), type);
+	soap_element_result(soap, "return");
+	soap_out_s__SOAPStruct(soap, "return", -1, &a->_return, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoSimpleTypesAsStructResponse * SOAP_FMAC4 soap_get_ns__echoSimpleTypesAsStructResponse(struct soap *soap, struct ns__echoSimpleTypesAsStructResponse *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoSimpleTypesAsStructResponse(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoSimpleTypesAsStructResponse * SOAP_FMAC4 soap_in_ns__echoSimpleTypesAsStructResponse(struct soap *soap, const char *tag, struct ns__echoSimpleTypesAsStructResponse *a, const char *type)
+{
+	short soap_flag__return = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoSimpleTypesAsStructResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoSimpleTypesAsStructResponse, sizeof(struct ns__echoSimpleTypesAsStructResponse), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoSimpleTypesAsStructResponse(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag__return && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_s__SOAPStruct(soap, NULL, &a->_return, "s:SOAPStruct"))
+				{	soap_flag__return--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag__return > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoSimpleTypesAsStructResponse *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoSimpleTypesAsStructResponse, 0, sizeof(struct ns__echoSimpleTypesAsStructResponse), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoSimpleTypesAsStructResponse * SOAP_FMAC6 soap_new_ns__echoSimpleTypesAsStructResponse(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoSimpleTypesAsStructResponse(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoSimpleTypesAsStructResponse(struct soap *soap, struct ns__echoSimpleTypesAsStructResponse *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoSimpleTypesAsStructResponse * SOAP_FMAC4 soap_instantiate_ns__echoSimpleTypesAsStructResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoSimpleTypesAsStructResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoSimpleTypesAsStructResponse, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoSimpleTypesAsStructResponse;
+		if (size)
+			*size = sizeof(struct ns__echoSimpleTypesAsStructResponse);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoSimpleTypesAsStructResponse[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoSimpleTypesAsStructResponse);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoSimpleTypesAsStructResponse*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoSimpleTypesAsStructResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoSimpleTypesAsStructResponse %p -> %p\n", q, p));
+	*(struct ns__echoSimpleTypesAsStructResponse*)p = *(struct ns__echoSimpleTypesAsStructResponse*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoStructAsSimpleTypes(struct soap *soap, const struct ns__echoStructAsSimpleTypes *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_embedded(soap, &a->_inputStruct, SOAP_TYPE_s__SOAPStruct);
+	soap_serialize_s__SOAPStruct(soap, &a->_inputStruct);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoStructAsSimpleTypes(struct soap *soap, struct ns__echoStructAsSimpleTypes *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_s__SOAPStruct(soap, &a->_inputStruct);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoStructAsSimpleTypes(struct soap *soap, const struct ns__echoStructAsSimpleTypes *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoStructAsSimpleTypes);
+	if (soap_out_ns__echoStructAsSimpleTypes(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoStructAsSimpleTypes(struct soap *soap, const char *tag, int id, const struct ns__echoStructAsSimpleTypes *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoStructAsSimpleTypes), type);
+	soap_out_s__SOAPStruct(soap, "inputStruct", -1, &a->_inputStruct, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoStructAsSimpleTypes * SOAP_FMAC4 soap_get_ns__echoStructAsSimpleTypes(struct soap *soap, struct ns__echoStructAsSimpleTypes *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoStructAsSimpleTypes(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoStructAsSimpleTypes * SOAP_FMAC4 soap_in_ns__echoStructAsSimpleTypes(struct soap *soap, const char *tag, struct ns__echoStructAsSimpleTypes *a, const char *type)
+{
+	short soap_flag__inputStruct = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoStructAsSimpleTypes *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoStructAsSimpleTypes, sizeof(struct ns__echoStructAsSimpleTypes), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoStructAsSimpleTypes(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag__inputStruct && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_s__SOAPStruct(soap, NULL, &a->_inputStruct, "s:SOAPStruct"))
+				{	soap_flag__inputStruct--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag__inputStruct > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoStructAsSimpleTypes *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoStructAsSimpleTypes, 0, sizeof(struct ns__echoStructAsSimpleTypes), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoStructAsSimpleTypes * SOAP_FMAC6 soap_new_ns__echoStructAsSimpleTypes(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoStructAsSimpleTypes(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoStructAsSimpleTypes(struct soap *soap, struct ns__echoStructAsSimpleTypes *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoStructAsSimpleTypes * SOAP_FMAC4 soap_instantiate_ns__echoStructAsSimpleTypes(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoStructAsSimpleTypes(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoStructAsSimpleTypes, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoStructAsSimpleTypes;
+		if (size)
+			*size = sizeof(struct ns__echoStructAsSimpleTypes);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoStructAsSimpleTypes[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoStructAsSimpleTypes);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoStructAsSimpleTypes*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoStructAsSimpleTypes(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoStructAsSimpleTypes %p -> %p\n", q, p));
+	*(struct ns__echoStructAsSimpleTypes*)p = *(struct ns__echoStructAsSimpleTypes*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoStructAsSimpleTypesResponse(struct soap *soap, const struct ns__echoStructAsSimpleTypesResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_xsd__string(soap, &a->_outputString);
+	soap_serialize_PointerToxsd__int(soap, &a->_outputInteger);
+	soap_serialize_PointerToxsd__float(soap, &a->_outputFloat);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoStructAsSimpleTypesResponse(struct soap *soap, struct ns__echoStructAsSimpleTypesResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_xsd__string(soap, &a->_outputString);
+	a->_outputInteger = NULL;
+	a->_outputFloat = NULL;
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoStructAsSimpleTypesResponse(struct soap *soap, const struct ns__echoStructAsSimpleTypesResponse *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoStructAsSimpleTypesResponse);
+	if (soap_out_ns__echoStructAsSimpleTypesResponse(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoStructAsSimpleTypesResponse(struct soap *soap, const char *tag, int id, const struct ns__echoStructAsSimpleTypesResponse *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoStructAsSimpleTypesResponse), type);
+	if (a->_outputString)
+		soap_element_result(soap, "outputString");
+	soap_out_xsd__string(soap, "outputString", -1, &a->_outputString, "");
+	soap_out_PointerToxsd__int(soap, "outputInteger", -1, &a->_outputInteger, "");
+	soap_out_PointerToxsd__float(soap, "outputFloat", -1, &a->_outputFloat, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoStructAsSimpleTypesResponse * SOAP_FMAC4 soap_get_ns__echoStructAsSimpleTypesResponse(struct soap *soap, struct ns__echoStructAsSimpleTypesResponse *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoStructAsSimpleTypesResponse(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoStructAsSimpleTypesResponse * SOAP_FMAC4 soap_in_ns__echoStructAsSimpleTypesResponse(struct soap *soap, const char *tag, struct ns__echoStructAsSimpleTypesResponse *a, const char *type)
+{
+	short soap_flag__outputString = 1, soap_flag__outputInteger = 1, soap_flag__outputFloat = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoStructAsSimpleTypesResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoStructAsSimpleTypesResponse, sizeof(struct ns__echoStructAsSimpleTypesResponse), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoStructAsSimpleTypesResponse(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag__outputString && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
+				if (soap_in_xsd__string(soap, NULL, &a->_outputString, "xsd:string"))
+				{	soap_flag__outputString--;
+					continue;
+				}
+			if (soap_flag__outputInteger && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_PointerToxsd__int(soap, NULL, &a->_outputInteger, "xsd:int"))
+				{	soap_flag__outputInteger--;
+					continue;
+				}
+			if (soap_flag__outputFloat && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_PointerToxsd__float(soap, NULL, &a->_outputFloat, "xsd:float"))
+				{	soap_flag__outputFloat--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoStructAsSimpleTypesResponse *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoStructAsSimpleTypesResponse, 0, sizeof(struct ns__echoStructAsSimpleTypesResponse), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoStructAsSimpleTypesResponse * SOAP_FMAC6 soap_new_ns__echoStructAsSimpleTypesResponse(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoStructAsSimpleTypesResponse(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoStructAsSimpleTypesResponse(struct soap *soap, struct ns__echoStructAsSimpleTypesResponse *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoStructAsSimpleTypesResponse * SOAP_FMAC4 soap_instantiate_ns__echoStructAsSimpleTypesResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoStructAsSimpleTypesResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoStructAsSimpleTypesResponse, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoStructAsSimpleTypesResponse;
+		if (size)
+			*size = sizeof(struct ns__echoStructAsSimpleTypesResponse);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoStructAsSimpleTypesResponse[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoStructAsSimpleTypesResponse);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoStructAsSimpleTypesResponse*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoStructAsSimpleTypesResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoStructAsSimpleTypesResponse %p -> %p\n", q, p));
+	*(struct ns__echoStructAsSimpleTypesResponse*)p = *(struct ns__echoStructAsSimpleTypesResponse*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoBoolean(struct soap *soap, const struct ns__echoBoolean *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoBoolean(struct soap *soap, struct ns__echoBoolean *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_xsd__boolean(soap, &a->inputBoolean);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoBoolean(struct soap *soap, const struct ns__echoBoolean *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoBoolean);
+	if (soap_out_ns__echoBoolean(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoBoolean(struct soap *soap, const char *tag, int id, const struct ns__echoBoolean *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoBoolean), type);
+	soap_out_xsd__boolean(soap, "inputBoolean", -1, &a->inputBoolean, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoBoolean * SOAP_FMAC4 soap_get_ns__echoBoolean(struct soap *soap, struct ns__echoBoolean *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoBoolean(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoBoolean * SOAP_FMAC4 soap_in_ns__echoBoolean(struct soap *soap, const char *tag, struct ns__echoBoolean *a, const char *type)
+{
+	short soap_flag_inputBoolean = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoBoolean *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoBoolean, sizeof(struct ns__echoBoolean), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoBoolean(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_inputBoolean && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_xsd__boolean(soap, "inputBoolean", &a->inputBoolean, "xsd:boolean"))
+				{	soap_flag_inputBoolean--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_inputBoolean > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoBoolean *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoBoolean, 0, sizeof(struct ns__echoBoolean), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoBoolean * SOAP_FMAC6 soap_new_ns__echoBoolean(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoBoolean(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoBoolean(struct soap *soap, struct ns__echoBoolean *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoBoolean * SOAP_FMAC4 soap_instantiate_ns__echoBoolean(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoBoolean(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoBoolean, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoBoolean;
+		if (size)
+			*size = sizeof(struct ns__echoBoolean);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoBoolean[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoBoolean);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoBoolean*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoBoolean(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoBoolean %p -> %p\n", q, p));
+	*(struct ns__echoBoolean*)p = *(struct ns__echoBoolean*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoBooleanResponse(struct soap *soap, const struct ns__echoBooleanResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoBooleanResponse(struct soap *soap, struct ns__echoBooleanResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_xsd__boolean(soap, &a->_return);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoBooleanResponse(struct soap *soap, const struct ns__echoBooleanResponse *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoBooleanResponse);
+	if (soap_out_ns__echoBooleanResponse(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoBooleanResponse(struct soap *soap, const char *tag, int id, const struct ns__echoBooleanResponse *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoBooleanResponse), type);
+	soap_element_result(soap, "return");
+	soap_out_xsd__boolean(soap, "return", -1, &a->_return, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoBooleanResponse * SOAP_FMAC4 soap_get_ns__echoBooleanResponse(struct soap *soap, struct ns__echoBooleanResponse *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoBooleanResponse(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoBooleanResponse * SOAP_FMAC4 soap_in_ns__echoBooleanResponse(struct soap *soap, const char *tag, struct ns__echoBooleanResponse *a, const char *type)
+{
+	short soap_flag__return = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoBooleanResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoBooleanResponse, sizeof(struct ns__echoBooleanResponse), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoBooleanResponse(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag__return && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_xsd__boolean(soap, NULL, &a->_return, "xsd:boolean"))
+				{	soap_flag__return--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag__return > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoBooleanResponse *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoBooleanResponse, 0, sizeof(struct ns__echoBooleanResponse), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoBooleanResponse * SOAP_FMAC6 soap_new_ns__echoBooleanResponse(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoBooleanResponse(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoBooleanResponse(struct soap *soap, struct ns__echoBooleanResponse *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoBooleanResponse * SOAP_FMAC4 soap_instantiate_ns__echoBooleanResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoBooleanResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoBooleanResponse, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoBooleanResponse;
+		if (size)
+			*size = sizeof(struct ns__echoBooleanResponse);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoBooleanResponse[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoBooleanResponse);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoBooleanResponse*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoBooleanResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoBooleanResponse %p -> %p\n", q, p));
+	*(struct ns__echoBooleanResponse*)p = *(struct ns__echoBooleanResponse*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoDecimal(struct soap *soap, const struct ns__echoDecimal *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_xsd__decimal(soap, &a->inputDecimal);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoDecimal(struct soap *soap, struct ns__echoDecimal *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_xsd__decimal(soap, &a->inputDecimal);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoDecimal(struct soap *soap, const struct ns__echoDecimal *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoDecimal);
+	if (soap_out_ns__echoDecimal(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoDecimal(struct soap *soap, const char *tag, int id, const struct ns__echoDecimal *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoDecimal), type);
+	soap_out_xsd__decimal(soap, "inputDecimal", -1, &a->inputDecimal, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoDecimal * SOAP_FMAC4 soap_get_ns__echoDecimal(struct soap *soap, struct ns__echoDecimal *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoDecimal(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoDecimal * SOAP_FMAC4 soap_in_ns__echoDecimal(struct soap *soap, const char *tag, struct ns__echoDecimal *a, const char *type)
+{
+	short soap_flag_inputDecimal = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoDecimal *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoDecimal, sizeof(struct ns__echoDecimal), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoDecimal(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_inputDecimal && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
+				if (soap_in_xsd__decimal(soap, "inputDecimal", &a->inputDecimal, "xsd:decimal"))
+				{	soap_flag_inputDecimal--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoDecimal *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoDecimal, 0, sizeof(struct ns__echoDecimal), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoDecimal * SOAP_FMAC6 soap_new_ns__echoDecimal(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoDecimal(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoDecimal(struct soap *soap, struct ns__echoDecimal *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoDecimal * SOAP_FMAC4 soap_instantiate_ns__echoDecimal(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoDecimal(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoDecimal, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoDecimal;
+		if (size)
+			*size = sizeof(struct ns__echoDecimal);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoDecimal[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoDecimal);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoDecimal*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoDecimal(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoDecimal %p -> %p\n", q, p));
+	*(struct ns__echoDecimal*)p = *(struct ns__echoDecimal*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoDecimalResponse(struct soap *soap, const struct ns__echoDecimalResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_xsd__decimal(soap, &a->_return);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoDecimalResponse(struct soap *soap, struct ns__echoDecimalResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_xsd__decimal(soap, &a->_return);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoDecimalResponse(struct soap *soap, const struct ns__echoDecimalResponse *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoDecimalResponse);
+	if (soap_out_ns__echoDecimalResponse(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoDecimalResponse(struct soap *soap, const char *tag, int id, const struct ns__echoDecimalResponse *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoDecimalResponse), type);
+	if (a->_return)
+		soap_element_result(soap, "return");
+	soap_out_xsd__decimal(soap, "return", -1, &a->_return, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoDecimalResponse * SOAP_FMAC4 soap_get_ns__echoDecimalResponse(struct soap *soap, struct ns__echoDecimalResponse *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoDecimalResponse(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoDecimalResponse * SOAP_FMAC4 soap_in_ns__echoDecimalResponse(struct soap *soap, const char *tag, struct ns__echoDecimalResponse *a, const char *type)
+{
+	short soap_flag__return = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoDecimalResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoDecimalResponse, sizeof(struct ns__echoDecimalResponse), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoDecimalResponse(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag__return && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
+				if (soap_in_xsd__decimal(soap, NULL, &a->_return, "xsd:decimal"))
+				{	soap_flag__return--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag__return > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoDecimalResponse *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoDecimalResponse, 0, sizeof(struct ns__echoDecimalResponse), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoDecimalResponse * SOAP_FMAC6 soap_new_ns__echoDecimalResponse(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoDecimalResponse(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoDecimalResponse(struct soap *soap, struct ns__echoDecimalResponse *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoDecimalResponse * SOAP_FMAC4 soap_instantiate_ns__echoDecimalResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoDecimalResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoDecimalResponse, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoDecimalResponse;
+		if (size)
+			*size = sizeof(struct ns__echoDecimalResponse);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoDecimalResponse[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoDecimalResponse);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoDecimalResponse*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoDecimalResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoDecimalResponse %p -> %p\n", q, p));
+	*(struct ns__echoDecimalResponse*)p = *(struct ns__echoDecimalResponse*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoHexBinary(struct soap *soap, const struct ns__echoHexBinary *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_xsd__hexBinary(soap, &a->inputHexBinary);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoHexBinary(struct soap *soap, struct ns__echoHexBinary *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_xsd__hexBinary(soap, &a->inputHexBinary);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoHexBinary(struct soap *soap, const struct ns__echoHexBinary *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoHexBinary);
+	if (soap_out_ns__echoHexBinary(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoHexBinary(struct soap *soap, const char *tag, int id, const struct ns__echoHexBinary *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoHexBinary), type);
+	soap_out_xsd__hexBinary(soap, "inputHexBinary", -1, &a->inputHexBinary, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoHexBinary * SOAP_FMAC4 soap_get_ns__echoHexBinary(struct soap *soap, struct ns__echoHexBinary *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoHexBinary(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoHexBinary * SOAP_FMAC4 soap_in_ns__echoHexBinary(struct soap *soap, const char *tag, struct ns__echoHexBinary *a, const char *type)
+{
+	short soap_flag_inputHexBinary = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoHexBinary *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoHexBinary, sizeof(struct ns__echoHexBinary), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoHexBinary(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_inputHexBinary && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_xsd__hexBinary(soap, "inputHexBinary", &a->inputHexBinary, "xsd:hexBinary"))
+				{	soap_flag_inputHexBinary--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_inputHexBinary > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoHexBinary *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoHexBinary, 0, sizeof(struct ns__echoHexBinary), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoHexBinary * SOAP_FMAC6 soap_new_ns__echoHexBinary(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoHexBinary(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoHexBinary(struct soap *soap, struct ns__echoHexBinary *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoHexBinary * SOAP_FMAC4 soap_instantiate_ns__echoHexBinary(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoHexBinary(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoHexBinary, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoHexBinary;
+		if (size)
+			*size = sizeof(struct ns__echoHexBinary);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoHexBinary[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoHexBinary);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoHexBinary*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoHexBinary(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoHexBinary %p -> %p\n", q, p));
+	*(struct ns__echoHexBinary*)p = *(struct ns__echoHexBinary*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoHexBinaryResponse(struct soap *soap, const struct ns__echoHexBinaryResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_xsd__hexBinary(soap, &a->_return);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoHexBinaryResponse(struct soap *soap, struct ns__echoHexBinaryResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_xsd__hexBinary(soap, &a->_return);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoHexBinaryResponse(struct soap *soap, const struct ns__echoHexBinaryResponse *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoHexBinaryResponse);
+	if (soap_out_ns__echoHexBinaryResponse(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoHexBinaryResponse(struct soap *soap, const char *tag, int id, const struct ns__echoHexBinaryResponse *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoHexBinaryResponse), type);
+	soap_element_result(soap, "return");
+	soap_out_xsd__hexBinary(soap, "return", -1, &a->_return, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoHexBinaryResponse * SOAP_FMAC4 soap_get_ns__echoHexBinaryResponse(struct soap *soap, struct ns__echoHexBinaryResponse *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoHexBinaryResponse(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoHexBinaryResponse * SOAP_FMAC4 soap_in_ns__echoHexBinaryResponse(struct soap *soap, const char *tag, struct ns__echoHexBinaryResponse *a, const char *type)
+{
+	short soap_flag__return = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoHexBinaryResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoHexBinaryResponse, sizeof(struct ns__echoHexBinaryResponse), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoHexBinaryResponse(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag__return && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_xsd__hexBinary(soap, NULL, &a->_return, "xsd:hexBinary"))
+				{	soap_flag__return--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag__return > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoHexBinaryResponse *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoHexBinaryResponse, 0, sizeof(struct ns__echoHexBinaryResponse), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoHexBinaryResponse * SOAP_FMAC6 soap_new_ns__echoHexBinaryResponse(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoHexBinaryResponse(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoHexBinaryResponse(struct soap *soap, struct ns__echoHexBinaryResponse *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoHexBinaryResponse * SOAP_FMAC4 soap_instantiate_ns__echoHexBinaryResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoHexBinaryResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoHexBinaryResponse, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoHexBinaryResponse;
+		if (size)
+			*size = sizeof(struct ns__echoHexBinaryResponse);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoHexBinaryResponse[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoHexBinaryResponse);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoHexBinaryResponse*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoHexBinaryResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoHexBinaryResponse %p -> %p\n", q, p));
+	*(struct ns__echoHexBinaryResponse*)p = *(struct ns__echoHexBinaryResponse*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_xsd__hexBinary(struct soap *soap, struct xsd__hexBinary const*a)
+{
+	if (a->__ptr)
+		soap_array_reference(soap, a, (struct soap_array*)&a->__ptr, 1, SOAP_TYPE_xsd__hexBinary);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_xsd__hexBinary(struct soap *soap, struct xsd__hexBinary *a)
+{
+	a->__size = 0;
+	a->__ptr = NULL;
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_xsd__hexBinary(struct soap *soap, const struct xsd__hexBinary *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, (struct soap_array*)&a->__ptr, 1, tag, SOAP_TYPE_xsd__hexBinary);
+	if (soap_out_xsd__hexBinary(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_xsd__hexBinary(struct soap *soap, const char *tag, int id, const struct xsd__hexBinary *a, const char *type)
+{
+	id = soap_element_id(soap, tag, id, a, (struct soap_array*)&a->__ptr, 1, type, SOAP_TYPE_xsd__hexBinary);
+	if (id < 0)
+		return soap->error;
+	soap_element_begin_out(soap, tag, id, type);
+	soap_puthex(soap, a->__ptr, a->__size);
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct xsd__hexBinary * SOAP_FMAC4 soap_get_xsd__hexBinary(struct soap *soap, struct xsd__hexBinary *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_xsd__hexBinary(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct xsd__hexBinary * SOAP_FMAC4 soap_in_xsd__hexBinary(struct soap *soap, const char *tag, struct xsd__hexBinary *a, const char *type)
+{
+	if (soap_element_begin_in(soap, tag, 1))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type) && soap_match_tag(soap, soap->type, ":hexBinary"))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct xsd__hexBinary *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_xsd__hexBinary, sizeof(struct xsd__hexBinary), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_xsd__hexBinary(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		a->__ptr = soap_gethex(soap, &a->__size);
+		if ((!a->__ptr && soap->error) || soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct xsd__hexBinary *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_xsd__hexBinary, 0, sizeof(struct xsd__hexBinary), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct xsd__hexBinary * SOAP_FMAC6 soap_new_xsd__hexBinary(struct soap *soap, int n)
+{	return soap_instantiate_xsd__hexBinary(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_xsd__hexBinary(struct soap *soap, struct xsd__hexBinary *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct xsd__hexBinary * SOAP_FMAC4 soap_instantiate_xsd__hexBinary(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_xsd__hexBinary(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_xsd__hexBinary, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct xsd__hexBinary;
+		if (size)
+			*size = sizeof(struct xsd__hexBinary);
+	}
+	else
+	{	cp->ptr = (void*)new struct xsd__hexBinary[n];
+		if (size)
+			*size = n * sizeof(struct xsd__hexBinary);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct xsd__hexBinary*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_xsd__hexBinary(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct xsd__hexBinary %p -> %p\n", q, p));
+	*(struct xsd__hexBinary*)p = *(struct xsd__hexBinary*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoDate(struct soap *soap, const struct ns__echoDate *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_xsd__dateTime(soap, &a->inputDate);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoDate(struct soap *soap, struct ns__echoDate *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_xsd__dateTime(soap, &a->inputDate);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoDate(struct soap *soap, const struct ns__echoDate *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoDate);
+	if (soap_out_ns__echoDate(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoDate(struct soap *soap, const char *tag, int id, const struct ns__echoDate *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoDate), type);
+	soap_out_xsd__dateTime(soap, "inputDate", -1, &a->inputDate, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoDate * SOAP_FMAC4 soap_get_ns__echoDate(struct soap *soap, struct ns__echoDate *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoDate(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoDate * SOAP_FMAC4 soap_in_ns__echoDate(struct soap *soap, const char *tag, struct ns__echoDate *a, const char *type)
+{
+	short soap_flag_inputDate = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoDate *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoDate, sizeof(struct ns__echoDate), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoDate(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_inputDate && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
+				if (soap_in_xsd__dateTime(soap, "inputDate", &a->inputDate, "xsd:dateTime"))
+				{	soap_flag_inputDate--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoDate *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoDate, 0, sizeof(struct ns__echoDate), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoDate * SOAP_FMAC6 soap_new_ns__echoDate(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoDate(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoDate(struct soap *soap, struct ns__echoDate *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoDate * SOAP_FMAC4 soap_instantiate_ns__echoDate(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoDate(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoDate, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoDate;
+		if (size)
+			*size = sizeof(struct ns__echoDate);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoDate[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoDate);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoDate*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoDate(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoDate %p -> %p\n", q, p));
+	*(struct ns__echoDate*)p = *(struct ns__echoDate*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoDateResponse(struct soap *soap, const struct ns__echoDateResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_xsd__dateTime(soap, &a->_return);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoDateResponse(struct soap *soap, struct ns__echoDateResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_xsd__dateTime(soap, &a->_return);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoDateResponse(struct soap *soap, const struct ns__echoDateResponse *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoDateResponse);
+	if (soap_out_ns__echoDateResponse(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoDateResponse(struct soap *soap, const char *tag, int id, const struct ns__echoDateResponse *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoDateResponse), type);
+	if (a->_return)
+		soap_element_result(soap, "return");
+	soap_out_xsd__dateTime(soap, "return", -1, &a->_return, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoDateResponse * SOAP_FMAC4 soap_get_ns__echoDateResponse(struct soap *soap, struct ns__echoDateResponse *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoDateResponse(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoDateResponse * SOAP_FMAC4 soap_in_ns__echoDateResponse(struct soap *soap, const char *tag, struct ns__echoDateResponse *a, const char *type)
+{
+	short soap_flag__return = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoDateResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoDateResponse, sizeof(struct ns__echoDateResponse), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoDateResponse(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag__return && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
+				if (soap_in_xsd__dateTime(soap, NULL, &a->_return, "xsd:dateTime"))
+				{	soap_flag__return--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag__return > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoDateResponse *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoDateResponse, 0, sizeof(struct ns__echoDateResponse), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoDateResponse * SOAP_FMAC6 soap_new_ns__echoDateResponse(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoDateResponse(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoDateResponse(struct soap *soap, struct ns__echoDateResponse *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoDateResponse * SOAP_FMAC4 soap_instantiate_ns__echoDateResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoDateResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoDateResponse, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoDateResponse;
+		if (size)
+			*size = sizeof(struct ns__echoDateResponse);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoDateResponse[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoDateResponse);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoDateResponse*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoDateResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoDateResponse %p -> %p\n", q, p));
+	*(struct ns__echoDateResponse*)p = *(struct ns__echoDateResponse*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoBase64(struct soap *soap, const struct ns__echoBase64 *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_xsd__base64Binary(soap, &a->inputBase64);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoBase64(struct soap *soap, struct ns__echoBase64 *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_xsd__base64Binary(soap, &a->inputBase64);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoBase64(struct soap *soap, const struct ns__echoBase64 *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoBase64);
+	if (soap_out_ns__echoBase64(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoBase64(struct soap *soap, const char *tag, int id, const struct ns__echoBase64 *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoBase64), type);
+	soap_out_xsd__base64Binary(soap, "inputBase64", -1, &a->inputBase64, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoBase64 * SOAP_FMAC4 soap_get_ns__echoBase64(struct soap *soap, struct ns__echoBase64 *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoBase64(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoBase64 * SOAP_FMAC4 soap_in_ns__echoBase64(struct soap *soap, const char *tag, struct ns__echoBase64 *a, const char *type)
+{
+	short soap_flag_inputBase64 = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoBase64 *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoBase64, sizeof(struct ns__echoBase64), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoBase64(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_inputBase64 && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_xsd__base64Binary(soap, "inputBase64", &a->inputBase64, "xsd:base64Binary"))
+				{	soap_flag_inputBase64--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_inputBase64 > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoBase64 *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoBase64, 0, sizeof(struct ns__echoBase64), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoBase64 * SOAP_FMAC6 soap_new_ns__echoBase64(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoBase64(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoBase64(struct soap *soap, struct ns__echoBase64 *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoBase64 * SOAP_FMAC4 soap_instantiate_ns__echoBase64(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoBase64(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoBase64, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoBase64;
+		if (size)
+			*size = sizeof(struct ns__echoBase64);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoBase64[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoBase64);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoBase64*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoBase64(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoBase64 %p -> %p\n", q, p));
+	*(struct ns__echoBase64*)p = *(struct ns__echoBase64*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoBase64Response(struct soap *soap, const struct ns__echoBase64Response *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_xsd__base64Binary(soap, &a->_return);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoBase64Response(struct soap *soap, struct ns__echoBase64Response *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_xsd__base64Binary(soap, &a->_return);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoBase64Response(struct soap *soap, const struct ns__echoBase64Response *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoBase64Response);
+	if (soap_out_ns__echoBase64Response(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoBase64Response(struct soap *soap, const char *tag, int id, const struct ns__echoBase64Response *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoBase64Response), type);
+	soap_element_result(soap, "return");
+	soap_out_xsd__base64Binary(soap, "return", -1, &a->_return, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoBase64Response * SOAP_FMAC4 soap_get_ns__echoBase64Response(struct soap *soap, struct ns__echoBase64Response *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoBase64Response(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoBase64Response * SOAP_FMAC4 soap_in_ns__echoBase64Response(struct soap *soap, const char *tag, struct ns__echoBase64Response *a, const char *type)
+{
+	short soap_flag__return = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoBase64Response *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoBase64Response, sizeof(struct ns__echoBase64Response), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoBase64Response(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag__return && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_xsd__base64Binary(soap, NULL, &a->_return, "xsd:base64Binary"))
+				{	soap_flag__return--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag__return > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoBase64Response *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoBase64Response, 0, sizeof(struct ns__echoBase64Response), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoBase64Response * SOAP_FMAC6 soap_new_ns__echoBase64Response(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoBase64Response(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoBase64Response(struct soap *soap, struct ns__echoBase64Response *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoBase64Response * SOAP_FMAC4 soap_instantiate_ns__echoBase64Response(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoBase64Response(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoBase64Response, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoBase64Response;
+		if (size)
+			*size = sizeof(struct ns__echoBase64Response);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoBase64Response[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoBase64Response);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoBase64Response*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoBase64Response(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoBase64Response %p -> %p\n", q, p));
+	*(struct ns__echoBase64Response*)p = *(struct ns__echoBase64Response*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_xsd__base64Binary(struct soap *soap, struct xsd__base64Binary const*a)
+{
+	if (a->__ptr)
+		soap_array_reference(soap, a, (struct soap_array*)&a->__ptr, 1, SOAP_TYPE_xsd__base64Binary);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_xsd__base64Binary(struct soap *soap, struct xsd__base64Binary *a)
+{
+	a->__size = 0;
+	a->__ptr = NULL;
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_xsd__base64Binary(struct soap *soap, const struct xsd__base64Binary *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, (struct soap_array*)&a->__ptr, 1, tag, SOAP_TYPE_xsd__base64Binary);
+	if (soap_out_xsd__base64Binary(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_xsd__base64Binary(struct soap *soap, const char *tag, int id, const struct xsd__base64Binary *a, const char *type)
+{
+	id = soap_element_id(soap, tag, id, a, (struct soap_array*)&a->__ptr, 1, type, SOAP_TYPE_xsd__base64Binary);
+	if (id < 0)
+		return soap->error;
+	soap_element_begin_out(soap, tag, id, type);
+	soap_putbase64(soap, a->__ptr, a->__size);
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct xsd__base64Binary * SOAP_FMAC4 soap_get_xsd__base64Binary(struct soap *soap, struct xsd__base64Binary *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_xsd__base64Binary(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct xsd__base64Binary * SOAP_FMAC4 soap_in_xsd__base64Binary(struct soap *soap, const char *tag, struct xsd__base64Binary *a, const char *type)
+{
+	if (soap_element_begin_in(soap, tag, 1))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type) && soap_match_tag(soap, soap->type, ":base64Binary") && soap_match_tag(soap, soap->type, ":base64"))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct xsd__base64Binary *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_xsd__base64Binary, sizeof(struct xsd__base64Binary), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_xsd__base64Binary(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		a->__ptr = soap_getbase64(soap, &a->__size, 0);
+		if ((!a->__ptr && soap->error) || soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct xsd__base64Binary *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_xsd__base64Binary, 0, sizeof(struct xsd__base64Binary), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct xsd__base64Binary * SOAP_FMAC6 soap_new_xsd__base64Binary(struct soap *soap, int n)
+{	return soap_instantiate_xsd__base64Binary(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_xsd__base64Binary(struct soap *soap, struct xsd__base64Binary *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct xsd__base64Binary * SOAP_FMAC4 soap_instantiate_xsd__base64Binary(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_xsd__base64Binary(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_xsd__base64Binary, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct xsd__base64Binary;
+		if (size)
+			*size = sizeof(struct xsd__base64Binary);
+	}
+	else
+	{	cp->ptr = (void*)new struct xsd__base64Binary[n];
+		if (size)
+			*size = n * sizeof(struct xsd__base64Binary);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct xsd__base64Binary*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_xsd__base64Binary(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct xsd__base64Binary %p -> %p\n", q, p));
+	*(struct xsd__base64Binary*)p = *(struct xsd__base64Binary*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoVoid(struct soap *soap, const struct ns__echoVoid *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoVoid(struct soap *soap, struct ns__echoVoid *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoVoid(struct soap *soap, const struct ns__echoVoid *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoVoid);
+	if (soap_out_ns__echoVoid(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoVoid(struct soap *soap, const char *tag, int id, const struct ns__echoVoid *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoVoid), type);
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoVoid * SOAP_FMAC4 soap_get_ns__echoVoid(struct soap *soap, struct ns__echoVoid *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoVoid(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoVoid * SOAP_FMAC4 soap_in_ns__echoVoid(struct soap *soap, const char *tag, struct ns__echoVoid *a, const char *type)
+{;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoVoid *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoVoid, sizeof(struct ns__echoVoid), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoVoid(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoVoid *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoVoid, 0, sizeof(struct ns__echoVoid), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoVoid * SOAP_FMAC6 soap_new_ns__echoVoid(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoVoid(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoVoid(struct soap *soap, struct ns__echoVoid *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoVoid * SOAP_FMAC4 soap_instantiate_ns__echoVoid(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoVoid(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoVoid, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoVoid;
+		if (size)
+			*size = sizeof(struct ns__echoVoid);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoVoid[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoVoid);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoVoid*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoVoid(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoVoid %p -> %p\n", q, p));
+	*(struct ns__echoVoid*)p = *(struct ns__echoVoid*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoVoidResponse(struct soap *soap, const struct ns__echoVoidResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoVoidResponse(struct soap *soap, struct ns__echoVoidResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoVoidResponse(struct soap *soap, const struct ns__echoVoidResponse *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoVoidResponse);
+	if (soap_out_ns__echoVoidResponse(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoVoidResponse(struct soap *soap, const char *tag, int id, const struct ns__echoVoidResponse *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoVoidResponse), type);
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoVoidResponse * SOAP_FMAC4 soap_get_ns__echoVoidResponse(struct soap *soap, struct ns__echoVoidResponse *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoVoidResponse(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoVoidResponse * SOAP_FMAC4 soap_in_ns__echoVoidResponse(struct soap *soap, const char *tag, struct ns__echoVoidResponse *a, const char *type)
+{;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoVoidResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoVoidResponse, sizeof(struct ns__echoVoidResponse), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoVoidResponse(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoVoidResponse *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoVoidResponse, 0, sizeof(struct ns__echoVoidResponse), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoVoidResponse * SOAP_FMAC6 soap_new_ns__echoVoidResponse(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoVoidResponse(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoVoidResponse(struct soap *soap, struct ns__echoVoidResponse *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoVoidResponse * SOAP_FMAC4 soap_instantiate_ns__echoVoidResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoVoidResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoVoidResponse, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoVoidResponse;
+		if (size)
+			*size = sizeof(struct ns__echoVoidResponse);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoVoidResponse[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoVoidResponse);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoVoidResponse*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoVoidResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoVoidResponse %p -> %p\n", q, p));
+	*(struct ns__echoVoidResponse*)p = *(struct ns__echoVoidResponse*)q;
+}
+
diff --git a/gsoap-palm/interop/src/soapC3.cpp b/gsoap-palm/interop/src/soapC3.cpp
new file mode 100644
index 0000000..6c54805
--- /dev/null
+++ b/gsoap-palm/interop/src/soapC3.cpp
@@ -0,0 +1,3369 @@
+
+#include "soapH.h"
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoStructArray(struct soap *soap, const struct ns__echoStructArray *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_ArrayOfSOAPStruct(soap, &a->inputStructArray);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoStructArray(struct soap *soap, struct ns__echoStructArray *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_ArrayOfSOAPStruct(soap, &a->inputStructArray);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoStructArray(struct soap *soap, const struct ns__echoStructArray *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoStructArray);
+	if (soap_out_ns__echoStructArray(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoStructArray(struct soap *soap, const char *tag, int id, const struct ns__echoStructArray *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoStructArray), type);
+	soap_out_ArrayOfSOAPStruct(soap, "inputStructArray", -1, &a->inputStructArray, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoStructArray * SOAP_FMAC4 soap_get_ns__echoStructArray(struct soap *soap, struct ns__echoStructArray *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoStructArray(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoStructArray * SOAP_FMAC4 soap_in_ns__echoStructArray(struct soap *soap, const char *tag, struct ns__echoStructArray *a, const char *type)
+{
+	short soap_flag_inputStructArray = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoStructArray *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoStructArray, sizeof(struct ns__echoStructArray), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoStructArray(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_inputStructArray && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_ArrayOfSOAPStruct(soap, "inputStructArray", &a->inputStructArray, "s:SOAPStruct"))
+				{	soap_flag_inputStructArray--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_inputStructArray > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoStructArray *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoStructArray, 0, sizeof(struct ns__echoStructArray), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoStructArray * SOAP_FMAC6 soap_new_ns__echoStructArray(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoStructArray(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoStructArray(struct soap *soap, struct ns__echoStructArray *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoStructArray * SOAP_FMAC4 soap_instantiate_ns__echoStructArray(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoStructArray(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoStructArray, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoStructArray;
+		if (size)
+			*size = sizeof(struct ns__echoStructArray);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoStructArray[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoStructArray);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoStructArray*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoStructArray(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoStructArray %p -> %p\n", q, p));
+	*(struct ns__echoStructArray*)p = *(struct ns__echoStructArray*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoStructArrayResponse(struct soap *soap, const struct ns__echoStructArrayResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_ArrayOfSOAPStruct(soap, &a->_return);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoStructArrayResponse(struct soap *soap, struct ns__echoStructArrayResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_ArrayOfSOAPStruct(soap, &a->_return);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoStructArrayResponse(struct soap *soap, const struct ns__echoStructArrayResponse *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoStructArrayResponse);
+	if (soap_out_ns__echoStructArrayResponse(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoStructArrayResponse(struct soap *soap, const char *tag, int id, const struct ns__echoStructArrayResponse *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoStructArrayResponse), type);
+	soap_element_result(soap, "return");
+	soap_out_ArrayOfSOAPStruct(soap, "return", -1, &a->_return, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoStructArrayResponse * SOAP_FMAC4 soap_get_ns__echoStructArrayResponse(struct soap *soap, struct ns__echoStructArrayResponse *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoStructArrayResponse(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoStructArrayResponse * SOAP_FMAC4 soap_in_ns__echoStructArrayResponse(struct soap *soap, const char *tag, struct ns__echoStructArrayResponse *a, const char *type)
+{
+	short soap_flag__return = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoStructArrayResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoStructArrayResponse, sizeof(struct ns__echoStructArrayResponse), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoStructArrayResponse(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag__return && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_ArrayOfSOAPStruct(soap, NULL, &a->_return, "s:SOAPStruct"))
+				{	soap_flag__return--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag__return > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoStructArrayResponse *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoStructArrayResponse, 0, sizeof(struct ns__echoStructArrayResponse), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoStructArrayResponse * SOAP_FMAC6 soap_new_ns__echoStructArrayResponse(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoStructArrayResponse(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoStructArrayResponse(struct soap *soap, struct ns__echoStructArrayResponse *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoStructArrayResponse * SOAP_FMAC4 soap_instantiate_ns__echoStructArrayResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoStructArrayResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoStructArrayResponse, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoStructArrayResponse;
+		if (size)
+			*size = sizeof(struct ns__echoStructArrayResponse);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoStructArrayResponse[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoStructArrayResponse);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoStructArrayResponse*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoStructArrayResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoStructArrayResponse %p -> %p\n", q, p));
+	*(struct ns__echoStructArrayResponse*)p = *(struct ns__echoStructArrayResponse*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ArrayOfSOAPStruct(struct soap *soap, struct ArrayOfSOAPStruct const*a)
+{
+	int i;
+	if (a->__ptr && !soap_array_reference(soap, a, (struct soap_array*)&a->__ptr, 1, SOAP_TYPE_ArrayOfSOAPStruct))
+		for (i = 0; i < a->__size; i++)
+		{
+			soap_serialize_PointerTos__SOAPStruct(soap, a->__ptr + i);
+		}
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ArrayOfSOAPStruct(struct soap *soap, struct ArrayOfSOAPStruct *a)
+{
+	a->__size = 0;
+	a->__ptr = NULL;
+	a->__offset = 0;
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ArrayOfSOAPStruct(struct soap *soap, const struct ArrayOfSOAPStruct *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, (struct soap_array*)&a->__ptr, 1, tag, SOAP_TYPE_ArrayOfSOAPStruct);
+	if (soap_out_ArrayOfSOAPStruct(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ArrayOfSOAPStruct(struct soap *soap, const char *tag, int id, const struct ArrayOfSOAPStruct *a, const char *type)
+{
+	int i, n = a->__size;
+	char *t = soap_putsize(soap, "s:SOAPStruct", n + a->__offset);
+	id = soap_element_id(soap, tag, id, a, (struct soap_array*)&a->__ptr, 1, type, SOAP_TYPE_ArrayOfSOAPStruct);
+	if (id < 0)
+		return soap->error;
+	soap_array_begin_out(soap, tag, id, t, soap_putoffset(soap, a->__offset));
+	for (i = 0; i < n; i++)
+	{
+		soap->position = 1;
+		soap->positions[0] = i;
+		soap_out_PointerTos__SOAPStruct(soap, "item", -1, &a->__ptr[i], "");
+	}
+	soap->position = 0;
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ArrayOfSOAPStruct * SOAP_FMAC4 soap_get_ArrayOfSOAPStruct(struct soap *soap, struct ArrayOfSOAPStruct *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ArrayOfSOAPStruct(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ArrayOfSOAPStruct * SOAP_FMAC4 soap_in_ArrayOfSOAPStruct(struct soap *soap, const char *tag, struct ArrayOfSOAPStruct *a, const char *type)
+{	int i, j;
+	struct s__SOAPStruct **p;
+	if (soap_element_begin_in(soap, tag, 1))
+		return NULL;
+	if (soap_match_array(soap, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ArrayOfSOAPStruct *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ArrayOfSOAPStruct, sizeof(struct ArrayOfSOAPStruct), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ArrayOfSOAPStruct(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		a->__size = soap_getsize(soap->arraySize, soap->arrayOffset, &j);
+		a->__offset = j;
+		if (a->__size >= 0)
+		{	a->__ptr = (struct s__SOAPStruct **)soap_malloc(soap, sizeof(struct s__SOAPStruct *) * a->__size);
+			for (i = 0; i < a->__size; i++)
+				a->__ptr[i] = NULL;
+			for (i = 0; i < a->__size; i++)
+			{	soap_peek_element(soap);
+				if (soap->position)
+				{	i = soap->positions[0]-j;
+					if (i < 0 || i >= a->__size)
+					{	soap->error = SOAP_IOB;
+						return NULL;
+					}
+				}
+				if (!soap_in_PointerTos__SOAPStruct(soap, NULL, a->__ptr + i, "s:SOAPStruct"))
+				{	if (soap->error != SOAP_NO_TAG)
+						return NULL;
+					soap->error = SOAP_OK;
+					break;
+				}
+			}
+		}
+		else
+		{	soap_new_block(soap);
+			for (a->__size = 0; ; a->__size++)
+			{	p = (struct s__SOAPStruct **)soap_push_block(soap, sizeof(struct s__SOAPStruct *));
+				if (!p)
+					return NULL;
+				*p = NULL;
+				if (!soap_in_PointerTos__SOAPStruct(soap, NULL, p, "s:SOAPStruct"))
+				{	if (soap->error != SOAP_NO_TAG)
+						return NULL;
+					soap->error = SOAP_OK;
+					break;
+				}
+			}
+			soap_pop_block(soap);
+			a->__ptr = (struct s__SOAPStruct **)soap_malloc(soap, soap->blist->size);
+			soap_save_block(soap, (char*)a->__ptr, 1);
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ArrayOfSOAPStruct *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ArrayOfSOAPStruct, 0, sizeof(struct ArrayOfSOAPStruct), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ArrayOfSOAPStruct * SOAP_FMAC6 soap_new_ArrayOfSOAPStruct(struct soap *soap, int n)
+{	return soap_instantiate_ArrayOfSOAPStruct(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ArrayOfSOAPStruct(struct soap *soap, struct ArrayOfSOAPStruct *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ArrayOfSOAPStruct * SOAP_FMAC4 soap_instantiate_ArrayOfSOAPStruct(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ArrayOfSOAPStruct(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ArrayOfSOAPStruct, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ArrayOfSOAPStruct;
+		if (size)
+			*size = sizeof(struct ArrayOfSOAPStruct);
+	}
+	else
+	{	cp->ptr = (void*)new struct ArrayOfSOAPStruct[n];
+		if (size)
+			*size = n * sizeof(struct ArrayOfSOAPStruct);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ArrayOfSOAPStruct*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ArrayOfSOAPStruct(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ArrayOfSOAPStruct %p -> %p\n", q, p));
+	*(struct ArrayOfSOAPStruct*)p = *(struct ArrayOfSOAPStruct*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoStruct(struct soap *soap, const struct ns__echoStruct *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_embedded(soap, &a->_inputStruct, SOAP_TYPE_s__SOAPStruct);
+	soap_serialize_s__SOAPStruct(soap, &a->_inputStruct);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoStruct(struct soap *soap, struct ns__echoStruct *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_s__SOAPStruct(soap, &a->_inputStruct);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoStruct(struct soap *soap, const struct ns__echoStruct *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoStruct);
+	if (soap_out_ns__echoStruct(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoStruct(struct soap *soap, const char *tag, int id, const struct ns__echoStruct *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoStruct), type);
+	soap_out_s__SOAPStruct(soap, "inputStruct", -1, &a->_inputStruct, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoStruct * SOAP_FMAC4 soap_get_ns__echoStruct(struct soap *soap, struct ns__echoStruct *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoStruct(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoStruct * SOAP_FMAC4 soap_in_ns__echoStruct(struct soap *soap, const char *tag, struct ns__echoStruct *a, const char *type)
+{
+	short soap_flag__inputStruct = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoStruct *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoStruct, sizeof(struct ns__echoStruct), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoStruct(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag__inputStruct && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_s__SOAPStruct(soap, NULL, &a->_inputStruct, "s:SOAPStruct"))
+				{	soap_flag__inputStruct--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag__inputStruct > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoStruct *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoStruct, 0, sizeof(struct ns__echoStruct), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoStruct * SOAP_FMAC6 soap_new_ns__echoStruct(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoStruct(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoStruct(struct soap *soap, struct ns__echoStruct *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoStruct * SOAP_FMAC4 soap_instantiate_ns__echoStruct(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoStruct(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoStruct, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoStruct;
+		if (size)
+			*size = sizeof(struct ns__echoStruct);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoStruct[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoStruct);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoStruct*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoStruct(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoStruct %p -> %p\n", q, p));
+	*(struct ns__echoStruct*)p = *(struct ns__echoStruct*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoStructResponse(struct soap *soap, const struct ns__echoStructResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_embedded(soap, &a->_return, SOAP_TYPE_s__SOAPStruct);
+	soap_serialize_s__SOAPStruct(soap, &a->_return);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoStructResponse(struct soap *soap, struct ns__echoStructResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_s__SOAPStruct(soap, &a->_return);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoStructResponse(struct soap *soap, const struct ns__echoStructResponse *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoStructResponse);
+	if (soap_out_ns__echoStructResponse(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoStructResponse(struct soap *soap, const char *tag, int id, const struct ns__echoStructResponse *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoStructResponse), type);
+	soap_element_result(soap, "return");
+	soap_out_s__SOAPStruct(soap, "return", -1, &a->_return, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoStructResponse * SOAP_FMAC4 soap_get_ns__echoStructResponse(struct soap *soap, struct ns__echoStructResponse *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoStructResponse(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoStructResponse * SOAP_FMAC4 soap_in_ns__echoStructResponse(struct soap *soap, const char *tag, struct ns__echoStructResponse *a, const char *type)
+{
+	short soap_flag__return = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoStructResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoStructResponse, sizeof(struct ns__echoStructResponse), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoStructResponse(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag__return && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_s__SOAPStruct(soap, NULL, &a->_return, "s:SOAPStruct"))
+				{	soap_flag__return--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag__return > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoStructResponse *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoStructResponse, 0, sizeof(struct ns__echoStructResponse), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoStructResponse * SOAP_FMAC6 soap_new_ns__echoStructResponse(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoStructResponse(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoStructResponse(struct soap *soap, struct ns__echoStructResponse *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoStructResponse * SOAP_FMAC4 soap_instantiate_ns__echoStructResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoStructResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoStructResponse, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoStructResponse;
+		if (size)
+			*size = sizeof(struct ns__echoStructResponse);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoStructResponse[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoStructResponse);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoStructResponse*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoStructResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoStructResponse %p -> %p\n", q, p));
+	*(struct ns__echoStructResponse*)p = *(struct ns__echoStructResponse*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_s__SOAPStruct(struct soap *soap, const struct s__SOAPStruct *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_xsd__string(soap, &a->varString);
+	soap_serialize_PointerToxsd__int(soap, &a->varInt);
+	soap_serialize_PointerToxsd__float(soap, &a->varFloat);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_s__SOAPStruct(struct soap *soap, struct s__SOAPStruct *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_xsd__string(soap, &a->varString);
+	a->varInt = NULL;
+	a->varFloat = NULL;
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_s__SOAPStruct(struct soap *soap, const struct s__SOAPStruct *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_s__SOAPStruct);
+	if (soap_out_s__SOAPStruct(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_s__SOAPStruct(struct soap *soap, const char *tag, int id, const struct s__SOAPStruct *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_s__SOAPStruct), type);
+	soap_out_xsd__string(soap, "varString", -1, &a->varString, "");
+	soap_out_PointerToxsd__int(soap, "varInt", -1, &a->varInt, "");
+	soap_out_PointerToxsd__float(soap, "varFloat", -1, &a->varFloat, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct s__SOAPStruct * SOAP_FMAC4 soap_get_s__SOAPStruct(struct soap *soap, struct s__SOAPStruct *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_s__SOAPStruct(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct s__SOAPStruct * SOAP_FMAC4 soap_in_s__SOAPStruct(struct soap *soap, const char *tag, struct s__SOAPStruct *a, const char *type)
+{
+	short soap_flag_varString = 1, soap_flag_varInt = 1, soap_flag_varFloat = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct s__SOAPStruct *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_s__SOAPStruct, sizeof(struct s__SOAPStruct), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_s__SOAPStruct(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_varString && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
+				if (soap_in_xsd__string(soap, "varString", &a->varString, "xsd:string"))
+				{	soap_flag_varString--;
+					continue;
+				}
+			if (soap_flag_varInt && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_PointerToxsd__int(soap, "varInt", &a->varInt, "xsd:int"))
+				{	soap_flag_varInt--;
+					continue;
+				}
+			if (soap_flag_varFloat && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_PointerToxsd__float(soap, "varFloat", &a->varFloat, "xsd:float"))
+				{	soap_flag_varFloat--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct s__SOAPStruct *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_s__SOAPStruct, 0, sizeof(struct s__SOAPStruct), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct s__SOAPStruct * SOAP_FMAC6 soap_new_s__SOAPStruct(struct soap *soap, int n)
+{	return soap_instantiate_s__SOAPStruct(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_s__SOAPStruct(struct soap *soap, struct s__SOAPStruct *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct s__SOAPStruct * SOAP_FMAC4 soap_instantiate_s__SOAPStruct(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_s__SOAPStruct(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_s__SOAPStruct, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct s__SOAPStruct;
+		if (size)
+			*size = sizeof(struct s__SOAPStruct);
+	}
+	else
+	{	cp->ptr = (void*)new struct s__SOAPStruct[n];
+		if (size)
+			*size = n * sizeof(struct s__SOAPStruct);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct s__SOAPStruct*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_s__SOAPStruct(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct s__SOAPStruct %p -> %p\n", q, p));
+	*(struct s__SOAPStruct*)p = *(struct s__SOAPStruct*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoFloatArray(struct soap *soap, const struct ns__echoFloatArray *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_ArrayOffloat(soap, &a->inputFloatArray);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoFloatArray(struct soap *soap, struct ns__echoFloatArray *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_ArrayOffloat(soap, &a->inputFloatArray);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoFloatArray(struct soap *soap, const struct ns__echoFloatArray *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoFloatArray);
+	if (soap_out_ns__echoFloatArray(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoFloatArray(struct soap *soap, const char *tag, int id, const struct ns__echoFloatArray *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoFloatArray), type);
+	soap_out_ArrayOffloat(soap, "inputFloatArray", -1, &a->inputFloatArray, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoFloatArray * SOAP_FMAC4 soap_get_ns__echoFloatArray(struct soap *soap, struct ns__echoFloatArray *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoFloatArray(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoFloatArray * SOAP_FMAC4 soap_in_ns__echoFloatArray(struct soap *soap, const char *tag, struct ns__echoFloatArray *a, const char *type)
+{
+	short soap_flag_inputFloatArray = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoFloatArray *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoFloatArray, sizeof(struct ns__echoFloatArray), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoFloatArray(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_inputFloatArray && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_ArrayOffloat(soap, "inputFloatArray", &a->inputFloatArray, "xsd:float"))
+				{	soap_flag_inputFloatArray--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_inputFloatArray > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoFloatArray *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoFloatArray, 0, sizeof(struct ns__echoFloatArray), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoFloatArray * SOAP_FMAC6 soap_new_ns__echoFloatArray(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoFloatArray(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoFloatArray(struct soap *soap, struct ns__echoFloatArray *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoFloatArray * SOAP_FMAC4 soap_instantiate_ns__echoFloatArray(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoFloatArray(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoFloatArray, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoFloatArray;
+		if (size)
+			*size = sizeof(struct ns__echoFloatArray);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoFloatArray[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoFloatArray);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoFloatArray*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoFloatArray(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoFloatArray %p -> %p\n", q, p));
+	*(struct ns__echoFloatArray*)p = *(struct ns__echoFloatArray*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoFloatArrayResponse(struct soap *soap, const struct ns__echoFloatArrayResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_ArrayOffloat(soap, &a->_return);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoFloatArrayResponse(struct soap *soap, struct ns__echoFloatArrayResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_ArrayOffloat(soap, &a->_return);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoFloatArrayResponse(struct soap *soap, const struct ns__echoFloatArrayResponse *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoFloatArrayResponse);
+	if (soap_out_ns__echoFloatArrayResponse(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoFloatArrayResponse(struct soap *soap, const char *tag, int id, const struct ns__echoFloatArrayResponse *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoFloatArrayResponse), type);
+	soap_element_result(soap, "return");
+	soap_out_ArrayOffloat(soap, "return", -1, &a->_return, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoFloatArrayResponse * SOAP_FMAC4 soap_get_ns__echoFloatArrayResponse(struct soap *soap, struct ns__echoFloatArrayResponse *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoFloatArrayResponse(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoFloatArrayResponse * SOAP_FMAC4 soap_in_ns__echoFloatArrayResponse(struct soap *soap, const char *tag, struct ns__echoFloatArrayResponse *a, const char *type)
+{
+	short soap_flag__return = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoFloatArrayResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoFloatArrayResponse, sizeof(struct ns__echoFloatArrayResponse), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoFloatArrayResponse(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag__return && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_ArrayOffloat(soap, NULL, &a->_return, "xsd:float"))
+				{	soap_flag__return--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag__return > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoFloatArrayResponse *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoFloatArrayResponse, 0, sizeof(struct ns__echoFloatArrayResponse), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoFloatArrayResponse * SOAP_FMAC6 soap_new_ns__echoFloatArrayResponse(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoFloatArrayResponse(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoFloatArrayResponse(struct soap *soap, struct ns__echoFloatArrayResponse *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoFloatArrayResponse * SOAP_FMAC4 soap_instantiate_ns__echoFloatArrayResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoFloatArrayResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoFloatArrayResponse, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoFloatArrayResponse;
+		if (size)
+			*size = sizeof(struct ns__echoFloatArrayResponse);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoFloatArrayResponse[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoFloatArrayResponse);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoFloatArrayResponse*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoFloatArrayResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoFloatArrayResponse %p -> %p\n", q, p));
+	*(struct ns__echoFloatArrayResponse*)p = *(struct ns__echoFloatArrayResponse*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ArrayOffloat(struct soap *soap, struct ArrayOffloat const*a)
+{
+	int i;
+	if (a->__ptr && !soap_array_reference(soap, a, (struct soap_array*)&a->__ptr, 1, SOAP_TYPE_ArrayOffloat))
+		for (i = 0; i < a->__size; i++)
+		{
+			soap_serialize_PointerToxsd__float(soap, a->__ptr + i);
+		}
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ArrayOffloat(struct soap *soap, struct ArrayOffloat *a)
+{
+	a->__size = 0;
+	a->__ptr = NULL;
+	a->__offset = 0;
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ArrayOffloat(struct soap *soap, const struct ArrayOffloat *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, (struct soap_array*)&a->__ptr, 1, tag, SOAP_TYPE_ArrayOffloat);
+	if (soap_out_ArrayOffloat(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ArrayOffloat(struct soap *soap, const char *tag, int id, const struct ArrayOffloat *a, const char *type)
+{
+	int i, n = a->__size;
+	char *t = soap_putsize(soap, "xsd:float", n + a->__offset);
+	id = soap_element_id(soap, tag, id, a, (struct soap_array*)&a->__ptr, 1, type, SOAP_TYPE_ArrayOffloat);
+	if (id < 0)
+		return soap->error;
+	soap_array_begin_out(soap, tag, id, t, soap_putoffset(soap, a->__offset));
+	for (i = 0; i < n; i++)
+	{
+		soap->position = 1;
+		soap->positions[0] = i;
+		soap_out_PointerToxsd__float(soap, "item", -1, &a->__ptr[i], "");
+	}
+	soap->position = 0;
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ArrayOffloat * SOAP_FMAC4 soap_get_ArrayOffloat(struct soap *soap, struct ArrayOffloat *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ArrayOffloat(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ArrayOffloat * SOAP_FMAC4 soap_in_ArrayOffloat(struct soap *soap, const char *tag, struct ArrayOffloat *a, const char *type)
+{	int i, j;
+	float **p;
+	if (soap_element_begin_in(soap, tag, 1))
+		return NULL;
+	if (soap_match_array(soap, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ArrayOffloat *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ArrayOffloat, sizeof(struct ArrayOffloat), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ArrayOffloat(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		a->__size = soap_getsize(soap->arraySize, soap->arrayOffset, &j);
+		a->__offset = j;
+		if (a->__size >= 0)
+		{	a->__ptr = (float **)soap_malloc(soap, sizeof(float *) * a->__size);
+			for (i = 0; i < a->__size; i++)
+				a->__ptr[i] = NULL;
+			for (i = 0; i < a->__size; i++)
+			{	soap_peek_element(soap);
+				if (soap->position)
+				{	i = soap->positions[0]-j;
+					if (i < 0 || i >= a->__size)
+					{	soap->error = SOAP_IOB;
+						return NULL;
+					}
+				}
+				if (!soap_in_PointerToxsd__float(soap, NULL, a->__ptr + i, "xsd:float"))
+				{	if (soap->error != SOAP_NO_TAG)
+						return NULL;
+					soap->error = SOAP_OK;
+					break;
+				}
+			}
+		}
+		else
+		{	soap_new_block(soap);
+			for (a->__size = 0; ; a->__size++)
+			{	p = (float **)soap_push_block(soap, sizeof(float *));
+				if (!p)
+					return NULL;
+				*p = NULL;
+				if (!soap_in_PointerToxsd__float(soap, NULL, p, "xsd:float"))
+				{	if (soap->error != SOAP_NO_TAG)
+						return NULL;
+					soap->error = SOAP_OK;
+					break;
+				}
+			}
+			soap_pop_block(soap);
+			a->__ptr = (float **)soap_malloc(soap, soap->blist->size);
+			soap_save_block(soap, (char*)a->__ptr, 1);
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ArrayOffloat *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ArrayOffloat, 0, sizeof(struct ArrayOffloat), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ArrayOffloat * SOAP_FMAC6 soap_new_ArrayOffloat(struct soap *soap, int n)
+{	return soap_instantiate_ArrayOffloat(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ArrayOffloat(struct soap *soap, struct ArrayOffloat *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ArrayOffloat * SOAP_FMAC4 soap_instantiate_ArrayOffloat(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ArrayOffloat(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ArrayOffloat, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ArrayOffloat;
+		if (size)
+			*size = sizeof(struct ArrayOffloat);
+	}
+	else
+	{	cp->ptr = (void*)new struct ArrayOffloat[n];
+		if (size)
+			*size = n * sizeof(struct ArrayOffloat);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ArrayOffloat*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ArrayOffloat(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ArrayOffloat %p -> %p\n", q, p));
+	*(struct ArrayOffloat*)p = *(struct ArrayOffloat*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoFloat(struct soap *soap, const struct ns__echoFloat *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_embedded(soap, &a->inputFloat, SOAP_TYPE_xsd__float);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoFloat(struct soap *soap, struct ns__echoFloat *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_xsd__float(soap, &a->inputFloat);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoFloat(struct soap *soap, const struct ns__echoFloat *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoFloat);
+	if (soap_out_ns__echoFloat(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoFloat(struct soap *soap, const char *tag, int id, const struct ns__echoFloat *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoFloat), type);
+	soap_out_xsd__float(soap, "inputFloat", -1, &a->inputFloat, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoFloat * SOAP_FMAC4 soap_get_ns__echoFloat(struct soap *soap, struct ns__echoFloat *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoFloat(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoFloat * SOAP_FMAC4 soap_in_ns__echoFloat(struct soap *soap, const char *tag, struct ns__echoFloat *a, const char *type)
+{
+	short soap_flag_inputFloat = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoFloat *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoFloat, sizeof(struct ns__echoFloat), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoFloat(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_inputFloat && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_xsd__float(soap, "inputFloat", &a->inputFloat, "xsd:float"))
+				{	soap_flag_inputFloat--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_inputFloat > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoFloat *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoFloat, 0, sizeof(struct ns__echoFloat), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoFloat * SOAP_FMAC6 soap_new_ns__echoFloat(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoFloat(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoFloat(struct soap *soap, struct ns__echoFloat *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoFloat * SOAP_FMAC4 soap_instantiate_ns__echoFloat(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoFloat(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoFloat, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoFloat;
+		if (size)
+			*size = sizeof(struct ns__echoFloat);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoFloat[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoFloat);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoFloat*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoFloat(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoFloat %p -> %p\n", q, p));
+	*(struct ns__echoFloat*)p = *(struct ns__echoFloat*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoFloatResponse(struct soap *soap, const struct ns__echoFloatResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_embedded(soap, &a->_return, SOAP_TYPE_xsd__float);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoFloatResponse(struct soap *soap, struct ns__echoFloatResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_xsd__float(soap, &a->_return);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoFloatResponse(struct soap *soap, const struct ns__echoFloatResponse *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoFloatResponse);
+	if (soap_out_ns__echoFloatResponse(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoFloatResponse(struct soap *soap, const char *tag, int id, const struct ns__echoFloatResponse *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoFloatResponse), type);
+	soap_element_result(soap, "return");
+	soap_out_xsd__float(soap, "return", -1, &a->_return, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoFloatResponse * SOAP_FMAC4 soap_get_ns__echoFloatResponse(struct soap *soap, struct ns__echoFloatResponse *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoFloatResponse(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoFloatResponse * SOAP_FMAC4 soap_in_ns__echoFloatResponse(struct soap *soap, const char *tag, struct ns__echoFloatResponse *a, const char *type)
+{
+	short soap_flag__return = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoFloatResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoFloatResponse, sizeof(struct ns__echoFloatResponse), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoFloatResponse(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag__return && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_xsd__float(soap, NULL, &a->_return, "xsd:float"))
+				{	soap_flag__return--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag__return > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoFloatResponse *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoFloatResponse, 0, sizeof(struct ns__echoFloatResponse), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoFloatResponse * SOAP_FMAC6 soap_new_ns__echoFloatResponse(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoFloatResponse(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoFloatResponse(struct soap *soap, struct ns__echoFloatResponse *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoFloatResponse * SOAP_FMAC4 soap_instantiate_ns__echoFloatResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoFloatResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoFloatResponse, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoFloatResponse;
+		if (size)
+			*size = sizeof(struct ns__echoFloatResponse);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoFloatResponse[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoFloatResponse);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoFloatResponse*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoFloatResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoFloatResponse %p -> %p\n", q, p));
+	*(struct ns__echoFloatResponse*)p = *(struct ns__echoFloatResponse*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoIntegerArray(struct soap *soap, const struct ns__echoIntegerArray *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_ArrayOfint(soap, &a->inputIntegerArray);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoIntegerArray(struct soap *soap, struct ns__echoIntegerArray *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_ArrayOfint(soap, &a->inputIntegerArray);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoIntegerArray(struct soap *soap, const struct ns__echoIntegerArray *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoIntegerArray);
+	if (soap_out_ns__echoIntegerArray(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoIntegerArray(struct soap *soap, const char *tag, int id, const struct ns__echoIntegerArray *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoIntegerArray), type);
+	soap_out_ArrayOfint(soap, "inputIntegerArray", -1, &a->inputIntegerArray, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoIntegerArray * SOAP_FMAC4 soap_get_ns__echoIntegerArray(struct soap *soap, struct ns__echoIntegerArray *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoIntegerArray(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoIntegerArray * SOAP_FMAC4 soap_in_ns__echoIntegerArray(struct soap *soap, const char *tag, struct ns__echoIntegerArray *a, const char *type)
+{
+	short soap_flag_inputIntegerArray = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoIntegerArray *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoIntegerArray, sizeof(struct ns__echoIntegerArray), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoIntegerArray(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_inputIntegerArray && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_ArrayOfint(soap, "inputIntegerArray", &a->inputIntegerArray, "xsd:int"))
+				{	soap_flag_inputIntegerArray--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_inputIntegerArray > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoIntegerArray *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoIntegerArray, 0, sizeof(struct ns__echoIntegerArray), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoIntegerArray * SOAP_FMAC6 soap_new_ns__echoIntegerArray(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoIntegerArray(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoIntegerArray(struct soap *soap, struct ns__echoIntegerArray *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoIntegerArray * SOAP_FMAC4 soap_instantiate_ns__echoIntegerArray(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoIntegerArray(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoIntegerArray, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoIntegerArray;
+		if (size)
+			*size = sizeof(struct ns__echoIntegerArray);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoIntegerArray[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoIntegerArray);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoIntegerArray*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoIntegerArray(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoIntegerArray %p -> %p\n", q, p));
+	*(struct ns__echoIntegerArray*)p = *(struct ns__echoIntegerArray*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoIntegerArrayResponse(struct soap *soap, const struct ns__echoIntegerArrayResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_ArrayOfint(soap, &a->_return);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoIntegerArrayResponse(struct soap *soap, struct ns__echoIntegerArrayResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_ArrayOfint(soap, &a->_return);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoIntegerArrayResponse(struct soap *soap, const struct ns__echoIntegerArrayResponse *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoIntegerArrayResponse);
+	if (soap_out_ns__echoIntegerArrayResponse(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoIntegerArrayResponse(struct soap *soap, const char *tag, int id, const struct ns__echoIntegerArrayResponse *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoIntegerArrayResponse), type);
+	soap_element_result(soap, "return");
+	soap_out_ArrayOfint(soap, "return", -1, &a->_return, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoIntegerArrayResponse * SOAP_FMAC4 soap_get_ns__echoIntegerArrayResponse(struct soap *soap, struct ns__echoIntegerArrayResponse *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoIntegerArrayResponse(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoIntegerArrayResponse * SOAP_FMAC4 soap_in_ns__echoIntegerArrayResponse(struct soap *soap, const char *tag, struct ns__echoIntegerArrayResponse *a, const char *type)
+{
+	short soap_flag__return = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoIntegerArrayResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoIntegerArrayResponse, sizeof(struct ns__echoIntegerArrayResponse), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoIntegerArrayResponse(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag__return && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_ArrayOfint(soap, NULL, &a->_return, "xsd:int"))
+				{	soap_flag__return--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag__return > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoIntegerArrayResponse *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoIntegerArrayResponse, 0, sizeof(struct ns__echoIntegerArrayResponse), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoIntegerArrayResponse * SOAP_FMAC6 soap_new_ns__echoIntegerArrayResponse(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoIntegerArrayResponse(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoIntegerArrayResponse(struct soap *soap, struct ns__echoIntegerArrayResponse *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoIntegerArrayResponse * SOAP_FMAC4 soap_instantiate_ns__echoIntegerArrayResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoIntegerArrayResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoIntegerArrayResponse, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoIntegerArrayResponse;
+		if (size)
+			*size = sizeof(struct ns__echoIntegerArrayResponse);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoIntegerArrayResponse[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoIntegerArrayResponse);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoIntegerArrayResponse*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoIntegerArrayResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoIntegerArrayResponse %p -> %p\n", q, p));
+	*(struct ns__echoIntegerArrayResponse*)p = *(struct ns__echoIntegerArrayResponse*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ArrayOfint(struct soap *soap, struct ArrayOfint const*a)
+{
+	int i;
+	if (a->__ptr && !soap_array_reference(soap, a, (struct soap_array*)&a->__ptr, 1, SOAP_TYPE_ArrayOfint))
+		for (i = 0; i < a->__size; i++)
+		{
+			soap_serialize_PointerToxsd__int(soap, a->__ptr + i);
+		}
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ArrayOfint(struct soap *soap, struct ArrayOfint *a)
+{
+	a->__size = 0;
+	a->__ptr = NULL;
+	a->__offset = 0;
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ArrayOfint(struct soap *soap, const struct ArrayOfint *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, (struct soap_array*)&a->__ptr, 1, tag, SOAP_TYPE_ArrayOfint);
+	if (soap_out_ArrayOfint(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ArrayOfint(struct soap *soap, const char *tag, int id, const struct ArrayOfint *a, const char *type)
+{
+	int i, n = a->__size;
+	char *t = soap_putsize(soap, "xsd:int", n + a->__offset);
+	id = soap_element_id(soap, tag, id, a, (struct soap_array*)&a->__ptr, 1, type, SOAP_TYPE_ArrayOfint);
+	if (id < 0)
+		return soap->error;
+	soap_array_begin_out(soap, tag, id, t, soap_putoffset(soap, a->__offset));
+	for (i = 0; i < n; i++)
+	{
+		soap->position = 1;
+		soap->positions[0] = i;
+		soap_out_PointerToxsd__int(soap, "item", -1, &a->__ptr[i], "");
+	}
+	soap->position = 0;
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ArrayOfint * SOAP_FMAC4 soap_get_ArrayOfint(struct soap *soap, struct ArrayOfint *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ArrayOfint(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ArrayOfint * SOAP_FMAC4 soap_in_ArrayOfint(struct soap *soap, const char *tag, struct ArrayOfint *a, const char *type)
+{	int i, j;
+	long **p;
+	if (soap_element_begin_in(soap, tag, 1))
+		return NULL;
+	if (soap_match_array(soap, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ArrayOfint *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ArrayOfint, sizeof(struct ArrayOfint), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ArrayOfint(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		a->__size = soap_getsize(soap->arraySize, soap->arrayOffset, &j);
+		a->__offset = j;
+		if (a->__size >= 0)
+		{	a->__ptr = (long **)soap_malloc(soap, sizeof(long *) * a->__size);
+			for (i = 0; i < a->__size; i++)
+				a->__ptr[i] = NULL;
+			for (i = 0; i < a->__size; i++)
+			{	soap_peek_element(soap);
+				if (soap->position)
+				{	i = soap->positions[0]-j;
+					if (i < 0 || i >= a->__size)
+					{	soap->error = SOAP_IOB;
+						return NULL;
+					}
+				}
+				if (!soap_in_PointerToxsd__int(soap, NULL, a->__ptr + i, "xsd:int"))
+				{	if (soap->error != SOAP_NO_TAG)
+						return NULL;
+					soap->error = SOAP_OK;
+					break;
+				}
+			}
+		}
+		else
+		{	soap_new_block(soap);
+			for (a->__size = 0; ; a->__size++)
+			{	p = (long **)soap_push_block(soap, sizeof(long *));
+				if (!p)
+					return NULL;
+				*p = NULL;
+				if (!soap_in_PointerToxsd__int(soap, NULL, p, "xsd:int"))
+				{	if (soap->error != SOAP_NO_TAG)
+						return NULL;
+					soap->error = SOAP_OK;
+					break;
+				}
+			}
+			soap_pop_block(soap);
+			a->__ptr = (long **)soap_malloc(soap, soap->blist->size);
+			soap_save_block(soap, (char*)a->__ptr, 1);
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ArrayOfint *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ArrayOfint, 0, sizeof(struct ArrayOfint), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ArrayOfint * SOAP_FMAC6 soap_new_ArrayOfint(struct soap *soap, int n)
+{	return soap_instantiate_ArrayOfint(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ArrayOfint(struct soap *soap, struct ArrayOfint *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ArrayOfint * SOAP_FMAC4 soap_instantiate_ArrayOfint(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ArrayOfint(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ArrayOfint, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ArrayOfint;
+		if (size)
+			*size = sizeof(struct ArrayOfint);
+	}
+	else
+	{	cp->ptr = (void*)new struct ArrayOfint[n];
+		if (size)
+			*size = n * sizeof(struct ArrayOfint);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ArrayOfint*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ArrayOfint(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ArrayOfint %p -> %p\n", q, p));
+	*(struct ArrayOfint*)p = *(struct ArrayOfint*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoInteger(struct soap *soap, const struct ns__echoInteger *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_embedded(soap, &a->inputInteger, SOAP_TYPE_xsd__int);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoInteger(struct soap *soap, struct ns__echoInteger *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_xsd__int(soap, &a->inputInteger);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoInteger(struct soap *soap, const struct ns__echoInteger *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoInteger);
+	if (soap_out_ns__echoInteger(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoInteger(struct soap *soap, const char *tag, int id, const struct ns__echoInteger *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoInteger), type);
+	soap_out_xsd__int(soap, "inputInteger", -1, &a->inputInteger, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoInteger * SOAP_FMAC4 soap_get_ns__echoInteger(struct soap *soap, struct ns__echoInteger *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoInteger(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoInteger * SOAP_FMAC4 soap_in_ns__echoInteger(struct soap *soap, const char *tag, struct ns__echoInteger *a, const char *type)
+{
+	short soap_flag_inputInteger = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoInteger *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoInteger, sizeof(struct ns__echoInteger), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoInteger(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_inputInteger && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_xsd__int(soap, "inputInteger", &a->inputInteger, "xsd:int"))
+				{	soap_flag_inputInteger--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_inputInteger > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoInteger *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoInteger, 0, sizeof(struct ns__echoInteger), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoInteger * SOAP_FMAC6 soap_new_ns__echoInteger(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoInteger(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoInteger(struct soap *soap, struct ns__echoInteger *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoInteger * SOAP_FMAC4 soap_instantiate_ns__echoInteger(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoInteger(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoInteger, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoInteger;
+		if (size)
+			*size = sizeof(struct ns__echoInteger);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoInteger[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoInteger);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoInteger*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoInteger(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoInteger %p -> %p\n", q, p));
+	*(struct ns__echoInteger*)p = *(struct ns__echoInteger*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoIntegerResponse(struct soap *soap, const struct ns__echoIntegerResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_embedded(soap, &a->_return, SOAP_TYPE_xsd__int);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoIntegerResponse(struct soap *soap, struct ns__echoIntegerResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_xsd__int(soap, &a->_return);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoIntegerResponse(struct soap *soap, const struct ns__echoIntegerResponse *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoIntegerResponse);
+	if (soap_out_ns__echoIntegerResponse(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoIntegerResponse(struct soap *soap, const char *tag, int id, const struct ns__echoIntegerResponse *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoIntegerResponse), type);
+	soap_element_result(soap, "return");
+	soap_out_xsd__int(soap, "return", -1, &a->_return, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoIntegerResponse * SOAP_FMAC4 soap_get_ns__echoIntegerResponse(struct soap *soap, struct ns__echoIntegerResponse *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoIntegerResponse(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoIntegerResponse * SOAP_FMAC4 soap_in_ns__echoIntegerResponse(struct soap *soap, const char *tag, struct ns__echoIntegerResponse *a, const char *type)
+{
+	short soap_flag__return = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoIntegerResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoIntegerResponse, sizeof(struct ns__echoIntegerResponse), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoIntegerResponse(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag__return && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_xsd__int(soap, NULL, &a->_return, "xsd:int"))
+				{	soap_flag__return--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag__return > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoIntegerResponse *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoIntegerResponse, 0, sizeof(struct ns__echoIntegerResponse), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoIntegerResponse * SOAP_FMAC6 soap_new_ns__echoIntegerResponse(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoIntegerResponse(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoIntegerResponse(struct soap *soap, struct ns__echoIntegerResponse *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoIntegerResponse * SOAP_FMAC4 soap_instantiate_ns__echoIntegerResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoIntegerResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoIntegerResponse, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoIntegerResponse;
+		if (size)
+			*size = sizeof(struct ns__echoIntegerResponse);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoIntegerResponse[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoIntegerResponse);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoIntegerResponse*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoIntegerResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoIntegerResponse %p -> %p\n", q, p));
+	*(struct ns__echoIntegerResponse*)p = *(struct ns__echoIntegerResponse*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoStringArray(struct soap *soap, const struct ns__echoStringArray *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_ArrayOfstring(soap, &a->inputStringArray);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoStringArray(struct soap *soap, struct ns__echoStringArray *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_ArrayOfstring(soap, &a->inputStringArray);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoStringArray(struct soap *soap, const struct ns__echoStringArray *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoStringArray);
+	if (soap_out_ns__echoStringArray(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoStringArray(struct soap *soap, const char *tag, int id, const struct ns__echoStringArray *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoStringArray), type);
+	soap_out_ArrayOfstring(soap, "inputStringArray", -1, &a->inputStringArray, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoStringArray * SOAP_FMAC4 soap_get_ns__echoStringArray(struct soap *soap, struct ns__echoStringArray *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoStringArray(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoStringArray * SOAP_FMAC4 soap_in_ns__echoStringArray(struct soap *soap, const char *tag, struct ns__echoStringArray *a, const char *type)
+{
+	short soap_flag_inputStringArray = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoStringArray *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoStringArray, sizeof(struct ns__echoStringArray), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoStringArray(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_inputStringArray && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_ArrayOfstring(soap, "inputStringArray", &a->inputStringArray, "xsd:string"))
+				{	soap_flag_inputStringArray--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_inputStringArray > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoStringArray *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoStringArray, 0, sizeof(struct ns__echoStringArray), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoStringArray * SOAP_FMAC6 soap_new_ns__echoStringArray(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoStringArray(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoStringArray(struct soap *soap, struct ns__echoStringArray *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoStringArray * SOAP_FMAC4 soap_instantiate_ns__echoStringArray(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoStringArray(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoStringArray, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoStringArray;
+		if (size)
+			*size = sizeof(struct ns__echoStringArray);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoStringArray[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoStringArray);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoStringArray*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoStringArray(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoStringArray %p -> %p\n", q, p));
+	*(struct ns__echoStringArray*)p = *(struct ns__echoStringArray*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoStringArrayResponse(struct soap *soap, const struct ns__echoStringArrayResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_ArrayOfstring(soap, &a->_return);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoStringArrayResponse(struct soap *soap, struct ns__echoStringArrayResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_ArrayOfstring(soap, &a->_return);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoStringArrayResponse(struct soap *soap, const struct ns__echoStringArrayResponse *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoStringArrayResponse);
+	if (soap_out_ns__echoStringArrayResponse(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoStringArrayResponse(struct soap *soap, const char *tag, int id, const struct ns__echoStringArrayResponse *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoStringArrayResponse), type);
+	soap_element_result(soap, "return");
+	soap_out_ArrayOfstring(soap, "return", -1, &a->_return, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoStringArrayResponse * SOAP_FMAC4 soap_get_ns__echoStringArrayResponse(struct soap *soap, struct ns__echoStringArrayResponse *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoStringArrayResponse(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoStringArrayResponse * SOAP_FMAC4 soap_in_ns__echoStringArrayResponse(struct soap *soap, const char *tag, struct ns__echoStringArrayResponse *a, const char *type)
+{
+	short soap_flag__return = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoStringArrayResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoStringArrayResponse, sizeof(struct ns__echoStringArrayResponse), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoStringArrayResponse(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag__return && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_ArrayOfstring(soap, NULL, &a->_return, "xsd:string"))
+				{	soap_flag__return--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag__return > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoStringArrayResponse *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoStringArrayResponse, 0, sizeof(struct ns__echoStringArrayResponse), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoStringArrayResponse * SOAP_FMAC6 soap_new_ns__echoStringArrayResponse(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoStringArrayResponse(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoStringArrayResponse(struct soap *soap, struct ns__echoStringArrayResponse *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoStringArrayResponse * SOAP_FMAC4 soap_instantiate_ns__echoStringArrayResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoStringArrayResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoStringArrayResponse, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoStringArrayResponse;
+		if (size)
+			*size = sizeof(struct ns__echoStringArrayResponse);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoStringArrayResponse[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoStringArrayResponse);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoStringArrayResponse*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoStringArrayResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoStringArrayResponse %p -> %p\n", q, p));
+	*(struct ns__echoStringArrayResponse*)p = *(struct ns__echoStringArrayResponse*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ArrayOfstring(struct soap *soap, struct ArrayOfstring const*a)
+{
+	int i;
+	if (a->__ptr && !soap_array_reference(soap, a, (struct soap_array*)&a->__ptr, 1, SOAP_TYPE_ArrayOfstring))
+		for (i = 0; i < a->__size; i++)
+		{
+			soap_serialize_xsd__string(soap, a->__ptr + i);
+		}
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ArrayOfstring(struct soap *soap, struct ArrayOfstring *a)
+{
+	a->__size = 0;
+	a->__ptr = NULL;
+	a->__offset = 0;
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ArrayOfstring(struct soap *soap, const struct ArrayOfstring *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, (struct soap_array*)&a->__ptr, 1, tag, SOAP_TYPE_ArrayOfstring);
+	if (soap_out_ArrayOfstring(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ArrayOfstring(struct soap *soap, const char *tag, int id, const struct ArrayOfstring *a, const char *type)
+{
+	int i, n = a->__size;
+	char *t = soap_putsize(soap, "xsd:string", n + a->__offset);
+	id = soap_element_id(soap, tag, id, a, (struct soap_array*)&a->__ptr, 1, type, SOAP_TYPE_ArrayOfstring);
+	if (id < 0)
+		return soap->error;
+	soap_array_begin_out(soap, tag, id, t, soap_putoffset(soap, a->__offset));
+	for (i = 0; i < n; i++)
+	{
+		soap->position = 1;
+		soap->positions[0] = i;
+		soap_out_xsd__string(soap, "item", -1, &a->__ptr[i], "");
+	}
+	soap->position = 0;
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ArrayOfstring * SOAP_FMAC4 soap_get_ArrayOfstring(struct soap *soap, struct ArrayOfstring *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ArrayOfstring(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ArrayOfstring * SOAP_FMAC4 soap_in_ArrayOfstring(struct soap *soap, const char *tag, struct ArrayOfstring *a, const char *type)
+{	int i, j;
+	char **p;
+	if (soap_element_begin_in(soap, tag, 1))
+		return NULL;
+	if (soap_match_array(soap, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ArrayOfstring *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ArrayOfstring, sizeof(struct ArrayOfstring), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ArrayOfstring(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		a->__size = soap_getsize(soap->arraySize, soap->arrayOffset, &j);
+		a->__offset = j;
+		if (a->__size >= 0)
+		{	a->__ptr = (char **)soap_malloc(soap, sizeof(char *) * a->__size);
+			for (i = 0; i < a->__size; i++)
+				a->__ptr[i] = NULL;
+			for (i = 0; i < a->__size; i++)
+			{	soap_peek_element(soap);
+				if (soap->position)
+				{	i = soap->positions[0]-j;
+					if (i < 0 || i >= a->__size)
+					{	soap->error = SOAP_IOB;
+						return NULL;
+					}
+				}
+				if (!soap_in_xsd__string(soap, NULL, a->__ptr + i, "xsd:string"))
+				{	if (soap->error != SOAP_NO_TAG)
+						return NULL;
+					soap->error = SOAP_OK;
+					break;
+				}
+			}
+		}
+		else
+		{	soap_new_block(soap);
+			for (a->__size = 0; ; a->__size++)
+			{	p = (char **)soap_push_block(soap, sizeof(char *));
+				if (!p)
+					return NULL;
+				*p = NULL;
+				if (!soap_in_xsd__string(soap, NULL, p, "xsd:string"))
+				{	if (soap->error != SOAP_NO_TAG)
+						return NULL;
+					soap->error = SOAP_OK;
+					break;
+				}
+			}
+			soap_pop_block(soap);
+			a->__ptr = (char **)soap_malloc(soap, soap->blist->size);
+			soap_save_block(soap, (char*)a->__ptr, 1);
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ArrayOfstring *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ArrayOfstring, 0, sizeof(struct ArrayOfstring), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ArrayOfstring * SOAP_FMAC6 soap_new_ArrayOfstring(struct soap *soap, int n)
+{	return soap_instantiate_ArrayOfstring(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ArrayOfstring(struct soap *soap, struct ArrayOfstring *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ArrayOfstring * SOAP_FMAC4 soap_instantiate_ArrayOfstring(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ArrayOfstring(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ArrayOfstring, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ArrayOfstring;
+		if (size)
+			*size = sizeof(struct ArrayOfstring);
+	}
+	else
+	{	cp->ptr = (void*)new struct ArrayOfstring[n];
+		if (size)
+			*size = n * sizeof(struct ArrayOfstring);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ArrayOfstring*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ArrayOfstring(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ArrayOfstring %p -> %p\n", q, p));
+	*(struct ArrayOfstring*)p = *(struct ArrayOfstring*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoString(struct soap *soap, const struct ns__echoString *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_xsd__string(soap, &a->inputString);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoString(struct soap *soap, struct ns__echoString *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_xsd__string(soap, &a->inputString);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoString(struct soap *soap, const struct ns__echoString *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoString);
+	if (soap_out_ns__echoString(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoString(struct soap *soap, const char *tag, int id, const struct ns__echoString *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoString), type);
+	soap_out_xsd__string(soap, "inputString", -1, &a->inputString, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoString * SOAP_FMAC4 soap_get_ns__echoString(struct soap *soap, struct ns__echoString *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoString(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoString * SOAP_FMAC4 soap_in_ns__echoString(struct soap *soap, const char *tag, struct ns__echoString *a, const char *type)
+{
+	short soap_flag_inputString = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoString *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoString, sizeof(struct ns__echoString), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoString(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_inputString && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
+				if (soap_in_xsd__string(soap, "inputString", &a->inputString, "xsd:string"))
+				{	soap_flag_inputString--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoString *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoString, 0, sizeof(struct ns__echoString), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoString * SOAP_FMAC6 soap_new_ns__echoString(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoString(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoString(struct soap *soap, struct ns__echoString *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoString * SOAP_FMAC4 soap_instantiate_ns__echoString(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoString(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoString, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoString;
+		if (size)
+			*size = sizeof(struct ns__echoString);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoString[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoString);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoString*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoString(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoString %p -> %p\n", q, p));
+	*(struct ns__echoString*)p = *(struct ns__echoString*)q;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__echoStringResponse(struct soap *soap, const struct ns__echoStringResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_xsd__string(soap, &a->_return);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__echoStringResponse(struct soap *soap, struct ns__echoStringResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_xsd__string(soap, &a->_return);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__echoStringResponse(struct soap *soap, const struct ns__echoStringResponse *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__echoStringResponse);
+	if (soap_out_ns__echoStringResponse(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__echoStringResponse(struct soap *soap, const char *tag, int id, const struct ns__echoStringResponse *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__echoStringResponse), type);
+	if (a->_return)
+		soap_element_result(soap, "return");
+	soap_out_xsd__string(soap, "return", -1, &a->_return, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__echoStringResponse * SOAP_FMAC4 soap_get_ns__echoStringResponse(struct soap *soap, struct ns__echoStringResponse *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__echoStringResponse(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__echoStringResponse * SOAP_FMAC4 soap_in_ns__echoStringResponse(struct soap *soap, const char *tag, struct ns__echoStringResponse *a, const char *type)
+{
+	short soap_flag__return = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__echoStringResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__echoStringResponse, sizeof(struct ns__echoStringResponse), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__echoStringResponse(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag__return && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
+				if (soap_in_xsd__string(soap, NULL, &a->_return, "xsd:string"))
+				{	soap_flag__return--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if ((soap->mode & SOAP_XML_STRICT) && (soap_flag__return > 0))
+		{	soap->error = SOAP_OCCURS;
+			return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__echoStringResponse *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__echoStringResponse, 0, sizeof(struct ns__echoStringResponse), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC5 struct ns__echoStringResponse * SOAP_FMAC6 soap_new_ns__echoStringResponse(struct soap *soap, int n)
+{	return soap_instantiate_ns__echoStringResponse(soap, n, NULL, NULL, NULL);
+}
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__echoStringResponse(struct soap *soap, struct ns__echoStringResponse *p)
+{	soap_delete(soap, p);
+}
+
+SOAP_FMAC3 struct ns__echoStringResponse * SOAP_FMAC4 soap_instantiate_ns__echoStringResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__echoStringResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
+	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__echoStringResponse, n, soap_fdelete);
+	if (!cp)
+		return NULL;
+	if (n < 0)
+	{	cp->ptr = (void*)new struct ns__echoStringResponse;
+		if (size)
+			*size = sizeof(struct ns__echoStringResponse);
+	}
+	else
+	{	cp->ptr = (void*)new struct ns__echoStringResponse[n];
+		if (size)
+			*size = n * sizeof(struct ns__echoStringResponse);
+	}
+		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
+	return (struct ns__echoStringResponse*)cp->ptr;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__echoStringResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__echoStringResponse %p -> %p\n", q, p));
+	*(struct ns__echoStringResponse*)p = *(struct ns__echoStringResponse*)q;
+}
+
+#ifndef WITH_NOGLOBAL
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *const*a)
+{
+	if (!soap_reference(soap, *a, SOAP_TYPE_SOAP_ENV__Reason))
+		soap_serialize_SOAP_ENV__Reason(soap, *a);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *const*a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerToSOAP_ENV__Reason);
+	if (soap_out_PointerToSOAP_ENV__Reason(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Reason(struct soap *soap, const char *tag, int id, struct SOAP_ENV__Reason *const*a, const char *type)
+{
+	id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_SOAP_ENV__Reason);
+	if (id < 0)
+		return soap->error;
+	return soap_out_SOAP_ENV__Reason(soap, tag, id, *a, type);
+}
+
+SOAP_FMAC3 struct SOAP_ENV__Reason ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason **p, const char *tag, const char *type)
+{
+	if ((p = soap_in_PointerToSOAP_ENV__Reason(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct SOAP_ENV__Reason ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Reason(struct soap *soap, const char *tag, struct SOAP_ENV__Reason **a, const char *type)
+{
+	if (soap_element_begin_in(soap, tag, 1))
+		return NULL;
+	if (!a)
+		if (!(a = (struct SOAP_ENV__Reason **)soap_malloc(soap, sizeof(struct SOAP_ENV__Reason *))))
+			return NULL;
+	*a = NULL;
+	if (!soap->null && *soap->href != '#')
+	{	soap_revert(soap);
+		if (!(*a = soap_in_SOAP_ENV__Reason(soap, tag, *a, type)))
+			return NULL;
+	}
+	else
+	{	a = (struct SOAP_ENV__Reason **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_SOAP_ENV__Reason, sizeof(struct SOAP_ENV__Reason), 0);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+#endif
+
+#ifndef WITH_NOGLOBAL
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *const*a)
+{
+	if (!soap_reference(soap, *a, SOAP_TYPE_SOAP_ENV__Detail))
+		soap_serialize_SOAP_ENV__Detail(soap, *a);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *const*a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerToSOAP_ENV__Detail);
+	if (soap_out_PointerToSOAP_ENV__Detail(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Detail(struct soap *soap, const char *tag, int id, struct SOAP_ENV__Detail *const*a, const char *type)
+{
+	id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_SOAP_ENV__Detail);
+	if (id < 0)
+		return soap->error;
+	return soap_out_SOAP_ENV__Detail(soap, tag, id, *a, type);
+}
+
+SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail **p, const char *tag, const char *type)
+{
+	if ((p = soap_in_PointerToSOAP_ENV__Detail(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Detail(struct soap *soap, const char *tag, struct SOAP_ENV__Detail **a, const char *type)
+{
+	if (soap_element_begin_in(soap, tag, 1))
+		return NULL;
+	if (!a)
+		if (!(a = (struct SOAP_ENV__Detail **)soap_malloc(soap, sizeof(struct SOAP_ENV__Detail *))))
+			return NULL;
+	*a = NULL;
+	if (!soap->null && *soap->href != '#')
+	{	soap_revert(soap);
+		if (!(*a = soap_in_SOAP_ENV__Detail(soap, tag, *a, type)))
+			return NULL;
+	}
+	else
+	{	a = (struct SOAP_ENV__Detail **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_SOAP_ENV__Detail, sizeof(struct SOAP_ENV__Detail), 0);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+#endif
+
+#ifndef WITH_NOGLOBAL
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *const*a)
+{
+	if (!soap_reference(soap, *a, SOAP_TYPE_SOAP_ENV__Code))
+		soap_serialize_SOAP_ENV__Code(soap, *a);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *const*a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerToSOAP_ENV__Code);
+	if (soap_out_PointerToSOAP_ENV__Code(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Code(struct soap *soap, const char *tag, int id, struct SOAP_ENV__Code *const*a, const char *type)
+{
+	id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_SOAP_ENV__Code);
+	if (id < 0)
+		return soap->error;
+	return soap_out_SOAP_ENV__Code(soap, tag, id, *a, type);
+}
+
+SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code **p, const char *tag, const char *type)
+{
+	if ((p = soap_in_PointerToSOAP_ENV__Code(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Code(struct soap *soap, const char *tag, struct SOAP_ENV__Code **a, const char *type)
+{
+	if (soap_element_begin_in(soap, tag, 1))
+		return NULL;
+	if (!a)
+		if (!(a = (struct SOAP_ENV__Code **)soap_malloc(soap, sizeof(struct SOAP_ENV__Code *))))
+			return NULL;
+	*a = NULL;
+	if (!soap->null && *soap->href != '#')
+	{	soap_revert(soap);
+		if (!(*a = soap_in_SOAP_ENV__Code(soap, tag, *a, type)))
+			return NULL;
+	}
+	else
+	{	a = (struct SOAP_ENV__Code **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_SOAP_ENV__Code, sizeof(struct SOAP_ENV__Code), 0);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+#endif
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_xsd__decimal(struct soap *soap, char **a)
+{	soap_default_string(soap, a);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_xsd__decimal(struct soap *soap, char *const*a)
+{	soap_serialize_string(soap, a);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_xsd__decimal(struct soap *soap, char *const*a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_xsd__decimal);
+	if (soap_out_xsd__decimal(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_xsd__decimal(struct soap *soap, const char *tag, int id, char *const*a, const char *type)
+{
+	return soap_outstring(soap, tag, id, a, type, SOAP_TYPE_xsd__decimal);
+}
+
+SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_xsd__decimal(struct soap *soap, char **p, const char *tag, const char *type)
+{
+	if ((p = soap_in_xsd__decimal(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_xsd__decimal(struct soap *soap, const char *tag, char **a, const char *type)
+{
+	return soap_instring(soap, tag, a, type, SOAP_TYPE_xsd__decimal, 1, -1, -1);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_xsd__dateTime(struct soap *soap, char **a)
+{	soap_default_string(soap, a);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_xsd__dateTime(struct soap *soap, char *const*a)
+{	soap_serialize_string(soap, a);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_xsd__dateTime(struct soap *soap, char *const*a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_xsd__dateTime);
+	if (soap_out_xsd__dateTime(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_xsd__dateTime(struct soap *soap, const char *tag, int id, char *const*a, const char *type)
+{
+	return soap_outstring(soap, tag, id, a, type, SOAP_TYPE_xsd__dateTime);
+}
+
+SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_xsd__dateTime(struct soap *soap, char **p, const char *tag, const char *type)
+{
+	if ((p = soap_in_xsd__dateTime(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_xsd__dateTime(struct soap *soap, const char *tag, char **a, const char *type)
+{
+	return soap_instring(soap, tag, a, type, SOAP_TYPE_xsd__dateTime, 1, -1, -1);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTounsignedByte(struct soap *soap, unsigned char *const*a)
+{
+	soap_reference(soap, *a, SOAP_TYPE_unsignedByte);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTounsignedByte(struct soap *soap, unsigned char *const*a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTounsignedByte);
+	if (soap_out_PointerTounsignedByte(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTounsignedByte(struct soap *soap, const char *tag, int id, unsigned char *const*a, const char *type)
+{
+	id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_unsignedByte);
+	if (id < 0)
+		return soap->error;
+	return soap_out_unsignedByte(soap, tag, id, *a, type);
+}
+
+SOAP_FMAC3 unsigned char ** SOAP_FMAC4 soap_get_PointerTounsignedByte(struct soap *soap, unsigned char **p, const char *tag, const char *type)
+{
+	if ((p = soap_in_PointerTounsignedByte(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 unsigned char ** SOAP_FMAC4 soap_in_PointerTounsignedByte(struct soap *soap, const char *tag, unsigned char **a, const char *type)
+{
+	if (soap_element_begin_in(soap, tag, 1))
+		return NULL;
+	if (!a)
+		if (!(a = (unsigned char **)soap_malloc(soap, sizeof(unsigned char *))))
+			return NULL;
+	*a = NULL;
+	if (!soap->null && *soap->href != '#')
+	{	soap_revert(soap);
+		if (!(*a = soap_in_unsignedByte(soap, tag, *a, type)))
+			return NULL;
+	}
+	else
+	{	a = (unsigned char **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_unsignedByte, sizeof(unsigned char), 0);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToPointerTos__SOAPStruct(struct soap *soap, struct s__SOAPStruct **const*a)
+{
+	if (!soap_reference(soap, *a, SOAP_TYPE_PointerTos__SOAPStruct))
+		soap_serialize_PointerTos__SOAPStruct(soap, *a);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToPointerTos__SOAPStruct(struct soap *soap, struct s__SOAPStruct **const*a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerToPointerTos__SOAPStruct);
+	if (soap_out_PointerToPointerTos__SOAPStruct(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToPointerTos__SOAPStruct(struct soap *soap, const char *tag, int id, struct s__SOAPStruct **const*a, const char *type)
+{
+	id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_PointerTos__SOAPStruct);
+	if (id < 0)
+		return soap->error;
+	return soap_out_PointerTos__SOAPStruct(soap, tag, id, *a, type);
+}
+
+SOAP_FMAC3 struct s__SOAPStruct *** SOAP_FMAC4 soap_get_PointerToPointerTos__SOAPStruct(struct soap *soap, struct s__SOAPStruct ***p, const char *tag, const char *type)
+{
+	if ((p = soap_in_PointerToPointerTos__SOAPStruct(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct s__SOAPStruct *** SOAP_FMAC4 soap_in_PointerToPointerTos__SOAPStruct(struct soap *soap, const char *tag, struct s__SOAPStruct ***a, const char *type)
+{
+	if (soap_element_begin_in(soap, tag, 1))
+		return NULL;
+	if (!a)
+		if (!(a = (struct s__SOAPStruct ***)soap_malloc(soap, sizeof(struct s__SOAPStruct **))))
+			return NULL;
+	*a = NULL;
+	if (!soap->null && *soap->href != '#')
+	{	soap_revert(soap);
+		if (!(*a = soap_in_PointerTos__SOAPStruct(soap, tag, *a, type)))
+			return NULL;
+	}
+	else
+	{	a = (struct s__SOAPStruct ***)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_PointerTos__SOAPStruct, sizeof(struct s__SOAPStruct *), 1);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTos__SOAPStruct(struct soap *soap, struct s__SOAPStruct *const*a)
+{
+	if (!soap_reference(soap, *a, SOAP_TYPE_s__SOAPStruct))
+		soap_serialize_s__SOAPStruct(soap, *a);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTos__SOAPStruct(struct soap *soap, struct s__SOAPStruct *const*a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTos__SOAPStruct);
+	if (soap_out_PointerTos__SOAPStruct(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTos__SOAPStruct(struct soap *soap, const char *tag, int id, struct s__SOAPStruct *const*a, const char *type)
+{
+	id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_s__SOAPStruct);
+	if (id < 0)
+		return soap->error;
+	return soap_out_s__SOAPStruct(soap, tag, id, *a, type);
+}
+
+SOAP_FMAC3 struct s__SOAPStruct ** SOAP_FMAC4 soap_get_PointerTos__SOAPStruct(struct soap *soap, struct s__SOAPStruct **p, const char *tag, const char *type)
+{
+	if ((p = soap_in_PointerTos__SOAPStruct(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct s__SOAPStruct ** SOAP_FMAC4 soap_in_PointerTos__SOAPStruct(struct soap *soap, const char *tag, struct s__SOAPStruct **a, const char *type)
+{
+	if (soap_element_begin_in(soap, tag, 1))
+		return NULL;
+	if (!a)
+		if (!(a = (struct s__SOAPStruct **)soap_malloc(soap, sizeof(struct s__SOAPStruct *))))
+			return NULL;
+	*a = NULL;
+	if (!soap->null && *soap->href != '#')
+	{	soap_revert(soap);
+		if (!(*a = soap_in_s__SOAPStruct(soap, tag, *a, type)))
+			return NULL;
+	}
+	else
+	{	a = (struct s__SOAPStruct **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_s__SOAPStruct, sizeof(struct s__SOAPStruct), 0);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToPointerToxsd__float(struct soap *soap, float **const*a)
+{
+	if (!soap_reference(soap, *a, SOAP_TYPE_PointerToxsd__float))
+		soap_serialize_PointerToxsd__float(soap, *a);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToPointerToxsd__float(struct soap *soap, float **const*a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerToPointerToxsd__float);
+	if (soap_out_PointerToPointerToxsd__float(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToPointerToxsd__float(struct soap *soap, const char *tag, int id, float **const*a, const char *type)
+{
+	id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_PointerToxsd__float);
+	if (id < 0)
+		return soap->error;
+	return soap_out_PointerToxsd__float(soap, tag, id, *a, type);
+}
+
+SOAP_FMAC3 float *** SOAP_FMAC4 soap_get_PointerToPointerToxsd__float(struct soap *soap, float ***p, const char *tag, const char *type)
+{
+	if ((p = soap_in_PointerToPointerToxsd__float(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 float *** SOAP_FMAC4 soap_in_PointerToPointerToxsd__float(struct soap *soap, const char *tag, float ***a, const char *type)
+{
+	if (soap_element_begin_in(soap, tag, 1))
+		return NULL;
+	if (!a)
+		if (!(a = (float ***)soap_malloc(soap, sizeof(float **))))
+			return NULL;
+	*a = NULL;
+	if (!soap->null && *soap->href != '#')
+	{	soap_revert(soap);
+		if (!(*a = soap_in_PointerToxsd__float(soap, tag, *a, type)))
+			return NULL;
+	}
+	else
+	{	a = (float ***)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_PointerToxsd__float, sizeof(float *), 1);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToxsd__float(struct soap *soap, float *const*a)
+{
+	soap_reference(soap, *a, SOAP_TYPE_xsd__float);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToxsd__float(struct soap *soap, float *const*a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerToxsd__float);
+	if (soap_out_PointerToxsd__float(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToxsd__float(struct soap *soap, const char *tag, int id, float *const*a, const char *type)
+{
+	id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_xsd__float);
+	if (id < 0)
+		return soap->error;
+	return soap_out_xsd__float(soap, tag, id, *a, type);
+}
+
+SOAP_FMAC3 float ** SOAP_FMAC4 soap_get_PointerToxsd__float(struct soap *soap, float **p, const char *tag, const char *type)
+{
+	if ((p = soap_in_PointerToxsd__float(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 float ** SOAP_FMAC4 soap_in_PointerToxsd__float(struct soap *soap, const char *tag, float **a, const char *type)
+{
+	if (soap_element_begin_in(soap, tag, 1))
+		return NULL;
+	if (!a)
+		if (!(a = (float **)soap_malloc(soap, sizeof(float *))))
+			return NULL;
+	*a = NULL;
+	if (!soap->null && *soap->href != '#')
+	{	soap_revert(soap);
+		if (!(*a = soap_in_xsd__float(soap, tag, *a, type)))
+			return NULL;
+	}
+	else
+	{	a = (float **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_xsd__float, sizeof(float), 0);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToPointerToxsd__int(struct soap *soap, long **const*a)
+{
+	if (!soap_reference(soap, *a, SOAP_TYPE_PointerToxsd__int))
+		soap_serialize_PointerToxsd__int(soap, *a);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToPointerToxsd__int(struct soap *soap, long **const*a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerToPointerToxsd__int);
+	if (soap_out_PointerToPointerToxsd__int(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToPointerToxsd__int(struct soap *soap, const char *tag, int id, long **const*a, const char *type)
+{
+	id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_PointerToxsd__int);
+	if (id < 0)
+		return soap->error;
+	return soap_out_PointerToxsd__int(soap, tag, id, *a, type);
+}
+
+SOAP_FMAC3 long *** SOAP_FMAC4 soap_get_PointerToPointerToxsd__int(struct soap *soap, long ***p, const char *tag, const char *type)
+{
+	if ((p = soap_in_PointerToPointerToxsd__int(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 long *** SOAP_FMAC4 soap_in_PointerToPointerToxsd__int(struct soap *soap, const char *tag, long ***a, const char *type)
+{
+	if (soap_element_begin_in(soap, tag, 1))
+		return NULL;
+	if (!a)
+		if (!(a = (long ***)soap_malloc(soap, sizeof(long **))))
+			return NULL;
+	*a = NULL;
+	if (!soap->null && *soap->href != '#')
+	{	soap_revert(soap);
+		if (!(*a = soap_in_PointerToxsd__int(soap, tag, *a, type)))
+			return NULL;
+	}
+	else
+	{	a = (long ***)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_PointerToxsd__int, sizeof(long *), 1);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToxsd__int(struct soap *soap, long *const*a)
+{
+	soap_reference(soap, *a, SOAP_TYPE_xsd__int);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToxsd__int(struct soap *soap, long *const*a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerToxsd__int);
+	if (soap_out_PointerToxsd__int(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToxsd__int(struct soap *soap, const char *tag, int id, long *const*a, const char *type)
+{
+	id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_xsd__int);
+	if (id < 0)
+		return soap->error;
+	return soap_out_xsd__int(soap, tag, id, *a, type);
+}
+
+SOAP_FMAC3 long ** SOAP_FMAC4 soap_get_PointerToxsd__int(struct soap *soap, long **p, const char *tag, const char *type)
+{
+	if ((p = soap_in_PointerToxsd__int(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 long ** SOAP_FMAC4 soap_in_PointerToxsd__int(struct soap *soap, const char *tag, long **a, const char *type)
+{
+	if (soap_element_begin_in(soap, tag, 1))
+		return NULL;
+	if (!a)
+		if (!(a = (long **)soap_malloc(soap, sizeof(long *))))
+			return NULL;
+	*a = NULL;
+	if (!soap->null && *soap->href != '#')
+	{	soap_revert(soap);
+		if (!(*a = soap_in_xsd__int(soap, tag, *a, type)))
+			return NULL;
+	}
+	else
+	{	a = (long **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_xsd__int, sizeof(long), 0);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToxsd__string(struct soap *soap, char **const*a)
+{
+	if (!soap_reference(soap, *a, SOAP_TYPE_xsd__string))
+		soap_serialize_xsd__string(soap, *a);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToxsd__string(struct soap *soap, char **const*a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerToxsd__string);
+	if (soap_out_PointerToxsd__string(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToxsd__string(struct soap *soap, const char *tag, int id, char **const*a, const char *type)
+{
+	id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_xsd__string);
+	if (id < 0)
+		return soap->error;
+	return soap_out_xsd__string(soap, tag, id, *a, type);
+}
+
+SOAP_FMAC3 char *** SOAP_FMAC4 soap_get_PointerToxsd__string(struct soap *soap, char ***p, const char *tag, const char *type)
+{
+	if ((p = soap_in_PointerToxsd__string(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 char *** SOAP_FMAC4 soap_in_PointerToxsd__string(struct soap *soap, const char *tag, char ***a, const char *type)
+{
+	if (soap_element_begin_in(soap, tag, 1))
+		return NULL;
+	if (!a)
+		if (!(a = (char ***)soap_malloc(soap, sizeof(char **))))
+			return NULL;
+	*a = NULL;
+	if (!soap->null && *soap->href != '#')
+	{	soap_revert(soap);
+		if (!(*a = soap_in_xsd__string(soap, tag, *a, type)))
+			return NULL;
+	}
+	else
+	{	a = (char ***)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_xsd__string, sizeof(char *), 1);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_xsd__string(struct soap *soap, char **a)
+{	soap_default_string(soap, a);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_xsd__string(struct soap *soap, char *const*a)
+{	soap_serialize_string(soap, a);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_xsd__string(struct soap *soap, char *const*a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_xsd__string);
+	if (soap_out_xsd__string(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_xsd__string(struct soap *soap, const char *tag, int id, char *const*a, const char *type)
+{
+	return soap_outstring(soap, tag, id, a, type, SOAP_TYPE_xsd__string);
+}
+
+SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_xsd__string(struct soap *soap, char **p, const char *tag, const char *type)
+{
+	if ((p = soap_in_xsd__string(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_xsd__string(struct soap *soap, const char *tag, char **a, const char *type)
+{
+	return soap_instring(soap, tag, a, type, SOAP_TYPE_xsd__string, 1, -1, -1);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default__QName(struct soap *soap, char **a)
+{	soap_default_string(soap, a);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize__QName(struct soap *soap, char *const*a)
+{	soap_serialize_string(soap, a);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put__QName(struct soap *soap, char *const*a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE__QName);
+	if (soap_out__QName(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out__QName(struct soap *soap, const char *tag, int id, char *const*a, const char *type)
+{
+	return soap_outstring(soap, tag, id, a, type, SOAP_TYPE__QName);
+}
+
+SOAP_FMAC3 char ** SOAP_FMAC4 soap_get__QName(struct soap *soap, char **p, const char *tag, const char *type)
+{
+	if ((p = soap_in__QName(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 char * * SOAP_FMAC4 soap_in__QName(struct soap *soap, const char *tag, char **a, const char *type)
+{
+	return soap_instring(soap, tag, a, type, SOAP_TYPE__QName, 2, -1, -1);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_string(struct soap *soap, char **a)
+{	(void)soap; /* appease -Wall -Werror */
+#ifdef SOAP_DEFAULT_string
+	*a = SOAP_DEFAULT_string;
+#else
+	*a = (char *)0;
+#endif
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_string(struct soap *soap, char *const*a)
+{
+	soap_reference(soap, *a, SOAP_TYPE_string);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_string(struct soap *soap, char *const*a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_string);
+	if (soap_out_string(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_string(struct soap *soap, const char *tag, int id, char *const*a, const char *type)
+{
+	return soap_outstring(soap, tag, id, a, type, SOAP_TYPE_string);
+}
+
+SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_string(struct soap *soap, char **p, const char *tag, const char *type)
+{
+	if ((p = soap_in_string(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_string(struct soap *soap, const char *tag, char **a, const char *type)
+{
+	return soap_instring(soap, tag, a, type, SOAP_TYPE_string, 1, -1, -1);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_Array2Ofint(struct soap *soap, int const a[2])
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_Array2Ofint(struct soap *soap, int a[2])
+{
+	int i;
+	(void)soap; /* appease -Wall -Werror */
+	for (i = 0; i < 2; i++)
+	soap_default_int(soap, a+i);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_Array2Ofint(struct soap *soap, int const a[2], const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_Array2Ofint);
+	if (soap_out_Array2Ofint(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_Array2Ofint(struct soap *soap, const char *tag, int id, int const a[2], const char *type)
+{
+	int i;
+	soap_array_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_Array2Ofint), "xsd:int[2]", 0);
+	for (i = 0; i < 2; i++)
+	{
+		soap_out_int(soap, "item", -1, a+i, "");
+	}
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 int * SOAP_FMAC4 soap_get_Array2Ofint(struct soap *soap, int a[2], const char *tag, const char *type)
+{	int (*p);
+	if ((p = soap_in_Array2Ofint(soap, tag, a, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 int * SOAP_FMAC4 soap_in_Array2Ofint(struct soap *soap, const char *tag, int a[2], const char *type)
+{
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (soap_match_array(soap, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (int (*))soap_id_enter(soap, soap->id, a, SOAP_TYPE_Array2Ofint, sizeof(int[2]), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_Array2Ofint(soap, a);
+	if (soap->body && !*soap->href)
+	{	int i;
+		for (i = 0; i < 2; i++)
+		{	soap_peek_element(soap);
+			if (soap->position)
+			{	i = soap->positions[0];
+				if (i < 0 || i >= 2)
+				{	soap->error = SOAP_IOB;
+					return NULL;
+				}
+			}
+			if (!soap_in_int(soap, NULL, a+i, "xsd:int"))
+			{	if (soap->error != SOAP_NO_TAG)
+					return NULL;
+				soap->error = SOAP_OK;
+				break;
+			}
+		}
+		if (soap->mode & SOAP_C_NOIOB)
+			while (soap_element_end_in(soap, tag) == SOAP_SYNTAX_ERROR)
+			{	soap->peeked = 1;
+				soap_ignore_element(soap);
+			}
+		else if (soap_element_end_in(soap, tag))
+		{	if (soap->error == SOAP_SYNTAX_ERROR)
+				soap->error = SOAP_IOB;
+			return NULL;
+		}
+	}
+	else
+	{	a = (int (*))soap_id_forward(soap, soap->href, (void**)soap_id_enter(soap, soap->id, a, SOAP_TYPE_Array2Ofint, sizeof(int[2]), 0, NULL, NULL, NULL), 0, SOAP_TYPE_Array2Ofint, 0, sizeof(int[2]), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return (int *)a;
+}
diff --git a/gsoap-palm/palmFunctions.c b/gsoap-palm/palmFunctions.c
new file mode 100644
index 0000000..b51a256
--- /dev/null
+++ b/gsoap-palm/palmFunctions.c
@@ -0,0 +1,146 @@
+//===================================================================================
+//
+//    (C) COPYRIGHT International Business Machines Corp., 2002 All Rights Reserved
+//    Licensed Materials - Property of IBM
+//    US Government Users Restricted Rights - Use, duplication or
+//    disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
+//
+//    IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+//    ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+//    PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+//    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+//    USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+//    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
+//    OR PERFORMANCE OF THIS SOFTWARE. 
+//
+//    The program may be used, executed, copied, modified, and distributed
+//    without royalty for the purpose of developing, using, marketing, or distributing.
+//
+//=======================================================================================
+
+/*
+Copyright (C) 2000-2004, Robert van Engelen, Genivia, Inc., All Rights Reserved.
+*/
+
+#include "stdlib.h"
+#include <string.h>
+#include <va_list.h>
+#include <stdarg.h>
+#include <StringMgr.h>
+#include "PalmFunctions.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int AppNetOpenCount = 0;
+extern UInt16 AppNetRefnum;
+extern	Int32 AppNetTimeout;
+extern Err 	NetUInit (void);
+
+char * PalmStrerror(int err)
+{
+    static char str[40];
+
+    SysErrString(err,str,40);
+
+    return str;
+}
+
+double strtod(const char *s, char **endptr) {
+
+	char *p = StrChr(s,'E');
+   	FlpCompDouble result;
+   	*endptr = ((char*)s)+StrLen(s);
+   	if (p)       // change E to e and remove '+'
+   	{
+    	*p='e';
+    	if (*(p+1)=='+')
+      	StrCopy(p+1,p+2);
+   	}
+   	FlpBufferAToF (&result.fd, s);
+
+   return result.d;
+}
+
+void palmSprintf(char *str, const char *conv, ...)
+{
+    int retValue = 1;
+    size_t n = strlen(conv);
+    va_list args;
+    va_start(args, conv);
+
+    // Catch the float 
+
+    if(n < 6 && conv[0] == '%' && (conv[n-1] == 'g' || conv[n-1] == 'G' || conv[n-1] == 'f' || conv[n-1] == 'F'))
+    {  
+        FlpCompDouble flp;
+        flp.d = (double) va_arg(args, double);
+        FlpFToA(flp.fd,str);
+        goto end;
+    }
+    StrVPrintF(str,(const Char *)conv,args);
+    end:
+      va_end(args);
+}
+
+Err palmNetLibOpen() 
+{
+	Err error = 0;
+	UInt16 ifErrs;
+	
+	if (!AppNetOpenCount)
+	{
+		
+		error = NetUInit();
+		if (error) return error;
+		
+		error = NetLibOpen(AppNetRefnum, &ifErrs);
+		
+		if (error == netErrAlreadyOpen)  {
+		error = 0;
+		}
+		
+	}
+	
+	if (!error) AppNetOpenCount++;
+	return error;
+
+}
+Err palmNetLibClose()
+{
+
+	Err error = 0;
+	
+	if (AppNetOpenCount)
+	{
+		
+		AppNetOpenCount--;
+		error = NetLibClose(AppNetRefnum, false);
+	}
+	
+	return error;
+
+}
+
+int palmRand()
+{
+/* Compute x = (7^5 * x) mod (2^31 - 1)
+ * without overflowing 31 bits:
+ *      (2^31 - 1) = 127773 * (7^5) + 2836
+ * From "Random number generators: good ones are hard to find",
+ * Park and Miller, Communications of the ACM, vol. 31, no. 10,
+ * October 1988, p. 1195.
+ */
+       static int seed = 0x19610910;
+       int hi = seed / 127773L;
+       int lo = seed % 127773L;
+       int x = 16807L * lo - 2836L * hi;
+       if (x <= 0)
+               x += 0x7fffffffL;
+       return ((seed = x) % 0x8FFFFFFF);
+}
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/gsoap-palm/palmFunctions.h b/gsoap-palm/palmFunctions.h
new file mode 100644
index 0000000..641ff3e
--- /dev/null
+++ b/gsoap-palm/palmFunctions.h
@@ -0,0 +1,49 @@
+//===================================================================================
+//
+//    (C) COPYRIGHT International Business Machines Corp., 2002 All Rights Reserved
+//    Licensed Materials - Property of IBM
+//    US Government Users Restricted Rights - Use, duplication or
+//    disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
+//
+//    IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+//    ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+//    PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+//    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+//    USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+//    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
+//    OR PERFORMANCE OF THIS SOFTWARE.
+//
+//    The program may be used, executed, copied, modified, and distributed
+//    without royalty for the purpose of developing, using, marketing, or distributing.
+// 
+//=======================================================================================
+#ifndef _PALMFUNCTIONS_H
+#define _PALMFUNCTIONS_H
+
+#include <FloatMgr.h>
+#include <sys_types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+Err palmNetLibOpen();
+Err palmNetLibClose();
+
+void palmSprintf(char *str, const char *conv, ...);
+#undef sprintf
+#define sprintf palmSprintf
+#define strncmp StrNCompare
+#define strncat StrNCat 
+#define strerror PalmStrerror 
+char * PalmStrerror(int errnum);
+double strtod(const char *s, char **endptr);
+int palmRand(void);
+#define rand palmRand
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/gsoap-palm/palmsoap1.c b/gsoap-palm/palmsoap1.c
new file mode 100644
index 0000000..2925f2e
--- /dev/null
+++ b/gsoap-palm/palmsoap1.c
@@ -0,0 +1,13449 @@
+#define PALM_1
+/*
+
+stdsoap2.c[pp] 2.7.6e
+
+gSOAP runtime
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+Contributors:
+
+Wind River Systems Inc., for the following additions under gSOAP public license:
+  - vxWorks compatible	(#define VXWORKS)
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+Installation note:
+
+Win32 build needs winsock.dll (Visual C++ "wsock32.lib")
+To do this in Visual C++ 6.0, go to "Project", "settings", select the "Link"
+tab (the project file needs to be selected in the file view) and add
+"wsock32.lib" to the "Object/library modules" entry
+
+On Mac OS X with gcc (GCC) 3.1 20020420 (prerelease) you MUST compile with
+-fstack_check when using -O2 because gcc 3.1 has a bug that smashes the stack
+when locally allocated data exceeds 64K.
+
+*/
+
+#ifdef AS400
+# pragma convert(819)	/* EBCDIC to ASCII */
+#endif
+
+#include "stdsoap2.h"
+
+#ifdef __cplusplus
+SOAP_SOURCE_STAMP("@(#) stdsoap2.cpp ver 2.7.6e 2006-02-18 12:00:00 GMT")
+extern "C" {
+#else
+SOAP_SOURCE_STAMP("@(#) stdsoap2.c ver 2.7.6e 2006-02-18 12:00:00 GMT")
+#endif
+
+/* 8bit character representing unknown/nonrepresentable character data (e.g. not supported by current locale with multibyte support enabled) */
+#ifndef SOAP_UNKNOWN_CHAR
+#define SOAP_UNKNOWN_CHAR (127)
+#endif
+
+/*      EOF=-1 */
+#define SOAP_LT (soap_wchar)(-2) /* XML character '<' */
+#define SOAP_TT (soap_wchar)(-3) /* XML character '</' */
+#define SOAP_GT (soap_wchar)(-4) /* XML character '>' */
+#define SOAP_QT (soap_wchar)(-5) /* XML character '"' */
+#define SOAP_AP (soap_wchar)(-6) /* XML character ''' */
+
+#define soap_blank(c)		((c) >= 0 && (c) <= 32)
+#define soap_notblank(c)	((c) > 32)
+#define soap_hash_ptr(p)	(((unsigned long)(p) >> 3) & (SOAP_PTRHASH - 1))
+
+#ifdef SOAP_DEBUG
+static void soap_init_logs(struct soap*);
+static void soap_close_logfile(struct soap*, int);
+static void soap_set_logfile(struct soap*, int, const char*);
+static void soap_free_mht(struct soap*);
+static void soap_track_unlink(struct soap*, const void*);
+#endif
+
+#ifndef PALM_2
+static int soap_set_error(struct soap*, const char*, const char*, const char*, const char*, int);
+static int soap_copy_fault(struct soap*, const char*, const char*, const char*, const char*);
+static int soap_getattrval(struct soap*, char*, size_t, soap_wchar);
+#endif
+
+#ifndef PALM_1
+static soap_wchar soap_char(struct soap*);
+static soap_wchar soap_get_pi(struct soap*);
+static int soap_isxdigit(int);
+static void *fplugin(struct soap*, const char*);
+#ifndef WITH_NOIDREF
+static void soap_update_ptrs(struct soap*, char*, char*, char*, char*);
+static int soap_has_copies(struct soap*, const char*, const char*);
+static void soap_init_iht(struct soap*);
+static void soap_free_iht(struct soap*);
+static void soap_init_pht(struct soap*);
+static void soap_free_pht(struct soap*);
+#endif
+#endif
+
+#ifndef WITH_LEAN
+static const char *soap_set_validation_fault(struct soap*, const char*, const char*);
+static int soap_isnumeric(struct soap*, const char*);
+static time_t soap_timegm(struct tm*);
+static struct soap_nlist *soap_lookup_ns(struct soap *soap, const char *tag, size_t n);
+static struct soap_nlist *soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized);
+static void soap_pop_ns(struct soap *soap);
+static void soap_utilize_ns(struct soap *soap, const char *tag, size_t n);
+#endif
+
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart *soap_new_multipart(struct soap*, struct soap_multipart**, struct soap_multipart**, char*, size_t);
+static int soap_putdimefield(struct soap*, const char*, size_t);
+static char *soap_getdimefield(struct soap*, size_t);
+static void soap_select_mime_boundary(struct soap*);
+static int soap_valid_mime_boundary(struct soap*);
+static int soap_match_cid(struct soap*, const char*, const char*);
+static void soap_resolve_attachment(struct soap*, struct soap_multipart*);
+#endif
+#endif
+
+#ifdef WITH_GZIP
+static int soap_getgziphdr(struct soap*);
+#endif
+
+#ifdef WITH_OPENSSL
+static int ssl_init_done = 0;
+static int ssl_auth_init(struct soap*);
+static int ssl_verify_callback(int, X509_STORE_CTX*);
+static int ssl_password(char*, int, int, void *);
+static const char *ssl_error(struct soap*, int);
+/* This callback is included for future references. It should not be deleted
+static DH *ssl_tmp_dh(SSL*, int, int);
+*/
+#endif
+
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char *soap_decode(char*, size_t, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar soap_getchunkchar(struct soap*);
+static const char *http_error(struct soap*, int);
+static int http_post(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
+static int http_get(struct soap*);
+static int http_send_header(struct soap*, const char*);
+static int http_post_header(struct soap*, const char*, const char*);
+static int http_response(struct soap*, int, size_t);
+static int http_parse(struct soap*);
+static int http_parse_header(struct soap*, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int fsend(struct soap*, const char*, size_t);
+static size_t frecv(struct soap*, char*, size_t);
+static int tcp_init(struct soap*);
+static const char *tcp_error(struct soap*);
+#ifndef WITH_IPV6
+static int tcp_gethost(struct soap*, const char *addr, struct in_addr *inaddr);
+#endif
+static int tcp_connect(struct soap*, const char *endpoint, const char *host, int port);
+static int tcp_accept(struct soap*, int, struct sockaddr*, int*);
+static int tcp_disconnect(struct soap*);
+static int tcp_closesocket(struct soap*, SOAP_SOCKET);
+static int tcp_shutdownsocket(struct soap*, SOAP_SOCKET, int);
+static const char *soap_strerror(struct soap*);
+#endif
+#endif
+
+#if defined(PALM) && !defined(PALM_2)
+unsigned short errno;
+#endif
+
+#ifndef PALM_1
+static const char soap_env1[42] = "http://schemas.xmlsoap.org/soap/envelope/";
+static const char soap_enc1[42] = "http://schemas.xmlsoap.org/soap/encoding/";
+static const char soap_env2[40] = "http://www.w3.org/2003/05/soap-envelope";
+static const char soap_enc2[40] = "http://www.w3.org/2003/05/soap-encoding";
+static const char soap_rpc[35] = "http://www.w3.org/2003/05/soap-rpc";
+#endif
+
+#ifndef PALM_1
+const struct soap_double_nan soap_double_nan = {0xFFFFFFFF, 0xFFFFFFFF};
+static const char soap_base64o[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+static const char soap_base64i[81] = "\76XXX\77\64\65\66\67\70\71\72\73\74\75XXXXXXX\00\01\02\03\04\05\06\07\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31XXXXXX\32\33\34\35\36\37\40\41\42\43\44\45\46\47\50\51\52\53\54\55\56\57\60\61\62\63";
+#endif
+
+#ifndef WITH_LEAN
+static const char soap_indent[11] = "\n\t\t\t\t\t\t\t\t\t";
+/* Alternative indentation form for SOAP_XML_INDENT:
+static const char soap_indent[21] = "\n                   ";
+*/
+#endif
+
+static const char soap_padding[4] = "\0\0\0";
+#define SOAP_STR_PADDING (soap_padding)
+#define SOAP_STR_EOS (soap_padding)
+#define SOAP_NON_NULL (soap_padding)
+
+#ifndef WITH_LEAN
+static const struct soap_code_map html_entity_codes[] = /* entities for XHTML parsing */
+{ { 160, "nbsp" },
+  { 161, "iexcl" },
+  { 162, "cent" },
+  { 163, "pound" },
+  { 164, "curren" },
+  { 165, "yen" },
+  { 166, "brvbar" },
+  { 167, "sect" },
+  { 168, "uml" },
+  { 169, "copy" },
+  { 170, "ordf" },
+  { 171, "laquo" },
+  { 172, "not" },
+  { 173, "shy" },
+  { 174, "reg" },
+  { 175, "macr" },
+  { 176, "deg" },
+  { 177, "plusmn" },
+  { 178, "sup2" },
+  { 179, "sup3" },
+  { 180, "acute" },
+  { 181, "micro" },
+  { 182, "para" },
+  { 183, "middot" },
+  { 184, "cedil" },
+  { 185, "sup1" },
+  { 186, "ordm" },
+  { 187, "raquo" },
+  { 188, "frac14" },
+  { 189, "frac12" },
+  { 190, "frac34" },
+  { 191, "iquest" },
+  { 192, "Agrave" },
+  { 193, "Aacute" },
+  { 194, "Acirc" },
+  { 195, "Atilde" },
+  { 196, "Auml" },
+  { 197, "Aring" },
+  { 198, "AElig" },
+  { 199, "Ccedil" },
+  { 200, "Egrave" },
+  { 201, "Eacute" },
+  { 202, "Ecirc" },
+  { 203, "Euml" },
+  { 204, "Igrave" },
+  { 205, "Iacute" },
+  { 206, "Icirc" },
+  { 207, "Iuml" },
+  { 208, "ETH" },
+  { 209, "Ntilde" },
+  { 210, "Ograve" },
+  { 211, "Oacute" },
+  { 212, "Ocirc" },
+  { 213, "Otilde" },
+  { 214, "Ouml" },
+  { 215, "times" },
+  { 216, "Oslash" },
+  { 217, "Ugrave" },
+  { 218, "Uacute" },
+  { 219, "Ucirc" },
+  { 220, "Uuml" },
+  { 221, "Yacute" },
+  { 222, "THORN" },
+  { 223, "szlig" },
+  { 224, "agrave" },
+  { 225, "aacute" },
+  { 226, "acirc" },
+  { 227, "atilde" },
+  { 228, "auml" },
+  { 229, "aring" },
+  { 230, "aelig" },
+  { 231, "ccedil" },
+  { 232, "egrave" },
+  { 233, "eacute" },
+  { 234, "ecirc" },
+  { 235, "euml" },
+  { 236, "igrave" },
+  { 237, "iacute" },
+  { 238, "icirc" },
+  { 239, "iuml" },
+  { 240, "eth" },
+  { 241, "ntilde" },
+  { 242, "ograve" },
+  { 243, "oacute" },
+  { 244, "ocirc" },
+  { 245, "otilde" },
+  { 246, "ouml" },
+  { 247, "divide" },
+  { 248, "oslash" },
+  { 249, "ugrave" },
+  { 250, "uacute" },
+  { 251, "ucirc" },
+  { 252, "uuml" },
+  { 253, "yacute" },
+  { 254, "thorn" },
+  { 255, "yuml" },
+  {   0, NULL }
+};
+#endif
+
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+static const struct soap_code_map h_error_codes[] =
+{
+#ifdef HOST_NOT_FOUND   
+  { HOST_NOT_FOUND, "Host not found" },
+#endif
+#ifdef TRY_AGAIN
+  { TRY_AGAIN, "Try Again" },
+#endif
+#ifdef NO_RECOVERY  
+  { NO_RECOVERY, "No Recovery" },
+#endif
+#ifdef NO_DATA
+  { NO_DATA, "No Data" },
+#endif
+#ifdef NO_ADDRESS
+  { NO_ADDRESS, "No Address" },
+#endif
+  { 0, NULL }
+};
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+static const struct soap_code_map h_http_error_codes[] =
+{ { 201, "Created" },
+  { 202, "Accepted" },
+  { 203, "Non-Authoritative Information" },
+  { 204, "No Content" },
+  { 205, "Reset Content" },
+  { 206, "Partial Content" },
+  { 300, "Multiple Choices" },
+  { 301, "Moved Permanently" },
+  { 302, "Found" },
+  { 303, "See Other" },
+  { 304, "Not Modified" },
+  { 305, "Use Proxy" },
+  { 307, "Temporary Redirect" },
+  { 400, "Bad Request" },
+  { 401, "Unauthorized" },
+  { 402, "Payment Required" },
+  { 403, "Forbidden" },
+  { 404, "Not Found" },
+  { 405, "Method Not Allowed" },
+  { 406, "Not Acceptable" },
+  { 407, "Proxy Authentication Required" },
+  { 408, "Request Time-out" },
+  { 409, "Conflict" },
+  { 410, "Gone" },
+  { 411, "Length Required" },
+  { 412, "Precondition Failed" },
+  { 413, "Request Entity Too Large" },
+  { 414, "Request-URI Too Large" },
+  { 415, "Unsupported Media Type" },
+  { 416, "Requested range not satisfiable" },
+  { 417, "Expectation Failed" },
+  { 500, "Internal Server Error" },
+  { 501, "Not Implemented" },
+  { 502, "Bad Gateway" },
+  { 503, "Service Unavailable" },
+  { 504, "Gateway Time-out" },
+  { 505, "HTTP Version not supported" },
+  {   0, NULL }
+};
+#endif
+#endif
+
+#ifdef WITH_OPENSSL
+static const struct soap_code_map h_ssl_error_codes[] =
+{
+#define _SSL_ERROR(e) { e, #e }
+  _SSL_ERROR(SSL_ERROR_SSL),
+  _SSL_ERROR(SSL_ERROR_ZERO_RETURN),
+  _SSL_ERROR(SSL_ERROR_WANT_READ),
+  _SSL_ERROR(SSL_ERROR_WANT_WRITE),
+  _SSL_ERROR(SSL_ERROR_WANT_CONNECT),
+  _SSL_ERROR(SSL_ERROR_WANT_X509_LOOKUP),
+  _SSL_ERROR(SSL_ERROR_SYSCALL),
+  { 0, NULL }
+};
+#endif
+
+#ifndef WITH_LEANER
+static const struct soap_code_map mime_codes[] =
+{ { SOAP_MIME_7BIT,		"7bit" },
+  { SOAP_MIME_8BIT,		"8bit" },
+  { SOAP_MIME_BINARY,		"binary" },
+  { SOAP_MIME_QUOTED_PRINTABLE, "quoted-printable" },
+  { SOAP_MIME_BASE64,		"base64" },
+  { SOAP_MIME_IETF_TOKEN,	"ietf-token" },
+  { SOAP_MIME_X_TOKEN,		"x-token" },
+  { 0,				NULL }
+};
+#endif
+
+#ifdef WIN32
+static int tcp_done = 0;
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+fsend(struct soap *soap, const char *s, size_t n)
+{ register int nwritten;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  if (soap->os)
+  { soap->os->write(s, n);
+    if (soap->os->good())
+      return SOAP_OK;
+    return SOAP_EOF;
+  }
+#endif
+  while (n)
+  { if (soap_valid_socket(soap->socket))
+    { 
+#ifndef WITH_LEAN
+      if (soap->send_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->send_timeout > 0)
+        { timeout.tv_sec = soap->send_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->send_timeout/1000000;
+          timeout.tv_usec = -soap->send_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { register int r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            return SOAP_EOF;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+          { soap->errnum = soap_socket_errno;
+            return SOAP_EOF;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+        nwritten = SSL_write(soap->ssl, s, n);
+      else if (soap->bio)
+        nwritten = BIO_write(soap->bio, s, n);
+      else
+#endif
+#ifdef WITH_UDP
+      if ((soap->omode & SOAP_IO_UDP))
+      { if (soap->peerlen)
+	  nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+        else
+	  nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	/* retry and back-off algorithm */
+	/* TODO: this is not very clear from specs so verify and limit conditions under which we should loop (e.g. ENOBUFS) */
+	if (nwritten < 0)
+        { struct timeval timeout;
+          fd_set fd;
+	  int udp_repeat;
+	  int udp_delay;
+          if ((soap->connect_flags & SO_BROADCAST))
+	    udp_repeat = 3; /* SOAP-over-UDP MULTICAST_UDP_REPEAT - 1 */
+          else
+	    udp_repeat = 1; /* SOAP-over-UDP UNICAST_UDP_REPEAT - 1 */
+	  udp_delay = (soap_random % 201) + 50; /* UDP_MIN_DELAY .. UDP_MAX_DELAY */
+	  do
+          { timeout.tv_sec = 0;
+            timeout.tv_usec = 1000 * udp_delay; /* ms */
+            FD_ZERO(&fd);
+            FD_SET((SOAP_SOCKET)soap->socket, &fd);
+            select((SOAP_SOCKET)(soap->socket + 1), NULL, NULL, &fd, &timeout);
+	    if (soap->peerlen)
+	      nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+            else
+	      nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	    udp_delay <<= 1;
+	    if (udp_delay > 500) /* UDP_UPPER_DELAY */
+	      udp_delay = 500;
+	  }
+	  while (nwritten < 0 && --udp_repeat > 0);
+	}
+      }
+      else
+#endif
+#if !defined(PALM) && !defined(AS400)
+        nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+#else
+        nwritten = send((SOAP_SOCKET)soap->socket, (void*)s, n, soap->socket_flags);
+#endif
+      if (nwritten <= 0)
+      {
+#ifdef WITH_OPENSSL
+	int err;
+        if (soap->ssl && (err = SSL_get_error(soap->ssl, nwritten)) != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return SOAP_EOF;
+#endif
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EWOULDBLOCK && soap_socket_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_socket_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    else
+    {
+#ifdef WITH_FASTCGI
+      nwritten = fwrite((void*)s, 1, n, stdout);
+      fflush(stdout);
+#else
+#ifdef UNDER_CE
+      nwritten = fwrite(s, 1, n, soap->sendfd);
+#else
+#ifdef VXWORKS
+#ifdef WMW_RPM_IO
+      if (soap->rpmreqid)
+        nwritten = (httpBlockPut(soap->rpmreqid, s, n) == 0) ? n : -1; 
+      else
+#endif
+        nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w"));
+#else
+      nwritten = write((SOAP_SOCKET)soap->sendfd, s, n);
+#endif
+#endif
+#endif
+      if (nwritten <= 0)
+      { if (soap_errno != SOAP_EINTR && soap_errno != SOAP_EWOULDBLOCK && soap_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    n -= nwritten;
+    s += nwritten;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_raw(struct soap *soap, const char *s, size_t n)
+{ if (!n)
+    return SOAP_OK;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { soap->count += n;
+#ifndef WITH_LEANER
+    if (soap->fpreparesend && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+  if (soap->mode & SOAP_IO)
+  { register size_t i = SOAP_BUFLEN - soap->bufidx;
+    while (n >= i)
+    { memcpy(soap->buf + soap->bufidx, s, i);
+      soap->bufidx = SOAP_BUFLEN;
+      if (soap_flush(soap))
+        return soap->error;
+      s += i;
+      n -= i;
+      i = SOAP_BUFLEN;
+    }
+    memcpy(soap->buf + soap->bufidx, s, n);
+    soap->bufidx += n;
+    return SOAP_OK;
+  }
+  return soap_flush_raw(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush(struct soap *soap)
+{ register int n = soap->bufidx;
+  if (n)
+  { soap->bufidx = 0;
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { soap->d_stream.next_in = (Byte*)soap->buf;
+      soap->d_stream.avail_in = (unsigned int)n;
+#ifdef WITH_GZIP
+      soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)n);
+#endif
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating %u bytes\n", soap->d_stream.avail_in));
+        if (deflate(&soap->d_stream, Z_NO_FLUSH) != Z_OK)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+          return soap->error = SOAP_ZLIB_ERROR;
+        }
+        if (!soap->d_stream.avail_out)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN))
+            return soap->error;
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (soap->d_stream.avail_in);
+    }
+    else
+#endif
+      return soap_flush_raw(soap, soap->buf, n);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush_raw(struct soap *soap, const char *s, size_t n)
+{ if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+  { register char *t;
+    if (!(t = (char*)soap_push_block(soap, n)))
+      return soap->error = SOAP_EOM;
+    memcpy(t, s, n);
+#ifndef WITH_LEANER
+    if (soap->fpreparesend)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+  { char t[16];
+    sprintf(t, "\r\n%lX\r\n" + (soap->chunksize ? 0 : 2), (unsigned long)n);
+    DBGMSG(SENT, t, strlen(t));
+    if ((soap->error = soap->fsend(soap, t, strlen(t))))
+      return soap->error;
+    soap->chunksize += n;
+  }
+  DBGMSG(SENT, s, n);
+#endif
+  return soap->error = soap->fsend(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send(struct soap *soap, const char *s)
+{ if (s)
+    return soap_send_raw(soap, s, strlen(s));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send2(struct soap *soap, const char *s1, const char *s2)
+{ if (soap_send(soap, s1))
+    return soap->error;
+  return soap_send(soap, s2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send3(struct soap *soap, const char *s1, const char *s2, const char *s3)
+{ if (soap_send(soap, s1)
+   || soap_send(soap, s2))
+    return soap->error;
+  return soap_send(soap, s3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static size_t
+frecv(struct soap *soap, char *s, size_t n)
+{ register int r;
+  soap->errnum = 0;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  if (soap->is)
+  { if (soap->is->good())
+      return soap->is->read(s, n).gcount();
+    return 0;
+  }
+#endif
+  if (soap_valid_socket(soap->socket))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->recv_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->recv_timeout > 0)
+        { timeout.tv_sec = soap->recv_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->recv_timeout/1000000;
+          timeout.tv_usec = -soap->recv_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+	  { soap->errnum = 0;
+            return 0;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+	  { soap->errnum = soap_socket_errno;
+            return 0;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+      { int err;
+	r = SSL_read(soap->ssl, s, n);
+        if (r > 0)
+          return (size_t)r;
+	err = SSL_get_error(soap->ssl, r);
+	if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return 0;
+      }
+      else if (soap->bio)
+      { r = BIO_read(soap->bio, s, n);
+        if (r > 0)
+          return (size_t)r;
+        return 0;
+      }
+      else
+#endif
+      { 
+#ifdef WITH_UDP
+        if ((soap->omode & SOAP_IO_UDP))
+        { SOAP_SOCKLEN_T k = (SOAP_SOCKLEN_T)sizeof(soap->peer);
+	  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+          r = recvfrom((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, &k);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+	  soap->peerlen = (size_t)k;
+#ifndef WITH_IPV6
+          soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+          soap->port = (int)ntohs(soap->peer.sin_port);
+#endif
+        }
+	else
+#endif
+          r = recv((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+        if (r >= 0)
+          return (size_t)r;
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN && soap_socket_errno != SOAP_EWOULDBLOCK)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#ifndef WITH_LEAN
+      { struct timeval timeout;
+        fd_set fd;
+        timeout.tv_sec = 0;
+        timeout.tv_usec = 10000;
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+#ifdef WITH_OPENSSL
+        if (soap->ssl && SSL_get_error(soap->ssl, r) == SSL_ERROR_WANT_WRITE)
+          r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+        else
+          r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#else
+        r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#endif
+        if (r < 0 && soap_socket_errno != SOAP_EINTR)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#endif
+    }
+  }
+#ifdef WITH_FASTCGI
+  return fread(s, 1, n, stdin);
+#else
+#ifdef UNDER_CE
+  return fread(s, 1, n, soap->recvfd);
+#else
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    r = httpBlockRead(soap->rpmreqid, s, n);
+  else
+#endif
+  r = read((SOAP_SOCKET)soap->recvfd, s, n);
+  if (r >= 0)
+    return (size_t)r;
+  soap->errnum = soap_errno;
+  return 0;
+#endif
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar
+soap_getchunkchar(struct soap *soap)
+{ if (soap->bufidx < soap->buflen)
+    return soap->buf[soap->bufidx++];
+  soap->bufidx = 0;
+  soap->buflen = soap->chunkbuflen = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)soap->buflen, soap->socket));
+  DBGMSG(RECV, soap->buf, soap->buflen);
+  if (soap->buflen)
+    return soap->buf[soap->bufidx++];
+  return EOF;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+soap_isxdigit(int c)
+{ return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f');
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_raw(struct soap *soap)
+{ register size_t ret;
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { if (soap->d_stream.next_out == Z_NULL)
+      return EOF;
+    if (soap->d_stream.avail_in || !soap->d_stream.avail_out)
+    { register int r;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflating\n"));
+      soap->d_stream.next_out = (Byte*)soap->buf;
+      soap->d_stream.avail_out = SOAP_BUFLEN;
+      r = inflate(&soap->d_stream, Z_NO_FLUSH);
+      if (r == Z_OK || r == Z_STREAM_END)
+      { soap->bufidx = 0;
+        soap->buflen = SOAP_BUFLEN - soap->d_stream.avail_out;
+        if (soap->zlib_in == SOAP_ZLIB_GZIP)
+          soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+        if (r == Z_STREAM_END)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+          soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+          soap->d_stream.next_out = Z_NULL;
+        }
+        if (soap->buflen)
+        { soap->count += soap->buflen;
+          return SOAP_OK;
+        }
+      }
+      else if (r != Z_BUF_ERROR)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate error: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        soap->d_stream.next_out = Z_NULL;
+	soap->error = SOAP_ZLIB_ERROR;
+        return EOF;
+      }
+    }
+zlib_again:
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK && !soap->chunksize)
+    { memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+      soap->buflen = soap->z_buflen;
+    }
+  }
+#endif
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) /* read HTTP chunked transfer */
+  { 
+chunk_again:
+    if (soap->chunksize)
+    { soap->buflen = ret = soap->frecv(soap, soap->buf, soap->chunksize > SOAP_BUFLEN ? SOAP_BUFLEN : soap->chunksize);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk: read %u bytes\n", (unsigned int)ret));
+      DBGMSG(RECV, soap->buf, ret);
+      soap->bufidx = 0;
+      soap->chunksize -= ret;
+    }
+    else
+    { register soap_wchar c;
+      char *t, tmp[8];
+      t = tmp;
+      if (!soap->chunkbuflen)
+      { soap->chunkbuflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes (chunked) from socket %d\n", (unsigned int)ret, soap->socket));
+        DBGMSG(RECV, soap->buf, ret);
+        soap->bufidx = 0;
+        if (!ret)
+          return soap->ahead = EOF;
+      }
+      else
+        soap->bufidx = soap->buflen;
+      soap->buflen = soap->chunkbuflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk size (idx=%u len=%u)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen));
+      while (!soap_isxdigit((int)(c = soap_getchunkchar(soap))))
+        if ((int)c == EOF)
+	  return soap->ahead = EOF;
+      do
+        *t++ = (char)c;
+      while (soap_isxdigit((int)(c = soap_getchunkchar(soap))) && t - tmp < 7);
+      while ((int)c != EOF && c != '\n')
+        c = soap_getchunkchar(soap);
+      if ((int)c == EOF)
+        return soap->ahead = EOF;
+      *t = '\0';
+      soap->chunksize = soap_strtoul(tmp, &t, 16);
+      if (!soap->chunksize)
+      { soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of chunked message\n"));
+	while ((int)c != EOF && c != '\n')
+          c = soap_getchunkchar(soap);
+        return soap->ahead = EOF;
+      }
+      soap->buflen = soap->bufidx + soap->chunksize;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving buf len to idx=%u len=%u (%s)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen, tmp));
+      if (soap->buflen > soap->chunkbuflen)
+      { soap->buflen = soap->chunkbuflen;
+        soap->chunksize -= soap->buflen - soap->bufidx;
+        soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Passed end of buffer for chunked HTTP (%u bytes left)\n", (unsigned int)(soap->buflen - soap->bufidx)));
+      }
+      else if (soap->chunkbuflen)
+        soap->chunksize = 0;
+      ret = soap->buflen - soap->bufidx;
+      if (!ret)
+        goto chunk_again;
+    }
+  }
+  else
+#endif
+  { soap->bufidx = 0;
+    soap->buflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)ret, soap->socket));
+    DBGMSG(RECV, soap->buf, ret);
+  }
+#ifndef WITH_LEANER
+  if (soap->fpreparerecv && (soap->error = soap->fpreparerecv(soap, soap->buf, ret)))
+    return soap->error;
+#endif
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { register int r;
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = (unsigned int)ret;
+    soap->d_stream.next_out = (Byte*)soap->buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    r = inflate(&soap->d_stream, Z_NO_FLUSH);
+    if (r == Z_OK || r == Z_STREAM_END)
+    { soap->bufidx = 0;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = ret = SOAP_BUFLEN - soap->d_stream.avail_out;
+      if (soap->zlib_in == SOAP_ZLIB_GZIP)
+        soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %u bytes\n", (unsigned int)ret));
+      if (!ret)
+        goto zlib_again;
+      if (r == Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+        soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+        soap->d_stream.next_out = Z_NULL;
+      }
+    }
+    else
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to inflate: (%d) %s\n", r, soap->d_stream.msg?soap->d_stream.msg:""));
+      soap->d_stream.next_out = Z_NULL;
+      soap->error = SOAP_ZLIB_ERROR;
+      return EOF;
+    }
+  }
+#endif
+  soap->count += ret;
+  return !ret;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap->dime.buflen)
+    { char *s;
+      int i;
+      unsigned char tmp[12];
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME hdr for chunked DIME is in buffer\n"));
+      soap->count += soap->dime.buflen - soap->buflen;
+      soap->buflen = soap->dime.buflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Skip padding (%ld bytes)\n", -(long)soap->dime.size&3));
+      for (i = -(long)soap->dime.size&3; i > 0; i--)
+      { soap->bufidx++;
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME hdr for next chunk\n"));
+      s = (char*)tmp;
+      for (i = 12; i > 0; i--)
+      { *s++ = soap->buf[soap->bufidx++];
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      soap->dime.flags = tmp[0] & 0x7;
+      soap->dime.size = ((size_t)tmp[8] << 24) | ((size_t)tmp[9] << 16) | ((size_t)tmp[10] << 8) | ((size_t)tmp[11]);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME chunk (%u bytes)\n", (unsigned int)soap->dime.size));
+      if (soap->dime.flags & SOAP_DIME_CF)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "More chunking\n"));
+        soap->dime.chunksize = soap->dime.size;
+        if (soap->buflen - soap->bufidx >= soap->dime.size)
+        { soap->dime.buflen = soap->buflen;
+          soap->buflen = soap->bufidx + soap->dime.chunksize;
+        }
+        else
+          soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      }
+      else
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Last chunk\n"));
+        soap->dime.buflen = 0;
+        soap->dime.chunksize = 0;
+      }
+      soap->count = soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%u bytes remaining\n", (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+    if (soap->dime.chunksize)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get next DIME hdr for chunked DIME (%u bytes chunk)\n", (unsigned int)soap->dime.chunksize));
+      if (soap_recv_raw(soap))
+        return EOF;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->count -= soap->buflen - soap->bufidx - soap->dime.chunksize;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%lu bytes remaining, count=%u\n", (unsigned long)(soap->buflen-soap->bufidx), (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+  }
+#endif
+  return soap_recv_raw(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getchar(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+    return c;
+  }
+  return soap_get1(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const struct soap_code_map*
+SOAP_FMAC2
+soap_code(const struct soap_code_map *map, const char *str)
+{ if (str)
+  { while (map->string)
+    { if (!strcmp(str, map->string)) /* case sensitive */
+        return map;
+      map++;
+    }
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_int_code(const struct soap_code_map *map, const char *str, long other)
+{ while (map->string)
+  { if (!soap_tag_cmp(str, map->string)) /* case insensitive */
+      return map->code;
+    map++;
+  }
+  return other;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_str_code(const struct soap_code_map *map, long code)
+{ while (map->code != code && map->string)
+    map++;
+  return map->string;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_char(struct soap *soap)
+{ char tmp[8];
+  register int i;
+  register soap_wchar c;
+  register char *s = tmp;
+  for (i = 0; i < 7; i++)
+  { c = soap_get1(soap);
+    if (c == ';' || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+  }
+  *s = '\0';
+  if (*tmp == '#')
+  { if (tmp[1] == 'x' || tmp[1] == 'X')
+      return soap_strtol(tmp + 2, NULL, 16);
+    return atol(tmp + 1);
+  }
+  if (!strcmp(tmp, "lt"))
+    return '<';
+  if (!strcmp(tmp, "gt"))
+    return '>';
+  if (!strcmp(tmp, "amp"))
+    return '&';
+  if (!strcmp(tmp, "quot"))
+    return '"';
+  if (!strcmp(tmp, "apos"))
+    return '\'';
+#ifndef WITH_LEAN
+  return (soap_wchar)soap_int_code(html_entity_codes, tmp, SOAP_UNKNOWN_CHAR);
+#else
+  return SOAP_UNKNOWN_CHAR; /* use this to represent unknown code */
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get0(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx];
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get1(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx++];
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_get(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+  }
+  else
+    c = soap_get1(soap);
+  for (;;)
+  { if (soap->cdata)
+    { if (c == ']')
+      { c = soap_get1(soap);
+        if (c == ']')
+        { soap->cdata = 0;
+          soap_get1(soap); /* skip > */
+          c = soap_get1(soap);
+        }
+	else
+        { soap_revget1(soap);
+          return ']';
+        }
+      }
+      else
+        return c;
+    }
+    switch (c)
+    { case '<':
+        do c = soap_get1(soap);
+        while (soap_blank(c));
+        if (c == '!' || c == '?' || c == '%')
+        { register int k = 1;
+	  if (c == '!')
+          { c = soap_get1(soap);
+            if (c == '[')
+            { do c = soap_get1(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                break;
+              soap->cdata = 1;
+              c = soap_get1(soap);
+	      continue;
+            }
+            if (c == '-' && (c = soap_get1(soap)) == '-')
+            { do
+              { c = soap_get1(soap);
+                if (c == '-' && (c = soap_get1(soap)) == '-')
+                  break;
+              } while ((int)c != EOF);
+            }
+          }
+	  else if (c == '?')
+            c = soap_get_pi(soap);
+          while ((int)c != EOF)
+          { if (c == '<')
+	      k++;
+	    else if (c == '>')
+	    { if (--k <= 0)
+	        break;
+	    }
+	    c = soap_get1(soap);
+	  }
+	  if ((int)c == EOF)
+	    break;
+          c = soap_get1(soap);
+          continue;
+        }
+        if (c == '/')
+          return SOAP_TT;
+        soap_revget1(soap);
+        return SOAP_LT;
+      case '>':
+        return SOAP_GT;
+      case '"':
+        return SOAP_QT;
+      case '\'':
+        return SOAP_AP;
+      case '&':
+        return soap_char(soap) | 0x80000000;
+    }
+    break;
+  }
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_get_pi(struct soap *soap)
+{ char buf[64];
+  register char *s = buf;
+  register int i = sizeof(buf);
+  register soap_wchar c = soap_getchar(soap);
+  /* This is a quick way to parse XML PI and we could use a callback instead to
+   * enable applications to intercept processing instructions */
+  while ((int)c != EOF && c != '?')
+  { if (--i > 0)
+    { if (soap_blank(c))
+        c = ' ';
+      *s++ = (char)c;
+    }
+    c = soap_getchar(soap);
+  }
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML PI <?%s?>\n", buf));
+  if (!strncmp(buf, "xml ", 4))
+  { s = strstr(buf, " encoding=");
+    if (s && s[10])
+    { if (!soap_tag_cmp(s + 11, "iso-8859-1*")
+       || !soap_tag_cmp(s + 11, "latin1*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to latin1 encoding\n"));
+        soap->mode |= SOAP_ENC_LATIN;
+      }
+      else if (!soap_tag_cmp(s + 11, "utf-8*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to utf-8 encoding\n"));
+        soap->mode &= ~SOAP_ENC_LATIN;
+      }
+    }
+  }
+  if ((int)c != EOF)
+    c = soap_getchar(soap);
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_move(struct soap *soap, long n)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving %ld bytes forward\n", (long)n));
+  for (; n > 0; n--)
+    if ((int)soap_getchar(soap) == EOF)
+      return SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_tell(struct soap *soap)
+{ return soap->count - soap->buflen + soap->bufidx - (soap->ahead != 0);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pututf8(struct soap *soap, register unsigned long c)
+{ char tmp[16];
+  if (c > 0 && c < 0x80)
+  { *tmp = (char)c;
+    return soap_send_raw(soap, tmp, 1);
+  }
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { register char *t = tmp;
+    if (c < 0x0800)
+      *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+    else
+    { if (c < 0x010000)
+        *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+      else
+      { if (c < 0x200000)
+          *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+        else
+        { if (c < 0x04000000)
+            *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+          else
+          { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+            *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+        }     
+        *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+      }
+      *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+    }
+    *t++ = (char)(0x80 | (c & 0x3F));
+    *t = '\0';
+  }
+  else
+#endif
+    sprintf(tmp, "&#%lu;", c);
+  return soap_send(soap, tmp);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getutf8(struct soap *soap)
+{ register soap_wchar c, c1, c2, c3, c4;
+  c = soap->ahead;
+  if (c > 0xFF)
+  { soap->ahead = 0;
+    return c;
+  }
+again:
+  c = soap_get(soap);
+  if (c < 0x80 || (soap->mode & SOAP_ENC_LATIN))
+    return c;
+  c1 = soap_get1(soap);
+  if (c1 < 0x80)
+  { soap_revget1(soap); /* doesn't look like this is UTF8 */
+    return c;
+  }
+  c1 &= 0x3F;
+  if (c < 0xE0)
+    return ((soap_wchar)(c & 0x1F) << 6) | c1;
+  c2 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c == 0xEF && c1 == 0x3B && c2 == 0x3F)	/* ignore UTF-8 BOM */
+    goto again;
+  if (c < 0xF0)
+    return ((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2;
+  c3 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xF8)
+    return ((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3;
+  c4 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xFC)
+    return ((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4;
+  return ((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(soap_get1(soap) & 0x3F);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthex(struct soap *soap, const unsigned char *s, int n)
+{ char d[2];
+  register int i;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2hex(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (i = 0; i < n; i++)
+  { register int m = *s++;
+    d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0'));
+    m &= 0x0F;
+    d[1] = (char)(m + (m > 9 ? '7' : '0'));
+    if (soap_send_raw(soap, d, 2))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_gethex(struct soap *soap, int *n)
+{
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_hex2s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register char *s;
+    register int i, k;
+    if (soap_append_lab(soap, NULL, 0))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = soap->lablen;
+    for (i = 0; i < k; i++)
+    { register char d1, d2;
+      register soap_wchar c;
+      c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = (int)(soap->lablen - k + i);
+        p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	if (p)
+	  memcpy(p, soap->labbuf, soap->lablen - k + i);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, SOAP_BLKLEN);
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register char d1, d2;
+      register soap_wchar c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap_end_block(soap);
+	  soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = soap_size_block(soap, i);
+        p = (unsigned char*)soap_save_block(soap, NULL, 0);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putbase64(struct soap *soap, const unsigned char *s, int n)
+{ register int i;
+  register unsigned long m;
+  char d[4];
+  if (!s)
+    return SOAP_OK;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2base64(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      d[i] = '=';
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_getbase64(struct soap *soap, int *n, int malloc_flag)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_base642s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register int i, k;
+    register char *s;
+    if (soap_append_lab(soap, NULL, 2))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = 3 * (soap->lablen / 3);
+    if (!s)
+      return NULL;
+    for (i = 0; i < k - 2; i += 3)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+            *n = (int)(soap->lablen - k + i);
+          p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	  if (p)
+	    memcpy(p, soap->labbuf, soap->lablen - k + i);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, 3 * SOAP_BLKLEN); /* must be multiple of 3 */
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          i *= 3;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n = (int)soap_size_block(soap, i);
+          p = (unsigned char*)soap_save_block(soap, NULL, 0);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_xop_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ /* Check MTOM xop:Include element (within hex/base64Binary) */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  int body = soap->body; /* should save type too? */
+  if (!soap_peek_element(soap))
+  { if (!soap_element_begin_in(soap, "xop:Include", 0) && *soap->href)
+    { if (soap_dime_forward(soap, ptr, size, id, type, options))
+        return soap->error;
+    }
+    if (soap->body && soap_element_end_in(soap, NULL))
+      return soap->error;
+  }
+  soap->body = body;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_dime_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ struct soap_xlist *xp = (struct soap_xlist*)SOAP_MALLOC(soap, sizeof(struct soap_xlist));
+  *ptr = NULL;
+  *size = 0;
+  *id = soap_strdup(soap, soap->href);
+  *type = NULL;
+  *options = NULL;
+  if (!xp)
+    return soap->error = SOAP_EOM;
+  xp->next = soap->xlist;
+  xp->ptr = ptr;
+  xp->size = size;
+  xp->id = *id;
+  xp->type = type;
+  xp->options = options;
+  soap->xlist = xp;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_strdup(struct soap *soap, const char *s)
+{ char *t = NULL;
+  if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1)))
+    strcpy(t, s);
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_new_block(struct soap *soap)
+{ struct soap_blist *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New block sequence (prev=%p)\n", soap->blist));
+  if (!(p = (struct soap_blist*)SOAP_MALLOC(soap, sizeof(struct soap_blist))))
+    return SOAP_EOM;   
+  p->next = soap->blist; 
+  p->ptr = NULL;
+  p->size = 0;
+  soap->blist = p;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_push_block(struct soap *soap, size_t n)
+{ char *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block of %u bytes (%u bytes total)\n", (unsigned int)n, (unsigned int)soap->blist->size + (unsigned int)n));
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(char*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  *(char**)p = soap->blist->ptr;
+  *(size_t*)(p + sizeof(char*)) = n;
+  soap->blist->ptr = p;
+  soap->blist->size += n;
+  return p + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_block(struct soap *soap)
+{ char *p;
+  if (!soap->blist->ptr)
+    return;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block\n"));
+  p = soap->blist->ptr;
+  soap->blist->size -= *(size_t*)(p + sizeof(char*));
+  soap->blist->ptr = *(char**)p;
+  SOAP_FREE(soap, p);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_update_ptrs(struct soap *soap, char *start, char *end, char *p1, char *p2)
+{ int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+#ifndef WITH_LEANER
+  register struct soap_xlist *xp;
+#endif
+  register void *p, **q;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr && (char*)ip->ptr >= start && (char*)ip->ptr < end)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", ip->id, ip->ptr, (char*)ip->ptr + (p1-p2)));
+        ip->ptr = (char*)ip->ptr + (p1-p2);
+      }
+      for (q = &ip->link; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Link update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (q = &ip->copy; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy chain update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (fp = ip->flist; fp; fp = fp->next)
+      { if ((char*)fp->ptr >= start && (char*)fp->ptr < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy list update id='%s' %p\n", ip->id, fp));
+          fp->ptr = (char*)fp->ptr + (p1-p2);
+        }
+      }
+    }
+  }
+#ifndef WITH_LEANER
+  for (xp = soap->xlist; xp; xp = xp->next)
+  { if (xp->ptr && (char*)xp->ptr >= start && (char*)xp->ptr < end)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", xp->id?xp->id:"", xp->ptr, (char*)xp->ptr + (p1-p2)));
+      xp->ptr = (unsigned char**)((char*)xp->ptr + (p1-p2));
+      xp->size = (int*)((char*)xp->size + (p1-p2));
+      xp->type = (char**)((char*)xp->type + (p1-p2));
+      xp->options = (char**)((char*)xp->options + (p1-p2));
+    }
+  }
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static int
+soap_has_copies(struct soap *soap, register const char *start, register const char *end)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  register const char *p;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { for (p = (const char*)ip->copy; p; p = *(const char**)p)
+        if (p >= start && p < end)
+          return SOAP_ERR;
+      for (fp = ip->flist; fp; fp = fp->next)
+        if ((const char*)fp->ptr >= start && (const char*)fp->ptr < end)
+	  return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_resolve(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  short flag;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr)
+      { register void *p, **q, *r;
+        q = (void**)ip->link;
+        ip->link = NULL;
+        r = ip->ptr;
+        DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing link chain to resolve id='%s'\n", ip->id));
+        while (q)
+        { p = *q;
+          *q = r;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "... link %p -> %p\n", q, r));
+          q = (void**)p;
+        }
+      }
+      else if (*ip->id == '#')
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Missing data for id='%s'\n", ip->id));
+        strcpy(soap->id, ip->id + 1);
+        return soap->error = SOAP_MISSING_ID;
+      }
+    }
+  }
+  do
+  { flag = 0;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution phase\n"));
+    for (i = 0; i < SOAP_IDHASH; i++)
+    { for (ip = soap->iht[i]; ip; ip = ip->next)
+      { if (ip->ptr && !soap_has_copies(soap, (const char*)ip->ptr, (const char*)ip->ptr + ip->size))
+        { if (ip->copy)
+          { register void *p, **q = (void**)ip->copy;
+            DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing copy chain to resolve id='%s'\n", ip->id));
+            ip->copy = NULL;
+            do
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... copy %p -> %p (%u bytes)\n", ip->ptr, q, (unsigned int)ip->size));
+	      p = *q;
+              memcpy(q, ip->ptr, ip->size);
+              q = (void**)p;
+            } while (q);
+	    flag = 1;
+	  }
+          for (fp = ip->flist; fp; fp = ip->flist)
+          { register unsigned int k = fp->level;
+	    register void *p = ip->ptr;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data type=%d location=%p level=%u,%u id='%s'\n", ip->type, p, ip->level, fp->level, ip->id));
+	    while (ip->level < k)
+            { register void **q = (void**)soap_malloc(soap, sizeof(void*));  
+	      if (!q)
+	        return soap->error;
+	      *q = p;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level, new location=%p holds=%p...\n", q, *q));
+              p = (void*)q;
+              k--;
+            }
+	    if (fp->fcopy)
+	      fp->fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    else
+	      soap_fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    ip->flist = fp->next;
+	    SOAP_FREE(soap, fp);
+	    flag = 1;
+	  }
+        }
+      }
+    }
+  } while (flag);
+#ifdef SOAP_DEBUG
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->copy || ip->flist)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution error: forwarded data for id='%s' could not be propagated, please report this problem to the developers\n", ip->id));
+      }
+    }
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution done\n"));
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_size_block(struct soap *soap, size_t n)
+{ if (soap->blist->ptr)
+  { soap->blist->size -= *(size_t*)(soap->blist->ptr + sizeof(char*)) - n;
+    *(size_t*)(soap->blist->ptr + sizeof(char*)) = n;
+  }
+  return soap->blist->size;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_first_block(struct soap *soap)
+{ char *p, *q, *r;
+  p = soap->blist->ptr;
+  if (!p)
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "First block\n"));
+  r = NULL;
+  do
+  { q = *(char**)p;
+    *(char**)p = r;
+    r = p;
+    p = q;
+  } while (p);
+  soap->blist->ptr = r;
+  return r + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_next_block(struct soap *soap)
+{ char *p;
+  p = soap->blist->ptr;
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n"));
+    soap->blist->ptr = *(char**)p;
+    SOAP_FREE(soap, p);
+    if (soap->blist->ptr)
+      return soap->blist->ptr + sizeof(char*) + sizeof(size_t);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_block_size(struct soap *soap)
+{ return *(size_t*)(soap->blist->ptr + sizeof(char*));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end_block(struct soap *soap)
+{ struct soap_blist *bp;
+  char *p, *q;
+  bp = soap->blist;
+  if (bp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of block sequence, free all remaining blocks\n"));
+    for (p = bp->ptr; p; p = q)
+    { q = *(char**)p;
+      SOAP_FREE(soap, p);
+    }
+    soap->blist = bp->next;
+    SOAP_FREE(soap, bp);
+  }
+  DBGLOG(TEST, if (soap->blist) SOAP_MESSAGE(fdebug, "Restore previous block sequence\n"));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_save_block(struct soap *soap, char *p, int flag)
+{ register size_t n;
+  register char *q, *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Save all blocks in contiguous memory space of %u bytes (%p->%p)\n", (unsigned int)soap->blist->size, soap->blist->ptr, p));
+  if (soap->blist->size)
+  { if (!p)
+      p = (char*)soap_malloc(soap, soap->blist->size);
+    if (p)
+    { for (s = p, q = soap_first_block(soap); q; q = soap_next_block(soap))
+      { n = soap_block_size(soap);
+#ifndef WITH_NOIDREF
+        if (flag)
+	  soap_update_ptrs(soap, q, q + n, s, q);
+#endif
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy %u bytes from %p to %p\n", (unsigned int)n, q, s));
+        memcpy(s, q, n);
+        s += n;
+      }
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  soap_end_block(soap);
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsize(struct soap *soap, const char *type, int size)
+{ return soap_putsizes(soap, type, &size, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizes(struct soap *soap, const char *type, const int *size, int dim)
+{ return soap_putsizesoffsets(soap, type, size, NULL, dim);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim)
+{ int i;
+  if (!type)
+    return NULL;
+  if (soap->version == 2)
+  { sprintf(soap->type, "%s[%d", type, size[0]);
+    for (i = 1; i < dim; i++)
+      sprintf(soap->type + strlen(soap->type), " %d", size[i]);
+  }
+  else
+  { if (offset)
+    { sprintf(soap->type, "%s[%d", type, size[0] + offset[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i] + offset[i]);
+    }
+    else
+    { sprintf(soap->type, "%s[%d", type, size[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i]);
+    }
+    strcat(soap->type, "]");
+  }
+  return soap->type;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffset(struct soap *soap, int offset)
+{ return soap_putoffsets(soap, &offset, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffsets(struct soap *soap, const int *offset, int dim)
+{ register int i;
+  sprintf(soap->arrayOffset, "[%d", offset[0]);
+  for (i = 1; i < dim; i++)
+    sprintf(soap->arrayOffset + strlen(soap->arrayOffset), ",%d", offset[i]);
+  strcat(soap->arrayOffset, "]");
+  return soap->arrayOffset;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_size(const int *size, int dim)
+{ register int i, n = size[0];
+  for (i = 1; i < dim; i++)
+    n *= size[i];
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getoffsets(const char *attr, const int *size, int *offset, int dim)
+{ register int i, j = 0;
+  if (offset)
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += offset[i] = (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  else
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  return j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsize(const char *attr1, const char *attr2, int *j)
+{ register int n, k;
+  char *s;
+  *j = 0;
+  if (!*attr1)
+    return -1;
+  if (*attr1 == '[')
+    attr1++;
+  n = 1;
+  for (;;)
+  { k = (int)soap_strtol(attr1, &s, 10);
+    n *= k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE || s == attr1)
+      return -1;
+    attr1 = strchr(s, ',');
+    if (!attr1)
+      attr1 = strchr(s, ' ');
+    if (attr2 && *attr2)
+    { attr2++;
+      *j *= k;
+      k = (int)soap_strtol(attr2, &s, 10);
+      *j += k;
+      if (k < 0)
+        return -1;
+      attr2 = s;
+    }
+    if (!attr1)
+      break;
+    attr1++;
+  }
+  return n - *j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsizes(const char *attr, int *size, int dim)
+{ register int i, k, n;
+  if (!*attr)
+    return -1;
+  i = strlen(attr);
+  n = 1;
+  do
+  { for (i = i-1; i >= 0; i--)
+      if (attr[i] == '[' || attr[i] == ',' || attr[i] == ' ')
+        break;
+    k = (int)atol(attr + i + 1);
+    n *= size[--dim] = k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE)
+      return -1;
+  } while (i >= 0 && attr[i] != '[');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getposition(const char *attr, int *pos)
+{ register int i, n;
+  if (!*attr)
+    return -1;
+  n = 0;
+  i = 1;
+  do
+  { pos[n++] = (int)atol(attr + i);
+    while (attr[i] && attr[i] != ',' && attr[i] != ']')
+      i++;
+    if (attr[i] == ',')
+      i++;
+  } while (n < SOAP_MAXDIMS && attr[i] && attr[i] != ']');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_push_namespace(struct soap *soap, const char *id, const char *ns)
+{ register struct soap_nlist *np;
+  register struct Namespace *p;
+  register short i = -1;
+  register size_t n, k;
+  n = strlen(id);
+  k = strlen(ns) + 1;
+  p = soap->local_namespaces;
+  if (p)
+  { for (i = 0; p->id; p++, i++)
+    { if (p->ns && !strcmp(ns, p->ns))
+      { if (p->out)
+        { SOAP_FREE(soap, p->out);
+          p->out = NULL;
+        }
+        break;
+      }
+      if (p->out)
+      { if (!strcmp(ns, p->out))
+          break;
+      }
+      else if (p->in)
+      { if (!soap_tag_cmp(ns, p->in))
+        { if ((p->out = (char*)SOAP_MALLOC(soap, k)))
+            strcpy(p->out, ns);
+          break;
+        }
+      }
+    }
+    if (!p || !p->id)
+      i = -1;
+  }
+  if (i >= 0)
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k);
+  if (!np)
+    return soap->error = SOAP_EOM;
+  np->next = soap->nlist;
+  soap->nlist = np;
+  np->level = soap->level;
+  np->index = i;
+  strcpy(np->id, id);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns));
+  if (i < 0)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push NOT OK: no match found for '%s' in namespace mapping table (added to stack anyway)\n", ns));
+  }
+  else
+  { np->ns = NULL;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push OK ('%s' matches '%s' in namespace table)\n", id, p->id));
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_namespace(struct soap *soap)
+{ register struct soap_nlist *np;
+  while (soap->nlist && soap->nlist->level >= soap->level)
+  { np = soap->nlist->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Popped namespace binding (level=%u) '%s'\n", soap->level, soap->nlist->id));
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_namespace(struct soap *soap, const char *id1, const char *id2, int n1, int n2) 
+{ register struct soap_nlist *np = soap->nlist;
+  while (np && (strncmp(np->id, id1, n1) || np->id[n1]))
+    np = np->next;
+  if (np)
+  { if (np->index < 0
+     || (soap->local_namespaces[np->index].id
+      && (strncmp(soap->local_namespaces[np->index].id, id2, n2)
+       || soap->local_namespaces[np->index].id[n2])))
+      return SOAP_NAMESPACE;
+    return SOAP_OK;
+  }
+  if (n1 == 3 && n1 == n2 && !strcmp(id1, "xml") && !strcmp(id1, id2))
+    return SOAP_OK;
+  return SOAP_SYNTAX_ERROR; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_current_namespace(struct soap *soap, const char *tag)
+{ register struct soap_nlist *np;
+  register const char *s;
+  np = soap->nlist;
+  if (!(s = strchr(tag, ':')))
+  { while (np && *np->id) /* find default namespace, if present */
+      np = np->next;
+  }
+  else
+  { while (np && (strncmp(np->id, tag, s - tag) || np->id[s - tag]))
+      np = np->next;
+    if (!np)
+      soap->error = SOAP_NAMESPACE;
+  }
+  if (np)
+  { if (np->index >= 0)
+      return soap->namespaces[np->index].ns;
+    if (np->ns)
+      return soap_strdup(soap, np->ns);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_tag_cmp(const char *s, const char *t)
+{ for (;;)
+  { register int c1 = *s;
+    register int c2 = *t;
+    if (!c1 || c1 == '"')
+      break;
+    if (c2 != '-')
+    { if (c1 != c2)
+      { if (c1 >= 'A' && c1 <= 'Z')
+          c1 += 'a' - 'A';
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+      }
+      if (c1 != c2)
+      { if (c2 != '*')
+          return 1;
+	c2 = *++t;
+        if (!c2)
+	  return 0;
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+        for (;;)
+        { c1 = *s;
+	  if (!c1 || c1 == '"')
+	    break;
+	  if (c1 >= 'A' && c1 <= 'Z')
+            c1 += 'a' - 'A';
+          if (c1 == c2 && !soap_tag_cmp(s + 1, t + 1))
+            return 0;
+	  s++;
+        }
+        break;
+      }
+    }
+    s++;
+    t++;
+  }
+  if (*t == '*' && !t[1])
+    return 0;
+  return *t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_tag(struct soap *soap, const char *tag1, const char *tag2)
+{ register const char *s, *t;
+  if (!tag1 || !tag2 || !*tag2)
+    return SOAP_OK;
+  s = strchr(tag1, ':');
+  t = strchr(tag2, ':');
+  if (t)
+  { if (s)
+    { if (t[1] && SOAP_STRCMP(s + 1, t + 1))
+        return SOAP_TAG_MISMATCH;
+      if (t != tag2 && soap_match_namespace(soap, tag1, tag2, s - tag1, t - tag2))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+        return SOAP_TAG_MISMATCH;
+      }
+    } 
+    else if (SOAP_STRCMP(tag1, t + 1))
+      return SOAP_TAG_MISMATCH;
+    else if (t != tag2 && soap_match_namespace(soap, tag1, tag2, 0, t - tag2))
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+      return SOAP_TAG_MISMATCH;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags and (default) namespaces match: '%s' '%s'\n", tag1, tag2));
+    return SOAP_OK;
+  }
+  if (s)
+  { if (SOAP_STRCMP(s + 1, tag2))
+      return SOAP_TAG_MISMATCH;
+  }
+  else if (SOAP_STRCMP(tag1, tag2))
+    return SOAP_TAG_MISMATCH;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags match: '%s' '%s'\n", tag1, tag2));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_array(struct soap *soap, const char *type)
+{ if (*soap->arrayType)
+    if (soap_match_tag(soap, soap->arrayType, type)
+     && soap_match_tag(soap, soap->arrayType, "xsd:anyType")
+     && soap_match_tag(soap, soap->arrayType, "xsd:ur-type")
+    )
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array type mismatch: '%s' '%s'\n", soap->arrayType, type));
+      return SOAP_TAG_MISMATCH;
+    }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************\
+ *
+ *	SSL
+ *
+\******************************************************************************/
+
+#ifdef WITH_OPENSSL
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_rand()
+{ unsigned char buf[4];
+  if (!ssl_init_done)
+    soap_ssl_init();
+  RAND_pseudo_bytes(buf, 4);
+  return *(int*)buf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *dhfile, const char *randfile, const char *sid)
+{ int err;
+  soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  if (dhfile)
+  { soap->dhfile = dhfile;
+    soap->rsa = 0;
+  }
+  else
+  { soap->dhfile = NULL;
+    soap->rsa = 1;
+  }
+  soap->randfile = randfile;
+  soap->require_client_auth = (flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION);
+  if (!(err = soap->fsslauth(soap)))
+  { if (sid)
+      SSL_CTX_set_session_id_context(soap->ctx, (unsigned char*)sid, strlen(sid));
+  }
+  return err; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_client_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *randfile)
+{ soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  soap->dhfile = NULL;
+  soap->rsa = 0;
+  soap->randfile = randfile;
+  soap->require_server_auth = (flags & SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION);
+  return soap->fsslauth(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_ssl_init()
+{ /* Note: for MT systems, the main program MUST call soap_ssl_init() before any threads are started */
+  if (!ssl_init_done)
+  { ssl_init_done = 1;
+    SSL_library_init();
+#ifndef WITH_LEAN
+    SSL_load_error_strings();
+#endif
+    if (!RAND_load_file("/dev/urandom", 1024))
+    { char buf[1024];
+      RAND_seed(buf, sizeof(buf));
+      while (!RAND_status())
+      { int r = rand();
+        RAND_seed(&r, sizeof(int));
+      }
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static const char *
+ssl_error(struct soap *soap, int ret)
+{ int err = SSL_get_error(soap->ssl, ret);
+  const char *msg = soap_str_code(h_ssl_error_codes, err);
+  if (msg)
+    strcpy(soap->msgbuf, msg);
+  else
+    return ERR_error_string(err, soap->msgbuf);
+  if (ERR_peek_error())
+  { unsigned long r;
+    strcat(soap->msgbuf, "\n");
+    while ((r = ERR_get_error()))
+      ERR_error_string_n(r, soap->msgbuf + strlen(soap->msgbuf), sizeof(soap->msgbuf) - strlen(soap->msgbuf));
+  } 
+  else
+  { switch (ret)
+    { case 0:
+        strcpy(soap->msgbuf, "EOF was observed that violates the protocol. The client probably provided invalid authentication information.");
+        break;
+      case -1:
+        sprintf(soap->msgbuf, "Error observed by underlying BIO: %s", strerror(errno));  
+        break;
+    }
+  }
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_password(char *buf, int num, int rwflag, void *userdata)
+{ if (num < (int)strlen((char*)userdata) + 1)
+    return 0;
+  return strlen(strcpy(buf, (char*)userdata));
+}
+#endif
+
+/******************************************************************************/
+/* This callback is included for future references. It should not be deleted
+#ifndef PALM_2
+static DH *
+ssl_tmp_dh(SSL *ssl, int is_export, int keylength)
+{ static DH *dh512 = NULL;
+  static DH *dh1024 = NULL;
+  DH *dh;
+  switch (keylength)
+  { case 512:
+      if (!dh512)
+      { BIO *bio = BIO_new_file("dh512.pem", "r");
+        if (bio)
+        { dh512 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+          return dh512;
+        }
+      }
+      else
+        return dh512;
+    default:
+      if (!dh1024)
+      { BIO *bio = BIO_new_file("dh1024.pem", "r");
+        if (bio)
+        { dh1024 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+        }
+      }
+      dh = dh1024;
+  }
+  return dh;
+}
+#endif
+*/
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_auth_init(struct soap *soap)
+{ if (!ssl_init_done)
+    soap_ssl_init();
+  if (!soap->ctx)
+  { if (!(soap->ctx = SSL_CTX_new(SSLv23_method())))
+      return soap_set_receiver_error(soap, "SSL error", "Can't setup context", SOAP_SSL_ERROR);
+  }
+  if (soap->randfile)
+  { if (!RAND_load_file(soap->randfile, -1))
+      return soap_set_receiver_error(soap, "SSL error", "Can't load randomness", SOAP_SSL_ERROR);
+  }
+  if (soap->cafile || soap->capath)
+  { if (!SSL_CTX_load_verify_locations(soap->ctx, soap->cafile, soap->capath))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read CA file and directory", SOAP_SSL_ERROR);
+    if (soap->cafile && soap->require_client_auth)
+      SSL_CTX_set_client_CA_list(soap->ctx, SSL_load_client_CA_file(soap->cafile));
+  }
+  if (!SSL_CTX_set_default_verify_paths(soap->ctx))
+    return soap_set_receiver_error(soap, "SSL error", "Can't read default CA file and/or directory", SOAP_SSL_ERROR);
+/* See below */
+  if (soap->keyfile)
+  { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read certificate key file", SOAP_SSL_ERROR);
+    if (soap->password)
+    { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+      SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+    }
+    if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+  }
+/* Suggested alternative approach to check cafile first before the key file:
+  if (soap->password)
+  { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+    SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+  }
+  if (!soap->cafile || !SSL_CTX_use_certificate_chain_file(soap->ctx, soap->cafile))
+  { if (soap->keyfile)
+    { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read certificate or key file", SOAP_SSL_ERROR);
+      if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+    }
+  }
+*/
+  if (soap->rsa)
+  { RSA *rsa = RSA_generate_key(1024, RSA_F4, NULL, NULL);
+    if (!SSL_CTX_set_tmp_rsa(soap->ctx, rsa))
+    { if (rsa)
+        RSA_free(rsa);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set RSA key", SOAP_SSL_ERROR);
+    }
+    RSA_free(rsa);
+  }
+  else if (soap->dhfile)
+  { DH *dh = 0;
+    BIO *bio;
+    bio = BIO_new_file(soap->dhfile, "r");
+    if (!bio)
+      return soap_set_receiver_error(soap, "SSL error", "Can't read DH file", SOAP_SSL_ERROR);
+    dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+    BIO_free(bio);
+    if (SSL_CTX_set_tmp_dh(soap->ctx, dh) < 0)
+    { if (dh)
+        DH_free(dh);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set DH parameters", SOAP_SSL_ERROR);
+    }
+    DH_free(dh);
+  }
+  SSL_CTX_set_options(soap->ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2);
+  SSL_CTX_set_verify(soap->ctx, soap->require_client_auth ? (SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT) : soap->require_server_auth ? SSL_VERIFY_PEER : SSL_VERIFY_NONE, soap->fsslverify);
+#if (OPENSSL_VERSION_NUMBER < 0x00905100L)
+  SSL_CTX_set_verify_depth(soap->ctx, 1); 
+#else
+  SSL_CTX_set_verify_depth(soap->ctx, 9); 
+#endif  
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_verify_callback(int ok, X509_STORE_CTX *store)
+{
+#ifdef SOAP_DEBUG
+  if (!ok) 
+  { char data[256];
+    X509 *cert = X509_STORE_CTX_get_current_cert(store);
+    fprintf(stderr, "SSL verify error or warning with certificate at depth %d: %s\n", X509_STORE_CTX_get_error_depth(store), X509_verify_cert_error_string(X509_STORE_CTX_get_error(store)));
+    X509_NAME_oneline(X509_get_issuer_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate issuer %s\n", data);
+    X509_NAME_oneline(X509_get_subject_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate subject %s\n", data);
+  }
+#endif
+  /* Note: return 1 to continue, but unsafe progress will be terminated by SSL */
+  return ok;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_accept(struct soap *soap)
+{ BIO *bio;
+  int i, r;
+  if (!soap_valid_socket(soap->socket))
+    return soap_set_receiver_error(soap, "SSL error", "No socket in soap_ssl_accept()", SOAP_SSL_ERROR);
+  if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    return SOAP_INVALID_SOCKET;
+  if (!soap->ssl)
+  { soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+      return soap_set_receiver_error(soap, "SSL error", "SSL_new() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+  }
+  else
+    SSL_clear(soap->ssl);
+  soap->imode |= SOAP_ENC_SSL;
+  soap->omode |= SOAP_ENC_SSL;
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&nonblocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)|O_NONBLOCK);
+#endif
+  bio = BIO_new_socket((SOAP_SOCKET)soap->socket, BIO_NOCLOSE);
+  SSL_set_bio(soap->ssl, bio, bio);
+  i = 100; /* 100 * 0.1 ms retries */
+  while ((r = SSL_accept(soap->ssl)) <= 0)
+  { int err = SSL_get_error(soap->ssl, r);
+    if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE)
+    { struct timeval timeout;
+      fd_set fd;
+      if (i-- <= 0)
+        break;
+      timeout.tv_sec = 0;
+      timeout.tv_usec = 100000;
+      FD_ZERO(&fd);
+      FD_SET((SOAP_SOCKET)soap->socket, &fd);
+      r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+      if (r < 0 && soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        return SOAP_EOF;
+      }
+    }
+    else
+    { soap->errnum = err;
+      break;
+    }
+  }
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&blocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+  if (r <= 0)
+  { soap_set_receiver_error(soap, ssl_error(soap, r), "SSL_accept() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+    soap_closesock(soap);
+    return SOAP_SSL_ERROR;
+  }
+  if (soap->require_client_auth)
+  { X509 *peer;
+    int err;
+    if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    peer = SSL_get_peer_certificate(soap->ssl);
+    if (!peer)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    X509_free(peer);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#endif /* WITH_OPENSSL */
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_init(struct soap *soap)
+{ soap->errmode = 1;
+#ifdef WIN32
+  if (tcp_done)
+    return 0;
+  else
+  { WSADATA w;
+    if (WSAStartup(MAKEWORD(1, 1), &w))
+      return -1;
+    tcp_done = 1;
+  }
+#endif
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_done(struct soap *soap)
+{ 
+#ifdef SOAP_DEBUG
+  int i;
+#endif
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  while (soap->clist)
+  { struct soap_clist *p = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = p;
+  }
+  soap->keep_alive = 0; /* to force close the socket */
+  soap_closesock(soap);
+#ifdef WITH_COOKIES
+  soap_free_cookies(soap);
+#endif
+  while (soap->plugins)
+  { register struct soap_plugin *p = soap->plugins->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Removing plugin '%s'\n", soap->plugins->id));
+    if (soap->plugins->fcopy || soap->state == SOAP_INIT)
+      soap->plugins->fdelete(soap, soap->plugins);
+    SOAP_FREE(soap, soap->plugins);
+    soap->plugins = p;
+  }
+  soap->fplugin = fplugin;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+#ifdef WITH_OPENSSL
+  if (soap->session)
+  { SSL_SESSION_free(soap->session);
+    soap->session = NULL;
+  }
+#endif
+  if (soap->state == SOAP_INIT)
+  { if (soap_valid_socket(soap->master))
+    { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+      soap->master = SOAP_INVALID_SOCKET;
+    }
+#ifdef WITH_OPENSSL
+    if (soap->ctx)
+    { SSL_CTX_free(soap->ctx);
+      soap->ctx = NULL;
+    }
+#endif
+  }
+#ifdef SOAP_DEBUG
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free logfiles\n"));
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { if (soap->logfile[i])
+    { SOAP_FREE(soap, (void*)soap->logfile[i]);
+      soap->logfile[i] = NULL;
+    }
+    soap_close_logfile(soap, i);
+  }
+  soap_free_mht(soap);
+  soap->state = 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_cleanup(struct soap *soap)
+{ soap_done(soap);
+#ifdef WIN32
+  if (!tcp_done)
+    return;
+  tcp_done = 0;
+  WSACleanup();
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+tcp_error(struct soap *soap)
+{ register const char *msg = NULL;
+  switch (soap->errmode)
+  { case 0:
+      msg = soap_strerror(soap);
+      break;
+    case 1:
+      msg = "WSAStartup failed";
+      break;
+    case 2:
+    {
+#ifndef WITH_LEAN
+      msg = soap_str_code(h_error_codes, soap->errnum);
+      if (!msg)
+#endif
+      { sprintf(soap->msgbuf, "TCP/UDP IP error %d", soap->errnum);
+        msg = soap->msgbuf;
+      }
+    }
+  }
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static const char*
+http_error(struct soap *soap, int status)
+{ register const char *msg = SOAP_STR_EOS;
+#ifndef WITH_LEAN
+  msg = soap_str_code(h_http_error_codes, status);
+  if (!msg)
+    msg = SOAP_STR_EOS;
+#endif
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_IPV6
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr)
+{ soap_int32 iadd = -1;
+  struct hostent hostent, *host = &hostent;
+#ifdef VXWORKS
+  int hostint;
+  /* inet_addr(), and hostGetByName() expect "char *"; addr is a "const char *". */
+  iadd = inet_addr((char*)addr);
+#else
+#if defined(_AIXVERSION_431) || defined(TRU64)
+  struct hostent_data ht_data;
+#endif
+#ifdef AS400
+  iadd = inet_addr((void*)addr);
+#else
+  iadd = inet_addr(addr);
+#endif
+#endif
+  if (iadd != -1)
+  { memcpy(inaddr, &iadd, sizeof(iadd));
+    return SOAP_OK;
+  }
+#if defined(__GLIBC__)
+  if (gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &host, &soap->errnum) < 0)
+    host = NULL;
+#elif defined(_AIXVERSION_431) || defined(TRU64)
+  memset((void*)&ht_data, 0, sizeof(ht_data));
+  if (gethostbyname_r(addr, &hostent, &ht_data) < 0)
+  { host = NULL;
+    soap->errnum = h_errno;
+  }
+#elif defined(HAVE_GETHOSTBYNAME_R)
+  host = gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &soap->errnum);
+#elif defined(VXWORKS)
+  /* If the DNS resolver library resolvLib has been configured in the vxWorks
+   * image, a query for the host IP address is sent to the DNS server, if the
+   * name was not found in the local host table. */
+  hostint = hostGetByName((char*)addr);
+  if (hostint == ERROR)
+  { host = NULL;
+    soap->errnum = soap_errno; 
+  }
+#else
+#ifdef AS400
+  if (!(host = gethostbyname((void*)addr)))
+    soap->errnum = h_errno;
+#else
+  if (!(host = gethostbyname(addr)))
+    soap->errnum = h_errno;
+#endif
+#endif
+  if (!host)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Host name not found\n"));
+    return SOAP_ERR;
+  }
+#ifdef VXWORKS
+  inaddr->s_addr = hostint;
+#else
+  memcpy(inaddr, host->h_addr, host->h_length);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_connect(struct soap *soap, const char *endpoint, const char *host, int port)
+{
+#ifdef WITH_IPV6
+  struct addrinfo hints, *res, *ressave;
+  int err;
+#endif
+  register int fd;
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->socket))
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+  soap->socket = SOAP_INVALID_SOCKET;
+  if (tcp_init(soap))
+  { soap->errnum = 0;
+    soap_set_sender_error(soap, tcp_error(soap), "TCP init failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->errmode = 0;
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+    err = getaddrinfo(soap->proxy_host, soap_int2s(soap, soap->proxy_port), &hints, &res);
+  else
+    err = getaddrinfo(host, soap_int2s(soap, port), &hints, &res);
+  if (err)
+  { soap_set_sender_error(soap, gai_strerror(err), "getaddrinfo failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  ressave = res;
+again:
+  fd = (int)socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+  soap->errmode = 0;
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    fd = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    fd = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  if (fd < 0)
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "socket failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_flags & SO_LINGER)
+  { struct linger linger;
+    memset((void*)&linger, 0, sizeof(linger));
+    linger.l_onoff = 1;
+    linger.l_linger = 0;
+    if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+    { soap->errnum = soap_socket_errno;
+      soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  if ((soap->connect_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, soap->connect_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (soap->keep_alive && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)fd, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Opening socket %d to host='%s' port=%d\n", fd, host, port));
+#ifndef WITH_IPV6
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+  { if (soap->fresolve(soap, soap->proxy_host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get proxy host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)soap->proxy_port);
+  }
+  else
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)port);
+  }
+  soap->errmode = 0;
+  if ((soap->omode & SOAP_IO_UDP))
+    return fd;
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking)); /* modified to use fd */
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+  else
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  for (;;)
+  { 
+#ifdef WITH_IPV6
+    if (connect((SOAP_SOCKET)fd, res->ai_addr, res->ai_addrlen))
+#else
+    if (connect((SOAP_SOCKET)fd, (struct sockaddr*)&soap->peer, sizeof(soap->peer)))
+#endif
+    { 
+#ifndef WITH_LEAN
+      if (soap->connect_timeout && (soap_socket_errno == SOAP_EINPROGRESS || soap_socket_errno == SOAP_EWOULDBLOCK))
+      { struct timeval timeout;
+        SOAP_SOCKLEN_T k;
+        fd_set fds;
+        if (soap->connect_timeout > 0)
+        { timeout.tv_sec = soap->connect_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->connect_timeout/1000000;
+          timeout.tv_usec = -soap->connect_timeout%1000000;
+        }
+        FD_ZERO(&fds);
+        FD_SET((SOAP_SOCKET)fd, &fds);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(fd + 1), NULL, &fds, NULL, &timeout);
+          if (r > 0)
+	    break;
+          if (!r)
+          { soap->errnum = 0;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+            soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+            soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+	k = (SOAP_SOCKLEN_T)sizeof(soap->errnum);
+        if (!getsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_ERROR, (char*)&soap->errnum, &k) && !soap->errnum)	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+          break;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap->errnum = soap_socket_errno;
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      else
+#endif
+#ifdef WITH_IPV6
+      if (res->ai_next)
+      { res = res->ai_next;
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        goto again;
+      }
+      else
+#endif
+      if (soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }  
+    else
+      break;
+  }
+#ifdef WITH_IPV6
+  soap->peerlen = 0; /* IPv6: already connected so use send() */
+  freeaddrinfo(ressave);
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  soap->socket = fd;
+  soap->imode &= ~SOAP_ENC_SSL;
+  soap->omode &= ~SOAP_ENC_SSL;
+  if (!strncmp(endpoint, "https:", 6))
+  {
+#ifdef WITH_OPENSSL
+    BIO *bio;
+    int r;
+    if (soap->proxy_host)
+    { short v;
+      unsigned int k = soap->omode; /* make sure we only parse HTTP */
+      size_t n = soap->count; /* save the content length */
+      char *userid, *passwd;
+      soap->omode &= ~SOAP_ENC; /* mask IO and ENC */
+      soap->omode |= SOAP_IO_BUFFER;
+      soap_begin_send(soap);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connecting to proxy server\n"));
+      sprintf(soap->tmpbuf, "CONNECT %s:%d HTTP/%s", host, port, soap->http_version);
+      if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+#ifndef WITH_LEAN
+      if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+      { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+        strcpy(soap->tmpbuf, "Basic ");
+        soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+        if ((soap->error = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+        { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return soap->error;
+        }
+      }
+#endif
+      if ((soap->error = soap->fposthdr(soap, NULL, NULL))
+       || soap_flush(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->omode = k;
+      k = soap->imode;
+      soap->imode &= ~SOAP_ENC; /* mask IO and ENC */
+      v = soap->version; /* preserve */
+      userid = soap->userid; /* preserve */
+      passwd = soap->passwd; /* preserve */
+      if (soap_begin_recv(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->userid = userid; /* restore */
+      soap->passwd = passwd; /* restore */
+      soap->version = v; /* restore */
+      soap->imode = k; /* restore */
+      soap->count = n; /* restore */
+      soap_begin_send(soap);
+    }
+    if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    { soap_set_sender_error(soap, "SSL error", "SSL authentication failed in tcp_connect(): check password, key file, and ca file.", SOAP_SSL_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+    { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      soap->error = SOAP_SSL_ERROR;
+      return SOAP_INVALID_SOCKET;
+    }
+    if (soap->session)
+    { if (!strcmp(soap->session_host, host) && soap->session_port == port)
+        SSL_set_session(soap->ssl, soap->session);
+      SSL_SESSION_free(soap->session);
+      soap->session = NULL;
+    }
+    soap->imode |= SOAP_ENC_SSL;
+    soap->omode |= SOAP_ENC_SSL;
+    bio = BIO_new_socket((SOAP_SOCKET)fd, BIO_NOCLOSE);
+    SSL_set_bio(soap->ssl, bio, bio);
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#if defined(WIN32)
+    { u_long nonblocking = 1;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+    }
+#elif defined(VXWORKS)
+    { u_long nonblocking = 1;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+#endif
+    for (;;)
+    { if ((r = SSL_connect(soap->ssl)) <= 0)
+      { int err = SSL_get_error(soap->ssl, r);
+        if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+        { soap_set_sender_error(soap, ssl_error(soap, r), "SSL connect failed in tcp_connect()", SOAP_SSL_ERROR);
+          soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (soap->connect_timeout)
+        { struct timeval timeout;
+          fd_set fds;
+          if (soap->connect_timeout > 0)
+          { timeout.tv_sec = soap->connect_timeout;
+            timeout.tv_usec = 0;
+          }
+          else
+          { timeout.tv_sec = -soap->connect_timeout/1000000;
+            timeout.tv_usec = -soap->connect_timeout%1000000;
+          }
+          FD_ZERO(&fds);
+          FD_SET((SOAP_SOCKET)fd, &fds);
+          for (;;)
+          { int r = select((SOAP_SOCKET)(fd + 1), &fds, NULL, &fds, &timeout);
+            if (r > 0)
+	      break;
+            if (!r)
+            { soap->errnum = 0;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+              soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+              soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+              return SOAP_INVALID_SOCKET;
+            }
+          }
+	  continue;
+        }
+      }
+      break;
+    }
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#ifdef WIN32
+    { u_long blocking = 0;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+    }
+#elif defined(VXWORKS)
+    { u_long blocking = 0;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+    if (soap->require_server_auth)
+    { X509 *peer;
+      int err;
+      if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+      { soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      peer = SSL_get_peer_certificate(soap->ssl);
+      if (!peer)
+      { soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      X509_NAME_get_text_by_NID(X509_get_subject_name(peer), NID_commonName, soap->msgbuf, sizeof(soap->msgbuf));
+      X509_free(peer);
+      if (soap_tag_cmp(soap->msgbuf, host))
+      { soap_set_sender_error(soap, "SSL error", "SSL certificate host name mismatch in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+#else
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    soap->error = SOAP_SSL_ERROR;
+    return SOAP_INVALID_SOCKET;
+#endif
+  }
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_bind(struct soap *soap, const char *host, int port, int backlog)
+{
+#ifdef WITH_IPV6
+  struct addrinfo *addrinfo = NULL;
+  struct addrinfo hints;
+  struct addrinfo res;
+  int err;
+#endif
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->master))
+  { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+    soap->master = SOAP_INVALID_SOCKET;
+  }
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 1;
+  if (tcp_init(soap))
+  { soap_set_receiver_error(soap, tcp_error(soap), "TCP init failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  hints.ai_flags = AI_PASSIVE;
+  soap->errmode = 2;
+  err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo);
+  if (addrinfo)
+  { res = *addrinfo;
+    soap->peer = *((struct sockaddr_storage*)addrinfo->ai_addr);
+    soap->peerlen = addrinfo->ai_addrlen;
+    res.ai_addr = (struct sockaddr*)&soap->peer;
+    res.ai_addrlen = soap->peerlen;
+    freeaddrinfo(addrinfo);
+  }
+  if (err)
+  { soap_set_receiver_error(soap, gai_strerror(err), "getaddrinfo failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->master = socket(res.ai_family, res.ai_socktype, res.ai_protocol);
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->master = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    soap->master = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  soap->errmode = 0;
+  if (!soap_valid_socket(soap->master))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "socket failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->socket = soap->master;
+#endif
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)soap->master, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(soap->master, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->bind_flags && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, soap->bind_flags, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->master, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+#ifdef WITH_IPV6
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, res.ai_addr, res.ai_addrlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+#else
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (host)
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_receiver_error(soap, tcp_error(soap), "get host by name failed in soap_bind()", SOAP_TCP_ERROR);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  else
+    soap->peer.sin_addr.s_addr = htonl(INADDR_ANY);
+  soap->peer.sin_port = htons((short)port);
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, (struct sockaddr*)&soap->peer, soap->peerlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+  if (!(soap->omode & SOAP_IO_UDP) && listen((SOAP_SOCKET)soap->master, backlog))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "listen failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+  return soap->master;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_poll(struct soap *soap)
+{ 
+#ifndef WITH_LEAN
+  struct timeval timeout;
+  fd_set rfd, sfd, xfd;
+  int r;
+  timeout.tv_sec = 0;
+  timeout.tv_usec = 0;
+  FD_ZERO(&rfd);
+  FD_ZERO(&sfd);
+  FD_ZERO(&xfd);
+  if (soap_valid_socket(soap->socket))
+  { FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &xfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, &xfd, &timeout);
+    if (r > 0 && FD_ISSET((SOAP_SOCKET)soap->socket, &xfd))
+      r = -1;
+  }
+  else if (soap_valid_socket(soap->master))
+  { FD_SET((SOAP_SOCKET)soap->master, &sfd);
+    r = select((SOAP_SOCKET)(soap->master + 1), NULL, &sfd, NULL, &timeout);
+  }
+  else
+    return SOAP_OK;
+  if (r > 0)
+  {
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+    {
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || SSL_peek(soap->ssl, soap->tmpbuf, 1) > 0))
+        return SOAP_OK;
+    }
+    else
+#endif
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) > 0))
+        return SOAP_OK;
+  }
+  else if (r < 0)
+  { soap->errnum = soap_socket_errno;
+    if ((soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) && soap_socket_errno != SOAP_EINTR)
+    { soap_set_receiver_error(soap, tcp_error(soap), "select failed in soap_poll()", SOAP_TCP_ERROR);
+      return soap->error = SOAP_TCP_ERROR;
+    }
+  }
+  else
+    soap->errnum = 0;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Polling: other end down on socket=%d select=%d\n", soap->socket, r));
+  return SOAP_EOF;
+#else
+  return SOAP_OK;
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_accept(struct soap *soap, int s, struct sockaddr *a, int *n)
+{ int fd;
+  fd = (int)accept((SOAP_SOCKET)s, a, (SOAP_SOCKLEN_T*)n);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, FD_CLOEXEC);
+#endif
+#endif
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_accept(struct soap *soap)
+{ int n = (int)sizeof(soap->peer);
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  soap->error = SOAP_OK;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    return soap->socket = soap->master;
+#endif
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 0;
+  soap->keep_alive = 0;
+  if (soap_valid_socket(soap->master))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->accept_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->accept_timeout > 0)
+        { timeout.tv_sec = soap->accept_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->accept_timeout/1000000;
+          timeout.tv_usec = -soap->accept_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->master, &fd);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(soap->master + 1), &fd, &fd, NULL, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            soap_set_receiver_error(soap, "Timeout", "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            soap_closesock(soap);
+            soap_set_sender_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+#if defined(WIN32)
+	{ u_long nonblocking = 1;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &nonblocking);
+        }
+#elif defined(VXWORKS)
+        { u_long nonblocking = 1;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&nonblocking));
+        }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)|O_NONBLOCK);
+#endif
+      }
+      else
+#if defined(WIN32)
+      { u_long blocking = 0;
+        ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+      }
+#elif defined(VXWORKS)
+      { u_long blocking = 0;
+        ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+      }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+      soap->socket = soap->faccept(soap, soap->master, (struct sockaddr*)&soap->peer, &n);
+      soap->peerlen = (size_t)n;
+      if (soap_valid_socket(soap->socket))
+      {
+#ifdef WITH_IPV6
+/* Use soap->host to store the numeric form of the remote host */
+        getnameinfo((struct sockaddr*)&soap->peer, n, soap->host, sizeof(soap->host), NULL, 0, NI_NUMERICHOST | NI_NUMERICSERV); 
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d from %s\n", soap->socket, soap->host));
+        soap->ip = 0; /* info stored in soap->peer and soap->host */
+        soap->port = 0; /* info stored in soap->peer and soap->host */
+#else
+        soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+        soap->port = (int)ntohs(soap->peer.sin_port); /* does not return port number on some systems */
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d at port %d from IP %d.%d.%d.%d\n", soap->socket, soap->port, (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF));
+#endif
+#ifndef WITH_LEAN
+	if (soap->accept_flags & SO_LINGER)
+        { struct linger linger;
+          memset((void*)&linger, 0, sizeof(linger));
+          linger.l_onoff = 1;
+          linger.l_linger = 0;
+	  if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+          { soap->errnum = soap_socket_errno;
+	    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in soap_accept()", SOAP_TCP_ERROR);
+	    soap_closesock(soap);
+            return SOAP_INVALID_SOCKET;
+	  }
+        }
+        if ((soap->accept_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, soap->accept_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#ifdef TCP_NODELAY
+        if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->socket, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#endif
+#endif
+        if (soap->accept_timeout)
+        {
+#if defined(WIN32)
+          u_long blocking = 0;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+          ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+#elif defined(VXWORKS)
+          u_long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+          ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)(&blocking));
+#elif defined(PALM)
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL,0)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL,0)&~O_NONBLOCK);
+#elif defined(SYMBIAN)
+          long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, 0/*FIONBIO*/, &blocking);
+#else
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+	}
+        soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+        return soap->socket;
+      }
+      if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept failed from %s\n", soap->host));
+        soap->errnum = soap_socket_errno;
+        soap_set_receiver_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+	soap_closesock(soap);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+  }
+  else
+  { soap->errnum = 0;
+    soap_set_receiver_error(soap, tcp_error(soap), "no master socket in soap_accept()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_disconnect(struct soap *soap)
+{
+#ifdef WITH_OPENSSL
+  if (soap->ssl)
+  { int r, s = 0;
+    if (soap->session)
+      SSL_SESSION_free(soap->session);
+    if (*soap->host)
+    { soap->session = SSL_get1_session(soap->ssl);
+      if (soap->session)
+      { strcpy(soap->session_host, soap->host);
+        soap->session_port = soap->port;
+      }
+    }
+    r = SSL_shutdown(soap->ssl);
+    if (r != 1)
+    { s = ERR_get_error();
+      if (s)
+      { if (soap_valid_socket(soap->socket))
+        { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1);
+          soap->socket = SOAP_INVALID_SOCKET;
+        }
+        r = SSL_shutdown(soap->ssl);
+      }
+    }
+    DBGLOG(TEST, if (s) SOAP_MESSAGE(fdebug, "Shutdown failed: %d\n", SSL_get_error(soap->ssl, r)));
+    SSL_free(soap->ssl);
+    soap->ssl = NULL;
+    if (s)
+      return SOAP_SSL_ERROR;
+    ERR_remove_state(0);
+  }
+#endif
+  if (soap_valid_socket(soap->socket) && !(soap->omode & SOAP_IO_UDP))
+  { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 2);
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+    soap->socket = SOAP_INVALID_SOCKET;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_closesocket(struct soap *soap, SOAP_SOCKET fd)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Close socket %d\n", (int)fd));
+  return closesocket(fd);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_shutdownsocket(struct soap *soap, SOAP_SOCKET fd, int how)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Shutdown socket %d how=%d\n", (int)fd, how));
+  return shutdown(fd, how);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_closesock(struct soap *soap)
+{ register int status = soap->error;
+  if (status == SOAP_EOF || status == SOAP_TCP_ERROR || status == SOAP_SSL_ERROR || !soap->keep_alive)
+  { if (soap->fclose && (soap->error = soap->fclose(soap)))
+      return soap->error;
+    soap->keep_alive = 0;
+  }
+#ifdef WITH_ZLIB
+  if (soap->zlib_state == SOAP_ZLIB_DEFLATE)
+    deflateEnd(&soap->d_stream);
+  else if (soap->zlib_state == SOAP_ZLIB_INFLATE)
+    inflateEnd(&soap->d_stream);
+  soap->zlib_state = SOAP_ZLIB_NONE;
+#endif
+  return soap->error = status;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_hash(register const char *s)
+{ register size_t h = 0;
+  while (*s)
+    h = 65599*h + *s++;
+  return h % SOAP_IDHASH;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_pht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing pointer hashtable\n"));
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new1(soap_mode mode)
+{ return soap_new2(mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new()
+{ return soap_new2(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new2(soap_mode imode, soap_mode omode)
+{ struct soap *soap = (struct soap*)malloc(sizeof(struct soap));
+  if (soap)
+    soap_init2(soap, imode, omode);
+  return soap;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_del(struct soap *soap)
+{ free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_pht(struct soap *soap)
+{ register struct soap_pblk *pb, *next;
+  register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free pointer hashtable\n"));
+  for (pb = soap->pblk; pb; pb = next)
+  { next = pb->next;
+    SOAP_FREE(soap, pb);
+  }
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type)
+{ register int i;
+  struct soap_plist *pp;
+  if (soap->version != 1)
+    soap->encoding = 1;
+  if (a)
+    i = soap_array_pointer_lookup(soap, p, a, n, type, &pp);
+  else
+    i = soap_pointer_lookup(soap, p, type, &pp);
+  if (i)
+  { if (soap_is_embedded(soap, pp)
+     || soap_is_single(soap, pp))
+      return 0;
+    soap_set_embedded(soap, pp);
+  }
+  return i;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_lookup(struct soap *soap, const void *p, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (p)
+  { for (pp = soap->pht[soap_hash_ptr(p)]; pp; pp = pp->next)
+    { if (pp->ptr == p && pp->type == type)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d id=%d\n", p, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d: not found\n", p, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_enter(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register int h;
+  register struct soap_plist *pp;
+  if (!soap->pblk || soap->pidx >= SOAP_PTRBLK)
+  { register struct soap_pblk *pb = (struct soap_pblk*)SOAP_MALLOC(soap, sizeof(struct soap_pblk));
+    if (!pb)
+    { soap->error = SOAP_EOM;
+      return 0;
+    }
+    pb->next = soap->pblk;
+    soap->pblk = pb;
+    soap->pidx = 0;
+  }
+  *ppp = pp = &soap->pblk->plist[soap->pidx++];
+  if (a)
+    h = soap_hash_ptr(a->__ptr);
+  else
+    h = soap_hash_ptr(p);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pointer enter location=%p array=%p size=%d dim=%d type=%d id=%d\n", p, a?a->__ptr:NULL, a?a->__size:0, n, type, soap->idnum+1));
+  pp->next = soap->pht[h];
+  pp->type = type;
+  pp->mark1 = 0;
+  pp->mark2 = 0;
+  pp->ptr = p;
+  pp->array = a;
+  soap->pht[h] = pp;
+  pp->id = ++soap->idnum;
+  return pp->id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_pointer_lookup(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (!p || !a->__ptr)
+    return 0;
+  for (pp = soap->pht[soap_hash_ptr(a->__ptr)]; pp; pp = pp->next)
+  { if (pp->type == type && pp->array && pp->array->__ptr == a->__ptr)
+    { register int i;
+      for (i = 0; i < n; i++)
+        if (((const int*)&pp->array->__size)[i] != ((const int*)&a->__size)[i])
+	  break;
+      if (i == n)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d id=%d\n", a->__ptr, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d: not found\n", a->__ptr, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_count(struct soap *soap)
+{ soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) || (soap->omode & SOAP_ENC_DIME))
+    soap->mode = soap->omode | SOAP_IO_LENGTH | SOAP_ENC_DIME;
+  else
+#endif
+  { soap->mode = soap->omode;
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE
+     || (((soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_ENC_XML))
+#ifndef WITH_LEANER
+      && !soap->fpreparesend
+#endif
+      ))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    else
+      soap->mode |= SOAP_IO_LENGTH;
+  }
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (!(soap->mode & SOAP_ENC_DIME))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+    soap->mode |= SOAP_ENC_MIME;
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+  soap->dime.list = soap->dime.last;	/* keep track of last DIME attachment */
+#endif
+  soap->count = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->part = SOAP_BEGIN;
+  soap->idnum = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin count phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+#ifndef WITH_LEANER
+  soap->dime.count = 0; /* count # of attachments */
+  soap->dime.size = 0; /* accumulate total size of attachments */
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+    return soap->error = soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_count(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->fpreparefinal)
+    return soap->error = soap->fpreparefinal(soap);
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of count phase\n"));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_send(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+  soap->mode = soap->omode | (soap->mode & (SOAP_IO_LENGTH | SOAP_ENC_DIME));
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+#ifdef WITH_UDP
+  if ((soap->mode & SOAP_IO_UDP))
+  { soap->mode |= SOAP_ENC_XML;
+    if (soap->count > SOAP_BUFLEN)
+      return soap->error = SOAP_UDP_ERROR;
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_FLUSH && soap_valid_socket(soap->socket))
+  { if (soap->count || (soap->mode & SOAP_IO_LENGTH) || (soap->mode & SOAP_ENC_XML))
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+  soap->mode &= ~SOAP_IO_LENGTH;
+  if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap_new_block(soap);
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+  { soap->mode |= SOAP_ENC_MIME;
+    soap->mode &= ~SOAP_ENC_DIME;
+  }
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket)) /* Set win32 stdout or soap->sendfd to BINARY, e.g. to support DIME */
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->sendfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->sendfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#endif
+  if (soap->mode & SOAP_IO)
+  { soap->bufidx = 0;
+    soap->buflen = 0;
+  }
+  soap->chunksize = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+#ifdef WITH_ZLIB
+  soap->z_ratio_out = 1.0;
+  if ((soap->mode & SOAP_ENC_ZLIB) && soap->zlib_state != SOAP_ZLIB_DEFLATE)
+  {
+#ifdef WITH_GZIP
+    memcpy(soap->z_buf, "\37\213\10\0\0\0\0\0\0\377", 10);
+    soap->d_stream.next_out = (Byte*)soap->z_buf + 10;
+    soap->d_stream.avail_out = SOAP_BUFLEN - 10;
+    soap->z_crc = crc32(0L, NULL, 0);
+    if (deflateInit2(&soap->d_stream, soap->z_level, Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY) != Z_OK)
+#else
+    soap->d_stream.next_out = (Byte*)soap->z_buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    if (deflateInit(&soap->d_stream, soap->z_level) != Z_OK)
+#endif
+      return soap->error = SOAP_ZLIB_ERROR;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflate initialized\n"));
+    soap->zlib_state = SOAP_ZLIB_DEFLATE;
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin send phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+  soap->part = SOAP_BEGIN;
+#ifndef WITH_LEANER
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_embedded(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { pp->mark1 = 1;
+    pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded %p type=%d mark set to 1\n", p, t));
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_reference(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (!p || (soap->mode & SOAP_XML_TREE))
+    return 1;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (soap_pointer_enter(soap, p, NULL, 0, t, &pp))
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  else
+    return 1;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reference %p type=%d (%d %d)\n", p, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_reference(struct soap *soap, const void *p, const struct soap_array *a, int n, int t)
+{ register int i;
+  struct soap_plist *pp;
+  if (!p || !a->__ptr)
+    return 1;
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (i)
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (!soap_pointer_enter(soap, p, a, n, t, &pp))
+    return 1;
+  else
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array reference %p ptr=%p dim=%d type=%d (%d %d)\n", p, a->__ptr, n, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embedded_id(struct soap *soap, int id, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap->mode & SOAP_XML_TREE)
+    return id;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id %p type=%d id=%d\n", p, t, id));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (id < 0)
+    { id = soap_pointer_lookup(soap, p, t, &pp);
+      if (id)
+      { if (soap->mode & SOAP_IO_LENGTH)
+          pp->mark1 = 2;
+        else
+          pp->mark2 = 2;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id multiref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+      }
+      return -1;
+    }
+    return id;
+  }
+  if (id < 0)
+    id = soap_pointer_lookup(soap, p, t, &pp);
+  else if (id && !soap_pointer_lookup(soap, p, t, &pp))
+    return 0;
+  if (id && pp)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      pp->mark1 = 1;
+    else
+      pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id embedded ref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+  }
+  return id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Is embedded? %d %d\n", (int)pp->mark1, (int)pp->mark2));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      return pp->mark1 != 0;
+    return pp->mark2 != 0;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 1;
+  return pp->mark2 == 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_single(struct soap *soap, struct soap_plist *pp)
+{ if (soap->part == SOAP_IN_HEADER)
+    return 1;
+  if (!pp)
+    return 0;
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 0;
+  return pp->mark2 == 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return;
+  if (soap->mode & SOAP_IO_LENGTH)
+    pp->mark1 = 1;
+  else
+    pp->mark2 = 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attachment(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, const char *aid, const char *atype, const char *aoptions, int n, const char *type, int t) 
+{ struct soap_plist *pp;
+  int i;
+  if (!p || !a->__ptr || (!aid && !atype))
+    return soap_element_id(soap, tag, id, p, a, n, type, t);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Attachment tag='%s' id='%s' (%d) type='%s'\n", tag, aid?aid:"", id, atype?atype:""));
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (!i)
+  { i = soap_pointer_enter(soap, p, a, n, t, &pp);
+    if (!i)
+    { soap->error = SOAP_EOM;
+      return -1;
+    }
+  }
+  if (id <= 0)
+    id = i;
+  if (!aid)
+  { sprintf(soap->tmpbuf, soap->dime_id_format, id);
+    aid = soap_strdup(soap, soap->tmpbuf);
+  }
+  /* Add MTOM xop:Include element when necessary */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  if ((soap->mode & SOAP_ENC_MTOM) && strcmp(tag, "xop:Include"))
+  { if (soap_element_begin_out(soap, tag, 0, type)
+     || soap_element_href(soap, "xop:Include", 0, "href", aid)
+     || soap_element_end_out(soap, tag))
+      return soap->error;
+  }
+  else if (soap_element_href(soap, tag, 0, "href", aid))
+    return soap->error;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { if (pp->mark1 != 3)
+    { struct soap_multipart *content;
+      if (soap->mode & SOAP_ENC_MTOM)
+        content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, (char*)a->__ptr, a->__size);
+      else
+        content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, (char*)a->__ptr, a->__size);
+      if (!content)
+      { soap->error = SOAP_EOM;
+        return -1;
+      }
+      if (!strncmp(aid, "cid:", 4)) /* RFC 2111 */
+      { if (soap->mode & SOAP_ENC_MTOM)
+        { char *s = (char*)soap_malloc(soap, strlen(aid) - 1);
+	  if (s)
+	  { *s = '<';
+	    strcpy(s + 1, aid + 4);
+	    strcat(s, ">");
+	    content->id = s;
+          }
+        }
+        else
+          content->id = aid + 4;
+      }
+      else
+        content->id = aid;
+      content->type = atype;
+      content->options = aoptions;
+      content->encoding = SOAP_MIME_BINARY;
+      pp->mark1 = 3;
+    }
+  }
+  else
+    pp->mark2 = 3;
+  return -1;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_iht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+    soap->iht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_iht(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip, *p;
+  register struct soap_flist *fp, *fq;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = p)
+    { for (fp = ip->flist; fp; fp = fq)
+      { fq = fp->next;
+        SOAP_FREE(soap, fp);
+      }
+      p = ip->next;
+      SOAP_FREE(soap, ip);
+    }
+    soap->iht[i] = NULL;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_lookup(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  for (ip = soap->iht[soap_hash(id)]; ip; ip = ip->next)
+    if (!strcmp(ip->id, id))
+      return ip;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_enter(struct soap *soap, const char *id)
+{ register size_t h;
+  register struct soap_ilist *ip;
+  ip = (struct soap_ilist*)SOAP_MALLOC(soap, sizeof(struct soap_ilist) + strlen(id));
+  if (ip)
+  { h = soap_hash(id);
+    strcpy(ip->id, id);
+    ip->next = soap->iht[h];
+    soap->iht[h] = ip;
+    return ip;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_malloc(struct soap *soap, size_t n)
+{ register char *p;
+  if (!n)
+    return (void*)SOAP_NON_NULL;
+  if (!soap)
+    return SOAP_MALLOC(soap, n);
+  n += (-(long)n) & (sizeof(void*)-1); /* align at 4-, 8- or 16-byte boundary */
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(void*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  /* keep chain of alloced cells for later destruction */
+  soap->alloced = 1;
+  *(void**)(p + n) = soap->alist;
+  *(size_t*)(p + n + sizeof(void*)) = n;
+  soap->alist = p + n;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_mht(struct soap *soap)
+{ register int i;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->mht[i] = NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_free_mht(struct soap *soap)
+{ register int i;
+  register struct soap_mlist *mp, *mq;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+  { for (mp = soap->mht[i]; mp; mp = mq)
+    { mq = mp->next;
+      if (mp->live)
+        fprintf(stderr, "%s(%d): malloc() = %p not freed (memory leak or forgot to call soap_end()?)\n", mp->file, mp->line, mp->ptr);
+      free(mp);
+    }
+    soap->mht[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_track_malloc(struct soap *soap, const char *file, int line, size_t size)
+{ register void *p = malloc(size);
+  if (soap)
+  { register int h = soap_hash_ptr(p);
+    register struct soap_mlist *mp = (struct soap_mlist*)malloc(sizeof(struct soap_mlist));
+    if (soap->fdebug[SOAP_INDEX_TEST])
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): malloc(%lu) = %p\n", file, line, (unsigned long)size, p));
+    mp->next = soap->mht[h];
+    mp->ptr = p;
+    mp->file = file;
+    mp->line = line;
+    mp->live = 1;
+    soap->mht[h] = mp;
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_track_free(struct soap *soap, const char *file, int line, void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+  { if (mp->live)
+    { free(p);
+      if (soap->fdebug[SOAP_INDEX_TEST])
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): free(%p)\n", file, line, p));
+      mp->live = 0;
+    }
+    else
+      fprintf(stderr, "%s(%d): free(%p) double free of pointer malloced at %s(%d)\n", file, line, p, mp->file, mp->line);
+  }
+  else
+    fprintf(stderr, "%s(%d): free(%p) pointer not malloced\n", file, line, p);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_track_unlink(struct soap *soap, const void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+    mp->live = 0;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_dealloc(struct soap *soap, void *p)
+{ if (!soap)
+    return;
+  if (p)
+  { register char **q;
+    for (q = (char**)&soap->alist; *q; q = *(char***)q)
+    { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+      { *q = **(char***)q;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Freed data at %p\n", p));
+        SOAP_FREE(soap, p);
+        return;
+      }
+    }
+    soap_delete(soap, p);
+  }
+  else
+  { register char *q;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free all soap_malloc() data\n"));
+    while (soap->alist)
+    { q = (char*)soap->alist;
+      soap->alist = *(void**)q;
+      q -= *(size_t*)(q + sizeof(void*));
+      SOAP_FREE(soap, q);
+    }
+  }
+  /* we must assume these were deallocated: */
+  soap->action = NULL;
+  soap->fault = NULL;
+  soap->header = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->authrealm = NULL;
+#ifndef WITH_LEANER
+  soap_clr_mime(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_delete(struct soap *soap, void *p)
+{ register struct soap_clist **cp;
+  if (soap_check_state(soap))
+    return;
+  cp = &soap->clist;
+  if (p)
+  { while (*cp)
+    { if (p == (*cp)->ptr)
+      { register struct soap_clist *q = *cp;
+        *cp = q->next;
+        q->fdelete(q);
+        SOAP_FREE(soap, q);
+        return;
+      }
+      cp = &(*cp)->next;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: address not in list\n", p));
+  }
+  else
+  { while (*cp)
+    { register struct soap_clist *q = *cp;
+      *cp = q->next;
+      if (q->ptr == (void*)soap->fault)
+        soap->fault = NULL; /* this was deallocated */
+      else if (q->ptr == (void*)soap->header)
+        soap->header = NULL; /* this was deallocated */
+      q->fdelete(q);
+      SOAP_FREE(soap, q);
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_clist *
+SOAP_FMAC2
+soap_link(struct soap *soap, void *p, int t, int n, void (*fdelete)(struct soap_clist*))
+{ register struct soap_clist *cp;
+  if ((cp = (struct soap_clist*)SOAP_MALLOC(soap, sizeof(struct soap_clist))))
+  { cp->next = soap->clist;
+    cp->type = t;
+    cp->size = n; 
+    cp->ptr = p;
+    cp->fdelete = fdelete;
+    soap->clist = cp;
+  }
+  return cp;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_unlink(struct soap *soap, const void *p)
+{ register char **q;
+  register struct soap_clist **cp;
+  if (!soap || !p)
+    return;
+  for (q = (char**)&soap->alist; *q; q = *(char***)q)
+  { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+    { *q = **(char***)q;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked data %p\n", p));
+#ifdef SOAP_DEBUG
+      soap_track_unlink(soap, p);
+#endif
+      return;
+    }
+  }
+  for (cp = &soap->clist; *cp; cp = &(*cp)->next)
+  { if (p == (*cp)->ptr)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked class instance %p\n", p));
+      q = (char**)*cp;
+      *cp = (*cp)->next;
+      SOAP_FREE(soap, q);
+      return;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_lookup_type(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  if (id && *id)
+  { ip = soap_lookup(soap, id);
+    if (ip)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup id='%s' type=%d\n", id, ip->type));
+      return ip->type;
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "lookup type id='%s' NOT FOUND! Need to get it from xsi:type\n", id));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, unsigned int k)
+{ struct soap_ilist *ip;
+  void **q;
+  if (!p || !id || !*id)
+    return p;
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding first href='%s' type=%d %p (%u bytes)\n", id, t, p, (unsigned int)n));
+    ip->type = t;
+    ip->size = n; 
+    ip->link = p;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->ptr = NULL;
+    ip->level = k;
+    *p = NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolved href='%s' type=%d location=%p (%u bytes)\n", id, t, ip->ptr, (unsigned int)n));
+    if (ip->type != t)
+    { strcpy(soap->id, id);
+      soap->error = SOAP_HREF;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility: id type=%d href type=%d\n", ip->type, t));
+      return NULL;
+    }
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      if (!q)
+        return NULL;
+      *p = (void*)q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    *p = ip->ptr;
+  }
+  else if (ip->level > k)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving level %u pointers to href='%s'\n", ip->level, id));
+    while (ip->level > k)
+    { void *s, **r = &ip->link;
+      q = (void**)ip->link;
+      while (q)
+      { *r = (void*)soap_malloc(soap, sizeof(void*));
+        s = *q;
+        *q = *r;
+        r = (void**)*r;
+        q = (void**)s;
+      }
+      *r = NULL;
+      ip->size = n; 
+      ip->copy = NULL;
+      ip->level = ip->level - 1;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarded href='%s' type=%d location=%p (%u bytes)\n", id, t, p, (unsigned int)n));
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      *p = q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_forward(struct soap *soap, const char *href, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t))
+{ struct soap_ilist *ip;
+  if (!p || !href || !*href)
+    return p;
+  ip = soap_lookup(soap, href); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, href); /* new hash table entry for string id */
+    ip->type = st;
+    ip->size = n;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->ptr = NULL;
+    ip->level = 0;
+    ip->flist = NULL;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry href='%s' type=%d size=%lu level=%d location=%p\n", href, st, (unsigned long)n, k, p));
+  }
+  else if (ip->type != st || (ip->level == k && ip->size != n))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", href, ip->type, (unsigned long)ip->size, k, st, (unsigned long)n));
+    strcpy(soap->id, href);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  if (fcopy || n < sizeof(void*) || *href != '#')
+  { register struct soap_flist *fp = (struct soap_flist*)SOAP_MALLOC(soap, sizeof(struct soap_flist));
+    if (!fp)
+    { soap->error = SOAP_EOM;
+      return NULL;
+    }
+    fp->next = ip->flist;
+    fp->type = tt;
+    fp->ptr = p;
+    fp->level = k;
+    fp->len = len;
+    if (fcopy)
+      fp->fcopy = fcopy;
+    else
+      fp->fcopy = soap_fcopy;
+    ip->flist = fp;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding type=%d (target type=%d) size=%lu location=%p level=%u len=%lu href='%s'\n", st, tt, (unsigned long)n, p, k, (unsigned long)len, href));
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding copying address %p for type=%d href='%s'\n", p, st, href));
+    *(void**)p = ip->copy;
+    ip->copy = p;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*))
+{
+#ifndef WITH_NOIDREF
+  struct soap_ilist *ip;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Enter id='%s' type=%d loc=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  soap->alloced = 0;
+  if (!p)
+  { if (finstantiate)
+      p = finstantiate(soap, t, type, arrayType, &n);
+    else
+      p = soap_malloc(soap, n);
+    if (p)
+      soap->alloced = 1;
+  }
+#ifndef WITH_NOIDREF
+  if (!id || !*id)
+#endif
+    return p;
+#ifndef WITH_NOIDREF
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Lookup entry id='%s for location=%p'\n", id, p));
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    ip->type = t;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry id='%s' type=%d size=%lu level=%u location=%p\n", id, t, (unsigned long)n, k, p));
+  }
+  else if ((ip->type != t || (ip->level == k && ip->size != n)) && (ip->copy || ip->flist))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", id, ip->type, (unsigned long)ip->size, k, t, (unsigned long)n));
+    strcpy(soap->id, id);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Multiply defined id='%s'\n", id));
+    strcpy(soap->id, id);
+    soap->error = SOAP_DUPLICATE_ID;
+    return NULL;
+  }
+  else 
+  { ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update entry id='%s' type=%d location=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  }
+  return ip->ptr;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{ DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Copying data type=%d (target type=%d) %p -> %p (%lu bytes)\n", st, tt, q, p, (unsigned long)n));
+  memcpy(p, q, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_send(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->dime.list)
+  { /* SOAP body referenced attachments must appear first */
+    soap->dime.last->next = soap->dime.first;
+    soap->dime.first = soap->dime.list->next;
+    soap->dime.list->next = NULL;
+    soap->dime.last = soap->dime.list;
+  }
+  if (soap_putdime(soap) || soap_putmime(soap))
+    return soap->error;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End send\n"));
+  if (soap->mode & SOAP_IO) /* need to flush the remaining data in buffer */
+  { if (soap_flush(soap))
+#ifdef WITH_ZLIB
+    { if (soap->mode & SOAP_ENC_ZLIB && soap->zlib_state == SOAP_ZLIB_DEFLATE)
+      { soap->zlib_state = SOAP_ZLIB_NONE;
+        deflateEnd(&soap->d_stream);
+      }
+      return soap->error;
+    }
+#else
+      return soap->error;
+#endif
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { int r;
+      soap->d_stream.avail_in = 0;
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating remainder\n"));
+        r = deflate(&soap->d_stream, Z_FINISH);
+        if (soap->d_stream.avail_out != SOAP_BUFLEN)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN - soap->d_stream.avail_out))
+          { soap->zlib_state = SOAP_ZLIB_NONE;
+            deflateEnd(&soap->d_stream);
+            return soap->error;
+	  }
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (r == Z_OK);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+      soap->z_ratio_out = (float)soap->d_stream.total_out / (float)soap->d_stream.total_in;
+      soap->mode &= ~SOAP_ENC_ZLIB;
+      soap->zlib_state = SOAP_ZLIB_NONE;
+      if (deflateEnd(&soap->d_stream) != Z_OK || r != Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to end deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+#ifdef WITH_GZIP
+      soap->z_buf[0] = soap->z_crc & 0xFF;
+      soap->z_buf[1] = (soap->z_crc >> 8) & 0xFF;
+      soap->z_buf[2] = (soap->z_crc >> 16) & 0xFF;
+      soap->z_buf[3] = (soap->z_crc >> 24) & 0xFF;
+      soap->z_buf[4] = soap->d_stream.total_in & 0xFF;
+      soap->z_buf[5] = (soap->d_stream.total_in >> 8) & 0xFF;
+      soap->z_buf[6] = (soap->d_stream.total_in >> 16) & 0xFF;
+      soap->z_buf[7] = (soap->d_stream.total_in >> 24) & 0xFF;
+      if (soap_flush_raw(soap, soap->z_buf, 8))
+        return soap->error;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip crc32=%lu\n", (unsigned long)soap->z_crc));
+#endif
+    }
+#endif
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    { char *p;
+#ifndef WITH_NOHTTP
+      if (!(soap->mode & SOAP_ENC_XML))
+      { soap->mode--;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending buffered message of length %u\n", (unsigned int)soap->blist->size));
+        if (soap->status >= SOAP_POST)
+          soap->error = soap->fpost(soap, soap->endpoint, soap->host, soap->port, soap->path, soap->action, soap->blist->size);
+        else if (soap->status != SOAP_STOP)
+          soap->error = soap->fresponse(soap, soap->status, soap->blist->size);
+        if (soap->error || soap_flush(soap))
+          return soap->error;
+        soap->mode++;
+      }
+#endif
+      for (p = soap_first_block(soap); p; p = soap_next_block(soap))
+      { DBGMSG(SENT, p, soap_block_size(soap));
+        if ((soap->error = soap->fsend(soap, p, soap_block_size(soap))))
+        { soap_end_block(soap);
+          return soap->error;
+        }
+      }
+      soap_end_block(soap);
+    }
+#ifndef WITH_LEANER
+    else if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { DBGMSG(SENT, "\r\n0\r\n\r\n", 7);
+      if ((soap->error = soap->fsend(soap, "\r\n0\r\n\r\n", 7)))
+        return soap->error;
+    }
+#endif
+  }
+#ifdef WITH_TCPFIN
+#ifdef WITH_OPENSSL
+  if (!soap->ssl && soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#else
+  if (soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#endif
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of send phase\n"));
+  soap->omode &= ~SOAP_XML_SEC;
+  soap->count = 0;
+  soap->part = SOAP_END;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_recv(struct soap *soap)
+{ soap->part = SOAP_END;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) && soap_getdime(soap))
+    return soap->error;
+  soap->dime.list = soap->dime.first;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  if ((soap->mode & SOAP_ENC_MIME) && soap_getmime(soap))
+    return soap->error;
+  soap->mime.list = soap->mime.first;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "End of receive message ok\n"));
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { soap->mode &= ~SOAP_ENC_ZLIB;
+    memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+    soap->bufidx = (char*)soap->d_stream.next_in - soap->z_buf;
+    soap->buflen = soap->z_buflen;
+    soap->zlib_state = SOAP_ZLIB_NONE;
+    if (inflateEnd(&soap->d_stream) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+#ifdef WITH_GZIP
+    if (soap->zlib_in == SOAP_ZLIB_GZIP)
+    { soap_wchar c;
+      short i;
+      for (i = 0; i < 8; i++)
+      { if ((int)(c = soap_getchar(soap)) == EOF)
+          return soap->error = SOAP_EOF;
+        soap->z_buf[i] = (char)c;
+      }
+      if (soap->z_crc != ((uLong)(unsigned char)soap->z_buf[0] | ((uLong)(unsigned char)soap->z_buf[1] << 8) | ((uLong)(unsigned char)soap->z_buf[2] << 16) | ((uLong)(unsigned char)soap->z_buf[3] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: crc check failed, message corrupted? (crc32=%lu)\n", (unsigned long)soap->z_crc));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+      if (soap->d_stream.total_out != ((uLong)(unsigned char)soap->z_buf[4] | ((uLong)(unsigned char)soap->z_buf[5] << 8) | ((uLong)(unsigned char)soap->z_buf[6] << 16) | ((uLong)(unsigned char)soap->z_buf[7] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: incorrect message length\n"));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+    }
+#endif
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    while ((int)soap_getchar(soap) != EOF) /* advance to last chunk */
+      ;
+  if (soap->fdisconnect && (soap->error = soap->fdisconnect(soap)))
+    return soap->error;
+#ifndef WITH_NOIDREF
+  return soap_resolve(soap);
+#else
+#ifndef WITH_LEANER
+  if (soap->xlist)
+  { if (soap->mode & SOAP_ENC_MTOM)
+      return soap->error = SOAP_MIME_HREF;
+    return soap->error = SOAP_DIME_HREF;
+  }
+#endif
+  return SOAP_OK;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free(struct soap *soap)
+{ register struct Namespace *ns;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free namespace stack\n"));
+  while (soap->nlist)
+  { register struct soap_nlist *np = soap->nlist->next;
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free any remaining temp blocks\n"));
+  while (soap->blist)
+    soap_end_block(soap);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute storage\n"));
+  while (soap->attributes)
+  { register struct soap_attribute *tp = soap->attributes->next;
+    if (soap->attributes->value)
+      SOAP_FREE(soap, soap->attributes->value);
+    SOAP_FREE(soap, soap->attributes);
+    soap->attributes = tp;
+  }
+#ifdef WITH_FAST
+  if (soap->labbuf)
+    SOAP_FREE(soap, soap->labbuf);
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  ns = soap->local_namespaces;
+  if (ns)
+  { for (; ns->id; ns++)
+    { if (ns->out)
+      { if (soap->encodingStyle == ns->out)
+          soap->encodingStyle = SOAP_STR_EOS;
+        SOAP_FREE(soap, ns->out);
+        ns->out = NULL;
+      }
+      if (soap->encodingStyle == ns->ns)
+        soap->encodingStyle = SOAP_STR_EOS;
+    }
+    SOAP_FREE(soap, soap->local_namespaces);
+    soap->local_namespaces = NULL;
+  }
+#ifndef WITH_LEANER
+  while (soap->xlist)
+  { struct soap_xlist *xp = soap->xlist->next;
+    SOAP_FREE(soap, soap->xlist);
+    soap->xlist = xp;
+  }
+#endif
+#ifndef WITH_NOIDREF
+  soap_free_pht(soap);
+  soap_free_iht(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_logs(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { soap->logfile[i] = NULL;
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEAN) || defined(SOAP_DEBUG)
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_open_logfile(struct soap *soap, int i)
+{ if (soap->logfile[i])
+    soap->fdebug[i] = fopen(soap->logfile[i], i < 2 ? "ab" : "a");
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_close_logfile(struct soap *soap, int i)
+{ if (soap->fdebug[i])
+  { fclose(soap->fdebug[i]);
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_close_logfiles(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+    soap_close_logfile(soap, i);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_set_logfile(struct soap *soap, int i, const char *logfile)
+{ char *s = NULL;
+  soap_close_logfile(soap, i);
+  if (soap->logfile[i])
+    SOAP_FREE(soap, (void*)soap->logfile[i]);
+  if (logfile)
+    if ((s = (char*)SOAP_MALLOC(soap, strlen(logfile) + 1)))
+      strcpy(s, logfile);
+  soap->logfile[i] = s;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_recv_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_RECV, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_sent_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_SENT, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_test_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_TEST, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy(struct soap *soap)
+{ return soap_copy_context((struct soap*)malloc(sizeof(struct soap)), soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy_context(struct soap *copy, struct soap *soap)
+{ if (soap_check_state(soap))
+    return NULL;
+  if (copy)
+  { register struct soap_plugin *p;
+    memcpy(copy, soap, sizeof(struct soap));
+    copy->state = SOAP_COPY;
+    copy->user = NULL;
+    copy->error = SOAP_OK;
+    copy->userid = NULL;
+    copy->passwd = NULL;
+    copy->nlist = NULL;
+    copy->blist = NULL;
+    copy->clist = NULL;
+    copy->alist = NULL;
+    copy->attributes = NULL;
+#ifdef WITH_FAST
+    copy->labbuf = NULL;
+    copy->lablen = 0;
+    copy->labidx = 0;
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_mht(copy);
+#endif
+    copy->local_namespaces = NULL;
+#ifndef WITH_NOIDREF
+    soap_init_iht(copy);
+    soap_init_pht(copy);
+#endif
+    copy->header = NULL;
+    copy->fault = NULL;
+    copy->action = NULL;
+#ifndef WITH_LEAN
+#ifdef WITH_COOKIES
+    copy->cookies = soap_copy_cookies(copy);
+#else
+    copy->cookies = NULL;
+#endif
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_logs(copy);
+    soap_set_recv_logfile(copy, soap->logfile[SOAP_INDEX_RECV]);
+    soap_set_sent_logfile(copy, soap->logfile[SOAP_INDEX_SENT]);
+    soap_set_test_logfile(copy, soap->logfile[SOAP_INDEX_TEST]);
+#endif
+    copy->plugins = NULL;
+    for (p = soap->plugins; p; p = p->next)
+    { register struct soap_plugin *q = (struct soap_plugin*)SOAP_MALLOC(copy, sizeof(struct soap_plugin));
+      if (!q)
+        return NULL;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying plugin '%s'\n", p->id));
+      *q = *p;
+      if (p->fcopy && (soap->error = p->fcopy(copy, q, p)))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not copy plugin '%s'\n", p->id));
+        SOAP_FREE(copy, q);
+        return NULL;
+      }
+      q->next = copy->plugins;
+      copy->plugins = q;
+    }
+  }
+  else
+    soap->error = SOAP_EOM;
+  return copy;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init(struct soap *soap)
+{ soap->state = SOAP_INIT;
+  soap->version = 0;
+  soap_imode(soap, SOAP_IO_DEFAULT);
+  soap_omode(soap, SOAP_IO_DEFAULT);
+  soap->plugins = NULL;
+  soap->user = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+  soap->fconnect = NULL;
+  soap->fdisconnect = NULL;
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+  soap->fplugin = fplugin;
+#ifndef WITH_LEANER
+  soap->fdimereadopen = NULL;
+  soap->fdimewriteopen = NULL;
+  soap->fdimereadclose = NULL;
+  soap->fdimewriteclose = NULL;
+  soap->fdimeread = NULL;
+  soap->fdimewrite = NULL;
+#endif
+  soap->float_format = "%.8g"; /* .8 preserves single FP precision as much as possible, but might not be very efficient */
+  soap->double_format = "%.17lg"; /* .17 preserves double FP precision as much as possible, but might not be very efficient */
+  soap->dime_id_format = "cid:id%d"; /* default DIME id format */
+  soap->http_version = "1.1";
+  soap->actor = NULL;
+  soap->max_keep_alive = SOAP_MAXKEEPALIVE;
+  soap->keep_alive = 0;
+  soap->recv_timeout = 0;
+  soap->send_timeout = 0;
+  soap->connect_timeout = 0;
+  soap->accept_timeout = 0;
+  soap->socket_flags = 0;
+  soap->connect_flags = 0;
+  soap->bind_flags = 0;
+  soap->accept_flags = 0;
+  soap->ip = 0;
+#ifdef WITH_FAST
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  soap->encodingStyle = SOAP_STR_EOS;
+#ifndef WITH_NONAMESPACES
+  soap->namespaces = namespaces;
+#else
+  soap->namespaces = NULL;
+#endif
+  soap->local_namespaces = NULL;
+  soap->nlist = NULL;
+  soap->blist = NULL;
+  soap->clist = NULL;
+  soap->alist = NULL;
+  soap->attributes = NULL;
+  soap->header = NULL;
+  soap->fault = NULL;
+  soap->master = SOAP_INVALID_SOCKET;
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->os = NULL;
+  soap->is = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifndef UNDER_CE
+  soap->recvfd = 0;
+  soap->sendfd = 1;
+#else
+  soap->recvfd = stdin;
+  soap->sendfd = stdout;
+#endif 
+  soap->host[0] = '\0';
+  soap->port = 0;
+  soap->action = NULL;
+  soap->proxy_host = NULL;
+  soap->proxy_port = 8080;
+  soap->proxy_userid = NULL;
+  soap->proxy_passwd = NULL;
+  soap->authrealm = NULL;
+  soap->prolog = NULL;
+#ifdef WITH_OPENSSL
+  if (!ssl_init_done)
+    soap_ssl_init();
+  soap->fsslauth = ssl_auth_init;
+  soap->fsslverify = ssl_verify_callback;
+  soap->bio = NULL;
+  soap->ssl = NULL;
+  soap->ctx = NULL;
+  soap->require_server_auth = 0;
+  soap->require_client_auth = 0;
+  soap->rsa = 0;
+  soap->keyfile = NULL;
+  soap->password = NULL;
+  soap->dhfile = NULL;
+  soap->cafile = NULL;
+  soap->capath = NULL;
+  soap->crlfile = NULL;
+  soap->randfile = NULL;
+  soap->session = NULL;
+#endif
+#ifdef WITH_ZLIB
+  soap->zlib_state = SOAP_ZLIB_NONE;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.zalloc = NULL;
+  soap->d_stream.zfree = NULL;
+  soap->d_stream.opaque = NULL;
+  soap->z_level = 6;
+#endif
+#ifndef WITH_LEAN
+  soap->c14ninclude = NULL;
+  soap->c14nexclude = NULL;
+  soap->cookies = NULL;
+  soap->cookie_domain = NULL;
+  soap->cookie_path = NULL;
+  soap->cookie_max = 32;
+#endif
+#ifdef SOAP_DEBUG
+  soap_init_mht(soap);
+  soap_init_logs(soap);
+  soap_set_recv_logfile(soap, "RECV.log");
+  soap_set_sent_logfile(soap, "SENT.log");
+  soap_set_test_logfile(soap, NULL);
+#endif
+#ifdef WMW_RPM_IO
+  soap->rpmreqid = NULL;
+#endif
+#ifdef PALM
+  palmNetLibOpen();
+#endif
+#ifndef WITH_NOIDREF
+  soap_init_iht(soap);
+  soap_init_pht(soap);
+#endif
+  soap_begin(soap);
+#ifdef SOAP_DEBUG
+  soap_set_test_logfile(soap, "TEST.log");
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init1(struct soap *soap, soap_mode mode)
+{ soap_init2(soap, mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init2(struct soap *soap, soap_mode imode, soap_mode omode)
+{ soap_init(soap);
+  soap_imode(soap, imode);
+  soap_omode(soap, omode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_begin(struct soap *soap)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing\n"));
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+  soap->null = 0;
+  soap->position = 0;
+  soap->encoding = 0;
+  soap->mustUnderstand = 0;
+  soap->mode = 0;
+  soap->ns = 0;
+  soap->part = SOAP_END;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  soap->error = SOAP_OK;
+  soap->peeked = 0;
+  soap->ahead = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+  soap->endpoint[0] = '\0';
+#ifndef WITH_LEANER
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+#endif
+  soap_free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end(struct soap *soap)
+{ register struct soap_clist *cp;
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  soap_dealloc(soap, NULL);
+  while (soap->clist)
+  { cp = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = cp;
+  }
+  soap_closesock(soap);
+#ifdef SOAP_DEBUG
+  soap_close_logfiles(soap);
+#endif
+#ifdef PALM
+  palmNetLibClose();
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_namespaces(struct soap *soap, struct Namespace *p)
+{ register struct Namespace *ns = soap->local_namespaces;
+  register struct soap_nlist *np, *nq, *nr;
+  register unsigned int level = soap->level;
+  soap->namespaces = p;
+  soap->local_namespaces = NULL;
+  soap_set_local_namespaces(soap);
+  /* reverse the namespace list */
+  np = soap->nlist;
+  soap->nlist = NULL;
+  if (np)
+  { nq = np->next;
+    np->next = NULL;
+    while (nq)
+    { nr = nq->next;
+      nq->next = np;
+      np = nq;
+      nq = nr;
+    }
+  }
+  /* then push on new stack */
+  while (np)
+  { register const char *s;
+    soap->level = np->level; /* preserve element nesting level */
+    s = np->ns;
+    if (!s && np->index >= 0 && ns)
+    { s = ns[np->index].out;
+      if (!s)
+        s = ns[np->index].ns;
+    }
+    if (s && soap_push_namespace(soap, np->id, s))
+      return soap->error;
+    nq = np;
+    np = np->next;
+    SOAP_FREE(soap, nq);
+  }
+  if (ns)
+  { register int i;
+    for (i = 0; ns[i].id; i++)
+    { if (ns[i].out)
+      { SOAP_FREE(soap, ns[i].out);
+        ns[i].out = NULL;
+      }
+    }
+    SOAP_FREE(soap, ns);
+  }
+  soap->level = level; /* restore level */
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_local_namespaces(struct soap *soap)
+{ if (soap->namespaces && !soap->local_namespaces)
+  { register const struct Namespace *ns1;
+    register struct Namespace *ns2;
+    register size_t n = 1;
+    for (ns1 = soap->namespaces; ns1->id; ns1++)
+      n++;
+    n *= sizeof(struct Namespace);
+    ns2 = (struct Namespace*)SOAP_MALLOC(soap, n);
+    if (ns2)
+    { memcpy(ns2, soap->namespaces, n);
+      if (ns2[0].ns)
+      { if (!strcmp(ns2[0].ns, soap_env1))
+          soap->version = 1;
+        else
+          soap->version = 2;
+      }
+      soap->local_namespaces = ns2;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+#ifndef PALM_1
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_strsearch(const char *big, const char *little)
+{ size_t n = strlen(little);
+  const char *s = big;
+  while (s) 
+  { if (!strncmp(s, little, n) && (s[n] == '\0' || s[n] == ' '))
+      return s;
+    s = strchr(s, ' ');
+    if (s)
+      s++;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_lookup_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np;
+  for (np = soap->nlist; np; np = np->next)
+  { if (!strncmp(np->id, tag, n) && !np->id[n])
+      return np;
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized)
+{ register struct soap_nlist *np;
+  size_t n, k;
+  if (soap_strsearch(soap->c14nexclude, id))
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns?ns:""));
+  if (!utilized)
+  { for (np = soap->nlist; np; np = np->next)
+    { if (!strcmp(np->id, id) && (!np->ns || !strcmp(np->ns, ns)))
+        break;
+    }
+    if (np)
+    { if (np->index == 1)
+        utilized = np->index;
+      else
+        return NULL;
+    }
+  }
+  n = strlen(id);
+  if (ns)
+    k = strlen(ns);
+  else
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k + 1);
+  if (!np)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  np->next = soap->nlist;
+  soap->nlist = np;
+  strcpy(np->id, id);
+  if (ns)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+  }
+  else
+    np->ns = NULL;
+  np->level = soap->level;
+  np->index = utilized;
+  return np;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_utilize_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np = soap_lookup_ns(soap, tag, n);
+  if (np)
+  { if (np->index == 0)
+      soap_push_ns(soap, np->id, np->ns, 1);
+  }
+  else
+  { strncpy(soap->tmpbuf, tag, n);
+    soap->tmpbuf[n] = '\0';
+    soap_push_ns(soap, soap->tmpbuf, NULL, 1);
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_pop_ns(struct soap *soap)
+{ soap_pop_namespace(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element(struct soap *soap, const char *tag, int id, const char *type)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element begin tag='%s' id='%d' type='%s'\n", tag, id, type?type:""));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->soap = soap;
+    elt->next = NULL;
+    elt->prnt = soap->dom;
+    elt->name = soap_strdup(soap, tag);
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->nstr = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->node = NULL;
+    elt->type = 0;
+    elt->head = NULL;
+    elt->tail = NULL;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+  }
+  else
+  {
+#endif
+    soap->level++;
+#ifndef WITH_LEAN
+    if (!soap->ns)
+    { if (!(soap->mode & SOAP_XML_CANONICAL)
+       && soap_send(soap, soap->prolog ? soap->prolog : "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"))
+        return soap->error;
+    }
+    else if (soap->mode & SOAP_XML_INDENT)
+    { if (soap->ns == 1 && soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+      soap->body = 1;
+    }
+#endif
+    if (soap_send_raw(soap, "<", 1)
+     || soap_send(soap, tag))
+      return soap->error;
+#ifdef WITH_DOM
+  }
+#endif
+  if (!soap->ns)
+  { struct Namespace *ns;
+    for (ns = soap->local_namespaces; ns && ns->id; ns++)
+    { if (*ns->id && (ns->out || ns->ns))
+      { sprintf(soap->tmpbuf, "xmlns:%s", ns->id);
+        if (soap_attribute(soap, soap->tmpbuf, ns->out ? ns->out : ns->ns))
+          return soap->error;
+      }
+    }   
+  }
+  soap->ns = 1; /* start with 0 or 2, but should be one to continue */
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { const char *s = strchr(tag, ':');
+    if (s)
+      soap_utilize_ns(soap, tag, s - tag);
+  }
+#endif
+  if (id > 0)
+  { sprintf(soap->tmpbuf, "_%d", id);
+    if (soap_attribute(soap, "id", soap->tmpbuf))
+      return soap->error;
+  }
+  if (type && *type)
+  { if (soap_attribute(soap, "xsi:type", type))
+      return soap->error;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { const char *s = strchr(type, ':');
+      if (s)
+        soap_utilize_ns(soap, type, s - type);
+    }
+#endif
+  }
+  if (soap->null && soap->position > 0)
+  { int i;
+    sprintf(soap->tmpbuf, "[%d", soap->positions[0]);
+    for (i = 1; i < soap->position; i++)
+      sprintf(soap->tmpbuf + strlen(soap->tmpbuf), ",%d", soap->positions[i]);
+    strcat(soap->tmpbuf, "]");
+    if (soap_attribute(soap, "SOAP-ENC:position", soap->tmpbuf))
+      return soap->error;
+  }
+  if (soap->mustUnderstand)
+  { if (soap->actor && *soap->actor)
+    { if (soap_attribute(soap, soap->version == 2 ? "SOAP-ENV:role" : "SOAP-ENV:actor", soap->actor))
+        return soap->error;
+    }
+    if (soap_attribute(soap, "SOAP-ENV:mustUnderstand", soap->version == 2 ? "true" : "1"))
+      return soap->error;
+    soap->mustUnderstand = 0;
+  }
+  if (soap->encoding)
+  { if (soap->encodingStyle && soap->local_namespaces)
+    { if (!*soap->encodingStyle)
+      { if (soap->local_namespaces[1].out)
+          soap->encodingStyle = soap->local_namespaces[1].out;
+        else
+          soap->encodingStyle = soap->local_namespaces[1].ns;
+      }
+      if (soap_attribute(soap, "SOAP-ENV:encodingStyle", soap->encodingStyle))
+        return soap->error;
+    }
+    soap->encoding = 0;
+  }
+  soap->null = 0;
+  soap->position = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_out(struct soap *soap, const char *tag, int id, const char *type)
+{ if (*tag == '-')
+    return SOAP_OK;
+  if (soap_element(soap, tag, id, type))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRRCHR
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_strrchr(const char *s, int t)
+{ register char *r = NULL;
+  while (*s)
+    if (*s++ == t)
+      r = (char*)s - 1;
+  return r;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOL
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_strtol(const char *s, char **t, int b)
+{ register long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { short neg = 0;
+    if (*s == '-')
+    { s++;
+      neg = 1;
+    }
+    else if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 214748364 && (n > 214748364 || c >= '8'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+    if (neg)
+      n = -n;
+  }
+  else /* b == 16 and value is always positive */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x07FFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOUL
+SOAP_FMAC1
+unsigned long
+SOAP_FMAC2
+soap_strtoul(const char *s, char **t, int b)
+{ unsigned long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 429496729 && (n > 429496729 || c >= '6'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+  }
+  else /* b == 16 */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x0FFFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_begin_out(struct soap *soap, const char *tag, int id, const char *type, const char *offset)
+{ if (soap_element(soap, tag, id, "SOAP-ENC:Array"))
+    return soap->error;
+  if (soap->version == 2)
+  { const char *s;
+    s = soap_strrchr(type, '[');
+    if ((size_t)(s - type) < sizeof(soap->tmpbuf))
+    { strncpy(soap->tmpbuf, type, s - type);
+      soap->tmpbuf[s - type] = '\0';
+      if (type && *type && (soap_attribute(soap, "SOAP-ENC:itemType", soap->tmpbuf)))
+        return soap->error;
+      if (s && (soap_attribute(soap, "SOAP-ENC:arraySize", s + 1)))
+        return soap->error;
+    }
+  }
+  else
+  { if (offset && (soap_attribute(soap, "SOAP-ENC:offset", offset)))
+      return soap->error;
+    if (type && *type && (soap_attribute(soap, "SOAP-ENC:arrayType", type)))
+      return soap->error;
+  }
+#ifndef WITH_LEAN
+  if (type && *type && (soap->mode & SOAP_XML_CANONICAL))
+  { const char *s = strchr(type, ':');
+    if (s)
+      soap_utilize_ns(soap, type, s - type);
+  }
+#endif
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_start_end_out(struct soap *soap, const char *tag)
+{ register struct soap_attribute *tp;
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att;
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { att = &soap->dom->atts;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible)
+      { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+	if (!*att)
+	  return soap->error = SOAP_EOM;
+	(*att)->next = NULL;
+        (*att)->nstr = NULL;
+        (*att)->name = soap_strdup(soap, tp->name);
+        (*att)->data = soap_strdup(soap, tp->value);
+        (*att)->wide = NULL;
+        (*att)->soap = soap;
+        tp->visible = 0;
+      }
+    }
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { struct soap_nlist *np;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible && tp->name)
+      { const char *s = strchr(tp->name, ':');
+        if (s)
+          soap_utilize_ns(soap, tp->name, s - tp->name);
+      }
+    }
+    for (np = soap->nlist; np; np = np->next)
+    { if (np->index == 1 && np->ns)
+      { sprintf(soap->tmpbuf, "xmlns:%s", np->id);
+        soap_set_attr(soap, soap->tmpbuf, np->ns);
+        np->index = 2;
+      }
+    }
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible)
+    { if (soap_send(soap, " ") || soap_send(soap, tp->name))
+        return soap->error;
+      if (tp->visible == 2 && tp->value)
+        if (soap_send_raw(soap, "=\"", 2)
+	 || soap_string_out(soap, tp->value, 1)
+	 || soap_send_raw(soap, "\"", 1))
+          return soap->error;
+      tp->visible = 0;
+    }
+  }
+  if (tag)
+  { 
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { if (soap_send_raw(soap, ">", 1)
+       || soap_element_end_out(soap, tag))
+        return soap->error;
+    }
+    else
+#endif
+    soap->level--;	/* decrement level just before /> */
+    if (soap_send_raw(soap, "/>", 2))
+      return soap->error;
+    return SOAP_OK;
+  }
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_out(struct soap *soap, const char *tag)
+{ if (*tag == '-')
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element ending tag='%s'\n", tag));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+    soap_pop_ns(soap);
+  if (soap->mode & SOAP_XML_INDENT)
+  { if (!soap->body)
+    { if (soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+    }
+    soap->body = 0;
+  }
+#endif
+  if (soap_send_raw(soap, "</", 2)
+   || soap_send(soap, tag))
+    return soap->error;
+  soap->level--;	/* decrement level just before > */
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_ref(struct soap *soap, const char *tag, int id, int href)
+{ register int n = 0;
+  if (soap->version == 2)
+    n = 1;
+  sprintf(soap->href, "#_%d", href);
+  return soap_element_href(soap, tag, id, "href" + n, soap->href + n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_href(struct soap *soap, const char *tag, int id, const char *ref, const char *val)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element '%s' reference %s='%s'\n", tag, ref, val));
+  if (soap_element(soap, tag, id, NULL)
+   || soap_attribute(soap, ref, val)
+   || soap_element_start_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_null(struct soap *soap, const char *tag, int id, const char *type)
+{ struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (tp->visible)
+      break;
+  if (tp || (soap->version == 2 && soap->position > 0) || id > 0 || (soap->mode & SOAP_XML_NIL))
+  { if (soap_element(soap, tag, id, type))
+      return soap->error;
+    if (soap->part != SOAP_IN_HEADER && soap->encodingStyle)
+      if (soap_attribute(soap, "xsi:nil", "true"))
+        return soap->error;
+    return soap_element_start_end_out(soap, tag);
+  }
+  soap->null = 1;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_id(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, int n, const char *type, int t) 
+{ if (!p || (a && !a->__ptr))
+  { soap_element_null(soap, tag, id, type);
+    return -1;
+  }
+#ifndef WITH_NOIDREF
+  if (soap->mode & SOAP_XML_TREE)
+    return 0;
+  if (id < 0)
+  { struct soap_plist *pp;
+    if (a)
+      id = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+    else
+      id = soap_pointer_lookup(soap, p, t, &pp);
+    if (id)
+    { if (soap_is_embedded(soap, pp))
+      { soap_element_ref(soap, tag, 0, id);
+        return -1;
+      }
+      if (soap_is_single(soap, pp))
+        return 0;
+      soap_set_embedded(soap, pp);
+    }
+  }
+  return id;
+#else
+  return 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_result(struct soap *soap, const char *tag)
+{ if (soap->version == 2 && soap->encodingStyle)
+    if (soap_element(soap, "SOAP-RPC:result", 0, NULL)
+     || soap_attribute(soap, "xmlns:SOAP-RPC", soap_rpc)
+     || soap_element_start_end_out(soap, NULL)
+     || soap_string_out(soap, tag, 0)
+     || soap_element_end_out(soap, "SOAP-RPC:result"))
+      return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attribute(struct soap *soap, const char *name, const char *value)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+    a->next = soap->dom->atts;
+    a->nstr = NULL;
+    a->name = soap_strdup(soap, name);
+    a->data = soap_strdup(soap, value);
+    a->wide = NULL;
+    a->soap = soap;
+    soap->dom->atts = a;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { /* TODO: consider using this code to handle default namespace
+    if (!strncmp(name, "xmlns", 5) && (name[5] == ':' || name[5] == '\0'))
+    { if (name[5] == ':')
+        soap_push_ns(soap, name + 6, value, 0);
+      else
+        soap_push_ns(soap, "", value, 0);
+    }
+    */
+    if (!strncmp(name, "xmlns:", 6))
+      soap_push_ns(soap, name + 6, value, 0);
+    else if (soap_set_attr(soap, name, value))
+      return soap->error;
+  }
+  else
+#endif
+  { if (soap_send(soap, " ") || soap_send(soap, name))
+      return soap->error;
+    if (value)
+      if (soap_send_raw(soap, "=\"", 2)
+       || soap_string_out(soap, value, 1)
+       || soap_send_raw(soap, "\"", 1))
+        return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_in(struct soap *soap, const char *tag, int nillable)
+{ if (!soap_peek_element(soap))
+  { if (soap->other)
+      return soap->error = SOAP_TAG_MISMATCH;
+    if (tag && *tag == '-')
+      return SOAP_OK;
+    if (!(soap->error = soap_match_tag(soap, soap->tag, tag)))
+    { soap->peeked = 0;
+      if (soap->body)
+        soap->level++;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"" ));
+      if (!nillable && soap->null && (soap->mode & SOAP_XML_STRICT))
+        return soap->error = SOAP_NULL;
+    }
+  }
+  else if (soap->error == SOAP_NO_TAG && tag && *tag == '-')
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_in(struct soap *soap, const char *tag)  
+{ register soap_wchar c;
+  register char *s;
+  register const char *t;
+  register int n = 0;
+  if (tag && *tag == '-')
+    return SOAP_OK;
+  soap->level--;
+  soap_pop_namespace(soap);
+#ifdef WITH_DOM
+  /* this whitespace or mixed content is not insignificant for DOM */
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!soap->peeked && !soap_string_in(soap, 3, -1, -1))
+      return soap->error;
+    if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  if (soap->peeked)
+  { if (soap->error == SOAP_NO_TAG)
+      soap->error = SOAP_OK;
+    if (*soap->tag)
+      n++;
+    soap->peeked = 0;
+  }
+  do
+  { while (((c = soap_get(soap)) != SOAP_TT))
+    { if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      if (c == SOAP_LT)
+        n++;
+      else if (c == '/')
+      { c = soap_get(soap);
+        if (c == SOAP_GT)
+	  n--;
+        else
+	  soap_unget(soap, c);
+      }
+    }
+  } while (n--);
+  s = soap->tag;
+  while (soap_notblank(c = soap_get(soap)))
+    *s++ = (char)c;
+  *s = '\0';
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  while (soap_blank(c))
+    c = soap_get(soap);
+  if (c != SOAP_GT)
+    return soap->error = SOAP_SYNTAX_ERROR;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:""));
+  if (!tag || !*tag)
+    return SOAP_OK;
+  if ((s = strchr(soap->tag, ':')))
+    s++;
+  else
+    s = soap->tag;
+  if ((t = strchr(tag, ':')))
+    t++;
+  else
+    t = tag;
+  if (!SOAP_STRCMP(s, t))
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element tag name does not match\n"));
+  return soap->error = SOAP_SYNTAX_ERROR;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_attr_value(struct soap *soap, const char *name, int flag)
+{ register struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (!soap_match_tag(soap, tp->name, name))
+      break;
+  if (tp && tp->visible == 2)
+  { if (flag == 2 && (soap->mode & SOAP_XML_STRICT))
+      soap->error = SOAP_PROHIBITED;
+    else
+      return tp->value;
+  }
+  else if (flag == 1 && (soap->mode & SOAP_XML_STRICT))
+    soap->error = SOAP_REQUIRED;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_attr(struct soap *soap, const char *name, const char *value)
+{ register struct soap_attribute *tp;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set attribute %s='%s'\n", name, value?value:""));
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (!strcmp(tp->name, name))
+      break;
+  }
+  if (!tp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute %s\n", name));
+    if (!(tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(name))))
+      return soap->error = SOAP_EOM;
+    tp->ns = NULL;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { struct soap_attribute **tpp = &soap->attributes;
+      const char *s = strchr(name, ':');
+      if (!strncmp(name, "xmlns", 5))
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) || strcmp((*tpp)->name + 5, name + 5) > 0)
+            break;
+      }
+      else if (!s)
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) && ((*tpp)->ns || strcmp((*tpp)->name, name) > 0))
+            break;
+      }
+      else
+      { int k;
+        for (; *tpp; tpp = &(*tpp)->next)
+	{ if (!strncmp((*tpp)->name, "xmlns:", 6) && !strncmp((*tpp)->name + 6, name, s - name) && !(*tpp)->name[6 + s - name])
+	  { if (!tp->ns)
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Canonicalization: prefix %s=%p(%s)\n", name, (*tpp)->ns, (*tpp)->ns));
+	      tp->ns = (*tpp)->ns;
+	    }
+	  }
+          else if (strncmp((*tpp)->name, "xmlns", 5) && (*tpp)->ns && tp->ns && ((k = strcmp((*tpp)->ns, tp->ns)) > 0 || (!k && strcmp((*tpp)->name, name) > 0)))
+            break;
+        }
+      }
+      tp->next = *tpp;
+      *tpp = tp;
+    }
+    else
+#endif
+    { tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    strcpy(tp->name, name);
+    tp->value = NULL;
+  }
+  else if (tp->visible)
+  { return SOAP_OK;
+  }
+  else if (value && tp->value && tp->size <= strlen(value))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute value of %s (free %p)\n", name, tp->value));
+    SOAP_FREE(soap, tp->value);
+    tp->value = NULL;
+    tp->ns = NULL;
+  }
+  if (value)
+  { if (!tp->value)
+    { tp->size = strlen(value) + 1;
+      if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+        return soap->error = SOAP_EOM;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute value of %s (%p)\n", tp->name, tp->value));
+    }
+    strcpy(tp->value, value);
+    if (!strncmp(tp->name, "xmlns:", 6))
+      tp->ns = tp->value;
+    tp->visible = 2;
+#ifndef WITH_LEAN
+    if (!strcmp(name, "wsu:Id"))
+    { soap->part = SOAP_BEGIN_SECURITY;
+      strncpy(soap->id, value, sizeof(soap->id));
+      soap->id[sizeof(soap->id)-1] = '\0';
+    }
+#endif
+  }
+  else
+    tp->visible = 1;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_attr(struct soap *soap)
+{ register struct soap_attribute *tp;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_CANONICAL))
+  { while (soap->attributes)
+    { tp = soap->attributes->next;
+      SOAP_FREE(soap, soap->attributes->value);
+      SOAP_FREE(soap, soap->attributes);
+      soap->attributes = tp;
+    }
+  }
+  else
+#endif
+  { for (tp = soap->attributes; tp; tp = tp->next)
+      tp->visible = 0;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d)
+{ register size_t i;
+  for (i = 0; i < n; i++)
+  { register soap_wchar c = soap_get(soap);
+    switch (c)
+    {
+    case SOAP_TT:
+      *s++ = '<';
+      soap_unget(soap, '/');
+      break;
+    case SOAP_LT:
+      *s++ = '<';
+      break;
+    case SOAP_GT:
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '>';
+      break;
+    case SOAP_QT:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '"';
+      break;
+    case SOAP_AP:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '\'';
+      break;
+    case '\t':
+    case '\n':
+    case '\r':
+    case ' ':
+    case '/':
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+    default:
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+  }
+  return soap->error = SOAP_EOM;
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_store_lab(struct soap *soap, const char *s, size_t n)
+{ soap->labidx = 0;
+  return soap_append_lab(soap, s, n);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_append_lab(struct soap *soap, const char *s, size_t n)
+{ if (soap->labidx + n >= soap->lablen)
+  { register char *t = soap->labbuf;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enlarging look-aside buffer to append data, old size=%lu", (unsigned long)soap->lablen));
+    if (soap->lablen == 0)
+      soap->lablen = SOAP_LABLEN;
+    while (soap->labidx + n >= soap->lablen)
+      soap->lablen <<= 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, ", new size=%lu\n", (unsigned long)soap->lablen));
+    soap->labbuf = (char*)SOAP_MALLOC(soap, soap->lablen);
+    if (!soap->labbuf)
+    { if (t)
+        SOAP_FREE(soap, t);
+      return soap->error = SOAP_EOM;
+    }
+    if (t)
+    { memcpy(soap->labbuf, t, soap->labidx);
+      SOAP_FREE(soap, t);
+    }
+  }
+  if (s)
+  { memcpy(soap->labbuf + soap->labidx, s, n);
+    soap->labidx += n;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_peek_element(struct soap *soap)
+{
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att = NULL;
+  register char *lead = NULL;
+#endif
+  register struct soap_attribute *tp;
+  const char *t;
+  register char *s;
+  register soap_wchar c;
+  register int i;
+  if (soap->peeked)
+  { if (!*soap->tag)
+      return soap->error = SOAP_NO_TAG;
+    return SOAP_OK;
+  }
+  soap->peeked = 1;
+  c = soap_getutf8(soap);
+#ifdef WITH_DOM
+  /* whitespace leading to start tag is not insignificant for DOM */
+  if (soap_blank(c))
+  { soap->labidx = 0;
+    do
+    { if (soap_append_lab(soap, NULL, 0))
+        return SOAP_EOM;
+      s = soap->labbuf + soap->labidx;
+      i = soap->lablen - soap->labidx;
+      soap->labidx = soap->lablen;
+      while (soap_blank(c) && i--)
+      { *s++ = c;
+        c = soap_getutf8(soap);
+      }
+    }
+    while (soap_blank(c));
+    *s = '\0';
+    lead = soap_strdup(soap, soap->labbuf);
+  }
+#else
+  while (soap_blank(c))
+    c = soap_getutf8(soap);
+#endif
+  if (c != SOAP_LT)
+  { *soap->tag = '\0';
+    if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, c);
+#ifdef WITH_DOM
+    /* whitespace leading to end tag is not insignificant for DOM */
+    if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+      soap->dom->tail = soap_strdup(soap, lead);
+#endif
+    return soap->error = SOAP_NO_TAG;
+  }
+  s = soap->tag;
+  do c = soap_get1(soap);
+  while (soap_blank(c));
+  i = sizeof(soap->tag);
+  while (c != '>' && c != '/' && soap_notblank(c))
+  { if (--i > 0)
+      *s++ = (char)c;
+    c = soap_get1(soap);
+  }
+  while (soap_blank(c))
+    c = soap_get1(soap);
+  *s = '\0';
+  soap->id[0] = '\0';
+  soap->href[0] = '\0';
+  soap->type[0] = '\0';
+  soap->arrayType[0] = '\0';
+  soap->arraySize[0] = '\0';
+  soap->arrayOffset[0] = '\0';
+  soap->other = 0;
+  soap->root = -1;
+  soap->position = 0;
+  soap->null = 0;
+  soap->mustUnderstand = 0;
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt;
+    elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->next = NULL;
+    elt->nstr = NULL;
+    elt->name = soap_strdup(soap, soap->tag);
+    elt->prnt = soap->dom;
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->type = 0;
+    elt->node = NULL;
+    elt->head = lead;
+    elt->tail = NULL;
+    elt->soap = soap;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+    att = &elt->atts;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+    tp->visible = 0;
+  while ((int)c != EOF && c != '>' && c != '/')
+  { s = soap->tmpbuf;
+    i = sizeof(soap->tmpbuf);
+    while (c != '=' && c != '>' && c != '/' && soap_notblank(c))
+    { if (--i > 0)
+        *s++ = (char)c;
+      c = soap_get1(soap);
+    }
+    *s = '\0';
+    if (i == sizeof(soap->tmpbuf))
+      return soap->error = SOAP_SYNTAX_ERROR;
+#ifdef WITH_DOM
+    /* add attribute name to dom */
+    if (att)
+    { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+       if (!*att)
+         return soap->error = SOAP_EOM;
+       (*att)->next = NULL;
+       (*att)->nstr = NULL;
+       (*att)->name = soap_strdup(soap, soap->tmpbuf);
+       (*att)->data = NULL;
+       (*att)->wide = NULL;
+       (*att)->soap = soap;
+    }
+#endif
+    if (!strncmp(soap->tmpbuf, "xmlns", 5))
+    { if (soap->tmpbuf[5] == ':')
+      { soap->tmpbuf[5] = '\0';
+        t = soap->tmpbuf + 6;
+      }
+      else if (soap->tmpbuf[5])
+        t = NULL;
+      else
+        t = SOAP_STR_EOS;
+    }
+    else
+      t = NULL;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (!SOAP_STRCMP(tp->name, soap->tmpbuf))
+        break;
+    }
+    if (!tp)
+    { tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(soap->tmpbuf));
+      if (!tp)
+        return soap->error = SOAP_EOM;
+      strcpy(tp->name, soap->tmpbuf);
+      tp->value = NULL;
+      tp->size = 0;
+      tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    while (soap_blank(c))
+      c = soap_get1(soap);
+    if (c == '=')
+    { do c = soap_getutf8(soap);
+      while (soap_blank(c));
+      if (c != SOAP_QT && c != SOAP_AP)
+      { soap_unget(soap, c);
+        c = ' '; /* blank delimiter */
+      }
+      if (soap_getattrval(soap, tp->value, tp->size, c))
+      {
+#ifdef WITH_FAST
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+	if (soap_store_lab(soap, tp->value, tp->size))
+	  return soap->error;
+	if (tp->value)
+	  SOAP_FREE(soap, tp->value);
+	for (;;)
+	{ if (soap_getattrval(soap, soap->labbuf + soap->labidx, soap->lablen - soap->labidx, c))
+	  { if (soap->error != SOAP_EOM)
+	      return soap->error;
+            soap->error = SOAP_OK;
+	    soap->labidx = soap->lablen;
+	    if (soap_append_lab(soap, NULL, 0))
+	      return soap->error;
+	  }
+	  else
+	    break;
+	}
+	if (soap->labidx)
+          tp->size = soap->lablen;
+	else
+	{ tp->size = strlen(soap->labbuf) + 1;
+          if (tp->size < SOAP_LABLEN)
+	    tp->size = SOAP_LABLEN;
+        }
+	if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+	  return soap->error = SOAP_EOM;
+        strcpy(tp->value, soap->labbuf);
+#else
+	size_t n;
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+        if (soap_new_block(soap))
+          return soap->error;
+        for (;;)
+        { if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+            return soap->error;
+          if (soap_getattrval(soap, s, SOAP_BLKLEN, c))
+          { if (soap->error != SOAP_EOM)
+              return soap->error;
+            soap->error = SOAP_OK;
+          }
+          else
+            break;
+        }
+	n = tp->size + soap->blist->size;
+        if (!(s = (char*)SOAP_MALLOC(soap, n)))
+          return soap->error = SOAP_EOM;
+        if (tp->value)
+        { memcpy(s, tp->value, tp->size);
+          SOAP_FREE(soap, tp->value);
+        }
+        soap_save_block(soap, s + tp->size, 0);
+        tp->value = s;
+        tp->size = n;
+#endif
+      }
+      do c = soap_get1(soap);
+      while (soap_blank(c));
+      tp->visible = 2; /* seen this attribute w/ value */
+#ifdef WITH_DOM
+      if (att)
+        (*att)->data = soap_strdup(soap, tp->value);
+#endif
+    }
+    else
+      tp->visible = 1; /* seen this attribute w/o value */
+#ifdef WITH_DOM
+    if (att)
+      att = &(*att)->next;
+#endif
+    if (t && tp->value)
+    { if (soap_push_namespace(soap, t, tp->value))
+        return soap->error;
+      tp->visible = 0;
+    }
+  }
+#ifdef WITH_DOM
+  if (att)
+  { soap->dom->nstr = soap_current_namespace(soap, soap->tag);
+    for (att = &soap->dom->atts; *att; att = &(*att)->next)
+      (*att)->nstr = soap_current_namespace(soap, (*att)->name);
+  }
+#endif
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  if (!(soap->body = (c != '/')))
+    do c = soap_get1(soap);
+    while (soap_blank(c));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { if (!soap->body && soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible && tp->value)
+    { if (!strcmp(tp->name, "id"))
+      { *soap->id = '#';
+        strncpy(soap->id + 1, tp->value, sizeof(soap->id) - 2);
+        soap->id[sizeof(soap->id)-1] = '\0';
+      }
+      else if (!strcmp(tp->name, "href"))
+      { strncpy(soap->href, tp->value, sizeof(soap->href) - 1);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if ((soap->version == 2 || (soap->mode & SOAP_XML_GRAPH)) && !strcmp(tp->name, "ref"))
+      { *soap->href = '#';
+        strncpy(soap->href + 1, tp->value, sizeof(soap->href) - 2);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if (!soap_match_tag(soap, tp->name, "xsi:type"))
+      { strncpy(soap->type, tp->value, sizeof(soap->type) - 1);
+        soap->type[sizeof(soap->type)-1] = '\0';
+      }
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arrayType"))
+      { s = soap_strrchr(tp->value, '[');
+        if (s && (size_t)(s - tp->value) < sizeof(soap->arrayType))
+        { strncpy(soap->arrayType, tp->value, s - tp->value);
+          soap->arrayType[s - tp->value] = '\0';
+          strncpy(soap->arraySize, s, sizeof(soap->arraySize) - 1);
+        }
+        else
+          strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+        soap->arraySize[sizeof(soap->arrayType)-1] = '\0';
+        soap->arrayType[sizeof(soap->arrayType)-1] = '\0';
+      }
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:itemType"))
+        strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arraySize"))
+        strncpy(soap->arraySize, tp->value, sizeof(soap->arraySize) - 1);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:offset"))
+        strncpy(soap->arrayOffset, tp->value, sizeof(soap->arrayOffset));
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:position"))
+        soap->position = soap_getposition(tp->value, soap->positions);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:root"))
+        soap->root = ((!strcmp(tp->value, "1") || !strcmp(tp->value, "true")));
+      else if ((soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENV:actor"))
+            || (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENV:role")))
+      { if ((!soap->actor || strcmp(soap->actor, tp->value))
+         && strcmp(tp->value, "http://schemas.xmlsoap.org/soap/actor/next")
+         && strcmp(tp->value, "http://www.w3.org/2003/05/soap-envelope/role/next"))
+          soap->other = 1;
+      }
+      else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:mustUnderstand")
+            && (!strcmp(tp->value, "1") || !strcmp(tp->value, "true")))
+        soap->mustUnderstand = 1;
+      else if ((!soap_match_tag(soap, tp->name, "xsi:null")
+             || !soap_match_tag(soap, tp->name, "xsi:nil"))
+            && (!strcmp(tp->value, "1")
+             || !strcmp(tp->value, "true")))
+        soap->null = 1;
+    }
+  }
+  return soap->error = SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_retry(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_revert(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_revert(struct soap *soap)
+{ if (!soap->peeked)
+  { soap->peeked = 1;
+    if (soap->body)
+      soap->level--;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reverting last element (level=%u)\n", soap->level));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_string_out(struct soap *soap, const char *s, int flag)
+{ register const char *t;
+  register soap_wchar c;
+  register soap_wchar mask = 0xFFFFFF80UL;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_strdup(soap, s);
+    return SOAP_OK;
+  }
+#endif
+  if (soap->mode & SOAP_C_UTFSTRING)
+    mask = 0;
+  t = s;
+  while ((c = *t++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#x9;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xA;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 13:
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xD;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '&':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&amp;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '<':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&lt;", 4))
+        return soap->error;
+      s = t;
+      break;
+    case '>':
+      if (!flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&gt;", 4))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case '"':
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&quot;", 6))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    default:
+#ifndef WITH_LEANER
+#ifdef HAVE_MBTOWC
+      if (soap->mode & SOAP_C_MBSTRING)
+      { wchar_t wc;
+        register int m = mbtowc(&wc, t - 1, MB_CUR_MAX);
+        if (m > 0 && wc != c)
+        { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, wc))
+            return soap->error;
+	  s = t += m - 1;
+	  continue;
+        }
+      }
+#endif
+#endif
+      if (c & mask)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, (unsigned char)c))
+          return soap->error;
+        s = t;
+      }
+    }
+  }
+  return soap_send_raw(soap, s, t - s - 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_string_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ register char *s;
+  char *t = NULL;
+  register size_t i;
+  register long l = 0;
+  register int n = 0;
+  register int m = 0;
+  register soap_wchar c;
+#if !defined(WITH_LEANER) && defined(HAVE_WCTOMB)
+  char buf[MB_LEN_MAX > 8 ? MB_LEN_MAX : 8];
+#else
+  char buf[8];
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+#ifndef WITH_LEAN
+      t = soap->tmpbuf;
+      t[0] = '<';
+      strncpy(t + 1, soap->tag, sizeof(soap->tmpbuf) - 1);
+      strncat(t, ">", sizeof(soap->tmpbuf));
+      m = strlen(soap->tag) + 2;
+#endif
+    }
+  }
+#ifdef WITH_CDATA
+  if (!flag)
+  { register int state = 0;
+#ifdef WITH_FAST
+    soap->labidx = 0;			/* use look-aside buffer */
+#else
+    if (soap_new_block(soap))
+      return NULL;
+#endif
+    for (;;)
+    { 
+#ifdef WITH_FAST
+      register size_t k;
+      if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+        return NULL;
+      s = soap->labbuf + soap->labidx;	/* space to populate */
+      k = soap->lablen - soap->labidx;	/* number of bytes available */
+      soap->labidx = soap->lablen;	/* claim this space */
+#else
+      register size_t k = SOAP_BLKLEN;
+      if (!(s = (char*)soap_push_block(soap, k)))
+        return NULL;
+#endif
+      for (i = 0; i < k; i++)
+      { if (m > 0)
+        { *s++ = *t++;	/* copy multibyte characters */
+	  m--;
+          continue;
+        }
+        c = soap_getchar(soap);
+	if ((int)c == EOF)
+          goto end;
+        if (c >= 0x80 && !(soap->mode & SOAP_ENC_LATIN))
+        { soap_unget(soap, c);
+	  c = soap_getutf8(soap);
+	  if (soap->mode & SOAP_C_UTFSTRING)
+          { if ((c & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+            { c &= 0x7FFFFFFF;
+              t = buf;
+              if (c < 0x0800)
+                *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+              else
+              { if (c < 0x010000)
+                  *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+                else
+                { if (c < 0x200000)
+                    *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+                  else
+                  { if (c < 0x04000000)
+                      *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                    else
+                    { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                      *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                    }
+                    *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+                  }     
+                  *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+              }
+              *t++ = (char)(0x80 | (c & 0x3F));
+	      m = (int)(t - buf) - 1;
+              t = buf;
+              *s++ = *t++;
+              continue;
+	    }
+          }
+        }
+	switch (state)
+        { case 1:
+            if (c == ']')
+	      state = 4;
+	    *s++ = c;
+	    continue;
+	  case 2:
+	    if (c == '-')
+              state = 6;
+	    *s++ = c;
+	    continue;
+	  case 3:
+	    if (c == '?')
+	      state = 8;
+	    *s++ = c;
+	    continue;
+          /* CDATA */
+	  case 4:
+	    if (c == ']')
+              state = 5;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+	  case 5:
+	    if (c == '>')
+	      state = 0;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+          /* comment */
+          case 6:
+            if (c == '-')
+	      state = 7;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          case 7:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          /* PI */
+	  case 8:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 3;
+	    *s++ = c;
+	    continue;
+        }
+        switch (c)
+        {
+        case '/':
+          if (n > 0)
+          { c = soap_getchar(soap);
+            if (c == '>')
+              n--;
+            soap_unget(soap, c);
+          }
+          *s++ = '/';
+          break;
+        case '<':
+	  c = soap_getchar(soap);
+	  if (c == '/')
+	  { if (n == 0)
+	    { c = SOAP_TT;
+	      goto end;
+	    }
+	    n--;
+	  }
+	  else if (c == '!')
+	  { c = soap_getchar(soap);
+	    if (c == '[')
+            { do c = soap_getchar(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                 goto end;
+	      t = (char*)"![CDATA[";
+	      m = 8;
+	      state = 1;
+	    }
+            else if (c == '-')
+	    { if ((c = soap_getchar(soap)) == '-')
+	        state = 2;
+	      t = (char*)"!-";
+	      m = 2;
+	      soap_unget(soap, c);
+	    }
+	    else
+	    { t = (char*)"!";
+	      m = 1;
+	      soap_unget(soap, c);
+	    }
+	    *s++ = '<';
+	    break;
+	  }
+	  else if (c == '?')
+	    state = 3;
+	  else
+	    n++;
+          soap_unget(soap, c);
+          *s++ = '<';
+          break;
+        case '>':
+          *s++ = '>';
+          break;
+        case '"':
+          *s++ = '"';
+          break;
+        default:
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+          if (soap->mode & SOAP_C_MBSTRING)
+          { m = wctomb(buf, c & 0x7FFFFFFF);
+            if (m >= 1 && m <= (int)MB_CUR_MAX)
+            { t = buf;
+              *s++ = *t++;
+              m--;
+            }
+            else
+            { *s++ = SOAP_UNKNOWN_CHAR;
+	      m = 0;
+	    }
+          }
+          else
+#endif
+#endif
+            *s++ = (char)(c & 0xFF);
+        }
+	l++;
+        if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+        { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+          soap->error = SOAP_LENGTH;
+          return NULL;
+        }
+      }
+    }
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;			/* use look-aside buffer */
+#else
+  if (soap_new_block(soap))
+    return NULL;
+#endif
+  for (;;)
+  { 
+#ifdef WITH_FAST
+    register size_t k;
+    if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+      return NULL;
+    s = soap->labbuf + soap->labidx;	/* space to populate */
+    k = soap->lablen - soap->labidx;	/* number of bytes available */
+    soap->labidx = soap->lablen;	/* claim this space */
+#else
+    register size_t k = SOAP_BLKLEN;
+    if (!(s = (char*)soap_push_block(soap, k)))
+      return NULL;
+#endif
+    for (i = 0; i < k; i++)
+    { if (m > 0)
+      { *s++ = *t++;	/* copy multibyte characters */
+        m--;
+        continue;
+      }
+      if (soap->mode & SOAP_C_UTFSTRING)
+      { if (((c = soap_get(soap)) & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+        { c &= 0x7FFFFFFF;
+          t = buf;
+          if (c < 0x0800)
+            *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+          else
+          { if (c < 0x010000)
+              *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+            else
+            { if (c < 0x200000)
+                *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+              else
+              { if (c < 0x04000000)
+                  *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                else
+                { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                  *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+              }     
+              *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+            }
+            *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+          }
+          *t++ = (char)(0x80 | (c & 0x3F));
+	  m = (int)(t - buf) - 1;
+          t = buf;
+          *s++ = *t++;
+          continue;
+        }
+      }
+      else
+        c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        t = (char*)"/";
+	m = 1;
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_get(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<' | 0x80000000:
+        if (flag)
+          *s++ = '<';
+        else
+        { *s++ = '&';
+          t = (char*)"lt;";
+	  m = 3;
+        }
+        break;
+      case '>' | 0x80000000:
+        if (flag)
+          *s++ = '>';
+        else
+        { *s++ = '&';
+          t = (char*)"gt;";
+	  m = 3;
+        }
+        break;
+      case '&' | 0x80000000:
+        if (flag)
+          *s++ = '&';
+        else
+        { *s++ = '&';
+          t = (char*)"amp;";
+	  m = 4;
+        }
+        break;
+      case '"' | 0x80000000:
+        if (flag)
+          *s++ = '"';
+        else
+        { *s++ = '&';
+          t = (char*)"quot;";
+	  m = 5;
+        }
+        break;
+      case '\'' | 0x80000000:
+        if (flag)
+          *s++ = '\'';
+        else
+        { *s++ = '&';
+          t = (char*)"apos;";
+	  m = 5;
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+        if (soap->mode & SOAP_C_MBSTRING)
+        { m = wctomb(buf, c & 0x7FFFFFFF);
+          if (m >= 1 && m <= (int)MB_CUR_MAX)
+          { t = buf;
+            *s++ = *t++;
+            m--;
+          }
+          else
+          { *s++ = SOAP_UNKNOWN_CHAR;
+	    m = 0;
+	  }
+        }
+        else
+#endif
+#endif
+          *s++ = (char)(c & 0xFF);
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+#ifdef WITH_FAST
+  t = soap_strdup(soap, soap->labbuf);
+#else
+  soap_size_block(soap, i+1);
+  t = soap_save_block(soap, NULL, 0);
+#endif
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (flag == 3)
+      soap->dom->tail = t;
+    else
+      soap->dom->data = t;
+  }
+#endif
+  if (flag == 2)
+    if (soap_s2QName(soap, t, &t))
+      return NULL;
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_wstring_out(struct soap *soap, const wchar_t *s, int flag)
+{ const char *t;
+  char tmp;
+  register soap_wchar c;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { wchar_t *r = (wchar_t*)s;
+    int n = 1;
+    while (*r++)
+      n++;
+    soap->dom->wide = r = (wchar_t*)soap_malloc(soap, n * sizeof(wchar_t));
+    while (n--)
+      *r++ = *s++;
+    return SOAP_OK;
+  }
+#endif
+  while ((c = *s++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+        t = "&#x9;";
+      else
+        t = "\t";
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+        t = "&#xA;";
+      else
+        t = "\n";
+      break;
+    case 13:
+      t = "&#xD;";
+      break;
+    case '&':
+      t = "&amp;";
+      break;
+    case '<':
+      t = "&lt;";
+      break;
+    case '>':
+      if (flag)
+        t = ">";
+      else
+	t = "&gt;";
+      break;
+    case '"':
+      if (flag)
+        t = "&quot;";
+      else
+        t = "\"";
+      break;
+    default:
+      if (c > 0 && c < 0x80)
+      { tmp = (char)c;
+        if (soap_send_raw(soap, &tmp, 1))
+          return soap->error;
+      }
+      else if (soap_pututf8(soap, (unsigned long)c))
+        return soap->error;
+      continue;
+    }
+    if (soap_send(soap, t))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t *
+SOAP_FMAC2
+soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ wchar_t *s;
+  register int i, n = 0;
+  register long l = 0;
+  register soap_wchar c;
+  const char *t = NULL;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading wide string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+    }
+  }
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { if (!(s = (wchar_t*)soap_push_block(soap, sizeof(wchar_t)*SOAP_BLKLEN)))
+      return NULL;
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { if (t)
+      { *s++ = (wchar_t)*t++;
+        if (!*t)
+          t = NULL;
+        continue;
+      }
+      c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        soap_unget(soap, '/');
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_getutf8(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<':
+        if (flag)
+          *s++ = (soap_wchar)'<';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "lt;";
+        }
+        break;
+      case '>':
+        if (flag)
+          *s++ = (soap_wchar)'>';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "gt;";
+        }
+        break;
+      case '"':
+        if (flag)
+          *s++ = (soap_wchar)'"';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "quot;";
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+        *s++ = (wchar_t)c & 0x7FFFFFFF;
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+  soap_size_block(soap, sizeof(wchar_t) * (i + 1));
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+  s = (wchar_t*)soap_save_block(soap, NULL, 0);
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->wide = s;
+#endif
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_int2s(struct soap *soap, int n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outint(struct soap *soap, const char *tag, int id, const int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2int(struct soap *soap, const char *s, int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (int)soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int *
+SOAP_FMAC2
+soap_inint(struct soap *soap, const char *tag, int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (int*)soap_id_enter(soap, soap->id, p, t, sizeof(int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(int), 0, NULL);
+  else if (p)
+  { if (soap_s2int(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_long2s(struct soap *soap, long n)
+{ sprintf(soap->tmpbuf, "%ld", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outlong(struct soap *soap, const char *tag, int id, const long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2long(struct soap *soap, const char *s, long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+long *
+SOAP_FMAC2
+soap_inlong(struct soap *soap, const char *tag, long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (long*)soap_id_enter(soap, soap->id, p, t, sizeof(long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(long), 0, NULL);
+  else if (p)
+  { if (soap_s2long(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_LONG642s(struct soap *soap, LONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_LONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outLONG64(struct soap *soap, const char *tag, int id, const LONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_LONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2LONG64(struct soap *soap, const char *s, LONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOLL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoll(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_LONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+LONG64 *
+SOAP_FMAC2
+soap_inLONG64(struct soap *soap, const char *tag, LONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (LONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(LONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (LONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(LONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2LONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_byte2s(struct soap *soap, char n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outbyte(struct soap *soap, const char *tag, int id, const char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2byte(struct soap *soap, const char *s, char *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -128 || n > 127)
+      soap->error = SOAP_TYPE;
+    *p = (char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_inbyte(struct soap *soap, const char *tag, char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (char*)soap_id_enter(soap, soap->id, p, t, sizeof(char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(char), 0, NULL);
+  else if (p)
+  { if (soap_s2byte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_short2s(struct soap *soap, short n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outshort(struct soap *soap, const char *tag, int id, const short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2short(struct soap *soap, const char *s, short *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -32768 || n > 32767)
+      soap->error = SOAP_TYPE;
+    *p = (short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+short *
+SOAP_FMAC2
+soap_inshort(struct soap *soap, const char *tag, short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (short*)soap_id_enter(soap, soap->id, p, t, sizeof(short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(short), 0, NULL);
+  else if (p)
+  { if (soap_s2short(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_float2s(struct soap *soap, float n)
+{ const char *s;
+  if (soap_isnan((double)n))
+    s = "NaN";
+  else if (soap_ispinff(n))
+    s = "INF";
+  else if (soap_isninff(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->float_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outfloat(struct soap *soap, const char *tag, int id, const float *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_float2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2float(struct soap *soap, const char *s, float *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = FLT_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = FLT_NAN;
+    else
+    {
+/* On some systems, strtof appears to be broken or doesn't link: use with caution */
+#if defined(HAVE_STRTOF)
+      char *r;
+      *p = strtof((char*)s, &r);
+      if (*r)
+#elif defined(HAVE_STRTOD)
+      char *r;
+      *p = (float)strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%g", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static int soap_isnumeric(struct soap *soap, const char *type)
+{ if (soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":float")
+   && soap_match_tag(soap, soap->type, ":double")
+   && soap_match_tag(soap, soap->type, ":decimal")
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return SOAP_ERR;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+float *
+SOAP_FMAC2
+soap_infloat(struct soap *soap, const char *tag, float *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (float*)soap_id_enter(soap, soap->id, p, t, sizeof(float), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (float*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(float), 0, NULL);
+  else if (p)
+  { if (soap_s2float(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_double2s(struct soap *soap, double n)
+{ const char *s;
+  if (soap_isnan(n))
+    s = "NaN";
+  else if (soap_ispinfd(n))
+    s = "INF";
+  else if (soap_isninfd(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->double_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdouble(struct soap *soap, const char *tag, int id, const double *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_double2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2double(struct soap *soap, const char *s, double *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = DBL_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = DBL_NAN;
+    else
+    {
+#ifdef HAVE_STRTOD
+      char *r;
+      *p = strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%lg", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+double *
+SOAP_FMAC2
+soap_indouble(struct soap *soap, const char *tag, double *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (double*)soap_id_enter(soap, soap->id, p, t, sizeof(double), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (double*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(double), 0, NULL);
+  else if (p)
+  { if (soap_s2double(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedByte2s(struct soap *soap, unsigned char n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedByte(struct soap *soap, const char *tag, int id, const unsigned char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedByte(struct soap *soap, const char *s, unsigned char *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 255)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned char *
+SOAP_FMAC2
+soap_inunsignedByte(struct soap *soap, const char *tag, unsigned char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned char*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned char), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedByte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedShort2s(struct soap *soap, unsigned short n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedShort(struct soap *soap, const char *tag, int id, const unsigned short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedShort(struct soap *soap, const char *s, unsigned short *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 65535)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned short *
+SOAP_FMAC2
+soap_inunsignedShort(struct soap *soap, const char *tag, unsigned short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned short*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned short), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedShort(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedInt2s(struct soap *soap, unsigned int n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedInt(struct soap *soap, const char *tag, int id, const unsigned int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedInt(struct soap *soap, const char *s, unsigned int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (unsigned int)soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned int *
+SOAP_FMAC2
+soap_inunsignedInt(struct soap *soap, const char *tag, unsigned int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned int*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned int), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedInt(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedLong2s(struct soap *soap, unsigned long n)
+{ sprintf(soap->tmpbuf, "%lu", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedLong(struct soap *soap, const char *tag, int id, const unsigned long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedLong(struct soap *soap, const char *s, unsigned long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned long *
+SOAP_FMAC2
+soap_inunsignedLong(struct soap *soap, const char *tag, unsigned long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned long*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned long), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedLong(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_ULONG642s(struct soap *soap, ULONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_ULONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outULONG64(struct soap *soap, const char *tag, int id, const ULONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_ULONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2ULONG64(struct soap *soap, const char *s, ULONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOULL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoull(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_ULONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+ULONG64 *
+SOAP_FMAC2
+soap_inULONG64(struct soap *soap, const char *tag, ULONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (ULONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(ULONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (ULONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(ULONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2ULONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2string(struct soap *soap, const char *s, char **t)
+{ *t = NULL;
+  if (s)
+  { if (!(*t = soap_strdup(soap, s)))
+      return soap->error = SOAP_EOM;
+    if (!(soap->mode & (SOAP_ENC_LATIN | SOAP_C_UTFSTRING)))
+    { /* TODO: consider truncating UTF8 to ASCII for regular XML attribute strings? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2QName(struct soap *soap, const char *s, char **t)
+{ if (s)
+  { struct soap_nlist *np;
+    const char *p;
+    if (!strncmp(s, "xml:", 4))
+    { *t = soap_strdup(soap, s);
+      return SOAP_OK;
+    }
+    np = soap->nlist;
+    p = strchr(s, ':');
+    if (p)
+    { register int n = p - s;
+      while (np && (strncmp(np->id, s, n) || np->id[n]))
+        np = np->next;
+      p++;
+    }
+    else
+    { while (np && *np->id)
+        np = np->next;
+      p = s;
+    }
+    if (np)
+    { if (np->index >= 0 && soap->local_namespaces)
+      { register const char *q = soap->local_namespaces[np->index].id;
+        if (q)
+        { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(q) + 2)))
+            sprintf(*t, "%s:%s", q, p);
+          return SOAP_OK;
+        }
+      }
+      if (np->ns)
+      { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(np->ns) + 4)))
+          sprintf(*t, "\"%s\":%s", np->ns, p);
+        return SOAP_OK;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined (index=%d, URI=%s)\n", s, np->index, np->ns?np->ns:""));
+      return soap->error = SOAP_NAMESPACE; 
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined, assuming empty namespace\n", s));
+    if ((*t = (char*)soap_malloc(soap, strlen(p) + 4)))
+      sprintf(*t, "\"\":%s", p);
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_QName2s(struct soap *soap, const char *s)
+{ struct Namespace *p;
+  char *t;
+  int n;
+  if (!s || *s != '"')
+  {
+#ifndef WITH_LEAN
+    if (s && (soap->mode & SOAP_XML_CANONICAL))
+    { t = (char*)strchr(s, ':');
+      if (t)
+        soap_utilize_ns(soap, s, t - s);
+    }
+#endif
+    return s;
+  }
+  s++;
+  if ((p = soap->local_namespaces))
+  { for (; p->id; p++)
+    { if (p->ns)
+        if (!soap_tag_cmp(s, p->ns))
+          break;
+      if (p->in)
+        if (!soap_tag_cmp(s, p->in))
+          break;
+    }
+    if (p && p->id)
+    { s = strchr(s, '"');
+      if (s)
+      { t = (char*)soap_malloc(soap, strlen(p->id) + strlen(s));
+        strcpy(t, p->id);
+	strcat(t, s + 1);
+        return t;
+      }
+    }
+  }
+  t = (char*)strchr(s, '"');
+  if (t)
+    n = t - s;
+  else
+    n = 0;
+  t = soap_strdup(soap, s);
+  t[n] = '\0';
+  sprintf(soap->tmpbuf, "xmlns:_%d", soap->idnum++);
+  soap_set_attr(soap, soap->tmpbuf, t);
+  s = strchr(s, '"');
+  if (s)
+  { t = (char*)soap_malloc(soap, strlen(soap->tmpbuf) + strlen(s) - 6);
+    strcpy(t, soap->tmpbuf + 6);
+    strcat(t, s + 1);
+  }
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2wchar(struct soap *soap, const char *s, wchar_t **t)
+{ wchar_t *r;
+  if (!s)
+    *t = NULL;
+  else
+  { *t = r = (wchar_t*)soap_malloc(soap, sizeof(wchar_t) * (strlen(s) + 1));
+    if (!r)
+      return soap->error;
+    if (soap->mode & SOAP_ENC_LATIN)
+    { while (*s)
+        *r++ = (wchar_t)*s++;
+    }
+    else
+    { /* Convert UTF8 to wchar */
+      while (*s)
+      { register soap_wchar c, c1, c2, c3, c4;
+        c = *s++;
+        if (c < 0x80)
+	  *r++ = (wchar_t)c;
+	else
+        { c1 = (soap_wchar)*s++ & 0x3F;
+          if (c < 0xE0)
+            *r++ = (wchar_t)(((soap_wchar)(c & 0x1F) << 6) | c1);
+          else
+	  { c2 = (soap_wchar)*s++ & 0x3F;
+            if (c < 0xF0)
+              *r++ = (wchar_t)(((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2);
+            else
+	    { c3 = (soap_wchar)*s++ & 0x3F;
+              if (c < 0xF8)
+                *r++ = (wchar_t)(((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3);
+              else
+	      { c4 = (soap_wchar)*s++ & 0x3F;
+                if (c < 0xFC)
+                  *r++ = (wchar_t)(((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4);
+                else
+		  *r++ = (wchar_t)(((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(*s++ & 0x3F));
+              }
+            }
+          }
+        }
+      }
+    }
+    *r = L'\0';
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_wchar2s(struct soap *soap, const wchar_t *s)
+{ register soap_wchar c;
+  register char *r, *t;
+  const wchar_t *q = s;
+  size_t n = 0;
+  while ((c = *q++))
+  { if (c > 0 && c < 0x80)
+      n++;
+    else
+      n += 6;
+  }
+  r = t = (char*)soap_malloc(soap, n + 1);
+  if (r)
+  { /* Convert wchar to UTF8 */
+    while ((c = *s++))
+    { if (c > 0 && c < 0x80)
+        *t++ = (char)c;
+      else
+      { if (c < 0x0800)
+          *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+        else
+        { if (c < 0x010000)
+            *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+          else
+          { if (c < 0x200000)
+              *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+            else
+            { if (c < 0x04000000)
+                *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+              else
+              { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+              }
+              *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+            }     
+            *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+        }
+        *t++ = (char)(0x80 | (c & 0x3F));
+      }
+    }
+    *t = '\0';
+  }
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outstring(struct soap *soap, const char *tag, int id, char *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_string_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_instring(struct soap *soap, const char *tag, char **p, const char *type, int t, int flag, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_string_in(soap, flag, minlen, maxlen);
+    if (!*p || !(char*)soap_id_enter(soap, soap->id, *p, t, sizeof(char*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (char**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(char**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwstring(struct soap *soap, const char *tag, int id, wchar_t *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_wstring_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type, int t, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_wstring_in(soap, 1, minlen, maxlen);
+    if (!*p || !(wchar_t*)soap_id_enter(soap, soap->id, *p, t, sizeof(wchar_t*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (wchar_t**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(wchar_t**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static time_t
+soap_timegm(struct tm *T)
+{
+#if defined(HAVE_TIMEGM)
+  return timegm(T);
+#else
+  time_t t, g, z;
+#ifdef HAVE_GMTIME_R
+  struct tm tm, *tmp = &tm;
+#else
+  struct tm *tmp;
+#endif
+  t = mktime(T);
+  if (t == -1)
+    return -1;
+#ifdef HAVE_GMTIME_R
+  gmtime_r(&t, tmp);
+#else
+  tmp = gmtime(&t);
+#endif
+  tmp->tm_isdst = 0;
+  g = mktime(tmp);
+  if (g == -1)
+    return -1;
+  z = g - t;
+  return t - z;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_dateTime2s(struct soap *soap, time_t n)
+{ struct tm T, *pT = &T;
+#if defined(HAVE_GMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PGMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_PGMTIME)
+  if (gmtime(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GMTIME)
+  if ((pT = gmtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GETTIMEOFDAY)
+  struct timezone tz;
+  memset((void*)&tz, 0, sizeof(tz));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+#endif
+#elif defined(HAVE_FTIME)
+  struct timeb t;
+  memset((void*)&t, 0, sizeof(t));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+  /* The following defines were added for VxWorks*/
+# elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf+strlen(soap->tmpbuf), "%+03d:%02d", t.timezone/60, abs(t.timezone)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+# endif
+#elif defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#else
+  if ((pT = localtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#endif
+  else
+    strcpy(soap->tmpbuf, "1969-12-31T23:59:59Z");
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdateTime(struct soap *soap, const char *tag, int id, const time_t *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_dateTime2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2dateTime(struct soap *soap, const char *s, time_t *p)
+{ if (s)
+  { struct tm T;
+    char zone[16];
+    const char *t;
+    memset((void*)&T, 0, sizeof(T));
+    zone[sizeof(zone)-1] = '\0';
+    if (strchr(s, '-'))
+      t = "%d-%d-%dT%d:%d:%d%15s";
+    else if (strchr(s, ':'))
+      t = "%4d%2d%2dT%d:%d:%d%15s";
+    else /* parse non-XSD-standard alternative ISO 8601 format */
+      t = "%4d%2d%2dT%2d%2d%2d%15s";
+    sscanf(s, t, &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, zone);
+    if (T.tm_year == 1)
+      T.tm_year = 70;
+    else
+      T.tm_year -= 1900;
+    T.tm_mon--;
+    if (*zone)
+    { if (*zone == '.')
+      { for (s = zone + 1; *s; s++)
+          if (*s < '0' || *s > '9')
+            break;
+      }
+      else
+        s = zone;
+      if (*s == '+' || *s == '-')
+      { int h = 0, m = 0;
+        if (s[3] == ':')
+	{ sscanf(s, "%d:%d", &h, &m);
+	  if (h < 0)
+	    m = -m;
+	}
+	else
+	{ m = (int)atol(s);
+	  h = m / 100;
+	  m = m % 100;
+	}
+        T.tm_hour -= h;
+        T.tm_min -= m;
+      }
+      T.tm_isdst = 0;
+      *p = soap_timegm(&T);
+    }
+    else
+    { T.tm_isdst = -1;
+      *p = mktime(&T); /* no time zone: suppose it is localtime? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+time_t *
+SOAP_FMAC2
+soap_indateTime(struct soap *soap, const char *tag, time_t *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":dateTime"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (time_t*)soap_id_enter(soap, soap->id, p, t, sizeof(time_t), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (time_t*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(time_t), 0, NULL);
+  else if (p)
+  { if (soap_s2dateTime(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outliteral(struct soap *soap, const char *tag, char *const*p)
+{ int i;
+  const char *t = NULL;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p && *p)
+  { if (soap_send(soap, *p))
+      return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_inliteral(struct soap *soap, const char *tag, char **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_string_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwliteral(struct soap *soap, const char *tag, wchar_t *const*p)
+{ int i;
+  const char *t = NULL;
+  wchar_t c;
+  const wchar_t *s;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p)
+  { s = *p;
+    while ((c = *s++))
+      if (soap_pututf8(soap, (unsigned char)c))
+        return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwliteral(struct soap *soap, const char *tag, wchar_t **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_wstring_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_token(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF || soap_blank(c))
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_value(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  for (s--; i > 0; i--, s--)
+    if (!soap_blank(*s))
+      break;
+  s[1] = '\0';
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->data = soap_strdup(soap, soap->tmpbuf);
+#endif
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEANER) || !defined(WITH_NOHTTP)
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getline(struct soap *soap, char *s, int len)
+{ int i = len;
+  soap_wchar c = 0;
+  for (;;)
+  { while (--i > 0)
+    { c = soap_getchar(soap);
+      if (c == '\r' || c == '\n')
+        break;
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+    if (c != '\n')
+      c = soap_getchar(soap); /* got \r, now get \n */
+    if (c == '\n')
+    { *s = '\0';
+      if (i+1 == len) /* empty line: end of HTTP/MIME header */
+        break;
+      c = soap_unget(soap, soap_getchar(soap));
+      if (c != ' ' && c != '\t') /* HTTP line continuation? */
+        break;
+    }
+    else if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static size_t
+soap_count_attachments(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  register struct soap_multipart *content;
+  register size_t count = soap->count;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the message size with attachments, current count=%lu\n", (unsigned long)count));
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of DIME attachments\n"));
+    for (content = soap->dime.first; content; content = content->next)
+    { count += 12 + ((content->size+3)&(~3));
+      if (content->id)
+        count += ((strlen(content->id)+3)&(~3));
+      if (content->type)
+        count += ((strlen(content->type)+3)&(~3));
+      if (content->options)
+        count += ((((unsigned char)content->options[2] << 8) | ((unsigned char)content->options[3]))+7)&(~3);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of DIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary)
+  { register size_t n = strlen(soap->mime.boundary);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of MIME attachments\n"));
+    for (content = soap->mime.first; content; content = content->next)
+    { register const char *s;
+      /* count \r\n--boundary\r\n */
+      count += 6 + n;
+      /* count Content-Type: ...\r\n */
+      if (content->type)
+        count += 16 + strlen(content->type);
+      /* count Content-Transfer-Encoding: ...\r\n */
+      s = soap_str_code(mime_codes, content->encoding);
+      if (s)
+        count += 29 + strlen(s);
+      /* count Content-ID: ...\r\n */
+      if (content->id)
+        count += 14 + strlen(content->id);
+      /* count Content-Location: ...\r\n */
+      if (content->location)
+        count += 20 + strlen(content->location);
+      /* count Content-Description: ...\r\n */
+      if (content->description)
+        count += 23 + strlen(content->location);
+      /* count \r\n...content */
+      count += 2 + content->size;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of MIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+    /* count \r\n--boundary-- */
+    count += 6 + n;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New count is %lu bytes\n", (unsigned long)count));
+  return count;
+#else
+  return soap->count;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_putdimefield(struct soap *soap, const char *s, size_t n)
+{ if (soap_send_raw(soap, s, n))
+    return soap->error;
+  return soap_send_raw(soap, SOAP_STR_PADDING, -(long)n&3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_dime_option(struct soap *soap, unsigned short optype, const char *option)
+{ size_t n;
+  char *s = NULL;
+  if (option)
+  { n = strlen(option);
+    s = (char*)soap_malloc(soap, n + 5);
+    if (s)
+    { s[0] = optype >> 8;
+      s[1] = optype & 0xFF;
+      s[2] = n >> 8;
+      s[3] = n & 0xFF;
+      strcpy(s + 4, option);
+    }
+  }
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdimehdr(struct soap *soap)
+{ unsigned char tmp[12];
+  size_t optlen = 0, idlen = 0, typelen = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Put DIME header id='%s'\n", soap->dime.id?soap->dime.id:""));
+  if (soap->dime.options)
+    optlen = (((unsigned char)soap->dime.options[2] << 8) | ((unsigned char)soap->dime.options[3])) + 4;
+  if (soap->dime.id)
+    idlen = strlen(soap->dime.id);
+  if (soap->dime.type)
+    typelen = strlen(soap->dime.type);
+  tmp[0] = SOAP_DIME_VERSION | (soap->dime.flags & 0x7);
+  tmp[1] = soap->dime.flags & 0xF0;
+  tmp[2] = optlen >> 8;
+  tmp[3] = optlen & 0xFF;
+  tmp[4] = idlen >> 8;
+  tmp[5] = idlen & 0xFF;
+  tmp[6] = typelen >> 8;
+  tmp[7] = typelen & 0xFF;
+  tmp[8] = soap->dime.size >> 24;
+  tmp[9] = (soap->dime.size >> 16) & 0xFF;
+  tmp[10] = (soap->dime.size >> 8) & 0xFF;
+  tmp[11] = soap->dime.size & 0xFF;
+  if (soap_send_raw(soap, (char*)tmp, 12)
+   || soap_putdimefield(soap, soap->dime.options, optlen)
+   || soap_putdimefield(soap, soap->dime.id, idlen)
+   || soap_putdimefield(soap, soap->dime.type, typelen))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return SOAP_OK;
+  for (content = soap->dime.first; content; content = content->next)
+  { void *handle;
+    soap->dime.size = content->size;
+    soap->dime.id = content->id;
+    soap->dime.type = content->type;
+    soap->dime.options = content->options;
+    soap->dime.flags = SOAP_DIME_VERSION | SOAP_DIME_MEDIA;
+    if (soap->fdimereadopen && ((handle = soap->fdimereadopen(soap, (void*)content->ptr, content->id, content->type, content->options)) || soap->error))
+    { size_t size = content->size;
+      if (!handle)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadopen failed\n"));
+        return soap->error;
+      }
+      if (!content->size && ((soap->mode & SOAP_ENC_XML) || (soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_IO) == SOAP_IO_STORE))
+      { size_t chunksize = sizeof(soap->tmpbuf);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked streaming DIME\n"));
+        do 
+        { size = soap->fdimeread(soap, handle, soap->tmpbuf, chunksize);
+          DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread returned %lu bytes\n", (unsigned long)size));
+          if (size < chunksize)
+ 	  { soap->dime.flags &= ~SOAP_DIME_CF;
+            if (!content->next)
+              soap->dime.flags |= SOAP_DIME_ME;
+	  }
+          else
+            soap->dime.flags |= SOAP_DIME_CF;
+	  soap->dime.size = size;
+          if (soap_putdimehdr(soap)
+	   || soap_putdimefield(soap, soap->tmpbuf, size))
+            break;
+          if (soap->dime.id)
+ 	  { soap->dime.flags &= ~(SOAP_DIME_MB | SOAP_DIME_MEDIA);
+            soap->dime.id = NULL;
+            soap->dime.type = NULL;
+            soap->dime.options = NULL;
+          }  
+        } while (size >= chunksize);
+      }
+      else
+      { if (!content->next)
+          soap->dime.flags |= SOAP_DIME_ME;
+        if (soap_putdimehdr(soap))
+          return soap->error;
+        do
+        { size_t bufsize;
+	  if (size < sizeof(soap->tmpbuf))
+            bufsize = size;
+          else
+            bufsize = sizeof(soap->tmpbuf);
+          if (!(bufsize = soap->fdimeread(soap, handle, soap->tmpbuf, bufsize)))
+          { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread failed: insufficient data (%lu bytes remaining from %lu bytes)\n", (unsigned long)size, (unsigned long)soap->dime.size));
+            soap->error = SOAP_EOF;
+	    break;
+          }
+          if (soap_send_raw(soap, soap->tmpbuf, bufsize))
+            break;
+          size -= bufsize;
+        } while (size);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+        soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+      if (soap->fdimereadclose)
+        soap->fdimereadclose(soap, handle);
+    }
+    else
+    { if (!content->next)
+        soap->dime.flags |= SOAP_DIME_ME;
+      if (soap_putdimehdr(soap)
+       || soap_putdimefield(soap, (char*)content->ptr, content->size))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static char *
+soap_getdimefield(struct soap *soap, size_t n)
+{ register soap_wchar c;
+  register int i;
+  register char *s;
+  char *p = NULL;
+  if (n)
+  { p = (char*)soap_malloc(soap, n + 1);
+    if (p)
+    { s = p;
+      for (i = n; i > 0; i--)
+      { if ((int)(c = soap_get1(soap)) == EOF)
+        { soap->error = SOAP_EOF;
+          return NULL;
+        }
+        *s++ = (char)c;
+      }
+      *s = '\0';
+      if ((soap->error = soap_move(soap, -(long)n&3)))
+        return NULL;
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdimehdr(struct soap *soap)
+{ register soap_wchar c;
+  register char *s;
+  register int i;
+  unsigned char tmp[12];
+  size_t optlen, idlen, typelen;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return soap->error = SOAP_DIME_END;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME header\n"));
+  if (soap->dime.buflen || soap->dime.chunksize)
+  { if (soap_move(soap, (long)(soap->dime.size - soap_tell(soap))))
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, soap_getchar(soap)); /* skip padding and get hdr */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... From chunked\n"));
+    return SOAP_OK;
+  }
+  s = (char*)tmp;
+  for (i = 12; i > 0; i--)
+  { if ((int)(c = soap_getchar(soap)) == EOF)
+      return soap->error = SOAP_EOF;
+    *s++ = (char)c;
+  }
+  if ((tmp[0] & 0xF8) != SOAP_DIME_VERSION)
+    return soap->error = SOAP_DIME_MISMATCH;
+  soap->dime.flags = (tmp[0] & 0x7) | (tmp[1] & 0xF0);
+  optlen = (tmp[2] << 8) | tmp[3];
+  idlen = (tmp[4] << 8) | tmp[5];
+  typelen = (tmp[6] << 8) | tmp[7];
+  soap->dime.size = (tmp[8] << 24) | (tmp[9] << 16) | (tmp[10] << 8) | tmp[11];
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME size=%lu flags=0x%X\n", (unsigned long)soap->dime.size, soap->dime.flags));
+  if (!(soap->dime.options = soap_getdimefield(soap, optlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.id = soap_getdimefield(soap, idlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.type = soap_getdimefield(soap, typelen)) && soap->error)
+    return soap->error;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME id=%s, type=%s, options=%s\n", soap->dime.id?soap->dime.id:"", soap->dime.type?soap->dime.type:"", soap->dime.options?soap->dime.options+4:""));
+  if (soap->dime.flags & SOAP_DIME_ME)
+    soap->mode &= ~SOAP_ENC_DIME;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdime(struct soap *soap)
+{ while (soap->dime.flags & SOAP_DIME_CF)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap_move(soap, soap->dime.size))
+      return soap->error = SOAP_EOF;
+  }
+  if (soap_move(soap, ((soap->dime.size+3)&(~3))-soap_tell(soap)))
+    return soap->error = SOAP_EOF;
+  for (;;)
+  { register struct soap_multipart *content;
+    if (soap_getdimehdr(soap))
+      break;
+    if (soap->fdimewriteopen && ((soap->dime.ptr = (char*)soap->fdimewriteopen(soap, soap->dime.id, soap->dime.type, soap->dime.options)) || soap->error))
+    { const char *id, *type, *options;
+      size_t size, n;
+      if (!soap->dime.ptr)
+        return soap->error;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      for (;;)
+      { size = soap->dime.size;
+        for (;;)
+        { n = soap->buflen - soap->bufidx;
+          if (size < n)
+            n = size;
+          if ((soap->error = soap->fdimewrite(soap, (void*)soap->dime.ptr, soap->buf + soap->bufidx, n)))
+            break;
+	  size -= n;
+	  if (!size)
+	  { soap->bufidx += n;
+	    break;
+	  }
+	  if (soap_recv(soap))
+          { soap->error = SOAP_EOF;
+	    goto end;
+          }
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+        { soap->error = SOAP_EOF;
+	  break;
+        }
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          break;
+      }
+end:
+      if (soap->fdimewriteclose)
+        soap->fdimewriteclose(soap, (void*)soap->dime.ptr);
+      soap->dime.size = 0;
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else if (soap->dime.flags & SOAP_DIME_CF)
+    { const char *id, *type, *options;
+      register soap_wchar c;
+      register char *s;
+      register int i;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      if (soap_new_block(soap))
+        return SOAP_EOM;
+      for (;;)
+      { s = (char*)soap_push_block(soap, soap->dime.size);
+        if (!s)
+          return soap->error = SOAP_EOM;
+        for (i = soap->dime.size; i > 0; i--)
+        { if ((int)(c = soap_get1(soap)) == EOF)
+            return soap->error = SOAP_EOF;
+          *s++ = (char)c;
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+          return soap->error = SOAP_EOF;
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          return soap->error;
+      }
+      soap->dime.size = soap->blist->size++; /* allocate one more for '\0' */
+      if (!(soap->dime.ptr = soap_save_block(soap, NULL, 0)))
+        return soap->error;
+      soap->dime.ptr[soap->dime.size] = '\0'; /* force 0-terminated */
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else
+      soap->dime.ptr = soap_getdimefield(soap, soap->dime.size);
+    content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, soap->dime.ptr, soap->dime.size);
+    if (!content)
+      return soap->error = SOAP_EOM;
+    content->id = soap->dime.id;
+    content->type = soap->dime.type;
+    content->options = soap->dime.options;
+    soap_resolve_attachment(soap, content);
+    if (soap->error)
+      return soap->error;
+  }
+  if (soap->error != SOAP_DIME_END)
+    return soap->error;
+  return soap->error = SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmimehdr(struct soap *soap)
+{ struct soap_multipart *content;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  while (!*soap->msgbuf);
+  if (soap->msgbuf[0] == '-' && soap->msgbuf[1] == '-')
+  { char *s = soap->msgbuf + strlen(soap->msgbuf) - 1;
+    /* remove white space */
+    while (soap_blank(*s))
+      s--;
+    s[1] = '\0';
+    if (soap->mime.boundary)
+    { if (strcmp(soap->msgbuf + 2, soap->mime.boundary))
+        return soap->error = SOAP_MIME_ERROR;
+    }
+    else
+      soap->mime.boundary = soap_strdup(soap, soap->msgbuf + 2);
+    if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  if (soap_set_mime_attachment(soap, NULL, 0, SOAP_MIME_NONE, NULL, NULL, NULL, NULL))
+    return soap->error = SOAP_EOM;
+  content = soap->mime.last;
+  for (;;)
+  { register char *key = soap->msgbuf;
+    register char *val;
+    if (!*key)
+      break;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "MIME header: %s\n", key));
+    val = strchr(soap->msgbuf, ':');
+    if (val)
+    { *val = '\0';
+      do val++;
+      while (*val && *val <= 32);
+      if (!soap_tag_cmp(key, "Content-ID"))
+        content->id = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Location"))
+        content->location = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Disposition"))
+        content->id = soap_strdup(soap, soap_get_header_attribute(soap, val, "name"));
+      else if (!soap_tag_cmp(key, "Content-Type"))
+        content->type = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Description"))
+        content->description = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Transfer-Encoding"))
+        content->encoding = (enum soap_mime_encoding)soap_int_code(mime_codes, val, (long)SOAP_MIME_NONE);
+    }
+    if (soap_getline(soap, key, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmime(struct soap *soap)
+{ register soap_wchar c = 0;
+  if (!soap->mime.last)
+    return SOAP_OK;
+  for (;;)
+  { register size_t i, m = 0;
+    register char *s, *t = NULL;
+    struct soap_multipart *content = soap->mime.last;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Parsing MIME content id=%s type=%s\n", content->id?content->id:"", content->type?content->type:""));
+    if (soap_new_block(soap))
+      return soap->error = SOAP_EOM;
+    for (;;)
+    { register short flag = 0;
+      if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+        return soap->error = SOAP_EOM;
+      for (i = 0; i < SOAP_BLKLEN; i++)
+      { if (m > 0)
+        { *s++ = *t++;
+	  m--;
+	}
+	else
+        { if (!flag)
+	  { c = soap_get1(soap);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	  }
+	  if (flag || c == '\r')
+	  { t = soap->tmpbuf;
+	    memset(t, 0, sizeof(soap->tmpbuf));
+            strcpy(t, "\n--");
+            if (soap->mime.boundary)
+	      strncat(t, soap->mime.boundary, sizeof(soap->tmpbuf)-4);
+	    do c = soap_getchar(soap);
+	    while (c == *t++);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	    if (!*--t)
+	      goto end;
+	    *t = (char)c;
+	    flag = (c == '\r');
+	    m = t - soap->tmpbuf + 1 - flag;
+	    t = soap->tmpbuf;
+	    c = '\r';
+	  }
+	  *s++ = (char)c;
+        }
+      }
+    }
+end:
+    *s = '\0'; /* force 0-terminated */
+    content->size = soap_size_block(soap, i+1)-1;
+    content->ptr = soap_save_block(soap, NULL, 0);
+    soap_resolve_attachment(soap, content);
+    if (c == '-' && soap_getchar(soap) == '-')
+      break;
+    while (c != '\r' && (int)c != EOF && soap_blank(c))
+      c = soap_getchar(soap);
+    if (c != '\r' || soap_getchar(soap) != '\n')
+      return soap->error = SOAP_MIME_ERROR;
+    if (soap_getmimehdr(soap))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_match_cid(struct soap *soap, const char *s, const char *t)
+{ register size_t n;
+  if (!s)
+    return 1;
+  if (!strcmp(s, t))
+    return 0;
+  if (!strncmp(s, "cid:", 4))
+    s += 4;
+  n = strlen(t);
+  if (*t == '<')
+  { t++;
+    n -= 2;
+  }
+  if (!strncmp(s, t, n) && !s[n])
+    return 0;
+  soap_decode(soap->tmpbuf, sizeof(soap->tmpbuf), s, SOAP_STR_EOS);
+  if (!strncmp(soap->tmpbuf, t, n) && !soap->tmpbuf[n])
+    return 0;
+  return 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_resolve_attachment(struct soap *soap, struct soap_multipart *content)
+{ if (content->id)
+  { register struct soap_xlist **xp = &soap->xlist;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving attachment data for id=%s\n", content->id));
+    while (*xp)
+    { register struct soap_xlist *xq = *xp;
+      if (!soap_match_cid(soap, xq->id, content->id))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Found matching attachment %s for content id=%s\n", xq->id, content->id));
+	*xp = xq->next;
+        *xq->ptr = (unsigned char*)content->ptr;
+        *xq->size = (int)content->size;
+        *xq->type = (char*)content->type;
+	if (content->options)
+          *xq->options = (char*)content->options;
+        else
+          *xq->options = (char*)content->description;
+	SOAP_FREE(soap, xq);
+      }
+      else
+        xp = &(*xp)->next;
+    }
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmimehdr(struct soap *soap, struct soap_multipart *content)
+{ const char *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "MIME attachment type=%s\n", content->type?content->type:""));
+  if (soap_send3(soap, "\r\n--", soap->mime.boundary, "\r\n"))
+    return soap->error;
+  if (content->type && soap_send3(soap, "Content-Type: ", content->type, "\r\n"))
+    return soap->error;
+  s = soap_str_code(mime_codes, content->encoding);
+  if (s && soap_send3(soap, "Content-Transfer-Encoding: ", s, "\r\n"))
+    return soap->error;
+  if (content->id && soap_send3(soap, "Content-ID: ", content->id, "\r\n"))
+    return soap->error;
+  if (content->location && soap_send3(soap, "Content-Location: ", content->location, "\r\n"))
+    return soap->error;
+  if (content->description && soap_send3(soap, "Content-Description: ", content->description, "\r\n"))
+    return soap->error;
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_MIME) || !soap->mime.boundary)
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending MIME attachments\n"));
+  for (content = soap->mime.first; content; content = content->next)
+    if (soap_putmimehdr(soap, content)
+     || soap_send_raw(soap, content->ptr, content->size))
+      return soap->error;
+  return soap_send3(soap, "\r\n--", soap->mime.boundary, "--");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_dime(struct soap *soap)
+{ soap->omode |= SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_mime(struct soap *soap, const char *boundary, const char *start)
+{ soap->omode |= SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = soap_strdup(soap, boundary);
+  soap->mime.start = soap_strdup(soap, start);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_dime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_mime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart*
+soap_new_multipart(struct soap *soap, struct soap_multipart **first, struct soap_multipart **last, char *ptr, size_t size)
+{ struct soap_multipart *content;
+  content = (struct soap_multipart*)soap_malloc(soap, sizeof(struct soap_multipart));
+  if (content)
+  { content->next = NULL;
+    content->ptr = ptr;
+    content->size = size;
+    content->id = NULL;
+    content->type = NULL;
+    content->options = NULL;
+    content->encoding = SOAP_MIME_NONE;
+    content->location = NULL;
+    content->description = NULL;
+    if (!*first)
+      *first = content;
+    if (*last)
+      (*last)->next = content;
+    *last = content;
+  }
+  return content;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_dime_attachment(struct soap *soap, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->options = soap_dime_option(soap, optype, option);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_mime_attachment(struct soap *soap, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->encoding = encoding;
+  content->location = soap_strdup(soap, location);
+  content->description = soap_strdup(soap, description);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap_multipart*
+SOAP_FMAC2
+soap_next_multipart(struct soap_multipart *content)
+{ if (content)
+    return content->next;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_select_mime_boundary(struct soap *soap)
+{ while (!soap->mime.boundary || soap_valid_mime_boundary(soap))
+  { register char *s = soap->mime.boundary;
+    register size_t n = 0;
+    if (s)
+      n = strlen(s);
+    if (n < 16)
+    { n = 64;
+      s = soap->mime.boundary = (char*)soap_malloc(soap, n + 1);
+      if (!s)
+        return;
+    }
+    strcpy(s, "==");
+    s += 2;
+    n -= 4;
+    while (n)
+    { *s++ = soap_base64o[soap_random & 0x3F];
+      n--;
+    }
+    strcpy(s, "==");
+  }
+  if (!soap->mime.start)
+    soap->mime.start = "<SOAP-ENV:Envelope>";
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_valid_mime_boundary(struct soap *soap)
+{ register struct soap_multipart *content;
+  register size_t k = strlen(soap->mime.boundary);
+  for (content = soap->mime.first; content; content = content->next)
+  { if (content->ptr && content->size >= k)
+    { register const char *p = (const char*)content->ptr; 
+      register size_t i;
+      for (i = 0; i < content->size - k; i++, p++)
+        if (!strncmp(p, soap->mime.boundary, k))
+          return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	HTTP cookie handling
+ *
+\******************************************************************************/
+
+#ifdef WITH_COOKIES
+/******************************************************************************/
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_encode_cookie(const char *s, char *t, size_t len)
+{ register int c;
+  register size_t n = len;
+  while ((c = *s++) && --n > 0)
+  { if (c > ' ' && c < 128 && !strchr("()<>@,;:\\\"/[]?={}", c))
+      *t++ = c;
+    else if (n > 2)
+    { *t++ = '%';
+      *t++ = (c >> 4) + (c > 159 ? '7' : '0');
+      c &= 0xF;
+      *t++ = c + (c > 9 ? '7' : '0');
+      n -= 2;
+    }
+    else
+      break;
+  }
+  *t = '\0';
+  return len - n;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  size_t n;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (*path == '/')
+    path++;
+  n = strlen(path);
+  for (p = soap->cookies; p; p = p->next)
+    if (!strcmp(p->name, name)
+     && domain
+     && p->domain
+     && !strcmp(p->domain, domain)
+     && !strncmp(p->path, path, n))
+      break;
+  return p;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_set_cookie(struct soap *soap, const char *name, const char *value, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  int n;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set cookie: %s=%s domain=%s path=%s\n", name, value?value:"", domain?domain:"", path?path:""));
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return NULL;
+  }
+  if (*path == '/')
+    path++;
+  q = soap_cookie(soap, name, domain, path);
+  if (!q)
+  { if ((q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+    { if ((q->name = (char*)SOAP_MALLOC(soap, strlen(name)+1)))
+        strcpy(q->name, name);
+      q->value = NULL;
+      q->domain = NULL;
+      q->path = NULL;
+      q->expire = -1;
+      q->version = 0;
+      q->secure = 0;
+      q->modified = 0;
+      for (p = &soap->cookies, n = soap->cookie_max; *p && n; p = &(*p)->next, n--)
+        if (!strcmp((*p)->name, name) && (*p)->path && strcmp((*p)->path, path) < 0)
+          break;
+      if (n)
+      { q->next = *p;
+        *p = q;
+      }
+      else
+      { SOAP_FREE(soap, q->name);
+        SOAP_FREE(soap, q);
+        q = NULL;
+      }
+    }
+  }
+  else
+    q->modified = 1;
+  if (q)
+  { if (q->value)
+    { SOAP_FREE(soap, q->value);
+      q->value = NULL;
+    }
+    if (q->domain)
+    { SOAP_FREE(soap, q->domain);
+      q->domain = NULL;
+    }
+    if (q->path)
+    { SOAP_FREE(soap, q->path);
+      q->path = NULL;
+    }
+    if (value && *value && (q->value = (char*)SOAP_MALLOC(soap, strlen(value)+1)))
+      strcpy(q->value, value);
+    if (domain && *domain && (q->domain = (char*)SOAP_MALLOC(soap, strlen(domain)+1)))
+      strcpy(q->domain, domain);
+    if (path && *path && (q->path = (char*)SOAP_MALLOC(soap, strlen(path)+1)))
+      strcpy(q->path, path);
+    q->session = 1;
+    q->env = 0;
+  }
+  return q;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!domain)
+  { soap_set_receiver_error(soap, "Cookie domain not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (*path == '/')
+    path++;
+  for (p = &soap->cookies, q = *p; q; q = *p)
+    if (!strcmp(q->name, name) && !strcmp(q->domain, domain) && !strncmp(q->path, path, strlen(q->path)))
+    { if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+      p = &q->next;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_env_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)) && p->env)
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_cookie_expire(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->expire;
+  return -1;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_expire(struct soap *soap, const char *name, long expire, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->expire = expire;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 1;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_clr_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 0;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putsetcookies(struct soap *soap)
+{ struct soap_cookie *p;
+  char *s, tmp[4096];
+  const char *t;
+  for (p = soap->cookies; p; p = p->next)
+  { if (p->modified || !p->env)
+    { s = tmp;
+      if (p->name)
+        s += soap_encode_cookie(p->name, s, tmp-s+4064);
+      if (p->value && *p->value)
+      { *s++ = '=';
+        s += soap_encode_cookie(p->value, s, tmp-s+4064);
+      }
+      if (p->domain && (int)strlen(p->domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", p->domain);
+      else if (soap->cookie_domain && (int)strlen(soap->cookie_domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", soap->cookie_domain);
+      strcat(s, ";Path=\"/");
+      if (p->path)
+        t = p->path;
+      else
+        t = soap->cookie_path;
+      if (t)
+      { if (*t == '/')
+          t++;
+        if ((int)strlen(t) < tmp-s+4064)
+          strcat(s, t);
+      }
+      s += strlen(s);
+      *s++ = '"';
+      if (p->version > 0)
+        sprintf(s, ";Version=%u", p->version);
+      if (p->expire >= 0)
+        sprintf(s, ";Max-Age=%ld", p->expire);
+      if (p->secure)
+        strcat(s, ";Secure");
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set-Cookie: %s\n", tmp));
+      if ((soap->error = soap->fposthdr(soap, "Set-Cookie", tmp)))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putcookies(struct soap *soap, const char *domain, const char *path, int secure)
+{ struct soap_cookie **p, *q;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  char *s, tmp[4096];
+  p = &soap->cookies;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending cookies for domain=%s path=%s\n", domain, path));
+  if (*path == '/')
+    path++;
+  while ((q = *p))
+  { if (q->expire && now > q->expire)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie %s expired\n", q->name));
+      SOAP_FREE(soap, q->name);
+      if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+    { size_t domlen = 0;
+      if (q->domain)
+      { const char *s = strchr(q->domain, ':');
+        if (s)
+	  domlen = s - q->domain;
+	else
+          domlen = strlen(q->domain);
+      }
+      if ((!q->domain || !strncmp(q->domain, domain, domlen))
+          && (!q->path || !strncmp(q->path, path, strlen(q->path)))
+          && (!q->secure || secure))
+      { s = tmp;
+        if (q->version != version)
+        { sprintf(s, "$Version=%u;", q->version);
+          version = q->version;
+        }
+        if (q->name)
+          s += soap_encode_cookie(q->name, s, tmp-s+4080);
+        if (q->value && *q->value)
+        { *s++ = '=';
+          s += soap_encode_cookie(q->value, s, tmp-s+4080);
+        }
+        if (q->path && (int)strlen(q->path) < tmp-s+4080)
+        { sprintf(s, ";$Path=\"/%s\"", (*q->path == '/' ? q->path + 1 : q->path));
+          s += strlen(s);
+        }
+        if (q->domain && (int)strlen(q->domain) < tmp-s+4080)
+          sprintf(s, ";$Domain=\"%s\"", q->domain);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie: %s\n", tmp));
+        if ((soap->error = soap->fposthdr(soap, "Cookie", tmp)))
+          return soap->error;
+      }
+      p = &q->next;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_getcookies(struct soap *soap, const char *val)
+{ struct soap_cookie *p = NULL, *q;
+  const char *s;
+  char *t, tmp[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  char *domain = NULL;
+  char *path = NULL;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  if (!val)
+    return;
+  s = val;
+  while (*s)
+  { s = soap_decode_key(tmp, sizeof(tmp), s);
+    if (!soap_tag_cmp(tmp, "$Version"))
+    { if ((s = soap_decode_val(tmp, sizeof(tmp), s)))
+      { if (p)
+          p->version = (int)atol(tmp);
+        else
+          version = (int)atol(tmp);
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Path"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->path)
+          SOAP_FREE(soap, p->path);
+        p->path = t;
+      }
+      else
+      { if (path)
+          SOAP_FREE(soap, path);
+        path = t;
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Domain"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->domain)
+          SOAP_FREE(soap, p->domain);
+	p->domain = t;
+      }
+      else
+      { if (domain)
+          SOAP_FREE(soap, domain);
+        domain = t;
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Path"))
+    { if (p->path)
+        SOAP_FREE(soap, p->path);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->path = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->path, tmp);
+      }
+      else
+        p->path = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Domain"))
+    { if (p->domain)
+        SOAP_FREE(soap, p->domain);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->domain = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->domain, tmp);
+      }
+      else
+        p->domain = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Version"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->version = (unsigned int)atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Max-Age"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->expire = now + atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Expires"))
+    { struct tm T;
+      char a[3]; 
+      static const char mns[] = "anebarprayunulugepctovec";
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (strlen(tmp) > 20)
+      { memset((void*)&T, 0, sizeof(T));
+        a[0] = tmp[4];
+        a[1] = tmp[5];
+        a[2] = '\0';
+        T.tm_mday = (int)atol(a);
+        a[0] = tmp[8];
+        a[1] = tmp[9];
+        T.tm_mon = (strstr(mns, a) - mns) / 2;
+        a[0] = tmp[11];
+        a[1] = tmp[12];
+        T.tm_year = 100 + (int)atol(a);
+        a[0] = tmp[13];
+        a[1] = tmp[14];
+        T.tm_hour = (int)atol(a);
+        a[0] = tmp[16];
+        a[1] = tmp[17];
+        T.tm_min = (int)atol(a);
+        a[0] = tmp[19];
+        a[1] = tmp[20];
+        T.tm_sec = (int)atol(a);
+        p->expire = soap_timegm(&T);
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Secure"))
+      p->secure = 1;
+    else
+    { if (p)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+        if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+        { q->version = p->version;
+          q->expire = p->expire;
+          q->secure = p->secure;
+          q->env = 1;
+        }
+        if (p->name)
+          SOAP_FREE(soap, p->name);
+        if (p->value)
+          SOAP_FREE(soap, p->value);
+        if (p->domain)
+          SOAP_FREE(soap, p->domain);
+        if (p->path)
+          SOAP_FREE(soap, p->path);
+        SOAP_FREE(soap, p);
+      }
+      if ((p = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      { p->name = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+        strcpy(p->name, tmp);
+        s = soap_decode_val(tmp, sizeof(tmp), s);
+        if (*tmp)
+        { p->value = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+          strcpy(p->value, tmp);
+        }
+        else
+          p->value = NULL;
+        p->domain = domain;
+        p->path = path;
+        p->expire = 0;
+        p->secure = 0;
+        p->version = version;
+      }
+    }
+  }
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+    if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+    { q->version = p->version;
+      q->expire = p->expire;
+      q->secure = p->secure;
+      q->env = 1;
+    }
+    if (p->name)
+      SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+  if (domain)
+    SOAP_FREE(soap, domain);
+  if (path)
+    SOAP_FREE(soap, path);
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getenv_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  const char *s;
+  char key[4096], val[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  if (!(s = getenv("HTTP_COOKIE")))
+    return SOAP_ERR;
+  do
+  { s = soap_decode_key(key, sizeof(key), s);
+    s = soap_decode_val(val, sizeof(val), s);
+    p = soap_set_cookie(soap, key, val, NULL, NULL);
+    if (p)
+      p->env = 1;
+  } while (*s);
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_copy_cookies(struct soap *soap)
+{ struct soap_cookie *p, **q, *r;
+  q = &r;
+  for (p = soap->cookies; p; p = p->next)
+  { if (!(*q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      return r;
+    **q = *p;
+    if (p->name)
+    { if (((*q)->name = (char*)SOAP_MALLOC(soap, strlen(p->name)+1)))
+        strcpy((*q)->name, p->name);
+    }
+    if (p->value)
+    { if (((*q)->value = (char*)SOAP_MALLOC(soap, strlen(p->value)+1)))
+        strcpy((*q)->value, p->value);
+    }
+    if (p->domain)
+    { if (((*q)->domain = (char*)SOAP_MALLOC(soap, strlen(p->domain)+1)))
+        strcpy((*q)->domain, p->domain);
+    }
+    if (p->path)
+    { if (((*q)->path = (char*)SOAP_MALLOC(soap, strlen(p->path)+1)))
+        strcpy((*q)->path, p->path);
+    }
+    q = &(*q)->next;
+  }
+  *q = NULL;
+  return r;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  for (p = soap->cookies; p; p = soap->cookies)
+  { soap->cookies = p->next;
+    SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+}
+
+/******************************************************************************/
+#endif /* WITH_COOKIES */
+
+/******************************************************************************/
+#ifdef WITH_GZIP
+#ifndef PALM_1
+static int
+soap_getgziphdr(struct soap *soap)
+{ int i;
+  soap_wchar c, f = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get gzip header\n"));
+  for (i = 0; i < 9; i++)
+  { if ((int)(c = soap_get1(soap) == EOF))
+      return soap->error = SOAP_EOF;
+    if (i == 2)
+      f = c;
+  }
+  if (f & 0x04) /* FEXTRA */
+  { for (i = soap_get1(soap) | (soap_get1(soap) << 8); i; i--)
+      if ((int)soap_get1(soap) == EOF)
+        return soap->error = SOAP_EOF;
+  }
+  if (f & 0x08) /* FNAME */
+    do
+      c = soap_get1(soap);
+    while (c && (int)c != EOF);
+  if ((int)c != EOF && (f & 0x10)) /* FCOMMENT */
+    do
+      c = soap_get1(soap);
+    while (c && (int)f != EOF);
+  if ((int)c != EOF && (f & 0x01)) /* FHCRC */
+  { if ((int)(c = soap_get1(soap)) != EOF)
+      c = soap_get1(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_recv(struct soap *soap)
+{ soap_wchar c;
+  soap->error = SOAP_OK;
+  soap_free(soap);
+  soap_set_local_namespaces(soap);
+  soap->version = 0;	/* don't assume we're parsing SOAP content by default */
+#ifndef WITH_NOIDREF
+  soap_free_iht(soap);
+#endif
+  if ((soap->imode & SOAP_IO) == SOAP_IO_CHUNK)
+    soap->omode |= SOAP_IO_CHUNK;
+  soap->imode &= ~SOAP_IO;
+  soap->mode = soap->imode;
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  soap->ahead = 0;
+  soap->peeked = 0;
+  soap->level = 0;
+  soap->part = SOAP_BEGIN;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  *soap->endpoint = '\0';
+  soap->action = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket))
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->recvfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->recvfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#ifdef WITH_ZLIB
+  soap->mode &= ~SOAP_ENC_ZLIB;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.next_in = Z_NULL;
+  soap->d_stream.avail_in = 0;
+  soap->d_stream.next_out = (Byte*)soap->buf;
+  soap->d_stream.avail_out = SOAP_BUFLEN;
+  soap->z_ratio_in = 1.0;
+#endif
+#ifndef WITH_LEANER
+  if (soap->fprepareinit)
+    soap->fprepareinit(soap);
+#endif
+  c = soap_getchar(soap);
+#ifdef WITH_GZIP
+  if (c == 0x1F)
+  { if (soap_getgziphdr(soap))
+      return soap->error;
+    if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+    soap->zlib_state = SOAP_ZLIB_INFLATE;
+    soap->mode |= SOAP_ENC_ZLIB;
+    soap->zlib_in = SOAP_ZLIB_GZIP;
+    soap->z_crc = crc32(0L, NULL, 0);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    /* should not chunk over plain transport, so why bother to check? */
+    /* if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) */
+    /*   soap->z_buflen = soap->bufidx; */
+    /* else */
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+    soap->z_buflen = soap->buflen;
+    soap->buflen = soap->bufidx;
+    c = soap_getchar(soap);
+  }  
+#endif
+#ifndef WITH_LEANER
+  if (c == '-' && soap_get0(soap) == '-')
+    soap->mode |= SOAP_ENC_MIME;
+  else if ((c & 0xFFFC) == (SOAP_DIME_VERSION | SOAP_DIME_MB) && (soap_get0(soap) & 0xFFF0) == 0x20)
+    soap->mode |= SOAP_ENC_DIME;
+  else
+#endif
+  { while (soap_blank(c))
+      c = soap_getchar(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  soap_unget(soap, c);
+#ifndef WITH_NOHTTP
+  /* if not XML or (start of)BOM or MIME/DIME/ZLIB, assume HTTP header */
+  if (c != '<' && c != 0xEF && !(soap->mode & (SOAP_ENC_MIME | SOAP_ENC_DIME | SOAP_ENC_ZLIB)))
+  { soap->mode &= ~SOAP_IO;
+    soap->error = soap->fparse(soap);
+    if (soap->error && soap->error < SOAP_STOP)
+    { soap->keep_alive = 0; /* force close later */
+      return soap->error;
+    }
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { soap->chunkbuflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+      soap->chunksize = 0;
+    }
+#ifndef WITH_LEANER
+    else if (soap->fpreparerecv && soap->buflen != soap->bufidx)
+      soap->fpreparerecv(soap, soap->buf + soap->bufidx, soap->buflen - soap->bufidx);
+#endif
+#ifdef WITH_ZLIB
+    if (soap->zlib_in != SOAP_ZLIB_NONE)
+    { /* fparse should not use soap_unget to push back last char */
+#ifdef WITH_GZIP
+      c = soap_get1(soap);
+      if (c == 0x1F)
+      { if (soap_getgziphdr(soap))
+          return soap->error;
+        if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        soap->z_crc = crc32(0L, NULL, 0);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+      }
+      else
+      { soap_revget1(soap);
+#else
+      {
+#endif
+        if (inflateInit(&soap->d_stream) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate initialized\n"));
+      }
+      soap->mode |= SOAP_ENC_ZLIB;
+      memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+      soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+      soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+    }
+#endif
+    if (soap->error)
+    { if (soap->error == SOAP_FORM && soap->fform)
+      { soap->error = soap->fform(soap);
+        if (soap->error == SOAP_OK)
+          soap->error = SOAP_STOP; /* prevents further processing */
+      }
+      return soap->error;
+    }
+  }
+#endif
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_MIME)
+  { if (soap_getmimehdr(soap))
+      return soap->error;
+    if (soap_get_header_attribute(soap, soap->mime.first->type, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+  }
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap->dime.flags & SOAP_DIME_CF)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked DIME SOAP message\n"));
+      soap->dime.chunksize = soap->dime.size;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+    }
+    soap->count = soap->buflen - soap->bufidx;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse(struct soap *soap)
+{ char header[SOAP_HDRLEN], *s;
+  unsigned short get = 0, status = 0, k = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Waiting for HTTP request/response...\n"));
+  *soap->endpoint = '\0';
+  soap->length = 0;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->action = NULL;
+  soap->authrealm = NULL;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP status: %s\n", soap->msgbuf));
+    for (;;)
+    { if (soap_getline(soap, header, SOAP_HDRLEN))
+      { if (soap->error == SOAP_EOF)
+	{ soap->error = SOAP_OK;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "EOF in HTTP header, continue anyway\n"));
+	  break;
+	}
+        return soap->error;
+      }
+      if (!*header)
+        break;
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP header: %s\n", header));
+      s = strchr(header, ':');
+      if (s)
+      { *s = '\0';
+        do s++;
+        while (*s && *s <= 32);
+        if ((soap->error = soap->fparsehdr(soap, header, s)))
+        { if (soap->error < SOAP_STOP)
+	    return soap->error;
+	  status = soap->error;
+	  soap->error = SOAP_OK;
+        }
+      }
+    }
+    if ((s = strchr(soap->msgbuf, ' ')))
+    { k = (unsigned short)soap_strtoul(s, &s, 10);
+      if (!soap_blank(*s))
+        k = 0;
+    }
+    else
+      k = 0;
+  } while (k == 100);
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Finished HTTP header parsing\n"));
+  s = strstr(soap->msgbuf, "HTTP/");
+  if (s && s[7] != '1')
+  { if (soap->keep_alive == 1)
+      soap->keep_alive = 0;
+    if (k == 0 && (soap->omode & SOAP_IO) == SOAP_IO_CHUNK) /* k == 0 for HTTP request */
+    { soap->imode |= SOAP_IO_CHUNK;
+      soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE;
+    }
+  }
+  if (soap->keep_alive < 0)
+    soap->keep_alive = 1;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Keep alive connection = %d\n", soap->keep_alive));
+  if (s && (((get = !strncmp(soap->msgbuf, "GET ", 4))) || !strncmp(soap->msgbuf, "POST ", 5)))
+  { size_t m = strlen(soap->endpoint);
+    size_t n = m + (s - soap->msgbuf) - 5 - (!get);
+    if (n >= sizeof(soap->endpoint))
+      n = sizeof(soap->endpoint) - 1;
+    strncpy(soap->path, soap->msgbuf + 4 + (!get), n - m);
+    soap->path[n - m] = '\0';
+    strcat(soap->endpoint, soap->path);
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Target endpoint='%s'\n", soap->endpoint));
+    if (get)
+    { soap->error = soap->fget(soap);
+      if (soap->error == SOAP_OK)
+        soap->error = SOAP_STOP; /* prevents further processing */
+      return soap->error;
+    }
+    if (status)
+      return soap->error = status;
+    return SOAP_OK;
+  }
+  if (k == 0 || (k >= 200 && k <= 299) || k == 400 || k == 500)
+    return SOAP_OK;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP error %d\n", k));
+  return soap_set_receiver_error(soap, "HTTP error", soap->msgbuf, k);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse_header(struct soap *soap, const char *key, const char *val)
+{ if (!soap_tag_cmp(key, "Host"))
+  { 
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+      strcpy(soap->endpoint, "https://");
+    else
+#endif
+      strcpy(soap->endpoint, "http://");
+    strncat(soap->endpoint, val, sizeof(soap->endpoint) - 8);
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifndef WITH_LEANER
+  else if (!soap_tag_cmp(key, "Content-Type"))
+  { if (soap_get_header_attribute(soap, val, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+    else if (soap_get_header_attribute(soap, val, "multipart/related")
+          || soap_get_header_attribute(soap, val, "multipart/form-data"))
+    { soap->mime.boundary = soap_strdup(soap, soap_get_header_attribute(soap, val, "boundary"));
+      soap->mime.start = soap_strdup(soap, soap_get_header_attribute(soap, val, "start"));
+      soap->mode |= SOAP_ENC_MIME;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Content-Length"))
+    soap->length = soap_strtoul(val, NULL, 10);
+  else if (!soap_tag_cmp(key, "Content-Encoding"))
+  { if (!soap_tag_cmp(val, "deflate"))
+#ifdef WITH_ZLIB
+      soap->zlib_in = SOAP_ZLIB_DEFLATE;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+    else if (!soap_tag_cmp(val, "gzip"))
+#ifdef WITH_GZIP
+      soap->zlib_in = SOAP_ZLIB_GZIP;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+  }
+#ifdef WITH_ZLIB
+  else if (!soap_tag_cmp(key, "Accept-Encoding"))
+  {
+#ifdef WITH_GZIP
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "gzip"))
+      soap->zlib_out = SOAP_ZLIB_GZIP;
+    else
+#endif
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "deflate"))
+      soap->zlib_out = SOAP_ZLIB_DEFLATE;
+    else
+      soap->zlib_out = SOAP_ZLIB_NONE;
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Transfer-Encoding"))
+  { soap->mode &= ~SOAP_IO;
+    if (!soap_tag_cmp(val, "chunked"))
+      soap->mode |= SOAP_IO_CHUNK;
+  }
+  else if (!soap_tag_cmp(key, "Connection"))
+  { if (!soap_tag_cmp(val, "keep-alive"))
+      soap->keep_alive = -soap->keep_alive;
+    else if (!soap_tag_cmp(val, "close"))
+      soap->keep_alive = 0;
+  }
+#ifndef WITH_LEAN
+  else if (!soap_tag_cmp(key, "Authorization"))
+  { if (!soap_tag_cmp(val, "Basic *"))
+    { int n;
+      char *s;
+      soap_base642s(soap, val + 6, soap->tmpbuf, sizeof(soap->tmpbuf) - 1, &n);
+      soap->tmpbuf[n] = '\0';
+      if ((s = strchr(soap->tmpbuf, ':')))
+      { *s = '\0';
+	soap->userid = soap_strdup(soap, soap->tmpbuf);
+	soap->passwd = soap_strdup(soap, s + 1);
+      }
+    }
+  }
+  else if (!soap_tag_cmp(key, "WWW-Authenticate"))
+    soap->authrealm = soap_strdup(soap, soap_get_header_attribute(soap, val + 6, "realm"));
+  else if (!soap_tag_cmp(key, "Expect"))
+  { if (!soap_tag_cmp(val, "100-continue"))
+    { if ((soap->error = soap->fposthdr(soap, "HTTP/1.1 100 Continue", NULL))
+       || (soap->error = soap->fposthdr(soap, NULL, NULL)))
+        return soap->error;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "SOAPAction"))
+  { if (*val == '"')
+    { soap->action = soap_strdup(soap, val + 1);
+      soap->action[strlen(soap->action) - 1] = '\0';
+    }
+  }
+  else if (!soap_tag_cmp(key, "Location"))
+  { strncpy(soap->endpoint, val, sizeof(soap->endpoint));
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifdef WITH_COOKIES
+  else if (!soap_tag_cmp(key, "Cookie") || !soap_tag_cmp(key, "Set-Cookie"))
+    soap_getcookies(soap, val);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_get_header_attribute(struct soap *soap, const char *line, const char *key)
+{ register const char *s = line;
+  if (s)
+  { while (*s)
+    { register short flag;
+      s = soap_decode_key(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      flag = soap_tag_cmp(soap->tmpbuf, key);
+      s = soap_decode_val(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      if (!flag)
+        return soap->tmpbuf;
+    }
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_key(char *buf, size_t len, const char *val)
+{ return soap_decode(buf, len, val, "=,;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_val(char *buf, size_t len, const char *val)
+{ if (*val != '=')
+  { *buf = '\0';
+    return val;
+  }
+  return soap_decode(buf, len, val + 1, ",;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char*
+soap_decode(char *buf, size_t len, const char *val, const char *sep)
+{ const char *s;
+  char *t = buf;
+  for (s = val; *s; s++)
+    if (*s != ' ' && *s != '\t' && !strchr(sep, *s))
+      break;
+  if (*s == '"')
+  { s++;
+    while (*s && *s != '"' && --len)
+      *t++ = *s++;
+  }
+  else
+  { while (soap_notblank(*s) && !strchr(sep, *s) && --len)
+    { if (*s == '%')
+      { *t++ = ((s[1] >= 'A' ? (s[1] & 0x7) + 9 : s[1] - '0') << 4)
+              + (s[2] >= 'A' ? (s[2] & 0x7) + 9 : s[2] - '0');
+        s += 3;
+      }
+      else
+        *t++ = *s++;
+    }
+  }
+  *t = '\0';
+  while (*s && !strchr(sep, *s))
+    s++;
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_out(struct soap *soap)
+{
+#ifndef WITH_LEANER
+  size_t n = 0;
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->mime.start)
+  { const char *s;
+    if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+      s = "application/dime";
+    else if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+    sprintf(soap->tmpbuf, "--%s\r\nContent-Type: %s\r\nContent-Transfer-Encoding: binary\r\nContent-ID: %s\r\n\r\n", soap->mime.boundary, s, soap->mime.start);
+    n = strlen(soap->tmpbuf);
+    if (soap_send_raw(soap, soap->tmpbuf, n))
+      return soap->error;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    soap->dime.size = soap->count;	/* DIME in MIME correction */
+  if (!(soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME))
+  { if (soap_putdimehdr(soap))
+      return soap->error;
+  }
+#endif
+  soap->part = SOAP_IN_ENVELOPE;
+  return soap_element_begin_out(soap, "SOAP-ENV:Envelope", 0, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Envelope"))
+    return soap->error;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { soap->dime.size = soap->count - soap->dime.size;	/* DIME in MIME correction */
+    sprintf(soap->id, soap->dime_id_format, 0);
+    soap->dime.id = soap->id;
+    if (soap->local_namespaces)
+    { if (soap->local_namespaces[0].out)
+        soap->dime.type = (char*)soap->local_namespaces[0].out;
+      else
+        soap->dime.type = (char*)soap->local_namespaces[0].ns;
+    }
+    soap->dime.options = NULL;
+    soap->dime.flags = SOAP_DIME_MB | SOAP_DIME_ABSURI;
+    if (!soap->dime.first)
+      soap->dime.flags |= SOAP_DIME_ME;
+    soap->count += 12 + ((strlen(soap->dime.id)+3)&(~3)) + ((strlen(soap->dime.type)+3)&(~3));
+  }
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+    return soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+#endif
+  soap->part = SOAP_END_ENVELOPE;
+  return SOAP_OK;
+} 
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_in(struct soap *soap)
+{ register struct Namespace *p;
+  soap->part = SOAP_IN_ENVELOPE;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Envelope", 0))
+    return soap->error = SOAP_VERSIONMISMATCH;
+  p = soap->local_namespaces;
+  if (p)
+  { const char *ns = p[0].out;
+    if (!ns)
+      ns = p[0].ns;
+    if (!strcmp(ns, soap_env1))
+    { soap->version = 1; /* make sure we use SOAP 1.1 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc1))))
+        strcpy(p[1].out, soap_enc1);
+    }
+    else if (!strcmp(ns, soap_env2))
+    { soap->version = 2; /* make sure we use SOAP 1.2 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc2))))
+        strcpy(p[1].out, soap_enc2);
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_in(struct soap *soap)
+{ soap->part = SOAP_END_ENVELOPE;
+  return soap_element_end_in(soap, "SOAP-ENV:Envelope");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_out(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap->version == 1)
+    soap->encoding = 1;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_SEC) && soap_set_attr(soap, "wsu:Id", "Body"))
+    return soap->error;
+#endif
+  if (soap_element(soap, "SOAP-ENV:Body", 0, NULL))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Body"))
+    return soap->error;
+  soap->part = SOAP_END_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_in(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Body", 0))
+    return soap->error;
+  if (!soap->body)
+    soap->part = SOAP_NO_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_in(struct soap *soap)
+{ if (soap->part == SOAP_NO_BODY)
+    return SOAP_OK;
+  soap->part = SOAP_END_BODY;
+  return soap_element_end_in(soap, "SOAP-ENV:Body");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_header(struct soap *soap)
+{ if (soap_getheader(soap) && soap->error == SOAP_TAG_MISMATCH)
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_endpoint(struct soap *soap, const char *endpoint)
+{ register const char *s;
+  register size_t i, n;
+  soap->endpoint[0] = '\0';
+  soap->host[0] = '\0';
+  soap->path[0] = '/';
+  soap->path[1] = '\0';
+  soap->port = 80;
+  if (!endpoint || !*endpoint)
+    return;
+  if (!strncmp(endpoint, "https:", 6))
+    soap->port = 443;
+  strncpy(soap->endpoint, endpoint, sizeof(soap->endpoint) - 1);
+  s = strchr(endpoint, ':');
+  if (s && s[1] == '/' && s[2] == '/')
+    s += 3;
+  else
+    s = endpoint;
+  n = strlen(s);
+  if (n >= sizeof(soap->host))
+    n = sizeof(soap->host) - 1;
+#ifdef WITH_IPV6
+  if (s[0] == '[')
+  { s++;
+    for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == ']')
+      { s++;
+        break; 
+      }
+    }
+  }
+  else
+  { for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == '/' || s[i] == ':')
+        break; 
+    }
+  }
+#else
+  for (i = 0; i < n; i++)
+  { soap->host[i] = s[i];
+    if (s[i] == '/' || s[i] == ':')
+      break; 
+  }
+#endif
+  soap->host[i] = '\0';
+  if (s[i] == ':')
+  { soap->port = (int)atol(s + i + 1);
+    for (i++; i < n; i++)
+      if (s[i] == '/')
+        break;
+  }
+  if (s[i])
+  { strncpy(soap->path, s + i, sizeof(soap->path));
+    soap->path[sizeof(soap->path) - 1] = '\0';
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect(struct soap *soap, const char *endpoint, const char *action)
+{ return soap_connect_command(soap, SOAP_POST, endpoint, action);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect_command(struct soap *soap, int http_command, const char *endpoint, const char *action)
+{ char host[sizeof(soap->host)];
+  int port;
+  size_t count;
+  soap->error = SOAP_OK;
+  strcpy(host, soap->host); /* save to compare */
+  port = soap->port; /* save to compare */
+  soap_set_endpoint(soap, endpoint);
+#ifndef WITH_LEANER
+  if (soap->fconnect)
+  { if ((soap->error = soap->fconnect(soap, endpoint, soap->host, soap->port)))
+      return soap->error;
+  }
+  else
+#endif
+  if (soap->fopen && *soap->host)
+  { soap->status = http_command;
+    if (!soap->keep_alive || !soap_valid_socket(soap->socket) || strcmp(soap->host, host) || soap->port != port || !soap->fpoll || soap->fpoll(soap))
+    { soap->keep_alive = 0; /* to force close */
+      soap->omode &= ~SOAP_IO_UDP; /* to force close */
+      soap_closesock(soap);
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Connect/reconnect to host='%s' path='%s' port=%d\n", soap->host, soap->path, soap->port));
+#ifdef WITH_UDP
+      if (!strncmp(endpoint, "soap.udp:", 9))
+        soap->omode |= SOAP_IO_UDP;
+#endif
+      soap->socket = soap->fopen(soap, endpoint, soap->host, soap->port);
+      if (soap->error)
+        return soap->error;
+      soap->keep_alive = ((soap->omode & SOAP_IO_KEEPALIVE) != 0);
+    }
+  }
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML) && endpoint)
+  { unsigned int k = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((k & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fpost(soap, endpoint, soap->host, soap->port, soap->path, action, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((k & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = k;
+  }
+  else if (action)
+    soap->action = soap_strdup(soap, action);
+  if (http_command != SOAP_POST)
+    return soap_end_send(soap);
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2base64(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register int i;
+  register unsigned long m;
+  register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, (n + 2) / 3 * 4 + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (!s)
+    return p;
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    t += 4;
+  }
+  t[0] = '\0';
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      t[i] = '=';
+    t[4] = '\0';
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_base642s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register int i, j, c;
+  register unsigned long m;
+  register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = (strlen(s) + 3) / 4 * 3;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  if (n)
+    *n = 0;
+  for (;;)
+  { for (i = 0; i < SOAP_BLKLEN; i++)
+    { m = 0;
+      j = 0;
+      while (j < 4)
+      { c = *s++;
+        if (c == '=' || !c)
+        { i *= 3;
+          switch (j)
+          { case 2:
+              *t++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *t++ = (char)((m >> 10) & 0xFF);
+              *t++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n += i;
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      }
+      *t++ = (char)((m >> 16) & 0xFF);
+      *t++ = (char)((m >> 8) & 0xFF);
+      *t++ = (char)(m & 0xFF);
+      if (l < 3)
+      { if (n)
+	  *n += i;
+        return p;
+      }
+      l -= 3;
+    }
+    if (n)
+      *n += 3 * SOAP_BLKLEN;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2hex(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, 2 * n + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (s)
+  { for (; n > 0; n--)
+    { register int m = *s++;
+      *t++ = (char)((m >> 4) + (m > 159 ? 'a' - 10 : '0'));
+      m &= 0x0F;
+      *t++ = (char)(m + (m > 9 ? 'a' - 10 : '0'));
+    }
+  }
+  *t++ = '\0';
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_hex2s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = strlen(s) / 2;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  while (l)
+  { register int d1, d2;
+    d1 = *s++;
+    if (!d1)
+      break;
+    d2 = *s++;
+    if (!d2)
+      break;
+    *t++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    l--;
+  }
+  if (n)
+    *n = t - p;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthttphdr(struct soap *soap, int status, size_t count)
+{ register const char *s = NULL;
+  register int err = SOAP_OK;
+#ifndef WITH_LEANER
+  register const char *r = NULL;
+#endif
+  if (status == SOAP_FILE && soap->http_content)
+    s = soap->http_content;
+  else if (status == SOAP_HTML)
+    s = "text/html; charset=utf-8";
+  else if (count || ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK))
+  { if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+  }
+#ifndef WITH_LEANER
+  if (soap->mode & (SOAP_ENC_DIME | SOAP_ENC_MTOM))
+  { if (soap->mode & SOAP_ENC_MTOM)
+    { r = s;
+      s = "application/xop+xml; charset=utf-8";
+    }
+    else
+      s = "application/dime";
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->status != SOAP_GET)
+  { register const char *t = strchr(s, ';');
+    sprintf(soap->tmpbuf, "multipart/related; boundary=\"%s\"; type=\"", soap->mime.boundary);
+    if (t)
+      strncat(soap->tmpbuf, s, t - s);
+    else
+      strcat(soap->tmpbuf, s);
+    if (soap->mime.start)
+    { strcat(soap->tmpbuf, "\"; start=\"");
+      strcat(soap->tmpbuf, soap->mime.start);
+    }
+    strcat(soap->tmpbuf, "\"");
+    if (r)
+    { strcat(soap->tmpbuf, "; start-info=\"");
+      strcat(soap->tmpbuf, r);
+      strcat(soap->tmpbuf, "\"");
+    }
+    s = soap->tmpbuf;
+  }
+#endif
+  if (s && (err = soap->fposthdr(soap, "Content-Type", s)))
+    return err;
+#ifdef WITH_ZLIB
+  if (soap->omode & SOAP_ENC_ZLIB)
+  {
+#ifdef WITH_GZIP
+    err = soap->fposthdr(soap, "Content-Encoding", "gzip");
+#else
+    err = soap->fposthdr(soap, "Content-Encoding", "deflate");
+#endif
+    if (err)
+      return err;
+  }
+#endif
+#ifndef WITH_LEANER
+  if ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK)
+    err = soap->fposthdr(soap, "Transfer-Encoding", "chunked");
+  else
+#endif
+  if (soap->status != SOAP_GET)
+  { sprintf(soap->tmpbuf, "%lu", (unsigned long)count);
+    err = soap->fposthdr(soap, "Content-Length", soap->tmpbuf);
+  }
+  if (err)
+    return err;
+  return soap->fposthdr(soap, "Connection", soap->keep_alive ? "keep-alive" : "close");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_get(struct soap *soap)
+{ return SOAP_GET_METHOD;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post(struct soap *soap, const char *endpoint, const char *host, int port, const char *path, const char *action, size_t count)
+{ register const char *s;
+  register int err;
+  if (soap->status == SOAP_GET)
+    s = "GET";
+  else
+    s = "POST";
+#ifdef PALM
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)) && strncmp(endpoint, "_beam:", 6) && strncmp(endpoint, "_local:", 7) && strncmp(endpoint, "_btobex:", 8))
+#else
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)))
+#endif
+    return SOAP_OK;
+  if (soap->proxy_host && strncmp(endpoint, "https:", 6))
+    sprintf(soap->tmpbuf, "%s %s HTTP/%s", s, endpoint, soap->http_version);
+  else
+    sprintf(soap->tmpbuf, "%s /%s HTTP/%s", s, (*path == '/' ? path + 1 : path), soap->http_version);
+  if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+    return err;
+  if (port != 80)
+    sprintf(soap->tmpbuf, "%s:%d", host, port);
+  else
+    strcpy(soap->tmpbuf, host); 
+  if ((err = soap->fposthdr(soap, "Host", soap->tmpbuf))
+   || (err = soap->fposthdr(soap, "User-Agent", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, SOAP_OK, count)))
+    return err;
+#ifdef WITH_ZLIB
+#ifdef WITH_GZIP
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "gzip, deflate")))
+#else
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "deflate")))
+#endif
+    return err;
+#endif
+#ifndef WITH_LEAN
+  if (soap->userid && soap->passwd && strlen(soap->userid) + strlen(soap->passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Authorization", soap->tmpbuf)))
+      return err;
+  }
+  if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+      return err;
+  }
+#endif
+#ifdef WITH_COOKIES
+#ifdef WITH_OPENSSL
+  if (soap_putcookies(soap, host, path, soap->ssl != NULL))
+    return soap->error;
+#else
+  if (soap_putcookies(soap, host, path, 0))
+    return soap->error;
+#endif
+#endif
+  if (action && soap->version == 1)
+  { sprintf(soap->tmpbuf, "\"%s\"", action);
+    if ((err = soap->fposthdr(soap, "SOAPAction", soap->tmpbuf)))
+      return err;
+  }
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_send_header(struct soap *soap, const char *s)
+{ register const char *t;
+  do
+  { t = strchr(s, '\n'); /* disallow \n in HTTP headers */
+    if (!t)
+      t = s + strlen(s);
+    if (soap_send_raw(soap, s, t - s))
+      return soap->error;
+    s = t + 1;
+  } while (*t);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post_header(struct soap *soap, const char *key, const char *val)
+{ if (key)
+  { if (http_send_header(soap, key))
+      return soap->error;
+    if (val && (soap_send_raw(soap, ": ", 2) || http_send_header(soap, val)))
+      return soap->error;
+  }
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_response(struct soap *soap, int status, size_t count)
+{ register int err;
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    httpOutputEnable(soap->rpmreqid);
+#endif
+  if (!status || status == SOAP_HTML || status == SOAP_FILE)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "OK 200\n"));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s 200 OK", soap->http_version);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", "200 OK")))
+      return err;
+  }
+  else if (status > 200 && status < 600)
+  { sprintf(soap->tmpbuf, "HTTP/%s %d %s", soap->http_version, status, http_error(soap, status));
+    if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      return err;
+#ifndef WITH_LEAN 
+    if (status == 401)
+    { sprintf(soap->tmpbuf, "Basic realm=\"%s\"", soap->authrealm ? soap->authrealm : "gSOAP Web Service");
+      if ((err = soap->fposthdr(soap, "WWW-Authenticate", soap->tmpbuf)))
+        return err;
+    }
+    else if ((status >= 301 && status <= 303) || status == 307)
+    { if ((err = soap->fposthdr(soap, "Location", soap->endpoint)))
+        return err;
+    }
+#endif
+  }
+  else
+  { const char *s = *soap_faultcode(soap);
+    if (soap->version == 2 && !strcmp(s, "SOAP-ENV:Sender"))
+      s = "400 Bad Request";
+    else
+      s = "500 Internal Server Error";
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error %s (status=%d)\n", s, status));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s %s", soap->http_version, s);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", s)))
+      return err;
+  }
+  if ((err = soap->fposthdr(soap, "Server", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, status, count)))
+    return err;
+#ifdef WITH_COOKIES
+  if (soap_putsetcookies(soap))
+    return soap->error;
+#endif
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_response(struct soap *soap, int status)
+{ register size_t count;
+  if (!(soap->omode & (SOAP_ENC_XML | SOAP_IO_STORE /* this tests for chunking too */))
+   && (status == SOAP_HTML || status == SOAP_FILE))
+  { soap->omode &= ~SOAP_IO;
+    soap->omode |= SOAP_IO_STORE;
+  }
+  soap->status = status;
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML))
+  { register int n = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((n & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fresponse(soap, status, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((n & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = n;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static const char*
+soap_set_validation_fault(struct soap *soap, const char *s, const char *t)
+{ if (*soap->tag)
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s in element <%s>", s, t?t:SOAP_STR_EOS, soap->tag);
+  else
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s", s, t?t:SOAP_STR_EOS);
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_fault(struct soap *soap)
+{ const char **c = soap_faultcode(soap);
+  const char **s = soap_faultstring(soap);
+  if (!*c && !*s && soap->fseterror)
+    soap->fseterror(soap, c, s);
+  if (!*c)
+  { if (soap->version == 2)
+      *c = "SOAP-ENV:Sender";
+    else
+      *c = "SOAP-ENV:Client";
+  }
+  if (*s)
+    return;
+  switch (soap->error)
+  {
+#ifndef WITH_LEAN
+    case SOAP_CLI_FAULT:
+      *s = "Client fault";
+      break;
+    case SOAP_SVR_FAULT:
+      *s = "Server fault";
+      break;
+    case SOAP_TAG_MISMATCH:
+      *s = soap_set_validation_fault(soap, "tag name or namespace mismatch", NULL);
+      break;
+    case SOAP_TYPE:
+      *s = soap_set_validation_fault(soap, "data type mismatch ", soap->type);
+      break;
+    case SOAP_SYNTAX_ERROR:
+      *s = "Well-formedness violation";
+      break;
+    case SOAP_NO_TAG:
+      *s = "No XML element tag";
+      break;
+    case SOAP_MUSTUNDERSTAND:
+      *c = "SOAP-ENV:MustUnderstand";
+      sprintf(soap->msgbuf, "The data in element '%s' must be understood but cannot be handled", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_VERSIONMISMATCH:
+      *c = "SOAP-ENV:VersionMismatch";
+      *s = "SOAP version mismatch or invalid SOAP message";
+      break;
+    case SOAP_DATAENCODINGUNKNOWN:
+      *c = "SOAP-ENV:DataEncodingUnknown";
+      *s = "Unsupported SOAP data encoding";
+      break;
+    case SOAP_NAMESPACE:
+      *s = soap_set_validation_fault(soap, "namespace mismatch", NULL);
+      break;
+    case SOAP_USER_ERROR:
+      *s = "User error";
+      break;
+    case SOAP_FATAL_ERROR:
+      *s = "Fatal error";
+      break;
+    case SOAP_NO_METHOD:
+      sprintf(soap->msgbuf, "Method '%s' not implemented: method name or namespace not recognized", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_GET_METHOD:
+      *s = "HTTP GET method not implemented";
+      break;
+    case SOAP_EOM:
+      *s = "Out of memory";
+      break;
+    case SOAP_IOB:
+      *s = "Array index out of bounds";
+      break;
+    case SOAP_NULL:
+      *s = soap_set_validation_fault(soap, "nil not allowed", NULL);
+      break;
+    case SOAP_DUPLICATE_ID:
+      *s = soap_set_validation_fault(soap, "multiple definitions of id ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:DuplicateID";
+      break;
+    case SOAP_MISSING_ID:
+      *s = soap_set_validation_fault(soap, "missing id for ref ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:MissingID";
+      break;
+    case SOAP_HREF:
+      *s = soap_set_validation_fault(soap, "incompatible object ref ", soap->id);
+      break;
+    case SOAP_FAULT:
+      break;
+#ifndef WITH_NOIO
+    case SOAP_UDP_ERROR:
+      *s = "Message too large for UDP packet";
+      break;
+    case SOAP_TCP_ERROR:
+      *s = tcp_error(soap);
+      break;
+#endif
+    case SOAP_HTTP_ERROR:
+      *s = "HTTP error";
+      break;
+    case SOAP_SSL_ERROR:
+#ifdef WITH_OPENSSL
+      *s = "SSL error";
+#else
+      *s = "OpenSSL not installed: recompile with -DWITH_OPENSSL";
+#endif
+      break;
+    case SOAP_PLUGIN_ERROR:
+      *s = "Plugin registry error";
+      break;
+    case SOAP_DIME_ERROR:
+      *s = "DIME format error";
+      break;
+    case SOAP_DIME_HREF:
+      *s = "DIME href to missing attachment";
+      break;
+    case SOAP_DIME_MISMATCH:
+      *s = "DIME version/transmission error";
+      break;
+    case SOAP_DIME_END:
+      *s = "End of DIME error";
+      break;
+    case SOAP_MIME_ERROR:
+      *s = "MIME format error";
+      break;
+    case SOAP_MIME_HREF:
+      *s = "MIME href to missing attachment";
+      break;
+    case SOAP_MIME_END:
+      *s = "End of MIME error";
+      break;
+    case SOAP_ZLIB_ERROR:
+#ifdef WITH_ZLIB
+      sprintf(soap->msgbuf, "Zlib/gzip error: '%s'", soap->d_stream.msg?soap->d_stream.msg:"");
+      *s = soap->msgbuf;
+#else
+      *s = "Zlib/gzip not installed for (de)compression: recompile with -DWITH_GZIP";
+#endif
+      break;
+    case SOAP_REQUIRED:
+      *s = soap_set_validation_fault(soap, "missing required attribute", NULL);
+      break;
+    case SOAP_PROHIBITED:
+      *s = soap_set_validation_fault(soap, "prohibited attribute present", NULL);
+      break;
+    case SOAP_OCCURS:
+      *s = soap_set_validation_fault(soap, "min/maxOccurs violation", NULL);
+      break;
+    case SOAP_LENGTH:
+      *s = soap_set_validation_fault(soap, "content length violation", NULL);
+      break;
+    case SOAP_STOP:
+      *s = "Stopped: no response sent";
+      break;
+#endif
+    case SOAP_EOF:
+#ifndef WITH_NOIO
+      sprintf(soap->msgbuf, "End of file or no input: '%s'", soap_strerror(soap));
+      *s = soap->msgbuf;
+      break;
+#else
+      *s = "End of file or no input";
+      break;
+#endif
+    default:
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+      if (soap->error > 200 && soap->error < 600)
+      { sprintf(soap->msgbuf, "HTTP Error: %d %s", soap->error, http_error(soap, soap->error));
+        *s = soap->msgbuf;
+      }
+      else
+#endif
+#endif
+      { sprintf(soap->msgbuf, "Error %d", soap->error);
+        *s = soap->msgbuf;
+      }
+    }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_fault(struct soap *soap)
+{ register int status = soap->error;
+  int r = 1;
+  if (status == SOAP_STOP)
+    return status;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Sending back fault struct for error code %d\n", soap->error));
+  soap->keep_alive = 0; /* to terminate connection */
+  soap_set_fault(soap);
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+  if (soap_valid_socket(soap->socket))
+  { struct timeval timeout;
+    fd_set rfd, sfd;
+    timeout.tv_sec = 0;
+    timeout.tv_usec = 0;
+    FD_ZERO(&rfd);
+    FD_ZERO(&sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, NULL, &timeout);
+    if (r > 0)
+    { if (!FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       || (FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        && recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) < 0))
+        r = 0;
+    }
+  }
+#endif
+#endif
+  if ((status != SOAP_EOF || (!soap->recv_timeout && !soap->send_timeout)) && r > 0)
+  { soap->error = SOAP_OK;
+    soap_serializeheader(soap);
+    soap_serializefault(soap);
+    soap_begin_count(soap);
+    if (soap->mode & SOAP_IO_LENGTH)
+    { soap_envelope_begin_out(soap);
+      soap_putheader(soap);
+      soap_body_begin_out(soap);
+      soap_putfault(soap);
+      soap_body_end_out(soap);
+      soap_envelope_end_out(soap);
+    }
+    soap_end_count(soap);
+    if (soap_response(soap, status)
+     || soap_envelope_begin_out(soap)
+     || soap_putheader(soap)
+     || soap_body_begin_out(soap)
+     || soap_putfault(soap)
+     || soap_body_end_out(soap)
+     || soap_envelope_end_out(soap))
+      return soap_closesock(soap);
+    soap_end_send(soap);
+  }
+  soap->error = status;
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_fault(struct soap *soap)
+{ register int status = soap->error;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Receiving SOAP Fault\n"));
+  soap->error = SOAP_OK;
+  if (soap_getfault(soap))
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Error: soap_get_soapfault() failed. Is this a SOAP message at all?\n"));
+    *soap_faultcode(soap) = (soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client");
+    soap->error = status;
+    soap_set_fault(soap);
+  }
+  else
+  { register const char *s = *soap_faultcode(soap);
+    if (!soap_match_tag(soap, s, "SOAP-ENV:Server") || !soap_match_tag(soap, s, "SOAP-ENV:Receiver"))
+      status = SOAP_SVR_FAULT; 
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:Client") || !soap_match_tag(soap, s, "SOAP-ENV:Sender"))
+      status = SOAP_CLI_FAULT;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:MustUnderstand"))
+      status = SOAP_MUSTUNDERSTAND;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:VersionMismatch"))
+      status = SOAP_VERSIONMISMATCH;
+    else
+    { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Fault code %s\n", s));
+      status = SOAP_FAULT;
+    }
+    if (soap_body_end_in(soap)
+     || soap_envelope_end_in(soap)
+     || soap_end_recv(soap))
+      return soap_closesock(soap);
+    soap->error = status;
+  }
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_empty_response(struct soap *soap)
+{ soap->count = 0;
+  if (soap_response(soap, SOAP_OK) || soap_end_send(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_empty_response(struct soap *soap)
+{ if (soap_begin_recv(soap) || soap_end_recv(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+soap_strerror(struct soap *soap)
+{ register int err = soap->errnum;
+  if (err)
+  {
+#ifndef WIN32
+    return strerror(err);
+#else
+    FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, (LPTSTR)&soap->errorstr, sizeof(soap->errorstr), NULL);
+    return soap->errorstr;
+#endif
+  }
+  return "Operation interrupted or timed out";
+}
+#endif
+#endif 
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_set_error(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail, int soaperror)
+{ *soap_faultcode(soap) = faultcode;
+  if (faultsubcode)
+    *soap_faultsubcode(soap) = faultsubcode;
+  *soap_faultstring(soap) = faultstring;
+  if (faultdetail && *faultdetail)
+  { register const char **s = soap_faultdetail(soap);
+    if (s)
+      *s = faultdetail;
+  }
+  return soap->error = soaperror;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_sender_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_receiver_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_copy_fault(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ char *r = NULL, *s = NULL, *t = NULL;
+  if (faultsubcode)
+    r = soap_strdup(soap, faultsubcode);
+  if (faultstring)
+    s = soap_strdup(soap, faultstring);
+  if (faultdetail)
+    t = soap_strdup(soap, faultdetail);
+  return soap_set_error(soap, faultcode, r, s, t, SOAP_FAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_sender_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_receiver_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault(struct soap *soap, FILE *fd)
+{ if (soap_check_state(soap))
+    fprintf(fd, "Error: soap struct not initialized\n");
+  else if (soap->error)
+  { const char *c, *v = NULL, *s, **d;
+    d = soap_faultcode(soap);
+    if (!*d)
+      soap_set_fault(soap);
+    c = *d;
+    if (soap->version == 2)
+      v = *soap_faultsubcode(soap);
+    s = *soap_faultstring(soap);
+    d = soap_faultdetail(soap);
+    fprintf(fd, "%s%d fault: %s [%s]\n\"%s\"\nDetail: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, c, v ? v : "no subcode", s ? s : "[no reason]", d && *d ? *d : "[no detail]");
+  }
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault_location(struct soap *soap, FILE *fd)
+{ 
+#ifndef WITH_LEAN
+  int i, j, c1, c2;
+  if (soap->error && soap->buflen > 0)
+  { i = (int)soap->bufidx - 1;
+    if (i <= 0)
+      i = 0;
+    c1 = soap->buf[i];
+    soap->buf[i] = '\0';
+    if ((int)soap->buflen >= i + 1024)
+      j = i + 1023;
+    else
+      j = (int)soap->buflen - 1;
+    c2 = soap->buf[j];
+    soap->buf[j] = '\0';
+    fprintf(fd, "%s%c\n** HERE **\n", soap->buf, c1);
+    if (soap->bufidx < soap->buflen)
+      fprintf(fd, "%s\n", soap->buf + soap->bufidx);
+    soap->buf[i] = c1;
+    soap->buf[j] = c2;
+  }
+#endif
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void *arg)
+{ register struct soap_plugin *p;
+  register int r;
+  if (!(p = (struct soap_plugin*)SOAP_MALLOC(soap, sizeof(struct soap_plugin))))
+    return soap->error = SOAP_EOM;
+  p->id = NULL;
+  p->data = NULL;
+  p->fcopy = NULL;
+  p->fdelete = NULL;
+  r = fcreate(soap, p, arg);
+  if (!r && p->fdelete)
+  { p->next = soap->plugins;
+    soap->plugins = p;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Registered '%s' plugin\n", p->id));
+    return SOAP_OK;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not register plugin '%s': plugin returned error %d (or fdelete callback not set)\n", p->id?p->id:"?", r));
+  SOAP_FREE(soap, p);
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static void *
+fplugin(struct soap *soap, const char *id)
+{ register struct soap_plugin *p;
+  for (p = soap->plugins; p; p = p->next)
+    if (p->id == id || !strcmp(p->id, id))
+      return p->data;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void *
+SOAP_FMAC2
+soap_lookup_plugin(struct soap *soap, const char *id)
+{ return soap->fplugin(soap, id);
+}
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap()
+{ soap_init(this);
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	C++ soap struct methods
+ *
+\******************************************************************************/
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode mode)
+{ soap_init1(this, mode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode imode, soap_mode omode)
+{ soap_init2(this, imode, omode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(struct soap& soap)
+{ soap_copy_context(this, &soap);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::~soap()
+{ soap_destroy(this);
+  soap_end(this);
+  soap_done(this);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/gsoap-palm/palmsoap1.cpp b/gsoap-palm/palmsoap1.cpp
new file mode 100644
index 0000000..2925f2e
--- /dev/null
+++ b/gsoap-palm/palmsoap1.cpp
@@ -0,0 +1,13449 @@
+#define PALM_1
+/*
+
+stdsoap2.c[pp] 2.7.6e
+
+gSOAP runtime
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+Contributors:
+
+Wind River Systems Inc., for the following additions under gSOAP public license:
+  - vxWorks compatible	(#define VXWORKS)
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+Installation note:
+
+Win32 build needs winsock.dll (Visual C++ "wsock32.lib")
+To do this in Visual C++ 6.0, go to "Project", "settings", select the "Link"
+tab (the project file needs to be selected in the file view) and add
+"wsock32.lib" to the "Object/library modules" entry
+
+On Mac OS X with gcc (GCC) 3.1 20020420 (prerelease) you MUST compile with
+-fstack_check when using -O2 because gcc 3.1 has a bug that smashes the stack
+when locally allocated data exceeds 64K.
+
+*/
+
+#ifdef AS400
+# pragma convert(819)	/* EBCDIC to ASCII */
+#endif
+
+#include "stdsoap2.h"
+
+#ifdef __cplusplus
+SOAP_SOURCE_STAMP("@(#) stdsoap2.cpp ver 2.7.6e 2006-02-18 12:00:00 GMT")
+extern "C" {
+#else
+SOAP_SOURCE_STAMP("@(#) stdsoap2.c ver 2.7.6e 2006-02-18 12:00:00 GMT")
+#endif
+
+/* 8bit character representing unknown/nonrepresentable character data (e.g. not supported by current locale with multibyte support enabled) */
+#ifndef SOAP_UNKNOWN_CHAR
+#define SOAP_UNKNOWN_CHAR (127)
+#endif
+
+/*      EOF=-1 */
+#define SOAP_LT (soap_wchar)(-2) /* XML character '<' */
+#define SOAP_TT (soap_wchar)(-3) /* XML character '</' */
+#define SOAP_GT (soap_wchar)(-4) /* XML character '>' */
+#define SOAP_QT (soap_wchar)(-5) /* XML character '"' */
+#define SOAP_AP (soap_wchar)(-6) /* XML character ''' */
+
+#define soap_blank(c)		((c) >= 0 && (c) <= 32)
+#define soap_notblank(c)	((c) > 32)
+#define soap_hash_ptr(p)	(((unsigned long)(p) >> 3) & (SOAP_PTRHASH - 1))
+
+#ifdef SOAP_DEBUG
+static void soap_init_logs(struct soap*);
+static void soap_close_logfile(struct soap*, int);
+static void soap_set_logfile(struct soap*, int, const char*);
+static void soap_free_mht(struct soap*);
+static void soap_track_unlink(struct soap*, const void*);
+#endif
+
+#ifndef PALM_2
+static int soap_set_error(struct soap*, const char*, const char*, const char*, const char*, int);
+static int soap_copy_fault(struct soap*, const char*, const char*, const char*, const char*);
+static int soap_getattrval(struct soap*, char*, size_t, soap_wchar);
+#endif
+
+#ifndef PALM_1
+static soap_wchar soap_char(struct soap*);
+static soap_wchar soap_get_pi(struct soap*);
+static int soap_isxdigit(int);
+static void *fplugin(struct soap*, const char*);
+#ifndef WITH_NOIDREF
+static void soap_update_ptrs(struct soap*, char*, char*, char*, char*);
+static int soap_has_copies(struct soap*, const char*, const char*);
+static void soap_init_iht(struct soap*);
+static void soap_free_iht(struct soap*);
+static void soap_init_pht(struct soap*);
+static void soap_free_pht(struct soap*);
+#endif
+#endif
+
+#ifndef WITH_LEAN
+static const char *soap_set_validation_fault(struct soap*, const char*, const char*);
+static int soap_isnumeric(struct soap*, const char*);
+static time_t soap_timegm(struct tm*);
+static struct soap_nlist *soap_lookup_ns(struct soap *soap, const char *tag, size_t n);
+static struct soap_nlist *soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized);
+static void soap_pop_ns(struct soap *soap);
+static void soap_utilize_ns(struct soap *soap, const char *tag, size_t n);
+#endif
+
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart *soap_new_multipart(struct soap*, struct soap_multipart**, struct soap_multipart**, char*, size_t);
+static int soap_putdimefield(struct soap*, const char*, size_t);
+static char *soap_getdimefield(struct soap*, size_t);
+static void soap_select_mime_boundary(struct soap*);
+static int soap_valid_mime_boundary(struct soap*);
+static int soap_match_cid(struct soap*, const char*, const char*);
+static void soap_resolve_attachment(struct soap*, struct soap_multipart*);
+#endif
+#endif
+
+#ifdef WITH_GZIP
+static int soap_getgziphdr(struct soap*);
+#endif
+
+#ifdef WITH_OPENSSL
+static int ssl_init_done = 0;
+static int ssl_auth_init(struct soap*);
+static int ssl_verify_callback(int, X509_STORE_CTX*);
+static int ssl_password(char*, int, int, void *);
+static const char *ssl_error(struct soap*, int);
+/* This callback is included for future references. It should not be deleted
+static DH *ssl_tmp_dh(SSL*, int, int);
+*/
+#endif
+
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char *soap_decode(char*, size_t, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar soap_getchunkchar(struct soap*);
+static const char *http_error(struct soap*, int);
+static int http_post(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
+static int http_get(struct soap*);
+static int http_send_header(struct soap*, const char*);
+static int http_post_header(struct soap*, const char*, const char*);
+static int http_response(struct soap*, int, size_t);
+static int http_parse(struct soap*);
+static int http_parse_header(struct soap*, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int fsend(struct soap*, const char*, size_t);
+static size_t frecv(struct soap*, char*, size_t);
+static int tcp_init(struct soap*);
+static const char *tcp_error(struct soap*);
+#ifndef WITH_IPV6
+static int tcp_gethost(struct soap*, const char *addr, struct in_addr *inaddr);
+#endif
+static int tcp_connect(struct soap*, const char *endpoint, const char *host, int port);
+static int tcp_accept(struct soap*, int, struct sockaddr*, int*);
+static int tcp_disconnect(struct soap*);
+static int tcp_closesocket(struct soap*, SOAP_SOCKET);
+static int tcp_shutdownsocket(struct soap*, SOAP_SOCKET, int);
+static const char *soap_strerror(struct soap*);
+#endif
+#endif
+
+#if defined(PALM) && !defined(PALM_2)
+unsigned short errno;
+#endif
+
+#ifndef PALM_1
+static const char soap_env1[42] = "http://schemas.xmlsoap.org/soap/envelope/";
+static const char soap_enc1[42] = "http://schemas.xmlsoap.org/soap/encoding/";
+static const char soap_env2[40] = "http://www.w3.org/2003/05/soap-envelope";
+static const char soap_enc2[40] = "http://www.w3.org/2003/05/soap-encoding";
+static const char soap_rpc[35] = "http://www.w3.org/2003/05/soap-rpc";
+#endif
+
+#ifndef PALM_1
+const struct soap_double_nan soap_double_nan = {0xFFFFFFFF, 0xFFFFFFFF};
+static const char soap_base64o[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+static const char soap_base64i[81] = "\76XXX\77\64\65\66\67\70\71\72\73\74\75XXXXXXX\00\01\02\03\04\05\06\07\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31XXXXXX\32\33\34\35\36\37\40\41\42\43\44\45\46\47\50\51\52\53\54\55\56\57\60\61\62\63";
+#endif
+
+#ifndef WITH_LEAN
+static const char soap_indent[11] = "\n\t\t\t\t\t\t\t\t\t";
+/* Alternative indentation form for SOAP_XML_INDENT:
+static const char soap_indent[21] = "\n                   ";
+*/
+#endif
+
+static const char soap_padding[4] = "\0\0\0";
+#define SOAP_STR_PADDING (soap_padding)
+#define SOAP_STR_EOS (soap_padding)
+#define SOAP_NON_NULL (soap_padding)
+
+#ifndef WITH_LEAN
+static const struct soap_code_map html_entity_codes[] = /* entities for XHTML parsing */
+{ { 160, "nbsp" },
+  { 161, "iexcl" },
+  { 162, "cent" },
+  { 163, "pound" },
+  { 164, "curren" },
+  { 165, "yen" },
+  { 166, "brvbar" },
+  { 167, "sect" },
+  { 168, "uml" },
+  { 169, "copy" },
+  { 170, "ordf" },
+  { 171, "laquo" },
+  { 172, "not" },
+  { 173, "shy" },
+  { 174, "reg" },
+  { 175, "macr" },
+  { 176, "deg" },
+  { 177, "plusmn" },
+  { 178, "sup2" },
+  { 179, "sup3" },
+  { 180, "acute" },
+  { 181, "micro" },
+  { 182, "para" },
+  { 183, "middot" },
+  { 184, "cedil" },
+  { 185, "sup1" },
+  { 186, "ordm" },
+  { 187, "raquo" },
+  { 188, "frac14" },
+  { 189, "frac12" },
+  { 190, "frac34" },
+  { 191, "iquest" },
+  { 192, "Agrave" },
+  { 193, "Aacute" },
+  { 194, "Acirc" },
+  { 195, "Atilde" },
+  { 196, "Auml" },
+  { 197, "Aring" },
+  { 198, "AElig" },
+  { 199, "Ccedil" },
+  { 200, "Egrave" },
+  { 201, "Eacute" },
+  { 202, "Ecirc" },
+  { 203, "Euml" },
+  { 204, "Igrave" },
+  { 205, "Iacute" },
+  { 206, "Icirc" },
+  { 207, "Iuml" },
+  { 208, "ETH" },
+  { 209, "Ntilde" },
+  { 210, "Ograve" },
+  { 211, "Oacute" },
+  { 212, "Ocirc" },
+  { 213, "Otilde" },
+  { 214, "Ouml" },
+  { 215, "times" },
+  { 216, "Oslash" },
+  { 217, "Ugrave" },
+  { 218, "Uacute" },
+  { 219, "Ucirc" },
+  { 220, "Uuml" },
+  { 221, "Yacute" },
+  { 222, "THORN" },
+  { 223, "szlig" },
+  { 224, "agrave" },
+  { 225, "aacute" },
+  { 226, "acirc" },
+  { 227, "atilde" },
+  { 228, "auml" },
+  { 229, "aring" },
+  { 230, "aelig" },
+  { 231, "ccedil" },
+  { 232, "egrave" },
+  { 233, "eacute" },
+  { 234, "ecirc" },
+  { 235, "euml" },
+  { 236, "igrave" },
+  { 237, "iacute" },
+  { 238, "icirc" },
+  { 239, "iuml" },
+  { 240, "eth" },
+  { 241, "ntilde" },
+  { 242, "ograve" },
+  { 243, "oacute" },
+  { 244, "ocirc" },
+  { 245, "otilde" },
+  { 246, "ouml" },
+  { 247, "divide" },
+  { 248, "oslash" },
+  { 249, "ugrave" },
+  { 250, "uacute" },
+  { 251, "ucirc" },
+  { 252, "uuml" },
+  { 253, "yacute" },
+  { 254, "thorn" },
+  { 255, "yuml" },
+  {   0, NULL }
+};
+#endif
+
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+static const struct soap_code_map h_error_codes[] =
+{
+#ifdef HOST_NOT_FOUND   
+  { HOST_NOT_FOUND, "Host not found" },
+#endif
+#ifdef TRY_AGAIN
+  { TRY_AGAIN, "Try Again" },
+#endif
+#ifdef NO_RECOVERY  
+  { NO_RECOVERY, "No Recovery" },
+#endif
+#ifdef NO_DATA
+  { NO_DATA, "No Data" },
+#endif
+#ifdef NO_ADDRESS
+  { NO_ADDRESS, "No Address" },
+#endif
+  { 0, NULL }
+};
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+static const struct soap_code_map h_http_error_codes[] =
+{ { 201, "Created" },
+  { 202, "Accepted" },
+  { 203, "Non-Authoritative Information" },
+  { 204, "No Content" },
+  { 205, "Reset Content" },
+  { 206, "Partial Content" },
+  { 300, "Multiple Choices" },
+  { 301, "Moved Permanently" },
+  { 302, "Found" },
+  { 303, "See Other" },
+  { 304, "Not Modified" },
+  { 305, "Use Proxy" },
+  { 307, "Temporary Redirect" },
+  { 400, "Bad Request" },
+  { 401, "Unauthorized" },
+  { 402, "Payment Required" },
+  { 403, "Forbidden" },
+  { 404, "Not Found" },
+  { 405, "Method Not Allowed" },
+  { 406, "Not Acceptable" },
+  { 407, "Proxy Authentication Required" },
+  { 408, "Request Time-out" },
+  { 409, "Conflict" },
+  { 410, "Gone" },
+  { 411, "Length Required" },
+  { 412, "Precondition Failed" },
+  { 413, "Request Entity Too Large" },
+  { 414, "Request-URI Too Large" },
+  { 415, "Unsupported Media Type" },
+  { 416, "Requested range not satisfiable" },
+  { 417, "Expectation Failed" },
+  { 500, "Internal Server Error" },
+  { 501, "Not Implemented" },
+  { 502, "Bad Gateway" },
+  { 503, "Service Unavailable" },
+  { 504, "Gateway Time-out" },
+  { 505, "HTTP Version not supported" },
+  {   0, NULL }
+};
+#endif
+#endif
+
+#ifdef WITH_OPENSSL
+static const struct soap_code_map h_ssl_error_codes[] =
+{
+#define _SSL_ERROR(e) { e, #e }
+  _SSL_ERROR(SSL_ERROR_SSL),
+  _SSL_ERROR(SSL_ERROR_ZERO_RETURN),
+  _SSL_ERROR(SSL_ERROR_WANT_READ),
+  _SSL_ERROR(SSL_ERROR_WANT_WRITE),
+  _SSL_ERROR(SSL_ERROR_WANT_CONNECT),
+  _SSL_ERROR(SSL_ERROR_WANT_X509_LOOKUP),
+  _SSL_ERROR(SSL_ERROR_SYSCALL),
+  { 0, NULL }
+};
+#endif
+
+#ifndef WITH_LEANER
+static const struct soap_code_map mime_codes[] =
+{ { SOAP_MIME_7BIT,		"7bit" },
+  { SOAP_MIME_8BIT,		"8bit" },
+  { SOAP_MIME_BINARY,		"binary" },
+  { SOAP_MIME_QUOTED_PRINTABLE, "quoted-printable" },
+  { SOAP_MIME_BASE64,		"base64" },
+  { SOAP_MIME_IETF_TOKEN,	"ietf-token" },
+  { SOAP_MIME_X_TOKEN,		"x-token" },
+  { 0,				NULL }
+};
+#endif
+
+#ifdef WIN32
+static int tcp_done = 0;
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+fsend(struct soap *soap, const char *s, size_t n)
+{ register int nwritten;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  if (soap->os)
+  { soap->os->write(s, n);
+    if (soap->os->good())
+      return SOAP_OK;
+    return SOAP_EOF;
+  }
+#endif
+  while (n)
+  { if (soap_valid_socket(soap->socket))
+    { 
+#ifndef WITH_LEAN
+      if (soap->send_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->send_timeout > 0)
+        { timeout.tv_sec = soap->send_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->send_timeout/1000000;
+          timeout.tv_usec = -soap->send_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { register int r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            return SOAP_EOF;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+          { soap->errnum = soap_socket_errno;
+            return SOAP_EOF;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+        nwritten = SSL_write(soap->ssl, s, n);
+      else if (soap->bio)
+        nwritten = BIO_write(soap->bio, s, n);
+      else
+#endif
+#ifdef WITH_UDP
+      if ((soap->omode & SOAP_IO_UDP))
+      { if (soap->peerlen)
+	  nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+        else
+	  nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	/* retry and back-off algorithm */
+	/* TODO: this is not very clear from specs so verify and limit conditions under which we should loop (e.g. ENOBUFS) */
+	if (nwritten < 0)
+        { struct timeval timeout;
+          fd_set fd;
+	  int udp_repeat;
+	  int udp_delay;
+          if ((soap->connect_flags & SO_BROADCAST))
+	    udp_repeat = 3; /* SOAP-over-UDP MULTICAST_UDP_REPEAT - 1 */
+          else
+	    udp_repeat = 1; /* SOAP-over-UDP UNICAST_UDP_REPEAT - 1 */
+	  udp_delay = (soap_random % 201) + 50; /* UDP_MIN_DELAY .. UDP_MAX_DELAY */
+	  do
+          { timeout.tv_sec = 0;
+            timeout.tv_usec = 1000 * udp_delay; /* ms */
+            FD_ZERO(&fd);
+            FD_SET((SOAP_SOCKET)soap->socket, &fd);
+            select((SOAP_SOCKET)(soap->socket + 1), NULL, NULL, &fd, &timeout);
+	    if (soap->peerlen)
+	      nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+            else
+	      nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	    udp_delay <<= 1;
+	    if (udp_delay > 500) /* UDP_UPPER_DELAY */
+	      udp_delay = 500;
+	  }
+	  while (nwritten < 0 && --udp_repeat > 0);
+	}
+      }
+      else
+#endif
+#if !defined(PALM) && !defined(AS400)
+        nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+#else
+        nwritten = send((SOAP_SOCKET)soap->socket, (void*)s, n, soap->socket_flags);
+#endif
+      if (nwritten <= 0)
+      {
+#ifdef WITH_OPENSSL
+	int err;
+        if (soap->ssl && (err = SSL_get_error(soap->ssl, nwritten)) != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return SOAP_EOF;
+#endif
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EWOULDBLOCK && soap_socket_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_socket_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    else
+    {
+#ifdef WITH_FASTCGI
+      nwritten = fwrite((void*)s, 1, n, stdout);
+      fflush(stdout);
+#else
+#ifdef UNDER_CE
+      nwritten = fwrite(s, 1, n, soap->sendfd);
+#else
+#ifdef VXWORKS
+#ifdef WMW_RPM_IO
+      if (soap->rpmreqid)
+        nwritten = (httpBlockPut(soap->rpmreqid, s, n) == 0) ? n : -1; 
+      else
+#endif
+        nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w"));
+#else
+      nwritten = write((SOAP_SOCKET)soap->sendfd, s, n);
+#endif
+#endif
+#endif
+      if (nwritten <= 0)
+      { if (soap_errno != SOAP_EINTR && soap_errno != SOAP_EWOULDBLOCK && soap_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    n -= nwritten;
+    s += nwritten;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_raw(struct soap *soap, const char *s, size_t n)
+{ if (!n)
+    return SOAP_OK;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { soap->count += n;
+#ifndef WITH_LEANER
+    if (soap->fpreparesend && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+  if (soap->mode & SOAP_IO)
+  { register size_t i = SOAP_BUFLEN - soap->bufidx;
+    while (n >= i)
+    { memcpy(soap->buf + soap->bufidx, s, i);
+      soap->bufidx = SOAP_BUFLEN;
+      if (soap_flush(soap))
+        return soap->error;
+      s += i;
+      n -= i;
+      i = SOAP_BUFLEN;
+    }
+    memcpy(soap->buf + soap->bufidx, s, n);
+    soap->bufidx += n;
+    return SOAP_OK;
+  }
+  return soap_flush_raw(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush(struct soap *soap)
+{ register int n = soap->bufidx;
+  if (n)
+  { soap->bufidx = 0;
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { soap->d_stream.next_in = (Byte*)soap->buf;
+      soap->d_stream.avail_in = (unsigned int)n;
+#ifdef WITH_GZIP
+      soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)n);
+#endif
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating %u bytes\n", soap->d_stream.avail_in));
+        if (deflate(&soap->d_stream, Z_NO_FLUSH) != Z_OK)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+          return soap->error = SOAP_ZLIB_ERROR;
+        }
+        if (!soap->d_stream.avail_out)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN))
+            return soap->error;
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (soap->d_stream.avail_in);
+    }
+    else
+#endif
+      return soap_flush_raw(soap, soap->buf, n);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush_raw(struct soap *soap, const char *s, size_t n)
+{ if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+  { register char *t;
+    if (!(t = (char*)soap_push_block(soap, n)))
+      return soap->error = SOAP_EOM;
+    memcpy(t, s, n);
+#ifndef WITH_LEANER
+    if (soap->fpreparesend)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+  { char t[16];
+    sprintf(t, "\r\n%lX\r\n" + (soap->chunksize ? 0 : 2), (unsigned long)n);
+    DBGMSG(SENT, t, strlen(t));
+    if ((soap->error = soap->fsend(soap, t, strlen(t))))
+      return soap->error;
+    soap->chunksize += n;
+  }
+  DBGMSG(SENT, s, n);
+#endif
+  return soap->error = soap->fsend(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send(struct soap *soap, const char *s)
+{ if (s)
+    return soap_send_raw(soap, s, strlen(s));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send2(struct soap *soap, const char *s1, const char *s2)
+{ if (soap_send(soap, s1))
+    return soap->error;
+  return soap_send(soap, s2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send3(struct soap *soap, const char *s1, const char *s2, const char *s3)
+{ if (soap_send(soap, s1)
+   || soap_send(soap, s2))
+    return soap->error;
+  return soap_send(soap, s3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static size_t
+frecv(struct soap *soap, char *s, size_t n)
+{ register int r;
+  soap->errnum = 0;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  if (soap->is)
+  { if (soap->is->good())
+      return soap->is->read(s, n).gcount();
+    return 0;
+  }
+#endif
+  if (soap_valid_socket(soap->socket))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->recv_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->recv_timeout > 0)
+        { timeout.tv_sec = soap->recv_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->recv_timeout/1000000;
+          timeout.tv_usec = -soap->recv_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+	  { soap->errnum = 0;
+            return 0;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+	  { soap->errnum = soap_socket_errno;
+            return 0;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+      { int err;
+	r = SSL_read(soap->ssl, s, n);
+        if (r > 0)
+          return (size_t)r;
+	err = SSL_get_error(soap->ssl, r);
+	if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return 0;
+      }
+      else if (soap->bio)
+      { r = BIO_read(soap->bio, s, n);
+        if (r > 0)
+          return (size_t)r;
+        return 0;
+      }
+      else
+#endif
+      { 
+#ifdef WITH_UDP
+        if ((soap->omode & SOAP_IO_UDP))
+        { SOAP_SOCKLEN_T k = (SOAP_SOCKLEN_T)sizeof(soap->peer);
+	  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+          r = recvfrom((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, &k);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+	  soap->peerlen = (size_t)k;
+#ifndef WITH_IPV6
+          soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+          soap->port = (int)ntohs(soap->peer.sin_port);
+#endif
+        }
+	else
+#endif
+          r = recv((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+        if (r >= 0)
+          return (size_t)r;
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN && soap_socket_errno != SOAP_EWOULDBLOCK)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#ifndef WITH_LEAN
+      { struct timeval timeout;
+        fd_set fd;
+        timeout.tv_sec = 0;
+        timeout.tv_usec = 10000;
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+#ifdef WITH_OPENSSL
+        if (soap->ssl && SSL_get_error(soap->ssl, r) == SSL_ERROR_WANT_WRITE)
+          r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+        else
+          r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#else
+        r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#endif
+        if (r < 0 && soap_socket_errno != SOAP_EINTR)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#endif
+    }
+  }
+#ifdef WITH_FASTCGI
+  return fread(s, 1, n, stdin);
+#else
+#ifdef UNDER_CE
+  return fread(s, 1, n, soap->recvfd);
+#else
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    r = httpBlockRead(soap->rpmreqid, s, n);
+  else
+#endif
+  r = read((SOAP_SOCKET)soap->recvfd, s, n);
+  if (r >= 0)
+    return (size_t)r;
+  soap->errnum = soap_errno;
+  return 0;
+#endif
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar
+soap_getchunkchar(struct soap *soap)
+{ if (soap->bufidx < soap->buflen)
+    return soap->buf[soap->bufidx++];
+  soap->bufidx = 0;
+  soap->buflen = soap->chunkbuflen = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)soap->buflen, soap->socket));
+  DBGMSG(RECV, soap->buf, soap->buflen);
+  if (soap->buflen)
+    return soap->buf[soap->bufidx++];
+  return EOF;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+soap_isxdigit(int c)
+{ return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f');
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_raw(struct soap *soap)
+{ register size_t ret;
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { if (soap->d_stream.next_out == Z_NULL)
+      return EOF;
+    if (soap->d_stream.avail_in || !soap->d_stream.avail_out)
+    { register int r;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflating\n"));
+      soap->d_stream.next_out = (Byte*)soap->buf;
+      soap->d_stream.avail_out = SOAP_BUFLEN;
+      r = inflate(&soap->d_stream, Z_NO_FLUSH);
+      if (r == Z_OK || r == Z_STREAM_END)
+      { soap->bufidx = 0;
+        soap->buflen = SOAP_BUFLEN - soap->d_stream.avail_out;
+        if (soap->zlib_in == SOAP_ZLIB_GZIP)
+          soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+        if (r == Z_STREAM_END)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+          soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+          soap->d_stream.next_out = Z_NULL;
+        }
+        if (soap->buflen)
+        { soap->count += soap->buflen;
+          return SOAP_OK;
+        }
+      }
+      else if (r != Z_BUF_ERROR)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate error: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        soap->d_stream.next_out = Z_NULL;
+	soap->error = SOAP_ZLIB_ERROR;
+        return EOF;
+      }
+    }
+zlib_again:
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK && !soap->chunksize)
+    { memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+      soap->buflen = soap->z_buflen;
+    }
+  }
+#endif
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) /* read HTTP chunked transfer */
+  { 
+chunk_again:
+    if (soap->chunksize)
+    { soap->buflen = ret = soap->frecv(soap, soap->buf, soap->chunksize > SOAP_BUFLEN ? SOAP_BUFLEN : soap->chunksize);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk: read %u bytes\n", (unsigned int)ret));
+      DBGMSG(RECV, soap->buf, ret);
+      soap->bufidx = 0;
+      soap->chunksize -= ret;
+    }
+    else
+    { register soap_wchar c;
+      char *t, tmp[8];
+      t = tmp;
+      if (!soap->chunkbuflen)
+      { soap->chunkbuflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes (chunked) from socket %d\n", (unsigned int)ret, soap->socket));
+        DBGMSG(RECV, soap->buf, ret);
+        soap->bufidx = 0;
+        if (!ret)
+          return soap->ahead = EOF;
+      }
+      else
+        soap->bufidx = soap->buflen;
+      soap->buflen = soap->chunkbuflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk size (idx=%u len=%u)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen));
+      while (!soap_isxdigit((int)(c = soap_getchunkchar(soap))))
+        if ((int)c == EOF)
+	  return soap->ahead = EOF;
+      do
+        *t++ = (char)c;
+      while (soap_isxdigit((int)(c = soap_getchunkchar(soap))) && t - tmp < 7);
+      while ((int)c != EOF && c != '\n')
+        c = soap_getchunkchar(soap);
+      if ((int)c == EOF)
+        return soap->ahead = EOF;
+      *t = '\0';
+      soap->chunksize = soap_strtoul(tmp, &t, 16);
+      if (!soap->chunksize)
+      { soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of chunked message\n"));
+	while ((int)c != EOF && c != '\n')
+          c = soap_getchunkchar(soap);
+        return soap->ahead = EOF;
+      }
+      soap->buflen = soap->bufidx + soap->chunksize;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving buf len to idx=%u len=%u (%s)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen, tmp));
+      if (soap->buflen > soap->chunkbuflen)
+      { soap->buflen = soap->chunkbuflen;
+        soap->chunksize -= soap->buflen - soap->bufidx;
+        soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Passed end of buffer for chunked HTTP (%u bytes left)\n", (unsigned int)(soap->buflen - soap->bufidx)));
+      }
+      else if (soap->chunkbuflen)
+        soap->chunksize = 0;
+      ret = soap->buflen - soap->bufidx;
+      if (!ret)
+        goto chunk_again;
+    }
+  }
+  else
+#endif
+  { soap->bufidx = 0;
+    soap->buflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)ret, soap->socket));
+    DBGMSG(RECV, soap->buf, ret);
+  }
+#ifndef WITH_LEANER
+  if (soap->fpreparerecv && (soap->error = soap->fpreparerecv(soap, soap->buf, ret)))
+    return soap->error;
+#endif
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { register int r;
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = (unsigned int)ret;
+    soap->d_stream.next_out = (Byte*)soap->buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    r = inflate(&soap->d_stream, Z_NO_FLUSH);
+    if (r == Z_OK || r == Z_STREAM_END)
+    { soap->bufidx = 0;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = ret = SOAP_BUFLEN - soap->d_stream.avail_out;
+      if (soap->zlib_in == SOAP_ZLIB_GZIP)
+        soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %u bytes\n", (unsigned int)ret));
+      if (!ret)
+        goto zlib_again;
+      if (r == Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+        soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+        soap->d_stream.next_out = Z_NULL;
+      }
+    }
+    else
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to inflate: (%d) %s\n", r, soap->d_stream.msg?soap->d_stream.msg:""));
+      soap->d_stream.next_out = Z_NULL;
+      soap->error = SOAP_ZLIB_ERROR;
+      return EOF;
+    }
+  }
+#endif
+  soap->count += ret;
+  return !ret;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap->dime.buflen)
+    { char *s;
+      int i;
+      unsigned char tmp[12];
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME hdr for chunked DIME is in buffer\n"));
+      soap->count += soap->dime.buflen - soap->buflen;
+      soap->buflen = soap->dime.buflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Skip padding (%ld bytes)\n", -(long)soap->dime.size&3));
+      for (i = -(long)soap->dime.size&3; i > 0; i--)
+      { soap->bufidx++;
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME hdr for next chunk\n"));
+      s = (char*)tmp;
+      for (i = 12; i > 0; i--)
+      { *s++ = soap->buf[soap->bufidx++];
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      soap->dime.flags = tmp[0] & 0x7;
+      soap->dime.size = ((size_t)tmp[8] << 24) | ((size_t)tmp[9] << 16) | ((size_t)tmp[10] << 8) | ((size_t)tmp[11]);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME chunk (%u bytes)\n", (unsigned int)soap->dime.size));
+      if (soap->dime.flags & SOAP_DIME_CF)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "More chunking\n"));
+        soap->dime.chunksize = soap->dime.size;
+        if (soap->buflen - soap->bufidx >= soap->dime.size)
+        { soap->dime.buflen = soap->buflen;
+          soap->buflen = soap->bufidx + soap->dime.chunksize;
+        }
+        else
+          soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      }
+      else
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Last chunk\n"));
+        soap->dime.buflen = 0;
+        soap->dime.chunksize = 0;
+      }
+      soap->count = soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%u bytes remaining\n", (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+    if (soap->dime.chunksize)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get next DIME hdr for chunked DIME (%u bytes chunk)\n", (unsigned int)soap->dime.chunksize));
+      if (soap_recv_raw(soap))
+        return EOF;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->count -= soap->buflen - soap->bufidx - soap->dime.chunksize;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%lu bytes remaining, count=%u\n", (unsigned long)(soap->buflen-soap->bufidx), (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+  }
+#endif
+  return soap_recv_raw(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getchar(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+    return c;
+  }
+  return soap_get1(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const struct soap_code_map*
+SOAP_FMAC2
+soap_code(const struct soap_code_map *map, const char *str)
+{ if (str)
+  { while (map->string)
+    { if (!strcmp(str, map->string)) /* case sensitive */
+        return map;
+      map++;
+    }
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_int_code(const struct soap_code_map *map, const char *str, long other)
+{ while (map->string)
+  { if (!soap_tag_cmp(str, map->string)) /* case insensitive */
+      return map->code;
+    map++;
+  }
+  return other;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_str_code(const struct soap_code_map *map, long code)
+{ while (map->code != code && map->string)
+    map++;
+  return map->string;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_char(struct soap *soap)
+{ char tmp[8];
+  register int i;
+  register soap_wchar c;
+  register char *s = tmp;
+  for (i = 0; i < 7; i++)
+  { c = soap_get1(soap);
+    if (c == ';' || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+  }
+  *s = '\0';
+  if (*tmp == '#')
+  { if (tmp[1] == 'x' || tmp[1] == 'X')
+      return soap_strtol(tmp + 2, NULL, 16);
+    return atol(tmp + 1);
+  }
+  if (!strcmp(tmp, "lt"))
+    return '<';
+  if (!strcmp(tmp, "gt"))
+    return '>';
+  if (!strcmp(tmp, "amp"))
+    return '&';
+  if (!strcmp(tmp, "quot"))
+    return '"';
+  if (!strcmp(tmp, "apos"))
+    return '\'';
+#ifndef WITH_LEAN
+  return (soap_wchar)soap_int_code(html_entity_codes, tmp, SOAP_UNKNOWN_CHAR);
+#else
+  return SOAP_UNKNOWN_CHAR; /* use this to represent unknown code */
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get0(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx];
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get1(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx++];
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_get(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+  }
+  else
+    c = soap_get1(soap);
+  for (;;)
+  { if (soap->cdata)
+    { if (c == ']')
+      { c = soap_get1(soap);
+        if (c == ']')
+        { soap->cdata = 0;
+          soap_get1(soap); /* skip > */
+          c = soap_get1(soap);
+        }
+	else
+        { soap_revget1(soap);
+          return ']';
+        }
+      }
+      else
+        return c;
+    }
+    switch (c)
+    { case '<':
+        do c = soap_get1(soap);
+        while (soap_blank(c));
+        if (c == '!' || c == '?' || c == '%')
+        { register int k = 1;
+	  if (c == '!')
+          { c = soap_get1(soap);
+            if (c == '[')
+            { do c = soap_get1(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                break;
+              soap->cdata = 1;
+              c = soap_get1(soap);
+	      continue;
+            }
+            if (c == '-' && (c = soap_get1(soap)) == '-')
+            { do
+              { c = soap_get1(soap);
+                if (c == '-' && (c = soap_get1(soap)) == '-')
+                  break;
+              } while ((int)c != EOF);
+            }
+          }
+	  else if (c == '?')
+            c = soap_get_pi(soap);
+          while ((int)c != EOF)
+          { if (c == '<')
+	      k++;
+	    else if (c == '>')
+	    { if (--k <= 0)
+	        break;
+	    }
+	    c = soap_get1(soap);
+	  }
+	  if ((int)c == EOF)
+	    break;
+          c = soap_get1(soap);
+          continue;
+        }
+        if (c == '/')
+          return SOAP_TT;
+        soap_revget1(soap);
+        return SOAP_LT;
+      case '>':
+        return SOAP_GT;
+      case '"':
+        return SOAP_QT;
+      case '\'':
+        return SOAP_AP;
+      case '&':
+        return soap_char(soap) | 0x80000000;
+    }
+    break;
+  }
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_get_pi(struct soap *soap)
+{ char buf[64];
+  register char *s = buf;
+  register int i = sizeof(buf);
+  register soap_wchar c = soap_getchar(soap);
+  /* This is a quick way to parse XML PI and we could use a callback instead to
+   * enable applications to intercept processing instructions */
+  while ((int)c != EOF && c != '?')
+  { if (--i > 0)
+    { if (soap_blank(c))
+        c = ' ';
+      *s++ = (char)c;
+    }
+    c = soap_getchar(soap);
+  }
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML PI <?%s?>\n", buf));
+  if (!strncmp(buf, "xml ", 4))
+  { s = strstr(buf, " encoding=");
+    if (s && s[10])
+    { if (!soap_tag_cmp(s + 11, "iso-8859-1*")
+       || !soap_tag_cmp(s + 11, "latin1*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to latin1 encoding\n"));
+        soap->mode |= SOAP_ENC_LATIN;
+      }
+      else if (!soap_tag_cmp(s + 11, "utf-8*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to utf-8 encoding\n"));
+        soap->mode &= ~SOAP_ENC_LATIN;
+      }
+    }
+  }
+  if ((int)c != EOF)
+    c = soap_getchar(soap);
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_move(struct soap *soap, long n)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving %ld bytes forward\n", (long)n));
+  for (; n > 0; n--)
+    if ((int)soap_getchar(soap) == EOF)
+      return SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_tell(struct soap *soap)
+{ return soap->count - soap->buflen + soap->bufidx - (soap->ahead != 0);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pututf8(struct soap *soap, register unsigned long c)
+{ char tmp[16];
+  if (c > 0 && c < 0x80)
+  { *tmp = (char)c;
+    return soap_send_raw(soap, tmp, 1);
+  }
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { register char *t = tmp;
+    if (c < 0x0800)
+      *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+    else
+    { if (c < 0x010000)
+        *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+      else
+      { if (c < 0x200000)
+          *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+        else
+        { if (c < 0x04000000)
+            *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+          else
+          { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+            *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+        }     
+        *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+      }
+      *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+    }
+    *t++ = (char)(0x80 | (c & 0x3F));
+    *t = '\0';
+  }
+  else
+#endif
+    sprintf(tmp, "&#%lu;", c);
+  return soap_send(soap, tmp);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getutf8(struct soap *soap)
+{ register soap_wchar c, c1, c2, c3, c4;
+  c = soap->ahead;
+  if (c > 0xFF)
+  { soap->ahead = 0;
+    return c;
+  }
+again:
+  c = soap_get(soap);
+  if (c < 0x80 || (soap->mode & SOAP_ENC_LATIN))
+    return c;
+  c1 = soap_get1(soap);
+  if (c1 < 0x80)
+  { soap_revget1(soap); /* doesn't look like this is UTF8 */
+    return c;
+  }
+  c1 &= 0x3F;
+  if (c < 0xE0)
+    return ((soap_wchar)(c & 0x1F) << 6) | c1;
+  c2 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c == 0xEF && c1 == 0x3B && c2 == 0x3F)	/* ignore UTF-8 BOM */
+    goto again;
+  if (c < 0xF0)
+    return ((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2;
+  c3 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xF8)
+    return ((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3;
+  c4 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xFC)
+    return ((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4;
+  return ((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(soap_get1(soap) & 0x3F);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthex(struct soap *soap, const unsigned char *s, int n)
+{ char d[2];
+  register int i;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2hex(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (i = 0; i < n; i++)
+  { register int m = *s++;
+    d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0'));
+    m &= 0x0F;
+    d[1] = (char)(m + (m > 9 ? '7' : '0'));
+    if (soap_send_raw(soap, d, 2))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_gethex(struct soap *soap, int *n)
+{
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_hex2s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register char *s;
+    register int i, k;
+    if (soap_append_lab(soap, NULL, 0))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = soap->lablen;
+    for (i = 0; i < k; i++)
+    { register char d1, d2;
+      register soap_wchar c;
+      c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = (int)(soap->lablen - k + i);
+        p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	if (p)
+	  memcpy(p, soap->labbuf, soap->lablen - k + i);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, SOAP_BLKLEN);
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register char d1, d2;
+      register soap_wchar c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap_end_block(soap);
+	  soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = soap_size_block(soap, i);
+        p = (unsigned char*)soap_save_block(soap, NULL, 0);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putbase64(struct soap *soap, const unsigned char *s, int n)
+{ register int i;
+  register unsigned long m;
+  char d[4];
+  if (!s)
+    return SOAP_OK;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2base64(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      d[i] = '=';
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_getbase64(struct soap *soap, int *n, int malloc_flag)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_base642s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register int i, k;
+    register char *s;
+    if (soap_append_lab(soap, NULL, 2))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = 3 * (soap->lablen / 3);
+    if (!s)
+      return NULL;
+    for (i = 0; i < k - 2; i += 3)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+            *n = (int)(soap->lablen - k + i);
+          p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	  if (p)
+	    memcpy(p, soap->labbuf, soap->lablen - k + i);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, 3 * SOAP_BLKLEN); /* must be multiple of 3 */
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          i *= 3;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n = (int)soap_size_block(soap, i);
+          p = (unsigned char*)soap_save_block(soap, NULL, 0);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_xop_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ /* Check MTOM xop:Include element (within hex/base64Binary) */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  int body = soap->body; /* should save type too? */
+  if (!soap_peek_element(soap))
+  { if (!soap_element_begin_in(soap, "xop:Include", 0) && *soap->href)
+    { if (soap_dime_forward(soap, ptr, size, id, type, options))
+        return soap->error;
+    }
+    if (soap->body && soap_element_end_in(soap, NULL))
+      return soap->error;
+  }
+  soap->body = body;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_dime_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ struct soap_xlist *xp = (struct soap_xlist*)SOAP_MALLOC(soap, sizeof(struct soap_xlist));
+  *ptr = NULL;
+  *size = 0;
+  *id = soap_strdup(soap, soap->href);
+  *type = NULL;
+  *options = NULL;
+  if (!xp)
+    return soap->error = SOAP_EOM;
+  xp->next = soap->xlist;
+  xp->ptr = ptr;
+  xp->size = size;
+  xp->id = *id;
+  xp->type = type;
+  xp->options = options;
+  soap->xlist = xp;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_strdup(struct soap *soap, const char *s)
+{ char *t = NULL;
+  if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1)))
+    strcpy(t, s);
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_new_block(struct soap *soap)
+{ struct soap_blist *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New block sequence (prev=%p)\n", soap->blist));
+  if (!(p = (struct soap_blist*)SOAP_MALLOC(soap, sizeof(struct soap_blist))))
+    return SOAP_EOM;   
+  p->next = soap->blist; 
+  p->ptr = NULL;
+  p->size = 0;
+  soap->blist = p;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_push_block(struct soap *soap, size_t n)
+{ char *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block of %u bytes (%u bytes total)\n", (unsigned int)n, (unsigned int)soap->blist->size + (unsigned int)n));
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(char*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  *(char**)p = soap->blist->ptr;
+  *(size_t*)(p + sizeof(char*)) = n;
+  soap->blist->ptr = p;
+  soap->blist->size += n;
+  return p + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_block(struct soap *soap)
+{ char *p;
+  if (!soap->blist->ptr)
+    return;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block\n"));
+  p = soap->blist->ptr;
+  soap->blist->size -= *(size_t*)(p + sizeof(char*));
+  soap->blist->ptr = *(char**)p;
+  SOAP_FREE(soap, p);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_update_ptrs(struct soap *soap, char *start, char *end, char *p1, char *p2)
+{ int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+#ifndef WITH_LEANER
+  register struct soap_xlist *xp;
+#endif
+  register void *p, **q;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr && (char*)ip->ptr >= start && (char*)ip->ptr < end)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", ip->id, ip->ptr, (char*)ip->ptr + (p1-p2)));
+        ip->ptr = (char*)ip->ptr + (p1-p2);
+      }
+      for (q = &ip->link; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Link update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (q = &ip->copy; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy chain update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (fp = ip->flist; fp; fp = fp->next)
+      { if ((char*)fp->ptr >= start && (char*)fp->ptr < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy list update id='%s' %p\n", ip->id, fp));
+          fp->ptr = (char*)fp->ptr + (p1-p2);
+        }
+      }
+    }
+  }
+#ifndef WITH_LEANER
+  for (xp = soap->xlist; xp; xp = xp->next)
+  { if (xp->ptr && (char*)xp->ptr >= start && (char*)xp->ptr < end)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", xp->id?xp->id:"", xp->ptr, (char*)xp->ptr + (p1-p2)));
+      xp->ptr = (unsigned char**)((char*)xp->ptr + (p1-p2));
+      xp->size = (int*)((char*)xp->size + (p1-p2));
+      xp->type = (char**)((char*)xp->type + (p1-p2));
+      xp->options = (char**)((char*)xp->options + (p1-p2));
+    }
+  }
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static int
+soap_has_copies(struct soap *soap, register const char *start, register const char *end)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  register const char *p;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { for (p = (const char*)ip->copy; p; p = *(const char**)p)
+        if (p >= start && p < end)
+          return SOAP_ERR;
+      for (fp = ip->flist; fp; fp = fp->next)
+        if ((const char*)fp->ptr >= start && (const char*)fp->ptr < end)
+	  return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_resolve(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  short flag;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr)
+      { register void *p, **q, *r;
+        q = (void**)ip->link;
+        ip->link = NULL;
+        r = ip->ptr;
+        DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing link chain to resolve id='%s'\n", ip->id));
+        while (q)
+        { p = *q;
+          *q = r;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "... link %p -> %p\n", q, r));
+          q = (void**)p;
+        }
+      }
+      else if (*ip->id == '#')
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Missing data for id='%s'\n", ip->id));
+        strcpy(soap->id, ip->id + 1);
+        return soap->error = SOAP_MISSING_ID;
+      }
+    }
+  }
+  do
+  { flag = 0;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution phase\n"));
+    for (i = 0; i < SOAP_IDHASH; i++)
+    { for (ip = soap->iht[i]; ip; ip = ip->next)
+      { if (ip->ptr && !soap_has_copies(soap, (const char*)ip->ptr, (const char*)ip->ptr + ip->size))
+        { if (ip->copy)
+          { register void *p, **q = (void**)ip->copy;
+            DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing copy chain to resolve id='%s'\n", ip->id));
+            ip->copy = NULL;
+            do
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... copy %p -> %p (%u bytes)\n", ip->ptr, q, (unsigned int)ip->size));
+	      p = *q;
+              memcpy(q, ip->ptr, ip->size);
+              q = (void**)p;
+            } while (q);
+	    flag = 1;
+	  }
+          for (fp = ip->flist; fp; fp = ip->flist)
+          { register unsigned int k = fp->level;
+	    register void *p = ip->ptr;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data type=%d location=%p level=%u,%u id='%s'\n", ip->type, p, ip->level, fp->level, ip->id));
+	    while (ip->level < k)
+            { register void **q = (void**)soap_malloc(soap, sizeof(void*));  
+	      if (!q)
+	        return soap->error;
+	      *q = p;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level, new location=%p holds=%p...\n", q, *q));
+              p = (void*)q;
+              k--;
+            }
+	    if (fp->fcopy)
+	      fp->fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    else
+	      soap_fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    ip->flist = fp->next;
+	    SOAP_FREE(soap, fp);
+	    flag = 1;
+	  }
+        }
+      }
+    }
+  } while (flag);
+#ifdef SOAP_DEBUG
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->copy || ip->flist)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution error: forwarded data for id='%s' could not be propagated, please report this problem to the developers\n", ip->id));
+      }
+    }
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution done\n"));
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_size_block(struct soap *soap, size_t n)
+{ if (soap->blist->ptr)
+  { soap->blist->size -= *(size_t*)(soap->blist->ptr + sizeof(char*)) - n;
+    *(size_t*)(soap->blist->ptr + sizeof(char*)) = n;
+  }
+  return soap->blist->size;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_first_block(struct soap *soap)
+{ char *p, *q, *r;
+  p = soap->blist->ptr;
+  if (!p)
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "First block\n"));
+  r = NULL;
+  do
+  { q = *(char**)p;
+    *(char**)p = r;
+    r = p;
+    p = q;
+  } while (p);
+  soap->blist->ptr = r;
+  return r + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_next_block(struct soap *soap)
+{ char *p;
+  p = soap->blist->ptr;
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n"));
+    soap->blist->ptr = *(char**)p;
+    SOAP_FREE(soap, p);
+    if (soap->blist->ptr)
+      return soap->blist->ptr + sizeof(char*) + sizeof(size_t);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_block_size(struct soap *soap)
+{ return *(size_t*)(soap->blist->ptr + sizeof(char*));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end_block(struct soap *soap)
+{ struct soap_blist *bp;
+  char *p, *q;
+  bp = soap->blist;
+  if (bp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of block sequence, free all remaining blocks\n"));
+    for (p = bp->ptr; p; p = q)
+    { q = *(char**)p;
+      SOAP_FREE(soap, p);
+    }
+    soap->blist = bp->next;
+    SOAP_FREE(soap, bp);
+  }
+  DBGLOG(TEST, if (soap->blist) SOAP_MESSAGE(fdebug, "Restore previous block sequence\n"));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_save_block(struct soap *soap, char *p, int flag)
+{ register size_t n;
+  register char *q, *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Save all blocks in contiguous memory space of %u bytes (%p->%p)\n", (unsigned int)soap->blist->size, soap->blist->ptr, p));
+  if (soap->blist->size)
+  { if (!p)
+      p = (char*)soap_malloc(soap, soap->blist->size);
+    if (p)
+    { for (s = p, q = soap_first_block(soap); q; q = soap_next_block(soap))
+      { n = soap_block_size(soap);
+#ifndef WITH_NOIDREF
+        if (flag)
+	  soap_update_ptrs(soap, q, q + n, s, q);
+#endif
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy %u bytes from %p to %p\n", (unsigned int)n, q, s));
+        memcpy(s, q, n);
+        s += n;
+      }
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  soap_end_block(soap);
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsize(struct soap *soap, const char *type, int size)
+{ return soap_putsizes(soap, type, &size, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizes(struct soap *soap, const char *type, const int *size, int dim)
+{ return soap_putsizesoffsets(soap, type, size, NULL, dim);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim)
+{ int i;
+  if (!type)
+    return NULL;
+  if (soap->version == 2)
+  { sprintf(soap->type, "%s[%d", type, size[0]);
+    for (i = 1; i < dim; i++)
+      sprintf(soap->type + strlen(soap->type), " %d", size[i]);
+  }
+  else
+  { if (offset)
+    { sprintf(soap->type, "%s[%d", type, size[0] + offset[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i] + offset[i]);
+    }
+    else
+    { sprintf(soap->type, "%s[%d", type, size[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i]);
+    }
+    strcat(soap->type, "]");
+  }
+  return soap->type;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffset(struct soap *soap, int offset)
+{ return soap_putoffsets(soap, &offset, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffsets(struct soap *soap, const int *offset, int dim)
+{ register int i;
+  sprintf(soap->arrayOffset, "[%d", offset[0]);
+  for (i = 1; i < dim; i++)
+    sprintf(soap->arrayOffset + strlen(soap->arrayOffset), ",%d", offset[i]);
+  strcat(soap->arrayOffset, "]");
+  return soap->arrayOffset;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_size(const int *size, int dim)
+{ register int i, n = size[0];
+  for (i = 1; i < dim; i++)
+    n *= size[i];
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getoffsets(const char *attr, const int *size, int *offset, int dim)
+{ register int i, j = 0;
+  if (offset)
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += offset[i] = (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  else
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  return j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsize(const char *attr1, const char *attr2, int *j)
+{ register int n, k;
+  char *s;
+  *j = 0;
+  if (!*attr1)
+    return -1;
+  if (*attr1 == '[')
+    attr1++;
+  n = 1;
+  for (;;)
+  { k = (int)soap_strtol(attr1, &s, 10);
+    n *= k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE || s == attr1)
+      return -1;
+    attr1 = strchr(s, ',');
+    if (!attr1)
+      attr1 = strchr(s, ' ');
+    if (attr2 && *attr2)
+    { attr2++;
+      *j *= k;
+      k = (int)soap_strtol(attr2, &s, 10);
+      *j += k;
+      if (k < 0)
+        return -1;
+      attr2 = s;
+    }
+    if (!attr1)
+      break;
+    attr1++;
+  }
+  return n - *j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsizes(const char *attr, int *size, int dim)
+{ register int i, k, n;
+  if (!*attr)
+    return -1;
+  i = strlen(attr);
+  n = 1;
+  do
+  { for (i = i-1; i >= 0; i--)
+      if (attr[i] == '[' || attr[i] == ',' || attr[i] == ' ')
+        break;
+    k = (int)atol(attr + i + 1);
+    n *= size[--dim] = k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE)
+      return -1;
+  } while (i >= 0 && attr[i] != '[');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getposition(const char *attr, int *pos)
+{ register int i, n;
+  if (!*attr)
+    return -1;
+  n = 0;
+  i = 1;
+  do
+  { pos[n++] = (int)atol(attr + i);
+    while (attr[i] && attr[i] != ',' && attr[i] != ']')
+      i++;
+    if (attr[i] == ',')
+      i++;
+  } while (n < SOAP_MAXDIMS && attr[i] && attr[i] != ']');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_push_namespace(struct soap *soap, const char *id, const char *ns)
+{ register struct soap_nlist *np;
+  register struct Namespace *p;
+  register short i = -1;
+  register size_t n, k;
+  n = strlen(id);
+  k = strlen(ns) + 1;
+  p = soap->local_namespaces;
+  if (p)
+  { for (i = 0; p->id; p++, i++)
+    { if (p->ns && !strcmp(ns, p->ns))
+      { if (p->out)
+        { SOAP_FREE(soap, p->out);
+          p->out = NULL;
+        }
+        break;
+      }
+      if (p->out)
+      { if (!strcmp(ns, p->out))
+          break;
+      }
+      else if (p->in)
+      { if (!soap_tag_cmp(ns, p->in))
+        { if ((p->out = (char*)SOAP_MALLOC(soap, k)))
+            strcpy(p->out, ns);
+          break;
+        }
+      }
+    }
+    if (!p || !p->id)
+      i = -1;
+  }
+  if (i >= 0)
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k);
+  if (!np)
+    return soap->error = SOAP_EOM;
+  np->next = soap->nlist;
+  soap->nlist = np;
+  np->level = soap->level;
+  np->index = i;
+  strcpy(np->id, id);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns));
+  if (i < 0)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push NOT OK: no match found for '%s' in namespace mapping table (added to stack anyway)\n", ns));
+  }
+  else
+  { np->ns = NULL;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push OK ('%s' matches '%s' in namespace table)\n", id, p->id));
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_namespace(struct soap *soap)
+{ register struct soap_nlist *np;
+  while (soap->nlist && soap->nlist->level >= soap->level)
+  { np = soap->nlist->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Popped namespace binding (level=%u) '%s'\n", soap->level, soap->nlist->id));
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_namespace(struct soap *soap, const char *id1, const char *id2, int n1, int n2) 
+{ register struct soap_nlist *np = soap->nlist;
+  while (np && (strncmp(np->id, id1, n1) || np->id[n1]))
+    np = np->next;
+  if (np)
+  { if (np->index < 0
+     || (soap->local_namespaces[np->index].id
+      && (strncmp(soap->local_namespaces[np->index].id, id2, n2)
+       || soap->local_namespaces[np->index].id[n2])))
+      return SOAP_NAMESPACE;
+    return SOAP_OK;
+  }
+  if (n1 == 3 && n1 == n2 && !strcmp(id1, "xml") && !strcmp(id1, id2))
+    return SOAP_OK;
+  return SOAP_SYNTAX_ERROR; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_current_namespace(struct soap *soap, const char *tag)
+{ register struct soap_nlist *np;
+  register const char *s;
+  np = soap->nlist;
+  if (!(s = strchr(tag, ':')))
+  { while (np && *np->id) /* find default namespace, if present */
+      np = np->next;
+  }
+  else
+  { while (np && (strncmp(np->id, tag, s - tag) || np->id[s - tag]))
+      np = np->next;
+    if (!np)
+      soap->error = SOAP_NAMESPACE;
+  }
+  if (np)
+  { if (np->index >= 0)
+      return soap->namespaces[np->index].ns;
+    if (np->ns)
+      return soap_strdup(soap, np->ns);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_tag_cmp(const char *s, const char *t)
+{ for (;;)
+  { register int c1 = *s;
+    register int c2 = *t;
+    if (!c1 || c1 == '"')
+      break;
+    if (c2 != '-')
+    { if (c1 != c2)
+      { if (c1 >= 'A' && c1 <= 'Z')
+          c1 += 'a' - 'A';
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+      }
+      if (c1 != c2)
+      { if (c2 != '*')
+          return 1;
+	c2 = *++t;
+        if (!c2)
+	  return 0;
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+        for (;;)
+        { c1 = *s;
+	  if (!c1 || c1 == '"')
+	    break;
+	  if (c1 >= 'A' && c1 <= 'Z')
+            c1 += 'a' - 'A';
+          if (c1 == c2 && !soap_tag_cmp(s + 1, t + 1))
+            return 0;
+	  s++;
+        }
+        break;
+      }
+    }
+    s++;
+    t++;
+  }
+  if (*t == '*' && !t[1])
+    return 0;
+  return *t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_tag(struct soap *soap, const char *tag1, const char *tag2)
+{ register const char *s, *t;
+  if (!tag1 || !tag2 || !*tag2)
+    return SOAP_OK;
+  s = strchr(tag1, ':');
+  t = strchr(tag2, ':');
+  if (t)
+  { if (s)
+    { if (t[1] && SOAP_STRCMP(s + 1, t + 1))
+        return SOAP_TAG_MISMATCH;
+      if (t != tag2 && soap_match_namespace(soap, tag1, tag2, s - tag1, t - tag2))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+        return SOAP_TAG_MISMATCH;
+      }
+    } 
+    else if (SOAP_STRCMP(tag1, t + 1))
+      return SOAP_TAG_MISMATCH;
+    else if (t != tag2 && soap_match_namespace(soap, tag1, tag2, 0, t - tag2))
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+      return SOAP_TAG_MISMATCH;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags and (default) namespaces match: '%s' '%s'\n", tag1, tag2));
+    return SOAP_OK;
+  }
+  if (s)
+  { if (SOAP_STRCMP(s + 1, tag2))
+      return SOAP_TAG_MISMATCH;
+  }
+  else if (SOAP_STRCMP(tag1, tag2))
+    return SOAP_TAG_MISMATCH;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags match: '%s' '%s'\n", tag1, tag2));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_array(struct soap *soap, const char *type)
+{ if (*soap->arrayType)
+    if (soap_match_tag(soap, soap->arrayType, type)
+     && soap_match_tag(soap, soap->arrayType, "xsd:anyType")
+     && soap_match_tag(soap, soap->arrayType, "xsd:ur-type")
+    )
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array type mismatch: '%s' '%s'\n", soap->arrayType, type));
+      return SOAP_TAG_MISMATCH;
+    }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************\
+ *
+ *	SSL
+ *
+\******************************************************************************/
+
+#ifdef WITH_OPENSSL
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_rand()
+{ unsigned char buf[4];
+  if (!ssl_init_done)
+    soap_ssl_init();
+  RAND_pseudo_bytes(buf, 4);
+  return *(int*)buf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *dhfile, const char *randfile, const char *sid)
+{ int err;
+  soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  if (dhfile)
+  { soap->dhfile = dhfile;
+    soap->rsa = 0;
+  }
+  else
+  { soap->dhfile = NULL;
+    soap->rsa = 1;
+  }
+  soap->randfile = randfile;
+  soap->require_client_auth = (flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION);
+  if (!(err = soap->fsslauth(soap)))
+  { if (sid)
+      SSL_CTX_set_session_id_context(soap->ctx, (unsigned char*)sid, strlen(sid));
+  }
+  return err; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_client_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *randfile)
+{ soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  soap->dhfile = NULL;
+  soap->rsa = 0;
+  soap->randfile = randfile;
+  soap->require_server_auth = (flags & SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION);
+  return soap->fsslauth(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_ssl_init()
+{ /* Note: for MT systems, the main program MUST call soap_ssl_init() before any threads are started */
+  if (!ssl_init_done)
+  { ssl_init_done = 1;
+    SSL_library_init();
+#ifndef WITH_LEAN
+    SSL_load_error_strings();
+#endif
+    if (!RAND_load_file("/dev/urandom", 1024))
+    { char buf[1024];
+      RAND_seed(buf, sizeof(buf));
+      while (!RAND_status())
+      { int r = rand();
+        RAND_seed(&r, sizeof(int));
+      }
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static const char *
+ssl_error(struct soap *soap, int ret)
+{ int err = SSL_get_error(soap->ssl, ret);
+  const char *msg = soap_str_code(h_ssl_error_codes, err);
+  if (msg)
+    strcpy(soap->msgbuf, msg);
+  else
+    return ERR_error_string(err, soap->msgbuf);
+  if (ERR_peek_error())
+  { unsigned long r;
+    strcat(soap->msgbuf, "\n");
+    while ((r = ERR_get_error()))
+      ERR_error_string_n(r, soap->msgbuf + strlen(soap->msgbuf), sizeof(soap->msgbuf) - strlen(soap->msgbuf));
+  } 
+  else
+  { switch (ret)
+    { case 0:
+        strcpy(soap->msgbuf, "EOF was observed that violates the protocol. The client probably provided invalid authentication information.");
+        break;
+      case -1:
+        sprintf(soap->msgbuf, "Error observed by underlying BIO: %s", strerror(errno));  
+        break;
+    }
+  }
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_password(char *buf, int num, int rwflag, void *userdata)
+{ if (num < (int)strlen((char*)userdata) + 1)
+    return 0;
+  return strlen(strcpy(buf, (char*)userdata));
+}
+#endif
+
+/******************************************************************************/
+/* This callback is included for future references. It should not be deleted
+#ifndef PALM_2
+static DH *
+ssl_tmp_dh(SSL *ssl, int is_export, int keylength)
+{ static DH *dh512 = NULL;
+  static DH *dh1024 = NULL;
+  DH *dh;
+  switch (keylength)
+  { case 512:
+      if (!dh512)
+      { BIO *bio = BIO_new_file("dh512.pem", "r");
+        if (bio)
+        { dh512 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+          return dh512;
+        }
+      }
+      else
+        return dh512;
+    default:
+      if (!dh1024)
+      { BIO *bio = BIO_new_file("dh1024.pem", "r");
+        if (bio)
+        { dh1024 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+        }
+      }
+      dh = dh1024;
+  }
+  return dh;
+}
+#endif
+*/
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_auth_init(struct soap *soap)
+{ if (!ssl_init_done)
+    soap_ssl_init();
+  if (!soap->ctx)
+  { if (!(soap->ctx = SSL_CTX_new(SSLv23_method())))
+      return soap_set_receiver_error(soap, "SSL error", "Can't setup context", SOAP_SSL_ERROR);
+  }
+  if (soap->randfile)
+  { if (!RAND_load_file(soap->randfile, -1))
+      return soap_set_receiver_error(soap, "SSL error", "Can't load randomness", SOAP_SSL_ERROR);
+  }
+  if (soap->cafile || soap->capath)
+  { if (!SSL_CTX_load_verify_locations(soap->ctx, soap->cafile, soap->capath))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read CA file and directory", SOAP_SSL_ERROR);
+    if (soap->cafile && soap->require_client_auth)
+      SSL_CTX_set_client_CA_list(soap->ctx, SSL_load_client_CA_file(soap->cafile));
+  }
+  if (!SSL_CTX_set_default_verify_paths(soap->ctx))
+    return soap_set_receiver_error(soap, "SSL error", "Can't read default CA file and/or directory", SOAP_SSL_ERROR);
+/* See below */
+  if (soap->keyfile)
+  { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read certificate key file", SOAP_SSL_ERROR);
+    if (soap->password)
+    { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+      SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+    }
+    if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+  }
+/* Suggested alternative approach to check cafile first before the key file:
+  if (soap->password)
+  { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+    SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+  }
+  if (!soap->cafile || !SSL_CTX_use_certificate_chain_file(soap->ctx, soap->cafile))
+  { if (soap->keyfile)
+    { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read certificate or key file", SOAP_SSL_ERROR);
+      if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+    }
+  }
+*/
+  if (soap->rsa)
+  { RSA *rsa = RSA_generate_key(1024, RSA_F4, NULL, NULL);
+    if (!SSL_CTX_set_tmp_rsa(soap->ctx, rsa))
+    { if (rsa)
+        RSA_free(rsa);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set RSA key", SOAP_SSL_ERROR);
+    }
+    RSA_free(rsa);
+  }
+  else if (soap->dhfile)
+  { DH *dh = 0;
+    BIO *bio;
+    bio = BIO_new_file(soap->dhfile, "r");
+    if (!bio)
+      return soap_set_receiver_error(soap, "SSL error", "Can't read DH file", SOAP_SSL_ERROR);
+    dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+    BIO_free(bio);
+    if (SSL_CTX_set_tmp_dh(soap->ctx, dh) < 0)
+    { if (dh)
+        DH_free(dh);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set DH parameters", SOAP_SSL_ERROR);
+    }
+    DH_free(dh);
+  }
+  SSL_CTX_set_options(soap->ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2);
+  SSL_CTX_set_verify(soap->ctx, soap->require_client_auth ? (SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT) : soap->require_server_auth ? SSL_VERIFY_PEER : SSL_VERIFY_NONE, soap->fsslverify);
+#if (OPENSSL_VERSION_NUMBER < 0x00905100L)
+  SSL_CTX_set_verify_depth(soap->ctx, 1); 
+#else
+  SSL_CTX_set_verify_depth(soap->ctx, 9); 
+#endif  
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_verify_callback(int ok, X509_STORE_CTX *store)
+{
+#ifdef SOAP_DEBUG
+  if (!ok) 
+  { char data[256];
+    X509 *cert = X509_STORE_CTX_get_current_cert(store);
+    fprintf(stderr, "SSL verify error or warning with certificate at depth %d: %s\n", X509_STORE_CTX_get_error_depth(store), X509_verify_cert_error_string(X509_STORE_CTX_get_error(store)));
+    X509_NAME_oneline(X509_get_issuer_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate issuer %s\n", data);
+    X509_NAME_oneline(X509_get_subject_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate subject %s\n", data);
+  }
+#endif
+  /* Note: return 1 to continue, but unsafe progress will be terminated by SSL */
+  return ok;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_accept(struct soap *soap)
+{ BIO *bio;
+  int i, r;
+  if (!soap_valid_socket(soap->socket))
+    return soap_set_receiver_error(soap, "SSL error", "No socket in soap_ssl_accept()", SOAP_SSL_ERROR);
+  if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    return SOAP_INVALID_SOCKET;
+  if (!soap->ssl)
+  { soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+      return soap_set_receiver_error(soap, "SSL error", "SSL_new() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+  }
+  else
+    SSL_clear(soap->ssl);
+  soap->imode |= SOAP_ENC_SSL;
+  soap->omode |= SOAP_ENC_SSL;
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&nonblocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)|O_NONBLOCK);
+#endif
+  bio = BIO_new_socket((SOAP_SOCKET)soap->socket, BIO_NOCLOSE);
+  SSL_set_bio(soap->ssl, bio, bio);
+  i = 100; /* 100 * 0.1 ms retries */
+  while ((r = SSL_accept(soap->ssl)) <= 0)
+  { int err = SSL_get_error(soap->ssl, r);
+    if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE)
+    { struct timeval timeout;
+      fd_set fd;
+      if (i-- <= 0)
+        break;
+      timeout.tv_sec = 0;
+      timeout.tv_usec = 100000;
+      FD_ZERO(&fd);
+      FD_SET((SOAP_SOCKET)soap->socket, &fd);
+      r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+      if (r < 0 && soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        return SOAP_EOF;
+      }
+    }
+    else
+    { soap->errnum = err;
+      break;
+    }
+  }
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&blocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+  if (r <= 0)
+  { soap_set_receiver_error(soap, ssl_error(soap, r), "SSL_accept() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+    soap_closesock(soap);
+    return SOAP_SSL_ERROR;
+  }
+  if (soap->require_client_auth)
+  { X509 *peer;
+    int err;
+    if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    peer = SSL_get_peer_certificate(soap->ssl);
+    if (!peer)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    X509_free(peer);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#endif /* WITH_OPENSSL */
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_init(struct soap *soap)
+{ soap->errmode = 1;
+#ifdef WIN32
+  if (tcp_done)
+    return 0;
+  else
+  { WSADATA w;
+    if (WSAStartup(MAKEWORD(1, 1), &w))
+      return -1;
+    tcp_done = 1;
+  }
+#endif
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_done(struct soap *soap)
+{ 
+#ifdef SOAP_DEBUG
+  int i;
+#endif
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  while (soap->clist)
+  { struct soap_clist *p = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = p;
+  }
+  soap->keep_alive = 0; /* to force close the socket */
+  soap_closesock(soap);
+#ifdef WITH_COOKIES
+  soap_free_cookies(soap);
+#endif
+  while (soap->plugins)
+  { register struct soap_plugin *p = soap->plugins->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Removing plugin '%s'\n", soap->plugins->id));
+    if (soap->plugins->fcopy || soap->state == SOAP_INIT)
+      soap->plugins->fdelete(soap, soap->plugins);
+    SOAP_FREE(soap, soap->plugins);
+    soap->plugins = p;
+  }
+  soap->fplugin = fplugin;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+#ifdef WITH_OPENSSL
+  if (soap->session)
+  { SSL_SESSION_free(soap->session);
+    soap->session = NULL;
+  }
+#endif
+  if (soap->state == SOAP_INIT)
+  { if (soap_valid_socket(soap->master))
+    { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+      soap->master = SOAP_INVALID_SOCKET;
+    }
+#ifdef WITH_OPENSSL
+    if (soap->ctx)
+    { SSL_CTX_free(soap->ctx);
+      soap->ctx = NULL;
+    }
+#endif
+  }
+#ifdef SOAP_DEBUG
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free logfiles\n"));
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { if (soap->logfile[i])
+    { SOAP_FREE(soap, (void*)soap->logfile[i]);
+      soap->logfile[i] = NULL;
+    }
+    soap_close_logfile(soap, i);
+  }
+  soap_free_mht(soap);
+  soap->state = 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_cleanup(struct soap *soap)
+{ soap_done(soap);
+#ifdef WIN32
+  if (!tcp_done)
+    return;
+  tcp_done = 0;
+  WSACleanup();
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+tcp_error(struct soap *soap)
+{ register const char *msg = NULL;
+  switch (soap->errmode)
+  { case 0:
+      msg = soap_strerror(soap);
+      break;
+    case 1:
+      msg = "WSAStartup failed";
+      break;
+    case 2:
+    {
+#ifndef WITH_LEAN
+      msg = soap_str_code(h_error_codes, soap->errnum);
+      if (!msg)
+#endif
+      { sprintf(soap->msgbuf, "TCP/UDP IP error %d", soap->errnum);
+        msg = soap->msgbuf;
+      }
+    }
+  }
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static const char*
+http_error(struct soap *soap, int status)
+{ register const char *msg = SOAP_STR_EOS;
+#ifndef WITH_LEAN
+  msg = soap_str_code(h_http_error_codes, status);
+  if (!msg)
+    msg = SOAP_STR_EOS;
+#endif
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_IPV6
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr)
+{ soap_int32 iadd = -1;
+  struct hostent hostent, *host = &hostent;
+#ifdef VXWORKS
+  int hostint;
+  /* inet_addr(), and hostGetByName() expect "char *"; addr is a "const char *". */
+  iadd = inet_addr((char*)addr);
+#else
+#if defined(_AIXVERSION_431) || defined(TRU64)
+  struct hostent_data ht_data;
+#endif
+#ifdef AS400
+  iadd = inet_addr((void*)addr);
+#else
+  iadd = inet_addr(addr);
+#endif
+#endif
+  if (iadd != -1)
+  { memcpy(inaddr, &iadd, sizeof(iadd));
+    return SOAP_OK;
+  }
+#if defined(__GLIBC__)
+  if (gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &host, &soap->errnum) < 0)
+    host = NULL;
+#elif defined(_AIXVERSION_431) || defined(TRU64)
+  memset((void*)&ht_data, 0, sizeof(ht_data));
+  if (gethostbyname_r(addr, &hostent, &ht_data) < 0)
+  { host = NULL;
+    soap->errnum = h_errno;
+  }
+#elif defined(HAVE_GETHOSTBYNAME_R)
+  host = gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &soap->errnum);
+#elif defined(VXWORKS)
+  /* If the DNS resolver library resolvLib has been configured in the vxWorks
+   * image, a query for the host IP address is sent to the DNS server, if the
+   * name was not found in the local host table. */
+  hostint = hostGetByName((char*)addr);
+  if (hostint == ERROR)
+  { host = NULL;
+    soap->errnum = soap_errno; 
+  }
+#else
+#ifdef AS400
+  if (!(host = gethostbyname((void*)addr)))
+    soap->errnum = h_errno;
+#else
+  if (!(host = gethostbyname(addr)))
+    soap->errnum = h_errno;
+#endif
+#endif
+  if (!host)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Host name not found\n"));
+    return SOAP_ERR;
+  }
+#ifdef VXWORKS
+  inaddr->s_addr = hostint;
+#else
+  memcpy(inaddr, host->h_addr, host->h_length);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_connect(struct soap *soap, const char *endpoint, const char *host, int port)
+{
+#ifdef WITH_IPV6
+  struct addrinfo hints, *res, *ressave;
+  int err;
+#endif
+  register int fd;
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->socket))
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+  soap->socket = SOAP_INVALID_SOCKET;
+  if (tcp_init(soap))
+  { soap->errnum = 0;
+    soap_set_sender_error(soap, tcp_error(soap), "TCP init failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->errmode = 0;
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+    err = getaddrinfo(soap->proxy_host, soap_int2s(soap, soap->proxy_port), &hints, &res);
+  else
+    err = getaddrinfo(host, soap_int2s(soap, port), &hints, &res);
+  if (err)
+  { soap_set_sender_error(soap, gai_strerror(err), "getaddrinfo failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  ressave = res;
+again:
+  fd = (int)socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+  soap->errmode = 0;
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    fd = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    fd = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  if (fd < 0)
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "socket failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_flags & SO_LINGER)
+  { struct linger linger;
+    memset((void*)&linger, 0, sizeof(linger));
+    linger.l_onoff = 1;
+    linger.l_linger = 0;
+    if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+    { soap->errnum = soap_socket_errno;
+      soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  if ((soap->connect_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, soap->connect_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (soap->keep_alive && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)fd, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Opening socket %d to host='%s' port=%d\n", fd, host, port));
+#ifndef WITH_IPV6
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+  { if (soap->fresolve(soap, soap->proxy_host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get proxy host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)soap->proxy_port);
+  }
+  else
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)port);
+  }
+  soap->errmode = 0;
+  if ((soap->omode & SOAP_IO_UDP))
+    return fd;
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking)); /* modified to use fd */
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+  else
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  for (;;)
+  { 
+#ifdef WITH_IPV6
+    if (connect((SOAP_SOCKET)fd, res->ai_addr, res->ai_addrlen))
+#else
+    if (connect((SOAP_SOCKET)fd, (struct sockaddr*)&soap->peer, sizeof(soap->peer)))
+#endif
+    { 
+#ifndef WITH_LEAN
+      if (soap->connect_timeout && (soap_socket_errno == SOAP_EINPROGRESS || soap_socket_errno == SOAP_EWOULDBLOCK))
+      { struct timeval timeout;
+        SOAP_SOCKLEN_T k;
+        fd_set fds;
+        if (soap->connect_timeout > 0)
+        { timeout.tv_sec = soap->connect_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->connect_timeout/1000000;
+          timeout.tv_usec = -soap->connect_timeout%1000000;
+        }
+        FD_ZERO(&fds);
+        FD_SET((SOAP_SOCKET)fd, &fds);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(fd + 1), NULL, &fds, NULL, &timeout);
+          if (r > 0)
+	    break;
+          if (!r)
+          { soap->errnum = 0;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+            soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+            soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+	k = (SOAP_SOCKLEN_T)sizeof(soap->errnum);
+        if (!getsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_ERROR, (char*)&soap->errnum, &k) && !soap->errnum)	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+          break;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap->errnum = soap_socket_errno;
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      else
+#endif
+#ifdef WITH_IPV6
+      if (res->ai_next)
+      { res = res->ai_next;
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        goto again;
+      }
+      else
+#endif
+      if (soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }  
+    else
+      break;
+  }
+#ifdef WITH_IPV6
+  soap->peerlen = 0; /* IPv6: already connected so use send() */
+  freeaddrinfo(ressave);
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  soap->socket = fd;
+  soap->imode &= ~SOAP_ENC_SSL;
+  soap->omode &= ~SOAP_ENC_SSL;
+  if (!strncmp(endpoint, "https:", 6))
+  {
+#ifdef WITH_OPENSSL
+    BIO *bio;
+    int r;
+    if (soap->proxy_host)
+    { short v;
+      unsigned int k = soap->omode; /* make sure we only parse HTTP */
+      size_t n = soap->count; /* save the content length */
+      char *userid, *passwd;
+      soap->omode &= ~SOAP_ENC; /* mask IO and ENC */
+      soap->omode |= SOAP_IO_BUFFER;
+      soap_begin_send(soap);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connecting to proxy server\n"));
+      sprintf(soap->tmpbuf, "CONNECT %s:%d HTTP/%s", host, port, soap->http_version);
+      if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+#ifndef WITH_LEAN
+      if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+      { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+        strcpy(soap->tmpbuf, "Basic ");
+        soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+        if ((soap->error = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+        { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return soap->error;
+        }
+      }
+#endif
+      if ((soap->error = soap->fposthdr(soap, NULL, NULL))
+       || soap_flush(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->omode = k;
+      k = soap->imode;
+      soap->imode &= ~SOAP_ENC; /* mask IO and ENC */
+      v = soap->version; /* preserve */
+      userid = soap->userid; /* preserve */
+      passwd = soap->passwd; /* preserve */
+      if (soap_begin_recv(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->userid = userid; /* restore */
+      soap->passwd = passwd; /* restore */
+      soap->version = v; /* restore */
+      soap->imode = k; /* restore */
+      soap->count = n; /* restore */
+      soap_begin_send(soap);
+    }
+    if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    { soap_set_sender_error(soap, "SSL error", "SSL authentication failed in tcp_connect(): check password, key file, and ca file.", SOAP_SSL_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+    { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      soap->error = SOAP_SSL_ERROR;
+      return SOAP_INVALID_SOCKET;
+    }
+    if (soap->session)
+    { if (!strcmp(soap->session_host, host) && soap->session_port == port)
+        SSL_set_session(soap->ssl, soap->session);
+      SSL_SESSION_free(soap->session);
+      soap->session = NULL;
+    }
+    soap->imode |= SOAP_ENC_SSL;
+    soap->omode |= SOAP_ENC_SSL;
+    bio = BIO_new_socket((SOAP_SOCKET)fd, BIO_NOCLOSE);
+    SSL_set_bio(soap->ssl, bio, bio);
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#if defined(WIN32)
+    { u_long nonblocking = 1;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+    }
+#elif defined(VXWORKS)
+    { u_long nonblocking = 1;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+#endif
+    for (;;)
+    { if ((r = SSL_connect(soap->ssl)) <= 0)
+      { int err = SSL_get_error(soap->ssl, r);
+        if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+        { soap_set_sender_error(soap, ssl_error(soap, r), "SSL connect failed in tcp_connect()", SOAP_SSL_ERROR);
+          soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (soap->connect_timeout)
+        { struct timeval timeout;
+          fd_set fds;
+          if (soap->connect_timeout > 0)
+          { timeout.tv_sec = soap->connect_timeout;
+            timeout.tv_usec = 0;
+          }
+          else
+          { timeout.tv_sec = -soap->connect_timeout/1000000;
+            timeout.tv_usec = -soap->connect_timeout%1000000;
+          }
+          FD_ZERO(&fds);
+          FD_SET((SOAP_SOCKET)fd, &fds);
+          for (;;)
+          { int r = select((SOAP_SOCKET)(fd + 1), &fds, NULL, &fds, &timeout);
+            if (r > 0)
+	      break;
+            if (!r)
+            { soap->errnum = 0;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+              soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+              soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+              return SOAP_INVALID_SOCKET;
+            }
+          }
+	  continue;
+        }
+      }
+      break;
+    }
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#ifdef WIN32
+    { u_long blocking = 0;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+    }
+#elif defined(VXWORKS)
+    { u_long blocking = 0;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+    if (soap->require_server_auth)
+    { X509 *peer;
+      int err;
+      if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+      { soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      peer = SSL_get_peer_certificate(soap->ssl);
+      if (!peer)
+      { soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      X509_NAME_get_text_by_NID(X509_get_subject_name(peer), NID_commonName, soap->msgbuf, sizeof(soap->msgbuf));
+      X509_free(peer);
+      if (soap_tag_cmp(soap->msgbuf, host))
+      { soap_set_sender_error(soap, "SSL error", "SSL certificate host name mismatch in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+#else
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    soap->error = SOAP_SSL_ERROR;
+    return SOAP_INVALID_SOCKET;
+#endif
+  }
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_bind(struct soap *soap, const char *host, int port, int backlog)
+{
+#ifdef WITH_IPV6
+  struct addrinfo *addrinfo = NULL;
+  struct addrinfo hints;
+  struct addrinfo res;
+  int err;
+#endif
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->master))
+  { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+    soap->master = SOAP_INVALID_SOCKET;
+  }
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 1;
+  if (tcp_init(soap))
+  { soap_set_receiver_error(soap, tcp_error(soap), "TCP init failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  hints.ai_flags = AI_PASSIVE;
+  soap->errmode = 2;
+  err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo);
+  if (addrinfo)
+  { res = *addrinfo;
+    soap->peer = *((struct sockaddr_storage*)addrinfo->ai_addr);
+    soap->peerlen = addrinfo->ai_addrlen;
+    res.ai_addr = (struct sockaddr*)&soap->peer;
+    res.ai_addrlen = soap->peerlen;
+    freeaddrinfo(addrinfo);
+  }
+  if (err)
+  { soap_set_receiver_error(soap, gai_strerror(err), "getaddrinfo failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->master = socket(res.ai_family, res.ai_socktype, res.ai_protocol);
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->master = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    soap->master = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  soap->errmode = 0;
+  if (!soap_valid_socket(soap->master))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "socket failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->socket = soap->master;
+#endif
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)soap->master, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(soap->master, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->bind_flags && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, soap->bind_flags, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->master, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+#ifdef WITH_IPV6
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, res.ai_addr, res.ai_addrlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+#else
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (host)
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_receiver_error(soap, tcp_error(soap), "get host by name failed in soap_bind()", SOAP_TCP_ERROR);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  else
+    soap->peer.sin_addr.s_addr = htonl(INADDR_ANY);
+  soap->peer.sin_port = htons((short)port);
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, (struct sockaddr*)&soap->peer, soap->peerlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+  if (!(soap->omode & SOAP_IO_UDP) && listen((SOAP_SOCKET)soap->master, backlog))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "listen failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+  return soap->master;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_poll(struct soap *soap)
+{ 
+#ifndef WITH_LEAN
+  struct timeval timeout;
+  fd_set rfd, sfd, xfd;
+  int r;
+  timeout.tv_sec = 0;
+  timeout.tv_usec = 0;
+  FD_ZERO(&rfd);
+  FD_ZERO(&sfd);
+  FD_ZERO(&xfd);
+  if (soap_valid_socket(soap->socket))
+  { FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &xfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, &xfd, &timeout);
+    if (r > 0 && FD_ISSET((SOAP_SOCKET)soap->socket, &xfd))
+      r = -1;
+  }
+  else if (soap_valid_socket(soap->master))
+  { FD_SET((SOAP_SOCKET)soap->master, &sfd);
+    r = select((SOAP_SOCKET)(soap->master + 1), NULL, &sfd, NULL, &timeout);
+  }
+  else
+    return SOAP_OK;
+  if (r > 0)
+  {
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+    {
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || SSL_peek(soap->ssl, soap->tmpbuf, 1) > 0))
+        return SOAP_OK;
+    }
+    else
+#endif
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) > 0))
+        return SOAP_OK;
+  }
+  else if (r < 0)
+  { soap->errnum = soap_socket_errno;
+    if ((soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) && soap_socket_errno != SOAP_EINTR)
+    { soap_set_receiver_error(soap, tcp_error(soap), "select failed in soap_poll()", SOAP_TCP_ERROR);
+      return soap->error = SOAP_TCP_ERROR;
+    }
+  }
+  else
+    soap->errnum = 0;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Polling: other end down on socket=%d select=%d\n", soap->socket, r));
+  return SOAP_EOF;
+#else
+  return SOAP_OK;
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_accept(struct soap *soap, int s, struct sockaddr *a, int *n)
+{ int fd;
+  fd = (int)accept((SOAP_SOCKET)s, a, (SOAP_SOCKLEN_T*)n);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, FD_CLOEXEC);
+#endif
+#endif
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_accept(struct soap *soap)
+{ int n = (int)sizeof(soap->peer);
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  soap->error = SOAP_OK;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    return soap->socket = soap->master;
+#endif
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 0;
+  soap->keep_alive = 0;
+  if (soap_valid_socket(soap->master))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->accept_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->accept_timeout > 0)
+        { timeout.tv_sec = soap->accept_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->accept_timeout/1000000;
+          timeout.tv_usec = -soap->accept_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->master, &fd);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(soap->master + 1), &fd, &fd, NULL, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            soap_set_receiver_error(soap, "Timeout", "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            soap_closesock(soap);
+            soap_set_sender_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+#if defined(WIN32)
+	{ u_long nonblocking = 1;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &nonblocking);
+        }
+#elif defined(VXWORKS)
+        { u_long nonblocking = 1;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&nonblocking));
+        }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)|O_NONBLOCK);
+#endif
+      }
+      else
+#if defined(WIN32)
+      { u_long blocking = 0;
+        ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+      }
+#elif defined(VXWORKS)
+      { u_long blocking = 0;
+        ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+      }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+      soap->socket = soap->faccept(soap, soap->master, (struct sockaddr*)&soap->peer, &n);
+      soap->peerlen = (size_t)n;
+      if (soap_valid_socket(soap->socket))
+      {
+#ifdef WITH_IPV6
+/* Use soap->host to store the numeric form of the remote host */
+        getnameinfo((struct sockaddr*)&soap->peer, n, soap->host, sizeof(soap->host), NULL, 0, NI_NUMERICHOST | NI_NUMERICSERV); 
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d from %s\n", soap->socket, soap->host));
+        soap->ip = 0; /* info stored in soap->peer and soap->host */
+        soap->port = 0; /* info stored in soap->peer and soap->host */
+#else
+        soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+        soap->port = (int)ntohs(soap->peer.sin_port); /* does not return port number on some systems */
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d at port %d from IP %d.%d.%d.%d\n", soap->socket, soap->port, (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF));
+#endif
+#ifndef WITH_LEAN
+	if (soap->accept_flags & SO_LINGER)
+        { struct linger linger;
+          memset((void*)&linger, 0, sizeof(linger));
+          linger.l_onoff = 1;
+          linger.l_linger = 0;
+	  if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+          { soap->errnum = soap_socket_errno;
+	    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in soap_accept()", SOAP_TCP_ERROR);
+	    soap_closesock(soap);
+            return SOAP_INVALID_SOCKET;
+	  }
+        }
+        if ((soap->accept_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, soap->accept_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#ifdef TCP_NODELAY
+        if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->socket, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#endif
+#endif
+        if (soap->accept_timeout)
+        {
+#if defined(WIN32)
+          u_long blocking = 0;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+          ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+#elif defined(VXWORKS)
+          u_long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+          ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)(&blocking));
+#elif defined(PALM)
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL,0)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL,0)&~O_NONBLOCK);
+#elif defined(SYMBIAN)
+          long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, 0/*FIONBIO*/, &blocking);
+#else
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+	}
+        soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+        return soap->socket;
+      }
+      if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept failed from %s\n", soap->host));
+        soap->errnum = soap_socket_errno;
+        soap_set_receiver_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+	soap_closesock(soap);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+  }
+  else
+  { soap->errnum = 0;
+    soap_set_receiver_error(soap, tcp_error(soap), "no master socket in soap_accept()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_disconnect(struct soap *soap)
+{
+#ifdef WITH_OPENSSL
+  if (soap->ssl)
+  { int r, s = 0;
+    if (soap->session)
+      SSL_SESSION_free(soap->session);
+    if (*soap->host)
+    { soap->session = SSL_get1_session(soap->ssl);
+      if (soap->session)
+      { strcpy(soap->session_host, soap->host);
+        soap->session_port = soap->port;
+      }
+    }
+    r = SSL_shutdown(soap->ssl);
+    if (r != 1)
+    { s = ERR_get_error();
+      if (s)
+      { if (soap_valid_socket(soap->socket))
+        { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1);
+          soap->socket = SOAP_INVALID_SOCKET;
+        }
+        r = SSL_shutdown(soap->ssl);
+      }
+    }
+    DBGLOG(TEST, if (s) SOAP_MESSAGE(fdebug, "Shutdown failed: %d\n", SSL_get_error(soap->ssl, r)));
+    SSL_free(soap->ssl);
+    soap->ssl = NULL;
+    if (s)
+      return SOAP_SSL_ERROR;
+    ERR_remove_state(0);
+  }
+#endif
+  if (soap_valid_socket(soap->socket) && !(soap->omode & SOAP_IO_UDP))
+  { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 2);
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+    soap->socket = SOAP_INVALID_SOCKET;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_closesocket(struct soap *soap, SOAP_SOCKET fd)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Close socket %d\n", (int)fd));
+  return closesocket(fd);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_shutdownsocket(struct soap *soap, SOAP_SOCKET fd, int how)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Shutdown socket %d how=%d\n", (int)fd, how));
+  return shutdown(fd, how);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_closesock(struct soap *soap)
+{ register int status = soap->error;
+  if (status == SOAP_EOF || status == SOAP_TCP_ERROR || status == SOAP_SSL_ERROR || !soap->keep_alive)
+  { if (soap->fclose && (soap->error = soap->fclose(soap)))
+      return soap->error;
+    soap->keep_alive = 0;
+  }
+#ifdef WITH_ZLIB
+  if (soap->zlib_state == SOAP_ZLIB_DEFLATE)
+    deflateEnd(&soap->d_stream);
+  else if (soap->zlib_state == SOAP_ZLIB_INFLATE)
+    inflateEnd(&soap->d_stream);
+  soap->zlib_state = SOAP_ZLIB_NONE;
+#endif
+  return soap->error = status;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_hash(register const char *s)
+{ register size_t h = 0;
+  while (*s)
+    h = 65599*h + *s++;
+  return h % SOAP_IDHASH;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_pht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing pointer hashtable\n"));
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new1(soap_mode mode)
+{ return soap_new2(mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new()
+{ return soap_new2(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new2(soap_mode imode, soap_mode omode)
+{ struct soap *soap = (struct soap*)malloc(sizeof(struct soap));
+  if (soap)
+    soap_init2(soap, imode, omode);
+  return soap;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_del(struct soap *soap)
+{ free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_pht(struct soap *soap)
+{ register struct soap_pblk *pb, *next;
+  register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free pointer hashtable\n"));
+  for (pb = soap->pblk; pb; pb = next)
+  { next = pb->next;
+    SOAP_FREE(soap, pb);
+  }
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type)
+{ register int i;
+  struct soap_plist *pp;
+  if (soap->version != 1)
+    soap->encoding = 1;
+  if (a)
+    i = soap_array_pointer_lookup(soap, p, a, n, type, &pp);
+  else
+    i = soap_pointer_lookup(soap, p, type, &pp);
+  if (i)
+  { if (soap_is_embedded(soap, pp)
+     || soap_is_single(soap, pp))
+      return 0;
+    soap_set_embedded(soap, pp);
+  }
+  return i;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_lookup(struct soap *soap, const void *p, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (p)
+  { for (pp = soap->pht[soap_hash_ptr(p)]; pp; pp = pp->next)
+    { if (pp->ptr == p && pp->type == type)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d id=%d\n", p, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d: not found\n", p, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_enter(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register int h;
+  register struct soap_plist *pp;
+  if (!soap->pblk || soap->pidx >= SOAP_PTRBLK)
+  { register struct soap_pblk *pb = (struct soap_pblk*)SOAP_MALLOC(soap, sizeof(struct soap_pblk));
+    if (!pb)
+    { soap->error = SOAP_EOM;
+      return 0;
+    }
+    pb->next = soap->pblk;
+    soap->pblk = pb;
+    soap->pidx = 0;
+  }
+  *ppp = pp = &soap->pblk->plist[soap->pidx++];
+  if (a)
+    h = soap_hash_ptr(a->__ptr);
+  else
+    h = soap_hash_ptr(p);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pointer enter location=%p array=%p size=%d dim=%d type=%d id=%d\n", p, a?a->__ptr:NULL, a?a->__size:0, n, type, soap->idnum+1));
+  pp->next = soap->pht[h];
+  pp->type = type;
+  pp->mark1 = 0;
+  pp->mark2 = 0;
+  pp->ptr = p;
+  pp->array = a;
+  soap->pht[h] = pp;
+  pp->id = ++soap->idnum;
+  return pp->id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_pointer_lookup(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (!p || !a->__ptr)
+    return 0;
+  for (pp = soap->pht[soap_hash_ptr(a->__ptr)]; pp; pp = pp->next)
+  { if (pp->type == type && pp->array && pp->array->__ptr == a->__ptr)
+    { register int i;
+      for (i = 0; i < n; i++)
+        if (((const int*)&pp->array->__size)[i] != ((const int*)&a->__size)[i])
+	  break;
+      if (i == n)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d id=%d\n", a->__ptr, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d: not found\n", a->__ptr, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_count(struct soap *soap)
+{ soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) || (soap->omode & SOAP_ENC_DIME))
+    soap->mode = soap->omode | SOAP_IO_LENGTH | SOAP_ENC_DIME;
+  else
+#endif
+  { soap->mode = soap->omode;
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE
+     || (((soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_ENC_XML))
+#ifndef WITH_LEANER
+      && !soap->fpreparesend
+#endif
+      ))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    else
+      soap->mode |= SOAP_IO_LENGTH;
+  }
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (!(soap->mode & SOAP_ENC_DIME))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+    soap->mode |= SOAP_ENC_MIME;
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+  soap->dime.list = soap->dime.last;	/* keep track of last DIME attachment */
+#endif
+  soap->count = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->part = SOAP_BEGIN;
+  soap->idnum = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin count phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+#ifndef WITH_LEANER
+  soap->dime.count = 0; /* count # of attachments */
+  soap->dime.size = 0; /* accumulate total size of attachments */
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+    return soap->error = soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_count(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->fpreparefinal)
+    return soap->error = soap->fpreparefinal(soap);
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of count phase\n"));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_send(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+  soap->mode = soap->omode | (soap->mode & (SOAP_IO_LENGTH | SOAP_ENC_DIME));
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+#ifdef WITH_UDP
+  if ((soap->mode & SOAP_IO_UDP))
+  { soap->mode |= SOAP_ENC_XML;
+    if (soap->count > SOAP_BUFLEN)
+      return soap->error = SOAP_UDP_ERROR;
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_FLUSH && soap_valid_socket(soap->socket))
+  { if (soap->count || (soap->mode & SOAP_IO_LENGTH) || (soap->mode & SOAP_ENC_XML))
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+  soap->mode &= ~SOAP_IO_LENGTH;
+  if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap_new_block(soap);
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+  { soap->mode |= SOAP_ENC_MIME;
+    soap->mode &= ~SOAP_ENC_DIME;
+  }
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket)) /* Set win32 stdout or soap->sendfd to BINARY, e.g. to support DIME */
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->sendfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->sendfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#endif
+  if (soap->mode & SOAP_IO)
+  { soap->bufidx = 0;
+    soap->buflen = 0;
+  }
+  soap->chunksize = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+#ifdef WITH_ZLIB
+  soap->z_ratio_out = 1.0;
+  if ((soap->mode & SOAP_ENC_ZLIB) && soap->zlib_state != SOAP_ZLIB_DEFLATE)
+  {
+#ifdef WITH_GZIP
+    memcpy(soap->z_buf, "\37\213\10\0\0\0\0\0\0\377", 10);
+    soap->d_stream.next_out = (Byte*)soap->z_buf + 10;
+    soap->d_stream.avail_out = SOAP_BUFLEN - 10;
+    soap->z_crc = crc32(0L, NULL, 0);
+    if (deflateInit2(&soap->d_stream, soap->z_level, Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY) != Z_OK)
+#else
+    soap->d_stream.next_out = (Byte*)soap->z_buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    if (deflateInit(&soap->d_stream, soap->z_level) != Z_OK)
+#endif
+      return soap->error = SOAP_ZLIB_ERROR;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflate initialized\n"));
+    soap->zlib_state = SOAP_ZLIB_DEFLATE;
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin send phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+  soap->part = SOAP_BEGIN;
+#ifndef WITH_LEANER
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_embedded(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { pp->mark1 = 1;
+    pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded %p type=%d mark set to 1\n", p, t));
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_reference(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (!p || (soap->mode & SOAP_XML_TREE))
+    return 1;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (soap_pointer_enter(soap, p, NULL, 0, t, &pp))
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  else
+    return 1;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reference %p type=%d (%d %d)\n", p, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_reference(struct soap *soap, const void *p, const struct soap_array *a, int n, int t)
+{ register int i;
+  struct soap_plist *pp;
+  if (!p || !a->__ptr)
+    return 1;
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (i)
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (!soap_pointer_enter(soap, p, a, n, t, &pp))
+    return 1;
+  else
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array reference %p ptr=%p dim=%d type=%d (%d %d)\n", p, a->__ptr, n, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embedded_id(struct soap *soap, int id, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap->mode & SOAP_XML_TREE)
+    return id;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id %p type=%d id=%d\n", p, t, id));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (id < 0)
+    { id = soap_pointer_lookup(soap, p, t, &pp);
+      if (id)
+      { if (soap->mode & SOAP_IO_LENGTH)
+          pp->mark1 = 2;
+        else
+          pp->mark2 = 2;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id multiref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+      }
+      return -1;
+    }
+    return id;
+  }
+  if (id < 0)
+    id = soap_pointer_lookup(soap, p, t, &pp);
+  else if (id && !soap_pointer_lookup(soap, p, t, &pp))
+    return 0;
+  if (id && pp)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      pp->mark1 = 1;
+    else
+      pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id embedded ref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+  }
+  return id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Is embedded? %d %d\n", (int)pp->mark1, (int)pp->mark2));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      return pp->mark1 != 0;
+    return pp->mark2 != 0;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 1;
+  return pp->mark2 == 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_single(struct soap *soap, struct soap_plist *pp)
+{ if (soap->part == SOAP_IN_HEADER)
+    return 1;
+  if (!pp)
+    return 0;
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 0;
+  return pp->mark2 == 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return;
+  if (soap->mode & SOAP_IO_LENGTH)
+    pp->mark1 = 1;
+  else
+    pp->mark2 = 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attachment(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, const char *aid, const char *atype, const char *aoptions, int n, const char *type, int t) 
+{ struct soap_plist *pp;
+  int i;
+  if (!p || !a->__ptr || (!aid && !atype))
+    return soap_element_id(soap, tag, id, p, a, n, type, t);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Attachment tag='%s' id='%s' (%d) type='%s'\n", tag, aid?aid:"", id, atype?atype:""));
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (!i)
+  { i = soap_pointer_enter(soap, p, a, n, t, &pp);
+    if (!i)
+    { soap->error = SOAP_EOM;
+      return -1;
+    }
+  }
+  if (id <= 0)
+    id = i;
+  if (!aid)
+  { sprintf(soap->tmpbuf, soap->dime_id_format, id);
+    aid = soap_strdup(soap, soap->tmpbuf);
+  }
+  /* Add MTOM xop:Include element when necessary */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  if ((soap->mode & SOAP_ENC_MTOM) && strcmp(tag, "xop:Include"))
+  { if (soap_element_begin_out(soap, tag, 0, type)
+     || soap_element_href(soap, "xop:Include", 0, "href", aid)
+     || soap_element_end_out(soap, tag))
+      return soap->error;
+  }
+  else if (soap_element_href(soap, tag, 0, "href", aid))
+    return soap->error;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { if (pp->mark1 != 3)
+    { struct soap_multipart *content;
+      if (soap->mode & SOAP_ENC_MTOM)
+        content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, (char*)a->__ptr, a->__size);
+      else
+        content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, (char*)a->__ptr, a->__size);
+      if (!content)
+      { soap->error = SOAP_EOM;
+        return -1;
+      }
+      if (!strncmp(aid, "cid:", 4)) /* RFC 2111 */
+      { if (soap->mode & SOAP_ENC_MTOM)
+        { char *s = (char*)soap_malloc(soap, strlen(aid) - 1);
+	  if (s)
+	  { *s = '<';
+	    strcpy(s + 1, aid + 4);
+	    strcat(s, ">");
+	    content->id = s;
+          }
+        }
+        else
+          content->id = aid + 4;
+      }
+      else
+        content->id = aid;
+      content->type = atype;
+      content->options = aoptions;
+      content->encoding = SOAP_MIME_BINARY;
+      pp->mark1 = 3;
+    }
+  }
+  else
+    pp->mark2 = 3;
+  return -1;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_iht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+    soap->iht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_iht(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip, *p;
+  register struct soap_flist *fp, *fq;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = p)
+    { for (fp = ip->flist; fp; fp = fq)
+      { fq = fp->next;
+        SOAP_FREE(soap, fp);
+      }
+      p = ip->next;
+      SOAP_FREE(soap, ip);
+    }
+    soap->iht[i] = NULL;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_lookup(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  for (ip = soap->iht[soap_hash(id)]; ip; ip = ip->next)
+    if (!strcmp(ip->id, id))
+      return ip;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_enter(struct soap *soap, const char *id)
+{ register size_t h;
+  register struct soap_ilist *ip;
+  ip = (struct soap_ilist*)SOAP_MALLOC(soap, sizeof(struct soap_ilist) + strlen(id));
+  if (ip)
+  { h = soap_hash(id);
+    strcpy(ip->id, id);
+    ip->next = soap->iht[h];
+    soap->iht[h] = ip;
+    return ip;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_malloc(struct soap *soap, size_t n)
+{ register char *p;
+  if (!n)
+    return (void*)SOAP_NON_NULL;
+  if (!soap)
+    return SOAP_MALLOC(soap, n);
+  n += (-(long)n) & (sizeof(void*)-1); /* align at 4-, 8- or 16-byte boundary */
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(void*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  /* keep chain of alloced cells for later destruction */
+  soap->alloced = 1;
+  *(void**)(p + n) = soap->alist;
+  *(size_t*)(p + n + sizeof(void*)) = n;
+  soap->alist = p + n;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_mht(struct soap *soap)
+{ register int i;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->mht[i] = NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_free_mht(struct soap *soap)
+{ register int i;
+  register struct soap_mlist *mp, *mq;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+  { for (mp = soap->mht[i]; mp; mp = mq)
+    { mq = mp->next;
+      if (mp->live)
+        fprintf(stderr, "%s(%d): malloc() = %p not freed (memory leak or forgot to call soap_end()?)\n", mp->file, mp->line, mp->ptr);
+      free(mp);
+    }
+    soap->mht[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_track_malloc(struct soap *soap, const char *file, int line, size_t size)
+{ register void *p = malloc(size);
+  if (soap)
+  { register int h = soap_hash_ptr(p);
+    register struct soap_mlist *mp = (struct soap_mlist*)malloc(sizeof(struct soap_mlist));
+    if (soap->fdebug[SOAP_INDEX_TEST])
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): malloc(%lu) = %p\n", file, line, (unsigned long)size, p));
+    mp->next = soap->mht[h];
+    mp->ptr = p;
+    mp->file = file;
+    mp->line = line;
+    mp->live = 1;
+    soap->mht[h] = mp;
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_track_free(struct soap *soap, const char *file, int line, void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+  { if (mp->live)
+    { free(p);
+      if (soap->fdebug[SOAP_INDEX_TEST])
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): free(%p)\n", file, line, p));
+      mp->live = 0;
+    }
+    else
+      fprintf(stderr, "%s(%d): free(%p) double free of pointer malloced at %s(%d)\n", file, line, p, mp->file, mp->line);
+  }
+  else
+    fprintf(stderr, "%s(%d): free(%p) pointer not malloced\n", file, line, p);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_track_unlink(struct soap *soap, const void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+    mp->live = 0;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_dealloc(struct soap *soap, void *p)
+{ if (!soap)
+    return;
+  if (p)
+  { register char **q;
+    for (q = (char**)&soap->alist; *q; q = *(char***)q)
+    { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+      { *q = **(char***)q;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Freed data at %p\n", p));
+        SOAP_FREE(soap, p);
+        return;
+      }
+    }
+    soap_delete(soap, p);
+  }
+  else
+  { register char *q;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free all soap_malloc() data\n"));
+    while (soap->alist)
+    { q = (char*)soap->alist;
+      soap->alist = *(void**)q;
+      q -= *(size_t*)(q + sizeof(void*));
+      SOAP_FREE(soap, q);
+    }
+  }
+  /* we must assume these were deallocated: */
+  soap->action = NULL;
+  soap->fault = NULL;
+  soap->header = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->authrealm = NULL;
+#ifndef WITH_LEANER
+  soap_clr_mime(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_delete(struct soap *soap, void *p)
+{ register struct soap_clist **cp;
+  if (soap_check_state(soap))
+    return;
+  cp = &soap->clist;
+  if (p)
+  { while (*cp)
+    { if (p == (*cp)->ptr)
+      { register struct soap_clist *q = *cp;
+        *cp = q->next;
+        q->fdelete(q);
+        SOAP_FREE(soap, q);
+        return;
+      }
+      cp = &(*cp)->next;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: address not in list\n", p));
+  }
+  else
+  { while (*cp)
+    { register struct soap_clist *q = *cp;
+      *cp = q->next;
+      if (q->ptr == (void*)soap->fault)
+        soap->fault = NULL; /* this was deallocated */
+      else if (q->ptr == (void*)soap->header)
+        soap->header = NULL; /* this was deallocated */
+      q->fdelete(q);
+      SOAP_FREE(soap, q);
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_clist *
+SOAP_FMAC2
+soap_link(struct soap *soap, void *p, int t, int n, void (*fdelete)(struct soap_clist*))
+{ register struct soap_clist *cp;
+  if ((cp = (struct soap_clist*)SOAP_MALLOC(soap, sizeof(struct soap_clist))))
+  { cp->next = soap->clist;
+    cp->type = t;
+    cp->size = n; 
+    cp->ptr = p;
+    cp->fdelete = fdelete;
+    soap->clist = cp;
+  }
+  return cp;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_unlink(struct soap *soap, const void *p)
+{ register char **q;
+  register struct soap_clist **cp;
+  if (!soap || !p)
+    return;
+  for (q = (char**)&soap->alist; *q; q = *(char***)q)
+  { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+    { *q = **(char***)q;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked data %p\n", p));
+#ifdef SOAP_DEBUG
+      soap_track_unlink(soap, p);
+#endif
+      return;
+    }
+  }
+  for (cp = &soap->clist; *cp; cp = &(*cp)->next)
+  { if (p == (*cp)->ptr)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked class instance %p\n", p));
+      q = (char**)*cp;
+      *cp = (*cp)->next;
+      SOAP_FREE(soap, q);
+      return;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_lookup_type(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  if (id && *id)
+  { ip = soap_lookup(soap, id);
+    if (ip)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup id='%s' type=%d\n", id, ip->type));
+      return ip->type;
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "lookup type id='%s' NOT FOUND! Need to get it from xsi:type\n", id));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, unsigned int k)
+{ struct soap_ilist *ip;
+  void **q;
+  if (!p || !id || !*id)
+    return p;
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding first href='%s' type=%d %p (%u bytes)\n", id, t, p, (unsigned int)n));
+    ip->type = t;
+    ip->size = n; 
+    ip->link = p;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->ptr = NULL;
+    ip->level = k;
+    *p = NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolved href='%s' type=%d location=%p (%u bytes)\n", id, t, ip->ptr, (unsigned int)n));
+    if (ip->type != t)
+    { strcpy(soap->id, id);
+      soap->error = SOAP_HREF;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility: id type=%d href type=%d\n", ip->type, t));
+      return NULL;
+    }
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      if (!q)
+        return NULL;
+      *p = (void*)q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    *p = ip->ptr;
+  }
+  else if (ip->level > k)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving level %u pointers to href='%s'\n", ip->level, id));
+    while (ip->level > k)
+    { void *s, **r = &ip->link;
+      q = (void**)ip->link;
+      while (q)
+      { *r = (void*)soap_malloc(soap, sizeof(void*));
+        s = *q;
+        *q = *r;
+        r = (void**)*r;
+        q = (void**)s;
+      }
+      *r = NULL;
+      ip->size = n; 
+      ip->copy = NULL;
+      ip->level = ip->level - 1;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarded href='%s' type=%d location=%p (%u bytes)\n", id, t, p, (unsigned int)n));
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      *p = q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_forward(struct soap *soap, const char *href, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t))
+{ struct soap_ilist *ip;
+  if (!p || !href || !*href)
+    return p;
+  ip = soap_lookup(soap, href); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, href); /* new hash table entry for string id */
+    ip->type = st;
+    ip->size = n;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->ptr = NULL;
+    ip->level = 0;
+    ip->flist = NULL;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry href='%s' type=%d size=%lu level=%d location=%p\n", href, st, (unsigned long)n, k, p));
+  }
+  else if (ip->type != st || (ip->level == k && ip->size != n))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", href, ip->type, (unsigned long)ip->size, k, st, (unsigned long)n));
+    strcpy(soap->id, href);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  if (fcopy || n < sizeof(void*) || *href != '#')
+  { register struct soap_flist *fp = (struct soap_flist*)SOAP_MALLOC(soap, sizeof(struct soap_flist));
+    if (!fp)
+    { soap->error = SOAP_EOM;
+      return NULL;
+    }
+    fp->next = ip->flist;
+    fp->type = tt;
+    fp->ptr = p;
+    fp->level = k;
+    fp->len = len;
+    if (fcopy)
+      fp->fcopy = fcopy;
+    else
+      fp->fcopy = soap_fcopy;
+    ip->flist = fp;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding type=%d (target type=%d) size=%lu location=%p level=%u len=%lu href='%s'\n", st, tt, (unsigned long)n, p, k, (unsigned long)len, href));
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding copying address %p for type=%d href='%s'\n", p, st, href));
+    *(void**)p = ip->copy;
+    ip->copy = p;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*))
+{
+#ifndef WITH_NOIDREF
+  struct soap_ilist *ip;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Enter id='%s' type=%d loc=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  soap->alloced = 0;
+  if (!p)
+  { if (finstantiate)
+      p = finstantiate(soap, t, type, arrayType, &n);
+    else
+      p = soap_malloc(soap, n);
+    if (p)
+      soap->alloced = 1;
+  }
+#ifndef WITH_NOIDREF
+  if (!id || !*id)
+#endif
+    return p;
+#ifndef WITH_NOIDREF
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Lookup entry id='%s for location=%p'\n", id, p));
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    ip->type = t;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry id='%s' type=%d size=%lu level=%u location=%p\n", id, t, (unsigned long)n, k, p));
+  }
+  else if ((ip->type != t || (ip->level == k && ip->size != n)) && (ip->copy || ip->flist))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", id, ip->type, (unsigned long)ip->size, k, t, (unsigned long)n));
+    strcpy(soap->id, id);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Multiply defined id='%s'\n", id));
+    strcpy(soap->id, id);
+    soap->error = SOAP_DUPLICATE_ID;
+    return NULL;
+  }
+  else 
+  { ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update entry id='%s' type=%d location=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  }
+  return ip->ptr;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{ DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Copying data type=%d (target type=%d) %p -> %p (%lu bytes)\n", st, tt, q, p, (unsigned long)n));
+  memcpy(p, q, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_send(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->dime.list)
+  { /* SOAP body referenced attachments must appear first */
+    soap->dime.last->next = soap->dime.first;
+    soap->dime.first = soap->dime.list->next;
+    soap->dime.list->next = NULL;
+    soap->dime.last = soap->dime.list;
+  }
+  if (soap_putdime(soap) || soap_putmime(soap))
+    return soap->error;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End send\n"));
+  if (soap->mode & SOAP_IO) /* need to flush the remaining data in buffer */
+  { if (soap_flush(soap))
+#ifdef WITH_ZLIB
+    { if (soap->mode & SOAP_ENC_ZLIB && soap->zlib_state == SOAP_ZLIB_DEFLATE)
+      { soap->zlib_state = SOAP_ZLIB_NONE;
+        deflateEnd(&soap->d_stream);
+      }
+      return soap->error;
+    }
+#else
+      return soap->error;
+#endif
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { int r;
+      soap->d_stream.avail_in = 0;
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating remainder\n"));
+        r = deflate(&soap->d_stream, Z_FINISH);
+        if (soap->d_stream.avail_out != SOAP_BUFLEN)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN - soap->d_stream.avail_out))
+          { soap->zlib_state = SOAP_ZLIB_NONE;
+            deflateEnd(&soap->d_stream);
+            return soap->error;
+	  }
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (r == Z_OK);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+      soap->z_ratio_out = (float)soap->d_stream.total_out / (float)soap->d_stream.total_in;
+      soap->mode &= ~SOAP_ENC_ZLIB;
+      soap->zlib_state = SOAP_ZLIB_NONE;
+      if (deflateEnd(&soap->d_stream) != Z_OK || r != Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to end deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+#ifdef WITH_GZIP
+      soap->z_buf[0] = soap->z_crc & 0xFF;
+      soap->z_buf[1] = (soap->z_crc >> 8) & 0xFF;
+      soap->z_buf[2] = (soap->z_crc >> 16) & 0xFF;
+      soap->z_buf[3] = (soap->z_crc >> 24) & 0xFF;
+      soap->z_buf[4] = soap->d_stream.total_in & 0xFF;
+      soap->z_buf[5] = (soap->d_stream.total_in >> 8) & 0xFF;
+      soap->z_buf[6] = (soap->d_stream.total_in >> 16) & 0xFF;
+      soap->z_buf[7] = (soap->d_stream.total_in >> 24) & 0xFF;
+      if (soap_flush_raw(soap, soap->z_buf, 8))
+        return soap->error;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip crc32=%lu\n", (unsigned long)soap->z_crc));
+#endif
+    }
+#endif
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    { char *p;
+#ifndef WITH_NOHTTP
+      if (!(soap->mode & SOAP_ENC_XML))
+      { soap->mode--;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending buffered message of length %u\n", (unsigned int)soap->blist->size));
+        if (soap->status >= SOAP_POST)
+          soap->error = soap->fpost(soap, soap->endpoint, soap->host, soap->port, soap->path, soap->action, soap->blist->size);
+        else if (soap->status != SOAP_STOP)
+          soap->error = soap->fresponse(soap, soap->status, soap->blist->size);
+        if (soap->error || soap_flush(soap))
+          return soap->error;
+        soap->mode++;
+      }
+#endif
+      for (p = soap_first_block(soap); p; p = soap_next_block(soap))
+      { DBGMSG(SENT, p, soap_block_size(soap));
+        if ((soap->error = soap->fsend(soap, p, soap_block_size(soap))))
+        { soap_end_block(soap);
+          return soap->error;
+        }
+      }
+      soap_end_block(soap);
+    }
+#ifndef WITH_LEANER
+    else if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { DBGMSG(SENT, "\r\n0\r\n\r\n", 7);
+      if ((soap->error = soap->fsend(soap, "\r\n0\r\n\r\n", 7)))
+        return soap->error;
+    }
+#endif
+  }
+#ifdef WITH_TCPFIN
+#ifdef WITH_OPENSSL
+  if (!soap->ssl && soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#else
+  if (soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#endif
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of send phase\n"));
+  soap->omode &= ~SOAP_XML_SEC;
+  soap->count = 0;
+  soap->part = SOAP_END;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_recv(struct soap *soap)
+{ soap->part = SOAP_END;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) && soap_getdime(soap))
+    return soap->error;
+  soap->dime.list = soap->dime.first;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  if ((soap->mode & SOAP_ENC_MIME) && soap_getmime(soap))
+    return soap->error;
+  soap->mime.list = soap->mime.first;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "End of receive message ok\n"));
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { soap->mode &= ~SOAP_ENC_ZLIB;
+    memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+    soap->bufidx = (char*)soap->d_stream.next_in - soap->z_buf;
+    soap->buflen = soap->z_buflen;
+    soap->zlib_state = SOAP_ZLIB_NONE;
+    if (inflateEnd(&soap->d_stream) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+#ifdef WITH_GZIP
+    if (soap->zlib_in == SOAP_ZLIB_GZIP)
+    { soap_wchar c;
+      short i;
+      for (i = 0; i < 8; i++)
+      { if ((int)(c = soap_getchar(soap)) == EOF)
+          return soap->error = SOAP_EOF;
+        soap->z_buf[i] = (char)c;
+      }
+      if (soap->z_crc != ((uLong)(unsigned char)soap->z_buf[0] | ((uLong)(unsigned char)soap->z_buf[1] << 8) | ((uLong)(unsigned char)soap->z_buf[2] << 16) | ((uLong)(unsigned char)soap->z_buf[3] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: crc check failed, message corrupted? (crc32=%lu)\n", (unsigned long)soap->z_crc));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+      if (soap->d_stream.total_out != ((uLong)(unsigned char)soap->z_buf[4] | ((uLong)(unsigned char)soap->z_buf[5] << 8) | ((uLong)(unsigned char)soap->z_buf[6] << 16) | ((uLong)(unsigned char)soap->z_buf[7] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: incorrect message length\n"));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+    }
+#endif
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    while ((int)soap_getchar(soap) != EOF) /* advance to last chunk */
+      ;
+  if (soap->fdisconnect && (soap->error = soap->fdisconnect(soap)))
+    return soap->error;
+#ifndef WITH_NOIDREF
+  return soap_resolve(soap);
+#else
+#ifndef WITH_LEANER
+  if (soap->xlist)
+  { if (soap->mode & SOAP_ENC_MTOM)
+      return soap->error = SOAP_MIME_HREF;
+    return soap->error = SOAP_DIME_HREF;
+  }
+#endif
+  return SOAP_OK;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free(struct soap *soap)
+{ register struct Namespace *ns;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free namespace stack\n"));
+  while (soap->nlist)
+  { register struct soap_nlist *np = soap->nlist->next;
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free any remaining temp blocks\n"));
+  while (soap->blist)
+    soap_end_block(soap);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute storage\n"));
+  while (soap->attributes)
+  { register struct soap_attribute *tp = soap->attributes->next;
+    if (soap->attributes->value)
+      SOAP_FREE(soap, soap->attributes->value);
+    SOAP_FREE(soap, soap->attributes);
+    soap->attributes = tp;
+  }
+#ifdef WITH_FAST
+  if (soap->labbuf)
+    SOAP_FREE(soap, soap->labbuf);
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  ns = soap->local_namespaces;
+  if (ns)
+  { for (; ns->id; ns++)
+    { if (ns->out)
+      { if (soap->encodingStyle == ns->out)
+          soap->encodingStyle = SOAP_STR_EOS;
+        SOAP_FREE(soap, ns->out);
+        ns->out = NULL;
+      }
+      if (soap->encodingStyle == ns->ns)
+        soap->encodingStyle = SOAP_STR_EOS;
+    }
+    SOAP_FREE(soap, soap->local_namespaces);
+    soap->local_namespaces = NULL;
+  }
+#ifndef WITH_LEANER
+  while (soap->xlist)
+  { struct soap_xlist *xp = soap->xlist->next;
+    SOAP_FREE(soap, soap->xlist);
+    soap->xlist = xp;
+  }
+#endif
+#ifndef WITH_NOIDREF
+  soap_free_pht(soap);
+  soap_free_iht(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_logs(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { soap->logfile[i] = NULL;
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEAN) || defined(SOAP_DEBUG)
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_open_logfile(struct soap *soap, int i)
+{ if (soap->logfile[i])
+    soap->fdebug[i] = fopen(soap->logfile[i], i < 2 ? "ab" : "a");
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_close_logfile(struct soap *soap, int i)
+{ if (soap->fdebug[i])
+  { fclose(soap->fdebug[i]);
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_close_logfiles(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+    soap_close_logfile(soap, i);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_set_logfile(struct soap *soap, int i, const char *logfile)
+{ char *s = NULL;
+  soap_close_logfile(soap, i);
+  if (soap->logfile[i])
+    SOAP_FREE(soap, (void*)soap->logfile[i]);
+  if (logfile)
+    if ((s = (char*)SOAP_MALLOC(soap, strlen(logfile) + 1)))
+      strcpy(s, logfile);
+  soap->logfile[i] = s;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_recv_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_RECV, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_sent_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_SENT, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_test_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_TEST, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy(struct soap *soap)
+{ return soap_copy_context((struct soap*)malloc(sizeof(struct soap)), soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy_context(struct soap *copy, struct soap *soap)
+{ if (soap_check_state(soap))
+    return NULL;
+  if (copy)
+  { register struct soap_plugin *p;
+    memcpy(copy, soap, sizeof(struct soap));
+    copy->state = SOAP_COPY;
+    copy->user = NULL;
+    copy->error = SOAP_OK;
+    copy->userid = NULL;
+    copy->passwd = NULL;
+    copy->nlist = NULL;
+    copy->blist = NULL;
+    copy->clist = NULL;
+    copy->alist = NULL;
+    copy->attributes = NULL;
+#ifdef WITH_FAST
+    copy->labbuf = NULL;
+    copy->lablen = 0;
+    copy->labidx = 0;
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_mht(copy);
+#endif
+    copy->local_namespaces = NULL;
+#ifndef WITH_NOIDREF
+    soap_init_iht(copy);
+    soap_init_pht(copy);
+#endif
+    copy->header = NULL;
+    copy->fault = NULL;
+    copy->action = NULL;
+#ifndef WITH_LEAN
+#ifdef WITH_COOKIES
+    copy->cookies = soap_copy_cookies(copy);
+#else
+    copy->cookies = NULL;
+#endif
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_logs(copy);
+    soap_set_recv_logfile(copy, soap->logfile[SOAP_INDEX_RECV]);
+    soap_set_sent_logfile(copy, soap->logfile[SOAP_INDEX_SENT]);
+    soap_set_test_logfile(copy, soap->logfile[SOAP_INDEX_TEST]);
+#endif
+    copy->plugins = NULL;
+    for (p = soap->plugins; p; p = p->next)
+    { register struct soap_plugin *q = (struct soap_plugin*)SOAP_MALLOC(copy, sizeof(struct soap_plugin));
+      if (!q)
+        return NULL;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying plugin '%s'\n", p->id));
+      *q = *p;
+      if (p->fcopy && (soap->error = p->fcopy(copy, q, p)))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not copy plugin '%s'\n", p->id));
+        SOAP_FREE(copy, q);
+        return NULL;
+      }
+      q->next = copy->plugins;
+      copy->plugins = q;
+    }
+  }
+  else
+    soap->error = SOAP_EOM;
+  return copy;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init(struct soap *soap)
+{ soap->state = SOAP_INIT;
+  soap->version = 0;
+  soap_imode(soap, SOAP_IO_DEFAULT);
+  soap_omode(soap, SOAP_IO_DEFAULT);
+  soap->plugins = NULL;
+  soap->user = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+  soap->fconnect = NULL;
+  soap->fdisconnect = NULL;
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+  soap->fplugin = fplugin;
+#ifndef WITH_LEANER
+  soap->fdimereadopen = NULL;
+  soap->fdimewriteopen = NULL;
+  soap->fdimereadclose = NULL;
+  soap->fdimewriteclose = NULL;
+  soap->fdimeread = NULL;
+  soap->fdimewrite = NULL;
+#endif
+  soap->float_format = "%.8g"; /* .8 preserves single FP precision as much as possible, but might not be very efficient */
+  soap->double_format = "%.17lg"; /* .17 preserves double FP precision as much as possible, but might not be very efficient */
+  soap->dime_id_format = "cid:id%d"; /* default DIME id format */
+  soap->http_version = "1.1";
+  soap->actor = NULL;
+  soap->max_keep_alive = SOAP_MAXKEEPALIVE;
+  soap->keep_alive = 0;
+  soap->recv_timeout = 0;
+  soap->send_timeout = 0;
+  soap->connect_timeout = 0;
+  soap->accept_timeout = 0;
+  soap->socket_flags = 0;
+  soap->connect_flags = 0;
+  soap->bind_flags = 0;
+  soap->accept_flags = 0;
+  soap->ip = 0;
+#ifdef WITH_FAST
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  soap->encodingStyle = SOAP_STR_EOS;
+#ifndef WITH_NONAMESPACES
+  soap->namespaces = namespaces;
+#else
+  soap->namespaces = NULL;
+#endif
+  soap->local_namespaces = NULL;
+  soap->nlist = NULL;
+  soap->blist = NULL;
+  soap->clist = NULL;
+  soap->alist = NULL;
+  soap->attributes = NULL;
+  soap->header = NULL;
+  soap->fault = NULL;
+  soap->master = SOAP_INVALID_SOCKET;
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->os = NULL;
+  soap->is = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifndef UNDER_CE
+  soap->recvfd = 0;
+  soap->sendfd = 1;
+#else
+  soap->recvfd = stdin;
+  soap->sendfd = stdout;
+#endif 
+  soap->host[0] = '\0';
+  soap->port = 0;
+  soap->action = NULL;
+  soap->proxy_host = NULL;
+  soap->proxy_port = 8080;
+  soap->proxy_userid = NULL;
+  soap->proxy_passwd = NULL;
+  soap->authrealm = NULL;
+  soap->prolog = NULL;
+#ifdef WITH_OPENSSL
+  if (!ssl_init_done)
+    soap_ssl_init();
+  soap->fsslauth = ssl_auth_init;
+  soap->fsslverify = ssl_verify_callback;
+  soap->bio = NULL;
+  soap->ssl = NULL;
+  soap->ctx = NULL;
+  soap->require_server_auth = 0;
+  soap->require_client_auth = 0;
+  soap->rsa = 0;
+  soap->keyfile = NULL;
+  soap->password = NULL;
+  soap->dhfile = NULL;
+  soap->cafile = NULL;
+  soap->capath = NULL;
+  soap->crlfile = NULL;
+  soap->randfile = NULL;
+  soap->session = NULL;
+#endif
+#ifdef WITH_ZLIB
+  soap->zlib_state = SOAP_ZLIB_NONE;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.zalloc = NULL;
+  soap->d_stream.zfree = NULL;
+  soap->d_stream.opaque = NULL;
+  soap->z_level = 6;
+#endif
+#ifndef WITH_LEAN
+  soap->c14ninclude = NULL;
+  soap->c14nexclude = NULL;
+  soap->cookies = NULL;
+  soap->cookie_domain = NULL;
+  soap->cookie_path = NULL;
+  soap->cookie_max = 32;
+#endif
+#ifdef SOAP_DEBUG
+  soap_init_mht(soap);
+  soap_init_logs(soap);
+  soap_set_recv_logfile(soap, "RECV.log");
+  soap_set_sent_logfile(soap, "SENT.log");
+  soap_set_test_logfile(soap, NULL);
+#endif
+#ifdef WMW_RPM_IO
+  soap->rpmreqid = NULL;
+#endif
+#ifdef PALM
+  palmNetLibOpen();
+#endif
+#ifndef WITH_NOIDREF
+  soap_init_iht(soap);
+  soap_init_pht(soap);
+#endif
+  soap_begin(soap);
+#ifdef SOAP_DEBUG
+  soap_set_test_logfile(soap, "TEST.log");
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init1(struct soap *soap, soap_mode mode)
+{ soap_init2(soap, mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init2(struct soap *soap, soap_mode imode, soap_mode omode)
+{ soap_init(soap);
+  soap_imode(soap, imode);
+  soap_omode(soap, omode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_begin(struct soap *soap)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing\n"));
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+  soap->null = 0;
+  soap->position = 0;
+  soap->encoding = 0;
+  soap->mustUnderstand = 0;
+  soap->mode = 0;
+  soap->ns = 0;
+  soap->part = SOAP_END;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  soap->error = SOAP_OK;
+  soap->peeked = 0;
+  soap->ahead = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+  soap->endpoint[0] = '\0';
+#ifndef WITH_LEANER
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+#endif
+  soap_free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end(struct soap *soap)
+{ register struct soap_clist *cp;
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  soap_dealloc(soap, NULL);
+  while (soap->clist)
+  { cp = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = cp;
+  }
+  soap_closesock(soap);
+#ifdef SOAP_DEBUG
+  soap_close_logfiles(soap);
+#endif
+#ifdef PALM
+  palmNetLibClose();
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_namespaces(struct soap *soap, struct Namespace *p)
+{ register struct Namespace *ns = soap->local_namespaces;
+  register struct soap_nlist *np, *nq, *nr;
+  register unsigned int level = soap->level;
+  soap->namespaces = p;
+  soap->local_namespaces = NULL;
+  soap_set_local_namespaces(soap);
+  /* reverse the namespace list */
+  np = soap->nlist;
+  soap->nlist = NULL;
+  if (np)
+  { nq = np->next;
+    np->next = NULL;
+    while (nq)
+    { nr = nq->next;
+      nq->next = np;
+      np = nq;
+      nq = nr;
+    }
+  }
+  /* then push on new stack */
+  while (np)
+  { register const char *s;
+    soap->level = np->level; /* preserve element nesting level */
+    s = np->ns;
+    if (!s && np->index >= 0 && ns)
+    { s = ns[np->index].out;
+      if (!s)
+        s = ns[np->index].ns;
+    }
+    if (s && soap_push_namespace(soap, np->id, s))
+      return soap->error;
+    nq = np;
+    np = np->next;
+    SOAP_FREE(soap, nq);
+  }
+  if (ns)
+  { register int i;
+    for (i = 0; ns[i].id; i++)
+    { if (ns[i].out)
+      { SOAP_FREE(soap, ns[i].out);
+        ns[i].out = NULL;
+      }
+    }
+    SOAP_FREE(soap, ns);
+  }
+  soap->level = level; /* restore level */
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_local_namespaces(struct soap *soap)
+{ if (soap->namespaces && !soap->local_namespaces)
+  { register const struct Namespace *ns1;
+    register struct Namespace *ns2;
+    register size_t n = 1;
+    for (ns1 = soap->namespaces; ns1->id; ns1++)
+      n++;
+    n *= sizeof(struct Namespace);
+    ns2 = (struct Namespace*)SOAP_MALLOC(soap, n);
+    if (ns2)
+    { memcpy(ns2, soap->namespaces, n);
+      if (ns2[0].ns)
+      { if (!strcmp(ns2[0].ns, soap_env1))
+          soap->version = 1;
+        else
+          soap->version = 2;
+      }
+      soap->local_namespaces = ns2;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+#ifndef PALM_1
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_strsearch(const char *big, const char *little)
+{ size_t n = strlen(little);
+  const char *s = big;
+  while (s) 
+  { if (!strncmp(s, little, n) && (s[n] == '\0' || s[n] == ' '))
+      return s;
+    s = strchr(s, ' ');
+    if (s)
+      s++;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_lookup_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np;
+  for (np = soap->nlist; np; np = np->next)
+  { if (!strncmp(np->id, tag, n) && !np->id[n])
+      return np;
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized)
+{ register struct soap_nlist *np;
+  size_t n, k;
+  if (soap_strsearch(soap->c14nexclude, id))
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns?ns:""));
+  if (!utilized)
+  { for (np = soap->nlist; np; np = np->next)
+    { if (!strcmp(np->id, id) && (!np->ns || !strcmp(np->ns, ns)))
+        break;
+    }
+    if (np)
+    { if (np->index == 1)
+        utilized = np->index;
+      else
+        return NULL;
+    }
+  }
+  n = strlen(id);
+  if (ns)
+    k = strlen(ns);
+  else
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k + 1);
+  if (!np)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  np->next = soap->nlist;
+  soap->nlist = np;
+  strcpy(np->id, id);
+  if (ns)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+  }
+  else
+    np->ns = NULL;
+  np->level = soap->level;
+  np->index = utilized;
+  return np;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_utilize_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np = soap_lookup_ns(soap, tag, n);
+  if (np)
+  { if (np->index == 0)
+      soap_push_ns(soap, np->id, np->ns, 1);
+  }
+  else
+  { strncpy(soap->tmpbuf, tag, n);
+    soap->tmpbuf[n] = '\0';
+    soap_push_ns(soap, soap->tmpbuf, NULL, 1);
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_pop_ns(struct soap *soap)
+{ soap_pop_namespace(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element(struct soap *soap, const char *tag, int id, const char *type)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element begin tag='%s' id='%d' type='%s'\n", tag, id, type?type:""));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->soap = soap;
+    elt->next = NULL;
+    elt->prnt = soap->dom;
+    elt->name = soap_strdup(soap, tag);
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->nstr = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->node = NULL;
+    elt->type = 0;
+    elt->head = NULL;
+    elt->tail = NULL;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+  }
+  else
+  {
+#endif
+    soap->level++;
+#ifndef WITH_LEAN
+    if (!soap->ns)
+    { if (!(soap->mode & SOAP_XML_CANONICAL)
+       && soap_send(soap, soap->prolog ? soap->prolog : "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"))
+        return soap->error;
+    }
+    else if (soap->mode & SOAP_XML_INDENT)
+    { if (soap->ns == 1 && soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+      soap->body = 1;
+    }
+#endif
+    if (soap_send_raw(soap, "<", 1)
+     || soap_send(soap, tag))
+      return soap->error;
+#ifdef WITH_DOM
+  }
+#endif
+  if (!soap->ns)
+  { struct Namespace *ns;
+    for (ns = soap->local_namespaces; ns && ns->id; ns++)
+    { if (*ns->id && (ns->out || ns->ns))
+      { sprintf(soap->tmpbuf, "xmlns:%s", ns->id);
+        if (soap_attribute(soap, soap->tmpbuf, ns->out ? ns->out : ns->ns))
+          return soap->error;
+      }
+    }   
+  }
+  soap->ns = 1; /* start with 0 or 2, but should be one to continue */
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { const char *s = strchr(tag, ':');
+    if (s)
+      soap_utilize_ns(soap, tag, s - tag);
+  }
+#endif
+  if (id > 0)
+  { sprintf(soap->tmpbuf, "_%d", id);
+    if (soap_attribute(soap, "id", soap->tmpbuf))
+      return soap->error;
+  }
+  if (type && *type)
+  { if (soap_attribute(soap, "xsi:type", type))
+      return soap->error;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { const char *s = strchr(type, ':');
+      if (s)
+        soap_utilize_ns(soap, type, s - type);
+    }
+#endif
+  }
+  if (soap->null && soap->position > 0)
+  { int i;
+    sprintf(soap->tmpbuf, "[%d", soap->positions[0]);
+    for (i = 1; i < soap->position; i++)
+      sprintf(soap->tmpbuf + strlen(soap->tmpbuf), ",%d", soap->positions[i]);
+    strcat(soap->tmpbuf, "]");
+    if (soap_attribute(soap, "SOAP-ENC:position", soap->tmpbuf))
+      return soap->error;
+  }
+  if (soap->mustUnderstand)
+  { if (soap->actor && *soap->actor)
+    { if (soap_attribute(soap, soap->version == 2 ? "SOAP-ENV:role" : "SOAP-ENV:actor", soap->actor))
+        return soap->error;
+    }
+    if (soap_attribute(soap, "SOAP-ENV:mustUnderstand", soap->version == 2 ? "true" : "1"))
+      return soap->error;
+    soap->mustUnderstand = 0;
+  }
+  if (soap->encoding)
+  { if (soap->encodingStyle && soap->local_namespaces)
+    { if (!*soap->encodingStyle)
+      { if (soap->local_namespaces[1].out)
+          soap->encodingStyle = soap->local_namespaces[1].out;
+        else
+          soap->encodingStyle = soap->local_namespaces[1].ns;
+      }
+      if (soap_attribute(soap, "SOAP-ENV:encodingStyle", soap->encodingStyle))
+        return soap->error;
+    }
+    soap->encoding = 0;
+  }
+  soap->null = 0;
+  soap->position = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_out(struct soap *soap, const char *tag, int id, const char *type)
+{ if (*tag == '-')
+    return SOAP_OK;
+  if (soap_element(soap, tag, id, type))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRRCHR
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_strrchr(const char *s, int t)
+{ register char *r = NULL;
+  while (*s)
+    if (*s++ == t)
+      r = (char*)s - 1;
+  return r;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOL
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_strtol(const char *s, char **t, int b)
+{ register long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { short neg = 0;
+    if (*s == '-')
+    { s++;
+      neg = 1;
+    }
+    else if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 214748364 && (n > 214748364 || c >= '8'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+    if (neg)
+      n = -n;
+  }
+  else /* b == 16 and value is always positive */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x07FFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOUL
+SOAP_FMAC1
+unsigned long
+SOAP_FMAC2
+soap_strtoul(const char *s, char **t, int b)
+{ unsigned long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 429496729 && (n > 429496729 || c >= '6'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+  }
+  else /* b == 16 */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x0FFFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_begin_out(struct soap *soap, const char *tag, int id, const char *type, const char *offset)
+{ if (soap_element(soap, tag, id, "SOAP-ENC:Array"))
+    return soap->error;
+  if (soap->version == 2)
+  { const char *s;
+    s = soap_strrchr(type, '[');
+    if ((size_t)(s - type) < sizeof(soap->tmpbuf))
+    { strncpy(soap->tmpbuf, type, s - type);
+      soap->tmpbuf[s - type] = '\0';
+      if (type && *type && (soap_attribute(soap, "SOAP-ENC:itemType", soap->tmpbuf)))
+        return soap->error;
+      if (s && (soap_attribute(soap, "SOAP-ENC:arraySize", s + 1)))
+        return soap->error;
+    }
+  }
+  else
+  { if (offset && (soap_attribute(soap, "SOAP-ENC:offset", offset)))
+      return soap->error;
+    if (type && *type && (soap_attribute(soap, "SOAP-ENC:arrayType", type)))
+      return soap->error;
+  }
+#ifndef WITH_LEAN
+  if (type && *type && (soap->mode & SOAP_XML_CANONICAL))
+  { const char *s = strchr(type, ':');
+    if (s)
+      soap_utilize_ns(soap, type, s - type);
+  }
+#endif
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_start_end_out(struct soap *soap, const char *tag)
+{ register struct soap_attribute *tp;
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att;
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { att = &soap->dom->atts;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible)
+      { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+	if (!*att)
+	  return soap->error = SOAP_EOM;
+	(*att)->next = NULL;
+        (*att)->nstr = NULL;
+        (*att)->name = soap_strdup(soap, tp->name);
+        (*att)->data = soap_strdup(soap, tp->value);
+        (*att)->wide = NULL;
+        (*att)->soap = soap;
+        tp->visible = 0;
+      }
+    }
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { struct soap_nlist *np;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible && tp->name)
+      { const char *s = strchr(tp->name, ':');
+        if (s)
+          soap_utilize_ns(soap, tp->name, s - tp->name);
+      }
+    }
+    for (np = soap->nlist; np; np = np->next)
+    { if (np->index == 1 && np->ns)
+      { sprintf(soap->tmpbuf, "xmlns:%s", np->id);
+        soap_set_attr(soap, soap->tmpbuf, np->ns);
+        np->index = 2;
+      }
+    }
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible)
+    { if (soap_send(soap, " ") || soap_send(soap, tp->name))
+        return soap->error;
+      if (tp->visible == 2 && tp->value)
+        if (soap_send_raw(soap, "=\"", 2)
+	 || soap_string_out(soap, tp->value, 1)
+	 || soap_send_raw(soap, "\"", 1))
+          return soap->error;
+      tp->visible = 0;
+    }
+  }
+  if (tag)
+  { 
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { if (soap_send_raw(soap, ">", 1)
+       || soap_element_end_out(soap, tag))
+        return soap->error;
+    }
+    else
+#endif
+    soap->level--;	/* decrement level just before /> */
+    if (soap_send_raw(soap, "/>", 2))
+      return soap->error;
+    return SOAP_OK;
+  }
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_out(struct soap *soap, const char *tag)
+{ if (*tag == '-')
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element ending tag='%s'\n", tag));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+    soap_pop_ns(soap);
+  if (soap->mode & SOAP_XML_INDENT)
+  { if (!soap->body)
+    { if (soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+    }
+    soap->body = 0;
+  }
+#endif
+  if (soap_send_raw(soap, "</", 2)
+   || soap_send(soap, tag))
+    return soap->error;
+  soap->level--;	/* decrement level just before > */
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_ref(struct soap *soap, const char *tag, int id, int href)
+{ register int n = 0;
+  if (soap->version == 2)
+    n = 1;
+  sprintf(soap->href, "#_%d", href);
+  return soap_element_href(soap, tag, id, "href" + n, soap->href + n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_href(struct soap *soap, const char *tag, int id, const char *ref, const char *val)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element '%s' reference %s='%s'\n", tag, ref, val));
+  if (soap_element(soap, tag, id, NULL)
+   || soap_attribute(soap, ref, val)
+   || soap_element_start_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_null(struct soap *soap, const char *tag, int id, const char *type)
+{ struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (tp->visible)
+      break;
+  if (tp || (soap->version == 2 && soap->position > 0) || id > 0 || (soap->mode & SOAP_XML_NIL))
+  { if (soap_element(soap, tag, id, type))
+      return soap->error;
+    if (soap->part != SOAP_IN_HEADER && soap->encodingStyle)
+      if (soap_attribute(soap, "xsi:nil", "true"))
+        return soap->error;
+    return soap_element_start_end_out(soap, tag);
+  }
+  soap->null = 1;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_id(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, int n, const char *type, int t) 
+{ if (!p || (a && !a->__ptr))
+  { soap_element_null(soap, tag, id, type);
+    return -1;
+  }
+#ifndef WITH_NOIDREF
+  if (soap->mode & SOAP_XML_TREE)
+    return 0;
+  if (id < 0)
+  { struct soap_plist *pp;
+    if (a)
+      id = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+    else
+      id = soap_pointer_lookup(soap, p, t, &pp);
+    if (id)
+    { if (soap_is_embedded(soap, pp))
+      { soap_element_ref(soap, tag, 0, id);
+        return -1;
+      }
+      if (soap_is_single(soap, pp))
+        return 0;
+      soap_set_embedded(soap, pp);
+    }
+  }
+  return id;
+#else
+  return 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_result(struct soap *soap, const char *tag)
+{ if (soap->version == 2 && soap->encodingStyle)
+    if (soap_element(soap, "SOAP-RPC:result", 0, NULL)
+     || soap_attribute(soap, "xmlns:SOAP-RPC", soap_rpc)
+     || soap_element_start_end_out(soap, NULL)
+     || soap_string_out(soap, tag, 0)
+     || soap_element_end_out(soap, "SOAP-RPC:result"))
+      return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attribute(struct soap *soap, const char *name, const char *value)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+    a->next = soap->dom->atts;
+    a->nstr = NULL;
+    a->name = soap_strdup(soap, name);
+    a->data = soap_strdup(soap, value);
+    a->wide = NULL;
+    a->soap = soap;
+    soap->dom->atts = a;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { /* TODO: consider using this code to handle default namespace
+    if (!strncmp(name, "xmlns", 5) && (name[5] == ':' || name[5] == '\0'))
+    { if (name[5] == ':')
+        soap_push_ns(soap, name + 6, value, 0);
+      else
+        soap_push_ns(soap, "", value, 0);
+    }
+    */
+    if (!strncmp(name, "xmlns:", 6))
+      soap_push_ns(soap, name + 6, value, 0);
+    else if (soap_set_attr(soap, name, value))
+      return soap->error;
+  }
+  else
+#endif
+  { if (soap_send(soap, " ") || soap_send(soap, name))
+      return soap->error;
+    if (value)
+      if (soap_send_raw(soap, "=\"", 2)
+       || soap_string_out(soap, value, 1)
+       || soap_send_raw(soap, "\"", 1))
+        return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_in(struct soap *soap, const char *tag, int nillable)
+{ if (!soap_peek_element(soap))
+  { if (soap->other)
+      return soap->error = SOAP_TAG_MISMATCH;
+    if (tag && *tag == '-')
+      return SOAP_OK;
+    if (!(soap->error = soap_match_tag(soap, soap->tag, tag)))
+    { soap->peeked = 0;
+      if (soap->body)
+        soap->level++;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"" ));
+      if (!nillable && soap->null && (soap->mode & SOAP_XML_STRICT))
+        return soap->error = SOAP_NULL;
+    }
+  }
+  else if (soap->error == SOAP_NO_TAG && tag && *tag == '-')
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_in(struct soap *soap, const char *tag)  
+{ register soap_wchar c;
+  register char *s;
+  register const char *t;
+  register int n = 0;
+  if (tag && *tag == '-')
+    return SOAP_OK;
+  soap->level--;
+  soap_pop_namespace(soap);
+#ifdef WITH_DOM
+  /* this whitespace or mixed content is not insignificant for DOM */
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!soap->peeked && !soap_string_in(soap, 3, -1, -1))
+      return soap->error;
+    if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  if (soap->peeked)
+  { if (soap->error == SOAP_NO_TAG)
+      soap->error = SOAP_OK;
+    if (*soap->tag)
+      n++;
+    soap->peeked = 0;
+  }
+  do
+  { while (((c = soap_get(soap)) != SOAP_TT))
+    { if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      if (c == SOAP_LT)
+        n++;
+      else if (c == '/')
+      { c = soap_get(soap);
+        if (c == SOAP_GT)
+	  n--;
+        else
+	  soap_unget(soap, c);
+      }
+    }
+  } while (n--);
+  s = soap->tag;
+  while (soap_notblank(c = soap_get(soap)))
+    *s++ = (char)c;
+  *s = '\0';
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  while (soap_blank(c))
+    c = soap_get(soap);
+  if (c != SOAP_GT)
+    return soap->error = SOAP_SYNTAX_ERROR;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:""));
+  if (!tag || !*tag)
+    return SOAP_OK;
+  if ((s = strchr(soap->tag, ':')))
+    s++;
+  else
+    s = soap->tag;
+  if ((t = strchr(tag, ':')))
+    t++;
+  else
+    t = tag;
+  if (!SOAP_STRCMP(s, t))
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element tag name does not match\n"));
+  return soap->error = SOAP_SYNTAX_ERROR;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_attr_value(struct soap *soap, const char *name, int flag)
+{ register struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (!soap_match_tag(soap, tp->name, name))
+      break;
+  if (tp && tp->visible == 2)
+  { if (flag == 2 && (soap->mode & SOAP_XML_STRICT))
+      soap->error = SOAP_PROHIBITED;
+    else
+      return tp->value;
+  }
+  else if (flag == 1 && (soap->mode & SOAP_XML_STRICT))
+    soap->error = SOAP_REQUIRED;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_attr(struct soap *soap, const char *name, const char *value)
+{ register struct soap_attribute *tp;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set attribute %s='%s'\n", name, value?value:""));
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (!strcmp(tp->name, name))
+      break;
+  }
+  if (!tp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute %s\n", name));
+    if (!(tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(name))))
+      return soap->error = SOAP_EOM;
+    tp->ns = NULL;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { struct soap_attribute **tpp = &soap->attributes;
+      const char *s = strchr(name, ':');
+      if (!strncmp(name, "xmlns", 5))
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) || strcmp((*tpp)->name + 5, name + 5) > 0)
+            break;
+      }
+      else if (!s)
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) && ((*tpp)->ns || strcmp((*tpp)->name, name) > 0))
+            break;
+      }
+      else
+      { int k;
+        for (; *tpp; tpp = &(*tpp)->next)
+	{ if (!strncmp((*tpp)->name, "xmlns:", 6) && !strncmp((*tpp)->name + 6, name, s - name) && !(*tpp)->name[6 + s - name])
+	  { if (!tp->ns)
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Canonicalization: prefix %s=%p(%s)\n", name, (*tpp)->ns, (*tpp)->ns));
+	      tp->ns = (*tpp)->ns;
+	    }
+	  }
+          else if (strncmp((*tpp)->name, "xmlns", 5) && (*tpp)->ns && tp->ns && ((k = strcmp((*tpp)->ns, tp->ns)) > 0 || (!k && strcmp((*tpp)->name, name) > 0)))
+            break;
+        }
+      }
+      tp->next = *tpp;
+      *tpp = tp;
+    }
+    else
+#endif
+    { tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    strcpy(tp->name, name);
+    tp->value = NULL;
+  }
+  else if (tp->visible)
+  { return SOAP_OK;
+  }
+  else if (value && tp->value && tp->size <= strlen(value))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute value of %s (free %p)\n", name, tp->value));
+    SOAP_FREE(soap, tp->value);
+    tp->value = NULL;
+    tp->ns = NULL;
+  }
+  if (value)
+  { if (!tp->value)
+    { tp->size = strlen(value) + 1;
+      if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+        return soap->error = SOAP_EOM;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute value of %s (%p)\n", tp->name, tp->value));
+    }
+    strcpy(tp->value, value);
+    if (!strncmp(tp->name, "xmlns:", 6))
+      tp->ns = tp->value;
+    tp->visible = 2;
+#ifndef WITH_LEAN
+    if (!strcmp(name, "wsu:Id"))
+    { soap->part = SOAP_BEGIN_SECURITY;
+      strncpy(soap->id, value, sizeof(soap->id));
+      soap->id[sizeof(soap->id)-1] = '\0';
+    }
+#endif
+  }
+  else
+    tp->visible = 1;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_attr(struct soap *soap)
+{ register struct soap_attribute *tp;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_CANONICAL))
+  { while (soap->attributes)
+    { tp = soap->attributes->next;
+      SOAP_FREE(soap, soap->attributes->value);
+      SOAP_FREE(soap, soap->attributes);
+      soap->attributes = tp;
+    }
+  }
+  else
+#endif
+  { for (tp = soap->attributes; tp; tp = tp->next)
+      tp->visible = 0;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d)
+{ register size_t i;
+  for (i = 0; i < n; i++)
+  { register soap_wchar c = soap_get(soap);
+    switch (c)
+    {
+    case SOAP_TT:
+      *s++ = '<';
+      soap_unget(soap, '/');
+      break;
+    case SOAP_LT:
+      *s++ = '<';
+      break;
+    case SOAP_GT:
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '>';
+      break;
+    case SOAP_QT:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '"';
+      break;
+    case SOAP_AP:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '\'';
+      break;
+    case '\t':
+    case '\n':
+    case '\r':
+    case ' ':
+    case '/':
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+    default:
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+  }
+  return soap->error = SOAP_EOM;
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_store_lab(struct soap *soap, const char *s, size_t n)
+{ soap->labidx = 0;
+  return soap_append_lab(soap, s, n);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_append_lab(struct soap *soap, const char *s, size_t n)
+{ if (soap->labidx + n >= soap->lablen)
+  { register char *t = soap->labbuf;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enlarging look-aside buffer to append data, old size=%lu", (unsigned long)soap->lablen));
+    if (soap->lablen == 0)
+      soap->lablen = SOAP_LABLEN;
+    while (soap->labidx + n >= soap->lablen)
+      soap->lablen <<= 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, ", new size=%lu\n", (unsigned long)soap->lablen));
+    soap->labbuf = (char*)SOAP_MALLOC(soap, soap->lablen);
+    if (!soap->labbuf)
+    { if (t)
+        SOAP_FREE(soap, t);
+      return soap->error = SOAP_EOM;
+    }
+    if (t)
+    { memcpy(soap->labbuf, t, soap->labidx);
+      SOAP_FREE(soap, t);
+    }
+  }
+  if (s)
+  { memcpy(soap->labbuf + soap->labidx, s, n);
+    soap->labidx += n;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_peek_element(struct soap *soap)
+{
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att = NULL;
+  register char *lead = NULL;
+#endif
+  register struct soap_attribute *tp;
+  const char *t;
+  register char *s;
+  register soap_wchar c;
+  register int i;
+  if (soap->peeked)
+  { if (!*soap->tag)
+      return soap->error = SOAP_NO_TAG;
+    return SOAP_OK;
+  }
+  soap->peeked = 1;
+  c = soap_getutf8(soap);
+#ifdef WITH_DOM
+  /* whitespace leading to start tag is not insignificant for DOM */
+  if (soap_blank(c))
+  { soap->labidx = 0;
+    do
+    { if (soap_append_lab(soap, NULL, 0))
+        return SOAP_EOM;
+      s = soap->labbuf + soap->labidx;
+      i = soap->lablen - soap->labidx;
+      soap->labidx = soap->lablen;
+      while (soap_blank(c) && i--)
+      { *s++ = c;
+        c = soap_getutf8(soap);
+      }
+    }
+    while (soap_blank(c));
+    *s = '\0';
+    lead = soap_strdup(soap, soap->labbuf);
+  }
+#else
+  while (soap_blank(c))
+    c = soap_getutf8(soap);
+#endif
+  if (c != SOAP_LT)
+  { *soap->tag = '\0';
+    if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, c);
+#ifdef WITH_DOM
+    /* whitespace leading to end tag is not insignificant for DOM */
+    if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+      soap->dom->tail = soap_strdup(soap, lead);
+#endif
+    return soap->error = SOAP_NO_TAG;
+  }
+  s = soap->tag;
+  do c = soap_get1(soap);
+  while (soap_blank(c));
+  i = sizeof(soap->tag);
+  while (c != '>' && c != '/' && soap_notblank(c))
+  { if (--i > 0)
+      *s++ = (char)c;
+    c = soap_get1(soap);
+  }
+  while (soap_blank(c))
+    c = soap_get1(soap);
+  *s = '\0';
+  soap->id[0] = '\0';
+  soap->href[0] = '\0';
+  soap->type[0] = '\0';
+  soap->arrayType[0] = '\0';
+  soap->arraySize[0] = '\0';
+  soap->arrayOffset[0] = '\0';
+  soap->other = 0;
+  soap->root = -1;
+  soap->position = 0;
+  soap->null = 0;
+  soap->mustUnderstand = 0;
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt;
+    elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->next = NULL;
+    elt->nstr = NULL;
+    elt->name = soap_strdup(soap, soap->tag);
+    elt->prnt = soap->dom;
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->type = 0;
+    elt->node = NULL;
+    elt->head = lead;
+    elt->tail = NULL;
+    elt->soap = soap;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+    att = &elt->atts;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+    tp->visible = 0;
+  while ((int)c != EOF && c != '>' && c != '/')
+  { s = soap->tmpbuf;
+    i = sizeof(soap->tmpbuf);
+    while (c != '=' && c != '>' && c != '/' && soap_notblank(c))
+    { if (--i > 0)
+        *s++ = (char)c;
+      c = soap_get1(soap);
+    }
+    *s = '\0';
+    if (i == sizeof(soap->tmpbuf))
+      return soap->error = SOAP_SYNTAX_ERROR;
+#ifdef WITH_DOM
+    /* add attribute name to dom */
+    if (att)
+    { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+       if (!*att)
+         return soap->error = SOAP_EOM;
+       (*att)->next = NULL;
+       (*att)->nstr = NULL;
+       (*att)->name = soap_strdup(soap, soap->tmpbuf);
+       (*att)->data = NULL;
+       (*att)->wide = NULL;
+       (*att)->soap = soap;
+    }
+#endif
+    if (!strncmp(soap->tmpbuf, "xmlns", 5))
+    { if (soap->tmpbuf[5] == ':')
+      { soap->tmpbuf[5] = '\0';
+        t = soap->tmpbuf + 6;
+      }
+      else if (soap->tmpbuf[5])
+        t = NULL;
+      else
+        t = SOAP_STR_EOS;
+    }
+    else
+      t = NULL;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (!SOAP_STRCMP(tp->name, soap->tmpbuf))
+        break;
+    }
+    if (!tp)
+    { tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(soap->tmpbuf));
+      if (!tp)
+        return soap->error = SOAP_EOM;
+      strcpy(tp->name, soap->tmpbuf);
+      tp->value = NULL;
+      tp->size = 0;
+      tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    while (soap_blank(c))
+      c = soap_get1(soap);
+    if (c == '=')
+    { do c = soap_getutf8(soap);
+      while (soap_blank(c));
+      if (c != SOAP_QT && c != SOAP_AP)
+      { soap_unget(soap, c);
+        c = ' '; /* blank delimiter */
+      }
+      if (soap_getattrval(soap, tp->value, tp->size, c))
+      {
+#ifdef WITH_FAST
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+	if (soap_store_lab(soap, tp->value, tp->size))
+	  return soap->error;
+	if (tp->value)
+	  SOAP_FREE(soap, tp->value);
+	for (;;)
+	{ if (soap_getattrval(soap, soap->labbuf + soap->labidx, soap->lablen - soap->labidx, c))
+	  { if (soap->error != SOAP_EOM)
+	      return soap->error;
+            soap->error = SOAP_OK;
+	    soap->labidx = soap->lablen;
+	    if (soap_append_lab(soap, NULL, 0))
+	      return soap->error;
+	  }
+	  else
+	    break;
+	}
+	if (soap->labidx)
+          tp->size = soap->lablen;
+	else
+	{ tp->size = strlen(soap->labbuf) + 1;
+          if (tp->size < SOAP_LABLEN)
+	    tp->size = SOAP_LABLEN;
+        }
+	if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+	  return soap->error = SOAP_EOM;
+        strcpy(tp->value, soap->labbuf);
+#else
+	size_t n;
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+        if (soap_new_block(soap))
+          return soap->error;
+        for (;;)
+        { if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+            return soap->error;
+          if (soap_getattrval(soap, s, SOAP_BLKLEN, c))
+          { if (soap->error != SOAP_EOM)
+              return soap->error;
+            soap->error = SOAP_OK;
+          }
+          else
+            break;
+        }
+	n = tp->size + soap->blist->size;
+        if (!(s = (char*)SOAP_MALLOC(soap, n)))
+          return soap->error = SOAP_EOM;
+        if (tp->value)
+        { memcpy(s, tp->value, tp->size);
+          SOAP_FREE(soap, tp->value);
+        }
+        soap_save_block(soap, s + tp->size, 0);
+        tp->value = s;
+        tp->size = n;
+#endif
+      }
+      do c = soap_get1(soap);
+      while (soap_blank(c));
+      tp->visible = 2; /* seen this attribute w/ value */
+#ifdef WITH_DOM
+      if (att)
+        (*att)->data = soap_strdup(soap, tp->value);
+#endif
+    }
+    else
+      tp->visible = 1; /* seen this attribute w/o value */
+#ifdef WITH_DOM
+    if (att)
+      att = &(*att)->next;
+#endif
+    if (t && tp->value)
+    { if (soap_push_namespace(soap, t, tp->value))
+        return soap->error;
+      tp->visible = 0;
+    }
+  }
+#ifdef WITH_DOM
+  if (att)
+  { soap->dom->nstr = soap_current_namespace(soap, soap->tag);
+    for (att = &soap->dom->atts; *att; att = &(*att)->next)
+      (*att)->nstr = soap_current_namespace(soap, (*att)->name);
+  }
+#endif
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  if (!(soap->body = (c != '/')))
+    do c = soap_get1(soap);
+    while (soap_blank(c));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { if (!soap->body && soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible && tp->value)
+    { if (!strcmp(tp->name, "id"))
+      { *soap->id = '#';
+        strncpy(soap->id + 1, tp->value, sizeof(soap->id) - 2);
+        soap->id[sizeof(soap->id)-1] = '\0';
+      }
+      else if (!strcmp(tp->name, "href"))
+      { strncpy(soap->href, tp->value, sizeof(soap->href) - 1);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if ((soap->version == 2 || (soap->mode & SOAP_XML_GRAPH)) && !strcmp(tp->name, "ref"))
+      { *soap->href = '#';
+        strncpy(soap->href + 1, tp->value, sizeof(soap->href) - 2);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if (!soap_match_tag(soap, tp->name, "xsi:type"))
+      { strncpy(soap->type, tp->value, sizeof(soap->type) - 1);
+        soap->type[sizeof(soap->type)-1] = '\0';
+      }
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arrayType"))
+      { s = soap_strrchr(tp->value, '[');
+        if (s && (size_t)(s - tp->value) < sizeof(soap->arrayType))
+        { strncpy(soap->arrayType, tp->value, s - tp->value);
+          soap->arrayType[s - tp->value] = '\0';
+          strncpy(soap->arraySize, s, sizeof(soap->arraySize) - 1);
+        }
+        else
+          strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+        soap->arraySize[sizeof(soap->arrayType)-1] = '\0';
+        soap->arrayType[sizeof(soap->arrayType)-1] = '\0';
+      }
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:itemType"))
+        strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arraySize"))
+        strncpy(soap->arraySize, tp->value, sizeof(soap->arraySize) - 1);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:offset"))
+        strncpy(soap->arrayOffset, tp->value, sizeof(soap->arrayOffset));
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:position"))
+        soap->position = soap_getposition(tp->value, soap->positions);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:root"))
+        soap->root = ((!strcmp(tp->value, "1") || !strcmp(tp->value, "true")));
+      else if ((soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENV:actor"))
+            || (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENV:role")))
+      { if ((!soap->actor || strcmp(soap->actor, tp->value))
+         && strcmp(tp->value, "http://schemas.xmlsoap.org/soap/actor/next")
+         && strcmp(tp->value, "http://www.w3.org/2003/05/soap-envelope/role/next"))
+          soap->other = 1;
+      }
+      else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:mustUnderstand")
+            && (!strcmp(tp->value, "1") || !strcmp(tp->value, "true")))
+        soap->mustUnderstand = 1;
+      else if ((!soap_match_tag(soap, tp->name, "xsi:null")
+             || !soap_match_tag(soap, tp->name, "xsi:nil"))
+            && (!strcmp(tp->value, "1")
+             || !strcmp(tp->value, "true")))
+        soap->null = 1;
+    }
+  }
+  return soap->error = SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_retry(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_revert(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_revert(struct soap *soap)
+{ if (!soap->peeked)
+  { soap->peeked = 1;
+    if (soap->body)
+      soap->level--;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reverting last element (level=%u)\n", soap->level));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_string_out(struct soap *soap, const char *s, int flag)
+{ register const char *t;
+  register soap_wchar c;
+  register soap_wchar mask = 0xFFFFFF80UL;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_strdup(soap, s);
+    return SOAP_OK;
+  }
+#endif
+  if (soap->mode & SOAP_C_UTFSTRING)
+    mask = 0;
+  t = s;
+  while ((c = *t++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#x9;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xA;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 13:
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xD;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '&':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&amp;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '<':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&lt;", 4))
+        return soap->error;
+      s = t;
+      break;
+    case '>':
+      if (!flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&gt;", 4))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case '"':
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&quot;", 6))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    default:
+#ifndef WITH_LEANER
+#ifdef HAVE_MBTOWC
+      if (soap->mode & SOAP_C_MBSTRING)
+      { wchar_t wc;
+        register int m = mbtowc(&wc, t - 1, MB_CUR_MAX);
+        if (m > 0 && wc != c)
+        { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, wc))
+            return soap->error;
+	  s = t += m - 1;
+	  continue;
+        }
+      }
+#endif
+#endif
+      if (c & mask)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, (unsigned char)c))
+          return soap->error;
+        s = t;
+      }
+    }
+  }
+  return soap_send_raw(soap, s, t - s - 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_string_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ register char *s;
+  char *t = NULL;
+  register size_t i;
+  register long l = 0;
+  register int n = 0;
+  register int m = 0;
+  register soap_wchar c;
+#if !defined(WITH_LEANER) && defined(HAVE_WCTOMB)
+  char buf[MB_LEN_MAX > 8 ? MB_LEN_MAX : 8];
+#else
+  char buf[8];
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+#ifndef WITH_LEAN
+      t = soap->tmpbuf;
+      t[0] = '<';
+      strncpy(t + 1, soap->tag, sizeof(soap->tmpbuf) - 1);
+      strncat(t, ">", sizeof(soap->tmpbuf));
+      m = strlen(soap->tag) + 2;
+#endif
+    }
+  }
+#ifdef WITH_CDATA
+  if (!flag)
+  { register int state = 0;
+#ifdef WITH_FAST
+    soap->labidx = 0;			/* use look-aside buffer */
+#else
+    if (soap_new_block(soap))
+      return NULL;
+#endif
+    for (;;)
+    { 
+#ifdef WITH_FAST
+      register size_t k;
+      if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+        return NULL;
+      s = soap->labbuf + soap->labidx;	/* space to populate */
+      k = soap->lablen - soap->labidx;	/* number of bytes available */
+      soap->labidx = soap->lablen;	/* claim this space */
+#else
+      register size_t k = SOAP_BLKLEN;
+      if (!(s = (char*)soap_push_block(soap, k)))
+        return NULL;
+#endif
+      for (i = 0; i < k; i++)
+      { if (m > 0)
+        { *s++ = *t++;	/* copy multibyte characters */
+	  m--;
+          continue;
+        }
+        c = soap_getchar(soap);
+	if ((int)c == EOF)
+          goto end;
+        if (c >= 0x80 && !(soap->mode & SOAP_ENC_LATIN))
+        { soap_unget(soap, c);
+	  c = soap_getutf8(soap);
+	  if (soap->mode & SOAP_C_UTFSTRING)
+          { if ((c & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+            { c &= 0x7FFFFFFF;
+              t = buf;
+              if (c < 0x0800)
+                *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+              else
+              { if (c < 0x010000)
+                  *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+                else
+                { if (c < 0x200000)
+                    *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+                  else
+                  { if (c < 0x04000000)
+                      *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                    else
+                    { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                      *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                    }
+                    *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+                  }     
+                  *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+              }
+              *t++ = (char)(0x80 | (c & 0x3F));
+	      m = (int)(t - buf) - 1;
+              t = buf;
+              *s++ = *t++;
+              continue;
+	    }
+          }
+        }
+	switch (state)
+        { case 1:
+            if (c == ']')
+	      state = 4;
+	    *s++ = c;
+	    continue;
+	  case 2:
+	    if (c == '-')
+              state = 6;
+	    *s++ = c;
+	    continue;
+	  case 3:
+	    if (c == '?')
+	      state = 8;
+	    *s++ = c;
+	    continue;
+          /* CDATA */
+	  case 4:
+	    if (c == ']')
+              state = 5;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+	  case 5:
+	    if (c == '>')
+	      state = 0;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+          /* comment */
+          case 6:
+            if (c == '-')
+	      state = 7;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          case 7:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          /* PI */
+	  case 8:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 3;
+	    *s++ = c;
+	    continue;
+        }
+        switch (c)
+        {
+        case '/':
+          if (n > 0)
+          { c = soap_getchar(soap);
+            if (c == '>')
+              n--;
+            soap_unget(soap, c);
+          }
+          *s++ = '/';
+          break;
+        case '<':
+	  c = soap_getchar(soap);
+	  if (c == '/')
+	  { if (n == 0)
+	    { c = SOAP_TT;
+	      goto end;
+	    }
+	    n--;
+	  }
+	  else if (c == '!')
+	  { c = soap_getchar(soap);
+	    if (c == '[')
+            { do c = soap_getchar(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                 goto end;
+	      t = (char*)"![CDATA[";
+	      m = 8;
+	      state = 1;
+	    }
+            else if (c == '-')
+	    { if ((c = soap_getchar(soap)) == '-')
+	        state = 2;
+	      t = (char*)"!-";
+	      m = 2;
+	      soap_unget(soap, c);
+	    }
+	    else
+	    { t = (char*)"!";
+	      m = 1;
+	      soap_unget(soap, c);
+	    }
+	    *s++ = '<';
+	    break;
+	  }
+	  else if (c == '?')
+	    state = 3;
+	  else
+	    n++;
+          soap_unget(soap, c);
+          *s++ = '<';
+          break;
+        case '>':
+          *s++ = '>';
+          break;
+        case '"':
+          *s++ = '"';
+          break;
+        default:
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+          if (soap->mode & SOAP_C_MBSTRING)
+          { m = wctomb(buf, c & 0x7FFFFFFF);
+            if (m >= 1 && m <= (int)MB_CUR_MAX)
+            { t = buf;
+              *s++ = *t++;
+              m--;
+            }
+            else
+            { *s++ = SOAP_UNKNOWN_CHAR;
+	      m = 0;
+	    }
+          }
+          else
+#endif
+#endif
+            *s++ = (char)(c & 0xFF);
+        }
+	l++;
+        if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+        { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+          soap->error = SOAP_LENGTH;
+          return NULL;
+        }
+      }
+    }
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;			/* use look-aside buffer */
+#else
+  if (soap_new_block(soap))
+    return NULL;
+#endif
+  for (;;)
+  { 
+#ifdef WITH_FAST
+    register size_t k;
+    if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+      return NULL;
+    s = soap->labbuf + soap->labidx;	/* space to populate */
+    k = soap->lablen - soap->labidx;	/* number of bytes available */
+    soap->labidx = soap->lablen;	/* claim this space */
+#else
+    register size_t k = SOAP_BLKLEN;
+    if (!(s = (char*)soap_push_block(soap, k)))
+      return NULL;
+#endif
+    for (i = 0; i < k; i++)
+    { if (m > 0)
+      { *s++ = *t++;	/* copy multibyte characters */
+        m--;
+        continue;
+      }
+      if (soap->mode & SOAP_C_UTFSTRING)
+      { if (((c = soap_get(soap)) & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+        { c &= 0x7FFFFFFF;
+          t = buf;
+          if (c < 0x0800)
+            *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+          else
+          { if (c < 0x010000)
+              *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+            else
+            { if (c < 0x200000)
+                *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+              else
+              { if (c < 0x04000000)
+                  *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                else
+                { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                  *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+              }     
+              *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+            }
+            *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+          }
+          *t++ = (char)(0x80 | (c & 0x3F));
+	  m = (int)(t - buf) - 1;
+          t = buf;
+          *s++ = *t++;
+          continue;
+        }
+      }
+      else
+        c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        t = (char*)"/";
+	m = 1;
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_get(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<' | 0x80000000:
+        if (flag)
+          *s++ = '<';
+        else
+        { *s++ = '&';
+          t = (char*)"lt;";
+	  m = 3;
+        }
+        break;
+      case '>' | 0x80000000:
+        if (flag)
+          *s++ = '>';
+        else
+        { *s++ = '&';
+          t = (char*)"gt;";
+	  m = 3;
+        }
+        break;
+      case '&' | 0x80000000:
+        if (flag)
+          *s++ = '&';
+        else
+        { *s++ = '&';
+          t = (char*)"amp;";
+	  m = 4;
+        }
+        break;
+      case '"' | 0x80000000:
+        if (flag)
+          *s++ = '"';
+        else
+        { *s++ = '&';
+          t = (char*)"quot;";
+	  m = 5;
+        }
+        break;
+      case '\'' | 0x80000000:
+        if (flag)
+          *s++ = '\'';
+        else
+        { *s++ = '&';
+          t = (char*)"apos;";
+	  m = 5;
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+        if (soap->mode & SOAP_C_MBSTRING)
+        { m = wctomb(buf, c & 0x7FFFFFFF);
+          if (m >= 1 && m <= (int)MB_CUR_MAX)
+          { t = buf;
+            *s++ = *t++;
+            m--;
+          }
+          else
+          { *s++ = SOAP_UNKNOWN_CHAR;
+	    m = 0;
+	  }
+        }
+        else
+#endif
+#endif
+          *s++ = (char)(c & 0xFF);
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+#ifdef WITH_FAST
+  t = soap_strdup(soap, soap->labbuf);
+#else
+  soap_size_block(soap, i+1);
+  t = soap_save_block(soap, NULL, 0);
+#endif
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (flag == 3)
+      soap->dom->tail = t;
+    else
+      soap->dom->data = t;
+  }
+#endif
+  if (flag == 2)
+    if (soap_s2QName(soap, t, &t))
+      return NULL;
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_wstring_out(struct soap *soap, const wchar_t *s, int flag)
+{ const char *t;
+  char tmp;
+  register soap_wchar c;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { wchar_t *r = (wchar_t*)s;
+    int n = 1;
+    while (*r++)
+      n++;
+    soap->dom->wide = r = (wchar_t*)soap_malloc(soap, n * sizeof(wchar_t));
+    while (n--)
+      *r++ = *s++;
+    return SOAP_OK;
+  }
+#endif
+  while ((c = *s++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+        t = "&#x9;";
+      else
+        t = "\t";
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+        t = "&#xA;";
+      else
+        t = "\n";
+      break;
+    case 13:
+      t = "&#xD;";
+      break;
+    case '&':
+      t = "&amp;";
+      break;
+    case '<':
+      t = "&lt;";
+      break;
+    case '>':
+      if (flag)
+        t = ">";
+      else
+	t = "&gt;";
+      break;
+    case '"':
+      if (flag)
+        t = "&quot;";
+      else
+        t = "\"";
+      break;
+    default:
+      if (c > 0 && c < 0x80)
+      { tmp = (char)c;
+        if (soap_send_raw(soap, &tmp, 1))
+          return soap->error;
+      }
+      else if (soap_pututf8(soap, (unsigned long)c))
+        return soap->error;
+      continue;
+    }
+    if (soap_send(soap, t))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t *
+SOAP_FMAC2
+soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ wchar_t *s;
+  register int i, n = 0;
+  register long l = 0;
+  register soap_wchar c;
+  const char *t = NULL;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading wide string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+    }
+  }
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { if (!(s = (wchar_t*)soap_push_block(soap, sizeof(wchar_t)*SOAP_BLKLEN)))
+      return NULL;
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { if (t)
+      { *s++ = (wchar_t)*t++;
+        if (!*t)
+          t = NULL;
+        continue;
+      }
+      c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        soap_unget(soap, '/');
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_getutf8(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<':
+        if (flag)
+          *s++ = (soap_wchar)'<';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "lt;";
+        }
+        break;
+      case '>':
+        if (flag)
+          *s++ = (soap_wchar)'>';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "gt;";
+        }
+        break;
+      case '"':
+        if (flag)
+          *s++ = (soap_wchar)'"';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "quot;";
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+        *s++ = (wchar_t)c & 0x7FFFFFFF;
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+  soap_size_block(soap, sizeof(wchar_t) * (i + 1));
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+  s = (wchar_t*)soap_save_block(soap, NULL, 0);
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->wide = s;
+#endif
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_int2s(struct soap *soap, int n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outint(struct soap *soap, const char *tag, int id, const int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2int(struct soap *soap, const char *s, int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (int)soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int *
+SOAP_FMAC2
+soap_inint(struct soap *soap, const char *tag, int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (int*)soap_id_enter(soap, soap->id, p, t, sizeof(int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(int), 0, NULL);
+  else if (p)
+  { if (soap_s2int(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_long2s(struct soap *soap, long n)
+{ sprintf(soap->tmpbuf, "%ld", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outlong(struct soap *soap, const char *tag, int id, const long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2long(struct soap *soap, const char *s, long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+long *
+SOAP_FMAC2
+soap_inlong(struct soap *soap, const char *tag, long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (long*)soap_id_enter(soap, soap->id, p, t, sizeof(long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(long), 0, NULL);
+  else if (p)
+  { if (soap_s2long(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_LONG642s(struct soap *soap, LONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_LONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outLONG64(struct soap *soap, const char *tag, int id, const LONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_LONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2LONG64(struct soap *soap, const char *s, LONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOLL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoll(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_LONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+LONG64 *
+SOAP_FMAC2
+soap_inLONG64(struct soap *soap, const char *tag, LONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (LONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(LONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (LONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(LONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2LONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_byte2s(struct soap *soap, char n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outbyte(struct soap *soap, const char *tag, int id, const char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2byte(struct soap *soap, const char *s, char *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -128 || n > 127)
+      soap->error = SOAP_TYPE;
+    *p = (char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_inbyte(struct soap *soap, const char *tag, char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (char*)soap_id_enter(soap, soap->id, p, t, sizeof(char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(char), 0, NULL);
+  else if (p)
+  { if (soap_s2byte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_short2s(struct soap *soap, short n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outshort(struct soap *soap, const char *tag, int id, const short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2short(struct soap *soap, const char *s, short *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -32768 || n > 32767)
+      soap->error = SOAP_TYPE;
+    *p = (short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+short *
+SOAP_FMAC2
+soap_inshort(struct soap *soap, const char *tag, short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (short*)soap_id_enter(soap, soap->id, p, t, sizeof(short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(short), 0, NULL);
+  else if (p)
+  { if (soap_s2short(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_float2s(struct soap *soap, float n)
+{ const char *s;
+  if (soap_isnan((double)n))
+    s = "NaN";
+  else if (soap_ispinff(n))
+    s = "INF";
+  else if (soap_isninff(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->float_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outfloat(struct soap *soap, const char *tag, int id, const float *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_float2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2float(struct soap *soap, const char *s, float *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = FLT_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = FLT_NAN;
+    else
+    {
+/* On some systems, strtof appears to be broken or doesn't link: use with caution */
+#if defined(HAVE_STRTOF)
+      char *r;
+      *p = strtof((char*)s, &r);
+      if (*r)
+#elif defined(HAVE_STRTOD)
+      char *r;
+      *p = (float)strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%g", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static int soap_isnumeric(struct soap *soap, const char *type)
+{ if (soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":float")
+   && soap_match_tag(soap, soap->type, ":double")
+   && soap_match_tag(soap, soap->type, ":decimal")
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return SOAP_ERR;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+float *
+SOAP_FMAC2
+soap_infloat(struct soap *soap, const char *tag, float *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (float*)soap_id_enter(soap, soap->id, p, t, sizeof(float), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (float*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(float), 0, NULL);
+  else if (p)
+  { if (soap_s2float(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_double2s(struct soap *soap, double n)
+{ const char *s;
+  if (soap_isnan(n))
+    s = "NaN";
+  else if (soap_ispinfd(n))
+    s = "INF";
+  else if (soap_isninfd(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->double_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdouble(struct soap *soap, const char *tag, int id, const double *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_double2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2double(struct soap *soap, const char *s, double *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = DBL_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = DBL_NAN;
+    else
+    {
+#ifdef HAVE_STRTOD
+      char *r;
+      *p = strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%lg", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+double *
+SOAP_FMAC2
+soap_indouble(struct soap *soap, const char *tag, double *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (double*)soap_id_enter(soap, soap->id, p, t, sizeof(double), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (double*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(double), 0, NULL);
+  else if (p)
+  { if (soap_s2double(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedByte2s(struct soap *soap, unsigned char n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedByte(struct soap *soap, const char *tag, int id, const unsigned char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedByte(struct soap *soap, const char *s, unsigned char *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 255)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned char *
+SOAP_FMAC2
+soap_inunsignedByte(struct soap *soap, const char *tag, unsigned char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned char*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned char), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedByte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedShort2s(struct soap *soap, unsigned short n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedShort(struct soap *soap, const char *tag, int id, const unsigned short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedShort(struct soap *soap, const char *s, unsigned short *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 65535)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned short *
+SOAP_FMAC2
+soap_inunsignedShort(struct soap *soap, const char *tag, unsigned short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned short*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned short), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedShort(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedInt2s(struct soap *soap, unsigned int n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedInt(struct soap *soap, const char *tag, int id, const unsigned int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedInt(struct soap *soap, const char *s, unsigned int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (unsigned int)soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned int *
+SOAP_FMAC2
+soap_inunsignedInt(struct soap *soap, const char *tag, unsigned int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned int*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned int), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedInt(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedLong2s(struct soap *soap, unsigned long n)
+{ sprintf(soap->tmpbuf, "%lu", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedLong(struct soap *soap, const char *tag, int id, const unsigned long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedLong(struct soap *soap, const char *s, unsigned long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned long *
+SOAP_FMAC2
+soap_inunsignedLong(struct soap *soap, const char *tag, unsigned long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned long*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned long), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedLong(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_ULONG642s(struct soap *soap, ULONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_ULONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outULONG64(struct soap *soap, const char *tag, int id, const ULONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_ULONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2ULONG64(struct soap *soap, const char *s, ULONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOULL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoull(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_ULONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+ULONG64 *
+SOAP_FMAC2
+soap_inULONG64(struct soap *soap, const char *tag, ULONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (ULONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(ULONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (ULONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(ULONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2ULONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2string(struct soap *soap, const char *s, char **t)
+{ *t = NULL;
+  if (s)
+  { if (!(*t = soap_strdup(soap, s)))
+      return soap->error = SOAP_EOM;
+    if (!(soap->mode & (SOAP_ENC_LATIN | SOAP_C_UTFSTRING)))
+    { /* TODO: consider truncating UTF8 to ASCII for regular XML attribute strings? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2QName(struct soap *soap, const char *s, char **t)
+{ if (s)
+  { struct soap_nlist *np;
+    const char *p;
+    if (!strncmp(s, "xml:", 4))
+    { *t = soap_strdup(soap, s);
+      return SOAP_OK;
+    }
+    np = soap->nlist;
+    p = strchr(s, ':');
+    if (p)
+    { register int n = p - s;
+      while (np && (strncmp(np->id, s, n) || np->id[n]))
+        np = np->next;
+      p++;
+    }
+    else
+    { while (np && *np->id)
+        np = np->next;
+      p = s;
+    }
+    if (np)
+    { if (np->index >= 0 && soap->local_namespaces)
+      { register const char *q = soap->local_namespaces[np->index].id;
+        if (q)
+        { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(q) + 2)))
+            sprintf(*t, "%s:%s", q, p);
+          return SOAP_OK;
+        }
+      }
+      if (np->ns)
+      { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(np->ns) + 4)))
+          sprintf(*t, "\"%s\":%s", np->ns, p);
+        return SOAP_OK;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined (index=%d, URI=%s)\n", s, np->index, np->ns?np->ns:""));
+      return soap->error = SOAP_NAMESPACE; 
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined, assuming empty namespace\n", s));
+    if ((*t = (char*)soap_malloc(soap, strlen(p) + 4)))
+      sprintf(*t, "\"\":%s", p);
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_QName2s(struct soap *soap, const char *s)
+{ struct Namespace *p;
+  char *t;
+  int n;
+  if (!s || *s != '"')
+  {
+#ifndef WITH_LEAN
+    if (s && (soap->mode & SOAP_XML_CANONICAL))
+    { t = (char*)strchr(s, ':');
+      if (t)
+        soap_utilize_ns(soap, s, t - s);
+    }
+#endif
+    return s;
+  }
+  s++;
+  if ((p = soap->local_namespaces))
+  { for (; p->id; p++)
+    { if (p->ns)
+        if (!soap_tag_cmp(s, p->ns))
+          break;
+      if (p->in)
+        if (!soap_tag_cmp(s, p->in))
+          break;
+    }
+    if (p && p->id)
+    { s = strchr(s, '"');
+      if (s)
+      { t = (char*)soap_malloc(soap, strlen(p->id) + strlen(s));
+        strcpy(t, p->id);
+	strcat(t, s + 1);
+        return t;
+      }
+    }
+  }
+  t = (char*)strchr(s, '"');
+  if (t)
+    n = t - s;
+  else
+    n = 0;
+  t = soap_strdup(soap, s);
+  t[n] = '\0';
+  sprintf(soap->tmpbuf, "xmlns:_%d", soap->idnum++);
+  soap_set_attr(soap, soap->tmpbuf, t);
+  s = strchr(s, '"');
+  if (s)
+  { t = (char*)soap_malloc(soap, strlen(soap->tmpbuf) + strlen(s) - 6);
+    strcpy(t, soap->tmpbuf + 6);
+    strcat(t, s + 1);
+  }
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2wchar(struct soap *soap, const char *s, wchar_t **t)
+{ wchar_t *r;
+  if (!s)
+    *t = NULL;
+  else
+  { *t = r = (wchar_t*)soap_malloc(soap, sizeof(wchar_t) * (strlen(s) + 1));
+    if (!r)
+      return soap->error;
+    if (soap->mode & SOAP_ENC_LATIN)
+    { while (*s)
+        *r++ = (wchar_t)*s++;
+    }
+    else
+    { /* Convert UTF8 to wchar */
+      while (*s)
+      { register soap_wchar c, c1, c2, c3, c4;
+        c = *s++;
+        if (c < 0x80)
+	  *r++ = (wchar_t)c;
+	else
+        { c1 = (soap_wchar)*s++ & 0x3F;
+          if (c < 0xE0)
+            *r++ = (wchar_t)(((soap_wchar)(c & 0x1F) << 6) | c1);
+          else
+	  { c2 = (soap_wchar)*s++ & 0x3F;
+            if (c < 0xF0)
+              *r++ = (wchar_t)(((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2);
+            else
+	    { c3 = (soap_wchar)*s++ & 0x3F;
+              if (c < 0xF8)
+                *r++ = (wchar_t)(((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3);
+              else
+	      { c4 = (soap_wchar)*s++ & 0x3F;
+                if (c < 0xFC)
+                  *r++ = (wchar_t)(((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4);
+                else
+		  *r++ = (wchar_t)(((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(*s++ & 0x3F));
+              }
+            }
+          }
+        }
+      }
+    }
+    *r = L'\0';
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_wchar2s(struct soap *soap, const wchar_t *s)
+{ register soap_wchar c;
+  register char *r, *t;
+  const wchar_t *q = s;
+  size_t n = 0;
+  while ((c = *q++))
+  { if (c > 0 && c < 0x80)
+      n++;
+    else
+      n += 6;
+  }
+  r = t = (char*)soap_malloc(soap, n + 1);
+  if (r)
+  { /* Convert wchar to UTF8 */
+    while ((c = *s++))
+    { if (c > 0 && c < 0x80)
+        *t++ = (char)c;
+      else
+      { if (c < 0x0800)
+          *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+        else
+        { if (c < 0x010000)
+            *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+          else
+          { if (c < 0x200000)
+              *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+            else
+            { if (c < 0x04000000)
+                *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+              else
+              { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+              }
+              *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+            }     
+            *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+        }
+        *t++ = (char)(0x80 | (c & 0x3F));
+      }
+    }
+    *t = '\0';
+  }
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outstring(struct soap *soap, const char *tag, int id, char *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_string_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_instring(struct soap *soap, const char *tag, char **p, const char *type, int t, int flag, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_string_in(soap, flag, minlen, maxlen);
+    if (!*p || !(char*)soap_id_enter(soap, soap->id, *p, t, sizeof(char*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (char**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(char**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwstring(struct soap *soap, const char *tag, int id, wchar_t *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_wstring_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type, int t, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_wstring_in(soap, 1, minlen, maxlen);
+    if (!*p || !(wchar_t*)soap_id_enter(soap, soap->id, *p, t, sizeof(wchar_t*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (wchar_t**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(wchar_t**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static time_t
+soap_timegm(struct tm *T)
+{
+#if defined(HAVE_TIMEGM)
+  return timegm(T);
+#else
+  time_t t, g, z;
+#ifdef HAVE_GMTIME_R
+  struct tm tm, *tmp = &tm;
+#else
+  struct tm *tmp;
+#endif
+  t = mktime(T);
+  if (t == -1)
+    return -1;
+#ifdef HAVE_GMTIME_R
+  gmtime_r(&t, tmp);
+#else
+  tmp = gmtime(&t);
+#endif
+  tmp->tm_isdst = 0;
+  g = mktime(tmp);
+  if (g == -1)
+    return -1;
+  z = g - t;
+  return t - z;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_dateTime2s(struct soap *soap, time_t n)
+{ struct tm T, *pT = &T;
+#if defined(HAVE_GMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PGMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_PGMTIME)
+  if (gmtime(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GMTIME)
+  if ((pT = gmtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GETTIMEOFDAY)
+  struct timezone tz;
+  memset((void*)&tz, 0, sizeof(tz));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+#endif
+#elif defined(HAVE_FTIME)
+  struct timeb t;
+  memset((void*)&t, 0, sizeof(t));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+  /* The following defines were added for VxWorks*/
+# elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf+strlen(soap->tmpbuf), "%+03d:%02d", t.timezone/60, abs(t.timezone)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+# endif
+#elif defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#else
+  if ((pT = localtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#endif
+  else
+    strcpy(soap->tmpbuf, "1969-12-31T23:59:59Z");
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdateTime(struct soap *soap, const char *tag, int id, const time_t *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_dateTime2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2dateTime(struct soap *soap, const char *s, time_t *p)
+{ if (s)
+  { struct tm T;
+    char zone[16];
+    const char *t;
+    memset((void*)&T, 0, sizeof(T));
+    zone[sizeof(zone)-1] = '\0';
+    if (strchr(s, '-'))
+      t = "%d-%d-%dT%d:%d:%d%15s";
+    else if (strchr(s, ':'))
+      t = "%4d%2d%2dT%d:%d:%d%15s";
+    else /* parse non-XSD-standard alternative ISO 8601 format */
+      t = "%4d%2d%2dT%2d%2d%2d%15s";
+    sscanf(s, t, &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, zone);
+    if (T.tm_year == 1)
+      T.tm_year = 70;
+    else
+      T.tm_year -= 1900;
+    T.tm_mon--;
+    if (*zone)
+    { if (*zone == '.')
+      { for (s = zone + 1; *s; s++)
+          if (*s < '0' || *s > '9')
+            break;
+      }
+      else
+        s = zone;
+      if (*s == '+' || *s == '-')
+      { int h = 0, m = 0;
+        if (s[3] == ':')
+	{ sscanf(s, "%d:%d", &h, &m);
+	  if (h < 0)
+	    m = -m;
+	}
+	else
+	{ m = (int)atol(s);
+	  h = m / 100;
+	  m = m % 100;
+	}
+        T.tm_hour -= h;
+        T.tm_min -= m;
+      }
+      T.tm_isdst = 0;
+      *p = soap_timegm(&T);
+    }
+    else
+    { T.tm_isdst = -1;
+      *p = mktime(&T); /* no time zone: suppose it is localtime? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+time_t *
+SOAP_FMAC2
+soap_indateTime(struct soap *soap, const char *tag, time_t *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":dateTime"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (time_t*)soap_id_enter(soap, soap->id, p, t, sizeof(time_t), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (time_t*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(time_t), 0, NULL);
+  else if (p)
+  { if (soap_s2dateTime(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outliteral(struct soap *soap, const char *tag, char *const*p)
+{ int i;
+  const char *t = NULL;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p && *p)
+  { if (soap_send(soap, *p))
+      return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_inliteral(struct soap *soap, const char *tag, char **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_string_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwliteral(struct soap *soap, const char *tag, wchar_t *const*p)
+{ int i;
+  const char *t = NULL;
+  wchar_t c;
+  const wchar_t *s;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p)
+  { s = *p;
+    while ((c = *s++))
+      if (soap_pututf8(soap, (unsigned char)c))
+        return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwliteral(struct soap *soap, const char *tag, wchar_t **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_wstring_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_token(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF || soap_blank(c))
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_value(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  for (s--; i > 0; i--, s--)
+    if (!soap_blank(*s))
+      break;
+  s[1] = '\0';
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->data = soap_strdup(soap, soap->tmpbuf);
+#endif
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEANER) || !defined(WITH_NOHTTP)
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getline(struct soap *soap, char *s, int len)
+{ int i = len;
+  soap_wchar c = 0;
+  for (;;)
+  { while (--i > 0)
+    { c = soap_getchar(soap);
+      if (c == '\r' || c == '\n')
+        break;
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+    if (c != '\n')
+      c = soap_getchar(soap); /* got \r, now get \n */
+    if (c == '\n')
+    { *s = '\0';
+      if (i+1 == len) /* empty line: end of HTTP/MIME header */
+        break;
+      c = soap_unget(soap, soap_getchar(soap));
+      if (c != ' ' && c != '\t') /* HTTP line continuation? */
+        break;
+    }
+    else if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static size_t
+soap_count_attachments(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  register struct soap_multipart *content;
+  register size_t count = soap->count;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the message size with attachments, current count=%lu\n", (unsigned long)count));
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of DIME attachments\n"));
+    for (content = soap->dime.first; content; content = content->next)
+    { count += 12 + ((content->size+3)&(~3));
+      if (content->id)
+        count += ((strlen(content->id)+3)&(~3));
+      if (content->type)
+        count += ((strlen(content->type)+3)&(~3));
+      if (content->options)
+        count += ((((unsigned char)content->options[2] << 8) | ((unsigned char)content->options[3]))+7)&(~3);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of DIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary)
+  { register size_t n = strlen(soap->mime.boundary);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of MIME attachments\n"));
+    for (content = soap->mime.first; content; content = content->next)
+    { register const char *s;
+      /* count \r\n--boundary\r\n */
+      count += 6 + n;
+      /* count Content-Type: ...\r\n */
+      if (content->type)
+        count += 16 + strlen(content->type);
+      /* count Content-Transfer-Encoding: ...\r\n */
+      s = soap_str_code(mime_codes, content->encoding);
+      if (s)
+        count += 29 + strlen(s);
+      /* count Content-ID: ...\r\n */
+      if (content->id)
+        count += 14 + strlen(content->id);
+      /* count Content-Location: ...\r\n */
+      if (content->location)
+        count += 20 + strlen(content->location);
+      /* count Content-Description: ...\r\n */
+      if (content->description)
+        count += 23 + strlen(content->location);
+      /* count \r\n...content */
+      count += 2 + content->size;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of MIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+    /* count \r\n--boundary-- */
+    count += 6 + n;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New count is %lu bytes\n", (unsigned long)count));
+  return count;
+#else
+  return soap->count;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_putdimefield(struct soap *soap, const char *s, size_t n)
+{ if (soap_send_raw(soap, s, n))
+    return soap->error;
+  return soap_send_raw(soap, SOAP_STR_PADDING, -(long)n&3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_dime_option(struct soap *soap, unsigned short optype, const char *option)
+{ size_t n;
+  char *s = NULL;
+  if (option)
+  { n = strlen(option);
+    s = (char*)soap_malloc(soap, n + 5);
+    if (s)
+    { s[0] = optype >> 8;
+      s[1] = optype & 0xFF;
+      s[2] = n >> 8;
+      s[3] = n & 0xFF;
+      strcpy(s + 4, option);
+    }
+  }
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdimehdr(struct soap *soap)
+{ unsigned char tmp[12];
+  size_t optlen = 0, idlen = 0, typelen = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Put DIME header id='%s'\n", soap->dime.id?soap->dime.id:""));
+  if (soap->dime.options)
+    optlen = (((unsigned char)soap->dime.options[2] << 8) | ((unsigned char)soap->dime.options[3])) + 4;
+  if (soap->dime.id)
+    idlen = strlen(soap->dime.id);
+  if (soap->dime.type)
+    typelen = strlen(soap->dime.type);
+  tmp[0] = SOAP_DIME_VERSION | (soap->dime.flags & 0x7);
+  tmp[1] = soap->dime.flags & 0xF0;
+  tmp[2] = optlen >> 8;
+  tmp[3] = optlen & 0xFF;
+  tmp[4] = idlen >> 8;
+  tmp[5] = idlen & 0xFF;
+  tmp[6] = typelen >> 8;
+  tmp[7] = typelen & 0xFF;
+  tmp[8] = soap->dime.size >> 24;
+  tmp[9] = (soap->dime.size >> 16) & 0xFF;
+  tmp[10] = (soap->dime.size >> 8) & 0xFF;
+  tmp[11] = soap->dime.size & 0xFF;
+  if (soap_send_raw(soap, (char*)tmp, 12)
+   || soap_putdimefield(soap, soap->dime.options, optlen)
+   || soap_putdimefield(soap, soap->dime.id, idlen)
+   || soap_putdimefield(soap, soap->dime.type, typelen))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return SOAP_OK;
+  for (content = soap->dime.first; content; content = content->next)
+  { void *handle;
+    soap->dime.size = content->size;
+    soap->dime.id = content->id;
+    soap->dime.type = content->type;
+    soap->dime.options = content->options;
+    soap->dime.flags = SOAP_DIME_VERSION | SOAP_DIME_MEDIA;
+    if (soap->fdimereadopen && ((handle = soap->fdimereadopen(soap, (void*)content->ptr, content->id, content->type, content->options)) || soap->error))
+    { size_t size = content->size;
+      if (!handle)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadopen failed\n"));
+        return soap->error;
+      }
+      if (!content->size && ((soap->mode & SOAP_ENC_XML) || (soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_IO) == SOAP_IO_STORE))
+      { size_t chunksize = sizeof(soap->tmpbuf);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked streaming DIME\n"));
+        do 
+        { size = soap->fdimeread(soap, handle, soap->tmpbuf, chunksize);
+          DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread returned %lu bytes\n", (unsigned long)size));
+          if (size < chunksize)
+ 	  { soap->dime.flags &= ~SOAP_DIME_CF;
+            if (!content->next)
+              soap->dime.flags |= SOAP_DIME_ME;
+	  }
+          else
+            soap->dime.flags |= SOAP_DIME_CF;
+	  soap->dime.size = size;
+          if (soap_putdimehdr(soap)
+	   || soap_putdimefield(soap, soap->tmpbuf, size))
+            break;
+          if (soap->dime.id)
+ 	  { soap->dime.flags &= ~(SOAP_DIME_MB | SOAP_DIME_MEDIA);
+            soap->dime.id = NULL;
+            soap->dime.type = NULL;
+            soap->dime.options = NULL;
+          }  
+        } while (size >= chunksize);
+      }
+      else
+      { if (!content->next)
+          soap->dime.flags |= SOAP_DIME_ME;
+        if (soap_putdimehdr(soap))
+          return soap->error;
+        do
+        { size_t bufsize;
+	  if (size < sizeof(soap->tmpbuf))
+            bufsize = size;
+          else
+            bufsize = sizeof(soap->tmpbuf);
+          if (!(bufsize = soap->fdimeread(soap, handle, soap->tmpbuf, bufsize)))
+          { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread failed: insufficient data (%lu bytes remaining from %lu bytes)\n", (unsigned long)size, (unsigned long)soap->dime.size));
+            soap->error = SOAP_EOF;
+	    break;
+          }
+          if (soap_send_raw(soap, soap->tmpbuf, bufsize))
+            break;
+          size -= bufsize;
+        } while (size);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+        soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+      if (soap->fdimereadclose)
+        soap->fdimereadclose(soap, handle);
+    }
+    else
+    { if (!content->next)
+        soap->dime.flags |= SOAP_DIME_ME;
+      if (soap_putdimehdr(soap)
+       || soap_putdimefield(soap, (char*)content->ptr, content->size))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static char *
+soap_getdimefield(struct soap *soap, size_t n)
+{ register soap_wchar c;
+  register int i;
+  register char *s;
+  char *p = NULL;
+  if (n)
+  { p = (char*)soap_malloc(soap, n + 1);
+    if (p)
+    { s = p;
+      for (i = n; i > 0; i--)
+      { if ((int)(c = soap_get1(soap)) == EOF)
+        { soap->error = SOAP_EOF;
+          return NULL;
+        }
+        *s++ = (char)c;
+      }
+      *s = '\0';
+      if ((soap->error = soap_move(soap, -(long)n&3)))
+        return NULL;
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdimehdr(struct soap *soap)
+{ register soap_wchar c;
+  register char *s;
+  register int i;
+  unsigned char tmp[12];
+  size_t optlen, idlen, typelen;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return soap->error = SOAP_DIME_END;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME header\n"));
+  if (soap->dime.buflen || soap->dime.chunksize)
+  { if (soap_move(soap, (long)(soap->dime.size - soap_tell(soap))))
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, soap_getchar(soap)); /* skip padding and get hdr */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... From chunked\n"));
+    return SOAP_OK;
+  }
+  s = (char*)tmp;
+  for (i = 12; i > 0; i--)
+  { if ((int)(c = soap_getchar(soap)) == EOF)
+      return soap->error = SOAP_EOF;
+    *s++ = (char)c;
+  }
+  if ((tmp[0] & 0xF8) != SOAP_DIME_VERSION)
+    return soap->error = SOAP_DIME_MISMATCH;
+  soap->dime.flags = (tmp[0] & 0x7) | (tmp[1] & 0xF0);
+  optlen = (tmp[2] << 8) | tmp[3];
+  idlen = (tmp[4] << 8) | tmp[5];
+  typelen = (tmp[6] << 8) | tmp[7];
+  soap->dime.size = (tmp[8] << 24) | (tmp[9] << 16) | (tmp[10] << 8) | tmp[11];
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME size=%lu flags=0x%X\n", (unsigned long)soap->dime.size, soap->dime.flags));
+  if (!(soap->dime.options = soap_getdimefield(soap, optlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.id = soap_getdimefield(soap, idlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.type = soap_getdimefield(soap, typelen)) && soap->error)
+    return soap->error;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME id=%s, type=%s, options=%s\n", soap->dime.id?soap->dime.id:"", soap->dime.type?soap->dime.type:"", soap->dime.options?soap->dime.options+4:""));
+  if (soap->dime.flags & SOAP_DIME_ME)
+    soap->mode &= ~SOAP_ENC_DIME;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdime(struct soap *soap)
+{ while (soap->dime.flags & SOAP_DIME_CF)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap_move(soap, soap->dime.size))
+      return soap->error = SOAP_EOF;
+  }
+  if (soap_move(soap, ((soap->dime.size+3)&(~3))-soap_tell(soap)))
+    return soap->error = SOAP_EOF;
+  for (;;)
+  { register struct soap_multipart *content;
+    if (soap_getdimehdr(soap))
+      break;
+    if (soap->fdimewriteopen && ((soap->dime.ptr = (char*)soap->fdimewriteopen(soap, soap->dime.id, soap->dime.type, soap->dime.options)) || soap->error))
+    { const char *id, *type, *options;
+      size_t size, n;
+      if (!soap->dime.ptr)
+        return soap->error;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      for (;;)
+      { size = soap->dime.size;
+        for (;;)
+        { n = soap->buflen - soap->bufidx;
+          if (size < n)
+            n = size;
+          if ((soap->error = soap->fdimewrite(soap, (void*)soap->dime.ptr, soap->buf + soap->bufidx, n)))
+            break;
+	  size -= n;
+	  if (!size)
+	  { soap->bufidx += n;
+	    break;
+	  }
+	  if (soap_recv(soap))
+          { soap->error = SOAP_EOF;
+	    goto end;
+          }
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+        { soap->error = SOAP_EOF;
+	  break;
+        }
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          break;
+      }
+end:
+      if (soap->fdimewriteclose)
+        soap->fdimewriteclose(soap, (void*)soap->dime.ptr);
+      soap->dime.size = 0;
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else if (soap->dime.flags & SOAP_DIME_CF)
+    { const char *id, *type, *options;
+      register soap_wchar c;
+      register char *s;
+      register int i;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      if (soap_new_block(soap))
+        return SOAP_EOM;
+      for (;;)
+      { s = (char*)soap_push_block(soap, soap->dime.size);
+        if (!s)
+          return soap->error = SOAP_EOM;
+        for (i = soap->dime.size; i > 0; i--)
+        { if ((int)(c = soap_get1(soap)) == EOF)
+            return soap->error = SOAP_EOF;
+          *s++ = (char)c;
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+          return soap->error = SOAP_EOF;
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          return soap->error;
+      }
+      soap->dime.size = soap->blist->size++; /* allocate one more for '\0' */
+      if (!(soap->dime.ptr = soap_save_block(soap, NULL, 0)))
+        return soap->error;
+      soap->dime.ptr[soap->dime.size] = '\0'; /* force 0-terminated */
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else
+      soap->dime.ptr = soap_getdimefield(soap, soap->dime.size);
+    content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, soap->dime.ptr, soap->dime.size);
+    if (!content)
+      return soap->error = SOAP_EOM;
+    content->id = soap->dime.id;
+    content->type = soap->dime.type;
+    content->options = soap->dime.options;
+    soap_resolve_attachment(soap, content);
+    if (soap->error)
+      return soap->error;
+  }
+  if (soap->error != SOAP_DIME_END)
+    return soap->error;
+  return soap->error = SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmimehdr(struct soap *soap)
+{ struct soap_multipart *content;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  while (!*soap->msgbuf);
+  if (soap->msgbuf[0] == '-' && soap->msgbuf[1] == '-')
+  { char *s = soap->msgbuf + strlen(soap->msgbuf) - 1;
+    /* remove white space */
+    while (soap_blank(*s))
+      s--;
+    s[1] = '\0';
+    if (soap->mime.boundary)
+    { if (strcmp(soap->msgbuf + 2, soap->mime.boundary))
+        return soap->error = SOAP_MIME_ERROR;
+    }
+    else
+      soap->mime.boundary = soap_strdup(soap, soap->msgbuf + 2);
+    if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  if (soap_set_mime_attachment(soap, NULL, 0, SOAP_MIME_NONE, NULL, NULL, NULL, NULL))
+    return soap->error = SOAP_EOM;
+  content = soap->mime.last;
+  for (;;)
+  { register char *key = soap->msgbuf;
+    register char *val;
+    if (!*key)
+      break;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "MIME header: %s\n", key));
+    val = strchr(soap->msgbuf, ':');
+    if (val)
+    { *val = '\0';
+      do val++;
+      while (*val && *val <= 32);
+      if (!soap_tag_cmp(key, "Content-ID"))
+        content->id = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Location"))
+        content->location = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Disposition"))
+        content->id = soap_strdup(soap, soap_get_header_attribute(soap, val, "name"));
+      else if (!soap_tag_cmp(key, "Content-Type"))
+        content->type = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Description"))
+        content->description = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Transfer-Encoding"))
+        content->encoding = (enum soap_mime_encoding)soap_int_code(mime_codes, val, (long)SOAP_MIME_NONE);
+    }
+    if (soap_getline(soap, key, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmime(struct soap *soap)
+{ register soap_wchar c = 0;
+  if (!soap->mime.last)
+    return SOAP_OK;
+  for (;;)
+  { register size_t i, m = 0;
+    register char *s, *t = NULL;
+    struct soap_multipart *content = soap->mime.last;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Parsing MIME content id=%s type=%s\n", content->id?content->id:"", content->type?content->type:""));
+    if (soap_new_block(soap))
+      return soap->error = SOAP_EOM;
+    for (;;)
+    { register short flag = 0;
+      if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+        return soap->error = SOAP_EOM;
+      for (i = 0; i < SOAP_BLKLEN; i++)
+      { if (m > 0)
+        { *s++ = *t++;
+	  m--;
+	}
+	else
+        { if (!flag)
+	  { c = soap_get1(soap);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	  }
+	  if (flag || c == '\r')
+	  { t = soap->tmpbuf;
+	    memset(t, 0, sizeof(soap->tmpbuf));
+            strcpy(t, "\n--");
+            if (soap->mime.boundary)
+	      strncat(t, soap->mime.boundary, sizeof(soap->tmpbuf)-4);
+	    do c = soap_getchar(soap);
+	    while (c == *t++);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	    if (!*--t)
+	      goto end;
+	    *t = (char)c;
+	    flag = (c == '\r');
+	    m = t - soap->tmpbuf + 1 - flag;
+	    t = soap->tmpbuf;
+	    c = '\r';
+	  }
+	  *s++ = (char)c;
+        }
+      }
+    }
+end:
+    *s = '\0'; /* force 0-terminated */
+    content->size = soap_size_block(soap, i+1)-1;
+    content->ptr = soap_save_block(soap, NULL, 0);
+    soap_resolve_attachment(soap, content);
+    if (c == '-' && soap_getchar(soap) == '-')
+      break;
+    while (c != '\r' && (int)c != EOF && soap_blank(c))
+      c = soap_getchar(soap);
+    if (c != '\r' || soap_getchar(soap) != '\n')
+      return soap->error = SOAP_MIME_ERROR;
+    if (soap_getmimehdr(soap))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_match_cid(struct soap *soap, const char *s, const char *t)
+{ register size_t n;
+  if (!s)
+    return 1;
+  if (!strcmp(s, t))
+    return 0;
+  if (!strncmp(s, "cid:", 4))
+    s += 4;
+  n = strlen(t);
+  if (*t == '<')
+  { t++;
+    n -= 2;
+  }
+  if (!strncmp(s, t, n) && !s[n])
+    return 0;
+  soap_decode(soap->tmpbuf, sizeof(soap->tmpbuf), s, SOAP_STR_EOS);
+  if (!strncmp(soap->tmpbuf, t, n) && !soap->tmpbuf[n])
+    return 0;
+  return 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_resolve_attachment(struct soap *soap, struct soap_multipart *content)
+{ if (content->id)
+  { register struct soap_xlist **xp = &soap->xlist;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving attachment data for id=%s\n", content->id));
+    while (*xp)
+    { register struct soap_xlist *xq = *xp;
+      if (!soap_match_cid(soap, xq->id, content->id))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Found matching attachment %s for content id=%s\n", xq->id, content->id));
+	*xp = xq->next;
+        *xq->ptr = (unsigned char*)content->ptr;
+        *xq->size = (int)content->size;
+        *xq->type = (char*)content->type;
+	if (content->options)
+          *xq->options = (char*)content->options;
+        else
+          *xq->options = (char*)content->description;
+	SOAP_FREE(soap, xq);
+      }
+      else
+        xp = &(*xp)->next;
+    }
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmimehdr(struct soap *soap, struct soap_multipart *content)
+{ const char *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "MIME attachment type=%s\n", content->type?content->type:""));
+  if (soap_send3(soap, "\r\n--", soap->mime.boundary, "\r\n"))
+    return soap->error;
+  if (content->type && soap_send3(soap, "Content-Type: ", content->type, "\r\n"))
+    return soap->error;
+  s = soap_str_code(mime_codes, content->encoding);
+  if (s && soap_send3(soap, "Content-Transfer-Encoding: ", s, "\r\n"))
+    return soap->error;
+  if (content->id && soap_send3(soap, "Content-ID: ", content->id, "\r\n"))
+    return soap->error;
+  if (content->location && soap_send3(soap, "Content-Location: ", content->location, "\r\n"))
+    return soap->error;
+  if (content->description && soap_send3(soap, "Content-Description: ", content->description, "\r\n"))
+    return soap->error;
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_MIME) || !soap->mime.boundary)
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending MIME attachments\n"));
+  for (content = soap->mime.first; content; content = content->next)
+    if (soap_putmimehdr(soap, content)
+     || soap_send_raw(soap, content->ptr, content->size))
+      return soap->error;
+  return soap_send3(soap, "\r\n--", soap->mime.boundary, "--");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_dime(struct soap *soap)
+{ soap->omode |= SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_mime(struct soap *soap, const char *boundary, const char *start)
+{ soap->omode |= SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = soap_strdup(soap, boundary);
+  soap->mime.start = soap_strdup(soap, start);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_dime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_mime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart*
+soap_new_multipart(struct soap *soap, struct soap_multipart **first, struct soap_multipart **last, char *ptr, size_t size)
+{ struct soap_multipart *content;
+  content = (struct soap_multipart*)soap_malloc(soap, sizeof(struct soap_multipart));
+  if (content)
+  { content->next = NULL;
+    content->ptr = ptr;
+    content->size = size;
+    content->id = NULL;
+    content->type = NULL;
+    content->options = NULL;
+    content->encoding = SOAP_MIME_NONE;
+    content->location = NULL;
+    content->description = NULL;
+    if (!*first)
+      *first = content;
+    if (*last)
+      (*last)->next = content;
+    *last = content;
+  }
+  return content;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_dime_attachment(struct soap *soap, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->options = soap_dime_option(soap, optype, option);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_mime_attachment(struct soap *soap, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->encoding = encoding;
+  content->location = soap_strdup(soap, location);
+  content->description = soap_strdup(soap, description);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap_multipart*
+SOAP_FMAC2
+soap_next_multipart(struct soap_multipart *content)
+{ if (content)
+    return content->next;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_select_mime_boundary(struct soap *soap)
+{ while (!soap->mime.boundary || soap_valid_mime_boundary(soap))
+  { register char *s = soap->mime.boundary;
+    register size_t n = 0;
+    if (s)
+      n = strlen(s);
+    if (n < 16)
+    { n = 64;
+      s = soap->mime.boundary = (char*)soap_malloc(soap, n + 1);
+      if (!s)
+        return;
+    }
+    strcpy(s, "==");
+    s += 2;
+    n -= 4;
+    while (n)
+    { *s++ = soap_base64o[soap_random & 0x3F];
+      n--;
+    }
+    strcpy(s, "==");
+  }
+  if (!soap->mime.start)
+    soap->mime.start = "<SOAP-ENV:Envelope>";
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_valid_mime_boundary(struct soap *soap)
+{ register struct soap_multipart *content;
+  register size_t k = strlen(soap->mime.boundary);
+  for (content = soap->mime.first; content; content = content->next)
+  { if (content->ptr && content->size >= k)
+    { register const char *p = (const char*)content->ptr; 
+      register size_t i;
+      for (i = 0; i < content->size - k; i++, p++)
+        if (!strncmp(p, soap->mime.boundary, k))
+          return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	HTTP cookie handling
+ *
+\******************************************************************************/
+
+#ifdef WITH_COOKIES
+/******************************************************************************/
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_encode_cookie(const char *s, char *t, size_t len)
+{ register int c;
+  register size_t n = len;
+  while ((c = *s++) && --n > 0)
+  { if (c > ' ' && c < 128 && !strchr("()<>@,;:\\\"/[]?={}", c))
+      *t++ = c;
+    else if (n > 2)
+    { *t++ = '%';
+      *t++ = (c >> 4) + (c > 159 ? '7' : '0');
+      c &= 0xF;
+      *t++ = c + (c > 9 ? '7' : '0');
+      n -= 2;
+    }
+    else
+      break;
+  }
+  *t = '\0';
+  return len - n;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  size_t n;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (*path == '/')
+    path++;
+  n = strlen(path);
+  for (p = soap->cookies; p; p = p->next)
+    if (!strcmp(p->name, name)
+     && domain
+     && p->domain
+     && !strcmp(p->domain, domain)
+     && !strncmp(p->path, path, n))
+      break;
+  return p;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_set_cookie(struct soap *soap, const char *name, const char *value, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  int n;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set cookie: %s=%s domain=%s path=%s\n", name, value?value:"", domain?domain:"", path?path:""));
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return NULL;
+  }
+  if (*path == '/')
+    path++;
+  q = soap_cookie(soap, name, domain, path);
+  if (!q)
+  { if ((q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+    { if ((q->name = (char*)SOAP_MALLOC(soap, strlen(name)+1)))
+        strcpy(q->name, name);
+      q->value = NULL;
+      q->domain = NULL;
+      q->path = NULL;
+      q->expire = -1;
+      q->version = 0;
+      q->secure = 0;
+      q->modified = 0;
+      for (p = &soap->cookies, n = soap->cookie_max; *p && n; p = &(*p)->next, n--)
+        if (!strcmp((*p)->name, name) && (*p)->path && strcmp((*p)->path, path) < 0)
+          break;
+      if (n)
+      { q->next = *p;
+        *p = q;
+      }
+      else
+      { SOAP_FREE(soap, q->name);
+        SOAP_FREE(soap, q);
+        q = NULL;
+      }
+    }
+  }
+  else
+    q->modified = 1;
+  if (q)
+  { if (q->value)
+    { SOAP_FREE(soap, q->value);
+      q->value = NULL;
+    }
+    if (q->domain)
+    { SOAP_FREE(soap, q->domain);
+      q->domain = NULL;
+    }
+    if (q->path)
+    { SOAP_FREE(soap, q->path);
+      q->path = NULL;
+    }
+    if (value && *value && (q->value = (char*)SOAP_MALLOC(soap, strlen(value)+1)))
+      strcpy(q->value, value);
+    if (domain && *domain && (q->domain = (char*)SOAP_MALLOC(soap, strlen(domain)+1)))
+      strcpy(q->domain, domain);
+    if (path && *path && (q->path = (char*)SOAP_MALLOC(soap, strlen(path)+1)))
+      strcpy(q->path, path);
+    q->session = 1;
+    q->env = 0;
+  }
+  return q;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!domain)
+  { soap_set_receiver_error(soap, "Cookie domain not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (*path == '/')
+    path++;
+  for (p = &soap->cookies, q = *p; q; q = *p)
+    if (!strcmp(q->name, name) && !strcmp(q->domain, domain) && !strncmp(q->path, path, strlen(q->path)))
+    { if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+      p = &q->next;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_env_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)) && p->env)
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_cookie_expire(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->expire;
+  return -1;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_expire(struct soap *soap, const char *name, long expire, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->expire = expire;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 1;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_clr_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 0;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putsetcookies(struct soap *soap)
+{ struct soap_cookie *p;
+  char *s, tmp[4096];
+  const char *t;
+  for (p = soap->cookies; p; p = p->next)
+  { if (p->modified || !p->env)
+    { s = tmp;
+      if (p->name)
+        s += soap_encode_cookie(p->name, s, tmp-s+4064);
+      if (p->value && *p->value)
+      { *s++ = '=';
+        s += soap_encode_cookie(p->value, s, tmp-s+4064);
+      }
+      if (p->domain && (int)strlen(p->domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", p->domain);
+      else if (soap->cookie_domain && (int)strlen(soap->cookie_domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", soap->cookie_domain);
+      strcat(s, ";Path=\"/");
+      if (p->path)
+        t = p->path;
+      else
+        t = soap->cookie_path;
+      if (t)
+      { if (*t == '/')
+          t++;
+        if ((int)strlen(t) < tmp-s+4064)
+          strcat(s, t);
+      }
+      s += strlen(s);
+      *s++ = '"';
+      if (p->version > 0)
+        sprintf(s, ";Version=%u", p->version);
+      if (p->expire >= 0)
+        sprintf(s, ";Max-Age=%ld", p->expire);
+      if (p->secure)
+        strcat(s, ";Secure");
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set-Cookie: %s\n", tmp));
+      if ((soap->error = soap->fposthdr(soap, "Set-Cookie", tmp)))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putcookies(struct soap *soap, const char *domain, const char *path, int secure)
+{ struct soap_cookie **p, *q;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  char *s, tmp[4096];
+  p = &soap->cookies;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending cookies for domain=%s path=%s\n", domain, path));
+  if (*path == '/')
+    path++;
+  while ((q = *p))
+  { if (q->expire && now > q->expire)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie %s expired\n", q->name));
+      SOAP_FREE(soap, q->name);
+      if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+    { size_t domlen = 0;
+      if (q->domain)
+      { const char *s = strchr(q->domain, ':');
+        if (s)
+	  domlen = s - q->domain;
+	else
+          domlen = strlen(q->domain);
+      }
+      if ((!q->domain || !strncmp(q->domain, domain, domlen))
+          && (!q->path || !strncmp(q->path, path, strlen(q->path)))
+          && (!q->secure || secure))
+      { s = tmp;
+        if (q->version != version)
+        { sprintf(s, "$Version=%u;", q->version);
+          version = q->version;
+        }
+        if (q->name)
+          s += soap_encode_cookie(q->name, s, tmp-s+4080);
+        if (q->value && *q->value)
+        { *s++ = '=';
+          s += soap_encode_cookie(q->value, s, tmp-s+4080);
+        }
+        if (q->path && (int)strlen(q->path) < tmp-s+4080)
+        { sprintf(s, ";$Path=\"/%s\"", (*q->path == '/' ? q->path + 1 : q->path));
+          s += strlen(s);
+        }
+        if (q->domain && (int)strlen(q->domain) < tmp-s+4080)
+          sprintf(s, ";$Domain=\"%s\"", q->domain);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie: %s\n", tmp));
+        if ((soap->error = soap->fposthdr(soap, "Cookie", tmp)))
+          return soap->error;
+      }
+      p = &q->next;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_getcookies(struct soap *soap, const char *val)
+{ struct soap_cookie *p = NULL, *q;
+  const char *s;
+  char *t, tmp[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  char *domain = NULL;
+  char *path = NULL;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  if (!val)
+    return;
+  s = val;
+  while (*s)
+  { s = soap_decode_key(tmp, sizeof(tmp), s);
+    if (!soap_tag_cmp(tmp, "$Version"))
+    { if ((s = soap_decode_val(tmp, sizeof(tmp), s)))
+      { if (p)
+          p->version = (int)atol(tmp);
+        else
+          version = (int)atol(tmp);
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Path"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->path)
+          SOAP_FREE(soap, p->path);
+        p->path = t;
+      }
+      else
+      { if (path)
+          SOAP_FREE(soap, path);
+        path = t;
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Domain"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->domain)
+          SOAP_FREE(soap, p->domain);
+	p->domain = t;
+      }
+      else
+      { if (domain)
+          SOAP_FREE(soap, domain);
+        domain = t;
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Path"))
+    { if (p->path)
+        SOAP_FREE(soap, p->path);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->path = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->path, tmp);
+      }
+      else
+        p->path = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Domain"))
+    { if (p->domain)
+        SOAP_FREE(soap, p->domain);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->domain = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->domain, tmp);
+      }
+      else
+        p->domain = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Version"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->version = (unsigned int)atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Max-Age"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->expire = now + atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Expires"))
+    { struct tm T;
+      char a[3]; 
+      static const char mns[] = "anebarprayunulugepctovec";
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (strlen(tmp) > 20)
+      { memset((void*)&T, 0, sizeof(T));
+        a[0] = tmp[4];
+        a[1] = tmp[5];
+        a[2] = '\0';
+        T.tm_mday = (int)atol(a);
+        a[0] = tmp[8];
+        a[1] = tmp[9];
+        T.tm_mon = (strstr(mns, a) - mns) / 2;
+        a[0] = tmp[11];
+        a[1] = tmp[12];
+        T.tm_year = 100 + (int)atol(a);
+        a[0] = tmp[13];
+        a[1] = tmp[14];
+        T.tm_hour = (int)atol(a);
+        a[0] = tmp[16];
+        a[1] = tmp[17];
+        T.tm_min = (int)atol(a);
+        a[0] = tmp[19];
+        a[1] = tmp[20];
+        T.tm_sec = (int)atol(a);
+        p->expire = soap_timegm(&T);
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Secure"))
+      p->secure = 1;
+    else
+    { if (p)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+        if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+        { q->version = p->version;
+          q->expire = p->expire;
+          q->secure = p->secure;
+          q->env = 1;
+        }
+        if (p->name)
+          SOAP_FREE(soap, p->name);
+        if (p->value)
+          SOAP_FREE(soap, p->value);
+        if (p->domain)
+          SOAP_FREE(soap, p->domain);
+        if (p->path)
+          SOAP_FREE(soap, p->path);
+        SOAP_FREE(soap, p);
+      }
+      if ((p = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      { p->name = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+        strcpy(p->name, tmp);
+        s = soap_decode_val(tmp, sizeof(tmp), s);
+        if (*tmp)
+        { p->value = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+          strcpy(p->value, tmp);
+        }
+        else
+          p->value = NULL;
+        p->domain = domain;
+        p->path = path;
+        p->expire = 0;
+        p->secure = 0;
+        p->version = version;
+      }
+    }
+  }
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+    if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+    { q->version = p->version;
+      q->expire = p->expire;
+      q->secure = p->secure;
+      q->env = 1;
+    }
+    if (p->name)
+      SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+  if (domain)
+    SOAP_FREE(soap, domain);
+  if (path)
+    SOAP_FREE(soap, path);
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getenv_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  const char *s;
+  char key[4096], val[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  if (!(s = getenv("HTTP_COOKIE")))
+    return SOAP_ERR;
+  do
+  { s = soap_decode_key(key, sizeof(key), s);
+    s = soap_decode_val(val, sizeof(val), s);
+    p = soap_set_cookie(soap, key, val, NULL, NULL);
+    if (p)
+      p->env = 1;
+  } while (*s);
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_copy_cookies(struct soap *soap)
+{ struct soap_cookie *p, **q, *r;
+  q = &r;
+  for (p = soap->cookies; p; p = p->next)
+  { if (!(*q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      return r;
+    **q = *p;
+    if (p->name)
+    { if (((*q)->name = (char*)SOAP_MALLOC(soap, strlen(p->name)+1)))
+        strcpy((*q)->name, p->name);
+    }
+    if (p->value)
+    { if (((*q)->value = (char*)SOAP_MALLOC(soap, strlen(p->value)+1)))
+        strcpy((*q)->value, p->value);
+    }
+    if (p->domain)
+    { if (((*q)->domain = (char*)SOAP_MALLOC(soap, strlen(p->domain)+1)))
+        strcpy((*q)->domain, p->domain);
+    }
+    if (p->path)
+    { if (((*q)->path = (char*)SOAP_MALLOC(soap, strlen(p->path)+1)))
+        strcpy((*q)->path, p->path);
+    }
+    q = &(*q)->next;
+  }
+  *q = NULL;
+  return r;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  for (p = soap->cookies; p; p = soap->cookies)
+  { soap->cookies = p->next;
+    SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+}
+
+/******************************************************************************/
+#endif /* WITH_COOKIES */
+
+/******************************************************************************/
+#ifdef WITH_GZIP
+#ifndef PALM_1
+static int
+soap_getgziphdr(struct soap *soap)
+{ int i;
+  soap_wchar c, f = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get gzip header\n"));
+  for (i = 0; i < 9; i++)
+  { if ((int)(c = soap_get1(soap) == EOF))
+      return soap->error = SOAP_EOF;
+    if (i == 2)
+      f = c;
+  }
+  if (f & 0x04) /* FEXTRA */
+  { for (i = soap_get1(soap) | (soap_get1(soap) << 8); i; i--)
+      if ((int)soap_get1(soap) == EOF)
+        return soap->error = SOAP_EOF;
+  }
+  if (f & 0x08) /* FNAME */
+    do
+      c = soap_get1(soap);
+    while (c && (int)c != EOF);
+  if ((int)c != EOF && (f & 0x10)) /* FCOMMENT */
+    do
+      c = soap_get1(soap);
+    while (c && (int)f != EOF);
+  if ((int)c != EOF && (f & 0x01)) /* FHCRC */
+  { if ((int)(c = soap_get1(soap)) != EOF)
+      c = soap_get1(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_recv(struct soap *soap)
+{ soap_wchar c;
+  soap->error = SOAP_OK;
+  soap_free(soap);
+  soap_set_local_namespaces(soap);
+  soap->version = 0;	/* don't assume we're parsing SOAP content by default */
+#ifndef WITH_NOIDREF
+  soap_free_iht(soap);
+#endif
+  if ((soap->imode & SOAP_IO) == SOAP_IO_CHUNK)
+    soap->omode |= SOAP_IO_CHUNK;
+  soap->imode &= ~SOAP_IO;
+  soap->mode = soap->imode;
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  soap->ahead = 0;
+  soap->peeked = 0;
+  soap->level = 0;
+  soap->part = SOAP_BEGIN;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  *soap->endpoint = '\0';
+  soap->action = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket))
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->recvfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->recvfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#ifdef WITH_ZLIB
+  soap->mode &= ~SOAP_ENC_ZLIB;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.next_in = Z_NULL;
+  soap->d_stream.avail_in = 0;
+  soap->d_stream.next_out = (Byte*)soap->buf;
+  soap->d_stream.avail_out = SOAP_BUFLEN;
+  soap->z_ratio_in = 1.0;
+#endif
+#ifndef WITH_LEANER
+  if (soap->fprepareinit)
+    soap->fprepareinit(soap);
+#endif
+  c = soap_getchar(soap);
+#ifdef WITH_GZIP
+  if (c == 0x1F)
+  { if (soap_getgziphdr(soap))
+      return soap->error;
+    if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+    soap->zlib_state = SOAP_ZLIB_INFLATE;
+    soap->mode |= SOAP_ENC_ZLIB;
+    soap->zlib_in = SOAP_ZLIB_GZIP;
+    soap->z_crc = crc32(0L, NULL, 0);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    /* should not chunk over plain transport, so why bother to check? */
+    /* if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) */
+    /*   soap->z_buflen = soap->bufidx; */
+    /* else */
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+    soap->z_buflen = soap->buflen;
+    soap->buflen = soap->bufidx;
+    c = soap_getchar(soap);
+  }  
+#endif
+#ifndef WITH_LEANER
+  if (c == '-' && soap_get0(soap) == '-')
+    soap->mode |= SOAP_ENC_MIME;
+  else if ((c & 0xFFFC) == (SOAP_DIME_VERSION | SOAP_DIME_MB) && (soap_get0(soap) & 0xFFF0) == 0x20)
+    soap->mode |= SOAP_ENC_DIME;
+  else
+#endif
+  { while (soap_blank(c))
+      c = soap_getchar(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  soap_unget(soap, c);
+#ifndef WITH_NOHTTP
+  /* if not XML or (start of)BOM or MIME/DIME/ZLIB, assume HTTP header */
+  if (c != '<' && c != 0xEF && !(soap->mode & (SOAP_ENC_MIME | SOAP_ENC_DIME | SOAP_ENC_ZLIB)))
+  { soap->mode &= ~SOAP_IO;
+    soap->error = soap->fparse(soap);
+    if (soap->error && soap->error < SOAP_STOP)
+    { soap->keep_alive = 0; /* force close later */
+      return soap->error;
+    }
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { soap->chunkbuflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+      soap->chunksize = 0;
+    }
+#ifndef WITH_LEANER
+    else if (soap->fpreparerecv && soap->buflen != soap->bufidx)
+      soap->fpreparerecv(soap, soap->buf + soap->bufidx, soap->buflen - soap->bufidx);
+#endif
+#ifdef WITH_ZLIB
+    if (soap->zlib_in != SOAP_ZLIB_NONE)
+    { /* fparse should not use soap_unget to push back last char */
+#ifdef WITH_GZIP
+      c = soap_get1(soap);
+      if (c == 0x1F)
+      { if (soap_getgziphdr(soap))
+          return soap->error;
+        if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        soap->z_crc = crc32(0L, NULL, 0);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+      }
+      else
+      { soap_revget1(soap);
+#else
+      {
+#endif
+        if (inflateInit(&soap->d_stream) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate initialized\n"));
+      }
+      soap->mode |= SOAP_ENC_ZLIB;
+      memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+      soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+      soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+    }
+#endif
+    if (soap->error)
+    { if (soap->error == SOAP_FORM && soap->fform)
+      { soap->error = soap->fform(soap);
+        if (soap->error == SOAP_OK)
+          soap->error = SOAP_STOP; /* prevents further processing */
+      }
+      return soap->error;
+    }
+  }
+#endif
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_MIME)
+  { if (soap_getmimehdr(soap))
+      return soap->error;
+    if (soap_get_header_attribute(soap, soap->mime.first->type, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+  }
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap->dime.flags & SOAP_DIME_CF)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked DIME SOAP message\n"));
+      soap->dime.chunksize = soap->dime.size;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+    }
+    soap->count = soap->buflen - soap->bufidx;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse(struct soap *soap)
+{ char header[SOAP_HDRLEN], *s;
+  unsigned short get = 0, status = 0, k = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Waiting for HTTP request/response...\n"));
+  *soap->endpoint = '\0';
+  soap->length = 0;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->action = NULL;
+  soap->authrealm = NULL;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP status: %s\n", soap->msgbuf));
+    for (;;)
+    { if (soap_getline(soap, header, SOAP_HDRLEN))
+      { if (soap->error == SOAP_EOF)
+	{ soap->error = SOAP_OK;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "EOF in HTTP header, continue anyway\n"));
+	  break;
+	}
+        return soap->error;
+      }
+      if (!*header)
+        break;
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP header: %s\n", header));
+      s = strchr(header, ':');
+      if (s)
+      { *s = '\0';
+        do s++;
+        while (*s && *s <= 32);
+        if ((soap->error = soap->fparsehdr(soap, header, s)))
+        { if (soap->error < SOAP_STOP)
+	    return soap->error;
+	  status = soap->error;
+	  soap->error = SOAP_OK;
+        }
+      }
+    }
+    if ((s = strchr(soap->msgbuf, ' ')))
+    { k = (unsigned short)soap_strtoul(s, &s, 10);
+      if (!soap_blank(*s))
+        k = 0;
+    }
+    else
+      k = 0;
+  } while (k == 100);
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Finished HTTP header parsing\n"));
+  s = strstr(soap->msgbuf, "HTTP/");
+  if (s && s[7] != '1')
+  { if (soap->keep_alive == 1)
+      soap->keep_alive = 0;
+    if (k == 0 && (soap->omode & SOAP_IO) == SOAP_IO_CHUNK) /* k == 0 for HTTP request */
+    { soap->imode |= SOAP_IO_CHUNK;
+      soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE;
+    }
+  }
+  if (soap->keep_alive < 0)
+    soap->keep_alive = 1;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Keep alive connection = %d\n", soap->keep_alive));
+  if (s && (((get = !strncmp(soap->msgbuf, "GET ", 4))) || !strncmp(soap->msgbuf, "POST ", 5)))
+  { size_t m = strlen(soap->endpoint);
+    size_t n = m + (s - soap->msgbuf) - 5 - (!get);
+    if (n >= sizeof(soap->endpoint))
+      n = sizeof(soap->endpoint) - 1;
+    strncpy(soap->path, soap->msgbuf + 4 + (!get), n - m);
+    soap->path[n - m] = '\0';
+    strcat(soap->endpoint, soap->path);
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Target endpoint='%s'\n", soap->endpoint));
+    if (get)
+    { soap->error = soap->fget(soap);
+      if (soap->error == SOAP_OK)
+        soap->error = SOAP_STOP; /* prevents further processing */
+      return soap->error;
+    }
+    if (status)
+      return soap->error = status;
+    return SOAP_OK;
+  }
+  if (k == 0 || (k >= 200 && k <= 299) || k == 400 || k == 500)
+    return SOAP_OK;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP error %d\n", k));
+  return soap_set_receiver_error(soap, "HTTP error", soap->msgbuf, k);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse_header(struct soap *soap, const char *key, const char *val)
+{ if (!soap_tag_cmp(key, "Host"))
+  { 
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+      strcpy(soap->endpoint, "https://");
+    else
+#endif
+      strcpy(soap->endpoint, "http://");
+    strncat(soap->endpoint, val, sizeof(soap->endpoint) - 8);
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifndef WITH_LEANER
+  else if (!soap_tag_cmp(key, "Content-Type"))
+  { if (soap_get_header_attribute(soap, val, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+    else if (soap_get_header_attribute(soap, val, "multipart/related")
+          || soap_get_header_attribute(soap, val, "multipart/form-data"))
+    { soap->mime.boundary = soap_strdup(soap, soap_get_header_attribute(soap, val, "boundary"));
+      soap->mime.start = soap_strdup(soap, soap_get_header_attribute(soap, val, "start"));
+      soap->mode |= SOAP_ENC_MIME;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Content-Length"))
+    soap->length = soap_strtoul(val, NULL, 10);
+  else if (!soap_tag_cmp(key, "Content-Encoding"))
+  { if (!soap_tag_cmp(val, "deflate"))
+#ifdef WITH_ZLIB
+      soap->zlib_in = SOAP_ZLIB_DEFLATE;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+    else if (!soap_tag_cmp(val, "gzip"))
+#ifdef WITH_GZIP
+      soap->zlib_in = SOAP_ZLIB_GZIP;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+  }
+#ifdef WITH_ZLIB
+  else if (!soap_tag_cmp(key, "Accept-Encoding"))
+  {
+#ifdef WITH_GZIP
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "gzip"))
+      soap->zlib_out = SOAP_ZLIB_GZIP;
+    else
+#endif
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "deflate"))
+      soap->zlib_out = SOAP_ZLIB_DEFLATE;
+    else
+      soap->zlib_out = SOAP_ZLIB_NONE;
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Transfer-Encoding"))
+  { soap->mode &= ~SOAP_IO;
+    if (!soap_tag_cmp(val, "chunked"))
+      soap->mode |= SOAP_IO_CHUNK;
+  }
+  else if (!soap_tag_cmp(key, "Connection"))
+  { if (!soap_tag_cmp(val, "keep-alive"))
+      soap->keep_alive = -soap->keep_alive;
+    else if (!soap_tag_cmp(val, "close"))
+      soap->keep_alive = 0;
+  }
+#ifndef WITH_LEAN
+  else if (!soap_tag_cmp(key, "Authorization"))
+  { if (!soap_tag_cmp(val, "Basic *"))
+    { int n;
+      char *s;
+      soap_base642s(soap, val + 6, soap->tmpbuf, sizeof(soap->tmpbuf) - 1, &n);
+      soap->tmpbuf[n] = '\0';
+      if ((s = strchr(soap->tmpbuf, ':')))
+      { *s = '\0';
+	soap->userid = soap_strdup(soap, soap->tmpbuf);
+	soap->passwd = soap_strdup(soap, s + 1);
+      }
+    }
+  }
+  else if (!soap_tag_cmp(key, "WWW-Authenticate"))
+    soap->authrealm = soap_strdup(soap, soap_get_header_attribute(soap, val + 6, "realm"));
+  else if (!soap_tag_cmp(key, "Expect"))
+  { if (!soap_tag_cmp(val, "100-continue"))
+    { if ((soap->error = soap->fposthdr(soap, "HTTP/1.1 100 Continue", NULL))
+       || (soap->error = soap->fposthdr(soap, NULL, NULL)))
+        return soap->error;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "SOAPAction"))
+  { if (*val == '"')
+    { soap->action = soap_strdup(soap, val + 1);
+      soap->action[strlen(soap->action) - 1] = '\0';
+    }
+  }
+  else if (!soap_tag_cmp(key, "Location"))
+  { strncpy(soap->endpoint, val, sizeof(soap->endpoint));
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifdef WITH_COOKIES
+  else if (!soap_tag_cmp(key, "Cookie") || !soap_tag_cmp(key, "Set-Cookie"))
+    soap_getcookies(soap, val);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_get_header_attribute(struct soap *soap, const char *line, const char *key)
+{ register const char *s = line;
+  if (s)
+  { while (*s)
+    { register short flag;
+      s = soap_decode_key(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      flag = soap_tag_cmp(soap->tmpbuf, key);
+      s = soap_decode_val(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      if (!flag)
+        return soap->tmpbuf;
+    }
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_key(char *buf, size_t len, const char *val)
+{ return soap_decode(buf, len, val, "=,;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_val(char *buf, size_t len, const char *val)
+{ if (*val != '=')
+  { *buf = '\0';
+    return val;
+  }
+  return soap_decode(buf, len, val + 1, ",;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char*
+soap_decode(char *buf, size_t len, const char *val, const char *sep)
+{ const char *s;
+  char *t = buf;
+  for (s = val; *s; s++)
+    if (*s != ' ' && *s != '\t' && !strchr(sep, *s))
+      break;
+  if (*s == '"')
+  { s++;
+    while (*s && *s != '"' && --len)
+      *t++ = *s++;
+  }
+  else
+  { while (soap_notblank(*s) && !strchr(sep, *s) && --len)
+    { if (*s == '%')
+      { *t++ = ((s[1] >= 'A' ? (s[1] & 0x7) + 9 : s[1] - '0') << 4)
+              + (s[2] >= 'A' ? (s[2] & 0x7) + 9 : s[2] - '0');
+        s += 3;
+      }
+      else
+        *t++ = *s++;
+    }
+  }
+  *t = '\0';
+  while (*s && !strchr(sep, *s))
+    s++;
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_out(struct soap *soap)
+{
+#ifndef WITH_LEANER
+  size_t n = 0;
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->mime.start)
+  { const char *s;
+    if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+      s = "application/dime";
+    else if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+    sprintf(soap->tmpbuf, "--%s\r\nContent-Type: %s\r\nContent-Transfer-Encoding: binary\r\nContent-ID: %s\r\n\r\n", soap->mime.boundary, s, soap->mime.start);
+    n = strlen(soap->tmpbuf);
+    if (soap_send_raw(soap, soap->tmpbuf, n))
+      return soap->error;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    soap->dime.size = soap->count;	/* DIME in MIME correction */
+  if (!(soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME))
+  { if (soap_putdimehdr(soap))
+      return soap->error;
+  }
+#endif
+  soap->part = SOAP_IN_ENVELOPE;
+  return soap_element_begin_out(soap, "SOAP-ENV:Envelope", 0, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Envelope"))
+    return soap->error;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { soap->dime.size = soap->count - soap->dime.size;	/* DIME in MIME correction */
+    sprintf(soap->id, soap->dime_id_format, 0);
+    soap->dime.id = soap->id;
+    if (soap->local_namespaces)
+    { if (soap->local_namespaces[0].out)
+        soap->dime.type = (char*)soap->local_namespaces[0].out;
+      else
+        soap->dime.type = (char*)soap->local_namespaces[0].ns;
+    }
+    soap->dime.options = NULL;
+    soap->dime.flags = SOAP_DIME_MB | SOAP_DIME_ABSURI;
+    if (!soap->dime.first)
+      soap->dime.flags |= SOAP_DIME_ME;
+    soap->count += 12 + ((strlen(soap->dime.id)+3)&(~3)) + ((strlen(soap->dime.type)+3)&(~3));
+  }
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+    return soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+#endif
+  soap->part = SOAP_END_ENVELOPE;
+  return SOAP_OK;
+} 
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_in(struct soap *soap)
+{ register struct Namespace *p;
+  soap->part = SOAP_IN_ENVELOPE;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Envelope", 0))
+    return soap->error = SOAP_VERSIONMISMATCH;
+  p = soap->local_namespaces;
+  if (p)
+  { const char *ns = p[0].out;
+    if (!ns)
+      ns = p[0].ns;
+    if (!strcmp(ns, soap_env1))
+    { soap->version = 1; /* make sure we use SOAP 1.1 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc1))))
+        strcpy(p[1].out, soap_enc1);
+    }
+    else if (!strcmp(ns, soap_env2))
+    { soap->version = 2; /* make sure we use SOAP 1.2 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc2))))
+        strcpy(p[1].out, soap_enc2);
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_in(struct soap *soap)
+{ soap->part = SOAP_END_ENVELOPE;
+  return soap_element_end_in(soap, "SOAP-ENV:Envelope");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_out(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap->version == 1)
+    soap->encoding = 1;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_SEC) && soap_set_attr(soap, "wsu:Id", "Body"))
+    return soap->error;
+#endif
+  if (soap_element(soap, "SOAP-ENV:Body", 0, NULL))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Body"))
+    return soap->error;
+  soap->part = SOAP_END_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_in(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Body", 0))
+    return soap->error;
+  if (!soap->body)
+    soap->part = SOAP_NO_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_in(struct soap *soap)
+{ if (soap->part == SOAP_NO_BODY)
+    return SOAP_OK;
+  soap->part = SOAP_END_BODY;
+  return soap_element_end_in(soap, "SOAP-ENV:Body");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_header(struct soap *soap)
+{ if (soap_getheader(soap) && soap->error == SOAP_TAG_MISMATCH)
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_endpoint(struct soap *soap, const char *endpoint)
+{ register const char *s;
+  register size_t i, n;
+  soap->endpoint[0] = '\0';
+  soap->host[0] = '\0';
+  soap->path[0] = '/';
+  soap->path[1] = '\0';
+  soap->port = 80;
+  if (!endpoint || !*endpoint)
+    return;
+  if (!strncmp(endpoint, "https:", 6))
+    soap->port = 443;
+  strncpy(soap->endpoint, endpoint, sizeof(soap->endpoint) - 1);
+  s = strchr(endpoint, ':');
+  if (s && s[1] == '/' && s[2] == '/')
+    s += 3;
+  else
+    s = endpoint;
+  n = strlen(s);
+  if (n >= sizeof(soap->host))
+    n = sizeof(soap->host) - 1;
+#ifdef WITH_IPV6
+  if (s[0] == '[')
+  { s++;
+    for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == ']')
+      { s++;
+        break; 
+      }
+    }
+  }
+  else
+  { for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == '/' || s[i] == ':')
+        break; 
+    }
+  }
+#else
+  for (i = 0; i < n; i++)
+  { soap->host[i] = s[i];
+    if (s[i] == '/' || s[i] == ':')
+      break; 
+  }
+#endif
+  soap->host[i] = '\0';
+  if (s[i] == ':')
+  { soap->port = (int)atol(s + i + 1);
+    for (i++; i < n; i++)
+      if (s[i] == '/')
+        break;
+  }
+  if (s[i])
+  { strncpy(soap->path, s + i, sizeof(soap->path));
+    soap->path[sizeof(soap->path) - 1] = '\0';
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect(struct soap *soap, const char *endpoint, const char *action)
+{ return soap_connect_command(soap, SOAP_POST, endpoint, action);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect_command(struct soap *soap, int http_command, const char *endpoint, const char *action)
+{ char host[sizeof(soap->host)];
+  int port;
+  size_t count;
+  soap->error = SOAP_OK;
+  strcpy(host, soap->host); /* save to compare */
+  port = soap->port; /* save to compare */
+  soap_set_endpoint(soap, endpoint);
+#ifndef WITH_LEANER
+  if (soap->fconnect)
+  { if ((soap->error = soap->fconnect(soap, endpoint, soap->host, soap->port)))
+      return soap->error;
+  }
+  else
+#endif
+  if (soap->fopen && *soap->host)
+  { soap->status = http_command;
+    if (!soap->keep_alive || !soap_valid_socket(soap->socket) || strcmp(soap->host, host) || soap->port != port || !soap->fpoll || soap->fpoll(soap))
+    { soap->keep_alive = 0; /* to force close */
+      soap->omode &= ~SOAP_IO_UDP; /* to force close */
+      soap_closesock(soap);
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Connect/reconnect to host='%s' path='%s' port=%d\n", soap->host, soap->path, soap->port));
+#ifdef WITH_UDP
+      if (!strncmp(endpoint, "soap.udp:", 9))
+        soap->omode |= SOAP_IO_UDP;
+#endif
+      soap->socket = soap->fopen(soap, endpoint, soap->host, soap->port);
+      if (soap->error)
+        return soap->error;
+      soap->keep_alive = ((soap->omode & SOAP_IO_KEEPALIVE) != 0);
+    }
+  }
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML) && endpoint)
+  { unsigned int k = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((k & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fpost(soap, endpoint, soap->host, soap->port, soap->path, action, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((k & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = k;
+  }
+  else if (action)
+    soap->action = soap_strdup(soap, action);
+  if (http_command != SOAP_POST)
+    return soap_end_send(soap);
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2base64(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register int i;
+  register unsigned long m;
+  register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, (n + 2) / 3 * 4 + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (!s)
+    return p;
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    t += 4;
+  }
+  t[0] = '\0';
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      t[i] = '=';
+    t[4] = '\0';
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_base642s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register int i, j, c;
+  register unsigned long m;
+  register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = (strlen(s) + 3) / 4 * 3;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  if (n)
+    *n = 0;
+  for (;;)
+  { for (i = 0; i < SOAP_BLKLEN; i++)
+    { m = 0;
+      j = 0;
+      while (j < 4)
+      { c = *s++;
+        if (c == '=' || !c)
+        { i *= 3;
+          switch (j)
+          { case 2:
+              *t++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *t++ = (char)((m >> 10) & 0xFF);
+              *t++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n += i;
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      }
+      *t++ = (char)((m >> 16) & 0xFF);
+      *t++ = (char)((m >> 8) & 0xFF);
+      *t++ = (char)(m & 0xFF);
+      if (l < 3)
+      { if (n)
+	  *n += i;
+        return p;
+      }
+      l -= 3;
+    }
+    if (n)
+      *n += 3 * SOAP_BLKLEN;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2hex(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, 2 * n + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (s)
+  { for (; n > 0; n--)
+    { register int m = *s++;
+      *t++ = (char)((m >> 4) + (m > 159 ? 'a' - 10 : '0'));
+      m &= 0x0F;
+      *t++ = (char)(m + (m > 9 ? 'a' - 10 : '0'));
+    }
+  }
+  *t++ = '\0';
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_hex2s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = strlen(s) / 2;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  while (l)
+  { register int d1, d2;
+    d1 = *s++;
+    if (!d1)
+      break;
+    d2 = *s++;
+    if (!d2)
+      break;
+    *t++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    l--;
+  }
+  if (n)
+    *n = t - p;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthttphdr(struct soap *soap, int status, size_t count)
+{ register const char *s = NULL;
+  register int err = SOAP_OK;
+#ifndef WITH_LEANER
+  register const char *r = NULL;
+#endif
+  if (status == SOAP_FILE && soap->http_content)
+    s = soap->http_content;
+  else if (status == SOAP_HTML)
+    s = "text/html; charset=utf-8";
+  else if (count || ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK))
+  { if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+  }
+#ifndef WITH_LEANER
+  if (soap->mode & (SOAP_ENC_DIME | SOAP_ENC_MTOM))
+  { if (soap->mode & SOAP_ENC_MTOM)
+    { r = s;
+      s = "application/xop+xml; charset=utf-8";
+    }
+    else
+      s = "application/dime";
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->status != SOAP_GET)
+  { register const char *t = strchr(s, ';');
+    sprintf(soap->tmpbuf, "multipart/related; boundary=\"%s\"; type=\"", soap->mime.boundary);
+    if (t)
+      strncat(soap->tmpbuf, s, t - s);
+    else
+      strcat(soap->tmpbuf, s);
+    if (soap->mime.start)
+    { strcat(soap->tmpbuf, "\"; start=\"");
+      strcat(soap->tmpbuf, soap->mime.start);
+    }
+    strcat(soap->tmpbuf, "\"");
+    if (r)
+    { strcat(soap->tmpbuf, "; start-info=\"");
+      strcat(soap->tmpbuf, r);
+      strcat(soap->tmpbuf, "\"");
+    }
+    s = soap->tmpbuf;
+  }
+#endif
+  if (s && (err = soap->fposthdr(soap, "Content-Type", s)))
+    return err;
+#ifdef WITH_ZLIB
+  if (soap->omode & SOAP_ENC_ZLIB)
+  {
+#ifdef WITH_GZIP
+    err = soap->fposthdr(soap, "Content-Encoding", "gzip");
+#else
+    err = soap->fposthdr(soap, "Content-Encoding", "deflate");
+#endif
+    if (err)
+      return err;
+  }
+#endif
+#ifndef WITH_LEANER
+  if ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK)
+    err = soap->fposthdr(soap, "Transfer-Encoding", "chunked");
+  else
+#endif
+  if (soap->status != SOAP_GET)
+  { sprintf(soap->tmpbuf, "%lu", (unsigned long)count);
+    err = soap->fposthdr(soap, "Content-Length", soap->tmpbuf);
+  }
+  if (err)
+    return err;
+  return soap->fposthdr(soap, "Connection", soap->keep_alive ? "keep-alive" : "close");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_get(struct soap *soap)
+{ return SOAP_GET_METHOD;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post(struct soap *soap, const char *endpoint, const char *host, int port, const char *path, const char *action, size_t count)
+{ register const char *s;
+  register int err;
+  if (soap->status == SOAP_GET)
+    s = "GET";
+  else
+    s = "POST";
+#ifdef PALM
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)) && strncmp(endpoint, "_beam:", 6) && strncmp(endpoint, "_local:", 7) && strncmp(endpoint, "_btobex:", 8))
+#else
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)))
+#endif
+    return SOAP_OK;
+  if (soap->proxy_host && strncmp(endpoint, "https:", 6))
+    sprintf(soap->tmpbuf, "%s %s HTTP/%s", s, endpoint, soap->http_version);
+  else
+    sprintf(soap->tmpbuf, "%s /%s HTTP/%s", s, (*path == '/' ? path + 1 : path), soap->http_version);
+  if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+    return err;
+  if (port != 80)
+    sprintf(soap->tmpbuf, "%s:%d", host, port);
+  else
+    strcpy(soap->tmpbuf, host); 
+  if ((err = soap->fposthdr(soap, "Host", soap->tmpbuf))
+   || (err = soap->fposthdr(soap, "User-Agent", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, SOAP_OK, count)))
+    return err;
+#ifdef WITH_ZLIB
+#ifdef WITH_GZIP
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "gzip, deflate")))
+#else
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "deflate")))
+#endif
+    return err;
+#endif
+#ifndef WITH_LEAN
+  if (soap->userid && soap->passwd && strlen(soap->userid) + strlen(soap->passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Authorization", soap->tmpbuf)))
+      return err;
+  }
+  if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+      return err;
+  }
+#endif
+#ifdef WITH_COOKIES
+#ifdef WITH_OPENSSL
+  if (soap_putcookies(soap, host, path, soap->ssl != NULL))
+    return soap->error;
+#else
+  if (soap_putcookies(soap, host, path, 0))
+    return soap->error;
+#endif
+#endif
+  if (action && soap->version == 1)
+  { sprintf(soap->tmpbuf, "\"%s\"", action);
+    if ((err = soap->fposthdr(soap, "SOAPAction", soap->tmpbuf)))
+      return err;
+  }
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_send_header(struct soap *soap, const char *s)
+{ register const char *t;
+  do
+  { t = strchr(s, '\n'); /* disallow \n in HTTP headers */
+    if (!t)
+      t = s + strlen(s);
+    if (soap_send_raw(soap, s, t - s))
+      return soap->error;
+    s = t + 1;
+  } while (*t);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post_header(struct soap *soap, const char *key, const char *val)
+{ if (key)
+  { if (http_send_header(soap, key))
+      return soap->error;
+    if (val && (soap_send_raw(soap, ": ", 2) || http_send_header(soap, val)))
+      return soap->error;
+  }
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_response(struct soap *soap, int status, size_t count)
+{ register int err;
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    httpOutputEnable(soap->rpmreqid);
+#endif
+  if (!status || status == SOAP_HTML || status == SOAP_FILE)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "OK 200\n"));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s 200 OK", soap->http_version);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", "200 OK")))
+      return err;
+  }
+  else if (status > 200 && status < 600)
+  { sprintf(soap->tmpbuf, "HTTP/%s %d %s", soap->http_version, status, http_error(soap, status));
+    if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      return err;
+#ifndef WITH_LEAN 
+    if (status == 401)
+    { sprintf(soap->tmpbuf, "Basic realm=\"%s\"", soap->authrealm ? soap->authrealm : "gSOAP Web Service");
+      if ((err = soap->fposthdr(soap, "WWW-Authenticate", soap->tmpbuf)))
+        return err;
+    }
+    else if ((status >= 301 && status <= 303) || status == 307)
+    { if ((err = soap->fposthdr(soap, "Location", soap->endpoint)))
+        return err;
+    }
+#endif
+  }
+  else
+  { const char *s = *soap_faultcode(soap);
+    if (soap->version == 2 && !strcmp(s, "SOAP-ENV:Sender"))
+      s = "400 Bad Request";
+    else
+      s = "500 Internal Server Error";
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error %s (status=%d)\n", s, status));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s %s", soap->http_version, s);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", s)))
+      return err;
+  }
+  if ((err = soap->fposthdr(soap, "Server", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, status, count)))
+    return err;
+#ifdef WITH_COOKIES
+  if (soap_putsetcookies(soap))
+    return soap->error;
+#endif
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_response(struct soap *soap, int status)
+{ register size_t count;
+  if (!(soap->omode & (SOAP_ENC_XML | SOAP_IO_STORE /* this tests for chunking too */))
+   && (status == SOAP_HTML || status == SOAP_FILE))
+  { soap->omode &= ~SOAP_IO;
+    soap->omode |= SOAP_IO_STORE;
+  }
+  soap->status = status;
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML))
+  { register int n = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((n & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fresponse(soap, status, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((n & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = n;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static const char*
+soap_set_validation_fault(struct soap *soap, const char *s, const char *t)
+{ if (*soap->tag)
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s in element <%s>", s, t?t:SOAP_STR_EOS, soap->tag);
+  else
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s", s, t?t:SOAP_STR_EOS);
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_fault(struct soap *soap)
+{ const char **c = soap_faultcode(soap);
+  const char **s = soap_faultstring(soap);
+  if (!*c && !*s && soap->fseterror)
+    soap->fseterror(soap, c, s);
+  if (!*c)
+  { if (soap->version == 2)
+      *c = "SOAP-ENV:Sender";
+    else
+      *c = "SOAP-ENV:Client";
+  }
+  if (*s)
+    return;
+  switch (soap->error)
+  {
+#ifndef WITH_LEAN
+    case SOAP_CLI_FAULT:
+      *s = "Client fault";
+      break;
+    case SOAP_SVR_FAULT:
+      *s = "Server fault";
+      break;
+    case SOAP_TAG_MISMATCH:
+      *s = soap_set_validation_fault(soap, "tag name or namespace mismatch", NULL);
+      break;
+    case SOAP_TYPE:
+      *s = soap_set_validation_fault(soap, "data type mismatch ", soap->type);
+      break;
+    case SOAP_SYNTAX_ERROR:
+      *s = "Well-formedness violation";
+      break;
+    case SOAP_NO_TAG:
+      *s = "No XML element tag";
+      break;
+    case SOAP_MUSTUNDERSTAND:
+      *c = "SOAP-ENV:MustUnderstand";
+      sprintf(soap->msgbuf, "The data in element '%s' must be understood but cannot be handled", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_VERSIONMISMATCH:
+      *c = "SOAP-ENV:VersionMismatch";
+      *s = "SOAP version mismatch or invalid SOAP message";
+      break;
+    case SOAP_DATAENCODINGUNKNOWN:
+      *c = "SOAP-ENV:DataEncodingUnknown";
+      *s = "Unsupported SOAP data encoding";
+      break;
+    case SOAP_NAMESPACE:
+      *s = soap_set_validation_fault(soap, "namespace mismatch", NULL);
+      break;
+    case SOAP_USER_ERROR:
+      *s = "User error";
+      break;
+    case SOAP_FATAL_ERROR:
+      *s = "Fatal error";
+      break;
+    case SOAP_NO_METHOD:
+      sprintf(soap->msgbuf, "Method '%s' not implemented: method name or namespace not recognized", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_GET_METHOD:
+      *s = "HTTP GET method not implemented";
+      break;
+    case SOAP_EOM:
+      *s = "Out of memory";
+      break;
+    case SOAP_IOB:
+      *s = "Array index out of bounds";
+      break;
+    case SOAP_NULL:
+      *s = soap_set_validation_fault(soap, "nil not allowed", NULL);
+      break;
+    case SOAP_DUPLICATE_ID:
+      *s = soap_set_validation_fault(soap, "multiple definitions of id ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:DuplicateID";
+      break;
+    case SOAP_MISSING_ID:
+      *s = soap_set_validation_fault(soap, "missing id for ref ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:MissingID";
+      break;
+    case SOAP_HREF:
+      *s = soap_set_validation_fault(soap, "incompatible object ref ", soap->id);
+      break;
+    case SOAP_FAULT:
+      break;
+#ifndef WITH_NOIO
+    case SOAP_UDP_ERROR:
+      *s = "Message too large for UDP packet";
+      break;
+    case SOAP_TCP_ERROR:
+      *s = tcp_error(soap);
+      break;
+#endif
+    case SOAP_HTTP_ERROR:
+      *s = "HTTP error";
+      break;
+    case SOAP_SSL_ERROR:
+#ifdef WITH_OPENSSL
+      *s = "SSL error";
+#else
+      *s = "OpenSSL not installed: recompile with -DWITH_OPENSSL";
+#endif
+      break;
+    case SOAP_PLUGIN_ERROR:
+      *s = "Plugin registry error";
+      break;
+    case SOAP_DIME_ERROR:
+      *s = "DIME format error";
+      break;
+    case SOAP_DIME_HREF:
+      *s = "DIME href to missing attachment";
+      break;
+    case SOAP_DIME_MISMATCH:
+      *s = "DIME version/transmission error";
+      break;
+    case SOAP_DIME_END:
+      *s = "End of DIME error";
+      break;
+    case SOAP_MIME_ERROR:
+      *s = "MIME format error";
+      break;
+    case SOAP_MIME_HREF:
+      *s = "MIME href to missing attachment";
+      break;
+    case SOAP_MIME_END:
+      *s = "End of MIME error";
+      break;
+    case SOAP_ZLIB_ERROR:
+#ifdef WITH_ZLIB
+      sprintf(soap->msgbuf, "Zlib/gzip error: '%s'", soap->d_stream.msg?soap->d_stream.msg:"");
+      *s = soap->msgbuf;
+#else
+      *s = "Zlib/gzip not installed for (de)compression: recompile with -DWITH_GZIP";
+#endif
+      break;
+    case SOAP_REQUIRED:
+      *s = soap_set_validation_fault(soap, "missing required attribute", NULL);
+      break;
+    case SOAP_PROHIBITED:
+      *s = soap_set_validation_fault(soap, "prohibited attribute present", NULL);
+      break;
+    case SOAP_OCCURS:
+      *s = soap_set_validation_fault(soap, "min/maxOccurs violation", NULL);
+      break;
+    case SOAP_LENGTH:
+      *s = soap_set_validation_fault(soap, "content length violation", NULL);
+      break;
+    case SOAP_STOP:
+      *s = "Stopped: no response sent";
+      break;
+#endif
+    case SOAP_EOF:
+#ifndef WITH_NOIO
+      sprintf(soap->msgbuf, "End of file or no input: '%s'", soap_strerror(soap));
+      *s = soap->msgbuf;
+      break;
+#else
+      *s = "End of file or no input";
+      break;
+#endif
+    default:
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+      if (soap->error > 200 && soap->error < 600)
+      { sprintf(soap->msgbuf, "HTTP Error: %d %s", soap->error, http_error(soap, soap->error));
+        *s = soap->msgbuf;
+      }
+      else
+#endif
+#endif
+      { sprintf(soap->msgbuf, "Error %d", soap->error);
+        *s = soap->msgbuf;
+      }
+    }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_fault(struct soap *soap)
+{ register int status = soap->error;
+  int r = 1;
+  if (status == SOAP_STOP)
+    return status;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Sending back fault struct for error code %d\n", soap->error));
+  soap->keep_alive = 0; /* to terminate connection */
+  soap_set_fault(soap);
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+  if (soap_valid_socket(soap->socket))
+  { struct timeval timeout;
+    fd_set rfd, sfd;
+    timeout.tv_sec = 0;
+    timeout.tv_usec = 0;
+    FD_ZERO(&rfd);
+    FD_ZERO(&sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, NULL, &timeout);
+    if (r > 0)
+    { if (!FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       || (FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        && recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) < 0))
+        r = 0;
+    }
+  }
+#endif
+#endif
+  if ((status != SOAP_EOF || (!soap->recv_timeout && !soap->send_timeout)) && r > 0)
+  { soap->error = SOAP_OK;
+    soap_serializeheader(soap);
+    soap_serializefault(soap);
+    soap_begin_count(soap);
+    if (soap->mode & SOAP_IO_LENGTH)
+    { soap_envelope_begin_out(soap);
+      soap_putheader(soap);
+      soap_body_begin_out(soap);
+      soap_putfault(soap);
+      soap_body_end_out(soap);
+      soap_envelope_end_out(soap);
+    }
+    soap_end_count(soap);
+    if (soap_response(soap, status)
+     || soap_envelope_begin_out(soap)
+     || soap_putheader(soap)
+     || soap_body_begin_out(soap)
+     || soap_putfault(soap)
+     || soap_body_end_out(soap)
+     || soap_envelope_end_out(soap))
+      return soap_closesock(soap);
+    soap_end_send(soap);
+  }
+  soap->error = status;
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_fault(struct soap *soap)
+{ register int status = soap->error;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Receiving SOAP Fault\n"));
+  soap->error = SOAP_OK;
+  if (soap_getfault(soap))
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Error: soap_get_soapfault() failed. Is this a SOAP message at all?\n"));
+    *soap_faultcode(soap) = (soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client");
+    soap->error = status;
+    soap_set_fault(soap);
+  }
+  else
+  { register const char *s = *soap_faultcode(soap);
+    if (!soap_match_tag(soap, s, "SOAP-ENV:Server") || !soap_match_tag(soap, s, "SOAP-ENV:Receiver"))
+      status = SOAP_SVR_FAULT; 
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:Client") || !soap_match_tag(soap, s, "SOAP-ENV:Sender"))
+      status = SOAP_CLI_FAULT;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:MustUnderstand"))
+      status = SOAP_MUSTUNDERSTAND;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:VersionMismatch"))
+      status = SOAP_VERSIONMISMATCH;
+    else
+    { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Fault code %s\n", s));
+      status = SOAP_FAULT;
+    }
+    if (soap_body_end_in(soap)
+     || soap_envelope_end_in(soap)
+     || soap_end_recv(soap))
+      return soap_closesock(soap);
+    soap->error = status;
+  }
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_empty_response(struct soap *soap)
+{ soap->count = 0;
+  if (soap_response(soap, SOAP_OK) || soap_end_send(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_empty_response(struct soap *soap)
+{ if (soap_begin_recv(soap) || soap_end_recv(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+soap_strerror(struct soap *soap)
+{ register int err = soap->errnum;
+  if (err)
+  {
+#ifndef WIN32
+    return strerror(err);
+#else
+    FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, (LPTSTR)&soap->errorstr, sizeof(soap->errorstr), NULL);
+    return soap->errorstr;
+#endif
+  }
+  return "Operation interrupted or timed out";
+}
+#endif
+#endif 
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_set_error(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail, int soaperror)
+{ *soap_faultcode(soap) = faultcode;
+  if (faultsubcode)
+    *soap_faultsubcode(soap) = faultsubcode;
+  *soap_faultstring(soap) = faultstring;
+  if (faultdetail && *faultdetail)
+  { register const char **s = soap_faultdetail(soap);
+    if (s)
+      *s = faultdetail;
+  }
+  return soap->error = soaperror;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_sender_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_receiver_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_copy_fault(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ char *r = NULL, *s = NULL, *t = NULL;
+  if (faultsubcode)
+    r = soap_strdup(soap, faultsubcode);
+  if (faultstring)
+    s = soap_strdup(soap, faultstring);
+  if (faultdetail)
+    t = soap_strdup(soap, faultdetail);
+  return soap_set_error(soap, faultcode, r, s, t, SOAP_FAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_sender_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_receiver_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault(struct soap *soap, FILE *fd)
+{ if (soap_check_state(soap))
+    fprintf(fd, "Error: soap struct not initialized\n");
+  else if (soap->error)
+  { const char *c, *v = NULL, *s, **d;
+    d = soap_faultcode(soap);
+    if (!*d)
+      soap_set_fault(soap);
+    c = *d;
+    if (soap->version == 2)
+      v = *soap_faultsubcode(soap);
+    s = *soap_faultstring(soap);
+    d = soap_faultdetail(soap);
+    fprintf(fd, "%s%d fault: %s [%s]\n\"%s\"\nDetail: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, c, v ? v : "no subcode", s ? s : "[no reason]", d && *d ? *d : "[no detail]");
+  }
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault_location(struct soap *soap, FILE *fd)
+{ 
+#ifndef WITH_LEAN
+  int i, j, c1, c2;
+  if (soap->error && soap->buflen > 0)
+  { i = (int)soap->bufidx - 1;
+    if (i <= 0)
+      i = 0;
+    c1 = soap->buf[i];
+    soap->buf[i] = '\0';
+    if ((int)soap->buflen >= i + 1024)
+      j = i + 1023;
+    else
+      j = (int)soap->buflen - 1;
+    c2 = soap->buf[j];
+    soap->buf[j] = '\0';
+    fprintf(fd, "%s%c\n** HERE **\n", soap->buf, c1);
+    if (soap->bufidx < soap->buflen)
+      fprintf(fd, "%s\n", soap->buf + soap->bufidx);
+    soap->buf[i] = c1;
+    soap->buf[j] = c2;
+  }
+#endif
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void *arg)
+{ register struct soap_plugin *p;
+  register int r;
+  if (!(p = (struct soap_plugin*)SOAP_MALLOC(soap, sizeof(struct soap_plugin))))
+    return soap->error = SOAP_EOM;
+  p->id = NULL;
+  p->data = NULL;
+  p->fcopy = NULL;
+  p->fdelete = NULL;
+  r = fcreate(soap, p, arg);
+  if (!r && p->fdelete)
+  { p->next = soap->plugins;
+    soap->plugins = p;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Registered '%s' plugin\n", p->id));
+    return SOAP_OK;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not register plugin '%s': plugin returned error %d (or fdelete callback not set)\n", p->id?p->id:"?", r));
+  SOAP_FREE(soap, p);
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static void *
+fplugin(struct soap *soap, const char *id)
+{ register struct soap_plugin *p;
+  for (p = soap->plugins; p; p = p->next)
+    if (p->id == id || !strcmp(p->id, id))
+      return p->data;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void *
+SOAP_FMAC2
+soap_lookup_plugin(struct soap *soap, const char *id)
+{ return soap->fplugin(soap, id);
+}
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap()
+{ soap_init(this);
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	C++ soap struct methods
+ *
+\******************************************************************************/
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode mode)
+{ soap_init1(this, mode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode imode, soap_mode omode)
+{ soap_init2(this, imode, omode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(struct soap& soap)
+{ soap_copy_context(this, &soap);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::~soap()
+{ soap_destroy(this);
+  soap_end(this);
+  soap_done(this);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/gsoap-palm/palmsoap2.c b/gsoap-palm/palmsoap2.c
new file mode 100644
index 0000000..6f26dee
--- /dev/null
+++ b/gsoap-palm/palmsoap2.c
@@ -0,0 +1,13449 @@
+#define PALM_2
+/*
+
+stdsoap2.c[pp] 2.7.6e
+
+gSOAP runtime
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+Contributors:
+
+Wind River Systems Inc., for the following additions under gSOAP public license:
+  - vxWorks compatible	(#define VXWORKS)
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+Installation note:
+
+Win32 build needs winsock.dll (Visual C++ "wsock32.lib")
+To do this in Visual C++ 6.0, go to "Project", "settings", select the "Link"
+tab (the project file needs to be selected in the file view) and add
+"wsock32.lib" to the "Object/library modules" entry
+
+On Mac OS X with gcc (GCC) 3.1 20020420 (prerelease) you MUST compile with
+-fstack_check when using -O2 because gcc 3.1 has a bug that smashes the stack
+when locally allocated data exceeds 64K.
+
+*/
+
+#ifdef AS400
+# pragma convert(819)	/* EBCDIC to ASCII */
+#endif
+
+#include "stdsoap2.h"
+
+#ifdef __cplusplus
+SOAP_SOURCE_STAMP("@(#) stdsoap2.cpp ver 2.7.6e 2006-02-18 12:00:00 GMT")
+extern "C" {
+#else
+SOAP_SOURCE_STAMP("@(#) stdsoap2.c ver 2.7.6e 2006-02-18 12:00:00 GMT")
+#endif
+
+/* 8bit character representing unknown/nonrepresentable character data (e.g. not supported by current locale with multibyte support enabled) */
+#ifndef SOAP_UNKNOWN_CHAR
+#define SOAP_UNKNOWN_CHAR (127)
+#endif
+
+/*      EOF=-1 */
+#define SOAP_LT (soap_wchar)(-2) /* XML character '<' */
+#define SOAP_TT (soap_wchar)(-3) /* XML character '</' */
+#define SOAP_GT (soap_wchar)(-4) /* XML character '>' */
+#define SOAP_QT (soap_wchar)(-5) /* XML character '"' */
+#define SOAP_AP (soap_wchar)(-6) /* XML character ''' */
+
+#define soap_blank(c)		((c) >= 0 && (c) <= 32)
+#define soap_notblank(c)	((c) > 32)
+#define soap_hash_ptr(p)	(((unsigned long)(p) >> 3) & (SOAP_PTRHASH - 1))
+
+#ifdef SOAP_DEBUG
+static void soap_init_logs(struct soap*);
+static void soap_close_logfile(struct soap*, int);
+static void soap_set_logfile(struct soap*, int, const char*);
+static void soap_free_mht(struct soap*);
+static void soap_track_unlink(struct soap*, const void*);
+#endif
+
+#ifndef PALM_2
+static int soap_set_error(struct soap*, const char*, const char*, const char*, const char*, int);
+static int soap_copy_fault(struct soap*, const char*, const char*, const char*, const char*);
+static int soap_getattrval(struct soap*, char*, size_t, soap_wchar);
+#endif
+
+#ifndef PALM_1
+static soap_wchar soap_char(struct soap*);
+static soap_wchar soap_get_pi(struct soap*);
+static int soap_isxdigit(int);
+static void *fplugin(struct soap*, const char*);
+#ifndef WITH_NOIDREF
+static void soap_update_ptrs(struct soap*, char*, char*, char*, char*);
+static int soap_has_copies(struct soap*, const char*, const char*);
+static void soap_init_iht(struct soap*);
+static void soap_free_iht(struct soap*);
+static void soap_init_pht(struct soap*);
+static void soap_free_pht(struct soap*);
+#endif
+#endif
+
+#ifndef WITH_LEAN
+static const char *soap_set_validation_fault(struct soap*, const char*, const char*);
+static int soap_isnumeric(struct soap*, const char*);
+static time_t soap_timegm(struct tm*);
+static struct soap_nlist *soap_lookup_ns(struct soap *soap, const char *tag, size_t n);
+static struct soap_nlist *soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized);
+static void soap_pop_ns(struct soap *soap);
+static void soap_utilize_ns(struct soap *soap, const char *tag, size_t n);
+#endif
+
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart *soap_new_multipart(struct soap*, struct soap_multipart**, struct soap_multipart**, char*, size_t);
+static int soap_putdimefield(struct soap*, const char*, size_t);
+static char *soap_getdimefield(struct soap*, size_t);
+static void soap_select_mime_boundary(struct soap*);
+static int soap_valid_mime_boundary(struct soap*);
+static int soap_match_cid(struct soap*, const char*, const char*);
+static void soap_resolve_attachment(struct soap*, struct soap_multipart*);
+#endif
+#endif
+
+#ifdef WITH_GZIP
+static int soap_getgziphdr(struct soap*);
+#endif
+
+#ifdef WITH_OPENSSL
+static int ssl_init_done = 0;
+static int ssl_auth_init(struct soap*);
+static int ssl_verify_callback(int, X509_STORE_CTX*);
+static int ssl_password(char*, int, int, void *);
+static const char *ssl_error(struct soap*, int);
+/* This callback is included for future references. It should not be deleted
+static DH *ssl_tmp_dh(SSL*, int, int);
+*/
+#endif
+
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char *soap_decode(char*, size_t, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar soap_getchunkchar(struct soap*);
+static const char *http_error(struct soap*, int);
+static int http_post(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
+static int http_get(struct soap*);
+static int http_send_header(struct soap*, const char*);
+static int http_post_header(struct soap*, const char*, const char*);
+static int http_response(struct soap*, int, size_t);
+static int http_parse(struct soap*);
+static int http_parse_header(struct soap*, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int fsend(struct soap*, const char*, size_t);
+static size_t frecv(struct soap*, char*, size_t);
+static int tcp_init(struct soap*);
+static const char *tcp_error(struct soap*);
+#ifndef WITH_IPV6
+static int tcp_gethost(struct soap*, const char *addr, struct in_addr *inaddr);
+#endif
+static int tcp_connect(struct soap*, const char *endpoint, const char *host, int port);
+static int tcp_accept(struct soap*, int, struct sockaddr*, int*);
+static int tcp_disconnect(struct soap*);
+static int tcp_closesocket(struct soap*, SOAP_SOCKET);
+static int tcp_shutdownsocket(struct soap*, SOAP_SOCKET, int);
+static const char *soap_strerror(struct soap*);
+#endif
+#endif
+
+#if defined(PALM) && !defined(PALM_2)
+unsigned short errno;
+#endif
+
+#ifndef PALM_1
+static const char soap_env1[42] = "http://schemas.xmlsoap.org/soap/envelope/";
+static const char soap_enc1[42] = "http://schemas.xmlsoap.org/soap/encoding/";
+static const char soap_env2[40] = "http://www.w3.org/2003/05/soap-envelope";
+static const char soap_enc2[40] = "http://www.w3.org/2003/05/soap-encoding";
+static const char soap_rpc[35] = "http://www.w3.org/2003/05/soap-rpc";
+#endif
+
+#ifndef PALM_1
+const struct soap_double_nan soap_double_nan = {0xFFFFFFFF, 0xFFFFFFFF};
+static const char soap_base64o[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+static const char soap_base64i[81] = "\76XXX\77\64\65\66\67\70\71\72\73\74\75XXXXXXX\00\01\02\03\04\05\06\07\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31XXXXXX\32\33\34\35\36\37\40\41\42\43\44\45\46\47\50\51\52\53\54\55\56\57\60\61\62\63";
+#endif
+
+#ifndef WITH_LEAN
+static const char soap_indent[11] = "\n\t\t\t\t\t\t\t\t\t";
+/* Alternative indentation form for SOAP_XML_INDENT:
+static const char soap_indent[21] = "\n                   ";
+*/
+#endif
+
+static const char soap_padding[4] = "\0\0\0";
+#define SOAP_STR_PADDING (soap_padding)
+#define SOAP_STR_EOS (soap_padding)
+#define SOAP_NON_NULL (soap_padding)
+
+#ifndef WITH_LEAN
+static const struct soap_code_map html_entity_codes[] = /* entities for XHTML parsing */
+{ { 160, "nbsp" },
+  { 161, "iexcl" },
+  { 162, "cent" },
+  { 163, "pound" },
+  { 164, "curren" },
+  { 165, "yen" },
+  { 166, "brvbar" },
+  { 167, "sect" },
+  { 168, "uml" },
+  { 169, "copy" },
+  { 170, "ordf" },
+  { 171, "laquo" },
+  { 172, "not" },
+  { 173, "shy" },
+  { 174, "reg" },
+  { 175, "macr" },
+  { 176, "deg" },
+  { 177, "plusmn" },
+  { 178, "sup2" },
+  { 179, "sup3" },
+  { 180, "acute" },
+  { 181, "micro" },
+  { 182, "para" },
+  { 183, "middot" },
+  { 184, "cedil" },
+  { 185, "sup1" },
+  { 186, "ordm" },
+  { 187, "raquo" },
+  { 188, "frac14" },
+  { 189, "frac12" },
+  { 190, "frac34" },
+  { 191, "iquest" },
+  { 192, "Agrave" },
+  { 193, "Aacute" },
+  { 194, "Acirc" },
+  { 195, "Atilde" },
+  { 196, "Auml" },
+  { 197, "Aring" },
+  { 198, "AElig" },
+  { 199, "Ccedil" },
+  { 200, "Egrave" },
+  { 201, "Eacute" },
+  { 202, "Ecirc" },
+  { 203, "Euml" },
+  { 204, "Igrave" },
+  { 205, "Iacute" },
+  { 206, "Icirc" },
+  { 207, "Iuml" },
+  { 208, "ETH" },
+  { 209, "Ntilde" },
+  { 210, "Ograve" },
+  { 211, "Oacute" },
+  { 212, "Ocirc" },
+  { 213, "Otilde" },
+  { 214, "Ouml" },
+  { 215, "times" },
+  { 216, "Oslash" },
+  { 217, "Ugrave" },
+  { 218, "Uacute" },
+  { 219, "Ucirc" },
+  { 220, "Uuml" },
+  { 221, "Yacute" },
+  { 222, "THORN" },
+  { 223, "szlig" },
+  { 224, "agrave" },
+  { 225, "aacute" },
+  { 226, "acirc" },
+  { 227, "atilde" },
+  { 228, "auml" },
+  { 229, "aring" },
+  { 230, "aelig" },
+  { 231, "ccedil" },
+  { 232, "egrave" },
+  { 233, "eacute" },
+  { 234, "ecirc" },
+  { 235, "euml" },
+  { 236, "igrave" },
+  { 237, "iacute" },
+  { 238, "icirc" },
+  { 239, "iuml" },
+  { 240, "eth" },
+  { 241, "ntilde" },
+  { 242, "ograve" },
+  { 243, "oacute" },
+  { 244, "ocirc" },
+  { 245, "otilde" },
+  { 246, "ouml" },
+  { 247, "divide" },
+  { 248, "oslash" },
+  { 249, "ugrave" },
+  { 250, "uacute" },
+  { 251, "ucirc" },
+  { 252, "uuml" },
+  { 253, "yacute" },
+  { 254, "thorn" },
+  { 255, "yuml" },
+  {   0, NULL }
+};
+#endif
+
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+static const struct soap_code_map h_error_codes[] =
+{
+#ifdef HOST_NOT_FOUND   
+  { HOST_NOT_FOUND, "Host not found" },
+#endif
+#ifdef TRY_AGAIN
+  { TRY_AGAIN, "Try Again" },
+#endif
+#ifdef NO_RECOVERY  
+  { NO_RECOVERY, "No Recovery" },
+#endif
+#ifdef NO_DATA
+  { NO_DATA, "No Data" },
+#endif
+#ifdef NO_ADDRESS
+  { NO_ADDRESS, "No Address" },
+#endif
+  { 0, NULL }
+};
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+static const struct soap_code_map h_http_error_codes[] =
+{ { 201, "Created" },
+  { 202, "Accepted" },
+  { 203, "Non-Authoritative Information" },
+  { 204, "No Content" },
+  { 205, "Reset Content" },
+  { 206, "Partial Content" },
+  { 300, "Multiple Choices" },
+  { 301, "Moved Permanently" },
+  { 302, "Found" },
+  { 303, "See Other" },
+  { 304, "Not Modified" },
+  { 305, "Use Proxy" },
+  { 307, "Temporary Redirect" },
+  { 400, "Bad Request" },
+  { 401, "Unauthorized" },
+  { 402, "Payment Required" },
+  { 403, "Forbidden" },
+  { 404, "Not Found" },
+  { 405, "Method Not Allowed" },
+  { 406, "Not Acceptable" },
+  { 407, "Proxy Authentication Required" },
+  { 408, "Request Time-out" },
+  { 409, "Conflict" },
+  { 410, "Gone" },
+  { 411, "Length Required" },
+  { 412, "Precondition Failed" },
+  { 413, "Request Entity Too Large" },
+  { 414, "Request-URI Too Large" },
+  { 415, "Unsupported Media Type" },
+  { 416, "Requested range not satisfiable" },
+  { 417, "Expectation Failed" },
+  { 500, "Internal Server Error" },
+  { 501, "Not Implemented" },
+  { 502, "Bad Gateway" },
+  { 503, "Service Unavailable" },
+  { 504, "Gateway Time-out" },
+  { 505, "HTTP Version not supported" },
+  {   0, NULL }
+};
+#endif
+#endif
+
+#ifdef WITH_OPENSSL
+static const struct soap_code_map h_ssl_error_codes[] =
+{
+#define _SSL_ERROR(e) { e, #e }
+  _SSL_ERROR(SSL_ERROR_SSL),
+  _SSL_ERROR(SSL_ERROR_ZERO_RETURN),
+  _SSL_ERROR(SSL_ERROR_WANT_READ),
+  _SSL_ERROR(SSL_ERROR_WANT_WRITE),
+  _SSL_ERROR(SSL_ERROR_WANT_CONNECT),
+  _SSL_ERROR(SSL_ERROR_WANT_X509_LOOKUP),
+  _SSL_ERROR(SSL_ERROR_SYSCALL),
+  { 0, NULL }
+};
+#endif
+
+#ifndef WITH_LEANER
+static const struct soap_code_map mime_codes[] =
+{ { SOAP_MIME_7BIT,		"7bit" },
+  { SOAP_MIME_8BIT,		"8bit" },
+  { SOAP_MIME_BINARY,		"binary" },
+  { SOAP_MIME_QUOTED_PRINTABLE, "quoted-printable" },
+  { SOAP_MIME_BASE64,		"base64" },
+  { SOAP_MIME_IETF_TOKEN,	"ietf-token" },
+  { SOAP_MIME_X_TOKEN,		"x-token" },
+  { 0,				NULL }
+};
+#endif
+
+#ifdef WIN32
+static int tcp_done = 0;
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+fsend(struct soap *soap, const char *s, size_t n)
+{ register int nwritten;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  if (soap->os)
+  { soap->os->write(s, n);
+    if (soap->os->good())
+      return SOAP_OK;
+    return SOAP_EOF;
+  }
+#endif
+  while (n)
+  { if (soap_valid_socket(soap->socket))
+    { 
+#ifndef WITH_LEAN
+      if (soap->send_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->send_timeout > 0)
+        { timeout.tv_sec = soap->send_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->send_timeout/1000000;
+          timeout.tv_usec = -soap->send_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { register int r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            return SOAP_EOF;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+          { soap->errnum = soap_socket_errno;
+            return SOAP_EOF;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+        nwritten = SSL_write(soap->ssl, s, n);
+      else if (soap->bio)
+        nwritten = BIO_write(soap->bio, s, n);
+      else
+#endif
+#ifdef WITH_UDP
+      if ((soap->omode & SOAP_IO_UDP))
+      { if (soap->peerlen)
+	  nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+        else
+	  nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	/* retry and back-off algorithm */
+	/* TODO: this is not very clear from specs so verify and limit conditions under which we should loop (e.g. ENOBUFS) */
+	if (nwritten < 0)
+        { struct timeval timeout;
+          fd_set fd;
+	  int udp_repeat;
+	  int udp_delay;
+          if ((soap->connect_flags & SO_BROADCAST))
+	    udp_repeat = 3; /* SOAP-over-UDP MULTICAST_UDP_REPEAT - 1 */
+          else
+	    udp_repeat = 1; /* SOAP-over-UDP UNICAST_UDP_REPEAT - 1 */
+	  udp_delay = (soap_random % 201) + 50; /* UDP_MIN_DELAY .. UDP_MAX_DELAY */
+	  do
+          { timeout.tv_sec = 0;
+            timeout.tv_usec = 1000 * udp_delay; /* ms */
+            FD_ZERO(&fd);
+            FD_SET((SOAP_SOCKET)soap->socket, &fd);
+            select((SOAP_SOCKET)(soap->socket + 1), NULL, NULL, &fd, &timeout);
+	    if (soap->peerlen)
+	      nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+            else
+	      nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	    udp_delay <<= 1;
+	    if (udp_delay > 500) /* UDP_UPPER_DELAY */
+	      udp_delay = 500;
+	  }
+	  while (nwritten < 0 && --udp_repeat > 0);
+	}
+      }
+      else
+#endif
+#if !defined(PALM) && !defined(AS400)
+        nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+#else
+        nwritten = send((SOAP_SOCKET)soap->socket, (void*)s, n, soap->socket_flags);
+#endif
+      if (nwritten <= 0)
+      {
+#ifdef WITH_OPENSSL
+	int err;
+        if (soap->ssl && (err = SSL_get_error(soap->ssl, nwritten)) != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return SOAP_EOF;
+#endif
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EWOULDBLOCK && soap_socket_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_socket_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    else
+    {
+#ifdef WITH_FASTCGI
+      nwritten = fwrite((void*)s, 1, n, stdout);
+      fflush(stdout);
+#else
+#ifdef UNDER_CE
+      nwritten = fwrite(s, 1, n, soap->sendfd);
+#else
+#ifdef VXWORKS
+#ifdef WMW_RPM_IO
+      if (soap->rpmreqid)
+        nwritten = (httpBlockPut(soap->rpmreqid, s, n) == 0) ? n : -1; 
+      else
+#endif
+        nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w"));
+#else
+      nwritten = write((SOAP_SOCKET)soap->sendfd, s, n);
+#endif
+#endif
+#endif
+      if (nwritten <= 0)
+      { if (soap_errno != SOAP_EINTR && soap_errno != SOAP_EWOULDBLOCK && soap_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    n -= nwritten;
+    s += nwritten;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_raw(struct soap *soap, const char *s, size_t n)
+{ if (!n)
+    return SOAP_OK;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { soap->count += n;
+#ifndef WITH_LEANER
+    if (soap->fpreparesend && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+  if (soap->mode & SOAP_IO)
+  { register size_t i = SOAP_BUFLEN - soap->bufidx;
+    while (n >= i)
+    { memcpy(soap->buf + soap->bufidx, s, i);
+      soap->bufidx = SOAP_BUFLEN;
+      if (soap_flush(soap))
+        return soap->error;
+      s += i;
+      n -= i;
+      i = SOAP_BUFLEN;
+    }
+    memcpy(soap->buf + soap->bufidx, s, n);
+    soap->bufidx += n;
+    return SOAP_OK;
+  }
+  return soap_flush_raw(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush(struct soap *soap)
+{ register int n = soap->bufidx;
+  if (n)
+  { soap->bufidx = 0;
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { soap->d_stream.next_in = (Byte*)soap->buf;
+      soap->d_stream.avail_in = (unsigned int)n;
+#ifdef WITH_GZIP
+      soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)n);
+#endif
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating %u bytes\n", soap->d_stream.avail_in));
+        if (deflate(&soap->d_stream, Z_NO_FLUSH) != Z_OK)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+          return soap->error = SOAP_ZLIB_ERROR;
+        }
+        if (!soap->d_stream.avail_out)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN))
+            return soap->error;
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (soap->d_stream.avail_in);
+    }
+    else
+#endif
+      return soap_flush_raw(soap, soap->buf, n);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush_raw(struct soap *soap, const char *s, size_t n)
+{ if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+  { register char *t;
+    if (!(t = (char*)soap_push_block(soap, n)))
+      return soap->error = SOAP_EOM;
+    memcpy(t, s, n);
+#ifndef WITH_LEANER
+    if (soap->fpreparesend)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+  { char t[16];
+    sprintf(t, "\r\n%lX\r\n" + (soap->chunksize ? 0 : 2), (unsigned long)n);
+    DBGMSG(SENT, t, strlen(t));
+    if ((soap->error = soap->fsend(soap, t, strlen(t))))
+      return soap->error;
+    soap->chunksize += n;
+  }
+  DBGMSG(SENT, s, n);
+#endif
+  return soap->error = soap->fsend(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send(struct soap *soap, const char *s)
+{ if (s)
+    return soap_send_raw(soap, s, strlen(s));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send2(struct soap *soap, const char *s1, const char *s2)
+{ if (soap_send(soap, s1))
+    return soap->error;
+  return soap_send(soap, s2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send3(struct soap *soap, const char *s1, const char *s2, const char *s3)
+{ if (soap_send(soap, s1)
+   || soap_send(soap, s2))
+    return soap->error;
+  return soap_send(soap, s3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static size_t
+frecv(struct soap *soap, char *s, size_t n)
+{ register int r;
+  soap->errnum = 0;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  if (soap->is)
+  { if (soap->is->good())
+      return soap->is->read(s, n).gcount();
+    return 0;
+  }
+#endif
+  if (soap_valid_socket(soap->socket))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->recv_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->recv_timeout > 0)
+        { timeout.tv_sec = soap->recv_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->recv_timeout/1000000;
+          timeout.tv_usec = -soap->recv_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+	  { soap->errnum = 0;
+            return 0;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+	  { soap->errnum = soap_socket_errno;
+            return 0;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+      { int err;
+	r = SSL_read(soap->ssl, s, n);
+        if (r > 0)
+          return (size_t)r;
+	err = SSL_get_error(soap->ssl, r);
+	if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return 0;
+      }
+      else if (soap->bio)
+      { r = BIO_read(soap->bio, s, n);
+        if (r > 0)
+          return (size_t)r;
+        return 0;
+      }
+      else
+#endif
+      { 
+#ifdef WITH_UDP
+        if ((soap->omode & SOAP_IO_UDP))
+        { SOAP_SOCKLEN_T k = (SOAP_SOCKLEN_T)sizeof(soap->peer);
+	  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+          r = recvfrom((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, &k);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+	  soap->peerlen = (size_t)k;
+#ifndef WITH_IPV6
+          soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+          soap->port = (int)ntohs(soap->peer.sin_port);
+#endif
+        }
+	else
+#endif
+          r = recv((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+        if (r >= 0)
+          return (size_t)r;
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN && soap_socket_errno != SOAP_EWOULDBLOCK)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#ifndef WITH_LEAN
+      { struct timeval timeout;
+        fd_set fd;
+        timeout.tv_sec = 0;
+        timeout.tv_usec = 10000;
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+#ifdef WITH_OPENSSL
+        if (soap->ssl && SSL_get_error(soap->ssl, r) == SSL_ERROR_WANT_WRITE)
+          r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+        else
+          r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#else
+        r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#endif
+        if (r < 0 && soap_socket_errno != SOAP_EINTR)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#endif
+    }
+  }
+#ifdef WITH_FASTCGI
+  return fread(s, 1, n, stdin);
+#else
+#ifdef UNDER_CE
+  return fread(s, 1, n, soap->recvfd);
+#else
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    r = httpBlockRead(soap->rpmreqid, s, n);
+  else
+#endif
+  r = read((SOAP_SOCKET)soap->recvfd, s, n);
+  if (r >= 0)
+    return (size_t)r;
+  soap->errnum = soap_errno;
+  return 0;
+#endif
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar
+soap_getchunkchar(struct soap *soap)
+{ if (soap->bufidx < soap->buflen)
+    return soap->buf[soap->bufidx++];
+  soap->bufidx = 0;
+  soap->buflen = soap->chunkbuflen = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)soap->buflen, soap->socket));
+  DBGMSG(RECV, soap->buf, soap->buflen);
+  if (soap->buflen)
+    return soap->buf[soap->bufidx++];
+  return EOF;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+soap_isxdigit(int c)
+{ return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f');
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_raw(struct soap *soap)
+{ register size_t ret;
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { if (soap->d_stream.next_out == Z_NULL)
+      return EOF;
+    if (soap->d_stream.avail_in || !soap->d_stream.avail_out)
+    { register int r;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflating\n"));
+      soap->d_stream.next_out = (Byte*)soap->buf;
+      soap->d_stream.avail_out = SOAP_BUFLEN;
+      r = inflate(&soap->d_stream, Z_NO_FLUSH);
+      if (r == Z_OK || r == Z_STREAM_END)
+      { soap->bufidx = 0;
+        soap->buflen = SOAP_BUFLEN - soap->d_stream.avail_out;
+        if (soap->zlib_in == SOAP_ZLIB_GZIP)
+          soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+        if (r == Z_STREAM_END)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+          soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+          soap->d_stream.next_out = Z_NULL;
+        }
+        if (soap->buflen)
+        { soap->count += soap->buflen;
+          return SOAP_OK;
+        }
+      }
+      else if (r != Z_BUF_ERROR)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate error: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        soap->d_stream.next_out = Z_NULL;
+	soap->error = SOAP_ZLIB_ERROR;
+        return EOF;
+      }
+    }
+zlib_again:
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK && !soap->chunksize)
+    { memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+      soap->buflen = soap->z_buflen;
+    }
+  }
+#endif
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) /* read HTTP chunked transfer */
+  { 
+chunk_again:
+    if (soap->chunksize)
+    { soap->buflen = ret = soap->frecv(soap, soap->buf, soap->chunksize > SOAP_BUFLEN ? SOAP_BUFLEN : soap->chunksize);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk: read %u bytes\n", (unsigned int)ret));
+      DBGMSG(RECV, soap->buf, ret);
+      soap->bufidx = 0;
+      soap->chunksize -= ret;
+    }
+    else
+    { register soap_wchar c;
+      char *t, tmp[8];
+      t = tmp;
+      if (!soap->chunkbuflen)
+      { soap->chunkbuflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes (chunked) from socket %d\n", (unsigned int)ret, soap->socket));
+        DBGMSG(RECV, soap->buf, ret);
+        soap->bufidx = 0;
+        if (!ret)
+          return soap->ahead = EOF;
+      }
+      else
+        soap->bufidx = soap->buflen;
+      soap->buflen = soap->chunkbuflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk size (idx=%u len=%u)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen));
+      while (!soap_isxdigit((int)(c = soap_getchunkchar(soap))))
+        if ((int)c == EOF)
+	  return soap->ahead = EOF;
+      do
+        *t++ = (char)c;
+      while (soap_isxdigit((int)(c = soap_getchunkchar(soap))) && t - tmp < 7);
+      while ((int)c != EOF && c != '\n')
+        c = soap_getchunkchar(soap);
+      if ((int)c == EOF)
+        return soap->ahead = EOF;
+      *t = '\0';
+      soap->chunksize = soap_strtoul(tmp, &t, 16);
+      if (!soap->chunksize)
+      { soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of chunked message\n"));
+	while ((int)c != EOF && c != '\n')
+          c = soap_getchunkchar(soap);
+        return soap->ahead = EOF;
+      }
+      soap->buflen = soap->bufidx + soap->chunksize;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving buf len to idx=%u len=%u (%s)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen, tmp));
+      if (soap->buflen > soap->chunkbuflen)
+      { soap->buflen = soap->chunkbuflen;
+        soap->chunksize -= soap->buflen - soap->bufidx;
+        soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Passed end of buffer for chunked HTTP (%u bytes left)\n", (unsigned int)(soap->buflen - soap->bufidx)));
+      }
+      else if (soap->chunkbuflen)
+        soap->chunksize = 0;
+      ret = soap->buflen - soap->bufidx;
+      if (!ret)
+        goto chunk_again;
+    }
+  }
+  else
+#endif
+  { soap->bufidx = 0;
+    soap->buflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)ret, soap->socket));
+    DBGMSG(RECV, soap->buf, ret);
+  }
+#ifndef WITH_LEANER
+  if (soap->fpreparerecv && (soap->error = soap->fpreparerecv(soap, soap->buf, ret)))
+    return soap->error;
+#endif
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { register int r;
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = (unsigned int)ret;
+    soap->d_stream.next_out = (Byte*)soap->buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    r = inflate(&soap->d_stream, Z_NO_FLUSH);
+    if (r == Z_OK || r == Z_STREAM_END)
+    { soap->bufidx = 0;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = ret = SOAP_BUFLEN - soap->d_stream.avail_out;
+      if (soap->zlib_in == SOAP_ZLIB_GZIP)
+        soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %u bytes\n", (unsigned int)ret));
+      if (!ret)
+        goto zlib_again;
+      if (r == Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+        soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+        soap->d_stream.next_out = Z_NULL;
+      }
+    }
+    else
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to inflate: (%d) %s\n", r, soap->d_stream.msg?soap->d_stream.msg:""));
+      soap->d_stream.next_out = Z_NULL;
+      soap->error = SOAP_ZLIB_ERROR;
+      return EOF;
+    }
+  }
+#endif
+  soap->count += ret;
+  return !ret;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap->dime.buflen)
+    { char *s;
+      int i;
+      unsigned char tmp[12];
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME hdr for chunked DIME is in buffer\n"));
+      soap->count += soap->dime.buflen - soap->buflen;
+      soap->buflen = soap->dime.buflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Skip padding (%ld bytes)\n", -(long)soap->dime.size&3));
+      for (i = -(long)soap->dime.size&3; i > 0; i--)
+      { soap->bufidx++;
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME hdr for next chunk\n"));
+      s = (char*)tmp;
+      for (i = 12; i > 0; i--)
+      { *s++ = soap->buf[soap->bufidx++];
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      soap->dime.flags = tmp[0] & 0x7;
+      soap->dime.size = ((size_t)tmp[8] << 24) | ((size_t)tmp[9] << 16) | ((size_t)tmp[10] << 8) | ((size_t)tmp[11]);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME chunk (%u bytes)\n", (unsigned int)soap->dime.size));
+      if (soap->dime.flags & SOAP_DIME_CF)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "More chunking\n"));
+        soap->dime.chunksize = soap->dime.size;
+        if (soap->buflen - soap->bufidx >= soap->dime.size)
+        { soap->dime.buflen = soap->buflen;
+          soap->buflen = soap->bufidx + soap->dime.chunksize;
+        }
+        else
+          soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      }
+      else
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Last chunk\n"));
+        soap->dime.buflen = 0;
+        soap->dime.chunksize = 0;
+      }
+      soap->count = soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%u bytes remaining\n", (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+    if (soap->dime.chunksize)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get next DIME hdr for chunked DIME (%u bytes chunk)\n", (unsigned int)soap->dime.chunksize));
+      if (soap_recv_raw(soap))
+        return EOF;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->count -= soap->buflen - soap->bufidx - soap->dime.chunksize;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%lu bytes remaining, count=%u\n", (unsigned long)(soap->buflen-soap->bufidx), (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+  }
+#endif
+  return soap_recv_raw(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getchar(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+    return c;
+  }
+  return soap_get1(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const struct soap_code_map*
+SOAP_FMAC2
+soap_code(const struct soap_code_map *map, const char *str)
+{ if (str)
+  { while (map->string)
+    { if (!strcmp(str, map->string)) /* case sensitive */
+        return map;
+      map++;
+    }
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_int_code(const struct soap_code_map *map, const char *str, long other)
+{ while (map->string)
+  { if (!soap_tag_cmp(str, map->string)) /* case insensitive */
+      return map->code;
+    map++;
+  }
+  return other;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_str_code(const struct soap_code_map *map, long code)
+{ while (map->code != code && map->string)
+    map++;
+  return map->string;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_char(struct soap *soap)
+{ char tmp[8];
+  register int i;
+  register soap_wchar c;
+  register char *s = tmp;
+  for (i = 0; i < 7; i++)
+  { c = soap_get1(soap);
+    if (c == ';' || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+  }
+  *s = '\0';
+  if (*tmp == '#')
+  { if (tmp[1] == 'x' || tmp[1] == 'X')
+      return soap_strtol(tmp + 2, NULL, 16);
+    return atol(tmp + 1);
+  }
+  if (!strcmp(tmp, "lt"))
+    return '<';
+  if (!strcmp(tmp, "gt"))
+    return '>';
+  if (!strcmp(tmp, "amp"))
+    return '&';
+  if (!strcmp(tmp, "quot"))
+    return '"';
+  if (!strcmp(tmp, "apos"))
+    return '\'';
+#ifndef WITH_LEAN
+  return (soap_wchar)soap_int_code(html_entity_codes, tmp, SOAP_UNKNOWN_CHAR);
+#else
+  return SOAP_UNKNOWN_CHAR; /* use this to represent unknown code */
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get0(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx];
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get1(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx++];
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_get(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+  }
+  else
+    c = soap_get1(soap);
+  for (;;)
+  { if (soap->cdata)
+    { if (c == ']')
+      { c = soap_get1(soap);
+        if (c == ']')
+        { soap->cdata = 0;
+          soap_get1(soap); /* skip > */
+          c = soap_get1(soap);
+        }
+	else
+        { soap_revget1(soap);
+          return ']';
+        }
+      }
+      else
+        return c;
+    }
+    switch (c)
+    { case '<':
+        do c = soap_get1(soap);
+        while (soap_blank(c));
+        if (c == '!' || c == '?' || c == '%')
+        { register int k = 1;
+	  if (c == '!')
+          { c = soap_get1(soap);
+            if (c == '[')
+            { do c = soap_get1(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                break;
+              soap->cdata = 1;
+              c = soap_get1(soap);
+	      continue;
+            }
+            if (c == '-' && (c = soap_get1(soap)) == '-')
+            { do
+              { c = soap_get1(soap);
+                if (c == '-' && (c = soap_get1(soap)) == '-')
+                  break;
+              } while ((int)c != EOF);
+            }
+          }
+	  else if (c == '?')
+            c = soap_get_pi(soap);
+          while ((int)c != EOF)
+          { if (c == '<')
+	      k++;
+	    else if (c == '>')
+	    { if (--k <= 0)
+	        break;
+	    }
+	    c = soap_get1(soap);
+	  }
+	  if ((int)c == EOF)
+	    break;
+          c = soap_get1(soap);
+          continue;
+        }
+        if (c == '/')
+          return SOAP_TT;
+        soap_revget1(soap);
+        return SOAP_LT;
+      case '>':
+        return SOAP_GT;
+      case '"':
+        return SOAP_QT;
+      case '\'':
+        return SOAP_AP;
+      case '&':
+        return soap_char(soap) | 0x80000000;
+    }
+    break;
+  }
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_get_pi(struct soap *soap)
+{ char buf[64];
+  register char *s = buf;
+  register int i = sizeof(buf);
+  register soap_wchar c = soap_getchar(soap);
+  /* This is a quick way to parse XML PI and we could use a callback instead to
+   * enable applications to intercept processing instructions */
+  while ((int)c != EOF && c != '?')
+  { if (--i > 0)
+    { if (soap_blank(c))
+        c = ' ';
+      *s++ = (char)c;
+    }
+    c = soap_getchar(soap);
+  }
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML PI <?%s?>\n", buf));
+  if (!strncmp(buf, "xml ", 4))
+  { s = strstr(buf, " encoding=");
+    if (s && s[10])
+    { if (!soap_tag_cmp(s + 11, "iso-8859-1*")
+       || !soap_tag_cmp(s + 11, "latin1*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to latin1 encoding\n"));
+        soap->mode |= SOAP_ENC_LATIN;
+      }
+      else if (!soap_tag_cmp(s + 11, "utf-8*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to utf-8 encoding\n"));
+        soap->mode &= ~SOAP_ENC_LATIN;
+      }
+    }
+  }
+  if ((int)c != EOF)
+    c = soap_getchar(soap);
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_move(struct soap *soap, long n)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving %ld bytes forward\n", (long)n));
+  for (; n > 0; n--)
+    if ((int)soap_getchar(soap) == EOF)
+      return SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_tell(struct soap *soap)
+{ return soap->count - soap->buflen + soap->bufidx - (soap->ahead != 0);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pututf8(struct soap *soap, register unsigned long c)
+{ char tmp[16];
+  if (c > 0 && c < 0x80)
+  { *tmp = (char)c;
+    return soap_send_raw(soap, tmp, 1);
+  }
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { register char *t = tmp;
+    if (c < 0x0800)
+      *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+    else
+    { if (c < 0x010000)
+        *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+      else
+      { if (c < 0x200000)
+          *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+        else
+        { if (c < 0x04000000)
+            *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+          else
+          { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+            *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+        }     
+        *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+      }
+      *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+    }
+    *t++ = (char)(0x80 | (c & 0x3F));
+    *t = '\0';
+  }
+  else
+#endif
+    sprintf(tmp, "&#%lu;", c);
+  return soap_send(soap, tmp);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getutf8(struct soap *soap)
+{ register soap_wchar c, c1, c2, c3, c4;
+  c = soap->ahead;
+  if (c > 0xFF)
+  { soap->ahead = 0;
+    return c;
+  }
+again:
+  c = soap_get(soap);
+  if (c < 0x80 || (soap->mode & SOAP_ENC_LATIN))
+    return c;
+  c1 = soap_get1(soap);
+  if (c1 < 0x80)
+  { soap_revget1(soap); /* doesn't look like this is UTF8 */
+    return c;
+  }
+  c1 &= 0x3F;
+  if (c < 0xE0)
+    return ((soap_wchar)(c & 0x1F) << 6) | c1;
+  c2 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c == 0xEF && c1 == 0x3B && c2 == 0x3F)	/* ignore UTF-8 BOM */
+    goto again;
+  if (c < 0xF0)
+    return ((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2;
+  c3 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xF8)
+    return ((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3;
+  c4 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xFC)
+    return ((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4;
+  return ((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(soap_get1(soap) & 0x3F);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthex(struct soap *soap, const unsigned char *s, int n)
+{ char d[2];
+  register int i;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2hex(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (i = 0; i < n; i++)
+  { register int m = *s++;
+    d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0'));
+    m &= 0x0F;
+    d[1] = (char)(m + (m > 9 ? '7' : '0'));
+    if (soap_send_raw(soap, d, 2))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_gethex(struct soap *soap, int *n)
+{
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_hex2s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register char *s;
+    register int i, k;
+    if (soap_append_lab(soap, NULL, 0))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = soap->lablen;
+    for (i = 0; i < k; i++)
+    { register char d1, d2;
+      register soap_wchar c;
+      c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = (int)(soap->lablen - k + i);
+        p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	if (p)
+	  memcpy(p, soap->labbuf, soap->lablen - k + i);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, SOAP_BLKLEN);
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register char d1, d2;
+      register soap_wchar c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap_end_block(soap);
+	  soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = soap_size_block(soap, i);
+        p = (unsigned char*)soap_save_block(soap, NULL, 0);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putbase64(struct soap *soap, const unsigned char *s, int n)
+{ register int i;
+  register unsigned long m;
+  char d[4];
+  if (!s)
+    return SOAP_OK;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2base64(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      d[i] = '=';
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_getbase64(struct soap *soap, int *n, int malloc_flag)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_base642s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register int i, k;
+    register char *s;
+    if (soap_append_lab(soap, NULL, 2))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = 3 * (soap->lablen / 3);
+    if (!s)
+      return NULL;
+    for (i = 0; i < k - 2; i += 3)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+            *n = (int)(soap->lablen - k + i);
+          p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	  if (p)
+	    memcpy(p, soap->labbuf, soap->lablen - k + i);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, 3 * SOAP_BLKLEN); /* must be multiple of 3 */
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          i *= 3;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n = (int)soap_size_block(soap, i);
+          p = (unsigned char*)soap_save_block(soap, NULL, 0);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_xop_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ /* Check MTOM xop:Include element (within hex/base64Binary) */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  int body = soap->body; /* should save type too? */
+  if (!soap_peek_element(soap))
+  { if (!soap_element_begin_in(soap, "xop:Include", 0) && *soap->href)
+    { if (soap_dime_forward(soap, ptr, size, id, type, options))
+        return soap->error;
+    }
+    if (soap->body && soap_element_end_in(soap, NULL))
+      return soap->error;
+  }
+  soap->body = body;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_dime_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ struct soap_xlist *xp = (struct soap_xlist*)SOAP_MALLOC(soap, sizeof(struct soap_xlist));
+  *ptr = NULL;
+  *size = 0;
+  *id = soap_strdup(soap, soap->href);
+  *type = NULL;
+  *options = NULL;
+  if (!xp)
+    return soap->error = SOAP_EOM;
+  xp->next = soap->xlist;
+  xp->ptr = ptr;
+  xp->size = size;
+  xp->id = *id;
+  xp->type = type;
+  xp->options = options;
+  soap->xlist = xp;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_strdup(struct soap *soap, const char *s)
+{ char *t = NULL;
+  if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1)))
+    strcpy(t, s);
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_new_block(struct soap *soap)
+{ struct soap_blist *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New block sequence (prev=%p)\n", soap->blist));
+  if (!(p = (struct soap_blist*)SOAP_MALLOC(soap, sizeof(struct soap_blist))))
+    return SOAP_EOM;   
+  p->next = soap->blist; 
+  p->ptr = NULL;
+  p->size = 0;
+  soap->blist = p;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_push_block(struct soap *soap, size_t n)
+{ char *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block of %u bytes (%u bytes total)\n", (unsigned int)n, (unsigned int)soap->blist->size + (unsigned int)n));
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(char*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  *(char**)p = soap->blist->ptr;
+  *(size_t*)(p + sizeof(char*)) = n;
+  soap->blist->ptr = p;
+  soap->blist->size += n;
+  return p + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_block(struct soap *soap)
+{ char *p;
+  if (!soap->blist->ptr)
+    return;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block\n"));
+  p = soap->blist->ptr;
+  soap->blist->size -= *(size_t*)(p + sizeof(char*));
+  soap->blist->ptr = *(char**)p;
+  SOAP_FREE(soap, p);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_update_ptrs(struct soap *soap, char *start, char *end, char *p1, char *p2)
+{ int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+#ifndef WITH_LEANER
+  register struct soap_xlist *xp;
+#endif
+  register void *p, **q;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr && (char*)ip->ptr >= start && (char*)ip->ptr < end)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", ip->id, ip->ptr, (char*)ip->ptr + (p1-p2)));
+        ip->ptr = (char*)ip->ptr + (p1-p2);
+      }
+      for (q = &ip->link; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Link update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (q = &ip->copy; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy chain update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (fp = ip->flist; fp; fp = fp->next)
+      { if ((char*)fp->ptr >= start && (char*)fp->ptr < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy list update id='%s' %p\n", ip->id, fp));
+          fp->ptr = (char*)fp->ptr + (p1-p2);
+        }
+      }
+    }
+  }
+#ifndef WITH_LEANER
+  for (xp = soap->xlist; xp; xp = xp->next)
+  { if (xp->ptr && (char*)xp->ptr >= start && (char*)xp->ptr < end)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", xp->id?xp->id:"", xp->ptr, (char*)xp->ptr + (p1-p2)));
+      xp->ptr = (unsigned char**)((char*)xp->ptr + (p1-p2));
+      xp->size = (int*)((char*)xp->size + (p1-p2));
+      xp->type = (char**)((char*)xp->type + (p1-p2));
+      xp->options = (char**)((char*)xp->options + (p1-p2));
+    }
+  }
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static int
+soap_has_copies(struct soap *soap, register const char *start, register const char *end)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  register const char *p;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { for (p = (const char*)ip->copy; p; p = *(const char**)p)
+        if (p >= start && p < end)
+          return SOAP_ERR;
+      for (fp = ip->flist; fp; fp = fp->next)
+        if ((const char*)fp->ptr >= start && (const char*)fp->ptr < end)
+	  return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_resolve(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  short flag;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr)
+      { register void *p, **q, *r;
+        q = (void**)ip->link;
+        ip->link = NULL;
+        r = ip->ptr;
+        DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing link chain to resolve id='%s'\n", ip->id));
+        while (q)
+        { p = *q;
+          *q = r;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "... link %p -> %p\n", q, r));
+          q = (void**)p;
+        }
+      }
+      else if (*ip->id == '#')
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Missing data for id='%s'\n", ip->id));
+        strcpy(soap->id, ip->id + 1);
+        return soap->error = SOAP_MISSING_ID;
+      }
+    }
+  }
+  do
+  { flag = 0;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution phase\n"));
+    for (i = 0; i < SOAP_IDHASH; i++)
+    { for (ip = soap->iht[i]; ip; ip = ip->next)
+      { if (ip->ptr && !soap_has_copies(soap, (const char*)ip->ptr, (const char*)ip->ptr + ip->size))
+        { if (ip->copy)
+          { register void *p, **q = (void**)ip->copy;
+            DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing copy chain to resolve id='%s'\n", ip->id));
+            ip->copy = NULL;
+            do
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... copy %p -> %p (%u bytes)\n", ip->ptr, q, (unsigned int)ip->size));
+	      p = *q;
+              memcpy(q, ip->ptr, ip->size);
+              q = (void**)p;
+            } while (q);
+	    flag = 1;
+	  }
+          for (fp = ip->flist; fp; fp = ip->flist)
+          { register unsigned int k = fp->level;
+	    register void *p = ip->ptr;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data type=%d location=%p level=%u,%u id='%s'\n", ip->type, p, ip->level, fp->level, ip->id));
+	    while (ip->level < k)
+            { register void **q = (void**)soap_malloc(soap, sizeof(void*));  
+	      if (!q)
+	        return soap->error;
+	      *q = p;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level, new location=%p holds=%p...\n", q, *q));
+              p = (void*)q;
+              k--;
+            }
+	    if (fp->fcopy)
+	      fp->fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    else
+	      soap_fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    ip->flist = fp->next;
+	    SOAP_FREE(soap, fp);
+	    flag = 1;
+	  }
+        }
+      }
+    }
+  } while (flag);
+#ifdef SOAP_DEBUG
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->copy || ip->flist)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution error: forwarded data for id='%s' could not be propagated, please report this problem to the developers\n", ip->id));
+      }
+    }
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution done\n"));
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_size_block(struct soap *soap, size_t n)
+{ if (soap->blist->ptr)
+  { soap->blist->size -= *(size_t*)(soap->blist->ptr + sizeof(char*)) - n;
+    *(size_t*)(soap->blist->ptr + sizeof(char*)) = n;
+  }
+  return soap->blist->size;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_first_block(struct soap *soap)
+{ char *p, *q, *r;
+  p = soap->blist->ptr;
+  if (!p)
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "First block\n"));
+  r = NULL;
+  do
+  { q = *(char**)p;
+    *(char**)p = r;
+    r = p;
+    p = q;
+  } while (p);
+  soap->blist->ptr = r;
+  return r + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_next_block(struct soap *soap)
+{ char *p;
+  p = soap->blist->ptr;
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n"));
+    soap->blist->ptr = *(char**)p;
+    SOAP_FREE(soap, p);
+    if (soap->blist->ptr)
+      return soap->blist->ptr + sizeof(char*) + sizeof(size_t);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_block_size(struct soap *soap)
+{ return *(size_t*)(soap->blist->ptr + sizeof(char*));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end_block(struct soap *soap)
+{ struct soap_blist *bp;
+  char *p, *q;
+  bp = soap->blist;
+  if (bp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of block sequence, free all remaining blocks\n"));
+    for (p = bp->ptr; p; p = q)
+    { q = *(char**)p;
+      SOAP_FREE(soap, p);
+    }
+    soap->blist = bp->next;
+    SOAP_FREE(soap, bp);
+  }
+  DBGLOG(TEST, if (soap->blist) SOAP_MESSAGE(fdebug, "Restore previous block sequence\n"));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_save_block(struct soap *soap, char *p, int flag)
+{ register size_t n;
+  register char *q, *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Save all blocks in contiguous memory space of %u bytes (%p->%p)\n", (unsigned int)soap->blist->size, soap->blist->ptr, p));
+  if (soap->blist->size)
+  { if (!p)
+      p = (char*)soap_malloc(soap, soap->blist->size);
+    if (p)
+    { for (s = p, q = soap_first_block(soap); q; q = soap_next_block(soap))
+      { n = soap_block_size(soap);
+#ifndef WITH_NOIDREF
+        if (flag)
+	  soap_update_ptrs(soap, q, q + n, s, q);
+#endif
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy %u bytes from %p to %p\n", (unsigned int)n, q, s));
+        memcpy(s, q, n);
+        s += n;
+      }
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  soap_end_block(soap);
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsize(struct soap *soap, const char *type, int size)
+{ return soap_putsizes(soap, type, &size, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizes(struct soap *soap, const char *type, const int *size, int dim)
+{ return soap_putsizesoffsets(soap, type, size, NULL, dim);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim)
+{ int i;
+  if (!type)
+    return NULL;
+  if (soap->version == 2)
+  { sprintf(soap->type, "%s[%d", type, size[0]);
+    for (i = 1; i < dim; i++)
+      sprintf(soap->type + strlen(soap->type), " %d", size[i]);
+  }
+  else
+  { if (offset)
+    { sprintf(soap->type, "%s[%d", type, size[0] + offset[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i] + offset[i]);
+    }
+    else
+    { sprintf(soap->type, "%s[%d", type, size[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i]);
+    }
+    strcat(soap->type, "]");
+  }
+  return soap->type;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffset(struct soap *soap, int offset)
+{ return soap_putoffsets(soap, &offset, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffsets(struct soap *soap, const int *offset, int dim)
+{ register int i;
+  sprintf(soap->arrayOffset, "[%d", offset[0]);
+  for (i = 1; i < dim; i++)
+    sprintf(soap->arrayOffset + strlen(soap->arrayOffset), ",%d", offset[i]);
+  strcat(soap->arrayOffset, "]");
+  return soap->arrayOffset;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_size(const int *size, int dim)
+{ register int i, n = size[0];
+  for (i = 1; i < dim; i++)
+    n *= size[i];
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getoffsets(const char *attr, const int *size, int *offset, int dim)
+{ register int i, j = 0;
+  if (offset)
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += offset[i] = (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  else
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  return j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsize(const char *attr1, const char *attr2, int *j)
+{ register int n, k;
+  char *s;
+  *j = 0;
+  if (!*attr1)
+    return -1;
+  if (*attr1 == '[')
+    attr1++;
+  n = 1;
+  for (;;)
+  { k = (int)soap_strtol(attr1, &s, 10);
+    n *= k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE || s == attr1)
+      return -1;
+    attr1 = strchr(s, ',');
+    if (!attr1)
+      attr1 = strchr(s, ' ');
+    if (attr2 && *attr2)
+    { attr2++;
+      *j *= k;
+      k = (int)soap_strtol(attr2, &s, 10);
+      *j += k;
+      if (k < 0)
+        return -1;
+      attr2 = s;
+    }
+    if (!attr1)
+      break;
+    attr1++;
+  }
+  return n - *j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsizes(const char *attr, int *size, int dim)
+{ register int i, k, n;
+  if (!*attr)
+    return -1;
+  i = strlen(attr);
+  n = 1;
+  do
+  { for (i = i-1; i >= 0; i--)
+      if (attr[i] == '[' || attr[i] == ',' || attr[i] == ' ')
+        break;
+    k = (int)atol(attr + i + 1);
+    n *= size[--dim] = k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE)
+      return -1;
+  } while (i >= 0 && attr[i] != '[');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getposition(const char *attr, int *pos)
+{ register int i, n;
+  if (!*attr)
+    return -1;
+  n = 0;
+  i = 1;
+  do
+  { pos[n++] = (int)atol(attr + i);
+    while (attr[i] && attr[i] != ',' && attr[i] != ']')
+      i++;
+    if (attr[i] == ',')
+      i++;
+  } while (n < SOAP_MAXDIMS && attr[i] && attr[i] != ']');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_push_namespace(struct soap *soap, const char *id, const char *ns)
+{ register struct soap_nlist *np;
+  register struct Namespace *p;
+  register short i = -1;
+  register size_t n, k;
+  n = strlen(id);
+  k = strlen(ns) + 1;
+  p = soap->local_namespaces;
+  if (p)
+  { for (i = 0; p->id; p++, i++)
+    { if (p->ns && !strcmp(ns, p->ns))
+      { if (p->out)
+        { SOAP_FREE(soap, p->out);
+          p->out = NULL;
+        }
+        break;
+      }
+      if (p->out)
+      { if (!strcmp(ns, p->out))
+          break;
+      }
+      else if (p->in)
+      { if (!soap_tag_cmp(ns, p->in))
+        { if ((p->out = (char*)SOAP_MALLOC(soap, k)))
+            strcpy(p->out, ns);
+          break;
+        }
+      }
+    }
+    if (!p || !p->id)
+      i = -1;
+  }
+  if (i >= 0)
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k);
+  if (!np)
+    return soap->error = SOAP_EOM;
+  np->next = soap->nlist;
+  soap->nlist = np;
+  np->level = soap->level;
+  np->index = i;
+  strcpy(np->id, id);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns));
+  if (i < 0)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push NOT OK: no match found for '%s' in namespace mapping table (added to stack anyway)\n", ns));
+  }
+  else
+  { np->ns = NULL;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push OK ('%s' matches '%s' in namespace table)\n", id, p->id));
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_namespace(struct soap *soap)
+{ register struct soap_nlist *np;
+  while (soap->nlist && soap->nlist->level >= soap->level)
+  { np = soap->nlist->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Popped namespace binding (level=%u) '%s'\n", soap->level, soap->nlist->id));
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_namespace(struct soap *soap, const char *id1, const char *id2, int n1, int n2) 
+{ register struct soap_nlist *np = soap->nlist;
+  while (np && (strncmp(np->id, id1, n1) || np->id[n1]))
+    np = np->next;
+  if (np)
+  { if (np->index < 0
+     || (soap->local_namespaces[np->index].id
+      && (strncmp(soap->local_namespaces[np->index].id, id2, n2)
+       || soap->local_namespaces[np->index].id[n2])))
+      return SOAP_NAMESPACE;
+    return SOAP_OK;
+  }
+  if (n1 == 3 && n1 == n2 && !strcmp(id1, "xml") && !strcmp(id1, id2))
+    return SOAP_OK;
+  return SOAP_SYNTAX_ERROR; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_current_namespace(struct soap *soap, const char *tag)
+{ register struct soap_nlist *np;
+  register const char *s;
+  np = soap->nlist;
+  if (!(s = strchr(tag, ':')))
+  { while (np && *np->id) /* find default namespace, if present */
+      np = np->next;
+  }
+  else
+  { while (np && (strncmp(np->id, tag, s - tag) || np->id[s - tag]))
+      np = np->next;
+    if (!np)
+      soap->error = SOAP_NAMESPACE;
+  }
+  if (np)
+  { if (np->index >= 0)
+      return soap->namespaces[np->index].ns;
+    if (np->ns)
+      return soap_strdup(soap, np->ns);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_tag_cmp(const char *s, const char *t)
+{ for (;;)
+  { register int c1 = *s;
+    register int c2 = *t;
+    if (!c1 || c1 == '"')
+      break;
+    if (c2 != '-')
+    { if (c1 != c2)
+      { if (c1 >= 'A' && c1 <= 'Z')
+          c1 += 'a' - 'A';
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+      }
+      if (c1 != c2)
+      { if (c2 != '*')
+          return 1;
+	c2 = *++t;
+        if (!c2)
+	  return 0;
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+        for (;;)
+        { c1 = *s;
+	  if (!c1 || c1 == '"')
+	    break;
+	  if (c1 >= 'A' && c1 <= 'Z')
+            c1 += 'a' - 'A';
+          if (c1 == c2 && !soap_tag_cmp(s + 1, t + 1))
+            return 0;
+	  s++;
+        }
+        break;
+      }
+    }
+    s++;
+    t++;
+  }
+  if (*t == '*' && !t[1])
+    return 0;
+  return *t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_tag(struct soap *soap, const char *tag1, const char *tag2)
+{ register const char *s, *t;
+  if (!tag1 || !tag2 || !*tag2)
+    return SOAP_OK;
+  s = strchr(tag1, ':');
+  t = strchr(tag2, ':');
+  if (t)
+  { if (s)
+    { if (t[1] && SOAP_STRCMP(s + 1, t + 1))
+        return SOAP_TAG_MISMATCH;
+      if (t != tag2 && soap_match_namespace(soap, tag1, tag2, s - tag1, t - tag2))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+        return SOAP_TAG_MISMATCH;
+      }
+    } 
+    else if (SOAP_STRCMP(tag1, t + 1))
+      return SOAP_TAG_MISMATCH;
+    else if (t != tag2 && soap_match_namespace(soap, tag1, tag2, 0, t - tag2))
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+      return SOAP_TAG_MISMATCH;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags and (default) namespaces match: '%s' '%s'\n", tag1, tag2));
+    return SOAP_OK;
+  }
+  if (s)
+  { if (SOAP_STRCMP(s + 1, tag2))
+      return SOAP_TAG_MISMATCH;
+  }
+  else if (SOAP_STRCMP(tag1, tag2))
+    return SOAP_TAG_MISMATCH;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags match: '%s' '%s'\n", tag1, tag2));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_array(struct soap *soap, const char *type)
+{ if (*soap->arrayType)
+    if (soap_match_tag(soap, soap->arrayType, type)
+     && soap_match_tag(soap, soap->arrayType, "xsd:anyType")
+     && soap_match_tag(soap, soap->arrayType, "xsd:ur-type")
+    )
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array type mismatch: '%s' '%s'\n", soap->arrayType, type));
+      return SOAP_TAG_MISMATCH;
+    }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************\
+ *
+ *	SSL
+ *
+\******************************************************************************/
+
+#ifdef WITH_OPENSSL
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_rand()
+{ unsigned char buf[4];
+  if (!ssl_init_done)
+    soap_ssl_init();
+  RAND_pseudo_bytes(buf, 4);
+  return *(int*)buf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *dhfile, const char *randfile, const char *sid)
+{ int err;
+  soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  if (dhfile)
+  { soap->dhfile = dhfile;
+    soap->rsa = 0;
+  }
+  else
+  { soap->dhfile = NULL;
+    soap->rsa = 1;
+  }
+  soap->randfile = randfile;
+  soap->require_client_auth = (flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION);
+  if (!(err = soap->fsslauth(soap)))
+  { if (sid)
+      SSL_CTX_set_session_id_context(soap->ctx, (unsigned char*)sid, strlen(sid));
+  }
+  return err; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_client_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *randfile)
+{ soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  soap->dhfile = NULL;
+  soap->rsa = 0;
+  soap->randfile = randfile;
+  soap->require_server_auth = (flags & SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION);
+  return soap->fsslauth(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_ssl_init()
+{ /* Note: for MT systems, the main program MUST call soap_ssl_init() before any threads are started */
+  if (!ssl_init_done)
+  { ssl_init_done = 1;
+    SSL_library_init();
+#ifndef WITH_LEAN
+    SSL_load_error_strings();
+#endif
+    if (!RAND_load_file("/dev/urandom", 1024))
+    { char buf[1024];
+      RAND_seed(buf, sizeof(buf));
+      while (!RAND_status())
+      { int r = rand();
+        RAND_seed(&r, sizeof(int));
+      }
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static const char *
+ssl_error(struct soap *soap, int ret)
+{ int err = SSL_get_error(soap->ssl, ret);
+  const char *msg = soap_str_code(h_ssl_error_codes, err);
+  if (msg)
+    strcpy(soap->msgbuf, msg);
+  else
+    return ERR_error_string(err, soap->msgbuf);
+  if (ERR_peek_error())
+  { unsigned long r;
+    strcat(soap->msgbuf, "\n");
+    while ((r = ERR_get_error()))
+      ERR_error_string_n(r, soap->msgbuf + strlen(soap->msgbuf), sizeof(soap->msgbuf) - strlen(soap->msgbuf));
+  } 
+  else
+  { switch (ret)
+    { case 0:
+        strcpy(soap->msgbuf, "EOF was observed that violates the protocol. The client probably provided invalid authentication information.");
+        break;
+      case -1:
+        sprintf(soap->msgbuf, "Error observed by underlying BIO: %s", strerror(errno));  
+        break;
+    }
+  }
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_password(char *buf, int num, int rwflag, void *userdata)
+{ if (num < (int)strlen((char*)userdata) + 1)
+    return 0;
+  return strlen(strcpy(buf, (char*)userdata));
+}
+#endif
+
+/******************************************************************************/
+/* This callback is included for future references. It should not be deleted
+#ifndef PALM_2
+static DH *
+ssl_tmp_dh(SSL *ssl, int is_export, int keylength)
+{ static DH *dh512 = NULL;
+  static DH *dh1024 = NULL;
+  DH *dh;
+  switch (keylength)
+  { case 512:
+      if (!dh512)
+      { BIO *bio = BIO_new_file("dh512.pem", "r");
+        if (bio)
+        { dh512 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+          return dh512;
+        }
+      }
+      else
+        return dh512;
+    default:
+      if (!dh1024)
+      { BIO *bio = BIO_new_file("dh1024.pem", "r");
+        if (bio)
+        { dh1024 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+        }
+      }
+      dh = dh1024;
+  }
+  return dh;
+}
+#endif
+*/
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_auth_init(struct soap *soap)
+{ if (!ssl_init_done)
+    soap_ssl_init();
+  if (!soap->ctx)
+  { if (!(soap->ctx = SSL_CTX_new(SSLv23_method())))
+      return soap_set_receiver_error(soap, "SSL error", "Can't setup context", SOAP_SSL_ERROR);
+  }
+  if (soap->randfile)
+  { if (!RAND_load_file(soap->randfile, -1))
+      return soap_set_receiver_error(soap, "SSL error", "Can't load randomness", SOAP_SSL_ERROR);
+  }
+  if (soap->cafile || soap->capath)
+  { if (!SSL_CTX_load_verify_locations(soap->ctx, soap->cafile, soap->capath))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read CA file and directory", SOAP_SSL_ERROR);
+    if (soap->cafile && soap->require_client_auth)
+      SSL_CTX_set_client_CA_list(soap->ctx, SSL_load_client_CA_file(soap->cafile));
+  }
+  if (!SSL_CTX_set_default_verify_paths(soap->ctx))
+    return soap_set_receiver_error(soap, "SSL error", "Can't read default CA file and/or directory", SOAP_SSL_ERROR);
+/* See below */
+  if (soap->keyfile)
+  { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read certificate key file", SOAP_SSL_ERROR);
+    if (soap->password)
+    { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+      SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+    }
+    if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+  }
+/* Suggested alternative approach to check cafile first before the key file:
+  if (soap->password)
+  { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+    SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+  }
+  if (!soap->cafile || !SSL_CTX_use_certificate_chain_file(soap->ctx, soap->cafile))
+  { if (soap->keyfile)
+    { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read certificate or key file", SOAP_SSL_ERROR);
+      if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+    }
+  }
+*/
+  if (soap->rsa)
+  { RSA *rsa = RSA_generate_key(1024, RSA_F4, NULL, NULL);
+    if (!SSL_CTX_set_tmp_rsa(soap->ctx, rsa))
+    { if (rsa)
+        RSA_free(rsa);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set RSA key", SOAP_SSL_ERROR);
+    }
+    RSA_free(rsa);
+  }
+  else if (soap->dhfile)
+  { DH *dh = 0;
+    BIO *bio;
+    bio = BIO_new_file(soap->dhfile, "r");
+    if (!bio)
+      return soap_set_receiver_error(soap, "SSL error", "Can't read DH file", SOAP_SSL_ERROR);
+    dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+    BIO_free(bio);
+    if (SSL_CTX_set_tmp_dh(soap->ctx, dh) < 0)
+    { if (dh)
+        DH_free(dh);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set DH parameters", SOAP_SSL_ERROR);
+    }
+    DH_free(dh);
+  }
+  SSL_CTX_set_options(soap->ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2);
+  SSL_CTX_set_verify(soap->ctx, soap->require_client_auth ? (SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT) : soap->require_server_auth ? SSL_VERIFY_PEER : SSL_VERIFY_NONE, soap->fsslverify);
+#if (OPENSSL_VERSION_NUMBER < 0x00905100L)
+  SSL_CTX_set_verify_depth(soap->ctx, 1); 
+#else
+  SSL_CTX_set_verify_depth(soap->ctx, 9); 
+#endif  
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_verify_callback(int ok, X509_STORE_CTX *store)
+{
+#ifdef SOAP_DEBUG
+  if (!ok) 
+  { char data[256];
+    X509 *cert = X509_STORE_CTX_get_current_cert(store);
+    fprintf(stderr, "SSL verify error or warning with certificate at depth %d: %s\n", X509_STORE_CTX_get_error_depth(store), X509_verify_cert_error_string(X509_STORE_CTX_get_error(store)));
+    X509_NAME_oneline(X509_get_issuer_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate issuer %s\n", data);
+    X509_NAME_oneline(X509_get_subject_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate subject %s\n", data);
+  }
+#endif
+  /* Note: return 1 to continue, but unsafe progress will be terminated by SSL */
+  return ok;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_accept(struct soap *soap)
+{ BIO *bio;
+  int i, r;
+  if (!soap_valid_socket(soap->socket))
+    return soap_set_receiver_error(soap, "SSL error", "No socket in soap_ssl_accept()", SOAP_SSL_ERROR);
+  if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    return SOAP_INVALID_SOCKET;
+  if (!soap->ssl)
+  { soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+      return soap_set_receiver_error(soap, "SSL error", "SSL_new() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+  }
+  else
+    SSL_clear(soap->ssl);
+  soap->imode |= SOAP_ENC_SSL;
+  soap->omode |= SOAP_ENC_SSL;
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&nonblocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)|O_NONBLOCK);
+#endif
+  bio = BIO_new_socket((SOAP_SOCKET)soap->socket, BIO_NOCLOSE);
+  SSL_set_bio(soap->ssl, bio, bio);
+  i = 100; /* 100 * 0.1 ms retries */
+  while ((r = SSL_accept(soap->ssl)) <= 0)
+  { int err = SSL_get_error(soap->ssl, r);
+    if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE)
+    { struct timeval timeout;
+      fd_set fd;
+      if (i-- <= 0)
+        break;
+      timeout.tv_sec = 0;
+      timeout.tv_usec = 100000;
+      FD_ZERO(&fd);
+      FD_SET((SOAP_SOCKET)soap->socket, &fd);
+      r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+      if (r < 0 && soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        return SOAP_EOF;
+      }
+    }
+    else
+    { soap->errnum = err;
+      break;
+    }
+  }
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&blocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+  if (r <= 0)
+  { soap_set_receiver_error(soap, ssl_error(soap, r), "SSL_accept() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+    soap_closesock(soap);
+    return SOAP_SSL_ERROR;
+  }
+  if (soap->require_client_auth)
+  { X509 *peer;
+    int err;
+    if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    peer = SSL_get_peer_certificate(soap->ssl);
+    if (!peer)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    X509_free(peer);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#endif /* WITH_OPENSSL */
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_init(struct soap *soap)
+{ soap->errmode = 1;
+#ifdef WIN32
+  if (tcp_done)
+    return 0;
+  else
+  { WSADATA w;
+    if (WSAStartup(MAKEWORD(1, 1), &w))
+      return -1;
+    tcp_done = 1;
+  }
+#endif
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_done(struct soap *soap)
+{ 
+#ifdef SOAP_DEBUG
+  int i;
+#endif
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  while (soap->clist)
+  { struct soap_clist *p = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = p;
+  }
+  soap->keep_alive = 0; /* to force close the socket */
+  soap_closesock(soap);
+#ifdef WITH_COOKIES
+  soap_free_cookies(soap);
+#endif
+  while (soap->plugins)
+  { register struct soap_plugin *p = soap->plugins->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Removing plugin '%s'\n", soap->plugins->id));
+    if (soap->plugins->fcopy || soap->state == SOAP_INIT)
+      soap->plugins->fdelete(soap, soap->plugins);
+    SOAP_FREE(soap, soap->plugins);
+    soap->plugins = p;
+  }
+  soap->fplugin = fplugin;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+#ifdef WITH_OPENSSL
+  if (soap->session)
+  { SSL_SESSION_free(soap->session);
+    soap->session = NULL;
+  }
+#endif
+  if (soap->state == SOAP_INIT)
+  { if (soap_valid_socket(soap->master))
+    { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+      soap->master = SOAP_INVALID_SOCKET;
+    }
+#ifdef WITH_OPENSSL
+    if (soap->ctx)
+    { SSL_CTX_free(soap->ctx);
+      soap->ctx = NULL;
+    }
+#endif
+  }
+#ifdef SOAP_DEBUG
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free logfiles\n"));
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { if (soap->logfile[i])
+    { SOAP_FREE(soap, (void*)soap->logfile[i]);
+      soap->logfile[i] = NULL;
+    }
+    soap_close_logfile(soap, i);
+  }
+  soap_free_mht(soap);
+  soap->state = 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_cleanup(struct soap *soap)
+{ soap_done(soap);
+#ifdef WIN32
+  if (!tcp_done)
+    return;
+  tcp_done = 0;
+  WSACleanup();
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+tcp_error(struct soap *soap)
+{ register const char *msg = NULL;
+  switch (soap->errmode)
+  { case 0:
+      msg = soap_strerror(soap);
+      break;
+    case 1:
+      msg = "WSAStartup failed";
+      break;
+    case 2:
+    {
+#ifndef WITH_LEAN
+      msg = soap_str_code(h_error_codes, soap->errnum);
+      if (!msg)
+#endif
+      { sprintf(soap->msgbuf, "TCP/UDP IP error %d", soap->errnum);
+        msg = soap->msgbuf;
+      }
+    }
+  }
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static const char*
+http_error(struct soap *soap, int status)
+{ register const char *msg = SOAP_STR_EOS;
+#ifndef WITH_LEAN
+  msg = soap_str_code(h_http_error_codes, status);
+  if (!msg)
+    msg = SOAP_STR_EOS;
+#endif
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_IPV6
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr)
+{ soap_int32 iadd = -1;
+  struct hostent hostent, *host = &hostent;
+#ifdef VXWORKS
+  int hostint;
+  /* inet_addr(), and hostGetByName() expect "char *"; addr is a "const char *". */
+  iadd = inet_addr((char*)addr);
+#else
+#if defined(_AIXVERSION_431) || defined(TRU64)
+  struct hostent_data ht_data;
+#endif
+#ifdef AS400
+  iadd = inet_addr((void*)addr);
+#else
+  iadd = inet_addr(addr);
+#endif
+#endif
+  if (iadd != -1)
+  { memcpy(inaddr, &iadd, sizeof(iadd));
+    return SOAP_OK;
+  }
+#if defined(__GLIBC__)
+  if (gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &host, &soap->errnum) < 0)
+    host = NULL;
+#elif defined(_AIXVERSION_431) || defined(TRU64)
+  memset((void*)&ht_data, 0, sizeof(ht_data));
+  if (gethostbyname_r(addr, &hostent, &ht_data) < 0)
+  { host = NULL;
+    soap->errnum = h_errno;
+  }
+#elif defined(HAVE_GETHOSTBYNAME_R)
+  host = gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &soap->errnum);
+#elif defined(VXWORKS)
+  /* If the DNS resolver library resolvLib has been configured in the vxWorks
+   * image, a query for the host IP address is sent to the DNS server, if the
+   * name was not found in the local host table. */
+  hostint = hostGetByName((char*)addr);
+  if (hostint == ERROR)
+  { host = NULL;
+    soap->errnum = soap_errno; 
+  }
+#else
+#ifdef AS400
+  if (!(host = gethostbyname((void*)addr)))
+    soap->errnum = h_errno;
+#else
+  if (!(host = gethostbyname(addr)))
+    soap->errnum = h_errno;
+#endif
+#endif
+  if (!host)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Host name not found\n"));
+    return SOAP_ERR;
+  }
+#ifdef VXWORKS
+  inaddr->s_addr = hostint;
+#else
+  memcpy(inaddr, host->h_addr, host->h_length);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_connect(struct soap *soap, const char *endpoint, const char *host, int port)
+{
+#ifdef WITH_IPV6
+  struct addrinfo hints, *res, *ressave;
+  int err;
+#endif
+  register int fd;
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->socket))
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+  soap->socket = SOAP_INVALID_SOCKET;
+  if (tcp_init(soap))
+  { soap->errnum = 0;
+    soap_set_sender_error(soap, tcp_error(soap), "TCP init failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->errmode = 0;
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+    err = getaddrinfo(soap->proxy_host, soap_int2s(soap, soap->proxy_port), &hints, &res);
+  else
+    err = getaddrinfo(host, soap_int2s(soap, port), &hints, &res);
+  if (err)
+  { soap_set_sender_error(soap, gai_strerror(err), "getaddrinfo failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  ressave = res;
+again:
+  fd = (int)socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+  soap->errmode = 0;
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    fd = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    fd = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  if (fd < 0)
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "socket failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_flags & SO_LINGER)
+  { struct linger linger;
+    memset((void*)&linger, 0, sizeof(linger));
+    linger.l_onoff = 1;
+    linger.l_linger = 0;
+    if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+    { soap->errnum = soap_socket_errno;
+      soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  if ((soap->connect_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, soap->connect_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (soap->keep_alive && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)fd, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Opening socket %d to host='%s' port=%d\n", fd, host, port));
+#ifndef WITH_IPV6
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+  { if (soap->fresolve(soap, soap->proxy_host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get proxy host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)soap->proxy_port);
+  }
+  else
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)port);
+  }
+  soap->errmode = 0;
+  if ((soap->omode & SOAP_IO_UDP))
+    return fd;
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking)); /* modified to use fd */
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+  else
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  for (;;)
+  { 
+#ifdef WITH_IPV6
+    if (connect((SOAP_SOCKET)fd, res->ai_addr, res->ai_addrlen))
+#else
+    if (connect((SOAP_SOCKET)fd, (struct sockaddr*)&soap->peer, sizeof(soap->peer)))
+#endif
+    { 
+#ifndef WITH_LEAN
+      if (soap->connect_timeout && (soap_socket_errno == SOAP_EINPROGRESS || soap_socket_errno == SOAP_EWOULDBLOCK))
+      { struct timeval timeout;
+        SOAP_SOCKLEN_T k;
+        fd_set fds;
+        if (soap->connect_timeout > 0)
+        { timeout.tv_sec = soap->connect_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->connect_timeout/1000000;
+          timeout.tv_usec = -soap->connect_timeout%1000000;
+        }
+        FD_ZERO(&fds);
+        FD_SET((SOAP_SOCKET)fd, &fds);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(fd + 1), NULL, &fds, NULL, &timeout);
+          if (r > 0)
+	    break;
+          if (!r)
+          { soap->errnum = 0;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+            soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+            soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+	k = (SOAP_SOCKLEN_T)sizeof(soap->errnum);
+        if (!getsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_ERROR, (char*)&soap->errnum, &k) && !soap->errnum)	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+          break;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap->errnum = soap_socket_errno;
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      else
+#endif
+#ifdef WITH_IPV6
+      if (res->ai_next)
+      { res = res->ai_next;
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        goto again;
+      }
+      else
+#endif
+      if (soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }  
+    else
+      break;
+  }
+#ifdef WITH_IPV6
+  soap->peerlen = 0; /* IPv6: already connected so use send() */
+  freeaddrinfo(ressave);
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  soap->socket = fd;
+  soap->imode &= ~SOAP_ENC_SSL;
+  soap->omode &= ~SOAP_ENC_SSL;
+  if (!strncmp(endpoint, "https:", 6))
+  {
+#ifdef WITH_OPENSSL
+    BIO *bio;
+    int r;
+    if (soap->proxy_host)
+    { short v;
+      unsigned int k = soap->omode; /* make sure we only parse HTTP */
+      size_t n = soap->count; /* save the content length */
+      char *userid, *passwd;
+      soap->omode &= ~SOAP_ENC; /* mask IO and ENC */
+      soap->omode |= SOAP_IO_BUFFER;
+      soap_begin_send(soap);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connecting to proxy server\n"));
+      sprintf(soap->tmpbuf, "CONNECT %s:%d HTTP/%s", host, port, soap->http_version);
+      if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+#ifndef WITH_LEAN
+      if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+      { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+        strcpy(soap->tmpbuf, "Basic ");
+        soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+        if ((soap->error = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+        { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return soap->error;
+        }
+      }
+#endif
+      if ((soap->error = soap->fposthdr(soap, NULL, NULL))
+       || soap_flush(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->omode = k;
+      k = soap->imode;
+      soap->imode &= ~SOAP_ENC; /* mask IO and ENC */
+      v = soap->version; /* preserve */
+      userid = soap->userid; /* preserve */
+      passwd = soap->passwd; /* preserve */
+      if (soap_begin_recv(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->userid = userid; /* restore */
+      soap->passwd = passwd; /* restore */
+      soap->version = v; /* restore */
+      soap->imode = k; /* restore */
+      soap->count = n; /* restore */
+      soap_begin_send(soap);
+    }
+    if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    { soap_set_sender_error(soap, "SSL error", "SSL authentication failed in tcp_connect(): check password, key file, and ca file.", SOAP_SSL_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+    { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      soap->error = SOAP_SSL_ERROR;
+      return SOAP_INVALID_SOCKET;
+    }
+    if (soap->session)
+    { if (!strcmp(soap->session_host, host) && soap->session_port == port)
+        SSL_set_session(soap->ssl, soap->session);
+      SSL_SESSION_free(soap->session);
+      soap->session = NULL;
+    }
+    soap->imode |= SOAP_ENC_SSL;
+    soap->omode |= SOAP_ENC_SSL;
+    bio = BIO_new_socket((SOAP_SOCKET)fd, BIO_NOCLOSE);
+    SSL_set_bio(soap->ssl, bio, bio);
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#if defined(WIN32)
+    { u_long nonblocking = 1;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+    }
+#elif defined(VXWORKS)
+    { u_long nonblocking = 1;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+#endif
+    for (;;)
+    { if ((r = SSL_connect(soap->ssl)) <= 0)
+      { int err = SSL_get_error(soap->ssl, r);
+        if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+        { soap_set_sender_error(soap, ssl_error(soap, r), "SSL connect failed in tcp_connect()", SOAP_SSL_ERROR);
+          soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (soap->connect_timeout)
+        { struct timeval timeout;
+          fd_set fds;
+          if (soap->connect_timeout > 0)
+          { timeout.tv_sec = soap->connect_timeout;
+            timeout.tv_usec = 0;
+          }
+          else
+          { timeout.tv_sec = -soap->connect_timeout/1000000;
+            timeout.tv_usec = -soap->connect_timeout%1000000;
+          }
+          FD_ZERO(&fds);
+          FD_SET((SOAP_SOCKET)fd, &fds);
+          for (;;)
+          { int r = select((SOAP_SOCKET)(fd + 1), &fds, NULL, &fds, &timeout);
+            if (r > 0)
+	      break;
+            if (!r)
+            { soap->errnum = 0;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+              soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+              soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+              return SOAP_INVALID_SOCKET;
+            }
+          }
+	  continue;
+        }
+      }
+      break;
+    }
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#ifdef WIN32
+    { u_long blocking = 0;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+    }
+#elif defined(VXWORKS)
+    { u_long blocking = 0;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+    if (soap->require_server_auth)
+    { X509 *peer;
+      int err;
+      if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+      { soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      peer = SSL_get_peer_certificate(soap->ssl);
+      if (!peer)
+      { soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      X509_NAME_get_text_by_NID(X509_get_subject_name(peer), NID_commonName, soap->msgbuf, sizeof(soap->msgbuf));
+      X509_free(peer);
+      if (soap_tag_cmp(soap->msgbuf, host))
+      { soap_set_sender_error(soap, "SSL error", "SSL certificate host name mismatch in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+#else
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    soap->error = SOAP_SSL_ERROR;
+    return SOAP_INVALID_SOCKET;
+#endif
+  }
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_bind(struct soap *soap, const char *host, int port, int backlog)
+{
+#ifdef WITH_IPV6
+  struct addrinfo *addrinfo = NULL;
+  struct addrinfo hints;
+  struct addrinfo res;
+  int err;
+#endif
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->master))
+  { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+    soap->master = SOAP_INVALID_SOCKET;
+  }
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 1;
+  if (tcp_init(soap))
+  { soap_set_receiver_error(soap, tcp_error(soap), "TCP init failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  hints.ai_flags = AI_PASSIVE;
+  soap->errmode = 2;
+  err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo);
+  if (addrinfo)
+  { res = *addrinfo;
+    soap->peer = *((struct sockaddr_storage*)addrinfo->ai_addr);
+    soap->peerlen = addrinfo->ai_addrlen;
+    res.ai_addr = (struct sockaddr*)&soap->peer;
+    res.ai_addrlen = soap->peerlen;
+    freeaddrinfo(addrinfo);
+  }
+  if (err)
+  { soap_set_receiver_error(soap, gai_strerror(err), "getaddrinfo failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->master = socket(res.ai_family, res.ai_socktype, res.ai_protocol);
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->master = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    soap->master = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  soap->errmode = 0;
+  if (!soap_valid_socket(soap->master))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "socket failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->socket = soap->master;
+#endif
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)soap->master, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(soap->master, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->bind_flags && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, soap->bind_flags, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->master, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+#ifdef WITH_IPV6
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, res.ai_addr, res.ai_addrlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+#else
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (host)
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_receiver_error(soap, tcp_error(soap), "get host by name failed in soap_bind()", SOAP_TCP_ERROR);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  else
+    soap->peer.sin_addr.s_addr = htonl(INADDR_ANY);
+  soap->peer.sin_port = htons((short)port);
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, (struct sockaddr*)&soap->peer, soap->peerlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+  if (!(soap->omode & SOAP_IO_UDP) && listen((SOAP_SOCKET)soap->master, backlog))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "listen failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+  return soap->master;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_poll(struct soap *soap)
+{ 
+#ifndef WITH_LEAN
+  struct timeval timeout;
+  fd_set rfd, sfd, xfd;
+  int r;
+  timeout.tv_sec = 0;
+  timeout.tv_usec = 0;
+  FD_ZERO(&rfd);
+  FD_ZERO(&sfd);
+  FD_ZERO(&xfd);
+  if (soap_valid_socket(soap->socket))
+  { FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &xfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, &xfd, &timeout);
+    if (r > 0 && FD_ISSET((SOAP_SOCKET)soap->socket, &xfd))
+      r = -1;
+  }
+  else if (soap_valid_socket(soap->master))
+  { FD_SET((SOAP_SOCKET)soap->master, &sfd);
+    r = select((SOAP_SOCKET)(soap->master + 1), NULL, &sfd, NULL, &timeout);
+  }
+  else
+    return SOAP_OK;
+  if (r > 0)
+  {
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+    {
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || SSL_peek(soap->ssl, soap->tmpbuf, 1) > 0))
+        return SOAP_OK;
+    }
+    else
+#endif
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) > 0))
+        return SOAP_OK;
+  }
+  else if (r < 0)
+  { soap->errnum = soap_socket_errno;
+    if ((soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) && soap_socket_errno != SOAP_EINTR)
+    { soap_set_receiver_error(soap, tcp_error(soap), "select failed in soap_poll()", SOAP_TCP_ERROR);
+      return soap->error = SOAP_TCP_ERROR;
+    }
+  }
+  else
+    soap->errnum = 0;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Polling: other end down on socket=%d select=%d\n", soap->socket, r));
+  return SOAP_EOF;
+#else
+  return SOAP_OK;
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_accept(struct soap *soap, int s, struct sockaddr *a, int *n)
+{ int fd;
+  fd = (int)accept((SOAP_SOCKET)s, a, (SOAP_SOCKLEN_T*)n);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, FD_CLOEXEC);
+#endif
+#endif
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_accept(struct soap *soap)
+{ int n = (int)sizeof(soap->peer);
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  soap->error = SOAP_OK;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    return soap->socket = soap->master;
+#endif
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 0;
+  soap->keep_alive = 0;
+  if (soap_valid_socket(soap->master))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->accept_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->accept_timeout > 0)
+        { timeout.tv_sec = soap->accept_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->accept_timeout/1000000;
+          timeout.tv_usec = -soap->accept_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->master, &fd);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(soap->master + 1), &fd, &fd, NULL, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            soap_set_receiver_error(soap, "Timeout", "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            soap_closesock(soap);
+            soap_set_sender_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+#if defined(WIN32)
+	{ u_long nonblocking = 1;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &nonblocking);
+        }
+#elif defined(VXWORKS)
+        { u_long nonblocking = 1;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&nonblocking));
+        }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)|O_NONBLOCK);
+#endif
+      }
+      else
+#if defined(WIN32)
+      { u_long blocking = 0;
+        ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+      }
+#elif defined(VXWORKS)
+      { u_long blocking = 0;
+        ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+      }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+      soap->socket = soap->faccept(soap, soap->master, (struct sockaddr*)&soap->peer, &n);
+      soap->peerlen = (size_t)n;
+      if (soap_valid_socket(soap->socket))
+      {
+#ifdef WITH_IPV6
+/* Use soap->host to store the numeric form of the remote host */
+        getnameinfo((struct sockaddr*)&soap->peer, n, soap->host, sizeof(soap->host), NULL, 0, NI_NUMERICHOST | NI_NUMERICSERV); 
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d from %s\n", soap->socket, soap->host));
+        soap->ip = 0; /* info stored in soap->peer and soap->host */
+        soap->port = 0; /* info stored in soap->peer and soap->host */
+#else
+        soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+        soap->port = (int)ntohs(soap->peer.sin_port); /* does not return port number on some systems */
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d at port %d from IP %d.%d.%d.%d\n", soap->socket, soap->port, (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF));
+#endif
+#ifndef WITH_LEAN
+	if (soap->accept_flags & SO_LINGER)
+        { struct linger linger;
+          memset((void*)&linger, 0, sizeof(linger));
+          linger.l_onoff = 1;
+          linger.l_linger = 0;
+	  if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+          { soap->errnum = soap_socket_errno;
+	    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in soap_accept()", SOAP_TCP_ERROR);
+	    soap_closesock(soap);
+            return SOAP_INVALID_SOCKET;
+	  }
+        }
+        if ((soap->accept_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, soap->accept_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#ifdef TCP_NODELAY
+        if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->socket, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#endif
+#endif
+        if (soap->accept_timeout)
+        {
+#if defined(WIN32)
+          u_long blocking = 0;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+          ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+#elif defined(VXWORKS)
+          u_long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+          ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)(&blocking));
+#elif defined(PALM)
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL,0)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL,0)&~O_NONBLOCK);
+#elif defined(SYMBIAN)
+          long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, 0/*FIONBIO*/, &blocking);
+#else
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+	}
+        soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+        return soap->socket;
+      }
+      if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept failed from %s\n", soap->host));
+        soap->errnum = soap_socket_errno;
+        soap_set_receiver_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+	soap_closesock(soap);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+  }
+  else
+  { soap->errnum = 0;
+    soap_set_receiver_error(soap, tcp_error(soap), "no master socket in soap_accept()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_disconnect(struct soap *soap)
+{
+#ifdef WITH_OPENSSL
+  if (soap->ssl)
+  { int r, s = 0;
+    if (soap->session)
+      SSL_SESSION_free(soap->session);
+    if (*soap->host)
+    { soap->session = SSL_get1_session(soap->ssl);
+      if (soap->session)
+      { strcpy(soap->session_host, soap->host);
+        soap->session_port = soap->port;
+      }
+    }
+    r = SSL_shutdown(soap->ssl);
+    if (r != 1)
+    { s = ERR_get_error();
+      if (s)
+      { if (soap_valid_socket(soap->socket))
+        { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1);
+          soap->socket = SOAP_INVALID_SOCKET;
+        }
+        r = SSL_shutdown(soap->ssl);
+      }
+    }
+    DBGLOG(TEST, if (s) SOAP_MESSAGE(fdebug, "Shutdown failed: %d\n", SSL_get_error(soap->ssl, r)));
+    SSL_free(soap->ssl);
+    soap->ssl = NULL;
+    if (s)
+      return SOAP_SSL_ERROR;
+    ERR_remove_state(0);
+  }
+#endif
+  if (soap_valid_socket(soap->socket) && !(soap->omode & SOAP_IO_UDP))
+  { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 2);
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+    soap->socket = SOAP_INVALID_SOCKET;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_closesocket(struct soap *soap, SOAP_SOCKET fd)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Close socket %d\n", (int)fd));
+  return closesocket(fd);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_shutdownsocket(struct soap *soap, SOAP_SOCKET fd, int how)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Shutdown socket %d how=%d\n", (int)fd, how));
+  return shutdown(fd, how);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_closesock(struct soap *soap)
+{ register int status = soap->error;
+  if (status == SOAP_EOF || status == SOAP_TCP_ERROR || status == SOAP_SSL_ERROR || !soap->keep_alive)
+  { if (soap->fclose && (soap->error = soap->fclose(soap)))
+      return soap->error;
+    soap->keep_alive = 0;
+  }
+#ifdef WITH_ZLIB
+  if (soap->zlib_state == SOAP_ZLIB_DEFLATE)
+    deflateEnd(&soap->d_stream);
+  else if (soap->zlib_state == SOAP_ZLIB_INFLATE)
+    inflateEnd(&soap->d_stream);
+  soap->zlib_state = SOAP_ZLIB_NONE;
+#endif
+  return soap->error = status;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_hash(register const char *s)
+{ register size_t h = 0;
+  while (*s)
+    h = 65599*h + *s++;
+  return h % SOAP_IDHASH;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_pht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing pointer hashtable\n"));
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new1(soap_mode mode)
+{ return soap_new2(mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new()
+{ return soap_new2(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new2(soap_mode imode, soap_mode omode)
+{ struct soap *soap = (struct soap*)malloc(sizeof(struct soap));
+  if (soap)
+    soap_init2(soap, imode, omode);
+  return soap;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_del(struct soap *soap)
+{ free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_pht(struct soap *soap)
+{ register struct soap_pblk *pb, *next;
+  register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free pointer hashtable\n"));
+  for (pb = soap->pblk; pb; pb = next)
+  { next = pb->next;
+    SOAP_FREE(soap, pb);
+  }
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type)
+{ register int i;
+  struct soap_plist *pp;
+  if (soap->version != 1)
+    soap->encoding = 1;
+  if (a)
+    i = soap_array_pointer_lookup(soap, p, a, n, type, &pp);
+  else
+    i = soap_pointer_lookup(soap, p, type, &pp);
+  if (i)
+  { if (soap_is_embedded(soap, pp)
+     || soap_is_single(soap, pp))
+      return 0;
+    soap_set_embedded(soap, pp);
+  }
+  return i;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_lookup(struct soap *soap, const void *p, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (p)
+  { for (pp = soap->pht[soap_hash_ptr(p)]; pp; pp = pp->next)
+    { if (pp->ptr == p && pp->type == type)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d id=%d\n", p, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d: not found\n", p, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_enter(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register int h;
+  register struct soap_plist *pp;
+  if (!soap->pblk || soap->pidx >= SOAP_PTRBLK)
+  { register struct soap_pblk *pb = (struct soap_pblk*)SOAP_MALLOC(soap, sizeof(struct soap_pblk));
+    if (!pb)
+    { soap->error = SOAP_EOM;
+      return 0;
+    }
+    pb->next = soap->pblk;
+    soap->pblk = pb;
+    soap->pidx = 0;
+  }
+  *ppp = pp = &soap->pblk->plist[soap->pidx++];
+  if (a)
+    h = soap_hash_ptr(a->__ptr);
+  else
+    h = soap_hash_ptr(p);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pointer enter location=%p array=%p size=%d dim=%d type=%d id=%d\n", p, a?a->__ptr:NULL, a?a->__size:0, n, type, soap->idnum+1));
+  pp->next = soap->pht[h];
+  pp->type = type;
+  pp->mark1 = 0;
+  pp->mark2 = 0;
+  pp->ptr = p;
+  pp->array = a;
+  soap->pht[h] = pp;
+  pp->id = ++soap->idnum;
+  return pp->id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_pointer_lookup(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (!p || !a->__ptr)
+    return 0;
+  for (pp = soap->pht[soap_hash_ptr(a->__ptr)]; pp; pp = pp->next)
+  { if (pp->type == type && pp->array && pp->array->__ptr == a->__ptr)
+    { register int i;
+      for (i = 0; i < n; i++)
+        if (((const int*)&pp->array->__size)[i] != ((const int*)&a->__size)[i])
+	  break;
+      if (i == n)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d id=%d\n", a->__ptr, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d: not found\n", a->__ptr, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_count(struct soap *soap)
+{ soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) || (soap->omode & SOAP_ENC_DIME))
+    soap->mode = soap->omode | SOAP_IO_LENGTH | SOAP_ENC_DIME;
+  else
+#endif
+  { soap->mode = soap->omode;
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE
+     || (((soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_ENC_XML))
+#ifndef WITH_LEANER
+      && !soap->fpreparesend
+#endif
+      ))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    else
+      soap->mode |= SOAP_IO_LENGTH;
+  }
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (!(soap->mode & SOAP_ENC_DIME))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+    soap->mode |= SOAP_ENC_MIME;
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+  soap->dime.list = soap->dime.last;	/* keep track of last DIME attachment */
+#endif
+  soap->count = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->part = SOAP_BEGIN;
+  soap->idnum = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin count phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+#ifndef WITH_LEANER
+  soap->dime.count = 0; /* count # of attachments */
+  soap->dime.size = 0; /* accumulate total size of attachments */
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+    return soap->error = soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_count(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->fpreparefinal)
+    return soap->error = soap->fpreparefinal(soap);
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of count phase\n"));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_send(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+  soap->mode = soap->omode | (soap->mode & (SOAP_IO_LENGTH | SOAP_ENC_DIME));
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+#ifdef WITH_UDP
+  if ((soap->mode & SOAP_IO_UDP))
+  { soap->mode |= SOAP_ENC_XML;
+    if (soap->count > SOAP_BUFLEN)
+      return soap->error = SOAP_UDP_ERROR;
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_FLUSH && soap_valid_socket(soap->socket))
+  { if (soap->count || (soap->mode & SOAP_IO_LENGTH) || (soap->mode & SOAP_ENC_XML))
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+  soap->mode &= ~SOAP_IO_LENGTH;
+  if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap_new_block(soap);
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+  { soap->mode |= SOAP_ENC_MIME;
+    soap->mode &= ~SOAP_ENC_DIME;
+  }
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket)) /* Set win32 stdout or soap->sendfd to BINARY, e.g. to support DIME */
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->sendfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->sendfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#endif
+  if (soap->mode & SOAP_IO)
+  { soap->bufidx = 0;
+    soap->buflen = 0;
+  }
+  soap->chunksize = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+#ifdef WITH_ZLIB
+  soap->z_ratio_out = 1.0;
+  if ((soap->mode & SOAP_ENC_ZLIB) && soap->zlib_state != SOAP_ZLIB_DEFLATE)
+  {
+#ifdef WITH_GZIP
+    memcpy(soap->z_buf, "\37\213\10\0\0\0\0\0\0\377", 10);
+    soap->d_stream.next_out = (Byte*)soap->z_buf + 10;
+    soap->d_stream.avail_out = SOAP_BUFLEN - 10;
+    soap->z_crc = crc32(0L, NULL, 0);
+    if (deflateInit2(&soap->d_stream, soap->z_level, Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY) != Z_OK)
+#else
+    soap->d_stream.next_out = (Byte*)soap->z_buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    if (deflateInit(&soap->d_stream, soap->z_level) != Z_OK)
+#endif
+      return soap->error = SOAP_ZLIB_ERROR;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflate initialized\n"));
+    soap->zlib_state = SOAP_ZLIB_DEFLATE;
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin send phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+  soap->part = SOAP_BEGIN;
+#ifndef WITH_LEANER
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_embedded(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { pp->mark1 = 1;
+    pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded %p type=%d mark set to 1\n", p, t));
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_reference(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (!p || (soap->mode & SOAP_XML_TREE))
+    return 1;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (soap_pointer_enter(soap, p, NULL, 0, t, &pp))
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  else
+    return 1;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reference %p type=%d (%d %d)\n", p, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_reference(struct soap *soap, const void *p, const struct soap_array *a, int n, int t)
+{ register int i;
+  struct soap_plist *pp;
+  if (!p || !a->__ptr)
+    return 1;
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (i)
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (!soap_pointer_enter(soap, p, a, n, t, &pp))
+    return 1;
+  else
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array reference %p ptr=%p dim=%d type=%d (%d %d)\n", p, a->__ptr, n, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embedded_id(struct soap *soap, int id, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap->mode & SOAP_XML_TREE)
+    return id;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id %p type=%d id=%d\n", p, t, id));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (id < 0)
+    { id = soap_pointer_lookup(soap, p, t, &pp);
+      if (id)
+      { if (soap->mode & SOAP_IO_LENGTH)
+          pp->mark1 = 2;
+        else
+          pp->mark2 = 2;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id multiref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+      }
+      return -1;
+    }
+    return id;
+  }
+  if (id < 0)
+    id = soap_pointer_lookup(soap, p, t, &pp);
+  else if (id && !soap_pointer_lookup(soap, p, t, &pp))
+    return 0;
+  if (id && pp)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      pp->mark1 = 1;
+    else
+      pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id embedded ref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+  }
+  return id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Is embedded? %d %d\n", (int)pp->mark1, (int)pp->mark2));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      return pp->mark1 != 0;
+    return pp->mark2 != 0;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 1;
+  return pp->mark2 == 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_single(struct soap *soap, struct soap_plist *pp)
+{ if (soap->part == SOAP_IN_HEADER)
+    return 1;
+  if (!pp)
+    return 0;
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 0;
+  return pp->mark2 == 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return;
+  if (soap->mode & SOAP_IO_LENGTH)
+    pp->mark1 = 1;
+  else
+    pp->mark2 = 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attachment(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, const char *aid, const char *atype, const char *aoptions, int n, const char *type, int t) 
+{ struct soap_plist *pp;
+  int i;
+  if (!p || !a->__ptr || (!aid && !atype))
+    return soap_element_id(soap, tag, id, p, a, n, type, t);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Attachment tag='%s' id='%s' (%d) type='%s'\n", tag, aid?aid:"", id, atype?atype:""));
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (!i)
+  { i = soap_pointer_enter(soap, p, a, n, t, &pp);
+    if (!i)
+    { soap->error = SOAP_EOM;
+      return -1;
+    }
+  }
+  if (id <= 0)
+    id = i;
+  if (!aid)
+  { sprintf(soap->tmpbuf, soap->dime_id_format, id);
+    aid = soap_strdup(soap, soap->tmpbuf);
+  }
+  /* Add MTOM xop:Include element when necessary */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  if ((soap->mode & SOAP_ENC_MTOM) && strcmp(tag, "xop:Include"))
+  { if (soap_element_begin_out(soap, tag, 0, type)
+     || soap_element_href(soap, "xop:Include", 0, "href", aid)
+     || soap_element_end_out(soap, tag))
+      return soap->error;
+  }
+  else if (soap_element_href(soap, tag, 0, "href", aid))
+    return soap->error;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { if (pp->mark1 != 3)
+    { struct soap_multipart *content;
+      if (soap->mode & SOAP_ENC_MTOM)
+        content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, (char*)a->__ptr, a->__size);
+      else
+        content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, (char*)a->__ptr, a->__size);
+      if (!content)
+      { soap->error = SOAP_EOM;
+        return -1;
+      }
+      if (!strncmp(aid, "cid:", 4)) /* RFC 2111 */
+      { if (soap->mode & SOAP_ENC_MTOM)
+        { char *s = (char*)soap_malloc(soap, strlen(aid) - 1);
+	  if (s)
+	  { *s = '<';
+	    strcpy(s + 1, aid + 4);
+	    strcat(s, ">");
+	    content->id = s;
+          }
+        }
+        else
+          content->id = aid + 4;
+      }
+      else
+        content->id = aid;
+      content->type = atype;
+      content->options = aoptions;
+      content->encoding = SOAP_MIME_BINARY;
+      pp->mark1 = 3;
+    }
+  }
+  else
+    pp->mark2 = 3;
+  return -1;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_iht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+    soap->iht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_iht(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip, *p;
+  register struct soap_flist *fp, *fq;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = p)
+    { for (fp = ip->flist; fp; fp = fq)
+      { fq = fp->next;
+        SOAP_FREE(soap, fp);
+      }
+      p = ip->next;
+      SOAP_FREE(soap, ip);
+    }
+    soap->iht[i] = NULL;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_lookup(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  for (ip = soap->iht[soap_hash(id)]; ip; ip = ip->next)
+    if (!strcmp(ip->id, id))
+      return ip;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_enter(struct soap *soap, const char *id)
+{ register size_t h;
+  register struct soap_ilist *ip;
+  ip = (struct soap_ilist*)SOAP_MALLOC(soap, sizeof(struct soap_ilist) + strlen(id));
+  if (ip)
+  { h = soap_hash(id);
+    strcpy(ip->id, id);
+    ip->next = soap->iht[h];
+    soap->iht[h] = ip;
+    return ip;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_malloc(struct soap *soap, size_t n)
+{ register char *p;
+  if (!n)
+    return (void*)SOAP_NON_NULL;
+  if (!soap)
+    return SOAP_MALLOC(soap, n);
+  n += (-(long)n) & (sizeof(void*)-1); /* align at 4-, 8- or 16-byte boundary */
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(void*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  /* keep chain of alloced cells for later destruction */
+  soap->alloced = 1;
+  *(void**)(p + n) = soap->alist;
+  *(size_t*)(p + n + sizeof(void*)) = n;
+  soap->alist = p + n;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_mht(struct soap *soap)
+{ register int i;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->mht[i] = NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_free_mht(struct soap *soap)
+{ register int i;
+  register struct soap_mlist *mp, *mq;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+  { for (mp = soap->mht[i]; mp; mp = mq)
+    { mq = mp->next;
+      if (mp->live)
+        fprintf(stderr, "%s(%d): malloc() = %p not freed (memory leak or forgot to call soap_end()?)\n", mp->file, mp->line, mp->ptr);
+      free(mp);
+    }
+    soap->mht[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_track_malloc(struct soap *soap, const char *file, int line, size_t size)
+{ register void *p = malloc(size);
+  if (soap)
+  { register int h = soap_hash_ptr(p);
+    register struct soap_mlist *mp = (struct soap_mlist*)malloc(sizeof(struct soap_mlist));
+    if (soap->fdebug[SOAP_INDEX_TEST])
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): malloc(%lu) = %p\n", file, line, (unsigned long)size, p));
+    mp->next = soap->mht[h];
+    mp->ptr = p;
+    mp->file = file;
+    mp->line = line;
+    mp->live = 1;
+    soap->mht[h] = mp;
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_track_free(struct soap *soap, const char *file, int line, void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+  { if (mp->live)
+    { free(p);
+      if (soap->fdebug[SOAP_INDEX_TEST])
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): free(%p)\n", file, line, p));
+      mp->live = 0;
+    }
+    else
+      fprintf(stderr, "%s(%d): free(%p) double free of pointer malloced at %s(%d)\n", file, line, p, mp->file, mp->line);
+  }
+  else
+    fprintf(stderr, "%s(%d): free(%p) pointer not malloced\n", file, line, p);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_track_unlink(struct soap *soap, const void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+    mp->live = 0;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_dealloc(struct soap *soap, void *p)
+{ if (!soap)
+    return;
+  if (p)
+  { register char **q;
+    for (q = (char**)&soap->alist; *q; q = *(char***)q)
+    { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+      { *q = **(char***)q;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Freed data at %p\n", p));
+        SOAP_FREE(soap, p);
+        return;
+      }
+    }
+    soap_delete(soap, p);
+  }
+  else
+  { register char *q;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free all soap_malloc() data\n"));
+    while (soap->alist)
+    { q = (char*)soap->alist;
+      soap->alist = *(void**)q;
+      q -= *(size_t*)(q + sizeof(void*));
+      SOAP_FREE(soap, q);
+    }
+  }
+  /* we must assume these were deallocated: */
+  soap->action = NULL;
+  soap->fault = NULL;
+  soap->header = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->authrealm = NULL;
+#ifndef WITH_LEANER
+  soap_clr_mime(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_delete(struct soap *soap, void *p)
+{ register struct soap_clist **cp;
+  if (soap_check_state(soap))
+    return;
+  cp = &soap->clist;
+  if (p)
+  { while (*cp)
+    { if (p == (*cp)->ptr)
+      { register struct soap_clist *q = *cp;
+        *cp = q->next;
+        q->fdelete(q);
+        SOAP_FREE(soap, q);
+        return;
+      }
+      cp = &(*cp)->next;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: address not in list\n", p));
+  }
+  else
+  { while (*cp)
+    { register struct soap_clist *q = *cp;
+      *cp = q->next;
+      if (q->ptr == (void*)soap->fault)
+        soap->fault = NULL; /* this was deallocated */
+      else if (q->ptr == (void*)soap->header)
+        soap->header = NULL; /* this was deallocated */
+      q->fdelete(q);
+      SOAP_FREE(soap, q);
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_clist *
+SOAP_FMAC2
+soap_link(struct soap *soap, void *p, int t, int n, void (*fdelete)(struct soap_clist*))
+{ register struct soap_clist *cp;
+  if ((cp = (struct soap_clist*)SOAP_MALLOC(soap, sizeof(struct soap_clist))))
+  { cp->next = soap->clist;
+    cp->type = t;
+    cp->size = n; 
+    cp->ptr = p;
+    cp->fdelete = fdelete;
+    soap->clist = cp;
+  }
+  return cp;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_unlink(struct soap *soap, const void *p)
+{ register char **q;
+  register struct soap_clist **cp;
+  if (!soap || !p)
+    return;
+  for (q = (char**)&soap->alist; *q; q = *(char***)q)
+  { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+    { *q = **(char***)q;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked data %p\n", p));
+#ifdef SOAP_DEBUG
+      soap_track_unlink(soap, p);
+#endif
+      return;
+    }
+  }
+  for (cp = &soap->clist; *cp; cp = &(*cp)->next)
+  { if (p == (*cp)->ptr)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked class instance %p\n", p));
+      q = (char**)*cp;
+      *cp = (*cp)->next;
+      SOAP_FREE(soap, q);
+      return;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_lookup_type(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  if (id && *id)
+  { ip = soap_lookup(soap, id);
+    if (ip)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup id='%s' type=%d\n", id, ip->type));
+      return ip->type;
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "lookup type id='%s' NOT FOUND! Need to get it from xsi:type\n", id));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, unsigned int k)
+{ struct soap_ilist *ip;
+  void **q;
+  if (!p || !id || !*id)
+    return p;
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding first href='%s' type=%d %p (%u bytes)\n", id, t, p, (unsigned int)n));
+    ip->type = t;
+    ip->size = n; 
+    ip->link = p;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->ptr = NULL;
+    ip->level = k;
+    *p = NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolved href='%s' type=%d location=%p (%u bytes)\n", id, t, ip->ptr, (unsigned int)n));
+    if (ip->type != t)
+    { strcpy(soap->id, id);
+      soap->error = SOAP_HREF;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility: id type=%d href type=%d\n", ip->type, t));
+      return NULL;
+    }
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      if (!q)
+        return NULL;
+      *p = (void*)q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    *p = ip->ptr;
+  }
+  else if (ip->level > k)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving level %u pointers to href='%s'\n", ip->level, id));
+    while (ip->level > k)
+    { void *s, **r = &ip->link;
+      q = (void**)ip->link;
+      while (q)
+      { *r = (void*)soap_malloc(soap, sizeof(void*));
+        s = *q;
+        *q = *r;
+        r = (void**)*r;
+        q = (void**)s;
+      }
+      *r = NULL;
+      ip->size = n; 
+      ip->copy = NULL;
+      ip->level = ip->level - 1;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarded href='%s' type=%d location=%p (%u bytes)\n", id, t, p, (unsigned int)n));
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      *p = q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_forward(struct soap *soap, const char *href, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t))
+{ struct soap_ilist *ip;
+  if (!p || !href || !*href)
+    return p;
+  ip = soap_lookup(soap, href); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, href); /* new hash table entry for string id */
+    ip->type = st;
+    ip->size = n;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->ptr = NULL;
+    ip->level = 0;
+    ip->flist = NULL;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry href='%s' type=%d size=%lu level=%d location=%p\n", href, st, (unsigned long)n, k, p));
+  }
+  else if (ip->type != st || (ip->level == k && ip->size != n))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", href, ip->type, (unsigned long)ip->size, k, st, (unsigned long)n));
+    strcpy(soap->id, href);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  if (fcopy || n < sizeof(void*) || *href != '#')
+  { register struct soap_flist *fp = (struct soap_flist*)SOAP_MALLOC(soap, sizeof(struct soap_flist));
+    if (!fp)
+    { soap->error = SOAP_EOM;
+      return NULL;
+    }
+    fp->next = ip->flist;
+    fp->type = tt;
+    fp->ptr = p;
+    fp->level = k;
+    fp->len = len;
+    if (fcopy)
+      fp->fcopy = fcopy;
+    else
+      fp->fcopy = soap_fcopy;
+    ip->flist = fp;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding type=%d (target type=%d) size=%lu location=%p level=%u len=%lu href='%s'\n", st, tt, (unsigned long)n, p, k, (unsigned long)len, href));
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding copying address %p for type=%d href='%s'\n", p, st, href));
+    *(void**)p = ip->copy;
+    ip->copy = p;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*))
+{
+#ifndef WITH_NOIDREF
+  struct soap_ilist *ip;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Enter id='%s' type=%d loc=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  soap->alloced = 0;
+  if (!p)
+  { if (finstantiate)
+      p = finstantiate(soap, t, type, arrayType, &n);
+    else
+      p = soap_malloc(soap, n);
+    if (p)
+      soap->alloced = 1;
+  }
+#ifndef WITH_NOIDREF
+  if (!id || !*id)
+#endif
+    return p;
+#ifndef WITH_NOIDREF
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Lookup entry id='%s for location=%p'\n", id, p));
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    ip->type = t;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry id='%s' type=%d size=%lu level=%u location=%p\n", id, t, (unsigned long)n, k, p));
+  }
+  else if ((ip->type != t || (ip->level == k && ip->size != n)) && (ip->copy || ip->flist))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", id, ip->type, (unsigned long)ip->size, k, t, (unsigned long)n));
+    strcpy(soap->id, id);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Multiply defined id='%s'\n", id));
+    strcpy(soap->id, id);
+    soap->error = SOAP_DUPLICATE_ID;
+    return NULL;
+  }
+  else 
+  { ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update entry id='%s' type=%d location=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  }
+  return ip->ptr;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{ DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Copying data type=%d (target type=%d) %p -> %p (%lu bytes)\n", st, tt, q, p, (unsigned long)n));
+  memcpy(p, q, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_send(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->dime.list)
+  { /* SOAP body referenced attachments must appear first */
+    soap->dime.last->next = soap->dime.first;
+    soap->dime.first = soap->dime.list->next;
+    soap->dime.list->next = NULL;
+    soap->dime.last = soap->dime.list;
+  }
+  if (soap_putdime(soap) || soap_putmime(soap))
+    return soap->error;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End send\n"));
+  if (soap->mode & SOAP_IO) /* need to flush the remaining data in buffer */
+  { if (soap_flush(soap))
+#ifdef WITH_ZLIB
+    { if (soap->mode & SOAP_ENC_ZLIB && soap->zlib_state == SOAP_ZLIB_DEFLATE)
+      { soap->zlib_state = SOAP_ZLIB_NONE;
+        deflateEnd(&soap->d_stream);
+      }
+      return soap->error;
+    }
+#else
+      return soap->error;
+#endif
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { int r;
+      soap->d_stream.avail_in = 0;
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating remainder\n"));
+        r = deflate(&soap->d_stream, Z_FINISH);
+        if (soap->d_stream.avail_out != SOAP_BUFLEN)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN - soap->d_stream.avail_out))
+          { soap->zlib_state = SOAP_ZLIB_NONE;
+            deflateEnd(&soap->d_stream);
+            return soap->error;
+	  }
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (r == Z_OK);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+      soap->z_ratio_out = (float)soap->d_stream.total_out / (float)soap->d_stream.total_in;
+      soap->mode &= ~SOAP_ENC_ZLIB;
+      soap->zlib_state = SOAP_ZLIB_NONE;
+      if (deflateEnd(&soap->d_stream) != Z_OK || r != Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to end deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+#ifdef WITH_GZIP
+      soap->z_buf[0] = soap->z_crc & 0xFF;
+      soap->z_buf[1] = (soap->z_crc >> 8) & 0xFF;
+      soap->z_buf[2] = (soap->z_crc >> 16) & 0xFF;
+      soap->z_buf[3] = (soap->z_crc >> 24) & 0xFF;
+      soap->z_buf[4] = soap->d_stream.total_in & 0xFF;
+      soap->z_buf[5] = (soap->d_stream.total_in >> 8) & 0xFF;
+      soap->z_buf[6] = (soap->d_stream.total_in >> 16) & 0xFF;
+      soap->z_buf[7] = (soap->d_stream.total_in >> 24) & 0xFF;
+      if (soap_flush_raw(soap, soap->z_buf, 8))
+        return soap->error;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip crc32=%lu\n", (unsigned long)soap->z_crc));
+#endif
+    }
+#endif
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    { char *p;
+#ifndef WITH_NOHTTP
+      if (!(soap->mode & SOAP_ENC_XML))
+      { soap->mode--;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending buffered message of length %u\n", (unsigned int)soap->blist->size));
+        if (soap->status >= SOAP_POST)
+          soap->error = soap->fpost(soap, soap->endpoint, soap->host, soap->port, soap->path, soap->action, soap->blist->size);
+        else if (soap->status != SOAP_STOP)
+          soap->error = soap->fresponse(soap, soap->status, soap->blist->size);
+        if (soap->error || soap_flush(soap))
+          return soap->error;
+        soap->mode++;
+      }
+#endif
+      for (p = soap_first_block(soap); p; p = soap_next_block(soap))
+      { DBGMSG(SENT, p, soap_block_size(soap));
+        if ((soap->error = soap->fsend(soap, p, soap_block_size(soap))))
+        { soap_end_block(soap);
+          return soap->error;
+        }
+      }
+      soap_end_block(soap);
+    }
+#ifndef WITH_LEANER
+    else if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { DBGMSG(SENT, "\r\n0\r\n\r\n", 7);
+      if ((soap->error = soap->fsend(soap, "\r\n0\r\n\r\n", 7)))
+        return soap->error;
+    }
+#endif
+  }
+#ifdef WITH_TCPFIN
+#ifdef WITH_OPENSSL
+  if (!soap->ssl && soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#else
+  if (soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#endif
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of send phase\n"));
+  soap->omode &= ~SOAP_XML_SEC;
+  soap->count = 0;
+  soap->part = SOAP_END;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_recv(struct soap *soap)
+{ soap->part = SOAP_END;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) && soap_getdime(soap))
+    return soap->error;
+  soap->dime.list = soap->dime.first;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  if ((soap->mode & SOAP_ENC_MIME) && soap_getmime(soap))
+    return soap->error;
+  soap->mime.list = soap->mime.first;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "End of receive message ok\n"));
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { soap->mode &= ~SOAP_ENC_ZLIB;
+    memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+    soap->bufidx = (char*)soap->d_stream.next_in - soap->z_buf;
+    soap->buflen = soap->z_buflen;
+    soap->zlib_state = SOAP_ZLIB_NONE;
+    if (inflateEnd(&soap->d_stream) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+#ifdef WITH_GZIP
+    if (soap->zlib_in == SOAP_ZLIB_GZIP)
+    { soap_wchar c;
+      short i;
+      for (i = 0; i < 8; i++)
+      { if ((int)(c = soap_getchar(soap)) == EOF)
+          return soap->error = SOAP_EOF;
+        soap->z_buf[i] = (char)c;
+      }
+      if (soap->z_crc != ((uLong)(unsigned char)soap->z_buf[0] | ((uLong)(unsigned char)soap->z_buf[1] << 8) | ((uLong)(unsigned char)soap->z_buf[2] << 16) | ((uLong)(unsigned char)soap->z_buf[3] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: crc check failed, message corrupted? (crc32=%lu)\n", (unsigned long)soap->z_crc));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+      if (soap->d_stream.total_out != ((uLong)(unsigned char)soap->z_buf[4] | ((uLong)(unsigned char)soap->z_buf[5] << 8) | ((uLong)(unsigned char)soap->z_buf[6] << 16) | ((uLong)(unsigned char)soap->z_buf[7] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: incorrect message length\n"));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+    }
+#endif
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    while ((int)soap_getchar(soap) != EOF) /* advance to last chunk */
+      ;
+  if (soap->fdisconnect && (soap->error = soap->fdisconnect(soap)))
+    return soap->error;
+#ifndef WITH_NOIDREF
+  return soap_resolve(soap);
+#else
+#ifndef WITH_LEANER
+  if (soap->xlist)
+  { if (soap->mode & SOAP_ENC_MTOM)
+      return soap->error = SOAP_MIME_HREF;
+    return soap->error = SOAP_DIME_HREF;
+  }
+#endif
+  return SOAP_OK;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free(struct soap *soap)
+{ register struct Namespace *ns;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free namespace stack\n"));
+  while (soap->nlist)
+  { register struct soap_nlist *np = soap->nlist->next;
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free any remaining temp blocks\n"));
+  while (soap->blist)
+    soap_end_block(soap);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute storage\n"));
+  while (soap->attributes)
+  { register struct soap_attribute *tp = soap->attributes->next;
+    if (soap->attributes->value)
+      SOAP_FREE(soap, soap->attributes->value);
+    SOAP_FREE(soap, soap->attributes);
+    soap->attributes = tp;
+  }
+#ifdef WITH_FAST
+  if (soap->labbuf)
+    SOAP_FREE(soap, soap->labbuf);
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  ns = soap->local_namespaces;
+  if (ns)
+  { for (; ns->id; ns++)
+    { if (ns->out)
+      { if (soap->encodingStyle == ns->out)
+          soap->encodingStyle = SOAP_STR_EOS;
+        SOAP_FREE(soap, ns->out);
+        ns->out = NULL;
+      }
+      if (soap->encodingStyle == ns->ns)
+        soap->encodingStyle = SOAP_STR_EOS;
+    }
+    SOAP_FREE(soap, soap->local_namespaces);
+    soap->local_namespaces = NULL;
+  }
+#ifndef WITH_LEANER
+  while (soap->xlist)
+  { struct soap_xlist *xp = soap->xlist->next;
+    SOAP_FREE(soap, soap->xlist);
+    soap->xlist = xp;
+  }
+#endif
+#ifndef WITH_NOIDREF
+  soap_free_pht(soap);
+  soap_free_iht(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_logs(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { soap->logfile[i] = NULL;
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEAN) || defined(SOAP_DEBUG)
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_open_logfile(struct soap *soap, int i)
+{ if (soap->logfile[i])
+    soap->fdebug[i] = fopen(soap->logfile[i], i < 2 ? "ab" : "a");
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_close_logfile(struct soap *soap, int i)
+{ if (soap->fdebug[i])
+  { fclose(soap->fdebug[i]);
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_close_logfiles(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+    soap_close_logfile(soap, i);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_set_logfile(struct soap *soap, int i, const char *logfile)
+{ char *s = NULL;
+  soap_close_logfile(soap, i);
+  if (soap->logfile[i])
+    SOAP_FREE(soap, (void*)soap->logfile[i]);
+  if (logfile)
+    if ((s = (char*)SOAP_MALLOC(soap, strlen(logfile) + 1)))
+      strcpy(s, logfile);
+  soap->logfile[i] = s;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_recv_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_RECV, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_sent_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_SENT, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_test_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_TEST, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy(struct soap *soap)
+{ return soap_copy_context((struct soap*)malloc(sizeof(struct soap)), soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy_context(struct soap *copy, struct soap *soap)
+{ if (soap_check_state(soap))
+    return NULL;
+  if (copy)
+  { register struct soap_plugin *p;
+    memcpy(copy, soap, sizeof(struct soap));
+    copy->state = SOAP_COPY;
+    copy->user = NULL;
+    copy->error = SOAP_OK;
+    copy->userid = NULL;
+    copy->passwd = NULL;
+    copy->nlist = NULL;
+    copy->blist = NULL;
+    copy->clist = NULL;
+    copy->alist = NULL;
+    copy->attributes = NULL;
+#ifdef WITH_FAST
+    copy->labbuf = NULL;
+    copy->lablen = 0;
+    copy->labidx = 0;
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_mht(copy);
+#endif
+    copy->local_namespaces = NULL;
+#ifndef WITH_NOIDREF
+    soap_init_iht(copy);
+    soap_init_pht(copy);
+#endif
+    copy->header = NULL;
+    copy->fault = NULL;
+    copy->action = NULL;
+#ifndef WITH_LEAN
+#ifdef WITH_COOKIES
+    copy->cookies = soap_copy_cookies(copy);
+#else
+    copy->cookies = NULL;
+#endif
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_logs(copy);
+    soap_set_recv_logfile(copy, soap->logfile[SOAP_INDEX_RECV]);
+    soap_set_sent_logfile(copy, soap->logfile[SOAP_INDEX_SENT]);
+    soap_set_test_logfile(copy, soap->logfile[SOAP_INDEX_TEST]);
+#endif
+    copy->plugins = NULL;
+    for (p = soap->plugins; p; p = p->next)
+    { register struct soap_plugin *q = (struct soap_plugin*)SOAP_MALLOC(copy, sizeof(struct soap_plugin));
+      if (!q)
+        return NULL;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying plugin '%s'\n", p->id));
+      *q = *p;
+      if (p->fcopy && (soap->error = p->fcopy(copy, q, p)))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not copy plugin '%s'\n", p->id));
+        SOAP_FREE(copy, q);
+        return NULL;
+      }
+      q->next = copy->plugins;
+      copy->plugins = q;
+    }
+  }
+  else
+    soap->error = SOAP_EOM;
+  return copy;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init(struct soap *soap)
+{ soap->state = SOAP_INIT;
+  soap->version = 0;
+  soap_imode(soap, SOAP_IO_DEFAULT);
+  soap_omode(soap, SOAP_IO_DEFAULT);
+  soap->plugins = NULL;
+  soap->user = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+  soap->fconnect = NULL;
+  soap->fdisconnect = NULL;
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+  soap->fplugin = fplugin;
+#ifndef WITH_LEANER
+  soap->fdimereadopen = NULL;
+  soap->fdimewriteopen = NULL;
+  soap->fdimereadclose = NULL;
+  soap->fdimewriteclose = NULL;
+  soap->fdimeread = NULL;
+  soap->fdimewrite = NULL;
+#endif
+  soap->float_format = "%.8g"; /* .8 preserves single FP precision as much as possible, but might not be very efficient */
+  soap->double_format = "%.17lg"; /* .17 preserves double FP precision as much as possible, but might not be very efficient */
+  soap->dime_id_format = "cid:id%d"; /* default DIME id format */
+  soap->http_version = "1.1";
+  soap->actor = NULL;
+  soap->max_keep_alive = SOAP_MAXKEEPALIVE;
+  soap->keep_alive = 0;
+  soap->recv_timeout = 0;
+  soap->send_timeout = 0;
+  soap->connect_timeout = 0;
+  soap->accept_timeout = 0;
+  soap->socket_flags = 0;
+  soap->connect_flags = 0;
+  soap->bind_flags = 0;
+  soap->accept_flags = 0;
+  soap->ip = 0;
+#ifdef WITH_FAST
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  soap->encodingStyle = SOAP_STR_EOS;
+#ifndef WITH_NONAMESPACES
+  soap->namespaces = namespaces;
+#else
+  soap->namespaces = NULL;
+#endif
+  soap->local_namespaces = NULL;
+  soap->nlist = NULL;
+  soap->blist = NULL;
+  soap->clist = NULL;
+  soap->alist = NULL;
+  soap->attributes = NULL;
+  soap->header = NULL;
+  soap->fault = NULL;
+  soap->master = SOAP_INVALID_SOCKET;
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->os = NULL;
+  soap->is = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifndef UNDER_CE
+  soap->recvfd = 0;
+  soap->sendfd = 1;
+#else
+  soap->recvfd = stdin;
+  soap->sendfd = stdout;
+#endif 
+  soap->host[0] = '\0';
+  soap->port = 0;
+  soap->action = NULL;
+  soap->proxy_host = NULL;
+  soap->proxy_port = 8080;
+  soap->proxy_userid = NULL;
+  soap->proxy_passwd = NULL;
+  soap->authrealm = NULL;
+  soap->prolog = NULL;
+#ifdef WITH_OPENSSL
+  if (!ssl_init_done)
+    soap_ssl_init();
+  soap->fsslauth = ssl_auth_init;
+  soap->fsslverify = ssl_verify_callback;
+  soap->bio = NULL;
+  soap->ssl = NULL;
+  soap->ctx = NULL;
+  soap->require_server_auth = 0;
+  soap->require_client_auth = 0;
+  soap->rsa = 0;
+  soap->keyfile = NULL;
+  soap->password = NULL;
+  soap->dhfile = NULL;
+  soap->cafile = NULL;
+  soap->capath = NULL;
+  soap->crlfile = NULL;
+  soap->randfile = NULL;
+  soap->session = NULL;
+#endif
+#ifdef WITH_ZLIB
+  soap->zlib_state = SOAP_ZLIB_NONE;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.zalloc = NULL;
+  soap->d_stream.zfree = NULL;
+  soap->d_stream.opaque = NULL;
+  soap->z_level = 6;
+#endif
+#ifndef WITH_LEAN
+  soap->c14ninclude = NULL;
+  soap->c14nexclude = NULL;
+  soap->cookies = NULL;
+  soap->cookie_domain = NULL;
+  soap->cookie_path = NULL;
+  soap->cookie_max = 32;
+#endif
+#ifdef SOAP_DEBUG
+  soap_init_mht(soap);
+  soap_init_logs(soap);
+  soap_set_recv_logfile(soap, "RECV.log");
+  soap_set_sent_logfile(soap, "SENT.log");
+  soap_set_test_logfile(soap, NULL);
+#endif
+#ifdef WMW_RPM_IO
+  soap->rpmreqid = NULL;
+#endif
+#ifdef PALM
+  palmNetLibOpen();
+#endif
+#ifndef WITH_NOIDREF
+  soap_init_iht(soap);
+  soap_init_pht(soap);
+#endif
+  soap_begin(soap);
+#ifdef SOAP_DEBUG
+  soap_set_test_logfile(soap, "TEST.log");
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init1(struct soap *soap, soap_mode mode)
+{ soap_init2(soap, mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init2(struct soap *soap, soap_mode imode, soap_mode omode)
+{ soap_init(soap);
+  soap_imode(soap, imode);
+  soap_omode(soap, omode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_begin(struct soap *soap)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing\n"));
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+  soap->null = 0;
+  soap->position = 0;
+  soap->encoding = 0;
+  soap->mustUnderstand = 0;
+  soap->mode = 0;
+  soap->ns = 0;
+  soap->part = SOAP_END;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  soap->error = SOAP_OK;
+  soap->peeked = 0;
+  soap->ahead = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+  soap->endpoint[0] = '\0';
+#ifndef WITH_LEANER
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+#endif
+  soap_free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end(struct soap *soap)
+{ register struct soap_clist *cp;
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  soap_dealloc(soap, NULL);
+  while (soap->clist)
+  { cp = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = cp;
+  }
+  soap_closesock(soap);
+#ifdef SOAP_DEBUG
+  soap_close_logfiles(soap);
+#endif
+#ifdef PALM
+  palmNetLibClose();
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_namespaces(struct soap *soap, struct Namespace *p)
+{ register struct Namespace *ns = soap->local_namespaces;
+  register struct soap_nlist *np, *nq, *nr;
+  register unsigned int level = soap->level;
+  soap->namespaces = p;
+  soap->local_namespaces = NULL;
+  soap_set_local_namespaces(soap);
+  /* reverse the namespace list */
+  np = soap->nlist;
+  soap->nlist = NULL;
+  if (np)
+  { nq = np->next;
+    np->next = NULL;
+    while (nq)
+    { nr = nq->next;
+      nq->next = np;
+      np = nq;
+      nq = nr;
+    }
+  }
+  /* then push on new stack */
+  while (np)
+  { register const char *s;
+    soap->level = np->level; /* preserve element nesting level */
+    s = np->ns;
+    if (!s && np->index >= 0 && ns)
+    { s = ns[np->index].out;
+      if (!s)
+        s = ns[np->index].ns;
+    }
+    if (s && soap_push_namespace(soap, np->id, s))
+      return soap->error;
+    nq = np;
+    np = np->next;
+    SOAP_FREE(soap, nq);
+  }
+  if (ns)
+  { register int i;
+    for (i = 0; ns[i].id; i++)
+    { if (ns[i].out)
+      { SOAP_FREE(soap, ns[i].out);
+        ns[i].out = NULL;
+      }
+    }
+    SOAP_FREE(soap, ns);
+  }
+  soap->level = level; /* restore level */
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_local_namespaces(struct soap *soap)
+{ if (soap->namespaces && !soap->local_namespaces)
+  { register const struct Namespace *ns1;
+    register struct Namespace *ns2;
+    register size_t n = 1;
+    for (ns1 = soap->namespaces; ns1->id; ns1++)
+      n++;
+    n *= sizeof(struct Namespace);
+    ns2 = (struct Namespace*)SOAP_MALLOC(soap, n);
+    if (ns2)
+    { memcpy(ns2, soap->namespaces, n);
+      if (ns2[0].ns)
+      { if (!strcmp(ns2[0].ns, soap_env1))
+          soap->version = 1;
+        else
+          soap->version = 2;
+      }
+      soap->local_namespaces = ns2;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+#ifndef PALM_1
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_strsearch(const char *big, const char *little)
+{ size_t n = strlen(little);
+  const char *s = big;
+  while (s) 
+  { if (!strncmp(s, little, n) && (s[n] == '\0' || s[n] == ' '))
+      return s;
+    s = strchr(s, ' ');
+    if (s)
+      s++;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_lookup_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np;
+  for (np = soap->nlist; np; np = np->next)
+  { if (!strncmp(np->id, tag, n) && !np->id[n])
+      return np;
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized)
+{ register struct soap_nlist *np;
+  size_t n, k;
+  if (soap_strsearch(soap->c14nexclude, id))
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns?ns:""));
+  if (!utilized)
+  { for (np = soap->nlist; np; np = np->next)
+    { if (!strcmp(np->id, id) && (!np->ns || !strcmp(np->ns, ns)))
+        break;
+    }
+    if (np)
+    { if (np->index == 1)
+        utilized = np->index;
+      else
+        return NULL;
+    }
+  }
+  n = strlen(id);
+  if (ns)
+    k = strlen(ns);
+  else
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k + 1);
+  if (!np)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  np->next = soap->nlist;
+  soap->nlist = np;
+  strcpy(np->id, id);
+  if (ns)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+  }
+  else
+    np->ns = NULL;
+  np->level = soap->level;
+  np->index = utilized;
+  return np;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_utilize_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np = soap_lookup_ns(soap, tag, n);
+  if (np)
+  { if (np->index == 0)
+      soap_push_ns(soap, np->id, np->ns, 1);
+  }
+  else
+  { strncpy(soap->tmpbuf, tag, n);
+    soap->tmpbuf[n] = '\0';
+    soap_push_ns(soap, soap->tmpbuf, NULL, 1);
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_pop_ns(struct soap *soap)
+{ soap_pop_namespace(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element(struct soap *soap, const char *tag, int id, const char *type)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element begin tag='%s' id='%d' type='%s'\n", tag, id, type?type:""));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->soap = soap;
+    elt->next = NULL;
+    elt->prnt = soap->dom;
+    elt->name = soap_strdup(soap, tag);
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->nstr = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->node = NULL;
+    elt->type = 0;
+    elt->head = NULL;
+    elt->tail = NULL;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+  }
+  else
+  {
+#endif
+    soap->level++;
+#ifndef WITH_LEAN
+    if (!soap->ns)
+    { if (!(soap->mode & SOAP_XML_CANONICAL)
+       && soap_send(soap, soap->prolog ? soap->prolog : "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"))
+        return soap->error;
+    }
+    else if (soap->mode & SOAP_XML_INDENT)
+    { if (soap->ns == 1 && soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+      soap->body = 1;
+    }
+#endif
+    if (soap_send_raw(soap, "<", 1)
+     || soap_send(soap, tag))
+      return soap->error;
+#ifdef WITH_DOM
+  }
+#endif
+  if (!soap->ns)
+  { struct Namespace *ns;
+    for (ns = soap->local_namespaces; ns && ns->id; ns++)
+    { if (*ns->id && (ns->out || ns->ns))
+      { sprintf(soap->tmpbuf, "xmlns:%s", ns->id);
+        if (soap_attribute(soap, soap->tmpbuf, ns->out ? ns->out : ns->ns))
+          return soap->error;
+      }
+    }   
+  }
+  soap->ns = 1; /* start with 0 or 2, but should be one to continue */
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { const char *s = strchr(tag, ':');
+    if (s)
+      soap_utilize_ns(soap, tag, s - tag);
+  }
+#endif
+  if (id > 0)
+  { sprintf(soap->tmpbuf, "_%d", id);
+    if (soap_attribute(soap, "id", soap->tmpbuf))
+      return soap->error;
+  }
+  if (type && *type)
+  { if (soap_attribute(soap, "xsi:type", type))
+      return soap->error;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { const char *s = strchr(type, ':');
+      if (s)
+        soap_utilize_ns(soap, type, s - type);
+    }
+#endif
+  }
+  if (soap->null && soap->position > 0)
+  { int i;
+    sprintf(soap->tmpbuf, "[%d", soap->positions[0]);
+    for (i = 1; i < soap->position; i++)
+      sprintf(soap->tmpbuf + strlen(soap->tmpbuf), ",%d", soap->positions[i]);
+    strcat(soap->tmpbuf, "]");
+    if (soap_attribute(soap, "SOAP-ENC:position", soap->tmpbuf))
+      return soap->error;
+  }
+  if (soap->mustUnderstand)
+  { if (soap->actor && *soap->actor)
+    { if (soap_attribute(soap, soap->version == 2 ? "SOAP-ENV:role" : "SOAP-ENV:actor", soap->actor))
+        return soap->error;
+    }
+    if (soap_attribute(soap, "SOAP-ENV:mustUnderstand", soap->version == 2 ? "true" : "1"))
+      return soap->error;
+    soap->mustUnderstand = 0;
+  }
+  if (soap->encoding)
+  { if (soap->encodingStyle && soap->local_namespaces)
+    { if (!*soap->encodingStyle)
+      { if (soap->local_namespaces[1].out)
+          soap->encodingStyle = soap->local_namespaces[1].out;
+        else
+          soap->encodingStyle = soap->local_namespaces[1].ns;
+      }
+      if (soap_attribute(soap, "SOAP-ENV:encodingStyle", soap->encodingStyle))
+        return soap->error;
+    }
+    soap->encoding = 0;
+  }
+  soap->null = 0;
+  soap->position = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_out(struct soap *soap, const char *tag, int id, const char *type)
+{ if (*tag == '-')
+    return SOAP_OK;
+  if (soap_element(soap, tag, id, type))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRRCHR
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_strrchr(const char *s, int t)
+{ register char *r = NULL;
+  while (*s)
+    if (*s++ == t)
+      r = (char*)s - 1;
+  return r;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOL
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_strtol(const char *s, char **t, int b)
+{ register long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { short neg = 0;
+    if (*s == '-')
+    { s++;
+      neg = 1;
+    }
+    else if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 214748364 && (n > 214748364 || c >= '8'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+    if (neg)
+      n = -n;
+  }
+  else /* b == 16 and value is always positive */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x07FFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOUL
+SOAP_FMAC1
+unsigned long
+SOAP_FMAC2
+soap_strtoul(const char *s, char **t, int b)
+{ unsigned long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 429496729 && (n > 429496729 || c >= '6'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+  }
+  else /* b == 16 */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x0FFFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_begin_out(struct soap *soap, const char *tag, int id, const char *type, const char *offset)
+{ if (soap_element(soap, tag, id, "SOAP-ENC:Array"))
+    return soap->error;
+  if (soap->version == 2)
+  { const char *s;
+    s = soap_strrchr(type, '[');
+    if ((size_t)(s - type) < sizeof(soap->tmpbuf))
+    { strncpy(soap->tmpbuf, type, s - type);
+      soap->tmpbuf[s - type] = '\0';
+      if (type && *type && (soap_attribute(soap, "SOAP-ENC:itemType", soap->tmpbuf)))
+        return soap->error;
+      if (s && (soap_attribute(soap, "SOAP-ENC:arraySize", s + 1)))
+        return soap->error;
+    }
+  }
+  else
+  { if (offset && (soap_attribute(soap, "SOAP-ENC:offset", offset)))
+      return soap->error;
+    if (type && *type && (soap_attribute(soap, "SOAP-ENC:arrayType", type)))
+      return soap->error;
+  }
+#ifndef WITH_LEAN
+  if (type && *type && (soap->mode & SOAP_XML_CANONICAL))
+  { const char *s = strchr(type, ':');
+    if (s)
+      soap_utilize_ns(soap, type, s - type);
+  }
+#endif
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_start_end_out(struct soap *soap, const char *tag)
+{ register struct soap_attribute *tp;
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att;
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { att = &soap->dom->atts;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible)
+      { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+	if (!*att)
+	  return soap->error = SOAP_EOM;
+	(*att)->next = NULL;
+        (*att)->nstr = NULL;
+        (*att)->name = soap_strdup(soap, tp->name);
+        (*att)->data = soap_strdup(soap, tp->value);
+        (*att)->wide = NULL;
+        (*att)->soap = soap;
+        tp->visible = 0;
+      }
+    }
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { struct soap_nlist *np;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible && tp->name)
+      { const char *s = strchr(tp->name, ':');
+        if (s)
+          soap_utilize_ns(soap, tp->name, s - tp->name);
+      }
+    }
+    for (np = soap->nlist; np; np = np->next)
+    { if (np->index == 1 && np->ns)
+      { sprintf(soap->tmpbuf, "xmlns:%s", np->id);
+        soap_set_attr(soap, soap->tmpbuf, np->ns);
+        np->index = 2;
+      }
+    }
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible)
+    { if (soap_send(soap, " ") || soap_send(soap, tp->name))
+        return soap->error;
+      if (tp->visible == 2 && tp->value)
+        if (soap_send_raw(soap, "=\"", 2)
+	 || soap_string_out(soap, tp->value, 1)
+	 || soap_send_raw(soap, "\"", 1))
+          return soap->error;
+      tp->visible = 0;
+    }
+  }
+  if (tag)
+  { 
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { if (soap_send_raw(soap, ">", 1)
+       || soap_element_end_out(soap, tag))
+        return soap->error;
+    }
+    else
+#endif
+    soap->level--;	/* decrement level just before /> */
+    if (soap_send_raw(soap, "/>", 2))
+      return soap->error;
+    return SOAP_OK;
+  }
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_out(struct soap *soap, const char *tag)
+{ if (*tag == '-')
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element ending tag='%s'\n", tag));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+    soap_pop_ns(soap);
+  if (soap->mode & SOAP_XML_INDENT)
+  { if (!soap->body)
+    { if (soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+    }
+    soap->body = 0;
+  }
+#endif
+  if (soap_send_raw(soap, "</", 2)
+   || soap_send(soap, tag))
+    return soap->error;
+  soap->level--;	/* decrement level just before > */
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_ref(struct soap *soap, const char *tag, int id, int href)
+{ register int n = 0;
+  if (soap->version == 2)
+    n = 1;
+  sprintf(soap->href, "#_%d", href);
+  return soap_element_href(soap, tag, id, "href" + n, soap->href + n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_href(struct soap *soap, const char *tag, int id, const char *ref, const char *val)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element '%s' reference %s='%s'\n", tag, ref, val));
+  if (soap_element(soap, tag, id, NULL)
+   || soap_attribute(soap, ref, val)
+   || soap_element_start_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_null(struct soap *soap, const char *tag, int id, const char *type)
+{ struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (tp->visible)
+      break;
+  if (tp || (soap->version == 2 && soap->position > 0) || id > 0 || (soap->mode & SOAP_XML_NIL))
+  { if (soap_element(soap, tag, id, type))
+      return soap->error;
+    if (soap->part != SOAP_IN_HEADER && soap->encodingStyle)
+      if (soap_attribute(soap, "xsi:nil", "true"))
+        return soap->error;
+    return soap_element_start_end_out(soap, tag);
+  }
+  soap->null = 1;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_id(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, int n, const char *type, int t) 
+{ if (!p || (a && !a->__ptr))
+  { soap_element_null(soap, tag, id, type);
+    return -1;
+  }
+#ifndef WITH_NOIDREF
+  if (soap->mode & SOAP_XML_TREE)
+    return 0;
+  if (id < 0)
+  { struct soap_plist *pp;
+    if (a)
+      id = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+    else
+      id = soap_pointer_lookup(soap, p, t, &pp);
+    if (id)
+    { if (soap_is_embedded(soap, pp))
+      { soap_element_ref(soap, tag, 0, id);
+        return -1;
+      }
+      if (soap_is_single(soap, pp))
+        return 0;
+      soap_set_embedded(soap, pp);
+    }
+  }
+  return id;
+#else
+  return 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_result(struct soap *soap, const char *tag)
+{ if (soap->version == 2 && soap->encodingStyle)
+    if (soap_element(soap, "SOAP-RPC:result", 0, NULL)
+     || soap_attribute(soap, "xmlns:SOAP-RPC", soap_rpc)
+     || soap_element_start_end_out(soap, NULL)
+     || soap_string_out(soap, tag, 0)
+     || soap_element_end_out(soap, "SOAP-RPC:result"))
+      return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attribute(struct soap *soap, const char *name, const char *value)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+    a->next = soap->dom->atts;
+    a->nstr = NULL;
+    a->name = soap_strdup(soap, name);
+    a->data = soap_strdup(soap, value);
+    a->wide = NULL;
+    a->soap = soap;
+    soap->dom->atts = a;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { /* TODO: consider using this code to handle default namespace
+    if (!strncmp(name, "xmlns", 5) && (name[5] == ':' || name[5] == '\0'))
+    { if (name[5] == ':')
+        soap_push_ns(soap, name + 6, value, 0);
+      else
+        soap_push_ns(soap, "", value, 0);
+    }
+    */
+    if (!strncmp(name, "xmlns:", 6))
+      soap_push_ns(soap, name + 6, value, 0);
+    else if (soap_set_attr(soap, name, value))
+      return soap->error;
+  }
+  else
+#endif
+  { if (soap_send(soap, " ") || soap_send(soap, name))
+      return soap->error;
+    if (value)
+      if (soap_send_raw(soap, "=\"", 2)
+       || soap_string_out(soap, value, 1)
+       || soap_send_raw(soap, "\"", 1))
+        return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_in(struct soap *soap, const char *tag, int nillable)
+{ if (!soap_peek_element(soap))
+  { if (soap->other)
+      return soap->error = SOAP_TAG_MISMATCH;
+    if (tag && *tag == '-')
+      return SOAP_OK;
+    if (!(soap->error = soap_match_tag(soap, soap->tag, tag)))
+    { soap->peeked = 0;
+      if (soap->body)
+        soap->level++;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"" ));
+      if (!nillable && soap->null && (soap->mode & SOAP_XML_STRICT))
+        return soap->error = SOAP_NULL;
+    }
+  }
+  else if (soap->error == SOAP_NO_TAG && tag && *tag == '-')
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_in(struct soap *soap, const char *tag)  
+{ register soap_wchar c;
+  register char *s;
+  register const char *t;
+  register int n = 0;
+  if (tag && *tag == '-')
+    return SOAP_OK;
+  soap->level--;
+  soap_pop_namespace(soap);
+#ifdef WITH_DOM
+  /* this whitespace or mixed content is not insignificant for DOM */
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!soap->peeked && !soap_string_in(soap, 3, -1, -1))
+      return soap->error;
+    if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  if (soap->peeked)
+  { if (soap->error == SOAP_NO_TAG)
+      soap->error = SOAP_OK;
+    if (*soap->tag)
+      n++;
+    soap->peeked = 0;
+  }
+  do
+  { while (((c = soap_get(soap)) != SOAP_TT))
+    { if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      if (c == SOAP_LT)
+        n++;
+      else if (c == '/')
+      { c = soap_get(soap);
+        if (c == SOAP_GT)
+	  n--;
+        else
+	  soap_unget(soap, c);
+      }
+    }
+  } while (n--);
+  s = soap->tag;
+  while (soap_notblank(c = soap_get(soap)))
+    *s++ = (char)c;
+  *s = '\0';
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  while (soap_blank(c))
+    c = soap_get(soap);
+  if (c != SOAP_GT)
+    return soap->error = SOAP_SYNTAX_ERROR;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:""));
+  if (!tag || !*tag)
+    return SOAP_OK;
+  if ((s = strchr(soap->tag, ':')))
+    s++;
+  else
+    s = soap->tag;
+  if ((t = strchr(tag, ':')))
+    t++;
+  else
+    t = tag;
+  if (!SOAP_STRCMP(s, t))
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element tag name does not match\n"));
+  return soap->error = SOAP_SYNTAX_ERROR;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_attr_value(struct soap *soap, const char *name, int flag)
+{ register struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (!soap_match_tag(soap, tp->name, name))
+      break;
+  if (tp && tp->visible == 2)
+  { if (flag == 2 && (soap->mode & SOAP_XML_STRICT))
+      soap->error = SOAP_PROHIBITED;
+    else
+      return tp->value;
+  }
+  else if (flag == 1 && (soap->mode & SOAP_XML_STRICT))
+    soap->error = SOAP_REQUIRED;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_attr(struct soap *soap, const char *name, const char *value)
+{ register struct soap_attribute *tp;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set attribute %s='%s'\n", name, value?value:""));
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (!strcmp(tp->name, name))
+      break;
+  }
+  if (!tp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute %s\n", name));
+    if (!(tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(name))))
+      return soap->error = SOAP_EOM;
+    tp->ns = NULL;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { struct soap_attribute **tpp = &soap->attributes;
+      const char *s = strchr(name, ':');
+      if (!strncmp(name, "xmlns", 5))
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) || strcmp((*tpp)->name + 5, name + 5) > 0)
+            break;
+      }
+      else if (!s)
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) && ((*tpp)->ns || strcmp((*tpp)->name, name) > 0))
+            break;
+      }
+      else
+      { int k;
+        for (; *tpp; tpp = &(*tpp)->next)
+	{ if (!strncmp((*tpp)->name, "xmlns:", 6) && !strncmp((*tpp)->name + 6, name, s - name) && !(*tpp)->name[6 + s - name])
+	  { if (!tp->ns)
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Canonicalization: prefix %s=%p(%s)\n", name, (*tpp)->ns, (*tpp)->ns));
+	      tp->ns = (*tpp)->ns;
+	    }
+	  }
+          else if (strncmp((*tpp)->name, "xmlns", 5) && (*tpp)->ns && tp->ns && ((k = strcmp((*tpp)->ns, tp->ns)) > 0 || (!k && strcmp((*tpp)->name, name) > 0)))
+            break;
+        }
+      }
+      tp->next = *tpp;
+      *tpp = tp;
+    }
+    else
+#endif
+    { tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    strcpy(tp->name, name);
+    tp->value = NULL;
+  }
+  else if (tp->visible)
+  { return SOAP_OK;
+  }
+  else if (value && tp->value && tp->size <= strlen(value))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute value of %s (free %p)\n", name, tp->value));
+    SOAP_FREE(soap, tp->value);
+    tp->value = NULL;
+    tp->ns = NULL;
+  }
+  if (value)
+  { if (!tp->value)
+    { tp->size = strlen(value) + 1;
+      if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+        return soap->error = SOAP_EOM;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute value of %s (%p)\n", tp->name, tp->value));
+    }
+    strcpy(tp->value, value);
+    if (!strncmp(tp->name, "xmlns:", 6))
+      tp->ns = tp->value;
+    tp->visible = 2;
+#ifndef WITH_LEAN
+    if (!strcmp(name, "wsu:Id"))
+    { soap->part = SOAP_BEGIN_SECURITY;
+      strncpy(soap->id, value, sizeof(soap->id));
+      soap->id[sizeof(soap->id)-1] = '\0';
+    }
+#endif
+  }
+  else
+    tp->visible = 1;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_attr(struct soap *soap)
+{ register struct soap_attribute *tp;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_CANONICAL))
+  { while (soap->attributes)
+    { tp = soap->attributes->next;
+      SOAP_FREE(soap, soap->attributes->value);
+      SOAP_FREE(soap, soap->attributes);
+      soap->attributes = tp;
+    }
+  }
+  else
+#endif
+  { for (tp = soap->attributes; tp; tp = tp->next)
+      tp->visible = 0;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d)
+{ register size_t i;
+  for (i = 0; i < n; i++)
+  { register soap_wchar c = soap_get(soap);
+    switch (c)
+    {
+    case SOAP_TT:
+      *s++ = '<';
+      soap_unget(soap, '/');
+      break;
+    case SOAP_LT:
+      *s++ = '<';
+      break;
+    case SOAP_GT:
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '>';
+      break;
+    case SOAP_QT:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '"';
+      break;
+    case SOAP_AP:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '\'';
+      break;
+    case '\t':
+    case '\n':
+    case '\r':
+    case ' ':
+    case '/':
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+    default:
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+  }
+  return soap->error = SOAP_EOM;
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_store_lab(struct soap *soap, const char *s, size_t n)
+{ soap->labidx = 0;
+  return soap_append_lab(soap, s, n);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_append_lab(struct soap *soap, const char *s, size_t n)
+{ if (soap->labidx + n >= soap->lablen)
+  { register char *t = soap->labbuf;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enlarging look-aside buffer to append data, old size=%lu", (unsigned long)soap->lablen));
+    if (soap->lablen == 0)
+      soap->lablen = SOAP_LABLEN;
+    while (soap->labidx + n >= soap->lablen)
+      soap->lablen <<= 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, ", new size=%lu\n", (unsigned long)soap->lablen));
+    soap->labbuf = (char*)SOAP_MALLOC(soap, soap->lablen);
+    if (!soap->labbuf)
+    { if (t)
+        SOAP_FREE(soap, t);
+      return soap->error = SOAP_EOM;
+    }
+    if (t)
+    { memcpy(soap->labbuf, t, soap->labidx);
+      SOAP_FREE(soap, t);
+    }
+  }
+  if (s)
+  { memcpy(soap->labbuf + soap->labidx, s, n);
+    soap->labidx += n;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_peek_element(struct soap *soap)
+{
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att = NULL;
+  register char *lead = NULL;
+#endif
+  register struct soap_attribute *tp;
+  const char *t;
+  register char *s;
+  register soap_wchar c;
+  register int i;
+  if (soap->peeked)
+  { if (!*soap->tag)
+      return soap->error = SOAP_NO_TAG;
+    return SOAP_OK;
+  }
+  soap->peeked = 1;
+  c = soap_getutf8(soap);
+#ifdef WITH_DOM
+  /* whitespace leading to start tag is not insignificant for DOM */
+  if (soap_blank(c))
+  { soap->labidx = 0;
+    do
+    { if (soap_append_lab(soap, NULL, 0))
+        return SOAP_EOM;
+      s = soap->labbuf + soap->labidx;
+      i = soap->lablen - soap->labidx;
+      soap->labidx = soap->lablen;
+      while (soap_blank(c) && i--)
+      { *s++ = c;
+        c = soap_getutf8(soap);
+      }
+    }
+    while (soap_blank(c));
+    *s = '\0';
+    lead = soap_strdup(soap, soap->labbuf);
+  }
+#else
+  while (soap_blank(c))
+    c = soap_getutf8(soap);
+#endif
+  if (c != SOAP_LT)
+  { *soap->tag = '\0';
+    if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, c);
+#ifdef WITH_DOM
+    /* whitespace leading to end tag is not insignificant for DOM */
+    if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+      soap->dom->tail = soap_strdup(soap, lead);
+#endif
+    return soap->error = SOAP_NO_TAG;
+  }
+  s = soap->tag;
+  do c = soap_get1(soap);
+  while (soap_blank(c));
+  i = sizeof(soap->tag);
+  while (c != '>' && c != '/' && soap_notblank(c))
+  { if (--i > 0)
+      *s++ = (char)c;
+    c = soap_get1(soap);
+  }
+  while (soap_blank(c))
+    c = soap_get1(soap);
+  *s = '\0';
+  soap->id[0] = '\0';
+  soap->href[0] = '\0';
+  soap->type[0] = '\0';
+  soap->arrayType[0] = '\0';
+  soap->arraySize[0] = '\0';
+  soap->arrayOffset[0] = '\0';
+  soap->other = 0;
+  soap->root = -1;
+  soap->position = 0;
+  soap->null = 0;
+  soap->mustUnderstand = 0;
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt;
+    elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->next = NULL;
+    elt->nstr = NULL;
+    elt->name = soap_strdup(soap, soap->tag);
+    elt->prnt = soap->dom;
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->type = 0;
+    elt->node = NULL;
+    elt->head = lead;
+    elt->tail = NULL;
+    elt->soap = soap;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+    att = &elt->atts;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+    tp->visible = 0;
+  while ((int)c != EOF && c != '>' && c != '/')
+  { s = soap->tmpbuf;
+    i = sizeof(soap->tmpbuf);
+    while (c != '=' && c != '>' && c != '/' && soap_notblank(c))
+    { if (--i > 0)
+        *s++ = (char)c;
+      c = soap_get1(soap);
+    }
+    *s = '\0';
+    if (i == sizeof(soap->tmpbuf))
+      return soap->error = SOAP_SYNTAX_ERROR;
+#ifdef WITH_DOM
+    /* add attribute name to dom */
+    if (att)
+    { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+       if (!*att)
+         return soap->error = SOAP_EOM;
+       (*att)->next = NULL;
+       (*att)->nstr = NULL;
+       (*att)->name = soap_strdup(soap, soap->tmpbuf);
+       (*att)->data = NULL;
+       (*att)->wide = NULL;
+       (*att)->soap = soap;
+    }
+#endif
+    if (!strncmp(soap->tmpbuf, "xmlns", 5))
+    { if (soap->tmpbuf[5] == ':')
+      { soap->tmpbuf[5] = '\0';
+        t = soap->tmpbuf + 6;
+      }
+      else if (soap->tmpbuf[5])
+        t = NULL;
+      else
+        t = SOAP_STR_EOS;
+    }
+    else
+      t = NULL;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (!SOAP_STRCMP(tp->name, soap->tmpbuf))
+        break;
+    }
+    if (!tp)
+    { tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(soap->tmpbuf));
+      if (!tp)
+        return soap->error = SOAP_EOM;
+      strcpy(tp->name, soap->tmpbuf);
+      tp->value = NULL;
+      tp->size = 0;
+      tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    while (soap_blank(c))
+      c = soap_get1(soap);
+    if (c == '=')
+    { do c = soap_getutf8(soap);
+      while (soap_blank(c));
+      if (c != SOAP_QT && c != SOAP_AP)
+      { soap_unget(soap, c);
+        c = ' '; /* blank delimiter */
+      }
+      if (soap_getattrval(soap, tp->value, tp->size, c))
+      {
+#ifdef WITH_FAST
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+	if (soap_store_lab(soap, tp->value, tp->size))
+	  return soap->error;
+	if (tp->value)
+	  SOAP_FREE(soap, tp->value);
+	for (;;)
+	{ if (soap_getattrval(soap, soap->labbuf + soap->labidx, soap->lablen - soap->labidx, c))
+	  { if (soap->error != SOAP_EOM)
+	      return soap->error;
+            soap->error = SOAP_OK;
+	    soap->labidx = soap->lablen;
+	    if (soap_append_lab(soap, NULL, 0))
+	      return soap->error;
+	  }
+	  else
+	    break;
+	}
+	if (soap->labidx)
+          tp->size = soap->lablen;
+	else
+	{ tp->size = strlen(soap->labbuf) + 1;
+          if (tp->size < SOAP_LABLEN)
+	    tp->size = SOAP_LABLEN;
+        }
+	if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+	  return soap->error = SOAP_EOM;
+        strcpy(tp->value, soap->labbuf);
+#else
+	size_t n;
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+        if (soap_new_block(soap))
+          return soap->error;
+        for (;;)
+        { if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+            return soap->error;
+          if (soap_getattrval(soap, s, SOAP_BLKLEN, c))
+          { if (soap->error != SOAP_EOM)
+              return soap->error;
+            soap->error = SOAP_OK;
+          }
+          else
+            break;
+        }
+	n = tp->size + soap->blist->size;
+        if (!(s = (char*)SOAP_MALLOC(soap, n)))
+          return soap->error = SOAP_EOM;
+        if (tp->value)
+        { memcpy(s, tp->value, tp->size);
+          SOAP_FREE(soap, tp->value);
+        }
+        soap_save_block(soap, s + tp->size, 0);
+        tp->value = s;
+        tp->size = n;
+#endif
+      }
+      do c = soap_get1(soap);
+      while (soap_blank(c));
+      tp->visible = 2; /* seen this attribute w/ value */
+#ifdef WITH_DOM
+      if (att)
+        (*att)->data = soap_strdup(soap, tp->value);
+#endif
+    }
+    else
+      tp->visible = 1; /* seen this attribute w/o value */
+#ifdef WITH_DOM
+    if (att)
+      att = &(*att)->next;
+#endif
+    if (t && tp->value)
+    { if (soap_push_namespace(soap, t, tp->value))
+        return soap->error;
+      tp->visible = 0;
+    }
+  }
+#ifdef WITH_DOM
+  if (att)
+  { soap->dom->nstr = soap_current_namespace(soap, soap->tag);
+    for (att = &soap->dom->atts; *att; att = &(*att)->next)
+      (*att)->nstr = soap_current_namespace(soap, (*att)->name);
+  }
+#endif
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  if (!(soap->body = (c != '/')))
+    do c = soap_get1(soap);
+    while (soap_blank(c));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { if (!soap->body && soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible && tp->value)
+    { if (!strcmp(tp->name, "id"))
+      { *soap->id = '#';
+        strncpy(soap->id + 1, tp->value, sizeof(soap->id) - 2);
+        soap->id[sizeof(soap->id)-1] = '\0';
+      }
+      else if (!strcmp(tp->name, "href"))
+      { strncpy(soap->href, tp->value, sizeof(soap->href) - 1);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if ((soap->version == 2 || (soap->mode & SOAP_XML_GRAPH)) && !strcmp(tp->name, "ref"))
+      { *soap->href = '#';
+        strncpy(soap->href + 1, tp->value, sizeof(soap->href) - 2);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if (!soap_match_tag(soap, tp->name, "xsi:type"))
+      { strncpy(soap->type, tp->value, sizeof(soap->type) - 1);
+        soap->type[sizeof(soap->type)-1] = '\0';
+      }
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arrayType"))
+      { s = soap_strrchr(tp->value, '[');
+        if (s && (size_t)(s - tp->value) < sizeof(soap->arrayType))
+        { strncpy(soap->arrayType, tp->value, s - tp->value);
+          soap->arrayType[s - tp->value] = '\0';
+          strncpy(soap->arraySize, s, sizeof(soap->arraySize) - 1);
+        }
+        else
+          strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+        soap->arraySize[sizeof(soap->arrayType)-1] = '\0';
+        soap->arrayType[sizeof(soap->arrayType)-1] = '\0';
+      }
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:itemType"))
+        strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arraySize"))
+        strncpy(soap->arraySize, tp->value, sizeof(soap->arraySize) - 1);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:offset"))
+        strncpy(soap->arrayOffset, tp->value, sizeof(soap->arrayOffset));
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:position"))
+        soap->position = soap_getposition(tp->value, soap->positions);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:root"))
+        soap->root = ((!strcmp(tp->value, "1") || !strcmp(tp->value, "true")));
+      else if ((soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENV:actor"))
+            || (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENV:role")))
+      { if ((!soap->actor || strcmp(soap->actor, tp->value))
+         && strcmp(tp->value, "http://schemas.xmlsoap.org/soap/actor/next")
+         && strcmp(tp->value, "http://www.w3.org/2003/05/soap-envelope/role/next"))
+          soap->other = 1;
+      }
+      else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:mustUnderstand")
+            && (!strcmp(tp->value, "1") || !strcmp(tp->value, "true")))
+        soap->mustUnderstand = 1;
+      else if ((!soap_match_tag(soap, tp->name, "xsi:null")
+             || !soap_match_tag(soap, tp->name, "xsi:nil"))
+            && (!strcmp(tp->value, "1")
+             || !strcmp(tp->value, "true")))
+        soap->null = 1;
+    }
+  }
+  return soap->error = SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_retry(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_revert(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_revert(struct soap *soap)
+{ if (!soap->peeked)
+  { soap->peeked = 1;
+    if (soap->body)
+      soap->level--;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reverting last element (level=%u)\n", soap->level));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_string_out(struct soap *soap, const char *s, int flag)
+{ register const char *t;
+  register soap_wchar c;
+  register soap_wchar mask = 0xFFFFFF80UL;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_strdup(soap, s);
+    return SOAP_OK;
+  }
+#endif
+  if (soap->mode & SOAP_C_UTFSTRING)
+    mask = 0;
+  t = s;
+  while ((c = *t++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#x9;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xA;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 13:
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xD;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '&':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&amp;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '<':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&lt;", 4))
+        return soap->error;
+      s = t;
+      break;
+    case '>':
+      if (!flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&gt;", 4))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case '"':
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&quot;", 6))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    default:
+#ifndef WITH_LEANER
+#ifdef HAVE_MBTOWC
+      if (soap->mode & SOAP_C_MBSTRING)
+      { wchar_t wc;
+        register int m = mbtowc(&wc, t - 1, MB_CUR_MAX);
+        if (m > 0 && wc != c)
+        { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, wc))
+            return soap->error;
+	  s = t += m - 1;
+	  continue;
+        }
+      }
+#endif
+#endif
+      if (c & mask)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, (unsigned char)c))
+          return soap->error;
+        s = t;
+      }
+    }
+  }
+  return soap_send_raw(soap, s, t - s - 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_string_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ register char *s;
+  char *t = NULL;
+  register size_t i;
+  register long l = 0;
+  register int n = 0;
+  register int m = 0;
+  register soap_wchar c;
+#if !defined(WITH_LEANER) && defined(HAVE_WCTOMB)
+  char buf[MB_LEN_MAX > 8 ? MB_LEN_MAX : 8];
+#else
+  char buf[8];
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+#ifndef WITH_LEAN
+      t = soap->tmpbuf;
+      t[0] = '<';
+      strncpy(t + 1, soap->tag, sizeof(soap->tmpbuf) - 1);
+      strncat(t, ">", sizeof(soap->tmpbuf));
+      m = strlen(soap->tag) + 2;
+#endif
+    }
+  }
+#ifdef WITH_CDATA
+  if (!flag)
+  { register int state = 0;
+#ifdef WITH_FAST
+    soap->labidx = 0;			/* use look-aside buffer */
+#else
+    if (soap_new_block(soap))
+      return NULL;
+#endif
+    for (;;)
+    { 
+#ifdef WITH_FAST
+      register size_t k;
+      if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+        return NULL;
+      s = soap->labbuf + soap->labidx;	/* space to populate */
+      k = soap->lablen - soap->labidx;	/* number of bytes available */
+      soap->labidx = soap->lablen;	/* claim this space */
+#else
+      register size_t k = SOAP_BLKLEN;
+      if (!(s = (char*)soap_push_block(soap, k)))
+        return NULL;
+#endif
+      for (i = 0; i < k; i++)
+      { if (m > 0)
+        { *s++ = *t++;	/* copy multibyte characters */
+	  m--;
+          continue;
+        }
+        c = soap_getchar(soap);
+	if ((int)c == EOF)
+          goto end;
+        if (c >= 0x80 && !(soap->mode & SOAP_ENC_LATIN))
+        { soap_unget(soap, c);
+	  c = soap_getutf8(soap);
+	  if (soap->mode & SOAP_C_UTFSTRING)
+          { if ((c & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+            { c &= 0x7FFFFFFF;
+              t = buf;
+              if (c < 0x0800)
+                *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+              else
+              { if (c < 0x010000)
+                  *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+                else
+                { if (c < 0x200000)
+                    *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+                  else
+                  { if (c < 0x04000000)
+                      *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                    else
+                    { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                      *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                    }
+                    *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+                  }     
+                  *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+              }
+              *t++ = (char)(0x80 | (c & 0x3F));
+	      m = (int)(t - buf) - 1;
+              t = buf;
+              *s++ = *t++;
+              continue;
+	    }
+          }
+        }
+	switch (state)
+        { case 1:
+            if (c == ']')
+	      state = 4;
+	    *s++ = c;
+	    continue;
+	  case 2:
+	    if (c == '-')
+              state = 6;
+	    *s++ = c;
+	    continue;
+	  case 3:
+	    if (c == '?')
+	      state = 8;
+	    *s++ = c;
+	    continue;
+          /* CDATA */
+	  case 4:
+	    if (c == ']')
+              state = 5;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+	  case 5:
+	    if (c == '>')
+	      state = 0;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+          /* comment */
+          case 6:
+            if (c == '-')
+	      state = 7;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          case 7:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          /* PI */
+	  case 8:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 3;
+	    *s++ = c;
+	    continue;
+        }
+        switch (c)
+        {
+        case '/':
+          if (n > 0)
+          { c = soap_getchar(soap);
+            if (c == '>')
+              n--;
+            soap_unget(soap, c);
+          }
+          *s++ = '/';
+          break;
+        case '<':
+	  c = soap_getchar(soap);
+	  if (c == '/')
+	  { if (n == 0)
+	    { c = SOAP_TT;
+	      goto end;
+	    }
+	    n--;
+	  }
+	  else if (c == '!')
+	  { c = soap_getchar(soap);
+	    if (c == '[')
+            { do c = soap_getchar(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                 goto end;
+	      t = (char*)"![CDATA[";
+	      m = 8;
+	      state = 1;
+	    }
+            else if (c == '-')
+	    { if ((c = soap_getchar(soap)) == '-')
+	        state = 2;
+	      t = (char*)"!-";
+	      m = 2;
+	      soap_unget(soap, c);
+	    }
+	    else
+	    { t = (char*)"!";
+	      m = 1;
+	      soap_unget(soap, c);
+	    }
+	    *s++ = '<';
+	    break;
+	  }
+	  else if (c == '?')
+	    state = 3;
+	  else
+	    n++;
+          soap_unget(soap, c);
+          *s++ = '<';
+          break;
+        case '>':
+          *s++ = '>';
+          break;
+        case '"':
+          *s++ = '"';
+          break;
+        default:
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+          if (soap->mode & SOAP_C_MBSTRING)
+          { m = wctomb(buf, c & 0x7FFFFFFF);
+            if (m >= 1 && m <= (int)MB_CUR_MAX)
+            { t = buf;
+              *s++ = *t++;
+              m--;
+            }
+            else
+            { *s++ = SOAP_UNKNOWN_CHAR;
+	      m = 0;
+	    }
+          }
+          else
+#endif
+#endif
+            *s++ = (char)(c & 0xFF);
+        }
+	l++;
+        if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+        { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+          soap->error = SOAP_LENGTH;
+          return NULL;
+        }
+      }
+    }
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;			/* use look-aside buffer */
+#else
+  if (soap_new_block(soap))
+    return NULL;
+#endif
+  for (;;)
+  { 
+#ifdef WITH_FAST
+    register size_t k;
+    if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+      return NULL;
+    s = soap->labbuf + soap->labidx;	/* space to populate */
+    k = soap->lablen - soap->labidx;	/* number of bytes available */
+    soap->labidx = soap->lablen;	/* claim this space */
+#else
+    register size_t k = SOAP_BLKLEN;
+    if (!(s = (char*)soap_push_block(soap, k)))
+      return NULL;
+#endif
+    for (i = 0; i < k; i++)
+    { if (m > 0)
+      { *s++ = *t++;	/* copy multibyte characters */
+        m--;
+        continue;
+      }
+      if (soap->mode & SOAP_C_UTFSTRING)
+      { if (((c = soap_get(soap)) & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+        { c &= 0x7FFFFFFF;
+          t = buf;
+          if (c < 0x0800)
+            *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+          else
+          { if (c < 0x010000)
+              *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+            else
+            { if (c < 0x200000)
+                *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+              else
+              { if (c < 0x04000000)
+                  *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                else
+                { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                  *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+              }     
+              *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+            }
+            *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+          }
+          *t++ = (char)(0x80 | (c & 0x3F));
+	  m = (int)(t - buf) - 1;
+          t = buf;
+          *s++ = *t++;
+          continue;
+        }
+      }
+      else
+        c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        t = (char*)"/";
+	m = 1;
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_get(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<' | 0x80000000:
+        if (flag)
+          *s++ = '<';
+        else
+        { *s++ = '&';
+          t = (char*)"lt;";
+	  m = 3;
+        }
+        break;
+      case '>' | 0x80000000:
+        if (flag)
+          *s++ = '>';
+        else
+        { *s++ = '&';
+          t = (char*)"gt;";
+	  m = 3;
+        }
+        break;
+      case '&' | 0x80000000:
+        if (flag)
+          *s++ = '&';
+        else
+        { *s++ = '&';
+          t = (char*)"amp;";
+	  m = 4;
+        }
+        break;
+      case '"' | 0x80000000:
+        if (flag)
+          *s++ = '"';
+        else
+        { *s++ = '&';
+          t = (char*)"quot;";
+	  m = 5;
+        }
+        break;
+      case '\'' | 0x80000000:
+        if (flag)
+          *s++ = '\'';
+        else
+        { *s++ = '&';
+          t = (char*)"apos;";
+	  m = 5;
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+        if (soap->mode & SOAP_C_MBSTRING)
+        { m = wctomb(buf, c & 0x7FFFFFFF);
+          if (m >= 1 && m <= (int)MB_CUR_MAX)
+          { t = buf;
+            *s++ = *t++;
+            m--;
+          }
+          else
+          { *s++ = SOAP_UNKNOWN_CHAR;
+	    m = 0;
+	  }
+        }
+        else
+#endif
+#endif
+          *s++ = (char)(c & 0xFF);
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+#ifdef WITH_FAST
+  t = soap_strdup(soap, soap->labbuf);
+#else
+  soap_size_block(soap, i+1);
+  t = soap_save_block(soap, NULL, 0);
+#endif
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (flag == 3)
+      soap->dom->tail = t;
+    else
+      soap->dom->data = t;
+  }
+#endif
+  if (flag == 2)
+    if (soap_s2QName(soap, t, &t))
+      return NULL;
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_wstring_out(struct soap *soap, const wchar_t *s, int flag)
+{ const char *t;
+  char tmp;
+  register soap_wchar c;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { wchar_t *r = (wchar_t*)s;
+    int n = 1;
+    while (*r++)
+      n++;
+    soap->dom->wide = r = (wchar_t*)soap_malloc(soap, n * sizeof(wchar_t));
+    while (n--)
+      *r++ = *s++;
+    return SOAP_OK;
+  }
+#endif
+  while ((c = *s++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+        t = "&#x9;";
+      else
+        t = "\t";
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+        t = "&#xA;";
+      else
+        t = "\n";
+      break;
+    case 13:
+      t = "&#xD;";
+      break;
+    case '&':
+      t = "&amp;";
+      break;
+    case '<':
+      t = "&lt;";
+      break;
+    case '>':
+      if (flag)
+        t = ">";
+      else
+	t = "&gt;";
+      break;
+    case '"':
+      if (flag)
+        t = "&quot;";
+      else
+        t = "\"";
+      break;
+    default:
+      if (c > 0 && c < 0x80)
+      { tmp = (char)c;
+        if (soap_send_raw(soap, &tmp, 1))
+          return soap->error;
+      }
+      else if (soap_pututf8(soap, (unsigned long)c))
+        return soap->error;
+      continue;
+    }
+    if (soap_send(soap, t))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t *
+SOAP_FMAC2
+soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ wchar_t *s;
+  register int i, n = 0;
+  register long l = 0;
+  register soap_wchar c;
+  const char *t = NULL;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading wide string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+    }
+  }
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { if (!(s = (wchar_t*)soap_push_block(soap, sizeof(wchar_t)*SOAP_BLKLEN)))
+      return NULL;
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { if (t)
+      { *s++ = (wchar_t)*t++;
+        if (!*t)
+          t = NULL;
+        continue;
+      }
+      c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        soap_unget(soap, '/');
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_getutf8(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<':
+        if (flag)
+          *s++ = (soap_wchar)'<';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "lt;";
+        }
+        break;
+      case '>':
+        if (flag)
+          *s++ = (soap_wchar)'>';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "gt;";
+        }
+        break;
+      case '"':
+        if (flag)
+          *s++ = (soap_wchar)'"';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "quot;";
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+        *s++ = (wchar_t)c & 0x7FFFFFFF;
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+  soap_size_block(soap, sizeof(wchar_t) * (i + 1));
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+  s = (wchar_t*)soap_save_block(soap, NULL, 0);
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->wide = s;
+#endif
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_int2s(struct soap *soap, int n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outint(struct soap *soap, const char *tag, int id, const int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2int(struct soap *soap, const char *s, int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (int)soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int *
+SOAP_FMAC2
+soap_inint(struct soap *soap, const char *tag, int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (int*)soap_id_enter(soap, soap->id, p, t, sizeof(int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(int), 0, NULL);
+  else if (p)
+  { if (soap_s2int(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_long2s(struct soap *soap, long n)
+{ sprintf(soap->tmpbuf, "%ld", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outlong(struct soap *soap, const char *tag, int id, const long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2long(struct soap *soap, const char *s, long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+long *
+SOAP_FMAC2
+soap_inlong(struct soap *soap, const char *tag, long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (long*)soap_id_enter(soap, soap->id, p, t, sizeof(long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(long), 0, NULL);
+  else if (p)
+  { if (soap_s2long(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_LONG642s(struct soap *soap, LONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_LONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outLONG64(struct soap *soap, const char *tag, int id, const LONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_LONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2LONG64(struct soap *soap, const char *s, LONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOLL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoll(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_LONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+LONG64 *
+SOAP_FMAC2
+soap_inLONG64(struct soap *soap, const char *tag, LONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (LONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(LONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (LONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(LONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2LONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_byte2s(struct soap *soap, char n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outbyte(struct soap *soap, const char *tag, int id, const char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2byte(struct soap *soap, const char *s, char *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -128 || n > 127)
+      soap->error = SOAP_TYPE;
+    *p = (char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_inbyte(struct soap *soap, const char *tag, char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (char*)soap_id_enter(soap, soap->id, p, t, sizeof(char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(char), 0, NULL);
+  else if (p)
+  { if (soap_s2byte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_short2s(struct soap *soap, short n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outshort(struct soap *soap, const char *tag, int id, const short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2short(struct soap *soap, const char *s, short *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -32768 || n > 32767)
+      soap->error = SOAP_TYPE;
+    *p = (short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+short *
+SOAP_FMAC2
+soap_inshort(struct soap *soap, const char *tag, short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (short*)soap_id_enter(soap, soap->id, p, t, sizeof(short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(short), 0, NULL);
+  else if (p)
+  { if (soap_s2short(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_float2s(struct soap *soap, float n)
+{ const char *s;
+  if (soap_isnan((double)n))
+    s = "NaN";
+  else if (soap_ispinff(n))
+    s = "INF";
+  else if (soap_isninff(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->float_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outfloat(struct soap *soap, const char *tag, int id, const float *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_float2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2float(struct soap *soap, const char *s, float *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = FLT_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = FLT_NAN;
+    else
+    {
+/* On some systems, strtof appears to be broken or doesn't link: use with caution */
+#if defined(HAVE_STRTOF)
+      char *r;
+      *p = strtof((char*)s, &r);
+      if (*r)
+#elif defined(HAVE_STRTOD)
+      char *r;
+      *p = (float)strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%g", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static int soap_isnumeric(struct soap *soap, const char *type)
+{ if (soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":float")
+   && soap_match_tag(soap, soap->type, ":double")
+   && soap_match_tag(soap, soap->type, ":decimal")
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return SOAP_ERR;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+float *
+SOAP_FMAC2
+soap_infloat(struct soap *soap, const char *tag, float *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (float*)soap_id_enter(soap, soap->id, p, t, sizeof(float), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (float*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(float), 0, NULL);
+  else if (p)
+  { if (soap_s2float(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_double2s(struct soap *soap, double n)
+{ const char *s;
+  if (soap_isnan(n))
+    s = "NaN";
+  else if (soap_ispinfd(n))
+    s = "INF";
+  else if (soap_isninfd(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->double_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdouble(struct soap *soap, const char *tag, int id, const double *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_double2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2double(struct soap *soap, const char *s, double *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = DBL_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = DBL_NAN;
+    else
+    {
+#ifdef HAVE_STRTOD
+      char *r;
+      *p = strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%lg", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+double *
+SOAP_FMAC2
+soap_indouble(struct soap *soap, const char *tag, double *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (double*)soap_id_enter(soap, soap->id, p, t, sizeof(double), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (double*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(double), 0, NULL);
+  else if (p)
+  { if (soap_s2double(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedByte2s(struct soap *soap, unsigned char n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedByte(struct soap *soap, const char *tag, int id, const unsigned char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedByte(struct soap *soap, const char *s, unsigned char *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 255)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned char *
+SOAP_FMAC2
+soap_inunsignedByte(struct soap *soap, const char *tag, unsigned char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned char*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned char), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedByte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedShort2s(struct soap *soap, unsigned short n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedShort(struct soap *soap, const char *tag, int id, const unsigned short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedShort(struct soap *soap, const char *s, unsigned short *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 65535)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned short *
+SOAP_FMAC2
+soap_inunsignedShort(struct soap *soap, const char *tag, unsigned short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned short*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned short), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedShort(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedInt2s(struct soap *soap, unsigned int n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedInt(struct soap *soap, const char *tag, int id, const unsigned int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedInt(struct soap *soap, const char *s, unsigned int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (unsigned int)soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned int *
+SOAP_FMAC2
+soap_inunsignedInt(struct soap *soap, const char *tag, unsigned int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned int*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned int), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedInt(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedLong2s(struct soap *soap, unsigned long n)
+{ sprintf(soap->tmpbuf, "%lu", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedLong(struct soap *soap, const char *tag, int id, const unsigned long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedLong(struct soap *soap, const char *s, unsigned long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned long *
+SOAP_FMAC2
+soap_inunsignedLong(struct soap *soap, const char *tag, unsigned long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned long*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned long), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedLong(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_ULONG642s(struct soap *soap, ULONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_ULONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outULONG64(struct soap *soap, const char *tag, int id, const ULONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_ULONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2ULONG64(struct soap *soap, const char *s, ULONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOULL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoull(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_ULONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+ULONG64 *
+SOAP_FMAC2
+soap_inULONG64(struct soap *soap, const char *tag, ULONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (ULONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(ULONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (ULONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(ULONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2ULONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2string(struct soap *soap, const char *s, char **t)
+{ *t = NULL;
+  if (s)
+  { if (!(*t = soap_strdup(soap, s)))
+      return soap->error = SOAP_EOM;
+    if (!(soap->mode & (SOAP_ENC_LATIN | SOAP_C_UTFSTRING)))
+    { /* TODO: consider truncating UTF8 to ASCII for regular XML attribute strings? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2QName(struct soap *soap, const char *s, char **t)
+{ if (s)
+  { struct soap_nlist *np;
+    const char *p;
+    if (!strncmp(s, "xml:", 4))
+    { *t = soap_strdup(soap, s);
+      return SOAP_OK;
+    }
+    np = soap->nlist;
+    p = strchr(s, ':');
+    if (p)
+    { register int n = p - s;
+      while (np && (strncmp(np->id, s, n) || np->id[n]))
+        np = np->next;
+      p++;
+    }
+    else
+    { while (np && *np->id)
+        np = np->next;
+      p = s;
+    }
+    if (np)
+    { if (np->index >= 0 && soap->local_namespaces)
+      { register const char *q = soap->local_namespaces[np->index].id;
+        if (q)
+        { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(q) + 2)))
+            sprintf(*t, "%s:%s", q, p);
+          return SOAP_OK;
+        }
+      }
+      if (np->ns)
+      { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(np->ns) + 4)))
+          sprintf(*t, "\"%s\":%s", np->ns, p);
+        return SOAP_OK;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined (index=%d, URI=%s)\n", s, np->index, np->ns?np->ns:""));
+      return soap->error = SOAP_NAMESPACE; 
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined, assuming empty namespace\n", s));
+    if ((*t = (char*)soap_malloc(soap, strlen(p) + 4)))
+      sprintf(*t, "\"\":%s", p);
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_QName2s(struct soap *soap, const char *s)
+{ struct Namespace *p;
+  char *t;
+  int n;
+  if (!s || *s != '"')
+  {
+#ifndef WITH_LEAN
+    if (s && (soap->mode & SOAP_XML_CANONICAL))
+    { t = (char*)strchr(s, ':');
+      if (t)
+        soap_utilize_ns(soap, s, t - s);
+    }
+#endif
+    return s;
+  }
+  s++;
+  if ((p = soap->local_namespaces))
+  { for (; p->id; p++)
+    { if (p->ns)
+        if (!soap_tag_cmp(s, p->ns))
+          break;
+      if (p->in)
+        if (!soap_tag_cmp(s, p->in))
+          break;
+    }
+    if (p && p->id)
+    { s = strchr(s, '"');
+      if (s)
+      { t = (char*)soap_malloc(soap, strlen(p->id) + strlen(s));
+        strcpy(t, p->id);
+	strcat(t, s + 1);
+        return t;
+      }
+    }
+  }
+  t = (char*)strchr(s, '"');
+  if (t)
+    n = t - s;
+  else
+    n = 0;
+  t = soap_strdup(soap, s);
+  t[n] = '\0';
+  sprintf(soap->tmpbuf, "xmlns:_%d", soap->idnum++);
+  soap_set_attr(soap, soap->tmpbuf, t);
+  s = strchr(s, '"');
+  if (s)
+  { t = (char*)soap_malloc(soap, strlen(soap->tmpbuf) + strlen(s) - 6);
+    strcpy(t, soap->tmpbuf + 6);
+    strcat(t, s + 1);
+  }
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2wchar(struct soap *soap, const char *s, wchar_t **t)
+{ wchar_t *r;
+  if (!s)
+    *t = NULL;
+  else
+  { *t = r = (wchar_t*)soap_malloc(soap, sizeof(wchar_t) * (strlen(s) + 1));
+    if (!r)
+      return soap->error;
+    if (soap->mode & SOAP_ENC_LATIN)
+    { while (*s)
+        *r++ = (wchar_t)*s++;
+    }
+    else
+    { /* Convert UTF8 to wchar */
+      while (*s)
+      { register soap_wchar c, c1, c2, c3, c4;
+        c = *s++;
+        if (c < 0x80)
+	  *r++ = (wchar_t)c;
+	else
+        { c1 = (soap_wchar)*s++ & 0x3F;
+          if (c < 0xE0)
+            *r++ = (wchar_t)(((soap_wchar)(c & 0x1F) << 6) | c1);
+          else
+	  { c2 = (soap_wchar)*s++ & 0x3F;
+            if (c < 0xF0)
+              *r++ = (wchar_t)(((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2);
+            else
+	    { c3 = (soap_wchar)*s++ & 0x3F;
+              if (c < 0xF8)
+                *r++ = (wchar_t)(((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3);
+              else
+	      { c4 = (soap_wchar)*s++ & 0x3F;
+                if (c < 0xFC)
+                  *r++ = (wchar_t)(((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4);
+                else
+		  *r++ = (wchar_t)(((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(*s++ & 0x3F));
+              }
+            }
+          }
+        }
+      }
+    }
+    *r = L'\0';
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_wchar2s(struct soap *soap, const wchar_t *s)
+{ register soap_wchar c;
+  register char *r, *t;
+  const wchar_t *q = s;
+  size_t n = 0;
+  while ((c = *q++))
+  { if (c > 0 && c < 0x80)
+      n++;
+    else
+      n += 6;
+  }
+  r = t = (char*)soap_malloc(soap, n + 1);
+  if (r)
+  { /* Convert wchar to UTF8 */
+    while ((c = *s++))
+    { if (c > 0 && c < 0x80)
+        *t++ = (char)c;
+      else
+      { if (c < 0x0800)
+          *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+        else
+        { if (c < 0x010000)
+            *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+          else
+          { if (c < 0x200000)
+              *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+            else
+            { if (c < 0x04000000)
+                *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+              else
+              { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+              }
+              *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+            }     
+            *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+        }
+        *t++ = (char)(0x80 | (c & 0x3F));
+      }
+    }
+    *t = '\0';
+  }
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outstring(struct soap *soap, const char *tag, int id, char *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_string_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_instring(struct soap *soap, const char *tag, char **p, const char *type, int t, int flag, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_string_in(soap, flag, minlen, maxlen);
+    if (!*p || !(char*)soap_id_enter(soap, soap->id, *p, t, sizeof(char*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (char**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(char**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwstring(struct soap *soap, const char *tag, int id, wchar_t *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_wstring_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type, int t, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_wstring_in(soap, 1, minlen, maxlen);
+    if (!*p || !(wchar_t*)soap_id_enter(soap, soap->id, *p, t, sizeof(wchar_t*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (wchar_t**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(wchar_t**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static time_t
+soap_timegm(struct tm *T)
+{
+#if defined(HAVE_TIMEGM)
+  return timegm(T);
+#else
+  time_t t, g, z;
+#ifdef HAVE_GMTIME_R
+  struct tm tm, *tmp = &tm;
+#else
+  struct tm *tmp;
+#endif
+  t = mktime(T);
+  if (t == -1)
+    return -1;
+#ifdef HAVE_GMTIME_R
+  gmtime_r(&t, tmp);
+#else
+  tmp = gmtime(&t);
+#endif
+  tmp->tm_isdst = 0;
+  g = mktime(tmp);
+  if (g == -1)
+    return -1;
+  z = g - t;
+  return t - z;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_dateTime2s(struct soap *soap, time_t n)
+{ struct tm T, *pT = &T;
+#if defined(HAVE_GMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PGMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_PGMTIME)
+  if (gmtime(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GMTIME)
+  if ((pT = gmtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GETTIMEOFDAY)
+  struct timezone tz;
+  memset((void*)&tz, 0, sizeof(tz));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+#endif
+#elif defined(HAVE_FTIME)
+  struct timeb t;
+  memset((void*)&t, 0, sizeof(t));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+  /* The following defines were added for VxWorks*/
+# elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf+strlen(soap->tmpbuf), "%+03d:%02d", t.timezone/60, abs(t.timezone)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+# endif
+#elif defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#else
+  if ((pT = localtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#endif
+  else
+    strcpy(soap->tmpbuf, "1969-12-31T23:59:59Z");
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdateTime(struct soap *soap, const char *tag, int id, const time_t *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_dateTime2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2dateTime(struct soap *soap, const char *s, time_t *p)
+{ if (s)
+  { struct tm T;
+    char zone[16];
+    const char *t;
+    memset((void*)&T, 0, sizeof(T));
+    zone[sizeof(zone)-1] = '\0';
+    if (strchr(s, '-'))
+      t = "%d-%d-%dT%d:%d:%d%15s";
+    else if (strchr(s, ':'))
+      t = "%4d%2d%2dT%d:%d:%d%15s";
+    else /* parse non-XSD-standard alternative ISO 8601 format */
+      t = "%4d%2d%2dT%2d%2d%2d%15s";
+    sscanf(s, t, &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, zone);
+    if (T.tm_year == 1)
+      T.tm_year = 70;
+    else
+      T.tm_year -= 1900;
+    T.tm_mon--;
+    if (*zone)
+    { if (*zone == '.')
+      { for (s = zone + 1; *s; s++)
+          if (*s < '0' || *s > '9')
+            break;
+      }
+      else
+        s = zone;
+      if (*s == '+' || *s == '-')
+      { int h = 0, m = 0;
+        if (s[3] == ':')
+	{ sscanf(s, "%d:%d", &h, &m);
+	  if (h < 0)
+	    m = -m;
+	}
+	else
+	{ m = (int)atol(s);
+	  h = m / 100;
+	  m = m % 100;
+	}
+        T.tm_hour -= h;
+        T.tm_min -= m;
+      }
+      T.tm_isdst = 0;
+      *p = soap_timegm(&T);
+    }
+    else
+    { T.tm_isdst = -1;
+      *p = mktime(&T); /* no time zone: suppose it is localtime? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+time_t *
+SOAP_FMAC2
+soap_indateTime(struct soap *soap, const char *tag, time_t *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":dateTime"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (time_t*)soap_id_enter(soap, soap->id, p, t, sizeof(time_t), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (time_t*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(time_t), 0, NULL);
+  else if (p)
+  { if (soap_s2dateTime(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outliteral(struct soap *soap, const char *tag, char *const*p)
+{ int i;
+  const char *t = NULL;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p && *p)
+  { if (soap_send(soap, *p))
+      return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_inliteral(struct soap *soap, const char *tag, char **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_string_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwliteral(struct soap *soap, const char *tag, wchar_t *const*p)
+{ int i;
+  const char *t = NULL;
+  wchar_t c;
+  const wchar_t *s;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p)
+  { s = *p;
+    while ((c = *s++))
+      if (soap_pututf8(soap, (unsigned char)c))
+        return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwliteral(struct soap *soap, const char *tag, wchar_t **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_wstring_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_token(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF || soap_blank(c))
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_value(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  for (s--; i > 0; i--, s--)
+    if (!soap_blank(*s))
+      break;
+  s[1] = '\0';
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->data = soap_strdup(soap, soap->tmpbuf);
+#endif
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEANER) || !defined(WITH_NOHTTP)
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getline(struct soap *soap, char *s, int len)
+{ int i = len;
+  soap_wchar c = 0;
+  for (;;)
+  { while (--i > 0)
+    { c = soap_getchar(soap);
+      if (c == '\r' || c == '\n')
+        break;
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+    if (c != '\n')
+      c = soap_getchar(soap); /* got \r, now get \n */
+    if (c == '\n')
+    { *s = '\0';
+      if (i+1 == len) /* empty line: end of HTTP/MIME header */
+        break;
+      c = soap_unget(soap, soap_getchar(soap));
+      if (c != ' ' && c != '\t') /* HTTP line continuation? */
+        break;
+    }
+    else if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static size_t
+soap_count_attachments(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  register struct soap_multipart *content;
+  register size_t count = soap->count;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the message size with attachments, current count=%lu\n", (unsigned long)count));
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of DIME attachments\n"));
+    for (content = soap->dime.first; content; content = content->next)
+    { count += 12 + ((content->size+3)&(~3));
+      if (content->id)
+        count += ((strlen(content->id)+3)&(~3));
+      if (content->type)
+        count += ((strlen(content->type)+3)&(~3));
+      if (content->options)
+        count += ((((unsigned char)content->options[2] << 8) | ((unsigned char)content->options[3]))+7)&(~3);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of DIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary)
+  { register size_t n = strlen(soap->mime.boundary);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of MIME attachments\n"));
+    for (content = soap->mime.first; content; content = content->next)
+    { register const char *s;
+      /* count \r\n--boundary\r\n */
+      count += 6 + n;
+      /* count Content-Type: ...\r\n */
+      if (content->type)
+        count += 16 + strlen(content->type);
+      /* count Content-Transfer-Encoding: ...\r\n */
+      s = soap_str_code(mime_codes, content->encoding);
+      if (s)
+        count += 29 + strlen(s);
+      /* count Content-ID: ...\r\n */
+      if (content->id)
+        count += 14 + strlen(content->id);
+      /* count Content-Location: ...\r\n */
+      if (content->location)
+        count += 20 + strlen(content->location);
+      /* count Content-Description: ...\r\n */
+      if (content->description)
+        count += 23 + strlen(content->location);
+      /* count \r\n...content */
+      count += 2 + content->size;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of MIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+    /* count \r\n--boundary-- */
+    count += 6 + n;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New count is %lu bytes\n", (unsigned long)count));
+  return count;
+#else
+  return soap->count;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_putdimefield(struct soap *soap, const char *s, size_t n)
+{ if (soap_send_raw(soap, s, n))
+    return soap->error;
+  return soap_send_raw(soap, SOAP_STR_PADDING, -(long)n&3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_dime_option(struct soap *soap, unsigned short optype, const char *option)
+{ size_t n;
+  char *s = NULL;
+  if (option)
+  { n = strlen(option);
+    s = (char*)soap_malloc(soap, n + 5);
+    if (s)
+    { s[0] = optype >> 8;
+      s[1] = optype & 0xFF;
+      s[2] = n >> 8;
+      s[3] = n & 0xFF;
+      strcpy(s + 4, option);
+    }
+  }
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdimehdr(struct soap *soap)
+{ unsigned char tmp[12];
+  size_t optlen = 0, idlen = 0, typelen = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Put DIME header id='%s'\n", soap->dime.id?soap->dime.id:""));
+  if (soap->dime.options)
+    optlen = (((unsigned char)soap->dime.options[2] << 8) | ((unsigned char)soap->dime.options[3])) + 4;
+  if (soap->dime.id)
+    idlen = strlen(soap->dime.id);
+  if (soap->dime.type)
+    typelen = strlen(soap->dime.type);
+  tmp[0] = SOAP_DIME_VERSION | (soap->dime.flags & 0x7);
+  tmp[1] = soap->dime.flags & 0xF0;
+  tmp[2] = optlen >> 8;
+  tmp[3] = optlen & 0xFF;
+  tmp[4] = idlen >> 8;
+  tmp[5] = idlen & 0xFF;
+  tmp[6] = typelen >> 8;
+  tmp[7] = typelen & 0xFF;
+  tmp[8] = soap->dime.size >> 24;
+  tmp[9] = (soap->dime.size >> 16) & 0xFF;
+  tmp[10] = (soap->dime.size >> 8) & 0xFF;
+  tmp[11] = soap->dime.size & 0xFF;
+  if (soap_send_raw(soap, (char*)tmp, 12)
+   || soap_putdimefield(soap, soap->dime.options, optlen)
+   || soap_putdimefield(soap, soap->dime.id, idlen)
+   || soap_putdimefield(soap, soap->dime.type, typelen))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return SOAP_OK;
+  for (content = soap->dime.first; content; content = content->next)
+  { void *handle;
+    soap->dime.size = content->size;
+    soap->dime.id = content->id;
+    soap->dime.type = content->type;
+    soap->dime.options = content->options;
+    soap->dime.flags = SOAP_DIME_VERSION | SOAP_DIME_MEDIA;
+    if (soap->fdimereadopen && ((handle = soap->fdimereadopen(soap, (void*)content->ptr, content->id, content->type, content->options)) || soap->error))
+    { size_t size = content->size;
+      if (!handle)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadopen failed\n"));
+        return soap->error;
+      }
+      if (!content->size && ((soap->mode & SOAP_ENC_XML) || (soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_IO) == SOAP_IO_STORE))
+      { size_t chunksize = sizeof(soap->tmpbuf);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked streaming DIME\n"));
+        do 
+        { size = soap->fdimeread(soap, handle, soap->tmpbuf, chunksize);
+          DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread returned %lu bytes\n", (unsigned long)size));
+          if (size < chunksize)
+ 	  { soap->dime.flags &= ~SOAP_DIME_CF;
+            if (!content->next)
+              soap->dime.flags |= SOAP_DIME_ME;
+	  }
+          else
+            soap->dime.flags |= SOAP_DIME_CF;
+	  soap->dime.size = size;
+          if (soap_putdimehdr(soap)
+	   || soap_putdimefield(soap, soap->tmpbuf, size))
+            break;
+          if (soap->dime.id)
+ 	  { soap->dime.flags &= ~(SOAP_DIME_MB | SOAP_DIME_MEDIA);
+            soap->dime.id = NULL;
+            soap->dime.type = NULL;
+            soap->dime.options = NULL;
+          }  
+        } while (size >= chunksize);
+      }
+      else
+      { if (!content->next)
+          soap->dime.flags |= SOAP_DIME_ME;
+        if (soap_putdimehdr(soap))
+          return soap->error;
+        do
+        { size_t bufsize;
+	  if (size < sizeof(soap->tmpbuf))
+            bufsize = size;
+          else
+            bufsize = sizeof(soap->tmpbuf);
+          if (!(bufsize = soap->fdimeread(soap, handle, soap->tmpbuf, bufsize)))
+          { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread failed: insufficient data (%lu bytes remaining from %lu bytes)\n", (unsigned long)size, (unsigned long)soap->dime.size));
+            soap->error = SOAP_EOF;
+	    break;
+          }
+          if (soap_send_raw(soap, soap->tmpbuf, bufsize))
+            break;
+          size -= bufsize;
+        } while (size);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+        soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+      if (soap->fdimereadclose)
+        soap->fdimereadclose(soap, handle);
+    }
+    else
+    { if (!content->next)
+        soap->dime.flags |= SOAP_DIME_ME;
+      if (soap_putdimehdr(soap)
+       || soap_putdimefield(soap, (char*)content->ptr, content->size))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static char *
+soap_getdimefield(struct soap *soap, size_t n)
+{ register soap_wchar c;
+  register int i;
+  register char *s;
+  char *p = NULL;
+  if (n)
+  { p = (char*)soap_malloc(soap, n + 1);
+    if (p)
+    { s = p;
+      for (i = n; i > 0; i--)
+      { if ((int)(c = soap_get1(soap)) == EOF)
+        { soap->error = SOAP_EOF;
+          return NULL;
+        }
+        *s++ = (char)c;
+      }
+      *s = '\0';
+      if ((soap->error = soap_move(soap, -(long)n&3)))
+        return NULL;
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdimehdr(struct soap *soap)
+{ register soap_wchar c;
+  register char *s;
+  register int i;
+  unsigned char tmp[12];
+  size_t optlen, idlen, typelen;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return soap->error = SOAP_DIME_END;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME header\n"));
+  if (soap->dime.buflen || soap->dime.chunksize)
+  { if (soap_move(soap, (long)(soap->dime.size - soap_tell(soap))))
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, soap_getchar(soap)); /* skip padding and get hdr */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... From chunked\n"));
+    return SOAP_OK;
+  }
+  s = (char*)tmp;
+  for (i = 12; i > 0; i--)
+  { if ((int)(c = soap_getchar(soap)) == EOF)
+      return soap->error = SOAP_EOF;
+    *s++ = (char)c;
+  }
+  if ((tmp[0] & 0xF8) != SOAP_DIME_VERSION)
+    return soap->error = SOAP_DIME_MISMATCH;
+  soap->dime.flags = (tmp[0] & 0x7) | (tmp[1] & 0xF0);
+  optlen = (tmp[2] << 8) | tmp[3];
+  idlen = (tmp[4] << 8) | tmp[5];
+  typelen = (tmp[6] << 8) | tmp[7];
+  soap->dime.size = (tmp[8] << 24) | (tmp[9] << 16) | (tmp[10] << 8) | tmp[11];
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME size=%lu flags=0x%X\n", (unsigned long)soap->dime.size, soap->dime.flags));
+  if (!(soap->dime.options = soap_getdimefield(soap, optlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.id = soap_getdimefield(soap, idlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.type = soap_getdimefield(soap, typelen)) && soap->error)
+    return soap->error;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME id=%s, type=%s, options=%s\n", soap->dime.id?soap->dime.id:"", soap->dime.type?soap->dime.type:"", soap->dime.options?soap->dime.options+4:""));
+  if (soap->dime.flags & SOAP_DIME_ME)
+    soap->mode &= ~SOAP_ENC_DIME;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdime(struct soap *soap)
+{ while (soap->dime.flags & SOAP_DIME_CF)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap_move(soap, soap->dime.size))
+      return soap->error = SOAP_EOF;
+  }
+  if (soap_move(soap, ((soap->dime.size+3)&(~3))-soap_tell(soap)))
+    return soap->error = SOAP_EOF;
+  for (;;)
+  { register struct soap_multipart *content;
+    if (soap_getdimehdr(soap))
+      break;
+    if (soap->fdimewriteopen && ((soap->dime.ptr = (char*)soap->fdimewriteopen(soap, soap->dime.id, soap->dime.type, soap->dime.options)) || soap->error))
+    { const char *id, *type, *options;
+      size_t size, n;
+      if (!soap->dime.ptr)
+        return soap->error;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      for (;;)
+      { size = soap->dime.size;
+        for (;;)
+        { n = soap->buflen - soap->bufidx;
+          if (size < n)
+            n = size;
+          if ((soap->error = soap->fdimewrite(soap, (void*)soap->dime.ptr, soap->buf + soap->bufidx, n)))
+            break;
+	  size -= n;
+	  if (!size)
+	  { soap->bufidx += n;
+	    break;
+	  }
+	  if (soap_recv(soap))
+          { soap->error = SOAP_EOF;
+	    goto end;
+          }
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+        { soap->error = SOAP_EOF;
+	  break;
+        }
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          break;
+      }
+end:
+      if (soap->fdimewriteclose)
+        soap->fdimewriteclose(soap, (void*)soap->dime.ptr);
+      soap->dime.size = 0;
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else if (soap->dime.flags & SOAP_DIME_CF)
+    { const char *id, *type, *options;
+      register soap_wchar c;
+      register char *s;
+      register int i;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      if (soap_new_block(soap))
+        return SOAP_EOM;
+      for (;;)
+      { s = (char*)soap_push_block(soap, soap->dime.size);
+        if (!s)
+          return soap->error = SOAP_EOM;
+        for (i = soap->dime.size; i > 0; i--)
+        { if ((int)(c = soap_get1(soap)) == EOF)
+            return soap->error = SOAP_EOF;
+          *s++ = (char)c;
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+          return soap->error = SOAP_EOF;
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          return soap->error;
+      }
+      soap->dime.size = soap->blist->size++; /* allocate one more for '\0' */
+      if (!(soap->dime.ptr = soap_save_block(soap, NULL, 0)))
+        return soap->error;
+      soap->dime.ptr[soap->dime.size] = '\0'; /* force 0-terminated */
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else
+      soap->dime.ptr = soap_getdimefield(soap, soap->dime.size);
+    content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, soap->dime.ptr, soap->dime.size);
+    if (!content)
+      return soap->error = SOAP_EOM;
+    content->id = soap->dime.id;
+    content->type = soap->dime.type;
+    content->options = soap->dime.options;
+    soap_resolve_attachment(soap, content);
+    if (soap->error)
+      return soap->error;
+  }
+  if (soap->error != SOAP_DIME_END)
+    return soap->error;
+  return soap->error = SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmimehdr(struct soap *soap)
+{ struct soap_multipart *content;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  while (!*soap->msgbuf);
+  if (soap->msgbuf[0] == '-' && soap->msgbuf[1] == '-')
+  { char *s = soap->msgbuf + strlen(soap->msgbuf) - 1;
+    /* remove white space */
+    while (soap_blank(*s))
+      s--;
+    s[1] = '\0';
+    if (soap->mime.boundary)
+    { if (strcmp(soap->msgbuf + 2, soap->mime.boundary))
+        return soap->error = SOAP_MIME_ERROR;
+    }
+    else
+      soap->mime.boundary = soap_strdup(soap, soap->msgbuf + 2);
+    if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  if (soap_set_mime_attachment(soap, NULL, 0, SOAP_MIME_NONE, NULL, NULL, NULL, NULL))
+    return soap->error = SOAP_EOM;
+  content = soap->mime.last;
+  for (;;)
+  { register char *key = soap->msgbuf;
+    register char *val;
+    if (!*key)
+      break;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "MIME header: %s\n", key));
+    val = strchr(soap->msgbuf, ':');
+    if (val)
+    { *val = '\0';
+      do val++;
+      while (*val && *val <= 32);
+      if (!soap_tag_cmp(key, "Content-ID"))
+        content->id = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Location"))
+        content->location = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Disposition"))
+        content->id = soap_strdup(soap, soap_get_header_attribute(soap, val, "name"));
+      else if (!soap_tag_cmp(key, "Content-Type"))
+        content->type = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Description"))
+        content->description = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Transfer-Encoding"))
+        content->encoding = (enum soap_mime_encoding)soap_int_code(mime_codes, val, (long)SOAP_MIME_NONE);
+    }
+    if (soap_getline(soap, key, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmime(struct soap *soap)
+{ register soap_wchar c = 0;
+  if (!soap->mime.last)
+    return SOAP_OK;
+  for (;;)
+  { register size_t i, m = 0;
+    register char *s, *t = NULL;
+    struct soap_multipart *content = soap->mime.last;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Parsing MIME content id=%s type=%s\n", content->id?content->id:"", content->type?content->type:""));
+    if (soap_new_block(soap))
+      return soap->error = SOAP_EOM;
+    for (;;)
+    { register short flag = 0;
+      if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+        return soap->error = SOAP_EOM;
+      for (i = 0; i < SOAP_BLKLEN; i++)
+      { if (m > 0)
+        { *s++ = *t++;
+	  m--;
+	}
+	else
+        { if (!flag)
+	  { c = soap_get1(soap);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	  }
+	  if (flag || c == '\r')
+	  { t = soap->tmpbuf;
+	    memset(t, 0, sizeof(soap->tmpbuf));
+            strcpy(t, "\n--");
+            if (soap->mime.boundary)
+	      strncat(t, soap->mime.boundary, sizeof(soap->tmpbuf)-4);
+	    do c = soap_getchar(soap);
+	    while (c == *t++);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	    if (!*--t)
+	      goto end;
+	    *t = (char)c;
+	    flag = (c == '\r');
+	    m = t - soap->tmpbuf + 1 - flag;
+	    t = soap->tmpbuf;
+	    c = '\r';
+	  }
+	  *s++ = (char)c;
+        }
+      }
+    }
+end:
+    *s = '\0'; /* force 0-terminated */
+    content->size = soap_size_block(soap, i+1)-1;
+    content->ptr = soap_save_block(soap, NULL, 0);
+    soap_resolve_attachment(soap, content);
+    if (c == '-' && soap_getchar(soap) == '-')
+      break;
+    while (c != '\r' && (int)c != EOF && soap_blank(c))
+      c = soap_getchar(soap);
+    if (c != '\r' || soap_getchar(soap) != '\n')
+      return soap->error = SOAP_MIME_ERROR;
+    if (soap_getmimehdr(soap))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_match_cid(struct soap *soap, const char *s, const char *t)
+{ register size_t n;
+  if (!s)
+    return 1;
+  if (!strcmp(s, t))
+    return 0;
+  if (!strncmp(s, "cid:", 4))
+    s += 4;
+  n = strlen(t);
+  if (*t == '<')
+  { t++;
+    n -= 2;
+  }
+  if (!strncmp(s, t, n) && !s[n])
+    return 0;
+  soap_decode(soap->tmpbuf, sizeof(soap->tmpbuf), s, SOAP_STR_EOS);
+  if (!strncmp(soap->tmpbuf, t, n) && !soap->tmpbuf[n])
+    return 0;
+  return 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_resolve_attachment(struct soap *soap, struct soap_multipart *content)
+{ if (content->id)
+  { register struct soap_xlist **xp = &soap->xlist;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving attachment data for id=%s\n", content->id));
+    while (*xp)
+    { register struct soap_xlist *xq = *xp;
+      if (!soap_match_cid(soap, xq->id, content->id))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Found matching attachment %s for content id=%s\n", xq->id, content->id));
+	*xp = xq->next;
+        *xq->ptr = (unsigned char*)content->ptr;
+        *xq->size = (int)content->size;
+        *xq->type = (char*)content->type;
+	if (content->options)
+          *xq->options = (char*)content->options;
+        else
+          *xq->options = (char*)content->description;
+	SOAP_FREE(soap, xq);
+      }
+      else
+        xp = &(*xp)->next;
+    }
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmimehdr(struct soap *soap, struct soap_multipart *content)
+{ const char *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "MIME attachment type=%s\n", content->type?content->type:""));
+  if (soap_send3(soap, "\r\n--", soap->mime.boundary, "\r\n"))
+    return soap->error;
+  if (content->type && soap_send3(soap, "Content-Type: ", content->type, "\r\n"))
+    return soap->error;
+  s = soap_str_code(mime_codes, content->encoding);
+  if (s && soap_send3(soap, "Content-Transfer-Encoding: ", s, "\r\n"))
+    return soap->error;
+  if (content->id && soap_send3(soap, "Content-ID: ", content->id, "\r\n"))
+    return soap->error;
+  if (content->location && soap_send3(soap, "Content-Location: ", content->location, "\r\n"))
+    return soap->error;
+  if (content->description && soap_send3(soap, "Content-Description: ", content->description, "\r\n"))
+    return soap->error;
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_MIME) || !soap->mime.boundary)
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending MIME attachments\n"));
+  for (content = soap->mime.first; content; content = content->next)
+    if (soap_putmimehdr(soap, content)
+     || soap_send_raw(soap, content->ptr, content->size))
+      return soap->error;
+  return soap_send3(soap, "\r\n--", soap->mime.boundary, "--");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_dime(struct soap *soap)
+{ soap->omode |= SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_mime(struct soap *soap, const char *boundary, const char *start)
+{ soap->omode |= SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = soap_strdup(soap, boundary);
+  soap->mime.start = soap_strdup(soap, start);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_dime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_mime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart*
+soap_new_multipart(struct soap *soap, struct soap_multipart **first, struct soap_multipart **last, char *ptr, size_t size)
+{ struct soap_multipart *content;
+  content = (struct soap_multipart*)soap_malloc(soap, sizeof(struct soap_multipart));
+  if (content)
+  { content->next = NULL;
+    content->ptr = ptr;
+    content->size = size;
+    content->id = NULL;
+    content->type = NULL;
+    content->options = NULL;
+    content->encoding = SOAP_MIME_NONE;
+    content->location = NULL;
+    content->description = NULL;
+    if (!*first)
+      *first = content;
+    if (*last)
+      (*last)->next = content;
+    *last = content;
+  }
+  return content;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_dime_attachment(struct soap *soap, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->options = soap_dime_option(soap, optype, option);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_mime_attachment(struct soap *soap, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->encoding = encoding;
+  content->location = soap_strdup(soap, location);
+  content->description = soap_strdup(soap, description);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap_multipart*
+SOAP_FMAC2
+soap_next_multipart(struct soap_multipart *content)
+{ if (content)
+    return content->next;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_select_mime_boundary(struct soap *soap)
+{ while (!soap->mime.boundary || soap_valid_mime_boundary(soap))
+  { register char *s = soap->mime.boundary;
+    register size_t n = 0;
+    if (s)
+      n = strlen(s);
+    if (n < 16)
+    { n = 64;
+      s = soap->mime.boundary = (char*)soap_malloc(soap, n + 1);
+      if (!s)
+        return;
+    }
+    strcpy(s, "==");
+    s += 2;
+    n -= 4;
+    while (n)
+    { *s++ = soap_base64o[soap_random & 0x3F];
+      n--;
+    }
+    strcpy(s, "==");
+  }
+  if (!soap->mime.start)
+    soap->mime.start = "<SOAP-ENV:Envelope>";
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_valid_mime_boundary(struct soap *soap)
+{ register struct soap_multipart *content;
+  register size_t k = strlen(soap->mime.boundary);
+  for (content = soap->mime.first; content; content = content->next)
+  { if (content->ptr && content->size >= k)
+    { register const char *p = (const char*)content->ptr; 
+      register size_t i;
+      for (i = 0; i < content->size - k; i++, p++)
+        if (!strncmp(p, soap->mime.boundary, k))
+          return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	HTTP cookie handling
+ *
+\******************************************************************************/
+
+#ifdef WITH_COOKIES
+/******************************************************************************/
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_encode_cookie(const char *s, char *t, size_t len)
+{ register int c;
+  register size_t n = len;
+  while ((c = *s++) && --n > 0)
+  { if (c > ' ' && c < 128 && !strchr("()<>@,;:\\\"/[]?={}", c))
+      *t++ = c;
+    else if (n > 2)
+    { *t++ = '%';
+      *t++ = (c >> 4) + (c > 159 ? '7' : '0');
+      c &= 0xF;
+      *t++ = c + (c > 9 ? '7' : '0');
+      n -= 2;
+    }
+    else
+      break;
+  }
+  *t = '\0';
+  return len - n;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  size_t n;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (*path == '/')
+    path++;
+  n = strlen(path);
+  for (p = soap->cookies; p; p = p->next)
+    if (!strcmp(p->name, name)
+     && domain
+     && p->domain
+     && !strcmp(p->domain, domain)
+     && !strncmp(p->path, path, n))
+      break;
+  return p;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_set_cookie(struct soap *soap, const char *name, const char *value, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  int n;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set cookie: %s=%s domain=%s path=%s\n", name, value?value:"", domain?domain:"", path?path:""));
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return NULL;
+  }
+  if (*path == '/')
+    path++;
+  q = soap_cookie(soap, name, domain, path);
+  if (!q)
+  { if ((q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+    { if ((q->name = (char*)SOAP_MALLOC(soap, strlen(name)+1)))
+        strcpy(q->name, name);
+      q->value = NULL;
+      q->domain = NULL;
+      q->path = NULL;
+      q->expire = -1;
+      q->version = 0;
+      q->secure = 0;
+      q->modified = 0;
+      for (p = &soap->cookies, n = soap->cookie_max; *p && n; p = &(*p)->next, n--)
+        if (!strcmp((*p)->name, name) && (*p)->path && strcmp((*p)->path, path) < 0)
+          break;
+      if (n)
+      { q->next = *p;
+        *p = q;
+      }
+      else
+      { SOAP_FREE(soap, q->name);
+        SOAP_FREE(soap, q);
+        q = NULL;
+      }
+    }
+  }
+  else
+    q->modified = 1;
+  if (q)
+  { if (q->value)
+    { SOAP_FREE(soap, q->value);
+      q->value = NULL;
+    }
+    if (q->domain)
+    { SOAP_FREE(soap, q->domain);
+      q->domain = NULL;
+    }
+    if (q->path)
+    { SOAP_FREE(soap, q->path);
+      q->path = NULL;
+    }
+    if (value && *value && (q->value = (char*)SOAP_MALLOC(soap, strlen(value)+1)))
+      strcpy(q->value, value);
+    if (domain && *domain && (q->domain = (char*)SOAP_MALLOC(soap, strlen(domain)+1)))
+      strcpy(q->domain, domain);
+    if (path && *path && (q->path = (char*)SOAP_MALLOC(soap, strlen(path)+1)))
+      strcpy(q->path, path);
+    q->session = 1;
+    q->env = 0;
+  }
+  return q;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!domain)
+  { soap_set_receiver_error(soap, "Cookie domain not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (*path == '/')
+    path++;
+  for (p = &soap->cookies, q = *p; q; q = *p)
+    if (!strcmp(q->name, name) && !strcmp(q->domain, domain) && !strncmp(q->path, path, strlen(q->path)))
+    { if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+      p = &q->next;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_env_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)) && p->env)
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_cookie_expire(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->expire;
+  return -1;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_expire(struct soap *soap, const char *name, long expire, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->expire = expire;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 1;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_clr_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 0;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putsetcookies(struct soap *soap)
+{ struct soap_cookie *p;
+  char *s, tmp[4096];
+  const char *t;
+  for (p = soap->cookies; p; p = p->next)
+  { if (p->modified || !p->env)
+    { s = tmp;
+      if (p->name)
+        s += soap_encode_cookie(p->name, s, tmp-s+4064);
+      if (p->value && *p->value)
+      { *s++ = '=';
+        s += soap_encode_cookie(p->value, s, tmp-s+4064);
+      }
+      if (p->domain && (int)strlen(p->domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", p->domain);
+      else if (soap->cookie_domain && (int)strlen(soap->cookie_domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", soap->cookie_domain);
+      strcat(s, ";Path=\"/");
+      if (p->path)
+        t = p->path;
+      else
+        t = soap->cookie_path;
+      if (t)
+      { if (*t == '/')
+          t++;
+        if ((int)strlen(t) < tmp-s+4064)
+          strcat(s, t);
+      }
+      s += strlen(s);
+      *s++ = '"';
+      if (p->version > 0)
+        sprintf(s, ";Version=%u", p->version);
+      if (p->expire >= 0)
+        sprintf(s, ";Max-Age=%ld", p->expire);
+      if (p->secure)
+        strcat(s, ";Secure");
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set-Cookie: %s\n", tmp));
+      if ((soap->error = soap->fposthdr(soap, "Set-Cookie", tmp)))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putcookies(struct soap *soap, const char *domain, const char *path, int secure)
+{ struct soap_cookie **p, *q;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  char *s, tmp[4096];
+  p = &soap->cookies;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending cookies for domain=%s path=%s\n", domain, path));
+  if (*path == '/')
+    path++;
+  while ((q = *p))
+  { if (q->expire && now > q->expire)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie %s expired\n", q->name));
+      SOAP_FREE(soap, q->name);
+      if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+    { size_t domlen = 0;
+      if (q->domain)
+      { const char *s = strchr(q->domain, ':');
+        if (s)
+	  domlen = s - q->domain;
+	else
+          domlen = strlen(q->domain);
+      }
+      if ((!q->domain || !strncmp(q->domain, domain, domlen))
+          && (!q->path || !strncmp(q->path, path, strlen(q->path)))
+          && (!q->secure || secure))
+      { s = tmp;
+        if (q->version != version)
+        { sprintf(s, "$Version=%u;", q->version);
+          version = q->version;
+        }
+        if (q->name)
+          s += soap_encode_cookie(q->name, s, tmp-s+4080);
+        if (q->value && *q->value)
+        { *s++ = '=';
+          s += soap_encode_cookie(q->value, s, tmp-s+4080);
+        }
+        if (q->path && (int)strlen(q->path) < tmp-s+4080)
+        { sprintf(s, ";$Path=\"/%s\"", (*q->path == '/' ? q->path + 1 : q->path));
+          s += strlen(s);
+        }
+        if (q->domain && (int)strlen(q->domain) < tmp-s+4080)
+          sprintf(s, ";$Domain=\"%s\"", q->domain);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie: %s\n", tmp));
+        if ((soap->error = soap->fposthdr(soap, "Cookie", tmp)))
+          return soap->error;
+      }
+      p = &q->next;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_getcookies(struct soap *soap, const char *val)
+{ struct soap_cookie *p = NULL, *q;
+  const char *s;
+  char *t, tmp[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  char *domain = NULL;
+  char *path = NULL;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  if (!val)
+    return;
+  s = val;
+  while (*s)
+  { s = soap_decode_key(tmp, sizeof(tmp), s);
+    if (!soap_tag_cmp(tmp, "$Version"))
+    { if ((s = soap_decode_val(tmp, sizeof(tmp), s)))
+      { if (p)
+          p->version = (int)atol(tmp);
+        else
+          version = (int)atol(tmp);
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Path"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->path)
+          SOAP_FREE(soap, p->path);
+        p->path = t;
+      }
+      else
+      { if (path)
+          SOAP_FREE(soap, path);
+        path = t;
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Domain"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->domain)
+          SOAP_FREE(soap, p->domain);
+	p->domain = t;
+      }
+      else
+      { if (domain)
+          SOAP_FREE(soap, domain);
+        domain = t;
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Path"))
+    { if (p->path)
+        SOAP_FREE(soap, p->path);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->path = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->path, tmp);
+      }
+      else
+        p->path = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Domain"))
+    { if (p->domain)
+        SOAP_FREE(soap, p->domain);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->domain = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->domain, tmp);
+      }
+      else
+        p->domain = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Version"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->version = (unsigned int)atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Max-Age"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->expire = now + atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Expires"))
+    { struct tm T;
+      char a[3]; 
+      static const char mns[] = "anebarprayunulugepctovec";
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (strlen(tmp) > 20)
+      { memset((void*)&T, 0, sizeof(T));
+        a[0] = tmp[4];
+        a[1] = tmp[5];
+        a[2] = '\0';
+        T.tm_mday = (int)atol(a);
+        a[0] = tmp[8];
+        a[1] = tmp[9];
+        T.tm_mon = (strstr(mns, a) - mns) / 2;
+        a[0] = tmp[11];
+        a[1] = tmp[12];
+        T.tm_year = 100 + (int)atol(a);
+        a[0] = tmp[13];
+        a[1] = tmp[14];
+        T.tm_hour = (int)atol(a);
+        a[0] = tmp[16];
+        a[1] = tmp[17];
+        T.tm_min = (int)atol(a);
+        a[0] = tmp[19];
+        a[1] = tmp[20];
+        T.tm_sec = (int)atol(a);
+        p->expire = soap_timegm(&T);
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Secure"))
+      p->secure = 1;
+    else
+    { if (p)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+        if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+        { q->version = p->version;
+          q->expire = p->expire;
+          q->secure = p->secure;
+          q->env = 1;
+        }
+        if (p->name)
+          SOAP_FREE(soap, p->name);
+        if (p->value)
+          SOAP_FREE(soap, p->value);
+        if (p->domain)
+          SOAP_FREE(soap, p->domain);
+        if (p->path)
+          SOAP_FREE(soap, p->path);
+        SOAP_FREE(soap, p);
+      }
+      if ((p = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      { p->name = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+        strcpy(p->name, tmp);
+        s = soap_decode_val(tmp, sizeof(tmp), s);
+        if (*tmp)
+        { p->value = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+          strcpy(p->value, tmp);
+        }
+        else
+          p->value = NULL;
+        p->domain = domain;
+        p->path = path;
+        p->expire = 0;
+        p->secure = 0;
+        p->version = version;
+      }
+    }
+  }
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+    if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+    { q->version = p->version;
+      q->expire = p->expire;
+      q->secure = p->secure;
+      q->env = 1;
+    }
+    if (p->name)
+      SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+  if (domain)
+    SOAP_FREE(soap, domain);
+  if (path)
+    SOAP_FREE(soap, path);
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getenv_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  const char *s;
+  char key[4096], val[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  if (!(s = getenv("HTTP_COOKIE")))
+    return SOAP_ERR;
+  do
+  { s = soap_decode_key(key, sizeof(key), s);
+    s = soap_decode_val(val, sizeof(val), s);
+    p = soap_set_cookie(soap, key, val, NULL, NULL);
+    if (p)
+      p->env = 1;
+  } while (*s);
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_copy_cookies(struct soap *soap)
+{ struct soap_cookie *p, **q, *r;
+  q = &r;
+  for (p = soap->cookies; p; p = p->next)
+  { if (!(*q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      return r;
+    **q = *p;
+    if (p->name)
+    { if (((*q)->name = (char*)SOAP_MALLOC(soap, strlen(p->name)+1)))
+        strcpy((*q)->name, p->name);
+    }
+    if (p->value)
+    { if (((*q)->value = (char*)SOAP_MALLOC(soap, strlen(p->value)+1)))
+        strcpy((*q)->value, p->value);
+    }
+    if (p->domain)
+    { if (((*q)->domain = (char*)SOAP_MALLOC(soap, strlen(p->domain)+1)))
+        strcpy((*q)->domain, p->domain);
+    }
+    if (p->path)
+    { if (((*q)->path = (char*)SOAP_MALLOC(soap, strlen(p->path)+1)))
+        strcpy((*q)->path, p->path);
+    }
+    q = &(*q)->next;
+  }
+  *q = NULL;
+  return r;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  for (p = soap->cookies; p; p = soap->cookies)
+  { soap->cookies = p->next;
+    SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+}
+
+/******************************************************************************/
+#endif /* WITH_COOKIES */
+
+/******************************************************************************/
+#ifdef WITH_GZIP
+#ifndef PALM_1
+static int
+soap_getgziphdr(struct soap *soap)
+{ int i;
+  soap_wchar c, f = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get gzip header\n"));
+  for (i = 0; i < 9; i++)
+  { if ((int)(c = soap_get1(soap) == EOF))
+      return soap->error = SOAP_EOF;
+    if (i == 2)
+      f = c;
+  }
+  if (f & 0x04) /* FEXTRA */
+  { for (i = soap_get1(soap) | (soap_get1(soap) << 8); i; i--)
+      if ((int)soap_get1(soap) == EOF)
+        return soap->error = SOAP_EOF;
+  }
+  if (f & 0x08) /* FNAME */
+    do
+      c = soap_get1(soap);
+    while (c && (int)c != EOF);
+  if ((int)c != EOF && (f & 0x10)) /* FCOMMENT */
+    do
+      c = soap_get1(soap);
+    while (c && (int)f != EOF);
+  if ((int)c != EOF && (f & 0x01)) /* FHCRC */
+  { if ((int)(c = soap_get1(soap)) != EOF)
+      c = soap_get1(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_recv(struct soap *soap)
+{ soap_wchar c;
+  soap->error = SOAP_OK;
+  soap_free(soap);
+  soap_set_local_namespaces(soap);
+  soap->version = 0;	/* don't assume we're parsing SOAP content by default */
+#ifndef WITH_NOIDREF
+  soap_free_iht(soap);
+#endif
+  if ((soap->imode & SOAP_IO) == SOAP_IO_CHUNK)
+    soap->omode |= SOAP_IO_CHUNK;
+  soap->imode &= ~SOAP_IO;
+  soap->mode = soap->imode;
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  soap->ahead = 0;
+  soap->peeked = 0;
+  soap->level = 0;
+  soap->part = SOAP_BEGIN;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  *soap->endpoint = '\0';
+  soap->action = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket))
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->recvfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->recvfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#ifdef WITH_ZLIB
+  soap->mode &= ~SOAP_ENC_ZLIB;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.next_in = Z_NULL;
+  soap->d_stream.avail_in = 0;
+  soap->d_stream.next_out = (Byte*)soap->buf;
+  soap->d_stream.avail_out = SOAP_BUFLEN;
+  soap->z_ratio_in = 1.0;
+#endif
+#ifndef WITH_LEANER
+  if (soap->fprepareinit)
+    soap->fprepareinit(soap);
+#endif
+  c = soap_getchar(soap);
+#ifdef WITH_GZIP
+  if (c == 0x1F)
+  { if (soap_getgziphdr(soap))
+      return soap->error;
+    if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+    soap->zlib_state = SOAP_ZLIB_INFLATE;
+    soap->mode |= SOAP_ENC_ZLIB;
+    soap->zlib_in = SOAP_ZLIB_GZIP;
+    soap->z_crc = crc32(0L, NULL, 0);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    /* should not chunk over plain transport, so why bother to check? */
+    /* if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) */
+    /*   soap->z_buflen = soap->bufidx; */
+    /* else */
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+    soap->z_buflen = soap->buflen;
+    soap->buflen = soap->bufidx;
+    c = soap_getchar(soap);
+  }  
+#endif
+#ifndef WITH_LEANER
+  if (c == '-' && soap_get0(soap) == '-')
+    soap->mode |= SOAP_ENC_MIME;
+  else if ((c & 0xFFFC) == (SOAP_DIME_VERSION | SOAP_DIME_MB) && (soap_get0(soap) & 0xFFF0) == 0x20)
+    soap->mode |= SOAP_ENC_DIME;
+  else
+#endif
+  { while (soap_blank(c))
+      c = soap_getchar(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  soap_unget(soap, c);
+#ifndef WITH_NOHTTP
+  /* if not XML or (start of)BOM or MIME/DIME/ZLIB, assume HTTP header */
+  if (c != '<' && c != 0xEF && !(soap->mode & (SOAP_ENC_MIME | SOAP_ENC_DIME | SOAP_ENC_ZLIB)))
+  { soap->mode &= ~SOAP_IO;
+    soap->error = soap->fparse(soap);
+    if (soap->error && soap->error < SOAP_STOP)
+    { soap->keep_alive = 0; /* force close later */
+      return soap->error;
+    }
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { soap->chunkbuflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+      soap->chunksize = 0;
+    }
+#ifndef WITH_LEANER
+    else if (soap->fpreparerecv && soap->buflen != soap->bufidx)
+      soap->fpreparerecv(soap, soap->buf + soap->bufidx, soap->buflen - soap->bufidx);
+#endif
+#ifdef WITH_ZLIB
+    if (soap->zlib_in != SOAP_ZLIB_NONE)
+    { /* fparse should not use soap_unget to push back last char */
+#ifdef WITH_GZIP
+      c = soap_get1(soap);
+      if (c == 0x1F)
+      { if (soap_getgziphdr(soap))
+          return soap->error;
+        if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        soap->z_crc = crc32(0L, NULL, 0);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+      }
+      else
+      { soap_revget1(soap);
+#else
+      {
+#endif
+        if (inflateInit(&soap->d_stream) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate initialized\n"));
+      }
+      soap->mode |= SOAP_ENC_ZLIB;
+      memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+      soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+      soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+    }
+#endif
+    if (soap->error)
+    { if (soap->error == SOAP_FORM && soap->fform)
+      { soap->error = soap->fform(soap);
+        if (soap->error == SOAP_OK)
+          soap->error = SOAP_STOP; /* prevents further processing */
+      }
+      return soap->error;
+    }
+  }
+#endif
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_MIME)
+  { if (soap_getmimehdr(soap))
+      return soap->error;
+    if (soap_get_header_attribute(soap, soap->mime.first->type, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+  }
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap->dime.flags & SOAP_DIME_CF)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked DIME SOAP message\n"));
+      soap->dime.chunksize = soap->dime.size;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+    }
+    soap->count = soap->buflen - soap->bufidx;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse(struct soap *soap)
+{ char header[SOAP_HDRLEN], *s;
+  unsigned short get = 0, status = 0, k = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Waiting for HTTP request/response...\n"));
+  *soap->endpoint = '\0';
+  soap->length = 0;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->action = NULL;
+  soap->authrealm = NULL;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP status: %s\n", soap->msgbuf));
+    for (;;)
+    { if (soap_getline(soap, header, SOAP_HDRLEN))
+      { if (soap->error == SOAP_EOF)
+	{ soap->error = SOAP_OK;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "EOF in HTTP header, continue anyway\n"));
+	  break;
+	}
+        return soap->error;
+      }
+      if (!*header)
+        break;
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP header: %s\n", header));
+      s = strchr(header, ':');
+      if (s)
+      { *s = '\0';
+        do s++;
+        while (*s && *s <= 32);
+        if ((soap->error = soap->fparsehdr(soap, header, s)))
+        { if (soap->error < SOAP_STOP)
+	    return soap->error;
+	  status = soap->error;
+	  soap->error = SOAP_OK;
+        }
+      }
+    }
+    if ((s = strchr(soap->msgbuf, ' ')))
+    { k = (unsigned short)soap_strtoul(s, &s, 10);
+      if (!soap_blank(*s))
+        k = 0;
+    }
+    else
+      k = 0;
+  } while (k == 100);
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Finished HTTP header parsing\n"));
+  s = strstr(soap->msgbuf, "HTTP/");
+  if (s && s[7] != '1')
+  { if (soap->keep_alive == 1)
+      soap->keep_alive = 0;
+    if (k == 0 && (soap->omode & SOAP_IO) == SOAP_IO_CHUNK) /* k == 0 for HTTP request */
+    { soap->imode |= SOAP_IO_CHUNK;
+      soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE;
+    }
+  }
+  if (soap->keep_alive < 0)
+    soap->keep_alive = 1;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Keep alive connection = %d\n", soap->keep_alive));
+  if (s && (((get = !strncmp(soap->msgbuf, "GET ", 4))) || !strncmp(soap->msgbuf, "POST ", 5)))
+  { size_t m = strlen(soap->endpoint);
+    size_t n = m + (s - soap->msgbuf) - 5 - (!get);
+    if (n >= sizeof(soap->endpoint))
+      n = sizeof(soap->endpoint) - 1;
+    strncpy(soap->path, soap->msgbuf + 4 + (!get), n - m);
+    soap->path[n - m] = '\0';
+    strcat(soap->endpoint, soap->path);
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Target endpoint='%s'\n", soap->endpoint));
+    if (get)
+    { soap->error = soap->fget(soap);
+      if (soap->error == SOAP_OK)
+        soap->error = SOAP_STOP; /* prevents further processing */
+      return soap->error;
+    }
+    if (status)
+      return soap->error = status;
+    return SOAP_OK;
+  }
+  if (k == 0 || (k >= 200 && k <= 299) || k == 400 || k == 500)
+    return SOAP_OK;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP error %d\n", k));
+  return soap_set_receiver_error(soap, "HTTP error", soap->msgbuf, k);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse_header(struct soap *soap, const char *key, const char *val)
+{ if (!soap_tag_cmp(key, "Host"))
+  { 
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+      strcpy(soap->endpoint, "https://");
+    else
+#endif
+      strcpy(soap->endpoint, "http://");
+    strncat(soap->endpoint, val, sizeof(soap->endpoint) - 8);
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifndef WITH_LEANER
+  else if (!soap_tag_cmp(key, "Content-Type"))
+  { if (soap_get_header_attribute(soap, val, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+    else if (soap_get_header_attribute(soap, val, "multipart/related")
+          || soap_get_header_attribute(soap, val, "multipart/form-data"))
+    { soap->mime.boundary = soap_strdup(soap, soap_get_header_attribute(soap, val, "boundary"));
+      soap->mime.start = soap_strdup(soap, soap_get_header_attribute(soap, val, "start"));
+      soap->mode |= SOAP_ENC_MIME;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Content-Length"))
+    soap->length = soap_strtoul(val, NULL, 10);
+  else if (!soap_tag_cmp(key, "Content-Encoding"))
+  { if (!soap_tag_cmp(val, "deflate"))
+#ifdef WITH_ZLIB
+      soap->zlib_in = SOAP_ZLIB_DEFLATE;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+    else if (!soap_tag_cmp(val, "gzip"))
+#ifdef WITH_GZIP
+      soap->zlib_in = SOAP_ZLIB_GZIP;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+  }
+#ifdef WITH_ZLIB
+  else if (!soap_tag_cmp(key, "Accept-Encoding"))
+  {
+#ifdef WITH_GZIP
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "gzip"))
+      soap->zlib_out = SOAP_ZLIB_GZIP;
+    else
+#endif
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "deflate"))
+      soap->zlib_out = SOAP_ZLIB_DEFLATE;
+    else
+      soap->zlib_out = SOAP_ZLIB_NONE;
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Transfer-Encoding"))
+  { soap->mode &= ~SOAP_IO;
+    if (!soap_tag_cmp(val, "chunked"))
+      soap->mode |= SOAP_IO_CHUNK;
+  }
+  else if (!soap_tag_cmp(key, "Connection"))
+  { if (!soap_tag_cmp(val, "keep-alive"))
+      soap->keep_alive = -soap->keep_alive;
+    else if (!soap_tag_cmp(val, "close"))
+      soap->keep_alive = 0;
+  }
+#ifndef WITH_LEAN
+  else if (!soap_tag_cmp(key, "Authorization"))
+  { if (!soap_tag_cmp(val, "Basic *"))
+    { int n;
+      char *s;
+      soap_base642s(soap, val + 6, soap->tmpbuf, sizeof(soap->tmpbuf) - 1, &n);
+      soap->tmpbuf[n] = '\0';
+      if ((s = strchr(soap->tmpbuf, ':')))
+      { *s = '\0';
+	soap->userid = soap_strdup(soap, soap->tmpbuf);
+	soap->passwd = soap_strdup(soap, s + 1);
+      }
+    }
+  }
+  else if (!soap_tag_cmp(key, "WWW-Authenticate"))
+    soap->authrealm = soap_strdup(soap, soap_get_header_attribute(soap, val + 6, "realm"));
+  else if (!soap_tag_cmp(key, "Expect"))
+  { if (!soap_tag_cmp(val, "100-continue"))
+    { if ((soap->error = soap->fposthdr(soap, "HTTP/1.1 100 Continue", NULL))
+       || (soap->error = soap->fposthdr(soap, NULL, NULL)))
+        return soap->error;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "SOAPAction"))
+  { if (*val == '"')
+    { soap->action = soap_strdup(soap, val + 1);
+      soap->action[strlen(soap->action) - 1] = '\0';
+    }
+  }
+  else if (!soap_tag_cmp(key, "Location"))
+  { strncpy(soap->endpoint, val, sizeof(soap->endpoint));
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifdef WITH_COOKIES
+  else if (!soap_tag_cmp(key, "Cookie") || !soap_tag_cmp(key, "Set-Cookie"))
+    soap_getcookies(soap, val);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_get_header_attribute(struct soap *soap, const char *line, const char *key)
+{ register const char *s = line;
+  if (s)
+  { while (*s)
+    { register short flag;
+      s = soap_decode_key(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      flag = soap_tag_cmp(soap->tmpbuf, key);
+      s = soap_decode_val(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      if (!flag)
+        return soap->tmpbuf;
+    }
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_key(char *buf, size_t len, const char *val)
+{ return soap_decode(buf, len, val, "=,;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_val(char *buf, size_t len, const char *val)
+{ if (*val != '=')
+  { *buf = '\0';
+    return val;
+  }
+  return soap_decode(buf, len, val + 1, ",;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char*
+soap_decode(char *buf, size_t len, const char *val, const char *sep)
+{ const char *s;
+  char *t = buf;
+  for (s = val; *s; s++)
+    if (*s != ' ' && *s != '\t' && !strchr(sep, *s))
+      break;
+  if (*s == '"')
+  { s++;
+    while (*s && *s != '"' && --len)
+      *t++ = *s++;
+  }
+  else
+  { while (soap_notblank(*s) && !strchr(sep, *s) && --len)
+    { if (*s == '%')
+      { *t++ = ((s[1] >= 'A' ? (s[1] & 0x7) + 9 : s[1] - '0') << 4)
+              + (s[2] >= 'A' ? (s[2] & 0x7) + 9 : s[2] - '0');
+        s += 3;
+      }
+      else
+        *t++ = *s++;
+    }
+  }
+  *t = '\0';
+  while (*s && !strchr(sep, *s))
+    s++;
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_out(struct soap *soap)
+{
+#ifndef WITH_LEANER
+  size_t n = 0;
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->mime.start)
+  { const char *s;
+    if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+      s = "application/dime";
+    else if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+    sprintf(soap->tmpbuf, "--%s\r\nContent-Type: %s\r\nContent-Transfer-Encoding: binary\r\nContent-ID: %s\r\n\r\n", soap->mime.boundary, s, soap->mime.start);
+    n = strlen(soap->tmpbuf);
+    if (soap_send_raw(soap, soap->tmpbuf, n))
+      return soap->error;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    soap->dime.size = soap->count;	/* DIME in MIME correction */
+  if (!(soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME))
+  { if (soap_putdimehdr(soap))
+      return soap->error;
+  }
+#endif
+  soap->part = SOAP_IN_ENVELOPE;
+  return soap_element_begin_out(soap, "SOAP-ENV:Envelope", 0, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Envelope"))
+    return soap->error;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { soap->dime.size = soap->count - soap->dime.size;	/* DIME in MIME correction */
+    sprintf(soap->id, soap->dime_id_format, 0);
+    soap->dime.id = soap->id;
+    if (soap->local_namespaces)
+    { if (soap->local_namespaces[0].out)
+        soap->dime.type = (char*)soap->local_namespaces[0].out;
+      else
+        soap->dime.type = (char*)soap->local_namespaces[0].ns;
+    }
+    soap->dime.options = NULL;
+    soap->dime.flags = SOAP_DIME_MB | SOAP_DIME_ABSURI;
+    if (!soap->dime.first)
+      soap->dime.flags |= SOAP_DIME_ME;
+    soap->count += 12 + ((strlen(soap->dime.id)+3)&(~3)) + ((strlen(soap->dime.type)+3)&(~3));
+  }
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+    return soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+#endif
+  soap->part = SOAP_END_ENVELOPE;
+  return SOAP_OK;
+} 
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_in(struct soap *soap)
+{ register struct Namespace *p;
+  soap->part = SOAP_IN_ENVELOPE;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Envelope", 0))
+    return soap->error = SOAP_VERSIONMISMATCH;
+  p = soap->local_namespaces;
+  if (p)
+  { const char *ns = p[0].out;
+    if (!ns)
+      ns = p[0].ns;
+    if (!strcmp(ns, soap_env1))
+    { soap->version = 1; /* make sure we use SOAP 1.1 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc1))))
+        strcpy(p[1].out, soap_enc1);
+    }
+    else if (!strcmp(ns, soap_env2))
+    { soap->version = 2; /* make sure we use SOAP 1.2 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc2))))
+        strcpy(p[1].out, soap_enc2);
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_in(struct soap *soap)
+{ soap->part = SOAP_END_ENVELOPE;
+  return soap_element_end_in(soap, "SOAP-ENV:Envelope");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_out(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap->version == 1)
+    soap->encoding = 1;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_SEC) && soap_set_attr(soap, "wsu:Id", "Body"))
+    return soap->error;
+#endif
+  if (soap_element(soap, "SOAP-ENV:Body", 0, NULL))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Body"))
+    return soap->error;
+  soap->part = SOAP_END_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_in(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Body", 0))
+    return soap->error;
+  if (!soap->body)
+    soap->part = SOAP_NO_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_in(struct soap *soap)
+{ if (soap->part == SOAP_NO_BODY)
+    return SOAP_OK;
+  soap->part = SOAP_END_BODY;
+  return soap_element_end_in(soap, "SOAP-ENV:Body");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_header(struct soap *soap)
+{ if (soap_getheader(soap) && soap->error == SOAP_TAG_MISMATCH)
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_endpoint(struct soap *soap, const char *endpoint)
+{ register const char *s;
+  register size_t i, n;
+  soap->endpoint[0] = '\0';
+  soap->host[0] = '\0';
+  soap->path[0] = '/';
+  soap->path[1] = '\0';
+  soap->port = 80;
+  if (!endpoint || !*endpoint)
+    return;
+  if (!strncmp(endpoint, "https:", 6))
+    soap->port = 443;
+  strncpy(soap->endpoint, endpoint, sizeof(soap->endpoint) - 1);
+  s = strchr(endpoint, ':');
+  if (s && s[1] == '/' && s[2] == '/')
+    s += 3;
+  else
+    s = endpoint;
+  n = strlen(s);
+  if (n >= sizeof(soap->host))
+    n = sizeof(soap->host) - 1;
+#ifdef WITH_IPV6
+  if (s[0] == '[')
+  { s++;
+    for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == ']')
+      { s++;
+        break; 
+      }
+    }
+  }
+  else
+  { for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == '/' || s[i] == ':')
+        break; 
+    }
+  }
+#else
+  for (i = 0; i < n; i++)
+  { soap->host[i] = s[i];
+    if (s[i] == '/' || s[i] == ':')
+      break; 
+  }
+#endif
+  soap->host[i] = '\0';
+  if (s[i] == ':')
+  { soap->port = (int)atol(s + i + 1);
+    for (i++; i < n; i++)
+      if (s[i] == '/')
+        break;
+  }
+  if (s[i])
+  { strncpy(soap->path, s + i, sizeof(soap->path));
+    soap->path[sizeof(soap->path) - 1] = '\0';
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect(struct soap *soap, const char *endpoint, const char *action)
+{ return soap_connect_command(soap, SOAP_POST, endpoint, action);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect_command(struct soap *soap, int http_command, const char *endpoint, const char *action)
+{ char host[sizeof(soap->host)];
+  int port;
+  size_t count;
+  soap->error = SOAP_OK;
+  strcpy(host, soap->host); /* save to compare */
+  port = soap->port; /* save to compare */
+  soap_set_endpoint(soap, endpoint);
+#ifndef WITH_LEANER
+  if (soap->fconnect)
+  { if ((soap->error = soap->fconnect(soap, endpoint, soap->host, soap->port)))
+      return soap->error;
+  }
+  else
+#endif
+  if (soap->fopen && *soap->host)
+  { soap->status = http_command;
+    if (!soap->keep_alive || !soap_valid_socket(soap->socket) || strcmp(soap->host, host) || soap->port != port || !soap->fpoll || soap->fpoll(soap))
+    { soap->keep_alive = 0; /* to force close */
+      soap->omode &= ~SOAP_IO_UDP; /* to force close */
+      soap_closesock(soap);
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Connect/reconnect to host='%s' path='%s' port=%d\n", soap->host, soap->path, soap->port));
+#ifdef WITH_UDP
+      if (!strncmp(endpoint, "soap.udp:", 9))
+        soap->omode |= SOAP_IO_UDP;
+#endif
+      soap->socket = soap->fopen(soap, endpoint, soap->host, soap->port);
+      if (soap->error)
+        return soap->error;
+      soap->keep_alive = ((soap->omode & SOAP_IO_KEEPALIVE) != 0);
+    }
+  }
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML) && endpoint)
+  { unsigned int k = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((k & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fpost(soap, endpoint, soap->host, soap->port, soap->path, action, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((k & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = k;
+  }
+  else if (action)
+    soap->action = soap_strdup(soap, action);
+  if (http_command != SOAP_POST)
+    return soap_end_send(soap);
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2base64(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register int i;
+  register unsigned long m;
+  register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, (n + 2) / 3 * 4 + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (!s)
+    return p;
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    t += 4;
+  }
+  t[0] = '\0';
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      t[i] = '=';
+    t[4] = '\0';
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_base642s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register int i, j, c;
+  register unsigned long m;
+  register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = (strlen(s) + 3) / 4 * 3;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  if (n)
+    *n = 0;
+  for (;;)
+  { for (i = 0; i < SOAP_BLKLEN; i++)
+    { m = 0;
+      j = 0;
+      while (j < 4)
+      { c = *s++;
+        if (c == '=' || !c)
+        { i *= 3;
+          switch (j)
+          { case 2:
+              *t++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *t++ = (char)((m >> 10) & 0xFF);
+              *t++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n += i;
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      }
+      *t++ = (char)((m >> 16) & 0xFF);
+      *t++ = (char)((m >> 8) & 0xFF);
+      *t++ = (char)(m & 0xFF);
+      if (l < 3)
+      { if (n)
+	  *n += i;
+        return p;
+      }
+      l -= 3;
+    }
+    if (n)
+      *n += 3 * SOAP_BLKLEN;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2hex(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, 2 * n + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (s)
+  { for (; n > 0; n--)
+    { register int m = *s++;
+      *t++ = (char)((m >> 4) + (m > 159 ? 'a' - 10 : '0'));
+      m &= 0x0F;
+      *t++ = (char)(m + (m > 9 ? 'a' - 10 : '0'));
+    }
+  }
+  *t++ = '\0';
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_hex2s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = strlen(s) / 2;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  while (l)
+  { register int d1, d2;
+    d1 = *s++;
+    if (!d1)
+      break;
+    d2 = *s++;
+    if (!d2)
+      break;
+    *t++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    l--;
+  }
+  if (n)
+    *n = t - p;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthttphdr(struct soap *soap, int status, size_t count)
+{ register const char *s = NULL;
+  register int err = SOAP_OK;
+#ifndef WITH_LEANER
+  register const char *r = NULL;
+#endif
+  if (status == SOAP_FILE && soap->http_content)
+    s = soap->http_content;
+  else if (status == SOAP_HTML)
+    s = "text/html; charset=utf-8";
+  else if (count || ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK))
+  { if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+  }
+#ifndef WITH_LEANER
+  if (soap->mode & (SOAP_ENC_DIME | SOAP_ENC_MTOM))
+  { if (soap->mode & SOAP_ENC_MTOM)
+    { r = s;
+      s = "application/xop+xml; charset=utf-8";
+    }
+    else
+      s = "application/dime";
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->status != SOAP_GET)
+  { register const char *t = strchr(s, ';');
+    sprintf(soap->tmpbuf, "multipart/related; boundary=\"%s\"; type=\"", soap->mime.boundary);
+    if (t)
+      strncat(soap->tmpbuf, s, t - s);
+    else
+      strcat(soap->tmpbuf, s);
+    if (soap->mime.start)
+    { strcat(soap->tmpbuf, "\"; start=\"");
+      strcat(soap->tmpbuf, soap->mime.start);
+    }
+    strcat(soap->tmpbuf, "\"");
+    if (r)
+    { strcat(soap->tmpbuf, "; start-info=\"");
+      strcat(soap->tmpbuf, r);
+      strcat(soap->tmpbuf, "\"");
+    }
+    s = soap->tmpbuf;
+  }
+#endif
+  if (s && (err = soap->fposthdr(soap, "Content-Type", s)))
+    return err;
+#ifdef WITH_ZLIB
+  if (soap->omode & SOAP_ENC_ZLIB)
+  {
+#ifdef WITH_GZIP
+    err = soap->fposthdr(soap, "Content-Encoding", "gzip");
+#else
+    err = soap->fposthdr(soap, "Content-Encoding", "deflate");
+#endif
+    if (err)
+      return err;
+  }
+#endif
+#ifndef WITH_LEANER
+  if ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK)
+    err = soap->fposthdr(soap, "Transfer-Encoding", "chunked");
+  else
+#endif
+  if (soap->status != SOAP_GET)
+  { sprintf(soap->tmpbuf, "%lu", (unsigned long)count);
+    err = soap->fposthdr(soap, "Content-Length", soap->tmpbuf);
+  }
+  if (err)
+    return err;
+  return soap->fposthdr(soap, "Connection", soap->keep_alive ? "keep-alive" : "close");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_get(struct soap *soap)
+{ return SOAP_GET_METHOD;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post(struct soap *soap, const char *endpoint, const char *host, int port, const char *path, const char *action, size_t count)
+{ register const char *s;
+  register int err;
+  if (soap->status == SOAP_GET)
+    s = "GET";
+  else
+    s = "POST";
+#ifdef PALM
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)) && strncmp(endpoint, "_beam:", 6) && strncmp(endpoint, "_local:", 7) && strncmp(endpoint, "_btobex:", 8))
+#else
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)))
+#endif
+    return SOAP_OK;
+  if (soap->proxy_host && strncmp(endpoint, "https:", 6))
+    sprintf(soap->tmpbuf, "%s %s HTTP/%s", s, endpoint, soap->http_version);
+  else
+    sprintf(soap->tmpbuf, "%s /%s HTTP/%s", s, (*path == '/' ? path + 1 : path), soap->http_version);
+  if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+    return err;
+  if (port != 80)
+    sprintf(soap->tmpbuf, "%s:%d", host, port);
+  else
+    strcpy(soap->tmpbuf, host); 
+  if ((err = soap->fposthdr(soap, "Host", soap->tmpbuf))
+   || (err = soap->fposthdr(soap, "User-Agent", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, SOAP_OK, count)))
+    return err;
+#ifdef WITH_ZLIB
+#ifdef WITH_GZIP
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "gzip, deflate")))
+#else
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "deflate")))
+#endif
+    return err;
+#endif
+#ifndef WITH_LEAN
+  if (soap->userid && soap->passwd && strlen(soap->userid) + strlen(soap->passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Authorization", soap->tmpbuf)))
+      return err;
+  }
+  if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+      return err;
+  }
+#endif
+#ifdef WITH_COOKIES
+#ifdef WITH_OPENSSL
+  if (soap_putcookies(soap, host, path, soap->ssl != NULL))
+    return soap->error;
+#else
+  if (soap_putcookies(soap, host, path, 0))
+    return soap->error;
+#endif
+#endif
+  if (action && soap->version == 1)
+  { sprintf(soap->tmpbuf, "\"%s\"", action);
+    if ((err = soap->fposthdr(soap, "SOAPAction", soap->tmpbuf)))
+      return err;
+  }
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_send_header(struct soap *soap, const char *s)
+{ register const char *t;
+  do
+  { t = strchr(s, '\n'); /* disallow \n in HTTP headers */
+    if (!t)
+      t = s + strlen(s);
+    if (soap_send_raw(soap, s, t - s))
+      return soap->error;
+    s = t + 1;
+  } while (*t);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post_header(struct soap *soap, const char *key, const char *val)
+{ if (key)
+  { if (http_send_header(soap, key))
+      return soap->error;
+    if (val && (soap_send_raw(soap, ": ", 2) || http_send_header(soap, val)))
+      return soap->error;
+  }
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_response(struct soap *soap, int status, size_t count)
+{ register int err;
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    httpOutputEnable(soap->rpmreqid);
+#endif
+  if (!status || status == SOAP_HTML || status == SOAP_FILE)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "OK 200\n"));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s 200 OK", soap->http_version);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", "200 OK")))
+      return err;
+  }
+  else if (status > 200 && status < 600)
+  { sprintf(soap->tmpbuf, "HTTP/%s %d %s", soap->http_version, status, http_error(soap, status));
+    if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      return err;
+#ifndef WITH_LEAN 
+    if (status == 401)
+    { sprintf(soap->tmpbuf, "Basic realm=\"%s\"", soap->authrealm ? soap->authrealm : "gSOAP Web Service");
+      if ((err = soap->fposthdr(soap, "WWW-Authenticate", soap->tmpbuf)))
+        return err;
+    }
+    else if ((status >= 301 && status <= 303) || status == 307)
+    { if ((err = soap->fposthdr(soap, "Location", soap->endpoint)))
+        return err;
+    }
+#endif
+  }
+  else
+  { const char *s = *soap_faultcode(soap);
+    if (soap->version == 2 && !strcmp(s, "SOAP-ENV:Sender"))
+      s = "400 Bad Request";
+    else
+      s = "500 Internal Server Error";
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error %s (status=%d)\n", s, status));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s %s", soap->http_version, s);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", s)))
+      return err;
+  }
+  if ((err = soap->fposthdr(soap, "Server", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, status, count)))
+    return err;
+#ifdef WITH_COOKIES
+  if (soap_putsetcookies(soap))
+    return soap->error;
+#endif
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_response(struct soap *soap, int status)
+{ register size_t count;
+  if (!(soap->omode & (SOAP_ENC_XML | SOAP_IO_STORE /* this tests for chunking too */))
+   && (status == SOAP_HTML || status == SOAP_FILE))
+  { soap->omode &= ~SOAP_IO;
+    soap->omode |= SOAP_IO_STORE;
+  }
+  soap->status = status;
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML))
+  { register int n = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((n & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fresponse(soap, status, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((n & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = n;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static const char*
+soap_set_validation_fault(struct soap *soap, const char *s, const char *t)
+{ if (*soap->tag)
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s in element <%s>", s, t?t:SOAP_STR_EOS, soap->tag);
+  else
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s", s, t?t:SOAP_STR_EOS);
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_fault(struct soap *soap)
+{ const char **c = soap_faultcode(soap);
+  const char **s = soap_faultstring(soap);
+  if (!*c && !*s && soap->fseterror)
+    soap->fseterror(soap, c, s);
+  if (!*c)
+  { if (soap->version == 2)
+      *c = "SOAP-ENV:Sender";
+    else
+      *c = "SOAP-ENV:Client";
+  }
+  if (*s)
+    return;
+  switch (soap->error)
+  {
+#ifndef WITH_LEAN
+    case SOAP_CLI_FAULT:
+      *s = "Client fault";
+      break;
+    case SOAP_SVR_FAULT:
+      *s = "Server fault";
+      break;
+    case SOAP_TAG_MISMATCH:
+      *s = soap_set_validation_fault(soap, "tag name or namespace mismatch", NULL);
+      break;
+    case SOAP_TYPE:
+      *s = soap_set_validation_fault(soap, "data type mismatch ", soap->type);
+      break;
+    case SOAP_SYNTAX_ERROR:
+      *s = "Well-formedness violation";
+      break;
+    case SOAP_NO_TAG:
+      *s = "No XML element tag";
+      break;
+    case SOAP_MUSTUNDERSTAND:
+      *c = "SOAP-ENV:MustUnderstand";
+      sprintf(soap->msgbuf, "The data in element '%s' must be understood but cannot be handled", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_VERSIONMISMATCH:
+      *c = "SOAP-ENV:VersionMismatch";
+      *s = "SOAP version mismatch or invalid SOAP message";
+      break;
+    case SOAP_DATAENCODINGUNKNOWN:
+      *c = "SOAP-ENV:DataEncodingUnknown";
+      *s = "Unsupported SOAP data encoding";
+      break;
+    case SOAP_NAMESPACE:
+      *s = soap_set_validation_fault(soap, "namespace mismatch", NULL);
+      break;
+    case SOAP_USER_ERROR:
+      *s = "User error";
+      break;
+    case SOAP_FATAL_ERROR:
+      *s = "Fatal error";
+      break;
+    case SOAP_NO_METHOD:
+      sprintf(soap->msgbuf, "Method '%s' not implemented: method name or namespace not recognized", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_GET_METHOD:
+      *s = "HTTP GET method not implemented";
+      break;
+    case SOAP_EOM:
+      *s = "Out of memory";
+      break;
+    case SOAP_IOB:
+      *s = "Array index out of bounds";
+      break;
+    case SOAP_NULL:
+      *s = soap_set_validation_fault(soap, "nil not allowed", NULL);
+      break;
+    case SOAP_DUPLICATE_ID:
+      *s = soap_set_validation_fault(soap, "multiple definitions of id ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:DuplicateID";
+      break;
+    case SOAP_MISSING_ID:
+      *s = soap_set_validation_fault(soap, "missing id for ref ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:MissingID";
+      break;
+    case SOAP_HREF:
+      *s = soap_set_validation_fault(soap, "incompatible object ref ", soap->id);
+      break;
+    case SOAP_FAULT:
+      break;
+#ifndef WITH_NOIO
+    case SOAP_UDP_ERROR:
+      *s = "Message too large for UDP packet";
+      break;
+    case SOAP_TCP_ERROR:
+      *s = tcp_error(soap);
+      break;
+#endif
+    case SOAP_HTTP_ERROR:
+      *s = "HTTP error";
+      break;
+    case SOAP_SSL_ERROR:
+#ifdef WITH_OPENSSL
+      *s = "SSL error";
+#else
+      *s = "OpenSSL not installed: recompile with -DWITH_OPENSSL";
+#endif
+      break;
+    case SOAP_PLUGIN_ERROR:
+      *s = "Plugin registry error";
+      break;
+    case SOAP_DIME_ERROR:
+      *s = "DIME format error";
+      break;
+    case SOAP_DIME_HREF:
+      *s = "DIME href to missing attachment";
+      break;
+    case SOAP_DIME_MISMATCH:
+      *s = "DIME version/transmission error";
+      break;
+    case SOAP_DIME_END:
+      *s = "End of DIME error";
+      break;
+    case SOAP_MIME_ERROR:
+      *s = "MIME format error";
+      break;
+    case SOAP_MIME_HREF:
+      *s = "MIME href to missing attachment";
+      break;
+    case SOAP_MIME_END:
+      *s = "End of MIME error";
+      break;
+    case SOAP_ZLIB_ERROR:
+#ifdef WITH_ZLIB
+      sprintf(soap->msgbuf, "Zlib/gzip error: '%s'", soap->d_stream.msg?soap->d_stream.msg:"");
+      *s = soap->msgbuf;
+#else
+      *s = "Zlib/gzip not installed for (de)compression: recompile with -DWITH_GZIP";
+#endif
+      break;
+    case SOAP_REQUIRED:
+      *s = soap_set_validation_fault(soap, "missing required attribute", NULL);
+      break;
+    case SOAP_PROHIBITED:
+      *s = soap_set_validation_fault(soap, "prohibited attribute present", NULL);
+      break;
+    case SOAP_OCCURS:
+      *s = soap_set_validation_fault(soap, "min/maxOccurs violation", NULL);
+      break;
+    case SOAP_LENGTH:
+      *s = soap_set_validation_fault(soap, "content length violation", NULL);
+      break;
+    case SOAP_STOP:
+      *s = "Stopped: no response sent";
+      break;
+#endif
+    case SOAP_EOF:
+#ifndef WITH_NOIO
+      sprintf(soap->msgbuf, "End of file or no input: '%s'", soap_strerror(soap));
+      *s = soap->msgbuf;
+      break;
+#else
+      *s = "End of file or no input";
+      break;
+#endif
+    default:
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+      if (soap->error > 200 && soap->error < 600)
+      { sprintf(soap->msgbuf, "HTTP Error: %d %s", soap->error, http_error(soap, soap->error));
+        *s = soap->msgbuf;
+      }
+      else
+#endif
+#endif
+      { sprintf(soap->msgbuf, "Error %d", soap->error);
+        *s = soap->msgbuf;
+      }
+    }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_fault(struct soap *soap)
+{ register int status = soap->error;
+  int r = 1;
+  if (status == SOAP_STOP)
+    return status;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Sending back fault struct for error code %d\n", soap->error));
+  soap->keep_alive = 0; /* to terminate connection */
+  soap_set_fault(soap);
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+  if (soap_valid_socket(soap->socket))
+  { struct timeval timeout;
+    fd_set rfd, sfd;
+    timeout.tv_sec = 0;
+    timeout.tv_usec = 0;
+    FD_ZERO(&rfd);
+    FD_ZERO(&sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, NULL, &timeout);
+    if (r > 0)
+    { if (!FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       || (FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        && recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) < 0))
+        r = 0;
+    }
+  }
+#endif
+#endif
+  if ((status != SOAP_EOF || (!soap->recv_timeout && !soap->send_timeout)) && r > 0)
+  { soap->error = SOAP_OK;
+    soap_serializeheader(soap);
+    soap_serializefault(soap);
+    soap_begin_count(soap);
+    if (soap->mode & SOAP_IO_LENGTH)
+    { soap_envelope_begin_out(soap);
+      soap_putheader(soap);
+      soap_body_begin_out(soap);
+      soap_putfault(soap);
+      soap_body_end_out(soap);
+      soap_envelope_end_out(soap);
+    }
+    soap_end_count(soap);
+    if (soap_response(soap, status)
+     || soap_envelope_begin_out(soap)
+     || soap_putheader(soap)
+     || soap_body_begin_out(soap)
+     || soap_putfault(soap)
+     || soap_body_end_out(soap)
+     || soap_envelope_end_out(soap))
+      return soap_closesock(soap);
+    soap_end_send(soap);
+  }
+  soap->error = status;
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_fault(struct soap *soap)
+{ register int status = soap->error;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Receiving SOAP Fault\n"));
+  soap->error = SOAP_OK;
+  if (soap_getfault(soap))
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Error: soap_get_soapfault() failed. Is this a SOAP message at all?\n"));
+    *soap_faultcode(soap) = (soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client");
+    soap->error = status;
+    soap_set_fault(soap);
+  }
+  else
+  { register const char *s = *soap_faultcode(soap);
+    if (!soap_match_tag(soap, s, "SOAP-ENV:Server") || !soap_match_tag(soap, s, "SOAP-ENV:Receiver"))
+      status = SOAP_SVR_FAULT; 
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:Client") || !soap_match_tag(soap, s, "SOAP-ENV:Sender"))
+      status = SOAP_CLI_FAULT;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:MustUnderstand"))
+      status = SOAP_MUSTUNDERSTAND;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:VersionMismatch"))
+      status = SOAP_VERSIONMISMATCH;
+    else
+    { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Fault code %s\n", s));
+      status = SOAP_FAULT;
+    }
+    if (soap_body_end_in(soap)
+     || soap_envelope_end_in(soap)
+     || soap_end_recv(soap))
+      return soap_closesock(soap);
+    soap->error = status;
+  }
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_empty_response(struct soap *soap)
+{ soap->count = 0;
+  if (soap_response(soap, SOAP_OK) || soap_end_send(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_empty_response(struct soap *soap)
+{ if (soap_begin_recv(soap) || soap_end_recv(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+soap_strerror(struct soap *soap)
+{ register int err = soap->errnum;
+  if (err)
+  {
+#ifndef WIN32
+    return strerror(err);
+#else
+    FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, (LPTSTR)&soap->errorstr, sizeof(soap->errorstr), NULL);
+    return soap->errorstr;
+#endif
+  }
+  return "Operation interrupted or timed out";
+}
+#endif
+#endif 
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_set_error(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail, int soaperror)
+{ *soap_faultcode(soap) = faultcode;
+  if (faultsubcode)
+    *soap_faultsubcode(soap) = faultsubcode;
+  *soap_faultstring(soap) = faultstring;
+  if (faultdetail && *faultdetail)
+  { register const char **s = soap_faultdetail(soap);
+    if (s)
+      *s = faultdetail;
+  }
+  return soap->error = soaperror;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_sender_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_receiver_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_copy_fault(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ char *r = NULL, *s = NULL, *t = NULL;
+  if (faultsubcode)
+    r = soap_strdup(soap, faultsubcode);
+  if (faultstring)
+    s = soap_strdup(soap, faultstring);
+  if (faultdetail)
+    t = soap_strdup(soap, faultdetail);
+  return soap_set_error(soap, faultcode, r, s, t, SOAP_FAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_sender_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_receiver_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault(struct soap *soap, FILE *fd)
+{ if (soap_check_state(soap))
+    fprintf(fd, "Error: soap struct not initialized\n");
+  else if (soap->error)
+  { const char *c, *v = NULL, *s, **d;
+    d = soap_faultcode(soap);
+    if (!*d)
+      soap_set_fault(soap);
+    c = *d;
+    if (soap->version == 2)
+      v = *soap_faultsubcode(soap);
+    s = *soap_faultstring(soap);
+    d = soap_faultdetail(soap);
+    fprintf(fd, "%s%d fault: %s [%s]\n\"%s\"\nDetail: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, c, v ? v : "no subcode", s ? s : "[no reason]", d && *d ? *d : "[no detail]");
+  }
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault_location(struct soap *soap, FILE *fd)
+{ 
+#ifndef WITH_LEAN
+  int i, j, c1, c2;
+  if (soap->error && soap->buflen > 0)
+  { i = (int)soap->bufidx - 1;
+    if (i <= 0)
+      i = 0;
+    c1 = soap->buf[i];
+    soap->buf[i] = '\0';
+    if ((int)soap->buflen >= i + 1024)
+      j = i + 1023;
+    else
+      j = (int)soap->buflen - 1;
+    c2 = soap->buf[j];
+    soap->buf[j] = '\0';
+    fprintf(fd, "%s%c\n** HERE **\n", soap->buf, c1);
+    if (soap->bufidx < soap->buflen)
+      fprintf(fd, "%s\n", soap->buf + soap->bufidx);
+    soap->buf[i] = c1;
+    soap->buf[j] = c2;
+  }
+#endif
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void *arg)
+{ register struct soap_plugin *p;
+  register int r;
+  if (!(p = (struct soap_plugin*)SOAP_MALLOC(soap, sizeof(struct soap_plugin))))
+    return soap->error = SOAP_EOM;
+  p->id = NULL;
+  p->data = NULL;
+  p->fcopy = NULL;
+  p->fdelete = NULL;
+  r = fcreate(soap, p, arg);
+  if (!r && p->fdelete)
+  { p->next = soap->plugins;
+    soap->plugins = p;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Registered '%s' plugin\n", p->id));
+    return SOAP_OK;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not register plugin '%s': plugin returned error %d (or fdelete callback not set)\n", p->id?p->id:"?", r));
+  SOAP_FREE(soap, p);
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static void *
+fplugin(struct soap *soap, const char *id)
+{ register struct soap_plugin *p;
+  for (p = soap->plugins; p; p = p->next)
+    if (p->id == id || !strcmp(p->id, id))
+      return p->data;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void *
+SOAP_FMAC2
+soap_lookup_plugin(struct soap *soap, const char *id)
+{ return soap->fplugin(soap, id);
+}
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap()
+{ soap_init(this);
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	C++ soap struct methods
+ *
+\******************************************************************************/
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode mode)
+{ soap_init1(this, mode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode imode, soap_mode omode)
+{ soap_init2(this, imode, omode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(struct soap& soap)
+{ soap_copy_context(this, &soap);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::~soap()
+{ soap_destroy(this);
+  soap_end(this);
+  soap_done(this);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/gsoap-palm/palmsoap2.cpp b/gsoap-palm/palmsoap2.cpp
new file mode 100644
index 0000000..6f26dee
--- /dev/null
+++ b/gsoap-palm/palmsoap2.cpp
@@ -0,0 +1,13449 @@
+#define PALM_2
+/*
+
+stdsoap2.c[pp] 2.7.6e
+
+gSOAP runtime
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+Contributors:
+
+Wind River Systems Inc., for the following additions under gSOAP public license:
+  - vxWorks compatible	(#define VXWORKS)
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+Installation note:
+
+Win32 build needs winsock.dll (Visual C++ "wsock32.lib")
+To do this in Visual C++ 6.0, go to "Project", "settings", select the "Link"
+tab (the project file needs to be selected in the file view) and add
+"wsock32.lib" to the "Object/library modules" entry
+
+On Mac OS X with gcc (GCC) 3.1 20020420 (prerelease) you MUST compile with
+-fstack_check when using -O2 because gcc 3.1 has a bug that smashes the stack
+when locally allocated data exceeds 64K.
+
+*/
+
+#ifdef AS400
+# pragma convert(819)	/* EBCDIC to ASCII */
+#endif
+
+#include "stdsoap2.h"
+
+#ifdef __cplusplus
+SOAP_SOURCE_STAMP("@(#) stdsoap2.cpp ver 2.7.6e 2006-02-18 12:00:00 GMT")
+extern "C" {
+#else
+SOAP_SOURCE_STAMP("@(#) stdsoap2.c ver 2.7.6e 2006-02-18 12:00:00 GMT")
+#endif
+
+/* 8bit character representing unknown/nonrepresentable character data (e.g. not supported by current locale with multibyte support enabled) */
+#ifndef SOAP_UNKNOWN_CHAR
+#define SOAP_UNKNOWN_CHAR (127)
+#endif
+
+/*      EOF=-1 */
+#define SOAP_LT (soap_wchar)(-2) /* XML character '<' */
+#define SOAP_TT (soap_wchar)(-3) /* XML character '</' */
+#define SOAP_GT (soap_wchar)(-4) /* XML character '>' */
+#define SOAP_QT (soap_wchar)(-5) /* XML character '"' */
+#define SOAP_AP (soap_wchar)(-6) /* XML character ''' */
+
+#define soap_blank(c)		((c) >= 0 && (c) <= 32)
+#define soap_notblank(c)	((c) > 32)
+#define soap_hash_ptr(p)	(((unsigned long)(p) >> 3) & (SOAP_PTRHASH - 1))
+
+#ifdef SOAP_DEBUG
+static void soap_init_logs(struct soap*);
+static void soap_close_logfile(struct soap*, int);
+static void soap_set_logfile(struct soap*, int, const char*);
+static void soap_free_mht(struct soap*);
+static void soap_track_unlink(struct soap*, const void*);
+#endif
+
+#ifndef PALM_2
+static int soap_set_error(struct soap*, const char*, const char*, const char*, const char*, int);
+static int soap_copy_fault(struct soap*, const char*, const char*, const char*, const char*);
+static int soap_getattrval(struct soap*, char*, size_t, soap_wchar);
+#endif
+
+#ifndef PALM_1
+static soap_wchar soap_char(struct soap*);
+static soap_wchar soap_get_pi(struct soap*);
+static int soap_isxdigit(int);
+static void *fplugin(struct soap*, const char*);
+#ifndef WITH_NOIDREF
+static void soap_update_ptrs(struct soap*, char*, char*, char*, char*);
+static int soap_has_copies(struct soap*, const char*, const char*);
+static void soap_init_iht(struct soap*);
+static void soap_free_iht(struct soap*);
+static void soap_init_pht(struct soap*);
+static void soap_free_pht(struct soap*);
+#endif
+#endif
+
+#ifndef WITH_LEAN
+static const char *soap_set_validation_fault(struct soap*, const char*, const char*);
+static int soap_isnumeric(struct soap*, const char*);
+static time_t soap_timegm(struct tm*);
+static struct soap_nlist *soap_lookup_ns(struct soap *soap, const char *tag, size_t n);
+static struct soap_nlist *soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized);
+static void soap_pop_ns(struct soap *soap);
+static void soap_utilize_ns(struct soap *soap, const char *tag, size_t n);
+#endif
+
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart *soap_new_multipart(struct soap*, struct soap_multipart**, struct soap_multipart**, char*, size_t);
+static int soap_putdimefield(struct soap*, const char*, size_t);
+static char *soap_getdimefield(struct soap*, size_t);
+static void soap_select_mime_boundary(struct soap*);
+static int soap_valid_mime_boundary(struct soap*);
+static int soap_match_cid(struct soap*, const char*, const char*);
+static void soap_resolve_attachment(struct soap*, struct soap_multipart*);
+#endif
+#endif
+
+#ifdef WITH_GZIP
+static int soap_getgziphdr(struct soap*);
+#endif
+
+#ifdef WITH_OPENSSL
+static int ssl_init_done = 0;
+static int ssl_auth_init(struct soap*);
+static int ssl_verify_callback(int, X509_STORE_CTX*);
+static int ssl_password(char*, int, int, void *);
+static const char *ssl_error(struct soap*, int);
+/* This callback is included for future references. It should not be deleted
+static DH *ssl_tmp_dh(SSL*, int, int);
+*/
+#endif
+
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char *soap_decode(char*, size_t, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar soap_getchunkchar(struct soap*);
+static const char *http_error(struct soap*, int);
+static int http_post(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
+static int http_get(struct soap*);
+static int http_send_header(struct soap*, const char*);
+static int http_post_header(struct soap*, const char*, const char*);
+static int http_response(struct soap*, int, size_t);
+static int http_parse(struct soap*);
+static int http_parse_header(struct soap*, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int fsend(struct soap*, const char*, size_t);
+static size_t frecv(struct soap*, char*, size_t);
+static int tcp_init(struct soap*);
+static const char *tcp_error(struct soap*);
+#ifndef WITH_IPV6
+static int tcp_gethost(struct soap*, const char *addr, struct in_addr *inaddr);
+#endif
+static int tcp_connect(struct soap*, const char *endpoint, const char *host, int port);
+static int tcp_accept(struct soap*, int, struct sockaddr*, int*);
+static int tcp_disconnect(struct soap*);
+static int tcp_closesocket(struct soap*, SOAP_SOCKET);
+static int tcp_shutdownsocket(struct soap*, SOAP_SOCKET, int);
+static const char *soap_strerror(struct soap*);
+#endif
+#endif
+
+#if defined(PALM) && !defined(PALM_2)
+unsigned short errno;
+#endif
+
+#ifndef PALM_1
+static const char soap_env1[42] = "http://schemas.xmlsoap.org/soap/envelope/";
+static const char soap_enc1[42] = "http://schemas.xmlsoap.org/soap/encoding/";
+static const char soap_env2[40] = "http://www.w3.org/2003/05/soap-envelope";
+static const char soap_enc2[40] = "http://www.w3.org/2003/05/soap-encoding";
+static const char soap_rpc[35] = "http://www.w3.org/2003/05/soap-rpc";
+#endif
+
+#ifndef PALM_1
+const struct soap_double_nan soap_double_nan = {0xFFFFFFFF, 0xFFFFFFFF};
+static const char soap_base64o[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+static const char soap_base64i[81] = "\76XXX\77\64\65\66\67\70\71\72\73\74\75XXXXXXX\00\01\02\03\04\05\06\07\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31XXXXXX\32\33\34\35\36\37\40\41\42\43\44\45\46\47\50\51\52\53\54\55\56\57\60\61\62\63";
+#endif
+
+#ifndef WITH_LEAN
+static const char soap_indent[11] = "\n\t\t\t\t\t\t\t\t\t";
+/* Alternative indentation form for SOAP_XML_INDENT:
+static const char soap_indent[21] = "\n                   ";
+*/
+#endif
+
+static const char soap_padding[4] = "\0\0\0";
+#define SOAP_STR_PADDING (soap_padding)
+#define SOAP_STR_EOS (soap_padding)
+#define SOAP_NON_NULL (soap_padding)
+
+#ifndef WITH_LEAN
+static const struct soap_code_map html_entity_codes[] = /* entities for XHTML parsing */
+{ { 160, "nbsp" },
+  { 161, "iexcl" },
+  { 162, "cent" },
+  { 163, "pound" },
+  { 164, "curren" },
+  { 165, "yen" },
+  { 166, "brvbar" },
+  { 167, "sect" },
+  { 168, "uml" },
+  { 169, "copy" },
+  { 170, "ordf" },
+  { 171, "laquo" },
+  { 172, "not" },
+  { 173, "shy" },
+  { 174, "reg" },
+  { 175, "macr" },
+  { 176, "deg" },
+  { 177, "plusmn" },
+  { 178, "sup2" },
+  { 179, "sup3" },
+  { 180, "acute" },
+  { 181, "micro" },
+  { 182, "para" },
+  { 183, "middot" },
+  { 184, "cedil" },
+  { 185, "sup1" },
+  { 186, "ordm" },
+  { 187, "raquo" },
+  { 188, "frac14" },
+  { 189, "frac12" },
+  { 190, "frac34" },
+  { 191, "iquest" },
+  { 192, "Agrave" },
+  { 193, "Aacute" },
+  { 194, "Acirc" },
+  { 195, "Atilde" },
+  { 196, "Auml" },
+  { 197, "Aring" },
+  { 198, "AElig" },
+  { 199, "Ccedil" },
+  { 200, "Egrave" },
+  { 201, "Eacute" },
+  { 202, "Ecirc" },
+  { 203, "Euml" },
+  { 204, "Igrave" },
+  { 205, "Iacute" },
+  { 206, "Icirc" },
+  { 207, "Iuml" },
+  { 208, "ETH" },
+  { 209, "Ntilde" },
+  { 210, "Ograve" },
+  { 211, "Oacute" },
+  { 212, "Ocirc" },
+  { 213, "Otilde" },
+  { 214, "Ouml" },
+  { 215, "times" },
+  { 216, "Oslash" },
+  { 217, "Ugrave" },
+  { 218, "Uacute" },
+  { 219, "Ucirc" },
+  { 220, "Uuml" },
+  { 221, "Yacute" },
+  { 222, "THORN" },
+  { 223, "szlig" },
+  { 224, "agrave" },
+  { 225, "aacute" },
+  { 226, "acirc" },
+  { 227, "atilde" },
+  { 228, "auml" },
+  { 229, "aring" },
+  { 230, "aelig" },
+  { 231, "ccedil" },
+  { 232, "egrave" },
+  { 233, "eacute" },
+  { 234, "ecirc" },
+  { 235, "euml" },
+  { 236, "igrave" },
+  { 237, "iacute" },
+  { 238, "icirc" },
+  { 239, "iuml" },
+  { 240, "eth" },
+  { 241, "ntilde" },
+  { 242, "ograve" },
+  { 243, "oacute" },
+  { 244, "ocirc" },
+  { 245, "otilde" },
+  { 246, "ouml" },
+  { 247, "divide" },
+  { 248, "oslash" },
+  { 249, "ugrave" },
+  { 250, "uacute" },
+  { 251, "ucirc" },
+  { 252, "uuml" },
+  { 253, "yacute" },
+  { 254, "thorn" },
+  { 255, "yuml" },
+  {   0, NULL }
+};
+#endif
+
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+static const struct soap_code_map h_error_codes[] =
+{
+#ifdef HOST_NOT_FOUND   
+  { HOST_NOT_FOUND, "Host not found" },
+#endif
+#ifdef TRY_AGAIN
+  { TRY_AGAIN, "Try Again" },
+#endif
+#ifdef NO_RECOVERY  
+  { NO_RECOVERY, "No Recovery" },
+#endif
+#ifdef NO_DATA
+  { NO_DATA, "No Data" },
+#endif
+#ifdef NO_ADDRESS
+  { NO_ADDRESS, "No Address" },
+#endif
+  { 0, NULL }
+};
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+static const struct soap_code_map h_http_error_codes[] =
+{ { 201, "Created" },
+  { 202, "Accepted" },
+  { 203, "Non-Authoritative Information" },
+  { 204, "No Content" },
+  { 205, "Reset Content" },
+  { 206, "Partial Content" },
+  { 300, "Multiple Choices" },
+  { 301, "Moved Permanently" },
+  { 302, "Found" },
+  { 303, "See Other" },
+  { 304, "Not Modified" },
+  { 305, "Use Proxy" },
+  { 307, "Temporary Redirect" },
+  { 400, "Bad Request" },
+  { 401, "Unauthorized" },
+  { 402, "Payment Required" },
+  { 403, "Forbidden" },
+  { 404, "Not Found" },
+  { 405, "Method Not Allowed" },
+  { 406, "Not Acceptable" },
+  { 407, "Proxy Authentication Required" },
+  { 408, "Request Time-out" },
+  { 409, "Conflict" },
+  { 410, "Gone" },
+  { 411, "Length Required" },
+  { 412, "Precondition Failed" },
+  { 413, "Request Entity Too Large" },
+  { 414, "Request-URI Too Large" },
+  { 415, "Unsupported Media Type" },
+  { 416, "Requested range not satisfiable" },
+  { 417, "Expectation Failed" },
+  { 500, "Internal Server Error" },
+  { 501, "Not Implemented" },
+  { 502, "Bad Gateway" },
+  { 503, "Service Unavailable" },
+  { 504, "Gateway Time-out" },
+  { 505, "HTTP Version not supported" },
+  {   0, NULL }
+};
+#endif
+#endif
+
+#ifdef WITH_OPENSSL
+static const struct soap_code_map h_ssl_error_codes[] =
+{
+#define _SSL_ERROR(e) { e, #e }
+  _SSL_ERROR(SSL_ERROR_SSL),
+  _SSL_ERROR(SSL_ERROR_ZERO_RETURN),
+  _SSL_ERROR(SSL_ERROR_WANT_READ),
+  _SSL_ERROR(SSL_ERROR_WANT_WRITE),
+  _SSL_ERROR(SSL_ERROR_WANT_CONNECT),
+  _SSL_ERROR(SSL_ERROR_WANT_X509_LOOKUP),
+  _SSL_ERROR(SSL_ERROR_SYSCALL),
+  { 0, NULL }
+};
+#endif
+
+#ifndef WITH_LEANER
+static const struct soap_code_map mime_codes[] =
+{ { SOAP_MIME_7BIT,		"7bit" },
+  { SOAP_MIME_8BIT,		"8bit" },
+  { SOAP_MIME_BINARY,		"binary" },
+  { SOAP_MIME_QUOTED_PRINTABLE, "quoted-printable" },
+  { SOAP_MIME_BASE64,		"base64" },
+  { SOAP_MIME_IETF_TOKEN,	"ietf-token" },
+  { SOAP_MIME_X_TOKEN,		"x-token" },
+  { 0,				NULL }
+};
+#endif
+
+#ifdef WIN32
+static int tcp_done = 0;
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+fsend(struct soap *soap, const char *s, size_t n)
+{ register int nwritten;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  if (soap->os)
+  { soap->os->write(s, n);
+    if (soap->os->good())
+      return SOAP_OK;
+    return SOAP_EOF;
+  }
+#endif
+  while (n)
+  { if (soap_valid_socket(soap->socket))
+    { 
+#ifndef WITH_LEAN
+      if (soap->send_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->send_timeout > 0)
+        { timeout.tv_sec = soap->send_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->send_timeout/1000000;
+          timeout.tv_usec = -soap->send_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { register int r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            return SOAP_EOF;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+          { soap->errnum = soap_socket_errno;
+            return SOAP_EOF;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+        nwritten = SSL_write(soap->ssl, s, n);
+      else if (soap->bio)
+        nwritten = BIO_write(soap->bio, s, n);
+      else
+#endif
+#ifdef WITH_UDP
+      if ((soap->omode & SOAP_IO_UDP))
+      { if (soap->peerlen)
+	  nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+        else
+	  nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	/* retry and back-off algorithm */
+	/* TODO: this is not very clear from specs so verify and limit conditions under which we should loop (e.g. ENOBUFS) */
+	if (nwritten < 0)
+        { struct timeval timeout;
+          fd_set fd;
+	  int udp_repeat;
+	  int udp_delay;
+          if ((soap->connect_flags & SO_BROADCAST))
+	    udp_repeat = 3; /* SOAP-over-UDP MULTICAST_UDP_REPEAT - 1 */
+          else
+	    udp_repeat = 1; /* SOAP-over-UDP UNICAST_UDP_REPEAT - 1 */
+	  udp_delay = (soap_random % 201) + 50; /* UDP_MIN_DELAY .. UDP_MAX_DELAY */
+	  do
+          { timeout.tv_sec = 0;
+            timeout.tv_usec = 1000 * udp_delay; /* ms */
+            FD_ZERO(&fd);
+            FD_SET((SOAP_SOCKET)soap->socket, &fd);
+            select((SOAP_SOCKET)(soap->socket + 1), NULL, NULL, &fd, &timeout);
+	    if (soap->peerlen)
+	      nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+            else
+	      nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	    udp_delay <<= 1;
+	    if (udp_delay > 500) /* UDP_UPPER_DELAY */
+	      udp_delay = 500;
+	  }
+	  while (nwritten < 0 && --udp_repeat > 0);
+	}
+      }
+      else
+#endif
+#if !defined(PALM) && !defined(AS400)
+        nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+#else
+        nwritten = send((SOAP_SOCKET)soap->socket, (void*)s, n, soap->socket_flags);
+#endif
+      if (nwritten <= 0)
+      {
+#ifdef WITH_OPENSSL
+	int err;
+        if (soap->ssl && (err = SSL_get_error(soap->ssl, nwritten)) != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return SOAP_EOF;
+#endif
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EWOULDBLOCK && soap_socket_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_socket_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    else
+    {
+#ifdef WITH_FASTCGI
+      nwritten = fwrite((void*)s, 1, n, stdout);
+      fflush(stdout);
+#else
+#ifdef UNDER_CE
+      nwritten = fwrite(s, 1, n, soap->sendfd);
+#else
+#ifdef VXWORKS
+#ifdef WMW_RPM_IO
+      if (soap->rpmreqid)
+        nwritten = (httpBlockPut(soap->rpmreqid, s, n) == 0) ? n : -1; 
+      else
+#endif
+        nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w"));
+#else
+      nwritten = write((SOAP_SOCKET)soap->sendfd, s, n);
+#endif
+#endif
+#endif
+      if (nwritten <= 0)
+      { if (soap_errno != SOAP_EINTR && soap_errno != SOAP_EWOULDBLOCK && soap_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    n -= nwritten;
+    s += nwritten;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_raw(struct soap *soap, const char *s, size_t n)
+{ if (!n)
+    return SOAP_OK;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { soap->count += n;
+#ifndef WITH_LEANER
+    if (soap->fpreparesend && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+  if (soap->mode & SOAP_IO)
+  { register size_t i = SOAP_BUFLEN - soap->bufidx;
+    while (n >= i)
+    { memcpy(soap->buf + soap->bufidx, s, i);
+      soap->bufidx = SOAP_BUFLEN;
+      if (soap_flush(soap))
+        return soap->error;
+      s += i;
+      n -= i;
+      i = SOAP_BUFLEN;
+    }
+    memcpy(soap->buf + soap->bufidx, s, n);
+    soap->bufidx += n;
+    return SOAP_OK;
+  }
+  return soap_flush_raw(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush(struct soap *soap)
+{ register int n = soap->bufidx;
+  if (n)
+  { soap->bufidx = 0;
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { soap->d_stream.next_in = (Byte*)soap->buf;
+      soap->d_stream.avail_in = (unsigned int)n;
+#ifdef WITH_GZIP
+      soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)n);
+#endif
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating %u bytes\n", soap->d_stream.avail_in));
+        if (deflate(&soap->d_stream, Z_NO_FLUSH) != Z_OK)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+          return soap->error = SOAP_ZLIB_ERROR;
+        }
+        if (!soap->d_stream.avail_out)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN))
+            return soap->error;
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (soap->d_stream.avail_in);
+    }
+    else
+#endif
+      return soap_flush_raw(soap, soap->buf, n);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush_raw(struct soap *soap, const char *s, size_t n)
+{ if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+  { register char *t;
+    if (!(t = (char*)soap_push_block(soap, n)))
+      return soap->error = SOAP_EOM;
+    memcpy(t, s, n);
+#ifndef WITH_LEANER
+    if (soap->fpreparesend)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+  { char t[16];
+    sprintf(t, "\r\n%lX\r\n" + (soap->chunksize ? 0 : 2), (unsigned long)n);
+    DBGMSG(SENT, t, strlen(t));
+    if ((soap->error = soap->fsend(soap, t, strlen(t))))
+      return soap->error;
+    soap->chunksize += n;
+  }
+  DBGMSG(SENT, s, n);
+#endif
+  return soap->error = soap->fsend(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send(struct soap *soap, const char *s)
+{ if (s)
+    return soap_send_raw(soap, s, strlen(s));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send2(struct soap *soap, const char *s1, const char *s2)
+{ if (soap_send(soap, s1))
+    return soap->error;
+  return soap_send(soap, s2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send3(struct soap *soap, const char *s1, const char *s2, const char *s3)
+{ if (soap_send(soap, s1)
+   || soap_send(soap, s2))
+    return soap->error;
+  return soap_send(soap, s3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static size_t
+frecv(struct soap *soap, char *s, size_t n)
+{ register int r;
+  soap->errnum = 0;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  if (soap->is)
+  { if (soap->is->good())
+      return soap->is->read(s, n).gcount();
+    return 0;
+  }
+#endif
+  if (soap_valid_socket(soap->socket))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->recv_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->recv_timeout > 0)
+        { timeout.tv_sec = soap->recv_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->recv_timeout/1000000;
+          timeout.tv_usec = -soap->recv_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+	  { soap->errnum = 0;
+            return 0;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+	  { soap->errnum = soap_socket_errno;
+            return 0;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+      { int err;
+	r = SSL_read(soap->ssl, s, n);
+        if (r > 0)
+          return (size_t)r;
+	err = SSL_get_error(soap->ssl, r);
+	if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return 0;
+      }
+      else if (soap->bio)
+      { r = BIO_read(soap->bio, s, n);
+        if (r > 0)
+          return (size_t)r;
+        return 0;
+      }
+      else
+#endif
+      { 
+#ifdef WITH_UDP
+        if ((soap->omode & SOAP_IO_UDP))
+        { SOAP_SOCKLEN_T k = (SOAP_SOCKLEN_T)sizeof(soap->peer);
+	  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+          r = recvfrom((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, &k);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+	  soap->peerlen = (size_t)k;
+#ifndef WITH_IPV6
+          soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+          soap->port = (int)ntohs(soap->peer.sin_port);
+#endif
+        }
+	else
+#endif
+          r = recv((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+        if (r >= 0)
+          return (size_t)r;
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN && soap_socket_errno != SOAP_EWOULDBLOCK)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#ifndef WITH_LEAN
+      { struct timeval timeout;
+        fd_set fd;
+        timeout.tv_sec = 0;
+        timeout.tv_usec = 10000;
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+#ifdef WITH_OPENSSL
+        if (soap->ssl && SSL_get_error(soap->ssl, r) == SSL_ERROR_WANT_WRITE)
+          r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+        else
+          r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#else
+        r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#endif
+        if (r < 0 && soap_socket_errno != SOAP_EINTR)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#endif
+    }
+  }
+#ifdef WITH_FASTCGI
+  return fread(s, 1, n, stdin);
+#else
+#ifdef UNDER_CE
+  return fread(s, 1, n, soap->recvfd);
+#else
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    r = httpBlockRead(soap->rpmreqid, s, n);
+  else
+#endif
+  r = read((SOAP_SOCKET)soap->recvfd, s, n);
+  if (r >= 0)
+    return (size_t)r;
+  soap->errnum = soap_errno;
+  return 0;
+#endif
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar
+soap_getchunkchar(struct soap *soap)
+{ if (soap->bufidx < soap->buflen)
+    return soap->buf[soap->bufidx++];
+  soap->bufidx = 0;
+  soap->buflen = soap->chunkbuflen = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)soap->buflen, soap->socket));
+  DBGMSG(RECV, soap->buf, soap->buflen);
+  if (soap->buflen)
+    return soap->buf[soap->bufidx++];
+  return EOF;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+soap_isxdigit(int c)
+{ return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f');
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_raw(struct soap *soap)
+{ register size_t ret;
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { if (soap->d_stream.next_out == Z_NULL)
+      return EOF;
+    if (soap->d_stream.avail_in || !soap->d_stream.avail_out)
+    { register int r;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflating\n"));
+      soap->d_stream.next_out = (Byte*)soap->buf;
+      soap->d_stream.avail_out = SOAP_BUFLEN;
+      r = inflate(&soap->d_stream, Z_NO_FLUSH);
+      if (r == Z_OK || r == Z_STREAM_END)
+      { soap->bufidx = 0;
+        soap->buflen = SOAP_BUFLEN - soap->d_stream.avail_out;
+        if (soap->zlib_in == SOAP_ZLIB_GZIP)
+          soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+        if (r == Z_STREAM_END)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+          soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+          soap->d_stream.next_out = Z_NULL;
+        }
+        if (soap->buflen)
+        { soap->count += soap->buflen;
+          return SOAP_OK;
+        }
+      }
+      else if (r != Z_BUF_ERROR)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate error: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        soap->d_stream.next_out = Z_NULL;
+	soap->error = SOAP_ZLIB_ERROR;
+        return EOF;
+      }
+    }
+zlib_again:
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK && !soap->chunksize)
+    { memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+      soap->buflen = soap->z_buflen;
+    }
+  }
+#endif
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) /* read HTTP chunked transfer */
+  { 
+chunk_again:
+    if (soap->chunksize)
+    { soap->buflen = ret = soap->frecv(soap, soap->buf, soap->chunksize > SOAP_BUFLEN ? SOAP_BUFLEN : soap->chunksize);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk: read %u bytes\n", (unsigned int)ret));
+      DBGMSG(RECV, soap->buf, ret);
+      soap->bufidx = 0;
+      soap->chunksize -= ret;
+    }
+    else
+    { register soap_wchar c;
+      char *t, tmp[8];
+      t = tmp;
+      if (!soap->chunkbuflen)
+      { soap->chunkbuflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes (chunked) from socket %d\n", (unsigned int)ret, soap->socket));
+        DBGMSG(RECV, soap->buf, ret);
+        soap->bufidx = 0;
+        if (!ret)
+          return soap->ahead = EOF;
+      }
+      else
+        soap->bufidx = soap->buflen;
+      soap->buflen = soap->chunkbuflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk size (idx=%u len=%u)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen));
+      while (!soap_isxdigit((int)(c = soap_getchunkchar(soap))))
+        if ((int)c == EOF)
+	  return soap->ahead = EOF;
+      do
+        *t++ = (char)c;
+      while (soap_isxdigit((int)(c = soap_getchunkchar(soap))) && t - tmp < 7);
+      while ((int)c != EOF && c != '\n')
+        c = soap_getchunkchar(soap);
+      if ((int)c == EOF)
+        return soap->ahead = EOF;
+      *t = '\0';
+      soap->chunksize = soap_strtoul(tmp, &t, 16);
+      if (!soap->chunksize)
+      { soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of chunked message\n"));
+	while ((int)c != EOF && c != '\n')
+          c = soap_getchunkchar(soap);
+        return soap->ahead = EOF;
+      }
+      soap->buflen = soap->bufidx + soap->chunksize;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving buf len to idx=%u len=%u (%s)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen, tmp));
+      if (soap->buflen > soap->chunkbuflen)
+      { soap->buflen = soap->chunkbuflen;
+        soap->chunksize -= soap->buflen - soap->bufidx;
+        soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Passed end of buffer for chunked HTTP (%u bytes left)\n", (unsigned int)(soap->buflen - soap->bufidx)));
+      }
+      else if (soap->chunkbuflen)
+        soap->chunksize = 0;
+      ret = soap->buflen - soap->bufidx;
+      if (!ret)
+        goto chunk_again;
+    }
+  }
+  else
+#endif
+  { soap->bufidx = 0;
+    soap->buflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)ret, soap->socket));
+    DBGMSG(RECV, soap->buf, ret);
+  }
+#ifndef WITH_LEANER
+  if (soap->fpreparerecv && (soap->error = soap->fpreparerecv(soap, soap->buf, ret)))
+    return soap->error;
+#endif
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { register int r;
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = (unsigned int)ret;
+    soap->d_stream.next_out = (Byte*)soap->buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    r = inflate(&soap->d_stream, Z_NO_FLUSH);
+    if (r == Z_OK || r == Z_STREAM_END)
+    { soap->bufidx = 0;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = ret = SOAP_BUFLEN - soap->d_stream.avail_out;
+      if (soap->zlib_in == SOAP_ZLIB_GZIP)
+        soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %u bytes\n", (unsigned int)ret));
+      if (!ret)
+        goto zlib_again;
+      if (r == Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+        soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+        soap->d_stream.next_out = Z_NULL;
+      }
+    }
+    else
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to inflate: (%d) %s\n", r, soap->d_stream.msg?soap->d_stream.msg:""));
+      soap->d_stream.next_out = Z_NULL;
+      soap->error = SOAP_ZLIB_ERROR;
+      return EOF;
+    }
+  }
+#endif
+  soap->count += ret;
+  return !ret;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap->dime.buflen)
+    { char *s;
+      int i;
+      unsigned char tmp[12];
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME hdr for chunked DIME is in buffer\n"));
+      soap->count += soap->dime.buflen - soap->buflen;
+      soap->buflen = soap->dime.buflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Skip padding (%ld bytes)\n", -(long)soap->dime.size&3));
+      for (i = -(long)soap->dime.size&3; i > 0; i--)
+      { soap->bufidx++;
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME hdr for next chunk\n"));
+      s = (char*)tmp;
+      for (i = 12; i > 0; i--)
+      { *s++ = soap->buf[soap->bufidx++];
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      soap->dime.flags = tmp[0] & 0x7;
+      soap->dime.size = ((size_t)tmp[8] << 24) | ((size_t)tmp[9] << 16) | ((size_t)tmp[10] << 8) | ((size_t)tmp[11]);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME chunk (%u bytes)\n", (unsigned int)soap->dime.size));
+      if (soap->dime.flags & SOAP_DIME_CF)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "More chunking\n"));
+        soap->dime.chunksize = soap->dime.size;
+        if (soap->buflen - soap->bufidx >= soap->dime.size)
+        { soap->dime.buflen = soap->buflen;
+          soap->buflen = soap->bufidx + soap->dime.chunksize;
+        }
+        else
+          soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      }
+      else
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Last chunk\n"));
+        soap->dime.buflen = 0;
+        soap->dime.chunksize = 0;
+      }
+      soap->count = soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%u bytes remaining\n", (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+    if (soap->dime.chunksize)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get next DIME hdr for chunked DIME (%u bytes chunk)\n", (unsigned int)soap->dime.chunksize));
+      if (soap_recv_raw(soap))
+        return EOF;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->count -= soap->buflen - soap->bufidx - soap->dime.chunksize;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%lu bytes remaining, count=%u\n", (unsigned long)(soap->buflen-soap->bufidx), (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+  }
+#endif
+  return soap_recv_raw(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getchar(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+    return c;
+  }
+  return soap_get1(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const struct soap_code_map*
+SOAP_FMAC2
+soap_code(const struct soap_code_map *map, const char *str)
+{ if (str)
+  { while (map->string)
+    { if (!strcmp(str, map->string)) /* case sensitive */
+        return map;
+      map++;
+    }
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_int_code(const struct soap_code_map *map, const char *str, long other)
+{ while (map->string)
+  { if (!soap_tag_cmp(str, map->string)) /* case insensitive */
+      return map->code;
+    map++;
+  }
+  return other;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_str_code(const struct soap_code_map *map, long code)
+{ while (map->code != code && map->string)
+    map++;
+  return map->string;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_char(struct soap *soap)
+{ char tmp[8];
+  register int i;
+  register soap_wchar c;
+  register char *s = tmp;
+  for (i = 0; i < 7; i++)
+  { c = soap_get1(soap);
+    if (c == ';' || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+  }
+  *s = '\0';
+  if (*tmp == '#')
+  { if (tmp[1] == 'x' || tmp[1] == 'X')
+      return soap_strtol(tmp + 2, NULL, 16);
+    return atol(tmp + 1);
+  }
+  if (!strcmp(tmp, "lt"))
+    return '<';
+  if (!strcmp(tmp, "gt"))
+    return '>';
+  if (!strcmp(tmp, "amp"))
+    return '&';
+  if (!strcmp(tmp, "quot"))
+    return '"';
+  if (!strcmp(tmp, "apos"))
+    return '\'';
+#ifndef WITH_LEAN
+  return (soap_wchar)soap_int_code(html_entity_codes, tmp, SOAP_UNKNOWN_CHAR);
+#else
+  return SOAP_UNKNOWN_CHAR; /* use this to represent unknown code */
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get0(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx];
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get1(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx++];
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_get(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+  }
+  else
+    c = soap_get1(soap);
+  for (;;)
+  { if (soap->cdata)
+    { if (c == ']')
+      { c = soap_get1(soap);
+        if (c == ']')
+        { soap->cdata = 0;
+          soap_get1(soap); /* skip > */
+          c = soap_get1(soap);
+        }
+	else
+        { soap_revget1(soap);
+          return ']';
+        }
+      }
+      else
+        return c;
+    }
+    switch (c)
+    { case '<':
+        do c = soap_get1(soap);
+        while (soap_blank(c));
+        if (c == '!' || c == '?' || c == '%')
+        { register int k = 1;
+	  if (c == '!')
+          { c = soap_get1(soap);
+            if (c == '[')
+            { do c = soap_get1(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                break;
+              soap->cdata = 1;
+              c = soap_get1(soap);
+	      continue;
+            }
+            if (c == '-' && (c = soap_get1(soap)) == '-')
+            { do
+              { c = soap_get1(soap);
+                if (c == '-' && (c = soap_get1(soap)) == '-')
+                  break;
+              } while ((int)c != EOF);
+            }
+          }
+	  else if (c == '?')
+            c = soap_get_pi(soap);
+          while ((int)c != EOF)
+          { if (c == '<')
+	      k++;
+	    else if (c == '>')
+	    { if (--k <= 0)
+	        break;
+	    }
+	    c = soap_get1(soap);
+	  }
+	  if ((int)c == EOF)
+	    break;
+          c = soap_get1(soap);
+          continue;
+        }
+        if (c == '/')
+          return SOAP_TT;
+        soap_revget1(soap);
+        return SOAP_LT;
+      case '>':
+        return SOAP_GT;
+      case '"':
+        return SOAP_QT;
+      case '\'':
+        return SOAP_AP;
+      case '&':
+        return soap_char(soap) | 0x80000000;
+    }
+    break;
+  }
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_get_pi(struct soap *soap)
+{ char buf[64];
+  register char *s = buf;
+  register int i = sizeof(buf);
+  register soap_wchar c = soap_getchar(soap);
+  /* This is a quick way to parse XML PI and we could use a callback instead to
+   * enable applications to intercept processing instructions */
+  while ((int)c != EOF && c != '?')
+  { if (--i > 0)
+    { if (soap_blank(c))
+        c = ' ';
+      *s++ = (char)c;
+    }
+    c = soap_getchar(soap);
+  }
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML PI <?%s?>\n", buf));
+  if (!strncmp(buf, "xml ", 4))
+  { s = strstr(buf, " encoding=");
+    if (s && s[10])
+    { if (!soap_tag_cmp(s + 11, "iso-8859-1*")
+       || !soap_tag_cmp(s + 11, "latin1*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to latin1 encoding\n"));
+        soap->mode |= SOAP_ENC_LATIN;
+      }
+      else if (!soap_tag_cmp(s + 11, "utf-8*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to utf-8 encoding\n"));
+        soap->mode &= ~SOAP_ENC_LATIN;
+      }
+    }
+  }
+  if ((int)c != EOF)
+    c = soap_getchar(soap);
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_move(struct soap *soap, long n)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving %ld bytes forward\n", (long)n));
+  for (; n > 0; n--)
+    if ((int)soap_getchar(soap) == EOF)
+      return SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_tell(struct soap *soap)
+{ return soap->count - soap->buflen + soap->bufidx - (soap->ahead != 0);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pututf8(struct soap *soap, register unsigned long c)
+{ char tmp[16];
+  if (c > 0 && c < 0x80)
+  { *tmp = (char)c;
+    return soap_send_raw(soap, tmp, 1);
+  }
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { register char *t = tmp;
+    if (c < 0x0800)
+      *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+    else
+    { if (c < 0x010000)
+        *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+      else
+      { if (c < 0x200000)
+          *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+        else
+        { if (c < 0x04000000)
+            *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+          else
+          { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+            *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+        }     
+        *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+      }
+      *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+    }
+    *t++ = (char)(0x80 | (c & 0x3F));
+    *t = '\0';
+  }
+  else
+#endif
+    sprintf(tmp, "&#%lu;", c);
+  return soap_send(soap, tmp);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getutf8(struct soap *soap)
+{ register soap_wchar c, c1, c2, c3, c4;
+  c = soap->ahead;
+  if (c > 0xFF)
+  { soap->ahead = 0;
+    return c;
+  }
+again:
+  c = soap_get(soap);
+  if (c < 0x80 || (soap->mode & SOAP_ENC_LATIN))
+    return c;
+  c1 = soap_get1(soap);
+  if (c1 < 0x80)
+  { soap_revget1(soap); /* doesn't look like this is UTF8 */
+    return c;
+  }
+  c1 &= 0x3F;
+  if (c < 0xE0)
+    return ((soap_wchar)(c & 0x1F) << 6) | c1;
+  c2 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c == 0xEF && c1 == 0x3B && c2 == 0x3F)	/* ignore UTF-8 BOM */
+    goto again;
+  if (c < 0xF0)
+    return ((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2;
+  c3 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xF8)
+    return ((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3;
+  c4 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xFC)
+    return ((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4;
+  return ((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(soap_get1(soap) & 0x3F);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthex(struct soap *soap, const unsigned char *s, int n)
+{ char d[2];
+  register int i;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2hex(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (i = 0; i < n; i++)
+  { register int m = *s++;
+    d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0'));
+    m &= 0x0F;
+    d[1] = (char)(m + (m > 9 ? '7' : '0'));
+    if (soap_send_raw(soap, d, 2))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_gethex(struct soap *soap, int *n)
+{
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_hex2s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register char *s;
+    register int i, k;
+    if (soap_append_lab(soap, NULL, 0))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = soap->lablen;
+    for (i = 0; i < k; i++)
+    { register char d1, d2;
+      register soap_wchar c;
+      c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = (int)(soap->lablen - k + i);
+        p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	if (p)
+	  memcpy(p, soap->labbuf, soap->lablen - k + i);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, SOAP_BLKLEN);
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register char d1, d2;
+      register soap_wchar c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap_end_block(soap);
+	  soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = soap_size_block(soap, i);
+        p = (unsigned char*)soap_save_block(soap, NULL, 0);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putbase64(struct soap *soap, const unsigned char *s, int n)
+{ register int i;
+  register unsigned long m;
+  char d[4];
+  if (!s)
+    return SOAP_OK;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2base64(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      d[i] = '=';
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_getbase64(struct soap *soap, int *n, int malloc_flag)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_base642s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register int i, k;
+    register char *s;
+    if (soap_append_lab(soap, NULL, 2))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = 3 * (soap->lablen / 3);
+    if (!s)
+      return NULL;
+    for (i = 0; i < k - 2; i += 3)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+            *n = (int)(soap->lablen - k + i);
+          p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	  if (p)
+	    memcpy(p, soap->labbuf, soap->lablen - k + i);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, 3 * SOAP_BLKLEN); /* must be multiple of 3 */
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          i *= 3;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n = (int)soap_size_block(soap, i);
+          p = (unsigned char*)soap_save_block(soap, NULL, 0);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_xop_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ /* Check MTOM xop:Include element (within hex/base64Binary) */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  int body = soap->body; /* should save type too? */
+  if (!soap_peek_element(soap))
+  { if (!soap_element_begin_in(soap, "xop:Include", 0) && *soap->href)
+    { if (soap_dime_forward(soap, ptr, size, id, type, options))
+        return soap->error;
+    }
+    if (soap->body && soap_element_end_in(soap, NULL))
+      return soap->error;
+  }
+  soap->body = body;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_dime_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ struct soap_xlist *xp = (struct soap_xlist*)SOAP_MALLOC(soap, sizeof(struct soap_xlist));
+  *ptr = NULL;
+  *size = 0;
+  *id = soap_strdup(soap, soap->href);
+  *type = NULL;
+  *options = NULL;
+  if (!xp)
+    return soap->error = SOAP_EOM;
+  xp->next = soap->xlist;
+  xp->ptr = ptr;
+  xp->size = size;
+  xp->id = *id;
+  xp->type = type;
+  xp->options = options;
+  soap->xlist = xp;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_strdup(struct soap *soap, const char *s)
+{ char *t = NULL;
+  if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1)))
+    strcpy(t, s);
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_new_block(struct soap *soap)
+{ struct soap_blist *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New block sequence (prev=%p)\n", soap->blist));
+  if (!(p = (struct soap_blist*)SOAP_MALLOC(soap, sizeof(struct soap_blist))))
+    return SOAP_EOM;   
+  p->next = soap->blist; 
+  p->ptr = NULL;
+  p->size = 0;
+  soap->blist = p;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_push_block(struct soap *soap, size_t n)
+{ char *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block of %u bytes (%u bytes total)\n", (unsigned int)n, (unsigned int)soap->blist->size + (unsigned int)n));
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(char*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  *(char**)p = soap->blist->ptr;
+  *(size_t*)(p + sizeof(char*)) = n;
+  soap->blist->ptr = p;
+  soap->blist->size += n;
+  return p + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_block(struct soap *soap)
+{ char *p;
+  if (!soap->blist->ptr)
+    return;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block\n"));
+  p = soap->blist->ptr;
+  soap->blist->size -= *(size_t*)(p + sizeof(char*));
+  soap->blist->ptr = *(char**)p;
+  SOAP_FREE(soap, p);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_update_ptrs(struct soap *soap, char *start, char *end, char *p1, char *p2)
+{ int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+#ifndef WITH_LEANER
+  register struct soap_xlist *xp;
+#endif
+  register void *p, **q;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr && (char*)ip->ptr >= start && (char*)ip->ptr < end)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", ip->id, ip->ptr, (char*)ip->ptr + (p1-p2)));
+        ip->ptr = (char*)ip->ptr + (p1-p2);
+      }
+      for (q = &ip->link; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Link update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (q = &ip->copy; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy chain update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (fp = ip->flist; fp; fp = fp->next)
+      { if ((char*)fp->ptr >= start && (char*)fp->ptr < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy list update id='%s' %p\n", ip->id, fp));
+          fp->ptr = (char*)fp->ptr + (p1-p2);
+        }
+      }
+    }
+  }
+#ifndef WITH_LEANER
+  for (xp = soap->xlist; xp; xp = xp->next)
+  { if (xp->ptr && (char*)xp->ptr >= start && (char*)xp->ptr < end)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", xp->id?xp->id:"", xp->ptr, (char*)xp->ptr + (p1-p2)));
+      xp->ptr = (unsigned char**)((char*)xp->ptr + (p1-p2));
+      xp->size = (int*)((char*)xp->size + (p1-p2));
+      xp->type = (char**)((char*)xp->type + (p1-p2));
+      xp->options = (char**)((char*)xp->options + (p1-p2));
+    }
+  }
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static int
+soap_has_copies(struct soap *soap, register const char *start, register const char *end)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  register const char *p;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { for (p = (const char*)ip->copy; p; p = *(const char**)p)
+        if (p >= start && p < end)
+          return SOAP_ERR;
+      for (fp = ip->flist; fp; fp = fp->next)
+        if ((const char*)fp->ptr >= start && (const char*)fp->ptr < end)
+	  return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_resolve(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  short flag;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr)
+      { register void *p, **q, *r;
+        q = (void**)ip->link;
+        ip->link = NULL;
+        r = ip->ptr;
+        DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing link chain to resolve id='%s'\n", ip->id));
+        while (q)
+        { p = *q;
+          *q = r;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "... link %p -> %p\n", q, r));
+          q = (void**)p;
+        }
+      }
+      else if (*ip->id == '#')
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Missing data for id='%s'\n", ip->id));
+        strcpy(soap->id, ip->id + 1);
+        return soap->error = SOAP_MISSING_ID;
+      }
+    }
+  }
+  do
+  { flag = 0;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution phase\n"));
+    for (i = 0; i < SOAP_IDHASH; i++)
+    { for (ip = soap->iht[i]; ip; ip = ip->next)
+      { if (ip->ptr && !soap_has_copies(soap, (const char*)ip->ptr, (const char*)ip->ptr + ip->size))
+        { if (ip->copy)
+          { register void *p, **q = (void**)ip->copy;
+            DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing copy chain to resolve id='%s'\n", ip->id));
+            ip->copy = NULL;
+            do
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... copy %p -> %p (%u bytes)\n", ip->ptr, q, (unsigned int)ip->size));
+	      p = *q;
+              memcpy(q, ip->ptr, ip->size);
+              q = (void**)p;
+            } while (q);
+	    flag = 1;
+	  }
+          for (fp = ip->flist; fp; fp = ip->flist)
+          { register unsigned int k = fp->level;
+	    register void *p = ip->ptr;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data type=%d location=%p level=%u,%u id='%s'\n", ip->type, p, ip->level, fp->level, ip->id));
+	    while (ip->level < k)
+            { register void **q = (void**)soap_malloc(soap, sizeof(void*));  
+	      if (!q)
+	        return soap->error;
+	      *q = p;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level, new location=%p holds=%p...\n", q, *q));
+              p = (void*)q;
+              k--;
+            }
+	    if (fp->fcopy)
+	      fp->fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    else
+	      soap_fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    ip->flist = fp->next;
+	    SOAP_FREE(soap, fp);
+	    flag = 1;
+	  }
+        }
+      }
+    }
+  } while (flag);
+#ifdef SOAP_DEBUG
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->copy || ip->flist)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution error: forwarded data for id='%s' could not be propagated, please report this problem to the developers\n", ip->id));
+      }
+    }
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution done\n"));
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_size_block(struct soap *soap, size_t n)
+{ if (soap->blist->ptr)
+  { soap->blist->size -= *(size_t*)(soap->blist->ptr + sizeof(char*)) - n;
+    *(size_t*)(soap->blist->ptr + sizeof(char*)) = n;
+  }
+  return soap->blist->size;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_first_block(struct soap *soap)
+{ char *p, *q, *r;
+  p = soap->blist->ptr;
+  if (!p)
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "First block\n"));
+  r = NULL;
+  do
+  { q = *(char**)p;
+    *(char**)p = r;
+    r = p;
+    p = q;
+  } while (p);
+  soap->blist->ptr = r;
+  return r + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_next_block(struct soap *soap)
+{ char *p;
+  p = soap->blist->ptr;
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n"));
+    soap->blist->ptr = *(char**)p;
+    SOAP_FREE(soap, p);
+    if (soap->blist->ptr)
+      return soap->blist->ptr + sizeof(char*) + sizeof(size_t);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_block_size(struct soap *soap)
+{ return *(size_t*)(soap->blist->ptr + sizeof(char*));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end_block(struct soap *soap)
+{ struct soap_blist *bp;
+  char *p, *q;
+  bp = soap->blist;
+  if (bp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of block sequence, free all remaining blocks\n"));
+    for (p = bp->ptr; p; p = q)
+    { q = *(char**)p;
+      SOAP_FREE(soap, p);
+    }
+    soap->blist = bp->next;
+    SOAP_FREE(soap, bp);
+  }
+  DBGLOG(TEST, if (soap->blist) SOAP_MESSAGE(fdebug, "Restore previous block sequence\n"));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_save_block(struct soap *soap, char *p, int flag)
+{ register size_t n;
+  register char *q, *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Save all blocks in contiguous memory space of %u bytes (%p->%p)\n", (unsigned int)soap->blist->size, soap->blist->ptr, p));
+  if (soap->blist->size)
+  { if (!p)
+      p = (char*)soap_malloc(soap, soap->blist->size);
+    if (p)
+    { for (s = p, q = soap_first_block(soap); q; q = soap_next_block(soap))
+      { n = soap_block_size(soap);
+#ifndef WITH_NOIDREF
+        if (flag)
+	  soap_update_ptrs(soap, q, q + n, s, q);
+#endif
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy %u bytes from %p to %p\n", (unsigned int)n, q, s));
+        memcpy(s, q, n);
+        s += n;
+      }
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  soap_end_block(soap);
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsize(struct soap *soap, const char *type, int size)
+{ return soap_putsizes(soap, type, &size, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizes(struct soap *soap, const char *type, const int *size, int dim)
+{ return soap_putsizesoffsets(soap, type, size, NULL, dim);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim)
+{ int i;
+  if (!type)
+    return NULL;
+  if (soap->version == 2)
+  { sprintf(soap->type, "%s[%d", type, size[0]);
+    for (i = 1; i < dim; i++)
+      sprintf(soap->type + strlen(soap->type), " %d", size[i]);
+  }
+  else
+  { if (offset)
+    { sprintf(soap->type, "%s[%d", type, size[0] + offset[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i] + offset[i]);
+    }
+    else
+    { sprintf(soap->type, "%s[%d", type, size[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i]);
+    }
+    strcat(soap->type, "]");
+  }
+  return soap->type;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffset(struct soap *soap, int offset)
+{ return soap_putoffsets(soap, &offset, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffsets(struct soap *soap, const int *offset, int dim)
+{ register int i;
+  sprintf(soap->arrayOffset, "[%d", offset[0]);
+  for (i = 1; i < dim; i++)
+    sprintf(soap->arrayOffset + strlen(soap->arrayOffset), ",%d", offset[i]);
+  strcat(soap->arrayOffset, "]");
+  return soap->arrayOffset;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_size(const int *size, int dim)
+{ register int i, n = size[0];
+  for (i = 1; i < dim; i++)
+    n *= size[i];
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getoffsets(const char *attr, const int *size, int *offset, int dim)
+{ register int i, j = 0;
+  if (offset)
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += offset[i] = (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  else
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  return j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsize(const char *attr1, const char *attr2, int *j)
+{ register int n, k;
+  char *s;
+  *j = 0;
+  if (!*attr1)
+    return -1;
+  if (*attr1 == '[')
+    attr1++;
+  n = 1;
+  for (;;)
+  { k = (int)soap_strtol(attr1, &s, 10);
+    n *= k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE || s == attr1)
+      return -1;
+    attr1 = strchr(s, ',');
+    if (!attr1)
+      attr1 = strchr(s, ' ');
+    if (attr2 && *attr2)
+    { attr2++;
+      *j *= k;
+      k = (int)soap_strtol(attr2, &s, 10);
+      *j += k;
+      if (k < 0)
+        return -1;
+      attr2 = s;
+    }
+    if (!attr1)
+      break;
+    attr1++;
+  }
+  return n - *j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsizes(const char *attr, int *size, int dim)
+{ register int i, k, n;
+  if (!*attr)
+    return -1;
+  i = strlen(attr);
+  n = 1;
+  do
+  { for (i = i-1; i >= 0; i--)
+      if (attr[i] == '[' || attr[i] == ',' || attr[i] == ' ')
+        break;
+    k = (int)atol(attr + i + 1);
+    n *= size[--dim] = k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE)
+      return -1;
+  } while (i >= 0 && attr[i] != '[');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getposition(const char *attr, int *pos)
+{ register int i, n;
+  if (!*attr)
+    return -1;
+  n = 0;
+  i = 1;
+  do
+  { pos[n++] = (int)atol(attr + i);
+    while (attr[i] && attr[i] != ',' && attr[i] != ']')
+      i++;
+    if (attr[i] == ',')
+      i++;
+  } while (n < SOAP_MAXDIMS && attr[i] && attr[i] != ']');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_push_namespace(struct soap *soap, const char *id, const char *ns)
+{ register struct soap_nlist *np;
+  register struct Namespace *p;
+  register short i = -1;
+  register size_t n, k;
+  n = strlen(id);
+  k = strlen(ns) + 1;
+  p = soap->local_namespaces;
+  if (p)
+  { for (i = 0; p->id; p++, i++)
+    { if (p->ns && !strcmp(ns, p->ns))
+      { if (p->out)
+        { SOAP_FREE(soap, p->out);
+          p->out = NULL;
+        }
+        break;
+      }
+      if (p->out)
+      { if (!strcmp(ns, p->out))
+          break;
+      }
+      else if (p->in)
+      { if (!soap_tag_cmp(ns, p->in))
+        { if ((p->out = (char*)SOAP_MALLOC(soap, k)))
+            strcpy(p->out, ns);
+          break;
+        }
+      }
+    }
+    if (!p || !p->id)
+      i = -1;
+  }
+  if (i >= 0)
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k);
+  if (!np)
+    return soap->error = SOAP_EOM;
+  np->next = soap->nlist;
+  soap->nlist = np;
+  np->level = soap->level;
+  np->index = i;
+  strcpy(np->id, id);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns));
+  if (i < 0)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push NOT OK: no match found for '%s' in namespace mapping table (added to stack anyway)\n", ns));
+  }
+  else
+  { np->ns = NULL;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push OK ('%s' matches '%s' in namespace table)\n", id, p->id));
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_namespace(struct soap *soap)
+{ register struct soap_nlist *np;
+  while (soap->nlist && soap->nlist->level >= soap->level)
+  { np = soap->nlist->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Popped namespace binding (level=%u) '%s'\n", soap->level, soap->nlist->id));
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_namespace(struct soap *soap, const char *id1, const char *id2, int n1, int n2) 
+{ register struct soap_nlist *np = soap->nlist;
+  while (np && (strncmp(np->id, id1, n1) || np->id[n1]))
+    np = np->next;
+  if (np)
+  { if (np->index < 0
+     || (soap->local_namespaces[np->index].id
+      && (strncmp(soap->local_namespaces[np->index].id, id2, n2)
+       || soap->local_namespaces[np->index].id[n2])))
+      return SOAP_NAMESPACE;
+    return SOAP_OK;
+  }
+  if (n1 == 3 && n1 == n2 && !strcmp(id1, "xml") && !strcmp(id1, id2))
+    return SOAP_OK;
+  return SOAP_SYNTAX_ERROR; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_current_namespace(struct soap *soap, const char *tag)
+{ register struct soap_nlist *np;
+  register const char *s;
+  np = soap->nlist;
+  if (!(s = strchr(tag, ':')))
+  { while (np && *np->id) /* find default namespace, if present */
+      np = np->next;
+  }
+  else
+  { while (np && (strncmp(np->id, tag, s - tag) || np->id[s - tag]))
+      np = np->next;
+    if (!np)
+      soap->error = SOAP_NAMESPACE;
+  }
+  if (np)
+  { if (np->index >= 0)
+      return soap->namespaces[np->index].ns;
+    if (np->ns)
+      return soap_strdup(soap, np->ns);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_tag_cmp(const char *s, const char *t)
+{ for (;;)
+  { register int c1 = *s;
+    register int c2 = *t;
+    if (!c1 || c1 == '"')
+      break;
+    if (c2 != '-')
+    { if (c1 != c2)
+      { if (c1 >= 'A' && c1 <= 'Z')
+          c1 += 'a' - 'A';
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+      }
+      if (c1 != c2)
+      { if (c2 != '*')
+          return 1;
+	c2 = *++t;
+        if (!c2)
+	  return 0;
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+        for (;;)
+        { c1 = *s;
+	  if (!c1 || c1 == '"')
+	    break;
+	  if (c1 >= 'A' && c1 <= 'Z')
+            c1 += 'a' - 'A';
+          if (c1 == c2 && !soap_tag_cmp(s + 1, t + 1))
+            return 0;
+	  s++;
+        }
+        break;
+      }
+    }
+    s++;
+    t++;
+  }
+  if (*t == '*' && !t[1])
+    return 0;
+  return *t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_tag(struct soap *soap, const char *tag1, const char *tag2)
+{ register const char *s, *t;
+  if (!tag1 || !tag2 || !*tag2)
+    return SOAP_OK;
+  s = strchr(tag1, ':');
+  t = strchr(tag2, ':');
+  if (t)
+  { if (s)
+    { if (t[1] && SOAP_STRCMP(s + 1, t + 1))
+        return SOAP_TAG_MISMATCH;
+      if (t != tag2 && soap_match_namespace(soap, tag1, tag2, s - tag1, t - tag2))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+        return SOAP_TAG_MISMATCH;
+      }
+    } 
+    else if (SOAP_STRCMP(tag1, t + 1))
+      return SOAP_TAG_MISMATCH;
+    else if (t != tag2 && soap_match_namespace(soap, tag1, tag2, 0, t - tag2))
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+      return SOAP_TAG_MISMATCH;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags and (default) namespaces match: '%s' '%s'\n", tag1, tag2));
+    return SOAP_OK;
+  }
+  if (s)
+  { if (SOAP_STRCMP(s + 1, tag2))
+      return SOAP_TAG_MISMATCH;
+  }
+  else if (SOAP_STRCMP(tag1, tag2))
+    return SOAP_TAG_MISMATCH;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags match: '%s' '%s'\n", tag1, tag2));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_array(struct soap *soap, const char *type)
+{ if (*soap->arrayType)
+    if (soap_match_tag(soap, soap->arrayType, type)
+     && soap_match_tag(soap, soap->arrayType, "xsd:anyType")
+     && soap_match_tag(soap, soap->arrayType, "xsd:ur-type")
+    )
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array type mismatch: '%s' '%s'\n", soap->arrayType, type));
+      return SOAP_TAG_MISMATCH;
+    }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************\
+ *
+ *	SSL
+ *
+\******************************************************************************/
+
+#ifdef WITH_OPENSSL
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_rand()
+{ unsigned char buf[4];
+  if (!ssl_init_done)
+    soap_ssl_init();
+  RAND_pseudo_bytes(buf, 4);
+  return *(int*)buf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *dhfile, const char *randfile, const char *sid)
+{ int err;
+  soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  if (dhfile)
+  { soap->dhfile = dhfile;
+    soap->rsa = 0;
+  }
+  else
+  { soap->dhfile = NULL;
+    soap->rsa = 1;
+  }
+  soap->randfile = randfile;
+  soap->require_client_auth = (flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION);
+  if (!(err = soap->fsslauth(soap)))
+  { if (sid)
+      SSL_CTX_set_session_id_context(soap->ctx, (unsigned char*)sid, strlen(sid));
+  }
+  return err; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_client_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *randfile)
+{ soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  soap->dhfile = NULL;
+  soap->rsa = 0;
+  soap->randfile = randfile;
+  soap->require_server_auth = (flags & SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION);
+  return soap->fsslauth(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_ssl_init()
+{ /* Note: for MT systems, the main program MUST call soap_ssl_init() before any threads are started */
+  if (!ssl_init_done)
+  { ssl_init_done = 1;
+    SSL_library_init();
+#ifndef WITH_LEAN
+    SSL_load_error_strings();
+#endif
+    if (!RAND_load_file("/dev/urandom", 1024))
+    { char buf[1024];
+      RAND_seed(buf, sizeof(buf));
+      while (!RAND_status())
+      { int r = rand();
+        RAND_seed(&r, sizeof(int));
+      }
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static const char *
+ssl_error(struct soap *soap, int ret)
+{ int err = SSL_get_error(soap->ssl, ret);
+  const char *msg = soap_str_code(h_ssl_error_codes, err);
+  if (msg)
+    strcpy(soap->msgbuf, msg);
+  else
+    return ERR_error_string(err, soap->msgbuf);
+  if (ERR_peek_error())
+  { unsigned long r;
+    strcat(soap->msgbuf, "\n");
+    while ((r = ERR_get_error()))
+      ERR_error_string_n(r, soap->msgbuf + strlen(soap->msgbuf), sizeof(soap->msgbuf) - strlen(soap->msgbuf));
+  } 
+  else
+  { switch (ret)
+    { case 0:
+        strcpy(soap->msgbuf, "EOF was observed that violates the protocol. The client probably provided invalid authentication information.");
+        break;
+      case -1:
+        sprintf(soap->msgbuf, "Error observed by underlying BIO: %s", strerror(errno));  
+        break;
+    }
+  }
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_password(char *buf, int num, int rwflag, void *userdata)
+{ if (num < (int)strlen((char*)userdata) + 1)
+    return 0;
+  return strlen(strcpy(buf, (char*)userdata));
+}
+#endif
+
+/******************************************************************************/
+/* This callback is included for future references. It should not be deleted
+#ifndef PALM_2
+static DH *
+ssl_tmp_dh(SSL *ssl, int is_export, int keylength)
+{ static DH *dh512 = NULL;
+  static DH *dh1024 = NULL;
+  DH *dh;
+  switch (keylength)
+  { case 512:
+      if (!dh512)
+      { BIO *bio = BIO_new_file("dh512.pem", "r");
+        if (bio)
+        { dh512 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+          return dh512;
+        }
+      }
+      else
+        return dh512;
+    default:
+      if (!dh1024)
+      { BIO *bio = BIO_new_file("dh1024.pem", "r");
+        if (bio)
+        { dh1024 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+        }
+      }
+      dh = dh1024;
+  }
+  return dh;
+}
+#endif
+*/
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_auth_init(struct soap *soap)
+{ if (!ssl_init_done)
+    soap_ssl_init();
+  if (!soap->ctx)
+  { if (!(soap->ctx = SSL_CTX_new(SSLv23_method())))
+      return soap_set_receiver_error(soap, "SSL error", "Can't setup context", SOAP_SSL_ERROR);
+  }
+  if (soap->randfile)
+  { if (!RAND_load_file(soap->randfile, -1))
+      return soap_set_receiver_error(soap, "SSL error", "Can't load randomness", SOAP_SSL_ERROR);
+  }
+  if (soap->cafile || soap->capath)
+  { if (!SSL_CTX_load_verify_locations(soap->ctx, soap->cafile, soap->capath))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read CA file and directory", SOAP_SSL_ERROR);
+    if (soap->cafile && soap->require_client_auth)
+      SSL_CTX_set_client_CA_list(soap->ctx, SSL_load_client_CA_file(soap->cafile));
+  }
+  if (!SSL_CTX_set_default_verify_paths(soap->ctx))
+    return soap_set_receiver_error(soap, "SSL error", "Can't read default CA file and/or directory", SOAP_SSL_ERROR);
+/* See below */
+  if (soap->keyfile)
+  { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read certificate key file", SOAP_SSL_ERROR);
+    if (soap->password)
+    { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+      SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+    }
+    if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+  }
+/* Suggested alternative approach to check cafile first before the key file:
+  if (soap->password)
+  { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+    SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+  }
+  if (!soap->cafile || !SSL_CTX_use_certificate_chain_file(soap->ctx, soap->cafile))
+  { if (soap->keyfile)
+    { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read certificate or key file", SOAP_SSL_ERROR);
+      if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+    }
+  }
+*/
+  if (soap->rsa)
+  { RSA *rsa = RSA_generate_key(1024, RSA_F4, NULL, NULL);
+    if (!SSL_CTX_set_tmp_rsa(soap->ctx, rsa))
+    { if (rsa)
+        RSA_free(rsa);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set RSA key", SOAP_SSL_ERROR);
+    }
+    RSA_free(rsa);
+  }
+  else if (soap->dhfile)
+  { DH *dh = 0;
+    BIO *bio;
+    bio = BIO_new_file(soap->dhfile, "r");
+    if (!bio)
+      return soap_set_receiver_error(soap, "SSL error", "Can't read DH file", SOAP_SSL_ERROR);
+    dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+    BIO_free(bio);
+    if (SSL_CTX_set_tmp_dh(soap->ctx, dh) < 0)
+    { if (dh)
+        DH_free(dh);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set DH parameters", SOAP_SSL_ERROR);
+    }
+    DH_free(dh);
+  }
+  SSL_CTX_set_options(soap->ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2);
+  SSL_CTX_set_verify(soap->ctx, soap->require_client_auth ? (SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT) : soap->require_server_auth ? SSL_VERIFY_PEER : SSL_VERIFY_NONE, soap->fsslverify);
+#if (OPENSSL_VERSION_NUMBER < 0x00905100L)
+  SSL_CTX_set_verify_depth(soap->ctx, 1); 
+#else
+  SSL_CTX_set_verify_depth(soap->ctx, 9); 
+#endif  
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_verify_callback(int ok, X509_STORE_CTX *store)
+{
+#ifdef SOAP_DEBUG
+  if (!ok) 
+  { char data[256];
+    X509 *cert = X509_STORE_CTX_get_current_cert(store);
+    fprintf(stderr, "SSL verify error or warning with certificate at depth %d: %s\n", X509_STORE_CTX_get_error_depth(store), X509_verify_cert_error_string(X509_STORE_CTX_get_error(store)));
+    X509_NAME_oneline(X509_get_issuer_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate issuer %s\n", data);
+    X509_NAME_oneline(X509_get_subject_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate subject %s\n", data);
+  }
+#endif
+  /* Note: return 1 to continue, but unsafe progress will be terminated by SSL */
+  return ok;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_accept(struct soap *soap)
+{ BIO *bio;
+  int i, r;
+  if (!soap_valid_socket(soap->socket))
+    return soap_set_receiver_error(soap, "SSL error", "No socket in soap_ssl_accept()", SOAP_SSL_ERROR);
+  if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    return SOAP_INVALID_SOCKET;
+  if (!soap->ssl)
+  { soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+      return soap_set_receiver_error(soap, "SSL error", "SSL_new() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+  }
+  else
+    SSL_clear(soap->ssl);
+  soap->imode |= SOAP_ENC_SSL;
+  soap->omode |= SOAP_ENC_SSL;
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&nonblocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)|O_NONBLOCK);
+#endif
+  bio = BIO_new_socket((SOAP_SOCKET)soap->socket, BIO_NOCLOSE);
+  SSL_set_bio(soap->ssl, bio, bio);
+  i = 100; /* 100 * 0.1 ms retries */
+  while ((r = SSL_accept(soap->ssl)) <= 0)
+  { int err = SSL_get_error(soap->ssl, r);
+    if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE)
+    { struct timeval timeout;
+      fd_set fd;
+      if (i-- <= 0)
+        break;
+      timeout.tv_sec = 0;
+      timeout.tv_usec = 100000;
+      FD_ZERO(&fd);
+      FD_SET((SOAP_SOCKET)soap->socket, &fd);
+      r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+      if (r < 0 && soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        return SOAP_EOF;
+      }
+    }
+    else
+    { soap->errnum = err;
+      break;
+    }
+  }
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&blocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+  if (r <= 0)
+  { soap_set_receiver_error(soap, ssl_error(soap, r), "SSL_accept() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+    soap_closesock(soap);
+    return SOAP_SSL_ERROR;
+  }
+  if (soap->require_client_auth)
+  { X509 *peer;
+    int err;
+    if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    peer = SSL_get_peer_certificate(soap->ssl);
+    if (!peer)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    X509_free(peer);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#endif /* WITH_OPENSSL */
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_init(struct soap *soap)
+{ soap->errmode = 1;
+#ifdef WIN32
+  if (tcp_done)
+    return 0;
+  else
+  { WSADATA w;
+    if (WSAStartup(MAKEWORD(1, 1), &w))
+      return -1;
+    tcp_done = 1;
+  }
+#endif
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_done(struct soap *soap)
+{ 
+#ifdef SOAP_DEBUG
+  int i;
+#endif
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  while (soap->clist)
+  { struct soap_clist *p = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = p;
+  }
+  soap->keep_alive = 0; /* to force close the socket */
+  soap_closesock(soap);
+#ifdef WITH_COOKIES
+  soap_free_cookies(soap);
+#endif
+  while (soap->plugins)
+  { register struct soap_plugin *p = soap->plugins->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Removing plugin '%s'\n", soap->plugins->id));
+    if (soap->plugins->fcopy || soap->state == SOAP_INIT)
+      soap->plugins->fdelete(soap, soap->plugins);
+    SOAP_FREE(soap, soap->plugins);
+    soap->plugins = p;
+  }
+  soap->fplugin = fplugin;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+#ifdef WITH_OPENSSL
+  if (soap->session)
+  { SSL_SESSION_free(soap->session);
+    soap->session = NULL;
+  }
+#endif
+  if (soap->state == SOAP_INIT)
+  { if (soap_valid_socket(soap->master))
+    { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+      soap->master = SOAP_INVALID_SOCKET;
+    }
+#ifdef WITH_OPENSSL
+    if (soap->ctx)
+    { SSL_CTX_free(soap->ctx);
+      soap->ctx = NULL;
+    }
+#endif
+  }
+#ifdef SOAP_DEBUG
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free logfiles\n"));
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { if (soap->logfile[i])
+    { SOAP_FREE(soap, (void*)soap->logfile[i]);
+      soap->logfile[i] = NULL;
+    }
+    soap_close_logfile(soap, i);
+  }
+  soap_free_mht(soap);
+  soap->state = 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_cleanup(struct soap *soap)
+{ soap_done(soap);
+#ifdef WIN32
+  if (!tcp_done)
+    return;
+  tcp_done = 0;
+  WSACleanup();
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+tcp_error(struct soap *soap)
+{ register const char *msg = NULL;
+  switch (soap->errmode)
+  { case 0:
+      msg = soap_strerror(soap);
+      break;
+    case 1:
+      msg = "WSAStartup failed";
+      break;
+    case 2:
+    {
+#ifndef WITH_LEAN
+      msg = soap_str_code(h_error_codes, soap->errnum);
+      if (!msg)
+#endif
+      { sprintf(soap->msgbuf, "TCP/UDP IP error %d", soap->errnum);
+        msg = soap->msgbuf;
+      }
+    }
+  }
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static const char*
+http_error(struct soap *soap, int status)
+{ register const char *msg = SOAP_STR_EOS;
+#ifndef WITH_LEAN
+  msg = soap_str_code(h_http_error_codes, status);
+  if (!msg)
+    msg = SOAP_STR_EOS;
+#endif
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_IPV6
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr)
+{ soap_int32 iadd = -1;
+  struct hostent hostent, *host = &hostent;
+#ifdef VXWORKS
+  int hostint;
+  /* inet_addr(), and hostGetByName() expect "char *"; addr is a "const char *". */
+  iadd = inet_addr((char*)addr);
+#else
+#if defined(_AIXVERSION_431) || defined(TRU64)
+  struct hostent_data ht_data;
+#endif
+#ifdef AS400
+  iadd = inet_addr((void*)addr);
+#else
+  iadd = inet_addr(addr);
+#endif
+#endif
+  if (iadd != -1)
+  { memcpy(inaddr, &iadd, sizeof(iadd));
+    return SOAP_OK;
+  }
+#if defined(__GLIBC__)
+  if (gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &host, &soap->errnum) < 0)
+    host = NULL;
+#elif defined(_AIXVERSION_431) || defined(TRU64)
+  memset((void*)&ht_data, 0, sizeof(ht_data));
+  if (gethostbyname_r(addr, &hostent, &ht_data) < 0)
+  { host = NULL;
+    soap->errnum = h_errno;
+  }
+#elif defined(HAVE_GETHOSTBYNAME_R)
+  host = gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &soap->errnum);
+#elif defined(VXWORKS)
+  /* If the DNS resolver library resolvLib has been configured in the vxWorks
+   * image, a query for the host IP address is sent to the DNS server, if the
+   * name was not found in the local host table. */
+  hostint = hostGetByName((char*)addr);
+  if (hostint == ERROR)
+  { host = NULL;
+    soap->errnum = soap_errno; 
+  }
+#else
+#ifdef AS400
+  if (!(host = gethostbyname((void*)addr)))
+    soap->errnum = h_errno;
+#else
+  if (!(host = gethostbyname(addr)))
+    soap->errnum = h_errno;
+#endif
+#endif
+  if (!host)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Host name not found\n"));
+    return SOAP_ERR;
+  }
+#ifdef VXWORKS
+  inaddr->s_addr = hostint;
+#else
+  memcpy(inaddr, host->h_addr, host->h_length);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_connect(struct soap *soap, const char *endpoint, const char *host, int port)
+{
+#ifdef WITH_IPV6
+  struct addrinfo hints, *res, *ressave;
+  int err;
+#endif
+  register int fd;
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->socket))
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+  soap->socket = SOAP_INVALID_SOCKET;
+  if (tcp_init(soap))
+  { soap->errnum = 0;
+    soap_set_sender_error(soap, tcp_error(soap), "TCP init failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->errmode = 0;
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+    err = getaddrinfo(soap->proxy_host, soap_int2s(soap, soap->proxy_port), &hints, &res);
+  else
+    err = getaddrinfo(host, soap_int2s(soap, port), &hints, &res);
+  if (err)
+  { soap_set_sender_error(soap, gai_strerror(err), "getaddrinfo failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  ressave = res;
+again:
+  fd = (int)socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+  soap->errmode = 0;
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    fd = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    fd = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  if (fd < 0)
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "socket failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_flags & SO_LINGER)
+  { struct linger linger;
+    memset((void*)&linger, 0, sizeof(linger));
+    linger.l_onoff = 1;
+    linger.l_linger = 0;
+    if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+    { soap->errnum = soap_socket_errno;
+      soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  if ((soap->connect_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, soap->connect_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (soap->keep_alive && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)fd, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Opening socket %d to host='%s' port=%d\n", fd, host, port));
+#ifndef WITH_IPV6
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+  { if (soap->fresolve(soap, soap->proxy_host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get proxy host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)soap->proxy_port);
+  }
+  else
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)port);
+  }
+  soap->errmode = 0;
+  if ((soap->omode & SOAP_IO_UDP))
+    return fd;
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking)); /* modified to use fd */
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+  else
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  for (;;)
+  { 
+#ifdef WITH_IPV6
+    if (connect((SOAP_SOCKET)fd, res->ai_addr, res->ai_addrlen))
+#else
+    if (connect((SOAP_SOCKET)fd, (struct sockaddr*)&soap->peer, sizeof(soap->peer)))
+#endif
+    { 
+#ifndef WITH_LEAN
+      if (soap->connect_timeout && (soap_socket_errno == SOAP_EINPROGRESS || soap_socket_errno == SOAP_EWOULDBLOCK))
+      { struct timeval timeout;
+        SOAP_SOCKLEN_T k;
+        fd_set fds;
+        if (soap->connect_timeout > 0)
+        { timeout.tv_sec = soap->connect_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->connect_timeout/1000000;
+          timeout.tv_usec = -soap->connect_timeout%1000000;
+        }
+        FD_ZERO(&fds);
+        FD_SET((SOAP_SOCKET)fd, &fds);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(fd + 1), NULL, &fds, NULL, &timeout);
+          if (r > 0)
+	    break;
+          if (!r)
+          { soap->errnum = 0;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+            soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+            soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+	k = (SOAP_SOCKLEN_T)sizeof(soap->errnum);
+        if (!getsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_ERROR, (char*)&soap->errnum, &k) && !soap->errnum)	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+          break;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap->errnum = soap_socket_errno;
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      else
+#endif
+#ifdef WITH_IPV6
+      if (res->ai_next)
+      { res = res->ai_next;
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        goto again;
+      }
+      else
+#endif
+      if (soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }  
+    else
+      break;
+  }
+#ifdef WITH_IPV6
+  soap->peerlen = 0; /* IPv6: already connected so use send() */
+  freeaddrinfo(ressave);
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  soap->socket = fd;
+  soap->imode &= ~SOAP_ENC_SSL;
+  soap->omode &= ~SOAP_ENC_SSL;
+  if (!strncmp(endpoint, "https:", 6))
+  {
+#ifdef WITH_OPENSSL
+    BIO *bio;
+    int r;
+    if (soap->proxy_host)
+    { short v;
+      unsigned int k = soap->omode; /* make sure we only parse HTTP */
+      size_t n = soap->count; /* save the content length */
+      char *userid, *passwd;
+      soap->omode &= ~SOAP_ENC; /* mask IO and ENC */
+      soap->omode |= SOAP_IO_BUFFER;
+      soap_begin_send(soap);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connecting to proxy server\n"));
+      sprintf(soap->tmpbuf, "CONNECT %s:%d HTTP/%s", host, port, soap->http_version);
+      if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+#ifndef WITH_LEAN
+      if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+      { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+        strcpy(soap->tmpbuf, "Basic ");
+        soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+        if ((soap->error = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+        { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return soap->error;
+        }
+      }
+#endif
+      if ((soap->error = soap->fposthdr(soap, NULL, NULL))
+       || soap_flush(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->omode = k;
+      k = soap->imode;
+      soap->imode &= ~SOAP_ENC; /* mask IO and ENC */
+      v = soap->version; /* preserve */
+      userid = soap->userid; /* preserve */
+      passwd = soap->passwd; /* preserve */
+      if (soap_begin_recv(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->userid = userid; /* restore */
+      soap->passwd = passwd; /* restore */
+      soap->version = v; /* restore */
+      soap->imode = k; /* restore */
+      soap->count = n; /* restore */
+      soap_begin_send(soap);
+    }
+    if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    { soap_set_sender_error(soap, "SSL error", "SSL authentication failed in tcp_connect(): check password, key file, and ca file.", SOAP_SSL_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+    { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      soap->error = SOAP_SSL_ERROR;
+      return SOAP_INVALID_SOCKET;
+    }
+    if (soap->session)
+    { if (!strcmp(soap->session_host, host) && soap->session_port == port)
+        SSL_set_session(soap->ssl, soap->session);
+      SSL_SESSION_free(soap->session);
+      soap->session = NULL;
+    }
+    soap->imode |= SOAP_ENC_SSL;
+    soap->omode |= SOAP_ENC_SSL;
+    bio = BIO_new_socket((SOAP_SOCKET)fd, BIO_NOCLOSE);
+    SSL_set_bio(soap->ssl, bio, bio);
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#if defined(WIN32)
+    { u_long nonblocking = 1;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+    }
+#elif defined(VXWORKS)
+    { u_long nonblocking = 1;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+#endif
+    for (;;)
+    { if ((r = SSL_connect(soap->ssl)) <= 0)
+      { int err = SSL_get_error(soap->ssl, r);
+        if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+        { soap_set_sender_error(soap, ssl_error(soap, r), "SSL connect failed in tcp_connect()", SOAP_SSL_ERROR);
+          soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (soap->connect_timeout)
+        { struct timeval timeout;
+          fd_set fds;
+          if (soap->connect_timeout > 0)
+          { timeout.tv_sec = soap->connect_timeout;
+            timeout.tv_usec = 0;
+          }
+          else
+          { timeout.tv_sec = -soap->connect_timeout/1000000;
+            timeout.tv_usec = -soap->connect_timeout%1000000;
+          }
+          FD_ZERO(&fds);
+          FD_SET((SOAP_SOCKET)fd, &fds);
+          for (;;)
+          { int r = select((SOAP_SOCKET)(fd + 1), &fds, NULL, &fds, &timeout);
+            if (r > 0)
+	      break;
+            if (!r)
+            { soap->errnum = 0;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+              soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+              soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+              return SOAP_INVALID_SOCKET;
+            }
+          }
+	  continue;
+        }
+      }
+      break;
+    }
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#ifdef WIN32
+    { u_long blocking = 0;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+    }
+#elif defined(VXWORKS)
+    { u_long blocking = 0;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+    if (soap->require_server_auth)
+    { X509 *peer;
+      int err;
+      if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+      { soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      peer = SSL_get_peer_certificate(soap->ssl);
+      if (!peer)
+      { soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      X509_NAME_get_text_by_NID(X509_get_subject_name(peer), NID_commonName, soap->msgbuf, sizeof(soap->msgbuf));
+      X509_free(peer);
+      if (soap_tag_cmp(soap->msgbuf, host))
+      { soap_set_sender_error(soap, "SSL error", "SSL certificate host name mismatch in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+#else
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    soap->error = SOAP_SSL_ERROR;
+    return SOAP_INVALID_SOCKET;
+#endif
+  }
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_bind(struct soap *soap, const char *host, int port, int backlog)
+{
+#ifdef WITH_IPV6
+  struct addrinfo *addrinfo = NULL;
+  struct addrinfo hints;
+  struct addrinfo res;
+  int err;
+#endif
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->master))
+  { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+    soap->master = SOAP_INVALID_SOCKET;
+  }
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 1;
+  if (tcp_init(soap))
+  { soap_set_receiver_error(soap, tcp_error(soap), "TCP init failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  hints.ai_flags = AI_PASSIVE;
+  soap->errmode = 2;
+  err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo);
+  if (addrinfo)
+  { res = *addrinfo;
+    soap->peer = *((struct sockaddr_storage*)addrinfo->ai_addr);
+    soap->peerlen = addrinfo->ai_addrlen;
+    res.ai_addr = (struct sockaddr*)&soap->peer;
+    res.ai_addrlen = soap->peerlen;
+    freeaddrinfo(addrinfo);
+  }
+  if (err)
+  { soap_set_receiver_error(soap, gai_strerror(err), "getaddrinfo failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->master = socket(res.ai_family, res.ai_socktype, res.ai_protocol);
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->master = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    soap->master = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  soap->errmode = 0;
+  if (!soap_valid_socket(soap->master))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "socket failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->socket = soap->master;
+#endif
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)soap->master, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(soap->master, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->bind_flags && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, soap->bind_flags, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->master, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+#ifdef WITH_IPV6
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, res.ai_addr, res.ai_addrlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+#else
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (host)
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_receiver_error(soap, tcp_error(soap), "get host by name failed in soap_bind()", SOAP_TCP_ERROR);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  else
+    soap->peer.sin_addr.s_addr = htonl(INADDR_ANY);
+  soap->peer.sin_port = htons((short)port);
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, (struct sockaddr*)&soap->peer, soap->peerlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+  if (!(soap->omode & SOAP_IO_UDP) && listen((SOAP_SOCKET)soap->master, backlog))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "listen failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+  return soap->master;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_poll(struct soap *soap)
+{ 
+#ifndef WITH_LEAN
+  struct timeval timeout;
+  fd_set rfd, sfd, xfd;
+  int r;
+  timeout.tv_sec = 0;
+  timeout.tv_usec = 0;
+  FD_ZERO(&rfd);
+  FD_ZERO(&sfd);
+  FD_ZERO(&xfd);
+  if (soap_valid_socket(soap->socket))
+  { FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &xfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, &xfd, &timeout);
+    if (r > 0 && FD_ISSET((SOAP_SOCKET)soap->socket, &xfd))
+      r = -1;
+  }
+  else if (soap_valid_socket(soap->master))
+  { FD_SET((SOAP_SOCKET)soap->master, &sfd);
+    r = select((SOAP_SOCKET)(soap->master + 1), NULL, &sfd, NULL, &timeout);
+  }
+  else
+    return SOAP_OK;
+  if (r > 0)
+  {
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+    {
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || SSL_peek(soap->ssl, soap->tmpbuf, 1) > 0))
+        return SOAP_OK;
+    }
+    else
+#endif
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) > 0))
+        return SOAP_OK;
+  }
+  else if (r < 0)
+  { soap->errnum = soap_socket_errno;
+    if ((soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) && soap_socket_errno != SOAP_EINTR)
+    { soap_set_receiver_error(soap, tcp_error(soap), "select failed in soap_poll()", SOAP_TCP_ERROR);
+      return soap->error = SOAP_TCP_ERROR;
+    }
+  }
+  else
+    soap->errnum = 0;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Polling: other end down on socket=%d select=%d\n", soap->socket, r));
+  return SOAP_EOF;
+#else
+  return SOAP_OK;
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_accept(struct soap *soap, int s, struct sockaddr *a, int *n)
+{ int fd;
+  fd = (int)accept((SOAP_SOCKET)s, a, (SOAP_SOCKLEN_T*)n);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, FD_CLOEXEC);
+#endif
+#endif
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_accept(struct soap *soap)
+{ int n = (int)sizeof(soap->peer);
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  soap->error = SOAP_OK;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    return soap->socket = soap->master;
+#endif
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 0;
+  soap->keep_alive = 0;
+  if (soap_valid_socket(soap->master))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->accept_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->accept_timeout > 0)
+        { timeout.tv_sec = soap->accept_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->accept_timeout/1000000;
+          timeout.tv_usec = -soap->accept_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->master, &fd);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(soap->master + 1), &fd, &fd, NULL, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            soap_set_receiver_error(soap, "Timeout", "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            soap_closesock(soap);
+            soap_set_sender_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+#if defined(WIN32)
+	{ u_long nonblocking = 1;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &nonblocking);
+        }
+#elif defined(VXWORKS)
+        { u_long nonblocking = 1;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&nonblocking));
+        }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)|O_NONBLOCK);
+#endif
+      }
+      else
+#if defined(WIN32)
+      { u_long blocking = 0;
+        ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+      }
+#elif defined(VXWORKS)
+      { u_long blocking = 0;
+        ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+      }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+      soap->socket = soap->faccept(soap, soap->master, (struct sockaddr*)&soap->peer, &n);
+      soap->peerlen = (size_t)n;
+      if (soap_valid_socket(soap->socket))
+      {
+#ifdef WITH_IPV6
+/* Use soap->host to store the numeric form of the remote host */
+        getnameinfo((struct sockaddr*)&soap->peer, n, soap->host, sizeof(soap->host), NULL, 0, NI_NUMERICHOST | NI_NUMERICSERV); 
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d from %s\n", soap->socket, soap->host));
+        soap->ip = 0; /* info stored in soap->peer and soap->host */
+        soap->port = 0; /* info stored in soap->peer and soap->host */
+#else
+        soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+        soap->port = (int)ntohs(soap->peer.sin_port); /* does not return port number on some systems */
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d at port %d from IP %d.%d.%d.%d\n", soap->socket, soap->port, (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF));
+#endif
+#ifndef WITH_LEAN
+	if (soap->accept_flags & SO_LINGER)
+        { struct linger linger;
+          memset((void*)&linger, 0, sizeof(linger));
+          linger.l_onoff = 1;
+          linger.l_linger = 0;
+	  if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+          { soap->errnum = soap_socket_errno;
+	    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in soap_accept()", SOAP_TCP_ERROR);
+	    soap_closesock(soap);
+            return SOAP_INVALID_SOCKET;
+	  }
+        }
+        if ((soap->accept_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, soap->accept_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#ifdef TCP_NODELAY
+        if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->socket, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#endif
+#endif
+        if (soap->accept_timeout)
+        {
+#if defined(WIN32)
+          u_long blocking = 0;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+          ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+#elif defined(VXWORKS)
+          u_long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+          ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)(&blocking));
+#elif defined(PALM)
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL,0)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL,0)&~O_NONBLOCK);
+#elif defined(SYMBIAN)
+          long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, 0/*FIONBIO*/, &blocking);
+#else
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+	}
+        soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+        return soap->socket;
+      }
+      if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept failed from %s\n", soap->host));
+        soap->errnum = soap_socket_errno;
+        soap_set_receiver_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+	soap_closesock(soap);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+  }
+  else
+  { soap->errnum = 0;
+    soap_set_receiver_error(soap, tcp_error(soap), "no master socket in soap_accept()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_disconnect(struct soap *soap)
+{
+#ifdef WITH_OPENSSL
+  if (soap->ssl)
+  { int r, s = 0;
+    if (soap->session)
+      SSL_SESSION_free(soap->session);
+    if (*soap->host)
+    { soap->session = SSL_get1_session(soap->ssl);
+      if (soap->session)
+      { strcpy(soap->session_host, soap->host);
+        soap->session_port = soap->port;
+      }
+    }
+    r = SSL_shutdown(soap->ssl);
+    if (r != 1)
+    { s = ERR_get_error();
+      if (s)
+      { if (soap_valid_socket(soap->socket))
+        { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1);
+          soap->socket = SOAP_INVALID_SOCKET;
+        }
+        r = SSL_shutdown(soap->ssl);
+      }
+    }
+    DBGLOG(TEST, if (s) SOAP_MESSAGE(fdebug, "Shutdown failed: %d\n", SSL_get_error(soap->ssl, r)));
+    SSL_free(soap->ssl);
+    soap->ssl = NULL;
+    if (s)
+      return SOAP_SSL_ERROR;
+    ERR_remove_state(0);
+  }
+#endif
+  if (soap_valid_socket(soap->socket) && !(soap->omode & SOAP_IO_UDP))
+  { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 2);
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+    soap->socket = SOAP_INVALID_SOCKET;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_closesocket(struct soap *soap, SOAP_SOCKET fd)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Close socket %d\n", (int)fd));
+  return closesocket(fd);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_shutdownsocket(struct soap *soap, SOAP_SOCKET fd, int how)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Shutdown socket %d how=%d\n", (int)fd, how));
+  return shutdown(fd, how);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_closesock(struct soap *soap)
+{ register int status = soap->error;
+  if (status == SOAP_EOF || status == SOAP_TCP_ERROR || status == SOAP_SSL_ERROR || !soap->keep_alive)
+  { if (soap->fclose && (soap->error = soap->fclose(soap)))
+      return soap->error;
+    soap->keep_alive = 0;
+  }
+#ifdef WITH_ZLIB
+  if (soap->zlib_state == SOAP_ZLIB_DEFLATE)
+    deflateEnd(&soap->d_stream);
+  else if (soap->zlib_state == SOAP_ZLIB_INFLATE)
+    inflateEnd(&soap->d_stream);
+  soap->zlib_state = SOAP_ZLIB_NONE;
+#endif
+  return soap->error = status;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_hash(register const char *s)
+{ register size_t h = 0;
+  while (*s)
+    h = 65599*h + *s++;
+  return h % SOAP_IDHASH;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_pht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing pointer hashtable\n"));
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new1(soap_mode mode)
+{ return soap_new2(mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new()
+{ return soap_new2(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new2(soap_mode imode, soap_mode omode)
+{ struct soap *soap = (struct soap*)malloc(sizeof(struct soap));
+  if (soap)
+    soap_init2(soap, imode, omode);
+  return soap;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_del(struct soap *soap)
+{ free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_pht(struct soap *soap)
+{ register struct soap_pblk *pb, *next;
+  register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free pointer hashtable\n"));
+  for (pb = soap->pblk; pb; pb = next)
+  { next = pb->next;
+    SOAP_FREE(soap, pb);
+  }
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type)
+{ register int i;
+  struct soap_plist *pp;
+  if (soap->version != 1)
+    soap->encoding = 1;
+  if (a)
+    i = soap_array_pointer_lookup(soap, p, a, n, type, &pp);
+  else
+    i = soap_pointer_lookup(soap, p, type, &pp);
+  if (i)
+  { if (soap_is_embedded(soap, pp)
+     || soap_is_single(soap, pp))
+      return 0;
+    soap_set_embedded(soap, pp);
+  }
+  return i;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_lookup(struct soap *soap, const void *p, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (p)
+  { for (pp = soap->pht[soap_hash_ptr(p)]; pp; pp = pp->next)
+    { if (pp->ptr == p && pp->type == type)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d id=%d\n", p, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d: not found\n", p, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_enter(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register int h;
+  register struct soap_plist *pp;
+  if (!soap->pblk || soap->pidx >= SOAP_PTRBLK)
+  { register struct soap_pblk *pb = (struct soap_pblk*)SOAP_MALLOC(soap, sizeof(struct soap_pblk));
+    if (!pb)
+    { soap->error = SOAP_EOM;
+      return 0;
+    }
+    pb->next = soap->pblk;
+    soap->pblk = pb;
+    soap->pidx = 0;
+  }
+  *ppp = pp = &soap->pblk->plist[soap->pidx++];
+  if (a)
+    h = soap_hash_ptr(a->__ptr);
+  else
+    h = soap_hash_ptr(p);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pointer enter location=%p array=%p size=%d dim=%d type=%d id=%d\n", p, a?a->__ptr:NULL, a?a->__size:0, n, type, soap->idnum+1));
+  pp->next = soap->pht[h];
+  pp->type = type;
+  pp->mark1 = 0;
+  pp->mark2 = 0;
+  pp->ptr = p;
+  pp->array = a;
+  soap->pht[h] = pp;
+  pp->id = ++soap->idnum;
+  return pp->id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_pointer_lookup(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (!p || !a->__ptr)
+    return 0;
+  for (pp = soap->pht[soap_hash_ptr(a->__ptr)]; pp; pp = pp->next)
+  { if (pp->type == type && pp->array && pp->array->__ptr == a->__ptr)
+    { register int i;
+      for (i = 0; i < n; i++)
+        if (((const int*)&pp->array->__size)[i] != ((const int*)&a->__size)[i])
+	  break;
+      if (i == n)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d id=%d\n", a->__ptr, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d: not found\n", a->__ptr, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_count(struct soap *soap)
+{ soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) || (soap->omode & SOAP_ENC_DIME))
+    soap->mode = soap->omode | SOAP_IO_LENGTH | SOAP_ENC_DIME;
+  else
+#endif
+  { soap->mode = soap->omode;
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE
+     || (((soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_ENC_XML))
+#ifndef WITH_LEANER
+      && !soap->fpreparesend
+#endif
+      ))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    else
+      soap->mode |= SOAP_IO_LENGTH;
+  }
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (!(soap->mode & SOAP_ENC_DIME))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+    soap->mode |= SOAP_ENC_MIME;
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+  soap->dime.list = soap->dime.last;	/* keep track of last DIME attachment */
+#endif
+  soap->count = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->part = SOAP_BEGIN;
+  soap->idnum = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin count phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+#ifndef WITH_LEANER
+  soap->dime.count = 0; /* count # of attachments */
+  soap->dime.size = 0; /* accumulate total size of attachments */
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+    return soap->error = soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_count(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->fpreparefinal)
+    return soap->error = soap->fpreparefinal(soap);
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of count phase\n"));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_send(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+  soap->mode = soap->omode | (soap->mode & (SOAP_IO_LENGTH | SOAP_ENC_DIME));
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+#ifdef WITH_UDP
+  if ((soap->mode & SOAP_IO_UDP))
+  { soap->mode |= SOAP_ENC_XML;
+    if (soap->count > SOAP_BUFLEN)
+      return soap->error = SOAP_UDP_ERROR;
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_FLUSH && soap_valid_socket(soap->socket))
+  { if (soap->count || (soap->mode & SOAP_IO_LENGTH) || (soap->mode & SOAP_ENC_XML))
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+  soap->mode &= ~SOAP_IO_LENGTH;
+  if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap_new_block(soap);
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+  { soap->mode |= SOAP_ENC_MIME;
+    soap->mode &= ~SOAP_ENC_DIME;
+  }
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket)) /* Set win32 stdout or soap->sendfd to BINARY, e.g. to support DIME */
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->sendfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->sendfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#endif
+  if (soap->mode & SOAP_IO)
+  { soap->bufidx = 0;
+    soap->buflen = 0;
+  }
+  soap->chunksize = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+#ifdef WITH_ZLIB
+  soap->z_ratio_out = 1.0;
+  if ((soap->mode & SOAP_ENC_ZLIB) && soap->zlib_state != SOAP_ZLIB_DEFLATE)
+  {
+#ifdef WITH_GZIP
+    memcpy(soap->z_buf, "\37\213\10\0\0\0\0\0\0\377", 10);
+    soap->d_stream.next_out = (Byte*)soap->z_buf + 10;
+    soap->d_stream.avail_out = SOAP_BUFLEN - 10;
+    soap->z_crc = crc32(0L, NULL, 0);
+    if (deflateInit2(&soap->d_stream, soap->z_level, Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY) != Z_OK)
+#else
+    soap->d_stream.next_out = (Byte*)soap->z_buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    if (deflateInit(&soap->d_stream, soap->z_level) != Z_OK)
+#endif
+      return soap->error = SOAP_ZLIB_ERROR;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflate initialized\n"));
+    soap->zlib_state = SOAP_ZLIB_DEFLATE;
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin send phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+  soap->part = SOAP_BEGIN;
+#ifndef WITH_LEANER
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_embedded(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { pp->mark1 = 1;
+    pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded %p type=%d mark set to 1\n", p, t));
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_reference(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (!p || (soap->mode & SOAP_XML_TREE))
+    return 1;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (soap_pointer_enter(soap, p, NULL, 0, t, &pp))
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  else
+    return 1;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reference %p type=%d (%d %d)\n", p, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_reference(struct soap *soap, const void *p, const struct soap_array *a, int n, int t)
+{ register int i;
+  struct soap_plist *pp;
+  if (!p || !a->__ptr)
+    return 1;
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (i)
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (!soap_pointer_enter(soap, p, a, n, t, &pp))
+    return 1;
+  else
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array reference %p ptr=%p dim=%d type=%d (%d %d)\n", p, a->__ptr, n, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embedded_id(struct soap *soap, int id, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap->mode & SOAP_XML_TREE)
+    return id;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id %p type=%d id=%d\n", p, t, id));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (id < 0)
+    { id = soap_pointer_lookup(soap, p, t, &pp);
+      if (id)
+      { if (soap->mode & SOAP_IO_LENGTH)
+          pp->mark1 = 2;
+        else
+          pp->mark2 = 2;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id multiref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+      }
+      return -1;
+    }
+    return id;
+  }
+  if (id < 0)
+    id = soap_pointer_lookup(soap, p, t, &pp);
+  else if (id && !soap_pointer_lookup(soap, p, t, &pp))
+    return 0;
+  if (id && pp)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      pp->mark1 = 1;
+    else
+      pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id embedded ref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+  }
+  return id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Is embedded? %d %d\n", (int)pp->mark1, (int)pp->mark2));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      return pp->mark1 != 0;
+    return pp->mark2 != 0;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 1;
+  return pp->mark2 == 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_single(struct soap *soap, struct soap_plist *pp)
+{ if (soap->part == SOAP_IN_HEADER)
+    return 1;
+  if (!pp)
+    return 0;
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 0;
+  return pp->mark2 == 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return;
+  if (soap->mode & SOAP_IO_LENGTH)
+    pp->mark1 = 1;
+  else
+    pp->mark2 = 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attachment(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, const char *aid, const char *atype, const char *aoptions, int n, const char *type, int t) 
+{ struct soap_plist *pp;
+  int i;
+  if (!p || !a->__ptr || (!aid && !atype))
+    return soap_element_id(soap, tag, id, p, a, n, type, t);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Attachment tag='%s' id='%s' (%d) type='%s'\n", tag, aid?aid:"", id, atype?atype:""));
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (!i)
+  { i = soap_pointer_enter(soap, p, a, n, t, &pp);
+    if (!i)
+    { soap->error = SOAP_EOM;
+      return -1;
+    }
+  }
+  if (id <= 0)
+    id = i;
+  if (!aid)
+  { sprintf(soap->tmpbuf, soap->dime_id_format, id);
+    aid = soap_strdup(soap, soap->tmpbuf);
+  }
+  /* Add MTOM xop:Include element when necessary */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  if ((soap->mode & SOAP_ENC_MTOM) && strcmp(tag, "xop:Include"))
+  { if (soap_element_begin_out(soap, tag, 0, type)
+     || soap_element_href(soap, "xop:Include", 0, "href", aid)
+     || soap_element_end_out(soap, tag))
+      return soap->error;
+  }
+  else if (soap_element_href(soap, tag, 0, "href", aid))
+    return soap->error;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { if (pp->mark1 != 3)
+    { struct soap_multipart *content;
+      if (soap->mode & SOAP_ENC_MTOM)
+        content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, (char*)a->__ptr, a->__size);
+      else
+        content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, (char*)a->__ptr, a->__size);
+      if (!content)
+      { soap->error = SOAP_EOM;
+        return -1;
+      }
+      if (!strncmp(aid, "cid:", 4)) /* RFC 2111 */
+      { if (soap->mode & SOAP_ENC_MTOM)
+        { char *s = (char*)soap_malloc(soap, strlen(aid) - 1);
+	  if (s)
+	  { *s = '<';
+	    strcpy(s + 1, aid + 4);
+	    strcat(s, ">");
+	    content->id = s;
+          }
+        }
+        else
+          content->id = aid + 4;
+      }
+      else
+        content->id = aid;
+      content->type = atype;
+      content->options = aoptions;
+      content->encoding = SOAP_MIME_BINARY;
+      pp->mark1 = 3;
+    }
+  }
+  else
+    pp->mark2 = 3;
+  return -1;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_iht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+    soap->iht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_iht(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip, *p;
+  register struct soap_flist *fp, *fq;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = p)
+    { for (fp = ip->flist; fp; fp = fq)
+      { fq = fp->next;
+        SOAP_FREE(soap, fp);
+      }
+      p = ip->next;
+      SOAP_FREE(soap, ip);
+    }
+    soap->iht[i] = NULL;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_lookup(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  for (ip = soap->iht[soap_hash(id)]; ip; ip = ip->next)
+    if (!strcmp(ip->id, id))
+      return ip;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_enter(struct soap *soap, const char *id)
+{ register size_t h;
+  register struct soap_ilist *ip;
+  ip = (struct soap_ilist*)SOAP_MALLOC(soap, sizeof(struct soap_ilist) + strlen(id));
+  if (ip)
+  { h = soap_hash(id);
+    strcpy(ip->id, id);
+    ip->next = soap->iht[h];
+    soap->iht[h] = ip;
+    return ip;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_malloc(struct soap *soap, size_t n)
+{ register char *p;
+  if (!n)
+    return (void*)SOAP_NON_NULL;
+  if (!soap)
+    return SOAP_MALLOC(soap, n);
+  n += (-(long)n) & (sizeof(void*)-1); /* align at 4-, 8- or 16-byte boundary */
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(void*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  /* keep chain of alloced cells for later destruction */
+  soap->alloced = 1;
+  *(void**)(p + n) = soap->alist;
+  *(size_t*)(p + n + sizeof(void*)) = n;
+  soap->alist = p + n;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_mht(struct soap *soap)
+{ register int i;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->mht[i] = NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_free_mht(struct soap *soap)
+{ register int i;
+  register struct soap_mlist *mp, *mq;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+  { for (mp = soap->mht[i]; mp; mp = mq)
+    { mq = mp->next;
+      if (mp->live)
+        fprintf(stderr, "%s(%d): malloc() = %p not freed (memory leak or forgot to call soap_end()?)\n", mp->file, mp->line, mp->ptr);
+      free(mp);
+    }
+    soap->mht[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_track_malloc(struct soap *soap, const char *file, int line, size_t size)
+{ register void *p = malloc(size);
+  if (soap)
+  { register int h = soap_hash_ptr(p);
+    register struct soap_mlist *mp = (struct soap_mlist*)malloc(sizeof(struct soap_mlist));
+    if (soap->fdebug[SOAP_INDEX_TEST])
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): malloc(%lu) = %p\n", file, line, (unsigned long)size, p));
+    mp->next = soap->mht[h];
+    mp->ptr = p;
+    mp->file = file;
+    mp->line = line;
+    mp->live = 1;
+    soap->mht[h] = mp;
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_track_free(struct soap *soap, const char *file, int line, void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+  { if (mp->live)
+    { free(p);
+      if (soap->fdebug[SOAP_INDEX_TEST])
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): free(%p)\n", file, line, p));
+      mp->live = 0;
+    }
+    else
+      fprintf(stderr, "%s(%d): free(%p) double free of pointer malloced at %s(%d)\n", file, line, p, mp->file, mp->line);
+  }
+  else
+    fprintf(stderr, "%s(%d): free(%p) pointer not malloced\n", file, line, p);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_track_unlink(struct soap *soap, const void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+    mp->live = 0;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_dealloc(struct soap *soap, void *p)
+{ if (!soap)
+    return;
+  if (p)
+  { register char **q;
+    for (q = (char**)&soap->alist; *q; q = *(char***)q)
+    { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+      { *q = **(char***)q;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Freed data at %p\n", p));
+        SOAP_FREE(soap, p);
+        return;
+      }
+    }
+    soap_delete(soap, p);
+  }
+  else
+  { register char *q;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free all soap_malloc() data\n"));
+    while (soap->alist)
+    { q = (char*)soap->alist;
+      soap->alist = *(void**)q;
+      q -= *(size_t*)(q + sizeof(void*));
+      SOAP_FREE(soap, q);
+    }
+  }
+  /* we must assume these were deallocated: */
+  soap->action = NULL;
+  soap->fault = NULL;
+  soap->header = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->authrealm = NULL;
+#ifndef WITH_LEANER
+  soap_clr_mime(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_delete(struct soap *soap, void *p)
+{ register struct soap_clist **cp;
+  if (soap_check_state(soap))
+    return;
+  cp = &soap->clist;
+  if (p)
+  { while (*cp)
+    { if (p == (*cp)->ptr)
+      { register struct soap_clist *q = *cp;
+        *cp = q->next;
+        q->fdelete(q);
+        SOAP_FREE(soap, q);
+        return;
+      }
+      cp = &(*cp)->next;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: address not in list\n", p));
+  }
+  else
+  { while (*cp)
+    { register struct soap_clist *q = *cp;
+      *cp = q->next;
+      if (q->ptr == (void*)soap->fault)
+        soap->fault = NULL; /* this was deallocated */
+      else if (q->ptr == (void*)soap->header)
+        soap->header = NULL; /* this was deallocated */
+      q->fdelete(q);
+      SOAP_FREE(soap, q);
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_clist *
+SOAP_FMAC2
+soap_link(struct soap *soap, void *p, int t, int n, void (*fdelete)(struct soap_clist*))
+{ register struct soap_clist *cp;
+  if ((cp = (struct soap_clist*)SOAP_MALLOC(soap, sizeof(struct soap_clist))))
+  { cp->next = soap->clist;
+    cp->type = t;
+    cp->size = n; 
+    cp->ptr = p;
+    cp->fdelete = fdelete;
+    soap->clist = cp;
+  }
+  return cp;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_unlink(struct soap *soap, const void *p)
+{ register char **q;
+  register struct soap_clist **cp;
+  if (!soap || !p)
+    return;
+  for (q = (char**)&soap->alist; *q; q = *(char***)q)
+  { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+    { *q = **(char***)q;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked data %p\n", p));
+#ifdef SOAP_DEBUG
+      soap_track_unlink(soap, p);
+#endif
+      return;
+    }
+  }
+  for (cp = &soap->clist; *cp; cp = &(*cp)->next)
+  { if (p == (*cp)->ptr)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked class instance %p\n", p));
+      q = (char**)*cp;
+      *cp = (*cp)->next;
+      SOAP_FREE(soap, q);
+      return;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_lookup_type(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  if (id && *id)
+  { ip = soap_lookup(soap, id);
+    if (ip)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup id='%s' type=%d\n", id, ip->type));
+      return ip->type;
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "lookup type id='%s' NOT FOUND! Need to get it from xsi:type\n", id));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, unsigned int k)
+{ struct soap_ilist *ip;
+  void **q;
+  if (!p || !id || !*id)
+    return p;
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding first href='%s' type=%d %p (%u bytes)\n", id, t, p, (unsigned int)n));
+    ip->type = t;
+    ip->size = n; 
+    ip->link = p;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->ptr = NULL;
+    ip->level = k;
+    *p = NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolved href='%s' type=%d location=%p (%u bytes)\n", id, t, ip->ptr, (unsigned int)n));
+    if (ip->type != t)
+    { strcpy(soap->id, id);
+      soap->error = SOAP_HREF;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility: id type=%d href type=%d\n", ip->type, t));
+      return NULL;
+    }
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      if (!q)
+        return NULL;
+      *p = (void*)q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    *p = ip->ptr;
+  }
+  else if (ip->level > k)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving level %u pointers to href='%s'\n", ip->level, id));
+    while (ip->level > k)
+    { void *s, **r = &ip->link;
+      q = (void**)ip->link;
+      while (q)
+      { *r = (void*)soap_malloc(soap, sizeof(void*));
+        s = *q;
+        *q = *r;
+        r = (void**)*r;
+        q = (void**)s;
+      }
+      *r = NULL;
+      ip->size = n; 
+      ip->copy = NULL;
+      ip->level = ip->level - 1;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarded href='%s' type=%d location=%p (%u bytes)\n", id, t, p, (unsigned int)n));
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      *p = q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_forward(struct soap *soap, const char *href, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t))
+{ struct soap_ilist *ip;
+  if (!p || !href || !*href)
+    return p;
+  ip = soap_lookup(soap, href); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, href); /* new hash table entry for string id */
+    ip->type = st;
+    ip->size = n;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->ptr = NULL;
+    ip->level = 0;
+    ip->flist = NULL;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry href='%s' type=%d size=%lu level=%d location=%p\n", href, st, (unsigned long)n, k, p));
+  }
+  else if (ip->type != st || (ip->level == k && ip->size != n))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", href, ip->type, (unsigned long)ip->size, k, st, (unsigned long)n));
+    strcpy(soap->id, href);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  if (fcopy || n < sizeof(void*) || *href != '#')
+  { register struct soap_flist *fp = (struct soap_flist*)SOAP_MALLOC(soap, sizeof(struct soap_flist));
+    if (!fp)
+    { soap->error = SOAP_EOM;
+      return NULL;
+    }
+    fp->next = ip->flist;
+    fp->type = tt;
+    fp->ptr = p;
+    fp->level = k;
+    fp->len = len;
+    if (fcopy)
+      fp->fcopy = fcopy;
+    else
+      fp->fcopy = soap_fcopy;
+    ip->flist = fp;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding type=%d (target type=%d) size=%lu location=%p level=%u len=%lu href='%s'\n", st, tt, (unsigned long)n, p, k, (unsigned long)len, href));
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding copying address %p for type=%d href='%s'\n", p, st, href));
+    *(void**)p = ip->copy;
+    ip->copy = p;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*))
+{
+#ifndef WITH_NOIDREF
+  struct soap_ilist *ip;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Enter id='%s' type=%d loc=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  soap->alloced = 0;
+  if (!p)
+  { if (finstantiate)
+      p = finstantiate(soap, t, type, arrayType, &n);
+    else
+      p = soap_malloc(soap, n);
+    if (p)
+      soap->alloced = 1;
+  }
+#ifndef WITH_NOIDREF
+  if (!id || !*id)
+#endif
+    return p;
+#ifndef WITH_NOIDREF
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Lookup entry id='%s for location=%p'\n", id, p));
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    ip->type = t;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry id='%s' type=%d size=%lu level=%u location=%p\n", id, t, (unsigned long)n, k, p));
+  }
+  else if ((ip->type != t || (ip->level == k && ip->size != n)) && (ip->copy || ip->flist))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", id, ip->type, (unsigned long)ip->size, k, t, (unsigned long)n));
+    strcpy(soap->id, id);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Multiply defined id='%s'\n", id));
+    strcpy(soap->id, id);
+    soap->error = SOAP_DUPLICATE_ID;
+    return NULL;
+  }
+  else 
+  { ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update entry id='%s' type=%d location=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  }
+  return ip->ptr;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{ DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Copying data type=%d (target type=%d) %p -> %p (%lu bytes)\n", st, tt, q, p, (unsigned long)n));
+  memcpy(p, q, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_send(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->dime.list)
+  { /* SOAP body referenced attachments must appear first */
+    soap->dime.last->next = soap->dime.first;
+    soap->dime.first = soap->dime.list->next;
+    soap->dime.list->next = NULL;
+    soap->dime.last = soap->dime.list;
+  }
+  if (soap_putdime(soap) || soap_putmime(soap))
+    return soap->error;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End send\n"));
+  if (soap->mode & SOAP_IO) /* need to flush the remaining data in buffer */
+  { if (soap_flush(soap))
+#ifdef WITH_ZLIB
+    { if (soap->mode & SOAP_ENC_ZLIB && soap->zlib_state == SOAP_ZLIB_DEFLATE)
+      { soap->zlib_state = SOAP_ZLIB_NONE;
+        deflateEnd(&soap->d_stream);
+      }
+      return soap->error;
+    }
+#else
+      return soap->error;
+#endif
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { int r;
+      soap->d_stream.avail_in = 0;
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating remainder\n"));
+        r = deflate(&soap->d_stream, Z_FINISH);
+        if (soap->d_stream.avail_out != SOAP_BUFLEN)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN - soap->d_stream.avail_out))
+          { soap->zlib_state = SOAP_ZLIB_NONE;
+            deflateEnd(&soap->d_stream);
+            return soap->error;
+	  }
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (r == Z_OK);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+      soap->z_ratio_out = (float)soap->d_stream.total_out / (float)soap->d_stream.total_in;
+      soap->mode &= ~SOAP_ENC_ZLIB;
+      soap->zlib_state = SOAP_ZLIB_NONE;
+      if (deflateEnd(&soap->d_stream) != Z_OK || r != Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to end deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+#ifdef WITH_GZIP
+      soap->z_buf[0] = soap->z_crc & 0xFF;
+      soap->z_buf[1] = (soap->z_crc >> 8) & 0xFF;
+      soap->z_buf[2] = (soap->z_crc >> 16) & 0xFF;
+      soap->z_buf[3] = (soap->z_crc >> 24) & 0xFF;
+      soap->z_buf[4] = soap->d_stream.total_in & 0xFF;
+      soap->z_buf[5] = (soap->d_stream.total_in >> 8) & 0xFF;
+      soap->z_buf[6] = (soap->d_stream.total_in >> 16) & 0xFF;
+      soap->z_buf[7] = (soap->d_stream.total_in >> 24) & 0xFF;
+      if (soap_flush_raw(soap, soap->z_buf, 8))
+        return soap->error;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip crc32=%lu\n", (unsigned long)soap->z_crc));
+#endif
+    }
+#endif
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    { char *p;
+#ifndef WITH_NOHTTP
+      if (!(soap->mode & SOAP_ENC_XML))
+      { soap->mode--;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending buffered message of length %u\n", (unsigned int)soap->blist->size));
+        if (soap->status >= SOAP_POST)
+          soap->error = soap->fpost(soap, soap->endpoint, soap->host, soap->port, soap->path, soap->action, soap->blist->size);
+        else if (soap->status != SOAP_STOP)
+          soap->error = soap->fresponse(soap, soap->status, soap->blist->size);
+        if (soap->error || soap_flush(soap))
+          return soap->error;
+        soap->mode++;
+      }
+#endif
+      for (p = soap_first_block(soap); p; p = soap_next_block(soap))
+      { DBGMSG(SENT, p, soap_block_size(soap));
+        if ((soap->error = soap->fsend(soap, p, soap_block_size(soap))))
+        { soap_end_block(soap);
+          return soap->error;
+        }
+      }
+      soap_end_block(soap);
+    }
+#ifndef WITH_LEANER
+    else if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { DBGMSG(SENT, "\r\n0\r\n\r\n", 7);
+      if ((soap->error = soap->fsend(soap, "\r\n0\r\n\r\n", 7)))
+        return soap->error;
+    }
+#endif
+  }
+#ifdef WITH_TCPFIN
+#ifdef WITH_OPENSSL
+  if (!soap->ssl && soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#else
+  if (soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#endif
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of send phase\n"));
+  soap->omode &= ~SOAP_XML_SEC;
+  soap->count = 0;
+  soap->part = SOAP_END;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_recv(struct soap *soap)
+{ soap->part = SOAP_END;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) && soap_getdime(soap))
+    return soap->error;
+  soap->dime.list = soap->dime.first;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  if ((soap->mode & SOAP_ENC_MIME) && soap_getmime(soap))
+    return soap->error;
+  soap->mime.list = soap->mime.first;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "End of receive message ok\n"));
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { soap->mode &= ~SOAP_ENC_ZLIB;
+    memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+    soap->bufidx = (char*)soap->d_stream.next_in - soap->z_buf;
+    soap->buflen = soap->z_buflen;
+    soap->zlib_state = SOAP_ZLIB_NONE;
+    if (inflateEnd(&soap->d_stream) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+#ifdef WITH_GZIP
+    if (soap->zlib_in == SOAP_ZLIB_GZIP)
+    { soap_wchar c;
+      short i;
+      for (i = 0; i < 8; i++)
+      { if ((int)(c = soap_getchar(soap)) == EOF)
+          return soap->error = SOAP_EOF;
+        soap->z_buf[i] = (char)c;
+      }
+      if (soap->z_crc != ((uLong)(unsigned char)soap->z_buf[0] | ((uLong)(unsigned char)soap->z_buf[1] << 8) | ((uLong)(unsigned char)soap->z_buf[2] << 16) | ((uLong)(unsigned char)soap->z_buf[3] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: crc check failed, message corrupted? (crc32=%lu)\n", (unsigned long)soap->z_crc));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+      if (soap->d_stream.total_out != ((uLong)(unsigned char)soap->z_buf[4] | ((uLong)(unsigned char)soap->z_buf[5] << 8) | ((uLong)(unsigned char)soap->z_buf[6] << 16) | ((uLong)(unsigned char)soap->z_buf[7] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: incorrect message length\n"));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+    }
+#endif
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    while ((int)soap_getchar(soap) != EOF) /* advance to last chunk */
+      ;
+  if (soap->fdisconnect && (soap->error = soap->fdisconnect(soap)))
+    return soap->error;
+#ifndef WITH_NOIDREF
+  return soap_resolve(soap);
+#else
+#ifndef WITH_LEANER
+  if (soap->xlist)
+  { if (soap->mode & SOAP_ENC_MTOM)
+      return soap->error = SOAP_MIME_HREF;
+    return soap->error = SOAP_DIME_HREF;
+  }
+#endif
+  return SOAP_OK;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free(struct soap *soap)
+{ register struct Namespace *ns;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free namespace stack\n"));
+  while (soap->nlist)
+  { register struct soap_nlist *np = soap->nlist->next;
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free any remaining temp blocks\n"));
+  while (soap->blist)
+    soap_end_block(soap);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute storage\n"));
+  while (soap->attributes)
+  { register struct soap_attribute *tp = soap->attributes->next;
+    if (soap->attributes->value)
+      SOAP_FREE(soap, soap->attributes->value);
+    SOAP_FREE(soap, soap->attributes);
+    soap->attributes = tp;
+  }
+#ifdef WITH_FAST
+  if (soap->labbuf)
+    SOAP_FREE(soap, soap->labbuf);
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  ns = soap->local_namespaces;
+  if (ns)
+  { for (; ns->id; ns++)
+    { if (ns->out)
+      { if (soap->encodingStyle == ns->out)
+          soap->encodingStyle = SOAP_STR_EOS;
+        SOAP_FREE(soap, ns->out);
+        ns->out = NULL;
+      }
+      if (soap->encodingStyle == ns->ns)
+        soap->encodingStyle = SOAP_STR_EOS;
+    }
+    SOAP_FREE(soap, soap->local_namespaces);
+    soap->local_namespaces = NULL;
+  }
+#ifndef WITH_LEANER
+  while (soap->xlist)
+  { struct soap_xlist *xp = soap->xlist->next;
+    SOAP_FREE(soap, soap->xlist);
+    soap->xlist = xp;
+  }
+#endif
+#ifndef WITH_NOIDREF
+  soap_free_pht(soap);
+  soap_free_iht(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_logs(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { soap->logfile[i] = NULL;
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEAN) || defined(SOAP_DEBUG)
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_open_logfile(struct soap *soap, int i)
+{ if (soap->logfile[i])
+    soap->fdebug[i] = fopen(soap->logfile[i], i < 2 ? "ab" : "a");
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_close_logfile(struct soap *soap, int i)
+{ if (soap->fdebug[i])
+  { fclose(soap->fdebug[i]);
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_close_logfiles(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+    soap_close_logfile(soap, i);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_set_logfile(struct soap *soap, int i, const char *logfile)
+{ char *s = NULL;
+  soap_close_logfile(soap, i);
+  if (soap->logfile[i])
+    SOAP_FREE(soap, (void*)soap->logfile[i]);
+  if (logfile)
+    if ((s = (char*)SOAP_MALLOC(soap, strlen(logfile) + 1)))
+      strcpy(s, logfile);
+  soap->logfile[i] = s;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_recv_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_RECV, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_sent_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_SENT, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_test_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_TEST, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy(struct soap *soap)
+{ return soap_copy_context((struct soap*)malloc(sizeof(struct soap)), soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy_context(struct soap *copy, struct soap *soap)
+{ if (soap_check_state(soap))
+    return NULL;
+  if (copy)
+  { register struct soap_plugin *p;
+    memcpy(copy, soap, sizeof(struct soap));
+    copy->state = SOAP_COPY;
+    copy->user = NULL;
+    copy->error = SOAP_OK;
+    copy->userid = NULL;
+    copy->passwd = NULL;
+    copy->nlist = NULL;
+    copy->blist = NULL;
+    copy->clist = NULL;
+    copy->alist = NULL;
+    copy->attributes = NULL;
+#ifdef WITH_FAST
+    copy->labbuf = NULL;
+    copy->lablen = 0;
+    copy->labidx = 0;
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_mht(copy);
+#endif
+    copy->local_namespaces = NULL;
+#ifndef WITH_NOIDREF
+    soap_init_iht(copy);
+    soap_init_pht(copy);
+#endif
+    copy->header = NULL;
+    copy->fault = NULL;
+    copy->action = NULL;
+#ifndef WITH_LEAN
+#ifdef WITH_COOKIES
+    copy->cookies = soap_copy_cookies(copy);
+#else
+    copy->cookies = NULL;
+#endif
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_logs(copy);
+    soap_set_recv_logfile(copy, soap->logfile[SOAP_INDEX_RECV]);
+    soap_set_sent_logfile(copy, soap->logfile[SOAP_INDEX_SENT]);
+    soap_set_test_logfile(copy, soap->logfile[SOAP_INDEX_TEST]);
+#endif
+    copy->plugins = NULL;
+    for (p = soap->plugins; p; p = p->next)
+    { register struct soap_plugin *q = (struct soap_plugin*)SOAP_MALLOC(copy, sizeof(struct soap_plugin));
+      if (!q)
+        return NULL;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying plugin '%s'\n", p->id));
+      *q = *p;
+      if (p->fcopy && (soap->error = p->fcopy(copy, q, p)))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not copy plugin '%s'\n", p->id));
+        SOAP_FREE(copy, q);
+        return NULL;
+      }
+      q->next = copy->plugins;
+      copy->plugins = q;
+    }
+  }
+  else
+    soap->error = SOAP_EOM;
+  return copy;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init(struct soap *soap)
+{ soap->state = SOAP_INIT;
+  soap->version = 0;
+  soap_imode(soap, SOAP_IO_DEFAULT);
+  soap_omode(soap, SOAP_IO_DEFAULT);
+  soap->plugins = NULL;
+  soap->user = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+  soap->fconnect = NULL;
+  soap->fdisconnect = NULL;
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+  soap->fplugin = fplugin;
+#ifndef WITH_LEANER
+  soap->fdimereadopen = NULL;
+  soap->fdimewriteopen = NULL;
+  soap->fdimereadclose = NULL;
+  soap->fdimewriteclose = NULL;
+  soap->fdimeread = NULL;
+  soap->fdimewrite = NULL;
+#endif
+  soap->float_format = "%.8g"; /* .8 preserves single FP precision as much as possible, but might not be very efficient */
+  soap->double_format = "%.17lg"; /* .17 preserves double FP precision as much as possible, but might not be very efficient */
+  soap->dime_id_format = "cid:id%d"; /* default DIME id format */
+  soap->http_version = "1.1";
+  soap->actor = NULL;
+  soap->max_keep_alive = SOAP_MAXKEEPALIVE;
+  soap->keep_alive = 0;
+  soap->recv_timeout = 0;
+  soap->send_timeout = 0;
+  soap->connect_timeout = 0;
+  soap->accept_timeout = 0;
+  soap->socket_flags = 0;
+  soap->connect_flags = 0;
+  soap->bind_flags = 0;
+  soap->accept_flags = 0;
+  soap->ip = 0;
+#ifdef WITH_FAST
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  soap->encodingStyle = SOAP_STR_EOS;
+#ifndef WITH_NONAMESPACES
+  soap->namespaces = namespaces;
+#else
+  soap->namespaces = NULL;
+#endif
+  soap->local_namespaces = NULL;
+  soap->nlist = NULL;
+  soap->blist = NULL;
+  soap->clist = NULL;
+  soap->alist = NULL;
+  soap->attributes = NULL;
+  soap->header = NULL;
+  soap->fault = NULL;
+  soap->master = SOAP_INVALID_SOCKET;
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->os = NULL;
+  soap->is = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifndef UNDER_CE
+  soap->recvfd = 0;
+  soap->sendfd = 1;
+#else
+  soap->recvfd = stdin;
+  soap->sendfd = stdout;
+#endif 
+  soap->host[0] = '\0';
+  soap->port = 0;
+  soap->action = NULL;
+  soap->proxy_host = NULL;
+  soap->proxy_port = 8080;
+  soap->proxy_userid = NULL;
+  soap->proxy_passwd = NULL;
+  soap->authrealm = NULL;
+  soap->prolog = NULL;
+#ifdef WITH_OPENSSL
+  if (!ssl_init_done)
+    soap_ssl_init();
+  soap->fsslauth = ssl_auth_init;
+  soap->fsslverify = ssl_verify_callback;
+  soap->bio = NULL;
+  soap->ssl = NULL;
+  soap->ctx = NULL;
+  soap->require_server_auth = 0;
+  soap->require_client_auth = 0;
+  soap->rsa = 0;
+  soap->keyfile = NULL;
+  soap->password = NULL;
+  soap->dhfile = NULL;
+  soap->cafile = NULL;
+  soap->capath = NULL;
+  soap->crlfile = NULL;
+  soap->randfile = NULL;
+  soap->session = NULL;
+#endif
+#ifdef WITH_ZLIB
+  soap->zlib_state = SOAP_ZLIB_NONE;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.zalloc = NULL;
+  soap->d_stream.zfree = NULL;
+  soap->d_stream.opaque = NULL;
+  soap->z_level = 6;
+#endif
+#ifndef WITH_LEAN
+  soap->c14ninclude = NULL;
+  soap->c14nexclude = NULL;
+  soap->cookies = NULL;
+  soap->cookie_domain = NULL;
+  soap->cookie_path = NULL;
+  soap->cookie_max = 32;
+#endif
+#ifdef SOAP_DEBUG
+  soap_init_mht(soap);
+  soap_init_logs(soap);
+  soap_set_recv_logfile(soap, "RECV.log");
+  soap_set_sent_logfile(soap, "SENT.log");
+  soap_set_test_logfile(soap, NULL);
+#endif
+#ifdef WMW_RPM_IO
+  soap->rpmreqid = NULL;
+#endif
+#ifdef PALM
+  palmNetLibOpen();
+#endif
+#ifndef WITH_NOIDREF
+  soap_init_iht(soap);
+  soap_init_pht(soap);
+#endif
+  soap_begin(soap);
+#ifdef SOAP_DEBUG
+  soap_set_test_logfile(soap, "TEST.log");
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init1(struct soap *soap, soap_mode mode)
+{ soap_init2(soap, mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init2(struct soap *soap, soap_mode imode, soap_mode omode)
+{ soap_init(soap);
+  soap_imode(soap, imode);
+  soap_omode(soap, omode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_begin(struct soap *soap)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing\n"));
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+  soap->null = 0;
+  soap->position = 0;
+  soap->encoding = 0;
+  soap->mustUnderstand = 0;
+  soap->mode = 0;
+  soap->ns = 0;
+  soap->part = SOAP_END;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  soap->error = SOAP_OK;
+  soap->peeked = 0;
+  soap->ahead = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+  soap->endpoint[0] = '\0';
+#ifndef WITH_LEANER
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+#endif
+  soap_free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end(struct soap *soap)
+{ register struct soap_clist *cp;
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  soap_dealloc(soap, NULL);
+  while (soap->clist)
+  { cp = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = cp;
+  }
+  soap_closesock(soap);
+#ifdef SOAP_DEBUG
+  soap_close_logfiles(soap);
+#endif
+#ifdef PALM
+  palmNetLibClose();
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_namespaces(struct soap *soap, struct Namespace *p)
+{ register struct Namespace *ns = soap->local_namespaces;
+  register struct soap_nlist *np, *nq, *nr;
+  register unsigned int level = soap->level;
+  soap->namespaces = p;
+  soap->local_namespaces = NULL;
+  soap_set_local_namespaces(soap);
+  /* reverse the namespace list */
+  np = soap->nlist;
+  soap->nlist = NULL;
+  if (np)
+  { nq = np->next;
+    np->next = NULL;
+    while (nq)
+    { nr = nq->next;
+      nq->next = np;
+      np = nq;
+      nq = nr;
+    }
+  }
+  /* then push on new stack */
+  while (np)
+  { register const char *s;
+    soap->level = np->level; /* preserve element nesting level */
+    s = np->ns;
+    if (!s && np->index >= 0 && ns)
+    { s = ns[np->index].out;
+      if (!s)
+        s = ns[np->index].ns;
+    }
+    if (s && soap_push_namespace(soap, np->id, s))
+      return soap->error;
+    nq = np;
+    np = np->next;
+    SOAP_FREE(soap, nq);
+  }
+  if (ns)
+  { register int i;
+    for (i = 0; ns[i].id; i++)
+    { if (ns[i].out)
+      { SOAP_FREE(soap, ns[i].out);
+        ns[i].out = NULL;
+      }
+    }
+    SOAP_FREE(soap, ns);
+  }
+  soap->level = level; /* restore level */
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_local_namespaces(struct soap *soap)
+{ if (soap->namespaces && !soap->local_namespaces)
+  { register const struct Namespace *ns1;
+    register struct Namespace *ns2;
+    register size_t n = 1;
+    for (ns1 = soap->namespaces; ns1->id; ns1++)
+      n++;
+    n *= sizeof(struct Namespace);
+    ns2 = (struct Namespace*)SOAP_MALLOC(soap, n);
+    if (ns2)
+    { memcpy(ns2, soap->namespaces, n);
+      if (ns2[0].ns)
+      { if (!strcmp(ns2[0].ns, soap_env1))
+          soap->version = 1;
+        else
+          soap->version = 2;
+      }
+      soap->local_namespaces = ns2;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+#ifndef PALM_1
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_strsearch(const char *big, const char *little)
+{ size_t n = strlen(little);
+  const char *s = big;
+  while (s) 
+  { if (!strncmp(s, little, n) && (s[n] == '\0' || s[n] == ' '))
+      return s;
+    s = strchr(s, ' ');
+    if (s)
+      s++;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_lookup_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np;
+  for (np = soap->nlist; np; np = np->next)
+  { if (!strncmp(np->id, tag, n) && !np->id[n])
+      return np;
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized)
+{ register struct soap_nlist *np;
+  size_t n, k;
+  if (soap_strsearch(soap->c14nexclude, id))
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns?ns:""));
+  if (!utilized)
+  { for (np = soap->nlist; np; np = np->next)
+    { if (!strcmp(np->id, id) && (!np->ns || !strcmp(np->ns, ns)))
+        break;
+    }
+    if (np)
+    { if (np->index == 1)
+        utilized = np->index;
+      else
+        return NULL;
+    }
+  }
+  n = strlen(id);
+  if (ns)
+    k = strlen(ns);
+  else
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k + 1);
+  if (!np)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  np->next = soap->nlist;
+  soap->nlist = np;
+  strcpy(np->id, id);
+  if (ns)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+  }
+  else
+    np->ns = NULL;
+  np->level = soap->level;
+  np->index = utilized;
+  return np;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_utilize_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np = soap_lookup_ns(soap, tag, n);
+  if (np)
+  { if (np->index == 0)
+      soap_push_ns(soap, np->id, np->ns, 1);
+  }
+  else
+  { strncpy(soap->tmpbuf, tag, n);
+    soap->tmpbuf[n] = '\0';
+    soap_push_ns(soap, soap->tmpbuf, NULL, 1);
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_pop_ns(struct soap *soap)
+{ soap_pop_namespace(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element(struct soap *soap, const char *tag, int id, const char *type)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element begin tag='%s' id='%d' type='%s'\n", tag, id, type?type:""));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->soap = soap;
+    elt->next = NULL;
+    elt->prnt = soap->dom;
+    elt->name = soap_strdup(soap, tag);
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->nstr = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->node = NULL;
+    elt->type = 0;
+    elt->head = NULL;
+    elt->tail = NULL;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+  }
+  else
+  {
+#endif
+    soap->level++;
+#ifndef WITH_LEAN
+    if (!soap->ns)
+    { if (!(soap->mode & SOAP_XML_CANONICAL)
+       && soap_send(soap, soap->prolog ? soap->prolog : "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"))
+        return soap->error;
+    }
+    else if (soap->mode & SOAP_XML_INDENT)
+    { if (soap->ns == 1 && soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+      soap->body = 1;
+    }
+#endif
+    if (soap_send_raw(soap, "<", 1)
+     || soap_send(soap, tag))
+      return soap->error;
+#ifdef WITH_DOM
+  }
+#endif
+  if (!soap->ns)
+  { struct Namespace *ns;
+    for (ns = soap->local_namespaces; ns && ns->id; ns++)
+    { if (*ns->id && (ns->out || ns->ns))
+      { sprintf(soap->tmpbuf, "xmlns:%s", ns->id);
+        if (soap_attribute(soap, soap->tmpbuf, ns->out ? ns->out : ns->ns))
+          return soap->error;
+      }
+    }   
+  }
+  soap->ns = 1; /* start with 0 or 2, but should be one to continue */
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { const char *s = strchr(tag, ':');
+    if (s)
+      soap_utilize_ns(soap, tag, s - tag);
+  }
+#endif
+  if (id > 0)
+  { sprintf(soap->tmpbuf, "_%d", id);
+    if (soap_attribute(soap, "id", soap->tmpbuf))
+      return soap->error;
+  }
+  if (type && *type)
+  { if (soap_attribute(soap, "xsi:type", type))
+      return soap->error;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { const char *s = strchr(type, ':');
+      if (s)
+        soap_utilize_ns(soap, type, s - type);
+    }
+#endif
+  }
+  if (soap->null && soap->position > 0)
+  { int i;
+    sprintf(soap->tmpbuf, "[%d", soap->positions[0]);
+    for (i = 1; i < soap->position; i++)
+      sprintf(soap->tmpbuf + strlen(soap->tmpbuf), ",%d", soap->positions[i]);
+    strcat(soap->tmpbuf, "]");
+    if (soap_attribute(soap, "SOAP-ENC:position", soap->tmpbuf))
+      return soap->error;
+  }
+  if (soap->mustUnderstand)
+  { if (soap->actor && *soap->actor)
+    { if (soap_attribute(soap, soap->version == 2 ? "SOAP-ENV:role" : "SOAP-ENV:actor", soap->actor))
+        return soap->error;
+    }
+    if (soap_attribute(soap, "SOAP-ENV:mustUnderstand", soap->version == 2 ? "true" : "1"))
+      return soap->error;
+    soap->mustUnderstand = 0;
+  }
+  if (soap->encoding)
+  { if (soap->encodingStyle && soap->local_namespaces)
+    { if (!*soap->encodingStyle)
+      { if (soap->local_namespaces[1].out)
+          soap->encodingStyle = soap->local_namespaces[1].out;
+        else
+          soap->encodingStyle = soap->local_namespaces[1].ns;
+      }
+      if (soap_attribute(soap, "SOAP-ENV:encodingStyle", soap->encodingStyle))
+        return soap->error;
+    }
+    soap->encoding = 0;
+  }
+  soap->null = 0;
+  soap->position = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_out(struct soap *soap, const char *tag, int id, const char *type)
+{ if (*tag == '-')
+    return SOAP_OK;
+  if (soap_element(soap, tag, id, type))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRRCHR
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_strrchr(const char *s, int t)
+{ register char *r = NULL;
+  while (*s)
+    if (*s++ == t)
+      r = (char*)s - 1;
+  return r;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOL
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_strtol(const char *s, char **t, int b)
+{ register long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { short neg = 0;
+    if (*s == '-')
+    { s++;
+      neg = 1;
+    }
+    else if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 214748364 && (n > 214748364 || c >= '8'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+    if (neg)
+      n = -n;
+  }
+  else /* b == 16 and value is always positive */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x07FFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOUL
+SOAP_FMAC1
+unsigned long
+SOAP_FMAC2
+soap_strtoul(const char *s, char **t, int b)
+{ unsigned long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 429496729 && (n > 429496729 || c >= '6'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+  }
+  else /* b == 16 */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x0FFFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_begin_out(struct soap *soap, const char *tag, int id, const char *type, const char *offset)
+{ if (soap_element(soap, tag, id, "SOAP-ENC:Array"))
+    return soap->error;
+  if (soap->version == 2)
+  { const char *s;
+    s = soap_strrchr(type, '[');
+    if ((size_t)(s - type) < sizeof(soap->tmpbuf))
+    { strncpy(soap->tmpbuf, type, s - type);
+      soap->tmpbuf[s - type] = '\0';
+      if (type && *type && (soap_attribute(soap, "SOAP-ENC:itemType", soap->tmpbuf)))
+        return soap->error;
+      if (s && (soap_attribute(soap, "SOAP-ENC:arraySize", s + 1)))
+        return soap->error;
+    }
+  }
+  else
+  { if (offset && (soap_attribute(soap, "SOAP-ENC:offset", offset)))
+      return soap->error;
+    if (type && *type && (soap_attribute(soap, "SOAP-ENC:arrayType", type)))
+      return soap->error;
+  }
+#ifndef WITH_LEAN
+  if (type && *type && (soap->mode & SOAP_XML_CANONICAL))
+  { const char *s = strchr(type, ':');
+    if (s)
+      soap_utilize_ns(soap, type, s - type);
+  }
+#endif
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_start_end_out(struct soap *soap, const char *tag)
+{ register struct soap_attribute *tp;
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att;
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { att = &soap->dom->atts;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible)
+      { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+	if (!*att)
+	  return soap->error = SOAP_EOM;
+	(*att)->next = NULL;
+        (*att)->nstr = NULL;
+        (*att)->name = soap_strdup(soap, tp->name);
+        (*att)->data = soap_strdup(soap, tp->value);
+        (*att)->wide = NULL;
+        (*att)->soap = soap;
+        tp->visible = 0;
+      }
+    }
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { struct soap_nlist *np;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible && tp->name)
+      { const char *s = strchr(tp->name, ':');
+        if (s)
+          soap_utilize_ns(soap, tp->name, s - tp->name);
+      }
+    }
+    for (np = soap->nlist; np; np = np->next)
+    { if (np->index == 1 && np->ns)
+      { sprintf(soap->tmpbuf, "xmlns:%s", np->id);
+        soap_set_attr(soap, soap->tmpbuf, np->ns);
+        np->index = 2;
+      }
+    }
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible)
+    { if (soap_send(soap, " ") || soap_send(soap, tp->name))
+        return soap->error;
+      if (tp->visible == 2 && tp->value)
+        if (soap_send_raw(soap, "=\"", 2)
+	 || soap_string_out(soap, tp->value, 1)
+	 || soap_send_raw(soap, "\"", 1))
+          return soap->error;
+      tp->visible = 0;
+    }
+  }
+  if (tag)
+  { 
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { if (soap_send_raw(soap, ">", 1)
+       || soap_element_end_out(soap, tag))
+        return soap->error;
+    }
+    else
+#endif
+    soap->level--;	/* decrement level just before /> */
+    if (soap_send_raw(soap, "/>", 2))
+      return soap->error;
+    return SOAP_OK;
+  }
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_out(struct soap *soap, const char *tag)
+{ if (*tag == '-')
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element ending tag='%s'\n", tag));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+    soap_pop_ns(soap);
+  if (soap->mode & SOAP_XML_INDENT)
+  { if (!soap->body)
+    { if (soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+    }
+    soap->body = 0;
+  }
+#endif
+  if (soap_send_raw(soap, "</", 2)
+   || soap_send(soap, tag))
+    return soap->error;
+  soap->level--;	/* decrement level just before > */
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_ref(struct soap *soap, const char *tag, int id, int href)
+{ register int n = 0;
+  if (soap->version == 2)
+    n = 1;
+  sprintf(soap->href, "#_%d", href);
+  return soap_element_href(soap, tag, id, "href" + n, soap->href + n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_href(struct soap *soap, const char *tag, int id, const char *ref, const char *val)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element '%s' reference %s='%s'\n", tag, ref, val));
+  if (soap_element(soap, tag, id, NULL)
+   || soap_attribute(soap, ref, val)
+   || soap_element_start_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_null(struct soap *soap, const char *tag, int id, const char *type)
+{ struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (tp->visible)
+      break;
+  if (tp || (soap->version == 2 && soap->position > 0) || id > 0 || (soap->mode & SOAP_XML_NIL))
+  { if (soap_element(soap, tag, id, type))
+      return soap->error;
+    if (soap->part != SOAP_IN_HEADER && soap->encodingStyle)
+      if (soap_attribute(soap, "xsi:nil", "true"))
+        return soap->error;
+    return soap_element_start_end_out(soap, tag);
+  }
+  soap->null = 1;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_id(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, int n, const char *type, int t) 
+{ if (!p || (a && !a->__ptr))
+  { soap_element_null(soap, tag, id, type);
+    return -1;
+  }
+#ifndef WITH_NOIDREF
+  if (soap->mode & SOAP_XML_TREE)
+    return 0;
+  if (id < 0)
+  { struct soap_plist *pp;
+    if (a)
+      id = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+    else
+      id = soap_pointer_lookup(soap, p, t, &pp);
+    if (id)
+    { if (soap_is_embedded(soap, pp))
+      { soap_element_ref(soap, tag, 0, id);
+        return -1;
+      }
+      if (soap_is_single(soap, pp))
+        return 0;
+      soap_set_embedded(soap, pp);
+    }
+  }
+  return id;
+#else
+  return 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_result(struct soap *soap, const char *tag)
+{ if (soap->version == 2 && soap->encodingStyle)
+    if (soap_element(soap, "SOAP-RPC:result", 0, NULL)
+     || soap_attribute(soap, "xmlns:SOAP-RPC", soap_rpc)
+     || soap_element_start_end_out(soap, NULL)
+     || soap_string_out(soap, tag, 0)
+     || soap_element_end_out(soap, "SOAP-RPC:result"))
+      return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attribute(struct soap *soap, const char *name, const char *value)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+    a->next = soap->dom->atts;
+    a->nstr = NULL;
+    a->name = soap_strdup(soap, name);
+    a->data = soap_strdup(soap, value);
+    a->wide = NULL;
+    a->soap = soap;
+    soap->dom->atts = a;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { /* TODO: consider using this code to handle default namespace
+    if (!strncmp(name, "xmlns", 5) && (name[5] == ':' || name[5] == '\0'))
+    { if (name[5] == ':')
+        soap_push_ns(soap, name + 6, value, 0);
+      else
+        soap_push_ns(soap, "", value, 0);
+    }
+    */
+    if (!strncmp(name, "xmlns:", 6))
+      soap_push_ns(soap, name + 6, value, 0);
+    else if (soap_set_attr(soap, name, value))
+      return soap->error;
+  }
+  else
+#endif
+  { if (soap_send(soap, " ") || soap_send(soap, name))
+      return soap->error;
+    if (value)
+      if (soap_send_raw(soap, "=\"", 2)
+       || soap_string_out(soap, value, 1)
+       || soap_send_raw(soap, "\"", 1))
+        return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_in(struct soap *soap, const char *tag, int nillable)
+{ if (!soap_peek_element(soap))
+  { if (soap->other)
+      return soap->error = SOAP_TAG_MISMATCH;
+    if (tag && *tag == '-')
+      return SOAP_OK;
+    if (!(soap->error = soap_match_tag(soap, soap->tag, tag)))
+    { soap->peeked = 0;
+      if (soap->body)
+        soap->level++;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"" ));
+      if (!nillable && soap->null && (soap->mode & SOAP_XML_STRICT))
+        return soap->error = SOAP_NULL;
+    }
+  }
+  else if (soap->error == SOAP_NO_TAG && tag && *tag == '-')
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_in(struct soap *soap, const char *tag)  
+{ register soap_wchar c;
+  register char *s;
+  register const char *t;
+  register int n = 0;
+  if (tag && *tag == '-')
+    return SOAP_OK;
+  soap->level--;
+  soap_pop_namespace(soap);
+#ifdef WITH_DOM
+  /* this whitespace or mixed content is not insignificant for DOM */
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!soap->peeked && !soap_string_in(soap, 3, -1, -1))
+      return soap->error;
+    if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  if (soap->peeked)
+  { if (soap->error == SOAP_NO_TAG)
+      soap->error = SOAP_OK;
+    if (*soap->tag)
+      n++;
+    soap->peeked = 0;
+  }
+  do
+  { while (((c = soap_get(soap)) != SOAP_TT))
+    { if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      if (c == SOAP_LT)
+        n++;
+      else if (c == '/')
+      { c = soap_get(soap);
+        if (c == SOAP_GT)
+	  n--;
+        else
+	  soap_unget(soap, c);
+      }
+    }
+  } while (n--);
+  s = soap->tag;
+  while (soap_notblank(c = soap_get(soap)))
+    *s++ = (char)c;
+  *s = '\0';
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  while (soap_blank(c))
+    c = soap_get(soap);
+  if (c != SOAP_GT)
+    return soap->error = SOAP_SYNTAX_ERROR;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:""));
+  if (!tag || !*tag)
+    return SOAP_OK;
+  if ((s = strchr(soap->tag, ':')))
+    s++;
+  else
+    s = soap->tag;
+  if ((t = strchr(tag, ':')))
+    t++;
+  else
+    t = tag;
+  if (!SOAP_STRCMP(s, t))
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element tag name does not match\n"));
+  return soap->error = SOAP_SYNTAX_ERROR;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_attr_value(struct soap *soap, const char *name, int flag)
+{ register struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (!soap_match_tag(soap, tp->name, name))
+      break;
+  if (tp && tp->visible == 2)
+  { if (flag == 2 && (soap->mode & SOAP_XML_STRICT))
+      soap->error = SOAP_PROHIBITED;
+    else
+      return tp->value;
+  }
+  else if (flag == 1 && (soap->mode & SOAP_XML_STRICT))
+    soap->error = SOAP_REQUIRED;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_attr(struct soap *soap, const char *name, const char *value)
+{ register struct soap_attribute *tp;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set attribute %s='%s'\n", name, value?value:""));
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (!strcmp(tp->name, name))
+      break;
+  }
+  if (!tp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute %s\n", name));
+    if (!(tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(name))))
+      return soap->error = SOAP_EOM;
+    tp->ns = NULL;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { struct soap_attribute **tpp = &soap->attributes;
+      const char *s = strchr(name, ':');
+      if (!strncmp(name, "xmlns", 5))
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) || strcmp((*tpp)->name + 5, name + 5) > 0)
+            break;
+      }
+      else if (!s)
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) && ((*tpp)->ns || strcmp((*tpp)->name, name) > 0))
+            break;
+      }
+      else
+      { int k;
+        for (; *tpp; tpp = &(*tpp)->next)
+	{ if (!strncmp((*tpp)->name, "xmlns:", 6) && !strncmp((*tpp)->name + 6, name, s - name) && !(*tpp)->name[6 + s - name])
+	  { if (!tp->ns)
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Canonicalization: prefix %s=%p(%s)\n", name, (*tpp)->ns, (*tpp)->ns));
+	      tp->ns = (*tpp)->ns;
+	    }
+	  }
+          else if (strncmp((*tpp)->name, "xmlns", 5) && (*tpp)->ns && tp->ns && ((k = strcmp((*tpp)->ns, tp->ns)) > 0 || (!k && strcmp((*tpp)->name, name) > 0)))
+            break;
+        }
+      }
+      tp->next = *tpp;
+      *tpp = tp;
+    }
+    else
+#endif
+    { tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    strcpy(tp->name, name);
+    tp->value = NULL;
+  }
+  else if (tp->visible)
+  { return SOAP_OK;
+  }
+  else if (value && tp->value && tp->size <= strlen(value))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute value of %s (free %p)\n", name, tp->value));
+    SOAP_FREE(soap, tp->value);
+    tp->value = NULL;
+    tp->ns = NULL;
+  }
+  if (value)
+  { if (!tp->value)
+    { tp->size = strlen(value) + 1;
+      if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+        return soap->error = SOAP_EOM;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute value of %s (%p)\n", tp->name, tp->value));
+    }
+    strcpy(tp->value, value);
+    if (!strncmp(tp->name, "xmlns:", 6))
+      tp->ns = tp->value;
+    tp->visible = 2;
+#ifndef WITH_LEAN
+    if (!strcmp(name, "wsu:Id"))
+    { soap->part = SOAP_BEGIN_SECURITY;
+      strncpy(soap->id, value, sizeof(soap->id));
+      soap->id[sizeof(soap->id)-1] = '\0';
+    }
+#endif
+  }
+  else
+    tp->visible = 1;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_attr(struct soap *soap)
+{ register struct soap_attribute *tp;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_CANONICAL))
+  { while (soap->attributes)
+    { tp = soap->attributes->next;
+      SOAP_FREE(soap, soap->attributes->value);
+      SOAP_FREE(soap, soap->attributes);
+      soap->attributes = tp;
+    }
+  }
+  else
+#endif
+  { for (tp = soap->attributes; tp; tp = tp->next)
+      tp->visible = 0;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d)
+{ register size_t i;
+  for (i = 0; i < n; i++)
+  { register soap_wchar c = soap_get(soap);
+    switch (c)
+    {
+    case SOAP_TT:
+      *s++ = '<';
+      soap_unget(soap, '/');
+      break;
+    case SOAP_LT:
+      *s++ = '<';
+      break;
+    case SOAP_GT:
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '>';
+      break;
+    case SOAP_QT:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '"';
+      break;
+    case SOAP_AP:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '\'';
+      break;
+    case '\t':
+    case '\n':
+    case '\r':
+    case ' ':
+    case '/':
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+    default:
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+  }
+  return soap->error = SOAP_EOM;
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_store_lab(struct soap *soap, const char *s, size_t n)
+{ soap->labidx = 0;
+  return soap_append_lab(soap, s, n);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_append_lab(struct soap *soap, const char *s, size_t n)
+{ if (soap->labidx + n >= soap->lablen)
+  { register char *t = soap->labbuf;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enlarging look-aside buffer to append data, old size=%lu", (unsigned long)soap->lablen));
+    if (soap->lablen == 0)
+      soap->lablen = SOAP_LABLEN;
+    while (soap->labidx + n >= soap->lablen)
+      soap->lablen <<= 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, ", new size=%lu\n", (unsigned long)soap->lablen));
+    soap->labbuf = (char*)SOAP_MALLOC(soap, soap->lablen);
+    if (!soap->labbuf)
+    { if (t)
+        SOAP_FREE(soap, t);
+      return soap->error = SOAP_EOM;
+    }
+    if (t)
+    { memcpy(soap->labbuf, t, soap->labidx);
+      SOAP_FREE(soap, t);
+    }
+  }
+  if (s)
+  { memcpy(soap->labbuf + soap->labidx, s, n);
+    soap->labidx += n;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_peek_element(struct soap *soap)
+{
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att = NULL;
+  register char *lead = NULL;
+#endif
+  register struct soap_attribute *tp;
+  const char *t;
+  register char *s;
+  register soap_wchar c;
+  register int i;
+  if (soap->peeked)
+  { if (!*soap->tag)
+      return soap->error = SOAP_NO_TAG;
+    return SOAP_OK;
+  }
+  soap->peeked = 1;
+  c = soap_getutf8(soap);
+#ifdef WITH_DOM
+  /* whitespace leading to start tag is not insignificant for DOM */
+  if (soap_blank(c))
+  { soap->labidx = 0;
+    do
+    { if (soap_append_lab(soap, NULL, 0))
+        return SOAP_EOM;
+      s = soap->labbuf + soap->labidx;
+      i = soap->lablen - soap->labidx;
+      soap->labidx = soap->lablen;
+      while (soap_blank(c) && i--)
+      { *s++ = c;
+        c = soap_getutf8(soap);
+      }
+    }
+    while (soap_blank(c));
+    *s = '\0';
+    lead = soap_strdup(soap, soap->labbuf);
+  }
+#else
+  while (soap_blank(c))
+    c = soap_getutf8(soap);
+#endif
+  if (c != SOAP_LT)
+  { *soap->tag = '\0';
+    if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, c);
+#ifdef WITH_DOM
+    /* whitespace leading to end tag is not insignificant for DOM */
+    if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+      soap->dom->tail = soap_strdup(soap, lead);
+#endif
+    return soap->error = SOAP_NO_TAG;
+  }
+  s = soap->tag;
+  do c = soap_get1(soap);
+  while (soap_blank(c));
+  i = sizeof(soap->tag);
+  while (c != '>' && c != '/' && soap_notblank(c))
+  { if (--i > 0)
+      *s++ = (char)c;
+    c = soap_get1(soap);
+  }
+  while (soap_blank(c))
+    c = soap_get1(soap);
+  *s = '\0';
+  soap->id[0] = '\0';
+  soap->href[0] = '\0';
+  soap->type[0] = '\0';
+  soap->arrayType[0] = '\0';
+  soap->arraySize[0] = '\0';
+  soap->arrayOffset[0] = '\0';
+  soap->other = 0;
+  soap->root = -1;
+  soap->position = 0;
+  soap->null = 0;
+  soap->mustUnderstand = 0;
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt;
+    elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->next = NULL;
+    elt->nstr = NULL;
+    elt->name = soap_strdup(soap, soap->tag);
+    elt->prnt = soap->dom;
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->type = 0;
+    elt->node = NULL;
+    elt->head = lead;
+    elt->tail = NULL;
+    elt->soap = soap;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+    att = &elt->atts;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+    tp->visible = 0;
+  while ((int)c != EOF && c != '>' && c != '/')
+  { s = soap->tmpbuf;
+    i = sizeof(soap->tmpbuf);
+    while (c != '=' && c != '>' && c != '/' && soap_notblank(c))
+    { if (--i > 0)
+        *s++ = (char)c;
+      c = soap_get1(soap);
+    }
+    *s = '\0';
+    if (i == sizeof(soap->tmpbuf))
+      return soap->error = SOAP_SYNTAX_ERROR;
+#ifdef WITH_DOM
+    /* add attribute name to dom */
+    if (att)
+    { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+       if (!*att)
+         return soap->error = SOAP_EOM;
+       (*att)->next = NULL;
+       (*att)->nstr = NULL;
+       (*att)->name = soap_strdup(soap, soap->tmpbuf);
+       (*att)->data = NULL;
+       (*att)->wide = NULL;
+       (*att)->soap = soap;
+    }
+#endif
+    if (!strncmp(soap->tmpbuf, "xmlns", 5))
+    { if (soap->tmpbuf[5] == ':')
+      { soap->tmpbuf[5] = '\0';
+        t = soap->tmpbuf + 6;
+      }
+      else if (soap->tmpbuf[5])
+        t = NULL;
+      else
+        t = SOAP_STR_EOS;
+    }
+    else
+      t = NULL;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (!SOAP_STRCMP(tp->name, soap->tmpbuf))
+        break;
+    }
+    if (!tp)
+    { tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(soap->tmpbuf));
+      if (!tp)
+        return soap->error = SOAP_EOM;
+      strcpy(tp->name, soap->tmpbuf);
+      tp->value = NULL;
+      tp->size = 0;
+      tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    while (soap_blank(c))
+      c = soap_get1(soap);
+    if (c == '=')
+    { do c = soap_getutf8(soap);
+      while (soap_blank(c));
+      if (c != SOAP_QT && c != SOAP_AP)
+      { soap_unget(soap, c);
+        c = ' '; /* blank delimiter */
+      }
+      if (soap_getattrval(soap, tp->value, tp->size, c))
+      {
+#ifdef WITH_FAST
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+	if (soap_store_lab(soap, tp->value, tp->size))
+	  return soap->error;
+	if (tp->value)
+	  SOAP_FREE(soap, tp->value);
+	for (;;)
+	{ if (soap_getattrval(soap, soap->labbuf + soap->labidx, soap->lablen - soap->labidx, c))
+	  { if (soap->error != SOAP_EOM)
+	      return soap->error;
+            soap->error = SOAP_OK;
+	    soap->labidx = soap->lablen;
+	    if (soap_append_lab(soap, NULL, 0))
+	      return soap->error;
+	  }
+	  else
+	    break;
+	}
+	if (soap->labidx)
+          tp->size = soap->lablen;
+	else
+	{ tp->size = strlen(soap->labbuf) + 1;
+          if (tp->size < SOAP_LABLEN)
+	    tp->size = SOAP_LABLEN;
+        }
+	if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+	  return soap->error = SOAP_EOM;
+        strcpy(tp->value, soap->labbuf);
+#else
+	size_t n;
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+        if (soap_new_block(soap))
+          return soap->error;
+        for (;;)
+        { if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+            return soap->error;
+          if (soap_getattrval(soap, s, SOAP_BLKLEN, c))
+          { if (soap->error != SOAP_EOM)
+              return soap->error;
+            soap->error = SOAP_OK;
+          }
+          else
+            break;
+        }
+	n = tp->size + soap->blist->size;
+        if (!(s = (char*)SOAP_MALLOC(soap, n)))
+          return soap->error = SOAP_EOM;
+        if (tp->value)
+        { memcpy(s, tp->value, tp->size);
+          SOAP_FREE(soap, tp->value);
+        }
+        soap_save_block(soap, s + tp->size, 0);
+        tp->value = s;
+        tp->size = n;
+#endif
+      }
+      do c = soap_get1(soap);
+      while (soap_blank(c));
+      tp->visible = 2; /* seen this attribute w/ value */
+#ifdef WITH_DOM
+      if (att)
+        (*att)->data = soap_strdup(soap, tp->value);
+#endif
+    }
+    else
+      tp->visible = 1; /* seen this attribute w/o value */
+#ifdef WITH_DOM
+    if (att)
+      att = &(*att)->next;
+#endif
+    if (t && tp->value)
+    { if (soap_push_namespace(soap, t, tp->value))
+        return soap->error;
+      tp->visible = 0;
+    }
+  }
+#ifdef WITH_DOM
+  if (att)
+  { soap->dom->nstr = soap_current_namespace(soap, soap->tag);
+    for (att = &soap->dom->atts; *att; att = &(*att)->next)
+      (*att)->nstr = soap_current_namespace(soap, (*att)->name);
+  }
+#endif
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  if (!(soap->body = (c != '/')))
+    do c = soap_get1(soap);
+    while (soap_blank(c));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { if (!soap->body && soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible && tp->value)
+    { if (!strcmp(tp->name, "id"))
+      { *soap->id = '#';
+        strncpy(soap->id + 1, tp->value, sizeof(soap->id) - 2);
+        soap->id[sizeof(soap->id)-1] = '\0';
+      }
+      else if (!strcmp(tp->name, "href"))
+      { strncpy(soap->href, tp->value, sizeof(soap->href) - 1);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if ((soap->version == 2 || (soap->mode & SOAP_XML_GRAPH)) && !strcmp(tp->name, "ref"))
+      { *soap->href = '#';
+        strncpy(soap->href + 1, tp->value, sizeof(soap->href) - 2);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if (!soap_match_tag(soap, tp->name, "xsi:type"))
+      { strncpy(soap->type, tp->value, sizeof(soap->type) - 1);
+        soap->type[sizeof(soap->type)-1] = '\0';
+      }
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arrayType"))
+      { s = soap_strrchr(tp->value, '[');
+        if (s && (size_t)(s - tp->value) < sizeof(soap->arrayType))
+        { strncpy(soap->arrayType, tp->value, s - tp->value);
+          soap->arrayType[s - tp->value] = '\0';
+          strncpy(soap->arraySize, s, sizeof(soap->arraySize) - 1);
+        }
+        else
+          strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+        soap->arraySize[sizeof(soap->arrayType)-1] = '\0';
+        soap->arrayType[sizeof(soap->arrayType)-1] = '\0';
+      }
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:itemType"))
+        strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arraySize"))
+        strncpy(soap->arraySize, tp->value, sizeof(soap->arraySize) - 1);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:offset"))
+        strncpy(soap->arrayOffset, tp->value, sizeof(soap->arrayOffset));
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:position"))
+        soap->position = soap_getposition(tp->value, soap->positions);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:root"))
+        soap->root = ((!strcmp(tp->value, "1") || !strcmp(tp->value, "true")));
+      else if ((soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENV:actor"))
+            || (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENV:role")))
+      { if ((!soap->actor || strcmp(soap->actor, tp->value))
+         && strcmp(tp->value, "http://schemas.xmlsoap.org/soap/actor/next")
+         && strcmp(tp->value, "http://www.w3.org/2003/05/soap-envelope/role/next"))
+          soap->other = 1;
+      }
+      else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:mustUnderstand")
+            && (!strcmp(tp->value, "1") || !strcmp(tp->value, "true")))
+        soap->mustUnderstand = 1;
+      else if ((!soap_match_tag(soap, tp->name, "xsi:null")
+             || !soap_match_tag(soap, tp->name, "xsi:nil"))
+            && (!strcmp(tp->value, "1")
+             || !strcmp(tp->value, "true")))
+        soap->null = 1;
+    }
+  }
+  return soap->error = SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_retry(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_revert(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_revert(struct soap *soap)
+{ if (!soap->peeked)
+  { soap->peeked = 1;
+    if (soap->body)
+      soap->level--;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reverting last element (level=%u)\n", soap->level));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_string_out(struct soap *soap, const char *s, int flag)
+{ register const char *t;
+  register soap_wchar c;
+  register soap_wchar mask = 0xFFFFFF80UL;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_strdup(soap, s);
+    return SOAP_OK;
+  }
+#endif
+  if (soap->mode & SOAP_C_UTFSTRING)
+    mask = 0;
+  t = s;
+  while ((c = *t++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#x9;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xA;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 13:
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xD;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '&':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&amp;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '<':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&lt;", 4))
+        return soap->error;
+      s = t;
+      break;
+    case '>':
+      if (!flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&gt;", 4))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case '"':
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&quot;", 6))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    default:
+#ifndef WITH_LEANER
+#ifdef HAVE_MBTOWC
+      if (soap->mode & SOAP_C_MBSTRING)
+      { wchar_t wc;
+        register int m = mbtowc(&wc, t - 1, MB_CUR_MAX);
+        if (m > 0 && wc != c)
+        { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, wc))
+            return soap->error;
+	  s = t += m - 1;
+	  continue;
+        }
+      }
+#endif
+#endif
+      if (c & mask)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, (unsigned char)c))
+          return soap->error;
+        s = t;
+      }
+    }
+  }
+  return soap_send_raw(soap, s, t - s - 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_string_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ register char *s;
+  char *t = NULL;
+  register size_t i;
+  register long l = 0;
+  register int n = 0;
+  register int m = 0;
+  register soap_wchar c;
+#if !defined(WITH_LEANER) && defined(HAVE_WCTOMB)
+  char buf[MB_LEN_MAX > 8 ? MB_LEN_MAX : 8];
+#else
+  char buf[8];
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+#ifndef WITH_LEAN
+      t = soap->tmpbuf;
+      t[0] = '<';
+      strncpy(t + 1, soap->tag, sizeof(soap->tmpbuf) - 1);
+      strncat(t, ">", sizeof(soap->tmpbuf));
+      m = strlen(soap->tag) + 2;
+#endif
+    }
+  }
+#ifdef WITH_CDATA
+  if (!flag)
+  { register int state = 0;
+#ifdef WITH_FAST
+    soap->labidx = 0;			/* use look-aside buffer */
+#else
+    if (soap_new_block(soap))
+      return NULL;
+#endif
+    for (;;)
+    { 
+#ifdef WITH_FAST
+      register size_t k;
+      if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+        return NULL;
+      s = soap->labbuf + soap->labidx;	/* space to populate */
+      k = soap->lablen - soap->labidx;	/* number of bytes available */
+      soap->labidx = soap->lablen;	/* claim this space */
+#else
+      register size_t k = SOAP_BLKLEN;
+      if (!(s = (char*)soap_push_block(soap, k)))
+        return NULL;
+#endif
+      for (i = 0; i < k; i++)
+      { if (m > 0)
+        { *s++ = *t++;	/* copy multibyte characters */
+	  m--;
+          continue;
+        }
+        c = soap_getchar(soap);
+	if ((int)c == EOF)
+          goto end;
+        if (c >= 0x80 && !(soap->mode & SOAP_ENC_LATIN))
+        { soap_unget(soap, c);
+	  c = soap_getutf8(soap);
+	  if (soap->mode & SOAP_C_UTFSTRING)
+          { if ((c & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+            { c &= 0x7FFFFFFF;
+              t = buf;
+              if (c < 0x0800)
+                *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+              else
+              { if (c < 0x010000)
+                  *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+                else
+                { if (c < 0x200000)
+                    *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+                  else
+                  { if (c < 0x04000000)
+                      *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                    else
+                    { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                      *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                    }
+                    *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+                  }     
+                  *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+              }
+              *t++ = (char)(0x80 | (c & 0x3F));
+	      m = (int)(t - buf) - 1;
+              t = buf;
+              *s++ = *t++;
+              continue;
+	    }
+          }
+        }
+	switch (state)
+        { case 1:
+            if (c == ']')
+	      state = 4;
+	    *s++ = c;
+	    continue;
+	  case 2:
+	    if (c == '-')
+              state = 6;
+	    *s++ = c;
+	    continue;
+	  case 3:
+	    if (c == '?')
+	      state = 8;
+	    *s++ = c;
+	    continue;
+          /* CDATA */
+	  case 4:
+	    if (c == ']')
+              state = 5;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+	  case 5:
+	    if (c == '>')
+	      state = 0;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+          /* comment */
+          case 6:
+            if (c == '-')
+	      state = 7;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          case 7:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          /* PI */
+	  case 8:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 3;
+	    *s++ = c;
+	    continue;
+        }
+        switch (c)
+        {
+        case '/':
+          if (n > 0)
+          { c = soap_getchar(soap);
+            if (c == '>')
+              n--;
+            soap_unget(soap, c);
+          }
+          *s++ = '/';
+          break;
+        case '<':
+	  c = soap_getchar(soap);
+	  if (c == '/')
+	  { if (n == 0)
+	    { c = SOAP_TT;
+	      goto end;
+	    }
+	    n--;
+	  }
+	  else if (c == '!')
+	  { c = soap_getchar(soap);
+	    if (c == '[')
+            { do c = soap_getchar(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                 goto end;
+	      t = (char*)"![CDATA[";
+	      m = 8;
+	      state = 1;
+	    }
+            else if (c == '-')
+	    { if ((c = soap_getchar(soap)) == '-')
+	        state = 2;
+	      t = (char*)"!-";
+	      m = 2;
+	      soap_unget(soap, c);
+	    }
+	    else
+	    { t = (char*)"!";
+	      m = 1;
+	      soap_unget(soap, c);
+	    }
+	    *s++ = '<';
+	    break;
+	  }
+	  else if (c == '?')
+	    state = 3;
+	  else
+	    n++;
+          soap_unget(soap, c);
+          *s++ = '<';
+          break;
+        case '>':
+          *s++ = '>';
+          break;
+        case '"':
+          *s++ = '"';
+          break;
+        default:
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+          if (soap->mode & SOAP_C_MBSTRING)
+          { m = wctomb(buf, c & 0x7FFFFFFF);
+            if (m >= 1 && m <= (int)MB_CUR_MAX)
+            { t = buf;
+              *s++ = *t++;
+              m--;
+            }
+            else
+            { *s++ = SOAP_UNKNOWN_CHAR;
+	      m = 0;
+	    }
+          }
+          else
+#endif
+#endif
+            *s++ = (char)(c & 0xFF);
+        }
+	l++;
+        if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+        { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+          soap->error = SOAP_LENGTH;
+          return NULL;
+        }
+      }
+    }
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;			/* use look-aside buffer */
+#else
+  if (soap_new_block(soap))
+    return NULL;
+#endif
+  for (;;)
+  { 
+#ifdef WITH_FAST
+    register size_t k;
+    if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+      return NULL;
+    s = soap->labbuf + soap->labidx;	/* space to populate */
+    k = soap->lablen - soap->labidx;	/* number of bytes available */
+    soap->labidx = soap->lablen;	/* claim this space */
+#else
+    register size_t k = SOAP_BLKLEN;
+    if (!(s = (char*)soap_push_block(soap, k)))
+      return NULL;
+#endif
+    for (i = 0; i < k; i++)
+    { if (m > 0)
+      { *s++ = *t++;	/* copy multibyte characters */
+        m--;
+        continue;
+      }
+      if (soap->mode & SOAP_C_UTFSTRING)
+      { if (((c = soap_get(soap)) & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+        { c &= 0x7FFFFFFF;
+          t = buf;
+          if (c < 0x0800)
+            *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+          else
+          { if (c < 0x010000)
+              *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+            else
+            { if (c < 0x200000)
+                *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+              else
+              { if (c < 0x04000000)
+                  *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                else
+                { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                  *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+              }     
+              *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+            }
+            *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+          }
+          *t++ = (char)(0x80 | (c & 0x3F));
+	  m = (int)(t - buf) - 1;
+          t = buf;
+          *s++ = *t++;
+          continue;
+        }
+      }
+      else
+        c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        t = (char*)"/";
+	m = 1;
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_get(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<' | 0x80000000:
+        if (flag)
+          *s++ = '<';
+        else
+        { *s++ = '&';
+          t = (char*)"lt;";
+	  m = 3;
+        }
+        break;
+      case '>' | 0x80000000:
+        if (flag)
+          *s++ = '>';
+        else
+        { *s++ = '&';
+          t = (char*)"gt;";
+	  m = 3;
+        }
+        break;
+      case '&' | 0x80000000:
+        if (flag)
+          *s++ = '&';
+        else
+        { *s++ = '&';
+          t = (char*)"amp;";
+	  m = 4;
+        }
+        break;
+      case '"' | 0x80000000:
+        if (flag)
+          *s++ = '"';
+        else
+        { *s++ = '&';
+          t = (char*)"quot;";
+	  m = 5;
+        }
+        break;
+      case '\'' | 0x80000000:
+        if (flag)
+          *s++ = '\'';
+        else
+        { *s++ = '&';
+          t = (char*)"apos;";
+	  m = 5;
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+        if (soap->mode & SOAP_C_MBSTRING)
+        { m = wctomb(buf, c & 0x7FFFFFFF);
+          if (m >= 1 && m <= (int)MB_CUR_MAX)
+          { t = buf;
+            *s++ = *t++;
+            m--;
+          }
+          else
+          { *s++ = SOAP_UNKNOWN_CHAR;
+	    m = 0;
+	  }
+        }
+        else
+#endif
+#endif
+          *s++ = (char)(c & 0xFF);
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+#ifdef WITH_FAST
+  t = soap_strdup(soap, soap->labbuf);
+#else
+  soap_size_block(soap, i+1);
+  t = soap_save_block(soap, NULL, 0);
+#endif
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (flag == 3)
+      soap->dom->tail = t;
+    else
+      soap->dom->data = t;
+  }
+#endif
+  if (flag == 2)
+    if (soap_s2QName(soap, t, &t))
+      return NULL;
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_wstring_out(struct soap *soap, const wchar_t *s, int flag)
+{ const char *t;
+  char tmp;
+  register soap_wchar c;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { wchar_t *r = (wchar_t*)s;
+    int n = 1;
+    while (*r++)
+      n++;
+    soap->dom->wide = r = (wchar_t*)soap_malloc(soap, n * sizeof(wchar_t));
+    while (n--)
+      *r++ = *s++;
+    return SOAP_OK;
+  }
+#endif
+  while ((c = *s++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+        t = "&#x9;";
+      else
+        t = "\t";
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+        t = "&#xA;";
+      else
+        t = "\n";
+      break;
+    case 13:
+      t = "&#xD;";
+      break;
+    case '&':
+      t = "&amp;";
+      break;
+    case '<':
+      t = "&lt;";
+      break;
+    case '>':
+      if (flag)
+        t = ">";
+      else
+	t = "&gt;";
+      break;
+    case '"':
+      if (flag)
+        t = "&quot;";
+      else
+        t = "\"";
+      break;
+    default:
+      if (c > 0 && c < 0x80)
+      { tmp = (char)c;
+        if (soap_send_raw(soap, &tmp, 1))
+          return soap->error;
+      }
+      else if (soap_pututf8(soap, (unsigned long)c))
+        return soap->error;
+      continue;
+    }
+    if (soap_send(soap, t))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t *
+SOAP_FMAC2
+soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ wchar_t *s;
+  register int i, n = 0;
+  register long l = 0;
+  register soap_wchar c;
+  const char *t = NULL;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading wide string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+    }
+  }
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { if (!(s = (wchar_t*)soap_push_block(soap, sizeof(wchar_t)*SOAP_BLKLEN)))
+      return NULL;
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { if (t)
+      { *s++ = (wchar_t)*t++;
+        if (!*t)
+          t = NULL;
+        continue;
+      }
+      c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        soap_unget(soap, '/');
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_getutf8(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<':
+        if (flag)
+          *s++ = (soap_wchar)'<';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "lt;";
+        }
+        break;
+      case '>':
+        if (flag)
+          *s++ = (soap_wchar)'>';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "gt;";
+        }
+        break;
+      case '"':
+        if (flag)
+          *s++ = (soap_wchar)'"';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "quot;";
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+        *s++ = (wchar_t)c & 0x7FFFFFFF;
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+  soap_size_block(soap, sizeof(wchar_t) * (i + 1));
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+  s = (wchar_t*)soap_save_block(soap, NULL, 0);
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->wide = s;
+#endif
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_int2s(struct soap *soap, int n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outint(struct soap *soap, const char *tag, int id, const int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2int(struct soap *soap, const char *s, int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (int)soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int *
+SOAP_FMAC2
+soap_inint(struct soap *soap, const char *tag, int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (int*)soap_id_enter(soap, soap->id, p, t, sizeof(int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(int), 0, NULL);
+  else if (p)
+  { if (soap_s2int(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_long2s(struct soap *soap, long n)
+{ sprintf(soap->tmpbuf, "%ld", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outlong(struct soap *soap, const char *tag, int id, const long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2long(struct soap *soap, const char *s, long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+long *
+SOAP_FMAC2
+soap_inlong(struct soap *soap, const char *tag, long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (long*)soap_id_enter(soap, soap->id, p, t, sizeof(long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(long), 0, NULL);
+  else if (p)
+  { if (soap_s2long(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_LONG642s(struct soap *soap, LONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_LONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outLONG64(struct soap *soap, const char *tag, int id, const LONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_LONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2LONG64(struct soap *soap, const char *s, LONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOLL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoll(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_LONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+LONG64 *
+SOAP_FMAC2
+soap_inLONG64(struct soap *soap, const char *tag, LONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (LONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(LONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (LONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(LONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2LONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_byte2s(struct soap *soap, char n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outbyte(struct soap *soap, const char *tag, int id, const char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2byte(struct soap *soap, const char *s, char *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -128 || n > 127)
+      soap->error = SOAP_TYPE;
+    *p = (char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_inbyte(struct soap *soap, const char *tag, char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (char*)soap_id_enter(soap, soap->id, p, t, sizeof(char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(char), 0, NULL);
+  else if (p)
+  { if (soap_s2byte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_short2s(struct soap *soap, short n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outshort(struct soap *soap, const char *tag, int id, const short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2short(struct soap *soap, const char *s, short *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -32768 || n > 32767)
+      soap->error = SOAP_TYPE;
+    *p = (short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+short *
+SOAP_FMAC2
+soap_inshort(struct soap *soap, const char *tag, short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (short*)soap_id_enter(soap, soap->id, p, t, sizeof(short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(short), 0, NULL);
+  else if (p)
+  { if (soap_s2short(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_float2s(struct soap *soap, float n)
+{ const char *s;
+  if (soap_isnan((double)n))
+    s = "NaN";
+  else if (soap_ispinff(n))
+    s = "INF";
+  else if (soap_isninff(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->float_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outfloat(struct soap *soap, const char *tag, int id, const float *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_float2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2float(struct soap *soap, const char *s, float *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = FLT_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = FLT_NAN;
+    else
+    {
+/* On some systems, strtof appears to be broken or doesn't link: use with caution */
+#if defined(HAVE_STRTOF)
+      char *r;
+      *p = strtof((char*)s, &r);
+      if (*r)
+#elif defined(HAVE_STRTOD)
+      char *r;
+      *p = (float)strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%g", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static int soap_isnumeric(struct soap *soap, const char *type)
+{ if (soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":float")
+   && soap_match_tag(soap, soap->type, ":double")
+   && soap_match_tag(soap, soap->type, ":decimal")
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return SOAP_ERR;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+float *
+SOAP_FMAC2
+soap_infloat(struct soap *soap, const char *tag, float *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (float*)soap_id_enter(soap, soap->id, p, t, sizeof(float), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (float*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(float), 0, NULL);
+  else if (p)
+  { if (soap_s2float(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_double2s(struct soap *soap, double n)
+{ const char *s;
+  if (soap_isnan(n))
+    s = "NaN";
+  else if (soap_ispinfd(n))
+    s = "INF";
+  else if (soap_isninfd(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->double_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdouble(struct soap *soap, const char *tag, int id, const double *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_double2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2double(struct soap *soap, const char *s, double *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = DBL_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = DBL_NAN;
+    else
+    {
+#ifdef HAVE_STRTOD
+      char *r;
+      *p = strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%lg", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+double *
+SOAP_FMAC2
+soap_indouble(struct soap *soap, const char *tag, double *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (double*)soap_id_enter(soap, soap->id, p, t, sizeof(double), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (double*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(double), 0, NULL);
+  else if (p)
+  { if (soap_s2double(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedByte2s(struct soap *soap, unsigned char n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedByte(struct soap *soap, const char *tag, int id, const unsigned char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedByte(struct soap *soap, const char *s, unsigned char *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 255)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned char *
+SOAP_FMAC2
+soap_inunsignedByte(struct soap *soap, const char *tag, unsigned char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned char*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned char), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedByte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedShort2s(struct soap *soap, unsigned short n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedShort(struct soap *soap, const char *tag, int id, const unsigned short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedShort(struct soap *soap, const char *s, unsigned short *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 65535)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned short *
+SOAP_FMAC2
+soap_inunsignedShort(struct soap *soap, const char *tag, unsigned short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned short*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned short), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedShort(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedInt2s(struct soap *soap, unsigned int n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedInt(struct soap *soap, const char *tag, int id, const unsigned int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedInt(struct soap *soap, const char *s, unsigned int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (unsigned int)soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned int *
+SOAP_FMAC2
+soap_inunsignedInt(struct soap *soap, const char *tag, unsigned int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned int*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned int), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedInt(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedLong2s(struct soap *soap, unsigned long n)
+{ sprintf(soap->tmpbuf, "%lu", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedLong(struct soap *soap, const char *tag, int id, const unsigned long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedLong(struct soap *soap, const char *s, unsigned long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned long *
+SOAP_FMAC2
+soap_inunsignedLong(struct soap *soap, const char *tag, unsigned long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned long*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned long), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedLong(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_ULONG642s(struct soap *soap, ULONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_ULONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outULONG64(struct soap *soap, const char *tag, int id, const ULONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_ULONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2ULONG64(struct soap *soap, const char *s, ULONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOULL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoull(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_ULONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+ULONG64 *
+SOAP_FMAC2
+soap_inULONG64(struct soap *soap, const char *tag, ULONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (ULONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(ULONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (ULONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(ULONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2ULONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2string(struct soap *soap, const char *s, char **t)
+{ *t = NULL;
+  if (s)
+  { if (!(*t = soap_strdup(soap, s)))
+      return soap->error = SOAP_EOM;
+    if (!(soap->mode & (SOAP_ENC_LATIN | SOAP_C_UTFSTRING)))
+    { /* TODO: consider truncating UTF8 to ASCII for regular XML attribute strings? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2QName(struct soap *soap, const char *s, char **t)
+{ if (s)
+  { struct soap_nlist *np;
+    const char *p;
+    if (!strncmp(s, "xml:", 4))
+    { *t = soap_strdup(soap, s);
+      return SOAP_OK;
+    }
+    np = soap->nlist;
+    p = strchr(s, ':');
+    if (p)
+    { register int n = p - s;
+      while (np && (strncmp(np->id, s, n) || np->id[n]))
+        np = np->next;
+      p++;
+    }
+    else
+    { while (np && *np->id)
+        np = np->next;
+      p = s;
+    }
+    if (np)
+    { if (np->index >= 0 && soap->local_namespaces)
+      { register const char *q = soap->local_namespaces[np->index].id;
+        if (q)
+        { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(q) + 2)))
+            sprintf(*t, "%s:%s", q, p);
+          return SOAP_OK;
+        }
+      }
+      if (np->ns)
+      { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(np->ns) + 4)))
+          sprintf(*t, "\"%s\":%s", np->ns, p);
+        return SOAP_OK;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined (index=%d, URI=%s)\n", s, np->index, np->ns?np->ns:""));
+      return soap->error = SOAP_NAMESPACE; 
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined, assuming empty namespace\n", s));
+    if ((*t = (char*)soap_malloc(soap, strlen(p) + 4)))
+      sprintf(*t, "\"\":%s", p);
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_QName2s(struct soap *soap, const char *s)
+{ struct Namespace *p;
+  char *t;
+  int n;
+  if (!s || *s != '"')
+  {
+#ifndef WITH_LEAN
+    if (s && (soap->mode & SOAP_XML_CANONICAL))
+    { t = (char*)strchr(s, ':');
+      if (t)
+        soap_utilize_ns(soap, s, t - s);
+    }
+#endif
+    return s;
+  }
+  s++;
+  if ((p = soap->local_namespaces))
+  { for (; p->id; p++)
+    { if (p->ns)
+        if (!soap_tag_cmp(s, p->ns))
+          break;
+      if (p->in)
+        if (!soap_tag_cmp(s, p->in))
+          break;
+    }
+    if (p && p->id)
+    { s = strchr(s, '"');
+      if (s)
+      { t = (char*)soap_malloc(soap, strlen(p->id) + strlen(s));
+        strcpy(t, p->id);
+	strcat(t, s + 1);
+        return t;
+      }
+    }
+  }
+  t = (char*)strchr(s, '"');
+  if (t)
+    n = t - s;
+  else
+    n = 0;
+  t = soap_strdup(soap, s);
+  t[n] = '\0';
+  sprintf(soap->tmpbuf, "xmlns:_%d", soap->idnum++);
+  soap_set_attr(soap, soap->tmpbuf, t);
+  s = strchr(s, '"');
+  if (s)
+  { t = (char*)soap_malloc(soap, strlen(soap->tmpbuf) + strlen(s) - 6);
+    strcpy(t, soap->tmpbuf + 6);
+    strcat(t, s + 1);
+  }
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2wchar(struct soap *soap, const char *s, wchar_t **t)
+{ wchar_t *r;
+  if (!s)
+    *t = NULL;
+  else
+  { *t = r = (wchar_t*)soap_malloc(soap, sizeof(wchar_t) * (strlen(s) + 1));
+    if (!r)
+      return soap->error;
+    if (soap->mode & SOAP_ENC_LATIN)
+    { while (*s)
+        *r++ = (wchar_t)*s++;
+    }
+    else
+    { /* Convert UTF8 to wchar */
+      while (*s)
+      { register soap_wchar c, c1, c2, c3, c4;
+        c = *s++;
+        if (c < 0x80)
+	  *r++ = (wchar_t)c;
+	else
+        { c1 = (soap_wchar)*s++ & 0x3F;
+          if (c < 0xE0)
+            *r++ = (wchar_t)(((soap_wchar)(c & 0x1F) << 6) | c1);
+          else
+	  { c2 = (soap_wchar)*s++ & 0x3F;
+            if (c < 0xF0)
+              *r++ = (wchar_t)(((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2);
+            else
+	    { c3 = (soap_wchar)*s++ & 0x3F;
+              if (c < 0xF8)
+                *r++ = (wchar_t)(((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3);
+              else
+	      { c4 = (soap_wchar)*s++ & 0x3F;
+                if (c < 0xFC)
+                  *r++ = (wchar_t)(((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4);
+                else
+		  *r++ = (wchar_t)(((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(*s++ & 0x3F));
+              }
+            }
+          }
+        }
+      }
+    }
+    *r = L'\0';
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_wchar2s(struct soap *soap, const wchar_t *s)
+{ register soap_wchar c;
+  register char *r, *t;
+  const wchar_t *q = s;
+  size_t n = 0;
+  while ((c = *q++))
+  { if (c > 0 && c < 0x80)
+      n++;
+    else
+      n += 6;
+  }
+  r = t = (char*)soap_malloc(soap, n + 1);
+  if (r)
+  { /* Convert wchar to UTF8 */
+    while ((c = *s++))
+    { if (c > 0 && c < 0x80)
+        *t++ = (char)c;
+      else
+      { if (c < 0x0800)
+          *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+        else
+        { if (c < 0x010000)
+            *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+          else
+          { if (c < 0x200000)
+              *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+            else
+            { if (c < 0x04000000)
+                *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+              else
+              { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+              }
+              *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+            }     
+            *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+        }
+        *t++ = (char)(0x80 | (c & 0x3F));
+      }
+    }
+    *t = '\0';
+  }
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outstring(struct soap *soap, const char *tag, int id, char *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_string_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_instring(struct soap *soap, const char *tag, char **p, const char *type, int t, int flag, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_string_in(soap, flag, minlen, maxlen);
+    if (!*p || !(char*)soap_id_enter(soap, soap->id, *p, t, sizeof(char*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (char**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(char**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwstring(struct soap *soap, const char *tag, int id, wchar_t *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_wstring_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type, int t, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_wstring_in(soap, 1, minlen, maxlen);
+    if (!*p || !(wchar_t*)soap_id_enter(soap, soap->id, *p, t, sizeof(wchar_t*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (wchar_t**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(wchar_t**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static time_t
+soap_timegm(struct tm *T)
+{
+#if defined(HAVE_TIMEGM)
+  return timegm(T);
+#else
+  time_t t, g, z;
+#ifdef HAVE_GMTIME_R
+  struct tm tm, *tmp = &tm;
+#else
+  struct tm *tmp;
+#endif
+  t = mktime(T);
+  if (t == -1)
+    return -1;
+#ifdef HAVE_GMTIME_R
+  gmtime_r(&t, tmp);
+#else
+  tmp = gmtime(&t);
+#endif
+  tmp->tm_isdst = 0;
+  g = mktime(tmp);
+  if (g == -1)
+    return -1;
+  z = g - t;
+  return t - z;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_dateTime2s(struct soap *soap, time_t n)
+{ struct tm T, *pT = &T;
+#if defined(HAVE_GMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PGMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_PGMTIME)
+  if (gmtime(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GMTIME)
+  if ((pT = gmtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GETTIMEOFDAY)
+  struct timezone tz;
+  memset((void*)&tz, 0, sizeof(tz));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+#endif
+#elif defined(HAVE_FTIME)
+  struct timeb t;
+  memset((void*)&t, 0, sizeof(t));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+  /* The following defines were added for VxWorks*/
+# elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf+strlen(soap->tmpbuf), "%+03d:%02d", t.timezone/60, abs(t.timezone)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+# endif
+#elif defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#else
+  if ((pT = localtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#endif
+  else
+    strcpy(soap->tmpbuf, "1969-12-31T23:59:59Z");
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdateTime(struct soap *soap, const char *tag, int id, const time_t *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_dateTime2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2dateTime(struct soap *soap, const char *s, time_t *p)
+{ if (s)
+  { struct tm T;
+    char zone[16];
+    const char *t;
+    memset((void*)&T, 0, sizeof(T));
+    zone[sizeof(zone)-1] = '\0';
+    if (strchr(s, '-'))
+      t = "%d-%d-%dT%d:%d:%d%15s";
+    else if (strchr(s, ':'))
+      t = "%4d%2d%2dT%d:%d:%d%15s";
+    else /* parse non-XSD-standard alternative ISO 8601 format */
+      t = "%4d%2d%2dT%2d%2d%2d%15s";
+    sscanf(s, t, &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, zone);
+    if (T.tm_year == 1)
+      T.tm_year = 70;
+    else
+      T.tm_year -= 1900;
+    T.tm_mon--;
+    if (*zone)
+    { if (*zone == '.')
+      { for (s = zone + 1; *s; s++)
+          if (*s < '0' || *s > '9')
+            break;
+      }
+      else
+        s = zone;
+      if (*s == '+' || *s == '-')
+      { int h = 0, m = 0;
+        if (s[3] == ':')
+	{ sscanf(s, "%d:%d", &h, &m);
+	  if (h < 0)
+	    m = -m;
+	}
+	else
+	{ m = (int)atol(s);
+	  h = m / 100;
+	  m = m % 100;
+	}
+        T.tm_hour -= h;
+        T.tm_min -= m;
+      }
+      T.tm_isdst = 0;
+      *p = soap_timegm(&T);
+    }
+    else
+    { T.tm_isdst = -1;
+      *p = mktime(&T); /* no time zone: suppose it is localtime? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+time_t *
+SOAP_FMAC2
+soap_indateTime(struct soap *soap, const char *tag, time_t *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":dateTime"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (time_t*)soap_id_enter(soap, soap->id, p, t, sizeof(time_t), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (time_t*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(time_t), 0, NULL);
+  else if (p)
+  { if (soap_s2dateTime(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outliteral(struct soap *soap, const char *tag, char *const*p)
+{ int i;
+  const char *t = NULL;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p && *p)
+  { if (soap_send(soap, *p))
+      return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_inliteral(struct soap *soap, const char *tag, char **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_string_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwliteral(struct soap *soap, const char *tag, wchar_t *const*p)
+{ int i;
+  const char *t = NULL;
+  wchar_t c;
+  const wchar_t *s;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p)
+  { s = *p;
+    while ((c = *s++))
+      if (soap_pututf8(soap, (unsigned char)c))
+        return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwliteral(struct soap *soap, const char *tag, wchar_t **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_wstring_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_token(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF || soap_blank(c))
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_value(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  for (s--; i > 0; i--, s--)
+    if (!soap_blank(*s))
+      break;
+  s[1] = '\0';
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->data = soap_strdup(soap, soap->tmpbuf);
+#endif
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEANER) || !defined(WITH_NOHTTP)
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getline(struct soap *soap, char *s, int len)
+{ int i = len;
+  soap_wchar c = 0;
+  for (;;)
+  { while (--i > 0)
+    { c = soap_getchar(soap);
+      if (c == '\r' || c == '\n')
+        break;
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+    if (c != '\n')
+      c = soap_getchar(soap); /* got \r, now get \n */
+    if (c == '\n')
+    { *s = '\0';
+      if (i+1 == len) /* empty line: end of HTTP/MIME header */
+        break;
+      c = soap_unget(soap, soap_getchar(soap));
+      if (c != ' ' && c != '\t') /* HTTP line continuation? */
+        break;
+    }
+    else if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static size_t
+soap_count_attachments(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  register struct soap_multipart *content;
+  register size_t count = soap->count;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the message size with attachments, current count=%lu\n", (unsigned long)count));
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of DIME attachments\n"));
+    for (content = soap->dime.first; content; content = content->next)
+    { count += 12 + ((content->size+3)&(~3));
+      if (content->id)
+        count += ((strlen(content->id)+3)&(~3));
+      if (content->type)
+        count += ((strlen(content->type)+3)&(~3));
+      if (content->options)
+        count += ((((unsigned char)content->options[2] << 8) | ((unsigned char)content->options[3]))+7)&(~3);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of DIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary)
+  { register size_t n = strlen(soap->mime.boundary);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of MIME attachments\n"));
+    for (content = soap->mime.first; content; content = content->next)
+    { register const char *s;
+      /* count \r\n--boundary\r\n */
+      count += 6 + n;
+      /* count Content-Type: ...\r\n */
+      if (content->type)
+        count += 16 + strlen(content->type);
+      /* count Content-Transfer-Encoding: ...\r\n */
+      s = soap_str_code(mime_codes, content->encoding);
+      if (s)
+        count += 29 + strlen(s);
+      /* count Content-ID: ...\r\n */
+      if (content->id)
+        count += 14 + strlen(content->id);
+      /* count Content-Location: ...\r\n */
+      if (content->location)
+        count += 20 + strlen(content->location);
+      /* count Content-Description: ...\r\n */
+      if (content->description)
+        count += 23 + strlen(content->location);
+      /* count \r\n...content */
+      count += 2 + content->size;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of MIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+    /* count \r\n--boundary-- */
+    count += 6 + n;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New count is %lu bytes\n", (unsigned long)count));
+  return count;
+#else
+  return soap->count;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_putdimefield(struct soap *soap, const char *s, size_t n)
+{ if (soap_send_raw(soap, s, n))
+    return soap->error;
+  return soap_send_raw(soap, SOAP_STR_PADDING, -(long)n&3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_dime_option(struct soap *soap, unsigned short optype, const char *option)
+{ size_t n;
+  char *s = NULL;
+  if (option)
+  { n = strlen(option);
+    s = (char*)soap_malloc(soap, n + 5);
+    if (s)
+    { s[0] = optype >> 8;
+      s[1] = optype & 0xFF;
+      s[2] = n >> 8;
+      s[3] = n & 0xFF;
+      strcpy(s + 4, option);
+    }
+  }
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdimehdr(struct soap *soap)
+{ unsigned char tmp[12];
+  size_t optlen = 0, idlen = 0, typelen = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Put DIME header id='%s'\n", soap->dime.id?soap->dime.id:""));
+  if (soap->dime.options)
+    optlen = (((unsigned char)soap->dime.options[2] << 8) | ((unsigned char)soap->dime.options[3])) + 4;
+  if (soap->dime.id)
+    idlen = strlen(soap->dime.id);
+  if (soap->dime.type)
+    typelen = strlen(soap->dime.type);
+  tmp[0] = SOAP_DIME_VERSION | (soap->dime.flags & 0x7);
+  tmp[1] = soap->dime.flags & 0xF0;
+  tmp[2] = optlen >> 8;
+  tmp[3] = optlen & 0xFF;
+  tmp[4] = idlen >> 8;
+  tmp[5] = idlen & 0xFF;
+  tmp[6] = typelen >> 8;
+  tmp[7] = typelen & 0xFF;
+  tmp[8] = soap->dime.size >> 24;
+  tmp[9] = (soap->dime.size >> 16) & 0xFF;
+  tmp[10] = (soap->dime.size >> 8) & 0xFF;
+  tmp[11] = soap->dime.size & 0xFF;
+  if (soap_send_raw(soap, (char*)tmp, 12)
+   || soap_putdimefield(soap, soap->dime.options, optlen)
+   || soap_putdimefield(soap, soap->dime.id, idlen)
+   || soap_putdimefield(soap, soap->dime.type, typelen))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return SOAP_OK;
+  for (content = soap->dime.first; content; content = content->next)
+  { void *handle;
+    soap->dime.size = content->size;
+    soap->dime.id = content->id;
+    soap->dime.type = content->type;
+    soap->dime.options = content->options;
+    soap->dime.flags = SOAP_DIME_VERSION | SOAP_DIME_MEDIA;
+    if (soap->fdimereadopen && ((handle = soap->fdimereadopen(soap, (void*)content->ptr, content->id, content->type, content->options)) || soap->error))
+    { size_t size = content->size;
+      if (!handle)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadopen failed\n"));
+        return soap->error;
+      }
+      if (!content->size && ((soap->mode & SOAP_ENC_XML) || (soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_IO) == SOAP_IO_STORE))
+      { size_t chunksize = sizeof(soap->tmpbuf);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked streaming DIME\n"));
+        do 
+        { size = soap->fdimeread(soap, handle, soap->tmpbuf, chunksize);
+          DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread returned %lu bytes\n", (unsigned long)size));
+          if (size < chunksize)
+ 	  { soap->dime.flags &= ~SOAP_DIME_CF;
+            if (!content->next)
+              soap->dime.flags |= SOAP_DIME_ME;
+	  }
+          else
+            soap->dime.flags |= SOAP_DIME_CF;
+	  soap->dime.size = size;
+          if (soap_putdimehdr(soap)
+	   || soap_putdimefield(soap, soap->tmpbuf, size))
+            break;
+          if (soap->dime.id)
+ 	  { soap->dime.flags &= ~(SOAP_DIME_MB | SOAP_DIME_MEDIA);
+            soap->dime.id = NULL;
+            soap->dime.type = NULL;
+            soap->dime.options = NULL;
+          }  
+        } while (size >= chunksize);
+      }
+      else
+      { if (!content->next)
+          soap->dime.flags |= SOAP_DIME_ME;
+        if (soap_putdimehdr(soap))
+          return soap->error;
+        do
+        { size_t bufsize;
+	  if (size < sizeof(soap->tmpbuf))
+            bufsize = size;
+          else
+            bufsize = sizeof(soap->tmpbuf);
+          if (!(bufsize = soap->fdimeread(soap, handle, soap->tmpbuf, bufsize)))
+          { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread failed: insufficient data (%lu bytes remaining from %lu bytes)\n", (unsigned long)size, (unsigned long)soap->dime.size));
+            soap->error = SOAP_EOF;
+	    break;
+          }
+          if (soap_send_raw(soap, soap->tmpbuf, bufsize))
+            break;
+          size -= bufsize;
+        } while (size);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+        soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+      if (soap->fdimereadclose)
+        soap->fdimereadclose(soap, handle);
+    }
+    else
+    { if (!content->next)
+        soap->dime.flags |= SOAP_DIME_ME;
+      if (soap_putdimehdr(soap)
+       || soap_putdimefield(soap, (char*)content->ptr, content->size))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static char *
+soap_getdimefield(struct soap *soap, size_t n)
+{ register soap_wchar c;
+  register int i;
+  register char *s;
+  char *p = NULL;
+  if (n)
+  { p = (char*)soap_malloc(soap, n + 1);
+    if (p)
+    { s = p;
+      for (i = n; i > 0; i--)
+      { if ((int)(c = soap_get1(soap)) == EOF)
+        { soap->error = SOAP_EOF;
+          return NULL;
+        }
+        *s++ = (char)c;
+      }
+      *s = '\0';
+      if ((soap->error = soap_move(soap, -(long)n&3)))
+        return NULL;
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdimehdr(struct soap *soap)
+{ register soap_wchar c;
+  register char *s;
+  register int i;
+  unsigned char tmp[12];
+  size_t optlen, idlen, typelen;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return soap->error = SOAP_DIME_END;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME header\n"));
+  if (soap->dime.buflen || soap->dime.chunksize)
+  { if (soap_move(soap, (long)(soap->dime.size - soap_tell(soap))))
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, soap_getchar(soap)); /* skip padding and get hdr */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... From chunked\n"));
+    return SOAP_OK;
+  }
+  s = (char*)tmp;
+  for (i = 12; i > 0; i--)
+  { if ((int)(c = soap_getchar(soap)) == EOF)
+      return soap->error = SOAP_EOF;
+    *s++ = (char)c;
+  }
+  if ((tmp[0] & 0xF8) != SOAP_DIME_VERSION)
+    return soap->error = SOAP_DIME_MISMATCH;
+  soap->dime.flags = (tmp[0] & 0x7) | (tmp[1] & 0xF0);
+  optlen = (tmp[2] << 8) | tmp[3];
+  idlen = (tmp[4] << 8) | tmp[5];
+  typelen = (tmp[6] << 8) | tmp[7];
+  soap->dime.size = (tmp[8] << 24) | (tmp[9] << 16) | (tmp[10] << 8) | tmp[11];
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME size=%lu flags=0x%X\n", (unsigned long)soap->dime.size, soap->dime.flags));
+  if (!(soap->dime.options = soap_getdimefield(soap, optlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.id = soap_getdimefield(soap, idlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.type = soap_getdimefield(soap, typelen)) && soap->error)
+    return soap->error;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME id=%s, type=%s, options=%s\n", soap->dime.id?soap->dime.id:"", soap->dime.type?soap->dime.type:"", soap->dime.options?soap->dime.options+4:""));
+  if (soap->dime.flags & SOAP_DIME_ME)
+    soap->mode &= ~SOAP_ENC_DIME;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdime(struct soap *soap)
+{ while (soap->dime.flags & SOAP_DIME_CF)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap_move(soap, soap->dime.size))
+      return soap->error = SOAP_EOF;
+  }
+  if (soap_move(soap, ((soap->dime.size+3)&(~3))-soap_tell(soap)))
+    return soap->error = SOAP_EOF;
+  for (;;)
+  { register struct soap_multipart *content;
+    if (soap_getdimehdr(soap))
+      break;
+    if (soap->fdimewriteopen && ((soap->dime.ptr = (char*)soap->fdimewriteopen(soap, soap->dime.id, soap->dime.type, soap->dime.options)) || soap->error))
+    { const char *id, *type, *options;
+      size_t size, n;
+      if (!soap->dime.ptr)
+        return soap->error;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      for (;;)
+      { size = soap->dime.size;
+        for (;;)
+        { n = soap->buflen - soap->bufidx;
+          if (size < n)
+            n = size;
+          if ((soap->error = soap->fdimewrite(soap, (void*)soap->dime.ptr, soap->buf + soap->bufidx, n)))
+            break;
+	  size -= n;
+	  if (!size)
+	  { soap->bufidx += n;
+	    break;
+	  }
+	  if (soap_recv(soap))
+          { soap->error = SOAP_EOF;
+	    goto end;
+          }
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+        { soap->error = SOAP_EOF;
+	  break;
+        }
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          break;
+      }
+end:
+      if (soap->fdimewriteclose)
+        soap->fdimewriteclose(soap, (void*)soap->dime.ptr);
+      soap->dime.size = 0;
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else if (soap->dime.flags & SOAP_DIME_CF)
+    { const char *id, *type, *options;
+      register soap_wchar c;
+      register char *s;
+      register int i;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      if (soap_new_block(soap))
+        return SOAP_EOM;
+      for (;;)
+      { s = (char*)soap_push_block(soap, soap->dime.size);
+        if (!s)
+          return soap->error = SOAP_EOM;
+        for (i = soap->dime.size; i > 0; i--)
+        { if ((int)(c = soap_get1(soap)) == EOF)
+            return soap->error = SOAP_EOF;
+          *s++ = (char)c;
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+          return soap->error = SOAP_EOF;
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          return soap->error;
+      }
+      soap->dime.size = soap->blist->size++; /* allocate one more for '\0' */
+      if (!(soap->dime.ptr = soap_save_block(soap, NULL, 0)))
+        return soap->error;
+      soap->dime.ptr[soap->dime.size] = '\0'; /* force 0-terminated */
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else
+      soap->dime.ptr = soap_getdimefield(soap, soap->dime.size);
+    content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, soap->dime.ptr, soap->dime.size);
+    if (!content)
+      return soap->error = SOAP_EOM;
+    content->id = soap->dime.id;
+    content->type = soap->dime.type;
+    content->options = soap->dime.options;
+    soap_resolve_attachment(soap, content);
+    if (soap->error)
+      return soap->error;
+  }
+  if (soap->error != SOAP_DIME_END)
+    return soap->error;
+  return soap->error = SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmimehdr(struct soap *soap)
+{ struct soap_multipart *content;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  while (!*soap->msgbuf);
+  if (soap->msgbuf[0] == '-' && soap->msgbuf[1] == '-')
+  { char *s = soap->msgbuf + strlen(soap->msgbuf) - 1;
+    /* remove white space */
+    while (soap_blank(*s))
+      s--;
+    s[1] = '\0';
+    if (soap->mime.boundary)
+    { if (strcmp(soap->msgbuf + 2, soap->mime.boundary))
+        return soap->error = SOAP_MIME_ERROR;
+    }
+    else
+      soap->mime.boundary = soap_strdup(soap, soap->msgbuf + 2);
+    if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  if (soap_set_mime_attachment(soap, NULL, 0, SOAP_MIME_NONE, NULL, NULL, NULL, NULL))
+    return soap->error = SOAP_EOM;
+  content = soap->mime.last;
+  for (;;)
+  { register char *key = soap->msgbuf;
+    register char *val;
+    if (!*key)
+      break;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "MIME header: %s\n", key));
+    val = strchr(soap->msgbuf, ':');
+    if (val)
+    { *val = '\0';
+      do val++;
+      while (*val && *val <= 32);
+      if (!soap_tag_cmp(key, "Content-ID"))
+        content->id = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Location"))
+        content->location = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Disposition"))
+        content->id = soap_strdup(soap, soap_get_header_attribute(soap, val, "name"));
+      else if (!soap_tag_cmp(key, "Content-Type"))
+        content->type = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Description"))
+        content->description = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Transfer-Encoding"))
+        content->encoding = (enum soap_mime_encoding)soap_int_code(mime_codes, val, (long)SOAP_MIME_NONE);
+    }
+    if (soap_getline(soap, key, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmime(struct soap *soap)
+{ register soap_wchar c = 0;
+  if (!soap->mime.last)
+    return SOAP_OK;
+  for (;;)
+  { register size_t i, m = 0;
+    register char *s, *t = NULL;
+    struct soap_multipart *content = soap->mime.last;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Parsing MIME content id=%s type=%s\n", content->id?content->id:"", content->type?content->type:""));
+    if (soap_new_block(soap))
+      return soap->error = SOAP_EOM;
+    for (;;)
+    { register short flag = 0;
+      if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+        return soap->error = SOAP_EOM;
+      for (i = 0; i < SOAP_BLKLEN; i++)
+      { if (m > 0)
+        { *s++ = *t++;
+	  m--;
+	}
+	else
+        { if (!flag)
+	  { c = soap_get1(soap);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	  }
+	  if (flag || c == '\r')
+	  { t = soap->tmpbuf;
+	    memset(t, 0, sizeof(soap->tmpbuf));
+            strcpy(t, "\n--");
+            if (soap->mime.boundary)
+	      strncat(t, soap->mime.boundary, sizeof(soap->tmpbuf)-4);
+	    do c = soap_getchar(soap);
+	    while (c == *t++);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	    if (!*--t)
+	      goto end;
+	    *t = (char)c;
+	    flag = (c == '\r');
+	    m = t - soap->tmpbuf + 1 - flag;
+	    t = soap->tmpbuf;
+	    c = '\r';
+	  }
+	  *s++ = (char)c;
+        }
+      }
+    }
+end:
+    *s = '\0'; /* force 0-terminated */
+    content->size = soap_size_block(soap, i+1)-1;
+    content->ptr = soap_save_block(soap, NULL, 0);
+    soap_resolve_attachment(soap, content);
+    if (c == '-' && soap_getchar(soap) == '-')
+      break;
+    while (c != '\r' && (int)c != EOF && soap_blank(c))
+      c = soap_getchar(soap);
+    if (c != '\r' || soap_getchar(soap) != '\n')
+      return soap->error = SOAP_MIME_ERROR;
+    if (soap_getmimehdr(soap))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_match_cid(struct soap *soap, const char *s, const char *t)
+{ register size_t n;
+  if (!s)
+    return 1;
+  if (!strcmp(s, t))
+    return 0;
+  if (!strncmp(s, "cid:", 4))
+    s += 4;
+  n = strlen(t);
+  if (*t == '<')
+  { t++;
+    n -= 2;
+  }
+  if (!strncmp(s, t, n) && !s[n])
+    return 0;
+  soap_decode(soap->tmpbuf, sizeof(soap->tmpbuf), s, SOAP_STR_EOS);
+  if (!strncmp(soap->tmpbuf, t, n) && !soap->tmpbuf[n])
+    return 0;
+  return 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_resolve_attachment(struct soap *soap, struct soap_multipart *content)
+{ if (content->id)
+  { register struct soap_xlist **xp = &soap->xlist;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving attachment data for id=%s\n", content->id));
+    while (*xp)
+    { register struct soap_xlist *xq = *xp;
+      if (!soap_match_cid(soap, xq->id, content->id))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Found matching attachment %s for content id=%s\n", xq->id, content->id));
+	*xp = xq->next;
+        *xq->ptr = (unsigned char*)content->ptr;
+        *xq->size = (int)content->size;
+        *xq->type = (char*)content->type;
+	if (content->options)
+          *xq->options = (char*)content->options;
+        else
+          *xq->options = (char*)content->description;
+	SOAP_FREE(soap, xq);
+      }
+      else
+        xp = &(*xp)->next;
+    }
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmimehdr(struct soap *soap, struct soap_multipart *content)
+{ const char *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "MIME attachment type=%s\n", content->type?content->type:""));
+  if (soap_send3(soap, "\r\n--", soap->mime.boundary, "\r\n"))
+    return soap->error;
+  if (content->type && soap_send3(soap, "Content-Type: ", content->type, "\r\n"))
+    return soap->error;
+  s = soap_str_code(mime_codes, content->encoding);
+  if (s && soap_send3(soap, "Content-Transfer-Encoding: ", s, "\r\n"))
+    return soap->error;
+  if (content->id && soap_send3(soap, "Content-ID: ", content->id, "\r\n"))
+    return soap->error;
+  if (content->location && soap_send3(soap, "Content-Location: ", content->location, "\r\n"))
+    return soap->error;
+  if (content->description && soap_send3(soap, "Content-Description: ", content->description, "\r\n"))
+    return soap->error;
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_MIME) || !soap->mime.boundary)
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending MIME attachments\n"));
+  for (content = soap->mime.first; content; content = content->next)
+    if (soap_putmimehdr(soap, content)
+     || soap_send_raw(soap, content->ptr, content->size))
+      return soap->error;
+  return soap_send3(soap, "\r\n--", soap->mime.boundary, "--");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_dime(struct soap *soap)
+{ soap->omode |= SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_mime(struct soap *soap, const char *boundary, const char *start)
+{ soap->omode |= SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = soap_strdup(soap, boundary);
+  soap->mime.start = soap_strdup(soap, start);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_dime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_mime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart*
+soap_new_multipart(struct soap *soap, struct soap_multipart **first, struct soap_multipart **last, char *ptr, size_t size)
+{ struct soap_multipart *content;
+  content = (struct soap_multipart*)soap_malloc(soap, sizeof(struct soap_multipart));
+  if (content)
+  { content->next = NULL;
+    content->ptr = ptr;
+    content->size = size;
+    content->id = NULL;
+    content->type = NULL;
+    content->options = NULL;
+    content->encoding = SOAP_MIME_NONE;
+    content->location = NULL;
+    content->description = NULL;
+    if (!*first)
+      *first = content;
+    if (*last)
+      (*last)->next = content;
+    *last = content;
+  }
+  return content;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_dime_attachment(struct soap *soap, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->options = soap_dime_option(soap, optype, option);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_mime_attachment(struct soap *soap, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->encoding = encoding;
+  content->location = soap_strdup(soap, location);
+  content->description = soap_strdup(soap, description);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap_multipart*
+SOAP_FMAC2
+soap_next_multipart(struct soap_multipart *content)
+{ if (content)
+    return content->next;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_select_mime_boundary(struct soap *soap)
+{ while (!soap->mime.boundary || soap_valid_mime_boundary(soap))
+  { register char *s = soap->mime.boundary;
+    register size_t n = 0;
+    if (s)
+      n = strlen(s);
+    if (n < 16)
+    { n = 64;
+      s = soap->mime.boundary = (char*)soap_malloc(soap, n + 1);
+      if (!s)
+        return;
+    }
+    strcpy(s, "==");
+    s += 2;
+    n -= 4;
+    while (n)
+    { *s++ = soap_base64o[soap_random & 0x3F];
+      n--;
+    }
+    strcpy(s, "==");
+  }
+  if (!soap->mime.start)
+    soap->mime.start = "<SOAP-ENV:Envelope>";
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_valid_mime_boundary(struct soap *soap)
+{ register struct soap_multipart *content;
+  register size_t k = strlen(soap->mime.boundary);
+  for (content = soap->mime.first; content; content = content->next)
+  { if (content->ptr && content->size >= k)
+    { register const char *p = (const char*)content->ptr; 
+      register size_t i;
+      for (i = 0; i < content->size - k; i++, p++)
+        if (!strncmp(p, soap->mime.boundary, k))
+          return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	HTTP cookie handling
+ *
+\******************************************************************************/
+
+#ifdef WITH_COOKIES
+/******************************************************************************/
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_encode_cookie(const char *s, char *t, size_t len)
+{ register int c;
+  register size_t n = len;
+  while ((c = *s++) && --n > 0)
+  { if (c > ' ' && c < 128 && !strchr("()<>@,;:\\\"/[]?={}", c))
+      *t++ = c;
+    else if (n > 2)
+    { *t++ = '%';
+      *t++ = (c >> 4) + (c > 159 ? '7' : '0');
+      c &= 0xF;
+      *t++ = c + (c > 9 ? '7' : '0');
+      n -= 2;
+    }
+    else
+      break;
+  }
+  *t = '\0';
+  return len - n;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  size_t n;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (*path == '/')
+    path++;
+  n = strlen(path);
+  for (p = soap->cookies; p; p = p->next)
+    if (!strcmp(p->name, name)
+     && domain
+     && p->domain
+     && !strcmp(p->domain, domain)
+     && !strncmp(p->path, path, n))
+      break;
+  return p;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_set_cookie(struct soap *soap, const char *name, const char *value, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  int n;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set cookie: %s=%s domain=%s path=%s\n", name, value?value:"", domain?domain:"", path?path:""));
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return NULL;
+  }
+  if (*path == '/')
+    path++;
+  q = soap_cookie(soap, name, domain, path);
+  if (!q)
+  { if ((q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+    { if ((q->name = (char*)SOAP_MALLOC(soap, strlen(name)+1)))
+        strcpy(q->name, name);
+      q->value = NULL;
+      q->domain = NULL;
+      q->path = NULL;
+      q->expire = -1;
+      q->version = 0;
+      q->secure = 0;
+      q->modified = 0;
+      for (p = &soap->cookies, n = soap->cookie_max; *p && n; p = &(*p)->next, n--)
+        if (!strcmp((*p)->name, name) && (*p)->path && strcmp((*p)->path, path) < 0)
+          break;
+      if (n)
+      { q->next = *p;
+        *p = q;
+      }
+      else
+      { SOAP_FREE(soap, q->name);
+        SOAP_FREE(soap, q);
+        q = NULL;
+      }
+    }
+  }
+  else
+    q->modified = 1;
+  if (q)
+  { if (q->value)
+    { SOAP_FREE(soap, q->value);
+      q->value = NULL;
+    }
+    if (q->domain)
+    { SOAP_FREE(soap, q->domain);
+      q->domain = NULL;
+    }
+    if (q->path)
+    { SOAP_FREE(soap, q->path);
+      q->path = NULL;
+    }
+    if (value && *value && (q->value = (char*)SOAP_MALLOC(soap, strlen(value)+1)))
+      strcpy(q->value, value);
+    if (domain && *domain && (q->domain = (char*)SOAP_MALLOC(soap, strlen(domain)+1)))
+      strcpy(q->domain, domain);
+    if (path && *path && (q->path = (char*)SOAP_MALLOC(soap, strlen(path)+1)))
+      strcpy(q->path, path);
+    q->session = 1;
+    q->env = 0;
+  }
+  return q;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!domain)
+  { soap_set_receiver_error(soap, "Cookie domain not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (*path == '/')
+    path++;
+  for (p = &soap->cookies, q = *p; q; q = *p)
+    if (!strcmp(q->name, name) && !strcmp(q->domain, domain) && !strncmp(q->path, path, strlen(q->path)))
+    { if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+      p = &q->next;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_env_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)) && p->env)
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_cookie_expire(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->expire;
+  return -1;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_expire(struct soap *soap, const char *name, long expire, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->expire = expire;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 1;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_clr_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 0;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putsetcookies(struct soap *soap)
+{ struct soap_cookie *p;
+  char *s, tmp[4096];
+  const char *t;
+  for (p = soap->cookies; p; p = p->next)
+  { if (p->modified || !p->env)
+    { s = tmp;
+      if (p->name)
+        s += soap_encode_cookie(p->name, s, tmp-s+4064);
+      if (p->value && *p->value)
+      { *s++ = '=';
+        s += soap_encode_cookie(p->value, s, tmp-s+4064);
+      }
+      if (p->domain && (int)strlen(p->domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", p->domain);
+      else if (soap->cookie_domain && (int)strlen(soap->cookie_domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", soap->cookie_domain);
+      strcat(s, ";Path=\"/");
+      if (p->path)
+        t = p->path;
+      else
+        t = soap->cookie_path;
+      if (t)
+      { if (*t == '/')
+          t++;
+        if ((int)strlen(t) < tmp-s+4064)
+          strcat(s, t);
+      }
+      s += strlen(s);
+      *s++ = '"';
+      if (p->version > 0)
+        sprintf(s, ";Version=%u", p->version);
+      if (p->expire >= 0)
+        sprintf(s, ";Max-Age=%ld", p->expire);
+      if (p->secure)
+        strcat(s, ";Secure");
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set-Cookie: %s\n", tmp));
+      if ((soap->error = soap->fposthdr(soap, "Set-Cookie", tmp)))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putcookies(struct soap *soap, const char *domain, const char *path, int secure)
+{ struct soap_cookie **p, *q;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  char *s, tmp[4096];
+  p = &soap->cookies;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending cookies for domain=%s path=%s\n", domain, path));
+  if (*path == '/')
+    path++;
+  while ((q = *p))
+  { if (q->expire && now > q->expire)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie %s expired\n", q->name));
+      SOAP_FREE(soap, q->name);
+      if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+    { size_t domlen = 0;
+      if (q->domain)
+      { const char *s = strchr(q->domain, ':');
+        if (s)
+	  domlen = s - q->domain;
+	else
+          domlen = strlen(q->domain);
+      }
+      if ((!q->domain || !strncmp(q->domain, domain, domlen))
+          && (!q->path || !strncmp(q->path, path, strlen(q->path)))
+          && (!q->secure || secure))
+      { s = tmp;
+        if (q->version != version)
+        { sprintf(s, "$Version=%u;", q->version);
+          version = q->version;
+        }
+        if (q->name)
+          s += soap_encode_cookie(q->name, s, tmp-s+4080);
+        if (q->value && *q->value)
+        { *s++ = '=';
+          s += soap_encode_cookie(q->value, s, tmp-s+4080);
+        }
+        if (q->path && (int)strlen(q->path) < tmp-s+4080)
+        { sprintf(s, ";$Path=\"/%s\"", (*q->path == '/' ? q->path + 1 : q->path));
+          s += strlen(s);
+        }
+        if (q->domain && (int)strlen(q->domain) < tmp-s+4080)
+          sprintf(s, ";$Domain=\"%s\"", q->domain);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie: %s\n", tmp));
+        if ((soap->error = soap->fposthdr(soap, "Cookie", tmp)))
+          return soap->error;
+      }
+      p = &q->next;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_getcookies(struct soap *soap, const char *val)
+{ struct soap_cookie *p = NULL, *q;
+  const char *s;
+  char *t, tmp[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  char *domain = NULL;
+  char *path = NULL;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  if (!val)
+    return;
+  s = val;
+  while (*s)
+  { s = soap_decode_key(tmp, sizeof(tmp), s);
+    if (!soap_tag_cmp(tmp, "$Version"))
+    { if ((s = soap_decode_val(tmp, sizeof(tmp), s)))
+      { if (p)
+          p->version = (int)atol(tmp);
+        else
+          version = (int)atol(tmp);
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Path"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->path)
+          SOAP_FREE(soap, p->path);
+        p->path = t;
+      }
+      else
+      { if (path)
+          SOAP_FREE(soap, path);
+        path = t;
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Domain"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->domain)
+          SOAP_FREE(soap, p->domain);
+	p->domain = t;
+      }
+      else
+      { if (domain)
+          SOAP_FREE(soap, domain);
+        domain = t;
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Path"))
+    { if (p->path)
+        SOAP_FREE(soap, p->path);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->path = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->path, tmp);
+      }
+      else
+        p->path = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Domain"))
+    { if (p->domain)
+        SOAP_FREE(soap, p->domain);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->domain = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->domain, tmp);
+      }
+      else
+        p->domain = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Version"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->version = (unsigned int)atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Max-Age"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->expire = now + atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Expires"))
+    { struct tm T;
+      char a[3]; 
+      static const char mns[] = "anebarprayunulugepctovec";
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (strlen(tmp) > 20)
+      { memset((void*)&T, 0, sizeof(T));
+        a[0] = tmp[4];
+        a[1] = tmp[5];
+        a[2] = '\0';
+        T.tm_mday = (int)atol(a);
+        a[0] = tmp[8];
+        a[1] = tmp[9];
+        T.tm_mon = (strstr(mns, a) - mns) / 2;
+        a[0] = tmp[11];
+        a[1] = tmp[12];
+        T.tm_year = 100 + (int)atol(a);
+        a[0] = tmp[13];
+        a[1] = tmp[14];
+        T.tm_hour = (int)atol(a);
+        a[0] = tmp[16];
+        a[1] = tmp[17];
+        T.tm_min = (int)atol(a);
+        a[0] = tmp[19];
+        a[1] = tmp[20];
+        T.tm_sec = (int)atol(a);
+        p->expire = soap_timegm(&T);
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Secure"))
+      p->secure = 1;
+    else
+    { if (p)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+        if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+        { q->version = p->version;
+          q->expire = p->expire;
+          q->secure = p->secure;
+          q->env = 1;
+        }
+        if (p->name)
+          SOAP_FREE(soap, p->name);
+        if (p->value)
+          SOAP_FREE(soap, p->value);
+        if (p->domain)
+          SOAP_FREE(soap, p->domain);
+        if (p->path)
+          SOAP_FREE(soap, p->path);
+        SOAP_FREE(soap, p);
+      }
+      if ((p = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      { p->name = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+        strcpy(p->name, tmp);
+        s = soap_decode_val(tmp, sizeof(tmp), s);
+        if (*tmp)
+        { p->value = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+          strcpy(p->value, tmp);
+        }
+        else
+          p->value = NULL;
+        p->domain = domain;
+        p->path = path;
+        p->expire = 0;
+        p->secure = 0;
+        p->version = version;
+      }
+    }
+  }
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+    if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+    { q->version = p->version;
+      q->expire = p->expire;
+      q->secure = p->secure;
+      q->env = 1;
+    }
+    if (p->name)
+      SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+  if (domain)
+    SOAP_FREE(soap, domain);
+  if (path)
+    SOAP_FREE(soap, path);
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getenv_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  const char *s;
+  char key[4096], val[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  if (!(s = getenv("HTTP_COOKIE")))
+    return SOAP_ERR;
+  do
+  { s = soap_decode_key(key, sizeof(key), s);
+    s = soap_decode_val(val, sizeof(val), s);
+    p = soap_set_cookie(soap, key, val, NULL, NULL);
+    if (p)
+      p->env = 1;
+  } while (*s);
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_copy_cookies(struct soap *soap)
+{ struct soap_cookie *p, **q, *r;
+  q = &r;
+  for (p = soap->cookies; p; p = p->next)
+  { if (!(*q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      return r;
+    **q = *p;
+    if (p->name)
+    { if (((*q)->name = (char*)SOAP_MALLOC(soap, strlen(p->name)+1)))
+        strcpy((*q)->name, p->name);
+    }
+    if (p->value)
+    { if (((*q)->value = (char*)SOAP_MALLOC(soap, strlen(p->value)+1)))
+        strcpy((*q)->value, p->value);
+    }
+    if (p->domain)
+    { if (((*q)->domain = (char*)SOAP_MALLOC(soap, strlen(p->domain)+1)))
+        strcpy((*q)->domain, p->domain);
+    }
+    if (p->path)
+    { if (((*q)->path = (char*)SOAP_MALLOC(soap, strlen(p->path)+1)))
+        strcpy((*q)->path, p->path);
+    }
+    q = &(*q)->next;
+  }
+  *q = NULL;
+  return r;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  for (p = soap->cookies; p; p = soap->cookies)
+  { soap->cookies = p->next;
+    SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+}
+
+/******************************************************************************/
+#endif /* WITH_COOKIES */
+
+/******************************************************************************/
+#ifdef WITH_GZIP
+#ifndef PALM_1
+static int
+soap_getgziphdr(struct soap *soap)
+{ int i;
+  soap_wchar c, f = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get gzip header\n"));
+  for (i = 0; i < 9; i++)
+  { if ((int)(c = soap_get1(soap) == EOF))
+      return soap->error = SOAP_EOF;
+    if (i == 2)
+      f = c;
+  }
+  if (f & 0x04) /* FEXTRA */
+  { for (i = soap_get1(soap) | (soap_get1(soap) << 8); i; i--)
+      if ((int)soap_get1(soap) == EOF)
+        return soap->error = SOAP_EOF;
+  }
+  if (f & 0x08) /* FNAME */
+    do
+      c = soap_get1(soap);
+    while (c && (int)c != EOF);
+  if ((int)c != EOF && (f & 0x10)) /* FCOMMENT */
+    do
+      c = soap_get1(soap);
+    while (c && (int)f != EOF);
+  if ((int)c != EOF && (f & 0x01)) /* FHCRC */
+  { if ((int)(c = soap_get1(soap)) != EOF)
+      c = soap_get1(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_recv(struct soap *soap)
+{ soap_wchar c;
+  soap->error = SOAP_OK;
+  soap_free(soap);
+  soap_set_local_namespaces(soap);
+  soap->version = 0;	/* don't assume we're parsing SOAP content by default */
+#ifndef WITH_NOIDREF
+  soap_free_iht(soap);
+#endif
+  if ((soap->imode & SOAP_IO) == SOAP_IO_CHUNK)
+    soap->omode |= SOAP_IO_CHUNK;
+  soap->imode &= ~SOAP_IO;
+  soap->mode = soap->imode;
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  soap->ahead = 0;
+  soap->peeked = 0;
+  soap->level = 0;
+  soap->part = SOAP_BEGIN;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  *soap->endpoint = '\0';
+  soap->action = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket))
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->recvfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->recvfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#ifdef WITH_ZLIB
+  soap->mode &= ~SOAP_ENC_ZLIB;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.next_in = Z_NULL;
+  soap->d_stream.avail_in = 0;
+  soap->d_stream.next_out = (Byte*)soap->buf;
+  soap->d_stream.avail_out = SOAP_BUFLEN;
+  soap->z_ratio_in = 1.0;
+#endif
+#ifndef WITH_LEANER
+  if (soap->fprepareinit)
+    soap->fprepareinit(soap);
+#endif
+  c = soap_getchar(soap);
+#ifdef WITH_GZIP
+  if (c == 0x1F)
+  { if (soap_getgziphdr(soap))
+      return soap->error;
+    if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+    soap->zlib_state = SOAP_ZLIB_INFLATE;
+    soap->mode |= SOAP_ENC_ZLIB;
+    soap->zlib_in = SOAP_ZLIB_GZIP;
+    soap->z_crc = crc32(0L, NULL, 0);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    /* should not chunk over plain transport, so why bother to check? */
+    /* if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) */
+    /*   soap->z_buflen = soap->bufidx; */
+    /* else */
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+    soap->z_buflen = soap->buflen;
+    soap->buflen = soap->bufidx;
+    c = soap_getchar(soap);
+  }  
+#endif
+#ifndef WITH_LEANER
+  if (c == '-' && soap_get0(soap) == '-')
+    soap->mode |= SOAP_ENC_MIME;
+  else if ((c & 0xFFFC) == (SOAP_DIME_VERSION | SOAP_DIME_MB) && (soap_get0(soap) & 0xFFF0) == 0x20)
+    soap->mode |= SOAP_ENC_DIME;
+  else
+#endif
+  { while (soap_blank(c))
+      c = soap_getchar(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  soap_unget(soap, c);
+#ifndef WITH_NOHTTP
+  /* if not XML or (start of)BOM or MIME/DIME/ZLIB, assume HTTP header */
+  if (c != '<' && c != 0xEF && !(soap->mode & (SOAP_ENC_MIME | SOAP_ENC_DIME | SOAP_ENC_ZLIB)))
+  { soap->mode &= ~SOAP_IO;
+    soap->error = soap->fparse(soap);
+    if (soap->error && soap->error < SOAP_STOP)
+    { soap->keep_alive = 0; /* force close later */
+      return soap->error;
+    }
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { soap->chunkbuflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+      soap->chunksize = 0;
+    }
+#ifndef WITH_LEANER
+    else if (soap->fpreparerecv && soap->buflen != soap->bufidx)
+      soap->fpreparerecv(soap, soap->buf + soap->bufidx, soap->buflen - soap->bufidx);
+#endif
+#ifdef WITH_ZLIB
+    if (soap->zlib_in != SOAP_ZLIB_NONE)
+    { /* fparse should not use soap_unget to push back last char */
+#ifdef WITH_GZIP
+      c = soap_get1(soap);
+      if (c == 0x1F)
+      { if (soap_getgziphdr(soap))
+          return soap->error;
+        if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        soap->z_crc = crc32(0L, NULL, 0);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+      }
+      else
+      { soap_revget1(soap);
+#else
+      {
+#endif
+        if (inflateInit(&soap->d_stream) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate initialized\n"));
+      }
+      soap->mode |= SOAP_ENC_ZLIB;
+      memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+      soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+      soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+    }
+#endif
+    if (soap->error)
+    { if (soap->error == SOAP_FORM && soap->fform)
+      { soap->error = soap->fform(soap);
+        if (soap->error == SOAP_OK)
+          soap->error = SOAP_STOP; /* prevents further processing */
+      }
+      return soap->error;
+    }
+  }
+#endif
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_MIME)
+  { if (soap_getmimehdr(soap))
+      return soap->error;
+    if (soap_get_header_attribute(soap, soap->mime.first->type, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+  }
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap->dime.flags & SOAP_DIME_CF)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked DIME SOAP message\n"));
+      soap->dime.chunksize = soap->dime.size;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+    }
+    soap->count = soap->buflen - soap->bufidx;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse(struct soap *soap)
+{ char header[SOAP_HDRLEN], *s;
+  unsigned short get = 0, status = 0, k = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Waiting for HTTP request/response...\n"));
+  *soap->endpoint = '\0';
+  soap->length = 0;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->action = NULL;
+  soap->authrealm = NULL;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP status: %s\n", soap->msgbuf));
+    for (;;)
+    { if (soap_getline(soap, header, SOAP_HDRLEN))
+      { if (soap->error == SOAP_EOF)
+	{ soap->error = SOAP_OK;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "EOF in HTTP header, continue anyway\n"));
+	  break;
+	}
+        return soap->error;
+      }
+      if (!*header)
+        break;
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP header: %s\n", header));
+      s = strchr(header, ':');
+      if (s)
+      { *s = '\0';
+        do s++;
+        while (*s && *s <= 32);
+        if ((soap->error = soap->fparsehdr(soap, header, s)))
+        { if (soap->error < SOAP_STOP)
+	    return soap->error;
+	  status = soap->error;
+	  soap->error = SOAP_OK;
+        }
+      }
+    }
+    if ((s = strchr(soap->msgbuf, ' ')))
+    { k = (unsigned short)soap_strtoul(s, &s, 10);
+      if (!soap_blank(*s))
+        k = 0;
+    }
+    else
+      k = 0;
+  } while (k == 100);
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Finished HTTP header parsing\n"));
+  s = strstr(soap->msgbuf, "HTTP/");
+  if (s && s[7] != '1')
+  { if (soap->keep_alive == 1)
+      soap->keep_alive = 0;
+    if (k == 0 && (soap->omode & SOAP_IO) == SOAP_IO_CHUNK) /* k == 0 for HTTP request */
+    { soap->imode |= SOAP_IO_CHUNK;
+      soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE;
+    }
+  }
+  if (soap->keep_alive < 0)
+    soap->keep_alive = 1;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Keep alive connection = %d\n", soap->keep_alive));
+  if (s && (((get = !strncmp(soap->msgbuf, "GET ", 4))) || !strncmp(soap->msgbuf, "POST ", 5)))
+  { size_t m = strlen(soap->endpoint);
+    size_t n = m + (s - soap->msgbuf) - 5 - (!get);
+    if (n >= sizeof(soap->endpoint))
+      n = sizeof(soap->endpoint) - 1;
+    strncpy(soap->path, soap->msgbuf + 4 + (!get), n - m);
+    soap->path[n - m] = '\0';
+    strcat(soap->endpoint, soap->path);
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Target endpoint='%s'\n", soap->endpoint));
+    if (get)
+    { soap->error = soap->fget(soap);
+      if (soap->error == SOAP_OK)
+        soap->error = SOAP_STOP; /* prevents further processing */
+      return soap->error;
+    }
+    if (status)
+      return soap->error = status;
+    return SOAP_OK;
+  }
+  if (k == 0 || (k >= 200 && k <= 299) || k == 400 || k == 500)
+    return SOAP_OK;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP error %d\n", k));
+  return soap_set_receiver_error(soap, "HTTP error", soap->msgbuf, k);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse_header(struct soap *soap, const char *key, const char *val)
+{ if (!soap_tag_cmp(key, "Host"))
+  { 
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+      strcpy(soap->endpoint, "https://");
+    else
+#endif
+      strcpy(soap->endpoint, "http://");
+    strncat(soap->endpoint, val, sizeof(soap->endpoint) - 8);
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifndef WITH_LEANER
+  else if (!soap_tag_cmp(key, "Content-Type"))
+  { if (soap_get_header_attribute(soap, val, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+    else if (soap_get_header_attribute(soap, val, "multipart/related")
+          || soap_get_header_attribute(soap, val, "multipart/form-data"))
+    { soap->mime.boundary = soap_strdup(soap, soap_get_header_attribute(soap, val, "boundary"));
+      soap->mime.start = soap_strdup(soap, soap_get_header_attribute(soap, val, "start"));
+      soap->mode |= SOAP_ENC_MIME;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Content-Length"))
+    soap->length = soap_strtoul(val, NULL, 10);
+  else if (!soap_tag_cmp(key, "Content-Encoding"))
+  { if (!soap_tag_cmp(val, "deflate"))
+#ifdef WITH_ZLIB
+      soap->zlib_in = SOAP_ZLIB_DEFLATE;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+    else if (!soap_tag_cmp(val, "gzip"))
+#ifdef WITH_GZIP
+      soap->zlib_in = SOAP_ZLIB_GZIP;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+  }
+#ifdef WITH_ZLIB
+  else if (!soap_tag_cmp(key, "Accept-Encoding"))
+  {
+#ifdef WITH_GZIP
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "gzip"))
+      soap->zlib_out = SOAP_ZLIB_GZIP;
+    else
+#endif
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "deflate"))
+      soap->zlib_out = SOAP_ZLIB_DEFLATE;
+    else
+      soap->zlib_out = SOAP_ZLIB_NONE;
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Transfer-Encoding"))
+  { soap->mode &= ~SOAP_IO;
+    if (!soap_tag_cmp(val, "chunked"))
+      soap->mode |= SOAP_IO_CHUNK;
+  }
+  else if (!soap_tag_cmp(key, "Connection"))
+  { if (!soap_tag_cmp(val, "keep-alive"))
+      soap->keep_alive = -soap->keep_alive;
+    else if (!soap_tag_cmp(val, "close"))
+      soap->keep_alive = 0;
+  }
+#ifndef WITH_LEAN
+  else if (!soap_tag_cmp(key, "Authorization"))
+  { if (!soap_tag_cmp(val, "Basic *"))
+    { int n;
+      char *s;
+      soap_base642s(soap, val + 6, soap->tmpbuf, sizeof(soap->tmpbuf) - 1, &n);
+      soap->tmpbuf[n] = '\0';
+      if ((s = strchr(soap->tmpbuf, ':')))
+      { *s = '\0';
+	soap->userid = soap_strdup(soap, soap->tmpbuf);
+	soap->passwd = soap_strdup(soap, s + 1);
+      }
+    }
+  }
+  else if (!soap_tag_cmp(key, "WWW-Authenticate"))
+    soap->authrealm = soap_strdup(soap, soap_get_header_attribute(soap, val + 6, "realm"));
+  else if (!soap_tag_cmp(key, "Expect"))
+  { if (!soap_tag_cmp(val, "100-continue"))
+    { if ((soap->error = soap->fposthdr(soap, "HTTP/1.1 100 Continue", NULL))
+       || (soap->error = soap->fposthdr(soap, NULL, NULL)))
+        return soap->error;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "SOAPAction"))
+  { if (*val == '"')
+    { soap->action = soap_strdup(soap, val + 1);
+      soap->action[strlen(soap->action) - 1] = '\0';
+    }
+  }
+  else if (!soap_tag_cmp(key, "Location"))
+  { strncpy(soap->endpoint, val, sizeof(soap->endpoint));
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifdef WITH_COOKIES
+  else if (!soap_tag_cmp(key, "Cookie") || !soap_tag_cmp(key, "Set-Cookie"))
+    soap_getcookies(soap, val);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_get_header_attribute(struct soap *soap, const char *line, const char *key)
+{ register const char *s = line;
+  if (s)
+  { while (*s)
+    { register short flag;
+      s = soap_decode_key(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      flag = soap_tag_cmp(soap->tmpbuf, key);
+      s = soap_decode_val(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      if (!flag)
+        return soap->tmpbuf;
+    }
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_key(char *buf, size_t len, const char *val)
+{ return soap_decode(buf, len, val, "=,;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_val(char *buf, size_t len, const char *val)
+{ if (*val != '=')
+  { *buf = '\0';
+    return val;
+  }
+  return soap_decode(buf, len, val + 1, ",;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char*
+soap_decode(char *buf, size_t len, const char *val, const char *sep)
+{ const char *s;
+  char *t = buf;
+  for (s = val; *s; s++)
+    if (*s != ' ' && *s != '\t' && !strchr(sep, *s))
+      break;
+  if (*s == '"')
+  { s++;
+    while (*s && *s != '"' && --len)
+      *t++ = *s++;
+  }
+  else
+  { while (soap_notblank(*s) && !strchr(sep, *s) && --len)
+    { if (*s == '%')
+      { *t++ = ((s[1] >= 'A' ? (s[1] & 0x7) + 9 : s[1] - '0') << 4)
+              + (s[2] >= 'A' ? (s[2] & 0x7) + 9 : s[2] - '0');
+        s += 3;
+      }
+      else
+        *t++ = *s++;
+    }
+  }
+  *t = '\0';
+  while (*s && !strchr(sep, *s))
+    s++;
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_out(struct soap *soap)
+{
+#ifndef WITH_LEANER
+  size_t n = 0;
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->mime.start)
+  { const char *s;
+    if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+      s = "application/dime";
+    else if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+    sprintf(soap->tmpbuf, "--%s\r\nContent-Type: %s\r\nContent-Transfer-Encoding: binary\r\nContent-ID: %s\r\n\r\n", soap->mime.boundary, s, soap->mime.start);
+    n = strlen(soap->tmpbuf);
+    if (soap_send_raw(soap, soap->tmpbuf, n))
+      return soap->error;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    soap->dime.size = soap->count;	/* DIME in MIME correction */
+  if (!(soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME))
+  { if (soap_putdimehdr(soap))
+      return soap->error;
+  }
+#endif
+  soap->part = SOAP_IN_ENVELOPE;
+  return soap_element_begin_out(soap, "SOAP-ENV:Envelope", 0, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Envelope"))
+    return soap->error;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { soap->dime.size = soap->count - soap->dime.size;	/* DIME in MIME correction */
+    sprintf(soap->id, soap->dime_id_format, 0);
+    soap->dime.id = soap->id;
+    if (soap->local_namespaces)
+    { if (soap->local_namespaces[0].out)
+        soap->dime.type = (char*)soap->local_namespaces[0].out;
+      else
+        soap->dime.type = (char*)soap->local_namespaces[0].ns;
+    }
+    soap->dime.options = NULL;
+    soap->dime.flags = SOAP_DIME_MB | SOAP_DIME_ABSURI;
+    if (!soap->dime.first)
+      soap->dime.flags |= SOAP_DIME_ME;
+    soap->count += 12 + ((strlen(soap->dime.id)+3)&(~3)) + ((strlen(soap->dime.type)+3)&(~3));
+  }
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+    return soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+#endif
+  soap->part = SOAP_END_ENVELOPE;
+  return SOAP_OK;
+} 
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_in(struct soap *soap)
+{ register struct Namespace *p;
+  soap->part = SOAP_IN_ENVELOPE;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Envelope", 0))
+    return soap->error = SOAP_VERSIONMISMATCH;
+  p = soap->local_namespaces;
+  if (p)
+  { const char *ns = p[0].out;
+    if (!ns)
+      ns = p[0].ns;
+    if (!strcmp(ns, soap_env1))
+    { soap->version = 1; /* make sure we use SOAP 1.1 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc1))))
+        strcpy(p[1].out, soap_enc1);
+    }
+    else if (!strcmp(ns, soap_env2))
+    { soap->version = 2; /* make sure we use SOAP 1.2 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc2))))
+        strcpy(p[1].out, soap_enc2);
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_in(struct soap *soap)
+{ soap->part = SOAP_END_ENVELOPE;
+  return soap_element_end_in(soap, "SOAP-ENV:Envelope");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_out(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap->version == 1)
+    soap->encoding = 1;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_SEC) && soap_set_attr(soap, "wsu:Id", "Body"))
+    return soap->error;
+#endif
+  if (soap_element(soap, "SOAP-ENV:Body", 0, NULL))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Body"))
+    return soap->error;
+  soap->part = SOAP_END_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_in(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Body", 0))
+    return soap->error;
+  if (!soap->body)
+    soap->part = SOAP_NO_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_in(struct soap *soap)
+{ if (soap->part == SOAP_NO_BODY)
+    return SOAP_OK;
+  soap->part = SOAP_END_BODY;
+  return soap_element_end_in(soap, "SOAP-ENV:Body");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_header(struct soap *soap)
+{ if (soap_getheader(soap) && soap->error == SOAP_TAG_MISMATCH)
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_endpoint(struct soap *soap, const char *endpoint)
+{ register const char *s;
+  register size_t i, n;
+  soap->endpoint[0] = '\0';
+  soap->host[0] = '\0';
+  soap->path[0] = '/';
+  soap->path[1] = '\0';
+  soap->port = 80;
+  if (!endpoint || !*endpoint)
+    return;
+  if (!strncmp(endpoint, "https:", 6))
+    soap->port = 443;
+  strncpy(soap->endpoint, endpoint, sizeof(soap->endpoint) - 1);
+  s = strchr(endpoint, ':');
+  if (s && s[1] == '/' && s[2] == '/')
+    s += 3;
+  else
+    s = endpoint;
+  n = strlen(s);
+  if (n >= sizeof(soap->host))
+    n = sizeof(soap->host) - 1;
+#ifdef WITH_IPV6
+  if (s[0] == '[')
+  { s++;
+    for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == ']')
+      { s++;
+        break; 
+      }
+    }
+  }
+  else
+  { for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == '/' || s[i] == ':')
+        break; 
+    }
+  }
+#else
+  for (i = 0; i < n; i++)
+  { soap->host[i] = s[i];
+    if (s[i] == '/' || s[i] == ':')
+      break; 
+  }
+#endif
+  soap->host[i] = '\0';
+  if (s[i] == ':')
+  { soap->port = (int)atol(s + i + 1);
+    for (i++; i < n; i++)
+      if (s[i] == '/')
+        break;
+  }
+  if (s[i])
+  { strncpy(soap->path, s + i, sizeof(soap->path));
+    soap->path[sizeof(soap->path) - 1] = '\0';
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect(struct soap *soap, const char *endpoint, const char *action)
+{ return soap_connect_command(soap, SOAP_POST, endpoint, action);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect_command(struct soap *soap, int http_command, const char *endpoint, const char *action)
+{ char host[sizeof(soap->host)];
+  int port;
+  size_t count;
+  soap->error = SOAP_OK;
+  strcpy(host, soap->host); /* save to compare */
+  port = soap->port; /* save to compare */
+  soap_set_endpoint(soap, endpoint);
+#ifndef WITH_LEANER
+  if (soap->fconnect)
+  { if ((soap->error = soap->fconnect(soap, endpoint, soap->host, soap->port)))
+      return soap->error;
+  }
+  else
+#endif
+  if (soap->fopen && *soap->host)
+  { soap->status = http_command;
+    if (!soap->keep_alive || !soap_valid_socket(soap->socket) || strcmp(soap->host, host) || soap->port != port || !soap->fpoll || soap->fpoll(soap))
+    { soap->keep_alive = 0; /* to force close */
+      soap->omode &= ~SOAP_IO_UDP; /* to force close */
+      soap_closesock(soap);
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Connect/reconnect to host='%s' path='%s' port=%d\n", soap->host, soap->path, soap->port));
+#ifdef WITH_UDP
+      if (!strncmp(endpoint, "soap.udp:", 9))
+        soap->omode |= SOAP_IO_UDP;
+#endif
+      soap->socket = soap->fopen(soap, endpoint, soap->host, soap->port);
+      if (soap->error)
+        return soap->error;
+      soap->keep_alive = ((soap->omode & SOAP_IO_KEEPALIVE) != 0);
+    }
+  }
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML) && endpoint)
+  { unsigned int k = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((k & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fpost(soap, endpoint, soap->host, soap->port, soap->path, action, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((k & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = k;
+  }
+  else if (action)
+    soap->action = soap_strdup(soap, action);
+  if (http_command != SOAP_POST)
+    return soap_end_send(soap);
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2base64(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register int i;
+  register unsigned long m;
+  register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, (n + 2) / 3 * 4 + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (!s)
+    return p;
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    t += 4;
+  }
+  t[0] = '\0';
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      t[i] = '=';
+    t[4] = '\0';
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_base642s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register int i, j, c;
+  register unsigned long m;
+  register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = (strlen(s) + 3) / 4 * 3;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  if (n)
+    *n = 0;
+  for (;;)
+  { for (i = 0; i < SOAP_BLKLEN; i++)
+    { m = 0;
+      j = 0;
+      while (j < 4)
+      { c = *s++;
+        if (c == '=' || !c)
+        { i *= 3;
+          switch (j)
+          { case 2:
+              *t++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *t++ = (char)((m >> 10) & 0xFF);
+              *t++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n += i;
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      }
+      *t++ = (char)((m >> 16) & 0xFF);
+      *t++ = (char)((m >> 8) & 0xFF);
+      *t++ = (char)(m & 0xFF);
+      if (l < 3)
+      { if (n)
+	  *n += i;
+        return p;
+      }
+      l -= 3;
+    }
+    if (n)
+      *n += 3 * SOAP_BLKLEN;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2hex(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, 2 * n + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (s)
+  { for (; n > 0; n--)
+    { register int m = *s++;
+      *t++ = (char)((m >> 4) + (m > 159 ? 'a' - 10 : '0'));
+      m &= 0x0F;
+      *t++ = (char)(m + (m > 9 ? 'a' - 10 : '0'));
+    }
+  }
+  *t++ = '\0';
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_hex2s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = strlen(s) / 2;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  while (l)
+  { register int d1, d2;
+    d1 = *s++;
+    if (!d1)
+      break;
+    d2 = *s++;
+    if (!d2)
+      break;
+    *t++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    l--;
+  }
+  if (n)
+    *n = t - p;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthttphdr(struct soap *soap, int status, size_t count)
+{ register const char *s = NULL;
+  register int err = SOAP_OK;
+#ifndef WITH_LEANER
+  register const char *r = NULL;
+#endif
+  if (status == SOAP_FILE && soap->http_content)
+    s = soap->http_content;
+  else if (status == SOAP_HTML)
+    s = "text/html; charset=utf-8";
+  else if (count || ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK))
+  { if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+  }
+#ifndef WITH_LEANER
+  if (soap->mode & (SOAP_ENC_DIME | SOAP_ENC_MTOM))
+  { if (soap->mode & SOAP_ENC_MTOM)
+    { r = s;
+      s = "application/xop+xml; charset=utf-8";
+    }
+    else
+      s = "application/dime";
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->status != SOAP_GET)
+  { register const char *t = strchr(s, ';');
+    sprintf(soap->tmpbuf, "multipart/related; boundary=\"%s\"; type=\"", soap->mime.boundary);
+    if (t)
+      strncat(soap->tmpbuf, s, t - s);
+    else
+      strcat(soap->tmpbuf, s);
+    if (soap->mime.start)
+    { strcat(soap->tmpbuf, "\"; start=\"");
+      strcat(soap->tmpbuf, soap->mime.start);
+    }
+    strcat(soap->tmpbuf, "\"");
+    if (r)
+    { strcat(soap->tmpbuf, "; start-info=\"");
+      strcat(soap->tmpbuf, r);
+      strcat(soap->tmpbuf, "\"");
+    }
+    s = soap->tmpbuf;
+  }
+#endif
+  if (s && (err = soap->fposthdr(soap, "Content-Type", s)))
+    return err;
+#ifdef WITH_ZLIB
+  if (soap->omode & SOAP_ENC_ZLIB)
+  {
+#ifdef WITH_GZIP
+    err = soap->fposthdr(soap, "Content-Encoding", "gzip");
+#else
+    err = soap->fposthdr(soap, "Content-Encoding", "deflate");
+#endif
+    if (err)
+      return err;
+  }
+#endif
+#ifndef WITH_LEANER
+  if ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK)
+    err = soap->fposthdr(soap, "Transfer-Encoding", "chunked");
+  else
+#endif
+  if (soap->status != SOAP_GET)
+  { sprintf(soap->tmpbuf, "%lu", (unsigned long)count);
+    err = soap->fposthdr(soap, "Content-Length", soap->tmpbuf);
+  }
+  if (err)
+    return err;
+  return soap->fposthdr(soap, "Connection", soap->keep_alive ? "keep-alive" : "close");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_get(struct soap *soap)
+{ return SOAP_GET_METHOD;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post(struct soap *soap, const char *endpoint, const char *host, int port, const char *path, const char *action, size_t count)
+{ register const char *s;
+  register int err;
+  if (soap->status == SOAP_GET)
+    s = "GET";
+  else
+    s = "POST";
+#ifdef PALM
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)) && strncmp(endpoint, "_beam:", 6) && strncmp(endpoint, "_local:", 7) && strncmp(endpoint, "_btobex:", 8))
+#else
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)))
+#endif
+    return SOAP_OK;
+  if (soap->proxy_host && strncmp(endpoint, "https:", 6))
+    sprintf(soap->tmpbuf, "%s %s HTTP/%s", s, endpoint, soap->http_version);
+  else
+    sprintf(soap->tmpbuf, "%s /%s HTTP/%s", s, (*path == '/' ? path + 1 : path), soap->http_version);
+  if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+    return err;
+  if (port != 80)
+    sprintf(soap->tmpbuf, "%s:%d", host, port);
+  else
+    strcpy(soap->tmpbuf, host); 
+  if ((err = soap->fposthdr(soap, "Host", soap->tmpbuf))
+   || (err = soap->fposthdr(soap, "User-Agent", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, SOAP_OK, count)))
+    return err;
+#ifdef WITH_ZLIB
+#ifdef WITH_GZIP
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "gzip, deflate")))
+#else
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "deflate")))
+#endif
+    return err;
+#endif
+#ifndef WITH_LEAN
+  if (soap->userid && soap->passwd && strlen(soap->userid) + strlen(soap->passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Authorization", soap->tmpbuf)))
+      return err;
+  }
+  if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+      return err;
+  }
+#endif
+#ifdef WITH_COOKIES
+#ifdef WITH_OPENSSL
+  if (soap_putcookies(soap, host, path, soap->ssl != NULL))
+    return soap->error;
+#else
+  if (soap_putcookies(soap, host, path, 0))
+    return soap->error;
+#endif
+#endif
+  if (action && soap->version == 1)
+  { sprintf(soap->tmpbuf, "\"%s\"", action);
+    if ((err = soap->fposthdr(soap, "SOAPAction", soap->tmpbuf)))
+      return err;
+  }
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_send_header(struct soap *soap, const char *s)
+{ register const char *t;
+  do
+  { t = strchr(s, '\n'); /* disallow \n in HTTP headers */
+    if (!t)
+      t = s + strlen(s);
+    if (soap_send_raw(soap, s, t - s))
+      return soap->error;
+    s = t + 1;
+  } while (*t);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post_header(struct soap *soap, const char *key, const char *val)
+{ if (key)
+  { if (http_send_header(soap, key))
+      return soap->error;
+    if (val && (soap_send_raw(soap, ": ", 2) || http_send_header(soap, val)))
+      return soap->error;
+  }
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_response(struct soap *soap, int status, size_t count)
+{ register int err;
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    httpOutputEnable(soap->rpmreqid);
+#endif
+  if (!status || status == SOAP_HTML || status == SOAP_FILE)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "OK 200\n"));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s 200 OK", soap->http_version);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", "200 OK")))
+      return err;
+  }
+  else if (status > 200 && status < 600)
+  { sprintf(soap->tmpbuf, "HTTP/%s %d %s", soap->http_version, status, http_error(soap, status));
+    if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      return err;
+#ifndef WITH_LEAN 
+    if (status == 401)
+    { sprintf(soap->tmpbuf, "Basic realm=\"%s\"", soap->authrealm ? soap->authrealm : "gSOAP Web Service");
+      if ((err = soap->fposthdr(soap, "WWW-Authenticate", soap->tmpbuf)))
+        return err;
+    }
+    else if ((status >= 301 && status <= 303) || status == 307)
+    { if ((err = soap->fposthdr(soap, "Location", soap->endpoint)))
+        return err;
+    }
+#endif
+  }
+  else
+  { const char *s = *soap_faultcode(soap);
+    if (soap->version == 2 && !strcmp(s, "SOAP-ENV:Sender"))
+      s = "400 Bad Request";
+    else
+      s = "500 Internal Server Error";
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error %s (status=%d)\n", s, status));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s %s", soap->http_version, s);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", s)))
+      return err;
+  }
+  if ((err = soap->fposthdr(soap, "Server", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, status, count)))
+    return err;
+#ifdef WITH_COOKIES
+  if (soap_putsetcookies(soap))
+    return soap->error;
+#endif
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_response(struct soap *soap, int status)
+{ register size_t count;
+  if (!(soap->omode & (SOAP_ENC_XML | SOAP_IO_STORE /* this tests for chunking too */))
+   && (status == SOAP_HTML || status == SOAP_FILE))
+  { soap->omode &= ~SOAP_IO;
+    soap->omode |= SOAP_IO_STORE;
+  }
+  soap->status = status;
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML))
+  { register int n = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((n & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fresponse(soap, status, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((n & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = n;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static const char*
+soap_set_validation_fault(struct soap *soap, const char *s, const char *t)
+{ if (*soap->tag)
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s in element <%s>", s, t?t:SOAP_STR_EOS, soap->tag);
+  else
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s", s, t?t:SOAP_STR_EOS);
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_fault(struct soap *soap)
+{ const char **c = soap_faultcode(soap);
+  const char **s = soap_faultstring(soap);
+  if (!*c && !*s && soap->fseterror)
+    soap->fseterror(soap, c, s);
+  if (!*c)
+  { if (soap->version == 2)
+      *c = "SOAP-ENV:Sender";
+    else
+      *c = "SOAP-ENV:Client";
+  }
+  if (*s)
+    return;
+  switch (soap->error)
+  {
+#ifndef WITH_LEAN
+    case SOAP_CLI_FAULT:
+      *s = "Client fault";
+      break;
+    case SOAP_SVR_FAULT:
+      *s = "Server fault";
+      break;
+    case SOAP_TAG_MISMATCH:
+      *s = soap_set_validation_fault(soap, "tag name or namespace mismatch", NULL);
+      break;
+    case SOAP_TYPE:
+      *s = soap_set_validation_fault(soap, "data type mismatch ", soap->type);
+      break;
+    case SOAP_SYNTAX_ERROR:
+      *s = "Well-formedness violation";
+      break;
+    case SOAP_NO_TAG:
+      *s = "No XML element tag";
+      break;
+    case SOAP_MUSTUNDERSTAND:
+      *c = "SOAP-ENV:MustUnderstand";
+      sprintf(soap->msgbuf, "The data in element '%s' must be understood but cannot be handled", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_VERSIONMISMATCH:
+      *c = "SOAP-ENV:VersionMismatch";
+      *s = "SOAP version mismatch or invalid SOAP message";
+      break;
+    case SOAP_DATAENCODINGUNKNOWN:
+      *c = "SOAP-ENV:DataEncodingUnknown";
+      *s = "Unsupported SOAP data encoding";
+      break;
+    case SOAP_NAMESPACE:
+      *s = soap_set_validation_fault(soap, "namespace mismatch", NULL);
+      break;
+    case SOAP_USER_ERROR:
+      *s = "User error";
+      break;
+    case SOAP_FATAL_ERROR:
+      *s = "Fatal error";
+      break;
+    case SOAP_NO_METHOD:
+      sprintf(soap->msgbuf, "Method '%s' not implemented: method name or namespace not recognized", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_GET_METHOD:
+      *s = "HTTP GET method not implemented";
+      break;
+    case SOAP_EOM:
+      *s = "Out of memory";
+      break;
+    case SOAP_IOB:
+      *s = "Array index out of bounds";
+      break;
+    case SOAP_NULL:
+      *s = soap_set_validation_fault(soap, "nil not allowed", NULL);
+      break;
+    case SOAP_DUPLICATE_ID:
+      *s = soap_set_validation_fault(soap, "multiple definitions of id ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:DuplicateID";
+      break;
+    case SOAP_MISSING_ID:
+      *s = soap_set_validation_fault(soap, "missing id for ref ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:MissingID";
+      break;
+    case SOAP_HREF:
+      *s = soap_set_validation_fault(soap, "incompatible object ref ", soap->id);
+      break;
+    case SOAP_FAULT:
+      break;
+#ifndef WITH_NOIO
+    case SOAP_UDP_ERROR:
+      *s = "Message too large for UDP packet";
+      break;
+    case SOAP_TCP_ERROR:
+      *s = tcp_error(soap);
+      break;
+#endif
+    case SOAP_HTTP_ERROR:
+      *s = "HTTP error";
+      break;
+    case SOAP_SSL_ERROR:
+#ifdef WITH_OPENSSL
+      *s = "SSL error";
+#else
+      *s = "OpenSSL not installed: recompile with -DWITH_OPENSSL";
+#endif
+      break;
+    case SOAP_PLUGIN_ERROR:
+      *s = "Plugin registry error";
+      break;
+    case SOAP_DIME_ERROR:
+      *s = "DIME format error";
+      break;
+    case SOAP_DIME_HREF:
+      *s = "DIME href to missing attachment";
+      break;
+    case SOAP_DIME_MISMATCH:
+      *s = "DIME version/transmission error";
+      break;
+    case SOAP_DIME_END:
+      *s = "End of DIME error";
+      break;
+    case SOAP_MIME_ERROR:
+      *s = "MIME format error";
+      break;
+    case SOAP_MIME_HREF:
+      *s = "MIME href to missing attachment";
+      break;
+    case SOAP_MIME_END:
+      *s = "End of MIME error";
+      break;
+    case SOAP_ZLIB_ERROR:
+#ifdef WITH_ZLIB
+      sprintf(soap->msgbuf, "Zlib/gzip error: '%s'", soap->d_stream.msg?soap->d_stream.msg:"");
+      *s = soap->msgbuf;
+#else
+      *s = "Zlib/gzip not installed for (de)compression: recompile with -DWITH_GZIP";
+#endif
+      break;
+    case SOAP_REQUIRED:
+      *s = soap_set_validation_fault(soap, "missing required attribute", NULL);
+      break;
+    case SOAP_PROHIBITED:
+      *s = soap_set_validation_fault(soap, "prohibited attribute present", NULL);
+      break;
+    case SOAP_OCCURS:
+      *s = soap_set_validation_fault(soap, "min/maxOccurs violation", NULL);
+      break;
+    case SOAP_LENGTH:
+      *s = soap_set_validation_fault(soap, "content length violation", NULL);
+      break;
+    case SOAP_STOP:
+      *s = "Stopped: no response sent";
+      break;
+#endif
+    case SOAP_EOF:
+#ifndef WITH_NOIO
+      sprintf(soap->msgbuf, "End of file or no input: '%s'", soap_strerror(soap));
+      *s = soap->msgbuf;
+      break;
+#else
+      *s = "End of file or no input";
+      break;
+#endif
+    default:
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+      if (soap->error > 200 && soap->error < 600)
+      { sprintf(soap->msgbuf, "HTTP Error: %d %s", soap->error, http_error(soap, soap->error));
+        *s = soap->msgbuf;
+      }
+      else
+#endif
+#endif
+      { sprintf(soap->msgbuf, "Error %d", soap->error);
+        *s = soap->msgbuf;
+      }
+    }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_fault(struct soap *soap)
+{ register int status = soap->error;
+  int r = 1;
+  if (status == SOAP_STOP)
+    return status;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Sending back fault struct for error code %d\n", soap->error));
+  soap->keep_alive = 0; /* to terminate connection */
+  soap_set_fault(soap);
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+  if (soap_valid_socket(soap->socket))
+  { struct timeval timeout;
+    fd_set rfd, sfd;
+    timeout.tv_sec = 0;
+    timeout.tv_usec = 0;
+    FD_ZERO(&rfd);
+    FD_ZERO(&sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, NULL, &timeout);
+    if (r > 0)
+    { if (!FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       || (FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        && recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) < 0))
+        r = 0;
+    }
+  }
+#endif
+#endif
+  if ((status != SOAP_EOF || (!soap->recv_timeout && !soap->send_timeout)) && r > 0)
+  { soap->error = SOAP_OK;
+    soap_serializeheader(soap);
+    soap_serializefault(soap);
+    soap_begin_count(soap);
+    if (soap->mode & SOAP_IO_LENGTH)
+    { soap_envelope_begin_out(soap);
+      soap_putheader(soap);
+      soap_body_begin_out(soap);
+      soap_putfault(soap);
+      soap_body_end_out(soap);
+      soap_envelope_end_out(soap);
+    }
+    soap_end_count(soap);
+    if (soap_response(soap, status)
+     || soap_envelope_begin_out(soap)
+     || soap_putheader(soap)
+     || soap_body_begin_out(soap)
+     || soap_putfault(soap)
+     || soap_body_end_out(soap)
+     || soap_envelope_end_out(soap))
+      return soap_closesock(soap);
+    soap_end_send(soap);
+  }
+  soap->error = status;
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_fault(struct soap *soap)
+{ register int status = soap->error;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Receiving SOAP Fault\n"));
+  soap->error = SOAP_OK;
+  if (soap_getfault(soap))
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Error: soap_get_soapfault() failed. Is this a SOAP message at all?\n"));
+    *soap_faultcode(soap) = (soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client");
+    soap->error = status;
+    soap_set_fault(soap);
+  }
+  else
+  { register const char *s = *soap_faultcode(soap);
+    if (!soap_match_tag(soap, s, "SOAP-ENV:Server") || !soap_match_tag(soap, s, "SOAP-ENV:Receiver"))
+      status = SOAP_SVR_FAULT; 
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:Client") || !soap_match_tag(soap, s, "SOAP-ENV:Sender"))
+      status = SOAP_CLI_FAULT;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:MustUnderstand"))
+      status = SOAP_MUSTUNDERSTAND;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:VersionMismatch"))
+      status = SOAP_VERSIONMISMATCH;
+    else
+    { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Fault code %s\n", s));
+      status = SOAP_FAULT;
+    }
+    if (soap_body_end_in(soap)
+     || soap_envelope_end_in(soap)
+     || soap_end_recv(soap))
+      return soap_closesock(soap);
+    soap->error = status;
+  }
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_empty_response(struct soap *soap)
+{ soap->count = 0;
+  if (soap_response(soap, SOAP_OK) || soap_end_send(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_empty_response(struct soap *soap)
+{ if (soap_begin_recv(soap) || soap_end_recv(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+soap_strerror(struct soap *soap)
+{ register int err = soap->errnum;
+  if (err)
+  {
+#ifndef WIN32
+    return strerror(err);
+#else
+    FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, (LPTSTR)&soap->errorstr, sizeof(soap->errorstr), NULL);
+    return soap->errorstr;
+#endif
+  }
+  return "Operation interrupted or timed out";
+}
+#endif
+#endif 
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_set_error(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail, int soaperror)
+{ *soap_faultcode(soap) = faultcode;
+  if (faultsubcode)
+    *soap_faultsubcode(soap) = faultsubcode;
+  *soap_faultstring(soap) = faultstring;
+  if (faultdetail && *faultdetail)
+  { register const char **s = soap_faultdetail(soap);
+    if (s)
+      *s = faultdetail;
+  }
+  return soap->error = soaperror;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_sender_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_receiver_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_copy_fault(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ char *r = NULL, *s = NULL, *t = NULL;
+  if (faultsubcode)
+    r = soap_strdup(soap, faultsubcode);
+  if (faultstring)
+    s = soap_strdup(soap, faultstring);
+  if (faultdetail)
+    t = soap_strdup(soap, faultdetail);
+  return soap_set_error(soap, faultcode, r, s, t, SOAP_FAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_sender_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_receiver_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault(struct soap *soap, FILE *fd)
+{ if (soap_check_state(soap))
+    fprintf(fd, "Error: soap struct not initialized\n");
+  else if (soap->error)
+  { const char *c, *v = NULL, *s, **d;
+    d = soap_faultcode(soap);
+    if (!*d)
+      soap_set_fault(soap);
+    c = *d;
+    if (soap->version == 2)
+      v = *soap_faultsubcode(soap);
+    s = *soap_faultstring(soap);
+    d = soap_faultdetail(soap);
+    fprintf(fd, "%s%d fault: %s [%s]\n\"%s\"\nDetail: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, c, v ? v : "no subcode", s ? s : "[no reason]", d && *d ? *d : "[no detail]");
+  }
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault_location(struct soap *soap, FILE *fd)
+{ 
+#ifndef WITH_LEAN
+  int i, j, c1, c2;
+  if (soap->error && soap->buflen > 0)
+  { i = (int)soap->bufidx - 1;
+    if (i <= 0)
+      i = 0;
+    c1 = soap->buf[i];
+    soap->buf[i] = '\0';
+    if ((int)soap->buflen >= i + 1024)
+      j = i + 1023;
+    else
+      j = (int)soap->buflen - 1;
+    c2 = soap->buf[j];
+    soap->buf[j] = '\0';
+    fprintf(fd, "%s%c\n** HERE **\n", soap->buf, c1);
+    if (soap->bufidx < soap->buflen)
+      fprintf(fd, "%s\n", soap->buf + soap->bufidx);
+    soap->buf[i] = c1;
+    soap->buf[j] = c2;
+  }
+#endif
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void *arg)
+{ register struct soap_plugin *p;
+  register int r;
+  if (!(p = (struct soap_plugin*)SOAP_MALLOC(soap, sizeof(struct soap_plugin))))
+    return soap->error = SOAP_EOM;
+  p->id = NULL;
+  p->data = NULL;
+  p->fcopy = NULL;
+  p->fdelete = NULL;
+  r = fcreate(soap, p, arg);
+  if (!r && p->fdelete)
+  { p->next = soap->plugins;
+    soap->plugins = p;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Registered '%s' plugin\n", p->id));
+    return SOAP_OK;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not register plugin '%s': plugin returned error %d (or fdelete callback not set)\n", p->id?p->id:"?", r));
+  SOAP_FREE(soap, p);
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static void *
+fplugin(struct soap *soap, const char *id)
+{ register struct soap_plugin *p;
+  for (p = soap->plugins; p; p = p->next)
+    if (p->id == id || !strcmp(p->id, id))
+      return p->data;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void *
+SOAP_FMAC2
+soap_lookup_plugin(struct soap *soap, const char *id)
+{ return soap->fplugin(soap, id);
+}
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap()
+{ soap_init(this);
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	C++ soap struct methods
+ *
+\******************************************************************************/
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode mode)
+{ soap_init1(this, mode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode imode, soap_mode omode)
+{ soap_init2(this, imode, omode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(struct soap& soap)
+{ soap_copy_context(this, &soap);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::~soap()
+{ soap_destroy(this);
+  soap_end(this);
+  soap_done(this);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/gsoap-palm/stdsoap2.c b/gsoap-palm/stdsoap2.c
new file mode 100644
index 0000000..dbed460
--- /dev/null
+++ b/gsoap-palm/stdsoap2.c
@@ -0,0 +1,13448 @@
+/*
+
+stdsoap2.c[pp] 2.7.6e
+
+gSOAP runtime
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+Contributors:
+
+Wind River Systems Inc., for the following additions under gSOAP public license:
+  - vxWorks compatible	(#define VXWORKS)
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+Installation note:
+
+Win32 build needs winsock.dll (Visual C++ "wsock32.lib")
+To do this in Visual C++ 6.0, go to "Project", "settings", select the "Link"
+tab (the project file needs to be selected in the file view) and add
+"wsock32.lib" to the "Object/library modules" entry
+
+On Mac OS X with gcc (GCC) 3.1 20020420 (prerelease) you MUST compile with
+-fstack_check when using -O2 because gcc 3.1 has a bug that smashes the stack
+when locally allocated data exceeds 64K.
+
+*/
+
+#ifdef AS400
+# pragma convert(819)	/* EBCDIC to ASCII */
+#endif
+
+#include "stdsoap2.h"
+
+#ifdef __cplusplus
+SOAP_SOURCE_STAMP("@(#) stdsoap2.cpp ver 2.7.6e 2006-02-18 12:00:00 GMT")
+extern "C" {
+#else
+SOAP_SOURCE_STAMP("@(#) stdsoap2.c ver 2.7.6e 2006-02-18 12:00:00 GMT")
+#endif
+
+/* 8bit character representing unknown/nonrepresentable character data (e.g. not supported by current locale with multibyte support enabled) */
+#ifndef SOAP_UNKNOWN_CHAR
+#define SOAP_UNKNOWN_CHAR (127)
+#endif
+
+/*      EOF=-1 */
+#define SOAP_LT (soap_wchar)(-2) /* XML character '<' */
+#define SOAP_TT (soap_wchar)(-3) /* XML character '</' */
+#define SOAP_GT (soap_wchar)(-4) /* XML character '>' */
+#define SOAP_QT (soap_wchar)(-5) /* XML character '"' */
+#define SOAP_AP (soap_wchar)(-6) /* XML character ''' */
+
+#define soap_blank(c)		((c) >= 0 && (c) <= 32)
+#define soap_notblank(c)	((c) > 32)
+#define soap_hash_ptr(p)	(((unsigned long)(p) >> 3) & (SOAP_PTRHASH - 1))
+
+#ifdef SOAP_DEBUG
+static void soap_init_logs(struct soap*);
+static void soap_close_logfile(struct soap*, int);
+static void soap_set_logfile(struct soap*, int, const char*);
+static void soap_free_mht(struct soap*);
+static void soap_track_unlink(struct soap*, const void*);
+#endif
+
+#ifndef PALM_2
+static int soap_set_error(struct soap*, const char*, const char*, const char*, const char*, int);
+static int soap_copy_fault(struct soap*, const char*, const char*, const char*, const char*);
+static int soap_getattrval(struct soap*, char*, size_t, soap_wchar);
+#endif
+
+#ifndef PALM_1
+static soap_wchar soap_char(struct soap*);
+static soap_wchar soap_get_pi(struct soap*);
+static int soap_isxdigit(int);
+static void *fplugin(struct soap*, const char*);
+#ifndef WITH_NOIDREF
+static void soap_update_ptrs(struct soap*, char*, char*, char*, char*);
+static int soap_has_copies(struct soap*, const char*, const char*);
+static void soap_init_iht(struct soap*);
+static void soap_free_iht(struct soap*);
+static void soap_init_pht(struct soap*);
+static void soap_free_pht(struct soap*);
+#endif
+#endif
+
+#ifndef WITH_LEAN
+static const char *soap_set_validation_fault(struct soap*, const char*, const char*);
+static int soap_isnumeric(struct soap*, const char*);
+static time_t soap_timegm(struct tm*);
+static struct soap_nlist *soap_lookup_ns(struct soap *soap, const char *tag, size_t n);
+static struct soap_nlist *soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized);
+static void soap_pop_ns(struct soap *soap);
+static void soap_utilize_ns(struct soap *soap, const char *tag, size_t n);
+#endif
+
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart *soap_new_multipart(struct soap*, struct soap_multipart**, struct soap_multipart**, char*, size_t);
+static int soap_putdimefield(struct soap*, const char*, size_t);
+static char *soap_getdimefield(struct soap*, size_t);
+static void soap_select_mime_boundary(struct soap*);
+static int soap_valid_mime_boundary(struct soap*);
+static int soap_match_cid(struct soap*, const char*, const char*);
+static void soap_resolve_attachment(struct soap*, struct soap_multipart*);
+#endif
+#endif
+
+#ifdef WITH_GZIP
+static int soap_getgziphdr(struct soap*);
+#endif
+
+#ifdef WITH_OPENSSL
+static int ssl_init_done = 0;
+static int ssl_auth_init(struct soap*);
+static int ssl_verify_callback(int, X509_STORE_CTX*);
+static int ssl_password(char*, int, int, void *);
+static const char *ssl_error(struct soap*, int);
+/* This callback is included for future references. It should not be deleted
+static DH *ssl_tmp_dh(SSL*, int, int);
+*/
+#endif
+
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char *soap_decode(char*, size_t, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar soap_getchunkchar(struct soap*);
+static const char *http_error(struct soap*, int);
+static int http_post(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
+static int http_get(struct soap*);
+static int http_send_header(struct soap*, const char*);
+static int http_post_header(struct soap*, const char*, const char*);
+static int http_response(struct soap*, int, size_t);
+static int http_parse(struct soap*);
+static int http_parse_header(struct soap*, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int fsend(struct soap*, const char*, size_t);
+static size_t frecv(struct soap*, char*, size_t);
+static int tcp_init(struct soap*);
+static const char *tcp_error(struct soap*);
+#ifndef WITH_IPV6
+static int tcp_gethost(struct soap*, const char *addr, struct in_addr *inaddr);
+#endif
+static int tcp_connect(struct soap*, const char *endpoint, const char *host, int port);
+static int tcp_accept(struct soap*, int, struct sockaddr*, int*);
+static int tcp_disconnect(struct soap*);
+static int tcp_closesocket(struct soap*, SOAP_SOCKET);
+static int tcp_shutdownsocket(struct soap*, SOAP_SOCKET, int);
+static const char *soap_strerror(struct soap*);
+#endif
+#endif
+
+#if defined(PALM) && !defined(PALM_2)
+unsigned short errno;
+#endif
+
+#ifndef PALM_1
+static const char soap_env1[42] = "http://schemas.xmlsoap.org/soap/envelope/";
+static const char soap_enc1[42] = "http://schemas.xmlsoap.org/soap/encoding/";
+static const char soap_env2[40] = "http://www.w3.org/2003/05/soap-envelope";
+static const char soap_enc2[40] = "http://www.w3.org/2003/05/soap-encoding";
+static const char soap_rpc[35] = "http://www.w3.org/2003/05/soap-rpc";
+#endif
+
+#ifndef PALM_1
+const struct soap_double_nan soap_double_nan = {0xFFFFFFFF, 0xFFFFFFFF};
+static const char soap_base64o[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+static const char soap_base64i[81] = "\76XXX\77\64\65\66\67\70\71\72\73\74\75XXXXXXX\00\01\02\03\04\05\06\07\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31XXXXXX\32\33\34\35\36\37\40\41\42\43\44\45\46\47\50\51\52\53\54\55\56\57\60\61\62\63";
+#endif
+
+#ifndef WITH_LEAN
+static const char soap_indent[11] = "\n\t\t\t\t\t\t\t\t\t";
+/* Alternative indentation form for SOAP_XML_INDENT:
+static const char soap_indent[21] = "\n                   ";
+*/
+#endif
+
+static const char soap_padding[4] = "\0\0\0";
+#define SOAP_STR_PADDING (soap_padding)
+#define SOAP_STR_EOS (soap_padding)
+#define SOAP_NON_NULL (soap_padding)
+
+#ifndef WITH_LEAN
+static const struct soap_code_map html_entity_codes[] = /* entities for XHTML parsing */
+{ { 160, "nbsp" },
+  { 161, "iexcl" },
+  { 162, "cent" },
+  { 163, "pound" },
+  { 164, "curren" },
+  { 165, "yen" },
+  { 166, "brvbar" },
+  { 167, "sect" },
+  { 168, "uml" },
+  { 169, "copy" },
+  { 170, "ordf" },
+  { 171, "laquo" },
+  { 172, "not" },
+  { 173, "shy" },
+  { 174, "reg" },
+  { 175, "macr" },
+  { 176, "deg" },
+  { 177, "plusmn" },
+  { 178, "sup2" },
+  { 179, "sup3" },
+  { 180, "acute" },
+  { 181, "micro" },
+  { 182, "para" },
+  { 183, "middot" },
+  { 184, "cedil" },
+  { 185, "sup1" },
+  { 186, "ordm" },
+  { 187, "raquo" },
+  { 188, "frac14" },
+  { 189, "frac12" },
+  { 190, "frac34" },
+  { 191, "iquest" },
+  { 192, "Agrave" },
+  { 193, "Aacute" },
+  { 194, "Acirc" },
+  { 195, "Atilde" },
+  { 196, "Auml" },
+  { 197, "Aring" },
+  { 198, "AElig" },
+  { 199, "Ccedil" },
+  { 200, "Egrave" },
+  { 201, "Eacute" },
+  { 202, "Ecirc" },
+  { 203, "Euml" },
+  { 204, "Igrave" },
+  { 205, "Iacute" },
+  { 206, "Icirc" },
+  { 207, "Iuml" },
+  { 208, "ETH" },
+  { 209, "Ntilde" },
+  { 210, "Ograve" },
+  { 211, "Oacute" },
+  { 212, "Ocirc" },
+  { 213, "Otilde" },
+  { 214, "Ouml" },
+  { 215, "times" },
+  { 216, "Oslash" },
+  { 217, "Ugrave" },
+  { 218, "Uacute" },
+  { 219, "Ucirc" },
+  { 220, "Uuml" },
+  { 221, "Yacute" },
+  { 222, "THORN" },
+  { 223, "szlig" },
+  { 224, "agrave" },
+  { 225, "aacute" },
+  { 226, "acirc" },
+  { 227, "atilde" },
+  { 228, "auml" },
+  { 229, "aring" },
+  { 230, "aelig" },
+  { 231, "ccedil" },
+  { 232, "egrave" },
+  { 233, "eacute" },
+  { 234, "ecirc" },
+  { 235, "euml" },
+  { 236, "igrave" },
+  { 237, "iacute" },
+  { 238, "icirc" },
+  { 239, "iuml" },
+  { 240, "eth" },
+  { 241, "ntilde" },
+  { 242, "ograve" },
+  { 243, "oacute" },
+  { 244, "ocirc" },
+  { 245, "otilde" },
+  { 246, "ouml" },
+  { 247, "divide" },
+  { 248, "oslash" },
+  { 249, "ugrave" },
+  { 250, "uacute" },
+  { 251, "ucirc" },
+  { 252, "uuml" },
+  { 253, "yacute" },
+  { 254, "thorn" },
+  { 255, "yuml" },
+  {   0, NULL }
+};
+#endif
+
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+static const struct soap_code_map h_error_codes[] =
+{
+#ifdef HOST_NOT_FOUND   
+  { HOST_NOT_FOUND, "Host not found" },
+#endif
+#ifdef TRY_AGAIN
+  { TRY_AGAIN, "Try Again" },
+#endif
+#ifdef NO_RECOVERY  
+  { NO_RECOVERY, "No Recovery" },
+#endif
+#ifdef NO_DATA
+  { NO_DATA, "No Data" },
+#endif
+#ifdef NO_ADDRESS
+  { NO_ADDRESS, "No Address" },
+#endif
+  { 0, NULL }
+};
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+static const struct soap_code_map h_http_error_codes[] =
+{ { 201, "Created" },
+  { 202, "Accepted" },
+  { 203, "Non-Authoritative Information" },
+  { 204, "No Content" },
+  { 205, "Reset Content" },
+  { 206, "Partial Content" },
+  { 300, "Multiple Choices" },
+  { 301, "Moved Permanently" },
+  { 302, "Found" },
+  { 303, "See Other" },
+  { 304, "Not Modified" },
+  { 305, "Use Proxy" },
+  { 307, "Temporary Redirect" },
+  { 400, "Bad Request" },
+  { 401, "Unauthorized" },
+  { 402, "Payment Required" },
+  { 403, "Forbidden" },
+  { 404, "Not Found" },
+  { 405, "Method Not Allowed" },
+  { 406, "Not Acceptable" },
+  { 407, "Proxy Authentication Required" },
+  { 408, "Request Time-out" },
+  { 409, "Conflict" },
+  { 410, "Gone" },
+  { 411, "Length Required" },
+  { 412, "Precondition Failed" },
+  { 413, "Request Entity Too Large" },
+  { 414, "Request-URI Too Large" },
+  { 415, "Unsupported Media Type" },
+  { 416, "Requested range not satisfiable" },
+  { 417, "Expectation Failed" },
+  { 500, "Internal Server Error" },
+  { 501, "Not Implemented" },
+  { 502, "Bad Gateway" },
+  { 503, "Service Unavailable" },
+  { 504, "Gateway Time-out" },
+  { 505, "HTTP Version not supported" },
+  {   0, NULL }
+};
+#endif
+#endif
+
+#ifdef WITH_OPENSSL
+static const struct soap_code_map h_ssl_error_codes[] =
+{
+#define _SSL_ERROR(e) { e, #e }
+  _SSL_ERROR(SSL_ERROR_SSL),
+  _SSL_ERROR(SSL_ERROR_ZERO_RETURN),
+  _SSL_ERROR(SSL_ERROR_WANT_READ),
+  _SSL_ERROR(SSL_ERROR_WANT_WRITE),
+  _SSL_ERROR(SSL_ERROR_WANT_CONNECT),
+  _SSL_ERROR(SSL_ERROR_WANT_X509_LOOKUP),
+  _SSL_ERROR(SSL_ERROR_SYSCALL),
+  { 0, NULL }
+};
+#endif
+
+#ifndef WITH_LEANER
+static const struct soap_code_map mime_codes[] =
+{ { SOAP_MIME_7BIT,		"7bit" },
+  { SOAP_MIME_8BIT,		"8bit" },
+  { SOAP_MIME_BINARY,		"binary" },
+  { SOAP_MIME_QUOTED_PRINTABLE, "quoted-printable" },
+  { SOAP_MIME_BASE64,		"base64" },
+  { SOAP_MIME_IETF_TOKEN,	"ietf-token" },
+  { SOAP_MIME_X_TOKEN,		"x-token" },
+  { 0,				NULL }
+};
+#endif
+
+#ifdef WIN32
+static int tcp_done = 0;
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+fsend(struct soap *soap, const char *s, size_t n)
+{ register int nwritten;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  if (soap->os)
+  { soap->os->write(s, n);
+    if (soap->os->good())
+      return SOAP_OK;
+    return SOAP_EOF;
+  }
+#endif
+  while (n)
+  { if (soap_valid_socket(soap->socket))
+    { 
+#ifndef WITH_LEAN
+      if (soap->send_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->send_timeout > 0)
+        { timeout.tv_sec = soap->send_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->send_timeout/1000000;
+          timeout.tv_usec = -soap->send_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { register int r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            return SOAP_EOF;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+          { soap->errnum = soap_socket_errno;
+            return SOAP_EOF;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+        nwritten = SSL_write(soap->ssl, s, n);
+      else if (soap->bio)
+        nwritten = BIO_write(soap->bio, s, n);
+      else
+#endif
+#ifdef WITH_UDP
+      if ((soap->omode & SOAP_IO_UDP))
+      { if (soap->peerlen)
+	  nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+        else
+	  nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	/* retry and back-off algorithm */
+	/* TODO: this is not very clear from specs so verify and limit conditions under which we should loop (e.g. ENOBUFS) */
+	if (nwritten < 0)
+        { struct timeval timeout;
+          fd_set fd;
+	  int udp_repeat;
+	  int udp_delay;
+          if ((soap->connect_flags & SO_BROADCAST))
+	    udp_repeat = 3; /* SOAP-over-UDP MULTICAST_UDP_REPEAT - 1 */
+          else
+	    udp_repeat = 1; /* SOAP-over-UDP UNICAST_UDP_REPEAT - 1 */
+	  udp_delay = (soap_random % 201) + 50; /* UDP_MIN_DELAY .. UDP_MAX_DELAY */
+	  do
+          { timeout.tv_sec = 0;
+            timeout.tv_usec = 1000 * udp_delay; /* ms */
+            FD_ZERO(&fd);
+            FD_SET((SOAP_SOCKET)soap->socket, &fd);
+            select((SOAP_SOCKET)(soap->socket + 1), NULL, NULL, &fd, &timeout);
+	    if (soap->peerlen)
+	      nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+            else
+	      nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	    udp_delay <<= 1;
+	    if (udp_delay > 500) /* UDP_UPPER_DELAY */
+	      udp_delay = 500;
+	  }
+	  while (nwritten < 0 && --udp_repeat > 0);
+	}
+      }
+      else
+#endif
+#if !defined(PALM) && !defined(AS400)
+        nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+#else
+        nwritten = send((SOAP_SOCKET)soap->socket, (void*)s, n, soap->socket_flags);
+#endif
+      if (nwritten <= 0)
+      {
+#ifdef WITH_OPENSSL
+	int err;
+        if (soap->ssl && (err = SSL_get_error(soap->ssl, nwritten)) != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return SOAP_EOF;
+#endif
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EWOULDBLOCK && soap_socket_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_socket_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    else
+    {
+#ifdef WITH_FASTCGI
+      nwritten = fwrite((void*)s, 1, n, stdout);
+      fflush(stdout);
+#else
+#ifdef UNDER_CE
+      nwritten = fwrite(s, 1, n, soap->sendfd);
+#else
+#ifdef VXWORKS
+#ifdef WMW_RPM_IO
+      if (soap->rpmreqid)
+        nwritten = (httpBlockPut(soap->rpmreqid, s, n) == 0) ? n : -1; 
+      else
+#endif
+        nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w"));
+#else
+      nwritten = write((SOAP_SOCKET)soap->sendfd, s, n);
+#endif
+#endif
+#endif
+      if (nwritten <= 0)
+      { if (soap_errno != SOAP_EINTR && soap_errno != SOAP_EWOULDBLOCK && soap_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    n -= nwritten;
+    s += nwritten;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_raw(struct soap *soap, const char *s, size_t n)
+{ if (!n)
+    return SOAP_OK;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { soap->count += n;
+#ifndef WITH_LEANER
+    if (soap->fpreparesend && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+  if (soap->mode & SOAP_IO)
+  { register size_t i = SOAP_BUFLEN - soap->bufidx;
+    while (n >= i)
+    { memcpy(soap->buf + soap->bufidx, s, i);
+      soap->bufidx = SOAP_BUFLEN;
+      if (soap_flush(soap))
+        return soap->error;
+      s += i;
+      n -= i;
+      i = SOAP_BUFLEN;
+    }
+    memcpy(soap->buf + soap->bufidx, s, n);
+    soap->bufidx += n;
+    return SOAP_OK;
+  }
+  return soap_flush_raw(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush(struct soap *soap)
+{ register int n = soap->bufidx;
+  if (n)
+  { soap->bufidx = 0;
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { soap->d_stream.next_in = (Byte*)soap->buf;
+      soap->d_stream.avail_in = (unsigned int)n;
+#ifdef WITH_GZIP
+      soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)n);
+#endif
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating %u bytes\n", soap->d_stream.avail_in));
+        if (deflate(&soap->d_stream, Z_NO_FLUSH) != Z_OK)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+          return soap->error = SOAP_ZLIB_ERROR;
+        }
+        if (!soap->d_stream.avail_out)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN))
+            return soap->error;
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (soap->d_stream.avail_in);
+    }
+    else
+#endif
+      return soap_flush_raw(soap, soap->buf, n);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush_raw(struct soap *soap, const char *s, size_t n)
+{ if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+  { register char *t;
+    if (!(t = (char*)soap_push_block(soap, n)))
+      return soap->error = SOAP_EOM;
+    memcpy(t, s, n);
+#ifndef WITH_LEANER
+    if (soap->fpreparesend)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+  { char t[16];
+    sprintf(t, "\r\n%lX\r\n" + (soap->chunksize ? 0 : 2), (unsigned long)n);
+    DBGMSG(SENT, t, strlen(t));
+    if ((soap->error = soap->fsend(soap, t, strlen(t))))
+      return soap->error;
+    soap->chunksize += n;
+  }
+  DBGMSG(SENT, s, n);
+#endif
+  return soap->error = soap->fsend(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send(struct soap *soap, const char *s)
+{ if (s)
+    return soap_send_raw(soap, s, strlen(s));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send2(struct soap *soap, const char *s1, const char *s2)
+{ if (soap_send(soap, s1))
+    return soap->error;
+  return soap_send(soap, s2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send3(struct soap *soap, const char *s1, const char *s2, const char *s3)
+{ if (soap_send(soap, s1)
+   || soap_send(soap, s2))
+    return soap->error;
+  return soap_send(soap, s3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static size_t
+frecv(struct soap *soap, char *s, size_t n)
+{ register int r;
+  soap->errnum = 0;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  if (soap->is)
+  { if (soap->is->good())
+      return soap->is->read(s, n).gcount();
+    return 0;
+  }
+#endif
+  if (soap_valid_socket(soap->socket))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->recv_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->recv_timeout > 0)
+        { timeout.tv_sec = soap->recv_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->recv_timeout/1000000;
+          timeout.tv_usec = -soap->recv_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+	  { soap->errnum = 0;
+            return 0;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+	  { soap->errnum = soap_socket_errno;
+            return 0;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+      { int err;
+	r = SSL_read(soap->ssl, s, n);
+        if (r > 0)
+          return (size_t)r;
+	err = SSL_get_error(soap->ssl, r);
+	if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return 0;
+      }
+      else if (soap->bio)
+      { r = BIO_read(soap->bio, s, n);
+        if (r > 0)
+          return (size_t)r;
+        return 0;
+      }
+      else
+#endif
+      { 
+#ifdef WITH_UDP
+        if ((soap->omode & SOAP_IO_UDP))
+        { SOAP_SOCKLEN_T k = (SOAP_SOCKLEN_T)sizeof(soap->peer);
+	  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+          r = recvfrom((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, &k);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+	  soap->peerlen = (size_t)k;
+#ifndef WITH_IPV6
+          soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+          soap->port = (int)ntohs(soap->peer.sin_port);
+#endif
+        }
+	else
+#endif
+          r = recv((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+        if (r >= 0)
+          return (size_t)r;
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN && soap_socket_errno != SOAP_EWOULDBLOCK)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#ifndef WITH_LEAN
+      { struct timeval timeout;
+        fd_set fd;
+        timeout.tv_sec = 0;
+        timeout.tv_usec = 10000;
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+#ifdef WITH_OPENSSL
+        if (soap->ssl && SSL_get_error(soap->ssl, r) == SSL_ERROR_WANT_WRITE)
+          r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+        else
+          r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#else
+        r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#endif
+        if (r < 0 && soap_socket_errno != SOAP_EINTR)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#endif
+    }
+  }
+#ifdef WITH_FASTCGI
+  return fread(s, 1, n, stdin);
+#else
+#ifdef UNDER_CE
+  return fread(s, 1, n, soap->recvfd);
+#else
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    r = httpBlockRead(soap->rpmreqid, s, n);
+  else
+#endif
+  r = read((SOAP_SOCKET)soap->recvfd, s, n);
+  if (r >= 0)
+    return (size_t)r;
+  soap->errnum = soap_errno;
+  return 0;
+#endif
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar
+soap_getchunkchar(struct soap *soap)
+{ if (soap->bufidx < soap->buflen)
+    return soap->buf[soap->bufidx++];
+  soap->bufidx = 0;
+  soap->buflen = soap->chunkbuflen = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)soap->buflen, soap->socket));
+  DBGMSG(RECV, soap->buf, soap->buflen);
+  if (soap->buflen)
+    return soap->buf[soap->bufidx++];
+  return EOF;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+soap_isxdigit(int c)
+{ return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f');
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_raw(struct soap *soap)
+{ register size_t ret;
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { if (soap->d_stream.next_out == Z_NULL)
+      return EOF;
+    if (soap->d_stream.avail_in || !soap->d_stream.avail_out)
+    { register int r;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflating\n"));
+      soap->d_stream.next_out = (Byte*)soap->buf;
+      soap->d_stream.avail_out = SOAP_BUFLEN;
+      r = inflate(&soap->d_stream, Z_NO_FLUSH);
+      if (r == Z_OK || r == Z_STREAM_END)
+      { soap->bufidx = 0;
+        soap->buflen = SOAP_BUFLEN - soap->d_stream.avail_out;
+        if (soap->zlib_in == SOAP_ZLIB_GZIP)
+          soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+        if (r == Z_STREAM_END)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+          soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+          soap->d_stream.next_out = Z_NULL;
+        }
+        if (soap->buflen)
+        { soap->count += soap->buflen;
+          return SOAP_OK;
+        }
+      }
+      else if (r != Z_BUF_ERROR)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate error: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        soap->d_stream.next_out = Z_NULL;
+	soap->error = SOAP_ZLIB_ERROR;
+        return EOF;
+      }
+    }
+zlib_again:
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK && !soap->chunksize)
+    { memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+      soap->buflen = soap->z_buflen;
+    }
+  }
+#endif
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) /* read HTTP chunked transfer */
+  { 
+chunk_again:
+    if (soap->chunksize)
+    { soap->buflen = ret = soap->frecv(soap, soap->buf, soap->chunksize > SOAP_BUFLEN ? SOAP_BUFLEN : soap->chunksize);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk: read %u bytes\n", (unsigned int)ret));
+      DBGMSG(RECV, soap->buf, ret);
+      soap->bufidx = 0;
+      soap->chunksize -= ret;
+    }
+    else
+    { register soap_wchar c;
+      char *t, tmp[8];
+      t = tmp;
+      if (!soap->chunkbuflen)
+      { soap->chunkbuflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes (chunked) from socket %d\n", (unsigned int)ret, soap->socket));
+        DBGMSG(RECV, soap->buf, ret);
+        soap->bufidx = 0;
+        if (!ret)
+          return soap->ahead = EOF;
+      }
+      else
+        soap->bufidx = soap->buflen;
+      soap->buflen = soap->chunkbuflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk size (idx=%u len=%u)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen));
+      while (!soap_isxdigit((int)(c = soap_getchunkchar(soap))))
+        if ((int)c == EOF)
+	  return soap->ahead = EOF;
+      do
+        *t++ = (char)c;
+      while (soap_isxdigit((int)(c = soap_getchunkchar(soap))) && t - tmp < 7);
+      while ((int)c != EOF && c != '\n')
+        c = soap_getchunkchar(soap);
+      if ((int)c == EOF)
+        return soap->ahead = EOF;
+      *t = '\0';
+      soap->chunksize = soap_strtoul(tmp, &t, 16);
+      if (!soap->chunksize)
+      { soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of chunked message\n"));
+	while ((int)c != EOF && c != '\n')
+          c = soap_getchunkchar(soap);
+        return soap->ahead = EOF;
+      }
+      soap->buflen = soap->bufidx + soap->chunksize;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving buf len to idx=%u len=%u (%s)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen, tmp));
+      if (soap->buflen > soap->chunkbuflen)
+      { soap->buflen = soap->chunkbuflen;
+        soap->chunksize -= soap->buflen - soap->bufidx;
+        soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Passed end of buffer for chunked HTTP (%u bytes left)\n", (unsigned int)(soap->buflen - soap->bufidx)));
+      }
+      else if (soap->chunkbuflen)
+        soap->chunksize = 0;
+      ret = soap->buflen - soap->bufidx;
+      if (!ret)
+        goto chunk_again;
+    }
+  }
+  else
+#endif
+  { soap->bufidx = 0;
+    soap->buflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)ret, soap->socket));
+    DBGMSG(RECV, soap->buf, ret);
+  }
+#ifndef WITH_LEANER
+  if (soap->fpreparerecv && (soap->error = soap->fpreparerecv(soap, soap->buf, ret)))
+    return soap->error;
+#endif
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { register int r;
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = (unsigned int)ret;
+    soap->d_stream.next_out = (Byte*)soap->buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    r = inflate(&soap->d_stream, Z_NO_FLUSH);
+    if (r == Z_OK || r == Z_STREAM_END)
+    { soap->bufidx = 0;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = ret = SOAP_BUFLEN - soap->d_stream.avail_out;
+      if (soap->zlib_in == SOAP_ZLIB_GZIP)
+        soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %u bytes\n", (unsigned int)ret));
+      if (!ret)
+        goto zlib_again;
+      if (r == Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+        soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+        soap->d_stream.next_out = Z_NULL;
+      }
+    }
+    else
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to inflate: (%d) %s\n", r, soap->d_stream.msg?soap->d_stream.msg:""));
+      soap->d_stream.next_out = Z_NULL;
+      soap->error = SOAP_ZLIB_ERROR;
+      return EOF;
+    }
+  }
+#endif
+  soap->count += ret;
+  return !ret;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap->dime.buflen)
+    { char *s;
+      int i;
+      unsigned char tmp[12];
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME hdr for chunked DIME is in buffer\n"));
+      soap->count += soap->dime.buflen - soap->buflen;
+      soap->buflen = soap->dime.buflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Skip padding (%ld bytes)\n", -(long)soap->dime.size&3));
+      for (i = -(long)soap->dime.size&3; i > 0; i--)
+      { soap->bufidx++;
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME hdr for next chunk\n"));
+      s = (char*)tmp;
+      for (i = 12; i > 0; i--)
+      { *s++ = soap->buf[soap->bufidx++];
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      soap->dime.flags = tmp[0] & 0x7;
+      soap->dime.size = ((size_t)tmp[8] << 24) | ((size_t)tmp[9] << 16) | ((size_t)tmp[10] << 8) | ((size_t)tmp[11]);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME chunk (%u bytes)\n", (unsigned int)soap->dime.size));
+      if (soap->dime.flags & SOAP_DIME_CF)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "More chunking\n"));
+        soap->dime.chunksize = soap->dime.size;
+        if (soap->buflen - soap->bufidx >= soap->dime.size)
+        { soap->dime.buflen = soap->buflen;
+          soap->buflen = soap->bufidx + soap->dime.chunksize;
+        }
+        else
+          soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      }
+      else
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Last chunk\n"));
+        soap->dime.buflen = 0;
+        soap->dime.chunksize = 0;
+      }
+      soap->count = soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%u bytes remaining\n", (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+    if (soap->dime.chunksize)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get next DIME hdr for chunked DIME (%u bytes chunk)\n", (unsigned int)soap->dime.chunksize));
+      if (soap_recv_raw(soap))
+        return EOF;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->count -= soap->buflen - soap->bufidx - soap->dime.chunksize;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%lu bytes remaining, count=%u\n", (unsigned long)(soap->buflen-soap->bufidx), (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+  }
+#endif
+  return soap_recv_raw(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getchar(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+    return c;
+  }
+  return soap_get1(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const struct soap_code_map*
+SOAP_FMAC2
+soap_code(const struct soap_code_map *map, const char *str)
+{ if (str)
+  { while (map->string)
+    { if (!strcmp(str, map->string)) /* case sensitive */
+        return map;
+      map++;
+    }
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_int_code(const struct soap_code_map *map, const char *str, long other)
+{ while (map->string)
+  { if (!soap_tag_cmp(str, map->string)) /* case insensitive */
+      return map->code;
+    map++;
+  }
+  return other;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_str_code(const struct soap_code_map *map, long code)
+{ while (map->code != code && map->string)
+    map++;
+  return map->string;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_char(struct soap *soap)
+{ char tmp[8];
+  register int i;
+  register soap_wchar c;
+  register char *s = tmp;
+  for (i = 0; i < 7; i++)
+  { c = soap_get1(soap);
+    if (c == ';' || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+  }
+  *s = '\0';
+  if (*tmp == '#')
+  { if (tmp[1] == 'x' || tmp[1] == 'X')
+      return soap_strtol(tmp + 2, NULL, 16);
+    return atol(tmp + 1);
+  }
+  if (!strcmp(tmp, "lt"))
+    return '<';
+  if (!strcmp(tmp, "gt"))
+    return '>';
+  if (!strcmp(tmp, "amp"))
+    return '&';
+  if (!strcmp(tmp, "quot"))
+    return '"';
+  if (!strcmp(tmp, "apos"))
+    return '\'';
+#ifndef WITH_LEAN
+  return (soap_wchar)soap_int_code(html_entity_codes, tmp, SOAP_UNKNOWN_CHAR);
+#else
+  return SOAP_UNKNOWN_CHAR; /* use this to represent unknown code */
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get0(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx];
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get1(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx++];
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_get(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+  }
+  else
+    c = soap_get1(soap);
+  for (;;)
+  { if (soap->cdata)
+    { if (c == ']')
+      { c = soap_get1(soap);
+        if (c == ']')
+        { soap->cdata = 0;
+          soap_get1(soap); /* skip > */
+          c = soap_get1(soap);
+        }
+	else
+        { soap_revget1(soap);
+          return ']';
+        }
+      }
+      else
+        return c;
+    }
+    switch (c)
+    { case '<':
+        do c = soap_get1(soap);
+        while (soap_blank(c));
+        if (c == '!' || c == '?' || c == '%')
+        { register int k = 1;
+	  if (c == '!')
+          { c = soap_get1(soap);
+            if (c == '[')
+            { do c = soap_get1(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                break;
+              soap->cdata = 1;
+              c = soap_get1(soap);
+	      continue;
+            }
+            if (c == '-' && (c = soap_get1(soap)) == '-')
+            { do
+              { c = soap_get1(soap);
+                if (c == '-' && (c = soap_get1(soap)) == '-')
+                  break;
+              } while ((int)c != EOF);
+            }
+          }
+	  else if (c == '?')
+            c = soap_get_pi(soap);
+          while ((int)c != EOF)
+          { if (c == '<')
+	      k++;
+	    else if (c == '>')
+	    { if (--k <= 0)
+	        break;
+	    }
+	    c = soap_get1(soap);
+	  }
+	  if ((int)c == EOF)
+	    break;
+          c = soap_get1(soap);
+          continue;
+        }
+        if (c == '/')
+          return SOAP_TT;
+        soap_revget1(soap);
+        return SOAP_LT;
+      case '>':
+        return SOAP_GT;
+      case '"':
+        return SOAP_QT;
+      case '\'':
+        return SOAP_AP;
+      case '&':
+        return soap_char(soap) | 0x80000000;
+    }
+    break;
+  }
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_get_pi(struct soap *soap)
+{ char buf[64];
+  register char *s = buf;
+  register int i = sizeof(buf);
+  register soap_wchar c = soap_getchar(soap);
+  /* This is a quick way to parse XML PI and we could use a callback instead to
+   * enable applications to intercept processing instructions */
+  while ((int)c != EOF && c != '?')
+  { if (--i > 0)
+    { if (soap_blank(c))
+        c = ' ';
+      *s++ = (char)c;
+    }
+    c = soap_getchar(soap);
+  }
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML PI <?%s?>\n", buf));
+  if (!strncmp(buf, "xml ", 4))
+  { s = strstr(buf, " encoding=");
+    if (s && s[10])
+    { if (!soap_tag_cmp(s + 11, "iso-8859-1*")
+       || !soap_tag_cmp(s + 11, "latin1*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to latin1 encoding\n"));
+        soap->mode |= SOAP_ENC_LATIN;
+      }
+      else if (!soap_tag_cmp(s + 11, "utf-8*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to utf-8 encoding\n"));
+        soap->mode &= ~SOAP_ENC_LATIN;
+      }
+    }
+  }
+  if ((int)c != EOF)
+    c = soap_getchar(soap);
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_move(struct soap *soap, long n)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving %ld bytes forward\n", (long)n));
+  for (; n > 0; n--)
+    if ((int)soap_getchar(soap) == EOF)
+      return SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_tell(struct soap *soap)
+{ return soap->count - soap->buflen + soap->bufidx - (soap->ahead != 0);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pututf8(struct soap *soap, register unsigned long c)
+{ char tmp[16];
+  if (c > 0 && c < 0x80)
+  { *tmp = (char)c;
+    return soap_send_raw(soap, tmp, 1);
+  }
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { register char *t = tmp;
+    if (c < 0x0800)
+      *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+    else
+    { if (c < 0x010000)
+        *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+      else
+      { if (c < 0x200000)
+          *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+        else
+        { if (c < 0x04000000)
+            *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+          else
+          { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+            *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+        }     
+        *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+      }
+      *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+    }
+    *t++ = (char)(0x80 | (c & 0x3F));
+    *t = '\0';
+  }
+  else
+#endif
+    sprintf(tmp, "&#%lu;", c);
+  return soap_send(soap, tmp);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getutf8(struct soap *soap)
+{ register soap_wchar c, c1, c2, c3, c4;
+  c = soap->ahead;
+  if (c > 0xFF)
+  { soap->ahead = 0;
+    return c;
+  }
+again:
+  c = soap_get(soap);
+  if (c < 0x80 || (soap->mode & SOAP_ENC_LATIN))
+    return c;
+  c1 = soap_get1(soap);
+  if (c1 < 0x80)
+  { soap_revget1(soap); /* doesn't look like this is UTF8 */
+    return c;
+  }
+  c1 &= 0x3F;
+  if (c < 0xE0)
+    return ((soap_wchar)(c & 0x1F) << 6) | c1;
+  c2 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c == 0xEF && c1 == 0x3B && c2 == 0x3F)	/* ignore UTF-8 BOM */
+    goto again;
+  if (c < 0xF0)
+    return ((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2;
+  c3 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xF8)
+    return ((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3;
+  c4 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xFC)
+    return ((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4;
+  return ((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(soap_get1(soap) & 0x3F);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthex(struct soap *soap, const unsigned char *s, int n)
+{ char d[2];
+  register int i;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2hex(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (i = 0; i < n; i++)
+  { register int m = *s++;
+    d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0'));
+    m &= 0x0F;
+    d[1] = (char)(m + (m > 9 ? '7' : '0'));
+    if (soap_send_raw(soap, d, 2))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_gethex(struct soap *soap, int *n)
+{
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_hex2s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register char *s;
+    register int i, k;
+    if (soap_append_lab(soap, NULL, 0))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = soap->lablen;
+    for (i = 0; i < k; i++)
+    { register char d1, d2;
+      register soap_wchar c;
+      c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = (int)(soap->lablen - k + i);
+        p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	if (p)
+	  memcpy(p, soap->labbuf, soap->lablen - k + i);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, SOAP_BLKLEN);
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register char d1, d2;
+      register soap_wchar c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap_end_block(soap);
+	  soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = soap_size_block(soap, i);
+        p = (unsigned char*)soap_save_block(soap, NULL, 0);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putbase64(struct soap *soap, const unsigned char *s, int n)
+{ register int i;
+  register unsigned long m;
+  char d[4];
+  if (!s)
+    return SOAP_OK;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2base64(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      d[i] = '=';
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_getbase64(struct soap *soap, int *n, int malloc_flag)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_base642s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register int i, k;
+    register char *s;
+    if (soap_append_lab(soap, NULL, 2))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = 3 * (soap->lablen / 3);
+    if (!s)
+      return NULL;
+    for (i = 0; i < k - 2; i += 3)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+            *n = (int)(soap->lablen - k + i);
+          p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	  if (p)
+	    memcpy(p, soap->labbuf, soap->lablen - k + i);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, 3 * SOAP_BLKLEN); /* must be multiple of 3 */
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          i *= 3;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n = (int)soap_size_block(soap, i);
+          p = (unsigned char*)soap_save_block(soap, NULL, 0);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_xop_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ /* Check MTOM xop:Include element (within hex/base64Binary) */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  int body = soap->body; /* should save type too? */
+  if (!soap_peek_element(soap))
+  { if (!soap_element_begin_in(soap, "xop:Include", 0) && *soap->href)
+    { if (soap_dime_forward(soap, ptr, size, id, type, options))
+        return soap->error;
+    }
+    if (soap->body && soap_element_end_in(soap, NULL))
+      return soap->error;
+  }
+  soap->body = body;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_dime_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ struct soap_xlist *xp = (struct soap_xlist*)SOAP_MALLOC(soap, sizeof(struct soap_xlist));
+  *ptr = NULL;
+  *size = 0;
+  *id = soap_strdup(soap, soap->href);
+  *type = NULL;
+  *options = NULL;
+  if (!xp)
+    return soap->error = SOAP_EOM;
+  xp->next = soap->xlist;
+  xp->ptr = ptr;
+  xp->size = size;
+  xp->id = *id;
+  xp->type = type;
+  xp->options = options;
+  soap->xlist = xp;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_strdup(struct soap *soap, const char *s)
+{ char *t = NULL;
+  if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1)))
+    strcpy(t, s);
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_new_block(struct soap *soap)
+{ struct soap_blist *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New block sequence (prev=%p)\n", soap->blist));
+  if (!(p = (struct soap_blist*)SOAP_MALLOC(soap, sizeof(struct soap_blist))))
+    return SOAP_EOM;   
+  p->next = soap->blist; 
+  p->ptr = NULL;
+  p->size = 0;
+  soap->blist = p;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_push_block(struct soap *soap, size_t n)
+{ char *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block of %u bytes (%u bytes total)\n", (unsigned int)n, (unsigned int)soap->blist->size + (unsigned int)n));
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(char*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  *(char**)p = soap->blist->ptr;
+  *(size_t*)(p + sizeof(char*)) = n;
+  soap->blist->ptr = p;
+  soap->blist->size += n;
+  return p + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_block(struct soap *soap)
+{ char *p;
+  if (!soap->blist->ptr)
+    return;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block\n"));
+  p = soap->blist->ptr;
+  soap->blist->size -= *(size_t*)(p + sizeof(char*));
+  soap->blist->ptr = *(char**)p;
+  SOAP_FREE(soap, p);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_update_ptrs(struct soap *soap, char *start, char *end, char *p1, char *p2)
+{ int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+#ifndef WITH_LEANER
+  register struct soap_xlist *xp;
+#endif
+  register void *p, **q;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr && (char*)ip->ptr >= start && (char*)ip->ptr < end)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", ip->id, ip->ptr, (char*)ip->ptr + (p1-p2)));
+        ip->ptr = (char*)ip->ptr + (p1-p2);
+      }
+      for (q = &ip->link; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Link update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (q = &ip->copy; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy chain update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (fp = ip->flist; fp; fp = fp->next)
+      { if ((char*)fp->ptr >= start && (char*)fp->ptr < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy list update id='%s' %p\n", ip->id, fp));
+          fp->ptr = (char*)fp->ptr + (p1-p2);
+        }
+      }
+    }
+  }
+#ifndef WITH_LEANER
+  for (xp = soap->xlist; xp; xp = xp->next)
+  { if (xp->ptr && (char*)xp->ptr >= start && (char*)xp->ptr < end)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", xp->id?xp->id:"", xp->ptr, (char*)xp->ptr + (p1-p2)));
+      xp->ptr = (unsigned char**)((char*)xp->ptr + (p1-p2));
+      xp->size = (int*)((char*)xp->size + (p1-p2));
+      xp->type = (char**)((char*)xp->type + (p1-p2));
+      xp->options = (char**)((char*)xp->options + (p1-p2));
+    }
+  }
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static int
+soap_has_copies(struct soap *soap, register const char *start, register const char *end)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  register const char *p;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { for (p = (const char*)ip->copy; p; p = *(const char**)p)
+        if (p >= start && p < end)
+          return SOAP_ERR;
+      for (fp = ip->flist; fp; fp = fp->next)
+        if ((const char*)fp->ptr >= start && (const char*)fp->ptr < end)
+	  return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_resolve(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  short flag;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr)
+      { register void *p, **q, *r;
+        q = (void**)ip->link;
+        ip->link = NULL;
+        r = ip->ptr;
+        DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing link chain to resolve id='%s'\n", ip->id));
+        while (q)
+        { p = *q;
+          *q = r;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "... link %p -> %p\n", q, r));
+          q = (void**)p;
+        }
+      }
+      else if (*ip->id == '#')
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Missing data for id='%s'\n", ip->id));
+        strcpy(soap->id, ip->id + 1);
+        return soap->error = SOAP_MISSING_ID;
+      }
+    }
+  }
+  do
+  { flag = 0;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution phase\n"));
+    for (i = 0; i < SOAP_IDHASH; i++)
+    { for (ip = soap->iht[i]; ip; ip = ip->next)
+      { if (ip->ptr && !soap_has_copies(soap, (const char*)ip->ptr, (const char*)ip->ptr + ip->size))
+        { if (ip->copy)
+          { register void *p, **q = (void**)ip->copy;
+            DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing copy chain to resolve id='%s'\n", ip->id));
+            ip->copy = NULL;
+            do
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... copy %p -> %p (%u bytes)\n", ip->ptr, q, (unsigned int)ip->size));
+	      p = *q;
+              memcpy(q, ip->ptr, ip->size);
+              q = (void**)p;
+            } while (q);
+	    flag = 1;
+	  }
+          for (fp = ip->flist; fp; fp = ip->flist)
+          { register unsigned int k = fp->level;
+	    register void *p = ip->ptr;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data type=%d location=%p level=%u,%u id='%s'\n", ip->type, p, ip->level, fp->level, ip->id));
+	    while (ip->level < k)
+            { register void **q = (void**)soap_malloc(soap, sizeof(void*));  
+	      if (!q)
+	        return soap->error;
+	      *q = p;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level, new location=%p holds=%p...\n", q, *q));
+              p = (void*)q;
+              k--;
+            }
+	    if (fp->fcopy)
+	      fp->fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    else
+	      soap_fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    ip->flist = fp->next;
+	    SOAP_FREE(soap, fp);
+	    flag = 1;
+	  }
+        }
+      }
+    }
+  } while (flag);
+#ifdef SOAP_DEBUG
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->copy || ip->flist)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution error: forwarded data for id='%s' could not be propagated, please report this problem to the developers\n", ip->id));
+      }
+    }
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution done\n"));
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_size_block(struct soap *soap, size_t n)
+{ if (soap->blist->ptr)
+  { soap->blist->size -= *(size_t*)(soap->blist->ptr + sizeof(char*)) - n;
+    *(size_t*)(soap->blist->ptr + sizeof(char*)) = n;
+  }
+  return soap->blist->size;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_first_block(struct soap *soap)
+{ char *p, *q, *r;
+  p = soap->blist->ptr;
+  if (!p)
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "First block\n"));
+  r = NULL;
+  do
+  { q = *(char**)p;
+    *(char**)p = r;
+    r = p;
+    p = q;
+  } while (p);
+  soap->blist->ptr = r;
+  return r + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_next_block(struct soap *soap)
+{ char *p;
+  p = soap->blist->ptr;
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n"));
+    soap->blist->ptr = *(char**)p;
+    SOAP_FREE(soap, p);
+    if (soap->blist->ptr)
+      return soap->blist->ptr + sizeof(char*) + sizeof(size_t);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_block_size(struct soap *soap)
+{ return *(size_t*)(soap->blist->ptr + sizeof(char*));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end_block(struct soap *soap)
+{ struct soap_blist *bp;
+  char *p, *q;
+  bp = soap->blist;
+  if (bp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of block sequence, free all remaining blocks\n"));
+    for (p = bp->ptr; p; p = q)
+    { q = *(char**)p;
+      SOAP_FREE(soap, p);
+    }
+    soap->blist = bp->next;
+    SOAP_FREE(soap, bp);
+  }
+  DBGLOG(TEST, if (soap->blist) SOAP_MESSAGE(fdebug, "Restore previous block sequence\n"));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_save_block(struct soap *soap, char *p, int flag)
+{ register size_t n;
+  register char *q, *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Save all blocks in contiguous memory space of %u bytes (%p->%p)\n", (unsigned int)soap->blist->size, soap->blist->ptr, p));
+  if (soap->blist->size)
+  { if (!p)
+      p = (char*)soap_malloc(soap, soap->blist->size);
+    if (p)
+    { for (s = p, q = soap_first_block(soap); q; q = soap_next_block(soap))
+      { n = soap_block_size(soap);
+#ifndef WITH_NOIDREF
+        if (flag)
+	  soap_update_ptrs(soap, q, q + n, s, q);
+#endif
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy %u bytes from %p to %p\n", (unsigned int)n, q, s));
+        memcpy(s, q, n);
+        s += n;
+      }
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  soap_end_block(soap);
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsize(struct soap *soap, const char *type, int size)
+{ return soap_putsizes(soap, type, &size, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizes(struct soap *soap, const char *type, const int *size, int dim)
+{ return soap_putsizesoffsets(soap, type, size, NULL, dim);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim)
+{ int i;
+  if (!type)
+    return NULL;
+  if (soap->version == 2)
+  { sprintf(soap->type, "%s[%d", type, size[0]);
+    for (i = 1; i < dim; i++)
+      sprintf(soap->type + strlen(soap->type), " %d", size[i]);
+  }
+  else
+  { if (offset)
+    { sprintf(soap->type, "%s[%d", type, size[0] + offset[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i] + offset[i]);
+    }
+    else
+    { sprintf(soap->type, "%s[%d", type, size[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i]);
+    }
+    strcat(soap->type, "]");
+  }
+  return soap->type;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffset(struct soap *soap, int offset)
+{ return soap_putoffsets(soap, &offset, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffsets(struct soap *soap, const int *offset, int dim)
+{ register int i;
+  sprintf(soap->arrayOffset, "[%d", offset[0]);
+  for (i = 1; i < dim; i++)
+    sprintf(soap->arrayOffset + strlen(soap->arrayOffset), ",%d", offset[i]);
+  strcat(soap->arrayOffset, "]");
+  return soap->arrayOffset;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_size(const int *size, int dim)
+{ register int i, n = size[0];
+  for (i = 1; i < dim; i++)
+    n *= size[i];
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getoffsets(const char *attr, const int *size, int *offset, int dim)
+{ register int i, j = 0;
+  if (offset)
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += offset[i] = (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  else
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  return j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsize(const char *attr1, const char *attr2, int *j)
+{ register int n, k;
+  char *s;
+  *j = 0;
+  if (!*attr1)
+    return -1;
+  if (*attr1 == '[')
+    attr1++;
+  n = 1;
+  for (;;)
+  { k = (int)soap_strtol(attr1, &s, 10);
+    n *= k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE || s == attr1)
+      return -1;
+    attr1 = strchr(s, ',');
+    if (!attr1)
+      attr1 = strchr(s, ' ');
+    if (attr2 && *attr2)
+    { attr2++;
+      *j *= k;
+      k = (int)soap_strtol(attr2, &s, 10);
+      *j += k;
+      if (k < 0)
+        return -1;
+      attr2 = s;
+    }
+    if (!attr1)
+      break;
+    attr1++;
+  }
+  return n - *j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsizes(const char *attr, int *size, int dim)
+{ register int i, k, n;
+  if (!*attr)
+    return -1;
+  i = strlen(attr);
+  n = 1;
+  do
+  { for (i = i-1; i >= 0; i--)
+      if (attr[i] == '[' || attr[i] == ',' || attr[i] == ' ')
+        break;
+    k = (int)atol(attr + i + 1);
+    n *= size[--dim] = k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE)
+      return -1;
+  } while (i >= 0 && attr[i] != '[');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getposition(const char *attr, int *pos)
+{ register int i, n;
+  if (!*attr)
+    return -1;
+  n = 0;
+  i = 1;
+  do
+  { pos[n++] = (int)atol(attr + i);
+    while (attr[i] && attr[i] != ',' && attr[i] != ']')
+      i++;
+    if (attr[i] == ',')
+      i++;
+  } while (n < SOAP_MAXDIMS && attr[i] && attr[i] != ']');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_push_namespace(struct soap *soap, const char *id, const char *ns)
+{ register struct soap_nlist *np;
+  register struct Namespace *p;
+  register short i = -1;
+  register size_t n, k;
+  n = strlen(id);
+  k = strlen(ns) + 1;
+  p = soap->local_namespaces;
+  if (p)
+  { for (i = 0; p->id; p++, i++)
+    { if (p->ns && !strcmp(ns, p->ns))
+      { if (p->out)
+        { SOAP_FREE(soap, p->out);
+          p->out = NULL;
+        }
+        break;
+      }
+      if (p->out)
+      { if (!strcmp(ns, p->out))
+          break;
+      }
+      else if (p->in)
+      { if (!soap_tag_cmp(ns, p->in))
+        { if ((p->out = (char*)SOAP_MALLOC(soap, k)))
+            strcpy(p->out, ns);
+          break;
+        }
+      }
+    }
+    if (!p || !p->id)
+      i = -1;
+  }
+  if (i >= 0)
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k);
+  if (!np)
+    return soap->error = SOAP_EOM;
+  np->next = soap->nlist;
+  soap->nlist = np;
+  np->level = soap->level;
+  np->index = i;
+  strcpy(np->id, id);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns));
+  if (i < 0)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push NOT OK: no match found for '%s' in namespace mapping table (added to stack anyway)\n", ns));
+  }
+  else
+  { np->ns = NULL;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push OK ('%s' matches '%s' in namespace table)\n", id, p->id));
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_namespace(struct soap *soap)
+{ register struct soap_nlist *np;
+  while (soap->nlist && soap->nlist->level >= soap->level)
+  { np = soap->nlist->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Popped namespace binding (level=%u) '%s'\n", soap->level, soap->nlist->id));
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_namespace(struct soap *soap, const char *id1, const char *id2, int n1, int n2) 
+{ register struct soap_nlist *np = soap->nlist;
+  while (np && (strncmp(np->id, id1, n1) || np->id[n1]))
+    np = np->next;
+  if (np)
+  { if (np->index < 0
+     || (soap->local_namespaces[np->index].id
+      && (strncmp(soap->local_namespaces[np->index].id, id2, n2)
+       || soap->local_namespaces[np->index].id[n2])))
+      return SOAP_NAMESPACE;
+    return SOAP_OK;
+  }
+  if (n1 == 3 && n1 == n2 && !strcmp(id1, "xml") && !strcmp(id1, id2))
+    return SOAP_OK;
+  return SOAP_SYNTAX_ERROR; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_current_namespace(struct soap *soap, const char *tag)
+{ register struct soap_nlist *np;
+  register const char *s;
+  np = soap->nlist;
+  if (!(s = strchr(tag, ':')))
+  { while (np && *np->id) /* find default namespace, if present */
+      np = np->next;
+  }
+  else
+  { while (np && (strncmp(np->id, tag, s - tag) || np->id[s - tag]))
+      np = np->next;
+    if (!np)
+      soap->error = SOAP_NAMESPACE;
+  }
+  if (np)
+  { if (np->index >= 0)
+      return soap->namespaces[np->index].ns;
+    if (np->ns)
+      return soap_strdup(soap, np->ns);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_tag_cmp(const char *s, const char *t)
+{ for (;;)
+  { register int c1 = *s;
+    register int c2 = *t;
+    if (!c1 || c1 == '"')
+      break;
+    if (c2 != '-')
+    { if (c1 != c2)
+      { if (c1 >= 'A' && c1 <= 'Z')
+          c1 += 'a' - 'A';
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+      }
+      if (c1 != c2)
+      { if (c2 != '*')
+          return 1;
+	c2 = *++t;
+        if (!c2)
+	  return 0;
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+        for (;;)
+        { c1 = *s;
+	  if (!c1 || c1 == '"')
+	    break;
+	  if (c1 >= 'A' && c1 <= 'Z')
+            c1 += 'a' - 'A';
+          if (c1 == c2 && !soap_tag_cmp(s + 1, t + 1))
+            return 0;
+	  s++;
+        }
+        break;
+      }
+    }
+    s++;
+    t++;
+  }
+  if (*t == '*' && !t[1])
+    return 0;
+  return *t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_tag(struct soap *soap, const char *tag1, const char *tag2)
+{ register const char *s, *t;
+  if (!tag1 || !tag2 || !*tag2)
+    return SOAP_OK;
+  s = strchr(tag1, ':');
+  t = strchr(tag2, ':');
+  if (t)
+  { if (s)
+    { if (t[1] && SOAP_STRCMP(s + 1, t + 1))
+        return SOAP_TAG_MISMATCH;
+      if (t != tag2 && soap_match_namespace(soap, tag1, tag2, s - tag1, t - tag2))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+        return SOAP_TAG_MISMATCH;
+      }
+    } 
+    else if (SOAP_STRCMP(tag1, t + 1))
+      return SOAP_TAG_MISMATCH;
+    else if (t != tag2 && soap_match_namespace(soap, tag1, tag2, 0, t - tag2))
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+      return SOAP_TAG_MISMATCH;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags and (default) namespaces match: '%s' '%s'\n", tag1, tag2));
+    return SOAP_OK;
+  }
+  if (s)
+  { if (SOAP_STRCMP(s + 1, tag2))
+      return SOAP_TAG_MISMATCH;
+  }
+  else if (SOAP_STRCMP(tag1, tag2))
+    return SOAP_TAG_MISMATCH;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags match: '%s' '%s'\n", tag1, tag2));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_array(struct soap *soap, const char *type)
+{ if (*soap->arrayType)
+    if (soap_match_tag(soap, soap->arrayType, type)
+     && soap_match_tag(soap, soap->arrayType, "xsd:anyType")
+     && soap_match_tag(soap, soap->arrayType, "xsd:ur-type")
+    )
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array type mismatch: '%s' '%s'\n", soap->arrayType, type));
+      return SOAP_TAG_MISMATCH;
+    }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************\
+ *
+ *	SSL
+ *
+\******************************************************************************/
+
+#ifdef WITH_OPENSSL
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_rand()
+{ unsigned char buf[4];
+  if (!ssl_init_done)
+    soap_ssl_init();
+  RAND_pseudo_bytes(buf, 4);
+  return *(int*)buf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *dhfile, const char *randfile, const char *sid)
+{ int err;
+  soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  if (dhfile)
+  { soap->dhfile = dhfile;
+    soap->rsa = 0;
+  }
+  else
+  { soap->dhfile = NULL;
+    soap->rsa = 1;
+  }
+  soap->randfile = randfile;
+  soap->require_client_auth = (flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION);
+  if (!(err = soap->fsslauth(soap)))
+  { if (sid)
+      SSL_CTX_set_session_id_context(soap->ctx, (unsigned char*)sid, strlen(sid));
+  }
+  return err; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_client_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *randfile)
+{ soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  soap->dhfile = NULL;
+  soap->rsa = 0;
+  soap->randfile = randfile;
+  soap->require_server_auth = (flags & SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION);
+  return soap->fsslauth(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_ssl_init()
+{ /* Note: for MT systems, the main program MUST call soap_ssl_init() before any threads are started */
+  if (!ssl_init_done)
+  { ssl_init_done = 1;
+    SSL_library_init();
+#ifndef WITH_LEAN
+    SSL_load_error_strings();
+#endif
+    if (!RAND_load_file("/dev/urandom", 1024))
+    { char buf[1024];
+      RAND_seed(buf, sizeof(buf));
+      while (!RAND_status())
+      { int r = rand();
+        RAND_seed(&r, sizeof(int));
+      }
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static const char *
+ssl_error(struct soap *soap, int ret)
+{ int err = SSL_get_error(soap->ssl, ret);
+  const char *msg = soap_str_code(h_ssl_error_codes, err);
+  if (msg)
+    strcpy(soap->msgbuf, msg);
+  else
+    return ERR_error_string(err, soap->msgbuf);
+  if (ERR_peek_error())
+  { unsigned long r;
+    strcat(soap->msgbuf, "\n");
+    while ((r = ERR_get_error()))
+      ERR_error_string_n(r, soap->msgbuf + strlen(soap->msgbuf), sizeof(soap->msgbuf) - strlen(soap->msgbuf));
+  } 
+  else
+  { switch (ret)
+    { case 0:
+        strcpy(soap->msgbuf, "EOF was observed that violates the protocol. The client probably provided invalid authentication information.");
+        break;
+      case -1:
+        sprintf(soap->msgbuf, "Error observed by underlying BIO: %s", strerror(errno));  
+        break;
+    }
+  }
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_password(char *buf, int num, int rwflag, void *userdata)
+{ if (num < (int)strlen((char*)userdata) + 1)
+    return 0;
+  return strlen(strcpy(buf, (char*)userdata));
+}
+#endif
+
+/******************************************************************************/
+/* This callback is included for future references. It should not be deleted
+#ifndef PALM_2
+static DH *
+ssl_tmp_dh(SSL *ssl, int is_export, int keylength)
+{ static DH *dh512 = NULL;
+  static DH *dh1024 = NULL;
+  DH *dh;
+  switch (keylength)
+  { case 512:
+      if (!dh512)
+      { BIO *bio = BIO_new_file("dh512.pem", "r");
+        if (bio)
+        { dh512 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+          return dh512;
+        }
+      }
+      else
+        return dh512;
+    default:
+      if (!dh1024)
+      { BIO *bio = BIO_new_file("dh1024.pem", "r");
+        if (bio)
+        { dh1024 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+        }
+      }
+      dh = dh1024;
+  }
+  return dh;
+}
+#endif
+*/
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_auth_init(struct soap *soap)
+{ if (!ssl_init_done)
+    soap_ssl_init();
+  if (!soap->ctx)
+  { if (!(soap->ctx = SSL_CTX_new(SSLv23_method())))
+      return soap_set_receiver_error(soap, "SSL error", "Can't setup context", SOAP_SSL_ERROR);
+  }
+  if (soap->randfile)
+  { if (!RAND_load_file(soap->randfile, -1))
+      return soap_set_receiver_error(soap, "SSL error", "Can't load randomness", SOAP_SSL_ERROR);
+  }
+  if (soap->cafile || soap->capath)
+  { if (!SSL_CTX_load_verify_locations(soap->ctx, soap->cafile, soap->capath))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read CA file and directory", SOAP_SSL_ERROR);
+    if (soap->cafile && soap->require_client_auth)
+      SSL_CTX_set_client_CA_list(soap->ctx, SSL_load_client_CA_file(soap->cafile));
+  }
+  if (!SSL_CTX_set_default_verify_paths(soap->ctx))
+    return soap_set_receiver_error(soap, "SSL error", "Can't read default CA file and/or directory", SOAP_SSL_ERROR);
+/* See below */
+  if (soap->keyfile)
+  { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read certificate key file", SOAP_SSL_ERROR);
+    if (soap->password)
+    { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+      SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+    }
+    if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+  }
+/* Suggested alternative approach to check cafile first before the key file:
+  if (soap->password)
+  { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+    SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+  }
+  if (!soap->cafile || !SSL_CTX_use_certificate_chain_file(soap->ctx, soap->cafile))
+  { if (soap->keyfile)
+    { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read certificate or key file", SOAP_SSL_ERROR);
+      if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+    }
+  }
+*/
+  if (soap->rsa)
+  { RSA *rsa = RSA_generate_key(1024, RSA_F4, NULL, NULL);
+    if (!SSL_CTX_set_tmp_rsa(soap->ctx, rsa))
+    { if (rsa)
+        RSA_free(rsa);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set RSA key", SOAP_SSL_ERROR);
+    }
+    RSA_free(rsa);
+  }
+  else if (soap->dhfile)
+  { DH *dh = 0;
+    BIO *bio;
+    bio = BIO_new_file(soap->dhfile, "r");
+    if (!bio)
+      return soap_set_receiver_error(soap, "SSL error", "Can't read DH file", SOAP_SSL_ERROR);
+    dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+    BIO_free(bio);
+    if (SSL_CTX_set_tmp_dh(soap->ctx, dh) < 0)
+    { if (dh)
+        DH_free(dh);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set DH parameters", SOAP_SSL_ERROR);
+    }
+    DH_free(dh);
+  }
+  SSL_CTX_set_options(soap->ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2);
+  SSL_CTX_set_verify(soap->ctx, soap->require_client_auth ? (SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT) : soap->require_server_auth ? SSL_VERIFY_PEER : SSL_VERIFY_NONE, soap->fsslverify);
+#if (OPENSSL_VERSION_NUMBER < 0x00905100L)
+  SSL_CTX_set_verify_depth(soap->ctx, 1); 
+#else
+  SSL_CTX_set_verify_depth(soap->ctx, 9); 
+#endif  
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_verify_callback(int ok, X509_STORE_CTX *store)
+{
+#ifdef SOAP_DEBUG
+  if (!ok) 
+  { char data[256];
+    X509 *cert = X509_STORE_CTX_get_current_cert(store);
+    fprintf(stderr, "SSL verify error or warning with certificate at depth %d: %s\n", X509_STORE_CTX_get_error_depth(store), X509_verify_cert_error_string(X509_STORE_CTX_get_error(store)));
+    X509_NAME_oneline(X509_get_issuer_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate issuer %s\n", data);
+    X509_NAME_oneline(X509_get_subject_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate subject %s\n", data);
+  }
+#endif
+  /* Note: return 1 to continue, but unsafe progress will be terminated by SSL */
+  return ok;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_accept(struct soap *soap)
+{ BIO *bio;
+  int i, r;
+  if (!soap_valid_socket(soap->socket))
+    return soap_set_receiver_error(soap, "SSL error", "No socket in soap_ssl_accept()", SOAP_SSL_ERROR);
+  if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    return SOAP_INVALID_SOCKET;
+  if (!soap->ssl)
+  { soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+      return soap_set_receiver_error(soap, "SSL error", "SSL_new() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+  }
+  else
+    SSL_clear(soap->ssl);
+  soap->imode |= SOAP_ENC_SSL;
+  soap->omode |= SOAP_ENC_SSL;
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&nonblocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)|O_NONBLOCK);
+#endif
+  bio = BIO_new_socket((SOAP_SOCKET)soap->socket, BIO_NOCLOSE);
+  SSL_set_bio(soap->ssl, bio, bio);
+  i = 100; /* 100 * 0.1 ms retries */
+  while ((r = SSL_accept(soap->ssl)) <= 0)
+  { int err = SSL_get_error(soap->ssl, r);
+    if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE)
+    { struct timeval timeout;
+      fd_set fd;
+      if (i-- <= 0)
+        break;
+      timeout.tv_sec = 0;
+      timeout.tv_usec = 100000;
+      FD_ZERO(&fd);
+      FD_SET((SOAP_SOCKET)soap->socket, &fd);
+      r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+      if (r < 0 && soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        return SOAP_EOF;
+      }
+    }
+    else
+    { soap->errnum = err;
+      break;
+    }
+  }
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&blocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+  if (r <= 0)
+  { soap_set_receiver_error(soap, ssl_error(soap, r), "SSL_accept() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+    soap_closesock(soap);
+    return SOAP_SSL_ERROR;
+  }
+  if (soap->require_client_auth)
+  { X509 *peer;
+    int err;
+    if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    peer = SSL_get_peer_certificate(soap->ssl);
+    if (!peer)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    X509_free(peer);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#endif /* WITH_OPENSSL */
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_init(struct soap *soap)
+{ soap->errmode = 1;
+#ifdef WIN32
+  if (tcp_done)
+    return 0;
+  else
+  { WSADATA w;
+    if (WSAStartup(MAKEWORD(1, 1), &w))
+      return -1;
+    tcp_done = 1;
+  }
+#endif
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_done(struct soap *soap)
+{ 
+#ifdef SOAP_DEBUG
+  int i;
+#endif
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  while (soap->clist)
+  { struct soap_clist *p = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = p;
+  }
+  soap->keep_alive = 0; /* to force close the socket */
+  soap_closesock(soap);
+#ifdef WITH_COOKIES
+  soap_free_cookies(soap);
+#endif
+  while (soap->plugins)
+  { register struct soap_plugin *p = soap->plugins->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Removing plugin '%s'\n", soap->plugins->id));
+    if (soap->plugins->fcopy || soap->state == SOAP_INIT)
+      soap->plugins->fdelete(soap, soap->plugins);
+    SOAP_FREE(soap, soap->plugins);
+    soap->plugins = p;
+  }
+  soap->fplugin = fplugin;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+#ifdef WITH_OPENSSL
+  if (soap->session)
+  { SSL_SESSION_free(soap->session);
+    soap->session = NULL;
+  }
+#endif
+  if (soap->state == SOAP_INIT)
+  { if (soap_valid_socket(soap->master))
+    { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+      soap->master = SOAP_INVALID_SOCKET;
+    }
+#ifdef WITH_OPENSSL
+    if (soap->ctx)
+    { SSL_CTX_free(soap->ctx);
+      soap->ctx = NULL;
+    }
+#endif
+  }
+#ifdef SOAP_DEBUG
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free logfiles\n"));
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { if (soap->logfile[i])
+    { SOAP_FREE(soap, (void*)soap->logfile[i]);
+      soap->logfile[i] = NULL;
+    }
+    soap_close_logfile(soap, i);
+  }
+  soap_free_mht(soap);
+  soap->state = 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_cleanup(struct soap *soap)
+{ soap_done(soap);
+#ifdef WIN32
+  if (!tcp_done)
+    return;
+  tcp_done = 0;
+  WSACleanup();
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+tcp_error(struct soap *soap)
+{ register const char *msg = NULL;
+  switch (soap->errmode)
+  { case 0:
+      msg = soap_strerror(soap);
+      break;
+    case 1:
+      msg = "WSAStartup failed";
+      break;
+    case 2:
+    {
+#ifndef WITH_LEAN
+      msg = soap_str_code(h_error_codes, soap->errnum);
+      if (!msg)
+#endif
+      { sprintf(soap->msgbuf, "TCP/UDP IP error %d", soap->errnum);
+        msg = soap->msgbuf;
+      }
+    }
+  }
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static const char*
+http_error(struct soap *soap, int status)
+{ register const char *msg = SOAP_STR_EOS;
+#ifndef WITH_LEAN
+  msg = soap_str_code(h_http_error_codes, status);
+  if (!msg)
+    msg = SOAP_STR_EOS;
+#endif
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_IPV6
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr)
+{ soap_int32 iadd = -1;
+  struct hostent hostent, *host = &hostent;
+#ifdef VXWORKS
+  int hostint;
+  /* inet_addr(), and hostGetByName() expect "char *"; addr is a "const char *". */
+  iadd = inet_addr((char*)addr);
+#else
+#if defined(_AIXVERSION_431) || defined(TRU64)
+  struct hostent_data ht_data;
+#endif
+#ifdef AS400
+  iadd = inet_addr((void*)addr);
+#else
+  iadd = inet_addr(addr);
+#endif
+#endif
+  if (iadd != -1)
+  { memcpy(inaddr, &iadd, sizeof(iadd));
+    return SOAP_OK;
+  }
+#if defined(__GLIBC__)
+  if (gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &host, &soap->errnum) < 0)
+    host = NULL;
+#elif defined(_AIXVERSION_431) || defined(TRU64)
+  memset((void*)&ht_data, 0, sizeof(ht_data));
+  if (gethostbyname_r(addr, &hostent, &ht_data) < 0)
+  { host = NULL;
+    soap->errnum = h_errno;
+  }
+#elif defined(HAVE_GETHOSTBYNAME_R)
+  host = gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &soap->errnum);
+#elif defined(VXWORKS)
+  /* If the DNS resolver library resolvLib has been configured in the vxWorks
+   * image, a query for the host IP address is sent to the DNS server, if the
+   * name was not found in the local host table. */
+  hostint = hostGetByName((char*)addr);
+  if (hostint == ERROR)
+  { host = NULL;
+    soap->errnum = soap_errno; 
+  }
+#else
+#ifdef AS400
+  if (!(host = gethostbyname((void*)addr)))
+    soap->errnum = h_errno;
+#else
+  if (!(host = gethostbyname(addr)))
+    soap->errnum = h_errno;
+#endif
+#endif
+  if (!host)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Host name not found\n"));
+    return SOAP_ERR;
+  }
+#ifdef VXWORKS
+  inaddr->s_addr = hostint;
+#else
+  memcpy(inaddr, host->h_addr, host->h_length);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_connect(struct soap *soap, const char *endpoint, const char *host, int port)
+{
+#ifdef WITH_IPV6
+  struct addrinfo hints, *res, *ressave;
+  int err;
+#endif
+  register int fd;
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->socket))
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+  soap->socket = SOAP_INVALID_SOCKET;
+  if (tcp_init(soap))
+  { soap->errnum = 0;
+    soap_set_sender_error(soap, tcp_error(soap), "TCP init failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->errmode = 0;
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+    err = getaddrinfo(soap->proxy_host, soap_int2s(soap, soap->proxy_port), &hints, &res);
+  else
+    err = getaddrinfo(host, soap_int2s(soap, port), &hints, &res);
+  if (err)
+  { soap_set_sender_error(soap, gai_strerror(err), "getaddrinfo failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  ressave = res;
+again:
+  fd = (int)socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+  soap->errmode = 0;
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    fd = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    fd = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  if (fd < 0)
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "socket failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_flags & SO_LINGER)
+  { struct linger linger;
+    memset((void*)&linger, 0, sizeof(linger));
+    linger.l_onoff = 1;
+    linger.l_linger = 0;
+    if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+    { soap->errnum = soap_socket_errno;
+      soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  if ((soap->connect_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, soap->connect_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (soap->keep_alive && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)fd, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Opening socket %d to host='%s' port=%d\n", fd, host, port));
+#ifndef WITH_IPV6
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+  { if (soap->fresolve(soap, soap->proxy_host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get proxy host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)soap->proxy_port);
+  }
+  else
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)port);
+  }
+  soap->errmode = 0;
+  if ((soap->omode & SOAP_IO_UDP))
+    return fd;
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking)); /* modified to use fd */
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+  else
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  for (;;)
+  { 
+#ifdef WITH_IPV6
+    if (connect((SOAP_SOCKET)fd, res->ai_addr, res->ai_addrlen))
+#else
+    if (connect((SOAP_SOCKET)fd, (struct sockaddr*)&soap->peer, sizeof(soap->peer)))
+#endif
+    { 
+#ifndef WITH_LEAN
+      if (soap->connect_timeout && (soap_socket_errno == SOAP_EINPROGRESS || soap_socket_errno == SOAP_EWOULDBLOCK))
+      { struct timeval timeout;
+        SOAP_SOCKLEN_T k;
+        fd_set fds;
+        if (soap->connect_timeout > 0)
+        { timeout.tv_sec = soap->connect_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->connect_timeout/1000000;
+          timeout.tv_usec = -soap->connect_timeout%1000000;
+        }
+        FD_ZERO(&fds);
+        FD_SET((SOAP_SOCKET)fd, &fds);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(fd + 1), NULL, &fds, NULL, &timeout);
+          if (r > 0)
+	    break;
+          if (!r)
+          { soap->errnum = 0;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+            soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+            soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+	k = (SOAP_SOCKLEN_T)sizeof(soap->errnum);
+        if (!getsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_ERROR, (char*)&soap->errnum, &k) && !soap->errnum)	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+          break;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap->errnum = soap_socket_errno;
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      else
+#endif
+#ifdef WITH_IPV6
+      if (res->ai_next)
+      { res = res->ai_next;
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        goto again;
+      }
+      else
+#endif
+      if (soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }  
+    else
+      break;
+  }
+#ifdef WITH_IPV6
+  soap->peerlen = 0; /* IPv6: already connected so use send() */
+  freeaddrinfo(ressave);
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  soap->socket = fd;
+  soap->imode &= ~SOAP_ENC_SSL;
+  soap->omode &= ~SOAP_ENC_SSL;
+  if (!strncmp(endpoint, "https:", 6))
+  {
+#ifdef WITH_OPENSSL
+    BIO *bio;
+    int r;
+    if (soap->proxy_host)
+    { short v;
+      unsigned int k = soap->omode; /* make sure we only parse HTTP */
+      size_t n = soap->count; /* save the content length */
+      char *userid, *passwd;
+      soap->omode &= ~SOAP_ENC; /* mask IO and ENC */
+      soap->omode |= SOAP_IO_BUFFER;
+      soap_begin_send(soap);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connecting to proxy server\n"));
+      sprintf(soap->tmpbuf, "CONNECT %s:%d HTTP/%s", host, port, soap->http_version);
+      if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+#ifndef WITH_LEAN
+      if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+      { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+        strcpy(soap->tmpbuf, "Basic ");
+        soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+        if ((soap->error = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+        { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return soap->error;
+        }
+      }
+#endif
+      if ((soap->error = soap->fposthdr(soap, NULL, NULL))
+       || soap_flush(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->omode = k;
+      k = soap->imode;
+      soap->imode &= ~SOAP_ENC; /* mask IO and ENC */
+      v = soap->version; /* preserve */
+      userid = soap->userid; /* preserve */
+      passwd = soap->passwd; /* preserve */
+      if (soap_begin_recv(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->userid = userid; /* restore */
+      soap->passwd = passwd; /* restore */
+      soap->version = v; /* restore */
+      soap->imode = k; /* restore */
+      soap->count = n; /* restore */
+      soap_begin_send(soap);
+    }
+    if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    { soap_set_sender_error(soap, "SSL error", "SSL authentication failed in tcp_connect(): check password, key file, and ca file.", SOAP_SSL_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+    { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      soap->error = SOAP_SSL_ERROR;
+      return SOAP_INVALID_SOCKET;
+    }
+    if (soap->session)
+    { if (!strcmp(soap->session_host, host) && soap->session_port == port)
+        SSL_set_session(soap->ssl, soap->session);
+      SSL_SESSION_free(soap->session);
+      soap->session = NULL;
+    }
+    soap->imode |= SOAP_ENC_SSL;
+    soap->omode |= SOAP_ENC_SSL;
+    bio = BIO_new_socket((SOAP_SOCKET)fd, BIO_NOCLOSE);
+    SSL_set_bio(soap->ssl, bio, bio);
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#if defined(WIN32)
+    { u_long nonblocking = 1;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+    }
+#elif defined(VXWORKS)
+    { u_long nonblocking = 1;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+#endif
+    for (;;)
+    { if ((r = SSL_connect(soap->ssl)) <= 0)
+      { int err = SSL_get_error(soap->ssl, r);
+        if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+        { soap_set_sender_error(soap, ssl_error(soap, r), "SSL connect failed in tcp_connect()", SOAP_SSL_ERROR);
+          soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (soap->connect_timeout)
+        { struct timeval timeout;
+          fd_set fds;
+          if (soap->connect_timeout > 0)
+          { timeout.tv_sec = soap->connect_timeout;
+            timeout.tv_usec = 0;
+          }
+          else
+          { timeout.tv_sec = -soap->connect_timeout/1000000;
+            timeout.tv_usec = -soap->connect_timeout%1000000;
+          }
+          FD_ZERO(&fds);
+          FD_SET((SOAP_SOCKET)fd, &fds);
+          for (;;)
+          { int r = select((SOAP_SOCKET)(fd + 1), &fds, NULL, &fds, &timeout);
+            if (r > 0)
+	      break;
+            if (!r)
+            { soap->errnum = 0;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+              soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+              soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+              return SOAP_INVALID_SOCKET;
+            }
+          }
+	  continue;
+        }
+      }
+      break;
+    }
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#ifdef WIN32
+    { u_long blocking = 0;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+    }
+#elif defined(VXWORKS)
+    { u_long blocking = 0;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+    if (soap->require_server_auth)
+    { X509 *peer;
+      int err;
+      if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+      { soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      peer = SSL_get_peer_certificate(soap->ssl);
+      if (!peer)
+      { soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      X509_NAME_get_text_by_NID(X509_get_subject_name(peer), NID_commonName, soap->msgbuf, sizeof(soap->msgbuf));
+      X509_free(peer);
+      if (soap_tag_cmp(soap->msgbuf, host))
+      { soap_set_sender_error(soap, "SSL error", "SSL certificate host name mismatch in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+#else
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    soap->error = SOAP_SSL_ERROR;
+    return SOAP_INVALID_SOCKET;
+#endif
+  }
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_bind(struct soap *soap, const char *host, int port, int backlog)
+{
+#ifdef WITH_IPV6
+  struct addrinfo *addrinfo = NULL;
+  struct addrinfo hints;
+  struct addrinfo res;
+  int err;
+#endif
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->master))
+  { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+    soap->master = SOAP_INVALID_SOCKET;
+  }
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 1;
+  if (tcp_init(soap))
+  { soap_set_receiver_error(soap, tcp_error(soap), "TCP init failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  hints.ai_flags = AI_PASSIVE;
+  soap->errmode = 2;
+  err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo);
+  if (addrinfo)
+  { res = *addrinfo;
+    soap->peer = *((struct sockaddr_storage*)addrinfo->ai_addr);
+    soap->peerlen = addrinfo->ai_addrlen;
+    res.ai_addr = (struct sockaddr*)&soap->peer;
+    res.ai_addrlen = soap->peerlen;
+    freeaddrinfo(addrinfo);
+  }
+  if (err)
+  { soap_set_receiver_error(soap, gai_strerror(err), "getaddrinfo failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->master = socket(res.ai_family, res.ai_socktype, res.ai_protocol);
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->master = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    soap->master = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  soap->errmode = 0;
+  if (!soap_valid_socket(soap->master))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "socket failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->socket = soap->master;
+#endif
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)soap->master, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(soap->master, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->bind_flags && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, soap->bind_flags, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->master, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+#ifdef WITH_IPV6
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, res.ai_addr, res.ai_addrlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+#else
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (host)
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_receiver_error(soap, tcp_error(soap), "get host by name failed in soap_bind()", SOAP_TCP_ERROR);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  else
+    soap->peer.sin_addr.s_addr = htonl(INADDR_ANY);
+  soap->peer.sin_port = htons((short)port);
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, (struct sockaddr*)&soap->peer, soap->peerlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+  if (!(soap->omode & SOAP_IO_UDP) && listen((SOAP_SOCKET)soap->master, backlog))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "listen failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+  return soap->master;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_poll(struct soap *soap)
+{ 
+#ifndef WITH_LEAN
+  struct timeval timeout;
+  fd_set rfd, sfd, xfd;
+  int r;
+  timeout.tv_sec = 0;
+  timeout.tv_usec = 0;
+  FD_ZERO(&rfd);
+  FD_ZERO(&sfd);
+  FD_ZERO(&xfd);
+  if (soap_valid_socket(soap->socket))
+  { FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &xfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, &xfd, &timeout);
+    if (r > 0 && FD_ISSET((SOAP_SOCKET)soap->socket, &xfd))
+      r = -1;
+  }
+  else if (soap_valid_socket(soap->master))
+  { FD_SET((SOAP_SOCKET)soap->master, &sfd);
+    r = select((SOAP_SOCKET)(soap->master + 1), NULL, &sfd, NULL, &timeout);
+  }
+  else
+    return SOAP_OK;
+  if (r > 0)
+  {
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+    {
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || SSL_peek(soap->ssl, soap->tmpbuf, 1) > 0))
+        return SOAP_OK;
+    }
+    else
+#endif
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) > 0))
+        return SOAP_OK;
+  }
+  else if (r < 0)
+  { soap->errnum = soap_socket_errno;
+    if ((soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) && soap_socket_errno != SOAP_EINTR)
+    { soap_set_receiver_error(soap, tcp_error(soap), "select failed in soap_poll()", SOAP_TCP_ERROR);
+      return soap->error = SOAP_TCP_ERROR;
+    }
+  }
+  else
+    soap->errnum = 0;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Polling: other end down on socket=%d select=%d\n", soap->socket, r));
+  return SOAP_EOF;
+#else
+  return SOAP_OK;
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_accept(struct soap *soap, int s, struct sockaddr *a, int *n)
+{ int fd;
+  fd = (int)accept((SOAP_SOCKET)s, a, (SOAP_SOCKLEN_T*)n);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, FD_CLOEXEC);
+#endif
+#endif
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_accept(struct soap *soap)
+{ int n = (int)sizeof(soap->peer);
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  soap->error = SOAP_OK;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    return soap->socket = soap->master;
+#endif
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 0;
+  soap->keep_alive = 0;
+  if (soap_valid_socket(soap->master))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->accept_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->accept_timeout > 0)
+        { timeout.tv_sec = soap->accept_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->accept_timeout/1000000;
+          timeout.tv_usec = -soap->accept_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->master, &fd);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(soap->master + 1), &fd, &fd, NULL, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            soap_set_receiver_error(soap, "Timeout", "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            soap_closesock(soap);
+            soap_set_sender_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+#if defined(WIN32)
+	{ u_long nonblocking = 1;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &nonblocking);
+        }
+#elif defined(VXWORKS)
+        { u_long nonblocking = 1;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&nonblocking));
+        }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)|O_NONBLOCK);
+#endif
+      }
+      else
+#if defined(WIN32)
+      { u_long blocking = 0;
+        ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+      }
+#elif defined(VXWORKS)
+      { u_long blocking = 0;
+        ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+      }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+      soap->socket = soap->faccept(soap, soap->master, (struct sockaddr*)&soap->peer, &n);
+      soap->peerlen = (size_t)n;
+      if (soap_valid_socket(soap->socket))
+      {
+#ifdef WITH_IPV6
+/* Use soap->host to store the numeric form of the remote host */
+        getnameinfo((struct sockaddr*)&soap->peer, n, soap->host, sizeof(soap->host), NULL, 0, NI_NUMERICHOST | NI_NUMERICSERV); 
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d from %s\n", soap->socket, soap->host));
+        soap->ip = 0; /* info stored in soap->peer and soap->host */
+        soap->port = 0; /* info stored in soap->peer and soap->host */
+#else
+        soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+        soap->port = (int)ntohs(soap->peer.sin_port); /* does not return port number on some systems */
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d at port %d from IP %d.%d.%d.%d\n", soap->socket, soap->port, (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF));
+#endif
+#ifndef WITH_LEAN
+	if (soap->accept_flags & SO_LINGER)
+        { struct linger linger;
+          memset((void*)&linger, 0, sizeof(linger));
+          linger.l_onoff = 1;
+          linger.l_linger = 0;
+	  if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+          { soap->errnum = soap_socket_errno;
+	    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in soap_accept()", SOAP_TCP_ERROR);
+	    soap_closesock(soap);
+            return SOAP_INVALID_SOCKET;
+	  }
+        }
+        if ((soap->accept_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, soap->accept_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#ifdef TCP_NODELAY
+        if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->socket, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#endif
+#endif
+        if (soap->accept_timeout)
+        {
+#if defined(WIN32)
+          u_long blocking = 0;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+          ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+#elif defined(VXWORKS)
+          u_long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+          ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)(&blocking));
+#elif defined(PALM)
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL,0)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL,0)&~O_NONBLOCK);
+#elif defined(SYMBIAN)
+          long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, 0/*FIONBIO*/, &blocking);
+#else
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+	}
+        soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+        return soap->socket;
+      }
+      if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept failed from %s\n", soap->host));
+        soap->errnum = soap_socket_errno;
+        soap_set_receiver_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+	soap_closesock(soap);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+  }
+  else
+  { soap->errnum = 0;
+    soap_set_receiver_error(soap, tcp_error(soap), "no master socket in soap_accept()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_disconnect(struct soap *soap)
+{
+#ifdef WITH_OPENSSL
+  if (soap->ssl)
+  { int r, s = 0;
+    if (soap->session)
+      SSL_SESSION_free(soap->session);
+    if (*soap->host)
+    { soap->session = SSL_get1_session(soap->ssl);
+      if (soap->session)
+      { strcpy(soap->session_host, soap->host);
+        soap->session_port = soap->port;
+      }
+    }
+    r = SSL_shutdown(soap->ssl);
+    if (r != 1)
+    { s = ERR_get_error();
+      if (s)
+      { if (soap_valid_socket(soap->socket))
+        { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1);
+          soap->socket = SOAP_INVALID_SOCKET;
+        }
+        r = SSL_shutdown(soap->ssl);
+      }
+    }
+    DBGLOG(TEST, if (s) SOAP_MESSAGE(fdebug, "Shutdown failed: %d\n", SSL_get_error(soap->ssl, r)));
+    SSL_free(soap->ssl);
+    soap->ssl = NULL;
+    if (s)
+      return SOAP_SSL_ERROR;
+    ERR_remove_state(0);
+  }
+#endif
+  if (soap_valid_socket(soap->socket) && !(soap->omode & SOAP_IO_UDP))
+  { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 2);
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+    soap->socket = SOAP_INVALID_SOCKET;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_closesocket(struct soap *soap, SOAP_SOCKET fd)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Close socket %d\n", (int)fd));
+  return closesocket(fd);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_shutdownsocket(struct soap *soap, SOAP_SOCKET fd, int how)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Shutdown socket %d how=%d\n", (int)fd, how));
+  return shutdown(fd, how);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_closesock(struct soap *soap)
+{ register int status = soap->error;
+  if (status == SOAP_EOF || status == SOAP_TCP_ERROR || status == SOAP_SSL_ERROR || !soap->keep_alive)
+  { if (soap->fclose && (soap->error = soap->fclose(soap)))
+      return soap->error;
+    soap->keep_alive = 0;
+  }
+#ifdef WITH_ZLIB
+  if (soap->zlib_state == SOAP_ZLIB_DEFLATE)
+    deflateEnd(&soap->d_stream);
+  else if (soap->zlib_state == SOAP_ZLIB_INFLATE)
+    inflateEnd(&soap->d_stream);
+  soap->zlib_state = SOAP_ZLIB_NONE;
+#endif
+  return soap->error = status;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_hash(register const char *s)
+{ register size_t h = 0;
+  while (*s)
+    h = 65599*h + *s++;
+  return h % SOAP_IDHASH;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_pht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing pointer hashtable\n"));
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new1(soap_mode mode)
+{ return soap_new2(mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new()
+{ return soap_new2(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new2(soap_mode imode, soap_mode omode)
+{ struct soap *soap = (struct soap*)malloc(sizeof(struct soap));
+  if (soap)
+    soap_init2(soap, imode, omode);
+  return soap;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_del(struct soap *soap)
+{ free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_pht(struct soap *soap)
+{ register struct soap_pblk *pb, *next;
+  register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free pointer hashtable\n"));
+  for (pb = soap->pblk; pb; pb = next)
+  { next = pb->next;
+    SOAP_FREE(soap, pb);
+  }
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type)
+{ register int i;
+  struct soap_plist *pp;
+  if (soap->version != 1)
+    soap->encoding = 1;
+  if (a)
+    i = soap_array_pointer_lookup(soap, p, a, n, type, &pp);
+  else
+    i = soap_pointer_lookup(soap, p, type, &pp);
+  if (i)
+  { if (soap_is_embedded(soap, pp)
+     || soap_is_single(soap, pp))
+      return 0;
+    soap_set_embedded(soap, pp);
+  }
+  return i;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_lookup(struct soap *soap, const void *p, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (p)
+  { for (pp = soap->pht[soap_hash_ptr(p)]; pp; pp = pp->next)
+    { if (pp->ptr == p && pp->type == type)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d id=%d\n", p, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d: not found\n", p, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_enter(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register int h;
+  register struct soap_plist *pp;
+  if (!soap->pblk || soap->pidx >= SOAP_PTRBLK)
+  { register struct soap_pblk *pb = (struct soap_pblk*)SOAP_MALLOC(soap, sizeof(struct soap_pblk));
+    if (!pb)
+    { soap->error = SOAP_EOM;
+      return 0;
+    }
+    pb->next = soap->pblk;
+    soap->pblk = pb;
+    soap->pidx = 0;
+  }
+  *ppp = pp = &soap->pblk->plist[soap->pidx++];
+  if (a)
+    h = soap_hash_ptr(a->__ptr);
+  else
+    h = soap_hash_ptr(p);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pointer enter location=%p array=%p size=%d dim=%d type=%d id=%d\n", p, a?a->__ptr:NULL, a?a->__size:0, n, type, soap->idnum+1));
+  pp->next = soap->pht[h];
+  pp->type = type;
+  pp->mark1 = 0;
+  pp->mark2 = 0;
+  pp->ptr = p;
+  pp->array = a;
+  soap->pht[h] = pp;
+  pp->id = ++soap->idnum;
+  return pp->id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_pointer_lookup(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (!p || !a->__ptr)
+    return 0;
+  for (pp = soap->pht[soap_hash_ptr(a->__ptr)]; pp; pp = pp->next)
+  { if (pp->type == type && pp->array && pp->array->__ptr == a->__ptr)
+    { register int i;
+      for (i = 0; i < n; i++)
+        if (((const int*)&pp->array->__size)[i] != ((const int*)&a->__size)[i])
+	  break;
+      if (i == n)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d id=%d\n", a->__ptr, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d: not found\n", a->__ptr, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_count(struct soap *soap)
+{ soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) || (soap->omode & SOAP_ENC_DIME))
+    soap->mode = soap->omode | SOAP_IO_LENGTH | SOAP_ENC_DIME;
+  else
+#endif
+  { soap->mode = soap->omode;
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE
+     || (((soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_ENC_XML))
+#ifndef WITH_LEANER
+      && !soap->fpreparesend
+#endif
+      ))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    else
+      soap->mode |= SOAP_IO_LENGTH;
+  }
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (!(soap->mode & SOAP_ENC_DIME))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+    soap->mode |= SOAP_ENC_MIME;
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+  soap->dime.list = soap->dime.last;	/* keep track of last DIME attachment */
+#endif
+  soap->count = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->part = SOAP_BEGIN;
+  soap->idnum = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin count phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+#ifndef WITH_LEANER
+  soap->dime.count = 0; /* count # of attachments */
+  soap->dime.size = 0; /* accumulate total size of attachments */
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+    return soap->error = soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_count(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->fpreparefinal)
+    return soap->error = soap->fpreparefinal(soap);
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of count phase\n"));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_send(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+  soap->mode = soap->omode | (soap->mode & (SOAP_IO_LENGTH | SOAP_ENC_DIME));
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+#ifdef WITH_UDP
+  if ((soap->mode & SOAP_IO_UDP))
+  { soap->mode |= SOAP_ENC_XML;
+    if (soap->count > SOAP_BUFLEN)
+      return soap->error = SOAP_UDP_ERROR;
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_FLUSH && soap_valid_socket(soap->socket))
+  { if (soap->count || (soap->mode & SOAP_IO_LENGTH) || (soap->mode & SOAP_ENC_XML))
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+  soap->mode &= ~SOAP_IO_LENGTH;
+  if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap_new_block(soap);
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+  { soap->mode |= SOAP_ENC_MIME;
+    soap->mode &= ~SOAP_ENC_DIME;
+  }
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket)) /* Set win32 stdout or soap->sendfd to BINARY, e.g. to support DIME */
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->sendfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->sendfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#endif
+  if (soap->mode & SOAP_IO)
+  { soap->bufidx = 0;
+    soap->buflen = 0;
+  }
+  soap->chunksize = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+#ifdef WITH_ZLIB
+  soap->z_ratio_out = 1.0;
+  if ((soap->mode & SOAP_ENC_ZLIB) && soap->zlib_state != SOAP_ZLIB_DEFLATE)
+  {
+#ifdef WITH_GZIP
+    memcpy(soap->z_buf, "\37\213\10\0\0\0\0\0\0\377", 10);
+    soap->d_stream.next_out = (Byte*)soap->z_buf + 10;
+    soap->d_stream.avail_out = SOAP_BUFLEN - 10;
+    soap->z_crc = crc32(0L, NULL, 0);
+    if (deflateInit2(&soap->d_stream, soap->z_level, Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY) != Z_OK)
+#else
+    soap->d_stream.next_out = (Byte*)soap->z_buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    if (deflateInit(&soap->d_stream, soap->z_level) != Z_OK)
+#endif
+      return soap->error = SOAP_ZLIB_ERROR;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflate initialized\n"));
+    soap->zlib_state = SOAP_ZLIB_DEFLATE;
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin send phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+  soap->part = SOAP_BEGIN;
+#ifndef WITH_LEANER
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_embedded(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { pp->mark1 = 1;
+    pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded %p type=%d mark set to 1\n", p, t));
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_reference(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (!p || (soap->mode & SOAP_XML_TREE))
+    return 1;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (soap_pointer_enter(soap, p, NULL, 0, t, &pp))
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  else
+    return 1;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reference %p type=%d (%d %d)\n", p, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_reference(struct soap *soap, const void *p, const struct soap_array *a, int n, int t)
+{ register int i;
+  struct soap_plist *pp;
+  if (!p || !a->__ptr)
+    return 1;
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (i)
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (!soap_pointer_enter(soap, p, a, n, t, &pp))
+    return 1;
+  else
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array reference %p ptr=%p dim=%d type=%d (%d %d)\n", p, a->__ptr, n, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embedded_id(struct soap *soap, int id, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap->mode & SOAP_XML_TREE)
+    return id;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id %p type=%d id=%d\n", p, t, id));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (id < 0)
+    { id = soap_pointer_lookup(soap, p, t, &pp);
+      if (id)
+      { if (soap->mode & SOAP_IO_LENGTH)
+          pp->mark1 = 2;
+        else
+          pp->mark2 = 2;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id multiref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+      }
+      return -1;
+    }
+    return id;
+  }
+  if (id < 0)
+    id = soap_pointer_lookup(soap, p, t, &pp);
+  else if (id && !soap_pointer_lookup(soap, p, t, &pp))
+    return 0;
+  if (id && pp)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      pp->mark1 = 1;
+    else
+      pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id embedded ref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+  }
+  return id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Is embedded? %d %d\n", (int)pp->mark1, (int)pp->mark2));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      return pp->mark1 != 0;
+    return pp->mark2 != 0;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 1;
+  return pp->mark2 == 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_single(struct soap *soap, struct soap_plist *pp)
+{ if (soap->part == SOAP_IN_HEADER)
+    return 1;
+  if (!pp)
+    return 0;
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 0;
+  return pp->mark2 == 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return;
+  if (soap->mode & SOAP_IO_LENGTH)
+    pp->mark1 = 1;
+  else
+    pp->mark2 = 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attachment(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, const char *aid, const char *atype, const char *aoptions, int n, const char *type, int t) 
+{ struct soap_plist *pp;
+  int i;
+  if (!p || !a->__ptr || (!aid && !atype))
+    return soap_element_id(soap, tag, id, p, a, n, type, t);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Attachment tag='%s' id='%s' (%d) type='%s'\n", tag, aid?aid:"", id, atype?atype:""));
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (!i)
+  { i = soap_pointer_enter(soap, p, a, n, t, &pp);
+    if (!i)
+    { soap->error = SOAP_EOM;
+      return -1;
+    }
+  }
+  if (id <= 0)
+    id = i;
+  if (!aid)
+  { sprintf(soap->tmpbuf, soap->dime_id_format, id);
+    aid = soap_strdup(soap, soap->tmpbuf);
+  }
+  /* Add MTOM xop:Include element when necessary */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  if ((soap->mode & SOAP_ENC_MTOM) && strcmp(tag, "xop:Include"))
+  { if (soap_element_begin_out(soap, tag, 0, type)
+     || soap_element_href(soap, "xop:Include", 0, "href", aid)
+     || soap_element_end_out(soap, tag))
+      return soap->error;
+  }
+  else if (soap_element_href(soap, tag, 0, "href", aid))
+    return soap->error;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { if (pp->mark1 != 3)
+    { struct soap_multipart *content;
+      if (soap->mode & SOAP_ENC_MTOM)
+        content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, (char*)a->__ptr, a->__size);
+      else
+        content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, (char*)a->__ptr, a->__size);
+      if (!content)
+      { soap->error = SOAP_EOM;
+        return -1;
+      }
+      if (!strncmp(aid, "cid:", 4)) /* RFC 2111 */
+      { if (soap->mode & SOAP_ENC_MTOM)
+        { char *s = (char*)soap_malloc(soap, strlen(aid) - 1);
+	  if (s)
+	  { *s = '<';
+	    strcpy(s + 1, aid + 4);
+	    strcat(s, ">");
+	    content->id = s;
+          }
+        }
+        else
+          content->id = aid + 4;
+      }
+      else
+        content->id = aid;
+      content->type = atype;
+      content->options = aoptions;
+      content->encoding = SOAP_MIME_BINARY;
+      pp->mark1 = 3;
+    }
+  }
+  else
+    pp->mark2 = 3;
+  return -1;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_iht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+    soap->iht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_iht(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip, *p;
+  register struct soap_flist *fp, *fq;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = p)
+    { for (fp = ip->flist; fp; fp = fq)
+      { fq = fp->next;
+        SOAP_FREE(soap, fp);
+      }
+      p = ip->next;
+      SOAP_FREE(soap, ip);
+    }
+    soap->iht[i] = NULL;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_lookup(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  for (ip = soap->iht[soap_hash(id)]; ip; ip = ip->next)
+    if (!strcmp(ip->id, id))
+      return ip;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_enter(struct soap *soap, const char *id)
+{ register size_t h;
+  register struct soap_ilist *ip;
+  ip = (struct soap_ilist*)SOAP_MALLOC(soap, sizeof(struct soap_ilist) + strlen(id));
+  if (ip)
+  { h = soap_hash(id);
+    strcpy(ip->id, id);
+    ip->next = soap->iht[h];
+    soap->iht[h] = ip;
+    return ip;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_malloc(struct soap *soap, size_t n)
+{ register char *p;
+  if (!n)
+    return (void*)SOAP_NON_NULL;
+  if (!soap)
+    return SOAP_MALLOC(soap, n);
+  n += (-(long)n) & (sizeof(void*)-1); /* align at 4-, 8- or 16-byte boundary */
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(void*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  /* keep chain of alloced cells for later destruction */
+  soap->alloced = 1;
+  *(void**)(p + n) = soap->alist;
+  *(size_t*)(p + n + sizeof(void*)) = n;
+  soap->alist = p + n;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_mht(struct soap *soap)
+{ register int i;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->mht[i] = NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_free_mht(struct soap *soap)
+{ register int i;
+  register struct soap_mlist *mp, *mq;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+  { for (mp = soap->mht[i]; mp; mp = mq)
+    { mq = mp->next;
+      if (mp->live)
+        fprintf(stderr, "%s(%d): malloc() = %p not freed (memory leak or forgot to call soap_end()?)\n", mp->file, mp->line, mp->ptr);
+      free(mp);
+    }
+    soap->mht[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_track_malloc(struct soap *soap, const char *file, int line, size_t size)
+{ register void *p = malloc(size);
+  if (soap)
+  { register int h = soap_hash_ptr(p);
+    register struct soap_mlist *mp = (struct soap_mlist*)malloc(sizeof(struct soap_mlist));
+    if (soap->fdebug[SOAP_INDEX_TEST])
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): malloc(%lu) = %p\n", file, line, (unsigned long)size, p));
+    mp->next = soap->mht[h];
+    mp->ptr = p;
+    mp->file = file;
+    mp->line = line;
+    mp->live = 1;
+    soap->mht[h] = mp;
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_track_free(struct soap *soap, const char *file, int line, void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+  { if (mp->live)
+    { free(p);
+      if (soap->fdebug[SOAP_INDEX_TEST])
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): free(%p)\n", file, line, p));
+      mp->live = 0;
+    }
+    else
+      fprintf(stderr, "%s(%d): free(%p) double free of pointer malloced at %s(%d)\n", file, line, p, mp->file, mp->line);
+  }
+  else
+    fprintf(stderr, "%s(%d): free(%p) pointer not malloced\n", file, line, p);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_track_unlink(struct soap *soap, const void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+    mp->live = 0;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_dealloc(struct soap *soap, void *p)
+{ if (!soap)
+    return;
+  if (p)
+  { register char **q;
+    for (q = (char**)&soap->alist; *q; q = *(char***)q)
+    { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+      { *q = **(char***)q;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Freed data at %p\n", p));
+        SOAP_FREE(soap, p);
+        return;
+      }
+    }
+    soap_delete(soap, p);
+  }
+  else
+  { register char *q;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free all soap_malloc() data\n"));
+    while (soap->alist)
+    { q = (char*)soap->alist;
+      soap->alist = *(void**)q;
+      q -= *(size_t*)(q + sizeof(void*));
+      SOAP_FREE(soap, q);
+    }
+  }
+  /* we must assume these were deallocated: */
+  soap->action = NULL;
+  soap->fault = NULL;
+  soap->header = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->authrealm = NULL;
+#ifndef WITH_LEANER
+  soap_clr_mime(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_delete(struct soap *soap, void *p)
+{ register struct soap_clist **cp;
+  if (soap_check_state(soap))
+    return;
+  cp = &soap->clist;
+  if (p)
+  { while (*cp)
+    { if (p == (*cp)->ptr)
+      { register struct soap_clist *q = *cp;
+        *cp = q->next;
+        q->fdelete(q);
+        SOAP_FREE(soap, q);
+        return;
+      }
+      cp = &(*cp)->next;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: address not in list\n", p));
+  }
+  else
+  { while (*cp)
+    { register struct soap_clist *q = *cp;
+      *cp = q->next;
+      if (q->ptr == (void*)soap->fault)
+        soap->fault = NULL; /* this was deallocated */
+      else if (q->ptr == (void*)soap->header)
+        soap->header = NULL; /* this was deallocated */
+      q->fdelete(q);
+      SOAP_FREE(soap, q);
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_clist *
+SOAP_FMAC2
+soap_link(struct soap *soap, void *p, int t, int n, void (*fdelete)(struct soap_clist*))
+{ register struct soap_clist *cp;
+  if ((cp = (struct soap_clist*)SOAP_MALLOC(soap, sizeof(struct soap_clist))))
+  { cp->next = soap->clist;
+    cp->type = t;
+    cp->size = n; 
+    cp->ptr = p;
+    cp->fdelete = fdelete;
+    soap->clist = cp;
+  }
+  return cp;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_unlink(struct soap *soap, const void *p)
+{ register char **q;
+  register struct soap_clist **cp;
+  if (!soap || !p)
+    return;
+  for (q = (char**)&soap->alist; *q; q = *(char***)q)
+  { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+    { *q = **(char***)q;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked data %p\n", p));
+#ifdef SOAP_DEBUG
+      soap_track_unlink(soap, p);
+#endif
+      return;
+    }
+  }
+  for (cp = &soap->clist; *cp; cp = &(*cp)->next)
+  { if (p == (*cp)->ptr)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked class instance %p\n", p));
+      q = (char**)*cp;
+      *cp = (*cp)->next;
+      SOAP_FREE(soap, q);
+      return;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_lookup_type(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  if (id && *id)
+  { ip = soap_lookup(soap, id);
+    if (ip)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup id='%s' type=%d\n", id, ip->type));
+      return ip->type;
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "lookup type id='%s' NOT FOUND! Need to get it from xsi:type\n", id));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, unsigned int k)
+{ struct soap_ilist *ip;
+  void **q;
+  if (!p || !id || !*id)
+    return p;
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding first href='%s' type=%d %p (%u bytes)\n", id, t, p, (unsigned int)n));
+    ip->type = t;
+    ip->size = n; 
+    ip->link = p;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->ptr = NULL;
+    ip->level = k;
+    *p = NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolved href='%s' type=%d location=%p (%u bytes)\n", id, t, ip->ptr, (unsigned int)n));
+    if (ip->type != t)
+    { strcpy(soap->id, id);
+      soap->error = SOAP_HREF;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility: id type=%d href type=%d\n", ip->type, t));
+      return NULL;
+    }
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      if (!q)
+        return NULL;
+      *p = (void*)q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    *p = ip->ptr;
+  }
+  else if (ip->level > k)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving level %u pointers to href='%s'\n", ip->level, id));
+    while (ip->level > k)
+    { void *s, **r = &ip->link;
+      q = (void**)ip->link;
+      while (q)
+      { *r = (void*)soap_malloc(soap, sizeof(void*));
+        s = *q;
+        *q = *r;
+        r = (void**)*r;
+        q = (void**)s;
+      }
+      *r = NULL;
+      ip->size = n; 
+      ip->copy = NULL;
+      ip->level = ip->level - 1;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarded href='%s' type=%d location=%p (%u bytes)\n", id, t, p, (unsigned int)n));
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      *p = q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_forward(struct soap *soap, const char *href, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t))
+{ struct soap_ilist *ip;
+  if (!p || !href || !*href)
+    return p;
+  ip = soap_lookup(soap, href); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, href); /* new hash table entry for string id */
+    ip->type = st;
+    ip->size = n;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->ptr = NULL;
+    ip->level = 0;
+    ip->flist = NULL;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry href='%s' type=%d size=%lu level=%d location=%p\n", href, st, (unsigned long)n, k, p));
+  }
+  else if (ip->type != st || (ip->level == k && ip->size != n))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", href, ip->type, (unsigned long)ip->size, k, st, (unsigned long)n));
+    strcpy(soap->id, href);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  if (fcopy || n < sizeof(void*) || *href != '#')
+  { register struct soap_flist *fp = (struct soap_flist*)SOAP_MALLOC(soap, sizeof(struct soap_flist));
+    if (!fp)
+    { soap->error = SOAP_EOM;
+      return NULL;
+    }
+    fp->next = ip->flist;
+    fp->type = tt;
+    fp->ptr = p;
+    fp->level = k;
+    fp->len = len;
+    if (fcopy)
+      fp->fcopy = fcopy;
+    else
+      fp->fcopy = soap_fcopy;
+    ip->flist = fp;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding type=%d (target type=%d) size=%lu location=%p level=%u len=%lu href='%s'\n", st, tt, (unsigned long)n, p, k, (unsigned long)len, href));
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding copying address %p for type=%d href='%s'\n", p, st, href));
+    *(void**)p = ip->copy;
+    ip->copy = p;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*))
+{
+#ifndef WITH_NOIDREF
+  struct soap_ilist *ip;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Enter id='%s' type=%d loc=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  soap->alloced = 0;
+  if (!p)
+  { if (finstantiate)
+      p = finstantiate(soap, t, type, arrayType, &n);
+    else
+      p = soap_malloc(soap, n);
+    if (p)
+      soap->alloced = 1;
+  }
+#ifndef WITH_NOIDREF
+  if (!id || !*id)
+#endif
+    return p;
+#ifndef WITH_NOIDREF
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Lookup entry id='%s for location=%p'\n", id, p));
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    ip->type = t;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry id='%s' type=%d size=%lu level=%u location=%p\n", id, t, (unsigned long)n, k, p));
+  }
+  else if ((ip->type != t || (ip->level == k && ip->size != n)) && (ip->copy || ip->flist))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", id, ip->type, (unsigned long)ip->size, k, t, (unsigned long)n));
+    strcpy(soap->id, id);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Multiply defined id='%s'\n", id));
+    strcpy(soap->id, id);
+    soap->error = SOAP_DUPLICATE_ID;
+    return NULL;
+  }
+  else 
+  { ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update entry id='%s' type=%d location=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  }
+  return ip->ptr;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{ DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Copying data type=%d (target type=%d) %p -> %p (%lu bytes)\n", st, tt, q, p, (unsigned long)n));
+  memcpy(p, q, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_send(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->dime.list)
+  { /* SOAP body referenced attachments must appear first */
+    soap->dime.last->next = soap->dime.first;
+    soap->dime.first = soap->dime.list->next;
+    soap->dime.list->next = NULL;
+    soap->dime.last = soap->dime.list;
+  }
+  if (soap_putdime(soap) || soap_putmime(soap))
+    return soap->error;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End send\n"));
+  if (soap->mode & SOAP_IO) /* need to flush the remaining data in buffer */
+  { if (soap_flush(soap))
+#ifdef WITH_ZLIB
+    { if (soap->mode & SOAP_ENC_ZLIB && soap->zlib_state == SOAP_ZLIB_DEFLATE)
+      { soap->zlib_state = SOAP_ZLIB_NONE;
+        deflateEnd(&soap->d_stream);
+      }
+      return soap->error;
+    }
+#else
+      return soap->error;
+#endif
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { int r;
+      soap->d_stream.avail_in = 0;
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating remainder\n"));
+        r = deflate(&soap->d_stream, Z_FINISH);
+        if (soap->d_stream.avail_out != SOAP_BUFLEN)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN - soap->d_stream.avail_out))
+          { soap->zlib_state = SOAP_ZLIB_NONE;
+            deflateEnd(&soap->d_stream);
+            return soap->error;
+	  }
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (r == Z_OK);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+      soap->z_ratio_out = (float)soap->d_stream.total_out / (float)soap->d_stream.total_in;
+      soap->mode &= ~SOAP_ENC_ZLIB;
+      soap->zlib_state = SOAP_ZLIB_NONE;
+      if (deflateEnd(&soap->d_stream) != Z_OK || r != Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to end deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+#ifdef WITH_GZIP
+      soap->z_buf[0] = soap->z_crc & 0xFF;
+      soap->z_buf[1] = (soap->z_crc >> 8) & 0xFF;
+      soap->z_buf[2] = (soap->z_crc >> 16) & 0xFF;
+      soap->z_buf[3] = (soap->z_crc >> 24) & 0xFF;
+      soap->z_buf[4] = soap->d_stream.total_in & 0xFF;
+      soap->z_buf[5] = (soap->d_stream.total_in >> 8) & 0xFF;
+      soap->z_buf[6] = (soap->d_stream.total_in >> 16) & 0xFF;
+      soap->z_buf[7] = (soap->d_stream.total_in >> 24) & 0xFF;
+      if (soap_flush_raw(soap, soap->z_buf, 8))
+        return soap->error;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip crc32=%lu\n", (unsigned long)soap->z_crc));
+#endif
+    }
+#endif
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    { char *p;
+#ifndef WITH_NOHTTP
+      if (!(soap->mode & SOAP_ENC_XML))
+      { soap->mode--;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending buffered message of length %u\n", (unsigned int)soap->blist->size));
+        if (soap->status >= SOAP_POST)
+          soap->error = soap->fpost(soap, soap->endpoint, soap->host, soap->port, soap->path, soap->action, soap->blist->size);
+        else if (soap->status != SOAP_STOP)
+          soap->error = soap->fresponse(soap, soap->status, soap->blist->size);
+        if (soap->error || soap_flush(soap))
+          return soap->error;
+        soap->mode++;
+      }
+#endif
+      for (p = soap_first_block(soap); p; p = soap_next_block(soap))
+      { DBGMSG(SENT, p, soap_block_size(soap));
+        if ((soap->error = soap->fsend(soap, p, soap_block_size(soap))))
+        { soap_end_block(soap);
+          return soap->error;
+        }
+      }
+      soap_end_block(soap);
+    }
+#ifndef WITH_LEANER
+    else if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { DBGMSG(SENT, "\r\n0\r\n\r\n", 7);
+      if ((soap->error = soap->fsend(soap, "\r\n0\r\n\r\n", 7)))
+        return soap->error;
+    }
+#endif
+  }
+#ifdef WITH_TCPFIN
+#ifdef WITH_OPENSSL
+  if (!soap->ssl && soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#else
+  if (soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#endif
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of send phase\n"));
+  soap->omode &= ~SOAP_XML_SEC;
+  soap->count = 0;
+  soap->part = SOAP_END;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_recv(struct soap *soap)
+{ soap->part = SOAP_END;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) && soap_getdime(soap))
+    return soap->error;
+  soap->dime.list = soap->dime.first;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  if ((soap->mode & SOAP_ENC_MIME) && soap_getmime(soap))
+    return soap->error;
+  soap->mime.list = soap->mime.first;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "End of receive message ok\n"));
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { soap->mode &= ~SOAP_ENC_ZLIB;
+    memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+    soap->bufidx = (char*)soap->d_stream.next_in - soap->z_buf;
+    soap->buflen = soap->z_buflen;
+    soap->zlib_state = SOAP_ZLIB_NONE;
+    if (inflateEnd(&soap->d_stream) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+#ifdef WITH_GZIP
+    if (soap->zlib_in == SOAP_ZLIB_GZIP)
+    { soap_wchar c;
+      short i;
+      for (i = 0; i < 8; i++)
+      { if ((int)(c = soap_getchar(soap)) == EOF)
+          return soap->error = SOAP_EOF;
+        soap->z_buf[i] = (char)c;
+      }
+      if (soap->z_crc != ((uLong)(unsigned char)soap->z_buf[0] | ((uLong)(unsigned char)soap->z_buf[1] << 8) | ((uLong)(unsigned char)soap->z_buf[2] << 16) | ((uLong)(unsigned char)soap->z_buf[3] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: crc check failed, message corrupted? (crc32=%lu)\n", (unsigned long)soap->z_crc));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+      if (soap->d_stream.total_out != ((uLong)(unsigned char)soap->z_buf[4] | ((uLong)(unsigned char)soap->z_buf[5] << 8) | ((uLong)(unsigned char)soap->z_buf[6] << 16) | ((uLong)(unsigned char)soap->z_buf[7] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: incorrect message length\n"));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+    }
+#endif
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    while ((int)soap_getchar(soap) != EOF) /* advance to last chunk */
+      ;
+  if (soap->fdisconnect && (soap->error = soap->fdisconnect(soap)))
+    return soap->error;
+#ifndef WITH_NOIDREF
+  return soap_resolve(soap);
+#else
+#ifndef WITH_LEANER
+  if (soap->xlist)
+  { if (soap->mode & SOAP_ENC_MTOM)
+      return soap->error = SOAP_MIME_HREF;
+    return soap->error = SOAP_DIME_HREF;
+  }
+#endif
+  return SOAP_OK;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free(struct soap *soap)
+{ register struct Namespace *ns;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free namespace stack\n"));
+  while (soap->nlist)
+  { register struct soap_nlist *np = soap->nlist->next;
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free any remaining temp blocks\n"));
+  while (soap->blist)
+    soap_end_block(soap);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute storage\n"));
+  while (soap->attributes)
+  { register struct soap_attribute *tp = soap->attributes->next;
+    if (soap->attributes->value)
+      SOAP_FREE(soap, soap->attributes->value);
+    SOAP_FREE(soap, soap->attributes);
+    soap->attributes = tp;
+  }
+#ifdef WITH_FAST
+  if (soap->labbuf)
+    SOAP_FREE(soap, soap->labbuf);
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  ns = soap->local_namespaces;
+  if (ns)
+  { for (; ns->id; ns++)
+    { if (ns->out)
+      { if (soap->encodingStyle == ns->out)
+          soap->encodingStyle = SOAP_STR_EOS;
+        SOAP_FREE(soap, ns->out);
+        ns->out = NULL;
+      }
+      if (soap->encodingStyle == ns->ns)
+        soap->encodingStyle = SOAP_STR_EOS;
+    }
+    SOAP_FREE(soap, soap->local_namespaces);
+    soap->local_namespaces = NULL;
+  }
+#ifndef WITH_LEANER
+  while (soap->xlist)
+  { struct soap_xlist *xp = soap->xlist->next;
+    SOAP_FREE(soap, soap->xlist);
+    soap->xlist = xp;
+  }
+#endif
+#ifndef WITH_NOIDREF
+  soap_free_pht(soap);
+  soap_free_iht(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_logs(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { soap->logfile[i] = NULL;
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEAN) || defined(SOAP_DEBUG)
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_open_logfile(struct soap *soap, int i)
+{ if (soap->logfile[i])
+    soap->fdebug[i] = fopen(soap->logfile[i], i < 2 ? "ab" : "a");
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_close_logfile(struct soap *soap, int i)
+{ if (soap->fdebug[i])
+  { fclose(soap->fdebug[i]);
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_close_logfiles(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+    soap_close_logfile(soap, i);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_set_logfile(struct soap *soap, int i, const char *logfile)
+{ char *s = NULL;
+  soap_close_logfile(soap, i);
+  if (soap->logfile[i])
+    SOAP_FREE(soap, (void*)soap->logfile[i]);
+  if (logfile)
+    if ((s = (char*)SOAP_MALLOC(soap, strlen(logfile) + 1)))
+      strcpy(s, logfile);
+  soap->logfile[i] = s;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_recv_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_RECV, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_sent_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_SENT, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_test_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_TEST, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy(struct soap *soap)
+{ return soap_copy_context((struct soap*)malloc(sizeof(struct soap)), soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy_context(struct soap *copy, struct soap *soap)
+{ if (soap_check_state(soap))
+    return NULL;
+  if (copy)
+  { register struct soap_plugin *p;
+    memcpy(copy, soap, sizeof(struct soap));
+    copy->state = SOAP_COPY;
+    copy->user = NULL;
+    copy->error = SOAP_OK;
+    copy->userid = NULL;
+    copy->passwd = NULL;
+    copy->nlist = NULL;
+    copy->blist = NULL;
+    copy->clist = NULL;
+    copy->alist = NULL;
+    copy->attributes = NULL;
+#ifdef WITH_FAST
+    copy->labbuf = NULL;
+    copy->lablen = 0;
+    copy->labidx = 0;
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_mht(copy);
+#endif
+    copy->local_namespaces = NULL;
+#ifndef WITH_NOIDREF
+    soap_init_iht(copy);
+    soap_init_pht(copy);
+#endif
+    copy->header = NULL;
+    copy->fault = NULL;
+    copy->action = NULL;
+#ifndef WITH_LEAN
+#ifdef WITH_COOKIES
+    copy->cookies = soap_copy_cookies(copy);
+#else
+    copy->cookies = NULL;
+#endif
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_logs(copy);
+    soap_set_recv_logfile(copy, soap->logfile[SOAP_INDEX_RECV]);
+    soap_set_sent_logfile(copy, soap->logfile[SOAP_INDEX_SENT]);
+    soap_set_test_logfile(copy, soap->logfile[SOAP_INDEX_TEST]);
+#endif
+    copy->plugins = NULL;
+    for (p = soap->plugins; p; p = p->next)
+    { register struct soap_plugin *q = (struct soap_plugin*)SOAP_MALLOC(copy, sizeof(struct soap_plugin));
+      if (!q)
+        return NULL;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying plugin '%s'\n", p->id));
+      *q = *p;
+      if (p->fcopy && (soap->error = p->fcopy(copy, q, p)))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not copy plugin '%s'\n", p->id));
+        SOAP_FREE(copy, q);
+        return NULL;
+      }
+      q->next = copy->plugins;
+      copy->plugins = q;
+    }
+  }
+  else
+    soap->error = SOAP_EOM;
+  return copy;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init(struct soap *soap)
+{ soap->state = SOAP_INIT;
+  soap->version = 0;
+  soap_imode(soap, SOAP_IO_DEFAULT);
+  soap_omode(soap, SOAP_IO_DEFAULT);
+  soap->plugins = NULL;
+  soap->user = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+  soap->fconnect = NULL;
+  soap->fdisconnect = NULL;
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+  soap->fplugin = fplugin;
+#ifndef WITH_LEANER
+  soap->fdimereadopen = NULL;
+  soap->fdimewriteopen = NULL;
+  soap->fdimereadclose = NULL;
+  soap->fdimewriteclose = NULL;
+  soap->fdimeread = NULL;
+  soap->fdimewrite = NULL;
+#endif
+  soap->float_format = "%.8g"; /* .8 preserves single FP precision as much as possible, but might not be very efficient */
+  soap->double_format = "%.17lg"; /* .17 preserves double FP precision as much as possible, but might not be very efficient */
+  soap->dime_id_format = "cid:id%d"; /* default DIME id format */
+  soap->http_version = "1.1";
+  soap->actor = NULL;
+  soap->max_keep_alive = SOAP_MAXKEEPALIVE;
+  soap->keep_alive = 0;
+  soap->recv_timeout = 0;
+  soap->send_timeout = 0;
+  soap->connect_timeout = 0;
+  soap->accept_timeout = 0;
+  soap->socket_flags = 0;
+  soap->connect_flags = 0;
+  soap->bind_flags = 0;
+  soap->accept_flags = 0;
+  soap->ip = 0;
+#ifdef WITH_FAST
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  soap->encodingStyle = SOAP_STR_EOS;
+#ifndef WITH_NONAMESPACES
+  soap->namespaces = namespaces;
+#else
+  soap->namespaces = NULL;
+#endif
+  soap->local_namespaces = NULL;
+  soap->nlist = NULL;
+  soap->blist = NULL;
+  soap->clist = NULL;
+  soap->alist = NULL;
+  soap->attributes = NULL;
+  soap->header = NULL;
+  soap->fault = NULL;
+  soap->master = SOAP_INVALID_SOCKET;
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->os = NULL;
+  soap->is = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifndef UNDER_CE
+  soap->recvfd = 0;
+  soap->sendfd = 1;
+#else
+  soap->recvfd = stdin;
+  soap->sendfd = stdout;
+#endif 
+  soap->host[0] = '\0';
+  soap->port = 0;
+  soap->action = NULL;
+  soap->proxy_host = NULL;
+  soap->proxy_port = 8080;
+  soap->proxy_userid = NULL;
+  soap->proxy_passwd = NULL;
+  soap->authrealm = NULL;
+  soap->prolog = NULL;
+#ifdef WITH_OPENSSL
+  if (!ssl_init_done)
+    soap_ssl_init();
+  soap->fsslauth = ssl_auth_init;
+  soap->fsslverify = ssl_verify_callback;
+  soap->bio = NULL;
+  soap->ssl = NULL;
+  soap->ctx = NULL;
+  soap->require_server_auth = 0;
+  soap->require_client_auth = 0;
+  soap->rsa = 0;
+  soap->keyfile = NULL;
+  soap->password = NULL;
+  soap->dhfile = NULL;
+  soap->cafile = NULL;
+  soap->capath = NULL;
+  soap->crlfile = NULL;
+  soap->randfile = NULL;
+  soap->session = NULL;
+#endif
+#ifdef WITH_ZLIB
+  soap->zlib_state = SOAP_ZLIB_NONE;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.zalloc = NULL;
+  soap->d_stream.zfree = NULL;
+  soap->d_stream.opaque = NULL;
+  soap->z_level = 6;
+#endif
+#ifndef WITH_LEAN
+  soap->c14ninclude = NULL;
+  soap->c14nexclude = NULL;
+  soap->cookies = NULL;
+  soap->cookie_domain = NULL;
+  soap->cookie_path = NULL;
+  soap->cookie_max = 32;
+#endif
+#ifdef SOAP_DEBUG
+  soap_init_mht(soap);
+  soap_init_logs(soap);
+  soap_set_recv_logfile(soap, "RECV.log");
+  soap_set_sent_logfile(soap, "SENT.log");
+  soap_set_test_logfile(soap, NULL);
+#endif
+#ifdef WMW_RPM_IO
+  soap->rpmreqid = NULL;
+#endif
+#ifdef PALM
+  palmNetLibOpen();
+#endif
+#ifndef WITH_NOIDREF
+  soap_init_iht(soap);
+  soap_init_pht(soap);
+#endif
+  soap_begin(soap);
+#ifdef SOAP_DEBUG
+  soap_set_test_logfile(soap, "TEST.log");
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init1(struct soap *soap, soap_mode mode)
+{ soap_init2(soap, mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init2(struct soap *soap, soap_mode imode, soap_mode omode)
+{ soap_init(soap);
+  soap_imode(soap, imode);
+  soap_omode(soap, omode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_begin(struct soap *soap)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing\n"));
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+  soap->null = 0;
+  soap->position = 0;
+  soap->encoding = 0;
+  soap->mustUnderstand = 0;
+  soap->mode = 0;
+  soap->ns = 0;
+  soap->part = SOAP_END;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  soap->error = SOAP_OK;
+  soap->peeked = 0;
+  soap->ahead = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+  soap->endpoint[0] = '\0';
+#ifndef WITH_LEANER
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+#endif
+  soap_free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end(struct soap *soap)
+{ register struct soap_clist *cp;
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  soap_dealloc(soap, NULL);
+  while (soap->clist)
+  { cp = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = cp;
+  }
+  soap_closesock(soap);
+#ifdef SOAP_DEBUG
+  soap_close_logfiles(soap);
+#endif
+#ifdef PALM
+  palmNetLibClose();
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_namespaces(struct soap *soap, struct Namespace *p)
+{ register struct Namespace *ns = soap->local_namespaces;
+  register struct soap_nlist *np, *nq, *nr;
+  register unsigned int level = soap->level;
+  soap->namespaces = p;
+  soap->local_namespaces = NULL;
+  soap_set_local_namespaces(soap);
+  /* reverse the namespace list */
+  np = soap->nlist;
+  soap->nlist = NULL;
+  if (np)
+  { nq = np->next;
+    np->next = NULL;
+    while (nq)
+    { nr = nq->next;
+      nq->next = np;
+      np = nq;
+      nq = nr;
+    }
+  }
+  /* then push on new stack */
+  while (np)
+  { register const char *s;
+    soap->level = np->level; /* preserve element nesting level */
+    s = np->ns;
+    if (!s && np->index >= 0 && ns)
+    { s = ns[np->index].out;
+      if (!s)
+        s = ns[np->index].ns;
+    }
+    if (s && soap_push_namespace(soap, np->id, s))
+      return soap->error;
+    nq = np;
+    np = np->next;
+    SOAP_FREE(soap, nq);
+  }
+  if (ns)
+  { register int i;
+    for (i = 0; ns[i].id; i++)
+    { if (ns[i].out)
+      { SOAP_FREE(soap, ns[i].out);
+        ns[i].out = NULL;
+      }
+    }
+    SOAP_FREE(soap, ns);
+  }
+  soap->level = level; /* restore level */
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_local_namespaces(struct soap *soap)
+{ if (soap->namespaces && !soap->local_namespaces)
+  { register const struct Namespace *ns1;
+    register struct Namespace *ns2;
+    register size_t n = 1;
+    for (ns1 = soap->namespaces; ns1->id; ns1++)
+      n++;
+    n *= sizeof(struct Namespace);
+    ns2 = (struct Namespace*)SOAP_MALLOC(soap, n);
+    if (ns2)
+    { memcpy(ns2, soap->namespaces, n);
+      if (ns2[0].ns)
+      { if (!strcmp(ns2[0].ns, soap_env1))
+          soap->version = 1;
+        else
+          soap->version = 2;
+      }
+      soap->local_namespaces = ns2;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+#ifndef PALM_1
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_strsearch(const char *big, const char *little)
+{ size_t n = strlen(little);
+  const char *s = big;
+  while (s) 
+  { if (!strncmp(s, little, n) && (s[n] == '\0' || s[n] == ' '))
+      return s;
+    s = strchr(s, ' ');
+    if (s)
+      s++;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_lookup_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np;
+  for (np = soap->nlist; np; np = np->next)
+  { if (!strncmp(np->id, tag, n) && !np->id[n])
+      return np;
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized)
+{ register struct soap_nlist *np;
+  size_t n, k;
+  if (soap_strsearch(soap->c14nexclude, id))
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns?ns:""));
+  if (!utilized)
+  { for (np = soap->nlist; np; np = np->next)
+    { if (!strcmp(np->id, id) && (!np->ns || !strcmp(np->ns, ns)))
+        break;
+    }
+    if (np)
+    { if (np->index == 1)
+        utilized = np->index;
+      else
+        return NULL;
+    }
+  }
+  n = strlen(id);
+  if (ns)
+    k = strlen(ns);
+  else
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k + 1);
+  if (!np)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  np->next = soap->nlist;
+  soap->nlist = np;
+  strcpy(np->id, id);
+  if (ns)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+  }
+  else
+    np->ns = NULL;
+  np->level = soap->level;
+  np->index = utilized;
+  return np;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_utilize_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np = soap_lookup_ns(soap, tag, n);
+  if (np)
+  { if (np->index == 0)
+      soap_push_ns(soap, np->id, np->ns, 1);
+  }
+  else
+  { strncpy(soap->tmpbuf, tag, n);
+    soap->tmpbuf[n] = '\0';
+    soap_push_ns(soap, soap->tmpbuf, NULL, 1);
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_pop_ns(struct soap *soap)
+{ soap_pop_namespace(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element(struct soap *soap, const char *tag, int id, const char *type)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element begin tag='%s' id='%d' type='%s'\n", tag, id, type?type:""));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->soap = soap;
+    elt->next = NULL;
+    elt->prnt = soap->dom;
+    elt->name = soap_strdup(soap, tag);
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->nstr = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->node = NULL;
+    elt->type = 0;
+    elt->head = NULL;
+    elt->tail = NULL;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+  }
+  else
+  {
+#endif
+    soap->level++;
+#ifndef WITH_LEAN
+    if (!soap->ns)
+    { if (!(soap->mode & SOAP_XML_CANONICAL)
+       && soap_send(soap, soap->prolog ? soap->prolog : "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"))
+        return soap->error;
+    }
+    else if (soap->mode & SOAP_XML_INDENT)
+    { if (soap->ns == 1 && soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+      soap->body = 1;
+    }
+#endif
+    if (soap_send_raw(soap, "<", 1)
+     || soap_send(soap, tag))
+      return soap->error;
+#ifdef WITH_DOM
+  }
+#endif
+  if (!soap->ns)
+  { struct Namespace *ns;
+    for (ns = soap->local_namespaces; ns && ns->id; ns++)
+    { if (*ns->id && (ns->out || ns->ns))
+      { sprintf(soap->tmpbuf, "xmlns:%s", ns->id);
+        if (soap_attribute(soap, soap->tmpbuf, ns->out ? ns->out : ns->ns))
+          return soap->error;
+      }
+    }   
+  }
+  soap->ns = 1; /* start with 0 or 2, but should be one to continue */
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { const char *s = strchr(tag, ':');
+    if (s)
+      soap_utilize_ns(soap, tag, s - tag);
+  }
+#endif
+  if (id > 0)
+  { sprintf(soap->tmpbuf, "_%d", id);
+    if (soap_attribute(soap, "id", soap->tmpbuf))
+      return soap->error;
+  }
+  if (type && *type)
+  { if (soap_attribute(soap, "xsi:type", type))
+      return soap->error;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { const char *s = strchr(type, ':');
+      if (s)
+        soap_utilize_ns(soap, type, s - type);
+    }
+#endif
+  }
+  if (soap->null && soap->position > 0)
+  { int i;
+    sprintf(soap->tmpbuf, "[%d", soap->positions[0]);
+    for (i = 1; i < soap->position; i++)
+      sprintf(soap->tmpbuf + strlen(soap->tmpbuf), ",%d", soap->positions[i]);
+    strcat(soap->tmpbuf, "]");
+    if (soap_attribute(soap, "SOAP-ENC:position", soap->tmpbuf))
+      return soap->error;
+  }
+  if (soap->mustUnderstand)
+  { if (soap->actor && *soap->actor)
+    { if (soap_attribute(soap, soap->version == 2 ? "SOAP-ENV:role" : "SOAP-ENV:actor", soap->actor))
+        return soap->error;
+    }
+    if (soap_attribute(soap, "SOAP-ENV:mustUnderstand", soap->version == 2 ? "true" : "1"))
+      return soap->error;
+    soap->mustUnderstand = 0;
+  }
+  if (soap->encoding)
+  { if (soap->encodingStyle && soap->local_namespaces)
+    { if (!*soap->encodingStyle)
+      { if (soap->local_namespaces[1].out)
+          soap->encodingStyle = soap->local_namespaces[1].out;
+        else
+          soap->encodingStyle = soap->local_namespaces[1].ns;
+      }
+      if (soap_attribute(soap, "SOAP-ENV:encodingStyle", soap->encodingStyle))
+        return soap->error;
+    }
+    soap->encoding = 0;
+  }
+  soap->null = 0;
+  soap->position = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_out(struct soap *soap, const char *tag, int id, const char *type)
+{ if (*tag == '-')
+    return SOAP_OK;
+  if (soap_element(soap, tag, id, type))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRRCHR
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_strrchr(const char *s, int t)
+{ register char *r = NULL;
+  while (*s)
+    if (*s++ == t)
+      r = (char*)s - 1;
+  return r;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOL
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_strtol(const char *s, char **t, int b)
+{ register long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { short neg = 0;
+    if (*s == '-')
+    { s++;
+      neg = 1;
+    }
+    else if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 214748364 && (n > 214748364 || c >= '8'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+    if (neg)
+      n = -n;
+  }
+  else /* b == 16 and value is always positive */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x07FFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOUL
+SOAP_FMAC1
+unsigned long
+SOAP_FMAC2
+soap_strtoul(const char *s, char **t, int b)
+{ unsigned long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 429496729 && (n > 429496729 || c >= '6'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+  }
+  else /* b == 16 */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x0FFFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_begin_out(struct soap *soap, const char *tag, int id, const char *type, const char *offset)
+{ if (soap_element(soap, tag, id, "SOAP-ENC:Array"))
+    return soap->error;
+  if (soap->version == 2)
+  { const char *s;
+    s = soap_strrchr(type, '[');
+    if ((size_t)(s - type) < sizeof(soap->tmpbuf))
+    { strncpy(soap->tmpbuf, type, s - type);
+      soap->tmpbuf[s - type] = '\0';
+      if (type && *type && (soap_attribute(soap, "SOAP-ENC:itemType", soap->tmpbuf)))
+        return soap->error;
+      if (s && (soap_attribute(soap, "SOAP-ENC:arraySize", s + 1)))
+        return soap->error;
+    }
+  }
+  else
+  { if (offset && (soap_attribute(soap, "SOAP-ENC:offset", offset)))
+      return soap->error;
+    if (type && *type && (soap_attribute(soap, "SOAP-ENC:arrayType", type)))
+      return soap->error;
+  }
+#ifndef WITH_LEAN
+  if (type && *type && (soap->mode & SOAP_XML_CANONICAL))
+  { const char *s = strchr(type, ':');
+    if (s)
+      soap_utilize_ns(soap, type, s - type);
+  }
+#endif
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_start_end_out(struct soap *soap, const char *tag)
+{ register struct soap_attribute *tp;
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att;
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { att = &soap->dom->atts;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible)
+      { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+	if (!*att)
+	  return soap->error = SOAP_EOM;
+	(*att)->next = NULL;
+        (*att)->nstr = NULL;
+        (*att)->name = soap_strdup(soap, tp->name);
+        (*att)->data = soap_strdup(soap, tp->value);
+        (*att)->wide = NULL;
+        (*att)->soap = soap;
+        tp->visible = 0;
+      }
+    }
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { struct soap_nlist *np;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible && tp->name)
+      { const char *s = strchr(tp->name, ':');
+        if (s)
+          soap_utilize_ns(soap, tp->name, s - tp->name);
+      }
+    }
+    for (np = soap->nlist; np; np = np->next)
+    { if (np->index == 1 && np->ns)
+      { sprintf(soap->tmpbuf, "xmlns:%s", np->id);
+        soap_set_attr(soap, soap->tmpbuf, np->ns);
+        np->index = 2;
+      }
+    }
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible)
+    { if (soap_send(soap, " ") || soap_send(soap, tp->name))
+        return soap->error;
+      if (tp->visible == 2 && tp->value)
+        if (soap_send_raw(soap, "=\"", 2)
+	 || soap_string_out(soap, tp->value, 1)
+	 || soap_send_raw(soap, "\"", 1))
+          return soap->error;
+      tp->visible = 0;
+    }
+  }
+  if (tag)
+  { 
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { if (soap_send_raw(soap, ">", 1)
+       || soap_element_end_out(soap, tag))
+        return soap->error;
+    }
+    else
+#endif
+    soap->level--;	/* decrement level just before /> */
+    if (soap_send_raw(soap, "/>", 2))
+      return soap->error;
+    return SOAP_OK;
+  }
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_out(struct soap *soap, const char *tag)
+{ if (*tag == '-')
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element ending tag='%s'\n", tag));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+    soap_pop_ns(soap);
+  if (soap->mode & SOAP_XML_INDENT)
+  { if (!soap->body)
+    { if (soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+    }
+    soap->body = 0;
+  }
+#endif
+  if (soap_send_raw(soap, "</", 2)
+   || soap_send(soap, tag))
+    return soap->error;
+  soap->level--;	/* decrement level just before > */
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_ref(struct soap *soap, const char *tag, int id, int href)
+{ register int n = 0;
+  if (soap->version == 2)
+    n = 1;
+  sprintf(soap->href, "#_%d", href);
+  return soap_element_href(soap, tag, id, "href" + n, soap->href + n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_href(struct soap *soap, const char *tag, int id, const char *ref, const char *val)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element '%s' reference %s='%s'\n", tag, ref, val));
+  if (soap_element(soap, tag, id, NULL)
+   || soap_attribute(soap, ref, val)
+   || soap_element_start_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_null(struct soap *soap, const char *tag, int id, const char *type)
+{ struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (tp->visible)
+      break;
+  if (tp || (soap->version == 2 && soap->position > 0) || id > 0 || (soap->mode & SOAP_XML_NIL))
+  { if (soap_element(soap, tag, id, type))
+      return soap->error;
+    if (soap->part != SOAP_IN_HEADER && soap->encodingStyle)
+      if (soap_attribute(soap, "xsi:nil", "true"))
+        return soap->error;
+    return soap_element_start_end_out(soap, tag);
+  }
+  soap->null = 1;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_id(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, int n, const char *type, int t) 
+{ if (!p || (a && !a->__ptr))
+  { soap_element_null(soap, tag, id, type);
+    return -1;
+  }
+#ifndef WITH_NOIDREF
+  if (soap->mode & SOAP_XML_TREE)
+    return 0;
+  if (id < 0)
+  { struct soap_plist *pp;
+    if (a)
+      id = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+    else
+      id = soap_pointer_lookup(soap, p, t, &pp);
+    if (id)
+    { if (soap_is_embedded(soap, pp))
+      { soap_element_ref(soap, tag, 0, id);
+        return -1;
+      }
+      if (soap_is_single(soap, pp))
+        return 0;
+      soap_set_embedded(soap, pp);
+    }
+  }
+  return id;
+#else
+  return 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_result(struct soap *soap, const char *tag)
+{ if (soap->version == 2 && soap->encodingStyle)
+    if (soap_element(soap, "SOAP-RPC:result", 0, NULL)
+     || soap_attribute(soap, "xmlns:SOAP-RPC", soap_rpc)
+     || soap_element_start_end_out(soap, NULL)
+     || soap_string_out(soap, tag, 0)
+     || soap_element_end_out(soap, "SOAP-RPC:result"))
+      return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attribute(struct soap *soap, const char *name, const char *value)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+    a->next = soap->dom->atts;
+    a->nstr = NULL;
+    a->name = soap_strdup(soap, name);
+    a->data = soap_strdup(soap, value);
+    a->wide = NULL;
+    a->soap = soap;
+    soap->dom->atts = a;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { /* TODO: consider using this code to handle default namespace
+    if (!strncmp(name, "xmlns", 5) && (name[5] == ':' || name[5] == '\0'))
+    { if (name[5] == ':')
+        soap_push_ns(soap, name + 6, value, 0);
+      else
+        soap_push_ns(soap, "", value, 0);
+    }
+    */
+    if (!strncmp(name, "xmlns:", 6))
+      soap_push_ns(soap, name + 6, value, 0);
+    else if (soap_set_attr(soap, name, value))
+      return soap->error;
+  }
+  else
+#endif
+  { if (soap_send(soap, " ") || soap_send(soap, name))
+      return soap->error;
+    if (value)
+      if (soap_send_raw(soap, "=\"", 2)
+       || soap_string_out(soap, value, 1)
+       || soap_send_raw(soap, "\"", 1))
+        return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_in(struct soap *soap, const char *tag, int nillable)
+{ if (!soap_peek_element(soap))
+  { if (soap->other)
+      return soap->error = SOAP_TAG_MISMATCH;
+    if (tag && *tag == '-')
+      return SOAP_OK;
+    if (!(soap->error = soap_match_tag(soap, soap->tag, tag)))
+    { soap->peeked = 0;
+      if (soap->body)
+        soap->level++;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"" ));
+      if (!nillable && soap->null && (soap->mode & SOAP_XML_STRICT))
+        return soap->error = SOAP_NULL;
+    }
+  }
+  else if (soap->error == SOAP_NO_TAG && tag && *tag == '-')
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_in(struct soap *soap, const char *tag)  
+{ register soap_wchar c;
+  register char *s;
+  register const char *t;
+  register int n = 0;
+  if (tag && *tag == '-')
+    return SOAP_OK;
+  soap->level--;
+  soap_pop_namespace(soap);
+#ifdef WITH_DOM
+  /* this whitespace or mixed content is not insignificant for DOM */
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!soap->peeked && !soap_string_in(soap, 3, -1, -1))
+      return soap->error;
+    if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  if (soap->peeked)
+  { if (soap->error == SOAP_NO_TAG)
+      soap->error = SOAP_OK;
+    if (*soap->tag)
+      n++;
+    soap->peeked = 0;
+  }
+  do
+  { while (((c = soap_get(soap)) != SOAP_TT))
+    { if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      if (c == SOAP_LT)
+        n++;
+      else if (c == '/')
+      { c = soap_get(soap);
+        if (c == SOAP_GT)
+	  n--;
+        else
+	  soap_unget(soap, c);
+      }
+    }
+  } while (n--);
+  s = soap->tag;
+  while (soap_notblank(c = soap_get(soap)))
+    *s++ = (char)c;
+  *s = '\0';
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  while (soap_blank(c))
+    c = soap_get(soap);
+  if (c != SOAP_GT)
+    return soap->error = SOAP_SYNTAX_ERROR;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:""));
+  if (!tag || !*tag)
+    return SOAP_OK;
+  if ((s = strchr(soap->tag, ':')))
+    s++;
+  else
+    s = soap->tag;
+  if ((t = strchr(tag, ':')))
+    t++;
+  else
+    t = tag;
+  if (!SOAP_STRCMP(s, t))
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element tag name does not match\n"));
+  return soap->error = SOAP_SYNTAX_ERROR;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_attr_value(struct soap *soap, const char *name, int flag)
+{ register struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (!soap_match_tag(soap, tp->name, name))
+      break;
+  if (tp && tp->visible == 2)
+  { if (flag == 2 && (soap->mode & SOAP_XML_STRICT))
+      soap->error = SOAP_PROHIBITED;
+    else
+      return tp->value;
+  }
+  else if (flag == 1 && (soap->mode & SOAP_XML_STRICT))
+    soap->error = SOAP_REQUIRED;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_attr(struct soap *soap, const char *name, const char *value)
+{ register struct soap_attribute *tp;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set attribute %s='%s'\n", name, value?value:""));
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (!strcmp(tp->name, name))
+      break;
+  }
+  if (!tp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute %s\n", name));
+    if (!(tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(name))))
+      return soap->error = SOAP_EOM;
+    tp->ns = NULL;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { struct soap_attribute **tpp = &soap->attributes;
+      const char *s = strchr(name, ':');
+      if (!strncmp(name, "xmlns", 5))
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) || strcmp((*tpp)->name + 5, name + 5) > 0)
+            break;
+      }
+      else if (!s)
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) && ((*tpp)->ns || strcmp((*tpp)->name, name) > 0))
+            break;
+      }
+      else
+      { int k;
+        for (; *tpp; tpp = &(*tpp)->next)
+	{ if (!strncmp((*tpp)->name, "xmlns:", 6) && !strncmp((*tpp)->name + 6, name, s - name) && !(*tpp)->name[6 + s - name])
+	  { if (!tp->ns)
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Canonicalization: prefix %s=%p(%s)\n", name, (*tpp)->ns, (*tpp)->ns));
+	      tp->ns = (*tpp)->ns;
+	    }
+	  }
+          else if (strncmp((*tpp)->name, "xmlns", 5) && (*tpp)->ns && tp->ns && ((k = strcmp((*tpp)->ns, tp->ns)) > 0 || (!k && strcmp((*tpp)->name, name) > 0)))
+            break;
+        }
+      }
+      tp->next = *tpp;
+      *tpp = tp;
+    }
+    else
+#endif
+    { tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    strcpy(tp->name, name);
+    tp->value = NULL;
+  }
+  else if (tp->visible)
+  { return SOAP_OK;
+  }
+  else if (value && tp->value && tp->size <= strlen(value))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute value of %s (free %p)\n", name, tp->value));
+    SOAP_FREE(soap, tp->value);
+    tp->value = NULL;
+    tp->ns = NULL;
+  }
+  if (value)
+  { if (!tp->value)
+    { tp->size = strlen(value) + 1;
+      if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+        return soap->error = SOAP_EOM;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute value of %s (%p)\n", tp->name, tp->value));
+    }
+    strcpy(tp->value, value);
+    if (!strncmp(tp->name, "xmlns:", 6))
+      tp->ns = tp->value;
+    tp->visible = 2;
+#ifndef WITH_LEAN
+    if (!strcmp(name, "wsu:Id"))
+    { soap->part = SOAP_BEGIN_SECURITY;
+      strncpy(soap->id, value, sizeof(soap->id));
+      soap->id[sizeof(soap->id)-1] = '\0';
+    }
+#endif
+  }
+  else
+    tp->visible = 1;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_attr(struct soap *soap)
+{ register struct soap_attribute *tp;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_CANONICAL))
+  { while (soap->attributes)
+    { tp = soap->attributes->next;
+      SOAP_FREE(soap, soap->attributes->value);
+      SOAP_FREE(soap, soap->attributes);
+      soap->attributes = tp;
+    }
+  }
+  else
+#endif
+  { for (tp = soap->attributes; tp; tp = tp->next)
+      tp->visible = 0;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d)
+{ register size_t i;
+  for (i = 0; i < n; i++)
+  { register soap_wchar c = soap_get(soap);
+    switch (c)
+    {
+    case SOAP_TT:
+      *s++ = '<';
+      soap_unget(soap, '/');
+      break;
+    case SOAP_LT:
+      *s++ = '<';
+      break;
+    case SOAP_GT:
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '>';
+      break;
+    case SOAP_QT:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '"';
+      break;
+    case SOAP_AP:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '\'';
+      break;
+    case '\t':
+    case '\n':
+    case '\r':
+    case ' ':
+    case '/':
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+    default:
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+  }
+  return soap->error = SOAP_EOM;
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_store_lab(struct soap *soap, const char *s, size_t n)
+{ soap->labidx = 0;
+  return soap_append_lab(soap, s, n);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_append_lab(struct soap *soap, const char *s, size_t n)
+{ if (soap->labidx + n >= soap->lablen)
+  { register char *t = soap->labbuf;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enlarging look-aside buffer to append data, old size=%lu", (unsigned long)soap->lablen));
+    if (soap->lablen == 0)
+      soap->lablen = SOAP_LABLEN;
+    while (soap->labidx + n >= soap->lablen)
+      soap->lablen <<= 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, ", new size=%lu\n", (unsigned long)soap->lablen));
+    soap->labbuf = (char*)SOAP_MALLOC(soap, soap->lablen);
+    if (!soap->labbuf)
+    { if (t)
+        SOAP_FREE(soap, t);
+      return soap->error = SOAP_EOM;
+    }
+    if (t)
+    { memcpy(soap->labbuf, t, soap->labidx);
+      SOAP_FREE(soap, t);
+    }
+  }
+  if (s)
+  { memcpy(soap->labbuf + soap->labidx, s, n);
+    soap->labidx += n;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_peek_element(struct soap *soap)
+{
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att = NULL;
+  register char *lead = NULL;
+#endif
+  register struct soap_attribute *tp;
+  const char *t;
+  register char *s;
+  register soap_wchar c;
+  register int i;
+  if (soap->peeked)
+  { if (!*soap->tag)
+      return soap->error = SOAP_NO_TAG;
+    return SOAP_OK;
+  }
+  soap->peeked = 1;
+  c = soap_getutf8(soap);
+#ifdef WITH_DOM
+  /* whitespace leading to start tag is not insignificant for DOM */
+  if (soap_blank(c))
+  { soap->labidx = 0;
+    do
+    { if (soap_append_lab(soap, NULL, 0))
+        return SOAP_EOM;
+      s = soap->labbuf + soap->labidx;
+      i = soap->lablen - soap->labidx;
+      soap->labidx = soap->lablen;
+      while (soap_blank(c) && i--)
+      { *s++ = c;
+        c = soap_getutf8(soap);
+      }
+    }
+    while (soap_blank(c));
+    *s = '\0';
+    lead = soap_strdup(soap, soap->labbuf);
+  }
+#else
+  while (soap_blank(c))
+    c = soap_getutf8(soap);
+#endif
+  if (c != SOAP_LT)
+  { *soap->tag = '\0';
+    if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, c);
+#ifdef WITH_DOM
+    /* whitespace leading to end tag is not insignificant for DOM */
+    if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+      soap->dom->tail = soap_strdup(soap, lead);
+#endif
+    return soap->error = SOAP_NO_TAG;
+  }
+  s = soap->tag;
+  do c = soap_get1(soap);
+  while (soap_blank(c));
+  i = sizeof(soap->tag);
+  while (c != '>' && c != '/' && soap_notblank(c))
+  { if (--i > 0)
+      *s++ = (char)c;
+    c = soap_get1(soap);
+  }
+  while (soap_blank(c))
+    c = soap_get1(soap);
+  *s = '\0';
+  soap->id[0] = '\0';
+  soap->href[0] = '\0';
+  soap->type[0] = '\0';
+  soap->arrayType[0] = '\0';
+  soap->arraySize[0] = '\0';
+  soap->arrayOffset[0] = '\0';
+  soap->other = 0;
+  soap->root = -1;
+  soap->position = 0;
+  soap->null = 0;
+  soap->mustUnderstand = 0;
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt;
+    elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->next = NULL;
+    elt->nstr = NULL;
+    elt->name = soap_strdup(soap, soap->tag);
+    elt->prnt = soap->dom;
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->type = 0;
+    elt->node = NULL;
+    elt->head = lead;
+    elt->tail = NULL;
+    elt->soap = soap;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+    att = &elt->atts;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+    tp->visible = 0;
+  while ((int)c != EOF && c != '>' && c != '/')
+  { s = soap->tmpbuf;
+    i = sizeof(soap->tmpbuf);
+    while (c != '=' && c != '>' && c != '/' && soap_notblank(c))
+    { if (--i > 0)
+        *s++ = (char)c;
+      c = soap_get1(soap);
+    }
+    *s = '\0';
+    if (i == sizeof(soap->tmpbuf))
+      return soap->error = SOAP_SYNTAX_ERROR;
+#ifdef WITH_DOM
+    /* add attribute name to dom */
+    if (att)
+    { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+       if (!*att)
+         return soap->error = SOAP_EOM;
+       (*att)->next = NULL;
+       (*att)->nstr = NULL;
+       (*att)->name = soap_strdup(soap, soap->tmpbuf);
+       (*att)->data = NULL;
+       (*att)->wide = NULL;
+       (*att)->soap = soap;
+    }
+#endif
+    if (!strncmp(soap->tmpbuf, "xmlns", 5))
+    { if (soap->tmpbuf[5] == ':')
+      { soap->tmpbuf[5] = '\0';
+        t = soap->tmpbuf + 6;
+      }
+      else if (soap->tmpbuf[5])
+        t = NULL;
+      else
+        t = SOAP_STR_EOS;
+    }
+    else
+      t = NULL;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (!SOAP_STRCMP(tp->name, soap->tmpbuf))
+        break;
+    }
+    if (!tp)
+    { tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(soap->tmpbuf));
+      if (!tp)
+        return soap->error = SOAP_EOM;
+      strcpy(tp->name, soap->tmpbuf);
+      tp->value = NULL;
+      tp->size = 0;
+      tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    while (soap_blank(c))
+      c = soap_get1(soap);
+    if (c == '=')
+    { do c = soap_getutf8(soap);
+      while (soap_blank(c));
+      if (c != SOAP_QT && c != SOAP_AP)
+      { soap_unget(soap, c);
+        c = ' '; /* blank delimiter */
+      }
+      if (soap_getattrval(soap, tp->value, tp->size, c))
+      {
+#ifdef WITH_FAST
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+	if (soap_store_lab(soap, tp->value, tp->size))
+	  return soap->error;
+	if (tp->value)
+	  SOAP_FREE(soap, tp->value);
+	for (;;)
+	{ if (soap_getattrval(soap, soap->labbuf + soap->labidx, soap->lablen - soap->labidx, c))
+	  { if (soap->error != SOAP_EOM)
+	      return soap->error;
+            soap->error = SOAP_OK;
+	    soap->labidx = soap->lablen;
+	    if (soap_append_lab(soap, NULL, 0))
+	      return soap->error;
+	  }
+	  else
+	    break;
+	}
+	if (soap->labidx)
+          tp->size = soap->lablen;
+	else
+	{ tp->size = strlen(soap->labbuf) + 1;
+          if (tp->size < SOAP_LABLEN)
+	    tp->size = SOAP_LABLEN;
+        }
+	if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+	  return soap->error = SOAP_EOM;
+        strcpy(tp->value, soap->labbuf);
+#else
+	size_t n;
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+        if (soap_new_block(soap))
+          return soap->error;
+        for (;;)
+        { if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+            return soap->error;
+          if (soap_getattrval(soap, s, SOAP_BLKLEN, c))
+          { if (soap->error != SOAP_EOM)
+              return soap->error;
+            soap->error = SOAP_OK;
+          }
+          else
+            break;
+        }
+	n = tp->size + soap->blist->size;
+        if (!(s = (char*)SOAP_MALLOC(soap, n)))
+          return soap->error = SOAP_EOM;
+        if (tp->value)
+        { memcpy(s, tp->value, tp->size);
+          SOAP_FREE(soap, tp->value);
+        }
+        soap_save_block(soap, s + tp->size, 0);
+        tp->value = s;
+        tp->size = n;
+#endif
+      }
+      do c = soap_get1(soap);
+      while (soap_blank(c));
+      tp->visible = 2; /* seen this attribute w/ value */
+#ifdef WITH_DOM
+      if (att)
+        (*att)->data = soap_strdup(soap, tp->value);
+#endif
+    }
+    else
+      tp->visible = 1; /* seen this attribute w/o value */
+#ifdef WITH_DOM
+    if (att)
+      att = &(*att)->next;
+#endif
+    if (t && tp->value)
+    { if (soap_push_namespace(soap, t, tp->value))
+        return soap->error;
+      tp->visible = 0;
+    }
+  }
+#ifdef WITH_DOM
+  if (att)
+  { soap->dom->nstr = soap_current_namespace(soap, soap->tag);
+    for (att = &soap->dom->atts; *att; att = &(*att)->next)
+      (*att)->nstr = soap_current_namespace(soap, (*att)->name);
+  }
+#endif
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  if (!(soap->body = (c != '/')))
+    do c = soap_get1(soap);
+    while (soap_blank(c));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { if (!soap->body && soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible && tp->value)
+    { if (!strcmp(tp->name, "id"))
+      { *soap->id = '#';
+        strncpy(soap->id + 1, tp->value, sizeof(soap->id) - 2);
+        soap->id[sizeof(soap->id)-1] = '\0';
+      }
+      else if (!strcmp(tp->name, "href"))
+      { strncpy(soap->href, tp->value, sizeof(soap->href) - 1);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if ((soap->version == 2 || (soap->mode & SOAP_XML_GRAPH)) && !strcmp(tp->name, "ref"))
+      { *soap->href = '#';
+        strncpy(soap->href + 1, tp->value, sizeof(soap->href) - 2);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if (!soap_match_tag(soap, tp->name, "xsi:type"))
+      { strncpy(soap->type, tp->value, sizeof(soap->type) - 1);
+        soap->type[sizeof(soap->type)-1] = '\0';
+      }
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arrayType"))
+      { s = soap_strrchr(tp->value, '[');
+        if (s && (size_t)(s - tp->value) < sizeof(soap->arrayType))
+        { strncpy(soap->arrayType, tp->value, s - tp->value);
+          soap->arrayType[s - tp->value] = '\0';
+          strncpy(soap->arraySize, s, sizeof(soap->arraySize) - 1);
+        }
+        else
+          strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+        soap->arraySize[sizeof(soap->arrayType)-1] = '\0';
+        soap->arrayType[sizeof(soap->arrayType)-1] = '\0';
+      }
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:itemType"))
+        strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arraySize"))
+        strncpy(soap->arraySize, tp->value, sizeof(soap->arraySize) - 1);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:offset"))
+        strncpy(soap->arrayOffset, tp->value, sizeof(soap->arrayOffset));
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:position"))
+        soap->position = soap_getposition(tp->value, soap->positions);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:root"))
+        soap->root = ((!strcmp(tp->value, "1") || !strcmp(tp->value, "true")));
+      else if ((soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENV:actor"))
+            || (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENV:role")))
+      { if ((!soap->actor || strcmp(soap->actor, tp->value))
+         && strcmp(tp->value, "http://schemas.xmlsoap.org/soap/actor/next")
+         && strcmp(tp->value, "http://www.w3.org/2003/05/soap-envelope/role/next"))
+          soap->other = 1;
+      }
+      else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:mustUnderstand")
+            && (!strcmp(tp->value, "1") || !strcmp(tp->value, "true")))
+        soap->mustUnderstand = 1;
+      else if ((!soap_match_tag(soap, tp->name, "xsi:null")
+             || !soap_match_tag(soap, tp->name, "xsi:nil"))
+            && (!strcmp(tp->value, "1")
+             || !strcmp(tp->value, "true")))
+        soap->null = 1;
+    }
+  }
+  return soap->error = SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_retry(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_revert(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_revert(struct soap *soap)
+{ if (!soap->peeked)
+  { soap->peeked = 1;
+    if (soap->body)
+      soap->level--;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reverting last element (level=%u)\n", soap->level));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_string_out(struct soap *soap, const char *s, int flag)
+{ register const char *t;
+  register soap_wchar c;
+  register soap_wchar mask = 0xFFFFFF80UL;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_strdup(soap, s);
+    return SOAP_OK;
+  }
+#endif
+  if (soap->mode & SOAP_C_UTFSTRING)
+    mask = 0;
+  t = s;
+  while ((c = *t++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#x9;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xA;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 13:
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xD;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '&':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&amp;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '<':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&lt;", 4))
+        return soap->error;
+      s = t;
+      break;
+    case '>':
+      if (!flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&gt;", 4))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case '"':
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&quot;", 6))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    default:
+#ifndef WITH_LEANER
+#ifdef HAVE_MBTOWC
+      if (soap->mode & SOAP_C_MBSTRING)
+      { wchar_t wc;
+        register int m = mbtowc(&wc, t - 1, MB_CUR_MAX);
+        if (m > 0 && wc != c)
+        { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, wc))
+            return soap->error;
+	  s = t += m - 1;
+	  continue;
+        }
+      }
+#endif
+#endif
+      if (c & mask)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, (unsigned char)c))
+          return soap->error;
+        s = t;
+      }
+    }
+  }
+  return soap_send_raw(soap, s, t - s - 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_string_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ register char *s;
+  char *t = NULL;
+  register size_t i;
+  register long l = 0;
+  register int n = 0;
+  register int m = 0;
+  register soap_wchar c;
+#if !defined(WITH_LEANER) && defined(HAVE_WCTOMB)
+  char buf[MB_LEN_MAX > 8 ? MB_LEN_MAX : 8];
+#else
+  char buf[8];
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+#ifndef WITH_LEAN
+      t = soap->tmpbuf;
+      t[0] = '<';
+      strncpy(t + 1, soap->tag, sizeof(soap->tmpbuf) - 1);
+      strncat(t, ">", sizeof(soap->tmpbuf));
+      m = strlen(soap->tag) + 2;
+#endif
+    }
+  }
+#ifdef WITH_CDATA
+  if (!flag)
+  { register int state = 0;
+#ifdef WITH_FAST
+    soap->labidx = 0;			/* use look-aside buffer */
+#else
+    if (soap_new_block(soap))
+      return NULL;
+#endif
+    for (;;)
+    { 
+#ifdef WITH_FAST
+      register size_t k;
+      if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+        return NULL;
+      s = soap->labbuf + soap->labidx;	/* space to populate */
+      k = soap->lablen - soap->labidx;	/* number of bytes available */
+      soap->labidx = soap->lablen;	/* claim this space */
+#else
+      register size_t k = SOAP_BLKLEN;
+      if (!(s = (char*)soap_push_block(soap, k)))
+        return NULL;
+#endif
+      for (i = 0; i < k; i++)
+      { if (m > 0)
+        { *s++ = *t++;	/* copy multibyte characters */
+	  m--;
+          continue;
+        }
+        c = soap_getchar(soap);
+	if ((int)c == EOF)
+          goto end;
+        if (c >= 0x80 && !(soap->mode & SOAP_ENC_LATIN))
+        { soap_unget(soap, c);
+	  c = soap_getutf8(soap);
+	  if (soap->mode & SOAP_C_UTFSTRING)
+          { if ((c & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+            { c &= 0x7FFFFFFF;
+              t = buf;
+              if (c < 0x0800)
+                *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+              else
+              { if (c < 0x010000)
+                  *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+                else
+                { if (c < 0x200000)
+                    *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+                  else
+                  { if (c < 0x04000000)
+                      *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                    else
+                    { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                      *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                    }
+                    *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+                  }     
+                  *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+              }
+              *t++ = (char)(0x80 | (c & 0x3F));
+	      m = (int)(t - buf) - 1;
+              t = buf;
+              *s++ = *t++;
+              continue;
+	    }
+          }
+        }
+	switch (state)
+        { case 1:
+            if (c == ']')
+	      state = 4;
+	    *s++ = c;
+	    continue;
+	  case 2:
+	    if (c == '-')
+              state = 6;
+	    *s++ = c;
+	    continue;
+	  case 3:
+	    if (c == '?')
+	      state = 8;
+	    *s++ = c;
+	    continue;
+          /* CDATA */
+	  case 4:
+	    if (c == ']')
+              state = 5;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+	  case 5:
+	    if (c == '>')
+	      state = 0;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+          /* comment */
+          case 6:
+            if (c == '-')
+	      state = 7;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          case 7:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          /* PI */
+	  case 8:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 3;
+	    *s++ = c;
+	    continue;
+        }
+        switch (c)
+        {
+        case '/':
+          if (n > 0)
+          { c = soap_getchar(soap);
+            if (c == '>')
+              n--;
+            soap_unget(soap, c);
+          }
+          *s++ = '/';
+          break;
+        case '<':
+	  c = soap_getchar(soap);
+	  if (c == '/')
+	  { if (n == 0)
+	    { c = SOAP_TT;
+	      goto end;
+	    }
+	    n--;
+	  }
+	  else if (c == '!')
+	  { c = soap_getchar(soap);
+	    if (c == '[')
+            { do c = soap_getchar(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                 goto end;
+	      t = (char*)"![CDATA[";
+	      m = 8;
+	      state = 1;
+	    }
+            else if (c == '-')
+	    { if ((c = soap_getchar(soap)) == '-')
+	        state = 2;
+	      t = (char*)"!-";
+	      m = 2;
+	      soap_unget(soap, c);
+	    }
+	    else
+	    { t = (char*)"!";
+	      m = 1;
+	      soap_unget(soap, c);
+	    }
+	    *s++ = '<';
+	    break;
+	  }
+	  else if (c == '?')
+	    state = 3;
+	  else
+	    n++;
+          soap_unget(soap, c);
+          *s++ = '<';
+          break;
+        case '>':
+          *s++ = '>';
+          break;
+        case '"':
+          *s++ = '"';
+          break;
+        default:
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+          if (soap->mode & SOAP_C_MBSTRING)
+          { m = wctomb(buf, c & 0x7FFFFFFF);
+            if (m >= 1 && m <= (int)MB_CUR_MAX)
+            { t = buf;
+              *s++ = *t++;
+              m--;
+            }
+            else
+            { *s++ = SOAP_UNKNOWN_CHAR;
+	      m = 0;
+	    }
+          }
+          else
+#endif
+#endif
+            *s++ = (char)(c & 0xFF);
+        }
+	l++;
+        if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+        { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+          soap->error = SOAP_LENGTH;
+          return NULL;
+        }
+      }
+    }
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;			/* use look-aside buffer */
+#else
+  if (soap_new_block(soap))
+    return NULL;
+#endif
+  for (;;)
+  { 
+#ifdef WITH_FAST
+    register size_t k;
+    if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+      return NULL;
+    s = soap->labbuf + soap->labidx;	/* space to populate */
+    k = soap->lablen - soap->labidx;	/* number of bytes available */
+    soap->labidx = soap->lablen;	/* claim this space */
+#else
+    register size_t k = SOAP_BLKLEN;
+    if (!(s = (char*)soap_push_block(soap, k)))
+      return NULL;
+#endif
+    for (i = 0; i < k; i++)
+    { if (m > 0)
+      { *s++ = *t++;	/* copy multibyte characters */
+        m--;
+        continue;
+      }
+      if (soap->mode & SOAP_C_UTFSTRING)
+      { if (((c = soap_get(soap)) & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+        { c &= 0x7FFFFFFF;
+          t = buf;
+          if (c < 0x0800)
+            *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+          else
+          { if (c < 0x010000)
+              *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+            else
+            { if (c < 0x200000)
+                *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+              else
+              { if (c < 0x04000000)
+                  *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                else
+                { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                  *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+              }     
+              *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+            }
+            *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+          }
+          *t++ = (char)(0x80 | (c & 0x3F));
+	  m = (int)(t - buf) - 1;
+          t = buf;
+          *s++ = *t++;
+          continue;
+        }
+      }
+      else
+        c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        t = (char*)"/";
+	m = 1;
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_get(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<' | 0x80000000:
+        if (flag)
+          *s++ = '<';
+        else
+        { *s++ = '&';
+          t = (char*)"lt;";
+	  m = 3;
+        }
+        break;
+      case '>' | 0x80000000:
+        if (flag)
+          *s++ = '>';
+        else
+        { *s++ = '&';
+          t = (char*)"gt;";
+	  m = 3;
+        }
+        break;
+      case '&' | 0x80000000:
+        if (flag)
+          *s++ = '&';
+        else
+        { *s++ = '&';
+          t = (char*)"amp;";
+	  m = 4;
+        }
+        break;
+      case '"' | 0x80000000:
+        if (flag)
+          *s++ = '"';
+        else
+        { *s++ = '&';
+          t = (char*)"quot;";
+	  m = 5;
+        }
+        break;
+      case '\'' | 0x80000000:
+        if (flag)
+          *s++ = '\'';
+        else
+        { *s++ = '&';
+          t = (char*)"apos;";
+	  m = 5;
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+        if (soap->mode & SOAP_C_MBSTRING)
+        { m = wctomb(buf, c & 0x7FFFFFFF);
+          if (m >= 1 && m <= (int)MB_CUR_MAX)
+          { t = buf;
+            *s++ = *t++;
+            m--;
+          }
+          else
+          { *s++ = SOAP_UNKNOWN_CHAR;
+	    m = 0;
+	  }
+        }
+        else
+#endif
+#endif
+          *s++ = (char)(c & 0xFF);
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+#ifdef WITH_FAST
+  t = soap_strdup(soap, soap->labbuf);
+#else
+  soap_size_block(soap, i+1);
+  t = soap_save_block(soap, NULL, 0);
+#endif
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (flag == 3)
+      soap->dom->tail = t;
+    else
+      soap->dom->data = t;
+  }
+#endif
+  if (flag == 2)
+    if (soap_s2QName(soap, t, &t))
+      return NULL;
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_wstring_out(struct soap *soap, const wchar_t *s, int flag)
+{ const char *t;
+  char tmp;
+  register soap_wchar c;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { wchar_t *r = (wchar_t*)s;
+    int n = 1;
+    while (*r++)
+      n++;
+    soap->dom->wide = r = (wchar_t*)soap_malloc(soap, n * sizeof(wchar_t));
+    while (n--)
+      *r++ = *s++;
+    return SOAP_OK;
+  }
+#endif
+  while ((c = *s++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+        t = "&#x9;";
+      else
+        t = "\t";
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+        t = "&#xA;";
+      else
+        t = "\n";
+      break;
+    case 13:
+      t = "&#xD;";
+      break;
+    case '&':
+      t = "&amp;";
+      break;
+    case '<':
+      t = "&lt;";
+      break;
+    case '>':
+      if (flag)
+        t = ">";
+      else
+	t = "&gt;";
+      break;
+    case '"':
+      if (flag)
+        t = "&quot;";
+      else
+        t = "\"";
+      break;
+    default:
+      if (c > 0 && c < 0x80)
+      { tmp = (char)c;
+        if (soap_send_raw(soap, &tmp, 1))
+          return soap->error;
+      }
+      else if (soap_pututf8(soap, (unsigned long)c))
+        return soap->error;
+      continue;
+    }
+    if (soap_send(soap, t))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t *
+SOAP_FMAC2
+soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ wchar_t *s;
+  register int i, n = 0;
+  register long l = 0;
+  register soap_wchar c;
+  const char *t = NULL;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading wide string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+    }
+  }
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { if (!(s = (wchar_t*)soap_push_block(soap, sizeof(wchar_t)*SOAP_BLKLEN)))
+      return NULL;
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { if (t)
+      { *s++ = (wchar_t)*t++;
+        if (!*t)
+          t = NULL;
+        continue;
+      }
+      c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        soap_unget(soap, '/');
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_getutf8(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<':
+        if (flag)
+          *s++ = (soap_wchar)'<';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "lt;";
+        }
+        break;
+      case '>':
+        if (flag)
+          *s++ = (soap_wchar)'>';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "gt;";
+        }
+        break;
+      case '"':
+        if (flag)
+          *s++ = (soap_wchar)'"';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "quot;";
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+        *s++ = (wchar_t)c & 0x7FFFFFFF;
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+  soap_size_block(soap, sizeof(wchar_t) * (i + 1));
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+  s = (wchar_t*)soap_save_block(soap, NULL, 0);
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->wide = s;
+#endif
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_int2s(struct soap *soap, int n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outint(struct soap *soap, const char *tag, int id, const int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2int(struct soap *soap, const char *s, int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (int)soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int *
+SOAP_FMAC2
+soap_inint(struct soap *soap, const char *tag, int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (int*)soap_id_enter(soap, soap->id, p, t, sizeof(int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(int), 0, NULL);
+  else if (p)
+  { if (soap_s2int(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_long2s(struct soap *soap, long n)
+{ sprintf(soap->tmpbuf, "%ld", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outlong(struct soap *soap, const char *tag, int id, const long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2long(struct soap *soap, const char *s, long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+long *
+SOAP_FMAC2
+soap_inlong(struct soap *soap, const char *tag, long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (long*)soap_id_enter(soap, soap->id, p, t, sizeof(long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(long), 0, NULL);
+  else if (p)
+  { if (soap_s2long(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_LONG642s(struct soap *soap, LONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_LONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outLONG64(struct soap *soap, const char *tag, int id, const LONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_LONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2LONG64(struct soap *soap, const char *s, LONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOLL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoll(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_LONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+LONG64 *
+SOAP_FMAC2
+soap_inLONG64(struct soap *soap, const char *tag, LONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (LONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(LONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (LONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(LONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2LONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_byte2s(struct soap *soap, char n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outbyte(struct soap *soap, const char *tag, int id, const char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2byte(struct soap *soap, const char *s, char *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -128 || n > 127)
+      soap->error = SOAP_TYPE;
+    *p = (char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_inbyte(struct soap *soap, const char *tag, char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (char*)soap_id_enter(soap, soap->id, p, t, sizeof(char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(char), 0, NULL);
+  else if (p)
+  { if (soap_s2byte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_short2s(struct soap *soap, short n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outshort(struct soap *soap, const char *tag, int id, const short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2short(struct soap *soap, const char *s, short *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -32768 || n > 32767)
+      soap->error = SOAP_TYPE;
+    *p = (short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+short *
+SOAP_FMAC2
+soap_inshort(struct soap *soap, const char *tag, short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (short*)soap_id_enter(soap, soap->id, p, t, sizeof(short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(short), 0, NULL);
+  else if (p)
+  { if (soap_s2short(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_float2s(struct soap *soap, float n)
+{ const char *s;
+  if (soap_isnan((double)n))
+    s = "NaN";
+  else if (soap_ispinff(n))
+    s = "INF";
+  else if (soap_isninff(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->float_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outfloat(struct soap *soap, const char *tag, int id, const float *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_float2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2float(struct soap *soap, const char *s, float *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = FLT_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = FLT_NAN;
+    else
+    {
+/* On some systems, strtof appears to be broken or doesn't link: use with caution */
+#if defined(HAVE_STRTOF)
+      char *r;
+      *p = strtof((char*)s, &r);
+      if (*r)
+#elif defined(HAVE_STRTOD)
+      char *r;
+      *p = (float)strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%g", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static int soap_isnumeric(struct soap *soap, const char *type)
+{ if (soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":float")
+   && soap_match_tag(soap, soap->type, ":double")
+   && soap_match_tag(soap, soap->type, ":decimal")
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return SOAP_ERR;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+float *
+SOAP_FMAC2
+soap_infloat(struct soap *soap, const char *tag, float *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (float*)soap_id_enter(soap, soap->id, p, t, sizeof(float), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (float*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(float), 0, NULL);
+  else if (p)
+  { if (soap_s2float(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_double2s(struct soap *soap, double n)
+{ const char *s;
+  if (soap_isnan(n))
+    s = "NaN";
+  else if (soap_ispinfd(n))
+    s = "INF";
+  else if (soap_isninfd(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->double_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdouble(struct soap *soap, const char *tag, int id, const double *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_double2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2double(struct soap *soap, const char *s, double *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = DBL_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = DBL_NAN;
+    else
+    {
+#ifdef HAVE_STRTOD
+      char *r;
+      *p = strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%lg", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+double *
+SOAP_FMAC2
+soap_indouble(struct soap *soap, const char *tag, double *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (double*)soap_id_enter(soap, soap->id, p, t, sizeof(double), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (double*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(double), 0, NULL);
+  else if (p)
+  { if (soap_s2double(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedByte2s(struct soap *soap, unsigned char n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedByte(struct soap *soap, const char *tag, int id, const unsigned char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedByte(struct soap *soap, const char *s, unsigned char *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 255)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned char *
+SOAP_FMAC2
+soap_inunsignedByte(struct soap *soap, const char *tag, unsigned char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned char*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned char), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedByte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedShort2s(struct soap *soap, unsigned short n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedShort(struct soap *soap, const char *tag, int id, const unsigned short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedShort(struct soap *soap, const char *s, unsigned short *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 65535)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned short *
+SOAP_FMAC2
+soap_inunsignedShort(struct soap *soap, const char *tag, unsigned short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned short*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned short), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedShort(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedInt2s(struct soap *soap, unsigned int n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedInt(struct soap *soap, const char *tag, int id, const unsigned int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedInt(struct soap *soap, const char *s, unsigned int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (unsigned int)soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned int *
+SOAP_FMAC2
+soap_inunsignedInt(struct soap *soap, const char *tag, unsigned int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned int*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned int), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedInt(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedLong2s(struct soap *soap, unsigned long n)
+{ sprintf(soap->tmpbuf, "%lu", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedLong(struct soap *soap, const char *tag, int id, const unsigned long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedLong(struct soap *soap, const char *s, unsigned long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned long *
+SOAP_FMAC2
+soap_inunsignedLong(struct soap *soap, const char *tag, unsigned long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned long*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned long), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedLong(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_ULONG642s(struct soap *soap, ULONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_ULONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outULONG64(struct soap *soap, const char *tag, int id, const ULONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_ULONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2ULONG64(struct soap *soap, const char *s, ULONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOULL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoull(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_ULONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+ULONG64 *
+SOAP_FMAC2
+soap_inULONG64(struct soap *soap, const char *tag, ULONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (ULONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(ULONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (ULONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(ULONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2ULONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2string(struct soap *soap, const char *s, char **t)
+{ *t = NULL;
+  if (s)
+  { if (!(*t = soap_strdup(soap, s)))
+      return soap->error = SOAP_EOM;
+    if (!(soap->mode & (SOAP_ENC_LATIN | SOAP_C_UTFSTRING)))
+    { /* TODO: consider truncating UTF8 to ASCII for regular XML attribute strings? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2QName(struct soap *soap, const char *s, char **t)
+{ if (s)
+  { struct soap_nlist *np;
+    const char *p;
+    if (!strncmp(s, "xml:", 4))
+    { *t = soap_strdup(soap, s);
+      return SOAP_OK;
+    }
+    np = soap->nlist;
+    p = strchr(s, ':');
+    if (p)
+    { register int n = p - s;
+      while (np && (strncmp(np->id, s, n) || np->id[n]))
+        np = np->next;
+      p++;
+    }
+    else
+    { while (np && *np->id)
+        np = np->next;
+      p = s;
+    }
+    if (np)
+    { if (np->index >= 0 && soap->local_namespaces)
+      { register const char *q = soap->local_namespaces[np->index].id;
+        if (q)
+        { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(q) + 2)))
+            sprintf(*t, "%s:%s", q, p);
+          return SOAP_OK;
+        }
+      }
+      if (np->ns)
+      { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(np->ns) + 4)))
+          sprintf(*t, "\"%s\":%s", np->ns, p);
+        return SOAP_OK;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined (index=%d, URI=%s)\n", s, np->index, np->ns?np->ns:""));
+      return soap->error = SOAP_NAMESPACE; 
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined, assuming empty namespace\n", s));
+    if ((*t = (char*)soap_malloc(soap, strlen(p) + 4)))
+      sprintf(*t, "\"\":%s", p);
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_QName2s(struct soap *soap, const char *s)
+{ struct Namespace *p;
+  char *t;
+  int n;
+  if (!s || *s != '"')
+  {
+#ifndef WITH_LEAN
+    if (s && (soap->mode & SOAP_XML_CANONICAL))
+    { t = (char*)strchr(s, ':');
+      if (t)
+        soap_utilize_ns(soap, s, t - s);
+    }
+#endif
+    return s;
+  }
+  s++;
+  if ((p = soap->local_namespaces))
+  { for (; p->id; p++)
+    { if (p->ns)
+        if (!soap_tag_cmp(s, p->ns))
+          break;
+      if (p->in)
+        if (!soap_tag_cmp(s, p->in))
+          break;
+    }
+    if (p && p->id)
+    { s = strchr(s, '"');
+      if (s)
+      { t = (char*)soap_malloc(soap, strlen(p->id) + strlen(s));
+        strcpy(t, p->id);
+	strcat(t, s + 1);
+        return t;
+      }
+    }
+  }
+  t = (char*)strchr(s, '"');
+  if (t)
+    n = t - s;
+  else
+    n = 0;
+  t = soap_strdup(soap, s);
+  t[n] = '\0';
+  sprintf(soap->tmpbuf, "xmlns:_%d", soap->idnum++);
+  soap_set_attr(soap, soap->tmpbuf, t);
+  s = strchr(s, '"');
+  if (s)
+  { t = (char*)soap_malloc(soap, strlen(soap->tmpbuf) + strlen(s) - 6);
+    strcpy(t, soap->tmpbuf + 6);
+    strcat(t, s + 1);
+  }
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2wchar(struct soap *soap, const char *s, wchar_t **t)
+{ wchar_t *r;
+  if (!s)
+    *t = NULL;
+  else
+  { *t = r = (wchar_t*)soap_malloc(soap, sizeof(wchar_t) * (strlen(s) + 1));
+    if (!r)
+      return soap->error;
+    if (soap->mode & SOAP_ENC_LATIN)
+    { while (*s)
+        *r++ = (wchar_t)*s++;
+    }
+    else
+    { /* Convert UTF8 to wchar */
+      while (*s)
+      { register soap_wchar c, c1, c2, c3, c4;
+        c = *s++;
+        if (c < 0x80)
+	  *r++ = (wchar_t)c;
+	else
+        { c1 = (soap_wchar)*s++ & 0x3F;
+          if (c < 0xE0)
+            *r++ = (wchar_t)(((soap_wchar)(c & 0x1F) << 6) | c1);
+          else
+	  { c2 = (soap_wchar)*s++ & 0x3F;
+            if (c < 0xF0)
+              *r++ = (wchar_t)(((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2);
+            else
+	    { c3 = (soap_wchar)*s++ & 0x3F;
+              if (c < 0xF8)
+                *r++ = (wchar_t)(((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3);
+              else
+	      { c4 = (soap_wchar)*s++ & 0x3F;
+                if (c < 0xFC)
+                  *r++ = (wchar_t)(((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4);
+                else
+		  *r++ = (wchar_t)(((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(*s++ & 0x3F));
+              }
+            }
+          }
+        }
+      }
+    }
+    *r = L'\0';
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_wchar2s(struct soap *soap, const wchar_t *s)
+{ register soap_wchar c;
+  register char *r, *t;
+  const wchar_t *q = s;
+  size_t n = 0;
+  while ((c = *q++))
+  { if (c > 0 && c < 0x80)
+      n++;
+    else
+      n += 6;
+  }
+  r = t = (char*)soap_malloc(soap, n + 1);
+  if (r)
+  { /* Convert wchar to UTF8 */
+    while ((c = *s++))
+    { if (c > 0 && c < 0x80)
+        *t++ = (char)c;
+      else
+      { if (c < 0x0800)
+          *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+        else
+        { if (c < 0x010000)
+            *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+          else
+          { if (c < 0x200000)
+              *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+            else
+            { if (c < 0x04000000)
+                *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+              else
+              { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+              }
+              *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+            }     
+            *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+        }
+        *t++ = (char)(0x80 | (c & 0x3F));
+      }
+    }
+    *t = '\0';
+  }
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outstring(struct soap *soap, const char *tag, int id, char *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_string_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_instring(struct soap *soap, const char *tag, char **p, const char *type, int t, int flag, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_string_in(soap, flag, minlen, maxlen);
+    if (!*p || !(char*)soap_id_enter(soap, soap->id, *p, t, sizeof(char*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (char**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(char**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwstring(struct soap *soap, const char *tag, int id, wchar_t *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_wstring_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type, int t, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_wstring_in(soap, 1, minlen, maxlen);
+    if (!*p || !(wchar_t*)soap_id_enter(soap, soap->id, *p, t, sizeof(wchar_t*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (wchar_t**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(wchar_t**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static time_t
+soap_timegm(struct tm *T)
+{
+#if defined(HAVE_TIMEGM)
+  return timegm(T);
+#else
+  time_t t, g, z;
+#ifdef HAVE_GMTIME_R
+  struct tm tm, *tmp = &tm;
+#else
+  struct tm *tmp;
+#endif
+  t = mktime(T);
+  if (t == -1)
+    return -1;
+#ifdef HAVE_GMTIME_R
+  gmtime_r(&t, tmp);
+#else
+  tmp = gmtime(&t);
+#endif
+  tmp->tm_isdst = 0;
+  g = mktime(tmp);
+  if (g == -1)
+    return -1;
+  z = g - t;
+  return t - z;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_dateTime2s(struct soap *soap, time_t n)
+{ struct tm T, *pT = &T;
+#if defined(HAVE_GMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PGMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_PGMTIME)
+  if (gmtime(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GMTIME)
+  if ((pT = gmtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GETTIMEOFDAY)
+  struct timezone tz;
+  memset((void*)&tz, 0, sizeof(tz));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+#endif
+#elif defined(HAVE_FTIME)
+  struct timeb t;
+  memset((void*)&t, 0, sizeof(t));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+  /* The following defines were added for VxWorks*/
+# elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf+strlen(soap->tmpbuf), "%+03d:%02d", t.timezone/60, abs(t.timezone)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+# endif
+#elif defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#else
+  if ((pT = localtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#endif
+  else
+    strcpy(soap->tmpbuf, "1969-12-31T23:59:59Z");
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdateTime(struct soap *soap, const char *tag, int id, const time_t *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_dateTime2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2dateTime(struct soap *soap, const char *s, time_t *p)
+{ if (s)
+  { struct tm T;
+    char zone[16];
+    const char *t;
+    memset((void*)&T, 0, sizeof(T));
+    zone[sizeof(zone)-1] = '\0';
+    if (strchr(s, '-'))
+      t = "%d-%d-%dT%d:%d:%d%15s";
+    else if (strchr(s, ':'))
+      t = "%4d%2d%2dT%d:%d:%d%15s";
+    else /* parse non-XSD-standard alternative ISO 8601 format */
+      t = "%4d%2d%2dT%2d%2d%2d%15s";
+    sscanf(s, t, &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, zone);
+    if (T.tm_year == 1)
+      T.tm_year = 70;
+    else
+      T.tm_year -= 1900;
+    T.tm_mon--;
+    if (*zone)
+    { if (*zone == '.')
+      { for (s = zone + 1; *s; s++)
+          if (*s < '0' || *s > '9')
+            break;
+      }
+      else
+        s = zone;
+      if (*s == '+' || *s == '-')
+      { int h = 0, m = 0;
+        if (s[3] == ':')
+	{ sscanf(s, "%d:%d", &h, &m);
+	  if (h < 0)
+	    m = -m;
+	}
+	else
+	{ m = (int)atol(s);
+	  h = m / 100;
+	  m = m % 100;
+	}
+        T.tm_hour -= h;
+        T.tm_min -= m;
+      }
+      T.tm_isdst = 0;
+      *p = soap_timegm(&T);
+    }
+    else
+    { T.tm_isdst = -1;
+      *p = mktime(&T); /* no time zone: suppose it is localtime? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+time_t *
+SOAP_FMAC2
+soap_indateTime(struct soap *soap, const char *tag, time_t *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":dateTime"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (time_t*)soap_id_enter(soap, soap->id, p, t, sizeof(time_t), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (time_t*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(time_t), 0, NULL);
+  else if (p)
+  { if (soap_s2dateTime(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outliteral(struct soap *soap, const char *tag, char *const*p)
+{ int i;
+  const char *t = NULL;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p && *p)
+  { if (soap_send(soap, *p))
+      return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_inliteral(struct soap *soap, const char *tag, char **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_string_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwliteral(struct soap *soap, const char *tag, wchar_t *const*p)
+{ int i;
+  const char *t = NULL;
+  wchar_t c;
+  const wchar_t *s;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p)
+  { s = *p;
+    while ((c = *s++))
+      if (soap_pututf8(soap, (unsigned char)c))
+        return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwliteral(struct soap *soap, const char *tag, wchar_t **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_wstring_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_token(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF || soap_blank(c))
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_value(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  for (s--; i > 0; i--, s--)
+    if (!soap_blank(*s))
+      break;
+  s[1] = '\0';
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->data = soap_strdup(soap, soap->tmpbuf);
+#endif
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEANER) || !defined(WITH_NOHTTP)
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getline(struct soap *soap, char *s, int len)
+{ int i = len;
+  soap_wchar c = 0;
+  for (;;)
+  { while (--i > 0)
+    { c = soap_getchar(soap);
+      if (c == '\r' || c == '\n')
+        break;
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+    if (c != '\n')
+      c = soap_getchar(soap); /* got \r, now get \n */
+    if (c == '\n')
+    { *s = '\0';
+      if (i+1 == len) /* empty line: end of HTTP/MIME header */
+        break;
+      c = soap_unget(soap, soap_getchar(soap));
+      if (c != ' ' && c != '\t') /* HTTP line continuation? */
+        break;
+    }
+    else if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static size_t
+soap_count_attachments(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  register struct soap_multipart *content;
+  register size_t count = soap->count;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the message size with attachments, current count=%lu\n", (unsigned long)count));
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of DIME attachments\n"));
+    for (content = soap->dime.first; content; content = content->next)
+    { count += 12 + ((content->size+3)&(~3));
+      if (content->id)
+        count += ((strlen(content->id)+3)&(~3));
+      if (content->type)
+        count += ((strlen(content->type)+3)&(~3));
+      if (content->options)
+        count += ((((unsigned char)content->options[2] << 8) | ((unsigned char)content->options[3]))+7)&(~3);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of DIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary)
+  { register size_t n = strlen(soap->mime.boundary);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of MIME attachments\n"));
+    for (content = soap->mime.first; content; content = content->next)
+    { register const char *s;
+      /* count \r\n--boundary\r\n */
+      count += 6 + n;
+      /* count Content-Type: ...\r\n */
+      if (content->type)
+        count += 16 + strlen(content->type);
+      /* count Content-Transfer-Encoding: ...\r\n */
+      s = soap_str_code(mime_codes, content->encoding);
+      if (s)
+        count += 29 + strlen(s);
+      /* count Content-ID: ...\r\n */
+      if (content->id)
+        count += 14 + strlen(content->id);
+      /* count Content-Location: ...\r\n */
+      if (content->location)
+        count += 20 + strlen(content->location);
+      /* count Content-Description: ...\r\n */
+      if (content->description)
+        count += 23 + strlen(content->location);
+      /* count \r\n...content */
+      count += 2 + content->size;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of MIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+    /* count \r\n--boundary-- */
+    count += 6 + n;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New count is %lu bytes\n", (unsigned long)count));
+  return count;
+#else
+  return soap->count;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_putdimefield(struct soap *soap, const char *s, size_t n)
+{ if (soap_send_raw(soap, s, n))
+    return soap->error;
+  return soap_send_raw(soap, SOAP_STR_PADDING, -(long)n&3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_dime_option(struct soap *soap, unsigned short optype, const char *option)
+{ size_t n;
+  char *s = NULL;
+  if (option)
+  { n = strlen(option);
+    s = (char*)soap_malloc(soap, n + 5);
+    if (s)
+    { s[0] = optype >> 8;
+      s[1] = optype & 0xFF;
+      s[2] = n >> 8;
+      s[3] = n & 0xFF;
+      strcpy(s + 4, option);
+    }
+  }
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdimehdr(struct soap *soap)
+{ unsigned char tmp[12];
+  size_t optlen = 0, idlen = 0, typelen = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Put DIME header id='%s'\n", soap->dime.id?soap->dime.id:""));
+  if (soap->dime.options)
+    optlen = (((unsigned char)soap->dime.options[2] << 8) | ((unsigned char)soap->dime.options[3])) + 4;
+  if (soap->dime.id)
+    idlen = strlen(soap->dime.id);
+  if (soap->dime.type)
+    typelen = strlen(soap->dime.type);
+  tmp[0] = SOAP_DIME_VERSION | (soap->dime.flags & 0x7);
+  tmp[1] = soap->dime.flags & 0xF0;
+  tmp[2] = optlen >> 8;
+  tmp[3] = optlen & 0xFF;
+  tmp[4] = idlen >> 8;
+  tmp[5] = idlen & 0xFF;
+  tmp[6] = typelen >> 8;
+  tmp[7] = typelen & 0xFF;
+  tmp[8] = soap->dime.size >> 24;
+  tmp[9] = (soap->dime.size >> 16) & 0xFF;
+  tmp[10] = (soap->dime.size >> 8) & 0xFF;
+  tmp[11] = soap->dime.size & 0xFF;
+  if (soap_send_raw(soap, (char*)tmp, 12)
+   || soap_putdimefield(soap, soap->dime.options, optlen)
+   || soap_putdimefield(soap, soap->dime.id, idlen)
+   || soap_putdimefield(soap, soap->dime.type, typelen))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return SOAP_OK;
+  for (content = soap->dime.first; content; content = content->next)
+  { void *handle;
+    soap->dime.size = content->size;
+    soap->dime.id = content->id;
+    soap->dime.type = content->type;
+    soap->dime.options = content->options;
+    soap->dime.flags = SOAP_DIME_VERSION | SOAP_DIME_MEDIA;
+    if (soap->fdimereadopen && ((handle = soap->fdimereadopen(soap, (void*)content->ptr, content->id, content->type, content->options)) || soap->error))
+    { size_t size = content->size;
+      if (!handle)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadopen failed\n"));
+        return soap->error;
+      }
+      if (!content->size && ((soap->mode & SOAP_ENC_XML) || (soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_IO) == SOAP_IO_STORE))
+      { size_t chunksize = sizeof(soap->tmpbuf);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked streaming DIME\n"));
+        do 
+        { size = soap->fdimeread(soap, handle, soap->tmpbuf, chunksize);
+          DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread returned %lu bytes\n", (unsigned long)size));
+          if (size < chunksize)
+ 	  { soap->dime.flags &= ~SOAP_DIME_CF;
+            if (!content->next)
+              soap->dime.flags |= SOAP_DIME_ME;
+	  }
+          else
+            soap->dime.flags |= SOAP_DIME_CF;
+	  soap->dime.size = size;
+          if (soap_putdimehdr(soap)
+	   || soap_putdimefield(soap, soap->tmpbuf, size))
+            break;
+          if (soap->dime.id)
+ 	  { soap->dime.flags &= ~(SOAP_DIME_MB | SOAP_DIME_MEDIA);
+            soap->dime.id = NULL;
+            soap->dime.type = NULL;
+            soap->dime.options = NULL;
+          }  
+        } while (size >= chunksize);
+      }
+      else
+      { if (!content->next)
+          soap->dime.flags |= SOAP_DIME_ME;
+        if (soap_putdimehdr(soap))
+          return soap->error;
+        do
+        { size_t bufsize;
+	  if (size < sizeof(soap->tmpbuf))
+            bufsize = size;
+          else
+            bufsize = sizeof(soap->tmpbuf);
+          if (!(bufsize = soap->fdimeread(soap, handle, soap->tmpbuf, bufsize)))
+          { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread failed: insufficient data (%lu bytes remaining from %lu bytes)\n", (unsigned long)size, (unsigned long)soap->dime.size));
+            soap->error = SOAP_EOF;
+	    break;
+          }
+          if (soap_send_raw(soap, soap->tmpbuf, bufsize))
+            break;
+          size -= bufsize;
+        } while (size);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+        soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+      if (soap->fdimereadclose)
+        soap->fdimereadclose(soap, handle);
+    }
+    else
+    { if (!content->next)
+        soap->dime.flags |= SOAP_DIME_ME;
+      if (soap_putdimehdr(soap)
+       || soap_putdimefield(soap, (char*)content->ptr, content->size))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static char *
+soap_getdimefield(struct soap *soap, size_t n)
+{ register soap_wchar c;
+  register int i;
+  register char *s;
+  char *p = NULL;
+  if (n)
+  { p = (char*)soap_malloc(soap, n + 1);
+    if (p)
+    { s = p;
+      for (i = n; i > 0; i--)
+      { if ((int)(c = soap_get1(soap)) == EOF)
+        { soap->error = SOAP_EOF;
+          return NULL;
+        }
+        *s++ = (char)c;
+      }
+      *s = '\0';
+      if ((soap->error = soap_move(soap, -(long)n&3)))
+        return NULL;
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdimehdr(struct soap *soap)
+{ register soap_wchar c;
+  register char *s;
+  register int i;
+  unsigned char tmp[12];
+  size_t optlen, idlen, typelen;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return soap->error = SOAP_DIME_END;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME header\n"));
+  if (soap->dime.buflen || soap->dime.chunksize)
+  { if (soap_move(soap, (long)(soap->dime.size - soap_tell(soap))))
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, soap_getchar(soap)); /* skip padding and get hdr */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... From chunked\n"));
+    return SOAP_OK;
+  }
+  s = (char*)tmp;
+  for (i = 12; i > 0; i--)
+  { if ((int)(c = soap_getchar(soap)) == EOF)
+      return soap->error = SOAP_EOF;
+    *s++ = (char)c;
+  }
+  if ((tmp[0] & 0xF8) != SOAP_DIME_VERSION)
+    return soap->error = SOAP_DIME_MISMATCH;
+  soap->dime.flags = (tmp[0] & 0x7) | (tmp[1] & 0xF0);
+  optlen = (tmp[2] << 8) | tmp[3];
+  idlen = (tmp[4] << 8) | tmp[5];
+  typelen = (tmp[6] << 8) | tmp[7];
+  soap->dime.size = (tmp[8] << 24) | (tmp[9] << 16) | (tmp[10] << 8) | tmp[11];
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME size=%lu flags=0x%X\n", (unsigned long)soap->dime.size, soap->dime.flags));
+  if (!(soap->dime.options = soap_getdimefield(soap, optlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.id = soap_getdimefield(soap, idlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.type = soap_getdimefield(soap, typelen)) && soap->error)
+    return soap->error;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME id=%s, type=%s, options=%s\n", soap->dime.id?soap->dime.id:"", soap->dime.type?soap->dime.type:"", soap->dime.options?soap->dime.options+4:""));
+  if (soap->dime.flags & SOAP_DIME_ME)
+    soap->mode &= ~SOAP_ENC_DIME;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdime(struct soap *soap)
+{ while (soap->dime.flags & SOAP_DIME_CF)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap_move(soap, soap->dime.size))
+      return soap->error = SOAP_EOF;
+  }
+  if (soap_move(soap, ((soap->dime.size+3)&(~3))-soap_tell(soap)))
+    return soap->error = SOAP_EOF;
+  for (;;)
+  { register struct soap_multipart *content;
+    if (soap_getdimehdr(soap))
+      break;
+    if (soap->fdimewriteopen && ((soap->dime.ptr = (char*)soap->fdimewriteopen(soap, soap->dime.id, soap->dime.type, soap->dime.options)) || soap->error))
+    { const char *id, *type, *options;
+      size_t size, n;
+      if (!soap->dime.ptr)
+        return soap->error;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      for (;;)
+      { size = soap->dime.size;
+        for (;;)
+        { n = soap->buflen - soap->bufidx;
+          if (size < n)
+            n = size;
+          if ((soap->error = soap->fdimewrite(soap, (void*)soap->dime.ptr, soap->buf + soap->bufidx, n)))
+            break;
+	  size -= n;
+	  if (!size)
+	  { soap->bufidx += n;
+	    break;
+	  }
+	  if (soap_recv(soap))
+          { soap->error = SOAP_EOF;
+	    goto end;
+          }
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+        { soap->error = SOAP_EOF;
+	  break;
+        }
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          break;
+      }
+end:
+      if (soap->fdimewriteclose)
+        soap->fdimewriteclose(soap, (void*)soap->dime.ptr);
+      soap->dime.size = 0;
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else if (soap->dime.flags & SOAP_DIME_CF)
+    { const char *id, *type, *options;
+      register soap_wchar c;
+      register char *s;
+      register int i;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      if (soap_new_block(soap))
+        return SOAP_EOM;
+      for (;;)
+      { s = (char*)soap_push_block(soap, soap->dime.size);
+        if (!s)
+          return soap->error = SOAP_EOM;
+        for (i = soap->dime.size; i > 0; i--)
+        { if ((int)(c = soap_get1(soap)) == EOF)
+            return soap->error = SOAP_EOF;
+          *s++ = (char)c;
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+          return soap->error = SOAP_EOF;
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          return soap->error;
+      }
+      soap->dime.size = soap->blist->size++; /* allocate one more for '\0' */
+      if (!(soap->dime.ptr = soap_save_block(soap, NULL, 0)))
+        return soap->error;
+      soap->dime.ptr[soap->dime.size] = '\0'; /* force 0-terminated */
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else
+      soap->dime.ptr = soap_getdimefield(soap, soap->dime.size);
+    content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, soap->dime.ptr, soap->dime.size);
+    if (!content)
+      return soap->error = SOAP_EOM;
+    content->id = soap->dime.id;
+    content->type = soap->dime.type;
+    content->options = soap->dime.options;
+    soap_resolve_attachment(soap, content);
+    if (soap->error)
+      return soap->error;
+  }
+  if (soap->error != SOAP_DIME_END)
+    return soap->error;
+  return soap->error = SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmimehdr(struct soap *soap)
+{ struct soap_multipart *content;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  while (!*soap->msgbuf);
+  if (soap->msgbuf[0] == '-' && soap->msgbuf[1] == '-')
+  { char *s = soap->msgbuf + strlen(soap->msgbuf) - 1;
+    /* remove white space */
+    while (soap_blank(*s))
+      s--;
+    s[1] = '\0';
+    if (soap->mime.boundary)
+    { if (strcmp(soap->msgbuf + 2, soap->mime.boundary))
+        return soap->error = SOAP_MIME_ERROR;
+    }
+    else
+      soap->mime.boundary = soap_strdup(soap, soap->msgbuf + 2);
+    if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  if (soap_set_mime_attachment(soap, NULL, 0, SOAP_MIME_NONE, NULL, NULL, NULL, NULL))
+    return soap->error = SOAP_EOM;
+  content = soap->mime.last;
+  for (;;)
+  { register char *key = soap->msgbuf;
+    register char *val;
+    if (!*key)
+      break;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "MIME header: %s\n", key));
+    val = strchr(soap->msgbuf, ':');
+    if (val)
+    { *val = '\0';
+      do val++;
+      while (*val && *val <= 32);
+      if (!soap_tag_cmp(key, "Content-ID"))
+        content->id = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Location"))
+        content->location = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Disposition"))
+        content->id = soap_strdup(soap, soap_get_header_attribute(soap, val, "name"));
+      else if (!soap_tag_cmp(key, "Content-Type"))
+        content->type = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Description"))
+        content->description = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Transfer-Encoding"))
+        content->encoding = (enum soap_mime_encoding)soap_int_code(mime_codes, val, (long)SOAP_MIME_NONE);
+    }
+    if (soap_getline(soap, key, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmime(struct soap *soap)
+{ register soap_wchar c = 0;
+  if (!soap->mime.last)
+    return SOAP_OK;
+  for (;;)
+  { register size_t i, m = 0;
+    register char *s, *t = NULL;
+    struct soap_multipart *content = soap->mime.last;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Parsing MIME content id=%s type=%s\n", content->id?content->id:"", content->type?content->type:""));
+    if (soap_new_block(soap))
+      return soap->error = SOAP_EOM;
+    for (;;)
+    { register short flag = 0;
+      if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+        return soap->error = SOAP_EOM;
+      for (i = 0; i < SOAP_BLKLEN; i++)
+      { if (m > 0)
+        { *s++ = *t++;
+	  m--;
+	}
+	else
+        { if (!flag)
+	  { c = soap_get1(soap);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	  }
+	  if (flag || c == '\r')
+	  { t = soap->tmpbuf;
+	    memset(t, 0, sizeof(soap->tmpbuf));
+            strcpy(t, "\n--");
+            if (soap->mime.boundary)
+	      strncat(t, soap->mime.boundary, sizeof(soap->tmpbuf)-4);
+	    do c = soap_getchar(soap);
+	    while (c == *t++);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	    if (!*--t)
+	      goto end;
+	    *t = (char)c;
+	    flag = (c == '\r');
+	    m = t - soap->tmpbuf + 1 - flag;
+	    t = soap->tmpbuf;
+	    c = '\r';
+	  }
+	  *s++ = (char)c;
+        }
+      }
+    }
+end:
+    *s = '\0'; /* force 0-terminated */
+    content->size = soap_size_block(soap, i+1)-1;
+    content->ptr = soap_save_block(soap, NULL, 0);
+    soap_resolve_attachment(soap, content);
+    if (c == '-' && soap_getchar(soap) == '-')
+      break;
+    while (c != '\r' && (int)c != EOF && soap_blank(c))
+      c = soap_getchar(soap);
+    if (c != '\r' || soap_getchar(soap) != '\n')
+      return soap->error = SOAP_MIME_ERROR;
+    if (soap_getmimehdr(soap))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_match_cid(struct soap *soap, const char *s, const char *t)
+{ register size_t n;
+  if (!s)
+    return 1;
+  if (!strcmp(s, t))
+    return 0;
+  if (!strncmp(s, "cid:", 4))
+    s += 4;
+  n = strlen(t);
+  if (*t == '<')
+  { t++;
+    n -= 2;
+  }
+  if (!strncmp(s, t, n) && !s[n])
+    return 0;
+  soap_decode(soap->tmpbuf, sizeof(soap->tmpbuf), s, SOAP_STR_EOS);
+  if (!strncmp(soap->tmpbuf, t, n) && !soap->tmpbuf[n])
+    return 0;
+  return 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_resolve_attachment(struct soap *soap, struct soap_multipart *content)
+{ if (content->id)
+  { register struct soap_xlist **xp = &soap->xlist;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving attachment data for id=%s\n", content->id));
+    while (*xp)
+    { register struct soap_xlist *xq = *xp;
+      if (!soap_match_cid(soap, xq->id, content->id))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Found matching attachment %s for content id=%s\n", xq->id, content->id));
+	*xp = xq->next;
+        *xq->ptr = (unsigned char*)content->ptr;
+        *xq->size = (int)content->size;
+        *xq->type = (char*)content->type;
+	if (content->options)
+          *xq->options = (char*)content->options;
+        else
+          *xq->options = (char*)content->description;
+	SOAP_FREE(soap, xq);
+      }
+      else
+        xp = &(*xp)->next;
+    }
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmimehdr(struct soap *soap, struct soap_multipart *content)
+{ const char *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "MIME attachment type=%s\n", content->type?content->type:""));
+  if (soap_send3(soap, "\r\n--", soap->mime.boundary, "\r\n"))
+    return soap->error;
+  if (content->type && soap_send3(soap, "Content-Type: ", content->type, "\r\n"))
+    return soap->error;
+  s = soap_str_code(mime_codes, content->encoding);
+  if (s && soap_send3(soap, "Content-Transfer-Encoding: ", s, "\r\n"))
+    return soap->error;
+  if (content->id && soap_send3(soap, "Content-ID: ", content->id, "\r\n"))
+    return soap->error;
+  if (content->location && soap_send3(soap, "Content-Location: ", content->location, "\r\n"))
+    return soap->error;
+  if (content->description && soap_send3(soap, "Content-Description: ", content->description, "\r\n"))
+    return soap->error;
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_MIME) || !soap->mime.boundary)
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending MIME attachments\n"));
+  for (content = soap->mime.first; content; content = content->next)
+    if (soap_putmimehdr(soap, content)
+     || soap_send_raw(soap, content->ptr, content->size))
+      return soap->error;
+  return soap_send3(soap, "\r\n--", soap->mime.boundary, "--");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_dime(struct soap *soap)
+{ soap->omode |= SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_mime(struct soap *soap, const char *boundary, const char *start)
+{ soap->omode |= SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = soap_strdup(soap, boundary);
+  soap->mime.start = soap_strdup(soap, start);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_dime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_mime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart*
+soap_new_multipart(struct soap *soap, struct soap_multipart **first, struct soap_multipart **last, char *ptr, size_t size)
+{ struct soap_multipart *content;
+  content = (struct soap_multipart*)soap_malloc(soap, sizeof(struct soap_multipart));
+  if (content)
+  { content->next = NULL;
+    content->ptr = ptr;
+    content->size = size;
+    content->id = NULL;
+    content->type = NULL;
+    content->options = NULL;
+    content->encoding = SOAP_MIME_NONE;
+    content->location = NULL;
+    content->description = NULL;
+    if (!*first)
+      *first = content;
+    if (*last)
+      (*last)->next = content;
+    *last = content;
+  }
+  return content;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_dime_attachment(struct soap *soap, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->options = soap_dime_option(soap, optype, option);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_mime_attachment(struct soap *soap, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->encoding = encoding;
+  content->location = soap_strdup(soap, location);
+  content->description = soap_strdup(soap, description);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap_multipart*
+SOAP_FMAC2
+soap_next_multipart(struct soap_multipart *content)
+{ if (content)
+    return content->next;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_select_mime_boundary(struct soap *soap)
+{ while (!soap->mime.boundary || soap_valid_mime_boundary(soap))
+  { register char *s = soap->mime.boundary;
+    register size_t n = 0;
+    if (s)
+      n = strlen(s);
+    if (n < 16)
+    { n = 64;
+      s = soap->mime.boundary = (char*)soap_malloc(soap, n + 1);
+      if (!s)
+        return;
+    }
+    strcpy(s, "==");
+    s += 2;
+    n -= 4;
+    while (n)
+    { *s++ = soap_base64o[soap_random & 0x3F];
+      n--;
+    }
+    strcpy(s, "==");
+  }
+  if (!soap->mime.start)
+    soap->mime.start = "<SOAP-ENV:Envelope>";
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_valid_mime_boundary(struct soap *soap)
+{ register struct soap_multipart *content;
+  register size_t k = strlen(soap->mime.boundary);
+  for (content = soap->mime.first; content; content = content->next)
+  { if (content->ptr && content->size >= k)
+    { register const char *p = (const char*)content->ptr; 
+      register size_t i;
+      for (i = 0; i < content->size - k; i++, p++)
+        if (!strncmp(p, soap->mime.boundary, k))
+          return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	HTTP cookie handling
+ *
+\******************************************************************************/
+
+#ifdef WITH_COOKIES
+/******************************************************************************/
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_encode_cookie(const char *s, char *t, size_t len)
+{ register int c;
+  register size_t n = len;
+  while ((c = *s++) && --n > 0)
+  { if (c > ' ' && c < 128 && !strchr("()<>@,;:\\\"/[]?={}", c))
+      *t++ = c;
+    else if (n > 2)
+    { *t++ = '%';
+      *t++ = (c >> 4) + (c > 159 ? '7' : '0');
+      c &= 0xF;
+      *t++ = c + (c > 9 ? '7' : '0');
+      n -= 2;
+    }
+    else
+      break;
+  }
+  *t = '\0';
+  return len - n;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  size_t n;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (*path == '/')
+    path++;
+  n = strlen(path);
+  for (p = soap->cookies; p; p = p->next)
+    if (!strcmp(p->name, name)
+     && domain
+     && p->domain
+     && !strcmp(p->domain, domain)
+     && !strncmp(p->path, path, n))
+      break;
+  return p;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_set_cookie(struct soap *soap, const char *name, const char *value, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  int n;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set cookie: %s=%s domain=%s path=%s\n", name, value?value:"", domain?domain:"", path?path:""));
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return NULL;
+  }
+  if (*path == '/')
+    path++;
+  q = soap_cookie(soap, name, domain, path);
+  if (!q)
+  { if ((q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+    { if ((q->name = (char*)SOAP_MALLOC(soap, strlen(name)+1)))
+        strcpy(q->name, name);
+      q->value = NULL;
+      q->domain = NULL;
+      q->path = NULL;
+      q->expire = -1;
+      q->version = 0;
+      q->secure = 0;
+      q->modified = 0;
+      for (p = &soap->cookies, n = soap->cookie_max; *p && n; p = &(*p)->next, n--)
+        if (!strcmp((*p)->name, name) && (*p)->path && strcmp((*p)->path, path) < 0)
+          break;
+      if (n)
+      { q->next = *p;
+        *p = q;
+      }
+      else
+      { SOAP_FREE(soap, q->name);
+        SOAP_FREE(soap, q);
+        q = NULL;
+      }
+    }
+  }
+  else
+    q->modified = 1;
+  if (q)
+  { if (q->value)
+    { SOAP_FREE(soap, q->value);
+      q->value = NULL;
+    }
+    if (q->domain)
+    { SOAP_FREE(soap, q->domain);
+      q->domain = NULL;
+    }
+    if (q->path)
+    { SOAP_FREE(soap, q->path);
+      q->path = NULL;
+    }
+    if (value && *value && (q->value = (char*)SOAP_MALLOC(soap, strlen(value)+1)))
+      strcpy(q->value, value);
+    if (domain && *domain && (q->domain = (char*)SOAP_MALLOC(soap, strlen(domain)+1)))
+      strcpy(q->domain, domain);
+    if (path && *path && (q->path = (char*)SOAP_MALLOC(soap, strlen(path)+1)))
+      strcpy(q->path, path);
+    q->session = 1;
+    q->env = 0;
+  }
+  return q;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!domain)
+  { soap_set_receiver_error(soap, "Cookie domain not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (*path == '/')
+    path++;
+  for (p = &soap->cookies, q = *p; q; q = *p)
+    if (!strcmp(q->name, name) && !strcmp(q->domain, domain) && !strncmp(q->path, path, strlen(q->path)))
+    { if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+      p = &q->next;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_env_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)) && p->env)
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_cookie_expire(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->expire;
+  return -1;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_expire(struct soap *soap, const char *name, long expire, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->expire = expire;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 1;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_clr_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 0;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putsetcookies(struct soap *soap)
+{ struct soap_cookie *p;
+  char *s, tmp[4096];
+  const char *t;
+  for (p = soap->cookies; p; p = p->next)
+  { if (p->modified || !p->env)
+    { s = tmp;
+      if (p->name)
+        s += soap_encode_cookie(p->name, s, tmp-s+4064);
+      if (p->value && *p->value)
+      { *s++ = '=';
+        s += soap_encode_cookie(p->value, s, tmp-s+4064);
+      }
+      if (p->domain && (int)strlen(p->domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", p->domain);
+      else if (soap->cookie_domain && (int)strlen(soap->cookie_domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", soap->cookie_domain);
+      strcat(s, ";Path=\"/");
+      if (p->path)
+        t = p->path;
+      else
+        t = soap->cookie_path;
+      if (t)
+      { if (*t == '/')
+          t++;
+        if ((int)strlen(t) < tmp-s+4064)
+          strcat(s, t);
+      }
+      s += strlen(s);
+      *s++ = '"';
+      if (p->version > 0)
+        sprintf(s, ";Version=%u", p->version);
+      if (p->expire >= 0)
+        sprintf(s, ";Max-Age=%ld", p->expire);
+      if (p->secure)
+        strcat(s, ";Secure");
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set-Cookie: %s\n", tmp));
+      if ((soap->error = soap->fposthdr(soap, "Set-Cookie", tmp)))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putcookies(struct soap *soap, const char *domain, const char *path, int secure)
+{ struct soap_cookie **p, *q;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  char *s, tmp[4096];
+  p = &soap->cookies;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending cookies for domain=%s path=%s\n", domain, path));
+  if (*path == '/')
+    path++;
+  while ((q = *p))
+  { if (q->expire && now > q->expire)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie %s expired\n", q->name));
+      SOAP_FREE(soap, q->name);
+      if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+    { size_t domlen = 0;
+      if (q->domain)
+      { const char *s = strchr(q->domain, ':');
+        if (s)
+	  domlen = s - q->domain;
+	else
+          domlen = strlen(q->domain);
+      }
+      if ((!q->domain || !strncmp(q->domain, domain, domlen))
+          && (!q->path || !strncmp(q->path, path, strlen(q->path)))
+          && (!q->secure || secure))
+      { s = tmp;
+        if (q->version != version)
+        { sprintf(s, "$Version=%u;", q->version);
+          version = q->version;
+        }
+        if (q->name)
+          s += soap_encode_cookie(q->name, s, tmp-s+4080);
+        if (q->value && *q->value)
+        { *s++ = '=';
+          s += soap_encode_cookie(q->value, s, tmp-s+4080);
+        }
+        if (q->path && (int)strlen(q->path) < tmp-s+4080)
+        { sprintf(s, ";$Path=\"/%s\"", (*q->path == '/' ? q->path + 1 : q->path));
+          s += strlen(s);
+        }
+        if (q->domain && (int)strlen(q->domain) < tmp-s+4080)
+          sprintf(s, ";$Domain=\"%s\"", q->domain);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie: %s\n", tmp));
+        if ((soap->error = soap->fposthdr(soap, "Cookie", tmp)))
+          return soap->error;
+      }
+      p = &q->next;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_getcookies(struct soap *soap, const char *val)
+{ struct soap_cookie *p = NULL, *q;
+  const char *s;
+  char *t, tmp[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  char *domain = NULL;
+  char *path = NULL;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  if (!val)
+    return;
+  s = val;
+  while (*s)
+  { s = soap_decode_key(tmp, sizeof(tmp), s);
+    if (!soap_tag_cmp(tmp, "$Version"))
+    { if ((s = soap_decode_val(tmp, sizeof(tmp), s)))
+      { if (p)
+          p->version = (int)atol(tmp);
+        else
+          version = (int)atol(tmp);
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Path"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->path)
+          SOAP_FREE(soap, p->path);
+        p->path = t;
+      }
+      else
+      { if (path)
+          SOAP_FREE(soap, path);
+        path = t;
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Domain"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->domain)
+          SOAP_FREE(soap, p->domain);
+	p->domain = t;
+      }
+      else
+      { if (domain)
+          SOAP_FREE(soap, domain);
+        domain = t;
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Path"))
+    { if (p->path)
+        SOAP_FREE(soap, p->path);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->path = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->path, tmp);
+      }
+      else
+        p->path = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Domain"))
+    { if (p->domain)
+        SOAP_FREE(soap, p->domain);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->domain = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->domain, tmp);
+      }
+      else
+        p->domain = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Version"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->version = (unsigned int)atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Max-Age"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->expire = now + atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Expires"))
+    { struct tm T;
+      char a[3]; 
+      static const char mns[] = "anebarprayunulugepctovec";
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (strlen(tmp) > 20)
+      { memset((void*)&T, 0, sizeof(T));
+        a[0] = tmp[4];
+        a[1] = tmp[5];
+        a[2] = '\0';
+        T.tm_mday = (int)atol(a);
+        a[0] = tmp[8];
+        a[1] = tmp[9];
+        T.tm_mon = (strstr(mns, a) - mns) / 2;
+        a[0] = tmp[11];
+        a[1] = tmp[12];
+        T.tm_year = 100 + (int)atol(a);
+        a[0] = tmp[13];
+        a[1] = tmp[14];
+        T.tm_hour = (int)atol(a);
+        a[0] = tmp[16];
+        a[1] = tmp[17];
+        T.tm_min = (int)atol(a);
+        a[0] = tmp[19];
+        a[1] = tmp[20];
+        T.tm_sec = (int)atol(a);
+        p->expire = soap_timegm(&T);
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Secure"))
+      p->secure = 1;
+    else
+    { if (p)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+        if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+        { q->version = p->version;
+          q->expire = p->expire;
+          q->secure = p->secure;
+          q->env = 1;
+        }
+        if (p->name)
+          SOAP_FREE(soap, p->name);
+        if (p->value)
+          SOAP_FREE(soap, p->value);
+        if (p->domain)
+          SOAP_FREE(soap, p->domain);
+        if (p->path)
+          SOAP_FREE(soap, p->path);
+        SOAP_FREE(soap, p);
+      }
+      if ((p = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      { p->name = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+        strcpy(p->name, tmp);
+        s = soap_decode_val(tmp, sizeof(tmp), s);
+        if (*tmp)
+        { p->value = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+          strcpy(p->value, tmp);
+        }
+        else
+          p->value = NULL;
+        p->domain = domain;
+        p->path = path;
+        p->expire = 0;
+        p->secure = 0;
+        p->version = version;
+      }
+    }
+  }
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+    if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+    { q->version = p->version;
+      q->expire = p->expire;
+      q->secure = p->secure;
+      q->env = 1;
+    }
+    if (p->name)
+      SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+  if (domain)
+    SOAP_FREE(soap, domain);
+  if (path)
+    SOAP_FREE(soap, path);
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getenv_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  const char *s;
+  char key[4096], val[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  if (!(s = getenv("HTTP_COOKIE")))
+    return SOAP_ERR;
+  do
+  { s = soap_decode_key(key, sizeof(key), s);
+    s = soap_decode_val(val, sizeof(val), s);
+    p = soap_set_cookie(soap, key, val, NULL, NULL);
+    if (p)
+      p->env = 1;
+  } while (*s);
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_copy_cookies(struct soap *soap)
+{ struct soap_cookie *p, **q, *r;
+  q = &r;
+  for (p = soap->cookies; p; p = p->next)
+  { if (!(*q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      return r;
+    **q = *p;
+    if (p->name)
+    { if (((*q)->name = (char*)SOAP_MALLOC(soap, strlen(p->name)+1)))
+        strcpy((*q)->name, p->name);
+    }
+    if (p->value)
+    { if (((*q)->value = (char*)SOAP_MALLOC(soap, strlen(p->value)+1)))
+        strcpy((*q)->value, p->value);
+    }
+    if (p->domain)
+    { if (((*q)->domain = (char*)SOAP_MALLOC(soap, strlen(p->domain)+1)))
+        strcpy((*q)->domain, p->domain);
+    }
+    if (p->path)
+    { if (((*q)->path = (char*)SOAP_MALLOC(soap, strlen(p->path)+1)))
+        strcpy((*q)->path, p->path);
+    }
+    q = &(*q)->next;
+  }
+  *q = NULL;
+  return r;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  for (p = soap->cookies; p; p = soap->cookies)
+  { soap->cookies = p->next;
+    SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+}
+
+/******************************************************************************/
+#endif /* WITH_COOKIES */
+
+/******************************************************************************/
+#ifdef WITH_GZIP
+#ifndef PALM_1
+static int
+soap_getgziphdr(struct soap *soap)
+{ int i;
+  soap_wchar c, f = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get gzip header\n"));
+  for (i = 0; i < 9; i++)
+  { if ((int)(c = soap_get1(soap) == EOF))
+      return soap->error = SOAP_EOF;
+    if (i == 2)
+      f = c;
+  }
+  if (f & 0x04) /* FEXTRA */
+  { for (i = soap_get1(soap) | (soap_get1(soap) << 8); i; i--)
+      if ((int)soap_get1(soap) == EOF)
+        return soap->error = SOAP_EOF;
+  }
+  if (f & 0x08) /* FNAME */
+    do
+      c = soap_get1(soap);
+    while (c && (int)c != EOF);
+  if ((int)c != EOF && (f & 0x10)) /* FCOMMENT */
+    do
+      c = soap_get1(soap);
+    while (c && (int)f != EOF);
+  if ((int)c != EOF && (f & 0x01)) /* FHCRC */
+  { if ((int)(c = soap_get1(soap)) != EOF)
+      c = soap_get1(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_recv(struct soap *soap)
+{ soap_wchar c;
+  soap->error = SOAP_OK;
+  soap_free(soap);
+  soap_set_local_namespaces(soap);
+  soap->version = 0;	/* don't assume we're parsing SOAP content by default */
+#ifndef WITH_NOIDREF
+  soap_free_iht(soap);
+#endif
+  if ((soap->imode & SOAP_IO) == SOAP_IO_CHUNK)
+    soap->omode |= SOAP_IO_CHUNK;
+  soap->imode &= ~SOAP_IO;
+  soap->mode = soap->imode;
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  soap->ahead = 0;
+  soap->peeked = 0;
+  soap->level = 0;
+  soap->part = SOAP_BEGIN;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  *soap->endpoint = '\0';
+  soap->action = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket))
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->recvfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->recvfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#ifdef WITH_ZLIB
+  soap->mode &= ~SOAP_ENC_ZLIB;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.next_in = Z_NULL;
+  soap->d_stream.avail_in = 0;
+  soap->d_stream.next_out = (Byte*)soap->buf;
+  soap->d_stream.avail_out = SOAP_BUFLEN;
+  soap->z_ratio_in = 1.0;
+#endif
+#ifndef WITH_LEANER
+  if (soap->fprepareinit)
+    soap->fprepareinit(soap);
+#endif
+  c = soap_getchar(soap);
+#ifdef WITH_GZIP
+  if (c == 0x1F)
+  { if (soap_getgziphdr(soap))
+      return soap->error;
+    if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+    soap->zlib_state = SOAP_ZLIB_INFLATE;
+    soap->mode |= SOAP_ENC_ZLIB;
+    soap->zlib_in = SOAP_ZLIB_GZIP;
+    soap->z_crc = crc32(0L, NULL, 0);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    /* should not chunk over plain transport, so why bother to check? */
+    /* if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) */
+    /*   soap->z_buflen = soap->bufidx; */
+    /* else */
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+    soap->z_buflen = soap->buflen;
+    soap->buflen = soap->bufidx;
+    c = soap_getchar(soap);
+  }  
+#endif
+#ifndef WITH_LEANER
+  if (c == '-' && soap_get0(soap) == '-')
+    soap->mode |= SOAP_ENC_MIME;
+  else if ((c & 0xFFFC) == (SOAP_DIME_VERSION | SOAP_DIME_MB) && (soap_get0(soap) & 0xFFF0) == 0x20)
+    soap->mode |= SOAP_ENC_DIME;
+  else
+#endif
+  { while (soap_blank(c))
+      c = soap_getchar(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  soap_unget(soap, c);
+#ifndef WITH_NOHTTP
+  /* if not XML or (start of)BOM or MIME/DIME/ZLIB, assume HTTP header */
+  if (c != '<' && c != 0xEF && !(soap->mode & (SOAP_ENC_MIME | SOAP_ENC_DIME | SOAP_ENC_ZLIB)))
+  { soap->mode &= ~SOAP_IO;
+    soap->error = soap->fparse(soap);
+    if (soap->error && soap->error < SOAP_STOP)
+    { soap->keep_alive = 0; /* force close later */
+      return soap->error;
+    }
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { soap->chunkbuflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+      soap->chunksize = 0;
+    }
+#ifndef WITH_LEANER
+    else if (soap->fpreparerecv && soap->buflen != soap->bufidx)
+      soap->fpreparerecv(soap, soap->buf + soap->bufidx, soap->buflen - soap->bufidx);
+#endif
+#ifdef WITH_ZLIB
+    if (soap->zlib_in != SOAP_ZLIB_NONE)
+    { /* fparse should not use soap_unget to push back last char */
+#ifdef WITH_GZIP
+      c = soap_get1(soap);
+      if (c == 0x1F)
+      { if (soap_getgziphdr(soap))
+          return soap->error;
+        if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        soap->z_crc = crc32(0L, NULL, 0);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+      }
+      else
+      { soap_revget1(soap);
+#else
+      {
+#endif
+        if (inflateInit(&soap->d_stream) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate initialized\n"));
+      }
+      soap->mode |= SOAP_ENC_ZLIB;
+      memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+      soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+      soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+    }
+#endif
+    if (soap->error)
+    { if (soap->error == SOAP_FORM && soap->fform)
+      { soap->error = soap->fform(soap);
+        if (soap->error == SOAP_OK)
+          soap->error = SOAP_STOP; /* prevents further processing */
+      }
+      return soap->error;
+    }
+  }
+#endif
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_MIME)
+  { if (soap_getmimehdr(soap))
+      return soap->error;
+    if (soap_get_header_attribute(soap, soap->mime.first->type, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+  }
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap->dime.flags & SOAP_DIME_CF)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked DIME SOAP message\n"));
+      soap->dime.chunksize = soap->dime.size;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+    }
+    soap->count = soap->buflen - soap->bufidx;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse(struct soap *soap)
+{ char header[SOAP_HDRLEN], *s;
+  unsigned short get = 0, status = 0, k = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Waiting for HTTP request/response...\n"));
+  *soap->endpoint = '\0';
+  soap->length = 0;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->action = NULL;
+  soap->authrealm = NULL;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP status: %s\n", soap->msgbuf));
+    for (;;)
+    { if (soap_getline(soap, header, SOAP_HDRLEN))
+      { if (soap->error == SOAP_EOF)
+	{ soap->error = SOAP_OK;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "EOF in HTTP header, continue anyway\n"));
+	  break;
+	}
+        return soap->error;
+      }
+      if (!*header)
+        break;
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP header: %s\n", header));
+      s = strchr(header, ':');
+      if (s)
+      { *s = '\0';
+        do s++;
+        while (*s && *s <= 32);
+        if ((soap->error = soap->fparsehdr(soap, header, s)))
+        { if (soap->error < SOAP_STOP)
+	    return soap->error;
+	  status = soap->error;
+	  soap->error = SOAP_OK;
+        }
+      }
+    }
+    if ((s = strchr(soap->msgbuf, ' ')))
+    { k = (unsigned short)soap_strtoul(s, &s, 10);
+      if (!soap_blank(*s))
+        k = 0;
+    }
+    else
+      k = 0;
+  } while (k == 100);
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Finished HTTP header parsing\n"));
+  s = strstr(soap->msgbuf, "HTTP/");
+  if (s && s[7] != '1')
+  { if (soap->keep_alive == 1)
+      soap->keep_alive = 0;
+    if (k == 0 && (soap->omode & SOAP_IO) == SOAP_IO_CHUNK) /* k == 0 for HTTP request */
+    { soap->imode |= SOAP_IO_CHUNK;
+      soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE;
+    }
+  }
+  if (soap->keep_alive < 0)
+    soap->keep_alive = 1;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Keep alive connection = %d\n", soap->keep_alive));
+  if (s && (((get = !strncmp(soap->msgbuf, "GET ", 4))) || !strncmp(soap->msgbuf, "POST ", 5)))
+  { size_t m = strlen(soap->endpoint);
+    size_t n = m + (s - soap->msgbuf) - 5 - (!get);
+    if (n >= sizeof(soap->endpoint))
+      n = sizeof(soap->endpoint) - 1;
+    strncpy(soap->path, soap->msgbuf + 4 + (!get), n - m);
+    soap->path[n - m] = '\0';
+    strcat(soap->endpoint, soap->path);
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Target endpoint='%s'\n", soap->endpoint));
+    if (get)
+    { soap->error = soap->fget(soap);
+      if (soap->error == SOAP_OK)
+        soap->error = SOAP_STOP; /* prevents further processing */
+      return soap->error;
+    }
+    if (status)
+      return soap->error = status;
+    return SOAP_OK;
+  }
+  if (k == 0 || (k >= 200 && k <= 299) || k == 400 || k == 500)
+    return SOAP_OK;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP error %d\n", k));
+  return soap_set_receiver_error(soap, "HTTP error", soap->msgbuf, k);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse_header(struct soap *soap, const char *key, const char *val)
+{ if (!soap_tag_cmp(key, "Host"))
+  { 
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+      strcpy(soap->endpoint, "https://");
+    else
+#endif
+      strcpy(soap->endpoint, "http://");
+    strncat(soap->endpoint, val, sizeof(soap->endpoint) - 8);
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifndef WITH_LEANER
+  else if (!soap_tag_cmp(key, "Content-Type"))
+  { if (soap_get_header_attribute(soap, val, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+    else if (soap_get_header_attribute(soap, val, "multipart/related")
+          || soap_get_header_attribute(soap, val, "multipart/form-data"))
+    { soap->mime.boundary = soap_strdup(soap, soap_get_header_attribute(soap, val, "boundary"));
+      soap->mime.start = soap_strdup(soap, soap_get_header_attribute(soap, val, "start"));
+      soap->mode |= SOAP_ENC_MIME;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Content-Length"))
+    soap->length = soap_strtoul(val, NULL, 10);
+  else if (!soap_tag_cmp(key, "Content-Encoding"))
+  { if (!soap_tag_cmp(val, "deflate"))
+#ifdef WITH_ZLIB
+      soap->zlib_in = SOAP_ZLIB_DEFLATE;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+    else if (!soap_tag_cmp(val, "gzip"))
+#ifdef WITH_GZIP
+      soap->zlib_in = SOAP_ZLIB_GZIP;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+  }
+#ifdef WITH_ZLIB
+  else if (!soap_tag_cmp(key, "Accept-Encoding"))
+  {
+#ifdef WITH_GZIP
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "gzip"))
+      soap->zlib_out = SOAP_ZLIB_GZIP;
+    else
+#endif
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "deflate"))
+      soap->zlib_out = SOAP_ZLIB_DEFLATE;
+    else
+      soap->zlib_out = SOAP_ZLIB_NONE;
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Transfer-Encoding"))
+  { soap->mode &= ~SOAP_IO;
+    if (!soap_tag_cmp(val, "chunked"))
+      soap->mode |= SOAP_IO_CHUNK;
+  }
+  else if (!soap_tag_cmp(key, "Connection"))
+  { if (!soap_tag_cmp(val, "keep-alive"))
+      soap->keep_alive = -soap->keep_alive;
+    else if (!soap_tag_cmp(val, "close"))
+      soap->keep_alive = 0;
+  }
+#ifndef WITH_LEAN
+  else if (!soap_tag_cmp(key, "Authorization"))
+  { if (!soap_tag_cmp(val, "Basic *"))
+    { int n;
+      char *s;
+      soap_base642s(soap, val + 6, soap->tmpbuf, sizeof(soap->tmpbuf) - 1, &n);
+      soap->tmpbuf[n] = '\0';
+      if ((s = strchr(soap->tmpbuf, ':')))
+      { *s = '\0';
+	soap->userid = soap_strdup(soap, soap->tmpbuf);
+	soap->passwd = soap_strdup(soap, s + 1);
+      }
+    }
+  }
+  else if (!soap_tag_cmp(key, "WWW-Authenticate"))
+    soap->authrealm = soap_strdup(soap, soap_get_header_attribute(soap, val + 6, "realm"));
+  else if (!soap_tag_cmp(key, "Expect"))
+  { if (!soap_tag_cmp(val, "100-continue"))
+    { if ((soap->error = soap->fposthdr(soap, "HTTP/1.1 100 Continue", NULL))
+       || (soap->error = soap->fposthdr(soap, NULL, NULL)))
+        return soap->error;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "SOAPAction"))
+  { if (*val == '"')
+    { soap->action = soap_strdup(soap, val + 1);
+      soap->action[strlen(soap->action) - 1] = '\0';
+    }
+  }
+  else if (!soap_tag_cmp(key, "Location"))
+  { strncpy(soap->endpoint, val, sizeof(soap->endpoint));
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifdef WITH_COOKIES
+  else if (!soap_tag_cmp(key, "Cookie") || !soap_tag_cmp(key, "Set-Cookie"))
+    soap_getcookies(soap, val);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_get_header_attribute(struct soap *soap, const char *line, const char *key)
+{ register const char *s = line;
+  if (s)
+  { while (*s)
+    { register short flag;
+      s = soap_decode_key(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      flag = soap_tag_cmp(soap->tmpbuf, key);
+      s = soap_decode_val(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      if (!flag)
+        return soap->tmpbuf;
+    }
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_key(char *buf, size_t len, const char *val)
+{ return soap_decode(buf, len, val, "=,;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_val(char *buf, size_t len, const char *val)
+{ if (*val != '=')
+  { *buf = '\0';
+    return val;
+  }
+  return soap_decode(buf, len, val + 1, ",;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char*
+soap_decode(char *buf, size_t len, const char *val, const char *sep)
+{ const char *s;
+  char *t = buf;
+  for (s = val; *s; s++)
+    if (*s != ' ' && *s != '\t' && !strchr(sep, *s))
+      break;
+  if (*s == '"')
+  { s++;
+    while (*s && *s != '"' && --len)
+      *t++ = *s++;
+  }
+  else
+  { while (soap_notblank(*s) && !strchr(sep, *s) && --len)
+    { if (*s == '%')
+      { *t++ = ((s[1] >= 'A' ? (s[1] & 0x7) + 9 : s[1] - '0') << 4)
+              + (s[2] >= 'A' ? (s[2] & 0x7) + 9 : s[2] - '0');
+        s += 3;
+      }
+      else
+        *t++ = *s++;
+    }
+  }
+  *t = '\0';
+  while (*s && !strchr(sep, *s))
+    s++;
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_out(struct soap *soap)
+{
+#ifndef WITH_LEANER
+  size_t n = 0;
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->mime.start)
+  { const char *s;
+    if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+      s = "application/dime";
+    else if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+    sprintf(soap->tmpbuf, "--%s\r\nContent-Type: %s\r\nContent-Transfer-Encoding: binary\r\nContent-ID: %s\r\n\r\n", soap->mime.boundary, s, soap->mime.start);
+    n = strlen(soap->tmpbuf);
+    if (soap_send_raw(soap, soap->tmpbuf, n))
+      return soap->error;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    soap->dime.size = soap->count;	/* DIME in MIME correction */
+  if (!(soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME))
+  { if (soap_putdimehdr(soap))
+      return soap->error;
+  }
+#endif
+  soap->part = SOAP_IN_ENVELOPE;
+  return soap_element_begin_out(soap, "SOAP-ENV:Envelope", 0, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Envelope"))
+    return soap->error;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { soap->dime.size = soap->count - soap->dime.size;	/* DIME in MIME correction */
+    sprintf(soap->id, soap->dime_id_format, 0);
+    soap->dime.id = soap->id;
+    if (soap->local_namespaces)
+    { if (soap->local_namespaces[0].out)
+        soap->dime.type = (char*)soap->local_namespaces[0].out;
+      else
+        soap->dime.type = (char*)soap->local_namespaces[0].ns;
+    }
+    soap->dime.options = NULL;
+    soap->dime.flags = SOAP_DIME_MB | SOAP_DIME_ABSURI;
+    if (!soap->dime.first)
+      soap->dime.flags |= SOAP_DIME_ME;
+    soap->count += 12 + ((strlen(soap->dime.id)+3)&(~3)) + ((strlen(soap->dime.type)+3)&(~3));
+  }
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+    return soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+#endif
+  soap->part = SOAP_END_ENVELOPE;
+  return SOAP_OK;
+} 
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_in(struct soap *soap)
+{ register struct Namespace *p;
+  soap->part = SOAP_IN_ENVELOPE;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Envelope", 0))
+    return soap->error = SOAP_VERSIONMISMATCH;
+  p = soap->local_namespaces;
+  if (p)
+  { const char *ns = p[0].out;
+    if (!ns)
+      ns = p[0].ns;
+    if (!strcmp(ns, soap_env1))
+    { soap->version = 1; /* make sure we use SOAP 1.1 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc1))))
+        strcpy(p[1].out, soap_enc1);
+    }
+    else if (!strcmp(ns, soap_env2))
+    { soap->version = 2; /* make sure we use SOAP 1.2 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc2))))
+        strcpy(p[1].out, soap_enc2);
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_in(struct soap *soap)
+{ soap->part = SOAP_END_ENVELOPE;
+  return soap_element_end_in(soap, "SOAP-ENV:Envelope");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_out(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap->version == 1)
+    soap->encoding = 1;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_SEC) && soap_set_attr(soap, "wsu:Id", "Body"))
+    return soap->error;
+#endif
+  if (soap_element(soap, "SOAP-ENV:Body", 0, NULL))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Body"))
+    return soap->error;
+  soap->part = SOAP_END_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_in(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Body", 0))
+    return soap->error;
+  if (!soap->body)
+    soap->part = SOAP_NO_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_in(struct soap *soap)
+{ if (soap->part == SOAP_NO_BODY)
+    return SOAP_OK;
+  soap->part = SOAP_END_BODY;
+  return soap_element_end_in(soap, "SOAP-ENV:Body");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_header(struct soap *soap)
+{ if (soap_getheader(soap) && soap->error == SOAP_TAG_MISMATCH)
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_endpoint(struct soap *soap, const char *endpoint)
+{ register const char *s;
+  register size_t i, n;
+  soap->endpoint[0] = '\0';
+  soap->host[0] = '\0';
+  soap->path[0] = '/';
+  soap->path[1] = '\0';
+  soap->port = 80;
+  if (!endpoint || !*endpoint)
+    return;
+  if (!strncmp(endpoint, "https:", 6))
+    soap->port = 443;
+  strncpy(soap->endpoint, endpoint, sizeof(soap->endpoint) - 1);
+  s = strchr(endpoint, ':');
+  if (s && s[1] == '/' && s[2] == '/')
+    s += 3;
+  else
+    s = endpoint;
+  n = strlen(s);
+  if (n >= sizeof(soap->host))
+    n = sizeof(soap->host) - 1;
+#ifdef WITH_IPV6
+  if (s[0] == '[')
+  { s++;
+    for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == ']')
+      { s++;
+        break; 
+      }
+    }
+  }
+  else
+  { for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == '/' || s[i] == ':')
+        break; 
+    }
+  }
+#else
+  for (i = 0; i < n; i++)
+  { soap->host[i] = s[i];
+    if (s[i] == '/' || s[i] == ':')
+      break; 
+  }
+#endif
+  soap->host[i] = '\0';
+  if (s[i] == ':')
+  { soap->port = (int)atol(s + i + 1);
+    for (i++; i < n; i++)
+      if (s[i] == '/')
+        break;
+  }
+  if (s[i])
+  { strncpy(soap->path, s + i, sizeof(soap->path));
+    soap->path[sizeof(soap->path) - 1] = '\0';
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect(struct soap *soap, const char *endpoint, const char *action)
+{ return soap_connect_command(soap, SOAP_POST, endpoint, action);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect_command(struct soap *soap, int http_command, const char *endpoint, const char *action)
+{ char host[sizeof(soap->host)];
+  int port;
+  size_t count;
+  soap->error = SOAP_OK;
+  strcpy(host, soap->host); /* save to compare */
+  port = soap->port; /* save to compare */
+  soap_set_endpoint(soap, endpoint);
+#ifndef WITH_LEANER
+  if (soap->fconnect)
+  { if ((soap->error = soap->fconnect(soap, endpoint, soap->host, soap->port)))
+      return soap->error;
+  }
+  else
+#endif
+  if (soap->fopen && *soap->host)
+  { soap->status = http_command;
+    if (!soap->keep_alive || !soap_valid_socket(soap->socket) || strcmp(soap->host, host) || soap->port != port || !soap->fpoll || soap->fpoll(soap))
+    { soap->keep_alive = 0; /* to force close */
+      soap->omode &= ~SOAP_IO_UDP; /* to force close */
+      soap_closesock(soap);
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Connect/reconnect to host='%s' path='%s' port=%d\n", soap->host, soap->path, soap->port));
+#ifdef WITH_UDP
+      if (!strncmp(endpoint, "soap.udp:", 9))
+        soap->omode |= SOAP_IO_UDP;
+#endif
+      soap->socket = soap->fopen(soap, endpoint, soap->host, soap->port);
+      if (soap->error)
+        return soap->error;
+      soap->keep_alive = ((soap->omode & SOAP_IO_KEEPALIVE) != 0);
+    }
+  }
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML) && endpoint)
+  { unsigned int k = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((k & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fpost(soap, endpoint, soap->host, soap->port, soap->path, action, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((k & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = k;
+  }
+  else if (action)
+    soap->action = soap_strdup(soap, action);
+  if (http_command != SOAP_POST)
+    return soap_end_send(soap);
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2base64(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register int i;
+  register unsigned long m;
+  register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, (n + 2) / 3 * 4 + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (!s)
+    return p;
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    t += 4;
+  }
+  t[0] = '\0';
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      t[i] = '=';
+    t[4] = '\0';
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_base642s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register int i, j, c;
+  register unsigned long m;
+  register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = (strlen(s) + 3) / 4 * 3;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  if (n)
+    *n = 0;
+  for (;;)
+  { for (i = 0; i < SOAP_BLKLEN; i++)
+    { m = 0;
+      j = 0;
+      while (j < 4)
+      { c = *s++;
+        if (c == '=' || !c)
+        { i *= 3;
+          switch (j)
+          { case 2:
+              *t++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *t++ = (char)((m >> 10) & 0xFF);
+              *t++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n += i;
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      }
+      *t++ = (char)((m >> 16) & 0xFF);
+      *t++ = (char)((m >> 8) & 0xFF);
+      *t++ = (char)(m & 0xFF);
+      if (l < 3)
+      { if (n)
+	  *n += i;
+        return p;
+      }
+      l -= 3;
+    }
+    if (n)
+      *n += 3 * SOAP_BLKLEN;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2hex(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, 2 * n + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (s)
+  { for (; n > 0; n--)
+    { register int m = *s++;
+      *t++ = (char)((m >> 4) + (m > 159 ? 'a' - 10 : '0'));
+      m &= 0x0F;
+      *t++ = (char)(m + (m > 9 ? 'a' - 10 : '0'));
+    }
+  }
+  *t++ = '\0';
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_hex2s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = strlen(s) / 2;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  while (l)
+  { register int d1, d2;
+    d1 = *s++;
+    if (!d1)
+      break;
+    d2 = *s++;
+    if (!d2)
+      break;
+    *t++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    l--;
+  }
+  if (n)
+    *n = t - p;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthttphdr(struct soap *soap, int status, size_t count)
+{ register const char *s = NULL;
+  register int err = SOAP_OK;
+#ifndef WITH_LEANER
+  register const char *r = NULL;
+#endif
+  if (status == SOAP_FILE && soap->http_content)
+    s = soap->http_content;
+  else if (status == SOAP_HTML)
+    s = "text/html; charset=utf-8";
+  else if (count || ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK))
+  { if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+  }
+#ifndef WITH_LEANER
+  if (soap->mode & (SOAP_ENC_DIME | SOAP_ENC_MTOM))
+  { if (soap->mode & SOAP_ENC_MTOM)
+    { r = s;
+      s = "application/xop+xml; charset=utf-8";
+    }
+    else
+      s = "application/dime";
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->status != SOAP_GET)
+  { register const char *t = strchr(s, ';');
+    sprintf(soap->tmpbuf, "multipart/related; boundary=\"%s\"; type=\"", soap->mime.boundary);
+    if (t)
+      strncat(soap->tmpbuf, s, t - s);
+    else
+      strcat(soap->tmpbuf, s);
+    if (soap->mime.start)
+    { strcat(soap->tmpbuf, "\"; start=\"");
+      strcat(soap->tmpbuf, soap->mime.start);
+    }
+    strcat(soap->tmpbuf, "\"");
+    if (r)
+    { strcat(soap->tmpbuf, "; start-info=\"");
+      strcat(soap->tmpbuf, r);
+      strcat(soap->tmpbuf, "\"");
+    }
+    s = soap->tmpbuf;
+  }
+#endif
+  if (s && (err = soap->fposthdr(soap, "Content-Type", s)))
+    return err;
+#ifdef WITH_ZLIB
+  if (soap->omode & SOAP_ENC_ZLIB)
+  {
+#ifdef WITH_GZIP
+    err = soap->fposthdr(soap, "Content-Encoding", "gzip");
+#else
+    err = soap->fposthdr(soap, "Content-Encoding", "deflate");
+#endif
+    if (err)
+      return err;
+  }
+#endif
+#ifndef WITH_LEANER
+  if ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK)
+    err = soap->fposthdr(soap, "Transfer-Encoding", "chunked");
+  else
+#endif
+  if (soap->status != SOAP_GET)
+  { sprintf(soap->tmpbuf, "%lu", (unsigned long)count);
+    err = soap->fposthdr(soap, "Content-Length", soap->tmpbuf);
+  }
+  if (err)
+    return err;
+  return soap->fposthdr(soap, "Connection", soap->keep_alive ? "keep-alive" : "close");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_get(struct soap *soap)
+{ return SOAP_GET_METHOD;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post(struct soap *soap, const char *endpoint, const char *host, int port, const char *path, const char *action, size_t count)
+{ register const char *s;
+  register int err;
+  if (soap->status == SOAP_GET)
+    s = "GET";
+  else
+    s = "POST";
+#ifdef PALM
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)) && strncmp(endpoint, "_beam:", 6) && strncmp(endpoint, "_local:", 7) && strncmp(endpoint, "_btobex:", 8))
+#else
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)))
+#endif
+    return SOAP_OK;
+  if (soap->proxy_host && strncmp(endpoint, "https:", 6))
+    sprintf(soap->tmpbuf, "%s %s HTTP/%s", s, endpoint, soap->http_version);
+  else
+    sprintf(soap->tmpbuf, "%s /%s HTTP/%s", s, (*path == '/' ? path + 1 : path), soap->http_version);
+  if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+    return err;
+  if (port != 80)
+    sprintf(soap->tmpbuf, "%s:%d", host, port);
+  else
+    strcpy(soap->tmpbuf, host); 
+  if ((err = soap->fposthdr(soap, "Host", soap->tmpbuf))
+   || (err = soap->fposthdr(soap, "User-Agent", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, SOAP_OK, count)))
+    return err;
+#ifdef WITH_ZLIB
+#ifdef WITH_GZIP
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "gzip, deflate")))
+#else
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "deflate")))
+#endif
+    return err;
+#endif
+#ifndef WITH_LEAN
+  if (soap->userid && soap->passwd && strlen(soap->userid) + strlen(soap->passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Authorization", soap->tmpbuf)))
+      return err;
+  }
+  if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+      return err;
+  }
+#endif
+#ifdef WITH_COOKIES
+#ifdef WITH_OPENSSL
+  if (soap_putcookies(soap, host, path, soap->ssl != NULL))
+    return soap->error;
+#else
+  if (soap_putcookies(soap, host, path, 0))
+    return soap->error;
+#endif
+#endif
+  if (action && soap->version == 1)
+  { sprintf(soap->tmpbuf, "\"%s\"", action);
+    if ((err = soap->fposthdr(soap, "SOAPAction", soap->tmpbuf)))
+      return err;
+  }
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_send_header(struct soap *soap, const char *s)
+{ register const char *t;
+  do
+  { t = strchr(s, '\n'); /* disallow \n in HTTP headers */
+    if (!t)
+      t = s + strlen(s);
+    if (soap_send_raw(soap, s, t - s))
+      return soap->error;
+    s = t + 1;
+  } while (*t);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post_header(struct soap *soap, const char *key, const char *val)
+{ if (key)
+  { if (http_send_header(soap, key))
+      return soap->error;
+    if (val && (soap_send_raw(soap, ": ", 2) || http_send_header(soap, val)))
+      return soap->error;
+  }
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_response(struct soap *soap, int status, size_t count)
+{ register int err;
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    httpOutputEnable(soap->rpmreqid);
+#endif
+  if (!status || status == SOAP_HTML || status == SOAP_FILE)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "OK 200\n"));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s 200 OK", soap->http_version);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", "200 OK")))
+      return err;
+  }
+  else if (status > 200 && status < 600)
+  { sprintf(soap->tmpbuf, "HTTP/%s %d %s", soap->http_version, status, http_error(soap, status));
+    if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      return err;
+#ifndef WITH_LEAN 
+    if (status == 401)
+    { sprintf(soap->tmpbuf, "Basic realm=\"%s\"", soap->authrealm ? soap->authrealm : "gSOAP Web Service");
+      if ((err = soap->fposthdr(soap, "WWW-Authenticate", soap->tmpbuf)))
+        return err;
+    }
+    else if ((status >= 301 && status <= 303) || status == 307)
+    { if ((err = soap->fposthdr(soap, "Location", soap->endpoint)))
+        return err;
+    }
+#endif
+  }
+  else
+  { const char *s = *soap_faultcode(soap);
+    if (soap->version == 2 && !strcmp(s, "SOAP-ENV:Sender"))
+      s = "400 Bad Request";
+    else
+      s = "500 Internal Server Error";
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error %s (status=%d)\n", s, status));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s %s", soap->http_version, s);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", s)))
+      return err;
+  }
+  if ((err = soap->fposthdr(soap, "Server", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, status, count)))
+    return err;
+#ifdef WITH_COOKIES
+  if (soap_putsetcookies(soap))
+    return soap->error;
+#endif
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_response(struct soap *soap, int status)
+{ register size_t count;
+  if (!(soap->omode & (SOAP_ENC_XML | SOAP_IO_STORE /* this tests for chunking too */))
+   && (status == SOAP_HTML || status == SOAP_FILE))
+  { soap->omode &= ~SOAP_IO;
+    soap->omode |= SOAP_IO_STORE;
+  }
+  soap->status = status;
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML))
+  { register int n = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((n & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fresponse(soap, status, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((n & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = n;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static const char*
+soap_set_validation_fault(struct soap *soap, const char *s, const char *t)
+{ if (*soap->tag)
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s in element <%s>", s, t?t:SOAP_STR_EOS, soap->tag);
+  else
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s", s, t?t:SOAP_STR_EOS);
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_fault(struct soap *soap)
+{ const char **c = soap_faultcode(soap);
+  const char **s = soap_faultstring(soap);
+  if (!*c && !*s && soap->fseterror)
+    soap->fseterror(soap, c, s);
+  if (!*c)
+  { if (soap->version == 2)
+      *c = "SOAP-ENV:Sender";
+    else
+      *c = "SOAP-ENV:Client";
+  }
+  if (*s)
+    return;
+  switch (soap->error)
+  {
+#ifndef WITH_LEAN
+    case SOAP_CLI_FAULT:
+      *s = "Client fault";
+      break;
+    case SOAP_SVR_FAULT:
+      *s = "Server fault";
+      break;
+    case SOAP_TAG_MISMATCH:
+      *s = soap_set_validation_fault(soap, "tag name or namespace mismatch", NULL);
+      break;
+    case SOAP_TYPE:
+      *s = soap_set_validation_fault(soap, "data type mismatch ", soap->type);
+      break;
+    case SOAP_SYNTAX_ERROR:
+      *s = "Well-formedness violation";
+      break;
+    case SOAP_NO_TAG:
+      *s = "No XML element tag";
+      break;
+    case SOAP_MUSTUNDERSTAND:
+      *c = "SOAP-ENV:MustUnderstand";
+      sprintf(soap->msgbuf, "The data in element '%s' must be understood but cannot be handled", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_VERSIONMISMATCH:
+      *c = "SOAP-ENV:VersionMismatch";
+      *s = "SOAP version mismatch or invalid SOAP message";
+      break;
+    case SOAP_DATAENCODINGUNKNOWN:
+      *c = "SOAP-ENV:DataEncodingUnknown";
+      *s = "Unsupported SOAP data encoding";
+      break;
+    case SOAP_NAMESPACE:
+      *s = soap_set_validation_fault(soap, "namespace mismatch", NULL);
+      break;
+    case SOAP_USER_ERROR:
+      *s = "User error";
+      break;
+    case SOAP_FATAL_ERROR:
+      *s = "Fatal error";
+      break;
+    case SOAP_NO_METHOD:
+      sprintf(soap->msgbuf, "Method '%s' not implemented: method name or namespace not recognized", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_GET_METHOD:
+      *s = "HTTP GET method not implemented";
+      break;
+    case SOAP_EOM:
+      *s = "Out of memory";
+      break;
+    case SOAP_IOB:
+      *s = "Array index out of bounds";
+      break;
+    case SOAP_NULL:
+      *s = soap_set_validation_fault(soap, "nil not allowed", NULL);
+      break;
+    case SOAP_DUPLICATE_ID:
+      *s = soap_set_validation_fault(soap, "multiple definitions of id ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:DuplicateID";
+      break;
+    case SOAP_MISSING_ID:
+      *s = soap_set_validation_fault(soap, "missing id for ref ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:MissingID";
+      break;
+    case SOAP_HREF:
+      *s = soap_set_validation_fault(soap, "incompatible object ref ", soap->id);
+      break;
+    case SOAP_FAULT:
+      break;
+#ifndef WITH_NOIO
+    case SOAP_UDP_ERROR:
+      *s = "Message too large for UDP packet";
+      break;
+    case SOAP_TCP_ERROR:
+      *s = tcp_error(soap);
+      break;
+#endif
+    case SOAP_HTTP_ERROR:
+      *s = "HTTP error";
+      break;
+    case SOAP_SSL_ERROR:
+#ifdef WITH_OPENSSL
+      *s = "SSL error";
+#else
+      *s = "OpenSSL not installed: recompile with -DWITH_OPENSSL";
+#endif
+      break;
+    case SOAP_PLUGIN_ERROR:
+      *s = "Plugin registry error";
+      break;
+    case SOAP_DIME_ERROR:
+      *s = "DIME format error";
+      break;
+    case SOAP_DIME_HREF:
+      *s = "DIME href to missing attachment";
+      break;
+    case SOAP_DIME_MISMATCH:
+      *s = "DIME version/transmission error";
+      break;
+    case SOAP_DIME_END:
+      *s = "End of DIME error";
+      break;
+    case SOAP_MIME_ERROR:
+      *s = "MIME format error";
+      break;
+    case SOAP_MIME_HREF:
+      *s = "MIME href to missing attachment";
+      break;
+    case SOAP_MIME_END:
+      *s = "End of MIME error";
+      break;
+    case SOAP_ZLIB_ERROR:
+#ifdef WITH_ZLIB
+      sprintf(soap->msgbuf, "Zlib/gzip error: '%s'", soap->d_stream.msg?soap->d_stream.msg:"");
+      *s = soap->msgbuf;
+#else
+      *s = "Zlib/gzip not installed for (de)compression: recompile with -DWITH_GZIP";
+#endif
+      break;
+    case SOAP_REQUIRED:
+      *s = soap_set_validation_fault(soap, "missing required attribute", NULL);
+      break;
+    case SOAP_PROHIBITED:
+      *s = soap_set_validation_fault(soap, "prohibited attribute present", NULL);
+      break;
+    case SOAP_OCCURS:
+      *s = soap_set_validation_fault(soap, "min/maxOccurs violation", NULL);
+      break;
+    case SOAP_LENGTH:
+      *s = soap_set_validation_fault(soap, "content length violation", NULL);
+      break;
+    case SOAP_STOP:
+      *s = "Stopped: no response sent";
+      break;
+#endif
+    case SOAP_EOF:
+#ifndef WITH_NOIO
+      sprintf(soap->msgbuf, "End of file or no input: '%s'", soap_strerror(soap));
+      *s = soap->msgbuf;
+      break;
+#else
+      *s = "End of file or no input";
+      break;
+#endif
+    default:
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+      if (soap->error > 200 && soap->error < 600)
+      { sprintf(soap->msgbuf, "HTTP Error: %d %s", soap->error, http_error(soap, soap->error));
+        *s = soap->msgbuf;
+      }
+      else
+#endif
+#endif
+      { sprintf(soap->msgbuf, "Error %d", soap->error);
+        *s = soap->msgbuf;
+      }
+    }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_fault(struct soap *soap)
+{ register int status = soap->error;
+  int r = 1;
+  if (status == SOAP_STOP)
+    return status;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Sending back fault struct for error code %d\n", soap->error));
+  soap->keep_alive = 0; /* to terminate connection */
+  soap_set_fault(soap);
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+  if (soap_valid_socket(soap->socket))
+  { struct timeval timeout;
+    fd_set rfd, sfd;
+    timeout.tv_sec = 0;
+    timeout.tv_usec = 0;
+    FD_ZERO(&rfd);
+    FD_ZERO(&sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, NULL, &timeout);
+    if (r > 0)
+    { if (!FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       || (FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        && recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) < 0))
+        r = 0;
+    }
+  }
+#endif
+#endif
+  if ((status != SOAP_EOF || (!soap->recv_timeout && !soap->send_timeout)) && r > 0)
+  { soap->error = SOAP_OK;
+    soap_serializeheader(soap);
+    soap_serializefault(soap);
+    soap_begin_count(soap);
+    if (soap->mode & SOAP_IO_LENGTH)
+    { soap_envelope_begin_out(soap);
+      soap_putheader(soap);
+      soap_body_begin_out(soap);
+      soap_putfault(soap);
+      soap_body_end_out(soap);
+      soap_envelope_end_out(soap);
+    }
+    soap_end_count(soap);
+    if (soap_response(soap, status)
+     || soap_envelope_begin_out(soap)
+     || soap_putheader(soap)
+     || soap_body_begin_out(soap)
+     || soap_putfault(soap)
+     || soap_body_end_out(soap)
+     || soap_envelope_end_out(soap))
+      return soap_closesock(soap);
+    soap_end_send(soap);
+  }
+  soap->error = status;
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_fault(struct soap *soap)
+{ register int status = soap->error;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Receiving SOAP Fault\n"));
+  soap->error = SOAP_OK;
+  if (soap_getfault(soap))
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Error: soap_get_soapfault() failed. Is this a SOAP message at all?\n"));
+    *soap_faultcode(soap) = (soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client");
+    soap->error = status;
+    soap_set_fault(soap);
+  }
+  else
+  { register const char *s = *soap_faultcode(soap);
+    if (!soap_match_tag(soap, s, "SOAP-ENV:Server") || !soap_match_tag(soap, s, "SOAP-ENV:Receiver"))
+      status = SOAP_SVR_FAULT; 
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:Client") || !soap_match_tag(soap, s, "SOAP-ENV:Sender"))
+      status = SOAP_CLI_FAULT;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:MustUnderstand"))
+      status = SOAP_MUSTUNDERSTAND;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:VersionMismatch"))
+      status = SOAP_VERSIONMISMATCH;
+    else
+    { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Fault code %s\n", s));
+      status = SOAP_FAULT;
+    }
+    if (soap_body_end_in(soap)
+     || soap_envelope_end_in(soap)
+     || soap_end_recv(soap))
+      return soap_closesock(soap);
+    soap->error = status;
+  }
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_empty_response(struct soap *soap)
+{ soap->count = 0;
+  if (soap_response(soap, SOAP_OK) || soap_end_send(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_empty_response(struct soap *soap)
+{ if (soap_begin_recv(soap) || soap_end_recv(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+soap_strerror(struct soap *soap)
+{ register int err = soap->errnum;
+  if (err)
+  {
+#ifndef WIN32
+    return strerror(err);
+#else
+    FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, (LPTSTR)&soap->errorstr, sizeof(soap->errorstr), NULL);
+    return soap->errorstr;
+#endif
+  }
+  return "Operation interrupted or timed out";
+}
+#endif
+#endif 
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_set_error(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail, int soaperror)
+{ *soap_faultcode(soap) = faultcode;
+  if (faultsubcode)
+    *soap_faultsubcode(soap) = faultsubcode;
+  *soap_faultstring(soap) = faultstring;
+  if (faultdetail && *faultdetail)
+  { register const char **s = soap_faultdetail(soap);
+    if (s)
+      *s = faultdetail;
+  }
+  return soap->error = soaperror;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_sender_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_receiver_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_copy_fault(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ char *r = NULL, *s = NULL, *t = NULL;
+  if (faultsubcode)
+    r = soap_strdup(soap, faultsubcode);
+  if (faultstring)
+    s = soap_strdup(soap, faultstring);
+  if (faultdetail)
+    t = soap_strdup(soap, faultdetail);
+  return soap_set_error(soap, faultcode, r, s, t, SOAP_FAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_sender_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_receiver_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault(struct soap *soap, FILE *fd)
+{ if (soap_check_state(soap))
+    fprintf(fd, "Error: soap struct not initialized\n");
+  else if (soap->error)
+  { const char *c, *v = NULL, *s, **d;
+    d = soap_faultcode(soap);
+    if (!*d)
+      soap_set_fault(soap);
+    c = *d;
+    if (soap->version == 2)
+      v = *soap_faultsubcode(soap);
+    s = *soap_faultstring(soap);
+    d = soap_faultdetail(soap);
+    fprintf(fd, "%s%d fault: %s [%s]\n\"%s\"\nDetail: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, c, v ? v : "no subcode", s ? s : "[no reason]", d && *d ? *d : "[no detail]");
+  }
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault_location(struct soap *soap, FILE *fd)
+{ 
+#ifndef WITH_LEAN
+  int i, j, c1, c2;
+  if (soap->error && soap->buflen > 0)
+  { i = (int)soap->bufidx - 1;
+    if (i <= 0)
+      i = 0;
+    c1 = soap->buf[i];
+    soap->buf[i] = '\0';
+    if ((int)soap->buflen >= i + 1024)
+      j = i + 1023;
+    else
+      j = (int)soap->buflen - 1;
+    c2 = soap->buf[j];
+    soap->buf[j] = '\0';
+    fprintf(fd, "%s%c\n** HERE **\n", soap->buf, c1);
+    if (soap->bufidx < soap->buflen)
+      fprintf(fd, "%s\n", soap->buf + soap->bufidx);
+    soap->buf[i] = c1;
+    soap->buf[j] = c2;
+  }
+#endif
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void *arg)
+{ register struct soap_plugin *p;
+  register int r;
+  if (!(p = (struct soap_plugin*)SOAP_MALLOC(soap, sizeof(struct soap_plugin))))
+    return soap->error = SOAP_EOM;
+  p->id = NULL;
+  p->data = NULL;
+  p->fcopy = NULL;
+  p->fdelete = NULL;
+  r = fcreate(soap, p, arg);
+  if (!r && p->fdelete)
+  { p->next = soap->plugins;
+    soap->plugins = p;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Registered '%s' plugin\n", p->id));
+    return SOAP_OK;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not register plugin '%s': plugin returned error %d (or fdelete callback not set)\n", p->id?p->id:"?", r));
+  SOAP_FREE(soap, p);
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static void *
+fplugin(struct soap *soap, const char *id)
+{ register struct soap_plugin *p;
+  for (p = soap->plugins; p; p = p->next)
+    if (p->id == id || !strcmp(p->id, id))
+      return p->data;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void *
+SOAP_FMAC2
+soap_lookup_plugin(struct soap *soap, const char *id)
+{ return soap->fplugin(soap, id);
+}
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap()
+{ soap_init(this);
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	C++ soap struct methods
+ *
+\******************************************************************************/
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode mode)
+{ soap_init1(this, mode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode imode, soap_mode omode)
+{ soap_init2(this, imode, omode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(struct soap& soap)
+{ soap_copy_context(this, &soap);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::~soap()
+{ soap_destroy(this);
+  soap_end(this);
+  soap_done(this);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/gsoap-palm/stdsoap2.cpp b/gsoap-palm/stdsoap2.cpp
new file mode 100644
index 0000000..dbed460
--- /dev/null
+++ b/gsoap-palm/stdsoap2.cpp
@@ -0,0 +1,13448 @@
+/*
+
+stdsoap2.c[pp] 2.7.6e
+
+gSOAP runtime
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+Contributors:
+
+Wind River Systems Inc., for the following additions under gSOAP public license:
+  - vxWorks compatible	(#define VXWORKS)
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+Installation note:
+
+Win32 build needs winsock.dll (Visual C++ "wsock32.lib")
+To do this in Visual C++ 6.0, go to "Project", "settings", select the "Link"
+tab (the project file needs to be selected in the file view) and add
+"wsock32.lib" to the "Object/library modules" entry
+
+On Mac OS X with gcc (GCC) 3.1 20020420 (prerelease) you MUST compile with
+-fstack_check when using -O2 because gcc 3.1 has a bug that smashes the stack
+when locally allocated data exceeds 64K.
+
+*/
+
+#ifdef AS400
+# pragma convert(819)	/* EBCDIC to ASCII */
+#endif
+
+#include "stdsoap2.h"
+
+#ifdef __cplusplus
+SOAP_SOURCE_STAMP("@(#) stdsoap2.cpp ver 2.7.6e 2006-02-18 12:00:00 GMT")
+extern "C" {
+#else
+SOAP_SOURCE_STAMP("@(#) stdsoap2.c ver 2.7.6e 2006-02-18 12:00:00 GMT")
+#endif
+
+/* 8bit character representing unknown/nonrepresentable character data (e.g. not supported by current locale with multibyte support enabled) */
+#ifndef SOAP_UNKNOWN_CHAR
+#define SOAP_UNKNOWN_CHAR (127)
+#endif
+
+/*      EOF=-1 */
+#define SOAP_LT (soap_wchar)(-2) /* XML character '<' */
+#define SOAP_TT (soap_wchar)(-3) /* XML character '</' */
+#define SOAP_GT (soap_wchar)(-4) /* XML character '>' */
+#define SOAP_QT (soap_wchar)(-5) /* XML character '"' */
+#define SOAP_AP (soap_wchar)(-6) /* XML character ''' */
+
+#define soap_blank(c)		((c) >= 0 && (c) <= 32)
+#define soap_notblank(c)	((c) > 32)
+#define soap_hash_ptr(p)	(((unsigned long)(p) >> 3) & (SOAP_PTRHASH - 1))
+
+#ifdef SOAP_DEBUG
+static void soap_init_logs(struct soap*);
+static void soap_close_logfile(struct soap*, int);
+static void soap_set_logfile(struct soap*, int, const char*);
+static void soap_free_mht(struct soap*);
+static void soap_track_unlink(struct soap*, const void*);
+#endif
+
+#ifndef PALM_2
+static int soap_set_error(struct soap*, const char*, const char*, const char*, const char*, int);
+static int soap_copy_fault(struct soap*, const char*, const char*, const char*, const char*);
+static int soap_getattrval(struct soap*, char*, size_t, soap_wchar);
+#endif
+
+#ifndef PALM_1
+static soap_wchar soap_char(struct soap*);
+static soap_wchar soap_get_pi(struct soap*);
+static int soap_isxdigit(int);
+static void *fplugin(struct soap*, const char*);
+#ifndef WITH_NOIDREF
+static void soap_update_ptrs(struct soap*, char*, char*, char*, char*);
+static int soap_has_copies(struct soap*, const char*, const char*);
+static void soap_init_iht(struct soap*);
+static void soap_free_iht(struct soap*);
+static void soap_init_pht(struct soap*);
+static void soap_free_pht(struct soap*);
+#endif
+#endif
+
+#ifndef WITH_LEAN
+static const char *soap_set_validation_fault(struct soap*, const char*, const char*);
+static int soap_isnumeric(struct soap*, const char*);
+static time_t soap_timegm(struct tm*);
+static struct soap_nlist *soap_lookup_ns(struct soap *soap, const char *tag, size_t n);
+static struct soap_nlist *soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized);
+static void soap_pop_ns(struct soap *soap);
+static void soap_utilize_ns(struct soap *soap, const char *tag, size_t n);
+#endif
+
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart *soap_new_multipart(struct soap*, struct soap_multipart**, struct soap_multipart**, char*, size_t);
+static int soap_putdimefield(struct soap*, const char*, size_t);
+static char *soap_getdimefield(struct soap*, size_t);
+static void soap_select_mime_boundary(struct soap*);
+static int soap_valid_mime_boundary(struct soap*);
+static int soap_match_cid(struct soap*, const char*, const char*);
+static void soap_resolve_attachment(struct soap*, struct soap_multipart*);
+#endif
+#endif
+
+#ifdef WITH_GZIP
+static int soap_getgziphdr(struct soap*);
+#endif
+
+#ifdef WITH_OPENSSL
+static int ssl_init_done = 0;
+static int ssl_auth_init(struct soap*);
+static int ssl_verify_callback(int, X509_STORE_CTX*);
+static int ssl_password(char*, int, int, void *);
+static const char *ssl_error(struct soap*, int);
+/* This callback is included for future references. It should not be deleted
+static DH *ssl_tmp_dh(SSL*, int, int);
+*/
+#endif
+
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char *soap_decode(char*, size_t, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar soap_getchunkchar(struct soap*);
+static const char *http_error(struct soap*, int);
+static int http_post(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
+static int http_get(struct soap*);
+static int http_send_header(struct soap*, const char*);
+static int http_post_header(struct soap*, const char*, const char*);
+static int http_response(struct soap*, int, size_t);
+static int http_parse(struct soap*);
+static int http_parse_header(struct soap*, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int fsend(struct soap*, const char*, size_t);
+static size_t frecv(struct soap*, char*, size_t);
+static int tcp_init(struct soap*);
+static const char *tcp_error(struct soap*);
+#ifndef WITH_IPV6
+static int tcp_gethost(struct soap*, const char *addr, struct in_addr *inaddr);
+#endif
+static int tcp_connect(struct soap*, const char *endpoint, const char *host, int port);
+static int tcp_accept(struct soap*, int, struct sockaddr*, int*);
+static int tcp_disconnect(struct soap*);
+static int tcp_closesocket(struct soap*, SOAP_SOCKET);
+static int tcp_shutdownsocket(struct soap*, SOAP_SOCKET, int);
+static const char *soap_strerror(struct soap*);
+#endif
+#endif
+
+#if defined(PALM) && !defined(PALM_2)
+unsigned short errno;
+#endif
+
+#ifndef PALM_1
+static const char soap_env1[42] = "http://schemas.xmlsoap.org/soap/envelope/";
+static const char soap_enc1[42] = "http://schemas.xmlsoap.org/soap/encoding/";
+static const char soap_env2[40] = "http://www.w3.org/2003/05/soap-envelope";
+static const char soap_enc2[40] = "http://www.w3.org/2003/05/soap-encoding";
+static const char soap_rpc[35] = "http://www.w3.org/2003/05/soap-rpc";
+#endif
+
+#ifndef PALM_1
+const struct soap_double_nan soap_double_nan = {0xFFFFFFFF, 0xFFFFFFFF};
+static const char soap_base64o[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+static const char soap_base64i[81] = "\76XXX\77\64\65\66\67\70\71\72\73\74\75XXXXXXX\00\01\02\03\04\05\06\07\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31XXXXXX\32\33\34\35\36\37\40\41\42\43\44\45\46\47\50\51\52\53\54\55\56\57\60\61\62\63";
+#endif
+
+#ifndef WITH_LEAN
+static const char soap_indent[11] = "\n\t\t\t\t\t\t\t\t\t";
+/* Alternative indentation form for SOAP_XML_INDENT:
+static const char soap_indent[21] = "\n                   ";
+*/
+#endif
+
+static const char soap_padding[4] = "\0\0\0";
+#define SOAP_STR_PADDING (soap_padding)
+#define SOAP_STR_EOS (soap_padding)
+#define SOAP_NON_NULL (soap_padding)
+
+#ifndef WITH_LEAN
+static const struct soap_code_map html_entity_codes[] = /* entities for XHTML parsing */
+{ { 160, "nbsp" },
+  { 161, "iexcl" },
+  { 162, "cent" },
+  { 163, "pound" },
+  { 164, "curren" },
+  { 165, "yen" },
+  { 166, "brvbar" },
+  { 167, "sect" },
+  { 168, "uml" },
+  { 169, "copy" },
+  { 170, "ordf" },
+  { 171, "laquo" },
+  { 172, "not" },
+  { 173, "shy" },
+  { 174, "reg" },
+  { 175, "macr" },
+  { 176, "deg" },
+  { 177, "plusmn" },
+  { 178, "sup2" },
+  { 179, "sup3" },
+  { 180, "acute" },
+  { 181, "micro" },
+  { 182, "para" },
+  { 183, "middot" },
+  { 184, "cedil" },
+  { 185, "sup1" },
+  { 186, "ordm" },
+  { 187, "raquo" },
+  { 188, "frac14" },
+  { 189, "frac12" },
+  { 190, "frac34" },
+  { 191, "iquest" },
+  { 192, "Agrave" },
+  { 193, "Aacute" },
+  { 194, "Acirc" },
+  { 195, "Atilde" },
+  { 196, "Auml" },
+  { 197, "Aring" },
+  { 198, "AElig" },
+  { 199, "Ccedil" },
+  { 200, "Egrave" },
+  { 201, "Eacute" },
+  { 202, "Ecirc" },
+  { 203, "Euml" },
+  { 204, "Igrave" },
+  { 205, "Iacute" },
+  { 206, "Icirc" },
+  { 207, "Iuml" },
+  { 208, "ETH" },
+  { 209, "Ntilde" },
+  { 210, "Ograve" },
+  { 211, "Oacute" },
+  { 212, "Ocirc" },
+  { 213, "Otilde" },
+  { 214, "Ouml" },
+  { 215, "times" },
+  { 216, "Oslash" },
+  { 217, "Ugrave" },
+  { 218, "Uacute" },
+  { 219, "Ucirc" },
+  { 220, "Uuml" },
+  { 221, "Yacute" },
+  { 222, "THORN" },
+  { 223, "szlig" },
+  { 224, "agrave" },
+  { 225, "aacute" },
+  { 226, "acirc" },
+  { 227, "atilde" },
+  { 228, "auml" },
+  { 229, "aring" },
+  { 230, "aelig" },
+  { 231, "ccedil" },
+  { 232, "egrave" },
+  { 233, "eacute" },
+  { 234, "ecirc" },
+  { 235, "euml" },
+  { 236, "igrave" },
+  { 237, "iacute" },
+  { 238, "icirc" },
+  { 239, "iuml" },
+  { 240, "eth" },
+  { 241, "ntilde" },
+  { 242, "ograve" },
+  { 243, "oacute" },
+  { 244, "ocirc" },
+  { 245, "otilde" },
+  { 246, "ouml" },
+  { 247, "divide" },
+  { 248, "oslash" },
+  { 249, "ugrave" },
+  { 250, "uacute" },
+  { 251, "ucirc" },
+  { 252, "uuml" },
+  { 253, "yacute" },
+  { 254, "thorn" },
+  { 255, "yuml" },
+  {   0, NULL }
+};
+#endif
+
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+static const struct soap_code_map h_error_codes[] =
+{
+#ifdef HOST_NOT_FOUND   
+  { HOST_NOT_FOUND, "Host not found" },
+#endif
+#ifdef TRY_AGAIN
+  { TRY_AGAIN, "Try Again" },
+#endif
+#ifdef NO_RECOVERY  
+  { NO_RECOVERY, "No Recovery" },
+#endif
+#ifdef NO_DATA
+  { NO_DATA, "No Data" },
+#endif
+#ifdef NO_ADDRESS
+  { NO_ADDRESS, "No Address" },
+#endif
+  { 0, NULL }
+};
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+static const struct soap_code_map h_http_error_codes[] =
+{ { 201, "Created" },
+  { 202, "Accepted" },
+  { 203, "Non-Authoritative Information" },
+  { 204, "No Content" },
+  { 205, "Reset Content" },
+  { 206, "Partial Content" },
+  { 300, "Multiple Choices" },
+  { 301, "Moved Permanently" },
+  { 302, "Found" },
+  { 303, "See Other" },
+  { 304, "Not Modified" },
+  { 305, "Use Proxy" },
+  { 307, "Temporary Redirect" },
+  { 400, "Bad Request" },
+  { 401, "Unauthorized" },
+  { 402, "Payment Required" },
+  { 403, "Forbidden" },
+  { 404, "Not Found" },
+  { 405, "Method Not Allowed" },
+  { 406, "Not Acceptable" },
+  { 407, "Proxy Authentication Required" },
+  { 408, "Request Time-out" },
+  { 409, "Conflict" },
+  { 410, "Gone" },
+  { 411, "Length Required" },
+  { 412, "Precondition Failed" },
+  { 413, "Request Entity Too Large" },
+  { 414, "Request-URI Too Large" },
+  { 415, "Unsupported Media Type" },
+  { 416, "Requested range not satisfiable" },
+  { 417, "Expectation Failed" },
+  { 500, "Internal Server Error" },
+  { 501, "Not Implemented" },
+  { 502, "Bad Gateway" },
+  { 503, "Service Unavailable" },
+  { 504, "Gateway Time-out" },
+  { 505, "HTTP Version not supported" },
+  {   0, NULL }
+};
+#endif
+#endif
+
+#ifdef WITH_OPENSSL
+static const struct soap_code_map h_ssl_error_codes[] =
+{
+#define _SSL_ERROR(e) { e, #e }
+  _SSL_ERROR(SSL_ERROR_SSL),
+  _SSL_ERROR(SSL_ERROR_ZERO_RETURN),
+  _SSL_ERROR(SSL_ERROR_WANT_READ),
+  _SSL_ERROR(SSL_ERROR_WANT_WRITE),
+  _SSL_ERROR(SSL_ERROR_WANT_CONNECT),
+  _SSL_ERROR(SSL_ERROR_WANT_X509_LOOKUP),
+  _SSL_ERROR(SSL_ERROR_SYSCALL),
+  { 0, NULL }
+};
+#endif
+
+#ifndef WITH_LEANER
+static const struct soap_code_map mime_codes[] =
+{ { SOAP_MIME_7BIT,		"7bit" },
+  { SOAP_MIME_8BIT,		"8bit" },
+  { SOAP_MIME_BINARY,		"binary" },
+  { SOAP_MIME_QUOTED_PRINTABLE, "quoted-printable" },
+  { SOAP_MIME_BASE64,		"base64" },
+  { SOAP_MIME_IETF_TOKEN,	"ietf-token" },
+  { SOAP_MIME_X_TOKEN,		"x-token" },
+  { 0,				NULL }
+};
+#endif
+
+#ifdef WIN32
+static int tcp_done = 0;
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+fsend(struct soap *soap, const char *s, size_t n)
+{ register int nwritten;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  if (soap->os)
+  { soap->os->write(s, n);
+    if (soap->os->good())
+      return SOAP_OK;
+    return SOAP_EOF;
+  }
+#endif
+  while (n)
+  { if (soap_valid_socket(soap->socket))
+    { 
+#ifndef WITH_LEAN
+      if (soap->send_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->send_timeout > 0)
+        { timeout.tv_sec = soap->send_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->send_timeout/1000000;
+          timeout.tv_usec = -soap->send_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { register int r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            return SOAP_EOF;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+          { soap->errnum = soap_socket_errno;
+            return SOAP_EOF;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+        nwritten = SSL_write(soap->ssl, s, n);
+      else if (soap->bio)
+        nwritten = BIO_write(soap->bio, s, n);
+      else
+#endif
+#ifdef WITH_UDP
+      if ((soap->omode & SOAP_IO_UDP))
+      { if (soap->peerlen)
+	  nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+        else
+	  nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	/* retry and back-off algorithm */
+	/* TODO: this is not very clear from specs so verify and limit conditions under which we should loop (e.g. ENOBUFS) */
+	if (nwritten < 0)
+        { struct timeval timeout;
+          fd_set fd;
+	  int udp_repeat;
+	  int udp_delay;
+          if ((soap->connect_flags & SO_BROADCAST))
+	    udp_repeat = 3; /* SOAP-over-UDP MULTICAST_UDP_REPEAT - 1 */
+          else
+	    udp_repeat = 1; /* SOAP-over-UDP UNICAST_UDP_REPEAT - 1 */
+	  udp_delay = (soap_random % 201) + 50; /* UDP_MIN_DELAY .. UDP_MAX_DELAY */
+	  do
+          { timeout.tv_sec = 0;
+            timeout.tv_usec = 1000 * udp_delay; /* ms */
+            FD_ZERO(&fd);
+            FD_SET((SOAP_SOCKET)soap->socket, &fd);
+            select((SOAP_SOCKET)(soap->socket + 1), NULL, NULL, &fd, &timeout);
+	    if (soap->peerlen)
+	      nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+            else
+	      nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	    udp_delay <<= 1;
+	    if (udp_delay > 500) /* UDP_UPPER_DELAY */
+	      udp_delay = 500;
+	  }
+	  while (nwritten < 0 && --udp_repeat > 0);
+	}
+      }
+      else
+#endif
+#if !defined(PALM) && !defined(AS400)
+        nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+#else
+        nwritten = send((SOAP_SOCKET)soap->socket, (void*)s, n, soap->socket_flags);
+#endif
+      if (nwritten <= 0)
+      {
+#ifdef WITH_OPENSSL
+	int err;
+        if (soap->ssl && (err = SSL_get_error(soap->ssl, nwritten)) != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return SOAP_EOF;
+#endif
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EWOULDBLOCK && soap_socket_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_socket_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    else
+    {
+#ifdef WITH_FASTCGI
+      nwritten = fwrite((void*)s, 1, n, stdout);
+      fflush(stdout);
+#else
+#ifdef UNDER_CE
+      nwritten = fwrite(s, 1, n, soap->sendfd);
+#else
+#ifdef VXWORKS
+#ifdef WMW_RPM_IO
+      if (soap->rpmreqid)
+        nwritten = (httpBlockPut(soap->rpmreqid, s, n) == 0) ? n : -1; 
+      else
+#endif
+        nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w"));
+#else
+      nwritten = write((SOAP_SOCKET)soap->sendfd, s, n);
+#endif
+#endif
+#endif
+      if (nwritten <= 0)
+      { if (soap_errno != SOAP_EINTR && soap_errno != SOAP_EWOULDBLOCK && soap_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    n -= nwritten;
+    s += nwritten;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_raw(struct soap *soap, const char *s, size_t n)
+{ if (!n)
+    return SOAP_OK;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { soap->count += n;
+#ifndef WITH_LEANER
+    if (soap->fpreparesend && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+  if (soap->mode & SOAP_IO)
+  { register size_t i = SOAP_BUFLEN - soap->bufidx;
+    while (n >= i)
+    { memcpy(soap->buf + soap->bufidx, s, i);
+      soap->bufidx = SOAP_BUFLEN;
+      if (soap_flush(soap))
+        return soap->error;
+      s += i;
+      n -= i;
+      i = SOAP_BUFLEN;
+    }
+    memcpy(soap->buf + soap->bufidx, s, n);
+    soap->bufidx += n;
+    return SOAP_OK;
+  }
+  return soap_flush_raw(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush(struct soap *soap)
+{ register int n = soap->bufidx;
+  if (n)
+  { soap->bufidx = 0;
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { soap->d_stream.next_in = (Byte*)soap->buf;
+      soap->d_stream.avail_in = (unsigned int)n;
+#ifdef WITH_GZIP
+      soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)n);
+#endif
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating %u bytes\n", soap->d_stream.avail_in));
+        if (deflate(&soap->d_stream, Z_NO_FLUSH) != Z_OK)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+          return soap->error = SOAP_ZLIB_ERROR;
+        }
+        if (!soap->d_stream.avail_out)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN))
+            return soap->error;
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (soap->d_stream.avail_in);
+    }
+    else
+#endif
+      return soap_flush_raw(soap, soap->buf, n);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush_raw(struct soap *soap, const char *s, size_t n)
+{ if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+  { register char *t;
+    if (!(t = (char*)soap_push_block(soap, n)))
+      return soap->error = SOAP_EOM;
+    memcpy(t, s, n);
+#ifndef WITH_LEANER
+    if (soap->fpreparesend)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+  { char t[16];
+    sprintf(t, "\r\n%lX\r\n" + (soap->chunksize ? 0 : 2), (unsigned long)n);
+    DBGMSG(SENT, t, strlen(t));
+    if ((soap->error = soap->fsend(soap, t, strlen(t))))
+      return soap->error;
+    soap->chunksize += n;
+  }
+  DBGMSG(SENT, s, n);
+#endif
+  return soap->error = soap->fsend(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send(struct soap *soap, const char *s)
+{ if (s)
+    return soap_send_raw(soap, s, strlen(s));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send2(struct soap *soap, const char *s1, const char *s2)
+{ if (soap_send(soap, s1))
+    return soap->error;
+  return soap_send(soap, s2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send3(struct soap *soap, const char *s1, const char *s2, const char *s3)
+{ if (soap_send(soap, s1)
+   || soap_send(soap, s2))
+    return soap->error;
+  return soap_send(soap, s3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static size_t
+frecv(struct soap *soap, char *s, size_t n)
+{ register int r;
+  soap->errnum = 0;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  if (soap->is)
+  { if (soap->is->good())
+      return soap->is->read(s, n).gcount();
+    return 0;
+  }
+#endif
+  if (soap_valid_socket(soap->socket))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->recv_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->recv_timeout > 0)
+        { timeout.tv_sec = soap->recv_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->recv_timeout/1000000;
+          timeout.tv_usec = -soap->recv_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+	  { soap->errnum = 0;
+            return 0;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+	  { soap->errnum = soap_socket_errno;
+            return 0;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+      { int err;
+	r = SSL_read(soap->ssl, s, n);
+        if (r > 0)
+          return (size_t)r;
+	err = SSL_get_error(soap->ssl, r);
+	if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return 0;
+      }
+      else if (soap->bio)
+      { r = BIO_read(soap->bio, s, n);
+        if (r > 0)
+          return (size_t)r;
+        return 0;
+      }
+      else
+#endif
+      { 
+#ifdef WITH_UDP
+        if ((soap->omode & SOAP_IO_UDP))
+        { SOAP_SOCKLEN_T k = (SOAP_SOCKLEN_T)sizeof(soap->peer);
+	  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+          r = recvfrom((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, &k);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+	  soap->peerlen = (size_t)k;
+#ifndef WITH_IPV6
+          soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+          soap->port = (int)ntohs(soap->peer.sin_port);
+#endif
+        }
+	else
+#endif
+          r = recv((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+        if (r >= 0)
+          return (size_t)r;
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN && soap_socket_errno != SOAP_EWOULDBLOCK)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#ifndef WITH_LEAN
+      { struct timeval timeout;
+        fd_set fd;
+        timeout.tv_sec = 0;
+        timeout.tv_usec = 10000;
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+#ifdef WITH_OPENSSL
+        if (soap->ssl && SSL_get_error(soap->ssl, r) == SSL_ERROR_WANT_WRITE)
+          r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+        else
+          r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#else
+        r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#endif
+        if (r < 0 && soap_socket_errno != SOAP_EINTR)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#endif
+    }
+  }
+#ifdef WITH_FASTCGI
+  return fread(s, 1, n, stdin);
+#else
+#ifdef UNDER_CE
+  return fread(s, 1, n, soap->recvfd);
+#else
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    r = httpBlockRead(soap->rpmreqid, s, n);
+  else
+#endif
+  r = read((SOAP_SOCKET)soap->recvfd, s, n);
+  if (r >= 0)
+    return (size_t)r;
+  soap->errnum = soap_errno;
+  return 0;
+#endif
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar
+soap_getchunkchar(struct soap *soap)
+{ if (soap->bufidx < soap->buflen)
+    return soap->buf[soap->bufidx++];
+  soap->bufidx = 0;
+  soap->buflen = soap->chunkbuflen = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)soap->buflen, soap->socket));
+  DBGMSG(RECV, soap->buf, soap->buflen);
+  if (soap->buflen)
+    return soap->buf[soap->bufidx++];
+  return EOF;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+soap_isxdigit(int c)
+{ return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f');
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_raw(struct soap *soap)
+{ register size_t ret;
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { if (soap->d_stream.next_out == Z_NULL)
+      return EOF;
+    if (soap->d_stream.avail_in || !soap->d_stream.avail_out)
+    { register int r;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflating\n"));
+      soap->d_stream.next_out = (Byte*)soap->buf;
+      soap->d_stream.avail_out = SOAP_BUFLEN;
+      r = inflate(&soap->d_stream, Z_NO_FLUSH);
+      if (r == Z_OK || r == Z_STREAM_END)
+      { soap->bufidx = 0;
+        soap->buflen = SOAP_BUFLEN - soap->d_stream.avail_out;
+        if (soap->zlib_in == SOAP_ZLIB_GZIP)
+          soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+        if (r == Z_STREAM_END)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+          soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+          soap->d_stream.next_out = Z_NULL;
+        }
+        if (soap->buflen)
+        { soap->count += soap->buflen;
+          return SOAP_OK;
+        }
+      }
+      else if (r != Z_BUF_ERROR)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate error: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        soap->d_stream.next_out = Z_NULL;
+	soap->error = SOAP_ZLIB_ERROR;
+        return EOF;
+      }
+    }
+zlib_again:
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK && !soap->chunksize)
+    { memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+      soap->buflen = soap->z_buflen;
+    }
+  }
+#endif
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) /* read HTTP chunked transfer */
+  { 
+chunk_again:
+    if (soap->chunksize)
+    { soap->buflen = ret = soap->frecv(soap, soap->buf, soap->chunksize > SOAP_BUFLEN ? SOAP_BUFLEN : soap->chunksize);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk: read %u bytes\n", (unsigned int)ret));
+      DBGMSG(RECV, soap->buf, ret);
+      soap->bufidx = 0;
+      soap->chunksize -= ret;
+    }
+    else
+    { register soap_wchar c;
+      char *t, tmp[8];
+      t = tmp;
+      if (!soap->chunkbuflen)
+      { soap->chunkbuflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes (chunked) from socket %d\n", (unsigned int)ret, soap->socket));
+        DBGMSG(RECV, soap->buf, ret);
+        soap->bufidx = 0;
+        if (!ret)
+          return soap->ahead = EOF;
+      }
+      else
+        soap->bufidx = soap->buflen;
+      soap->buflen = soap->chunkbuflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk size (idx=%u len=%u)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen));
+      while (!soap_isxdigit((int)(c = soap_getchunkchar(soap))))
+        if ((int)c == EOF)
+	  return soap->ahead = EOF;
+      do
+        *t++ = (char)c;
+      while (soap_isxdigit((int)(c = soap_getchunkchar(soap))) && t - tmp < 7);
+      while ((int)c != EOF && c != '\n')
+        c = soap_getchunkchar(soap);
+      if ((int)c == EOF)
+        return soap->ahead = EOF;
+      *t = '\0';
+      soap->chunksize = soap_strtoul(tmp, &t, 16);
+      if (!soap->chunksize)
+      { soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of chunked message\n"));
+	while ((int)c != EOF && c != '\n')
+          c = soap_getchunkchar(soap);
+        return soap->ahead = EOF;
+      }
+      soap->buflen = soap->bufidx + soap->chunksize;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving buf len to idx=%u len=%u (%s)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen, tmp));
+      if (soap->buflen > soap->chunkbuflen)
+      { soap->buflen = soap->chunkbuflen;
+        soap->chunksize -= soap->buflen - soap->bufidx;
+        soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Passed end of buffer for chunked HTTP (%u bytes left)\n", (unsigned int)(soap->buflen - soap->bufidx)));
+      }
+      else if (soap->chunkbuflen)
+        soap->chunksize = 0;
+      ret = soap->buflen - soap->bufidx;
+      if (!ret)
+        goto chunk_again;
+    }
+  }
+  else
+#endif
+  { soap->bufidx = 0;
+    soap->buflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)ret, soap->socket));
+    DBGMSG(RECV, soap->buf, ret);
+  }
+#ifndef WITH_LEANER
+  if (soap->fpreparerecv && (soap->error = soap->fpreparerecv(soap, soap->buf, ret)))
+    return soap->error;
+#endif
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { register int r;
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = (unsigned int)ret;
+    soap->d_stream.next_out = (Byte*)soap->buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    r = inflate(&soap->d_stream, Z_NO_FLUSH);
+    if (r == Z_OK || r == Z_STREAM_END)
+    { soap->bufidx = 0;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = ret = SOAP_BUFLEN - soap->d_stream.avail_out;
+      if (soap->zlib_in == SOAP_ZLIB_GZIP)
+        soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %u bytes\n", (unsigned int)ret));
+      if (!ret)
+        goto zlib_again;
+      if (r == Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+        soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+        soap->d_stream.next_out = Z_NULL;
+      }
+    }
+    else
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to inflate: (%d) %s\n", r, soap->d_stream.msg?soap->d_stream.msg:""));
+      soap->d_stream.next_out = Z_NULL;
+      soap->error = SOAP_ZLIB_ERROR;
+      return EOF;
+    }
+  }
+#endif
+  soap->count += ret;
+  return !ret;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap->dime.buflen)
+    { char *s;
+      int i;
+      unsigned char tmp[12];
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME hdr for chunked DIME is in buffer\n"));
+      soap->count += soap->dime.buflen - soap->buflen;
+      soap->buflen = soap->dime.buflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Skip padding (%ld bytes)\n", -(long)soap->dime.size&3));
+      for (i = -(long)soap->dime.size&3; i > 0; i--)
+      { soap->bufidx++;
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME hdr for next chunk\n"));
+      s = (char*)tmp;
+      for (i = 12; i > 0; i--)
+      { *s++ = soap->buf[soap->bufidx++];
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      soap->dime.flags = tmp[0] & 0x7;
+      soap->dime.size = ((size_t)tmp[8] << 24) | ((size_t)tmp[9] << 16) | ((size_t)tmp[10] << 8) | ((size_t)tmp[11]);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME chunk (%u bytes)\n", (unsigned int)soap->dime.size));
+      if (soap->dime.flags & SOAP_DIME_CF)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "More chunking\n"));
+        soap->dime.chunksize = soap->dime.size;
+        if (soap->buflen - soap->bufidx >= soap->dime.size)
+        { soap->dime.buflen = soap->buflen;
+          soap->buflen = soap->bufidx + soap->dime.chunksize;
+        }
+        else
+          soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      }
+      else
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Last chunk\n"));
+        soap->dime.buflen = 0;
+        soap->dime.chunksize = 0;
+      }
+      soap->count = soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%u bytes remaining\n", (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+    if (soap->dime.chunksize)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get next DIME hdr for chunked DIME (%u bytes chunk)\n", (unsigned int)soap->dime.chunksize));
+      if (soap_recv_raw(soap))
+        return EOF;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->count -= soap->buflen - soap->bufidx - soap->dime.chunksize;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%lu bytes remaining, count=%u\n", (unsigned long)(soap->buflen-soap->bufidx), (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+  }
+#endif
+  return soap_recv_raw(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getchar(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+    return c;
+  }
+  return soap_get1(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const struct soap_code_map*
+SOAP_FMAC2
+soap_code(const struct soap_code_map *map, const char *str)
+{ if (str)
+  { while (map->string)
+    { if (!strcmp(str, map->string)) /* case sensitive */
+        return map;
+      map++;
+    }
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_int_code(const struct soap_code_map *map, const char *str, long other)
+{ while (map->string)
+  { if (!soap_tag_cmp(str, map->string)) /* case insensitive */
+      return map->code;
+    map++;
+  }
+  return other;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_str_code(const struct soap_code_map *map, long code)
+{ while (map->code != code && map->string)
+    map++;
+  return map->string;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_char(struct soap *soap)
+{ char tmp[8];
+  register int i;
+  register soap_wchar c;
+  register char *s = tmp;
+  for (i = 0; i < 7; i++)
+  { c = soap_get1(soap);
+    if (c == ';' || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+  }
+  *s = '\0';
+  if (*tmp == '#')
+  { if (tmp[1] == 'x' || tmp[1] == 'X')
+      return soap_strtol(tmp + 2, NULL, 16);
+    return atol(tmp + 1);
+  }
+  if (!strcmp(tmp, "lt"))
+    return '<';
+  if (!strcmp(tmp, "gt"))
+    return '>';
+  if (!strcmp(tmp, "amp"))
+    return '&';
+  if (!strcmp(tmp, "quot"))
+    return '"';
+  if (!strcmp(tmp, "apos"))
+    return '\'';
+#ifndef WITH_LEAN
+  return (soap_wchar)soap_int_code(html_entity_codes, tmp, SOAP_UNKNOWN_CHAR);
+#else
+  return SOAP_UNKNOWN_CHAR; /* use this to represent unknown code */
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get0(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx];
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get1(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx++];
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_get(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+  }
+  else
+    c = soap_get1(soap);
+  for (;;)
+  { if (soap->cdata)
+    { if (c == ']')
+      { c = soap_get1(soap);
+        if (c == ']')
+        { soap->cdata = 0;
+          soap_get1(soap); /* skip > */
+          c = soap_get1(soap);
+        }
+	else
+        { soap_revget1(soap);
+          return ']';
+        }
+      }
+      else
+        return c;
+    }
+    switch (c)
+    { case '<':
+        do c = soap_get1(soap);
+        while (soap_blank(c));
+        if (c == '!' || c == '?' || c == '%')
+        { register int k = 1;
+	  if (c == '!')
+          { c = soap_get1(soap);
+            if (c == '[')
+            { do c = soap_get1(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                break;
+              soap->cdata = 1;
+              c = soap_get1(soap);
+	      continue;
+            }
+            if (c == '-' && (c = soap_get1(soap)) == '-')
+            { do
+              { c = soap_get1(soap);
+                if (c == '-' && (c = soap_get1(soap)) == '-')
+                  break;
+              } while ((int)c != EOF);
+            }
+          }
+	  else if (c == '?')
+            c = soap_get_pi(soap);
+          while ((int)c != EOF)
+          { if (c == '<')
+	      k++;
+	    else if (c == '>')
+	    { if (--k <= 0)
+	        break;
+	    }
+	    c = soap_get1(soap);
+	  }
+	  if ((int)c == EOF)
+	    break;
+          c = soap_get1(soap);
+          continue;
+        }
+        if (c == '/')
+          return SOAP_TT;
+        soap_revget1(soap);
+        return SOAP_LT;
+      case '>':
+        return SOAP_GT;
+      case '"':
+        return SOAP_QT;
+      case '\'':
+        return SOAP_AP;
+      case '&':
+        return soap_char(soap) | 0x80000000;
+    }
+    break;
+  }
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_get_pi(struct soap *soap)
+{ char buf[64];
+  register char *s = buf;
+  register int i = sizeof(buf);
+  register soap_wchar c = soap_getchar(soap);
+  /* This is a quick way to parse XML PI and we could use a callback instead to
+   * enable applications to intercept processing instructions */
+  while ((int)c != EOF && c != '?')
+  { if (--i > 0)
+    { if (soap_blank(c))
+        c = ' ';
+      *s++ = (char)c;
+    }
+    c = soap_getchar(soap);
+  }
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML PI <?%s?>\n", buf));
+  if (!strncmp(buf, "xml ", 4))
+  { s = strstr(buf, " encoding=");
+    if (s && s[10])
+    { if (!soap_tag_cmp(s + 11, "iso-8859-1*")
+       || !soap_tag_cmp(s + 11, "latin1*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to latin1 encoding\n"));
+        soap->mode |= SOAP_ENC_LATIN;
+      }
+      else if (!soap_tag_cmp(s + 11, "utf-8*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to utf-8 encoding\n"));
+        soap->mode &= ~SOAP_ENC_LATIN;
+      }
+    }
+  }
+  if ((int)c != EOF)
+    c = soap_getchar(soap);
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_move(struct soap *soap, long n)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving %ld bytes forward\n", (long)n));
+  for (; n > 0; n--)
+    if ((int)soap_getchar(soap) == EOF)
+      return SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_tell(struct soap *soap)
+{ return soap->count - soap->buflen + soap->bufidx - (soap->ahead != 0);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pututf8(struct soap *soap, register unsigned long c)
+{ char tmp[16];
+  if (c > 0 && c < 0x80)
+  { *tmp = (char)c;
+    return soap_send_raw(soap, tmp, 1);
+  }
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { register char *t = tmp;
+    if (c < 0x0800)
+      *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+    else
+    { if (c < 0x010000)
+        *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+      else
+      { if (c < 0x200000)
+          *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+        else
+        { if (c < 0x04000000)
+            *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+          else
+          { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+            *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+        }     
+        *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+      }
+      *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+    }
+    *t++ = (char)(0x80 | (c & 0x3F));
+    *t = '\0';
+  }
+  else
+#endif
+    sprintf(tmp, "&#%lu;", c);
+  return soap_send(soap, tmp);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getutf8(struct soap *soap)
+{ register soap_wchar c, c1, c2, c3, c4;
+  c = soap->ahead;
+  if (c > 0xFF)
+  { soap->ahead = 0;
+    return c;
+  }
+again:
+  c = soap_get(soap);
+  if (c < 0x80 || (soap->mode & SOAP_ENC_LATIN))
+    return c;
+  c1 = soap_get1(soap);
+  if (c1 < 0x80)
+  { soap_revget1(soap); /* doesn't look like this is UTF8 */
+    return c;
+  }
+  c1 &= 0x3F;
+  if (c < 0xE0)
+    return ((soap_wchar)(c & 0x1F) << 6) | c1;
+  c2 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c == 0xEF && c1 == 0x3B && c2 == 0x3F)	/* ignore UTF-8 BOM */
+    goto again;
+  if (c < 0xF0)
+    return ((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2;
+  c3 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xF8)
+    return ((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3;
+  c4 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xFC)
+    return ((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4;
+  return ((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(soap_get1(soap) & 0x3F);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthex(struct soap *soap, const unsigned char *s, int n)
+{ char d[2];
+  register int i;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2hex(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (i = 0; i < n; i++)
+  { register int m = *s++;
+    d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0'));
+    m &= 0x0F;
+    d[1] = (char)(m + (m > 9 ? '7' : '0'));
+    if (soap_send_raw(soap, d, 2))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_gethex(struct soap *soap, int *n)
+{
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_hex2s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register char *s;
+    register int i, k;
+    if (soap_append_lab(soap, NULL, 0))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = soap->lablen;
+    for (i = 0; i < k; i++)
+    { register char d1, d2;
+      register soap_wchar c;
+      c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = (int)(soap->lablen - k + i);
+        p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	if (p)
+	  memcpy(p, soap->labbuf, soap->lablen - k + i);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, SOAP_BLKLEN);
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register char d1, d2;
+      register soap_wchar c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap_end_block(soap);
+	  soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = soap_size_block(soap, i);
+        p = (unsigned char*)soap_save_block(soap, NULL, 0);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putbase64(struct soap *soap, const unsigned char *s, int n)
+{ register int i;
+  register unsigned long m;
+  char d[4];
+  if (!s)
+    return SOAP_OK;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2base64(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      d[i] = '=';
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_getbase64(struct soap *soap, int *n, int malloc_flag)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_base642s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register int i, k;
+    register char *s;
+    if (soap_append_lab(soap, NULL, 2))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = 3 * (soap->lablen / 3);
+    if (!s)
+      return NULL;
+    for (i = 0; i < k - 2; i += 3)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+            *n = (int)(soap->lablen - k + i);
+          p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	  if (p)
+	    memcpy(p, soap->labbuf, soap->lablen - k + i);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, 3 * SOAP_BLKLEN); /* must be multiple of 3 */
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          i *= 3;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n = (int)soap_size_block(soap, i);
+          p = (unsigned char*)soap_save_block(soap, NULL, 0);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_xop_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ /* Check MTOM xop:Include element (within hex/base64Binary) */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  int body = soap->body; /* should save type too? */
+  if (!soap_peek_element(soap))
+  { if (!soap_element_begin_in(soap, "xop:Include", 0) && *soap->href)
+    { if (soap_dime_forward(soap, ptr, size, id, type, options))
+        return soap->error;
+    }
+    if (soap->body && soap_element_end_in(soap, NULL))
+      return soap->error;
+  }
+  soap->body = body;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_dime_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ struct soap_xlist *xp = (struct soap_xlist*)SOAP_MALLOC(soap, sizeof(struct soap_xlist));
+  *ptr = NULL;
+  *size = 0;
+  *id = soap_strdup(soap, soap->href);
+  *type = NULL;
+  *options = NULL;
+  if (!xp)
+    return soap->error = SOAP_EOM;
+  xp->next = soap->xlist;
+  xp->ptr = ptr;
+  xp->size = size;
+  xp->id = *id;
+  xp->type = type;
+  xp->options = options;
+  soap->xlist = xp;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_strdup(struct soap *soap, const char *s)
+{ char *t = NULL;
+  if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1)))
+    strcpy(t, s);
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_new_block(struct soap *soap)
+{ struct soap_blist *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New block sequence (prev=%p)\n", soap->blist));
+  if (!(p = (struct soap_blist*)SOAP_MALLOC(soap, sizeof(struct soap_blist))))
+    return SOAP_EOM;   
+  p->next = soap->blist; 
+  p->ptr = NULL;
+  p->size = 0;
+  soap->blist = p;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_push_block(struct soap *soap, size_t n)
+{ char *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block of %u bytes (%u bytes total)\n", (unsigned int)n, (unsigned int)soap->blist->size + (unsigned int)n));
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(char*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  *(char**)p = soap->blist->ptr;
+  *(size_t*)(p + sizeof(char*)) = n;
+  soap->blist->ptr = p;
+  soap->blist->size += n;
+  return p + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_block(struct soap *soap)
+{ char *p;
+  if (!soap->blist->ptr)
+    return;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block\n"));
+  p = soap->blist->ptr;
+  soap->blist->size -= *(size_t*)(p + sizeof(char*));
+  soap->blist->ptr = *(char**)p;
+  SOAP_FREE(soap, p);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_update_ptrs(struct soap *soap, char *start, char *end, char *p1, char *p2)
+{ int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+#ifndef WITH_LEANER
+  register struct soap_xlist *xp;
+#endif
+  register void *p, **q;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr && (char*)ip->ptr >= start && (char*)ip->ptr < end)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", ip->id, ip->ptr, (char*)ip->ptr + (p1-p2)));
+        ip->ptr = (char*)ip->ptr + (p1-p2);
+      }
+      for (q = &ip->link; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Link update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (q = &ip->copy; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy chain update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (fp = ip->flist; fp; fp = fp->next)
+      { if ((char*)fp->ptr >= start && (char*)fp->ptr < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy list update id='%s' %p\n", ip->id, fp));
+          fp->ptr = (char*)fp->ptr + (p1-p2);
+        }
+      }
+    }
+  }
+#ifndef WITH_LEANER
+  for (xp = soap->xlist; xp; xp = xp->next)
+  { if (xp->ptr && (char*)xp->ptr >= start && (char*)xp->ptr < end)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", xp->id?xp->id:"", xp->ptr, (char*)xp->ptr + (p1-p2)));
+      xp->ptr = (unsigned char**)((char*)xp->ptr + (p1-p2));
+      xp->size = (int*)((char*)xp->size + (p1-p2));
+      xp->type = (char**)((char*)xp->type + (p1-p2));
+      xp->options = (char**)((char*)xp->options + (p1-p2));
+    }
+  }
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static int
+soap_has_copies(struct soap *soap, register const char *start, register const char *end)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  register const char *p;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { for (p = (const char*)ip->copy; p; p = *(const char**)p)
+        if (p >= start && p < end)
+          return SOAP_ERR;
+      for (fp = ip->flist; fp; fp = fp->next)
+        if ((const char*)fp->ptr >= start && (const char*)fp->ptr < end)
+	  return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_resolve(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  short flag;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr)
+      { register void *p, **q, *r;
+        q = (void**)ip->link;
+        ip->link = NULL;
+        r = ip->ptr;
+        DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing link chain to resolve id='%s'\n", ip->id));
+        while (q)
+        { p = *q;
+          *q = r;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "... link %p -> %p\n", q, r));
+          q = (void**)p;
+        }
+      }
+      else if (*ip->id == '#')
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Missing data for id='%s'\n", ip->id));
+        strcpy(soap->id, ip->id + 1);
+        return soap->error = SOAP_MISSING_ID;
+      }
+    }
+  }
+  do
+  { flag = 0;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution phase\n"));
+    for (i = 0; i < SOAP_IDHASH; i++)
+    { for (ip = soap->iht[i]; ip; ip = ip->next)
+      { if (ip->ptr && !soap_has_copies(soap, (const char*)ip->ptr, (const char*)ip->ptr + ip->size))
+        { if (ip->copy)
+          { register void *p, **q = (void**)ip->copy;
+            DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing copy chain to resolve id='%s'\n", ip->id));
+            ip->copy = NULL;
+            do
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... copy %p -> %p (%u bytes)\n", ip->ptr, q, (unsigned int)ip->size));
+	      p = *q;
+              memcpy(q, ip->ptr, ip->size);
+              q = (void**)p;
+            } while (q);
+	    flag = 1;
+	  }
+          for (fp = ip->flist; fp; fp = ip->flist)
+          { register unsigned int k = fp->level;
+	    register void *p = ip->ptr;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data type=%d location=%p level=%u,%u id='%s'\n", ip->type, p, ip->level, fp->level, ip->id));
+	    while (ip->level < k)
+            { register void **q = (void**)soap_malloc(soap, sizeof(void*));  
+	      if (!q)
+	        return soap->error;
+	      *q = p;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level, new location=%p holds=%p...\n", q, *q));
+              p = (void*)q;
+              k--;
+            }
+	    if (fp->fcopy)
+	      fp->fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    else
+	      soap_fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    ip->flist = fp->next;
+	    SOAP_FREE(soap, fp);
+	    flag = 1;
+	  }
+        }
+      }
+    }
+  } while (flag);
+#ifdef SOAP_DEBUG
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->copy || ip->flist)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution error: forwarded data for id='%s' could not be propagated, please report this problem to the developers\n", ip->id));
+      }
+    }
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution done\n"));
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_size_block(struct soap *soap, size_t n)
+{ if (soap->blist->ptr)
+  { soap->blist->size -= *(size_t*)(soap->blist->ptr + sizeof(char*)) - n;
+    *(size_t*)(soap->blist->ptr + sizeof(char*)) = n;
+  }
+  return soap->blist->size;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_first_block(struct soap *soap)
+{ char *p, *q, *r;
+  p = soap->blist->ptr;
+  if (!p)
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "First block\n"));
+  r = NULL;
+  do
+  { q = *(char**)p;
+    *(char**)p = r;
+    r = p;
+    p = q;
+  } while (p);
+  soap->blist->ptr = r;
+  return r + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_next_block(struct soap *soap)
+{ char *p;
+  p = soap->blist->ptr;
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n"));
+    soap->blist->ptr = *(char**)p;
+    SOAP_FREE(soap, p);
+    if (soap->blist->ptr)
+      return soap->blist->ptr + sizeof(char*) + sizeof(size_t);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_block_size(struct soap *soap)
+{ return *(size_t*)(soap->blist->ptr + sizeof(char*));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end_block(struct soap *soap)
+{ struct soap_blist *bp;
+  char *p, *q;
+  bp = soap->blist;
+  if (bp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of block sequence, free all remaining blocks\n"));
+    for (p = bp->ptr; p; p = q)
+    { q = *(char**)p;
+      SOAP_FREE(soap, p);
+    }
+    soap->blist = bp->next;
+    SOAP_FREE(soap, bp);
+  }
+  DBGLOG(TEST, if (soap->blist) SOAP_MESSAGE(fdebug, "Restore previous block sequence\n"));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_save_block(struct soap *soap, char *p, int flag)
+{ register size_t n;
+  register char *q, *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Save all blocks in contiguous memory space of %u bytes (%p->%p)\n", (unsigned int)soap->blist->size, soap->blist->ptr, p));
+  if (soap->blist->size)
+  { if (!p)
+      p = (char*)soap_malloc(soap, soap->blist->size);
+    if (p)
+    { for (s = p, q = soap_first_block(soap); q; q = soap_next_block(soap))
+      { n = soap_block_size(soap);
+#ifndef WITH_NOIDREF
+        if (flag)
+	  soap_update_ptrs(soap, q, q + n, s, q);
+#endif
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy %u bytes from %p to %p\n", (unsigned int)n, q, s));
+        memcpy(s, q, n);
+        s += n;
+      }
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  soap_end_block(soap);
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsize(struct soap *soap, const char *type, int size)
+{ return soap_putsizes(soap, type, &size, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizes(struct soap *soap, const char *type, const int *size, int dim)
+{ return soap_putsizesoffsets(soap, type, size, NULL, dim);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim)
+{ int i;
+  if (!type)
+    return NULL;
+  if (soap->version == 2)
+  { sprintf(soap->type, "%s[%d", type, size[0]);
+    for (i = 1; i < dim; i++)
+      sprintf(soap->type + strlen(soap->type), " %d", size[i]);
+  }
+  else
+  { if (offset)
+    { sprintf(soap->type, "%s[%d", type, size[0] + offset[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i] + offset[i]);
+    }
+    else
+    { sprintf(soap->type, "%s[%d", type, size[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i]);
+    }
+    strcat(soap->type, "]");
+  }
+  return soap->type;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffset(struct soap *soap, int offset)
+{ return soap_putoffsets(soap, &offset, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffsets(struct soap *soap, const int *offset, int dim)
+{ register int i;
+  sprintf(soap->arrayOffset, "[%d", offset[0]);
+  for (i = 1; i < dim; i++)
+    sprintf(soap->arrayOffset + strlen(soap->arrayOffset), ",%d", offset[i]);
+  strcat(soap->arrayOffset, "]");
+  return soap->arrayOffset;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_size(const int *size, int dim)
+{ register int i, n = size[0];
+  for (i = 1; i < dim; i++)
+    n *= size[i];
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getoffsets(const char *attr, const int *size, int *offset, int dim)
+{ register int i, j = 0;
+  if (offset)
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += offset[i] = (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  else
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  return j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsize(const char *attr1, const char *attr2, int *j)
+{ register int n, k;
+  char *s;
+  *j = 0;
+  if (!*attr1)
+    return -1;
+  if (*attr1 == '[')
+    attr1++;
+  n = 1;
+  for (;;)
+  { k = (int)soap_strtol(attr1, &s, 10);
+    n *= k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE || s == attr1)
+      return -1;
+    attr1 = strchr(s, ',');
+    if (!attr1)
+      attr1 = strchr(s, ' ');
+    if (attr2 && *attr2)
+    { attr2++;
+      *j *= k;
+      k = (int)soap_strtol(attr2, &s, 10);
+      *j += k;
+      if (k < 0)
+        return -1;
+      attr2 = s;
+    }
+    if (!attr1)
+      break;
+    attr1++;
+  }
+  return n - *j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsizes(const char *attr, int *size, int dim)
+{ register int i, k, n;
+  if (!*attr)
+    return -1;
+  i = strlen(attr);
+  n = 1;
+  do
+  { for (i = i-1; i >= 0; i--)
+      if (attr[i] == '[' || attr[i] == ',' || attr[i] == ' ')
+        break;
+    k = (int)atol(attr + i + 1);
+    n *= size[--dim] = k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE)
+      return -1;
+  } while (i >= 0 && attr[i] != '[');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getposition(const char *attr, int *pos)
+{ register int i, n;
+  if (!*attr)
+    return -1;
+  n = 0;
+  i = 1;
+  do
+  { pos[n++] = (int)atol(attr + i);
+    while (attr[i] && attr[i] != ',' && attr[i] != ']')
+      i++;
+    if (attr[i] == ',')
+      i++;
+  } while (n < SOAP_MAXDIMS && attr[i] && attr[i] != ']');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_push_namespace(struct soap *soap, const char *id, const char *ns)
+{ register struct soap_nlist *np;
+  register struct Namespace *p;
+  register short i = -1;
+  register size_t n, k;
+  n = strlen(id);
+  k = strlen(ns) + 1;
+  p = soap->local_namespaces;
+  if (p)
+  { for (i = 0; p->id; p++, i++)
+    { if (p->ns && !strcmp(ns, p->ns))
+      { if (p->out)
+        { SOAP_FREE(soap, p->out);
+          p->out = NULL;
+        }
+        break;
+      }
+      if (p->out)
+      { if (!strcmp(ns, p->out))
+          break;
+      }
+      else if (p->in)
+      { if (!soap_tag_cmp(ns, p->in))
+        { if ((p->out = (char*)SOAP_MALLOC(soap, k)))
+            strcpy(p->out, ns);
+          break;
+        }
+      }
+    }
+    if (!p || !p->id)
+      i = -1;
+  }
+  if (i >= 0)
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k);
+  if (!np)
+    return soap->error = SOAP_EOM;
+  np->next = soap->nlist;
+  soap->nlist = np;
+  np->level = soap->level;
+  np->index = i;
+  strcpy(np->id, id);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns));
+  if (i < 0)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push NOT OK: no match found for '%s' in namespace mapping table (added to stack anyway)\n", ns));
+  }
+  else
+  { np->ns = NULL;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push OK ('%s' matches '%s' in namespace table)\n", id, p->id));
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_namespace(struct soap *soap)
+{ register struct soap_nlist *np;
+  while (soap->nlist && soap->nlist->level >= soap->level)
+  { np = soap->nlist->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Popped namespace binding (level=%u) '%s'\n", soap->level, soap->nlist->id));
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_namespace(struct soap *soap, const char *id1, const char *id2, int n1, int n2) 
+{ register struct soap_nlist *np = soap->nlist;
+  while (np && (strncmp(np->id, id1, n1) || np->id[n1]))
+    np = np->next;
+  if (np)
+  { if (np->index < 0
+     || (soap->local_namespaces[np->index].id
+      && (strncmp(soap->local_namespaces[np->index].id, id2, n2)
+       || soap->local_namespaces[np->index].id[n2])))
+      return SOAP_NAMESPACE;
+    return SOAP_OK;
+  }
+  if (n1 == 3 && n1 == n2 && !strcmp(id1, "xml") && !strcmp(id1, id2))
+    return SOAP_OK;
+  return SOAP_SYNTAX_ERROR; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_current_namespace(struct soap *soap, const char *tag)
+{ register struct soap_nlist *np;
+  register const char *s;
+  np = soap->nlist;
+  if (!(s = strchr(tag, ':')))
+  { while (np && *np->id) /* find default namespace, if present */
+      np = np->next;
+  }
+  else
+  { while (np && (strncmp(np->id, tag, s - tag) || np->id[s - tag]))
+      np = np->next;
+    if (!np)
+      soap->error = SOAP_NAMESPACE;
+  }
+  if (np)
+  { if (np->index >= 0)
+      return soap->namespaces[np->index].ns;
+    if (np->ns)
+      return soap_strdup(soap, np->ns);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_tag_cmp(const char *s, const char *t)
+{ for (;;)
+  { register int c1 = *s;
+    register int c2 = *t;
+    if (!c1 || c1 == '"')
+      break;
+    if (c2 != '-')
+    { if (c1 != c2)
+      { if (c1 >= 'A' && c1 <= 'Z')
+          c1 += 'a' - 'A';
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+      }
+      if (c1 != c2)
+      { if (c2 != '*')
+          return 1;
+	c2 = *++t;
+        if (!c2)
+	  return 0;
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+        for (;;)
+        { c1 = *s;
+	  if (!c1 || c1 == '"')
+	    break;
+	  if (c1 >= 'A' && c1 <= 'Z')
+            c1 += 'a' - 'A';
+          if (c1 == c2 && !soap_tag_cmp(s + 1, t + 1))
+            return 0;
+	  s++;
+        }
+        break;
+      }
+    }
+    s++;
+    t++;
+  }
+  if (*t == '*' && !t[1])
+    return 0;
+  return *t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_tag(struct soap *soap, const char *tag1, const char *tag2)
+{ register const char *s, *t;
+  if (!tag1 || !tag2 || !*tag2)
+    return SOAP_OK;
+  s = strchr(tag1, ':');
+  t = strchr(tag2, ':');
+  if (t)
+  { if (s)
+    { if (t[1] && SOAP_STRCMP(s + 1, t + 1))
+        return SOAP_TAG_MISMATCH;
+      if (t != tag2 && soap_match_namespace(soap, tag1, tag2, s - tag1, t - tag2))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+        return SOAP_TAG_MISMATCH;
+      }
+    } 
+    else if (SOAP_STRCMP(tag1, t + 1))
+      return SOAP_TAG_MISMATCH;
+    else if (t != tag2 && soap_match_namespace(soap, tag1, tag2, 0, t - tag2))
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+      return SOAP_TAG_MISMATCH;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags and (default) namespaces match: '%s' '%s'\n", tag1, tag2));
+    return SOAP_OK;
+  }
+  if (s)
+  { if (SOAP_STRCMP(s + 1, tag2))
+      return SOAP_TAG_MISMATCH;
+  }
+  else if (SOAP_STRCMP(tag1, tag2))
+    return SOAP_TAG_MISMATCH;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags match: '%s' '%s'\n", tag1, tag2));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_array(struct soap *soap, const char *type)
+{ if (*soap->arrayType)
+    if (soap_match_tag(soap, soap->arrayType, type)
+     && soap_match_tag(soap, soap->arrayType, "xsd:anyType")
+     && soap_match_tag(soap, soap->arrayType, "xsd:ur-type")
+    )
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array type mismatch: '%s' '%s'\n", soap->arrayType, type));
+      return SOAP_TAG_MISMATCH;
+    }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************\
+ *
+ *	SSL
+ *
+\******************************************************************************/
+
+#ifdef WITH_OPENSSL
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_rand()
+{ unsigned char buf[4];
+  if (!ssl_init_done)
+    soap_ssl_init();
+  RAND_pseudo_bytes(buf, 4);
+  return *(int*)buf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *dhfile, const char *randfile, const char *sid)
+{ int err;
+  soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  if (dhfile)
+  { soap->dhfile = dhfile;
+    soap->rsa = 0;
+  }
+  else
+  { soap->dhfile = NULL;
+    soap->rsa = 1;
+  }
+  soap->randfile = randfile;
+  soap->require_client_auth = (flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION);
+  if (!(err = soap->fsslauth(soap)))
+  { if (sid)
+      SSL_CTX_set_session_id_context(soap->ctx, (unsigned char*)sid, strlen(sid));
+  }
+  return err; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_client_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *randfile)
+{ soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  soap->dhfile = NULL;
+  soap->rsa = 0;
+  soap->randfile = randfile;
+  soap->require_server_auth = (flags & SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION);
+  return soap->fsslauth(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_ssl_init()
+{ /* Note: for MT systems, the main program MUST call soap_ssl_init() before any threads are started */
+  if (!ssl_init_done)
+  { ssl_init_done = 1;
+    SSL_library_init();
+#ifndef WITH_LEAN
+    SSL_load_error_strings();
+#endif
+    if (!RAND_load_file("/dev/urandom", 1024))
+    { char buf[1024];
+      RAND_seed(buf, sizeof(buf));
+      while (!RAND_status())
+      { int r = rand();
+        RAND_seed(&r, sizeof(int));
+      }
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static const char *
+ssl_error(struct soap *soap, int ret)
+{ int err = SSL_get_error(soap->ssl, ret);
+  const char *msg = soap_str_code(h_ssl_error_codes, err);
+  if (msg)
+    strcpy(soap->msgbuf, msg);
+  else
+    return ERR_error_string(err, soap->msgbuf);
+  if (ERR_peek_error())
+  { unsigned long r;
+    strcat(soap->msgbuf, "\n");
+    while ((r = ERR_get_error()))
+      ERR_error_string_n(r, soap->msgbuf + strlen(soap->msgbuf), sizeof(soap->msgbuf) - strlen(soap->msgbuf));
+  } 
+  else
+  { switch (ret)
+    { case 0:
+        strcpy(soap->msgbuf, "EOF was observed that violates the protocol. The client probably provided invalid authentication information.");
+        break;
+      case -1:
+        sprintf(soap->msgbuf, "Error observed by underlying BIO: %s", strerror(errno));  
+        break;
+    }
+  }
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_password(char *buf, int num, int rwflag, void *userdata)
+{ if (num < (int)strlen((char*)userdata) + 1)
+    return 0;
+  return strlen(strcpy(buf, (char*)userdata));
+}
+#endif
+
+/******************************************************************************/
+/* This callback is included for future references. It should not be deleted
+#ifndef PALM_2
+static DH *
+ssl_tmp_dh(SSL *ssl, int is_export, int keylength)
+{ static DH *dh512 = NULL;
+  static DH *dh1024 = NULL;
+  DH *dh;
+  switch (keylength)
+  { case 512:
+      if (!dh512)
+      { BIO *bio = BIO_new_file("dh512.pem", "r");
+        if (bio)
+        { dh512 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+          return dh512;
+        }
+      }
+      else
+        return dh512;
+    default:
+      if (!dh1024)
+      { BIO *bio = BIO_new_file("dh1024.pem", "r");
+        if (bio)
+        { dh1024 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+        }
+      }
+      dh = dh1024;
+  }
+  return dh;
+}
+#endif
+*/
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_auth_init(struct soap *soap)
+{ if (!ssl_init_done)
+    soap_ssl_init();
+  if (!soap->ctx)
+  { if (!(soap->ctx = SSL_CTX_new(SSLv23_method())))
+      return soap_set_receiver_error(soap, "SSL error", "Can't setup context", SOAP_SSL_ERROR);
+  }
+  if (soap->randfile)
+  { if (!RAND_load_file(soap->randfile, -1))
+      return soap_set_receiver_error(soap, "SSL error", "Can't load randomness", SOAP_SSL_ERROR);
+  }
+  if (soap->cafile || soap->capath)
+  { if (!SSL_CTX_load_verify_locations(soap->ctx, soap->cafile, soap->capath))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read CA file and directory", SOAP_SSL_ERROR);
+    if (soap->cafile && soap->require_client_auth)
+      SSL_CTX_set_client_CA_list(soap->ctx, SSL_load_client_CA_file(soap->cafile));
+  }
+  if (!SSL_CTX_set_default_verify_paths(soap->ctx))
+    return soap_set_receiver_error(soap, "SSL error", "Can't read default CA file and/or directory", SOAP_SSL_ERROR);
+/* See below */
+  if (soap->keyfile)
+  { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read certificate key file", SOAP_SSL_ERROR);
+    if (soap->password)
+    { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+      SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+    }
+    if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+  }
+/* Suggested alternative approach to check cafile first before the key file:
+  if (soap->password)
+  { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+    SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+  }
+  if (!soap->cafile || !SSL_CTX_use_certificate_chain_file(soap->ctx, soap->cafile))
+  { if (soap->keyfile)
+    { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read certificate or key file", SOAP_SSL_ERROR);
+      if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+    }
+  }
+*/
+  if (soap->rsa)
+  { RSA *rsa = RSA_generate_key(1024, RSA_F4, NULL, NULL);
+    if (!SSL_CTX_set_tmp_rsa(soap->ctx, rsa))
+    { if (rsa)
+        RSA_free(rsa);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set RSA key", SOAP_SSL_ERROR);
+    }
+    RSA_free(rsa);
+  }
+  else if (soap->dhfile)
+  { DH *dh = 0;
+    BIO *bio;
+    bio = BIO_new_file(soap->dhfile, "r");
+    if (!bio)
+      return soap_set_receiver_error(soap, "SSL error", "Can't read DH file", SOAP_SSL_ERROR);
+    dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+    BIO_free(bio);
+    if (SSL_CTX_set_tmp_dh(soap->ctx, dh) < 0)
+    { if (dh)
+        DH_free(dh);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set DH parameters", SOAP_SSL_ERROR);
+    }
+    DH_free(dh);
+  }
+  SSL_CTX_set_options(soap->ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2);
+  SSL_CTX_set_verify(soap->ctx, soap->require_client_auth ? (SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT) : soap->require_server_auth ? SSL_VERIFY_PEER : SSL_VERIFY_NONE, soap->fsslverify);
+#if (OPENSSL_VERSION_NUMBER < 0x00905100L)
+  SSL_CTX_set_verify_depth(soap->ctx, 1); 
+#else
+  SSL_CTX_set_verify_depth(soap->ctx, 9); 
+#endif  
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_verify_callback(int ok, X509_STORE_CTX *store)
+{
+#ifdef SOAP_DEBUG
+  if (!ok) 
+  { char data[256];
+    X509 *cert = X509_STORE_CTX_get_current_cert(store);
+    fprintf(stderr, "SSL verify error or warning with certificate at depth %d: %s\n", X509_STORE_CTX_get_error_depth(store), X509_verify_cert_error_string(X509_STORE_CTX_get_error(store)));
+    X509_NAME_oneline(X509_get_issuer_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate issuer %s\n", data);
+    X509_NAME_oneline(X509_get_subject_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate subject %s\n", data);
+  }
+#endif
+  /* Note: return 1 to continue, but unsafe progress will be terminated by SSL */
+  return ok;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_accept(struct soap *soap)
+{ BIO *bio;
+  int i, r;
+  if (!soap_valid_socket(soap->socket))
+    return soap_set_receiver_error(soap, "SSL error", "No socket in soap_ssl_accept()", SOAP_SSL_ERROR);
+  if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    return SOAP_INVALID_SOCKET;
+  if (!soap->ssl)
+  { soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+      return soap_set_receiver_error(soap, "SSL error", "SSL_new() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+  }
+  else
+    SSL_clear(soap->ssl);
+  soap->imode |= SOAP_ENC_SSL;
+  soap->omode |= SOAP_ENC_SSL;
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&nonblocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)|O_NONBLOCK);
+#endif
+  bio = BIO_new_socket((SOAP_SOCKET)soap->socket, BIO_NOCLOSE);
+  SSL_set_bio(soap->ssl, bio, bio);
+  i = 100; /* 100 * 0.1 ms retries */
+  while ((r = SSL_accept(soap->ssl)) <= 0)
+  { int err = SSL_get_error(soap->ssl, r);
+    if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE)
+    { struct timeval timeout;
+      fd_set fd;
+      if (i-- <= 0)
+        break;
+      timeout.tv_sec = 0;
+      timeout.tv_usec = 100000;
+      FD_ZERO(&fd);
+      FD_SET((SOAP_SOCKET)soap->socket, &fd);
+      r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+      if (r < 0 && soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        return SOAP_EOF;
+      }
+    }
+    else
+    { soap->errnum = err;
+      break;
+    }
+  }
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&blocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+  if (r <= 0)
+  { soap_set_receiver_error(soap, ssl_error(soap, r), "SSL_accept() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+    soap_closesock(soap);
+    return SOAP_SSL_ERROR;
+  }
+  if (soap->require_client_auth)
+  { X509 *peer;
+    int err;
+    if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    peer = SSL_get_peer_certificate(soap->ssl);
+    if (!peer)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    X509_free(peer);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#endif /* WITH_OPENSSL */
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_init(struct soap *soap)
+{ soap->errmode = 1;
+#ifdef WIN32
+  if (tcp_done)
+    return 0;
+  else
+  { WSADATA w;
+    if (WSAStartup(MAKEWORD(1, 1), &w))
+      return -1;
+    tcp_done = 1;
+  }
+#endif
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_done(struct soap *soap)
+{ 
+#ifdef SOAP_DEBUG
+  int i;
+#endif
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  while (soap->clist)
+  { struct soap_clist *p = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = p;
+  }
+  soap->keep_alive = 0; /* to force close the socket */
+  soap_closesock(soap);
+#ifdef WITH_COOKIES
+  soap_free_cookies(soap);
+#endif
+  while (soap->plugins)
+  { register struct soap_plugin *p = soap->plugins->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Removing plugin '%s'\n", soap->plugins->id));
+    if (soap->plugins->fcopy || soap->state == SOAP_INIT)
+      soap->plugins->fdelete(soap, soap->plugins);
+    SOAP_FREE(soap, soap->plugins);
+    soap->plugins = p;
+  }
+  soap->fplugin = fplugin;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+#ifdef WITH_OPENSSL
+  if (soap->session)
+  { SSL_SESSION_free(soap->session);
+    soap->session = NULL;
+  }
+#endif
+  if (soap->state == SOAP_INIT)
+  { if (soap_valid_socket(soap->master))
+    { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+      soap->master = SOAP_INVALID_SOCKET;
+    }
+#ifdef WITH_OPENSSL
+    if (soap->ctx)
+    { SSL_CTX_free(soap->ctx);
+      soap->ctx = NULL;
+    }
+#endif
+  }
+#ifdef SOAP_DEBUG
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free logfiles\n"));
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { if (soap->logfile[i])
+    { SOAP_FREE(soap, (void*)soap->logfile[i]);
+      soap->logfile[i] = NULL;
+    }
+    soap_close_logfile(soap, i);
+  }
+  soap_free_mht(soap);
+  soap->state = 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_cleanup(struct soap *soap)
+{ soap_done(soap);
+#ifdef WIN32
+  if (!tcp_done)
+    return;
+  tcp_done = 0;
+  WSACleanup();
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+tcp_error(struct soap *soap)
+{ register const char *msg = NULL;
+  switch (soap->errmode)
+  { case 0:
+      msg = soap_strerror(soap);
+      break;
+    case 1:
+      msg = "WSAStartup failed";
+      break;
+    case 2:
+    {
+#ifndef WITH_LEAN
+      msg = soap_str_code(h_error_codes, soap->errnum);
+      if (!msg)
+#endif
+      { sprintf(soap->msgbuf, "TCP/UDP IP error %d", soap->errnum);
+        msg = soap->msgbuf;
+      }
+    }
+  }
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static const char*
+http_error(struct soap *soap, int status)
+{ register const char *msg = SOAP_STR_EOS;
+#ifndef WITH_LEAN
+  msg = soap_str_code(h_http_error_codes, status);
+  if (!msg)
+    msg = SOAP_STR_EOS;
+#endif
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_IPV6
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr)
+{ soap_int32 iadd = -1;
+  struct hostent hostent, *host = &hostent;
+#ifdef VXWORKS
+  int hostint;
+  /* inet_addr(), and hostGetByName() expect "char *"; addr is a "const char *". */
+  iadd = inet_addr((char*)addr);
+#else
+#if defined(_AIXVERSION_431) || defined(TRU64)
+  struct hostent_data ht_data;
+#endif
+#ifdef AS400
+  iadd = inet_addr((void*)addr);
+#else
+  iadd = inet_addr(addr);
+#endif
+#endif
+  if (iadd != -1)
+  { memcpy(inaddr, &iadd, sizeof(iadd));
+    return SOAP_OK;
+  }
+#if defined(__GLIBC__)
+  if (gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &host, &soap->errnum) < 0)
+    host = NULL;
+#elif defined(_AIXVERSION_431) || defined(TRU64)
+  memset((void*)&ht_data, 0, sizeof(ht_data));
+  if (gethostbyname_r(addr, &hostent, &ht_data) < 0)
+  { host = NULL;
+    soap->errnum = h_errno;
+  }
+#elif defined(HAVE_GETHOSTBYNAME_R)
+  host = gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &soap->errnum);
+#elif defined(VXWORKS)
+  /* If the DNS resolver library resolvLib has been configured in the vxWorks
+   * image, a query for the host IP address is sent to the DNS server, if the
+   * name was not found in the local host table. */
+  hostint = hostGetByName((char*)addr);
+  if (hostint == ERROR)
+  { host = NULL;
+    soap->errnum = soap_errno; 
+  }
+#else
+#ifdef AS400
+  if (!(host = gethostbyname((void*)addr)))
+    soap->errnum = h_errno;
+#else
+  if (!(host = gethostbyname(addr)))
+    soap->errnum = h_errno;
+#endif
+#endif
+  if (!host)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Host name not found\n"));
+    return SOAP_ERR;
+  }
+#ifdef VXWORKS
+  inaddr->s_addr = hostint;
+#else
+  memcpy(inaddr, host->h_addr, host->h_length);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_connect(struct soap *soap, const char *endpoint, const char *host, int port)
+{
+#ifdef WITH_IPV6
+  struct addrinfo hints, *res, *ressave;
+  int err;
+#endif
+  register int fd;
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->socket))
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+  soap->socket = SOAP_INVALID_SOCKET;
+  if (tcp_init(soap))
+  { soap->errnum = 0;
+    soap_set_sender_error(soap, tcp_error(soap), "TCP init failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->errmode = 0;
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+    err = getaddrinfo(soap->proxy_host, soap_int2s(soap, soap->proxy_port), &hints, &res);
+  else
+    err = getaddrinfo(host, soap_int2s(soap, port), &hints, &res);
+  if (err)
+  { soap_set_sender_error(soap, gai_strerror(err), "getaddrinfo failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  ressave = res;
+again:
+  fd = (int)socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+  soap->errmode = 0;
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    fd = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    fd = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  if (fd < 0)
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "socket failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_flags & SO_LINGER)
+  { struct linger linger;
+    memset((void*)&linger, 0, sizeof(linger));
+    linger.l_onoff = 1;
+    linger.l_linger = 0;
+    if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+    { soap->errnum = soap_socket_errno;
+      soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  if ((soap->connect_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, soap->connect_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (soap->keep_alive && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)fd, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Opening socket %d to host='%s' port=%d\n", fd, host, port));
+#ifndef WITH_IPV6
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+  { if (soap->fresolve(soap, soap->proxy_host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get proxy host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)soap->proxy_port);
+  }
+  else
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)port);
+  }
+  soap->errmode = 0;
+  if ((soap->omode & SOAP_IO_UDP))
+    return fd;
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking)); /* modified to use fd */
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+  else
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  for (;;)
+  { 
+#ifdef WITH_IPV6
+    if (connect((SOAP_SOCKET)fd, res->ai_addr, res->ai_addrlen))
+#else
+    if (connect((SOAP_SOCKET)fd, (struct sockaddr*)&soap->peer, sizeof(soap->peer)))
+#endif
+    { 
+#ifndef WITH_LEAN
+      if (soap->connect_timeout && (soap_socket_errno == SOAP_EINPROGRESS || soap_socket_errno == SOAP_EWOULDBLOCK))
+      { struct timeval timeout;
+        SOAP_SOCKLEN_T k;
+        fd_set fds;
+        if (soap->connect_timeout > 0)
+        { timeout.tv_sec = soap->connect_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->connect_timeout/1000000;
+          timeout.tv_usec = -soap->connect_timeout%1000000;
+        }
+        FD_ZERO(&fds);
+        FD_SET((SOAP_SOCKET)fd, &fds);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(fd + 1), NULL, &fds, NULL, &timeout);
+          if (r > 0)
+	    break;
+          if (!r)
+          { soap->errnum = 0;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+            soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+            soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+	k = (SOAP_SOCKLEN_T)sizeof(soap->errnum);
+        if (!getsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_ERROR, (char*)&soap->errnum, &k) && !soap->errnum)	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+          break;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap->errnum = soap_socket_errno;
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      else
+#endif
+#ifdef WITH_IPV6
+      if (res->ai_next)
+      { res = res->ai_next;
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        goto again;
+      }
+      else
+#endif
+      if (soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }  
+    else
+      break;
+  }
+#ifdef WITH_IPV6
+  soap->peerlen = 0; /* IPv6: already connected so use send() */
+  freeaddrinfo(ressave);
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  soap->socket = fd;
+  soap->imode &= ~SOAP_ENC_SSL;
+  soap->omode &= ~SOAP_ENC_SSL;
+  if (!strncmp(endpoint, "https:", 6))
+  {
+#ifdef WITH_OPENSSL
+    BIO *bio;
+    int r;
+    if (soap->proxy_host)
+    { short v;
+      unsigned int k = soap->omode; /* make sure we only parse HTTP */
+      size_t n = soap->count; /* save the content length */
+      char *userid, *passwd;
+      soap->omode &= ~SOAP_ENC; /* mask IO and ENC */
+      soap->omode |= SOAP_IO_BUFFER;
+      soap_begin_send(soap);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connecting to proxy server\n"));
+      sprintf(soap->tmpbuf, "CONNECT %s:%d HTTP/%s", host, port, soap->http_version);
+      if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+#ifndef WITH_LEAN
+      if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+      { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+        strcpy(soap->tmpbuf, "Basic ");
+        soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+        if ((soap->error = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+        { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return soap->error;
+        }
+      }
+#endif
+      if ((soap->error = soap->fposthdr(soap, NULL, NULL))
+       || soap_flush(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->omode = k;
+      k = soap->imode;
+      soap->imode &= ~SOAP_ENC; /* mask IO and ENC */
+      v = soap->version; /* preserve */
+      userid = soap->userid; /* preserve */
+      passwd = soap->passwd; /* preserve */
+      if (soap_begin_recv(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->userid = userid; /* restore */
+      soap->passwd = passwd; /* restore */
+      soap->version = v; /* restore */
+      soap->imode = k; /* restore */
+      soap->count = n; /* restore */
+      soap_begin_send(soap);
+    }
+    if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    { soap_set_sender_error(soap, "SSL error", "SSL authentication failed in tcp_connect(): check password, key file, and ca file.", SOAP_SSL_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+    { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      soap->error = SOAP_SSL_ERROR;
+      return SOAP_INVALID_SOCKET;
+    }
+    if (soap->session)
+    { if (!strcmp(soap->session_host, host) && soap->session_port == port)
+        SSL_set_session(soap->ssl, soap->session);
+      SSL_SESSION_free(soap->session);
+      soap->session = NULL;
+    }
+    soap->imode |= SOAP_ENC_SSL;
+    soap->omode |= SOAP_ENC_SSL;
+    bio = BIO_new_socket((SOAP_SOCKET)fd, BIO_NOCLOSE);
+    SSL_set_bio(soap->ssl, bio, bio);
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#if defined(WIN32)
+    { u_long nonblocking = 1;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+    }
+#elif defined(VXWORKS)
+    { u_long nonblocking = 1;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+#endif
+    for (;;)
+    { if ((r = SSL_connect(soap->ssl)) <= 0)
+      { int err = SSL_get_error(soap->ssl, r);
+        if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+        { soap_set_sender_error(soap, ssl_error(soap, r), "SSL connect failed in tcp_connect()", SOAP_SSL_ERROR);
+          soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (soap->connect_timeout)
+        { struct timeval timeout;
+          fd_set fds;
+          if (soap->connect_timeout > 0)
+          { timeout.tv_sec = soap->connect_timeout;
+            timeout.tv_usec = 0;
+          }
+          else
+          { timeout.tv_sec = -soap->connect_timeout/1000000;
+            timeout.tv_usec = -soap->connect_timeout%1000000;
+          }
+          FD_ZERO(&fds);
+          FD_SET((SOAP_SOCKET)fd, &fds);
+          for (;;)
+          { int r = select((SOAP_SOCKET)(fd + 1), &fds, NULL, &fds, &timeout);
+            if (r > 0)
+	      break;
+            if (!r)
+            { soap->errnum = 0;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+              soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+              soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+              return SOAP_INVALID_SOCKET;
+            }
+          }
+	  continue;
+        }
+      }
+      break;
+    }
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#ifdef WIN32
+    { u_long blocking = 0;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+    }
+#elif defined(VXWORKS)
+    { u_long blocking = 0;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+    if (soap->require_server_auth)
+    { X509 *peer;
+      int err;
+      if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+      { soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      peer = SSL_get_peer_certificate(soap->ssl);
+      if (!peer)
+      { soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      X509_NAME_get_text_by_NID(X509_get_subject_name(peer), NID_commonName, soap->msgbuf, sizeof(soap->msgbuf));
+      X509_free(peer);
+      if (soap_tag_cmp(soap->msgbuf, host))
+      { soap_set_sender_error(soap, "SSL error", "SSL certificate host name mismatch in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+#else
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    soap->error = SOAP_SSL_ERROR;
+    return SOAP_INVALID_SOCKET;
+#endif
+  }
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_bind(struct soap *soap, const char *host, int port, int backlog)
+{
+#ifdef WITH_IPV6
+  struct addrinfo *addrinfo = NULL;
+  struct addrinfo hints;
+  struct addrinfo res;
+  int err;
+#endif
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->master))
+  { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+    soap->master = SOAP_INVALID_SOCKET;
+  }
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 1;
+  if (tcp_init(soap))
+  { soap_set_receiver_error(soap, tcp_error(soap), "TCP init failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  hints.ai_flags = AI_PASSIVE;
+  soap->errmode = 2;
+  err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo);
+  if (addrinfo)
+  { res = *addrinfo;
+    soap->peer = *((struct sockaddr_storage*)addrinfo->ai_addr);
+    soap->peerlen = addrinfo->ai_addrlen;
+    res.ai_addr = (struct sockaddr*)&soap->peer;
+    res.ai_addrlen = soap->peerlen;
+    freeaddrinfo(addrinfo);
+  }
+  if (err)
+  { soap_set_receiver_error(soap, gai_strerror(err), "getaddrinfo failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->master = socket(res.ai_family, res.ai_socktype, res.ai_protocol);
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->master = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    soap->master = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  soap->errmode = 0;
+  if (!soap_valid_socket(soap->master))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "socket failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->socket = soap->master;
+#endif
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)soap->master, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(soap->master, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->bind_flags && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, soap->bind_flags, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->master, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+#ifdef WITH_IPV6
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, res.ai_addr, res.ai_addrlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+#else
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (host)
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_receiver_error(soap, tcp_error(soap), "get host by name failed in soap_bind()", SOAP_TCP_ERROR);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  else
+    soap->peer.sin_addr.s_addr = htonl(INADDR_ANY);
+  soap->peer.sin_port = htons((short)port);
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, (struct sockaddr*)&soap->peer, soap->peerlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+  if (!(soap->omode & SOAP_IO_UDP) && listen((SOAP_SOCKET)soap->master, backlog))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "listen failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+  return soap->master;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_poll(struct soap *soap)
+{ 
+#ifndef WITH_LEAN
+  struct timeval timeout;
+  fd_set rfd, sfd, xfd;
+  int r;
+  timeout.tv_sec = 0;
+  timeout.tv_usec = 0;
+  FD_ZERO(&rfd);
+  FD_ZERO(&sfd);
+  FD_ZERO(&xfd);
+  if (soap_valid_socket(soap->socket))
+  { FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &xfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, &xfd, &timeout);
+    if (r > 0 && FD_ISSET((SOAP_SOCKET)soap->socket, &xfd))
+      r = -1;
+  }
+  else if (soap_valid_socket(soap->master))
+  { FD_SET((SOAP_SOCKET)soap->master, &sfd);
+    r = select((SOAP_SOCKET)(soap->master + 1), NULL, &sfd, NULL, &timeout);
+  }
+  else
+    return SOAP_OK;
+  if (r > 0)
+  {
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+    {
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || SSL_peek(soap->ssl, soap->tmpbuf, 1) > 0))
+        return SOAP_OK;
+    }
+    else
+#endif
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) > 0))
+        return SOAP_OK;
+  }
+  else if (r < 0)
+  { soap->errnum = soap_socket_errno;
+    if ((soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) && soap_socket_errno != SOAP_EINTR)
+    { soap_set_receiver_error(soap, tcp_error(soap), "select failed in soap_poll()", SOAP_TCP_ERROR);
+      return soap->error = SOAP_TCP_ERROR;
+    }
+  }
+  else
+    soap->errnum = 0;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Polling: other end down on socket=%d select=%d\n", soap->socket, r));
+  return SOAP_EOF;
+#else
+  return SOAP_OK;
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_accept(struct soap *soap, int s, struct sockaddr *a, int *n)
+{ int fd;
+  fd = (int)accept((SOAP_SOCKET)s, a, (SOAP_SOCKLEN_T*)n);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, FD_CLOEXEC);
+#endif
+#endif
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_accept(struct soap *soap)
+{ int n = (int)sizeof(soap->peer);
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  soap->error = SOAP_OK;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    return soap->socket = soap->master;
+#endif
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 0;
+  soap->keep_alive = 0;
+  if (soap_valid_socket(soap->master))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->accept_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->accept_timeout > 0)
+        { timeout.tv_sec = soap->accept_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->accept_timeout/1000000;
+          timeout.tv_usec = -soap->accept_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->master, &fd);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(soap->master + 1), &fd, &fd, NULL, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            soap_set_receiver_error(soap, "Timeout", "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            soap_closesock(soap);
+            soap_set_sender_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+#if defined(WIN32)
+	{ u_long nonblocking = 1;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &nonblocking);
+        }
+#elif defined(VXWORKS)
+        { u_long nonblocking = 1;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&nonblocking));
+        }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)|O_NONBLOCK);
+#endif
+      }
+      else
+#if defined(WIN32)
+      { u_long blocking = 0;
+        ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+      }
+#elif defined(VXWORKS)
+      { u_long blocking = 0;
+        ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+      }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+      soap->socket = soap->faccept(soap, soap->master, (struct sockaddr*)&soap->peer, &n);
+      soap->peerlen = (size_t)n;
+      if (soap_valid_socket(soap->socket))
+      {
+#ifdef WITH_IPV6
+/* Use soap->host to store the numeric form of the remote host */
+        getnameinfo((struct sockaddr*)&soap->peer, n, soap->host, sizeof(soap->host), NULL, 0, NI_NUMERICHOST | NI_NUMERICSERV); 
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d from %s\n", soap->socket, soap->host));
+        soap->ip = 0; /* info stored in soap->peer and soap->host */
+        soap->port = 0; /* info stored in soap->peer and soap->host */
+#else
+        soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+        soap->port = (int)ntohs(soap->peer.sin_port); /* does not return port number on some systems */
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d at port %d from IP %d.%d.%d.%d\n", soap->socket, soap->port, (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF));
+#endif
+#ifndef WITH_LEAN
+	if (soap->accept_flags & SO_LINGER)
+        { struct linger linger;
+          memset((void*)&linger, 0, sizeof(linger));
+          linger.l_onoff = 1;
+          linger.l_linger = 0;
+	  if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+          { soap->errnum = soap_socket_errno;
+	    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in soap_accept()", SOAP_TCP_ERROR);
+	    soap_closesock(soap);
+            return SOAP_INVALID_SOCKET;
+	  }
+        }
+        if ((soap->accept_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, soap->accept_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#ifdef TCP_NODELAY
+        if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->socket, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#endif
+#endif
+        if (soap->accept_timeout)
+        {
+#if defined(WIN32)
+          u_long blocking = 0;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+          ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+#elif defined(VXWORKS)
+          u_long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+          ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)(&blocking));
+#elif defined(PALM)
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL,0)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL,0)&~O_NONBLOCK);
+#elif defined(SYMBIAN)
+          long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, 0/*FIONBIO*/, &blocking);
+#else
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+	}
+        soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+        return soap->socket;
+      }
+      if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept failed from %s\n", soap->host));
+        soap->errnum = soap_socket_errno;
+        soap_set_receiver_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+	soap_closesock(soap);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+  }
+  else
+  { soap->errnum = 0;
+    soap_set_receiver_error(soap, tcp_error(soap), "no master socket in soap_accept()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_disconnect(struct soap *soap)
+{
+#ifdef WITH_OPENSSL
+  if (soap->ssl)
+  { int r, s = 0;
+    if (soap->session)
+      SSL_SESSION_free(soap->session);
+    if (*soap->host)
+    { soap->session = SSL_get1_session(soap->ssl);
+      if (soap->session)
+      { strcpy(soap->session_host, soap->host);
+        soap->session_port = soap->port;
+      }
+    }
+    r = SSL_shutdown(soap->ssl);
+    if (r != 1)
+    { s = ERR_get_error();
+      if (s)
+      { if (soap_valid_socket(soap->socket))
+        { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1);
+          soap->socket = SOAP_INVALID_SOCKET;
+        }
+        r = SSL_shutdown(soap->ssl);
+      }
+    }
+    DBGLOG(TEST, if (s) SOAP_MESSAGE(fdebug, "Shutdown failed: %d\n", SSL_get_error(soap->ssl, r)));
+    SSL_free(soap->ssl);
+    soap->ssl = NULL;
+    if (s)
+      return SOAP_SSL_ERROR;
+    ERR_remove_state(0);
+  }
+#endif
+  if (soap_valid_socket(soap->socket) && !(soap->omode & SOAP_IO_UDP))
+  { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 2);
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+    soap->socket = SOAP_INVALID_SOCKET;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_closesocket(struct soap *soap, SOAP_SOCKET fd)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Close socket %d\n", (int)fd));
+  return closesocket(fd);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_shutdownsocket(struct soap *soap, SOAP_SOCKET fd, int how)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Shutdown socket %d how=%d\n", (int)fd, how));
+  return shutdown(fd, how);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_closesock(struct soap *soap)
+{ register int status = soap->error;
+  if (status == SOAP_EOF || status == SOAP_TCP_ERROR || status == SOAP_SSL_ERROR || !soap->keep_alive)
+  { if (soap->fclose && (soap->error = soap->fclose(soap)))
+      return soap->error;
+    soap->keep_alive = 0;
+  }
+#ifdef WITH_ZLIB
+  if (soap->zlib_state == SOAP_ZLIB_DEFLATE)
+    deflateEnd(&soap->d_stream);
+  else if (soap->zlib_state == SOAP_ZLIB_INFLATE)
+    inflateEnd(&soap->d_stream);
+  soap->zlib_state = SOAP_ZLIB_NONE;
+#endif
+  return soap->error = status;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_hash(register const char *s)
+{ register size_t h = 0;
+  while (*s)
+    h = 65599*h + *s++;
+  return h % SOAP_IDHASH;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_pht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing pointer hashtable\n"));
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new1(soap_mode mode)
+{ return soap_new2(mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new()
+{ return soap_new2(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new2(soap_mode imode, soap_mode omode)
+{ struct soap *soap = (struct soap*)malloc(sizeof(struct soap));
+  if (soap)
+    soap_init2(soap, imode, omode);
+  return soap;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_del(struct soap *soap)
+{ free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_pht(struct soap *soap)
+{ register struct soap_pblk *pb, *next;
+  register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free pointer hashtable\n"));
+  for (pb = soap->pblk; pb; pb = next)
+  { next = pb->next;
+    SOAP_FREE(soap, pb);
+  }
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type)
+{ register int i;
+  struct soap_plist *pp;
+  if (soap->version != 1)
+    soap->encoding = 1;
+  if (a)
+    i = soap_array_pointer_lookup(soap, p, a, n, type, &pp);
+  else
+    i = soap_pointer_lookup(soap, p, type, &pp);
+  if (i)
+  { if (soap_is_embedded(soap, pp)
+     || soap_is_single(soap, pp))
+      return 0;
+    soap_set_embedded(soap, pp);
+  }
+  return i;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_lookup(struct soap *soap, const void *p, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (p)
+  { for (pp = soap->pht[soap_hash_ptr(p)]; pp; pp = pp->next)
+    { if (pp->ptr == p && pp->type == type)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d id=%d\n", p, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d: not found\n", p, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_enter(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register int h;
+  register struct soap_plist *pp;
+  if (!soap->pblk || soap->pidx >= SOAP_PTRBLK)
+  { register struct soap_pblk *pb = (struct soap_pblk*)SOAP_MALLOC(soap, sizeof(struct soap_pblk));
+    if (!pb)
+    { soap->error = SOAP_EOM;
+      return 0;
+    }
+    pb->next = soap->pblk;
+    soap->pblk = pb;
+    soap->pidx = 0;
+  }
+  *ppp = pp = &soap->pblk->plist[soap->pidx++];
+  if (a)
+    h = soap_hash_ptr(a->__ptr);
+  else
+    h = soap_hash_ptr(p);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pointer enter location=%p array=%p size=%d dim=%d type=%d id=%d\n", p, a?a->__ptr:NULL, a?a->__size:0, n, type, soap->idnum+1));
+  pp->next = soap->pht[h];
+  pp->type = type;
+  pp->mark1 = 0;
+  pp->mark2 = 0;
+  pp->ptr = p;
+  pp->array = a;
+  soap->pht[h] = pp;
+  pp->id = ++soap->idnum;
+  return pp->id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_pointer_lookup(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (!p || !a->__ptr)
+    return 0;
+  for (pp = soap->pht[soap_hash_ptr(a->__ptr)]; pp; pp = pp->next)
+  { if (pp->type == type && pp->array && pp->array->__ptr == a->__ptr)
+    { register int i;
+      for (i = 0; i < n; i++)
+        if (((const int*)&pp->array->__size)[i] != ((const int*)&a->__size)[i])
+	  break;
+      if (i == n)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d id=%d\n", a->__ptr, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d: not found\n", a->__ptr, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_count(struct soap *soap)
+{ soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) || (soap->omode & SOAP_ENC_DIME))
+    soap->mode = soap->omode | SOAP_IO_LENGTH | SOAP_ENC_DIME;
+  else
+#endif
+  { soap->mode = soap->omode;
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE
+     || (((soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_ENC_XML))
+#ifndef WITH_LEANER
+      && !soap->fpreparesend
+#endif
+      ))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    else
+      soap->mode |= SOAP_IO_LENGTH;
+  }
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (!(soap->mode & SOAP_ENC_DIME))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+    soap->mode |= SOAP_ENC_MIME;
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+  soap->dime.list = soap->dime.last;	/* keep track of last DIME attachment */
+#endif
+  soap->count = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->part = SOAP_BEGIN;
+  soap->idnum = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin count phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+#ifndef WITH_LEANER
+  soap->dime.count = 0; /* count # of attachments */
+  soap->dime.size = 0; /* accumulate total size of attachments */
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+    return soap->error = soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_count(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->fpreparefinal)
+    return soap->error = soap->fpreparefinal(soap);
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of count phase\n"));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_send(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+  soap->mode = soap->omode | (soap->mode & (SOAP_IO_LENGTH | SOAP_ENC_DIME));
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+#ifdef WITH_UDP
+  if ((soap->mode & SOAP_IO_UDP))
+  { soap->mode |= SOAP_ENC_XML;
+    if (soap->count > SOAP_BUFLEN)
+      return soap->error = SOAP_UDP_ERROR;
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_FLUSH && soap_valid_socket(soap->socket))
+  { if (soap->count || (soap->mode & SOAP_IO_LENGTH) || (soap->mode & SOAP_ENC_XML))
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+  soap->mode &= ~SOAP_IO_LENGTH;
+  if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap_new_block(soap);
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+  { soap->mode |= SOAP_ENC_MIME;
+    soap->mode &= ~SOAP_ENC_DIME;
+  }
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket)) /* Set win32 stdout or soap->sendfd to BINARY, e.g. to support DIME */
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->sendfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->sendfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#endif
+  if (soap->mode & SOAP_IO)
+  { soap->bufidx = 0;
+    soap->buflen = 0;
+  }
+  soap->chunksize = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+#ifdef WITH_ZLIB
+  soap->z_ratio_out = 1.0;
+  if ((soap->mode & SOAP_ENC_ZLIB) && soap->zlib_state != SOAP_ZLIB_DEFLATE)
+  {
+#ifdef WITH_GZIP
+    memcpy(soap->z_buf, "\37\213\10\0\0\0\0\0\0\377", 10);
+    soap->d_stream.next_out = (Byte*)soap->z_buf + 10;
+    soap->d_stream.avail_out = SOAP_BUFLEN - 10;
+    soap->z_crc = crc32(0L, NULL, 0);
+    if (deflateInit2(&soap->d_stream, soap->z_level, Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY) != Z_OK)
+#else
+    soap->d_stream.next_out = (Byte*)soap->z_buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    if (deflateInit(&soap->d_stream, soap->z_level) != Z_OK)
+#endif
+      return soap->error = SOAP_ZLIB_ERROR;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflate initialized\n"));
+    soap->zlib_state = SOAP_ZLIB_DEFLATE;
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin send phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+  soap->part = SOAP_BEGIN;
+#ifndef WITH_LEANER
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_embedded(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { pp->mark1 = 1;
+    pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded %p type=%d mark set to 1\n", p, t));
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_reference(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (!p || (soap->mode & SOAP_XML_TREE))
+    return 1;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (soap_pointer_enter(soap, p, NULL, 0, t, &pp))
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  else
+    return 1;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reference %p type=%d (%d %d)\n", p, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_reference(struct soap *soap, const void *p, const struct soap_array *a, int n, int t)
+{ register int i;
+  struct soap_plist *pp;
+  if (!p || !a->__ptr)
+    return 1;
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (i)
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (!soap_pointer_enter(soap, p, a, n, t, &pp))
+    return 1;
+  else
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array reference %p ptr=%p dim=%d type=%d (%d %d)\n", p, a->__ptr, n, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embedded_id(struct soap *soap, int id, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap->mode & SOAP_XML_TREE)
+    return id;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id %p type=%d id=%d\n", p, t, id));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (id < 0)
+    { id = soap_pointer_lookup(soap, p, t, &pp);
+      if (id)
+      { if (soap->mode & SOAP_IO_LENGTH)
+          pp->mark1 = 2;
+        else
+          pp->mark2 = 2;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id multiref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+      }
+      return -1;
+    }
+    return id;
+  }
+  if (id < 0)
+    id = soap_pointer_lookup(soap, p, t, &pp);
+  else if (id && !soap_pointer_lookup(soap, p, t, &pp))
+    return 0;
+  if (id && pp)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      pp->mark1 = 1;
+    else
+      pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id embedded ref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+  }
+  return id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Is embedded? %d %d\n", (int)pp->mark1, (int)pp->mark2));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      return pp->mark1 != 0;
+    return pp->mark2 != 0;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 1;
+  return pp->mark2 == 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_single(struct soap *soap, struct soap_plist *pp)
+{ if (soap->part == SOAP_IN_HEADER)
+    return 1;
+  if (!pp)
+    return 0;
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 0;
+  return pp->mark2 == 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return;
+  if (soap->mode & SOAP_IO_LENGTH)
+    pp->mark1 = 1;
+  else
+    pp->mark2 = 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attachment(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, const char *aid, const char *atype, const char *aoptions, int n, const char *type, int t) 
+{ struct soap_plist *pp;
+  int i;
+  if (!p || !a->__ptr || (!aid && !atype))
+    return soap_element_id(soap, tag, id, p, a, n, type, t);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Attachment tag='%s' id='%s' (%d) type='%s'\n", tag, aid?aid:"", id, atype?atype:""));
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (!i)
+  { i = soap_pointer_enter(soap, p, a, n, t, &pp);
+    if (!i)
+    { soap->error = SOAP_EOM;
+      return -1;
+    }
+  }
+  if (id <= 0)
+    id = i;
+  if (!aid)
+  { sprintf(soap->tmpbuf, soap->dime_id_format, id);
+    aid = soap_strdup(soap, soap->tmpbuf);
+  }
+  /* Add MTOM xop:Include element when necessary */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  if ((soap->mode & SOAP_ENC_MTOM) && strcmp(tag, "xop:Include"))
+  { if (soap_element_begin_out(soap, tag, 0, type)
+     || soap_element_href(soap, "xop:Include", 0, "href", aid)
+     || soap_element_end_out(soap, tag))
+      return soap->error;
+  }
+  else if (soap_element_href(soap, tag, 0, "href", aid))
+    return soap->error;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { if (pp->mark1 != 3)
+    { struct soap_multipart *content;
+      if (soap->mode & SOAP_ENC_MTOM)
+        content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, (char*)a->__ptr, a->__size);
+      else
+        content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, (char*)a->__ptr, a->__size);
+      if (!content)
+      { soap->error = SOAP_EOM;
+        return -1;
+      }
+      if (!strncmp(aid, "cid:", 4)) /* RFC 2111 */
+      { if (soap->mode & SOAP_ENC_MTOM)
+        { char *s = (char*)soap_malloc(soap, strlen(aid) - 1);
+	  if (s)
+	  { *s = '<';
+	    strcpy(s + 1, aid + 4);
+	    strcat(s, ">");
+	    content->id = s;
+          }
+        }
+        else
+          content->id = aid + 4;
+      }
+      else
+        content->id = aid;
+      content->type = atype;
+      content->options = aoptions;
+      content->encoding = SOAP_MIME_BINARY;
+      pp->mark1 = 3;
+    }
+  }
+  else
+    pp->mark2 = 3;
+  return -1;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_iht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+    soap->iht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_iht(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip, *p;
+  register struct soap_flist *fp, *fq;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = p)
+    { for (fp = ip->flist; fp; fp = fq)
+      { fq = fp->next;
+        SOAP_FREE(soap, fp);
+      }
+      p = ip->next;
+      SOAP_FREE(soap, ip);
+    }
+    soap->iht[i] = NULL;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_lookup(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  for (ip = soap->iht[soap_hash(id)]; ip; ip = ip->next)
+    if (!strcmp(ip->id, id))
+      return ip;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_enter(struct soap *soap, const char *id)
+{ register size_t h;
+  register struct soap_ilist *ip;
+  ip = (struct soap_ilist*)SOAP_MALLOC(soap, sizeof(struct soap_ilist) + strlen(id));
+  if (ip)
+  { h = soap_hash(id);
+    strcpy(ip->id, id);
+    ip->next = soap->iht[h];
+    soap->iht[h] = ip;
+    return ip;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_malloc(struct soap *soap, size_t n)
+{ register char *p;
+  if (!n)
+    return (void*)SOAP_NON_NULL;
+  if (!soap)
+    return SOAP_MALLOC(soap, n);
+  n += (-(long)n) & (sizeof(void*)-1); /* align at 4-, 8- or 16-byte boundary */
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(void*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  /* keep chain of alloced cells for later destruction */
+  soap->alloced = 1;
+  *(void**)(p + n) = soap->alist;
+  *(size_t*)(p + n + sizeof(void*)) = n;
+  soap->alist = p + n;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_mht(struct soap *soap)
+{ register int i;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->mht[i] = NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_free_mht(struct soap *soap)
+{ register int i;
+  register struct soap_mlist *mp, *mq;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+  { for (mp = soap->mht[i]; mp; mp = mq)
+    { mq = mp->next;
+      if (mp->live)
+        fprintf(stderr, "%s(%d): malloc() = %p not freed (memory leak or forgot to call soap_end()?)\n", mp->file, mp->line, mp->ptr);
+      free(mp);
+    }
+    soap->mht[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_track_malloc(struct soap *soap, const char *file, int line, size_t size)
+{ register void *p = malloc(size);
+  if (soap)
+  { register int h = soap_hash_ptr(p);
+    register struct soap_mlist *mp = (struct soap_mlist*)malloc(sizeof(struct soap_mlist));
+    if (soap->fdebug[SOAP_INDEX_TEST])
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): malloc(%lu) = %p\n", file, line, (unsigned long)size, p));
+    mp->next = soap->mht[h];
+    mp->ptr = p;
+    mp->file = file;
+    mp->line = line;
+    mp->live = 1;
+    soap->mht[h] = mp;
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_track_free(struct soap *soap, const char *file, int line, void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+  { if (mp->live)
+    { free(p);
+      if (soap->fdebug[SOAP_INDEX_TEST])
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): free(%p)\n", file, line, p));
+      mp->live = 0;
+    }
+    else
+      fprintf(stderr, "%s(%d): free(%p) double free of pointer malloced at %s(%d)\n", file, line, p, mp->file, mp->line);
+  }
+  else
+    fprintf(stderr, "%s(%d): free(%p) pointer not malloced\n", file, line, p);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_track_unlink(struct soap *soap, const void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+    mp->live = 0;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_dealloc(struct soap *soap, void *p)
+{ if (!soap)
+    return;
+  if (p)
+  { register char **q;
+    for (q = (char**)&soap->alist; *q; q = *(char***)q)
+    { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+      { *q = **(char***)q;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Freed data at %p\n", p));
+        SOAP_FREE(soap, p);
+        return;
+      }
+    }
+    soap_delete(soap, p);
+  }
+  else
+  { register char *q;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free all soap_malloc() data\n"));
+    while (soap->alist)
+    { q = (char*)soap->alist;
+      soap->alist = *(void**)q;
+      q -= *(size_t*)(q + sizeof(void*));
+      SOAP_FREE(soap, q);
+    }
+  }
+  /* we must assume these were deallocated: */
+  soap->action = NULL;
+  soap->fault = NULL;
+  soap->header = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->authrealm = NULL;
+#ifndef WITH_LEANER
+  soap_clr_mime(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_delete(struct soap *soap, void *p)
+{ register struct soap_clist **cp;
+  if (soap_check_state(soap))
+    return;
+  cp = &soap->clist;
+  if (p)
+  { while (*cp)
+    { if (p == (*cp)->ptr)
+      { register struct soap_clist *q = *cp;
+        *cp = q->next;
+        q->fdelete(q);
+        SOAP_FREE(soap, q);
+        return;
+      }
+      cp = &(*cp)->next;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: address not in list\n", p));
+  }
+  else
+  { while (*cp)
+    { register struct soap_clist *q = *cp;
+      *cp = q->next;
+      if (q->ptr == (void*)soap->fault)
+        soap->fault = NULL; /* this was deallocated */
+      else if (q->ptr == (void*)soap->header)
+        soap->header = NULL; /* this was deallocated */
+      q->fdelete(q);
+      SOAP_FREE(soap, q);
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_clist *
+SOAP_FMAC2
+soap_link(struct soap *soap, void *p, int t, int n, void (*fdelete)(struct soap_clist*))
+{ register struct soap_clist *cp;
+  if ((cp = (struct soap_clist*)SOAP_MALLOC(soap, sizeof(struct soap_clist))))
+  { cp->next = soap->clist;
+    cp->type = t;
+    cp->size = n; 
+    cp->ptr = p;
+    cp->fdelete = fdelete;
+    soap->clist = cp;
+  }
+  return cp;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_unlink(struct soap *soap, const void *p)
+{ register char **q;
+  register struct soap_clist **cp;
+  if (!soap || !p)
+    return;
+  for (q = (char**)&soap->alist; *q; q = *(char***)q)
+  { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+    { *q = **(char***)q;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked data %p\n", p));
+#ifdef SOAP_DEBUG
+      soap_track_unlink(soap, p);
+#endif
+      return;
+    }
+  }
+  for (cp = &soap->clist; *cp; cp = &(*cp)->next)
+  { if (p == (*cp)->ptr)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked class instance %p\n", p));
+      q = (char**)*cp;
+      *cp = (*cp)->next;
+      SOAP_FREE(soap, q);
+      return;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_lookup_type(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  if (id && *id)
+  { ip = soap_lookup(soap, id);
+    if (ip)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup id='%s' type=%d\n", id, ip->type));
+      return ip->type;
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "lookup type id='%s' NOT FOUND! Need to get it from xsi:type\n", id));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, unsigned int k)
+{ struct soap_ilist *ip;
+  void **q;
+  if (!p || !id || !*id)
+    return p;
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding first href='%s' type=%d %p (%u bytes)\n", id, t, p, (unsigned int)n));
+    ip->type = t;
+    ip->size = n; 
+    ip->link = p;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->ptr = NULL;
+    ip->level = k;
+    *p = NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolved href='%s' type=%d location=%p (%u bytes)\n", id, t, ip->ptr, (unsigned int)n));
+    if (ip->type != t)
+    { strcpy(soap->id, id);
+      soap->error = SOAP_HREF;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility: id type=%d href type=%d\n", ip->type, t));
+      return NULL;
+    }
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      if (!q)
+        return NULL;
+      *p = (void*)q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    *p = ip->ptr;
+  }
+  else if (ip->level > k)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving level %u pointers to href='%s'\n", ip->level, id));
+    while (ip->level > k)
+    { void *s, **r = &ip->link;
+      q = (void**)ip->link;
+      while (q)
+      { *r = (void*)soap_malloc(soap, sizeof(void*));
+        s = *q;
+        *q = *r;
+        r = (void**)*r;
+        q = (void**)s;
+      }
+      *r = NULL;
+      ip->size = n; 
+      ip->copy = NULL;
+      ip->level = ip->level - 1;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarded href='%s' type=%d location=%p (%u bytes)\n", id, t, p, (unsigned int)n));
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      *p = q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_forward(struct soap *soap, const char *href, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t))
+{ struct soap_ilist *ip;
+  if (!p || !href || !*href)
+    return p;
+  ip = soap_lookup(soap, href); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, href); /* new hash table entry for string id */
+    ip->type = st;
+    ip->size = n;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->ptr = NULL;
+    ip->level = 0;
+    ip->flist = NULL;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry href='%s' type=%d size=%lu level=%d location=%p\n", href, st, (unsigned long)n, k, p));
+  }
+  else if (ip->type != st || (ip->level == k && ip->size != n))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", href, ip->type, (unsigned long)ip->size, k, st, (unsigned long)n));
+    strcpy(soap->id, href);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  if (fcopy || n < sizeof(void*) || *href != '#')
+  { register struct soap_flist *fp = (struct soap_flist*)SOAP_MALLOC(soap, sizeof(struct soap_flist));
+    if (!fp)
+    { soap->error = SOAP_EOM;
+      return NULL;
+    }
+    fp->next = ip->flist;
+    fp->type = tt;
+    fp->ptr = p;
+    fp->level = k;
+    fp->len = len;
+    if (fcopy)
+      fp->fcopy = fcopy;
+    else
+      fp->fcopy = soap_fcopy;
+    ip->flist = fp;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding type=%d (target type=%d) size=%lu location=%p level=%u len=%lu href='%s'\n", st, tt, (unsigned long)n, p, k, (unsigned long)len, href));
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding copying address %p for type=%d href='%s'\n", p, st, href));
+    *(void**)p = ip->copy;
+    ip->copy = p;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*))
+{
+#ifndef WITH_NOIDREF
+  struct soap_ilist *ip;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Enter id='%s' type=%d loc=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  soap->alloced = 0;
+  if (!p)
+  { if (finstantiate)
+      p = finstantiate(soap, t, type, arrayType, &n);
+    else
+      p = soap_malloc(soap, n);
+    if (p)
+      soap->alloced = 1;
+  }
+#ifndef WITH_NOIDREF
+  if (!id || !*id)
+#endif
+    return p;
+#ifndef WITH_NOIDREF
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Lookup entry id='%s for location=%p'\n", id, p));
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    ip->type = t;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry id='%s' type=%d size=%lu level=%u location=%p\n", id, t, (unsigned long)n, k, p));
+  }
+  else if ((ip->type != t || (ip->level == k && ip->size != n)) && (ip->copy || ip->flist))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", id, ip->type, (unsigned long)ip->size, k, t, (unsigned long)n));
+    strcpy(soap->id, id);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Multiply defined id='%s'\n", id));
+    strcpy(soap->id, id);
+    soap->error = SOAP_DUPLICATE_ID;
+    return NULL;
+  }
+  else 
+  { ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update entry id='%s' type=%d location=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  }
+  return ip->ptr;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{ DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Copying data type=%d (target type=%d) %p -> %p (%lu bytes)\n", st, tt, q, p, (unsigned long)n));
+  memcpy(p, q, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_send(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->dime.list)
+  { /* SOAP body referenced attachments must appear first */
+    soap->dime.last->next = soap->dime.first;
+    soap->dime.first = soap->dime.list->next;
+    soap->dime.list->next = NULL;
+    soap->dime.last = soap->dime.list;
+  }
+  if (soap_putdime(soap) || soap_putmime(soap))
+    return soap->error;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End send\n"));
+  if (soap->mode & SOAP_IO) /* need to flush the remaining data in buffer */
+  { if (soap_flush(soap))
+#ifdef WITH_ZLIB
+    { if (soap->mode & SOAP_ENC_ZLIB && soap->zlib_state == SOAP_ZLIB_DEFLATE)
+      { soap->zlib_state = SOAP_ZLIB_NONE;
+        deflateEnd(&soap->d_stream);
+      }
+      return soap->error;
+    }
+#else
+      return soap->error;
+#endif
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { int r;
+      soap->d_stream.avail_in = 0;
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating remainder\n"));
+        r = deflate(&soap->d_stream, Z_FINISH);
+        if (soap->d_stream.avail_out != SOAP_BUFLEN)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN - soap->d_stream.avail_out))
+          { soap->zlib_state = SOAP_ZLIB_NONE;
+            deflateEnd(&soap->d_stream);
+            return soap->error;
+	  }
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (r == Z_OK);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+      soap->z_ratio_out = (float)soap->d_stream.total_out / (float)soap->d_stream.total_in;
+      soap->mode &= ~SOAP_ENC_ZLIB;
+      soap->zlib_state = SOAP_ZLIB_NONE;
+      if (deflateEnd(&soap->d_stream) != Z_OK || r != Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to end deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+#ifdef WITH_GZIP
+      soap->z_buf[0] = soap->z_crc & 0xFF;
+      soap->z_buf[1] = (soap->z_crc >> 8) & 0xFF;
+      soap->z_buf[2] = (soap->z_crc >> 16) & 0xFF;
+      soap->z_buf[3] = (soap->z_crc >> 24) & 0xFF;
+      soap->z_buf[4] = soap->d_stream.total_in & 0xFF;
+      soap->z_buf[5] = (soap->d_stream.total_in >> 8) & 0xFF;
+      soap->z_buf[6] = (soap->d_stream.total_in >> 16) & 0xFF;
+      soap->z_buf[7] = (soap->d_stream.total_in >> 24) & 0xFF;
+      if (soap_flush_raw(soap, soap->z_buf, 8))
+        return soap->error;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip crc32=%lu\n", (unsigned long)soap->z_crc));
+#endif
+    }
+#endif
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    { char *p;
+#ifndef WITH_NOHTTP
+      if (!(soap->mode & SOAP_ENC_XML))
+      { soap->mode--;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending buffered message of length %u\n", (unsigned int)soap->blist->size));
+        if (soap->status >= SOAP_POST)
+          soap->error = soap->fpost(soap, soap->endpoint, soap->host, soap->port, soap->path, soap->action, soap->blist->size);
+        else if (soap->status != SOAP_STOP)
+          soap->error = soap->fresponse(soap, soap->status, soap->blist->size);
+        if (soap->error || soap_flush(soap))
+          return soap->error;
+        soap->mode++;
+      }
+#endif
+      for (p = soap_first_block(soap); p; p = soap_next_block(soap))
+      { DBGMSG(SENT, p, soap_block_size(soap));
+        if ((soap->error = soap->fsend(soap, p, soap_block_size(soap))))
+        { soap_end_block(soap);
+          return soap->error;
+        }
+      }
+      soap_end_block(soap);
+    }
+#ifndef WITH_LEANER
+    else if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { DBGMSG(SENT, "\r\n0\r\n\r\n", 7);
+      if ((soap->error = soap->fsend(soap, "\r\n0\r\n\r\n", 7)))
+        return soap->error;
+    }
+#endif
+  }
+#ifdef WITH_TCPFIN
+#ifdef WITH_OPENSSL
+  if (!soap->ssl && soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#else
+  if (soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#endif
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of send phase\n"));
+  soap->omode &= ~SOAP_XML_SEC;
+  soap->count = 0;
+  soap->part = SOAP_END;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_recv(struct soap *soap)
+{ soap->part = SOAP_END;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) && soap_getdime(soap))
+    return soap->error;
+  soap->dime.list = soap->dime.first;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  if ((soap->mode & SOAP_ENC_MIME) && soap_getmime(soap))
+    return soap->error;
+  soap->mime.list = soap->mime.first;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "End of receive message ok\n"));
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { soap->mode &= ~SOAP_ENC_ZLIB;
+    memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+    soap->bufidx = (char*)soap->d_stream.next_in - soap->z_buf;
+    soap->buflen = soap->z_buflen;
+    soap->zlib_state = SOAP_ZLIB_NONE;
+    if (inflateEnd(&soap->d_stream) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+#ifdef WITH_GZIP
+    if (soap->zlib_in == SOAP_ZLIB_GZIP)
+    { soap_wchar c;
+      short i;
+      for (i = 0; i < 8; i++)
+      { if ((int)(c = soap_getchar(soap)) == EOF)
+          return soap->error = SOAP_EOF;
+        soap->z_buf[i] = (char)c;
+      }
+      if (soap->z_crc != ((uLong)(unsigned char)soap->z_buf[0] | ((uLong)(unsigned char)soap->z_buf[1] << 8) | ((uLong)(unsigned char)soap->z_buf[2] << 16) | ((uLong)(unsigned char)soap->z_buf[3] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: crc check failed, message corrupted? (crc32=%lu)\n", (unsigned long)soap->z_crc));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+      if (soap->d_stream.total_out != ((uLong)(unsigned char)soap->z_buf[4] | ((uLong)(unsigned char)soap->z_buf[5] << 8) | ((uLong)(unsigned char)soap->z_buf[6] << 16) | ((uLong)(unsigned char)soap->z_buf[7] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: incorrect message length\n"));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+    }
+#endif
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    while ((int)soap_getchar(soap) != EOF) /* advance to last chunk */
+      ;
+  if (soap->fdisconnect && (soap->error = soap->fdisconnect(soap)))
+    return soap->error;
+#ifndef WITH_NOIDREF
+  return soap_resolve(soap);
+#else
+#ifndef WITH_LEANER
+  if (soap->xlist)
+  { if (soap->mode & SOAP_ENC_MTOM)
+      return soap->error = SOAP_MIME_HREF;
+    return soap->error = SOAP_DIME_HREF;
+  }
+#endif
+  return SOAP_OK;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free(struct soap *soap)
+{ register struct Namespace *ns;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free namespace stack\n"));
+  while (soap->nlist)
+  { register struct soap_nlist *np = soap->nlist->next;
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free any remaining temp blocks\n"));
+  while (soap->blist)
+    soap_end_block(soap);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute storage\n"));
+  while (soap->attributes)
+  { register struct soap_attribute *tp = soap->attributes->next;
+    if (soap->attributes->value)
+      SOAP_FREE(soap, soap->attributes->value);
+    SOAP_FREE(soap, soap->attributes);
+    soap->attributes = tp;
+  }
+#ifdef WITH_FAST
+  if (soap->labbuf)
+    SOAP_FREE(soap, soap->labbuf);
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  ns = soap->local_namespaces;
+  if (ns)
+  { for (; ns->id; ns++)
+    { if (ns->out)
+      { if (soap->encodingStyle == ns->out)
+          soap->encodingStyle = SOAP_STR_EOS;
+        SOAP_FREE(soap, ns->out);
+        ns->out = NULL;
+      }
+      if (soap->encodingStyle == ns->ns)
+        soap->encodingStyle = SOAP_STR_EOS;
+    }
+    SOAP_FREE(soap, soap->local_namespaces);
+    soap->local_namespaces = NULL;
+  }
+#ifndef WITH_LEANER
+  while (soap->xlist)
+  { struct soap_xlist *xp = soap->xlist->next;
+    SOAP_FREE(soap, soap->xlist);
+    soap->xlist = xp;
+  }
+#endif
+#ifndef WITH_NOIDREF
+  soap_free_pht(soap);
+  soap_free_iht(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_logs(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { soap->logfile[i] = NULL;
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEAN) || defined(SOAP_DEBUG)
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_open_logfile(struct soap *soap, int i)
+{ if (soap->logfile[i])
+    soap->fdebug[i] = fopen(soap->logfile[i], i < 2 ? "ab" : "a");
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_close_logfile(struct soap *soap, int i)
+{ if (soap->fdebug[i])
+  { fclose(soap->fdebug[i]);
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_close_logfiles(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+    soap_close_logfile(soap, i);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_set_logfile(struct soap *soap, int i, const char *logfile)
+{ char *s = NULL;
+  soap_close_logfile(soap, i);
+  if (soap->logfile[i])
+    SOAP_FREE(soap, (void*)soap->logfile[i]);
+  if (logfile)
+    if ((s = (char*)SOAP_MALLOC(soap, strlen(logfile) + 1)))
+      strcpy(s, logfile);
+  soap->logfile[i] = s;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_recv_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_RECV, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_sent_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_SENT, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_test_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_TEST, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy(struct soap *soap)
+{ return soap_copy_context((struct soap*)malloc(sizeof(struct soap)), soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy_context(struct soap *copy, struct soap *soap)
+{ if (soap_check_state(soap))
+    return NULL;
+  if (copy)
+  { register struct soap_plugin *p;
+    memcpy(copy, soap, sizeof(struct soap));
+    copy->state = SOAP_COPY;
+    copy->user = NULL;
+    copy->error = SOAP_OK;
+    copy->userid = NULL;
+    copy->passwd = NULL;
+    copy->nlist = NULL;
+    copy->blist = NULL;
+    copy->clist = NULL;
+    copy->alist = NULL;
+    copy->attributes = NULL;
+#ifdef WITH_FAST
+    copy->labbuf = NULL;
+    copy->lablen = 0;
+    copy->labidx = 0;
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_mht(copy);
+#endif
+    copy->local_namespaces = NULL;
+#ifndef WITH_NOIDREF
+    soap_init_iht(copy);
+    soap_init_pht(copy);
+#endif
+    copy->header = NULL;
+    copy->fault = NULL;
+    copy->action = NULL;
+#ifndef WITH_LEAN
+#ifdef WITH_COOKIES
+    copy->cookies = soap_copy_cookies(copy);
+#else
+    copy->cookies = NULL;
+#endif
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_logs(copy);
+    soap_set_recv_logfile(copy, soap->logfile[SOAP_INDEX_RECV]);
+    soap_set_sent_logfile(copy, soap->logfile[SOAP_INDEX_SENT]);
+    soap_set_test_logfile(copy, soap->logfile[SOAP_INDEX_TEST]);
+#endif
+    copy->plugins = NULL;
+    for (p = soap->plugins; p; p = p->next)
+    { register struct soap_plugin *q = (struct soap_plugin*)SOAP_MALLOC(copy, sizeof(struct soap_plugin));
+      if (!q)
+        return NULL;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying plugin '%s'\n", p->id));
+      *q = *p;
+      if (p->fcopy && (soap->error = p->fcopy(copy, q, p)))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not copy plugin '%s'\n", p->id));
+        SOAP_FREE(copy, q);
+        return NULL;
+      }
+      q->next = copy->plugins;
+      copy->plugins = q;
+    }
+  }
+  else
+    soap->error = SOAP_EOM;
+  return copy;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init(struct soap *soap)
+{ soap->state = SOAP_INIT;
+  soap->version = 0;
+  soap_imode(soap, SOAP_IO_DEFAULT);
+  soap_omode(soap, SOAP_IO_DEFAULT);
+  soap->plugins = NULL;
+  soap->user = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+  soap->fconnect = NULL;
+  soap->fdisconnect = NULL;
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+  soap->fplugin = fplugin;
+#ifndef WITH_LEANER
+  soap->fdimereadopen = NULL;
+  soap->fdimewriteopen = NULL;
+  soap->fdimereadclose = NULL;
+  soap->fdimewriteclose = NULL;
+  soap->fdimeread = NULL;
+  soap->fdimewrite = NULL;
+#endif
+  soap->float_format = "%.8g"; /* .8 preserves single FP precision as much as possible, but might not be very efficient */
+  soap->double_format = "%.17lg"; /* .17 preserves double FP precision as much as possible, but might not be very efficient */
+  soap->dime_id_format = "cid:id%d"; /* default DIME id format */
+  soap->http_version = "1.1";
+  soap->actor = NULL;
+  soap->max_keep_alive = SOAP_MAXKEEPALIVE;
+  soap->keep_alive = 0;
+  soap->recv_timeout = 0;
+  soap->send_timeout = 0;
+  soap->connect_timeout = 0;
+  soap->accept_timeout = 0;
+  soap->socket_flags = 0;
+  soap->connect_flags = 0;
+  soap->bind_flags = 0;
+  soap->accept_flags = 0;
+  soap->ip = 0;
+#ifdef WITH_FAST
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  soap->encodingStyle = SOAP_STR_EOS;
+#ifndef WITH_NONAMESPACES
+  soap->namespaces = namespaces;
+#else
+  soap->namespaces = NULL;
+#endif
+  soap->local_namespaces = NULL;
+  soap->nlist = NULL;
+  soap->blist = NULL;
+  soap->clist = NULL;
+  soap->alist = NULL;
+  soap->attributes = NULL;
+  soap->header = NULL;
+  soap->fault = NULL;
+  soap->master = SOAP_INVALID_SOCKET;
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->os = NULL;
+  soap->is = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifndef UNDER_CE
+  soap->recvfd = 0;
+  soap->sendfd = 1;
+#else
+  soap->recvfd = stdin;
+  soap->sendfd = stdout;
+#endif 
+  soap->host[0] = '\0';
+  soap->port = 0;
+  soap->action = NULL;
+  soap->proxy_host = NULL;
+  soap->proxy_port = 8080;
+  soap->proxy_userid = NULL;
+  soap->proxy_passwd = NULL;
+  soap->authrealm = NULL;
+  soap->prolog = NULL;
+#ifdef WITH_OPENSSL
+  if (!ssl_init_done)
+    soap_ssl_init();
+  soap->fsslauth = ssl_auth_init;
+  soap->fsslverify = ssl_verify_callback;
+  soap->bio = NULL;
+  soap->ssl = NULL;
+  soap->ctx = NULL;
+  soap->require_server_auth = 0;
+  soap->require_client_auth = 0;
+  soap->rsa = 0;
+  soap->keyfile = NULL;
+  soap->password = NULL;
+  soap->dhfile = NULL;
+  soap->cafile = NULL;
+  soap->capath = NULL;
+  soap->crlfile = NULL;
+  soap->randfile = NULL;
+  soap->session = NULL;
+#endif
+#ifdef WITH_ZLIB
+  soap->zlib_state = SOAP_ZLIB_NONE;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.zalloc = NULL;
+  soap->d_stream.zfree = NULL;
+  soap->d_stream.opaque = NULL;
+  soap->z_level = 6;
+#endif
+#ifndef WITH_LEAN
+  soap->c14ninclude = NULL;
+  soap->c14nexclude = NULL;
+  soap->cookies = NULL;
+  soap->cookie_domain = NULL;
+  soap->cookie_path = NULL;
+  soap->cookie_max = 32;
+#endif
+#ifdef SOAP_DEBUG
+  soap_init_mht(soap);
+  soap_init_logs(soap);
+  soap_set_recv_logfile(soap, "RECV.log");
+  soap_set_sent_logfile(soap, "SENT.log");
+  soap_set_test_logfile(soap, NULL);
+#endif
+#ifdef WMW_RPM_IO
+  soap->rpmreqid = NULL;
+#endif
+#ifdef PALM
+  palmNetLibOpen();
+#endif
+#ifndef WITH_NOIDREF
+  soap_init_iht(soap);
+  soap_init_pht(soap);
+#endif
+  soap_begin(soap);
+#ifdef SOAP_DEBUG
+  soap_set_test_logfile(soap, "TEST.log");
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init1(struct soap *soap, soap_mode mode)
+{ soap_init2(soap, mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init2(struct soap *soap, soap_mode imode, soap_mode omode)
+{ soap_init(soap);
+  soap_imode(soap, imode);
+  soap_omode(soap, omode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_begin(struct soap *soap)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing\n"));
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+  soap->null = 0;
+  soap->position = 0;
+  soap->encoding = 0;
+  soap->mustUnderstand = 0;
+  soap->mode = 0;
+  soap->ns = 0;
+  soap->part = SOAP_END;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  soap->error = SOAP_OK;
+  soap->peeked = 0;
+  soap->ahead = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+  soap->endpoint[0] = '\0';
+#ifndef WITH_LEANER
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+#endif
+  soap_free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end(struct soap *soap)
+{ register struct soap_clist *cp;
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  soap_dealloc(soap, NULL);
+  while (soap->clist)
+  { cp = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = cp;
+  }
+  soap_closesock(soap);
+#ifdef SOAP_DEBUG
+  soap_close_logfiles(soap);
+#endif
+#ifdef PALM
+  palmNetLibClose();
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_namespaces(struct soap *soap, struct Namespace *p)
+{ register struct Namespace *ns = soap->local_namespaces;
+  register struct soap_nlist *np, *nq, *nr;
+  register unsigned int level = soap->level;
+  soap->namespaces = p;
+  soap->local_namespaces = NULL;
+  soap_set_local_namespaces(soap);
+  /* reverse the namespace list */
+  np = soap->nlist;
+  soap->nlist = NULL;
+  if (np)
+  { nq = np->next;
+    np->next = NULL;
+    while (nq)
+    { nr = nq->next;
+      nq->next = np;
+      np = nq;
+      nq = nr;
+    }
+  }
+  /* then push on new stack */
+  while (np)
+  { register const char *s;
+    soap->level = np->level; /* preserve element nesting level */
+    s = np->ns;
+    if (!s && np->index >= 0 && ns)
+    { s = ns[np->index].out;
+      if (!s)
+        s = ns[np->index].ns;
+    }
+    if (s && soap_push_namespace(soap, np->id, s))
+      return soap->error;
+    nq = np;
+    np = np->next;
+    SOAP_FREE(soap, nq);
+  }
+  if (ns)
+  { register int i;
+    for (i = 0; ns[i].id; i++)
+    { if (ns[i].out)
+      { SOAP_FREE(soap, ns[i].out);
+        ns[i].out = NULL;
+      }
+    }
+    SOAP_FREE(soap, ns);
+  }
+  soap->level = level; /* restore level */
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_local_namespaces(struct soap *soap)
+{ if (soap->namespaces && !soap->local_namespaces)
+  { register const struct Namespace *ns1;
+    register struct Namespace *ns2;
+    register size_t n = 1;
+    for (ns1 = soap->namespaces; ns1->id; ns1++)
+      n++;
+    n *= sizeof(struct Namespace);
+    ns2 = (struct Namespace*)SOAP_MALLOC(soap, n);
+    if (ns2)
+    { memcpy(ns2, soap->namespaces, n);
+      if (ns2[0].ns)
+      { if (!strcmp(ns2[0].ns, soap_env1))
+          soap->version = 1;
+        else
+          soap->version = 2;
+      }
+      soap->local_namespaces = ns2;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+#ifndef PALM_1
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_strsearch(const char *big, const char *little)
+{ size_t n = strlen(little);
+  const char *s = big;
+  while (s) 
+  { if (!strncmp(s, little, n) && (s[n] == '\0' || s[n] == ' '))
+      return s;
+    s = strchr(s, ' ');
+    if (s)
+      s++;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_lookup_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np;
+  for (np = soap->nlist; np; np = np->next)
+  { if (!strncmp(np->id, tag, n) && !np->id[n])
+      return np;
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized)
+{ register struct soap_nlist *np;
+  size_t n, k;
+  if (soap_strsearch(soap->c14nexclude, id))
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns?ns:""));
+  if (!utilized)
+  { for (np = soap->nlist; np; np = np->next)
+    { if (!strcmp(np->id, id) && (!np->ns || !strcmp(np->ns, ns)))
+        break;
+    }
+    if (np)
+    { if (np->index == 1)
+        utilized = np->index;
+      else
+        return NULL;
+    }
+  }
+  n = strlen(id);
+  if (ns)
+    k = strlen(ns);
+  else
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k + 1);
+  if (!np)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  np->next = soap->nlist;
+  soap->nlist = np;
+  strcpy(np->id, id);
+  if (ns)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+  }
+  else
+    np->ns = NULL;
+  np->level = soap->level;
+  np->index = utilized;
+  return np;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_utilize_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np = soap_lookup_ns(soap, tag, n);
+  if (np)
+  { if (np->index == 0)
+      soap_push_ns(soap, np->id, np->ns, 1);
+  }
+  else
+  { strncpy(soap->tmpbuf, tag, n);
+    soap->tmpbuf[n] = '\0';
+    soap_push_ns(soap, soap->tmpbuf, NULL, 1);
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_pop_ns(struct soap *soap)
+{ soap_pop_namespace(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element(struct soap *soap, const char *tag, int id, const char *type)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element begin tag='%s' id='%d' type='%s'\n", tag, id, type?type:""));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->soap = soap;
+    elt->next = NULL;
+    elt->prnt = soap->dom;
+    elt->name = soap_strdup(soap, tag);
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->nstr = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->node = NULL;
+    elt->type = 0;
+    elt->head = NULL;
+    elt->tail = NULL;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+  }
+  else
+  {
+#endif
+    soap->level++;
+#ifndef WITH_LEAN
+    if (!soap->ns)
+    { if (!(soap->mode & SOAP_XML_CANONICAL)
+       && soap_send(soap, soap->prolog ? soap->prolog : "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"))
+        return soap->error;
+    }
+    else if (soap->mode & SOAP_XML_INDENT)
+    { if (soap->ns == 1 && soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+      soap->body = 1;
+    }
+#endif
+    if (soap_send_raw(soap, "<", 1)
+     || soap_send(soap, tag))
+      return soap->error;
+#ifdef WITH_DOM
+  }
+#endif
+  if (!soap->ns)
+  { struct Namespace *ns;
+    for (ns = soap->local_namespaces; ns && ns->id; ns++)
+    { if (*ns->id && (ns->out || ns->ns))
+      { sprintf(soap->tmpbuf, "xmlns:%s", ns->id);
+        if (soap_attribute(soap, soap->tmpbuf, ns->out ? ns->out : ns->ns))
+          return soap->error;
+      }
+    }   
+  }
+  soap->ns = 1; /* start with 0 or 2, but should be one to continue */
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { const char *s = strchr(tag, ':');
+    if (s)
+      soap_utilize_ns(soap, tag, s - tag);
+  }
+#endif
+  if (id > 0)
+  { sprintf(soap->tmpbuf, "_%d", id);
+    if (soap_attribute(soap, "id", soap->tmpbuf))
+      return soap->error;
+  }
+  if (type && *type)
+  { if (soap_attribute(soap, "xsi:type", type))
+      return soap->error;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { const char *s = strchr(type, ':');
+      if (s)
+        soap_utilize_ns(soap, type, s - type);
+    }
+#endif
+  }
+  if (soap->null && soap->position > 0)
+  { int i;
+    sprintf(soap->tmpbuf, "[%d", soap->positions[0]);
+    for (i = 1; i < soap->position; i++)
+      sprintf(soap->tmpbuf + strlen(soap->tmpbuf), ",%d", soap->positions[i]);
+    strcat(soap->tmpbuf, "]");
+    if (soap_attribute(soap, "SOAP-ENC:position", soap->tmpbuf))
+      return soap->error;
+  }
+  if (soap->mustUnderstand)
+  { if (soap->actor && *soap->actor)
+    { if (soap_attribute(soap, soap->version == 2 ? "SOAP-ENV:role" : "SOAP-ENV:actor", soap->actor))
+        return soap->error;
+    }
+    if (soap_attribute(soap, "SOAP-ENV:mustUnderstand", soap->version == 2 ? "true" : "1"))
+      return soap->error;
+    soap->mustUnderstand = 0;
+  }
+  if (soap->encoding)
+  { if (soap->encodingStyle && soap->local_namespaces)
+    { if (!*soap->encodingStyle)
+      { if (soap->local_namespaces[1].out)
+          soap->encodingStyle = soap->local_namespaces[1].out;
+        else
+          soap->encodingStyle = soap->local_namespaces[1].ns;
+      }
+      if (soap_attribute(soap, "SOAP-ENV:encodingStyle", soap->encodingStyle))
+        return soap->error;
+    }
+    soap->encoding = 0;
+  }
+  soap->null = 0;
+  soap->position = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_out(struct soap *soap, const char *tag, int id, const char *type)
+{ if (*tag == '-')
+    return SOAP_OK;
+  if (soap_element(soap, tag, id, type))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRRCHR
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_strrchr(const char *s, int t)
+{ register char *r = NULL;
+  while (*s)
+    if (*s++ == t)
+      r = (char*)s - 1;
+  return r;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOL
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_strtol(const char *s, char **t, int b)
+{ register long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { short neg = 0;
+    if (*s == '-')
+    { s++;
+      neg = 1;
+    }
+    else if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 214748364 && (n > 214748364 || c >= '8'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+    if (neg)
+      n = -n;
+  }
+  else /* b == 16 and value is always positive */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x07FFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOUL
+SOAP_FMAC1
+unsigned long
+SOAP_FMAC2
+soap_strtoul(const char *s, char **t, int b)
+{ unsigned long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 429496729 && (n > 429496729 || c >= '6'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+  }
+  else /* b == 16 */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x0FFFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_begin_out(struct soap *soap, const char *tag, int id, const char *type, const char *offset)
+{ if (soap_element(soap, tag, id, "SOAP-ENC:Array"))
+    return soap->error;
+  if (soap->version == 2)
+  { const char *s;
+    s = soap_strrchr(type, '[');
+    if ((size_t)(s - type) < sizeof(soap->tmpbuf))
+    { strncpy(soap->tmpbuf, type, s - type);
+      soap->tmpbuf[s - type] = '\0';
+      if (type && *type && (soap_attribute(soap, "SOAP-ENC:itemType", soap->tmpbuf)))
+        return soap->error;
+      if (s && (soap_attribute(soap, "SOAP-ENC:arraySize", s + 1)))
+        return soap->error;
+    }
+  }
+  else
+  { if (offset && (soap_attribute(soap, "SOAP-ENC:offset", offset)))
+      return soap->error;
+    if (type && *type && (soap_attribute(soap, "SOAP-ENC:arrayType", type)))
+      return soap->error;
+  }
+#ifndef WITH_LEAN
+  if (type && *type && (soap->mode & SOAP_XML_CANONICAL))
+  { const char *s = strchr(type, ':');
+    if (s)
+      soap_utilize_ns(soap, type, s - type);
+  }
+#endif
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_start_end_out(struct soap *soap, const char *tag)
+{ register struct soap_attribute *tp;
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att;
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { att = &soap->dom->atts;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible)
+      { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+	if (!*att)
+	  return soap->error = SOAP_EOM;
+	(*att)->next = NULL;
+        (*att)->nstr = NULL;
+        (*att)->name = soap_strdup(soap, tp->name);
+        (*att)->data = soap_strdup(soap, tp->value);
+        (*att)->wide = NULL;
+        (*att)->soap = soap;
+        tp->visible = 0;
+      }
+    }
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { struct soap_nlist *np;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible && tp->name)
+      { const char *s = strchr(tp->name, ':');
+        if (s)
+          soap_utilize_ns(soap, tp->name, s - tp->name);
+      }
+    }
+    for (np = soap->nlist; np; np = np->next)
+    { if (np->index == 1 && np->ns)
+      { sprintf(soap->tmpbuf, "xmlns:%s", np->id);
+        soap_set_attr(soap, soap->tmpbuf, np->ns);
+        np->index = 2;
+      }
+    }
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible)
+    { if (soap_send(soap, " ") || soap_send(soap, tp->name))
+        return soap->error;
+      if (tp->visible == 2 && tp->value)
+        if (soap_send_raw(soap, "=\"", 2)
+	 || soap_string_out(soap, tp->value, 1)
+	 || soap_send_raw(soap, "\"", 1))
+          return soap->error;
+      tp->visible = 0;
+    }
+  }
+  if (tag)
+  { 
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { if (soap_send_raw(soap, ">", 1)
+       || soap_element_end_out(soap, tag))
+        return soap->error;
+    }
+    else
+#endif
+    soap->level--;	/* decrement level just before /> */
+    if (soap_send_raw(soap, "/>", 2))
+      return soap->error;
+    return SOAP_OK;
+  }
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_out(struct soap *soap, const char *tag)
+{ if (*tag == '-')
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element ending tag='%s'\n", tag));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+    soap_pop_ns(soap);
+  if (soap->mode & SOAP_XML_INDENT)
+  { if (!soap->body)
+    { if (soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+    }
+    soap->body = 0;
+  }
+#endif
+  if (soap_send_raw(soap, "</", 2)
+   || soap_send(soap, tag))
+    return soap->error;
+  soap->level--;	/* decrement level just before > */
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_ref(struct soap *soap, const char *tag, int id, int href)
+{ register int n = 0;
+  if (soap->version == 2)
+    n = 1;
+  sprintf(soap->href, "#_%d", href);
+  return soap_element_href(soap, tag, id, "href" + n, soap->href + n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_href(struct soap *soap, const char *tag, int id, const char *ref, const char *val)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element '%s' reference %s='%s'\n", tag, ref, val));
+  if (soap_element(soap, tag, id, NULL)
+   || soap_attribute(soap, ref, val)
+   || soap_element_start_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_null(struct soap *soap, const char *tag, int id, const char *type)
+{ struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (tp->visible)
+      break;
+  if (tp || (soap->version == 2 && soap->position > 0) || id > 0 || (soap->mode & SOAP_XML_NIL))
+  { if (soap_element(soap, tag, id, type))
+      return soap->error;
+    if (soap->part != SOAP_IN_HEADER && soap->encodingStyle)
+      if (soap_attribute(soap, "xsi:nil", "true"))
+        return soap->error;
+    return soap_element_start_end_out(soap, tag);
+  }
+  soap->null = 1;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_id(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, int n, const char *type, int t) 
+{ if (!p || (a && !a->__ptr))
+  { soap_element_null(soap, tag, id, type);
+    return -1;
+  }
+#ifndef WITH_NOIDREF
+  if (soap->mode & SOAP_XML_TREE)
+    return 0;
+  if (id < 0)
+  { struct soap_plist *pp;
+    if (a)
+      id = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+    else
+      id = soap_pointer_lookup(soap, p, t, &pp);
+    if (id)
+    { if (soap_is_embedded(soap, pp))
+      { soap_element_ref(soap, tag, 0, id);
+        return -1;
+      }
+      if (soap_is_single(soap, pp))
+        return 0;
+      soap_set_embedded(soap, pp);
+    }
+  }
+  return id;
+#else
+  return 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_result(struct soap *soap, const char *tag)
+{ if (soap->version == 2 && soap->encodingStyle)
+    if (soap_element(soap, "SOAP-RPC:result", 0, NULL)
+     || soap_attribute(soap, "xmlns:SOAP-RPC", soap_rpc)
+     || soap_element_start_end_out(soap, NULL)
+     || soap_string_out(soap, tag, 0)
+     || soap_element_end_out(soap, "SOAP-RPC:result"))
+      return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attribute(struct soap *soap, const char *name, const char *value)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+    a->next = soap->dom->atts;
+    a->nstr = NULL;
+    a->name = soap_strdup(soap, name);
+    a->data = soap_strdup(soap, value);
+    a->wide = NULL;
+    a->soap = soap;
+    soap->dom->atts = a;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { /* TODO: consider using this code to handle default namespace
+    if (!strncmp(name, "xmlns", 5) && (name[5] == ':' || name[5] == '\0'))
+    { if (name[5] == ':')
+        soap_push_ns(soap, name + 6, value, 0);
+      else
+        soap_push_ns(soap, "", value, 0);
+    }
+    */
+    if (!strncmp(name, "xmlns:", 6))
+      soap_push_ns(soap, name + 6, value, 0);
+    else if (soap_set_attr(soap, name, value))
+      return soap->error;
+  }
+  else
+#endif
+  { if (soap_send(soap, " ") || soap_send(soap, name))
+      return soap->error;
+    if (value)
+      if (soap_send_raw(soap, "=\"", 2)
+       || soap_string_out(soap, value, 1)
+       || soap_send_raw(soap, "\"", 1))
+        return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_in(struct soap *soap, const char *tag, int nillable)
+{ if (!soap_peek_element(soap))
+  { if (soap->other)
+      return soap->error = SOAP_TAG_MISMATCH;
+    if (tag && *tag == '-')
+      return SOAP_OK;
+    if (!(soap->error = soap_match_tag(soap, soap->tag, tag)))
+    { soap->peeked = 0;
+      if (soap->body)
+        soap->level++;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"" ));
+      if (!nillable && soap->null && (soap->mode & SOAP_XML_STRICT))
+        return soap->error = SOAP_NULL;
+    }
+  }
+  else if (soap->error == SOAP_NO_TAG && tag && *tag == '-')
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_in(struct soap *soap, const char *tag)  
+{ register soap_wchar c;
+  register char *s;
+  register const char *t;
+  register int n = 0;
+  if (tag && *tag == '-')
+    return SOAP_OK;
+  soap->level--;
+  soap_pop_namespace(soap);
+#ifdef WITH_DOM
+  /* this whitespace or mixed content is not insignificant for DOM */
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!soap->peeked && !soap_string_in(soap, 3, -1, -1))
+      return soap->error;
+    if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  if (soap->peeked)
+  { if (soap->error == SOAP_NO_TAG)
+      soap->error = SOAP_OK;
+    if (*soap->tag)
+      n++;
+    soap->peeked = 0;
+  }
+  do
+  { while (((c = soap_get(soap)) != SOAP_TT))
+    { if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      if (c == SOAP_LT)
+        n++;
+      else if (c == '/')
+      { c = soap_get(soap);
+        if (c == SOAP_GT)
+	  n--;
+        else
+	  soap_unget(soap, c);
+      }
+    }
+  } while (n--);
+  s = soap->tag;
+  while (soap_notblank(c = soap_get(soap)))
+    *s++ = (char)c;
+  *s = '\0';
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  while (soap_blank(c))
+    c = soap_get(soap);
+  if (c != SOAP_GT)
+    return soap->error = SOAP_SYNTAX_ERROR;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:""));
+  if (!tag || !*tag)
+    return SOAP_OK;
+  if ((s = strchr(soap->tag, ':')))
+    s++;
+  else
+    s = soap->tag;
+  if ((t = strchr(tag, ':')))
+    t++;
+  else
+    t = tag;
+  if (!SOAP_STRCMP(s, t))
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element tag name does not match\n"));
+  return soap->error = SOAP_SYNTAX_ERROR;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_attr_value(struct soap *soap, const char *name, int flag)
+{ register struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (!soap_match_tag(soap, tp->name, name))
+      break;
+  if (tp && tp->visible == 2)
+  { if (flag == 2 && (soap->mode & SOAP_XML_STRICT))
+      soap->error = SOAP_PROHIBITED;
+    else
+      return tp->value;
+  }
+  else if (flag == 1 && (soap->mode & SOAP_XML_STRICT))
+    soap->error = SOAP_REQUIRED;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_attr(struct soap *soap, const char *name, const char *value)
+{ register struct soap_attribute *tp;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set attribute %s='%s'\n", name, value?value:""));
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (!strcmp(tp->name, name))
+      break;
+  }
+  if (!tp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute %s\n", name));
+    if (!(tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(name))))
+      return soap->error = SOAP_EOM;
+    tp->ns = NULL;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { struct soap_attribute **tpp = &soap->attributes;
+      const char *s = strchr(name, ':');
+      if (!strncmp(name, "xmlns", 5))
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) || strcmp((*tpp)->name + 5, name + 5) > 0)
+            break;
+      }
+      else if (!s)
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) && ((*tpp)->ns || strcmp((*tpp)->name, name) > 0))
+            break;
+      }
+      else
+      { int k;
+        for (; *tpp; tpp = &(*tpp)->next)
+	{ if (!strncmp((*tpp)->name, "xmlns:", 6) && !strncmp((*tpp)->name + 6, name, s - name) && !(*tpp)->name[6 + s - name])
+	  { if (!tp->ns)
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Canonicalization: prefix %s=%p(%s)\n", name, (*tpp)->ns, (*tpp)->ns));
+	      tp->ns = (*tpp)->ns;
+	    }
+	  }
+          else if (strncmp((*tpp)->name, "xmlns", 5) && (*tpp)->ns && tp->ns && ((k = strcmp((*tpp)->ns, tp->ns)) > 0 || (!k && strcmp((*tpp)->name, name) > 0)))
+            break;
+        }
+      }
+      tp->next = *tpp;
+      *tpp = tp;
+    }
+    else
+#endif
+    { tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    strcpy(tp->name, name);
+    tp->value = NULL;
+  }
+  else if (tp->visible)
+  { return SOAP_OK;
+  }
+  else if (value && tp->value && tp->size <= strlen(value))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute value of %s (free %p)\n", name, tp->value));
+    SOAP_FREE(soap, tp->value);
+    tp->value = NULL;
+    tp->ns = NULL;
+  }
+  if (value)
+  { if (!tp->value)
+    { tp->size = strlen(value) + 1;
+      if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+        return soap->error = SOAP_EOM;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute value of %s (%p)\n", tp->name, tp->value));
+    }
+    strcpy(tp->value, value);
+    if (!strncmp(tp->name, "xmlns:", 6))
+      tp->ns = tp->value;
+    tp->visible = 2;
+#ifndef WITH_LEAN
+    if (!strcmp(name, "wsu:Id"))
+    { soap->part = SOAP_BEGIN_SECURITY;
+      strncpy(soap->id, value, sizeof(soap->id));
+      soap->id[sizeof(soap->id)-1] = '\0';
+    }
+#endif
+  }
+  else
+    tp->visible = 1;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_attr(struct soap *soap)
+{ register struct soap_attribute *tp;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_CANONICAL))
+  { while (soap->attributes)
+    { tp = soap->attributes->next;
+      SOAP_FREE(soap, soap->attributes->value);
+      SOAP_FREE(soap, soap->attributes);
+      soap->attributes = tp;
+    }
+  }
+  else
+#endif
+  { for (tp = soap->attributes; tp; tp = tp->next)
+      tp->visible = 0;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d)
+{ register size_t i;
+  for (i = 0; i < n; i++)
+  { register soap_wchar c = soap_get(soap);
+    switch (c)
+    {
+    case SOAP_TT:
+      *s++ = '<';
+      soap_unget(soap, '/');
+      break;
+    case SOAP_LT:
+      *s++ = '<';
+      break;
+    case SOAP_GT:
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '>';
+      break;
+    case SOAP_QT:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '"';
+      break;
+    case SOAP_AP:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '\'';
+      break;
+    case '\t':
+    case '\n':
+    case '\r':
+    case ' ':
+    case '/':
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+    default:
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+  }
+  return soap->error = SOAP_EOM;
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_store_lab(struct soap *soap, const char *s, size_t n)
+{ soap->labidx = 0;
+  return soap_append_lab(soap, s, n);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_append_lab(struct soap *soap, const char *s, size_t n)
+{ if (soap->labidx + n >= soap->lablen)
+  { register char *t = soap->labbuf;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enlarging look-aside buffer to append data, old size=%lu", (unsigned long)soap->lablen));
+    if (soap->lablen == 0)
+      soap->lablen = SOAP_LABLEN;
+    while (soap->labidx + n >= soap->lablen)
+      soap->lablen <<= 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, ", new size=%lu\n", (unsigned long)soap->lablen));
+    soap->labbuf = (char*)SOAP_MALLOC(soap, soap->lablen);
+    if (!soap->labbuf)
+    { if (t)
+        SOAP_FREE(soap, t);
+      return soap->error = SOAP_EOM;
+    }
+    if (t)
+    { memcpy(soap->labbuf, t, soap->labidx);
+      SOAP_FREE(soap, t);
+    }
+  }
+  if (s)
+  { memcpy(soap->labbuf + soap->labidx, s, n);
+    soap->labidx += n;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_peek_element(struct soap *soap)
+{
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att = NULL;
+  register char *lead = NULL;
+#endif
+  register struct soap_attribute *tp;
+  const char *t;
+  register char *s;
+  register soap_wchar c;
+  register int i;
+  if (soap->peeked)
+  { if (!*soap->tag)
+      return soap->error = SOAP_NO_TAG;
+    return SOAP_OK;
+  }
+  soap->peeked = 1;
+  c = soap_getutf8(soap);
+#ifdef WITH_DOM
+  /* whitespace leading to start tag is not insignificant for DOM */
+  if (soap_blank(c))
+  { soap->labidx = 0;
+    do
+    { if (soap_append_lab(soap, NULL, 0))
+        return SOAP_EOM;
+      s = soap->labbuf + soap->labidx;
+      i = soap->lablen - soap->labidx;
+      soap->labidx = soap->lablen;
+      while (soap_blank(c) && i--)
+      { *s++ = c;
+        c = soap_getutf8(soap);
+      }
+    }
+    while (soap_blank(c));
+    *s = '\0';
+    lead = soap_strdup(soap, soap->labbuf);
+  }
+#else
+  while (soap_blank(c))
+    c = soap_getutf8(soap);
+#endif
+  if (c != SOAP_LT)
+  { *soap->tag = '\0';
+    if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, c);
+#ifdef WITH_DOM
+    /* whitespace leading to end tag is not insignificant for DOM */
+    if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+      soap->dom->tail = soap_strdup(soap, lead);
+#endif
+    return soap->error = SOAP_NO_TAG;
+  }
+  s = soap->tag;
+  do c = soap_get1(soap);
+  while (soap_blank(c));
+  i = sizeof(soap->tag);
+  while (c != '>' && c != '/' && soap_notblank(c))
+  { if (--i > 0)
+      *s++ = (char)c;
+    c = soap_get1(soap);
+  }
+  while (soap_blank(c))
+    c = soap_get1(soap);
+  *s = '\0';
+  soap->id[0] = '\0';
+  soap->href[0] = '\0';
+  soap->type[0] = '\0';
+  soap->arrayType[0] = '\0';
+  soap->arraySize[0] = '\0';
+  soap->arrayOffset[0] = '\0';
+  soap->other = 0;
+  soap->root = -1;
+  soap->position = 0;
+  soap->null = 0;
+  soap->mustUnderstand = 0;
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt;
+    elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->next = NULL;
+    elt->nstr = NULL;
+    elt->name = soap_strdup(soap, soap->tag);
+    elt->prnt = soap->dom;
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->type = 0;
+    elt->node = NULL;
+    elt->head = lead;
+    elt->tail = NULL;
+    elt->soap = soap;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+    att = &elt->atts;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+    tp->visible = 0;
+  while ((int)c != EOF && c != '>' && c != '/')
+  { s = soap->tmpbuf;
+    i = sizeof(soap->tmpbuf);
+    while (c != '=' && c != '>' && c != '/' && soap_notblank(c))
+    { if (--i > 0)
+        *s++ = (char)c;
+      c = soap_get1(soap);
+    }
+    *s = '\0';
+    if (i == sizeof(soap->tmpbuf))
+      return soap->error = SOAP_SYNTAX_ERROR;
+#ifdef WITH_DOM
+    /* add attribute name to dom */
+    if (att)
+    { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+       if (!*att)
+         return soap->error = SOAP_EOM;
+       (*att)->next = NULL;
+       (*att)->nstr = NULL;
+       (*att)->name = soap_strdup(soap, soap->tmpbuf);
+       (*att)->data = NULL;
+       (*att)->wide = NULL;
+       (*att)->soap = soap;
+    }
+#endif
+    if (!strncmp(soap->tmpbuf, "xmlns", 5))
+    { if (soap->tmpbuf[5] == ':')
+      { soap->tmpbuf[5] = '\0';
+        t = soap->tmpbuf + 6;
+      }
+      else if (soap->tmpbuf[5])
+        t = NULL;
+      else
+        t = SOAP_STR_EOS;
+    }
+    else
+      t = NULL;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (!SOAP_STRCMP(tp->name, soap->tmpbuf))
+        break;
+    }
+    if (!tp)
+    { tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(soap->tmpbuf));
+      if (!tp)
+        return soap->error = SOAP_EOM;
+      strcpy(tp->name, soap->tmpbuf);
+      tp->value = NULL;
+      tp->size = 0;
+      tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    while (soap_blank(c))
+      c = soap_get1(soap);
+    if (c == '=')
+    { do c = soap_getutf8(soap);
+      while (soap_blank(c));
+      if (c != SOAP_QT && c != SOAP_AP)
+      { soap_unget(soap, c);
+        c = ' '; /* blank delimiter */
+      }
+      if (soap_getattrval(soap, tp->value, tp->size, c))
+      {
+#ifdef WITH_FAST
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+	if (soap_store_lab(soap, tp->value, tp->size))
+	  return soap->error;
+	if (tp->value)
+	  SOAP_FREE(soap, tp->value);
+	for (;;)
+	{ if (soap_getattrval(soap, soap->labbuf + soap->labidx, soap->lablen - soap->labidx, c))
+	  { if (soap->error != SOAP_EOM)
+	      return soap->error;
+            soap->error = SOAP_OK;
+	    soap->labidx = soap->lablen;
+	    if (soap_append_lab(soap, NULL, 0))
+	      return soap->error;
+	  }
+	  else
+	    break;
+	}
+	if (soap->labidx)
+          tp->size = soap->lablen;
+	else
+	{ tp->size = strlen(soap->labbuf) + 1;
+          if (tp->size < SOAP_LABLEN)
+	    tp->size = SOAP_LABLEN;
+        }
+	if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+	  return soap->error = SOAP_EOM;
+        strcpy(tp->value, soap->labbuf);
+#else
+	size_t n;
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+        if (soap_new_block(soap))
+          return soap->error;
+        for (;;)
+        { if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+            return soap->error;
+          if (soap_getattrval(soap, s, SOAP_BLKLEN, c))
+          { if (soap->error != SOAP_EOM)
+              return soap->error;
+            soap->error = SOAP_OK;
+          }
+          else
+            break;
+        }
+	n = tp->size + soap->blist->size;
+        if (!(s = (char*)SOAP_MALLOC(soap, n)))
+          return soap->error = SOAP_EOM;
+        if (tp->value)
+        { memcpy(s, tp->value, tp->size);
+          SOAP_FREE(soap, tp->value);
+        }
+        soap_save_block(soap, s + tp->size, 0);
+        tp->value = s;
+        tp->size = n;
+#endif
+      }
+      do c = soap_get1(soap);
+      while (soap_blank(c));
+      tp->visible = 2; /* seen this attribute w/ value */
+#ifdef WITH_DOM
+      if (att)
+        (*att)->data = soap_strdup(soap, tp->value);
+#endif
+    }
+    else
+      tp->visible = 1; /* seen this attribute w/o value */
+#ifdef WITH_DOM
+    if (att)
+      att = &(*att)->next;
+#endif
+    if (t && tp->value)
+    { if (soap_push_namespace(soap, t, tp->value))
+        return soap->error;
+      tp->visible = 0;
+    }
+  }
+#ifdef WITH_DOM
+  if (att)
+  { soap->dom->nstr = soap_current_namespace(soap, soap->tag);
+    for (att = &soap->dom->atts; *att; att = &(*att)->next)
+      (*att)->nstr = soap_current_namespace(soap, (*att)->name);
+  }
+#endif
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  if (!(soap->body = (c != '/')))
+    do c = soap_get1(soap);
+    while (soap_blank(c));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { if (!soap->body && soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible && tp->value)
+    { if (!strcmp(tp->name, "id"))
+      { *soap->id = '#';
+        strncpy(soap->id + 1, tp->value, sizeof(soap->id) - 2);
+        soap->id[sizeof(soap->id)-1] = '\0';
+      }
+      else if (!strcmp(tp->name, "href"))
+      { strncpy(soap->href, tp->value, sizeof(soap->href) - 1);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if ((soap->version == 2 || (soap->mode & SOAP_XML_GRAPH)) && !strcmp(tp->name, "ref"))
+      { *soap->href = '#';
+        strncpy(soap->href + 1, tp->value, sizeof(soap->href) - 2);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if (!soap_match_tag(soap, tp->name, "xsi:type"))
+      { strncpy(soap->type, tp->value, sizeof(soap->type) - 1);
+        soap->type[sizeof(soap->type)-1] = '\0';
+      }
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arrayType"))
+      { s = soap_strrchr(tp->value, '[');
+        if (s && (size_t)(s - tp->value) < sizeof(soap->arrayType))
+        { strncpy(soap->arrayType, tp->value, s - tp->value);
+          soap->arrayType[s - tp->value] = '\0';
+          strncpy(soap->arraySize, s, sizeof(soap->arraySize) - 1);
+        }
+        else
+          strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+        soap->arraySize[sizeof(soap->arrayType)-1] = '\0';
+        soap->arrayType[sizeof(soap->arrayType)-1] = '\0';
+      }
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:itemType"))
+        strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arraySize"))
+        strncpy(soap->arraySize, tp->value, sizeof(soap->arraySize) - 1);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:offset"))
+        strncpy(soap->arrayOffset, tp->value, sizeof(soap->arrayOffset));
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:position"))
+        soap->position = soap_getposition(tp->value, soap->positions);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:root"))
+        soap->root = ((!strcmp(tp->value, "1") || !strcmp(tp->value, "true")));
+      else if ((soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENV:actor"))
+            || (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENV:role")))
+      { if ((!soap->actor || strcmp(soap->actor, tp->value))
+         && strcmp(tp->value, "http://schemas.xmlsoap.org/soap/actor/next")
+         && strcmp(tp->value, "http://www.w3.org/2003/05/soap-envelope/role/next"))
+          soap->other = 1;
+      }
+      else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:mustUnderstand")
+            && (!strcmp(tp->value, "1") || !strcmp(tp->value, "true")))
+        soap->mustUnderstand = 1;
+      else if ((!soap_match_tag(soap, tp->name, "xsi:null")
+             || !soap_match_tag(soap, tp->name, "xsi:nil"))
+            && (!strcmp(tp->value, "1")
+             || !strcmp(tp->value, "true")))
+        soap->null = 1;
+    }
+  }
+  return soap->error = SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_retry(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_revert(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_revert(struct soap *soap)
+{ if (!soap->peeked)
+  { soap->peeked = 1;
+    if (soap->body)
+      soap->level--;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reverting last element (level=%u)\n", soap->level));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_string_out(struct soap *soap, const char *s, int flag)
+{ register const char *t;
+  register soap_wchar c;
+  register soap_wchar mask = 0xFFFFFF80UL;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_strdup(soap, s);
+    return SOAP_OK;
+  }
+#endif
+  if (soap->mode & SOAP_C_UTFSTRING)
+    mask = 0;
+  t = s;
+  while ((c = *t++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#x9;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xA;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 13:
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xD;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '&':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&amp;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '<':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&lt;", 4))
+        return soap->error;
+      s = t;
+      break;
+    case '>':
+      if (!flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&gt;", 4))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case '"':
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&quot;", 6))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    default:
+#ifndef WITH_LEANER
+#ifdef HAVE_MBTOWC
+      if (soap->mode & SOAP_C_MBSTRING)
+      { wchar_t wc;
+        register int m = mbtowc(&wc, t - 1, MB_CUR_MAX);
+        if (m > 0 && wc != c)
+        { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, wc))
+            return soap->error;
+	  s = t += m - 1;
+	  continue;
+        }
+      }
+#endif
+#endif
+      if (c & mask)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, (unsigned char)c))
+          return soap->error;
+        s = t;
+      }
+    }
+  }
+  return soap_send_raw(soap, s, t - s - 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_string_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ register char *s;
+  char *t = NULL;
+  register size_t i;
+  register long l = 0;
+  register int n = 0;
+  register int m = 0;
+  register soap_wchar c;
+#if !defined(WITH_LEANER) && defined(HAVE_WCTOMB)
+  char buf[MB_LEN_MAX > 8 ? MB_LEN_MAX : 8];
+#else
+  char buf[8];
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+#ifndef WITH_LEAN
+      t = soap->tmpbuf;
+      t[0] = '<';
+      strncpy(t + 1, soap->tag, sizeof(soap->tmpbuf) - 1);
+      strncat(t, ">", sizeof(soap->tmpbuf));
+      m = strlen(soap->tag) + 2;
+#endif
+    }
+  }
+#ifdef WITH_CDATA
+  if (!flag)
+  { register int state = 0;
+#ifdef WITH_FAST
+    soap->labidx = 0;			/* use look-aside buffer */
+#else
+    if (soap_new_block(soap))
+      return NULL;
+#endif
+    for (;;)
+    { 
+#ifdef WITH_FAST
+      register size_t k;
+      if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+        return NULL;
+      s = soap->labbuf + soap->labidx;	/* space to populate */
+      k = soap->lablen - soap->labidx;	/* number of bytes available */
+      soap->labidx = soap->lablen;	/* claim this space */
+#else
+      register size_t k = SOAP_BLKLEN;
+      if (!(s = (char*)soap_push_block(soap, k)))
+        return NULL;
+#endif
+      for (i = 0; i < k; i++)
+      { if (m > 0)
+        { *s++ = *t++;	/* copy multibyte characters */
+	  m--;
+          continue;
+        }
+        c = soap_getchar(soap);
+	if ((int)c == EOF)
+          goto end;
+        if (c >= 0x80 && !(soap->mode & SOAP_ENC_LATIN))
+        { soap_unget(soap, c);
+	  c = soap_getutf8(soap);
+	  if (soap->mode & SOAP_C_UTFSTRING)
+          { if ((c & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+            { c &= 0x7FFFFFFF;
+              t = buf;
+              if (c < 0x0800)
+                *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+              else
+              { if (c < 0x010000)
+                  *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+                else
+                { if (c < 0x200000)
+                    *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+                  else
+                  { if (c < 0x04000000)
+                      *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                    else
+                    { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                      *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                    }
+                    *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+                  }     
+                  *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+              }
+              *t++ = (char)(0x80 | (c & 0x3F));
+	      m = (int)(t - buf) - 1;
+              t = buf;
+              *s++ = *t++;
+              continue;
+	    }
+          }
+        }
+	switch (state)
+        { case 1:
+            if (c == ']')
+	      state = 4;
+	    *s++ = c;
+	    continue;
+	  case 2:
+	    if (c == '-')
+              state = 6;
+	    *s++ = c;
+	    continue;
+	  case 3:
+	    if (c == '?')
+	      state = 8;
+	    *s++ = c;
+	    continue;
+          /* CDATA */
+	  case 4:
+	    if (c == ']')
+              state = 5;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+	  case 5:
+	    if (c == '>')
+	      state = 0;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+          /* comment */
+          case 6:
+            if (c == '-')
+	      state = 7;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          case 7:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          /* PI */
+	  case 8:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 3;
+	    *s++ = c;
+	    continue;
+        }
+        switch (c)
+        {
+        case '/':
+          if (n > 0)
+          { c = soap_getchar(soap);
+            if (c == '>')
+              n--;
+            soap_unget(soap, c);
+          }
+          *s++ = '/';
+          break;
+        case '<':
+	  c = soap_getchar(soap);
+	  if (c == '/')
+	  { if (n == 0)
+	    { c = SOAP_TT;
+	      goto end;
+	    }
+	    n--;
+	  }
+	  else if (c == '!')
+	  { c = soap_getchar(soap);
+	    if (c == '[')
+            { do c = soap_getchar(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                 goto end;
+	      t = (char*)"![CDATA[";
+	      m = 8;
+	      state = 1;
+	    }
+            else if (c == '-')
+	    { if ((c = soap_getchar(soap)) == '-')
+	        state = 2;
+	      t = (char*)"!-";
+	      m = 2;
+	      soap_unget(soap, c);
+	    }
+	    else
+	    { t = (char*)"!";
+	      m = 1;
+	      soap_unget(soap, c);
+	    }
+	    *s++ = '<';
+	    break;
+	  }
+	  else if (c == '?')
+	    state = 3;
+	  else
+	    n++;
+          soap_unget(soap, c);
+          *s++ = '<';
+          break;
+        case '>':
+          *s++ = '>';
+          break;
+        case '"':
+          *s++ = '"';
+          break;
+        default:
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+          if (soap->mode & SOAP_C_MBSTRING)
+          { m = wctomb(buf, c & 0x7FFFFFFF);
+            if (m >= 1 && m <= (int)MB_CUR_MAX)
+            { t = buf;
+              *s++ = *t++;
+              m--;
+            }
+            else
+            { *s++ = SOAP_UNKNOWN_CHAR;
+	      m = 0;
+	    }
+          }
+          else
+#endif
+#endif
+            *s++ = (char)(c & 0xFF);
+        }
+	l++;
+        if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+        { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+          soap->error = SOAP_LENGTH;
+          return NULL;
+        }
+      }
+    }
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;			/* use look-aside buffer */
+#else
+  if (soap_new_block(soap))
+    return NULL;
+#endif
+  for (;;)
+  { 
+#ifdef WITH_FAST
+    register size_t k;
+    if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+      return NULL;
+    s = soap->labbuf + soap->labidx;	/* space to populate */
+    k = soap->lablen - soap->labidx;	/* number of bytes available */
+    soap->labidx = soap->lablen;	/* claim this space */
+#else
+    register size_t k = SOAP_BLKLEN;
+    if (!(s = (char*)soap_push_block(soap, k)))
+      return NULL;
+#endif
+    for (i = 0; i < k; i++)
+    { if (m > 0)
+      { *s++ = *t++;	/* copy multibyte characters */
+        m--;
+        continue;
+      }
+      if (soap->mode & SOAP_C_UTFSTRING)
+      { if (((c = soap_get(soap)) & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+        { c &= 0x7FFFFFFF;
+          t = buf;
+          if (c < 0x0800)
+            *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+          else
+          { if (c < 0x010000)
+              *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+            else
+            { if (c < 0x200000)
+                *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+              else
+              { if (c < 0x04000000)
+                  *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                else
+                { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                  *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+              }     
+              *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+            }
+            *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+          }
+          *t++ = (char)(0x80 | (c & 0x3F));
+	  m = (int)(t - buf) - 1;
+          t = buf;
+          *s++ = *t++;
+          continue;
+        }
+      }
+      else
+        c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        t = (char*)"/";
+	m = 1;
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_get(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<' | 0x80000000:
+        if (flag)
+          *s++ = '<';
+        else
+        { *s++ = '&';
+          t = (char*)"lt;";
+	  m = 3;
+        }
+        break;
+      case '>' | 0x80000000:
+        if (flag)
+          *s++ = '>';
+        else
+        { *s++ = '&';
+          t = (char*)"gt;";
+	  m = 3;
+        }
+        break;
+      case '&' | 0x80000000:
+        if (flag)
+          *s++ = '&';
+        else
+        { *s++ = '&';
+          t = (char*)"amp;";
+	  m = 4;
+        }
+        break;
+      case '"' | 0x80000000:
+        if (flag)
+          *s++ = '"';
+        else
+        { *s++ = '&';
+          t = (char*)"quot;";
+	  m = 5;
+        }
+        break;
+      case '\'' | 0x80000000:
+        if (flag)
+          *s++ = '\'';
+        else
+        { *s++ = '&';
+          t = (char*)"apos;";
+	  m = 5;
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+        if (soap->mode & SOAP_C_MBSTRING)
+        { m = wctomb(buf, c & 0x7FFFFFFF);
+          if (m >= 1 && m <= (int)MB_CUR_MAX)
+          { t = buf;
+            *s++ = *t++;
+            m--;
+          }
+          else
+          { *s++ = SOAP_UNKNOWN_CHAR;
+	    m = 0;
+	  }
+        }
+        else
+#endif
+#endif
+          *s++ = (char)(c & 0xFF);
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+#ifdef WITH_FAST
+  t = soap_strdup(soap, soap->labbuf);
+#else
+  soap_size_block(soap, i+1);
+  t = soap_save_block(soap, NULL, 0);
+#endif
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (flag == 3)
+      soap->dom->tail = t;
+    else
+      soap->dom->data = t;
+  }
+#endif
+  if (flag == 2)
+    if (soap_s2QName(soap, t, &t))
+      return NULL;
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_wstring_out(struct soap *soap, const wchar_t *s, int flag)
+{ const char *t;
+  char tmp;
+  register soap_wchar c;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { wchar_t *r = (wchar_t*)s;
+    int n = 1;
+    while (*r++)
+      n++;
+    soap->dom->wide = r = (wchar_t*)soap_malloc(soap, n * sizeof(wchar_t));
+    while (n--)
+      *r++ = *s++;
+    return SOAP_OK;
+  }
+#endif
+  while ((c = *s++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+        t = "&#x9;";
+      else
+        t = "\t";
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+        t = "&#xA;";
+      else
+        t = "\n";
+      break;
+    case 13:
+      t = "&#xD;";
+      break;
+    case '&':
+      t = "&amp;";
+      break;
+    case '<':
+      t = "&lt;";
+      break;
+    case '>':
+      if (flag)
+        t = ">";
+      else
+	t = "&gt;";
+      break;
+    case '"':
+      if (flag)
+        t = "&quot;";
+      else
+        t = "\"";
+      break;
+    default:
+      if (c > 0 && c < 0x80)
+      { tmp = (char)c;
+        if (soap_send_raw(soap, &tmp, 1))
+          return soap->error;
+      }
+      else if (soap_pututf8(soap, (unsigned long)c))
+        return soap->error;
+      continue;
+    }
+    if (soap_send(soap, t))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t *
+SOAP_FMAC2
+soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ wchar_t *s;
+  register int i, n = 0;
+  register long l = 0;
+  register soap_wchar c;
+  const char *t = NULL;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading wide string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+    }
+  }
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { if (!(s = (wchar_t*)soap_push_block(soap, sizeof(wchar_t)*SOAP_BLKLEN)))
+      return NULL;
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { if (t)
+      { *s++ = (wchar_t)*t++;
+        if (!*t)
+          t = NULL;
+        continue;
+      }
+      c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        soap_unget(soap, '/');
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_getutf8(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<':
+        if (flag)
+          *s++ = (soap_wchar)'<';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "lt;";
+        }
+        break;
+      case '>':
+        if (flag)
+          *s++ = (soap_wchar)'>';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "gt;";
+        }
+        break;
+      case '"':
+        if (flag)
+          *s++ = (soap_wchar)'"';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "quot;";
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+        *s++ = (wchar_t)c & 0x7FFFFFFF;
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+  soap_size_block(soap, sizeof(wchar_t) * (i + 1));
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+  s = (wchar_t*)soap_save_block(soap, NULL, 0);
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->wide = s;
+#endif
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_int2s(struct soap *soap, int n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outint(struct soap *soap, const char *tag, int id, const int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2int(struct soap *soap, const char *s, int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (int)soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int *
+SOAP_FMAC2
+soap_inint(struct soap *soap, const char *tag, int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (int*)soap_id_enter(soap, soap->id, p, t, sizeof(int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(int), 0, NULL);
+  else if (p)
+  { if (soap_s2int(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_long2s(struct soap *soap, long n)
+{ sprintf(soap->tmpbuf, "%ld", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outlong(struct soap *soap, const char *tag, int id, const long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2long(struct soap *soap, const char *s, long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+long *
+SOAP_FMAC2
+soap_inlong(struct soap *soap, const char *tag, long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (long*)soap_id_enter(soap, soap->id, p, t, sizeof(long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(long), 0, NULL);
+  else if (p)
+  { if (soap_s2long(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_LONG642s(struct soap *soap, LONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_LONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outLONG64(struct soap *soap, const char *tag, int id, const LONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_LONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2LONG64(struct soap *soap, const char *s, LONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOLL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoll(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_LONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+LONG64 *
+SOAP_FMAC2
+soap_inLONG64(struct soap *soap, const char *tag, LONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (LONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(LONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (LONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(LONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2LONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_byte2s(struct soap *soap, char n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outbyte(struct soap *soap, const char *tag, int id, const char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2byte(struct soap *soap, const char *s, char *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -128 || n > 127)
+      soap->error = SOAP_TYPE;
+    *p = (char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_inbyte(struct soap *soap, const char *tag, char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (char*)soap_id_enter(soap, soap->id, p, t, sizeof(char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(char), 0, NULL);
+  else if (p)
+  { if (soap_s2byte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_short2s(struct soap *soap, short n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outshort(struct soap *soap, const char *tag, int id, const short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2short(struct soap *soap, const char *s, short *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -32768 || n > 32767)
+      soap->error = SOAP_TYPE;
+    *p = (short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+short *
+SOAP_FMAC2
+soap_inshort(struct soap *soap, const char *tag, short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (short*)soap_id_enter(soap, soap->id, p, t, sizeof(short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(short), 0, NULL);
+  else if (p)
+  { if (soap_s2short(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_float2s(struct soap *soap, float n)
+{ const char *s;
+  if (soap_isnan((double)n))
+    s = "NaN";
+  else if (soap_ispinff(n))
+    s = "INF";
+  else if (soap_isninff(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->float_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outfloat(struct soap *soap, const char *tag, int id, const float *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_float2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2float(struct soap *soap, const char *s, float *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = FLT_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = FLT_NAN;
+    else
+    {
+/* On some systems, strtof appears to be broken or doesn't link: use with caution */
+#if defined(HAVE_STRTOF)
+      char *r;
+      *p = strtof((char*)s, &r);
+      if (*r)
+#elif defined(HAVE_STRTOD)
+      char *r;
+      *p = (float)strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%g", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static int soap_isnumeric(struct soap *soap, const char *type)
+{ if (soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":float")
+   && soap_match_tag(soap, soap->type, ":double")
+   && soap_match_tag(soap, soap->type, ":decimal")
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return SOAP_ERR;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+float *
+SOAP_FMAC2
+soap_infloat(struct soap *soap, const char *tag, float *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (float*)soap_id_enter(soap, soap->id, p, t, sizeof(float), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (float*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(float), 0, NULL);
+  else if (p)
+  { if (soap_s2float(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_double2s(struct soap *soap, double n)
+{ const char *s;
+  if (soap_isnan(n))
+    s = "NaN";
+  else if (soap_ispinfd(n))
+    s = "INF";
+  else if (soap_isninfd(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->double_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdouble(struct soap *soap, const char *tag, int id, const double *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_double2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2double(struct soap *soap, const char *s, double *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = DBL_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = DBL_NAN;
+    else
+    {
+#ifdef HAVE_STRTOD
+      char *r;
+      *p = strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%lg", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+double *
+SOAP_FMAC2
+soap_indouble(struct soap *soap, const char *tag, double *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (double*)soap_id_enter(soap, soap->id, p, t, sizeof(double), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (double*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(double), 0, NULL);
+  else if (p)
+  { if (soap_s2double(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedByte2s(struct soap *soap, unsigned char n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedByte(struct soap *soap, const char *tag, int id, const unsigned char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedByte(struct soap *soap, const char *s, unsigned char *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 255)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned char *
+SOAP_FMAC2
+soap_inunsignedByte(struct soap *soap, const char *tag, unsigned char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned char*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned char), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedByte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedShort2s(struct soap *soap, unsigned short n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedShort(struct soap *soap, const char *tag, int id, const unsigned short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedShort(struct soap *soap, const char *s, unsigned short *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 65535)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned short *
+SOAP_FMAC2
+soap_inunsignedShort(struct soap *soap, const char *tag, unsigned short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned short*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned short), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedShort(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedInt2s(struct soap *soap, unsigned int n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedInt(struct soap *soap, const char *tag, int id, const unsigned int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedInt(struct soap *soap, const char *s, unsigned int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (unsigned int)soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned int *
+SOAP_FMAC2
+soap_inunsignedInt(struct soap *soap, const char *tag, unsigned int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned int*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned int), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedInt(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedLong2s(struct soap *soap, unsigned long n)
+{ sprintf(soap->tmpbuf, "%lu", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedLong(struct soap *soap, const char *tag, int id, const unsigned long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedLong(struct soap *soap, const char *s, unsigned long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned long *
+SOAP_FMAC2
+soap_inunsignedLong(struct soap *soap, const char *tag, unsigned long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned long*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned long), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedLong(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_ULONG642s(struct soap *soap, ULONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_ULONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outULONG64(struct soap *soap, const char *tag, int id, const ULONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_ULONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2ULONG64(struct soap *soap, const char *s, ULONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOULL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoull(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_ULONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+ULONG64 *
+SOAP_FMAC2
+soap_inULONG64(struct soap *soap, const char *tag, ULONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (ULONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(ULONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (ULONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(ULONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2ULONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2string(struct soap *soap, const char *s, char **t)
+{ *t = NULL;
+  if (s)
+  { if (!(*t = soap_strdup(soap, s)))
+      return soap->error = SOAP_EOM;
+    if (!(soap->mode & (SOAP_ENC_LATIN | SOAP_C_UTFSTRING)))
+    { /* TODO: consider truncating UTF8 to ASCII for regular XML attribute strings? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2QName(struct soap *soap, const char *s, char **t)
+{ if (s)
+  { struct soap_nlist *np;
+    const char *p;
+    if (!strncmp(s, "xml:", 4))
+    { *t = soap_strdup(soap, s);
+      return SOAP_OK;
+    }
+    np = soap->nlist;
+    p = strchr(s, ':');
+    if (p)
+    { register int n = p - s;
+      while (np && (strncmp(np->id, s, n) || np->id[n]))
+        np = np->next;
+      p++;
+    }
+    else
+    { while (np && *np->id)
+        np = np->next;
+      p = s;
+    }
+    if (np)
+    { if (np->index >= 0 && soap->local_namespaces)
+      { register const char *q = soap->local_namespaces[np->index].id;
+        if (q)
+        { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(q) + 2)))
+            sprintf(*t, "%s:%s", q, p);
+          return SOAP_OK;
+        }
+      }
+      if (np->ns)
+      { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(np->ns) + 4)))
+          sprintf(*t, "\"%s\":%s", np->ns, p);
+        return SOAP_OK;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined (index=%d, URI=%s)\n", s, np->index, np->ns?np->ns:""));
+      return soap->error = SOAP_NAMESPACE; 
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined, assuming empty namespace\n", s));
+    if ((*t = (char*)soap_malloc(soap, strlen(p) + 4)))
+      sprintf(*t, "\"\":%s", p);
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_QName2s(struct soap *soap, const char *s)
+{ struct Namespace *p;
+  char *t;
+  int n;
+  if (!s || *s != '"')
+  {
+#ifndef WITH_LEAN
+    if (s && (soap->mode & SOAP_XML_CANONICAL))
+    { t = (char*)strchr(s, ':');
+      if (t)
+        soap_utilize_ns(soap, s, t - s);
+    }
+#endif
+    return s;
+  }
+  s++;
+  if ((p = soap->local_namespaces))
+  { for (; p->id; p++)
+    { if (p->ns)
+        if (!soap_tag_cmp(s, p->ns))
+          break;
+      if (p->in)
+        if (!soap_tag_cmp(s, p->in))
+          break;
+    }
+    if (p && p->id)
+    { s = strchr(s, '"');
+      if (s)
+      { t = (char*)soap_malloc(soap, strlen(p->id) + strlen(s));
+        strcpy(t, p->id);
+	strcat(t, s + 1);
+        return t;
+      }
+    }
+  }
+  t = (char*)strchr(s, '"');
+  if (t)
+    n = t - s;
+  else
+    n = 0;
+  t = soap_strdup(soap, s);
+  t[n] = '\0';
+  sprintf(soap->tmpbuf, "xmlns:_%d", soap->idnum++);
+  soap_set_attr(soap, soap->tmpbuf, t);
+  s = strchr(s, '"');
+  if (s)
+  { t = (char*)soap_malloc(soap, strlen(soap->tmpbuf) + strlen(s) - 6);
+    strcpy(t, soap->tmpbuf + 6);
+    strcat(t, s + 1);
+  }
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2wchar(struct soap *soap, const char *s, wchar_t **t)
+{ wchar_t *r;
+  if (!s)
+    *t = NULL;
+  else
+  { *t = r = (wchar_t*)soap_malloc(soap, sizeof(wchar_t) * (strlen(s) + 1));
+    if (!r)
+      return soap->error;
+    if (soap->mode & SOAP_ENC_LATIN)
+    { while (*s)
+        *r++ = (wchar_t)*s++;
+    }
+    else
+    { /* Convert UTF8 to wchar */
+      while (*s)
+      { register soap_wchar c, c1, c2, c3, c4;
+        c = *s++;
+        if (c < 0x80)
+	  *r++ = (wchar_t)c;
+	else
+        { c1 = (soap_wchar)*s++ & 0x3F;
+          if (c < 0xE0)
+            *r++ = (wchar_t)(((soap_wchar)(c & 0x1F) << 6) | c1);
+          else
+	  { c2 = (soap_wchar)*s++ & 0x3F;
+            if (c < 0xF0)
+              *r++ = (wchar_t)(((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2);
+            else
+	    { c3 = (soap_wchar)*s++ & 0x3F;
+              if (c < 0xF8)
+                *r++ = (wchar_t)(((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3);
+              else
+	      { c4 = (soap_wchar)*s++ & 0x3F;
+                if (c < 0xFC)
+                  *r++ = (wchar_t)(((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4);
+                else
+		  *r++ = (wchar_t)(((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(*s++ & 0x3F));
+              }
+            }
+          }
+        }
+      }
+    }
+    *r = L'\0';
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_wchar2s(struct soap *soap, const wchar_t *s)
+{ register soap_wchar c;
+  register char *r, *t;
+  const wchar_t *q = s;
+  size_t n = 0;
+  while ((c = *q++))
+  { if (c > 0 && c < 0x80)
+      n++;
+    else
+      n += 6;
+  }
+  r = t = (char*)soap_malloc(soap, n + 1);
+  if (r)
+  { /* Convert wchar to UTF8 */
+    while ((c = *s++))
+    { if (c > 0 && c < 0x80)
+        *t++ = (char)c;
+      else
+      { if (c < 0x0800)
+          *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+        else
+        { if (c < 0x010000)
+            *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+          else
+          { if (c < 0x200000)
+              *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+            else
+            { if (c < 0x04000000)
+                *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+              else
+              { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+              }
+              *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+            }     
+            *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+        }
+        *t++ = (char)(0x80 | (c & 0x3F));
+      }
+    }
+    *t = '\0';
+  }
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outstring(struct soap *soap, const char *tag, int id, char *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_string_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_instring(struct soap *soap, const char *tag, char **p, const char *type, int t, int flag, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_string_in(soap, flag, minlen, maxlen);
+    if (!*p || !(char*)soap_id_enter(soap, soap->id, *p, t, sizeof(char*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (char**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(char**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwstring(struct soap *soap, const char *tag, int id, wchar_t *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_wstring_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type, int t, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_wstring_in(soap, 1, minlen, maxlen);
+    if (!*p || !(wchar_t*)soap_id_enter(soap, soap->id, *p, t, sizeof(wchar_t*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (wchar_t**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(wchar_t**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static time_t
+soap_timegm(struct tm *T)
+{
+#if defined(HAVE_TIMEGM)
+  return timegm(T);
+#else
+  time_t t, g, z;
+#ifdef HAVE_GMTIME_R
+  struct tm tm, *tmp = &tm;
+#else
+  struct tm *tmp;
+#endif
+  t = mktime(T);
+  if (t == -1)
+    return -1;
+#ifdef HAVE_GMTIME_R
+  gmtime_r(&t, tmp);
+#else
+  tmp = gmtime(&t);
+#endif
+  tmp->tm_isdst = 0;
+  g = mktime(tmp);
+  if (g == -1)
+    return -1;
+  z = g - t;
+  return t - z;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_dateTime2s(struct soap *soap, time_t n)
+{ struct tm T, *pT = &T;
+#if defined(HAVE_GMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PGMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_PGMTIME)
+  if (gmtime(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GMTIME)
+  if ((pT = gmtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GETTIMEOFDAY)
+  struct timezone tz;
+  memset((void*)&tz, 0, sizeof(tz));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+#endif
+#elif defined(HAVE_FTIME)
+  struct timeb t;
+  memset((void*)&t, 0, sizeof(t));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+  /* The following defines were added for VxWorks*/
+# elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf+strlen(soap->tmpbuf), "%+03d:%02d", t.timezone/60, abs(t.timezone)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+# endif
+#elif defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#else
+  if ((pT = localtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#endif
+  else
+    strcpy(soap->tmpbuf, "1969-12-31T23:59:59Z");
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdateTime(struct soap *soap, const char *tag, int id, const time_t *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_dateTime2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2dateTime(struct soap *soap, const char *s, time_t *p)
+{ if (s)
+  { struct tm T;
+    char zone[16];
+    const char *t;
+    memset((void*)&T, 0, sizeof(T));
+    zone[sizeof(zone)-1] = '\0';
+    if (strchr(s, '-'))
+      t = "%d-%d-%dT%d:%d:%d%15s";
+    else if (strchr(s, ':'))
+      t = "%4d%2d%2dT%d:%d:%d%15s";
+    else /* parse non-XSD-standard alternative ISO 8601 format */
+      t = "%4d%2d%2dT%2d%2d%2d%15s";
+    sscanf(s, t, &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, zone);
+    if (T.tm_year == 1)
+      T.tm_year = 70;
+    else
+      T.tm_year -= 1900;
+    T.tm_mon--;
+    if (*zone)
+    { if (*zone == '.')
+      { for (s = zone + 1; *s; s++)
+          if (*s < '0' || *s > '9')
+            break;
+      }
+      else
+        s = zone;
+      if (*s == '+' || *s == '-')
+      { int h = 0, m = 0;
+        if (s[3] == ':')
+	{ sscanf(s, "%d:%d", &h, &m);
+	  if (h < 0)
+	    m = -m;
+	}
+	else
+	{ m = (int)atol(s);
+	  h = m / 100;
+	  m = m % 100;
+	}
+        T.tm_hour -= h;
+        T.tm_min -= m;
+      }
+      T.tm_isdst = 0;
+      *p = soap_timegm(&T);
+    }
+    else
+    { T.tm_isdst = -1;
+      *p = mktime(&T); /* no time zone: suppose it is localtime? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+time_t *
+SOAP_FMAC2
+soap_indateTime(struct soap *soap, const char *tag, time_t *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":dateTime"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (time_t*)soap_id_enter(soap, soap->id, p, t, sizeof(time_t), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (time_t*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(time_t), 0, NULL);
+  else if (p)
+  { if (soap_s2dateTime(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outliteral(struct soap *soap, const char *tag, char *const*p)
+{ int i;
+  const char *t = NULL;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p && *p)
+  { if (soap_send(soap, *p))
+      return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_inliteral(struct soap *soap, const char *tag, char **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_string_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwliteral(struct soap *soap, const char *tag, wchar_t *const*p)
+{ int i;
+  const char *t = NULL;
+  wchar_t c;
+  const wchar_t *s;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p)
+  { s = *p;
+    while ((c = *s++))
+      if (soap_pututf8(soap, (unsigned char)c))
+        return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwliteral(struct soap *soap, const char *tag, wchar_t **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_wstring_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_token(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF || soap_blank(c))
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_value(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  for (s--; i > 0; i--, s--)
+    if (!soap_blank(*s))
+      break;
+  s[1] = '\0';
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->data = soap_strdup(soap, soap->tmpbuf);
+#endif
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEANER) || !defined(WITH_NOHTTP)
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getline(struct soap *soap, char *s, int len)
+{ int i = len;
+  soap_wchar c = 0;
+  for (;;)
+  { while (--i > 0)
+    { c = soap_getchar(soap);
+      if (c == '\r' || c == '\n')
+        break;
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+    if (c != '\n')
+      c = soap_getchar(soap); /* got \r, now get \n */
+    if (c == '\n')
+    { *s = '\0';
+      if (i+1 == len) /* empty line: end of HTTP/MIME header */
+        break;
+      c = soap_unget(soap, soap_getchar(soap));
+      if (c != ' ' && c != '\t') /* HTTP line continuation? */
+        break;
+    }
+    else if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static size_t
+soap_count_attachments(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  register struct soap_multipart *content;
+  register size_t count = soap->count;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the message size with attachments, current count=%lu\n", (unsigned long)count));
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of DIME attachments\n"));
+    for (content = soap->dime.first; content; content = content->next)
+    { count += 12 + ((content->size+3)&(~3));
+      if (content->id)
+        count += ((strlen(content->id)+3)&(~3));
+      if (content->type)
+        count += ((strlen(content->type)+3)&(~3));
+      if (content->options)
+        count += ((((unsigned char)content->options[2] << 8) | ((unsigned char)content->options[3]))+7)&(~3);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of DIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary)
+  { register size_t n = strlen(soap->mime.boundary);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of MIME attachments\n"));
+    for (content = soap->mime.first; content; content = content->next)
+    { register const char *s;
+      /* count \r\n--boundary\r\n */
+      count += 6 + n;
+      /* count Content-Type: ...\r\n */
+      if (content->type)
+        count += 16 + strlen(content->type);
+      /* count Content-Transfer-Encoding: ...\r\n */
+      s = soap_str_code(mime_codes, content->encoding);
+      if (s)
+        count += 29 + strlen(s);
+      /* count Content-ID: ...\r\n */
+      if (content->id)
+        count += 14 + strlen(content->id);
+      /* count Content-Location: ...\r\n */
+      if (content->location)
+        count += 20 + strlen(content->location);
+      /* count Content-Description: ...\r\n */
+      if (content->description)
+        count += 23 + strlen(content->location);
+      /* count \r\n...content */
+      count += 2 + content->size;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of MIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+    /* count \r\n--boundary-- */
+    count += 6 + n;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New count is %lu bytes\n", (unsigned long)count));
+  return count;
+#else
+  return soap->count;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_putdimefield(struct soap *soap, const char *s, size_t n)
+{ if (soap_send_raw(soap, s, n))
+    return soap->error;
+  return soap_send_raw(soap, SOAP_STR_PADDING, -(long)n&3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_dime_option(struct soap *soap, unsigned short optype, const char *option)
+{ size_t n;
+  char *s = NULL;
+  if (option)
+  { n = strlen(option);
+    s = (char*)soap_malloc(soap, n + 5);
+    if (s)
+    { s[0] = optype >> 8;
+      s[1] = optype & 0xFF;
+      s[2] = n >> 8;
+      s[3] = n & 0xFF;
+      strcpy(s + 4, option);
+    }
+  }
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdimehdr(struct soap *soap)
+{ unsigned char tmp[12];
+  size_t optlen = 0, idlen = 0, typelen = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Put DIME header id='%s'\n", soap->dime.id?soap->dime.id:""));
+  if (soap->dime.options)
+    optlen = (((unsigned char)soap->dime.options[2] << 8) | ((unsigned char)soap->dime.options[3])) + 4;
+  if (soap->dime.id)
+    idlen = strlen(soap->dime.id);
+  if (soap->dime.type)
+    typelen = strlen(soap->dime.type);
+  tmp[0] = SOAP_DIME_VERSION | (soap->dime.flags & 0x7);
+  tmp[1] = soap->dime.flags & 0xF0;
+  tmp[2] = optlen >> 8;
+  tmp[3] = optlen & 0xFF;
+  tmp[4] = idlen >> 8;
+  tmp[5] = idlen & 0xFF;
+  tmp[6] = typelen >> 8;
+  tmp[7] = typelen & 0xFF;
+  tmp[8] = soap->dime.size >> 24;
+  tmp[9] = (soap->dime.size >> 16) & 0xFF;
+  tmp[10] = (soap->dime.size >> 8) & 0xFF;
+  tmp[11] = soap->dime.size & 0xFF;
+  if (soap_send_raw(soap, (char*)tmp, 12)
+   || soap_putdimefield(soap, soap->dime.options, optlen)
+   || soap_putdimefield(soap, soap->dime.id, idlen)
+   || soap_putdimefield(soap, soap->dime.type, typelen))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return SOAP_OK;
+  for (content = soap->dime.first; content; content = content->next)
+  { void *handle;
+    soap->dime.size = content->size;
+    soap->dime.id = content->id;
+    soap->dime.type = content->type;
+    soap->dime.options = content->options;
+    soap->dime.flags = SOAP_DIME_VERSION | SOAP_DIME_MEDIA;
+    if (soap->fdimereadopen && ((handle = soap->fdimereadopen(soap, (void*)content->ptr, content->id, content->type, content->options)) || soap->error))
+    { size_t size = content->size;
+      if (!handle)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadopen failed\n"));
+        return soap->error;
+      }
+      if (!content->size && ((soap->mode & SOAP_ENC_XML) || (soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_IO) == SOAP_IO_STORE))
+      { size_t chunksize = sizeof(soap->tmpbuf);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked streaming DIME\n"));
+        do 
+        { size = soap->fdimeread(soap, handle, soap->tmpbuf, chunksize);
+          DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread returned %lu bytes\n", (unsigned long)size));
+          if (size < chunksize)
+ 	  { soap->dime.flags &= ~SOAP_DIME_CF;
+            if (!content->next)
+              soap->dime.flags |= SOAP_DIME_ME;
+	  }
+          else
+            soap->dime.flags |= SOAP_DIME_CF;
+	  soap->dime.size = size;
+          if (soap_putdimehdr(soap)
+	   || soap_putdimefield(soap, soap->tmpbuf, size))
+            break;
+          if (soap->dime.id)
+ 	  { soap->dime.flags &= ~(SOAP_DIME_MB | SOAP_DIME_MEDIA);
+            soap->dime.id = NULL;
+            soap->dime.type = NULL;
+            soap->dime.options = NULL;
+          }  
+        } while (size >= chunksize);
+      }
+      else
+      { if (!content->next)
+          soap->dime.flags |= SOAP_DIME_ME;
+        if (soap_putdimehdr(soap))
+          return soap->error;
+        do
+        { size_t bufsize;
+	  if (size < sizeof(soap->tmpbuf))
+            bufsize = size;
+          else
+            bufsize = sizeof(soap->tmpbuf);
+          if (!(bufsize = soap->fdimeread(soap, handle, soap->tmpbuf, bufsize)))
+          { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread failed: insufficient data (%lu bytes remaining from %lu bytes)\n", (unsigned long)size, (unsigned long)soap->dime.size));
+            soap->error = SOAP_EOF;
+	    break;
+          }
+          if (soap_send_raw(soap, soap->tmpbuf, bufsize))
+            break;
+          size -= bufsize;
+        } while (size);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+        soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+      if (soap->fdimereadclose)
+        soap->fdimereadclose(soap, handle);
+    }
+    else
+    { if (!content->next)
+        soap->dime.flags |= SOAP_DIME_ME;
+      if (soap_putdimehdr(soap)
+       || soap_putdimefield(soap, (char*)content->ptr, content->size))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static char *
+soap_getdimefield(struct soap *soap, size_t n)
+{ register soap_wchar c;
+  register int i;
+  register char *s;
+  char *p = NULL;
+  if (n)
+  { p = (char*)soap_malloc(soap, n + 1);
+    if (p)
+    { s = p;
+      for (i = n; i > 0; i--)
+      { if ((int)(c = soap_get1(soap)) == EOF)
+        { soap->error = SOAP_EOF;
+          return NULL;
+        }
+        *s++ = (char)c;
+      }
+      *s = '\0';
+      if ((soap->error = soap_move(soap, -(long)n&3)))
+        return NULL;
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdimehdr(struct soap *soap)
+{ register soap_wchar c;
+  register char *s;
+  register int i;
+  unsigned char tmp[12];
+  size_t optlen, idlen, typelen;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return soap->error = SOAP_DIME_END;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME header\n"));
+  if (soap->dime.buflen || soap->dime.chunksize)
+  { if (soap_move(soap, (long)(soap->dime.size - soap_tell(soap))))
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, soap_getchar(soap)); /* skip padding and get hdr */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... From chunked\n"));
+    return SOAP_OK;
+  }
+  s = (char*)tmp;
+  for (i = 12; i > 0; i--)
+  { if ((int)(c = soap_getchar(soap)) == EOF)
+      return soap->error = SOAP_EOF;
+    *s++ = (char)c;
+  }
+  if ((tmp[0] & 0xF8) != SOAP_DIME_VERSION)
+    return soap->error = SOAP_DIME_MISMATCH;
+  soap->dime.flags = (tmp[0] & 0x7) | (tmp[1] & 0xF0);
+  optlen = (tmp[2] << 8) | tmp[3];
+  idlen = (tmp[4] << 8) | tmp[5];
+  typelen = (tmp[6] << 8) | tmp[7];
+  soap->dime.size = (tmp[8] << 24) | (tmp[9] << 16) | (tmp[10] << 8) | tmp[11];
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME size=%lu flags=0x%X\n", (unsigned long)soap->dime.size, soap->dime.flags));
+  if (!(soap->dime.options = soap_getdimefield(soap, optlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.id = soap_getdimefield(soap, idlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.type = soap_getdimefield(soap, typelen)) && soap->error)
+    return soap->error;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME id=%s, type=%s, options=%s\n", soap->dime.id?soap->dime.id:"", soap->dime.type?soap->dime.type:"", soap->dime.options?soap->dime.options+4:""));
+  if (soap->dime.flags & SOAP_DIME_ME)
+    soap->mode &= ~SOAP_ENC_DIME;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdime(struct soap *soap)
+{ while (soap->dime.flags & SOAP_DIME_CF)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap_move(soap, soap->dime.size))
+      return soap->error = SOAP_EOF;
+  }
+  if (soap_move(soap, ((soap->dime.size+3)&(~3))-soap_tell(soap)))
+    return soap->error = SOAP_EOF;
+  for (;;)
+  { register struct soap_multipart *content;
+    if (soap_getdimehdr(soap))
+      break;
+    if (soap->fdimewriteopen && ((soap->dime.ptr = (char*)soap->fdimewriteopen(soap, soap->dime.id, soap->dime.type, soap->dime.options)) || soap->error))
+    { const char *id, *type, *options;
+      size_t size, n;
+      if (!soap->dime.ptr)
+        return soap->error;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      for (;;)
+      { size = soap->dime.size;
+        for (;;)
+        { n = soap->buflen - soap->bufidx;
+          if (size < n)
+            n = size;
+          if ((soap->error = soap->fdimewrite(soap, (void*)soap->dime.ptr, soap->buf + soap->bufidx, n)))
+            break;
+	  size -= n;
+	  if (!size)
+	  { soap->bufidx += n;
+	    break;
+	  }
+	  if (soap_recv(soap))
+          { soap->error = SOAP_EOF;
+	    goto end;
+          }
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+        { soap->error = SOAP_EOF;
+	  break;
+        }
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          break;
+      }
+end:
+      if (soap->fdimewriteclose)
+        soap->fdimewriteclose(soap, (void*)soap->dime.ptr);
+      soap->dime.size = 0;
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else if (soap->dime.flags & SOAP_DIME_CF)
+    { const char *id, *type, *options;
+      register soap_wchar c;
+      register char *s;
+      register int i;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      if (soap_new_block(soap))
+        return SOAP_EOM;
+      for (;;)
+      { s = (char*)soap_push_block(soap, soap->dime.size);
+        if (!s)
+          return soap->error = SOAP_EOM;
+        for (i = soap->dime.size; i > 0; i--)
+        { if ((int)(c = soap_get1(soap)) == EOF)
+            return soap->error = SOAP_EOF;
+          *s++ = (char)c;
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+          return soap->error = SOAP_EOF;
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          return soap->error;
+      }
+      soap->dime.size = soap->blist->size++; /* allocate one more for '\0' */
+      if (!(soap->dime.ptr = soap_save_block(soap, NULL, 0)))
+        return soap->error;
+      soap->dime.ptr[soap->dime.size] = '\0'; /* force 0-terminated */
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else
+      soap->dime.ptr = soap_getdimefield(soap, soap->dime.size);
+    content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, soap->dime.ptr, soap->dime.size);
+    if (!content)
+      return soap->error = SOAP_EOM;
+    content->id = soap->dime.id;
+    content->type = soap->dime.type;
+    content->options = soap->dime.options;
+    soap_resolve_attachment(soap, content);
+    if (soap->error)
+      return soap->error;
+  }
+  if (soap->error != SOAP_DIME_END)
+    return soap->error;
+  return soap->error = SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmimehdr(struct soap *soap)
+{ struct soap_multipart *content;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  while (!*soap->msgbuf);
+  if (soap->msgbuf[0] == '-' && soap->msgbuf[1] == '-')
+  { char *s = soap->msgbuf + strlen(soap->msgbuf) - 1;
+    /* remove white space */
+    while (soap_blank(*s))
+      s--;
+    s[1] = '\0';
+    if (soap->mime.boundary)
+    { if (strcmp(soap->msgbuf + 2, soap->mime.boundary))
+        return soap->error = SOAP_MIME_ERROR;
+    }
+    else
+      soap->mime.boundary = soap_strdup(soap, soap->msgbuf + 2);
+    if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  if (soap_set_mime_attachment(soap, NULL, 0, SOAP_MIME_NONE, NULL, NULL, NULL, NULL))
+    return soap->error = SOAP_EOM;
+  content = soap->mime.last;
+  for (;;)
+  { register char *key = soap->msgbuf;
+    register char *val;
+    if (!*key)
+      break;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "MIME header: %s\n", key));
+    val = strchr(soap->msgbuf, ':');
+    if (val)
+    { *val = '\0';
+      do val++;
+      while (*val && *val <= 32);
+      if (!soap_tag_cmp(key, "Content-ID"))
+        content->id = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Location"))
+        content->location = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Disposition"))
+        content->id = soap_strdup(soap, soap_get_header_attribute(soap, val, "name"));
+      else if (!soap_tag_cmp(key, "Content-Type"))
+        content->type = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Description"))
+        content->description = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Transfer-Encoding"))
+        content->encoding = (enum soap_mime_encoding)soap_int_code(mime_codes, val, (long)SOAP_MIME_NONE);
+    }
+    if (soap_getline(soap, key, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmime(struct soap *soap)
+{ register soap_wchar c = 0;
+  if (!soap->mime.last)
+    return SOAP_OK;
+  for (;;)
+  { register size_t i, m = 0;
+    register char *s, *t = NULL;
+    struct soap_multipart *content = soap->mime.last;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Parsing MIME content id=%s type=%s\n", content->id?content->id:"", content->type?content->type:""));
+    if (soap_new_block(soap))
+      return soap->error = SOAP_EOM;
+    for (;;)
+    { register short flag = 0;
+      if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+        return soap->error = SOAP_EOM;
+      for (i = 0; i < SOAP_BLKLEN; i++)
+      { if (m > 0)
+        { *s++ = *t++;
+	  m--;
+	}
+	else
+        { if (!flag)
+	  { c = soap_get1(soap);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	  }
+	  if (flag || c == '\r')
+	  { t = soap->tmpbuf;
+	    memset(t, 0, sizeof(soap->tmpbuf));
+            strcpy(t, "\n--");
+            if (soap->mime.boundary)
+	      strncat(t, soap->mime.boundary, sizeof(soap->tmpbuf)-4);
+	    do c = soap_getchar(soap);
+	    while (c == *t++);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	    if (!*--t)
+	      goto end;
+	    *t = (char)c;
+	    flag = (c == '\r');
+	    m = t - soap->tmpbuf + 1 - flag;
+	    t = soap->tmpbuf;
+	    c = '\r';
+	  }
+	  *s++ = (char)c;
+        }
+      }
+    }
+end:
+    *s = '\0'; /* force 0-terminated */
+    content->size = soap_size_block(soap, i+1)-1;
+    content->ptr = soap_save_block(soap, NULL, 0);
+    soap_resolve_attachment(soap, content);
+    if (c == '-' && soap_getchar(soap) == '-')
+      break;
+    while (c != '\r' && (int)c != EOF && soap_blank(c))
+      c = soap_getchar(soap);
+    if (c != '\r' || soap_getchar(soap) != '\n')
+      return soap->error = SOAP_MIME_ERROR;
+    if (soap_getmimehdr(soap))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_match_cid(struct soap *soap, const char *s, const char *t)
+{ register size_t n;
+  if (!s)
+    return 1;
+  if (!strcmp(s, t))
+    return 0;
+  if (!strncmp(s, "cid:", 4))
+    s += 4;
+  n = strlen(t);
+  if (*t == '<')
+  { t++;
+    n -= 2;
+  }
+  if (!strncmp(s, t, n) && !s[n])
+    return 0;
+  soap_decode(soap->tmpbuf, sizeof(soap->tmpbuf), s, SOAP_STR_EOS);
+  if (!strncmp(soap->tmpbuf, t, n) && !soap->tmpbuf[n])
+    return 0;
+  return 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_resolve_attachment(struct soap *soap, struct soap_multipart *content)
+{ if (content->id)
+  { register struct soap_xlist **xp = &soap->xlist;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving attachment data for id=%s\n", content->id));
+    while (*xp)
+    { register struct soap_xlist *xq = *xp;
+      if (!soap_match_cid(soap, xq->id, content->id))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Found matching attachment %s for content id=%s\n", xq->id, content->id));
+	*xp = xq->next;
+        *xq->ptr = (unsigned char*)content->ptr;
+        *xq->size = (int)content->size;
+        *xq->type = (char*)content->type;
+	if (content->options)
+          *xq->options = (char*)content->options;
+        else
+          *xq->options = (char*)content->description;
+	SOAP_FREE(soap, xq);
+      }
+      else
+        xp = &(*xp)->next;
+    }
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmimehdr(struct soap *soap, struct soap_multipart *content)
+{ const char *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "MIME attachment type=%s\n", content->type?content->type:""));
+  if (soap_send3(soap, "\r\n--", soap->mime.boundary, "\r\n"))
+    return soap->error;
+  if (content->type && soap_send3(soap, "Content-Type: ", content->type, "\r\n"))
+    return soap->error;
+  s = soap_str_code(mime_codes, content->encoding);
+  if (s && soap_send3(soap, "Content-Transfer-Encoding: ", s, "\r\n"))
+    return soap->error;
+  if (content->id && soap_send3(soap, "Content-ID: ", content->id, "\r\n"))
+    return soap->error;
+  if (content->location && soap_send3(soap, "Content-Location: ", content->location, "\r\n"))
+    return soap->error;
+  if (content->description && soap_send3(soap, "Content-Description: ", content->description, "\r\n"))
+    return soap->error;
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_MIME) || !soap->mime.boundary)
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending MIME attachments\n"));
+  for (content = soap->mime.first; content; content = content->next)
+    if (soap_putmimehdr(soap, content)
+     || soap_send_raw(soap, content->ptr, content->size))
+      return soap->error;
+  return soap_send3(soap, "\r\n--", soap->mime.boundary, "--");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_dime(struct soap *soap)
+{ soap->omode |= SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_mime(struct soap *soap, const char *boundary, const char *start)
+{ soap->omode |= SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = soap_strdup(soap, boundary);
+  soap->mime.start = soap_strdup(soap, start);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_dime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_mime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart*
+soap_new_multipart(struct soap *soap, struct soap_multipart **first, struct soap_multipart **last, char *ptr, size_t size)
+{ struct soap_multipart *content;
+  content = (struct soap_multipart*)soap_malloc(soap, sizeof(struct soap_multipart));
+  if (content)
+  { content->next = NULL;
+    content->ptr = ptr;
+    content->size = size;
+    content->id = NULL;
+    content->type = NULL;
+    content->options = NULL;
+    content->encoding = SOAP_MIME_NONE;
+    content->location = NULL;
+    content->description = NULL;
+    if (!*first)
+      *first = content;
+    if (*last)
+      (*last)->next = content;
+    *last = content;
+  }
+  return content;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_dime_attachment(struct soap *soap, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->options = soap_dime_option(soap, optype, option);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_mime_attachment(struct soap *soap, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->encoding = encoding;
+  content->location = soap_strdup(soap, location);
+  content->description = soap_strdup(soap, description);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap_multipart*
+SOAP_FMAC2
+soap_next_multipart(struct soap_multipart *content)
+{ if (content)
+    return content->next;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_select_mime_boundary(struct soap *soap)
+{ while (!soap->mime.boundary || soap_valid_mime_boundary(soap))
+  { register char *s = soap->mime.boundary;
+    register size_t n = 0;
+    if (s)
+      n = strlen(s);
+    if (n < 16)
+    { n = 64;
+      s = soap->mime.boundary = (char*)soap_malloc(soap, n + 1);
+      if (!s)
+        return;
+    }
+    strcpy(s, "==");
+    s += 2;
+    n -= 4;
+    while (n)
+    { *s++ = soap_base64o[soap_random & 0x3F];
+      n--;
+    }
+    strcpy(s, "==");
+  }
+  if (!soap->mime.start)
+    soap->mime.start = "<SOAP-ENV:Envelope>";
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_valid_mime_boundary(struct soap *soap)
+{ register struct soap_multipart *content;
+  register size_t k = strlen(soap->mime.boundary);
+  for (content = soap->mime.first; content; content = content->next)
+  { if (content->ptr && content->size >= k)
+    { register const char *p = (const char*)content->ptr; 
+      register size_t i;
+      for (i = 0; i < content->size - k; i++, p++)
+        if (!strncmp(p, soap->mime.boundary, k))
+          return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	HTTP cookie handling
+ *
+\******************************************************************************/
+
+#ifdef WITH_COOKIES
+/******************************************************************************/
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_encode_cookie(const char *s, char *t, size_t len)
+{ register int c;
+  register size_t n = len;
+  while ((c = *s++) && --n > 0)
+  { if (c > ' ' && c < 128 && !strchr("()<>@,;:\\\"/[]?={}", c))
+      *t++ = c;
+    else if (n > 2)
+    { *t++ = '%';
+      *t++ = (c >> 4) + (c > 159 ? '7' : '0');
+      c &= 0xF;
+      *t++ = c + (c > 9 ? '7' : '0');
+      n -= 2;
+    }
+    else
+      break;
+  }
+  *t = '\0';
+  return len - n;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  size_t n;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (*path == '/')
+    path++;
+  n = strlen(path);
+  for (p = soap->cookies; p; p = p->next)
+    if (!strcmp(p->name, name)
+     && domain
+     && p->domain
+     && !strcmp(p->domain, domain)
+     && !strncmp(p->path, path, n))
+      break;
+  return p;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_set_cookie(struct soap *soap, const char *name, const char *value, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  int n;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set cookie: %s=%s domain=%s path=%s\n", name, value?value:"", domain?domain:"", path?path:""));
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return NULL;
+  }
+  if (*path == '/')
+    path++;
+  q = soap_cookie(soap, name, domain, path);
+  if (!q)
+  { if ((q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+    { if ((q->name = (char*)SOAP_MALLOC(soap, strlen(name)+1)))
+        strcpy(q->name, name);
+      q->value = NULL;
+      q->domain = NULL;
+      q->path = NULL;
+      q->expire = -1;
+      q->version = 0;
+      q->secure = 0;
+      q->modified = 0;
+      for (p = &soap->cookies, n = soap->cookie_max; *p && n; p = &(*p)->next, n--)
+        if (!strcmp((*p)->name, name) && (*p)->path && strcmp((*p)->path, path) < 0)
+          break;
+      if (n)
+      { q->next = *p;
+        *p = q;
+      }
+      else
+      { SOAP_FREE(soap, q->name);
+        SOAP_FREE(soap, q);
+        q = NULL;
+      }
+    }
+  }
+  else
+    q->modified = 1;
+  if (q)
+  { if (q->value)
+    { SOAP_FREE(soap, q->value);
+      q->value = NULL;
+    }
+    if (q->domain)
+    { SOAP_FREE(soap, q->domain);
+      q->domain = NULL;
+    }
+    if (q->path)
+    { SOAP_FREE(soap, q->path);
+      q->path = NULL;
+    }
+    if (value && *value && (q->value = (char*)SOAP_MALLOC(soap, strlen(value)+1)))
+      strcpy(q->value, value);
+    if (domain && *domain && (q->domain = (char*)SOAP_MALLOC(soap, strlen(domain)+1)))
+      strcpy(q->domain, domain);
+    if (path && *path && (q->path = (char*)SOAP_MALLOC(soap, strlen(path)+1)))
+      strcpy(q->path, path);
+    q->session = 1;
+    q->env = 0;
+  }
+  return q;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!domain)
+  { soap_set_receiver_error(soap, "Cookie domain not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (*path == '/')
+    path++;
+  for (p = &soap->cookies, q = *p; q; q = *p)
+    if (!strcmp(q->name, name) && !strcmp(q->domain, domain) && !strncmp(q->path, path, strlen(q->path)))
+    { if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+      p = &q->next;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_env_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)) && p->env)
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_cookie_expire(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->expire;
+  return -1;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_expire(struct soap *soap, const char *name, long expire, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->expire = expire;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 1;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_clr_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 0;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putsetcookies(struct soap *soap)
+{ struct soap_cookie *p;
+  char *s, tmp[4096];
+  const char *t;
+  for (p = soap->cookies; p; p = p->next)
+  { if (p->modified || !p->env)
+    { s = tmp;
+      if (p->name)
+        s += soap_encode_cookie(p->name, s, tmp-s+4064);
+      if (p->value && *p->value)
+      { *s++ = '=';
+        s += soap_encode_cookie(p->value, s, tmp-s+4064);
+      }
+      if (p->domain && (int)strlen(p->domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", p->domain);
+      else if (soap->cookie_domain && (int)strlen(soap->cookie_domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", soap->cookie_domain);
+      strcat(s, ";Path=\"/");
+      if (p->path)
+        t = p->path;
+      else
+        t = soap->cookie_path;
+      if (t)
+      { if (*t == '/')
+          t++;
+        if ((int)strlen(t) < tmp-s+4064)
+          strcat(s, t);
+      }
+      s += strlen(s);
+      *s++ = '"';
+      if (p->version > 0)
+        sprintf(s, ";Version=%u", p->version);
+      if (p->expire >= 0)
+        sprintf(s, ";Max-Age=%ld", p->expire);
+      if (p->secure)
+        strcat(s, ";Secure");
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set-Cookie: %s\n", tmp));
+      if ((soap->error = soap->fposthdr(soap, "Set-Cookie", tmp)))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putcookies(struct soap *soap, const char *domain, const char *path, int secure)
+{ struct soap_cookie **p, *q;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  char *s, tmp[4096];
+  p = &soap->cookies;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending cookies for domain=%s path=%s\n", domain, path));
+  if (*path == '/')
+    path++;
+  while ((q = *p))
+  { if (q->expire && now > q->expire)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie %s expired\n", q->name));
+      SOAP_FREE(soap, q->name);
+      if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+    { size_t domlen = 0;
+      if (q->domain)
+      { const char *s = strchr(q->domain, ':');
+        if (s)
+	  domlen = s - q->domain;
+	else
+          domlen = strlen(q->domain);
+      }
+      if ((!q->domain || !strncmp(q->domain, domain, domlen))
+          && (!q->path || !strncmp(q->path, path, strlen(q->path)))
+          && (!q->secure || secure))
+      { s = tmp;
+        if (q->version != version)
+        { sprintf(s, "$Version=%u;", q->version);
+          version = q->version;
+        }
+        if (q->name)
+          s += soap_encode_cookie(q->name, s, tmp-s+4080);
+        if (q->value && *q->value)
+        { *s++ = '=';
+          s += soap_encode_cookie(q->value, s, tmp-s+4080);
+        }
+        if (q->path && (int)strlen(q->path) < tmp-s+4080)
+        { sprintf(s, ";$Path=\"/%s\"", (*q->path == '/' ? q->path + 1 : q->path));
+          s += strlen(s);
+        }
+        if (q->domain && (int)strlen(q->domain) < tmp-s+4080)
+          sprintf(s, ";$Domain=\"%s\"", q->domain);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie: %s\n", tmp));
+        if ((soap->error = soap->fposthdr(soap, "Cookie", tmp)))
+          return soap->error;
+      }
+      p = &q->next;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_getcookies(struct soap *soap, const char *val)
+{ struct soap_cookie *p = NULL, *q;
+  const char *s;
+  char *t, tmp[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  char *domain = NULL;
+  char *path = NULL;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  if (!val)
+    return;
+  s = val;
+  while (*s)
+  { s = soap_decode_key(tmp, sizeof(tmp), s);
+    if (!soap_tag_cmp(tmp, "$Version"))
+    { if ((s = soap_decode_val(tmp, sizeof(tmp), s)))
+      { if (p)
+          p->version = (int)atol(tmp);
+        else
+          version = (int)atol(tmp);
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Path"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->path)
+          SOAP_FREE(soap, p->path);
+        p->path = t;
+      }
+      else
+      { if (path)
+          SOAP_FREE(soap, path);
+        path = t;
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Domain"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->domain)
+          SOAP_FREE(soap, p->domain);
+	p->domain = t;
+      }
+      else
+      { if (domain)
+          SOAP_FREE(soap, domain);
+        domain = t;
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Path"))
+    { if (p->path)
+        SOAP_FREE(soap, p->path);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->path = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->path, tmp);
+      }
+      else
+        p->path = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Domain"))
+    { if (p->domain)
+        SOAP_FREE(soap, p->domain);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->domain = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->domain, tmp);
+      }
+      else
+        p->domain = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Version"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->version = (unsigned int)atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Max-Age"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->expire = now + atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Expires"))
+    { struct tm T;
+      char a[3]; 
+      static const char mns[] = "anebarprayunulugepctovec";
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (strlen(tmp) > 20)
+      { memset((void*)&T, 0, sizeof(T));
+        a[0] = tmp[4];
+        a[1] = tmp[5];
+        a[2] = '\0';
+        T.tm_mday = (int)atol(a);
+        a[0] = tmp[8];
+        a[1] = tmp[9];
+        T.tm_mon = (strstr(mns, a) - mns) / 2;
+        a[0] = tmp[11];
+        a[1] = tmp[12];
+        T.tm_year = 100 + (int)atol(a);
+        a[0] = tmp[13];
+        a[1] = tmp[14];
+        T.tm_hour = (int)atol(a);
+        a[0] = tmp[16];
+        a[1] = tmp[17];
+        T.tm_min = (int)atol(a);
+        a[0] = tmp[19];
+        a[1] = tmp[20];
+        T.tm_sec = (int)atol(a);
+        p->expire = soap_timegm(&T);
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Secure"))
+      p->secure = 1;
+    else
+    { if (p)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+        if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+        { q->version = p->version;
+          q->expire = p->expire;
+          q->secure = p->secure;
+          q->env = 1;
+        }
+        if (p->name)
+          SOAP_FREE(soap, p->name);
+        if (p->value)
+          SOAP_FREE(soap, p->value);
+        if (p->domain)
+          SOAP_FREE(soap, p->domain);
+        if (p->path)
+          SOAP_FREE(soap, p->path);
+        SOAP_FREE(soap, p);
+      }
+      if ((p = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      { p->name = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+        strcpy(p->name, tmp);
+        s = soap_decode_val(tmp, sizeof(tmp), s);
+        if (*tmp)
+        { p->value = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+          strcpy(p->value, tmp);
+        }
+        else
+          p->value = NULL;
+        p->domain = domain;
+        p->path = path;
+        p->expire = 0;
+        p->secure = 0;
+        p->version = version;
+      }
+    }
+  }
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+    if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+    { q->version = p->version;
+      q->expire = p->expire;
+      q->secure = p->secure;
+      q->env = 1;
+    }
+    if (p->name)
+      SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+  if (domain)
+    SOAP_FREE(soap, domain);
+  if (path)
+    SOAP_FREE(soap, path);
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getenv_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  const char *s;
+  char key[4096], val[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  if (!(s = getenv("HTTP_COOKIE")))
+    return SOAP_ERR;
+  do
+  { s = soap_decode_key(key, sizeof(key), s);
+    s = soap_decode_val(val, sizeof(val), s);
+    p = soap_set_cookie(soap, key, val, NULL, NULL);
+    if (p)
+      p->env = 1;
+  } while (*s);
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_copy_cookies(struct soap *soap)
+{ struct soap_cookie *p, **q, *r;
+  q = &r;
+  for (p = soap->cookies; p; p = p->next)
+  { if (!(*q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      return r;
+    **q = *p;
+    if (p->name)
+    { if (((*q)->name = (char*)SOAP_MALLOC(soap, strlen(p->name)+1)))
+        strcpy((*q)->name, p->name);
+    }
+    if (p->value)
+    { if (((*q)->value = (char*)SOAP_MALLOC(soap, strlen(p->value)+1)))
+        strcpy((*q)->value, p->value);
+    }
+    if (p->domain)
+    { if (((*q)->domain = (char*)SOAP_MALLOC(soap, strlen(p->domain)+1)))
+        strcpy((*q)->domain, p->domain);
+    }
+    if (p->path)
+    { if (((*q)->path = (char*)SOAP_MALLOC(soap, strlen(p->path)+1)))
+        strcpy((*q)->path, p->path);
+    }
+    q = &(*q)->next;
+  }
+  *q = NULL;
+  return r;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  for (p = soap->cookies; p; p = soap->cookies)
+  { soap->cookies = p->next;
+    SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+}
+
+/******************************************************************************/
+#endif /* WITH_COOKIES */
+
+/******************************************************************************/
+#ifdef WITH_GZIP
+#ifndef PALM_1
+static int
+soap_getgziphdr(struct soap *soap)
+{ int i;
+  soap_wchar c, f = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get gzip header\n"));
+  for (i = 0; i < 9; i++)
+  { if ((int)(c = soap_get1(soap) == EOF))
+      return soap->error = SOAP_EOF;
+    if (i == 2)
+      f = c;
+  }
+  if (f & 0x04) /* FEXTRA */
+  { for (i = soap_get1(soap) | (soap_get1(soap) << 8); i; i--)
+      if ((int)soap_get1(soap) == EOF)
+        return soap->error = SOAP_EOF;
+  }
+  if (f & 0x08) /* FNAME */
+    do
+      c = soap_get1(soap);
+    while (c && (int)c != EOF);
+  if ((int)c != EOF && (f & 0x10)) /* FCOMMENT */
+    do
+      c = soap_get1(soap);
+    while (c && (int)f != EOF);
+  if ((int)c != EOF && (f & 0x01)) /* FHCRC */
+  { if ((int)(c = soap_get1(soap)) != EOF)
+      c = soap_get1(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_recv(struct soap *soap)
+{ soap_wchar c;
+  soap->error = SOAP_OK;
+  soap_free(soap);
+  soap_set_local_namespaces(soap);
+  soap->version = 0;	/* don't assume we're parsing SOAP content by default */
+#ifndef WITH_NOIDREF
+  soap_free_iht(soap);
+#endif
+  if ((soap->imode & SOAP_IO) == SOAP_IO_CHUNK)
+    soap->omode |= SOAP_IO_CHUNK;
+  soap->imode &= ~SOAP_IO;
+  soap->mode = soap->imode;
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  soap->ahead = 0;
+  soap->peeked = 0;
+  soap->level = 0;
+  soap->part = SOAP_BEGIN;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  *soap->endpoint = '\0';
+  soap->action = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket))
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->recvfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->recvfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#ifdef WITH_ZLIB
+  soap->mode &= ~SOAP_ENC_ZLIB;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.next_in = Z_NULL;
+  soap->d_stream.avail_in = 0;
+  soap->d_stream.next_out = (Byte*)soap->buf;
+  soap->d_stream.avail_out = SOAP_BUFLEN;
+  soap->z_ratio_in = 1.0;
+#endif
+#ifndef WITH_LEANER
+  if (soap->fprepareinit)
+    soap->fprepareinit(soap);
+#endif
+  c = soap_getchar(soap);
+#ifdef WITH_GZIP
+  if (c == 0x1F)
+  { if (soap_getgziphdr(soap))
+      return soap->error;
+    if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+    soap->zlib_state = SOAP_ZLIB_INFLATE;
+    soap->mode |= SOAP_ENC_ZLIB;
+    soap->zlib_in = SOAP_ZLIB_GZIP;
+    soap->z_crc = crc32(0L, NULL, 0);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    /* should not chunk over plain transport, so why bother to check? */
+    /* if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) */
+    /*   soap->z_buflen = soap->bufidx; */
+    /* else */
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+    soap->z_buflen = soap->buflen;
+    soap->buflen = soap->bufidx;
+    c = soap_getchar(soap);
+  }  
+#endif
+#ifndef WITH_LEANER
+  if (c == '-' && soap_get0(soap) == '-')
+    soap->mode |= SOAP_ENC_MIME;
+  else if ((c & 0xFFFC) == (SOAP_DIME_VERSION | SOAP_DIME_MB) && (soap_get0(soap) & 0xFFF0) == 0x20)
+    soap->mode |= SOAP_ENC_DIME;
+  else
+#endif
+  { while (soap_blank(c))
+      c = soap_getchar(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  soap_unget(soap, c);
+#ifndef WITH_NOHTTP
+  /* if not XML or (start of)BOM or MIME/DIME/ZLIB, assume HTTP header */
+  if (c != '<' && c != 0xEF && !(soap->mode & (SOAP_ENC_MIME | SOAP_ENC_DIME | SOAP_ENC_ZLIB)))
+  { soap->mode &= ~SOAP_IO;
+    soap->error = soap->fparse(soap);
+    if (soap->error && soap->error < SOAP_STOP)
+    { soap->keep_alive = 0; /* force close later */
+      return soap->error;
+    }
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { soap->chunkbuflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+      soap->chunksize = 0;
+    }
+#ifndef WITH_LEANER
+    else if (soap->fpreparerecv && soap->buflen != soap->bufidx)
+      soap->fpreparerecv(soap, soap->buf + soap->bufidx, soap->buflen - soap->bufidx);
+#endif
+#ifdef WITH_ZLIB
+    if (soap->zlib_in != SOAP_ZLIB_NONE)
+    { /* fparse should not use soap_unget to push back last char */
+#ifdef WITH_GZIP
+      c = soap_get1(soap);
+      if (c == 0x1F)
+      { if (soap_getgziphdr(soap))
+          return soap->error;
+        if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        soap->z_crc = crc32(0L, NULL, 0);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+      }
+      else
+      { soap_revget1(soap);
+#else
+      {
+#endif
+        if (inflateInit(&soap->d_stream) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate initialized\n"));
+      }
+      soap->mode |= SOAP_ENC_ZLIB;
+      memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+      soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+      soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+    }
+#endif
+    if (soap->error)
+    { if (soap->error == SOAP_FORM && soap->fform)
+      { soap->error = soap->fform(soap);
+        if (soap->error == SOAP_OK)
+          soap->error = SOAP_STOP; /* prevents further processing */
+      }
+      return soap->error;
+    }
+  }
+#endif
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_MIME)
+  { if (soap_getmimehdr(soap))
+      return soap->error;
+    if (soap_get_header_attribute(soap, soap->mime.first->type, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+  }
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap->dime.flags & SOAP_DIME_CF)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked DIME SOAP message\n"));
+      soap->dime.chunksize = soap->dime.size;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+    }
+    soap->count = soap->buflen - soap->bufidx;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse(struct soap *soap)
+{ char header[SOAP_HDRLEN], *s;
+  unsigned short get = 0, status = 0, k = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Waiting for HTTP request/response...\n"));
+  *soap->endpoint = '\0';
+  soap->length = 0;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->action = NULL;
+  soap->authrealm = NULL;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP status: %s\n", soap->msgbuf));
+    for (;;)
+    { if (soap_getline(soap, header, SOAP_HDRLEN))
+      { if (soap->error == SOAP_EOF)
+	{ soap->error = SOAP_OK;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "EOF in HTTP header, continue anyway\n"));
+	  break;
+	}
+        return soap->error;
+      }
+      if (!*header)
+        break;
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP header: %s\n", header));
+      s = strchr(header, ':');
+      if (s)
+      { *s = '\0';
+        do s++;
+        while (*s && *s <= 32);
+        if ((soap->error = soap->fparsehdr(soap, header, s)))
+        { if (soap->error < SOAP_STOP)
+	    return soap->error;
+	  status = soap->error;
+	  soap->error = SOAP_OK;
+        }
+      }
+    }
+    if ((s = strchr(soap->msgbuf, ' ')))
+    { k = (unsigned short)soap_strtoul(s, &s, 10);
+      if (!soap_blank(*s))
+        k = 0;
+    }
+    else
+      k = 0;
+  } while (k == 100);
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Finished HTTP header parsing\n"));
+  s = strstr(soap->msgbuf, "HTTP/");
+  if (s && s[7] != '1')
+  { if (soap->keep_alive == 1)
+      soap->keep_alive = 0;
+    if (k == 0 && (soap->omode & SOAP_IO) == SOAP_IO_CHUNK) /* k == 0 for HTTP request */
+    { soap->imode |= SOAP_IO_CHUNK;
+      soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE;
+    }
+  }
+  if (soap->keep_alive < 0)
+    soap->keep_alive = 1;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Keep alive connection = %d\n", soap->keep_alive));
+  if (s && (((get = !strncmp(soap->msgbuf, "GET ", 4))) || !strncmp(soap->msgbuf, "POST ", 5)))
+  { size_t m = strlen(soap->endpoint);
+    size_t n = m + (s - soap->msgbuf) - 5 - (!get);
+    if (n >= sizeof(soap->endpoint))
+      n = sizeof(soap->endpoint) - 1;
+    strncpy(soap->path, soap->msgbuf + 4 + (!get), n - m);
+    soap->path[n - m] = '\0';
+    strcat(soap->endpoint, soap->path);
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Target endpoint='%s'\n", soap->endpoint));
+    if (get)
+    { soap->error = soap->fget(soap);
+      if (soap->error == SOAP_OK)
+        soap->error = SOAP_STOP; /* prevents further processing */
+      return soap->error;
+    }
+    if (status)
+      return soap->error = status;
+    return SOAP_OK;
+  }
+  if (k == 0 || (k >= 200 && k <= 299) || k == 400 || k == 500)
+    return SOAP_OK;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP error %d\n", k));
+  return soap_set_receiver_error(soap, "HTTP error", soap->msgbuf, k);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse_header(struct soap *soap, const char *key, const char *val)
+{ if (!soap_tag_cmp(key, "Host"))
+  { 
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+      strcpy(soap->endpoint, "https://");
+    else
+#endif
+      strcpy(soap->endpoint, "http://");
+    strncat(soap->endpoint, val, sizeof(soap->endpoint) - 8);
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifndef WITH_LEANER
+  else if (!soap_tag_cmp(key, "Content-Type"))
+  { if (soap_get_header_attribute(soap, val, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+    else if (soap_get_header_attribute(soap, val, "multipart/related")
+          || soap_get_header_attribute(soap, val, "multipart/form-data"))
+    { soap->mime.boundary = soap_strdup(soap, soap_get_header_attribute(soap, val, "boundary"));
+      soap->mime.start = soap_strdup(soap, soap_get_header_attribute(soap, val, "start"));
+      soap->mode |= SOAP_ENC_MIME;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Content-Length"))
+    soap->length = soap_strtoul(val, NULL, 10);
+  else if (!soap_tag_cmp(key, "Content-Encoding"))
+  { if (!soap_tag_cmp(val, "deflate"))
+#ifdef WITH_ZLIB
+      soap->zlib_in = SOAP_ZLIB_DEFLATE;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+    else if (!soap_tag_cmp(val, "gzip"))
+#ifdef WITH_GZIP
+      soap->zlib_in = SOAP_ZLIB_GZIP;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+  }
+#ifdef WITH_ZLIB
+  else if (!soap_tag_cmp(key, "Accept-Encoding"))
+  {
+#ifdef WITH_GZIP
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "gzip"))
+      soap->zlib_out = SOAP_ZLIB_GZIP;
+    else
+#endif
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "deflate"))
+      soap->zlib_out = SOAP_ZLIB_DEFLATE;
+    else
+      soap->zlib_out = SOAP_ZLIB_NONE;
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Transfer-Encoding"))
+  { soap->mode &= ~SOAP_IO;
+    if (!soap_tag_cmp(val, "chunked"))
+      soap->mode |= SOAP_IO_CHUNK;
+  }
+  else if (!soap_tag_cmp(key, "Connection"))
+  { if (!soap_tag_cmp(val, "keep-alive"))
+      soap->keep_alive = -soap->keep_alive;
+    else if (!soap_tag_cmp(val, "close"))
+      soap->keep_alive = 0;
+  }
+#ifndef WITH_LEAN
+  else if (!soap_tag_cmp(key, "Authorization"))
+  { if (!soap_tag_cmp(val, "Basic *"))
+    { int n;
+      char *s;
+      soap_base642s(soap, val + 6, soap->tmpbuf, sizeof(soap->tmpbuf) - 1, &n);
+      soap->tmpbuf[n] = '\0';
+      if ((s = strchr(soap->tmpbuf, ':')))
+      { *s = '\0';
+	soap->userid = soap_strdup(soap, soap->tmpbuf);
+	soap->passwd = soap_strdup(soap, s + 1);
+      }
+    }
+  }
+  else if (!soap_tag_cmp(key, "WWW-Authenticate"))
+    soap->authrealm = soap_strdup(soap, soap_get_header_attribute(soap, val + 6, "realm"));
+  else if (!soap_tag_cmp(key, "Expect"))
+  { if (!soap_tag_cmp(val, "100-continue"))
+    { if ((soap->error = soap->fposthdr(soap, "HTTP/1.1 100 Continue", NULL))
+       || (soap->error = soap->fposthdr(soap, NULL, NULL)))
+        return soap->error;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "SOAPAction"))
+  { if (*val == '"')
+    { soap->action = soap_strdup(soap, val + 1);
+      soap->action[strlen(soap->action) - 1] = '\0';
+    }
+  }
+  else if (!soap_tag_cmp(key, "Location"))
+  { strncpy(soap->endpoint, val, sizeof(soap->endpoint));
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifdef WITH_COOKIES
+  else if (!soap_tag_cmp(key, "Cookie") || !soap_tag_cmp(key, "Set-Cookie"))
+    soap_getcookies(soap, val);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_get_header_attribute(struct soap *soap, const char *line, const char *key)
+{ register const char *s = line;
+  if (s)
+  { while (*s)
+    { register short flag;
+      s = soap_decode_key(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      flag = soap_tag_cmp(soap->tmpbuf, key);
+      s = soap_decode_val(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      if (!flag)
+        return soap->tmpbuf;
+    }
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_key(char *buf, size_t len, const char *val)
+{ return soap_decode(buf, len, val, "=,;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_val(char *buf, size_t len, const char *val)
+{ if (*val != '=')
+  { *buf = '\0';
+    return val;
+  }
+  return soap_decode(buf, len, val + 1, ",;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char*
+soap_decode(char *buf, size_t len, const char *val, const char *sep)
+{ const char *s;
+  char *t = buf;
+  for (s = val; *s; s++)
+    if (*s != ' ' && *s != '\t' && !strchr(sep, *s))
+      break;
+  if (*s == '"')
+  { s++;
+    while (*s && *s != '"' && --len)
+      *t++ = *s++;
+  }
+  else
+  { while (soap_notblank(*s) && !strchr(sep, *s) && --len)
+    { if (*s == '%')
+      { *t++ = ((s[1] >= 'A' ? (s[1] & 0x7) + 9 : s[1] - '0') << 4)
+              + (s[2] >= 'A' ? (s[2] & 0x7) + 9 : s[2] - '0');
+        s += 3;
+      }
+      else
+        *t++ = *s++;
+    }
+  }
+  *t = '\0';
+  while (*s && !strchr(sep, *s))
+    s++;
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_out(struct soap *soap)
+{
+#ifndef WITH_LEANER
+  size_t n = 0;
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->mime.start)
+  { const char *s;
+    if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+      s = "application/dime";
+    else if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+    sprintf(soap->tmpbuf, "--%s\r\nContent-Type: %s\r\nContent-Transfer-Encoding: binary\r\nContent-ID: %s\r\n\r\n", soap->mime.boundary, s, soap->mime.start);
+    n = strlen(soap->tmpbuf);
+    if (soap_send_raw(soap, soap->tmpbuf, n))
+      return soap->error;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    soap->dime.size = soap->count;	/* DIME in MIME correction */
+  if (!(soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME))
+  { if (soap_putdimehdr(soap))
+      return soap->error;
+  }
+#endif
+  soap->part = SOAP_IN_ENVELOPE;
+  return soap_element_begin_out(soap, "SOAP-ENV:Envelope", 0, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Envelope"))
+    return soap->error;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { soap->dime.size = soap->count - soap->dime.size;	/* DIME in MIME correction */
+    sprintf(soap->id, soap->dime_id_format, 0);
+    soap->dime.id = soap->id;
+    if (soap->local_namespaces)
+    { if (soap->local_namespaces[0].out)
+        soap->dime.type = (char*)soap->local_namespaces[0].out;
+      else
+        soap->dime.type = (char*)soap->local_namespaces[0].ns;
+    }
+    soap->dime.options = NULL;
+    soap->dime.flags = SOAP_DIME_MB | SOAP_DIME_ABSURI;
+    if (!soap->dime.first)
+      soap->dime.flags |= SOAP_DIME_ME;
+    soap->count += 12 + ((strlen(soap->dime.id)+3)&(~3)) + ((strlen(soap->dime.type)+3)&(~3));
+  }
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+    return soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+#endif
+  soap->part = SOAP_END_ENVELOPE;
+  return SOAP_OK;
+} 
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_in(struct soap *soap)
+{ register struct Namespace *p;
+  soap->part = SOAP_IN_ENVELOPE;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Envelope", 0))
+    return soap->error = SOAP_VERSIONMISMATCH;
+  p = soap->local_namespaces;
+  if (p)
+  { const char *ns = p[0].out;
+    if (!ns)
+      ns = p[0].ns;
+    if (!strcmp(ns, soap_env1))
+    { soap->version = 1; /* make sure we use SOAP 1.1 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc1))))
+        strcpy(p[1].out, soap_enc1);
+    }
+    else if (!strcmp(ns, soap_env2))
+    { soap->version = 2; /* make sure we use SOAP 1.2 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc2))))
+        strcpy(p[1].out, soap_enc2);
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_in(struct soap *soap)
+{ soap->part = SOAP_END_ENVELOPE;
+  return soap_element_end_in(soap, "SOAP-ENV:Envelope");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_out(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap->version == 1)
+    soap->encoding = 1;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_SEC) && soap_set_attr(soap, "wsu:Id", "Body"))
+    return soap->error;
+#endif
+  if (soap_element(soap, "SOAP-ENV:Body", 0, NULL))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Body"))
+    return soap->error;
+  soap->part = SOAP_END_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_in(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Body", 0))
+    return soap->error;
+  if (!soap->body)
+    soap->part = SOAP_NO_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_in(struct soap *soap)
+{ if (soap->part == SOAP_NO_BODY)
+    return SOAP_OK;
+  soap->part = SOAP_END_BODY;
+  return soap_element_end_in(soap, "SOAP-ENV:Body");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_header(struct soap *soap)
+{ if (soap_getheader(soap) && soap->error == SOAP_TAG_MISMATCH)
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_endpoint(struct soap *soap, const char *endpoint)
+{ register const char *s;
+  register size_t i, n;
+  soap->endpoint[0] = '\0';
+  soap->host[0] = '\0';
+  soap->path[0] = '/';
+  soap->path[1] = '\0';
+  soap->port = 80;
+  if (!endpoint || !*endpoint)
+    return;
+  if (!strncmp(endpoint, "https:", 6))
+    soap->port = 443;
+  strncpy(soap->endpoint, endpoint, sizeof(soap->endpoint) - 1);
+  s = strchr(endpoint, ':');
+  if (s && s[1] == '/' && s[2] == '/')
+    s += 3;
+  else
+    s = endpoint;
+  n = strlen(s);
+  if (n >= sizeof(soap->host))
+    n = sizeof(soap->host) - 1;
+#ifdef WITH_IPV6
+  if (s[0] == '[')
+  { s++;
+    for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == ']')
+      { s++;
+        break; 
+      }
+    }
+  }
+  else
+  { for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == '/' || s[i] == ':')
+        break; 
+    }
+  }
+#else
+  for (i = 0; i < n; i++)
+  { soap->host[i] = s[i];
+    if (s[i] == '/' || s[i] == ':')
+      break; 
+  }
+#endif
+  soap->host[i] = '\0';
+  if (s[i] == ':')
+  { soap->port = (int)atol(s + i + 1);
+    for (i++; i < n; i++)
+      if (s[i] == '/')
+        break;
+  }
+  if (s[i])
+  { strncpy(soap->path, s + i, sizeof(soap->path));
+    soap->path[sizeof(soap->path) - 1] = '\0';
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect(struct soap *soap, const char *endpoint, const char *action)
+{ return soap_connect_command(soap, SOAP_POST, endpoint, action);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect_command(struct soap *soap, int http_command, const char *endpoint, const char *action)
+{ char host[sizeof(soap->host)];
+  int port;
+  size_t count;
+  soap->error = SOAP_OK;
+  strcpy(host, soap->host); /* save to compare */
+  port = soap->port; /* save to compare */
+  soap_set_endpoint(soap, endpoint);
+#ifndef WITH_LEANER
+  if (soap->fconnect)
+  { if ((soap->error = soap->fconnect(soap, endpoint, soap->host, soap->port)))
+      return soap->error;
+  }
+  else
+#endif
+  if (soap->fopen && *soap->host)
+  { soap->status = http_command;
+    if (!soap->keep_alive || !soap_valid_socket(soap->socket) || strcmp(soap->host, host) || soap->port != port || !soap->fpoll || soap->fpoll(soap))
+    { soap->keep_alive = 0; /* to force close */
+      soap->omode &= ~SOAP_IO_UDP; /* to force close */
+      soap_closesock(soap);
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Connect/reconnect to host='%s' path='%s' port=%d\n", soap->host, soap->path, soap->port));
+#ifdef WITH_UDP
+      if (!strncmp(endpoint, "soap.udp:", 9))
+        soap->omode |= SOAP_IO_UDP;
+#endif
+      soap->socket = soap->fopen(soap, endpoint, soap->host, soap->port);
+      if (soap->error)
+        return soap->error;
+      soap->keep_alive = ((soap->omode & SOAP_IO_KEEPALIVE) != 0);
+    }
+  }
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML) && endpoint)
+  { unsigned int k = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((k & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fpost(soap, endpoint, soap->host, soap->port, soap->path, action, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((k & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = k;
+  }
+  else if (action)
+    soap->action = soap_strdup(soap, action);
+  if (http_command != SOAP_POST)
+    return soap_end_send(soap);
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2base64(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register int i;
+  register unsigned long m;
+  register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, (n + 2) / 3 * 4 + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (!s)
+    return p;
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    t += 4;
+  }
+  t[0] = '\0';
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      t[i] = '=';
+    t[4] = '\0';
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_base642s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register int i, j, c;
+  register unsigned long m;
+  register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = (strlen(s) + 3) / 4 * 3;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  if (n)
+    *n = 0;
+  for (;;)
+  { for (i = 0; i < SOAP_BLKLEN; i++)
+    { m = 0;
+      j = 0;
+      while (j < 4)
+      { c = *s++;
+        if (c == '=' || !c)
+        { i *= 3;
+          switch (j)
+          { case 2:
+              *t++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *t++ = (char)((m >> 10) & 0xFF);
+              *t++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n += i;
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      }
+      *t++ = (char)((m >> 16) & 0xFF);
+      *t++ = (char)((m >> 8) & 0xFF);
+      *t++ = (char)(m & 0xFF);
+      if (l < 3)
+      { if (n)
+	  *n += i;
+        return p;
+      }
+      l -= 3;
+    }
+    if (n)
+      *n += 3 * SOAP_BLKLEN;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2hex(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, 2 * n + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (s)
+  { for (; n > 0; n--)
+    { register int m = *s++;
+      *t++ = (char)((m >> 4) + (m > 159 ? 'a' - 10 : '0'));
+      m &= 0x0F;
+      *t++ = (char)(m + (m > 9 ? 'a' - 10 : '0'));
+    }
+  }
+  *t++ = '\0';
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_hex2s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = strlen(s) / 2;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  while (l)
+  { register int d1, d2;
+    d1 = *s++;
+    if (!d1)
+      break;
+    d2 = *s++;
+    if (!d2)
+      break;
+    *t++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    l--;
+  }
+  if (n)
+    *n = t - p;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthttphdr(struct soap *soap, int status, size_t count)
+{ register const char *s = NULL;
+  register int err = SOAP_OK;
+#ifndef WITH_LEANER
+  register const char *r = NULL;
+#endif
+  if (status == SOAP_FILE && soap->http_content)
+    s = soap->http_content;
+  else if (status == SOAP_HTML)
+    s = "text/html; charset=utf-8";
+  else if (count || ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK))
+  { if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+  }
+#ifndef WITH_LEANER
+  if (soap->mode & (SOAP_ENC_DIME | SOAP_ENC_MTOM))
+  { if (soap->mode & SOAP_ENC_MTOM)
+    { r = s;
+      s = "application/xop+xml; charset=utf-8";
+    }
+    else
+      s = "application/dime";
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->status != SOAP_GET)
+  { register const char *t = strchr(s, ';');
+    sprintf(soap->tmpbuf, "multipart/related; boundary=\"%s\"; type=\"", soap->mime.boundary);
+    if (t)
+      strncat(soap->tmpbuf, s, t - s);
+    else
+      strcat(soap->tmpbuf, s);
+    if (soap->mime.start)
+    { strcat(soap->tmpbuf, "\"; start=\"");
+      strcat(soap->tmpbuf, soap->mime.start);
+    }
+    strcat(soap->tmpbuf, "\"");
+    if (r)
+    { strcat(soap->tmpbuf, "; start-info=\"");
+      strcat(soap->tmpbuf, r);
+      strcat(soap->tmpbuf, "\"");
+    }
+    s = soap->tmpbuf;
+  }
+#endif
+  if (s && (err = soap->fposthdr(soap, "Content-Type", s)))
+    return err;
+#ifdef WITH_ZLIB
+  if (soap->omode & SOAP_ENC_ZLIB)
+  {
+#ifdef WITH_GZIP
+    err = soap->fposthdr(soap, "Content-Encoding", "gzip");
+#else
+    err = soap->fposthdr(soap, "Content-Encoding", "deflate");
+#endif
+    if (err)
+      return err;
+  }
+#endif
+#ifndef WITH_LEANER
+  if ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK)
+    err = soap->fposthdr(soap, "Transfer-Encoding", "chunked");
+  else
+#endif
+  if (soap->status != SOAP_GET)
+  { sprintf(soap->tmpbuf, "%lu", (unsigned long)count);
+    err = soap->fposthdr(soap, "Content-Length", soap->tmpbuf);
+  }
+  if (err)
+    return err;
+  return soap->fposthdr(soap, "Connection", soap->keep_alive ? "keep-alive" : "close");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_get(struct soap *soap)
+{ return SOAP_GET_METHOD;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post(struct soap *soap, const char *endpoint, const char *host, int port, const char *path, const char *action, size_t count)
+{ register const char *s;
+  register int err;
+  if (soap->status == SOAP_GET)
+    s = "GET";
+  else
+    s = "POST";
+#ifdef PALM
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)) && strncmp(endpoint, "_beam:", 6) && strncmp(endpoint, "_local:", 7) && strncmp(endpoint, "_btobex:", 8))
+#else
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)))
+#endif
+    return SOAP_OK;
+  if (soap->proxy_host && strncmp(endpoint, "https:", 6))
+    sprintf(soap->tmpbuf, "%s %s HTTP/%s", s, endpoint, soap->http_version);
+  else
+    sprintf(soap->tmpbuf, "%s /%s HTTP/%s", s, (*path == '/' ? path + 1 : path), soap->http_version);
+  if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+    return err;
+  if (port != 80)
+    sprintf(soap->tmpbuf, "%s:%d", host, port);
+  else
+    strcpy(soap->tmpbuf, host); 
+  if ((err = soap->fposthdr(soap, "Host", soap->tmpbuf))
+   || (err = soap->fposthdr(soap, "User-Agent", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, SOAP_OK, count)))
+    return err;
+#ifdef WITH_ZLIB
+#ifdef WITH_GZIP
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "gzip, deflate")))
+#else
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "deflate")))
+#endif
+    return err;
+#endif
+#ifndef WITH_LEAN
+  if (soap->userid && soap->passwd && strlen(soap->userid) + strlen(soap->passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Authorization", soap->tmpbuf)))
+      return err;
+  }
+  if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+      return err;
+  }
+#endif
+#ifdef WITH_COOKIES
+#ifdef WITH_OPENSSL
+  if (soap_putcookies(soap, host, path, soap->ssl != NULL))
+    return soap->error;
+#else
+  if (soap_putcookies(soap, host, path, 0))
+    return soap->error;
+#endif
+#endif
+  if (action && soap->version == 1)
+  { sprintf(soap->tmpbuf, "\"%s\"", action);
+    if ((err = soap->fposthdr(soap, "SOAPAction", soap->tmpbuf)))
+      return err;
+  }
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_send_header(struct soap *soap, const char *s)
+{ register const char *t;
+  do
+  { t = strchr(s, '\n'); /* disallow \n in HTTP headers */
+    if (!t)
+      t = s + strlen(s);
+    if (soap_send_raw(soap, s, t - s))
+      return soap->error;
+    s = t + 1;
+  } while (*t);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post_header(struct soap *soap, const char *key, const char *val)
+{ if (key)
+  { if (http_send_header(soap, key))
+      return soap->error;
+    if (val && (soap_send_raw(soap, ": ", 2) || http_send_header(soap, val)))
+      return soap->error;
+  }
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_response(struct soap *soap, int status, size_t count)
+{ register int err;
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    httpOutputEnable(soap->rpmreqid);
+#endif
+  if (!status || status == SOAP_HTML || status == SOAP_FILE)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "OK 200\n"));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s 200 OK", soap->http_version);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", "200 OK")))
+      return err;
+  }
+  else if (status > 200 && status < 600)
+  { sprintf(soap->tmpbuf, "HTTP/%s %d %s", soap->http_version, status, http_error(soap, status));
+    if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      return err;
+#ifndef WITH_LEAN 
+    if (status == 401)
+    { sprintf(soap->tmpbuf, "Basic realm=\"%s\"", soap->authrealm ? soap->authrealm : "gSOAP Web Service");
+      if ((err = soap->fposthdr(soap, "WWW-Authenticate", soap->tmpbuf)))
+        return err;
+    }
+    else if ((status >= 301 && status <= 303) || status == 307)
+    { if ((err = soap->fposthdr(soap, "Location", soap->endpoint)))
+        return err;
+    }
+#endif
+  }
+  else
+  { const char *s = *soap_faultcode(soap);
+    if (soap->version == 2 && !strcmp(s, "SOAP-ENV:Sender"))
+      s = "400 Bad Request";
+    else
+      s = "500 Internal Server Error";
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error %s (status=%d)\n", s, status));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s %s", soap->http_version, s);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", s)))
+      return err;
+  }
+  if ((err = soap->fposthdr(soap, "Server", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, status, count)))
+    return err;
+#ifdef WITH_COOKIES
+  if (soap_putsetcookies(soap))
+    return soap->error;
+#endif
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_response(struct soap *soap, int status)
+{ register size_t count;
+  if (!(soap->omode & (SOAP_ENC_XML | SOAP_IO_STORE /* this tests for chunking too */))
+   && (status == SOAP_HTML || status == SOAP_FILE))
+  { soap->omode &= ~SOAP_IO;
+    soap->omode |= SOAP_IO_STORE;
+  }
+  soap->status = status;
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML))
+  { register int n = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((n & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fresponse(soap, status, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((n & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = n;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static const char*
+soap_set_validation_fault(struct soap *soap, const char *s, const char *t)
+{ if (*soap->tag)
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s in element <%s>", s, t?t:SOAP_STR_EOS, soap->tag);
+  else
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s", s, t?t:SOAP_STR_EOS);
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_fault(struct soap *soap)
+{ const char **c = soap_faultcode(soap);
+  const char **s = soap_faultstring(soap);
+  if (!*c && !*s && soap->fseterror)
+    soap->fseterror(soap, c, s);
+  if (!*c)
+  { if (soap->version == 2)
+      *c = "SOAP-ENV:Sender";
+    else
+      *c = "SOAP-ENV:Client";
+  }
+  if (*s)
+    return;
+  switch (soap->error)
+  {
+#ifndef WITH_LEAN
+    case SOAP_CLI_FAULT:
+      *s = "Client fault";
+      break;
+    case SOAP_SVR_FAULT:
+      *s = "Server fault";
+      break;
+    case SOAP_TAG_MISMATCH:
+      *s = soap_set_validation_fault(soap, "tag name or namespace mismatch", NULL);
+      break;
+    case SOAP_TYPE:
+      *s = soap_set_validation_fault(soap, "data type mismatch ", soap->type);
+      break;
+    case SOAP_SYNTAX_ERROR:
+      *s = "Well-formedness violation";
+      break;
+    case SOAP_NO_TAG:
+      *s = "No XML element tag";
+      break;
+    case SOAP_MUSTUNDERSTAND:
+      *c = "SOAP-ENV:MustUnderstand";
+      sprintf(soap->msgbuf, "The data in element '%s' must be understood but cannot be handled", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_VERSIONMISMATCH:
+      *c = "SOAP-ENV:VersionMismatch";
+      *s = "SOAP version mismatch or invalid SOAP message";
+      break;
+    case SOAP_DATAENCODINGUNKNOWN:
+      *c = "SOAP-ENV:DataEncodingUnknown";
+      *s = "Unsupported SOAP data encoding";
+      break;
+    case SOAP_NAMESPACE:
+      *s = soap_set_validation_fault(soap, "namespace mismatch", NULL);
+      break;
+    case SOAP_USER_ERROR:
+      *s = "User error";
+      break;
+    case SOAP_FATAL_ERROR:
+      *s = "Fatal error";
+      break;
+    case SOAP_NO_METHOD:
+      sprintf(soap->msgbuf, "Method '%s' not implemented: method name or namespace not recognized", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_GET_METHOD:
+      *s = "HTTP GET method not implemented";
+      break;
+    case SOAP_EOM:
+      *s = "Out of memory";
+      break;
+    case SOAP_IOB:
+      *s = "Array index out of bounds";
+      break;
+    case SOAP_NULL:
+      *s = soap_set_validation_fault(soap, "nil not allowed", NULL);
+      break;
+    case SOAP_DUPLICATE_ID:
+      *s = soap_set_validation_fault(soap, "multiple definitions of id ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:DuplicateID";
+      break;
+    case SOAP_MISSING_ID:
+      *s = soap_set_validation_fault(soap, "missing id for ref ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:MissingID";
+      break;
+    case SOAP_HREF:
+      *s = soap_set_validation_fault(soap, "incompatible object ref ", soap->id);
+      break;
+    case SOAP_FAULT:
+      break;
+#ifndef WITH_NOIO
+    case SOAP_UDP_ERROR:
+      *s = "Message too large for UDP packet";
+      break;
+    case SOAP_TCP_ERROR:
+      *s = tcp_error(soap);
+      break;
+#endif
+    case SOAP_HTTP_ERROR:
+      *s = "HTTP error";
+      break;
+    case SOAP_SSL_ERROR:
+#ifdef WITH_OPENSSL
+      *s = "SSL error";
+#else
+      *s = "OpenSSL not installed: recompile with -DWITH_OPENSSL";
+#endif
+      break;
+    case SOAP_PLUGIN_ERROR:
+      *s = "Plugin registry error";
+      break;
+    case SOAP_DIME_ERROR:
+      *s = "DIME format error";
+      break;
+    case SOAP_DIME_HREF:
+      *s = "DIME href to missing attachment";
+      break;
+    case SOAP_DIME_MISMATCH:
+      *s = "DIME version/transmission error";
+      break;
+    case SOAP_DIME_END:
+      *s = "End of DIME error";
+      break;
+    case SOAP_MIME_ERROR:
+      *s = "MIME format error";
+      break;
+    case SOAP_MIME_HREF:
+      *s = "MIME href to missing attachment";
+      break;
+    case SOAP_MIME_END:
+      *s = "End of MIME error";
+      break;
+    case SOAP_ZLIB_ERROR:
+#ifdef WITH_ZLIB
+      sprintf(soap->msgbuf, "Zlib/gzip error: '%s'", soap->d_stream.msg?soap->d_stream.msg:"");
+      *s = soap->msgbuf;
+#else
+      *s = "Zlib/gzip not installed for (de)compression: recompile with -DWITH_GZIP";
+#endif
+      break;
+    case SOAP_REQUIRED:
+      *s = soap_set_validation_fault(soap, "missing required attribute", NULL);
+      break;
+    case SOAP_PROHIBITED:
+      *s = soap_set_validation_fault(soap, "prohibited attribute present", NULL);
+      break;
+    case SOAP_OCCURS:
+      *s = soap_set_validation_fault(soap, "min/maxOccurs violation", NULL);
+      break;
+    case SOAP_LENGTH:
+      *s = soap_set_validation_fault(soap, "content length violation", NULL);
+      break;
+    case SOAP_STOP:
+      *s = "Stopped: no response sent";
+      break;
+#endif
+    case SOAP_EOF:
+#ifndef WITH_NOIO
+      sprintf(soap->msgbuf, "End of file or no input: '%s'", soap_strerror(soap));
+      *s = soap->msgbuf;
+      break;
+#else
+      *s = "End of file or no input";
+      break;
+#endif
+    default:
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+      if (soap->error > 200 && soap->error < 600)
+      { sprintf(soap->msgbuf, "HTTP Error: %d %s", soap->error, http_error(soap, soap->error));
+        *s = soap->msgbuf;
+      }
+      else
+#endif
+#endif
+      { sprintf(soap->msgbuf, "Error %d", soap->error);
+        *s = soap->msgbuf;
+      }
+    }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_fault(struct soap *soap)
+{ register int status = soap->error;
+  int r = 1;
+  if (status == SOAP_STOP)
+    return status;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Sending back fault struct for error code %d\n", soap->error));
+  soap->keep_alive = 0; /* to terminate connection */
+  soap_set_fault(soap);
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+  if (soap_valid_socket(soap->socket))
+  { struct timeval timeout;
+    fd_set rfd, sfd;
+    timeout.tv_sec = 0;
+    timeout.tv_usec = 0;
+    FD_ZERO(&rfd);
+    FD_ZERO(&sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, NULL, &timeout);
+    if (r > 0)
+    { if (!FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       || (FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        && recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) < 0))
+        r = 0;
+    }
+  }
+#endif
+#endif
+  if ((status != SOAP_EOF || (!soap->recv_timeout && !soap->send_timeout)) && r > 0)
+  { soap->error = SOAP_OK;
+    soap_serializeheader(soap);
+    soap_serializefault(soap);
+    soap_begin_count(soap);
+    if (soap->mode & SOAP_IO_LENGTH)
+    { soap_envelope_begin_out(soap);
+      soap_putheader(soap);
+      soap_body_begin_out(soap);
+      soap_putfault(soap);
+      soap_body_end_out(soap);
+      soap_envelope_end_out(soap);
+    }
+    soap_end_count(soap);
+    if (soap_response(soap, status)
+     || soap_envelope_begin_out(soap)
+     || soap_putheader(soap)
+     || soap_body_begin_out(soap)
+     || soap_putfault(soap)
+     || soap_body_end_out(soap)
+     || soap_envelope_end_out(soap))
+      return soap_closesock(soap);
+    soap_end_send(soap);
+  }
+  soap->error = status;
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_fault(struct soap *soap)
+{ register int status = soap->error;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Receiving SOAP Fault\n"));
+  soap->error = SOAP_OK;
+  if (soap_getfault(soap))
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Error: soap_get_soapfault() failed. Is this a SOAP message at all?\n"));
+    *soap_faultcode(soap) = (soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client");
+    soap->error = status;
+    soap_set_fault(soap);
+  }
+  else
+  { register const char *s = *soap_faultcode(soap);
+    if (!soap_match_tag(soap, s, "SOAP-ENV:Server") || !soap_match_tag(soap, s, "SOAP-ENV:Receiver"))
+      status = SOAP_SVR_FAULT; 
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:Client") || !soap_match_tag(soap, s, "SOAP-ENV:Sender"))
+      status = SOAP_CLI_FAULT;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:MustUnderstand"))
+      status = SOAP_MUSTUNDERSTAND;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:VersionMismatch"))
+      status = SOAP_VERSIONMISMATCH;
+    else
+    { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Fault code %s\n", s));
+      status = SOAP_FAULT;
+    }
+    if (soap_body_end_in(soap)
+     || soap_envelope_end_in(soap)
+     || soap_end_recv(soap))
+      return soap_closesock(soap);
+    soap->error = status;
+  }
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_empty_response(struct soap *soap)
+{ soap->count = 0;
+  if (soap_response(soap, SOAP_OK) || soap_end_send(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_empty_response(struct soap *soap)
+{ if (soap_begin_recv(soap) || soap_end_recv(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+soap_strerror(struct soap *soap)
+{ register int err = soap->errnum;
+  if (err)
+  {
+#ifndef WIN32
+    return strerror(err);
+#else
+    FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, (LPTSTR)&soap->errorstr, sizeof(soap->errorstr), NULL);
+    return soap->errorstr;
+#endif
+  }
+  return "Operation interrupted or timed out";
+}
+#endif
+#endif 
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_set_error(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail, int soaperror)
+{ *soap_faultcode(soap) = faultcode;
+  if (faultsubcode)
+    *soap_faultsubcode(soap) = faultsubcode;
+  *soap_faultstring(soap) = faultstring;
+  if (faultdetail && *faultdetail)
+  { register const char **s = soap_faultdetail(soap);
+    if (s)
+      *s = faultdetail;
+  }
+  return soap->error = soaperror;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_sender_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_receiver_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_copy_fault(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ char *r = NULL, *s = NULL, *t = NULL;
+  if (faultsubcode)
+    r = soap_strdup(soap, faultsubcode);
+  if (faultstring)
+    s = soap_strdup(soap, faultstring);
+  if (faultdetail)
+    t = soap_strdup(soap, faultdetail);
+  return soap_set_error(soap, faultcode, r, s, t, SOAP_FAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_sender_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_receiver_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault(struct soap *soap, FILE *fd)
+{ if (soap_check_state(soap))
+    fprintf(fd, "Error: soap struct not initialized\n");
+  else if (soap->error)
+  { const char *c, *v = NULL, *s, **d;
+    d = soap_faultcode(soap);
+    if (!*d)
+      soap_set_fault(soap);
+    c = *d;
+    if (soap->version == 2)
+      v = *soap_faultsubcode(soap);
+    s = *soap_faultstring(soap);
+    d = soap_faultdetail(soap);
+    fprintf(fd, "%s%d fault: %s [%s]\n\"%s\"\nDetail: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, c, v ? v : "no subcode", s ? s : "[no reason]", d && *d ? *d : "[no detail]");
+  }
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault_location(struct soap *soap, FILE *fd)
+{ 
+#ifndef WITH_LEAN
+  int i, j, c1, c2;
+  if (soap->error && soap->buflen > 0)
+  { i = (int)soap->bufidx - 1;
+    if (i <= 0)
+      i = 0;
+    c1 = soap->buf[i];
+    soap->buf[i] = '\0';
+    if ((int)soap->buflen >= i + 1024)
+      j = i + 1023;
+    else
+      j = (int)soap->buflen - 1;
+    c2 = soap->buf[j];
+    soap->buf[j] = '\0';
+    fprintf(fd, "%s%c\n** HERE **\n", soap->buf, c1);
+    if (soap->bufidx < soap->buflen)
+      fprintf(fd, "%s\n", soap->buf + soap->bufidx);
+    soap->buf[i] = c1;
+    soap->buf[j] = c2;
+  }
+#endif
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void *arg)
+{ register struct soap_plugin *p;
+  register int r;
+  if (!(p = (struct soap_plugin*)SOAP_MALLOC(soap, sizeof(struct soap_plugin))))
+    return soap->error = SOAP_EOM;
+  p->id = NULL;
+  p->data = NULL;
+  p->fcopy = NULL;
+  p->fdelete = NULL;
+  r = fcreate(soap, p, arg);
+  if (!r && p->fdelete)
+  { p->next = soap->plugins;
+    soap->plugins = p;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Registered '%s' plugin\n", p->id));
+    return SOAP_OK;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not register plugin '%s': plugin returned error %d (or fdelete callback not set)\n", p->id?p->id:"?", r));
+  SOAP_FREE(soap, p);
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static void *
+fplugin(struct soap *soap, const char *id)
+{ register struct soap_plugin *p;
+  for (p = soap->plugins; p; p = p->next)
+    if (p->id == id || !strcmp(p->id, id))
+      return p->data;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void *
+SOAP_FMAC2
+soap_lookup_plugin(struct soap *soap, const char *id)
+{ return soap->fplugin(soap, id);
+}
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap()
+{ soap_init(this);
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	C++ soap struct methods
+ *
+\******************************************************************************/
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode mode)
+{ soap_init1(this, mode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode imode, soap_mode omode)
+{ soap_init2(this, imode, omode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(struct soap& soap)
+{ soap_copy_context(this, &soap);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::~soap()
+{ soap_destroy(this);
+  soap_end(this);
+  soap_done(this);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/gsoap-palm/stdsoap2.h b/gsoap-palm/stdsoap2.h
new file mode 100644
index 0000000..1b6c74d
--- /dev/null
+++ b/gsoap-palm/stdsoap2.h
@@ -0,0 +1,2093 @@
+/*
+
+stdsoap2.h 2.7.6e
+
+gSOAP runtime
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+Contributors:
+
+Wind River Systems, Inc., for the following additions (marked WR[...]):
+  - vxWorks compatible
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#ifdef WITH_SOAPDEFS_H
+# include "soapdefs.h"		/* include user-defined stuff */
+#endif
+
+#ifndef _THREAD_SAFE
+# define _THREAD_SAFE
+#endif
+
+#ifndef OPENSERVER
+# ifndef _REENTRANT
+#  define _REENTRANT
+# endif
+#endif
+
+#ifndef SOAP_FMAC1	/* stdsoap2.h declaration macro */
+# define SOAP_FMAC1
+#endif
+
+#ifndef SOAP_FMAC2	/* stdsoap2.h declaration macro */
+# define SOAP_FMAC2
+#endif
+
+#ifndef SOAP_FMAC3	/* (de)serializer declaration macro */
+# define SOAP_FMAC3
+#endif
+
+#ifndef SOAP_FMAC3S	/* string converter for (de)serializer declaration macro */
+# define SOAP_FMAC3S SOAP_FMAC3
+#endif
+
+#ifndef SOAP_FMAC4	/* (de)serializer declaration macro */
+# define SOAP_FMAC4
+#endif
+
+#ifndef SOAP_FMAC4S	/* string converter for (de)serializer declaration macro */
+# define SOAP_FMAC4S SOAP_FMAC4
+#endif
+
+#ifndef SOAP_FMAC5	/* stub/skeleton declaration macro */
+# define SOAP_FMAC5
+#endif
+
+#ifndef SOAP_FMAC6	/* stub/skeleton declaration macro */
+# define SOAP_FMAC6
+#endif
+
+#ifndef SOAP_CMAC	/* class declaration macro */
+# define SOAP_CMAC
+#endif
+
+#ifndef SOAP_NMAC	/* namespace table declaration macro */
+# define SOAP_NMAC
+#endif
+
+#ifndef SOAP_SOURCE_STAMP
+# define SOAP_SOURCE_STAMP(str)
+#endif
+
+/* gSOAP 2.7.4 and higher: fast look-aside buffering is stable */
+#ifndef WITH_FAST
+# define WITH_FAST
+#endif
+
+#ifdef WITH_LEANER
+# ifndef WITH_LEAN
+#  define WITH_LEAN
+# endif
+#endif
+
+#ifdef WITH_LEAN
+# ifdef WITH_COOKIES
+#  error "Cannot build WITH_LEAN code WITH_COOKIES enabled"
+# endif
+#endif
+
+#ifndef STDSOAP_H
+#define STDSOAP_H
+
+#if defined(__vxworks) || defined(__VXWORKS__)
+# define VXWORKS
+#endif
+
+#ifdef _WIN32
+# ifndef WIN32
+#  define WIN32
+# endif
+#endif
+
+#ifdef UNDER_CE
+# ifndef WIN32
+#  define WIN32
+# endif
+#endif
+
+#ifdef __BORLANDC__
+# ifdef __WIN32__
+#  ifndef WIN32
+#   define WIN32
+#  endif
+# endif
+#endif
+
+#ifdef __CYGWIN__
+# ifndef CYGWIN
+#  define CYGWIN
+# endif
+#endif
+
+#ifdef __SYMBIAN32__ 
+# define SYMBIAN
+# undef WIN32
+#endif
+
+#if defined(__palmos__) || defined(PALM_GCC) || defined(__PALMOS_TRAPS__)
+# ifndef PALM
+#  define PALM
+# endif
+#endif
+
+#if defined(__hpux)
+# ifndef HP_UX
+#  define HP_UX
+# endif
+#endif
+
+#if defined(__alpha) && !defined(__VMS)
+# ifndef TRU64
+#  define TRU64 
+# endif
+#endif
+
+#ifdef __MVS__
+# ifndef OS390
+#  define OS390
+# endif
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+# ifdef WITH_OPENSSL
+#  ifndef HAVE_OPENSSL_SSL_H
+#   undef WITH_OPENSSL
+#  endif
+# endif
+#else
+# if defined(UNDER_CE)
+#  define WITH_LEAN
+#  define HAVE_SSCANF
+# elif defined(WIN32)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define SOAP_LONG_FORMAT "%I64d"
+#  define SOAP_ULONG_FORMAT "%I64u"
+# elif defined(CYGWIN)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(__APPLE__)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_TIMEGM
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(_AIXVERSION_431)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(HP_UX)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(FREEBSD) || defined(__FreeBSD__)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_STRTOLL
+#  define HAVE_STRTOULL
+#  define HAVE_GETTIMEOFDAY
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define SOAP_LONG_FORMAT "%qd"
+#  define SOAP_ULONG_FORMAT "%qu"
+# elif defined(__VMS)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(__GLIBC__) || defined(__GNU__)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_STRTOLL
+#  define HAVE_STRTOULL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_TIMEGM
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define HAVE_ISNAN
+# elif defined(TRU64)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_STRTOLL
+#  define HAVE_STRTOULL
+#  define HAVE_GETTIMEOFDAY
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define __USE_STD_IOSTREAM
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define SOAP_LONG_FORMAT "%ld"
+#  define SOAP_ULONG_FORMAT "%lu"
+# elif defined(MAC_CARBON)
+#  define WITH_NOIO
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GETHOSTBYNAME_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(PALM)
+#  define WITH_LEAN
+#  define HAVE_STRTOD   /* strtod() is defined in palmFunctions.h */
+#  include <stdlib.h>	/* Needs to be included before unix headers */
+#  include <sys_types.h>
+#  define IGNORE_STDIO_STUBS
+#  include <StdIOPalm.h>
+#  define O_NONBLOCK FNONBIO
+#  include <sys_socket.h>
+#  include "palmFunctions.h"
+# elif defined(SYMBIAN)
+#  define WITH_LEAN
+#  define WITH_NONAMESPACES
+#  define HAVE_STRTOD	/* use STRTOD since sscanf doesn't seem to work */
+#  include <e32def.h>
+#  include <sys/ioctl.h>
+# elif defined(VXWORKS)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_PGMTIME_R
+#  define HAVE_PLOCALTIME_R
+#  define HAVE_MKTIME
+# elif defined(OS390)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(AS400)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# else
+/* Default asumptions on supported functions */
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GETHOSTBYNAME_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# endif
+#endif
+
+/* QNX does not have a working version of strtof */
+#if defined(__QNX__) || defined(QNX)
+# undef HAVE_STRTOF
+#endif
+
+#ifndef SOAP_LONG_FORMAT
+# define SOAP_LONG_FORMAT "%lld"	/* printf format for 64 bit ints */
+#endif
+
+#ifndef SOAP_ULONG_FORMAT
+# define SOAP_ULONG_FORMAT "%llu"	/* printf format for unsigned 64 bit ints */
+#endif
+
+#ifndef WITH_NOSTDLIB
+# include <stdlib.h>
+# ifndef PALM
+#  include <stdio.h>
+#  include <string.h>
+# endif
+# include <ctype.h>
+# include <limits.h>
+#endif
+
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+# include <string>
+# include <iostream>
+#endif
+
+#ifdef WITH_NOHTTP
+# ifndef WITH_NOIO
+#  define WITH_NOIO
+#  undef WITH_COOKIES
+# endif
+#endif
+
+#ifndef UNDER_CE
+# ifndef PALM
+#  ifndef WITH_NOIO
+#   include <errno.h>
+#   include <sys/types.h>
+#  endif
+#  ifndef WITH_LEAN
+#   ifdef HAVE_SYS_TIMEB_H
+#    include <sys/timeb.h>		/* for ftime() */
+#   endif
+#   include <time.h>
+#  endif
+# endif
+#endif
+
+#ifdef OPENSERVER
+# include <sys/socket.h>
+# include <sys/stream.h>
+# include <sys/protosw.h>
+  extern int h_errno;
+#endif
+
+#ifndef WITH_NOIO
+# ifndef WIN32
+#  ifndef PALM
+#   include <sys/socket.h>
+#   ifdef VXWORKS
+#    include <sockLib.h>
+#    include <selectLib.h>
+#   endif
+#   ifndef VXWORKS
+#    ifndef SYMBIAN
+#     include <strings.h>
+#    endif
+#   endif
+#   ifdef SUN_OS
+#    include <sys/stream.h>		/* SUN */
+#    include <sys/socketvar.h>		/* SUN < 2.8 (?) */
+#   endif
+#   ifdef VXWORKS
+#    ifdef _WRS_KERNEL
+#     include <sys/times.h>
+#    endif
+#   else
+#    include <sys/time.h>
+#   endif
+#   include <netinet/in.h>
+#   ifdef OS390
+#    include <netinet/tcp_var.h>
+#   else
+#    include <netinet/tcp.h>          /* TCP_NODELAY */
+#   endif
+#   include <arpa/inet.h>
+#  endif
+# endif
+#endif
+
+#ifdef WITH_FASTCGI
+# include <fcgi_stdio.h>
+#endif
+
+#ifdef WITH_OPENSSL
+# define OPENSSL_NO_KRB5
+# include <openssl/ssl.h>
+# include <openssl/err.h>
+# include <openssl/rand.h>
+# ifndef ALLOW_OLD_VERSIONS
+#  if (OPENSSL_VERSION_NUMBER < 0x00905100L)
+#   error "Must use OpenSSL 0.9.6 or later"
+#  endif
+# endif
+#endif
+
+#ifdef WITH_GZIP
+# ifndef WITH_ZLIB
+#  define WITH_ZLIB
+# endif
+#endif
+
+#ifdef WITH_CASEINSENSITIVETAGS
+# define SOAP_STRCMP soap_tag_cmp	/* case insensitve XML element/attribute names */
+#else
+# define SOAP_STRCMP strcmp		/* case sensitive XML element/attribute names */
+#endif
+
+#ifdef WITH_ZLIB
+# include <zlib.h>
+#endif
+
+#ifndef WITH_NOSTDLIB
+# ifndef PALM
+#  include <math.h>	/* for isnan() */
+# endif
+#endif
+
+/* #define DEBUG */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and messages (in file TEST.log) */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef WIN32
+# ifndef UNDER_CE
+#  include <io.h>
+#  include <fcntl.h>
+# endif
+# include <winsock.h>
+/* # include <winsock2.h> */ /* Alternative: use winsock2 (not available with eVC) */
+# ifdef WITH_IPV6
+#  include <ws2tcpip.h>
+#  include <wspiapi.h>
+# endif
+#else
+# ifdef VXWORKS
+#  include <hostLib.h>
+#  include <ioctl.h>
+#  include <ioLib.h>
+# endif
+# ifndef WITH_NOIO
+#  ifndef PALM
+#   include <netdb.h>
+#   include <netinet/in.h>
+#   include <unistd.h>
+#   include <fcntl.h>
+#  endif
+# endif
+#endif
+
+/* Portability: define SOAP_SOCKLEN_T */
+#if defined(_AIX)
+# define SOAP_SOCKLEN_T socklen_t
+#elif defined(SOCKLEN_T)
+# define SOAP_SOCKLEN_T SOCKLEN_T
+#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) || defined(FREEBSD) || defined(__FreeBSD__) || defined(__QNX__) || defined(QNX)
+# define SOAP_SOCKLEN_T socklen_t
+#elif defined(IRIX) || defined(WIN32) || defined(__APPLE__) || defined(HP_UX) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS)
+# define SOAP_SOCKLEN_T int
+#else
+# define SOAP_SOCKLEN_T size_t
+#endif
+
+#ifndef SOAP_SOCKET
+# ifdef WIN32
+#  define SOAP_SOCKET SOCKET
+# else
+#  define SOAP_SOCKET int
+#  define closesocket(n) close(n)
+# endif
+#endif
+
+#define SOAP_INVALID_SOCKET (-1)
+#define soap_valid_socket(n) ((n) != SOAP_INVALID_SOCKET)
+
+#if defined(SYMBIAN)
+# define LONG64 long
+# define ULONG64 unsigned LONG64
+#elif !defined(WIN32) || defined(__GLIBC__) || defined(__GNU__)
+# ifndef LONG64
+#  define LONG64 long long
+#  define ULONG64 unsigned LONG64
+# endif
+#elif defined(UNDER_CE)
+# define LONG64 __int64
+# define ULONG64 unsigned LONG64
+#elif defined(__BORLANDC__)
+# define LONG64 __int64
+# define ULONG64 unsigned LONG64
+#endif
+
+#if defined(WIN32)
+# define soap_int32 __int32
+#elif defined(SYMBIAN)
+# define soap_int32 long
+#elif defined(PALM)
+# define soap_int32 Int32
+#else
+# define soap_int32 int32_t
+#endif
+
+#ifdef WIN32
+# define SOAP_ERANGE ERANGE
+# define SOAP_EINTR WSAEINTR
+# define SOAP_EAGAIN WSAEWOULDBLOCK
+# define SOAP_EWOULDBLOCK WSAEWOULDBLOCK
+# define SOAP_EINPROGRESS WSAEINPROGRESS
+#else
+# define SOAP_ERANGE ERANGE
+# define SOAP_EINTR EINTR
+# define SOAP_EAGAIN EAGAIN
+# ifdef SYMBIAN
+#  define SOAP_EWOULDBLOCK 9898
+#  define SOAP_EINPROGRESS 9899
+# else
+#  define SOAP_EWOULDBLOCK EWOULDBLOCK
+#  define SOAP_EINPROGRESS EINPROGRESS
+# endif
+#endif
+
+#ifdef WIN32
+# ifdef UNDER_CE
+#  define soap_errno GetLastError()
+#  define soap_socket_errno GetLastError()
+#  define soap_reset_errno SetLastError(0)
+# else
+#  define soap_errno GetLastError()
+#  define soap_socket_errno WSAGetLastError()
+#  define soap_reset_errno SetLastError(0)
+# endif
+#else
+# ifndef WITH_NOIO
+#  define soap_errno errno
+#  define soap_socket_errno errno
+#  define soap_reset_errno (errno = 0)
+# else
+#  define soap_errno 0
+#  define soap_socket_errno 0
+#  define soap_reset_errno
+# endif
+#endif
+
+#ifndef SOAP_BUFLEN
+# ifdef WITH_UDP
+#  define SOAP_BUFLEN (65536) /* max UDP packet size */
+# else
+#  ifndef WITH_LEAN
+#   define SOAP_BUFLEN (65536) /* buffer length for socket packets, also used by gethostbyname_r so don't make this too small */
+#  else
+#   define SOAP_BUFLEN  (2048)
+#  endif
+# endif
+#endif
+#ifndef SOAP_LABLEN
+# define SOAP_LABLEN     (64) /* initial look-aside buffer length */
+#endif
+#ifndef SOAP_PTRBLK
+# define SOAP_PTRBLK     (32) /* block allocation for pointer hash table chains */
+#endif
+#ifndef SOAP_PTRHASH
+# ifndef WITH_LEAN
+#  define SOAP_PTRHASH (1024) /* size of pointer analysis hash table (must be power of 2) */
+# else
+#  define SOAP_PTRHASH   (32)
+# endif
+#endif
+#ifndef SOAP_IDHASH
+# ifndef WITH_LEAN
+#  define SOAP_IDHASH  (1999) /* prime size of hash table for parsed id/ref */
+# else
+#  define SOAP_IDHASH    (19) /* 19, 199 */
+# endif
+#endif
+#ifndef SOAP_BLKLEN
+# ifndef WITH_LEAN
+#  define SOAP_BLKLEN   (256) /* size of blocks to collect long strings and XML attributes */
+# else
+#  define SOAP_BLKLEN    (32)
+# endif
+#endif
+#ifndef SOAP_TAGLEN
+# ifndef WITH_LEAN
+#  define SOAP_TAGLEN  (1024) /* maximum length of XML element tag/attribute name or host/path name + 1 */
+# else
+#  define SOAP_TAGLEN    (64)
+# endif
+#endif
+#ifndef SOAP_HDRLEN
+# ifndef WITH_LEAN
+#  define SOAP_HDRLEN  (8192) /* maximum length of HTTP header line (must be >4096 to read cookies) */
+# else
+#  define SOAP_HDRLEN  (1024)
+# endif
+#endif
+#ifndef SOAP_MAXDIMS
+# ifndef WITH_LEAN
+#  define SOAP_MAXDIMS	 (16) /* maximum array dimensions (array nestings) must be less than 64 to protect soap->tmpbuf */
+# else
+#  define SOAP_MAXDIMS	  (4)
+# endif
+#endif
+
+#ifndef SOAP_MAXLOGS
+# define SOAP_MAXLOGS	  (3) /* max number of debug logs per struct soap environment */
+# define SOAP_INDEX_RECV  (0)
+# define SOAP_INDEX_SENT  (1)
+# define SOAP_INDEX_TEST  (2)
+#endif
+
+#ifndef SOAP_MAXKEEPALIVE
+# define SOAP_MAXKEEPALIVE (100) /* max iterations to keep server connection alive */
+#endif
+
+#ifndef SOAP_MAXARRAYSIZE
+# define SOAP_MAXARRAYSIZE (100000) /* "trusted" max size of inbound SOAP array for compound array allocation */
+#endif
+
+#ifdef VXWORKS
+# ifdef __INCmathh 
+#  include <private/mathP.h>
+#  ifndef HAVE_ISNAN
+#   define HAVE_ISNAN
+#  endif
+#  define soap_isnan(num) isNan(num)
+# endif
+#endif
+
+#ifdef WIN32 
+# include <float.h>
+# ifndef HAVE_ISNAN
+#  define HAVE_ISNAN
+# endif
+# define soap_isnan(num) _isnan(num)
+#endif
+
+#ifdef SUN_OS
+# define soap_isnan(n) isnan(n)
+#endif
+
+#if !defined(HAVE_ISNAN) && (defined(_MATH_H) || defined(_MATH_INCLUDED))
+# define HAVE_ISNAN
+#endif
+
+#ifndef soap_isnan
+# ifdef HAVE_ISNAN
+#  define soap_isnan(n) isnan(n)
+# else
+#  define soap_isnan(_) (0)
+# endif
+#endif
+
+extern const struct soap_double_nan { unsigned int n1, n2; } soap_double_nan;
+
+#ifdef VXWORKS
+# ifndef FLT_MAX
+#  define FLT_MAX _ARCH_FLT_MAX
+# endif
+# ifndef DBL_MAX
+#  define DBL_MAX _ARCH_DBL_MAX
+# endif
+#endif
+
+#ifndef FLT_NAN
+# ifdef HAVE_ISNAN
+#  define FLT_NAN (*(float*)(void*)&soap_double_nan)
+# else
+#  define FLT_NAN (0.0)
+# endif
+#endif
+
+#ifndef FLT_PINFTY
+# if defined(FLT_MAX)
+#  define FLT_PINFTY FLT_MAX
+# elif defined(HUGE_VALF)
+#  define FLT_PINFTY (float)HUGE_VALF
+# elif defined(HUGE_VAL)
+#  define FLT_PINFTY (float)HUGE_VAL
+# elif defined(FLOAT_MAX)
+#  define FLT_PINFTY FLOAT_MAX
+# else
+#  define FLT_PINFTY (3.40282347e+38F)
+# endif
+#endif
+
+#ifndef FLT_NINFTY
+# define FLT_NINFTY (-FLT_PINFTY)
+#endif
+
+#ifndef DBL_NAN
+# ifdef HAVE_ISNAN
+#  define DBL_NAN (*(double*)(void*)&soap_double_nan)
+# else
+#  define DBL_NAN (0.0)
+# endif
+#endif
+
+#ifndef DBL_PINFTY
+# if defined(DBL_MAX)
+#  define DBL_PINFTY DBL_MAX
+# elif defined(HUGE_VALF)
+#  define DBL_PINFTY (double)HUGE_VALF
+# elif defined(HUGE_VAL)
+#  define DBL_PINFTY (double)HUGE_VAL
+# elif defined(DOUBLE_MAX)
+#  define DBL_PINFTY DOUBLE_MAX
+# else
+#  define DBL_PINFTY (1.7976931348623157e+308)
+# endif
+#endif
+
+#ifndef DBL_NINFTY
+# define DBL_NINFTY (-DBL_PINFTY)
+#endif
+
+#define soap_ispinfd(n) ((n) >= DBL_PINFTY)
+#define soap_ispinff(n) ((n) >= FLT_PINFTY)
+#define soap_isninfd(n) ((n) <= DBL_NINFTY)
+#define soap_isninff(n) ((n) <= FLT_NINFTY)
+
+/* gSOAP error codes */
+
+#define SOAP_EOF			EOF
+#define SOAP_ERR			EOF
+#define SOAP_OK				0
+#define SOAP_CLI_FAULT			1
+#define SOAP_SVR_FAULT			2
+#define SOAP_TAG_MISMATCH		3
+#define SOAP_TYPE			4
+#define SOAP_SYNTAX_ERROR		5
+#define SOAP_NO_TAG			6
+#define SOAP_IOB			7
+#define SOAP_MUSTUNDERSTAND		8
+#define SOAP_NAMESPACE			9
+#define SOAP_USER_ERROR			10
+#define SOAP_FATAL_ERROR		11
+#define SOAP_FAULT			12
+#define SOAP_NO_METHOD			13
+#define SOAP_GET_METHOD			14
+#define SOAP_EOM			15
+#define SOAP_NULL			16
+#define SOAP_DUPLICATE_ID		17
+#define SOAP_MISSING_ID			18
+#define SOAP_HREF			19
+#define SOAP_UDP_ERROR			20
+#define SOAP_TCP_ERROR			21
+#define SOAP_HTTP_ERROR			22
+#define SOAP_SSL_ERROR			23
+#define SOAP_ZLIB_ERROR			24
+#define SOAP_DIME_ERROR			25
+#define SOAP_DIME_HREF			26
+#define SOAP_DIME_MISMATCH		27
+#define SOAP_DIME_END			28
+#define SOAP_MIME_ERROR			29
+#define SOAP_MIME_HREF			30
+#define SOAP_MIME_END			31
+#define SOAP_VERSIONMISMATCH		32
+#define SOAP_PLUGIN_ERROR		33
+#define SOAP_DATAENCODINGUNKNOWN	34
+#define SOAP_REQUIRED			35
+#define SOAP_PROHIBITED			36
+#define SOAP_OCCURS			37
+#define SOAP_LENGTH			38
+
+#define soap_xml_error_check(e) ((e) == SOAP_TAG_MISMATCH || (e) == SOAP_TAG_END || (e) == SOAP_SYNTAX_ERROR || (e) == SOAP_NAMESPACE || (e) == SOAP_DUPLICATE_ID || (e) == SOAP_MISSING_ID || (e) == SOAP_REQUIRED || (e) == SOAP_PROHIBITED || (e) == SOAP_OCCURS || (e) == SOAP_LENGTH || (e) == SOAP_NULL || (e) == SOAP_HREF)
+#define soap_soap_error_check(e) ((e) == SOAP_CLI_FAULT || (e) == SOAP_SVR_FAULT || (e) == SOAP_VERSIONMISMATCH || (e) == SOAP_MUSTUNDERSTAND || (e) == SOAP_FAULT || (e) == SOAP_NO_METHOD)
+#define soap_tcp_error_check(e) ((e) == SOAP_EOF || (e) == SOAP_TCP_ERROR)
+#define soap_ssl_error_check(e) ((e) == SOAP_SSL_ERROR)
+#define soap_zlib_error_check(e) ((e) == SOAP_ZLIB_ERROR)
+#define soap_http_error_check(e) ((e) == SOAP_HTTP_ERROR || (e) == SOAP_GET_METHOD || ((e) >= 100 && (e) < 600))
+
+/* gSOAP HTTP response status codes 100 to 599 are reserved */
+
+/* Codes 600 to 999 are user definable */
+
+/* Exceptional gSOAP HTTP response status codes >= 1000 */
+
+#define SOAP_STOP		1000	/* No HTTP response */
+#define SOAP_FORM		1001	/* Form request/response */
+#define SOAP_HTML		1002	/* Custom HTML response */
+#define SOAP_FILE		1003	/* Custom file-based response */
+
+/* gSOAP HTTP method codes */
+
+#define SOAP_POST		2000
+#define SOAP_GET		2001
+
+/* gSOAP DIME */
+
+#define SOAP_DIME_CF		0x01
+#define SOAP_DIME_ME		0x02
+#define SOAP_DIME_MB		0x04
+#define SOAP_DIME_VERSION	0x08 /* DIME version 1 */
+#define SOAP_DIME_MEDIA		0x10
+#define SOAP_DIME_ABSURI	0x20
+
+/* gSOAP ZLIB */
+
+#define SOAP_ZLIB_NONE		0x00
+#define SOAP_ZLIB_DEFLATE	0x01
+#define SOAP_ZLIB_INFLATE	0x02
+#define SOAP_ZLIB_GZIP		0x02
+
+/* gSOAP transport, connection, and content encoding modes */
+
+typedef soap_int32 soap_mode;
+
+#define SOAP_IO			0x00000003	/* IO mask */
+#define SOAP_IO_FLUSH		0x00000000	/* flush output immediately, no buffering */
+#define SOAP_IO_BUFFER		0x00000001	/* buffer output in packets of size SOAP_BUFLEN */
+#define SOAP_IO_STORE		0x00000002	/* store entire output to determine length for transport */
+#define SOAP_IO_CHUNK		0x00000003	/* use HTTP chunked transfer AND buffer packets */
+
+#define SOAP_IO_UDP		0x00000004
+#define SOAP_IO_LENGTH		0x00000008
+#define SOAP_IO_KEEPALIVE	0x00000010
+
+#define SOAP_ENC_LATIN		0x00800020	/* iso-8859-1 encoding */
+#define SOAP_ENC_XML		0x00000040	/* plain XML encoding, no HTTP header */
+#define SOAP_ENC_DIME		0x00000080
+#define SOAP_ENC_MIME		0x00000100
+#define SOAP_ENC_MTOM		0x00000200
+#define SOAP_ENC_ZLIB		0x00000400
+#define SOAP_ENC_SSL		0x00000800
+
+#define SOAP_ENC		0x00000FFF	/* IO and ENC mask */
+
+#define SOAP_XML_STRICT		0x00001000	/* strict validation */
+#define SOAP_XML_INDENT		0x00002000
+#define SOAP_XML_CANONICAL	0x00004000	/* EXC C14N canonical XML */
+#define SOAP_XML_TREE		0x00008000
+#define SOAP_XML_GRAPH		0x00010000
+#define SOAP_XML_NIL		0x00020000
+#define SOAP_XML_DOM		0x00040000
+#define SOAP_XML_SEC		0x00080000	/* reserved for WS security */
+
+#define SOAP_C_NOIOB		0x00100000
+#define SOAP_C_UTFSTRING	0x00200000
+#define SOAP_C_MBSTRING		0x00400000
+
+#define SOAP_DOM_TREE		0x01000000
+#define SOAP_DOM_NODE		0x02000000
+#define SOAP_DOM_ASIS		0x04000000
+
+#define SOAP_IO_DEFAULT		SOAP_IO_FLUSH
+
+/* SSL client/server authentication settings */
+
+#define SOAP_SSL_NO_AUTHENTICATION		0x00	/* for testing purposes */
+#define SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION	0x01	/* client requires server to authenticate */
+#define SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION	0x02	/* server requires client to authenticate */
+
+#define SOAP_SSL_DEFAULT			SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION
+
+/* state */
+
+#define SOAP_INIT	1
+#define SOAP_COPY	2
+
+#define soap_check_state(soap) (!(soap) || ((soap)->state != SOAP_INIT && (soap)->state != SOAP_COPY))
+
+/* part */
+
+#define SOAP_BEGIN		0
+#define SOAP_IN_ENVELOPE	2
+#define SOAP_IN_HEADER		3
+#define SOAP_END_HEADER		4
+#define SOAP_NO_BODY		5
+#define SOAP_IN_BODY		6
+#define SOAP_END_BODY		7
+#define SOAP_END_ENVELOPE	8
+#define SOAP_END		9
+#define SOAP_BEGIN_SECURITY	10
+#define SOAP_IN_SECURITY	11
+#define SOAP_END_SECURITY	12
+
+/* DEBUG macros */
+
+#ifndef WITH_LEAN
+# ifdef DEBUG
+#  ifndef SOAP_DEBUG
+#   define SOAP_DEBUG
+#  endif
+# endif
+#endif
+
+#ifdef SOAP_DEBUG
+# define SOAP_MALLOC(soap, size) soap_track_malloc(soap, __FILE__, __LINE__, size)
+# define SOAP_FREE(soap, ptr) soap_track_free(soap, __FILE__, __LINE__, ptr)
+#endif
+
+#ifndef SOAP_MALLOC			/* use libc malloc */
+# define SOAP_MALLOC(soap, size) malloc(size)
+#endif
+
+#ifndef SOAP_FREE			/* use libc free */
+# define SOAP_FREE(soap, ptr) free(ptr)
+#endif
+
+#ifdef SOAP_DEBUG
+# ifndef SOAP_MESSAGE
+#  define SOAP_MESSAGE fprintf
+# endif
+# ifndef DBGLOG
+#  define DBGLOG(DBGFILE, CMD) \
+{ if (soap)\
+  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
+      soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\
+    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
+    { FILE *fdebug = soap->fdebug[SOAP_INDEX_##DBGFILE];\
+      CMD;\
+      fflush(fdebug);\
+    }\
+  }\
+}
+# endif
+# ifndef DBGMSG
+#  define DBGMSG(DBGFILE, MSG, LEN) \
+{ if (soap)\
+  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
+      soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\
+    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
+    { fwrite((MSG), 1, (LEN), soap->fdebug[SOAP_INDEX_##DBGFILE]);\
+      fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\
+    }\
+  }\
+}
+# endif
+# ifndef DGBFUN
+#  define DBGFUN(FNAME) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s()\n", __FILE__, __LINE__, FNAME))
+#  define DBGFUN1(FNAME, FMT, ARG) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT")\n", __FILE__, __LINE__, FNAME, (ARG)))
+#  define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2)))
+#  define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2", "FMT3")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2), (ARG3)))
+# endif
+# ifndef DBGHEX
+#  define DBGHEX(DBGFILE, MSG, LEN) \
+{ if (soap)\
+  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
+      soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\
+    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
+    { int i; char *s;\
+      for (s = (char*)(MSG), i = (LEN); i; i--)\
+        fprintf(soap->fdebug[SOAP_INDEX_##DBGFILE], "%2.2hhX  ", *s++);\
+      fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\
+    }\
+  }\
+}
+# endif
+#else
+# define DBGLOG(DBGFILE, CMD)
+# define DBGMSG(DBGFILE, MSG, LEN)
+# define DBGFUN(FNAME)
+# define DBGFUN1(FNAME, FMT, ARG)
+# define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2)
+# define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3)
+# define DBGHEX(DBGFILE, MSG, LEN)
+#endif
+
+/* UCS-4 requires 32 bits (0-7FFFFFFF, the sign bit is used by gSOAP to distinguish XML entities) */
+typedef soap_int32 soap_wchar;
+
+/* namespace table row */
+struct Namespace
+{ const char *id;
+  const char *ns;
+  const char *in;
+  char *out;
+};
+
+/* namespace stack */
+struct soap_nlist
+{ struct soap_nlist *next;
+  unsigned int level; /* nesting depth level */
+  short index; /* corresponding entry in ns mapping table */
+  char *ns; /* only set when parsed ns URI is not in the ns mapping table */
+  char id[1]; /* the actual string value flows into the allocated region below this struct */
+};
+
+/* block stack for nested block allocations */
+struct soap_blist
+{ struct soap_blist *next;
+  char *ptr;
+  size_t size;
+};
+
+/* array layout */
+struct soap_array
+{ void *__ptr;
+  int __size;
+};
+
+/* pointer serialization management */
+struct soap_plist
+{ struct soap_plist *next;
+  const void *ptr;
+  const struct soap_array *array;
+  int type;
+  int id;
+  char mark1;
+  char mark2;
+};
+
+/* block allocation for pointer serialization management */
+struct soap_pblk
+{ struct soap_pblk *next;
+  struct soap_plist plist[SOAP_PTRBLK];
+};
+
+#ifdef SOAP_DEBUG
+/* malloc/free tracking for debugging */
+struct soap_mlist
+{ struct soap_mlist *next;
+  const void *ptr;
+  const char *file;
+  int line;
+  short live;
+};
+#endif
+
+/* class allocation list */
+struct soap_clist
+{ struct soap_clist *next;
+  void *ptr;
+  int type;
+  int size;
+  void (*fdelete)(struct soap_clist*);
+};
+
+/* attributes */
+struct soap_attribute
+{ struct soap_attribute *next;
+  char *value;
+  size_t size;
+  char *ns;
+  short visible;
+  char name[1]; /* the actual name string flows into the allocated region below this struct */
+};
+
+struct soap_cookie
+{ struct soap_cookie *next;
+  char *name;
+  char *value;
+  char *domain;
+  char *path;
+  long expire;		/* client-side: local time to expire; server-side: seconds to expire */
+  unsigned int version;
+  short secure;
+  short session;	/* server-side */
+  short env;		/* server-side: got cookie from client and should not be (re)send */
+  short modified;	/* server-side: client cookie was modified and should be send */
+};
+
+#ifdef __cplusplus
+SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*);
+
+class soap_multipart_iterator
+{ public:
+  struct soap_multipart *content;
+  bool operator==(const soap_multipart_iterator& iter) const
+    { return content == iter.content; }
+  bool operator!=(const soap_multipart_iterator& iter) const
+    { return content != iter.content; }
+  struct soap_multipart &operator*() const
+    { return *content; }
+  soap_multipart_iterator &operator++()
+    { content = soap_next_multipart(content); return *this; }
+  soap_multipart_iterator() : content(NULL)
+    { }
+  soap_multipart_iterator(struct soap_multipart *p) : content(p)
+    { }
+};
+#endif
+
+#ifndef WITH_LEANER
+struct soap_dime
+{ size_t count;
+  size_t size;
+  size_t chunksize;
+  size_t buflen;
+  char flags;
+  char *ptr;
+  const char *id;
+  const char *type;
+  const char *options;
+  struct soap_multipart *list;		/* list of DIME attachments received */
+  struct soap_multipart *first, *last;	/* temporary in/out queue */
+#ifdef __cplusplus
+  soap_multipart_iterator begin()
+    { soap_multipart_iterator iter(list); return iter; };
+  soap_multipart_iterator end()
+    { soap_multipart_iterator iter(NULL); return iter; };
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+struct soap_mime
+{ char *boundary;			/* MIME boundary */
+  const char *start;			/* MIME start ID */
+  struct soap_multipart *list;		/* list of MIME attachments received */
+  struct soap_multipart *first, *last;	/* temporary in/out queue */
+#ifdef __cplusplus
+  soap_multipart_iterator begin()
+    { soap_multipart_iterator iter(list); return iter; };
+  soap_multipart_iterator end()
+    { soap_multipart_iterator iter(NULL); return iter; };
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+/* RFC2045 MIME content transfer encodings */
+enum soap_mime_encoding
+{ SOAP_MIME_NONE,
+  SOAP_MIME_7BIT,
+  SOAP_MIME_8BIT,
+  SOAP_MIME_BINARY,
+  SOAP_MIME_QUOTED_PRINTABLE,
+  SOAP_MIME_BASE64,
+  SOAP_MIME_IETF_TOKEN,
+  SOAP_MIME_X_TOKEN
+};
+#endif
+
+#ifndef WITH_LEANER
+/* DIME/MIME multipart list */
+struct soap_multipart
+{ struct soap_multipart *next;
+  char *ptr;				/* points to raw data content */
+  size_t size;				/* size of data content */
+  const char *id;			/* DIME/MIME content ID or form data name */
+  const char *type;			/* DIME/MIME type (MIME type format) */
+  const char *options;			/* DIME options */
+  enum soap_mime_encoding encoding;	/* MIME Content-Transfer-Encoding */
+  const char *location;			/* MIME Content-Location (optional) */
+  const char *description;		/* MIME Content-Description (optional) */
+#ifdef __cplusplus
+  typedef soap_multipart_iterator iterator;
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+/* attachment DIME and MTOM XOP forwarding */
+struct soap_xlist
+{ struct soap_xlist *next;
+  unsigned char **ptr;
+  int *size;
+  char *id;
+  char **type;
+  char **options;
+};
+#endif
+
+/******************************************************************************/
+
+#ifndef WITH_LEANER
+#ifdef __cplusplus
+class soap_dom_attribute_iterator
+{ public:
+  struct soap_dom_attribute *att;
+  const char *nstr;
+  const char *name;
+  bool operator==(const soap_dom_attribute_iterator&) const;
+  bool operator!=(const soap_dom_attribute_iterator&) const;
+  struct soap_dom_attribute &operator*() const;
+  soap_dom_attribute_iterator &operator++();
+  soap_dom_attribute_iterator();
+  soap_dom_attribute_iterator(struct soap_dom_attribute*);
+  ~soap_dom_attribute_iterator();
+};
+#endif
+#endif
+
+#ifndef WITH_LEANER
+struct soap_dom_attribute
+{ struct soap_dom_attribute *next;
+  const char *nstr;
+  char *name;
+  char *data;
+  wchar_t *wide;
+  struct soap *soap;
+#ifdef __cplusplus
+  typedef soap_dom_attribute_iterator iterator;
+  struct soap_dom_attribute &set(const char *nstr, const char *name);	/* set namespace and name */
+  struct soap_dom_attribute &set(const char *data);		/* set data */
+  soap_dom_attribute_iterator begin();
+  soap_dom_attribute_iterator end();
+  soap_dom_attribute_iterator find(const char *nstr, const char *name);
+  void unlink();
+  soap_dom_attribute();
+  soap_dom_attribute(struct soap *soap);
+  soap_dom_attribute(struct soap *soap, const char *nstr, const char *name, const char *data);
+  ~soap_dom_attribute();
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+#ifdef __cplusplus
+class soap_dom_element_iterator
+{ public:
+  struct soap_dom_element *elt;
+  const char *nstr;
+  const char *name;
+  int type;
+  bool operator==(const soap_dom_element_iterator&) const;
+  bool operator!=(const soap_dom_element_iterator&) const;
+  struct soap_dom_element &operator*() const;
+  soap_dom_element_iterator &operator++();
+  soap_dom_element_iterator();
+  soap_dom_element_iterator(struct soap_dom_element*);
+  ~soap_dom_element_iterator();
+};
+#endif
+#endif
+
+#ifndef WITH_LEANER
+struct soap_dom_element
+{ struct soap_dom_element *next;	/* next sibling */
+  struct soap_dom_element *prnt;	/* parent */
+  struct soap_dom_element *elts;	/* list of child elements */
+  struct soap_dom_attribute *atts;	/* list of attributes */
+  const char *nstr;			/* namespace string */
+  char *name;				/* element tag name */
+  char *data;				/* element content data (with SOAP_C_UTFSTRING flag set) */
+  wchar_t *wide;			/* element content data */
+  int type;				/* optional: serialized C/C++ data type */
+  void *node;				/* optional: pointer to serialized C/C++ data */
+  char *head;				/* leading whitespace to start tag */
+  char *tail;				/* leading whitespace to end tag */
+  struct soap *soap;			/* soap context that manages this node */
+#ifdef __cplusplus
+  typedef soap_dom_element_iterator iterator;
+  struct soap_dom_element &set(const char *nstr, const char *name);
+  struct soap_dom_element &set(const char *data);
+  struct soap_dom_element &set(void *node, int type);
+  struct soap_dom_element &add(struct soap_dom_element*);
+  struct soap_dom_element &add(struct soap_dom_element&);
+  struct soap_dom_element &add(struct soap_dom_attribute*);
+  struct soap_dom_element &add(struct soap_dom_attribute&);
+  soap_dom_element_iterator begin();
+  soap_dom_element_iterator end();
+  soap_dom_element_iterator find(const char *nstr, const char *name);
+  soap_dom_element_iterator find(int type);
+  void unlink();
+  soap_dom_element();
+  soap_dom_element(struct soap *soap);
+  soap_dom_element(struct soap *soap, const char *nstr, const char *name);
+  soap_dom_element(struct soap *soap, const char *nstr, const char *name, const char *data);
+  soap_dom_element(struct soap *soap, const char *nstr, const char *name, void *node, int type);
+  ~soap_dom_element();
+#endif
+};
+SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_dom_next_element(struct soap_dom_element *elt);
+SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_dom_next_attribute(struct soap_dom_attribute *att);
+#endif
+
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+}
+extern std::ostream &operator<<(std::ostream&, const struct soap_dom_element&);
+extern std::istream &operator>>(std::istream&, struct soap_dom_element&);
+extern "C" {
+#endif
+
+/******************************************************************************/
+
+struct soap
+{ short state;			/* 0 = uninitialized, 1 = initialized, 2 = copy of another soap struct */
+  short version;		/* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table) */
+  soap_mode mode;
+  soap_mode imode;
+  soap_mode omode;
+  const char *float_format;	/* user-definable format string for floats (<1024 chars) */
+  const char *double_format;	/* user-definable format string for doubles (<1024 chars) */
+  const char *dime_id_format;	/* user-definable format string for integer DIME id (<SOAP_TAGLEN chars) */
+  const char *http_version;	/* HTTP version used "1.0" or "1.1" */
+  const char *http_content;	/* optional custom response content type (with SOAP_FILE) */
+  const char *encodingStyle;	/* default = NULL which means that SOAP encoding is used */
+  const char *actor;		/* SOAP-ENV:actor or role attribute value */
+  int recv_timeout;		/* when > 0, gives socket recv timeout in seconds, < 0 in usec */
+  int send_timeout;		/* when > 0, gives socket send timeout in seconds, < 0 in usec */
+  int connect_timeout;		/* when > 0, gives socket connect() timeout in seconds, < 0 in usec */
+  int accept_timeout;		/* when > 0, gives socket accept() timeout in seconds, < 0 in usec */
+  int socket_flags;		/* socket recv() and send() flags, e.g. set to MSG_NOSIGNAL to disable sigpipe */
+  int connect_flags;		/* connect() SOL_SOCKET sockopt flags, e.g. set to SO_DEBUG to debug socket */
+  int bind_flags;		/* bind() SOL_SOCKET sockopt flags, e.g. set to SO_REUSEADDR to enable reuse */
+  int accept_flags;		/* accept() SOL_SOCKET sockopt flags */
+  const struct Namespace *namespaces;	/* Pointer to global namespace mapping table */
+  struct Namespace *local_namespaces;	/* Local namespace mapping table */
+  struct soap_nlist *nlist;	/* namespace stack */
+  struct soap_blist *blist;	/* block allocation stack */
+  struct soap_clist *clist;	/* class instance allocation list */
+  void *alist;			/* memory allocation (malloc) list */
+  struct soap_ilist *iht[SOAP_IDHASH];
+  struct soap_plist *pht[SOAP_PTRHASH];
+  struct soap_pblk *pblk;	/* plist block allocation */
+  short pidx;			/* plist block allocation */
+  struct SOAP_ENV__Header *header;
+  struct SOAP_ENV__Fault *fault;
+  int idnum;
+  void *user;			/* to pass user-defined data */
+  struct soap_plugin *plugins;	/* linked list of plug-in data */
+  char *userid;			/* HTTP Basic authorization userid */
+  char *passwd;			/* HTTP Basic authorization passwd */
+  int (*fpost)(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
+  int (*fget)(struct soap*);
+  int (*fform)(struct soap*);
+  int (*fposthdr)(struct soap*, const char*, const char*);
+  int (*fresponse)(struct soap*, int, size_t);
+  int (*fparse)(struct soap*);
+  int (*fparsehdr)(struct soap*, const char*, const char*);
+  int (*fresolve)(struct soap*, const char*, struct in_addr* inaddr);
+  int (*fconnect)(struct soap*, const char*, const char*, int);
+  int (*fdisconnect)(struct soap*);
+  int (*fclosesocket)(struct soap*, SOAP_SOCKET);
+  int (*fshutdownsocket)(struct soap*, SOAP_SOCKET, int);
+  int (*fopen)(struct soap*, const char*, const char*, int);
+  int (*faccept)(struct soap*, int, struct sockaddr*, int *n);
+  int (*fclose)(struct soap*);
+  int (*fsend)(struct soap*, const char*, size_t);
+  size_t (*frecv)(struct soap*, char*, size_t);
+  int (*fpoll)(struct soap*);
+  void (*fseterror)(struct soap*, const char **c, const char **s);
+  int (*fignore)(struct soap*, const char*);
+  int (*fserveloop)(struct soap*);
+  void *(*fplugin)(struct soap*, const char*);
+#ifndef WITH_LEANER
+  int (*fprepareinit)(struct soap*);
+  int (*fpreparesend)(struct soap*, const char*, size_t);
+  int (*fpreparerecv)(struct soap*, const char*, size_t);
+  int (*fpreparefinal)(struct soap*);
+  void *(*fdimereadopen)(struct soap*, void*, const char*, const char*, const char*);
+  void *(*fdimewriteopen)(struct soap*, const char*, const char*, const char*);
+  void (*fdimereadclose)(struct soap*, void*);
+  void (*fdimewriteclose)(struct soap*, void*);
+  size_t (*fdimeread)(struct soap*, void*, char*, size_t);
+  int (*fdimewrite)(struct soap*, void*, const char*, size_t);
+#endif
+  int master;
+  int socket;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  std::ostream *os;
+  std::istream *is;
+#else
+  void *os;	/* preserve alignment */
+  void *is;	/* preserve alignment */
+#endif
+#ifndef UNDER_CE
+  int sendfd;
+  int recvfd;
+#else
+  FILE *sendfd;
+  FILE *recvfd;
+#endif
+#ifdef WIN32
+  char errorstr[256];	/* buf for FormatMessage() */
+#endif
+  size_t bufidx;	/* index in soap.buf[] */
+  size_t buflen;	/* length of soap.buf[] content */
+  soap_wchar ahead;	/* parser lookahead */
+  short cdata;		/* CDATA parser state */
+  short body;		/* parsed XML element has a body or not */
+  unsigned int level;	/* XML nesting level */
+  size_t count;		/* message length counter */
+  size_t length;	/* message length as set by HTTP header */
+#ifdef WITH_FAST
+  char *labbuf;		/* look-aside buffer */
+  size_t lablen;	/* look-aside buffer allocated length */
+  size_t labidx;	/* look-aside buffer index to available part */
+#endif
+  char buf[SOAP_BUFLEN];/* send and receive buffer */
+  char tmpbuf[1024];	/* in/output buffer for HTTP headers, simpleType values, attribute names, and DIME >=1024 bytes */
+  char msgbuf[1024];	/* output buffer for (error) messages <=1024 bytes */
+  char tag[SOAP_TAGLEN];
+  char id[SOAP_TAGLEN];
+  char href[SOAP_TAGLEN];
+  char type[SOAP_TAGLEN];
+  char arrayType[SOAP_TAGLEN];
+  char arraySize[SOAP_TAGLEN];
+  char arrayOffset[SOAP_TAGLEN];
+  short other;
+  short position;
+  int positions[SOAP_MAXDIMS];
+  short root;
+  struct soap_attribute *attributes;	/* attribute list */
+  short encoding;	/* when set, output encodingStyle */
+  short mustUnderstand;	/* a mustUnderstand element was parsed or is output */
+  short keep_alive;	/* connection should be kept open */
+  short null;		/* parsed XML is xsi:nil */
+  short ns;		/* when not set, output full xmlns bindings */
+  short part;		/* parsing state */
+  short alloced;
+  short peeked;
+  size_t chunksize;
+  size_t chunkbuflen;
+  char endpoint[SOAP_TAGLEN];
+  char path[SOAP_TAGLEN];
+  char host[SOAP_TAGLEN];
+  char *action;
+  char *authrealm;		/* HTTP authentication realm */
+  char *prolog;			/* XML declaration prolog */
+  unsigned long ip;		/* IP number */
+  int port;			/* port number */
+  unsigned int max_keep_alive;
+  const char *proxy_host;	/* Proxy Server host name */
+  int proxy_port;		/* Proxy Server port (default = 8080) */
+  const char *proxy_userid;	/* Proxy Authorization user name */
+  const char *proxy_passwd;	/* Proxy Authorization password */
+  int status;			/* -1 when request, else error code to be returned by server */
+  int error;
+  int errmode;
+  int errnum;
+#ifndef WITH_LEANER
+  struct soap_dom_element *dom;
+  struct soap_dime dime;
+  struct soap_mime mime;
+  struct soap_xlist *xlist;
+#endif
+#if !defined(WITH_LEAN) || defined(SOAP_DEBUG)
+  const char *logfile[SOAP_MAXLOGS];
+  FILE *fdebug[SOAP_MAXLOGS];
+  struct soap_mlist *mht[SOAP_PTRHASH];
+#endif
+#ifndef WITH_LEAN
+  const char *c14ninclude;
+  const char *c14nexclude;
+  struct soap_cookie *cookies;
+  const char *cookie_domain;
+  const char *cookie_path;
+  int cookie_max;
+#endif
+#ifndef WITH_NOIO
+#ifdef WITH_IPV6
+  struct sockaddr_storage peer;	/* IPv6: set by soap_accept and by UDP recv */
+#else
+  struct sockaddr_in peer;	/* IPv4: set by soap_connect/soap_accept and by UDP recv */
+#endif
+  size_t peerlen;
+#endif
+#ifdef WITH_OPENSSL
+  int (*fsslauth)(struct soap*);
+  int (*fsslverify)(int, X509_STORE_CTX*);
+  BIO *bio;
+  SSL *ssl;
+  SSL_CTX *ctx;
+  short require_server_auth;
+  short require_client_auth;
+  short rsa;			/* when set, use RSA instead of DH */
+  const char *keyfile;
+  const char *password;
+  const char *dhfile;
+  const char *cafile;
+  const char *capath;
+  const char *crlfile;
+  const char *randfile;
+  SSL_SESSION *session;
+  char session_host[SOAP_TAGLEN];
+  int session_port;
+#endif
+#ifdef WITH_ZLIB
+  short zlib_state;		/* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_INFLATE */
+  short zlib_in;		/* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */
+  short zlib_out;		/* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */
+  z_stream d_stream;		/* decompression stream */
+  char z_buf[SOAP_BUFLEN];	/* buffer */
+  size_t z_buflen;
+  unsigned short z_level;	/* compression level to be used (0=none, 1=fast to 9=best) */
+  uLong z_crc;			/* internal gzip crc */
+  float z_ratio_in;		/* detected compression ratio compressed_length/length of inbound message */
+  float z_ratio_out;		/* detected compression ratio compressed_length/length of outbound message */
+#endif
+#ifdef WMW_RPM_IO
+  void *rpmreqid;
+#endif
+#ifndef WITH_LEAN
+#ifdef __cplusplus
+  soap();
+  soap(soap_mode);
+  soap(soap_mode, soap_mode);
+  soap(struct soap&);
+  ~soap();
+#endif
+#endif
+};
+
+struct soap_code_map
+{ long code;
+  const char *string;
+};
+
+/* forwarding list */
+struct soap_flist
+{ struct soap_flist *next;
+  int type;
+  void *ptr;
+  unsigned int level;
+  size_t len;
+  void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t);
+};
+
+/* id-ref forwarding list */
+struct soap_ilist
+{ struct soap_ilist *next;
+  int type;
+  size_t size;
+  void *link;
+  void *copy;
+  struct soap_flist *flist;
+  void *ptr;
+  unsigned int level;
+  char id[1]; /* the actual id string value flows into the allocated region below this struct */
+};
+
+struct soap_plugin
+{ struct soap_plugin *next;
+  const char *id;
+  void *data;
+  int (*fcopy)(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src);
+  void (*fdelete)(struct soap *soap, struct soap_plugin *p); /* should delete fields of plugin only and not free(p) */
+};
+
+#ifndef WITH_NONAMESPACES
+extern SOAP_NMAC struct Namespace namespaces[];
+#endif
+
+#ifndef WITH_LEAN
+# define soap_get0(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx])
+# define soap_get1(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx++])
+#else
+soap_wchar soap_get0(struct soap*);
+soap_wchar soap_get1(struct soap*);
+#endif
+
+#define soap_revget1(soap) ((soap)->bufidx--)
+#define soap_unget(soap, c) ((soap)->ahead = c)
+#define soap_register_plugin(soap, plugin) soap_register_plugin_arg(soap, plugin, NULL)
+#define soap_imode(soap, n) ((soap)->mode = (soap)->imode = (n))
+#define soap_set_imode(soap, n) ((soap)->imode |= (n))
+#define soap_clr_imode(soap, n) ((soap)->imode &= ~(n))
+#define soap_omode(soap, n) ((soap)->mode = (soap)->omode = (n))
+#define soap_set_omode(soap, n) ((soap)->omode |= (n))
+#define soap_clr_omode(soap, n) ((soap)->omode &= ~(n))
+#define soap_set_mode(soap, n) ((soap)->imode |= (n), (soap)->omode |= (n))
+#define soap_clr_mode(soap, n) ((soap)->imode &= ~(n), (soap)->omode &= ~(n))
+#define soap_destroy(soap) soap_delete((soap), NULL)
+
+#ifdef HAVE_STRRCHR
+# define soap_strrchr(s, t) strrchr(s, t)
+#else
+ SOAP_FMAC1 char* SOAP_FMAC2 soap_strrchr(const char *s, int t);
+#endif
+
+#ifdef HAVE_STRTOL
+# define soap_strtol(s, t, b) strtol(s, t, b)
+#else
+ SOAP_FMAC1 long SOAP_FMAC2 soap_strtol(const char *s, char **t, int b);
+#endif
+
+#ifdef HAVE_STRTOUL
+# define soap_strtoul(s, t, b) strtoul(s, t, b)
+#else
+ SOAP_FMAC1 unsigned long SOAP_FMAC2 soap_strtoul(const char *s, char **t, int b);
+#endif
+
+#if defined(WITH_OPENSSL)
+# define soap_random soap_rand()
+SOAP_FMAC1 int SOAP_FMAC2 soap_rand();
+#elif defined(HAVE_RANDOM)
+# define soap_random (int)random()
+#else
+# define soap_random rand()
+#endif
+
+#ifdef WITH_NOIDREF
+# define soap_embedded(s, p, t) (0)
+# define soap_id_lookup(s, i, p, t, n, k) (p)
+# define soap_id_forward(s, h, p, len, st, tt, n, k, fc) (p)
+# define soap_reference(s, a, t) (1)
+# define soap_array_reference(s, p, a, n, t) (1)
+# define soap_embed(s, p, a, n, t, pp) (0)
+# define soap_embedded_id(s, i, p, t) (i)
+# define soap_is_embedded(s, p) (0)
+# define soap_is_single(s, p) (1)
+# define soap_lookup_type(s, i) (0)
+# define soap_getindependent(s) (0)
+# define soap_putindependent(s) (0)
+# define soap_getelement(s, n) (n)
+# define soap_putelement(s, p, t, i, n) (0)
+# define soap_markelement(s, p, n) (0)
+#endif
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_fault(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultcode(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultsubcode(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultstring(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultdetail(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_serializeheader(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putheader(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getheader(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_serializefault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putfault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getfault(struct soap*);
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_ssl_init();
+SOAP_FMAC1 int SOAP_FMAC2 soap_poll(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_connect_command(struct soap*, int, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_connect(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_bind(struct soap*, const char*, int, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_accept(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_accept(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_server_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_client_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_puthttphdr(struct soap*, int status, size_t count);
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_get_header_attribute(struct soap*, const char*, const char*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_key(char*, size_t, const char*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_val(char*, size_t, const char*);
+
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_hash(const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_endpoint(struct soap*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_flush_raw(struct soap*, const char*, size_t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_flush(struct soap*);
+SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_get(struct soap*);
+SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getchar(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_tag_cmp(const char*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_fault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault_subcode(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault_subcode(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_sender_error(struct soap*, const char*, const char*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_receiver_error(struct soap*, const char*, const char*, int);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_send_raw(struct soap*, const char*, size_t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_raw(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_send(struct soap*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_send2(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_send3(struct soap*, const char*, const char*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_pututf8(struct soap*, unsigned long);
+SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getutf8(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_putbase64(struct soap*, const unsigned char*, int);
+SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_getbase64(struct soap*, int*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_puthex(struct soap*, const unsigned char*, int);
+SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_gethex(struct soap*, int*);
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_xop_forward(struct soap*, unsigned char**, int*, char**, char**, char**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_dime_forward(struct soap*, unsigned char**, int*, char**, char**, char**);
+#endif
+
+#ifndef WITH_NOIDREF
+SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup_id(struct soap*, void *p, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup(struct soap*, const void *p, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_enter(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_array_pointer_lookup(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type);
+SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_lookup(struct soap*, const char*);
+SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_enter(struct soap*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_resolve(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_embedded(struct soap*, const void *p, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_reference(struct soap*, const void *p, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_array_reference(struct soap*, const void *p, const struct soap_array *a, int n, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_embedded_id(struct soap*, int id, const void *p, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_is_embedded(struct soap*, struct soap_plist*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_is_single(struct soap*, struct soap_plist*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_embedded(struct soap*, struct soap_plist*);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_begin_count(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_end_count(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_begin_send(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_end_send(struct soap*);
+
+SOAP_FMAC1 const struct soap_code_map* SOAP_FMAC2 soap_code(const struct soap_code_map*, const char *str);
+SOAP_FMAC1 long SOAP_FMAC2 soap_int_code(const struct soap_code_map*, const char *str, long other);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_str_code(const struct soap_code_map*, long code);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_getline(struct soap*, char*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_begin_recv(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_end_recv(struct soap*);
+
+SOAP_FMAC1 void* SOAP_FMAC2 soap_malloc(struct soap*, size_t);
+SOAP_FMAC1 void SOAP_FMAC2 soap_dealloc(struct soap*, void*);
+SOAP_FMAC1 struct soap_clist * SOAP_FMAC2 soap_link(struct soap*, void*, int, int, void (*fdelete)(struct soap_clist*));
+SOAP_FMAC1 void SOAP_FMAC2 soap_unlink(struct soap*, const void*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_free(struct soap*);
+
+SOAP_FMAC1 void* SOAP_FMAC2 soap_track_malloc(struct soap*, const char*, int, size_t);
+SOAP_FMAC1 void SOAP_FMAC2 soap_track_free(struct soap*, const char*, int, void*);
+
+#ifndef WITH_NOIDREF
+SOAP_FMAC1 int SOAP_FMAC2 soap_lookup_type(struct soap*, const char *id);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_id_lookup(struct soap*, const char *id, void **p, int t, size_t n, unsigned int k);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_id_forward(struct soap*, const char *id, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void(*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t));
+#endif
+SOAP_FMAC1 void* SOAP_FMAC2 soap_id_enter(struct soap*, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*));
+SOAP_FMAC1 void SOAP_FMAC2 soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t, const void *q, size_t n);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_size(const int *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getoffsets(const char *, const int *, int *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getsize(const char *, const char *, int *);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getsizes(const char *, int *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getposition(const char *, int *);
+
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putsize(struct soap*, const char *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizesoffsets(struct soap*, const char *, const int *, const int *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizes(struct soap*, const char *, const int *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffset(struct soap*, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffsets(struct soap*, const int *, int);
+ 
+SOAP_FMAC1 int SOAP_FMAC2 soap_closesock(struct soap*);
+
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new(void);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new1(soap_mode);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new2(soap_mode, soap_mode);
+SOAP_FMAC1 void SOAP_FMAC2 soap_del(struct soap*);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy(struct soap*);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy_context(struct soap*, struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_init(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_init1(struct soap*, soap_mode);
+SOAP_FMAC1 void SOAP_FMAC2 soap_init2(struct soap*, soap_mode, soap_mode);
+SOAP_FMAC1 void SOAP_FMAC2 soap_done(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_cleanup(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_begin(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_end(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_delete(struct soap*, void*);
+
+#ifdef SOAP_DEBUG
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_recv_logfile(struct soap*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_sent_logfile(struct soap*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_test_logfile(struct soap*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_close_logfiles(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_open_logfile(struct soap*, int);
+#endif
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_token(struct soap*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_value(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_match_tag(struct soap*, const char*, const char *);
+SOAP_FMAC1 int SOAP_FMAC2 soap_match_array(struct soap*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_element(struct soap*, const char*, int, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_out(struct soap*, const char *tag, int id, const char *type);
+SOAP_FMAC1 int SOAP_FMAC2 soap_array_begin_out(struct soap*, const char *tag, int id, const char *type, const char *offset);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_ref(struct soap*, const char *tag, int id, int href);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_href(struct soap*, const char *tag, int id, const char *ref, const char *val);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_null(struct soap*, const char *tag, int id, const char *type);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_id(struct soap*, const char *tag, int id, const void *p, const struct soap_array *a, int d, const char *type, int n);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_result(struct soap*, const char *tag);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_out(struct soap*, const char *tag);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_start_end_out(struct soap*, const char *tag);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_attribute(struct soap*, const char*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_in(struct soap*, const char *tag, int nillable);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_in(struct soap*, const char *tag);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_peek_element(struct soap*);
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_retry(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_revert(struct soap*);
+
+SOAP_FMAC1 char* SOAP_FMAC2 soap_strdup(struct soap*, const char*);
+SOAP_FMAC1 const char * SOAP_FMAC2 soap_strsearch(const char *big, const char *little);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_string_out(struct soap*, const char *s, int flag);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_string_in(struct soap*, int, long, long);
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_wstring_out(struct soap*, const wchar_t *s, int flag);
+SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstring_in(struct soap*, int, long, long);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_match_namespace(struct soap*, const char *, const char*, int n1, int n2);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_namespaces(struct soap*, struct Namespace*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_local_namespaces(struct soap*);
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_pop_namespace(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_push_namespace(struct soap*, const char *,const char *);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_current_namespace(struct soap *soap, const char *tag);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_store_lab(struct soap*, const char*, size_t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_append_lab(struct soap*, const char*, size_t);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_new_block(struct soap*);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_push_block(struct soap*, size_t);
+SOAP_FMAC1 void SOAP_FMAC2 soap_pop_block(struct soap*);
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_size_block(struct soap*, size_t);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_first_block(struct soap*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_next_block(struct soap*);
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_block_size(struct soap*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_save_block(struct soap*, char*, int);
+SOAP_FMAC1 void SOAP_FMAC2 soap_end_block(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_out(struct soap*);
+SOAP_FMAC1 int soap_envelope_end_out(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_in(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_end_in(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_out(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_out(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_in(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_in(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_header(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_response(struct soap*, int);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_send_empty_response(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_empty_response(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_send_fault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_fault(struct soap*);
+
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault(struct soap*, FILE*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault_location(struct soap*, FILE*);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2byte(struct soap*, const char*, char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2short(struct soap*, const char*, short*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2int(struct soap*, const char*, int*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2long(struct soap*, const char*, long*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2LONG64(struct soap*, const char*, LONG64*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2float(struct soap*, const char*, float*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2double(struct soap*, const char*, double*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedByte(struct soap*, const char*, unsigned char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedShort(struct soap*, const char*, unsigned short*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedInt(struct soap*, const char*, unsigned int*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedLong(struct soap*, const char*, unsigned long*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2ULONG64(struct soap*, const char*, ULONG64*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2string(struct soap*, const char*, char**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2QName(struct soap*, const char*, char**);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2wchar(struct soap*, const char*, wchar_t**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2dateTime(struct soap*, const char*, time_t*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_s2base64(struct soap*, const unsigned char*, char*, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_s2hex(struct soap*, const unsigned char*, char*, int);
+#endif
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_byte2s(struct soap*, char);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_short2s(struct soap*, short);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_int2s(struct soap*, int);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_long2s(struct soap*, long);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_LONG642s(struct soap*, LONG64);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_float2s(struct soap*, float);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_double2s(struct soap*, double);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedByte2s(struct soap*, unsigned char);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedShort2s(struct soap*, unsigned short);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedInt2s(struct soap*, unsigned int);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedLong2s(struct soap*, unsigned long);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_ULONG642s(struct soap*, ULONG64);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_QName2s(struct soap*, const char*);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_wchar2s(struct soap*, const wchar_t*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_dateTime2s(struct soap*, time_t);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_base642s(struct soap*, const char*, char*, size_t, int*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_hex2s(struct soap*, const char*, char*, size_t, int*);
+#endif
+
+
+SOAP_FMAC1 int* SOAP_FMAC2 soap_inint(struct soap*, const char *tag, int *p, const char *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_inbyte(struct soap*, const char *tag, char *p, const char *, int);
+SOAP_FMAC1 long* SOAP_FMAC2 soap_inlong(struct soap*, const char *tag, long *p, const char *, int);
+SOAP_FMAC1 LONG64* SOAP_FMAC2 soap_inLONG64(struct soap*, const char *tag, LONG64 *p, const char *, int);
+SOAP_FMAC1 short* SOAP_FMAC2 soap_inshort(struct soap*, const char *tag, short *p, const char *, int);
+SOAP_FMAC1 float* SOAP_FMAC2 soap_infloat(struct soap*, const char *tag, float *p, const char *, int);
+SOAP_FMAC1 double* SOAP_FMAC2 soap_indouble(struct soap*, const char *tag, double *p, const char *, int);
+SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_inunsignedByte(struct soap*, const char *tag, unsigned char *p, const char *, int);
+SOAP_FMAC1 unsigned short* SOAP_FMAC2 soap_inunsignedShort(struct soap*, const char *tag, unsigned short *p, const char *, int);
+SOAP_FMAC1 unsigned int* SOAP_FMAC2 soap_inunsignedInt(struct soap*, const char *tag, unsigned int *p, const char *, int);
+SOAP_FMAC1 unsigned long* SOAP_FMAC2 soap_inunsignedLong(struct soap*, const char *tag, unsigned long *p, const char *, int);
+SOAP_FMAC1 ULONG64* SOAP_FMAC2 soap_inULONG64(struct soap*, const char *tag, ULONG64 *p, const char *, int);
+SOAP_FMAC1 char** SOAP_FMAC2 soap_instring(struct soap*, const char *tag, char **p, const char *, int, int, long, long);
+SOAP_FMAC1 char** SOAP_FMAC2 soap_inliteral(struct soap*, const char *tag, char **p);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 time_t* SOAP_FMAC2 soap_indateTime(struct soap*, const char *tag, time_t *p, const char *, int);
+#endif
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwstring(struct soap*, const char *tag, wchar_t **p, const char *, int, long, long);
+SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwliteral(struct soap*, const char *tag, wchar_t **p);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_outbyte(struct soap*, const char *tag, int id, const char *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outshort(struct soap*, const char *tag, int id, const short *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outint(struct soap*, const char *tag, int id, const int *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outlong(struct soap*, const char *tag, int id, const long *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outLONG64(struct soap*, const char *tag, int id, const LONG64 *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outfloat(struct soap*, const char *tag, int id, const float *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outdouble(struct soap*, const char *tag, int id, const double *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedByte(struct soap*, const char *tag, int id, const unsigned char *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedShort(struct soap*, const char *tag, int id, const unsigned short *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedInt(struct soap*, const char *tag, int id, const unsigned int *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedLong(struct soap*, const char *tag, int id, const unsigned long *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outULONG64(struct soap*, const char *tag, int id, const ULONG64 *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outstring(struct soap*, const char *tag, int id, char *const*p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outliteral(struct soap*, const char *tag, char *const*p);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 int SOAP_FMAC2 soap_outdateTime(struct soap*, const char *tag, int id, const time_t *p, const char *, int);
+#endif
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_outwstring(struct soap*, const char *tag, int id, wchar_t *const*p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outwliteral(struct soap*, const char *tag, wchar_t *const*p);
+#endif
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_attachment(struct soap *, const char*, int, const void*, const struct soap_array*, const char*, const char*, const char*, int, const char*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_move(struct soap*, long);
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_tell(struct soap*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_dime_option(struct soap*, unsigned short, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getdimehdr(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getdime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putdimehdr(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putdime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getmimehdr(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getmime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putmimehdr(struct soap*, struct soap_multipart*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putmime(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_dime(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_mime(struct soap*, const char *boundary, const char *start);
+SOAP_FMAC1 void SOAP_FMAC2 soap_clr_dime(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_clr_mime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_dime_attachment(struct soap*, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_mime_attachment(struct soap*, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description);
+SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_register_plugin_arg(struct soap*, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void*);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_lookup_plugin(struct soap*, const char*);
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_attr_value(struct soap *soap, const char *name, int flag);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_attr(struct soap *soap, const char *name, const char *value);
+SOAP_FMAC1 void SOAP_FMAC2 soap_clr_attr(struct soap *soap);
+
+#ifdef WITH_COOKIES
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_encode_cookie(const char*, char*, size_t);
+SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_set_cookie(struct soap*, const char*, const char*, const char*, const char*);
+SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_cookie(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern char* SOAP_FMAC2 soap_cookie_value(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern char* SOAP_FMAC2 soap_env_cookie_value(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern long SOAP_FMAC2 soap_cookie_expire(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_expire(struct soap*, const char*, long, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_session(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_clr_cookie_session(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern void SOAP_FMAC2 soap_clr_cookie(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_getenv_cookies(struct soap*);
+SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_copy_cookies(struct soap*);
+SOAP_FMAC1 extern void SOAP_FMAC2 soap_free_cookies(struct soap*);
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif
+
diff --git a/gsoap-palm/stockquote/obj/resource.frk/stockQuote.tmp b/gsoap-palm/stockquote/obj/resource.frk/stockQuote.tmp
new file mode 100644
index 0000000..c957fd1
--- /dev/null
+++ b/gsoap-palm/stockquote/obj/resource.frk/stockQuote.tmp
Binary files differ
diff --git a/gsoap-palm/stockquote/obj/resource.frk/stockQuoteD.tmp b/gsoap-palm/stockquote/obj/resource.frk/stockQuoteD.tmp
new file mode 100644
index 0000000..fc4efda
--- /dev/null
+++ b/gsoap-palm/stockquote/obj/resource.frk/stockQuoteD.tmp
Binary files differ
diff --git a/gsoap-palm/stockquote/obj/stockQuote.prc b/gsoap-palm/stockquote/obj/stockQuote.prc
new file mode 100644
index 0000000..11b944e
--- /dev/null
+++ b/gsoap-palm/stockquote/obj/stockQuote.prc
Binary files differ
diff --git a/gsoap-palm/stockquote/obj/stockQuote.prc.psym b/gsoap-palm/stockquote/obj/stockQuote.prc.psym
new file mode 100644
index 0000000..5433c32
--- /dev/null
+++ b/gsoap-palm/stockquote/obj/stockQuote.prc.psym
Binary files differ
diff --git a/gsoap-palm/stockquote/obj/stockQuote.tmp b/gsoap-palm/stockquote/obj/stockQuote.tmp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/gsoap-palm/stockquote/obj/stockQuote.tmp
diff --git a/gsoap-palm/stockquote/obj/stockQuote.tmp.MAP b/gsoap-palm/stockquote/obj/stockQuote.tmp.MAP
new file mode 100644
index 0000000..1129339
--- /dev/null
+++ b/gsoap-palm/stockquote/obj/stockQuote.tmp.MAP
@@ -0,0 +1,361 @@
+File:    1	"__RuntimeModule__"

+File:    2	"C:\Program Files\Metrowerks\CodeWarrior\Palm OS Support\CodeWarrior Libraries\Runtime\PalmOSRuntime_2i_A5.lib"

+File:    3	"CPlusLib68K.cp"

+File:    4	"Exception68K.cp"

+File:    5	"LongLong68K.c"

+File:    6	"MWRTTI.cp"

+File:    7	"NMWException.cp"

+File:    8	"NewMore.cp"

+File:    9	"New.cp"

+File:   10	"PalmOS_AbortExit.cpp"

+File:   11	"PalmOS_GlobalDestructors.c"

+File:   12	"PalmOS_setjmp.c"

+File:   13	"PalmOS_Startup.cpp"

+File:   14	"CWRuntime.c"

+File:   15	"I:\main\libraries\net\netsocket\Src\NetSocket.c"

+File:   16	"C:\Program Files\Metrowerks\CodeWarrior\Palm OS Support\CodeWarrior Libraries\Palm OS Glue\PalmOSGlue.lib"

+File:   17	"I:\main\libraries\PalmOSGlue\Src\IntlGlue.cp"

+File:   18	"I:\main\libraries\PalmOSGlue\Src\TextMgr.c"

+File:   19	"I:\main\libraries\PalmOSGlue\Src\TxtGlue.cp"

+File:   20	"I:\main\libraries\PalmOSGlue\Src\TsmGlue.cp"

+File:   21	"I:\main\libraries\PalmOSGlue\Src\WinGlue.cp"

+File:   22	"I:\main\libraries\PalmOSGlue\Src\FntGlue.cp"

+File:   23	"I:\main\libraries\PalmOSGlue\Src\DateGlue.cp"

+File:   24	"I:\main\libraries\PalmOSGlue\Src\SysGlue.cp"

+File:   25	"I:\main\libraries\PalmOSGlue\Src\OmGlue.cp"

+File:   26	"I:\main\libraries\PalmOSGlue\Src\ResGlue.cp"

+File:   27	"I:\main\libraries\PalmOSGlue\Src\LmGlue.cp"

+File:   28	"I:\main\libraries\PalmOSGlue\Src\FrmGlue.cpp"

+File:   29	"I:\main\libraries\PalmOSGlue\Src\AccessorGlue.cp"

+File:   30	"I:\main\libraries\PalmOSGlue\Src\MemGlue.cp"

+File:   31	"I:\main\libraries\PalmOSGlue\Src\BmpGlue.cp"

+File:   32	"I:\main\libraries\PalmOSGlue\Src\TblGlue.cp"

+File:   33	"I:\main\libraries\PalmOSGlue\Src\UIColorGlue.cp"

+File:   34	"C:\Documents and Settings\engelen\Desktop\gSOAP Palm\gsoap_changes Folder\my-gsoap-palm\stockquote\src\soapClient.c"

+File:   35	"C:\Documents and Settings\engelen\Desktop\gSOAP Palm\gsoap_changes Folder\my-gsoap-palm\stockquote\src\stockquote.c"

+File:   36	"C:\Documents and Settings\engelen\Desktop\gSOAP Palm\gsoap_changes Folder\my-gsoap-palm\stockquote\src\soapC.c"

+File:   37	"C:\Documents and Settings\engelen\Desktop\gSOAP Palm\gsoap_changes Folder\my-gsoap-palm\stockquote\src\QuoteStarter.c"

+File:   38	"C:\Documents and Settings\engelen\Desktop\gSOAP Palm\gsoap_changes Folder\my-gsoap-palm\palmFunctions.c"

+File:   39	"C:\Documents and Settings\engelen\Desktop\gSOAP Palm\gsoap_changes Folder\my-gsoap-palm\stdsoap2.c"

+

+Segment:   1   56746 bytes  "Segment_1"

+Code: 000004      12 bytes  "__DummyStartup__"               File: "__RuntimeModule__"

+Code: 000010      12 bytes  "__dthandler__4MTWKFv"           File: "NMWException.cp"

+Code: 00001c      12 bytes  "__duhandler__4MTWKFv"

+Code: 000028      16 bytes  "terminate__3stdFv"

+Code: 000038      24 bytes  "abort"                          File: "PalmOS_AbortExit.cpp"

+Code: 000050      42 bytes  "__destroy_global_chain"         File: "PalmOS_GlobalDestructors.c"

+Code: 00007a      14 bytes  "setjmp"                         File: "PalmOS_setjmp.c"

+Code: 000088      18 bytes  "longjmp"

+Code: 00009a     154 bytes  "__Relocate____4MTWKFPScPScUl"   File: "PalmOS_Startup.cpp"

+Code: 000134     314 bytes  "__Startup__"

+Code: 00026e       8 bytes  "__PreInit__"

+Code: 000276       8 bytes  "__InitCode__"

+Code: 00027e     132 bytes  "__SkipToXREFs____4MTWKFPSc"

+Code: 000302     128 bytes  "__PatchV10Devices____4MTWKFP14SysAppInfoType"

+Code: 000382     234 bytes  "__LoadAndRelocate____4MTWKFUcP7_opaque"

+Code: 00046c      32 bytes  "__lmul__"                       File: "CWRuntime.c"

+Code: 00048c      76 bytes  "__ldivu__"

+Code: 0004d8      34 bytes  "__ldiv__"

+Code: 0004fa      72 bytes  "__lmodu__"

+Code: 000542      24 bytes  "__lmod__"

+Code: 00055a      54 bytes  "NetUInit"                       File: "I:\main\libraries\net\netsocket\Src\NetSocket.c"

+Code: 000590     930 bytes  "soap_call_ns__getQuote"         File: "C:\Documents and Settings\engelen\Desktop\gSOAP Palm\gsoap_changes Folder\my-gsoap-palm\stockquote\src\soapClient.c"

+Code: 000932     244 bytes  "getQuote"                       File: "C:\Documents and Settings\engelen\Desktop\gSOAP Palm\gsoap_changes Folder\my-gsoap-palm\stockquote\src\stockquote.c"

+Code: 000a26      72 bytes  "StdEtoA"

+Code: 000a6e      48 bytes  "soap_serializeheader"           File: "C:\Documents and Settings\engelen\Desktop\gSOAP Palm\gsoap_changes Folder\my-gsoap-palm\stockquote\src\soapC.c"

+Code: 000a9e      90 bytes  "soap_putheader"

+Code: 000af8      94 bytes  "soap_getheader"

+Code: 000b56     150 bytes  "soap_fault"

+Code: 000bec      76 bytes  "soap_getfault"

+Code: 000c38      62 bytes  "soap_faultcode"

+Code: 000c76      58 bytes  "soap_faultstring"

+Code: 000cb0     204 bytes  "soap_faultdetail"

+Code: 000d7c     102 bytes  "soap_getindependent"

+Code: 000de2    1238 bytes  "soap_getelement"

+Code: 0012b8     294 bytes  "soap_ignore_element"

+Code: 0013de     150 bytes  "soap_putindependent"

+Code: 001474     476 bytes  "soap_putelement"

+Code: 001650      48 bytes  "soap_out_byte"

+Code: 001680      44 bytes  "soap_in_byte"

+Code: 0016ac      48 bytes  "soap_out_int"

+Code: 0016dc      44 bytes  "soap_in_int"

+Code: 001708       8 bytes  "soap_default_float"

+Code: 001710      48 bytes  "soap_out_float"

+Code: 001740      44 bytes  "soap_in_float"

+Code: 00176c     170 bytes  "soap_default_SOAP_ENV__Fault"

+Code: 001816      80 bytes  "soap_get_SOAP_ENV__Fault"

+Code: 001866    1160 bytes  "soap_in_SOAP_ENV__Fault"

+Code: 001cee      16 bytes  "soap_default_SOAP_ENV__Detail"

+Code: 001cfe     500 bytes  "soap_in_SOAP_ENV__Detail"

+Code: 001ef2      40 bytes  "soap_default_SOAP_ENV__Code"

+Code: 001f1a     548 bytes  "soap_in_SOAP_ENV__Code"

+Code: 00213e       2 bytes  "soap_serialize_SOAP_ENV__Header"

+Code: 002140       2 bytes  "soap_default_SOAP_ENV__Header"

+Code: 002142     106 bytes  "soap_out_SOAP_ENV__Header"

+Code: 0021ac     378 bytes  "soap_in_SOAP_ENV__Header"

+Code: 002326      60 bytes  "soap_serialize_ns__getQuote"

+Code: 002362      32 bytes  "soap_default_ns__getQuote"

+Code: 002382     124 bytes  "soap_put_ns__getQuote"

+Code: 0023fe     154 bytes  "soap_out_ns__getQuote"

+Code: 002498     458 bytes  "soap_in_ns__getQuote"

+Code: 002662       8 bytes  "soap_default_ns__getQuoteResponse"

+Code: 00266a     200 bytes  "soap_out_ns__getQuoteResponse"

+Code: 002732      80 bytes  "soap_get_ns__getQuoteResponse"

+Code: 002782     450 bytes  "soap_in_ns__getQuoteResponse"

+Code: 002944     258 bytes  "soap_in_PointerToSOAP_ENV__Detail"

+Code: 002a46     258 bytes  "soap_in_PointerToSOAP_ENV__Code"

+Code: 002b48     116 bytes  "soap_out_PointerTofloat"

+Code: 002bbc     258 bytes  "soap_in_PointerTofloat"

+Code: 002cbe      32 bytes  "soap_default__QName"

+Code: 002cde      54 bytes  "soap_in__QName"

+Code: 002d14       8 bytes  "soap_default_string"

+Code: 002d1c      38 bytes  "soap_serialize_string"

+Code: 002d42      48 bytes  "soap_out_string"

+Code: 002d72      54 bytes  "soap_in_string"

+Code: 002da8     146 bytes  "RomVersionCompatible"           File: "C:\Documents and Settings\engelen\Desktop\gSOAP Palm\gsoap_changes Folder\my-gsoap-palm\stockquote\src\QuoteStarter.c"

+Code: 002e3a      40 bytes  "GetObjectPtr"

+Code: 002e62      90 bytes  "MainFormInit"

+Code: 002ebc      66 bytes  "MainFormDoCommand"

+Code: 002efe     208 bytes  "MainFormHandleEvent"

+Code: 002fce      80 bytes  "AppHandleEvent"

+Code: 00301e     102 bytes  "AppEventLoop"

+Code: 003084      40 bytes  "AppStart"

+Code: 0030ac      38 bytes  "AppStop"

+Code: 0030d2     128 bytes  "StarterPalmMain"

+Code: 003152      46 bytes  "PilotMain"

+Code: 003180      28 bytes  "PalmStrerror"                   File: "C:\Documents and Settings\engelen\Desktop\gSOAP Palm\gsoap_changes Folder\my-gsoap-palm\palmFunctions.c"

+Code: 00319c     114 bytes  "strtod"

+Code: 00320e     144 bytes  "palmSprintf"

+Code: 00329e      78 bytes  "palmNetLibOpen"

+Code: 0032ec      40 bytes  "palmNetLibClose"

+Code: 003314     116 bytes  "palmRand"

+Code: 003388     198 bytes  "fsend"                          File: "C:\Documents and Settings\engelen\Desktop\gSOAP Palm\gsoap_changes Folder\my-gsoap-palm\stdsoap2.c"

+Code: 00344e     244 bytes  "soap_send_raw"

+Code: 003542      64 bytes  "soap_flush"

+Code: 003582     244 bytes  "soap_flush_raw"

+Code: 003676      64 bytes  "soap_send"

+Code: 0036b6     102 bytes  "soap_send3"

+Code: 00371c     172 bytes  "frecv"

+Code: 0037c8     114 bytes  "soap_getchunkchar"

+Code: 00383a      52 bytes  "soap_isxdigit"

+Code: 00386e     624 bytes  "soap_recv_raw"

+Code: 003ade     438 bytes  "soap_recv"

+Code: 003c94      62 bytes  "soap_getchar"

+Code: 003cd2      70 bytes  "soap_int_code"

+Code: 003d18      28 bytes  "soap_str_code"

+Code: 003d34     292 bytes  "soap_char"

+Code: 003e58      72 bytes  "soap_get0"

+Code: 003ea0      76 bytes  "soap_get1"

+Code: 003eec     612 bytes  "soap_get"

+Code: 004150      58 bytes  "soap_move"

+Code: 00418a      36 bytes  "soap_tell"

+Code: 0041ae     128 bytes  "soap_pututf8"

+Code: 00422e     406 bytes  "soap_getutf8"

+Code: 0043c4      82 bytes  "soap_strdup"

+Code: 004416      58 bytes  "soap_new_block"

+Code: 004450      84 bytes  "soap_push_block"

+Code: 0044a4     268 bytes  "soap_update_ptrs"

+Code: 0045b0     108 bytes  "soap_has_copies"

+Code: 00461c     434 bytes  "soap_resolve"

+Code: 0047ce      60 bytes  "soap_size_block"

+Code: 00480a      60 bytes  "soap_first_block"

+Code: 004846      62 bytes  "soap_next_block"

+Code: 004884      18 bytes  "soap_block_size"

+Code: 004896      66 bytes  "soap_end_block"

+Code: 0048d8     230 bytes  "soap_save_block"

+Code: 0049be     110 bytes  "soap_getposition"

+Code: 004a2c     332 bytes  "soap_push_namespace"

+Code: 004b78      54 bytes  "soap_pop_namespace"

+Code: 004bae     218 bytes  "soap_match_namespace"

+Code: 004c88     238 bytes  "soap_tag_cmp"

+Code: 004d76     284 bytes  "soap_match_tag"

+Code: 004e92      14 bytes  "tcp_init"

+Code: 004ea0     146 bytes  "tcp_error"

+Code: 004f32       6 bytes  "http_error"

+Code: 004f38     148 bytes  "tcp_gethost"

+Code: 004fcc     876 bytes  "tcp_connect"

+Code: 005338       4 bytes  "soap_poll"

+Code: 00533c      48 bytes  "tcp_accept"

+Code: 00536c      76 bytes  "tcp_disconnect"

+Code: 0053b8      28 bytes  "tcp_closesocket"

+Code: 0053d4      32 bytes  "tcp_shutdownsocket"

+Code: 0053f4      84 bytes  "soap_closesock"

+Code: 005448      76 bytes  "soap_hash"

+Code: 005494      38 bytes  "soap_init_pht"

+Code: 0054ba      28 bytes  "soap_new"

+Code: 0054d6      60 bytes  "soap_new2"

+Code: 005512      74 bytes  "soap_free_pht"

+Code: 00555c     206 bytes  "soap_embed"

+Code: 00562a      80 bytes  "soap_pointer_lookup"

+Code: 00567a     188 bytes  "soap_pointer_enter"

+Code: 005736     142 bytes  "soap_array_pointer_lookup"

+Code: 0057c4     320 bytes  "soap_begin_count"

+Code: 005904     364 bytes  "soap_begin_send"

+Code: 005a70      68 bytes  "soap_embedded"

+Code: 005ab4     184 bytes  "soap_reference"

+Code: 005b6c     282 bytes  "soap_embedded_id"

+Code: 005c86     124 bytes  "soap_is_embedded"

+Code: 005d02      68 bytes  "soap_is_single"

+Code: 005d46      36 bytes  "soap_set_embedded"

+Code: 005d6a      26 bytes  "soap_init_iht"

+Code: 005d84      92 bytes  "soap_free_iht"

+Code: 005de0      80 bytes  "soap_lookup"

+Code: 005e30     106 bytes  "soap_enter"

+Code: 005e9a     108 bytes  "soap_malloc"

+Code: 005f06     166 bytes  "soap_dealloc"

+Code: 005fac     120 bytes  "soap_delete"

+Code: 006024      66 bytes  "soap_lookup_type"

+Code: 006066     394 bytes  "soap_id_lookup"

+Code: 0061f0     294 bytes  "soap_id_forward"

+Code: 006316     318 bytes  "soap_id_enter"

+Code: 006454      24 bytes  "soap_fcopy"

+Code: 00646c     576 bytes  "soap_end_send"

+Code: 0066ac     226 bytes  "soap_end_recv"

+Code: 00678e     290 bytes  "soap_free"

+Code: 0068b0     690 bytes  "soap_init"

+Code: 006b62      60 bytes  "soap_init2"

+Code: 006b9e     148 bytes  "soap_begin"

+Code: 006c32     122 bytes  "soap_end"

+Code: 006cac     122 bytes  "soap_set_local_namespaces"

+Code: 006d26    1036 bytes  "soap_element"

+Code: 007132      98 bytes  "soap_element_begin_out"

+Code: 007194      32 bytes  "soap_strrchr"

+Code: 0071b4     234 bytes  "soap_strtol"

+Code: 00729e     218 bytes  "soap_strtoul"

+Code: 007378     330 bytes  "soap_element_start_end_out"

+Code: 0074c2     142 bytes  "soap_element_end_out"

+Code: 007550     122 bytes  "soap_element_ref"

+Code: 0075ca     124 bytes  "soap_element_href"

+Code: 007646     232 bytes  "soap_element_null"

+Code: 00772e     310 bytes  "soap_element_id"

+Code: 007864     254 bytes  "soap_element_result"

+Code: 007962     208 bytes  "soap_attribute"

+Code: 007a32     192 bytes  "soap_element_begin_in"

+Code: 007af2     424 bytes  "soap_element_end_in"

+Code: 007c9a      22 bytes  "soap_clr_attr"

+Code: 007cb0     234 bytes  "soap_getattrval"

+Code: 007d9a     186 bytes  "soap_append_lab"

+Code: 007e54    3160 bytes  "soap_peek_element"

+Code: 008aac      28 bytes  "soap_revert"

+Code: 008ac8     926 bytes  "soap_string_out"

+Code: 008e66    1118 bytes  "soap_string_in"

+Code: 0092c4     174 bytes  "soap_outint"

+Code: 009372      88 bytes  "soap_s2int"

+Code: 0093ca     262 bytes  "soap_inint"

+Code: 0094d0      54 bytes  "soap_long2s"

+Code: 009506     178 bytes  "soap_outbyte"

+Code: 0095b8     102 bytes  "soap_s2byte"

+Code: 00961e     262 bytes  "soap_inbyte"

+Code: 009724     144 bytes  "soap_float2s"

+Code: 0097b4     172 bytes  "soap_outfloat"

+Code: 009860     288 bytes  "soap_s2float"

+Code: 009980     262 bytes  "soap_infloat"

+Code: 009a86     522 bytes  "soap_s2QName"

+Code: 009c90     176 bytes  "soap_outstring"

+Code: 009d40     320 bytes  "soap_instring"

+Code: 009e80     226 bytes  "soap_inliteral"

+Code: 009f62     164 bytes  "soap_value"

+Code: 00a006     192 bytes  "soap_getline"

+Code: 00a0c6     402 bytes  "soap_count_attachments"

+Code: 00a258      94 bytes  "soap_putdimefield"

+Code: 00a2b6     382 bytes  "soap_putdimehdr"

+Code: 00a434     602 bytes  "soap_putdime"

+Code: 00a68e     166 bytes  "soap_getdimefield"

+Code: 00a734     470 bytes  "soap_getdimehdr"

+Code: 00a90a     968 bytes  "soap_getdime"

+Code: 00acd2     896 bytes  "soap_getmimehdr"

+Code: 00b052     572 bytes  "soap_getmime"

+Code: 00b28e     136 bytes  "soap_match_cid"

+Code: 00b316     132 bytes  "soap_resolve_attachment"

+Code: 00b39a     544 bytes  "soap_putmimehdr"

+Code: 00b5ba     168 bytes  "soap_putmime"

+Code: 00b662      30 bytes  "soap_clr_mime"

+Code: 00b680     112 bytes  "soap_new_multipart"

+Code: 00b6f0     184 bytes  "soap_set_mime_attachment"

+Code: 00b7a8     234 bytes  "soap_select_mime_boundary"

+Code: 00b892     108 bytes  "soap_valid_mime_boundary"

+Code: 00b8fe     822 bytes  "soap_begin_recv"

+Code: 00bc34     736 bytes  "http_parse"

+Code: 00bf14    1110 bytes  "http_parse_header"

+Code: 00c36a     136 bytes  "soap_get_header_attribute"

+Code: 00c3f2      46 bytes  "soap_decode_key"

+Code: 00c420      74 bytes  "soap_decode_val"

+Code: 00c46a     248 bytes  "soap_decode"

+Code: 00c562     458 bytes  "soap_envelope_begin_out"

+Code: 00c72c     334 bytes  "soap_envelope_end_out"

+Code: 00c87a     252 bytes  "soap_envelope_begin_in"

+Code: 00c976      62 bytes  "soap_envelope_end_in"

+Code: 00c9b4     116 bytes  "soap_body_begin_out"

+Code: 00ca28      58 bytes  "soap_body_end_out"

+Code: 00ca62      90 bytes  "soap_body_begin_in"

+Code: 00cabc      74 bytes  "soap_body_end_in"

+Code: 00cb06      56 bytes  "soap_recv_header"

+Code: 00cb3e     292 bytes  "soap_set_endpoint"

+Code: 00cc62      40 bytes  "soap_connect"

+Code: 00cc8a     522 bytes  "soap_connect_command"

+Code: 00ce94     800 bytes  "soap_puthttphdr"

+Code: 00d1b4       4 bytes  "http_get"

+Code: 00d1b8     754 bytes  "http_post"

+Code: 00d4aa     110 bytes  "http_send_header"

+Code: 00d518     172 bytes  "http_post_header"

+Code: 00d5c4     638 bytes  "http_response"

+Code: 00d842     300 bytes  "soap_set_fault"

+Code: 00d96e     628 bytes  "soap_recv_fault"

+Code: 00dbe2      84 bytes  "soap_strerror"

+Code: 00dc36     116 bytes  "soap_set_error"

+Code: 00dcaa      94 bytes  "soap_set_sender_error"

+Code: 00dd08      96 bytes  "soap_set_receiver_error"

+Code: 00dd68      66 bytes  "fplugin"

+

+Data section below A5:   1484 bytes

+Data section above A5:   2084 bytes

+

+Initialized near data

+Data:     -4       4 bytes  "AppNetTimeout"

+Data:    -68      64 bytes  "mime_codes"

+Data:    -76       8 bytes  "@176"

+Data:    -88      11 bytes  "@175"

+Data:    -96       7 bytes  "@174"

+Data:   -114      17 bytes  "@173"

+Data:   -122       7 bytes  "@172"

+Data:   -128       5 bytes  "@171"

+Data:   -134       5 bytes  "@170"

+Data:   -200      65 bytes  "soap_base64o"

+Data:   -236      35 bytes  "soap_rpc"

+Data:   -276      40 bytes  "soap_enc2"

+Data:   -316      40 bytes  "soap_env2"

+Data:   -358      42 bytes  "soap_enc1"

+Data:   -400      42 bytes  "soap_env1"

+Data:   -402       2 bytes  "seed$271"

+Data:   -498      96 bytes  "namespaces"

+Data:   -526      28 bytes  "@183"

+Data:   -530       3 bytes  "@182"

+Data:   -560      30 bytes  "@181"

+Data:   -594      33 bytes  "@180"

+Data:   -598       4 bytes  "@179"

+Data:   -638      39 bytes  "@178"

+Data:   -680      42 bytes  "@177"

+Data:   -684       4 bytes  "@176"

+Data:   -718      34 bytes  "@175"

+Data:   -760      42 bytes  "@174"

+Data:   -770       9 bytes  "@173"

+Data:   -804      34 bytes  "@172"

+Data:   -846      42 bytes  "@171"

+Data:   -856       9 bytes  "@170"

+

+Uninitialized near data

+Data:  -1424     568 bytes  "AppHostInfo"

+Data:  -1426       2 bytes  "h_errno"

+Data:  -1428       2 bytes  "AppNetRefnum"

+Data:  -1432       4 bytes  "__CW_FEATURES_PTR"

+Data:  -1436       4 bytes  "__global_destructor_chain"

+Data:  -1438       2 bytes  "errno"

+Data:  -1442       3 bytes  "soap_padding"

+Data:  -1482      40 bytes  "str$190"

+Data:  -1484       2 bytes  "AppNetOpenCount"

+

+Initialized far data

+Data:     52    2032 bytes  "__segtable__"

+Data:     40       6 bytes  "@exceptioninfo@"

+Data:     46       6 bytes  "@exceptioninfo@"

diff --git a/gsoap-palm/stockquote/obj/stockQuoteD.prc b/gsoap-palm/stockquote/obj/stockQuoteD.prc
new file mode 100644
index 0000000..6ff3001
--- /dev/null
+++ b/gsoap-palm/stockquote/obj/stockQuoteD.prc
Binary files differ
diff --git a/gsoap-palm/stockquote/obj/stockQuoteD.prc.psym b/gsoap-palm/stockquote/obj/stockQuoteD.prc.psym
new file mode 100644
index 0000000..e911a25
--- /dev/null
+++ b/gsoap-palm/stockquote/obj/stockQuoteD.prc.psym
Binary files differ
diff --git a/gsoap-palm/stockquote/obj/stockQuoteD.tmp b/gsoap-palm/stockquote/obj/stockQuoteD.tmp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/gsoap-palm/stockquote/obj/stockQuoteD.tmp
diff --git a/gsoap-palm/stockquote/obj/stockQuoteD.tmp.MAP b/gsoap-palm/stockquote/obj/stockQuoteD.tmp.MAP
new file mode 100644
index 0000000..0049069
--- /dev/null
+++ b/gsoap-palm/stockquote/obj/stockQuoteD.tmp.MAP
@@ -0,0 +1,361 @@
+File:    1	"__RuntimeModule__"

+File:    2	"C:\Program Files\Metrowerks\CodeWarrior\Palm OS Support\CodeWarrior Libraries\Runtime\PalmOSRuntime_2i_A5.lib"

+File:    3	"CPlusLib68K.cp"

+File:    4	"Exception68K.cp"

+File:    5	"LongLong68K.c"

+File:    6	"MWRTTI.cp"

+File:    7	"NMWException.cp"

+File:    8	"NewMore.cp"

+File:    9	"New.cp"

+File:   10	"PalmOS_AbortExit.cpp"

+File:   11	"PalmOS_GlobalDestructors.c"

+File:   12	"PalmOS_setjmp.c"

+File:   13	"PalmOS_Startup.cpp"

+File:   14	"CWRuntime.c"

+File:   15	"C:\Documents and Settings\engelen\Desktop\gSOAP Palm\gsoap_changes Folder\gsoap-palm\stockquote\src\stockquote.c"

+File:   16	"C:\Documents and Settings\engelen\Desktop\gSOAP Palm\gsoap_changes Folder\gsoap-palm\stockquote\src\QuoteStarter.c"

+File:   17	"I:\main\libraries\net\netsocket\Src\NetSocket.c"

+File:   18	"C:\Program Files\Metrowerks\CodeWarrior\Palm OS Support\CodeWarrior Libraries\Palm OS Glue\PalmOSGlue.lib"

+File:   19	"I:\main\libraries\PalmOSGlue\Src\IntlGlue.cp"

+File:   20	"I:\main\libraries\PalmOSGlue\Src\TextMgr.c"

+File:   21	"I:\main\libraries\PalmOSGlue\Src\TxtGlue.cp"

+File:   22	"I:\main\libraries\PalmOSGlue\Src\TsmGlue.cp"

+File:   23	"I:\main\libraries\PalmOSGlue\Src\WinGlue.cp"

+File:   24	"I:\main\libraries\PalmOSGlue\Src\FntGlue.cp"

+File:   25	"I:\main\libraries\PalmOSGlue\Src\DateGlue.cp"

+File:   26	"I:\main\libraries\PalmOSGlue\Src\SysGlue.cp"

+File:   27	"I:\main\libraries\PalmOSGlue\Src\OmGlue.cp"

+File:   28	"I:\main\libraries\PalmOSGlue\Src\ResGlue.cp"

+File:   29	"I:\main\libraries\PalmOSGlue\Src\LmGlue.cp"

+File:   30	"I:\main\libraries\PalmOSGlue\Src\FrmGlue.cpp"

+File:   31	"I:\main\libraries\PalmOSGlue\Src\AccessorGlue.cp"

+File:   32	"I:\main\libraries\PalmOSGlue\Src\MemGlue.cp"

+File:   33	"I:\main\libraries\PalmOSGlue\Src\BmpGlue.cp"

+File:   34	"I:\main\libraries\PalmOSGlue\Src\TblGlue.cp"

+File:   35	"I:\main\libraries\PalmOSGlue\Src\UIColorGlue.cp"

+File:   36	"C:\Documents and Settings\engelen\Desktop\gSOAP Palm\gsoap_changes Folder\gsoap-palm\stockquote\src\soapC.c"

+File:   37	"C:\Documents and Settings\engelen\Desktop\gSOAP Palm\gsoap_changes Folder\gsoap-palm\stockquote\src\soapClient.c"

+File:   38	"C:\Documents and Settings\engelen\Desktop\gSOAP Palm\gsoap_changes Folder\gsoap-palm\palmFunctions.c"

+File:   39	"C:\Documents and Settings\engelen\Desktop\gSOAP Palm\gsoap_changes Folder\gsoap-palm\stdsoap2.c"

+

+Segment:   1   62240 bytes  "Segment_1"

+Code: 000004      12 bytes  "__DummyStartup__"               File: "__RuntimeModule__"

+Code: 000010      12 bytes  "__dthandler__4MTWKFv"           File: "NMWException.cp"

+Code: 00001c      12 bytes  "__duhandler__4MTWKFv"

+Code: 000028      16 bytes  "terminate__3stdFv"

+Code: 000038      24 bytes  "abort"                          File: "PalmOS_AbortExit.cpp"

+Code: 000050      42 bytes  "__destroy_global_chain"         File: "PalmOS_GlobalDestructors.c"

+Code: 00007a      14 bytes  "setjmp"                         File: "PalmOS_setjmp.c"

+Code: 000088      18 bytes  "longjmp"

+Code: 00009a     154 bytes  "__Relocate____4MTWKFPScPScUl"   File: "PalmOS_Startup.cpp"

+Code: 000134     314 bytes  "__Startup__"

+Code: 00026e       8 bytes  "__PreInit__"

+Code: 000276       8 bytes  "__InitCode__"

+Code: 00027e     132 bytes  "__SkipToXREFs____4MTWKFPSc"

+Code: 000302     128 bytes  "__PatchV10Devices____4MTWKFP14SysAppInfoType"

+Code: 000382     234 bytes  "__LoadAndRelocate____4MTWKFUcP7_opaque"

+Code: 00046c      32 bytes  "__lmul__"                       File: "CWRuntime.c"

+Code: 00048c      76 bytes  "__ldivu__"

+Code: 0004d8      34 bytes  "__ldiv__"

+Code: 0004fa      72 bytes  "__lmodu__"

+Code: 000542      24 bytes  "__lmod__"

+Code: 00055a     256 bytes  "getQuote"                       File: "C:\Documents and Settings\engelen\Desktop\gSOAP Palm\gsoap_changes Folder\gsoap-palm\stockquote\src\stockquote.c"

+Code: 00065a      84 bytes  "StdEtoA"

+Code: 0006ae     312 bytes  "RomVersionCompatible"           File: "C:\Documents and Settings\engelen\Desktop\gSOAP Palm\gsoap_changes Folder\gsoap-palm\stockquote\src\QuoteStarter.c"

+Code: 0007e6      56 bytes  "GetObjectPtr"

+Code: 00081e     106 bytes  "MainFormInit"

+Code: 000888      86 bytes  "MainFormDoCommand"

+Code: 0008de     232 bytes  "MainFormHandleEvent"

+Code: 0009c6      98 bytes  "AppHandleEvent"

+Code: 000a28     118 bytes  "AppEventLoop"

+Code: 000a9e      52 bytes  "AppStart"

+Code: 000ad2      48 bytes  "AppStop"

+Code: 000b02     146 bytes  "StarterPalmMain"

+Code: 000b94      58 bytes  "PilotMain"

+Code: 000bce      54 bytes  "NetUInit"                       File: "I:\main\libraries\net\netsocket\Src\NetSocket.c"

+Code: 000c04      70 bytes  "soap_serializeheader"           File: "C:\Documents and Settings\engelen\Desktop\gSOAP Palm\gsoap_changes Folder\gsoap-palm\stockquote\src\soapC.c"

+Code: 000c4a     108 bytes  "soap_putheader"

+Code: 000cb6     112 bytes  "soap_getheader"

+Code: 000d26     164 bytes  "soap_fault"

+Code: 000dca      92 bytes  "soap_getfault"

+Code: 000e26      74 bytes  "soap_faultcode"

+Code: 000e70      78 bytes  "soap_faultstring"

+Code: 000ebe     224 bytes  "soap_faultdetail"

+Code: 000f9e     120 bytes  "soap_getindependent"

+Code: 001016    1282 bytes  "soap_getelement"

+Code: 001518     314 bytes  "soap_ignore_element"

+Code: 001652     172 bytes  "soap_putindependent"

+Code: 0016fe     494 bytes  "soap_putelement"

+Code: 0018ec     274 bytes  "soap_resolve_attachments"

+Code: 0019fe      64 bytes  "soap_out_byte"

+Code: 001a3e      60 bytes  "soap_in_byte"

+Code: 001a7a      64 bytes  "soap_out_int"

+Code: 001aba      58 bytes  "soap_in_int"

+Code: 001af4      36 bytes  "soap_default_float"

+Code: 001b18      66 bytes  "soap_out_float"

+Code: 001b5a      60 bytes  "soap_in_float"

+Code: 001b96      70 bytes  "soap_default_SOAP_ENV__Fault"

+Code: 001bdc     108 bytes  "soap_get_SOAP_ENV__Fault"

+Code: 001c48     962 bytes  "soap_in_SOAP_ENV__Fault"

+Code: 00200a      54 bytes  "soap_default_SOAP_ENV__Detail"

+Code: 002040     526 bytes  "soap_in_SOAP_ENV__Detail"

+Code: 00224e      52 bytes  "soap_default_SOAP_ENV__Code"

+Code: 002282     646 bytes  "soap_in_SOAP_ENV__Code"

+Code: 002508      66 bytes  "soap_serialize_SOAP_ENV__Header"

+Code: 00254a      38 bytes  "soap_mark_SOAP_ENV__Header"

+Code: 002570      40 bytes  "soap_default_SOAP_ENV__Header"

+Code: 002598     134 bytes  "soap_out_SOAP_ENV__Header"

+Code: 00261e     412 bytes  "soap_in_SOAP_ENV__Header"

+Code: 0027ba      62 bytes  "soap_serialize_ns__getQuote"

+Code: 0027f8      86 bytes  "soap_mark_ns__getQuote"

+Code: 00284e      42 bytes  "soap_default_ns__getQuote"

+Code: 002878     148 bytes  "soap_put_ns__getQuote"

+Code: 00290c     178 bytes  "soap_out_ns__getQuote"

+Code: 0029be     480 bytes  "soap_in_ns__getQuote"

+Code: 002b9e      52 bytes  "soap_default_ns__getQuoteResponse"

+Code: 002bd2     232 bytes  "soap_out_ns__getQuoteResponse"

+Code: 002cba     112 bytes  "soap_get_ns__getQuoteResponse"

+Code: 002d2a     488 bytes  "soap_in_ns__getQuoteResponse"

+Code: 002f12     292 bytes  "soap_in_PointerToSOAP_ENV__Code"

+Code: 003036     296 bytes  "soap_in_PointerToSOAP_ENV__Detail"

+Code: 00315e     142 bytes  "soap_out_PointerTofloat"

+Code: 0031ec     284 bytes  "soap_in_PointerTofloat"

+Code: 003308      70 bytes  "soap_in__QName"

+Code: 00334e      58 bytes  "soap_mark_string"

+Code: 003388      66 bytes  "soap_out_string"

+Code: 0033ca      70 bytes  "soap_in_string"

+Code: 003410    1032 bytes  "soap_call_ns__getQuote"         File: "C:\Documents and Settings\engelen\Desktop\gSOAP Palm\gsoap_changes Folder\gsoap-palm\stockquote\src\soapClient.c"

+Code: 003818      44 bytes  "PalmStrerror"                   File: "C:\Documents and Settings\engelen\Desktop\gSOAP Palm\gsoap_changes Folder\gsoap-palm\palmFunctions.c"

+Code: 003844     124 bytes  "strtod"

+Code: 0038c0      78 bytes  "sscanf"

+Code: 00390e     184 bytes  "palmSprintf"

+Code: 0039c6      96 bytes  "palmNetLibOpen"

+Code: 003a26      58 bytes  "palmNetLibClose"

+Code: 003a60     138 bytes  "palmRand"

+Code: 003aea     214 bytes  "fsend"                          File: "C:\Documents and Settings\engelen\Desktop\gSOAP Palm\gsoap_changes Folder\gsoap-palm\stdsoap2.c"

+Code: 003bc0     276 bytes  "soap_flush_raw"

+Code: 003cd4      82 bytes  "soap_flush"

+Code: 003d26     330 bytes  "soap_send_raw"

+Code: 003e70      76 bytes  "soap_send"

+Code: 003ebc      88 bytes  "soap_send2"

+Code: 003f14     116 bytes  "soap_send3"

+Code: 003f88     174 bytes  "frecv"

+Code: 004036     130 bytes  "soap_getchunkchar"

+Code: 0040b8      64 bytes  "soap_isxdigit"

+Code: 0040f8     596 bytes  "soap_recv_raw"

+Code: 00434c     464 bytes  "soap_recv"

+Code: 00451c     124 bytes  "soap_getchar"

+Code: 004598      80 bytes  "soap_int_code"

+Code: 0045e8      50 bytes  "soap_str_code"

+Code: 00461a     352 bytes  "soap_char"

+Code: 00477a    1408 bytes  "soap_get"

+Code: 004cfa      66 bytes  "soap_move"

+Code: 004d3c      54 bytes  "soap_tell"

+Code: 004d72     144 bytes  "soap_pututf8"

+Code: 004e02     662 bytes  "soap_getutf8"

+Code: 005098      96 bytes  "soap_strdup"

+Code: 0050f8      76 bytes  "soap_new_block"

+Code: 005144     102 bytes  "soap_push_block"

+Code: 0051aa     230 bytes  "soap_update_ptrs"

+Code: 005290     134 bytes  "soap_has_copies"

+Code: 005316     496 bytes  "soap_resolve"

+Code: 005506      86 bytes  "soap_size_block"

+Code: 00555c      86 bytes  "soap_first_block"

+Code: 0055b2      90 bytes  "soap_next_block"

+Code: 00560c      42 bytes  "soap_block_size"

+Code: 005636      84 bytes  "soap_end_block"

+Code: 00568a     266 bytes  "soap_save_block"

+Code: 005794     134 bytes  "soap_getposition"

+Code: 00581a     378 bytes  "soap_push_namespace"

+Code: 005994     108 bytes  "soap_pop_namespace"

+Code: 005a00     250 bytes  "soap_match_namespace"

+Code: 005afa     252 bytes  "soap_tag_cmp"

+Code: 005bf6     302 bytes  "soap_match_tag"

+Code: 005d24      32 bytes  "tcp_init"

+Code: 005d44     152 bytes  "tcp_error"

+Code: 005ddc      90 bytes  "http_error"

+Code: 005e36     184 bytes  "tcp_gethost"

+Code: 005eee     826 bytes  "tcp_connect"

+Code: 006228      22 bytes  "soap_poll"

+Code: 00623e      62 bytes  "tcp_accept"

+Code: 00627c      80 bytes  "tcp_disconnect"

+Code: 0062cc      46 bytes  "tcp_closesocket"

+Code: 0062fa      54 bytes  "tcp_shutdownsocket"

+Code: 006330     100 bytes  "soap_closesock"

+Code: 006394      98 bytes  "soap_hash"

+Code: 0063f6      54 bytes  "soap_init_pht"

+Code: 00642c      62 bytes  "soap_new"

+Code: 00646a      94 bytes  "soap_free_pht"

+Code: 0064c8     224 bytes  "soap_embed"

+Code: 0065a8     108 bytes  "soap_pointer_lookup"

+Code: 006614     162 bytes  "soap_pointer_enter"

+Code: 0066b6     176 bytes  "soap_array_pointer_lookup"

+Code: 006766     346 bytes  "soap_begin_count"

+Code: 0068c0     358 bytes  "soap_begin_send"

+Code: 006a26      84 bytes  "soap_embedded"

+Code: 006a7a     206 bytes  "soap_reference"

+Code: 006b48     302 bytes  "soap_embedded_id"

+Code: 006c76     150 bytes  "soap_is_embedded"

+Code: 006d0c      92 bytes  "soap_is_single"

+Code: 006d68      62 bytes  "soap_set_embedded"

+Code: 006da6      50 bytes  "soap_init_iht"

+Code: 006dd8     112 bytes  "soap_free_iht"

+Code: 006e48      92 bytes  "soap_hlookup"

+Code: 006ea4     156 bytes  "soap_lookup"

+Code: 006f40     124 bytes  "soap_enter"

+Code: 006fbc     122 bytes  "soap_malloc"

+Code: 007036     174 bytes  "soap_dealloc"

+Code: 0070e4     152 bytes  "soap_delete"

+Code: 00717c      86 bytes  "soap_lookup_type"

+Code: 0071d2     452 bytes  "soap_id_lookup"

+Code: 007396     314 bytes  "soap_id_forward"

+Code: 0074d0     334 bytes  "soap_id_enter"

+Code: 00761e      62 bytes  "soap_fcopy"

+Code: 00765c     586 bytes  "soap_end_send"

+Code: 0078a6     192 bytes  "soap_end_recv"

+Code: 007966     290 bytes  "soap_free"

+Code: 007a88     690 bytes  "soap_init"

+Code: 007d3a     162 bytes  "soap_begin"

+Code: 007ddc     138 bytes  "soap_end"

+Code: 007e66     214 bytes  "soap_set_local_namespaces"

+Code: 007f3c    1082 bytes  "soap_element"

+Code: 008376     124 bytes  "soap_element_begin_out"

+Code: 0083f2      50 bytes  "soap_strrchr"

+Code: 008424     240 bytes  "soap_strtol"

+Code: 008514     224 bytes  "soap_strtoul"

+Code: 0085f4     338 bytes  "soap_element_start_end_out"

+Code: 008746     166 bytes  "soap_element_end_out"

+Code: 0087ec     138 bytes  "soap_element_ref"

+Code: 008876     144 bytes  "soap_element_href"

+Code: 008906     252 bytes  "soap_element_null"

+Code: 008a02     320 bytes  "soap_element_id"

+Code: 008b42     276 bytes  "soap_element_result"

+Code: 008c56     204 bytes  "soap_attribute"

+Code: 008d22     188 bytes  "soap_element_begin_in"

+Code: 008dde     416 bytes  "soap_element_end_in"

+Code: 008f7e      44 bytes  "soap_clr_attr"

+Code: 008faa     250 bytes  "soap_getattrval"

+Code: 0090a4    3148 bytes  "soap_peek_element"

+Code: 009cf0      48 bytes  "soap_revert"

+Code: 009d20     948 bytes  "soap_string_out"

+Code: 00a0d4    1090 bytes  "soap_string_in"

+Code: 00a516     188 bytes  "soap_outint"

+Code: 00a5d2      92 bytes  "soap_s2int"

+Code: 00a62e     268 bytes  "soap_inint"

+Code: 00a73a      68 bytes  "soap_long2s"

+Code: 00a77e     194 bytes  "soap_outbyte"

+Code: 00a840     110 bytes  "soap_s2byte"

+Code: 00a8ae     268 bytes  "soap_inbyte"

+Code: 00a9ba     216 bytes  "soap_float2s"

+Code: 00aa92     188 bytes  "soap_outfloat"

+Code: 00ab4e     324 bytes  "soap_s2float"

+Code: 00ac92     270 bytes  "soap_infloat"

+Code: 00ada0     544 bytes  "soap_s2QName"

+Code: 00afc0     194 bytes  "soap_outstring"

+Code: 00b082     302 bytes  "soap_instring"

+Code: 00b1b0     214 bytes  "soap_inliteral"

+Code: 00b286     134 bytes  "soap_value"

+Code: 00b30c     196 bytes  "soap_getline"

+Code: 00b3d0     416 bytes  "soap_count_attachments"

+Code: 00b570     114 bytes  "soap_putdimefield"

+Code: 00b5e2     408 bytes  "soap_putdimehdr"

+Code: 00b77a     616 bytes  "soap_putdime"

+Code: 00b9e2     236 bytes  "soap_getdimefield"

+Code: 00bace     506 bytes  "soap_getdimehdr"

+Code: 00bcc8     868 bytes  "soap_getdime"

+Code: 00c02c     812 bytes  "soap_getmimehdr"

+Code: 00c358     710 bytes  "soap_getmime"

+Code: 00c61e     562 bytes  "soap_putmimehdr"

+Code: 00c850     186 bytes  "soap_putmime"

+Code: 00c90a      52 bytes  "soap_clr_mime"

+Code: 00c93e     134 bytes  "soap_new_multipart"

+Code: 00c9c4     212 bytes  "soap_set_mime_attachment"

+Code: 00ca98     262 bytes  "soap_select_mime_boundary"

+Code: 00cb9e     140 bytes  "soap_valid_mime_boundary"

+Code: 00cc2a     858 bytes  "soap_begin_recv"

+Code: 00cf84     668 bytes  "http_parse"

+Code: 00d220    1074 bytes  "http_parse_header"

+Code: 00d652     160 bytes  "soap_get_header_attribute"

+Code: 00d6f2      64 bytes  "soap_decode_key"

+Code: 00d732      92 bytes  "soap_decode_val"

+Code: 00d78e     254 bytes  "soap_decode"

+Code: 00d88c     466 bytes  "soap_envelope_begin_out"

+Code: 00da5e     332 bytes  "soap_envelope_end_out"

+Code: 00dbaa     278 bytes  "soap_envelope_begin_in"

+Code: 00dcc0     102 bytes  "soap_envelope_end_in"

+Code: 00dd26     202 bytes  "soap_body_begin_out"

+Code: 00ddf0      94 bytes  "soap_body_end_out"

+Code: 00de4e      82 bytes  "soap_body_begin_in"

+Code: 00dea0      94 bytes  "soap_body_end_in"

+Code: 00defe      76 bytes  "soap_recv_header"

+Code: 00df4a     272 bytes  "soap_set_endpoint"

+Code: 00e05a      56 bytes  "soap_connect"

+Code: 00e092     606 bytes  "soap_connect_command"

+Code: 00e2f0     592 bytes  "soap_puthttphdr"

+Code: 00e540      22 bytes  "http_get"

+Code: 00e556     748 bytes  "http_post"

+Code: 00e842     130 bytes  "http_send_header"

+Code: 00e8c4     192 bytes  "http_post_header"

+Code: 00e984     850 bytes  "http_response"

+Code: 00ecd6     394 bytes  "soap_set_fault"

+Code: 00ee60     644 bytes  "soap_recv_fault"

+Code: 00f0e4     108 bytes  "soap_strerror"

+Code: 00f150     134 bytes  "soap_set_error"

+Code: 00f1d6     126 bytes  "soap_set_sender_error"

+Code: 00f254     130 bytes  "soap_set_receiver_error"

+Code: 00f2d6      74 bytes  "fplugin"

+

+Data section below A5:   1488 bytes

+Data section above A5:   2080 bytes

+

+Initialized near data

+Data:     -4       4 bytes  "AppNetTimeout"

+Data:    -68      64 bytes  "mime_codes"

+Data:    -76       8 bytes  "@160"

+Data:    -88      11 bytes  "@159"

+Data:    -96       7 bytes  "@158"

+Data:   -114      17 bytes  "@157"

+Data:   -122       7 bytes  "@156"

+Data:   -128       5 bytes  "@155"

+Data:   -134       5 bytes  "@154"

+Data:   -200      65 bytes  "soap_base64o"

+Data:   -204       4 bytes  "soap_double_nan"

+Data:   -240      35 bytes  "soap_rpc"

+Data:   -280      40 bytes  "soap_enc2"

+Data:   -320      40 bytes  "soap_env2"

+Data:   -362      42 bytes  "soap_enc1"

+Data:   -404      42 bytes  "soap_env1"

+Data:   -406       2 bytes  "seed$207"

+Data:   -502      96 bytes  "namespaces"

+Data:   -530      28 bytes  "@167"

+Data:   -534       3 bytes  "@166"

+Data:   -564      30 bytes  "@165"

+Data:   -598      33 bytes  "@164"

+Data:   -602       4 bytes  "@163"

+Data:   -642      39 bytes  "@162"

+Data:   -684      42 bytes  "@161"

+Data:   -688       4 bytes  "@160"

+Data:   -722      34 bytes  "@159"

+Data:   -764      42 bytes  "@158"

+Data:   -774       9 bytes  "@157"

+Data:   -808      34 bytes  "@156"

+Data:   -850      42 bytes  "@155"

+Data:   -860       9 bytes  "@154"

+

+Uninitialized near data

+Data:  -1428     568 bytes  "AppHostInfo"

+Data:  -1430       2 bytes  "h_errno"

+Data:  -1432       2 bytes  "AppNetRefnum"

+Data:  -1436       4 bytes  "__CW_FEATURES_PTR"

+Data:  -1440       4 bytes  "__global_destructor_chain"

+Data:  -1442       2 bytes  "errno"

+Data:  -1446       3 bytes  "soap_padding"

+Data:  -1486      40 bytes  "str$118"

+Data:  -1488       2 bytes  "AppNetOpenCount"

+

+Initialized far data

+Data:     64    2016 bytes  "__segtable__"

+Data:     40       6 bytes  "@exceptioninfo@"

+Data:     46       6 bytes  "@exceptioninfo@"

+Data:     52       6 bytes  "@exceptioninfo@"

+Data:     58       6 bytes  "@exceptioninfo@"

diff --git a/gsoap-palm/stockquote/rsc/StockQuote.rsrc b/gsoap-palm/stockquote/rsc/StockQuote.rsrc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/gsoap-palm/stockquote/rsc/StockQuote.rsrc
diff --git a/gsoap-palm/stockquote/rsc/StockQuoteRsc.h b/gsoap-palm/stockquote/rsc/StockQuoteRsc.h
new file mode 100644
index 0000000..59c6876
--- /dev/null
+++ b/gsoap-palm/stockquote/rsc/StockQuoteRsc.h
@@ -0,0 +1,91 @@
+//	Header generated by Constructor for Palm OS (R) 1.8
+//
+//	Generated at 5:26:00 PM on Friday, April 02, 2004
+//
+//	Generated for file: H:\gsoap2.6\win\stockquote\Rsc\StockQuote.rsrc
+//
+//	THIS IS AN AUTOMATICALLY GENERATED HEADER FILE
+//	DO NOT EDIT - CHANGES MADE TO THIS FILE WILL BE LOST
+//
+//	Palm App Name:   		"StockQuote"
+//
+//	Palm App Version:		"1.0"
+
+
+//	Resource: tFRM 1000
+#define MainForm                                  1000	//(Left Origin = 0, Top Origin = 0, Width = 160, Height = 160, Usable = 1, Modal = 0, Save Behind = 0, Help ID = 0, Menu Bar ID = 1000, Default Button ID = 0)
+#define MainRunButton                             1001	//(Left Origin = 9, Top Origin = 73, Width = 36, Height = 12, Usable = 1, Anchor Left = 1, Frame = 1, Non-bold Frame = 1, Font = Standard)
+#define MainSymbolField                           1002	//(Left Origin = 65, Top Origin = 22, Width = 50, Height = 12, Usable = 1, Editable = 1, Underline = 1, Single Line = 0, Dynamic Size = 0, Left Justified = 1, Max Characters = 80, Font = Standard, Auto Shift = 0, Has Scroll Bar = 0, Numeric = 0)
+#define MainResultField                           1005	//(Left Origin = 64, Top Origin = 48, Width = 50, Height = 12, Usable = 1, Editable = 0, Underline = 1, Single Line = 0, Dynamic Size = 0, Left Justified = 1, Max Characters = 80, Font = Standard, Auto Shift = 0, Has Scroll Bar = 0, Numeric = 0)
+#define MainUnnamed1003Label                      1003	//(Left Origin = 10, Top Origin = 21, Usable = 1, Font = Standard)
+#define MainUnnamed1004Label                      1004	//(Left Origin = 12, Top Origin = 48, Usable = 1, Font = Standard)
+
+//	Resource: tFRM 1100
+#define AboutForm                                 1100	//(Left Origin = 2, Top Origin = 2, Width = 156, Height = 156, Usable = 1, Modal = 1, Save Behind = 1, Help ID = 0, Menu Bar ID = 0, Default Button ID = 0)
+#define AboutOKButton                             1105	//(Left Origin = 58, Top Origin = 133, Width = 40, Height = 12, Usable = 1, Anchor Left = 1, Frame = 1, Non-bold Frame = 1, Font = Standard)
+#define AboutTitleLabel                           1102	//(Left Origin = 22, Top Origin = 22, Usable = 1, Font = Large)
+#define AboutText1Label                           1103	//(Left Origin = 23, Top Origin = 54, Usable = 1, Font = Standard)
+#define AboutText2Label                           1104	//(Left Origin = 50, Top Origin = 104, Usable = 1, Font = Bold)
+
+
+//	Resource: Talt 1001
+#define RomIncompatibleAlert                      1001
+#define RomIncompatibleOK                         0
+
+//	Resource: Talt 1100
+#define Soap_errorAlert                           1100
+#define Soap_errorOK                              0
+
+
+//	Resource: MBAR 1000
+#define MainFormMenuBar                           1000
+
+
+//	Resource: MENU 1000
+#define MainOptionsMenu                           1000
+#define MainOptionsAboutStockQuote                1000
+
+
+//	Resource: PICT 1001
+#define Largeicon1bitBitmap                       1001
+
+//	Resource: PICT 1002
+#define Largeicon2bitBitmap                       1002
+
+//	Resource: PICT 1008
+#define Largeicon8bitBitmap                       1008
+
+//	Resource: PICT 1011
+#define Smallicon1bitBitmap                       1011
+
+//	Resource: PICT 1012
+#define Smallicon2bitBitmap                       1012
+
+//	Resource: PICT 1018
+#define Smallicon8bitBitmap                       1018
+
+//	Resource: PICT 21001
+#define LargeiconX21bitBitmap                     21001
+
+//	Resource: PICT 21002
+#define LargeiconX22bitBitmap                     21002
+
+//	Resource: PICT 21008
+#define LargeiconX28bitBitmap                     21008
+
+//	Resource: PICT 21011
+#define SmalliconX21bitBitmap                     21011
+
+//	Resource: PICT 21018
+#define SmalliconX28bitBitmap                     21018
+
+//	Resource: PICT 21012
+#define SmalliconX22bitBitmap                     21012
+
+
+//	Resource: taif 1000
+#define Largeicons12and8bitsAppIconFamily         1000
+
+//	Resource: taif 1001
+#define Smallicons12and8bitsAppIconFamily         1001
+
diff --git a/gsoap-palm/stockquote/rsc/quote.h b/gsoap-palm/stockquote/rsc/quote.h
new file mode 100644
index 0000000..e98d294
--- /dev/null
+++ b/gsoap-palm/stockquote/rsc/quote.h
@@ -0,0 +1 @@
+int ns__getQuote(char *symbol, float *Result);
diff --git a/gsoap-palm/stockquote/rsc/resource.frk/stockQuote.rsrc b/gsoap-palm/stockquote/rsc/resource.frk/stockQuote.rsrc
new file mode 100644
index 0000000..e18682f
--- /dev/null
+++ b/gsoap-palm/stockquote/rsc/resource.frk/stockQuote.rsrc
Binary files differ
diff --git a/gsoap-palm/stockquote/src/QuoteStarter.c b/gsoap-palm/stockquote/src/QuoteStarter.c
new file mode 100644
index 0000000..48ebb69
--- /dev/null
+++ b/gsoap-palm/stockquote/src/QuoteStarter.c
@@ -0,0 +1,514 @@
+/******************************************************************************
+ *
+ * Copyright (c) 1999-2000 Palm, Inc. or its subsidiaries.
+ * All rights reserved.
+ *
+ * File: Starter.c
+ *  
+ * Release: Palm OS SDK 5.0 (111823)
+ *
+ *****************************************************************************/
+//===================================================================================
+//
+//    (C) COPYRIGHT International Business Machines Corp., 2002 All Rights Reserved
+//    Licensed Materials - Property of IBM
+//    US Government Users Restricted Rights - Use, duplication or
+//    disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
+//
+//    IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+//    ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+//    PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+//    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+//    USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+//    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
+//    OR PERFORMANCE OF THIS SOFTWARE.
+//
+//    The program may be used, executed, copied, modified, and distributed
+//    without royalty for the purpose of developing, using, marketing, or distributing.
+// 
+//=======================================================================================
+#include <PalmOS.h>
+#include "StockQuoteRsc.h"
+#include "soapH.h"    // include the generated proxy
+
+/***********************************************************************
+ *
+ *	Entry Points
+ *
+ ***********************************************************************/
+
+
+/***********************************************************************
+ *
+ *	Internal Structures
+ *
+ ***********************************************************************/
+typedef struct 
+	{
+	UInt8 replaceme;
+	} StarterPreferenceType;
+
+typedef struct 
+	{
+	UInt8 replaceme;
+	} StarterAppInfoType;
+
+typedef StarterAppInfoType* StarterAppInfoPtr;
+
+
+/***********************************************************************
+ *
+ *	Global variables
+ *
+ ***********************************************************************/
+//static Boolean HideSecretRecords;
+
+UInt16 libNum;
+/***********************************************************************
+ *
+ *	Internal Constants
+ *
+ ***********************************************************************/
+#define appFileCreator			'BOB1'	// register your own at http://www.palmos.com/dev/creatorid/
+#define appVersionNum			0x01
+#define appPrefID				0x00
+#define appPrefVersionNum		0x01
+
+// Define the minimum OS version we support (2.0 for now).
+#define ourMinVersion	sysMakeROMVersion(2,0,0,sysROMStageRelease,0)
+#define kPalmOS10Version	sysMakeROMVersion(1,0,0,sysROMStageRelease,0)
+
+
+/***********************************************************************
+ *
+ *	Internal Functions
+ *
+ ***********************************************************************/
+
+int getQuote( char *symbol, char *result);
+void StdEtoA(char *text);
+
+/***********************************************************************
+ *
+ * FUNCTION:    RomVersionCompatible
+ *
+ * DESCRIPTION: This routine checks that a ROM version is meet your
+ *              minimum requirement.
+ *
+ * PARAMETERS:  requiredVersion - minimum rom version required
+ *                                (see sysFtrNumROMVersion in SystemMgr.h 
+ *                                for format)
+ *              launchFlags     - flags that indicate if the application 
+ *                                UI is initialized.
+ *
+ * RETURNED:    error code or zero if rom is compatible
+ *
+ * REVISION HISTORY:
+ *
+ *
+ ***********************************************************************/
+static Err RomVersionCompatible(UInt32 requiredVersion, UInt16 launchFlags)
+{
+	UInt32 romVersion;
+
+	// See if we're on in minimum required version of the ROM or later.
+	FtrGet(sysFtrCreator, sysFtrNumROMVersion, &romVersion);
+	if (romVersion < requiredVersion)
+		{
+		if ((launchFlags & (sysAppLaunchFlagNewGlobals | sysAppLaunchFlagUIApp)) ==
+			(sysAppLaunchFlagNewGlobals | sysAppLaunchFlagUIApp))
+			{
+			FrmAlert (RomIncompatibleAlert);
+		
+			// Palm OS 1.0 will continuously relaunch this app unless we switch to 
+			// another safe one.
+			if (romVersion <= kPalmOS10Version)
+				{
+				AppLaunchWithCommand(sysFileCDefaultApp, sysAppLaunchCmdNormalLaunch, NULL);
+				}
+			}
+		
+		return sysErrRomIncompatible;
+		}
+
+	return errNone;
+}
+
+
+/***********************************************************************
+ *
+ * FUNCTION:    GetObjectPtr
+ *
+ * DESCRIPTION: This routine returns a pointer to an object in the current
+ *              form.
+ *
+ * PARAMETERS:  formId - id of the form to display
+ *
+ * RETURNED:    void *
+ *
+ * REVISION HISTORY:
+ *
+ *
+ ***********************************************************************/
+static void * GetObjectPtr(UInt16 objectID)
+{
+	FormPtr frmP;
+
+	frmP = FrmGetActiveForm();
+	return FrmGetObjectPtr(frmP, FrmGetObjectIndex(frmP, objectID));
+}
+
+
+/***********************************************************************
+ *
+ * FUNCTION:    MainFormInit
+ *
+ * DESCRIPTION: This routine initializes the MainForm form.
+ *
+ * PARAMETERS:  frm - pointer to the MainForm form.
+ *
+ * RETURNED:    nothing
+ *
+ * REVISION HISTORY:
+ *
+ *
+ ***********************************************************************/
+static void MainFormInit(FormPtr frmP)
+{
+	FieldPtr			fld;
+	char *ptr;
+   	MemHandle			mh = MemHandleNew (10);
+	fld = GetObjectPtr (MainSymbolField);
+	ptr = MemHandleLock (mh);
+	strcpy(ptr,"IBM");
+	FldSetTextHandle (fld, mh);
+    MemHandleUnlock(mh);
+}
+
+
+/***********************************************************************
+ *
+ * FUNCTION:    MainFormDoCommand
+ *
+ * DESCRIPTION: This routine performs the menu command specified.
+ *
+ * PARAMETERS:  command  - menu item id
+ *
+ * RETURNED:    nothing
+ *
+ * REVISION HISTORY:
+ *
+ *
+ ***********************************************************************/
+static Boolean MainFormDoCommand(UInt16 command)
+{
+	Boolean handled = false;
+	FormPtr frmP;
+
+	switch (command)
+		{
+		case MainOptionsAboutStockQuote:
+			MenuEraseStatus(0);					// Clear the menu status from the display.
+			frmP = FrmInitForm (AboutForm);
+			FrmDoDialog (frmP);					// Display the About Box.
+			FrmDeleteForm (frmP);
+			handled = true;
+			break;
+
+		}
+	
+	return handled;
+}
+
+
+/***********************************************************************
+ *
+ * FUNCTION:    MainFormHandleEvent
+ *
+ * DESCRIPTION: This routine is the event handler for the 
+ *              "MainForm" of this application.
+ *
+ * PARAMETERS:  eventP  - a pointer to an EventType structure
+ *
+ * RETURNED:    true if the event has handle and should not be passed
+ *              to a higher level handler.
+ *
+ * REVISION HISTORY:
+ *
+ *
+ ***********************************************************************/
+static Boolean MainFormHandleEvent(EventPtr eventP)
+{
+	Boolean handled = false;
+	FormPtr frmP;
+    char result[240];
+    int rc;
+    FieldPtr			fld;
+
+
+	switch (eventP->eType) 
+		{
+		case menuEvent:
+			return MainFormDoCommand(eventP->data.menu.itemID);
+
+		case frmOpenEvent:
+			frmP = FrmGetActiveForm();
+			MainFormInit( frmP);
+			FrmDrawForm ( frmP);
+			handled = true;
+			break;
+			
+		case frmUpdateEvent:
+			// To do any custom drawing here, first call FrmDrawForm(), then do your
+			// drawing, and then set handled to true.
+			break;
+
+/*
+	case ctlEnterEvent:
+		switch (eventP->data.ctlEnter.controlID)
+		{
+			case MainRunButton:
+			getQuote("IBM",result);
+				break;
+		}
+		break;
+*/		
+
+	case ctlSelectEvent:
+		switch (eventP->data.ctlSelect.controlID)
+		{
+			case MainRunButton:
+			rc = getQuote("IBM",result);
+//			if (rc==SOAP_OK)
+//  			{
+				fld = GetObjectPtr (MainResultField);
+				FldSetTextPtr( fld, result);
+				FldDrawField(fld);
+				FldRecalculateField(fld,true);
+//			 }
+//			  else
+//			    FrmAlert(Soap_errorAlert);
+
+			
+			break;
+		}
+		break;
+
+		default:
+			break;
+		
+		}
+	
+	return handled;
+}
+
+
+/***********************************************************************
+ *
+ * FUNCTION:    AppHandleEvent
+ *
+ * DESCRIPTION: This routine loads form resources and set the event
+ *              handler for the form loaded.
+ *
+ * PARAMETERS:  event  - a pointer to an EventType structure
+ *
+ * RETURNED:    true if the event has handle and should not be passed
+ *              to a higher level handler.
+ *
+ * REVISION HISTORY:
+ *
+ *
+ ***********************************************************************/
+static Boolean AppHandleEvent(EventPtr eventP)
+{
+	UInt16 formId;
+	FormPtr frmP;
+
+	if (eventP->eType == frmLoadEvent)
+		{
+		// Load the form resource.
+		formId = eventP->data.frmLoad.formID;
+		frmP = FrmInitForm(formId);
+		FrmSetActiveForm(frmP);
+
+		// Set the event handler for the form.  The handler of the currently
+		// active form is called by FrmHandleEvent each time is receives an
+		// event.
+		switch (formId)
+			{
+			case MainForm:
+				FrmSetEventHandler(frmP, MainFormHandleEvent);
+				break;
+
+			default:
+//				ErrFatalDisplay("Invalid Form Load Event");
+				break;
+
+			}
+		return true;
+		}
+	
+	return false;
+}
+
+
+/***********************************************************************
+ *
+ * FUNCTION:    AppEventLoop
+ *
+ * DESCRIPTION: This routine is the event loop for the application.  
+ *
+ * PARAMETERS:  nothing
+ *
+ * RETURNED:    nothing
+ *
+ * REVISION HISTORY:
+ *
+ *
+ ***********************************************************************/
+static void AppEventLoop(void)
+{
+	UInt16 error;
+	EventType event;
+
+	do {
+		EvtGetEvent(&event, evtWaitForever);
+
+		if (! SysHandleEvent(&event))
+			if (! MenuHandleEvent(0, &event, &error))
+				if (! AppHandleEvent(&event))
+					FrmDispatchEvent(&event);
+
+	} while (event.eType != appStopEvent);
+}
+
+
+/***********************************************************************
+ *
+ * FUNCTION:     AppStart
+ *
+ * DESCRIPTION:  Get the current application's preferences.
+ *
+ * PARAMETERS:   nothing
+ *
+ * RETURNED:     Err value 0 if nothing went wrong
+ *
+ * REVISION HISTORY:
+ *
+ *
+ ***********************************************************************/
+static Err AppStart(void)
+{
+	StarterPreferenceType prefs;
+	UInt16 prefsSize;
+
+	// Read the saved preferences / saved-state information.
+	prefsSize = sizeof(StarterPreferenceType);
+	if (PrefGetAppPreferences(appFileCreator, appPrefID, &prefs, &prefsSize, true) != 
+		noPreferenceFound)
+		{
+		}
+	
+	return errNone;
+}
+
+
+/***********************************************************************
+ *
+ * FUNCTION:    AppStop
+ *
+ * DESCRIPTION: Save the current state of the application.
+ *
+ * PARAMETERS:  nothing
+ *
+ * RETURNED:    nothing
+ *
+ * REVISION HISTORY:
+ *
+ *
+ ***********************************************************************/
+static void AppStop(void)
+{
+	StarterPreferenceType prefs;
+
+	// Write the saved preferences / saved-state information.  This data 
+	// will saved during a HotSync backup.
+	PrefSetAppPreferences (appFileCreator, appPrefID, appPrefVersionNum, 
+		&prefs, sizeof (prefs), true);
+		
+	// Close all the open forms.
+	FrmCloseAllForms ();
+}
+
+
+/***********************************************************************
+ *
+ * FUNCTION:    StarterPalmMain
+ *
+ * DESCRIPTION: This is the main entry point for the application.
+ *
+ * PARAMETERS:  cmd - word value specifying the launch code. 
+ *              cmdPB - pointer to a structure that is associated with the launch code. 
+ *              launchFlags -  word value providing extra information about the launch.
+ *
+ * RETURNED:    Result of launch
+ *
+ * REVISION HISTORY:
+ *
+ *
+ ***********************************************************************/
+static UInt32 StarterPalmMain(UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags)
+{
+	Err error;
+
+	error = RomVersionCompatible (ourMinVersion, launchFlags);
+	if (error) return (error);
+
+	switch (cmd)
+		{
+		case sysAppLaunchCmdNormalLaunch:
+			error = AppStart();
+			if (error) 
+				return error;
+				
+			FrmGotoForm(MainForm);
+			AppEventLoop();
+			AppStop();
+			break;
+
+		default:
+			break;
+
+		}
+	
+	return errNone;
+}
+
+
+/***********************************************************************
+ *
+ * FUNCTION:    PilotMain
+ *
+ * DESCRIPTION: This is the main entry point for the application.
+ *
+ * PARAMETERS:  cmd - word value specifying the launch code. 
+ *              cmdPB - pointer to a structure that is associated with the launch code. 
+ *              launchFlags -  word value providing extra information about the launch.
+ * RETURNED:    Result of launch
+ *
+ * REVISION HISTORY:
+ *
+ *
+ ***********************************************************************/
+UInt32 PilotMain( UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags)
+{
+
+//   char result[40];
+HostTraceInit();
+
+	return StarterPalmMain(cmd, cmdPBP, launchFlags);
+}
+
+
+
+  
diff --git a/gsoap-palm/stockquote/src/quote.h b/gsoap-palm/stockquote/src/quote.h
new file mode 100644
index 0000000..ab15ebe
--- /dev/null
+++ b/gsoap-palm/stockquote/src/quote.h
@@ -0,0 +1,2 @@
+//gsoap ns schema namespace: urn:xmethods-delayed-quotes
+int ns__getQuote(char *symbol, float *Result);
diff --git a/gsoap-palm/stockquote/src/soapC.c b/gsoap-palm/stockquote/src/soapC.c
new file mode 100644
index 0000000..d82edff
--- /dev/null
+++ b/gsoap-palm/stockquote/src/soapC.c
@@ -0,0 +1,1319 @@
+/* soapC.c
+   Generated by gSOAP 2.7.6e from quote.h
+   Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+   This part of the software is released under one of the following licenses:
+   GPL, the gSOAP public license, or Genivia's license for commercial use.
+*/
+
+#include "soapH.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+SOAP_SOURCE_STAMP("@(#) soapC.c ver 2.7.6e 2006-02-19 16:38:52 GMT")
+
+
+#ifndef WITH_NOGLOBAL
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serializeheader(struct soap *soap)
+{
+	if (soap->header)
+		soap_serialize_SOAP_ENV__Header(soap, soap->header);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_putheader(struct soap *soap)
+{
+	if (soap->header)
+	{	soap->part = SOAP_IN_HEADER;
+		soap_out_SOAP_ENV__Header(soap, "SOAP-ENV:Header", 0, soap->header, NULL);
+		soap->part = SOAP_END_HEADER;
+	}
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_getheader(struct soap *soap)
+{
+	soap->part = SOAP_IN_HEADER;
+	soap->header = soap_in_SOAP_ENV__Header(soap, "SOAP-ENV:Header", NULL, NULL);
+	soap->part = SOAP_END_HEADER;
+	return soap->header == NULL;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_fault(struct soap *soap)
+{
+	if (!soap->fault)
+	{	soap->fault = (struct SOAP_ENV__Fault*)soap_malloc(soap, sizeof(struct SOAP_ENV__Fault));
+		soap_default_SOAP_ENV__Fault(soap, soap->fault);
+	}
+	if (soap->version == 2 && !soap->fault->SOAP_ENV__Code)
+	{	soap->fault->SOAP_ENV__Code = (struct SOAP_ENV__Code*)soap_malloc(soap, sizeof(struct SOAP_ENV__Code));
+		soap_default_SOAP_ENV__Code(soap, soap->fault->SOAP_ENV__Code);
+	}
+	if (soap->version == 2 && !soap->fault->SOAP_ENV__Reason)
+	{	soap->fault->SOAP_ENV__Reason = (struct SOAP_ENV__Reason*)soap_malloc(soap, sizeof(struct SOAP_ENV__Reason));
+		soap_default_SOAP_ENV__Reason(soap, soap->fault->SOAP_ENV__Reason);
+	}
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serializefault(struct soap *soap)
+{
+	if (soap->fault)
+		soap_serialize_SOAP_ENV__Fault(soap, soap->fault);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_putfault(struct soap *soap)
+{
+	if (soap->fault)
+		return soap_put_SOAP_ENV__Fault(soap, soap->fault, "SOAP-ENV:Fault", NULL);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_getfault(struct soap *soap)
+{
+	return (soap->fault = soap_get_SOAP_ENV__Fault(soap, NULL, "SOAP-ENV:Fault", NULL)) == NULL;
+}
+
+SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultcode(struct soap *soap)
+{
+	soap_fault(soap);
+	if (soap->version == 2)
+		return (const char**)&soap->fault->SOAP_ENV__Code->SOAP_ENV__Value;
+	return (const char**)&soap->fault->faultcode;
+}
+
+SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultsubcode(struct soap *soap)
+{
+	soap_fault(soap);
+	if (soap->version == 2)
+	{	if (!soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode)
+		{	soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode = (struct SOAP_ENV__Code*)soap_malloc(soap, sizeof(struct SOAP_ENV__Code));
+			soap_default_SOAP_ENV__Code(soap, soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode);
+		}
+		return (const char**)&soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode->SOAP_ENV__Value;
+	}
+	return (const char**)&soap->fault->faultcode;
+}
+
+SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultstring(struct soap *soap)
+{
+	soap_fault(soap);
+	if (soap->version == 2)
+		return (const char**)&soap->fault->SOAP_ENV__Reason->SOAP_ENV__Text;
+	return (const char**)&soap->fault->faultstring;
+}
+
+SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultdetail(struct soap *soap)
+{
+	soap_fault(soap);
+	if (soap->version == 1)
+	{	if (!soap->fault->detail)
+		{	soap->fault->detail = (struct SOAP_ENV__Detail*)soap_malloc(soap, sizeof(struct SOAP_ENV__Detail));
+			soap_default_SOAP_ENV__Detail(soap, soap->fault->detail);
+		}
+		return (const char**)&soap->fault->detail->__any;
+	}
+	if (!soap->fault->SOAP_ENV__Detail)
+	{	soap->fault->SOAP_ENV__Detail = (struct SOAP_ENV__Detail*)soap_malloc(soap, sizeof(struct SOAP_ENV__Detail));
+		soap_default_SOAP_ENV__Detail(soap, soap->fault->SOAP_ENV__Detail);
+	}
+	return (const char**)&soap->fault->SOAP_ENV__Detail->__any;
+}
+
+#endif
+
+#ifndef WITH_NOIDREF
+SOAP_FMAC3 int SOAP_FMAC4 soap_getindependent(struct soap *soap)
+{
+	int t;
+	for (;;)
+		if (!soap_getelement(soap, &t))
+			if (soap->error || soap_ignore_element(soap))
+				break;
+	if (soap->error == SOAP_NO_TAG || soap->error == SOAP_EOF)
+		soap->error = SOAP_OK;
+	return soap->error;
+}
+#endif
+
+#ifndef WITH_NOIDREF
+SOAP_FMAC3 void * SOAP_FMAC4 soap_getelement(struct soap *soap, int *type)
+{
+	if (soap_peek_element(soap))
+		return NULL;
+	if (!*soap->id || !(*type = soap_lookup_type(soap, soap->id)))
+		*type = soap_lookup_type(soap, soap->href);
+	switch (*type)
+	{
+	case SOAP_TYPE_byte:
+		return soap_in_byte(soap, NULL, NULL, "xsd:byte");
+	case SOAP_TYPE_int:
+		return soap_in_int(soap, NULL, NULL, "xsd:int");
+	case SOAP_TYPE_float:
+		return soap_in_float(soap, NULL, NULL, "xsd:float");
+	case SOAP_TYPE_ns__getQuote:
+		return soap_in_ns__getQuote(soap, NULL, NULL, "ns:getQuote");
+	case SOAP_TYPE_ns__getQuoteResponse:
+		return soap_in_ns__getQuoteResponse(soap, NULL, NULL, "ns:getQuoteResponse");
+	case SOAP_TYPE_PointerTofloat:
+		return soap_in_PointerTofloat(soap, NULL, NULL, "xsd:float");
+	case SOAP_TYPE__QName:
+	{	char **s;
+		s = soap_in__QName(soap, NULL, NULL, "QName");
+		return s ? *s : NULL;
+	}
+	case SOAP_TYPE_string:
+	{	char **s;
+		s = soap_in_string(soap, NULL, NULL, "xsd:string");
+		return s ? *s : NULL;
+	}
+	default:
+	{	const char *t = soap->type;
+		if (!*t)
+			t = soap->tag;
+		if (!soap_match_tag(soap, t, "xsd:byte"))
+		{	*type = SOAP_TYPE_byte;
+			return soap_in_byte(soap, NULL, NULL, NULL);
+		}
+		if (!soap_match_tag(soap, t, "xsd:int"))
+		{	*type = SOAP_TYPE_int;
+			return soap_in_int(soap, NULL, NULL, NULL);
+		}
+		if (!soap_match_tag(soap, t, "xsd:float"))
+		{	*type = SOAP_TYPE_float;
+			return soap_in_float(soap, NULL, NULL, NULL);
+		}
+		if (!soap_match_tag(soap, t, "ns:getQuote"))
+		{	*type = SOAP_TYPE_ns__getQuote;
+			return soap_in_ns__getQuote(soap, NULL, NULL, NULL);
+		}
+		if (!soap_match_tag(soap, t, "ns:getQuoteResponse"))
+		{	*type = SOAP_TYPE_ns__getQuoteResponse;
+			return soap_in_ns__getQuoteResponse(soap, NULL, NULL, NULL);
+		}
+		if (!soap_match_tag(soap, t, "QName"))
+		{	char **s;
+			*type = SOAP_TYPE__QName;
+			s = soap_in__QName(soap, NULL, NULL, NULL);
+			return s ? *s : NULL;
+		}
+		if (!soap_match_tag(soap, t, "xsd:string"))
+		{	char **s;
+			*type = SOAP_TYPE_string;
+			s = soap_in_string(soap, NULL, NULL, NULL);
+			return s ? *s : NULL;
+		}
+	}
+	}
+	soap->error = SOAP_TAG_MISMATCH;
+	return NULL;
+}
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_ignore_element(struct soap *soap)
+{
+	if (!soap_peek_element(soap))
+	{	int t;
+		if (soap->mustUnderstand && !soap->other)
+			return soap->error = SOAP_MUSTUNDERSTAND;
+		if (((soap->mode & SOAP_XML_STRICT) && soap->part != SOAP_IN_HEADER) || !soap_match_tag(soap, soap->tag, "SOAP-ENV:"))
+			return soap->error = SOAP_TAG_MISMATCH;
+		if (!*soap->id || !soap_getelement(soap, &t))
+		{	soap->peeked = 0;
+			DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unknown element '%s' (level=%u, %d)\n", soap->tag, soap->level, soap->body));
+			if (soap->fignore)
+				soap->error = soap->fignore(soap, soap->tag);
+			else
+				soap->error = SOAP_OK;
+			DBGLOG(TEST, if (!soap->error) SOAP_MESSAGE(fdebug, "IGNORING element '%s'\n", soap->tag));
+			if (!soap->error && soap->body)
+			{	soap->level++;
+				while (!soap_ignore_element(soap))
+					;
+				if (soap->error == SOAP_NO_TAG)
+					soap->error = soap_element_end_in(soap, NULL);
+			}
+		}
+	}
+	return soap->error;
+}
+
+#ifndef WITH_NOIDREF
+SOAP_FMAC3 int SOAP_FMAC4 soap_putindependent(struct soap *soap)
+{
+	int i;
+	struct soap_plist *pp;
+	if (soap->version == 1 && soap->encodingStyle && !(soap->mode & (SOAP_XML_TREE | SOAP_XML_GRAPH)))
+		for (i = 0; i < SOAP_PTRHASH; i++)
+			for (pp = soap->pht[i]; pp; pp = pp->next)
+				if (pp->mark1 == 2 || pp->mark2 == 2)
+					if (soap_putelement(soap, pp->ptr, "id", pp->id, pp->type))
+						return soap->error;
+	return SOAP_OK;
+}
+#endif
+
+#ifndef WITH_NOIDREF
+SOAP_FMAC3 int SOAP_FMAC4 soap_putelement(struct soap *soap, const void *ptr, const char *tag, int id, int type)
+{
+	switch (type)
+	{
+	case SOAP_TYPE_byte:
+		return soap_out_byte(soap, tag, id, (const char *)ptr, "xsd:byte");
+	case SOAP_TYPE_int:
+		return soap_out_int(soap, tag, id, (const int *)ptr, "xsd:int");
+	case SOAP_TYPE_float:
+		return soap_out_float(soap, tag, id, (const float *)ptr, "xsd:float");
+	case SOAP_TYPE_ns__getQuote:
+		return soap_out_ns__getQuote(soap, tag, id, (const struct ns__getQuote *)ptr, "ns:getQuote");
+	case SOAP_TYPE_ns__getQuoteResponse:
+		return soap_out_ns__getQuoteResponse(soap, tag, id, (const struct ns__getQuoteResponse *)ptr, "ns:getQuoteResponse");
+	case SOAP_TYPE_PointerTofloat:
+		return soap_out_PointerTofloat(soap, tag, id, (float *const*)ptr, "xsd:float");
+	case SOAP_TYPE__QName:
+		return soap_out_string(soap, "QName", id, (char**)&ptr, NULL);
+	case SOAP_TYPE_string:
+		return soap_out_string(soap, tag, id, (char**)&ptr, "xsd:string");
+	}
+	return SOAP_OK;
+}
+#endif
+
+#ifndef WITH_NOIDREF
+SOAP_FMAC3 void SOAP_FMAC4 soap_markelement(struct soap *soap, const void *ptr, int type)
+{
+	(void)soap; (void)ptr; (void)type; /* appease -Wall -Werror */
+	switch (type)
+	{
+	case SOAP_TYPE_ns__getQuote:
+		soap_serialize_ns__getQuote(soap, (const struct ns__getQuote *)ptr);
+		break;
+	case SOAP_TYPE_ns__getQuoteResponse:
+		soap_serialize_ns__getQuoteResponse(soap, (const struct ns__getQuoteResponse *)ptr);
+		break;
+	case SOAP_TYPE_PointerTofloat:
+		soap_serialize_PointerTofloat(soap, (float *const*)ptr);
+		break;
+	case SOAP_TYPE__QName:
+		soap_serialize_string(soap, (char**)&ptr);
+		break;
+	case SOAP_TYPE_string:
+		soap_serialize_string(soap, (char**)&ptr);
+		break;
+	}
+}
+#endif
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_byte(struct soap *soap, char *a)
+{	(void)soap; /* appease -Wall -Werror */
+#ifdef SOAP_DEFAULT_byte
+	*a = SOAP_DEFAULT_byte;
+#else
+	*a = (char)0;
+#endif
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_byte(struct soap *soap, const char *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_byte);
+	if (soap_out_byte(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_byte(struct soap *soap, const char *tag, int id, const char *a, const char *type)
+{
+	return soap_outbyte(soap, tag, id, a, type, SOAP_TYPE_byte);
+}
+
+SOAP_FMAC3 char * SOAP_FMAC4 soap_get_byte(struct soap *soap, char *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_byte(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 char * SOAP_FMAC4 soap_in_byte(struct soap *soap, const char *tag, char *a, const char *type)
+{
+	return soap_inbyte(soap, tag, a, type, SOAP_TYPE_byte);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_int(struct soap *soap, int *a)
+{	(void)soap; /* appease -Wall -Werror */
+#ifdef SOAP_DEFAULT_int
+	*a = SOAP_DEFAULT_int;
+#else
+	*a = (int)0;
+#endif
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_int(struct soap *soap, const int *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_int);
+	if (soap_out_int(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_int(struct soap *soap, const char *tag, int id, const int *a, const char *type)
+{
+	return soap_outint(soap, tag, id, a, type, SOAP_TYPE_int);
+}
+
+SOAP_FMAC3 int * SOAP_FMAC4 soap_get_int(struct soap *soap, int *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_int(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 int * SOAP_FMAC4 soap_in_int(struct soap *soap, const char *tag, int *a, const char *type)
+{
+	return soap_inint(soap, tag, a, type, SOAP_TYPE_int);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_float(struct soap *soap, float *a)
+{	(void)soap; /* appease -Wall -Werror */
+#ifdef SOAP_DEFAULT_float
+	*a = SOAP_DEFAULT_float;
+#else
+	*a = (float)0;
+#endif
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_float(struct soap *soap, const float *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_float);
+	if (soap_out_float(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_float(struct soap *soap, const char *tag, int id, const float *a, const char *type)
+{
+	return soap_outfloat(soap, tag, id, a, type, SOAP_TYPE_float);
+}
+
+SOAP_FMAC3 float * SOAP_FMAC4 soap_get_float(struct soap *soap, float *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_float(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 float * SOAP_FMAC4 soap_in_float(struct soap *soap, const char *tag, float *a, const char *type)
+{
+	return soap_infloat(soap, tag, a, type, SOAP_TYPE_float);
+}
+
+#ifndef WITH_NOGLOBAL
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Fault(struct soap *soap, const struct SOAP_ENV__Fault *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize__QName(soap, &a->faultcode);
+	soap_serialize_string(soap, &a->faultstring);
+	soap_serialize_string(soap, &a->faultactor);
+	soap_serialize_PointerToSOAP_ENV__Detail(soap, &a->detail);
+	soap_serialize_PointerToSOAP_ENV__Code(soap, &a->SOAP_ENV__Code);
+	soap_serialize_PointerToSOAP_ENV__Reason(soap, &a->SOAP_ENV__Reason);
+	soap_serialize_string(soap, &a->SOAP_ENV__Node);
+	soap_serialize_string(soap, &a->SOAP_ENV__Role);
+	soap_serialize_PointerToSOAP_ENV__Detail(soap, &a->SOAP_ENV__Detail);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default__QName(soap, &a->faultcode);
+	soap_default_string(soap, &a->faultstring);
+	soap_default_string(soap, &a->faultactor);
+	a->detail = NULL;
+	a->SOAP_ENV__Code = NULL;
+	a->SOAP_ENV__Reason = NULL;
+	soap_default_string(soap, &a->SOAP_ENV__Node);
+	soap_default_string(soap, &a->SOAP_ENV__Role);
+	a->SOAP_ENV__Detail = NULL;
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Fault(struct soap *soap, const struct SOAP_ENV__Fault *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_SOAP_ENV__Fault);
+	if (soap_out_SOAP_ENV__Fault(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Fault(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Fault *a, const char *type)
+{
+	const char *soap_tmp_faultcode = soap_QName2s(soap, a->faultcode);
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Fault), type);
+	soap_out__QName(soap, "faultcode", -1, (char*const*)&soap_tmp_faultcode, "");
+	soap_out_string(soap, "faultstring", -1, &a->faultstring, "");
+	soap_out_string(soap, "faultactor", -1, &a->faultactor, "");
+	soap_out_PointerToSOAP_ENV__Detail(soap, "detail", -1, &a->detail, "");
+	soap_out_PointerToSOAP_ENV__Code(soap, "SOAP-ENV:Code", -1, &a->SOAP_ENV__Code, "");
+	soap_out_PointerToSOAP_ENV__Reason(soap, "SOAP-ENV:Reason", -1, &a->SOAP_ENV__Reason, "");
+	soap_out_string(soap, "SOAP-ENV:Node", -1, &a->SOAP_ENV__Node, "");
+	soap_out_string(soap, "SOAP-ENV:Role", -1, &a->SOAP_ENV__Role, "");
+	soap_out_PointerToSOAP_ENV__Detail(soap, "SOAP-ENV:Detail", -1, &a->SOAP_ENV__Detail, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_get_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_SOAP_ENV__Fault(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_in_SOAP_ENV__Fault(struct soap *soap, const char *tag, struct SOAP_ENV__Fault *a, const char *type)
+{
+	short soap_flag_faultcode = 1, soap_flag_faultstring = 1, soap_flag_faultactor = 1, soap_flag_detail = 1, soap_flag_SOAP_ENV__Code = 1, soap_flag_SOAP_ENV__Reason = 1, soap_flag_SOAP_ENV__Node = 1, soap_flag_SOAP_ENV__Role = 1, soap_flag_SOAP_ENV__Detail = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct SOAP_ENV__Fault *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Fault, sizeof(struct SOAP_ENV__Fault), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_SOAP_ENV__Fault(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_faultcode && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
+				if (soap_in__QName(soap, "faultcode", &a->faultcode, ""))
+				{	soap_flag_faultcode--;
+					continue;
+				}
+			if (soap_flag_faultstring && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
+				if (soap_in_string(soap, "faultstring", &a->faultstring, "xsd:string"))
+				{	soap_flag_faultstring--;
+					continue;
+				}
+			if (soap_flag_faultactor && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
+				if (soap_in_string(soap, "faultactor", &a->faultactor, "xsd:string"))
+				{	soap_flag_faultactor--;
+					continue;
+				}
+			if (soap_flag_detail && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_PointerToSOAP_ENV__Detail(soap, "detail", &a->detail, ""))
+				{	soap_flag_detail--;
+					continue;
+				}
+			if (soap_flag_SOAP_ENV__Code && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_PointerToSOAP_ENV__Code(soap, "SOAP-ENV:Code", &a->SOAP_ENV__Code, ""))
+				{	soap_flag_SOAP_ENV__Code--;
+					continue;
+				}
+			if (soap_flag_SOAP_ENV__Reason && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_PointerToSOAP_ENV__Reason(soap, "SOAP-ENV:Reason", &a->SOAP_ENV__Reason, ""))
+				{	soap_flag_SOAP_ENV__Reason--;
+					continue;
+				}
+			if (soap_flag_SOAP_ENV__Node && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
+				if (soap_in_string(soap, "SOAP-ENV:Node", &a->SOAP_ENV__Node, "xsd:string"))
+				{	soap_flag_SOAP_ENV__Node--;
+					continue;
+				}
+			if (soap_flag_SOAP_ENV__Role && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
+				if (soap_in_string(soap, "SOAP-ENV:Role", &a->SOAP_ENV__Role, "xsd:string"))
+				{	soap_flag_SOAP_ENV__Role--;
+					continue;
+				}
+			if (soap_flag_SOAP_ENV__Detail && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_PointerToSOAP_ENV__Detail(soap, "SOAP-ENV:Detail", &a->SOAP_ENV__Detail, ""))
+				{	soap_flag_SOAP_ENV__Detail--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct SOAP_ENV__Fault *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_SOAP_ENV__Fault, 0, sizeof(struct SOAP_ENV__Fault), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+#endif
+
+#ifndef WITH_NOGLOBAL
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Reason(struct soap *soap, const struct SOAP_ENV__Reason *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_string(soap, &a->SOAP_ENV__Text);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_string(soap, &a->SOAP_ENV__Text);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Reason(struct soap *soap, const struct SOAP_ENV__Reason *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_SOAP_ENV__Reason);
+	if (soap_out_SOAP_ENV__Reason(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Reason(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Reason *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Reason), type);
+	soap_out_string(soap, "SOAP-ENV:Text", -1, &a->SOAP_ENV__Text, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_get_SOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_SOAP_ENV__Reason(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_in_SOAP_ENV__Reason(struct soap *soap, const char *tag, struct SOAP_ENV__Reason *a, const char *type)
+{
+	short soap_flag_SOAP_ENV__Text = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct SOAP_ENV__Reason *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Reason, sizeof(struct SOAP_ENV__Reason), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_SOAP_ENV__Reason(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_SOAP_ENV__Text && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
+				if (soap_in_string(soap, "SOAP-ENV:Text", &a->SOAP_ENV__Text, "xsd:string"))
+				{	soap_flag_SOAP_ENV__Text--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct SOAP_ENV__Reason *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_SOAP_ENV__Reason, 0, sizeof(struct SOAP_ENV__Reason), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+#endif
+
+#ifndef WITH_NOGLOBAL
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Detail(struct soap *soap, const struct SOAP_ENV__Detail *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_markelement(soap, a->fault, a->__type);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	a->__type = 0;
+	a->fault = NULL;
+	a->__any = NULL;
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Detail(struct soap *soap, const struct SOAP_ENV__Detail *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_SOAP_ENV__Detail);
+	if (soap_out_SOAP_ENV__Detail(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Detail(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Detail *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Detail), type);
+	soap_putelement(soap, a->fault, "fault", -1, a->__type);
+	soap_outliteral(soap, "-any", &a->__any);
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_get_SOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_SOAP_ENV__Detail(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_in_SOAP_ENV__Detail(struct soap *soap, const char *tag, struct SOAP_ENV__Detail *a, const char *type)
+{
+	short soap_flag_fault = 1, soap_flag___any = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct SOAP_ENV__Detail *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Detail, sizeof(struct SOAP_ENV__Detail), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_SOAP_ENV__Detail(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_fault && soap->error == SOAP_TAG_MISMATCH)
+				if ((a->fault = soap_getelement(soap, &a->__type)))
+				{	soap_flag_fault = 0;
+					continue;
+				}
+			if (soap_flag___any && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
+				if (soap_inliteral(soap, "-any", &a->__any))
+				{	soap_flag___any--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct SOAP_ENV__Detail *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_SOAP_ENV__Detail, 0, sizeof(struct SOAP_ENV__Detail), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+#endif
+
+#ifndef WITH_NOGLOBAL
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Code(struct soap *soap, const struct SOAP_ENV__Code *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize__QName(soap, &a->SOAP_ENV__Value);
+	soap_serialize_PointerToSOAP_ENV__Code(soap, &a->SOAP_ENV__Subcode);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default__QName(soap, &a->SOAP_ENV__Value);
+	a->SOAP_ENV__Subcode = NULL;
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Code(struct soap *soap, const struct SOAP_ENV__Code *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_SOAP_ENV__Code);
+	if (soap_out_SOAP_ENV__Code(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Code(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Code *a, const char *type)
+{
+	const char *soap_tmp_SOAP_ENV__Value = soap_QName2s(soap, a->SOAP_ENV__Value);
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Code), type);
+	soap_out__QName(soap, "SOAP-ENV:Value", -1, (char*const*)&soap_tmp_SOAP_ENV__Value, "");
+	soap_out_PointerToSOAP_ENV__Code(soap, "SOAP-ENV:Subcode", -1, &a->SOAP_ENV__Subcode, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_get_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_SOAP_ENV__Code(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_in_SOAP_ENV__Code(struct soap *soap, const char *tag, struct SOAP_ENV__Code *a, const char *type)
+{
+	short soap_flag_SOAP_ENV__Value = 1, soap_flag_SOAP_ENV__Subcode = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct SOAP_ENV__Code *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Code, sizeof(struct SOAP_ENV__Code), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_SOAP_ENV__Code(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_SOAP_ENV__Value && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
+				if (soap_in__QName(soap, "SOAP-ENV:Value", &a->SOAP_ENV__Value, ""))
+				{	soap_flag_SOAP_ENV__Value--;
+					continue;
+				}
+			if (soap_flag_SOAP_ENV__Subcode && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_PointerToSOAP_ENV__Code(soap, "SOAP-ENV:Subcode", &a->SOAP_ENV__Subcode, ""))
+				{	soap_flag_SOAP_ENV__Subcode--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct SOAP_ENV__Code *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_SOAP_ENV__Code, 0, sizeof(struct SOAP_ENV__Code), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+#endif
+
+#ifndef WITH_NOGLOBAL
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Header(struct soap *soap, const struct SOAP_ENV__Header *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	/* transient dummy skipped */
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Header *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	/* transient dummy skipped */
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Header(struct soap *soap, const struct SOAP_ENV__Header *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_SOAP_ENV__Header);
+	if (soap_out_SOAP_ENV__Header(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Header(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Header *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Header), type);
+	/* transient dummy skipped */
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_get_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Header *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_SOAP_ENV__Header(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_in_SOAP_ENV__Header(struct soap *soap, const char *tag, struct SOAP_ENV__Header *a, const char *type)
+{;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct SOAP_ENV__Header *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Header, sizeof(struct SOAP_ENV__Header), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_SOAP_ENV__Header(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+		/* transient dummy skipped */
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct SOAP_ENV__Header *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_SOAP_ENV__Header, 0, sizeof(struct SOAP_ENV__Header), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+#endif
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__getQuote(struct soap *soap, const struct ns__getQuote *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_string(soap, &a->symbol);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__getQuote(struct soap *soap, struct ns__getQuote *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_default_string(soap, &a->symbol);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__getQuote(struct soap *soap, const struct ns__getQuote *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__getQuote);
+	if (soap_out_ns__getQuote(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__getQuote(struct soap *soap, const char *tag, int id, const struct ns__getQuote *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__getQuote), type);
+	soap_out_string(soap, "symbol", -1, &a->symbol, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__getQuote * SOAP_FMAC4 soap_get_ns__getQuote(struct soap *soap, struct ns__getQuote *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__getQuote(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__getQuote * SOAP_FMAC4 soap_in_ns__getQuote(struct soap *soap, const char *tag, struct ns__getQuote *a, const char *type)
+{
+	short soap_flag_symbol = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__getQuote *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__getQuote, sizeof(struct ns__getQuote), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__getQuote(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_symbol && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
+				if (soap_in_string(soap, "symbol", &a->symbol, "xsd:string"))
+				{	soap_flag_symbol--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__getQuote *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__getQuote, 0, sizeof(struct ns__getQuote), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__getQuoteResponse(struct soap *soap, const struct ns__getQuoteResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	soap_serialize_PointerTofloat(soap, &a->Result);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__getQuoteResponse(struct soap *soap, struct ns__getQuoteResponse *a)
+{
+	(void)soap; (void)a; /* appease -Wall -Werror */
+	a->Result = NULL;
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__getQuoteResponse(struct soap *soap, const struct ns__getQuoteResponse *a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__getQuoteResponse);
+	if (soap_out_ns__getQuoteResponse(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__getQuoteResponse(struct soap *soap, const char *tag, int id, const struct ns__getQuoteResponse *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__getQuoteResponse), type);
+	if (a->Result)
+		soap_element_result(soap, "Result");
+	soap_out_PointerTofloat(soap, "Result", -1, &a->Result, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC3 struct ns__getQuoteResponse * SOAP_FMAC4 soap_get_ns__getQuoteResponse(struct soap *soap, struct ns__getQuoteResponse *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__getQuoteResponse(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct ns__getQuoteResponse * SOAP_FMAC4 soap_in_ns__getQuoteResponse(struct soap *soap, const char *tag, struct ns__getQuoteResponse *a, const char *type)
+{
+	short soap_flag_Result = 1;
+	if (soap_element_begin_in(soap, tag, 0))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE;
+		return NULL;
+	}
+	a = (struct ns__getQuoteResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__getQuoteResponse, sizeof(struct ns__getQuoteResponse), 0, NULL, NULL, NULL);
+	if (!a)
+		return NULL;
+	soap_default_ns__getQuoteResponse(soap, a);
+	if (soap->body && !*soap->href)
+	{
+		for (;;)
+		{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_Result && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_PointerTofloat(soap, "Result", &a->Result, "xsd:float"))
+				{	soap_flag_Result--;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+				return NULL;
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else
+	{	a = (struct ns__getQuoteResponse *)soap_id_forward(soap, soap->href, (void**)a, 0, SOAP_TYPE_ns__getQuoteResponse, 0, sizeof(struct ns__getQuoteResponse), 0, NULL);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+#ifndef WITH_NOGLOBAL
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *const*a)
+{
+	if (!soap_reference(soap, *a, SOAP_TYPE_SOAP_ENV__Reason))
+		soap_serialize_SOAP_ENV__Reason(soap, *a);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *const*a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerToSOAP_ENV__Reason);
+	if (soap_out_PointerToSOAP_ENV__Reason(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Reason(struct soap *soap, const char *tag, int id, struct SOAP_ENV__Reason *const*a, const char *type)
+{
+	id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_SOAP_ENV__Reason);
+	if (id < 0)
+		return soap->error;
+	return soap_out_SOAP_ENV__Reason(soap, tag, id, *a, type);
+}
+
+SOAP_FMAC3 struct SOAP_ENV__Reason ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason **p, const char *tag, const char *type)
+{
+	if ((p = soap_in_PointerToSOAP_ENV__Reason(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct SOAP_ENV__Reason ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Reason(struct soap *soap, const char *tag, struct SOAP_ENV__Reason **a, const char *type)
+{
+	if (soap_element_begin_in(soap, tag, 1))
+		return NULL;
+	if (!a)
+		if (!(a = (struct SOAP_ENV__Reason **)soap_malloc(soap, sizeof(struct SOAP_ENV__Reason *))))
+			return NULL;
+	*a = NULL;
+	if (!soap->null && *soap->href != '#')
+	{	soap_revert(soap);
+		if (!(*a = soap_in_SOAP_ENV__Reason(soap, tag, *a, type)))
+			return NULL;
+	}
+	else
+	{	a = (struct SOAP_ENV__Reason **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_SOAP_ENV__Reason, sizeof(struct SOAP_ENV__Reason), 0);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+#endif
+
+#ifndef WITH_NOGLOBAL
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *const*a)
+{
+	if (!soap_reference(soap, *a, SOAP_TYPE_SOAP_ENV__Detail))
+		soap_serialize_SOAP_ENV__Detail(soap, *a);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *const*a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerToSOAP_ENV__Detail);
+	if (soap_out_PointerToSOAP_ENV__Detail(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Detail(struct soap *soap, const char *tag, int id, struct SOAP_ENV__Detail *const*a, const char *type)
+{
+	id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_SOAP_ENV__Detail);
+	if (id < 0)
+		return soap->error;
+	return soap_out_SOAP_ENV__Detail(soap, tag, id, *a, type);
+}
+
+SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail **p, const char *tag, const char *type)
+{
+	if ((p = soap_in_PointerToSOAP_ENV__Detail(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Detail(struct soap *soap, const char *tag, struct SOAP_ENV__Detail **a, const char *type)
+{
+	if (soap_element_begin_in(soap, tag, 1))
+		return NULL;
+	if (!a)
+		if (!(a = (struct SOAP_ENV__Detail **)soap_malloc(soap, sizeof(struct SOAP_ENV__Detail *))))
+			return NULL;
+	*a = NULL;
+	if (!soap->null && *soap->href != '#')
+	{	soap_revert(soap);
+		if (!(*a = soap_in_SOAP_ENV__Detail(soap, tag, *a, type)))
+			return NULL;
+	}
+	else
+	{	a = (struct SOAP_ENV__Detail **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_SOAP_ENV__Detail, sizeof(struct SOAP_ENV__Detail), 0);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+#endif
+
+#ifndef WITH_NOGLOBAL
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *const*a)
+{
+	if (!soap_reference(soap, *a, SOAP_TYPE_SOAP_ENV__Code))
+		soap_serialize_SOAP_ENV__Code(soap, *a);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *const*a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerToSOAP_ENV__Code);
+	if (soap_out_PointerToSOAP_ENV__Code(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Code(struct soap *soap, const char *tag, int id, struct SOAP_ENV__Code *const*a, const char *type)
+{
+	id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_SOAP_ENV__Code);
+	if (id < 0)
+		return soap->error;
+	return soap_out_SOAP_ENV__Code(soap, tag, id, *a, type);
+}
+
+SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code **p, const char *tag, const char *type)
+{
+	if ((p = soap_in_PointerToSOAP_ENV__Code(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Code(struct soap *soap, const char *tag, struct SOAP_ENV__Code **a, const char *type)
+{
+	if (soap_element_begin_in(soap, tag, 1))
+		return NULL;
+	if (!a)
+		if (!(a = (struct SOAP_ENV__Code **)soap_malloc(soap, sizeof(struct SOAP_ENV__Code *))))
+			return NULL;
+	*a = NULL;
+	if (!soap->null && *soap->href != '#')
+	{	soap_revert(soap);
+		if (!(*a = soap_in_SOAP_ENV__Code(soap, tag, *a, type)))
+			return NULL;
+	}
+	else
+	{	a = (struct SOAP_ENV__Code **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_SOAP_ENV__Code, sizeof(struct SOAP_ENV__Code), 0);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+#endif
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTofloat(struct soap *soap, float *const*a)
+{
+	soap_reference(soap, *a, SOAP_TYPE_float);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTofloat(struct soap *soap, float *const*a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTofloat);
+	if (soap_out_PointerTofloat(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTofloat(struct soap *soap, const char *tag, int id, float *const*a, const char *type)
+{
+	id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_float);
+	if (id < 0)
+		return soap->error;
+	return soap_out_float(soap, tag, id, *a, type);
+}
+
+SOAP_FMAC3 float ** SOAP_FMAC4 soap_get_PointerTofloat(struct soap *soap, float **p, const char *tag, const char *type)
+{
+	if ((p = soap_in_PointerTofloat(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 float ** SOAP_FMAC4 soap_in_PointerTofloat(struct soap *soap, const char *tag, float **a, const char *type)
+{
+	if (soap_element_begin_in(soap, tag, 1))
+		return NULL;
+	if (!a)
+		if (!(a = (float **)soap_malloc(soap, sizeof(float *))))
+			return NULL;
+	*a = NULL;
+	if (!soap->null && *soap->href != '#')
+	{	soap_revert(soap);
+		if (!(*a = soap_in_float(soap, tag, *a, type)))
+			return NULL;
+	}
+	else
+	{	a = (float **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_float, sizeof(float), 0);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default__QName(struct soap *soap, char **a)
+{	soap_default_string(soap, a);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize__QName(struct soap *soap, char *const*a)
+{	soap_serialize_string(soap, a);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put__QName(struct soap *soap, char *const*a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE__QName);
+	if (soap_out__QName(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out__QName(struct soap *soap, const char *tag, int id, char *const*a, const char *type)
+{
+	return soap_outstring(soap, tag, id, a, type, SOAP_TYPE__QName);
+}
+
+SOAP_FMAC3 char ** SOAP_FMAC4 soap_get__QName(struct soap *soap, char **p, const char *tag, const char *type)
+{
+	if ((p = soap_in__QName(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 char * * SOAP_FMAC4 soap_in__QName(struct soap *soap, const char *tag, char **a, const char *type)
+{
+	return soap_instring(soap, tag, a, type, SOAP_TYPE__QName, 2, -1, -1);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_string(struct soap *soap, char **a)
+{	(void)soap; /* appease -Wall -Werror */
+#ifdef SOAP_DEFAULT_string
+	*a = SOAP_DEFAULT_string;
+#else
+	*a = (char *)0;
+#endif
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_string(struct soap *soap, char *const*a)
+{
+	soap_reference(soap, *a, SOAP_TYPE_string);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_string(struct soap *soap, char *const*a, const char *tag, const char *type)
+{
+	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_string);
+	if (soap_out_string(soap, tag, id, a, type))
+		return soap->error;
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_string(struct soap *soap, const char *tag, int id, char *const*a, const char *type)
+{
+	return soap_outstring(soap, tag, id, a, type, SOAP_TYPE_string);
+}
+
+SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_string(struct soap *soap, char **p, const char *tag, const char *type)
+{
+	if ((p = soap_in_string(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_string(struct soap *soap, const char *tag, char **a, const char *type)
+{
+	return soap_instring(soap, tag, a, type, SOAP_TYPE_string, 1, -1, -1);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+/* End of soapC.c */
diff --git a/gsoap-palm/stockquote/src/soapClient.c b/gsoap-palm/stockquote/src/soapClient.c
new file mode 100644
index 0000000..37d7ced
--- /dev/null
+++ b/gsoap-palm/stockquote/src/soapClient.c
@@ -0,0 +1,70 @@
+/* soapClient.c
+   Generated by gSOAP 2.7.6e from quote.h
+   Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+   This part of the software is released under one of the following licenses:
+   GPL, the gSOAP public license, or Genivia's license for commercial use.
+*/
+#include "soapH.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+SOAP_SOURCE_STAMP("@(#) soapClient.c ver 2.7.6e 2006-02-19 16:38:52 GMT")
+
+
+SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns__getQuote(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *symbol, float *Result)
+{	struct ns__getQuote soap_tmp_ns__getQuote;
+	struct ns__getQuoteResponse *soap_tmp_ns__getQuoteResponse;
+	soap->encodingStyle = NULL;
+	soap_tmp_ns__getQuote.symbol = symbol;
+	soap_begin(soap);
+	soap_serializeheader(soap);
+	soap_serialize_ns__getQuote(soap, &soap_tmp_ns__getQuote);
+	if (soap_begin_count(soap))
+		return soap->error;
+	if (soap->mode & SOAP_IO_LENGTH)
+	{	if (soap_envelope_begin_out(soap)
+		 || soap_putheader(soap)
+		 || soap_body_begin_out(soap)
+		 || soap_put_ns__getQuote(soap, &soap_tmp_ns__getQuote, "ns:getQuote", "")
+		 || soap_body_end_out(soap)
+		 || soap_envelope_end_out(soap))
+			 return soap->error;
+	}
+	if (soap_end_count(soap))
+		return soap->error;
+	if (soap_connect(soap, soap_endpoint, soap_action)
+	 || soap_envelope_begin_out(soap)
+	 || soap_putheader(soap)
+	 || soap_body_begin_out(soap)
+	 || soap_put_ns__getQuote(soap, &soap_tmp_ns__getQuote, "ns:getQuote", "")
+	 || soap_body_end_out(soap)
+	 || soap_envelope_end_out(soap)
+	 || soap_end_send(soap))
+		return soap_closesock(soap);
+	soap_default_float(soap, Result);
+	if (soap_begin_recv(soap)
+	 || soap_envelope_begin_in(soap)
+	 || soap_recv_header(soap)
+	 || soap_body_begin_in(soap))
+		return soap_closesock(soap);
+	soap_tmp_ns__getQuoteResponse = soap_get_ns__getQuoteResponse(soap, NULL, "ns:getQuoteResponse", "");
+	if (soap->error)
+	{	if (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)
+			return soap_recv_fault(soap);
+		return soap_closesock(soap);
+	}
+	if (soap_body_end_in(soap)
+	 || soap_envelope_end_in(soap)
+	 || soap_end_recv(soap))
+		return soap_closesock(soap);
+	if (Result && soap_tmp_ns__getQuoteResponse->Result)
+		*Result = *soap_tmp_ns__getQuoteResponse->Result;
+	return soap_closesock(soap);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+/* End of soapClient.c */
diff --git a/gsoap-palm/stockquote/src/stockquote.c b/gsoap-palm/stockquote/src/stockquote.c
new file mode 100644
index 0000000..8614d49
--- /dev/null
+++ b/gsoap-palm/stockquote/src/stockquote.c
@@ -0,0 +1,58 @@
+#include "soapH.h" 
+
+extern int getQuote (char *symbol, char *Result);
+
+SOAP_NMAC struct Namespace namespaces[] =
+{
+  {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/", "http://www.w3.org/*/soap-envelope"},
+  {"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/", "http://www.w3.org/*/soap-encoding"},
+  {"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance"},
+  {"xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema"},
+  {"ns", "urn:xmethods-delayed-quotes"},
+  {NULL, NULL}
+};
+
+void StdEtoA(char *text);
+
+int getQuote (char *symbol, char *Result) {
+
+	FlpCompDouble d;
+	struct soap *soap;
+	float result;
+	int rc;
+    char *addr = "http://services.xmethods.net/soap/";
+
+	soap = soap_new();
+	soap->namespaces = (struct Namespace *)namespaces;
+	rc = soap_call_ns__getQuote(soap, addr, "", (char*)symbol, &result);
+	soap_end(soap);
+	free(soap);
+  
+	if (rc==SOAP_OK) {
+		d.d= result;
+		FlpFToA (d.fd,Result);
+		StdEtoA(Result);
+	} else {
+		soap_set_fault(soap);
+		strcpy (Result, soap->msgbuf);
+	}
+	
+	return rc;
+
+}
+
+void StdEtoA(char *text) {
+	  int i;
+	  int len = strlen(text);
+	  char *ptr=text+(len-2);
+	  int digits=atoi(ptr);
+	  ptr=text+1;
+	  for (i=0; i<digits; i++)
+	  {
+	    *ptr = *(ptr+1);
+	    ptr++;
+	  }
+	  *ptr='.';
+	  *(ptr+3)=0;
+  
+}   
\ No newline at end of file
diff --git a/gsoap-palm/stockquote/stockQuote.mcp b/gsoap-palm/stockquote/stockQuote.mcp
new file mode 100644
index 0000000..a797243
--- /dev/null
+++ b/gsoap-palm/stockquote/stockQuote.mcp
Binary files differ
diff --git a/gsoap-palm/stockquote/stockquote_data/CWSettingsWindows.stg b/gsoap-palm/stockquote/stockquote_data/CWSettingsWindows.stg
new file mode 100644
index 0000000..4f60703
--- /dev/null
+++ b/gsoap-palm/stockquote/stockquote_data/CWSettingsWindows.stg
Binary files differ
diff --git a/gsoap-palm/stockquote/stockquote_data/debug/TargetDataWindows.tdt b/gsoap-palm/stockquote/stockquote_data/debug/TargetDataWindows.tdt
new file mode 100644
index 0000000..50b6fa4
--- /dev/null
+++ b/gsoap-palm/stockquote/stockquote_data/debug/TargetDataWindows.tdt
Binary files differ
diff --git a/gsoap-palm/stockquote/stockquote_data/release/TargetDataWindows.tdt b/gsoap-palm/stockquote/stockquote_data/release/TargetDataWindows.tdt
new file mode 100644
index 0000000..1d54caf
--- /dev/null
+++ b/gsoap-palm/stockquote/stockquote_data/release/TargetDataWindows.tdt
Binary files differ
diff --git a/gsoap-symbian/ABLD.BAT b/gsoap-symbian/ABLD.BAT
new file mode 100644
index 0000000..568890e
--- /dev/null
+++ b/gsoap-symbian/ABLD.BAT
@@ -0,0 +1,15 @@
+@ECHO OFF
+
+REM Bldmake-generated batch file - ABLD.BAT
+REM ** DO NOT EDIT **
+
+perl -S ABLD.PL \GDRIVE\GSOAP2.6\WIN\INTEROP_SYMBIAN\ %1 %2 %3 %4 %5 %6 %7 %8 %9
+if errorlevel==1 goto CheckPerl
+goto End
+
+:CheckPerl
+perl -v >NUL
+if errorlevel==1 echo Is Perl, version 5.003_07 or later, installed?
+goto End
+
+:End
diff --git a/gsoap-symbian/Interop.mmp b/gsoap-symbian/Interop.mmp
new file mode 100644
index 0000000..51d1886
--- /dev/null
+++ b/gsoap-symbian/Interop.mmp
@@ -0,0 +1,31 @@
+// Stockquote.mmp

+//

+// Copyright (c) 2002 IBM.  All rights reserved.

+

+// using relative paths for sourcepath and user includes

+

+TARGET        interop.exe

+TARGETTYPE    exe

+UID           0x1000008d 0x10004238

+

+SOURCEPATH    .

+SOURCE        interopMain.c

+SOURCE        soapC.cpp

+SOURCE        soapClient.cpp

+SOURCE        interop2test.cpp

+SOURCE        interop2Btest.cpp

+SOURCE        interop2Ctest.cpp

+SOURCEPATH    ..

+SOURCE        stdsoap2.cpp      

+

+

+

+USERINCLUDE   .

+USERINCLUDE   ..

+SYSTEMINCLUDE \Epoc32\include

+SYSTEMINCLUDE \Epoc32\include\libc

+SYSTEMINCLUDE \Epoc32\include\networking

+

+LIBRARY       esock.lib euser.lib eexe.lib estlib.lib ecrt0.lib

+STATICLIBRARY   ecrt0.lib

+nostrictdef

diff --git a/gsoap-symbian/README.txt b/gsoap-symbian/README.txt
new file mode 100644
index 0000000..5a4f427
--- /dev/null
+++ b/gsoap-symbian/README.txt
@@ -0,0 +1,36 @@
+This directory contains an example gSOAP application for Symbian.
+
+The interop_all.h gSOAP header file defines the SOAP 1.1 RPC interop round 2
+A, B, and C test services.
+
+The interop_all.h was compiled with the gSOAP soapcpp2 compiler to produce the
+serializers and stubs to access the interop services:
+
+soapcpp2 interop_all.h
+
+The soapcpp2 compiler is platform-independent, so you can run the command on
+Windows, Linux, or Mac OS X for example.
+
+The generated files are:
+soapH.h		header file for serializers
+soapC.cpp	serializers
+soapStub.cpp	header file for stubs
+soapClient.cpp	stubs
+
+Because the generated code is platform-independent, it is strongly advised to
+try to build a simple test application on a non-Palm platform first to verify
+interoperability and data exchange. Because logging is disabled on Palm, it
+will be hard to find the source of a interop problem. After testing the
+application, you can use the same sources to build a Palm OS application.  The
+stdsoap2.h and stdsoap2.cpp contains platform-dependent code and is required
+to complete the build of your application.
+
+To develop an application from a WSDL, run wsdl2h.exe (or a wsdl2h executable
+for any other platform) on the WSDL file. Mind the command line options. For
+example, wsdl2h.exe -c generates C code and wsdl2h.exe -s generates C++ code
+without requiring STL. This command generated a C or C++ header file. After
+this, you need to run soapcpp2.exe on the generated header file to create the
+serializers and stubs.
+
+See gsoapOnSymbian.doc for Symbian-specific build issues.
+
diff --git a/gsoap-symbian/bld.inf b/gsoap-symbian/bld.inf
new file mode 100644
index 0000000..9755c30
--- /dev/null
+++ b/gsoap-symbian/bld.inf
@@ -0,0 +1,4 @@
+

+PRJ_MMPFILES

+

+Interop.mmp

diff --git a/gsoap-symbian/gsoapOnSymbian.doc b/gsoap-symbian/gsoapOnSymbian.doc
new file mode 100644
index 0000000..bb35ee3
--- /dev/null
+++ b/gsoap-symbian/gsoapOnSymbian.doc
Binary files differ
diff --git a/gsoap-symbian/interop.sis b/gsoap-symbian/interop.sis
new file mode 100644
index 0000000..b42fce0
--- /dev/null
+++ b/gsoap-symbian/interop.sis
Binary files differ
diff --git a/gsoap-symbian/interop2.nsmap b/gsoap-symbian/interop2.nsmap
new file mode 100644
index 0000000..33b1190
--- /dev/null
+++ b/gsoap-symbian/interop2.nsmap
@@ -0,0 +1,14 @@
+
+#include "soapH.h"
+SOAP_NMAC struct Namespace namespaces[] =
+{
+	{"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/", "http://www.w3.org/*/soap-envelope", NULL},
+	{"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/", "http://www.w3.org/*/soap-encoding", NULL},
+	{"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance", NULL},
+	{"xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema", NULL},
+	{"s", "http://soapinterop.org/xsd", NULL, NULL},
+	{"ns", "http://soapinterop.org/", NULL, NULL},
+	{"h", "http://soapinterop.org/echoheader/", NULL, NULL},
+	{"m", "http://soapinterop.org/", NULL, NULL},
+	{NULL, NULL, NULL, NULL}
+};
diff --git a/gsoap-symbian/interop2Btest.cpp b/gsoap-symbian/interop2Btest.cpp
new file mode 100644
index 0000000..7c7bb24
--- /dev/null
+++ b/gsoap-symbian/interop2Btest.cpp
@@ -0,0 +1,212 @@
+//===================================================================================
+//
+//    (C) COPYRIGHT International Business Machines Corp., 2002 All Rights Reserved
+//    Licensed Materials - Property of IBM
+//    US Government Users Restricted Rights - Use, duplication or
+//    disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
+//
+//    IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+//    ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+//    PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+//    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+//    USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+//    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
+//    OR PERFORMANCE OF THIS SOFTWARE.
+//
+//    The program may be used, executed, copied, modified, and distributed
+//    without royalty for the purpose of developing, using, marketing, or distributing.
+// 
+//=======================================================================================
+// gSOAP v2 Interop B test round 2
+#include "soapH.h"
+extern "C" void displayText(char *text);
+extern "C" int interopB(const char *site);
+
+struct Namespace namespacesB[] =
+{
+  {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"},
+  {"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/"},
+  //{"SOAP-ENV", "http://www.w3.org/2002/06/soap-envelope"},	// SOAP 1.2
+  //{"SOAP-ENC", "http://www.w3.org/2002/06/soap-encoding"},	// SOAP 1.2
+  {"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance"},
+  {"xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema"},
+  {"ns", "http://soapinterop.org/"},
+  {"s", "http://soapinterop.org/xsd"},
+  {NULL, NULL}
+};
+
+int interopB(const char *url)
+{
+  struct soap *soap;
+  char *site=(char*)url;
+//  char* site ="http://websrv.cs.fsu.edu/~engelen/interop2B.cgi";
+  char* action = "http://soapinterop.org/";
+  
+  bool ok=true;
+  int i, g;
+  xsd__string s = "Hello World! <>&";
+  xsd__int n = 2147483647;
+  xsd__float f = 3.40282e+38;
+  struct ArrayOfstring a;
+  struct ArrayOfstring2D aai;
+  struct ArrayOfstring2D aao;
+
+  struct s__SOAPStruct sti;
+  struct ns__echoStructAsSimpleTypesResponse Ro;
+  struct ns__echoSimpleTypesAsStructResponse Rsto;
+  struct s__SOAPStructStruct ssti;
+  struct ns__echoNestedStructResponse Rssto;
+  struct s__SOAPArrayStruct sati;
+  struct ns__echoNestedArrayResponse Rsato;
+
+  displayText("running test B on");
+  displayText((char*)url);
+  soap = soap_new();
+  soap->namespaces = (struct Namespace *)namespacesB;
+
+//  FILE *fd = fopen("interop2Bfaults.html", "a");
+
+//  soap_init(&soap);
+
+  soap->send_timeout = 30;
+  soap->recv_timeout = 30;
+
+  sti.varString = "Hello";
+  sti.varInt = &n;
+  sti.varFloat = &f;
+
+  ssti.varString = "SOAP!";
+  ssti.varInt = &n;
+  ssti.varFloat = &f;
+  ssti.varStruct = &sti;
+
+  a.__size = 5;
+  a.__offset = 2;
+  a.__ptr = (char**)malloc(a.__size*sizeof(char*));
+  a.__ptr[0] = "Interop";
+  a.__ptr[1] = "Test";
+  a.__ptr[2] = "Round";
+  a.__ptr[3] = "2";
+  a.__ptr[4] = a.__ptr[1];
+
+  aai.__size[0] = 2;
+  aai.__size[1] = 3;
+  aai.__offset[0] = 0;
+  aai.__offset[1] = 0;
+  aai.__ptr = (char**)malloc(aai.__size[0]*aai.__size[1]*sizeof(char*));
+  aai.__ptr[0] = "Interop Test";
+  aai.__ptr[1] = NULL;
+  aai.__ptr[2] = "Round";
+  aai.__ptr[3] = "2";
+  aai.__ptr[4] = a.__ptr[1];
+  aai.__ptr[5] = NULL;
+
+  sati.varString = a.__ptr[0];
+  sati.varInt = &n;
+  sati.varFloat = &f;
+  sati.varArray = a;
+   
+  if (soap_call_ns__echoStructAsSimpleTypes(soap, site, "http://soapinterop.org/", sti, Ro))
+  { 
+    displayText("echoStructAsSimpleTypes failed");
+    ok=false;
+  }  else if (!Ro._outputString || strcmp(sti.varString, Ro._outputString) || !Ro._outputInteger || *sti.varInt != *Ro._outputInteger
+  || !Ro._outputFloat || *sti.varFloat != *Ro._outputFloat)
+  {
+  	displayText("echoStructAsSimpleTypes mismatched");
+    ok=false;
+  }
+  else
+  	displayText("echoStructAsSimpleTypes passed");
+
+  if (soap_call_ns__echoSimpleTypesAsStruct(soap, site, "http://soapinterop.org/", s, &n, &f, Rsto))
+  { 
+    displayText("echoSimpleTypesAsStruct failed");
+    ok=false;
+  }
+  else if (!Rsto._return.varString || strcmp(s, Rsto._return.varString) || !Rsto._return.varInt || n != *Rsto._return.varInt || !Rsto._return.varFloat || f != *Rsto._return.varFloat)
+  {
+  	displayText("echoSimpleTypesAsStruct mismatched");
+    ok=false;
+  }
+  else
+  	displayText("echoSimpleTypesAsStruct passed");
+
+  if (soap_call_ns__echo2DStringArray(soap,site, "http://soapinterop.org/", aai, aao))
+  { 
+    displayText("echo2DStringArray failed");
+    ok=false;
+  }
+  else
+  { g = 0;
+    if (aai.__size[0] != aao.__size[0] || aai.__size[1] != aao.__size[1] || !aao.__ptr)
+      g = 1;
+    else
+      for (i = 0; i < aai.__size[0]*aai.__size[1]; i++)
+        if (aai.__ptr[i] && (!aao.__ptr[i] || strcmp(aai.__ptr[i], aao.__ptr[i])))
+	  g = 1;
+    if (g)
+    {
+    	displayText("echo2DStringArray mismatched");
+    ok=false;
+    }
+    else
+	  	displayText("echo2DStringArray passed");
+  }
+
+  if (soap_call_ns__echoNestedStruct(soap, site, "http://soapinterop.org/", ssti, Rssto))
+  { 
+    displayText("echoNestedStruct failed");
+    ok=false;
+  }
+  else if (!Rssto._return.varString || strcmp(ssti.varString, Rssto._return.varString) ||
+  !Rssto._return.varInt || *ssti.varInt != *Rssto._return.varInt ||
+  !Rssto._return.varFloat || *ssti.varFloat != *Rssto._return.varFloat ||
+  !Rssto._return.varStruct || 
+  !Rssto._return.varStruct->varString || strcmp(ssti.varStruct->varString, Rssto._return.varStruct->varString) ||
+  !Rssto._return.varStruct->varInt || *ssti.varStruct->varInt != *Rssto._return.varStruct->varInt || 
+  !Rssto._return.varStruct->varFloat || *ssti.varStruct->varFloat != *Rssto._return.varStruct->varFloat)
+    {
+    	displayText("echoNestedStruct mismatched");
+    ok=false;
+  }
+  else
+  	displayText("echoNestedStruct passed");
+
+  if (soap_call_ns__echoNestedArray(soap, site, "http://soapinterop.org/", sati, Rsato))
+  { 
+    displayText("echoNestedArray failed");
+    ok=false;
+  }
+  else if (!Rsato._return.varString || strcmp(sati.varString, Rsato._return.varString) ||
+  !Rsato._return.varInt || *sati.varInt != *Rsato._return.varInt ||
+  !Rsato._return.varFloat || *sati.varFloat != *Rsato._return.varFloat ||
+  sati.varArray.__size+sati.varArray.__offset != Rsato._return.varArray.__size+Rsato._return.varArray.__offset)
+    {
+    	displayText("echoNestedArray mismatched");
+    ok=false;
+  }
+  else
+  { g = 0;
+    for (i = sati.varArray.__offset; i < sati.varArray.__size+sati.varArray.__offset; i++)
+      if (!Rsato._return.varArray.__ptr[i-Rsato._return.varArray.__offset] ||
+          strcmp(sati.varArray.__ptr[i-sati.varArray.__offset], Rsato._return.varArray.__ptr[i-Rsato._return.varArray.__offset]))
+          g = 1;
+    if (g)
+    {
+    	displayText("echoNestedArray mismatched");
+	    ok=false;
+    }
+    else
+	  	displayText("echoNestedArray passed");
+  }
+
+  if (ok)
+  	displayText("All Passed");
+  	else
+	  displayText("FAILURES");
+
+  return 0;
+}
+
+
diff --git a/gsoap-symbian/interop2C.nsmap b/gsoap-symbian/interop2C.nsmap
new file mode 100644
index 0000000..33b1190
--- /dev/null
+++ b/gsoap-symbian/interop2C.nsmap
@@ -0,0 +1,14 @@
+
+#include "soapH.h"
+SOAP_NMAC struct Namespace namespaces[] =
+{
+	{"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/", "http://www.w3.org/*/soap-envelope", NULL},
+	{"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/", "http://www.w3.org/*/soap-encoding", NULL},
+	{"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance", NULL},
+	{"xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema", NULL},
+	{"s", "http://soapinterop.org/xsd", NULL, NULL},
+	{"ns", "http://soapinterop.org/", NULL, NULL},
+	{"h", "http://soapinterop.org/echoheader/", NULL, NULL},
+	{"m", "http://soapinterop.org/", NULL, NULL},
+	{NULL, NULL, NULL, NULL}
+};
diff --git a/gsoap-symbian/interop2Ctest.cpp b/gsoap-symbian/interop2Ctest.cpp
new file mode 100644
index 0000000..6abe5d4
--- /dev/null
+++ b/gsoap-symbian/interop2Ctest.cpp
@@ -0,0 +1,179 @@
+//===================================================================================
+//
+//    (C) COPYRIGHT International Business Machines Corp., 2002 All Rights Reserved
+//    Licensed Materials - Property of IBM
+//    US Government Users Restricted Rights - Use, duplication or
+//    disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
+//
+//    IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+//    ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+//    PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+//    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+//    USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+//    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
+//    OR PERFORMANCE OF THIS SOFTWARE.
+//
+//    The program may be used, executed, copied, modified, and distributed
+//    without royalty for the purpose of developing, using, marketing, or distributing.
+// 
+//=======================================================================================
+// gSOAP v2 Interop B test round 2
+#include "soapH.h"
+extern "C" void displayText(char *text);
+extern "C" int interopC(const char *site);
+
+
+struct Namespace namespacesC[] =
+{ {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"},
+  {"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/"},
+  {"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance"},
+  {"xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema"},
+  {"m", "http://soapinterop.org/"},
+  {"s", "http://soapinterop.org/xsd"},
+  {"a", "http://xml.apache.org/xml-soap"},
+  {"h", "http://soapinterop.org/echoheader/"},
+  {NULL, NULL}
+};
+int interopC(const char *url)
+{ struct soap *soap;
+  char *site=(char*)url;
+  bool ok=true;
+  xsd__int n = 42;
+  float f  = 3.40282e+38;
+  struct SOAP_ENV__Header h;
+  struct m__echoVoidResponse r;
+  struct s__SOAPStruct s;
+
+  h.h__echoMeStringRequest = NULL;
+  h.h__echoMeStringRequest_ = NULL;
+  h.h__echoMeStringResponse = NULL;
+  h.h__echoMeStructRequest = NULL;
+  h.h__echoMeStructRequest_ = NULL;
+  h.h__echoMeStructResponse = NULL;
+  h.h__someUnknownRequest = NULL;
+  h.h__someUnknownRequest_ = NULL;
+  s.varString = "hello world";
+  s.varInt = &n;
+  s.varFloat = &f;
+
+
+  displayText("running test C on");
+  displayText((char*)url);
+  soap = soap_new();
+  soap->namespaces = (struct Namespace *)namespacesC;
+
+  soap->send_timeout = 300;
+  soap->recv_timeout = 300;
+
+  // request from client (with mustUnderstand="0", recipient is target)
+  h.h__echoMeStringRequest = "hello world";
+  soap->header = &h;
+  soap->actor = "http://schemas.xmlsoap.org/soap/actor/next";
+  if (soap_call_m__echoVoid(soap, site, "http://soapinterop.org/", r))
+  { 
+    displayText("echo1 failed");
+    ok=false;
+  }
+  else
+    displayText("echo1 passed");
+
+  // request from client (with mustUnderstand="0", recipient is not target)
+  soap->header = &h;
+  soap->actor = "http://some/other/actor";
+  if (soap_call_m__echoVoid(soap, site, "http://soapinterop.org/", r))
+  { 
+    displayText("echo2 failed");
+    ok=false;
+  }
+  else
+    displayText("echo2 passed");
+
+  // request from client (with mustUnderstand="1", recipient is target)
+  h.h__echoMeStringRequest = NULL;
+  h.h__echoMeStructRequest_ = &s;
+  soap->header = &h;
+  soap->actor = "http://schemas.xmlsoap.org/soap/actor/next";
+  if (soap_call_m__echoVoid(soap, site, "http://soapinterop.org/", r))
+  { 
+    displayText("echo3 failed");
+    ok=false;
+  }
+  else
+    displayText("echo3 passed");
+
+  // request from client (with mustUnderstand="1", recipient is not target)
+  soap->header = &h;
+  soap->actor = "http://some/other/actor";
+  if (soap_call_m__echoVoid(soap,site, "http://soapinterop.org/", r))
+  { 
+    displayText("echo4 failed");
+    ok=false;
+  }
+  else if (soap->header && soap->header->h__echoMeStructResponse)
+  { 
+    displayText("echo4 should be no response header");
+    ok=false;
+   }
+  else
+    displayText("echo4 passed");
+
+  // Unknown header element: request from client (with mustUnderstand="0", recipient is target)
+  h.h__echoMeStructRequest_ = NULL;
+  h.h__someUnknownRequest = "XYZ";
+  soap->header = &h;
+  soap->actor = "http://schemas.xmlsoap.org/soap/actor/next";
+  if (soap_call_m__echoVoid(soap, site, "http://soapinterop.org/", r))
+  { 
+    displayText("echo5 failed");
+    ok=false;
+  }
+  else
+    displayText("echo5 passed");
+
+  // Unknown header element: request from client (with mustUnderstand="1", recipient is target)
+  h.h__someUnknownRequest = NULL;
+  h.h__someUnknownRequest_ = "XYZ";
+  soap->header = &h;
+  soap->actor = "http://schemas.xmlsoap.org/soap/actor/next";
+  if (soap_call_m__echoVoid(soap, site, "http://soapinterop.org/", r) != SOAP_MUSTUNDERSTAND)
+  { 
+    displayText("echo6 failed");
+    ok=false;
+  }
+  else
+    displayText("echo6 passed");
+
+  // Unknown header element: request from client (with mustUnderstand="0", recipient is not target)
+  h.h__someUnknownRequest_ = NULL;
+  h.h__someUnknownRequest = "XYZ";
+  soap->header = &h;
+  soap->actor = "http://some/other/actor";
+  if (soap_call_m__echoVoid(soap, site, "http://soapinterop.org/", r))
+  { 
+    displayText("echo7 failed");
+    ok=false;
+  }
+  else
+    displayText("echo7 passed");
+
+  // Unknown header element: request from client (with mustUnderstand="1", recipient is not target)
+  h.h__someUnknownRequest = NULL;
+  h.h__someUnknownRequest_ = "XYZ";
+  soap->header = &h;
+  soap->actor = "http://some/other/actor";
+  if (soap_call_m__echoVoid(soap, site, "http://soapinterop.org/", r))
+  { 
+    displayText("echo8 failed");
+    ok=false;
+  }
+  else
+    displayText("echo8 passed");
+
+
+  if (ok)
+  	displayText("All Passed");
+  else
+	  displayText("FAILURES");
+
+  return 0;
+}
diff --git a/gsoap-symbian/interop2test.cpp b/gsoap-symbian/interop2test.cpp
new file mode 100644
index 0000000..cb5fc18
--- /dev/null
+++ b/gsoap-symbian/interop2test.cpp
@@ -0,0 +1,388 @@
+//===================================================================================
+//
+//    (C) COPYRIGHT International Business Machines Corp., 2002 All Rights Reserved
+//    Licensed Materials - Property of IBM
+//    US Government Users Restricted Rights - Use, duplication or
+//    disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
+//
+//    IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+//    ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+//    PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+//    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+//    USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+//    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
+//    OR PERFORMANCE OF THIS SOFTWARE.
+//
+//    The program may be used, executed, copied, modified, and distributed
+//    without royalty for the purpose of developing, using, marketing, or distributing.
+// 
+//=======================================================================================
+// gSOAP v2 Interop test round 2 base
+//#include "interoptA.h"
+#include "soapH.h" 
+
+extern "C" void displayText(char *text);
+extern "C" int interopA(const char *url);
+
+struct Namespace namespacesA[] =
+{ {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"},
+  {"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/"},
+  {"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance"},
+  {"xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema"},
+  {"ns", "http://soapinterop.org/"},
+  {"s", "http://soapinterop.org/xsd"},
+  {"a", "http://xml.apache.org/xml-soap"},
+  {"h", "http://soapinterop.org/echoheader/"},
+  {NULL, NULL}
+};
+
+int interopA(const char *url)
+{ 
+  struct soap *soap;
+  int i, g;
+  xsd__string so, si = "Hello World! <>&";
+  struct ArrayOfstring Asi, Aso;
+  xsd__int no, ni = 1234567890;
+  xsd__int n = 2147483647;
+  struct ArrayOfint Ani, Ano;
+//  xsd__float f1 = 3.40282e+38;
+  xsd__float f1 = 123.5678;
+  xsd__float f2 = 3.14;
+  xsd__float fo, fi = 123.456;
+//  xsd__float fo, fi = 3e2;
+//#ifdef SYMBIAN
+//  const struct soap_double_nan { unsigned int n1, n2; } soap_double_nan;
+//#endif
+  xsd__float nan = FLT_NAN, inf = FLT_PINFTY, ninf = FLT_NINFTY;
+  struct ArrayOffloat Afi, Afo;
+  struct s__SOAPStruct sti, *p;
+  struct ns__echoStructResponse sto;
+  struct ArrayOfSOAPStruct Asti, Asto;
+  struct ns__echoVoidResponse Rv;
+  struct xsd__base64Binary b64i, b64o;
+  xsd__dateTime dto, dti = "1967-12-29T01:02:03";
+  struct xsd__hexBinary hbi, hbo;
+  xsd__decimal Do, Di = "1234567890.123456789";
+  xsd__boolean bo, bi = true;
+  //struct a__Map mi, mo;
+  //struct ArrayOfMap Ami, Amo;
+  // char buff[100];
+  displayText("running test A on");
+  displayText((char*)url);
+  soap = soap_new();
+  soap->namespaces = (struct Namespace *)namespacesA;
+
+//  soap.send_timeout = 30;
+//  soap.recv_timeout = 30;
+
+
+  Asi.__size = 8;
+  Asi.__offset = 0;
+  Asi.__ptr = (xsd__string*)malloc(Asi.__size*sizeof(xsd__string));
+  Asi.__ptr[0] = NULL;
+  Asi.__ptr[1] = " Hello\tWorld";
+  Asi.__ptr[2] = NULL;
+  Asi.__ptr[3] = "! ";
+  Asi.__ptr[4] = NULL;
+  Asi.__ptr[5] = si;
+  Asi.__ptr[6] = NULL;
+  Asi.__ptr[7] = si;
+
+  Ani.__size = 0;
+  Ani.__offset = 0;
+  Ani.__ptr = NULL; // (xsd__int*)malloc(Ani.__size*sizeof(xsd__int));
+
+  Afi.__size = 5;
+  Afi.__offset = 0;
+  Afi.__ptr = (xsd__float**)malloc(Afi.__size*sizeof(xsd__float*));
+  Afi.__ptr[0] = &f1;
+  Afi.__ptr[1] = &nan; // FLT_NAN;
+  Afi.__ptr[2] = &inf; // FLT_PINFTY;
+  Afi.__ptr[3] = &ninf; // FLT_NINFTY;
+  Afi.__ptr[4] = &f2;
+
+  sti.varString = "Hello";
+  sti.varInt = &n;
+  sti.varFloat = &f1;
+
+  Asti.__size = 3;
+  Asti.__offset = 2;
+  Asti.__ptr = (struct s__SOAPStruct**)malloc((Asti.__size+1)*sizeof(struct s__SOAPStruct*));
+  p = (struct s__SOAPStruct*)malloc(Asti.__size*sizeof(struct s__SOAPStruct));
+  Asti.__ptr[0] = p;
+  Asti.__ptr[1] = p+1;
+  Asti.__ptr[2] = p+2;
+  Asti.__ptr[3] = p;
+  Asti.__ptr[0]->varString = "Hello";
+  Asti.__ptr[0]->varInt = &n;
+  Asti.__ptr[0]->varFloat = &f1;
+  Asti.__ptr[1]->varString = "World";
+  Asti.__ptr[1]->varInt = &n;
+  Asti.__ptr[1]->varFloat = &f2;
+  Asti.__ptr[2]->varString = "!";
+  Asti.__ptr[2]->varInt = &n;
+  Asti.__ptr[2]->varFloat = &f2;
+
+//  b64i.__ptr = (unsigned char*)"This is an example Base64 encoded string";
+//  b64i.__size = strlen((char*)b64i.__ptr)+1;
+  unsigned char b64data[4]={0x80, 0x81, 0x82, 0x83};
+  b64i.__ptr = b64data;
+  b64i.__size = 4;
+
+  hbi.__ptr = (unsigned char*)"This is an example HexBinary encoded string";
+  hbi.__size = strlen((char*)hbi.__ptr)+1;
+/*
+  mi.__size = 2;
+  mi.__ptr = (struct _item*)malloc(mi.__size*sizeof(struct _item));
+  mi.__ptr[0].key = new xsd__string_("hello");
+  mi.__ptr[0].value = new xsd__string_("world");
+  mi.__ptr[1].key = new xsd__int_(2);
+  mi.__ptr[1].value = new xsd__boolean_(true);
+
+  Ami.__size = 2;
+  Ami.__ptr = (struct a__Map**)malloc(Ami.__size*sizeof(struct a__Map*));
+  Ami.__ptr[0] = &mi;
+  Ami.__ptr[1] = &mi; */
+  char *site=(char*)url;
+//    char* site ="http://websrv.cs.fsu.edu/~engelen/interop2.cgi";
+//  char* site = "http://nagoya.apache.org:5049/axis/services/echo ";
+  char* action = "http://soapinterop.org/";
+  
+  bool ok=true;
+  
+  if (soap_call_ns__echoString(soap, site, action, si, so))
+  { 
+    displayText("echoString fail");
+    ok=false;
+  }
+  else if (!so || strcmp(si, so))
+  { 
+    ok=false;
+    displayText("echoString mismatched");
+  }
+  else
+    displayText("echoString pass");
+ 
+
+  if (soap_call_ns__echoInteger(soap, site, "http://soapinterop.org/", ni, no))
+  { 
+    ok=false;
+    displayText("echoInteger fail");
+  }
+  else if (ni != no)
+  {  
+    ok=false;
+    displayText("echoInteger mismatched");
+  }
+  else
+    displayText("echoInteger pass");
+
+  if (soap_call_ns__echoFloat(soap, site, "http://soapinterop.org/", fi, fo))
+  { 
+    ok=false;
+    displayText("echoFloat fail");
+  }
+  else if (fi != fo)
+  {  
+    ok=false;
+    displayText("echoFloat mismatched");
+  }
+  else
+    displayText("echoFloat pass");
+
+  if (soap_call_ns__echoStruct(soap, site, "http://soapinterop.org/", sti, sto))
+  { 
+    ok=false;
+  displayText("echoStruct fail");
+  }
+  else if (!sto._return.varString || strcmp(sti.varString, sto._return.varString)
+  	 || !sto._return.varInt || *sti.varInt != *sto._return.varInt 
+  	 || !sto._return.varFloat || *sti.varFloat != *sto._return.varFloat)
+  { 
+    ok=false;
+	  displayText("echoStruct mismatch");
+  }
+  else 
+    displayText("echoStruct pass");
+
+  if (soap_call_ns__echoStringArray(soap, site, "http://soapinterop.org/", Asi, Aso))
+  {
+     soap_set_fault(soap); 
+    soap_faultdetail(soap);
+    ok=false;
+  displayText("echoStringArray fail");
+  }
+  else
+  { g = 0;
+    if (Asi.__size != Aso.__size)
+      g = 1;
+    else
+      for (i = 0; i < Asi.__size; i++)
+        if (Asi.__ptr[i] && Aso.__ptr[i] && strcmp(Asi.__ptr[i], Aso.__ptr[i]))
+          g = 1;
+        else if (!Asi.__ptr[i])
+	  ;
+        else if (Asi.__ptr[i] && !Aso.__ptr[i])
+	  g = 1;
+    if (g)
+    {
+    ok=false;
+    displayText("echoStringArray mismatch"); 
+    }
+    else
+     displayText("echoStringArray pass");
+  }
+
+  if (soap_call_ns__echoIntegerArray(soap, site, "http://soapinterop.org/", Ani, Ano))
+  { displayText("echoIntegerArray fail");
+    ok=false;
+  }
+  else
+  { g = 0;
+    if (Ani.__size != Ano.__size)
+      g = 1;
+    else
+      for (i = 0; i < Ani.__size; i++)
+        if (Ani.__ptr[i] && (!Ano.__ptr[i] || *Ani.__ptr[i] != *Ano.__ptr[i]))
+          g = 1;
+    if (g)
+    { displayText("echoIntegerArray mismatch");
+    ok=false;
+    }
+    else
+      displayText("echoIntegerArray pass");
+  }
+
+  if (soap_call_ns__echoFloatArray(soap, site, "http://soapinterop.org/", Afi, Afo))
+  { displayText("echoFloatArray fail");
+    ok=false;
+  }
+  else
+  { g = 0;
+    if (Afi.__size != Afo.__size)
+      g = 1;
+    else
+      for (i = 0; i < Afi.__size; i++)
+        if (Afi.__ptr[i] && Afo.__ptr[i] && soap_isnan(*Afi.__ptr[i]) && soap_isnan(*Afo.__ptr[i]))
+          ;
+        else if (Afi.__ptr[i] && (!Afo.__ptr[i] || *Afi.__ptr[i] != *Afo.__ptr[i]))
+          g = 1;
+    if (g)
+    { displayText("echoFloatArray mismatch");
+    ok=false;
+    }
+    else
+     displayText("echoFloatArray pass");
+  }
+
+  if (soap_call_ns__echoStructArray(soap, site, "http://soapinterop.org/", Asti, Asto))
+  { displayText("echoStructArray fail");
+    ok=false;
+  }
+  else
+  { g = 0;
+    if (Asti.__size+Asti.__offset != Asto.__size+Asto.__offset)
+      g = 1;
+    else
+      for (i = Asti.__offset; i < Asti.__size+Asti.__offset; i++)
+        if (!Asto.__ptr[i-Asto.__offset] ||
+	!Asto.__ptr[i-Asto.__offset]->varString ||
+	strcmp(Asti.__ptr[i-Asti.__offset]->varString, Asto.__ptr[i-Asto.__offset]->varString) ||
+	!Asto.__ptr[i-Asto.__offset]->varInt ||
+	*Asti.__ptr[i-Asti.__offset]->varInt != *Asto.__ptr[i-Asto.__offset]->varInt ||
+	!Asto.__ptr[i-Asto.__offset]->varFloat ||
+	*Asti.__ptr[i-Asti.__offset]->varFloat != *Asto.__ptr[i-Asto.__offset]->varFloat)
+          g = 1;
+    if (g)
+    { displayText("echoStructArray mismatch");
+    ok=false;
+    }
+    else
+      displayText("echoStructArray pass");
+  }
+
+  if (soap_call_ns__echoVoid(soap, site, "http://soapinterop.org/", Rv))
+  { displayText("echoVoid fail");
+    ok=false;
+  }
+  else
+    displayText("echoVoid pass");
+  
+
+  if (soap_call_ns__echoBase64(soap, site, "http://soapinterop.org/", b64i, b64o))
+  { displayText("echoBase64 fail");
+    ok=false;
+  }
+  else if ((b64i.__size+2)/3 != (b64o.__size+2)/3 || strncmp((char*)b64i.__ptr, (char*)b64o.__ptr,b64i.__size))
+  { 
+  displayText("echoBase64 mismatch");
+    ok=false;
+  }
+  else
+   displayText("echoBase64 pass");
+
+  if (soap_call_ns__echoDate(soap, site, "http://soapinterop.org/", dti, dto))
+  { 
+  displayText("echoDate fail");
+    ok=false;
+  }
+  else if (!dto || strncmp(dti, dto, 19))
+  { 
+  displayText("echoDate mismatch");
+    ok=false;
+  }
+  else
+    displayText("echoDate pass");
+ 
+
+  if (soap_call_ns__echoHexBinary(soap, site, "http://soapinterop.org/", hbi, hbo))
+  { 
+    ok=false;
+  displayText("echoHexBinary fail");
+  }
+  else if (hbi.__size != hbo.__size || strcmp((char*)hbi.__ptr, (char*)hbo.__ptr))
+  { 
+    ok=false;
+  displayText("echoHexBinary mismatch");
+  }
+  else
+    displayText("echoHexBinary pass");
+ 
+
+  if (soap_call_ns__echoDecimal(soap, site, "http://soapinterop.org/", Di, Do))
+  { 
+    ok=false;
+  displayText("echoDecimal pass");
+  }
+  else if (strcmp(Di, Do))
+  { 
+    ok=false;
+  displayText("echoDecimal mismatch");
+  }
+  else
+    displayText("echoDecimal pass");
+  
+
+  if (soap_call_ns__echoBoolean(soap, site, "http://soapinterop.org/", bi, bo))
+  { 
+    ok=false;
+  displayText("echoBoolean fail");
+  }
+  else if (bi != bo)
+  { 
+    ok=false;
+  displayText("echoBoolean mismatch");
+  }
+  else
+    displayText("echoBoolean pass");
+
+  if (ok)
+    displayText("ALL PASS");
+  else
+    displayText("FAILURES");
+  return 0;
+  
+end:
+  return 1;
+}
+
diff --git a/gsoap-symbian/interopMain.c b/gsoap-symbian/interopMain.c
new file mode 100644
index 0000000..507b4a1
--- /dev/null
+++ b/gsoap-symbian/interopMain.c
@@ -0,0 +1,27 @@
+//#include "soapH.h"
+/***********************************************************************
+ *
+ *	Global variables
+ *
+ ***********************************************************************/
+//static Boolean HideSecretRecords;
+int interopA(const char *url);
+int interopB(const char *url);
+int interopC(const char *url);
+void displayText(char *text);
+
+int main(int argc, char *args[])
+{
+  interopA("http://websrv.cs.fsu.edu/~engelen/interop2.cgi");
+  interopB("http://websrv.cs.fsu.edu/~engelen/interop2B.cgi");
+  interopC("http://websrv.cs.fsu.edu/~engelen/interop2C.cgi");
+//    interoptA("http://unknown:9081/~engelen/interop2.cgi");
+}
+
+void displayText(char *text)
+{printf(text);
+  printf("\n");}
+
+
+
+  
diff --git a/gsoap-symbian/interop_all.h b/gsoap-symbian/interop_all.h
new file mode 100644
index 0000000..9c98af1
--- /dev/null
+++ b/gsoap-symbian/interop_all.h
@@ -0,0 +1,136 @@
+// Interop test base round 2
+
+//gsoap ns service name:	interop2
+//gsoap ns service style:	rpc
+//gsoap ns service encoding:	encoded
+//gsoap ns service namespace:	http://soapinterop.org/wsdl
+
+//gsoap ns schema namespace: http://soapinterop.org/
+//gsoap s schema namespace: http://soapinterop.org/xsd
+//gsoap a schema namespace: http://xml.apache.org/xml-soap
+
+typedef char *xsd__string;
+ns__echoString(xsd__string inputString, xsd__string &_return);
+
+struct ArrayOfstring { xsd__string *__ptr; int __size; int __offset; };
+ns__echoStringArray(struct ArrayOfstring inputStringArray, struct ArrayOfstring &_return);
+
+typedef long xsd__int;
+ns__echoInteger(xsd__int inputInteger, xsd__int &_return);
+
+struct ArrayOfint { xsd__int **__ptr; int __size; int __offset; };
+ns__echoIntegerArray(struct ArrayOfint inputIntegerArray, struct ArrayOfint &_return);
+
+typedef float xsd__float;
+ns__echoFloat(xsd__float inputFloat, xsd__float &_return);
+
+struct ArrayOffloat { xsd__float **__ptr; int __size; int __offset; };
+ns__echoFloatArray(struct ArrayOffloat inputFloatArray, struct ArrayOffloat &_return);
+
+struct s__SOAPStruct
+{ xsd__string varString;
+  xsd__int *varInt;
+  xsd__float *varFloat;
+};
+ns__echoStruct(struct s__SOAPStruct _inputStruct, struct ns__echoStructResponse { struct s__SOAPStruct _return; } &result);
+
+struct ArrayOfSOAPStruct { struct s__SOAPStruct **__ptr; int __size; int __offset; };
+ns__echoStructArray(struct ArrayOfSOAPStruct inputStructArray, struct ArrayOfSOAPStruct &_return);
+
+ns__echoVoid(struct ns__echoVoidResponse { } &result);
+
+struct xsd__base64Binary { unsigned char *__ptr; int __size; };
+ns__echoBase64(struct xsd__base64Binary inputBase64, struct xsd__base64Binary &_return);
+
+typedef char *xsd__dateTime;
+ns__echoDate(xsd__dateTime inputDate, xsd__dateTime &_return);
+
+struct xsd__hexBinary { unsigned char *__ptr; int __size; };
+ns__echoHexBinary(struct xsd__hexBinary inputHexBinary, struct xsd__hexBinary &_return);
+
+typedef char *xsd__decimal;
+ns__echoDecimal(xsd__decimal inputDecimal, xsd__decimal &_return);
+
+typedef bool xsd__boolean;
+ns__echoBoolean(xsd__boolean inputBoolean, xsd__boolean &_return);
+
+// Interop test B round 2
+
+ns__echoStructAsSimpleTypes
+(	struct	s__SOAPStruct _inputStruct,
+	struct	ns__echoStructAsSimpleTypesResponse
+	{	xsd__string	_outputString;
+		xsd__int	*_outputInteger;
+		xsd__float	*_outputFloat;
+	} &	result
+);
+
+ns__echoSimpleTypesAsStruct
+(	xsd__string	inputString,
+	xsd__int	*inputInteger,
+	xsd__float	*inputFloat,
+	struct	ns__echoSimpleTypesAsStructResponse
+	{	struct	s__SOAPStruct	_return;
+	} &	result
+);
+
+struct	ArrayOfstring2D
+{	xsd__string *	__ptr;
+	int		__size[2];
+	int		__offset[2];
+};
+
+ns__echo2DStringArray(struct ArrayOfstring2D _input2DStringArray, struct ArrayOfstring2D &_return);
+
+struct	s__SOAPStructStruct
+{	xsd__string		varString;
+	xsd__int *		varInt;
+	xsd__float *		varFloat;
+	struct	s__SOAPStruct *	varStruct;
+};
+
+ns__echoNestedStruct
+(	struct	s__SOAPStructStruct	_inputStruct,
+	struct	ns__echoNestedStructResponse
+	{	struct	s__SOAPStructStruct	_return;
+	} &	result
+);
+
+struct	s__SOAPArrayStruct
+{	xsd__string		varString;
+	xsd__int *		varInt;
+	xsd__float *		varFloat;
+	struct	ArrayOfstring	varArray;
+};
+
+ns__echoNestedArray
+(	struct	s__SOAPArrayStruct	_inputStruct,
+	struct	ns__echoNestedArrayResponse
+	{	struct	s__SOAPArrayStruct	_return;
+	} &	result
+);
+
+// Interop test C round 2
+
+//gsoap h schema namespace: http://soapinterop.org/echoheader/
+struct SOAP_ENV__Header
+{	char *					h__echoMeStringRequest;
+	mustUnderstand char *			h__echoMeStringRequest_;
+	char *					h__echoMeStringResponse;
+	struct s__SOAPStruct *			h__echoMeStructRequest;
+	mustUnderstand struct s__SOAPStruct *	h__echoMeStructRequest_;
+	struct s__SOAPStruct *			h__echoMeStructResponse;
+	char *					h__someUnknownRequest;	// do not include in server
+	mustUnderstand char *			h__someUnknownRequest_;	// do not include in server
+};
+
+//gsoap m service name: interop2C
+//gsoap m service style: rpc
+//gsoap m service encoding: encoded
+//gsoap m service port: http://www.cs.fsu.edu/~engelen/interop2C.cgi
+//gsoap m service namespace: http://soapinterop.org/
+//gsoap m service method-input-header-part: echoVoid h__echoMeStringRequest
+//gsoap m service method-input-header-part: echoVoid h__echoMeStructRequest
+//gsoap m service method-output-header-part: echoVoid h__echoMeStringResponse
+//gsoap m service method-output-header-part: echoVoid h__echoMeStructResponse
+int m__echoVoid(struct m__echoVoidResponse { } &result);
diff --git a/gsoap-symbian/interop_symbian.sisar b/gsoap-symbian/interop_symbian.sisar
new file mode 100644
index 0000000..0b1aea1
--- /dev/null
+++ b/gsoap-symbian/interop_symbian.sisar
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="UTF-8"?>

+

+<!DOCTYPE sisar-project [

+

+<!ELEMENT sisar-project (sisar-configuration?, sis-makefile)>

+<!ATTLIST sisar-project

+  version CDATA #FIXED "1.0">

+

+<!ELEMENT sisar-configuration (default-directory,

+path-conversion-rule, default-public-key-certificate?,

+default-private-key?, increment-build-number?, sis-file?)>

+<!ATTLIST sisar-configuration

+  version CDATA #FIXED "1.0">

+

+<!ELEMENT default-directory EMPTY>

+<!ATTLIST default-directory

+  path CDATA #REQUIRED>

+

+<!ELEMENT path-conversion-rule (replace)>

+<!ELEMENT replace (replacement)>

+<!ATTLIST replace

+  match-at (start) "start"

+  pattern CDATA #REQUIRED>

+<!ELEMENT replacement (target)>

+

+<!ELEMENT default-public-key-certificate (public-key-certificate)>

+

+<!ELEMENT default-private-key (private-key)>

+

+<!ELEMENT increment-build-number EMPTY>

+

+<!ELEMENT sis-file EMPTY>

+<!ATTLIST sis-file

+  file CDATA #REQUIRED>

+

+<!ELEMENT sis-makefile (locales, description?, name, uid,

+major-version, minor-version, build-number, close-applications?,

+non-compressed?, sis-type, sign?, requisites?, capabilities?,

+entries?)>

+<!ATTLIST sis-makefile

+  version CDATA #FIXED "1.0">

+

+<!ELEMENT locales (locale)*>

+<!ELEMENT locale EMPTY>

+<!ATTLIST locale

+  language CDATA #REQUIRED

+  country CDATA #IMPLIED

+  variant CDATA #IMPLIED>

+

+<!ELEMENT description (#PCDATA)>

+

+<!ELEMENT name (for-locale)*>

+

+<!ELEMENT for-locale (#PCDATA)>

+<!ATTLIST for-locale

+  language CDATA #REQUIRED

+  country CDATA #IMPLIED

+  variant CDATA #IMPLIED>

+

+<!ELEMENT uid (#PCDATA)>

+

+<!ELEMENT major-version (#PCDATA)>

+<!ELEMENT minor-version (#PCDATA)>

+<!ELEMENT build-number (#PCDATA)>

+

+<!ELEMENT close-applications EMPTY>

+

+<!ELEMENT non-compressed EMPTY>

+

+<!ELEMENT sis-type EMPTY>

+<!ATTLIST sis-type

+  type (application|shared-component|optional-component|

+        configuration|patch|upgrade) "application">

+

+<!ELEMENT sign (public-key-certificate, private-key)>

+<!ELEMENT public-key-certificate EMPTY>

+<!ATTLIST public-key-certificate

+  file CDATA #REQUIRED>

+<!ELEMENT private-key EMPTY>

+<!ATTLIST private-key

+  file CDATA #REQUIRED

+  passphrase CDATA #IMPLIED>

+

+<!ELEMENT requisites (requisite*)>

+<!ELEMENT requisite (uid, major-version, minor-version, build-number,

+name)>

+

+<!ELEMENT capabilities (capability*)>

+<!ELEMENT capability EMPTY>

+<!ATTLIST capability

+  key CDATA #REQUIRED

+  value CDATA #REQUIRED>

+

+<!ELEMENT entries

+     (comment|group|embedded-sis|options|conditional|copy|

+      show|application-created|open|execute)*>

+

+<!ELEMENT comment (#PCDATA)>

+

+<!ELEMENT group (comment|group|embedded-sis|options|conditional|copy|

+                 show|application-created|open|execute)*>

+<!ATTLIST group

+  label CDATA #IMPLIED>

+

+<!ELEMENT embedded-sis EMPTY>

+<!ATTLIST embedded-sis

+  file CDATA #REQUIRED

+  uid CDATA #IMPLIED>

+

+<!ELEMENT options (option)*>

+<!ELEMENT option (for-locale)*>

+<!ATTLIST option

+  nickname CDATA #IMPLIED>

+

+<!ELEMENT conditional (if, elseif*, else?)>

+<!ELEMENT if (comment|group|embedded-sis|options|conditional|copy|

+              show|application-created|open|execute)*>

+<!ATTLIST if

+  condition CDATA #REQUIRED>

+<!ELEMENT elseif (comment|group|embedded-sis|options|conditional|copy|

+                  show|application-created|open|execute)*>

+<!ATTLIST elseif

+  condition CDATA #REQUIRED>

+<!ELEMENT else (comment|group|embedded-sis|options|conditional|copy|

+                show|application-created|open|execute)*>

+

+<!ELEMENT copy ((source|sources), target)>

+<!ELEMENT source EMPTY>

+<!ATTLIST source

+  file CDATA #REQUIRED>

+<!ELEMENT sources (for-locale)*>

+<!ELEMENT target EMPTY>

+<!ATTLIST target

+  drive CDATA "any"

+  file CDATA #REQUIRED>

+

+<!ELEMENT show ((source|sources), yes-no-buttons?)>

+<!ELEMENT yes-no-buttons EMPTY>

+<!ATTLIST yes-no-buttons

+  no-action (skip|undo|abort) "skip">

+

+<!ELEMENT application-created (target)>

+

+<!ELEMENT open ((source|sources), target)>

+<!ATTLIST open

+  mime-type CDATA #REQUIRED

+  closed (wait-until|upon-completion) "wait-until">

+

+<!ELEMENT execute ((source|sources), target)>

+<!ATTLIST execute

+  when (installation|uninstallation|both) "installation"

+  closed (wait-until|upon-completion) "wait-until">

+

+                        ]>

+

+<sisar-project version="1.0">

+  <sisar-configuration version="1.0">

+    <default-directory path="" />

+    <path-conversion-rule>

+      <replace pattern="c:\">

+        <replacement>

+          <target drive="Any" file="\System\Apps\appname\" />

+        </replacement>

+      </replace>

+    </path-conversion-rule>

+    <default-public-key-certificate>

+      <public-key-certificate file="public.cer" />

+    </default-public-key-certificate>

+    <default-private-key>

+      <private-key file="private.key" />

+    </default-private-key>

+    <increment-build-number />

+    <sis-file file="F:\gdrive\gsoap2.6\win\interop_symbian\interop.sis" />

+  </sisar-configuration>

+  <sis-makefile version="1.0">

+    <locales>

+      <locale language="en" country="US" />

+    </locales>

+    <description>

+    interop

+    </description>

+    <name>

+      <for-locale language="en" country="US"></for-locale>

+    </name>

+    <uid>0x00996d08</uid>

+    <major-version>0</major-version>

+    <minor-version>1</minor-version>

+    <build-number>3</build-number>

+    <sis-type type="application" />

+    <entries>

+      <execute closed="wait-until" when="installation">

+        <source file="F:\gdrive\Symbian\6.1\Series60\Epoc32\Release\armi\urel\INTEROP.EXE" />

+        <target drive="Any" file="" />

+      </execute>

+    </entries>

+  </sis-makefile>

+</sisar-project>

diff --git a/import/README.txt b/import/README.txt
new file mode 100644
index 0000000..9685326
--- /dev/null
+++ b/import/README.txt
@@ -0,0 +1,30 @@
+This directory contains common #import-ed items.
+
+dom.h		DOM support (requires dom.c/pp)
+stldeque.h	std::deque serializer
+stllist.h	std::list serializer
+stlset.h	std::set serializer
+stlvector.h	std::vector serializer
+stl.h		std::deque, std::list, std::set, and std::vector serializer
+soap12.h	SOAP 1.2 namespaces
+
+This directory further contains files to support a growing number of WS-*
+specifications.
+
+For example, wsa.h is generated from WS/WS-Addressing.xsd with:
+
+wsdl2h -cgy -o wsa.h -t WS/WS-typemap.dat WS/WS-Addressing.xsd
+
+The typemap.dat file that is needed by wsdl2h to convert WSDL to a gSOAP header
+file defines imported namespaces as follows:
+
+wsa = <http://schemas.xmlsoap.org/ws/2004/08/addressing>
+
+This ensures that the WS-Addressing support is #import-ed from "wsa.h" when
+wsdl2h sees WS-Addressing elements. Thus, it does not attempt to extract the
+WS-Addressing schema but instead uses the pre-build wsa.h definitions.
+
+Note that the regular XML namespace bindings are defined in typemap.dat using
+quotes, for example:
+
+aws = "urn:PI/DevCentral/SoapService"
diff --git a/import/WS-Header.h b/import/WS-Header.h
new file mode 100644
index 0000000..fa09bd3
--- /dev/null
+++ b/import/WS-Header.h
@@ -0,0 +1,50 @@
+/*
+
+WS-Header.h
+
+Combines WS-Routing, WS-Security, WS-Addressing
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2004-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#import "wsrp.h"
+#import "wsa.h"
+#import "wsse.h"
+
+struct SOAP_ENV__Header
+{
+  mustUnderstand _wsrp__path		*wsrp__path	0; ///< WS-Routing
+  mustUnderstand _wsse__Security	*wsse__Security	0; ///< WS-Security
+  mustUnderstand _wsa__MessageID	 wsa__MessageID	0; ///< WS-Addressing
+  mustUnderstand _wsa__RelatesTo	*wsa__RelatesTo	0; ///< WS-Addressing
+  mustUnderstand _wsa__From		*wsa__From	0; ///< WS-Addressing
+  mustUnderstand _wsa__ReplyTo		*wsa__ReplyTo	0; ///< WS-Addressing
+  mustUnderstand _wsa__FaultTo		*wsa__FaultTo	0; ///< WS-Addressing
+  mustUnderstand _wsa__To		 wsa__To	0; ///< WS-Addressing
+  mustUnderstand _wsa__Action		 wsa__Action	0; ///< WS-Addressing
+};
diff --git a/import/WS-example.c b/import/WS-example.c
new file mode 100644
index 0000000..7958dac
--- /dev/null
+++ b/import/WS-example.c
@@ -0,0 +1,67 @@
+/*
+
+example.c
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2004-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "soapH.h"
+#include "calc.nsmap"
+
+int main()
+{
+  struct soap soap;
+  struct SOAP_ENV__Header header;
+  struct wsa__EndpointReferenceType replyTo;
+  double n;
+
+  soap_init(&soap);
+
+  soap_default_SOAP_ENV__Header(&soap, &header);
+
+  soap_default_wsa__EndpointReferenceType(&soap, &replyTo);
+  replyTo.Address = "http://websrv.cs.fsu.edu/~engelen/calcclient.cgi";
+
+  header.wsa__MessageID = "uuid:aaaabbbb-cccc-dddd-eeee-ffffffffffff";
+  header.wsa__ReplyTo = &replyTo;
+  header.wsa__To = "http://websrv.cs.fsu.edu/~engelen/calcserver.cgi";
+  header.wsa__Action = "http://websrv.cs.fsu.edu/~engelen/result";
+  soap.header = &header;
+
+  printf("Testing: the WS-Addressing request send to the calc server is not understood:\n");
+
+  if (soap_call_ns__add(&soap, NULL, NULL, 1, 2, &n))
+    soap_print_fault(&soap, stderr);
+  else
+    printf("1 + 2 = %g\n", n);
+
+  soap_end(&soap);
+  soap_done(&soap);
+
+  return 0;
+}
diff --git a/import/WS-example.h b/import/WS-example.h
new file mode 100644
index 0000000..77bac2d
--- /dev/null
+++ b/import/WS-example.h
@@ -0,0 +1,46 @@
+/*
+
+example.h
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2004-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#import "WS-Header.h"
+
+//gsoap ns service name:        calc
+//gsoap ns service style:       rpc
+//gsoap ns service encoding:    encoded
+//gsoap ns service namespace:   http://websrv.cs.fsu.edu/~engelen/calc.wsdl
+//gsoap ns service location:    http://websrv.cs.fsu.edu/~engelen/calcserver.cgi
+
+//gsoap ns schema namespace:	urn:calc
+int ns__add(double a, double b, double *result);
+int ns__sub(double a, double b, double *result);
+int ns__mul(double a, double b, double *result);
+int ns__div(double a, double b, double *result);
+int ns__pow(double a, double b, double *result);
diff --git a/import/c14n.h b/import/c14n.h
new file mode 100644
index 0000000..0d64db9
--- /dev/null
+++ b/import/c14n.h
@@ -0,0 +1,25 @@
+/*
+
+c14n.h
+
+*/
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Namespaces                                                          *
+ *                                                                            *
+\******************************************************************************/
+
+//gsoap c14n  schema import:	http://www.w3.org/2001/10/xml-exc-c14n#
+//gsoap c14n  schema elementForm:	qualified
+//gsoap c14n  schema attributeForm:	unqualified
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Types                                                               *
+ *                                                                            *
+\******************************************************************************/
+
+typedef struct _c14n__InclusiveNamespaces
+{	@char*				PrefixList;
+} _c14n__InclusiveNamespaces;
diff --git a/import/dom.h b/import/dom.h
new file mode 100644
index 0000000..4eb8b78
--- /dev/null
+++ b/import/dom.h
@@ -0,0 +1,630 @@
+/*
+
+dom.h
+
+gSOAP DOM interface
+
+gSOAP XML Web services tools
+Copyright (C) 2001-2005, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2004 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+/**
+
+@mainpage The gSOAP level-2 DOM parser
+
+The gSOAP level-2 DOM parser features "smart" XML namespace handling and can be
+used to mix gSOAP XML serializers with plain XML parsing. The DOM parser is
+also an essential component of the wsse plugin to verify digital signatures.
+
+The DOM parser is not a stand-alone application. The DOM parser is integrated
+with the SOAP engine to populate a node set and to render a node set in XML.
+
+Two files are needed to work with DOM node sets:
+
+- dom.h to use a DOM node set in a gSOAP header file with service definitions.
+- dom.cpp (or dom.c) to be linked with your application code.
+
+@section dom_1 Declaring DOM Node Sets in a gSOAP Header File
+
+To use the DOM node set with the data structures defined in a gSOAP header
+file, import the dom.h file into your header file:
+
+@code
+    #import "dom.h"
+@endcode
+
+By importing dom.h a special data type @ref xsd__anyType is available that
+represents a hierarchical DOM node set. The DOM node set data structure can be
+used within structs, classes, STL containers, and as arguments of service
+operations. For example:
+
+@code
+    #import "dom.h"
+    #import "wsu.h"
+    class ns__myProduct
+    { public:
+	@char*            wsu__Id;
+	_wsu__Timestamp*  wsu__Timestamp;
+        char*             name;
+	int               SKU;
+	double            price;
+	xsd__anyType*	  any;
+                          ns__myProduct();
+                          ~ns__myProduct();
+    };
+@endcode
+
+It is important to declare the @ref xsd__anyType at the end of the struct or
+class, since the DOM parser consumes any XML element (the field name, 'any' in
+this case, is irrelavant).  Thus, the other fields must be defined first to
+ensure they are populated first before the DOM node set is populated with any
+non-previously matched XML element.
+
+Note that we also imported wsu.h as an example to show how to add a wsu:Id
+attribute to a struct or class if we want to digitally sign instances, and how
+to add a standardized wsu:Timestamp element to record creation and expiration
+times.
+
+To compile, run soapcpp2 (with -Iimport) and compile your code by linking
+dom.cpp (or dom.c for C). Note that the DOM data structures are declared in
+stdsoap2.h, while the DOM operations are defined in dom.cpp (or dom.c for C).
+
+Methods to populate and traverse DOM node sets will be explained later. First,
+let's take a look at parsing and generating XML documents.
+
+@section dom_2 Parsing and Generating XML
+
+The following examples assume that the soapcpp2 compiler was used on a header
+file (just the dom.h file will do) and the generated soapC.cpp or (soapC.c for
+C) code was compiled and linked with dom.cpp (or dom.c for C), stdsoap2.cpp (or
+stdsoap2.c) and the example application code. The generated namespace table
+should also be used, since the namespace bindings are relevant for consuming
+and producing XML for DOM node sets. Therefore, each of the example codes
+in this documentation is assumed to start with the following two includes:
+
+@code
+    #include "soapH.h"  // generated by soapcpp2
+    #include "ns.nsmap" // a namespace table with the XML namespace used
+@endcode
+
+The C++ std::iostream operators are overloaded to parse XML octet streams into
+node sets and to emit XML from node sets:
+
+@code
+    soap_dom_element dom;
+    dom.soap = soap_new1(SOAP_DOM_TREE | SOAP_C_UTFSTRING);
+    cin >> dom; // parse XML
+    if (dom.soap->error)
+      ... // parse error
+    cout << dom; // display XML
+    if (dom.soap->error)
+      ... // output error
+    soap_destroy(dom.soap);
+    soap_end(dom.soap);
+    soap_done(dom.soap);
+    free(dom.soap);
+@endcode
+
+In the example above we copied an XML document from stdin to stdout.
+
+In C we use the DOM "serializers" to accomplish this as follows:
+
+@code
+    soap_dom_element dom;
+    dom.soap = soap_new1(SOAP_DOM_TREE | SOAP_C_UTFSTRING);
+    dom.soap->recvfd = stdin;
+    if (soap_begin_recv(dom.soap)
+     || NULL != soap_in_xsd__anyType(dom.soap, NULL, &dom, NULL)
+     || soap_end_recv(dom.soap))
+      ... // parse error
+    dom.soap->sendfd = stdout;
+    if (soap_begin_send(dom.soap)
+     || soap_out_xsd__anyType(dom.soap, NULL, 0, &dom, NULL)
+     || soap_end_send(dom.soap))
+      ... // output error
+    soap_end(dom.soap);
+    soap_done(dom.soap);
+    free(dom.soap);
+@endcode
+
+The SOAP_DOM_NODE flag is used to instruct the parser to populate a DOM node
+set with deserialized C and C++ data structures using the data type's
+deserializers that were generated with soapcpp2 from a header file with the
+data type declarations. Suppose for example that the following header file was
+used (in fact, this declaration appears in wsu.h):
+
+@code
+    typedef struct _wsu__Timestamp
+    {	@char*	wsu__Id;
+    	char*	Created;
+	char*	Expires;
+    } _wsu__Timestamp;
+@endcode
+
+Note that the leading underscore of the type name indicates an XML element
+definition (rather than a complexType definition), so the name of the data type
+is relevant when comparing XML element tags to C/C++ data types by the
+deserializers.
+
+When an XML document is parsed with one or more <wsu:Timestamp> elements, the
+DOM will be automatically populated with the _wsu__Timestamp objects. Suppose
+the XML document root is a <wsu:Timestamp>, then the root node of the DOM is a
+_wsu__Timestamp object:
+
+@code
+    soap_dom_element dom;
+    dom.soap = soap_new1(SOAP_DOM_NODE);
+    cin >> dom; // parse XML
+    if (dom.soap->error)
+      ... // parse error
+    if (dom.type == SOAP_TYPE__wsu__Timestamp)
+    { _wsu__Timestamp *t = (_wsu__Timestamp*)dom.node;
+      cout << "Start " << (t->Created ? t->Created : "")
+           << " till " << (t->Expires ? t->Expires : "") << endl;
+    }
+@endcode
+
+Note that the soapcpp2 compiler generates a unique type identification constant
+SOAP_TYPE_X for each data type X, which is used to determine the node's type in
+the example above.
+
+When objects occur deeper within the DOM node set then the DOM tree should be
+traversed. This subject will be discussed next.
+
+@section dom_3 Traversing a DOM Node Set
+
+The DOM node set is traversed with a C++ iterator or with the C functions @ref
+soap_dom_next_element and @ref soap_dom_next_attribute. For example, to walk
+the node set visiting nodes in the same order as they appeared in the document,
+use:
+
+@code
+    soap_dom_element dom;
+    dom.soap = soap_new1(SOAP_DOM_TREE | SOAP_C_UTFSTRING);
+    ...
+    for (soap_dom_element::iterator iter = dom.begin(); iter != dom.end(); ++iter)
+      for (soap_dom_attribute::iterator attr = (*iter).atts.begin(); attr != (*iter).atts.end(); ++attr)
+        ...
+@endcode
+
+In C code, use:
+
+@code
+    soap_dom_element dom, *iter;
+    soap_dom_attribute *attr;
+    dom.soap = soap_new1(SOAP_DOM_TREE | SOAP_C_UTFSTRING);
+    ...
+    for (iter = &dom; iter; iter = soap_dom_next_element(iter))
+      for (attr = iter->atts; attr; attr = soap_dom_next_attribute(attr))
+         ...
+@endcode
+
+The @ref soap_dom_element and @ref soap_dom_attribute structs form essentially
+linked lists, so it would not be too difficult to write your own tree walkers:
+
+- @ref soap_dom_element::prnt points to the parent soap_dom_element node.
+- @ref soap_dom_element::elts points to the linked list of child element nodes.
+- @ref soap_dom_element::atts points to the linked list of attribute nodes.
+
+The linked lists of sibling elements nodes and attribute nodes are respectively:
+
+- @ref soap_dom_element::next points to the next sibling element node.
+- @ref soap_dom_attribute::next points to the next attribute in the attribute
+  list of an element node.
+
+Note that for a root node, the @ref soap_dom_element::prnt and @ref
+soap_dom_element::next are both NULL.
+
+Tag names of elements and attributes are stored in @ref soap_dom_element::name
+and @ref soap_dom_attribute::name strings, respectively. The names are UTF-8
+encoded.
+
+XML namespace bindings are explicitly propagated throughout the DOM node set
+for those elements and attributes that are namespace qualified (either with a
+namespace prefix or when they occur in a xmlns default namespace scope). The
+namespaces are stored in the @ref soap_dom_element::nstr and @ref
+soap_dom_attribute::nstr strings. The following example shows how to traverse a
+DOM node set and print the elements with their namespace URIs when present:
+
+@code
+    soap_dom_element dom;
+    dom.soap = soap_new1(SOAP_DOM_TREE | SOAP_C_UTFSTRING);
+    cin >> dom;
+    for (soap_dom_element::iterator iter = dom.begin(); iter != dom.end(); ++iter)
+    { cout << "Element " << (*iter).name;
+      if ((*iter).nstr)
+        cout << " has namespace " << (*iter).nstr;
+      cout << endl;
+    }
+    soap_destroy(dom.soap);
+    soap_end(dom.soap);
+    soap_done(dom.soap);
+    free(dom.soap);
+@endcode
+
+Text content of a node is stored in the @ref soap_dom_element::data string in
+UTF-8 format. This string is populated if the SOAP_C_UTFSTRING flag was set.
+Otherwise the data content will be stored in the @ref soap_dom_element::wide
+wide-character string.
+
+The following example prints those element nodes that have text content
+(in UTF-8 format):
+
+@code
+    soap_dom_element dom;
+    ...
+    for (soap_dom_element::iterator iter = dom.begin(); iter != dom.end(); ++iter)
+    { cout << "Element " << (*iter).name;
+      if ((*iter).data)
+        cout << " = " << (*iter).data;
+      cout << endl;
+    }
+    ...
+@endcode
+
+When a DOM node set contains deserialized objects (enabled with the
+SOAP_DOM_NODE flag), the @ref soap_dom_element::type and @ref
+soap_dom_element::node values are set:
+
+@code
+    soap_dom_element dom;
+    ...
+    for (soap_dom_element::iterator iter = dom.begin(); iter != dom.end(); ++iter)
+    { cout << "Element " << (*iter).name;
+      if ((*iter).type)
+        cout << "Element " << (*iter).name << " contains a deserialized object" << endl;
+      cout << endl;
+    }
+    ...
+@endcode
+
+The @ref soap_dom_element::type is 0 or a SOAP_TYPE_X constant, where X is the
+name of the deserialized type. The @ref soap_dom_element::node points to the
+deserialized object. If this is a char* string, it points directly to the
+character sequence.
+
+Note: the SOAP_DOM_TREE flag restricts the parser to DOM content only, so
+deserializers is not used. When the SOAP_DOM_TREE flag is not used, an
+appropriate deserializer MAY be used by gSOAP when an element contains an id
+attribute and gSOAP can determine the type from the id attribute reference
+and/or the xsi:type attribute of an element. 
+
+@section dom_4 Searching
+
+Common operations on DOM node sets in level-2 DOM parsers are searching and
+filtering.
+
+For C++ code, the built-in @ref soap_dom_element::iterator can be used to
+search for matching element nodes. C programmers are out of luck as they should
+write looping code to search for nodes explicitly.
+
+The @ref soap_dom_element::find method returns a search iterator. The method
+takes an optional namespace URI and element name to match elements in the DOM
+node set.  For example, to iterate over all "product" elements:
+
+@code
+    soap_dom_element dom;
+    ...
+    for (soap_dom_element::iterator iter = dom.find(NULL, "product"); iter != dom.end(); ++iter)
+      cout << "Element " << (*iter).name << endl;
+    ...
+@endcode
+
+To iterate over all elements in a particular namespace:
+
+@code
+    soap_dom_element dom;
+    ...
+    for (soap_dom_element::iterator iter = dom.find("http://www.w3.org/2001/XMLSchema", NULL); iter != dom.end(); ++iter)
+      cout << "Element " << (*iter).name << endl;
+    ...
+@endcode
+
+Since namespaces may have different version, a '*' wildcard can be used with
+the namespace string. Likewise, tag names may be namespace qualified with
+prefixes that are not relevant to the search:
+
+@code
+    soap_dom_element dom;
+    ...
+    for (soap_dom_element::iterator iter = dom.find("http://www.w3.org/*XMLSchema", "*:schema"); iter != dom.end(); ++iter)
+      cout << "Element " << (*iter).name << endl;
+    ...
+@endcode
+
+This searches for qualified elements in one of the XSD namespaces.
+
+@section dom_5 Constructing DOM Node Sets
+
+The @ref soap_dom_element::set and @ref soap_dom_element::add methods are used
+to decorate a DOM node set with child element nodes and attribute nodes.
+Application data with serializers can be incorporated in the node set as well.
+
+The following examples are shown in C++.  C programmers can use the @ref
+soap_dom_element:elts list and @ref soap_dom_elements::atts list to add child
+nodes and attribute nodes, respectively.
+
+@code
+    soap_dom_element dom;
+    dom.soap = soap_new1(SOAP_C_UTFSTRING | SOAP_XML_INDENT);
+    const char *myURI = "http://www.mydomain.com/myproducts";
+    ns__myProduct product();
+    product.soap_default(dom.soap); // method generated by soapcpp2
+    product.name = "Ernie";
+    product.SKU = 123;
+    product.price = 9.95;
+    dom.set(myURI, "list");
+    dom.add(soap_dom_attribute(dom.soap, myURI, "version", "0.9"));
+    dom.add(soap_dom_element(dom.soap, myURI, "documentation", "List of products"));
+    dom.add(soap_dom_element(dom.soap, myURI, "product", SOAP_TYPE_ns__myProduct, &product);
+    cout << dom;
+    ...
+@endcode
+
+Assuming that myURI is associated with namespace prefix "ns" in the namespace
+table, the rendition is
+
+@code
+<?xml version="1.0" encoding="UTF-8"?>
+<ns:list
+  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
+  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+  xmlns:ns="http://domain/schemas/product.xsd"
+  version="0.9" >
+	<ns:documentation>List of products</ns:documentation>
+	<ns:product>
+		<name>Ernie</name>
+		<SKU>123</SKU>
+		<price>9.95</price>
+	</ns:product>
+</ns:list>
+@endcode
+
+Note that the namespace table content is "dumped" into the XML rendition.
+
+The global namespace mapping table "namespaces[]" contains the namespace
+bindings that should be meaningful to the application. The soap context can be
+set to a new table as follows:
+
+@code
+    Namespace myNamespaces[] = { { "ns", "..." }, ... , { NULL } };
+    soap_dom_element dom;
+    dom.soap = soap_new1(SOAP_C_UTFSTRING | SOAP_XML_INDENT);
+    dom.soap->namespaces = myNamespaces;
+@endcode
+
+To produce cleaner XML, use the SOAP_XML_CANONICAL flag to initiate the soap
+context:
+
+@code
+<ns:list xmlns:ns="http://domain/schemas/product.xsd" version="0.9" >
+	<ns:documentation>List of products</ns:documentation>
+	<ns:product>
+		<name>Ernie</name>
+		<SKU>123</SKU>
+		<price>9.95</price>
+	</ns:product>
+</ns:list>
+@endcode
+
+Note that the xmlns bindings are rendered automatically. When parsing an XML
+document, xmlns bindings are not added to the attribute node set. The @ref
+soap_dom_element::nstr and @ref soap_dom_attribute::nstr namespace strings are
+set to retain namespace URIs. The XML rendering algorithm uses the namespace
+strings to add xmlns bindings that are not already in the namespace table.
+
+When it is desirable to render XML exactly as represented in the DOM node set,
+e.g. when xmlns bindings are explicitly included in the attribute node set, use
+the SOAP_DOM_ASIS flag:
+
+@code
+    soap_dom_element dom;
+    dom.soap = soap_new1(SOAP_C_UTFSTRING | SOAP_DOM_ASIS);
+@endcode
+
+@section dom_6 Example
+
+The gSOAP header file below imports DOM and declares xsd:float to enable
+serializing floats embedded within DOM node sets and deserializing floats to
+populate DOM node sets:
+
+@code
+    #import "dom.h"
+    typedef float xsd__float;
+@endcode
+
+Consider invoking the XMethods delayed stock quote service to obtain a stock
+quote. The float deserializer is used to store the floating-point value of a
+stock given that the <Result> element has an xsi:type="xsd:float" attribute.
+
+@code
+    struct soap *soap = soap_new1(SOAP_C_UTFSTRING | SOAP_DOM_NODE);
+    soap_dom_element envelope(soap, "http://schemas.xmlsoap.org/soap/envelope/", "Envelope");
+    soap_dom_element body(soap, "http://schemas.xmlsoap.org/soap/envelope/", "Body");
+    soap_dom_attribute encodingStyle(soap, "http://schemas.xmlsoap.org/soap/envelope/", "encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/");
+    soap_dom_element request(soap, "urn:xmethods-delayed-quotes", "getQuote");
+    soap_dom_element symbol(soap, NULL, "symbol", "IBM");
+    soap_dom_element response(soap);
+    envelope.add(body);
+    body.add(encodingStyle);
+    body.add(request);
+    request.add(symbol);
+    cout << "Request message:" << endl << envelope << endl;
+    if (soap_connect(soap, "http://services.xmethods.net/soap", "")
+     || soap_out_xsd__anyType(soap, NULL, 0, &envelope, NULL)
+     || soap_end_send(soap)
+     || soap_begin_recv(soap)
+     || NULL != soap_in_xsd__anyType(soap, NULL, &response, NULL)
+     || soap_end_recv(soap)
+     || soap_closesock(soap))
+    { soap_print_fault(soap, stderr);
+      soap_print_fault_location(soap, stderr);
+    }
+    else
+    { cout << "Response message:" << endl << response << endl;
+      for (soap_dom_element::iterator walker = response.find(SOAP_TYPE_xsd__float); walker != response.end(); ++walker)
+        cout << "Quote = " << *(xsd__float*)(*walker).node << endl;
+    }
+    soap_destroy(soap);
+    soap_end(soap);
+    soap_done(soap);
+    free(soap);
+@endcode
+
+@section dom_7 Summary
+
+The DOM parser needs a soap context to allocate nodes:
+
+@code
+    soap_dom_element dom;
+    dom.soap = soap_new1(... flags ...);
+    ...
+    soap_destroy(dom.soap);
+    soap_end(dom.soap);
+    soap_done(dom.soap);
+    soap_free(dom.soap);
+@endcode
+
+The nodes are removed with soap_destroy (for C++) and soap_end. The soap_done
+function should only be used before the soap context is deallocated.
+
+The soap context flags that control the parsing and rendition of XML are:
+
+- (no flag): only elements with an id attribute are deserialized as C/C++ data
+  types (when a deserializer is available). XML elements with character data
+  are deserialized into the @ref soap_dom_element::wide field.
+- SOAP_C_UTFSTRING: store character data in UTF-8 format in @ref
+  soap_dom_element::data.
+- SOAP_C_MBSTRING: store character data in multi-byte format in @ref
+  soap_dom_element::data, where the decoding depends on the current
+  localication. The platform must support MB strings (HAVE_MBTOWC).
+- SOAP_DOM_TREE: prevents deserialization of C/C++ data structures into the
+  DOM.
+- SOAP_DOM_NODE: attempt to deserialize C/C++ data structures when a
+  deserializer is available. A deserializer is selected based on the element
+  name or the xsi:type attribute.
+- SOAP_DOM_ASIS: render XML "as is", i.e. do not insert xmlns bindings for URIs
+  stored in nstr. Assumes the DOM is self-contained.
+- SOAP_XML_INDENT: render XML with indent.
+- SOAP_XML_CANONICAL: render XML in exc-c14n form.
+
+The DOM traversal operations:
+
+- @ref soap_dom_next_element returns the next element in an in-order traversal.
+- @ref soap_dom_next_attribute returns the next attribute of a node.
+
+The @ref soap_dom_element fields:
+
+- @ref soap_dom_element::next pointer to next sibling in list.
+- @ref soap_dom_element::prnt pointer to parent node.
+- @ref soap_dom_element::elts pointer to list of child element nodes.
+- @ref soap_dom_element::atts pointer to list of attribute nodes.
+- @ref soap_dom_element::nstr optional namespace string of this node.
+- @ref soap_dom_element::name the name of the element node (with optional
+  prefix).
+- @ref soap_dom_element::data optional character data in UTF-8 format.
+- @ref soap_dom_element::wide optional character data in wide string format.
+- @ref soap_dom_element::type optional SOAP_TYPE_X type of a C/C++ data
+  structure stored with this node.
+- @ref soap_dom_element::node optional pointer to the C/C++ data structure
+  stored with this node.
+- @ref soap_dom_element::head optional leading whitespace to the start tag.
+- @ref soap_dom_element::tail optional leading whitespace to the end tag.
+- @ref soap_dom_element::soap the soap context that manages this node.
+
+The @ref soap_dom_element types:
+
+- @ref soap_dom_element::iterator
+
+The @ref soap_dom_element methods:
+
+- @ref soap_dom_element::set(nstr, name);
+- @ref soap_dom_element::set(data);
+- @ref soap_dom_element::set(node, type);
+- @ref soap_dom_element::add(soap_dom_element);
+- @ref soap_dom_element::add(soap_dom_attribute);
+- @ref soap_dom_element::begin();
+- @ref soap_dom_element::end();
+- @ref soap_dom_element::find(nstr, name);
+- @ref soap_dom_element::find(type);
+- @ref soap_dom_element::unlink();
+
+The @ref soap_dom_element constructors:
+
+- @ref soap_dom_element();
+- @ref soap_dom_element(soap);
+- @ref soap_dom_element(soap, nstr, name);
+- @ref soap_dom_element(soap, nstr, name, data);
+- @ref soap_dom_element(soap, nstr, name, node, type);
+
+The @ref soap_dom_attribute fields:
+
+- @ref soap_dom_attribute::next pointer to next attribute node in list.
+- @ref soap_dom_attribute::nstr optional namespace string of this node.
+- @ref soap_dom_attribute::name the name of the attribute (with optional
+  prefix).
+- @ref soap_dom_attribute::data optional character data in UTF-8 format.
+- @ref soap_dom_attribute::soap the soap context that manages this node.
+
+The @ref soap_dom_attribute types:
+
+- @ref soap_dom_attribute::iterator
+
+The @ref soap_dom_attribute methods:
+
+- @ref soap_dom_attribute::set(nstr, name);
+- @ref soap_dom_attribute::set(data);
+- @ref soap_dom_attribute::begin();
+- @ref soap_dom_attribute::end();
+- @ref soap_dom_attribute::find(nstr, name);
+- @ref soap_dom_attribute::unlink();
+
+The @ref soap_dom_attribute constructors:
+
+- @ref soap_dom_attribute();
+- @ref soap_dom_attribute(soap);
+- @ref soap_dom_attribute(soap, nstr, name, data);
+
+*/
+
+/// @brief The custom serializer for DOM nodes is represented by xsd__anyType.
+extern typedef struct soap_dom_element xsd__anyType;
+
diff --git a/import/ds.h b/import/ds.h
new file mode 100644
index 0000000..4da9863
--- /dev/null
+++ b/import/ds.h
@@ -0,0 +1,373 @@
+/*
+
+ds.h
+
+Generated with:
+wsdl2h -cuxy -o ds.h -t WS/WS-typemap.dat WS/ds.xsd
+
+- Removed //gsoapopt
+- Added //gsoap ds    schema import: http://www.w3.org/2000/09/xmldsig#
+
+*/
+
+/******************************************************************************\
+ *                                                                            *
+ * http://www.w3.org/2000/09/xmldsig#                                         *
+ *                                                                            *
+\******************************************************************************/
+
+
+/******************************************************************************\
+ *                                                                            *
+ * Import                                                                     *
+ *                                                                            *
+\******************************************************************************/
+
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Namespaces                                                          *
+ *                                                                            *
+\******************************************************************************/
+
+//gsoap ds    schema import:	http://www.w3.org/2000/09/xmldsig#
+//gsoap ds    schema elementForm:	qualified
+//gsoap ds    schema attributeForm:	unqualified
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Types                                                               *
+ *                                                                            *
+\******************************************************************************/
+
+
+
+/// Imported complexType "http://www.w3.org/2000/09/xmldsig#":SignatureType from typemap WS/WS-typemap.dat.
+typedef struct ds__SignatureType
+{	struct ds__SignedInfoType*		SignedInfo;
+	char*					SignatureValue;
+	struct ds__KeyInfoType*			KeyInfo;
+	@char*					Id;
+} ds__SignatureType;
+
+/// Imported complexType "http://www.w3.org/2000/09/xmldsig#":SignatureValueType from typemap WS/WS-typemap.dat.
+/// complexType definition intentionally left blank.
+
+/// Typedef synonym for struct ds__SignedInfoType.
+typedef struct ds__SignedInfoType ds__SignedInfoType;
+
+/// Typedef synonym for struct ds__CanonicalizationMethodType.
+typedef struct ds__CanonicalizationMethodType ds__CanonicalizationMethodType;
+
+/// Typedef synonym for struct ds__SignatureMethodType.
+typedef struct ds__SignatureMethodType ds__SignatureMethodType;
+
+/// Typedef synonym for struct ds__ReferenceType.
+typedef struct ds__ReferenceType ds__ReferenceType;
+
+/// Typedef synonym for struct ds__TransformsType.
+typedef struct ds__TransformsType ds__TransformsType;
+
+/// Imported complexType "http://www.w3.org/2000/09/xmldsig#":TransformType from typemap WS/WS-typemap.dat.
+#import "c14n.h"
+typedef struct ds__TransformType
+{	_c14n__InclusiveNamespaces*             c14n__InclusiveNamespaces;
+	_XML					__any;
+	@char*					Algorithm;
+} ds__TransformType;
+
+/// Typedef synonym for struct ds__DigestMethodType.
+typedef struct ds__DigestMethodType ds__DigestMethodType;
+
+/// Imported complexType "http://www.w3.org/2000/09/xmldsig#":KeyInfoType from typemap WS/WS-typemap.dat.
+typedef struct ds__KeyInfoType
+{	char*					KeyName;
+	struct ds__KeyValueType*		KeyValue;
+	struct ds__RetrievalMethodType*		RetrievalMethod;
+	struct ds__X509DataType*		X509Data;
+	struct _wsse__SecurityTokenReference*	wsse__SecurityTokenReference;
+	@char*					Id;
+} ds__KeyInfoType;
+
+/// Typedef synonym for struct ds__KeyValueType.
+typedef struct ds__KeyValueType ds__KeyValueType;
+
+/// Typedef synonym for struct ds__RetrievalMethodType.
+typedef struct ds__RetrievalMethodType ds__RetrievalMethodType;
+
+/// Typedef synonym for struct ds__X509DataType.
+typedef struct ds__X509DataType ds__X509DataType;
+
+/// Typedef synonym for struct ds__X509IssuerSerialType.
+typedef struct ds__X509IssuerSerialType ds__X509IssuerSerialType;
+
+/// Imported complexType "http://www.w3.org/2000/09/xmldsig#":PGPDataType from typemap WS/WS-typemap.dat.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://www.w3.org/2000/09/xmldsig#":SPKIDataType from typemap WS/WS-typemap.dat.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://www.w3.org/2000/09/xmldsig#":ObjectType from typemap WS/WS-typemap.dat.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://www.w3.org/2000/09/xmldsig#":ManifestType from typemap WS/WS-typemap.dat.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://www.w3.org/2000/09/xmldsig#":SignaturePropertiesType from typemap WS/WS-typemap.dat.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://www.w3.org/2000/09/xmldsig#":SignaturePropertyType from typemap WS/WS-typemap.dat.
+/// complexType definition intentionally left blank.
+
+/// Typedef synonym for struct ds__DSAKeyValueType.
+typedef struct ds__DSAKeyValueType ds__DSAKeyValueType;
+
+/// Typedef synonym for struct ds__RSAKeyValueType.
+typedef struct ds__RSAKeyValueType ds__RSAKeyValueType;
+
+/// Imported simpleType "http://www.w3.org/2000/09/xmldsig#":CryptoBinary from typemap WS/WS-typemap.dat.
+/// simpleType definition intentionally left blank.
+
+/// Imported simpleType "http://www.w3.org/2000/09/xmldsig#":DigestValueType from typemap WS/WS-typemap.dat.
+/// simpleType definition intentionally left blank.
+
+/// Imported simpleType "http://www.w3.org/2000/09/xmldsig#":HMACOutputLengthType from typemap WS/WS-typemap.dat.
+/// simpleType definition intentionally left blank.
+
+/// "http://www.w3.org/2000/09/xmldsig#":SignedInfoType is a complexType.
+struct ds__SignedInfoType
+{
+/// Element reference "http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethod.
+    struct ds__CanonicalizationMethodType*  CanonicalizationMethod         1;	///< Required element.
+/// Element reference "http://www.w3.org/2000/09/xmldsig#":SignatureMethod.
+    struct ds__SignatureMethodType*      SignatureMethod                1;	///< Required element.
+/// Size of the dynamic array of struct ds__ReferenceType* is 0..unbounded
+    int                                  __sizeReference               ;
+/// Pointer to array of struct ds__ReferenceType*.
+    struct ds__ReferenceType*           *Reference                      1;
+/// Attribute Id of type xs:ID.
+   @char* /*ID*/                         Id                             0;	///< Optional attribute.
+};
+
+/// "http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethodType is a complexType.
+struct ds__CanonicalizationMethodType
+{
+/// TODO: <any namespace="##any" minOccurs="0" maxOccurs="unbounded">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this element.
+/// Attribute Algorithm of type xs:anyURI.
+   @char* /*URI*/                        Algorithm                      1;	///< Required attribute.
+/// Member declared in WS/WS-typemap.dat
+   _c14n__InclusiveNamespaces*		c14n__InclusiveNamespaces;
+};
+
+/// "http://www.w3.org/2000/09/xmldsig#":SignatureMethodType is a complexType.
+struct ds__SignatureMethodType
+{
+/// Element HMACOutputLength of type "http://www.w3.org/2000/09/xmldsig#":HMACOutputLengthType.
+    int*                                 HMACOutputLength               0;	///< Optional element.
+/// TODO: <any namespace="##other" minOccurs="0" maxOccurs="unbounded">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this element.
+/// Attribute Algorithm of type xs:anyURI.
+   @char* /*URI*/                        Algorithm                      1;	///< Required attribute.
+};
+
+/// "http://www.w3.org/2000/09/xmldsig#":ReferenceType is a complexType.
+struct ds__ReferenceType
+{
+/// Element reference "http://www.w3.org/2000/09/xmldsig#":Transforms.
+    struct ds__TransformsType*           Transforms                     0;	///< Optional element.
+/// Element reference "http://www.w3.org/2000/09/xmldsig#":DigestMethod.
+    struct ds__DigestMethodType*         DigestMethod                   1;	///< Required element.
+/// Element reference "http://www.w3.org/2000/09/xmldsig#":DigestValue.
+    char* /*base64*/                     DigestValue                    1;	///< Required element.
+/// Attribute Id of type xs:ID.
+   @char* /*ID*/                         Id                             0;	///< Optional attribute.
+/// Attribute URI of type xs:anyURI.
+   @char* /*URI*/                        URI                            0;	///< Optional attribute.
+/// Attribute Type of type xs:anyURI.
+   @char* /*URI*/                        Type                           0;	///< Optional attribute.
+};
+
+/// "http://www.w3.org/2000/09/xmldsig#":TransformsType is a complexType.
+struct ds__TransformsType
+{
+/// Size of the dynamic array of ds__TransformType is 0..unbounded
+    int                                  __sizeTransform               ;
+/// Pointer to array of ds__TransformType.
+    ds__TransformType                   *Transform                      1;
+};
+
+/// "http://www.w3.org/2000/09/xmldsig#":DigestMethodType is a complexType.
+struct ds__DigestMethodType
+{
+/// TODO: <any namespace="##other" minOccurs="0" maxOccurs="unbounded">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this element.
+/// Attribute Algorithm of type xs:anyURI.
+   @char* /*URI*/                        Algorithm                      1;	///< Required attribute.
+};
+
+/// "http://www.w3.org/2000/09/xmldsig#":KeyValueType is a complexType.
+struct ds__KeyValueType
+{
+/// CHOICE OF ELEMENTS <choice>
+/// Element reference "http://www.w3.org/2000/09/xmldsig#":DSAKeyValue.
+    struct ds__DSAKeyValueType*          DSAKeyValue                    1;	///< Required element.
+/// Element reference "http://www.w3.org/2000/09/xmldsig#":RSAKeyValue.
+    struct ds__RSAKeyValueType*          RSAKeyValue                    1;	///< Required element.
+/// TODO: <any namespace="##other">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this element.
+
+//  END OF CHOICE
+};
+
+/// "http://www.w3.org/2000/09/xmldsig#":RetrievalMethodType is a complexType.
+struct ds__RetrievalMethodType
+{
+/// Element reference "http://www.w3.org/2000/09/xmldsig#":Transforms.
+    struct ds__TransformsType*           Transforms                     0;	///< Optional element.
+/// Attribute URI of type xs:anyURI.
+   @char* /*URI*/                        URI                            0;	///< Optional attribute.
+/// Attribute Type of type xs:anyURI.
+   @char* /*URI*/                        Type                           0;	///< Optional attribute.
+};
+
+/// "http://www.w3.org/2000/09/xmldsig#":X509DataType is a complexType.
+struct ds__X509DataType
+{
+/// CHOICE OF ELEMENTS <choice>
+/// Element X509IssuerSerial of type "http://www.w3.org/2000/09/xmldsig#":X509IssuerSerialType.
+    struct ds__X509IssuerSerialType*     X509IssuerSerial               1;	///< Required element.
+/// Element X509SKI of type xs:base64Binary.
+    char* /*base64*/                     X509SKI                        1;	///< Required element.
+/// Element X509SubjectName of type xs:string.
+    char*                                X509SubjectName                1;	///< Required element.
+/// Element X509Certificate of type xs:base64Binary.
+    char* /*base64*/                     X509Certificate                1;	///< Required element.
+/// Element X509CRL of type xs:base64Binary.
+    char* /*base64*/                     X509CRL                        1;	///< Required element.
+/// TODO: <any namespace="##other">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this element.
+
+//  END OF CHOICE
+};
+
+/// "http://www.w3.org/2000/09/xmldsig#":X509IssuerSerialType is a complexType.
+struct ds__X509IssuerSerialType
+{
+/// Element X509IssuerName of type xs:string.
+    char*                                X509IssuerName                 1;	///< Required element.
+/// Element X509SerialNumber of type xs:integer.
+    int                                  X509SerialNumber               1;	///< Required element.
+};
+
+/// "http://www.w3.org/2000/09/xmldsig#":DSAKeyValueType is a complexType.
+struct ds__DSAKeyValueType
+{
+/// Element G of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.
+    char* /*base64*/                     G                              0;	///< Optional element.
+/// Element Y of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.
+    char* /*base64*/                     Y                              1;	///< Required element.
+/// Element J of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.
+    char* /*base64*/                     J                              0;	///< Optional element.
+/// Element P of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.
+    char* /*base64*/                     P                              1;	///< Required element.
+/// Element Q of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.
+    char* /*base64*/                     Q                              1;	///< Required element.
+/// Element Seed of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.
+    char* /*base64*/                     Seed                           1;	///< Required element.
+/// Element PgenCounter of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.
+    char* /*base64*/                     PgenCounter                    1;	///< Required element.
+};
+
+/// "http://www.w3.org/2000/09/xmldsig#":RSAKeyValueType is a complexType.
+struct ds__RSAKeyValueType
+{
+/// Element Modulus of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.
+    char* /*base64*/                     Modulus                        1;	///< Required element.
+/// Element Exponent of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.
+    char* /*base64*/                     Exponent                       1;	///< Required element.
+};
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":Signature of complexType "http://www.w3.org/2000/09/xmldsig#":SignatureType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":SignatureValue of complexType "http://www.w3.org/2000/09/xmldsig#":SignatureValueType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":SignedInfo of complexType "http://www.w3.org/2000/09/xmldsig#":SignedInfoType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethod of complexType "http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethodType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":SignatureMethod of complexType "http://www.w3.org/2000/09/xmldsig#":SignatureMethodType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":Reference of complexType "http://www.w3.org/2000/09/xmldsig#":ReferenceType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":Transforms of complexType "http://www.w3.org/2000/09/xmldsig#":TransformsType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":Transform of complexType "http://www.w3.org/2000/09/xmldsig#":TransformType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":DigestMethod of complexType "http://www.w3.org/2000/09/xmldsig#":DigestMethodType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":DigestValue of complexType "http://www.w3.org/2000/09/xmldsig#":DigestValueType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":KeyInfo of complexType "http://www.w3.org/2000/09/xmldsig#":KeyInfoType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":KeyName of complexType xs:string.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":MgmtData of complexType xs:string.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":KeyValue of complexType "http://www.w3.org/2000/09/xmldsig#":KeyValueType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":RetrievalMethod of complexType "http://www.w3.org/2000/09/xmldsig#":RetrievalMethodType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":X509Data of complexType "http://www.w3.org/2000/09/xmldsig#":X509DataType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":PGPData of complexType "http://www.w3.org/2000/09/xmldsig#":PGPDataType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":SPKIData of complexType "http://www.w3.org/2000/09/xmldsig#":SPKIDataType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":Object of complexType "http://www.w3.org/2000/09/xmldsig#":ObjectType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":Manifest of complexType "http://www.w3.org/2000/09/xmldsig#":ManifestType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":SignatureProperties of complexType "http://www.w3.org/2000/09/xmldsig#":SignaturePropertiesType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":SignatureProperty of complexType "http://www.w3.org/2000/09/xmldsig#":SignaturePropertyType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":DSAKeyValue of complexType "http://www.w3.org/2000/09/xmldsig#":DSAKeyValueType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":RSAKeyValue of complexType "http://www.w3.org/2000/09/xmldsig#":RSAKeyValueType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/* End of ds.h */
diff --git a/import/ds2.h b/import/ds2.h
new file mode 100644
index 0000000..36f7110
--- /dev/null
+++ b/import/ds2.h
@@ -0,0 +1,373 @@
+/*
+
+ds.h
+
+Generated with:
+wsdl2h -cuxy -o ds.h -t WS/WS-typemap.dat WS/ds.xsd
+
+- Removed //gsoapopt
+- Added //gsoap ds    schema import: http://www.w3.org/2000/09/xmldsig#
+
+*/
+
+/******************************************************************************\
+ *                                                                            *
+ * http://www.w3.org/2000/09/xmldsig#                                         *
+ *                                                                            *
+\******************************************************************************/
+
+
+/******************************************************************************\
+ *                                                                            *
+ * Import                                                                     *
+ *                                                                            *
+\******************************************************************************/
+
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Namespaces                                                          *
+ *                                                                            *
+\******************************************************************************/
+
+//gsoap ds    schema import:	http://www.w3.org/2000/09/xmldsig#
+//gsoap ds    schema elementForm:	qualified
+//gsoap ds    schema attributeForm:	unqualified
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Types                                                               *
+ *                                                                            *
+\******************************************************************************/
+
+
+
+/// Imported complexType "http://www.w3.org/2000/09/xmldsig#":SignatureType from typemap WS/WS-typemap.dat.
+typedef struct ds__SignatureType
+{	struct ds__SignedInfoType*		SignedInfo;
+	char*					SignatureValue;
+	struct ds__KeyInfoType*			KeyInfo;
+	@char*					Id;
+} ds__SignatureType;
+
+/// Imported complexType "http://www.w3.org/2000/09/xmldsig#":SignatureValueType from typemap WS/WS-typemap.dat.
+/// complexType definition intentionally left blank.
+
+/// Typedef synonym for struct ds__SignedInfoType.
+typedef struct ds__SignedInfoType ds__SignedInfoType;
+
+/// Typedef synonym for struct ds__CanonicalizationMethodType.
+typedef struct ds__CanonicalizationMethodType ds__CanonicalizationMethodType;
+
+/// Typedef synonym for struct ds__SignatureMethodType.
+typedef struct ds__SignatureMethodType ds__SignatureMethodType;
+
+/// Typedef synonym for struct ds__ReferenceType.
+typedef struct ds__ReferenceType ds__ReferenceType;
+
+/// Typedef synonym for struct ds__TransformsType.
+typedef struct ds__TransformsType ds__TransformsType;
+
+/// Imported complexType "http://www.w3.org/2000/09/xmldsig#":TransformType from typemap WS/WS-typemap.dat.
+#import "c14n.h"
+typedef struct ds__TransformType
+{	_c14n__InclusiveNamespaces*             c14n__InclusiveNamespaces;
+	_XML					__any;
+	@char*					Algorithm;
+} ds__TransformType;
+
+/// Typedef synonym for struct ds__DigestMethodType.
+typedef struct ds__DigestMethodType ds__DigestMethodType;
+
+/// Imported complexType "http://www.w3.org/2000/09/xmldsig#":KeyInfoType from typemap WS/WS-typemap.dat.
+typedef struct ds__KeyInfoType
+{	char*					KeyName;
+	struct ds__KeyValueType*		KeyValue;
+	struct ds__RetrievalMethodType*		RetrievalMethod;
+	struct ds__X509DataType*		X509Data;
+	struct _wsse2__SecurityTokenReference*	wsse2__SecurityTokenReference;
+	@char*					Id;
+} ds__KeyInfoType;
+
+/// Typedef synonym for struct ds__KeyValueType.
+typedef struct ds__KeyValueType ds__KeyValueType;
+
+/// Typedef synonym for struct ds__RetrievalMethodType.
+typedef struct ds__RetrievalMethodType ds__RetrievalMethodType;
+
+/// Typedef synonym for struct ds__X509DataType.
+typedef struct ds__X509DataType ds__X509DataType;
+
+/// Typedef synonym for struct ds__X509IssuerSerialType.
+typedef struct ds__X509IssuerSerialType ds__X509IssuerSerialType;
+
+/// Imported complexType "http://www.w3.org/2000/09/xmldsig#":PGPDataType from typemap WS/WS-typemap.dat.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://www.w3.org/2000/09/xmldsig#":SPKIDataType from typemap WS/WS-typemap.dat.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://www.w3.org/2000/09/xmldsig#":ObjectType from typemap WS/WS-typemap.dat.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://www.w3.org/2000/09/xmldsig#":ManifestType from typemap WS/WS-typemap.dat.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://www.w3.org/2000/09/xmldsig#":SignaturePropertiesType from typemap WS/WS-typemap.dat.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://www.w3.org/2000/09/xmldsig#":SignaturePropertyType from typemap WS/WS-typemap.dat.
+/// complexType definition intentionally left blank.
+
+/// Typedef synonym for struct ds__DSAKeyValueType.
+typedef struct ds__DSAKeyValueType ds__DSAKeyValueType;
+
+/// Typedef synonym for struct ds__RSAKeyValueType.
+typedef struct ds__RSAKeyValueType ds__RSAKeyValueType;
+
+/// Imported simpleType "http://www.w3.org/2000/09/xmldsig#":CryptoBinary from typemap WS/WS-typemap.dat.
+/// simpleType definition intentionally left blank.
+
+/// Imported simpleType "http://www.w3.org/2000/09/xmldsig#":DigestValueType from typemap WS/WS-typemap.dat.
+/// simpleType definition intentionally left blank.
+
+/// Imported simpleType "http://www.w3.org/2000/09/xmldsig#":HMACOutputLengthType from typemap WS/WS-typemap.dat.
+/// simpleType definition intentionally left blank.
+
+/// "http://www.w3.org/2000/09/xmldsig#":SignedInfoType is a complexType.
+struct ds__SignedInfoType
+{
+/// Element reference "http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethod.
+    struct ds__CanonicalizationMethodType*  CanonicalizationMethod         1;	///< Required element.
+/// Element reference "http://www.w3.org/2000/09/xmldsig#":SignatureMethod.
+    struct ds__SignatureMethodType*      SignatureMethod                1;	///< Required element.
+/// Size of the dynamic array of struct ds__ReferenceType* is 0..unbounded
+    int                                  __sizeReference               ;
+/// Pointer to array of struct ds__ReferenceType*.
+    struct ds__ReferenceType*           *Reference                      1;
+/// Attribute Id of type xs:ID.
+   @char* /*ID*/                         Id                             0;	///< Optional attribute.
+};
+
+/// "http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethodType is a complexType.
+struct ds__CanonicalizationMethodType
+{
+/// TODO: <any namespace="##any" minOccurs="0" maxOccurs="unbounded">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this element.
+/// Attribute Algorithm of type xs:anyURI.
+   @char* /*URI*/                        Algorithm                      1;	///< Required attribute.
+/// Member declared in WS/WS-typemap.dat
+   _c14n__InclusiveNamespaces*		c14n__InclusiveNamespaces;
+};
+
+/// "http://www.w3.org/2000/09/xmldsig#":SignatureMethodType is a complexType.
+struct ds__SignatureMethodType
+{
+/// Element HMACOutputLength of type "http://www.w3.org/2000/09/xmldsig#":HMACOutputLengthType.
+    int*                                 HMACOutputLength               0;	///< Optional element.
+/// TODO: <any namespace="##other" minOccurs="0" maxOccurs="unbounded">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this element.
+/// Attribute Algorithm of type xs:anyURI.
+   @char* /*URI*/                        Algorithm                      1;	///< Required attribute.
+};
+
+/// "http://www.w3.org/2000/09/xmldsig#":ReferenceType is a complexType.
+struct ds__ReferenceType
+{
+/// Element reference "http://www.w3.org/2000/09/xmldsig#":Transforms.
+    struct ds__TransformsType*           Transforms                     0;	///< Optional element.
+/// Element reference "http://www.w3.org/2000/09/xmldsig#":DigestMethod.
+    struct ds__DigestMethodType*         DigestMethod                   1;	///< Required element.
+/// Element reference "http://www.w3.org/2000/09/xmldsig#":DigestValue.
+    char* /*base64*/                     DigestValue                    1;	///< Required element.
+/// Attribute Id of type xs:ID.
+   @char* /*ID*/                         Id                             0;	///< Optional attribute.
+/// Attribute URI of type xs:anyURI.
+   @char* /*URI*/                        URI                            0;	///< Optional attribute.
+/// Attribute Type of type xs:anyURI.
+   @char* /*URI*/                        Type                           0;	///< Optional attribute.
+};
+
+/// "http://www.w3.org/2000/09/xmldsig#":TransformsType is a complexType.
+struct ds__TransformsType
+{
+/// Size of the dynamic array of ds__TransformType is 0..unbounded
+    int                                  __sizeTransform               ;
+/// Pointer to array of ds__TransformType.
+    ds__TransformType                   *Transform                      1;
+};
+
+/// "http://www.w3.org/2000/09/xmldsig#":DigestMethodType is a complexType.
+struct ds__DigestMethodType
+{
+/// TODO: <any namespace="##other" minOccurs="0" maxOccurs="unbounded">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this element.
+/// Attribute Algorithm of type xs:anyURI.
+   @char* /*URI*/                        Algorithm                      1;	///< Required attribute.
+};
+
+/// "http://www.w3.org/2000/09/xmldsig#":KeyValueType is a complexType.
+struct ds__KeyValueType
+{
+/// CHOICE OF ELEMENTS <choice>
+/// Element reference "http://www.w3.org/2000/09/xmldsig#":DSAKeyValue.
+    struct ds__DSAKeyValueType*          DSAKeyValue                    1;	///< Required element.
+/// Element reference "http://www.w3.org/2000/09/xmldsig#":RSAKeyValue.
+    struct ds__RSAKeyValueType*          RSAKeyValue                    1;	///< Required element.
+/// TODO: <any namespace="##other">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this element.
+
+//  END OF CHOICE
+};
+
+/// "http://www.w3.org/2000/09/xmldsig#":RetrievalMethodType is a complexType.
+struct ds__RetrievalMethodType
+{
+/// Element reference "http://www.w3.org/2000/09/xmldsig#":Transforms.
+    struct ds__TransformsType*           Transforms                     0;	///< Optional element.
+/// Attribute URI of type xs:anyURI.
+   @char* /*URI*/                        URI                            0;	///< Optional attribute.
+/// Attribute Type of type xs:anyURI.
+   @char* /*URI*/                        Type                           0;	///< Optional attribute.
+};
+
+/// "http://www.w3.org/2000/09/xmldsig#":X509DataType is a complexType.
+struct ds__X509DataType
+{
+/// CHOICE OF ELEMENTS <choice>
+/// Element X509IssuerSerial of type "http://www.w3.org/2000/09/xmldsig#":X509IssuerSerialType.
+    struct ds__X509IssuerSerialType*     X509IssuerSerial               1;	///< Required element.
+/// Element X509SKI of type xs:base64Binary.
+    char* /*base64*/                     X509SKI                        1;	///< Required element.
+/// Element X509SubjectName of type xs:string.
+    char*                                X509SubjectName                1;	///< Required element.
+/// Element X509Certificate of type xs:base64Binary.
+    char* /*base64*/                     X509Certificate                1;	///< Required element.
+/// Element X509CRL of type xs:base64Binary.
+    char* /*base64*/                     X509CRL                        1;	///< Required element.
+/// TODO: <any namespace="##other">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this element.
+
+//  END OF CHOICE
+};
+
+/// "http://www.w3.org/2000/09/xmldsig#":X509IssuerSerialType is a complexType.
+struct ds__X509IssuerSerialType
+{
+/// Element X509IssuerName of type xs:string.
+    char*                                X509IssuerName                 1;	///< Required element.
+/// Element X509SerialNumber of type xs:integer.
+    int                                  X509SerialNumber               1;	///< Required element.
+};
+
+/// "http://www.w3.org/2000/09/xmldsig#":DSAKeyValueType is a complexType.
+struct ds__DSAKeyValueType
+{
+/// Element G of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.
+    char* /*base64*/                     G                              0;	///< Optional element.
+/// Element Y of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.
+    char* /*base64*/                     Y                              1;	///< Required element.
+/// Element J of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.
+    char* /*base64*/                     J                              0;	///< Optional element.
+/// Element P of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.
+    char* /*base64*/                     P                              1;	///< Required element.
+/// Element Q of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.
+    char* /*base64*/                     Q                              1;	///< Required element.
+/// Element Seed of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.
+    char* /*base64*/                     Seed                           1;	///< Required element.
+/// Element PgenCounter of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.
+    char* /*base64*/                     PgenCounter                    1;	///< Required element.
+};
+
+/// "http://www.w3.org/2000/09/xmldsig#":RSAKeyValueType is a complexType.
+struct ds__RSAKeyValueType
+{
+/// Element Modulus of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.
+    char* /*base64*/                     Modulus                        1;	///< Required element.
+/// Element Exponent of type "http://www.w3.org/2000/09/xmldsig#":CryptoBinary.
+    char* /*base64*/                     Exponent                       1;	///< Required element.
+};
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":Signature of complexType "http://www.w3.org/2000/09/xmldsig#":SignatureType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":SignatureValue of complexType "http://www.w3.org/2000/09/xmldsig#":SignatureValueType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":SignedInfo of complexType "http://www.w3.org/2000/09/xmldsig#":SignedInfoType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethod of complexType "http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethodType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":SignatureMethod of complexType "http://www.w3.org/2000/09/xmldsig#":SignatureMethodType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":Reference of complexType "http://www.w3.org/2000/09/xmldsig#":ReferenceType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":Transforms of complexType "http://www.w3.org/2000/09/xmldsig#":TransformsType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":Transform of complexType "http://www.w3.org/2000/09/xmldsig#":TransformType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":DigestMethod of complexType "http://www.w3.org/2000/09/xmldsig#":DigestMethodType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":DigestValue of complexType "http://www.w3.org/2000/09/xmldsig#":DigestValueType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":KeyInfo of complexType "http://www.w3.org/2000/09/xmldsig#":KeyInfoType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":KeyName of complexType xs:string.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":MgmtData of complexType xs:string.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":KeyValue of complexType "http://www.w3.org/2000/09/xmldsig#":KeyValueType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":RetrievalMethod of complexType "http://www.w3.org/2000/09/xmldsig#":RetrievalMethodType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":X509Data of complexType "http://www.w3.org/2000/09/xmldsig#":X509DataType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":PGPData of complexType "http://www.w3.org/2000/09/xmldsig#":PGPDataType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":SPKIData of complexType "http://www.w3.org/2000/09/xmldsig#":SPKIDataType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":Object of complexType "http://www.w3.org/2000/09/xmldsig#":ObjectType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":Manifest of complexType "http://www.w3.org/2000/09/xmldsig#":ManifestType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":SignatureProperties of complexType "http://www.w3.org/2000/09/xmldsig#":SignaturePropertiesType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":SignatureProperty of complexType "http://www.w3.org/2000/09/xmldsig#":SignaturePropertyType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":DSAKeyValue of complexType "http://www.w3.org/2000/09/xmldsig#":DSAKeyValueType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/// Element "http://www.w3.org/2000/09/xmldsig#":RSAKeyValue of complexType "http://www.w3.org/2000/09/xmldsig#":RSAKeyValueType.
+/// Note: use wsdl2h option -g to generate this global element declaration.
+
+/* End of ds.h */
diff --git a/import/soap12.h b/import/soap12.h
new file mode 100644
index 0000000..cb1c97f
--- /dev/null
+++ b/import/soap12.h
@@ -0,0 +1,51 @@
+/*
+
+soap12.h
+
+Use #import "soap12.h" in a gSOAP header file to enable SOAP 1.2 bindings.
+Alternatively, use soapcpp2 option -2
+
+Use soapcpp2 option -Ipath:path:... to specify the path(s) for #import
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+//gsoap SOAP-ENV schema namespace: http://www.w3.org/2003/05/soap-envelope
+//gsoap SOAP-ENC schema namespace: http://www.w3.org/2003/05/soap-encoding
diff --git a/import/stl.h b/import/stl.h
new file mode 100644
index 0000000..f3b6143
--- /dev/null
+++ b/import/stl.h
@@ -0,0 +1,53 @@
+/*
+
+stl.h
+
+Use #import "stl.h" in a gSOAP header file to enable STL vectors, deques, lists,
+and sets.
+
+Use soapcpp2 option -Ipath:path:... to specify the path(s) for #import
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#import "stldeque.h"
+#import "stllist.h"
+#import "stlvector.h"
+#import "stlset.h"
diff --git a/import/stldeque.h b/import/stldeque.h
new file mode 100644
index 0000000..d1f2903
--- /dev/null
+++ b/import/stldeque.h
@@ -0,0 +1,50 @@
+/*
+
+stldeque.h
+
+Use #import "stldeque.h" in a gSOAP header file to enable STL deques.
+
+Use soapcpp2 option -Ipath:path:... to specify the path(s) for #import
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include <deque>
+template <class T> class std::deque;
diff --git a/import/stllist.h b/import/stllist.h
new file mode 100644
index 0000000..0174ede
--- /dev/null
+++ b/import/stllist.h
@@ -0,0 +1,50 @@
+/*
+
+stllist.h
+
+Use #import "stllist.h" in a gSOAP header file to enable STL lists.
+
+Use soapcpp2 option -Ipath:path:... to specify the path(s) for #import
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include <list>
+template <class T> class std::list;
diff --git a/import/stlset.h b/import/stlset.h
new file mode 100644
index 0000000..bdfce53
--- /dev/null
+++ b/import/stlset.h
@@ -0,0 +1,50 @@
+/*
+
+stlset.h
+
+Use #import "stlset.h" in a gSOAP header file to enable STL sets.
+
+Use soapcpp2 option -Ipath:path:... to specify the path(s) for #import
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include <set>
+template <class T> class std::set;
diff --git a/import/stlvector.h b/import/stlvector.h
new file mode 100644
index 0000000..e03f018
--- /dev/null
+++ b/import/stlvector.h
@@ -0,0 +1,50 @@
+/*
+
+stlvector.h
+
+Use #import "stlvector.h" in a gSOAP header file to enable STL vectors.
+
+Use soapcpp2 option -Ipath:path:... to specify the path(s) for #import
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include <vector>
+template <class T> class std::vector;
diff --git a/import/wsa.h b/import/wsa.h
new file mode 100644
index 0000000..13f7e30
--- /dev/null
+++ b/import/wsa.h
@@ -0,0 +1,246 @@
+/*
+
+wsa.h
+
+Generated with:
+wsdl2h -cgy -o wsa.h -t WS/WS-typemap.dat WS/WS-Addressing.xsd
+
+Modified by Robert van Engelen:
+
+- Removed //gsoapopt
+- Added the following directive to import WS-Addressing namespace:
+  //gsoap wsa schema import: http://schemas.xmlsoap.org/ws/2004/08/addressing
+  This ensures that the WS-Addressing schemas are not copied into the generated
+  WSDL by soapcpp2 but are referenced with schema import in the generated WSDL.
+
+Usage:
+
+// header file for soapcpp2
+#import "wsa.h"
+struct SOAP_ENV__Header
+{
+  mustUnderstand _wsa__MessageID  wsa__MessageID 0;
+  mustUnderstand _wsa__RelatesTo *wsa__RelatesTo 0;
+  mustUnderstand _wsa__From      *wsa__From      0;
+  mustUnderstand _wsa__ReplyTo   *wsa__ReplyTo   0;
+  mustUnderstand _wsa__FaultTo   *wsa__FaultTo   0;
+  mustUnderstand _wsa__To         wsa__To        0;
+  mustUnderstand _wsa__Action     wsa__Action    0;
+};
+
+// client-side source code
+{ struct soap soap;
+  struct SOAP_ENV__Header header;
+  _wsa__ReplyTo replyTo;
+  soap_init(&soap);
+  soap_default_SOAP_ENV__Header(&soap, &header);
+  soap.header = &header;
+  soap_default_wsa__EndpointReferenceType(&soap, &replyTo);
+  replyTo.Address = "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anony
+mous";
+  header.wsa__MessageID = "...";
+  header.wsa__To = "...";
+  header.wsa__Action = "...";
+  header.wsa__ReplyTo = &replyTo;
+  if (soap_call_ns__method(&soap, ...) != SOAP_OK)
+
+// server-side source code
+int soap_ns__method(struct soap *soap, ...)
+{ if (!soap->header)
+    return soap_sender_fault(soap, "No SOAP header, must send one", NULL);
+  if (!soap->header->wsa__MessageID)
+    return soap_sender_fault(soap, "No WS-Addressing MessageID", NULL);
+  soap->header->wsa__RelatesTo = (struct wsa__Relationship*)soap_malloc(soap, sizeof(struct wsa__Relationship));
+  soap_default_wsa__Relationship(soap, soap->header->wsa__RelatesTo);
+  soap->header->wsa__RelatesTo->__item = soap->header->wsa__MessageID;
+  if (!soap->header->wsa__ReplyTo || !soap->header->wsa__ReplyTo->Address)
+    return soap_sender_fault(soap, "No WS-Addressing ReplyTo address", NULL);
+  soap->header->wsa__To = soap->header->wsa__ReplyTo->Address;
+  soap->header->wsa__MessageID = "...";
+  soap->header->wsa__Action = "...";
+  ...
+
+*/
+
+/******************************************************************************\
+ *                                                                            *
+ * http://schemas.xmlsoap.org/ws/2004/08/addressing                           *
+ *                                                                            *
+\******************************************************************************/
+
+
+/******************************************************************************\
+ *                                                                            *
+ * Import                                                                     *
+ *                                                                            *
+\******************************************************************************/
+
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Namespaces                                                          *
+ *                                                                            *
+\******************************************************************************/
+
+//gsoap wsa   schema import:	http://schemas.xmlsoap.org/ws/2004/08/addressing
+//gsoap wsa   schema elementForm:	qualified
+//gsoap wsa   schema attributeForm:	unqualified
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Types                                                               *
+ *                                                                            *
+\******************************************************************************/
+
+
+
+/// Typedef synonym for struct wsa__EndpointReferenceType.
+typedef struct wsa__EndpointReferenceType wsa__EndpointReferenceType;
+
+/// Typedef synonym for struct wsa__ReferencePropertiesType.
+typedef struct wsa__ReferencePropertiesType wsa__ReferencePropertiesType;
+
+/// Typedef synonym for struct wsa__ReferenceParametersType.
+typedef struct wsa__ReferenceParametersType wsa__ReferenceParametersType;
+
+/// Typedef synonym for struct wsa__ServiceNameType.
+typedef struct wsa__ServiceNameType wsa__ServiceNameType;
+
+/// Typedef synonym for struct wsa__Relationship.
+typedef struct wsa__Relationship wsa__Relationship;
+
+/// Imported complexType "http://schemas.xmlsoap.org/ws/2004/08/addressing":ReplyAfterType from typemap WS/WS-typemap.dat.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://schemas.xmlsoap.org/ws/2004/08/addressing":AttributedQName from typemap WS/WS-typemap.dat.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://schemas.xmlsoap.org/ws/2004/08/addressing":AttributedURI from typemap WS/WS-typemap.dat.
+/// complexType definition intentionally left blank.
+
+/// "http://schemas.xmlsoap.org/ws/2004/08/addressing":RelationshipTypeValues is a simpleType restriction of xs:QName.
+/// Note: enum values are prefixed with 'wsa__RelationshipTypeValues' to avoid name clashes, please use wsdl2h option -e to omit this prefix
+enum wsa__RelationshipTypeValues
+{
+	wsa__RelationshipTypeValues__wsa__Reply,	///< xs:QName value=""http://schemas.xmlsoap.org/ws/2004/08/addressing":Reply"
+};
+/// Typedef synonym for enum wsa__RelationshipTypeValues.
+typedef enum wsa__RelationshipTypeValues wsa__RelationshipTypeValues;
+
+/// "http://schemas.xmlsoap.org/ws/2004/08/addressing":FaultSubcodeValues is a simpleType restriction of xs:QName.
+/// Note: enum values are prefixed with 'wsa__FaultSubcodeValues' to avoid name clashes, please use wsdl2h option -e to omit this prefix
+enum wsa__FaultSubcodeValues
+{
+	wsa__FaultSubcodeValues__wsa__InvalidMessageInformationHeader,	///< xs:QName value=""http://schemas.xmlsoap.org/ws/2004/08/addressing":InvalidMessageInformationHeader"
+	wsa__FaultSubcodeValues__wsa__MessageInformationHeaderRequired,	///< xs:QName value=""http://schemas.xmlsoap.org/ws/2004/08/addressing":MessageInformationHeaderRequired"
+	wsa__FaultSubcodeValues__wsa__DestinationUnreachable,	///< xs:QName value=""http://schemas.xmlsoap.org/ws/2004/08/addressing":DestinationUnreachable"
+	wsa__FaultSubcodeValues__wsa__ActionNotSupported,	///< xs:QName value=""http://schemas.xmlsoap.org/ws/2004/08/addressing":ActionNotSupported"
+	wsa__FaultSubcodeValues__wsa__EndpointUnavailable,	///< xs:QName value=""http://schemas.xmlsoap.org/ws/2004/08/addressing":EndpointUnavailable"
+};
+/// Typedef synonym for enum wsa__FaultSubcodeValues.
+typedef enum wsa__FaultSubcodeValues wsa__FaultSubcodeValues;
+
+/// "http://schemas.xmlsoap.org/ws/2004/08/addressing":EndpointReferenceType is a complexType.
+struct wsa__EndpointReferenceType
+{
+/// Element Address of type "http://schemas.xmlsoap.org/ws/2004/08/addressing":AttributedURI.
+    char*                                Address                        1;	///< Required element.
+/// Element ReferenceProperties of type "http://schemas.xmlsoap.org/ws/2004/08/addressing":ReferencePropertiesType.
+    struct wsa__ReferencePropertiesType*  ReferenceProperties            0;	///< Optional element.
+/// Element ReferenceParameters of type "http://schemas.xmlsoap.org/ws/2004/08/addressing":ReferenceParametersType.
+    struct wsa__ReferenceParametersType*  ReferenceParameters            0;	///< Optional element.
+/// Element PortType of type "http://schemas.xmlsoap.org/ws/2004/08/addressing":AttributedQName.
+    _QName*                              PortType                       0;	///< Optional element.
+/// Element ServiceName of type "http://schemas.xmlsoap.org/ws/2004/08/addressing":ServiceNameType.
+    struct wsa__ServiceNameType*         ServiceName                    0;	///< Optional element.
+/// TODO: <any namespace="##other" minOccurs="0" maxOccurs="unbounded">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this element.
+    _XML                                 __any                         ;	///< Catch any element content in XML string.
+/// TODO: <anyAttribute namespace="##other">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this attribute.
+   @_XML                                 __anyAttribute                ;	///< Catch any attribute content in XML string.
+};
+
+/// "http://schemas.xmlsoap.org/ws/2004/08/addressing":ReferencePropertiesType is a complexType.
+struct wsa__ReferencePropertiesType
+{
+/// TODO: <any minOccurs="0" maxOccurs="unbounded">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this element.
+    _XML                                 __any                         ;	///< Catch any element content in XML string.
+};
+
+/// "http://schemas.xmlsoap.org/ws/2004/08/addressing":ReferenceParametersType is a complexType.
+struct wsa__ReferenceParametersType
+{
+/// TODO: <any minOccurs="0" maxOccurs="unbounded">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this element.
+    _XML                                 __any                         ;	///< Catch any element content in XML string.
+};
+
+/// "http://schemas.xmlsoap.org/ws/2004/08/addressing":ServiceNameType is a complexType with simpleContent.
+struct wsa__ServiceNameType
+{
+/// __item wraps 'xs:QName' simpleContent.
+    _QName                               __item                        ;
+/// Attribute PortName of type xs:NCName.
+   @char*                                PortName                       0;	///< Optional attribute.
+/// TODO: <anyAttribute namespace="##other">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this attribute.
+   @_XML                                 __anyAttribute                ;	///< Catch any attribute content in XML string.
+};
+
+/// "http://schemas.xmlsoap.org/ws/2004/08/addressing":Relationship is a complexType with simpleContent.
+struct wsa__Relationship
+{
+/// __item wraps 'xs:anyURI' simpleContent.
+    char*                                __item                        ;
+/// Attribute RelationshipType of type xs:QName.
+   @_QName                               RelationshipType               0;	///< Optional attribute.
+/// TODO: <anyAttribute namespace="##other">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this attribute.
+   @_XML                                 __anyAttribute                ;	///< Catch any attribute content in XML string.
+};
+
+/// Element "http://schemas.xmlsoap.org/ws/2004/08/addressing":EndpointReference of complexType "http://schemas.xmlsoap.org/ws/2004/08/addressing":EndpointReferenceType.
+typedef struct wsa__EndpointReferenceType _wsa__EndpointReference;
+
+/// Element "http://schemas.xmlsoap.org/ws/2004/08/addressing":MessageID of complexType "http://schemas.xmlsoap.org/ws/2004/08/addressing":AttributedURI.
+typedef char* _wsa__MessageID;
+
+/// Element "http://schemas.xmlsoap.org/ws/2004/08/addressing":RelatesTo of complexType "http://schemas.xmlsoap.org/ws/2004/08/addressing":Relationship.
+typedef struct wsa__Relationship _wsa__RelatesTo;
+
+/// Element "http://schemas.xmlsoap.org/ws/2004/08/addressing":To of complexType "http://schemas.xmlsoap.org/ws/2004/08/addressing":AttributedURI.
+typedef char* _wsa__To;
+
+/// Element "http://schemas.xmlsoap.org/ws/2004/08/addressing":Action of complexType "http://schemas.xmlsoap.org/ws/2004/08/addressing":AttributedURI.
+typedef char* _wsa__Action;
+
+/// Element "http://schemas.xmlsoap.org/ws/2004/08/addressing":From of complexType "http://schemas.xmlsoap.org/ws/2004/08/addressing":EndpointReferenceType.
+typedef struct wsa__EndpointReferenceType _wsa__From;
+
+/// Element "http://schemas.xmlsoap.org/ws/2004/08/addressing":ReplyTo of complexType "http://schemas.xmlsoap.org/ws/2004/08/addressing":EndpointReferenceType.
+typedef struct wsa__EndpointReferenceType _wsa__ReplyTo;
+
+/// Element "http://schemas.xmlsoap.org/ws/2004/08/addressing":FaultTo of complexType "http://schemas.xmlsoap.org/ws/2004/08/addressing":EndpointReferenceType.
+typedef struct wsa__EndpointReferenceType _wsa__FaultTo;
+
+/// Element "http://schemas.xmlsoap.org/ws/2004/08/addressing":ReplyAfter of complexType "http://schemas.xmlsoap.org/ws/2004/08/addressing":ReplyAfterType.
+typedef unsigned int _wsa__ReplyAfter;
+
+/// Attribute "http://schemas.xmlsoap.org/ws/2004/08/addressing":Action of simpleType xs:anyURI.
+/// '_wsa__Action' attribute definition intentionally left blank.
+
+/* End of wsa.h */
diff --git a/import/wsa3.h b/import/wsa3.h
new file mode 100644
index 0000000..5ae97fc
--- /dev/null
+++ b/import/wsa3.h
@@ -0,0 +1,167 @@
+/*
+
+wsa3.h
+
+This is an older version of the WS-Addressing spec. See wsa.h for more details.
+
+Generated with:
+wsdl2h -cgy -o wsa3.h -t WS/WS-typemap.dat WS/WS-Addressing03.xsd
+
+Modified by Robert van Engelen:
+
+- Removed //gsoapopt
+- Added the following directive to import WS-Addressing namespace:
+  //gsoap wsa3 schema import: http://schemas.xmlsoap.org/ws/2003/03/addressing
+  This ensures that the WS-Addressing schemas are not copied into the generated
+  WSDL by soapcpp2 but are referenced with schema import in the generated WSDL.
+
+*/
+
+/******************************************************************************\
+ *                                                                            *
+ * http://schemas.xmlsoap.org/ws/2003/03/addressing                           *
+ *                                                                            *
+\******************************************************************************/
+
+
+/******************************************************************************\
+ *                                                                            *
+ * Import                                                                     *
+ *                                                                            *
+\******************************************************************************/
+
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Namespaces                                                          *
+ *                                                                            *
+\******************************************************************************/
+
+//gsoap wsa3  schema import:	http://schemas.xmlsoap.org/ws/2003/03/addressing
+//gsoap wsa3  schema elementForm:	qualified
+//gsoap wsa3  schema attributeForm:	unqualified
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Types                                                               *
+ *                                                                            *
+\******************************************************************************/
+
+
+
+/// Typedef synonym for struct wsa3__EndpointReferenceType.
+typedef struct wsa3__EndpointReferenceType wsa3__EndpointReferenceType;
+
+/// Typedef synonym for struct wsa3__ReferencePropertiesType.
+typedef struct wsa3__ReferencePropertiesType wsa3__ReferencePropertiesType;
+
+/// Typedef synonym for struct wsa3__ServiceNameType.
+typedef struct wsa3__ServiceNameType wsa3__ServiceNameType;
+
+/// Typedef synonym for struct wsa3__Relationship.
+typedef struct wsa3__Relationship wsa3__Relationship;
+
+/// Imported complexType "http://schemas.xmlsoap.org/ws/2003/03/addressing":AttributedQName from typemap WS/WS-typemap.dat.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://schemas.xmlsoap.org/ws/2003/03/addressing":AttributedURI from typemap WS/WS-typemap.dat.
+/// complexType definition intentionally left blank.
+
+/// "http://schemas.xmlsoap.org/ws/2003/03/addressing":RelationshipTypeValues is a simpleType restriction of xs:QName.
+/// Note: enum values are prefixed with 'wsa3__RelationshipTypeValues' to avoid name clashes, please use wsdl2h option -e to omit this prefix
+enum wsa3__RelationshipTypeValues
+{
+	wsa3__RelationshipTypeValues__wsa3__Response,	///< xs:QName value=""http://schemas.xmlsoap.org/ws/2003/03/addressing":Response"
+};
+/// Typedef synonym for enum wsa3__RelationshipTypeValues.
+typedef enum wsa3__RelationshipTypeValues wsa3__RelationshipTypeValues;
+
+/// "http://schemas.xmlsoap.org/ws/2003/03/addressing":EndpointReferenceType is a complexType.
+struct wsa3__EndpointReferenceType
+{
+/// Element Address of type "http://schemas.xmlsoap.org/ws/2003/03/addressing":AttributedURI.
+    char*                                Address                        1;	///< Required element.
+/// Element ReferenceProperties of type "http://schemas.xmlsoap.org/ws/2003/03/addressing":ReferencePropertiesType.
+    struct wsa3__ReferencePropertiesType*  ReferenceProperties            0;	///< Optional element.
+/// Element PortType of type "http://schemas.xmlsoap.org/ws/2003/03/addressing":AttributedQName.
+    _QName*                              PortType                       0;	///< Optional element.
+/// Element ServiceName of type "http://schemas.xmlsoap.org/ws/2003/03/addressing":ServiceNameType.
+    struct wsa3__ServiceNameType*        ServiceName                    0;	///< Optional element.
+/// TODO: <any namespace="##other" minOccurs="0" maxOccurs="unbounded">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this element.
+    _XML                                 __any                         ;	///< Catch any element content in XML string.
+/// TODO: <anyAttribute namespace="##other">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this attribute.
+   @_XML                                 __anyAttribute                ;	///< Catch any attribute content in XML string.
+};
+
+/// "http://schemas.xmlsoap.org/ws/2003/03/addressing":ReferencePropertiesType is a complexType.
+struct wsa3__ReferencePropertiesType
+{
+/// TODO: <any minOccurs="0" maxOccurs="unbounded">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this element.
+    _XML                                 __any                         ;	///< Catch any element content in XML string.
+};
+
+/// "http://schemas.xmlsoap.org/ws/2003/03/addressing":ServiceNameType is a complexType with simpleContent.
+struct wsa3__ServiceNameType
+{
+/// __item wraps 'xs:QName' simpleContent.
+    _QName                               __item                        ;
+/// Attribute PortName of type xs:NCName.
+   @char*                                PortName                       0;	///< Optional attribute.
+/// TODO: <anyAttribute namespace="##other">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this attribute.
+   @_XML                                 __anyAttribute                ;	///< Catch any attribute content in XML string.
+};
+
+/// "http://schemas.xmlsoap.org/ws/2003/03/addressing":Relationship is a complexType with simpleContent.
+struct wsa3__Relationship
+{
+/// __item wraps 'xs:anyURI' simpleContent.
+    char*                                __item                        ;
+/// Attribute RelationshipType of type xs:QName.
+   @_QName                               RelationshipType               0;	///< Optional attribute.
+/// TODO: <anyAttribute namespace="##other">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this attribute.
+   @_XML                                 __anyAttribute                ;	///< Catch any attribute content in XML string.
+};
+
+/// Element "http://schemas.xmlsoap.org/ws/2003/03/addressing":EndpointReference of complexType "http://schemas.xmlsoap.org/ws/2003/03/addressing":EndpointReferenceType.
+typedef struct wsa3__EndpointReferenceType _wsa3__EndpointReference;
+
+/// Element "http://schemas.xmlsoap.org/ws/2003/03/addressing":MessageID of complexType "http://schemas.xmlsoap.org/ws/2003/03/addressing":AttributedURI.
+typedef char* _wsa3__MessageID;
+
+/// Element "http://schemas.xmlsoap.org/ws/2003/03/addressing":RelatesTo of complexType "http://schemas.xmlsoap.org/ws/2003/03/addressing":Relationship.
+typedef struct wsa3__Relationship _wsa3__RelatesTo;
+
+/// Element "http://schemas.xmlsoap.org/ws/2003/03/addressing":To of complexType "http://schemas.xmlsoap.org/ws/2003/03/addressing":AttributedURI.
+typedef char* _wsa3__To;
+
+/// Element "http://schemas.xmlsoap.org/ws/2003/03/addressing":Action of complexType "http://schemas.xmlsoap.org/ws/2003/03/addressing":AttributedURI.
+typedef char* _wsa3__Action;
+
+/// Element "http://schemas.xmlsoap.org/ws/2003/03/addressing":From of complexType "http://schemas.xmlsoap.org/ws/2003/03/addressing":EndpointReferenceType.
+typedef struct wsa3__EndpointReferenceType _wsa3__From;
+
+/// Element "http://schemas.xmlsoap.org/ws/2003/03/addressing":ReplyTo of complexType "http://schemas.xmlsoap.org/ws/2003/03/addressing":EndpointReferenceType.
+typedef struct wsa3__EndpointReferenceType _wsa3__ReplyTo;
+
+/// Element "http://schemas.xmlsoap.org/ws/2003/03/addressing":FaultTo of complexType "http://schemas.xmlsoap.org/ws/2003/03/addressing":EndpointReferenceType.
+typedef struct wsa3__EndpointReferenceType _wsa3__FaultTo;
+
+/// Element "http://schemas.xmlsoap.org/ws/2003/03/addressing":Recipient of complexType "http://schemas.xmlsoap.org/ws/2003/03/addressing":EndpointReferenceType.
+typedef struct wsa3__EndpointReferenceType _wsa3__Recipient;
+
+/* End of wsa3.h */
diff --git a/import/wsp.h b/import/wsp.h
new file mode 100644
index 0000000..6b6ad52
--- /dev/null
+++ b/import/wsp.h
@@ -0,0 +1,182 @@
+/*
+
+wsp.h
+
+Generated with:
+wsdl2h -c -x -o wsp.h -t WS/WS-typemap.dat WS/WS-Policy.xsd
+
+Modified by Robert van Engelen:
+
+- Removed //gsoapopt
+- Removed #import "wsu.h" since only wsu__Id is needed
+- Removed wsu__Id, since this type is defined in wsse.h
+- Removed enum xsd__boolean_
+- Added //gsoap wsu schema import: http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
+- Added //gsoap wsp schema import: http://schemas.xmlsoap.org/ws/2004/09/policy
+- Added #import "wsse.h"
+- Modified wsp__union_1/_2/_3 to include wsse elements
+- Added wsse elements to wsp__union_1 and _2
+
+*/
+
+/******************************************************************************\
+ *                                                                            *
+ * http://schemas.xmlsoap.org/ws/2004/09/policy                               *
+ *                                                                            *
+\******************************************************************************/
+
+/******************************************************************************\
+ *                                                                            *
+ * Import                                                                     *
+ *                                                                            *
+\******************************************************************************/
+
+#import "wsse.h"
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Namespaces                                                          *
+ *                                                                            *
+\******************************************************************************/
+
+//gsoap wsu schema import: http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
+
+//gsoap wsp   schema import:	http://schemas.xmlsoap.org/ws/2004/09/policy
+//gsoap wsp   schema elementForm:	qualified
+//gsoap wsp   schema attributeForm:	unqualified
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Types                                                               *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Built-in type "xs:base64Binary"
+struct xsd__base64Binary_ { unsigned char *__ptr; int __size; };
+
+
+/// "http://schemas.xmlsoap.org/ws/2004/09/policy":PolicyURIs is a simpleType containing a whitespace separated list of xs:anyURI.
+typedef char* _wsp__PolicyURIs;
+
+/// Modified wsp__union_1 to add wsse elements
+union wsp__union_1
+{
+/// Element reference "http://schemas.xmlsoap.org/ws/2004/09/policy":Policy
+    struct _wsp__Policy*                 Policy                         1;	///< Required element
+/// Element reference "http://schemas.xmlsoap.org/ws/2004/09/policy":All
+    struct wsp__OperatorContentType*     All                            1;	///< Required element
+/// Element reference "http://schemas.xmlsoap.org/ws/2004/09/policy":ExactlyOne
+    struct wsp__OperatorContentType*     ExactlyOne                     1;	///< Required element
+/// Element reference "http://schemas.xmlsoap.org/ws/2004/09/policy":PolicyReference
+    struct _wsp__PolicyReference*        PolicyReference                1;	///< Required element
+
+/// Added wsse:Confidentiality element
+    struct wsse__Confidentiality*        wsse__Confidentiality          1;
+/// Added wsse:SecurityHeader element
+    struct wsse__SecurityHeader*         wsse__SecurityHeader           1;
+/// Added wsse:SecurityToken element
+    struct wsse__SecurityToken*          wsse__SecurityToken            1;
+};
+
+/// Modified __wsp__union_1 by removing duplicate __wsp__union_3
+struct __wsp__union_1
+{
+    int                                  __union_1                      0;	///< Union wsp__union_1 selector: set to SOAP_UNION_wsp__union_1_<fieldname> or 0
+    union wsp__union_1                  *union_1                       ;
+};
+
+/// "http://schemas.xmlsoap.org/ws/2004/09/policy":OperatorContentType is a complexType.
+struct wsp__OperatorContentType
+{
+    int                                  __sizeunion_1                  0;
+    struct __wsp__union_1               *__union_1                     ;
+};
+
+/// "http://schemas.xmlsoap.org/ws/2004/09/policy":PolicyReference is a complexType.
+struct _wsp__PolicyReference
+{
+/// Attribute URI of type xs:anyURI
+   @char*                                URI                            0;	///< Optional attribute
+/// Attribute Digest of type xs:base64Binary
+   @struct xsd__base64Binary_*           Digest                         0;	///< Optional attribute
+/// Attribute DigestAlgorithm of type xs:anyURI
+   @char*                                DigestAlgorithm                0;	///< Optional attribute
+/// TODO: <anyAttribute namespace="##any">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this attribute.
+};
+
+/// "http://schemas.xmlsoap.org/ws/2004/09/policy":UsingPolicy is a complexType.
+struct _wsp__UsingPolicy
+{
+/// TODO: <anyAttribute namespace="##any">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this attribute.
+};
+
+/// Modified wsp__union_2
+union wsp__union_2
+{
+/// Element reference "http://schemas.xmlsoap.org/ws/2004/09/policy":Policy
+    struct _wsp__Policy*                 Policy                         1;	///< Required element
+/// Element reference "http://schemas.xmlsoap.org/ws/2004/09/policy":PolicyReference
+    struct _wsp__PolicyReference*        PolicyReference                1;	///< Required element
+};
+
+// Modified __wsp__union_2
+struct __wsp__union_2
+{
+    int                                  __union_2                     ;	///< Union wsp__union_2 selector: set to SOAP_UNION_wsp__union_2_<fieldname>
+    union wsp__union_2                   union_2                       ;
+};
+
+/// "http://schemas.xmlsoap.org/ws/2004/09/policy":PolicyAttachment is a complexType.
+struct _wsp__PolicyAttachment
+{
+/// Element reference "http://schemas.xmlsoap.org/ws/2004/09/policy":AppliesTo
+    struct _wsp__AppliesTo*              AppliesTo                      1;	///< Required element
+/// CHOICE OF ELEMENTS <choice maxOccurs="unbounded">
+    int                                  __sizeunion_2                 ;
+    struct __wsp__union_2               *__union_2                     ;
+/// TODO: <any namespace="##other" minOccurs="0" maxOccurs="unbounded">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this element.
+/// TODO: <anyAttribute namespace="##any">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this attribute.
+};
+
+/// "http://schemas.xmlsoap.org/ws/2004/09/policy":AppliesTo is a complexType.
+struct _wsp__AppliesTo
+{
+/// TODO: <any namespace="##any" maxOccurs="unbounded">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this element.
+/// TODO: <anyAttribute namespace="##any">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this attribute.
+};
+
+/// "http://schemas.xmlsoap.org/ws/2004/09/policy":Policy is a complexType with complexContent extension of "http://schemas.xmlsoap.org/ws/2004/09/policy":OperatorContentType.
+struct _wsp__Policy
+{
+    int                                  __sizeunion_1                  0;
+    struct __wsp__union_1               *__union_1                     ;
+/// Attribute TargetNamespace of type xs:anyURI
+   @char*                                TargetNamespace                0;	///< Optional attribute
+/// Attribute reference "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd":Id
+   @wsu__Id                              wsu__Id_                       0;	///< Optional attribute
+/// TODO: <anyAttribute namespace="##any">
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this attribute.
+};
+
+/* End of wsp.h */
diff --git a/import/wsrp.h b/import/wsrp.h
new file mode 100644
index 0000000..ccc1197
--- /dev/null
+++ b/import/wsrp.h
@@ -0,0 +1,228 @@
+/*
+
+wsrp.h
+
+Generated with:
+wsdl2h -cgy -o wsrp.h -t WS/WS-typemap.dat WS/WS-Routing.xsd
+
+Modified by Robert van Engelen:
+
+- Removed //gsoapopt
+- Added the following directive to import WS-Routing namespace:
+  //gsoap wsa schema import: http://schemas.xmlsoap.org/rp/
+  This ensures that the WS-Routing schemas are not copied into the generated
+  WSDL by soapcpp2 but are referenced with schema import in the generated WSDL.
+
+*/
+
+/******************************************************************************\
+ *                                                                            *
+ * http://schemas.xmlsoap.org/rp/                                             *
+ *                                                                            *
+\******************************************************************************/
+
+
+/******************************************************************************\
+ *                                                                            *
+ * Import                                                                     *
+ *                                                                            *
+\******************************************************************************/
+
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Namespaces                                                          *
+ *                                                                            *
+\******************************************************************************/
+
+//gsoap wsrp  schema import:	http://schemas.xmlsoap.org/rp/
+//gsoap wsrp  schema form:	unqualified
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Types                                                               *
+ *                                                                            *
+\******************************************************************************/
+
+
+
+/// Typedef synonym for struct wsrp__path_USCOREt.
+typedef struct wsrp__path_USCOREt wsrp__path_USCOREt;
+
+/// Typedef synonym for struct wsrp__via_USCOREt.
+typedef struct wsrp__via_USCOREt wsrp__via_USCOREt;
+
+/// Typedef synonym for struct wsrp__fwd_USCOREt.
+typedef struct wsrp__fwd_USCOREt wsrp__fwd_USCOREt;
+
+/// Typedef synonym for struct wsrp__rev_USCOREt.
+typedef struct wsrp__rev_USCOREt wsrp__rev_USCOREt;
+
+/// Typedef synonym for struct wsrp__found_USCOREt.
+typedef struct wsrp__found_USCOREt wsrp__found_USCOREt;
+
+/// Typedef synonym for struct wsrp__fault_USCOREt.
+typedef struct wsrp__fault_USCOREt wsrp__fault_USCOREt;
+
+/// Imported simpleType "http://schemas.xmlsoap.org/rp/":action_t from typemap WS/WS-typemap.dat.
+
+
+/// Element "http://schemas.xmlsoap.org/rp/":action of simpleType "http://schemas.xmlsoap.org/rp/":action_t.
+typedef char _wsrp__action;
+
+/// Imported simpleType "http://schemas.xmlsoap.org/rp/":to_t from typemap WS/WS-typemap.dat.
+
+
+/// Element "http://schemas.xmlsoap.org/rp/":to of simpleType "http://schemas.xmlsoap.org/rp/":to_t.
+typedef char _wsrp__to;
+
+/// Imported simpleType "http://schemas.xmlsoap.org/rp/":from_t from typemap WS/WS-typemap.dat.
+
+
+/// Element "http://schemas.xmlsoap.org/rp/":from of simpleType "http://schemas.xmlsoap.org/rp/":from_t.
+typedef char _wsrp__from;
+
+/// Imported simpleType "http://schemas.xmlsoap.org/rp/":id_t from typemap WS/WS-typemap.dat.
+
+
+/// Element "http://schemas.xmlsoap.org/rp/":id of simpleType "http://schemas.xmlsoap.org/rp/":id_t.
+typedef char _wsrp__id;
+
+/// Imported simpleType "http://schemas.xmlsoap.org/rp/":relatesTo_t from typemap WS/WS-typemap.dat.
+
+
+/// Element "http://schemas.xmlsoap.org/rp/":relatesTo of simpleType "http://schemas.xmlsoap.org/rp/":relatesTo_t.
+typedef char _wsrp__relatesTo;
+
+/// Imported simpleType "http://schemas.xmlsoap.org/rp/":faultcode_t from typemap WS/WS-typemap.dat.
+
+
+/// Element "http://schemas.xmlsoap.org/rp/":faultcode of simpleType "http://schemas.xmlsoap.org/rp/":faultcode_t.
+typedef char _wsrp__faultcode;
+
+/// Imported simpleType "http://schemas.xmlsoap.org/rp/":faultreason_t from typemap WS/WS-typemap.dat.
+
+
+/// Element "http://schemas.xmlsoap.org/rp/":faultreason of simpleType "http://schemas.xmlsoap.org/rp/":faultreason_t.
+typedef char _wsrp__faultreason;
+
+/// "http://schemas.xmlsoap.org/rp/":path_t is a complexType.
+struct wsrp__path_USCOREt
+{
+/// Element reference "http://schemas.xmlsoap.org/rp/":action.
+    char*                                wsrp__action                   1;	///< Required element.
+/// Element reference "http://schemas.xmlsoap.org/rp/":to.
+    char*                                wsrp__to                       0;	///< Optional element.
+/// Element reference "http://schemas.xmlsoap.org/rp/":fwd.
+    struct wsrp__fwd_USCOREt*            wsrp__fwd                      0;	///< Optional element.
+/// Element reference "http://schemas.xmlsoap.org/rp/":rev.
+    struct wsrp__rev_USCOREt*            wsrp__rev                      0;	///< Optional element.
+/// Element reference "http://schemas.xmlsoap.org/rp/":from.
+    char*                                wsrp__from                     0;	///< Optional element.
+/// Element reference "http://schemas.xmlsoap.org/rp/":id.
+    char*                                wsrp__id                       0;	///< Optional element.
+/// Element reference "http://schemas.xmlsoap.org/rp/":relatesTo.
+    char*                                wsrp__relatesTo                0;	///< Optional element.
+/// Element reference "http://schemas.xmlsoap.org/rp/":fault.
+    struct wsrp__fault_USCOREt*          wsrp__fault                    0;	///< Optional element.
+/// TODO: <anyAttribute>
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this attribute.
+   @_XML                                 __anyAttribute                ;	///< Catch any attribute content in XML string.
+};
+
+/// Element "http://schemas.xmlsoap.org/rp/":path of complexType "http://schemas.xmlsoap.org/rp/":path_t.
+typedef struct wsrp__path_USCOREt _wsrp__path;
+
+/// "http://schemas.xmlsoap.org/rp/":fwd_t is a complexType.
+struct wsrp__fwd_USCOREt
+{
+/// Size of the dynamic array of struct wsrp__via_USCOREt* is 0..unbounded
+    int                                  __sizevia                     ;
+/// Pointer to array of struct wsrp__via_USCOREt*.
+    struct wsrp__via_USCOREt*           *wsrp__via                      0;
+/// TODO: <anyAttribute>
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this attribute.
+   @_XML                                 __anyAttribute                ;	///< Catch any attribute content in XML string.
+};
+
+/// Element "http://schemas.xmlsoap.org/rp/":fwd of complexType "http://schemas.xmlsoap.org/rp/":fwd_t.
+typedef struct wsrp__fwd_USCOREt _wsrp__fwd;
+
+/// "http://schemas.xmlsoap.org/rp/":rev_t is a complexType.
+struct wsrp__rev_USCOREt
+{
+/// Size of the dynamic array of struct wsrp__via_USCOREt* is 0..unbounded
+    int                                  __sizevia                     ;
+/// Pointer to array of struct wsrp__via_USCOREt*.
+    struct wsrp__via_USCOREt*           *wsrp__via                      0;
+/// TODO: <anyAttribute>
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this attribute.
+   @_XML                                 __anyAttribute                ;	///< Catch any attribute content in XML string.
+};
+
+/// Element "http://schemas.xmlsoap.org/rp/":rev of complexType "http://schemas.xmlsoap.org/rp/":rev_t.
+typedef struct wsrp__rev_USCOREt _wsrp__rev;
+
+/// "http://schemas.xmlsoap.org/rp/":found_t is a complexType.
+struct wsrp__found_USCOREt
+{
+/// Size of the dynamic array of char* is 0..unbounded
+    int                                  __sizeat                      ;
+/// Pointer to array of char*.
+    char*                               *at                             1;
+/// TODO: <anyAttribute>
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this attribute.
+   @_XML                                 __anyAttribute                ;	///< Catch any attribute content in XML string.
+};
+
+/// Element "http://schemas.xmlsoap.org/rp/":found of complexType "http://schemas.xmlsoap.org/rp/":found_t.
+typedef struct wsrp__found_USCOREt _wsrp__found;
+
+/// "http://schemas.xmlsoap.org/rp/":fault_t is a complexType.
+struct wsrp__fault_USCOREt
+{
+/// Element reference "http://schemas.xmlsoap.org/rp/":faultcode.
+    char*                                wsrp__faultcode                1;	///< Required element.
+/// Element reference "http://schemas.xmlsoap.org/rp/":faultreason.
+    char*                                wsrp__faultreason              1;	///< Required element.
+/// Element endpoint of type xs:anyURI.
+    char*                                endpoint                       0;	///< Optional element.
+/// Element found of type "http://schemas.xmlsoap.org/rp/":found_t.
+    struct wsrp__found_USCOREt*          found                          0;	///< Optional element.
+/// Element maxsize of type xs:integer.
+    int*                                 maxsize                        0;	///< Optional element.
+/// Element maxtime of type xs:integer.
+    int*                                 maxtime                        0;	///< Optional element.
+/// Element retryAfter of type xs:integer.
+    int*                                 retryAfter                     0;	///< Optional element.
+/// TODO: <anyAttribute>
+///       Schema extensibility is user-definable.
+///       Consult the protocol documentation to change and/or insert declarations.
+///       Use wsdl2h option -x to remove this attribute.
+   @_XML                                 __anyAttribute                ;	///< Catch any attribute content in XML string.
+};
+
+/// Element "http://schemas.xmlsoap.org/rp/":fault of complexType "http://schemas.xmlsoap.org/rp/":fault_t.
+typedef struct wsrp__fault_USCOREt _wsrp__fault;
+
+/// "http://schemas.xmlsoap.org/rp/":via_t is a complexType with simpleContent.
+struct wsrp__via_USCOREt
+{
+/// __item wraps simpleContent.
+    char*                                __item                        ;
+/// Attribute vid of type xs:anyURI.
+   @char*                                vid                            0;	///< Optional attribute.
+};
+
+/// Element "http://schemas.xmlsoap.org/rp/":via of complexType "http://schemas.xmlsoap.org/rp/":via_t.
+typedef struct wsrp__via_USCOREt _wsrp__via;
+
+/* End of wsrp.h */
diff --git a/import/wsse.h b/import/wsse.h
new file mode 100644
index 0000000..68e16c2
--- /dev/null
+++ b/import/wsse.h
@@ -0,0 +1,198 @@
+/*
+
+wsse.h
+
+Generated with:
+wsdl2h -cegxy -o wsse.h -t WS/WS-typemap.dat WS/wsse.xsd
+
+- Removed //gsoapopt
+- Added //gsoap wsse  schema import: http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
+
+*/
+
+/******************************************************************************\
+ *                                                                            *
+ * http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd*
+ *                                                                            *
+\******************************************************************************/
+
+
+/******************************************************************************\
+ *                                                                            *
+ * Import                                                                     *
+ *                                                                            *
+\******************************************************************************/
+
+#import "wsu.h"	// wsu = <http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd>
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Namespaces                                                          *
+ *                                                                            *
+\******************************************************************************/
+
+//gsoap wsse  schema import:	http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
+//gsoap wsse  schema elementForm:	qualified
+//gsoap wsse  schema attributeForm:	unqualified
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Types                                                               *
+ *                                                                            *
+\******************************************************************************/
+
+
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":AttributedString from typemap WS/WS-typemap.dat.
+/// @brief This type represents an element with arbitrary attributes.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":PasswordString from typemap WS/WS-typemap.dat.
+/// @brief This type is used for password elements per Section 4.1.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":EncodedString from typemap WS/WS-typemap.dat.
+/// @brief This type is used for elements containing stringified binary data.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":UsernameTokenType from typemap WS/WS-typemap.dat.
+/// @brief This type represents a username token per Section 4.1
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":BinarySecurityTokenType from typemap WS/WS-typemap.dat.
+/// @brief A security token that is encoded in binary
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":KeyIdentifierType from typemap WS/WS-typemap.dat.
+/// @brief A security token key identifier
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":ReferenceType from typemap WS/WS-typemap.dat.
+/// @brief This type represents a reference to an external security token.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":EmbeddedType from typemap WS/WS-typemap.dat.
+/// @brief This type represents a reference to an embedded security token.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":SecurityTokenReferenceType from typemap WS/WS-typemap.dat.
+/// @brief This type is used reference a security token.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":SecurityHeaderType from typemap WS/WS-typemap.dat.
+/// @brief This complexType defines header block to use for security-relevant data directed at a specific SOAP actor.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":TransformationParametersType from typemap WS/WS-typemap.dat.
+/// @brief This complexType defines a container for elements to be specified from any namespace as properties/parameters of a DSIG transformation.
+/// complexType definition intentionally left blank.
+
+/// Imported simpleType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":tUsage from typemap WS/WS-typemap.dat.
+/// @brief Typedef to allow a list of usages (as URIs).
+/// simpleType definition intentionally left blank.
+
+/// "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":FaultcodeEnum is a simpleType restriction of xs:QName.
+enum wsse__FaultcodeEnum
+{
+	wsse__UnsupportedSecurityToken,	///< xs:QName value=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":UnsupportedSecurityToken"
+	wsse__UnsupportedAlgorithm,	///< xs:QName value=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":UnsupportedAlgorithm"
+	wsse__InvalidSecurity,	///< xs:QName value=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":InvalidSecurity"
+	wsse__InvalidSecurityToken,	///< xs:QName value=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":InvalidSecurityToken"
+	wsse__FailedAuthentication,	///< xs:QName value=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":FailedAuthentication"
+	wsse__FailedCheck,	///< xs:QName value=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":FailedCheck"
+	wsse__SecurityTokenUnavailable,	///< xs:QName value=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":SecurityTokenUnavailable"
+};
+/// Typedef synonym for enum wsse__FaultcodeEnum.
+typedef enum wsse__FaultcodeEnum wsse__FaultcodeEnum;
+
+/// Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":UsernameToken of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":UsernameTokenType.
+/// @brief This element defines the wsse:UsernameToken element per Section 4.1.
+/// Imported element _wsse__UsernameToken from typemap WS/WS-typemap.dat.
+typedef struct _wsse__UsernameToken
+{	char*					Username;
+	struct _wsse__Password*			Password;
+	char*					Nonce;
+	char*					wsu__Created;
+	@char*					wsu__Id;
+} _wsse__UsernameToken;
+
+/// Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":BinarySecurityToken of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":BinarySecurityTokenType.
+/// @brief This element defines the wsse:BinarySecurityToken element per Section 4.2.
+/// Imported element _wsse__BinarySecurityToken from typemap WS/WS-typemap.dat.
+typedef struct _wsse__BinarySecurityToken
+{	char*					__item;
+	@char*					wsu__Id;
+	@char*					ValueType;
+	@char*					EncodingType;
+} _wsse__BinarySecurityToken;
+
+/// Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":Reference of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":ReferenceType.
+/// @brief This element defines a security token reference
+/// Imported element _wsse__Reference from typemap WS/WS-typemap.dat.
+typedef struct _wsse__Reference
+{	@char*					URI;
+	@char*					ValueType;
+} _wsse__Reference;
+
+/// Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":Embedded of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":EmbeddedType.
+/// @brief This element defines a security token embedded reference
+/// Imported element _wsse__Embedded from typemap WS/WS-typemap.dat.
+typedef struct _wsse__Embedded
+{	/* Extensible with embedded tokens and assertions */
+	@char*					wsu__Id;
+	@char*					ValueType;
+} _wsse__Embedded;
+
+/// Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":KeyIdentifier of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":KeyIdentifierType.
+/// @brief This element defines a key identifier reference
+/// Imported element _wsse__KeyIdentifier from typemap WS/WS-typemap.dat.
+typedef struct _wsse__KeyIdentifier
+{	char*					__item;
+	@char*					wsu__Id;
+	@char*					ValueType;
+	@char*					EncodingType;
+} _wsse__KeyIdentifier;
+
+/// Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":SecurityTokenReference of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":SecurityTokenReferenceType.
+/// @brief This element defines the wsse:SecurityTokenReference per Section 4.3.
+/// Imported element _wsse__SecurityTokenReference from typemap WS/WS-typemap.dat.
+typedef struct _wsse__SecurityTokenReference
+{	struct _wsse__Reference*		Reference;
+	struct _wsse__KeyIdentifier*		KeyIdentifier;
+	struct _wsse__Embedded*			Embedded;
+	@char*					wsu__Id;
+	@char*					Usage;
+} _wsse__SecurityTokenReference;
+
+/// Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":Security of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":SecurityHeaderType.
+/// @brief This element defines the wsse:Security SOAP header element per Section 4.
+/// Imported element _wsse__Security from typemap WS/WS-typemap.dat.
+#import "ds.h"
+typedef struct _wsse__Security
+{	struct _wsu__Timestamp*			wsu__Timestamp;
+	struct _wsse__UsernameToken*		UsernameToken;
+	struct _wsse__BinarySecurityToken*	BinarySecurityToken;
+	struct ds__SignatureType*		ds__Signature;
+	@char*					SOAP_ENV__actor;
+	@char*					SOAP_ENV__role;
+} _wsse__Security;
+
+/// Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":TransformationParameters of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":TransformationParametersType.
+/// @brief This element contains properties for transformations from any namespace, including DSIG.
+/// '_wsse__TransformationParameters' element definition intentionally left blank.
+
+/// Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":Password of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":PasswordString.
+/// Imported element _wsse__Password from typemap WS/WS-typemap.dat.
+typedef struct _wsse__Password
+{	char*					__item;
+	@char*					Type;
+} _wsse__Password;
+
+/// Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":Nonce of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":EncodedString.
+/// '_wsse__Nonce' element definition intentionally left blank.
+
+/// Attribute "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":Usage of simpleType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":tUsage.
+/// @brief This global attribute is used to indicate the usage of a referenced or indicated token within the containing context
+/// '_wsse__Usage' attribute definition intentionally left blank.
+
+/* End of wsse.h */
diff --git a/import/wsse2.h b/import/wsse2.h
new file mode 100644
index 0000000..50df7d2
--- /dev/null
+++ b/import/wsse2.h
@@ -0,0 +1,200 @@
+/*
+
+wsse2.h
+
+See wsse.h
+
+- Copied from wsse.h
+- Removed //gsoapopt
+- Added //gsoap wsse2  schema import: http://schemas.xmlsoap.org/ws/2002/12/secext
+- Renamed //gsoap wsse => wsse2
+- Renamed wsse__ => wsse2__
+
+*/
+
+/******************************************************************************\
+ *                                                                            *
+ * http://schemas.xmlsoap.org/ws/2002/12/secext                               *
+ *                                                                            *
+\******************************************************************************/
+
+
+/******************************************************************************\
+ *                                                                            *
+ * Import                                                                     *
+ *                                                                            *
+\******************************************************************************/
+
+#import "wsu.h"	// wsu = <http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd>
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Namespaces                                                          *
+ *                                                                            *
+\******************************************************************************/
+
+//gsoap wsse2 schema import:	http://schemas.xmlsoap.org/ws/2002/12/secext
+//gsoap wsse2 schema elementForm:	qualified
+//gsoap wsse2 schema attributeForm:	unqualified
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Types                                                               *
+ *                                                                            *
+\******************************************************************************/
+
+
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":AttributedString from typemap WS/WS-typemap.dat.
+/// @brief This type represents an element with arbitrary attributes.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":PasswordString from typemap WS/WS-typemap.dat.
+/// @brief This type is used for password elements per Section 4.1.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":EncodedString from typemap WS/WS-typemap.dat.
+/// @brief This type is used for elements containing stringified binary data.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":UsernameTokenType from typemap WS/WS-typemap.dat.
+/// @brief This type represents a username token per Section 4.1
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":BinarySecurityTokenType from typemap WS/WS-typemap.dat.
+/// @brief A security token that is encoded in binary
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":KeyIdentifierType from typemap WS/WS-typemap.dat.
+/// @brief A security token key identifier
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":ReferenceType from typemap WS/WS-typemap.dat.
+/// @brief This type represents a reference to an external security token.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":EmbeddedType from typemap WS/WS-typemap.dat.
+/// @brief This type represents a reference to an embedded security token.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":SecurityTokenReferenceType from typemap WS/WS-typemap.dat.
+/// @brief This type is used reference a security token.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":SecurityHeaderType from typemap WS/WS-typemap.dat.
+/// @brief This complexType defines header block to use for security-relevant data directed at a specific SOAP actor.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":TransformationParametersType from typemap WS/WS-typemap.dat.
+/// @brief This complexType defines a container for elements to be specified from any namespace as properties/parameters of a DSIG transformation.
+/// complexType definition intentionally left blank.
+
+/// Imported simpleType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":tUsage from typemap WS/WS-typemap.dat.
+/// @brief Typedef to allow a list of usages (as URIs).
+/// simpleType definition intentionally left blank.
+
+/// "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":FaultcodeEnum is a simpleType restriction of xs:QName.
+enum wsse2__FaultcodeEnum
+{
+	wsse2__UnsupportedSecurityToken,	///< xs:QName value=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":UnsupportedSecurityToken"
+	wsse2__UnsupportedAlgorithm,	///< xs:QName value=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":UnsupportedAlgorithm"
+	wsse2__InvalidSecurity,	///< xs:QName value=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":InvalidSecurity"
+	wsse2__InvalidSecurityToken,	///< xs:QName value=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":InvalidSecurityToken"
+	wsse2__FailedAuthentication,	///< xs:QName value=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":FailedAuthentication"
+	wsse2__FailedCheck,	///< xs:QName value=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":FailedCheck"
+	wsse2__SecurityTokenUnavailable,	///< xs:QName value=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":SecurityTokenUnavailable"
+};
+/// Typedef synonym for enum wsse2__FaultcodeEnum.
+typedef enum wsse2__FaultcodeEnum wsse2__FaultcodeEnum;
+
+/// Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":UsernameToken of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":UsernameTokenType.
+/// @brief This element defines the wsse:UsernameToken element per Section 4.1.
+/// Imported element _wsse2__UsernameToken from typemap WS/WS-typemap.dat.
+typedef struct _wsse2__UsernameToken
+{	char*					Username;
+	struct _wsse2__Password*			Password;
+	char*					Nonce;
+	char*					wsu__Created;
+	@char*					wsu__Id;
+} _wsse2__UsernameToken;
+
+/// Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":BinarySecurityToken of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":BinarySecurityTokenType.
+/// @brief This element defines the wsse:BinarySecurityToken element per Section 4.2.
+/// Imported element _wsse2__BinarySecurityToken from typemap WS/WS-typemap.dat.
+typedef struct _wsse2__BinarySecurityToken
+{	char*					__item;
+	@char*					wsu__Id;
+	@char*					ValueType;
+	@char*					EncodingType;
+} _wsse2__BinarySecurityToken;
+
+/// Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":Reference of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":ReferenceType.
+/// @brief This element defines a security token reference
+/// Imported element _wsse2__Reference from typemap WS/WS-typemap.dat.
+typedef struct _wsse2__Reference
+{	@char*					URI;
+	@char*					ValueType;
+} _wsse2__Reference;
+
+/// Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":Embedded of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":EmbeddedType.
+/// @brief This element defines a security token embedded reference
+/// Imported element _wsse2__Embedded from typemap WS/WS-typemap.dat.
+typedef struct _wsse2__Embedded
+{	/* Extensible with embedded tokens and assertions */
+	@char*					wsu__Id;
+	@char*					ValueType;
+} _wsse2__Embedded;
+
+/// Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":KeyIdentifier of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":KeyIdentifierType.
+/// @brief This element defines a key identifier reference
+/// Imported element _wsse2__KeyIdentifier from typemap WS/WS-typemap.dat.
+typedef struct _wsse2__KeyIdentifier
+{	char*					__item;
+	@char*					wsu__Id;
+	@char*					ValueType;
+	@char*					EncodingType;
+} _wsse2__KeyIdentifier;
+
+/// Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":SecurityTokenReference of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":SecurityTokenReferenceType.
+/// @brief This element defines the wsse:SecurityTokenReference per Section 4.3.
+/// Imported element _wsse2__SecurityTokenReference from typemap WS/WS-typemap.dat.
+typedef struct _wsse2__SecurityTokenReference
+{	struct _wsse2__Reference*		Reference;
+	struct _wsse2__KeyIdentifier*		KeyIdentifier;
+	struct _wsse2__Embedded*			Embedded;
+	@char*					wsu__Id;
+	@char*					Usage;
+} _wsse2__SecurityTokenReference;
+
+/// Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":Security of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":SecurityHeaderType.
+/// @brief This element defines the wsse:Security SOAP header element per Section 4.
+/// Imported element _wsse2__Security from typemap WS/WS-typemap.dat.
+#import "ds2.h"
+typedef struct _wsse2__Security
+{	struct _wsu__Timestamp*			wsu__Timestamp;
+	struct _wsse2__UsernameToken*		UsernameToken;
+	struct _wsse2__BinarySecurityToken*	BinarySecurityToken;
+	struct ds__SignatureType*		ds__Signature;
+	@char*					SOAP_ENV__actor;
+	@char*					SOAP_ENV__role;
+} _wsse2__Security;
+
+/// Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":TransformationParameters of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":TransformationParametersType.
+/// @brief This element contains properties for transformations from any namespace, including DSIG.
+/// '_wsse2__TransformationParameters' element definition intentionally left blank.
+
+/// Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":Password of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":PasswordString.
+/// Imported element _wsse2__Password from typemap WS/WS-typemap.dat.
+typedef struct _wsse2__Password
+{	char*					__item;
+	@char*					Type;
+} _wsse2__Password;
+
+/// Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":Nonce of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":EncodedString.
+/// '_wsse2__Nonce' element definition intentionally left blank.
+
+/// Attribute "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":Usage of simpleType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd":tUsage.
+/// @brief This global attribute is used to indicate the usage of a referenced or indicated token within the containing context
+/// '_wsse2__Usage' attribute definition intentionally left blank.
+
+/* End of wsse.h */
diff --git a/import/wsu.h b/import/wsu.h
new file mode 100644
index 0000000..151449c
--- /dev/null
+++ b/import/wsu.h
@@ -0,0 +1,93 @@
+/*
+
+wsu.h
+
+Generated with:
+wsdl2h -cegy -o wsu.h -t WS/WS-typemap.dat WS/wsu.xsd
+
+Modified by Robert van Engelen:
+
+- Removed //gsoapopt
+- Added the following directive to import wsu namespace
+  //gsoap wsu schema import: http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
+  This ensures that the WS-Addressing schemas are not copied into the generated
+  WSDL by soapcpp2 but are referenced with schema import in the generated WSDL.
+
+*/
+
+/******************************************************************************\
+ *                                                                            *
+ * http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd*
+ *                                                                            *
+\******************************************************************************/
+
+
+/******************************************************************************\
+ *                                                                            *
+ * Import                                                                     *
+ *                                                                            *
+\******************************************************************************/
+
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Namespaces                                                          *
+ *                                                                            *
+\******************************************************************************/
+
+//gsoap wsu   schema import:	http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
+//gsoap wsu   schema elementForm:	qualified
+//gsoap wsu   schema attributeForm:	unqualified
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Types                                                               *
+ *                                                                            *
+\******************************************************************************/
+
+
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd":AttributedDateTime from typemap WS/WS-typemap.dat.
+/// @brief This type is for elements whose [children] is a psuedo-dateTime and can have arbitrary attributes.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd":AttributedURI from typemap WS/WS-typemap.dat.
+/// @brief This type is for elements whose [children] is an anyURI and can have arbitrary attributes.
+/// complexType definition intentionally left blank.
+
+/// Imported complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd":TimestampType from typemap WS/WS-typemap.dat.
+/// @brief This complex type ties together the timestamp related elements into a composite type.
+/// complexType definition intentionally left blank.
+
+/// "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd":tTimestampFault is a simpleType restriction of xs:QName.
+/// @brief This type defines the fault code value for Timestamp message expiration.
+/// Note: enum values are prefixed with 'wsu__tTimestampFault' to avoid name clashes, please use wsdl2h option -e to omit this prefix
+enum wsu__tTimestampFault
+{
+	wsu__MessageExpired,	///< xs:QName value=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd":MessageExpired"
+};
+/// Typedef synonym for enum wsu__tTimestampFault.
+typedef enum wsu__tTimestampFault wsu__tTimestampFault;
+
+/// Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd":Timestamp of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd":TimestampType.
+/// @brief This element allows Timestamps to be applied anywhere element wildcards are present, including as a SOAP header.
+/// Imported element _wsu__Timestamp from typemap WS/WS-typemap.dat.
+typedef struct _wsu__Timestamp
+{	@char*	wsu__Id;	// use qualified form to enable signature
+	char*	Created;
+	char*	Expires;
+} _wsu__Timestamp;
+
+/// Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd":Expires of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd":AttributedDateTime.
+/// @brief This element allows an expiration time to be applied anywhere element wildcards are present.
+/// '_wsu__Expires' element definition intentionally left blank.
+
+/// Element "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd":Created of complexType "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd":AttributedDateTime.
+/// @brief This element allows a creation time to be applied anywhere element wildcards are present.
+/// '_wsu__Created' element definition intentionally left blank.
+
+/// Attribute "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd":Id of simpleType xs:ID.
+/// @brief This global attribute supports annotating arbitrary elements with an ID.
+/// '_wsu__Id' attribute definition intentionally left blank.
+
+/* End of wsu.h */
diff --git a/import/xlink.h b/import/xlink.h
new file mode 100644
index 0000000..cb9ea82
--- /dev/null
+++ b/import/xlink.h
@@ -0,0 +1,49 @@
+/*
+
+xlink.h
+
+Use #import "xlink.h" in a gSOAP header file to enable xlink 1999 bindings.
+
+Use soapcpp2 option -Ipath:path:... to specify the path(s) for #import
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+//gsoap xlink schema import: http://www.w3.org/1999/xlink
diff --git a/import/xmime.h b/import/xmime.h
new file mode 100644
index 0000000..4539b28
--- /dev/null
+++ b/import/xmime.h
@@ -0,0 +1,59 @@
+/*
+
+xmime.h
+
+Use #import "xmime.h" in a gSOAP header file to enable xmlmime 2004/06 bindings.
+
+The xmime:contentType attribute can be used to associate a MIME type with
+binary content, as in:
+
+#import "xmime.h"
+struct ns__myBinaryData
+{ unsigned char *__ptr;
+  int __size;
+  @char *xmime__contentType;
+};
+
+Use soapcpp2 option -Ipath:path:... to specify the path(s) for #import
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+//gsoap xmime schema import: http://www.w3.org/2004/06/xmlmime
diff --git a/import/xml.h b/import/xml.h
new file mode 100644
index 0000000..bbcf939
--- /dev/null
+++ b/import/xml.h
@@ -0,0 +1,65 @@
+/*
+
+xml.h
+
+Literal XML strings.
+
+A literal XML string contains XML content. This declaration provides a simple
+interface to the literal XML string handler. The XML string contains UTF8
+content when the SOAP_C_UTFSTRING flag is set.
+
+Note: the built-in _XML type provides the same functionality.
+
+Example:
+#import "xml.h"
+struct ns__MyData
+{ int num;
+  XML str; // has XML content
+};
+struct ns__Mixed
+{ int num;
+  XML __any; // __any is not a tag: this allows parsing of mixed content
+};
+
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+typedef char *XML;
diff --git a/import/xmlmime.h b/import/xmlmime.h
new file mode 100644
index 0000000..4cde010
--- /dev/null
+++ b/import/xmlmime.h
@@ -0,0 +1,60 @@
+/*
+
+xmlmime.h
+
+Use #import "xmlmime.h" in a gSOAP header file to enable xmlmime 2004/11
+bindings.
+
+The xmlmime:contentType attribute can be used to associate a MIME type with
+binary content, as in:
+
+#import "xmlmime.h"
+struct ns__myBinaryData
+{ unsigned char *__ptr;
+  int __size;
+  @char *xmlmime__contentType;
+};
+
+Use soapcpp2 option -Ipath:path:... to specify the path(s) for #import
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+//gsoap xmlmime schema import: http://www.w3.org/2004/11/xmlmime
diff --git a/import/xop.h b/import/xop.h
new file mode 100644
index 0000000..a2d3a62
--- /dev/null
+++ b/import/xop.h
@@ -0,0 +1,62 @@
+/*
+
+xop.h
+
+Use #import "xop.h" in a gSOAP header file to enable MTOM attachments.
+
+Use SOAP_ENC_MTOM flag in your code to switch to MTOM attachments, see
+the gSOAP documentation soapdoc2.html
+
+Use soapcpp2 option -Ipath:path:... to specify the path(s) for #import
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+//gsoap xop schema import: http://www.w3.org/2004/08/xop/include
+
+struct _xop__Include
+{ unsigned char *__ptr;
+  int __size;
+  char *id;
+  char *type;
+  char *options;
+};
+
+typedef struct _xop__Include _xop__Include;
diff --git a/license.html b/license.html
new file mode 100644
index 0000000..06209f9
--- /dev/null
+++ b/license.html
@@ -0,0 +1,509 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

+        "http://www.w3.org/TR/html4/loose.dtd">

+<html>

+<meta name="GENERATOR" content="TtH 3.39">

+ <style type="text/css"> div.p { margin-top: 7pt;}</style>

+ <style type="text/css"><!--

+ td div.comp { margin-top: -0.6ex; margin-bottom: -1ex;}

+ td div.comb { margin-top: -0.6ex; margin-bottom: -.6ex;}

+ td div.hrcomp { line-height: 0.9; margin-top: -0.8ex; margin-bottom: -1ex;}

+ td div.norm {line-height:normal;}

+ span.roman {font-family: serif; font-style: normal; font-weight: normal;} 

+ span.overacc2 {position: relative;  left: .8em; top: -1.2ex;}

+ span.overacc1 {position: relative;  left: .6em; top: -1.2ex;} --></style>

+

+

+<title>  gSOAP Public License</title>

+ 

+<h1 align="center"><b>gSOAP Public License</b> </h1>

+

+<h3 align="center">Version 1.3a </h3>

+

+<h3 align="center"> </h3>

+ The gSOAP public license is derived from the Mozilla Public License (MPL1.1).

+The sections that were deleted from the original MPL1.1 text are <u>1.0.1</u>,

+<u>2.1.(c),(d)</u>, <u>2.2.(c),(d)</u>, <u>8.2.(b)</u>, <u>10</u>, and <u>11</u>.  Section <u>3.8</u> was

+added.  The modified sections are <u>2.1.(b)</u>, <u>2.2.(b)</u>, <u>3.2</u> (simplified),

+<u>3.5</u> (deleted the last sentence), and <u>3.6</u> (simplified).

+

+ <h2><a name="tth_sEc1">

+1</a>&nbsp;&nbsp;DEFINITIONS.</h2>

+

+

+<dl compact="compact">

+

+ <dt><b><u>1.0.1.</u></b></dt>

+	<dd></dd>

+ <dt><b>1.1. "Contributor"</b></dt>

+	<dd>

+means each entity that creates or contributes to the creation of

+Modifications.</dd>

+ <dt><b>1.2. "Contributor Version"</b></dt>

+	<dd>

+means the combination of the Original Code, prior

+Modifications used by a Contributor, and the Modifications made by that

+particular Contributor.</dd>

+ <dt><b>1.3. "Covered Code"</b></dt>

+	<dd>

+means the Original Code, or Modifications or the combination

+of the Original Code, and Modifications, in each case

+including portions thereof.</dd>

+ <dt><b>1.4. "Electronic Distribution Mechanism"</b></dt>

+	<dd>

+means a mechanism generally accepted in the software development community for

+the electronic transfer of data.</dd>

+ <dt><b>1.5. "Executable"</b></dt>

+	<dd>

+means Covered Code in any form other than Source Code.</dd>

+ <dt><b>1.6. "Initial Developer"</b></dt>

+	<dd>

+means the individual or entity identified as the Initial Developer in the

+Source Code notice required by <b>Exhibit A</b>.</dd>

+ <dt><b>1.7. "Larger Work"</b></dt>

+	<dd>

+means a work which combines Covered Code or portions thereof with code not

+governed by the terms of this License.</dd>

+ <dt><b>1.8. "License"</b></dt>

+	<dd>

+means this document.</dd>

+ <dt><b>1.8.1. "Licensable"</b></dt>

+	<dd>

+means having the right to grant, to the maximum extent possible, whether at the

+time of the initial grant or subsequently acquired, any and all of the rights

+conveyed herein.</dd>

+ <dt><b>1.9. "Modifications"</b></dt>

+	<dd>

+means any addition to or deletion from the substance or structure of either the

+Original Code or any previous Modifications. When Covered

+Code is released as a series of files, a Modification is:

+

+<dl compact="compact">

+

+ <dt><b>A.</b></dt>

+	<dd> Any addition to or deletion from the contents of a file containing

+Original Code or previous Modifications.</dd>

+ <dt><b>B.</b></dt>

+	<dd> Any new file that contains any part of the Original Code,

+or previous Modifications.</dd>

+</dl></dd>

+ <dt><b>1.10. "Original Code"</b></dt>

+	<dd>

+means Source Code of computer software code which is described in the Source

+Code notice required by <b>Exhibit A</b> as Original Code, and which, at the

+time of its release under this License is not already Covered Code governed by

+this License.</dd>

+ <dt><b>1.10.1. "Patent Claims"</b></dt>

+	<dd>

+means any patent claim(s), now owned or hereafter acquired, including without

+limitation, method, process, and apparatus claims, in any patent Licensable by

+grantor.</dd>

+ <dt><b>1.11. "Source Code"</b></dt>

+	<dd>

+means the preferred form of the Covered Code for making modifications to it,

+including all modules it contains, plus any associated interface definition

+files, scripts used to control compilation and installation of an Executable,

+or source code differential comparisons against either the Original Code or

+another well known, available Covered Code of the Contributor's choice. The

+Source Code can be in a compressed or archival form, provided the appropriate

+decompression or de-archiving software is widely available for no charge.</dd>

+ <dt><b>1.12. "You" (or "Your")</b></dt>

+	<dd>

+means an individual or a legal entity exercising rights under, and complying

+with all of the terms of, this License or a future version of this License

+issued under Section <b>6.1</b>.  For legal entities, "You" includes any

+entity which controls, is controlled by, or is under common control with You.

+For purposes of this definition, "control" means <b>(a)</b> the power, direct or

+indirect, to cause the direction or management of such entity, whether by

+contract or otherwise, or <b>(b)</b> ownership of more than fifty percent (50%) of

+the outstanding shares or beneficial ownership of such entity.</dd>

+</dl>

+

+ <h2><a name="tth_sEc2">

+2</a>&nbsp;&nbsp;SOURCE CODE LICENSE.</h2>

+

+<dl compact="compact">

+

+ <dt><b>2.1. The Initial Developer Grant.</b></dt>

+	<dd><br />

+The Initial Developer hereby grants You a world-wide, royalty-free,

+non-exclusive license, subject to third party intellectual property claims:

+

+<dl compact="compact">

+

+ <dt><b>(a)</b></dt>

+	<dd>

+under intellectual property rights (other than patent or trademark) Licensable

+by Initial Developer to use, reproduce, modify, display, perform, sublicense

+and distribute the Original Code (or portions thereof) with or without

+Modifications, and/or as part of a Larger Work; and</dd>

+ <dt><b><u>(b)</u></b></dt>

+	<dd>

+under patents now or hereafter owned or controlled by Initial Developer, to

+make, have made, use and sell ("offer to sell and import") the Original Code,

+Modifications, or portions thereof, but solely to the extent that any such

+patent is reasonably necessary to enable You to utilize, alone or in

+combination with other software, the Original Code, Modifications, or any

+combination or portions thereof.</dd>

+ <dt><b><u>(c)</u></b></dt>

+	<dd></dd>

+ <dt><b><u>(d)</u></b></dt>

+	<dd></dd>

+</dl>

+<br />

+</dd>

+ <dt><b>2.2. Contributor Grant.</b></dt>

+	<dd><br />

+Subject to third party intellectual property claims, each Contributor hereby

+grants You a world-wide, royalty-free, non-exclusive license

+

+<dl compact="compact">

+

+ <dt><b>(a)</b></dt>

+	<dd>

+under intellectual property rights (other than patent or trademark) Licensable

+by Contributor, to use, reproduce, modify, display, perform, sublicense and

+distribute the Modifications created by such Contributor (or portions thereof)

+either on an unmodified basis, with other Modifications, as Covered Code and/or

+as part of a Larger Work; and</dd>

+ <dt><b><u>(b)</u></b></dt>

+	<dd> 

+under patents now or hereafter owned or controlled by Contributor, to make,

+have made, use and sell ("offer to sell and import") the Contributor Version

+(or portions thereof), but solely to the extent that any such patent is

+reasonably necessary to enable You to utilize, alone or in combination with

+other software, the Contributor Version (or portions thereof).</dd>

+ <dt><b><u>(c)</u></b></dt>

+	<dd></dd>

+ <dt><b><u>(d)</u></b></dt>

+	<dd></dd>

+</dl></dd>

+</dl>

+

+ <h2><a name="tth_sEc3">

+3</a>&nbsp;&nbsp;DISTRIBUTION OBLIGATIONS.</h2>

+

+<dl compact="compact">

+

+ <dt><b>3.1. Application of License.</b></dt>

+	<dd><br />

+The Modifications which You create or to which You contribute are governed by

+the terms of this License, including without limitation Section <b>2.2</b>.  The

+Source Code version of Covered Code may be distributed only under the terms of

+this License or a future version of this License released under Section <b>6.1</b>, and You must include a copy of this License with every copy of the Source

+Code You distribute. You may not offer or impose any terms on any Source Code

+version that alters or restricts the applicable version of this License or the

+recipients' rights hereunder. However, You may include an additional document

+offering the additional rights described in Section <b>3.5</b>.

+<br /><br />

+</dd>

+ <dt><b><u>3.2.</u> Availability of Source Code.</b></dt>

+	<dd><br />

+Any Modification created by You will be provided to the Initial Developer in

+Source Code form and are subject to the terms of the License.

+<br /><br />

+</dd>

+ <dt><b>3.3. Description of Modifications.</b></dt>

+	<dd><br />

+You must cause all Covered Code to which You contribute to contain a file

+documenting the changes You made to create that Covered Code and the date of

+any change. You must include a prominent statement that the Modification is

+derived, directly or indirectly, from Original Code provided by the Initial

+Developer and including the name of the Initial Developer in <b>(a)</b> the Source

+Code, and <b>(b)</b> in any notice in an Executable version or related documentation

+in which You describe the origin or ownership of the Covered Code.

+<br /><br />

+</dd>

+ <dt><b>3.4. Intellectual Property Matters.</b></dt>

+	<dd>

+

+<dl compact="compact">

+

+ <dt><b>(a) Third Party Claims.</b></dt>

+	<dd>

+If Contributor has knowledge that a license under a third party's intellectual

+property rights is required to exercise the rights granted by such Contributor

+under Sections <b>2.1</b> or <b>2.2</b>, Contributor must include a text file with the Source

+Code distribution titled "LEGAL" which describes the claim and the party

+making the claim in sufficient detail that a recipient will know whom to

+contact. If Contributor obtains such knowledge after the Modification is made

+available as described in Section <b>3.2</b>, Contributor shall promptly modify the

+LEGAL file in all copies Contributor makes available thereafter and shall take

+other steps (such as notifying appropriate mailing lists or newsgroups)

+reasonably calculated to inform those who received the Covered Code that new

+knowledge has been obtained.</dd>

+ <dt><b>(b) Contributor APIs.</b></dt>

+	<dd>

+If Contributor's Modifications include an application programming interface and

+Contributor has knowledge of patent licenses which are reasonably necessary to

+implement that API, Contributor must also include this information in the LEGAL

+file.</dd>

+ <dt><b>(c) Representations.</b></dt>

+	<dd>

+Contributor represents that, except as disclosed pursuant to Section <b>

+3.4(a)</b> above, Contributor believes that Contributor's Modifications are

+Contributor's original creation(s) and/or Contributor has sufficient rights to

+grant the rights conveyed by this License.</dd>

+</dl>

+<br />

+</dd>

+ <dt><b><u>3.5.</u> Required Notices.</b></dt>

+	<dd><br />

+You must duplicate the notice in <b>Exhibit A</b> in each file of the Source

+Code. If it is not possible to put such notice in a particular Source Code file

+due to its structure, then You must include such notice in a location (such as

+a relevant directory) where a user would be likely to look for such a notice.

+If You created one or more Modification(s) You may add your name as a

+Contributor to the notice described in <b>Exhibit A</b>. You must also duplicate

+this License in any documentation for the Source Code where You describe

+recipients' rights or ownership rights relating to Covered Code. You may choose

+to offer, and to charge a fee for, warranty, support, indemnity or liability

+obligations to one or more recipients of Covered Code. However, You may do so

+only on Your own behalf, and not on behalf of the Initial Developer or any

+Contributor.

+<br /><br />

+</dd>

+ <dt><b><u>3.6</u>. Distribution of Executable Versions.</b></dt>

+	<dd><br />

+You may distribute Covered Code in Executable form only if the requirements

+of Section <b>3.1</b>-<b>3.5</b> have been met for that Covered Code. You may distribute the

+Executable version of Covered Code or ownership rights under a license of Your

+choice, which may contain terms different from this License, provided that You

+are in compliance with the terms of this License and that the license for the

+Executable version does not attempt to limit or alter the recipient's rights in

+the Source Code version from the rights set forth in this License.  If You

+distribute the Executable version under a different license You must make it

+absolutely clear that any terms which differ from this License are offered by

+You alone, not by the Initial Developer or any Contributor.  If you

+distribute executable versions containing Covered Code as part of a product,

+you must reproduce the notice in <b>Exhibit B</b> in the documentation and/or

+other materials provided with the product.

+<br /><br />

+</dd>

+ <dt><b>3.7. Larger Works.</b></dt>

+	<dd><br />

+You may create a Larger Work by combining Covered Code with other code not

+governed by the terms of this License and distribute the Larger Work as a

+single product. In such a case, You must make sure the requirements of this

+License are fulfilled for the Covered Code.

+<br /><br />

+</dd>

+ <dt><b><u>3.8.</u> Restrictions.</b></dt>

+	<dd><br />

+You may not remove any product identification, copyright, proprietary notices or labels from gSOAP.</dd>

+</dl>

+

+ <h2><a name="tth_sEc4">

+4</a>&nbsp;&nbsp;INABILITY TO COMPLY DUE TO STATUTE OR REGULATION.</h2>

+If it is impossible for You to comply with any of the terms of this License

+with respect to some or all of the Covered Code due to statute, judicial order,

+or regulation then You must: <b>(a)</b> comply with the terms of this License to the

+maximum extent possible; and <b>(b)</b> describe the limitations and the code they

+affect. Such description must be included in the LEGAL file described in

+Section <b>3.4</b> and must be included with all distributions of the Source

+Code. Except to the extent prohibited by statute or regulation, such

+description must be sufficiently detailed for a recipient of ordinary skill to

+be able to understand it.

+

+ <h2><a name="tth_sEc5">

+5</a>&nbsp;&nbsp;APPLICATION OF THIS LICENSE.</h2>

+This License applies to code to which the Initial Developer has attached the

+notice in <b>Exhibit A</b> and to related Covered Code.

+

+ <h2><a name="tth_sEc6">

+6</a>&nbsp;&nbsp;VERSIONS OF THE LICENSE.</h2>

+

+<dl compact="compact">

+

+ <dt><b>6.1. New Versions.</b></dt>

+	<dd><br />

+Grantor may publish revised and/or new versions of the License from time to

+time. Each version will be given a distinguishing version number.

+<br /><br />

+</dd>

+ <dt><b>6.2. Effect of New Versions.</b></dt>

+	<dd><br />

+Once Covered Code has been published under a particular version of the License,

+You may always continue to use it under the terms of that version. You may also

+choose to use such Covered Code under the terms of any subsequent version of

+the License.

+<br /><br />

+</dd>

+ <dt><b>6.3. Derivative Works.</b></dt>

+	<dd><br />

+If You create or use a modified version of this License (which you may only do

+in order to apply it to code which is not already Covered Code governed by this

+License), You must <b>(a)</b> rename Your license so that the phrase "gSOAP" or

+any confusingly similar phrase do not appear in your license (except to note

+that your license differs from this License) and <b>(b)</b> otherwise make it clear

+that Your version of the license contains terms which differ from the gSOAP

+Public License. (Filling in the name of the Initial Developer, Original Code or

+Contributor in the notice described in <b>Exhibit A</b> shall not of themselves

+be deemed to be modifications of this License.)</dd>

+</dl>

+

+ <h2><a name="tth_sEc7">

+7</a>&nbsp;&nbsp;DISCLAIMER OF WARRANTY.</h2>

+COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT

+WARRANTY OF ANY KIND, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, WITHOUT

+LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A

+PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY

+RIGHTS, AND ANY WARRANTY THAT MAY ARISE BY REASON OF TRADE USAGE, CUSTOM, OR

+COURSE OF DEALING.  WITHOUT LIMITING THE FOREGOING, YOU ACKNOWLEDGE THAT THE

+SOFTWARE IS PROVIDED "AS IS" AND THAT THE AUTHORS DO NOT WARRANT THE SOFTWARE

+WILL RUN UNINTERRUPTED OR ERROR FREE.  LIMITED LIABILITY THE ENTIRE RISK AS TO

+RESULTS AND PERFORMANCE OF THE SOFTWARE IS ASSUMED BY YOU.  UNDER NO

+CIRCUMSTANCES WILL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,

+EXEMPLARY OR CONSEQUENTIAL DAMAGES OF ANY KIND OR NATURE WHATSOEVER, WHETHER

+BASED ON CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR

+OTHERWISE, ARISING OUT OF OR IN ANY WAY RELATED TO THE SOFTWARE, EVEN IF THE

+AUTHORS HAVE BEEN ADVISED ON THE POSSIBILITY OF SUCH DAMAGE OR IF SUCH DAMAGE

+COULD HAVE BEEN REASONABLY FORESEEN, AND NOTWITHSTANDING ANY FAILURE OF

+ESSENTIAL PURPOSE OF ANY EXCLUSIVE REMEDY PROVIDED.  SUCH LIMITATION ON DAMAGES

+INCLUDES, BUT IS NOT LIMITED TO, DAMAGES FOR LOSS OF GOODWILL, LOST PROFITS,

+LOSS OF DATA OR SOFTWARE, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION OR

+IMPAIRMENT OF OTHER GOODS.  IN NO EVENT WILL THE AUTHORS BE LIABLE FOR THE

+COSTS OF PROCUREMENT OF SUBSTITUTE SOFTWARE OR SERVICES.  YOU ACKNOWLEDGE THAT

+THIS SOFTWARE IS NOT DESIGNED FOR USE IN ON-LINE EQUIPMENT IN HAZARDOUS

+ENVIRONMENTS SUCH AS OPERATION OF NUCLEAR FACILITIES, AIRCRAFT NAVIGATION OR

+CONTROL, OR LIFE-CRITICAL APPLICATIONS.  THE AUTHORS EXPRESSLY DISCLAIM ANY

+LIABILITY RESULTING FROM USE OF THE SOFTWARE IN ANY SUCH ON-LINE EQUIPMENT IN

+HAZARDOUS ENVIRONMENTS AND ACCEPTS NO LIABILITY IN RESPECT OF ANY ACTIONS OR

+CLAIMS BASED ON THE USE OF THE SOFTWARE IN ANY SUCH ON-LINE EQUIPMENT IN

+HAZARDOUS ENVIRONMENTS BY YOU.  FOR PURPOSES OF THIS PARAGRAPH, THE TERM

+"LIFE-CRITICAL APPLICATION" MEANS AN APPLICATION IN WHICH THE FUNCTIONING OR

+MALFUNCTIONING OF THE SOFTWARE MAY RESULT DIRECTLY OR INDIRECTLY IN PHYSICAL

+INJURY OR LOSS OF HUMAN LIFE.  THIS DISCLAIMER OF WARRANTY CONSTITUTES AN

+ESSENTIAL PART OF THIS LICENSE.  NO USE OF ANY COVERED CODE IS AUTHORIZED

+HEREUNDER EXCEPT UNDER THIS DISCLAIMER.

+

+ <h2><a name="tth_sEc8">

+8</a>&nbsp;&nbsp;TERMINATION.</h2>

+

+<dl compact="compact">

+

+ <dt><b>8.1.</b></dt>

+	<dd>

+This License and the rights granted hereunder will terminate automatically if

+You fail to comply with terms herein and fail to cure such breach within 30

+days of becoming aware of the breach. All sublicenses to the Covered Code which

+are properly granted shall survive any termination of this License. Provisions

+which, by their nature, must remain in effect beyond the termination of this

+License shall survive.</dd>

+ <dt><b><u>8.2.</u></b></dt>

+	<dd></dd>

+ <dt><b>8.3.</b></dt>

+	<dd>

+If You assert a patent infringement claim against Participant alleging that

+such Participant's Contributor Version directly or indirectly infringes any

+patent where such claim is resolved (such as by license or settlement) prior to

+the initiation of patent infringement litigation, then the reasonable value of

+the licenses granted by such Participant under Sections <b>2.1</b> or <b>2.2</b>

+shall be taken into account in determining the amount or value of any payment

+or license.</dd>

+ <dt><b>8.4.</b></dt>

+	<dd> In the event of termination under Sections <b>8.1</b> or

+<b>8.2</b> above, all end user license agreements (excluding distributors

+and resellers) which have been validly granted by You or any distributor

+hereunder prior to termination shall survive termination.</dd>

+</dl>

+

+ <h2><a name="tth_sEc9">

+9</a>&nbsp;&nbsp;LIMITATION OF LIABILITY.</h2>

+UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING

+NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER,

+ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER

+OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,

+INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT

+LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE

+OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN

+IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES.

+THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR

+PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE

+LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION

+OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION

+AND LIMITATION MAY NOT APPLY TO YOU.

+

+ <h2><a name="tth_sEc10">

+10</a>&nbsp;&nbsp;<u>U.S. GOVERNMENT END USERS.</u></h2>

+

+ <h2><a name="tth_sEc11">

+11</a>&nbsp;&nbsp;<u>MISCELLANEOUS.</u></h2>

+

+ <h2><a name="tth_sEc12">

+12</a>&nbsp;&nbsp;RESPONSIBILITY FOR CLAIMS.</h2>

+As between Initial Developer and the Contributors, each party is responsible

+for claims and damages arising, directly or indirectly, out of its utilization

+of rights under this License and You agree to work with Initial Developer and

+Contributors to distribute such responsibility on an equitable basis.  Nothing

+herein is intended or shall be deemed to constitute any admission of liability.

+

+<div class="p"><!----></div>

+

+<h2>EXHIBIT A.</h2>

+

+<div class="p"><!----></div>

+"The contents of this file are subject to the gSOAP Public License Version 1.3

+(the "License"); you may not use this file except in compliance with the

+License. You may obtain a copy of the License at

+

+<blockquote>

+http://genivia.com/Products/gsoap/license.pdf

+</blockquote>

+

+More information on licensing options, support contracts, and consulting can be found at

+<blockquote>

+http://genivia.com/Products/gsoap/contract.html

+</blockquote>

+Software distributed under the License is distributed on an "AS IS"

+basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License

+for the specific language governing rights and limitations under the License.

+

+<div class="p"><!----></div>

+The Original Code of the gSOAP Software is:

+stdsoap.h, stdsoap2.h, stdsoap.c, stdsoap2.c, stdsoap.cpp, stdsoap2.cpp, soapcpp2.h, soapcpp2.c,

+soapcpp2_lex.l, soapcpp2_yacc.y, error2.h, error2.c,

+symbol2.c, init2.c, soapdoc2.html, and soapdoc2.pdf, httpget.h, httpget.c, stl.h, stldeque.h, stllist.h, stlvector.h, stlset.h.

+

+<div class="p"><!----></div>

+The Initial Developer of the Original Code is Robert A. van Engelen.  Portions

+created by Robert A. van Engelen are Copyright (C) 2001-2004 Robert A. van

+Engelen, Genivia inc.  All Rights Reserved.

+

+<div class="p"><!----></div>

+Contributor(s):

+

+<dl compact="compact">

+ <dt><b>"________________________."</b></dt>

+	<dd></dd>

+</dl>

+[Note: The text of this Exhibit A may differ slightly form the text of the

+notices in the Source Code files of the Original code.  You should use the text

+of this Exhibit A rather than the text found in the Original Code Source Code

+for Your Modifications.]

+

+<div class="p"><!----></div>

+

+<h2>EXHIBIT B.</h2>

+

+<div class="p"><!----></div>

+"Part of the software embedded in this product is gSOAP software.

+

+<div class="p"><!----></div>

+Portions created by gSOAP are Copyright (C) 2001-2004 Robert A. van Engelen,

+Genivia inc. All Rights Reserved.

+

+<div class="p"><!----></div>

+THE SOFTWARE IN THIS PRODUCT WAS IN PART PROVIDED BY GENIVIA INC AND ANY

+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED

+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,

+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT

+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR

+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF

+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE

+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF

+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."

+

+<div class="p"><!----></div>

+

+</html>

diff --git a/license.pdf b/license.pdf
new file mode 100644
index 0000000..f56506e
--- /dev/null
+++ b/license.pdf
Binary files differ
diff --git a/mod_gsoap/README.txt b/mod_gsoap/README.txt
new file mode 100644
index 0000000..4bda794
--- /dev/null
+++ b/mod_gsoap/README.txt
@@ -0,0 +1,8 @@
+gsoap_win			IIS and WinInet support
+mod_gsoap-x.y			mod_gsoap for Apache 1.3 and 2.0
+
+Please visit http://sourceforge.net/projects/mod-gsoap
+
+Please refer to the Christian Aberger's Web site for installation intructions
+for gsoap_win for IIS: http://mx.aberger.at/SOAP/
+
diff --git a/mod_gsoap/gsoap_win/isapi/Div/win2000iisdebug.reg b/mod_gsoap/gsoap_win/isapi/Div/win2000iisdebug.reg
new file mode 100644
index 0000000..7ba4f34
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/Div/win2000iisdebug.reg
Binary files differ
diff --git a/mod_gsoap/gsoap_win/isapi/Div/win2000iisnodebug.reg b/mod_gsoap/gsoap_win/isapi/Div/win2000iisnodebug.reg
new file mode 100644
index 0000000..a0e6134
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/Div/win2000iisnodebug.reg
Binary files differ
diff --git a/mod_gsoap/gsoap_win/isapi/Makefile b/mod_gsoap/gsoap_win/isapi/Makefile
new file mode 100644
index 0000000..4bcec5a
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/Makefile
@@ -0,0 +1,57 @@
+VERSION=0_0_2
+PACKAGE=mod_gsoap_win_$(VERSION).zip
+WWWSERVICENAME="WWW-Publishing"
+LOGFILEPATH=$(SYSTEMROOT)\system32\inetsrv
+
+DELDIRS = .\Debug .\Release \
+    .\gsoap\Debug .\gsoap\Release
+
+
+all:
+	msdev all4iis.dsw /MAKE "all4iis - Win32 Debug" 
+	msdev all4iis.dsw /MAKE "all4iis - Win32 Release" 
+
+clean:
+    -del /s/q *.ncb
+    -del /s/q *.opt
+    -del /s/q *.plg
+    -del /s/q *.clw
+	-del /s/q *.pch
+	-del /s/q *.aps
+	-del /s/q *.log
+	-attrib -h -s images\Thumbs.db
+	-del images\Thumbs.db
+
+	cd samples
+		$(MAKE) -f samples.mak clean
+	cd ..
+	for %v in ($(DELDIRS)) DO if exist %v\*.* rmdir /s/q %v
+
+pack:
+	$(MAKE) clean
+	cd ..
+	if exist $(PACKAGE) del $(PACKAGE)
+	zip -r9 $(PACKAGE) isapi
+	cd isapi	
+	dir ..\$(PACKAGE)
+
+start:
+	net start $(WWWSERVICENAME)
+
+stop:
+	-net stop $(WWWSERVICENAME)
+	net stop IISAdmin
+
+
+test:
+	cd .\Debug
+		-del *.log
+		-del $(LOGFILEPATH)\RECV.log
+		-del $(LOGFILEPATH)\SENT.log
+		-del $(LOGFILEPATH)\TEST.log
+		dimeclnt test.jpg http://localhost/gsoap/mod_gsoap.dll?dime test.jpg
+		calcclnt add 3 4
+		echo start notepad %SYSTEMROOT%\system32\inetsrv\RECV.log
+	cd ..
+
+
diff --git a/mod_gsoap/gsoap_win/isapi/all4iis.dsp b/mod_gsoap/gsoap_win/isapi/all4iis.dsp
new file mode 100644
index 0000000..1f156ca
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/all4iis.dsp
@@ -0,0 +1,71 @@
+# Microsoft Developer Studio Project File - Name="all4iis" - Package Owner=<4>

+# Microsoft Developer Studio Generated Build File, Format Version 6.00

+# ** NICHT BEARBEITEN **

+

+# TARGTYPE "Win32 (x86) Generic Project" 0x010a

+

+CFG=all4iis - Win32 Debug

+!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE

+!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl

+!MESSAGE 

+!MESSAGE NMAKE /f "all4iis.mak".

+!MESSAGE 

+!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben

+!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:

+!MESSAGE 

+!MESSAGE NMAKE /f "all4iis.mak" CFG="all4iis - Win32 Debug"

+!MESSAGE 

+!MESSAGE Für die Konfiguration stehen zur Auswahl:

+!MESSAGE 

+!MESSAGE "all4iis - Win32 Release" (basierend auf  "Win32 (x86) Generic Project")

+!MESSAGE "all4iis - Win32 Debug" (basierend auf  "Win32 (x86) Generic Project")

+!MESSAGE 

+

+# Begin Project

+# PROP AllowPerConfigDependencies 0

+# PROP Scc_ProjName ""

+# PROP Scc_LocalPath ""

+MTL=midl.exe

+

+!IF  "$(CFG)" == "all4iis - Win32 Release"

+

+# PROP BASE Use_MFC 0

+# PROP BASE Use_Debug_Libraries 0

+# PROP BASE Output_Dir "Release"

+# PROP BASE Intermediate_Dir "Release"

+# PROP BASE Target_Dir ""

+# PROP Use_MFC 0

+# PROP Use_Debug_Libraries 0

+# PROP Output_Dir "Release"

+# PROP Intermediate_Dir "Release"

+# PROP Target_Dir ""

+

+!ELSEIF  "$(CFG)" == "all4iis - Win32 Debug"

+

+# PROP BASE Use_MFC 0

+# PROP BASE Use_Debug_Libraries 1

+# PROP BASE Output_Dir "Debug"

+# PROP BASE Intermediate_Dir "Debug"

+# PROP BASE Target_Dir ""

+# PROP Use_MFC 0

+# PROP Use_Debug_Libraries 1

+# PROP Output_Dir "Debug"

+# PROP Intermediate_Dir "Debug"

+# PROP Target_Dir ""

+

+!ENDIF 

+

+# Begin Target

+

+# Name "all4iis - Win32 Release"

+# Name "all4iis - Win32 Debug"

+# Begin Group "doc"

+

+# PROP Default_Filter ""

+# End Group

+# Begin Source File

+

+SOURCE=.\isapi.mak

+# End Source File

+# End Target

+# End Project

diff --git a/mod_gsoap/gsoap_win/isapi/all4iis.dsw b/mod_gsoap/gsoap_win/isapi/all4iis.dsw
new file mode 100644
index 0000000..fde3094
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/all4iis.dsw
@@ -0,0 +1,104 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00

+# WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELÖSCHT WERDEN!

+

+###############################################################################

+

+Project: "all4iis"=.\all4iis.dsp - Package Owner=<4>

+

+Package=<5>

+{{{

+}}}

+

+Package=<4>

+{{{

+    Begin Project Dependency

+    Project_Dep_Name calc

+    End Project Dependency

+    Begin Project Dependency

+    Project_Dep_Name isapi

+    End Project Dependency

+    Begin Project Dependency

+    Project_Dep_Name calcclnt

+    End Project Dependency

+    Begin Project Dependency

+    Project_Dep_Name dime

+    End Project Dependency

+    Begin Project Dependency

+    Project_Dep_Name dimeclnt

+    End Project Dependency

+}}}

+

+###############################################################################

+

+Project: "calc"=.\samples\calc\calc.dsp - Package Owner=<4>

+

+Package=<5>

+{{{

+}}}

+

+Package=<4>

+{{{

+}}}

+

+###############################################################################

+

+Project: "calcclnt"=.\SAMPLES\CALC\calcclnt.dsp - Package Owner=<4>

+

+Package=<5>

+{{{

+}}}

+

+Package=<4>

+{{{

+}}}

+

+###############################################################################

+

+Project: "dime"=.\SAMPLES\dime\dime.dsp - Package Owner=<4>

+

+Package=<5>

+{{{

+}}}

+

+Package=<4>

+{{{

+}}}

+

+###############################################################################

+

+Project: "dimeclnt"=.\SAMPLES\DIME\dimeclnt.dsp - Package Owner=<4>

+

+Package=<5>

+{{{

+}}}

+

+Package=<4>

+{{{

+}}}

+

+###############################################################################

+

+Project: "isapi"=.\gsoap\isapi.dsp - Package Owner=<4>

+

+Package=<5>

+{{{

+}}}

+

+Package=<4>

+{{{

+}}}

+

+###############################################################################

+

+Global:

+

+Package=<5>

+{{{

+}}}

+

+Package=<3>

+{{{

+}}}

+

+###############################################################################

+

diff --git a/mod_gsoap/gsoap_win/isapi/gsoap/HttpContext.cpp b/mod_gsoap/gsoap_win/isapi/gsoap/HttpContext.cpp
new file mode 100644
index 0000000..0e72fbb
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/gsoap/HttpContext.cpp
@@ -0,0 +1,49 @@
+/** Implementation of the HttpContext class
+  * @file HttpContext.cpp
+  * @author Christian Aberger 
+  * Copyright (C) 2001 WebWare (http://www.webware.at) 
+  */ 
+#include "HttpContext.h"
+
+HttpMessage::HttpMessage() {
+}
+HttpRequest::HttpRequest() 
+: _method(GET)
+, _body(NULL)
+, _contentlength(0)
+{
+}
+HttpRequest::~HttpRequest() {
+    delete _body;
+}
+const char *HttpRequest::getQueryString() {
+    return _querystring.c_str();
+}
+const char *HttpRequest::getBody() {
+    static const char szEmpty[] = "";
+    return NULL == _body ? szEmpty : _body;
+}
+void *HttpRequest::getData() {
+    return _body;
+}
+HttpRequest::Method HttpRequest::getMethod() const {
+    return _method;
+}
+unsigned long HttpRequest::getContentLength() const {
+    return _contentlength;
+}
+bool HttpRequest::operator<<(std::istream& is) {
+    delete _body, _body = NULL;
+    bool bRet = true;
+    if (0 != _contentlength) {
+        _body = new char[_contentlength + 1];
+        memset(_body, 0, _contentlength + 1);
+        is.read(_body, _contentlength);
+        bRet = is.good();
+    } else {
+        bRet = false;
+    }
+    return bRet;
+}
+
+
diff --git a/mod_gsoap/gsoap_win/isapi/gsoap/HttpContext.h b/mod_gsoap/gsoap_win/isapi/gsoap/HttpContext.h
new file mode 100644
index 0000000..a317287
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/gsoap/HttpContext.h
@@ -0,0 +1,65 @@
+/** Interface for the HttpMessage and HttpContext classes.
+  * @file HttpContext.h
+  * @author Christian Aberger 
+  * Copyright (C) 2001-2002 WebWare (http://www.webware.at) 
+  */
+#ifndef HttpContext_H_F3A8FE10_2C12_11d5_8BEB_01A0CCD4FF57
+#define HttpContext_H_F3A8FE10_2C12_11d5_8BEB_01A0CCD4FF57
+
+//#include <utilily>
+#include <cstring>
+#include "opsysadjust.h"
+#include <map>
+#include <string>
+#include <iostream>
+#include "casecmpless.h"
+
+/** HTTP message, either a request or a response.
+  */
+class HttpMessage {
+public:
+    HttpMessage(); ///< constructor.
+
+    /** list of "Header: value" entries in an http request or response
+      */
+    typedef std::map<std::string, std::string, casecmpless> ContentHeaders;
+    const ContentHeaders& getContentHeaders() const; ///< return the content headers of the message.
+    ContentHeaders& getContentHeaders(); ///< return the content headers of the message.
+protected:
+    ContentHeaders m_ContentHeaders; ///< the content headers.
+};
+/** a <a href="http://www.ietf.org/rfc/rfc2068.txt?number=2068">HTTP</a> response.
+  */
+class HttpResponse : public HttpMessage {
+public:
+    HttpResponse() {}
+    virtual ~HttpResponse() {}
+};
+/** a <a href="http://www.ietf.org/rfc/rfc2068.txt?number=2068">HTTP</a> request.
+  * No platform dependent types are used here, unchanged also for <a href="http://www.apache.org">Apache-Server</a>
+  * Platform dependency is in subclasses only.
+  */
+class HttpRequest : public HttpMessage {
+public:
+    /** 2 methods in HTTP:either GET or POST. */
+    typedef enum Method {GET = 0, POST = 1};
+    HttpRequest(); ///< constructor.
+    virtual ~HttpRequest(); ///< destructor.
+
+    virtual Method getMethod() const; ///< @return the method used in the request
+    virtual const char *getQueryString(); ///< @return the url requested. 
+    virtual const char *getBody(); ///< @return the body of the request as a string (guaranteed to be 0 terminated).
+    virtual void *getData(); ///< @return the pointer to the start of the body data.
+    virtual unsigned long getContentLength() const; ///< return the lenght of the body of the request.
+    virtual bool operator<<(std::istream&);
+public:
+    std::string _querystring;
+    char  *_body;
+    unsigned long _contentlength;
+    Method _method;
+};
+//inlines
+inline const HttpMessage::ContentHeaders& HttpMessage::getContentHeaders() const {return m_ContentHeaders;}
+inline HttpMessage::ContentHeaders& HttpMessage::getContentHeaders() {return m_ContentHeaders;}
+
+#endif // HttpContext_H_F3A8FE10_2C12_11d5_8BEB_01A0CCD4FF57
\ No newline at end of file
diff --git a/mod_gsoap/gsoap_win/isapi/gsoap/ISAPI_HttpContext.cpp b/mod_gsoap/gsoap_win/isapi/gsoap/ISAPI_HttpContext.cpp
new file mode 100644
index 0000000..42bd234
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/gsoap/ISAPI_HttpContext.cpp
@@ -0,0 +1,118 @@
+/** Implementation of the ISAPI_HttpRequest and related classes
+  * @file ISAPI_HttpContext.cpp
+  * @author Christian Aberger 
+  * Copyright (C) 2001-2002 WebWare (http://www.webware.at)
+  */
+#include <cassert>
+#include <algorithm>
+#include "ISAPI_HttpContext.h"
+using namespace std;
+
+static bool AddHeader(
+    ISAPI_HttpRequest& req, 
+    EXTENSION_CONTROL_BLOCK& ecb, 
+    const char *pszHeaderName,
+    LPCTSTR pszVariableName);
+
+ISAPI_HttpRequest::ISAPI_HttpRequest(EXTENSION_CONTROL_BLOCK *pECB) 
+: m_bHeadersParsed(false)
+, m_pECB(pECB)
+{
+    if (NULL != pECB) {
+        ParseHeaders(*pECB);
+    }
+}
+ISAPI_HttpRequest::~ISAPI_HttpRequest() {
+}
+EXTENSION_CONTROL_BLOCK *ISAPI_HttpRequest::ECB() const {
+    return m_pECB;
+}
+void ISAPI_HttpRequest::ParseHeaders(EXTENSION_CONTROL_BLOCK& ecb) {
+    _contentlength = ecb.cbTotalBytes;
+    AddHeader(ecb, "CONTENT-LENGTH", "CONTENT_LENGTH");
+    AddHeader(ecb, "CONTENT-TYPE", "CONTENT_TYPE");
+    AddHeader(ecb, "PATH-INFO", "PATH_INFO");
+    string strValue;
+    ReadHeader(ecb, "REQUEST_METHOD", strValue);
+    if (0 == strcasecmp(strValue.c_str(), "GET")) {
+        _method = GET;
+    } else if (0 == strcasecmp(strValue.c_str(), "POST")) {
+        _method = POST;
+    }
+    _querystring = ecb.lpszQueryString;
+    ReadCustomHeaders(ecb);
+    m_bHeadersParsed = true;
+}
+/** add a ECB header variable to our content headers collection.
+    @param ecb the extension control block of the current IIS request
+    @param pszHeaderName the HTTP - standard name of the content header.
+    @param pszVariableName the name invented by Micro$oft for the same thing.
+  */
+bool ISAPI_HttpRequest::AddHeader(EXTENSION_CONTROL_BLOCK& ecb, const char *pszHeaderName, LPCTSTR pszVariableName) {
+    assert(NULL != pszVariableName);
+
+    string strValue; 
+    bool bRet = ReadHeader(ecb, pszVariableName, strValue);
+    if (bRet) {
+        ::OutputDebugString((pszHeaderName + string(": ") + strValue + "\r\n").c_str());
+        m_ContentHeaders[pszHeaderName] = strValue;
+    }
+    return bRet;
+}
+/** Read a variable from the control block.
+    @param ecb the Extension Control Block.
+    @param pszVariableName the name of the variable to read
+    @strHeaderValue (output) the value of the variable
+    @return true if the header was found.
+  */ 
+bool ISAPI_HttpRequest::ReadHeader(EXTENSION_CONTROL_BLOCK& ecb, LPCTSTR pszVariableName, string& strHeaderValue) {
+    bool bRet = true;
+    char szVarName[128]; // :( GetServerVariable uses non-const name parameter, so we make a copy to be save.
+    strncpy(szVarName, pszVariableName, sizeof szVarName);
+    char szBuffer[2048];
+    DWORD dwBufferSize = sizeof szBuffer;
+    BOOL bGet = ecb.GetServerVariable(ecb.ConnID, szVarName, szBuffer, &dwBufferSize);
+    if (bGet) {
+        strHeaderValue = szBuffer;
+    } else {
+        bRet = false;
+        strHeaderValue.erase();
+    }
+    return bRet;
+}
+/** read all HTTP headers that were not already parsed into one of the ISAPI - ECB variables.
+  */
+void ISAPI_HttpRequest::ReadCustomHeaders(EXTENSION_CONTROL_BLOCK& ecb) {
+    const char szHTTP_[] = "HTTP_";
+    char szBuffer[4096];
+    DWORD dwBufferSize = sizeof szBuffer;
+    BOOL bGet = ecb.GetServerVariable(ecb.ConnID, "ALL_HTTP", szBuffer, &dwBufferSize);
+    if (bGet) {
+        // Find lines, split key/data pair and write them as output
+        LPTSTR pOpts = NULL;
+        LPTSTR pEnd = NULL;
+        for (LPTSTR pChar = szBuffer; '\0' != *pChar;) {
+            if (*pChar == '\r' || *pChar == '\n') {
+                pChar++;
+                continue;
+            }
+            pOpts = strchr(pChar, ':');// findseparator
+            if (pOpts && *pOpts) {
+                pEnd = pOpts;
+                while (*pEnd && *pEnd != '\r' && *pEnd != '\n') {
+                    pEnd++;
+                }
+                *pOpts = '\0'; // split the strings
+                *pEnd = '\0';
+                string strName = pChar;
+                if (0 == strncmp(strName.c_str(), szHTTP_, strlen(szHTTP_))) {
+                    strName = strName.substr(strlen(szHTTP_));
+                }
+                replace(strName.begin(), strName.end(), '_', '-');
+                ::OutputDebugString((strName + ":" + (pOpts + 1) + "\r\n").c_str());
+                m_ContentHeaders[strName] = pOpts + 1;
+                pChar = pEnd + 1;
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/mod_gsoap/gsoap_win/isapi/gsoap/ISAPI_HttpContext.h b/mod_gsoap/gsoap_win/isapi/gsoap/ISAPI_HttpContext.h
new file mode 100644
index 0000000..13e3f4a
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/gsoap/ISAPI_HttpContext.h
@@ -0,0 +1,33 @@
+/** Interface for the ISAPI_HttpRequest and related classes
+  * @file ISAPI_HttpContext.h
+  * @author Christian Aberger 
+  * Copyright (C) 2001 WebWare (http://www.webware.at) 
+  */
+#ifndef ISAPIHTTPCONTEXT_H
+#define ISAPIHTTPCONTEXT_H
+#include <httpext.h>
+#include <string>
+
+#include "HttpContext.h"
+
+/** encapsulate special content header parsing if we are running on a non-standard server.
+  */
+class ISAPI_HttpRequest : public HttpRequest {
+public:
+    /** Constructor, parsing also content headers from the control block.
+      * @param pECB the ISAPI extension control block passed in by IIS.
+      */
+    ISAPI_HttpRequest(EXTENSION_CONTROL_BLOCK *pECB = NULL);
+    virtual ~ISAPI_HttpRequest(); ///< destructor.
+    EXTENSION_CONTROL_BLOCK *ECB() const;
+protected:
+    void ParseHeaders(EXTENSION_CONTROL_BLOCK& ecb); ///< extract the request headers from the content block
+    bool AddHeader(EXTENSION_CONTROL_BLOCK& ecb, const char *pszHeaderName, LPCTSTR pszVariableName);
+    bool ReadHeader(EXTENSION_CONTROL_BLOCK& ecb, LPCTSTR pszVariableName, std::string& strHeaderValue);
+    void ReadCustomHeaders(EXTENSION_CONTROL_BLOCK& ecb);
+protected:
+    bool m_bHeadersParsed; ///< have the content headers already been parsed ?
+    EXTENSION_CONTROL_BLOCK *m_pECB;
+};
+
+#endif //ISAPIHTTPCONTEXT_H
\ No newline at end of file
diff --git a/mod_gsoap/gsoap_win/isapi/gsoap/ISAPI_Server.cpp b/mod_gsoap/gsoap_win/isapi/gsoap/ISAPI_Server.cpp
new file mode 100644
index 0000000..e576f52
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/gsoap/ISAPI_Server.cpp
@@ -0,0 +1,336 @@
+/** Implementation of the ISAPI_Server class 
+  * @file ISAPI_Server.cpp
+  * @author Christian Aberger 
+  * Copyright (C) 2001 WebWare (http://www.webware.at) 
+  * Load a gosap server dll dynamically (if not already loaded) and serve the request.
+  * See http://www.aberger.at/SOAP for documentation.
+  * 
+  */
+
+#include <memory>
+#include <strstream>
+#ifdef __DEBUG_ISAPI
+#include <fstream>
+#endif
+#include <cassert>
+using namespace std;
+
+#include "ISAPI_Server.h"
+#include "isapistream.h"
+#include "ISAPI_HttpContext.h"
+#include "ISAPI_SoapServerFactory.h"
+
+static const char *GSOAP_ID = "mod_gsoap isapi extension 0.0.2";
+static const char *crlf = "\r\n";
+
+///> helper function to build full path to dll.
+static string MakeDllName(EXTENSION_CONTROL_BLOCK *pECB, const char *pszDllName); 
+
+/* --- plugin functions -- */
+static int mod_gsoap_plugin_copy(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src) {
+	*dst = *src;
+	return SOAP_OK;
+}
+static void mod_gsoap_delete(struct soap *soap, struct soap_plugin *p) {
+}
+static int mod_gsoap_plugin(struct soap *soap, struct soap_plugin *p, void *arg) {
+	p->id = GSOAP_ID;
+	p->data = arg;
+	p->fcopy = mod_gsoap_plugin_copy;
+	p->fdelete = mod_gsoap_delete;
+	return SOAP_OK;
+} 
+
+/** bundle the request/response data into an object to be able to attach it to soap. */
+class SoapTransaction {
+public:
+    SoapTransaction(soap *);
+    virtual ~SoapTransaction();
+
+    static SoapTransaction *transaction(soap *);
+    void SendHeaders(); ///< send output headers of gsoap to client, if not done so already.
+    size_t SupplyRequestHeaders(char *pBuf, const size_t len); // send input request headers to gsoap.
+    void BuildHeaders(); ///< build the headers that must be sent to gsoap.
+public:
+    soap *_soap;
+    std::string _header; ///< header part returned to client e.g. "200 OK".
+	std::string _request_header; ///< the (remaining part of ) the first line of the request.
+    DWORD _dwReturnCode; ///< the return code for the HttpExtensionProc.
+    ISAPI_HttpRequest *_request;
+    HttpResponse *_response;
+    isapistream *_istream;
+    const mod_gsoap_interface *_interface;
+#ifdef _DEBUG_ISAPI
+	ofstream *_debug_in; ///< debugging output stream
+	ofstream *_debug_out; ///< debugging output stream
+#endif
+protected:
+    bool _headers_sent; ///< true if Http headers have already been sent.
+    bool _headers_supplied; ///< true if Http headers have already supplied to gsoap.
+};
+
+SoapTransaction::SoapTransaction(soap *soap) 
+: _soap(soap)
+, _dwReturnCode(HSE_STATUS_SUCCESS)
+, _header("200 OK")
+, _request(NULL)
+, _response(NULL) 
+, _interface(NULL) 
+, _istream(NULL)
+, _headers_sent(false)
+, _headers_supplied(false)
+#ifdef _DEBUG_ISAPI
+, _debug_in(NULL)
+, _debug_out(NULL)
+#endif
+{
+    assert(soap);
+#ifdef _DEBUG_ISAPI
+	TCHAR szPath[_MAX_PATH];
+	::GetTempPath(sizeof szPath, szPath);
+	string strIn = szPath;
+	string strOut = szPath;
+	strIn += "mod_gsoap_debug_in.log";
+	strOut += "mod_gsoap_debug_out.log";
+	strOut += "mod_gsoap_debug.log";
+	_debug_in = new ofstream(strIn.c_str(), ios::out | ios::app);
+	_debug_out = new ofstream(strOut.c_str(), ios::out | ios::app);
+	*_debug_in << "--------------------------------START--------------------" << endl;
+	*_debug_out << "--------------------------------START--------------------" << endl;
+#endif
+}
+SoapTransaction::~SoapTransaction() {
+#ifdef _DEBUG_ISAPI
+	*_debug_in << "--------------------------------STOP---------------------" << endl;
+	*_debug_out << "--------------------------------STOP---------------------" << endl;
+	delete _debug_in;
+	delete _debug_out;
+#endif
+}
+inline SoapTransaction *SoapTransaction::transaction(soap *soap) {
+    assert(NULL != soap);
+	return reinterpret_cast<SoapTransaction *>(soap->fplugin(soap, GSOAP_ID));
+}
+void SoapTransaction::SendHeaders() {
+    if (_headers_sent) {
+        return;
+    }
+    ostrstream headers;
+    for (HttpMessage::ContentHeaders::const_iterator it = _response->getContentHeaders().begin(); it != _response->getContentHeaders().end(); ++it) {
+		if (0 != strcasecmp(it->first.c_str(), "Connection")) {
+	        headers << it->first << ": " << it->second << crlf;
+		} 
+    }
+    headers << crlf;
+	string strOut(headers.str(), headers.pcount());
+#ifdef _DEBUG_ISAPI
+	*_debug_out << strOut;
+#endif
+    BOOL bHeaders = _request->ECB()->ServerSupportFunction(_request->ECB()->ConnID, HSE_REQ_SEND_RESPONSE_HEADER,
+        (LPVOID)"200 OK", NULL, (LPDWORD)strOut.c_str());
+    headers.freeze(false);
+    _headers_sent = true;
+}
+/** Emits HTTP key: val header entries. 
+    @return SOAP_OK, or a gSOAP error code. 
+    Built-in gSOAP function: http_post_header. 
+
+    IIS handles most of the headers (Connection etc.) itself. 
+    The main thing we need to extract is SOAPAction.
+*/
+static int http_post_header(soap *soap, const char *key, const char *value) {
+    if (NULL != key) {
+        SoapTransaction *pTrans = SoapTransaction::transaction(soap);
+        if (value) {
+            pTrans->_response->getContentHeaders()[key] = value;
+        }
+    }
+	return SOAP_OK;
+}
+/** set the http - response code from the soap error message. */
+static int http_response(soap *soap, int soap_error, size_t count) {
+    SoapTransaction *pTrans = SoapTransaction::transaction(soap);
+    if (SOAP_OK == soap_error) {
+        pTrans->_dwReturnCode = HSE_STATUS_SUCCESS;
+    } else {
+        pTrans->_dwReturnCode = HSE_STATUS_ERROR;
+        pTrans->_header = "500 ERR";
+    }
+    return SOAP_OK;
+}
+/** gsoap function to append the data to send to our output buffer */
+static int fsend(soap *soap, const char *pBuf, size_t len) {
+    SoapTransaction *pTrans = SoapTransaction::transaction(soap);
+    pTrans->SendHeaders();
+#ifdef _DEBUG_ISAPI
+	pTrans->_debug_out->write(pBuf, len);
+#endif
+    pTrans->_istream->write(pBuf, len);
+    return SOAP_OK;
+}
+size_t SoapTransaction::SupplyRequestHeaders(char *pBuf, const size_t len) {
+    int nLen = 0;
+    if (!_headers_supplied) {
+		if (!_request_header.empty()) { // we must send 1st line so that gsoap parses everything correctly.
+			nLen = _request_header.length();
+			if (nLen > len) {
+				nLen = len;
+				memcpy(pBuf, _request_header.c_str(), len);
+				_request_header = _request_header.substr(len);
+			} else {
+				memcpy(pBuf, _request_header.c_str(), _request_header.length());
+				_request_header.erase();                
+				_headers_supplied = true;
+			}
+#ifdef _DEBUG_ISAPI
+			_debug_in->write(pBuf, nLen);
+#endif
+		}
+	}
+    return nLen;
+}
+/** gsoap function that requests the next piece of data from us */
+static size_t frecv(soap *soap, char *pBuf, size_t len) {
+    SoapTransaction *pTrans = SoapTransaction::transaction(soap);
+    size_t nLen = pTrans->SupplyRequestHeaders(pBuf, len); 
+    if (0 == nLen) { // query string and headers have been sent already.
+        assert(pTrans->_istream->good());
+		if (!pTrans->_istream->eof()) {
+			pTrans->_istream->readsome(pBuf, len);
+			nLen = pTrans->_istream->gcount();
+#ifdef _DEBUG_ISAPI
+			pTrans->_debug_in->write(pBuf, nLen);
+#endif
+			assert(pTrans->_istream->good());
+		}
+    }
+    return nLen;
+}
+
+void SoapTransaction::BuildHeaders() {
+	ostrstream s;
+	/* we must rebuild the 1st request line, cause IIS has no API to get it :( */
+	s << "POST /" + _request->_querystring + " HTTP/1.0\r\n";
+    for (ISAPI_HttpRequest::ContentHeaders::const_iterator it = _request->getContentHeaders().begin(); it != _request->getContentHeaders().end(); ++it) {
+		s << it->first << ": " << it->second << crlf;
+    }
+	s << crlf;
+	_request_header.assign(s.str(), s.pcount());
+}
+BOOL ISAPI_Server::GetExtensionVersion(HSE_VERSION_INFO *pVer) {
+    lstrcpyn((LPSTR) pVer->lpszExtensionDesc, "WebWare SOAP ISAPI extension", HSE_MAX_EXT_DLL_NAME_LEN);
+    return TRUE;
+}
+BOOL ISAPI_Server::TerminateExtension(DWORD) {
+	ISAPI_SoapServerFactory::instance()->shutdown();
+    return TRUE;
+}
+/* forwards the real work to soap_serve */
+static DWORD serve(
+	const mod_gsoap_interface *pInterface, 
+	ISAPI_HttpRequest& req,
+    HttpResponse res,
+	isapistream& is) 
+{
+	assert(NULL != pInterface && pInterface->linked());
+
+	soap soap;
+	(*pInterface->fsoap_init)(&soap);
+    SoapTransaction trans(&soap);
+    if (NULL != pInterface->fsoap_register_plugin_arg) {
+		(*pInterface->fsoap_register_plugin_arg)(&soap, mod_gsoap_plugin, (void *)&trans);
+	}
+    //soap.user = &trans;
+    trans._interface = pInterface;
+    trans._istream = &is;
+    trans._request = &req;
+    trans._response = &res;
+
+	trans.BuildHeaders();
+
+#ifdef WITH_ZLIB
+	//	always allow gzip in -- but only allow it out if the client can handle it
+	soap_set_imode(&soap, SOAP_ENC_ZLIB); 	
+
+	string	str = req.getContentHeaders()["Accept-Encoding"];
+	if (strstr(str.c_str(), "gzip"))
+	{	
+		soap_set_omode(&soap, SOAP_ENC_ZLIB); 		
+		http_post_header( &soap, "Content-Encoding", "gzip" );	
+	}
+
+#endif
+
+    // set callback functions:
+    soap.frecv = frecv;
+    soap.fsend = fsend;
+    soap.fresponse = http_response;
+	soap.fposthdr = http_post_header;
+
+	(*pInterface->fsoap_serve)(&soap);
+	if (NULL != pInterface->fsoap_delete) {
+		(*pInterface->fsoap_delete)(&soap, NULL);
+	}
+	(*pInterface->fsoap_done)(&soap);
+	(*pInterface->fsoap_end)(&soap);
+
+    return trans._dwReturnCode;
+}
+
+static void SendErrorMessage(isapistream& is, const char *pszError) {
+    is << "<html><title>gsoap error message</title><body>" << pszError << "<p>";
+    is << "see <a href=\"http://www.aberger.at/SOAP\">WebWare gsoap ISAPI module</a> documentation.";
+    is << "</body><html>";
+}
+
+/** Parse the request, load dll if not already loaded, let it create the response and return the result.
+  */
+DWORD ISAPI_Server::HttpExtensionProc(EXTENSION_CONTROL_BLOCK *pECB) {
+    DWORD dwRes = HSE_STATUS_SUCCESS;
+    ISAPI_HttpRequest req(pECB);
+    HttpResponse res;
+
+    isapistream is(pECB);
+    
+    string strQuery = req.getQueryString();
+    string strDll = strQuery;
+    string::size_type pos = strQuery.find('&');
+    if (string::npos != pos) {
+        strDll = strQuery.substr(0, pos);
+        strQuery = strQuery.substr(pos + 1);
+    }
+	if (!strDll.empty()) {
+		strDll += ".dll";
+		strDll = MakeDllName(pECB, strDll.c_str()); // due to security reasons we only allow loading of dlls from the local directory (which must not be writable!).
+		const mod_gsoap_interface *pInterface = ISAPI_SoapServerFactory::instance()->getInterface(strDll.c_str());
+		if (NULL != pInterface) {
+			if (HttpRequest::POST == req.getMethod()) {
+				dwRes = serve(pInterface, req, res, is);
+			} else {
+				SendErrorMessage(is, "You must use a POST request to get answer from gsoap !");
+			}
+		} else {
+			is << "could not create server '" << strDll << "'. Check your request if it is correct. "
+				<< ISAPI_SoapServerFactory::instance()->getLastError();
+		}
+	} else {
+		SendErrorMessage(is, "No gsoap server dll specified in request. Please add the name of your soap server dll, e.g. http://localhost/gsoap/mod_gsoap?calc");
+	}
+    is.flush();
+    return dwRes;
+}
+
+/** Given a dllname make a fully qualified path to the dll in the current isapi directory 
+    @param pECB the Extension Control Block of the Request
+    @param pszDllName the unqualified dllname
+*/
+static string MakeDllName(EXTENSION_CONTROL_BLOCK *pECB, const char *pszDllName) {
+    string strPath;
+    char szPath[_MAX_PATH + 1];
+    ZeroMemory(szPath, sizeof szPath);
+    DWORD dwBufferSize = sizeof szPath;
+    pECB->GetServerVariable(pECB->ConnID, "APPL_PHYSICAL_PATH", szPath, &dwBufferSize);
+    strPath = szPath;
+    strPath += pszDllName;
+    return strPath;
+}
diff --git a/mod_gsoap/gsoap_win/isapi/gsoap/ISAPI_Server.h b/mod_gsoap/gsoap_win/isapi/gsoap/ISAPI_Server.h
new file mode 100644
index 0000000..4188c55
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/gsoap/ISAPI_Server.h
@@ -0,0 +1,21 @@
+/** Interface of the ISAPI_Server class 
+  * @file ISAPI_SoapServerFactory.h
+  * @author Christian Aberger 
+  * Copyright (C) 2001 WebWare (http://www.webware.at) 
+  */
+#ifndef ISAPI_H_F3A8FE11_2C12_11d5_8BEB
+#define ISAPI_H_F3A8FE11_2C12_11d5_8BEB
+
+#include <httpext.h>
+
+/** Internet Server Application Programming Interface server.
+  *
+  */
+class ISAPI_Server {
+public:
+    static DWORD HttpExtensionProc(EXTENSION_CONTROL_BLOCK *pECB);
+    static BOOL GetExtensionVersion(OUT HSE_VERSION_INFO *pVer);
+    static BOOL TerminateExtension(DWORD dwFlags);
+};
+
+#endif // ISAPI_H_F3A8FE11_2C12_11d5_8BEB
\ No newline at end of file
diff --git a/mod_gsoap/gsoap_win/isapi/gsoap/ISAPI_SoapServerFactory.cpp b/mod_gsoap/gsoap_win/isapi/gsoap/ISAPI_SoapServerFactory.cpp
new file mode 100644
index 0000000..eb81100
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/gsoap/ISAPI_SoapServerFactory.cpp
@@ -0,0 +1,251 @@
+/** Implementation of the ISAPI_SoapServerFactory class
+  * @file SoapServerFactory.h
+  * @author Christian Aberger 
+  * Copyright (C) 2001 WebWare (http://www.webware.at) 
+  */
+#include <cassert>
+#include <cstring> // for casecmp
+#include <map>
+#include <string>
+#include "ISAPI_SoapServerFactory.h"
+#include "casecmpless.h"
+using namespace std;
+
+class CriticalSectionLock {
+public:
+	CriticalSectionLock(CRITICAL_SECTION *pcs) : m_pcs(pcs) {
+		assert(NULL != pcs);
+		::EnterCriticalSection(pcs);
+	}
+	~CriticalSectionLock() {
+		::LeaveCriticalSection(m_pcs);
+	}
+protected:
+	CRITICAL_SECTION *m_pcs;
+};
+
+
+ISAPI_SoapServerFactory *ISAPI_SoapServerFactory::m_pInstance = NULL;
+
+mod_gsoap_interface::mod_gsoap_interface() 
+: fsoap_init(NULL)
+, fsoap_serve(NULL)
+, fsoap_delete(NULL)
+, fsoap_done(NULL)
+, fsoap_end(NULL)
+, fsoap_register_plugin_arg(NULL)
+, fsoap_lookup_plugin(NULL)
+, fmod_gsoap_init(NULL)
+, fmod_gsoap_terminate(NULL)
+, reserved(NULL)
+{
+}
+mod_gsoap_interface::mod_gsoap_interface(const mod_gsoap_interface& intf) {
+	*this = intf;
+}
+mod_gsoap_interface& mod_gsoap_interface::operator=(const mod_gsoap_interface& intf) {
+	fsoap_init = intf.fsoap_init;
+	fsoap_serve = intf.fsoap_serve;
+	fsoap_delete = intf.fsoap_delete;
+	fsoap_done = intf.fsoap_done;
+	fsoap_end = intf.fsoap_end;
+	fsoap_register_plugin_arg = intf.fsoap_register_plugin_arg;
+	fsoap_lookup_plugin = intf.fsoap_lookup_plugin;
+	fmod_gsoap_init = intf.fmod_gsoap_init;
+	fmod_gsoap_terminate = intf.fmod_gsoap_terminate;
+	return *this;
+}
+/** Have all entry points been found in the gosap server library ?
+	@return true if all entry points have been assigned successfully. 
+  */
+bool mod_gsoap_interface::linked() const {
+	return 
+		NULL != fsoap_init &&
+		NULL != fsoap_serve &&
+		NULL != fsoap_done &&
+		NULL != fsoap_end &&
+		NULL != fsoap_register_plugin_arg &&
+		NULL != fsoap_lookup_plugin;
+	// don't check for 	fsoap_delete, only servers with classes have it.
+}
+
+SoapDll::SoapDll() 
+: m_hDll(NULL)
+{
+}
+SoapDll::SoapDll(const SoapDll& dll) {
+    *this = dll;
+}
+SoapDll& SoapDll::operator=(const SoapDll& dll) {
+    m_hDll = dll.m_hDll;
+    m_strLastError = dll.m_strLastError;
+	m_interface = dll.m_interface;
+    return *this;
+}
+bool SoapDll::unload() {
+    bool bRet = true;
+    if (NULL != m_hDll) {
+		if (NULL != m_interface.fmod_gsoap_terminate) {
+			int nRet = (*m_interface.fmod_gsoap_terminate)();
+		}
+        BOOL bFree = ::FreeLibrary(m_hDll);
+        bRet = bFree ? true : false;
+    }
+    return bRet;
+}
+SoapDll::~SoapDll() {
+}
+/**
+    @param pszPath the name of the dll to load.
+  */
+bool SoapDll::load(const char *pszPath) {
+	bool bRet = true;
+    if (NULL == m_hDll) {
+		m_strLastError.erase();
+		m_hDll = LoadLibrary(pszPath);
+		if (NULL != m_hDll) {
+			bRet = GetEntryPoints(pszPath);
+		} else {
+			LPVOID lpMsgBuf = NULL;
+			FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
+				NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
+				(LPTSTR) &lpMsgBuf, 0, NULL);
+			m_strLastError = "Attempt to load '" + string(pszPath) + "' failed. ";
+			m_strLastError += (LPCTSTR)lpMsgBuf;
+			LocalFree(lpMsgBuf);
+			bRet = false;
+		}
+	}
+    assert(false == bRet || (NULL != m_hDll));
+    return bRet;
+}
+const char *SoapDll::getLastError() const {
+	return m_strLastError.c_str();
+}
+static isapi_gsoap_server_fn GetFunction(
+	HMODULE hDll, 
+	const char *pszFunctionName, 
+	string& strErrorMessage, 
+	const char *pszPath) 
+{
+	assert(NULL != pszFunctionName);
+
+	isapi_gsoap_server_fn fn = NULL;
+	if (NULL != hDll) {
+		strErrorMessage.erase();
+		FARPROC DllEntryPoint = GetProcAddress(hDll, pszFunctionName); // Find entry point.
+		if (NULL != DllEntryPoint) {
+			fn = reinterpret_cast<isapi_gsoap_server_fn>(DllEntryPoint);
+		} else {
+			strErrorMessage = "Entry Point '";
+			strErrorMessage += pszFunctionName;
+			strErrorMessage += "' not found in dll '" + string(pszPath) + "'.";
+		}
+	}
+	return fn;
+}
+/** Find the address of all entry points that we must use. */
+bool SoapDll::GetEntryPoints(const char *pszPath) {
+	assert(NULL != m_hDll);
+	
+	string strTmp;
+	m_interface.fsoap_init    = GetFunction(m_hDll, "soap_init", m_strLastError, pszPath);
+	m_interface.fsoap_serve   = GetFunction(m_hDll, "soap_serve", m_strLastError, pszPath);
+	m_interface.fsoap_delete  = (isapi_soap_delete_fn)GetFunction(m_hDll, "soap_delete", strTmp, pszPath); // soap_delete may be missing for non - cpp
+	m_interface.fsoap_done    = GetFunction(m_hDll, "soap_done", m_strLastError, pszPath);
+	m_interface.fsoap_end     = GetFunction(m_hDll, "soap_end", m_strLastError, pszPath);
+	m_interface.fsoap_register_plugin_arg = (isapi_soap_register_plugin_fn)GetFunction(m_hDll, "soap_register_plugin_arg", m_strLastError, pszPath);
+	m_interface.fsoap_lookup_plugin = (isapi_soap_lookup_plugin_fn)GetFunction(m_hDll, "soap_lookup_plugin", m_strLastError, pszPath);
+	m_interface.fmod_gsoap_init = (mod_gsoap_init_fn)GetFunction(m_hDll, "mod_gsoap_init", strTmp, pszPath);
+	m_interface.fmod_gsoap_terminate = (mod_gsoap_terminate_fn)GetFunction(m_hDll, "mod_gsoap_terminate", strTmp, pszPath);
+	bool bRet = m_interface.linked();
+
+	assert(!bRet || m_interface.linked());
+	return bRet;
+}
+const mod_gsoap_interface *SoapDll::gsoap_interface() const {
+	return m_interface.linked() ? &m_interface : NULL;
+}
+/** a map of dll names to the dll handles */
+typedef map<string, SoapDll, casecmpless> MapString2Dll; 
+
+class DllMap : public MapString2Dll {
+public:
+    DllMap() {};
+    virtual ~DllMap();
+};
+DllMap::~DllMap() {
+    for (iterator it = begin(); it != end(); ++it) {
+        bool bRet = it->second.unload();
+        assert(bRet);
+    }
+}
+const char *ISAPI_SoapServerFactory::getLastError() {
+    return m_strError.c_str();
+}
+
+ISAPI_SoapServerFactory *ISAPI_SoapServerFactory::instance() {
+	if (NULL == m_pInstance) {
+		m_pInstance = new ISAPI_SoapServerFactory;
+	}
+
+	assert(NULL != m_pInstance);
+	return m_pInstance;
+}
+void ISAPI_SoapServerFactory::shutdown() {
+	assert(this == m_pInstance);
+
+	m_pInstance = NULL;
+	delete this;
+
+	assert(NULL == m_pInstance);
+}
+ISAPI_SoapServerFactory::ISAPI_SoapServerFactory() 
+: m_pDlls(NULL)
+{
+	::InitializeCriticalSection(&m_cs);
+	m_pDlls = new DllMap;
+}
+ISAPI_SoapServerFactory::~ISAPI_SoapServerFactory() {
+	delete m_pDlls;
+	::DeleteCriticalSection(&m_cs);
+}
+/** @return the function pointers of this dll if they could be loaded and found, else NULL.
+  */
+const mod_gsoap_interface *ISAPI_SoapServerFactory::getInterface(const char *pszDll) {
+	const mod_gsoap_interface *pIntf = NULL;
+	CriticalSectionLock lock(&m_cs);
+	m_strError.erase();
+	if (NULL != pszDll) {
+		DllMap::iterator it = m_pDlls->find(pszDll);
+		if (it == m_pDlls->end()) {
+			SoapDll dll;
+			bool bLoad = dll.load(pszDll);
+			if (bLoad) {
+				const mod_gsoap_interface *pInterface = dll.gsoap_interface();
+				int nRet = 0;
+				if (NULL != pInterface && NULL != pInterface->fmod_gsoap_init) {
+					nRet = (*pInterface->fmod_gsoap_init)();
+					if (0 != nRet) {
+						char szBuf[256];
+						sprintf(szBuf, "failed to initialize %s: mod_gsoap_init returned %d", (const char *)pszDll, nRet);
+						m_strError = szBuf;
+					}
+				}
+				if (0 == nRet) {
+					it = m_pDlls->insert(DllMap::value_type(pszDll, dll)).first;
+				}
+			} else {
+				m_strError = dll.getLastError();
+			}
+		}
+		if (it != m_pDlls->end()) {
+			const SoapDll& dll = it->second;
+			pIntf = dll.gsoap_interface();
+			if (NULL == pIntf) {
+				m_strError = dll.getLastError();
+			}
+		}
+	}
+    return pIntf;
+}
diff --git a/mod_gsoap/gsoap_win/isapi/gsoap/ISAPI_SoapServerFactory.h b/mod_gsoap/gsoap_win/isapi/gsoap/ISAPI_SoapServerFactory.h
new file mode 100644
index 0000000..dab8563
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/gsoap/ISAPI_SoapServerFactory.h
@@ -0,0 +1,83 @@
+/** Interface for the ISAPI_SoapServerFactory class
+  * @file ISAPI_SoapServerFactory.h
+  * @author Christian Aberger 
+  * Copyright (C) 2001 WebWare (http://www.webware.at) 
+  */
+#ifndef SoapServerFactory_H
+#define SoapServerFactory_H
+#include <string>
+#include <httpext.h>
+#include "stdsoap2.h"
+
+typedef SOAP_FMAC1 void (SOAP_FMAC2 *isapi_gsoap_server_fn)(struct soap *); ///< calls soap_serve inside shared library 
+typedef SOAP_FMAC1 void (SOAP_FMAC2 *isapi_soap_delete_fn)(struct soap*, void*);
+typedef SOAP_FMAC1 int (SOAP_FMAC2 *isapi_soap_register_plugin_fn)(struct soap*, int (*fcreate)(struct soap *, struct soap_plugin *, void*), void *arg);
+typedef SOAP_FMAC1 void* SOAP_FMAC2 (*isapi_soap_lookup_plugin_fn)(struct soap*, const char*);
+
+extern "C" {
+	typedef int (*mod_gsoap_init_fn)();
+	typedef int (*mod_gsoap_terminate_fn)();
+}
+class mod_gsoap_interface {
+public:
+	mod_gsoap_interface();
+	mod_gsoap_interface(const mod_gsoap_interface&); ///< copy constructor.
+	mod_gsoap_interface& operator=(const mod_gsoap_interface&); ///< assignment operator
+	bool linked() const; 
+public:
+    isapi_gsoap_server_fn fsoap_init;
+    isapi_gsoap_server_fn fsoap_serve;
+    isapi_soap_delete_fn  fsoap_delete;
+    isapi_gsoap_server_fn fsoap_done;
+    isapi_gsoap_server_fn fsoap_end;
+	isapi_soap_register_plugin_fn fsoap_register_plugin_arg;
+	isapi_soap_lookup_plugin_fn fsoap_lookup_plugin;
+	mod_gsoap_init_fn fmod_gsoap_init;
+	mod_gsoap_terminate_fn fmod_gsoap_terminate;
+
+    void *reserved;
+};
+
+/** a dynamic link library containing the gsoap entry points soap_init, soap_server etc. */
+class SoapDll {
+public:
+    SoapDll(); ///< constructor
+    SoapDll(const SoapDll&); ///< copy constructor
+    virtual ~SoapDll(); ///< virtual destructor.
+
+    SoapDll& operator=(const SoapDll&); ///< assignment operator
+    bool load(const char *pszPath); ///< dynamically load this dll.
+    bool unload(); ///< dynamically load this dll.
+	const mod_gsoap_interface *gsoap_interface() const; ///< @return the function pointers for calling into this dll. 
+	const char *getLastError() const; ///< @return the latest error message that occurred.
+protected:
+	bool GetEntryPoints(const char *pszPath);
+protected:
+    HMODULE m_hDll; ///< the handle if the dll is already loaded.
+	std::string m_strLastError; ///< last error message for error reporting
+	mod_gsoap_interface m_interface;
+};
+
+/** Factory object that creates the appropriate server for a given QueryString.
+    See documentation of the createServer function for details of how the 
+    QueryString is evaluated.
+  */
+class ISAPI_SoapServerFactory {
+public:
+	static ISAPI_SoapServerFactory *instance(); ///< it is a singleton
+	void shutdown();
+
+	const mod_gsoap_interface *getInterface(const char *pszDll);
+    const char *getLastError(); ///< return the error message if the last operation failed.
+protected:
+	ISAPI_SoapServerFactory();
+	~ISAPI_SoapServerFactory();
+	bool GetEntryPoints();
+protected:
+	class DllMap *m_pDlls;
+    std::string m_strError;
+	static ISAPI_SoapServerFactory *m_pInstance;
+	CRITICAL_SECTION m_cs;
+};
+
+#endif // SoapServerFactory_H
diff --git a/mod_gsoap/gsoap_win/isapi/gsoap/casecmpless.h b/mod_gsoap/gsoap_win/isapi/gsoap/casecmpless.h
new file mode 100644
index 0000000..9154402
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/gsoap/casecmpless.h
@@ -0,0 +1,18 @@
+/** Interface for the casecmpless struct
+    @file casecmpless.h
+  */
+#ifndef CASECMPLESS_H
+#define CASECMPLESS_H
+
+/** helper for case-insensitive less<> operator for the map<> template.*/
+struct casecmpless {
+	bool operator()(const std::string &s1, const std::string &s2) const { 
+#ifdef _WIN32
+		return stricmp(s1.c_str(), s2.c_str()) < 0;
+#else
+		return strcasecmp(s1.c_str(), s2.c_str()) < 0;
+#endif
+	};
+};
+
+#endif //CASECMPLESS_H
diff --git a/mod_gsoap/gsoap_win/isapi/gsoap/isapi.cpp b/mod_gsoap/gsoap_win/isapi/gsoap/isapi.cpp
new file mode 100644
index 0000000..00d74a8
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/gsoap/isapi.cpp
@@ -0,0 +1,24 @@
+/** ISAPI extension entry points.
+  * @file isapi.cpp
+  */
+#include "ISAPI_Server.h"
+
+/** called for every request to this dll */
+DWORD WINAPI HttpExtensionProc(EXTENSION_CONTROL_BLOCK *pECB) {
+    return ISAPI_Server::HttpExtensionProc(pECB);
+}
+/** The required ISAPI Extension DLL entry point.
+    @pVer points to extension version info structure 
+    @return always returns TRUE
+  */
+BOOL WINAPI GetExtensionVersion(HSE_VERSION_INFO *pVer) {
+    // set version to httpext.h version constants
+    pVer->dwExtensionVersion = MAKELONG(HSE_VERSION_MINOR, HSE_VERSION_MAJOR);
+    return ISAPI_Server::GetExtensionVersion(pVer);
+}       
+/** Last call from IIS before the extension is terminated.
+  */
+BOOL WINAPI TerminateExtension(DWORD dwFlags) {
+    return ISAPI_Server::TerminateExtension(dwFlags);
+}
+
diff --git a/mod_gsoap/gsoap_win/isapi/gsoap/isapi.def b/mod_gsoap/gsoap_win/isapi/gsoap/isapi.def
new file mode 100644
index 0000000..6923f92
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/gsoap/isapi.def
@@ -0,0 +1,5 @@
+; declare the module exports for the ISAPI DLL.
+EXPORTS
+	HttpExtensionProc
+	GetExtensionVersion
+	TerminateExtension
diff --git a/mod_gsoap/gsoap_win/isapi/gsoap/isapi.dsp b/mod_gsoap/gsoap_win/isapi/gsoap/isapi.dsp
new file mode 100644
index 0000000..5daaad9
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/gsoap/isapi.dsp
@@ -0,0 +1,166 @@
+# Microsoft Developer Studio Project File - Name="isapi" - Package Owner=<4>

+# Microsoft Developer Studio Generated Build File, Format Version 6.00

+# ** NICHT BEARBEITEN **

+

+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102

+

+CFG=isapi - Win32 Debug

+!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE

+!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl

+!MESSAGE 

+!MESSAGE NMAKE /f "isapi.mak".

+!MESSAGE 

+!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben

+!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:

+!MESSAGE 

+!MESSAGE NMAKE /f "isapi.mak" CFG="isapi - Win32 Debug"

+!MESSAGE 

+!MESSAGE Für die Konfiguration stehen zur Auswahl:

+!MESSAGE 

+!MESSAGE "isapi - Win32 Release" (basierend auf  "Win32 (x86) Dynamic-Link Library")

+!MESSAGE "isapi - Win32 Debug" (basierend auf  "Win32 (x86) Dynamic-Link Library")

+!MESSAGE 

+

+# Begin Project

+# PROP AllowPerConfigDependencies 0

+# PROP Scc_ProjName ""

+# PROP Scc_LocalPath ""

+CPP=cl.exe

+MTL=midl.exe

+RSC=rc.exe

+

+!IF  "$(CFG)" == "isapi - Win32 Release"

+

+# PROP BASE Use_MFC 0

+# PROP BASE Use_Debug_Libraries 0

+# PROP BASE Output_Dir "Release"

+# PROP BASE Intermediate_Dir "Release"

+# PROP BASE Target_Dir ""

+# PROP Use_MFC 0

+# PROP Use_Debug_Libraries 0

+# PROP Output_Dir "Release"

+# PROP Intermediate_Dir "Release"

+# PROP Ignore_Export_Lib 0

+# PROP Target_Dir ""

+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ISAPI_EXPORTS" /YX /FD /c

+# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ISAPI_EXPORTS" /FD /c

+# SUBTRACT CPP /YX /Yc /Yu

+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32

+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32

+# ADD BASE RSC /l 0x407 /d "NDEBUG"

+# ADD RSC /l 0x407 /d "NDEBUG"

+BSC32=bscmake.exe

+# ADD BASE BSC32 /nologo

+# ADD BSC32 /nologo

+LINK32=link.exe

+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386

+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\mod_gsoap.dll"

+

+!ELSEIF  "$(CFG)" == "isapi - Win32 Debug"

+

+# PROP BASE Use_MFC 0

+# PROP BASE Use_Debug_Libraries 1

+# PROP BASE Output_Dir "Debug"

+# PROP BASE Intermediate_Dir "Debug"

+# PROP BASE Target_Dir ""

+# PROP Use_MFC 0

+# PROP Use_Debug_Libraries 1

+# PROP Output_Dir "Debug"

+# PROP Intermediate_Dir "Debug"

+# PROP Ignore_Export_Lib 0

+# PROP Target_Dir ""

+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ISAPI_EXPORTS" /YX /FD /GZ /c

+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ISAPI_EXPORTS" /FD /GZ /c

+# SUBTRACT CPP /YX /Yc /Yu

+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32

+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32

+# ADD BASE RSC /l 0x407 /d "_DEBUG"

+# ADD RSC /l 0x407 /d "_DEBUG"

+BSC32=bscmake.exe

+# ADD BASE BSC32 /nologo

+# ADD BSC32 /nologo

+LINK32=link.exe

+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept

+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /map /debug /machine:I386 /out:"../Debug/mod_gsoap.dll" /pdbtype:sept

+

+!ENDIF 

+

+# Begin Target

+

+# Name "isapi - Win32 Release"

+# Name "isapi - Win32 Debug"

+# Begin Group "Source Files"

+

+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"

+# Begin Source File

+

+SOURCE=.\HttpContext.cpp

+# SUBTRACT CPP /YX /Yc /Yu

+# End Source File

+# Begin Source File

+

+SOURCE=.\isapi.cpp

+# End Source File

+# Begin Source File

+

+SOURCE=.\isapi.def

+# End Source File

+# Begin Source File

+

+SOURCE=.\ISAPI_HttpContext.cpp

+# End Source File

+# Begin Source File

+

+SOURCE=.\ISAPI_Server.cpp

+# End Source File

+# Begin Source File

+

+SOURCE=.\ISAPI_SoapServerFactory.cpp

+# End Source File

+# Begin Source File

+

+SOURCE=.\isapistream.cpp

+# End Source File

+# End Group

+# Begin Group "Header Files"

+

+# PROP Default_Filter "h;hpp;hxx;hm;inl"

+# Begin Source File

+

+SOURCE=.\casecmpless.h

+# End Source File

+# Begin Source File

+

+SOURCE=.\HttpContext.h

+# End Source File

+# Begin Source File

+

+SOURCE=.\ISAPI_HttpContext.h

+# End Source File

+# Begin Source File

+

+SOURCE=.\ISAPI_Server.h

+# End Source File

+# Begin Source File

+

+SOURCE=.\ISAPI_SoapServerFactory.h

+# End Source File

+# Begin Source File

+

+SOURCE=.\isapistream.h

+# End Source File

+# Begin Source File

+

+SOURCE=.\opsysadjust.h

+# End Source File

+# End Group

+# Begin Group "Resource Files"

+

+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"

+# Begin Source File

+

+SOURCE=.\isapisoap.rc

+# End Source File

+# End Group

+# End Target

+# End Project

diff --git a/mod_gsoap/gsoap_win/isapi/gsoap/isapi.dsw b/mod_gsoap/gsoap_win/isapi/gsoap/isapi.dsw
new file mode 100644
index 0000000..46f066b
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/gsoap/isapi.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00

+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!

+

+###############################################################################

+

+Project: "isapi"=.\isapi.dsp - Package Owner=<4>

+

+Package=<5>

+{{{

+}}}

+

+Package=<4>

+{{{

+}}}

+

+###############################################################################

+

+Global:

+

+Package=<5>

+{{{

+}}}

+

+Package=<3>

+{{{

+}}}

+

+###############################################################################

+

diff --git a/mod_gsoap/gsoap_win/isapi/gsoap/isapisoap.rc b/mod_gsoap/gsoap_win/isapi/gsoap/isapisoap.rc
new file mode 100644
index 0000000..e124697
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/gsoap/isapisoap.rc
@@ -0,0 +1,109 @@
+//Microsoft Developer Studio generated resource script.

+//

+#include "resource.h"

+

+#define APSTUDIO_READONLY_SYMBOLS

+/////////////////////////////////////////////////////////////////////////////

+//

+// Generated from the TEXTINCLUDE 2 resource.

+//

+#include "afxres.h"

+

+/////////////////////////////////////////////////////////////////////////////

+#undef APSTUDIO_READONLY_SYMBOLS

+

+/////////////////////////////////////////////////////////////////////////////

+// Deutsch (Österreich) resources

+

+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEA)

+#ifdef _WIN32

+LANGUAGE LANG_GERMAN, SUBLANG_GERMAN_AUSTRIAN

+#pragma code_page(1252)

+#endif //_WIN32

+

+#ifndef _MAC

+/////////////////////////////////////////////////////////////////////////////

+//

+// Version

+//

+

+VS_VERSION_INFO VERSIONINFO

+ FILEVERSION 1,0,0,2

+ PRODUCTVERSION 1,0,0,2

+ FILEFLAGSMASK 0x3fL

+#ifdef _DEBUG

+ FILEFLAGS 0x1L

+#else

+ FILEFLAGS 0x0L

+#endif

+ FILEOS 0x40004L

+ FILETYPE 0x2L

+ FILESUBTYPE 0x0L

+BEGIN

+    BLOCK "StringFileInfo"

+    BEGIN

+        BLOCK "0c0704b0"

+        BEGIN

+            VALUE "Comments", "open source gsoap dll to run gsoap servers under iis\0"

+            VALUE "CompanyName", "WebWare\0"

+            VALUE "FileDescription", "SOAP extension for Internet Information Server\0"

+            VALUE "FileVersion", "1, 0, 0, 2\0"

+            VALUE "InternalName", "gsoap\0"

+            VALUE "LegalCopyright", "Copyright © 2001-2003 Aberger http://www.aberger.at/SOAP\0"

+            VALUE "LegalTrademarks", "\0"

+            VALUE "OriginalFilename", "gsoap.dll\0"

+            VALUE "PrivateBuild", "\0"

+            VALUE "ProductName", "WebWare SOAP extension dll\0"

+            VALUE "ProductVersion", "1, 0, 0, 2\0"

+            VALUE "SpecialBuild", "\0"

+        END

+    END

+    BLOCK "VarFileInfo"

+    BEGIN

+        VALUE "Translation", 0xc07, 1200

+    END

+END

+

+#endif    // !_MAC

+

+

+#ifdef APSTUDIO_INVOKED

+/////////////////////////////////////////////////////////////////////////////

+//

+// TEXTINCLUDE

+//

+

+1 TEXTINCLUDE DISCARDABLE 

+BEGIN

+    "resource.h\0"

+END

+

+2 TEXTINCLUDE DISCARDABLE 

+BEGIN

+    "#include ""afxres.h""\r\n"

+    "\0"

+END

+

+3 TEXTINCLUDE DISCARDABLE 

+BEGIN

+    "\r\n"

+    "\0"

+END

+

+#endif    // APSTUDIO_INVOKED

+

+#endif    // Deutsch (Österreich) resources

+/////////////////////////////////////////////////////////////////////////////

+

+

+

+#ifndef APSTUDIO_INVOKED

+/////////////////////////////////////////////////////////////////////////////

+//

+// Generated from the TEXTINCLUDE 3 resource.

+//

+

+

+/////////////////////////////////////////////////////////////////////////////

+#endif    // not APSTUDIO_INVOKED

+

diff --git a/mod_gsoap/gsoap_win/isapi/gsoap/isapistream.cpp b/mod_gsoap/gsoap_win/isapi/gsoap/isapistream.cpp
new file mode 100644
index 0000000..2d792cb
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/gsoap/isapistream.cpp
@@ -0,0 +1,80 @@
+/** Implementation of the isapistream class.
+  * @file isapistream.cpp
+  * @author Christian Aberger 
+  * Copyright (C) 2001 WebWare (http://www.webware.at) 
+  */
+#include "isapistream.h"
+#include <cassert>
+using namespace std;
+
+isapistreambuf::isapistreambuf(EXTENSION_CONTROL_BLOCK *pECB)
+: _pECB(pECB) 
+{
+    static const int nMinBufSize = 1024;
+    assert(NULL != pECB);
+    setp(_obuf, _obuf + sizeof _obuf);
+
+    _cbTotalBytes = pECB->cbTotalBytes;
+    _ibuflen = pECB->cbAvailable > nMinBufSize ? pECB->cbAvailable : nMinBufSize;
+    _ibuf = new char[_ibuflen + 1]; // we allocate it one byte more, adding a trailing '\0', then it is easier with strings
+    memset(_ibuf, 0, _ibuflen + 1);
+    memcpy(_ibuf, pECB->lpbData, pECB->cbAvailable);
+    _cbRead = pECB->cbAvailable;
+    setg(_ibuf, _ibuf, _ibuf + _cbRead);
+}
+isapistreambuf::~isapistreambuf() {
+    delete _ibuf;
+}
+int isapistreambuf::sync() {
+	BOOL bWrite = TRUE;
+	if (NULL != _pECB) {
+		DWORD dwBytesWritten = pptr() - pbase();
+		if (dwBytesWritten) {
+			bWrite = _pECB->WriteClient(_pECB->ConnID, (PVOID)_obuf, &dwBytesWritten, 0);
+			setp(_obuf, _obuf + sizeof _obuf);
+		}
+	}
+	return bWrite ? 0 : -1;
+}
+int isapistreambuf::overflow(int ch) {
+    if (char_traits<char>::eof() == ch) {
+        return streambuf::overflow(ch);
+    }
+    if (pptr() < epptr()) {
+        return sputc(ch);
+    }
+    int ret = sync();
+    if (0 == ret && char_traits<char>::eof() != ch) {
+        sputc(ch);
+    }
+    return ret;
+}
+int isapistreambuf::underflow() {
+    int retval = char_traits<char>::eof();
+    if (gptr() < egptr()) {
+        //retval = snextc();
+		retval = sgetc();
+    } else {
+        if (_cbRead < _cbTotalBytes) {
+            memset(_ibuf, 0, _ibuflen + 1);
+            DWORD dwLen = _ibuflen;
+            BOOL bRead = (*_pECB->ReadClient)(_pECB->ConnID, _ibuf, &dwLen);
+            if (bRead && dwLen > 0) {
+                _cbRead += dwLen;
+                setg(_ibuf, _ibuf, _ibuf + dwLen);
+                //retval = snextc();
+				retval = sgetc();
+            }
+        }
+    }
+    return retval;
+}
+isapistream::~isapistream() {
+}
+EXTENSION_CONTROL_BLOCK *isapistreambuf::ECB() {
+    return _pECB;
+}
+EXTENSION_CONTROL_BLOCK *isapistream::ECB() {
+    return _buf.ECB();
+}
+
diff --git a/mod_gsoap/gsoap_win/isapi/gsoap/isapistream.h b/mod_gsoap/gsoap_win/isapi/gsoap/isapistream.h
new file mode 100644
index 0000000..082c855
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/gsoap/isapistream.h
@@ -0,0 +1,58 @@
+/** Interface for the isapistream class
+  * @file isapistream.h
+  * @author Christian Aberger 
+  * Copyright (C) 2001 WebWare (http://www.webware.at) 
+  */
+#ifndef _ISAPISTREAM_H_1DCECA02_E2F0_11d4_83AA_00A0CCD4FF57
+#define _ISAPISTREAM_H_1DCECA02_E2F0_11d4_83AA_00A0CCD4FF57
+
+#include <httpext.h>
+#include <iostream>
+
+/** a streambuf wrapper for the ISAPI-Extension control block.
+ */
+class isapistreambuf : public std::streambuf {
+public:
+    /** constructor */
+    isapistreambuf(EXTENSION_CONTROL_BLOCK *pECB);
+    /** destructor */
+    ~isapistreambuf();
+
+    EXTENSION_CONTROL_BLOCK *ECB();
+protected:
+    virtual int sync(); ///< flush contents to isapi
+    virtual int overflow(int ch); ///< flush contents and write ch
+    virtual int underflow();
+	int showmanyc() {return _cbTotalBytes - _cbRead;}
+protected:
+    EXTENSION_CONTROL_BLOCK *_pECB; ///< see ISAPI documentation for details
+    char _obuf[1024]; ///< output buffer
+    char *_ibuf; ///< input buffer
+    unsigned int _ibuflen; ///< length of input buffer.
+    unsigned int _cbTotalBytes; ///< total input bytes in the request.
+    unsigned int _cbRead; ///< total bytes read from ECB already.
+};
+
+/** ISAPI input/output stream.
+    It can be used anywhere like cout is used, the output goes to the client browser.
+ */
+class isapistream : public std::iostream {
+public:
+    typedef std::iostream super;
+	/** constructor.
+		@param pECB the extension control block received as a parameter of HttpExtensionProc 
+	  */
+    isapistream(EXTENSION_CONTROL_BLOCK *pECB) : super(&_buf), _buf(pECB) {}
+
+	/**	destructor */
+    virtual ~isapistream();
+
+    EXTENSION_CONTROL_BLOCK *ECB(); ///< @return the EXTENSION_CONTROL_BLOCK wrapped by this
+protected:
+    isapistreambuf _buf;
+private:
+	isapistream(isapistream&); ///< not implemented.
+	isapistream& operator=(const isapistream&); ///< not implemented.
+};
+
+#endif //_ISAPISTREAM_H_1DCECA02_E2F0_11d4_83AA_00A0CCD4FF57
diff --git a/mod_gsoap/gsoap_win/isapi/gsoap/opsysadjust.h b/mod_gsoap/gsoap_win/isapi/gsoap/opsysadjust.h
new file mode 100644
index 0000000..20ab84b
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/gsoap/opsysadjust.h
@@ -0,0 +1,15 @@
+/** windoze adaption header file, because that one is missing posix.
+    @file opsysadjust.h
+ */
+
+#ifdef _WIN32
+
+#if _MSC_VER > 1000
+    #pragma warning (disable:4786)
+#endif
+/** C-standard interface for case insensitive compare */
+inline int strcasecmp(const char *psz1, const char *psz2) {
+    return stricmp(psz1, psz2);
+}
+
+#endif //_WIN32
\ No newline at end of file
diff --git a/mod_gsoap/gsoap_win/isapi/gsoap/resource.h b/mod_gsoap/gsoap_win/isapi/gsoap/resource.h
new file mode 100644
index 0000000..2715cf8
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/gsoap/resource.h
@@ -0,0 +1,15 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by isapisoap.rc
+//
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        101
+#define _APS_NEXT_COMMAND_VALUE         40001
+#define _APS_NEXT_CONTROL_VALUE         1000
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif
diff --git a/mod_gsoap/gsoap_win/isapi/iis_index.html b/mod_gsoap/gsoap_win/isapi/iis_index.html
new file mode 100644
index 0000000..71176e6
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/iis_index.html
@@ -0,0 +1,229 @@
+<html>

+

+<head>

+<meta name="robots" content="index,follow">

+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

+<title>SOAP ISAPI extension</title>

+</head>

+

+<body>

+

+<h1 align="center"><font face="Verdana">mod_gsoap ISAPI Extension</font></h1>

+<p><font face="Verdana"><a href="http://www.cs.fsu.edu/~engelen/soap.html">gsoap</a>

+is an open source project that can be used to generate </font><font face="Verdana"> <b>S</b>imple <b>O</b>bject <b>A</b>ccess <b>P</b>rotocol

+(<a href="http://www.w3c.org/TR/SOAP">SOAP</a>) clients and servers. <a href="http://www.aberger.at/SOAP"> mod_gsoap</a>

+allows you to run these services integrated in process inside the Microsoft Internet

+Information server.&nbsp;It is implemented as an ISAPI extension dll and so can

+be run together with all other services on IIS.</font></p>

+<h2><font face="Verdana">Overview</font></h2>

+<p align="left"><font face="Verdana">There is an open source project at <a href="http://www.cs.fsu.edu/~engelen/soap.html">http://www.cs.fsu.edu/~engelen/soap.html</a>

+ which implements SOAP in C++. Servers created there can be run standalone or as

+cgi. This is a contribution to get a production quality Web service for MS-Internet Information

+Server that drives SOAP servers. All the source code and

+documentation is available for download.</font></p>

+<p align="left"><font face="Verdana">Existing gsoap servers can be compiled <u>without

+any change</u> in the source code to run inside IIS. There is one dll, mod_gsoap.dll, an Isapi extension that serves SOAP

+requests. From the query string in the request the extension finds out which server should be used

+and the appropriate server dll (dynamic link library) is dynamically loaded at

+runtime, if not already present. This SOAP server creates the response which is

+sent back to the client by IIS.</font></p>

+<p align="left"><font face="Verdana">To add more servers only the new dlls need

+to be compiled, the ISAPI interface need not be changed for that, the Web

+Service not even restarted.&nbsp;</font></p>

+<p align="left"><font face="Verdana">This distribution contains also the

+standard gsoap calc.h - server to demonstrate operation.&nbsp;The source code of

+that example was not changed from the standard distribution.</font></p>

+<p align="left"><font face="Verdana">Once your gsoap service works as a

+standalone application, you only need to recompile it as a dll and copy that dll

+to your IIS - virtual directory.&nbsp;</font></p>

+<p align="left"><font face="Verdana"> In spite of that instructions can be found

+<a href="#iisdebug"> below</a> for debugging the IIS extension under Windows™ 2000 and XP.&nbsp;</font></p>

+<h2><font face="Verdana">Requirements&nbsp;</font></h2>

+<p><font face="Verdana">To build the mod_gsoap ISAPI extension for Windows you need the following:</font></p>

+<ul>

+  <li><font face="Verdana">gsoap 2.3.8 or higher from </font>

+    <font face="Verdana"><a href="http://www.cs.fsu.edu/~engelen/soap.html" target="_blank">gsoap</a>

+ </font>

+  <li><font face="Verdana">mod_gsoap_win_0_0_2.zip from <a href="http://www.aberger.at/SOAP/mod_gsoap_win_0_0_2.zip">http://www.aberger.at/SOAP/mod_gsoap_win_0_0_2.zip</a></font>

+</ul>

+<p><font face="Verdana">To run mod_gsoap ISAPI extension you need either Windows™ NT

+4.0 with Windows™ NT Option Pack 4.0, Windows™ 2000 or Windows XP or higher, where IIS™ is

+integrated.</font></p>

+<h2><font face="Verdana">Installation and testing&nbsp;</font></h2>

+<h3><font face="Verdana">Unpack and/or compile the mod_gsoap.dll ISAPI extension</font></h3>

+<ul>

+  <li><font face="Verdana">Unpack the mod_gsoap_win_*.zip package.</font></li>

+  <li><font face="Verdana">Make sure that gsoap 2.1.8 or higher is unpacked on

+    your computer.</font></li>

+  <li><font face="Verdana">The package already contains the compiled

+    mod_gsoap.dll, so if you don't want to compile it yourself you can skip the next few

+    lines and continue with <a href="#iisinstall">installation</a>.</font></li>

+  <li><font face="Verdana">Open Visual Studio C++ 6.0</font></li>

+  <li><font face="Verdana">Go to &quot;Tools|Options&quot;. Activate the

+    &quot;Directories&quot; Panel.&nbsp;</font></li>

+  <li><font face="Verdana">Select&nbsp; &quot;Include Files&quot; from the

+    dropdown and add your soapcpp directory (the one where you have unoacked

+    soap 2.18 or higher). This will let the compiler find stdsoap2.H</font></li>

+  <li><font face="Verdana">Select &quot;Executable Path&quot; and add the same

+    directory also there. This will let Visual Studio find soapcpp2.exe</font></li>

+  <li><font face="Verdana">Open all4iis.dsw</font></li>

+  <li><font face="Verdana">Activate the &quot;all4iis&quot; project and build

+    all.</font></li>

+</ul>

+<h3><a name="iisinstall"><font face="Verdana">Installation of mod_gsoap.dll ISAPI extension

+on your IIS Server</font></a></h3>

+<ul>

+  <li><font face="Verdana">Add a gsoap folder to your wwwroot directory (e.g.

+    C:\Inetpub\wwwroot\gsoap)</font></li>

+  <li><font face="Verdana">Open Internet Service Manager from Control

+    Panel-&gt;Administrative tools.&nbsp;</font></li>

+  <li><font face="Verdana">Create in Internet Service Manager a new virtual

+    directory called &quot;gsoap&quot; (details <a href="#vroot">here</a> and

+    also on the <a href="images/gsoapvdir.png">Screen Snapshot</a>).</font></li>

+  <li><font face="Verdana">Copy mod_gsoap.dll and calc.dll to the created gsoap

+    folder (C:\Inetpub\wwwroot\gsoap)</font></li>

+  <li><font face="Verdana">Start the &quot;World Wide Web Publishing

+    Service&quot;</font></li>

+  <li><font face="Verdana">Enter in your browser &quot;<a href="http://localhost/gsoap/mod_gsoap.dll">http://localhost/gsoap/mod_gsoap.dll</a>&quot;.

+    This should give a response from the server that explains what the correct url is. If so this proves that mod_gsoap.dll is configured correctly.</font></li>

+  <li><font face="Verdana">Next enter in your browser &quot;<a href="http://localhost/gsoap/mod_gsoap.dll?calc">http://localhost/gsoap/mod_gsoap.dll?calc</a>&quot;.

+    This should give a response from the server that you should use a POST

+    command, not a GET. This proves that mod_gsoap could load your server dll. So in principle your installation seems to be OK now.</font></li>

+  <li><font face="Verdana">Check the file .\isapi\samples\calc\calcclnt.c

+    The URL there must corrspond to your installation. Check the line:<br>

+    </font><font face="Courier">const char server[] = &quot;<font color="#FF0000">http://localhost//gsoap/mod_gsoap.dll?calc</font>&quot;;</font></li>

+  <li><font face="Verdana">Open a DOS - command window and change to the

+    directory where calcclnt.exe has been build within the all4iis project.

+    Enter &quot;calcclnt add 3 5&quot;.</font></li>

+  <li><font face="Verdana">Check that the response is:

+    &quot;result=8&quot;. If so: Done!&nbsp;</font></li>

+  <li><font face="Verdana">If not so please read the <a href="#FAQ">FAQ</a>.&nbsp;</font></li>

+</ul>

+<p>There is also a dime sample in the code that shows you how to send and receive dime attachments (binary files etc). 

+This sample also shows how to use module initializer and terminators. When the dll is loaded into IIS for the first time the function mod_gsoap_init is called. 

+Here you can initialize database connections or whatever you like. mod_gsoap_terminate is called when the dll is unloaded again. A good place to clean up.</p>

+<h2><font face="Verdana">Compiling your own gsoap - Servers for use with

+mod_gsoap</font></h2>

+<ul>

+  <li><font face="Verdana">Build and test your standalone gsoap server as

+    documented in </font><font face="Verdana"><a href="http://www.cs.fsu.edu/~engelen/soap.html">gsoap</a>.&nbsp; </font></li>

+  <li><font face="Verdana">Make sure that your Visual Studio include and

+    executable paths is correct as described above.</font></li>

+  <li><font face="Verdana">In Visual Studio C++ 6.0 select &quot;File|New&quot;.

+    Create a new empty Win32 - Dynamic Link Library.</font></li>

+  <li><font face="Verdana">Copy <a name="stdsoap2.def"> stdsoap2.def</a> from the .\isapi\samples\calc example to your

+    project directory and add it to the project. This will ensure that the

+    required functions (soap_init, soap_serve etc) are exported from the dll.</font></li>

+  <li><font face="Verdana">Compile it</font></li>

+  <li><font face="Verdana">Copy it to the ...wwwroot/gsoap directory described

+    above.&nbsp;</font></li>

+  <li><font face="Verdana">Done!</font></li>

+</ul>

+<p><font face="Verdana">The <a href="#urlconstruction">URL</a> for the new

+servers is always &quot;<a href="http://localhost//gsoap/mod_gsoap.dll?mydll"></a></font><font color="#FF0000" face="Courier"><a href="http://localhost//gsoap/mod_gsoap.dll?mydll">http://localhost/gsoap/mod_gsoap.dll?mydll</a>&quot;

+</font><font face="Verdana">where mydll is the name of our dll <u>without</u>

+the .dll extension.</font></p>

+<h4><font face="Verdana"><a name="vroot">Details for creating the virtual root</a></font></h4>

+<p><font face="Verdana">If you have problems creating the virtual root as

+descibed above here a short how-to: Open from control panel &quot;Administrative Tools&quot;

+and then &quot;Internet Services Manager&quot; (under Windows™ NT 4.0 you find it

+in the Option Pack submenus). Click with the right mouse button on &quot;Default

+Web Site&quot;, then select &quot;New&quot; and &quot;Virtual Directory&quot;.

+Click &quot;Next&quot; and enter as Alias the name you want to give to the url,

+e.g. &quot;soap&quot;, press &quot;Next&quot; again. Then browse for the

+directory where your dll that you have built in the previous step is, for

+example &quot;c:\Inetpub\wwwroot\gsoap&quot;. Press

+&quot;Next&quot;, then in the access permissions, disable all permissions except

+&quot;Excute (such as ISAPI applications or CGI)&quot;, this must be enabled.

+Click &quot;Next&quot; and &quot;Finish&quot;. For testing it might be a good

+idea to enable the &quot;Browse&quot; permission and then browse to

+&quot;http://localhost/gsoap&quot;.&nbsp;&nbsp;</font></p>

+<h3><font face="Verdana"><a name="urlconstruction">How the url of the request is constructed</a></font></h3>

+<p><font face="Verdana">The ISAPI SOAP Binding can run together with all other

+Internet services on your machine on port 80 (or any other, as configured in

+IIS). It is an extension for IIS. The request your SOAP client must submit is

+made up of 2 parts. Here is an example:</font></p>

+<p><font face="Courier New"> &quot;http://127.0.0.1/gsoap/mod_gsoap.dll?mySoap&quot;</font><font face="Verdana">&nbsp;</font></p>

+<p><font face="Verdana">The part before the question mark '?' is the url for the

+isapi binding dll. This is evaluated by IIS. In this sample the service is on

+the same machine as the server. Instead of &quot;127.0.0.1&quot; you can use the

+DNS address of your server, of course. gsoap is the virtual root created above

+and mod_gsoap.dll is the generic ISAPI binding from this contribution. The

+extension mod_gsoap.dll evaluates the part behind the '?', which is in this example

+mySoap. To this the string &quot;.dll&quot; is appended and the dll is loaded. Due

+to security reasons only dlls from the same directory are allowed. If you want to do special

+initialization in your dll you may want to add and export a &quot;DllMain&quot;

+function, which will be called when the IIS process attaches to your all and

+before it detaches it. Do not rely on the Thread attach/detach callback, in my

+experience IIS does not always call DllMain in your dll if these threads were

+already in the thread pool before your dll was loaded. Use thread local storage

+instead.</font></p>

+<font face="Verdana">

+<H2><a name="iisdebug">Development and Debugging</a></H2>

+<p>There are a lot to say about debugging of course. Please make sure that your

+gsoap server works as a standalone server and client before you continue to use

+it inside IIS.&nbsp;</p>

+<h3>IIS Debugging</h3>

+<P> For Debugging with Win2000 I added two .reg files, that switch 

+debugging of IIS on and off (see <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;q273639" target="_blank">Q273639</a>

+and related), and a start and stop command in the 

+Makefile to start and stop iis debugging. Make sure that the path to msdev is in the System environment

+variables (&quot;PATH&quot;) of the system account (not only of your own user

+account, this is not seen by IISAdmin).&nbsp;</P>

+<P>If you want to debug, you must set the dll to run 

+in-proccess. Right-click on the gsoap virtual root in internet service manager 

+and set the &quot;Appication Protection&quot; to &quot;Low (IIS Process)&quot;. 

+Remove the &quot;Enable Session State&quot; and buffering and Parent 

+Paths. Don't forget to allow the IISAdmin and WWW Service to interact with desktop. </P>        

+</font>

+<h2><font face="Verdana">Makefile</font></h2>

+<p><font face="Verdana">I added some commands to a Windoze &quot;Makefile&quot;.

+To make live easier. See the Makefile yourself, there are&nbsp; commands to start and

+stop debugging of IIS and cleaning the directory. The very advanced Windoze user can even compile

+everything without a mouse by running one command. Be sure that msdev.exe and nmake.exe are in your PATH.

+Then enter from the commandline:&nbsp; </font></p>

+<p><font face="Courier">nmake</font><font face="Verdana">&nbsp;</font></p>

+<p><font face="Verdana">Such advanced users should also consider to use the

+linux/unix version mod_gsoap.so, also available on <a href="http://mx.aberger.at/SOAP/apache_index.html"> this

+site</a>. ;-)</font></p>

+<p><font face="Verdana">Enjoy!</font></p>

+<p><font face="Verdana">with best regards <a href="http://www.aberger.at">Christian

+Aberger</a></font></p>

+<p>&nbsp;</p>

+<hr>

+<h1><a name="FAQ">Frequently asked questions</a></h1>

+<ol>

+  <li>Q: mod_gsoap answers properly in the browser. But then I get the following

+    output:</li>

+</ol>

+<p><font face="Courier New">C:\&gt;calcclnt.exe add 3 5<br>

+SOAP FAULT: SOAP-ENV:Client<br>

+&quot;End of file or no input&quot;<br>

+Detail: <a href="http://localhost/gsoap/mod_gsoap.dll?calc">http://localhost/gsoap/mod_gsoap.dll?calc</a><br>

+<br>

+</font>Answer:&nbsp;<br>

+Step one: Could you please compile calcclnt.exe with the DEBUG option.<br>

+(in Preprocessor Definitions add DEBUG).<br>

+Delete all .log files from the current directory if any. Then run<br>

+again calcclnt.exe add 3 5<br>

+<br>

+Then you should get 3 files with the extension &quot;.log&quot; in the current<br>

+directory. Please read what is in there.&nbsp;</p>

+<p>Step two: Make sure that dumpbin.exe is in your PATH (it can be found

+somewhere in Visual Studio 6.0 binaries).<br>

+Open a command shell, change&nbsp; to the directory where mod_gsoap.dll is

+located (C:\Inetpub\wwwroot\gsoap) and type the following:<br>

+dumpbin /exports calc.dll. This output should contain the exported symbols that are listed

+in the stdsoap2.def file. If you don't find these symbols you propably forgot to add the stdsoap2.def file

+described <a href="#stdsoap2.def">here</a>.</p>

+<p>&nbsp;</p>

+<p>&nbsp;</p>

+<p>&nbsp;</p>

+<p><br>

+</p>

+<p>&nbsp;</p>

+<p>&nbsp;</p>

+

+</body>

+

+</html>

diff --git a/mod_gsoap/gsoap_win/isapi/images/gsoapvdir.png b/mod_gsoap/gsoap_win/isapi/images/gsoapvdir.png
new file mode 100644
index 0000000..f851ce9
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/images/gsoapvdir.png
Binary files differ
diff --git a/mod_gsoap/gsoap_win/isapi/mod_gsoap.dll b/mod_gsoap/gsoap_win/isapi/mod_gsoap.dll
new file mode 100644
index 0000000..212a8e6
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/mod_gsoap.dll
Binary files differ
diff --git a/mod_gsoap/gsoap_win/isapi/samples/calc/Makefile b/mod_gsoap/gsoap_win/isapi/samples/calc/Makefile
new file mode 100644
index 0000000..81ff9d8
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/samples/calc/Makefile
@@ -0,0 +1,15 @@
+DELFILES= *.ncb *.opt *.plg *.clw *.pch *.aps \
+	*.nsmap *.xml *.wsdl ns.xsd \
+	RECV.log SENT.log TEST.log \
+	soapC.c?? soapcalcProxy.h soapClient.c?? soapServer.c?? soapStub.h soapH.h \
+	soapcalcObject.h soapClientLib.* soapServerLib.*
+
+
+all:
+	echo done
+
+clean:
+	-rmdir /s/q .\Debug
+	-rmdir /s/q .\Release
+	for %v in ($(DELFILES)) DO if exist %v del %v
+
diff --git a/mod_gsoap/gsoap_win/isapi/samples/calc/calc.dsp b/mod_gsoap/gsoap_win/isapi/samples/calc/calc.dsp
new file mode 100644
index 0000000..e91bbe5
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/samples/calc/calc.dsp
@@ -0,0 +1,202 @@
+# Microsoft Developer Studio Project File - Name="calc" - Package Owner=<4>

+# Microsoft Developer Studio Generated Build File, Format Version 6.00

+# ** NICHT BEARBEITEN **

+

+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102

+

+CFG=calc - Win32 Debug

+!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE

+!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl

+!MESSAGE 

+!MESSAGE NMAKE /f "calc.mak".

+!MESSAGE 

+!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben

+!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:

+!MESSAGE 

+!MESSAGE NMAKE /f "calc.mak" CFG="calc - Win32 Debug"

+!MESSAGE 

+!MESSAGE Für die Konfiguration stehen zur Auswahl:

+!MESSAGE 

+!MESSAGE "calc - Win32 Release" (basierend auf  "Win32 (x86) Dynamic-Link Library")

+!MESSAGE "calc - Win32 Debug" (basierend auf  "Win32 (x86) Dynamic-Link Library")

+!MESSAGE 

+

+# Begin Project

+# PROP AllowPerConfigDependencies 0

+# PROP Scc_ProjName ""

+# PROP Scc_LocalPath ""

+CPP=cl.exe

+MTL=midl.exe

+RSC=rc.exe

+

+!IF  "$(CFG)" == "calc - Win32 Release"

+

+# PROP BASE Use_MFC 0

+# PROP BASE Use_Debug_Libraries 0

+# PROP BASE Output_Dir "Release"

+# PROP BASE Intermediate_Dir "Release"

+# PROP BASE Target_Dir ""

+# PROP Use_MFC 0

+# PROP Use_Debug_Libraries 0

+# PROP Output_Dir "Release"

+# PROP Intermediate_Dir "Release"

+# PROP Ignore_Export_Lib 0

+# PROP Target_Dir ""

+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALC_EXPORTS" /Yu"stdafx.h" /FD /c

+# ADD CPP /nologo /MD /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALC_EXPORTS" /FD /c

+# SUBTRACT CPP /YX /Yc /Yu

+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32

+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32

+# ADD BASE RSC /l 0xc07 /d "NDEBUG"

+# ADD RSC /l 0xc07 /d "NDEBUG"

+BSC32=bscmake.exe

+# ADD BASE BSC32 /nologo

+# ADD BSC32 /nologo

+LINK32=link.exe

+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386

+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"../../Release/calc.dll"

+

+!ELSEIF  "$(CFG)" == "calc - Win32 Debug"

+

+# PROP BASE Use_MFC 0

+# PROP BASE Use_Debug_Libraries 1

+# PROP BASE Output_Dir "Debug"

+# PROP BASE Intermediate_Dir "Debug"

+# PROP BASE Target_Dir ""

+# PROP Use_MFC 0

+# PROP Use_Debug_Libraries 1

+# PROP Output_Dir "Debug"

+# PROP Intermediate_Dir "Debug"

+# PROP Ignore_Export_Lib 0

+# PROP Target_Dir ""

+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALC_EXPORTS" /Yu"stdafx.h" /FD /GZ /c

+# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALC_EXPORTS" /FD /GZ /c

+# SUBTRACT CPP /YX /Yc /Yu

+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32

+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32

+# ADD BASE RSC /l 0xc07 /d "_DEBUG"

+# ADD RSC /l 0xc07 /d "_DEBUG"

+BSC32=bscmake.exe

+# ADD BASE BSC32 /nologo

+# ADD BSC32 /nologo

+LINK32=link.exe

+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept

+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\Debug/calc.dll" /pdbtype:sept

+

+!ENDIF 

+

+# Begin Target

+

+# Name "calc - Win32 Release"

+# Name "calc - Win32 Debug"

+# Begin Group "Source Files"

+

+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"

+# Begin Source File

+

+SOURCE=.\calc.h

+

+!IF  "$(CFG)" == "calc - Win32 Release"

+

+# PROP Ignore_Default_Tool 1

+# Begin Custom Build - soapcpp2 $(InputPath) ...

+InputPath=.\calc.h

+

+BuildCmds= \

+	soapcpp2 -c $(InputPath)

+

+"soapC.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"soapServer.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"soapH.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"calc.nsmap" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"soapStub.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+# End Custom Build

+

+!ELSEIF  "$(CFG)" == "calc - Win32 Debug"

+

+# PROP Ignore_Default_Tool 1

+# Begin Custom Build - soapcpp2 $(InputPath) ...

+InputPath=.\calc.h

+

+BuildCmds= \

+	soapcpp2 -c $(InputPath)

+

+"soapC.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"soapServer.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"soapH.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"calc.nsmap" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"soapStub.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+# End Custom Build

+

+!ENDIF 

+

+# End Source File

+# Begin Source File

+

+SOURCE=.\calcserver.cpp

+# End Source File

+# Begin Source File

+

+SOURCE=.\soap2stuff.cpp

+# End Source File

+# Begin Source File

+

+SOURCE=.\soapC.c

+# End Source File

+# Begin Source File

+

+SOURCE=.\soapServer.c

+# End Source File

+# Begin Source File

+

+SOURCE=.\stdsoap2.def

+# End Source File

+# Begin Source File

+

+SOURCE=.\winstuff.cpp

+# End Source File

+# End Group

+# Begin Group "Header Files"

+

+# PROP Default_Filter "h;hpp;hxx;hm;inl"

+# Begin Source File

+

+SOURCE=.\calc.nsmap

+# End Source File

+# Begin Source File

+

+SOURCE=.\soapH.h

+# End Source File

+# Begin Source File

+

+SOURCE=.\soapStub.h

+# End Source File

+# End Group

+# Begin Group "Resource Files"

+

+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"

+# End Group

+# Begin Source File

+

+SOURCE=.\calc.mak

+# End Source File

+# End Target

+# End Project

diff --git a/mod_gsoap/gsoap_win/isapi/samples/calc/calc.dsw b/mod_gsoap/gsoap_win/isapi/samples/calc/calc.dsw
new file mode 100644
index 0000000..bb894eb
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/samples/calc/calc.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00

+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!

+

+###############################################################################

+

+Project: "calc"=.\calc.dsp - Package Owner=<4>

+

+Package=<5>

+{{{

+}}}

+

+Package=<4>

+{{{

+}}}

+

+###############################################################################

+

+Global:

+

+Package=<5>

+{{{

+}}}

+

+Package=<3>

+{{{

+}}}

+

+###############################################################################

+

diff --git a/mod_gsoap/gsoap_win/isapi/samples/calc/calc.h b/mod_gsoap/gsoap_win/isapi/samples/calc/calc.h
new file mode 100644
index 0000000..bb2625b
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/samples/calc/calc.h
@@ -0,0 +1,10 @@
+//gsoap ns service name: calc
+//gsoap ns service namespace: http://websrv.cs.fsu.edu/~engelen/calc.wsdl
+//gsoap ns service location: http://websrv.cs.fsu.edu/~engelen
+//gsoap ns service executable: calc.cgi
+//gsoap ns schema namespace: urn:calc
+int ns__add(double a, double b, double *result);
+int ns__sub(double a, double b, double *result);
+int ns__mul(double a, double b, double *result);
+int ns__div(double a, double b, double *result);
+int ns__pow(double a, double b, double *result);
diff --git a/mod_gsoap/gsoap_win/isapi/samples/calc/calcclient.c b/mod_gsoap/gsoap_win/isapi/samples/calc/calcclient.c
new file mode 100644
index 0000000..e4d1a00
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/samples/calc/calcclient.c
@@ -0,0 +1,41 @@
+#include "soapH.h"
+#include "calc.nsmap"
+
+const char server[] = "http://localhost/gsoap/mod_gsoap.dll?calc";
+
+int main(int argc, char **argv)
+{ struct soap soap;
+  double a, b, result;
+  if (argc < 4)
+  { fprintf(stderr, "Usage: [add|sub|mul|div|pow] num num\n");
+    exit(0);
+  }
+  soap_init(&soap);
+  a = strtod(argv[2], NULL);
+  b = strtod(argv[3], NULL);
+  switch (*argv[1])
+  { case 'a':
+      soap_call_ns__add(&soap, server, "", a, b, &result);
+      break;
+    case 's':
+      soap_call_ns__sub(&soap, server, "", a, b, &result);
+      break;
+    case 'm':
+      soap_call_ns__mul(&soap, server, "", a, b, &result);
+      break;
+    case 'd':
+      soap_call_ns__div(&soap, server, "", a, b, &result);
+      break;
+    case 'p':
+      soap_call_ns__pow(&soap, server, "", a, b, &result);
+      break;
+    default:
+      fprintf(stderr, "Unknown command\n");
+      exit(0);
+  }
+  if (soap.error)
+    soap_print_fault(&soap, stderr);
+  else
+    printf("result = %g\n", result);
+  return 0;
+}
diff --git a/mod_gsoap/gsoap_win/isapi/samples/calc/calcclnt.dsp b/mod_gsoap/gsoap_win/isapi/samples/calc/calcclnt.dsp
new file mode 100644
index 0000000..528940e
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/samples/calc/calcclnt.dsp
@@ -0,0 +1,182 @@
+# Microsoft Developer Studio Project File - Name="calcclnt" - Package Owner=<4>

+# Microsoft Developer Studio Generated Build File, Format Version 6.00

+# ** NICHT BEARBEITEN **

+

+# TARGTYPE "Win32 (x86) Console Application" 0x0103

+

+CFG=calcclnt - Win32 Debug

+!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE

+!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl

+!MESSAGE 

+!MESSAGE NMAKE /f "calcclnt.mak".

+!MESSAGE 

+!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben

+!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:

+!MESSAGE 

+!MESSAGE NMAKE /f "calcclnt.mak" CFG="calcclnt - Win32 Debug"

+!MESSAGE 

+!MESSAGE Für die Konfiguration stehen zur Auswahl:

+!MESSAGE 

+!MESSAGE "calcclnt - Win32 Release" (basierend auf  "Win32 (x86) Console Application")

+!MESSAGE "calcclnt - Win32 Debug" (basierend auf  "Win32 (x86) Console Application")

+!MESSAGE 

+

+# Begin Project

+# PROP AllowPerConfigDependencies 0

+# PROP Scc_ProjName ""

+# PROP Scc_LocalPath ""

+CPP=cl.exe

+RSC=rc.exe

+

+!IF  "$(CFG)" == "calcclnt - Win32 Release"

+

+# PROP BASE Use_MFC 0

+# PROP BASE Use_Debug_Libraries 0

+# PROP BASE Output_Dir "Release"

+# PROP BASE Intermediate_Dir "Release"

+# PROP BASE Target_Dir ""

+# PROP Use_MFC 0

+# PROP Use_Debug_Libraries 0

+# PROP Output_Dir "Release"

+# PROP Intermediate_Dir "Release"

+# PROP Target_Dir ""

+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c

+# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c

+# ADD BASE RSC /l 0xc07 /d "NDEBUG"

+# ADD RSC /l 0xc07 /d "NDEBUG"

+BSC32=bscmake.exe

+# ADD BASE BSC32 /nologo

+# ADD BSC32 /nologo

+LINK32=link.exe

+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386

+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386

+

+!ELSEIF  "$(CFG)" == "calcclnt - Win32 Debug"

+

+# PROP BASE Use_MFC 0

+# PROP BASE Use_Debug_Libraries 1

+# PROP BASE Output_Dir "calcclnt___Win32_Debug"

+# PROP BASE Intermediate_Dir "calcclnt___Win32_Debug"

+# PROP BASE Target_Dir ""

+# PROP Use_MFC 0

+# PROP Use_Debug_Libraries 1

+# PROP Output_Dir "Debug"

+# PROP Intermediate_Dir "..\..\Debug"

+# PROP Ignore_Export_Lib 0

+# PROP Target_Dir ""

+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c

+# ADD CPP /nologo /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "DEBUG" /YX /FD /GZ /c

+# ADD BASE RSC /l 0xc07 /d "_DEBUG"

+# ADD RSC /l 0xc07 /d "_DEBUG"

+BSC32=bscmake.exe

+# ADD BASE BSC32 /nologo

+# ADD BSC32 /nologo

+LINK32=link.exe

+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept

+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../../Debug/calcclnt.exe" /pdbtype:sept

+

+!ENDIF 

+

+# Begin Target

+

+# Name "calcclnt - Win32 Release"

+# Name "calcclnt - Win32 Debug"

+# Begin Group "Source Files"

+

+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"

+# Begin Source File

+

+SOURCE=.\calc.h

+

+!IF  "$(CFG)" == "calcclnt - Win32 Release"

+

+# PROP Ignore_Default_Tool 1

+# Begin Custom Build - soapcpp2 $(InputPath) ...

+InputPath=.\calc.h

+

+BuildCmds= \

+	soapcpp2 -c $(InputPath)

+

+"soapC.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"soapClient.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"soapH.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"calc.nsmap" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"soapStub.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+# End Custom Build

+

+!ELSEIF  "$(CFG)" == "calcclnt - Win32 Debug"

+

+# PROP Ignore_Default_Tool 1

+# Begin Custom Build - soapcpp2 $(InputPath) ...

+InputPath=.\calc.h

+

+BuildCmds= \

+	soapcpp2 -c $(InputPath)

+

+"soapC.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"soapClient.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"soapH.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"calc.nsmap" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"soapStub.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+# End Custom Build

+

+!ENDIF 

+

+# End Source File

+# Begin Source File

+

+SOURCE=.\calcclient.c

+# End Source File

+# Begin Source File

+

+SOURCE=.\soap2stuff.cpp

+# End Source File

+# Begin Source File

+

+SOURCE=.\soapC.c

+# End Source File

+# Begin Source File

+

+SOURCE=.\soapClient.c

+# End Source File

+# Begin Source File

+

+SOURCE=.\winstuff.cpp

+# End Source File

+# End Group

+# Begin Group "Header Files"

+

+# PROP Default_Filter "h;hpp;hxx;hm;inl"

+# Begin Source File

+

+SOURCE=.\calc.nsmap

+# End Source File

+# Begin Source File

+

+SOURCE=.\soapH.h

+# End Source File

+# Begin Source File

+

+SOURCE=.\soapStub.h

+# End Source File

+# End Group

+# End Target

+# End Project

diff --git a/mod_gsoap/gsoap_win/isapi/samples/calc/calcserver.cpp b/mod_gsoap/gsoap_win/isapi/samples/calc/calcserver.cpp
new file mode 100644
index 0000000..ce74692
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/samples/calc/calcserver.cpp
@@ -0,0 +1,69 @@
+/* mod_gsoap sample.
+	please note: if you use classes in your service header file, you have to export soap_destroy also.
+	Please uncomment the according line in the stdsoap2.def file in that case, otherwise you will have memory leaks.
+ */
+#include "soapH.h"
+#include "calc.nsmap"
+
+int main(int argc, char **argv)
+{ int m, s; /* master and slave sockets */
+  struct soap soap;
+  soap_init(&soap);
+  if (argc < 2)
+    soap_serve(&soap);	/* serve as CGI application */
+  else
+  { m = soap_bind(&soap, NULL, atoi(argv[1]), 100);
+    if (m < 0)
+    { soap_print_fault(&soap, stderr);
+      exit(-1);
+    }
+    fprintf(stderr, "Socket connection successful: master socket = %d\n", m);
+    for ( ; ; )
+    { s = soap_accept(&soap);
+      fprintf(stderr, "Socket connection successful: slave socket = %d\n", s);
+      if (s < 0)
+      { soap_print_fault(&soap, stderr);
+        exit(-1);
+      } 
+      soap_serve(&soap);
+      soap_end(&soap);
+    }
+  }
+  return 0;
+} 
+
+int ns__add(struct soap *soap, double a, double b, double *result)
+{ *result = a + b;
+  return SOAP_OK;
+} 
+
+int ns__sub(struct soap *soap, double a, double b, double *result)
+{ *result = a - b;
+  return SOAP_OK;
+} 
+
+int ns__mul(struct soap *soap, double a, double b, double *result)
+{ *result = a * b;
+  return SOAP_OK;
+} 
+
+int ns__div(struct soap *soap, double a, double b, double *result)
+{ if (b)
+    *result = a / b;
+  else
+  { char *s = (char*)soap_malloc(soap, 1024);
+    sprintf(s, "Can't divide %f by %f", a, b);
+    return soap_receiver_fault(soap, "Division by zero", s);
+  }
+  return SOAP_OK;
+} 
+
+int ns__pow(struct soap *soap, double a, double b, double *result)
+{ *result = pow(a, b);
+  if (soap_errno == EDOM)	/* soap_errno is like errno, but compatible with Win32 */
+  { char *s = (char*)soap_malloc(soap, 1024);
+    sprintf(s, "Can't take the power of %f to %f", a, b);
+    return soap_receiver_fault(soap, "Power function domain error", s);
+  }
+  return SOAP_OK;
+} 
diff --git a/mod_gsoap/gsoap_win/isapi/samples/calc/soap2stuff.cpp b/mod_gsoap/gsoap_win/isapi/samples/calc/soap2stuff.cpp
new file mode 100644
index 0000000..5ab1860
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/samples/calc/soap2stuff.cpp
@@ -0,0 +1,7 @@
+/** file to include stdsoap2.cpp here, to get around directory location problems etc.
+*/
+
+/* You must set the include path in Visual Studio under tools|options|directories|include anway. 
+   There also the file below can be found.
+*/
+#include "stdsoap2.cpp"
diff --git a/mod_gsoap/gsoap_win/isapi/samples/calc/stdsoap2.def b/mod_gsoap/gsoap_win/isapi/samples/calc/stdsoap2.def
new file mode 100644
index 0000000..dd4b1bf
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/samples/calc/stdsoap2.def
@@ -0,0 +1,13 @@
+; soapcpp2.def : Declares the module parameters for a gsoap server DLL.
+
+DESCRIPTION  'gosap server dll'
+
+EXPORTS
+    ; we must export what the gsoap isapi extension needs for loading us and working with us.
+	soap_init	PRIVATE
+	soap_serve  PRIVATE
+	soap_delete PRIVATE
+	soap_done	PRIVATE
+	soap_end	PRIVATE
+	soap_register_plugin_arg PRIVATE
+	soap_lookup_plugin PRIVATE
\ No newline at end of file
diff --git a/mod_gsoap/gsoap_win/isapi/samples/calc/winstuff.cpp b/mod_gsoap/gsoap_win/isapi/samples/calc/winstuff.cpp
new file mode 100644
index 0000000..b977564
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/samples/calc/winstuff.cpp
@@ -0,0 +1,22 @@
+// calc.cpp : Defines the entry point for the DLL application.
+//
+
+#define WIN32_LEAN_AND_MEAN		// Exclude rarely-used stuff from Windows headers
+#include <windows.h>
+#include <winsock2.h>
+
+#if _MSC_VER > 1000
+#pragma comment(lib, "wsock32")
+#endif
+
+static struct WSAInit { \
+        WSADATA WsaData; \
+        WSAInit() {WSAStartup(0x0101, &WsaData);} \
+        ~WSAInit() {WSACleanup();} \
+} WsaInit;
+
+
+BOOL APIENTRY DllMain(HANDLE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved) {
+    return TRUE;
+}
+
diff --git a/mod_gsoap/gsoap_win/isapi/samples/dime/Makefile b/mod_gsoap/gsoap_win/isapi/samples/dime/Makefile
new file mode 100644
index 0000000..a37df8e
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/samples/dime/Makefile
@@ -0,0 +1,15 @@
+DELFILES= *.ncb *.opt *.plg *.clw *.pch *.aps \
+	*.nsmap *.xml *.wsdl ns.xsd \
+	RECV.log SENT.log TEST.log \
+	soapC.c?? soapcalcProxy.h soapClient.c?? soapServer.c?? soapStub.h soapH.h \
+	soapClientLib.* soapServerLib.* soapdimeObject.h soapdimeProxy.h
+
+
+all:
+	echo done
+
+clean:
+	-rmdir /s/q .\Debug
+	-rmdir /s/q .\Release
+	for %v in ($(DELFILES)) DO if exist %v del %v
+
diff --git a/mod_gsoap/gsoap_win/isapi/samples/dime/dime.dsp b/mod_gsoap/gsoap_win/isapi/samples/dime/dime.dsp
new file mode 100644
index 0000000..57d953c
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/samples/dime/dime.dsp
@@ -0,0 +1,182 @@
+# Microsoft Developer Studio Project File - Name="dime" - Package Owner=<4>

+# Microsoft Developer Studio Generated Build File, Format Version 6.00

+# ** NICHT BEARBEITEN **

+

+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102

+

+CFG=dime - Win32 Debug

+!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE

+!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl

+!MESSAGE 

+!MESSAGE NMAKE /f "dime.mak".

+!MESSAGE 

+!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben

+!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:

+!MESSAGE 

+!MESSAGE NMAKE /f "dime.mak" CFG="dime - Win32 Debug"

+!MESSAGE 

+!MESSAGE Für die Konfiguration stehen zur Auswahl:

+!MESSAGE 

+!MESSAGE "dime - Win32 Release" (basierend auf  "Win32 (x86) Dynamic-Link Library")

+!MESSAGE "dime - Win32 Debug" (basierend auf  "Win32 (x86) Dynamic-Link Library")

+!MESSAGE 

+

+# Begin Project

+# PROP AllowPerConfigDependencies 0

+# PROP Scc_ProjName ""

+# PROP Scc_LocalPath ""

+CPP=cl.exe

+MTL=midl.exe

+RSC=rc.exe

+

+!IF  "$(CFG)" == "dime - Win32 Release"

+

+# PROP BASE Use_MFC 0

+# PROP BASE Use_Debug_Libraries 0

+# PROP BASE Output_Dir "Release"

+# PROP BASE Intermediate_Dir "Release"

+# PROP BASE Target_Dir ""

+# PROP Use_MFC 0

+# PROP Use_Debug_Libraries 0

+# PROP Output_Dir "Release"

+# PROP Intermediate_Dir "Release"

+# PROP Ignore_Export_Lib 0

+# PROP Target_Dir ""

+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DIME_EXPORTS" /YX /FD /c

+# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DIME_EXPORTS" /YX /FD /c

+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32

+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32

+# ADD BASE RSC /l 0x407 /d "NDEBUG"

+# ADD RSC /l 0x407 /d "NDEBUG"

+BSC32=bscmake.exe

+# ADD BASE BSC32 /nologo

+# ADD BSC32 /nologo

+LINK32=link.exe

+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386

+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386

+

+!ELSEIF  "$(CFG)" == "dime - Win32 Debug"

+

+# PROP BASE Use_MFC 0

+# PROP BASE Use_Debug_Libraries 1

+# PROP BASE Output_Dir "Debug"

+# PROP BASE Intermediate_Dir "Debug"

+# PROP BASE Target_Dir ""

+# PROP Use_MFC 0

+# PROP Use_Debug_Libraries 1

+# PROP Output_Dir "Debug"

+# PROP Intermediate_Dir "Debug"

+# PROP Ignore_Export_Lib 0

+# PROP Target_Dir ""

+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DIME_EXPORTS" /YX /FD /GZ /c

+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DIME_EXPORTS" /YX /FD /GZ /c

+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32

+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32

+# ADD BASE RSC /l 0x407 /d "_DEBUG"

+# ADD RSC /l 0x407 /d "_DEBUG"

+BSC32=bscmake.exe

+# ADD BASE BSC32 /nologo

+# ADD BSC32 /nologo

+LINK32=link.exe

+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept

+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"../../Debug/dime.dll" /pdbtype:sept

+

+!ENDIF 

+

+# Begin Target

+

+# Name "dime - Win32 Release"

+# Name "dime - Win32 Debug"

+# Begin Group "Source Files"

+

+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"

+# Begin Source File

+

+SOURCE=.\dime.h

+

+!IF  "$(CFG)" == "dime - Win32 Release"

+

+# PROP Ignore_Default_Tool 1

+# Begin Custom Build - soapcpp2 $(InputPath) ...

+InputPath=.\dime.h

+

+BuildCmds= \

+	soapcpp2 $(InputPath)

+

+"soapC.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"soapServer.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"soapH.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"dime.nsmap" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+# End Custom Build

+

+!ELSEIF  "$(CFG)" == "dime - Win32 Debug"

+

+# PROP Ignore_Default_Tool 1

+# Begin Custom Build - soapcpp2 $(InputPath) ...

+InputPath=.\dime.h

+

+BuildCmds= \

+	soapcpp2 $(InputPath)

+

+"soapC.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"soapServer.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"soapH.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"dime.nsmap" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+# End Custom Build

+

+!ENDIF 

+

+# End Source File

+# Begin Source File

+

+SOURCE=.\dimeserver.cpp

+# End Source File

+# Begin Source File

+

+SOURCE=.\soap2stuff.cpp

+# End Source File

+# Begin Source File

+

+SOURCE=.\soapC.cpp

+# End Source File

+# Begin Source File

+

+SOURCE=.\soapServer.cpp

+# End Source File

+# Begin Source File

+

+SOURCE=.\stdsoap2.def

+# End Source File

+# Begin Source File

+

+SOURCE=.\winstuff.cpp

+# End Source File

+# End Group

+# Begin Group "Header Files"

+

+# PROP Default_Filter "h;hpp;hxx;hm;inl"

+# Begin Source File

+

+SOURCE=.\soapH.h

+# End Source File

+# Begin Source File

+

+SOURCE=.\soapStub.h

+# End Source File

+# End Group

+# End Target

+# End Project

diff --git a/mod_gsoap/gsoap_win/isapi/samples/dime/dime.h b/mod_gsoap/gsoap_win/isapi/samples/dime/dime.h
new file mode 100644
index 0000000..cd48b7c
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/samples/dime/dime.h
@@ -0,0 +1,28 @@
+//gsoap ns service name: dime
+//gsoap ns service namespace: http://www.aberger,at/SOAP/dime.wsdl
+//gsoap ns service location: http://localhost/gsoap?mod_gsoap.dll?dime
+//gsoap ns service executable: dime.dll
+//gsoap ns schema  namespace: urn:dime
+//gsoap service documentation: Send image files back and forth as dime attac
+
+
+class xsd__base64Binary {
+  unsigned char *__ptr;
+  int __size;
+  char *id;
+  char *type;
+  char *options;
+
+  xsd__base64Binary(); // Constructor 
+  xsd__base64Binary(struct soap *soap, int n); // Constructor 
+  ~xsd__base64Binary(); // Destructor 
+  unsigned char *location(); // returns the memory location 
+  int size(); // returns the number of bytes 
+
+};
+
+//gsoap method-documentation getImage retrieve an image from the server.
+int ns__getImage(char *name, xsd__base64Binary &image);
+
+//gsoap method-documentation getImage send an image to the server.
+int ns__putImage(char *name, xsd__base64Binary *image, int& status); 
diff --git a/mod_gsoap/gsoap_win/isapi/samples/dime/dimeclient.cpp b/mod_gsoap/gsoap_win/isapi/samples/dime/dimeclient.cpp
new file mode 100644
index 0000000..591bbbf
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/samples/dime/dimeclient.cpp
@@ -0,0 +1,140 @@
+/*	dimeclient.cpp
+
+	Example DIME client for simple image server. This DIME client
+	demonstrates the new gSOAP DIME streaming feature.
+
+	Copyright (C) 2000-2002 Robert A. van Engelen. All Rights Reserved.
+
+	Run from command line. The first optional argument is the image file
+	name. The second optional argument is the service endpoint URL. The
+	third optional argument is the file name to save the image file to.
+*/
+
+#include "soapH.h"
+#include "dime.nsmap"
+#include <sys/stat.h>	// use fstat() for streaming DIME
+
+// streaming DIME callbacks
+static void *dime_write_open(struct soap*, const char*, const char*, const char*);
+static void dime_write_close(struct soap*, void*);
+static int dime_write(struct soap*, void*, const char*, size_t);
+
+static void *dime_read_open(struct soap*, void*, const char*, const char*, const char*);
+static void dime_read_close(struct soap*, void*);
+static size_t dime_read(struct soap*, void*, char*, size_t);
+
+
+static int getImage(const char *name, const char *url, const char *outputfile) {
+	struct soap soap;
+	xsd__base64Binary image;
+	soap_init(&soap);
+    soap.user = (void*)outputfile;
+    soap.fdimewriteopen = dime_write_open;
+    soap.fdimewriteclose = dime_write_close;
+    soap.fdimewrite = dime_write;
+	soap.connect_timeout = 10;
+	int nRet = soap_call_ns__getImage(&soap, url, "", (char *)name, image);
+	if (nRet != SOAP_OK) {
+		soap_print_fault(&soap, stderr);
+	} else {
+		printf("got an image, I suppose\n");
+	}
+	soap_destroy(&soap);
+	soap_end(&soap);
+	return nRet;
+}
+static int putImage(const char *name, const char *url, const char *inputfile) {
+	FILE *fd = fopen(inputfile, "rb");
+	if (NULL == fd) {
+		printf("failed to open %s\n", inputfile);
+		return 3;
+	}
+	struct stat sb;
+	if (0 != fstat(fileno(fd), &sb) || sb.st_size <= 0) {
+		printf("cannot find the length of file %s\n", inputfile);
+		return 4;
+
+	}
+	struct soap soap;
+	soap_init(&soap);
+	xsd__base64Binary *pimage = soap_new_xsd__base64Binary(&soap, -1);
+    soap.user = (void *)inputfile;
+	soap.fdimereadopen = dime_read_open;
+	soap.fdimereadclose = dime_read_close;
+	soap.fdimeread = dime_read;
+	pimage->__ptr = (unsigned char*)fd; 
+	pimage->__size = sb.st_size; // must set size
+    pimage->type = "image/jpeg";
+	pimage->options = soap_dime_option(&soap, 0, "My sent picture");
+	soap.connect_timeout = 10;
+
+	int nStatus = 0;
+	int nRet = soap_call_ns__putImage(&soap, url, "", (char *)name, pimage, nStatus);
+	if (nRet != SOAP_OK) {
+		soap_print_fault(&soap, stderr);
+	} else {
+		printf("sent an image, I suppose");
+	}
+	soap_destroy(&soap);
+	soap_end(&soap);
+	return nRet;
+}
+int main(const int argc, const char *const *const argv) { 
+	if (4 != argc) {
+		printf("usage: %s imagename outputfilename\n", argv[0]);
+		return 1;
+	}
+	int nRet = 0;
+	nRet = getImage(argv[1], argv[2], argv[3]);
+	if (0 == nRet) {
+		nRet = putImage(argv[1], argv[2], argv[3]);
+	}
+	return nRet;
+}
+
+static void *dime_write_open(struct soap *soap, const char *id, const char *type, const char *options)
+{ FILE *handle = NULL;
+  // we can return NULL without setting soap->error if we don't want to use the streaming callback for this DIME attachment
+  handle = fopen((char*)soap->user, "wb");
+  if (handle)
+    printf("Streaming image id=%s type=%s into file %s\n", id, type, (char*)soap->user);
+  else
+  { soap->error = SOAP_EOF; // could not open file for writing
+    soap->errnum = errno; // get reason
+  }
+  return (void*)handle;
+}
+
+static void dime_write_close(struct soap *soap, void *handle)
+{ fclose((FILE*)handle);
+}
+
+static int dime_write(struct soap *soap, void *handle, const char *buf, size_t len)
+{ size_t nwritten;
+  while (len)
+  { nwritten = fwrite(buf, 1, len, (FILE*)handle);
+    if (!nwritten)
+    { soap->errnum = errno; // get reason
+      return SOAP_EOF;
+    }
+    len -= nwritten;
+    buf += nwritten;
+  }
+  return SOAP_OK;
+}
+
+//// reading routines for putImage:
+/** save a file sent by the client to our server */
+static void *dime_read_open(struct soap *soap, void *handle, const char *id, const char *type, const char *options) {
+  // we should return NULL without setting soap->error if we don't want to use the streaming callback for this DIME attachment. The handle contains the non-NULL __ptr field value which should have been set in the application.
+  // the value of the handle can be changed and will be passed on to the fdimeread and fdimereadclose callbacks. The value will not affect the __ptr field.
+  return handle;
+}
+
+static void dime_read_close(struct soap *soap, void *handle) {
+	fclose((FILE*)handle);
+}
+static size_t dime_read(struct soap *soap, void *handle, char *buf, size_t len) {
+	return fread(buf, 1, len, (FILE*)handle);
+}
+
diff --git a/mod_gsoap/gsoap_win/isapi/samples/dime/dimeclnt.dsp b/mod_gsoap/gsoap_win/isapi/samples/dime/dimeclnt.dsp
new file mode 100644
index 0000000..1ed0796
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/samples/dime/dimeclnt.dsp
@@ -0,0 +1,173 @@
+# Microsoft Developer Studio Project File - Name="dimeclnt" - Package Owner=<4>

+# Microsoft Developer Studio Generated Build File, Format Version 6.00

+# ** NICHT BEARBEITEN **

+

+# TARGTYPE "Win32 (x86) Console Application" 0x0103

+

+CFG=dimeclnt - Win32 Debug

+!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE

+!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl

+!MESSAGE 

+!MESSAGE NMAKE /f "dimeclnt.mak".

+!MESSAGE 

+!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben

+!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:

+!MESSAGE 

+!MESSAGE NMAKE /f "dimeclnt.mak" CFG="dimeclnt - Win32 Debug"

+!MESSAGE 

+!MESSAGE Für die Konfiguration stehen zur Auswahl:

+!MESSAGE 

+!MESSAGE "dimeclnt - Win32 Release" (basierend auf  "Win32 (x86) Console Application")

+!MESSAGE "dimeclnt - Win32 Debug" (basierend auf  "Win32 (x86) Console Application")

+!MESSAGE 

+

+# Begin Project

+# PROP AllowPerConfigDependencies 0

+# PROP Scc_ProjName ""

+# PROP Scc_LocalPath ""

+CPP=cl.exe

+RSC=rc.exe

+

+!IF  "$(CFG)" == "dimeclnt - Win32 Release"

+

+# PROP BASE Use_MFC 0

+# PROP BASE Use_Debug_Libraries 0

+# PROP BASE Output_Dir "Release"

+# PROP BASE Intermediate_Dir "Release"

+# PROP BASE Target_Dir ""

+# PROP Use_MFC 0

+# PROP Use_Debug_Libraries 0

+# PROP Output_Dir "Release"

+# PROP Intermediate_Dir "Release"

+# PROP Ignore_Export_Lib 0

+# PROP Target_Dir ""

+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c

+# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c

+# ADD BASE RSC /l 0x407 /d "NDEBUG"

+# ADD RSC /l 0x407 /d "NDEBUG"

+BSC32=bscmake.exe

+# ADD BASE BSC32 /nologo

+# ADD BSC32 /nologo

+LINK32=link.exe

+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386

+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"./Release/dimeclnt.exe"

+

+!ELSEIF  "$(CFG)" == "dimeclnt - Win32 Debug"

+

+# PROP BASE Use_MFC 0

+# PROP BASE Use_Debug_Libraries 1

+# PROP BASE Output_Dir "dimeclnt___Win32_Debug"

+# PROP BASE Intermediate_Dir "dimeclnt___Win32_Debug"

+# PROP BASE Target_Dir ""

+# PROP Use_MFC 0

+# PROP Use_Debug_Libraries 1

+# PROP Output_Dir "Debug"

+# PROP Intermediate_Dir "Debug"

+# PROP Ignore_Export_Lib 0

+# PROP Target_Dir ""

+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c

+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "DEBUG" /YX /FD /GZ /c

+# ADD BASE RSC /l 0x407 /d "_DEBUG"

+# ADD RSC /l 0x407 /d "_DEBUG"

+BSC32=bscmake.exe

+# ADD BASE BSC32 /nologo

+# ADD BSC32 /nologo

+LINK32=link.exe

+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept

+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../../Debug/dimeclnt.exe" /pdbtype:sept

+

+!ENDIF 

+

+# Begin Target

+

+# Name "dimeclnt - Win32 Release"

+# Name "dimeclnt - Win32 Debug"

+# Begin Group "Source Files"

+

+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"

+# Begin Source File

+

+SOURCE=.\dime.h

+

+!IF  "$(CFG)" == "dimeclnt - Win32 Release"

+

+# PROP Ignore_Default_Tool 1

+# Begin Custom Build - soapcpp2 $(InputPath) ...

+InputPath=.\dime.h

+

+BuildCmds= \

+	soapcpp2 $(InputPath)

+

+"soapC.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"soapServer.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"soapH.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"dime.nsmap" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+# End Custom Build

+

+!ELSEIF  "$(CFG)" == "dimeclnt - Win32 Debug"

+

+# PROP Ignore_Default_Tool 1

+# Begin Custom Build - soapcpp2 $(InputPath) ...

+InputPath=.\dime.h

+

+BuildCmds= \

+	soapcpp2 $(InputPath)

+

+"soapC.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"soapServer.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"soapH.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+

+"dime.nsmap" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+   $(BuildCmds)

+# End Custom Build

+

+!ENDIF 

+

+# End Source File

+# Begin Source File

+

+SOURCE=.\dimeclient.cpp

+# End Source File

+# Begin Source File

+

+SOURCE=.\soap2stuff.cpp

+# End Source File

+# Begin Source File

+

+SOURCE=.\soapC.cpp

+# End Source File

+# Begin Source File

+

+SOURCE=.\soapClient.cpp

+# End Source File

+# Begin Source File

+

+SOURCE=.\winstuff.cpp

+# End Source File

+# End Group

+# Begin Group "Header Files"

+

+# PROP Default_Filter "h;hpp;hxx;hm;inl"

+# Begin Source File

+

+SOURCE=.\soapH.h

+# End Source File

+# Begin Source File

+

+SOURCE=.\soapStub.h

+# End Source File

+# End Group

+# End Target

+# End Project

diff --git a/mod_gsoap/gsoap_win/isapi/samples/dime/dimeserver.cpp b/mod_gsoap/gsoap_win/isapi/samples/dime/dimeserver.cpp
new file mode 100644
index 0000000..eb59c5e
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/samples/dime/dimeserver.cpp
@@ -0,0 +1,144 @@
+/*	dimesrv.cpp
+
+	Example simple image server using DIME,
+	Adapted by Ch. Aberger to demonstrate dime for Win32 IIS. 
+	Copyright (C) 2000-2002 Robert A. van Engelen. All Rights Reserved.
+	Copyright (C) 2003 Christian T. Aberger.
+
+	Runs as mod_gsoap (http://www.aberger.at/SOAP) as IIS SOAP service
+	Web service
+
+	NOTE: THE SERVER WILL ONLY SEND FILES THAT ARE IN THE CURRENT DIR FOR
+	SECURITY REASONS. HOWEVER, THE AUTHOR IS NOT RESPONSIBLE FOR ANY DAMAGES
+	THAT MAY RESULT FROM THE USE OF THIS PROGRAM.
+	AND ALSO ABERGER IS RESPONSIBLE FOR NOTHING.
+*/
+
+#include "soapH.h"
+#include "dime.nsmap"
+#include <sys/stat.h>	// use fstat() for streaming DIME
+#define WIN32_LEAN_AND_MEAN		// Exclude rarely-used stuff from Windows headers
+#include <windows.h>
+
+#define MAX_FILE_SIZE (10000)	// Max. file size
+
+// streaming DIME callbacks for sending data to client.
+static void *dime_read_open(struct soap*, void*, const char*, const char*, const char*);
+static void dime_read_close(struct soap*, void*);
+static size_t dime_read(struct soap*, void*, char*, size_t);
+
+// streaming DIME callbacks for receiving data from client.
+static void *dime_write_open(struct soap*, const char*, const char*, const char*);
+static void dime_write_close(struct soap*, void*);
+static int dime_write(struct soap*, void*, const char*, size_t);
+
+
+extern "C" {
+
+/** This function is called by mod_gsoap after the dll was successfully loaded and before processing begins.
+	You can do any one-time initialization here.
+*/
+int mod_gsoap_init() {
+	// todo: add your initialization code here 
+	return SOAP_OK;
+}
+/** This function is called after all processing was done before dll is unloaded.
+	You can do any cleanup here.
+*/
+int mod_gsoap_terminate() {
+	// todo: add your termination code here 
+	return SOAP_OK;
+}
+
+}
+
+
+int ns__getImage(struct soap *soap, char *name, xsd__base64Binary &image) { 
+	/* in this sample, due to security reasons the file must be in the system's %TEMP% folder */
+	TCHAR szPath[_MAX_PATH];
+	if (0 == ::GetTempPath(sizeof szPath, szPath)) {
+		return soap_receiver_fault(soap, "cannot find the TEMP folder", NULL);
+	}
+	if (name) { 
+		FILE *fd = NULL;
+		// do some checks on the file name to verify it is local:
+		if (!strchr(name, '/') && !strchr(name, '\\') && !strchr(name, ':')) {
+			strcat(szPath, name);
+			fd = fopen(szPath, "rb");
+		}
+		if (!fd) {
+			char szMsg[MAX_PATH + 64];
+			strcpy(szMsg, "Cannot open file: ");
+			strcat(szMsg, szPath);
+			return soap_receiver_fault(soap, szMsg, NULL);
+		}
+		struct stat sb;
+		if (!fstat(fileno(fd), &sb) && sb.st_size > 0) { // since we can get the length of the file, we can stream it
+		  soap->fdimereadopen = dime_read_open;
+		  soap->fdimereadclose = dime_read_close;
+		  soap->fdimeread = dime_read;
+		  image.__ptr = (unsigned char*)fd; // must set to non-NULL (this is our fd handle which we need in the callbacks)
+		  image.__size = sb.st_size; // must set size
+		} else { // don't know the size, so buffer it
+			image.__ptr = (unsigned char*)soap_malloc(soap, MAX_FILE_SIZE);
+			for (int i = 0; i < MAX_FILE_SIZE; i++) {
+				int c;
+				if ((c = fgetc(fd)) == EOF) {
+					break;
+				}
+				image.__ptr[i] = c;
+			}
+			fclose(fd);
+			image.__size = i;
+		}
+	    image.type = "image/jpeg";
+		image.options = soap_dime_option(soap, 0, "My picture");
+	} else {
+		return soap_receiver_fault(soap, "Name required", NULL);
+	}
+	return SOAP_OK;
+}
+
+/** save a file sent by the client to our server */
+static void *dime_read_open(struct soap *soap, void *handle, const char *id, const char *type, const char *options)
+{ // we should return NULL without setting soap->error if we don't want to use the streaming callback for this DIME attachment. The handle contains the non-NULL __ptr field value which should have been set in the application.
+  // the value of the handle can be changed and will be passed on to the fdimeread and fdimereadclose callbacks. The value will not affect the __ptr field.
+  return handle;
+}
+
+static void dime_read_close(struct soap *soap, void *handle)
+{ fclose((FILE*)handle);
+}
+
+static size_t dime_read(struct soap *soap, void *handle, char *buf, size_t len)
+{ return fread(buf, 1, len, (FILE*)handle);
+}
+
+int ns__putImage(struct soap *soap, char *name, xsd__base64Binary *image, int &status) { 
+	int nRet = SOAP_OK;
+	TCHAR szPath[_MAX_PATH];
+	if (0 == ::GetTempPath(sizeof szPath, szPath)) {
+		return soap_receiver_fault(soap, "cannot find the TEMP folder", NULL);
+	}
+	strcat(szPath, "upload");
+	if (INVALID_FILE_ATTRIBUTES == ::GetFileAttributes(szPath)) {
+		::CreateDirectory(szPath, NULL); // create it if it ain't exist.
+		if (INVALID_FILE_ATTRIBUTES == ::GetFileAttributes(szPath)) {
+			return soap_receiver_fault(soap, "Failed to create output directory", szPath);
+		}
+	}
+	strcat(szPath, "\\");
+	strcat(szPath, name);
+	FILE *fp = fopen(szPath, "wb");
+	status = 0;
+	if (NULL != fp) {
+		status = fwrite(image->__ptr, sizeof(char), image->__size, fp);
+		fclose(fp);
+	} else {
+		return soap_receiver_fault(soap, "Failed to open output file", szPath);
+	}
+	if (status != image->__size) {
+		return soap_receiver_fault(soap, "Failed to write all bytes to file.", szPath);
+	}
+	return SOAP_OK;
+}
diff --git a/mod_gsoap/gsoap_win/isapi/samples/dime/soap2stuff.cpp b/mod_gsoap/gsoap_win/isapi/samples/dime/soap2stuff.cpp
new file mode 100644
index 0000000..99c4262
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/samples/dime/soap2stuff.cpp
@@ -0,0 +1,36 @@
+/** file to include stdsoap2.cpp here, to get around directory location problems etc.
+*/
+
+/* You must set the include path in Visual Studio under tools|options|directories|include anway. 
+   There also the file below can be found.
+*/
+#include "stdsoap2.cpp"
+
+#include "soapH.h"
+
+xsd__base64Binary::xsd__base64Binary() 
+{ 
+   __ptr = NULL; 
+   __size = 0; 
+   id = NULL;
+   type = NULL;
+   options = NULL;
+} 
+xsd__base64Binary::xsd__base64Binary(struct soap *soap, int n) 
+{ 
+   __ptr = (unsigned char*)soap_malloc(soap, n); 
+   __size = n; 
+   id = NULL;
+   type = NULL;
+   options = NULL;
+} 
+xsd__base64Binary::~xsd__base64Binary() 
+{ } 
+unsigned char *xsd__base64Binary::location() 
+{ 
+   return __ptr; 
+} 
+int xsd__base64Binary::size() 
+{ 
+   return __size; 
+} 
diff --git a/mod_gsoap/gsoap_win/isapi/samples/dime/stdsoap2.def b/mod_gsoap/gsoap_win/isapi/samples/dime/stdsoap2.def
new file mode 100644
index 0000000..d7be1b9
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/samples/dime/stdsoap2.def
@@ -0,0 +1,16 @@
+; soapcpp2.def : Declares the module parameters for a gsoap server DLL.
+
+DESCRIPTION  'gosap server dll'
+
+EXPORTS
+    ; we must export what the gsoap isapi extension needs for loading us and working with us.
+	soap_init	PRIVATE
+	soap_serve  PRIVATE
+	soap_delete PRIVATE
+	soap_done	PRIVATE
+	soap_end	PRIVATE
+	soap_register_plugin_arg PRIVATE
+	soap_lookup_plugin PRIVATE
+	
+	mod_gsoap_init PRIVATE      ; initializer called before loading
+	mod_gsoap_terminate PRIVATE ; called before uploading 
\ No newline at end of file
diff --git a/mod_gsoap/gsoap_win/isapi/samples/dime/winstuff.cpp b/mod_gsoap/gsoap_win/isapi/samples/dime/winstuff.cpp
new file mode 100644
index 0000000..1581cf7
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/samples/dime/winstuff.cpp
@@ -0,0 +1,28 @@
+// winstuff.cpp : Defines the entry point for the DLL application.
+//
+
+
+#define WIN32_LEAN_AND_MEAN		// Exclude rarely-used stuff from Windows headers
+#include <windows.h>
+#include <winsock2.h>
+
+
+#if _MSC_VER > 1000
+#pragma comment(lib, "wsock32")
+#endif
+
+static struct WSAInit { \
+        WSADATA WsaData; \
+        WSAInit() {WSAStartup(0x0101, &WsaData);} \
+        ~WSAInit() {WSACleanup();} \
+} WsaInit;
+
+
+/** Main entry point when dll is loaded or a thread is attached. 
+	Well, its windoze. So don't rely on DllMain to be called at every new thread using your server.
+	IIS has a thread pool and if you get used in a pooled thread for the first time you will miss the thread attach notification.
+*/
+BOOL APIENTRY DllMain(HANDLE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved) {
+    return TRUE;
+}
+
diff --git a/mod_gsoap/gsoap_win/isapi/samples/samples.mak b/mod_gsoap/gsoap_win/isapi/samples/samples.mak
new file mode 100644
index 0000000..f8c1b90
--- /dev/null
+++ b/mod_gsoap/gsoap_win/isapi/samples/samples.mak
@@ -0,0 +1,12 @@
+
+
+all:
+	echo done.
+
+clean:
+	cd calc
+		$(MAKE) clean
+	cd ..
+	cd dime
+		$(MAKE) clean
+	cd ..
diff --git a/mod_gsoap/gsoap_win/wininet/gsoapWinInet.cpp b/mod_gsoap/gsoap_win/wininet/gsoapWinInet.cpp
new file mode 100644
index 0000000..555f2a7
--- /dev/null
+++ b/mod_gsoap/gsoap_win/wininet/gsoapWinInet.cpp
@@ -0,0 +1,1071 @@
+/*
+ * File:    gsoapWinInet.cpp
+ *
+ *  See the header file for details.
+ *
+ * Redistribution: 
+ *          Feel free to use, improve, and share.  I would appreciate 
+ *          notification of any bugs found/fixed, or improvements made. This 
+ *          code has not been extensively tested, so use at your own risk.  
+ */
+
+/* system */
+#include <windows.h>
+#include <crtdbg.h>
+#include <wininet.h>
+
+/* gsoap */
+#include <stdsoap2.h>
+
+/* local */
+#include "gsoapWinInet.h"
+
+/* ensure that the wininet library is linked */
+#pragma comment( lib, "wininet.lib" )
+
+#define UNUSED_ARG(x)           (x)
+#define INVALID_BUFFER_LENGTH  ((DWORD)-1)
+typedef unsigned long DWORD_PTR;
+
+/* plugin id */
+static const char wininet_id[] = "wininet-2.0";
+
+/* plugin private data */
+struct wininet_data
+{
+    HINTERNET           hInternet;          /* internet session handle */
+    HINTERNET           hConnection;        /* current connection handle */
+    BOOL                bDisconnect;        /* connection is disconnected */
+    DWORD               dwRequestFlags;     /* extra request flags from user */
+    char *              pBuffer;            /* send buffer */
+    size_t              uiBufferLenMax;     /* total length of the message */
+    size_t              uiBufferLen;        /* length of data in buffer */
+    BOOL                bIsChunkSize;       /* expecting a chunk size buffer */
+#ifdef SOAP_DEBUG
+    /* this is only used for DBGLOG output */
+    char *              pszErrorMessage;    /* wininet/system error message */
+#endif
+};
+
+/* forward declarations */
+static BOOL
+wininet_init(
+    struct soap *           soap, 
+    struct wininet_data *   a_pData,
+    DWORD                   a_dwRequestFlags );
+static int  
+wininet_copy( 
+    struct soap *           soap, 
+    struct soap_plugin *    a_pDst, 
+    struct soap_plugin *    a_pSrc );
+static void 
+wininet_delete( 
+    struct soap *           soap, 
+    struct soap_plugin *    a_pPluginData );
+static int  
+wininet_connect( 
+    struct soap *   soap, 
+    const char *    a_pszEndpoint, 
+    const char *    a_pszHost, 
+    int             a_nPort );
+static int 
+wininet_post_header(
+    struct soap *   soap, 
+    const char *    a_pszKey, 
+    const char *    a_pszValue );
+static int 
+wininet_fsend( 
+    struct soap *   soap, 
+    const char *    a_pBuffer, 
+    size_t          a_uiBufferLen );
+static size_t 
+wininet_frecv(
+    struct soap *   soap, 
+    char *          a_pBuffer, 
+    size_t          a_uiBufferLen );
+static int 
+wininet_disconnect( 
+    struct soap *   soap );
+void CALLBACK
+wininet_callback(
+    HINTERNET   hInternet,
+    DWORD_PTR   dwContext,
+    DWORD       dwInternetStatus,
+    LPVOID      lpvStatusInformation,
+    DWORD       dwStatusInformationLength );
+static BOOL
+wininet_have_connection(
+    struct soap *           soap,
+    struct wininet_data *   a_pData );
+static DWORD
+wininet_set_timeout(
+    struct soap *           soap, 
+    struct wininet_data *   a_pData,
+    const char *            a_pszTimeout,
+    DWORD                   a_dwOption,
+    int                     a_nTimeout );
+static BOOL
+wininet_resolve_send_error( 
+    HINTERNET   a_hHttpRequest, 
+    DWORD       a_dwErrorCode );
+
+#ifdef SOAP_DEBUG
+/* this is only used for DBGLOG output */
+static const char *
+wininet_error_message(
+    struct soap *   a_pData,
+    DWORD           a_dwErrorMsgId );
+static void
+wininet_free_error_message(
+    struct wininet_data *   a_pData );
+#else
+#define wininet_free_error_message(x)
+#endif
+
+/* plugin registration */
+int 
+wininet_plugin( 
+    struct soap *           soap, 
+    struct soap_plugin *    a_pPluginData, 
+    void *                  a_dwRequestFlags )
+{
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+        "wininet %p: plugin registration\n", soap ));
+
+    a_pPluginData->id        = wininet_id;
+    a_pPluginData->fcopy     = wininet_copy;
+    a_pPluginData->fdelete   = wininet_delete;
+    a_pPluginData->data      = (void*) malloc( sizeof(struct wininet_data) );
+    if ( !a_pPluginData->data )
+    {
+        return SOAP_EOM;
+    }
+    if ( !wininet_init( soap, 
+        (struct wininet_data *) a_pPluginData->data, 
+        (DWORD) a_dwRequestFlags ) )
+    {
+        free( a_pPluginData->data );
+        return SOAP_EOM;
+    }
+
+#ifdef SOAP_DEBUG
+    if ( (soap->omode & SOAP_IO) == SOAP_IO_STORE )
+    {
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+            "wininet %p: use of SOAP_IO_STORE is not recommended\n", soap ));
+    }
+#endif
+
+    return SOAP_OK;
+}
+
+/* initialize private data */
+static BOOL
+wininet_init(
+    struct soap *           soap, 
+    struct wininet_data *   a_pData,
+    DWORD                   a_dwRequestFlags )
+{
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+        "wininet %p: init private data\n", soap ));
+
+    memset( a_pData, 0, sizeof(struct wininet_data) );
+    a_pData->dwRequestFlags = a_dwRequestFlags;
+
+    /* start our internet session */
+    a_pData->hInternet = InternetOpenA( 
+        "gSOAP", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0 );
+    if ( !a_pData->hInternet )
+    {
+        soap->error = GetLastError();
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+            "wininet %p: init, error %d (%s) in InternetOpen\n", 
+            soap, soap->error, wininet_error_message(soap,soap->error) ));
+        wininet_free_error_message( a_pData );
+        return FALSE;
+    }
+
+    /* set the timeouts, if any of these fail the error isn't fatal */
+    wininet_set_timeout( soap, a_pData, "connect", 
+        INTERNET_OPTION_CONNECT_TIMEOUT, soap->connect_timeout );
+    wininet_set_timeout( soap, a_pData, "receive", 
+        INTERNET_OPTION_RECEIVE_TIMEOUT, soap->recv_timeout );
+    wininet_set_timeout( soap, a_pData, "send",    
+        INTERNET_OPTION_SEND_TIMEOUT, soap->send_timeout );
+
+    /* set up the callback function so we get notifications */
+    InternetSetStatusCallback( a_pData->hInternet, wininet_callback );
+
+    /* set all of our callbacks */
+    soap->fopen    = wininet_connect;
+    soap->fposthdr = wininet_post_header;
+    soap->fsend    = wininet_fsend;
+    soap->frecv    = wininet_frecv;
+    soap->fclose   = wininet_disconnect;
+
+    return TRUE;
+}
+
+/* copy the private data structure */
+static int  
+wininet_copy( 
+    struct soap *           soap, 
+    struct soap_plugin *    a_pDst, 
+    struct soap_plugin *    a_pSrc )
+{
+    UNUSED_ARG( soap );
+    UNUSED_ARG( a_pDst );
+    UNUSED_ARG( a_pSrc );
+
+    _ASSERTE( !"wininet doesn't support copy" );
+    return SOAP_FATAL_ERROR;
+}
+
+/* deallocate of our private structure */
+static void 
+wininet_delete( 
+    struct soap *           soap, 
+    struct soap_plugin *    a_pPluginData )
+{
+    struct wininet_data * pData = 
+        (struct wininet_data *) a_pPluginData->data;
+
+    UNUSED_ARG( soap );
+
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+        "wininet %p: delete private data\n", soap ));
+
+    /* force a disconnect of any existing connection */
+    pData->bDisconnect = TRUE;
+    wininet_have_connection( soap, pData );
+
+    /* close down the internet */
+    if ( pData->hInternet )
+    {
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+            "wininet %p: closing internet handle\n", soap));
+        InternetCloseHandle( pData->hInternet );
+        pData->hInternet = NULL;
+    }
+
+    /* free our data */
+    wininet_free_error_message( pData );
+    free( a_pPluginData->data );
+}
+
+/* gsoap documentation:
+    Called from a client proxy to open a connection to a Web Service located 
+    at endpoint. Input parameters host and port are micro-parsed from endpoint.
+    Should return a valid file descriptor, or SOAP_INVALID_SOCKET and 
+    soap->error set to an error code. Built-in gSOAP function: tcp_connect
+*/
+static int  
+wininet_connect( 
+    struct soap *   soap, 
+    const char *    a_pszEndpoint, 
+    const char *    a_pszHost, 
+    int             a_nPort )
+{
+    URL_COMPONENTSA urlComponents;
+    char            szUrlPath[MAX_PATH];
+    char            szHost[MAX_PATH];
+    DWORD           dwFlags;
+    HINTERNET       hConnection  = NULL;
+    HINTERNET       hHttpRequest = NULL;
+    struct wininet_data * pData = 
+        (struct wininet_data *) soap_lookup_plugin( soap, wininet_id );
+
+    soap->error = SOAP_OK;
+
+    /* we parse the URL ourselves so we don't use these parameters */
+    UNUSED_ARG( a_pszHost );
+    UNUSED_ARG( a_nPort );
+
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+        "wininet %p: connect, endpoint = '%s'\n", soap, a_pszEndpoint ));
+
+    /* we should be initialized but not connected */
+    _ASSERTE( pData->hInternet );
+    _ASSERTE( !pData->hConnection );
+    _ASSERTE( soap->socket == SOAP_INVALID_SOCKET );
+
+    /* parse out the url path */
+    memset( &urlComponents, 0, sizeof(urlComponents) );
+    urlComponents.dwStructSize = sizeof(urlComponents);
+    urlComponents.lpszHostName      = szHost;
+    urlComponents.dwHostNameLength  = MAX_PATH;
+    urlComponents.lpszUrlPath       = szUrlPath;
+    urlComponents.dwUrlPathLength   = MAX_PATH;
+    if ( !InternetCrackUrlA( a_pszEndpoint, 0, 0, &urlComponents ) )
+    {
+        InternetCloseHandle( hConnection );
+        soap->error = GetLastError();
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+            "wininet %p: connect, error %d (%s) in InternetCrackUrl\n", 
+            soap, soap->error, wininet_error_message(soap,soap->error) ));
+        return SOAP_INVALID_SOCKET;
+    }
+
+    /* connect to the target url, if we haven't connected yet 
+       or if it was dropped */
+    hConnection = InternetConnectA( pData->hInternet, 
+        szHost, urlComponents.nPort, "", "", INTERNET_SERVICE_HTTP, 
+        0, (DWORD_PTR) soap );
+    if ( !hConnection )
+    {
+        soap->error = GetLastError();
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+            "wininet %p: connect, error %d (%s) in InternetConnect\n", 
+            soap, soap->error, wininet_error_message(soap,soap->error) ));
+        return SOAP_INVALID_SOCKET;
+    }
+
+    /* 
+        Note that although we specify HTTP/1.1 for the connection here, the 
+        actual connection may be HTTP/1.0 depending on the settings in the 
+        control panel. See the "Internet Options", "HTTP 1.1 settings".
+     */
+    dwFlags = pData->dwRequestFlags;
+    if ( soap->omode & SOAP_IO_KEEPALIVE )
+    {
+        dwFlags |= INTERNET_FLAG_KEEP_CONNECTION;
+    }
+    if ( urlComponents.nScheme == INTERNET_SCHEME_HTTPS ) 
+    {
+        dwFlags |= INTERNET_FLAG_SECURE;
+    }
+    hHttpRequest = HttpOpenRequestA(
+        hConnection, "POST", szUrlPath, "HTTP/1.1", NULL, NULL, 
+        dwFlags, (DWORD_PTR) soap );
+    if ( !hHttpRequest )
+    {
+        InternetCloseHandle( hConnection );
+        soap->error = GetLastError();
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+            "wininet %p: connect, error %d (%s) in HttpOpenRequest\n", 
+            soap, soap->error, wininet_error_message(soap,soap->error) ));
+        return SOAP_INVALID_SOCKET;
+    }
+
+    /* save the connection handle in our data structure */
+    pData->hConnection = hConnection;
+
+    /* return the http request handle as our file descriptor. */
+    _ASSERTE( sizeof(soap->socket) >= sizeof(HINTERNET) );
+    return (SOAP_SOCKET) hHttpRequest;
+}
+
+/* gsoap documentation:
+    Called by http_post and http_response (through the callbacks). Emits HTTP 
+    key: val header entries. Should return SOAP_OK, or a gSOAP error code. 
+    Built-in gSOAP function: http_post_header.
+ */
+static int 
+wininet_post_header(
+    struct soap *   soap, 
+    const char *    a_pszKey, 
+    const char *    a_pszValue )  
+{
+    HINTERNET hHttpRequest = (HINTERNET) soap->socket;
+    char      szHeader[MAX_PATH];
+    int       nLen;
+    BOOL      bResult = FALSE;
+    struct wininet_data * pData = 
+        (struct wininet_data *) soap_lookup_plugin( soap, wininet_id );
+
+    soap->error = SOAP_OK;
+
+    /* ensure that our connection hasn't been disconnected */
+    if ( !wininet_have_connection( soap, pData ) )
+    {
+        return SOAP_EOF;
+    }
+
+    /* if this is the initial POST header then we initialize our send buffer */
+    if ( a_pszKey && !a_pszValue )
+    {
+        _ASSERTE( !pData->pBuffer );
+        pData->uiBufferLenMax = INVALID_BUFFER_LENGTH;
+        pData->uiBufferLen    = 0;
+
+        /* if we are using chunk output then we start with a chunk size */
+        pData->bIsChunkSize = ( (soap->omode & SOAP_IO) == SOAP_IO_CHUNK );
+    }
+    else if ( a_pszValue )
+    { 
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+            "wininet %p: post_header, adding '%s: %s'\n", 
+            soap, a_pszKey, a_pszValue ));
+
+        /* determine the maximum length of this message so that we can
+           correctly determine when we have completed the send */
+        if ( !strcmp( a_pszKey, "Content-Length" ) )
+        {
+            _ASSERTE( pData->uiBufferLenMax == INVALID_BUFFER_LENGTH );
+            pData->uiBufferLenMax = strtoul( a_pszValue, NULL, 10 );
+        }
+
+        nLen = _snprintf( 
+            szHeader, MAX_PATH, "%s: %s\r\n", a_pszKey, a_pszValue );
+        if ( nLen < 0 )
+        {
+            return SOAP_EOM;
+        }
+        bResult = HttpAddRequestHeadersA( hHttpRequest, szHeader, nLen, 
+            HTTP_ADDREQ_FLAG_ADD_IF_NEW );
+#ifdef SOAP_DEBUG
+        /* 
+            we don't return an error if this fails because it isn't 
+            (or shouldn't be) critical.
+         */
+        if ( !bResult )
+        {
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+                "wininet %p: post_header, error %d (%s) in HttpAddRequestHeaders\n", 
+                soap, soap->error, wininet_error_message(soap,GetLastError()) ));
+        }
+#endif
+    }
+    return SOAP_OK; 
+}
+
+/* gsoap documentation:
+    Called for all send operations to emit contents of s of length n. 
+    Should return SOAP_OK, or a gSOAP error code. Built-in gSOAP 
+    function: fsend
+
+   Notes:
+    I do a heap of buffering here because we need the entire message available
+    in a single buffer in order to iterate through the sending loop. I had 
+    hoped that the SOAP_IO_STORE flag would have worked to do the same, however
+    this still breaks the messages up into blocks. Although there were a number
+    of ways this could've been implemented, this works and supports all of the
+    possible SOAP_IO flags, even though the entire message is still buffered 
+    the same as if SOAP_IO_STORE was used.
+*/
+static int 
+wininet_fsend( 
+    struct soap *   soap, 
+    const char *    a_pBuffer, 
+    size_t          a_uiBufferLen )
+{
+    HINTERNET   hHttpRequest = (HINTERNET) soap->socket;
+    BOOL        bResult;
+    BOOL        bRetryPost;
+    DWORD       dwStatusCode;
+    DWORD       dwStatusCodeLen;
+    int         nResult = SOAP_OK;
+    struct wininet_data * pData = 
+        (struct wininet_data *) soap_lookup_plugin( soap, wininet_id );
+
+    soap->error = SOAP_OK;
+
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+        "wininet %p: fsend, data len = %lu bytes\n", soap, a_uiBufferLen ));
+
+    _ASSERTE( a_uiBufferLen > 0 );
+
+    /* ensure that our connection hasn't been disconnected */
+    if ( !wininet_have_connection( soap, pData ) )
+    {
+        return SOAP_EOF;
+    }
+
+    /* initialize on our first time through. pData->pBuffer will always be 
+       non-null if this is not the first call. */
+    if ( !pData->pBuffer )
+    {
+        /* 
+            If we are using chunked sending, then we don't know how big the
+            buffer will need to be. So we start with a 0 length buffer and
+            grow it later to ensure that it is always large enough.
+
+                uiBufferLenMax = length of the allocated memory
+                uiBufferLen    = length of the data in the buffer
+         */
+        if ( (soap->mode & SOAP_IO) == SOAP_IO_CHUNK )
+        {
+            /* we make the initial allocation large enough for this chunksize 
+               buffer, plus the next chunk of actual data, and a few extra 
+               bytes for the final "0" chunksize block. */
+            size_t uiChunkSize = strtoul( a_pBuffer, NULL, 16 );
+            pData->uiBufferLenMax = uiChunkSize + a_uiBufferLen + 16;
+        }
+        else if ( a_uiBufferLen == pData->uiBufferLenMax )
+        {
+            /*  
+                If the currently supplied buffer from gsoap holds the entire 
+                message then we just use their buffer and avoid any memory 
+                allocation. This will only be true when (1) we are not using 
+                chunked send (so uiBufferLenMax has been previously set to 
+                the Content-Length header length), and (2) gsoap is sending 
+                the entire message at one time. 
+             */
+            pData->pBuffer     = (char *) a_pBuffer;
+            pData->uiBufferLen = a_uiBufferLen;
+        }
+
+        _ASSERTE( pData->uiBufferLenMax != INVALID_BUFFER_LENGTH );
+    }
+
+    /*
+        If we can't use the gsoap buffer, then we need to allocate our own
+        buffer for the entire message. This is because authentication may 
+        require the entire message to be sent multiple times. Since this send
+        is only a part of the message, we need to buffer until we have the 
+        entire message.
+    */
+    if ( pData->pBuffer != a_pBuffer )
+    {
+        /* 
+            We already have a buffer pointer, this means that it isn't the 
+            first time we have been called. We have allocated a buffer and 
+            are current filling it. 
+            
+            If we don't have enough room in the our buffer to add this new 
+            data, then we need to reallocate. This case will only occur with 
+            chunked sends. 
+         */
+        size_t uiNewBufferLen = pData->uiBufferLen + a_uiBufferLen;
+        if ( !pData->pBuffer || uiNewBufferLen > pData->uiBufferLenMax )
+        {
+            while ( uiNewBufferLen > pData->uiBufferLenMax )
+            {
+                pData->uiBufferLenMax = pData->uiBufferLenMax * 2;
+            }
+            pData->pBuffer = (char *) realloc( pData->pBuffer, pData->uiBufferLenMax );
+            if ( !pData->pBuffer )
+            {
+                return SOAP_EOM;
+            }
+        }
+        memcpy( pData->pBuffer + pData->uiBufferLen, 
+            a_pBuffer, a_uiBufferLen );
+        pData->uiBufferLen = uiNewBufferLen;
+
+        /* if we are doing chunked transfers, and this is a chunk size block,
+           and it is "0", then this is the last block in the transfer and we
+           can set the maximum size now to continue to the actual send. */
+        if ( (soap->mode & SOAP_IO) == SOAP_IO_CHUNK
+             && pData->bIsChunkSize 
+             && a_pBuffer[2] == '0' && !isalnum(a_pBuffer[3]) )
+        {
+            pData->uiBufferLenMax = pData->uiBufferLen;
+        }
+    }
+
+    /* if we haven't got the entire length of the message yet, then 
+       we return to gsoap and let it continue */
+    if ( pData->uiBufferLen < pData->uiBufferLenMax )
+    {
+        /* toggle our chunk size marker if we are chunking */
+        pData->bIsChunkSize = 
+            ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) 
+            && !pData->bIsChunkSize; 
+        return SOAP_OK;
+    }
+    _ASSERTE( pData->uiBufferLen == pData->uiBufferLenMax );
+
+    /* we've now got the entire message, now we can enter our sending loop */
+    bRetryPost = TRUE;
+    while ( bRetryPost )
+    {
+        bRetryPost = FALSE;
+
+        bResult = HttpSendRequestA( 
+            hHttpRequest, NULL, 0, pData->pBuffer, pData->uiBufferLen );
+        if ( !bResult )
+        {
+            soap->error = GetLastError();
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+                "wininet %p: fsend, error %d (%s) in HttpSendRequest\n", 
+                soap, soap->error, wininet_error_message(soap,soap->error) ));
+
+            /* see if we can handle this error, see the MSDN documentation
+               for InternetErrorDlg for details */
+            switch ( soap->error )
+            {
+            case ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR:
+            case ERROR_INTERNET_INCORRECT_PASSWORD:
+            case ERROR_INTERNET_INVALID_CA:
+            case ERROR_INTERNET_POST_IS_NON_SECURE:
+            case ERROR_INTERNET_SEC_CERT_CN_INVALID:
+            case ERROR_INTERNET_SEC_CERT_DATE_INVALID:
+                if ( wininet_resolve_send_error( hHttpRequest, soap->error ) )
+                {
+                    DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+                        "wininet %p: fsend, error %d has been resolved\n", 
+                        soap, soap->error ));
+                    bRetryPost = TRUE;
+
+                    /* 
+                        we would have been disconnected by the error. Since we 
+                        are going to try again, we will automatically be 
+                        reconnected. Therefore we want to disregard any 
+                        previous disconnection messages. 
+                     */
+                    pData->bDisconnect = FALSE; 
+                    continue;
+                }
+            }
+
+            /* if the error wasn't handled then we exit */
+            nResult = SOAP_HTTP_ERROR;
+            break;
+        }
+
+        /* get the status code from the response to determine if we need 
+           to authorize */
+        dwStatusCodeLen = sizeof(dwStatusCode);
+        bResult = HttpQueryInfo( 
+            hHttpRequest, HTTP_QUERY_STATUS_CODE | HTTP_QUERY_FLAG_NUMBER, 
+            &dwStatusCode, &dwStatusCodeLen, NULL);
+        if ( !bResult )
+        {
+            soap->error = GetLastError();
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+                "wininet %p: fsend, error %d (%s) in HttpQueryInfo\n", 
+                soap, soap->error, wininet_error_message(soap,soap->error) ));
+            nResult = SOAP_HTTP_ERROR;
+            break;
+        }
+
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+            "wininet %p: fsend, HTTP status code = %lu\n", 
+            soap, dwStatusCode));
+
+        /* 
+            if we need authentication, then request the user for the 
+            appropriate data. Their reply is saved into the request so 
+            that we can use it later.
+         */
+        switch ( dwStatusCode )
+        {
+        case HTTP_STATUS_DENIED:
+        case HTTP_STATUS_PROXY_AUTH_REQ:
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+                "wininet %p: fsend, user authenication required\n", 
+                soap ));
+            if ( wininet_resolve_send_error( hHttpRequest, 
+                ERROR_INTERNET_INCORRECT_PASSWORD ) )
+            {
+                DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+                    "wininet %p: fsend, authentication has been provided\n", 
+                    soap ));
+
+                /* 
+                    we may have been disconnected by the error. Since we 
+                    are going to try again, we will automatically be 
+                    reconnected. Therefore we want to disregard any previous
+                    disconnection messages. 
+                    */
+                pData->bDisconnect = FALSE; 
+                bRetryPost = TRUE;
+                continue;
+            }
+        }
+    }
+
+    /* if we have an allocated buffer then we can deallocate it now */
+    if ( pData->pBuffer != a_pBuffer )
+    {
+        free( pData->pBuffer );
+    }
+    pData->pBuffer     = 0;
+    pData->uiBufferLen = 0;
+    pData->uiBufferLenMax = INVALID_BUFFER_LENGTH;
+
+    return nResult; 
+}
+
+/* gsoap documentation:
+    Called for all receive operations to fill buffer s of maximum length n. 
+    Should return the number of bytes read or 0 in case of an error, e.g. EOF.
+    Built-in gSOAP function: frecv
+ */
+static size_t 
+wininet_frecv(
+    struct soap *   soap, 
+    char *          a_pBuffer, 
+    size_t          a_uiBufferLen ) 
+{ 
+    HINTERNET   hHttpRequest = (HINTERNET) soap->socket;
+    DWORD       dwBytesRead = 0;
+    size_t      uiTotalBytesRead = 0;
+    BOOL        bResult;
+
+    soap->error = SOAP_OK;
+
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+        "wininet %p: frecv, available buffer len = %lu\n", 
+        soap, a_uiBufferLen ));
+
+    /* 
+        NOTE: we do not check here that our connection hasn't been 
+        disconnected because in HTTP/1.0 connections, it will always have been
+        disconnected by now. This is because the response is checked by the 
+        wininet_fsend function to ensure that we didn't need any special 
+        authentication. At that time the connection would have been 
+        disconnected. This is okay however as we can still read the response
+        from the request handle.
+     */
+
+    do
+    {
+        /* read from the connection up to our maximum amount of data */
+        _ASSERTE( a_uiBufferLen <= ULONG_MAX );
+        bResult = InternetReadFile( 
+            hHttpRequest, 
+            &a_pBuffer[uiTotalBytesRead], 
+            (DWORD) a_uiBufferLen - uiTotalBytesRead, 
+            &dwBytesRead );
+        if ( bResult )
+        {
+            uiTotalBytesRead += dwBytesRead;
+        }
+        else
+        {
+            soap->error = GetLastError();
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+                "wininet %p: frecv, error %d (%s) in InternetReadFile\n", 
+                soap, soap->error, wininet_error_message(soap,soap->error) ));
+        }
+    } 
+    while ( bResult && dwBytesRead && uiTotalBytesRead < a_uiBufferLen );
+
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+        "wininet %p: recv, received %lu bytes\n", soap, uiTotalBytesRead ));
+
+    return uiTotalBytesRead;
+} 
+
+/* gsoap documentation:
+    Called by client proxy multiple times, to close a socket connection before
+    a new socket connection is established and at the end of communications 
+    when the SOAP_IO_KEEPALIVE flag is not set and soap.keep_alive = 0 
+    (indicating that the other party supports keep alive). Should return 
+    SOAP_OK, or a gSOAP error code. Built-in gSOAP function: tcp_disconnect
+ */
+static int 
+wininet_disconnect( 
+    struct soap *   soap )
+{
+    struct wininet_data * pData = 
+        (struct wininet_data *) soap_lookup_plugin( soap, wininet_id );
+
+    soap->error = SOAP_OK;
+
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "wininet %p: disconnect\n", soap ));
+
+    /* force a disconnect by setting the disconnect flag to TRUE */
+    pData->bDisconnect = TRUE;
+    wininet_have_connection( soap, pData );
+
+    return SOAP_OK;
+}
+
+/* this is mostly for debug tracing */
+void CALLBACK
+wininet_callback(
+    HINTERNET   hInternet,
+    DWORD_PTR   dwContext,
+    DWORD       dwInternetStatus,
+    LPVOID      lpvStatusInformation,
+    DWORD       dwStatusInformationLength )
+{
+    struct soap * soap = (struct soap *) dwContext;
+
+    UNUSED_ARG( hInternet );
+    UNUSED_ARG( lpvStatusInformation );
+    UNUSED_ARG( dwStatusInformationLength );
+
+    switch ( dwInternetStatus )
+    {
+    case INTERNET_STATUS_RESOLVING_NAME:
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+            "wininet %p: INTERNET_STATUS_RESOLVING_NAME\n", soap ));
+        break;
+    case INTERNET_STATUS_NAME_RESOLVED:
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+            "wininet %p: INTERNET_STATUS_NAME_RESOLVED\n", soap ));
+        break;
+    case INTERNET_STATUS_CONNECTING_TO_SERVER: 
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+            "wininet %p: INTERNET_STATUS_CONNECTING_TO_SERVER\n", soap));
+        break;
+    case INTERNET_STATUS_CONNECTED_TO_SERVER:
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+            "wininet %p: INTERNET_STATUS_CONNECTED_TO_SERVER\n", soap));
+        break;
+    case INTERNET_STATUS_SENDING_REQUEST:
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+            "wininet %p: INTERNET_STATUS_SENDING_REQUEST\n", soap));
+        break;
+    case INTERNET_STATUS_REQUEST_SENT:
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+            "wininet %p: INTERNET_STATUS_REQUEST_SENT, bytes sent = %lu\n", 
+            soap, *(DWORD *)lpvStatusInformation ));
+        break;
+    case INTERNET_STATUS_RECEIVING_RESPONSE:
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+            "wininet %p: INTERNET_STATUS_RECEIVING_RESPONSE\n", soap));
+        break;
+    case INTERNET_STATUS_RESPONSE_RECEIVED:
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+            "wininet %p: INTERNET_STATUS_RESPONSE_RECEIVED, bytes received = %lu\n", 
+            soap, *(DWORD *)lpvStatusInformation ));
+        break;
+    case INTERNET_STATUS_CTL_RESPONSE_RECEIVED:
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+            "wininet %p: INTERNET_STATUS_CTL_RESPONSE_RECEIVED\n", soap));
+        break;
+    case INTERNET_STATUS_PREFETCH:
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+            "wininet %p: INTERNET_STATUS_PREFETCH\n", soap));
+        break;
+    case INTERNET_STATUS_CLOSING_CONNECTION:
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+            "wininet %p: INTERNET_STATUS_CLOSING_CONNECTION\n", soap));
+        break;
+    case INTERNET_STATUS_CONNECTION_CLOSED:
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+            "wininet %p: INTERNET_STATUS_CONNECTION_CLOSED\n", soap));
+        {
+            /* the connection has been closed, so we close the handle here */
+            struct wininet_data * pData = 
+                (struct wininet_data *) soap_lookup_plugin( soap, wininet_id );
+            if ( pData->hConnection )
+            {
+                /* 
+                    we only mark this for disconnection otherwise we get 
+                    errors when reading the data from the handle. In every 
+                    function that we use the connection we will check first to 
+                    see if it has been disconnected.
+                 */
+                pData->bDisconnect = TRUE;
+            }
+        }
+        break;
+    case INTERNET_STATUS_HANDLE_CREATED:
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+            "wininet %p: INTERNET_STATUS_HANDLE_CREATED\n", soap));
+        break;
+    case INTERNET_STATUS_HANDLE_CLOSING:
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+            "wininet %p: INTERNET_STATUS_HANDLE_CLOSING\n", soap));
+        break;
+// Removed to avoid compile errors
+//    case INTERNET_STATUS_DETECTING_PROXY:
+//        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+//            "wininet %p: INTERNET_STATUS_DETECTING_PROXY\n", soap));
+//        break;
+    case INTERNET_STATUS_REQUEST_COMPLETE:
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+            "wininet %p: INTERNET_STATUS_REQUEST_COMPLETE\n", soap));
+        break;
+    case INTERNET_STATUS_REDIRECT:
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+            "wininet %p: INTERNET_STATUS_REDIRECT, new url = %s\n", 
+            soap, (char*) lpvStatusInformation ));
+        break;
+    case INTERNET_STATUS_INTERMEDIATE_RESPONSE:
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+            "wininet %p: INTERNET_STATUS_INTERMEDIATE_RESPONSE\n", soap));
+        break;
+// Removed to avoid compile errors
+//    case INTERNET_STATUS_USER_INPUT_REQUIRED:
+//        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+//            "wininet %p: INTERNET_STATUS_USER_INPUT_REQUIRED\n", soap));
+//        break;
+    case INTERNET_STATUS_STATE_CHANGE:
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+            "wininet %p: INTERNET_STATUS_STATE_CHANGE\n", soap));
+        break;
+// Removed to avoid compile errors
+//    case INTERNET_STATUS_COOKIE_SENT:
+//        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+//            "wininet %p: INTERNET_STATUS_COOKIE_SENT\n", soap));
+//        break;
+//    case INTERNET_STATUS_COOKIE_RECEIVED:
+//        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+//            "wininet %p: INTERNET_STATUS_COOKIE_RECEIVED\n", soap));
+//        break;
+//    case INTERNET_STATUS_PRIVACY_IMPACTED:
+//        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+//            "wininet %p: INTERNET_STATUS_PRIVACY_IMPACTED\n", soap));
+//        break;
+//    case INTERNET_STATUS_P3P_HEADER:
+//        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+//            "wininet %p: INTERNET_STATUS_P3P_HEADER\n", soap));
+//        break;
+//    case INTERNET_STATUS_P3P_POLICYREF:
+//        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+//            "wininet %p: INTERNET_STATUS_P3P_POLICYREF\n", soap));
+//        break;
+//    case INTERNET_STATUS_COOKIE_HISTORY:
+//        DBGLOG(TEST, SOAP_MESSAGE(fdebug,
+//            "wininet %p: INTERNET_STATUS_COOKIE_HISTORY\n", soap));
+//        break;
+    }
+}
+
+/* 
+    check to ensure that our connection hasn't been disconnected 
+    and disconnect remaining handles if necessary.
+ */
+static BOOL
+wininet_have_connection(
+    struct soap *           soap,
+    struct wininet_data *   a_pData )
+{
+    /* close the http request if we don't have a connection */
+    BOOL bCloseRequest = a_pData->bDisconnect || !a_pData->hConnection;
+    if ( bCloseRequest && soap->socket != SOAP_INVALID_SOCKET )
+    {
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+            "wininet %p: closing request\n", soap));
+
+        InternetCloseHandle( (HINTERNET) soap->socket );
+        soap->socket = SOAP_INVALID_SOCKET;
+    }
+
+    /* close the connection if we don't have a request */
+    if ( soap->socket == SOAP_INVALID_SOCKET && a_pData->hConnection )
+    {
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+            "wininet %p: closing connection\n", soap));
+
+        InternetCloseHandle( a_pData->hConnection );
+        a_pData->hConnection = NULL;
+    }
+    a_pData->bDisconnect = FALSE;
+
+    /* clean up the send details if we don't have a request */
+    if ( soap->socket == SOAP_INVALID_SOCKET )
+    {
+        if ( a_pData->pBuffer )
+        {
+            free( a_pData->pBuffer );
+            a_pData->pBuffer = 0;
+        }
+        a_pData->uiBufferLen = 0;
+        a_pData->uiBufferLenMax = INVALID_BUFFER_LENGTH;
+    }
+
+    /* we now either still have both request and connection, or neither */
+    return (a_pData->hConnection != NULL);
+}
+
+static DWORD
+wininet_set_timeout(
+    struct soap *           soap, 
+    struct wininet_data *   a_pData,
+    const char *            a_pszTimeout,
+    DWORD                   a_dwOption,
+    int                     a_nTimeout )
+{
+    UNUSED_ARG( soap );
+    UNUSED_ARG( a_pszTimeout );
+
+    if ( a_nTimeout > 0 )
+    {
+        DWORD dwTimeout = a_nTimeout * 1000;
+        if ( !InternetSetOption( a_pData->hInternet, 
+            a_dwOption, &dwTimeout, sizeof(DWORD) ) )
+        {
+            DWORD dwErrorCode = GetLastError();
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, 
+                "wininet %p: failed to set %s timeout, error %d (%s)\n", 
+                soap, a_pszTimeout, dwErrorCode, 
+                wininet_error_message(soap,dwErrorCode) ));
+            return dwErrorCode;
+        }
+    }
+    return 0;
+}
+
+static BOOL
+wininet_resolve_send_error( 
+    HINTERNET   a_hHttpRequest, 
+    DWORD       a_dwErrorCode )
+{
+    DWORD dwResult = InternetErrorDlg(
+        GetDesktopWindow(), 
+        a_hHttpRequest, 
+        a_dwErrorCode,
+        FLAGS_ERROR_UI_FILTER_FOR_ERRORS |
+        FLAGS_ERROR_UI_FLAGS_GENERATE_DATA |
+        FLAGS_ERROR_UI_FLAGS_CHANGE_OPTIONS,
+        NULL );
+    return (dwResult == ERROR_INTERNET_FORCE_RETRY 
+        || dwResult == ERROR_SUCCESS);
+}
+
+#ifdef SOAP_DEBUG
+static const char *
+wininet_error_message(
+    struct soap *   soap,
+    DWORD           a_dwErrorMsgId )
+{
+    HINSTANCE   hModule;
+    DWORD       dwResult;
+    DWORD       dwFormatFlags;
+    struct wininet_data * pData = 
+        (struct wininet_data *) soap_lookup_plugin( soap, wininet_id );
+
+    /* free any existing error message */
+    wininet_free_error_message( pData );
+
+    dwFormatFlags = 
+        FORMAT_MESSAGE_ALLOCATE_BUFFER |
+        FORMAT_MESSAGE_IGNORE_INSERTS |
+        FORMAT_MESSAGE_FROM_SYSTEM;
+
+    /* load wininet.dll for the error messages */
+    hModule = LoadLibraryExA( "wininet.dll", NULL,
+        LOAD_LIBRARY_AS_DATAFILE | DONT_RESOLVE_DLL_REFERENCES );
+    if ( hModule )
+    {
+        dwFormatFlags |= FORMAT_MESSAGE_FROM_HMODULE;
+    }
+
+    /* format the messages */
+    dwResult = FormatMessageA( 
+        dwFormatFlags, 
+        hModule, 
+        a_dwErrorMsgId, 
+        MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL),
+        (LPSTR) &pData->pszErrorMessage,
+        0,
+        NULL );
+
+    /* free the library if we loaded it */
+    if ( hModule )
+    {
+        FreeLibrary( hModule );
+    }
+
+    /* remove the CR LF from the error message */
+    if ( dwResult > 2 )
+    {
+        pData->pszErrorMessage[dwResult-2] = 0;
+        return pData->pszErrorMessage;
+    }
+    else
+    {
+        const static char szUnknown[] = "(unknown)";
+        return szUnknown;
+    }
+}
+
+static void
+wininet_free_error_message(
+    struct wininet_data *   a_pData )
+{
+    if ( a_pData->pszErrorMessage )
+    {
+        LocalFree( a_pData->pszErrorMessage );
+        a_pData->pszErrorMessage = 0;
+    }
+}
+#endif /* SOAP_DEBUG */
diff --git a/mod_gsoap/gsoap_win/wininet/gsoapWinInet.h b/mod_gsoap/gsoap_win/wininet/gsoapWinInet.h
new file mode 100644
index 0000000..fff289a
--- /dev/null
+++ b/mod_gsoap/gsoap_win/wininet/gsoapWinInet.h
@@ -0,0 +1,142 @@
+/*
+ * File:    gsoapWinInet2.h
+ *
+ * Authors: 26 May 2003: Jack Kustanowitz (jackk@atomica.com)
+ *          Original version
+ *
+ *          29 September 2003: Brodie Thiesfield (bt@jellycan.com)
+ *          Rewritten as C plugin for gsoap. Bugs fixed and features added.
+ *
+ *          14 January 2004: Brodie Thiesfield (bt@jellycan.com)
+ *          Bug fix.
+ *
+ * Purpose: Allow gsoap clients (not servers) to direct all communications 
+ *          through the WinInet API. This automatically provides all of the 
+ *          proxy and authentication features supported by the control panel 
+ *          'Internet Options' dialog to the client. As these options are 
+ *          shared by IE, this means that "if IE works, gsoap works."
+ *
+ * Features:
+ *          + gsoap plugin - extremely easy to use
+ *          + complete support for:
+ *              - HTTP/1.0 and HTTP/1.1
+ *              - HTTPS (no extra libraries are required)
+ *              - HTTP authentication
+ *              - Proxy servers (simple, automatic discovery, etc)
+ *              - Proxy authentication (basic, NTLM, etc)
+ *          + authentication prompts and HTTPS warnings (e.g. invalid HTTPS CA) 
+ *              can be resolved by the user via standard system dialog boxes.
+ *          + message size is limited only by available memory
+ *          + connect, receive and send timeouts are used 
+ *          + supports all SOAP_IO types (see limitations)
+ *          + written completely in C, can be used in C, C++, and MFC projects
+ *              without modification (anywhere that gsoap is used)
+ *          + can be used in both MBCS and UNICODE projects
+ *          + compiles cleanly at warning level 4 (if gsoap uses SOAP_SOCKET
+ *              for the definition of sockets instead of int, it will also
+ *              compile without win64 warnings).
+ *          + all debug trace goes to the gsoap TEST.log file 
+ *          + supports multiple threads (all plugin data is stored in the 
+ *              soap structure - no static variables)
+ *
+ * Limitations:
+ *          - DIME attachments are not supported
+ *          - may internally buffer the entire outgoing message before sending
+ *              (if the serialized message is larger then SOAP_BUFLEN, or if 
+ *              SOAP_IO_CHUNK mode is being used then the entire message will 
+ *              be buffered)
+ *
+ * Usage:   Add the gsoapWinInet2.h and gsoapWinInet2.cpp files to your project 
+ *          (if you have a C project, rename gsoapWinInet2.cpp to .c and use
+ *          it as is). Ensure that you turn off precompiled headers for the 
+ *          .cpp file.
+ *
+ *          In your source, just after calling soap_init(), register this 
+ *          plugin with soap_register_plugin( soap, wininet_plugin ). 
+ *
+ *          e.g.
+ *              struct soap soap;
+ *              soap_init( &soap );
+ *              soap_register_plugin( &soap, wininet_plugin );
+ *              soap.connect_timeout = 5; // this will be used by wininet too
+ *              ...
+ *              soap_done(&soap);
+ *
+ * Notes:   For extra control, you may also register this plugin using the 
+ *          soap_register_plugin_arg() function, and supply as the argument 
+ *          flags which you wished to be passed to HttpOpenRequest. 
+ *
+ *          e.g.
+ *              struct soap soap;
+ *              soap_init( &soap );
+ *              soap_register_plugin_arg( &soap, wininet_plugin,
+ *                  (void*) INTERNET_FLAG_IGNORE_CERT_CN_INVALID );
+ *
+ *          See the MSDN documentation on HttpOpenRequest for details of 
+ *          available flags. The <wininet.h> header file is required for the 
+ *          definitions of the flags. Some flags which may be useful are:
+ *
+ *              INTERNET_FLAG_KEEP_CONNECTION
+ *              Uses keep-alive semantics, if available, for the connection. 
+ *              This flag is required for Microsoft Network (MSN), NT LAN 
+ *              Manager (NTLM), and other types of authentication. 
+ *              ++ Note that this flag is used automatically when soap.omode 
+ *              has the SOAP_IO_KEEPALIVE flag set. ++
+ *
+ *              INTERNET_FLAG_IGNORE_CERT_CN_INVALID
+ *              Disables Microsoft Win32 Internet function checking of SSL/PCT-
+ *              based certificates that are returned from the server against 
+ *              the host name given in the request. 
+ *
+ *              INTERNET_FLAG_IGNORE_CERT_DATE_INVALID
+ *              Disables Win32 Internet function checking of SSL/PCT-based 
+ *              certificates for proper validity dates.
+ *
+ *          This plugin uses the following callback functions and is not 
+ *          compatible with any other plugin that uses these functions.
+ *
+ *              soap->fopen
+ *              soap->fposthdr
+ *              soap->fsend
+ *              soap->frecv
+ *              soap->fclose
+ *
+ *          If there are errors in sending the HTTP request which would 
+ *          cause a dialog box to be displayed in IE (for instance, invalid
+ *          certificates on an HTTPS connection), then a dialog will also
+ *          be displayed by this library. At the moment is is not possible
+ *          to disable the UI. If you wish to remove the UI then you will 
+ *          need to hack the source to remove the dialog box and resolve the
+ *          errors programmatically, or supply the appropriate flags in
+ *          soap_register_plugin_arg() to disable the unwanted warnings.
+ *
+ *          Because messages are buffered internally to gsoapWinInet2 plugin
+ *          it is recommended that the SOAP_IO_STORE flag is not used otherwise
+ *          the message may be buffered twice on every send. Use the default
+ *          flag SOAP_IO_BUFFER, or SOAP_IO_FLUSH.
+ *
+ * Redistribution: 
+ *          Feel free to use, improve, and share.  I would appreciate 
+ *          notification of any bugs found/fixed, or improvements made. This 
+ *          code has not been extensively tested, so use at your own risk.  
+ */
+#ifndef INCLUDED_gsoapWinInet2_h
+#define INCLUDED_gsoapWinInet2_h
+
+#include <stdsoap2.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif 
+
+extern int 
+wininet_plugin( 
+    struct soap *           a_pSoap, 
+    struct soap_plugin *    a_pPluginData, 
+    void *                  a_pUnused );
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif // INCLUDED_gsoapWinInet2_h
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/.indent.pro b/mod_gsoap/mod_gsoap-0.6/apache_13/.indent.pro
new file mode 100644
index 0000000..c327045
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/.indent.pro
@@ -0,0 +1,10 @@
+--braces-after-if-line 
+--indent-level4 
+-lp -di1 -nut -bli0 -npcs 
+-nsaf -nsaw -nsai
+-cdb -sc
+-nce
+--format-first-column-comments
+-Thandler_rec
+--line-length80
+--tab-size4
\ No newline at end of file
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/ConsoleServer/ConsoleMain.cpp b/mod_gsoap/mod_gsoap-0.6/apache_13/ConsoleServer/ConsoleMain.cpp
new file mode 100644
index 0000000..ef493d2
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/ConsoleServer/ConsoleMain.cpp
@@ -0,0 +1,89 @@
+/** Console Application to test the dynamic SOAP server dlls in a simple commandline environment.
+  * @file ConsoleMain.cpp
+    It tests the same SOAP server shared libraries that can be later deployed in the Apache server.
+    to test it do the following: Start this program, open a commandline prompt window,
+    change to the build output directory and enter.
+  */
+#include <unistd.h>
+#include <signal.h>
+
+#include <iostream>
+#include <cassert>
+#include <ltdl.h>
+#include <stdio.h>
+#include <memory.h>
+#include "stdsoap2.h"
+#include "apache_gsoap.h"
+
+/** the parameter passed to the dll for constructing a server. */
+static const char szQueryParameter[] = "HelloWorld";
+
+/** Run a single threaded loop to accept client requests.
+  */
+
+void main(const int /*argc*/, const char *argv[]) {
+    char szSearchPath[1024];
+    struct soap soap;
+    int nRet = SOAP_OK;
+    struct apache_soap_interface Intf;
+    memset(&Intf, 0, sizeof Intf);
+    
+    memset(szSearchPath, 0, sizeof szSearchPath);
+    getcwd(szSearchPath, sizeof szSearchPath);
+    
+    strcat(szSearchPath, "/../example/calculator");
+    cout << "path is: '"<< szSearchPath << "'"<< endl;
+    static const char szLibraryName[] = "libCalculator";
+
+    int nOK = lt_dlinit();
+    if (0 != nOK) {
+        cerr << "failed to lt_dlinit()" << endl;
+        exit(1);
+    } 
+    //set the path where the library can be found:
+    nOK = lt_dladdsearchdir(szSearchPath);
+    if (0 != nOK) {
+        cerr << "failed to set search path for loading library" << endl;
+    }
+    cout << "The the search directory for shared libraries is: '" << lt_dlgetsearchpath() << "'" << endl;
+    lt_dlhandle soaplib = NULL;
+    void *pfun  = NULL; // our entry point 
+    if (0 == nOK) {
+        soaplib = lt_dlopenext(szLibraryName);
+        if (NULL == soaplib) {
+	    cerr << "failed to open " << szSearchPath << ", lib "
+		 << szLibraryName << " last error: " << lt_dlerror() << endl;
+			nOK = 1;
+        } else {
+            cout << "the library " << szLibraryName << " was loaded" << endl;
+		}
+    }
+    if (0 == nOK) {
+        pfun = (void *)lt_dlsym(soaplib, APACHE_HTTPSERVER_ENTRY_POINT);
+        if (NULL == pfun) {
+			cout << "entry point " << APACHE_HTTPSERVER_ENTRY_POINT << " not found" << endl;
+			nOK = 1;
+		} else {
+			cout << "entry point " << APACHE_HTTPSERVER_ENTRY_POINT << " found" << endl;
+        }
+    }
+    if (0 == nOK) {
+		apache_init_soap_interface_fn pfn = (apache_init_soap_interface_fn)(pfun);
+		(*pfn)(&Intf);
+		if (NULL != Intf.fsoap_init) {
+			(*Intf.fsoap_init)(&soap);
+			if (NULL != Intf.fsoap_serve) {
+				int nRet = (*Intf.fsoap_serve)(&soap);
+			}
+			//TODO: call cleanup functions.
+       }
+    }
+    if (NULL != soaplib) {
+        int nClose = lt_dlclose(soaplib);
+	if (0 != nClose) {
+            cerr << "failed to unload the soap server" << endl;
+        }
+    }
+    lt_dlexit();
+}
+
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/ConsoleServer/Makefile b/mod_gsoap/mod_gsoap-0.6/apache_13/ConsoleServer/Makefile
new file mode 100644
index 0000000..d8afe24
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/ConsoleServer/Makefile
@@ -0,0 +1,445 @@
+# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+SHELL = /bin/sh
+
+srcdir = .
+top_srcdir = ..
+
+prefix = /usr/local
+exec_prefix = ${prefix}
+
+bindir = ${exec_prefix}/bin
+sbindir = ${exec_prefix}/sbin
+libexecdir = ${exec_prefix}/libexec
+datadir = ${prefix}/share
+sysconfdir = ${prefix}/etc
+sharedstatedir = ${prefix}/com
+localstatedir = ${prefix}/var
+libdir = ${exec_prefix}/lib
+infodir = ${prefix}/info
+mandir = ${prefix}/man
+includedir = ${prefix}/include
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/mod_gsoap
+pkglibdir = $(libdir)/mod_gsoap
+pkgincludedir = $(includedir)/mod_gsoap
+top_builddir = ..
+
+ACLOCAL = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run aclocal
+AUTOCONF = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run autoconf
+AUTOMAKE = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run automake
+AUTOHEADER = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run autoheader
+
+INSTALL = /usr/bin/ginstall -c
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = s,x,x,
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = i686-suse-linux
+build_triplet = i686-suse-linux
+host_alias = i686-suse-linux
+host_triplet = i686-suse-linux
+target_alias = i686-suse-linux
+target_triplet = i686-suse-linux
+AMTAR = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run tar
+APXS_CXX_OPTIONS = 
+AS = as
+AWK = gawk
+CC = gcc
+CPP = gcc -E
+CXX = g++
+CXXDEBUGDEFINES = -D_NDEBUG
+CXXFLAGS =  -O2
+DEPDIR = .deps
+DLLTOOL = dlltool
+ECHO = echo
+EXEEXT = 
+EXISTS_APXS = yes
+GSOAP_CPP_SRC = @GSOAP_CPP_SRC@
+GSOAP_C_SRC = @GSOAP_C_SRC@
+GSOAP_INCLUDE = @GSOAP_INCLUDE@
+GSOAP_PREFIX = @GSOAP_PREFIX@
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIBTOOL_DEPS = ./ltmain.sh
+LN_S = ln -s
+OBJDUMP = objdump
+OBJEXT = o
+PACKAGE = mod_gsoap
+RANLIB = ranlib
+STRIP = strip
+VERSION = 0.0.5
+am__include = include
+am__quote = 
+install_sh = /home/aberger/apache_gsoap.0.0.5/install-sh
+
+AM_CPPFLAGS = -D_REENTRANT $(CXXDEBUGDEFINES)
+
+INCLUDES = -I$(GSOAP_PREFIX) -I$(top_builddir)
+
+apache_dir = $(top_builddir)
+
+SUBDIRS = foo
+
+bin_PROGRAMS = soaptest
+soaptest_SOURCES = ConsoleMain.cpp 
+
+soaptest_LDADD = \
+	-lltdl \
+	-lpthread
+
+
+CLEANFILES = *~ .kdbgrc.soaptest
+subdir = ConsoleServer
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+bin_PROGRAMS = soaptest$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
+
+am_soaptest_OBJECTS = ConsoleMain.$(OBJEXT)
+soaptest_OBJECTS = $(am_soaptest_OBJECTS)
+soaptest_DEPENDENCIES =
+soaptest_LDFLAGS =
+
+DEFS = -DHAVE_CONFIG_H
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
+CPPFLAGS = 
+LDFLAGS = 
+LIBS = 
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+DEP_FILES = $(DEPDIR)/ConsoleMain.Po
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(soaptest_SOURCES)
+
+RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
+	uninstall-info-recursive all-recursive install-data-recursive \
+	install-exec-recursive installdirs-recursive install-recursive \
+	uninstall-recursive check-recursive installcheck-recursive
+DIST_COMMON = Makefile.am Makefile.in
+DIST_SUBDIRS = $(SUBDIRS)
+SOURCES = $(soaptest_SOURCES)
+
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  ConsoleServer/Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && \
+	  CONFIG_HEADERS= CONFIG_LINKS= \
+	  CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  if test -f $$p \
+	     || test -f $$p1 \
+	  ; then \
+	    f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \
+	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+	  rm -f $(DESTDIR)$(bindir)/$$f; \
+	done
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+soaptest$(EXEEXT): $(soaptest_OBJECTS) $(soaptest_DEPENDENCIES) 
+	@rm -f soaptest$(EXEEXT)
+	$(CXXLINK) $(soaptest_LDFLAGS) $(soaptest_OBJECTS) $(soaptest_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+	-rm -f *.tab.c
+
+include $(DEPDIR)/ConsoleMain.Po
+
+distclean-depend:
+	-rm -rf $(DEPDIR)
+
+.cpp.o:
+	source='$<' object='$@' libtool=no \
+	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \
+	$(CXXDEPMODE) $(depcomp) \
+	$(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
+
+.cpp.obj:
+	source='$<' object='$@' libtool=no \
+	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \
+	$(CXXDEPMODE) $(depcomp) \
+	$(CXXCOMPILE) -c -o $@ `cygpath -w $<`
+
+.cpp.lo:
+	source='$<' object='$@' libtool=yes \
+	depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' \
+	$(CXXDEPMODE) $(depcomp) \
+	$(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
+CXXDEPMODE = depmode=gcc
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@set fnord $(MAKEFLAGS); amf=$$2; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@set fnord $(MAKEFLAGS); amf=$$2; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique $(LISP)
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || etags $(ETAGS_ARGS) $$tags  $$unique $(LISP)
+
+GTAGS:
+	here=`CDPATH=: && cd $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    $(mkinstalldirs) "$(distdir)/$$dir"; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    cp -pR $$d/$$file $(distdir) \
+	    || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	for subdir in $(SUBDIRS); do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d $(distdir)/$$subdir \
+	    || mkdir $(distdir)/$$subdir \
+	    || exit 1; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$(top_distdir)" \
+	        distdir=../$(distdir)/$$subdir \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(PROGRAMS)
+installdirs: installdirs-recursive
+installdirs-am:
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+
+distclean-am: clean-am distclean-compile distclean-depend \
+	distclean-generic distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
+	clean-binPROGRAMS clean-generic clean-libtool clean-recursive \
+	distclean distclean-compile distclean-depend distclean-generic \
+	distclean-libtool distclean-recursive distclean-tags distdir \
+	dvi dvi-am dvi-recursive info info-am info-recursive install \
+	install-am install-binPROGRAMS install-data install-data-am \
+	install-data-recursive install-exec install-exec-am \
+	install-exec-recursive install-info install-info-am \
+	install-info-recursive install-man install-recursive \
+	install-strip installcheck installcheck-am installdirs \
+	installdirs-am installdirs-recursive maintainer-clean \
+	maintainer-clean-generic maintainer-clean-recursive mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	mostlyclean-recursive tags tags-recursive uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-info-am \
+	uninstall-info-recursive uninstall-recursive
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/ConsoleServer/Makefile.am b/mod_gsoap/mod_gsoap-0.6/apache_13/ConsoleServer/Makefile.am
new file mode 100644
index 0000000..d241532
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/ConsoleServer/Makefile.am
@@ -0,0 +1,18 @@
+## this file is input for automake and will generate Makefile.in
+
+AM_CPPFLAGS=-D_REENTRANT $(CXXDEBUGDEFINES)
+
+INCLUDES=-I$(GSOAP_PREFIX) -I$(top_builddir)
+
+apache_dir=$(top_builddir)
+
+SUBDIRS = foo
+
+bin_PROGRAMS = soaptest
+soaptest_SOURCES = ConsoleMain.cpp 
+
+soaptest_LDADD = \
+	-lltdl \
+	-lpthread
+
+CLEANFILES=*~ .kdbgrc.soaptest
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/ConsoleServer/Makefile.in b/mod_gsoap/mod_gsoap-0.6/apache_13/ConsoleServer/Makefile.in
new file mode 100644
index 0000000..d6561cf
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/ConsoleServer/Makefile.in
@@ -0,0 +1,445 @@
+# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
+AMTAR = @AMTAR@
+APXS_CXX_OPTIONS = @APXS_CXX_OPTIONS@
+AS = @AS@
+AWK = @AWK@
+CC = @CC@
+CPP = @CPP@
+CXX = @CXX@
+CXXDEBUGDEFINES = @CXXDEBUGDEFINES@
+CXXFLAGS = @CXXFLAGS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+ECHO = @ECHO@
+EXEEXT = @EXEEXT@
+EXISTS_APXS = @EXISTS_APXS@
+GSOAP_CPP_SRC = @GSOAP_CPP_SRC@
+GSOAP_C_SRC = @GSOAP_C_SRC@
+GSOAP_INCLUDE = @GSOAP_INCLUDE@
+GSOAP_PREFIX = @GSOAP_PREFIX@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LN_S = @LN_S@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+STRIP = @STRIP@
+VERSION = @VERSION@
+am__include = @am__include@
+am__quote = @am__quote@
+install_sh = @install_sh@
+
+AM_CPPFLAGS = -D_REENTRANT $(CXXDEBUGDEFINES)
+
+INCLUDES = -I$(GSOAP_PREFIX) -I$(top_builddir)
+
+apache_dir = $(top_builddir)
+
+SUBDIRS = foo
+
+bin_PROGRAMS = soaptest
+soaptest_SOURCES = ConsoleMain.cpp 
+
+soaptest_LDADD = \
+	-lltdl \
+	-lpthread
+
+
+CLEANFILES = *~ .kdbgrc.soaptest
+subdir = ConsoleServer
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+bin_PROGRAMS = soaptest$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
+
+am_soaptest_OBJECTS = ConsoleMain.$(OBJEXT)
+soaptest_OBJECTS = $(am_soaptest_OBJECTS)
+soaptest_DEPENDENCIES =
+soaptest_LDFLAGS =
+
+DEFS = @DEFS@
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/ConsoleMain.Po
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(soaptest_SOURCES)
+
+RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
+	uninstall-info-recursive all-recursive install-data-recursive \
+	install-exec-recursive installdirs-recursive install-recursive \
+	uninstall-recursive check-recursive installcheck-recursive
+DIST_COMMON = Makefile.am Makefile.in
+DIST_SUBDIRS = $(SUBDIRS)
+SOURCES = $(soaptest_SOURCES)
+
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  ConsoleServer/Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && \
+	  CONFIG_HEADERS= CONFIG_LINKS= \
+	  CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  if test -f $$p \
+	     || test -f $$p1 \
+	  ; then \
+	    f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \
+	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+	  rm -f $(DESTDIR)$(bindir)/$$f; \
+	done
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+soaptest$(EXEEXT): $(soaptest_OBJECTS) $(soaptest_DEPENDENCIES) 
+	@rm -f soaptest$(EXEEXT)
+	$(CXXLINK) $(soaptest_LDFLAGS) $(soaptest_OBJECTS) $(soaptest_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ConsoleMain.Po@am__quote@
+
+distclean-depend:
+	-rm -rf $(DEPDIR)
+
+.cpp.o:
+@AMDEP_TRUE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+	$(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
+
+.cpp.obj:
+@AMDEP_TRUE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+	$(CXXCOMPILE) -c -o $@ `cygpath -w $<`
+
+.cpp.lo:
+@AMDEP_TRUE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@	depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+	$(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
+CXXDEPMODE = @CXXDEPMODE@
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@set fnord $(MAKEFLAGS); amf=$$2; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@set fnord $(MAKEFLAGS); amf=$$2; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique $(LISP)
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || etags $(ETAGS_ARGS) $$tags  $$unique $(LISP)
+
+GTAGS:
+	here=`CDPATH=: && cd $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    $(mkinstalldirs) "$(distdir)/$$dir"; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    cp -pR $$d/$$file $(distdir) \
+	    || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	for subdir in $(SUBDIRS); do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d $(distdir)/$$subdir \
+	    || mkdir $(distdir)/$$subdir \
+	    || exit 1; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$(top_distdir)" \
+	        distdir=../$(distdir)/$$subdir \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(PROGRAMS)
+installdirs: installdirs-recursive
+installdirs-am:
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+
+distclean-am: clean-am distclean-compile distclean-depend \
+	distclean-generic distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
+	clean-binPROGRAMS clean-generic clean-libtool clean-recursive \
+	distclean distclean-compile distclean-depend distclean-generic \
+	distclean-libtool distclean-recursive distclean-tags distdir \
+	dvi dvi-am dvi-recursive info info-am info-recursive install \
+	install-am install-binPROGRAMS install-data install-data-am \
+	install-data-recursive install-exec install-exec-am \
+	install-exec-recursive install-info install-info-am \
+	install-info-recursive install-man install-recursive \
+	install-strip installcheck installcheck-am installdirs \
+	installdirs-am installdirs-recursive maintainer-clean \
+	maintainer-clean-generic maintainer-clean-recursive mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	mostlyclean-recursive tags tags-recursive uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-info-am \
+	uninstall-info-recursive uninstall-recursive
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/ConsoleServer/foo/Makefile b/mod_gsoap/mod_gsoap-0.6/apache_13/ConsoleServer/foo/Makefile
new file mode 100644
index 0000000..fc3f63b
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/ConsoleServer/foo/Makefile
@@ -0,0 +1,341 @@
+# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+SHELL = /bin/sh
+
+srcdir = .
+top_srcdir = ../..
+
+prefix = /usr/local
+exec_prefix = ${prefix}
+
+bindir = ${exec_prefix}/bin
+sbindir = ${exec_prefix}/sbin
+libexecdir = ${exec_prefix}/libexec
+datadir = ${prefix}/share
+sysconfdir = ${prefix}/etc
+sharedstatedir = ${prefix}/com
+localstatedir = ${prefix}/var
+libdir = ${exec_prefix}/lib
+infodir = ${prefix}/info
+mandir = ${prefix}/man
+includedir = ${prefix}/include
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/mod_gsoap
+pkglibdir = $(libdir)/mod_gsoap
+pkgincludedir = $(includedir)/mod_gsoap
+top_builddir = ../..
+
+ACLOCAL = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run aclocal
+AUTOCONF = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run autoconf
+AUTOMAKE = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run automake
+AUTOHEADER = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run autoheader
+
+INSTALL = /usr/bin/ginstall -c
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = s,x,x,
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = i686-suse-linux
+build_triplet = i686-suse-linux
+host_alias = i686-suse-linux
+host_triplet = i686-suse-linux
+target_alias = i686-suse-linux
+target_triplet = i686-suse-linux
+AMTAR = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run tar
+APXS_CXX_OPTIONS = 
+AS = as
+AWK = gawk
+CC = gcc
+CPP = gcc -E
+CXX = g++
+CXXDEBUGDEFINES = -D_NDEBUG
+CXXFLAGS =  -O2
+DEPDIR = .deps
+DLLTOOL = dlltool
+ECHO = echo
+EXEEXT = 
+EXISTS_APXS = yes
+GSOAP_CPP_SRC = @GSOAP_CPP_SRC@
+GSOAP_C_SRC = @GSOAP_C_SRC@
+GSOAP_INCLUDE = @GSOAP_INCLUDE@
+GSOAP_PREFIX = @GSOAP_PREFIX@
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIBTOOL_DEPS = ./ltmain.sh
+LN_S = ln -s
+OBJDUMP = objdump
+OBJEXT = o
+PACKAGE = mod_gsoap
+RANLIB = ranlib
+STRIP = strip
+VERSION = 0.0.5
+am__include = include
+am__quote = 
+install_sh = /home/aberger/apache_gsoap.0.0.5/install-sh
+
+lib_LTLIBRARIES = libfoo.la
+
+libfoo_la_SOURCES = foo.cpp
+
+libfoo_la_LIBDADD = -lltdl
+
+libfoo_la_LDFLAGS = -version-info 0:0:0 -module
+subdir = ConsoleServer/foo
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(lib_LTLIBRARIES)
+
+libfoo_la_LIBADD =
+am_libfoo_la_OBJECTS = foo.lo
+libfoo_la_OBJECTS = $(am_libfoo_la_OBJECTS)
+
+DEFS = -DHAVE_CONFIG_H
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
+CPPFLAGS = 
+LDFLAGS = 
+LIBS = 
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+DEP_FILES = $(DEPDIR)/foo.Plo
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(libfoo_la_SOURCES)
+DIST_COMMON = Makefile.am Makefile.in
+SOURCES = $(libfoo_la_SOURCES)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  ConsoleServer/foo/Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && \
+	  CONFIG_HEADERS= CONFIG_LINKS= \
+	  CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(libdir)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    echo " $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$p"; \
+	    $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$p; \
+	  else :; fi; \
+	done
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \
+	  $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+libfoo.la: $(libfoo_la_OBJECTS) $(libfoo_la_DEPENDENCIES) 
+	$(CXXLINK) -rpath $(libdir) $(libfoo_la_LDFLAGS) $(libfoo_la_OBJECTS) $(libfoo_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+	-rm -f *.tab.c
+
+include $(DEPDIR)/foo.Plo
+
+distclean-depend:
+	-rm -rf $(DEPDIR)
+
+.cpp.o:
+	source='$<' object='$@' libtool=no \
+	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \
+	$(CXXDEPMODE) $(depcomp) \
+	$(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
+
+.cpp.obj:
+	source='$<' object='$@' libtool=no \
+	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \
+	$(CXXDEPMODE) $(depcomp) \
+	$(CXXCOMPILE) -c -o $@ `cygpath -w $<`
+
+.cpp.lo:
+	source='$<' object='$@' libtool=yes \
+	depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' \
+	$(CXXDEPMODE) $(depcomp) \
+	$(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
+CXXDEPMODE = depmode=gcc
+uninstall-info-am:
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique $(LISP)
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || etags $(ETAGS_ARGS) $$tags  $$unique $(LISP)
+
+GTAGS:
+	here=`CDPATH=: && cd $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    $(mkinstalldirs) "$(distdir)/$$dir"; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    cp -pR $$d/$$file $(distdir) \
+	    || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(libdir)
+
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-am
+
+distclean-am: clean-am distclean-compile distclean-depend \
+	distclean-generic distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
+
+.PHONY: GTAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool distclean distclean-compile \
+	distclean-depend distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am info info-am install \
+	install-am install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am \
+	install-libLTLIBRARIES install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool tags uninstall \
+	uninstall-am uninstall-info-am uninstall-libLTLIBRARIES
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/ConsoleServer/foo/Makefile.am b/mod_gsoap/mod_gsoap-0.6/apache_13/ConsoleServer/foo/Makefile.am
new file mode 100644
index 0000000..d4551e0
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/ConsoleServer/foo/Makefile.am
@@ -0,0 +1,12 @@
+## this file is input for automake and will generate Makefile.in
+
+lib_LTLIBRARIES = libfoo.la
+
+libfoo_la_SOURCES = foo.cpp
+
+libfoo_la_LIBDADD = -lltdl
+
+libfoo_la_LDFLAGS = -version-info 0:0:0 -module
+        
+
+
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/ConsoleServer/foo/Makefile.in b/mod_gsoap/mod_gsoap-0.6/apache_13/ConsoleServer/foo/Makefile.in
new file mode 100644
index 0000000..698d47d
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/ConsoleServer/foo/Makefile.in
@@ -0,0 +1,341 @@
+# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
+AMTAR = @AMTAR@
+APXS_CXX_OPTIONS = @APXS_CXX_OPTIONS@
+AS = @AS@
+AWK = @AWK@
+CC = @CC@
+CPP = @CPP@
+CXX = @CXX@
+CXXDEBUGDEFINES = @CXXDEBUGDEFINES@
+CXXFLAGS = @CXXFLAGS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+ECHO = @ECHO@
+EXEEXT = @EXEEXT@
+EXISTS_APXS = @EXISTS_APXS@
+GSOAP_CPP_SRC = @GSOAP_CPP_SRC@
+GSOAP_C_SRC = @GSOAP_C_SRC@
+GSOAP_INCLUDE = @GSOAP_INCLUDE@
+GSOAP_PREFIX = @GSOAP_PREFIX@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LN_S = @LN_S@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+STRIP = @STRIP@
+VERSION = @VERSION@
+am__include = @am__include@
+am__quote = @am__quote@
+install_sh = @install_sh@
+
+lib_LTLIBRARIES = libfoo.la
+
+libfoo_la_SOURCES = foo.cpp
+
+libfoo_la_LIBDADD = -lltdl
+
+libfoo_la_LDFLAGS = -version-info 0:0:0 -module
+subdir = ConsoleServer/foo
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(lib_LTLIBRARIES)
+
+libfoo_la_LIBADD =
+am_libfoo_la_OBJECTS = foo.lo
+libfoo_la_OBJECTS = $(am_libfoo_la_OBJECTS)
+
+DEFS = @DEFS@
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/foo.Plo
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(libfoo_la_SOURCES)
+DIST_COMMON = Makefile.am Makefile.in
+SOURCES = $(libfoo_la_SOURCES)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  ConsoleServer/foo/Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && \
+	  CONFIG_HEADERS= CONFIG_LINKS= \
+	  CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(libdir)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    echo " $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$p"; \
+	    $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$p; \
+	  else :; fi; \
+	done
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \
+	  $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+libfoo.la: $(libfoo_la_OBJECTS) $(libfoo_la_DEPENDENCIES) 
+	$(CXXLINK) -rpath $(libdir) $(libfoo_la_LDFLAGS) $(libfoo_la_OBJECTS) $(libfoo_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/foo.Plo@am__quote@
+
+distclean-depend:
+	-rm -rf $(DEPDIR)
+
+.cpp.o:
+@AMDEP_TRUE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+	$(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
+
+.cpp.obj:
+@AMDEP_TRUE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+	$(CXXCOMPILE) -c -o $@ `cygpath -w $<`
+
+.cpp.lo:
+@AMDEP_TRUE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@	depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+	$(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
+CXXDEPMODE = @CXXDEPMODE@
+uninstall-info-am:
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique $(LISP)
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || etags $(ETAGS_ARGS) $$tags  $$unique $(LISP)
+
+GTAGS:
+	here=`CDPATH=: && cd $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    $(mkinstalldirs) "$(distdir)/$$dir"; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    cp -pR $$d/$$file $(distdir) \
+	    || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(libdir)
+
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-am
+
+distclean-am: clean-am distclean-compile distclean-depend \
+	distclean-generic distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
+
+.PHONY: GTAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool distclean distclean-compile \
+	distclean-depend distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am info info-am install \
+	install-am install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am \
+	install-libLTLIBRARIES install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool tags uninstall \
+	uninstall-am uninstall-info-am uninstall-libLTLIBRARIES
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/ConsoleServer/foo/foo.cpp b/mod_gsoap/mod_gsoap-0.6/apache_13/ConsoleServer/foo/foo.cpp
new file mode 100644
index 0000000..4c84e9a
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/ConsoleServer/foo/foo.cpp
@@ -0,0 +1,5 @@
+
+
+extern "C" int test() {
+    return 10;
+}
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/Makefile b/mod_gsoap/mod_gsoap-0.6/apache_13/Makefile
new file mode 100644
index 0000000..162d793
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/Makefile
@@ -0,0 +1,442 @@
+# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+####### This is the input file for automake, which will generate Makefile.in ##########
+
+SHELL = /bin/sh
+
+srcdir = .
+top_srcdir = .
+
+prefix = /usr/local
+exec_prefix = ${prefix}
+
+bindir = ${exec_prefix}/bin
+sbindir = ${exec_prefix}/sbin
+libexecdir = ${exec_prefix}/libexec
+datadir = ${prefix}/share
+sysconfdir = ${prefix}/etc
+sharedstatedir = ${prefix}/com
+localstatedir = ${prefix}/var
+libdir = ${exec_prefix}/lib
+infodir = ${prefix}/info
+mandir = ${prefix}/man
+includedir = ${prefix}/include
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/mod_gsoap
+pkglibdir = $(libdir)/mod_gsoap
+pkgincludedir = $(includedir)/mod_gsoap
+top_builddir = .
+
+ACLOCAL = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run aclocal
+AUTOCONF = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run autoconf
+AUTOMAKE = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run automake
+AUTOHEADER = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run autoheader
+
+INSTALL = /usr/bin/ginstall -c
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = s,x,x,
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = i686-suse-linux
+build_triplet = i686-suse-linux
+host_alias = i686-suse-linux
+host_triplet = i686-suse-linux
+target_alias = i686-suse-linux
+target_triplet = i686-suse-linux
+AMTAR = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run tar
+APXS_CXX_OPTIONS = 
+AS = as
+AWK = gawk
+CC = gcc
+CPP = gcc -E
+CXX = g++
+CXXDEBUGDEFINES = -D_NDEBUG
+CXXFLAGS =  -O2
+DEPDIR = .deps
+DLLTOOL = dlltool
+ECHO = echo
+EXEEXT = 
+EXISTS_APXS = yes
+EXISTS_GSOAP = yes
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIBTOOL_DEPS = ./ltmain.sh
+LN_S = ln -s
+OBJDUMP = objdump
+OBJEXT = o
+PACKAGE = mod_gsoap
+RANLIB = ranlib
+STRIP = strip
+VERSION = 0.0.5
+am__include = include
+am__quote = 
+install_sh = /home/aberger/apache_gsoap.0.0.5/install-sh
+
+SUBDIRS = mod_gsoap example
+CLEANFILES = *~
+
+AUTOMAKE_OPTIONS = foreign 1.4
+SRCDIRNAME = apache_gsoap.$(VERSION)
+BACKUPFILENAME = $(SRCDIRNAME).tgz
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+DIST_SOURCES =
+
+RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
+	uninstall-info-recursive all-recursive install-data-recursive \
+	install-exec-recursive installdirs-recursive install-recursive \
+	uninstall-recursive check-recursive installcheck-recursive
+DIST_COMMON = ./stamp-h.in Makefile.am Makefile.in aclocal.m4 \
+	config.guess config.h.in config.sub configure configure.in \
+	depcomp install-sh ltmain.sh missing mkinstalldirs
+DIST_SUBDIRS = $(SUBDIRS)
+all: config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && \
+	  CONFIG_HEADERS= CONFIG_LINKS= \
+	  CONFIG_FILES=$@ $(SHELL) ./config.status
+
+$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+$(srcdir)/configure:  $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+	cd $(srcdir) && $(AUTOCONF)
+
+$(ACLOCAL_M4):  configure.in 
+	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+config.h: stamp-h
+	@if test ! -f $@; then \
+		rm -f stamp-h; \
+		$(MAKE) stamp-h; \
+	else :; fi
+stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
+	@rm -f stamp-h stamp-hT
+	@echo timestamp > stamp-hT 2> /dev/null
+	cd $(top_builddir) \
+	  && CONFIG_FILES= CONFIG_HEADERS=config.h \
+	     $(SHELL) ./config.status
+	@mv stamp-hT stamp-h
+$(srcdir)/config.h.in:  $(srcdir)/./stamp-h.in
+	@if test ! -f $@; then \
+		rm -f $(srcdir)/./stamp-h.in; \
+		$(MAKE) $(srcdir)/./stamp-h.in; \
+	else :; fi
+$(srcdir)/./stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	@rm -f $(srcdir)/./stamp-h.in $(srcdir)/./stamp-h.inT
+	@echo timestamp > $(srcdir)/./stamp-h.inT 2> /dev/null
+	cd $(top_srcdir) && $(AUTOHEADER)
+	@mv $(srcdir)/./stamp-h.inT $(srcdir)/./stamp-h.in
+
+distclean-hdr:
+	-rm -f config.h
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@set fnord $(MAKEFLAGS); amf=$$2; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@set fnord $(MAKEFLAGS); amf=$$2; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique $(LISP)
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
+	  || etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP)
+
+GTAGS:
+	here=`CDPATH=: && cd $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = .
+# Avoid unsightly `./'.
+distdir = $(PACKAGE)-$(VERSION)
+
+GZIP_ENV = --best
+
+distdir: $(DISTFILES)
+	-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+	mkdir $(distdir)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    $(mkinstalldirs) "$(distdir)/$$dir"; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    cp -pR $$d/$$file $(distdir) \
+	    || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	for subdir in $(SUBDIRS); do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d $(distdir)/$$subdir \
+	    || mkdir $(distdir)/$$subdir \
+	    || exit 1; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$(top_distdir)" \
+	        distdir=../$(distdir)/$$subdir \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r $(distdir)
+dist: distdir
+	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+	GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	mkdir $(distdir)/=build
+	mkdir $(distdir)/=inst
+	chmod a-w $(distdir)
+	dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
+	  && cd $(distdir)/=build \
+	  && ../configure --srcdir=.. --prefix=$$dc_install_base \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
+	     || (echo "Error: files left after uninstall" 1>&2; \
+	         exit 1) ) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && $(MAKE) $(AM_MAKEFLAGS) distclean \
+	  && rm -f $(distdir).tar.gz \
+	  && (test `find . -type f -print | wc -l` -eq 0 \
+	     || (echo "Error: files left after distclean" 1>&2; \
+	         exit 1) )
+	-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+	@echo "$(distdir).tar.gz is ready for distribution" | \
+	  sed 'h;s/./=/g;p;x;p;x'
+check-am: all-am
+check: check-recursive
+all-am: Makefile config.h
+installdirs: installdirs-recursive
+installdirs-am:
+
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+dist-all: distdir
+	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+distclean: distclean-recursive
+	-rm -f config.status config.cache config.log
+distclean-am: clean-am distclean-generic distclean-hdr distclean-libtool \
+	distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
+	clean-generic clean-libtool clean-recursive dist dist-all \
+	distcheck distclean distclean-generic distclean-hdr \
+	distclean-libtool distclean-recursive distclean-tags distdir \
+	dvi dvi-am dvi-recursive info info-am info-recursive install \
+	install-am install-data install-data-am install-data-recursive \
+	install-exec install-exec-am install-exec-recursive \
+	install-info install-info-am install-info-recursive install-man \
+	install-recursive install-strip installcheck installcheck-am \
+	installdirs installdirs-am installdirs-recursive \
+	maintainer-clean maintainer-clean-generic \
+	maintainer-clean-recursive mostlyclean mostlyclean-generic \
+	mostlyclean-libtool mostlyclean-recursive tags tags-recursive \
+	uninstall uninstall-am uninstall-info-am \
+	uninstall-info-recursive uninstall-recursive
+
+
+.PHONY: backup 
+
+backup:
+	$(MAKE) clean
+	if [ -f ../$(BACKUPFILENAME) ] ; then \
+		rm ../$(BACKUPFILENAME); \
+	fi
+	(pushd .. && tar -czf $(BACKUPFILENAME) $(SRCDIRNAME) && popd)
+	ls -l ../$(BACKUPFILENAME)
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/Makefile.am b/mod_gsoap/mod_gsoap-0.6/apache_13/Makefile.am
new file mode 100644
index 0000000..ff9642e
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/Makefile.am
@@ -0,0 +1,20 @@
+####### This is the input file for automake, which will generate Makefile.in ##########
+
+SUBDIRS=mod_gsoap example
+CLEANFILES= *~
+
+## not a GNU package. You can remove this line, if
+## you have all needed files, that a GNU package needs
+AUTOMAKE_OPTIONS = foreign 1.4
+SRCDIRNAME=apache_gsoap.$(VERSION)
+BACKUPFILENAME=$(SRCDIRNAME).tgz
+
+.PHONY: backup 
+
+backup:
+	$(MAKE) clean
+	if [ -f ../$(BACKUPFILENAME) ] ; then \
+		rm ../$(BACKUPFILENAME); \
+	fi
+	(pushd .. && tar -czf $(BACKUPFILENAME) $(SRCDIRNAME) && popd)
+	ls -l ../$(BACKUPFILENAME)
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/Makefile.in b/mod_gsoap/mod_gsoap-0.6/apache_13/Makefile.in
new file mode 100644
index 0000000..ea07e55
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/Makefile.in
@@ -0,0 +1,442 @@
+# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+####### This is the input file for automake, which will generate Makefile.in ##########
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
+AMTAR = @AMTAR@
+APXS_CXX_OPTIONS = @APXS_CXX_OPTIONS@
+AS = @AS@
+AWK = @AWK@
+CC = @CC@
+CPP = @CPP@
+CXX = @CXX@
+CXXDEBUGDEFINES = @CXXDEBUGDEFINES@
+CXXFLAGS = @CXXFLAGS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+ECHO = @ECHO@
+EXEEXT = @EXEEXT@
+EXISTS_APXS = @EXISTS_APXS@
+EXISTS_GSOAP = @EXISTS_GSOAP@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LN_S = @LN_S@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+STRIP = @STRIP@
+VERSION = @VERSION@
+am__include = @am__include@
+am__quote = @am__quote@
+install_sh = @install_sh@
+
+SUBDIRS = mod_gsoap example
+CLEANFILES = *~
+
+AUTOMAKE_OPTIONS = foreign 1.4
+SRCDIRNAME = apache_gsoap.$(VERSION)
+BACKUPFILENAME = $(SRCDIRNAME).tgz
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+DIST_SOURCES =
+
+RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
+	uninstall-info-recursive all-recursive install-data-recursive \
+	install-exec-recursive installdirs-recursive install-recursive \
+	uninstall-recursive check-recursive installcheck-recursive
+DIST_COMMON = ./stamp-h.in Makefile.am Makefile.in aclocal.m4 \
+	config.guess config.h.in config.sub configure configure.in \
+	depcomp install-sh ltmain.sh missing mkinstalldirs
+DIST_SUBDIRS = $(SUBDIRS)
+all: config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && \
+	  CONFIG_HEADERS= CONFIG_LINKS= \
+	  CONFIG_FILES=$@ $(SHELL) ./config.status
+
+$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+$(srcdir)/configure:  $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+	cd $(srcdir) && $(AUTOCONF)
+
+$(ACLOCAL_M4):  configure.in 
+	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+config.h: stamp-h
+	@if test ! -f $@; then \
+		rm -f stamp-h; \
+		$(MAKE) stamp-h; \
+	else :; fi
+stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
+	@rm -f stamp-h stamp-hT
+	@echo timestamp > stamp-hT 2> /dev/null
+	cd $(top_builddir) \
+	  && CONFIG_FILES= CONFIG_HEADERS=config.h \
+	     $(SHELL) ./config.status
+	@mv stamp-hT stamp-h
+$(srcdir)/config.h.in:  $(srcdir)/./stamp-h.in
+	@if test ! -f $@; then \
+		rm -f $(srcdir)/./stamp-h.in; \
+		$(MAKE) $(srcdir)/./stamp-h.in; \
+	else :; fi
+$(srcdir)/./stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	@rm -f $(srcdir)/./stamp-h.in $(srcdir)/./stamp-h.inT
+	@echo timestamp > $(srcdir)/./stamp-h.inT 2> /dev/null
+	cd $(top_srcdir) && $(AUTOHEADER)
+	@mv $(srcdir)/./stamp-h.inT $(srcdir)/./stamp-h.in
+
+distclean-hdr:
+	-rm -f config.h
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@set fnord $(MAKEFLAGS); amf=$$2; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@set fnord $(MAKEFLAGS); amf=$$2; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique $(LISP)
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
+	  || etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP)
+
+GTAGS:
+	here=`CDPATH=: && cd $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = .
+# Avoid unsightly `./'.
+distdir = $(PACKAGE)-$(VERSION)
+
+GZIP_ENV = --best
+
+distdir: $(DISTFILES)
+	-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+	mkdir $(distdir)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    $(mkinstalldirs) "$(distdir)/$$dir"; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    cp -pR $$d/$$file $(distdir) \
+	    || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	for subdir in $(SUBDIRS); do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d $(distdir)/$$subdir \
+	    || mkdir $(distdir)/$$subdir \
+	    || exit 1; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$(top_distdir)" \
+	        distdir=../$(distdir)/$$subdir \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r $(distdir)
+dist: distdir
+	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+	GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	mkdir $(distdir)/=build
+	mkdir $(distdir)/=inst
+	chmod a-w $(distdir)
+	dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
+	  && cd $(distdir)/=build \
+	  && ../configure --srcdir=.. --prefix=$$dc_install_base \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
+	     || (echo "Error: files left after uninstall" 1>&2; \
+	         exit 1) ) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && $(MAKE) $(AM_MAKEFLAGS) distclean \
+	  && rm -f $(distdir).tar.gz \
+	  && (test `find . -type f -print | wc -l` -eq 0 \
+	     || (echo "Error: files left after distclean" 1>&2; \
+	         exit 1) )
+	-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+	@echo "$(distdir).tar.gz is ready for distribution" | \
+	  sed 'h;s/./=/g;p;x;p;x'
+check-am: all-am
+check: check-recursive
+all-am: Makefile config.h
+installdirs: installdirs-recursive
+installdirs-am:
+
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+dist-all: distdir
+	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+distclean: distclean-recursive
+	-rm -f config.status config.cache config.log
+distclean-am: clean-am distclean-generic distclean-hdr distclean-libtool \
+	distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
+	clean-generic clean-libtool clean-recursive dist dist-all \
+	distcheck distclean distclean-generic distclean-hdr \
+	distclean-libtool distclean-recursive distclean-tags distdir \
+	dvi dvi-am dvi-recursive info info-am info-recursive install \
+	install-am install-data install-data-am install-data-recursive \
+	install-exec install-exec-am install-exec-recursive \
+	install-info install-info-am install-info-recursive install-man \
+	install-recursive install-strip installcheck installcheck-am \
+	installdirs installdirs-am installdirs-recursive \
+	maintainer-clean maintainer-clean-generic \
+	maintainer-clean-recursive mostlyclean mostlyclean-generic \
+	mostlyclean-libtool mostlyclean-recursive tags tags-recursive \
+	uninstall uninstall-am uninstall-info-am \
+	uninstall-info-recursive uninstall-recursive
+
+
+.PHONY: backup 
+
+backup:
+	$(MAKE) clean
+	if [ -f ../$(BACKUPFILENAME) ] ; then \
+		rm ../$(BACKUPFILENAME); \
+	fi
+	(pushd .. && tar -czf $(BACKUPFILENAME) $(SRCDIRNAME) && popd)
+	ls -l ../$(BACKUPFILENAME)
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/README b/mod_gsoap/mod_gsoap-0.6/apache_13/README
new file mode 100644
index 0000000..5ab36d6
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/README
@@ -0,0 +1,10 @@
+This directory contains the sources for building
+the mod_gsoap Apache module for Apache 1.3.
+
+Here's the quick start way to build your own DSO.
+
+./configure [--with-gsoap=/alternate/path/to/soapcpp2]
+make
+
+For more details you can see the apache_index.html, but
+it is not wholly up to date.
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/aclocal.m4 b/mod_gsoap/mod_gsoap-0.6/apache_13/aclocal.m4
new file mode 100644
index 0000000..2280c72
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/aclocal.m4
@@ -0,0 +1,4046 @@
+# aclocal.m4 generated automatically by aclocal 1.5
+
+# Copyright 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# Do all the work for Automake.  This macro actually does too much --
+# some checks are only needed if your package does certain things.
+# But this isn't really a big deal.
+
+# serial 5
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# We require 2.13 because we rely on SHELL being computed by configure.
+AC_PREREQ([2.13])
+
+# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+# -----------------------------------------------------------
+# If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
+# The purpose of this macro is to provide the user with a means to
+# check macros which are provided without letting her know how the
+# information is coded.
+# If this macro is not defined by Autoconf, define it here.
+ifdef([AC_PROVIDE_IFELSE],
+      [],
+      [define([AC_PROVIDE_IFELSE],
+              [ifdef([AC_PROVIDE_$1],
+                     [$2], [$3])])])
+
+
+# AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
+# ----------------------------------------------
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
+fi
+
+# Define the identity of the package.
+PACKAGE=$1
+AC_SUBST(PACKAGE)dnl
+VERSION=$2
+AC_SUBST(VERSION)dnl
+ifelse([$3],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
+
+# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
+# the ones we care about.
+ifdef([m4_pattern_allow],
+      [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
+
+# Autoconf 2.50 always computes EXEEXT.  However we need to be
+# compatible with 2.13, for now.  So we always define EXEEXT, but we
+# don't compute it.
+AC_SUBST(EXEEXT)
+# Similar for OBJEXT -- only we only use OBJEXT if the user actually
+# requests that it be used.  This is a bit dumb.
+: ${OBJEXT=o}
+AC_SUBST(OBJEXT)
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal)
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake)
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG(AMTAR, tar)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_PROVIDE_IFELSE([AC_PROG_][CC],
+                  [_AM_DEPENDENCIES(CC)],
+                  [define([AC_PROG_][CC],
+                          defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_][CXX],
+                  [_AM_DEPENDENCIES(CXX)],
+                  [define([AC_PROG_][CXX],
+                          defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+# serial 3
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+
+# serial 2
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  am_backtick='`'
+  AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
+fi
+])
+
+# AM_AUX_DIR_EXPAND
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND], [
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
+])
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# serial 4						-*- Autoconf -*-
+
+
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+
+# _AM_DEPENDENCIES(NAME)
+# ---------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX" or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    echo '#include "conftest.h"' > conftest.c
+    echo 'int i;' > conftest.h
+    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=conftest.c object=conftest.o \
+       depfile=conftest.Po tmpdepfile=conftest.TPo \
+       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
+       grep conftest.h conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      am_cv_$1_dependencies_compiler_type=$depmode
+      break
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+$1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
+AC_SUBST([$1DEPMODE])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[rm -f .deps 2>/dev/null
+mkdir .deps 2>/dev/null
+if test -d .deps; then
+  DEPDIR=.deps
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  DEPDIR=_deps
+fi
+rmdir .deps 2>/dev/null
+AC_SUBST(DEPDIR)
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking Speeds up one-time builds
+  --enable-dependency-tracking  Do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+pushdef([subst], defn([AC_SUBST]))
+subst(AMDEPBACKSLASH)
+popdef([subst])
+])
+
+# Generate code to set up dependency tracking.
+# This macro should only be invoked once -- use via AC_REQUIRE.
+# Usage:
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
+AC_OUTPUT_COMMANDS([
+test x"$AMDEP_TRUE" != x"" ||
+for mf in $CONFIG_FILES; do
+  case "$mf" in
+  Makefile) dirpart=.;;
+  */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
+  *) continue;;
+  esac
+  grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
+  # Extract the definition of DEP_FILES from the Makefile without
+  # running `make'.
+  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n -e '/^U = / s///p' < "$mf"`
+  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+  # We invoke sed twice because it is the simplest approach to
+  # changing $(DEPDIR) to its actual value in the expansion.
+  for file in `sed -n -e '
+    /^DEP_FILES = .*\\\\$/ {
+      s/^DEP_FILES = //
+      :loop
+	s/\\\\$//
+	p
+	n
+	/\\\\$/ b loop
+      p
+    }
+    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
+    $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+], [AMDEP_TRUE="$AMDEP_TRUE"
+ac_aux_dir="$ac_aux_dir"])])
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+doit:
+	@echo done
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include='#'
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote='"'
+      _am_result=BSD
+   fi
+fi
+AC_SUBST(am__include)
+AC_SUBST(am__quote)
+AC_MSG_RESULT($_am_result)
+rm -f confinc confmf
+])
+
+# serial 3
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+#
+# FIXME: Once using 2.50, use this:
+# m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_DEFUN([AM_CONDITIONAL],
+[ifelse([$1], [TRUE],
+        [errprint(__file__:__line__: [$0: invalid condition: $1
+])dnl
+m4exit(1)])dnl
+ifelse([$1], [FALSE],
+       [errprint(__file__:__line__: [$0: invalid condition: $1
+])dnl
+m4exit(1)])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi])
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file.
+
+# serial 3
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  We must strip everything past the first ":",
+# and everything past the last "/".
+
+AC_PREREQ([2.12])
+
+AC_DEFUN([AM_CONFIG_HEADER],
+[ifdef([AC_FOREACH],dnl
+	 [dnl init our file count if it isn't already
+	 m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))
+	 dnl prepare to store our destination file list for use in config.status
+	 AC_FOREACH([_AM_File], [$1],
+		    [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
+		    m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
+		    dnl and add it to the list of files AC keeps track of, along
+		    dnl with our hook
+		    AC_CONFIG_HEADERS(_AM_File,
+dnl COMMANDS, [, INIT-CMDS]
+[# update the timestamp
+echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
+][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
+		    m4_popdef([_AM_Dest])])],dnl
+[AC_CONFIG_HEADER([$1])
+  AC_OUTPUT_COMMANDS(
+   ifelse(patsubst([$1], [[^ ]], []),
+	  [],
+	  [test -z "$CONFIG_HEADERS" || echo timestamp >dnl
+	   patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
+[am_indx=1
+for am_file in $1; do
+  case " \$CONFIG_HEADERS " in
+  *" \$am_file "*)
+    am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
+    if test -n "\$am_dir"; then
+      am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
+      for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
+        am_tmpdir=\$am_tmpdir\$am_subdir/
+        if test ! -d \$am_tmpdir; then
+          mkdir \$am_tmpdir
+        fi
+      done
+    fi
+    echo timestamp > "\$am_dir"stamp-h\$am_indx
+    ;;
+  esac
+  am_indx=\`expr \$am_indx + 1\`
+done])
+])]) # AM_CONFIG_HEADER
+
+# _AM_DIRNAME(PATH)
+# -----------------
+# Like AS_DIRNAME, only do it during macro expansion
+AC_DEFUN([_AM_DIRNAME],
+       [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
+	      m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
+		    m4_if(m4_regexp([$1], [^/.*]), -1,
+			  [.],
+			  m4_patsubst([$1], [^\(/\).*], [\1])),
+		    m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
+	      m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
+]) # _AM_DIRNAME
+
+# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
+
+# serial 46 AC_PROG_LIBTOOL
+
+AC_DEFUN([AC_PROG_LIBTOOL],
+[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+# Prevent multiple expansion
+define([AC_PROG_LIBTOOL], [])
+])
+
+AC_DEFUN([AC_LIBTOOL_SETUP],
+[AC_PREREQ(2.13)dnl
+AC_REQUIRE([AC_ENABLE_SHARED])dnl
+AC_REQUIRE([AC_ENABLE_STATIC])dnl
+AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
+AC_REQUIRE([AC_OBJEXT])dnl
+AC_REQUIRE([AC_EXEEXT])dnl
+dnl
+
+_LT_AC_PROG_ECHO_BACKSLASH
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    AC_PATH_MAGIC
+  fi
+  ;;
+esac
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_CHECK_TOOL(STRIP, strip, :)
+
+ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
+ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
+enable_win32_dll=yes, enable_win32_dll=no)
+
+AC_ARG_ENABLE(libtool-lock,
+  [  --disable-libtool-lock  avoid locking (might break parallel builds)])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+    [AC_LANG_SAVE
+     AC_LANG_C
+     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+     AC_LANG_RESTORE])
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+
+ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
+[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+
+  # recent cygwin and mingw systems supply a stub DllMain which the user
+  # can override, but on older systems we have to supply one
+  AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
+    [AC_TRY_LINK([],
+      [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
+      DllMain (0, 0, 0);],
+      [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
+
+  case $host/$CC in
+  *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
+    # old mingw systems require "-dll" to link a DLL, while more recent ones
+    # require "-mdll"
+    SAVE_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -mdll"
+    AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
+      [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
+    CFLAGS="$SAVE_CFLAGS" ;;
+  *-*-cygwin* | *-*-pw32*)
+    # cygwin systems need to pass --dll to the linker, and not link
+    # crt.o which will require a WinMain@16 definition.
+    lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
+  esac
+  ;;
+  ])
+esac
+
+_LT_AC_LTCONFIG_HACK
+
+])
+
+# AC_LIBTOOL_HEADER_ASSERT
+# ------------------------
+AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
+[AC_CACHE_CHECK([whether $CC supports assert without backlinking],
+    [lt_cv_func_assert_works],
+    [case $host in
+    *-*-solaris*)
+      if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
+        case `$CC --version 2>/dev/null` in
+        [[12]].*) lt_cv_func_assert_works=no ;;
+        *)        lt_cv_func_assert_works=yes ;;
+        esac
+      fi
+      ;;
+    esac])
+
+if test "x$lt_cv_func_assert_works" = xyes; then
+  AC_CHECK_HEADERS(assert.h)
+fi
+])# AC_LIBTOOL_HEADER_ASSERT
+
+# _LT_AC_CHECK_DLFCN
+# --------------------
+AC_DEFUN([_LT_AC_CHECK_DLFCN],
+[AC_CHECK_HEADERS(dlfcn.h)
+])# _LT_AC_CHECK_DLFCN
+
+# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+# ---------------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
+[AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_NM])
+AC_REQUIRE([AC_OBJEXT])
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Transform the above into a raw symbol and a C symbol.
+symxfrm='\1 \2\3 \3'
+
+# Transform an extracted symbol line into a proper C declaration
+lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[[BCDT]]'
+  ;;
+cygwin* | mingw* | pw32*)
+  symcode='[[ABCDGISTW]]'
+  ;;
+hpux*) # Its linker distinguishes data from code symbols
+  lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+  lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  ;;
+irix*)
+  symcode='[[BCDEGRST]]'
+  ;;
+solaris* | sysv5*)
+  symcode='[[BDT]]'
+  ;;
+sysv4)
+  symcode='[[DFNSTU]]'
+  ;;
+esac
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $host_os in
+mingw*)
+  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
+  symcode='[[ABCDGISTW]]'
+fi
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Write the raw and C identifiers.
+lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+  rm -f conftest*
+  cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+EOF
+
+  if AC_TRY_EVAL(ac_compile); then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if egrep ' nm_test_var$' "$nlist" >/dev/null; then
+	if egrep ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
+
+	  cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr void *
+#else
+# define lt_ptr char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr address;
+}
+lt_preloaded_symbols[[]] =
+{
+EOF
+	  sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
+	  cat <<\EOF >> conftest.$ac_ext
+  {0, (lt_ptr) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  save_LIBS="$LIBS"
+	  save_CFLAGS="$CFLAGS"
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$no_builtin_flag"
+	  if AC_TRY_EVAL(ac_link) && test -s conftest; then
+	    pipe_works=yes
+	  fi
+	  LIBS="$save_LIBS"
+	  CFLAGS="$save_CFLAGS"
+	else
+	  echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
+    fi
+  else
+    echo "$progname: failed program was:" >&AC_FD_CC
+    cat conftest.$ac_ext >&5
+  fi
+  rm -f conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+])
+global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  global_symbol_to_cdecl=
+  global_symbol_to_c_name_address=
+else
+  global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
+  global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
+fi
+if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
+then
+  AC_MSG_RESULT(failed)
+else
+  AC_MSG_RESULT(ok)
+fi
+]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+
+# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
+# ---------------------------------
+AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
+[# Find the correct PATH separator.  Usually this is `:', but
+# DJGPP uses `;' like DOS.
+if test "X${PATH_SEPARATOR+set}" != Xset; then
+  UNAME=${UNAME-`uname 2>/dev/null`}
+  case X$UNAME in
+    *-DOS) lt_cv_sys_path_separator=';' ;;
+    *)     lt_cv_sys_path_separator=':' ;;
+  esac
+  PATH_SEPARATOR=$lt_cv_sys_path_separator
+fi
+])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
+
+# _LT_AC_PROG_ECHO_BACKSLASH
+# --------------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
+[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+			      [AC_DIVERT_PUSH(NOTICE)])
+_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+  ;;
+esac
+
+echo=${ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X[$]1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+
+if test -z "$ECHO"; then
+if test "X${echo_test_string+set}" != Xset; then
+# find a string as large as possible, as long as the shell can cope with it
+  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
+       echo_test_string="`eval $cmd`" &&
+       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
+    then
+      break
+    fi
+  done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+   test "X$echo_testing_string" = "X$echo_test_string"; then
+  :
+else
+  # The Solaris, AIX, and Digital Unix default echo programs unquote
+  # backslashes.  This makes it impossible to quote backslashes using
+  #   echo "$something" | sed 's/\\/\\\\/g'
+  #
+  # So, first we look for a working echo in the user's PATH.
+
+  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for dir in $PATH /usr/ucb; do
+    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      echo="$dir/echo"
+      break
+    fi
+  done
+  IFS="$save_ifs"
+
+  if test "X$echo" = Xecho; then
+    # We didn't find a better echo, so look for alternatives.
+    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      # This shell has a builtin print -r that does the trick.
+      echo='print -r'
+    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+	 test "X$CONFIG_SHELL" != X/bin/ksh; then
+      # If we have ksh, try running configure again with it.
+      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+      export ORIGINAL_CONFIG_SHELL
+      CONFIG_SHELL=/bin/ksh
+      export CONFIG_SHELL
+      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+    else
+      # Try using printf.
+      echo='printf %s\n'
+      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+	 test "X$echo_testing_string" = "X$echo_test_string"; then
+	# Cool, printf works
+	:
+      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+	export CONFIG_SHELL
+	SHELL="$CONFIG_SHELL"
+	export SHELL
+	echo="$CONFIG_SHELL [$]0 --fallback-echo"
+      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	echo="$CONFIG_SHELL [$]0 --fallback-echo"
+      else
+	# maybe with a smaller string...
+	prev=:
+
+	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
+	  then
+	    break
+	  fi
+	  prev="$cmd"
+	done
+
+	if test "$prev" != 'sed 50q "[$]0"'; then
+	  echo_test_string=`eval $prev`
+	  export echo_test_string
+	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+	else
+	  # Oops.  We lost completely, so just stick with echo.
+	  echo=echo
+	fi
+      fi
+    fi
+  fi
+fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+ECHO=$echo
+if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(ECHO)
+AC_DIVERT_POP
+])# _LT_AC_PROG_ECHO_BACKSLASH
+
+# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ------------------------------------------------------------------
+AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
+[if test "$cross_compiling" = yes; then :
+  [$4]
+else
+  AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}]
+EOF
+  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) $1 ;;
+      x$lt_dlneed_uscore) $2 ;;
+      x$lt_unknown|x*) $3 ;;
+    esac
+  else :
+    # compilation failed
+    $3
+  fi
+fi
+rm -fr conftest*
+])# _LT_AC_TRY_DLOPEN_SELF
+
+# AC_LIBTOOL_DLOPEN_SELF
+# -------------------
+AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
+[if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  cygwin* | mingw* | pw32*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+   ;;
+
+  *)
+    AC_CHECK_FUNC([shl_load],
+          [lt_cv_dlopen="shl_load"],
+      [AC_CHECK_LIB([dld], [shl_load],
+            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
+	[AC_CHECK_FUNC([dlopen],
+	      [lt_cv_dlopen="dlopen"],
+	  [AC_CHECK_LIB([dl], [dlopen],
+	        [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+	    [AC_CHECK_LIB([svld], [dlopen],
+	          [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+	      [AC_CHECK_LIB([dld], [dld_link],
+	            [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
+	      ])
+	    ])
+	  ])
+	])
+      ])
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    AC_CACHE_CHECK([whether a program can dlopen itself],
+	  lt_cv_dlopen_self, [dnl
+	  _LT_AC_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+    ])
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      LDFLAGS="$LDFLAGS $link_static_flag"
+      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+    	  lt_cv_dlopen_self_static, [dnl
+	  _LT_AC_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
+      ])
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+])# AC_LIBTOOL_DLOPEN_SELF
+
+AC_DEFUN([_LT_AC_LTCONFIG_HACK],
+[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e s/^X//'
+sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Constants:
+rm="rm -f"
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+need_locks="$enable_libtool_lock"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
+
+if test x"$host" != x"$build"; then
+  ac_tool_prefix=${host_alias}-
+else
+  ac_tool_prefix=
+fi
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
+    ;;
+  *)
+    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+# Allow CC to be a program name with arguments.
+set dummy $CC
+compiler="[$]2"
+
+AC_MSG_CHECKING([for objdir])
+rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+AC_MSG_RESULT($objdir)
+
+
+AC_ARG_WITH(pic,
+[  --with-pic              try to use only PIC/non-PIC objects [default=use both]],
+pic_mode="$withval", pic_mode=default)
+test -z "$pic_mode" && pic_mode=default
+
+# We assume here that the value for lt_cv_prog_cc_pic will not be cached
+# in isolation, and that seeing it set (from the cache) indicates that
+# the associated values are set (in the cache) correctly too.
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+AC_CACHE_VAL(lt_cv_prog_cc_pic,
+[ lt_cv_prog_cc_pic=
+  lt_cv_prog_cc_shlib=
+  lt_cv_prog_cc_wl=
+  lt_cv_prog_cc_static=
+  lt_cv_prog_cc_no_builtin=
+  lt_cv_prog_cc_can_build_shared=$can_build_shared
+
+  if test "$GCC" = yes; then
+    lt_cv_prog_cc_wl='-Wl,'
+    lt_cv_prog_cc_static='-static'
+
+    case $host_os in
+    aix*)
+      # Below there is a dirty hack to force normal static linking with -ldl
+      # The problem is because libdl dynamically linked with both libc and
+      # libC (AIX C++ library), which obviously doesn't included in libraries
+      # list by gcc. This cause undefined symbols with -static flags.
+      # This hack allows C programs to be linked with "-static -ldl", but
+      # not sure about C++ programs.
+      lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
+      ;;
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
+      ;;
+    beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_cv_prog_cc_pic='-fno-common'
+      ;;
+    cygwin* | mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_cv_prog_cc_pic='-DDLL_EXPORT'
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	 lt_cv_prog_cc_pic=-Kconform_pic
+      fi
+      ;;
+    *)
+      lt_cv_prog_cc_pic='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for PIC flags for the system compiler.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      lt_cv_prog_cc_wl='-Wl,'
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_cv_prog_cc_static='-Bstatic'
+      else
+	lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
+      lt_cv_prog_cc_wl='-Wl,'
+      lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
+      lt_cv_prog_cc_pic='+Z'
+      ;;
+
+    irix5* | irix6*)
+      lt_cv_prog_cc_wl='-Wl,'
+      lt_cv_prog_cc_static='-non_shared'
+      # PIC (with -KPIC) is the default.
+      ;;
+
+    cygwin* | mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_cv_prog_cc_pic='-DDLL_EXPORT'
+      ;;
+
+    newsos6)
+      lt_cv_prog_cc_pic='-KPIC'
+      lt_cv_prog_cc_static='-Bstatic'
+      ;;
+
+    osf3* | osf4* | osf5*)
+      # All OSF/1 code is PIC.
+      lt_cv_prog_cc_wl='-Wl,'
+      lt_cv_prog_cc_static='-non_shared'
+      ;;
+
+    sco3.2v5*)
+      lt_cv_prog_cc_pic='-Kpic'
+      lt_cv_prog_cc_static='-dn'
+      lt_cv_prog_cc_shlib='-belf'
+      ;;
+
+    solaris*)
+      lt_cv_prog_cc_pic='-KPIC'
+      lt_cv_prog_cc_static='-Bstatic'
+      lt_cv_prog_cc_wl='-Wl,'
+      ;;
+
+    sunos4*)
+      lt_cv_prog_cc_pic='-PIC'
+      lt_cv_prog_cc_static='-Bstatic'
+      lt_cv_prog_cc_wl='-Qoption ld '
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+      lt_cv_prog_cc_pic='-KPIC'
+      lt_cv_prog_cc_static='-Bstatic'
+      if test "x$host_vendor" = xsni; then
+	lt_cv_prog_cc_wl='-LD'
+      else
+	lt_cv_prog_cc_wl='-Wl,'
+      fi
+      ;;
+
+    uts4*)
+      lt_cv_prog_cc_pic='-pic'
+      lt_cv_prog_cc_static='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_cv_prog_cc_pic='-Kconform_pic'
+	lt_cv_prog_cc_static='-Bstatic'
+      fi
+      ;;
+
+    *)
+      lt_cv_prog_cc_can_build_shared=no
+      ;;
+    esac
+  fi
+])
+if test -z "$lt_cv_prog_cc_pic"; then
+  AC_MSG_RESULT([none])
+else
+  AC_MSG_RESULT([$lt_cv_prog_cc_pic])
+
+  # Check to make sure the pic_flag actually works.
+  AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
+  AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
+    save_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
+    AC_TRY_COMPILE([], [], [dnl
+      case $host_os in
+      hpux9* | hpux10* | hpux11*)
+	# On HP-UX, both CC and GCC only warn that PIC is supported... then
+	# they create non-PIC objects.  So, if there were any warnings, we
+	# assume that PIC is not supported.
+	if test -s conftest.err; then
+	  lt_cv_prog_cc_pic_works=no
+	else
+	  lt_cv_prog_cc_pic_works=yes
+	fi
+	;;
+      *)
+	lt_cv_prog_cc_pic_works=yes
+	;;
+      esac
+    ], [dnl
+      lt_cv_prog_cc_pic_works=no
+    ])
+    CFLAGS="$save_CFLAGS"
+  ])
+
+  if test "X$lt_cv_prog_cc_pic_works" = Xno; then
+    lt_cv_prog_cc_pic=
+    lt_cv_prog_cc_can_build_shared=no
+  else
+    lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
+  fi
+
+  AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
+fi
+
+# Check for any special shared library compilation flags.
+if test -n "$lt_cv_prog_cc_shlib"; then
+  AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
+  if echo "$old_CC $old_CFLAGS " | egrep -e "[[ 	]]$lt_cv_prog_cc_shlib[[ 	]]" >/dev/null; then :
+  else
+   AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
+    lt_cv_prog_cc_can_build_shared=no
+  fi
+fi
+
+AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
+AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
+  lt_cv_prog_cc_static_works=no
+  save_LDFLAGS="$LDFLAGS"
+  LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
+  AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
+  LDFLAGS="$save_LDFLAGS"
+])
+
+# Belt *and* braces to stop my trousers falling down:
+test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
+AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
+
+pic_flag="$lt_cv_prog_cc_pic"
+special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
+wl="$lt_cv_prog_cc_wl"
+link_static_flag="$lt_cv_prog_cc_static"
+no_builtin_flag="$lt_cv_prog_cc_no_builtin"
+can_build_shared="$lt_cv_prog_cc_can_build_shared"
+
+
+# Check to see if options -o and -c are simultaneously supported by compiler
+AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
+AC_CACHE_VAL([lt_cv_compiler_c_o], [
+$rm -r conftest 2>/dev/null
+mkdir conftest
+cd conftest
+echo "int some_variable = 0;" > conftest.$ac_ext
+mkdir out
+# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
+# that will create temporary files in the current directory regardless of
+# the output directory.  Thus, making CWD read-only will cause this test
+# to fail, enabling locking or at least warning the user not to do parallel
+# builds.
+chmod -w .
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
+compiler_c_o=no
+if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
+  # The compiler can only warn and ignore the option if not recognized
+  # So say no if there are warnings
+  if test -s out/conftest.err; then
+    lt_cv_compiler_c_o=no
+  else
+    lt_cv_compiler_c_o=yes
+  fi
+else
+  # Append any errors to the config.log.
+  cat out/conftest.err 1>&AC_FD_CC
+  lt_cv_compiler_c_o=no
+fi
+CFLAGS="$save_CFLAGS"
+chmod u+w .
+$rm conftest* out/*
+rmdir out
+cd ..
+rmdir conftest
+$rm -r conftest 2>/dev/null
+])
+compiler_c_o=$lt_cv_compiler_c_o
+AC_MSG_RESULT([$compiler_c_o])
+
+if test x"$compiler_c_o" = x"yes"; then
+  # Check to see if we can write to a .lo
+  AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
+  AC_CACHE_VAL([lt_cv_compiler_o_lo], [
+  lt_cv_compiler_o_lo=no
+  save_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -c -o conftest.lo"
+  save_objext="$ac_objext"
+  ac_objext=lo
+  AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
+    # The compiler can only warn and ignore the option if not recognized
+    # So say no if there are warnings
+    if test -s conftest.err; then
+      lt_cv_compiler_o_lo=no
+    else
+      lt_cv_compiler_o_lo=yes
+    fi
+  ])
+  ac_objext="$save_objext"
+  CFLAGS="$save_CFLAGS"
+  ])
+  compiler_o_lo=$lt_cv_compiler_o_lo
+  AC_MSG_RESULT([$compiler_o_lo])
+else
+  compiler_o_lo=no
+fi
+
+# Check to see if we can do hard links to lock some files if needed
+hard_links="nottested"
+if test "$compiler_c_o" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  AC_MSG_CHECKING([if we can lock with hard links])
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  AC_MSG_RESULT([$hard_links])
+  if test "$hard_links" = no; then
+    AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+if test "$GCC" = yes; then
+  # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
+  AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
+  echo "int some_variable = 0;" > conftest.$ac_ext
+  save_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
+  compiler_rtti_exceptions=no
+  AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
+    # The compiler can only warn and ignore the option if not recognized
+    # So say no if there are warnings
+    if test -s conftest.err; then
+      compiler_rtti_exceptions=no
+    else
+      compiler_rtti_exceptions=yes
+    fi
+  ])
+  CFLAGS="$save_CFLAGS"
+  AC_MSG_RESULT([$compiler_rtti_exceptions])
+
+  if test "$compiler_rtti_exceptions" = "yes"; then
+    no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
+  else
+    no_builtin_flag=' -fno-builtin'
+  fi
+fi
+
+# See if the linker supports building shared libraries.
+AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
+
+allow_undefined_flag=
+no_undefined_flag=
+need_lib_prefix=unknown
+need_version=unknown
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+archive_cmds=
+archive_expsym_cmds=
+old_archive_from_new_cmds=
+old_archive_from_expsyms_cmds=
+export_dynamic_flag_spec=
+whole_archive_flag_spec=
+thread_safe_flag_spec=
+hardcode_into_libs=no
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+hardcode_shlibpath_var=unsupported
+runpath_var=
+link_all_deplibs=unknown
+always_export_symbols=no
+export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
+# include_expsyms should be a list of space-separated symbols to be *always*
+# included in the symbol list
+include_expsyms=
+# exclude_expsyms can be an egrep regular expression of symbols to exclude
+# it will be wrapped by ` (' and `)$', so one must not match beginning or
+# end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+# as well as any symbol that contains `d'.
+exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
+# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+# platforms (ab)use it in PIC code, but their linkers get confused if
+# the symbol is explicitly referenced.  Since portable code cannot
+# rely on this symbol name, it's probably fine to never include it in
+# preloaded symbol tables.
+extract_expsyms_cmds=
+
+case $host_os in
+cygwin* | mingw* | pw32*)
+  # FIXME: the MSVC++ port hasn't been tested in a loooong time
+  # When not using gcc, we currently assume that we are using
+  # Microsoft Visual C++.
+  if test "$GCC" != yes; then
+    with_gnu_ld=no
+  fi
+  ;;
+openbsd*)
+  with_gnu_ld=no
+  ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+  # If archive_cmds runs LD, not CC, wlarc should be empty
+  wlarc='${wl}'
+
+  # See if GNU ld supports shared libraries.
+  case $host_os in
+  aix3* | aix4* | aix5*)
+    # On AIX, the GNU linker is very broken
+    # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
+    ld_shlibs=no
+    cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+    ;;
+
+  amigaos*)
+    archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+    hardcode_libdir_flag_spec='-L$libdir'
+    hardcode_minus_L=yes
+
+    # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+    # that the semantics of dynamic libraries on AmigaOS, at least up
+    # to version 4, is to share data among multiple programs linked
+    # with the same dynamic library.  Since this doesn't match the
+    # behavior of shared libraries on other platforms, we can use
+    # them.
+    ld_shlibs=no
+    ;;
+
+  beos*)
+    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      allow_undefined_flag=unsupported
+      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+      # support --undefined.  This deserves some investigation.  FIXME
+      archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    else
+      ld_shlibs=no
+    fi
+    ;;
+
+  cygwin* | mingw* | pw32*)
+    # hardcode_libdir_flag_spec is actually meaningless, as there is
+    # no search path for DLLs.
+    hardcode_libdir_flag_spec='-L$libdir'
+    allow_undefined_flag=unsupported
+    always_export_symbols=yes
+
+    extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
+      sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
+      test -f $output_objdir/impgen.exe || (cd $output_objdir && \
+      if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
+      else $CC -o impgen impgen.c ; fi)~
+      $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
+
+    old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
+
+    # cygwin and mingw dlls have different entry points and sets of symbols
+    # to exclude.
+    # FIXME: what about values for MSVC?
+    dll_entry=__cygwin_dll_entry@12
+    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
+    case $host_os in
+    mingw*)
+      # mingw values
+      dll_entry=_DllMainCRTStartup@12
+      dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
+      ;;
+    esac
+
+    # mingw and cygwin differ, and it's simplest to just exclude the union
+    # of the two symbol sets.
+    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
+
+    # recent cygwin and mingw systems supply a stub DllMain which the user
+    # can override, but on older systems we have to supply one (in ltdll.c)
+    if test "x$lt_cv_need_dllmain" = "xyes"; then
+      ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
+      ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
+	test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
+    else
+      ltdll_obj=
+      ltdll_cmds=
+    fi
+
+    # Extract the symbol export list from an `--export-all' def file,
+    # then regenerate the def file from the symbol export list, so that
+    # the compiled dll only exports the symbol export list.
+    # Be careful not to strip the DATA tag left be newer dlltools.
+    export_symbols_cmds="$ltdll_cmds"'
+      $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
+      sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
+
+    # If the export-symbols file already is a .def file (1st line
+    # is EXPORTS), use it as is.
+    # If DATA tags from a recent dlltool are present, honour them!
+    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
+	cp $export_symbols $output_objdir/$soname-def;
+      else
+	echo EXPORTS > $output_objdir/$soname-def;
+	_lt_hint=1;
+	cat $export_symbols | while read symbol; do
+	 set dummy \$symbol;
+	 case \[$]# in
+	   2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
+	   *) echo "     \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
+	 esac;
+	 _lt_hint=`expr 1 + \$_lt_hint`;
+	done;
+      fi~
+      '"$ltdll_cmds"'
+      $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
+      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
+      $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
+      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
+      $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
+    ;;
+
+  netbsd*)
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+      wlarc=
+    else
+      archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+    fi
+    ;;
+
+  solaris* | sysv5*)
+    if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
+      ld_shlibs=no
+      cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+    elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+    else
+      ld_shlibs=no
+    fi
+    ;;
+
+  sunos4*)
+    archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+    wlarc=
+    hardcode_direct=yes
+    hardcode_shlibpath_var=no
+    ;;
+
+  *)
+    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+    else
+      ld_shlibs=no
+    fi
+    ;;
+  esac
+
+  if test "$ld_shlibs" = yes; then
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec='${wl}--export-dynamic'
+    case $host_os in
+    cygwin* | mingw* | pw32*)
+      # dlltool doesn't understand --whole-archive et. al.
+      whole_archive_flag_spec=
+      ;;
+    *)
+      # ancient GNU ld didn't support --whole-archive et. al.
+      if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
+	whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+	whole_archive_flag_spec=
+      fi
+      ;;
+    esac
+  fi
+else
+  # PORTME fill in a description of your system's linker (not GNU ld)
+  case $host_os in
+  aix3*)
+    allow_undefined_flag=unsupported
+    always_export_symbols=yes
+    archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+    # Note: this linker hardcodes the directories in LIBPATH if there
+    # are no directories specified by -L.
+    hardcode_minus_L=yes
+    if test "$GCC" = yes && test -z "$link_static_flag"; then
+      # Neither direct hardcoding nor static linking is supported with a
+      # broken collect2.
+      hardcode_direct=unsupported
+    fi
+    ;;
+
+  aix4* | aix5*)
+    if test "$host_cpu" = ia64; then
+      # On IA64, the linker does run time linking by default, so we don't
+      # have to do anything special.
+      aix_use_runtimelinking=no
+      exp_sym_flag='-Bexport'
+      no_entry_flag=""
+    else
+      aix_use_runtimelinking=no
+
+      # Test if we are trying to use run time linking or normal
+      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+      # need to do runtime linking.
+      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+	for ld_flag in $LDFLAGS; do
+	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	    aix_use_runtimelinking=yes
+	    break
+	  fi
+	done
+      esac
+
+      exp_sym_flag='-bexport'
+      no_entry_flag='-bnoentry'
+    fi
+
+    # When large executables or shared objects are built, AIX ld can
+    # have problems creating the table of contents.  If linking a library
+    # or program results in "error TOC overflow" add -mminimal-toc to
+    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+    hardcode_direct=yes
+    archive_cmds=''
+    hardcode_libdir_separator=':'
+    if test "$GCC" = yes; then
+      case $host_os in aix4.[[012]]|aix4.[[012]].*)
+	collect2name=`${CC} -print-prog-name=collect2`
+	if test -f "$collect2name" && \
+	  strings "$collect2name" | grep resolve_lib_name >/dev/null
+	then
+	  # We have reworked collect2
+	  hardcode_direct=yes
+	else
+	  # We have old collect2
+	  hardcode_direct=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  hardcode_minus_L=yes
+	  hardcode_libdir_flag_spec='-L$libdir'
+	  hardcode_libdir_separator=
+	fi
+      esac
+
+      shared_flag='-shared'
+    else
+      # not using gcc
+      if test "$host_cpu" = ia64; then
+	shared_flag='${wl}-G'
+      else
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag='${wl}-G'
+	else
+	  shared_flag='${wl}-bM:SRE'
+	fi
+      fi
+    fi
+
+    # It seems that -bexpall can do strange things, so it is better to
+    # generate a list of symbols to export.
+    always_export_symbols=yes
+    if test "$aix_use_runtimelinking" = yes; then
+      # Warning - without using the other runtime loading flags (-brtl),
+      # -berok will link without error, but may produce a broken library.
+      allow_undefined_flag='-berok'
+      hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
+      archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+    else
+      if test "$host_cpu" = ia64; then
+	hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+	allow_undefined_flag="-z nodefs"
+	archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+      else
+	hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
+	# Warning - without using the other run time loading flags,
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag='${wl}-berok'
+	# This is a bit strange, but is similar to how AIX traditionally builds
+	# it's shared libraries.
+	archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
+      fi
+    fi
+    ;;
+
+  amigaos*)
+    archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+    hardcode_libdir_flag_spec='-L$libdir'
+    hardcode_minus_L=yes
+    # see comment about different semantics on the GNU ld section
+    ld_shlibs=no
+    ;;
+
+  cygwin* | mingw* | pw32*)
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    # hardcode_libdir_flag_spec is actually meaningless, as there is
+    # no search path for DLLs.
+    hardcode_libdir_flag_spec=' '
+    allow_undefined_flag=unsupported
+    # Tell ltmain to make .lib files, not .a files.
+    libext=lib
+    # FIXME: Setting linknames here is a bad hack.
+    archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+    # The linker will automatically build a .lib file if we build a DLL.
+    old_archive_from_new_cmds='true'
+    # FIXME: Should let the user specify the lib program.
+    old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
+    fix_srcfile_path='`cygpath -w "$srcfile"`'
+    ;;
+
+  darwin* | rhapsody*)
+    case "$host_os" in
+    rhapsody* | darwin1.[[012]])
+      allow_undefined_flag='-undefined suppress'
+      ;;
+    *) # Darwin 1.3 on
+      allow_undefined_flag='-flat_namespace -undefined suppress'
+      ;;
+    esac
+    # FIXME: Relying on posixy $() will cause problems for
+    #        cross-compilation, but unfortunately the echo tests do not
+    #        yet detect zsh echo's removal of \ escapes.
+    archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
+    # We need to add '_' to the symbols in $export_symbols first
+    #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
+    hardcode_direct=yes
+    hardcode_shlibpath_var=no
+    whole_archive_flag_spec='-all_load $convenience'
+    ;;
+
+  freebsd1*)
+    ld_shlibs=no
+    ;;
+
+  # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+  # support.  Future versions do this automatically, but an explicit c++rt0.o
+  # does not break anything, and helps significantly (at the cost of a little
+  # extra space).
+  freebsd2.2*)
+    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+    hardcode_libdir_flag_spec='-R$libdir'
+    hardcode_direct=yes
+    hardcode_shlibpath_var=no
+    ;;
+
+  # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+  freebsd2*)
+    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+    hardcode_direct=yes
+    hardcode_minus_L=yes
+    hardcode_shlibpath_var=no
+    ;;
+
+  # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+  freebsd*)
+    archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+    hardcode_libdir_flag_spec='-R$libdir'
+    hardcode_direct=yes
+    hardcode_shlibpath_var=no
+    ;;
+
+  hpux9* | hpux10* | hpux11*)
+    case $host_os in
+    hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
+    *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
+    esac
+    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+    hardcode_libdir_separator=:
+    hardcode_direct=yes
+    hardcode_minus_L=yes # Not in the search PATH, but as the default
+			 # location of the library.
+    export_dynamic_flag_spec='${wl}-E'
+    ;;
+
+  irix5* | irix6*)
+    if test "$GCC" = yes; then
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+    else
+      archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+    fi
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    hardcode_libdir_separator=:
+    link_all_deplibs=yes
+    ;;
+
+  netbsd*)
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+    else
+      archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+    fi
+    hardcode_libdir_flag_spec='-R$libdir'
+    hardcode_direct=yes
+    hardcode_shlibpath_var=no
+    ;;
+
+  newsos6)
+    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+    hardcode_direct=yes
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    hardcode_libdir_separator=:
+    hardcode_shlibpath_var=no
+    ;;
+
+  openbsd*)
+    hardcode_direct=yes
+    hardcode_shlibpath_var=no
+    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec='${wl}-E'
+    else
+      case "$host_os" in
+      openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_libdir_flag_spec='-R$libdir'
+        ;;
+      *)
+        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
+        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+        ;;
+      esac
+    fi
+    ;;
+
+  os2*)
+    hardcode_libdir_flag_spec='-L$libdir'
+    hardcode_minus_L=yes
+    allow_undefined_flag=unsupported
+    archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+    old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+    ;;
+
+  osf3*)
+    if test "$GCC" = yes; then
+      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+    else
+      allow_undefined_flag=' -expect_unresolved \*'
+      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+    fi
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    hardcode_libdir_separator=:
+    ;;
+
+  osf4* | osf5*)	# as osf3* with the addition of -msym flag
+    if test "$GCC" = yes; then
+      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    else
+      allow_undefined_flag=' -expect_unresolved \*'
+      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+      $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+
+      #Both c and cxx compiler support -rpath directly
+      hardcode_libdir_flag_spec='-rpath $libdir'
+    fi
+    hardcode_libdir_separator=:
+    ;;
+
+  sco3.2v5*)
+    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+    hardcode_shlibpath_var=no
+    runpath_var=LD_RUN_PATH
+    hardcode_runpath_var=yes
+    export_dynamic_flag_spec='${wl}-Bexport'
+    ;;
+
+  solaris*)
+    # gcc --version < 3.0 without binutils cannot create self contained
+    # shared libraries reliably, requiring libgcc.a to resolve some of
+    # the object symbols generated in some cases.  Libraries that use
+    # assert need libgcc.a to resolve __eprintf, for example.  Linking
+    # a copy of libgcc.a into every shared library to guarantee resolving
+    # such symbols causes other problems:  According to Tim Van Holder
+    # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
+    # (to the application) exception stack for one thing.
+    no_undefined_flag=' -z defs'
+    if test "$GCC" = yes; then
+      case `$CC --version 2>/dev/null` in
+      [[12]].*)
+	cat <<EOF 1>&2
+
+*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
+*** create self contained shared libraries on Solaris systems, without
+*** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
+*** -no-undefined support, which will at least allow you to build shared
+*** libraries.  However, you may find that when you link such libraries
+*** into an application without using GCC, you have to manually add
+*** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
+*** upgrade to a newer version of GCC.  Another option is to rebuild your
+*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
+
+EOF
+        no_undefined_flag=
+	;;
+      esac
+    fi
+    # $CC -shared without GNU ld will not create a library from C++
+    # object files and a static libstdc++, better avoid it by now
+    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+    hardcode_libdir_flag_spec='-R$libdir'
+    hardcode_shlibpath_var=no
+    case $host_os in
+    solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+    *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+      whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
+    esac
+    link_all_deplibs=yes
+    ;;
+
+  sunos4*)
+    if test "x$host_vendor" = xsequent; then
+      # Use $CC to link under sequent, because it throws in some extra .o
+      # files that make .init and .fini sections work.
+      archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+    else
+      archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+    fi
+    hardcode_libdir_flag_spec='-L$libdir'
+    hardcode_direct=yes
+    hardcode_minus_L=yes
+    hardcode_shlibpath_var=no
+    ;;
+
+  sysv4)
+    if test "x$host_vendor" = xsno; then
+      archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes # is this really true???
+    else
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+    fi
+    runpath_var='LD_RUN_PATH'
+    hardcode_shlibpath_var=no
+    ;;
+
+  sysv4.3*)
+    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+    hardcode_shlibpath_var=no
+    export_dynamic_flag_spec='-Bexport'
+    ;;
+
+  sysv5*)
+    no_undefined_flag=' -z text'
+    # $CC -shared without GNU ld will not create a library from C++
+    # object files and a static libstdc++, better avoid it by now
+    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+    hardcode_libdir_flag_spec=
+    hardcode_shlibpath_var=no
+    runpath_var='LD_RUN_PATH'
+    ;;
+
+  uts4*)
+    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+    hardcode_libdir_flag_spec='-L$libdir'
+    hardcode_shlibpath_var=no
+    ;;
+
+  dgux*)
+    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+    hardcode_libdir_flag_spec='-L$libdir'
+    hardcode_shlibpath_var=no
+    ;;
+
+  sysv4*MP*)
+    if test -d /usr/nec; then
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      runpath_var=LD_RUN_PATH
+      hardcode_runpath_var=yes
+      ld_shlibs=yes
+    fi
+    ;;
+
+  sysv4.2uw2*)
+    archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+    hardcode_direct=yes
+    hardcode_minus_L=no
+    hardcode_shlibpath_var=no
+    hardcode_runpath_var=yes
+    runpath_var=LD_RUN_PATH
+    ;;
+
+  sysv5uw7* | unixware7*)
+    no_undefined_flag='${wl}-z ${wl}text'
+    if test "$GCC" = yes; then
+      archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+    else
+      archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+    fi
+    runpath_var='LD_RUN_PATH'
+    hardcode_shlibpath_var=no
+    ;;
+
+  *)
+    ld_shlibs=no
+    ;;
+  esac
+fi
+AC_MSG_RESULT([$ld_shlibs])
+test "$ld_shlibs" = no && can_build_shared=no
+
+# Check hardcoding attributes.
+AC_MSG_CHECKING([how to hardcode library paths into programs])
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" || \
+   test -n "$runpath_var"; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$hardcode_shlibpath_var" != no &&
+     test "$hardcode_minus_L" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action=unsupported
+fi
+AC_MSG_RESULT([$hardcode_action])
+
+striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  AC_MSG_RESULT([yes])
+else
+  AC_MSG_RESULT([no])
+fi
+
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+# PORTME Fill in your ld.so characteristics
+AC_MSG_CHECKING([dynamic linker characteristics])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}.so$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}.so$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[[01]] | aix4.[[01]].*)
+	if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	     echo ' yes '
+	     echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	  :
+	else
+	  can_build_shared=no
+	fi
+	;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can
+    # not hardcode correct soname into executable. Probably we can
+    # add versioning support to collect2, so additional links can
+    # be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}.so$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}.so'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi4*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  soname_spec='${libname}${release}.so$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  export_dynamic_flag_spec=-rdynamic
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  need_version=no
+  need_lib_prefix=no
+  case $GCC,$host_os in
+  yes,cygwin*)
+    library_names_spec='$libname.dll.a'
+    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
+    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog .libs/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    ;;
+  yes,mingw*)
+    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
+    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
+    ;;
+  yes,pw32*)
+    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
+    ;;
+  *)
+    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  # FIXME: Relying on posixy $() will cause problems for
+  #        cross-compilation, but unfortunately the echo tests do not
+  #        yet detect zsh echo's removal of \ escapes.
+  library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
+  soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd*)
+  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  *)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
+  soname_spec='${libname}${release}.so$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  dynamic_linker="$host_os dld.sl"
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  shlibpath_var=SHLIB_PATH
+  shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+  library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
+  soname_spec='${libname}${release}.sl$major'
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+irix5* | irix6*)
+  version_type=irix
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
+  case $host_os in
+  irix5*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  soname_spec='${libname}${release}.so$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
+    soname_spec='${libname}${release}.so$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case "$host_os" in
+    openbsd2.[[89]] | openbsd2.[[89]].*)
+      shlibpath_overrides_runpath=no
+      ;;
+    *)
+      shlibpath_overrides_runpath=yes
+      ;;
+    esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+os2*)
+  libname_spec='$name'
+  need_lib_prefix=no
+  library_names_spec='$libname.dll $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_version=no
+  soname_spec='${libname}${release}.so'
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+sco3.2v5*)
+  version_type=osf
+  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  soname_spec='${libname}${release}.so$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  version_type=linux
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  soname_spec='${libname}${release}.so$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  soname_spec='${libname}${release}.so$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  soname_spec='${libname}${release}.so$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
+    soname_spec='$libname.so.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+
+# Report the final consequences.
+AC_MSG_CHECKING([if libtool supports shared libraries])
+AC_MSG_RESULT([$can_build_shared])
+
+AC_MSG_CHECKING([whether to build shared libraries])
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case "$host_os" in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+
+aix4*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+  ;;
+esac
+AC_MSG_RESULT([$enable_shared])
+
+AC_MSG_CHECKING([whether to build static libraries])
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+AC_MSG_RESULT([$enable_static])
+
+if test "$hardcode_action" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+AC_LIBTOOL_DLOPEN_SELF
+
+if test "$enable_shared" = yes && test "$GCC" = yes; then
+  case $archive_cmds in
+  *'~'*)
+    # FIXME: we may have to deal with multi-command sequences.
+    ;;
+  '$CC '*)
+    # Test whether the compiler implicitly links with -lc since on some
+    # systems, -lgcc has to come before -lc. If gcc already passes -lc
+    # to ld, don't add -lc before -lgcc.
+    AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+    AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
+    [$rm conftest*
+    echo 'static int dummy;' > conftest.$ac_ext
+
+    if AC_TRY_EVAL(ac_compile); then
+      soname=conftest
+      lib=conftest
+      libobjs=conftest.$ac_objext
+      deplibs=
+      wl=$lt_cv_prog_cc_wl
+      compiler_flags=-v
+      linker_flags=-v
+      verstring=
+      output_objdir=.
+      libname=conftest
+      save_allow_undefined_flag=$allow_undefined_flag
+      allow_undefined_flag=
+      if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
+      then
+	lt_cv_archive_cmds_need_lc=no
+      else
+	lt_cv_archive_cmds_need_lc=yes
+      fi
+      allow_undefined_flag=$save_allow_undefined_flag
+    else
+      cat conftest.err 1>&5
+    fi])
+    AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
+    ;;
+  esac
+fi
+need_lc=${lt_cv_archive_cmds_need_lc-yes}
+
+# The second clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  :
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  test -f Makefile && make "$ltmain"
+fi
+
+if test -f "$ltmain"; then
+  trap "$rm \"${ofile}T\"; exit 1" 1 2 15
+  $rm -f "${ofile}T"
+
+  echo creating $ofile
+
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS \
+    AR AR_FLAGS AS CC LD LN_S NM SHELL \
+    reload_flag reload_cmds wl \
+    pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
+    thread_safe_flag_spec whole_archive_flag_spec libname_spec \
+    library_names_spec soname_spec \
+    RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
+    old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
+    postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
+    old_striplib striplib file_magic_cmd export_symbols_cmds \
+    deplibs_check_method allow_undefined_flag no_undefined_flag \
+    finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
+    global_symbol_to_c_name_address \
+    hardcode_libdir_flag_spec hardcode_libdir_separator  \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
+
+    case $var in
+    reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
+    extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  cat <<__EOF__ > "${ofile}T"
+#! $SHELL
+
+# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996-2000 Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="sed -e s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$need_lc
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# The default C compiler.
+CC=$lt_CC
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS=$lt_AS
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_wl
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_pic_flag
+pic_mode=$pic_mode
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_compiler_c_o
+
+# Can we write directly to a .lo ?
+compiler_o_lo=$lt_compiler_o_lo
+
+# Must we lock files when doing compilation ?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_link_static_flag
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_no_builtin_flag
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# ### END LIBTOOL CONFIG
+
+__EOF__
+
+  case $host_os in
+  aix3*)
+    cat <<\EOF >> "${ofile}T"
+
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+EOF
+    ;;
+  esac
+
+  case $host_os in
+  cygwin* | mingw* | pw32* | os2*)
+    cat <<'EOF' >> "${ofile}T"
+      # This is a source program that is used to create dlls on Windows
+      # Don't remove nor modify the starting and closing comments
+# /* ltdll.c starts here */
+# #define WIN32_LEAN_AND_MEAN
+# #include <windows.h>
+# #undef WIN32_LEAN_AND_MEAN
+# #include <stdio.h>
+#
+# #ifndef __CYGWIN__
+# #  ifdef __CYGWIN32__
+# #    define __CYGWIN__ __CYGWIN32__
+# #  endif
+# #endif
+#
+# #ifdef __cplusplus
+# extern "C" {
+# #endif
+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+# #ifdef __cplusplus
+# }
+# #endif
+#
+# #ifdef __CYGWIN__
+# #include <cygwin/cygwin_dll.h>
+# DECLARE_CYGWIN_DLL( DllMain );
+# #endif
+# HINSTANCE __hDllInstance_base;
+#
+# BOOL APIENTRY
+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+# {
+#   __hDllInstance_base = hInst;
+#   return TRUE;
+# }
+# /* ltdll.c ends here */
+	# This is a source program that is used to create import libraries
+	# on Windows for dlls which lack them. Don't remove nor modify the
+	# starting and closing comments
+# /* impgen.c starts here */
+# /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
+#
+#  This file is part of GNU libtool.
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#  */
+#
+# #include <stdio.h>		/* for printf() */
+# #include <unistd.h>		/* for open(), lseek(), read() */
+# #include <fcntl.h>		/* for O_RDONLY, O_BINARY */
+# #include <string.h>		/* for strdup() */
+#
+# /* O_BINARY isn't required (or even defined sometimes) under Unix */
+# #ifndef O_BINARY
+# #define O_BINARY 0
+# #endif
+#
+# static unsigned int
+# pe_get16 (fd, offset)
+#      int fd;
+#      int offset;
+# {
+#   unsigned char b[2];
+#   lseek (fd, offset, SEEK_SET);
+#   read (fd, b, 2);
+#   return b[0] + (b[1]<<8);
+# }
+#
+# static unsigned int
+# pe_get32 (fd, offset)
+#     int fd;
+#     int offset;
+# {
+#   unsigned char b[4];
+#   lseek (fd, offset, SEEK_SET);
+#   read (fd, b, 4);
+#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+# }
+#
+# static unsigned int
+# pe_as32 (ptr)
+#      void *ptr;
+# {
+#   unsigned char *b = ptr;
+#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+# }
+#
+# int
+# main (argc, argv)
+#     int argc;
+#     char *argv[];
+# {
+#     int dll;
+#     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
+#     unsigned long export_rva, export_size, nsections, secptr, expptr;
+#     unsigned long name_rvas, nexp;
+#     unsigned char *expdata, *erva;
+#     char *filename, *dll_name;
+#
+#     filename = argv[1];
+#
+#     dll = open(filename, O_RDONLY|O_BINARY);
+#     if (dll < 1)
+# 	return 1;
+#
+#     dll_name = filename;
+#
+#     for (i=0; filename[i]; i++)
+# 	if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
+# 	    dll_name = filename + i +1;
+#
+#     pe_header_offset = pe_get32 (dll, 0x3c);
+#     opthdr_ofs = pe_header_offset + 4 + 20;
+#     num_entries = pe_get32 (dll, opthdr_ofs + 92);
+#
+#     if (num_entries < 1) /* no exports */
+# 	return 1;
+#
+#     export_rva = pe_get32 (dll, opthdr_ofs + 96);
+#     export_size = pe_get32 (dll, opthdr_ofs + 100);
+#     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
+#     secptr = (pe_header_offset + 4 + 20 +
+# 	      pe_get16 (dll, pe_header_offset + 4 + 16));
+#
+#     expptr = 0;
+#     for (i = 0; i < nsections; i++)
+#     {
+# 	char sname[8];
+# 	unsigned long secptr1 = secptr + 40 * i;
+# 	unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
+# 	unsigned long vsize = pe_get32 (dll, secptr1 + 16);
+# 	unsigned long fptr = pe_get32 (dll, secptr1 + 20);
+# 	lseek(dll, secptr1, SEEK_SET);
+# 	read(dll, sname, 8);
+# 	if (vaddr <= export_rva && vaddr+vsize > export_rva)
+# 	{
+# 	    expptr = fptr + (export_rva - vaddr);
+# 	    if (export_rva + export_size > vaddr + vsize)
+# 		export_size = vsize - (export_rva - vaddr);
+# 	    break;
+# 	}
+#     }
+#
+#     expdata = (unsigned char*)malloc(export_size);
+#     lseek (dll, expptr, SEEK_SET);
+#     read (dll, expdata, export_size);
+#     erva = expdata - export_rva;
+#
+#     nexp = pe_as32 (expdata+24);
+#     name_rvas = pe_as32 (expdata+32);
+#
+#     printf ("EXPORTS\n");
+#     for (i = 0; i<nexp; i++)
+#     {
+# 	unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
+# 	printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
+#     }
+#
+#     return 0;
+# }
+# /* impgen.c ends here */
+
+EOF
+    ;;
+  esac
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
+
+  mv -f "${ofile}T" "$ofile" || \
+    (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
+  chmod +x "$ofile"
+fi
+
+])# _LT_AC_LTCONFIG_HACK
+
+# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
+AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
+
+# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
+AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
+
+# AC_ENABLE_SHARED - implement the --enable-shared flag
+# Usage: AC_ENABLE_SHARED[(DEFAULT)]
+#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
+#   `yes'.
+AC_DEFUN([AC_ENABLE_SHARED],
+[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(shared,
+changequote(<<, >>)dnl
+<<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
+changequote([, ])dnl
+[p=${PACKAGE-default}
+case $enableval in
+yes) enable_shared=yes ;;
+no) enable_shared=no ;;
+*)
+  enable_shared=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_shared=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac],
+enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
+])
+
+# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
+AC_DEFUN([AC_DISABLE_SHARED],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_SHARED(no)])
+
+# AC_ENABLE_STATIC - implement the --enable-static flag
+# Usage: AC_ENABLE_STATIC[(DEFAULT)]
+#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
+#   `yes'.
+AC_DEFUN([AC_ENABLE_STATIC],
+[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(static,
+changequote(<<, >>)dnl
+<<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
+changequote([, ])dnl
+[p=${PACKAGE-default}
+case $enableval in
+yes) enable_static=yes ;;
+no) enable_static=no ;;
+*)
+  enable_static=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_static=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac],
+enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
+])
+
+# AC_DISABLE_STATIC - set the default static flag to --disable-static
+AC_DEFUN([AC_DISABLE_STATIC],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_STATIC(no)])
+
+
+# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
+# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
+#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
+#   `yes'.
+AC_DEFUN([AC_ENABLE_FAST_INSTALL],
+[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(fast-install,
+changequote(<<, >>)dnl
+<<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
+changequote([, ])dnl
+[p=${PACKAGE-default}
+case $enableval in
+yes) enable_fast_install=yes ;;
+no) enable_fast_install=no ;;
+*)
+  enable_fast_install=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_fast_install=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac],
+enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
+])
+
+# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
+AC_DEFUN([AC_DISABLE_FAST_INSTALL],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_FAST_INSTALL(no)])
+
+# AC_LIBTOOL_PICMODE - implement the --with-pic flag
+# Usage: AC_LIBTOOL_PICMODE[(MODE)]
+#   Where MODE is either `yes' or `no'.  If omitted, it defaults to
+#   `both'.
+AC_DEFUN([AC_LIBTOOL_PICMODE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+pic_mode=ifelse($#,1,$1,default)])
+
+
+# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
+AC_DEFUN([AC_PATH_TOOL_PREFIX],
+[AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+  /*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+  ?:/*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
+  ;;
+  *)
+  ac_save_MAGIC_CMD="$MAGIC_CMD"
+  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word.  This closes a longstanding sh security hole.
+  ac_dummy="ifelse([$2], , $PATH, [$2])"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$1; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    egrep "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  MAGIC_CMD="$ac_save_MAGIC_CMD"
+  ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  AC_MSG_RESULT($MAGIC_CMD)
+else
+  AC_MSG_RESULT(no)
+fi
+])
+
+
+# AC_PATH_MAGIC - find a file program which can recognise a shared library
+AC_DEFUN([AC_PATH_MAGIC],
+[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
+AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
+  else
+    MAGIC_CMD=:
+  fi
+fi
+])
+
+
+# AC_PROG_LD - find the path to the GNU or non-GNU linker
+AC_DEFUN([AC_PROG_LD],
+[AC_ARG_WITH(gnu-ld,
+[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by GCC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
+      re_direlt='/[[^/]][[^/]]*/\.\./'
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+	test "$with_gnu_ld" != no && break
+      else
+	test "$with_gnu_ld" != yes && break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_PROG_LD_GNU
+])
+
+# AC_PROG_LD_GNU -
+AC_DEFUN([AC_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+  lt_cv_prog_gnu_ld=yes
+else
+  lt_cv_prog_gnu_ld=no
+fi])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])
+
+# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
+#   -- PORTME Some linkers may need a different reload flag.
+AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
+[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
+[lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+test -n "$reload_flag" && reload_flag=" $reload_flag"
+])
+
+# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
+#  -- PORTME fill in with the dynamic library characteristics
+AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
+[AC_CACHE_CHECK([how to recognise dependant libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given egrep regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix4* | aix5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi4*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin* | mingw* | pw32*)
+  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  case "$host_os" in
+  rhapsody* | darwin1.[[012]])
+    lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
+    ;;
+  *) # Darwin 1.3 on
+    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
+    ;;
+  esac
+  ;;
+
+freebsd*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20*|hpux11*)
+  lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libc.sl
+  ;;
+
+irix5* | irix6*)
+  case $host_os in
+  irix5*)
+    # this will be overridden with pass_all, but let us keep it just in case
+    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+    ;;
+  *)
+    case $LD in
+    *-32|*"-32 ") libmagic=32-bit;;
+    *-n32|*"-n32 ") libmagic=N32;;
+    *-64|*"-64 ") libmagic=64-bit;;
+    *) libmagic=never-match;;
+    esac
+    # this will be overridden with pass_all, but let us keep it just in case
+    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
+    ;;
+  esac
+  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  case $host_cpu in
+  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | s390* | m68* | mips* )
+    lt_cv_deplibs_check_method=pass_all ;;
+  *)
+    # glibc up to 2.1.1 does not perform some relocations on ARM
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
+  esac
+  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+openbsd*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
+  else
+    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  # this will be overridden with pass_all, but let us keep it just in case
+  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sco3.2v5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  lt_cv_file_magic_test_file=/lib/libc.so
+  ;;
+
+sysv5uw[[78]]* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  esac
+  ;;
+esac
+])
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+])
+
+
+# AC_PROG_NM - find the path to a BSD-compatible name lister
+AC_DEFUN([AC_PROG_NM],
+[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
+AC_MSG_CHECKING([for BSD-compatible nm])
+AC_CACHE_VAL(lt_cv_path_NM,
+[if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+    test -z "$ac_dir" && ac_dir=.
+    tmp_nm=$ac_dir/${ac_tool_prefix}nm
+    if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
+      # Check to see if the nm accepts a BSD-compat flag.
+      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+      #   nm: unknown option "B" ignored
+      # Tru64's nm complains that /dev/null is an invalid object file
+      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
+	lt_cv_path_NM="$tmp_nm -B"
+	break
+      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+	lt_cv_path_NM="$tmp_nm -p"
+	break
+      else
+	lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	continue # so that we can try to find one that supports BSD flags
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi])
+NM="$lt_cv_path_NM"
+AC_MSG_RESULT([$NM])
+])
+
+# AC_CHECK_LIBM - check for math library
+AC_DEFUN([AC_CHECK_LIBM],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32*)
+  # These system don't have libm
+  ;;
+*-ncr-sysv4.3*)
+  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
+  ;;
+*)
+  AC_CHECK_LIB(m, main, LIBM="-lm")
+  ;;
+esac
+])
+
+# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
+# the libltdl convenience library and INCLTDL to the include flags for
+# the libltdl header and adds --enable-ltdl-convenience to the
+# configure arguments.  Note that LIBLTDL and INCLTDL are not
+# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If DIR is not
+# provided, it is assumed to be `libltdl'.  LIBLTDL will be prefixed
+# with '${top_builddir}/' and INCLTDL will be prefixed with
+# '${top_srcdir}/' (note the single quotes!).  If your package is not
+# flat and you're not using automake, define top_builddir and
+# top_srcdir appropriately in the Makefiles.
+AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  case $enable_ltdl_convenience in
+  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+  "") enable_ltdl_convenience=yes
+      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+  esac
+  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
+  INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+])
+
+# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
+# the libltdl installable library and INCLTDL to the include flags for
+# the libltdl header and adds --enable-ltdl-install to the configure
+# arguments.  Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
+# AC_CONFIG_SUBDIRS called.  If DIR is not provided and an installed
+# libltdl is not found, it is assumed to be `libltdl'.  LIBLTDL will
+# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
+# with '${top_srcdir}/' (note the single quotes!).  If your package is
+# not flat and you're not using automake, define top_builddir and
+# top_srcdir appropriately in the Makefiles.
+# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
+AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  AC_CHECK_LIB(ltdl, main,
+  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
+  [if test x"$enable_ltdl_install" = xno; then
+     AC_MSG_WARN([libltdl not installed, but installation disabled])
+   else
+     enable_ltdl_install=yes
+   fi
+  ])
+  if test x"$enable_ltdl_install" = x"yes"; then
+    ac_configure_args="$ac_configure_args --enable-ltdl-install"
+    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
+    INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  else
+    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+    LIBLTDL="-lltdl"
+    INCLTDL=
+  fi
+])
+
+# old names
+AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
+AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
+AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
+AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
+AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
+
+# This is just to silence aclocal about the macro not being used
+ifelse([AC_DISABLE_FAST_INSTALL])
+
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/apache_gsoap.h b/mod_gsoap/mod_gsoap-0.6/apache_13/apache_gsoap.h
new file mode 100644
index 0000000..4640a86
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/apache_gsoap.h
@@ -0,0 +1,178 @@
+/** Interface between the apache http - server (http://httpd.apache.org) and the gsoap SOAP stack (http://www.cs.fsu.edu/~engelen/soap.html)  
+  * @file apache_gsoap.h
+  */
+#ifndef _APACHE_GSOAP_H_INCLUDED
+#define _APACHE_GSOAP_H_INCLUDED
+
+/*
+ * need to include httpd.h for request rec definition 
+ */
+#include <httpd.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+#define APACHE_GSOAP_INTERFACE_VERSION 6
+#define APACHE_HTTPSERVER_ENTRY_POINT "apache_init_soap_interface"
+
+    /*
+     * calls soap_serve inside shared library 
+     */
+    typedef SOAP_FMAC1 void (SOAP_FMAC2 * apache_soap_init_fn) (struct soap *,
+                                                                request_rec *);
+
+    /*
+     * calls soap_init inside shared library
+     */
+    typedef SOAP_FMAC1 int (SOAP_FMAC2 * apache_soap_serve_fn) (struct soap *,
+                                                                request_rec *);
+
+    /*
+     * calls soap_destroy inside shared library 
+     */
+    typedef SOAP_FMAC1 void (SOAP_FMAC2 *
+                             apache_soap_destroy_fn) (struct soap *,
+                                                      request_rec *);
+
+    /*
+     * calls soap_end inside shared library 
+     */
+    typedef SOAP_FMAC1 void (SOAP_FMAC2 * apache_soap_end_fn) (struct soap *,
+                                                               request_rec *);
+
+    /*
+     * calls soap_done inside shared library 
+     */
+    typedef SOAP_FMAC1 void (SOAP_FMAC2 * apache_soap_done_fn) (struct soap *,
+                                                                request_rec *);
+
+    typedef SOAP_FMAC1 int (SOAP_FMAC2 *
+                            apache_soap_register_plugin_fn) (struct soap *,
+                                                             int (*fcreate)
+                                                             (struct soap *,
+                                                              struct
+                                                              soap_plugin *,
+                                                              void *),
+                                                             void *arg,
+                                                             request_rec *);
+
+    typedef SOAP_FMAC1 void *SOAP_FMAC2(*apache_soap_lookup_plugin_fn) (struct
+                                                                        soap *,
+                                                                        const
+                                                                        char *,
+                                                                        request_rec
+                                                                        *);
+
+    /*
+     * the callbacks normally used in the apache_soap_interface 
+     */
+    SOAP_FMAC1 void SOAP_FMAC2 apache_soap_soap_destroy(struct soap *,
+                                                        request_rec * r);
+    SOAP_FMAC1 void SOAP_FMAC2 apache_default_soap_init(struct soap *soap,
+                                                        request_rec * r);
+    SOAP_FMAC1 int SOAP_FMAC2 apache_default_soap_serve(struct soap *soap,
+                                                        request_rec * r);
+    SOAP_FMAC1 void SOAP_FMAC2 apache_default_soap_end(struct soap *soap,
+                                                       request_rec * r);
+    SOAP_FMAC1 void SOAP_FMAC2 apache_default_soap_done(struct soap *soap,
+                                                        request_rec * r);
+    SOAP_FMAC1 int SOAP_FMAC2 apache_default_soap_register_plugin_arg(struct
+                                                                      soap *, int
+                                                                       (*fcreate)
+                                                                      (struct
+                                                                       soap *,
+                                                                       struct
+                                                                       soap_plugin
+                                                                       *,
+                                                                       void *),
+                                                                      void
+                                                                      *arg,
+                                                                      request_rec
+                                                                      * r);
+    SOAP_FMAC1 void *SOAP_FMAC2 apache_default_soap_lookup_plugin(struct soap
+                                                                  *soap, const char
+                                                                  *plugin,
+                                                                  request_rec *
+                                                                  r);
+
+    struct apache_soap_interface {
+        unsigned int len;       ///< length of this struct in bytes (for version control).
+        unsigned int interface_version;
+        apache_soap_init_fn fsoap_init;
+        apache_soap_serve_fn fsoap_serve;
+        apache_soap_destroy_fn fsoap_destroy;
+        apache_soap_end_fn fsoap_end;
+        apache_soap_done_fn fsoap_done;
+        apache_soap_register_plugin_fn fsoap_register_plugin_arg;
+        apache_soap_lookup_plugin_fn fsoap_lookup_plugin;
+        void *reserved;         ///< variable reserved for apache module, must not be changed by server shared library.
+        struct Namespace *namespaces;
+        void (*soap_serializeheader) (struct soap * soap);
+        int (*soap_putheader) (struct soap * soap);
+        int (*soap_getheader) (struct soap * soap);
+        void (*soap_fault) (struct soap * soap);
+        void (*soap_serializefault) (struct soap * soap);
+        int (*soap_putfault) (struct soap * soap);
+        int (*soap_getfault) (struct soap * soap);
+        const char **(*soap_faultcode) (struct soap * soap);
+        const char **(*soap_faultstring) (struct soap * soap);
+        const char **(*soap_faultdetail) (struct soap * soap);
+        void (*soap_markelement) (struct soap *, const void *, int);
+        int (*soap_putelement) (struct soap *, const void *, const char *, int,
+                                int);
+        void *(*soap_getelement) (struct soap *, int *);
+    };
+
+    typedef void (*apache_init_soap_interface_fn) (struct apache_soap_interface
+                                                   *, request_rec *);
+
+    /*
+     * exported shared library function called by mod_gsoap from within apache http server 
+     * * This function fills the members of the apache_soap_interface struct. 
+     */
+    SOAP_FMAC1 void SOAP_FMAC2 apache_init_soap_interface(struct
+                                                          apache_soap_interface
+                                                          *, request_rec * r);
+
+#define IMPLEMENT_GSOAP_SERVER() \
+static SOAP_FMAC1 void SOAP_FMAC2 apache_soap_soap_destroy(struct soap *soap, request_rec *r) {return soap_destroy(soap);}\
+static SOAP_FMAC1 void SOAP_FMAC2 apache_default_soap_init(struct soap *soap, request_rec *r) {return soap_init(soap);}\
+static SOAP_FMAC1 int SOAP_FMAC2 apache_default_soap_serve(struct soap *soap, request_rec *r) {return soap_serve(soap);}\
+static SOAP_FMAC1 void SOAP_FMAC2 apache_default_soap_end(struct soap *soap, request_rec *r) {return soap_end(soap);}\
+static SOAP_FMAC1 void SOAP_FMAC2 apache_default_soap_done(struct soap *soap, request_rec *r) {return soap_done(soap);}\
+static SOAP_FMAC1 int SOAP_FMAC2 apache_default_soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap *, struct soap_plugin *, void *), void *arg, request_rec *r){return soap_register_plugin_arg(soap, fcreate, arg);}\
+static SOAP_FMAC1 void* SOAP_FMAC2 apache_default_soap_lookup_plugin(struct soap *soap, const char *plugin, request_rec *r) {return soap_lookup_plugin(soap, plugin);}\
+void apache_init_soap_interface(struct apache_soap_interface *pInt, request_rec *r) {\
+ pInt->len = sizeof(struct apache_soap_interface);\
+ pInt->interface_version = APACHE_GSOAP_INTERFACE_VERSION;\
+ pInt->fsoap_init = apache_default_soap_init; \
+ pInt->fsoap_serve = apache_default_soap_serve;\
+ pInt->fsoap_destroy = apache_soap_soap_destroy;\
+ pInt->fsoap_end = apache_default_soap_end;\
+ pInt->fsoap_done = apache_default_soap_done;\
+ pInt->fsoap_register_plugin_arg = apache_default_soap_register_plugin_arg;\
+ pInt->fsoap_lookup_plugin = apache_default_soap_lookup_plugin;\
+ pInt->reserved = 0;\
+ pInt->namespaces = namespaces;\
+ pInt->soap_serializeheader = soap_serializeheader;\
+ pInt->soap_putheader = soap_putheader;\
+ pInt->soap_getheader = soap_getheader;\
+ pInt->soap_fault = soap_fault;\
+ pInt->soap_serializefault = soap_serializefault;\
+ pInt->soap_putfault = soap_putfault;\
+ pInt->soap_getfault = soap_getfault;\
+ pInt->soap_faultcode = soap_faultcode;\
+ pInt->soap_faultstring = soap_faultstring;\
+ pInt->soap_faultdetail = soap_faultdetail;\
+ pInt->soap_markelement = soap_markelement;\
+ pInt->soap_getelement = soap_getelement;\
+ pInt->soap_putelement = soap_putelement;\
+}
+
+#ifdef __cplusplus
+}
+#endif                          //__cplusplus
+#endif                          //_APACHE_GSOAP_H_INCLUDED
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/apache_index.html b/mod_gsoap/mod_gsoap-0.6/apache_13/apache_index.html
new file mode 100644
index 0000000..8afbbb7
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/apache_index.html
@@ -0,0 +1,325 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">

+<HTML>

+<HEAD>

+	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-15">

+	<TITLE>mod_gsoap - Apache HTTP Server SOAP loadable module for .net Se</TITLE>

+	<META NAME="GENERATOR" CONTENT="Microsoft FrontPage 4.0">

+	<META NAME="CREATED" CONTENT="20010518;23082600">

+	<META NAME="CHANGEDBY" CONTENT=" ">

+	<META NAME="CHANGED" CONTENT="20020920;1270700">

+	<META NAME="DESCRIPTION" CONTENT="SOAP module for Apache HTTP-Server to run SOAP and .NET(tm) Services under linux">

+	<META NAME="KEYWORDS" CONTENT="mod_gsoap, gsoap, apache, HTTP, Server, Apache HTTP Server, .NET, .NET for linux, open source">

+</HEAD>

+<BODY>

+<H1 ALIGN=CENTER><FONT FACE="Veranda">SOAP and .net services for

+Apache HTTP Server</FONT></H1>

+<P ALIGN=CENTER>This is an open source contribution for <A HREF="http://www.cs.fsu.edu/~engelen/soap.html">gsoap</A>,

+to enable <A HREF="http://www.apache.org/httpd">Apache HTTP Server</A>

+to run <A HREF="http://www.w3.org/TR/SOAP/">SOAP</A> and .net

+services on Linux and other Unices. 

+</P>

+<H1>Overview</H1>

+<P>To build and configure the mod_gsoap SOAP service you have to do

+three main parts: 

+</P>

+<OL>

+	<LI><P>Build mod_gsoap, which is a SOAP server independent generic

+	module to allow gsoap shared libraries to be plugged into Apache

+	HTTP Server. It contains the infrastructure to dynamically load the

+	required gsoap servers at runtime, and the additional required

+	shared libraries not statically linked into apache server. mod_gsoap

+	passes the SOAP requests received from the clients, and calls into

+	the SOAP server shared libraries and returns the response to the

+	clients.</P>

+	<LI><P>Build one or more gsoap shared libraries that implement the

+	SOAP services. As a sample a simple calculator was used.

+	Implementing other SOAP servers is straight forward. Please see

+	<A HREF="http://www.cs.fsu.edu/~engelen/soap.html">gsoap</A> for

+	details of how to use soapcpp2 to generate the wsdl , the C++ and

+	the other related code for your own SOAP services. 

+	</P>

+	<LI><P>The configuration instructions for the apache http server in

+	httpd.conf. This specifies which shared libraries are allowed to be

+	loaded into the apache server process and where they reside.</P>

+</OL>

+<P>The build process uses <FONT FACE="Veranda"><A HREF="http://www.gnu.org/software/autmake">Automake</A>

+</FONT>. Inside that mod_gsoap.so is built in the standard Apache way

+using apxs. <FONT FACE="Veranda">Please do not be shocked about the

+long description that follows. It is rather detailled, users

+acquainted with apache http server will skip most of it.</FONT></P>

+<H1><FONT FACE="Veranda">1. Building the Apache SOAP server</FONT></H1>

+<P><FONT FACE="Veranda">In order to reduce download times you must

+download and unpack the required standard packages like apache server

+separately from their original locations. For building I used libtool

+1.4 downloaded from <A HREF="http://www.gnu.org/software/libtool">http://www.gnu.org/software/libtool</A>,

+be sure to have it installed. Also be sure that you have apxs, which

+comes with the apache http server distribution, in your path. </FONT>

+</P>

+<H2>Build instructions</H2>

+<UL>

+	<LI><P>Make sure that apache http server is installed, otherwise <FONT FACE="Veranda">download

+      build and install apache_1.3.26.tar.gz or higher

+	(not 2.0.* or higher) from </FONT><A HREF="http://www.apache.org/httpd"><FONT FACE="Veranda">http://www.apache.org/httpd<br>

+      </FONT></A><font face="Veranda">This will also install apxs, the apache

+      build tool that is required to compile mod_gsoap as a module. Also check the first line of

+	apxs, so that it really points to your perl executable.</font>

+	</P>

+	<LI><P><FONT FACE="Veranda">download and install gsoap from <A HREF="http://www.cs.fsu.edu/~engelen/soap.html">http://www.cs.fsu.edu/~engelen/soap.html</A></FONT>

+	</P>

+	<LI><P><FONT FACE="Veranda">download the current gsoap_apache_0.0.5.tgz from

+	<A HREF="http://www.webware.at/SOAP/apache_gsoap.0.0.5.tgz">http://www.webware.at/SOAP/apache_gsoap.0.0.5.tgz</A>

+      </FONT>to <FONT FACE="Veranda">/usr/local/src and unpack it with:<br>

+      </FONT><font face="Courier New">tar -xzf apache_gsoap.0.0.5.tgz&nbsp;</font></P>

+	<LI><P>change to the directory that has been created by the step above and

+      run the following:<br>

+      <font face="Courier New">./configure&nbsp;<br>

+      make<BR></font><font face="Courier, monospace"><BR></font><FONT FACE="Veranda">This should build

+      ./mod_gsoap/mod_gsoap.so and ./example/calculator/.libs/libCalculator.so (the

+	.libs subdirectory is hidden). lib</FONT>Calculator.so is a shared

+	library that contains the gsoap server generated with soapcpp2. You

+	can use it as a template for your own servers. See later. This build step

+      also copies mod_gsoap.so to the location of your other apache

+	modules (e.g. /usr/local/apache/libexec).</P>

+</UL>

+<H2>Building a debugging version</H2>

+<P>The steps above are enough for running the release version. If you

+want to do debugging for mod_gsoap.c and/or your servers, you must

+enable debugging code. This is described in this paragraph. Skip it

+if you do not need debugging. 

+</P>

+<P>You can enable debugging for mod_gsoap.c by using

+--enable-debug<BR><FONT FACE="Courier, monospace">./configure

+--enable-debug</FONT></P>

+<P>Debugging is easier when you link mod_gsoap.c statically into

+httpd, the Apache Server.</P>

+<P>For that to the following: <BR>Copy the whole mod_gsoap

+subdirectory to <FONT FACE="Veranda">~/apache_1.3.26</FONT>/src/modules/<BR>Next

+Edit the Configuration file (it is located in ~/apache/src).<BR>Add

+the following lines:<BR><SPAN STYLE="font-weight: medium"><FONT SIZE=3><FONT FACE="Courier, monospace">#

+goap SOAP extension module. <BR>AddModule

+modules/mod_gsoap/mod_gsoap.o </FONT></FONT></SPAN>

+</P>

+<UL>

+	<LI><P><FONT FACE="Times, serif">in the same file locate in the

+	section Makefile configuration the line containing EXTRA_LIBS and

+	add change the lines to the following:

+	<BR></FONT><FONT SIZE=3><FONT FACE="Courier, monospace">EXTRA_CFLAGS=-g<BR>EXTRA_LDFLAGS=<BR>EXTRA_LIBS=-ldl

+	-lpthread<BR>EXTRA_INCLUDES=-I~/apache_gsoap.0.0.5</FONT></FONT></P>

+      <P><font size="3">See the sample Configuration file that is in the

+      downloaded sources for an example.</font></P>

+	<P><FONT FACE="Times, serif">There is also a config directory below

+	mod_gsoap, which contains sample files edited in the way described

+	here, where you can compare your changes.</FONT></P>

+</UL>

+<UL>

+	<LI><P><FONT FACE="Times, serif">Run the src/Configure script:</FONT><FONT FACE="Courier, monospace"><BR>cd

+	~/apache-1.3.26/src<BR>./Configure<BR><BR></FONT><FONT FACE="Times, serif">This

+	will build the Makefile for the server itself.<BR><FONT SIZE=2>Note:

+	do not run ~./apache-1.3.26/configure after it, this will overwrite

+	the Makefiles generated above. </FONT></FONT>

+	</P>

+</UL>

+<UL>

+	<LI><P><FONT FACE="Times, serif">Build the Apache Server, together

+	with the mod_gsoap by running in the current ~/apache_1.3.26/src

+	directory:<FONT FACE="Courier, monospace"><BR>make</FONT></FONT></P>

+</UL>

+<UL>

+	<LI><P><FONT FACE="Courier, monospace"><FONT FACE="Times, serif">The

+	previous step should have produced the file httpd<BR>Check that the

+	mod_gsoap has really been linked correctly by running:</FONT><BR>./httpd

+	-l<BR><FONT FACE="Times, serif">This should list as a module among

+	others also mod_gsoap.c and mod_so.c</FONT></FONT></P>

+</UL>

+<UL>

+	<LI><P><FONT FACE="Courier, monospace"><FONT FACE="Times, serif">In

+	the next step we install apache to a directory of its own by running

+	the standard apache install command from the ~/apache_1.3.26

+	directory. Before doing so, read the README.configure file in the

+	apache distribution. After you know what you are doing, run the

+	following command from ~/apache_1.3.26: </FONT><BR>make install<BR><FONT FACE="Times, serif">This

+	will generate the apache server in the directory you specified (or

+	usually /usr/local/apache if you did not do so). This step will also

+	generate the httpd.conf file that we need for debugging. You can of

+	course omit this step, if was only done to easily get a working

+	apache distribution on your machine, and a httpd.conf file that we

+	must change in the next steps. If you already have a working

+	installation, you can use that. </FONT></FONT>

+	</P>

+</UL>

+<H2><BR><BR>

+<FONT SIZE=6>2. Implementing your

+own Servers</FONT>

+</H2>

+<P>In my opinion it is not a good idea to start off with gsoap server

+programming by using this apache module. Before doing so (and

+especially before sending questions) please go to the <A HREF="http://www.cs.fsu.edu/~engelen/soap.html">gsoap

+home page</A> and look at the very good and detailled examples and

+documentation there. Implement your server as a standalone server and

+test it. Once that works, you can easily convert it to run with

+mod_gsoap. How to convert your server to support mod_gsoap is

+described below in this chapter.</P>

+<P>The only additional thing you must do to enable your own gsoap

+Server to be able to plug into Apache HTTP server is to add the lines

+below to your source code and build them as shared libraries. Then

+the required entry points will be exported. 

+</P>

+<P>Add the following 2 lines to your SOAP server source code:

+<BR><FONT FACE="Courier, monospace">#include

+&quot;apache_gsoap.h&quot;<BR>IMPLEMENT_GSOAP_SERVER()</FONT></P>

+<P><FONT SIZE=3><FONT FACE="Times, serif">You also must change

+Make</FONT></FONT>file.am accordingly to add your source files and

+rename and run autoconf, automake, ./configure again of course.

+apache_gsoap.h came with the <FONT FACE="Veranda">gsoap_apache_*.tgz

+that you downloaded above and will be in the include path of the

+compiler.</FONT></P>

+<P>There is also a ConsoleServer subproject, that allows you to build

+and test your own gsoap server shared libraries indepent of Apache

+server. It is recommended to test your servers with this soaptest

+program before you try to use it in Apache Server. Change the search

+path for the library and the name of the library near the top of the

+file ConsoleServer.cpp for testing. Another subdirectory foo is there

+for testing, if you still get file not found errors in the attempt to

+load a shared library. foo does not depend on other libraries and

+will load also if your path is not correct. Of course it will not

+work as a soap server, it is only there to get your directory

+settings correct.</P>

+<P ALIGN=LEFT>If you want to have a graphical development environment

+you can use <A HREF="http://www.kdevelop.org/">kdevelop</A>. See

+below how to use that. But also working with emacs and kdbg is fine.

+For implementing your own SOAP servers please download the standard

+<A HREF="http://www.cs.fsu.edu/~engelen/soap.html">gsoap</A> package

+and follow the instructions there. The servers we use are separated

+into a shared library of its own, to allow the apache server to load

+them on demand.</P>

+<P><FONT FACE="Lucida, sans-serif"><FONT SIZE=6><B>3. Configuration

+of httpd.conf</B></FONT></FONT></P>

+<P><FONT FACE="Times, serif"><FONT SIZE=3>Now after the binaries are

+built, it is necessary to tell Apache server where to find the

+libraries to answer the soap requests coming in. Locate the

+httpd.conf file that is in use on your installation (e.g.

+~/apache-1.3.26/conf/httpd.conf or /usr/local/apache/conf/httpd.conf)

+and make your changes.</FONT></FONT></P>

+<UL>

+	<LI><P><FONT FACE="Times, serif">httpd.conf file must be edited.

+	<BR>This file will also be used to explicitly start debugging of the

+	apache server process httpd and step into mod_gsoap with e.g. <A HREF="http://members.nextra.at/johsixt/kdbg.html">kdbg</A>

+	debugger. The same file is used when you run apache as a daemon.

+	This procedure is identical to what is described in the example

+	module README in the standard Apache distribution, only with

+	different names. As a first step you must tell apache to load

+	mod_gsoap. Add the line:<BR><FONT FACE="Courier, monospace">LoadModule

+	gsoap_module libexec/mod_gsoap.so</FONT><BR>below the place where

+	the comment: <BR><FONT FACE="Courier, monospace"># Dynamic Shared

+	Object (DSO) Support</FONT><BR>is located (libexec/mod_gsoap.so is

+	the place where shared modules are installed as a default, see other

+	existing commented LoadModule instructions in your httpd.conf file

+	as examples). gsoap_module is the module name hardcoded in

+	mod_gsoap.c <BR>Next add the following lines to httpd.conf, near the

+	other &lt;Location&gt; sections:<BR><FONT FACE="Courier, monospace">#

+	SOAP handler (see </FONT><A HREF="http://www.aberger.at/SOAP"><FONT FACE="Courier, monospace">http://www.aberger.at/SOAP</FONT></A><FONT FACE="Courier, monospace">)<BR>&lt;IfModule

+	mod_gsoap.c&gt;<BR>&lt;Location /soap&gt;<BR>SetHandler

+	gsoap-handler<BR>SOAPLibrary /home/myusername/gsoap</FONT></FONT><font face="Courier, monospace">.0.0.5</font><FONT FACE="Times, serif"><FONT FACE="Courier, monospace">/apache/example/calculator/.libs/libCalculator.so<BR>&lt;/Location&gt;<BR>&lt;/IfModule&gt;</FONT><BR><FONT SIZE=3>You

+	can paste the lines above from the sample file in config

+	subdirectory. Of course you must change myusername to your login

+	name, as above, so that the string /home/myusername above

+	corresponds to your home directory. Do not use ~ for your home

+	directory here. This will not be resolved by dlopen()! <BR>The

+	isoap-handler knows 2 configuration directives:<BR><B><U>SOAPLibrary</U></B>

+	is the full path to the library that contains your SOAP server

+	shared library, with the mandatory exported function as defined in

+	the include file apache_gsoap.h. It tells the extension what shared

+	object library to load to serve the SOAP requests for this location

+	at runtime. You must change the path of course to the full path of

+	your server. It is better to specifiy the full path, and not to use

+	the LD_LIBRARY_PATH due to security reasons.<BR><B><U><SPAN STYLE="font-style: normal">SupportLibrary</SPAN></U></B>

+	are all the libraries needed additionally by your Soap server shared

+	library. They are dynamically loaded into the apache server process

+	httpd when this instruction is encountered. Otherwise it would be

+	necessary to statically link these libraries and rebuild httpd and

+	mod_gsoap every time you change something. This was not the desired

+	goal.</FONT></FONT></P>

+	<LI><P><FONT FACE="Times, serif">Now test if the Apache Server

+	itself is correctly configured, run the following from your

+	~/apache-1.3.26/src directory:<BR><FONT FACE="Courier, monospace">./httpd

+	-X -f /usr/local/apache/conf/httpd.conf</FONT></FONT></P>

+	<LI><P><FONT FACE="Times, serif">This will launch the server in

+	console mode (does not return until you cancel it). Then open your

+	favourite Web Browser and browse to:<BR><A HREF="http://127.0.0.1:8080/soap?structures"><FONT FACE="Courier, monospace">http://127.0.0.1:8080<BR></FONT></A>This

+	should give astandard apache response, has nothing to do with your

+	mod_gsoap yet. The port 8080 was also set in httpd.conf, if you

+	don't get a response, check the port and see the error_log file. For

+	the production server it maybe will be port 80, which you do not

+	need to specify explicitly in the browser then. But for debugging I

+	recommend to stay with port 8080, because for port 80 you would need

+	root priviledges for debugging.<BR>This request should give a

+	response from apache.</FONT></P>

+	<LI><P><FONT FACE="Times, serif">As a next step let us test if your

+	mod_gsoap responds. The request must contain the location you gave

+	in the &lt;Location&gt; directive. <FONT FACE="Times, serif">Enter

+	as address in your browser:</FONT><BR><A HREF="http://127.0.0.1:8080/soap">http://127.0.0.1:8080/soap<BR></A>This

+	should give a response from mod_gsoap, an error message, because

+	your browser will propably not send the required SOAPAction header.

+	Something is wrong if you get an url not found or a directory

+	listing as a response. In that case check if you really added the

+	LoadModule instruction described above properly. <BR>Note: the soap

+	virtual directory was defined by yourself in the &lt;Location&gt;

+	instruction above. Do <B><U>not</U></B> create a physical soap

+	directory in your document root !</FONT></P>

+	<LI><P><FONT FACE="Times, serif">Well, now it is time to check if

+	Apache Server can answer your SOAP requests. Run the calculator

+	client demo program. It has been built by the makefile already.

+	Enter the following:<BR></FONT><FONT FACE="Courier, monospace">cd

+	~/apache-gsoap/example/calculator<BR>./client 1 + 2</FONT><BR>This

+	should answer the SOAP requests like the gsoap web service does, but

+	of course with all the quality, speed, scalability, stability etc.

+	of the world's most popular http server.</P>

+</UL>

+<H1>Programming and Debugging Tips</H1>

+<H2>Lookup the error log file of Apache Server</H2>

+<P>mod_gsoap logs apache errors in the standard way. So see the

+apache log file, typically it is located at

+/usr/local/apache/logs/apache_log.</P>

+<H3>Be sure you Debug the correct process</H3>

+<P>Sometimes when you exit the debugger it can happen that the httpd

+process is still alive. So before you continue, it might be a good

+idea to run<BR>ps -ef | grep httpd<BR>to see if there is still a

+server alive, which should be killed before the next debugging

+session. For killing all active httpd processes I use:<BR><FONT FACE="Courier, monospace">kill

+`ps -ef | grep httpd | sed -e&quot;s/\ * /:/g&quot; | cut -f2 -d:`</FONT>

+</P>

+<P>You do not debug the process /usr/local/apache/bin/httpd, but the

+httpd program that you build in your source code directory

+~/apache/src. The key to successful debugging is the -X flag. So in

+your debugger run httpd from ~/apache/src, but use the same

+configuration file as your production server will use. Use the

+following commandline to start debugging:<BR><FONT FACE="Courier, monospace">./httpd

+-X -f /usr/local/apache/conf/httpd.conf</FONT></P>

+<P><FONT FACE="Times, serif">When the process is started in the

+debugger, set your breakpoints and use your favourite browser and

+refresh the page <A HREF="http://127.0.0.1:8080/soap">http://127.0.0.1:8080/soap</A>.

+</FONT>

+</P>

+<P>&nbsp; 

+</P>

+<P><FONT FACE="Times, serif">See also the Frequently asked Questions

+at the end of&nbsp; the <A HREF="iis_index.html">IIS description</A>.</FONT>

+</P>

+<H2>How to use kdevelop for Programming and Debugging of Apache

+modules 

+</H2>

+<P>If you want to use <A HREF="http://www.kdevelop.org/"><FONT FACE="Times, serif">kdevelop</FONT></A><FONT FACE="Times, serif">

+to debug Apache then you can change to the directory ~/apache/src and

+run:<BR></FONT><FONT FACE="Courier, monospace">kimport &gt;

+apache.kdevprj</FONT></P>

+<P>After that you can open apache.kdevprj as a kdevelop project. Use

+the appropriate dialogs in your debugging environment to set the

+commandline arguments for debugging. <BR><BR><BR>

+</P>

+<P>I hope you will have fun with this. 

+</P>

+<P>Enjoy, 

+</P>

+<P><A HREF="http://www.webware.at/">Christian Aberger</A>.</P>

+</BODY>

+</HTML>

diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/config.guess b/mod_gsoap/mod_gsoap-0.6/apache_13/config.guess
new file mode 100755
index 0000000..6ead80a
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/config.guess
@@ -0,0 +1,1327 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+#   Free Software Foundation, Inc.
+
+timestamp='2001-08-21'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Written by Per Bothner <bothner@cygnus.com>.
+# Please send patches to <config-patches@gnu.org>.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+
+dummy=dummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script.
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int dummy(){}" > $dummy.c ;
+	for c in cc gcc c89 ; do
+	  ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
+	  if test $? = 0 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	rm -f $dummy.c $dummy.o $dummy.rel ;
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found ;
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case "${UNAME_MACHINE}" in
+    i?86)
+	test -z "$VENDOR" && VENDOR=pc
+	;;
+    *)
+	test -z "$VENDOR" && VENDOR=unknown
+	;;
+esac
+test -f /etc/SuSE-release && VENDOR=suse
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# Netbsd (nbsd) targets should (where applicable) match one or
+	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	# Determine the machine/vendor (is the vendor relevant).
+	case "${UNAME_MACHINE}" in
+	    amiga) machine=m68k-unknown ;;
+	    arm32) machine=arm-unknown ;;
+	    atari*) machine=m68k-atari ;;
+	    sun3*) machine=m68k-sun ;;
+	    mac68k) machine=m68k-apple ;;
+	    macppc) machine=powerpc-apple ;;
+	    hp3[0-9][05]) machine=m68k-hp ;;
+	    ibmrt|romp-ibm) machine=romp-ibm ;;
+	    *) machine=${UNAME_MACHINE}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE}" in
+	    i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep __ELF__ >/dev/null
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+	        os=netbsd
+		;;
+	esac
+	# The OS release
+	release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit 0 ;;
+    alpha:OSF1:*:*)
+	if test $UNAME_RELEASE = "V4.0"; then
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+	fi
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	cat <<EOF >$dummy.s
+	.data
+\$Lformat:
+	.byte 37,100,45,37,120,10,0	# "%d-%x\n"
+
+	.text
+	.globl main
+	.align 4
+	.ent main
+main:
+	.frame \$30,16,\$26,0
+	ldgp \$29,0(\$27)
+	.prologue 1
+	.long 0x47e03d80 # implver \$0
+	lda \$2,-1
+	.long 0x47e20c21 # amask \$2,\$1
+	lda \$16,\$Lformat
+	mov \$0,\$17
+	not \$1,\$18
+	jsr \$26,printf
+	ldgp \$29,0(\$26)
+	mov 0,\$16
+	jsr \$26,exit
+	.end main
+EOF
+	eval $set_cc_for_build
+	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+	if test "$?" = 0 ; then
+		case `./$dummy` in
+			0-0)
+				UNAME_MACHINE="alpha"
+				;;
+			1-0)
+				UNAME_MACHINE="alphaev5"
+				;;
+			1-1)
+				UNAME_MACHINE="alphaev56"
+				;;
+			1-101)
+				UNAME_MACHINE="alphapca56"
+				;;
+			2-303)
+				UNAME_MACHINE="alphaev6"
+				;;
+			2-307)
+				UNAME_MACHINE="alphaev67"
+				;;
+			2-1307)
+				UNAME_MACHINE="alphaev68"
+				;;
+		esac
+	fi
+	rm -f $dummy.s $dummy
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	exit 0 ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit 0 ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit 0 ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-unknown-sysv4
+	exit 0;;
+    amiga:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit 0 ;;
+    arc64:OpenBSD:*:*)
+	echo mips64el-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    arc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    hkmips:OpenBSD:*:*)
+	echo mips-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    pmax:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sgi:OpenBSD:*:*)
+	echo mips-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    wgrisc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit 0 ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit 0;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit 0;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit 0 ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit 0 ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    i86pc:SunOS:5.*:*)
+	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit 0 ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit 0 ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit 0 ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit 0 ;;
+    sparc*:NetBSD:*)
+	echo `uname -p`-unknown-netbsd${UNAME_RELEASE}
+	exit 0 ;;
+    atari*:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit 0 ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit 0 ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit 0 ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit 0 ;;
+    sun3*:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mac68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvme68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvme88k:OpenBSD:*:*)
+	echo m88k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit 0 ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit 0 ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit 0 ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit 0 ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit 0 ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	eval $set_cc_for_build
+	$CC_FOR_BUILD $dummy.c -o $dummy \
+	  && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+	  && rm -f $dummy.c $dummy && exit 0
+	rm -f $dummy.c $dummy
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit 0 ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit 0 ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit 0 ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit 0 ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit 0 ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit 0 ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+ 	exit 0 ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit 0 ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit 0 ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit 0 ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit 0 ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit 0 ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
+	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit 0 ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit 0 ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		eval $set_cc_for_build
+		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
+		rm -f $dummy.c $dummy
+		echo rs6000-ibm-aix3.2.5
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit 0 ;;
+    *:AIX:*:[45])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit 0 ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit 0 ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit 0 ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit 0 ;;                           # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit 0 ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit 0 ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit 0 ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit 0 ;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+              case "${HPUX_REV}" in
+                11.[0-9][0-9])
+                  if [ -x /usr/bin/getconf ]; then
+                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+                        esac ;;
+                    esac
+                  fi ;;
+              esac
+              if [ "${HP_ARCH}" = "" ]; then
+              sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+              	{
+              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+              	case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+              	    switch (bits)
+              		{
+              		case 64: puts ("hppa2.0w"); break;
+              		case 32: puts ("hppa2.0n"); break;
+              		default: puts ("hppa2.0"); break;
+              		} break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+              	    puts ("hppa2.0"); break;
+              #endif
+              	default: puts ("hppa1.0"); break;
+              	}
+                  exit (0);
+              }
+EOF
+	eval $set_cc_for_build
+	(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
+	if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
+	rm -f $dummy.c $dummy
+	fi ;;
+	esac
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit 0 ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit 0 ;;
+    3050*:HI-UX:*:*)
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	eval $set_cc_for_build
+	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
+	rm -f $dummy.c $dummy
+	echo unknown-hitachi-hiuxwe2
+	exit 0 ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit 0 ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit 0 ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit 0 ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit 0 ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit 0 ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-unknown-osf1
+	fi
+	exit 0 ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit 0 ;;
+    hppa*:OpenBSD:*:*)
+	echo hppa-unknown-openbsd
+	exit 0 ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+        exit 0 ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+        exit 0 ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+        exit 0 ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+        exit 0 ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+        exit 0 ;;
+    CRAY*X-MP:*:*:*)
+	echo xmp-cray-unicos
+        exit 0 ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*[A-Z]90:*:*:*)
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*TS:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*T3D:*:*:*)
+	echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*T3E:*:*:*)
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY-2:*:*:*)
+	echo cray2-cray-unicos
+        exit 0 ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit 0 ;;
+    hp300:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    *:FreeBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit 0 ;;
+    *:OpenBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+	exit 0 ;;
+    i*:CYGWIN*:*)
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit 0 ;;
+    i*:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit 0 ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit 0 ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i386-pc-interix
+	exit 0 ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit 0 ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-unknown-cygwin
+	exit 0 ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    *:GNU:*:*)
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit 0 ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit 0 ;;
+    arm*:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux
+	exit 0 ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux
+	exit 0 ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux
+	exit 0 ;;
+    mips:Linux:*:*)
+	case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
+	  big)    echo mips-${VENDOR}-linux && exit 0 ;;
+	  little) echo mipsel-${VENDOR}-linux && exit 0 ;;
+	esac
+	case `sed -n '/^system type/s/^.*: \([^ ]*\).*/\1/p' < /proc/cpuinfo` in
+	  SGI|sgi)    echo mips-${VENDOR}-linux-gnu && exit 0 ;;
+	esac
+	;;
+    ppc:Linux:*:*|ppc64:Linux:*:*)
+	echo powerpc-${VENDOR}-linux
+	exit 0 ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
+	exit 0 ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-${VENDOR}-linux${LIBC}
+	exit 0 ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-${VENDOR}-linux ;;
+	  PA8*) echo hppa2.0-${VENDOR}-linux ;;
+	  *)    echo hppa-${VENDOR}-linux ;;
+	esac
+	exit 0 ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-${VENDOR}-linux
+	exit 0 ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux
+	exit 0 ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux
+	exit 0 ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux
+	exit 0 ;;
+    x86_64:Linux:*:*)
+	echo x86_64-${VENDOR}-linux
+	exit 0 ;;
+    i*86:Linux:*:*)
+	# The BFD linker knows what the default object file format is, so
+	# first see if it will tell us. cd to the root directory to prevent
+	# problems with other programs or directories called `ld' in the path.
+	ld_supported_targets=`cd /; ld --help 2>&1 \
+			 | sed -ne '/supported targets:/!d
+				    s/[ 	][ 	]*/ /g
+				    s/.*supported targets: *//
+				    s/ .*//
+				    p'`
+        case "$ld_supported_targets" in
+	  elf32-i386)
+		TENTATIVE="${UNAME_MACHINE}-${VENDOR}-linux"
+		;;
+	  a.out-i386-linux)
+		echo "${UNAME_MACHINE}-${VENDOR}-linuxaout"
+		exit 0 ;;		
+	  coff-i386)
+		echo "${UNAME_MACHINE}-${VENDOR}-linuxcoff"
+		exit 0 ;;
+	  "")
+		# Either a pre-BFD a.out linker (linuxoldld) or
+		# one that does not give us useful --help.
+		echo "${UNAME_MACHINE}-${VENDOR}-linuxoldld"
+		exit 0 ;;
+	esac
+	# Determine whether the default compiler is a.out or elf
+	cat >$dummy.c <<EOF
+#include <features.h>
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+#ifdef __ELF__
+# ifdef __GLIBC__
+#  if __GLIBC__ >= 2
+    printf ("%s-${VENDOR}-linux\n", argv[1]);
+#  else
+    printf ("%s-${VENDOR}-linuxlibc1\n", argv[1]);
+#  endif
+# else
+   printf ("%s-${VENDOR}-linuxlibc1\n", argv[1]);
+# endif
+#else
+  printf ("%s-${VENDOR}-linuxaout\n", argv[1]);
+#endif
+  return 0;
+}
+EOF
+	eval $set_cc_for_build
+	$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
+	rm -f $dummy.c $dummy
+	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+	;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit 0 ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit 0 ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit 0 ;;
+    i*86:*:5:[78]*)
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit 0 ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit 0 ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit 0 ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+	echo i386-pc-msdosdjgpp
+        exit 0 ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit 0 ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit 0 ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit 0 ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit 0 ;;
+    M68*:*:R3V[567]*:*)
+	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && echo i486-ncr-sysv4 && exit 0 ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit 0 ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit 0 ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit 0 ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit 0 ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit 0 ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel@ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit 0 ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes@openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit 0 ;;
+    *:*:*:FTX*)
+	# From seanf@swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit 0 ;;
+    *:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	echo hppa1.1-stratus-vos
+	exit 0 ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit 0 ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit 0 ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+	        echo mips-nec-sysv${UNAME_RELEASE}
+	else
+	        echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+        exit 0 ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit 0 ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit 0 ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit 0 ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit 0 ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit 0 ;;
+    *:Darwin:*:*)
+	echo `uname -p`-apple-darwin${UNAME_RELEASE}
+	exit 0 ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	if test "${UNAME_MACHINE}" = "x86pc"; then
+		UNAME_MACHINE=pc
+	fi
+	echo `uname -p`-${UNAME_MACHINE}-nto-qnx
+	exit 0 ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit 0 ;;
+    NSR-[KW]:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit 0 ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit 0 ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit 0 ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit 0 ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit 0 ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit 0 ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit 0 ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit 0 ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit 0 ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit 0 ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit 0 ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit 0 ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+	  ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+	printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+	printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+eval $set_cc_for_build
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
+rm -f $dummy.c $dummy
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+	echo c1-convex-bsd
+	exit 0 ;;
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit 0 ;;
+    c34*)
+	echo c34-convex-bsd
+	exit 0 ;;
+    c38*)
+	echo c38-convex-bsd
+	exit 0 ;;
+    c4*)
+	echo c4-convex-bsd
+	exit 0 ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+    ftp://ftp.gnu.org/pub/gnu/config/
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/config.h b/mod_gsoap/mod_gsoap-0.6/apache_13/config.h
new file mode 100755
index 0000000..01cbfca
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/config.h
@@ -0,0 +1,80 @@
+/* config.h.  Generated automatically by configure.  */
+/* config.h.in.  Generated automatically from configure.in by autoheader.  */
+
+/* Define if you have the <arpa/inet.h> header file. */
+#define HAVE_ARPA_INET_H 1
+
+/* Define if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define if you have the `getcwd' function. */
+#define HAVE_GETCWD 1
+
+/* Define if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define if you have the <ltdl.h> header file. */
+#define HAVE_LTDL_H 1
+
+/* Define if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define if you have the `memset' function. */
+#define HAVE_MEMSET 1
+
+/* Define if you have the <netdb.h> header file. */
+#define HAVE_NETDB_H 1
+
+/* Define if you have the <netinet/in.h> header file. */
+#define HAVE_NETINET_IN_H 1
+
+/* Define if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define if you have the <stdsoap2.h> header file. */
+#define HAVE_STDSOAP2_H 1
+
+/* Define if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define if you have the <sys/ioctl.h> header file. */
+#define HAVE_SYS_IOCTL_H 1
+
+/* Define if you have the <sys/socket.h> header file. */
+#define HAVE_SYS_SOCKET_H 1
+
+/* Define if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Name of package */
+#define PACKAGE "mod_gsoap"
+
+/* Define if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+#define VERSION "0.0.5"
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+/* #undef size_t */
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/config.h.in b/mod_gsoap/mod_gsoap-0.6/apache_13/config.h.in
new file mode 100755
index 0000000..6b5b97d
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/config.h.in
@@ -0,0 +1,79 @@
+/* config.h.in.  Generated automatically from configure.in by autoheader.  */
+
+/* Define if you have the <arpa/inet.h> header file. */
+#undef HAVE_ARPA_INET_H
+
+/* Define if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define if you have the <errno.h> header file. */
+#undef HAVE_ERRNO_H
+
+/* Define if you have the `getcwd' function. */
+#undef HAVE_GETCWD
+
+/* Define if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define if you have the <ltdl.h> header file. */
+#undef HAVE_LTDL_H
+
+/* Define if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define if you have the `memset' function. */
+#undef HAVE_MEMSET
+
+/* Define if you have the <netdb.h> header file. */
+#undef HAVE_NETDB_H
+
+/* Define if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
+
+/* Define if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define if you have the <stdsoap2.h> header file. */
+#undef HAVE_STDSOAP2_H
+
+/* Define if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define if you have the <sys/ioctl.h> header file. */
+#undef HAVE_SYS_IOCTL_H
+
+/* Define if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
+/* Define if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+#undef size_t
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/config.log b/mod_gsoap/mod_gsoap-0.6/apache_13/config.log
new file mode 100755
index 0000000..4d26f88
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/config.log
@@ -0,0 +1,680 @@
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by configure, which was
+generated by GNU Autoconf 2.52.  Invocation command line was
+
+  $ ./configure 
+
+## ---------- ##
+## Platform.  ##
+## ---------- ##
+
+hostname = redux
+uname -m = i686
+uname -r = 2.4.18-4GB
+uname -s = Linux
+uname -v = #1 Wed Mar 27 13:57:05 UTC 2002
+
+/usr/bin/uname -p = unknown
+/bin/uname -X     = unknown
+
+/bin/arch              = i686
+/usr/bin/arch -k       = unknown
+/usr/convex/getsysinfo = unknown
+hostinfo               = unknown
+/bin/machine           = unknown
+/usr/bin/oslevel       = unknown
+/bin/universe          = unknown
+
+PATH = /home/aberger/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/opt/kde2/bin:/opt/kde/bin:/usr/openwin/bin:/usr/lib/SmallEiffel/bin:/usr/lib/java/bin:/opt/gnome/bin:/usr/lib/qt-2.1.1/bin:/usr/local/apache/bin:/usr/local/apache/bin
+
+## ------------ ##
+## Core tests.  ##
+## ------------ ##
+
+configure:1143: PATH=".;."; conftest.sh
+./configure: conftest.sh: command not found
+configure:1146: $? = 127
+configure:1186: checking build system type
+configure:1204: result: i686-suse-linux
+configure:1214: checking host system type
+configure:1228: result: i686-suse-linux
+configure:1238: checking target system type
+configure:1252: result: i686-suse-linux
+configure:1280: checking for a BSD compatible install
+configure:1329: result: /usr/bin/ginstall -c
+configure:1340: checking whether build environment is sane
+configure:1383: result: yes
+configure:1416: checking for mawk
+configure:1442: result: no
+configure:1416: checking for gawk
+configure:1431: found /usr/bin/gawk
+configure:1439: result: gawk
+configure:1449: checking whether make sets ${MAKE}
+configure:1469: result: yes
+configure:1580: checking for soapcpp2
+configure:1595: found /usr/local/bin/soapcpp2
+configure:1603: result: yes
+configure:1690: checking for gcc
+configure:1705: found /usr/bin/gcc
+configure:1713: result: gcc
+configure:1941: checking for C compiler version
+configure:1944: gcc --version </dev/null >&5
+2.95.3
+configure:1947: $? = 0
+configure:1949: gcc -v </dev/null >&5
+Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.3/specs
+gcc version 2.95.3 20010315 (SuSE)
+configure:1952: $? = 0
+configure:1954: gcc -V </dev/null >&5
+gcc: argument to `-V' is missing
+configure:1957: $? = 1
+configure:1977: checking for C compiler default output
+configure:1980: gcc    conftest.c  >&5
+configure:1983: $? = 0
+configure:2012: result: a.out
+configure:2017: checking whether the C compiler works
+configure:2023: ./a.out
+configure:2026: $? = 0
+configure:2041: result: yes
+configure:2048: checking whether we are cross compiling
+configure:2050: result: no
+configure:2053: checking for executable suffix
+configure:2055: gcc -o conftest    conftest.c  >&5
+configure:2058: $? = 0
+configure:2080: result: 
+configure:2086: checking for object suffix
+configure:2104: gcc -c   conftest.c >&5
+configure:2107: $? = 0
+configure:2126: result: o
+configure:2130: checking whether we are using the GNU C compiler
+configure:2151: gcc -c   conftest.c >&5
+configure:2154: $? = 0
+configure:2157: test -s conftest.o
+configure:2160: $? = 0
+configure:2172: result: yes
+configure:2178: checking whether gcc accepts -g
+configure:2196: gcc -c -g  conftest.c >&5
+configure:2199: $? = 0
+configure:2202: test -s conftest.o
+configure:2205: $? = 0
+configure:2215: result: yes
+configure:2242: gcc -c -g -O2  conftest.c >&5
+conftest.c:2: parse error before `me'
+configure:2245: $? = 1
+configure: failed program was:
+#ifndef __cplusplus
+  choke me
+#endif
+configure:2351: checking for style of include used by make
+configure:2378: result: GNU
+configure:2384: checking dependency style of gcc
+configure:2446: result: gcc
+configure:2455: checking how to run the C preprocessor
+configure:2481: gcc -E  conftest.c
+configure:2487: $? = 0
+configure:2514: gcc -E  conftest.c
+configure:2511: ac_nonexistent.h: No such file or directory
+configure:2520: $? = 1
+configure: failed program was:
+#line 2510 "configure"
+#include "confdefs.h"
+#include <ac_nonexistent.h>
+configure:2557: result: gcc -E
+configure:2572: gcc -E  conftest.c
+configure:2578: $? = 0
+configure:2605: gcc -E  conftest.c
+configure:2602: ac_nonexistent.h: No such file or directory
+configure:2611: $? = 1
+configure: failed program was:
+#line 2601 "configure"
+#include "confdefs.h"
+#include <ac_nonexistent.h>
+configure:2699: checking for g++
+configure:2714: found /usr/bin/g++
+configure:2722: result: g++
+configure:2737: checking for C++ compiler version
+configure:2740: g++ --version </dev/null >&5
+2.95.3
+configure:2743: $? = 0
+configure:2745: g++ -v </dev/null >&5
+Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.3/specs
+gcc version 2.95.3 20010315 (SuSE)
+configure:2748: $? = 0
+configure:2750: g++ -V </dev/null >&5
+g++: argument to `-V' missing
+
+configure:2753: $? = 1
+configure:2756: checking whether we are using the GNU C++ compiler
+configure:2777: g++ -c   conftest.cc >&5
+configure:2780: $? = 0
+configure:2783: test -s conftest.o
+configure:2786: $? = 0
+configure:2798: result: yes
+configure:2804: checking whether g++ accepts -g
+configure:2822: g++ -c -g  conftest.cc >&5
+configure:2825: $? = 0
+configure:2828: test -s conftest.o
+configure:2831: $? = 0
+configure:2841: result: yes
+configure:2881: g++ -c   conftest.cc >&5
+configure:2884: $? = 0
+configure:2887: test -s conftest.o
+configure:2890: $? = 0
+configure:2912: g++ -c   conftest.cc >&5
+configure:2915: $? = 0
+configure:2918: test -s conftest.o
+configure:2921: $? = 0
+configure:2945: checking dependency style of g++
+configure:3007: result: gcc
+configure:3013: checking for apxs
+configure:3028: found /usr/local/apache/bin/apxs
+configure:3036: result: yes
+configure:3144: checking for ld used by GCC
+configure:3207: result: /usr/i486-suse-linux/bin/ld
+configure:3216: checking if the linker (/usr/i486-suse-linux/bin/ld) is GNU ld
+GNU ld version 2.11.92.0.10 20011021 (SuSE)
+configure:3228: result: yes
+configure:3232: checking for /usr/i486-suse-linux/bin/ld option to reload object files
+configure:3239: result: -r
+configure:3244: checking for BSD-compatible nm
+configure:3280: result: /usr/bin/nm -B
+configure:3283: checking whether ln -s works
+configure:3287: result: yes
+configure:3294: checking how to recognise dependant libraries
+configure:3472: result: pass_all
+configure:3478: checking command to parse /usr/bin/nm -B output
+configure:3559: gcc -c -g -O2  conftest.c >&5
+configure:3562: $? = 0
+configure:3566: /usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[ 	]\([ABCDGISTW][ABCDGISTW]*\)[ 	][ 	]*\(\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2\3 \3/p' \> conftest.nm
+configure:3569: $? = 0
+configure:3621: gcc -o conftest -g -O2   conftest.c conftstm.o >&5
+configure:3624: $? = 0
+configure:3668: result: ok
+configure:3675: checking for dlfcn.h
+configure:3685: gcc -E  conftest.c
+configure:3691: $? = 0
+configure:3710: result: yes
+configure:3897: checking for ranlib
+configure:3912: found /usr/bin/ranlib
+configure:3921: result: ranlib
+configure:3971: checking for strip
+configure:3986: found /usr/bin/strip
+configure:3995: result: strip
+configure:4510: checking for objdir
+configure:4521: result: .libs
+configure:4536: checking for gcc option to produce PIC
+configure:4686: result: -fPIC
+configure:4690: checking if gcc PIC flag -fPIC works
+configure:4710: gcc -c -g -O2 -fPIC -DPIC  conftest.c >&5
+configure:4713: $? = 0
+configure:4716: test -s conftest.o
+configure:4719: $? = 0
+configure:4755: result: yes
+configure:4771: checking if gcc static flag -static works
+configure:4792: gcc -o conftest -g -O2   -static conftest.c  >&5
+configure:4795: $? = 0
+configure:4798: test -s conftest
+configure:4801: $? = 0
+configure:4815: result: yes
+configure:4826: checking if gcc supports -c -o file.o
+configure:4846: gcc -c -g -O2 -o out/conftest2.o  conftest.c >&5
+configure:4870: result: yes
+configure:4875: checking if gcc supports -c -o file.lo
+configure:4899: gcc -c -g -O2 -c -o conftest.lo  conftest.c >&5
+configure:4902: $? = 0
+configure:4905: test -s conftest.lo
+configure:4908: $? = 0
+configure:4929: result: yes
+configure:4960: checking if gcc supports -fno-rtti -fno-exceptions
+configure:4979: gcc -c -g -O2 -fno-rtti -fno-exceptions -c conftest.c  conftest.c >&5
+configure:4982: $? = 0
+configure:4985: test -s conftest.o
+configure:4988: $? = 0
+configure:5004: result: yes
+configure:5015: checking whether the linker (/usr/i486-suse-linux/bin/ld) supports shared libraries
+configure:5695: result: yes
+configure:5700: checking how to hardcode library paths into programs
+configure:5724: result: immediate
+configure:5729: checking whether stripping libraries is possible
+configure:5734: result: yes
+configure:5745: checking dynamic linker characteristics
+configure:6138: result: GNU/Linux ld.so
+configure:6143: checking if libtool supports shared libraries
+configure:6145: result: yes
+configure:6148: checking whether to build shared libraries
+configure:6169: result: yes
+configure:6172: checking whether to build static libraries
+configure:6176: result: yes
+configure:6214: checking for shl_load
+configure:6251: gcc -o conftest -g -O2   conftest.c  >&5
+/tmp/ccGgEWLb.o: In function `main':
+/home/aberger/apache_gsoap.0.0.5/configure:6242: undefined reference to `shl_load'
+collect2: ld returned 1 exit status
+configure:6254: $? = 1
+configure: failed program was:
+#line 6220 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shl_load (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+char (*f) ();
+
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_shl_load) || defined (__stub___shl_load)
+choke me
+#else
+f = shl_load;
+#endif
+
+  ;
+  return 0;
+}
+configure:6270: result: no
+configure:6275: checking for shl_load in -ldld
+configure:6302: gcc -o conftest -g -O2   conftest.c -ldld   >&5
+/usr/i486-suse-linux/bin/ld: cannot find -ldld
+collect2: ld returned 1 exit status
+configure:6305: $? = 1
+configure: failed program was:
+#line 6283 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+int
+main ()
+{
+shl_load ();
+  ;
+  return 0;
+}
+configure:6322: result: no
+configure:6327: checking for dlopen
+configure:6364: gcc -o conftest -g -O2   conftest.c  >&5
+/tmp/ccqkUxyk.o: In function `main':
+/home/aberger/apache_gsoap.0.0.5/configure:6355: undefined reference to `dlopen'
+collect2: ld returned 1 exit status
+configure:6367: $? = 1
+configure: failed program was:
+#line 6333 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dlopen (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+char (*f) ();
+
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+f = dlopen;
+#endif
+
+  ;
+  return 0;
+}
+configure:6383: result: no
+configure:6388: checking for dlopen in -ldl
+configure:6415: gcc -o conftest -g -O2   conftest.c -ldl   >&5
+configure:6418: $? = 0
+configure:6421: test -s conftest
+configure:6424: $? = 0
+configure:6435: result: yes
+configure:6575: checking whether a program can dlopen itself
+configure:6647: gcc -o conftest -g -O2  -DHAVE_DLFCN_H  -Wl,--export-dynamic conftest.c -ldl  >&5
+configure:6650: $? = 0
+configure:6667: result: yes
+configure:6672: checking whether a statically linked program can dlopen itself
+configure:6744: gcc -o conftest -g -O2  -DHAVE_DLFCN_H  -Wl,--export-dynamic -static conftest.c -ldl  >&5
+configure:6747: $? = 0
+configure:6764: result: no
+configure:6794: checking whether -lc should be explicitly linked in
+configure:6802: gcc -c -g -O2  conftest.c >&5
+configure:6805: $? = 0
+configure:6819: gcc -shared conftest.o  -v -Wl,-soname -Wl,conftest -o conftest 2\>\&1 \| grep  -lc  \>/dev/null 2\>\&1
+configure:6822: $? = 0
+configure:6835: result: no
+configure:7448: checking for getcwd
+configure:7485: gcc -o conftest -g -O2   conftest.c  >&5
+configure:7488: $? = 0
+configure:7491: test -s conftest
+configure:7494: $? = 0
+configure:7504: result: yes
+configure:7517: checking for memset
+configure:7554: gcc -o conftest -g -O2   conftest.c  >&5
+configure:7533: warning: conflicting types for built-in function `memset'
+configure:7557: $? = 0
+configure:7560: test -s conftest
+configure:7563: $? = 0
+configure:7573: result: yes
+configure:7587: checking for mawk
+configure:7610: result: gawk
+configure:7632: checking for a BSD compatible install
+configure:7681: result: /usr/bin/ginstall -c
+configure:7730: checking for ranlib
+configure:7754: result: ranlib
+configure:7766: checking for ANSI C header files
+configure:7780: gcc -E  conftest.c
+configure:7786: $? = 0
+configure:7873: gcc -o conftest -g -O2   conftest.c  >&5
+configure:7876: $? = 0
+configure:7878: ./conftest
+configure:7881: $? = 0
+configure:7894: result: yes
+configure:7904: checking for gcc option to accept ANSI C
+configure:7961: gcc  -c -g -O2  conftest.c >&5
+configure:7964: $? = 0
+configure:7967: test -s conftest.o
+configure:7970: $? = 0
+configure:7987: result: none needed
+configure:7995: checking for an ANSI C-conforming const
+configure:8059: gcc -c -g -O2  conftest.c >&5
+configure:8062: $? = 0
+configure:8065: test -s conftest.o
+configure:8068: $? = 0
+configure:8078: result: yes
+configure:8094: checking for sys/types.h
+configure:8106: gcc -c -g -O2  conftest.c >&5
+configure:8109: $? = 0
+configure:8112: test -s conftest.o
+configure:8115: $? = 0
+configure:8125: result: yes
+configure:8094: checking for sys/stat.h
+configure:8106: gcc -c -g -O2  conftest.c >&5
+configure:8109: $? = 0
+configure:8112: test -s conftest.o
+configure:8115: $? = 0
+configure:8125: result: yes
+configure:8094: checking for stdlib.h
+configure:8106: gcc -c -g -O2  conftest.c >&5
+configure:8109: $? = 0
+configure:8112: test -s conftest.o
+configure:8115: $? = 0
+configure:8125: result: yes
+configure:8094: checking for string.h
+configure:8106: gcc -c -g -O2  conftest.c >&5
+configure:8109: $? = 0
+configure:8112: test -s conftest.o
+configure:8115: $? = 0
+configure:8125: result: yes
+configure:8094: checking for memory.h
+configure:8106: gcc -c -g -O2  conftest.c >&5
+configure:8109: $? = 0
+configure:8112: test -s conftest.o
+configure:8115: $? = 0
+configure:8125: result: yes
+configure:8094: checking for strings.h
+configure:8106: gcc -c -g -O2  conftest.c >&5
+configure:8109: $? = 0
+configure:8112: test -s conftest.o
+configure:8115: $? = 0
+configure:8125: result: yes
+configure:8094: checking for inttypes.h
+configure:8106: gcc -c -g -O2  conftest.c >&5
+configure:8109: $? = 0
+configure:8112: test -s conftest.o
+configure:8115: $? = 0
+configure:8125: result: yes
+configure:8094: checking for stdint.h
+configure:8106: gcc -c -g -O2  conftest.c >&5
+configure:8109: $? = 0
+configure:8112: test -s conftest.o
+configure:8115: $? = 0
+configure:8125: result: yes
+configure:8094: checking for unistd.h
+configure:8106: gcc -c -g -O2  conftest.c >&5
+configure:8109: $? = 0
+configure:8112: test -s conftest.o
+configure:8115: $? = 0
+configure:8125: result: yes
+configure:8135: checking for size_t
+configure:8156: gcc -c -g -O2  conftest.c >&5
+configure:8159: $? = 0
+configure:8162: test -s conftest.o
+configure:8165: $? = 0
+configure:8175: result: yes
+configure:8190: checking for sys/types.h
+configure:8225: result: yes
+configure:8190: checking for sys/socket.h
+configure:8200: gcc -E  conftest.c
+configure:8206: $? = 0
+configure:8225: result: yes
+configure:8190: checking for unistd.h
+configure:8225: result: yes
+configure:8190: checking for netinet/in.h
+configure:8200: gcc -E  conftest.c
+configure:8206: $? = 0
+configure:8225: result: yes
+configure:8238: checking for arpa/inet.h
+configure:8248: gcc -E  conftest.c
+configure:8254: $? = 0
+configure:8273: result: yes
+configure:8238: checking for netdb.h
+configure:8248: gcc -E  conftest.c
+configure:8254: $? = 0
+configure:8273: result: yes
+configure:8238: checking for sys/ioctl.h
+configure:8248: gcc -E  conftest.c
+configure:8254: $? = 0
+configure:8273: result: yes
+configure:8238: checking for errno.h
+configure:8248: gcc -E  conftest.c
+configure:8254: $? = 0
+configure:8273: result: yes
+configure:8286: checking for sys/time.h
+configure:8296: gcc -E  conftest.c
+configure:8302: $? = 0
+configure:8321: result: yes
+configure:8334: checking for ltdl.h
+configure:8344: gcc -E  conftest.c
+configure:8350: $? = 0
+configure:8369: result: yes
+configure:8382: checking for stdsoap2.h
+configure:8392: gcc -E  conftest.c
+configure:8398: $? = 0
+configure:8417: result: yes
+configure:8507: creating ./config.status
+
+## ----------------------- ##
+## Running config.status.  ##
+## ----------------------- ##
+
+This file was extended by config.status 2.52, executed with
+  CONFIG_FILES    = 
+  CONFIG_HEADERS  = 
+  CONFIG_LINKS    = 
+  CONFIG_COMMANDS = 
+  > ./config.status 
+on redux
+
+config.status:9017: creating Makefile
+config.status:9017: creating ConsoleServer/Makefile
+config.status:9017: creating ConsoleServer/foo/Makefile
+config.status:9017: creating example/Makefile
+config.status:9017: creating example/calculator/Makefile
+config.status:9017: creating mod_gsoap/Makefile
+config.status:9109: creating config.h
+config.status:9250: config.h is unchanged
+
+## ----------------- ##
+## Cache variables.  ##
+## ----------------- ##
+
+ac_cv_build=i686-suse-linux
+ac_cv_build_alias=i686-suse-linux
+ac_cv_c_compiler_gnu=yes
+ac_cv_c_const=yes
+ac_cv_cxx_compiler_gnu=yes
+ac_cv_env_CC_set=
+ac_cv_env_CC_value=
+ac_cv_env_CFLAGS_set=
+ac_cv_env_CFLAGS_value=
+ac_cv_env_CPPFLAGS_set=
+ac_cv_env_CPPFLAGS_value=
+ac_cv_env_CPP_set=
+ac_cv_env_CPP_value=
+ac_cv_env_CXXFLAGS_set=
+ac_cv_env_CXXFLAGS_value=
+ac_cv_env_CXX_set=
+ac_cv_env_CXX_value=
+ac_cv_env_LDFLAGS_set=
+ac_cv_env_LDFLAGS_value=
+ac_cv_env_build_alias_set=
+ac_cv_env_build_alias_value=
+ac_cv_env_host_alias_set=
+ac_cv_env_host_alias_value=
+ac_cv_env_target_alias_set=
+ac_cv_env_target_alias_value=
+ac_cv_func_dlopen=no
+ac_cv_func_getcwd=yes
+ac_cv_func_memset=yes
+ac_cv_func_shl_load=no
+ac_cv_header_arpa_inet_h=yes
+ac_cv_header_dlfcn_h=yes
+ac_cv_header_errno_h=yes
+ac_cv_header_inttypes_h=yes
+ac_cv_header_ltdl_h=yes
+ac_cv_header_memory_h=yes
+ac_cv_header_netdb_h=yes
+ac_cv_header_netinet_in_h=yes
+ac_cv_header_stdc=yes
+ac_cv_header_stdint_h=yes
+ac_cv_header_stdlib_h=yes
+ac_cv_header_stdsoap2_h=yes
+ac_cv_header_string_h=yes
+ac_cv_header_strings_h=yes
+ac_cv_header_sys_ioctl_h=yes
+ac_cv_header_sys_socket_h=yes
+ac_cv_header_sys_stat_h=yes
+ac_cv_header_sys_time_h=yes
+ac_cv_header_sys_types_h=yes
+ac_cv_header_unistd_h=yes
+ac_cv_host=i686-suse-linux
+ac_cv_host_alias=i686-suse-linux
+ac_cv_lib_dl_dlopen=yes
+ac_cv_lib_dld_shl_load=no
+ac_cv_objext=o
+ac_cv_path_install=$'/usr/bin/ginstall -c'
+ac_cv_prog_AWK=gawk
+ac_cv_prog_CPP=$'gcc -E'
+ac_cv_prog_EXISTS_APXS=yes
+ac_cv_prog_EXISTS_GSOAP=yes
+ac_cv_prog_ac_ct_CC=gcc
+ac_cv_prog_ac_ct_CXX=g++
+ac_cv_prog_ac_ct_RANLIB=ranlib
+ac_cv_prog_ac_ct_STRIP=strip
+ac_cv_prog_cc_g=yes
+ac_cv_prog_cc_stdc=
+ac_cv_prog_cxx_g=yes
+ac_cv_prog_make_make_set=yes
+ac_cv_target=i686-suse-linux
+ac_cv_target_alias=i686-suse-linux
+ac_cv_type_size_t=yes
+am_cv_CC_dependencies_compiler_type=gcc
+am_cv_CXX_dependencies_compiler_type=gcc
+lt_cv_archive_cmds_need_lc=no
+lt_cv_compiler_c_o=yes
+lt_cv_compiler_o_lo=yes
+lt_cv_deplibs_check_method=pass_all
+lt_cv_dlopen=dlopen
+lt_cv_dlopen_libs=-ldl
+lt_cv_dlopen_self=yes
+lt_cv_dlopen_self_static=no
+lt_cv_file_magic_cmd=$'$MAGIC_CMD'
+lt_cv_file_magic_test_file=$'/lib/libc.so.6 /lib/libc.so.6.backup /lib/libc-*.so'
+lt_cv_global_symbol_to_c_name_address=$'sed -n -e \'s/^: \\([^ ]*\\) $/  {\\"\\1\\", (lt_ptr) 0},/p\' -e \'s/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)$/  {"\\2", (lt_ptr) \\&\\2},/p\''
+lt_cv_global_symbol_to_cdecl=$'sed -n -e \'s/^. .* \\(.*\\)$/extern char \\1;/p\''
+lt_cv_ld_reload_flag=-r
+lt_cv_path_LD=/usr/i486-suse-linux/bin/ld
+lt_cv_path_NM=$'/usr/bin/nm -B'
+lt_cv_prog_cc_can_build_shared=yes
+lt_cv_prog_cc_no_builtin=
+lt_cv_prog_cc_pic=$' -fPIC'
+lt_cv_prog_cc_pic_works=yes
+lt_cv_prog_cc_shlib=
+lt_cv_prog_cc_static=-static
+lt_cv_prog_cc_static_works=yes
+lt_cv_prog_cc_wl=-Wl,
+lt_cv_prog_gnu_ld=yes
+lt_cv_sys_global_symbol_pipe=$'sed -n -e \'s/^.*[ \t]\\([ABCDGISTW][ABCDGISTW]*\\)[ \t][ \t]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)$/\\1 \\2\\3 \\3/p\''
+lt_cv_sys_path_separator=:
+
+## ------------ ##
+## confdefs.h.  ##
+## ------------ ##
+
+#define PACKAGE "mod_gsoap"
+#define VERSION "0.0.5"
+#define HAVE_DLFCN_H 1
+#define HAVE_GETCWD 1
+#define HAVE_MEMSET 1
+#define STDC_HEADERS 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_SYS_STAT_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STRING_H 1
+#define HAVE_MEMORY_H 1
+#define HAVE_STRINGS_H 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_STDINT_H 1
+#define HAVE_UNISTD_H 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_SYS_SOCKET_H 1
+#define HAVE_UNISTD_H 1
+#define HAVE_NETINET_IN_H 1
+#define HAVE_ARPA_INET_H 1
+#define HAVE_NETDB_H 1
+#define HAVE_SYS_IOCTL_H 1
+#define HAVE_ERRNO_H 1
+#define HAVE_SYS_TIME_H 1
+#define HAVE_LTDL_H 1
+#define HAVE_STDSOAP2_H 1
+
+
+configure: exit 0
+
+## ----------------------- ##
+## Running config.status.  ##
+## ----------------------- ##
+
+This file was extended by config.status 2.52, executed with
+  CONFIG_FILES    = 
+  CONFIG_HEADERS  = config.h
+  CONFIG_LINKS    = 
+  CONFIG_COMMANDS = 
+  > ./config.status 
+on redux
+
+config.status:9109: creating config.h
+config.status:9250: config.h is unchanged
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/config.status b/mod_gsoap/mod_gsoap-0.6/apache_13/config.status
new file mode 100755
index 0000000..9ff28c3
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/config.status
@@ -0,0 +1,777 @@
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+SHELL=${CONFIG_SHELL-/bin/sh}
+ac_cs_invocation="$0 $@"
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+
+# Name of the executable.
+as_me=`echo "$0" |sed 's,.*[\\/],,'`
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+as_executable_p="test -f"
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+# NLS nuisances.
+$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
+$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
+$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
+$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
+$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
+$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
+$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
+$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
+
+exec 6>&1
+
+config_files=" Makefile ConsoleServer/Makefile ConsoleServer/foo/Makefile example/Makefile example/calculator/Makefile mod_gsoap/Makefile"
+config_headers=" config.h"
+config_commands=" default-1"
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number, then exit
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+  --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+ac_cs_version="\
+config.status
+configured by ./configure, generated by GNU Autoconf 2.52,
+  with options \"\"
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=.
+INSTALL="/usr/bin/ginstall -c"
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "x$1" : 'x\([^=]*\)='`
+    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    shift
+    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
+    shift
+    ;;
+  -*);;
+  *) # This is not an option, so the user has probably given explicit
+     # arguments.
+     ac_need_defaults=false;;
+  esac
+
+  case $1 in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    echo "running /bin/sh ./configure "  " --no-create --no-recursion"
+    exec /bin/sh ./configure  --no-create --no-recursion ;;
+  --version | --vers* | -V )
+    echo "$ac_cs_version"; exit 0 ;;
+  --he | --h)
+    # Conflict between --help and --header
+    { { echo "$as_me:8683: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit 0 ;;
+  --debug | --d* | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    shift
+    CONFIG_FILES="$CONFIG_FILES $1"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $1"
+    ac_need_defaults=false;;
+
+  # This is an error.
+  -*) { { echo "$as_me:8702: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1" ;;
+
+  esac
+  shift
+done
+
+exec 5>>config.log
+cat >&5 << _ACEOF
+
+## ----------------------- ##
+## Running config.status.  ##
+## ----------------------- ##
+
+This file was extended by $as_me 2.52, executed with
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  > $ac_cs_invocation
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+
+_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+AMDEP_TRUE=""
+ac_aux_dir="."
+
+for ac_config_target in $ac_config_targets
+do
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  "ConsoleServer/Makefile" ) CONFIG_FILES="$CONFIG_FILES ConsoleServer/Makefile" ;;
+  "ConsoleServer/foo/Makefile" ) CONFIG_FILES="$CONFIG_FILES ConsoleServer/foo/Makefile" ;;
+  "example/Makefile" ) CONFIG_FILES="$CONFIG_FILES example/Makefile" ;;
+  "example/calculator/Makefile" ) CONFIG_FILES="$CONFIG_FILES example/calculator/Makefile" ;;
+  "mod_gsoap/Makefile" ) CONFIG_FILES="$CONFIG_FILES mod_gsoap/Makefile" ;;
+  "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+  *) { { echo "$as_me:8755: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+: ${TMPDIR=/tmp}
+{
+  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=$TMPDIR/cs$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+   { (exit 1); exit 1; }
+}
+
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "$CONFIG_FILES"; then
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t$/@;t t/; /@;t t$/s/[\\&,]/\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t$/,;t t/' >$tmp/subs.sed <<\CEOF
+s,@SHELL@,/bin/sh,;t t
+s,@exec_prefix@,${prefix},;t t
+s,@prefix@,/usr/local,;t t
+s,@program_transform_name@,s,x,x,,;t t
+s,@bindir@,${exec_prefix}/bin,;t t
+s,@sbindir@,${exec_prefix}/sbin,;t t
+s,@libexecdir@,${exec_prefix}/libexec,;t t
+s,@datadir@,${prefix}/share,;t t
+s,@sysconfdir@,${prefix}/etc,;t t
+s,@sharedstatedir@,${prefix}/com,;t t
+s,@localstatedir@,${prefix}/var,;t t
+s,@libdir@,${exec_prefix}/lib,;t t
+s,@includedir@,${prefix}/include,;t t
+s,@oldincludedir@,/usr/include,;t t
+s,@infodir@,${prefix}/info,;t t
+s,@mandir@,${prefix}/man,;t t
+s,@PACKAGE_NAME@,,;t t
+s,@PACKAGE_TARNAME@,,;t t
+s,@PACKAGE_VERSION@,,;t t
+s,@PACKAGE_STRING@,,;t t
+s,@PACKAGE_BUGREPORT@,,;t t
+s,@build_alias@,i686-suse-linux,;t t
+s,@host_alias@,i686-suse-linux,;t t
+s,@target_alias@,i686-suse-linux,;t t
+s,@ECHO_C@,,;t t
+s,@ECHO_N@,-n,;t t
+s,@ECHO_T@,,;t t
+s,@PATH_SEPARATOR@,:,;t t
+s,@DEFS@,-DHAVE_CONFIG_H,;t t
+s,@LIBS@,,;t t
+s,@build@,i686-suse-linux,;t t
+s,@build_cpu@,i686,;t t
+s,@build_vendor@,suse,;t t
+s,@build_os@,linux,;t t
+s,@host@,i686-suse-linux,;t t
+s,@host_cpu@,i686,;t t
+s,@host_vendor@,suse,;t t
+s,@host_os@,linux,;t t
+s,@target@,i686-suse-linux,;t t
+s,@target_cpu@,i686,;t t
+s,@target_vendor@,suse,;t t
+s,@target_os@,linux,;t t
+s,@INSTALL_PROGRAM@,${INSTALL},;t t
+s,@INSTALL_SCRIPT@,${INSTALL},;t t
+s,@INSTALL_DATA@,${INSTALL} -m 644,;t t
+s,@PACKAGE@,mod_gsoap,;t t
+s,@VERSION@,0.0.5,;t t
+s,@EXEEXT@,,;t t
+s,@OBJEXT@,o,;t t
+s,@ACLOCAL@,${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run aclocal,;t t
+s,@AUTOCONF@,${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run autoconf,;t t
+s,@AUTOMAKE@,${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run automake,;t t
+s,@AUTOHEADER@,${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run autoheader,;t t
+s,@MAKEINFO@,${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run makeinfo,;t t
+s,@AMTAR@,${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run tar,;t t
+s,@install_sh@,/home/aberger/apache_gsoap.0.0.5/install-sh,;t t
+s,@INSTALL_STRIP_PROGRAM@,${SHELL} $(install_sh) -c -s,;t t
+s,@AWK@,gawk,;t t
+s,@SET_MAKE@,,;t t
+s,@AMDEP_TRUE@,,;t t
+s,@AMDEP_FALSE@,#,;t t
+s,@AMDEPBACKSLASH@,\,;t t
+s,@DEPDIR@,.deps,;t t
+s,@EXISTS_GSOAP@,yes,;t t
+s,@DEBUG_TRUE@,#,;t t
+s,@DEBUG_FALSE@,,;t t
+s,@CXXDEBUGDEFINES@,-D_NDEBUG,;t t
+s,@APXS_CXX_OPTIONS@,,;t t
+s,@CC@,gcc,;t t
+s,@CFLAGS@,-g -O2,;t t
+s,@LDFLAGS@,,;t t
+s,@CPPFLAGS@,,;t t
+s,@ac_ct_CC@,gcc,;t t
+s,@am__include@,include,;t t
+s,@am__quote@,,;t t
+s,@CCDEPMODE@,depmode=gcc,;t t
+s,@CPP@,gcc -E,;t t
+s,@CXX@,g++,;t t
+s,@CXXFLAGS@, -O2,;t t
+s,@ac_ct_CXX@,g++,;t t
+s,@CXXDEPMODE@,depmode=gcc,;t t
+s,@EXISTS_APXS@,yes,;t t
+s,@LN_S@,ln -s,;t t
+s,@ECHO@,echo,;t t
+s,@RANLIB@,ranlib,;t t
+s,@ac_ct_RANLIB@,ranlib,;t t
+s,@STRIP@,strip,;t t
+s,@ac_ct_STRIP@,strip,;t t
+s,@DLLTOOL@,dlltool,;t t
+s,@ac_ct_DLLTOOL@,,;t t
+s,@AS@,as,;t t
+s,@ac_ct_AS@,,;t t
+s,@OBJDUMP@,objdump,;t t
+s,@ac_ct_OBJDUMP@,,;t t
+s,@LIBTOOL@,$(SHELL) $(top_builddir)/libtool,;t t
+s,@LIBTOOL_DEPS@,./ltmain.sh,;t t
+CEOF
+
+  # Split the substitutions into bite-sized pieces for seds with
+  # small command number limits, like on Digital OSF/1 and HP-UX.
+  ac_max_sed_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # Line after last line for current file.
+  ac_more_lines=:
+  ac_sed_cmds=
+  while $ac_more_lines; do
+    if test $ac_beg -gt 1; then
+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    else
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    fi
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (echo ':t
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+      if test -z "$ac_sed_cmds"; then
+  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+      else
+  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+      fi
+      ac_sed_frag=`expr $ac_sed_frag + 1`
+      ac_beg=$ac_end
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
+  fi
+fi # test -n "$CONFIG_FILES"
+
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+        cat >$tmp/stdin
+        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$ac_file" : 'X\(//\)[^/]' \| \
+         X"$ac_file" : 'X\(//\)$' \| \
+         X"$ac_file" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+    { case "$ac_dir" in
+  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
+  *)                      as_incr_dir=.;;
+esac
+as_dummy="$ac_dir"
+for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
+  case $as_mkdir_dir in
+    # Skip DOS drivespec
+    ?:) as_incr_dir=$as_mkdir_dir ;;
+    *)
+      as_incr_dir=$as_incr_dir/$as_mkdir_dir
+      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
+    ;;
+  esac
+done; }
+
+    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
+    # A "../" for each directory in $ac_dir_suffix.
+    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
+  else
+    ac_dir_suffix= ac_dots=
+  fi
+
+  case $srcdir in
+  .)  ac_srcdir=.
+      if test -z "$ac_dots"; then
+         ac_top_srcdir=.
+      else
+         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
+      fi ;;
+  [\\/]* | ?:[\\/]* )
+      ac_srcdir=$srcdir$ac_dir_suffix;
+      ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_dots$srcdir ;;
+  esac
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_dots$INSTALL ;;
+  esac
+
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:9017: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated automatically by config.status.  */
+  configure_input="Generated automatically from `echo $ac_file_in |
+                                                 sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+         # Absolute (can't be DOS-style, as IFS=:)
+         test -f "$f" || { { echo "$as_me:9035: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         echo $f;;
+      *) # Relative
+         if test -f "$f"; then
+           # Build tree
+           echo $f
+         elif test -f "$srcdir/$f"; then
+           # Source tree
+           echo $srcdir/$f
+         else
+           # /dev/null tree
+           { { echo "$as_me:9048: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  sed "/^[ 	]*VPATH[ 	]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ 	]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ 	]*$//;
+}
+
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
+
+done
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
+ac_dB='[ 	].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+        cat >$tmp/stdin
+        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  test x"$ac_file" != x- && { echo "$as_me:9109: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+         # Absolute (can't be DOS-style, as IFS=:)
+         test -f "$f" || { { echo "$as_me:9120: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         echo $f;;
+      *) # Relative
+         if test -f "$f"; then
+           # Build tree
+           echo $f
+         elif test -f "$srcdir/$f"; then
+           # Source tree
+           echo $srcdir/$f
+         else
+           # /dev/null tree
+           { { echo "$as_me:9133: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  # Remove the trailing spaces.
+  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
+
+  # Handle all the #define templates only if necessary.
+  if egrep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then
+  # If there are no defines, we may have an empty if/fi
+  :
+  cat >$tmp/defines.sed <<CEOF
+/^[ 	]*#[ 	]*define/!b
+t clr
+: clr
+${ac_dA}PACKAGE${ac_dB}PACKAGE${ac_dC}"mod_gsoap"${ac_dD}
+${ac_dA}VERSION${ac_dB}VERSION${ac_dC}"0.0.5"${ac_dD}
+${ac_dA}HAVE_DLFCN_H${ac_dB}HAVE_DLFCN_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_GETCWD${ac_dB}HAVE_GETCWD${ac_dC}1${ac_dD}
+${ac_dA}HAVE_MEMSET${ac_dB}HAVE_MEMSET${ac_dC}1${ac_dD}
+${ac_dA}STDC_HEADERS${ac_dB}STDC_HEADERS${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SYS_TYPES_H${ac_dB}HAVE_SYS_TYPES_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SYS_STAT_H${ac_dB}HAVE_SYS_STAT_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STDLIB_H${ac_dB}HAVE_STDLIB_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STRING_H${ac_dB}HAVE_STRING_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_MEMORY_H${ac_dB}HAVE_MEMORY_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STRINGS_H${ac_dB}HAVE_STRINGS_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_INTTYPES_H${ac_dB}HAVE_INTTYPES_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STDINT_H${ac_dB}HAVE_STDINT_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_UNISTD_H${ac_dB}HAVE_UNISTD_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SYS_TYPES_H${ac_dB}HAVE_SYS_TYPES_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SYS_SOCKET_H${ac_dB}HAVE_SYS_SOCKET_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_UNISTD_H${ac_dB}HAVE_UNISTD_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_NETINET_IN_H${ac_dB}HAVE_NETINET_IN_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_ARPA_INET_H${ac_dB}HAVE_ARPA_INET_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_NETDB_H${ac_dB}HAVE_NETDB_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SYS_IOCTL_H${ac_dB}HAVE_SYS_IOCTL_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_ERRNO_H${ac_dB}HAVE_ERRNO_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SYS_TIME_H${ac_dB}HAVE_SYS_TIME_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_LTDL_H${ac_dB}HAVE_LTDL_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STDSOAP2_H${ac_dB}HAVE_STDSOAP2_H${ac_dC}1${ac_dD}
+CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+
+  fi # egrep
+
+  # Handle all the #undef templates
+  cat >$tmp/undefs.sed <<CEOF
+/^[ 	]*#[ 	]*undef/!b
+t clr
+: clr
+${ac_uA}PACKAGE${ac_uB}PACKAGE${ac_uC}"mod_gsoap"${ac_uD}
+${ac_uA}VERSION${ac_uB}VERSION${ac_uC}"0.0.5"${ac_uD}
+${ac_uA}HAVE_DLFCN_H${ac_uB}HAVE_DLFCN_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_GETCWD${ac_uB}HAVE_GETCWD${ac_uC}1${ac_uD}
+${ac_uA}HAVE_MEMSET${ac_uB}HAVE_MEMSET${ac_uC}1${ac_uD}
+${ac_uA}STDC_HEADERS${ac_uB}STDC_HEADERS${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SYS_TYPES_H${ac_uB}HAVE_SYS_TYPES_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SYS_STAT_H${ac_uB}HAVE_SYS_STAT_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STDLIB_H${ac_uB}HAVE_STDLIB_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STRING_H${ac_uB}HAVE_STRING_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_MEMORY_H${ac_uB}HAVE_MEMORY_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STRINGS_H${ac_uB}HAVE_STRINGS_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_INTTYPES_H${ac_uB}HAVE_INTTYPES_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STDINT_H${ac_uB}HAVE_STDINT_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_UNISTD_H${ac_uB}HAVE_UNISTD_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SYS_TYPES_H${ac_uB}HAVE_SYS_TYPES_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SYS_SOCKET_H${ac_uB}HAVE_SYS_SOCKET_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_UNISTD_H${ac_uB}HAVE_UNISTD_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_NETINET_IN_H${ac_uB}HAVE_NETINET_IN_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_ARPA_INET_H${ac_uB}HAVE_ARPA_INET_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_NETDB_H${ac_uB}HAVE_NETDB_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SYS_IOCTL_H${ac_uB}HAVE_SYS_IOCTL_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_ERRNO_H${ac_uB}HAVE_ERRNO_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SYS_TIME_H${ac_uB}HAVE_SYS_TIME_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_LTDL_H${ac_uB}HAVE_LTDL_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STDSOAP2_H${ac_uB}HAVE_STDSOAP2_H${ac_uC}1${ac_uD}
+s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+CEOF
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated automatically by config.status.  */
+  if test x"$ac_file" = x-; then
+    echo "/* Generated automatically by configure.  */" >$tmp/config.h
+  else
+    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
+  fi
+  cat $tmp/in >>$tmp/config.h
+  rm -f $tmp/in
+  if test x"$ac_file" != x-; then
+    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
+      { echo "$as_me:9250: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$ac_file" : 'X\(//\)[^/]' \| \
+         X"$ac_file" : 'X\(//\)$' \| \
+         X"$ac_file" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+        { case "$ac_dir" in
+  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
+  *)                      as_incr_dir=.;;
+esac
+as_dummy="$ac_dir"
+for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
+  case $as_mkdir_dir in
+    # Skip DOS drivespec
+    ?:) as_incr_dir=$as_mkdir_dir ;;
+    *)
+      as_incr_dir=$as_incr_dir/$as_mkdir_dir
+      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
+    ;;
+  esac
+done; }
+
+      fi
+      rm -f $ac_file
+      mv $tmp/config.h $ac_file
+    fi
+  else
+    cat $tmp/config.h
+    rm -f $tmp/config.h
+  fi
+  # Run the commands associated with the file.
+  case $ac_file in
+    config.h ) # update the timestamp
+echo timestamp >"./stamp-h1"
+ ;;
+  esac
+done
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+
+  case $ac_dest in
+    default-1 )
+test x"$AMDEP_TRUE" != x"" ||
+for mf in $CONFIG_FILES; do
+  case "$mf" in
+  Makefile) dirpart=.;;
+  */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
+  *) continue;;
+  esac
+  grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
+  # Extract the definition of DEP_FILES from the Makefile without
+  # running `make'.
+  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n -e '/^U = / s///p' < "$mf"`
+  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+  # We invoke sed twice because it is the simplest approach to
+  # changing $(DEPDIR) to its actual value in the expansion.
+  for file in `sed -n -e '
+    /^DEP_FILES = .*\\\\$/ {
+      s/^DEP_FILES = //
+      :loop
+	s/\\\\$//
+	p
+	n
+	/\\\\$/ b loop
+      p
+    }
+    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
+    $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+ ;;
+  esac
+done
+
+{ (exit 0); exit 0; }
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/config.sub b/mod_gsoap/mod_gsoap-0.6/apache_13/config.sub
new file mode 100755
index 0000000..83f4b01
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/config.sub
@@ -0,0 +1,1410 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+#   Free Software Foundation, Inc.
+
+timestamp='2001-08-13'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Please send patches to <config-patches@gnu.org>.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit 0;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis)
+		os=
+		basic_machine=$1
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+ 	-chorusrdb)
+ 		os=-chorusrdb
+		basic_machine=$1
+ 		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	1750a | 580 \
+	| a29k \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+	| c4x | clipper \
+	| d10v | d30v | dsp16xx \
+	| fr30 \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| i370 | i860 | i960 | ia64 \
+	| m32r | m68000 | m68k | m88k | mcore \
+	| mips16 | mips64 | mips64el | mips64orion | mips64orionel \
+	| mips64vr4100 | mips64vr4100el | mips64vr4300 \
+	| mips64vr4300el | mips64vr5000 | mips64vr5000el \
+	| mipsbe | mipsel | mipsle | mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| ns16k | ns32k \
+	| openrisc \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| pyramid \
+	| s390 | s390x \
+	| sh | sh[34] | sh[34]eb | shbe | shle \
+	| sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
+	| strongarm \
+	| tahoe | thumb | tic80 | tron \
+	| v850 \
+	| we32k \
+	| x86 | xscale \
+	| z8k)
+		basic_machine=$basic_machine-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12)
+		# Motorola 68HC11/12.
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	580-* \
+	| a29k-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alphapca5[67]-* | arc-* \
+	| arm-*  | armbe-* | armle-* | armv*-* \
+	| bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c54x-* \
+	| clipper-* | cray2-* | cydra-* \
+	| d10v-* | d30v-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fr30-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| m32r-* \
+	| m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | mcore-* \
+	| mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
+	| mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipsel-* \
+	| mipsle-* | mipstx39-* | mipstx39el-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| pyramid-* \
+	| romp-* | rs6000-* \
+	| s390-* | s390x-* \
+	| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
+	| sparc-* | sparc64-* | sparc86x-* | sparclite-* \
+	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* \
+	| t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
+	| v850-* | vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \
+	| ymp-* \
+	| z8k-*)
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-unknown
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-unknown
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	cray2)
+		basic_machine=cray2-cray
+		os=-unicos
+		;;
+	[cjt]90)
+		basic_machine=${basic_machine}-cray
+		os=-unicos
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	mingw32)
+		basic_machine=i386-pc
+		os=-mingw32
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mipsel*-linux*)
+		basic_machine=mipsel-unknown
+		;;
+	mips*-linux*)
+		basic_machine=mips-unknown
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	mmix*)
+		basic_machine=mmix-knuth
+		os=-mmixware
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+        pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pentium | p5 | k5 | k6 | nexgen)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2)
+		basic_machine=i686-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc)	basic_machine=powerpc-unknown
+	        ;;
+	ppc64)  basic_machine=powerpc-unknown
+		;;
+	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+	        ;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+	        ;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+	        ;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sparclite-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=t3e-cray
+		os=-unicos
+		;;
+	tic54x | c54x*)
+		basic_machine=tic54x-unknown
+		os=-coff
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+               basic_machine=f301-fujitsu
+               ;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	windows32)
+		basic_machine=i386-pc
+		os=-windows32-msvcrt
+		;;
+	xmp)
+		basic_machine=xmp-cray
+		os=-unicos
+		;;
+        xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	mips)
+		case $os in
+		linux*)
+			basic_machine=mips-unknown
+			;;
+		*)
+			basic_machine=mips-mips
+			;;
+		esac
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh3 | sh4 | sh3eb | sh4eb)
+		basic_machine=sh-unknown
+		;;
+	sparc | sparcv9 | sparcv9b)
+		basic_machine=sparc-sun
+		;;
+        cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	c4x*)
+		basic_machine=c4x-none
+		os=-coff
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -chorusos* | -chorusrdb* \
+	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux* | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto*)
+		os=-nto-qnx
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-ns2 )
+	        os=-nextstep2
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+	        os=-mint
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+	pdp10-*)
+		os=-tops20
+		;;
+        pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		# This also exists in the configure program, but was not the
+		# default.
+		# os=-sunos4
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-ibm)
+		os=-aix
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+        *-gould)
+		os=-sysv
+		;;
+        *-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+        *-sgi)
+		os=-irix
+		;;
+        *-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-vxsim* | -vxworks*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/configure b/mod_gsoap/mod_gsoap-0.6/apache_13/configure
new file mode 100755
index 0000000..1f9bb85
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/configure
@@ -0,0 +1,9374 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by Autoconf 2.52.
+#
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+#
+# Dipl.-Ing. Christian Aberger (http://www.aberger.at)
+
+# Find the correct PATH separator.  Usually this is `:', but
+# DJGPP uses `;' like DOS.
+if test "X${PATH_SEPARATOR+set}" != Xset; then
+  UNAME=${UNAME-`uname 2>/dev/null`}
+  case X$UNAME in
+    *-DOS) lt_cv_sys_path_separator=';' ;;
+    *)     lt_cv_sys_path_separator=':' ;;
+  esac
+  PATH_SEPARATOR=$lt_cv_sys_path_separator
+fi
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
+  ;;
+esac
+
+echo=${ECHO-echo}
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+
+EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+
+if test -z "$ECHO"; then
+if test "X${echo_test_string+set}" != Xset; then
+# find a string as large as possible, as long as the shell can cope with it
+  for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
+       echo_test_string="`eval $cmd`" &&
+       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
+    then
+      break
+    fi
+  done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+   test "X$echo_testing_string" = "X$echo_test_string"; then
+  :
+else
+  # The Solaris, AIX, and Digital Unix default echo programs unquote
+  # backslashes.  This makes it impossible to quote backslashes using
+  #   echo "$something" | sed 's/\\/\\\\/g'
+  #
+  # So, first we look for a working echo in the user's PATH.
+
+  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for dir in $PATH /usr/ucb; do
+    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      echo="$dir/echo"
+      break
+    fi
+  done
+  IFS="$save_ifs"
+
+  if test "X$echo" = Xecho; then
+    # We didn't find a better echo, so look for alternatives.
+    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      # This shell has a builtin print -r that does the trick.
+      echo='print -r'
+    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+	 test "X$CONFIG_SHELL" != X/bin/ksh; then
+      # If we have ksh, try running configure again with it.
+      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+      export ORIGINAL_CONFIG_SHELL
+      CONFIG_SHELL=/bin/ksh
+      export CONFIG_SHELL
+      exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+    else
+      # Try using printf.
+      echo='printf %s\n'
+      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+	 test "X$echo_testing_string" = "X$echo_test_string"; then
+	# Cool, printf works
+	:
+      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+	export CONFIG_SHELL
+	SHELL="$CONFIG_SHELL"
+	export SHELL
+	echo="$CONFIG_SHELL $0 --fallback-echo"
+      elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	echo="$CONFIG_SHELL $0 --fallback-echo"
+      else
+	# maybe with a smaller string...
+	prev=:
+
+	for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
+	  then
+	    break
+	  fi
+	  prev="$cmd"
+	done
+
+	if test "$prev" != 'sed 50q "$0"'; then
+	  echo_test_string=`eval $prev`
+	  export echo_test_string
+	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+	else
+	  # Oops.  We lost completely, so just stick with echo.
+	  echo=echo
+	fi
+      fi
+    fi
+  fi
+fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+ECHO=$echo
+if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+   ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+
+# Name of the executable.
+as_me=`echo "$0" |sed 's,.*[\\/],,'`
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+as_executable_p="test -f"
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+# NLS nuisances.
+$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
+$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
+$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
+$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
+$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
+$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
+$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
+$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+cross_compiling=no
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete.  It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+ac_unique_file="mod_gsoap/mod_gsoap.c"
+ac_unique_file="mod_gsoap/mod_gsoap.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_prev=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_option in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval "enable_$ac_feature=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_$ac_feature='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_$ac_package='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval "with_$ac_package=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    eval "$ac_envvar='$ac_optarg'"
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+              localstatedir libdir includedir oldincludedir infodir mandir
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* ) ;;
+    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: should be removed in autoconf 3.0.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then its parent.
+  ac_prog=$0
+  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
+  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
+   { (exit 1); exit 1; }; }
+  else
+    { echo "$as_me: error: cannot find sources in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+  fi
+fi
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+ac_env_CXX_set=${CXX+set}
+ac_env_CXX_value=$CXX
+ac_cv_env_CXX_set=${CXX+set}
+ac_cv_env_CXX_value=$CXX
+ac_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_env_CXXFLAGS_value=$CXXFLAGS
+ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_cv_env_CXXFLAGS_value=$CXXFLAGS
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<EOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+EOF
+
+  cat <<EOF
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --infodir=DIR          info documentation [PREFIX/info]
+  --mandir=DIR           man documentation [PREFIX/man]
+EOF
+
+  cat <<\EOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       build programs to run on HOST [BUILD]
+  --target=TARGET   configure for building compilers for TARGET [HOST]
+EOF
+fi
+
+if test -n "$ac_init_help"; then
+
+  cat <<\EOF
+
+Optional Features:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --disable-dependency-tracking Speeds up one-time builds
+  --enable-dependency-tracking  Do not reject slow dependency extractors
+  --enable-debug	add debug symbols to compiler and linker output for source code debugging
+  --enable-shared=PKGS  build shared libraries default=yes
+  --enable-static=PKGS  build static libraries default=yes
+  --enable-fast-install=PKGS  optimize for fast installation default=yes
+  --disable-libtool-lock  avoid locking (might break parallel builds)
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-gnu-ld           assume the C compiler uses GNU ld default=no
+  --with-pic              try to use only PIC/non-PIC objects default=use both
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+              headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+EOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  ac_popdir=`pwd`
+  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
+    cd $ac_subdir
+    # A "../" for each directory in /$ac_subdir.
+    ac_dots=`echo $ac_subdir |
+             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
+
+    case $srcdir in
+    .) # No --srcdir option.  We are building in place.
+      ac_sub_srcdir=$srcdir ;;
+    [\\/]* | ?:[\\/]* ) # Absolute path.
+      ac_sub_srcdir=$srcdir/$ac_subdir ;;
+    *) # Relative path.
+      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
+    esac
+
+    # Check for guested configure; otherwise get Cygnus style configure.
+    if test -f $ac_sub_srcdir/configure.gnu; then
+      echo
+      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
+    elif test -f $ac_sub_srcdir/configure; then
+      echo
+      $SHELL $ac_sub_srcdir/configure  --help=recursive
+    elif test -f $ac_sub_srcdir/configure.ac ||
+           test -f $ac_sub_srcdir/configure.in; then
+      echo
+      $ac_configure --help
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
+    fi
+    cd $ac_popdir
+  done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+  cat <<\EOF
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+
+Dipl.-Ing. Christian Aberger (http://www.aberger.at)
+EOF
+  exit 0
+fi
+exec 5>config.log
+cat >&5 <<EOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.52.  Invocation command line was
+
+  $ $0 $@
+
+EOF
+{
+cat <<_ASUNAME
+## ---------- ##
+## Platform.  ##
+## ---------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+PATH = $PATH
+
+_ASUNAME
+} >&5
+
+cat >&5 <<EOF
+## ------------ ##
+## Core tests.  ##
+## ------------ ##
+
+EOF
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell meta-characters.
+ac_configure_args=
+ac_sep=
+for ac_arg
+do
+  case $ac_arg in
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c) ;;
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
+    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+    ac_sep=" " ;;
+  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
+     ac_sep=" " ;;
+  esac
+  # Get rid of the leading space.
+done
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  echo >&5
+  echo "## ----------------- ##" >&5
+  echo "## Cache variables.  ##" >&5
+  echo "## ----------------- ##" >&5
+  echo >&5
+  # The following way of writing the cache mishandles newlines in values,
+{
+  (set) 2>&1 |
+    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      sed -n \
+        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+      ;;
+    *)
+      sed -n \
+        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+} >&5
+  sed "/^$/d" confdefs.h >conftest.log
+  if test -s conftest.log; then
+    echo >&5
+    echo "## ------------ ##" >&5
+    echo "## confdefs.h.  ##" >&5
+    echo "## ------------ ##" >&5
+    echo >&5
+    cat conftest.log >&5
+  fi
+  (echo; echo) >&5
+  test "$ac_signal" != 0 &&
+    echo "$as_me: caught signal $ac_signal" >&5
+  echo "$as_me: exit $exit_status" >&5
+  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
+    exit $exit_status
+     ' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:1053: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    cat "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:1064: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
+else
+  { echo "$as_me:1072: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+  eval ac_new_val="\$ac_env_${ac_var}_value"
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:1088: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:1092: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+        { echo "$as_me:1098: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+        { echo "$as_me:1100:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+        { echo "$as_me:1102:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+        ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.  It doesn't matter if
+  # we pass some twice (in addition to the command line arguments).
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
+      ac_configure_args="$ac_configure_args '$ac_arg'"
+      ;;
+    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
+       ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:1121: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:1123: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+echo "#! $SHELL" >conftest.sh
+echo  "exit 0"   >>conftest.sh
+chmod +x conftest.sh
+if { (echo "$as_me:1143: PATH=\".;.\"; conftest.sh") >&5
+  (PATH=".;."; conftest.sh) 2>&5
+  ac_status=$?
+  echo "$as_me:1146: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  ac_path_separator=';'
+else
+  ac_path_separator=:
+fi
+PATH_SEPARATOR="$ac_path_separator"
+rm -f conftest.sh
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f $ac_dir/shtool; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { echo "$as_me:1172: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:1182: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+echo "$as_me:1186: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+  ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+  { { echo "$as_me:1195: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+  { { echo "$as_me:1199: error: $ac_config_sub $ac_cv_build_alias failed." >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:1204: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+test -z "$build_alias" &&
+  build_alias=$ac_cv_build
+
+echo "$as_me:1214: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+  ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+  { { echo "$as_me:1223: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:1228: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+test -z "$host_alias" &&
+  host_alias=$ac_cv_host
+
+echo "$as_me:1238: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6
+if test "${ac_cv_target+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_target_alias=$target_alias
+test "x$ac_cv_target_alias" = "x" &&
+  ac_cv_target_alias=$ac_cv_host_alias
+ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
+  { { echo "$as_me:1247: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:1252: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6
+target=$ac_cv_target
+target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+test -z "$target_alias" &&
+  target_alias=$ac_cv_target
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:1280: checking for a BSD compatible install" >&5
+echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+    ac_save_IFS=$IFS; IFS=$ac_path_separator
+  for ac_dir in $PATH; do
+    IFS=$ac_save_IFS
+    # Account for people who put trailing slashes in PATH elements.
+    case $ac_dir/ in
+    / | ./ | .// | /cC/* \
+    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
+    | /usr/ucb/* ) ;;
+    *)
+      # OSF1 and SCO ODT 3.0 have their own names for install.
+      # Don't use installbsd from OSF since it installs stuff as root
+      # by default.
+      for ac_prog in ginstall scoinst install; do
+        if $as_executable_p "$ac_dir/$ac_prog"; then
+	  if test $ac_prog = install &&
+            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    ac_cv_path_install="$ac_dir/$ac_prog -c"
+	    break 2
+	  fi
+	fi
+      done
+      ;;
+    esac
+  done
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL=$ac_install_sh
+  fi
+fi
+echo "$as_me:1329: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo "$as_me:1340: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      { { echo "$as_me:1364: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   { { echo "$as_me:1377: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+echo "$as_me:1383: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+test "$program_prefix" != NONE &&
+  program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $.  echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  am_backtick='`'
+  { echo "$as_me:1408: WARNING: ${am_backtick}missing' script is too old or missing" >&5
+echo "$as_me: WARNING: ${am_backtick}missing' script is too old or missing" >&2;}
+fi
+
+for ac_prog in mawk gawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:1416: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_AWK="$ac_prog"
+echo "$as_me:1431: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  echo "$as_me:1439: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+  echo "$as_me:1442: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$AWK" && break
+done
+
+echo "$as_me:1449: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\EOF
+all:
+	@echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$as_me:1469: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+  SET_MAKE=
+else
+  echo "$as_me:1473: result: no" >&5
+echo "${ECHO_T}no" >&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+  enableval="$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+rm -f .deps 2>/dev/null
+mkdir .deps 2>/dev/null
+if test -d .deps; then
+  DEPDIR=.deps
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  DEPDIR=_deps
+fi
+rmdir .deps 2>/dev/null
+
+# test to see if srcdir already configured
+if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  { { echo "$as_me:1509: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# Define the identity of the package.
+PACKAGE=mod_gsoap
+VERSION=0.0.5
+
+cat >>confdefs.h <<EOF
+#define PACKAGE "$PACKAGE"
+EOF
+
+cat >>confdefs.h <<EOF
+#define VERSION "$VERSION"
+EOF
+
+# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
+# the ones we care about.
+
+# Autoconf 2.50 always computes EXEEXT.  However we need to be
+# compatible with 2.13, for now.  So we always define EXEEXT, but we
+# don't compute it.
+
+# Similar for OBJEXT -- only we only use OBJEXT if the user actually
+# requests that it be used.  This is a bit dumb.
+: ${OBJEXT=o}
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"}
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake"}
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+
+		    		    		    ac_config_headers="$ac_config_headers config.h"
+
+#AC_ARG_WITH(gsoap,
+#    [  --with-gsoap=<path>   prefix of gsoap port installation. e.g. /usr/local/soapcpp or /home/myusername/gsoap],
+#    [GSOAP_PREFIX=$with_gsoap],
+#    AC_MSG_ERROR([You must call configure with the --with-gsoap=<path> option. <path> is the path where you unpacked the gsoap distribution to.
+#    The headers and source downloaded from http://www.cs.fsu.edu/~engelen/soap.html must be available.
+#    e.g. --with-gsoap=/usr/local/gsoap])
+#)
+
+#AC_CHECK_FILE([[$with_gsoap/stdsoap2.h]], [echo stdsoap2.h found in $with_gsoap], AC_MSG_ERROR([$with_gsoap does not contain stdsoap2.h]))
+
+#AC_SUBST(GSOAP_PREFIX)
+#GSOAP_CPP_SRC="${GSOAP_PREFIX}/stdsoap2.cpp"
+#GSOAP_C_SRC="${GSOAP_PREFIX}/stdsoap2.c"
+#GSOAP_INCLUDE="-I${GSOAP_PREFIX}"
+#AC_SUBST(GSOAP_CPP_SRC)
+#AC_SUBST(GSOAP_C_SRC)
+#AC_SUBST(GSOAP_INCLUDE)
+
+# Extract the first word of "soapcpp2", so it can be a program name with args.
+set dummy soapcpp2; ac_word=$2
+echo "$as_me:1580: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_EXISTS_GSOAP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$EXISTS_GSOAP"; then
+  ac_cv_prog_EXISTS_GSOAP="$EXISTS_GSOAP" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_EXISTS_GSOAP="yes"
+echo "$as_me:1595: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+EXISTS_GSOAP=$ac_cv_prog_EXISTS_GSOAP
+if test -n "$EXISTS_GSOAP"; then
+  echo "$as_me:1603: result: $EXISTS_GSOAP" >&5
+echo "${ECHO_T}$EXISTS_GSOAP" >&6
+else
+  echo "$as_me:1606: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test -z "$EXISTS_GSOAP"; then
+   { { echo "$as_me:1611: error: please install gsoap - http://www.cs.fsu.edu/~engelen/soap.html" >&5
+echo "$as_me: error: please install gsoap - http://www.cs.fsu.edu/~engelen/soap.html" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# Check whether --enable-debug or --disable-debug was given.
+if test "${enable_debug+set}" = set; then
+  enableval="$enable_debug"
+  case "${enableval}" in
+  yes) debug=true ;;
+  no)  debug=false ;;
+  *) { { echo "$as_me:1622: error: bad value ${enableval} for --enable-debug" >&5
+echo "$as_me: error: bad value ${enableval} for --enable-debug" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+else
+  debug=false
+fi;
+
+if test x$debug = xtrue; then
+  DEBUG_TRUE=
+  DEBUG_FALSE='#'
+else
+  DEBUG_TRUE='#'
+  DEBUG_FALSE=
+fi
+
+CXXFLAGS=""
+if test x$debug = xtrue; then
+   CXXDEBUGDEFINES="-D_DEBUG"
+   APXS_CXX_OPTIONS="-Wc,-g"
+else
+   CXXDEBUGDEFINES="-D_NDEBUG"
+   APXS_CXX_OPTIONS=""
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:1655: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_CC="${ac_tool_prefix}gcc"
+echo "$as_me:1670: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:1678: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:1681: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:1690: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_CC="gcc"
+echo "$as_me:1705: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:1713: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:1716: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:1729: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_CC="${ac_tool_prefix}cc"
+echo "$as_me:1744: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:1752: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:1755: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:1764: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_CC="cc"
+echo "$as_me:1779: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:1787: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:1790: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:1803: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+  ac_prog_rejected=yes
+  continue
+fi
+ac_cv_prog_CC="cc"
+echo "$as_me:1823: found $ac_dir/$ac_word" >&5
+break
+done
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    set dummy "$ac_dir/$ac_word" ${1+"$@"}
+    shift
+    ac_cv_prog_CC="$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:1845: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:1848: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:1859: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+echo "$as_me:1874: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:1882: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:1885: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:1898: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_CC="$ac_prog"
+echo "$as_me:1913: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:1921: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:1924: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CC" && break
+done
+
+  CC=$ac_ct_CC
+fi
+
+fi
+
+test -z "$CC" && { { echo "$as_me:1936: error: no acceptable cc found in \$PATH" >&5
+echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:1941:" \
+     "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:1944: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:1947: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:1949: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:1952: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:1954: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:1957: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 1961 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:1977: checking for C compiler default output" >&5
+echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:1980: \"$ac_link_default\"") >&5
+  (eval $ac_link_default) 2>&5
+  ac_status=$?
+  echo "$as_me:1983: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Find the output, starting from the most likely.  This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+for ac_file in `ls a.exe conftest.exe 2>/dev/null;
+                ls a.out conftest 2>/dev/null;
+                ls a.* conftest.* 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
+    a.out ) # We found the default executable, but exeext='' is most
+            # certainly right.
+            break;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
+          export ac_cv_exeext
+          break;;
+    * ) break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:2006: error: C compiler cannot create executables" >&5
+echo "$as_me: error: C compiler cannot create executables" >&2;}
+   { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:2012: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:2017: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (eval echo "$as_me:2023: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:2026: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { echo "$as_me:2033: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  fi
+fi
+echo "$as_me:2041: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:2048: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:2050: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:2053: checking for executable suffix" >&5
+echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
+if { (eval echo "$as_me:2055: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:2058: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+          export ac_cv_exeext
+          break;;
+    * ) break;;
+  esac
+done
+else
+  { { echo "$as_me:2074: error: cannot compute EXEEXT: cannot compile and link" >&5
+echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:2080: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:2086: checking for object suffix" >&5
+echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 2092 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:2104: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:2107: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:2119: error: cannot compute OBJEXT: cannot compile" >&5
+echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:2126: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:2130: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 2136 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:2151: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:2154: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:2157: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:2160: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:2172: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:2178: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 2184 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:2196: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:2199: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:2202: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:2205: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:2215: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+# Some people use a C++ compiler to compile C.  Since we use `exit',
+# in C++ we need to declare it.  In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+  choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:2242: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:2245: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:2248: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:2251: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  for ac_declaration in \
+   ''\
+   '#include <stdlib.h>' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+#line 2263 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:2276: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:2279: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:2282: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:2285: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+#line 2295 "configure"
+#include "confdefs.h"
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:2307: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:2310: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:2313: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:2316: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_config_commands="$ac_config_commands default-1"
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+doit:
+	@echo done
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:2351: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include='#'
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote='"'
+      _am_result=BSD
+   fi
+fi
+
+echo "$as_me:2378: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
+
+depcc="$CC"   am_compiler_list=
+
+echo "$as_me:2384: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    echo '#include "conftest.h"' > conftest.c
+    echo 'int i;' > conftest.h
+    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=conftest.c object=conftest.o \
+       depfile=conftest.Po tmpdepfile=conftest.TPo \
+       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
+       grep conftest.h conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      am_cv_CC_dependencies_compiler_type=$depmode
+      break
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:2446: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE="depmode=$am_cv_CC_dependencies_compiler_type"
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:2455: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+#line 2476 "configure"
+#include "confdefs.h"
+#include <assert.h>
+                     Syntax error
+_ACEOF
+if { (eval echo "$as_me:2481: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:2487: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+#line 2510 "configure"
+#include "confdefs.h"
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:2514: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:2520: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:2557: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+#line 2567 "configure"
+#include "confdefs.h"
+#include <assert.h>
+                     Syntax error
+_ACEOF
+if { (eval echo "$as_me:2572: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:2578: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+#line 2601 "configure"
+#include "confdefs.h"
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:2605: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:2611: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:2639: error: C preprocessor \"$CPP\" fails sanity check" >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:2660: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+echo "$as_me:2675: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  echo "$as_me:2683: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6
+else
+  echo "$as_me:2686: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:2699: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_CXX="$ac_prog"
+echo "$as_me:2714: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  echo "$as_me:2722: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6
+else
+  echo "$as_me:2725: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CXX" && break
+done
+test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
+
+  CXX=$ac_ct_CXX
+fi
+
+# Provide some information about the compiler.
+echo "$as_me:2737:" \
+     "checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:2740: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:2743: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:2745: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:2748: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:2750: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:2753: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+echo "$as_me:2756: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 2762 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:2777: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:2780: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:2783: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:2786: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:2798: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="-g"
+echo "$as_me:2804: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 2810 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:2822: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:2825: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:2828: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:2831: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_prog_cxx_g=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:2841: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+for ac_declaration in \
+   ''\
+   '#include <stdlib.h>' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+#line 2868 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:2881: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:2884: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:2887: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:2890: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+#line 2900 "configure"
+#include "confdefs.h"
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:2912: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:2915: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:2918: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:2921: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX"  am_compiler_list=
+
+echo "$as_me:2945: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    echo '#include "conftest.h"' > conftest.c
+    echo 'int i;' > conftest.h
+    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=conftest.c object=conftest.o \
+       depfile=conftest.Po tmpdepfile=conftest.TPo \
+       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
+       grep conftest.h conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      am_cv_CXX_dependencies_compiler_type=$depmode
+      break
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:3007: result: $am_cv_CXX_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
+CXXDEPMODE="depmode=$am_cv_CXX_dependencies_compiler_type"
+
+# Extract the first word of "apxs", so it can be a program name with args.
+set dummy apxs; ac_word=$2
+echo "$as_me:3013: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_EXISTS_APXS+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$EXISTS_APXS"; then
+  ac_cv_prog_EXISTS_APXS="$EXISTS_APXS" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_EXISTS_APXS="yes"
+echo "$as_me:3028: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+EXISTS_APXS=$ac_cv_prog_EXISTS_APXS
+if test -n "$EXISTS_APXS"; then
+  echo "$as_me:3036: result: $EXISTS_APXS" >&5
+echo "${ECHO_T}$EXISTS_APXS" >&6
+else
+  echo "$as_me:3039: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test -z "$EXISTS_APXS"; then
+   { { echo "$as_me:3044: error: please install the apache apxs tool. Download apache http server from http://www.apache.org, compile and install it and make sure that apxs is in your path" >&5
+echo "$as_me: error: please install the apache apxs tool. Download apache http server from http://www.apache.org, compile and install it and make sure that apxs is in your path" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+if test "$GCC"; then
+   if test x$debug = xtrue; then
+	  CXXFLAGS="$CXXFLAGS -g"
+   else
+	  CXXFLAGS="$CXXFLAGS -O2"
+   fi
+fi
+
+# Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" = set; then
+  enableval="$enable_shared"
+  p=${PACKAGE-default}
+case $enableval in
+yes) enable_shared=yes ;;
+no) enable_shared=no ;;
+*)
+  enable_shared=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_shared=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac
+else
+  enable_shared=yes
+fi;
+# Check whether --enable-static or --disable-static was given.
+if test "${enable_static+set}" = set; then
+  enableval="$enable_static"
+  p=${PACKAGE-default}
+case $enableval in
+yes) enable_static=yes ;;
+no) enable_static=no ;;
+*)
+  enable_static=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_static=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac
+else
+  enable_static=yes
+fi;
+# Check whether --enable-fast-install or --disable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+  enableval="$enable_fast_install"
+  p=${PACKAGE-default}
+case $enableval in
+yes) enable_fast_install=yes ;;
+no) enable_fast_install=no ;;
+*)
+  enable_fast_install=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_fast_install=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac
+else
+  enable_fast_install=yes
+fi;
+# Find the correct PATH separator.  Usually this is `:', but
+# DJGPP uses `;' like DOS.
+if test "X${PATH_SEPARATOR+set}" != Xset; then
+  UNAME=${UNAME-`uname 2>/dev/null`}
+  case X$UNAME in
+    *-DOS) lt_cv_sys_path_separator=';' ;;
+    *)     lt_cv_sys_path_separator=':' ;;
+  esac
+  PATH_SEPARATOR=$lt_cv_sys_path_separator
+fi
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval="$with_gnu_ld"
+  test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi;
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  echo "$as_me:3144: checking for ld used by GCC" >&5
+echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | [A-Za-z]:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  echo "$as_me:3174: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+else
+  echo "$as_me:3177: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$LD"; then
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+	test "$with_gnu_ld" != no && break
+      else
+	test "$with_gnu_ld" != yes && break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  echo "$as_me:3207: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+  echo "$as_me:3210: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+test -z "$LD" && { { echo "$as_me:3213: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+echo "$as_me:3216: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+  lt_cv_prog_gnu_ld=yes
+else
+  lt_cv_prog_gnu_ld=no
+fi
+fi
+echo "$as_me:3228: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+echo "$as_me:3232: checking for $LD option to reload object files" >&5
+echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
+if test "${lt_cv_ld_reload_flag+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_ld_reload_flag='-r'
+fi
+echo "$as_me:3239: result: $lt_cv_ld_reload_flag" >&5
+echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
+reload_flag=$lt_cv_ld_reload_flag
+test -n "$reload_flag" && reload_flag=" $reload_flag"
+
+echo "$as_me:3244: checking for BSD-compatible nm" >&5
+echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
+if test "${lt_cv_path_NM+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+    test -z "$ac_dir" && ac_dir=.
+    tmp_nm=$ac_dir/${ac_tool_prefix}nm
+    if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
+      # Check to see if the nm accepts a BSD-compat flag.
+      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+      #   nm: unknown option "B" ignored
+      # Tru64's nm complains that /dev/null is an invalid object file
+      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
+	lt_cv_path_NM="$tmp_nm -B"
+	break
+      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+	lt_cv_path_NM="$tmp_nm -p"
+	break
+      else
+	lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	continue # so that we can try to find one that supports BSD flags
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi
+fi
+
+NM="$lt_cv_path_NM"
+echo "$as_me:3280: result: $NM" >&5
+echo "${ECHO_T}$NM" >&6
+
+echo "$as_me:3283: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  echo "$as_me:3287: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me:3290: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
+fi
+
+echo "$as_me:3294: checking how to recognise dependant libraries" >&5
+echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
+if test "${lt_cv_deplibs_check_method+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given egrep regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix4* | aix5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi4*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin* | mingw* | pw32*)
+  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  case "$host_os" in
+  rhapsody* | darwin1.[012])
+    lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
+    ;;
+  *) # Darwin 1.3 on
+    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
+    ;;
+  esac
+  ;;
+
+freebsd*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20*|hpux11*)
+  lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libc.sl
+  ;;
+
+irix5* | irix6*)
+  case $host_os in
+  irix5*)
+    # this will be overridden with pass_all, but let us keep it just in case
+    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+    ;;
+  *)
+    case $LD in
+    *-32|*"-32 ") libmagic=32-bit;;
+    *-n32|*"-n32 ") libmagic=N32;;
+    *-64|*"-64 ") libmagic=64-bit;;
+    *) libmagic=never-match;;
+    esac
+    # this will be overridden with pass_all, but let us keep it just in case
+    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+    ;;
+  esac
+  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  case $host_cpu in
+  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | s390* | m68* | mips* )
+    lt_cv_deplibs_check_method=pass_all ;;
+  *)
+    # glibc up to 2.1.1 does not perform some relocations on ARM
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
+  esac
+  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+openbsd*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+  else
+    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  # this will be overridden with pass_all, but let us keep it just in case
+  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sco3.2v5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  lt_cv_file_magic_test_file=/lib/libc.so
+  ;;
+
+sysv5uw[78]* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  esac
+  ;;
+esac
+
+fi
+echo "$as_me:3472: result: $lt_cv_deplibs_check_method" >&5
+echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+echo "$as_me:3478: checking command to parse $NM output" >&5
+echo $ECHO_N "checking command to parse $NM output... $ECHO_C" >&6
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Transform the above into a raw symbol and a C symbol.
+symxfrm='\1 \2\3 \3'
+
+# Transform an extracted symbol line into a proper C declaration
+lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[BCDT]'
+  ;;
+cygwin* | mingw* | pw32*)
+  symcode='[ABCDGISTW]'
+  ;;
+hpux*) # Its linker distinguishes data from code symbols
+  lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+  lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  ;;
+irix*)
+  symcode='[BCDEGRST]'
+  ;;
+solaris* | sysv5*)
+  symcode='[BDT]'
+  ;;
+sysv4)
+  symcode='[DFNSTU]'
+  ;;
+esac
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $host_os in
+mingw*)
+  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
+  symcode='[ABCDGISTW]'
+fi
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Write the raw and C identifiers.
+lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ 	]\($symcode$symcode*\)[ 	][ 	]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+  rm -f conftest*
+  cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+EOF
+
+  if { (eval echo "$as_me:3559: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:3562: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if { (eval echo "$as_me:3566: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
+  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+  ac_status=$?
+  echo "$as_me:3569: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if egrep ' nm_test_var$' "$nlist" >/dev/null; then
+	if egrep ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
+
+	  cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr void *
+#else
+# define lt_ptr char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr address;
+}
+lt_preloaded_symbols[] =
+{
+EOF
+	  sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
+	  cat <<\EOF >> conftest.$ac_ext
+  {0, (lt_ptr) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  save_LIBS="$LIBS"
+	  save_CFLAGS="$CFLAGS"
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$no_builtin_flag"
+	  if { (eval echo "$as_me:3621: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:3624: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest; then
+	    pipe_works=yes
+	  fi
+	  LIBS="$save_LIBS"
+	  CFLAGS="$save_CFLAGS"
+	else
+	  echo "cannot find nm_test_func in $nlist" >&5
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&5
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+    fi
+  else
+    echo "$progname: failed program was:" >&5
+    cat conftest.$ac_ext >&5
+  fi
+  rm -f conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+
+fi
+
+global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  global_symbol_to_cdecl=
+  global_symbol_to_c_name_address=
+else
+  global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
+  global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
+fi
+if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
+then
+  echo "$as_me:3665: result: failed" >&5
+echo "${ECHO_T}failed" >&6
+else
+  echo "$as_me:3668: result: ok" >&5
+echo "${ECHO_T}ok" >&6
+fi
+
+for ac_header in dlfcn.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:3675: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 3681 "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:3685: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:3691: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:3710: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    echo "$as_me:3724: checking for ${ac_tool_prefix}file" >&5
+echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MAGIC_CMD in
+  /*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+  ?:/*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
+  ;;
+  *)
+  ac_save_MAGIC_CMD="$MAGIC_CMD"
+  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="/usr/bin:$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/${ac_tool_prefix}file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    egrep "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  MAGIC_CMD="$ac_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  echo "$as_me:3779: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+  echo "$as_me:3782: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    echo "$as_me:3788: checking for file" >&5
+echo $ECHO_N "checking for file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MAGIC_CMD in
+  /*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+  ?:/*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
+  ;;
+  *)
+  ac_save_MAGIC_CMD="$MAGIC_CMD"
+  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="/usr/bin:$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    egrep "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  MAGIC_CMD="$ac_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  echo "$as_me:3843: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+  echo "$as_me:3846: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  else
+    MAGIC_CMD=:
+  fi
+fi
+
+  fi
+  ;;
+esac
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:3862: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+echo "$as_me:3877: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  echo "$as_me:3885: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+  echo "$as_me:3888: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:3897: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_RANLIB="ranlib"
+echo "$as_me:3912: found $ac_dir/$ac_word" >&5
+break
+done
+
+  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  echo "$as_me:3921: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+  echo "$as_me:3924: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  RANLIB=$ac_ct_RANLIB
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:3936: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+echo "$as_me:3951: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  echo "$as_me:3959: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+  echo "$as_me:3962: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:3971: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_STRIP="strip"
+echo "$as_me:3986: found $ac_dir/$ac_word" >&5
+break
+done
+
+  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  echo "$as_me:3995: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+  echo "$as_me:3998: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  STRIP=$ac_ct_STRIP
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+enable_dlopen=yes
+enable_win32_dll=yes
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+  enableval="$enable_libtool_lock"
+
+fi;
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '#line 4022 "configure"' > conftest.$ac_ext
+  if { (eval echo "$as_me:4023: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:4026: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  echo "$as_me:4047: checking whether the C compiler needs -belf" >&5
+echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
+if test "${lt_cv_cc_needs_belf+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+     ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+     cat >conftest.$ac_ext <<_ACEOF
+#line 4060 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4072: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:4075: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:4078: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:4081: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  lt_cv_cc_needs_belf=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+lt_cv_cc_needs_belf=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+     ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+echo "$as_me:4097: result: $lt_cv_cc_needs_belf" >&5
+echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+
+*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+echo "$as_me:4109: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_DLLTOOL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$DLLTOOL"; then
+  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+echo "$as_me:4124: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+  echo "$as_me:4132: result: $DLLTOOL" >&5
+echo "${ECHO_T}$DLLTOOL" >&6
+else
+  echo "$as_me:4135: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+  ac_ct_DLLTOOL=$DLLTOOL
+  # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+echo "$as_me:4144: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_DLLTOOL"; then
+  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+echo "$as_me:4159: found $ac_dir/$ac_word" >&5
+break
+done
+
+  test -z "$ac_cv_prog_ac_ct_DLLTOOL" && ac_cv_prog_ac_ct_DLLTOOL="false"
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+  echo "$as_me:4168: result: $ac_ct_DLLTOOL" >&5
+echo "${ECHO_T}$ac_ct_DLLTOOL" >&6
+else
+  echo "$as_me:4171: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  DLLTOOL=$ac_ct_DLLTOOL
+else
+  DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+echo "$as_me:4183: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AS+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AS"; then
+  ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_AS="${ac_tool_prefix}as"
+echo "$as_me:4198: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+  echo "$as_me:4206: result: $AS" >&5
+echo "${ECHO_T}$AS" >&6
+else
+  echo "$as_me:4209: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+  ac_ct_AS=$AS
+  # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+echo "$as_me:4218: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_AS"; then
+  ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_AS="as"
+echo "$as_me:4233: found $ac_dir/$ac_word" >&5
+break
+done
+
+  test -z "$ac_cv_prog_ac_ct_AS" && ac_cv_prog_ac_ct_AS="false"
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+  echo "$as_me:4242: result: $ac_ct_AS" >&5
+echo "${ECHO_T}$ac_ct_AS" >&6
+else
+  echo "$as_me:4245: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  AS=$ac_ct_AS
+else
+  AS="$ac_cv_prog_AS"
+fi
+
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+echo "$as_me:4257: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_OBJDUMP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$OBJDUMP"; then
+  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+echo "$as_me:4272: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+  echo "$as_me:4280: result: $OBJDUMP" >&5
+echo "${ECHO_T}$OBJDUMP" >&6
+else
+  echo "$as_me:4283: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+  ac_ct_OBJDUMP=$OBJDUMP
+  # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+echo "$as_me:4292: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_OBJDUMP"; then
+  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_OBJDUMP="objdump"
+echo "$as_me:4307: found $ac_dir/$ac_word" >&5
+break
+done
+
+  test -z "$ac_cv_prog_ac_ct_OBJDUMP" && ac_cv_prog_ac_ct_OBJDUMP="false"
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+  echo "$as_me:4316: result: $ac_ct_OBJDUMP" >&5
+echo "${ECHO_T}$ac_ct_OBJDUMP" >&6
+else
+  echo "$as_me:4319: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  OBJDUMP=$ac_ct_OBJDUMP
+else
+  OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+  # recent cygwin and mingw systems supply a stub DllMain which the user
+  # can override, but on older systems we have to supply one
+  echo "$as_me:4330: checking if libtool should supply DllMain function" >&5
+echo $ECHO_N "checking if libtool should supply DllMain function... $ECHO_C" >&6
+if test "${lt_cv_need_dllmain+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 4336 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
+      DllMain (0, 0, 0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4349: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:4352: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:4355: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:4358: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  lt_cv_need_dllmain=no
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+lt_cv_need_dllmain=yes
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:4368: result: $lt_cv_need_dllmain" >&5
+echo "${ECHO_T}$lt_cv_need_dllmain" >&6
+
+  case $host/$CC in
+  *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
+    # old mingw systems require "-dll" to link a DLL, while more recent ones
+    # require "-mdll"
+    SAVE_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -mdll"
+    echo "$as_me:4377: checking how to link DLLs" >&5
+echo $ECHO_N "checking how to link DLLs... $ECHO_C" >&6
+if test "${lt_cv_cc_dll_switch+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 4383 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4395: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:4398: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:4401: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:4404: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  lt_cv_cc_dll_switch=-mdll
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+lt_cv_cc_dll_switch=-dll
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:4414: result: $lt_cv_cc_dll_switch" >&5
+echo "${ECHO_T}$lt_cv_cc_dll_switch" >&6
+    CFLAGS="$SAVE_CFLAGS" ;;
+  *-*-cygwin* | *-*-pw32*)
+    # cygwin systems need to pass --dll to the linker, and not link
+    # crt.o which will require a WinMain@16 definition.
+    lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
+  esac
+  ;;
+
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e s/^X//'
+sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Constants:
+rm="rm -f"
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+need_locks="$enable_libtool_lock"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
+
+if test x"$host" != x"$build"; then
+  ac_tool_prefix=${host_alias}-
+else
+  ac_tool_prefix=
+fi
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
+    ;;
+  *)
+    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+# Allow CC to be a program name with arguments.
+set dummy $CC
+compiler="$2"
+
+echo "$as_me:4510: checking for objdir" >&5
+echo $ECHO_N "checking for objdir... $ECHO_C" >&6
+rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+echo "$as_me:4521: result: $objdir" >&5
+echo "${ECHO_T}$objdir" >&6
+
+# Check whether --with-pic or --without-pic was given.
+if test "${with_pic+set}" = set; then
+  withval="$with_pic"
+  pic_mode="$withval"
+else
+  pic_mode=default
+fi;
+test -z "$pic_mode" && pic_mode=default
+
+# We assume here that the value for lt_cv_prog_cc_pic will not be cached
+# in isolation, and that seeing it set (from the cache) indicates that
+# the associated values are set (in the cache) correctly too.
+echo "$as_me:4536: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+if test "${lt_cv_prog_cc_pic+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+   lt_cv_prog_cc_pic=
+  lt_cv_prog_cc_shlib=
+  lt_cv_prog_cc_wl=
+  lt_cv_prog_cc_static=
+  lt_cv_prog_cc_no_builtin=
+  lt_cv_prog_cc_can_build_shared=$can_build_shared
+
+  if test "$GCC" = yes; then
+    lt_cv_prog_cc_wl='-Wl,'
+    lt_cv_prog_cc_static='-static'
+
+    case $host_os in
+    aix*)
+      # Below there is a dirty hack to force normal static linking with -ldl
+      # The problem is because libdl dynamically linked with both libc and
+      # libC (AIX C++ library), which obviously doesn't included in libraries
+      # list by gcc. This cause undefined symbols with -static flags.
+      # This hack allows C programs to be linked with "-static -ldl", but
+      # not sure about C++ programs.
+      lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
+      ;;
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
+      ;;
+    beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_cv_prog_cc_pic='-fno-common'
+      ;;
+    cygwin* | mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_cv_prog_cc_pic='-DDLL_EXPORT'
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	 lt_cv_prog_cc_pic=-Kconform_pic
+      fi
+      ;;
+    *)
+      lt_cv_prog_cc_pic='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for PIC flags for the system compiler.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      lt_cv_prog_cc_wl='-Wl,'
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_cv_prog_cc_static='-Bstatic'
+      else
+	lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
+      lt_cv_prog_cc_wl='-Wl,'
+      lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
+      lt_cv_prog_cc_pic='+Z'
+      ;;
+
+    irix5* | irix6*)
+      lt_cv_prog_cc_wl='-Wl,'
+      lt_cv_prog_cc_static='-non_shared'
+      # PIC (with -KPIC) is the default.
+      ;;
+
+    cygwin* | mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_cv_prog_cc_pic='-DDLL_EXPORT'
+      ;;
+
+    newsos6)
+      lt_cv_prog_cc_pic='-KPIC'
+      lt_cv_prog_cc_static='-Bstatic'
+      ;;
+
+    osf3* | osf4* | osf5*)
+      # All OSF/1 code is PIC.
+      lt_cv_prog_cc_wl='-Wl,'
+      lt_cv_prog_cc_static='-non_shared'
+      ;;
+
+    sco3.2v5*)
+      lt_cv_prog_cc_pic='-Kpic'
+      lt_cv_prog_cc_static='-dn'
+      lt_cv_prog_cc_shlib='-belf'
+      ;;
+
+    solaris*)
+      lt_cv_prog_cc_pic='-KPIC'
+      lt_cv_prog_cc_static='-Bstatic'
+      lt_cv_prog_cc_wl='-Wl,'
+      ;;
+
+    sunos4*)
+      lt_cv_prog_cc_pic='-PIC'
+      lt_cv_prog_cc_static='-Bstatic'
+      lt_cv_prog_cc_wl='-Qoption ld '
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+      lt_cv_prog_cc_pic='-KPIC'
+      lt_cv_prog_cc_static='-Bstatic'
+      if test "x$host_vendor" = xsni; then
+	lt_cv_prog_cc_wl='-LD'
+      else
+	lt_cv_prog_cc_wl='-Wl,'
+      fi
+      ;;
+
+    uts4*)
+      lt_cv_prog_cc_pic='-pic'
+      lt_cv_prog_cc_static='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_cv_prog_cc_pic='-Kconform_pic'
+	lt_cv_prog_cc_static='-Bstatic'
+      fi
+      ;;
+
+    *)
+      lt_cv_prog_cc_can_build_shared=no
+      ;;
+    esac
+  fi
+
+fi
+
+if test -z "$lt_cv_prog_cc_pic"; then
+  echo "$as_me:4683: result: none" >&5
+echo "${ECHO_T}none" >&6
+else
+  echo "$as_me:4686: result: $lt_cv_prog_cc_pic" >&5
+echo "${ECHO_T}$lt_cv_prog_cc_pic" >&6
+
+  # Check to make sure the pic_flag actually works.
+  echo "$as_me:4690: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_cv_prog_cc_pic works... $ECHO_C" >&6
+  if test "${lt_cv_prog_cc_pic_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      save_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
+    cat >conftest.$ac_ext <<_ACEOF
+#line 4698 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4710: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:4713: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:4716: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:4719: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+        case $host_os in
+      hpux9* | hpux10* | hpux11*)
+	# On HP-UX, both CC and GCC only warn that PIC is supported... then
+	# they create non-PIC objects.  So, if there were any warnings, we
+	# assume that PIC is not supported.
+	if test -s conftest.err; then
+	  lt_cv_prog_cc_pic_works=no
+	else
+	  lt_cv_prog_cc_pic_works=yes
+	fi
+	;;
+      *)
+	lt_cv_prog_cc_pic_works=yes
+	;;
+      esac
+
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+      lt_cv_prog_cc_pic_works=no
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+    CFLAGS="$save_CFLAGS"
+
+fi
+
+  if test "X$lt_cv_prog_cc_pic_works" = Xno; then
+    lt_cv_prog_cc_pic=
+    lt_cv_prog_cc_can_build_shared=no
+  else
+    lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
+  fi
+
+  echo "$as_me:4755: result: $lt_cv_prog_cc_pic_works" >&5
+echo "${ECHO_T}$lt_cv_prog_cc_pic_works" >&6
+fi
+
+# Check for any special shared library compilation flags.
+if test -n "$lt_cv_prog_cc_shlib"; then
+  { echo "$as_me:4761: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&5
+echo "$as_me: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&2;}
+  if echo "$old_CC $old_CFLAGS " | egrep -e "[ 	]$lt_cv_prog_cc_shlib[ 	]" >/dev/null; then :
+  else
+   { echo "$as_me:4765: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
+echo "$as_me: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
+    lt_cv_prog_cc_can_build_shared=no
+  fi
+fi
+
+echo "$as_me:4771: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_cv_prog_cc_static works... $ECHO_C" >&6
+if test "${lt_cv_prog_cc_static_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+    lt_cv_prog_cc_static_works=no
+  save_LDFLAGS="$LDFLAGS"
+  LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 4780 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4792: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:4795: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:4798: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:4801: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  lt_cv_prog_cc_static_works=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+  LDFLAGS="$save_LDFLAGS"
+
+fi
+
+# Belt *and* braces to stop my trousers falling down:
+test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
+echo "$as_me:4815: result: $lt_cv_prog_cc_static_works" >&5
+echo "${ECHO_T}$lt_cv_prog_cc_static_works" >&6
+
+pic_flag="$lt_cv_prog_cc_pic"
+special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
+wl="$lt_cv_prog_cc_wl"
+link_static_flag="$lt_cv_prog_cc_static"
+no_builtin_flag="$lt_cv_prog_cc_no_builtin"
+can_build_shared="$lt_cv_prog_cc_can_build_shared"
+
+# Check to see if options -o and -c are simultaneously supported by compiler
+echo "$as_me:4826: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_compiler_c_o+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+$rm -r conftest 2>/dev/null
+mkdir conftest
+cd conftest
+echo "int some_variable = 0;" > conftest.$ac_ext
+mkdir out
+# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
+# that will create temporary files in the current directory regardless of
+# the output directory.  Thus, making CWD read-only will cause this test
+# to fail, enabling locking or at least warning the user not to do parallel
+# builds.
+chmod -w .
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
+compiler_c_o=no
+if { (eval echo configure:4846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
+  # The compiler can only warn and ignore the option if not recognized
+  # So say no if there are warnings
+  if test -s out/conftest.err; then
+    lt_cv_compiler_c_o=no
+  else
+    lt_cv_compiler_c_o=yes
+  fi
+else
+  # Append any errors to the config.log.
+  cat out/conftest.err 1>&5
+  lt_cv_compiler_c_o=no
+fi
+CFLAGS="$save_CFLAGS"
+chmod u+w .
+$rm conftest* out/*
+rmdir out
+cd ..
+rmdir conftest
+$rm -r conftest 2>/dev/null
+
+fi
+
+compiler_c_o=$lt_cv_compiler_c_o
+echo "$as_me:4870: result: $compiler_c_o" >&5
+echo "${ECHO_T}$compiler_c_o" >&6
+
+if test x"$compiler_c_o" = x"yes"; then
+  # Check to see if we can write to a .lo
+  echo "$as_me:4875: checking if $compiler supports -c -o file.lo" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.lo... $ECHO_C" >&6
+  if test "${lt_cv_compiler_o_lo+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+  lt_cv_compiler_o_lo=no
+  save_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -c -o conftest.lo"
+  save_objext="$ac_objext"
+  ac_objext=lo
+  cat >conftest.$ac_ext <<_ACEOF
+#line 4887 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+int some_variable = 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4899: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:4902: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:4905: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:4908: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+      # The compiler can only warn and ignore the option if not recognized
+    # So say no if there are warnings
+    if test -s conftest.err; then
+      lt_cv_compiler_o_lo=no
+    else
+      lt_cv_compiler_o_lo=yes
+    fi
+
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  ac_objext="$save_objext"
+  CFLAGS="$save_CFLAGS"
+
+fi
+
+  compiler_o_lo=$lt_cv_compiler_o_lo
+  echo "$as_me:4929: result: $compiler_o_lo" >&5
+echo "${ECHO_T}$compiler_o_lo" >&6
+else
+  compiler_o_lo=no
+fi
+
+# Check to see if we can do hard links to lock some files if needed
+hard_links="nottested"
+if test "$compiler_c_o" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  echo "$as_me:4939: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  echo "$as_me:4947: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+  if test "$hard_links" = no; then
+    { echo "$as_me:4950: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+if test "$GCC" = yes; then
+  # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
+  echo "$as_me:4960: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
+  echo "int some_variable = 0;" > conftest.$ac_ext
+  save_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
+  compiler_rtti_exceptions=no
+  cat >conftest.$ac_ext <<_ACEOF
+#line 4967 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+int some_variable = 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4979: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:4982: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:4985: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:4988: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+      # The compiler can only warn and ignore the option if not recognized
+    # So say no if there are warnings
+    if test -s conftest.err; then
+      compiler_rtti_exceptions=no
+    else
+      compiler_rtti_exceptions=yes
+    fi
+
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  CFLAGS="$save_CFLAGS"
+  echo "$as_me:5004: result: $compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$compiler_rtti_exceptions" >&6
+
+  if test "$compiler_rtti_exceptions" = "yes"; then
+    no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
+  else
+    no_builtin_flag=' -fno-builtin'
+  fi
+fi
+
+# See if the linker supports building shared libraries.
+echo "$as_me:5015: checking whether the linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+allow_undefined_flag=
+no_undefined_flag=
+need_lib_prefix=unknown
+need_version=unknown
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+archive_cmds=
+archive_expsym_cmds=
+old_archive_from_new_cmds=
+old_archive_from_expsyms_cmds=
+export_dynamic_flag_spec=
+whole_archive_flag_spec=
+thread_safe_flag_spec=
+hardcode_into_libs=no
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+hardcode_shlibpath_var=unsupported
+runpath_var=
+link_all_deplibs=unknown
+always_export_symbols=no
+export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
+# include_expsyms should be a list of space-separated symbols to be *always*
+# included in the symbol list
+include_expsyms=
+# exclude_expsyms can be an egrep regular expression of symbols to exclude
+# it will be wrapped by ` (' and `)$', so one must not match beginning or
+# end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+# as well as any symbol that contains `d'.
+exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
+# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+# platforms (ab)use it in PIC code, but their linkers get confused if
+# the symbol is explicitly referenced.  Since portable code cannot
+# rely on this symbol name, it's probably fine to never include it in
+# preloaded symbol tables.
+extract_expsyms_cmds=
+
+case $host_os in
+cygwin* | mingw* | pw32*)
+  # FIXME: the MSVC++ port hasn't been tested in a loooong time
+  # When not using gcc, we currently assume that we are using
+  # Microsoft Visual C++.
+  if test "$GCC" != yes; then
+    with_gnu_ld=no
+  fi
+  ;;
+openbsd*)
+  with_gnu_ld=no
+  ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+  # If archive_cmds runs LD, not CC, wlarc should be empty
+  wlarc='${wl}'
+
+  # See if GNU ld supports shared libraries.
+  case $host_os in
+  aix3* | aix4* | aix5*)
+    # On AIX, the GNU linker is very broken
+    # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
+    ld_shlibs=no
+    cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+    ;;
+
+  amigaos*)
+    archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+    hardcode_libdir_flag_spec='-L$libdir'
+    hardcode_minus_L=yes
+
+    # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+    # that the semantics of dynamic libraries on AmigaOS, at least up
+    # to version 4, is to share data among multiple programs linked
+    # with the same dynamic library.  Since this doesn't match the
+    # behavior of shared libraries on other platforms, we can use
+    # them.
+    ld_shlibs=no
+    ;;
+
+  beos*)
+    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      allow_undefined_flag=unsupported
+      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+      # support --undefined.  This deserves some investigation.  FIXME
+      archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    else
+      ld_shlibs=no
+    fi
+    ;;
+
+  cygwin* | mingw* | pw32*)
+    # hardcode_libdir_flag_spec is actually meaningless, as there is
+    # no search path for DLLs.
+    hardcode_libdir_flag_spec='-L$libdir'
+    allow_undefined_flag=unsupported
+    always_export_symbols=yes
+
+    extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
+      sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
+      test -f $output_objdir/impgen.exe || (cd $output_objdir && \
+      if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
+      else $CC -o impgen impgen.c ; fi)~
+      $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
+
+    old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
+
+    # cygwin and mingw dlls have different entry points and sets of symbols
+    # to exclude.
+    # FIXME: what about values for MSVC?
+    dll_entry=__cygwin_dll_entry@12
+    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
+    case $host_os in
+    mingw*)
+      # mingw values
+      dll_entry=_DllMainCRTStartup@12
+      dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
+      ;;
+    esac
+
+    # mingw and cygwin differ, and it's simplest to just exclude the union
+    # of the two symbol sets.
+    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
+
+    # recent cygwin and mingw systems supply a stub DllMain which the user
+    # can override, but on older systems we have to supply one (in ltdll.c)
+    if test "x$lt_cv_need_dllmain" = "xyes"; then
+      ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
+      ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
+	test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
+    else
+      ltdll_obj=
+      ltdll_cmds=
+    fi
+
+    # Extract the symbol export list from an `--export-all' def file,
+    # then regenerate the def file from the symbol export list, so that
+    # the compiled dll only exports the symbol export list.
+    # Be careful not to strip the DATA tag left be newer dlltools.
+    export_symbols_cmds="$ltdll_cmds"'
+      $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
+      sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
+
+    # If the export-symbols file already is a .def file (1st line
+    # is EXPORTS), use it as is.
+    # If DATA tags from a recent dlltool are present, honour them!
+    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
+	cp $export_symbols $output_objdir/$soname-def;
+      else
+	echo EXPORTS > $output_objdir/$soname-def;
+	_lt_hint=1;
+	cat $export_symbols | while read symbol; do
+	 set dummy \$symbol;
+	 case \$# in
+	   2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
+	   *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
+	 esac;
+	 _lt_hint=`expr 1 + \$_lt_hint`;
+	done;
+      fi~
+      '"$ltdll_cmds"'
+      $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
+      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
+      $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
+      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
+      $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
+    ;;
+
+  netbsd*)
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+      wlarc=
+    else
+      archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+    fi
+    ;;
+
+  solaris* | sysv5*)
+    if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
+      ld_shlibs=no
+      cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+    elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+    else
+      ld_shlibs=no
+    fi
+    ;;
+
+  sunos4*)
+    archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+    wlarc=
+    hardcode_direct=yes
+    hardcode_shlibpath_var=no
+    ;;
+
+  *)
+    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+    else
+      ld_shlibs=no
+    fi
+    ;;
+  esac
+
+  if test "$ld_shlibs" = yes; then
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec='${wl}--export-dynamic'
+    case $host_os in
+    cygwin* | mingw* | pw32*)
+      # dlltool doesn't understand --whole-archive et. al.
+      whole_archive_flag_spec=
+      ;;
+    *)
+      # ancient GNU ld didn't support --whole-archive et. al.
+      if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
+	whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+	whole_archive_flag_spec=
+      fi
+      ;;
+    esac
+  fi
+else
+  # PORTME fill in a description of your system's linker (not GNU ld)
+  case $host_os in
+  aix3*)
+    allow_undefined_flag=unsupported
+    always_export_symbols=yes
+    archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+    # Note: this linker hardcodes the directories in LIBPATH if there
+    # are no directories specified by -L.
+    hardcode_minus_L=yes
+    if test "$GCC" = yes && test -z "$link_static_flag"; then
+      # Neither direct hardcoding nor static linking is supported with a
+      # broken collect2.
+      hardcode_direct=unsupported
+    fi
+    ;;
+
+  aix4* | aix5*)
+    if test "$host_cpu" = ia64; then
+      # On IA64, the linker does run time linking by default, so we don't
+      # have to do anything special.
+      aix_use_runtimelinking=no
+      exp_sym_flag='-Bexport'
+      no_entry_flag=""
+    else
+      aix_use_runtimelinking=no
+
+      # Test if we are trying to use run time linking or normal
+      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+      # need to do runtime linking.
+      case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+	for ld_flag in $LDFLAGS; do
+	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	    aix_use_runtimelinking=yes
+	    break
+	  fi
+	done
+      esac
+
+      exp_sym_flag='-bexport'
+      no_entry_flag='-bnoentry'
+    fi
+
+    # When large executables or shared objects are built, AIX ld can
+    # have problems creating the table of contents.  If linking a library
+    # or program results in "error TOC overflow" add -mminimal-toc to
+    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+    hardcode_direct=yes
+    archive_cmds=''
+    hardcode_libdir_separator=':'
+    if test "$GCC" = yes; then
+      case $host_os in aix4.[012]|aix4.[012].*)
+	collect2name=`${CC} -print-prog-name=collect2`
+	if test -f "$collect2name" && \
+	  strings "$collect2name" | grep resolve_lib_name >/dev/null
+	then
+	  # We have reworked collect2
+	  hardcode_direct=yes
+	else
+	  # We have old collect2
+	  hardcode_direct=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  hardcode_minus_L=yes
+	  hardcode_libdir_flag_spec='-L$libdir'
+	  hardcode_libdir_separator=
+	fi
+      esac
+
+      shared_flag='-shared'
+    else
+      # not using gcc
+      if test "$host_cpu" = ia64; then
+	shared_flag='${wl}-G'
+      else
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag='${wl}-G'
+	else
+	  shared_flag='${wl}-bM:SRE'
+	fi
+      fi
+    fi
+
+    # It seems that -bexpall can do strange things, so it is better to
+    # generate a list of symbols to export.
+    always_export_symbols=yes
+    if test "$aix_use_runtimelinking" = yes; then
+      # Warning - without using the other runtime loading flags (-brtl),
+      # -berok will link without error, but may produce a broken library.
+      allow_undefined_flag='-berok'
+      hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
+      archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+    else
+      if test "$host_cpu" = ia64; then
+	hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+	allow_undefined_flag="-z nodefs"
+	archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+      else
+	hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
+	# Warning - without using the other run time loading flags,
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag='${wl}-berok'
+	# This is a bit strange, but is similar to how AIX traditionally builds
+	# it's shared libraries.
+	archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
+      fi
+    fi
+    ;;
+
+  amigaos*)
+    archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+    hardcode_libdir_flag_spec='-L$libdir'
+    hardcode_minus_L=yes
+    # see comment about different semantics on the GNU ld section
+    ld_shlibs=no
+    ;;
+
+  cygwin* | mingw* | pw32*)
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    # hardcode_libdir_flag_spec is actually meaningless, as there is
+    # no search path for DLLs.
+    hardcode_libdir_flag_spec=' '
+    allow_undefined_flag=unsupported
+    # Tell ltmain to make .lib files, not .a files.
+    libext=lib
+    # FIXME: Setting linknames here is a bad hack.
+    archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+    # The linker will automatically build a .lib file if we build a DLL.
+    old_archive_from_new_cmds='true'
+    # FIXME: Should let the user specify the lib program.
+    old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
+    fix_srcfile_path='`cygpath -w "$srcfile"`'
+    ;;
+
+  darwin* | rhapsody*)
+    case "$host_os" in
+    rhapsody* | darwin1.[012])
+      allow_undefined_flag='-undefined suppress'
+      ;;
+    *) # Darwin 1.3 on
+      allow_undefined_flag='-flat_namespace -undefined suppress'
+      ;;
+    esac
+    # FIXME: Relying on posixy $() will cause problems for
+    #        cross-compilation, but unfortunately the echo tests do not
+    #        yet detect zsh echo's removal of \ escapes.
+    archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
+    # We need to add '_' to the symbols in $export_symbols first
+    #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
+    hardcode_direct=yes
+    hardcode_shlibpath_var=no
+    whole_archive_flag_spec='-all_load $convenience'
+    ;;
+
+  freebsd1*)
+    ld_shlibs=no
+    ;;
+
+  # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+  # support.  Future versions do this automatically, but an explicit c++rt0.o
+  # does not break anything, and helps significantly (at the cost of a little
+  # extra space).
+  freebsd2.2*)
+    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+    hardcode_libdir_flag_spec='-R$libdir'
+    hardcode_direct=yes
+    hardcode_shlibpath_var=no
+    ;;
+
+  # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+  freebsd2*)
+    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+    hardcode_direct=yes
+    hardcode_minus_L=yes
+    hardcode_shlibpath_var=no
+    ;;
+
+  # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+  freebsd*)
+    archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+    hardcode_libdir_flag_spec='-R$libdir'
+    hardcode_direct=yes
+    hardcode_shlibpath_var=no
+    ;;
+
+  hpux9* | hpux10* | hpux11*)
+    case $host_os in
+    hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
+    *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
+    esac
+    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+    hardcode_libdir_separator=:
+    hardcode_direct=yes
+    hardcode_minus_L=yes # Not in the search PATH, but as the default
+			 # location of the library.
+    export_dynamic_flag_spec='${wl}-E'
+    ;;
+
+  irix5* | irix6*)
+    if test "$GCC" = yes; then
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+    else
+      archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+    fi
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    hardcode_libdir_separator=:
+    link_all_deplibs=yes
+    ;;
+
+  netbsd*)
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+    else
+      archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+    fi
+    hardcode_libdir_flag_spec='-R$libdir'
+    hardcode_direct=yes
+    hardcode_shlibpath_var=no
+    ;;
+
+  newsos6)
+    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+    hardcode_direct=yes
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    hardcode_libdir_separator=:
+    hardcode_shlibpath_var=no
+    ;;
+
+  openbsd*)
+    hardcode_direct=yes
+    hardcode_shlibpath_var=no
+    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec='${wl}-E'
+    else
+      case "$host_os" in
+      openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_libdir_flag_spec='-R$libdir'
+        ;;
+      *)
+        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
+        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+        ;;
+      esac
+    fi
+    ;;
+
+  os2*)
+    hardcode_libdir_flag_spec='-L$libdir'
+    hardcode_minus_L=yes
+    allow_undefined_flag=unsupported
+    archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+    old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+    ;;
+
+  osf3*)
+    if test "$GCC" = yes; then
+      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+    else
+      allow_undefined_flag=' -expect_unresolved \*'
+      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+    fi
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    hardcode_libdir_separator=:
+    ;;
+
+  osf4* | osf5*)	# as osf3* with the addition of -msym flag
+    if test "$GCC" = yes; then
+      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    else
+      allow_undefined_flag=' -expect_unresolved \*'
+      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+      $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+
+      #Both c and cxx compiler support -rpath directly
+      hardcode_libdir_flag_spec='-rpath $libdir'
+    fi
+    hardcode_libdir_separator=:
+    ;;
+
+  sco3.2v5*)
+    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+    hardcode_shlibpath_var=no
+    runpath_var=LD_RUN_PATH
+    hardcode_runpath_var=yes
+    export_dynamic_flag_spec='${wl}-Bexport'
+    ;;
+
+  solaris*)
+    # gcc --version < 3.0 without binutils cannot create self contained
+    # shared libraries reliably, requiring libgcc.a to resolve some of
+    # the object symbols generated in some cases.  Libraries that use
+    # assert need libgcc.a to resolve __eprintf, for example.  Linking
+    # a copy of libgcc.a into every shared library to guarantee resolving
+    # such symbols causes other problems:  According to Tim Van Holder
+    # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
+    # (to the application) exception stack for one thing.
+    no_undefined_flag=' -z defs'
+    if test "$GCC" = yes; then
+      case `$CC --version 2>/dev/null` in
+      [12].*)
+	cat <<EOF 1>&2
+
+*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
+*** create self contained shared libraries on Solaris systems, without
+*** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
+*** -no-undefined support, which will at least allow you to build shared
+*** libraries.  However, you may find that when you link such libraries
+*** into an application without using GCC, you have to manually add
+*** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
+*** upgrade to a newer version of GCC.  Another option is to rebuild your
+*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
+
+EOF
+        no_undefined_flag=
+	;;
+      esac
+    fi
+    # $CC -shared without GNU ld will not create a library from C++
+    # object files and a static libstdc++, better avoid it by now
+    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+    hardcode_libdir_flag_spec='-R$libdir'
+    hardcode_shlibpath_var=no
+    case $host_os in
+    solaris2.[0-5] | solaris2.[0-5].*) ;;
+    *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+      whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
+    esac
+    link_all_deplibs=yes
+    ;;
+
+  sunos4*)
+    if test "x$host_vendor" = xsequent; then
+      # Use $CC to link under sequent, because it throws in some extra .o
+      # files that make .init and .fini sections work.
+      archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+    else
+      archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+    fi
+    hardcode_libdir_flag_spec='-L$libdir'
+    hardcode_direct=yes
+    hardcode_minus_L=yes
+    hardcode_shlibpath_var=no
+    ;;
+
+  sysv4)
+    if test "x$host_vendor" = xsno; then
+      archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes # is this really true???
+    else
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+    fi
+    runpath_var='LD_RUN_PATH'
+    hardcode_shlibpath_var=no
+    ;;
+
+  sysv4.3*)
+    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+    hardcode_shlibpath_var=no
+    export_dynamic_flag_spec='-Bexport'
+    ;;
+
+  sysv5*)
+    no_undefined_flag=' -z text'
+    # $CC -shared without GNU ld will not create a library from C++
+    # object files and a static libstdc++, better avoid it by now
+    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+    hardcode_libdir_flag_spec=
+    hardcode_shlibpath_var=no
+    runpath_var='LD_RUN_PATH'
+    ;;
+
+  uts4*)
+    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+    hardcode_libdir_flag_spec='-L$libdir'
+    hardcode_shlibpath_var=no
+    ;;
+
+  dgux*)
+    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+    hardcode_libdir_flag_spec='-L$libdir'
+    hardcode_shlibpath_var=no
+    ;;
+
+  sysv4*MP*)
+    if test -d /usr/nec; then
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      runpath_var=LD_RUN_PATH
+      hardcode_runpath_var=yes
+      ld_shlibs=yes
+    fi
+    ;;
+
+  sysv4.2uw2*)
+    archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+    hardcode_direct=yes
+    hardcode_minus_L=no
+    hardcode_shlibpath_var=no
+    hardcode_runpath_var=yes
+    runpath_var=LD_RUN_PATH
+    ;;
+
+  sysv5uw7* | unixware7*)
+    no_undefined_flag='${wl}-z ${wl}text'
+    if test "$GCC" = yes; then
+      archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+    else
+      archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+    fi
+    runpath_var='LD_RUN_PATH'
+    hardcode_shlibpath_var=no
+    ;;
+
+  *)
+    ld_shlibs=no
+    ;;
+  esac
+fi
+echo "$as_me:5695: result: $ld_shlibs" >&5
+echo "${ECHO_T}$ld_shlibs" >&6
+test "$ld_shlibs" = no && can_build_shared=no
+
+# Check hardcoding attributes.
+echo "$as_me:5700: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" || \
+   test -n "$runpath_var"; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$hardcode_shlibpath_var" != no &&
+     test "$hardcode_minus_L" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action=unsupported
+fi
+echo "$as_me:5724: result: $hardcode_action" >&5
+echo "${ECHO_T}$hardcode_action" >&6
+
+striplib=
+old_striplib=
+echo "$as_me:5729: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  echo "$as_me:5734: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me:5737: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+# PORTME Fill in your ld.so characteristics
+echo "$as_me:5745: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}.so$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}.so$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+	if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	     echo ' yes '
+	     echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	  :
+	else
+	  can_build_shared=no
+	fi
+	;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can
+    # not hardcode correct soname into executable. Probably we can
+    # add versioning support to collect2, so additional links can
+    # be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}.so$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}.so'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi4*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  soname_spec='${libname}${release}.so$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  export_dynamic_flag_spec=-rdynamic
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  need_version=no
+  need_lib_prefix=no
+  case $GCC,$host_os in
+  yes,cygwin*)
+    library_names_spec='$libname.dll.a'
+    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
+    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog .libs/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    ;;
+  yes,mingw*)
+    library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
+    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
+    ;;
+  yes,pw32*)
+    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
+    ;;
+  *)
+    library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  # FIXME: Relying on posixy $() will cause problems for
+  #        cross-compilation, but unfortunately the echo tests do not
+  #        yet detect zsh echo's removal of \ escapes.
+  library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
+  soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd*)
+  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  *)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
+  soname_spec='${libname}${release}.so$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  dynamic_linker="$host_os dld.sl"
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  shlibpath_var=SHLIB_PATH
+  shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+  library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
+  soname_spec='${libname}${release}.sl$major'
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+irix5* | irix6*)
+  version_type=irix
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
+  case $host_os in
+  irix5*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  soname_spec='${libname}${release}.so$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
+    soname_spec='${libname}${release}.so$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case "$host_os" in
+    openbsd2.[89] | openbsd2.[89].*)
+      shlibpath_overrides_runpath=no
+      ;;
+    *)
+      shlibpath_overrides_runpath=yes
+      ;;
+    esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+os2*)
+  libname_spec='$name'
+  need_lib_prefix=no
+  library_names_spec='$libname.dll $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_version=no
+  soname_spec='${libname}${release}.so'
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+sco3.2v5*)
+  version_type=osf
+  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  soname_spec='${libname}${release}.so$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  version_type=linux
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  soname_spec='${libname}${release}.so$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  soname_spec='${libname}${release}.so$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  soname_spec='${libname}${release}.so$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
+    soname_spec='$libname.so.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+echo "$as_me:6138: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+# Report the final consequences.
+echo "$as_me:6143: checking if libtool supports shared libraries" >&5
+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
+echo "$as_me:6145: result: $can_build_shared" >&5
+echo "${ECHO_T}$can_build_shared" >&6
+
+echo "$as_me:6148: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case "$host_os" in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+
+aix4*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+  ;;
+esac
+echo "$as_me:6169: result: $enable_shared" >&5
+echo "${ECHO_T}$enable_shared" >&6
+
+echo "$as_me:6172: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+echo "$as_me:6176: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6
+
+if test "$hardcode_action" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  cygwin* | mingw* | pw32*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+   ;;
+
+  *)
+    echo "$as_me:6214: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
+if test "${ac_cv_func_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 6220 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shl_load (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+char (*f) ();
+
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_shl_load) || defined (__stub___shl_load)
+choke me
+#else
+f = shl_load;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:6251: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:6254: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:6257: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6260: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_shl_load=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:6270: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6
+if test $ac_cv_func_shl_load = yes; then
+  lt_cv_dlopen="shl_load"
+else
+  echo "$as_me:6275: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 6283 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+int
+main ()
+{
+shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:6302: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:6305: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:6308: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6311: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dld_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_dld_shl_load=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:6322: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
+else
+  echo "$as_me:6327: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 6333 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dlopen (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+char (*f) ();
+
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+f = dlopen;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:6364: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:6367: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:6370: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6373: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_dlopen=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:6383: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+if test $ac_cv_func_dlopen = yes; then
+  lt_cv_dlopen="dlopen"
+else
+  echo "$as_me:6388: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 6396 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:6415: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:6418: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:6421: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6424: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:6435: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  echo "$as_me:6440: checking for dlopen in -lsvld" >&5
+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 6448 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:6467: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:6470: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:6473: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6476: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_svld_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_svld_dlopen=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:6487: result: $ac_cv_lib_svld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
+if test $ac_cv_lib_svld_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+  echo "$as_me:6492: checking for dld_link in -ldld" >&5
+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 6500 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dld_link ();
+int
+main ()
+{
+dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:6519: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:6522: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:6525: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6528: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dld_dld_link=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_dld_dld_link=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:6539: result: $ac_cv_lib_dld_dld_link" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
+if test $ac_cv_lib_dld_dld_link = yes; then
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
+fi
+
+fi
+
+fi
+
+fi
+
+fi
+
+fi
+
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+        test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    echo "$as_me:6575: checking whether a program can dlopen itself" >&5
+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self=cross
+else
+    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+#line 6586 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:6647: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:6650: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
+  fi
+fi
+rm -fr conftest*
+
+fi
+echo "$as_me:6667: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      LDFLAGS="$LDFLAGS $link_static_flag"
+      echo "$as_me:6672: checking whether a statically linked program can dlopen itself" >&5
+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self_static=cross
+else
+    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+#line 6683 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:6744: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:6747: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
+fi
+rm -fr conftest*
+
+fi
+echo "$as_me:6764: result: $lt_cv_dlopen_self_static" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+
+if test "$enable_shared" = yes && test "$GCC" = yes; then
+  case $archive_cmds in
+  *'~'*)
+    # FIXME: we may have to deal with multi-command sequences.
+    ;;
+  '$CC '*)
+    # Test whether the compiler implicitly links with -lc since on some
+    # systems, -lgcc has to come before -lc. If gcc already passes -lc
+    # to ld, don't add -lc before -lgcc.
+    echo "$as_me:6794: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+    if test "${lt_cv_archive_cmds_need_lc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  $rm conftest*
+    echo 'static int dummy;' > conftest.$ac_ext
+
+    if { (eval echo "$as_me:6802: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6805: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+      soname=conftest
+      lib=conftest
+      libobjs=conftest.$ac_objext
+      deplibs=
+      wl=$lt_cv_prog_cc_wl
+      compiler_flags=-v
+      linker_flags=-v
+      verstring=
+      output_objdir=.
+      libname=conftest
+      save_allow_undefined_flag=$allow_undefined_flag
+      allow_undefined_flag=
+      if { (eval echo "$as_me:6819: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:6822: \$? = $ac_status" >&5
+  (exit $ac_status); }
+      then
+	lt_cv_archive_cmds_need_lc=no
+      else
+	lt_cv_archive_cmds_need_lc=yes
+      fi
+      allow_undefined_flag=$save_allow_undefined_flag
+    else
+      cat conftest.err 1>&5
+    fi
+fi
+
+    echo "$as_me:6835: result: $lt_cv_archive_cmds_need_lc" >&5
+echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6
+    ;;
+  esac
+fi
+need_lc=${lt_cv_archive_cmds_need_lc-yes}
+
+# The second clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  :
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  test -f Makefile && make "$ltmain"
+fi
+
+if test -f "$ltmain"; then
+  trap "$rm \"${ofile}T\"; exit 1" 1 2 15
+  $rm -f "${ofile}T"
+
+  echo creating $ofile
+
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS \
+    AR AR_FLAGS AS CC LD LN_S NM SHELL \
+    reload_flag reload_cmds wl \
+    pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
+    thread_safe_flag_spec whole_archive_flag_spec libname_spec \
+    library_names_spec soname_spec \
+    RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
+    old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
+    postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
+    old_striplib striplib file_magic_cmd export_symbols_cmds \
+    deplibs_check_method allow_undefined_flag no_undefined_flag \
+    finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
+    global_symbol_to_c_name_address \
+    hardcode_libdir_flag_spec hardcode_libdir_separator  \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
+
+    case $var in
+    reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
+    extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  cat <<__EOF__ > "${ofile}T"
+#! $SHELL
+
+# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996-2000 Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="sed -e s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$need_lc
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# The default C compiler.
+CC=$lt_CC
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS=$lt_AS
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_wl
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_pic_flag
+pic_mode=$pic_mode
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_compiler_c_o
+
+# Can we write directly to a .lo ?
+compiler_o_lo=$lt_compiler_o_lo
+
+# Must we lock files when doing compilation ?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_link_static_flag
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_no_builtin_flag
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# ### END LIBTOOL CONFIG
+
+__EOF__
+
+  case $host_os in
+  aix3*)
+    cat <<\EOF >> "${ofile}T"
+
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+EOF
+    ;;
+  esac
+
+  case $host_os in
+  cygwin* | mingw* | pw32* | os2*)
+    cat <<'EOF' >> "${ofile}T"
+      # This is a source program that is used to create dlls on Windows
+      # Don't remove nor modify the starting and closing comments
+# /* ltdll.c starts here */
+# #define WIN32_LEAN_AND_MEAN
+# #include <windows.h>
+# #undef WIN32_LEAN_AND_MEAN
+# #include <stdio.h>
+#
+# #ifndef __CYGWIN__
+# #  ifdef __CYGWIN32__
+# #    define __CYGWIN__ __CYGWIN32__
+# #  endif
+# #endif
+#
+# #ifdef __cplusplus
+# extern "C" {
+# #endif
+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+# #ifdef __cplusplus
+# }
+# #endif
+#
+# #ifdef __CYGWIN__
+# #include <cygwin/cygwin_dll.h>
+# DECLARE_CYGWIN_DLL( DllMain );
+# #endif
+# HINSTANCE __hDllInstance_base;
+#
+# BOOL APIENTRY
+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+# {
+#   __hDllInstance_base = hInst;
+#   return TRUE;
+# }
+# /* ltdll.c ends here */
+	# This is a source program that is used to create import libraries
+	# on Windows for dlls which lack them. Don't remove nor modify the
+	# starting and closing comments
+# /* impgen.c starts here */
+# /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
+#
+#  This file is part of GNU libtool.
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#  */
+#
+# #include <stdio.h>		/* for printf() */
+# #include <unistd.h>		/* for open(), lseek(), read() */
+# #include <fcntl.h>		/* for O_RDONLY, O_BINARY */
+# #include <string.h>		/* for strdup() */
+#
+# /* O_BINARY isn't required (or even defined sometimes) under Unix */
+# #ifndef O_BINARY
+# #define O_BINARY 0
+# #endif
+#
+# static unsigned int
+# pe_get16 (fd, offset)
+#      int fd;
+#      int offset;
+# {
+#   unsigned char b[2];
+#   lseek (fd, offset, SEEK_SET);
+#   read (fd, b, 2);
+#   return b[0] + (b[1]<<8);
+# }
+#
+# static unsigned int
+# pe_get32 (fd, offset)
+#     int fd;
+#     int offset;
+# {
+#   unsigned char b[4];
+#   lseek (fd, offset, SEEK_SET);
+#   read (fd, b, 4);
+#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+# }
+#
+# static unsigned int
+# pe_as32 (ptr)
+#      void *ptr;
+# {
+#   unsigned char *b = ptr;
+#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+# }
+#
+# int
+# main (argc, argv)
+#     int argc;
+#     char *argv[];
+# {
+#     int dll;
+#     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
+#     unsigned long export_rva, export_size, nsections, secptr, expptr;
+#     unsigned long name_rvas, nexp;
+#     unsigned char *expdata, *erva;
+#     char *filename, *dll_name;
+#
+#     filename = argv[1];
+#
+#     dll = open(filename, O_RDONLY|O_BINARY);
+#     if (dll < 1)
+# 	return 1;
+#
+#     dll_name = filename;
+#
+#     for (i=0; filename[i]; i++)
+# 	if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
+# 	    dll_name = filename + i +1;
+#
+#     pe_header_offset = pe_get32 (dll, 0x3c);
+#     opthdr_ofs = pe_header_offset + 4 + 20;
+#     num_entries = pe_get32 (dll, opthdr_ofs + 92);
+#
+#     if (num_entries < 1) /* no exports */
+# 	return 1;
+#
+#     export_rva = pe_get32 (dll, opthdr_ofs + 96);
+#     export_size = pe_get32 (dll, opthdr_ofs + 100);
+#     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
+#     secptr = (pe_header_offset + 4 + 20 +
+# 	      pe_get16 (dll, pe_header_offset + 4 + 16));
+#
+#     expptr = 0;
+#     for (i = 0; i < nsections; i++)
+#     {
+# 	char sname[8];
+# 	unsigned long secptr1 = secptr + 40 * i;
+# 	unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
+# 	unsigned long vsize = pe_get32 (dll, secptr1 + 16);
+# 	unsigned long fptr = pe_get32 (dll, secptr1 + 20);
+# 	lseek(dll, secptr1, SEEK_SET);
+# 	read(dll, sname, 8);
+# 	if (vaddr <= export_rva && vaddr+vsize > export_rva)
+# 	{
+# 	    expptr = fptr + (export_rva - vaddr);
+# 	    if (export_rva + export_size > vaddr + vsize)
+# 		export_size = vsize - (export_rva - vaddr);
+# 	    break;
+# 	}
+#     }
+#
+#     expdata = (unsigned char*)malloc(export_size);
+#     lseek (dll, expptr, SEEK_SET);
+#     read (dll, expdata, export_size);
+#     erva = expdata - export_rva;
+#
+#     nexp = pe_as32 (expdata+24);
+#     name_rvas = pe_as32 (expdata+32);
+#
+#     printf ("EXPORTS\n");
+#     for (i = 0; i<nexp; i++)
+#     {
+# 	unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
+# 	printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
+#     }
+#
+#     return 0;
+# }
+# /* impgen.c ends here */
+
+EOF
+    ;;
+  esac
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
+
+  mv -f "${ofile}T" "$ofile" || \
+    (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
+  chmod +x "$ofile"
+fi
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+# Prevent multiple expansion
+
+# Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" = set; then
+  enableval="$enable_shared"
+  p=${PACKAGE-default}
+case $enableval in
+yes) enable_shared=yes ;;
+no) enable_shared=no ;;
+*)
+  enable_shared=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_shared=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac
+else
+  enable_shared=yes
+fi;
+# Check whether --enable-static or --disable-static was given.
+if test "${enable_static+set}" = set; then
+  enableval="$enable_static"
+  p=${PACKAGE-default}
+case $enableval in
+yes) enable_static=yes ;;
+no) enable_static=no ;;
+*)
+  enable_static=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_static=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac
+else
+  enable_static=yes
+fi;
+
+for ac_func in getcwd
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:7448: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 7454 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
+
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:7485: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:7488: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:7491: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:7494: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:7504: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+for ac_func in memset
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:7517: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 7523 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
+
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:7554: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:7557: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:7560: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:7563: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:7573: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+for ac_prog in mawk gawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:7587: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_AWK="$ac_prog"
+echo "$as_me:7602: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  echo "$as_me:7610: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+  echo "$as_me:7613: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$AWK" && break
+done
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:7632: checking for a BSD compatible install" >&5
+echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+    ac_save_IFS=$IFS; IFS=$ac_path_separator
+  for ac_dir in $PATH; do
+    IFS=$ac_save_IFS
+    # Account for people who put trailing slashes in PATH elements.
+    case $ac_dir/ in
+    / | ./ | .// | /cC/* \
+    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
+    | /usr/ucb/* ) ;;
+    *)
+      # OSF1 and SCO ODT 3.0 have their own names for install.
+      # Don't use installbsd from OSF since it installs stuff as root
+      # by default.
+      for ac_prog in ginstall scoinst install; do
+        if $as_executable_p "$ac_dir/$ac_prog"; then
+	  if test $ac_prog = install &&
+            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    ac_cv_path_install="$ac_dir/$ac_prog -c"
+	    break 2
+	  fi
+	fi
+      done
+      ;;
+    esac
+  done
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL=$ac_install_sh
+  fi
+fi
+echo "$as_me:7681: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:7695: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+echo "$as_me:7710: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  echo "$as_me:7718: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+  echo "$as_me:7721: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:7730: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_RANLIB="ranlib"
+echo "$as_me:7745: found $ac_dir/$ac_word" >&5
+break
+done
+
+  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  echo "$as_me:7754: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+  echo "$as_me:7757: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  RANLIB=$ac_ct_RANLIB
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+echo "$as_me:7766: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 7772 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+_ACEOF
+if { (eval echo "$as_me:7780: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:7786: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+#line 7808 "configure"
+#include "confdefs.h"
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+#line 7826 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 7847 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
+                     || ('j' <= (c) && (c) <= 'r') \
+                     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+        || toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:7873: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:7876: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:7878: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:7881: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_header_stdc=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:7894: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+echo "$as_me:7904: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+#line 7912 "configure"
+#include "confdefs.h"
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX			-qlanglvl=ansi
+# Ultrix and OSF/1	-std1
+# HP-UX 10.20 and later	-Ae
+# HP-UX older versions	-Aa -D_HPUX_SOURCE
+# SVR4			-Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (eval echo "$as_me:7961: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:7964: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:7967: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:7970: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+  x|xno)
+    echo "$as_me:7987: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+  *)
+    echo "$as_me:7990: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+    CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+echo "$as_me:7995: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+if test "${ac_cv_c_const+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 8001 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+  /* Ultrix mips cc rejects this.  */
+  typedef int charset[2];
+  const charset x;
+  /* SunOS 4.1.1 cc rejects this.  */
+  char const *const *ccp;
+  char **p;
+  /* NEC SVR4.0.2 mips cc rejects this.  */
+  struct point {int x, y;};
+  static struct point const zero = {0,0};
+  /* AIX XL C 1.02.0.0 rejects this.
+     It does not let you subtract one const X* pointer from another in
+     an arm of an if-expression whose if-part is not a constant
+     expression */
+  const char *g = "string";
+  ccp = &g + (g ? g-g : 0);
+  /* HPUX 7.0 cc rejects these. */
+  ++ccp;
+  p = (char**) ccp;
+  ccp = (char const *const *) p;
+  { /* SCO 3.2v4 cc rejects this.  */
+    char *t;
+    char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+    *t++ = 0;
+  }
+  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+    int x[] = {25, 17};
+    const int *foo = &x[0];
+    ++foo;
+  }
+  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+    typedef const int *iptr;
+    iptr p = 0;
+    ++p;
+  }
+  { /* AIX XL C 1.02.0.0 rejects this saying
+       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+    struct s { int j; const int *ap[3]; };
+    struct s *b; b->j = 5;
+  }
+  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+    const int foo = 10;
+  }
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:8059: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:8062: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:8065: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:8068: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_const=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_c_const=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:8078: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6
+if test $ac_cv_c_const = no; then
+
+cat >>confdefs.h <<\EOF
+#define const
+EOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+                  inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:8094: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 8100 "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:8106: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:8109: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:8112: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:8115: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:8125: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+echo "$as_me:8135: checking for size_t" >&5
+echo $ECHO_N "checking for size_t... $ECHO_C" >&6
+if test "${ac_cv_type_size_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 8141 "configure"
+#include "confdefs.h"
+$ac_includes_default
+int
+main ()
+{
+if ((size_t *) 0)
+  return 0;
+if (sizeof (size_t))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:8156: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:8159: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:8162: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:8165: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_size_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_size_t=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:8175: result: $ac_cv_type_size_t" >&5
+echo "${ECHO_T}$ac_cv_type_size_t" >&6
+if test $ac_cv_type_size_t = yes; then
+  :
+else
+
+cat >>confdefs.h <<EOF
+#define size_t unsigned
+EOF
+
+fi
+
+for ac_header in sys/types.h sys/socket.h unistd.h netinet/in.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:8190: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 8196 "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:8200: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:8206: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:8225: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+for ac_header in arpa/inet.h netdb.h sys/ioctl.h errno.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:8238: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 8244 "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:8248: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:8254: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:8273: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+for ac_header in sys/time.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:8286: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 8292 "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:8296: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:8302: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:8321: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+for ac_header in ltdl.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:8334: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 8340 "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:8344: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:8350: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:8369: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+for ac_header in stdsoap2.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:8382: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 8388 "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:8392: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:8398: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:8417: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+ac_config_files="$ac_config_files Makefile ConsoleServer/Makefile ConsoleServer/foo/Makefile example/Makefile example/calculator/Makefile mod_gsoap/Makefile"
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overriden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+  (set) 2>&1 |
+    case `(ac_space=' '; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+        "s/'/'\\\\''/g;
+    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;;
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n \
+        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+} |
+  sed '
+     t clear
+     : clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     : end' >>confcache
+if cmp -s $cache_file confcache; then :; else
+  if test -w $cache_file; then
+    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+    cat confcache >$cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ 	]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ 	]*$//;
+}'
+fi
+
+DEFS=-DHAVE_CONFIG_H
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:8507: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+ac_cs_invocation="\$0 \$@"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+
+# Name of the executable.
+as_me=`echo "$0" |sed 's,.*[\\/],,'`
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+as_executable_p="test -f"
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+# NLS nuisances.
+$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
+$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
+$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
+$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
+$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
+$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
+$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
+$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
+
+exec 6>&1
+
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\EOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number, then exit
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+  --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+EOF
+
+cat >>$CONFIG_STATUS <<EOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.52,
+  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+EOF
+
+cat >>$CONFIG_STATUS <<\EOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "x$1" : 'x\([^=]*\)='`
+    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    shift
+    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
+    shift
+    ;;
+  -*);;
+  *) # This is not an option, so the user has probably given explicit
+     # arguments.
+     ac_need_defaults=false;;
+  esac
+
+  case $1 in
+  # Handling of the options.
+EOF
+cat >>$CONFIG_STATUS <<EOF
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
+    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
+EOF
+cat >>$CONFIG_STATUS <<\EOF
+  --version | --vers* | -V )
+    echo "$ac_cs_version"; exit 0 ;;
+  --he | --h)
+    # Conflict between --help and --header
+    { { echo "$as_me:8683: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit 0 ;;
+  --debug | --d* | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    shift
+    CONFIG_FILES="$CONFIG_FILES $1"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $1"
+    ac_need_defaults=false;;
+
+  # This is an error.
+  -*) { { echo "$as_me:8702: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1" ;;
+
+  esac
+  shift
+done
+
+exec 5>>config.log
+cat >&5 << _ACEOF
+
+## ----------------------- ##
+## Running config.status.  ##
+## ----------------------- ##
+
+This file was extended by $as_me 2.52, executed with
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  > $ac_cs_invocation
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+
+_ACEOF
+EOF
+
+cat >>$CONFIG_STATUS <<EOF
+#
+# INIT-COMMANDS section.
+#
+
+AMDEP_TRUE="$AMDEP_TRUE"
+ac_aux_dir="$ac_aux_dir"
+
+EOF
+
+cat >>$CONFIG_STATUS <<\EOF
+for ac_config_target in $ac_config_targets
+do
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  "ConsoleServer/Makefile" ) CONFIG_FILES="$CONFIG_FILES ConsoleServer/Makefile" ;;
+  "ConsoleServer/foo/Makefile" ) CONFIG_FILES="$CONFIG_FILES ConsoleServer/foo/Makefile" ;;
+  "example/Makefile" ) CONFIG_FILES="$CONFIG_FILES example/Makefile" ;;
+  "example/calculator/Makefile" ) CONFIG_FILES="$CONFIG_FILES example/calculator/Makefile" ;;
+  "mod_gsoap/Makefile" ) CONFIG_FILES="$CONFIG_FILES mod_gsoap/Makefile" ;;
+  "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+  *) { { echo "$as_me:8755: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+: ${TMPDIR=/tmp}
+{
+  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=$TMPDIR/cs$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+   { (exit 1); exit 1; }
+}
+
+EOF
+
+cat >>$CONFIG_STATUS <<EOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@DEFS@,$DEFS,;t t
+s,@LIBS@,$LIBS,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@target@,$target,;t t
+s,@target_cpu@,$target_cpu,;t t
+s,@target_vendor@,$target_vendor,;t t
+s,@target_os@,$target_os,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@ACLOCAL@,$ACLOCAL,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@AUTOMAKE@,$AUTOMAKE,;t t
+s,@AUTOHEADER@,$AUTOHEADER,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@install_sh@,$install_sh,;t t
+s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@AWK@,$AWK,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
+s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
+s,@DEPDIR@,$DEPDIR,;t t
+s,@EXISTS_GSOAP@,$EXISTS_GSOAP,;t t
+s,@DEBUG_TRUE@,$DEBUG_TRUE,;t t
+s,@DEBUG_FALSE@,$DEBUG_FALSE,;t t
+s,@CXXDEBUGDEFINES@,$CXXDEBUGDEFINES,;t t
+s,@APXS_CXX_OPTIONS@,$APXS_CXX_OPTIONS,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@am__include@,$am__include,;t t
+s,@am__quote@,$am__quote,;t t
+s,@CCDEPMODE@,$CCDEPMODE,;t t
+s,@CPP@,$CPP,;t t
+s,@CXX@,$CXX,;t t
+s,@CXXFLAGS@,$CXXFLAGS,;t t
+s,@ac_ct_CXX@,$ac_ct_CXX,;t t
+s,@CXXDEPMODE@,$CXXDEPMODE,;t t
+s,@EXISTS_APXS@,$EXISTS_APXS,;t t
+s,@LN_S@,$LN_S,;t t
+s,@ECHO@,$ECHO,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@DLLTOOL@,$DLLTOOL,;t t
+s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t
+s,@AS@,$AS,;t t
+s,@ac_ct_AS@,$ac_ct_AS,;t t
+s,@OBJDUMP@,$OBJDUMP,;t t
+s,@ac_ct_OBJDUMP@,$ac_ct_OBJDUMP,;t t
+s,@LIBTOOL@,$LIBTOOL,;t t
+s,@LIBTOOL_DEPS@,$LIBTOOL_DEPS,;t t
+CEOF
+
+EOF
+
+  cat >>$CONFIG_STATUS <<\EOF
+  # Split the substitutions into bite-sized pieces for seds with
+  # small command number limits, like on Digital OSF/1 and HP-UX.
+  ac_max_sed_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # Line after last line for current file.
+  ac_more_lines=:
+  ac_sed_cmds=
+  while $ac_more_lines; do
+    if test $ac_beg -gt 1; then
+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    else
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    fi
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (echo ':t
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+      if test -z "$ac_sed_cmds"; then
+  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+      else
+  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+      fi
+      ac_sed_frag=`expr $ac_sed_frag + 1`
+      ac_beg=$ac_end
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
+  fi
+fi # test -n "$CONFIG_FILES"
+
+EOF
+cat >>$CONFIG_STATUS <<\EOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+        cat >$tmp/stdin
+        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$ac_file" : 'X\(//\)[^/]' \| \
+         X"$ac_file" : 'X\(//\)$' \| \
+         X"$ac_file" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+    { case "$ac_dir" in
+  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
+  *)                      as_incr_dir=.;;
+esac
+as_dummy="$ac_dir"
+for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
+  case $as_mkdir_dir in
+    # Skip DOS drivespec
+    ?:) as_incr_dir=$as_mkdir_dir ;;
+    *)
+      as_incr_dir=$as_incr_dir/$as_mkdir_dir
+      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
+    ;;
+  esac
+done; }
+
+    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
+    # A "../" for each directory in $ac_dir_suffix.
+    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
+  else
+    ac_dir_suffix= ac_dots=
+  fi
+
+  case $srcdir in
+  .)  ac_srcdir=.
+      if test -z "$ac_dots"; then
+         ac_top_srcdir=.
+      else
+         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
+      fi ;;
+  [\\/]* | ?:[\\/]* )
+      ac_srcdir=$srcdir$ac_dir_suffix;
+      ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_dots$srcdir ;;
+  esac
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_dots$INSTALL ;;
+  esac
+
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:9017: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated automatically by config.status.  */
+  configure_input="Generated automatically from `echo $ac_file_in |
+                                                 sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+         # Absolute (can't be DOS-style, as IFS=:)
+         test -f "$f" || { { echo "$as_me:9035: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         echo $f;;
+      *) # Relative
+         if test -f "$f"; then
+           # Build tree
+           echo $f
+         elif test -f "$srcdir/$f"; then
+           # Source tree
+           echo $srcdir/$f
+         else
+           # /dev/null tree
+           { { echo "$as_me:9048: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+EOF
+cat >>$CONFIG_STATUS <<EOF
+  sed "$ac_vpsub
+$extrasub
+EOF
+cat >>$CONFIG_STATUS <<\EOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
+
+done
+EOF
+cat >>$CONFIG_STATUS <<\EOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
+ac_dB='[ 	].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+        cat >$tmp/stdin
+        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  test x"$ac_file" != x- && { echo "$as_me:9109: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+         # Absolute (can't be DOS-style, as IFS=:)
+         test -f "$f" || { { echo "$as_me:9120: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         echo $f;;
+      *) # Relative
+         if test -f "$f"; then
+           # Build tree
+           echo $f
+         elif test -f "$srcdir/$f"; then
+           # Source tree
+           echo $srcdir/$f
+         else
+           # /dev/null tree
+           { { echo "$as_me:9133: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  # Remove the trailing spaces.
+  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
+
+EOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h.  The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status.  Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\EOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ 	]*#[ 	]*define[ 	][ 	]*\(\([^ 	(][^ 	(]*\)([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
+t end
+s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+EOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless.  Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >>conftest.undefs <<\EOF
+s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+EOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo '  if egrep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo '  :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+  # Write a limited-size here document to $tmp/defines.sed.
+  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#define' lines.
+  echo '/^[ 	]*#[ 	]*define/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo '  fi # egrep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+  # Write a limited-size here document to $tmp/undefs.sed.
+  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#undef'
+  echo '/^[ 	]*#[ 	]*undef/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+  rm -f conftest.undefs
+  mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\EOF
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated automatically by config.status.  */
+  if test x"$ac_file" = x-; then
+    echo "/* Generated automatically by configure.  */" >$tmp/config.h
+  else
+    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
+  fi
+  cat $tmp/in >>$tmp/config.h
+  rm -f $tmp/in
+  if test x"$ac_file" != x-; then
+    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
+      { echo "$as_me:9250: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$ac_file" : 'X\(//\)[^/]' \| \
+         X"$ac_file" : 'X\(//\)$' \| \
+         X"$ac_file" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+        { case "$ac_dir" in
+  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
+  *)                      as_incr_dir=.;;
+esac
+as_dummy="$ac_dir"
+for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
+  case $as_mkdir_dir in
+    # Skip DOS drivespec
+    ?:) as_incr_dir=$as_mkdir_dir ;;
+    *)
+      as_incr_dir=$as_incr_dir/$as_mkdir_dir
+      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
+    ;;
+  esac
+done; }
+
+      fi
+      rm -f $ac_file
+      mv $tmp/config.h $ac_file
+    fi
+  else
+    cat $tmp/config.h
+    rm -f $tmp/config.h
+  fi
+  # Run the commands associated with the file.
+  case $ac_file in
+    config.h ) # update the timestamp
+echo timestamp >"./stamp-h1"
+ ;;
+  esac
+done
+EOF
+cat >>$CONFIG_STATUS <<\EOF
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+
+  case $ac_dest in
+    default-1 )
+test x"$AMDEP_TRUE" != x"" ||
+for mf in $CONFIG_FILES; do
+  case "$mf" in
+  Makefile) dirpart=.;;
+  */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
+  *) continue;;
+  esac
+  grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
+  # Extract the definition of DEP_FILES from the Makefile without
+  # running `make'.
+  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n -e '/^U = / s///p' < "$mf"`
+  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+  # We invoke sed twice because it is the simplest approach to
+  # changing $(DEPDIR) to its actual value in the expansion.
+  for file in `sed -n -e '
+    /^DEP_FILES = .*\\\\$/ {
+      s/^DEP_FILES = //
+      :loop
+	s/\\\\$//
+	p
+	n
+	/\\\\$/ b loop
+      p
+    }
+    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
+    $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+ ;;
+  esac
+done
+EOF
+
+cat >>$CONFIG_STATUS <<\EOF
+
+{ (exit 0); exit 0; }
+EOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/configure.in b/mod_gsoap/mod_gsoap-0.6/apache_13/configure.in
new file mode 100755
index 0000000..a43c8e9
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/configure.in
@@ -0,0 +1,113 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT(mod_gsoap/mod_gsoap.c)
+
+AC_CONFIG_SRCDIR(mod_gsoap/mod_gsoap.c)
+AC_COPYRIGHT([Dipl.-Ing. Christian Aberger (http://www.aberger.at)])
+AC_CANONICAL_HOST
+AC_CANONICAL_SYSTEM
+AM_INIT_AUTOMAKE(mod_gsoap, 0.0.5)
+AM_CONFIG_HEADER(config.h)
+dnl AC_CONFIG_HEADERS(config.h)
+
+dnl Ask user for path to gsoap library:
+#AC_ARG_WITH(gsoap,
+#    [  --with-gsoap=<path>   prefix of gsoap port installation. e.g. /usr/local/soapcpp or /home/myusername/gsoap],
+#    [GSOAP_PREFIX=$with_gsoap],
+#    AC_MSG_ERROR([You must call configure with the --with-gsoap=<path> option. <path> is the path where you unpacked the gsoap distribution to.
+#    The headers and source downloaded from http://www.cs.fsu.edu/~engelen/soap.html must be available.
+#    e.g. --with-gsoap=/usr/local/gsoap])
+#)
+
+#AC_CHECK_FILE([[$with_gsoap/stdsoap2.h]], [echo stdsoap2.h found in $with_gsoap], AC_MSG_ERROR([$with_gsoap does not contain stdsoap2.h]))
+
+
+
+#AC_SUBST(GSOAP_PREFIX)
+#GSOAP_CPP_SRC="${GSOAP_PREFIX}/stdsoap2.cpp"
+#GSOAP_C_SRC="${GSOAP_PREFIX}/stdsoap2.c"
+#GSOAP_INCLUDE="-I${GSOAP_PREFIX}"
+#AC_SUBST(GSOAP_CPP_SRC)
+#AC_SUBST(GSOAP_C_SRC)
+#AC_SUBST(GSOAP_INCLUDE)
+
+AC_CHECK_PROG(EXISTS_GSOAP, soapcpp2, yes, )
+if test -z "$EXISTS_GSOAP"; then
+   AC_MSG_ERROR([please install gsoap - http://www.cs.fsu.edu/~engelen/soap.html])
+fi
+
+dnl the debug build options adds symbols to compiler output (-g for g++) 
+AC_ARG_ENABLE(debug,
+[  --enable-debug	add debug symbols to compiler and linker output for source code debugging],
+[case "${enableval}" in
+  yes) debug=true ;;
+  no)  debug=false ;;
+  *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
+esac],[debug=false])
+AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
+
+CXXFLAGS=""
+if test x$debug = xtrue; then
+   CXXDEBUGDEFINES="-D_DEBUG"
+   APXS_CXX_OPTIONS="-Wc,-g"
+else 
+   CXXDEBUGDEFINES="-D_NDEBUG"
+   APXS_CXX_OPTIONS=""
+fi					  
+AC_SUBST(CXXDEBUGDEFINES)
+AC_SUBST(APXS_CXX_OPTIONS)
+dnl AC_CHECK_COMPILERS
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_CXX
+
+AC_CHECK_PROG(EXISTS_APXS, apxs, yes, )
+if test -z "$EXISTS_APXS"; then
+   AC_MSG_ERROR([please install the apache apxs tool. Download apache http server from http://www.apache.org, compile and install it and make sure that apxs is in your path])
+fi
+
+dnl Extra params for gcc
+if test "$GCC"; then
+   if test x$debug = xtrue; then
+	  CXXFLAGS="$CXXFLAGS -g"
+   else 
+	  CXXFLAGS="$CXXFLAGS -O2"
+   fi					  
+fi
+AC_SUBST(CXXFLAGS)
+
+AC_LIBTOOL_DLOPEN
+AC_LIBTOOL_WIN32_DLL
+AM_PROG_LIBTOOL
+AC_SUBST(LIBTOOL_DEPS)
+AC_ENABLE_SHARED(yes)
+AC_ENABLE_STATIC(yes)
+
+dnl check for functions.
+AC_CHECK_FUNCS([getcwd])
+AC_CHECK_FUNCS([memset])
+
+dnl Checks for programs.
+AC_PROG_AWK
+AC_PROG_INSTALL
+AC_PROG_RANLIB
+dnl Checks for libraries.
+
+dnl Checks for header files.
+AC_HEADER_STDC
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_TYPE_SIZE_T
+AC_CHECK_HEADERS(sys/types.h sys/socket.h unistd.h netinet/in.h)
+AC_CHECK_HEADERS(arpa/inet.h netdb.h sys/ioctl.h errno.h)
+AC_CHECK_HEADERS(sys/time.h)
+AC_CHECK_HEADERS(ltdl.h)
+AC_CHECK_HEADERS(stdsoap2.h)
+
+dnl AC_CHECK_LIB(socket, socket, [LIBSOCKET="-lsocket -lnsl"]) dnl for Solaris' X11
+dnl AC_SUBST(LIBSOCKET)
+
+dnl Checks for library functions.
+dnl AC_ARG_PROGRAM
+
+AC_OUTPUT(Makefile ConsoleServer/Makefile ConsoleServer/foo/Makefile example/Makefile example/calculator/Makefile mod_gsoap/Makefile)
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/configure.scan b/mod_gsoap/mod_gsoap-0.6/apache_13/configure.scan
new file mode 100755
index 0000000..9e65cd9
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/configure.scan
@@ -0,0 +1,41 @@
+# Process this file with autoconf to produce a configure script.
+AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
+AC_CONFIG_SRCDIR([config.h.in])
+AC_CONFIG_HEADER([config.h])
+
+# Checks for programs.
+AC_PROG_CXX
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+AC_PROG_RANLIB
+AC_PROG_AWK
+
+# Checks for libraries.
+# FIXME: Replace `main' with a function in `-le':
+AC_CHECK_LIB([e], [main])
+# FIXME: Replace `main' with a function in `-links':
+AC_CHECK_LIB([inks], [main])
+# FIXME: Replace `main' with a function in `-lltdl':
+AC_CHECK_LIB([ltdl], [main])
+# FIXME: Replace `main' with a function in `-lpthread':
+AC_CHECK_LIB([pthread], [main])
+
+# Checks for header files.
+AC_CHECK_HEADERS([memory.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+
+# Checks for library functions.
+AC_HEADER_STDC
+AC_CHECK_FUNCS([getcwd memset])
+
+AC_CONFIG_FILES([ConsoleServer/Makefile
+                 ConsoleServer/foo/Makefile
+                 Makefile
+                 example/calculator/Makefile
+                 mod_gsoap/Makefile])
+AC_OUTPUT
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/depcomp b/mod_gsoap/mod_gsoap-0.6/apache_13/depcomp
new file mode 100644
index 0000000..6589965
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/depcomp
@@ -0,0 +1,411 @@
+#! /bin/sh
+
+# depcomp - compile a program generating dependencies as side-effects
+# Copyright 1999, 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+# `libtool' can also be set to `yes' or `no'.
+
+depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> $depfile
+    echo >> $depfile
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> $depfile
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  This file always lives in the current directory.
+  # Also, the AIX compiler puts `$object:' at the start of each line;
+  # $object doesn't have directory information.
+  stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
+  tmpdepfile="$stripped.u"
+  outname="$stripped.o"
+  if test "$libtool" = yes; then
+    "$@" -Wc,-M
+  else
+    "$@" -M
+  fi
+
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+tru64)
+   # The Tru64 AIX compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put 
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+
+   tmpdepfile1="$object.d"
+   tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'` 
+   if test "$libtool" = yes; then
+      "$@" -Wc,-MD
+   else
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2"
+      exit $stat
+   fi
+
+   if test -f "$tmpdepfile1"; then
+      tmpdepfile="$tmpdepfile1"
+   else
+      tmpdepfile="$tmpdepfile2"
+   fi
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a space and a tab in the [].
+      sed -e 's,^.*\.[a-z]*:[ 	]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  test -z "$dashmflag" && dashmflag=-M
+  ( IFS=" "
+    case " $* " in
+    *" --mode=compile "*) # this is libtool, let us make it quiet
+      for arg
+      do # cycle over the arguments
+        case "$arg" in
+	"--mode=compile")
+	  # insert --quiet before "--mode=compile"
+	  set fnord "$@" --quiet
+	  shift # fnord
+	  ;;
+	esac
+	set fnord "$@" "$arg"
+	shift # fnord
+	shift # "$arg"
+      done
+      ;;
+    esac
+    "$@" $dashmflag | sed 's:^[^:]*\:[ 	]*:'"$object"'\: :' > "$tmpdepfile"
+  ) &
+  proc=$!
+  "$@"
+  stat=$?
+  wait "$proc"
+  if test "$stat" != 0; then exit $stat; fi
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  # X makedepend
+  (
+    shift
+    cleared=no
+    for arg in "$@"; do
+      case $cleared in no)
+        set ""; shift
+	cleared=yes
+      esac
+      case "$arg" in
+        -D*|-I*)
+	  set fnord "$@" "$arg"; shift;;
+	-*)
+	  ;;
+	*)
+	  set fnord "$@" "$arg"; shift;;
+      esac
+    done
+    obj_suffix="`echo $object | sed 's/^.*\././'`"
+    touch "$tmpdepfile"
+    ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  ) &
+  proc=$!
+  "$@"
+  stat=$?
+  wait "$proc"
+  if test "$stat" != 0; then exit $stat; fi
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tail +3 "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  ( IFS=" "
+    case " $* " in
+    *" --mode=compile "*)
+      for arg
+      do # cycle over the arguments
+        case $arg in
+	"--mode=compile")
+	  # insert --quiet before "--mode=compile"
+	  set fnord "$@" --quiet
+	  shift # fnord
+	  ;;
+	esac
+	set fnord "$@" "$arg"
+	shift # fnord
+	shift # "$arg"
+      done
+      ;;
+    esac
+    "$@" -E |
+    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  ) &
+  proc=$!
+  "$@"
+  stat=$?
+  wait "$proc"
+  if test "$stat" != 0; then exit $stat; fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  ( IFS=" "
+    case " $* " in
+    *" --mode=compile "*)
+      for arg
+      do # cycle over the arguments
+        case $arg in
+	"--mode=compile")
+	  # insert --quiet before "--mode=compile"
+	  set fnord "$@" --quiet
+	  shift # fnord
+	  ;;
+	esac
+	set fnord "$@" "$arg"
+	shift # fnord
+	shift # "$arg"
+      done
+      ;;
+    esac
+    "$@" -E |
+    sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  ) &
+  proc=$!
+  "$@"
+  stat=$?
+  wait "$proc"
+  if test "$stat" != 0; then exit $stat; fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
+  echo "	" >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/example/Makefile b/mod_gsoap/mod_gsoap-0.6/apache_13/example/Makefile
new file mode 100644
index 0000000..2176bad
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/example/Makefile
@@ -0,0 +1,344 @@
+# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+####### This is the input file for automake, which will generate Makefile.in ##########
+
+SHELL = /bin/sh
+
+srcdir = .
+top_srcdir = ..
+
+prefix = /usr/local
+exec_prefix = ${prefix}
+
+bindir = ${exec_prefix}/bin
+sbindir = ${exec_prefix}/sbin
+libexecdir = ${exec_prefix}/libexec
+datadir = ${prefix}/share
+sysconfdir = ${prefix}/etc
+sharedstatedir = ${prefix}/com
+localstatedir = ${prefix}/var
+libdir = ${exec_prefix}/lib
+infodir = ${prefix}/info
+mandir = ${prefix}/man
+includedir = ${prefix}/include
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/mod_gsoap
+pkglibdir = $(libdir)/mod_gsoap
+pkgincludedir = $(includedir)/mod_gsoap
+top_builddir = ..
+
+ACLOCAL = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run aclocal
+AUTOCONF = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run autoconf
+AUTOMAKE = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run automake
+AUTOHEADER = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run autoheader
+
+INSTALL = /usr/bin/ginstall -c
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = s,x,x,
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = i686-suse-linux
+build_triplet = i686-suse-linux
+host_alias = i686-suse-linux
+host_triplet = i686-suse-linux
+target_alias = i686-suse-linux
+target_triplet = i686-suse-linux
+AMTAR = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run tar
+APXS_CXX_OPTIONS = 
+AS = as
+AWK = gawk
+CC = gcc
+CPP = gcc -E
+CXX = g++
+CXXDEBUGDEFINES = -D_NDEBUG
+CXXFLAGS =  -O2
+DEPDIR = .deps
+DLLTOOL = dlltool
+ECHO = echo
+EXEEXT = 
+EXISTS_APXS = yes
+EXISTS_GSOAP = yes
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIBTOOL_DEPS = ./ltmain.sh
+LN_S = ln -s
+OBJDUMP = objdump
+OBJEXT = o
+PACKAGE = mod_gsoap
+RANLIB = ranlib
+STRIP = strip
+VERSION = 0.0.5
+am__include = include
+am__quote = 
+install_sh = /home/aberger/apache_gsoap.0.0.5/install-sh
+
+SUBDIRS = calculator
+CLEANFILES = *~
+
+AUTOMAKE_OPTIONS = foreign 1.4
+subdir = example
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+DIST_SOURCES =
+
+RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
+	uninstall-info-recursive all-recursive install-data-recursive \
+	install-exec-recursive installdirs-recursive install-recursive \
+	uninstall-recursive check-recursive installcheck-recursive
+DIST_COMMON = Makefile.am Makefile.in
+DIST_SUBDIRS = $(SUBDIRS)
+all: all-recursive
+
+.SUFFIXES:
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  example/Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && \
+	  CONFIG_HEADERS= CONFIG_LINKS= \
+	  CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@set fnord $(MAKEFLAGS); amf=$$2; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@set fnord $(MAKEFLAGS); amf=$$2; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique $(LISP)
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || etags $(ETAGS_ARGS) $$tags  $$unique $(LISP)
+
+GTAGS:
+	here=`CDPATH=: && cd $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    $(mkinstalldirs) "$(distdir)/$$dir"; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    cp -pR $$d/$$file $(distdir) \
+	    || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	for subdir in $(SUBDIRS); do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d $(distdir)/$$subdir \
+	    || mkdir $(distdir)/$$subdir \
+	    || exit 1; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$(top_distdir)" \
+	        distdir=../$(distdir)/$$subdir \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+
+distclean-am: clean-am distclean-generic distclean-libtool \
+	distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
+	clean-generic clean-libtool clean-recursive distclean \
+	distclean-generic distclean-libtool distclean-recursive \
+	distclean-tags distdir dvi dvi-am dvi-recursive info info-am \
+	info-recursive install install-am install-data install-data-am \
+	install-data-recursive install-exec install-exec-am \
+	install-exec-recursive install-info install-info-am \
+	install-info-recursive install-man install-recursive \
+	install-strip installcheck installcheck-am installdirs \
+	installdirs-am installdirs-recursive maintainer-clean \
+	maintainer-clean-generic maintainer-clean-recursive mostlyclean \
+	mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
+	tags tags-recursive uninstall uninstall-am uninstall-info-am \
+	uninstall-info-recursive uninstall-recursive
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/example/Makefile.am b/mod_gsoap/mod_gsoap-0.6/apache_13/example/Makefile.am
new file mode 100644
index 0000000..e647246
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/example/Makefile.am
@@ -0,0 +1,8 @@
+####### This is the input file for automake, which will generate Makefile.in ##########
+
+SUBDIRS=calculator
+CLEANFILES= *~
+
+## not a GNU package. You can remove this line, if
+## you have all needed files, that a GNU package needs
+AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/example/Makefile.in b/mod_gsoap/mod_gsoap-0.6/apache_13/example/Makefile.in
new file mode 100644
index 0000000..5cdc995
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/example/Makefile.in
@@ -0,0 +1,344 @@
+# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+####### This is the input file for automake, which will generate Makefile.in ##########
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
+AMTAR = @AMTAR@
+APXS_CXX_OPTIONS = @APXS_CXX_OPTIONS@
+AS = @AS@
+AWK = @AWK@
+CC = @CC@
+CPP = @CPP@
+CXX = @CXX@
+CXXDEBUGDEFINES = @CXXDEBUGDEFINES@
+CXXFLAGS = @CXXFLAGS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+ECHO = @ECHO@
+EXEEXT = @EXEEXT@
+EXISTS_APXS = @EXISTS_APXS@
+EXISTS_GSOAP = @EXISTS_GSOAP@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LN_S = @LN_S@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+STRIP = @STRIP@
+VERSION = @VERSION@
+am__include = @am__include@
+am__quote = @am__quote@
+install_sh = @install_sh@
+
+SUBDIRS = calculator
+CLEANFILES = *~
+
+AUTOMAKE_OPTIONS = foreign 1.4
+subdir = example
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+DIST_SOURCES =
+
+RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
+	uninstall-info-recursive all-recursive install-data-recursive \
+	install-exec-recursive installdirs-recursive install-recursive \
+	uninstall-recursive check-recursive installcheck-recursive
+DIST_COMMON = Makefile.am Makefile.in
+DIST_SUBDIRS = $(SUBDIRS)
+all: all-recursive
+
+.SUFFIXES:
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  example/Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && \
+	  CONFIG_HEADERS= CONFIG_LINKS= \
+	  CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@set fnord $(MAKEFLAGS); amf=$$2; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@set fnord $(MAKEFLAGS); amf=$$2; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique $(LISP)
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || etags $(ETAGS_ARGS) $$tags  $$unique $(LISP)
+
+GTAGS:
+	here=`CDPATH=: && cd $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    $(mkinstalldirs) "$(distdir)/$$dir"; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    cp -pR $$d/$$file $(distdir) \
+	    || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	for subdir in $(SUBDIRS); do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d $(distdir)/$$subdir \
+	    || mkdir $(distdir)/$$subdir \
+	    || exit 1; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$(top_distdir)" \
+	        distdir=../$(distdir)/$$subdir \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+
+distclean-am: clean-am distclean-generic distclean-libtool \
+	distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
+	clean-generic clean-libtool clean-recursive distclean \
+	distclean-generic distclean-libtool distclean-recursive \
+	distclean-tags distdir dvi dvi-am dvi-recursive info info-am \
+	info-recursive install install-am install-data install-data-am \
+	install-data-recursive install-exec install-exec-am \
+	install-exec-recursive install-info install-info-am \
+	install-info-recursive install-man install-recursive \
+	install-strip installcheck installcheck-am installdirs \
+	installdirs-am installdirs-recursive maintainer-clean \
+	maintainer-clean-generic maintainer-clean-recursive mostlyclean \
+	mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
+	tags tags-recursive uninstall uninstall-am uninstall-info-am \
+	uninstall-info-recursive uninstall-recursive
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/.kdbgrc.client b/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/.kdbgrc.client
new file mode 100644
index 0000000..c339a71
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/.kdbgrc.client
@@ -0,0 +1,28 @@
+[Breakpoint 0]
+Enabled=true
+File=calcclnt.cpp
+Line=12
+Temporary=false
+
+[Breakpoint 1]
+Enabled=true
+File=../../../stdsoap2.cpp
+Line=5105
+Temporary=false
+
+[Breakpoint 2]
+Enabled=true
+File=../../../stdsoap2.cpp
+Line=484
+Temporary=false
+
+[General]
+DebuggerCmdStr=
+FileVersion=1
+ProgramArgs=1 + 2
+TTYLevel=7
+WorkingDirectory=
+
+[Memory]
+ColumnWidths=80,0
+NumExprs=0
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/Makefile b/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/Makefile
new file mode 100644
index 0000000..d79f1b2
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/Makefile
@@ -0,0 +1,384 @@
+# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+SHELL = /bin/sh
+
+srcdir = .
+top_srcdir = ../..
+
+prefix = /usr/local
+exec_prefix = ${prefix}
+
+bindir = ${exec_prefix}/bin
+sbindir = ${exec_prefix}/sbin
+libexecdir = ${exec_prefix}/libexec
+datadir = ${prefix}/share
+sysconfdir = ${prefix}/etc
+sharedstatedir = ${prefix}/com
+localstatedir = ${prefix}/var
+libdir = ${exec_prefix}/lib
+infodir = ${prefix}/info
+mandir = ${prefix}/man
+includedir = ${prefix}/include
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/mod_gsoap
+pkglibdir = $(libdir)/mod_gsoap
+pkgincludedir = $(includedir)/mod_gsoap
+top_builddir = ../..
+
+ACLOCAL = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run aclocal
+AUTOCONF = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run autoconf
+AUTOMAKE = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run automake
+AUTOHEADER = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run autoheader
+
+INSTALL = /usr/bin/ginstall -c
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = s,x,x,
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = i686-suse-linux
+build_triplet = i686-suse-linux
+host_alias = i686-suse-linux
+host_triplet = i686-suse-linux
+target_alias = i686-suse-linux
+target_triplet = i686-suse-linux
+AMTAR = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run tar
+APXS_CXX_OPTIONS = 
+AS = as
+AWK = gawk
+CC = gcc
+CPP = gcc -E
+CXX = g++
+CXXDEBUGDEFINES = -D_NDEBUG
+CXXFLAGS =  -O2
+DEPDIR = .deps
+DLLTOOL = dlltool
+ECHO = echo
+EXEEXT = 
+EXISTS_APXS = yes
+EXISTS_GSOAP = yes
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIBTOOL_DEPS = ./ltmain.sh
+LN_S = ln -s
+OBJDUMP = objdump
+OBJEXT = o
+PACKAGE = mod_gsoap
+RANLIB = ranlib
+STRIP = strip
+VERSION = 0.0.5
+am__include = include
+am__quote = 
+install_sh = /home/aberger/apache_gsoap.0.0.5/install-sh
+
+AM_CPPFLAGS = -D_REENTRANT $(CXXDEBUGDEFINES) -DDEBUG
+
+CLEANFILES = *~ *.log *.xml calc.nsmap soapC.cpp soapH.h soapServer.cpp ns.xsd calc.wsdl soapClient.cpp soapStub.h client
+
+BUILT_SOURCES = soapServer.cpp soapC.cpp calc.nsmap soapH.h ns.xsd calc.wsdl calc.nsmap
+
+lib_LTLIBRARIES = libCalculator.la
+
+noinst_PROGRAMS = client
+
+client_SOURCES = calcclnt.cpp soapC.cpp soapClient.cpp
+
+libCalculator_la_SOURCES = \
+    calculator.cpp \
+	soapServer.cpp \
+	soapC.cpp
+
+
+libCalculator_la_LIBADD = 
+
+client_LDADD = -lgsoap++
+libCalculator_la_LDFLAGS = -version-info 0:0:0 -module -lgsoap++
+
+INCLUDES = -I$(top_builddir)
+subdir = example/calculator
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(lib_LTLIBRARIES)
+
+libCalculator_la_DEPENDENCIES =
+am_libCalculator_la_OBJECTS = calculator.lo soapServer.lo soapC.lo
+libCalculator_la_OBJECTS = $(am_libCalculator_la_OBJECTS)
+noinst_PROGRAMS = client$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+
+am_client_OBJECTS = calcclnt.$(OBJEXT) soapC.$(OBJEXT) \
+	soapClient.$(OBJEXT)
+client_OBJECTS = $(am_client_OBJECTS)
+client_DEPENDENCIES =
+client_LDFLAGS =
+
+DEFS = -DHAVE_CONFIG_H
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
+CPPFLAGS = 
+LDFLAGS = 
+LIBS = 
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+DEP_FILES = $(DEPDIR)/calcclnt.Po $(DEPDIR)/calculator.Plo \
+	$(DEPDIR)/soapC.Plo $(DEPDIR)/soapC.Po \
+	$(DEPDIR)/soapClient.Po $(DEPDIR)/soapServer.Plo
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(libCalculator_la_SOURCES) $(client_SOURCES)
+DIST_COMMON = Makefile.am Makefile.in
+SOURCES = $(libCalculator_la_SOURCES) $(client_SOURCES)
+
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  example/calculator/Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && \
+	  CONFIG_HEADERS= CONFIG_LINKS= \
+	  CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(libdir)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    echo " $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$p"; \
+	    $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$p; \
+	  else :; fi; \
+	done
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \
+	  $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+libCalculator.la: $(libCalculator_la_OBJECTS) $(libCalculator_la_DEPENDENCIES) 
+	$(CXXLINK) -rpath $(libdir) $(libCalculator_la_LDFLAGS) $(libCalculator_la_OBJECTS) $(libCalculator_la_LIBADD) $(LIBS)
+
+clean-noinstPROGRAMS:
+	-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+client$(EXEEXT): $(client_OBJECTS) $(client_DEPENDENCIES) 
+	@rm -f client$(EXEEXT)
+	$(CXXLINK) $(client_LDFLAGS) $(client_OBJECTS) $(client_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+	-rm -f *.tab.c
+
+include $(DEPDIR)/calcclnt.Po
+include $(DEPDIR)/calculator.Plo
+include $(DEPDIR)/soapC.Plo
+include $(DEPDIR)/soapC.Po
+include $(DEPDIR)/soapClient.Po
+include $(DEPDIR)/soapServer.Plo
+
+distclean-depend:
+	-rm -rf $(DEPDIR)
+
+.cpp.o:
+	source='$<' object='$@' libtool=no \
+	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \
+	$(CXXDEPMODE) $(depcomp) \
+	$(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
+
+.cpp.obj:
+	source='$<' object='$@' libtool=no \
+	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \
+	$(CXXDEPMODE) $(depcomp) \
+	$(CXXCOMPILE) -c -o $@ `cygpath -w $<`
+
+.cpp.lo:
+	source='$<' object='$@' libtool=yes \
+	depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' \
+	$(CXXDEPMODE) $(depcomp) \
+	$(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
+CXXDEPMODE = depmode=gcc
+uninstall-info-am:
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique $(LISP)
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || etags $(ETAGS_ARGS) $$tags  $$unique $(LISP)
+
+GTAGS:
+	here=`CDPATH=: && cd $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    $(mkinstalldirs) "$(distdir)/$$dir"; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    cp -pR $$d/$$file $(distdir) \
+	    || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS)
+
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(libdir)
+
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+
+distclean-am: clean-am distclean-compile distclean-depend \
+	distclean-generic distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
+
+.PHONY: GTAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS \
+	distclean distclean-compile distclean-depend distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am info \
+	info-am install install-am install-data install-data-am \
+	install-exec install-exec-am install-info install-info-am \
+	install-libLTLIBRARIES install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool tags uninstall \
+	uninstall-am uninstall-info-am uninstall-libLTLIBRARIES
+
+
+calculator.cpp: calc.nsmap soapH.h
+
+soapC.cpp soapServer.cpp ns.nsmap ns.xsd calc.wsdl soapH.h calc.nsmap: calculator.h
+	soapcpp2 calculator.h
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/Makefile.am b/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/Makefile.am
new file mode 100644
index 0000000..74ad561
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/Makefile.am
@@ -0,0 +1,32 @@
+## this file is input for automake and will generate Makefile.in
+
+AM_CPPFLAGS=-D_REENTRANT $(CXXDEBUGDEFINES) -DDEBUG
+
+CLEANFILES=*~ *.log *.xml calc.nsmap soapC.cpp soapH.h soapServer.cpp ns.xsd calc.wsdl soapClient.cpp soapStub.h client
+
+
+BUILT_SOURCES = soapServer.cpp soapC.cpp calc.nsmap soapH.h ns.xsd calc.wsdl calc.nsmap
+
+lib_LTLIBRARIES = libCalculator.la
+
+noinst_PROGRAMS = client
+
+client_SOURCES=calcclnt.cpp soapC.cpp soapClient.cpp
+
+calculator.cpp: calc.nsmap soapH.h
+
+libCalculator_la_SOURCES = \
+    calculator.cpp \
+	soapServer.cpp \
+	soapC.cpp
+
+libCalculator_la_LIBADD = 
+
+client_LDADD=-lgsoap++
+libCalculator_la_LDFLAGS = -version-info 0:0:0 -module -lgsoap++
+
+INCLUDES=-I$(top_builddir)
+
+soapC.cpp soapServer.cpp ns.nsmap ns.xsd calc.wsdl soapH.h calc.nsmap: calculator.h
+	soapcpp2 calculator.h
+
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/Makefile.in b/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/Makefile.in
new file mode 100644
index 0000000..350565f
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/Makefile.in
@@ -0,0 +1,384 @@
+# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
+AMTAR = @AMTAR@
+APXS_CXX_OPTIONS = @APXS_CXX_OPTIONS@
+AS = @AS@
+AWK = @AWK@
+CC = @CC@
+CPP = @CPP@
+CXX = @CXX@
+CXXDEBUGDEFINES = @CXXDEBUGDEFINES@
+CXXFLAGS = @CXXFLAGS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+ECHO = @ECHO@
+EXEEXT = @EXEEXT@
+EXISTS_APXS = @EXISTS_APXS@
+EXISTS_GSOAP = @EXISTS_GSOAP@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LN_S = @LN_S@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+STRIP = @STRIP@
+VERSION = @VERSION@
+am__include = @am__include@
+am__quote = @am__quote@
+install_sh = @install_sh@
+
+AM_CPPFLAGS = -D_REENTRANT $(CXXDEBUGDEFINES) -DDEBUG
+
+CLEANFILES = *~ *.log *.xml calc.nsmap soapC.cpp soapH.h soapServer.cpp ns.xsd calc.wsdl soapClient.cpp soapStub.h client
+
+BUILT_SOURCES = soapServer.cpp soapC.cpp calc.nsmap soapH.h ns.xsd calc.wsdl calc.nsmap
+
+lib_LTLIBRARIES = libCalculator.la
+
+noinst_PROGRAMS = client
+
+client_SOURCES = calcclnt.cpp soapC.cpp soapClient.cpp
+
+libCalculator_la_SOURCES = \
+    calculator.cpp \
+	soapServer.cpp \
+	soapC.cpp
+
+
+libCalculator_la_LIBADD = 
+
+client_LDADD = -lgsoap++
+libCalculator_la_LDFLAGS = -version-info 0:0:0 -module -lgsoap++
+
+INCLUDES = -I$(top_builddir)
+subdir = example/calculator
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(lib_LTLIBRARIES)
+
+libCalculator_la_DEPENDENCIES =
+am_libCalculator_la_OBJECTS = calculator.lo soapServer.lo soapC.lo
+libCalculator_la_OBJECTS = $(am_libCalculator_la_OBJECTS)
+noinst_PROGRAMS = client$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+
+am_client_OBJECTS = calcclnt.$(OBJEXT) soapC.$(OBJEXT) \
+	soapClient.$(OBJEXT)
+client_OBJECTS = $(am_client_OBJECTS)
+client_DEPENDENCIES =
+client_LDFLAGS =
+
+DEFS = @DEFS@
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/calcclnt.Po $(DEPDIR)/calculator.Plo \
+@AMDEP_TRUE@	$(DEPDIR)/soapC.Plo $(DEPDIR)/soapC.Po \
+@AMDEP_TRUE@	$(DEPDIR)/soapClient.Po $(DEPDIR)/soapServer.Plo
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(libCalculator_la_SOURCES) $(client_SOURCES)
+DIST_COMMON = Makefile.am Makefile.in
+SOURCES = $(libCalculator_la_SOURCES) $(client_SOURCES)
+
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  example/calculator/Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && \
+	  CONFIG_HEADERS= CONFIG_LINKS= \
+	  CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(libdir)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    echo " $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$p"; \
+	    $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$p; \
+	  else :; fi; \
+	done
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \
+	  $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+libCalculator.la: $(libCalculator_la_OBJECTS) $(libCalculator_la_DEPENDENCIES) 
+	$(CXXLINK) -rpath $(libdir) $(libCalculator_la_LDFLAGS) $(libCalculator_la_OBJECTS) $(libCalculator_la_LIBADD) $(LIBS)
+
+clean-noinstPROGRAMS:
+	-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+client$(EXEEXT): $(client_OBJECTS) $(client_DEPENDENCIES) 
+	@rm -f client$(EXEEXT)
+	$(CXXLINK) $(client_LDFLAGS) $(client_OBJECTS) $(client_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/calcclnt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/calculator.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/soapC.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/soapC.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/soapClient.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/soapServer.Plo@am__quote@
+
+distclean-depend:
+	-rm -rf $(DEPDIR)
+
+.cpp.o:
+@AMDEP_TRUE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+	$(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
+
+.cpp.obj:
+@AMDEP_TRUE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+	$(CXXCOMPILE) -c -o $@ `cygpath -w $<`
+
+.cpp.lo:
+@AMDEP_TRUE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@	depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+	$(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
+CXXDEPMODE = @CXXDEPMODE@
+uninstall-info-am:
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique $(LISP)
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || etags $(ETAGS_ARGS) $$tags  $$unique $(LISP)
+
+GTAGS:
+	here=`CDPATH=: && cd $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    $(mkinstalldirs) "$(distdir)/$$dir"; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    cp -pR $$d/$$file $(distdir) \
+	    || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS)
+
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(libdir)
+
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+
+distclean-am: clean-am distclean-compile distclean-depend \
+	distclean-generic distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
+
+.PHONY: GTAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS \
+	distclean distclean-compile distclean-depend distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am info \
+	info-am install install-am install-data install-data-am \
+	install-exec install-exec-am install-info install-info-am \
+	install-libLTLIBRARIES install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool tags uninstall \
+	uninstall-am uninstall-info-am uninstall-libLTLIBRARIES
+
+
+calculator.cpp: calc.nsmap soapH.h
+
+soapC.cpp soapServer.cpp ns.nsmap ns.xsd calc.wsdl soapH.h calc.nsmap: calculator.h
+	soapcpp2 calculator.h
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/calcclnt.cpp b/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/calcclnt.cpp
new file mode 100644
index 0000000..cda800e
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/calcclnt.cpp
@@ -0,0 +1,25 @@
+#include <string.h>
+#include "soapH.h"
+#include "calc.nsmap"
+
+int main(int argc, char** argv)
+{ 
+  struct soap *soap = soap_new();
+  int a, b, result;
+  if(argc > 3 )
+  { a = atoi(argv[1]);
+    b = atoi(argv[3]);
+  }
+  else
+      return -1;
+
+  switch (*argv[2]) {
+  case '+':
+    if(soap_call_ns__add(soap, "http://localhost:8080/soap", "calculate", a, b, &result) == 0)
+      printf("%d+%d=%d\n", a, b, result);
+    else
+      soap_print_fault(soap, stdout);
+    break;
+ }
+  return 0;
+}
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/calculator.cpp b/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/calculator.cpp
new file mode 100644
index 0000000..2318ef8
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/calculator.cpp
@@ -0,0 +1,56 @@
+/** Demo of a calculator gsoap service implemented as a shared library that can be loaded from Apache Http Server.
+ * @author Christian Aberger (http://www.aberger.at)
+ * @file calculator.cpp
+ */
+
+#include <float.h>
+#include <string.h>
+#include "soapH.h"
+#include "apache_gsoap.h"
+#include "calc.nsmap" // link the namespace
+
+IMPLEMENT_GSOAP_SERVER() ///< this macro defines the necessary exports from the dll.
+
+int ns__add(struct soap *soap, int a, int b, int *result) {
+	*result = a + b;
+	return SOAP_OK;
+}
+int ns__subtract(struct soap *, int a, int b, int *result) {
+	*result = a - b;
+	return SOAP_OK;
+}
+int ns__mutiply(struct soap *, int a, int b, int *result) {
+	*result = a * b;
+	return SOAP_OK;
+}
+int ns__divide(struct soap * soap, int a, int b, int *result) {
+	if (fabs(a) > DBL_EPSILON) {
+		*result = a / b;
+	} else {
+	  return soap_receiver_fault(soap, "divide by zero in ns__divide", "make sure divisor is > 0");
+	}
+	return SOAP_OK;
+}
+/*
+int main(void) {
+	struct soap soap;
+	soap_init(&soap);
+	int master = soap_bind(&soap, "localhost", 8080, 100);
+	if (master < 0) {
+		soap_print_fault(&soap, stderr);
+		exit(-1);
+	}
+	fprintf(stderr, "Socket connection success\n");
+	while(1) {
+		int client = soap_accept(&soap);
+		if (client < 0) {
+			soap_print_fault(&soap, stderr);
+			exit(-2);
+		}
+		fprintf(stderr, "Client connected\n");
+		soap_serve(&soap);
+		soap_end(&soap);
+	}
+}
+*/
+
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/calculator.h b/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/calculator.h
new file mode 100644
index 0000000..66566fa
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/calculator.h
@@ -0,0 +1,7 @@
+//gsoap ns service name:	calc
+//gsoap ns service location:	http://localhost/calc
+//gsoap ns service namespace:	calc
+//gsoap ns schema namespace:	calc
+//gsap ns service executable: gsoap
+int ns__add(int a, int b, int *result);
+
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/soapcalcProxy.h b/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/soapcalcProxy.h
new file mode 100644
index 0000000..647b95e
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/soapcalcProxy.h
@@ -0,0 +1,18 @@
+/* soapcalcProxy.h
+   Generated by gSOAP 2.2.1a from calculator.h
+   Copyright (C) 2001-2002 Robert A. van Engelen
+   All Rights Reserved.
+*/
+
+#ifndef calc_H
+#define calc_H
+#include "soapH.h"
+class calc
+{   public:
+	struct soap *soap;
+	const char *endpoint;
+	calc() { soap = soap_new(); endpoint = "http://localhost/calc"; };
+	~calc() { if (soap) { soap_destroy(soap); soap_end(soap); soap_done(soap); free((void*)soap); } };
+	int add(int a, int b, int *result) { return soap ? soap_call_ns__add(soap, endpoint, NULL, a, b, result) : SOAP_EOM; };
+};
+#endif
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/testit b/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/testit
new file mode 100644
index 0000000..33dd739
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/testit
@@ -0,0 +1,10 @@
+#! /bin/bash
+
+rm -f RECV.log
+./client 1 + 2
+
+if [ -f RECV.log ] ; then \
+	cat RECV.log; \
+else \
+	echo "When you recompile both gsoap and this project with configure --enable-debug, then a protocol log file will be generated. Use that in case of problems before you write mail to aberger."
+fi
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/install-sh b/mod_gsoap/mod_gsoap-0.6/apache_13/install-sh
new file mode 100644
index 0000000..e9de238
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/install-sh
@@ -0,0 +1,251 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission.  M.I.T. makes no representations about the
+# suitability of this software for any purpose.  It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+    case $1 in
+	-c) instcmd="$cpprog"
+	    shift
+	    continue;;
+
+	-d) dir_arg=true
+	    shift
+	    continue;;
+
+	-m) chmodcmd="$chmodprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-o) chowncmd="$chownprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-g) chgrpcmd="$chgrpprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-s) stripcmd="$stripprog"
+	    shift
+	    continue;;
+
+	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
+	    shift
+	    continue;;
+
+	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+	    shift
+	    continue;;
+
+	*)  if [ x"$src" = x ]
+	    then
+		src=$1
+	    else
+		# this colon is to work around a 386BSD /bin/sh bug
+		:
+		dst=$1
+	    fi
+	    shift
+	    continue;;
+    esac
+done
+
+if [ x"$src" = x ]
+then
+	echo "install:	no input file specified"
+	exit 1
+else
+	true
+fi
+
+if [ x"$dir_arg" != x ]; then
+	dst=$src
+	src=""
+	
+	if [ -d $dst ]; then
+		instcmd=:
+		chmodcmd=""
+	else
+		instcmd=mkdir
+	fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad 
+# if $src (and thus $dsttmp) contains '*'.
+
+	if [ -f $src -o -d $src ]
+	then
+		true
+	else
+		echo "install:  $src does not exist"
+		exit 1
+	fi
+	
+	if [ x"$dst" = x ]
+	then
+		echo "install:	no destination specified"
+		exit 1
+	else
+		true
+	fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+	if [ -d $dst ]
+	then
+		dst="$dst"/`basename $src`
+	else
+		true
+	fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+#  this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='	
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+	pathcomp="${pathcomp}${1}"
+	shift
+
+	if [ ! -d "${pathcomp}" ] ;
+        then
+		$mkdirprog "${pathcomp}"
+	else
+		true
+	fi
+
+	pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+	$doit $instcmd $dst &&
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+	if [ x"$transformarg" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		dstfile=`basename $dst $transformbasename | 
+			sed $transformarg`$transformbasename
+	fi
+
+# don't allow the sed command to completely eliminate the filename
+
+	if [ x"$dstfile" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		true
+	fi
+
+# Make a temp file name in the proper directory.
+
+	dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+	$doit $instcmd $src $dsttmp &&
+
+	trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing.  If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+	$doit $rmcmd -f $dstdir/$dstfile &&
+	$doit $mvcmd $dsttmp $dstdir/$dstfile 
+
+fi &&
+
+
+exit 0
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/libtool b/mod_gsoap/mod_gsoap-0.6/apache_13/libtool
new file mode 100644
index 0000000..e7a1af7
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/libtool
@@ -0,0 +1,5285 @@
+#! /bin/sh
+
+# libtool - Provide generalized library-building support services.
+# Generated automatically by  (GNU mod_gsoap 0.0.5)
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996-2000 Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="sed -e s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Libtool was configured on host redux:
+
+# Shell to use when invoking shell scripts.
+SHELL="/bin/sh"
+
+# Whether or not to build shared libraries.
+build_libtool_libs=yes
+
+# Whether or not to build static libraries.
+build_old_libs=yes
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=no
+
+# Whether or not to optimize for fast installation.
+fast_install=yes
+
+# The host system.
+host_alias=i686-suse-linux
+host=i686-suse-linux
+
+# An echo program that does not interpret backslashes.
+echo="echo"
+
+# The archiver.
+AR="ar"
+AR_FLAGS="cru"
+
+# The default C compiler.
+CC="gcc"
+
+# Is the compiler the GNU C compiler?
+with_gcc=yes
+
+# The linker used to build libraries.
+LD="/usr/i486-suse-linux/bin/ld"
+
+# Whether we need hard or soft links.
+LN_S="ln -s"
+
+# A BSD-compatible nm program.
+NM="/usr/bin/nm -B"
+
+# A symbol stripping program
+STRIP=strip
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=file
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="dlltool"
+
+# Used on cygwin: object dumper.
+OBJDUMP="objdump"
+
+# Used on cygwin: assembler.
+AS="as"
+
+# The name of the directory that contains temporary libtool files.
+objdir=.libs
+
+# How to create reloadable object files.
+reload_flag=" -r"
+reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
+
+# How to pass a linker flag through the compiler.
+wl="-Wl,"
+
+# Object file suffix (normally "o").
+objext="o"
+
+# Old archive suffix (normally "a").
+libext="a"
+
+# Executable file suffix (normally "").
+exeext=""
+
+# Additional compiler flags for building library objects.
+pic_flag=" -fPIC"
+pic_mode=default
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o="yes"
+
+# Can we write directly to a .lo ?
+compiler_o_lo="yes"
+
+# Must we lock files when doing compilation ?
+need_locks="no"
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=no
+
+# Do we need a version for libraries?
+need_version=no
+
+# Whether dlopen is supported.
+dlopen_support=yes
+
+# Whether dlopen of programs is supported.
+dlopen_self=yes
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=no
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag="-static"
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=" -fno-builtin -fno-rtti -fno-exceptions"
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec="\${wl}--export-dynamic"
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=""
+
+# Library versioning type.
+version_type=linux
+
+# Format of library name prefix.
+libname_spec="lib\$name"
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec="\${libname}\${release}.so\$versuffix \${libname}\${release}.so\$major \$libname.so"
+
+# The coded name of the library, if different from the real name.
+soname_spec="\${libname}\${release}.so\$major"
+
+# Commands used to build and install an old-style archive.
+RANLIB="ranlib"
+old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
+old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
+old_postuninstall_cmds=""
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=""
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=""
+
+# Commands used to build and install a shared archive.
+archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
+archive_expsym_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib"
+postinstall_cmds=""
+postuninstall_cmds=""
+
+# Commands to strip libraries.
+old_striplib="strip --strip-debug"
+striplib="strip --strip-unneeded"
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method="pass_all"
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd="\$MAGIC_CMD"
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=""
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=""
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=""
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe="sed -n -e 's/^.*[ 	]\\([ABCDGISTW][ABCDGISTW]*\\)[ 	][ 	]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern char \\1;/p'"
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/  {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/  {\"\\2\", (lt_ptr) \\&\\2},/p'"
+
+# This is the shared library runtime path variable.
+runpath_var=LD_RUN_PATH
+
+# This is the shared library path variable.
+shlibpath_var=LD_LIBRARY_PATH
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=no
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=immediate
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=yes
+
+# Flag to hardcode $libdir into a binary during linking.
+# This must work even if $libdir does not exist.
+hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=""
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=no
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=no
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=unsupported
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=unknown
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+
+# Fix the shell variable $srcfile for the compiler.
+fix_srcfile_path=""
+
+# Set to yes if exported symbols are required.
+always_export_symbols=no
+
+# The commands to list exported symbols.
+export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | sed 's/.* //' | sort | uniq > \$export_symbols"
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=""
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
+
+# Symbols that must always be exported.
+include_expsyms=""
+
+# ### END LIBTOOL CONFIG
+
+# ltmain.sh - Provide generalized library-building support services.
+# NOTE: Changing this file will not affect anything until you rerun configure.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Check that we have a working $echo.
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell, and then maybe $echo will work.
+  exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit 0
+fi
+
+# The name of this program.
+progname=`$echo "$0" | sed 's%^.*/%%'`
+modename="$progname"
+
+# Constants.
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.4.2
+TIMESTAMP=" (1.922.2.53 2001/09/11 03:18:52)"
+
+default_mode=
+help="Try \`$progname --help' for more information."
+magic="%%%MAGIC variable%%%"
+mkdir="mkdir"
+mv="mv -f"
+rm="rm -f"
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
+SP2NL='tr \040 \012'
+NL2SP='tr \015\012 \040\040'
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+# We save the old values to restore during execute mode.
+if test "${LC_ALL+set}" = set; then
+  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
+fi
+if test "${LANG+set}" = set; then
+  save_LANG="$LANG"; LANG=C; export LANG
+fi
+
+# Make sure IFS has a sensible default
+: ${IFS=" 	"}
+
+if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+  echo "$modename: not configured to build any kind of library" 1>&2
+  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+  exit 1
+fi
+
+# Global variables.
+mode=$default_mode
+nonopt=
+prev=
+prevopt=
+run=
+show="$echo"
+show_help=
+execute_dlfiles=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+
+# Parse our command line options once, thoroughly.
+while test $# -gt 0
+do
+  arg="$1"
+  shift
+
+  case $arg in
+  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  # If the previous option needs an argument, assign it.
+  if test -n "$prev"; then
+    case $prev in
+    execute_dlfiles)
+      execute_dlfiles="$execute_dlfiles $arg"
+      ;;
+    *)
+      eval "$prev=\$arg"
+      ;;
+    esac
+
+    prev=
+    prevopt=
+    continue
+  fi
+
+  # Have we seen a non-optional argument yet?
+  case $arg in
+  --help)
+    show_help=yes
+    ;;
+
+  --version)
+    echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+    exit 0
+    ;;
+
+  --config)
+    sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
+    exit 0
+    ;;
+
+  --debug)
+    echo "$progname: enabling shell trace mode"
+    set -x
+    ;;
+
+  --dry-run | -n)
+    run=:
+    ;;
+
+  --features)
+    echo "host: $host"
+    if test "$build_libtool_libs" = yes; then
+      echo "enable shared libraries"
+    else
+      echo "disable shared libraries"
+    fi
+    if test "$build_old_libs" = yes; then
+      echo "enable static libraries"
+    else
+      echo "disable static libraries"
+    fi
+    exit 0
+    ;;
+
+  --finish) mode="finish" ;;
+
+  --mode) prevopt="--mode" prev=mode ;;
+  --mode=*) mode="$optarg" ;;
+
+  --quiet | --silent)
+    show=:
+    ;;
+
+  -dlopen)
+    prevopt="-dlopen"
+    prev=execute_dlfiles
+    ;;
+
+  -*)
+    $echo "$modename: unrecognized option \`$arg'" 1>&2
+    $echo "$help" 1>&2
+    exit 1
+    ;;
+
+  *)
+    nonopt="$arg"
+    break
+    ;;
+  esac
+done
+
+if test -n "$prevopt"; then
+  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
+  $echo "$help" 1>&2
+  exit 1
+fi
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+if test -z "$show_help"; then
+
+  # Infer the operation mode.
+  if test -z "$mode"; then
+    case $nonopt in
+    *cc | *++ | gcc* | *-gcc*)
+      mode=link
+      for arg
+      do
+	case $arg in
+	-c)
+	   mode=compile
+	   break
+	   ;;
+	esac
+      done
+      ;;
+    *db | *dbx | *strace | *truss)
+      mode=execute
+      ;;
+    *install*|cp|mv)
+      mode=install
+      ;;
+    *rm)
+      mode=uninstall
+      ;;
+    *)
+      # If we have no mode, but dlfiles were specified, then do execute mode.
+      test -n "$execute_dlfiles" && mode=execute
+
+      # Just use the default operation mode.
+      if test -z "$mode"; then
+	if test -n "$nonopt"; then
+	  $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
+	else
+	  $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
+	fi
+      fi
+      ;;
+    esac
+  fi
+
+  # Only execute mode is allowed to have -dlopen flags.
+  if test -n "$execute_dlfiles" && test "$mode" != execute; then
+    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
+    $echo "$help" 1>&2
+    exit 1
+  fi
+
+  # Change the help message to a mode-specific one.
+  generic_help="$help"
+  help="Try \`$modename --help --mode=$mode' for more information."
+
+  # These modes are in order of execution frequency so that they run quickly.
+  case $mode in
+  # libtool compile mode
+  compile)
+    modename="$modename: compile"
+    # Get the compilation command and the source file.
+    base_compile=
+    prev=
+    lastarg=
+    srcfile="$nonopt"
+    suppress_output=
+
+    user_target=no
+    for arg
+    do
+      case $prev in
+      "") ;;
+      xcompiler)
+	# Aesthetically quote the previous argument.
+	prev=
+	lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+
+	case $arg in
+	# Double-quote args containing other shell metacharacters.
+	# Many Bourne shells cannot handle close brackets correctly
+	# in scan sets, so we specify it separately.
+	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	  arg="\"$arg\""
+	  ;;
+	esac
+
+	# Add the previous argument to base_compile.
+	if test -z "$base_compile"; then
+	  base_compile="$lastarg"
+	else
+	  base_compile="$base_compile $lastarg"
+	fi
+	continue
+	;;
+      esac
+
+      # Accept any command-line options.
+      case $arg in
+      -o)
+	if test "$user_target" != "no"; then
+	  $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+	  exit 1
+	fi
+	user_target=next
+	;;
+
+      -static)
+	build_old_libs=yes
+	continue
+	;;
+
+      -prefer-pic)
+	pic_mode=yes
+	continue
+	;;
+
+      -prefer-non-pic)
+	pic_mode=no
+	continue
+	;;
+
+      -Xcompiler)
+	prev=xcompiler
+	continue
+	;;
+
+      -Wc,*)
+	args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+	lastarg=
+	save_ifs="$IFS"; IFS=','
+	for arg in $args; do
+	  IFS="$save_ifs"
+
+	  # Double-quote args containing other shell metacharacters.
+	  # Many Bourne shells cannot handle close brackets correctly
+	  # in scan sets, so we specify it separately.
+	  case $arg in
+	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	    arg="\"$arg\""
+	    ;;
+	  esac
+	  lastarg="$lastarg $arg"
+	done
+	IFS="$save_ifs"
+	lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
+
+	# Add the arguments to base_compile.
+	if test -z "$base_compile"; then
+	  base_compile="$lastarg"
+	else
+	  base_compile="$base_compile $lastarg"
+	fi
+	continue
+	;;
+      esac
+
+      case $user_target in
+      next)
+	# The next one is the -o target name
+	user_target=yes
+	continue
+	;;
+      yes)
+	# We got the output file
+	user_target=set
+	libobj="$arg"
+	continue
+	;;
+      esac
+
+      # Accept the current argument as the source file.
+      lastarg="$srcfile"
+      srcfile="$arg"
+
+      # Aesthetically quote the previous argument.
+
+      # Backslashify any backslashes, double quotes, and dollar signs.
+      # These are the only characters that are still specially
+      # interpreted inside of double-quoted scrings.
+      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+
+      # Double-quote args containing other shell metacharacters.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      case $lastarg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	lastarg="\"$lastarg\""
+	;;
+      esac
+
+      # Add the previous argument to base_compile.
+      if test -z "$base_compile"; then
+	base_compile="$lastarg"
+      else
+	base_compile="$base_compile $lastarg"
+      fi
+    done
+
+    case $user_target in
+    set)
+      ;;
+    no)
+      # Get the name of the library object.
+      libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+      ;;
+    *)
+      $echo "$modename: you must specify a target with \`-o'" 1>&2
+      exit 1
+      ;;
+    esac
+
+    # Recognize several different file suffixes.
+    # If the user specifies -o file.o, it is replaced with file.lo
+    xform='[cCFSfmso]'
+    case $libobj in
+    *.ada) xform=ada ;;
+    *.adb) xform=adb ;;
+    *.ads) xform=ads ;;
+    *.asm) xform=asm ;;
+    *.c++) xform=c++ ;;
+    *.cc) xform=cc ;;
+    *.cpp) xform=cpp ;;
+    *.cxx) xform=cxx ;;
+    *.f90) xform=f90 ;;
+    *.for) xform=for ;;
+    esac
+
+    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+
+    case $libobj in
+    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+    *)
+      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
+      exit 1
+      ;;
+    esac
+
+    if test -z "$base_compile"; then
+      $echo "$modename: you must specify a compilation command" 1>&2
+      $echo "$help" 1>&2
+      exit 1
+    fi
+
+    # Delete any leftover library objects.
+    if test "$build_old_libs" = yes; then
+      removelist="$obj $libobj"
+    else
+      removelist="$libobj"
+    fi
+
+    $run $rm $removelist
+    trap "$run $rm $removelist; exit 1" 1 2 15
+
+    # On Cygwin there's no "real" PIC flag so we must build both object types
+    case $host_os in
+    cygwin* | mingw* | pw32* | os2*)
+      pic_mode=default
+      ;;
+    esac
+    if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then
+      # non-PIC code in shared libraries is not supported
+      pic_mode=default
+    fi
+
+    # Calculate the filename of the output object if compiler does
+    # not support -o with -c
+    if test "$compiler_c_o" = no; then
+      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+      lockfile="$output_obj.lock"
+      removelist="$removelist $output_obj $lockfile"
+      trap "$run $rm $removelist; exit 1" 1 2 15
+    else
+      need_locks=no
+      lockfile=
+    fi
+
+    # Lock this critical section if it is needed
+    # We use this script file to make the link, it avoids creating a new file
+    if test "$need_locks" = yes; then
+      until $run ln "$0" "$lockfile" 2>/dev/null; do
+	$show "Waiting for $lockfile to be removed"
+	sleep 2
+      done
+    elif test "$need_locks" = warn; then
+      if test -f "$lockfile"; then
+	echo "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit 1
+      fi
+      echo $srcfile > "$lockfile"
+    fi
+
+    if test -n "$fix_srcfile_path"; then
+      eval srcfile=\"$fix_srcfile_path\"
+    fi
+
+    # Only build a PIC object if we are building libtool libraries.
+    if test "$build_libtool_libs" = yes; then
+      # Without this assignment, base_compile gets emptied.
+      fbsd_hideous_sh_bug=$base_compile
+
+      if test "$pic_mode" != no; then
+	# All platforms use -DPIC, to notify preprocessed assembler code.
+	command="$base_compile $srcfile $pic_flag -DPIC"
+      else
+	# Don't build PIC code
+	command="$base_compile $srcfile"
+      fi
+      if test "$build_old_libs" = yes; then
+	lo_libobj="$libobj"
+	dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
+	if test "X$dir" = "X$libobj"; then
+	  dir="$objdir"
+	else
+	  dir="$dir/$objdir"
+	fi
+	libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
+
+	if test -d "$dir"; then
+	  $show "$rm $libobj"
+	  $run $rm $libobj
+	else
+	  $show "$mkdir $dir"
+	  $run $mkdir $dir
+	  status=$?
+	  if test $status -ne 0 && test ! -d $dir; then
+	    exit $status
+	  fi
+	fi
+      fi
+      if test "$compiler_o_lo" = yes; then
+	output_obj="$libobj"
+	command="$command -o $output_obj"
+      elif test "$compiler_c_o" = yes; then
+	output_obj="$obj"
+	command="$command -o $output_obj"
+      fi
+
+      $run $rm "$output_obj"
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+	test -n "$output_obj" && $run $rm $removelist
+	exit 1
+      fi
+
+      if test "$need_locks" = warn &&
+	 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
+	echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit 1
+      fi
+
+      # Just move the object if needed, then go on to compile the next one
+      if test x"$output_obj" != x"$libobj"; then
+	$show "$mv $output_obj $libobj"
+	if $run $mv $output_obj $libobj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # If we have no pic_flag, then copy the object into place and finish.
+      if (test -z "$pic_flag" || test "$pic_mode" != default) &&
+	 test "$build_old_libs" = yes; then
+	# Rename the .lo from within objdir to obj
+	if test -f $obj; then
+	  $show $rm $obj
+	  $run $rm $obj
+	fi
+
+	$show "$mv $libobj $obj"
+	if $run $mv $libobj $obj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+
+	xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+	if test "X$xdir" = "X$obj"; then
+	  xdir="."
+	else
+	  xdir="$xdir"
+	fi
+	baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
+	libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
+	# Now arrange that obj and lo_libobj become the same file
+	$show "(cd $xdir && $LN_S $baseobj $libobj)"
+	if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
+	  # Unlock the critical section if it was locked
+	  if test "$need_locks" != no; then
+	    $run $rm "$lockfile"
+	  fi
+	  exit 0
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # Allow error messages only from the first compilation.
+      suppress_output=' >/dev/null 2>&1'
+    fi
+
+    # Only build a position-dependent object if we build old libraries.
+    if test "$build_old_libs" = yes; then
+      if test "$pic_mode" != yes; then
+	# Don't build PIC code
+	command="$base_compile $srcfile"
+      else
+	# All platforms use -DPIC, to notify preprocessed assembler code.
+	command="$base_compile $srcfile $pic_flag -DPIC"
+      fi
+      if test "$compiler_c_o" = yes; then
+	command="$command -o $obj"
+	output_obj="$obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      command="$command$suppress_output"
+      $run $rm "$output_obj"
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+	$run $rm $removelist
+	exit 1
+      fi
+
+      if test "$need_locks" = warn &&
+	 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
+	echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit 1
+      fi
+
+      # Just move the object if needed
+      if test x"$output_obj" != x"$obj"; then
+	$show "$mv $output_obj $obj"
+	if $run $mv $output_obj $obj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # Create an invalid libtool object if no PIC, so that we do not
+      # accidentally link it into a program.
+      if test "$build_libtool_libs" != yes; then
+	$show "echo timestamp > $libobj"
+	$run eval "echo timestamp > \$libobj" || exit $?
+      else
+	# Move the .lo from within objdir
+	$show "$mv $libobj $lo_libobj"
+	if $run $mv $libobj $lo_libobj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+    fi
+
+    # Unlock the critical section if it was locked
+    if test "$need_locks" != no; then
+      $run $rm "$lockfile"
+    fi
+
+    exit 0
+    ;;
+
+  # libtool link mode
+  link | relink)
+    modename="$modename: link"
+    case $host in
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+      # It is impossible to link a dll without this setting, and
+      # we shouldn't force the makefile maintainer to figure out
+      # which system we are compiling for in order to pass an extra
+      # flag for every libtool invokation.
+      # allow_undefined=no
+
+      # FIXME: Unfortunately, there are problems with the above when trying
+      # to make a dll which has undefined symbols, in which case not
+      # even a static library is built.  For now, we need to specify
+      # -no-undefined on the libtool link line when we can be certain
+      # that all symbols are satisfied, otherwise we get a static library.
+      allow_undefined=yes
+      ;;
+    *)
+      allow_undefined=yes
+      ;;
+    esac
+    libtool_args="$nonopt"
+    compile_command="$nonopt"
+    finalize_command="$nonopt"
+
+    compile_rpath=
+    finalize_rpath=
+    compile_shlibpath=
+    finalize_shlibpath=
+    convenience=
+    old_convenience=
+    deplibs=
+    old_deplibs=
+    compiler_flags=
+    linker_flags=
+    dllsearchpath=
+    lib_search_path=`pwd`
+
+    avoid_version=no
+    dlfiles=
+    dlprefiles=
+    dlself=no
+    export_dynamic=no
+    export_symbols=
+    export_symbols_regex=
+    generated=
+    libobjs=
+    ltlibs=
+    module=no
+    no_install=no
+    objs=
+    prefer_static_libs=no
+    preload=no
+    prev=
+    prevarg=
+    release=
+    rpath=
+    xrpath=
+    perm_rpath=
+    temp_rpath=
+    thread_safe=no
+    vinfo=
+
+    # We need to know -static, to get the right output filenames.
+    for arg
+    do
+      case $arg in
+      -all-static | -static)
+	if test "X$arg" = "X-all-static"; then
+	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
+	  fi
+	  if test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	else
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	fi
+	build_libtool_libs=no
+	build_old_libs=yes
+	prefer_static_libs=yes
+	break
+	;;
+      esac
+    done
+
+    # See if our shared archives depend on static archives.
+    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+    # Go through the arguments, transforming them on the way.
+    while test $# -gt 0; do
+      arg="$1"
+      shift
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
+	;;
+      *) qarg=$arg ;;
+      esac
+      libtool_args="$libtool_args $qarg"
+
+      # If the previous option needs an argument, assign it.
+      if test -n "$prev"; then
+	case $prev in
+	output)
+	  compile_command="$compile_command @OUTPUT@"
+	  finalize_command="$finalize_command @OUTPUT@"
+	  ;;
+	esac
+
+	case $prev in
+	dlfiles|dlprefiles)
+	  if test "$preload" = no; then
+	    # Add the symbol object into the linking commands.
+	    compile_command="$compile_command @SYMFILE@"
+	    finalize_command="$finalize_command @SYMFILE@"
+	    preload=yes
+	  fi
+	  case $arg in
+	  *.la | *.lo) ;;  # We handle these cases below.
+	  force)
+	    if test "$dlself" = no; then
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  self)
+	    if test "$prev" = dlprefiles; then
+	      dlself=yes
+	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+	      dlself=yes
+	    else
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  *)
+	    if test "$prev" = dlfiles; then
+	      dlfiles="$dlfiles $arg"
+	    else
+	      dlprefiles="$dlprefiles $arg"
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  esac
+	  ;;
+	expsyms)
+	  export_symbols="$arg"
+	  if test ! -f "$arg"; then
+	    $echo "$modename: symbol file \`$arg' does not exist"
+	    exit 1
+	  fi
+	  prev=
+	  continue
+	  ;;
+	expsyms_regex)
+	  export_symbols_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	release)
+	  release="-$arg"
+	  prev=
+	  continue
+	  ;;
+	rpath | xrpath)
+	  # We need an absolute path.
+	  case $arg in
+	  [\\/]* | [A-Za-z]:[\\/]*) ;;
+	  *)
+	    $echo "$modename: only absolute run-paths are allowed" 1>&2
+	    exit 1
+	    ;;
+	  esac
+	  if test "$prev" = rpath; then
+	    case "$rpath " in
+	    *" $arg "*) ;;
+	    *) rpath="$rpath $arg" ;;
+	    esac
+	  else
+	    case "$xrpath " in
+	    *" $arg "*) ;;
+	    *) xrpath="$xrpath $arg" ;;
+	    esac
+	  fi
+	  prev=
+	  continue
+	  ;;
+	xcompiler)
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  compile_command="$compile_command $qarg"
+	  finalize_command="$finalize_command $qarg"
+	  continue
+	  ;;
+	xlinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $wl$qarg"
+	  prev=
+	  compile_command="$compile_command $wl$qarg"
+	  finalize_command="$finalize_command $wl$qarg"
+	  continue
+	  ;;
+	*)
+	  eval "$prev=\"\$arg\""
+	  prev=
+	  continue
+	  ;;
+	esac
+      fi # test -n $prev
+
+      prevarg="$arg"
+
+      case $arg in
+      -all-static)
+	if test -n "$link_static_flag"; then
+	  compile_command="$compile_command $link_static_flag"
+	  finalize_command="$finalize_command $link_static_flag"
+	fi
+	continue
+	;;
+
+      -allow-undefined)
+	# FIXME: remove this flag sometime in the future.
+	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
+	continue
+	;;
+
+      -avoid-version)
+	avoid_version=yes
+	continue
+	;;
+
+      -dlopen)
+	prev=dlfiles
+	continue
+	;;
+
+      -dlpreopen)
+	prev=dlprefiles
+	continue
+	;;
+
+      -export-dynamic)
+	export_dynamic=yes
+	continue
+	;;
+
+      -export-symbols | -export-symbols-regex)
+	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	  $echo "$modename: more than one -exported-symbols argument is not allowed"
+	  exit 1
+	fi
+	if test "X$arg" = "X-export-symbols"; then
+	  prev=expsyms
+	else
+	  prev=expsyms_regex
+	fi
+	continue
+	;;
+
+      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+      # so, if we see these flags be careful not to treat them like -L
+      -L[A-Z][A-Z]*:*)
+	case $with_gcc/$host in
+	no/*-*-irix*)
+	  compile_command="$compile_command $arg"
+	  finalize_command="$finalize_command $arg"
+	  ;;
+	esac
+	continue
+	;;
+
+      -L*)
+	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  absdir=`cd "$dir" && pwd`
+	  if test -z "$absdir"; then
+	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
+	    exit 1
+	  fi
+	  dir="$absdir"
+	  ;;
+	esac
+	case "$deplibs " in
+	*" -L$dir "*) ;;
+	*)
+	  deplibs="$deplibs -L$dir"
+	  lib_search_path="$lib_search_path $dir"
+	  ;;
+	esac
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  case :$dllsearchpath: in
+	  *":$dir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$dir";;
+	  esac
+	  ;;
+	esac
+	continue
+	;;
+
+      -l*)
+	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+	  case $host in
+	  *-*-cygwin* | *-*-pw32* | *-*-beos*)
+	    # These systems don't actually have a C or math library (as such)
+	    continue
+	    ;;
+	  *-*-mingw* | *-*-os2*)
+	    # These systems don't actually have a C library (as such)
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-openbsd*)
+	    # Do not include libc due to us having libc/libc_r.
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  esac
+	 elif test "X$arg" = "X-lc_r"; then
+	  case $host in
+	  *-*-openbsd*)
+	    # Do not include libc_r directly, use -pthread flag.
+	    continue
+	    ;;
+	  esac
+	fi
+	deplibs="$deplibs $arg"
+	continue
+	;;
+
+      -module)
+	module=yes
+	continue
+	;;
+
+      -no-fast-install)
+	fast_install=no
+	continue
+	;;
+
+      -no-install)
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  # The PATH hackery in wrapper scripts is required on Windows
+	  # in order for the loader to find any dlls it needs.
+	  $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
+	  $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
+	  fast_install=no
+	  ;;
+	*) no_install=yes ;;
+	esac
+	continue
+	;;
+
+      -no-undefined)
+	allow_undefined=no
+	continue
+	;;
+
+      -o) prev=output ;;
+
+      -release)
+	prev=release
+	continue
+	;;
+
+      -rpath)
+	prev=rpath
+	continue
+	;;
+
+      -R)
+	prev=xrpath
+	continue
+	;;
+
+      -R*)
+	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  $echo "$modename: only absolute run-paths are allowed" 1>&2
+	  exit 1
+	  ;;
+	esac
+	case "$xrpath " in
+	*" $dir "*) ;;
+	*) xrpath="$xrpath $dir" ;;
+	esac
+	continue
+	;;
+
+      -static)
+	# The effects of -static are defined in a previous loop.
+	# We used to do the same as -all-static on platforms that
+	# didn't have a PIC flag, but the assumption that the effects
+	# would be equivalent was wrong.  It would break on at least
+	# Digital Unix and AIX.
+	continue
+	;;
+
+      -thread-safe)
+	thread_safe=yes
+	continue
+	;;
+
+      -version-info)
+	prev=vinfo
+	continue
+	;;
+
+      -Wc,*)
+	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+	  case $flag in
+	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	    flag="\"$flag\""
+	    ;;
+	  esac
+	  arg="$arg $wl$flag"
+	  compiler_flags="$compiler_flags $flag"
+	done
+	IFS="$save_ifs"
+	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+	;;
+
+      -Wl,*)
+	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+	  case $flag in
+	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	    flag="\"$flag\""
+	    ;;
+	  esac
+	  arg="$arg $wl$flag"
+	  compiler_flags="$compiler_flags $wl$flag"
+	  linker_flags="$linker_flags $flag"
+	done
+	IFS="$save_ifs"
+	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+	;;
+
+      -Xcompiler)
+	prev=xcompiler
+	continue
+	;;
+
+      -Xlinker)
+	prev=xlinker
+	continue
+	;;
+
+      # Some other compiler flag.
+      -* | +*)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case $arg in
+	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	;;
+
+      *.lo | *.$objext)
+	# A library or standard object.
+	if test "$prev" = dlfiles; then
+	  # This file was specified with -dlopen.
+	  if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+	    dlfiles="$dlfiles $arg"
+	    prev=
+	    continue
+	  else
+	    # If libtool objects are unsupported, then we need to preload.
+	    prev=dlprefiles
+	  fi
+	fi
+
+	if test "$prev" = dlprefiles; then
+	  # Preload the old-style object.
+	  dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
+	  prev=
+	else
+	  case $arg in
+	  *.lo) libobjs="$libobjs $arg" ;;
+	  *) objs="$objs $arg" ;;
+	  esac
+	fi
+	;;
+
+      *.$libext)
+	# An archive.
+	deplibs="$deplibs $arg"
+	old_deplibs="$old_deplibs $arg"
+	continue
+	;;
+
+      *.la)
+	# A libtool-controlled library.
+
+	if test "$prev" = dlfiles; then
+	  # This library was specified with -dlopen.
+	  dlfiles="$dlfiles $arg"
+	  prev=
+	elif test "$prev" = dlprefiles; then
+	  # The library was specified with -dlpreopen.
+	  dlprefiles="$dlprefiles $arg"
+	  prev=
+	else
+	  deplibs="$deplibs $arg"
+	fi
+	continue
+	;;
+
+      # Some other compiler argument.
+      *)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case $arg in
+	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	;;
+      esac # arg
+
+      # Now actually substitute the argument into the commands.
+      if test -n "$arg"; then
+	compile_command="$compile_command $arg"
+	finalize_command="$finalize_command $arg"
+      fi
+    done # argument parsing loop
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit 1
+    fi
+
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      compile_command="$compile_command $arg"
+      finalize_command="$finalize_command $arg"
+    fi
+
+    # calculate the name of the file, without its directory
+    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+    libobjs_save="$libobjs"
+
+    if test -n "$shlibpath_var"; then
+      # get the directories listed in $shlibpath_var
+      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+    else
+      shlib_search_path=
+    fi
+    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$output_objdir" = "X$output"; then
+      output_objdir="$objdir"
+    else
+      output_objdir="$output_objdir/$objdir"
+    fi
+    # Create the object directory.
+    if test ! -d $output_objdir; then
+      $show "$mkdir $output_objdir"
+      $run $mkdir $output_objdir
+      status=$?
+      if test $status -ne 0 && test ! -d $output_objdir; then
+	exit $status
+      fi
+    fi
+
+    # Determine the type of output
+    case $output in
+    "")
+      $echo "$modename: you must specify an output file" 1>&2
+      $echo "$help" 1>&2
+      exit 1
+      ;;
+    *.$libext) linkmode=oldlib ;;
+    *.lo | *.$objext) linkmode=obj ;;
+    *.la) linkmode=lib ;;
+    *) linkmode=prog ;; # Anything else should be a program.
+    esac
+
+    specialdeplibs=
+    libs=
+    # Find all interdependent deplibs by searching for libraries
+    # that are linked more than once (e.g. -la -lb -la)
+    for deplib in $deplibs; do
+      case "$libs " in
+      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+      esac
+      libs="$libs $deplib"
+    done
+    deplibs=
+    newdependency_libs=
+    newlib_search_path=
+    need_relink=no # whether we're linking any uninstalled libtool libraries
+    notinst_deplibs= # not-installed libtool libraries
+    notinst_path= # paths that contain not-installed libtool libraries
+    case $linkmode in
+    lib)
+	passes="conv link"
+	for file in $dlfiles $dlprefiles; do
+	  case $file in
+	  *.la) ;;
+	  *)
+	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
+	    exit 1
+	    ;;
+	  esac
+	done
+	;;
+    prog)
+	compile_deplibs=
+	finalize_deplibs=
+	alldeplibs=no
+	newdlfiles=
+	newdlprefiles=
+	passes="conv scan dlopen dlpreopen link"
+	;;
+    *)  passes="conv"
+	;;
+    esac
+    for pass in $passes; do
+      if test $linkmode = prog; then
+	# Determine which files to process
+	case $pass in
+	dlopen)
+	  libs="$dlfiles"
+	  save_deplibs="$deplibs" # Collect dlpreopened libraries
+	  deplibs=
+	  ;;
+	dlpreopen) libs="$dlprefiles" ;;
+	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+	esac
+      fi
+      for deplib in $libs; do
+	lib=
+	found=no
+	case $deplib in
+	-l*)
+	  if test $linkmode = oldlib && test $linkmode = obj; then
+	    $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2
+	    continue
+	  fi
+	  if test $pass = conv; then
+	    deplibs="$deplib $deplibs"
+	    continue
+	  fi
+	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
+	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
+	    # Search the libtool library
+	    lib="$searchdir/lib${name}.la"
+	    if test -f "$lib"; then
+	      found=yes
+	      break
+	    fi
+	  done
+	  if test "$found" != yes; then
+	    # deplib doesn't seem to be a libtool library
+	    if test "$linkmode,$pass" = "prog,link"; then
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      deplibs="$deplib $deplibs"
+	      test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    continue
+	  fi
+	  ;; # -l
+	-L*)
+	  case $linkmode in
+	  lib)
+	    deplibs="$deplib $deplibs"
+	    test $pass = conv && continue
+	    newdependency_libs="$deplib $newdependency_libs"
+	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+	    ;;
+	  prog)
+	    if test $pass = conv; then
+	      deplibs="$deplib $deplibs"
+	      continue
+	    fi
+	    if test $pass = scan; then
+	      deplibs="$deplib $deplibs"
+	      newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    ;;
+	  *)
+	    $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2
+	    ;;
+	  esac # linkmode
+	  continue
+	  ;; # -L
+	-R*)
+	  if test $pass = link; then
+	    dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+	    # Make sure the xrpath contains only unique directories.
+	    case "$xrpath " in
+	    *" $dir "*) ;;
+	    *) xrpath="$xrpath $dir" ;;
+	    esac
+	  fi
+	  deplibs="$deplib $deplibs"
+	  continue
+	  ;;
+	*.la) lib="$deplib" ;;
+	*.$libext)
+	  if test $pass = conv; then
+	    deplibs="$deplib $deplibs"
+	    continue
+	  fi
+	  case $linkmode in
+	  lib)
+	    if test "$deplibs_check_method" != pass_all; then
+	      echo
+	      echo "*** Warning: This library needs some functionality provided by $deplib."
+	      echo "*** I have the capability to make that library automatically link in when"
+	      echo "*** you link to this library.  But I can only do this if you have a"
+	      echo "*** shared version of the library, which you do not appear to have."
+	    else
+	      echo
+	      echo "*** Warning: Linking the shared library $output against the"
+	      echo "*** static library $deplib is not portable!"
+	      deplibs="$deplib $deplibs"
+	    fi
+	    continue
+	    ;;
+	  prog)
+	    if test $pass != link; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    continue
+	    ;;
+	  esac # linkmode
+	  ;; # *.$libext
+	*.lo | *.$objext)
+	  if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+	    # If there is no dlopen support or we're linking statically,
+	    # we need to preload.
+	    newdlprefiles="$newdlprefiles $deplib"
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    newdlfiles="$newdlfiles $deplib"
+	  fi
+	  continue
+	  ;;
+	%DEPLIBS%)
+	  alldeplibs=yes
+	  continue
+	  ;;
+	esac # case $deplib
+	if test $found = yes || test -f "$lib"; then :
+	else
+	  $echo "$modename: cannot find the library \`$lib'" 1>&2
+	  exit 1
+	fi
+
+	# Check to see that this really is a libtool archive.
+	if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+	  exit 1
+	fi
+
+	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$ladir" = "X$lib" && ladir="."
+
+	dlname=
+	dlopen=
+	dlpreopen=
+	libdir=
+	library_names=
+	old_library=
+	# If the library was installed with an old release of libtool,
+	# it will not redefine variable installed.
+	installed=yes
+
+	# Read the .la file
+	case $lib in
+	*/* | *\\*) . $lib ;;
+	*) . ./$lib ;;
+	esac
+
+	if test "$linkmode,$pass" = "lib,link" ||
+	   test "$linkmode,$pass" = "prog,scan" ||
+	   { test $linkmode = oldlib && test $linkmode = obj; }; then
+	   # Add dl[pre]opened files of deplib
+	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+	fi
+
+	if test $pass = conv; then
+	  # Only check for convenience libraries
+	  deplibs="$lib $deplibs"
+	  if test -z "$libdir"; then
+	    if test -z "$old_library"; then
+	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+	      exit 1
+	    fi
+	    # It is a libtool convenience library, so add in its objects.
+	    convenience="$convenience $ladir/$objdir/$old_library"
+	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
+	    tmp_libs=
+	    for deplib in $dependency_libs; do
+	      deplibs="$deplib $deplibs"
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	      tmp_libs="$tmp_libs $deplib"
+	    done
+	  elif test $linkmode != prog && test $linkmode != lib; then
+	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
+	    exit 1
+	  fi
+	  continue
+	fi # $pass = conv
+
+	# Get the name of the library we link against.
+	linklib=
+	for l in $old_library $library_names; do
+	  linklib="$l"
+	done
+	if test -z "$linklib"; then
+	  $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+	  exit 1
+	fi
+
+	# This library was specified with -dlopen.
+	if test $pass = dlopen; then
+	  if test -z "$libdir"; then
+	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
+	    exit 1
+	  fi
+	  if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+	    # If there is no dlname, no dlopen support or we're linking
+	    # statically, we need to preload.
+	    dlprefiles="$dlprefiles $lib"
+	  else
+	    newdlfiles="$newdlfiles $lib"
+	  fi
+	  continue
+	fi # $pass = dlopen
+
+	# We need an absolute path.
+	case $ladir in
+	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+	*)
+	  abs_ladir=`cd "$ladir" && pwd`
+	  if test -z "$abs_ladir"; then
+	    $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
+	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+	    abs_ladir="$ladir"
+	  fi
+	  ;;
+	esac
+	laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+
+	# Find the relevant object directory and library name.
+	if test "X$installed" = Xyes; then
+	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    $echo "$modename: warning: library \`$lib' was moved." 1>&2
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    libdir="$abs_ladir"
+	  else
+	    dir="$libdir"
+	    absdir="$libdir"
+	  fi
+	else
+	  dir="$ladir/$objdir"
+	  absdir="$abs_ladir/$objdir"
+	  # Remove this search path later
+	  notinst_path="$notinst_path $abs_ladir"
+	fi # $installed = yes
+	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+
+	# This library was specified with -dlpreopen.
+	if test $pass = dlpreopen; then
+	  if test -z "$libdir"; then
+	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
+	    exit 1
+	  fi
+	  # Prefer using a static library (so that no silly _DYNAMIC symbols
+	  # are required to link).
+	  if test -n "$old_library"; then
+	    newdlprefiles="$newdlprefiles $dir/$old_library"
+	  # Otherwise, use the dlname, so that lt_dlopen finds it.
+	  elif test -n "$dlname"; then
+	    newdlprefiles="$newdlprefiles $dir/$dlname"
+	  else
+	    newdlprefiles="$newdlprefiles $dir/$linklib"
+	  fi
+	fi # $pass = dlpreopen
+
+	if test -z "$libdir"; then
+	  # Link the convenience library
+	  if test $linkmode = lib; then
+	    deplibs="$dir/$old_library $deplibs"
+	  elif test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$dir/$old_library $compile_deplibs"
+	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
+	  else
+	    deplibs="$lib $deplibs"
+	  fi
+	  continue
+	fi
+
+	if test $linkmode = prog && test $pass != link; then
+	  newlib_search_path="$newlib_search_path $ladir"
+	  deplibs="$lib $deplibs"
+
+	  linkalldeplibs=no
+	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
+	     test "$build_libtool_libs" = no; then
+	    linkalldeplibs=yes
+	  fi
+
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    case $deplib in
+	    -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
+	    esac
+	    # Need to link against all dependency_libs?
+	    if test $linkalldeplibs = yes; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      # Need to hardcode shared library paths
+	      # or/and link against static libraries
+	      newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    case "$tmp_libs " in
+	    *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	    esac
+	    tmp_libs="$tmp_libs $deplib"
+	  done # for deplib
+	  continue
+	fi # $linkmode = prog...
+
+	link_static=no # Whether the deplib will be linked statically
+	if test -n "$library_names" &&
+	   { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+	  # Link against this shared library
+
+	  if test "$linkmode,$pass" = "prog,link" ||
+	   { test $linkmode = lib && test $hardcode_into_libs = yes; }; then
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) compile_rpath="$compile_rpath $absdir"
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) finalize_rpath="$finalize_rpath $libdir"
+	      esac
+	      ;;
+	    esac
+	    if test $linkmode = prog; then
+	      # We need to hardcode the library path
+	      if test -n "$shlibpath_var"; then
+		# Make sure the rpath contains only unique directories.
+		case "$temp_rpath " in
+		*" $dir "*) ;;
+		*" $absdir "*) ;;
+		*) temp_rpath="$temp_rpath $dir" ;;
+		esac
+	      fi
+	    fi
+	  fi # $linkmode,$pass = prog,link...
+
+	  if test "$alldeplibs" = yes &&
+	     { test "$deplibs_check_method" = pass_all ||
+	       { test "$build_libtool_libs" = yes &&
+		 test -n "$library_names"; }; }; then
+	    # We only need to search for static libraries
+	    continue
+	  fi
+
+	  if test "$installed" = no; then
+	    notinst_deplibs="$notinst_deplibs $lib"
+	    need_relink=yes
+	  fi
+
+	  if test -n "$old_archive_from_expsyms_cmds"; then
+	    # figure out the soname
+	    set dummy $library_names
+	    realname="$2"
+	    shift; shift
+	    libname=`eval \\$echo \"$libname_spec\"`
+	    # use dlname if we got it. it's perfectly good, no?
+	    if test -n "$dlname"; then
+	      soname="$dlname"
+	    elif test -n "$soname_spec"; then
+	      # bleh windows
+	      case $host in
+	      *cygwin*)
+		major=`expr $current - $age`
+		versuffix="-$major"
+		;;
+	      esac
+	      eval soname=\"$soname_spec\"
+	    else
+	      soname="$realname"
+	    fi
+
+	    # Make a new name for the extract_expsyms_cmds to use
+	    soroot="$soname"
+	    soname=`echo $soroot | sed -e 's/^.*\///'`
+	    newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
+
+	    # If the library has no export list, then create one now
+	    if test -f "$output_objdir/$soname-def"; then :
+	    else
+	      $show "extracting exported symbol list from \`$soname'"
+	      save_ifs="$IFS"; IFS='~'
+	      eval cmds=\"$extract_expsyms_cmds\"
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		$show "$cmd"
+		$run eval "$cmd" || exit $?
+	      done
+	      IFS="$save_ifs"
+	    fi
+
+	    # Create $newlib
+	    if test -f "$output_objdir/$newlib"; then :; else
+	      $show "generating import library for \`$soname'"
+	      save_ifs="$IFS"; IFS='~'
+	      eval cmds=\"$old_archive_from_expsyms_cmds\"
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		$show "$cmd"
+		$run eval "$cmd" || exit $?
+	      done
+	      IFS="$save_ifs"
+	    fi
+	    # make sure the library variables are pointing to the new library
+	    dir=$output_objdir
+	    linklib=$newlib
+	  fi # test -n $old_archive_from_expsyms_cmds
+
+	  if test $linkmode = prog || test "$mode" != relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    lib_linked=yes
+	    case $hardcode_action in
+	    immediate | unsupported)
+	      if test "$hardcode_direct" = no; then
+		add="$dir/$linklib"
+	      elif test "$hardcode_minus_L" = no; then
+		case $host in
+		*-*-sunos*) add_shlibpath="$dir" ;;
+		esac
+		add_dir="-L$dir"
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = no; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    relink)
+	      if test "$hardcode_direct" = yes; then
+		add="$dir/$linklib"
+	      elif test "$hardcode_minus_L" = yes; then
+		add_dir="-L$dir"
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = yes; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    *) lib_linked=no ;;
+	    esac
+
+	    if test "$lib_linked" != yes; then
+	      $echo "$modename: configuration error: unsupported hardcode properties"
+	      exit 1
+	    fi
+
+	    if test -n "$add_shlibpath"; then
+	      case :$compile_shlibpath: in
+	      *":$add_shlibpath:"*) ;;
+	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+	      esac
+	    fi
+	    if test $linkmode = prog; then
+	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	      if test "$hardcode_direct" != yes && \
+		 test "$hardcode_minus_L" != yes && \
+		 test "$hardcode_shlibpath_var" = yes; then
+		case :$finalize_shlibpath: in
+		*":$libdir:"*) ;;
+		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+		esac
+	      fi
+	    fi
+	  fi
+
+	  if test $linkmode = prog || test "$mode" = relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    # Finalize command for both is simple: just hardcode it.
+	    if test "$hardcode_direct" = yes; then
+	      add="$libdir/$linklib"
+	    elif test "$hardcode_minus_L" = yes; then
+	      add_dir="-L$libdir"
+	      add="-l$name"
+	    elif test "$hardcode_shlibpath_var" = yes; then
+	      case :$finalize_shlibpath: in
+	      *":$libdir:"*) ;;
+	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+	      esac
+	      add="-l$name"
+	    else
+	      # We cannot seem to hardcode it, guess we'll fake it.
+	      if test "X$installed" = Xyes; then
+	        add_dir="-L$libdir"
+	      else
+	        add_dir="-L$DESTDIR$libdir"
+	      fi
+	      add="-l$name"
+	    fi
+
+	    if test $linkmode = prog; then
+	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	    fi
+	  fi
+	elif test $linkmode = prog; then
+	  if test "$alldeplibs" = yes &&
+	     { test "$deplibs_check_method" = pass_all ||
+	       { test "$build_libtool_libs" = yes &&
+		 test -n "$library_names"; }; }; then
+	    # We only need to search for static libraries
+	    continue
+	  fi
+
+	  # Try to link the static library
+	  # Here we assume that one of hardcode_direct or hardcode_minus_L
+	  # is not unsupported.  This is valid on all known static and
+	  # shared platforms.
+	  if test "$hardcode_direct" != unsupported; then
+	    test -n "$old_library" && linklib="$old_library"
+	    compile_deplibs="$dir/$linklib $compile_deplibs"
+	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
+	  else
+	    compile_deplibs="-l$name -L$dir $compile_deplibs"
+	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+	  fi
+	elif test "$build_libtool_libs" = yes; then
+	  # Not a shared library
+	  if test "$deplibs_check_method" != pass_all; then
+	    # We're trying link a shared library against a static one
+	    # but the system doesn't support it.
+
+	    # Just print a warning and add the library to dependency_libs so
+	    # that the program can be linked against the static library.
+	    echo
+	    echo "*** Warning: This library needs some functionality provided by $lib."
+	    echo "*** I have the capability to make that library automatically link in when"
+	    echo "*** you link to this library.  But I can only do this if you have a"
+	    echo "*** shared version of the library, which you do not appear to have."
+	    if test "$module" = yes; then
+	      echo "*** Therefore, libtool will create a static module, that should work "
+	      echo "*** as long as the dlopening application is linked with the -dlopen flag."
+	      if test -z "$global_symbol_pipe"; then
+		echo
+		echo "*** However, this would only work if libtool was able to extract symbol"
+		echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+		echo "*** not find such a program.  So, this module is probably useless."
+		echo "*** \`nm' from GNU binutils and a full rebuild may help."
+	      fi
+	      if test "$build_old_libs" = no; then
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  else
+	    convenience="$convenience $dir/$old_library"
+	    old_convenience="$old_convenience $dir/$old_library"
+	    deplibs="$dir/$old_library $deplibs"
+	    link_static=yes
+	  fi
+	fi # link shared/static library?
+
+	if test $linkmode = lib; then
+	  if test -n "$dependency_libs" &&
+	     { test $hardcode_into_libs != yes || test $build_old_libs = yes ||
+	       test $link_static = yes; }; then
+	    # Extract -R from dependency_libs
+	    temp_deplibs=
+	    for libdir in $dependency_libs; do
+	      case $libdir in
+	      -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
+		   case " $xrpath " in
+		   *" $temp_xrpath "*) ;;
+		   *) xrpath="$xrpath $temp_xrpath";;
+		   esac;;
+	      *) temp_deplibs="$temp_deplibs $libdir";;
+	      esac
+	    done
+	    dependency_libs="$temp_deplibs"
+	  fi
+
+	  newlib_search_path="$newlib_search_path $absdir"
+	  # Link against this library
+	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+	  # ... and its dependency_libs
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    newdependency_libs="$deplib $newdependency_libs"
+	    case "$tmp_libs " in
+	    *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	    esac
+	    tmp_libs="$tmp_libs $deplib"
+	  done
+
+	  if test $link_all_deplibs != no; then
+	    # Add the search paths of all dependency libraries
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      -L*) path="$deplib" ;;
+	      *.la)
+		dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
+		test "X$dir" = "X$deplib" && dir="."
+		# We need an absolute path.
+		case $dir in
+		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+		*)
+		  absdir=`cd "$dir" && pwd`
+		  if test -z "$absdir"; then
+		    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
+		    absdir="$dir"
+		  fi
+		  ;;
+		esac
+		if grep "^installed=no" $deplib > /dev/null; then
+		  path="-L$absdir/$objdir"
+		else
+		  eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		  if test -z "$libdir"; then
+		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+		    exit 1
+		  fi
+		  if test "$absdir" != "$libdir"; then
+		    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
+		  fi
+		  path="-L$absdir"
+		fi
+		;;
+	      *) continue ;;
+	      esac
+	      case " $deplibs " in
+	      *" $path "*) ;;
+	      *) deplibs="$deplibs $path" ;;
+	      esac
+	    done
+	  fi # link_all_deplibs != no
+	fi # linkmode = lib
+      done # for deplib in $libs
+      if test $pass = dlpreopen; then
+	# Link the dlpreopened libraries before other libraries
+	for deplib in $save_deplibs; do
+	  deplibs="$deplib $deplibs"
+	done
+      fi
+      if test $pass != dlopen; then
+	test $pass != scan && dependency_libs="$newdependency_libs"
+	if test $pass != conv; then
+	  # Make sure lib_search_path contains only unique directories.
+	  lib_search_path=
+	  for dir in $newlib_search_path; do
+	    case "$lib_search_path " in
+	    *" $dir "*) ;;
+	    *) lib_search_path="$lib_search_path $dir" ;;
+	    esac
+	  done
+	  newlib_search_path=
+	fi
+
+	if test "$linkmode,$pass" != "prog,link"; then
+	  vars="deplibs"
+	else
+	  vars="compile_deplibs finalize_deplibs"
+	fi
+	for var in $vars dependency_libs; do
+	  # Add libraries to $var in reverse order
+	  eval tmp_libs=\"\$$var\"
+	  new_libs=
+	  for deplib in $tmp_libs; do
+	    case $deplib in
+	    -L*) new_libs="$deplib $new_libs" ;;
+	    *)
+	      case " $specialdeplibs " in
+	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
+	      *)
+		case " $new_libs " in
+		*" $deplib "*) ;;
+		*) new_libs="$deplib $new_libs" ;;
+		esac
+		;;
+	      esac
+	      ;;
+	    esac
+	  done
+	  tmp_libs=
+	  for deplib in $new_libs; do
+	    case $deplib in
+	    -L*)
+	      case " $tmp_libs " in
+	      *" $deplib "*) ;;
+	      *) tmp_libs="$tmp_libs $deplib" ;;
+	      esac
+	      ;;
+	    *) tmp_libs="$tmp_libs $deplib" ;;
+	    esac
+	  done
+	  eval $var=\"$tmp_libs\"
+	done # for var
+      fi
+      if test "$pass" = "conv" &&
+       { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then
+	libs="$deplibs" # reset libs
+	deplibs=
+      fi
+    done # for pass
+    if test $linkmode = prog; then
+      dlfiles="$newdlfiles"
+      dlprefiles="$newdlprefiles"
+    fi
+
+    case $linkmode in
+    oldlib)
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
+      fi
+
+      # Now set the variables for building old libraries.
+      build_libtool_libs=no
+      oldlibs="$output"
+      objs="$objs$old_deplibs"
+      ;;
+
+    lib)
+      # Make sure we only generate libraries of the form `libNAME.la'.
+      case $outputname in
+      lib*)
+	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+	eval libname=\"$libname_spec\"
+	;;
+      *)
+	if test "$module" = no; then
+	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
+	  $echo "$help" 1>&2
+	  exit 1
+	fi
+	if test "$need_lib_prefix" != no; then
+	  # Add the "lib" prefix for modules if required
+	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+	  eval libname=\"$libname_spec\"
+	else
+	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+	fi
+	;;
+      esac
+
+      if test -n "$objs"; then
+	if test "$deplibs_check_method" != pass_all; then
+	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
+	  exit 1
+	else
+	  echo
+	  echo "*** Warning: Linking the shared library $output against the non-libtool"
+	  echo "*** objects $objs is not portable!"
+	  libobjs="$libobjs $objs"
+	fi
+      fi
+
+      if test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
+      fi
+
+      set dummy $rpath
+      if test $# -gt 2; then
+	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
+      fi
+      install_libdir="$2"
+
+      oldlibs=
+      if test -z "$rpath"; then
+	if test "$build_libtool_libs" = yes; then
+	  # Building a libtool convenience library.
+	  libext=al
+	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
+	  build_libtool_libs=convenience
+	  build_old_libs=yes
+	fi
+
+	if test -n "$vinfo"; then
+	  $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
+	fi
+
+	if test -n "$release"; then
+	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
+	fi
+      else
+
+	# Parse the version information argument.
+	save_ifs="$IFS"; IFS=':'
+	set dummy $vinfo 0 0 0
+	IFS="$save_ifs"
+
+	if test -n "$8"; then
+	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
+	  $echo "$help" 1>&2
+	  exit 1
+	fi
+
+	current="$2"
+	revision="$3"
+	age="$4"
+
+	# Check that each of the things are valid numbers.
+	case $current in
+	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit 1
+	  ;;
+	esac
+
+	case $revision in
+	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit 1
+	  ;;
+	esac
+
+	case $age in
+	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit 1
+	  ;;
+	esac
+
+	if test $age -gt $current; then
+	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit 1
+	fi
+
+	# Calculate the version variables.
+	major=
+	versuffix=
+	verstring=
+	case $version_type in
+	none) ;;
+
+	darwin)
+	  # Like Linux, but with the current version available in
+	  # verstring for coding it into the library header
+	  major=.`expr $current - $age`
+	  versuffix="$major.$age.$revision"
+	  # Darwin ld doesn't like 0 for these options...
+	  minor_current=`expr $current + 1`
+	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+	  ;;
+
+	freebsd-aout)
+	  major=".$current"
+	  versuffix=".$current.$revision";
+	  ;;
+
+	freebsd-elf)
+	  major=".$current"
+	  versuffix=".$current";
+	  ;;
+
+	irix)
+	  major=`expr $current - $age + 1`
+	  verstring="sgi$major.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$revision
+	  while test $loop != 0; do
+	    iface=`expr $revision - $loop`
+	    loop=`expr $loop - 1`
+	    verstring="sgi$major.$iface:$verstring"
+	  done
+
+	  # Before this point, $major must not contain `.'.
+	  major=.$major
+	  versuffix="$major.$revision"
+	  ;;
+
+	linux)
+	  major=.`expr $current - $age`
+	  versuffix="$major.$age.$revision"
+	  ;;
+
+	osf)
+	  major=`expr $current - $age`
+	  versuffix=".$current.$age.$revision"
+	  verstring="$current.$age.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$age
+	  while test $loop != 0; do
+	    iface=`expr $current - $loop`
+	    loop=`expr $loop - 1`
+	    verstring="$verstring:${iface}.0"
+	  done
+
+	  # Make executables depend on our current version.
+	  verstring="$verstring:${current}.0"
+	  ;;
+
+	sunos)
+	  major=".$current"
+	  versuffix=".$current.$revision"
+	  ;;
+
+	windows)
+	  # Use '-' rather than '.', since we only want one
+	  # extension on DOS 8.3 filesystems.
+	  major=`expr $current - $age`
+	  versuffix="-$major"
+	  ;;
+
+	*)
+	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
+	  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+	  exit 1
+	  ;;
+	esac
+
+	# Clear the version info if we defaulted, and they specified a release.
+	if test -z "$vinfo" && test -n "$release"; then
+	  major=
+	  verstring="0.0"
+	  case $version_type in
+	  darwin)
+	    # we can't check for "0.0" in archive_cmds due to quoting
+	    # problems, so we reset it completely
+	    verstring=""
+	    ;;
+	  *)
+	    verstring="0.0"
+	    ;;
+	  esac
+	  if test "$need_version" = no; then
+	    versuffix=
+	  else
+	    versuffix=".0.0"
+	  fi
+	fi
+
+	# Remove version info from name if versioning should be avoided
+	if test "$avoid_version" = yes && test "$need_version" = no; then
+	  major=
+	  versuffix=
+	  verstring=""
+	fi
+
+	# Check to see if the archive will have undefined symbols.
+	if test "$allow_undefined" = yes; then
+	  if test "$allow_undefined_flag" = unsupported; then
+	    $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+	    build_libtool_libs=no
+	    build_old_libs=yes
+	  fi
+	else
+	  # Don't allow undefined symbols.
+	  allow_undefined_flag="$no_undefined_flag"
+	fi
+      fi
+
+      if test "$mode" != relink; then
+	# Remove our outputs.
+	$show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
+	$run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
+      fi
+
+      # Now set the variables for building old libraries.
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+	oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+	# Transform .lo files to .o files.
+	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+      fi
+
+      # Eliminate all temporary directories.
+      for path in $notinst_path; do
+	lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`
+	deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`
+	dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
+      done
+
+      if test -n "$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	temp_xrpath=
+	for libdir in $xrpath; do
+	  temp_xrpath="$temp_xrpath -R$libdir"
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+	if test $hardcode_into_libs != yes || test $build_old_libs = yes; then
+	  dependency_libs="$temp_xrpath $dependency_libs"
+	fi
+      fi
+
+      # Make sure dlfiles contains only unique files that won't be dlpreopened
+      old_dlfiles="$dlfiles"
+      dlfiles=
+      for lib in $old_dlfiles; do
+	case " $dlprefiles $dlfiles " in
+	*" $lib "*) ;;
+	*) dlfiles="$dlfiles $lib" ;;
+	esac
+      done
+
+      # Make sure dlprefiles contains only unique files
+      old_dlprefiles="$dlprefiles"
+      dlprefiles=
+      for lib in $old_dlprefiles; do
+	case "$dlprefiles " in
+	*" $lib "*) ;;
+	*) dlprefiles="$dlprefiles $lib" ;;
+	esac
+      done
+
+      if test "$build_libtool_libs" = yes; then
+	if test -n "$rpath"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
+	    # these systems don't actually have a c library (as such)!
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C library is in the System framework
+	    deplibs="$deplibs -framework System"
+	    ;;
+	  *-*-netbsd*)
+	    # Don't link with libc until the a.out ld.so is fixed.
+	    ;;
+	  *-*-openbsd*)
+	    # Do not include libc due to us having libc/libc_r.
+	    ;;
+	  *)
+	    # Add libc to deplibs on all other systems if necessary.
+	    if test $build_libtool_need_lc = "yes"; then
+	      deplibs="$deplibs -lc"
+	    fi
+	    ;;
+	  esac
+	fi
+
+	# Transform deplibs into only deplibs that can be linked in shared.
+	name_save=$name
+	libname_save=$libname
+	release_save=$release
+	versuffix_save=$versuffix
+	major_save=$major
+	# I'm not sure if I'm treating the release correctly.  I think
+	# release should show up in the -l (ie -lgmp5) so we don't want to
+	# add it in twice.  Is that correct?
+	release=""
+	versuffix=""
+	major=""
+	newdeplibs=
+	droppeddeps=no
+	case $deplibs_check_method in
+	pass_all)
+	  # Don't check for shared/static.  Everything works.
+	  # This might be a little naive.  We might want to check
+	  # whether the library exists or not.  But this is on
+	  # osf3 & osf4 and I'm not really sure... Just
+	  # implementing what was already the behaviour.
+	  newdeplibs=$deplibs
+	  ;;
+	test_compile)
+	  # This code stresses the "libraries are programs" paradigm to its
+	  # limits. Maybe even breaks it.  We compile a program, linking it
+	  # against the deplibs as a proxy for the library.  Then we can check
+	  # whether they linked in statically or dynamically with ldd.
+	  $rm conftest.c
+	  cat > conftest.c <<EOF
+	  int main() { return 0; }
+EOF
+	  $rm conftest
+	  $CC -o conftest conftest.c $deplibs
+	  if test $? -eq 0 ; then
+	    ldd_output=`ldd conftest`
+	    for i in $deplibs; do
+	      name="`expr $i : '-l\(.*\)'`"
+	      # If $name is empty we are operating on a -L argument.
+	      if test -n "$name" && test "$name" != "0"; then
+		libname=`eval \\$echo \"$libname_spec\"`
+		deplib_matches=`eval \\$echo \"$library_names_spec\"`
+		set dummy $deplib_matches
+		deplib_match=$2
+		if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		  newdeplibs="$newdeplibs $i"
+		else
+		  droppeddeps=yes
+		  echo
+		  echo "*** Warning: This library needs some functionality provided by $i."
+		  echo "*** I have the capability to make that library automatically link in when"
+		  echo "*** you link to this library.  But I can only do this if you have a"
+		  echo "*** shared version of the library, which you do not appear to have."
+		fi
+	      else
+		newdeplibs="$newdeplibs $i"
+	      fi
+	    done
+	  else
+	    # Error occured in the first compile.  Let's try to salvage the situation:
+	    # Compile a seperate program for each library.
+	    for i in $deplibs; do
+	      name="`expr $i : '-l\(.*\)'`"
+	     # If $name is empty we are operating on a -L argument.
+	      if test -n "$name" && test "$name" != "0"; then
+		$rm conftest
+		$CC -o conftest conftest.c $i
+		# Did it work?
+		if test $? -eq 0 ; then
+		  ldd_output=`ldd conftest`
+		  libname=`eval \\$echo \"$libname_spec\"`
+		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
+		  set dummy $deplib_matches
+		  deplib_match=$2
+		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		    newdeplibs="$newdeplibs $i"
+		  else
+		    droppeddeps=yes
+		    echo
+		    echo "*** Warning: This library needs some functionality provided by $i."
+		    echo "*** I have the capability to make that library automatically link in when"
+		    echo "*** you link to this library.  But I can only do this if you have a"
+		    echo "*** shared version of the library, which you do not appear to have."
+		  fi
+		else
+		  droppeddeps=yes
+		  echo
+		  echo "*** Warning!  Library $i is needed by this library but I was not able to"
+		  echo "***  make it link in!  You will probably need to install it or some"
+		  echo "*** library that it depends on before this library will be fully"
+		  echo "*** functional.  Installing it before continuing would be even better."
+		fi
+	      else
+		newdeplibs="$newdeplibs $i"
+	      fi
+	    done
+	  fi
+	  ;;
+	file_magic*)
+	  set dummy $deplibs_check_method
+	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    name="`expr $a_deplib : '-l\(.*\)'`"
+	    # If $name is empty we are operating on a -L argument.
+	    if test -n "$name" && test "$name" != "0"; then
+	      libname=`eval \\$echo \"$libname_spec\"`
+	      for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		    potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		    for potent_lib in $potential_libs; do
+		      # Follow soft links.
+		      if ls -lLd "$potent_lib" 2>/dev/null \
+			 | grep " -> " >/dev/null; then
+			continue
+		      fi
+		      # The statement above tries to avoid entering an
+		      # endless loop below, in case of cyclic links.
+		      # We might still enter an endless loop, since a link
+		      # loop can be closed while we follow links,
+		      # but so what?
+		      potlib="$potent_lib"
+		      while test -h "$potlib" 2>/dev/null; do
+			potliblink=`ls -ld $potlib | sed 's/.* -> //'`
+			case $potliblink in
+			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+			esac
+		      done
+		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
+			 | sed 10q \
+			 | egrep "$file_magic_regex" > /dev/null; then
+			newdeplibs="$newdeplibs $a_deplib"
+			a_deplib=""
+			break 2
+		      fi
+		    done
+	      done
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		echo
+		echo "*** Warning: This library needs some functionality provided by $a_deplib."
+		echo "*** I have the capability to make that library automatically link in when"
+		echo "*** you link to this library.  But I can only do this if you have a"
+		echo "*** shared version of the library, which you do not appear to have."
+	      fi
+	    else
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	    fi
+	  done # Gone through all deplibs.
+	  ;;
+	match_pattern*)
+	  set dummy $deplibs_check_method
+	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    name="`expr $a_deplib : '-l\(.*\)'`"
+	    # If $name is empty we are operating on a -L argument.
+	    if test -n "$name" && test "$name" != "0"; then
+	      libname=`eval \\$echo \"$libname_spec\"`
+	      for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		for potent_lib in $potential_libs; do
+		  if eval echo \"$potent_lib\" 2>/dev/null \
+		      | sed 10q \
+		      | egrep "$match_pattern_regex" > /dev/null; then
+		    newdeplibs="$newdeplibs $a_deplib"
+		    a_deplib=""
+		    break 2
+		  fi
+		done
+	      done
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		echo
+		echo "*** Warning: This library needs some functionality provided by $a_deplib."
+		echo "*** I have the capability to make that library automatically link in when"
+		echo "*** you link to this library.  But I can only do this if you have a"
+		echo "*** shared version of the library, which you do not appear to have."
+	      fi
+	    else
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	    fi
+	  done # Gone through all deplibs.
+	  ;;
+	none | unknown | *)
+	  newdeplibs=""
+	  if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+	       -e 's/ -[LR][^ ]*//g' -e 's/[ 	]//g' |
+	     grep . >/dev/null; then
+	    echo
+	    if test "X$deplibs_check_method" = "Xnone"; then
+	      echo "*** Warning: inter-library dependencies are not supported in this platform."
+	    else
+	      echo "*** Warning: inter-library dependencies are not known to be supported."
+	    fi
+	    echo "*** All declared inter-library dependencies are being dropped."
+	    droppeddeps=yes
+	  fi
+	  ;;
+	esac
+	versuffix=$versuffix_save
+	major=$major_save
+	release=$release_save
+	libname=$libname_save
+	name=$name_save
+
+	case $host in
+	*-*-rhapsody* | *-*-darwin1.[012])
+	  # On Rhapsody replace the C library is the System framework
+	  newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	  ;;
+	esac
+
+	if test "$droppeddeps" = yes; then
+	  if test "$module" = yes; then
+	    echo
+	    echo "*** Warning: libtool could not satisfy all declared inter-library"
+	    echo "*** dependencies of module $libname.  Therefore, libtool will create"
+	    echo "*** a static module, that should work as long as the dlopening"
+	    echo "*** application is linked with the -dlopen flag."
+	    if test -z "$global_symbol_pipe"; then
+	      echo
+	      echo "*** However, this would only work if libtool was able to extract symbol"
+	      echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+	      echo "*** not find such a program.  So, this module is probably useless."
+	      echo "*** \`nm' from GNU binutils and a full rebuild may help."
+	    fi
+	    if test "$build_old_libs" = no; then
+	      oldlibs="$output_objdir/$libname.$libext"
+	      build_libtool_libs=module
+	      build_old_libs=yes
+	    else
+	      build_libtool_libs=no
+	    fi
+	  else
+	    echo "*** The inter-library dependencies that have been dropped here will be"
+	    echo "*** automatically added whenever a program is linked with this library"
+	    echo "*** or is declared to -dlopen it."
+
+	    if test $allow_undefined = no; then
+	      echo
+	      echo "*** Since this library must not contain undefined symbols,"
+	      echo "*** because either the platform does not support them or"
+	      echo "*** it was explicitly requested with -no-undefined,"
+	      echo "*** libtool will only create a static version of it."
+	      if test "$build_old_libs" = no; then
+		oldlibs="$output_objdir/$libname.$libext"
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  fi
+	fi
+	# Done checking deplibs!
+	deplibs=$newdeplibs
+      fi
+
+      # All the library-specific variables (install_libdir is set above).
+      library_names=
+      old_library=
+      dlname=
+
+      # Test again, we may have decided not to build it any more
+      if test "$build_libtool_libs" = yes; then
+	if test $hardcode_into_libs = yes; then
+	  # Hardcode the library paths
+	  hardcode_libdirs=
+	  dep_rpath=
+	  rpath="$finalize_rpath"
+	  test "$mode" != relink && rpath="$compile_rpath$rpath"
+	  for libdir in $rpath; do
+	    if test -n "$hardcode_libdir_flag_spec"; then
+	      if test -n "$hardcode_libdir_separator"; then
+		if test -z "$hardcode_libdirs"; then
+		  hardcode_libdirs="$libdir"
+		else
+		  # Just accumulate the unique libdirs.
+		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		    ;;
+		  *)
+		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		    ;;
+		  esac
+		fi
+	      else
+		eval flag=\"$hardcode_libdir_flag_spec\"
+		dep_rpath="$dep_rpath $flag"
+	      fi
+	    elif test -n "$runpath_var"; then
+	      case "$perm_rpath " in
+	      *" $libdir "*) ;;
+	      *) perm_rpath="$perm_rpath $libdir" ;;
+	      esac
+	    fi
+	  done
+	  # Substitute the hardcoded libdirs into the rpath.
+	  if test -n "$hardcode_libdir_separator" &&
+	     test -n "$hardcode_libdirs"; then
+	    libdir="$hardcode_libdirs"
+	    eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+	  fi
+	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
+	    # We should set the runpath_var.
+	    rpath=
+	    for dir in $perm_rpath; do
+	      rpath="$rpath$dir:"
+	    done
+	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+	  fi
+	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+	fi
+
+	shlibpath="$finalize_shlibpath"
+	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+	if test -n "$shlibpath"; then
+	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+	fi
+
+	# Get the real and link names of the library.
+	eval library_names=\"$library_names_spec\"
+	set dummy $library_names
+	realname="$2"
+	shift; shift
+
+	if test -n "$soname_spec"; then
+	  eval soname=\"$soname_spec\"
+	else
+	  soname="$realname"
+	fi
+	test -z "$dlname" && dlname=$soname
+
+	lib="$output_objdir/$realname"
+	for link
+	do
+	  linknames="$linknames $link"
+	done
+
+	# Ensure that we have .o objects for linkers which dislike .lo
+	# (e.g. aix) in case we are running --disable-static
+	for obj in $libobjs; do
+	  xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+	  if test "X$xdir" = "X$obj"; then
+	    xdir="."
+	  else
+	    xdir="$xdir"
+	  fi
+	  baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+	  oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
+	  if test ! -f $xdir/$oldobj; then
+	    $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
+	    $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
+	  fi
+	done
+
+	# Use standard objects if they are pic
+	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+
+	# Prepare the list of exported symbols
+	if test -z "$export_symbols"; then
+	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+	    $show "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $run $rm $export_symbols
+	    eval cmds=\"$export_symbols_cmds\"
+	    save_ifs="$IFS"; IFS='~'
+	    for cmd in $cmds; do
+	      IFS="$save_ifs"
+	      $show "$cmd"
+	      $run eval "$cmd" || exit $?
+	    done
+	    IFS="$save_ifs"
+	    if test -n "$export_symbols_regex"; then
+	      $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+	      $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
+	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
+	    fi
+	  fi
+	fi
+
+	if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
+	fi
+
+	if test -n "$convenience"; then
+	  if test -n "$whole_archive_flag_spec"; then
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	  else
+	    gentop="$output_objdir/${outputname}x"
+	    $show "${rm}r $gentop"
+	    $run ${rm}r "$gentop"
+	    $show "mkdir $gentop"
+	    $run mkdir "$gentop"
+	    status=$?
+	    if test $status -ne 0 && test ! -d "$gentop"; then
+	      exit $status
+	    fi
+	    generated="$generated $gentop"
+
+	    for xlib in $convenience; do
+	      # Extract the objects.
+	      case $xlib in
+	      [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+	      *) xabs=`pwd`"/$xlib" ;;
+	      esac
+	      xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+	      xdir="$gentop/$xlib"
+
+	      $show "${rm}r $xdir"
+	      $run ${rm}r "$xdir"
+	      $show "mkdir $xdir"
+	      $run mkdir "$xdir"
+	      status=$?
+	      if test $status -ne 0 && test ! -d "$xdir"; then
+		exit $status
+	      fi
+	      $show "(cd $xdir && $AR x $xabs)"
+	      $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+
+	      libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
+	    done
+	  fi
+	fi
+
+	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+	  eval flag=\"$thread_safe_flag_spec\"
+	  linker_flags="$linker_flags $flag"
+	fi
+
+	# Make a backup of the uninstalled library when relinking
+	if test "$mode" = relink; then
+	  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
+	fi
+
+	# Do each of the archive commands.
+	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	  eval cmds=\"$archive_expsym_cmds\"
+	else
+	  eval cmds=\"$archive_cmds\"
+	fi
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  $show "$cmd"
+	  $run eval "$cmd" || exit $?
+	done
+	IFS="$save_ifs"
+
+	# Restore the uninstalled library and exit
+	if test "$mode" = relink; then
+	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
+	  exit 0
+	fi
+
+	# Create links to the real library.
+	for linkname in $linknames; do
+	  if test "$realname" != "$linkname"; then
+	    $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
+	    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
+	  fi
+	done
+
+	# If -module or -export-dynamic was specified, set the dlname.
+	if test "$module" = yes || test "$export_dynamic" = yes; then
+	  # On all known operating systems, these are identical.
+	  dlname="$soname"
+	fi
+      fi
+      ;;
+
+    obj)
+      if test -n "$deplibs"; then
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+	$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+	$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
+      fi
+
+      case $output in
+      *.lo)
+	if test -n "$objs$old_deplibs"; then
+	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
+	  exit 1
+	fi
+	libobj="$output"
+	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
+	;;
+      *)
+	libobj=
+	obj="$output"
+	;;
+      esac
+
+      # Delete the old objects.
+      $run $rm $obj $libobj
+
+      # Objects from convenience libraries.  This assumes
+      # single-version convenience libraries.  Whenever we create
+      # different ones for PIC/non-PIC, this we'll have to duplicate
+      # the extraction.
+      reload_conv_objs=
+      gentop=
+      # reload_cmds runs $LD directly, so let us get rid of
+      # -Wl from whole_archive_flag_spec
+      wl=
+
+      if test -n "$convenience"; then
+	if test -n "$whole_archive_flag_spec"; then
+	  eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+	else
+	  gentop="$output_objdir/${obj}x"
+	  $show "${rm}r $gentop"
+	  $run ${rm}r "$gentop"
+	  $show "mkdir $gentop"
+	  $run mkdir "$gentop"
+	  status=$?
+	  if test $status -ne 0 && test ! -d "$gentop"; then
+	    exit $status
+	  fi
+	  generated="$generated $gentop"
+
+	  for xlib in $convenience; do
+	    # Extract the objects.
+	    case $xlib in
+	    [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+	    *) xabs=`pwd`"/$xlib" ;;
+	    esac
+	    xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+	    xdir="$gentop/$xlib"
+
+	    $show "${rm}r $xdir"
+	    $run ${rm}r "$xdir"
+	    $show "mkdir $xdir"
+	    $run mkdir "$xdir"
+	    status=$?
+	    if test $status -ne 0 && test ! -d "$xdir"; then
+	      exit $status
+	    fi
+	    $show "(cd $xdir && $AR x $xabs)"
+	    $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+
+	    reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
+	  done
+	fi
+      fi
+
+      # Create the old-style object.
+      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+      output="$obj"
+      eval cmds=\"$reload_cmds\"
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+
+      # Exit if we aren't doing a library object file.
+      if test -z "$libobj"; then
+	if test -n "$gentop"; then
+	  $show "${rm}r $gentop"
+	  $run ${rm}r $gentop
+	fi
+
+	exit 0
+      fi
+
+      if test "$build_libtool_libs" != yes; then
+	if test -n "$gentop"; then
+	  $show "${rm}r $gentop"
+	  $run ${rm}r $gentop
+	fi
+
+	# Create an invalid libtool object if no PIC, so that we don't
+	# accidentally link it into a program.
+	$show "echo timestamp > $libobj"
+	$run eval "echo timestamp > $libobj" || exit $?
+	exit 0
+      fi
+
+      if test -n "$pic_flag" || test "$pic_mode" != default; then
+	# Only do commands if we really have different PIC objects.
+	reload_objs="$libobjs $reload_conv_objs"
+	output="$libobj"
+	eval cmds=\"$reload_cmds\"
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  $show "$cmd"
+	  $run eval "$cmd" || exit $?
+	done
+	IFS="$save_ifs"
+      else
+	# Just create a symlink.
+	$show $rm $libobj
+	$run $rm $libobj
+	xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
+	if test "X$xdir" = "X$libobj"; then
+	  xdir="."
+	else
+	  xdir="$xdir"
+	fi
+	baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
+	oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
+	$show "(cd $xdir && $LN_S $oldobj $baseobj)"
+	$run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
+      fi
+
+      if test -n "$gentop"; then
+	$show "${rm}r $gentop"
+	$run ${rm}r $gentop
+      fi
+
+      exit 0
+      ;;
+
+    prog)
+      case $host in
+	*cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
+      esac
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
+      fi
+
+      if test "$preload" = yes; then
+	if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
+	   test "$dlopen_self_static" = unknown; then
+	  $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
+	fi
+      fi
+
+      case $host in
+      *-*-rhapsody* | *-*-darwin1.[012])
+	# On Rhapsody replace the C library is the System framework
+	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	;;
+      esac
+
+      compile_command="$compile_command $compile_deplibs"
+      finalize_command="$finalize_command $finalize_deplibs"
+
+      if test -n "$rpath$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	for libdir in $rpath $xrpath; do
+	  # This is the magic to use -rpath.
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+      fi
+
+      # Now hardcode the library paths
+      rpath=
+      hardcode_libdirs=
+      for libdir in $compile_rpath $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) perm_rpath="$perm_rpath $libdir" ;;
+	  esac
+	fi
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  case :$dllsearchpath: in
+	  *":$libdir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$libdir";;
+	  esac
+	  ;;
+	esac
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      compile_rpath="$rpath"
+
+      rpath=
+      hardcode_libdirs=
+      for libdir in $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$finalize_perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+	  esac
+	fi
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      finalize_rpath="$rpath"
+
+      if test -n "$libobjs" && test "$build_old_libs" = yes; then
+	# Transform all the library objects into standard objects.
+	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+      fi
+
+      dlsyms=
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	if test -n "$NM" && test -n "$global_symbol_pipe"; then
+	  dlsyms="${outputname}S.c"
+	else
+	  $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
+	fi
+      fi
+
+      if test -n "$dlsyms"; then
+	case $dlsyms in
+	"") ;;
+	*.c)
+	  # Discover the nlist of each of the dlfiles.
+	  nlist="$output_objdir/${outputname}.nm"
+
+	  $show "$rm $nlist ${nlist}S ${nlist}T"
+	  $run $rm "$nlist" "${nlist}S" "${nlist}T"
+
+	  # Parse the name list into a source file.
+	  $show "creating $output_objdir/$dlsyms"
+
+	  test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* Prevent the only kind of declaration conflicts we can make. */
+#define lt_preloaded_symbols some_other_symbol
+
+/* External symbol declarations for the compiler. */\
+"
+
+	  if test "$dlself" = yes; then
+	    $show "generating symbol list for \`$output'"
+
+	    test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
+
+	    # Add our own program objects to the symbol list.
+	    progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	    for arg in $progfiles; do
+	      $show "extracting global C symbols from \`$arg'"
+	      $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+	    done
+
+	    if test -n "$exclude_expsyms"; then
+	      $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+	      $run eval '$mv "$nlist"T "$nlist"'
+	    fi
+
+	    if test -n "$export_symbols_regex"; then
+	      $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+	      $run eval '$mv "$nlist"T "$nlist"'
+	    fi
+
+	    # Prepare the list of exported symbols
+	    if test -z "$export_symbols"; then
+	      export_symbols="$output_objdir/$output.exp"
+	      $run $rm $export_symbols
+	      $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+	    else
+	      $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
+	      $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
+	      $run eval 'mv "$nlist"T "$nlist"'
+	    fi
+	  fi
+
+	  for arg in $dlprefiles; do
+	    $show "extracting global C symbols from \`$arg'"
+	    name=`echo "$arg" | sed -e 's%^.*/%%'`
+	    $run eval 'echo ": $name " >> "$nlist"'
+	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+	  done
+
+	  if test -z "$run"; then
+	    # Make sure we have at least an empty file.
+	    test -f "$nlist" || : > "$nlist"
+
+	    if test -n "$exclude_expsyms"; then
+	      egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+	      $mv "$nlist"T "$nlist"
+	    fi
+
+	    # Try sorting and uniquifying the output.
+	    if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
+	      :
+	    else
+	      grep -v "^: " < "$nlist" > "$nlist"S
+	    fi
+
+	    if test -f "$nlist"S; then
+	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
+	    else
+	      echo '/* NONE */' >> "$output_objdir/$dlsyms"
+	    fi
+
+	    $echo >> "$output_objdir/$dlsyms" "\
+
+#undef lt_preloaded_symbols
+
+#if defined (__STDC__) && __STDC__
+# define lt_ptr void *
+#else
+# define lt_ptr char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr address;
+}
+lt_preloaded_symbols[] =
+{\
+"
+
+	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
+
+	    $echo >> "$output_objdir/$dlsyms" "\
+  {0, (lt_ptr) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+	  fi
+
+	  pic_flag_for_symtable=
+	  case $host in
+	  # compiling the symbol table file with pic_flag works around
+	  # a FreeBSD bug that causes programs to crash when -lm is
+	  # linked before any other PIC object.  But we must not use
+	  # pic_flag when linking with -static.  The problem exists in
+	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+	    case "$compile_command " in
+	    *" -static "*) ;;
+	    *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
+	    esac;;
+	  *-*-hpux*)
+	    case "$compile_command " in
+	    *" -static "*) ;;
+	    *) pic_flag_for_symtable=" $pic_flag -DPIC";;
+	    esac
+	  esac
+
+	  # Now compile the dynamic symbol file.
+	  $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+	  $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+
+	  # Clean up the generated files.
+	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
+	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
+
+	  # Transform the symbol file into the correct name.
+	  compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+	  finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+	  ;;
+	*)
+	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+	  exit 1
+	  ;;
+	esac
+      else
+	# We keep going just in case the user didn't refer to
+	# lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
+	# really was required.
+
+	# Nullify the symbol file.
+	compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+	finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+      fi
+
+      if test $need_relink = no || test "$build_libtool_libs" != yes; then
+	# Replace the output file specification.
+	compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	link_command="$compile_command$compile_rpath"
+
+	# We have no uninstalled library dependencies, so finalize right now.
+	$show "$link_command"
+	$run eval "$link_command"
+	status=$?
+
+	# Delete the generated files.
+	if test -n "$dlsyms"; then
+	  $show "$rm $output_objdir/${outputname}S.${objext}"
+	  $run $rm "$output_objdir/${outputname}S.${objext}"
+	fi
+
+	exit $status
+      fi
+
+      if test -n "$shlibpath_var"; then
+	# We should set the shlibpath_var
+	rpath=
+	for dir in $temp_rpath; do
+	  case $dir in
+	  [\\/]* | [A-Za-z]:[\\/]*)
+	    # Absolute path.
+	    rpath="$rpath$dir:"
+	    ;;
+	  *)
+	    # Relative path: add a thisdir entry.
+	    rpath="$rpath\$thisdir/$dir:"
+	    ;;
+	  esac
+	done
+	temp_rpath="$rpath"
+      fi
+
+      if test -n "$compile_shlibpath$finalize_shlibpath"; then
+	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+      fi
+      if test -n "$finalize_shlibpath"; then
+	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+      fi
+
+      compile_var=
+      finalize_var=
+      if test -n "$runpath_var"; then
+	if test -n "$perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+	if test -n "$finalize_perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $finalize_perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+      fi
+
+      if test "$no_install" = yes; then
+	# We don't need to create a wrapper script.
+	link_command="$compile_var$compile_command$compile_rpath"
+	# Replace the output file specification.
+	link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	# Delete the old output file.
+	$run $rm $output
+	# Link the executable and exit
+	$show "$link_command"
+	$run eval "$link_command" || exit $?
+	exit 0
+      fi
+
+      if test "$hardcode_action" = relink; then
+	# Fast installation is not supported
+	link_command="$compile_var$compile_command$compile_rpath"
+	relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+	$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
+	$echo "$modename: \`$output' will be relinked during installation" 1>&2
+      else
+	if test "$fast_install" != no; then
+	  link_command="$finalize_var$compile_command$finalize_rpath"
+	  if test "$fast_install" = yes; then
+	    relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+	  else
+	    # fast_install is set to needless
+	    relink_command=
+	  fi
+	else
+	  link_command="$compile_var$compile_command$compile_rpath"
+	  relink_command="$finalize_var$finalize_command$finalize_rpath"
+	fi
+      fi
+
+      # Replace the output file specification.
+      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+      # Delete the old output files.
+      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+      $show "$link_command"
+      $run eval "$link_command" || exit $?
+
+      # Now create the wrapper script.
+      $show "creating $output"
+
+      # Quote the relink command for shipping.
+      if test -n "$relink_command"; then
+	# Preserve any variables that may affect compiler behavior
+	for var in $variables_saved_for_relink; do
+	  if eval test -z \"\${$var+set}\"; then
+	    relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+	  elif eval var_value=\$$var; test -z "$var_value"; then
+	    relink_command="$var=; export $var; $relink_command"
+	  else
+	    var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+	    relink_command="$var=\"$var_value\"; export $var; $relink_command"
+	  fi
+	done
+	relink_command="cd `pwd`; $relink_command"
+	relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Quote $echo for shipping.
+      if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
+	case $0 in
+	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
+	*) qecho="$SHELL `pwd`/$0 --fallback-echo";;
+	esac
+	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
+      else
+	qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if our run command is non-null.
+      if test -z "$run"; then
+	# win32 will think the script is a binary if it has
+	# a .exe suffix, so we strip it off here.
+	case $output in
+	  *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
+	esac
+	# test for cygwin because mv fails w/o .exe extensions
+	case $host in
+	  *cygwin*) exeext=.exe ;;
+	  *) exeext= ;;
+	esac
+	$rm $output
+	trap "$rm $output; exit 1" 1 2 15
+
+	$echo > $output "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+  # install mode needs the following variable:
+  notinst_deplibs='$notinst_deplibs'
+else
+  # When we are sourced in execute mode, \$file and \$echo are already set.
+  if test \"\$libtool_execute_magic\" != \"$magic\"; then
+    echo=\"$qecho\"
+    file=\"\$0\"
+    # Make sure echo works.
+    if test \"X\$1\" = X--no-reexec; then
+      # Discard the --no-reexec flag, and continue.
+      shift
+    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
+      # Yippee, \$echo works!
+      :
+    else
+      # Restart under the correct shell, and then maybe \$echo will work.
+      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+    fi
+  fi\
+"
+	$echo >> $output "\
+
+  # Find the directory that this script lives in.
+  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+  # Follow symbolic links until we get to the real thisdir.
+  file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
+  while test -n \"\$file\"; do
+    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+    # If there was a directory component, then change thisdir.
+    if test \"x\$destdir\" != \"x\$file\"; then
+      case \"\$destdir\" in
+      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+      *) thisdir=\"\$thisdir/\$destdir\" ;;
+      esac
+    fi
+
+    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
+  done
+
+  # Try to get the absolute directory name.
+  absdir=\`cd \"\$thisdir\" && pwd\`
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+	if test "$fast_install" = yes; then
+	  echo >> $output "\
+  program=lt-'$outputname'$exeext
+  progdir=\"\$thisdir/$objdir\"
+
+  if test ! -f \"\$progdir/\$program\" || \\
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
+       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+    file=\"\$\$-\$program\"
+
+    if test ! -d \"\$progdir\"; then
+      $mkdir \"\$progdir\"
+    else
+      $rm \"\$progdir/\$file\"
+    fi"
+
+	  echo >> $output "\
+
+    # relink executable if necessary
+    if test -n \"\$relink_command\"; then
+      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+      else
+	$echo \"\$relink_command_output\" >&2
+	$rm \"\$progdir/\$file\"
+	exit 1
+      fi
+    fi
+
+    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+    { $rm \"\$progdir/\$program\";
+      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+    $rm \"\$progdir/\$file\"
+  fi"
+	else
+	  echo >> $output "\
+  program='$outputname'
+  progdir=\"\$thisdir/$objdir\"
+"
+	fi
+
+	echo >> $output "\
+
+  if test -f \"\$progdir/\$program\"; then"
+
+	# Export our shlibpath_var if we have one.
+	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+	  $echo >> $output "\
+    # Add our own library path to $shlibpath_var
+    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+    # Some systems cannot cope with colon-terminated $shlibpath_var
+    # The second colon is a workaround for a bug in BeOS R4 sed
+    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+    export $shlibpath_var
+"
+	fi
+
+	# fixup the dll searchpath if we need to.
+	if test -n "$dllsearchpath"; then
+	  $echo >> $output "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+	fi
+
+	$echo >> $output "\
+    if test \"\$libtool_execute_magic\" != \"$magic\"; then
+      # Run the actual program with our arguments.
+"
+	case $host in
+	# win32 systems need to use the prog path for dll
+	# lookup to work
+	*-*-cygwin* | *-*-pw32*)
+	  $echo >> $output "\
+      exec \$progdir/\$program \${1+\"\$@\"}
+"
+	  ;;
+
+	# Backslashes separate directories on plain windows
+	*-*-mingw | *-*-os2*)
+	  $echo >> $output "\
+      exec \$progdir\\\\\$program \${1+\"\$@\"}
+"
+	  ;;
+
+	*)
+	  $echo >> $output "\
+      # Export the path to the program.
+      PATH=\"\$progdir:\$PATH\"
+      export PATH
+
+      exec \$program \${1+\"\$@\"}
+"
+	  ;;
+	esac
+	$echo >> $output "\
+      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
+      exit 1
+    fi
+  else
+    # The program doesn't exist.
+    \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
+    \$echo \"This script is just a wrapper for \$program.\" 1>&2
+    echo \"See the $PACKAGE documentation for more information.\" 1>&2
+    exit 1
+  fi
+fi\
+"
+	chmod +x $output
+      fi
+      exit 0
+      ;;
+    esac
+
+    # See if we need to build an old-fashioned archive.
+    for oldlib in $oldlibs; do
+
+      if test "$build_libtool_libs" = convenience; then
+	oldobjs="$libobjs_save"
+	addlibs="$convenience"
+	build_libtool_libs=no
+      else
+	if test "$build_libtool_libs" = module; then
+	  oldobjs="$libobjs_save"
+	  build_libtool_libs=no
+	else
+	  oldobjs="$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
+	fi
+	addlibs="$old_convenience"
+      fi
+
+      if test -n "$addlibs"; then
+	gentop="$output_objdir/${outputname}x"
+	$show "${rm}r $gentop"
+	$run ${rm}r "$gentop"
+	$show "mkdir $gentop"
+	$run mkdir "$gentop"
+	status=$?
+	if test $status -ne 0 && test ! -d "$gentop"; then
+	  exit $status
+	fi
+	generated="$generated $gentop"
+
+	# Add in members from convenience archives.
+	for xlib in $addlibs; do
+	  # Extract the objects.
+	  case $xlib in
+	  [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+	  *) xabs=`pwd`"/$xlib" ;;
+	  esac
+	  xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+	  xdir="$gentop/$xlib"
+
+	  $show "${rm}r $xdir"
+	  $run ${rm}r "$xdir"
+	  $show "mkdir $xdir"
+	  $run mkdir "$xdir"
+	  status=$?
+	  if test $status -ne 0 && test ! -d "$xdir"; then
+	    exit $status
+	  fi
+	  $show "(cd $xdir && $AR x $xabs)"
+	  $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+
+	  oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
+	done
+      fi
+
+      # Do each command in the archive commands.
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+	eval cmds=\"$old_archive_from_new_cmds\"
+      else
+	# Ensure that we have .o objects in place in case we decided
+	# not to build a shared library, and have fallen back to building
+	# static libs even though --disable-static was passed!
+	for oldobj in $oldobjs; do
+	  if test ! -f $oldobj; then
+	    xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
+	    if test "X$xdir" = "X$oldobj"; then
+	      xdir="."
+	    else
+	      xdir="$xdir"
+	    fi
+	    baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
+	    obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
+	    $show "(cd $xdir && ${LN_S} $obj $baseobj)"
+	    $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
+	  fi
+	done
+
+	eval cmds=\"$old_archive_cmds\"
+      fi
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$generated"; then
+      $show "${rm}r$generated"
+      $run ${rm}r$generated
+    fi
+
+    # Now create the libtool archive.
+    case $output in
+    *.la)
+      old_library=
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      $show "creating $output"
+
+      # Preserve any variables that may affect compiler behavior
+      for var in $variables_saved_for_relink; do
+	if eval test -z \"\${$var+set}\"; then
+	  relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+	elif eval var_value=\$$var; test -z "$var_value"; then
+	  relink_command="$var=; export $var; $relink_command"
+	else
+	  var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+	  relink_command="$var=\"$var_value\"; export $var; $relink_command"
+	fi
+      done
+      # Quote the link command for shipping.
+      relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
+      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+
+      # Only create the output if not a dry run.
+      if test -z "$run"; then
+	for installed in no yes; do
+	  if test "$installed" = yes; then
+	    if test -z "$install_libdir"; then
+	      break
+	    fi
+	    output="$output_objdir/$outputname"i
+	    # Replace all uninstalled libtool libraries with the installed ones
+	    newdependency_libs=
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      *.la)
+		name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
+		eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		if test -z "$libdir"; then
+		  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+		  exit 1
+		fi
+		newdependency_libs="$newdependency_libs $libdir/$name"
+		;;
+	      *) newdependency_libs="$newdependency_libs $deplib" ;;
+	      esac
+	    done
+	    dependency_libs="$newdependency_libs"
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+	      eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+	      if test -z "$libdir"; then
+		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+		exit 1
+	      fi
+	      newdlfiles="$newdlfiles $libdir/$name"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+	      eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+	      if test -z "$libdir"; then
+		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+		exit 1
+	      fi
+	      newdlprefiles="$newdlprefiles $libdir/$name"
+	    done
+	    dlprefiles="$newdlprefiles"
+	  fi
+	  $rm $output
+	  # place dlname in correct position for cygwin
+	  tdlname=$dlname
+	  case $host,$output,$installed,$module,$dlname in
+	    *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+	  esac
+	  $echo > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+	  if test "$installed" = no && test $need_relink = yes; then
+	    $echo >> $output "\
+relink_command=\"$relink_command\""
+	  fi
+	done
+      fi
+
+      # Do a symbolic link so that the libtool archive can be found in
+      # LD_LIBRARY_PATH before the program is installed.
+      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
+      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
+      ;;
+    esac
+    exit 0
+    ;;
+
+  # libtool install mode
+  install)
+    modename="$modename: install"
+
+    # There may be an optional sh(1) argument at the beginning of
+    # install_prog (especially on Windows NT).
+    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+       # Allow the use of GNU shtool's install command.
+       $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
+      # Aesthetically quote it.
+      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+	arg="\"$arg\""
+	;;
+      esac
+      install_prog="$arg "
+      arg="$1"
+      shift
+    else
+      install_prog=
+      arg="$nonopt"
+    fi
+
+    # The real first argument should be the name of the installation program.
+    # Aesthetically quote it.
+    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+    case $arg in
+    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+      arg="\"$arg\""
+      ;;
+    esac
+    install_prog="$install_prog$arg"
+
+    # We need to accept at least all the BSD install flags.
+    dest=
+    files=
+    opts=
+    prev=
+    install_type=
+    isdir=no
+    stripme=
+    for arg
+    do
+      if test -n "$dest"; then
+	files="$files $dest"
+	dest="$arg"
+	continue
+      fi
+
+      case $arg in
+      -d) isdir=yes ;;
+      -f) prev="-f" ;;
+      -g) prev="-g" ;;
+      -m) prev="-m" ;;
+      -o) prev="-o" ;;
+      -s)
+	stripme=" -s"
+	continue
+	;;
+      -*) ;;
+
+      *)
+	# If the previous option needed an argument, then skip it.
+	if test -n "$prev"; then
+	  prev=
+	else
+	  dest="$arg"
+	  continue
+	fi
+	;;
+      esac
+
+      # Aesthetically quote the argument.
+      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+	arg="\"$arg\""
+	;;
+      esac
+      install_prog="$install_prog $arg"
+    done
+
+    if test -z "$install_prog"; then
+      $echo "$modename: you must specify an install program" 1>&2
+      $echo "$help" 1>&2
+      exit 1
+    fi
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prev' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit 1
+    fi
+
+    if test -z "$files"; then
+      if test -z "$dest"; then
+	$echo "$modename: no file or destination specified" 1>&2
+      else
+	$echo "$modename: you must specify a destination" 1>&2
+      fi
+      $echo "$help" 1>&2
+      exit 1
+    fi
+
+    # Strip any trailing slash from the destination.
+    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
+
+    # Check to see that the destination is a directory.
+    test -d "$dest" && isdir=yes
+    if test "$isdir" = yes; then
+      destdir="$dest"
+      destname=
+    else
+      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
+      test "X$destdir" = "X$dest" && destdir=.
+      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
+
+      # Not a directory, so check to see that there is only one file specified.
+      set dummy $files
+      if test $# -gt 2; then
+	$echo "$modename: \`$dest' is not a directory" 1>&2
+	$echo "$help" 1>&2
+	exit 1
+      fi
+    fi
+    case $destdir in
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
+    *)
+      for file in $files; do
+	case $file in
+	*.lo) ;;
+	*)
+	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
+	  $echo "$help" 1>&2
+	  exit 1
+	  ;;
+	esac
+      done
+      ;;
+    esac
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    staticlibs=
+    future_libdirs=
+    current_libdirs=
+    for file in $files; do
+
+      # Do each installation.
+      case $file in
+      *.$libext)
+	# Do the static libraries later.
+	staticlibs="$staticlibs $file"
+	;;
+
+      *.la)
+	# Check to see that this really is a libtool archive.
+	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
+	  $echo "$help" 1>&2
+	  exit 1
+	fi
+
+	library_names=
+	old_library=
+	relink_command=
+	# If there is no directory component, then add one.
+	case $file in
+	*/* | *\\*) . $file ;;
+	*) . ./$file ;;
+	esac
+
+	# Add the libdir to current_libdirs if it is the destination.
+	DESTDIR=
+	if test "X$destdir" = "X$libdir"; then
+	  case "$current_libdirs " in
+	  *" $libdir "*) ;;
+	  *) current_libdirs="$current_libdirs $libdir" ;;
+	  esac
+	else
+	  case "$destdir" in
+	    *"$libdir")
+	      DESTDIR=`$echo "$destdir" | sed -e 's!'"$libdir"'$!!'`
+	      if test "X$destdir" != "X$DESTDIR$libdir"; then
+		DESTDIR=
+	      fi
+	      ;;
+	  esac
+	  # Note the libdir as a future libdir.
+	  case "$future_libdirs " in
+	  *" $libdir "*) ;;
+	  *) future_libdirs="$future_libdirs $libdir" ;;
+	  esac
+	fi
+
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
+	test "X$dir" = "X$file/" && dir=
+	dir="$dir$objdir"
+
+	if test -n "$relink_command"; then
+	  $echo "$modename: warning: relinking \`$file'" 1>&2
+	  export DESTDIR
+	  $show "$relink_command"
+	  if $run eval "$relink_command"; then :
+	  else
+	    $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+	    continue
+	  fi
+	fi
+	unset DESTDIR
+
+	# See the names of the shared library.
+	set dummy $library_names
+	if test -n "$2"; then
+	  realname="$2"
+	  shift
+	  shift
+
+	  srcname="$realname"
+	  test -n "$relink_command" && srcname="$realname"T
+
+	  # Install the shared library and build the symlinks.
+	  $show "$install_prog $dir/$srcname $destdir/$realname"
+	  $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
+	  if test -n "$stripme" && test -n "$striplib"; then
+	    $show "$striplib $destdir/$realname"
+	    $run eval "$striplib $destdir/$realname" || exit $?
+	  fi
+
+	  if test $# -gt 0; then
+	    # Delete the old symlinks, and create new ones.
+	    for linkname
+	    do
+	      if test "$linkname" != "$realname"; then
+		$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+		$run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+	      fi
+	    done
+	  fi
+
+	  # Do each command in the postinstall commands.
+	  lib="$destdir/$realname"
+	  eval cmds=\"$postinstall_cmds\"
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $cmds; do
+	    IFS="$save_ifs"
+	    $show "$cmd"
+	    $run eval "$cmd" || exit $?
+	  done
+	  IFS="$save_ifs"
+	fi
+
+	# Install the pseudo-library for information purposes.
+	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	instname="$dir/$name"i
+	$show "$install_prog $instname $destdir/$name"
+	$run eval "$install_prog $instname $destdir/$name" || exit $?
+
+	# Maybe install the static library, too.
+	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+	;;
+
+      *.lo)
+	# Install (i.e. copy) a libtool object.
+
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	  destfile="$destdir/$destfile"
+	fi
+
+	# Deduce the name of the destination old-style object file.
+	case $destfile in
+	*.lo)
+	  staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
+	  ;;
+	*.$objext)
+	  staticdest="$destfile"
+	  destfile=
+	  ;;
+	*)
+	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
+	  $echo "$help" 1>&2
+	  exit 1
+	  ;;
+	esac
+
+	# Install the libtool object if requested.
+	if test -n "$destfile"; then
+	  $show "$install_prog $file $destfile"
+	  $run eval "$install_prog $file $destfile" || exit $?
+	fi
+
+	# Install the old object if enabled.
+	if test "$build_old_libs" = yes; then
+	  # Deduce the name of the old-style object file.
+	  staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
+
+	  $show "$install_prog $staticobj $staticdest"
+	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
+	fi
+	exit 0
+	;;
+
+      *)
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	  destfile="$destdir/$destfile"
+	fi
+
+	# Do a test to see if this is really a libtool program.
+	if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  notinst_deplibs=
+	  relink_command=
+
+	  # If there is no directory component, then add one.
+	  case $file in
+	  */* | *\\*) . $file ;;
+	  *) . ./$file ;;
+	  esac
+
+	  # Check the variables that should have been set.
+	  if test -z "$notinst_deplibs"; then
+	    $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
+	    exit 1
+	  fi
+
+	  finalize=yes
+	  for lib in $notinst_deplibs; do
+	    # Check to see that each library is installed.
+	    libdir=
+	    if test -f "$lib"; then
+	      # If there is no directory component, then add one.
+	      case $lib in
+	      */* | *\\*) . $lib ;;
+	      *) . ./$lib ;;
+	      esac
+	    fi
+	    libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+	    if test -n "$libdir" && test ! -f "$libfile"; then
+	      $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+	      finalize=no
+	    fi
+	  done
+
+	  relink_command=
+	  # If there is no directory component, then add one.
+	  case $file in
+	  */* | *\\*) . $file ;;
+	  *) . ./$file ;;
+	  esac
+
+	  outputname=
+	  if test "$fast_install" = no && test -n "$relink_command"; then
+	    if test "$finalize" = yes && test -z "$run"; then
+	      tmpdir="/tmp"
+	      test -n "$TMPDIR" && tmpdir="$TMPDIR"
+	      tmpdir="$tmpdir/libtool-$$"
+	      if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
+	      else
+		$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
+		continue
+	      fi
+	      file=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	      outputname="$tmpdir/$file"
+	      # Replace the output file specification.
+	      relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+	      $show "$relink_command"
+	      if $run eval "$relink_command"; then :
+	      else
+		$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+		${rm}r "$tmpdir"
+		continue
+	      fi
+	      file="$outputname"
+	    else
+	      $echo "$modename: warning: cannot relink \`$file'" 1>&2
+	    fi
+	  else
+	    # Install the binary that we compiled earlier.
+	    file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+	  fi
+	fi
+
+	# remove .exe since cygwin /usr/bin/install will append another
+	# one anyways
+	case $install_prog,$host in
+	/usr/bin/install*,*cygwin*)
+	  case $file:$destfile in
+	  *.exe:*.exe)
+	    # this is ok
+	    ;;
+	  *.exe:*)
+	    destfile=$destfile.exe
+	    ;;
+	  *:*.exe)
+	    destfile=`echo $destfile | sed -e 's,.exe$,,'`
+	    ;;
+	  esac
+	  ;;
+	esac
+	$show "$install_prog$stripme $file $destfile"
+	$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
+	test -n "$outputname" && ${rm}r "$tmpdir"
+	;;
+      esac
+    done
+
+    for file in $staticlibs; do
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+
+      # Set up the ranlib parameters.
+      oldlib="$destdir/$name"
+
+      $show "$install_prog $file $oldlib"
+      $run eval "$install_prog \$file \$oldlib" || exit $?
+
+      if test -n "$stripme" && test -n "$striplib"; then
+	$show "$old_striplib $oldlib"
+	$run eval "$old_striplib $oldlib" || exit $?
+      fi
+
+      # Do each command in the postinstall commands.
+      eval cmds=\"$old_postinstall_cmds\"
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$future_libdirs"; then
+      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
+    fi
+
+    if test -n "$current_libdirs"; then
+      # Maybe just do a dry run.
+      test -n "$run" && current_libdirs=" -n$current_libdirs"
+      exec_cmd='$SHELL $0 --finish$current_libdirs'
+    else
+      exit 0
+    fi
+    ;;
+
+  # libtool finish mode
+  finish)
+    modename="$modename: finish"
+    libdirs="$nonopt"
+    admincmds=
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      for dir
+      do
+	libdirs="$libdirs $dir"
+      done
+
+      for libdir in $libdirs; do
+	if test -n "$finish_cmds"; then
+	  # Do each command in the finish commands.
+	  eval cmds=\"$finish_cmds\"
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $cmds; do
+	    IFS="$save_ifs"
+	    $show "$cmd"
+	    $run eval "$cmd" || admincmds="$admincmds
+       $cmd"
+	  done
+	  IFS="$save_ifs"
+	fi
+	if test -n "$finish_eval"; then
+	  # Do the single finish_eval.
+	  eval cmds=\"$finish_eval\"
+	  $run eval "$cmds" || admincmds="$admincmds
+       $cmds"
+	fi
+      done
+    fi
+
+    # Exit here if they wanted silent mode.
+    test "$show" = ":" && exit 0
+
+    echo "----------------------------------------------------------------------"
+    echo "Libraries have been installed in:"
+    for libdir in $libdirs; do
+      echo "   $libdir"
+    done
+    echo
+    echo "If you ever happen to want to link against installed libraries"
+    echo "in a given directory, LIBDIR, you must either use libtool, and"
+    echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+    echo "flag during linking and do at least one of the following:"
+    if test -n "$shlibpath_var"; then
+      echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+      echo "     during execution"
+    fi
+    if test -n "$runpath_var"; then
+      echo "   - add LIBDIR to the \`$runpath_var' environment variable"
+      echo "     during linking"
+    fi
+    if test -n "$hardcode_libdir_flag_spec"; then
+      libdir=LIBDIR
+      eval flag=\"$hardcode_libdir_flag_spec\"
+
+      echo "   - use the \`$flag' linker flag"
+    fi
+    if test -n "$admincmds"; then
+      echo "   - have your system administrator run these commands:$admincmds"
+    fi
+    if test -f /etc/ld.so.conf; then
+      echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+    fi
+    echo
+    echo "See any operating system documentation about shared libraries for"
+    echo "more information, such as the ld(1) and ld.so(8) manual pages."
+    echo "----------------------------------------------------------------------"
+    exit 0
+    ;;
+
+  # libtool execute mode
+  execute)
+    modename="$modename: execute"
+
+    # The first argument is the command name.
+    cmd="$nonopt"
+    if test -z "$cmd"; then
+      $echo "$modename: you must specify a COMMAND" 1>&2
+      $echo "$help"
+      exit 1
+    fi
+
+    # Handle -dlopen flags immediately.
+    for file in $execute_dlfiles; do
+      if test ! -f "$file"; then
+	$echo "$modename: \`$file' is not a file" 1>&2
+	$echo "$help" 1>&2
+	exit 1
+      fi
+
+      dir=
+      case $file in
+      *.la)
+	# Check to see that this really is a libtool archive.
+	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+	  $echo "$help" 1>&2
+	  exit 1
+	fi
+
+	# Read the libtool library.
+	dlname=
+	library_names=
+
+	# If there is no directory component, then add one.
+	case $file in
+	*/* | *\\*) . $file ;;
+	*) . ./$file ;;
+	esac
+
+	# Skip this library if it cannot be dlopened.
+	if test -z "$dlname"; then
+	  # Warn if it was a shared library.
+	  test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
+	  continue
+	fi
+
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$dir" = "X$file" && dir=.
+
+	if test -f "$dir/$objdir/$dlname"; then
+	  dir="$dir/$objdir"
+	else
+	  $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+	  exit 1
+	fi
+	;;
+
+      *.lo)
+	# Just add the directory containing the .lo file.
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$dir" = "X$file" && dir=.
+	;;
+
+      *)
+	$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
+	continue
+	;;
+      esac
+
+      # Get the absolute pathname.
+      absdir=`cd "$dir" && pwd`
+      test -n "$absdir" && dir="$absdir"
+
+      # Now add the directory to shlibpath_var.
+      if eval "test -z \"\$$shlibpath_var\""; then
+	eval "$shlibpath_var=\"\$dir\""
+      else
+	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+      fi
+    done
+
+    # This variable tells wrapper scripts just to set shlibpath_var
+    # rather than running their programs.
+    libtool_execute_magic="$magic"
+
+    # Check if any of the arguments is a wrapper script.
+    args=
+    for file
+    do
+      case $file in
+      -*) ;;
+      *)
+	# Do a test to see if this is really a libtool program.
+	if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  # If there is no directory component, then add one.
+	  case $file in
+	  */* | *\\*) . $file ;;
+	  *) . ./$file ;;
+	  esac
+
+	  # Transform arg to wrapped name.
+	  file="$progdir/$program"
+	fi
+	;;
+      esac
+      # Quote arguments (to preserve shell metacharacters).
+      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
+      args="$args \"$file\""
+    done
+
+    if test -z "$run"; then
+      if test -n "$shlibpath_var"; then
+	# Export the shlibpath_var.
+	eval "export $shlibpath_var"
+      fi
+
+      # Restore saved enviroment variables
+      if test "${save_LC_ALL+set}" = set; then
+	LC_ALL="$save_LC_ALL"; export LC_ALL
+      fi
+      if test "${save_LANG+set}" = set; then
+	LANG="$save_LANG"; export LANG
+      fi
+
+      # Now prepare to actually exec the command.
+      exec_cmd='"$cmd"$args'
+    else
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+	eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
+	$echo "export $shlibpath_var"
+      fi
+      $echo "$cmd$args"
+      exit 0
+    fi
+    ;;
+
+  # libtool clean and uninstall mode
+  clean | uninstall)
+    modename="$modename: $mode"
+    rm="$nonopt"
+    files=
+    rmforce=
+    exit_status=0
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    for arg
+    do
+      case $arg in
+      -f) rm="$rm $arg"; rmforce=yes ;;
+      -*) rm="$rm $arg" ;;
+      *) files="$files $arg" ;;
+      esac
+    done
+
+    if test -z "$rm"; then
+      $echo "$modename: you must specify an RM program" 1>&2
+      $echo "$help" 1>&2
+      exit 1
+    fi
+
+    rmdirs=
+
+    for file in $files; do
+      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+      if test "X$dir" = "X$file"; then
+	dir=.
+	objdir="$objdir"
+      else
+	objdir="$dir/$objdir"
+      fi
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+      test $mode = uninstall && objdir="$dir"
+
+      # Remember objdir for removal later, being careful to avoid duplicates
+      if test $mode = clean; then
+	case " $rmdirs " in
+	  *" $objdir "*) ;;
+	  *) rmdirs="$rmdirs $objdir" ;;
+	esac
+      fi
+
+      # Don't error if the file doesn't exist and rm -f was used.
+      if (test -L "$file") >/dev/null 2>&1 \
+	|| (test -h "$file") >/dev/null 2>&1 \
+	|| test -f "$file"; then
+	:
+      elif test -d "$file"; then
+	exit_status=1
+	continue
+      elif test "$rmforce" = yes; then
+	continue
+      fi
+
+      rmfiles="$file"
+
+      case $name in
+      *.la)
+	# Possibly a libtool archive, so verify it.
+	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  . $dir/$name
+
+	  # Delete the libtool libraries and symlinks.
+	  for n in $library_names; do
+	    rmfiles="$rmfiles $objdir/$n"
+	  done
+	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+	  test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+
+	  if test $mode = uninstall; then
+	    if test -n "$library_names"; then
+	      # Do each command in the postuninstall commands.
+	      eval cmds=\"$postuninstall_cmds\"
+	      save_ifs="$IFS"; IFS='~'
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		$show "$cmd"
+		$run eval "$cmd"
+		if test $? != 0 && test "$rmforce" != yes; then
+		  exit_status=1
+		fi
+	      done
+	      IFS="$save_ifs"
+	    fi
+
+	    if test -n "$old_library"; then
+	      # Do each command in the old_postuninstall commands.
+	      eval cmds=\"$old_postuninstall_cmds\"
+	      save_ifs="$IFS"; IFS='~'
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		$show "$cmd"
+		$run eval "$cmd"
+		if test $? != 0 && test "$rmforce" != yes; then
+		  exit_status=1
+		fi
+	      done
+	      IFS="$save_ifs"
+	    fi
+	    # FIXME: should reinstall the best remaining shared library.
+	  fi
+	fi
+	;;
+
+      *.lo)
+	if test "$build_old_libs" = yes; then
+	  oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
+	  rmfiles="$rmfiles $dir/$oldobj"
+	fi
+	;;
+
+      *)
+	# Do a test to see if this is a libtool program.
+	if test $mode = clean &&
+	   (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  relink_command=
+	  . $dir/$file
+
+	  rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+	  if test "$fast_install" = yes && test -n "$relink_command"; then
+	    rmfiles="$rmfiles $objdir/lt-$name"
+	  fi
+	fi
+	;;
+      esac
+      $show "$rm $rmfiles"
+      $run $rm $rmfiles || exit_status=1
+    done
+
+    # Try to remove the ${objdir}s in the directories where we deleted files
+    for dir in $rmdirs; do
+      if test -d "$dir"; then
+	$show "rmdir $dir"
+	$run rmdir $dir >/dev/null 2>&1
+      fi
+    done
+
+    exit $exit_status
+    ;;
+
+  "")
+    $echo "$modename: you must specify a MODE" 1>&2
+    $echo "$generic_help" 1>&2
+    exit 1
+    ;;
+  esac
+
+  if test -z "$exec_cmd"; then
+    $echo "$modename: invalid operation mode \`$mode'" 1>&2
+    $echo "$generic_help" 1>&2
+    exit 1
+  fi
+fi # test -z "$show_help"
+
+if test -n "$exec_cmd"; then
+  eval exec $exec_cmd
+  exit 1
+fi
+
+# We need to display help for each of the modes.
+case $mode in
+"") $echo \
+"Usage: $modename [OPTION]... [MODE-ARG]...
+
+Provide generalized library-building support services.
+
+    --config          show all configuration variables
+    --debug           enable verbose shell tracing
+-n, --dry-run         display commands without modifying any files
+    --features        display basic configuration information and exit
+    --finish          same as \`--mode=finish'
+    --help            display this help message and exit
+    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
+    --quiet           same as \`--silent'
+    --silent          don't print informational messages
+    --version         print version information
+
+MODE must be one of the following:
+
+      clean           remove files from the build directory
+      compile         compile a source file into a libtool object
+      execute         automatically set library path, then run a program
+      finish          complete the installation of libtool libraries
+      install         install libraries or executables
+      link            create a library or an executable
+      uninstall       remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
+a more detailed description of MODE."
+  exit 0
+  ;;
+
+clean)
+  $echo \
+"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+compile)
+  $echo \
+"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
+  -prefer-pic       try to building PIC objects only
+  -prefer-non-pic   try to building non-PIC objects only
+  -static           always build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+  ;;
+
+execute)
+  $echo \
+"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+  -dlopen FILE      add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+  ;;
+
+finish)
+  $echo \
+"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges.  Use
+the \`--dry-run' option if you just want to see what would be executed."
+  ;;
+
+install)
+  $echo \
+"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command.  The first component should be
+either the \`install' or \`cp' program.
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+  ;;
+
+link)
+  $echo \
+"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+  -all-static       do not do any dynamic linking at all
+  -avoid-version    do not add a version suffix if possible
+  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
+  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+  -export-symbols SYMFILE
+		    try to export only the symbols listed in SYMFILE
+  -export-symbols-regex REGEX
+		    try to export only the symbols matching REGEX
+  -LLIBDIR          search LIBDIR for required installed libraries
+  -lNAME            OUTPUT-FILE requires the installed library libNAME
+  -module           build a library that can dlopened
+  -no-fast-install  disable the fast-install mode
+  -no-install       link a not-installable executable
+  -no-undefined     declare that a library does not refer to external symbols
+  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
+  -release RELEASE  specify package release information
+  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
+  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
+  -static           do not do any dynamic linking of libtool libraries
+  -version-info CURRENT[:REVISION[:AGE]]
+		    specify library version info [each variable defaults to 0]
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename.  Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+  ;;
+
+uninstall)
+  $echo \
+"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+*)
+  $echo "$modename: invalid operation mode \`$mode'" 1>&2
+  $echo "$help" 1>&2
+  exit 1
+  ;;
+esac
+
+echo
+$echo "Try \`$modename --help' for more information about other modes."
+
+exit 0
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/ltmain.sh b/mod_gsoap/mod_gsoap-0.6/apache_13/ltmain.sh
new file mode 100755
index 0000000..e82e48a
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/ltmain.sh
@@ -0,0 +1,4999 @@
+# ltmain.sh - Provide generalized library-building support services.
+# NOTE: Changing this file will not affect anything until you rerun configure.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Check that we have a working $echo.
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell, and then maybe $echo will work.
+  exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit 0
+fi
+
+# The name of this program.
+progname=`$echo "$0" | sed 's%^.*/%%'`
+modename="$progname"
+
+# Constants.
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.4.2
+TIMESTAMP=" (1.922.2.53 2001/09/11 03:18:52)"
+
+default_mode=
+help="Try \`$progname --help' for more information."
+magic="%%%MAGIC variable%%%"
+mkdir="mkdir"
+mv="mv -f"
+rm="rm -f"
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
+SP2NL='tr \040 \012'
+NL2SP='tr \015\012 \040\040'
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+# We save the old values to restore during execute mode.
+if test "${LC_ALL+set}" = set; then
+  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
+fi
+if test "${LANG+set}" = set; then
+  save_LANG="$LANG"; LANG=C; export LANG
+fi
+
+# Make sure IFS has a sensible default
+: ${IFS=" 	"}
+
+if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+  echo "$modename: not configured to build any kind of library" 1>&2
+  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+  exit 1
+fi
+
+# Global variables.
+mode=$default_mode
+nonopt=
+prev=
+prevopt=
+run=
+show="$echo"
+show_help=
+execute_dlfiles=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+
+# Parse our command line options once, thoroughly.
+while test $# -gt 0
+do
+  arg="$1"
+  shift
+
+  case $arg in
+  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  # If the previous option needs an argument, assign it.
+  if test -n "$prev"; then
+    case $prev in
+    execute_dlfiles)
+      execute_dlfiles="$execute_dlfiles $arg"
+      ;;
+    *)
+      eval "$prev=\$arg"
+      ;;
+    esac
+
+    prev=
+    prevopt=
+    continue
+  fi
+
+  # Have we seen a non-optional argument yet?
+  case $arg in
+  --help)
+    show_help=yes
+    ;;
+
+  --version)
+    echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+    exit 0
+    ;;
+
+  --config)
+    sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
+    exit 0
+    ;;
+
+  --debug)
+    echo "$progname: enabling shell trace mode"
+    set -x
+    ;;
+
+  --dry-run | -n)
+    run=:
+    ;;
+
+  --features)
+    echo "host: $host"
+    if test "$build_libtool_libs" = yes; then
+      echo "enable shared libraries"
+    else
+      echo "disable shared libraries"
+    fi
+    if test "$build_old_libs" = yes; then
+      echo "enable static libraries"
+    else
+      echo "disable static libraries"
+    fi
+    exit 0
+    ;;
+
+  --finish) mode="finish" ;;
+
+  --mode) prevopt="--mode" prev=mode ;;
+  --mode=*) mode="$optarg" ;;
+
+  --quiet | --silent)
+    show=:
+    ;;
+
+  -dlopen)
+    prevopt="-dlopen"
+    prev=execute_dlfiles
+    ;;
+
+  -*)
+    $echo "$modename: unrecognized option \`$arg'" 1>&2
+    $echo "$help" 1>&2
+    exit 1
+    ;;
+
+  *)
+    nonopt="$arg"
+    break
+    ;;
+  esac
+done
+
+if test -n "$prevopt"; then
+  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
+  $echo "$help" 1>&2
+  exit 1
+fi
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+if test -z "$show_help"; then
+
+  # Infer the operation mode.
+  if test -z "$mode"; then
+    case $nonopt in
+    *cc | *++ | gcc* | *-gcc*)
+      mode=link
+      for arg
+      do
+	case $arg in
+	-c)
+	   mode=compile
+	   break
+	   ;;
+	esac
+      done
+      ;;
+    *db | *dbx | *strace | *truss)
+      mode=execute
+      ;;
+    *install*|cp|mv)
+      mode=install
+      ;;
+    *rm)
+      mode=uninstall
+      ;;
+    *)
+      # If we have no mode, but dlfiles were specified, then do execute mode.
+      test -n "$execute_dlfiles" && mode=execute
+
+      # Just use the default operation mode.
+      if test -z "$mode"; then
+	if test -n "$nonopt"; then
+	  $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
+	else
+	  $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
+	fi
+      fi
+      ;;
+    esac
+  fi
+
+  # Only execute mode is allowed to have -dlopen flags.
+  if test -n "$execute_dlfiles" && test "$mode" != execute; then
+    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
+    $echo "$help" 1>&2
+    exit 1
+  fi
+
+  # Change the help message to a mode-specific one.
+  generic_help="$help"
+  help="Try \`$modename --help --mode=$mode' for more information."
+
+  # These modes are in order of execution frequency so that they run quickly.
+  case $mode in
+  # libtool compile mode
+  compile)
+    modename="$modename: compile"
+    # Get the compilation command and the source file.
+    base_compile=
+    prev=
+    lastarg=
+    srcfile="$nonopt"
+    suppress_output=
+
+    user_target=no
+    for arg
+    do
+      case $prev in
+      "") ;;
+      xcompiler)
+	# Aesthetically quote the previous argument.
+	prev=
+	lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+
+	case $arg in
+	# Double-quote args containing other shell metacharacters.
+	# Many Bourne shells cannot handle close brackets correctly
+	# in scan sets, so we specify it separately.
+	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	  arg="\"$arg\""
+	  ;;
+	esac
+
+	# Add the previous argument to base_compile.
+	if test -z "$base_compile"; then
+	  base_compile="$lastarg"
+	else
+	  base_compile="$base_compile $lastarg"
+	fi
+	continue
+	;;
+      esac
+
+      # Accept any command-line options.
+      case $arg in
+      -o)
+	if test "$user_target" != "no"; then
+	  $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+	  exit 1
+	fi
+	user_target=next
+	;;
+
+      -static)
+	build_old_libs=yes
+	continue
+	;;
+
+      -prefer-pic)
+	pic_mode=yes
+	continue
+	;;
+
+      -prefer-non-pic)
+	pic_mode=no
+	continue
+	;;
+
+      -Xcompiler)
+	prev=xcompiler
+	continue
+	;;
+
+      -Wc,*)
+	args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+	lastarg=
+	save_ifs="$IFS"; IFS=','
+	for arg in $args; do
+	  IFS="$save_ifs"
+
+	  # Double-quote args containing other shell metacharacters.
+	  # Many Bourne shells cannot handle close brackets correctly
+	  # in scan sets, so we specify it separately.
+	  case $arg in
+	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	    arg="\"$arg\""
+	    ;;
+	  esac
+	  lastarg="$lastarg $arg"
+	done
+	IFS="$save_ifs"
+	lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
+
+	# Add the arguments to base_compile.
+	if test -z "$base_compile"; then
+	  base_compile="$lastarg"
+	else
+	  base_compile="$base_compile $lastarg"
+	fi
+	continue
+	;;
+      esac
+
+      case $user_target in
+      next)
+	# The next one is the -o target name
+	user_target=yes
+	continue
+	;;
+      yes)
+	# We got the output file
+	user_target=set
+	libobj="$arg"
+	continue
+	;;
+      esac
+
+      # Accept the current argument as the source file.
+      lastarg="$srcfile"
+      srcfile="$arg"
+
+      # Aesthetically quote the previous argument.
+
+      # Backslashify any backslashes, double quotes, and dollar signs.
+      # These are the only characters that are still specially
+      # interpreted inside of double-quoted scrings.
+      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+
+      # Double-quote args containing other shell metacharacters.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      case $lastarg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	lastarg="\"$lastarg\""
+	;;
+      esac
+
+      # Add the previous argument to base_compile.
+      if test -z "$base_compile"; then
+	base_compile="$lastarg"
+      else
+	base_compile="$base_compile $lastarg"
+      fi
+    done
+
+    case $user_target in
+    set)
+      ;;
+    no)
+      # Get the name of the library object.
+      libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+      ;;
+    *)
+      $echo "$modename: you must specify a target with \`-o'" 1>&2
+      exit 1
+      ;;
+    esac
+
+    # Recognize several different file suffixes.
+    # If the user specifies -o file.o, it is replaced with file.lo
+    xform='[cCFSfmso]'
+    case $libobj in
+    *.ada) xform=ada ;;
+    *.adb) xform=adb ;;
+    *.ads) xform=ads ;;
+    *.asm) xform=asm ;;
+    *.c++) xform=c++ ;;
+    *.cc) xform=cc ;;
+    *.cpp) xform=cpp ;;
+    *.cxx) xform=cxx ;;
+    *.f90) xform=f90 ;;
+    *.for) xform=for ;;
+    esac
+
+    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+
+    case $libobj in
+    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+    *)
+      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
+      exit 1
+      ;;
+    esac
+
+    if test -z "$base_compile"; then
+      $echo "$modename: you must specify a compilation command" 1>&2
+      $echo "$help" 1>&2
+      exit 1
+    fi
+
+    # Delete any leftover library objects.
+    if test "$build_old_libs" = yes; then
+      removelist="$obj $libobj"
+    else
+      removelist="$libobj"
+    fi
+
+    $run $rm $removelist
+    trap "$run $rm $removelist; exit 1" 1 2 15
+
+    # On Cygwin there's no "real" PIC flag so we must build both object types
+    case $host_os in
+    cygwin* | mingw* | pw32* | os2*)
+      pic_mode=default
+      ;;
+    esac
+    if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then
+      # non-PIC code in shared libraries is not supported
+      pic_mode=default
+    fi
+
+    # Calculate the filename of the output object if compiler does
+    # not support -o with -c
+    if test "$compiler_c_o" = no; then
+      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+      lockfile="$output_obj.lock"
+      removelist="$removelist $output_obj $lockfile"
+      trap "$run $rm $removelist; exit 1" 1 2 15
+    else
+      need_locks=no
+      lockfile=
+    fi
+
+    # Lock this critical section if it is needed
+    # We use this script file to make the link, it avoids creating a new file
+    if test "$need_locks" = yes; then
+      until $run ln "$0" "$lockfile" 2>/dev/null; do
+	$show "Waiting for $lockfile to be removed"
+	sleep 2
+      done
+    elif test "$need_locks" = warn; then
+      if test -f "$lockfile"; then
+	echo "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit 1
+      fi
+      echo $srcfile > "$lockfile"
+    fi
+
+    if test -n "$fix_srcfile_path"; then
+      eval srcfile=\"$fix_srcfile_path\"
+    fi
+
+    # Only build a PIC object if we are building libtool libraries.
+    if test "$build_libtool_libs" = yes; then
+      # Without this assignment, base_compile gets emptied.
+      fbsd_hideous_sh_bug=$base_compile
+
+      if test "$pic_mode" != no; then
+	# All platforms use -DPIC, to notify preprocessed assembler code.
+	command="$base_compile $srcfile $pic_flag -DPIC"
+      else
+	# Don't build PIC code
+	command="$base_compile $srcfile"
+      fi
+      if test "$build_old_libs" = yes; then
+	lo_libobj="$libobj"
+	dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
+	if test "X$dir" = "X$libobj"; then
+	  dir="$objdir"
+	else
+	  dir="$dir/$objdir"
+	fi
+	libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
+
+	if test -d "$dir"; then
+	  $show "$rm $libobj"
+	  $run $rm $libobj
+	else
+	  $show "$mkdir $dir"
+	  $run $mkdir $dir
+	  status=$?
+	  if test $status -ne 0 && test ! -d $dir; then
+	    exit $status
+	  fi
+	fi
+      fi
+      if test "$compiler_o_lo" = yes; then
+	output_obj="$libobj"
+	command="$command -o $output_obj"
+      elif test "$compiler_c_o" = yes; then
+	output_obj="$obj"
+	command="$command -o $output_obj"
+      fi
+
+      $run $rm "$output_obj"
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+	test -n "$output_obj" && $run $rm $removelist
+	exit 1
+      fi
+
+      if test "$need_locks" = warn &&
+	 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
+	echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit 1
+      fi
+
+      # Just move the object if needed, then go on to compile the next one
+      if test x"$output_obj" != x"$libobj"; then
+	$show "$mv $output_obj $libobj"
+	if $run $mv $output_obj $libobj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # If we have no pic_flag, then copy the object into place and finish.
+      if (test -z "$pic_flag" || test "$pic_mode" != default) &&
+	 test "$build_old_libs" = yes; then
+	# Rename the .lo from within objdir to obj
+	if test -f $obj; then
+	  $show $rm $obj
+	  $run $rm $obj
+	fi
+
+	$show "$mv $libobj $obj"
+	if $run $mv $libobj $obj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+
+	xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+	if test "X$xdir" = "X$obj"; then
+	  xdir="."
+	else
+	  xdir="$xdir"
+	fi
+	baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
+	libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
+	# Now arrange that obj and lo_libobj become the same file
+	$show "(cd $xdir && $LN_S $baseobj $libobj)"
+	if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
+	  # Unlock the critical section if it was locked
+	  if test "$need_locks" != no; then
+	    $run $rm "$lockfile"
+	  fi
+	  exit 0
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # Allow error messages only from the first compilation.
+      suppress_output=' >/dev/null 2>&1'
+    fi
+
+    # Only build a position-dependent object if we build old libraries.
+    if test "$build_old_libs" = yes; then
+      if test "$pic_mode" != yes; then
+	# Don't build PIC code
+	command="$base_compile $srcfile"
+      else
+	# All platforms use -DPIC, to notify preprocessed assembler code.
+	command="$base_compile $srcfile $pic_flag -DPIC"
+      fi
+      if test "$compiler_c_o" = yes; then
+	command="$command -o $obj"
+	output_obj="$obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      command="$command$suppress_output"
+      $run $rm "$output_obj"
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+	$run $rm $removelist
+	exit 1
+      fi
+
+      if test "$need_locks" = warn &&
+	 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
+	echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit 1
+      fi
+
+      # Just move the object if needed
+      if test x"$output_obj" != x"$obj"; then
+	$show "$mv $output_obj $obj"
+	if $run $mv $output_obj $obj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # Create an invalid libtool object if no PIC, so that we do not
+      # accidentally link it into a program.
+      if test "$build_libtool_libs" != yes; then
+	$show "echo timestamp > $libobj"
+	$run eval "echo timestamp > \$libobj" || exit $?
+      else
+	# Move the .lo from within objdir
+	$show "$mv $libobj $lo_libobj"
+	if $run $mv $libobj $lo_libobj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+    fi
+
+    # Unlock the critical section if it was locked
+    if test "$need_locks" != no; then
+      $run $rm "$lockfile"
+    fi
+
+    exit 0
+    ;;
+
+  # libtool link mode
+  link | relink)
+    modename="$modename: link"
+    case $host in
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+      # It is impossible to link a dll without this setting, and
+      # we shouldn't force the makefile maintainer to figure out
+      # which system we are compiling for in order to pass an extra
+      # flag for every libtool invokation.
+      # allow_undefined=no
+
+      # FIXME: Unfortunately, there are problems with the above when trying
+      # to make a dll which has undefined symbols, in which case not
+      # even a static library is built.  For now, we need to specify
+      # -no-undefined on the libtool link line when we can be certain
+      # that all symbols are satisfied, otherwise we get a static library.
+      allow_undefined=yes
+      ;;
+    *)
+      allow_undefined=yes
+      ;;
+    esac
+    libtool_args="$nonopt"
+    compile_command="$nonopt"
+    finalize_command="$nonopt"
+
+    compile_rpath=
+    finalize_rpath=
+    compile_shlibpath=
+    finalize_shlibpath=
+    convenience=
+    old_convenience=
+    deplibs=
+    old_deplibs=
+    compiler_flags=
+    linker_flags=
+    dllsearchpath=
+    lib_search_path=`pwd`
+
+    avoid_version=no
+    dlfiles=
+    dlprefiles=
+    dlself=no
+    export_dynamic=no
+    export_symbols=
+    export_symbols_regex=
+    generated=
+    libobjs=
+    ltlibs=
+    module=no
+    no_install=no
+    objs=
+    prefer_static_libs=no
+    preload=no
+    prev=
+    prevarg=
+    release=
+    rpath=
+    xrpath=
+    perm_rpath=
+    temp_rpath=
+    thread_safe=no
+    vinfo=
+
+    # We need to know -static, to get the right output filenames.
+    for arg
+    do
+      case $arg in
+      -all-static | -static)
+	if test "X$arg" = "X-all-static"; then
+	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
+	  fi
+	  if test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	else
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	fi
+	build_libtool_libs=no
+	build_old_libs=yes
+	prefer_static_libs=yes
+	break
+	;;
+      esac
+    done
+
+    # See if our shared archives depend on static archives.
+    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+    # Go through the arguments, transforming them on the way.
+    while test $# -gt 0; do
+      arg="$1"
+      shift
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
+	;;
+      *) qarg=$arg ;;
+      esac
+      libtool_args="$libtool_args $qarg"
+
+      # If the previous option needs an argument, assign it.
+      if test -n "$prev"; then
+	case $prev in
+	output)
+	  compile_command="$compile_command @OUTPUT@"
+	  finalize_command="$finalize_command @OUTPUT@"
+	  ;;
+	esac
+
+	case $prev in
+	dlfiles|dlprefiles)
+	  if test "$preload" = no; then
+	    # Add the symbol object into the linking commands.
+	    compile_command="$compile_command @SYMFILE@"
+	    finalize_command="$finalize_command @SYMFILE@"
+	    preload=yes
+	  fi
+	  case $arg in
+	  *.la | *.lo) ;;  # We handle these cases below.
+	  force)
+	    if test "$dlself" = no; then
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  self)
+	    if test "$prev" = dlprefiles; then
+	      dlself=yes
+	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+	      dlself=yes
+	    else
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  *)
+	    if test "$prev" = dlfiles; then
+	      dlfiles="$dlfiles $arg"
+	    else
+	      dlprefiles="$dlprefiles $arg"
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  esac
+	  ;;
+	expsyms)
+	  export_symbols="$arg"
+	  if test ! -f "$arg"; then
+	    $echo "$modename: symbol file \`$arg' does not exist"
+	    exit 1
+	  fi
+	  prev=
+	  continue
+	  ;;
+	expsyms_regex)
+	  export_symbols_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	release)
+	  release="-$arg"
+	  prev=
+	  continue
+	  ;;
+	rpath | xrpath)
+	  # We need an absolute path.
+	  case $arg in
+	  [\\/]* | [A-Za-z]:[\\/]*) ;;
+	  *)
+	    $echo "$modename: only absolute run-paths are allowed" 1>&2
+	    exit 1
+	    ;;
+	  esac
+	  if test "$prev" = rpath; then
+	    case "$rpath " in
+	    *" $arg "*) ;;
+	    *) rpath="$rpath $arg" ;;
+	    esac
+	  else
+	    case "$xrpath " in
+	    *" $arg "*) ;;
+	    *) xrpath="$xrpath $arg" ;;
+	    esac
+	  fi
+	  prev=
+	  continue
+	  ;;
+	xcompiler)
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  compile_command="$compile_command $qarg"
+	  finalize_command="$finalize_command $qarg"
+	  continue
+	  ;;
+	xlinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $wl$qarg"
+	  prev=
+	  compile_command="$compile_command $wl$qarg"
+	  finalize_command="$finalize_command $wl$qarg"
+	  continue
+	  ;;
+	*)
+	  eval "$prev=\"\$arg\""
+	  prev=
+	  continue
+	  ;;
+	esac
+      fi # test -n $prev
+
+      prevarg="$arg"
+
+      case $arg in
+      -all-static)
+	if test -n "$link_static_flag"; then
+	  compile_command="$compile_command $link_static_flag"
+	  finalize_command="$finalize_command $link_static_flag"
+	fi
+	continue
+	;;
+
+      -allow-undefined)
+	# FIXME: remove this flag sometime in the future.
+	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
+	continue
+	;;
+
+      -avoid-version)
+	avoid_version=yes
+	continue
+	;;
+
+      -dlopen)
+	prev=dlfiles
+	continue
+	;;
+
+      -dlpreopen)
+	prev=dlprefiles
+	continue
+	;;
+
+      -export-dynamic)
+	export_dynamic=yes
+	continue
+	;;
+
+      -export-symbols | -export-symbols-regex)
+	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	  $echo "$modename: more than one -exported-symbols argument is not allowed"
+	  exit 1
+	fi
+	if test "X$arg" = "X-export-symbols"; then
+	  prev=expsyms
+	else
+	  prev=expsyms_regex
+	fi
+	continue
+	;;
+
+      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+      # so, if we see these flags be careful not to treat them like -L
+      -L[A-Z][A-Z]*:*)
+	case $with_gcc/$host in
+	no/*-*-irix*)
+	  compile_command="$compile_command $arg"
+	  finalize_command="$finalize_command $arg"
+	  ;;
+	esac
+	continue
+	;;
+
+      -L*)
+	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  absdir=`cd "$dir" && pwd`
+	  if test -z "$absdir"; then
+	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
+	    exit 1
+	  fi
+	  dir="$absdir"
+	  ;;
+	esac
+	case "$deplibs " in
+	*" -L$dir "*) ;;
+	*)
+	  deplibs="$deplibs -L$dir"
+	  lib_search_path="$lib_search_path $dir"
+	  ;;
+	esac
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  case :$dllsearchpath: in
+	  *":$dir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$dir";;
+	  esac
+	  ;;
+	esac
+	continue
+	;;
+
+      -l*)
+	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+	  case $host in
+	  *-*-cygwin* | *-*-pw32* | *-*-beos*)
+	    # These systems don't actually have a C or math library (as such)
+	    continue
+	    ;;
+	  *-*-mingw* | *-*-os2*)
+	    # These systems don't actually have a C library (as such)
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-openbsd*)
+	    # Do not include libc due to us having libc/libc_r.
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  esac
+	 elif test "X$arg" = "X-lc_r"; then
+	  case $host in
+	  *-*-openbsd*)
+	    # Do not include libc_r directly, use -pthread flag.
+	    continue
+	    ;;
+	  esac
+	fi
+	deplibs="$deplibs $arg"
+	continue
+	;;
+
+      -module)
+	module=yes
+	continue
+	;;
+
+      -no-fast-install)
+	fast_install=no
+	continue
+	;;
+
+      -no-install)
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  # The PATH hackery in wrapper scripts is required on Windows
+	  # in order for the loader to find any dlls it needs.
+	  $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
+	  $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
+	  fast_install=no
+	  ;;
+	*) no_install=yes ;;
+	esac
+	continue
+	;;
+
+      -no-undefined)
+	allow_undefined=no
+	continue
+	;;
+
+      -o) prev=output ;;
+
+      -release)
+	prev=release
+	continue
+	;;
+
+      -rpath)
+	prev=rpath
+	continue
+	;;
+
+      -R)
+	prev=xrpath
+	continue
+	;;
+
+      -R*)
+	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  $echo "$modename: only absolute run-paths are allowed" 1>&2
+	  exit 1
+	  ;;
+	esac
+	case "$xrpath " in
+	*" $dir "*) ;;
+	*) xrpath="$xrpath $dir" ;;
+	esac
+	continue
+	;;
+
+      -static)
+	# The effects of -static are defined in a previous loop.
+	# We used to do the same as -all-static on platforms that
+	# didn't have a PIC flag, but the assumption that the effects
+	# would be equivalent was wrong.  It would break on at least
+	# Digital Unix and AIX.
+	continue
+	;;
+
+      -thread-safe)
+	thread_safe=yes
+	continue
+	;;
+
+      -version-info)
+	prev=vinfo
+	continue
+	;;
+
+      -Wc,*)
+	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+	  case $flag in
+	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	    flag="\"$flag\""
+	    ;;
+	  esac
+	  arg="$arg $wl$flag"
+	  compiler_flags="$compiler_flags $flag"
+	done
+	IFS="$save_ifs"
+	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+	;;
+
+      -Wl,*)
+	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+	  case $flag in
+	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	    flag="\"$flag\""
+	    ;;
+	  esac
+	  arg="$arg $wl$flag"
+	  compiler_flags="$compiler_flags $wl$flag"
+	  linker_flags="$linker_flags $flag"
+	done
+	IFS="$save_ifs"
+	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+	;;
+
+      -Xcompiler)
+	prev=xcompiler
+	continue
+	;;
+
+      -Xlinker)
+	prev=xlinker
+	continue
+	;;
+
+      # Some other compiler flag.
+      -* | +*)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case $arg in
+	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	;;
+
+      *.lo | *.$objext)
+	# A library or standard object.
+	if test "$prev" = dlfiles; then
+	  # This file was specified with -dlopen.
+	  if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+	    dlfiles="$dlfiles $arg"
+	    prev=
+	    continue
+	  else
+	    # If libtool objects are unsupported, then we need to preload.
+	    prev=dlprefiles
+	  fi
+	fi
+
+	if test "$prev" = dlprefiles; then
+	  # Preload the old-style object.
+	  dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
+	  prev=
+	else
+	  case $arg in
+	  *.lo) libobjs="$libobjs $arg" ;;
+	  *) objs="$objs $arg" ;;
+	  esac
+	fi
+	;;
+
+      *.$libext)
+	# An archive.
+	deplibs="$deplibs $arg"
+	old_deplibs="$old_deplibs $arg"
+	continue
+	;;
+
+      *.la)
+	# A libtool-controlled library.
+
+	if test "$prev" = dlfiles; then
+	  # This library was specified with -dlopen.
+	  dlfiles="$dlfiles $arg"
+	  prev=
+	elif test "$prev" = dlprefiles; then
+	  # The library was specified with -dlpreopen.
+	  dlprefiles="$dlprefiles $arg"
+	  prev=
+	else
+	  deplibs="$deplibs $arg"
+	fi
+	continue
+	;;
+
+      # Some other compiler argument.
+      *)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case $arg in
+	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	;;
+      esac # arg
+
+      # Now actually substitute the argument into the commands.
+      if test -n "$arg"; then
+	compile_command="$compile_command $arg"
+	finalize_command="$finalize_command $arg"
+      fi
+    done # argument parsing loop
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit 1
+    fi
+
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      compile_command="$compile_command $arg"
+      finalize_command="$finalize_command $arg"
+    fi
+
+    # calculate the name of the file, without its directory
+    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+    libobjs_save="$libobjs"
+
+    if test -n "$shlibpath_var"; then
+      # get the directories listed in $shlibpath_var
+      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+    else
+      shlib_search_path=
+    fi
+    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$output_objdir" = "X$output"; then
+      output_objdir="$objdir"
+    else
+      output_objdir="$output_objdir/$objdir"
+    fi
+    # Create the object directory.
+    if test ! -d $output_objdir; then
+      $show "$mkdir $output_objdir"
+      $run $mkdir $output_objdir
+      status=$?
+      if test $status -ne 0 && test ! -d $output_objdir; then
+	exit $status
+      fi
+    fi
+
+    # Determine the type of output
+    case $output in
+    "")
+      $echo "$modename: you must specify an output file" 1>&2
+      $echo "$help" 1>&2
+      exit 1
+      ;;
+    *.$libext) linkmode=oldlib ;;
+    *.lo | *.$objext) linkmode=obj ;;
+    *.la) linkmode=lib ;;
+    *) linkmode=prog ;; # Anything else should be a program.
+    esac
+
+    specialdeplibs=
+    libs=
+    # Find all interdependent deplibs by searching for libraries
+    # that are linked more than once (e.g. -la -lb -la)
+    for deplib in $deplibs; do
+      case "$libs " in
+      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+      esac
+      libs="$libs $deplib"
+    done
+    deplibs=
+    newdependency_libs=
+    newlib_search_path=
+    need_relink=no # whether we're linking any uninstalled libtool libraries
+    notinst_deplibs= # not-installed libtool libraries
+    notinst_path= # paths that contain not-installed libtool libraries
+    case $linkmode in
+    lib)
+	passes="conv link"
+	for file in $dlfiles $dlprefiles; do
+	  case $file in
+	  *.la) ;;
+	  *)
+	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
+	    exit 1
+	    ;;
+	  esac
+	done
+	;;
+    prog)
+	compile_deplibs=
+	finalize_deplibs=
+	alldeplibs=no
+	newdlfiles=
+	newdlprefiles=
+	passes="conv scan dlopen dlpreopen link"
+	;;
+    *)  passes="conv"
+	;;
+    esac
+    for pass in $passes; do
+      if test $linkmode = prog; then
+	# Determine which files to process
+	case $pass in
+	dlopen)
+	  libs="$dlfiles"
+	  save_deplibs="$deplibs" # Collect dlpreopened libraries
+	  deplibs=
+	  ;;
+	dlpreopen) libs="$dlprefiles" ;;
+	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+	esac
+      fi
+      for deplib in $libs; do
+	lib=
+	found=no
+	case $deplib in
+	-l*)
+	  if test $linkmode = oldlib && test $linkmode = obj; then
+	    $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2
+	    continue
+	  fi
+	  if test $pass = conv; then
+	    deplibs="$deplib $deplibs"
+	    continue
+	  fi
+	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
+	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
+	    # Search the libtool library
+	    lib="$searchdir/lib${name}.la"
+	    if test -f "$lib"; then
+	      found=yes
+	      break
+	    fi
+	  done
+	  if test "$found" != yes; then
+	    # deplib doesn't seem to be a libtool library
+	    if test "$linkmode,$pass" = "prog,link"; then
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      deplibs="$deplib $deplibs"
+	      test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    continue
+	  fi
+	  ;; # -l
+	-L*)
+	  case $linkmode in
+	  lib)
+	    deplibs="$deplib $deplibs"
+	    test $pass = conv && continue
+	    newdependency_libs="$deplib $newdependency_libs"
+	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+	    ;;
+	  prog)
+	    if test $pass = conv; then
+	      deplibs="$deplib $deplibs"
+	      continue
+	    fi
+	    if test $pass = scan; then
+	      deplibs="$deplib $deplibs"
+	      newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    ;;
+	  *)
+	    $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2
+	    ;;
+	  esac # linkmode
+	  continue
+	  ;; # -L
+	-R*)
+	  if test $pass = link; then
+	    dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+	    # Make sure the xrpath contains only unique directories.
+	    case "$xrpath " in
+	    *" $dir "*) ;;
+	    *) xrpath="$xrpath $dir" ;;
+	    esac
+	  fi
+	  deplibs="$deplib $deplibs"
+	  continue
+	  ;;
+	*.la) lib="$deplib" ;;
+	*.$libext)
+	  if test $pass = conv; then
+	    deplibs="$deplib $deplibs"
+	    continue
+	  fi
+	  case $linkmode in
+	  lib)
+	    if test "$deplibs_check_method" != pass_all; then
+	      echo
+	      echo "*** Warning: This library needs some functionality provided by $deplib."
+	      echo "*** I have the capability to make that library automatically link in when"
+	      echo "*** you link to this library.  But I can only do this if you have a"
+	      echo "*** shared version of the library, which you do not appear to have."
+	    else
+	      echo
+	      echo "*** Warning: Linking the shared library $output against the"
+	      echo "*** static library $deplib is not portable!"
+	      deplibs="$deplib $deplibs"
+	    fi
+	    continue
+	    ;;
+	  prog)
+	    if test $pass != link; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    continue
+	    ;;
+	  esac # linkmode
+	  ;; # *.$libext
+	*.lo | *.$objext)
+	  if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+	    # If there is no dlopen support or we're linking statically,
+	    # we need to preload.
+	    newdlprefiles="$newdlprefiles $deplib"
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    newdlfiles="$newdlfiles $deplib"
+	  fi
+	  continue
+	  ;;
+	%DEPLIBS%)
+	  alldeplibs=yes
+	  continue
+	  ;;
+	esac # case $deplib
+	if test $found = yes || test -f "$lib"; then :
+	else
+	  $echo "$modename: cannot find the library \`$lib'" 1>&2
+	  exit 1
+	fi
+
+	# Check to see that this really is a libtool archive.
+	if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+	  exit 1
+	fi
+
+	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$ladir" = "X$lib" && ladir="."
+
+	dlname=
+	dlopen=
+	dlpreopen=
+	libdir=
+	library_names=
+	old_library=
+	# If the library was installed with an old release of libtool,
+	# it will not redefine variable installed.
+	installed=yes
+
+	# Read the .la file
+	case $lib in
+	*/* | *\\*) . $lib ;;
+	*) . ./$lib ;;
+	esac
+
+	if test "$linkmode,$pass" = "lib,link" ||
+	   test "$linkmode,$pass" = "prog,scan" ||
+	   { test $linkmode = oldlib && test $linkmode = obj; }; then
+	   # Add dl[pre]opened files of deplib
+	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+	fi
+
+	if test $pass = conv; then
+	  # Only check for convenience libraries
+	  deplibs="$lib $deplibs"
+	  if test -z "$libdir"; then
+	    if test -z "$old_library"; then
+	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+	      exit 1
+	    fi
+	    # It is a libtool convenience library, so add in its objects.
+	    convenience="$convenience $ladir/$objdir/$old_library"
+	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
+	    tmp_libs=
+	    for deplib in $dependency_libs; do
+	      deplibs="$deplib $deplibs"
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	      tmp_libs="$tmp_libs $deplib"
+	    done
+	  elif test $linkmode != prog && test $linkmode != lib; then
+	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
+	    exit 1
+	  fi
+	  continue
+	fi # $pass = conv
+
+	# Get the name of the library we link against.
+	linklib=
+	for l in $old_library $library_names; do
+	  linklib="$l"
+	done
+	if test -z "$linklib"; then
+	  $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+	  exit 1
+	fi
+
+	# This library was specified with -dlopen.
+	if test $pass = dlopen; then
+	  if test -z "$libdir"; then
+	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
+	    exit 1
+	  fi
+	  if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+	    # If there is no dlname, no dlopen support or we're linking
+	    # statically, we need to preload.
+	    dlprefiles="$dlprefiles $lib"
+	  else
+	    newdlfiles="$newdlfiles $lib"
+	  fi
+	  continue
+	fi # $pass = dlopen
+
+	# We need an absolute path.
+	case $ladir in
+	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+	*)
+	  abs_ladir=`cd "$ladir" && pwd`
+	  if test -z "$abs_ladir"; then
+	    $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
+	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+	    abs_ladir="$ladir"
+	  fi
+	  ;;
+	esac
+	laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+
+	# Find the relevant object directory and library name.
+	if test "X$installed" = Xyes; then
+	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    $echo "$modename: warning: library \`$lib' was moved." 1>&2
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    libdir="$abs_ladir"
+	  else
+	    dir="$libdir"
+	    absdir="$libdir"
+	  fi
+	else
+	  dir="$ladir/$objdir"
+	  absdir="$abs_ladir/$objdir"
+	  # Remove this search path later
+	  notinst_path="$notinst_path $abs_ladir"
+	fi # $installed = yes
+	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+
+	# This library was specified with -dlpreopen.
+	if test $pass = dlpreopen; then
+	  if test -z "$libdir"; then
+	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
+	    exit 1
+	  fi
+	  # Prefer using a static library (so that no silly _DYNAMIC symbols
+	  # are required to link).
+	  if test -n "$old_library"; then
+	    newdlprefiles="$newdlprefiles $dir/$old_library"
+	  # Otherwise, use the dlname, so that lt_dlopen finds it.
+	  elif test -n "$dlname"; then
+	    newdlprefiles="$newdlprefiles $dir/$dlname"
+	  else
+	    newdlprefiles="$newdlprefiles $dir/$linklib"
+	  fi
+	fi # $pass = dlpreopen
+
+	if test -z "$libdir"; then
+	  # Link the convenience library
+	  if test $linkmode = lib; then
+	    deplibs="$dir/$old_library $deplibs"
+	  elif test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$dir/$old_library $compile_deplibs"
+	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
+	  else
+	    deplibs="$lib $deplibs"
+	  fi
+	  continue
+	fi
+
+	if test $linkmode = prog && test $pass != link; then
+	  newlib_search_path="$newlib_search_path $ladir"
+	  deplibs="$lib $deplibs"
+
+	  linkalldeplibs=no
+	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
+	     test "$build_libtool_libs" = no; then
+	    linkalldeplibs=yes
+	  fi
+
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    case $deplib in
+	    -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
+	    esac
+	    # Need to link against all dependency_libs?
+	    if test $linkalldeplibs = yes; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      # Need to hardcode shared library paths
+	      # or/and link against static libraries
+	      newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    case "$tmp_libs " in
+	    *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	    esac
+	    tmp_libs="$tmp_libs $deplib"
+	  done # for deplib
+	  continue
+	fi # $linkmode = prog...
+
+	link_static=no # Whether the deplib will be linked statically
+	if test -n "$library_names" &&
+	   { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+	  # Link against this shared library
+
+	  if test "$linkmode,$pass" = "prog,link" ||
+	   { test $linkmode = lib && test $hardcode_into_libs = yes; }; then
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) compile_rpath="$compile_rpath $absdir"
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) finalize_rpath="$finalize_rpath $libdir"
+	      esac
+	      ;;
+	    esac
+	    if test $linkmode = prog; then
+	      # We need to hardcode the library path
+	      if test -n "$shlibpath_var"; then
+		# Make sure the rpath contains only unique directories.
+		case "$temp_rpath " in
+		*" $dir "*) ;;
+		*" $absdir "*) ;;
+		*) temp_rpath="$temp_rpath $dir" ;;
+		esac
+	      fi
+	    fi
+	  fi # $linkmode,$pass = prog,link...
+
+	  if test "$alldeplibs" = yes &&
+	     { test "$deplibs_check_method" = pass_all ||
+	       { test "$build_libtool_libs" = yes &&
+		 test -n "$library_names"; }; }; then
+	    # We only need to search for static libraries
+	    continue
+	  fi
+
+	  if test "$installed" = no; then
+	    notinst_deplibs="$notinst_deplibs $lib"
+	    need_relink=yes
+	  fi
+
+	  if test -n "$old_archive_from_expsyms_cmds"; then
+	    # figure out the soname
+	    set dummy $library_names
+	    realname="$2"
+	    shift; shift
+	    libname=`eval \\$echo \"$libname_spec\"`
+	    # use dlname if we got it. it's perfectly good, no?
+	    if test -n "$dlname"; then
+	      soname="$dlname"
+	    elif test -n "$soname_spec"; then
+	      # bleh windows
+	      case $host in
+	      *cygwin*)
+		major=`expr $current - $age`
+		versuffix="-$major"
+		;;
+	      esac
+	      eval soname=\"$soname_spec\"
+	    else
+	      soname="$realname"
+	    fi
+
+	    # Make a new name for the extract_expsyms_cmds to use
+	    soroot="$soname"
+	    soname=`echo $soroot | sed -e 's/^.*\///'`
+	    newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
+
+	    # If the library has no export list, then create one now
+	    if test -f "$output_objdir/$soname-def"; then :
+	    else
+	      $show "extracting exported symbol list from \`$soname'"
+	      save_ifs="$IFS"; IFS='~'
+	      eval cmds=\"$extract_expsyms_cmds\"
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		$show "$cmd"
+		$run eval "$cmd" || exit $?
+	      done
+	      IFS="$save_ifs"
+	    fi
+
+	    # Create $newlib
+	    if test -f "$output_objdir/$newlib"; then :; else
+	      $show "generating import library for \`$soname'"
+	      save_ifs="$IFS"; IFS='~'
+	      eval cmds=\"$old_archive_from_expsyms_cmds\"
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		$show "$cmd"
+		$run eval "$cmd" || exit $?
+	      done
+	      IFS="$save_ifs"
+	    fi
+	    # make sure the library variables are pointing to the new library
+	    dir=$output_objdir
+	    linklib=$newlib
+	  fi # test -n $old_archive_from_expsyms_cmds
+
+	  if test $linkmode = prog || test "$mode" != relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    lib_linked=yes
+	    case $hardcode_action in
+	    immediate | unsupported)
+	      if test "$hardcode_direct" = no; then
+		add="$dir/$linklib"
+	      elif test "$hardcode_minus_L" = no; then
+		case $host in
+		*-*-sunos*) add_shlibpath="$dir" ;;
+		esac
+		add_dir="-L$dir"
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = no; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    relink)
+	      if test "$hardcode_direct" = yes; then
+		add="$dir/$linklib"
+	      elif test "$hardcode_minus_L" = yes; then
+		add_dir="-L$dir"
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = yes; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    *) lib_linked=no ;;
+	    esac
+
+	    if test "$lib_linked" != yes; then
+	      $echo "$modename: configuration error: unsupported hardcode properties"
+	      exit 1
+	    fi
+
+	    if test -n "$add_shlibpath"; then
+	      case :$compile_shlibpath: in
+	      *":$add_shlibpath:"*) ;;
+	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+	      esac
+	    fi
+	    if test $linkmode = prog; then
+	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	      if test "$hardcode_direct" != yes && \
+		 test "$hardcode_minus_L" != yes && \
+		 test "$hardcode_shlibpath_var" = yes; then
+		case :$finalize_shlibpath: in
+		*":$libdir:"*) ;;
+		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+		esac
+	      fi
+	    fi
+	  fi
+
+	  if test $linkmode = prog || test "$mode" = relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    # Finalize command for both is simple: just hardcode it.
+	    if test "$hardcode_direct" = yes; then
+	      add="$libdir/$linklib"
+	    elif test "$hardcode_minus_L" = yes; then
+	      add_dir="-L$libdir"
+	      add="-l$name"
+	    elif test "$hardcode_shlibpath_var" = yes; then
+	      case :$finalize_shlibpath: in
+	      *":$libdir:"*) ;;
+	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+	      esac
+	      add="-l$name"
+	    else
+	      # We cannot seem to hardcode it, guess we'll fake it.
+	      if test "X$installed" = Xyes; then
+	        add_dir="-L$libdir"
+	      else
+	        add_dir="-L$DESTDIR$libdir"
+	      fi
+	      add="-l$name"
+	    fi
+
+	    if test $linkmode = prog; then
+	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	    fi
+	  fi
+	elif test $linkmode = prog; then
+	  if test "$alldeplibs" = yes &&
+	     { test "$deplibs_check_method" = pass_all ||
+	       { test "$build_libtool_libs" = yes &&
+		 test -n "$library_names"; }; }; then
+	    # We only need to search for static libraries
+	    continue
+	  fi
+
+	  # Try to link the static library
+	  # Here we assume that one of hardcode_direct or hardcode_minus_L
+	  # is not unsupported.  This is valid on all known static and
+	  # shared platforms.
+	  if test "$hardcode_direct" != unsupported; then
+	    test -n "$old_library" && linklib="$old_library"
+	    compile_deplibs="$dir/$linklib $compile_deplibs"
+	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
+	  else
+	    compile_deplibs="-l$name -L$dir $compile_deplibs"
+	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+	  fi
+	elif test "$build_libtool_libs" = yes; then
+	  # Not a shared library
+	  if test "$deplibs_check_method" != pass_all; then
+	    # We're trying link a shared library against a static one
+	    # but the system doesn't support it.
+
+	    # Just print a warning and add the library to dependency_libs so
+	    # that the program can be linked against the static library.
+	    echo
+	    echo "*** Warning: This library needs some functionality provided by $lib."
+	    echo "*** I have the capability to make that library automatically link in when"
+	    echo "*** you link to this library.  But I can only do this if you have a"
+	    echo "*** shared version of the library, which you do not appear to have."
+	    if test "$module" = yes; then
+	      echo "*** Therefore, libtool will create a static module, that should work "
+	      echo "*** as long as the dlopening application is linked with the -dlopen flag."
+	      if test -z "$global_symbol_pipe"; then
+		echo
+		echo "*** However, this would only work if libtool was able to extract symbol"
+		echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+		echo "*** not find such a program.  So, this module is probably useless."
+		echo "*** \`nm' from GNU binutils and a full rebuild may help."
+	      fi
+	      if test "$build_old_libs" = no; then
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  else
+	    convenience="$convenience $dir/$old_library"
+	    old_convenience="$old_convenience $dir/$old_library"
+	    deplibs="$dir/$old_library $deplibs"
+	    link_static=yes
+	  fi
+	fi # link shared/static library?
+
+	if test $linkmode = lib; then
+	  if test -n "$dependency_libs" &&
+	     { test $hardcode_into_libs != yes || test $build_old_libs = yes ||
+	       test $link_static = yes; }; then
+	    # Extract -R from dependency_libs
+	    temp_deplibs=
+	    for libdir in $dependency_libs; do
+	      case $libdir in
+	      -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
+		   case " $xrpath " in
+		   *" $temp_xrpath "*) ;;
+		   *) xrpath="$xrpath $temp_xrpath";;
+		   esac;;
+	      *) temp_deplibs="$temp_deplibs $libdir";;
+	      esac
+	    done
+	    dependency_libs="$temp_deplibs"
+	  fi
+
+	  newlib_search_path="$newlib_search_path $absdir"
+	  # Link against this library
+	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+	  # ... and its dependency_libs
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    newdependency_libs="$deplib $newdependency_libs"
+	    case "$tmp_libs " in
+	    *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	    esac
+	    tmp_libs="$tmp_libs $deplib"
+	  done
+
+	  if test $link_all_deplibs != no; then
+	    # Add the search paths of all dependency libraries
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      -L*) path="$deplib" ;;
+	      *.la)
+		dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
+		test "X$dir" = "X$deplib" && dir="."
+		# We need an absolute path.
+		case $dir in
+		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+		*)
+		  absdir=`cd "$dir" && pwd`
+		  if test -z "$absdir"; then
+		    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
+		    absdir="$dir"
+		  fi
+		  ;;
+		esac
+		if grep "^installed=no" $deplib > /dev/null; then
+		  path="-L$absdir/$objdir"
+		else
+		  eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		  if test -z "$libdir"; then
+		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+		    exit 1
+		  fi
+		  if test "$absdir" != "$libdir"; then
+		    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
+		  fi
+		  path="-L$absdir"
+		fi
+		;;
+	      *) continue ;;
+	      esac
+	      case " $deplibs " in
+	      *" $path "*) ;;
+	      *) deplibs="$deplibs $path" ;;
+	      esac
+	    done
+	  fi # link_all_deplibs != no
+	fi # linkmode = lib
+      done # for deplib in $libs
+      if test $pass = dlpreopen; then
+	# Link the dlpreopened libraries before other libraries
+	for deplib in $save_deplibs; do
+	  deplibs="$deplib $deplibs"
+	done
+      fi
+      if test $pass != dlopen; then
+	test $pass != scan && dependency_libs="$newdependency_libs"
+	if test $pass != conv; then
+	  # Make sure lib_search_path contains only unique directories.
+	  lib_search_path=
+	  for dir in $newlib_search_path; do
+	    case "$lib_search_path " in
+	    *" $dir "*) ;;
+	    *) lib_search_path="$lib_search_path $dir" ;;
+	    esac
+	  done
+	  newlib_search_path=
+	fi
+
+	if test "$linkmode,$pass" != "prog,link"; then
+	  vars="deplibs"
+	else
+	  vars="compile_deplibs finalize_deplibs"
+	fi
+	for var in $vars dependency_libs; do
+	  # Add libraries to $var in reverse order
+	  eval tmp_libs=\"\$$var\"
+	  new_libs=
+	  for deplib in $tmp_libs; do
+	    case $deplib in
+	    -L*) new_libs="$deplib $new_libs" ;;
+	    *)
+	      case " $specialdeplibs " in
+	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
+	      *)
+		case " $new_libs " in
+		*" $deplib "*) ;;
+		*) new_libs="$deplib $new_libs" ;;
+		esac
+		;;
+	      esac
+	      ;;
+	    esac
+	  done
+	  tmp_libs=
+	  for deplib in $new_libs; do
+	    case $deplib in
+	    -L*)
+	      case " $tmp_libs " in
+	      *" $deplib "*) ;;
+	      *) tmp_libs="$tmp_libs $deplib" ;;
+	      esac
+	      ;;
+	    *) tmp_libs="$tmp_libs $deplib" ;;
+	    esac
+	  done
+	  eval $var=\"$tmp_libs\"
+	done # for var
+      fi
+      if test "$pass" = "conv" &&
+       { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then
+	libs="$deplibs" # reset libs
+	deplibs=
+      fi
+    done # for pass
+    if test $linkmode = prog; then
+      dlfiles="$newdlfiles"
+      dlprefiles="$newdlprefiles"
+    fi
+
+    case $linkmode in
+    oldlib)
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
+      fi
+
+      # Now set the variables for building old libraries.
+      build_libtool_libs=no
+      oldlibs="$output"
+      objs="$objs$old_deplibs"
+      ;;
+
+    lib)
+      # Make sure we only generate libraries of the form `libNAME.la'.
+      case $outputname in
+      lib*)
+	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+	eval libname=\"$libname_spec\"
+	;;
+      *)
+	if test "$module" = no; then
+	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
+	  $echo "$help" 1>&2
+	  exit 1
+	fi
+	if test "$need_lib_prefix" != no; then
+	  # Add the "lib" prefix for modules if required
+	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+	  eval libname=\"$libname_spec\"
+	else
+	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+	fi
+	;;
+      esac
+
+      if test -n "$objs"; then
+	if test "$deplibs_check_method" != pass_all; then
+	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
+	  exit 1
+	else
+	  echo
+	  echo "*** Warning: Linking the shared library $output against the non-libtool"
+	  echo "*** objects $objs is not portable!"
+	  libobjs="$libobjs $objs"
+	fi
+      fi
+
+      if test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
+      fi
+
+      set dummy $rpath
+      if test $# -gt 2; then
+	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
+      fi
+      install_libdir="$2"
+
+      oldlibs=
+      if test -z "$rpath"; then
+	if test "$build_libtool_libs" = yes; then
+	  # Building a libtool convenience library.
+	  libext=al
+	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
+	  build_libtool_libs=convenience
+	  build_old_libs=yes
+	fi
+
+	if test -n "$vinfo"; then
+	  $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
+	fi
+
+	if test -n "$release"; then
+	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
+	fi
+      else
+
+	# Parse the version information argument.
+	save_ifs="$IFS"; IFS=':'
+	set dummy $vinfo 0 0 0
+	IFS="$save_ifs"
+
+	if test -n "$8"; then
+	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
+	  $echo "$help" 1>&2
+	  exit 1
+	fi
+
+	current="$2"
+	revision="$3"
+	age="$4"
+
+	# Check that each of the things are valid numbers.
+	case $current in
+	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit 1
+	  ;;
+	esac
+
+	case $revision in
+	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit 1
+	  ;;
+	esac
+
+	case $age in
+	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit 1
+	  ;;
+	esac
+
+	if test $age -gt $current; then
+	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit 1
+	fi
+
+	# Calculate the version variables.
+	major=
+	versuffix=
+	verstring=
+	case $version_type in
+	none) ;;
+
+	darwin)
+	  # Like Linux, but with the current version available in
+	  # verstring for coding it into the library header
+	  major=.`expr $current - $age`
+	  versuffix="$major.$age.$revision"
+	  # Darwin ld doesn't like 0 for these options...
+	  minor_current=`expr $current + 1`
+	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+	  ;;
+
+	freebsd-aout)
+	  major=".$current"
+	  versuffix=".$current.$revision";
+	  ;;
+
+	freebsd-elf)
+	  major=".$current"
+	  versuffix=".$current";
+	  ;;
+
+	irix)
+	  major=`expr $current - $age + 1`
+	  verstring="sgi$major.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$revision
+	  while test $loop != 0; do
+	    iface=`expr $revision - $loop`
+	    loop=`expr $loop - 1`
+	    verstring="sgi$major.$iface:$verstring"
+	  done
+
+	  # Before this point, $major must not contain `.'.
+	  major=.$major
+	  versuffix="$major.$revision"
+	  ;;
+
+	linux)
+	  major=.`expr $current - $age`
+	  versuffix="$major.$age.$revision"
+	  ;;
+
+	osf)
+	  major=`expr $current - $age`
+	  versuffix=".$current.$age.$revision"
+	  verstring="$current.$age.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$age
+	  while test $loop != 0; do
+	    iface=`expr $current - $loop`
+	    loop=`expr $loop - 1`
+	    verstring="$verstring:${iface}.0"
+	  done
+
+	  # Make executables depend on our current version.
+	  verstring="$verstring:${current}.0"
+	  ;;
+
+	sunos)
+	  major=".$current"
+	  versuffix=".$current.$revision"
+	  ;;
+
+	windows)
+	  # Use '-' rather than '.', since we only want one
+	  # extension on DOS 8.3 filesystems.
+	  major=`expr $current - $age`
+	  versuffix="-$major"
+	  ;;
+
+	*)
+	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
+	  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+	  exit 1
+	  ;;
+	esac
+
+	# Clear the version info if we defaulted, and they specified a release.
+	if test -z "$vinfo" && test -n "$release"; then
+	  major=
+	  verstring="0.0"
+	  case $version_type in
+	  darwin)
+	    # we can't check for "0.0" in archive_cmds due to quoting
+	    # problems, so we reset it completely
+	    verstring=""
+	    ;;
+	  *)
+	    verstring="0.0"
+	    ;;
+	  esac
+	  if test "$need_version" = no; then
+	    versuffix=
+	  else
+	    versuffix=".0.0"
+	  fi
+	fi
+
+	# Remove version info from name if versioning should be avoided
+	if test "$avoid_version" = yes && test "$need_version" = no; then
+	  major=
+	  versuffix=
+	  verstring=""
+	fi
+
+	# Check to see if the archive will have undefined symbols.
+	if test "$allow_undefined" = yes; then
+	  if test "$allow_undefined_flag" = unsupported; then
+	    $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+	    build_libtool_libs=no
+	    build_old_libs=yes
+	  fi
+	else
+	  # Don't allow undefined symbols.
+	  allow_undefined_flag="$no_undefined_flag"
+	fi
+      fi
+
+      if test "$mode" != relink; then
+	# Remove our outputs.
+	$show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
+	$run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
+      fi
+
+      # Now set the variables for building old libraries.
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+	oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+	# Transform .lo files to .o files.
+	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+      fi
+
+      # Eliminate all temporary directories.
+      for path in $notinst_path; do
+	lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`
+	deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`
+	dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
+      done
+
+      if test -n "$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	temp_xrpath=
+	for libdir in $xrpath; do
+	  temp_xrpath="$temp_xrpath -R$libdir"
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+	if test $hardcode_into_libs != yes || test $build_old_libs = yes; then
+	  dependency_libs="$temp_xrpath $dependency_libs"
+	fi
+      fi
+
+      # Make sure dlfiles contains only unique files that won't be dlpreopened
+      old_dlfiles="$dlfiles"
+      dlfiles=
+      for lib in $old_dlfiles; do
+	case " $dlprefiles $dlfiles " in
+	*" $lib "*) ;;
+	*) dlfiles="$dlfiles $lib" ;;
+	esac
+      done
+
+      # Make sure dlprefiles contains only unique files
+      old_dlprefiles="$dlprefiles"
+      dlprefiles=
+      for lib in $old_dlprefiles; do
+	case "$dlprefiles " in
+	*" $lib "*) ;;
+	*) dlprefiles="$dlprefiles $lib" ;;
+	esac
+      done
+
+      if test "$build_libtool_libs" = yes; then
+	if test -n "$rpath"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
+	    # these systems don't actually have a c library (as such)!
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C library is in the System framework
+	    deplibs="$deplibs -framework System"
+	    ;;
+	  *-*-netbsd*)
+	    # Don't link with libc until the a.out ld.so is fixed.
+	    ;;
+	  *-*-openbsd*)
+	    # Do not include libc due to us having libc/libc_r.
+	    ;;
+	  *)
+	    # Add libc to deplibs on all other systems if necessary.
+	    if test $build_libtool_need_lc = "yes"; then
+	      deplibs="$deplibs -lc"
+	    fi
+	    ;;
+	  esac
+	fi
+
+	# Transform deplibs into only deplibs that can be linked in shared.
+	name_save=$name
+	libname_save=$libname
+	release_save=$release
+	versuffix_save=$versuffix
+	major_save=$major
+	# I'm not sure if I'm treating the release correctly.  I think
+	# release should show up in the -l (ie -lgmp5) so we don't want to
+	# add it in twice.  Is that correct?
+	release=""
+	versuffix=""
+	major=""
+	newdeplibs=
+	droppeddeps=no
+	case $deplibs_check_method in
+	pass_all)
+	  # Don't check for shared/static.  Everything works.
+	  # This might be a little naive.  We might want to check
+	  # whether the library exists or not.  But this is on
+	  # osf3 & osf4 and I'm not really sure... Just
+	  # implementing what was already the behaviour.
+	  newdeplibs=$deplibs
+	  ;;
+	test_compile)
+	  # This code stresses the "libraries are programs" paradigm to its
+	  # limits. Maybe even breaks it.  We compile a program, linking it
+	  # against the deplibs as a proxy for the library.  Then we can check
+	  # whether they linked in statically or dynamically with ldd.
+	  $rm conftest.c
+	  cat > conftest.c <<EOF
+	  int main() { return 0; }
+EOF
+	  $rm conftest
+	  $CC -o conftest conftest.c $deplibs
+	  if test $? -eq 0 ; then
+	    ldd_output=`ldd conftest`
+	    for i in $deplibs; do
+	      name="`expr $i : '-l\(.*\)'`"
+	      # If $name is empty we are operating on a -L argument.
+	      if test -n "$name" && test "$name" != "0"; then
+		libname=`eval \\$echo \"$libname_spec\"`
+		deplib_matches=`eval \\$echo \"$library_names_spec\"`
+		set dummy $deplib_matches
+		deplib_match=$2
+		if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		  newdeplibs="$newdeplibs $i"
+		else
+		  droppeddeps=yes
+		  echo
+		  echo "*** Warning: This library needs some functionality provided by $i."
+		  echo "*** I have the capability to make that library automatically link in when"
+		  echo "*** you link to this library.  But I can only do this if you have a"
+		  echo "*** shared version of the library, which you do not appear to have."
+		fi
+	      else
+		newdeplibs="$newdeplibs $i"
+	      fi
+	    done
+	  else
+	    # Error occured in the first compile.  Let's try to salvage the situation:
+	    # Compile a seperate program for each library.
+	    for i in $deplibs; do
+	      name="`expr $i : '-l\(.*\)'`"
+	     # If $name is empty we are operating on a -L argument.
+	      if test -n "$name" && test "$name" != "0"; then
+		$rm conftest
+		$CC -o conftest conftest.c $i
+		# Did it work?
+		if test $? -eq 0 ; then
+		  ldd_output=`ldd conftest`
+		  libname=`eval \\$echo \"$libname_spec\"`
+		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
+		  set dummy $deplib_matches
+		  deplib_match=$2
+		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		    newdeplibs="$newdeplibs $i"
+		  else
+		    droppeddeps=yes
+		    echo
+		    echo "*** Warning: This library needs some functionality provided by $i."
+		    echo "*** I have the capability to make that library automatically link in when"
+		    echo "*** you link to this library.  But I can only do this if you have a"
+		    echo "*** shared version of the library, which you do not appear to have."
+		  fi
+		else
+		  droppeddeps=yes
+		  echo
+		  echo "*** Warning!  Library $i is needed by this library but I was not able to"
+		  echo "***  make it link in!  You will probably need to install it or some"
+		  echo "*** library that it depends on before this library will be fully"
+		  echo "*** functional.  Installing it before continuing would be even better."
+		fi
+	      else
+		newdeplibs="$newdeplibs $i"
+	      fi
+	    done
+	  fi
+	  ;;
+	file_magic*)
+	  set dummy $deplibs_check_method
+	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    name="`expr $a_deplib : '-l\(.*\)'`"
+	    # If $name is empty we are operating on a -L argument.
+	    if test -n "$name" && test "$name" != "0"; then
+	      libname=`eval \\$echo \"$libname_spec\"`
+	      for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		    potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		    for potent_lib in $potential_libs; do
+		      # Follow soft links.
+		      if ls -lLd "$potent_lib" 2>/dev/null \
+			 | grep " -> " >/dev/null; then
+			continue
+		      fi
+		      # The statement above tries to avoid entering an
+		      # endless loop below, in case of cyclic links.
+		      # We might still enter an endless loop, since a link
+		      # loop can be closed while we follow links,
+		      # but so what?
+		      potlib="$potent_lib"
+		      while test -h "$potlib" 2>/dev/null; do
+			potliblink=`ls -ld $potlib | sed 's/.* -> //'`
+			case $potliblink in
+			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+			esac
+		      done
+		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
+			 | sed 10q \
+			 | egrep "$file_magic_regex" > /dev/null; then
+			newdeplibs="$newdeplibs $a_deplib"
+			a_deplib=""
+			break 2
+		      fi
+		    done
+	      done
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		echo
+		echo "*** Warning: This library needs some functionality provided by $a_deplib."
+		echo "*** I have the capability to make that library automatically link in when"
+		echo "*** you link to this library.  But I can only do this if you have a"
+		echo "*** shared version of the library, which you do not appear to have."
+	      fi
+	    else
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	    fi
+	  done # Gone through all deplibs.
+	  ;;
+	match_pattern*)
+	  set dummy $deplibs_check_method
+	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    name="`expr $a_deplib : '-l\(.*\)'`"
+	    # If $name is empty we are operating on a -L argument.
+	    if test -n "$name" && test "$name" != "0"; then
+	      libname=`eval \\$echo \"$libname_spec\"`
+	      for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		for potent_lib in $potential_libs; do
+		  if eval echo \"$potent_lib\" 2>/dev/null \
+		      | sed 10q \
+		      | egrep "$match_pattern_regex" > /dev/null; then
+		    newdeplibs="$newdeplibs $a_deplib"
+		    a_deplib=""
+		    break 2
+		  fi
+		done
+	      done
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		echo
+		echo "*** Warning: This library needs some functionality provided by $a_deplib."
+		echo "*** I have the capability to make that library automatically link in when"
+		echo "*** you link to this library.  But I can only do this if you have a"
+		echo "*** shared version of the library, which you do not appear to have."
+	      fi
+	    else
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	    fi
+	  done # Gone through all deplibs.
+	  ;;
+	none | unknown | *)
+	  newdeplibs=""
+	  if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+	       -e 's/ -[LR][^ ]*//g' -e 's/[ 	]//g' |
+	     grep . >/dev/null; then
+	    echo
+	    if test "X$deplibs_check_method" = "Xnone"; then
+	      echo "*** Warning: inter-library dependencies are not supported in this platform."
+	    else
+	      echo "*** Warning: inter-library dependencies are not known to be supported."
+	    fi
+	    echo "*** All declared inter-library dependencies are being dropped."
+	    droppeddeps=yes
+	  fi
+	  ;;
+	esac
+	versuffix=$versuffix_save
+	major=$major_save
+	release=$release_save
+	libname=$libname_save
+	name=$name_save
+
+	case $host in
+	*-*-rhapsody* | *-*-darwin1.[012])
+	  # On Rhapsody replace the C library is the System framework
+	  newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	  ;;
+	esac
+
+	if test "$droppeddeps" = yes; then
+	  if test "$module" = yes; then
+	    echo
+	    echo "*** Warning: libtool could not satisfy all declared inter-library"
+	    echo "*** dependencies of module $libname.  Therefore, libtool will create"
+	    echo "*** a static module, that should work as long as the dlopening"
+	    echo "*** application is linked with the -dlopen flag."
+	    if test -z "$global_symbol_pipe"; then
+	      echo
+	      echo "*** However, this would only work if libtool was able to extract symbol"
+	      echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+	      echo "*** not find such a program.  So, this module is probably useless."
+	      echo "*** \`nm' from GNU binutils and a full rebuild may help."
+	    fi
+	    if test "$build_old_libs" = no; then
+	      oldlibs="$output_objdir/$libname.$libext"
+	      build_libtool_libs=module
+	      build_old_libs=yes
+	    else
+	      build_libtool_libs=no
+	    fi
+	  else
+	    echo "*** The inter-library dependencies that have been dropped here will be"
+	    echo "*** automatically added whenever a program is linked with this library"
+	    echo "*** or is declared to -dlopen it."
+
+	    if test $allow_undefined = no; then
+	      echo
+	      echo "*** Since this library must not contain undefined symbols,"
+	      echo "*** because either the platform does not support them or"
+	      echo "*** it was explicitly requested with -no-undefined,"
+	      echo "*** libtool will only create a static version of it."
+	      if test "$build_old_libs" = no; then
+		oldlibs="$output_objdir/$libname.$libext"
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  fi
+	fi
+	# Done checking deplibs!
+	deplibs=$newdeplibs
+      fi
+
+      # All the library-specific variables (install_libdir is set above).
+      library_names=
+      old_library=
+      dlname=
+
+      # Test again, we may have decided not to build it any more
+      if test "$build_libtool_libs" = yes; then
+	if test $hardcode_into_libs = yes; then
+	  # Hardcode the library paths
+	  hardcode_libdirs=
+	  dep_rpath=
+	  rpath="$finalize_rpath"
+	  test "$mode" != relink && rpath="$compile_rpath$rpath"
+	  for libdir in $rpath; do
+	    if test -n "$hardcode_libdir_flag_spec"; then
+	      if test -n "$hardcode_libdir_separator"; then
+		if test -z "$hardcode_libdirs"; then
+		  hardcode_libdirs="$libdir"
+		else
+		  # Just accumulate the unique libdirs.
+		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		    ;;
+		  *)
+		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		    ;;
+		  esac
+		fi
+	      else
+		eval flag=\"$hardcode_libdir_flag_spec\"
+		dep_rpath="$dep_rpath $flag"
+	      fi
+	    elif test -n "$runpath_var"; then
+	      case "$perm_rpath " in
+	      *" $libdir "*) ;;
+	      *) perm_rpath="$perm_rpath $libdir" ;;
+	      esac
+	    fi
+	  done
+	  # Substitute the hardcoded libdirs into the rpath.
+	  if test -n "$hardcode_libdir_separator" &&
+	     test -n "$hardcode_libdirs"; then
+	    libdir="$hardcode_libdirs"
+	    eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+	  fi
+	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
+	    # We should set the runpath_var.
+	    rpath=
+	    for dir in $perm_rpath; do
+	      rpath="$rpath$dir:"
+	    done
+	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+	  fi
+	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+	fi
+
+	shlibpath="$finalize_shlibpath"
+	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+	if test -n "$shlibpath"; then
+	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+	fi
+
+	# Get the real and link names of the library.
+	eval library_names=\"$library_names_spec\"
+	set dummy $library_names
+	realname="$2"
+	shift; shift
+
+	if test -n "$soname_spec"; then
+	  eval soname=\"$soname_spec\"
+	else
+	  soname="$realname"
+	fi
+	test -z "$dlname" && dlname=$soname
+
+	lib="$output_objdir/$realname"
+	for link
+	do
+	  linknames="$linknames $link"
+	done
+
+	# Ensure that we have .o objects for linkers which dislike .lo
+	# (e.g. aix) in case we are running --disable-static
+	for obj in $libobjs; do
+	  xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+	  if test "X$xdir" = "X$obj"; then
+	    xdir="."
+	  else
+	    xdir="$xdir"
+	  fi
+	  baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+	  oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
+	  if test ! -f $xdir/$oldobj; then
+	    $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
+	    $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
+	  fi
+	done
+
+	# Use standard objects if they are pic
+	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+
+	# Prepare the list of exported symbols
+	if test -z "$export_symbols"; then
+	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+	    $show "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $run $rm $export_symbols
+	    eval cmds=\"$export_symbols_cmds\"
+	    save_ifs="$IFS"; IFS='~'
+	    for cmd in $cmds; do
+	      IFS="$save_ifs"
+	      $show "$cmd"
+	      $run eval "$cmd" || exit $?
+	    done
+	    IFS="$save_ifs"
+	    if test -n "$export_symbols_regex"; then
+	      $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+	      $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
+	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
+	    fi
+	  fi
+	fi
+
+	if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
+	fi
+
+	if test -n "$convenience"; then
+	  if test -n "$whole_archive_flag_spec"; then
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	  else
+	    gentop="$output_objdir/${outputname}x"
+	    $show "${rm}r $gentop"
+	    $run ${rm}r "$gentop"
+	    $show "mkdir $gentop"
+	    $run mkdir "$gentop"
+	    status=$?
+	    if test $status -ne 0 && test ! -d "$gentop"; then
+	      exit $status
+	    fi
+	    generated="$generated $gentop"
+
+	    for xlib in $convenience; do
+	      # Extract the objects.
+	      case $xlib in
+	      [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+	      *) xabs=`pwd`"/$xlib" ;;
+	      esac
+	      xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+	      xdir="$gentop/$xlib"
+
+	      $show "${rm}r $xdir"
+	      $run ${rm}r "$xdir"
+	      $show "mkdir $xdir"
+	      $run mkdir "$xdir"
+	      status=$?
+	      if test $status -ne 0 && test ! -d "$xdir"; then
+		exit $status
+	      fi
+	      $show "(cd $xdir && $AR x $xabs)"
+	      $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+
+	      libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
+	    done
+	  fi
+	fi
+
+	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+	  eval flag=\"$thread_safe_flag_spec\"
+	  linker_flags="$linker_flags $flag"
+	fi
+
+	# Make a backup of the uninstalled library when relinking
+	if test "$mode" = relink; then
+	  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
+	fi
+
+	# Do each of the archive commands.
+	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	  eval cmds=\"$archive_expsym_cmds\"
+	else
+	  eval cmds=\"$archive_cmds\"
+	fi
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  $show "$cmd"
+	  $run eval "$cmd" || exit $?
+	done
+	IFS="$save_ifs"
+
+	# Restore the uninstalled library and exit
+	if test "$mode" = relink; then
+	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
+	  exit 0
+	fi
+
+	# Create links to the real library.
+	for linkname in $linknames; do
+	  if test "$realname" != "$linkname"; then
+	    $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
+	    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
+	  fi
+	done
+
+	# If -module or -export-dynamic was specified, set the dlname.
+	if test "$module" = yes || test "$export_dynamic" = yes; then
+	  # On all known operating systems, these are identical.
+	  dlname="$soname"
+	fi
+      fi
+      ;;
+
+    obj)
+      if test -n "$deplibs"; then
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+	$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+	$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
+      fi
+
+      case $output in
+      *.lo)
+	if test -n "$objs$old_deplibs"; then
+	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
+	  exit 1
+	fi
+	libobj="$output"
+	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
+	;;
+      *)
+	libobj=
+	obj="$output"
+	;;
+      esac
+
+      # Delete the old objects.
+      $run $rm $obj $libobj
+
+      # Objects from convenience libraries.  This assumes
+      # single-version convenience libraries.  Whenever we create
+      # different ones for PIC/non-PIC, this we'll have to duplicate
+      # the extraction.
+      reload_conv_objs=
+      gentop=
+      # reload_cmds runs $LD directly, so let us get rid of
+      # -Wl from whole_archive_flag_spec
+      wl=
+
+      if test -n "$convenience"; then
+	if test -n "$whole_archive_flag_spec"; then
+	  eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+	else
+	  gentop="$output_objdir/${obj}x"
+	  $show "${rm}r $gentop"
+	  $run ${rm}r "$gentop"
+	  $show "mkdir $gentop"
+	  $run mkdir "$gentop"
+	  status=$?
+	  if test $status -ne 0 && test ! -d "$gentop"; then
+	    exit $status
+	  fi
+	  generated="$generated $gentop"
+
+	  for xlib in $convenience; do
+	    # Extract the objects.
+	    case $xlib in
+	    [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+	    *) xabs=`pwd`"/$xlib" ;;
+	    esac
+	    xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+	    xdir="$gentop/$xlib"
+
+	    $show "${rm}r $xdir"
+	    $run ${rm}r "$xdir"
+	    $show "mkdir $xdir"
+	    $run mkdir "$xdir"
+	    status=$?
+	    if test $status -ne 0 && test ! -d "$xdir"; then
+	      exit $status
+	    fi
+	    $show "(cd $xdir && $AR x $xabs)"
+	    $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+
+	    reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
+	  done
+	fi
+      fi
+
+      # Create the old-style object.
+      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+      output="$obj"
+      eval cmds=\"$reload_cmds\"
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+
+      # Exit if we aren't doing a library object file.
+      if test -z "$libobj"; then
+	if test -n "$gentop"; then
+	  $show "${rm}r $gentop"
+	  $run ${rm}r $gentop
+	fi
+
+	exit 0
+      fi
+
+      if test "$build_libtool_libs" != yes; then
+	if test -n "$gentop"; then
+	  $show "${rm}r $gentop"
+	  $run ${rm}r $gentop
+	fi
+
+	# Create an invalid libtool object if no PIC, so that we don't
+	# accidentally link it into a program.
+	$show "echo timestamp > $libobj"
+	$run eval "echo timestamp > $libobj" || exit $?
+	exit 0
+      fi
+
+      if test -n "$pic_flag" || test "$pic_mode" != default; then
+	# Only do commands if we really have different PIC objects.
+	reload_objs="$libobjs $reload_conv_objs"
+	output="$libobj"
+	eval cmds=\"$reload_cmds\"
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  $show "$cmd"
+	  $run eval "$cmd" || exit $?
+	done
+	IFS="$save_ifs"
+      else
+	# Just create a symlink.
+	$show $rm $libobj
+	$run $rm $libobj
+	xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
+	if test "X$xdir" = "X$libobj"; then
+	  xdir="."
+	else
+	  xdir="$xdir"
+	fi
+	baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
+	oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
+	$show "(cd $xdir && $LN_S $oldobj $baseobj)"
+	$run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
+      fi
+
+      if test -n "$gentop"; then
+	$show "${rm}r $gentop"
+	$run ${rm}r $gentop
+      fi
+
+      exit 0
+      ;;
+
+    prog)
+      case $host in
+	*cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
+      esac
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
+      fi
+
+      if test "$preload" = yes; then
+	if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
+	   test "$dlopen_self_static" = unknown; then
+	  $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
+	fi
+      fi
+
+      case $host in
+      *-*-rhapsody* | *-*-darwin1.[012])
+	# On Rhapsody replace the C library is the System framework
+	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	;;
+      esac
+
+      compile_command="$compile_command $compile_deplibs"
+      finalize_command="$finalize_command $finalize_deplibs"
+
+      if test -n "$rpath$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	for libdir in $rpath $xrpath; do
+	  # This is the magic to use -rpath.
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+      fi
+
+      # Now hardcode the library paths
+      rpath=
+      hardcode_libdirs=
+      for libdir in $compile_rpath $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) perm_rpath="$perm_rpath $libdir" ;;
+	  esac
+	fi
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  case :$dllsearchpath: in
+	  *":$libdir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$libdir";;
+	  esac
+	  ;;
+	esac
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      compile_rpath="$rpath"
+
+      rpath=
+      hardcode_libdirs=
+      for libdir in $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$finalize_perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+	  esac
+	fi
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      finalize_rpath="$rpath"
+
+      if test -n "$libobjs" && test "$build_old_libs" = yes; then
+	# Transform all the library objects into standard objects.
+	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+      fi
+
+      dlsyms=
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	if test -n "$NM" && test -n "$global_symbol_pipe"; then
+	  dlsyms="${outputname}S.c"
+	else
+	  $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
+	fi
+      fi
+
+      if test -n "$dlsyms"; then
+	case $dlsyms in
+	"") ;;
+	*.c)
+	  # Discover the nlist of each of the dlfiles.
+	  nlist="$output_objdir/${outputname}.nm"
+
+	  $show "$rm $nlist ${nlist}S ${nlist}T"
+	  $run $rm "$nlist" "${nlist}S" "${nlist}T"
+
+	  # Parse the name list into a source file.
+	  $show "creating $output_objdir/$dlsyms"
+
+	  test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* Prevent the only kind of declaration conflicts we can make. */
+#define lt_preloaded_symbols some_other_symbol
+
+/* External symbol declarations for the compiler. */\
+"
+
+	  if test "$dlself" = yes; then
+	    $show "generating symbol list for \`$output'"
+
+	    test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
+
+	    # Add our own program objects to the symbol list.
+	    progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	    for arg in $progfiles; do
+	      $show "extracting global C symbols from \`$arg'"
+	      $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+	    done
+
+	    if test -n "$exclude_expsyms"; then
+	      $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+	      $run eval '$mv "$nlist"T "$nlist"'
+	    fi
+
+	    if test -n "$export_symbols_regex"; then
+	      $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+	      $run eval '$mv "$nlist"T "$nlist"'
+	    fi
+
+	    # Prepare the list of exported symbols
+	    if test -z "$export_symbols"; then
+	      export_symbols="$output_objdir/$output.exp"
+	      $run $rm $export_symbols
+	      $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+	    else
+	      $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
+	      $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
+	      $run eval 'mv "$nlist"T "$nlist"'
+	    fi
+	  fi
+
+	  for arg in $dlprefiles; do
+	    $show "extracting global C symbols from \`$arg'"
+	    name=`echo "$arg" | sed -e 's%^.*/%%'`
+	    $run eval 'echo ": $name " >> "$nlist"'
+	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+	  done
+
+	  if test -z "$run"; then
+	    # Make sure we have at least an empty file.
+	    test -f "$nlist" || : > "$nlist"
+
+	    if test -n "$exclude_expsyms"; then
+	      egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+	      $mv "$nlist"T "$nlist"
+	    fi
+
+	    # Try sorting and uniquifying the output.
+	    if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
+	      :
+	    else
+	      grep -v "^: " < "$nlist" > "$nlist"S
+	    fi
+
+	    if test -f "$nlist"S; then
+	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
+	    else
+	      echo '/* NONE */' >> "$output_objdir/$dlsyms"
+	    fi
+
+	    $echo >> "$output_objdir/$dlsyms" "\
+
+#undef lt_preloaded_symbols
+
+#if defined (__STDC__) && __STDC__
+# define lt_ptr void *
+#else
+# define lt_ptr char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr address;
+}
+lt_preloaded_symbols[] =
+{\
+"
+
+	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
+
+	    $echo >> "$output_objdir/$dlsyms" "\
+  {0, (lt_ptr) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+	  fi
+
+	  pic_flag_for_symtable=
+	  case $host in
+	  # compiling the symbol table file with pic_flag works around
+	  # a FreeBSD bug that causes programs to crash when -lm is
+	  # linked before any other PIC object.  But we must not use
+	  # pic_flag when linking with -static.  The problem exists in
+	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+	    case "$compile_command " in
+	    *" -static "*) ;;
+	    *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
+	    esac;;
+	  *-*-hpux*)
+	    case "$compile_command " in
+	    *" -static "*) ;;
+	    *) pic_flag_for_symtable=" $pic_flag -DPIC";;
+	    esac
+	  esac
+
+	  # Now compile the dynamic symbol file.
+	  $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+	  $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+
+	  # Clean up the generated files.
+	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
+	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
+
+	  # Transform the symbol file into the correct name.
+	  compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+	  finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+	  ;;
+	*)
+	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+	  exit 1
+	  ;;
+	esac
+      else
+	# We keep going just in case the user didn't refer to
+	# lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
+	# really was required.
+
+	# Nullify the symbol file.
+	compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+	finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+      fi
+
+      if test $need_relink = no || test "$build_libtool_libs" != yes; then
+	# Replace the output file specification.
+	compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	link_command="$compile_command$compile_rpath"
+
+	# We have no uninstalled library dependencies, so finalize right now.
+	$show "$link_command"
+	$run eval "$link_command"
+	status=$?
+
+	# Delete the generated files.
+	if test -n "$dlsyms"; then
+	  $show "$rm $output_objdir/${outputname}S.${objext}"
+	  $run $rm "$output_objdir/${outputname}S.${objext}"
+	fi
+
+	exit $status
+      fi
+
+      if test -n "$shlibpath_var"; then
+	# We should set the shlibpath_var
+	rpath=
+	for dir in $temp_rpath; do
+	  case $dir in
+	  [\\/]* | [A-Za-z]:[\\/]*)
+	    # Absolute path.
+	    rpath="$rpath$dir:"
+	    ;;
+	  *)
+	    # Relative path: add a thisdir entry.
+	    rpath="$rpath\$thisdir/$dir:"
+	    ;;
+	  esac
+	done
+	temp_rpath="$rpath"
+      fi
+
+      if test -n "$compile_shlibpath$finalize_shlibpath"; then
+	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+      fi
+      if test -n "$finalize_shlibpath"; then
+	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+      fi
+
+      compile_var=
+      finalize_var=
+      if test -n "$runpath_var"; then
+	if test -n "$perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+	if test -n "$finalize_perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $finalize_perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+      fi
+
+      if test "$no_install" = yes; then
+	# We don't need to create a wrapper script.
+	link_command="$compile_var$compile_command$compile_rpath"
+	# Replace the output file specification.
+	link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	# Delete the old output file.
+	$run $rm $output
+	# Link the executable and exit
+	$show "$link_command"
+	$run eval "$link_command" || exit $?
+	exit 0
+      fi
+
+      if test "$hardcode_action" = relink; then
+	# Fast installation is not supported
+	link_command="$compile_var$compile_command$compile_rpath"
+	relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+	$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
+	$echo "$modename: \`$output' will be relinked during installation" 1>&2
+      else
+	if test "$fast_install" != no; then
+	  link_command="$finalize_var$compile_command$finalize_rpath"
+	  if test "$fast_install" = yes; then
+	    relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+	  else
+	    # fast_install is set to needless
+	    relink_command=
+	  fi
+	else
+	  link_command="$compile_var$compile_command$compile_rpath"
+	  relink_command="$finalize_var$finalize_command$finalize_rpath"
+	fi
+      fi
+
+      # Replace the output file specification.
+      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+      # Delete the old output files.
+      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+      $show "$link_command"
+      $run eval "$link_command" || exit $?
+
+      # Now create the wrapper script.
+      $show "creating $output"
+
+      # Quote the relink command for shipping.
+      if test -n "$relink_command"; then
+	# Preserve any variables that may affect compiler behavior
+	for var in $variables_saved_for_relink; do
+	  if eval test -z \"\${$var+set}\"; then
+	    relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+	  elif eval var_value=\$$var; test -z "$var_value"; then
+	    relink_command="$var=; export $var; $relink_command"
+	  else
+	    var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+	    relink_command="$var=\"$var_value\"; export $var; $relink_command"
+	  fi
+	done
+	relink_command="cd `pwd`; $relink_command"
+	relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Quote $echo for shipping.
+      if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
+	case $0 in
+	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
+	*) qecho="$SHELL `pwd`/$0 --fallback-echo";;
+	esac
+	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
+      else
+	qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if our run command is non-null.
+      if test -z "$run"; then
+	# win32 will think the script is a binary if it has
+	# a .exe suffix, so we strip it off here.
+	case $output in
+	  *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
+	esac
+	# test for cygwin because mv fails w/o .exe extensions
+	case $host in
+	  *cygwin*) exeext=.exe ;;
+	  *) exeext= ;;
+	esac
+	$rm $output
+	trap "$rm $output; exit 1" 1 2 15
+
+	$echo > $output "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+  # install mode needs the following variable:
+  notinst_deplibs='$notinst_deplibs'
+else
+  # When we are sourced in execute mode, \$file and \$echo are already set.
+  if test \"\$libtool_execute_magic\" != \"$magic\"; then
+    echo=\"$qecho\"
+    file=\"\$0\"
+    # Make sure echo works.
+    if test \"X\$1\" = X--no-reexec; then
+      # Discard the --no-reexec flag, and continue.
+      shift
+    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
+      # Yippee, \$echo works!
+      :
+    else
+      # Restart under the correct shell, and then maybe \$echo will work.
+      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+    fi
+  fi\
+"
+	$echo >> $output "\
+
+  # Find the directory that this script lives in.
+  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+  # Follow symbolic links until we get to the real thisdir.
+  file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
+  while test -n \"\$file\"; do
+    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+    # If there was a directory component, then change thisdir.
+    if test \"x\$destdir\" != \"x\$file\"; then
+      case \"\$destdir\" in
+      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+      *) thisdir=\"\$thisdir/\$destdir\" ;;
+      esac
+    fi
+
+    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
+  done
+
+  # Try to get the absolute directory name.
+  absdir=\`cd \"\$thisdir\" && pwd\`
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+	if test "$fast_install" = yes; then
+	  echo >> $output "\
+  program=lt-'$outputname'$exeext
+  progdir=\"\$thisdir/$objdir\"
+
+  if test ! -f \"\$progdir/\$program\" || \\
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
+       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+    file=\"\$\$-\$program\"
+
+    if test ! -d \"\$progdir\"; then
+      $mkdir \"\$progdir\"
+    else
+      $rm \"\$progdir/\$file\"
+    fi"
+
+	  echo >> $output "\
+
+    # relink executable if necessary
+    if test -n \"\$relink_command\"; then
+      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+      else
+	$echo \"\$relink_command_output\" >&2
+	$rm \"\$progdir/\$file\"
+	exit 1
+      fi
+    fi
+
+    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+    { $rm \"\$progdir/\$program\";
+      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+    $rm \"\$progdir/\$file\"
+  fi"
+	else
+	  echo >> $output "\
+  program='$outputname'
+  progdir=\"\$thisdir/$objdir\"
+"
+	fi
+
+	echo >> $output "\
+
+  if test -f \"\$progdir/\$program\"; then"
+
+	# Export our shlibpath_var if we have one.
+	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+	  $echo >> $output "\
+    # Add our own library path to $shlibpath_var
+    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+    # Some systems cannot cope with colon-terminated $shlibpath_var
+    # The second colon is a workaround for a bug in BeOS R4 sed
+    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+    export $shlibpath_var
+"
+	fi
+
+	# fixup the dll searchpath if we need to.
+	if test -n "$dllsearchpath"; then
+	  $echo >> $output "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+	fi
+
+	$echo >> $output "\
+    if test \"\$libtool_execute_magic\" != \"$magic\"; then
+      # Run the actual program with our arguments.
+"
+	case $host in
+	# win32 systems need to use the prog path for dll
+	# lookup to work
+	*-*-cygwin* | *-*-pw32*)
+	  $echo >> $output "\
+      exec \$progdir/\$program \${1+\"\$@\"}
+"
+	  ;;
+
+	# Backslashes separate directories on plain windows
+	*-*-mingw | *-*-os2*)
+	  $echo >> $output "\
+      exec \$progdir\\\\\$program \${1+\"\$@\"}
+"
+	  ;;
+
+	*)
+	  $echo >> $output "\
+      # Export the path to the program.
+      PATH=\"\$progdir:\$PATH\"
+      export PATH
+
+      exec \$program \${1+\"\$@\"}
+"
+	  ;;
+	esac
+	$echo >> $output "\
+      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
+      exit 1
+    fi
+  else
+    # The program doesn't exist.
+    \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
+    \$echo \"This script is just a wrapper for \$program.\" 1>&2
+    echo \"See the $PACKAGE documentation for more information.\" 1>&2
+    exit 1
+  fi
+fi\
+"
+	chmod +x $output
+      fi
+      exit 0
+      ;;
+    esac
+
+    # See if we need to build an old-fashioned archive.
+    for oldlib in $oldlibs; do
+
+      if test "$build_libtool_libs" = convenience; then
+	oldobjs="$libobjs_save"
+	addlibs="$convenience"
+	build_libtool_libs=no
+      else
+	if test "$build_libtool_libs" = module; then
+	  oldobjs="$libobjs_save"
+	  build_libtool_libs=no
+	else
+	  oldobjs="$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
+	fi
+	addlibs="$old_convenience"
+      fi
+
+      if test -n "$addlibs"; then
+	gentop="$output_objdir/${outputname}x"
+	$show "${rm}r $gentop"
+	$run ${rm}r "$gentop"
+	$show "mkdir $gentop"
+	$run mkdir "$gentop"
+	status=$?
+	if test $status -ne 0 && test ! -d "$gentop"; then
+	  exit $status
+	fi
+	generated="$generated $gentop"
+
+	# Add in members from convenience archives.
+	for xlib in $addlibs; do
+	  # Extract the objects.
+	  case $xlib in
+	  [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+	  *) xabs=`pwd`"/$xlib" ;;
+	  esac
+	  xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+	  xdir="$gentop/$xlib"
+
+	  $show "${rm}r $xdir"
+	  $run ${rm}r "$xdir"
+	  $show "mkdir $xdir"
+	  $run mkdir "$xdir"
+	  status=$?
+	  if test $status -ne 0 && test ! -d "$xdir"; then
+	    exit $status
+	  fi
+	  $show "(cd $xdir && $AR x $xabs)"
+	  $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+
+	  oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
+	done
+      fi
+
+      # Do each command in the archive commands.
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+	eval cmds=\"$old_archive_from_new_cmds\"
+      else
+	# Ensure that we have .o objects in place in case we decided
+	# not to build a shared library, and have fallen back to building
+	# static libs even though --disable-static was passed!
+	for oldobj in $oldobjs; do
+	  if test ! -f $oldobj; then
+	    xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
+	    if test "X$xdir" = "X$oldobj"; then
+	      xdir="."
+	    else
+	      xdir="$xdir"
+	    fi
+	    baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
+	    obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
+	    $show "(cd $xdir && ${LN_S} $obj $baseobj)"
+	    $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
+	  fi
+	done
+
+	eval cmds=\"$old_archive_cmds\"
+      fi
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$generated"; then
+      $show "${rm}r$generated"
+      $run ${rm}r$generated
+    fi
+
+    # Now create the libtool archive.
+    case $output in
+    *.la)
+      old_library=
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      $show "creating $output"
+
+      # Preserve any variables that may affect compiler behavior
+      for var in $variables_saved_for_relink; do
+	if eval test -z \"\${$var+set}\"; then
+	  relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+	elif eval var_value=\$$var; test -z "$var_value"; then
+	  relink_command="$var=; export $var; $relink_command"
+	else
+	  var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+	  relink_command="$var=\"$var_value\"; export $var; $relink_command"
+	fi
+      done
+      # Quote the link command for shipping.
+      relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
+      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+
+      # Only create the output if not a dry run.
+      if test -z "$run"; then
+	for installed in no yes; do
+	  if test "$installed" = yes; then
+	    if test -z "$install_libdir"; then
+	      break
+	    fi
+	    output="$output_objdir/$outputname"i
+	    # Replace all uninstalled libtool libraries with the installed ones
+	    newdependency_libs=
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      *.la)
+		name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
+		eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		if test -z "$libdir"; then
+		  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+		  exit 1
+		fi
+		newdependency_libs="$newdependency_libs $libdir/$name"
+		;;
+	      *) newdependency_libs="$newdependency_libs $deplib" ;;
+	      esac
+	    done
+	    dependency_libs="$newdependency_libs"
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+	      eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+	      if test -z "$libdir"; then
+		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+		exit 1
+	      fi
+	      newdlfiles="$newdlfiles $libdir/$name"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+	      eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+	      if test -z "$libdir"; then
+		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+		exit 1
+	      fi
+	      newdlprefiles="$newdlprefiles $libdir/$name"
+	    done
+	    dlprefiles="$newdlprefiles"
+	  fi
+	  $rm $output
+	  # place dlname in correct position for cygwin
+	  tdlname=$dlname
+	  case $host,$output,$installed,$module,$dlname in
+	    *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+	  esac
+	  $echo > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+	  if test "$installed" = no && test $need_relink = yes; then
+	    $echo >> $output "\
+relink_command=\"$relink_command\""
+	  fi
+	done
+      fi
+
+      # Do a symbolic link so that the libtool archive can be found in
+      # LD_LIBRARY_PATH before the program is installed.
+      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
+      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
+      ;;
+    esac
+    exit 0
+    ;;
+
+  # libtool install mode
+  install)
+    modename="$modename: install"
+
+    # There may be an optional sh(1) argument at the beginning of
+    # install_prog (especially on Windows NT).
+    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+       # Allow the use of GNU shtool's install command.
+       $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
+      # Aesthetically quote it.
+      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+	arg="\"$arg\""
+	;;
+      esac
+      install_prog="$arg "
+      arg="$1"
+      shift
+    else
+      install_prog=
+      arg="$nonopt"
+    fi
+
+    # The real first argument should be the name of the installation program.
+    # Aesthetically quote it.
+    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+    case $arg in
+    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+      arg="\"$arg\""
+      ;;
+    esac
+    install_prog="$install_prog$arg"
+
+    # We need to accept at least all the BSD install flags.
+    dest=
+    files=
+    opts=
+    prev=
+    install_type=
+    isdir=no
+    stripme=
+    for arg
+    do
+      if test -n "$dest"; then
+	files="$files $dest"
+	dest="$arg"
+	continue
+      fi
+
+      case $arg in
+      -d) isdir=yes ;;
+      -f) prev="-f" ;;
+      -g) prev="-g" ;;
+      -m) prev="-m" ;;
+      -o) prev="-o" ;;
+      -s)
+	stripme=" -s"
+	continue
+	;;
+      -*) ;;
+
+      *)
+	# If the previous option needed an argument, then skip it.
+	if test -n "$prev"; then
+	  prev=
+	else
+	  dest="$arg"
+	  continue
+	fi
+	;;
+      esac
+
+      # Aesthetically quote the argument.
+      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+	arg="\"$arg\""
+	;;
+      esac
+      install_prog="$install_prog $arg"
+    done
+
+    if test -z "$install_prog"; then
+      $echo "$modename: you must specify an install program" 1>&2
+      $echo "$help" 1>&2
+      exit 1
+    fi
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prev' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit 1
+    fi
+
+    if test -z "$files"; then
+      if test -z "$dest"; then
+	$echo "$modename: no file or destination specified" 1>&2
+      else
+	$echo "$modename: you must specify a destination" 1>&2
+      fi
+      $echo "$help" 1>&2
+      exit 1
+    fi
+
+    # Strip any trailing slash from the destination.
+    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
+
+    # Check to see that the destination is a directory.
+    test -d "$dest" && isdir=yes
+    if test "$isdir" = yes; then
+      destdir="$dest"
+      destname=
+    else
+      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
+      test "X$destdir" = "X$dest" && destdir=.
+      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
+
+      # Not a directory, so check to see that there is only one file specified.
+      set dummy $files
+      if test $# -gt 2; then
+	$echo "$modename: \`$dest' is not a directory" 1>&2
+	$echo "$help" 1>&2
+	exit 1
+      fi
+    fi
+    case $destdir in
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
+    *)
+      for file in $files; do
+	case $file in
+	*.lo) ;;
+	*)
+	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
+	  $echo "$help" 1>&2
+	  exit 1
+	  ;;
+	esac
+      done
+      ;;
+    esac
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    staticlibs=
+    future_libdirs=
+    current_libdirs=
+    for file in $files; do
+
+      # Do each installation.
+      case $file in
+      *.$libext)
+	# Do the static libraries later.
+	staticlibs="$staticlibs $file"
+	;;
+
+      *.la)
+	# Check to see that this really is a libtool archive.
+	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
+	  $echo "$help" 1>&2
+	  exit 1
+	fi
+
+	library_names=
+	old_library=
+	relink_command=
+	# If there is no directory component, then add one.
+	case $file in
+	*/* | *\\*) . $file ;;
+	*) . ./$file ;;
+	esac
+
+	# Add the libdir to current_libdirs if it is the destination.
+	DESTDIR=
+	if test "X$destdir" = "X$libdir"; then
+	  case "$current_libdirs " in
+	  *" $libdir "*) ;;
+	  *) current_libdirs="$current_libdirs $libdir" ;;
+	  esac
+	else
+	  case "$destdir" in
+	    *"$libdir")
+	      DESTDIR=`$echo "$destdir" | sed -e 's!'"$libdir"'$!!'`
+	      if test "X$destdir" != "X$DESTDIR$libdir"; then
+		DESTDIR=
+	      fi
+	      ;;
+	  esac
+	  # Note the libdir as a future libdir.
+	  case "$future_libdirs " in
+	  *" $libdir "*) ;;
+	  *) future_libdirs="$future_libdirs $libdir" ;;
+	  esac
+	fi
+
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
+	test "X$dir" = "X$file/" && dir=
+	dir="$dir$objdir"
+
+	if test -n "$relink_command"; then
+	  $echo "$modename: warning: relinking \`$file'" 1>&2
+	  export DESTDIR
+	  $show "$relink_command"
+	  if $run eval "$relink_command"; then :
+	  else
+	    $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+	    continue
+	  fi
+	fi
+	unset DESTDIR
+
+	# See the names of the shared library.
+	set dummy $library_names
+	if test -n "$2"; then
+	  realname="$2"
+	  shift
+	  shift
+
+	  srcname="$realname"
+	  test -n "$relink_command" && srcname="$realname"T
+
+	  # Install the shared library and build the symlinks.
+	  $show "$install_prog $dir/$srcname $destdir/$realname"
+	  $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
+	  if test -n "$stripme" && test -n "$striplib"; then
+	    $show "$striplib $destdir/$realname"
+	    $run eval "$striplib $destdir/$realname" || exit $?
+	  fi
+
+	  if test $# -gt 0; then
+	    # Delete the old symlinks, and create new ones.
+	    for linkname
+	    do
+	      if test "$linkname" != "$realname"; then
+		$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+		$run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+	      fi
+	    done
+	  fi
+
+	  # Do each command in the postinstall commands.
+	  lib="$destdir/$realname"
+	  eval cmds=\"$postinstall_cmds\"
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $cmds; do
+	    IFS="$save_ifs"
+	    $show "$cmd"
+	    $run eval "$cmd" || exit $?
+	  done
+	  IFS="$save_ifs"
+	fi
+
+	# Install the pseudo-library for information purposes.
+	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	instname="$dir/$name"i
+	$show "$install_prog $instname $destdir/$name"
+	$run eval "$install_prog $instname $destdir/$name" || exit $?
+
+	# Maybe install the static library, too.
+	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+	;;
+
+      *.lo)
+	# Install (i.e. copy) a libtool object.
+
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	  destfile="$destdir/$destfile"
+	fi
+
+	# Deduce the name of the destination old-style object file.
+	case $destfile in
+	*.lo)
+	  staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
+	  ;;
+	*.$objext)
+	  staticdest="$destfile"
+	  destfile=
+	  ;;
+	*)
+	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
+	  $echo "$help" 1>&2
+	  exit 1
+	  ;;
+	esac
+
+	# Install the libtool object if requested.
+	if test -n "$destfile"; then
+	  $show "$install_prog $file $destfile"
+	  $run eval "$install_prog $file $destfile" || exit $?
+	fi
+
+	# Install the old object if enabled.
+	if test "$build_old_libs" = yes; then
+	  # Deduce the name of the old-style object file.
+	  staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
+
+	  $show "$install_prog $staticobj $staticdest"
+	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
+	fi
+	exit 0
+	;;
+
+      *)
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	  destfile="$destdir/$destfile"
+	fi
+
+	# Do a test to see if this is really a libtool program.
+	if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  notinst_deplibs=
+	  relink_command=
+
+	  # If there is no directory component, then add one.
+	  case $file in
+	  */* | *\\*) . $file ;;
+	  *) . ./$file ;;
+	  esac
+
+	  # Check the variables that should have been set.
+	  if test -z "$notinst_deplibs"; then
+	    $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
+	    exit 1
+	  fi
+
+	  finalize=yes
+	  for lib in $notinst_deplibs; do
+	    # Check to see that each library is installed.
+	    libdir=
+	    if test -f "$lib"; then
+	      # If there is no directory component, then add one.
+	      case $lib in
+	      */* | *\\*) . $lib ;;
+	      *) . ./$lib ;;
+	      esac
+	    fi
+	    libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+	    if test -n "$libdir" && test ! -f "$libfile"; then
+	      $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+	      finalize=no
+	    fi
+	  done
+
+	  relink_command=
+	  # If there is no directory component, then add one.
+	  case $file in
+	  */* | *\\*) . $file ;;
+	  *) . ./$file ;;
+	  esac
+
+	  outputname=
+	  if test "$fast_install" = no && test -n "$relink_command"; then
+	    if test "$finalize" = yes && test -z "$run"; then
+	      tmpdir="/tmp"
+	      test -n "$TMPDIR" && tmpdir="$TMPDIR"
+	      tmpdir="$tmpdir/libtool-$$"
+	      if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
+	      else
+		$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
+		continue
+	      fi
+	      file=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	      outputname="$tmpdir/$file"
+	      # Replace the output file specification.
+	      relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+	      $show "$relink_command"
+	      if $run eval "$relink_command"; then :
+	      else
+		$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+		${rm}r "$tmpdir"
+		continue
+	      fi
+	      file="$outputname"
+	    else
+	      $echo "$modename: warning: cannot relink \`$file'" 1>&2
+	    fi
+	  else
+	    # Install the binary that we compiled earlier.
+	    file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+	  fi
+	fi
+
+	# remove .exe since cygwin /usr/bin/install will append another
+	# one anyways
+	case $install_prog,$host in
+	/usr/bin/install*,*cygwin*)
+	  case $file:$destfile in
+	  *.exe:*.exe)
+	    # this is ok
+	    ;;
+	  *.exe:*)
+	    destfile=$destfile.exe
+	    ;;
+	  *:*.exe)
+	    destfile=`echo $destfile | sed -e 's,.exe$,,'`
+	    ;;
+	  esac
+	  ;;
+	esac
+	$show "$install_prog$stripme $file $destfile"
+	$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
+	test -n "$outputname" && ${rm}r "$tmpdir"
+	;;
+      esac
+    done
+
+    for file in $staticlibs; do
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+
+      # Set up the ranlib parameters.
+      oldlib="$destdir/$name"
+
+      $show "$install_prog $file $oldlib"
+      $run eval "$install_prog \$file \$oldlib" || exit $?
+
+      if test -n "$stripme" && test -n "$striplib"; then
+	$show "$old_striplib $oldlib"
+	$run eval "$old_striplib $oldlib" || exit $?
+      fi
+
+      # Do each command in the postinstall commands.
+      eval cmds=\"$old_postinstall_cmds\"
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$future_libdirs"; then
+      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
+    fi
+
+    if test -n "$current_libdirs"; then
+      # Maybe just do a dry run.
+      test -n "$run" && current_libdirs=" -n$current_libdirs"
+      exec_cmd='$SHELL $0 --finish$current_libdirs'
+    else
+      exit 0
+    fi
+    ;;
+
+  # libtool finish mode
+  finish)
+    modename="$modename: finish"
+    libdirs="$nonopt"
+    admincmds=
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      for dir
+      do
+	libdirs="$libdirs $dir"
+      done
+
+      for libdir in $libdirs; do
+	if test -n "$finish_cmds"; then
+	  # Do each command in the finish commands.
+	  eval cmds=\"$finish_cmds\"
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $cmds; do
+	    IFS="$save_ifs"
+	    $show "$cmd"
+	    $run eval "$cmd" || admincmds="$admincmds
+       $cmd"
+	  done
+	  IFS="$save_ifs"
+	fi
+	if test -n "$finish_eval"; then
+	  # Do the single finish_eval.
+	  eval cmds=\"$finish_eval\"
+	  $run eval "$cmds" || admincmds="$admincmds
+       $cmds"
+	fi
+      done
+    fi
+
+    # Exit here if they wanted silent mode.
+    test "$show" = ":" && exit 0
+
+    echo "----------------------------------------------------------------------"
+    echo "Libraries have been installed in:"
+    for libdir in $libdirs; do
+      echo "   $libdir"
+    done
+    echo
+    echo "If you ever happen to want to link against installed libraries"
+    echo "in a given directory, LIBDIR, you must either use libtool, and"
+    echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+    echo "flag during linking and do at least one of the following:"
+    if test -n "$shlibpath_var"; then
+      echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+      echo "     during execution"
+    fi
+    if test -n "$runpath_var"; then
+      echo "   - add LIBDIR to the \`$runpath_var' environment variable"
+      echo "     during linking"
+    fi
+    if test -n "$hardcode_libdir_flag_spec"; then
+      libdir=LIBDIR
+      eval flag=\"$hardcode_libdir_flag_spec\"
+
+      echo "   - use the \`$flag' linker flag"
+    fi
+    if test -n "$admincmds"; then
+      echo "   - have your system administrator run these commands:$admincmds"
+    fi
+    if test -f /etc/ld.so.conf; then
+      echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+    fi
+    echo
+    echo "See any operating system documentation about shared libraries for"
+    echo "more information, such as the ld(1) and ld.so(8) manual pages."
+    echo "----------------------------------------------------------------------"
+    exit 0
+    ;;
+
+  # libtool execute mode
+  execute)
+    modename="$modename: execute"
+
+    # The first argument is the command name.
+    cmd="$nonopt"
+    if test -z "$cmd"; then
+      $echo "$modename: you must specify a COMMAND" 1>&2
+      $echo "$help"
+      exit 1
+    fi
+
+    # Handle -dlopen flags immediately.
+    for file in $execute_dlfiles; do
+      if test ! -f "$file"; then
+	$echo "$modename: \`$file' is not a file" 1>&2
+	$echo "$help" 1>&2
+	exit 1
+      fi
+
+      dir=
+      case $file in
+      *.la)
+	# Check to see that this really is a libtool archive.
+	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+	  $echo "$help" 1>&2
+	  exit 1
+	fi
+
+	# Read the libtool library.
+	dlname=
+	library_names=
+
+	# If there is no directory component, then add one.
+	case $file in
+	*/* | *\\*) . $file ;;
+	*) . ./$file ;;
+	esac
+
+	# Skip this library if it cannot be dlopened.
+	if test -z "$dlname"; then
+	  # Warn if it was a shared library.
+	  test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
+	  continue
+	fi
+
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$dir" = "X$file" && dir=.
+
+	if test -f "$dir/$objdir/$dlname"; then
+	  dir="$dir/$objdir"
+	else
+	  $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+	  exit 1
+	fi
+	;;
+
+      *.lo)
+	# Just add the directory containing the .lo file.
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$dir" = "X$file" && dir=.
+	;;
+
+      *)
+	$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
+	continue
+	;;
+      esac
+
+      # Get the absolute pathname.
+      absdir=`cd "$dir" && pwd`
+      test -n "$absdir" && dir="$absdir"
+
+      # Now add the directory to shlibpath_var.
+      if eval "test -z \"\$$shlibpath_var\""; then
+	eval "$shlibpath_var=\"\$dir\""
+      else
+	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+      fi
+    done
+
+    # This variable tells wrapper scripts just to set shlibpath_var
+    # rather than running their programs.
+    libtool_execute_magic="$magic"
+
+    # Check if any of the arguments is a wrapper script.
+    args=
+    for file
+    do
+      case $file in
+      -*) ;;
+      *)
+	# Do a test to see if this is really a libtool program.
+	if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  # If there is no directory component, then add one.
+	  case $file in
+	  */* | *\\*) . $file ;;
+	  *) . ./$file ;;
+	  esac
+
+	  # Transform arg to wrapped name.
+	  file="$progdir/$program"
+	fi
+	;;
+      esac
+      # Quote arguments (to preserve shell metacharacters).
+      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
+      args="$args \"$file\""
+    done
+
+    if test -z "$run"; then
+      if test -n "$shlibpath_var"; then
+	# Export the shlibpath_var.
+	eval "export $shlibpath_var"
+      fi
+
+      # Restore saved enviroment variables
+      if test "${save_LC_ALL+set}" = set; then
+	LC_ALL="$save_LC_ALL"; export LC_ALL
+      fi
+      if test "${save_LANG+set}" = set; then
+	LANG="$save_LANG"; export LANG
+      fi
+
+      # Now prepare to actually exec the command.
+      exec_cmd='"$cmd"$args'
+    else
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+	eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
+	$echo "export $shlibpath_var"
+      fi
+      $echo "$cmd$args"
+      exit 0
+    fi
+    ;;
+
+  # libtool clean and uninstall mode
+  clean | uninstall)
+    modename="$modename: $mode"
+    rm="$nonopt"
+    files=
+    rmforce=
+    exit_status=0
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    for arg
+    do
+      case $arg in
+      -f) rm="$rm $arg"; rmforce=yes ;;
+      -*) rm="$rm $arg" ;;
+      *) files="$files $arg" ;;
+      esac
+    done
+
+    if test -z "$rm"; then
+      $echo "$modename: you must specify an RM program" 1>&2
+      $echo "$help" 1>&2
+      exit 1
+    fi
+
+    rmdirs=
+
+    for file in $files; do
+      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+      if test "X$dir" = "X$file"; then
+	dir=.
+	objdir="$objdir"
+      else
+	objdir="$dir/$objdir"
+      fi
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+      test $mode = uninstall && objdir="$dir"
+
+      # Remember objdir for removal later, being careful to avoid duplicates
+      if test $mode = clean; then
+	case " $rmdirs " in
+	  *" $objdir "*) ;;
+	  *) rmdirs="$rmdirs $objdir" ;;
+	esac
+      fi
+
+      # Don't error if the file doesn't exist and rm -f was used.
+      if (test -L "$file") >/dev/null 2>&1 \
+	|| (test -h "$file") >/dev/null 2>&1 \
+	|| test -f "$file"; then
+	:
+      elif test -d "$file"; then
+	exit_status=1
+	continue
+      elif test "$rmforce" = yes; then
+	continue
+      fi
+
+      rmfiles="$file"
+
+      case $name in
+      *.la)
+	# Possibly a libtool archive, so verify it.
+	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  . $dir/$name
+
+	  # Delete the libtool libraries and symlinks.
+	  for n in $library_names; do
+	    rmfiles="$rmfiles $objdir/$n"
+	  done
+	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+	  test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+
+	  if test $mode = uninstall; then
+	    if test -n "$library_names"; then
+	      # Do each command in the postuninstall commands.
+	      eval cmds=\"$postuninstall_cmds\"
+	      save_ifs="$IFS"; IFS='~'
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		$show "$cmd"
+		$run eval "$cmd"
+		if test $? != 0 && test "$rmforce" != yes; then
+		  exit_status=1
+		fi
+	      done
+	      IFS="$save_ifs"
+	    fi
+
+	    if test -n "$old_library"; then
+	      # Do each command in the old_postuninstall commands.
+	      eval cmds=\"$old_postuninstall_cmds\"
+	      save_ifs="$IFS"; IFS='~'
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		$show "$cmd"
+		$run eval "$cmd"
+		if test $? != 0 && test "$rmforce" != yes; then
+		  exit_status=1
+		fi
+	      done
+	      IFS="$save_ifs"
+	    fi
+	    # FIXME: should reinstall the best remaining shared library.
+	  fi
+	fi
+	;;
+
+      *.lo)
+	if test "$build_old_libs" = yes; then
+	  oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
+	  rmfiles="$rmfiles $dir/$oldobj"
+	fi
+	;;
+
+      *)
+	# Do a test to see if this is a libtool program.
+	if test $mode = clean &&
+	   (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  relink_command=
+	  . $dir/$file
+
+	  rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+	  if test "$fast_install" = yes && test -n "$relink_command"; then
+	    rmfiles="$rmfiles $objdir/lt-$name"
+	  fi
+	fi
+	;;
+      esac
+      $show "$rm $rmfiles"
+      $run $rm $rmfiles || exit_status=1
+    done
+
+    # Try to remove the ${objdir}s in the directories where we deleted files
+    for dir in $rmdirs; do
+      if test -d "$dir"; then
+	$show "rmdir $dir"
+	$run rmdir $dir >/dev/null 2>&1
+      fi
+    done
+
+    exit $exit_status
+    ;;
+
+  "")
+    $echo "$modename: you must specify a MODE" 1>&2
+    $echo "$generic_help" 1>&2
+    exit 1
+    ;;
+  esac
+
+  if test -z "$exec_cmd"; then
+    $echo "$modename: invalid operation mode \`$mode'" 1>&2
+    $echo "$generic_help" 1>&2
+    exit 1
+  fi
+fi # test -z "$show_help"
+
+if test -n "$exec_cmd"; then
+  eval exec $exec_cmd
+  exit 1
+fi
+
+# We need to display help for each of the modes.
+case $mode in
+"") $echo \
+"Usage: $modename [OPTION]... [MODE-ARG]...
+
+Provide generalized library-building support services.
+
+    --config          show all configuration variables
+    --debug           enable verbose shell tracing
+-n, --dry-run         display commands without modifying any files
+    --features        display basic configuration information and exit
+    --finish          same as \`--mode=finish'
+    --help            display this help message and exit
+    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
+    --quiet           same as \`--silent'
+    --silent          don't print informational messages
+    --version         print version information
+
+MODE must be one of the following:
+
+      clean           remove files from the build directory
+      compile         compile a source file into a libtool object
+      execute         automatically set library path, then run a program
+      finish          complete the installation of libtool libraries
+      install         install libraries or executables
+      link            create a library or an executable
+      uninstall       remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
+a more detailed description of MODE."
+  exit 0
+  ;;
+
+clean)
+  $echo \
+"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+compile)
+  $echo \
+"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
+  -prefer-pic       try to building PIC objects only
+  -prefer-non-pic   try to building non-PIC objects only
+  -static           always build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+  ;;
+
+execute)
+  $echo \
+"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+  -dlopen FILE      add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+  ;;
+
+finish)
+  $echo \
+"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges.  Use
+the \`--dry-run' option if you just want to see what would be executed."
+  ;;
+
+install)
+  $echo \
+"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command.  The first component should be
+either the \`install' or \`cp' program.
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+  ;;
+
+link)
+  $echo \
+"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+  -all-static       do not do any dynamic linking at all
+  -avoid-version    do not add a version suffix if possible
+  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
+  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+  -export-symbols SYMFILE
+		    try to export only the symbols listed in SYMFILE
+  -export-symbols-regex REGEX
+		    try to export only the symbols matching REGEX
+  -LLIBDIR          search LIBDIR for required installed libraries
+  -lNAME            OUTPUT-FILE requires the installed library libNAME
+  -module           build a library that can dlopened
+  -no-fast-install  disable the fast-install mode
+  -no-install       link a not-installable executable
+  -no-undefined     declare that a library does not refer to external symbols
+  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
+  -release RELEASE  specify package release information
+  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
+  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
+  -static           do not do any dynamic linking of libtool libraries
+  -version-info CURRENT[:REVISION[:AGE]]
+		    specify library version info [each variable defaults to 0]
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename.  Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+  ;;
+
+uninstall)
+  $echo \
+"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+*)
+  $echo "$modename: invalid operation mode \`$mode'" 1>&2
+  $echo "$help" 1>&2
+  exit 1
+  ;;
+esac
+
+echo
+$echo "Try \`$modename --help' for more information about other modes."
+
+exit 0
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/missing b/mod_gsoap/mod_gsoap-0.6/apache_13/missing
new file mode 100644
index 0000000..0a7fb5a
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/missing
@@ -0,0 +1,283 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+case "$1" in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing 0.3 - GNU automake"
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+  aclocal)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case "$f" in
+      *:*) touch_files="$touch_files "`echo "$f" |
+				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+	   sed 's/\.am$/.in/' |
+	   while read f; do touch "$f"; done
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f y.tab.h ]; then
+	echo >y.tab.h
+    fi
+    if [ ! -f y.tab.c ]; then
+	echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f lex.yy.c ]; then
+	echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+	 you modified a dependency of a manual page.  You may need the
+	 \`Help2man' package in order for those modifications to take
+	 effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+    fi
+    if [ -f "$file" ]; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo ".ab help2man is required to generate this page"
+	exit 1
+    fi
+    ;;
+
+  makeinfo)
+    if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
+       # We have makeinfo, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+    fi
+    touch $file
+    ;;
+
+  tar)
+    shift
+    if test -n "$run"; then
+      echo 1>&2 "ERROR: \`tar' requires --run"
+      exit 1
+    fi
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar ${1+"$@"} && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar ${1+"$@"} && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+	case "$firstarg" in
+	*o*)
+	    firstarg=`echo "$firstarg" | sed s/o//`
+	    tar "$firstarg" ${1+"$@"} && exit 0
+	    ;;
+	esac
+	case "$firstarg" in
+	*h*)
+	    firstarg=`echo "$firstarg" | sed s/h//`
+	    tar "$firstarg" ${1+"$@"} && exit 0
+	    ;;
+	esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+         system.  You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequirements for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/mkinstalldirs b/mod_gsoap/mod_gsoap-0.6/apache_13/mkinstalldirs
new file mode 100644
index 0000000..c77a2be
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/mkinstalldirs
@@ -0,0 +1,40 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+# $Id: mkinstalldirs,v 1.1.1.1 2005/02/11 21:22:32 dviner Exp $
+
+errstatus=0
+
+for file
+do
+   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+   shift
+
+   pathcomp=
+   for d
+   do
+     pathcomp="$pathcomp$d"
+     case "$pathcomp" in
+       -* ) pathcomp=./$pathcomp ;;
+     esac
+
+     if test ! -d "$pathcomp"; then
+        echo "mkdir $pathcomp"
+
+        mkdir "$pathcomp" || lasterr=$?
+
+        if test ! -d "$pathcomp"; then
+  	  errstatus=$lasterr
+        fi
+     fi
+
+     pathcomp="$pathcomp/"
+   done
+done
+
+exit $errstatus
+
+# mkinstalldirs ends here
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/.indent.pro b/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/.indent.pro
new file mode 100644
index 0000000..c327045
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/.indent.pro
@@ -0,0 +1,10 @@
+--braces-after-if-line 
+--indent-level4 
+-lp -di1 -nut -bli0 -npcs 
+-nsaf -nsaw -nsai
+-cdb -sc
+-nce
+--format-first-column-comments
+-Thandler_rec
+--line-length80
+--tab-size4
\ No newline at end of file
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/Makefile b/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/Makefile
new file mode 100644
index 0000000..51e97de
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/Makefile
@@ -0,0 +1,238 @@
+# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+#input for automake to generate mod_gsoap Makefile
+
+SHELL = /bin/sh
+
+srcdir = .
+top_srcdir = ..
+
+prefix = /usr/local
+exec_prefix = ${prefix}
+
+bindir = ${exec_prefix}/bin
+sbindir = ${exec_prefix}/sbin
+libexecdir = ${exec_prefix}/libexec
+datadir = ${prefix}/share
+sysconfdir = ${prefix}/etc
+sharedstatedir = ${prefix}/com
+localstatedir = ${prefix}/var
+libdir = ${exec_prefix}/lib
+infodir = ${prefix}/info
+mandir = ${prefix}/man
+includedir = ${prefix}/include
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/mod_gsoap
+pkglibdir = $(libdir)/mod_gsoap
+pkgincludedir = $(includedir)/mod_gsoap
+top_builddir = ..
+
+ACLOCAL = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run aclocal
+AUTOCONF = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run autoconf
+AUTOMAKE = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run automake
+AUTOHEADER = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run autoheader
+
+INSTALL = /usr/bin/ginstall -c
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = s,x,x,
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = i686-suse-linux
+build_triplet = i686-suse-linux
+host_alias = i686-suse-linux
+host_triplet = i686-suse-linux
+target_alias = i686-suse-linux
+target_triplet = i686-suse-linux
+AMTAR = ${SHELL} /home/aberger/apache_gsoap.0.0.5/missing --run tar
+APXS_CXX_OPTIONS = 
+AS = as
+AWK = gawk
+CC = gcc
+CPP = gcc -E
+CXX = g++
+CXXDEBUGDEFINES = -D_NDEBUG
+CXXFLAGS =  -O2
+DEPDIR = .deps
+DLLTOOL = dlltool
+ECHO = echo
+EXEEXT = 
+EXISTS_APXS = yes
+EXISTS_GSOAP = yes
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIBTOOL_DEPS = ./ltmain.sh
+LN_S = ln -s
+OBJDUMP = objdump
+OBJEXT = o
+PACKAGE = mod_gsoap
+RANLIB = ranlib
+STRIP = strip
+VERSION = 0.0.5
+am__include = include
+am__quote = 
+install_sh = /home/aberger/apache_gsoap.0.0.5/install-sh
+
+AM_CPPFLAGS = $(CXXDEBUGDEFINES)
+INCLUDES = -I$(top_builddir)
+
+noinst_SCRIPTS = mod_gsoap.so
+
+CLEANFILES = *~ *.o *.so
+subdir = mod_gsoap
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SCRIPTS = $(noinst_SCRIPTS)
+
+DIST_SOURCES =
+DIST_COMMON = Makefile.am Makefile.in
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .so
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  mod_gsoap/Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && \
+	  CONFIG_HEADERS= CONFIG_LINKS= \
+	  CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+uninstall-info-am:
+tags: TAGS
+TAGS:
+
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    $(mkinstalldirs) "$(distdir)/$$dir"; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    cp -pR $$d/$$file $(distdir) \
+	    || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS)
+
+installdirs:
+
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+
+distclean-am: clean-am distclean-generic distclean-libtool
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+uninstall-am: uninstall-info-am
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool uninstall uninstall-am uninstall-info-am
+
+
+.c.so:
+	apxs $(APXS_CXX_OPTIONS) -lgsoap++ $(INCLUDES) -c $< 
+	cp $@ `apxs -q LIBEXECDIR`
+
+mod_gsoap.so : mod_gsoap.c
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/Makefile.am b/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/Makefile.am
new file mode 100644
index 0000000..37ee31f
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/Makefile.am
@@ -0,0 +1,16 @@
+#input for automake to generate mod_gsoap Makefile
+
+AM_CPPFLAGS= $(CXXDEBUGDEFINES)
+INCLUDES=-I$(top_builddir)
+
+noinst_SCRIPTS=mod_gsoap.so
+
+.c.so:
+	apxs $(APXS_CXX_OPTIONS) -lgsoap++ $(INCLUDES) -c $< 
+	#cp $@ `apxs -q LIBEXECDIR`
+
+mod_gsoap.so : mod_gsoap.c
+
+CLEANFILES=*~ *.o *.so
+
+
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/Makefile.in b/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/Makefile.in
new file mode 100644
index 0000000..c845d63
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/Makefile.in
@@ -0,0 +1,238 @@
+# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+#input for automake to generate mod_gsoap Makefile
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
+AMTAR = @AMTAR@
+APXS_CXX_OPTIONS = @APXS_CXX_OPTIONS@
+AS = @AS@
+AWK = @AWK@
+CC = @CC@
+CPP = @CPP@
+CXX = @CXX@
+CXXDEBUGDEFINES = @CXXDEBUGDEFINES@
+CXXFLAGS = @CXXFLAGS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+ECHO = @ECHO@
+EXEEXT = @EXEEXT@
+EXISTS_APXS = @EXISTS_APXS@
+EXISTS_GSOAP = @EXISTS_GSOAP@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LN_S = @LN_S@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+STRIP = @STRIP@
+VERSION = @VERSION@
+am__include = @am__include@
+am__quote = @am__quote@
+install_sh = @install_sh@
+
+AM_CPPFLAGS = $(CXXDEBUGDEFINES)
+INCLUDES = -I$(top_builddir)
+
+noinst_SCRIPTS = mod_gsoap.so
+
+CLEANFILES = *~ *.o *.so
+subdir = mod_gsoap
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SCRIPTS = $(noinst_SCRIPTS)
+
+DIST_SOURCES =
+DIST_COMMON = Makefile.am Makefile.in
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .so
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  mod_gsoap/Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && \
+	  CONFIG_HEADERS= CONFIG_LINKS= \
+	  CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+uninstall-info-am:
+tags: TAGS
+TAGS:
+
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    $(mkinstalldirs) "$(distdir)/$$dir"; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    cp -pR $$d/$$file $(distdir) \
+	    || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS)
+
+installdirs:
+
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+
+distclean-am: clean-am distclean-generic distclean-libtool
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+uninstall-am: uninstall-info-am
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool uninstall uninstall-am uninstall-info-am
+
+
+.c.so:
+	apxs $(APXS_CXX_OPTIONS) -lgsoap++ $(INCLUDES) -c $< 
+	#cp $@ `apxs -q LIBEXECDIR`
+
+mod_gsoap.so : mod_gsoap.c
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/Makefile.tmpl b/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/Makefile.tmpl
new file mode 100644
index 0000000..c7959bd
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/Makefile.tmpl
@@ -0,0 +1,16 @@
+
+#Dependencies
+
+$(OBJS) $(OBJS_PIC): Makefile
+
+# DO NOT REMOVE
+mod_gsoap.o: mod_gsoap.c \
+ $(INCDIR)/httpd.h \
+ $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \
+ $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
+ $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \
+ $(INCDIR)/ap_alloc.h $(INCDIR)/buff.h $(INCDIR)/ap.h \
+ $(INCDIR)/util_uri.h $(INCDIR)/http_config.h \
+ $(INCDIR)/http_core.h $(INCDIR)/http_log.h \
+ $(INCDIR)/http_main.h $(INCDIR)/http_protocol.h \
+ $(INCDIR)/util_script.h
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/Makefile.ux b/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/Makefile.ux
new file mode 100644
index 0000000..3113765
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/Makefile.ux
@@ -0,0 +1,15 @@
+#input for automake to generate mod_gsoap Makefile
+
+all: mod_gsoap.so
+
+mod_gsoap.so : mod_gsoap.c ../../stdsoap2.h
+	apxs -Wc,-g -I.. -I../.. -c mod_gsoap.c 
+
+.PHONY: clean
+
+clean:
+	rm -f *~ *.o *.so
+
+distclean:
+	$(MAKE) clean
+
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/config/Configuration b/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/config/Configuration
new file mode 100644
index 0000000..8a8103f
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/config/Configuration
@@ -0,0 +1,454 @@
+# Config file for the Apache httpd.
+
+# Configuration.tmpl is the template for Configuration. Configuration should
+# be edited to select the modules to be included as well as various flags
+# for Makefile.
+
+# The template should only be changed when a new system or module is added,
+# or an existing one modified. This will also most likely require some minor
+# changes to Configure to recognize those changes.
+
+# There are 5 types of lines here:
+
+# '#' comments, distinguished by having a '#' as the first non-blank character
+#
+# Makefile options, such as CC=gcc, etc...
+#
+# Rules, distinguished by having "Rule" at the front. These are used to
+# control Configure's behavior as far as how to create Makefile.
+#
+# Module selection lines, distinguished by having 'AddModule' at the front.
+# These list the configured modules, in priority order (highest priority
+# last).  They're down at the bottom.
+#
+# Optional module selection lines, distinguished by having `%Module'
+# at the front.  These specify a module that is to be compiled in (but
+# not enabled).  The AddModule directive can be used to enable such a
+# module.  By default no such modules are defined.
+
+
+################################################################
+# Makefile configuration
+#
+# These are added to the general flags determined by Configure.
+# Edit these to work around Configure if needed. The EXTRA_* family
+# will be added to the regular Makefile flags. For example, if you
+# want to compile with -Wall, then add that to EXTRA_CFLAGS. These
+# will be added to whatever flags Configure determines as appropriate
+# and needed for your platform.
+#
+# You can also set the compiler (CC) and optimization (OPTIM) used here as
+# well.  Settings here have priority; If not set, Configure will attempt to
+# guess the C compiler, looking for gcc first, then cc.
+#
+# Optimization note: 
+# Be careful when adding optimization flags (like -O3 or -O6) on the OPTIM
+# entry, especially when using some GCC variants. Experience showed that using
+# these for compiling Apache is risky. If you don't want to see Apache dumping
+# core regularly then at most use -O or -O2.
+#
+# The EXTRA_DEPS can be used to add extra Makefile dependencies to external
+# files (for instance third-party libraries) for the httpd target. The effect
+# is that httpd is relinked when those files are changed.
+#
+EXTRA_CFLAGS=-g
+EXTRA_LDFLAGS=
+EXTRA_LIBS=-lpthread -lg++ -ldl
+EXTRA_INCLUDES=-I/home/aberger/apache_gsoap.0.0.5
+EXTRA_DEPS=
+
+#CC=
+#CPP=
+#OPTIM=
+#RANLIB=
+
+################################################################
+# Name of the installed Apache HTTP webserver.
+#
+#TARGET=
+
+################################################################
+# Dynamic Shared Object (DSO) support
+#
+# There is experimental support for compiling the Apache core and
+# the Apache modules into dynamic shared object (DSO) files for
+# maximum runtime flexibility.
+#
+# The Configure script currently has only limited built-in
+# knowledge on how to compile these DSO files because this is
+# heavily platform-dependent. The current state of supported and
+# explicitly unsupported platforms can be found in the file 
+# "htdocs/manual/dso.html", under "Supported Platforms".
+#
+# For other platforms where you want to use the DSO mechanism you
+# first have to make sure it supports the pragmatic dlopen()
+# system call and then you have to provide the appropriate
+# compiler and linker flags below to create the DSO files on your
+# particular platform.
+#
+# The placement of the Apache core into a DSO file is triggered
+# by the SHARED_CORE rule below while support for building
+# individual Apache Modules as DSO files and loading them under
+# runtime without recompilation is triggered by `SharedModule'
+# commands. To be able to use the latter one first enable the
+# module mod_so (see corresponding `AddModule' command below).
+# Then enable the DSO feature for particular modules individually
+# by replacing their `AddModule' command with `SharedModule' and
+# change the filename extension from `.o' to `.so'. 
+#
+# Sometimes the DSO files need to be linked against other shared
+# libraries to explicitly resolve symbols from them when the
+# httpd program not already contains references to them. For
+# instance when buidling mod_auth_db as a DSO you need to link
+# the DSO against the libdb explicity because the Apache kernel
+# has no references for this library. But the problem is that
+# this "chaining" is not supported on all platforms. Although one
+# usually can link a DSO against another DSO without linker
+# complains the linkage is not really done on these platforms.
+# So, when you receive "unresolved symbol" errors under runtime
+# when using the LoadModule directive for a particular module try
+# to enable the SHARED_CHAIN rule below.
+
+#CFLAGS_SHLIB=
+#LD_SHLIB=
+#LDFLAGS_SHLIB=
+#LDFLAGS_SHLIB_EXPORT=
+
+Rule SHARED_CORE=default
+Rule SHARED_CHAIN=default
+
+################################################################
+# Rules configuration
+#
+# These are used to let Configure know that we want certain
+# functions. The format is: Rule RULE=value
+#
+# At present, only the following RULES are known: WANTHSREGEX, SOCKS4,
+# SOCKS5, IRIXNIS, IRIXN32, PARANOID, and DEV_RANDOM.
+#
+# For all Rules except DEV_RANDOM, if set to "yes", then Configure knows
+# we want that capability and does what is required to add it in. If set
+# to "default" then Configure makes a "best guess"; if set to anything
+# else, or not present, then nothing is done.
+#
+# SOCKS4:
+#  If SOCKS4 is set to 'yes', be sure that you add the socks library
+#  location to EXTRA_LIBS, otherwise Configure will assume
+#  "-L/usr/local/lib -lsocks"
+#
+# SOCKS5:
+#  If SOCKS5 is set to 'yes', be sure that you add the socks5 library
+#  location to EXTRA_LIBS, otherwise Configure will assume
+#  "-L/usr/local/lib -lsocks5"
+#
+# IRIXNIS:
+#  Only takes effect if Configure determines that you are running
+#  SGI IRIX.  If you are using a (ancient) 4.x version of IRIX, you
+#  need this if you are using NIS and Apache needs access to it for
+#  things like mod_userdir.  This is not required on 5.x and later
+#  and you should not enable it on such systems.
+#
+# IRIXN32:
+#  If you are running a version of IRIX and Configure detects
+#  n32 libraries, it will use those instead of the o32 ones.
+#
+# PARANOID:
+#  New with version 1.3, during Configure modules can run
+#  pre-programmed shell commands in the same environment that
+#  Configure runs in. This allows modules to control how Configure
+#  works. Normally, Configure will simply note that a module
+#  is performing this function. If PARANOID is set to yes, it will
+#  actually print-out the code that the modules execute
+#
+# EXPAT:
+#  Include an Expat implementation into Apache for use by the
+#  modules. James Clark's Expat package (expat-lite) is bundled
+#  with Apache for the convenience of our users. The EXPAT rule
+#  determines which Expat implementation, if any, to use as follows:
+#
+#  Rule EXPAT=yes       : Use system Expat if available; otherwise
+#                         use bundled Expat (lib/expat-lite). If
+#                         neither exists the build will fail
+#  Rule EXPAT=no        : Don't include Expat at all
+#  Rule EXPAT=default   : If Expat can be found at the system or
+#                         in lib/expat-lite, use it; otherwise
+#                         skip it
+# 
+# CYGWIN_WINSOCK: 
+#  Use Win32 API system calls for socket communication instead 
+#  of Cygwin's POSIX.1 wrappers. This avoids the Cygwin specific
+#  implementation and uses the Win32 native calls. Should be faster
+#  and more reliable for high-load systems.  
+# 
+
+Rule SOCKS4=no
+Rule SOCKS5=no
+Rule IRIXNIS=no
+Rule IRIXN32=yes
+Rule PARANOID=no
+Rule EXPAT=default
+Rule CYGWIN_WINSOCK=no 
+
+# DEV_RANDOM:
+#  Note: this rule is only used when compiling mod_auth_digest.
+#  mod_auth_digest requires a cryptographically strong random seed for its
+#  random number generator. It knows two ways of getting this: 1) from
+#  a file or device (such as "/dev/random"), or 2) from the truerand
+#  library. If this rule is set to 'default' then Configure will choose
+#  to use /dev/random if it exists, else /dev/urandom if it exists,
+#  else the truerand library. To override this behaviour set DEV_RANDOM
+#  either to 'truerand' (to use the library) or to a device or file
+#  (e.g. '/dev/urandom'). If the truerand library is selected, Configure
+#  will assume "-L/usr/local/lib -lrand".
+Rule DEV_RANDOM=default
+
+# The following rules should be set automatically by Configure. However, if
+# they are not set by Configure (because we don't know the correct value for
+# your platform), or are set incorrectly, you may override them here.
+# If you have to do this, please let us know what you set and what your
+# platform is, by filling out a problem report form at the Apache web site:
+# <http://bugs.apache.org/>.  If your browser is forms-incapable, you
+# can get the information to us by sending mail to apache-bugs@apache.org.
+#
+# WANTHSREGEX:
+#  Apache requires a POSIX regex implementation. Henry Spencer's
+#  excellent regex package is included with Apache and can be used
+#  if desired. If your OS has a decent regex, you can elect to
+#  not use this one by setting WANTHSREGEX to 'no' or commenting
+#  out the Rule. The "default" action is "yes" unless overruled
+#  by OS specifics
+
+Rule WANTHSREGEX=default
+
+################################################################
+# Module configuration
+#
+# Modules are listed in reverse priority order --- the ones that come
+# later can override the behavior of those that come earlier.  This
+# can have visible effects; for instance, if UserDir followed Alias,
+# you couldn't alias out a particular user's home directory.
+
+# The configuration below is what we consider a decent default 
+# configuration.  If you want the functionality provided by a particular
+# module, remove the "#" sign at the beginning of the line. But remember, 
+# the more modules you compile into the server, the larger the executable
+# is and the more memory it will take, so if you are unlikely to use the
+# functionality of a particular module you might wish to leave it out.
+
+## mod_mmap_static is an experimental module, you almost certainly
+## don't need it.  It can make some webservers faster.  No further
+## documentation is provided here because you'd be foolish
+## to use mod_mmap_static without reading the full documentation.
+
+# AddModule modules/experimental/mod_mmap_static.o
+
+## mod_vhost_alias provides support for mass virtual hosting
+## by dynamically changing the document root and CGI directory
+## based on the host header or local IP address of the request.
+## See "../htdocs/manual/vhosts/mass.html".
+
+# AddModule modules/standard/mod_vhost_alias.o
+
+##
+## Config manipulation modules
+##
+## mod_env sets up additional or restricted environment variables to be
+## passed to CGI/SSI scripts.  It is listed first (lowest priority) since
+## it does not do per-request stuff.
+
+AddModule modules/standard/mod_env.o
+
+##
+## Request logging modules
+##
+
+AddModule modules/standard/mod_log_config.o
+
+## Optional modules for NCSA user-agent/referer logging compatibility
+## We recommend, however, that you just use the configurable access_log.
+
+# AddModule modules/standard/mod_log_agent.o
+# AddModule modules/standard/mod_log_referer.o
+
+##
+## Type checking modules
+##
+## mod_mime_magic determines the type of a file by examining a few bytes
+## of it and testing against a database of filetype signatures.  It is
+## based on the unix file(1) command.
+## mod_mime maps filename extensions to content types, encodings, and
+## "magic" type handlers (the latter is obsoleted by mod_actions, and
+## don't confuse it with the previous module).
+## mod_negotiation allows content selection based on the Accept* headers.
+
+# AddModule modules/standard/mod_mime_magic.o
+AddModule modules/standard/mod_mime.o
+AddModule modules/standard/mod_negotiation.o
+
+##
+## Content delivery modules
+##
+## The status module allows the server to display current details about 
+## how well it is performing and what it is doing.  Consider also enabling 
+## the 'ExtendedStatus On' directive to allow full status information.
+## Please note that doing so can result in a palpable performance hit.
+
+AddModule modules/standard/mod_status.o
+
+## The Info module displays configuration information for the server and 
+## all included modules. It's very useful for debugging.
+
+# AddModule modules/standard/mod_info.o
+
+## mod_include translates server-side include (SSI) statements in text files.
+## mod_autoindex handles requests for directories which have no index file
+## mod_dir handles requests on directories and directory index files.
+## mod_cgi handles CGI scripts.
+
+AddModule modules/standard/mod_include.o
+AddModule modules/standard/mod_autoindex.o
+AddModule modules/standard/mod_dir.o
+AddModule modules/standard/mod_cgi.o
+
+## The asis module implements ".asis" file types, which allow the embedding
+## of HTTP headers at the beginning of the document.  mod_imap handles internal 
+## imagemaps (no more cgi-bin/imagemap/!).  mod_actions is used to specify 
+## CGI scripts which act as "handlers" for particular files, for example to
+## automatically convert every GIF to another file type.
+
+AddModule modules/standard/mod_asis.o
+AddModule modules/standard/mod_imap.o
+AddModule modules/standard/mod_actions.o
+
+##
+## URL translation modules.
+##
+
+## The Speling module attempts to correct misspellings of URLs that
+## users might have entered, namely by checking capitalizations
+## or by allowing up to one misspelling (character insertion / omission /
+## transposition/typo). This catches the majority of misspelled requests.
+## If it finds a match, a "spelling corrected" redirection is returned.
+
+# AddModule modules/standard/mod_speling.o
+
+## The UserDir module for selecting resource directories by user name
+## and a common prefix, e.g., /~<user> , /usr/web/<user> , etc.
+
+AddModule modules/standard/mod_userdir.o
+
+## The Alias module provides simple URL translation and redirection.
+
+AddModule modules/standard/mod_alias.o
+
+## The URL rewriting module allows for powerful URI-to-URI and 
+## URI-to-filename mapping using a regular expression based 
+## rule-controlled rewriting engine.
+
+# AddModule modules/standard/mod_rewrite.o
+
+##
+## Access control and authentication modules. 
+##
+AddModule modules/standard/mod_access.o
+AddModule modules/standard/mod_auth.o
+
+## The anon_auth module allows for anonymous-FTP-style username/ 
+## password authentication.
+
+# AddModule modules/standard/mod_auth_anon.o
+
+## db_auth and dbm_auth work with Berkeley DB files - make sure there
+## is support for DBM files on your system.  You may need to grab the GNU
+## "gdbm" package if not and possibly adjust EXTRA_LIBS. (This may be
+## done by Configure at a later date)
+
+# AddModule modules/standard/mod_auth_dbm.o
+# AddModule modules/standard/mod_auth_db.o
+
+## "digest" implements HTTP Digest Authentication rather than the less 
+## secure Basic Auth used by the other modules.  This is the old version.
+
+# AddModule modules/standard/mod_digest.o
+
+## "auth_digest" implements HTTP/1.1 Digest Authentication (RFC 2617)
+## rather than the less secure Basic Auth used by the other modules.
+## This is an updated version of mod_digest, but it is not as well tested
+## and is therefore marked experimental.  Use either the one above, or
+## this one below, but not both digest modules.
+## Note: if you add this module in then you might also need the
+## truerand library (available for example from
+## ftp://research.att.com/dist/mab/librand.shar) - see the Rule
+## DEV_RANDOM above for more info.
+##
+## Must be added above (run later than) the proxy module because the
+## WWW-Authenticate and Proxy-Authenticate headers are parsed in the
+## post-read-request phase and it needs to know if this is a proxy request.
+# AddModule modules/experimental/mod_auth_digest.o
+
+## Optional Proxy
+##
+## The proxy module enables the server to act as a proxy for outside
+## http and ftp services. It's not as complete as it could be yet.
+## NOTE: You do not want this module UNLESS you are running a proxy;
+##       it is not needed for normal (origin server) operation.
+
+# AddModule modules/proxy/libproxy.a
+
+## Optional response header manipulation modules. 
+##
+## cern_meta mimics the behavior of the CERN web server with regards to 
+## metainformation files.  
+
+# AddModule modules/standard/mod_cern_meta.o
+
+## The expires module can apply Expires: headers to resources,
+## as a function of access time or modification time.
+
+# AddModule modules/standard/mod_expires.o
+
+## The headers module can set arbitrary HTTP response headers,
+## as configured in server, vhost, access.conf or .htaccess configs
+
+# AddModule modules/standard/mod_headers.o
+
+## Miscellaneous modules
+##
+## mod_usertrack is the new name for mod_cookies.  This module
+## uses Netscape cookies to automatically construct and log
+## click-trails from Netscape cookies, or compatible clients who
+## aren't coming in via proxy.   
+##
+## You do not need this, or any other module to allow your site
+## to use Cookies.  This module is for user tracking only
+
+# AddModule modules/standard/mod_usertrack.o
+
+## The example module, which demonstrates the use of the API.  See
+## the file modules/example/README for details.  This module should
+## only be used for testing -- DO NOT ENABLE IT on a production server.
+
+# AddModule modules/example/mod_example.o
+
+## mod_unique_id generates unique identifiers for each hit, which are
+## available in the environment variable UNIQUE_ID.  It may not work on all
+## systems, hence it is not included by default.
+
+# AddModule modules/standard/mod_unique_id.o
+
+## mod_so lets you add modules to Apache without recompiling.
+## This is an experimental feature at this stage and only supported 
+## on a subset of the platforms we generally support. 
+## Don't change this entry to a 'SharedModule' variant (Bootstrapping!)
+
+# AddModule modules/standard/mod_so.o
+
+## mod_setenvif lets you set environment variables based on the HTTP header
+## fields in the request; this is useful for conditional HTML, for example.
+## Since it is also used to detect buggy browsers for workarounds, it
+## should be the last (highest priority) module.
+
+AddModule modules/mod_gsoap/mod_gsoap.o
+
+AddModule modules/standard/mod_setenvif.o
+
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/config/httpd.conf b/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/config/httpd.conf
new file mode 100644
index 0000000..290f60d
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/config/httpd.conf
@@ -0,0 +1,1242 @@
+##
+## httpd.conf -- Apache HTTP server configuration file
+##
+
+#
+# Based upon the NCSA server configuration files originally by Rob McCool.
+#
+# This is the main Apache server configuration file.  It contains the
+# configuration directives that give the server its instructions.
+# See <URL:http://www.apache.org/docs/> for detailed information about
+# the directives.
+#
+# Do NOT simply read the instructions in here without understanding
+# what they do.  They're here only as hints or reminders.  If you are unsure
+# consult the online docs. You have been warned.  
+#
+# After this file is processed, the server will look for and process
+# /usr/local/apache/conf/srm.conf and then /usr/local/apache/conf/access.conf
+# unless you have overridden these with ResourceConfig and/or
+# AccessConfig directives here.
+#
+# The configuration directives are grouped into three basic sections:
+#  1. Directives that control the operation of the Apache server process as a
+#     whole (the 'global environment').
+#  2. Directives that define the parameters of the 'main' or 'default' server,
+#     which responds to requests that aren't handled by a virtual host.
+#     These directives also provide default values for the settings
+#     of all virtual hosts.
+#  3. Settings for virtual hosts, which allow Web requests to be sent to
+#     different IP addresses or hostnames and have them handled by the
+#     same Apache server process.
+#
+# Configuration and logfile names: If the filenames you specify for many
+# of the server's control files begin with "/" (or "drive:/" for Win32), the
+# server will use that explicit path.  If the filenames do *not* begin
+# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
+# with ServerRoot set to "/usr/local/apache" will be interpreted by the
+# server as "/usr/local/apache/logs/foo.log".
+#
+
+### Section 1: Global Environment
+#
+# The directives in this section affect the overall operation of Apache,
+# such as the number of concurrent requests it can handle or where it
+# can find its configuration files.
+#
+
+#
+# ServerType is either inetd, or standalone.  Inetd mode is only supported on
+# Unix platforms.
+#
+ServerType standalone
+
+#
+# ServerRoot: The top of the directory tree under which the server's
+# configuration, error, and log files are kept.
+#
+# NOTE!  If you intend to place this on an NFS (or otherwise network)
+# mounted filesystem then please read the LockFile documentation
+# (available at <URL:http://www.apache.org/docs/mod/core.html#lockfile>);
+# you will save yourself a lot of trouble.
+#
+ServerRoot "/usr/local/apache"
+
+#
+# The LockFile directive sets the path to the lockfile used when Apache
+# is compiled with either USE_FCNTL_SERIALIZED_ACCEPT or
+# USE_FLOCK_SERIALIZED_ACCEPT. This directive should normally be left at
+# its default value. The main reason for changing it is if the logs
+# directory is NFS mounted, since the lockfile MUST BE STORED ON A LOCAL
+# DISK. The PID of the main server process is automatically appended to
+# the filename. 
+#
+#LockFile /usr/local/apache/logs/httpd.lock
+
+#
+# PidFile: The file in which the server should record its process
+# identification number when it starts.
+#
+PidFile /usr/local/apache/logs/httpd.pid
+
+#
+# ScoreBoardFile: File used to store internal server process information.
+# Not all architectures require this.  But if yours does (you'll know because
+# this file will be  created when you run Apache) then you *must* ensure that
+# no two invocations of Apache share the same scoreboard file.
+#
+ScoreBoardFile /usr/local/apache/logs/httpd.scoreboard
+
+#
+# In the standard configuration, the server will process httpd.conf (this 
+# file, specified by the -f command line option), srm.conf, and access.conf 
+# in that order.  The latter two files are now distributed empty, as it is 
+# recommended that all directives be kept in a single file for simplicity.  
+# The commented-out values below are the built-in defaults.  You can have the 
+# server ignore these files altogether by using "/dev/null" (for Unix) or
+# "nul" (for Win32) for the arguments to the directives.
+#
+#ResourceConfig conf/srm.conf
+#AccessConfig conf/access.conf
+
+#
+# Timeout: The number of seconds before receives and sends time out.
+#
+Timeout 300
+
+#
+# KeepAlive: Whether or not to allow persistent connections (more than
+# one request per connection). Set to "Off" to deactivate.
+#
+KeepAlive On
+
+#
+# MaxKeepAliveRequests: The maximum number of requests to allow
+# during a persistent connection. Set to 0 to allow an unlimited amount.
+# We recommend you leave this number high, for maximum performance.
+#
+MaxKeepAliveRequests 100
+
+#
+# KeepAliveTimeout: Number of seconds to wait for the next request from the
+# same client on the same connection.
+#
+KeepAliveTimeout 15
+
+#
+# Server-pool size regulation.  Rather than making you guess how many
+# server processes you need, Apache dynamically adapts to the load it
+# sees --- that is, it tries to maintain enough server processes to
+# handle the current load, plus a few spare servers to handle transient
+# load spikes (e.g., multiple simultaneous requests from a single
+# Netscape browser).
+#
+# It does this by periodically checking how many servers are waiting
+# for a request.  If there are fewer than MinSpareServers, it creates
+# a new spare.  If there are more than MaxSpareServers, some of the
+# spares die off.  The default values are probably OK for most sites.
+#
+MinSpareServers 5
+MaxSpareServers 10
+
+#
+# Number of servers to start initially --- should be a reasonable ballpark
+# figure.
+#
+StartServers 5
+
+#
+# Limit on total number of servers running, i.e., limit on the number
+# of clients who can simultaneously connect --- if this limit is ever
+# reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW.
+# It is intended mainly as a brake to keep a runaway server from taking
+# the system with it as it spirals down...
+#
+MaxClients 150
+
+#
+# MaxRequestsPerChild: the number of requests each child process is
+# allowed to process before the child dies.  The child will exit so
+# as to avoid problems after prolonged use when Apache (and maybe the
+# libraries it uses) leak memory or other resources.  On most systems, this
+# isn't really needed, but a few (such as Solaris) do have notable leaks
+# in the libraries. For these platforms, set to something like 10000
+# or so; a setting of 0 means unlimited.
+#
+# NOTE: This value does not include keepalive requests after the initial
+#       request per connection. For example, if a child process handles
+#       an initial request and 10 subsequent "keptalive" requests, it
+#       would only count as 1 request towards this limit.
+#
+MaxRequestsPerChild 0
+
+#
+# Listen: Allows you to bind Apache to specific IP addresses and/or
+# ports, in addition to the default. See also the <VirtualHost>
+# directive.
+#
+#Listen 3000
+#Listen 12.34.56.78:80
+
+#
+# BindAddress: You can support virtual hosts with this option. This directive
+# is used to tell the server which IP address to listen to. It can either
+# contain "*", an IP address, or a fully qualified Internet domain name.
+# See also the <VirtualHost> and Listen directives.
+#
+#BindAddress *
+
+#
+# Dynamic Shared Object (DSO) Support
+#
+# To be able to use the functionality of a module which was built as a DSO you
+# have to place corresponding `LoadModule' lines at this location so the
+# directives contained in it are actually available _before_ they are used.
+# Please read the file http://httpd.apache.org/docs/dso.html for more
+# details about the DSO mechanism and run `httpd -l' for the list of already
+# built-in (statically linked and thus always available) modules in your httpd
+# binary.
+#
+# Note: The order in which modules are loaded is important.  Don't change
+# the order below without expert advice.
+#
+# Example:
+# LoadModule foo_module libexec/mod_foo.so
+
+#if you don't use mod_gsoap as a shared library, remove the next line (for debug and static builds):
+LoadModule gsoap_module libexec/mod_gsoap.so
+
+#
+# ExtendedStatus controls whether Apache will generate "full" status
+# information (ExtendedStatus On) or just basic information (ExtendedStatus
+# Off) when the "server-status" handler is called. The default is Off.
+#
+#ExtendedStatus On
+
+### Section 2: 'Main' server configuration
+#
+# The directives in this section set up the values used by the 'main'
+# server, which responds to any requests that aren't handled by a
+# <VirtualHost> definition.  These values also provide defaults for
+# any <VirtualHost> containers you may define later in the file.
+#
+# All of these directives may appear inside <VirtualHost> containers,
+# in which case these default settings will be overridden for the
+# virtual host being defined.
+#
+
+#
+# If your ServerType directive (set earlier in the 'Global Environment'
+# section) is set to "inetd", the next few directives don't have any
+# effect since their settings are defined by the inetd configuration.
+# Skip ahead to the ServerAdmin directive.
+#
+
+#
+# Port: The port to which the standalone server listens. For
+# ports < 1023, you will need httpd to be run as root initially.
+#
+Port 8080
+
+##
+##  SSL Support
+##
+##  When we also provide SSL we have to listen to the 
+##  standard HTTP port (see above) and to the HTTPS port
+##
+<IfDefine SSL>
+Listen 80
+Listen 443
+</IfDefine>
+
+#
+# If you wish httpd to run as a different user or group, you must run
+# httpd as root initially and it will switch.  
+#
+# User/Group: The name (or #number) of the user/group to run httpd as.
+#  . On SCO (ODT 3) use "User nouser" and "Group nogroup".
+#  . On HPUX you may not be able to use shared memory as nobody, and the
+#    suggested workaround is to create a user www and use that user.
+#  NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
+#  when the value of (unsigned)Group is above 60000; 
+#  don't use Group nobody on these systems!
+#
+User nobody
+Group nobody
+
+#
+# ServerAdmin: Your address, where problems with the server should be
+# e-mailed.  This address appears on some server-generated pages, such
+# as error documents.
+#
+ServerAdmin aberger@redux.aberger.at
+
+#
+# ServerName allows you to set a host name which is sent back to clients for
+# your server if it's different than the one the program would get (i.e., use
+# "www" instead of the host's real name).
+#
+# Note: You cannot just invent host names and hope they work. The name you 
+# define here must be a valid DNS name for your host. If you don't understand
+# this, ask your network administrator.
+# If your host doesn't have a registered DNS name, enter its IP address here.
+# You will have to access it by its address (e.g., http://123.45.67.89/)
+# anyway, and this will make redirections work in a sensible way.
+#
+# 127.0.0.1 is the TCP/IP local loop-back address, often named localhost. Your 
+# machine always knows itself by this address. If you use Apache strictly for 
+# local testing and development, you may use 127.0.0.1 as the server name.
+#
+#ServerName redux.aberger.at
+
+#
+# DocumentRoot: The directory out of which you will serve your
+# documents. By default, all requests are taken from this directory, but
+# symbolic links and aliases may be used to point to other locations.
+#
+DocumentRoot "/usr/local/apache/htdocs"
+
+#
+# Each directory to which Apache has access, can be configured with respect
+# to which services and features are allowed and/or disabled in that
+# directory (and its subdirectories). 
+#
+# First, we configure the "default" to be a very restrictive set of 
+# permissions.  
+#
+<Directory />
+    Options FollowSymLinks
+    AllowOverride None
+</Directory>
+
+#
+# Note that from this point forward you must specifically allow
+# particular features to be enabled - so if something's not working as
+# you might expect, make sure that you have specifically enabled it
+# below.
+#
+
+#
+# This should be changed to whatever you set DocumentRoot to.
+#
+<Directory "/usr/local/apache/htdocs">
+
+#
+# This may also be "None", "All", or any combination of "Indexes",
+# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
+#
+# Note that "MultiViews" must be named *explicitly* --- "Options All"
+# doesn't give it to you.
+#
+    Options Indexes FollowSymLinks MultiViews
+
+#
+# This controls which options the .htaccess files in directories can
+# override. Can also be "All", or any combination of "Options", "FileInfo", 
+# "AuthConfig", and "Limit"
+#
+    AllowOverride None
+
+#
+# Controls who can get stuff from this server.
+#
+    Order allow,deny
+    Allow from all
+</Directory>
+
+#
+# UserDir: The name of the directory which is appended onto a user's home
+# directory if a ~user request is received.
+#
+<IfModule mod_userdir.c>
+    UserDir public_html
+</IfModule>
+
+#
+# Control access to UserDir directories.  The following is an example
+# for a site where these directories are restricted to read-only.
+#
+#<Directory /home/*/public_html>
+#    AllowOverride FileInfo AuthConfig Limit
+#    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
+#    <Limit GET POST OPTIONS PROPFIND>
+#        Order allow,deny
+#        Allow from all
+#    </Limit>
+#    <LimitExcept GET POST OPTIONS PROPFIND>
+#        Order deny,allow
+#        Deny from all
+#    </LimitExcept>
+#</Directory>
+
+#
+# DirectoryIndex: Name of the file or files to use as a pre-written HTML
+# directory index.  Separate multiple entries with spaces.
+#
+<IfModule mod_dir.c>
+    DirectoryIndex index.html
+</IfModule>
+
+#
+# AccessFileName: The name of the file to look for in each directory
+# for access control information.
+#
+AccessFileName .htaccess
+
+#
+# The following lines prevent .htaccess files from being viewed by
+# Web clients.  Since .htaccess files often contain authorization
+# information, access is disallowed for security reasons.  Comment
+# these lines out if you want Web visitors to see the contents of
+# .htaccess files.  If you change the AccessFileName directive above,
+# be sure to make the corresponding changes here.
+#
+# Also, folks tend to use names such as .htpasswd for password
+# files, so this will protect those as well.
+#
+<Files ~ "^\.ht">
+    Order allow,deny
+    Deny from all
+    Satisfy All
+</Files>
+
+#
+# CacheNegotiatedDocs: By default, Apache sends "Pragma: no-cache" with each
+# document that was negotiated on the basis of content. This asks proxy
+# servers not to cache the document. Uncommenting the following line disables
+# this behavior, and proxies will be allowed to cache the documents.
+#
+#CacheNegotiatedDocs
+
+#
+# UseCanonicalName:  (new for 1.3)  With this setting turned on, whenever
+# Apache needs to construct a self-referencing URL (a URL that refers back
+# to the server the response is coming from) it will use ServerName and
+# Port to form a "canonical" name.  With this setting off, Apache will
+# use the hostname:port that the client supplied, when possible.  This
+# also affects SERVER_NAME and SERVER_PORT in CGI scripts.
+#
+UseCanonicalName On
+
+#
+# TypesConfig describes where the mime.types file (or equivalent) is
+# to be found.
+#
+<IfModule mod_mime.c>
+    TypesConfig /usr/local/apache/conf/mime.types
+</IfModule>
+
+#
+# DefaultType is the default MIME type the server will use for a document
+# if it cannot otherwise determine one, such as from filename extensions.
+# If your server contains mostly text or HTML documents, "text/plain" is
+# a good value.  If most of your content is binary, such as applications
+# or images, you may want to use "application/octet-stream" instead to
+# keep browsers from trying to display binary files as though they are
+# text.
+#
+DefaultType text/plain
+
+#
+# The mod_mime_magic module allows the server to use various hints from the
+# contents of the file itself to determine its type.  The MIMEMagicFile
+# directive tells the module where the hint definitions are located.
+# mod_mime_magic is not part of the default server (you have to add
+# it yourself with a LoadModule [see the DSO paragraph in the 'Global
+# Environment' section], or recompile the server and include mod_mime_magic
+# as part of the configuration), so it's enclosed in an <IfModule> container.
+# This means that the MIMEMagicFile directive will only be processed if the
+# module is part of the server.
+#
+<IfModule mod_mime_magic.c>
+    MIMEMagicFile /usr/local/apache/conf/magic
+</IfModule>
+
+#
+# HostnameLookups: Log the names of clients or just their IP addresses
+# e.g., www.apache.org (on) or 204.62.129.132 (off).
+# The default is off because it'd be overall better for the net if people
+# had to knowingly turn this feature on, since enabling it means that
+# each client request will result in AT LEAST one lookup request to the
+# nameserver.
+#
+HostnameLookups Off
+
+#
+# ErrorLog: The location of the error log file.
+# If you do not specify an ErrorLog directive within a <VirtualHost>
+# container, error messages relating to that virtual host will be
+# logged here.  If you *do* define an error logfile for a <VirtualHost>
+# container, that host's errors will be logged there and not here.
+#
+ErrorLog /usr/local/apache/logs/error_log
+
+#
+# LogLevel: Control the number of messages logged to the error_log.
+# Possible values include: debug, info, notice, warn, error, crit,
+# alert, emerg.
+#
+LogLevel warn
+
+#
+# The following directives define some format nicknames for use with
+# a CustomLog directive (see below).
+#
+LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
+LogFormat "%h %l %u %t \"%r\" %>s %b" common
+LogFormat "%{Referer}i -> %U" referer
+LogFormat "%{User-agent}i" agent
+
+#
+# The location and format of the access logfile (Common Logfile Format).
+# If you do not define any access logfiles within a <VirtualHost>
+# container, they will be logged here.  Contrariwise, if you *do*
+# define per-<VirtualHost> access logfiles, transactions will be
+# logged therein and *not* in this file.
+#
+CustomLog /usr/local/apache/logs/access_log common
+
+#
+# If you would like to have agent and referer logfiles, uncomment the
+# following directives.
+#
+#CustomLog /usr/local/apache/logs/referer_log referer
+#CustomLog /usr/local/apache/logs/agent_log agent
+
+#
+# If you prefer a single logfile with access, agent, and referer information
+# (Combined Logfile Format) you can use the following directive.
+#
+#CustomLog /usr/local/apache/logs/access_log combined
+
+#
+# Optionally add a line containing the server version and virtual host
+# name to server-generated pages (error documents, FTP directory listings,
+# mod_status and mod_info output etc., but not CGI generated documents).
+# Set to "EMail" to also include a mailto: link to the ServerAdmin.
+# Set to one of:  On | Off | EMail
+#
+ServerSignature On
+
+# EBCDIC configuration:
+# (only for mainframes using the EBCDIC codeset, currently one of:
+# Fujitsu-Siemens' BS2000/OSD, IBM's OS/390 and IBM's TPF)!!
+# The following default configuration assumes that "text files"
+# are stored in EBCDIC (so that you can operate on them using the
+# normal POSIX tools like grep and sort) while "binary files" are
+# stored with identical octets as on an ASCII machine.
+#
+# The directives are evaluated in configuration file order, with
+# the EBCDICConvert directives applied before EBCDICConvertByType.
+#
+# If you want to have ASCII HTML documents and EBCDIC HTML documents
+# at the same time, you can use the file extension to force
+# conversion off for the ASCII documents:
+# > AddType       text/html .ahtml
+# > EBCDICConvert Off=InOut .ahtml
+#
+# EBCDICConvertByType  On=InOut text/* message/* multipart/*
+# EBCDICConvertByType  On=In    application/x-www-form-urlencoded
+# EBCDICConvertByType  On=InOut application/postscript model/vrml
+# EBCDICConvertByType Off=InOut */*
+
+
+#
+# Aliases: Add here as many aliases as you need (with no limit). The format is 
+# Alias fakename realname
+#
+<IfModule mod_alias.c>
+
+    #
+    # Note that if you include a trailing / on fakename then the server will
+    # require it to be present in the URL.  So "/icons" isn't aliased in this
+    # example, only "/icons/".  If the fakename is slash-terminated, then the 
+    # realname must also be slash terminated, and if the fakename omits the 
+    # trailing slash, the realname must also omit it.
+    #
+    Alias /icons/ "/usr/local/apache/icons/"
+
+    <Directory "/usr/local/apache/icons">
+        Options Indexes MultiViews
+        AllowOverride None
+        Order allow,deny
+        Allow from all
+    </Directory>
+
+    # This Alias will project the on-line documentation tree under /manual/
+    # even if you change the DocumentRoot. Comment it if you don't want to 
+    # provide access to the on-line documentation.
+    #
+    Alias /manual/ "/usr/local/apache/htdocs/manual/"
+
+    <Directory "/usr/local/apache/htdocs/manual">
+        Options Indexes FollowSymlinks MultiViews
+        AllowOverride None
+        Order allow,deny
+        Allow from all
+    </Directory>
+
+    #
+    # ScriptAlias: This controls which directories contain server scripts.
+    # ScriptAliases are essentially the same as Aliases, except that
+    # documents in the realname directory are treated as applications and
+    # run by the server when requested rather than as documents sent to the client.
+    # The same rules about trailing "/" apply to ScriptAlias directives as to
+    # Alias.
+    #
+    ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
+
+    #
+    # "/usr/local/apache/cgi-bin" should be changed to whatever your ScriptAliased
+    # CGI directory exists, if you have that configured.
+    #
+    <Directory "/usr/local/apache/cgi-bin">
+        AllowOverride None
+        Options None
+        Order allow,deny
+        Allow from all
+    </Directory>
+
+</IfModule>
+# End of aliases.
+
+#
+# Redirect allows you to tell clients about documents which used to exist in
+# your server's namespace, but do not anymore. This allows you to tell the
+# clients where to look for the relocated document.
+# Format: Redirect old-URI new-URL
+#
+
+#
+# Directives controlling the display of server-generated directory listings.
+#
+<IfModule mod_autoindex.c>
+
+    #
+    # FancyIndexing is whether you want fancy directory indexing or standard
+    #
+    IndexOptions FancyIndexing
+
+    #
+    # AddIcon* directives tell the server which icon to show for different
+    # files or filename extensions.  These are only displayed for
+    # FancyIndexed directories.
+    #
+    AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
+
+    AddIconByType (TXT,/icons/text.gif) text/*
+    AddIconByType (IMG,/icons/image2.gif) image/*
+    AddIconByType (SND,/icons/sound2.gif) audio/*
+    AddIconByType (VID,/icons/movie.gif) video/*
+
+    AddIcon /icons/binary.gif .bin .exe
+    AddIcon /icons/binhex.gif .hqx
+    AddIcon /icons/tar.gif .tar
+    AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
+    AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
+    AddIcon /icons/a.gif .ps .ai .eps
+    AddIcon /icons/layout.gif .html .shtml .htm .pdf
+    AddIcon /icons/text.gif .txt
+    AddIcon /icons/c.gif .c
+    AddIcon /icons/p.gif .pl .py
+    AddIcon /icons/f.gif .for
+    AddIcon /icons/dvi.gif .dvi
+    AddIcon /icons/uuencoded.gif .uu
+    AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
+    AddIcon /icons/tex.gif .tex
+    AddIcon /icons/bomb.gif core
+
+    AddIcon /icons/back.gif ..
+    AddIcon /icons/hand.right.gif README
+    AddIcon /icons/folder.gif ^^DIRECTORY^^
+    AddIcon /icons/blank.gif ^^BLANKICON^^
+
+    #
+    # DefaultIcon is which icon to show for files which do not have an icon
+    # explicitly set.
+    #
+    DefaultIcon /icons/unknown.gif
+
+    #
+    # AddDescription allows you to place a short description after a file in
+    # server-generated indexes.  These are only displayed for FancyIndexed
+    # directories.
+    # Format: AddDescription "description" filename
+    #
+    #AddDescription "GZIP compressed document" .gz
+    #AddDescription "tar archive" .tar
+    #AddDescription "GZIP compressed tar archive" .tgz
+
+    #
+    # ReadmeName is the name of the README file the server will look for by
+    # default, and append to directory listings.
+    #
+    # HeaderName is the name of a file which should be prepended to
+    # directory indexes. 
+    #
+    # If MultiViews are amongst the Options in effect, the server will
+    # first look for name.html and include it if found.  If name.html
+    # doesn't exist, the server will then look for name.txt and include
+    # it as plaintext if found.
+    #
+    ReadmeName README
+    HeaderName HEADER
+
+    #
+    # IndexIgnore is a set of filenames which directory indexing should ignore
+    # and not include in the listing.  Shell-style wildcarding is permitted.
+    #
+    IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
+
+</IfModule>
+# End of indexing directives.
+
+#
+# Document types.
+#
+<IfModule mod_mime.c>
+
+    #
+    # AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress
+    # information on the fly. Note: Not all browsers support this.
+    # Despite the name similarity, the following Add* directives have nothing
+    # to do with the FancyIndexing customization directives above.
+    #
+    AddEncoding x-compress Z
+    AddEncoding x-gzip gz tgz
+
+    #
+    # AddLanguage allows you to specify the language of a document. You can
+    # then use content negotiation to give a browser a file in a language
+    # it can understand.  
+    #
+    # Note 1: The suffix does not have to be the same as the language 
+    # keyword --- those with documents in Polish (whose net-standard 
+    # language code is pl) may wish to use "AddLanguage pl .po" to 
+    # avoid the ambiguity with the common suffix for perl scripts.
+    #
+    # Note 2: The example entries below illustrate that in quite
+    # some cases the two character 'Language' abbreviation is not
+    # identical to the two character 'Country' code for its country,
+    # E.g. 'Danmark/dk' versus 'Danish/da'.
+    #
+    # Note 3: In the case of 'ltz' we violate the RFC by using a three char 
+    # specifier. But there is 'work in progress' to fix this and get 
+    # the reference data for rfc1766 cleaned up.
+    #
+    # Danish (da) - Dutch (nl) - English (en) - Estonian (ee)
+    # French (fr) - German (de) - Greek-Modern (el)
+    # Italian (it) - Korean (kr) - Norwegian (no) - Norwegian Nynorsk (nn)
+    # Portugese (pt) - Luxembourgeois* (ltz)
+    # Spanish (es) - Swedish (sv) - Catalan (ca) - Czech(cz)
+    # Polish (pl) - Brazilian Portuguese (pt-br) - Japanese (ja)
+    # Russian (ru)
+    #
+    AddLanguage da .dk
+    AddLanguage nl .nl
+    AddLanguage en .en
+    AddLanguage et .ee
+    AddLanguage fr .fr
+    AddLanguage de .de
+    AddLanguage el .el
+    AddLanguage he .he
+    AddCharset ISO-8859-8 .iso8859-8
+    AddLanguage it .it
+    AddLanguage ja .ja
+    AddCharset ISO-2022-JP .jis
+    AddLanguage kr .kr
+    AddCharset ISO-2022-KR .iso-kr
+    AddLanguage nn .nn
+    AddLanguage no .no
+    AddLanguage pl .po
+    AddCharset ISO-8859-2 .iso-pl
+    AddLanguage pt .pt
+    AddLanguage pt-br .pt-br
+    AddLanguage ltz .lu
+    AddLanguage ca .ca
+    AddLanguage es .es
+    AddLanguage sv .sv
+    AddLanguage cz .cz
+    AddLanguage ru .ru
+    AddLanguage zh-tw .tw
+    AddLanguage tw .tw
+    AddCharset Big5         .Big5    .big5
+    AddCharset WINDOWS-1251 .cp-1251
+    AddCharset CP866        .cp866
+    AddCharset ISO-8859-5   .iso-ru
+    AddCharset KOI8-R       .koi8-r
+    AddCharset UCS-2        .ucs2
+    AddCharset UCS-4        .ucs4
+    AddCharset UTF-8        .utf8
+
+    # LanguagePriority allows you to give precedence to some languages
+    # in case of a tie during content negotiation.
+    #
+    # Just list the languages in decreasing order of preference. We have
+    # more or less alphabetized them here. You probably want to change this.
+    #
+    <IfModule mod_negotiation.c>
+        LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
+    </IfModule>
+
+    #
+    # AddType allows you to tweak mime.types without actually editing it, or to
+    # make certain files to be certain types.
+    #
+    AddType application/x-tar .tgz
+
+    #
+    # AddHandler allows you to map certain file extensions to "handlers",
+    # actions unrelated to filetype. These can be either built into the server
+    # or added with the Action command (see below)
+    #
+    # If you want to use server side includes, or CGI outside
+    # ScriptAliased directories, uncomment the following lines.
+    #
+    # To use CGI scripts:
+    #
+    #AddHandler cgi-script .cgi
+
+    #
+    # To use server-parsed HTML files
+    #
+    #AddType text/html .shtml
+    #AddHandler server-parsed .shtml
+
+    #
+    # Uncomment the following line to enable Apache's send-asis HTTP file
+    # feature
+    #
+    #AddHandler send-as-is asis
+
+    #
+    # If you wish to use server-parsed imagemap files, use
+    #
+    #AddHandler imap-file map
+
+    #
+    # To enable type maps, you might want to use
+    #
+    #AddHandler type-map var
+
+</IfModule>
+# End of document types.
+
+#
+# Action lets you define media types that will execute a script whenever
+# a matching file is called. This eliminates the need for repeated URL
+# pathnames for oft-used CGI file processors.
+# Format: Action media/type /cgi-script/location
+# Format: Action handler-name /cgi-script/location
+#
+
+#
+# MetaDir: specifies the name of the directory in which Apache can find
+# meta information files. These files contain additional HTTP headers
+# to include when sending the document
+#
+#MetaDir .web
+
+#
+# MetaSuffix: specifies the file name suffix for the file containing the
+# meta information.
+#
+#MetaSuffix .meta
+
+#
+# Customizable error response (Apache style)
+#  these come in three flavors
+#
+#    1) plain text
+#ErrorDocument 500 "The server made a boo boo.
+#  n.b.  the single leading (") marks it as text, it does not get output
+#
+#    2) local redirects
+#ErrorDocument 404 /missing.html
+#  to redirect to local URL /missing.html
+#ErrorDocument 404 /cgi-bin/missing_handler.pl
+#  N.B.: You can redirect to a script or a document using server-side-includes.
+#
+#    3) external redirects
+#ErrorDocument 402 http://some.other-server.com/subscription_info.html
+#  N.B.: Many of the environment variables associated with the original
+#  request will *not* be available to such a script.
+
+#
+# Customize behaviour based on the browser
+#
+<IfModule mod_setenvif.c>
+
+    #
+    # The following directives modify normal HTTP response behavior.
+    # The first directive disables keepalive for Netscape 2.x and browsers that
+    # spoof it. There are known problems with these browser implementations.
+    # The second directive is for Microsoft Internet Explorer 4.0b2
+    # which has a broken HTTP/1.1 implementation and does not properly
+    # support keepalive when it is used on 301 or 302 (redirect) responses.
+    #
+    BrowserMatch "Mozilla/2" nokeepalive
+    BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
+
+    #
+    # The following directive disables HTTP/1.1 responses to browsers which
+    # are in violation of the HTTP/1.0 spec by not being able to grok a
+    # basic 1.1 response.
+    #
+    BrowserMatch "RealPlayer 4\.0" force-response-1.0
+    BrowserMatch "Java/1\.0" force-response-1.0
+    BrowserMatch "JDK/1\.0" force-response-1.0
+
+</IfModule>
+# End of browser customization directives
+
+#
+# Allow server status reports, with the URL of http://servername/server-status
+# Change the ".your-domain.com" to match your domain to enable.
+#
+#<Location /server-status>
+#    SetHandler server-status
+#    Order deny,allow
+#    Deny from all
+#    Allow from .your-domain.com
+#</Location>
+
+#
+# Allow remote server configuration reports, with the URL of
+# http://servername/server-info (requires that mod_info.c be loaded).
+# Change the ".your-domain.com" to match your domain to enable.
+#
+#<Location /server-info>
+#    SetHandler server-info
+#    Order deny,allow
+#    Deny from all
+#    Allow from .your-domain.com
+#</Location>
+
+#
+# There have been reports of people trying to abuse an old bug from pre-1.1
+# days.  This bug involved a CGI script distributed as a part of Apache.
+# By uncommenting these lines you can redirect these attacks to a logging 
+# script on phf.apache.org.  Or, you can record them yourself, using the script
+# support/phf_abuse_log.cgi.
+#
+#<Location /cgi-bin/phf*>
+#    Deny from all
+#    ErrorDocument 403 http://phf.apache.org/phf_abuse_log.cgi
+#</Location>
+
+#
+# Proxy Server directives. Uncomment the following lines to
+# enable the proxy server:
+#
+#<IfModule mod_proxy.c>
+#    ProxyRequests On
+
+#    <Directory proxy:*>
+#        Order deny,allow
+#        Deny from all
+#        Allow from .your-domain.com
+#    </Directory>
+
+    #
+    # Enable/disable the handling of HTTP/1.1 "Via:" headers.
+    # ("Full" adds the server version; "Block" removes all outgoing Via: headers)
+    # Set to one of: Off | On | Full | Block
+    #
+#    ProxyVia On
+
+    #
+    # To enable the cache as well, edit and uncomment the following lines:
+    # (no cacheing without CacheRoot)
+    #
+#    CacheRoot "/usr/local/apache/proxy"
+#    CacheSize 5
+#    CacheGcInterval 4
+#    CacheMaxExpire 24
+#    CacheLastModifiedFactor 0.1
+#    CacheDefaultExpire 1
+#    NoCache a-domain.com another-domain.edu joes.garage-sale.com
+
+#</IfModule>
+# End of proxy directives.
+
+### Section 3: Virtual Hosts
+#
+# VirtualHost: If you want to maintain multiple domains/hostnames on your
+# machine you can setup VirtualHost containers for them. Most configurations
+# use only name-based virtual hosts so the server doesn't need to worry about
+# IP addresses. This is indicated by the asterisks in the directives below.
+#
+# Please see the documentation at <URL:http://www.apache.org/docs/vhosts/>
+# for further details before you try to setup virtual hosts.
+#
+# You may use the command line option '-S' to verify your virtual host
+# configuration.
+
+#
+# Use name-based virtual hosting.
+#
+#NameVirtualHost *
+
+#
+# VirtualHost example:
+# Almost any Apache directive may go into a VirtualHost container.
+# The first VirtualHost section is used for requests without a known
+# server name.
+#
+#<VirtualHost *>
+#    ServerAdmin webmaster@dummy-host.example.com
+#    DocumentRoot /www/docs/dummy-host.example.com
+#    ServerName dummy-host.example.com
+#    ErrorLog logs/dummy-host.example.com-error_log
+#    CustomLog logs/dummy-host.example.com-access_log common
+#</VirtualHost>
+
+#<VirtualHost _default_:*>
+#</VirtualHost>
+
+##
+##  SSL Global Context
+##
+##  All SSL configuration in this context applies both to
+##  the main server and all SSL-enabled virtual hosts.
+##
+
+#
+#   Some MIME-types for downloading Certificates and CRLs
+#
+<IfDefine SSL>
+AddType application/x-x509-ca-cert .crt
+AddType application/x-pkcs7-crl    .crl
+</IfDefine>
+
+<IfModule mod_ssl.c>
+
+#   Pass Phrase Dialog:
+#   Configure the pass phrase gathering process.
+#   The filtering dialog program (`builtin' is a internal
+#   terminal dialog) has to provide the pass phrase on stdout.
+SSLPassPhraseDialog  builtin
+
+#   Inter-Process Session Cache:
+#   Configure the SSL Session Cache: First the mechanism 
+#   to use and second the expiring timeout (in seconds).
+#SSLSessionCache        none
+#SSLSessionCache        shmht:/usr/local/apache/logs/ssl_scache(512000)
+#SSLSessionCache        shmcb:/usr/local/apache/logs/ssl_scache(512000)
+SSLSessionCache         dbm:/usr/local/apache/logs/ssl_scache
+SSLSessionCacheTimeout  300
+
+#   Semaphore:
+#   Configure the path to the mutual exclusion semaphore the
+#   SSL engine uses internally for inter-process synchronization. 
+SSLMutex  file:/usr/local/apache/logs/ssl_mutex
+
+#   Pseudo Random Number Generator (PRNG):
+#   Configure one or more sources to seed the PRNG of the 
+#   SSL library. The seed data should be of good random quality.
+#   WARNING! On some platforms /dev/random blocks if not enough entropy
+#   is available. This means you then cannot use the /dev/random device
+#   because it would lead to very long connection times (as long as
+#   it requires to make more entropy available). But usually those
+#   platforms additionally provide a /dev/urandom device which doesn't
+#   block. So, if available, use this one instead. Read the mod_ssl User
+#   Manual for more details.
+SSLRandomSeed startup builtin
+SSLRandomSeed connect builtin
+#SSLRandomSeed startup file:/dev/random  512
+#SSLRandomSeed startup file:/dev/urandom 512
+#SSLRandomSeed connect file:/dev/random  512
+#SSLRandomSeed connect file:/dev/urandom 512
+
+#   Logging:
+#   The home of the dedicated SSL protocol logfile. Errors are
+#   additionally duplicated in the general error log file.  Put
+#   this somewhere where it cannot be used for symlink attacks on
+#   a real server (i.e. somewhere where only root can write).
+#   Log levels are (ascending order: higher ones include lower ones):
+#   none, error, warn, info, trace, debug.
+SSLLog      /usr/local/apache/logs/ssl_engine_log
+SSLLogLevel info
+
+</IfModule>
+
+<IfDefine SSL>
+
+##
+## SSL Virtual Host Context
+##
+
+<VirtualHost _default_:443>
+
+#  General setup for the virtual host
+DocumentRoot "/usr/local/apache/htdocs"
+ServerName redux.aberger.at
+ServerAdmin aberger@redux.aberger.at
+ErrorLog /usr/local/apache/logs/error_log
+TransferLog /usr/local/apache/logs/access_log
+
+#   SSL Engine Switch:
+#   Enable/Disable SSL for this virtual host.
+SSLEngine on
+
+#   SSL Cipher Suite:
+#   List the ciphers that the client is permitted to negotiate.
+#   See the mod_ssl documentation for a complete list.
+SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
+
+#   Server Certificate:
+#   Point SSLCertificateFile at a PEM encoded certificate.  If
+#   the certificate is encrypted, then you will be prompted for a
+#   pass phrase.  Note that a kill -HUP will prompt again. A test
+#   certificate can be generated with `make certificate' under
+#   built time. Keep in mind that if you've both a RSA and a DSA
+#   certificate you can configure both in parallel (to also allow
+#   the use of DSA ciphers, etc.)
+SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt
+#SSLCertificateFile /usr/local/apache/conf/ssl.crt/server-dsa.crt
+
+#   Server Private Key:
+#   If the key is not combined with the certificate, use this
+#   directive to point at the key file.  Keep in mind that if
+#   you've both a RSA and a DSA private key you can configure
+#   both in parallel (to also allow the use of DSA ciphers, etc.)
+SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
+#SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server-dsa.key
+
+#   Server Certificate Chain:
+#   Point SSLCertificateChainFile at a file containing the
+#   concatenation of PEM encoded CA certificates which form the
+#   certificate chain for the server certificate. Alternatively
+#   the referenced file can be the same as SSLCertificateFile
+#   when the CA certificates are directly appended to the server
+#   certificate for convinience.
+#SSLCertificateChainFile /usr/local/apache/conf/ssl.crt/ca.crt
+
+#   Certificate Authority (CA):
+#   Set the CA certificate verification path where to find CA
+#   certificates for client authentication or alternatively one
+#   huge file containing all of them (file must be PEM encoded)
+#   Note: Inside SSLCACertificatePath you need hash symlinks
+#         to point to the certificate files. Use the provided
+#         Makefile to update the hash symlinks after changes.
+#SSLCACertificatePath /usr/local/apache/conf/ssl.crt
+#SSLCACertificateFile /usr/local/apache/conf/ssl.crt/ca-bundle.crt
+
+#   Certificate Revocation Lists (CRL):
+#   Set the CA revocation path where to find CA CRLs for client
+#   authentication or alternatively one huge file containing all
+#   of them (file must be PEM encoded)
+#   Note: Inside SSLCARevocationPath you need hash symlinks
+#         to point to the certificate files. Use the provided
+#         Makefile to update the hash symlinks after changes.
+#SSLCARevocationPath /usr/local/apache/conf/ssl.crl
+#SSLCARevocationFile /usr/local/apache/conf/ssl.crl/ca-bundle.crl
+
+#   Client Authentication (Type):
+#   Client certificate verification type and depth.  Types are
+#   none, optional, require and optional_no_ca.  Depth is a
+#   number which specifies how deeply to verify the certificate
+#   issuer chain before deciding the certificate is not valid.
+#SSLVerifyClient require
+#SSLVerifyDepth  10
+
+#   Access Control:
+#   With SSLRequire you can do per-directory access control based
+#   on arbitrary complex boolean expressions containing server
+#   variable checks and other lookup directives.  The syntax is a
+#   mixture between C and Perl.  See the mod_ssl documentation
+#   for more details.
+#<Location />
+#SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
+#            and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
+#            and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
+#            and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
+#            and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20       ) \
+#           or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
+#</Location>
+
+#   SSL Engine Options:
+#   Set various options for the SSL engine.
+#   o FakeBasicAuth:
+#     Translate the client X.509 into a Basic Authorisation.  This means that
+#     the standard Auth/DBMAuth methods can be used for access control.  The
+#     user name is the `one line' version of the client's X.509 certificate.
+#     Note that no password is obtained from the user. Every entry in the user
+#     file needs this password: `xxj31ZMTZzkVA'.
+#   o ExportCertData:
+#     This exports two additional environment variables: SSL_CLIENT_CERT and
+#     SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
+#     server (always existing) and the client (only existing when client
+#     authentication is used). This can be used to import the certificates
+#     into CGI scripts.
+#   o StdEnvVars:
+#     This exports the standard SSL/TLS related `SSL_*' environment variables.
+#     Per default this exportation is switched off for performance reasons,
+#     because the extraction step is an expensive operation and is usually
+#     useless for serving static content. So one usually enables the
+#     exportation for CGI and SSI requests only.
+#   o CompatEnvVars:
+#     This exports obsolete environment variables for backward compatibility
+#     to Apache-SSL 1.x, mod_ssl 2.0.x, Sioux 1.0 and Stronghold 2.x. Use this
+#     to provide compatibility to existing CGI scripts.
+#   o StrictRequire:
+#     This denies access when "SSLRequireSSL" or "SSLRequire" applied even
+#     under a "Satisfy any" situation, i.e. when it applies access is denied
+#     and no other module can change it.
+#   o OptRenegotiate:
+#     This enables optimized SSL connection renegotiation handling when SSL
+#     directives are used in per-directory context. 
+#SSLOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire
+<Files ~ "\.(cgi|shtml|phtml|php3?)$">
+    SSLOptions +StdEnvVars
+</Files>
+<Directory "/usr/local/apache/cgi-bin">
+    SSLOptions +StdEnvVars
+</Directory>
+
+#   SSL Protocol Adjustments:
+#   The safe and default but still SSL/TLS standard compliant shutdown
+#   approach is that mod_ssl sends the close notify alert but doesn't wait for
+#   the close notify alert from client. When you need a different shutdown
+#   approach you can use one of the following variables:
+#   o ssl-unclean-shutdown:
+#     This forces an unclean shutdown when the connection is closed, i.e. no
+#     SSL close notify alert is send or allowed to received.  This violates
+#     the SSL/TLS standard but is needed for some brain-dead browsers. Use
+#     this when you receive I/O errors because of the standard approach where
+#     mod_ssl sends the close notify alert.
+#   o ssl-accurate-shutdown:
+#     This forces an accurate shutdown when the connection is closed, i.e. a
+#     SSL close notify alert is send and mod_ssl waits for the close notify
+#     alert of the client. This is 100% SSL/TLS standard compliant, but in
+#     practice often causes hanging connections with brain-dead browsers. Use
+#     this only for browsers where you know that their SSL implementation
+#     works correctly. 
+#   Notice: Most problems of broken clients are also related to the HTTP
+#   keep-alive facility, so you usually additionally want to disable
+#   keep-alive for those clients, too. Use variable "nokeepalive" for this.
+#   Similarly, one has to force some clients to use HTTP/1.0 to workaround
+#   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
+#   "force-response-1.0" for this.
+SetEnvIf User-Agent ".*MSIE.*" \
+         nokeepalive ssl-unclean-shutdown \
+         downgrade-1.0 force-response-1.0
+
+#   Per-Server Logging:
+#   The home of a custom SSL log file. Use this when you want a
+#   compact non-error SSL logfile on a virtual host basis.
+CustomLog /usr/local/apache/logs/ssl_request_log \
+          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
+
+</VirtualHost>                                  
+
+</IfDefine>
+
+<IfModule mod_gsoap.c>
+    <Location /soap>
+        SetHandler gsoap-handler
+        SOAPLibrary /home/aberger/apache_gsoap.0.0.5/example/calculator/.libs/libCalculator.so
+    </Location>
+</IfModule>
+
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/mod_gsoap.c b/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/mod_gsoap.c
new file mode 100644
index 0000000..6c646e8
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/mod_gsoap/mod_gsoap.c
@@ -0,0 +1,1461 @@
+/** Apache SOAP module for Apache 1.3.x
+ * @file mod_gsoap.c
+ * @author Christian Aberger (http://www.aberger.at)
+ * updated by David Viner (dviner@apache.org)
+ */
+
+#if !defined(__GNUC__) || __GNUC__ < 2 || \
+    (__GNUC__ == 2 && __GNUC_MINOR__ < 7) ||\
+    defined(NEXT)
+#ifndef __attribute__
+#define __attribute__(__x)
+#endif
+#endif
+
+/*
+ * Moved gsoap include to top.  Without this, there's a parse error
+ * introduced if gsoap was compiled with -DWITH_OPENSSL.
+ */
+#include "stdsoap2.h"           // standard header for gsoap
+
+#include <stdio.h>
+#include <assert.h>
+#include "httpd.h"
+#include "http_config.h"
+#include "http_core.h"
+#include "http_log.h"
+#include "http_main.h"
+#include "http_protocol.h"
+#include "http_request.h"
+#include "util_script.h"
+#include "apache_gsoap.h"
+
+typedef int bool;
+
+#define false 0
+#define true ((int)0xffff)
+#define IOBUF_CHUNK_SIZE 8192
+#define GSOAP_ID "Apache mod_gsoap gsoap httpd extension 0.0.6"
+
+/** A shared library containing a SOAP server.
+ */
+typedef struct SoapSharedLibrary_S {
+    pool *m_pPool;
+    void *m_hLibrary;           ///< handle of the loaded libray.
+    const char *m_pszPath;      ///< the path of the library, including the name.
+    bool m_bIsSOAPLibrary;      ///< is this library a SOAP library that contains the server factory entry point?
+} SoapSharedLibrary;
+
+/** Table of shared libraries that are already loaded.
+ * a singleton.
+ */
+typedef struct SoapSharedLibraries_S {
+    pool *m_pPool;
+    SoapSharedLibrary *m_pSOAPLibrary;  ///< the main SOAP library that will serve our requests
+    array_header *m_pLibraries; ///< the array where we store our libraries.
+    apache_init_soap_interface_fn m_pfnEntryPoint;
+    struct apache_soap_interface *m_pIntf;
+    bool m_bAllLibrariesLoaded; ///< have all libraries in our libraries collection been already successfully loaded?
+} SoapSharedLibraries;
+
+/** Environment to which record applies (directory,
+ * server, or combination).
+ */
+typedef enum enConfigurationType {
+    ct_server = 1,              ///< used for per-server configuration
+    ct_directory = 2,           ///< used for per-directory configuration
+    ct_both = 3                 ///< used for both
+} ConfigurationType;
+
+/** Store the configuration information set in the Apache Server configuration directives.
+ * These are set e.g. in the file httpd.conf
+ * It's perfectly reasonable to have two different structures for the two
+ * different environments.  The same command handlers will be called for
+ * both, though, so the handlers need to be able to tell them apart.  One
+ * possibility is for both structures to start with an int which is zero for
+ * one and 1 for the other.
+ *
+ * Note that while the per-directory and per-server configuration records are
+ * available to most of the module handlers, they should be treated as
+ * READ-ONLY by all except the command and merge handlers.  Sometimes handlers
+ * are handed a record that applies to the current location by implication or
+ * inheritance, and modifying it will change the rules for other locations.
+ */
+typedef struct gsoapConfiguration_S {
+    SoapSharedLibraries *m_pLibraries;
+    ConfigurationType m_Type;   ///< the type of configuration environment
+} gsoapConfiguration;
+
+/** Our internal per request soap configuration
+ */
+typedef struct gsoapRequestConfiguration_S {
+    request_rec *r;             ///< the current request record.
+    char *m_pszAllHeaders;      ///< all headers received as a string, this is returned to gsoap's http_parse function before we return the body.
+    const char *m_pszCurrentHeaderReadingPosition;  ///< the position where the next header read operation will start.
+    unsigned int m_nHeaderLength;   ///< total length of all headers concatenated as string 
+    char *m_pOutBuf;            ///< output buffer
+    size_t m_nOutBufLength;     ///< allocated length of output buffer
+    size_t m_nOutBufCount;      ///< bytes in output buffer
+    int headers_sent;           ///< have http - headers already been sent to client us?
+    int headers_received;       ///< have the request headers already been passed to gsoap ? 
+    int (*http_parse) (struct soap *);  ///< the original gsoap parsing function.
+    struct apache_soap_interface *pIntf;
+} gsoapRequestConfiguration;
+
+
+/*
+ * To avoid leaking memory from pools other than the per-request one, we
+ * allocate a module-private pool.
+ */
+static pool *the_gsoapPool = NULL;
+
+/** @return our pool for gsoapConfiguration */
+static pool *
+gsoapConfiguration_getModulePool()
+{
+    if(NULL == the_gsoapPool)
+    {
+        the_gsoapPool = ap_make_sub_pool(NULL);
+    }
+    return the_gsoapPool;
+}
+static gsoapConfiguration *getConfiguration(request_rec * r);
+static gsoapRequestConfiguration *getRequestConfiguration(struct soap *);
+
+/**
+   @param p the pool to use for memory allocations.
+   @param pszPath the path of the library.
+*/
+static void
+SoapSharedLibrary_init(SoapSharedLibrary * This, pool * p,
+                       const SoapSharedLibrary * pLib)
+{
+    This->m_pPool = p;
+    This->m_hLibrary = NULL;
+    This->m_pszPath = ap_pstrdup(p, pLib->m_pszPath);
+    This->m_bIsSOAPLibrary = pLib->m_bIsSOAPLibrary;
+}
+
+static void
+SoapSharedLibrary_init2(SoapSharedLibrary * This, pool * p, const char *pszPath)
+{
+    This->m_pPool = p;
+    This->m_hLibrary = NULL;
+    This->m_pszPath = ap_pstrdup(p, pszPath);
+    This->m_bIsSOAPLibrary = false;
+}
+
+static void
+SoapSharedLibrary_clear(SoapSharedLibrary * This, pool * p)
+{
+    This->m_pPool = p;
+    This->m_hLibrary = NULL;
+    This->m_pszPath = NULL;
+    This->m_bIsSOAPLibrary = false;
+}
+
+static SoapSharedLibrary *
+SoapSharedLibrary_create(pool * p)
+{
+    SoapSharedLibrary *This =
+        (SoapSharedLibrary *) ap_pcalloc(p, sizeof(SoapSharedLibrary));
+    SoapSharedLibrary_clear(This, p);
+    return This;
+}
+
+/**
+ *	@param pTempPool pool to use for allocating temporary objects (e.g. error message).
+ */
+static const char *
+SoapSharedLibrary_load(SoapSharedLibrary * This, pool * pTempPool)
+{
+    const char *pszError = NULL;
+    const int nFlags = RTLD_LAZY | RTLD_GLOBAL;
+
+    This->m_hLibrary = (void *)dlopen(This->m_pszPath, nFlags);
+    pszError = dlerror();
+    if(NULL == This->m_hLibrary)
+    {
+        pszError =
+            ap_psprintf(NULL == pTempPool ? This->m_pPool : pTempPool,
+                        "mod_gsoap: %s loading library %s", pszError,
+                        This->m_pszPath);
+    }
+    return pszError;
+}
+
+/*-------------------------------------------------------*/
+static void
+SoapSharedLibraries_init(SoapSharedLibraries * This, pool * p)
+{
+    This->m_pPool = p;
+    This->m_pSOAPLibrary = NULL;
+    This->m_pLibraries = ap_make_array(p, 0, sizeof(SoapSharedLibrary **));
+    This->m_bAllLibrariesLoaded = false;
+    This->m_pfnEntryPoint = NULL;
+    This->m_pIntf =
+        (struct apache_soap_interface *)ap_pcalloc(p,
+                                                   sizeof(struct
+                                                          apache_soap_interface));
+}
+
+static SoapSharedLibrary *
+SoapSharedLibraries_getLibrary(SoapSharedLibraries * This, unsigned nIndex)
+{
+    SoapSharedLibrary **ppLibs = NULL;
+    SoapSharedLibrary *pLib = NULL;
+
+    assert(NULL != This);
+    assert(NULL != This->m_pLibraries);
+    assert(nIndex >= 0);
+    assert(nIndex < This->m_pLibraries->nelts);
+    ppLibs = (SoapSharedLibrary **) This->m_pLibraries->elts;
+    pLib = ppLibs[nIndex];
+    return pLib;
+}
+
+/**
+ * @param pszPath the operating system name of the library.
+ */
+static bool
+SoapSharedLibraries_contains(SoapSharedLibraries * This, const char *pszPath)
+{
+    int i = 0;
+    bool bContains = false;
+
+    for(i = 0; i < This->m_pLibraries->nelts && !bContains; i++)
+    {
+        SoapSharedLibrary *pLib = SoapSharedLibraries_getLibrary(This, i);
+
+        assert(NULL != pLib);
+        if(0 == strcmp(pszPath, pLib->m_pszPath))
+        {
+            bContains = true;
+        }
+    }
+    return bContains;
+}
+
+static void
+SoapSharedLibraries_addLibrary(SoapSharedLibraries * This,
+                               SoapSharedLibrary * pLibrary)
+{
+    assert(NULL != pLibrary);
+    This->m_bAllLibrariesLoaded = false;
+    if(!SoapSharedLibraries_contains(This, pLibrary->m_pszPath))
+    {
+        SoapSharedLibrary **ppNewLib =
+            (SoapSharedLibrary **) ap_push_array(This->m_pLibraries);
+        *ppNewLib = pLibrary;
+        if(pLibrary->m_bIsSOAPLibrary)
+        {
+            This->m_pSOAPLibrary = pLibrary;
+        }
+    }
+}
+
+static const char *
+SoapSharedLibraries_getEntryPoints(SoapSharedLibraries * This,
+                                   SoapSharedLibrary * pLib, pool * pTempPool,
+                                   request_rec * r)
+{
+    /*
+     * now we also pass the request record 
+     */
+    (*This->m_pfnEntryPoint) (This->m_pIntf, r);
+    return NULL;
+}
+
+/**
+ * @return the error message if a load failed, NULL on success.
+ */
+static const char *
+SoapSharedLibraries_loadAllLibraries(SoapSharedLibraries * This,
+                                     pool * pTempPool, request_rec * r)
+{
+    bool bAllLibrariesLoaded = false;
+    const char *pszError = NULL;
+    bool bRetry = false;
+    int i = 0;
+    int nRetry = 0;
+
+    assert(NULL != This);
+
+    if(This->m_bAllLibrariesLoaded)
+    {
+        return NULL;
+    }
+    for(nRetry = 0; nRetry < 5 && !bAllLibrariesLoaded; nRetry++)
+    {
+        do
+        {
+            pszError = NULL;
+            bRetry = false;     // don't try it again.
+            bAllLibrariesLoaded = true;
+            for(i = 0; i < This->m_pLibraries->nelts; i++)
+            {
+                SoapSharedLibrary *pLib =
+                    SoapSharedLibraries_getLibrary(This, i);
+                if(NULL == pLib->m_hLibrary)
+                {
+                    pszError = SoapSharedLibrary_load(pLib, pTempPool);
+                    if(NULL == pszError)
+                    {
+                        assert(NULL != pLib->m_hLibrary);
+                        bRetry = true;  ///< we loaded one, lets retry with all others, maybe they depend on that.
+                    }
+                    else
+                    {
+                        bAllLibrariesLoaded = false;
+                    }
+                    if(NULL != pLib->m_hLibrary && pLib->m_bIsSOAPLibrary)
+                    {
+
+                        void *pfun = (void *)dlsym(pLib->m_hLibrary,
+                                                   APACHE_HTTPSERVER_ENTRY_POINT);
+
+                        if(NULL == pfun)
+                        {
+                            pszError = ap_psprintf(pTempPool,
+                                                   "gsoap: load library \"%s\" success, but failed to find the \"%s\" entry point",
+                                                   pLib->m_pszPath,
+                                                   APACHE_HTTPSERVER_ENTRY_POINT);
+                            return pszError;
+                        }
+                        else
+                        {
+                            This->m_pfnEntryPoint =
+                                (apache_init_soap_interface_fn) pfun;
+                            pszError =
+                                SoapSharedLibraries_getEntryPoints(This, pLib,
+                                                                   pTempPool,
+                                                                   r);
+                        }
+                    }
+                }
+            }
+        }
+        while(bRetry);
+    }
+    if(bAllLibrariesLoaded)
+    {
+        This->m_bAllLibrariesLoaded = true;
+        pszError = NULL;
+    }
+    return pszError;
+}
+
+static void
+SoapSharedLibraries_merge(SoapSharedLibraries * This,
+                          SoapSharedLibraries * pLibs)
+{
+    int i = 0;
+
+    assert(NULL != This);
+    if(NULL == pLibs)
+    {
+        return;
+    }
+    This->m_bAllLibrariesLoaded = false;
+    for(i = 0; i < pLibs->m_pLibraries->nelts; i++)
+    {
+        SoapSharedLibrary *pLib = SoapSharedLibraries_getLibrary(pLibs, i);
+
+        if(!SoapSharedLibraries_contains(This, pLib->m_pszPath))
+        {
+            SoapSharedLibrary *pNewLib =
+                SoapSharedLibrary_create(This->m_pPool);
+            SoapSharedLibrary_init(pNewLib, This->m_pPool, pLib);
+            SoapSharedLibraries_addLibrary(This, pNewLib);
+        }
+    }
+}
+
+static void
+SoapSharedLibraries_merge3(SoapSharedLibraries * This,
+                           SoapSharedLibraries * libraries1,
+                           SoapSharedLibraries * libraries2)
+{
+    SoapSharedLibraries_merge(This, libraries1);
+    SoapSharedLibraries_merge(This, libraries2);
+}
+
+static void
+gsoapConfiguration_merge(gsoapConfiguration * This,
+                         gsoapConfiguration * pParentConfig,
+                         gsoapConfiguration * pNewConfig)
+{
+    assert(NULL != This);
+    SoapSharedLibraries_merge3(This->m_pLibraries, pParentConfig->m_pLibraries,
+                               pNewConfig->m_pLibraries);
+    This->m_Type = ct_both;
+}
+
+static void
+gsoapConfiguration_init(gsoapConfiguration * This, pool * p)
+{
+    This->m_pLibraries =
+        (SoapSharedLibraries *) ap_pcalloc(p, sizeof(SoapSharedLibraries));
+    SoapSharedLibraries_init(This->m_pLibraries, p);
+    This->m_Type = ct_directory;
+}
+
+static gsoapConfiguration *
+gsoapConfiguration_create(pool * p)
+{
+    gsoapConfiguration *pConfig =
+        (gsoapConfiguration *) ap_pcalloc(p, sizeof(gsoapConfiguration));
+    gsoapConfiguration_init(pConfig, p);
+    return pConfig;
+}
+
+/*
+ * forward declarations                                                     
+ */
+static int gsoap_handler(request_rec * r);
+static void gsoap_init(server_rec * s, pool * p);
+static void gsoap_child_init(server_rec * s, pool * p);
+static void gsoap_child_exit(server_rec * s, pool * p);
+static void *gsoap_create_dir_config(pool * p, char *dirspec);
+static void *gsoap_merge_dir_config(pool * p, void *parent_conf,
+                                    void *newloc_conf);
+static void *gsoap_create_server_config(pool * p, server_rec * s);
+static void *gsoap_merge_server_config(pool * p, void *server1_conf,
+                                       void *server2_conf);
+static int gsoap_post_read_request(request_rec * r);
+static int gsoap_translate_handler(request_rec * r);
+static int gsoap_check_user_id(request_rec * r);
+static int gsoap_auth_checker(request_rec * r);
+static int gsoap_access_checker(request_rec * r);
+static int gsoap_type_checker(request_rec * r);
+static int gsoap_fixer_upper(request_rec * r);
+static int gsoap_logger(request_rec * r);
+static int gsoap_header_parser(request_rec * r);
+
+static bool AddSharedLibrary(gsoapConfiguration * pConfig, const char *pszPath,
+                             const bool bIsSOAPLibrary);
+
+
+/*
+ * We prototyped the various syntax for command handlers (routines that     
+ * are called when the configuration parser detects a directive declared    
+ * by our module) earlier.  Now we actually declare a "real" routine that   
+ * will be invoked by the parser when our "real" directive is               
+ * encountered.                                                             
+ *                                                                          
+ * If a command handler encounters a problem processing the directive, it   
+ * signals this fact by returning a non-NULL pointer to a string            
+ * describing the problem.                                                  
+ *                                                                          
+ * The magic return value DECLINE_CMD is used to deal with directives       
+ * that might be declared by multiple modules.  If the command handler      
+ * returns NULL, the directive was processed; if it returns DECLINE_CMD,    
+ * the next module (if any) that declares the directive is given a chance   
+ * at it.  If it returns any other value, it's treated as the text of an    
+ * error message.                                                           
+ *
+ */
+
+/** Command handler for the TAKE1 "SOAPLibrary" directive.
+ * We remember the load path for the shared library that contains the SOAP server.
+ */
+static const char *
+cmd_SoapLibrary(cmd_parms * cmd, void *mconfig, const char *pszPath)
+{
+    gsoapConfiguration *pConfig = (gsoapConfiguration *) mconfig;
+
+    AddSharedLibrary(pConfig, pszPath, true);
+    return NULL;
+}
+
+/** Command handler for the TAKE1 "SOAPSupportLibrary" directive.
+ * We remember the load path for a shared library that must additionally loaded.
+ * This is a mechanism to load libraries that the SOAPLibrary depends on.
+ * This type of libraries do not contain our soap server.
+ */
+static const char *
+cmd_SupportLibrary(cmd_parms * cmd, void *mconfig, const char *pszPath)
+{
+    gsoapConfiguration *pConfig = (gsoapConfiguration *) mconfig;
+
+    AddSharedLibrary(pConfig, pszPath, false);
+    return NULL;
+}
+
+typedef const char *(*command_function_interface) ();
+
+/** List of directives specific to our module.
+ */
+static const command_rec gsoap_cmds[] = {
+    {
+     "SOAPLibrary",             ///< directive name
+     (command_function_interface) cmd_SoapLibrary,  ///< config action routine
+     NULL,                      ///< argument to include in call
+     ACCESS_CONF,               ///< where available
+     TAKE1,                     ///< arguments
+     "SOAP shared Library that will be dynamically loaded. - 1 argument (path)" ///< directive description
+     },
+    {
+     "SupportLibrary",          ///< directive name
+     (command_function_interface) cmd_SupportLibrary,   ///< config action routine
+     NULL,                      ///< argument to include in call
+     ACCESS_CONF,               ///< where available
+     TAKE1,                     ///< arguments
+     "additional library that must be dynamically loaded - 1 argument (path)"   ///< directive description
+     },
+    {NULL}
+};
+
+/*
+ * --------------------------------------------------------------------------
+ *                                                                          
+ * Now the list of content handlers available from this module.             
+ *                                                                          
+ * 
+ * List of content handlers our module supplies.  Each handler is defined by
+ * two parts: a name by which it can be referenced (such as by
+ * {Add,Set}Handler), and the actual routine name.  The list is terminated by
+ * a NULL block, since it can be of variable length.
+ *
+ * Note that content-handlers are invoked on a most-specific to least-specific
+ * basis; that is, a handler that is declared for "text/plain" will be
+ * invoked before one that was declared for "text / *".  Note also that
+ * if a content-handler returns anything except DECLINED, no other
+ * content-handlers will be called.
+ */
+static const handler_rec gsoap_handlers[] = {
+    {"gsoap-handler", gsoap_handler},
+    {NULL}
+};
+
+/*
+ *--------------------------------------------------------------------------
+ *                                                                          
+ * All of the routines have been declared now.  Here's the list of          
+ * directives specific to our module, and information about where they      
+ * may appear and how the command parser should pass them to us for         
+ * processing.  Note that care must be taken to ensure that there are NO    
+ * collisions of directive names between modules.                           
+ *                                                                          
+ */
+
+/*
+ * Module definition for configuration.  If a particular callback is not
+ * needed, replace its routine name below with the word NULL.
+ *
+ * The number in brackets indicates the order in which the routine is called
+ * during request processing.  Note that not all routines are necessarily
+ * called (such as if a resource doesn't have access restrictions).
+ */
+
+/** List of callback routines and data structures that provide the hooks into our module.
+ */
+module MODULE_VAR_EXPORT gsoap_module = {
+    STANDARD_MODULE_STUFF,
+    gsoap_init,                 /* module initializer */
+    gsoap_create_dir_config,    /* per-directory config creator */
+    gsoap_merge_dir_config,     /* dir config merger */
+    gsoap_create_server_config, /* server config creator */
+    gsoap_merge_server_config,  /* server config merger */
+    gsoap_cmds,                 /* command table */
+    gsoap_handlers,             /* [9] list of handlers */
+    gsoap_translate_handler,    /* [2] filename-to-URI translation */
+    gsoap_check_user_id,        /* [5] check/validate user_id */
+    gsoap_auth_checker,         /* [6] check user_id is valid *here* */
+    gsoap_access_checker,       /* [4] check access by host address */
+    gsoap_type_checker,         /* [7] MIME type checker/setter */
+    gsoap_fixer_upper,          /* [8] fixups */
+    gsoap_logger,               /* [10] logger */
+    gsoap_header_parser,        /* [3] header parser */
+    gsoap_child_init,           /* process initializer */
+    gsoap_child_exit,           /* process exit/cleanup */
+    gsoap_post_read_request     /* [1] post read_request handling */
+};
+
+/** helper to write out the headers */
+static int
+ListHeadersCallback(void *rec, const char *key, const char *value)
+{
+    request_rec *r = (request_rec *) rec;
+
+    ap_rprintf(r, "%s: %s<br>", key, value);
+    return 1;
+}
+
+/** write out the headers of the request. */
+static void
+ListHeaders(request_rec * r)
+{
+    ap_table_do(ListHeadersCallback, r, r->headers_in, NULL);
+}
+
+/** send the error message to the client browser */
+static void
+SendErrorMessage(request_rec * r, const char *pszError)
+{
+    /*
+     * gsoapConfiguration *pConfig = getConfiguration(r); 
+     */
+
+    ap_log_error(APLOG_MARK, APLOG_ERR, r->server, "mod_gsoap: %s", pszError);
+    r->content_type = "text/html";
+    ap_send_http_header(r);
+    ap_rputs(DOCTYPE_HTML_3_2, r);
+    ap_rputs("<HTML>\n", r);
+    ap_rputs(" <HEAD>\n", r);
+    ap_rputs("  <TITLE>Apache Soap Handler\n", r);
+    ap_rputs("  </TITLE>\n", r);
+    ap_rputs(" </HEAD>\n", r);
+    ap_rputs(" <BODY>\n", r);
+    ap_rputs("  <H1>mod_gsoap Apache SOAP Server Error</H1>\n", r);
+    ap_rprintf(r,
+               "<p><strong>%s</strong><br>Please see the documentation at <a href=\"http://www.webware.at/SOAP\">WebWare</a> for details.</p>",
+               pszError);
+    ap_rputs("  <H2>Content headers of the request</H2>\n", r);
+    ListHeaders(r);
+    ap_rputs("</BODY></HTML>\n", r);
+}
+static int
+send_header_to_gsoap(void *pvoid, const char *key, const char *value)
+{
+    gsoapRequestConfiguration *pRqConf = NULL;
+    struct soap *psoap = (struct soap *)pvoid;
+
+    if(NULL != psoap)
+    {
+        pRqConf = getRequestConfiguration(psoap);
+    }
+    if(NULL == pRqConf)
+    {
+        return 0;
+    }
+    if(0 == strcasecmp(key, "SOAPAction") ||
+       0 == strcasecmp(key, "Content-Type") ||
+       0 == strcasecmp(key, "Status") || 0 == strcasecmp(key, "Content-Length"))
+    {
+        psoap->fparsehdr(psoap, key, value);
+    }
+    return 1;
+}
+
+/*
+ * Callback functions for gsoap. We must parse the headers ourselves and 
+ * we must handle send/receive properly.  
+ */
+static int
+http_post_header(struct soap *soap, const char *key, const char *value)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+    request_rec *r = NULL == pRqConf ? NULL : pRqConf->r;
+
+    if(NULL != value)
+    {
+        if(0 == strcasecmp(key, "SOAPAction"))
+        {
+            ap_table_set(r->headers_out, key, value);
+        }
+        else if(0 == strcasecmp(key, "Content-Type"))
+        {
+            r->content_type = ap_pstrdup(r->pool, value);
+        }
+        else if(0 == strcasecmp(key, "Content-Length"))
+        {
+            ap_set_content_length(r, atoi(value));
+        }
+    }
+    return SOAP_OK;
+}
+
+/** gsoap function that requests the next piece of data from us */
+static size_t
+frecv(struct soap *psoap, char *pBuf, size_t len)
+{
+    request_rec *r = NULL;
+    int nRet = 0;
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(psoap);
+
+    if(NULL != pRqConf)
+    {
+        r = pRqConf->r;
+        if(!pRqConf->headers_received)
+        {
+            ap_table_do(send_header_to_gsoap, psoap, r->headers_in, NULL);
+            pRqConf->headers_received = true;
+        }
+        if(r->remaining > 0)
+        {
+            nRet =
+                ap_get_client_block(r, pBuf,
+                                    len > r->remaining ? r->remaining : len);
+        }
+    }
+    return nRet;
+}
+static int
+fsend(struct soap *psoap, const char *pBuf, size_t len)
+{
+    int nRet = SOAP_OK;
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(psoap);
+
+    if(NULL != pRqConf)
+    {
+        request_rec *r = pRqConf->r;
+
+        if(!pRqConf->headers_sent)
+        {
+            ap_send_http_header(r);
+            pRqConf->headers_sent = true;
+        }
+        nRet = ap_rwrite(pBuf, len, r) == len ? SOAP_OK : SOAP_FAULT;
+    }
+    else
+    {
+        nRet = SOAP_FAULT;
+    }
+    return nRet;
+}
+
+/** instead of real header parsing we skip that. */
+static int
+http_parse(struct soap *psoap)
+{
+    return SOAP_OK;
+}
+
+/*
+ * plugin functions 
+ */
+static int
+mod_gsoap_plugin_copy(struct soap *soap, struct soap_plugin *dst,
+                      struct soap_plugin *src)
+{
+    *dst = *src;
+    /*
+     * should this be a deep copy? 
+     */
+    return SOAP_OK;
+}
+static void
+mod_gsoap_delete(struct soap *soap, struct soap_plugin *p)
+{
+}
+static int
+mod_gsoap_plugin(struct soap *soap, struct soap_plugin *p, void *arg)
+{
+    p->id = GSOAP_ID;
+    p->data = arg;
+    p->fcopy = mod_gsoap_plugin_copy;
+    p->fdelete = mod_gsoap_delete;
+    return SOAP_OK;
+}
+static void
+set_callbacks(request_rec * r, gsoapRequestConfiguration * pRqConf,
+              struct soap *psoap)
+{
+    gsoapConfiguration *pConfig = getConfiguration(r);
+    struct apache_soap_interface *pIntf = pConfig->m_pLibraries->m_pIntf;
+
+    pRqConf->r = r;
+    pRqConf->http_parse = psoap->fparse;
+    psoap->user = pRqConf;
+    psoap->frecv = frecv;
+    psoap->fsend = fsend;
+    psoap->fparse = http_parse;
+    psoap->fposthdr = http_post_header;
+    if(NULL != pIntf->fsoap_init)
+    {
+        (*pIntf->fsoap_register_plugin_arg) (psoap, mod_gsoap_plugin,
+                                             (void *)pRqConf, r);
+    }
+    else
+    {
+        psoap->user = pRqConf;
+    }
+}
+
+/*
+ *--------------------------------------------------------------------------
+ *                                                                          
+ * Now we declare our content handlers, which are invoked when the server   
+ * encounters a document which our module is supposed to have a chance to   
+ * see.  (See mod_mime's SetHandler and AddHandler directives, and the      
+ * mod_info and mod_status examples, for more details.)                     
+ *                                                                          
+ * Since content handlers are dumping data directly into the connexion      
+ * (using the r*() routines, such as rputs() and rprintf()) without         
+ * intervention by other parts of the server, they need to make             
+ * sure any accumulated HTTP headers are sent first.  This is done by       
+ * calling send_http_header().  Otherwise, no header will be sent at all,   
+ * and the output sent to the client will actually be HTTP-uncompliant.     
+ *--------------------------------------------------------------------------
+ */
+
+/**
+ * SOAP content handler.
+ *
+ * @return the value that instructs the caller concerning what happened and what to do next.
+ *  OK ("we did our thing")
+ *  DECLINED ("this isn't something with which we want to get involved")
+ *  HTTP_mumble ("an error status should be reported")
+ */
+static int
+gsoap_handler(request_rec * r)
+{
+    static const int nResponseBufferLen = IOBUF_CHUNK_SIZE;
+    const char *pszError = NULL;
+    struct soap *psoap = NULL;
+    struct apache_soap_interface *pIntf = NULL;
+    int nRet = 0;
+
+    /*
+     * char *pszResponse = ap_pcalloc(r->pool, nResponseBufferLen); 
+     */
+    gsoapConfiguration *pConfig = getConfiguration(r);
+    gsoapRequestConfiguration *pRqConf = NULL;
+
+    assert(NULL != pConfig);
+
+    psoap = (struct soap *)ap_pcalloc(r->pool, sizeof(struct soap));
+    pRqConf = ap_pcalloc(r->pool, sizeof(gsoapRequestConfiguration));
+    pszError =
+        SoapSharedLibraries_loadAllLibraries(pConfig->m_pLibraries, r->pool, r);
+    pIntf = pConfig->m_pLibraries->m_pIntf;
+
+    ap_update_mtime(r, r->request_time);
+    ap_set_last_modified(r);
+    if(NULL != pszError)
+    {
+        static bool bFirstTime = true;
+
+        if(bFirstTime)
+        {
+            ap_log_error(APLOG_MARK, APLOG_ERR, r->server, pszError);
+            bFirstTime = false;
+        }
+    }
+
+    if(NULL == pszError)
+    {
+        if(M_POST != r->method_number && M_GET != r->method_number)
+        {
+            pszError = "Only POST and GET allowed as request for SOAP!";
+        }
+    }
+    /*
+     * as a next step, we prepare a buffer that sends the request as first line to gsoap. 
+     * Then the remaining data. 
+     * We start returning bytes on frecv from this buffer, until it is empty. 
+     * then it is not necessary to fiddle around with gsoap's request line parsing.
+     */
+    if(NULL == pszError)
+    {
+        pRqConf->r = r;
+        pRqConf->headers_sent = false;
+        pRqConf->headers_received = false;
+        pRqConf->m_pszAllHeaders = NULL;
+        pRqConf->m_nHeaderLength = strlen(r->the_request) + 2;
+        pRqConf->m_pszCurrentHeaderReadingPosition = NULL;
+        pRqConf->m_nOutBufCount = 0;
+        pRqConf->m_nOutBufLength = nResponseBufferLen;
+        pRqConf->m_pOutBuf = ap_pcalloc(r->pool, nResponseBufferLen);
+        pRqConf->http_parse = NULL;
+        pRqConf->m_pszAllHeaders =
+            ap_pcalloc(r->pool, pRqConf->m_nHeaderLength + 1);
+        pRqConf->m_pszCurrentHeaderReadingPosition = pRqConf->m_pszAllHeaders;
+        strcpy(pRqConf->m_pszAllHeaders, r->the_request);
+        strcat(pRqConf->m_pszAllHeaders, "\r\n");
+        pRqConf->pIntf = pIntf;
+    }
+
+    /*
+     * We're about to start sending content, so we need to force the HTTP
+     * headers to be sent at this point.  Otherwise, no headers will be sent
+     * at all.  We can set any we like first, of course.  **NOTE** Here's
+     * where you set the "Content-type" header, and you do so by putting it in
+     * r->content_type, *not* r->headers_out("Content-type").  If you don't
+     * set it, it will be filled in with the server's default type (typically
+     * "text/plain").  You *must* also ensure that r->content_type is lower
+     * case.
+     *
+     * We also need to start a timer so the server can know if the connection
+     * is broken.
+     */
+    ap_soft_timeout("gsoap xml response", r);
+    /*
+     * If we're only supposed to send header information (HEAD request), we're
+     * already there.
+     */
+    if(r->header_only)
+    {
+        ap_send_http_header(r);
+        ap_kill_timeout(r);
+        return OK;
+    }
+    if(NULL != pszError)
+    {
+        SendErrorMessage(r, pszError);
+        ap_kill_timeout(r);
+        return OK;
+    }
+    nRet = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK);
+    if(OK != nRet)
+    {
+        SendErrorMessage(r, "Failed to start receiving POST buffer");
+        ap_kill_timeout(r);
+        return OK;
+    }
+    nRet = ap_should_client_block(r);
+    if(0 == nRet)
+    {
+        SendErrorMessage(r, "No body received");
+        ap_kill_timeout(r);
+        return OK;
+    }
+
+    if(NULL != pszError)
+    {
+        ap_log_error(APLOG_MARK, APLOG_ERR, r->server, pszError);
+        SendErrorMessage(r, pszError);
+        ap_kill_timeout(r);
+        return OK;
+    }
+    if(NULL != pIntf->fsoap_init)
+    {
+        (*pIntf->fsoap_init) (psoap, r);
+        psoap->namespaces = pIntf->namespaces;
+        set_callbacks(r, pRqConf, psoap);
+        if(NULL != pIntf->fsoap_serve)
+        {
+            (*pIntf->fsoap_serve) (psoap, r);
+        }
+        else
+        {
+            SendErrorMessage(r, "no soap_serve entry point");
+            ap_kill_timeout(r);
+            return OK;
+        }
+        if(NULL != pIntf->fsoap_destroy)
+        {
+            pIntf->fsoap_destroy(psoap, r); // not an error in 2.1.10 any more.
+        }
+        if(NULL != pIntf->fsoap_end)
+        {
+            pIntf->fsoap_end(psoap, r);
+        }
+        else
+        {
+            SendErrorMessage(r, "no soap_end entry point");
+            ap_kill_timeout(r);
+        }
+        if(NULL != pIntf->fsoap_done)
+        {
+            pIntf->fsoap_done(psoap, r);
+        }
+        else
+        {
+            SendErrorMessage(r, "no soap_done entry point");
+            ap_kill_timeout(r);
+        }
+    }
+    else
+    {
+        SendErrorMessage(r, "no soap_init entry point");
+        ap_kill_timeout(r);
+        return OK;
+    }
+
+    /*
+     * We did what we wanted to do, so tell the rest of the server we
+     * succeeded. We need not delete pszResponse, because it was allocated from the request pool.
+     */
+    ap_kill_timeout(r);
+    return OK;
+}
+
+/*
+ * --------------------------------------------------------------------------
+ * *                                                                          
+ * * Now let's declare routines for each of the callback phase in order.      
+ * * (That's the order in which they're listed in the callback list, *not     
+ * * the order in which the server calls them!  See the command_rec           
+ * * declaration).  Note that these may be                                    
+ * * called for situations that don't relate primarily to our function - in   
+ * * other words, the fixup handler shouldn't assume that the request has     
+ * * to do with "gsoap" stuff.                                                
+ * *                                                                          
+ * * With the exception of the content handler, all of our routines will be   
+ * * called for each request, unless an earlier handler from another module   
+ * * aborted the sequence.                                                    
+ * *                                                                          
+ * * Handlers that are declared as "int" can return the following:            
+ * *                                                                          
+ * *  OK          Handler accepted the request and did its thing with it.     
+ * *  DECLINED    Handler took no action.                                     
+ * *  HTTP_mumble Handler looked at request and found it wanting.             
+ * *                                                                          
+ * * What the server does after calling a module handler depends upon the     
+ * * handler's return value.  In all cases, if the handler returns            
+ * * DECLINED, the server will continue to the next module with an handler    
+ * * for the current phase.  However, if the handler return a non-OK,         
+ * * non-DECLINED status, the server aborts the request right there.  If      
+ * * the handler returns OK, the server's next action is phase-specific;      
+ * * see the individual handler comments below for details.                   
+ * *                                                                          
+ * *--------------------------------------------------------------------------
+ */
+
+/*
+ * This function is called during server initialisation.  Any information
+ * that needs to be recorded must be in static cells, since there's no
+ * configuration record.
+ *
+ * There is no return value.
+ */
+
+static void
+gsoap_init(server_rec * s, pool * p)
+{
+    //    ap_log_error(APLOG_MARK, APLOG_ERR, s, "mod_gsoap initialized", NULL);
+}
+
+/*
+ * This function is called during server initialisation when an heavy-weight
+ * process (such as a child) is being initialised.  As with the
+ * module-initialisation function, any information that needs to be recorded
+ * must be in static cells, since there's no configuration record.
+ *
+ * There is no return value.
+ */
+
+static void
+gsoap_child_init(server_rec * s, pool * p)
+{
+}
+
+/*
+ * This function is called when an heavy-weight process (such as a child) is
+ * being run down or destroyed.  As with the child-initialisation function,
+ * any information that needs to be recorded must be in static cells, since
+ * there's no configuration record.
+ *
+ * There is no return value.
+ */
+
+static void
+gsoap_child_exit(server_rec * s, pool * p)
+{
+    //gsoapConfiguration::getLibraries()->clear();
+}
+
+/*
+ * This function gets called to create a per-directory configuration
+ * record.  This will be called for the "default" server environment, and for
+ * each directory for which the parser finds any of our directives applicable.
+ * If a directory doesn't have any of our directives involved (i.e., they
+ * aren't in the .htaccess file, or a <Location>, <Directory>, or related
+ * block), this routine will *not* be called - the configuration for the
+ * closest ancestor is used.
+ *
+ * The return value is a pointer to the created module-specific
+ * structure.
+ */
+static void *
+gsoap_create_dir_config(pool * p, char *dirspec)
+{
+    gsoapConfiguration *pConfig = gsoapConfiguration_create(p);
+
+    pConfig->m_Type = ct_directory;
+    return pConfig;
+}
+
+/*
+ * This function gets called to merge two per-directory configuration
+ * records.  This is typically done to cope with things like .htaccess files
+ * or <Location> directives for directories that are beneath one for which a
+ * configuration record was already created.  The routine has the
+ * responsibility of creating a new record and merging the contents of the
+ * other two into it appropriately.  If the module doesn't declare a merge
+ * routine, the record for the closest ancestor location (that has one) is
+ * used exclusively.
+ *
+ * The routine MUST NOT modify any of its arguments!
+ *
+ * The return value is a pointer to the created module-specific structure
+ * containing the merged values.
+ */
+static void *
+gsoap_merge_dir_config(pool * p, void *parent_conf, void *newloc_conf)
+{
+    gsoapConfiguration *pMergedConfig = gsoapConfiguration_create(p);
+    gsoapConfiguration *pParentConfig = (gsoapConfiguration *) parent_conf;
+    gsoapConfiguration *pNewConfig = (gsoapConfiguration *) newloc_conf;
+
+    gsoapConfiguration_merge(pMergedConfig, pParentConfig, pNewConfig);
+    return pMergedConfig;
+}
+
+/*
+ * This function gets called to create a per-server configuration
+ * record.  It will always be called for the "default" server.
+ *
+ * The return value is a pointer to the created module-specific
+ * structure.
+ */
+static void *
+gsoap_create_server_config(pool * p, server_rec * s)
+{
+    gsoapConfiguration *pConfig = gsoapConfiguration_create(p);
+
+    pConfig->m_Type = ct_server;
+    return pConfig;
+}
+
+/*
+ * This function gets called to merge two per-server configuration
+ * records.  This is typically done to cope with things like virtual hosts and
+ * the default server configuration. The routine has the responsibility of
+ * creating a new record and merging the contents of the other two into it
+ * appropriately. If the module doesn't declare a merge routine, the more
+ * specific existing record is used exclusively.
+ *
+ * The routine MUST NOT modify any of its arguments!
+ *
+ * The return value is a pointer to the created module-specific structure
+ * containing the merged values.
+ */
+static void *
+gsoap_merge_server_config(pool * p, void *server1_conf, void *server2_conf)
+{
+    gsoapConfiguration *pMergedConfig = gsoapConfiguration_create(p);
+    gsoapConfiguration *pServer1Config = (gsoapConfiguration *) server1_conf;
+    gsoapConfiguration *pServer2Config = (gsoapConfiguration *) server2_conf;
+
+    gsoapConfiguration_merge(pMergedConfig, pServer1Config, pServer2Config);
+    pMergedConfig->m_Type = ct_server;
+    return (void *)pMergedConfig;
+}
+
+/*
+ * This routine is called after the request has been read but before any other
+ * phases have been processed.  This allows us to make decisions based upon
+ * the input header fields.
+ *
+ * The return value is OK, DECLINED, or HTTP_mumble.  If we return OK, no
+ * further modules are called for this phase.
+ */
+static int
+gsoap_post_read_request(request_rec * r)
+{
+    return DECLINED;
+}
+
+/*
+ * This routine gives our module an opportunity to translate the URI into an
+ * actual filename.  If we don't do anything special, the server's default
+ * rules (Alias directives and the like) will continue to be followed.
+ *
+ * The return value is OK, DECLINED, or HTTP_mumble.  If we return OK, no
+ * further modules are called for this phase.
+ */
+static int
+gsoap_translate_handler(request_rec * r)
+{
+    return DECLINED;
+}
+
+/*
+ * This routine is called to check the authentication information sent with
+ * the request (such as looking up the user in a database and verifying that
+ * the [encrypted] password sent matches the one in the database).
+ *
+ * The return value is OK, DECLINED, or some HTTP_mumble error (typically
+ * HTTP_UNAUTHORIZED).  If we return OK, no other modules are given a chance
+ * at the request during this phase.
+ */
+static int
+gsoap_check_user_id(request_rec * r)
+{
+    return DECLINED;
+}
+
+/*
+ * This routine is called to check to see if the resource being requested
+ * requires authorisation.
+ *
+ * The return value is OK, DECLINED, or HTTP_mumble.  If we return OK, no
+ * other modules are called during this phase.
+ *
+ * If *all* modules return DECLINED, the request is aborted with a server
+ * error.
+ */
+static int
+gsoap_auth_checker(request_rec * r)
+{
+    return DECLINED;
+}
+
+/*
+ * This routine is called to check for any module-specific restrictions placed
+ * upon the requested resource.  (See the mod_access module for an example.)
+ *
+ * The return value is OK, DECLINED, or HTTP_mumble.  All modules with an
+ * handler for this phase are called regardless of whether their predecessors
+ * return OK or DECLINED.  The first one to return any other status, however,
+ * will abort the sequence (and the request) as usual.
+ */
+static int
+gsoap_access_checker(request_rec * r)
+{
+    return DECLINED;
+}
+
+/*
+ * This routine is called to determine and/or set the various document type
+ * information bits, like Content-type (via r->content_type), language, et
+ * cetera.
+ *
+ * The return value is OK, DECLINED, or HTTP_mumble.  If we return OK, no
+ * further modules are given a chance at the request for this phase.
+ */
+static int
+gsoap_type_checker(request_rec * r)
+{
+    return DECLINED;
+}
+
+/*
+ * This routine is called to perform any module-specific fixing of header
+ * fields, et cetera.  It is invoked just before any content-handler.
+ *
+ * The return value is OK, DECLINED, or HTTP_mumble.  If we return OK, the
+ * server will still call any remaining modules with an handler for this
+ * phase.
+ */
+static int
+gsoap_fixer_upper(request_rec * r)
+{
+    return OK;
+}
+
+/*
+ * This routine is called to perform any module-specific logging activities
+ * over and above the normal server things.
+ *
+ * The return value is OK, DECLINED, or HTTP_mumble.  If we return OK, any
+ * remaining modules with an handler for this phase will still be called.
+ */
+static int
+gsoap_logger(request_rec * r)
+{
+    return DECLINED;
+}
+
+/*
+ * This routine is called to give the module a chance to look at the request
+ * headers and take any appropriate specific actions early in the processing
+ * sequence.
+ *
+ * The return value is OK, DECLINED, or HTTP_mumble.  If we return OK, any
+ * remaining modules with handlers for this phase will still be called.
+ */
+static int
+gsoap_header_parser(request_rec * r)
+{
+    return DECLINED;
+}
+
+/** helper funciton for library command handler.
+ * @param pszPath the path of the library.
+ * @param bIsSOAPLibrary true if it is a shared library containing a SOAP server.
+ * @return true if the library was added, false if it was aleady in the collection.
+ */
+static bool
+AddSharedLibrary(gsoapConfiguration * pConfig, const char *pszPath,
+                 const bool bIsSOAPLibrary)
+{
+    bool bAdded = false;
+    pool *pPool = gsoapConfiguration_getModulePool();
+
+    if(!SoapSharedLibraries_contains(pConfig->m_pLibraries, pszPath))
+    {
+        SoapSharedLibrary *pLibrary = SoapSharedLibrary_create(pPool);
+
+        SoapSharedLibrary_init2(pLibrary, pPool, ap_pstrdup(pPool, pszPath));
+        pLibrary->m_bIsSOAPLibrary = bIsSOAPLibrary;
+        SoapSharedLibraries_addLibrary(pConfig->m_pLibraries, pLibrary);
+        bAdded = true;
+    }
+    return bAdded;
+}
+static gsoapConfiguration *
+getConfiguration(request_rec * r)
+{
+    return (gsoapConfiguration *) ap_get_module_config(r->per_dir_config,
+                                                       &gsoap_module);
+}
+static gsoapRequestConfiguration *
+getRequestConfiguration(struct soap *soap)
+{
+    gsoapRequestConfiguration *pRqConf =
+        (gsoapRequestConfiguration *) soap->fplugin(soap, GSOAP_ID);
+    return pRqConf;
+}
+
+
+/*
+ * Patch from Ryan Troll
+ *
+ * Implmement these as weak symbols, allowing symbol checking during
+ * compilation to succeed, even when another object is actually
+ * providing these symbols at runtime.
+ */
+SOAP_NMAC struct Namespace namespaces[] __attribute__ ((weak));
+SOAP_NMAC struct Namespace namespaces[] = {
+    {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/",
+     "http://www.w3.org/*/soap-envelope"},
+    {"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/",
+     "http://www.w3.org/*/soap-encoding"},
+    {"xsi", "http://www.w3.org/2001/XMLSchema-instance",
+     "http://www.w3.org/*/XMLSchema-instance"},
+    {"xsd", "http://www.w3.org/2001/XMLSchema",
+     "http://www.w3.org/*/XMLSchema"},
+    {NULL, NULL}
+};
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serializeheader(struct soap *soap)
+    __attribute__ ((weak));
+SOAP_FMAC3 void SOAP_FMAC4
+soap_serializeheader(struct soap *soap)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    pRqConf->pIntf->soap_serializeheader(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_putheader(struct soap *soap)
+    __attribute__ ((weak));
+SOAP_FMAC3 int SOAP_FMAC4
+soap_putheader(struct soap *soap)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    return pRqConf->pIntf->soap_putheader(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_getheader(struct soap *soap)
+    __attribute__ ((weak));
+SOAP_FMAC3 int SOAP_FMAC4
+soap_getheader(struct soap *soap)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    return pRqConf->pIntf->soap_getheader(soap);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_fault(struct soap *soap) __attribute__ ((weak));
+SOAP_FMAC3 void SOAP_FMAC4
+soap_fault(struct soap *soap)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    pRqConf->pIntf->soap_fault(soap);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serializefault(struct soap *soap)
+    __attribute__ ((weak));
+SOAP_FMAC3 void SOAP_FMAC4
+soap_serializefault(struct soap *soap)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    pRqConf->pIntf->soap_serializefault(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_putfault(struct soap *soap)
+    __attribute__ ((weak));
+SOAP_FMAC3 int SOAP_FMAC4
+soap_putfault(struct soap *soap)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    return pRqConf->pIntf->soap_putfault(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_getfault(struct soap *soap)
+    __attribute__ ((weak));
+SOAP_FMAC3 int SOAP_FMAC4
+soap_getfault(struct soap *soap)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    return pRqConf->pIntf->soap_getfault(soap);
+}
+
+SOAP_FMAC3 const char **SOAP_FMAC4 soap_faultcode(struct soap *soap)
+    __attribute__ ((weak));
+SOAP_FMAC3 const char **SOAP_FMAC4
+soap_faultcode(struct soap *soap)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    return pRqConf->pIntf->soap_faultcode(soap);
+}
+
+SOAP_FMAC3 const char **SOAP_FMAC4 soap_faultstring(struct soap *soap)
+    __attribute__ ((weak));
+SOAP_FMAC3 const char **SOAP_FMAC4
+soap_faultstring(struct soap *soap)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    return pRqConf->pIntf->soap_faultstring(soap);
+}
+
+SOAP_FMAC3 const char **SOAP_FMAC4 soap_faultdetail(struct soap *soap)
+    __attribute__ ((weak));
+SOAP_FMAC3 const char **SOAP_FMAC4
+soap_faultdetail(struct soap *soap)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    return pRqConf->pIntf->soap_faultdetail(soap);
+}
+
+/*
+ * Patch from Ryan Troll
+ *
+ * These may never be used within a server context.  However,
+ * gsoap-2.7.0e requires these functions to be defined.  Thus,
+ * we need to define them here.
+ *
+ */
+SOAP_FMAC3 void SOAP_FMAC4 soap_markelement(struct soap *soap, const void *a,
+                                            int b) __attribute__ ((weak));
+SOAP_FMAC3 void SOAP_FMAC4
+soap_markelement(struct soap *soap, const void *a, int b)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    return pRqConf->pIntf->soap_markelement(soap, a, b);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_putelement(struct soap *soap, const void *a,
+                                          const char *b, int c, int d)
+    __attribute__ ((weak));
+SOAP_FMAC3 int SOAP_FMAC4
+soap_putelement(struct soap *soap, const void *a, const char *b, int c, int d)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    return pRqConf->pIntf->soap_putelement(soap, a, b, c, d);
+}
+
+SOAP_FMAC3 void *SOAP_FMAC4 soap_getelement(struct soap *soap, int *a)
+    __attribute__ ((weak));
+SOAP_FMAC3 void *SOAP_FMAC4
+soap_getelement(struct soap *soap, int *a)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    return pRqConf->pIntf->soap_getelement(soap, a);
+}
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/requirements.txt b/mod_gsoap/mod_gsoap-0.6/apache_13/requirements.txt
new file mode 100644
index 0000000..58f58ea
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/requirements.txt
@@ -0,0 +1,3 @@
+apache compiled with --enable-module=so and installed
+apxs in path and working
+libtool installed.
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/stamp-h b/mod_gsoap/mod_gsoap-0.6/apache_13/stamp-h
new file mode 100644
index 0000000..9788f70
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/stamp-h
@@ -0,0 +1 @@
+timestamp
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/stamp-h.in b/mod_gsoap/mod_gsoap-0.6/apache_13/stamp-h.in
new file mode 100644
index 0000000..9788f70
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/stamp-h.in
@@ -0,0 +1 @@
+timestamp
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_13/stamp-h1 b/mod_gsoap/mod_gsoap-0.6/apache_13/stamp-h1
new file mode 100644
index 0000000..9788f70
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_13/stamp-h1
@@ -0,0 +1 @@
+timestamp
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_20/.indent.pro b/mod_gsoap/mod_gsoap-0.6/apache_20/.indent.pro
new file mode 100644
index 0000000..c327045
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_20/.indent.pro
@@ -0,0 +1,10 @@
+--braces-after-if-line 
+--indent-level4 
+-lp -di1 -nut -bli0 -npcs 
+-nsaf -nsaw -nsai
+-cdb -sc
+-nce
+--format-first-column-comments
+-Thandler_rec
+--line-length80
+--tab-size4
\ No newline at end of file
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_20/README.txt b/mod_gsoap/mod_gsoap-0.6/apache_20/README.txt
new file mode 100644
index 0000000..9c13df0
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_20/README.txt
@@ -0,0 +1,9 @@
+apache_gsoap.h			mod_gsoap module for Apache v2.0
+mod_gsoap.c			mod_gsoap module for Apache v2.0
+mod_gsoap.vcproj		MSVC project
+
+
+Here's how to compile mod_gsoap for apache 2:
+
+/usr/local/apache2/bin/apxs -a -i -c -I/path/to/gsoap/installation mod_gsoap.c
+
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_20/apache_gsoap.h b/mod_gsoap/mod_gsoap-0.6/apache_20/apache_gsoap.h
new file mode 100644
index 0000000..0fe8eb8
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_20/apache_gsoap.h
@@ -0,0 +1,185 @@
+/** Interface between the apache http - server (http://httpd.apache.org) and the gsoap SOAP stack (http://www.cs.fsu.edu/~engelen/soap.html)  
+  * @file apache_gsoap.h
+  */
+#ifndef _APACHE_GSOAP_H_INCLUDED
+#define _APACHE_GSOAP_H_INCLUDED
+
+/*
+ * need to include httpd.h for request rec definition 
+ */
+#include <httpd.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+#define APACHE_GSOAP_INTERFACE_VERSION 6
+#define APACHE_HTTPSERVER_ENTRY_POINT "apache_init_soap_interface"
+
+    /*
+     * calls soap_serve inside shared library 
+     */
+    typedef SOAP_FMAC1 void (SOAP_FMAC2 * apache_soap_init_fn) (struct soap *,
+                                                                request_rec *);
+
+    /*
+     * calls soap_init inside shared library
+     */
+    typedef SOAP_FMAC1 int (SOAP_FMAC2 * apache_soap_serve_fn) (struct soap *,
+                                                                request_rec *);
+
+    /*
+     * calls soap_destroy inside shared library 
+     */
+    typedef SOAP_FMAC1 void (SOAP_FMAC2 *
+                             apache_soap_destroy_fn) (struct soap *,
+                                                      request_rec *);
+
+    /*
+     * calls soap_end inside shared library 
+     */
+    typedef SOAP_FMAC1 void (SOAP_FMAC2 * apache_soap_end_fn) (struct soap *,
+                                                               request_rec *);
+
+    /*
+     * calls soap_done inside shared library 
+     */
+    typedef SOAP_FMAC1 void (SOAP_FMAC2 * apache_soap_done_fn) (struct soap *,
+                                                                request_rec *);
+
+    typedef SOAP_FMAC1 int (SOAP_FMAC2 *
+                            apache_soap_register_plugin_fn) (struct soap *,
+                                                             int (*fcreate)
+                                                             (struct soap *,
+                                                              struct
+                                                              soap_plugin *,
+                                                              void *),
+                                                             void *arg,
+                                                             request_rec *);
+
+    typedef SOAP_FMAC1 void *SOAP_FMAC2(*apache_soap_lookup_plugin_fn) (struct
+                                                                        soap *,
+                                                                        const
+                                                                        char *,
+                                                                        request_rec
+                                                                        *);
+
+    /*
+     * the callbacks normally used in the apache_soap_interface 
+     */
+    SOAP_FMAC1 void SOAP_FMAC2 apache_soap_soap_destroy(struct soap *,
+                                                        request_rec * r);
+    SOAP_FMAC1 void SOAP_FMAC2 apache_default_soap_init(struct soap *soap,
+                                                        request_rec * r);
+    SOAP_FMAC1 int SOAP_FMAC2 apache_default_soap_serve(struct soap *soap,
+                                                        request_rec * r);
+    SOAP_FMAC1 void SOAP_FMAC2 apache_default_soap_end(struct soap *soap,
+                                                       request_rec * r);
+    SOAP_FMAC1 void SOAP_FMAC2 apache_default_soap_done(struct soap *soap,
+                                                        request_rec * r);
+    SOAP_FMAC1 int SOAP_FMAC2 apache_default_soap_register_plugin_arg(struct
+                                                                      soap *, int
+                                                                       (*fcreate)
+                                                                      (struct
+                                                                       soap *,
+                                                                       struct
+                                                                       soap_plugin
+                                                                       *,
+                                                                       void *),
+                                                                      void
+                                                                      *arg,
+                                                                      request_rec
+                                                                      * r);
+    SOAP_FMAC1 void *SOAP_FMAC2 apache_default_soap_lookup_plugin(struct soap
+                                                                  *soap, const char
+                                                                  *plugin,
+                                                                  request_rec *
+                                                                  r);
+
+    struct apache_soap_interface {
+        unsigned int len;       ///< length of this struct in bytes (for version control).
+        unsigned int interface_version;
+        apache_soap_init_fn fsoap_init;
+        apache_soap_serve_fn fsoap_serve;
+        apache_soap_destroy_fn fsoap_destroy;
+        apache_soap_end_fn fsoap_end;
+        apache_soap_done_fn fsoap_done;
+        apache_soap_register_plugin_fn fsoap_register_plugin_arg;
+        apache_soap_lookup_plugin_fn fsoap_lookup_plugin;
+        void *reserved;         ///< variable reserved for apache module, must not be changed by server shared library.
+        struct Namespace *namespaces;
+        void (*soap_serializeheader) (struct soap * soap);
+        int (*soap_putheader) (struct soap * soap);
+        int (*soap_getheader) (struct soap * soap);
+        void (*soap_fault) (struct soap * soap);
+        void (*soap_serializefault) (struct soap * soap);
+        int (*soap_putfault) (struct soap * soap);
+        int (*soap_getfault) (struct soap * soap);
+        const char **(*soap_faultcode) (struct soap * soap);
+        const char **(*soap_faultstring) (struct soap * soap);
+        const char **(*soap_faultdetail) (struct soap * soap);
+        void (*soap_markelement) (struct soap *, const void *, int);
+        int (*soap_putelement) (struct soap *, const void *, const char *, int,
+                                int);
+        void *(*soap_getelement) (struct soap *, int *);
+    };
+
+    typedef void (*apache_init_soap_interface_fn) (struct apache_soap_interface
+                                                   *, request_rec *);
+
+    /*
+     * exported shared library function called by mod_gsoap from within apache http server 
+     *  This function fills the members of the apache_soap_interface struct. 
+     */
+    SOAP_FMAC1 void SOAP_FMAC2 apache_init_soap_interface(struct
+                                                          apache_soap_interface
+                                                          *, request_rec * r);
+
+#define IMPLEMENT_GSOAP_SERVER() \
+ SOAP_FMAC1 void SOAP_FMAC2 apache_soap_soap_destroy(struct soap *soap, request_rec *r) \
+    {return soap_destroy(soap);}\
+ SOAP_FMAC1 void SOAP_FMAC2 apache_default_soap_init(struct soap *soap, request_rec *r) \
+    {return soap_init(soap);}\
+ SOAP_FMAC1 int SOAP_FMAC2 apache_default_soap_serve(struct soap *soap, request_rec *r) \
+    {return soap_serve(soap);}\
+ SOAP_FMAC1 void SOAP_FMAC2 apache_default_soap_end(struct soap *soap, request_rec *r) \
+    {return soap_end(soap);}\
+ SOAP_FMAC1 void SOAP_FMAC2 apache_default_soap_done(struct soap *soap, request_rec *r) \
+    {return soap_done(soap);}\
+ SOAP_FMAC1 int SOAP_FMAC2 apache_default_soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap *, struct soap_plugin *, void *), void *arg, request_rec *r) \
+    {return soap_register_plugin_arg(soap, fcreate, arg);}\
+ SOAP_FMAC1 void* SOAP_FMAC2 apache_default_soap_lookup_plugin(struct soap *soap, const char *plugin, request_rec *r) \
+    {return soap_lookup_plugin(soap, plugin);}\
+void apache_init_soap_interface(struct apache_soap_interface *pInt, request_rec *r) {\
+ pInt->len = sizeof(struct apache_soap_interface);\
+ pInt->interface_version = APACHE_GSOAP_INTERFACE_VERSION;\
+ pInt->fsoap_init = apache_default_soap_init; \
+ pInt->fsoap_serve = apache_default_soap_serve;\
+ pInt->fsoap_destroy = apache_soap_soap_destroy;\
+ pInt->fsoap_end = apache_default_soap_end;\
+ pInt->fsoap_done = apache_default_soap_done;\
+ pInt->fsoap_register_plugin_arg = apache_default_soap_register_plugin_arg;\
+ pInt->fsoap_lookup_plugin = apache_default_soap_lookup_plugin;\
+ pInt->reserved = 0;\
+ pInt->namespaces = namespaces;\
+ pInt->soap_serializeheader = soap_serializeheader;\
+ pInt->soap_putheader = soap_putheader;\
+ pInt->soap_getheader = soap_getheader;\
+ pInt->soap_fault = soap_fault;\
+ pInt->soap_serializefault = soap_serializefault;\
+ pInt->soap_putfault = soap_putfault;\
+ pInt->soap_getfault = soap_getfault;\
+ pInt->soap_faultcode = soap_faultcode;\
+ pInt->soap_faultstring = soap_faultstring;\
+ pInt->soap_faultdetail = soap_faultdetail;\
+ pInt->soap_markelement = soap_markelement;\
+ pInt->soap_getelement = soap_getelement;\
+ pInt->soap_putelement = soap_putelement;\
+}
+
+#ifdef __cplusplus
+}
+#endif                          //__cplusplus
+#endif                          //_APACHE_GSOAP_H_INCLUDED
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_20/mod_gsoap.c b/mod_gsoap/mod_gsoap-0.6/apache_20/mod_gsoap.c
new file mode 100644
index 0000000..d973991
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_20/mod_gsoap.c
@@ -0,0 +1,1314 @@
+/** Apache gSOAP module for Apache 2.0
+ * @file mod_gsoap.c
+ *
+ * author Christian Aberger (http://www.aberger.at)
+ * ported to 2.0 Mick Wall (mick@mickandwendy.com)
+ * updated by Robert van Engelen (engelen@acm.org)
+ * updated by David Viner (dviner@apache.org)
+ *
+ * Contributed to the gSOAP package under the terms and conditions of the gSOAP
+ * open source public license.
+ *
+ */
+#if !defined(__GNUC__) || __GNUC__ < 2 || \
+    (__GNUC__ == 2 && __GNUC_MINOR__ < 7) ||\
+    defined(NEXT)
+#ifndef __attribute__
+#define __attribute__(__x)
+#endif
+#endif
+
+#include <stdio.h>
+#include <assert.h>
+//#include <ltdl.h>
+#include <dlfcn.h>
+#include "apr_strings.h"
+#include "apr_fnmatch.h"
+#include "apr_strings.h"
+#include "apr_lib.h"
+#include "apr_pools.h"
+
+#define APR_WANT_STRFUNC
+#include "apr_want.h"
+
+#include "httpd.h"
+#include "http_request.h"
+#include "http_config.h"
+#include "http_core.h"
+#include "http_log.h"
+#include "http_main.h"
+#include "http_protocol.h"
+#include "http_request.h"
+#include "util_script.h"
+#include "stdsoap2.h"           // standard header for gsoap
+#include "apache_gsoap.h"
+
+typedef int bool;
+
+#define false 0
+#define true ((int)0xffff)
+#define IOBUF_CHUNK_SIZE 8192
+#define GSOAP_ID "Apache 2.0 mod_gsoap gsoap httpd extension 0.0.6"
+
+static char mod_gsoap_id[] = GSOAP_ID;
+
+/** A shared library containing a SOAP server.
+ */
+typedef struct SoapSharedLibrary_S {
+    apr_pool_t *m_pPool;
+#ifdef WIN32
+#define DLSYM(a,b) GetProcAddress(a,b)
+#define DLOPEN(a,b) LoadLibrary(a)
+    HMODULE m_hLibrary;
+#else
+#define DLSYM(a,b) dlsym(a,b)
+#define DLOPEN(a,b) dlopen(a,b)
+    void *m_hLibrary;           ///< handle of the loaded libray.
+#endif
+    const char *m_pszPath;      ///< the path of the library, including the name.
+    bool m_bIsSOAPLibrary;      ///< is this library a SOAP library that contains the server factory entry point?
+} SoapSharedLibrary;
+
+/** Table of shared libraries that are already loaded.
+ * a singleton.
+ */
+typedef struct SoapSharedLibraries_S {
+    apr_pool_t *m_pPool;
+    SoapSharedLibrary *m_pSOAPLibrary;  ///< the main SOAP library that will serve our requests
+    apr_array_header_t *m_pLibraries;   ///< the array where we store our libraries.
+    apache_init_soap_interface_fn m_pfnEntryPoint;
+    struct apache_soap_interface *m_pIntf;
+    bool m_bAllLibrariesLoaded; ///< have all libraries in our libraries collection been already successfully loaded?
+} SoapSharedLibraries;
+
+/** Environment to which record applies (directory,
+ * server, or combination).
+ */
+typedef enum enConfigurationType {
+    ct_server = 1,              ///< used for per-server configuration
+    ct_directory = 2,           ///< used for per-directory configuration
+    ct_both = 3                 ///< used for both
+} ConfigurationType;
+
+/** Store the configuration information set in the Apache Server configuration directives.
+ * These are set e.g. in the file httpd.conf
+ * It's perfectly reasonable to have two different structures for the two
+ * different environments.  The same command handlers will be called for
+ * both, though, so the handlers need to be able to tell them apart.  One
+ * possibility is for both structures to start with an int which is zero for
+ * one and 1 for the other.
+ *
+ * Note that while the per-directory and per-server configuration records are
+ * available to most of the module handlers, they should be treated as
+ * READ-ONLY by all except the command and merge handlers.  Sometimes handlers
+ * are handed a record that applies to the current location by implication or
+ * inheritance, and modifying it will change the rules for other locations.
+ */
+typedef struct gsoapConfiguration_S {
+    SoapSharedLibraries *m_pLibraries;
+    ConfigurationType m_Type;   ///< the type of configuration environment
+} gsoapConfiguration;
+
+/** Our internal per request soap configuration
+ */
+typedef struct gsoapRequestConfiguration_S {
+    request_rec *r;             ///< the current request record.
+    char *m_pszAllHeaders;      ///< all headers received as a string, this is returned to gsoap's http_parse function before we return the body.
+    const char *m_pszCurrentHeaderReadingPosition;  ///< the position where the next header read operation will start.
+    unsigned int m_nHeaderLength;   ///< total length of all headers concatenated as string 
+    char *m_pOutBuf;            ///< output buffer
+    size_t m_nOutBufLength;     ///< allocated length of output buffer
+    size_t m_nOutBufCount;      ///< bytes in output buffer
+    int headers_sent;           ///< have http - headers already been sent to client us?
+    int headers_received;       ///< have the request headers already been passed to gsoap ? 
+    int (*http_parse) (struct soap *);  ///< the original gsoap parsing function.
+    struct apache_soap_interface *pIntf;
+} gsoapRequestConfiguration;
+
+
+/*
+ * To avoid leaking memory from pools other than the per-request one, we
+ * allocate a module-private pool.
+ */
+static apr_pool_t *the_gsoapPool = NULL;
+
+/** @return our apr_pool_tfor gsoapConfiguration */
+static apr_pool_t *
+gsoapConfiguration_getModulePool()
+{
+    if(NULL == the_gsoapPool)
+    {
+        apr_pool_create_ex(&the_gsoapPool, NULL, NULL, NULL);
+    }
+    return the_gsoapPool;
+}
+static gsoapConfiguration *getConfiguration(request_rec * r);
+static gsoapRequestConfiguration *getRequestConfiguration(struct soap *);
+
+/**
+   @param p the apr_pool_tto use for memory allocations.
+   @param pszPath the path of the library.
+*/
+static void
+SoapSharedLibrary_init(SoapSharedLibrary * This, apr_pool_t * p,
+                       const SoapSharedLibrary * pLib)
+{
+    This->m_pPool = p;
+    This->m_hLibrary = NULL;
+    This->m_pszPath = apr_pstrdup(p, pLib->m_pszPath);
+    This->m_bIsSOAPLibrary = pLib->m_bIsSOAPLibrary;
+}
+static void
+SoapSharedLibrary_init2(SoapSharedLibrary * This, apr_pool_t * p,
+                        const char *pszPath)
+{
+    This->m_pPool = p;
+    This->m_hLibrary = NULL;
+    This->m_pszPath = apr_pstrdup(p, pszPath);
+    This->m_bIsSOAPLibrary = false;
+}
+static void
+SoapSharedLibrary_clear(SoapSharedLibrary * This, apr_pool_t * p)
+{
+    This->m_pPool = p;
+    This->m_hLibrary = NULL;
+    This->m_pszPath = NULL;
+    This->m_bIsSOAPLibrary = false;
+}
+static SoapSharedLibrary *
+SoapSharedLibrary_create(apr_pool_t * p)
+{
+    SoapSharedLibrary *This =
+        (SoapSharedLibrary *) apr_pcalloc(p, sizeof(SoapSharedLibrary));
+    SoapSharedLibrary_clear(This, p);
+    return This;
+}
+
+/*
+ * SoapSharedLibrary_assign(SoapSharedLibrary *This, SoapSharedLibrary *pLib) {
+ * This->m_pPool = pLib->m_pPool;
+ * This->m_hLibrary = NULL;
+ * This->m_pszPath = ap_strdup(m_pPool, pLib->m_pszPath);
+ * This->m_bIsSoapLibrary = pLib->m_bIsSoapLibrary;
+ * }
+ */
+/**
+ *	@param pTempPool pool to use for allocating temporary objects (e.g. error message).
+ */
+static const char *
+SoapSharedLibrary_load(SoapSharedLibrary * This, apr_pool_t * pTempPool)
+{
+    const char *pszError = NULL;
+
+#ifdef WIN32
+    This->m_hLibrary = DLOPEN(This->m_pszPath);
+
+    if(!This->m_hLibrary)
+    {
+        LPVOID lpMsgBuf;
+
+        FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
+                      (LPTSTR) & lpMsgBuf, 0, NULL);
+        pszError =
+            apr_psprintf(NULL == pTempPool ? This->m_pPool : pTempPool,
+                         "Load of %s failed with %s", This->m_pszPath,
+                         lpMsgBuf);
+        LocalFree(lpMsgBuf);
+
+    }
+#else
+    const int nFlags = RTLD_LAZY | RTLD_GLOBAL;
+
+    This->m_hLibrary = (void *)DLOPEN(This->m_pszPath, nFlags);
+    pszError = dlerror();
+#endif
+    if(NULL == This->m_hLibrary)
+    {
+        pszError =
+            apr_psprintf(NULL == pTempPool ? This->m_pPool : pTempPool,
+                         "mod_gsoap: %s loading library %s", pszError,
+                         This->m_pszPath);
+    }
+
+    return pszError;
+}
+
+/*-------------------------------------------------------*/
+static void
+SoapSharedLibraries_init(SoapSharedLibraries * This, apr_pool_t * p)
+{
+    This->m_pSOAPLibrary = NULL;
+    This->m_pPool = p;
+    This->m_pSOAPLibrary = NULL;
+    This->m_pLibraries = apr_array_make(p, 0, sizeof(SoapSharedLibrary **));
+    This->m_bAllLibrariesLoaded = false;
+    This->m_pfnEntryPoint = NULL;
+    This->m_pIntf =
+        (struct apache_soap_interface *)apr_pcalloc(p,
+                                                    sizeof(struct
+                                                           apache_soap_interface));
+}
+static SoapSharedLibrary *
+SoapSharedLibraries_getLibrary(SoapSharedLibraries * This, unsigned nIndex)
+{
+    SoapSharedLibrary **ppLibs = NULL;
+    SoapSharedLibrary *pLib = NULL;
+
+    assert(NULL != This);
+    assert(NULL != This->m_pLibraries);
+    assert(nIndex >= 0);
+    assert(nIndex < This->m_pLibraries->nelts);
+    ppLibs = (SoapSharedLibrary **) This->m_pLibraries->elts;
+    pLib = ppLibs[nIndex];
+    return pLib;
+}
+
+/**
+ * @param pszPath the operating system name of the library.
+ */
+static bool
+SoapSharedLibraries_contains(SoapSharedLibraries * This, const char *pszPath)
+{
+    int i = 0;
+    bool bContains = false;
+
+    for(i = 0; i < This->m_pLibraries->nelts && !bContains; i++)
+    {
+        SoapSharedLibrary *pLib = SoapSharedLibraries_getLibrary(This, i);
+
+        assert(NULL != pLib);
+        if(0 == strcmp(pszPath, pLib->m_pszPath))
+        {
+            bContains = true;
+        }
+    }
+    return bContains;
+}
+static void
+SoapSharedLibraries_addLibrary(SoapSharedLibraries * This,
+                               SoapSharedLibrary * pLibrary)
+{
+    assert(NULL != pLibrary);
+    This->m_bAllLibrariesLoaded = false;
+    if(!SoapSharedLibraries_contains(This, pLibrary->m_pszPath))
+    {
+        SoapSharedLibrary **ppNewLib =
+            (SoapSharedLibrary **) apr_array_push(This->m_pLibraries);
+        *ppNewLib = pLibrary;
+        if(pLibrary->m_bIsSOAPLibrary)
+        {
+            This->m_pSOAPLibrary = pLibrary;
+        }
+    }
+}
+static const char *
+SoapSharedLibraries_getEntryPoints(SoapSharedLibraries * This,
+                                   SoapSharedLibrary * pLib,
+                                   apr_pool_t * pTempPool, request_rec * r)
+{
+    /*
+     * now we also pass the request record 
+     */
+    (*This->m_pfnEntryPoint) (This->m_pIntf, r);
+    return NULL;
+}
+
+/**
+ * @return the error message if a load failed, NULL on success.
+ */
+static const char *
+SoapSharedLibraries_loadAllLibraries(SoapSharedLibraries
+                                     * This, apr_pool_t * pTempPool,
+                                     request_rec * r)
+{
+    bool bAllLibrariesLoaded = false;
+    const char *pszError = NULL;
+    bool bRetry = false;
+    int i = 0;
+    int nRetry = 0;
+
+    assert(NULL != This);
+
+
+    if(This->m_bAllLibrariesLoaded)
+    {
+        return NULL;
+    }
+    for(nRetry = 0; nRetry < 5 && !bAllLibrariesLoaded; nRetry++)
+    {
+        do
+        {
+            pszError = NULL;
+            bRetry = false;     // don't try it again.
+            bAllLibrariesLoaded = true;
+            for(i = 0; i < This->m_pLibraries->nelts; i++)
+            {
+                SoapSharedLibrary *pLib =
+                    SoapSharedLibraries_getLibrary(This, i);
+                if(NULL == pLib->m_hLibrary)
+                {
+                    pszError = SoapSharedLibrary_load(pLib, pTempPool);
+                    if(NULL == pszError)
+                    {
+                        assert(NULL != pLib->m_hLibrary);
+                        bRetry = true;  ///< we loaded one, lets retry with all others, maybe they depend on that.
+                    }
+                    else
+                    {
+                        bAllLibrariesLoaded = false;
+                    }
+                    if(NULL != pLib->m_hLibrary && pLib->m_bIsSOAPLibrary)
+                    {
+                        void *pfun = (void *)DLSYM(pLib->m_hLibrary,
+                                                   APACHE_HTTPSERVER_ENTRY_POINT);
+
+                        if(NULL == pfun)
+                        {
+                            pszError = apr_psprintf(pTempPool,
+                                                    "gsoap: load library \"%s\" success, but failed to find the \"%s\" entry point",
+                                                    pLib->m_pszPath,
+                                                    APACHE_HTTPSERVER_ENTRY_POINT);
+                            return pszError;
+                        }
+                        else
+                        {
+                            This->m_pfnEntryPoint =
+                                (apache_init_soap_interface_fn) pfun;
+                            pszError =
+                                SoapSharedLibraries_getEntryPoints(This, pLib,
+                                                                   pTempPool,
+                                                                   r);
+                            pszError =
+                                apr_psprintf(NULL ==
+                                             pTempPool ? This->
+                                             m_pPool : pTempPool,
+                                             "mod_gsoap: has got entrypoint %s from library",
+                                             APACHE_HTTPSERVER_ENTRY_POINT);
+
+                        }
+                    }
+                }
+            }
+        }
+        while(bRetry);
+    }
+    if(bAllLibrariesLoaded)
+    {
+        This->m_bAllLibrariesLoaded = true;
+        pszError = NULL;
+    }
+    return pszError;
+}
+static void
+SoapSharedLibraries_merge(SoapSharedLibraries * This,
+                          SoapSharedLibraries * pLibs)
+{
+    int i = 0;
+
+    assert(NULL != This);
+    if(NULL == pLibs)
+    {
+        return;
+    }
+    This->m_bAllLibrariesLoaded = false;
+    for(i = 0; i < pLibs->m_pLibraries->nelts; i++)
+    {
+        SoapSharedLibrary *pLib = SoapSharedLibraries_getLibrary(pLibs, i);
+
+        if(!SoapSharedLibraries_contains(This, pLib->m_pszPath))
+        {
+            SoapSharedLibrary *pNewLib =
+                SoapSharedLibrary_create(This->m_pPool);
+            SoapSharedLibrary_init(pNewLib, This->m_pPool, pLib);
+            SoapSharedLibraries_addLibrary(This, pNewLib);
+        }
+    }
+}
+static void
+SoapSharedLibraries_merge3(SoapSharedLibraries * This,
+                           SoapSharedLibraries * libraries1,
+                           SoapSharedLibraries * libraries2)
+{
+    SoapSharedLibraries_merge(This, libraries1);
+    SoapSharedLibraries_merge(This, libraries2);
+}
+static void
+gsoapConfiguration_merge(gsoapConfiguration * This,
+                         gsoapConfiguration * pParentConfig,
+                         gsoapConfiguration * pNewConfig)
+{
+    assert(NULL != This);
+    SoapSharedLibraries_merge3(This->m_pLibraries, pParentConfig->m_pLibraries,
+                               pNewConfig->m_pLibraries);
+    This->m_Type = ct_both;
+}
+static void
+gsoapConfiguration_init(gsoapConfiguration * This, apr_pool_t * p)
+{
+    This->m_pLibraries =
+        (SoapSharedLibraries *) apr_pcalloc(p, sizeof(SoapSharedLibraries));
+    SoapSharedLibraries_init(This->m_pLibraries, p);
+    This->m_Type = ct_directory;
+}
+static gsoapConfiguration *
+gsoapConfiguration_create(apr_pool_t * p)
+{
+    gsoapConfiguration *pConfig =
+        (gsoapConfiguration *) apr_pcalloc(p, sizeof(gsoapConfiguration));
+    gsoapConfiguration_init(pConfig, p);
+    return pConfig;
+}
+
+/*
+ * forward declarations                                                     
+ */
+static int gsoap_handler(request_rec * r);
+static int gsoap_init(apr_pool_t * p, apr_pool_t * ptemp, apr_pool_t * plog,
+                      server_rec * psrec);
+static void *gsoap_create_dir_config(apr_pool_t * p, char *dirspec);
+static void *gsoap_merge_dir_config(apr_pool_t * p, void *parent_conf,
+                                    void *newloc_conf);
+static void *gsoap_create_server_config(apr_pool_t * p, server_rec * s);
+static void *gsoap_merge_server_config(apr_pool_t * p, void *server1_conf,
+                                       void *server2_conf);
+
+static bool AddSharedLibrary(gsoapConfiguration * pConfig, const char *pszPath,
+                             const bool bIsSOAPLibrary);
+
+
+/*
+ * *
+ * * We prototyped the various syntax for command handlers (routines that     
+ * * are called when the configuration parser detects a directive declared    
+ * * by our module) earlier.  Now we actually declare a "real" routine that   
+ * * will be invoked by the parser when our "real" directive is               
+ * * encountered.                                                             
+ * 
+ * * If a command handler encounters a problem processing the directive, it   
+ * * signals this fact by returning a non-NULL pointer to a string            
+ * * describing the problem.                                                  
+ * 
+ * * The magic return value DECLINE_CMD is used to deal with directives       
+ * * that might be declared by multiple modules.  If the command handler      
+ * * returns NULL, the directive was processed; if it returns DECLINE_CMD,    
+ * * the next module (if any) that declares the directive is given a chance   
+ * * at it.  If it returns any other value, it's treated as the text of an    
+ * * error message.                                                           
+ */
+
+/** Command handler for the TAKE1 "SOAPLibrary" directive.
+ * We remember the load path for the shared library that contains the SOAP server.
+ */
+static const char *
+cmd_SoapLibrary(cmd_parms * cmd, void *mconfig, const char *pszPath)
+{
+    gsoapConfiguration *pConfig = (gsoapConfiguration *) mconfig;
+
+    AddSharedLibrary(pConfig, pszPath, true);
+    return NULL;
+}
+
+/** Command handler for the TAKE1 "SOAPSupportLibrary" directive.
+ * We remember the load path for a shared library that must additionally loaded.
+ * This is a mechanism to load libraries that the SOAPLibrary depends on.
+ * This type of libraries do not contain our soap server.
+ */
+static const char *
+cmd_SupportLibrary(cmd_parms * cmd, void *mconfig, const char *pszPath)
+{
+    gsoapConfiguration *pConfig = (gsoapConfiguration *) mconfig;
+
+    AddSharedLibrary(pConfig, pszPath, false);
+    return NULL;
+}
+
+typedef const char *(*command_function_interface) ();
+
+/** List of directives specific to our module.
+ */
+static const command_rec gsoap_cmds[] = {
+    AP_INIT_TAKE1("SOAPLibrary",    ///< directive name
+                  (command_function_interface) cmd_SoapLibrary, ///< config action routine
+                  NULL,         ///< argument to include in call
+                  ACCESS_CONF,  ///< where available
+                  "SOAP shared Library that will be dynamically loaded. - 1 argument (path)"    ///< directive description
+        ),
+    AP_INIT_TAKE1("SupportLibrary", ///< directive name
+                  (command_function_interface) cmd_SupportLibrary,  ///< config action routine
+                  NULL,         ///< argument to include in call
+                  ACCESS_CONF,  ///< where available
+                  "additional library that must be dynamically loaded - 1 argument (path)"  ///< directive description
+        ),
+    {NULL}
+};
+
+/*
+ * All of the routines have been declared now.  Here's the list of          
+ * directives specific to our module, and information about where they      
+ * may appear and how the command parser should pass them to us for         
+ * processing.  Note that care must be taken to ensure that there are NO    
+ * collisions of directive names between modules.                           
+ */
+
+/*
+ * Module definition for configuration.  If a particular callback is not
+ * needed, replace its routine name below with the word NULL.
+ *
+ * The number in brackets indicates the order in which the routine is called
+ * during request processing.  Note that not all routines are necessarily
+ * called (such as if a resource doesn't have access restrictions).
+ */
+
+/** List of callback routines and data structures that provide the hooks into our module.
+ */
+
+static void
+gsoap_hooks(apr_pool_t * p)
+{
+    // I think this is the call to make to register a handler for method calls (GET PUT et. al.).
+    // We will ask to be last so that the comment has a higher tendency to
+    // go at the end.
+    ap_hook_handler(gsoap_handler, NULL, NULL, APR_HOOK_LAST);
+
+    //Register a handler for post config processing 
+    ap_hook_post_config(gsoap_init, NULL, NULL, APR_HOOK_MIDDLE);
+}
+
+
+module AP_MODULE_DECLARE_DATA gsoap_module = {
+    STANDARD20_MODULE_STUFF,
+    gsoap_create_dir_config,    /* per-directory config creator */
+    gsoap_merge_dir_config,     /* dir config merger */
+    gsoap_create_server_config, /* server config creator */
+    gsoap_merge_server_config,  /* server config merger */
+    gsoap_cmds,                 /* command table */
+    gsoap_hooks,                /*hooks */
+};
+
+/** helper to write out the headers */
+static int
+ListHeadersCallback(void *rec, const char *key, const char *value)
+{
+    request_rec *r = (request_rec *) rec;
+
+    ap_rprintf(r, "%s: %s<br>", key, value);
+    return 1;
+}
+
+/** write out the headers of the request. */
+static void
+ListHeaders(request_rec * r)
+{
+    apr_table_do(ListHeadersCallback, r, r->headers_in, NULL);
+}
+
+/** send the error message to the client browser */
+static void
+SendErrorMessage(request_rec * r, const char *pszError)
+{
+    ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, "mod_gsoap: %s",
+                 pszError);
+    r->content_type = "text/html";
+    ap_rputs(DOCTYPE_HTML_3_2, r);
+    ap_rputs("<HTML>\n", r);
+    ap_rputs(" <HEAD>\n", r);
+    ap_rputs("  <TITLE>Apache Soap Handler\n", r);
+    ap_rputs("  </TITLE>\n", r);
+    ap_rputs(" </HEAD>\n", r);
+    ap_rputs(" <BODY>\n", r);
+    ap_rputs("  <H1>mod_gsoap Apache SOAP Server Error</H1>\n", r);
+    ap_rprintf(r,
+               "<p><strong>%s</strong><br>Please see the documentation at <a href=\"http://www.webware.at/SOAP\">WebWare</a> for details.</p>",
+               pszError);
+    ap_rputs("  <H2>Content headers of the request</H2>\n", r);
+    ListHeaders(r);
+    ap_rputs("</BODY></HTML>\n", r);
+}
+static int
+send_header_to_gsoap(void *pvoid, const char *key, const char *value)
+{
+    gsoapRequestConfiguration *pRqConf = NULL;
+    struct soap *psoap = (struct soap *)pvoid;
+
+    if(NULL != psoap)
+    {
+        pRqConf = getRequestConfiguration(psoap);
+    }
+    if(NULL == pRqConf)
+    {
+        return 0;
+    }
+    if(0 == strcasecmp(key, "SOAPAction") ||
+       0 == strcasecmp(key, "Content-Type") ||
+       0 == strcasecmp(key, "Status") || 0 == strcasecmp(key, "Content-Length"))
+    {
+        psoap->fparsehdr(psoap, key, value);
+    }
+    return 1;
+}
+
+/*
+ * Callback functions for gsoap. We must parse the headers ourselves and 
+ *  we must handle send/receive properly.  
+ */
+static int
+http_post_header(struct soap *soap, const char *key, const char *value)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+    request_rec *r = NULL == pRqConf ? NULL : pRqConf->r;
+
+    if(NULL != value)
+    {
+        if(0 == strcasecmp(key, "SOAPAction"))
+        {
+            apr_table_set(r->headers_out, key, value);
+        }
+        else if(0 == strcasecmp(key, "Content-Type"))
+        {
+            r->content_type = apr_pstrdup(r->pool, value);
+        }
+        else if(0 == strcasecmp(key, "Content-Length"))
+        {
+            ap_set_content_length(r, atoi(value));
+        }
+    }
+    return SOAP_OK;
+}
+
+/** 
+gsoap function that requests the next piece of data from us */
+static size_t
+frecv(struct soap *psoap, char *pBuf, apr_size_t len)
+{
+    request_rec *r = NULL;
+    apr_size_t nRet = 0;
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(psoap);
+
+    if(NULL != pRqConf)
+    {
+        r = pRqConf->r;
+        if(!pRqConf->headers_received)
+        {
+            apr_table_do(send_header_to_gsoap, psoap, r->headers_in, NULL);
+            pRqConf->headers_received = true;
+        }
+        if(r->remaining > 0)
+        {
+            nRet =
+                ap_get_client_block(r, pBuf,
+                                    len > r->remaining ? r->remaining : len);
+        }
+    }
+    return nRet;
+}
+static int
+fsend(struct soap *psoap, const char *pBuf, apr_size_t len)
+{
+    int nRet = SOAP_OK;
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(psoap);
+
+    if(NULL != pRqConf)
+    {
+        request_rec *r = pRqConf->r;
+
+        if(!pRqConf->headers_sent)
+        {
+            //          ap_send_http_header(r);
+            pRqConf->headers_sent = true;
+        }
+        nRet = ap_rwrite(pBuf, len, r) == len ? SOAP_OK : SOAP_FAULT;
+    }
+    else
+    {
+        nRet = SOAP_FAULT;
+    }
+    return nRet;
+}
+
+/** instead of real header parsing we skip that. */
+static int
+http_parse(struct soap *psoap)
+{
+    return SOAP_OK;
+}
+
+/** make sure we go through soap_send_fault(), which calls fpoll */
+static int
+fpoll(struct soap *psoap)
+{
+    return SOAP_OK;
+}
+
+/*
+ * plugin functions 
+ */
+static int
+mod_gsoap_plugin_copy(struct soap *soap, struct soap_plugin *dst,
+                      struct soap_plugin *src)
+{
+    /*
+     * should this be a deep copy? 
+     */
+    *dst = *src;
+    return SOAP_OK;
+}
+static void
+mod_gsoap_delete(struct soap *soap, struct soap_plugin *p)
+{
+}
+static int
+mod_gsoap_plugin(struct soap *soap, struct soap_plugin *p, void *arg)
+{
+    p->id = mod_gsoap_id;
+    p->data = arg;
+    p->fcopy = mod_gsoap_plugin_copy;
+    p->fdelete = mod_gsoap_delete;
+    return SOAP_OK;
+}
+static void
+set_callbacks(request_rec * r, gsoapRequestConfiguration * pRqConf,
+              struct soap *psoap)
+{
+    gsoapConfiguration *pConfig = getConfiguration(r);
+    struct apache_soap_interface *pIntf = pConfig->m_pLibraries->m_pIntf;
+
+    pRqConf->r = r;
+    pRqConf->http_parse = psoap->fparse;
+    psoap->user = pRqConf;
+    psoap->frecv = frecv;
+    psoap->fsend = fsend;
+    psoap->fparse = http_parse;
+    psoap->fposthdr = http_post_header;
+    psoap->fpoll = fpoll;
+    if(NULL != pIntf->fsoap_init)
+    {
+        (*pIntf->fsoap_register_plugin_arg) (psoap, mod_gsoap_plugin,
+                                             (void *)pRqConf, r);
+    }
+    else
+    {
+        psoap->user = pRqConf;
+    }
+}
+
+/*
+ * 
+ * * Now we declare our content handlers, which are invoked when the server   
+ * * encounters a document which our module is supposed to have a chance to   
+ * * see.  (See mod_mime's SetHandler and AddHandler directives, and the      
+ * * mod_info and mod_status examples, for more details.)                     
+ * 
+ * * Since content handlers are dumping data directly into the connexion      
+ * * (using the r*() routines, such as rputs() and rprintf()) without         
+ * * intervention by other parts of the server, they need to make             
+ * * sure any accumulated HTTP headers are sent first.  This is done by       
+ * * calling send_http_header().  Otherwise, no header will be sent at all,   
+ * * and the output sent to the client will actually be HTTP-uncompliant.     
+ */
+
+/**
+ * SOAP content handler.
+ *
+ * @return the value that instructs the caller concerning what happened and what to do next.
+ *  OK ("we did our thing")
+ *  DECLINED ("this isn't something with which we want to get involved")
+ *  HTTP_mumble ("an error status should be reported")
+ */
+static int
+gsoap_handler(request_rec * r)
+{
+    static const int nResponseBufferLen = IOBUF_CHUNK_SIZE;
+    const char *pszError = NULL;
+    struct soap *psoap = NULL;
+    struct apache_soap_interface *pIntf = NULL;
+    int nRet = 0;
+    char *pszResponse = NULL;
+    gsoapConfiguration *pConfig = getConfiguration(r);
+    gsoapRequestConfiguration *pRqConf = NULL;
+
+    /*
+     * only handle soap requests 
+     */
+    if(!strstr(r->handler, "soap"))
+        return DECLINED;
+
+    /*
+     * only handle POST requests 
+     */
+    if(r->method_number != M_POST && r->method_number != M_GET)
+        return DECLINED;
+
+    pszResponse = apr_pcalloc(r->pool, nResponseBufferLen);
+    assert(NULL != pConfig);
+
+    psoap = (struct soap *)apr_pcalloc(r->pool, sizeof(struct soap));
+    pRqConf = apr_pcalloc(r->pool, sizeof(gsoapRequestConfiguration));
+    pszError =
+        SoapSharedLibraries_loadAllLibraries(pConfig->m_pLibraries, r->pool, r);
+
+    pIntf = pConfig->m_pLibraries->m_pIntf;
+
+    ap_update_mtime(r, r->request_time);
+    ap_set_last_modified(r);
+    if(NULL != pszError)
+    {
+        static bool bFirstTime = true;
+
+        if(bFirstTime)
+        {
+            ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, pszError);
+            bFirstTime = false;
+        }
+    }
+
+    /*
+     * as a next step, we prepare a buffer that sends the request as first line to gsoap. 
+     * Then the remaining data. 
+     * We start returning bytes on frecv from this buffer, until it is empty. 
+     * then it is not necessary to fiddle around with gsoap's request line parsing.
+     */
+    if(NULL == pszError)
+    {
+        pRqConf->r = r;
+        pRqConf->headers_sent = false;
+        pRqConf->headers_received = false;
+        pRqConf->m_pszAllHeaders = NULL;
+        pRqConf->m_nHeaderLength = strlen(r->the_request) + 2;
+        pRqConf->m_pszCurrentHeaderReadingPosition = NULL;
+        pRqConf->m_nOutBufCount = 0;
+        pRqConf->m_nOutBufLength = nResponseBufferLen;
+        pRqConf->m_pOutBuf = apr_pcalloc(r->pool, nResponseBufferLen);
+        pRqConf->http_parse = NULL;
+        pRqConf->m_pszAllHeaders =
+            apr_pcalloc(r->pool, pRqConf->m_nHeaderLength + 1);
+        pRqConf->m_pszCurrentHeaderReadingPosition = pRqConf->m_pszAllHeaders;
+        strcpy(pRqConf->m_pszAllHeaders, r->the_request);
+        strcat(pRqConf->m_pszAllHeaders, "\r\n");
+        pRqConf->pIntf = pIntf;
+    }
+
+    /*
+     * We're about to start sending content, so we need to force the HTTP
+     * headers to be sent at this point.  Otherwise, no headers will be sent
+     * at all.  We can set any we like first, of course.  **NOTE** Here's
+     * where you set the "Content-type" header, and you do so by putting it in
+     * r->content_type, *not* r->headers_out("Content-type").  If you don't
+     * set it, it will be filled in with the server's default type (typically
+     * "text/plain").  You *must* also ensure that r->content_type is lower
+     * case.
+     *
+     */
+
+    /*
+     * If we're only supposed to send header information (HEAD request), we're
+     * already there.
+     */
+    if(r->header_only)
+    {
+        return OK;
+    }
+    if(NULL != pszError)
+    {
+        SendErrorMessage(r, pszError);
+        return OK;
+    }
+    nRet = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK);
+    if(OK != nRet)
+    {
+        SendErrorMessage(r, "Failed to start receiving POST buffer");
+        return OK;
+    }
+    nRet = ap_should_client_block(r);
+    if(0 == nRet)
+    {
+        SendErrorMessage(r, "No body received");
+        return OK;
+    }
+
+    if(NULL != pszError)
+    {
+        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, pszError);
+        SendErrorMessage(r, pszError);
+        return OK;
+    }
+    if(NULL != pIntf->fsoap_init)
+    {
+        (*pIntf->fsoap_init) (psoap, r);
+        psoap->namespaces = pIntf->namespaces;
+        set_callbacks(r, pRqConf, psoap);
+        if(NULL != pIntf->fsoap_serve)
+        {
+            nRet = (*pIntf->fsoap_serve) (psoap, r);
+        }
+        else
+        {
+            SendErrorMessage(r, "no soap_serve entry point");
+            return OK;
+        }
+        if(NULL != pIntf->fsoap_destroy)
+        {
+            pIntf->fsoap_destroy(psoap, r); // not an error in 2.1.10 any more.
+        }
+        if(NULL != pIntf->fsoap_end)
+        {
+            pIntf->fsoap_end(psoap, r);
+        }
+        else
+        {
+            SendErrorMessage(r, "no soap_end entry point");
+        }
+        if(NULL != pIntf->fsoap_done)
+        {
+            pIntf->fsoap_done(psoap, r);
+        }
+        else
+        {
+            SendErrorMessage(r, "no soap_done entry point");
+        }
+    }
+    else
+    {
+        SendErrorMessage(r, "no soap_init entry point");
+        return OK;
+    }
+
+    /*
+     * We did what we wanted to do, so tell the rest of the server we
+     * succeeded. We need not delete pszResponse, because it was allocated from the request pool.
+     */
+    return OK;
+}
+
+/*
+ * Now let's declare routines for each of the callback phase in order.      
+ * (That's the order in which they're listed in the callback list, *not     
+ * the order in which the server calls them!  See the command_rec           
+ * declaration).  Note that these may be                                    
+ * called for situations that don't relate primarily to our function - in   
+ * other words, the fixup handler shouldn't assume that the request has     
+ * to do with "gsoap" stuff.                                                
+ 
+ * With the exception of the content handler, all of our routines will be   
+ * called for each request, unless an earlier handler from another module   
+ * aborted the sequence.                                                    
+ *
+ * Handlers that are declared as "int" can return the following:            
+ * OK          Handler accepted the request and did its thing with it.     
+ * DECLINED    Handler took no action.                                     
+ * HTTP_mumble Handler looked at request and found it wanting.             
+ 
+ * What the server does after calling a module handler depends upon the     
+ * handler's return value.  In all cases, if the handler returns            
+ * DECLINED, the server will continue to the next module with an handler    
+ * for the current phase.  However, if the handler return a non-OK,         
+ * non-DECLINED status, the server aborts the request right there.  If      
+ * the handler returns OK, the server's next action is phase-specific;      
+ * see the individual handler comments below for details.                   
+ */
+
+/*
+ * 
+ * * This function is called during server initialisation.  Any information
+ * * that needs to be recorded must be in static cells, since there's no
+ * * configuration record.
+ * *
+ * * There is no return value.
+ */
+
+static int
+gsoap_init(apr_pool_t * p, apr_pool_t * ptemp, apr_pool_t * plog,
+           server_rec * psrec)
+{
+    ap_log_error(APLOG_MARK, APLOG_INFO, 0, psrec, "mod_gsoap initialized");
+    return OK;
+}
+
+
+
+/*
+ * This function gets called to create a per-directory configuration
+ * record.  This will be called for the "default" server environment, and for
+ * each directory for which the parser finds any of our directives applicable.
+ * If a directory doesn't have any of our directives involved (i.e., they
+ * aren't in the .htaccess file, or a <Location>, <Directory>, or related
+ * block), this routine will *not* be called - the configuration for the
+ * closest ancestor is used.
+ *
+ * The return value is a pointer to the created module-specific
+ * structure.
+ */
+static void *
+gsoap_create_dir_config(apr_pool_t * p, char *dirspec)
+{
+    gsoapConfiguration *pConfig = gsoapConfiguration_create(p);
+
+    pConfig->m_Type = ct_directory;
+    return pConfig;
+}
+
+/*
+ * This function gets called to merge two per-directory configuration
+ * records.  This is typically done to cope with things like .htaccess files
+ * or <Location> directives for directories that are beneath one for which a
+ * configuration record was already created.  The routine has the
+ * responsibility of creating a new record and merging the contents of the
+ * other two into it appropriately.  If the module doesn't declare a merge
+ * routine, the record for the closest ancestor location (that has one) is
+ * used exclusively.
+ *
+ * The routine MUST NOT modify any of its arguments!
+ *
+ * The return value is a pointer to the created module-specific structure
+ * containing the merged values.
+ */
+static void *
+gsoap_merge_dir_config(apr_pool_t * p, void *parent_conf, void *newloc_conf)
+{
+    gsoapConfiguration *pMergedConfig = gsoapConfiguration_create(p);
+    gsoapConfiguration *pParentConfig = (gsoapConfiguration *) parent_conf;
+    gsoapConfiguration *pNewConfig = (gsoapConfiguration *) newloc_conf;
+
+    gsoapConfiguration_merge(pMergedConfig, pParentConfig, pNewConfig);
+    return pMergedConfig;
+}
+
+/*
+ * This function gets called to create a per-server configuration
+ * record.  It will always be called for the "default" server.
+ *
+ * The return value is a pointer to the created module-specific
+ * structure.
+ */
+static void *
+gsoap_create_server_config(apr_pool_t * p, server_rec * s)
+{
+    gsoapConfiguration *pConfig = gsoapConfiguration_create(p);
+
+    pConfig->m_Type = ct_server;
+    return pConfig;
+}
+
+/*
+ * This function gets called to merge two per-server configuration
+ * records.  This is typically done to cope with things like virtual hosts and
+ * the default server configuration. The routine has the responsibility of
+ * creating a new record and merging the contents of the other two into it
+ * appropriately. If the module doesn't declare a merge routine, the more
+ * specific existing record is used exclusively.
+ *
+ * The routine MUST NOT modify any of its arguments!
+ *
+ * The return value is a pointer to the created module-specific structure
+ * containing the merged values.
+ */
+static void *
+gsoap_merge_server_config(apr_pool_t * p, void *server1_conf,
+                          void *server2_conf)
+{
+    gsoapConfiguration *pMergedConfig = gsoapConfiguration_create(p);
+    gsoapConfiguration *pServer1Config = (gsoapConfiguration *) server1_conf;
+    gsoapConfiguration *pServer2Config = (gsoapConfiguration *) server2_conf;
+
+    gsoapConfiguration_merge(pMergedConfig, pServer1Config, pServer2Config);
+    pMergedConfig->m_Type = ct_server;
+    return (void *)pMergedConfig;
+}
+
+
+
+/** helper funciton for library command handler.
+ * @param pszPath the path of the library.
+ * @param bIsSOAPLibrary true if it is a shared library containing a SOAP server.
+ * @return true if the library was added, false if it was aleady in the collection.
+ */
+static bool
+AddSharedLibrary(gsoapConfiguration * pConfig, const char *pszPath,
+                 const bool bIsSOAPLibrary)
+{
+    bool bAdded = false;
+    apr_pool_t *pPool = gsoapConfiguration_getModulePool();
+
+    if(!SoapSharedLibraries_contains(pConfig->m_pLibraries, pszPath))
+    {
+        SoapSharedLibrary *pLibrary = SoapSharedLibrary_create(pPool);
+
+        SoapSharedLibrary_init2(pLibrary, pPool, apr_pstrdup(pPool, pszPath));
+        pLibrary->m_bIsSOAPLibrary = bIsSOAPLibrary;
+        SoapSharedLibraries_addLibrary(pConfig->m_pLibraries, pLibrary);
+        bAdded = true;
+    }
+
+    return bAdded;
+}
+static gsoapConfiguration *
+getConfiguration(request_rec * r)
+{
+    return (gsoapConfiguration *) ap_get_module_config(r->per_dir_config,
+                                                       &gsoap_module);
+}
+static gsoapRequestConfiguration *
+getRequestConfiguration(struct soap *soap)
+{
+    gsoapRequestConfiguration *pRqConf =
+        (gsoapRequestConfiguration *) soap->fplugin(soap, mod_gsoap_id);
+    return pRqConf;
+}
+
+
+/*
+ * Patch from Ryan Troll
+ *
+ * Implmement these as weak symbols, allowing symbol checking during
+ * compilation to succeed, even when another object is actually
+ * providing these symbols at runtime.
+ */
+SOAP_NMAC struct Namespace namespaces[] __attribute__ ((weak));
+SOAP_NMAC struct Namespace namespaces[] = {
+    {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/",
+     "http://www.w3.org/*/soap-envelope"},
+    {"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/",
+     "http://www.w3.org/*/soap-encoding"},
+    {"xsi", "http://www.w3.org/2001/XMLSchema-instance",
+     "http://www.w3.org/*/XMLSchema-instance"},
+    {"xsd", "http://www.w3.org/2001/XMLSchema",
+     "http://www.w3.org/*/XMLSchema"},
+    {NULL, NULL}
+};
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serializeheader(struct soap *soap)
+    __attribute__ ((weak));
+SOAP_FMAC3 void SOAP_FMAC4
+soap_serializeheader(struct soap *soap)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    pRqConf->pIntf->soap_serializeheader(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_putheader(struct soap *soap)
+    __attribute__ ((weak));
+SOAP_FMAC3 int SOAP_FMAC4
+soap_putheader(struct soap *soap)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    return pRqConf->pIntf->soap_putheader(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_getheader(struct soap *soap)
+    __attribute__ ((weak));
+SOAP_FMAC3 int SOAP_FMAC4
+soap_getheader(struct soap *soap)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    return pRqConf->pIntf->soap_getheader(soap);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_fault(struct soap *soap) __attribute__ ((weak));
+SOAP_FMAC3 void SOAP_FMAC4
+soap_fault(struct soap *soap)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    pRqConf->pIntf->soap_fault(soap);
+}
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serializefault(struct soap *soap)
+    __attribute__ ((weak));
+SOAP_FMAC3 void SOAP_FMAC4
+soap_serializefault(struct soap *soap)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    pRqConf->pIntf->soap_serializefault(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_putfault(struct soap *soap)
+    __attribute__ ((weak));
+SOAP_FMAC3 int SOAP_FMAC4
+soap_putfault(struct soap *soap)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    return pRqConf->pIntf->soap_putfault(soap);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_getfault(struct soap *soap)
+    __attribute__ ((weak));
+SOAP_FMAC3 int SOAP_FMAC4
+soap_getfault(struct soap *soap)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    return pRqConf->pIntf->soap_getfault(soap);
+}
+
+SOAP_FMAC3 const char **SOAP_FMAC4 soap_faultcode(struct soap *soap)
+    __attribute__ ((weak));
+SOAP_FMAC3 const char **SOAP_FMAC4
+soap_faultcode(struct soap *soap)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    return pRqConf->pIntf->soap_faultcode(soap);
+}
+
+SOAP_FMAC3 const char **SOAP_FMAC4 soap_faultstring(struct soap *soap)
+    __attribute__ ((weak));
+SOAP_FMAC3 const char **SOAP_FMAC4
+soap_faultstring(struct soap *soap)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    return pRqConf->pIntf->soap_faultstring(soap);
+}
+
+SOAP_FMAC3 const char **SOAP_FMAC4 soap_faultdetail(struct soap *soap)
+    __attribute__ ((weak));
+SOAP_FMAC3 const char **SOAP_FMAC4
+soap_faultdetail(struct soap *soap)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    return pRqConf->pIntf->soap_faultdetail(soap);
+}
+
+/*
+ * Patch from Ryan Troll
+ *
+ * These may never be used within a server context.  However,
+ * gsoap-2.7.0e requires these functions to be defined.  Thus,
+ * we need to define them here.
+ *
+ */
+SOAP_FMAC3 void SOAP_FMAC4 soap_markelement(struct soap *soap, const void *a,
+                                            int b) __attribute__ ((weak));
+SOAP_FMAC3 void SOAP_FMAC4
+soap_markelement(struct soap *soap, const void *a, int b)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    return pRqConf->pIntf->soap_markelement(soap, a, b);
+}
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_putelement(struct soap *soap, const void *a,
+                                          const char *b, int c, int d)
+    __attribute__ ((weak));
+SOAP_FMAC3 int SOAP_FMAC4
+soap_putelement(struct soap *soap, const void *a, const char *b, int c, int d)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    return pRqConf->pIntf->soap_putelement(soap, a, b, c, d);
+}
+
+SOAP_FMAC3 void *SOAP_FMAC4 soap_getelement(struct soap *soap, int *a)
+    __attribute__ ((weak));
+SOAP_FMAC3 void *SOAP_FMAC4
+soap_getelement(struct soap *soap, int *a)
+{
+    gsoapRequestConfiguration *pRqConf = getRequestConfiguration(soap);
+
+    return pRqConf->pIntf->soap_getelement(soap, a);
+}
diff --git a/mod_gsoap/mod_gsoap-0.6/apache_20/mod_gsoap.vcproj b/mod_gsoap/mod_gsoap-0.6/apache_20/mod_gsoap.vcproj
new file mode 100644
index 0000000..6505e83
--- /dev/null
+++ b/mod_gsoap/mod_gsoap-0.6/apache_20/mod_gsoap.vcproj
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding = "Windows-1252"?>

+<VisualStudioProject

+	ProjectType="Visual C++"

+	Version="7.00"

+	Name="mod_gsoap"

+	ProjectGUID="{B9904056-B2A0-4433-B3D5-3B10762785E5}"

+	Keyword="Win32Proj">

+	<Platforms>

+		<Platform

+			Name="Win32"/>

+	</Platforms>

+	<Configurations>

+		<Configuration

+			Name="Debug|Win32"

+			OutputDirectory="Debug"

+			IntermediateDirectory="Debug"

+			ConfigurationType="2"

+			CharacterSet="2">

+			<Tool

+				Name="VCCLCompilerTool"

+				 

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;WIN32;_DEBUG;_WINDOWS;SOAP_FMAC1=__declspec(dllexport);SOAP_CMAC=__(dllexport);WITH_NONAMESPACES"

+				 

+				 

+				 

+				 

+				 

+				Detect64BitPortabilityProblems="false"

+				 />

+			<Tool

+				Name="VCCustomBuildTool"/>

+			<Tool

+				Name="VCLinkerTool"

+				AdditionalDependencies="libapr.lib libhttpd.lib"

+				OutputFile="c:/apache2/modules/$(ProjectName).so"

+				 

+				AdditionalLibraryDirectories="C:\apache\lib"

+				ModuleDefinitionFile=""

+				

+				ProgramDatabaseFile="$(OutDir)/mod_gsoap.pdb"

+				SubSystem="2"

+				TargetMachine="1"/>

+			<Tool

+				Name="VCMIDLTool"/>

+			<Tool

+				Name="VCPostBuildEventTool"/>

+			<Tool

+				Name="VCPreBuildEventTool"/>

+			<Tool

+				Name="VCPreLinkEventTool"/>

+			<Tool

+				Name="VCResourceCompilerTool"/>

+			<Tool

+				Name="VCWebServiceProxyGeneratorTool"/>

+			<Tool

+				Name="VCWebDeploymentTool"/>

+		</Configuration>

+		<Configuration

+			Name="Release|Win32"

+			OutputDirectory="Release"

+			IntermediateDirectory="Release"

+			ConfigurationType="1"

+			CharacterSet="2">

+			<Tool

+				Name="VCCLCompilerTool"

+				 

+				InlineFunctionExpansion="1"

+				OmitFramePointers="TRUE"

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;WIN32;NDEBUG;_WINDOWS"

+				StringPooling="TRUE"

+				 

+				 

+				 

+				 

+				Detect64BitPortabilityProblems="false"

+				 />

+			<Tool

+				Name="VCCustomBuildTool"/>

+			<Tool

+				Name="VCLinkerTool"

+				OutputFile="$(OutDir)/mod_gsoap.exe"

+				 

+				ModuleDefinitionFile="mod_gsop.def"

+				

+				SubSystem="2"

+				OptimizeReferences="2"

+				EnableCOMDATFolding="2"

+				TargetMachine="1"/>

+			<Tool

+				Name="VCMIDLTool"/>

+			<Tool

+				Name="VCPostBuildEventTool"/>

+			<Tool

+				Name="VCPreBuildEventTool"/>

+			<Tool

+				Name="VCPreLinkEventTool"/>

+			<Tool

+				Name="VCResourceCompilerTool"/>

+			<Tool

+				Name="VCWebServiceProxyGeneratorTool"/>

+			<Tool

+				Name="VCWebDeploymentTool"/>

+		</Configuration>

+	</Configurations>

+	<Files>

+		<File

+			RelativePath="apache_gsoap.h">

+		</File>

+		<File

+			RelativePath="mod_gsoap.c">

+		</File>

+	</Files>

+	<Globals>

+	</Globals>

+</VisualStudioProject>

diff --git a/plugin/README.txt b/plugin/README.txt
new file mode 100644
index 0000000..967b1f9
--- /dev/null
+++ b/plugin/README.txt
@@ -0,0 +1,16 @@
+This directory contains plugins for extending the gSOAP engine's capabilities.
+
+httpda.*	HTTP Digest Authentication
+httpget.*	HTTP GET method support
+httpform.*	HTTP POST application/x-www-form-urlencoded support
+httppost.*	HTTP POST method support for example non-SOAP requests
+httpmd5.*	HTTP MD5 checksums
+logging.*	Message logging (selective inbound/outbound)
+plugin.*	Example plugin for aspiring plugin developers
+wsseapi.*	WS-Security (wsse) plugin
+
+Supporting modules:
+
+smdevp.*	EVP-based (signed) message digest engine
+md5evp.*	MD5 EVP interface for httpda and httpmd5
+threads.*	Threads, mutex, and condition variables
diff --git a/plugin/httpda.c b/plugin/httpda.c
new file mode 100644
index 0000000..692891c
--- /dev/null
+++ b/plugin/httpda.c
@@ -0,0 +1,743 @@
+/*
+
+httpda.c
+
+gSOAP HTTP Digest Authentication plugin.
+Supports both Basic and Digest authentication.
+
+Usage (client side, see httpdatest.h/.c for example):
+soap_register_plugin(&soap, http_da);
+if (soap_call_ns__method(&soap, ...) != SOAP_OK)
+{ if (soap.error == 401) // HTTP authentication is required
+  { if (!strcmp(soap.authrealm, authrealm)) // check authentication realm
+    { struct http_da_info info; // to store userid and passwd
+      http_da_save(&soap, &info, authrealm, userid, passwd);
+      if (soap_call_ns__method(&soap, ...) == SOAP_OK)
+      { ...
+        soap_end(&soap);
+	... // userid and passwd were deallocated
+        http_da_restore(&soap, &info); // get userid and passwd after soap_end()
+        if (!soap_call_ns__method(&soap, ...) == SOAP_OK)
+	  ...
+        http_da_release(&soap, &info); // remove userid and passwd
+
+Usage (server side, see httpdatest.h/.c for example):
+soap_register_plugin(&soap, http_da);
+...
+soap_serve(&soap);
+...
+int ns__method(struct soap *soap, ...)
+{ if (soap->userid && soap->passwd) // Basic authentication
+  { if (!strcmp(soap->userid, userid) && !strcmp(soap->passwd, passwd))
+    { ... // can also check soap->authrealm 
+      return SOAP_OK;
+    }
+  }
+  else if (soap->authrealm && soap->userid) // Digest authentication
+  { passwd = ... // database lookup on userid and authrealm to find passwd
+    if (!strcmp(soap->authrealm, authrealm) && !strcmp(soap->userid, userid))
+    { if (!http_da_verify_post(soap, passwd)) // HTTP POST DA verification
+      { ...
+        return SOAP_OK;
+      }
+    }
+  }
+  soap->authrealm = authrealm; // realm to send to client
+  return 401; // Not authorized, challenge with digest authentication
+}
+
+Compile with -DWITH_OPENSSL
+Link with OpenSSL (for md5evp.c), httpda.c, md5evp.c, and threads.c
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia, Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "httpda.h"
+
+const char http_da_id[12] = HTTP_DA_ID;
+
+/* session database and lock */
+static struct http_da_session *http_da_session = NULL;
+static MUTEX_TYPE http_da_session_lock;
+
+#define HTTP_DA_NONCELEN 21
+#define HTTP_DA_OPAQUELEN 9
+
+/******************************************************************************\
+ *
+ *	Forward decls
+ *
+\******************************************************************************/
+
+static int http_da_init(struct soap *soap, struct http_da_data *data);
+static int http_da_copy(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src);
+static void http_da_delete(struct soap *soap, struct soap_plugin *p);
+
+static int http_da_post_header(struct soap *soap, const char *key, const char *val);
+static int http_da_parse_header(struct soap *soap, const char *key, const char *val);
+static int http_da_prepareinit(struct soap *soap);
+static int http_da_preparesend(struct soap *soap, const char *buf, size_t len);
+static int http_da_preparerecv(struct soap *soap, const char *buf, size_t len);
+static int http_da_disconnect(struct soap *soap);
+
+static int http_da_verify_method(struct soap *soap, char *method, char *passwd);
+static void http_da_session_start(const char *realm, const char *nonce, const char *opaque);
+static int http_da_session_update(const char *realm, const char *nonce, const char *opaque, const char *cnonce, const char *ncount);
+static void http_da_session_cleanup();
+
+void http_da_calc_nonce(struct soap *soap, char nonce[HTTP_DA_NONCELEN]);
+void http_da_calc_opaque(struct soap *soap, char opaque[HTTP_DA_OPAQUELEN]);
+static void http_da_calc_HA1(struct soap *soap, void **context, char *alg, char *userid, char *realm, char *passwd, char *nonce, char *cnonce, char HA1hex[33]);
+static void http_da_calc_response(struct soap *soap, void **context, char HA1hex[33], char *nonce, char *ncount, char *cnonce, char *qop, char *method, char *uri, char entityHAhex[33], char response[33]);
+
+/******************************************************************************\
+ *
+ *	Plugin registry
+ *
+\******************************************************************************/
+
+int http_da(struct soap *soap, struct soap_plugin *p, void *arg)
+{
+  p->id = http_da_id;
+  p->data = (void*)SOAP_MALLOC(soap, sizeof(struct http_da_data));
+  p->fcopy = http_da_copy;
+  p->fdelete = http_da_delete;
+  if (p->data)
+  {
+    if (http_da_init(soap, (struct http_da_data*)p->data))
+    {
+      SOAP_FREE(soap, p->data);
+      return SOAP_EOM;
+    }
+  }
+  return SOAP_OK;
+}
+
+static int http_da_init(struct soap *soap, struct http_da_data *data)
+{
+  data->fposthdr = soap->fposthdr;
+  soap->fposthdr = http_da_post_header;
+  data->fparsehdr = soap->fparsehdr;
+  soap->fparsehdr = http_da_parse_header;
+  data->fprepareinit = soap->fprepareinit;
+  soap->fprepareinit = http_da_prepareinit;
+  data->context = NULL;
+  memset(data->digest, 0, sizeof(data->digest));
+
+  return SOAP_OK;
+}
+
+static int http_da_copy(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src)
+{
+  *dst = *src;
+  dst->data = (void*)SOAP_MALLOC(soap, sizeof(struct http_da_data));
+  memcpy(dst->data, src->data, sizeof(struct http_da_data));
+  ((struct http_da_data*)dst->data)->context = NULL;
+  memset(((struct http_da_data*)dst->data)->digest, 0, sizeof(((struct http_da_data*)dst->data)->digest));
+  ((struct http_da_data*)dst->data)->nonce = NULL;
+  ((struct http_da_data*)dst->data)->opaque = NULL;
+  ((struct http_da_data*)dst->data)->qop = NULL;
+  ((struct http_da_data*)dst->data)->alg = NULL;
+  ((struct http_da_data*)dst->data)->nc = 0;
+  ((struct http_da_data*)dst->data)->ncount = NULL;
+  ((struct http_da_data*)dst->data)->cnonce = NULL;
+  ((struct http_da_data*)dst->data)->response = NULL;
+  return SOAP_OK;
+}
+
+static void http_da_delete(struct soap *soap, struct soap_plugin *p)
+{
+  struct http_da_data *data = (struct http_da_data*)soap_lookup_plugin(soap, http_da_id);
+  if (data)
+  {
+    if (data->context)
+      md5_handler(soap, &data->context, MD5_DELETE, NULL, 0);
+    SOAP_FREE(soap, data);
+  }
+}
+
+/******************************************************************************\
+ *
+ *	Callbacks
+ *
+\******************************************************************************/
+
+static int http_da_post_header(struct soap *soap, const char *key, const char *val)
+{
+  struct http_da_data *data = (struct http_da_data*)soap_lookup_plugin(soap, http_da_id);
+
+  if (!data)
+    return SOAP_PLUGIN_ERROR;
+
+  /* client's HTTP Authorization response */
+  if (key && !strcmp(key, "Authorization"))
+  {
+    char HA1[33], entityHAhex[33], response[33];
+    char cnonce[HTTP_DA_NONCELEN];
+    char ncount[9];
+    char *qop, *method;
+
+    md5_handler(soap, &data->context, MD5_FINAL, data->digest, 0);
+
+    http_da_calc_nonce(soap, cnonce);
+    http_da_calc_HA1(soap, &data->context, data->alg, soap->userid, soap->authrealm, soap->passwd, data->nonce, cnonce, HA1);
+
+    if (data->qop && !soap_tag_cmp(data->qop, "*auth-int*"))
+    {
+      qop = "auth-int";
+      soap_s2hex(soap, data->digest, entityHAhex, 16);
+    }
+    else if (data->qop)
+      qop = "auth";
+    else
+      qop = NULL;
+
+    if (soap->status == SOAP_GET)
+      method = "GET";
+    else
+      method = "POST";
+
+    sprintf(ncount, "%8.8lx", data->nc++);
+
+    http_da_calc_response(soap, &data->context, HA1, data->nonce, ncount, cnonce, qop, method, soap->path, entityHAhex, response);
+
+    if (qop)
+      sprintf(soap->tmpbuf, "Digest realm=\"%s\", username=\"%s\", nonce=\"%s\", uri=\"%s\", qop=\"%s\", nc=%s, cnonce=\"%s\", response=\"%s\", opaque=\"%s\"", soap->authrealm, soap->userid, data->nonce, soap->path, qop, ncount, cnonce, response, data->opaque);
+    else
+      sprintf(soap->tmpbuf, "Digest realm=\"%s\", username=\"%s\", nonce=\"%s\", uri=\"%s\", response=\"%s\", opaque=\"%s\"", soap->authrealm, soap->userid, data->nonce, soap->path, response, data->opaque);
+
+    return data->fposthdr(soap, key, soap->tmpbuf);
+  }
+
+  /* server's HTTP Authorization response */
+  if (key && !strcmp(key, "WWW-Authenticate"))
+  {
+    char nonce[HTTP_DA_NONCELEN];
+    char opaque[HTTP_DA_OPAQUELEN];
+
+    http_da_calc_nonce(soap, nonce);
+    http_da_calc_opaque(soap, opaque);
+
+    http_da_session_start(soap->authrealm, nonce, opaque);
+
+    sprintf(soap->tmpbuf, "Digest realm=\"%s\", qop=\"auth,auth-int\", nonce=\"%s\", opaque=\"%s\"", soap->authrealm, nonce, opaque);
+
+    return data->fposthdr(soap, key, soap->tmpbuf);
+  }
+
+  return data->fposthdr(soap, key, val);
+}
+
+static int http_da_parse_header(struct soap *soap, const char *key, const char *val)
+{
+  struct http_da_data *data = (struct http_da_data*)soap_lookup_plugin(soap, http_da_id);
+
+  if (!data)
+    return SOAP_PLUGIN_ERROR;
+
+  /* check if server received Authorization Digest HTTP header from client */
+  if (!soap_tag_cmp(key, "Authorization") && !soap_tag_cmp(val, "Digest *"))
+  {
+    soap->authrealm = soap_strdup(soap, soap_get_header_attribute(soap, val + 7, "realm"));
+    soap->userid = soap_strdup(soap, soap_get_header_attribute(soap, val + 7, "username"));
+    soap->passwd = NULL;
+    data->nonce = soap_strdup(soap, soap_get_header_attribute(soap, val + 7, "nonce"));
+    data->opaque = soap_strdup(soap, soap_get_header_attribute(soap, val + 7, "opaque"));
+    data->qop = soap_strdup(soap, soap_get_header_attribute(soap, val + 7, "qop"));
+    data->alg = NULL;
+    data->ncount = soap_strdup(soap, soap_get_header_attribute(soap, val + 7, "nc"));
+    data->cnonce = soap_strdup(soap, soap_get_header_attribute(soap, val + 7, "cnonce"));
+    data->response = soap_strdup(soap, soap_get_header_attribute(soap, val + 7, "response"));
+    if (data->qop && !soap_tag_cmp(data->qop, "auth-int"))
+    {
+      if (soap->fpreparerecv != http_da_preparerecv)
+      {
+        data->fpreparerecv = soap->fpreparerecv;
+        soap->fpreparerecv = http_da_preparerecv;
+      }
+      if (soap->fdisconnect != http_da_disconnect)
+      {
+        data->fdisconnect = soap->fdisconnect;
+        soap->fdisconnect = http_da_disconnect;
+      }
+      md5_handler(soap, &data->context, MD5_INIT, NULL, 0);
+    }
+    return SOAP_OK;
+  }
+
+  /* check if client received WWW-Authenticate Digest HTTP header from server */
+  if (!soap_tag_cmp(key, "WWW-Authenticate") && !soap_tag_cmp(val, "Digest *"))
+  {
+    soap->authrealm = soap_strdup(soap, soap_get_header_attribute(soap, val + 7, "realm"));
+    data->nonce = soap_strdup(soap, soap_get_header_attribute(soap, val + 7, "nonce"));
+    data->opaque = soap_strdup(soap, soap_get_header_attribute(soap, val + 7, "opaque"));
+    data->qop = soap_strdup(soap, soap_get_header_attribute(soap, val + 7, "qop"));
+    data->alg = soap_strdup(soap, soap_get_header_attribute(soap, val + 7, "algorithm"));
+    data->nc = 1;
+    data->ncount = NULL;
+    data->cnonce = NULL;
+    data->response = NULL;
+    return SOAP_OK;
+  }
+
+  return data->fparsehdr(soap, key, val);
+}
+
+static int http_da_prepareinit(struct soap *soap)
+{
+  struct http_da_data *data = (struct http_da_data*)soap_lookup_plugin(soap, http_da_id);
+
+  if (!data)
+    return SOAP_PLUGIN_ERROR;
+
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && (soap->mode & (SOAP_ENC_DIME | SOAP_ENC_MIME)))
+  { /* TODO: handle attachments automatically, does not work yet */
+    soap->mode &= ~SOAP_IO;
+    soap->mode |= SOAP_IO_STORE;
+  }
+  else
+  {
+    if (soap->fpreparerecv == http_da_preparerecv)
+      soap->fpreparerecv = data->fpreparerecv;
+    if (soap->fdisconnect == http_da_disconnect)
+      soap->fdisconnect = data->fdisconnect;
+
+    if (soap->userid && soap->passwd)
+    {
+      md5_handler(soap, &data->context, MD5_INIT, NULL, 0);
+      if (soap->fpreparesend != http_da_preparesend)
+      {
+        data->fpreparesend = soap->fpreparesend;
+        soap->fpreparesend = http_da_preparesend;
+      }
+    }
+
+    if (data->fprepareinit)
+      return data->fprepareinit(soap);
+  }
+
+  return SOAP_OK;
+}
+
+static int http_da_preparesend(struct soap *soap, const char *buf, size_t len)
+{
+  struct http_da_data *data = (struct http_da_data*)soap_lookup_plugin(soap, http_da_id);
+
+  if (!data)
+    return SOAP_PLUGIN_ERROR;
+
+  md5_handler(soap, &data->context, MD5_UPDATE, (char*)buf, len);
+
+  if (data->fpreparesend)
+    return data->fpreparesend(soap, buf, len);
+
+  return SOAP_OK;
+}
+
+static int http_da_preparerecv(struct soap *soap, const char *buf, size_t len)
+{
+  struct http_da_data *data = (struct http_da_data*)soap_lookup_plugin(soap, http_da_id);
+
+  if (!data)
+    return SOAP_PLUGIN_ERROR;
+
+  md5_handler(soap, &data->context, MD5_UPDATE, (char*)buf, len);
+
+  if (data->fpreparerecv)
+    return data->fpreparerecv(soap, buf, len);
+
+  return SOAP_OK;
+}
+
+static int http_da_disconnect(struct soap *soap)
+{
+  struct http_da_data *data = (struct http_da_data*)soap_lookup_plugin(soap, http_da_id);
+
+  if (!data)
+    return SOAP_PLUGIN_ERROR;
+
+  md5_handler(soap, &data->context, MD5_FINAL, data->digest, 0);
+
+  soap->fpreparerecv = data->fpreparerecv;
+  soap->fdisconnect = data->fdisconnect;
+
+  if (soap->fdisconnect)
+    return soap->fdisconnect(soap);
+
+  return SOAP_OK;
+}
+
+/******************************************************************************\
+ *
+ *	Client-side digest authentication state management
+ *
+\******************************************************************************/
+
+void http_da_save(struct soap *soap, struct http_da_info *info, const char *realm, const char *userid, const char *passwd)
+{
+  struct http_da_data *data = (struct http_da_data*)soap_lookup_plugin(soap, http_da_id);
+  if (!data)
+    return;
+  info->authrealm = soap->authrealm = soap_strdup(NULL, realm);
+  info->userid = soap->userid = soap_strdup(NULL, userid);
+  info->passwd = soap->passwd = soap_strdup(NULL, passwd);
+  info->nonce = soap_strdup(NULL, data->nonce);
+  info->opaque = soap_strdup(NULL, data->opaque);
+  info->qop = soap_strdup(NULL, data->qop);
+  info->alg = soap_strdup(NULL, data->alg);
+}
+
+void http_da_restore(struct soap *soap, struct http_da_info *info)
+{
+  struct http_da_data *data = (struct http_da_data*)soap_lookup_plugin(soap, http_da_id);
+  if (!data)
+    return;
+  soap->authrealm = info->authrealm;
+  soap->userid = info->userid;
+  soap->passwd = info->passwd;
+  data->nonce = info->nonce;
+  data->opaque = info->opaque;
+  data->qop = info->qop;
+  data->alg = info->alg;
+}
+
+void http_da_release(struct soap *soap, struct http_da_info *info)
+{
+  struct http_da_data *data = (struct http_da_data*)soap_lookup_plugin(soap, http_da_id);
+  if (!data)
+    return;
+
+  soap->authrealm = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  data->nonce = NULL;
+  data->opaque = NULL;
+  data->qop = NULL;
+  data->alg = NULL;
+
+  if (info->authrealm)
+  {
+    free(info->authrealm);
+    info->authrealm = NULL;
+  }
+  if (info->userid)
+  {
+    free(info->userid);
+    info->userid = NULL;
+  }
+  if (info->passwd)
+  {
+    free(info->passwd);
+    info->passwd = NULL;
+  }
+  if (info->nonce)
+  {
+    free(info->nonce);
+    info->nonce = NULL;
+  }
+  if (info->opaque)
+  {
+    free(info->opaque);
+    info->opaque = NULL;
+  }
+  if (info->qop)
+  {
+    free(info->qop);
+    info->qop = NULL;
+  }
+  if (info->alg)
+  {
+    free(info->alg);
+    info->alg = NULL;
+  }
+}
+
+/******************************************************************************\
+ *
+ *	Server-side digest authentication verification
+ *
+\******************************************************************************/
+
+int http_da_verify_post(struct soap *soap, char *passwd)
+{
+  return http_da_verify_method(soap, "POST", passwd);
+}
+
+int http_da_verify_get(struct soap *soap, char *passwd)
+{
+  return http_da_verify_method(soap, "GET", passwd);
+}
+
+static int http_da_verify_method(struct soap *soap, char *method, char *passwd)
+{
+  struct http_da_data *data = (struct http_da_data*)soap_lookup_plugin(soap, http_da_id);
+  char HA1[33], entityHAhex[33], response[33];
+
+  if (!data)
+    return SOAP_ERR;
+
+  /* reject if none or basic authentication was used */
+  if (!soap->authrealm
+   || !soap->userid
+   || soap->passwd)	/* passwd is set when basic auth is used */
+    return SOAP_ERR;
+
+  /* require at least qop="auth" to prevent replay attacks */
+  if (!data->qop)
+    return SOAP_ERR;
+
+  if (http_da_session_update(soap->authrealm, data->nonce, data->opaque, data->cnonce, data->ncount))
+    return SOAP_ERR;
+
+  http_da_calc_HA1(soap, &data->context, NULL, soap->userid, soap->authrealm, passwd, data->nonce, data->cnonce, HA1);
+
+  if (!soap_tag_cmp(data->qop, "auth-int"))
+    soap_s2hex(soap, data->digest, entityHAhex, 16);
+
+  http_da_calc_response(soap, &data->context, HA1, data->nonce, data->ncount, data->cnonce, data->qop, method, soap->path, entityHAhex, response);
+
+#ifdef DEBUG
+  fprintf(stderr, "Verifying client response=%s with calculated digest=%s\n", data->response, response);
+#endif
+
+  /* check digest response values */
+  if (strcmp(data->response, response))
+    return SOAP_ERR;
+
+  return SOAP_OK;
+}
+
+/******************************************************************************\
+ *
+ *	Digest authentication session database management
+ *
+\******************************************************************************/
+
+static void http_da_session_start(const char *realm, const char *nonce, const char *opaque)
+{
+  struct http_da_session *session;
+  time_t now = time(NULL);
+
+  if (now % 10 == 0) /* don't do this all the time to improve efficiency */
+    http_da_session_cleanup();
+
+#ifdef DEBUG
+  fprintf(stderr, "Starting session realm=%s nonce=%s\n", realm, nonce);
+#endif
+
+  MUTEX_LOCK(http_da_session_lock);
+
+  session = (struct http_da_session*)malloc(sizeof(struct http_da_session));
+  if (session)
+  {
+    session->next = http_da_session;
+    session->modified = now;
+    session->realm = soap_strdup(NULL, realm);
+    session->nonce = soap_strdup(NULL, nonce);
+    session->opaque = soap_strdup(NULL, opaque);
+    session->nc = 0;
+    http_da_session = session;
+  }
+
+  MUTEX_UNLOCK(http_da_session_lock);
+}
+
+static int http_da_session_update(const char *realm, const char *nonce, const char *opaque, const char *cnonce, const char *ncount)
+{
+  struct http_da_session *session;
+
+  if (!realm || !nonce || !opaque || !cnonce || !ncount)
+    return SOAP_ERR;
+
+#ifdef DEBUG
+  fprintf(stderr, "Updating session realm=%s nonce=%s\n", realm, nonce);
+#endif
+
+  MUTEX_LOCK(http_da_session_lock);
+
+  for (session = http_da_session; session; session = session->next)
+    if (!strcmp(session->realm, realm) && !strcmp(session->nonce, nonce) && !strcmp(session->opaque, opaque))
+      break;
+
+  if (session)
+  {
+    unsigned long nc = soap_strtoul(ncount, NULL, 16);
+
+    if (session->nc >= nc)
+    {
+      session->modified = 0; /* replay attack: terminate session */
+      session = NULL;
+    }
+    else
+    {
+      session->nc = nc;
+      session->modified = time(NULL);
+    }
+  }
+
+  MUTEX_UNLOCK(http_da_session_lock);
+
+  if (!session)
+    return SOAP_ERR;
+
+  return SOAP_OK;
+}
+
+static void http_da_session_cleanup()
+{
+  struct http_da_session **session;
+  time_t now = time(NULL);
+
+  MUTEX_LOCK(http_da_session_lock);
+
+  session = &http_da_session;
+  while (*session)
+  {
+    if ((*session)->modified + HTTP_DA_SESSION_TIMEOUT < now)
+    {
+      struct http_da_session *p = *session;
+
+#ifdef DEBUG
+      fprintf(stderr, "Deleting session realm=%s nonce=%s\n", p->realm, p->nonce);
+#endif
+
+      if (p->realm)
+        free(p->realm);
+      if (p->nonce)
+        free(p->nonce);
+      if (p->opaque)
+        free(p->opaque);
+
+      *session = p->next;
+      free(p);
+    }
+    else
+      session = &(*session)->next;
+  }
+
+  MUTEX_UNLOCK(http_da_session_lock);
+}
+
+/******************************************************************************\
+ *
+ *	Calculate hex nonce and opaque values
+ *
+\******************************************************************************/
+
+void http_da_calc_nonce(struct soap *soap, char nonce[HTTP_DA_NONCELEN])
+{
+  static short count = 0xCA53;
+  sprintf(nonce, "%8.8x%4.4hx%8.8x", (int)time(NULL), count++, soap_random);
+}
+
+void http_da_calc_opaque(struct soap *soap, char opaque[HTTP_DA_OPAQUELEN])
+{
+  sprintf(opaque, "%8.8x", soap_random);
+}
+
+/******************************************************************************\
+ *
+ *	Calculate HA1, HA2, and response digest as per RFC 2617 specification
+ *
+\******************************************************************************/
+
+static void http_da_calc_HA1(struct soap *soap, void **context, char *alg, char *userid, char *realm, char *passwd, char *nonce, char *cnonce, char HA1hex[33])
+{
+  char HA1[16];
+
+  md5_handler(soap, context, MD5_INIT, NULL, 0);
+  md5_handler(soap, context, MD5_UPDATE, userid, strlen(userid));
+  md5_handler(soap, context, MD5_UPDATE, ":", 1);
+  md5_handler(soap, context, MD5_UPDATE, realm, strlen(realm));
+  md5_handler(soap, context, MD5_UPDATE, ":", 1);
+  md5_handler(soap, context, MD5_UPDATE, passwd, strlen(passwd));
+  md5_handler(soap, context, MD5_FINAL, HA1, 0);
+
+  if (alg && !soap_tag_cmp(alg, "MD5-sess"))
+  {
+    md5_handler(soap, context, MD5_INIT, NULL, 0);
+    md5_handler(soap, context, MD5_UPDATE, HA1, 16);
+    md5_handler(soap, context, MD5_UPDATE, ":", 1);
+    md5_handler(soap, context, MD5_UPDATE, nonce, strlen(nonce));
+    md5_handler(soap, context, MD5_UPDATE, ":", 1);
+    md5_handler(soap, context, MD5_UPDATE, cnonce, strlen(cnonce));
+    md5_handler(soap, context, MD5_FINAL, HA1, 0);
+  };
+
+  soap_s2hex(soap, HA1, HA1hex, 16);
+};
+
+static void http_da_calc_response(struct soap *soap, void **context, char HA1hex[33], char *nonce, char *ncount, char *cnonce, char *qop, char *method, char *uri, char entityHAhex[33], char response[33])
+{
+  char HA2[16], HA2hex[33], responseHA[16];
+
+  md5_handler(soap, context, MD5_INIT, NULL, 0);
+  md5_handler(soap, context, MD5_UPDATE, method, strlen(method));
+  md5_handler(soap, context, MD5_UPDATE, ":", 1);
+  md5_handler(soap, context, MD5_UPDATE, uri, strlen(uri));
+  if (!soap_tag_cmp(qop, "auth-int"))
+  { 
+    md5_handler(soap, context, MD5_UPDATE, ":", 1);
+    md5_handler(soap, context, MD5_UPDATE, entityHAhex, 32);
+  }
+  md5_handler(soap, context, MD5_FINAL, HA2, 0);
+
+  soap_s2hex(soap, HA2, HA2hex, 16);
+
+  md5_handler(soap, context, MD5_INIT, NULL, 0);
+  md5_handler(soap, context, MD5_UPDATE, HA1hex, 32);
+  md5_handler(soap, context, MD5_UPDATE, ":", 1);
+  md5_handler(soap, context, MD5_UPDATE, nonce, strlen(nonce));
+  md5_handler(soap, context, MD5_UPDATE, ":", 1);
+  if (qop && *qop)
+  {
+    md5_handler(soap, context, MD5_UPDATE, ncount, strlen(ncount));
+    md5_handler(soap, context, MD5_UPDATE, ":", 1);
+    md5_handler(soap, context, MD5_UPDATE, cnonce, strlen(cnonce));
+    md5_handler(soap, context, MD5_UPDATE, ":", 1);
+    md5_handler(soap, context, MD5_UPDATE, qop, strlen(qop));
+    md5_handler(soap, context, MD5_UPDATE, ":", 1);
+  }
+  md5_handler(soap, context, MD5_UPDATE, HA2hex, 32);
+  md5_handler(soap, context, MD5_FINAL, responseHA, 0);
+
+  soap_s2hex(soap, responseHA, response, 16);
+}
+
diff --git a/plugin/httpda.h b/plugin/httpda.h
new file mode 100644
index 0000000..3c5d5cf
--- /dev/null
+++ b/plugin/httpda.h
@@ -0,0 +1,155 @@
+/*
+
+httpda.h
+
+gSOAP HTTP Digest Authentication plugin.
+Supports both Basic and Digest authentication.
+
+Usage (client side, see httpdatest.h/.c for example):
+soap_register_plugin(&soap, http_da);
+if (soap_call_ns__method(&soap, ...) != SOAP_OK)
+{ if (soap.error == 401) // HTTP authentication is required
+  { if (!strcmp(soap.authrealm, authrealm)) // check authentication realm
+    { struct http_da_info info; // to store userid and passwd
+      http_da_save(&soap, &info, authrealm, userid, passwd);
+      if (soap_call_ns__method(&soap, ...) == SOAP_OK)
+      { ...
+        soap_end(&soap);
+	... // userid and passwd were deallocated
+        http_da_restore(&soap, &info); // get userid and passwd after soap_end()
+        if (!soap_call_ns__method(&soap, ...) == SOAP_OK)
+	  ...
+        http_da_release(&soap, &info); // remove userid and passwd
+
+Usage (server side, see httpdatest.h/.c for example):
+soap_register_plugin(&soap, http_da);
+...
+soap_serve(&soap);
+...
+int ns__method(struct soap *soap, ...)
+{ if (soap->userid && soap->passwd) // Basic authentication
+  { if (!strcmp(soap->userid, userid) && !strcmp(soap->passwd, passwd))
+    { ...
+      return SOAP_OK;
+    }
+  }
+  else if (soap->authrealm && soap->userid) // Digest authentication
+  { passwd = ... // database lookup on userid and authrealm to find passwd
+    if (!strcmp(soap->authrealm, authrealm) && !strcmp(soap->userid, userid))
+    { if (!http_da_verify_post(soap, passwd))                 
+      { ...
+        return SOAP_OK;
+      }
+    }
+  }
+  soap->authrealm = authrealm;
+  return 401; // Not authorized, challenge digest authentication
+}
+
+Compile with -DWITH_OPENSSL
+Link with OpenSSL (for md5evp.c), httpda.c, md5evp.c, and threads.c
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia, Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#ifndef HTTPDA_H
+#define HTTPDA_H
+
+#include "stdsoap2.h"
+#include "md5evp.h" /* requires MD5 */
+#include "threads.h" /* mutex for multi-threaded server implementations */
+
+#define HTTP_DA_ID "HTTP-DA-1.0" /* plugin identification */
+
+#define HTTP_DA_SESSION_TIMEOUT (600) /* sessions time out after ten minutes */
+
+extern const char http_da_id[];
+
+struct http_da_data
+{
+  int (*fposthdr)(struct soap*, const char*, const char*);
+  int (*fparsehdr)(struct soap*, const char*, const char*);
+  int (*fprepareinit)(struct soap*);
+  int (*fpreparesend)(struct soap*, const char*, size_t);
+  int (*fpreparerecv)(struct soap*, const char*, size_t);
+  int (*fdisconnect)(struct soap*);
+  void *context;	/* ptr to MD5 context for MD5 handler */
+  char digest[16];	/* MD5 entity body digest */
+  char *nonce;		/* client/server-side copy of server's nonce value */
+  char *opaque;		/* client/server-side copy of server's opaque value */
+  char *qop;		/* client/server-side copy of server's qop value(s) */
+  char *alg;		/* client-side: server's algorithm value */
+  unsigned long nc;	/* client-side: generated nonce count */
+  char *ncount;		/* server-side: client's nonce count */
+  char *cnonce;		/* server-side: client's nonce */
+  char *response;	/* server-side: client's response digest key */
+};
+
+struct http_da_session
+{
+  struct http_da_session *next;
+  time_t modified;
+  char *realm;
+  char *nonce;
+  char *opaque;
+  unsigned long nc;
+};
+
+int http_da(struct soap *soap, struct soap_plugin *p, void *arg);
+
+int http_da_verify_post(struct soap *soap, char *passwd);
+int http_da_verify_get(struct soap *soap, char *passwd);
+
+struct http_da_info
+{
+  char *authrealm;
+  char *userid;
+  char *passwd;
+  char *nonce;
+  char *opaque;
+  char *qop;
+  char *alg;
+};
+
+void http_da_save(struct soap *soap, struct http_da_info *info, const char *realm, const char *userid, const char *passwd);
+void http_da_restore(struct soap *soap, struct http_da_info *info);
+void http_da_release(struct soap *soap, struct http_da_info *info);
+
+#endif
diff --git a/plugin/httpdatest.c b/plugin/httpdatest.c
new file mode 100644
index 0000000..0498fc6
--- /dev/null
+++ b/plugin/httpdatest.c
@@ -0,0 +1,184 @@
+/*
+
+httpdatest.c
+
+gSOAP HTTP Digest Authentication example application.
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia, Inc., All Rights Reserved.
+
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia, Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+
+Requires OpenSSL
+
+Compile:
+
+soapcpp2 -c httpdatest.h
+cc -DWITH_OPENSSL -o httpdatest httpdatest.c soapC.c soapClient.c soapServer.c httpda.c md5evp.c threads.c stdsoap2.c -lssl -lcrypto -lz
+
+*/
+
+#include "httpda.h"
+#include "soapH.h"
+#include "ns.nsmap"
+
+static char authrealm[] = "gSOAP Authentication Test";
+
+int run_serve(int port);
+int run_tests(int,char**);
+
+int main(int argc, char **argv)
+{
+  if (argc < 2)
+    return run_serve(8080);
+  else if (argc < 3)
+    return run_serve(atoi(argv[1]));
+  else
+    return run_tests(argc, argv);
+}
+
+int run_serve(int port)
+{
+  struct soap *soap = soap_new();
+  int ret;
+  soap_register_plugin(soap, http_da);
+  if (!soap_valid_socket(soap_bind(soap, NULL, port, 100)))
+    soap_print_fault(soap, stderr);
+  else
+  {
+    fprintf(stderr, "Bind to port %d successful\n", port);
+    soap->accept_timeout = 3600; /* let server time out after one hour */
+    for (;;)
+    {
+      int sock = soap_accept(soap);
+      if (!soap_valid_socket(sock))
+      {
+        if (soap->errnum)
+          soap_print_fault(soap, stderr);
+        else
+        {
+	  fprintf(stderr, "Server timed out\n");
+          break;
+        }
+      }
+      fprintf(stderr, "Accepting socket %d connection from IP %d.%d.%d.%d\n", sock, (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF);
+      if (soap_serve(soap))
+        soap_print_fault(soap, stderr);
+      fprintf(stderr, "Served\n\n");
+      soap_destroy(soap);
+      soap_end(soap);
+    } 
+  }
+  ret = soap->error;
+  soap_end(soap);
+  soap_done(soap);
+  free(soap);
+  return ret;
+}
+
+int run_tests(int argc, char **argv)
+{
+  struct soap *soap = soap_new();
+  struct ns__echoString r;
+  char *endpoint, *arg;
+  int ret;
+
+  soap_register_plugin(soap, http_da);
+
+  endpoint = argv[1];
+  arg = argv[2];
+
+  if (soap_call_ns__echoString(soap, endpoint, NULL, arg, &r))
+  {
+    if (soap->error == 401)
+    {
+      if (!strcmp(soap->authrealm, authrealm))
+      {
+	/* save userid and passwd for basic or digest authentication */
+	struct http_da_info info;
+	http_da_save(soap, &info, authrealm, "Mufasa", "Circle Of Life");
+        if (!soap_call_ns__echoString(soap, endpoint, NULL, arg, &r))
+	{
+	  soap_end(soap);
+	  /* need to restore for authentication */
+	  http_da_restore(soap, &info);
+	  if (!soap_call_ns__echoString(soap, endpoint, NULL, arg, &r))
+          {
+	    if (!strcmp(arg, r.arg))
+              printf("EchoString test OK\n");
+            else
+              printf("Transmission error\n");
+	  } 
+        }
+	http_da_release(soap, &info);
+	/* regular calls may follow */
+      }
+    }
+  }
+  if (soap->error)
+    soap_print_fault(soap, stderr);
+  ret = soap->error;
+  soap_end(soap);
+  soap_done(soap);
+  free(soap);
+  return ret;
+}
+
+int ns__echoString(struct soap *soap, char *arg, struct ns__echoString *response)
+{
+  if (soap->userid && soap->passwd)	/* Basic authentication: we may want to reject this since the password was send in the clear */
+  { if (!strcmp(soap->userid, "Mufasa")
+     && !strcmp(soap->passwd, "Circle Of Life"))
+    {
+      response->arg = arg;
+      return SOAP_OK;
+    }
+  }
+  else if (soap->authrealm && soap->userid)
+  {
+    /* simulate database lookup on userid to find passwd */
+    if (!strcmp(soap->authrealm, authrealm) && !strcmp(soap->userid, "Mufasa"))
+    {
+      char *passwd = "Circle Of Life";
+
+      if (!http_da_verify_post(soap, passwd))
+      {
+        response->arg = arg;
+        return SOAP_OK;
+      }
+    }
+  }
+  soap->authrealm = authrealm;
+  return 401; /* Not authorized, challenge digest authentication with httpda plugin */
+}
diff --git a/plugin/httpdatest.h b/plugin/httpdatest.h
new file mode 100644
index 0000000..8621c97
--- /dev/null
+++ b/plugin/httpdatest.h
@@ -0,0 +1,50 @@
+/*
+
+httpdatest.h
+
+gSOAP HTTP Digest Authentication example application.
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia, Inc., All Rights Reserved.
+
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia, Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+
+Compile:
+
+soapcpp2 -c httpdatest.h
+cc -DWITH_OPENSSL -o httpdatest httpdatest.c soapC.c soapClient.c soapServer.c httpda.c md5evp.c threads.c stdsoap2.c -lssl -lcrypto -lz
+
+*/
+
+int ns__echoString(char *arg, struct ns__echoString*);
diff --git a/plugin/httpform.c b/plugin/httpform.c
new file mode 100644
index 0000000..5cb2824
--- /dev/null
+++ b/plugin/httpform.c
@@ -0,0 +1,179 @@
+/*
+
+httpform.c
+
+gSOAP HTTP POST application/x-www-form-urlencoded plugin.
+
+Requires linkage with httpget.c (for query_key and query_val)
+
+Note: multipart/related and multipart/form-data are already handled in gSOAP.
+
+gSOAP XML Web services tools
+Copyright (C) 2004-2005, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2004 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+
+	Compile & link with stand-alone gSOAP server.
+
+	Usage (server side):
+	struct soap soap;
+	soap_init(&soap);
+	soap_register_plugin_arg(&soap, http_form, http_form_handler);
+	...
+	... = soap_copy(&soap); // copies plugin too but not its data: plugin data is shared since fcopy is not set
+	...
+	soap_done(&soap); // detach plugin (calls plugin->fdelete)
+
+	You need to define a HTTP handling function at the server-side:
+	int http_form_handler(struct soap*)
+	which will be called from the plugin upon an HTTP POST request that
+	matches the application/x-www-form-urlencoded content-type.
+	The function should return an error code or SOAP_STOP to prevent the
+	gSOAP engine from processing the message body;
+
+	To parse form data in the handler, use:
+
+	char *s = form(soap);
+	while (s)
+	{ char *key = query_key(soap, &s); // decode next form string key
+	  char *val = query_val(soap, &s); // decode next form string value (if any)
+          ...
+	}
+
+	The handler should also produce a valid HTTP response, for example:
+	soap_response(soap, SOAP_HTML); // use this to return HTML ...
+	soap_response(soap, SOAP_OK); // ... or use this to return a SOAP message
+	...
+	soap_send(soap, "<HTML>...</HTML>"); // example HTML
+	...
+	soap_end_send(soap);
+
+*/
+
+#include "httpform.h"
+
+const char http_form_id[14] = HTTP_FORM_ID;
+
+static int http_form_init(struct soap *soap, struct http_form_data *data, int (*handler)(struct soap*));
+static void http_form_delete(struct soap *soap, struct soap_plugin *p);
+static int http_form_parse_header(struct soap *soap, const char*, const char*);
+
+int http_form(struct soap *soap, struct soap_plugin *p, void *arg)
+{ p->id = http_form_id;
+  p->data = (void*)malloc(sizeof(struct http_form_data));
+  p->fdelete = http_form_delete;
+  if (p->data)
+    if (http_form_init(soap, (struct http_form_data*)p->data, (int (*)(struct soap*))arg))
+    { free(p->data); /* error: could not init */
+      return SOAP_EOM; /* return error */
+    }
+  return SOAP_OK;
+}
+
+static int http_form_init(struct soap *soap, struct http_form_data *data, int (*handler)(struct soap*))
+{ data->fparsehdr = soap->fparsehdr; /* save old HTTP header parser callback */
+  soap->fparsehdr = http_form_parse_header; /* replace HTTP header parser callback with ours */
+  if (handler)
+    soap->fform = handler;
+  return SOAP_OK;
+}
+
+static void http_form_delete(struct soap *soap, struct soap_plugin *p)
+{ free(p->data); /* free allocated plugin data (this function is not called for shared plugin data, but only when the final soap_done() is invoked on the original soap struct) */
+}
+
+static int http_form_parse_header(struct soap *soap, const char *key, const char *val)
+{ struct http_form_data *data = (struct http_form_data*)soap_lookup_plugin(soap, http_form_id);
+  if (!data)
+    return SOAP_PLUGIN_ERROR;
+  soap->error = data->fparsehdr(soap, key, val); /* parse HTTP header */
+  if (soap->error == SOAP_OK)
+  { if (!soap_tag_cmp(key, "Content-Type"))
+    { /* check content type: you can filter any type of payloads here */
+      if (!soap_tag_cmp(val, "application/x-www-form-urlencoded"))
+        soap->error = SOAP_FORM; /* delegate body parsing to form handler */
+    }
+  }
+  return soap->error;
+}
+
+char* form(struct soap *soap)
+{ char *s = NULL;
+  /* It is unlikely chunked and/or compressed POST forms are send by browsers, but we need to handle them */
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK || soap->zlib_in != SOAP_ZLIB_NONE)
+  { int c;
+    soap->labidx = 0;
+    if (soap_append_lab(soap, "?", 1))
+      return NULL;
+    do
+    { register size_t k;
+      if (soap_append_lab(soap, NULL, 0))
+        return NULL;
+      s = soap->labbuf + soap->labidx;
+      k = soap->lablen - soap->labidx;
+      soap->labidx = soap->lablen;
+      while (k--)
+      { if ((c = soap_getchar(soap)) == EOF)
+	  break;
+        *s++ = c;
+      }
+    } while (c != EOF);
+    *s = '\0';
+    s = soap->labbuf;
+  }
+  else
+  { if (soap->length)
+    { s = (char*)soap_malloc(soap, soap->length + 2);
+      if (s)
+      { char *t = s;
+        size_t i;
+	int c;
+	*t++ = '?';
+        for (i = soap->length; i; i--)
+        { if ((c = soap_getchar(soap)) == EOF)
+	  { soap->error = SOAP_EOF;
+	    return NULL;
+	  }
+	  *t++ = c;
+	}
+        *t = '\0';
+      }
+    }
+  }
+  soap_end_recv(soap);
+  return s;
+}
+
+/******************************************************************************/
+
diff --git a/plugin/httpform.h b/plugin/httpform.h
new file mode 100644
index 0000000..d74885b
--- /dev/null
+++ b/plugin/httpform.h
@@ -0,0 +1,67 @@
+/*
+
+httpform.h
+
+gSOAP HTTP POST application/x-www-form-urlencoded plugin.
+
+Requires linkage with httpget.c (for query_key and query_val)
+
+Note: multipart/related and multipart/form-data are already handled in gSOAP.
+
+gSOAP XML Web services tools
+Copyright (C) 2004-2005, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2004 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+*/
+
+#ifndef HTTPFORM_H
+#define HTTPFORM_H
+
+#include "stdsoap2.h"
+#include "httpget.h"	/* require soap_decode_string */
+
+#define HTTP_FORM_ID "HTTP-FORM-1.0" /* plugin identification */
+
+extern const char http_form_id[];
+
+/* This is the local plugin data shared among all copies of the soap struct: */
+struct http_form_data
+{ int (*fparsehdr)(struct soap*, const char*, const char*); /* to save and call the internal HTTP header parser */
+};
+
+int http_form(struct soap*, struct soap_plugin*, void*);
+
+char *form(struct soap*);
+
+#endif
diff --git a/plugin/httpget.c b/plugin/httpget.c
new file mode 100644
index 0000000..2cee5c2
--- /dev/null
+++ b/plugin/httpget.c
@@ -0,0 +1,313 @@
+/*
+
+httpget.c
+
+gSOAP HTTP GET plugin.
+
+gSOAP XML Web services tools
+Copyright (C) 2004-2005, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2004 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+
+	Compile & link with stand-alone gSOAP server for HTTP GET support.
+	Compile & link with gSOAP clients for client-side HTTP GET requests.
+
+	Usage (server side):
+	struct soap soap;
+	soap_init(&soap);
+	soap_register_plugin_arg(&soap, http_get, http_get_handler);
+	...
+	... = soap_copy(&soap); // copies plugin too but not its data: plugin data is shared since fcopy is not set
+	...
+	soap_done(&soap); // detach plugin (calls plugin->fdelete)
+
+	You need to define a HTTP GET handling function at the server-side:
+	int http_get_handler(struct soap*)
+	which will be called from the plugin upon an HTTP GET request.
+	The function should return an error code or SOAP_OK;
+	This function should produce a valid HTTP response, for example:
+	soap_response(soap, SOAP_HTML); // use this to return HTML ...
+	soap_response(soap, SOAP_OK); // ... or use this to return a SOAP message
+	...
+	soap_send(soap, "<HTML>...</HTML>"); // example HTML
+	...
+	soap_end_send(soap);
+	To get query string key-value pairs within a service routine, use:
+	char *s;
+	s = query(soap);
+	while (s)
+	{ char *key = query(soap, &s);
+	  char *val = query(soap, &s);
+	  ...
+	}
+	This will garble soap->path, which contains the HTTP path of the form:
+	/path?query
+	where path and/or ?query may be absent. The path info is obtained from
+	the HTTP request URL: http://domain/path?query
+	The URL should not exceed the length of SOAP_TAGLEN. Adjust SOAP_TAGLEN
+	in stdsoap2.h if necessary.
+
+	Usage (client side):
+	For SOAP calls, declare a one-way response message in the header file,
+	for example:
+	int ns__methodResponse(... params ..., void);
+	The params will hold the return values returned by the server's SOAP
+	response message.
+	Client code:
+	struct soap soap;
+	soap_init(&soap);
+	soap_register_plugin(&soap, http_get); // register plugin
+	...
+	if (soap_get_connect(&soap, endpoint, action))
+	  ... connect error ...
+        else if (soap_recv_ns__methodResponse(&soap, ... params ...))
+	  ... error ...
+        else
+	  ... ok ...
+        soap_end(&soap);
+	soap_done(&soap);
+	To use general HTTP GET, for example to retrieve an HTML document, use
+	struct soap soap;
+	soap_init(&soap);
+	soap_register_plugin(&soap, http_get); // register plugin
+	if (soap_get_connect(&soap, endpoint, action))
+	  ... connect error ...
+	else
+	  ... get the document from the soap.socket fd until EOF ...
+        soap_end(&soap);
+	soap_done(&soap);
+
+*/
+
+#include "httpget.h"
+
+const char http_get_id[13] = HTTP_GET_ID;
+
+static int http_get_init(struct soap *soap, struct http_get_data *data, int (*handler)(struct soap*));
+static void http_get_delete(struct soap *soap, struct soap_plugin *p);
+static int http_get_parse(struct soap *soap);
+static int http_connect(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
+
+int http_get(struct soap *soap, struct soap_plugin *p, void *arg)
+{ p->id = http_get_id;
+  p->data = (void*)malloc(sizeof(struct http_get_data));
+  /* p->fcopy = http_get_copy; obsolete, see note with http_get_copy() */
+  p->fdelete = http_get_delete;
+  if (p->data)
+    if (http_get_init(soap, (struct http_get_data*)p->data, (int (*)(struct soap*))arg))
+    { free(p->data); /* error: could not init */
+      return SOAP_EOM; /* return error */
+    }
+  return SOAP_OK;
+}
+
+int soap_get_connect(struct soap *soap, const char *endpoint, const char *action)
+{ struct http_get_data *data = (struct http_get_data*)soap_lookup_plugin(soap, http_get_id);
+  if (!data)
+    return soap->error = SOAP_PLUGIN_ERROR;
+  soap_begin(soap);
+  data->fpost = soap->fpost;
+  soap->fpost = http_connect;
+  return soap_connect(soap, endpoint, action);
+}
+
+static int http_connect(struct soap *soap, const char *endpoint, const char *host, int port, const char *path, const char *action, size_t count)
+{ struct http_get_data *data = (struct http_get_data*)soap_lookup_plugin(soap, http_get_id);
+  if (!data)
+    return SOAP_PLUGIN_ERROR;
+  soap->status = SOAP_GET;
+  soap->fpost = data->fpost;
+  return soap->fpost(soap, endpoint, host, port, path, action, count);
+}
+
+static int http_get_init(struct soap *soap, struct http_get_data *data, int (*handler)(struct soap*))
+{ data->fparse = soap->fparse; /* save old HTTP header parser callback */
+  data->fget = handler;
+  data->stat_get = 0;
+  data->stat_post = 0;
+  data->stat_fail = 0;
+  memset(data->min, 0, sizeof(data->min));
+  memset(data->hour, 0, sizeof(data->hour));
+  memset(data->day, 0, sizeof(data->day));
+  soap->fparse = http_get_parse; /* replace HTTP header parser callback with ours */
+  return SOAP_OK;
+}
+
+/* We will share the plugin data among all soap copies created with soap_copy(), so we don't have to define this
+static int http_get_copy(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src)
+{ *dst = *src;
+  return SOAP_OK;
+}
+*/
+
+static void http_get_delete(struct soap *soap, struct soap_plugin *p)
+{ free(p->data); /* free allocated plugin data (this function is not called for shared plugin data, but only when the final soap_done() is invoked on the original soap struct) */
+}
+
+static int http_get_parse(struct soap *soap)
+{
+#ifndef WITH_LEAN
+  time_t t;
+  struct tm T, *pT;
+#endif
+  struct http_get_data *data = (struct http_get_data*)soap_lookup_plugin(soap, http_get_id);
+  if (!data)
+    return SOAP_PLUGIN_ERROR;
+#ifndef WITH_LEAN
+  time(&t);
+#ifdef HAVE_LOCALTIME_R
+  pT = localtime_r(&t, &T);
+#else
+  pT = localtime(&t);
+#endif
+  /* updates should be in mutex, but we don't mind some inaccuracy in the count to preserve performance */
+  data->day[pT->tm_yday]++;
+  data->day[(pT->tm_yday + 1) % 365] = 0;
+  data->hour[pT->tm_hour]++;
+  data->hour[(pT->tm_hour + 1) % 24] = 0;
+  data->min[pT->tm_min]++;
+  data->min[(pT->tm_min + 1) % 60] = 0;
+#endif
+  soap->error = data->fparse(soap); /* parse HTTP header */
+  if (soap->error == SOAP_OK)
+  { /* update should be in mutex, but we don't mind some inaccuracy in the count */
+    data->stat_post++;
+  }
+  else if (soap->error == SOAP_GET_METHOD && data->fget)
+  { soap->error = SOAP_OK;
+    if ((soap->error = data->fget(soap))) /* call user-defined HTTP GET handler */
+    { /* update should be in mutex, but we don't mind some inaccuracy in the count */
+      data->stat_fail++;
+      return soap->error;
+    }
+    /* update should be in mutex, but we don't mind some inaccuracy in the count */
+    data->stat_get++;
+    return SOAP_STOP; /* stop processing the request and do not return SOAP Fault */
+  }
+  else
+  { /* update should be in mutex, but we don't mind some inaccuracy in the count */
+    data->stat_fail++;
+  }
+  return soap->error;
+}
+
+char *query(struct soap *soap)
+{ return strchr(soap->path, '?');
+}
+
+char *query_key(struct soap *soap, char **s)
+{ char *t = *s;
+  if (t && *t)
+  { *s = (char*)soap_decode_string(t, strlen(t), t + 1);
+    return t;
+  }
+  return *s = NULL;
+}
+
+char *query_val(struct soap *soap, char **s)
+{ char *t = *s;
+  if (t && *t == '=')
+  { *s = (char*)soap_decode_string(t, strlen(t), t + 1);
+    return t;
+  }
+  return NULL;
+}
+
+int soap_encode_string(const char *s, char *t, size_t len)
+{ register int c;
+  register size_t n = len;
+  while ((c = *s++) && n-- > 1)
+  { if (c == ' ') 
+      *t++ = '+';
+    else if (c == '!'
+          || c == '$'
+          || (c >= '(' && c <= '.')
+          || (c >= '0' && c <= '9')
+          || (c >= 'A' && c <= 'Z')
+          || c == '_'
+          || (c >= 'a' && c <= 'z'))
+      *t++ = (char)c;
+    else if (n > 2)
+    { *t++ = '%';
+      *t++ = (char)((c >> 4) + (c > 159 ? '7' : '0'));
+      c &= 0xF;
+      *t++ = (char)(c + (c > 9 ? '7' : '0'));
+      n -= 2;
+    }
+    else
+      break;
+  }
+  *t = '\0';
+  return len - n;
+}
+
+const char* soap_decode_string(char *buf, size_t len, const char *val)
+{ const char *s;
+  char *t;
+  for (s = val; *s; s++)
+    if (*s != ' ' && *s != '=')
+      break;
+  if (*s == '"')
+  { t = buf;
+    s++;
+    while (*s && *s != '"' && --len)
+      *t++ = *s++;
+    *t = '\0';
+    do s++;
+    while (*s && *s != '&' && *s != '=');
+  }
+  else
+  { t = buf;
+    while (*s && *s != '&' && *s != '=' && --len)
+    { switch (*s)
+      { case '+':
+          *t++ = ' ';
+        case ' ':
+          s++;
+          break;
+        case '%':
+          *t++ = ((s[1] >= 'A' ? (s[1]&0x7) + 9 : s[1] - '0') << 4) + (s[2] >= 'A' ? (s[2]&0x7) + 9 : s[2] - '0');
+          s += 3;
+          break;
+        default:
+          *t++ = *s++;
+      }
+    }
+    *t = '\0';
+  }
+  return s;
+}
+
+/******************************************************************************/
+
diff --git a/plugin/httpget.h b/plugin/httpget.h
new file mode 100644
index 0000000..96ae7de
--- /dev/null
+++ b/plugin/httpget.h
@@ -0,0 +1,76 @@
+/*
+
+httpget.h
+
+gSOAP HTTP GET plugin.
+
+gSOAP XML Web services tools
+Copyright (C) 2004-2005, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2004 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+*/
+
+#ifndef HTTPGET_H
+#define HTTPGET_H
+
+#include "stdsoap2.h"
+
+#define HTTP_GET_ID "HTTP-GET-1.1" /* plugin identification */
+
+extern const char http_get_id[];
+
+/* This is the local plugin data shared among all copies of the soap struct: */
+struct http_get_data
+{ int (*fpost)(struct soap*, const char*, const char*, int, const char*, const char*, size_t); /* client-side HTTP GET override */
+  int (*fparse)(struct soap*); /* to save and call the internal HTTP header parser */
+  int (*fget)(struct soap*); /* user-defined server-side HTTP GET handler */
+  size_t stat_get;  /* HTTP GET usage statistics */
+  size_t stat_post; /* HTTP POST usage statistics */
+  size_t stat_fail; /* HTTP failure statistics */
+  size_t min[60]; /* Hits by the minute */
+  size_t hour[24]; /* Hits by the hour */
+  size_t day[365]; /* Hits by day */
+};
+
+int http_get(struct soap*, struct soap_plugin*, void*);
+int soap_get_connect(struct soap*, const char*, const char*);
+
+char *query(struct soap*);
+char *query_key(struct soap*, char**);
+char *query_val(struct soap*, char**);
+
+int soap_encode_string(const char*, char*, size_t);
+const char* soap_decode_string(char*, size_t, const char*);
+
+#endif
diff --git a/plugin/httpmd5.c b/plugin/httpmd5.c
new file mode 100644
index 0000000..3409197
--- /dev/null
+++ b/plugin/httpmd5.c
@@ -0,0 +1,217 @@
+/*
+
+httpmd5.c
+
+gSOAP HTTP Content-MD5 digest plugin.
+
+Usage (both client and server, see httpmd5test.h/.c for example):
+soap_register_plugin(&soap, http_md5);
+This enables HTTP MD5 checksum generation and checking for SOAP/XML messages
+WITHOUT attachments.
+
+Compile with -DWITH_OPENSSL
+Link with OpenSSL (for md5evp.c), httpmd5.c, and md5evp.c
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia, Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+	Requires an md5 engine, see md5evp.h
+
+	int md5_handler(struct soap *soap, void **context, enum md5_action action, char *buf, size_t len)
+	context can be set and passed to subsequent calls. Parameters:
+	action =
+	MD5_INIT:	init context
+	MD5_UPDATE:	update context with data from buf with size len
+	MD5_FINAL:	fill buf with 16 bytes MD5 hash value
+	MD5_DELETE:	delete context
+	buf		input data, output MD5 128 bit hash value
+	len		length of input data
+
+	Example code:
+	httpmd5test.h, httpmd5test.c
+
+	Limitations:
+	Does not work with combined chunked + compressed messages.
+	When sending DIME/MIME attachments, you MUST use the SOAP_IO_STORE flag
+	to compute the MD5 hash of the message with attachments. The flag
+	disables streaming DIME.
+*/
+
+#include "httpmd5.h"
+
+const char http_md5_id[13] = HTTP_MD5_ID;
+
+static int http_md5_init(struct soap *soap, struct http_md5_data *data);
+static int http_md5_copy(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src);
+static void http_md5_delete(struct soap *soap, struct soap_plugin *p);
+
+static int http_md5_post_header(struct soap *soap, const char *key, const char *val);
+static int http_md5_parse_header(struct soap *soap, const char *key, const char *val);
+static int http_md5_prepareinit(struct soap *soap);
+static int http_md5_preparesend(struct soap *soap, const char *buf, size_t len);
+static int http_md5_preparerecv(struct soap *soap, const char *buf, size_t len);
+static int http_md5_disconnect(struct soap *soap);
+
+int http_md5(struct soap *soap, struct soap_plugin *p, void *arg)
+{ p->id = http_md5_id;
+  p->data = (void*)SOAP_MALLOC(soap, sizeof(struct http_md5_data));
+  p->fcopy = http_md5_copy;
+  p->fdelete = http_md5_delete;
+  if (p->data)
+    if (http_md5_init(soap, (struct http_md5_data*)p->data))
+    { SOAP_FREE(soap, p->data); /* error: could not init */
+      return SOAP_EOM; /* return error */
+    }
+  return SOAP_OK;
+}
+
+static int http_md5_init(struct soap *soap, struct http_md5_data *data)
+{ data->fposthdr = soap->fposthdr;
+  soap->fposthdr = http_md5_post_header;
+  data->fparsehdr = soap->fparsehdr;
+  soap->fparsehdr = http_md5_parse_header;
+  data->fprepareinit = soap->fprepareinit;
+  soap->fprepareinit = http_md5_prepareinit;
+  data->fpreparesend = soap->fpreparesend;
+  soap->fpreparesend = http_md5_preparesend;
+  data->context = NULL;
+  memset(data->digest, 0, sizeof(data->digest));
+  return SOAP_OK;
+}
+
+static int http_md5_copy(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src)
+{ *dst = *src;
+  dst->data = (void*)SOAP_MALLOC(soap, sizeof(struct http_md5_data));
+  memcpy(dst->data, src->data, sizeof(struct http_md5_data));
+  ((struct http_md5_data*)dst->data)->context = NULL;
+  return SOAP_OK;
+}
+
+static void http_md5_delete(struct soap *soap, struct soap_plugin *p)
+{ struct http_md5_data *data = (struct http_md5_data*)soap_lookup_plugin(soap, http_md5_id);
+  if (data)
+  { md5_handler(soap, &data->context, MD5_DELETE, NULL, 0);
+    SOAP_FREE(soap, data);
+  }
+}
+
+static int http_md5_post_header(struct soap *soap, const char *key, const char *val)
+{ struct http_md5_data *data = (struct http_md5_data*)soap_lookup_plugin(soap, http_md5_id);
+  char buf64[25]; /* 24 base64 chars + '\0' */
+  int err;
+  if (!data)
+    return SOAP_PLUGIN_ERROR;
+  if (!key) /* last line */
+  { if ((err = md5_handler(soap, &data->context, MD5_FINAL, data->digest, 0)))
+      return err;
+    data->fposthdr(soap, "Content-MD5", soap_s2base64(soap, data->digest, buf64, 16));
+  }
+  return data->fposthdr(soap, key, val);
+}
+
+static int http_md5_parse_header(struct soap *soap, const char *key, const char *val)
+{ struct http_md5_data *data = (struct http_md5_data*)soap_lookup_plugin(soap, http_md5_id);
+  if (!data)
+    return SOAP_PLUGIN_ERROR;
+  if (!soap_tag_cmp(key, "Content-MD5"))
+  { soap_base642s(soap, val, data->digest, 16, NULL);
+    data->fpreparerecv = soap->fpreparerecv;
+    soap->fpreparerecv = http_md5_preparerecv;
+    data->fdisconnect = soap->fdisconnect;
+    soap->fdisconnect = http_md5_disconnect;
+    return SOAP_OK;
+  }
+  return data->fparsehdr(soap, key, val);
+}
+
+static int http_md5_prepareinit(struct soap *soap)
+{ struct http_md5_data *data = (struct http_md5_data*)soap_lookup_plugin(soap, http_md5_id);
+  if (!data)
+    return SOAP_PLUGIN_ERROR;
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && (soap->mode & (SOAP_ENC_DIME | SOAP_ENC_MIME)))
+  { /* TODO: handle attachments automatically, does not work yet */
+    soap->mode &= ~SOAP_IO;
+    soap->mode |= SOAP_IO_STORE;
+  }
+  else
+  { md5_handler(soap, &data->context, MD5_INIT, NULL, 0);
+    if (soap->fpreparerecv == http_md5_preparerecv)
+      soap->fpreparerecv = data->fpreparerecv;
+    if (soap->fdisconnect == http_md5_disconnect)
+      soap->fdisconnect = data->fdisconnect;
+    if (data->fprepareinit)
+      return data->fprepareinit(soap);
+  }
+  return SOAP_OK;
+}
+
+static int http_md5_preparesend(struct soap *soap, const char *buf, size_t len)
+{ struct http_md5_data *data = (struct http_md5_data*)soap_lookup_plugin(soap, http_md5_id);
+  if (!data)
+    return SOAP_PLUGIN_ERROR;
+  md5_handler(soap, &data->context, MD5_UPDATE, (char*)buf, len);
+  if (data->fpreparesend)
+    return data->fpreparesend(soap, buf, len);
+  return SOAP_OK;
+}
+
+static int http_md5_preparerecv(struct soap *soap, const char *buf, size_t len)
+{ struct http_md5_data *data = (struct http_md5_data*)soap_lookup_plugin(soap, http_md5_id);
+  if (!data)
+    return SOAP_PLUGIN_ERROR;
+  md5_handler(soap, &data->context, MD5_UPDATE, (char*)buf, len);
+  if (data->fpreparerecv)
+    return data->fpreparerecv(soap, buf, len);
+  return SOAP_OK;
+}
+
+static int http_md5_disconnect(struct soap *soap)
+{ struct http_md5_data *data = (struct http_md5_data*)soap_lookup_plugin(soap, http_md5_id);
+  char digest[16];
+  if (!data)
+    return SOAP_PLUGIN_ERROR;
+  md5_handler(soap, &data->context, MD5_FINAL, digest, 0);
+  soap->fpreparerecv = data->fpreparerecv;
+  soap->fdisconnect = data->fdisconnect;
+  if (memcmp(digest, data->digest, 16))
+    return soap_sender_fault(soap, "MD5 digest mismatch: message corrupted", NULL);
+  if (soap->fdisconnect)
+    return soap->fdisconnect(soap);
+  return SOAP_OK;
+}
diff --git a/plugin/httpmd5.h b/plugin/httpmd5.h
new file mode 100644
index 0000000..848604e
--- /dev/null
+++ b/plugin/httpmd5.h
@@ -0,0 +1,78 @@
+/*
+
+httpmd5.h
+
+gSOAP HTTP Content-MD5 digest plugin.
+
+Usage (both client and server, see httpmd5test.h/.c for example):
+soap_register_plugin(&soap, http_md5);
+This enables HTTP MD5 checksum generation and checking for SOAP/XML messages
+WITHOUT attachments.
+
+Compile with -DWITH_OPENSSL
+Link with OpenSSL (for md5evp.c), httpmd5.c, and md5evp.c
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia, Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#ifndef HTTPMD5_H
+#define HTTPMD5_H
+
+#include "stdsoap2.h"
+#include "md5evp.h"
+
+#define HTTP_MD5_ID "HTTP-MD5-1.1" /* plugin identification */
+
+extern const char http_md5_id[];
+
+int http_md5(struct soap *soap, struct soap_plugin *p, void *arg);
+
+struct http_md5_data
+{ int (*fposthdr)(struct soap*, const char*, const char*);
+  int (*fparsehdr)(struct soap*, const char*, const char*);
+  int (*fprepareinit)(struct soap*);
+  int (*fpreparesend)(struct soap*, const char*, size_t);
+  int (*fpreparerecv)(struct soap*, const char*, size_t);
+  int (*fdisconnect)(struct soap*);
+  void *context;
+  char digest[16];
+};
+
+#endif
diff --git a/plugin/httpmd5test.c b/plugin/httpmd5test.c
new file mode 100644
index 0000000..97d827c
--- /dev/null
+++ b/plugin/httpmd5test.c
@@ -0,0 +1,73 @@
+/*
+
+httpmd5test.c
+
+gSOAP HTTP Content-MD5 digest plugin example application.
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2004, Robert van Engelen, Genivia, Inc., All Rights Reserved.
+
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2004, Robert van Engelen, Genivia, Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+
+Requires OpenSSL
+
+Compile:
+
+soapcpp2 -c httpmd5test.h
+cc -DWITH_OPENSSL -o httpmd5test httpmd5test.c soapC.c soapClient.c soapServer.c httpmd5.c md5evp.c stdsoap2.c -lssl -lcrypto -lz
+
+*/
+
+#include "httpmd5.h"
+#include "soapH.h"
+#include "ns.nsmap"
+
+int main(int argc, char **argv)
+{ struct soap soap;
+  struct ns__echoString r;
+  soap_init(&soap);
+  soap_register_plugin(&soap, http_md5);
+  if (argc < 2)
+    soap_serve(&soap);
+  else if (soap_call_ns__echoString(&soap, "http://", NULL, argv[1], &r))
+    soap_print_fault(&soap, stderr);
+  soap_end(&soap);
+  soap_done(&soap);
+  return 0;
+}
+
+int ns__echoString(struct soap *soap, char *arg, struct ns__echoString *response)
+{ response->arg = arg;
+  return SOAP_OK;
+}
diff --git a/plugin/httpmd5test.h b/plugin/httpmd5test.h
new file mode 100644
index 0000000..08e5f6c
--- /dev/null
+++ b/plugin/httpmd5test.h
@@ -0,0 +1,50 @@
+/*
+
+httpmd5test.h
+
+gSOAP HTTP Content-MD5 digest plugin example application.
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2004, Robert van Engelen, Genivia, Inc., All Rights Reserved.
+
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2004, Robert van Engelen, Genivia, Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+
+Compile:
+
+soapcpp2 -c httpmd5test.h
+cc -DWITH_OPENSSL -o httpmd5test httpmd5test.c soapC.c soapClient.c soapServer.c httpmd5.c md5evp.c stdsoap2.c -lssl -lcrypto -lz
+
+*/
+
+int ns__echoString(char *arg, struct ns__echoString*);
diff --git a/plugin/httppost.c b/plugin/httppost.c
new file mode 100644
index 0000000..c342e73
--- /dev/null
+++ b/plugin/httppost.c
@@ -0,0 +1,123 @@
+/*
+
+httppost.c
+
+gSOAP HTTP POST plugin for non-SOAP payloads.
+Note: multipart/related and multipart/form-data are already handled in gSOAP.
+
+gSOAP XML Web services tools
+Copyright (C) 2004-2005, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2004 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+
+	Compile & link with stand-alone gSOAP server.
+
+	Usage (server side):
+	struct soap soap;
+	soap_init(&soap);
+	soap_register_plugin_arg(&soap, http_post, http_post_handler);
+	...
+	... = soap_copy(&soap); // copies plugin too but not its data: plugin data is shared since fcopy is not set
+	...
+	soap_done(&soap); // detach plugin (calls plugin->fdelete)
+
+	You need to define a HTTP handling function at the server-side:
+	int http_post_handler(struct soap*)
+	which will be called from the plugin upon an HTTP POST request that
+	matches the content-type requirements.
+	The function should return an error code or SOAP_STOP to prevent the
+	gSOAP engine from processing the message body;
+
+	This function should also produce a valid HTTP response, for example:
+	soap_response(soap, SOAP_HTML); // use this to return HTML ...
+	soap_response(soap, SOAP_OK); // ... or use this to return a SOAP message
+	...
+	soap_send(soap, "<HTML>...</HTML>"); // example HTML
+	...
+	soap_end_send(soap);
+
+*/
+
+#include "httppost.h"
+
+const char http_post_id[14] = HTTP_POST_ID;
+
+static int http_post_init(struct soap *soap, struct http_post_data *data, int (*handler)(struct soap*));
+static void http_post_delete(struct soap *soap, struct soap_plugin *p);
+static int http_post_parse_header(struct soap *soap, const char*, const char*);
+static int http_post_handler(struct soap *soap);
+
+int http_post(struct soap *soap, struct soap_plugin *p, void *arg)
+{ p->id = http_post_id;
+  p->data = (void*)malloc(sizeof(struct http_post_data));
+  p->fdelete = http_post_delete;
+  if (p->data)
+    if (http_post_init(soap, (struct http_post_data*)p->data, (int (*)(struct soap*))arg))
+    { free(p->data); /* error: could not init */
+      return SOAP_EOM; /* return error */
+    }
+  return SOAP_OK;
+}
+
+static int http_post_init(struct soap *soap, struct http_post_data *data, int (*handler)(struct soap*))
+{ data->fparsehdr = soap->fparsehdr; /* save old HTTP header parser callback */
+  soap->fparsehdr = http_post_parse_header; /* replace HTTP header parser callback with ours */
+  if (handler)
+    soap->fform = handler;
+  return SOAP_OK;
+}
+
+static void http_post_delete(struct soap *soap, struct soap_plugin *p)
+{ free(p->data); /* free allocated plugin data (this function is not called for shared plugin data, but only when the final soap_done() is invoked on the original soap struct) */
+}
+
+static int http_post_parse_header(struct soap *soap, const char *key, const char *val)
+{ struct http_post_data *data = (struct http_post_data*)soap_lookup_plugin(soap, http_post_id);
+  if (!data)
+    return SOAP_PLUGIN_ERROR;
+  soap->error = data->fparsehdr(soap, key, val); /* parse HTTP header */
+  if (soap->error == SOAP_OK)
+  { if (!soap_tag_cmp(key, "Content-Type"))
+    { /* check content type: you can filter any type of payloads here */
+      if (!soap_tag_cmp(val, "application/x-www-form-urlencoded"))
+        soap->error = SOAP_FORM; /* delegate body parsing to handler */
+      else if (!soap_tag_cmp(val, "image/*"))
+        soap->error = SOAP_FORM; /* delegate images of any type */
+    }
+  }
+  return soap->error;
+}
+
+/******************************************************************************/
+
diff --git a/plugin/httppost.h b/plugin/httppost.h
new file mode 100644
index 0000000..e34689b
--- /dev/null
+++ b/plugin/httppost.h
@@ -0,0 +1,61 @@
+/*
+
+httppost.h
+
+gSOAP HTTP POST plugin for non-SOAP payloads.
+Note: multipart/related and multipart/form-data are already handled in gSOAP.
+
+gSOAP XML Web services tools
+Copyright (C) 2004-2005, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2004 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+*/
+
+#ifndef HTTPPOST_H
+#define HTTPPOST_H
+
+#include "stdsoap2.h"
+
+#define HTTP_POST_ID "HTTP-POST-1.0" /* plugin identification */
+
+extern const char http_post_id[];
+
+/* This is the local plugin data shared among all copies of the soap struct: */
+struct http_post_data
+{ int (*fparsehdr)(struct soap*, const char*, const char*); /* to save and call the internal HTTP header parser */
+};
+
+int http_post(struct soap*, struct soap_plugin*, void*);
+
+#endif
diff --git a/plugin/logging.c b/plugin/logging.c
new file mode 100644
index 0000000..7092510
--- /dev/null
+++ b/plugin/logging.c
@@ -0,0 +1,84 @@
+/*
+
+logging.c
+
+Message logging plugin for webserver.
+
+gSOAP XML Web services tools
+Copyright (C) 2004-2005, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+
+--------------------------------------------------------------------------------
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+*/
+
+#include "logging.h"
+
+const char logging_id[] = LOGGING_ID;
+
+static int logging_init(struct soap *soap, struct logging_data *data);
+static void logging_delete(struct soap *soap, struct soap_plugin *p);
+static int logging_send(struct soap *soap, const char *buf, size_t len);
+static size_t logging_recv(struct soap *soap, char *buf, size_t len);
+
+int logging(struct soap *soap, struct soap_plugin *p, void *arg)
+{ p->id = logging_id;
+  p->data = (void*)malloc(sizeof(struct logging_data));
+  p->fdelete = logging_delete;
+  if (p->data)
+    if (logging_init(soap, (struct logging_data*)p->data))
+    { free(p->data); /* error: could not init */
+      return SOAP_EOM; /* return error */
+    }
+  return SOAP_OK;
+}
+
+static int logging_init(struct soap *soap, struct logging_data *data)
+{ data->inbound = NULL;
+  data->outbound = NULL;
+  data->stat_sent = 0;
+  data->stat_recv = 0;
+  data->fsend = soap->fsend; /* save old recv callback */
+  data->frecv = soap->frecv; /* save old send callback */
+  soap->fsend = logging_send; /* replace send callback with ours */
+  soap->frecv = logging_recv; /* replace recv callback with ours */
+  return SOAP_OK;
+}
+
+static void logging_delete(struct soap *soap, struct soap_plugin *p)
+{ free(p->data); /* free allocated plugin data. If fcopy() is not set, then this function is not called for all copies of the plugin created with soap_copy(). In this example, the fcopy() callback is omitted and the plugin data is shared by the soap copies created with soap_copy() */
+}
+
+static size_t logging_recv(struct soap *soap, char *buf, size_t len)
+{ struct logging_data *data = (struct logging_data*)soap_lookup_plugin(soap, logging_id);
+  size_t res = data->frecv(soap, buf, len); /* get data from old recv callback */
+  data->stat_recv += res;
+  /* update should be in mutex, but we don't mind some inaccuracy in the count */
+  if (data->inbound)
+    fwrite(buf, res, 1, data->inbound);
+  return res;
+}
+
+static int logging_send(struct soap *soap, const char *buf, size_t len)
+{ struct logging_data *data = (struct logging_data*)soap_lookup_plugin(soap, logging_id);
+  /* update should be in mutex, but we don't mind some inaccuracy in the count */
+  data->stat_sent += len;
+  if (data->outbound)
+    fwrite(buf, len, 1, data->outbound);
+  return data->fsend(soap, buf, len); /* pass data on to old send callback */
+}
+
diff --git a/plugin/logging.h b/plugin/logging.h
new file mode 100644
index 0000000..4c97c66
--- /dev/null
+++ b/plugin/logging.h
@@ -0,0 +1,71 @@
+/*
+
+logging.h
+
+Message logging plugin.
+
+This plugin flushes messages to stderr, but you can easily change it to send
+data elsewhere.
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia, Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#ifndef LOGGING_H
+#define LOGGING_H
+
+#include "stdsoap2.h"
+
+#define LOGGING_ID "LOGGING-1.2"
+
+extern const char logging_id[];
+
+struct logging_data
+{
+  FILE *inbound;
+  FILE *outbound;
+  size_t stat_sent;
+  size_t stat_recv;
+  int (*fsend)(struct soap*, const char*, size_t); /* to save and use send callback */
+  size_t (*frecv)(struct soap*, char*, size_t); /* to save and use recv callback */
+};
+
+int logging(struct soap *soap, struct soap_plugin *plugin, void *arg);
+
+#endif
diff --git a/plugin/md5evp.c b/plugin/md5evp.c
new file mode 100644
index 0000000..9b19136
--- /dev/null
+++ b/plugin/md5evp.c
@@ -0,0 +1,89 @@
+/*
+
+md5evp.c
+
+gSOAP HTTP Content-MD5 digest EVP handler for httpmd5 plugin
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia, Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "md5evp.h"
+
+int md5_handler(struct soap *soap, void **context, enum md5_action action, char *buf, size_t len)
+{ EVP_MD_CTX *ctx;
+  unsigned char hash[EVP_MAX_MD_SIZE];
+  unsigned int size;
+  switch (action)
+  { case MD5_INIT:
+#ifdef WITH_OPENSSL
+      OpenSSL_add_all_digests();
+#endif
+      if (!*context)
+      { *context = (void*)SOAP_MALLOC(soap, sizeof(EVP_MD_CTX));
+        EVP_MD_CTX_init((EVP_MD_CTX*)*context);
+      }
+      ctx = (EVP_MD_CTX*)*context;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "-- MD5 Init %p\n", ctx));
+      EVP_DigestInit(ctx, EVP_md5());
+      break;
+    case MD5_UPDATE:
+      ctx = (EVP_MD_CTX*)*context;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "-- MD5 Update %p --\n", ctx));
+      DBGMSG(TEST, buf, len);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "\n--"));
+      EVP_DigestUpdate(ctx, (void*)buf, (unsigned int)len);
+      break;
+    case MD5_FINAL:
+      ctx = (EVP_MD_CTX*)*context;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "-- MD5 Final %p --\n", ctx));
+      EVP_DigestFinal(ctx, (void*)hash, &size);
+      memcpy(buf, hash, 16);
+      break;
+    case MD5_DELETE:
+      ctx = (EVP_MD_CTX*)*context;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "-- MD5 Delete %p --\n", ctx));
+      if (ctx)
+      { EVP_MD_CTX_cleanup(ctx);
+        SOAP_FREE(soap, ctx);
+      }
+      *context = NULL;
+  }
+  return SOAP_OK;
+}
diff --git a/plugin/md5evp.h b/plugin/md5evp.h
new file mode 100644
index 0000000..862c3bb
--- /dev/null
+++ b/plugin/md5evp.h
@@ -0,0 +1,73 @@
+/*
+
+md5evp.h
+
+gSOAP HTTP Content-MD5 digest plugin.
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia, Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+	Defines MD5 handler using EVP interface (e.g. using OpenSSL)
+
+	int md5_handler(struct soap *soap, void **context, enum md5_action action, char *buf, size_t len)
+	context can be set and passed to subsequent calls. Parameters:
+	action =
+	MD5_INIT:	init context
+	MD5_UPDATE:	update context with data from buf with size len
+	MD5_FINAL:	fill buf with 16 bytes MD5 hash value
+	MD5_DELETE:	delete context
+	buf		input data, output MD5 128 bit hash value
+	len		length of input data
+
+*/
+
+#ifndef MD5EVP_H
+#define MD5EVP_H
+
+#include "stdsoap2.h"
+
+#ifdef WITH_OPENSSL
+#include "openssl/evp.h"
+#endif
+
+enum md5_action { MD5_INIT, MD5_UPDATE, MD5_FINAL, MD5_DELETE };
+
+int md5_handler(struct soap *soap, void **context, enum md5_action action, char *buf, size_t len);
+
+#endif
diff --git a/plugin/plugin.c b/plugin/plugin.c
new file mode 100644
index 0000000..008c586
--- /dev/null
+++ b/plugin/plugin.c
@@ -0,0 +1,88 @@
+/*	plugin.c
+
+	Example gSOAP plug-in
+
+	Copyright (C) 2000-2002 Robert A. van Engelen. All Rights Reserved.
+
+	Compile & link with gSOAP clients and services to view SOAP messages.
+
+	Usage (client/server code):
+	struct soap soap;
+	soap_init(&soap);
+	soap_register_plugin(&soap, plugin); // register plugin
+	...
+	... = soap_copy(&soap); // copies plugin too
+	...
+	soap_done(&soap); // detach plugin
+
+	A plugin is copied with the soap_copy() call. Upon this call, two
+	situations may arise depending on setting the fcopy() callback and
+	the need to share or not share plugin data:
+
+	1. if the plugin fcopy() callback is set, it will be called to allow
+	   the plugin to copy its local data. When soap_done() is called on
+	   the copy, the fdelete() callback is called for cleanup.
+
+	2. if the plugin fcopy() callback is not set, then the plugin data
+	   will be shared (i.e. the data pointer points to the same address).
+	   The fdelete() callback will not be called upon a soap_done() on a
+	   copy of the soap struct. The fdelete() callback will be called for
+	   the original soap struct with which the plugin registered.
+	   
+*/
+
+#include "plugin.h"
+
+static const char plugin_id[] = PLUGIN_ID;
+
+static int plugin_init(struct soap *soap, struct plugin_data *data);
+static int plugin_copy(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src);
+static void plugin_delete(struct soap *soap, struct soap_plugin *p);
+static int plugin_send(struct soap *soap, const char *buf, size_t len);
+static size_t plugin_recv(struct soap *soap, char *buf, size_t len);
+
+int plugin(struct soap *soap, struct soap_plugin *p, void *arg)
+{ p->id = plugin_id;
+  p->data = (void*)malloc(sizeof(struct plugin_data));
+  /* optional: define fcopy() operation. When defined, fdelete() will be called for every copy of the plugin created with fcopy(), when NOT defined, fdelete() will only be called on the original non-copied plugin */
+  p->fcopy = plugin_copy;
+  p->fdelete = plugin_delete;
+  if (p->data)
+    if (plugin_init(soap, (struct plugin_data*)p->data))
+    { free(p->data); /* error: could not init */
+      return SOAP_EOM; /* return error */
+    }
+  return SOAP_OK;
+}
+
+static int plugin_init(struct soap *soap, struct plugin_data *data)
+{ data->fsend = soap->fsend; /* save old recv callback */
+  data->frecv = soap->frecv; /* save old send callback */
+  soap->fsend = plugin_send; /* replace send callback with ours */
+  soap->frecv = plugin_recv; /* replace recv callback with ours */
+  return SOAP_OK;
+}
+
+static int plugin_copy(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src)
+{ if (!(dst->data = (struct plugin_data*)malloc(sizeof(struct plugin_data))))
+    return SOAP_EOM;
+  *dst->data = *src->data;
+  return SOAP_OK;
+}
+
+static void plugin_delete(struct soap *soap, struct soap_plugin *p)
+{ free(p->data); /* free allocated plugin data. If fcopy() is not set, then this function is not called for all copies of the plugin created with soap_copy(). In this example, the fcopy() callback can be safely omitted. When omitted, the plugin data is shared by the soap copies created with soap_copy() */
+}
+
+static int plugin_send(struct soap *soap, const char *buf, size_t len)
+{ struct plugin_data *data = (struct plugin_data*)soap_lookup_plugin(soap, plugin_id);
+  fwrite(buf, len, 1, stderr);
+  return data->fsend(soap, buf, len); /* pass data on to old send callback */
+}
+
+static size_t plugin_recv(struct soap *soap, char *buf, size_t len)
+{ struct plugin_data *data = (struct plugin_data*)soap_lookup_plugin(soap, plugin_id);
+  size_t res = data->frecv(soap, buf, len); /* get data from old recv callback */
+  fwrite(buf, res, 1, stderr);
+  return res;
+}
diff --git a/plugin/plugin.h b/plugin/plugin.h
new file mode 100644
index 0000000..e56dcdc
--- /dev/null
+++ b/plugin/plugin.h
@@ -0,0 +1,18 @@
+/*	plugin.h
+
+	Example gSOAP plug-in
+
+	Copyright (C) 2000-2002 Robert A. van Engelen. All Rights Reserved.
+
+*/
+
+#include "stdsoap2.h"
+
+#define PLUGIN_ID "PLUGIN-1.0" /* plugin identification */
+
+struct plugin_data
+{ int (*fsend)(struct soap*, const char*, size_t); /* example: to save and use send callback */
+  size_t (*frecv)(struct soap*, char*, size_t); /* example: to save and use recv callback */
+};
+
+int plugin(struct soap *soap, struct soap_plugin *plugin, void *arg);
diff --git a/plugin/smdevp.c b/plugin/smdevp.c
new file mode 100644
index 0000000..2d05204
--- /dev/null
+++ b/plugin/smdevp.c
@@ -0,0 +1,491 @@
+/*
+
+smdevp.c
+
+gSOAP EVP interface for (signed) message digest
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia, Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+/**
+
+@page smdevp The smdevp engine
+
+The gSOAP smdevp engine computes (signed) message digests over any type of data
+using the EVP interface of OpenSSL. It currently supports MD5, SHA1, HMAC_SHA1,
+DSA_SHA1, and RSA_SHA1.
+
+A digest or signature algorithm is selected with one the following constants:
+
+- @ref SOAP_SMD_DGST_MD5	to compute MD5 128-bit digests
+- @ref SOAP_SMD_DGST_SHA1	to compute MD5 160-bit digests
+- @ref SOAP_SMD_HMAC_SHA1	to compute HMAC-SHA1 message authentication code
+- @ref SOAP_SMD_SIGN_DSA_SHA1	to compute DSA-SHA1 signatures
+- @ref SOAP_SMD_SIGN_RSA_SHA1	to compute RSA-SHA1 signatures
+- @ref SOAP_SMD_VRFY_DSA_SHA1	to verify DSA-SHA1 signatures
+- @ref SOAP_SMD_VRFY_RSA_SHA1	to verify RSA-SHA1 signatures
+
+The smdevp engine wraps the EVP API with three new functions:
+
+- @ref soap_smd_init	to initialize the engine
+- @ref soap_smd_update	to update the state with a message part
+- @ref soap_smd_final	to compute the digest, signature, or verify a signature
+
+A higher-level interface for computing (signed) message digests over
+messages produced by the gSOAP enginre is defined by two new functions:
+
+- @ref soap_smd_begin	to start a digest or signature computation/verification
+- @ref soap_smd_end	to complete a digest/signature computation/verification
+
+Here is an example to sign an XML serialized C++ object using an RSA private
+key applied to the SHA1 digest of the serialized object:
+
+@code
+    ns__Object *object = ...;
+    int alg = SOAP_SMD_SIGN_RSA_SHA1;
+    FILE *fd = fopen("key.pem", "r");
+    EVP_PKEY *key = PEM_read_PrivateKey(fd, NULL, NULL, "password");
+    char *sig = (char*)SOAP_MALLOC(soap, soap_smd_size(alg, key));
+    int siglen;
+    fclose(fd);
+    if (soap_smd_begin(soap, alg, key, 0)
+     || soap_out_ns__Object(soap, "ns:Object", 0, object, NULL)
+     || soap_smd_end(soap, sig, &siglen))
+      soap_print_fault(soap, stderr);
+    else
+      ... // sig contains RSA-SHA1 signature of length siglen 
+@endcode
+
+To verify the signature, we use the RSA public key and re-run the octet stream
+(by re-serialization in this example) through the smdevp engine using the
+SOAP_SMD_VRFY_RSA_SHA1 algorithm. Note that a PEM file may contain both the
+(encrypted) private and public keys.
+
+@code
+    char *sig = ...;
+    int siglen = ...;
+    ns__Object *object = ...;
+    int alg = SOAP_SMD_VRFY_RSA_SHA1;
+    FILE *fd = fopen("key.pem", "r");
+    EVP_PKEY *key = PEM_read_PUBKEY(fd, NULL, NULL, NULL);
+    fclose(fd);
+    if (soap_smd_begin(soap, alg, key, 0)
+     || soap_out_ns__Object(soap, "ns:Object", 0, object, NULL)
+     || soap_smd_end(soap, sig, &siglen))
+      soap_print_fault(soap, stderr);
+    else
+      ... // sig verified, i.e. signed object was not changed
+@endcode
+
+The HMAC algorithm uses a secret key (which both the sender and receiver must
+keep secret) to sign and verify a message:
+
+@code
+    ns__Object *object = ...;
+    int alg = SOAP_SMD_HMAC_SHA1;
+    static char key[16] =
+    { 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88,
+      0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00 };
+    char *sig = (char*)SOAP_MALLOC(soap, soap_smd_size(alg, NULL));
+    int siglen;
+    if (soap_smd_begin(soap, alg, key, sizeof(key))
+     || soap_out_ns__Object(soap, "ns:Object", 0, object, NULL)
+     || soap_smd_end(soap, sig, &siglen))
+      soap_print_fault(soap, stderr);
+    else
+      ... // sig holds the signature
+@endcode
+
+Note: HMAC signature verification proceeds by recomputing the signature value
+for comparison.
+
+A digest is a hash value of an octet stream computed using the MD5 or SHA1
+algorithms:
+
+@code
+    ns__Object *object = ...;
+    int alg = SOAP_SMD_DGST_SHA1;
+    char *digest = (char*)SOAP_MALLOC(soap, soap_smd_size(alg, NULL));
+    int digestlen;
+    if (soap_smd_begin(soap, alg, NULL, 0)
+     || soap_out_ns__Object(soap, "ns:Object", 0, object, NULL)
+     || soap_smd_end(soap, digest, &digestlen))
+      soap_print_fault(soap, stderr);
+    else
+      ... // digest holds hash value of serialized object
+@endcode
+
+Note that indentation (SOAP_XML_INDENT) and exc-c14n canonicalization
+(SOAP_XML_CANONICAL) affects the XML serialization format and, therefore,
+the digest or signature produced.
+
+*/
+
+#include "smdevp.h"
+
+/******************************************************************************\
+ *
+ * Static local functions used
+ *
+\******************************************************************************/
+
+static int soap_smd_send(struct soap *soap, const char *buf, size_t len);
+static size_t soap_smd_recv(struct soap *soap, char *buf, size_t len);
+static int soap_smd_check(struct soap *soap, struct soap_smd_data *data, int err, const char *msg);
+
+/******************************************************************************\
+ *
+ * soap_smd API functions
+ *
+\******************************************************************************/
+
+/**
+@fn size_t soap_smd_size(int alg, const void *key)
+@brief Returns the number of octets needed to store the digest or signature returned by soap_smd_end.
+@param[in] alg is the digest or signature algorithm to be used
+@param[in] key is a pointer to an EVP_PKEY object for RSA/DSA signatures or NULL for digests and HMAC
+@return size_t number of octets that is needed to hold digest or signature
+@see soap_smd_end
+
+The values returned for digests are SOAP_SMD_MD5_SIZE and SOAP_SMD_SHA1_SIZE.
+*/
+size_t
+soap_smd_size(int alg, const void *key)
+{ switch (alg)
+  { case SOAP_SMD_DGST_MD5:
+      return SOAP_SMD_MD5_SIZE;
+    case SOAP_SMD_DGST_SHA1:
+    case SOAP_SMD_HMAC_SHA1:
+      return SOAP_SMD_SHA1_SIZE;
+    case SOAP_SMD_SIGN_DSA_SHA1:
+    case SOAP_SMD_SIGN_RSA_SHA1:
+    case SOAP_SMD_VRFY_DSA_SHA1:
+    case SOAP_SMD_VRFY_RSA_SHA1:
+      /* OpenSSL EVP_PKEY_size returns size of signatures given a key */
+      return EVP_PKEY_size((EVP_PKEY*)key);
+  }
+  return 0;
+}
+
+/**
+@fn int soap_smd_begin(struct soap *soap, int alg, const void *key, int keylen)
+@brief Initiates a digest or signature computation.
+@param soap context
+@param[in] alg is the digest or signature (sign/verification) algorithm used
+@param[in] key is a HMAC key or pointer to EVP_PKEY object or NULL for digests
+@param[in] keylen is the length of the HMAC key or 0
+@return SOAP_OK, SOAP_EOM, or SOAP_SSL_ERROR
+*/
+int
+soap_smd_begin(struct soap *soap, int alg, const void *key, int keylen)
+{ struct soap_smd_data *data;
+  data = (struct soap_smd_data*)SOAP_MALLOC(soap, sizeof(struct soap_smd_data));
+  if (!data)
+    return soap->error = SOAP_EOM;
+  /* save and set the 'user' field to pass data to the callbacks */
+  data->user = soap->user;
+  soap->user = (void*)data;
+  /* save and set the send and recv callbacks */
+  data->fsend = soap->fsend;
+  data->frecv = soap->frecv;
+  soap->fsend = soap_smd_send;
+  soap->frecv = soap_smd_recv;
+  /* save the mode flag */
+  data->mode = soap->mode;
+  /* clear the IO flags and DOM flag */
+  soap->mode &= ~(SOAP_IO | SOAP_IO_LENGTH | SOAP_XML_DOM);
+  /* clear the XML attribute store */
+  soap_clr_attr(soap);
+  /* load the local XML namespaces store */
+  soap_set_local_namespaces(soap);
+  if (soap->mode & SOAP_XML_CANONICAL)
+    soap->ns = 0; /* for in c14n, we must have all xmlns bindings available */
+  else
+    soap->ns = 2; /* we don't want leading whitespace in serialized XML */
+  /* init the soap_smd engine */
+  return soap_smd_init(soap, data, alg, key, keylen);
+}
+
+/**
+@fn int soap_smd_end(struct soap *soap, char *buf, int *len)
+@brief Completes a digest or signature computation.
+@param soap context
+@param[in] buf contains signature for verification (when using a SOAP_SMD_VRFY algorithm)
+@param[out] buf is populated with the digest or signature
+@param[in] len points to length of signature to verify (when using a SOAP_SMD_VRFY algorithm)
+@param[out] len points to length of stored digest or signature (when not NULL)
+@return SOAP_OK, SOAP_USER_ERROR, or SOAP_SSL_ERROR
+*/
+int
+soap_smd_end(struct soap *soap, char *buf, int *len)
+{ struct soap_smd_data *data;
+  int err;
+  data = (struct soap_smd_data*)soap->user;
+  if (!data)
+    return SOAP_USER_ERROR;
+  /* finalize the digest/signature computation and store data in buf + len */
+  /* for signature verification, buf + len contain the signature */
+  err = soap_smd_final(soap, data, buf, len);
+  /* restore the callbacks */
+  soap->fsend = data->fsend;
+  soap->frecv = data->frecv;
+  /* restore the mode flag */
+  soap->mode = data->mode;
+  /* restore the 'user' data */
+  soap->user = data->user;
+  /* free data */
+  SOAP_FREE(soap, data);
+  /* return SOAP_OK or error */
+  return err;
+}
+
+/**
+@fn int soap_smd_init(struct soap *soap, struct soap_smd_data *data, int alg, const void *key, int keylen)
+@brief Initiates a (signed) digest computation.
+@param soap context
+@param[in,out] data smdevp engine context
+@param[in] alg is algorithm to use
+@param[in] key is key to use or NULL for digests
+@param[in] keylen is length of HMAC key (when provided)
+@return SOAP_OK or SOAP_SSL_ERROR
+*/
+int
+soap_smd_init(struct soap *soap, struct soap_smd_data *data, int alg, const void *key, int keylen)
+{ static int done = 0;
+  int err = 1;
+#ifdef WITH_OPENSSL
+  /* OpenSSL: make sure we have the digest algorithms */
+  if (!done)
+  { done = 1;
+    OpenSSL_add_all_digests();
+    OpenSSL_add_all_algorithms();
+  }
+#endif
+  /* the algorithm to use */
+  data->alg = alg;
+  /* the key to use */
+  data->key = key;
+  /* allocate and init the OpenSSL HMAC or EVP_MD context */
+  if (alg == SOAP_SMD_HMAC_SHA1)
+  { data->ctx = (void*)SOAP_MALLOC(soap, sizeof(HMAC_CTX));
+    HMAC_CTX_init((HMAC_CTX*)data->ctx);
+  }
+  else
+  { data->ctx = (void*)SOAP_MALLOC(soap, sizeof(EVP_MD_CTX));
+    EVP_MD_CTX_init((EVP_MD_CTX*)data->ctx);
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "-- SMD Init alg=%d (%p) --\n", alg, data->ctx));
+  /* init the digest or signature computations */
+  switch (alg)
+  { case SOAP_SMD_DGST_MD5:
+      EVP_DigestInit((EVP_MD_CTX*)data->ctx, EVP_md5());
+      break;
+    case SOAP_SMD_DGST_SHA1:
+      EVP_DigestInit((EVP_MD_CTX*)data->ctx, EVP_sha1());
+      break;
+    case SOAP_SMD_HMAC_SHA1:
+      HMAC_Init((HMAC_CTX*)data->ctx, key, keylen, EVP_sha1());
+      break;
+    case SOAP_SMD_SIGN_DSA_SHA1:
+      err = EVP_SignInit((EVP_MD_CTX*)data->ctx, EVP_dss1());
+      break;
+    case SOAP_SMD_SIGN_RSA_SHA1:
+      err = EVP_SignInit((EVP_MD_CTX*)data->ctx, EVP_sha1());
+      break;
+    case SOAP_SMD_VRFY_DSA_SHA1:
+      err = EVP_VerifyInit((EVP_MD_CTX*)data->ctx, EVP_dss1());
+      break;
+    case SOAP_SMD_VRFY_RSA_SHA1:
+      err = EVP_VerifyInit((EVP_MD_CTX*)data->ctx, EVP_sha1());
+      break;
+  }
+  /* check and return */
+  return soap_smd_check(soap, data, err, "soap_smd_init() failed");
+}
+
+/**
+@fn int soap_smd_update(struct soap *soap, struct soap_smd_data *data, const char *buf, size_t len)
+@brief Updates (signed) digest computation with message part.
+@param soap context
+@param[in,out] data smdevp engine context
+@param[in] buf contains message part
+@param[in] len of message part
+@return SOAP_OK or SOAP_SSL_ERROR
+*/
+int
+soap_smd_update(struct soap *soap, struct soap_smd_data *data, const char *buf, size_t len)
+{ int err = 1;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "-- SMD Update alg=%d (%p) --\n", data->alg, data->ctx));
+  switch (data->alg)
+  { case SOAP_SMD_DGST_MD5:
+    case SOAP_SMD_DGST_SHA1:
+      EVP_DigestUpdate((EVP_MD_CTX*)data->ctx, (const void*)buf, (unsigned int)len);
+      break;
+    case SOAP_SMD_HMAC_SHA1:
+      HMAC_Update((HMAC_CTX*)data->ctx, (const unsigned char*)buf, len);
+      break;
+    case SOAP_SMD_SIGN_DSA_SHA1:
+    case SOAP_SMD_SIGN_RSA_SHA1:
+      err = EVP_SignUpdate((EVP_MD_CTX*)data->ctx, (const void*)buf, (unsigned int)len);
+      break;
+    case SOAP_SMD_VRFY_DSA_SHA1:
+    case SOAP_SMD_VRFY_RSA_SHA1:
+      err = EVP_VerifyUpdate((EVP_MD_CTX*)data->ctx, (const void*)buf, (unsigned int)len);
+      break;
+  }
+  DBGMSG(TEST, buf, len);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "\n--"));
+  /* check and return */
+  return soap_smd_check(soap, data, err, "soap_smd_update() failed");
+}
+
+/**
+@fn int soap_smd_final(struct soap *soap, struct soap_smd_data *data, char *buf, int *len)
+@brief Finalizes (signed) digest computation and returns digest or signature.
+@param soap context
+@param[in,out] data smdevp engine context
+@param[in] buf contains signature for verification (SOAP_SMD_VRFY algorithms)
+@param[out] buf is populated with the digest or signature
+@param[in] len points to length of signature to verify (SOAP_SMD_VRFY algorithms)
+@param[out] len points to length of stored digest or signature (pass NULL if you are not interested in this value)
+@return SOAP_OK or SOAP_SSL_ERROR
+*/
+int
+soap_smd_final(struct soap *soap, struct soap_smd_data *data, char *buf, int *len)
+{ int n = 0, err = 1;
+  /* finalize the digest or signature computation */
+  switch (data->alg)
+  { case SOAP_SMD_DGST_MD5:
+    case SOAP_SMD_DGST_SHA1:
+      EVP_DigestFinal((EVP_MD_CTX*)data->ctx, (unsigned char*)buf, &n);
+      break;
+    case SOAP_SMD_HMAC_SHA1:
+      HMAC_Final((HMAC_CTX*)data->ctx, (unsigned char*)buf, &n);
+      break;
+    case SOAP_SMD_SIGN_DSA_SHA1:
+    case SOAP_SMD_SIGN_RSA_SHA1:
+      err = EVP_SignFinal((EVP_MD_CTX*)data->ctx, (unsigned char*)buf, &n, (EVP_PKEY*)data->key);
+      break;
+    case SOAP_SMD_VRFY_DSA_SHA1:
+    case SOAP_SMD_VRFY_RSA_SHA1:
+      if (len)
+      { n = (unsigned int)*len;
+        err = EVP_VerifyFinal((EVP_MD_CTX*)data->ctx, (unsigned char*)buf, n, (EVP_PKEY*)data->key);
+      }
+      else
+        err = 0;
+      break;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "-- SMD Final alg=%d (%p) %d bytes--\n", data->alg, data->ctx, n));
+  DBGHEX(TEST, buf, n);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "\n--"));
+  /* cleanup and free the HMAC or EVP_MD context */
+  if (data->alg == SOAP_SMD_HMAC_SHA1)
+    HMAC_CTX_cleanup((HMAC_CTX*)data->ctx);
+  else
+    EVP_MD_CTX_cleanup((EVP_MD_CTX*)data->ctx);
+  SOAP_FREE(soap, data->ctx);
+  data->ctx = NULL;
+  /* return length of digest or signature produced */
+  if (len)
+    *len = (int)n;
+  /* check and return */
+  return soap_smd_check(soap, data, err, "soap_smd_final() failed");
+}
+
+/******************************************************************************\
+ *
+ * Static local functions
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_smd_check(struct soap *soap, struct soap_smd_data *data, int err, const char *msg)
+@brief Check result of init/update/final smdevp engine operations.
+@param soap context
+@param[in,out] data smdevp engine context
+@param[in] err OpenSSL error value
+@param[in] msg error message
+@return SOAP_OK or SOAP_SSL_ERROR
+*/
+static int
+soap_smd_check(struct soap *soap, struct soap_smd_data *data, int err, const char *msg)
+{ if (err <= 0)
+  { unsigned long r;
+    while ((r = ERR_get_error()))
+    { ERR_error_string_n(r, soap->msgbuf, sizeof(soap->msgbuf));
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "-- SMD Error (%d) %s: %s\n", err, msg, soap->msgbuf));
+    }
+    if (data->ctx)
+    { if (data->alg == SOAP_SMD_HMAC_SHA1)
+        HMAC_CTX_cleanup((HMAC_CTX*)data->ctx);
+      else
+        EVP_MD_CTX_cleanup((EVP_MD_CTX*)data->ctx);
+      SOAP_FREE(soap, data->ctx);
+      data->ctx = NULL;
+    }
+    return soap_set_receiver_error(soap, msg, soap->msgbuf, SOAP_SSL_ERROR);
+  }
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_smd_send(struct soap *soap, const char *buf, size_t len)
+@brief Callback to intercept messages for digest or signature computation.
+@param soap context
+@param[in] buf message
+@param[in] len message length
+@return SOAP_OK or SOAP_SSL_ERROR
+*/
+static int
+soap_smd_send(struct soap *soap, const char *buf, size_t len)
+{ return soap_smd_update(soap, (struct soap_smd_data*)soap->user, buf, len);
+}
+
+/**
+@fn size_t soap_smd_recv(struct soap *soap, char *buf, size_t len)
+@brief Dummy callback to avoid read operations from blocking.
+@return 0
+*/
+static size_t
+soap_smd_recv(struct soap *soap, char *buf, size_t len)
+{ return 0;
+}
+
diff --git a/plugin/smdevp.h b/plugin/smdevp.h
new file mode 100644
index 0000000..7158087
--- /dev/null
+++ b/plugin/smdevp.h
@@ -0,0 +1,121 @@
+/*
+
+smdevp.h
+
+gSOAP EVP interface for (signed) message digest
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia, Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#ifndef SMDEVP_H
+#define SMDEVP_H
+
+#include "stdsoap2.h"
+
+#ifdef WITH_OPENSSL
+#include "openssl/evp.h"
+#include "openssl/hmac.h"
+#include "openssl/x509.h"
+#endif
+
+/** Expose EVP_PKEY in a portable representation */
+#define SOAP_SMD_KEY_TYPE	EVP_PKEY
+
+/** Expose EVP_MAX_MD_SIZE in a portable representation */
+#define SOAP_SMD_MAX_SIZE	EVP_MAX_MD_SIZE
+
+/** MD5 digest size in octets */
+#define SOAP_SMD_MD5_SIZE	(16)
+
+/** SHA1 digest size in octets */
+#define SOAP_SMD_SHA1_SIZE	(20)
+
+/******************************************************************************\
+ *
+ * Supported algorithms
+ *
+\******************************************************************************/
+
+#define SOAP_SMD_NONE		(0)
+/** MD5 digest algorithm */
+#define SOAP_SMD_DGST_MD5	(1)
+/** SHA1 digest algorithm */
+#define SOAP_SMD_DGST_SHA1	(2)
+/** HMAC-SHA1 shared key signature algorithm */
+#define SOAP_SMD_HMAC_SHA1	(3)
+/** DSA-SHA1 secret key signature algorithm */
+#define SOAP_SMD_SIGN_DSA_SHA1	(4)
+/** RSA-SHA1 secret key signature algorithm */
+#define SOAP_SMD_SIGN_RSA_SHA1	(5)
+/** DSA-SHA1 secret key signature verification algorithm */
+#define SOAP_SMD_VRFY_DSA_SHA1	(6)
+/** RSA-SHA1 secret key signature verification algorithm */
+#define SOAP_SMD_VRFY_RSA_SHA1	(7)
+
+/**
+@struct soap_smd_data
+@brief The smdevp engine context data
+*/
+struct soap_smd_data
+{ int alg;		/**< The digest or signature algorithm used */
+  void *ctx;		/**< EVP_MD_CTX or HMAC_CTX */
+  const void *key;	/**< EVP_PKEY */
+  int (*fsend)(struct soap*, const char*, size_t);
+  size_t (*frecv)(struct soap*, char*, size_t);
+  soap_mode mode;
+  void *user;
+};
+
+/******************************************************************************\
+ *
+ * soap_smd API functions
+ *
+\******************************************************************************/
+
+size_t soap_smd_size(int alg, const void *key);
+
+int soap_smd_begin(struct soap *soap, int alg, const void *key, int keylen);
+int soap_smd_end(struct soap *soap, char *buf, int *len);
+
+int soap_smd_init(struct soap *soap, struct soap_smd_data *data, int alg, const void *key, int keylen);
+int soap_smd_update(struct soap *soap, struct soap_smd_data *data, const char *buf, size_t len);
+int soap_smd_final(struct soap *soap, struct soap_smd_data *data, char *buf, int *len);
+
+#endif
diff --git a/plugin/threads.c b/plugin/threads.c
new file mode 100644
index 0000000..1a981be
--- /dev/null
+++ b/plugin/threads.c
@@ -0,0 +1,105 @@
+/*
+
+threads.c
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "threads.h"
+
+/******************************************************************************\
+ *
+ *	Emulation of POSIX condition variables for WIN32
+ *
+\******************************************************************************/
+
+#ifdef WIN32
+
+int emulate_pthread_cond_init(COND_TYPE *cv)
+{
+  cv->waiters_count_ = 0;
+  cv->signal_event_ = CreateEvent(NULL, FALSE, FALSE, NULL);
+
+  return 0;
+}
+
+int emulate_pthread_cond_destroy(COND_TYPE *cv)
+{
+  CloseHandle(cv->signal_event_);
+
+  return 0;
+}
+
+int emulate_pthread_cond_signal(COND_TYPE *cv)
+{
+  int have_waiters;
+
+  EnterCriticalSection(&cv->waiters_count_lock_);
+  have_waiters = cv->waiters_count_ > 0;
+  LeaveCriticalSection(&cv->waiters_count_lock_);
+
+  if (have_waiters)
+    return SetEvent(cv->signal_event_) == 0;
+
+  return 0;
+}
+
+int emulate_pthread_cond_wait(COND_TYPE *cv, MUTEX_TYPE *cs)
+{
+  int result;
+
+  EnterCriticalSection(&cv->waiters_count_lock_);
+  cv->waiters_count_++;
+  LeaveCriticalSection(&cv->waiters_count_lock_);
+
+  LeaveCriticalSection(cs);
+
+  result = (WaitForSingleObject(cv->signal_event_, INFINITE) == WAIT_FAILED);
+
+  EnterCriticalSection(&cv->waiters_count_lock_);
+  cv->waiters_count_--;
+  LeaveCriticalSection(&cv->waiters_count_lock_);
+
+  EnterCriticalSection(cs, INFINITE);
+
+  return result;
+}
+
+#endif 
diff --git a/plugin/threads.h b/plugin/threads.h
new file mode 100644
index 0000000..e9839f6
--- /dev/null
+++ b/plugin/threads.h
@@ -0,0 +1,105 @@
+/*
+
+threads.h
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#ifndef THREADS_H
+#define THREADS_H
+
+#include <unistd.h>	/* defines _POSIX_THREADS if pthreads are available */
+#ifdef _POSIX_THREADS
+# include <pthread.h>
+#endif
+
+/******************************************************************************\
+ *
+ *	Threads
+ *
+\******************************************************************************/
+
+#if defined(WIN32)
+# define THREAD_TYPE		HANDLE
+# define THREAD_ID		GetCurrentThreadId()
+# define THREAD_CREATE(x,y,z)	*(x) = _beginthread((y), NULL, 8*4096, (z))
+# define THREAD_DETACH(x)	
+# define THREAD_JOIN(x)		WaitForSingleObject((x), INFINITE)
+# define THREAD_EXIT		_endthread()
+# define MUTEX_TYPE		HANDLE
+# define MUTEX_SETUP(x)		(x) = CreateMutex(NULL, FALSE, NULL)
+# define MUTEX_CLEANUP(x)	CloseHandle(x)
+# define MUTEX_LOCK(x)		WaitForSingleObject((x), INFINITE)
+# define MUTEX_UNLOCK(x)	ReleaseMutex(x)
+# define COND_SETUP(x)		emulate_pthread_cond_init(&(x))
+# define COND_CLEANUP(x)	emulate_pthread_cond_destroy(&(x))
+# define COND_SIGNAL(x)		emulate_pthread_signal(&(x))
+# define COND_WAIT(x,y)		emulate_pthread_wait(&(x), &(y))
+typedef struct
+{ u_int waiters_count_;
+  CRITICAL_SECTION waiters_count_lock_;
+  HANDLE signal_event_;
+} COND_TYPE;
+int emulate_pthread_cond_init(COND_TYPE*);
+int emulate_pthread_cond_destroy(COND_TYPE*);
+int emulate_pthread_signal(COND_TYPE*);
+int emulate_pthread_wait(COND_TYPE*, MUTEX_TYPE*);
+#elif defined(_POSIX_THREADS)
+# define THREAD_TYPE		pthread_t
+# define THREAD_ID		pthread_self()
+# define THREAD_CREATE(x,y,z)	pthread_create((x), NULL, (y), (z))
+# define THREAD_DETACH(x)	pthread_detach((x))
+# define THREAD_JOIN(x)		pthread_join((x), NULL)
+# define THREAD_EXIT		pthread_exit(NULL)
+# define MUTEX_TYPE		pthread_mutex_t
+# define MUTEX_SETUP(x)		pthread_mutex_init(&(x), NULL)
+# define MUTEX_CLEANUP(x)	pthread_mutex_destroy(&(x))
+# define MUTEX_LOCK(x)		pthread_mutex_lock(&(x))
+# define MUTEX_UNLOCK(x)	pthread_mutex_unlock(&(x))
+# define COND_TYPE		pthread_cond_t
+# define COND_SETUP(x)		pthread_cond_init(&(x), NULL)
+# define COND_CLEANUP(x)	pthread_cond_destroy(&(x))
+# define COND_SIGNAL(x)		pthread_cond_signal(&(x))
+# define COND_WAIT(x,y)		pthread_cond_wait(&(x), &(y))
+#else
+# error "No POSIX threads detected: we need thread and mutex operations. See for example OpenSSL /threads/th-lock.c on how to implement mutex on your platform"
+#endif
+
+#endif
diff --git a/plugin/wsse2api.c b/plugin/wsse2api.c
new file mode 100644
index 0000000..4128ba1
--- /dev/null
+++ b/plugin/wsse2api.c
@@ -0,0 +1,2667 @@
+/*
+
+wsseapi.c
+
+WS-Security plugin
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+/**
+
+@mainpage
+
+- @ref wsse documents the wsse plugin for WS-Security 1.0 support.
+- @ref smdevp documents the smdevp engine used by the wsse plugin.
+
+*/
+
+/**
+
+@page wsse The wsse plugin
+
+@section wsse_5 Security Header
+
+The material in this section relates to the WS-Security specification section 5.
+
+To use the wsse plugin:
+-# Run wsdl2h -t typemap.dat on a WSDL of a service that requires WS-Security
+   headers. The typemap.dat file is used to recognize and translate Security
+   header blocks.
+-# Run soapcpp2 on the header file produced by wsdl2h.
+-# (Re-)compile stdsoap2.c/pp, dom.c/pp, smdevp.c, wsseapi.c and the generated
+   source files with the -DWITH_DOM and -DWITH_OPENSSL compile flags set. The
+   smdevp.c and wssapi.c files are located in the 'plugin' directory.
+-# Use the wsse plugin API functions described below to add and verify
+   Security headers.
+
+An example wsse client/server application can be found in samples/wsse.
+
+The Security header block was generated from the WS-Security schema with the
+wsdl2h tool and WS/WS-typemap.dat:
+
+@code
+    $ wsdl2h -cegxy -o wsse.h -t WS/WS-typemap.dat WS/wsse.xsd
+@endcode
+
+The same process was used to generate the header file ds.h from the XML digital
+signatures core schema.
+
+The import/wsse.h file has the following definition for the Security header
+block:
+
+@code
+typedef struct _wsse2__Security
+{       struct _wsu__Timestamp*                 wsu__Timestamp;
+        struct _wsse2__UsernameToken*            UsernameToken;
+        struct _wsse2__BinarySecurityToken*      BinarySecurityToken;
+        struct ds__SignatureType*               ds__Signature;
+        @char*                                  SOAP_ENV__actor;
+        @char*                                  SOAP_ENV__role;
+} _wsse2__Security;
+@endcode
+
+To add an empty Security header block to the SOAP header, use:
+
+@code
+    soap_wsse_add_Security(soap);
+@endcode
+
+To delete a Security header, use:
+
+@code
+    soap_wsse_delete_Security(soap);
+@endcode
+
+Adding an empty Security header block is not very useful. We will mainly make
+use of the higher-level functions of the wsse plugin to populate and verify
+Security header content.
+
+Note: The soap context includes an actor value soap.actor that is populated and
+rendered as the SOAP-ENV:actor (SOAP 1.1) or SOAP-ENV:role (SOAP 1.2) attribute
+in XML within the generic SOAP Header. The attribute is optional, but should be
+used to target a recipient such as an intermediate node to process the SOAP
+header.  In contrast, actor or role attributes within Security header blocks
+target specific recipients to process the Security header block. The gSOAP
+implementation does not automate this feature and application should set and
+check the actor/role attribute when necessary. In addition, the current
+implementation supports the inclusion of a single Security header block in the
+SOAP header.
+
+To populate the SOAP-ENV:actor or SOAP-ENV:role attribute within the Security
+header, use:
+
+@code
+    soap_wsse_add_Security_actor(soap, "recipient");
+@endcode
+
+To obtain the actor or role value (e.g. after receiving a message), use:
+
+@code
+    _wsse2__Security *security = soap_wsse_Security(soap);
+    if (security)
+    { ... = security->SOAP_ENV__actor; // SOAP 1.1
+      ... = security->SOAP_ENV__role;  // SOAP 1.2
+@endcode
+
+The SOAP-ENV:mustUnderstand attribute is automatically added and checked by the
+gSOAP engine. A gSOAP application compiled without Security support will reject
+Security headers.
+
+Security header blocks are attached to the soap context, which means that the
+information will be automatically kept to support multiple invocations.
+
+@section wsse_6 Security Tokens
+
+The material in this section relates to the WS-Security specification section 6.
+
+@subsection wsse_6_2 User Name Token
+
+To add a user name token to the Security header block, use:
+
+@code
+    soap_wsse_add_UsernameTokenText(soap, "Id", "username", NULL);
+@endcode
+
+The Id value is optional. When non-NULL the user name token is included in the
+digital signature to protect its integrity. It is common for the wsse plugin
+functions to accept such Ids, which are serialized as wsu:Id identifiers for
+cross-referencing XML elements. The signature engine of the wsse plugin is
+designed to automatically sign all wsu:Id attributed elements to simplify the
+code you need to write to implement the signing process.
+
+To add a user name token with clear text password, use:
+
+@code
+    soap_wsse_add_UsernameTokenText(soap, "Id", "username", "password");
+@endcode
+
+It is strongly recommended to use @ref soap_wsse_add_UsernameTokenText only in
+combination with HTTPS encrypted transmission or not at all. A better
+alternative is to use password digests. With password digest authentication,
+the digest value of a password (with message creation time and a random nonce)
+is compared on both sides, thus eliminating the need to exchange a password
+over the wire.
+
+To add a user name token with password digest, use:
+
+@code
+    soap_wsse_add_UsernameTokenDigest(soap, "Id", "username", "password");
+@endcode
+
+Although the password string is passed to this function, it is not rendered in
+XML or stored in a message log. It has been argued that this approach adopted
+by the WS-Security protocol is still vulnerable since the application retrieves
+the password in text form requiring a database to store passwords in clear
+text. However, a digest algorithm can be used to hash the passwords and store
+their digests instead, which eliminates the need to store clear-text passwords.
+Note that this is a common approach adopted by Unix for decades.
+
+By setting the Id value to a unique string, the user name token is also
+digitally signed by the signature engine further preventing tampering with its
+value.
+
+You must use @ref soap_wsse_add_UsernameTokenDigest for each message exchange
+to refresh the password digest even when the user name and password are not
+changed. Otherwise, the receiver might flag the message as a replay attack.
+
+Clear-text passwords and password digests are verified with
+@ref soap_wsse_verify_Password. To verify a password at the receiving side to
+authorize a request (e.g. within a Web service operation), use:
+
+@code
+    int ns__myMethod(struct soap *soap, ...)
+    { const char *username = soap_wsse_get_Username(soap);
+      const char *password;
+      if (!username)
+        return soap->error; // no username: return FailedAuthentication
+      password = ...; // lookup password of username
+      if (soap_wsse_verify_Password(soap, password))
+        return soap->error; // password verification failed: return FailedAuthentication
+      ... // process request
+      return SOAP_OK;
+    }
+@endcode
+
+Note that the @ref soap_wsse_get_Username functions sets the
+wsse:FailedAuthentication fault. It is common for the wsse plugin functions to
+return SOAP_OK or a wsse fault that should be passed to the sender by returning
+soap->error from service operations. The fault is displayed with the @ref
+soap_print_fault function.
+
+Password digest authentication prevents message replay attacks. The wsse plugin
+keeps a database of password digests to thwart replay attacks. This is the
+only part in the plugin code that requires mutex provided by threads.h.  Of
+course, this only works correctly if the server is persistent, such as a
+stand-alone service. Note that CGI-based services do not keep state. Machine
+clocks must be synchronized and clock skew should not exceed @ref
+SOAP_WSSE_CLKSKEW at the server side.
+
+@subsection wsse_6_3 Binary Security Tokens
+
+X509 certificates are commonly included in Security header blocks as binary
+security tokens. A certificate is used to verify the digital signature of a
+digitally signed message using the public key embedded within the certificate.
+The certificate itself is signed by a certificate authority (CA) that vouches
+for the authenticity of the certificate, i.e. to prove the identify of the
+message originator. This verification process is important, because digital
+signatures are useless without verification: an attacker could simply replace
+the message, sign it, and replace the certificate.
+
+Certificates are automatically verified by the wsse plugin signature engine
+when received and accessed, which means that the certificates of the CAs must
+be made accessible to the wsse plugin as follows:
+
+@code
+    soap->cafile = "cacerts.pem";  // use this
+    soap->capath = "dir/to/certs"; // and/or point to CA certs
+    soap->crlfile = "revoked.pem"; // use CRL (optional)
+@endcode
+
+The @ref soap_wsse_verify_X509 function checks the validity of a certificate.
+The check is automatically performed. The check is also performed when
+retrieving the certificate from a Security header block, either automatically
+by the wsse plugin's signature verification engine or manually as follows:
+
+@code
+    X509 *cert = soap_wsse_get_BinarySecurityTokenX509(soap, "Id");
+@endcode
+
+where Id is the identification string of the binary security token or NULL.
+
+The verification is an expensive process that will be optimized in future
+releases by caching the certificate chain.
+
+To attach a binary security token stored in a PEM file to a Security header
+block for transmission, use:
+
+@code
+    soap_wsse_add_BinarySecurityTokenPEM(soap, NULL, "mycert.pem")
+@endcode
+
+A binary security token can be automatically signed by setting its Id
+attribute:
+
+@code
+    soap_wsse_add_BinarySecurityTokenPEM(soap, "X509Token", "mycert.pem")
+@endcode
+
+Repeatedly loading a certificate from a PEM file is inefficient. To reuse a
+certificate loaded from a PEM file for multiple invocations, use:
+
+@code
+    FILE *fd = fopen("mycert.pem", "r");
+    X509 *cert = PEM_read_X509(fd, NULL, NULL, NULL);
+    fclose(fd);
+    if (soap_wsse_add_BinarySecurityTokenX509(soap, "X509Token", cert))
+      ... // an error occurred
+@endcode
+
+Other types of binary security tokens can be added to the Security header block using:
+
+@code
+    soap_wsse_add_BinarySecurityToken(soap, "Id", "valueType", data, datalen);
+@endcode
+
+@section wsse_6_4 XML Tokens
+
+The use and processing rules for XML tokens such as SAML assertions is specific
+to an application.  The wsse plugin does not automate the use of XML tokens.
+The developer is encouraged to generate code for the SAML schema with wsdl2h
+and add the necessary assertions to the Security header block:
+
+@code
+typedef struct _wsse2__Security
+{       struct _wsu__Timestamp*                 wsu__Timestamp;
+        struct _wsse2__UsernameToken*            UsernameToken;
+        struct _wsse2__BinarySecurityToken*      BinarySecurityToken;
+	struct _saml__Assertion*		saml__Assertion; // added
+        struct ds__SignatureType*               ds__Signature;
+        @char*                                  SOAP_ENV__actor;
+        @char*                                  SOAP_ENV__role;
+} _wsse2__Security;
+@endcode
+
+Alternatively, a DOM can be used to store and retrieve XML tokens:
+
+@code
+#import "dom.h"
+typedef struct _wsse2__Security
+{       struct _wsu__Timestamp*                 wsu__Timestamp;
+        struct _wsse2__UsernameToken*            UsernameToken;
+        struct _wsse2__BinarySecurityToken*      BinarySecurityToken;
+        struct ds__SignatureType*               ds__Signature;
+	int					__size;
+	xsd__anyType*				any;
+        @char*                                  SOAP_ENV__actor;
+        @char*                                  SOAP_ENV__role;
+} _wsse2__Security;
+@endcode
+
+@section wsse_7 Token References
+
+The material in this section relates to the WS-Security specification section 7.
+
+To use a certificate for signature verification, add a direct security token
+reference URI for the token to the KeyInfo, for example:
+
+@code
+    soap_wsse_add_KeyInfo_SecurityTokenReferenceURI(soap, "URI", "valueType");
+@endcode
+
+and:
+
+@code
+    soap_wsse_add_KeyInfo_SecurityTokenReferenceX509(soap, "URI");
+@endcode
+
+For X509 certificates we use this to add a binary security token with the
+certificate and a reference to the local token:
+
+@code
+    if (soap_wsse_add_BinarySecurityTokenX509(soap, "X509Token", cert)
+     || soap_wsse_add_KeyInfo_SecurityTokenReferenceX509(soap, "#X509Token"))
+      ... // an error occurred
+@endcode
+
+This follows the recommended practice to place Security token references in
+the KeyInfo element of a Signature. The KeyInfo is used to verify the validity
+of a signature value.
+
+Key identifiers can be used as well:
+
+@code
+    soap_wsse_add_KeyInfo_SecurityTokenReferenceKeyIdentifier(soap, "Id", "valueType", data, datalen);
+@endcode
+
+Embedded references are added with:
+
+@code
+    soap_wsse_add_KeyInfo_SecurityTokenReferenceEmbedded(soap, "Id", "valueType");
+@endcode
+
+TODO item: full support for embedded reference is currently under construction.
+
+The use of key names is not recommended, but in case they are required they can
+be added with:
+
+@code
+    soap_wsse_add_KeyInfo_KeyName(soap, "name");
+@endcode
+
+@section wsse_8 Signatures
+
+The material in this section relates to the WS-Security specification section 8.
+
+The wsse plugin must be registered to sign and verify messages:
+
+@code
+    soap_register_plugin(soap, soap_wsse);
+@endcode
+
+XML signatures are usually computed over normalized XML (to ensure the XML
+processors of intermediate nodes can accurately reproduce the XML). To this
+end, the exclusive canonical XML standard (exc-c14n) is required, which is set
+using the SOAP_XML_CANONICAL flag:
+
+@code
+    struct soap *soap = soap_new1(SOAP_XML_CANONICAL);
+    soap_register_plugin(soap, soap_wsse);
+@endcode
+
+If you prefer XML indentation, use:
+
+@code
+    struct soap *soap = soap_new1(SOAP_XML_CANONICAL | SOAP_XML_INDENT);
+    soap_register_plugin(soap, soap_wsse);
+@endcode
+
+Next, we decide which signature algorithm is appropriate to use:
+- HMAC-SHA1 uses a secret key (also known as a shared key in symmetric
+  cryptography) to sign the SHA1 digest of the SignedInfo element.
+- DSA-SHA1 uses a DSA private key to sign the SHA1 digest of the SignedInfo
+  element.
+- RSA-SHA1 uses a RSA private key to sign the SHA1 digest of the SignedInfo
+  element.
+
+HMAC-SHA1 is the simplest method, but relies on the fact that you have to make
+absolutely sure the key is kept secret on both the sending and receiving side.
+As long as the secret key is confidential, messages are securely signed.
+However, this is virtually impossible when exchanging messages with untrusted
+disparate parties. The advantage of HMAC-SHA1 is the speed by which messages
+are signed and verified.
+
+DSA-SHA1 and RSA-SHA1 rely on public key cryptography. In simplified terms, a
+message is signed using the (confidential!) private key. The public key is used
+to verify the signature. Since only the originating party could have used its
+private key to sign the message, the integrity of the message is guaranteed. Of
+course, we must trust the public key came from the originator (it is often
+included as an X509 certificate in the message). To this end, a trusted
+certificate authority should have signed the public key, thereby creating a
+X509 certificate that contains the public key and the identity of the message
+originator.
+
+@subsection wsse_8_2a Signing Messages
+
+After the plugin is registered and a signature algorithm selected, the
+@ref soap_wsse_sign function or the @ref soap_wsse_sign_body function is used
+to initiate the signature engine to automatically sign outbound messages.
+
+The code to sign the SOAP Body of a message using HMAC-SHA1 is:
+
+@code
+    static char hmac_key[16] =
+    { 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88,
+      0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00 };
+    struct soap *soap = soap_new1(SOAP_XML_CANONICAL | SOAP_XML_INDENT);
+    soap_register_plugin(soap, soap_wsse);
+    if (soap_wsse_sign_body(soap, SOAP_SMD_HMAC_SHA1, hmac_key, sizeof(hmac_key))
+      ... // an error occurred
+    else if (soap_call_ns__myMethod(soap, ...))
+      ... // a transmission error occurred
+@endcode
+
+The hmac_key is some secret key you generated for the sending side and
+receiving side (don't use the one shown here).
+
+As always, use @ref soap_print_fault to display the error message.
+
+To sign the body of an outbound SOAP message using RSA-SHA1 (DSA-SHA1 is
+similar), we include the X509 certificate with the public key as a
+BinarySecurityToken in the header and a KeyInfo reference to the token to let
+receivers use the public key in the certificate to verify the authenticity of
+the message:
+
+@code
+    FILE *fd;
+    EVP_PKEY *rsa_private_key;
+    X509 *cert;
+    struct soap *soap = soap_new1(SOAP_XML_CANONICAL | SOAP_XML_INDENT);
+    soap_register_plugin(soap, soap_wsse);
+    fd = fopen("privkey.pem", "r");
+    rsa_private_key = PEM_read_PrivateKey(fd, NULL, NULL, "password");
+    fclose(fd);
+    fd = fopen("cert.pem", "r");
+    X509 *cert = PEM_read_X509(fd, NULL, NULL, NULL);
+    fclose(fd);
+    if (soap_wsse_add_BinarySecurityTokenX509(soap, "X509Token", cert)
+     || soap_wsse_add_KeyInfo_SecurityTokenReferenceX509(soap, "#X509Token")
+     || soap_wsse_sign_body(soap, SOAP_SMD_SIGN_RSA_SHA1, rsa_private_key, 0))
+      ... // an error occurred
+    else if (soap_call_ns__myMethod(soap, ...))
+      ... // a transmission error occurred
+@endcode
+
+The private key and its certificate are often placed in the same file, see e.g.
+server.pem in the package.
+
+To summarize the signing process:
+-# Register the wsse plugin.
+-# Obtain an HMAC secret key or a DSA or RSA private key.
+-# For DSA or RSA, obtain the X509 certificate with the public key signed by a
+   certificate authority.
+-# Add the X509 certificate as a BinarySecurityToken to the header.
+-# Add a KeyInfo BinarySecurityTokenReference.
+-# Invoke @ref soap_wsse_sign or @ref soap_wsse_sign_body to sign the message.
+-# Always check the function return values for errors. You don't want to
+   produce and accept messages with an invalid Security headers.
+
+@subsection wsse_8_2b Signing Message Parts
+
+The @ref soap_wsse_sign_body function signs the entire SOAP body. If it is
+desirable to sign individual parts of a message the @ref soap_wsse_sign
+function should be used. Message parts with wsu:Id attributes are signed. These
+message parts should not be nested (nested elements will not be separately
+signed).
+
+For example, consider a transaction in which we only want to sign a contract in
+the SOAP Body. This allows us to modify the rest of the message or extract the
+contract in XML and pass it on with the signature.
+
+The gSOAP header file includes a myContract declaration:
+
+@code
+    struct ns__myContract
+    { @char* wsu_Id = "Contract";
+      char* name;
+      char* title;
+      char* terms;
+    };
+    int ns__myMethod(struct ns__myContract agreement, bool* accepted);
+@endcode
+
+The default value of the wsu:Id is "Contract" so that we can instantiate the
+struct, automatically sign it, and send it as follows:
+
+@code
+    struct ns__myContract contract;
+    bool accept;
+    soap_default_ns__myContract(soap, &contract);
+    contract.name = ...;
+    contract.title = ...;
+    contract.terms = ...;
+    if (soap_wsse_add_BinarySecurityTokenX509(soap, "X509Token", cert)
+     || soap_wsse_add_KeyInfo_SecurityTokenReferenceX509(soap, "#X509Token")
+     || soap_wsse_sign(soap, SOAP_SMD_SIGN_RSA_SHA1, rsa_private_key, 0))
+      ... // an error occurred
+    else if (soap_call_ns__myMethod(soap, contract, &accept))
+      ... // a transmission error occurred
+@endcode
+
+@subsection wsse_8_3 Signing Tokens
+
+To sign security tokens such as user names, passwords, and binary security
+tokens, just assign their Id values with a unique string, such as "Time" for
+timestamps and "User" for user names. For example:
+
+@code
+    soap_wsse_add_Timestamp(soap, "Time", 600);
+    soap_wsse_add_UsernameTokenDigest(soap, "User", "username", "password");
+    ... // the rest of the signing code
+@endcode
+
+@subsection wsse_8_4 Signature Validation
+
+To automatically verify the signature of an inbound message signed with DSA or
+RSA algorithms, assuming the message contains the X509 certificate as a binary
+security token, use:
+
+@code
+    struct soap *soap = soap_new1(SOAP_XML_CANONICAL | SOAP_XML_INDENT);
+    soap_register_plugin(soap, soap_wsse);
+    soap_wsse_verify_auto(soap, SOAP_SMD_NONE, NULL, 0);
+
+    // server:
+    if (soap_serve(soap))
+      ... // an error occurred
+
+    // client:
+    if (soap_call_ns__myMethod(soap, ...))
+      ... // an error occurred
+@endcode
+
+All locally referenced elements in the signed message will be verified.
+Elements referenced with absolute URIs are not automatically verified. The
+received message is stored in a DOM accessible with soap->dom. This enables
+further analysis of the message content.
+
+The @ref soap_wsse_verify_auto function keeps processing signed (and unsigned)
+messages as they arrive. For unsigned messages this can be expensive and the
+verification engine should be shut down using @ref soap_wsse_verify_done.
+
+To verify the HMAC signature of an inbound message, the HMAC key must be
+supplied:
+
+@code
+    static char hmac_key[16] = // the same secret key that was used to sign
+    { 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88,
+      0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00 };
+    struct soap *soap = soap_new1(SOAP_XML_CANONICAL | SOAP_XML_INDENT);
+    soap_register_plugin(soap, soap_wsse);
+    soap_wsse_verify_auto(soap, SOAP_SMD_HMAC_SHA1, hmac_key, sizeof(hmac_key));
+
+    // server:
+    if (soap_serve(soap))
+      ... // an error occurred
+
+    // client:
+    if (soap_call_ns__myMethod(soap, ...))
+      ... // an error occurred
+@endcode
+
+To summarize the signature verification process:
+-# Register the wsse plugin.
+-# For HMAC, obtain the HMAC secret key
+-# Use @ref soap_wsse_verify_auto to verify inbound messages.
+-# After receiving a message, the DOM in soap->dom can be traversed for further    analysis.
+-# Always check the function return values for errors. You don't want to accept
+   a request or response message with an invalid Security header.
+-# Use @ref soap_wsse_verify_done to terminate verification, e.g. to consume
+   plain messages more efficiently.
+
+@section wsse_9 Encryption
+
+The material in this section relates to the WS-Security specification section 9.
+
+TODO item: encryption support is under construction.
+
+@section wsse_10 Security Timestamps
+
+The material in this section relates to the WS-Security specification section
+10.
+
+To add a timestamp with the creation time to the Security header, use:
+
+@code
+    soap_wsse_add_Timestamp(soap, NULL, 0); // no expiration
+@endcode
+
+The lifetime of a message (in seconds) is passed as the third argument, which
+will be displayed as the timestamp expiration time:
+
+@code
+    soap_wsse_add_Timestamp(soap, NULL, 10); // 10 seconds lifetime
+@endcode
+
+Timestamps, like other header elements, are not automatically secured with a
+digital signature. To secure a timestamp, we add an identifier (wsu:Id) to each
+element we want the WS-Security plugin to sign thereby making it impossible for
+someone to tamper with that part of the message. To do this for the timestamp,
+we simply pass a unique identification string as the second argument:
+
+@code
+    soap_wsse_add_Timestamp(soap, "Time", 10); // timestamp will be signed
+@endcode
+
+
+*/
+
+#include "wsseapi.h"
+#include "smdevp.h"
+#include "threads.h"	/* only need threads to enable mutex for MT */
+
+/** Plugin identification for plugin registry */
+const char soap_wsse_id[14] = SOAP_WSSE_ID;
+
+/** Maximum number of SignedInfo References */
+#define SOAP_WSSE_MAX_REF	(100)
+
+/** Clock skew between machines (in sec) to fit message expiration in window */
+#define SOAP_WSSE_CLKSKEW	(600)
+
+/** Size of the random nonce */
+#define SOAP_WSSE_NONCELEN	(20)
+/** Digest authentication accepts messages that are not older than creation time + SOAP_WSSE_NONCETIME */
+#define SOAP_WSSE_NONCETIME	(SOAP_WSSE_CLKSKEW + 240)
+
+/******************************************************************************\
+ *
+ * Common URIs
+ *
+\******************************************************************************/
+
+const char *wsse_PasswordTextURI = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText";
+const char *wsse_PasswordDigestURI = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest";
+const char *wsse_Base64BinaryURI = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary";
+const char *wsse_X509v3URI = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3";
+const char *wsse_X509v3SubjectKeyIdentifierURI = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier";
+
+const char *ds_sha1URI = "http://www.w3.org/2000/09/xmldsig#sha1";
+const char *ds_hmac_sha1URI = "http://www.w3.org/2000/09/xmldsig#hmac-sha1";
+const char *ds_dsa_sha1URI = "http://www.w3.org/2000/09/xmldsig#dsa-sha1";
+const char *ds_rsa_sha1URI = "http://www.w3.org/2000/09/xmldsig#rsa-sha1";
+
+const char *ds_URI = "http://www.w3.org/2000/09/xmldsig#";
+const char *c14n_URI = "http://www.w3.org/2001/10/xml-exc-c14n#";
+const char *wsu_URI = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
+
+/******************************************************************************\
+ *
+ * Digest authentication session
+ *
+\******************************************************************************/
+
+/**
+@struct soap_wsse_session
+@brief Digest authentication session data
+*/
+struct soap_wsse_session
+{ struct soap_wsse_session *next;	/**< Next session in list */
+  time_t expired;			/**< Session expiration */
+  char hash[SOAP_SMD_SHA1_SIZE];	/**< SHA1 digest */
+  char nonce[1]; /**< Nonce string flows into region below this struct */
+};
+
+/** The digest authentication session database */
+static struct soap_wsse_session *soap_wsse_session = NULL;
+
+/** Lock for digest authentication session database exclusive access */
+static MUTEX_TYPE soap_wsse_session_lock;
+
+static int soap_wsse_session_verify(struct soap *soap, const char hash[SOAP_SMD_SHA1_SIZE], const char *created, const char *nonce);
+static void soap_wsse_session_cleanup(struct soap *soap);
+static void calc_digest(struct soap *soap, const char *created, const char *nonce, int noncelen, const char *password, char hash[SOAP_SMD_SHA1_SIZE]);
+static void calc_nonce(struct soap *soap, char nonce[SOAP_WSSE_NONCELEN]);
+
+static int soap_wsse_init(struct soap *soap, struct soap_wsse_data *data);
+static int soap_wsse_copy(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src);
+static void soap_wsse_delete(struct soap *soap, struct soap_plugin *p);
+
+static int soap_wsse_prepareinit(struct soap *soap);
+static int soap_wsse_preparesend(struct soap *soap, const char *buf, size_t len);
+static int soap_wsse_preparefinal(struct soap *soap);
+static void soap_wsse_preparecleanup(struct soap *soap, struct soap_wsse_data *data);
+static int soap_wsse_disconnect(struct soap *soap);
+
+/******************************************************************************\
+ *
+ * wsse:Security header element
+ *
+\******************************************************************************/
+
+/**
+@fn _wsse2__Security* soap_wsse_add_Security(struct soap *soap)
+@brief Adds Security header element.
+@param soap context
+@return _wsse2__Security object
+*/
+struct _wsse2__Security*
+soap_wsse_add_Security(struct soap *soap)
+{ DBGFUN("soap_wsse_add_Security");
+  /* if we don't have a SOAP Header, create one */
+  if (!soap->header)
+  { soap->header = (struct SOAP_ENV__Header*)soap_malloc(soap, sizeof(struct SOAP_ENV__Header));
+    soap_default_SOAP_ENV__Header(soap, soap->header); 
+  }
+  /* if we don't have a wsse:Security element in the SOAP Header, create one */
+  if (!soap->header->wsse2__Security)
+  { soap->header->wsse2__Security = (_wsse2__Security*)soap_malloc(soap, sizeof(_wsse2__Security));
+    soap_default__wsse2__Security(soap, soap->header->wsse2__Security);
+  }
+  return soap->header->wsse2__Security;
+}
+
+/**
+@fn _wsse2__Security* soap_wsse_add_Security_actor(struct soap *soap, const char *actor)
+@brief Adds Security header element with actor or role attribute.
+@param soap context
+@param actor string
+@return _wsse2__Security object
+*/
+struct _wsse2__Security*
+soap_wsse_add_Security_actor(struct soap *soap, const char *actor)
+{ _wsse2__Security *security = soap_wsse_add_Security(soap);
+  DBGFUN1("soap_wsse_add_Security_actor", "actor=%s", actor);
+  if (soap->namespaces && !strcmp(soap->namespaces[0].ns, "http://schemas.xmlsoap.org/soap/envelope/"))
+    security->SOAP_ENV__actor = soap_strdup(soap, actor);
+  else
+    security->SOAP_ENV__role = soap_strdup(soap, actor);
+  return security;
+}
+
+/**
+@fn void soap_wsse_delete_Security(struct soap *soap)
+@brief Deletes Security header element.
+@param soap context
+*/
+void
+soap_wsse_delete_Security(struct soap *soap)
+{ DBGFUN("soap_wsse_delete_Security");
+  if (soap->header)
+    soap->header->wsse2__Security = NULL;
+}
+
+/**
+@fn _wsse2__Security* soap_wsse_Security(struct soap *soap)
+@brief Returns Security header element if present.
+@param soap context
+@return _wsse2__Security object or NULL
+*/
+struct _wsse2__Security*
+soap_wsse_Security(struct soap *soap)
+{ if (soap->header)
+    return soap->header->wsse2__Security;
+  return NULL;
+}
+
+/******************************************************************************\
+ *
+ * wsse:Security/ds:Signature header element
+ *
+\******************************************************************************/
+
+/**
+@fn ds__SignatureType* soap_wsse_add_Signature(struct soap *soap)
+@brief Adds Signature header element.
+@param soap context
+@return ds__SignatureType object
+*/
+struct ds__SignatureType*
+soap_wsse_add_Signature(struct soap *soap)
+{ _wsse2__Security *security = soap_wsse_add_Security(soap);
+  DBGFUN("soap_wsse_add_Signature");
+  /* if we don't have a ds:Signature, create one */
+  if (!security->ds__Signature)
+  { security->ds__Signature = (ds__SignatureType*)soap_malloc(soap, sizeof(ds__SignatureType));
+    soap_default_ds__SignatureType(soap, security->ds__Signature); 
+  }
+  return security->ds__Signature;
+}
+
+/**
+@fn void soap_wsse_delete_Signature(struct soap *soap)
+@brief Deletes Signature header element.
+@param soap context
+*/
+void
+soap_wsse_delete_Signature(struct soap *soap)
+{ _wsse2__Security *security = soap_wsse_Security(soap);
+  DBGFUN("soap_wsse_delete_Signature");
+  if (security)
+    security->ds__Signature = NULL;
+}
+
+/**
+@fn ds__SignatureType* soap_wsse_Signature(struct soap *soap)
+@brief Returns Signature header element if present.
+@param soap context
+@return ds__SignatureType object or NULL
+*/
+struct ds__SignatureType*
+soap_wsse_Signature(struct soap *soap)
+{ _wsse2__Security *security = soap_wsse_Security(soap);
+  if (security)
+    return security->ds__Signature;
+  return NULL;
+}
+
+/******************************************************************************\
+ *
+ * wsse:Security/wsu:Timestamp header element
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_wsse_add_Timestamp(struct soap *soap, const char *id, time_t lifetime)
+@brief Adds Timestamp element with optional expiration date+time (lifetime).
+@param[in] soap context
+@param[in] id for signature referencing or NULL
+@param[in] lifetime expressed in time_t units, or 0 for no expiration
+@return SOAP_OK
+*/
+int
+soap_wsse_add_Timestamp(struct soap *soap, const char *id, time_t lifetime)
+{ _wsse2__Security *security = soap_wsse_add_Security(soap);
+  time_t now = time(NULL);
+  char *created = soap_strdup(soap, soap_dateTime2s(soap, now));
+  char *expired = lifetime ? soap_strdup(soap, soap_dateTime2s(soap, now + lifetime)) : NULL;
+  DBGFUN1("soap_wsse_add_Timestamp", "id=%s", id?id:"");
+  /* allocate a Timestamp if we don't have one already */
+  if (!security->wsu__Timestamp)
+    security->wsu__Timestamp = (_wsu__Timestamp*)soap_malloc(soap, sizeof(_wsu__Timestamp));
+  soap_default__wsu__Timestamp(soap, security->wsu__Timestamp);
+  /* populate the wsu:Timestamp element */
+  security->wsu__Timestamp->wsu__Id = soap_strdup(soap, id);
+  security->wsu__Timestamp->Created = created;
+  security->wsu__Timestamp->Expires = expired;
+  return SOAP_OK;
+}
+
+/**
+@fn _wsu__Timestamp *soap_wsse_Timestamp(struct soap *soap)
+@brief Returns Timestamp element if present.
+@param soap context
+@return _wsu__Timestamp object or NULL
+*/
+struct _wsu__Timestamp*
+soap_wsse_Timestamp(struct soap *soap)
+{ _wsse2__Security *security = soap_wsse_Security(soap);
+  if (security)
+    return security->wsu__Timestamp;
+  return NULL;
+}
+
+/**
+@fn int soap_wsse_verify_Timestamp(struct soap *soap)
+@brief Verifies the Timestamp/Expires element against the current time.
+@param soap context
+@return SOAP_OK or SOAP_FAULT with wsse:FailedAuthentication fault
+
+Sets wsse:FailedAuthentication fault if wsu:Timestamp is expired. The
+SOAP_WSSE_CLKSKEW value is used as a margin to mitigate clock skew. Keeps
+silent when no timestamp is supplied or no expiration date is included in the
+wsu:Timestamp element.
+*/
+int
+soap_wsse_verify_Timestamp(struct soap *soap)
+{ _wsu__Timestamp *timestamp = soap_wsse_Timestamp(soap);
+  DBGFUN("soap_wsse_verify_Timestamp");
+  /* if we have a timestamp with an expiration date, check it */
+  if (timestamp && timestamp->Expires)
+  { time_t now = time(NULL), expired;
+    soap_s2dateTime(soap, timestamp->Expires, &expired);
+    if (expired + SOAP_WSSE_CLKSKEW <= now)
+    { const char *code = soap_wsu__tTimestampFault2s(soap, 0);
+      return soap_sender_fault_subcode(soap, code, "Message has expired", timestamp->Expires);
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************\
+ *
+ * wsse:Security/UsernameToken header element
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_wsse_add_UsernameTokenText(struct soap *soap, const char *id, const char *username, const char *password)
+@brief Adds UsernameToken element with optional clear-text password.
+@param soap context
+@param[in] id string for signature referencing or NULL
+@param[in] username string
+@param[in] password string or NULL to omit the password
+@return SOAP_OK
+
+Passwords are sent in the clear, so transport-level encryption is required.
+Note: this release supports the use of at most one UsernameToken in the header.
+*/
+int
+soap_wsse_add_UsernameTokenText(struct soap *soap, const char *id, const char *username, const char *password)
+{ _wsse2__Security *security = soap_wsse_add_Security(soap);
+  DBGFUN2("soap_wsse_add_UsernameTokenText", "id=%s", id?id:"", "username=%s", username?username:"");
+  /* allocate a UsernameToken if we don't have one already */
+  if (!security->UsernameToken)
+    security->UsernameToken = (_wsse2__UsernameToken*)soap_malloc(soap, sizeof(_wsse2__UsernameToken));
+  soap_default__wsse2__UsernameToken(soap, security->UsernameToken);
+  /* populate the UsernameToken */
+  security->UsernameToken->wsu__Id = soap_strdup(soap, id);
+  security->UsernameToken->Username = soap_strdup(soap, username);
+  /* allocate and populate the Password */
+  if (password)
+  { security->UsernameToken->Password = (_wsse2__Password*)soap_malloc(soap, sizeof(_wsse2__Password));
+    soap_default__wsse2__Password(soap, security->UsernameToken->Password);
+    security->UsernameToken->Password->Type = (char*)wsse_PasswordTextURI;
+    security->UsernameToken->Password->__item = soap_strdup(soap, password);
+  }
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_wsse_add_UsernameTokenDigest(struct soap *soap, const char *id, const char *username, const char *password)
+@brief Adds UsernameToken element for digest authentication.
+@param soap context
+@param[in] id string for signature referencing or NULL
+@param[in] username string
+@param[in] password string
+@return SOAP_OK
+
+Computes SHA1 digest of the time stamp, a nonce, and the password. The digest
+provides the authentication credentials. Passwords are NOT sent in the clear.
+Note: this release supports the use of at most one UsernameToken in the header.
+*/
+int
+soap_wsse_add_UsernameTokenDigest(struct soap *soap, const char *id, const char *username, const char *password)
+{ _wsse2__Security *security = soap_wsse_add_Security(soap);
+  time_t now = time(NULL);
+  const char *created = soap_dateTime2s(soap, now);
+  char HA[SOAP_SMD_SHA1_SIZE], HABase64[29];
+  char nonce[SOAP_WSSE_NONCELEN], *nonceBase64;
+  DBGFUN2("soap_wsse_add_UsernameTokenDigest", "id=%s", id?id:"", "username=%s", username?username:"");
+  /* generate a nonce */
+  calc_nonce(soap, nonce);
+  nonceBase64 = soap_s2base64(soap, nonce, NULL, SOAP_WSSE_NONCELEN);
+  /* TODO: the specs are not clear: compute digest over binary nonce or base64 nonce?
+  calc_digest(soap, created, nonce, SOAP_WSSE_NONCELEN, password, HA); */
+  /* compute SHA1(created, nonce, password) */
+  calc_digest(soap, created, nonceBase64, strlen(nonceBase64), password, HA);
+  soap_s2base64(soap, HA, HABase64, SOAP_SMD_SHA1_SIZE);
+  /* populate the UsernameToken with digest */
+  soap_wsse_add_UsernameTokenText(soap, id, username, HABase64);
+  /* populate the remainder of the password, nonce, and created */
+  security->UsernameToken->Password->Type = (char*)wsse_PasswordDigestURI;
+  security->UsernameToken->Nonce = nonceBase64;
+  security->UsernameToken->wsu__Created = soap_strdup(soap, created);
+  return SOAP_OK;
+}
+
+/**
+@fn _wsse2__UsernameToken* soap_wsse_UsernameToken(struct soap *soap, const char *id)
+@brief Returns UsernameToken element if present.
+@param soap context
+@param[in] id string of UsernameToken or NULL
+@return _wsse2__UsernameToken object or NULL
+
+Note: this release supports the use of at most one UsernameToken in the header.
+*/
+struct _wsse2__UsernameToken*
+soap_wsse_UsernameToken(struct soap *soap, const char *id)
+{ _wsse2__Security *security = soap_wsse_Security(soap);
+  if (security
+   && security->UsernameToken
+   && (!id || (security->UsernameToken->wsu__Id
+            && !strcmp(security->UsernameToken->wsu__Id, id))))
+    return security->UsernameToken;
+  return NULL;
+}
+
+/**
+@fn const char* soap_wsse_get_Username(struct soap *soap)
+@brief Returns UsernameToken/username string or wsse:FailedAuthentication fault.
+@param soap context
+@return UsernameToken/username string or NULL with wsse:FailedAuthentication fault error set
+@see soap_wsse_verify_Password
+
+The returned username should be used to lookup the user's password in a
+dictionary or database for server-side authentication with
+soap_wsse_verify_Password.
+*/
+const char*
+soap_wsse_get_Username(struct soap *soap)
+{ _wsse2__UsernameToken *token = soap_wsse_UsernameToken(soap, NULL);
+  DBGFUN("soap_wsse_get_Username");
+  if (token)
+    return token->Username;
+  soap_wsse_fault(soap, wsse2__FailedAuthentication, "Authentication required");
+  return NULL;
+}
+
+/**
+@fn int soap_wsse_verify_Password(struct soap *soap, const char *password)
+@brief Verifies the supplied password or sets wsse:FailedAuthentication fault.
+@param soap context
+@param[in] password string to verify against
+@return SOAP_OK (authorized) or SOAP_FAULT with wsse:FailedAuthentication fault
+
+The verification supports both clear-text password verification and digest
+password authentication. For digest authentication a history mechanism with a
+digest authentication session database ensures protection against replay
+attacks.
+Note: this release supports the use of at most one UsernameToken in the header.
+*/
+int
+soap_wsse_verify_Password(struct soap *soap, const char *password)
+{ _wsse2__UsernameToken *token = soap_wsse_UsernameToken(soap, NULL);
+  DBGFUN("soap_wsse_verify_Password");
+  /* if we have a UsernameToken with a Password, check it */
+  if (token && token->Password)
+  { /* password digest or text? */
+    if (token->Password->Type
+     && !strcmp(token->Password->Type, wsse_PasswordDigestURI))
+    { /* check password digest: compute SHA1(created, nonce, password) */
+      if (token->Nonce
+       && token->wsu__Created
+       && strlen(token->Password->__item) == 28)	/* digest pw len = 28 */
+      { char HA1[SOAP_SMD_SHA1_SIZE], HA2[SOAP_SMD_SHA1_SIZE];
+	/* TODO: the specs are not clear: compute digest over binary nonce or base64 nonce?
+        int noncelen;
+	const char *nonce = soap_base642s(soap, token->Nonce, NULL, 0, &noncelen);
+        calc_digest(soap, token->wsu__Created, nonce, noncelen, password, HA1); */
+        /* compute HA1 = SHA1(created, nonce, password) */
+        calc_digest(soap, token->wsu__Created, token->Nonce, strlen(token->Nonce), password, HA1);
+	/* get HA2 = supplied digest from base64 Password */
+        soap_base642s(soap, token->Password->__item, HA2, SOAP_SMD_SHA1_SIZE, NULL);
+        /* compare HA1 to HA2 */
+        if (!memcmp(HA1, HA2, SOAP_SMD_SHA1_SIZE))
+	{ /* authorize if HA1 and HA2 identical and not replay attack */
+          if (!soap_wsse_session_verify(soap, HA1, token->wsu__Created, token->Nonce))
+	    return SOAP_OK;
+          return soap->error; 
+        }
+      }
+    }
+    else
+    { /* check password text */
+      if (!strcmp(token->Password->__item, password))
+        return SOAP_OK;
+    }
+  }
+  return soap_wsse_fault(soap, wsse2__FailedAuthentication, "Authentication required");
+}
+
+/******************************************************************************\
+ *
+ * wsse:Security/BinarySecurityToken header element
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_wsse_add_BinarySecurityToken(struct soap *soap, const char *id, const char *valueType, const unsigned char *data, int size)
+@brief Adds BinarySecurityToken element.
+@param soap context
+@param[in] id string for signature referencing or NULL
+@param[in] valueType string
+@param[in] data points to binary token data
+@param[in] size is length of binary token
+@return SOAP_OK
+*/
+int
+soap_wsse_add_BinarySecurityToken(struct soap *soap, const char *id, const char *valueType, const unsigned char *data, int size)
+{ _wsse2__Security *security = soap_wsse_add_Security(soap);
+  DBGFUN2("wsse_add_BinarySecurityToken", "id=%s", id?id:"", "valueType=%s", valueType?valueType:"");
+  /* allocate BinarySecurityToken if we don't already have one */
+  if (!security->BinarySecurityToken)
+    security->BinarySecurityToken = (_wsse2__BinarySecurityToken*)soap_malloc(soap, sizeof(_wsse2__BinarySecurityToken));
+  soap_default__wsse2__BinarySecurityToken(soap, security->BinarySecurityToken);
+  /* populate the BinarySecurityToken */
+  security->BinarySecurityToken->wsu__Id = soap_strdup(soap, id);
+  security->BinarySecurityToken->ValueType = soap_strdup(soap, valueType);
+  security->BinarySecurityToken->EncodingType = (char*)wsse_Base64BinaryURI;
+  security->BinarySecurityToken->__item = soap_s2base64(soap, data, NULL, size);
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_wsse_add_BinarySecurityTokenX509(struct soap *soap, const char *id, X509 *cert)
+@brief Adds BinarySecurityToken element with X509 certificate.
+@param soap context
+@param[in] id string for signature reference
+@param[in] cert points to the X509 certificate
+@return SOAP_OK or SOAP_EOM
+
+This function uses i2d_X509 from the the OpenSSL library to convert an X509
+object to binary DER format.
+*/
+int
+soap_wsse_add_BinarySecurityTokenX509(struct soap *soap, const char *id, X509 *cert)
+{ int size;
+  unsigned char *data, *next;
+  if (!cert)
+    return soap_wsse_fault(soap, wsse2__InvalidSecurityToken, "Invalid certificate");
+  /* determine the storage requirement */
+  size = i2d_X509(cert, NULL);
+  if (size < 0)
+    return soap_wsse_fault(soap, wsse2__InvalidSecurityToken, "Invalid certificate");
+  /* use the gSOAP engine's look-aside buffer to temporarily hold the cert */
+  if (soap_store_lab(soap, NULL, size))
+    return SOAP_EOM;
+  data = next = (unsigned char*)soap->labbuf;
+  /* store in DER format */
+  i2d_X509(cert, &next);
+  /* populate the BinarySecurityToken with base64 certificate data */
+  return soap_wsse_add_BinarySecurityToken(soap, id, wsse_X509v3URI, data, size);
+}
+
+/**
+@fn int soap_wsse_add_BinarySecurityTokenPEM(struct soap *soap, const char *id, const char *filename)
+@brief Adds BinarySecurityToken element from a PEM file.
+@param soap context
+@param[in] id string for signature reference
+@param[in] filename
+@return SOAP_OK or SOAP_FAULT with wsse2__InvalidSecurity fault when file cannot be read or does not contain a valid certificate
+
+This function uses PEM_read_X509 from the the OpenSSL library to read a
+certificate from a PEM formatted file.
+*/
+int
+soap_wsse_add_BinarySecurityTokenPEM(struct soap *soap, const char *id, const char *filename)
+{ FILE *fd;
+  DBGFUN2("soap_wsse_add_BinarySecurityTokenPEM", "id=%s", id?id:"", "filename=%s", filename?filename:"");
+  if ((fd = fopen(filename, "r")))
+  { /* read the certificate */
+    X509 *cert = PEM_read_X509(fd, NULL, NULL, NULL);
+    fclose(fd);
+    /* if okay, populate the BinarySecurityToken element */
+    if (cert)
+    { int err = soap_wsse_add_BinarySecurityTokenX509(soap, id, cert);
+      X509_free(cert);
+      return err;
+    }
+  }
+  return soap_wsse_fault(soap, wsse2__InvalidSecurity, "No certificate");
+}
+
+/**
+@fn _wsse2__BinarySecurityToken* soap_wsse_BinarySecurityToken(struct soap *soap, const char *id)
+@brief Returns BinarySecurityToken element if present.
+@param soap context
+@param[in] id string of token to get or NULL
+@return _wsse2__BinarySecurityToken object or NULL
+*/
+struct _wsse2__BinarySecurityToken*
+soap_wsse_BinarySecurityToken(struct soap *soap, const char *id)
+{ _wsse2__Security *security = soap_wsse_Security(soap);
+  if (security
+   && security->BinarySecurityToken
+   && (!id || (security->BinarySecurityToken->wsu__Id
+            && !strcmp(security->BinarySecurityToken->wsu__Id, id))))
+    return security->BinarySecurityToken;
+  return NULL;
+}
+
+/**
+@fn int soap_wsse_get_BinarySecurityToken(struct soap *soap, const char *id, char **valueType, unsigned char **data, int *size)
+@brief Get wsse:BinarySecurityToken element token data in binary form.
+@param soap context
+@param[in] id string of token to get or NULL
+@param[out] valueType string
+@param[out] data points to binary token data
+@param[out] size is length of binary token
+@return SOAP_OK or SOAP_FAULT with wsse:SecurityTokenUnavailable fault
+*/
+int
+soap_wsse_get_BinarySecurityToken(struct soap *soap, const char *id, char **valueType, unsigned char **data, int *size)
+{ _wsse2__BinarySecurityToken *token = soap_wsse_BinarySecurityToken(soap, id);
+  DBGFUN1("soap_wsse_get_BinarySecurityToken", "id=%s", id?id:"");
+  if (token)
+  { *valueType = token->ValueType;
+    /* it appears we don't need HexBinary after all
+    if (token->EncodingType && !strcmp(token->EncodingType, wsse_HexBinaryURI))
+      *data = (unsigned char*)soap_hex2s(soap, token->__item, NULL, 0, size);
+    else
+    */
+    /* assume token is represented in base64 by default */
+    *data = (unsigned char*)soap_base642s(soap, token->__item, NULL, 0, size);
+    if (*data)
+      return SOAP_OK;
+  }
+  return soap_wsse_fault(soap, wsse2__SecurityTokenUnavailable, "BinarySecurityToken required");
+}
+
+/**
+@fn X509* soap_wsse_get_BinarySecurityTokenX509(struct soap *soap, const char *id)
+@brief Get X509 wsse:BinarySecurityToken certificate and verify its content.
+@param soap context
+@param[in] id string of token to get or NULL
+@return X509 certificate (dynamically allocated) or NULL with wsse:SecurityTokenUnavailable fault
+*/
+X509*
+soap_wsse_get_BinarySecurityTokenX509(struct soap *soap, const char *id)
+{ X509 *cert = NULL;
+  char *valueType;
+  unsigned char *data;
+  int size;
+  DBGFUN1("soap_wsse_get_BinarySecurityTokenX509", "id=%s", id?id:"");
+  if (!soap_wsse_get_BinarySecurityToken(soap, id, &valueType, &data, &size)
+   && valueType
+   && !strcmp(valueType, wsse_X509v3URI))
+    cert = d2i_X509(NULL, &data, size);
+  /* verify the certificate */
+  if (!cert || soap_wsse_verify_X509(soap, cert))
+    return NULL;
+  return cert;
+}
+
+/**
+@fn int soap_wsse_verify_X509(struct soap *soap, X509 *cert)
+@brief Verifies X509 certificate against soap->cafile, soap->capath, and soap->crlfile
+@param soap context
+@param[in] cert X509 certificate
+@return SOAP_OK or fault
+
+This is an expensive operation, since we read the cafile and create the objects
+every time we need to verify a certificate. For future releases, we should
+store this data permanently in the gSOAP engine or plugin.
+*/
+int
+soap_wsse_verify_X509(struct soap *soap, X509 *cert)
+{ X509_STORE *store = NULL;
+  X509_STORE_CTX *verify = NULL;
+  /* OpenSSL_add_all_algorithms(); */
+  DBGFUN("soap_wsse_verify_X509");
+  /* TODO: should keep the store in the gSOAP engine or plugin to avoid excessive loads */
+  if (!(store = X509_STORE_new()))
+  { soap_receiver_fault(soap, "soap_wsse_verify_X509", "Could not create X509_STORE object");
+    goto err;
+  }
+  X509_STORE_set_verify_cb_func(store, soap->fsslverify);
+  if (soap->cafile || soap->capath)
+  { if (X509_STORE_load_locations(store, soap->cafile, soap->capath) != 1)
+    { soap_receiver_fault(soap, "soap_wsse_verify_X509", "Could not load CA file or path");
+      goto err;
+    }
+  }
+#if (OPENSSL_VERSION_NUMBER > 0x00907000L)
+  if (soap->crlfile)
+  { X509_LOOKUP *lookup;
+    if (!(lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file())))
+    { soap_receiver_fault(soap, "soap_wsse_verify_X509", "Could not create X509_LOOKUP object");
+      goto err;
+    }
+    if (X509_load_crl_file(lookup, soap->crlfile, X509_FILETYPE_PEM) != 1)
+    { soap_receiver_fault(soap, "soap_wsse_verify_X509", "Could not read the CRL file");
+      goto err;
+    }
+    X509_STORE_set_flags(store, X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL);
+  }
+#endif
+  if (!(verify = X509_STORE_CTX_new()))
+  { soap_receiver_fault(soap, "soap_wsse_verify_X509", "Could not create X509_STORE_CTX object");
+    goto err;
+  }
+#if (OPENSSL_VERSION_NUMBER > 0x00907000L)
+  if (X509_STORE_CTX_init(verify, store, cert, NULL) != 1)
+  { soap_receiver_fault(soap, "soap_wsse_verify_X509", "Could not initialize X509_STORE_CTX object");
+    goto err;
+  }
+#else
+  X509_STORE_CTX_init(verify, store, cert, NULL);
+#endif
+  if (X509_verify_cert(verify) != 1)
+  { soap_sender_fault(soap, "soap_wsse_verify_X509", "Invalid certificate");
+    goto err;
+  }
+  X509_STORE_CTX_free(verify);
+  X509_STORE_free(store);
+  return SOAP_OK;
+err:
+  if (verify)
+    X509_STORE_CTX_free(verify);
+  if (store)
+    X509_STORE_free(store);
+  return soap->error;
+}
+
+/******************************************************************************\
+ *
+ * ds:Signature/SignedInfo
+ *
+\******************************************************************************/
+
+/**
+@fn ds__SignedInfoType* soap_wsse_add_SignedInfo(struct soap *soap)
+@brief Adds SignedInfo element.
+@param soap context
+@return ds__SignedInfoType object
+*/
+struct ds__SignedInfoType*
+soap_wsse_add_SignedInfo(struct soap *soap)
+{ ds__SignatureType *signature = soap_wsse_add_Signature(soap);
+  if (!signature->SignedInfo)
+  { signature->SignedInfo = (ds__SignedInfoType*)soap_malloc(soap, sizeof(ds__SignedInfoType));
+    soap_default_ds__SignedInfoType(soap, signature->SignedInfo);
+  }
+  return signature->SignedInfo;
+}
+
+/**
+@fn int soap_wsse_add_SignedInfo_Reference(struct soap *soap, const char *URI, const char *transform, const char *inclusiveNamespaces, const char *HA)
+@brief Adds SignedInfo element with Reference URI, transform algorithm used, and digest value.
+@param soap context
+@param[in] URI reference
+@param[in] transform string should be c14n_URI for exc-c14n or NULL
+@param[in] inclusiveNamespaces used by the exc-c14n transform or NULL
+@param[in] HA is the SHA1 digest in binary form (length=SOAP_SMD_SHA1_SIZE)
+@return SOAP_OK or SOAP_EOM when references exceed SOAP_WSSE_MAX_REF
+
+This function can be called to add more references to the wsse:SignedInfo
+element. A maximum number of SOAP_WSSE_MAX_REF references can be added. The
+digest method is always SHA1. 
+Note: XPath transforms cannot be specified in this release.
+*/
+int
+soap_wsse_add_SignedInfo_Reference(struct soap *soap, const char *URI, const char *transform, const char *inclusiveNamespaces, const char *HA)
+{ ds__SignedInfoType *signedInfo = soap_wsse_add_SignedInfo(soap);
+  ds__ReferenceType *reference;
+  DBGFUN2("soap_wsse_add_SignedInfo_Reference", "URI=%s", URI?URI:"", "transform=%s", transform?transform:"");
+  /* if this is the first reference, allocate SOAP_WSSE_MAX_REF references */
+  if (signedInfo->__sizeReference == 0)
+    signedInfo->Reference = (ds__ReferenceType**)soap_malloc(soap, SOAP_WSSE_MAX_REF*sizeof(ds__ReferenceType*));
+  else
+  { /* maximum number of references exceeded? */
+    if (signedInfo->__sizeReference >= SOAP_WSSE_MAX_REF)
+      return SOAP_EOM;
+  }
+  /* allocate fresh new reference */
+  reference = (ds__ReferenceType*)soap_malloc(soap, sizeof(ds__ReferenceType));
+  soap_default_ds__ReferenceType(soap, reference);
+  /* populate the URI */
+  reference->URI = soap_strdup(soap, URI);
+  /* if a transform algorithm was used, populate the Transforms element */
+  if (transform)
+  { reference->Transforms = (ds__TransformsType*)soap_malloc(soap, sizeof(ds__TransformsType));
+    soap_default_ds__TransformsType(soap, reference->Transforms);
+    /* only one transform */
+    reference->Transforms->__sizeTransform = 1;
+    reference->Transforms->Transform = (ds__TransformType*)soap_malloc(soap, sizeof(ds__TransformType));
+    soap_default_ds__TransformType(soap, reference->Transforms->Transform);
+    reference->Transforms->Transform->Algorithm = (char*)transform;
+    /* populate the c14n:InclusiveNamespaces element */
+    if (inclusiveNamespaces)
+    { reference->Transforms->Transform->c14n__InclusiveNamespaces = (_c14n__InclusiveNamespaces*)soap_malloc(soap, sizeof(_c14n__InclusiveNamespaces));
+      soap_default__c14n__InclusiveNamespaces(soap, reference->Transforms->Transform->c14n__InclusiveNamespaces);
+      reference->Transforms->Transform->c14n__InclusiveNamespaces->PrefixList = soap_strdup(soap, inclusiveNamespaces);
+    }
+  }
+  /* populate the DigestMethod element */
+  reference->DigestMethod = (ds__DigestMethodType*)soap_malloc(soap, sizeof(ds__DigestMethodType));
+  soap_default_ds__DigestMethodType(soap, reference->DigestMethod);
+  /* the DigestMethod algorithm is always SHA1 */
+  reference->DigestMethod->Algorithm = (char*)ds_sha1URI;
+  /* populate the DigestValue element */
+  reference->DigestValue = soap_s2base64(soap, HA, NULL, SOAP_SMD_SHA1_SIZE);
+  /* add the fresh new reference to the array */
+  signedInfo->Reference[signedInfo->__sizeReference] = reference;
+  signedInfo->__sizeReference++;
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_wsse_add_SignedInfo_SignatureMethod(struct soap *soap, const char *method, int canonical)
+@brief Adds SignedInfo element with SignatureMethod.
+@param soap context
+@param[in] method is the URI of the signature algorithm (e.g. ds_rsa_sha1)
+@param[in] canonical flag indicating that SignedInfo is signed in exc-c14n form
+@return SOAP_OK
+
+Note: the c14n:InclusiveNamespaces/PrefixList is set to "SOAP-ENV wsse".
+*/
+int
+soap_wsse_add_SignedInfo_SignatureMethod(struct soap *soap, const char *method, int canonical)
+{ ds__SignedInfoType *signedInfo = soap_wsse_add_SignedInfo(soap);
+  DBGFUN2("soap_wsse_add_SignedInfo_SignatureMethod", "method=%s", method?method:"", "canonical=%d", canonical);
+  /* if signed in exc-c14n form, populate CanonicalizationMethod element */
+  if (canonical)
+  { signedInfo->CanonicalizationMethod = (ds__CanonicalizationMethodType*)soap_malloc(soap, sizeof(ds__CanonicalizationMethodType));
+    soap_default_ds__CanonicalizationMethodType(soap, signedInfo->CanonicalizationMethod);
+    signedInfo->CanonicalizationMethod->Algorithm = (char*)c14n_URI;
+    /* TODO: check c14n:InclusiveNamespaces/PrefixList requirements */
+    signedInfo->CanonicalizationMethod->c14n__InclusiveNamespaces = (_c14n__InclusiveNamespaces*)soap_malloc(soap, sizeof(_c14n__InclusiveNamespaces));
+    soap_default__c14n__InclusiveNamespaces(soap, signedInfo->CanonicalizationMethod->c14n__InclusiveNamespaces);
+    signedInfo->CanonicalizationMethod->c14n__InclusiveNamespaces->PrefixList = "SOAP-ENV wsse";
+  }
+  /* populate SignatureMethod element */
+  signedInfo->SignatureMethod = (ds__SignatureMethodType*)soap_malloc(soap, sizeof(ds__SignatureMethodType));
+  soap_default_ds__SignatureMethodType(soap, signedInfo->SignatureMethod);
+  signedInfo->SignatureMethod->Algorithm = (char*)method;
+  return SOAP_OK;
+}
+
+/**
+@fn ds__SignedInfoType* soap_wsse_SignedInfo(struct soap *soap)
+@brief Returns SignedInfo element if present.
+@param soap context
+@return ds__SignedInfoType object or NULL
+*/
+struct ds__SignedInfoType*
+soap_wsse_SignedInfo(struct soap *soap)
+{ ds__SignatureType *signature = soap_wsse_Signature(soap);
+  if (signature)
+    return signature->SignedInfo;
+  return NULL;
+}
+
+/**
+@fn int soap_wsse_get_SignedInfo_SignatureMethod(struct soap *soap, int *alg)
+@brief Get SignatureMethod algorithm
+@param soap context
+@param[out] alg is SOAP_SMD_HMAC_SHA1, SOAP_SMD_VRFY_DSA_SHA1, or SOAP_SMD_VRFY_RSA_SHA1
+@return SOAP_OK or SOAP_FAULT with wsse:UnsupportedAlgorithm or wsse:FailedCheck fault
+*/
+int
+soap_wsse_get_SignedInfo_SignatureMethod(struct soap *soap, int *alg)
+{ ds__SignedInfoType *signedInfo = soap_wsse_SignedInfo(soap);
+  DBGFUN("soap_wsse_get_SignedInfo_SignatureMethod");
+  *alg = SOAP_SMD_NONE;
+  /* if we have a SignedInfo element, get the algorithm */
+  if (signedInfo
+   && signedInfo->SignatureMethod
+   && signedInfo->SignatureMethod->Algorithm)
+  { const char *method = signedInfo->SignatureMethod->Algorithm;
+    if (!strcmp(method, ds_hmac_sha1URI))
+      *alg = SOAP_SMD_HMAC_SHA1;
+    else if (!strcmp(method, ds_dsa_sha1URI))
+      *alg = SOAP_SMD_VRFY_DSA_SHA1;
+    else if (!strcmp(method, ds_rsa_sha1URI))
+      *alg = SOAP_SMD_VRFY_RSA_SHA1;
+    else
+      return soap_wsse_fault(soap, wsse2__UnsupportedAlgorithm, method);
+    return SOAP_OK;
+  }
+  return soap_wsse_fault(soap, wsse2__FailedCheck, "Signature required");
+}
+
+/******************************************************************************\
+ *
+ * ds:Signature/SignatureValue
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_wsse_add_SignatureValue(struct soap *soap, int alg, const void *key, int keylen)
+@brief Adds SignedInfo/SignatureMethod element, signs the SignedInfo element, and adds the resulting SignatureValue element.
+@param soap context
+@param[in] alg is SOAP_SMD_HMAC_SHA1, SOAP_SMD_SIGN_DSA_SHA1, or SOAP_SMD_SIGN_RSA_SHA1
+@param[in] key to use to sign (HMAC or EVP_PKEY)
+@param[in] keylen length of HMAC key
+@return SOAP_OK, SOAP_EOM, or fault
+
+To sign the SignedInfo element with this function, populate SignedInfo with
+Reference elements first using soap_wsse_add_SignedInfo_Reference. The
+SignedInfo element must not be modified after signing.
+
+The SOAP_XML_INDENT and SOAP_XML_CANONICAL flags are used to serialize the
+SignedInfo to compute the signature.
+*/
+int
+soap_wsse_add_SignatureValue(struct soap *soap, int alg, const void *key, int keylen)
+{ ds__SignatureType *signature = soap_wsse_add_Signature(soap);
+  const char *c14nexclude, *method = NULL;
+  char *sig;
+  int siglen;
+  DBGFUN1("soap_wsse_add_SignatureValue", "alg=%d", alg);
+  /* determine signature algorithm to use */
+  switch (alg)
+  { case SOAP_SMD_HMAC_SHA1:
+      method = ds_hmac_sha1URI;
+      break;
+    case SOAP_SMD_SIGN_DSA_SHA1:
+      method = ds_dsa_sha1URI;
+      break;
+    case SOAP_SMD_SIGN_RSA_SHA1:
+      method = ds_rsa_sha1URI;
+      break;
+    default:
+      return soap_wsse_fault(soap, wsse2__UnsupportedAlgorithm, NULL);
+  }
+  /* populate SignedInfo/SignatureMethod based on SOAP_XML_CANONICAL flag */
+  soap_wsse_add_SignedInfo_SignatureMethod(soap, method, (soap->mode & SOAP_XML_CANONICAL));
+  /* use the gSOAP engine's look-aside buffer to temporarily hold the sig */
+  if (soap_store_lab(soap, NULL, soap_smd_size(alg, key)))
+    return SOAP_EOM;
+  sig = soap->labbuf;
+  /* we will serialize SignedInfo as it appears exactly in the SOAP Header */
+  /* set indent level for XML SignedInfo as it appears in the SOAP Header */
+  soap->level = 4;
+  /* with SOAP_XML_CANONICAL flag, exclude the "ds" prefix */
+  c14nexclude = soap->c14nexclude;
+  soap->c14nexclude = "ds";
+  /* use smdevp engine to sign SignedInfo */
+  if (soap_smd_begin(soap, alg, key, keylen)
+   || soap_out_ds__SignedInfoType(soap, "ds:SignedInfo", 0, signature->SignedInfo, NULL)
+   || soap_smd_end(soap, sig, &siglen))
+    return soap_wsse_fault(soap, wsse2__InvalidSecurity, "Could not sign");
+  /* restore c14nexclude */
+  soap->c14nexclude = c14nexclude;
+  /* populate the SignatureValue element */
+  signature->SignatureValue = soap_s2base64(soap, sig, NULL, siglen);
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_wsse_verify_SignatureValue(struct soap *soap, int alg, const void *key, int keylen)
+@brief Verifies the SignatureValue of a SignedInfo element.
+@param soap context
+@param[in] alg is SOAP_SMD_HMAC_SHA1, SOAP_SMD_VRFY_DSA_SHA1, or SOAP_SMD_VRFY_RSA_SHA1 determined by the SignedInfo/SignatureMethod
+@param[in] key to use to verify (HMAC or EVP_PKEY)
+@param[in] keylen length of HMAC key
+@return SOAP_OK, SOAP_EOM, or fault
+
+This function searches for the SignedInfo element in the soap->dom DOM tree to
+verify the signature in the SignatureValue element. Using the DOM ensures we
+will verify the signature of a SignedInfo as it was exactly received by the
+parser, by using the -DWITH_DOM compile flag and SOAP_XML_DOM runtime flag. If
+there is no DOM, it verifies the signature of the deserialized SignedInfo
+element in the SOAP Header. However, serializing deserialized data may change
+the octet stream that was signed, unless we're using gSOAP as producers and
+consumers (with the SOAP_XML_INDENT flag reset).
+*/
+int
+soap_wsse_verify_SignatureValue(struct soap *soap, int alg, const void *key, int keylen)
+{ ds__SignatureType *signature = soap_wsse_Signature(soap);
+  DBGFUN1("soap_wsse_verify_SignatureValue", "alg=%d", alg);
+  /* always need an HMAC secret key or DSA/RSA public key to verify */
+  if (!key)
+    return soap_wsse_fault(soap, wsse2__SecurityTokenUnavailable, NULL);
+  /* verify the SignedInfo element with the SignatureValue element */
+  if (signature
+   && signature->SignedInfo
+   && signature->SignatureValue)
+  { const char *sig;
+    int method, siglen;
+    /* check that we are using the intended signature algorithm */
+    if (soap_wsse_get_SignedInfo_SignatureMethod(soap, &method))
+      return soap->error;
+    if (alg != method)
+      return soap_wsse_fault(soap, wsse2__FailedCheck, "Incorrect signature algorithm");
+    /* retrieve the signature */
+    sig = soap_base642s(soap, signature->SignatureValue, NULL, 0, &siglen);
+    /* search the DOM for SignedInfo */
+    if (soap->dom)
+    { struct soap_dom_element *elt;
+      /* traverse the DOM while searching for SignedInfo in the ds namespace */
+      for (elt = soap->dom; elt; elt = soap_dom_next_element(elt))
+      { if (elt->name
+         && elt->nstr
+	 && !strcmp(elt->nstr, ds_URI)
+	 && (!strcmp(elt->name, "SignedInfo") || !soap_tag_cmp(elt->name, "*:SignedInfo")))
+	  break;
+      }
+      /* found it? */
+      if (elt)
+      { /* output the DOM "as is" */
+	soap->mode &= ~SOAP_XML_CANONICAL;
+	soap->mode |= SOAP_DOM_ASIS;
+	/* should not include leading whitespace in signature verification */
+	elt->head = NULL;
+        /* use smdevp engine to verify SignedInfo */
+        if (soap_smd_begin(soap, alg, key, keylen)
+         || soap_out_xsd__anyType(soap, NULL, 0, elt, NULL)
+         || soap_smd_end(soap, (char*)sig, &siglen))
+          return soap_wsse_fault(soap, wsse2__FailedCheck, NULL);
+        return SOAP_OK;
+      }
+    }
+    else
+    { int err = SOAP_OK;
+      const char *c14nexclude;
+      soap_mode mode;
+      /* serialize the SignedInfo element as it appeared in the SOAP Header */
+      soap->level = 4;
+      c14nexclude = soap->c14nexclude;
+      soap->c14nexclude = "ds";
+      mode = soap->mode;
+      if (signature->SignedInfo->CanonicalizationMethod)
+        soap->mode |= SOAP_XML_CANONICAL;
+      else
+        soap->mode &= ~SOAP_XML_CANONICAL;
+      if (soap_smd_begin(soap, alg, key, keylen)
+       || soap_out_ds__SignedInfoType(soap, "ds:SignedInfo", 0, signature->SignedInfo, NULL)
+       || soap_smd_end(soap, (char*)sig, &siglen))
+        err = soap->error;
+      soap->mode = mode;
+      soap->c14nexclude = c14nexclude;
+      if (err)
+        return soap_wsse_fault(soap, wsse2__FailedCheck, NULL);
+      return SOAP_OK;
+    }
+  }
+  return soap_wsse_fault(soap, wsse2__FailedCheck, "Signature required");
+}
+
+/**
+@fn int soap_wsse_verify_SignedInfo(struct soap *soap)
+@brief Verifies the digest values of the XML elements referenced by the SignedInfo References.
+@param soap context
+@return SOAP_OK or fault
+
+This function searches for the SignedInfo element in the soap->dom DOM tree to
+verify the digests contained therein. Using the DOM ensures we will verify the
+digests of the locally signed elements as they were exactly received by the
+parser, by using the -DWITH_DOM compile flag and SOAP_XML_DOM runtime flag. If
+there is no DOM, the function fails.
+*/
+int
+soap_wsse_verify_SignedInfo(struct soap *soap)
+{ ds__SignedInfoType *signedInfo = soap_wsse_SignedInfo(soap);
+  DBGFUN("soap_wsse_verify_SignedInfo");
+  if (signedInfo)
+  { int i;
+    /* must have at least one reference element */
+    if (signedInfo->__sizeReference == 0)
+      return soap_wsse_fault(soap, wsse2__InvalidSecurity, "No SignedInfo/Reference");
+    /* for each reference element, check the digest */
+    for (i = 0; i < signedInfo->__sizeReference; i++)
+    { ds__ReferenceType *reference = signedInfo->Reference[i];
+      /* reference element is complete? */
+      if (!reference->URI
+       || !reference->DigestMethod
+       || !reference->DigestMethod->Algorithm
+       || !reference->DigestValue)
+        return soap_wsse_fault(soap, wsse2__InvalidSecurity, "Incomplete SignedInfo/Reference");
+      /* reference is local? */
+      if (*reference->URI == '#')
+      { int alg;
+        unsigned char hash[SOAP_SMD_MAX_SIZE];
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Verifying digest of locally referenced data %s\n", reference->URI));
+	/* digest algorithm should be SHA1 */
+        if (!strcmp(reference->DigestMethod->Algorithm, ds_sha1URI))
+          alg = SOAP_SMD_DGST_SHA1;
+        else
+          return soap_wsse_fault(soap, wsse2__UnsupportedAlgorithm, reference->DigestMethod->Algorithm);
+	/* if reference has a transform, it should be an exc-c14n transform */
+        if (reference->Transforms
+	 && (reference->Transforms->__sizeTransform != 1
+	  || !reference->Transforms->Transform[0].Algorithm
+	  || strcmp(reference->Transforms->Transform[0].Algorithm, c14n_URI)))
+          return soap_wsse_fault(soap, wsse2__UnsupportedAlgorithm, reference->Transforms->Transform[0].Algorithm);
+	/* convert base64 digest to binary */
+	soap_base642s(soap, reference->DigestValue, hash, SOAP_SMD_MAX_SIZE, NULL);
+	/* verify the digest of a locally signed element */
+        if (soap_wsse_verify_digest(soap, alg, reference->URI + 1, hash))
+	  return soap->error;
+      }
+    }
+    return SOAP_OK;
+  }
+  return soap_wsse_fault(soap, wsse2__InvalidSecurity, "No SignedInfo");
+}
+
+/**
+@fn int soap_wsse_verify_digest(struct soap *soap, int alg, const char *id, unsigned char hash[SOAP_SMD_MAX_SIZE])
+@brief Verifies the digest value of an XML element referenced by id against the hash.
+@param soap context
+@param[in] alg digest algorithm
+@param[in] id string of the XML element to verify
+@param[in] hash digest value to verify against
+@return SOAP_OK or fault
+*/
+int
+soap_wsse_verify_digest(struct soap *soap, int alg, const char *id, unsigned char hash[SOAP_SMD_MAX_SIZE])
+{ struct soap_dom_element *elt;
+  DBGFUN1("soap_wsse_verify_digest", "alg=%d", alg);
+  /* traverse the DOM to find the element with matching wsu:Id or ds:Id */
+  for (elt = soap->dom; elt; elt = soap_dom_next_element(elt))
+  { struct soap_dom_attribute *att;
+    for (att = elt->atts; att; att = att->next)
+    { /* check attribute */
+      if (att->name
+       && att->nstr
+       && (!strcmp(att->nstr, wsu_URI) || !strcmp(att->nstr, ds_URI))
+       && (!strcmp(att->name, "Id") || !soap_tag_cmp(att->name, "*:Id")))
+      { /* found a match, compare attribute value with id */
+        if (att->data && !strcmp(att->data, id))
+        { unsigned char HA[SOAP_SMD_SHA1_SIZE];
+          int len;
+	  /* compute digest over DOM node "as is" */
+	  soap->mode &= ~SOAP_XML_CANONICAL;
+	  soap->mode |= SOAP_DOM_ASIS;
+	  /* do not hash leading whitespace */
+	  elt->head = NULL;
+          /* compute digest */
+	  if (soap_smd_begin(soap, alg, NULL, 0)
+	   || soap_out_xsd__anyType(soap, NULL, 0, elt, NULL)
+	   || soap_smd_end(soap, HA, &len))
+            return soap_wsse_fault(soap, wsse2__FailedCheck, "Could not compute digest");
+	  /* compare digests, success if identical */
+	  if (!memcmp(hash, HA, (size_t)len))
+	    return SOAP_OK;
+          return soap_wsse_fault(soap, wsse2__FailedCheck, "SignedInfo digest mismatch");
+	}
+      }
+    }
+  }
+  return soap_wsse_fault(soap, wsse2__FailedCheck, "SignedInfo reference target not found");
+}
+
+/******************************************************************************\
+ *
+ * ds:Signature/KeyInfo
+ *
+\******************************************************************************/
+
+/**
+@fn ds__KeyInfoType* soap_wsse_add_KeyInfo(struct soap *soap)
+@brief Adds KeyInfo element.
+@param soap context
+@return ds__KeyInfo object
+*/
+struct ds__KeyInfoType*
+soap_wsse_add_KeyInfo(struct soap *soap)
+{ ds__SignatureType *signature = soap_wsse_add_Signature(soap);
+  if (!signature->KeyInfo)
+    signature->KeyInfo = (ds__KeyInfoType*)soap_malloc(soap, sizeof(ds__KeyInfoType));
+  soap_default_ds__KeyInfoType(soap, signature->KeyInfo);
+  return signature->KeyInfo;
+}
+
+/**
+@fn ds__KeyInfoType* soap_wsse_KeyInfo(struct soap *soap)
+@brief Returns KeyInfo element if present.
+@param soap context
+@return ds__KeyInfo object or NULL
+*/
+struct ds__KeyInfoType*
+soap_wsse_KeyInfo(struct soap *soap)
+{ ds__SignatureType *signature = soap_wsse_Signature(soap);
+  if (signature)
+    return signature->KeyInfo;
+  return NULL;
+}
+
+/******************************************************************************\
+ *
+ * ds:Signature/KeyInfo/KeyName
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_wsse_add_KeyInfo_KeyName(struct soap *soap, const char *name)
+@brief Adds KeyName element.
+@param soap context
+@param[in] name string of the KeyName
+@return SOAP_OK
+
+Note: the recommended method to add Key information is to utilize KeyIdentifier
+instead of KeyName. A KeyName is useful mainly for internal use.
+*/
+int
+soap_wsse_add_KeyInfo_KeyName(struct soap *soap, const char *name)
+{ ds__KeyInfoType *keyInfo = soap_wsse_add_KeyInfo(soap);
+  DBGFUN1("soap_wsse_add_KeyInfo_KeyName", "name=%s", name);
+  /* populate the KeyName element */
+  keyInfo->KeyName = soap_strdup(soap, name);
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_wsse_get_KeyInfo_KeyName(struct soap *soap)
+@brief Returns KeyName element if present.
+@param soap context
+@return string or NULL
+*/
+const char*
+soap_wsse_get_KeyInfo_KeyName(struct soap *soap)
+{ ds__KeyInfoType *keyInfo = soap_wsse_KeyInfo(soap);
+  DBGFUN("soap_wsse_get_KeyInfo_KeyName");
+  if (!keyInfo)
+    return NULL;
+  return keyInfo->KeyName;
+}
+
+/******************************************************************************\
+ *
+ * ds:Signature/KeyInfo/wsse:SecurityTokenReference/Reference/@URI
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_wsse_add_KeyInfo_SecurityTokenReferenceURI(struct soap *soap, const char *URI, const char *valueType)
+@brief Adds KeyInfo element with SecurityTokenReference URI.
+@param soap context
+@param[in] URI string referencing a security token
+@param[in] valueType string or NULL
+@return SOAP_OK
+*/
+int
+soap_wsse_add_KeyInfo_SecurityTokenReferenceURI(struct soap *soap, const char *URI, const char *valueType)
+{ ds__KeyInfoType *keyInfo = soap_wsse_add_KeyInfo(soap);
+  DBGFUN2("soap_wsse_add_KeyInfo_SecurityTokenReferenceURI", "URI=%s", URI?URI:"", "valueType=%s", valueType?valueType:"");
+  /* allocate SecurityTokenReference element if we don't have one already */
+  if (!keyInfo->wsse2__SecurityTokenReference)
+    keyInfo->wsse2__SecurityTokenReference = (_wsse2__SecurityTokenReference*)soap_malloc(soap, sizeof(_wsse2__SecurityTokenReference));
+  soap_default__wsse2__SecurityTokenReference(soap, keyInfo->wsse2__SecurityTokenReference);
+  /* allocate Reference element */
+  keyInfo->wsse2__SecurityTokenReference->Reference = (_wsse2__Reference*)soap_malloc(soap, sizeof(_wsse2__Reference));
+  soap_default__wsse2__Reference(soap, keyInfo->wsse2__SecurityTokenReference->Reference);
+  /* populate the Reference element */
+  keyInfo->wsse2__SecurityTokenReference->Reference->URI = soap_strdup(soap, URI);
+  keyInfo->wsse2__SecurityTokenReference->Reference->ValueType = soap_strdup(soap, valueType);
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_wsse_add_KeyInfo_SecurityTokenReferenceX509(struct soap *soap, const char *URI)
+@brief Adds KeyInfo element with SecurityTokenReference URI to an X509 cert.
+@param soap context
+@param[in] URI string referencing an X509 certificate
+@return SOAP_OK
+*/
+int
+soap_wsse_add_KeyInfo_SecurityTokenReferenceX509(struct soap *soap, const char *URI)
+{ return soap_wsse_add_KeyInfo_SecurityTokenReferenceURI(soap, URI, wsse_X509v3URI);
+}
+
+/**
+@fn const char* soap_wsse_get_KeyInfo_SecurityTokenReferenceURI(struct soap *soap)
+@brief Returns a SecurityTokenReference URI if present.
+@param soap context
+@return string or NULL
+*/
+const char*
+soap_wsse_get_KeyInfo_SecurityTokenReferenceURI(struct soap *soap)
+{ ds__KeyInfoType *keyInfo = soap_wsse_KeyInfo(soap);
+  if (keyInfo
+   && keyInfo->wsse2__SecurityTokenReference
+   && keyInfo->wsse2__SecurityTokenReference->Reference)
+    return keyInfo->wsse2__SecurityTokenReference->Reference->URI;
+  return NULL;
+}
+
+/**
+@fn X509* soap_wsse_get_KeyInfo_SecurityTokenReferenceX509(struct soap *soap)
+@brief Returns a X509 certificate if present as a BinarySecurity token.
+@param soap context
+@return X509 object or NULL with wsse:SecurityTokenUnavailable fault
+*/
+X509*
+soap_wsse_get_KeyInfo_SecurityTokenReferenceX509(struct soap *soap)
+{ const char *URI = soap_wsse_get_KeyInfo_SecurityTokenReferenceURI(soap);
+  DBGFUN("soap_wsse_get_KeyInfo_SecurityTokenReferenceX509");
+  /* TODO: can't hurt to double check Reference->ValueType */
+  if (URI && *URI == '#')
+    return soap_wsse_get_BinarySecurityTokenX509(soap, URI + 1);
+  return NULL;
+}
+
+/******************************************************************************\
+ *
+ * ds:Signature/KeyInfo/wsse:SecurityTokenReference/Reference/KeyIdentifier
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_wsse_add_KeyInfo_SecurityTokenReferenceKeyIdentifier(struct soap *soap, const char *id, const char *valueType, unsigned char *data, int size)
+@brief Adds KeyInfo element with SecurityTokenReference/KeyIdentifier binary data
+@param soap context
+@param[in] id string for signature reference
+@param[in] valueType string
+@param[in] data binary data
+@param[in] size of binary data
+@return SOAP_OK
+*/
+int
+soap_wsse_add_KeyInfo_SecurityTokenReferenceKeyIdentifier(struct soap *soap, const char *id, const char *valueType, unsigned char *data, int size)
+{ ds__KeyInfoType *keyInfo = soap_wsse_add_KeyInfo(soap);
+  DBGFUN2("soap_wsse_add_KeyInfo_SecurityTokenReferenceKeyIdentifier", "id=%s", id?id:"", "valueType=%s", valueType?valueType:"");
+  /* allocate SecurityTokenReference if we don't have one already */
+  if (!keyInfo->wsse2__SecurityTokenReference)
+    keyInfo->wsse2__SecurityTokenReference = (_wsse2__SecurityTokenReference*)soap_malloc(soap, sizeof(_wsse2__SecurityTokenReference));
+  soap_default__wsse2__SecurityTokenReference(soap, keyInfo->wsse2__SecurityTokenReference);
+  /* allocate KeyIdentifier */
+  keyInfo->wsse2__SecurityTokenReference->KeyIdentifier = (_wsse2__KeyIdentifier*)soap_malloc(soap, sizeof(_wsse2__KeyIdentifier));
+  soap_default__wsse2__KeyIdentifier(soap, keyInfo->wsse2__SecurityTokenReference->KeyIdentifier);
+  /* populate KeyIdentifier */
+  keyInfo->wsse2__SecurityTokenReference->KeyIdentifier->wsu__Id = soap_strdup(soap, id);
+  keyInfo->wsse2__SecurityTokenReference->KeyIdentifier->ValueType = soap_strdup(soap, valueType);
+  keyInfo->wsse2__SecurityTokenReference->KeyIdentifier->EncodingType = (char*)wsse_Base64BinaryURI;
+  keyInfo->wsse2__SecurityTokenReference->KeyIdentifier->__item = soap_s2base64(soap, data, NULL, size);
+  return SOAP_OK;
+}
+
+/**
+@fn const char* soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifierValueType(struct soap *soap)
+@brief Returns KeyInfo/SecurityTokenReference/KeyIdentifier/ValueType if present
+@param soap context
+@return string or NULL
+*/
+const char*
+soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifierValueType(struct soap *soap)
+{ ds__KeyInfoType *keyInfo = soap_wsse_KeyInfo(soap);
+  DBGFUN("soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifierValueType");
+  if (!keyInfo
+   || !keyInfo->wsse2__SecurityTokenReference
+   || !keyInfo->wsse2__SecurityTokenReference->KeyIdentifier)
+    return NULL;
+  return keyInfo->wsse2__SecurityTokenReference->KeyIdentifier->ValueType;
+}
+
+/**
+@fn const unsigned char* soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifier(struct soap *soap, int *size)
+@brief Returns KeyInfo/SecurityTokenReference/KeyIdentifier binary data
+@param soap context
+@param[out] size is set to the size of the decoded data
+@return data or NULL
+*/
+const unsigned char*
+soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifier(struct soap *soap, int *size)
+{ ds__KeyInfoType *keyInfo = soap_wsse_KeyInfo(soap);
+  DBGFUN("soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifier");
+  if (!keyInfo
+   || !keyInfo->wsse2__SecurityTokenReference
+   || !keyInfo->wsse2__SecurityTokenReference->KeyIdentifier)
+    return NULL;
+  return soap_base642s(soap, keyInfo->wsse2__SecurityTokenReference->KeyIdentifier->__item, NULL, 0, size);
+}
+
+/******************************************************************************\
+ *
+ * ds:Signature/KeyInfo/wsse:SecurityTokenReference/Reference/Embedded
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_wsse_add_KeyInfo_SecurityTokenReferenceEmbedded(struct soap *soap, const char *id, const char *valueType)
+@brief Adds KeyInfo element with Embedded SecurityTokenReference.
+@param soap context
+@param[in] id string for signature reference
+@param[in] valueType string
+@return SOAP_OK
+
+Note: this function is under construction and the result depends on usage
+scenarios deployed in practice.
+*/
+int
+soap_wsse_add_KeyInfo_SecurityTokenReferenceEmbedded(struct soap *soap, const char *id, const char *valueType)
+{ ds__KeyInfoType *keyInfo = soap_wsse_add_KeyInfo(soap);
+  DBGFUN("soap_wsse_get_KeyInfo_SecurityTokenReferenceEmbedded");
+  /* allocate SecurityTokenReference if we don't have one already */
+  if (!keyInfo->wsse2__SecurityTokenReference)
+    keyInfo->wsse2__SecurityTokenReference = (_wsse2__SecurityTokenReference*)soap_malloc(soap, sizeof(_wsse2__SecurityTokenReference));
+  soap_default__wsse2__SecurityTokenReference(soap, keyInfo->wsse2__SecurityTokenReference);
+  /* allocate Embedded element */
+  keyInfo->wsse2__SecurityTokenReference->Embedded = (_wsse2__Embedded*)soap_malloc(soap, sizeof(_wsse2__Embedded));
+  soap_default__wsse2__Embedded(soap, keyInfo->wsse2__SecurityTokenReference->Embedded);
+  /* populate Embedded element */
+  keyInfo->wsse2__SecurityTokenReference->Embedded->wsu__Id = soap_strdup(soap, id);
+  keyInfo->wsse2__SecurityTokenReference->Embedded->ValueType = soap_strdup(soap, valueType);
+  /* TODO: Add embedded tokens and assertions. Could use DOM here?
+  keyInfo->wsse2__SecurityTokenReference->Embedded->xyz = ...;
+  */
+  return SOAP_OK;
+}
+
+/******************************************************************************\
+ *
+ * Faults
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_wsse_fault(struct soap *soap, wsse2__FaultcodeEnum fault, const char *detail)
+@brief Sets SOAP Fault (sub)code for server response.
+@param soap context
+@param[in] fault is one of wsse:FaultcodeEnum
+@param[in] detail string with optional text message
+@return SOAP_FAULT
+*/
+int
+soap_wsse_fault(struct soap *soap, wsse2__FaultcodeEnum fault, const char *detail)
+{ const char *code = soap_wsse2__FaultcodeEnum2s(soap, fault);
+  DBGFUN2("soap_wsse_fault", "fault=%s", code?code:"", "detail=%s", detail?detail:"");
+  /* remove incorrect or incomplete Security header */
+  soap_wsse_delete_Security(soap);
+  /* populate the SOAP Fault as per WS-Security spec */
+  switch (fault)
+  { case wsse2__UnsupportedSecurityToken:
+      return soap_sender_fault_subcode(soap, code, "An unsupported token was provided", detail);
+    case wsse2__UnsupportedAlgorithm:
+      return soap_sender_fault_subcode(soap, code, "An unsupported signature or encryption algorithm was used", detail);
+    case wsse2__InvalidSecurity:
+      return soap_sender_fault_subcode(soap, code, "An error was discovered processing the <wsse:Security> header", detail);
+    case wsse2__InvalidSecurityToken:
+      return soap_sender_fault_subcode(soap, code, "An invalid security token was provided", detail);
+    case wsse2__FailedAuthentication:
+      return soap_sender_fault_subcode(soap, code, "The security token could not be authenticated or authorized", detail);
+    case wsse2__FailedCheck:
+      return soap_sender_fault_subcode(soap, code, "The signature or decryption was invalid", detail);
+    case wsse2__SecurityTokenUnavailable:
+      return soap_sender_fault_subcode(soap, code, "Referenced security token could not be retrieved", detail);
+  }
+  return SOAP_FAULT;
+}
+
+/******************************************************************************\
+ *
+ * Digest authentication session management
+ *
+\******************************************************************************/
+
+/**
+@fn static int soap_wsse_session_verify(struct soap *soap, const char hash[SOAP_SMD_SHA1_SIZE], const char *created, const char *nonce)
+@brief Verifies and updates the digest, nonce, and creation time against the digest authentication session database to prevent replay attacks.
+@param soap context
+@param[in] hash binary digest value of PasswordDigest
+@param[in] created string
+@param[in] nonce string (base64)
+@return SOAP_OK or SOAP_FAULT
+*/
+static int
+soap_wsse_session_verify(struct soap *soap, const char hash[SOAP_SMD_SHA1_SIZE], const char *created, const char *nonce)
+{ struct soap_wsse_session *session;
+  time_t expired, now = time(NULL);
+  DBGFUN("soap_wsse_session_verify");
+  soap_s2dateTime(soap, created, &expired);
+  /* creation time in the future? */
+  if (expired > now + SOAP_WSSE_CLKSKEW)
+    return soap_wsse_fault(soap, wsse2__FailedAuthentication, "Authorization request in future");
+  expired += SOAP_WSSE_NONCETIME;
+  /* expired? */
+  if (expired <= now)
+    return soap_wsse_fault(soap, wsse2__FailedAuthentication, "Authentication expired");
+  /* purge expired messages, but don't do this all the time to improve efficiency */
+  if (now % 10 == 0)
+    soap_wsse_session_cleanup(soap);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Verifying session nonce=%s\n", nonce));
+  /* enter mutex to check and update session */
+  MUTEX_LOCK(soap_wsse_session_lock);
+  for (session = soap_wsse_session; session; session = session->next)
+  { if (!memcmp(session->hash, hash, SOAP_SMD_SHA1_SIZE) && !strcmp(session->nonce, nonce))
+      break;
+  }
+  /* if not found, allocate new session data */
+  if (!session)
+  { session = (struct soap_wsse_session*)malloc(sizeof(struct soap_wsse_session) + strlen(nonce));
+    if (session)
+    { session->next = soap_wsse_session;
+      session->expired = expired;
+      memcpy(session->hash, hash, SOAP_SMD_SHA1_SIZE);
+      strcpy(session->nonce, nonce);
+      soap_wsse_session = session;
+    }
+    session = NULL;
+  }
+  /* exit mutex */
+  MUTEX_UNLOCK(soap_wsse_session_lock);
+  /* if replay attack, return non-descript failure */
+  if (session)
+    return soap_wsse_fault(soap, wsse2__FailedAuthentication, NULL);
+  return SOAP_OK;
+}
+
+/**
+@fn static void soap_wsse_session_cleanup(struct soap *soap)
+@brief Removes expired authentication data from the digest authentication session database.
+@param soap context
+*/
+static void
+soap_wsse_session_cleanup(struct soap *soap)
+{ struct soap_wsse_session **session;
+  time_t now = time(NULL);
+  DBGFUN("soap_wsse_session_cleanup");
+  /* enter mutex to purge expired session data */
+  MUTEX_LOCK(soap_wsse_session_lock);
+  session = &soap_wsse_session;
+  while (*session)
+  { if ((*session)->expired < now)
+    { struct soap_wsse_session *p = *session;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deleting session nonce=%s\n", p->nonce));
+      *session = p->next;
+      free(p);
+    }
+    else
+      session = &(*session)->next;
+  }
+  /* exit mutex */
+  MUTEX_UNLOCK(soap_wsse_session_lock);
+}
+
+/******************************************************************************\
+ *
+ * Calculate SHA1(created, nonce, password) digest
+ *
+\******************************************************************************/
+
+/**
+@fn static void calc_digest(struct soap *soap, const char *created, const char *nonce, int noncelen, const char *password, char hash[SOAP_SMD_SHA1_SIZE])
+@brief Calculates digest value SHA1(created, nonce, password)
+@param soap context
+@param[in] created string (XSD dateTime format)
+@param[in] nonce value
+@param[in] noncelen length of nonce value
+@param[in] password string
+@param[out] hash SHA1 digest
+*/
+static void
+calc_digest(struct soap *soap, const char *created, const char *nonce, int noncelen, const char *password, char hash[SOAP_SMD_SHA1_SIZE])
+{ struct soap_smd_data context;
+  /* use smdevp engine */
+  soap_smd_init(soap, &context, SOAP_SMD_DGST_SHA1, NULL, 0);
+  soap_smd_update(soap, &context, created, strlen(created));
+  soap_smd_update(soap, &context, nonce, noncelen);
+  soap_smd_update(soap, &context, password, strlen(password));
+  soap_smd_final(soap, &context, hash, NULL);
+}
+
+/******************************************************************************\
+ *
+ * Calculate randomized hex nonce
+ *
+\******************************************************************************/
+
+/**
+@fn static void calc_nonce(struct soap *soap, char nonce[SOAP_WSSE_NONCELEN])
+@brief Calculates randomized nonce
+@param soap context
+@param[out] nonce value
+*/
+static void
+calc_nonce(struct soap *soap, char nonce[SOAP_WSSE_NONCELEN])
+{ static short count = 0xCA53;
+  char buf[SOAP_WSSE_NONCELEN + 1];
+  /* TODO: nonce is converted to base64 so we could use raw binary instead of hex */
+  sprintf(buf, "%8.8x%4.4hx%8.8x", (int)time(NULL), count++, soap_random);
+  memcpy(nonce, buf, SOAP_WSSE_NONCELEN);
+}
+
+/******************************************************************************\
+ *
+ * Plugin registry functions
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_wsse(struct soap *soap, struct soap_plugin *p, void *arg)
+@brief Plugin registry function, used with soap_register_plugin.
+@param soap context
+@param[in,out] p plugin created in registry
+@param[in] arg passed from soap_register_plugin_arg
+@return SOAP_OK
+*/
+int
+soap_wsse(struct soap *soap, struct soap_plugin *p, void *arg)
+{ DBGFUN("soap_wsse");
+  p->id = soap_wsse_id;
+  p->data = (void*)SOAP_MALLOC(soap, sizeof(struct soap_wsse_data));
+  p->fcopy = soap_wsse_copy;
+  p->fdelete = soap_wsse_delete;
+  if (p->data)
+  { if (soap_wsse_init(soap, (struct soap_wsse_data*)p->data))
+    { SOAP_FREE(soap, p->data);
+      return SOAP_EOM;
+    }
+  }
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_wsse_init(struct soap *soap, struct soap_wsse_data *data)
+@brief Initializes plugin data.
+@param soap context
+@param[in,out] data plugin data
+@return SOAP_OK
+*/
+static int
+soap_wsse_init(struct soap *soap, struct soap_wsse_data *data)
+{ static int done = 0;
+  DBGFUN("soap_wsse_init");
+#ifdef WITH_OPENSSL
+  /* OpenSSL: make sure we have the digest algorithms */
+  if (!done)
+  { done = 1;
+    OpenSSL_add_all_digests();
+    OpenSSL_add_all_algorithms();
+  }
+#endif
+  data->sign_alg = SOAP_SMD_NONE;
+  data->sign_key = NULL;
+  data->sign_keylen = 0;
+  data->vrfy_alg = SOAP_SMD_NONE;
+  data->vrfy_key = NULL;
+  data->vrfy_keylen = 0;
+  data->digest = NULL;
+  data->fprepareinit = NULL;
+  data->fpreparesend = NULL;
+  data->fpreparefinal = NULL;
+  data->fdisconnect = NULL;
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_wsse_copy(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src)
+@brief Copies plugin data to localize plugin data for threads.
+@param soap context
+@param[out] dst target plugin
+@param[in] src source plugin
+@return SOAP_OK
+*/
+static int
+soap_wsse_copy(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src)
+{ DBGFUN("soap_wsse_copy");
+  *dst = *src;
+  dst->data = (void*)SOAP_MALLOC(soap, sizeof(struct soap_wsse_data));
+  soap_wsse_init(soap, (struct soap_wsse_data*)dst->data);
+  return SOAP_OK;
+}
+
+/**
+@fn void soap_wsse_delete(struct soap *soap, struct soap_plugin *p)
+@brief Deletes plugin data.
+@param soap context
+@param[in,out] p plugin
+@return SOAP_OK
+*/
+static void
+soap_wsse_delete(struct soap *soap, struct soap_plugin *p)
+{ struct soap_wsse_data *data = (struct soap_wsse_data*)soap_lookup_plugin(soap, soap_wsse_id);
+  DBGFUN("soap_wsse_delete");
+  if (data)
+  { soap_wsse_preparecleanup(soap, data);
+    SOAP_FREE(soap, data);
+  }
+}
+
+/******************************************************************************\
+ *
+ * Plugin-specific functions
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_wsse_sign(struct soap *soap, int alg, const void *key, int keylen)
+@brief Uses the wsse plugin to sign all wsu:Id attributed elements.
+@param soap context
+@param[in] alg is the signature algorithm SOAP_SMD_HMAC_SHA1, SOAP_SMD_SIGN_DSA_SHA1, or SOAP_SMD_SIGN_RSA_SHA1
+@param[in] key is the HMAC secret key or DSA/RSA private EVP_PKEY
+@param[in] keylen is the HMAC key length
+@return SOAP_OK or fault
+
+This function does not actually sign the message, but initiates the plugin's
+signature algorithm to sign the message upon message transfer.
+*/
+int
+soap_wsse_sign(struct soap *soap, int alg, const void *key, int keylen)
+{ struct soap_wsse_digest *digest, *next;
+  struct soap_wsse_data *data = (struct soap_wsse_data*)soap_lookup_plugin(soap, soap_wsse_id);
+  DBGFUN1("soap_wsse_sign", "alg=%d", alg);
+  if (!data)
+    return soap_set_receiver_error(soap, "soap_wsse_sign", "Plugin not registered", SOAP_PLUGIN_ERROR);
+  if (!alg || !key)
+    return soap_wsse_fault(soap, wsse2__InvalidSecurity, "Invalid signature algorithm or key");
+  /* store alg and key in plugin data */
+  data->sign_alg = alg;
+  data->sign_key = key;
+  data->sign_keylen = keylen;
+  /* save and set the plugin's callbacks to preprocess outbound messages */
+  if (soap->fprepareinit != soap_wsse_prepareinit)
+  { data->fprepareinit = soap->fprepareinit;
+    soap->fprepareinit = soap_wsse_prepareinit;
+  }
+  if (soap->fpreparesend != soap_wsse_preparesend)
+  { data->fpreparesend = soap->fpreparesend;
+    data->fpreparefinal = soap->fpreparefinal;
+  }
+  if (soap->fpreparefinal != soap_wsse_preparefinal)
+  { soap->fpreparesend = soap_wsse_preparesend;
+    soap->fpreparefinal = soap_wsse_preparefinal;
+  }
+  /* cleanup the digest data */
+  for (digest = data->digest; digest; digest = next)
+  { next = digest->next;
+    SOAP_FREE(soap, digest);
+  }
+  data->digest = NULL;
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_wsse_sign_body(struct soap *soap, int alg, const void *key, int keylen)
+@brief Uses the wsse plugin to sign all wsu:Id attributed elements, including the SOAP Body (by adding a wsu:Id="Body" attribute).
+@param soap context
+@param[in] alg is the signature algorithm SOAP_SMD_HMAC_SHA1, SOAP_SMD_SIGN_DSA_SHA1, or SOAP_SMD_SIGN_RSA_SHA1
+@param[in] key is the HMAC secret key or DSA/RSA private EVP_PKEY
+@param[in] keylen is the HMAC key length
+@return SOAP_OK
+
+This function does not actually sign the message, but initiates the plugin's
+signature algorithm to sign the message upon message transfer.
+*/
+int
+soap_wsse_sign_body(struct soap *soap, int alg, const void *key, int keylen)
+{ int err;
+  DBGFUN1("soap_wsse_sign_body", "alg=%d", alg);
+  soap->omode |= SOAP_XML_SEC;
+  err = soap_wsse_sign(soap, alg, key, keylen);
+  return err;
+}
+
+/**
+@fn int soap_wsse_verify_init(struct soap *soap)
+@brief Uses the wsse plugin to initiate the verification of the signature and SignedInfo Reference digests.
+@param soap context
+@return SOAP_OK
+
+This function does not actually verify the message, but initiates the plugin's
+data to store the message in a DOM to verify the signature. The signature and
+digests in the DOM must be verified manually.
+*/
+int
+soap_wsse_verify_init(struct soap *soap)
+{ DBGFUN("soap_wsse_verify_init");
+  /* deserialize inbound message to DOM */
+  soap->imode |= SOAP_XML_DOM;
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_wsse_verify_auto(struct soap *soap, int alg, const void *key, size_t keylen)
+@brief Uses the wsse plugin to initiate the automatic verification of the signature and SignedInfo Reference digests.
+@param soap context
+@param[in] alg to verify signature if signature has no secret or public key, use SOAP_SMD_NONE to omit
+@param[in] key is HMAC key or EVP_PKEY
+@param[in] keylen is HMAC key length
+@return SOAP_OK
+
+This function does not actually verify the message, but initiates the plugin's
+algorithm to store the message in a DOM to automatically verify the signature
+and digestes. If the message does not contain a key to verify the signature,
+the alg, key, and keylen parameters are used. It is important that the X509
+certificate used to verify the signature is verified, which requires
+soap->cafile and/or soap->capath to be set.
+*/
+int
+soap_wsse_verify_auto(struct soap *soap, int alg, const void *key, size_t keylen)
+{ struct soap_wsse_data *data = (struct soap_wsse_data*)soap_lookup_plugin(soap, soap_wsse_id);
+  DBGFUN("soap_wsse_verify_auto");
+  if (!data)
+    return soap_set_receiver_error(soap, "soap_wsse_verify_auto", "Plugin not registered", SOAP_PLUGIN_ERROR);
+  data->vrfy_alg = alg;
+  data->vrfy_key = key;
+  data->vrfy_keylen = keylen;
+  if (soap->fdisconnect != soap_wsse_disconnect)
+  { data->fdisconnect = soap->fdisconnect;
+    soap->fdisconnect = soap_wsse_disconnect; 
+  }
+  return soap_wsse_verify_init(soap);
+}
+
+/**
+@fn int soap_wsse_verify_done(struct soap *soap)
+@brief Terminates the automatic verification of signatures.
+@param soap context
+@return SOAP_OK
+*/
+int
+soap_wsse_verify_done(struct soap *soap)
+{ struct soap_wsse_data *data = (struct soap_wsse_data*)soap_lookup_plugin(soap, soap_wsse_id);
+  DBGFUN("soap_wsse_verify_done");
+  if (!data)
+    return soap_set_receiver_error(soap, "soap_wsse_verify_done", "Plugin not registered", SOAP_PLUGIN_ERROR);
+  soap->imode &= ~SOAP_XML_DOM;
+  if (soap->fdisconnect == soap_wsse_disconnect)
+    soap->fdisconnect = data->fdisconnect;
+  return SOAP_OK;
+}
+
+/******************************************************************************\
+ *
+ * Callbacks registered by plugin
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_wsse_prepareinit(struct soap *soap)
+@brief Initiates message preprocessing with gSOAP engine's prepareinit callback.
+@param soap context
+@return SOAP_OK or fault
+
+This callback is invoked to analyze a message before transmission.
+*/
+static int
+soap_wsse_prepareinit(struct soap *soap)
+{ struct soap_wsse_data *data = (struct soap_wsse_data*)soap_lookup_plugin(soap, soap_wsse_id);
+  DBGFUN("soap_wsse_prepareinit");
+  if (!data)
+    return SOAP_PLUGIN_ERROR;
+  if (data->fprepareinit)
+    return data->fprepareinit(soap);
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_wsse_preparesend(struct soap *soap, const char *buf, size_t len)
+@brief Takes a piece of the XML message (tokenized) to compute digest.
+@param soap context
+@param[in] buf string (XML "tokenized") to be send
+@param[in] len buf length
+@return SOAP_OK or fault
+
+This callback is invoked to analyze a message (usually during the HTTP content
+length phase).  Note: nested elements with wsu:Id attributes cannot be
+individually signed in this release.
+*/
+static int
+soap_wsse_preparesend(struct soap *soap, const char *buf, size_t len)
+{ struct soap_wsse_data *data = (struct soap_wsse_data*)soap_lookup_plugin(soap, soap_wsse_id);
+  DBGFUN("soap_wsse_preparesend");
+  if (!data)
+    return SOAP_PLUGIN_ERROR;
+  /* the gSOAP engine signals the start of a wsu:Id element */
+  if (soap->part == SOAP_BEGIN_SECURITY)
+  { /* found element with wsu:Id and change engine state */
+    soap->part = SOAP_IN_SECURITY;
+    if (data->digest && data->digest->level)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Nested hashing for signature not possible, wsu:Id='%s' ignored\n", soap->id));
+    }
+    else
+    { /* initialize smdevp engine */
+      struct soap_wsse_digest *digest;
+      digest = (struct soap_wsse_digest*)SOAP_MALLOC(soap, sizeof(struct soap_wsse_digest) + strlen(soap->id) + 1);
+      digest->next = data->digest;
+      digest->level = soap->level;
+      soap_smd_init(soap, &digest->smd, SOAP_SMD_DGST_SHA1, NULL, 0);
+      memset(digest->hash, 0, sizeof(digest->hash));
+      digest->id[0] = '#';
+      strcpy(digest->id + 1, soap->id);
+      data->digest = digest;
+      /* omit indent for indented XML (next time around, we will catch '<') */
+      if (*buf != '<')
+        goto end;
+    }
+  }
+  if (soap->part == SOAP_IN_SECURITY)
+  { /* update smdevp engine */
+    if (data->digest)
+    { soap_smd_update(soap, &data->digest->smd, buf, len);
+      if (soap->level < data->digest->level)
+      { soap->part = SOAP_END_SECURITY;
+	soap_smd_final(soap, &data->digest->smd, data->digest->hash, NULL);
+        data->digest->level = 0;
+      }
+    }
+  }
+end:
+  if (data->fpreparesend)
+    return data->fpreparesend(soap, buf, len);
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_wsse_preparefinal(struct soap *soap)
+@brief Collects the digests of all the wsu:Id elements and populates the SignedInfo.
+@param soap context
+@return SOAP_OK or fault
+
+This callback is invoked just before the message is send.
+*/
+static int
+soap_wsse_preparefinal(struct soap *soap)
+{ struct soap_wsse_data *data = (struct soap_wsse_data*)soap_lookup_plugin(soap, soap_wsse_id);
+  DBGFUN("soap_wsse_preparefinal");
+  if (!data)
+    return SOAP_PLUGIN_ERROR;
+  /* no need to keep looking for wsu:Id */
+  soap->omode |= SOAP_XML_SEC;
+  if (data->digest)
+  { ds__SignatureType *signature = soap_wsse_Signature(soap);
+    struct soap_wsse_digest *digest;
+    const char *transform;
+    int signature_added = 0;
+    /* if message is canonicalized populate transform element accordingly */
+    if (soap->mode & SOAP_XML_CANONICAL)
+      transform = c14n_URI;
+    else
+      transform = NULL;
+    /* to increase the message length counter we need to emit the Signature,
+       SignedInfo and SignatureValue elements. However, this does not work if
+       we already populated the wsse:Signature with SignedInfo! */
+    if (!signature)
+    { signature = soap_wsse_add_Signature(soap);
+      signature_added = 1;
+    }
+    else if (signature->SignedInfo)
+      return soap_set_receiver_error(soap, "wsse error", "Cannot use soap_wsse_sign with populated SignedInfo", SOAP_SSL_ERROR);
+    /* add the SignedInfo/Reference elements for each digest */
+    for (digest = data->digest; digest; digest = digest->next)
+      soap_wsse_add_SignedInfo_Reference(soap, digest->id, transform, "", digest->hash);
+    /* then compute the signature and add it */
+    soap_wsse_add_SignatureValue(soap, data->sign_alg, data->sign_key, data->sign_keylen);
+    /* the code below ensures we increase the message length counter */
+    if (soap->mode & SOAP_XML_CANONICAL)
+      soap->ns = 0; /* need namespaces for canonicalization */
+    if (signature_added)
+    { soap->level = 3; /* indent level for XML Signature */
+      soap_out_ds__SignatureType(soap, "ds:Signature", 0, signature, NULL);
+    }
+    else
+    { soap->level = 4; /* indent level for XML SignedInfo */
+      soap->c14nexclude = "ds"; /* don't add xmlns:ds */
+      soap_out_ds__SignedInfoType(soap, "ds:SignedInfo", 0, signature->SignedInfo, NULL);
+      soap_outstring(soap, "ds:SignatureValue", 0, &signature->SignatureValue, NULL, 0);
+      soap->c14nexclude = NULL;
+    }
+    if (soap->mode & SOAP_XML_INDENT)
+      soap->count += soap->level + 1; /* add \n+indent */
+  }
+  /* Reset the callbacks and cleanup digests */
+  soap_wsse_preparecleanup(soap, data);
+  if (soap->fpreparefinal)
+    return soap->fpreparefinal(soap);
+  return SOAP_OK;
+}
+
+/**
+@fn void soap_wsse_preparecleanup(struct soap *soap, struct soap_wsse_data *data)
+@brief Restores engine state.
+@param soap context
+@param[in,out] data plugin data
+*/
+static void
+soap_wsse_preparecleanup(struct soap *soap, struct soap_wsse_data *data)
+{ struct soap_wsse_digest *digest, *next;
+  DBGFUN("soap_wsse_preparecleanup");
+  data->sign_alg = SOAP_SMD_NONE;
+  data->sign_key = NULL;
+  data->sign_keylen = 0;
+  if (soap->fprepareinit == soap_wsse_prepareinit)
+    soap->fprepareinit = data->fprepareinit;
+  if (soap->fpreparesend == soap_wsse_preparesend)
+    soap->fpreparesend = data->fpreparesend;
+  if (soap->fpreparefinal == soap_wsse_preparefinal)
+    soap->fpreparefinal = data->fpreparefinal;
+  data->fprepareinit = NULL;
+  data->fpreparesend = NULL;
+  data->fpreparefinal = NULL;
+  for (digest = data->digest; digest; digest = next)
+  { next = digest->next;
+    SOAP_FREE(soap, digest);
+  }
+  data->digest = NULL;
+}
+
+/**
+@fn int soap_wsse_disconnect(struct soap *soap)
+@brief Verify signature and SignedInfo digests initiated with soap_wsse_verify_auto.
+@param soap context
+@return SOAP_OK or fault
+@see soap_wsse_verify_auto
+
+This callback is invoked just after a message was received.
+*/
+static int
+soap_wsse_disconnect(struct soap *soap)
+{ struct soap_wsse_data *data = (struct soap_wsse_data*)soap_lookup_plugin(soap, soap_wsse_id);
+  ds__SignedInfoType *signedInfo = soap_wsse_SignedInfo(soap);
+  soap->imode &= ~SOAP_XML_DOM;
+  DBGFUN("soap_wsse_disconnect");
+  if (!data)
+    return SOAP_PLUGIN_ERROR;
+  if (soap->fdisconnect == soap_wsse_disconnect)
+    soap->fdisconnect = data->fdisconnect;
+  if (signedInfo)
+  { int alg, keylen;
+    const void *key = NULL;
+    /* determine which signature algorithm was used */
+    if (soap_wsse_get_SignedInfo_SignatureMethod(soap, &alg))
+      return soap->error;
+    /* for HMAC-SHA1, the secret key might be stored in the KeyIdentifier */
+    if (alg == SOAP_SMD_HMAC_SHA1)
+    { const char *valueType = soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifierValueType(soap);
+      /* if in the KeyIdentifier, retrieve it */
+      if (valueType && !strcmp(valueType, ds_hmac_sha1URI))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Using HMAC key from KeyIdentifier to verify signature\n"));
+        key = soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifier(soap, &keylen);
+      }
+      else if (alg == data->vrfy_alg)
+      { /* get the HMAC secret key from the plugin */
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Using HMAC key from plugin to verify signature\n"));
+        key = data->vrfy_key;
+        keylen = data->vrfy_keylen;
+      }
+    }
+    else
+    { X509 *cert;
+      /* get the certificate from the KeyInfo reference */
+      cert = soap_wsse_get_KeyInfo_SecurityTokenReferenceX509(soap);
+      /* obtain the public key from the cert */
+      if (cert)
+        key = X509_get_pubkey(cert);
+      else if (alg == data->vrfy_alg)
+      { /* get the public key from the plugin */
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Using public key from plugin to verify signature\n"));
+        key = data->vrfy_key;
+        soap->error = SOAP_OK;
+      }
+    }
+    /* if still no key, return fault */
+    /* TODO: add user-extensible mechanism too look for key */
+    if (!key)
+      return soap_wsse_fault(soap, wsse2__SecurityTokenUnavailable, NULL);
+    /* verify SignedInfo with signature and check digests of local elements */
+    if (soap_wsse_verify_SignatureValue(soap, alg, key, keylen)
+     || soap_wsse_verify_SignedInfo(soap))
+      return soap->error;
+    data->vrfy_alg = SOAP_SMD_NONE;
+    if (soap->fdisconnect)
+      return soap->fdisconnect(soap);
+    return SOAP_OK;
+  }
+  return soap_wsse_fault(soap, wsse2__FailedCheck, NULL);
+}
diff --git a/plugin/wsse2api.h b/plugin/wsse2api.h
new file mode 100644
index 0000000..2931cc0
--- /dev/null
+++ b/plugin/wsse2api.h
@@ -0,0 +1,175 @@
+/*
+
+wsseapi.h
+
+WS-Security plugin
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "soapH.h"
+#include "smdevp.h"
+
+/** plugin identification for plugin registry */
+#define SOAP_WSSE_ID "SOAP-WSSE-0.9"
+
+/** plugin identification for plugin registry */
+extern const char soap_wsse_id[];
+
+/**
+@struct soap_wsse_data
+@brief wssepi plugin data
+
+The signature key (private) and verification key (public) are kept separate.
+*/
+struct soap_wsse_data
+{ int sign_alg;			/**< The digest or signature algorithm used */
+  const void *sign_key;		/**< EVP_PKEY or key string for HMAC */
+  int sign_keylen;		/**< HMAC key length */
+  int vrfy_alg;			/**< The signature verify algorithm used */
+  const void *vrfy_key;		/**< EVP_PKEY or key string for HMAC verify */
+  int vrfy_keylen;		/**< HMAC key length */
+  struct soap_wsse_digest *digest;	/**< List of ID-hash pairs */
+  int (*fprepareinit)(struct soap*);
+  int (*fpreparesend)(struct soap*, const char*, size_t);
+  int (*fpreparefinal)(struct soap*);
+  int (*fdisconnect)(struct soap*);
+};
+
+/**
+@struct soap_wsse_digest
+@brief Digest dictionary: linked list of ID-hash pairs
+
+The digest dictionary is populated by the soap_wsse_preparesend callback. The
+callback intercepts XML elements with wsu:Id attributes and computes the digest
+during the preprocessing of a message transmission. The 'level' field is used
+to determine when the end of an element is reached.
+*/
+struct soap_wsse_digest
+{ struct soap_wsse_digest *next;	/**< Next in list */
+  unsigned int level;			/**< XML parser depth level */
+  struct soap_smd_data smd;		/**< smdevp engine context */
+  unsigned char hash[SOAP_SMD_MAX_SIZE];/**< Digest hash value */
+  char id[1];				/**< String flows down the struct */
+};
+
+extern const char *wsse_PasswordTextURI;
+extern const char *wsse_PasswordDigestURI;
+extern const char *wsse_Base64BinaryURI;
+extern const char *wsse_X509v3URI;
+extern const char *wsse_X509v3SubjectKeyIdentifierURI;
+
+extern const char *ds_sha1URI;
+extern const char *ds_hmac_sha1URI;
+extern const char *ds_dsa_sha1URI;
+extern const char *ds_rsa_sha1URI;
+
+extern const char *ds_URI;
+extern const char *c14n_URI;
+extern const char *wsu_URI;
+
+struct _wsse2__Security* soap_wsse_add_Security(struct soap *soap);
+struct _wsse2__Security* soap_wsse_add_Security_actor(struct soap *soap, const char *actor);
+void soap_wsse_delete_Security(struct soap *soap);
+struct _wsse2__Security* soap_wsse_Security(struct soap *soap);
+
+struct ds__SignatureType* soap_wsse_add_Signature(struct soap *soap);
+void soap_wsse_delete_Signature(struct soap *soap);
+struct ds__SignatureType* soap_wsse_Signature(struct soap *soap);
+
+int soap_wsse_add_Timestamp(struct soap *soap, const char *id, time_t lifetime);
+struct _wsu__Timestamp *soap_wsse_Timestamp(struct soap *soap);
+int soap_wsse_verify_Timestamp(struct soap *soap);
+
+int soap_wsse_add_UsernameTokenText(struct soap *soap, const char *id, const char *username, const char *password);
+int soap_wsse_add_UsernameTokenDigest(struct soap *soap, const char *id, const char *username, const char *password);
+struct _wsse2__UsernameToken *soap_wsse_UsernameToken(struct soap *soap, const char *id);
+const char* soap_wsse_get_Username(struct soap *soap);
+int soap_wsse_verify_Password(struct soap *soap, const char *password);
+
+int soap_wsse_add_BinarySecurityToken(struct soap *soap, const char *id, const char *valueType, const unsigned char *data, int size);
+int soap_wsse_add_BinarySecurityTokenX509(struct soap *soap, const char *id, X509 *cert);
+int soap_wsse_add_BinarySecurityTokenPEM(struct soap *soap, const char *id, const char *filename);
+struct _wsse2__BinarySecurityToken *soap_wsse_BinarySecurityToken(struct soap *soap, const char *id);
+int soap_wsse_get_BinarySecurityToken(struct soap *soap, const char *id, char **valueType, unsigned char **data, int *size);
+X509 *soap_wsse_get_BinarySecurityTokenX509(struct soap *soap, const char *id);
+int soap_wsse_verify_X509(struct soap *soap, X509 *cert);
+
+struct ds__SignedInfoType *soap_wsse_add_SignedInfo(struct soap *soap);
+int soap_wsse_add_SignedInfo_Reference(struct soap *soap, const char *URI, const char *transform, const char *inclusiveNamespaces, const char *HA);
+int soap_wsse_add_SignedInfo_SignatureMethod(struct soap *soap, const char *method, int canonical);
+struct ds__SignedInfoType *soap_wsse_SignedInfo(struct soap *soap);
+int soap_wsse_get_SignedInfo_SignatureMethod(struct soap *soap, int *alg);
+
+int soap_wsse_add_SignatureValue(struct soap *soap, int alg, const void *key, int keylen);
+int soap_wsse_verify_SignatureValue(struct soap *soap, int alg, const void *key, int keylen);
+int soap_wsse_verify_SignedInfo(struct soap *soap);
+int soap_wsse_verify_digest(struct soap *soap, int alg, const char *id, unsigned char hash[SOAP_SMD_MAX_SIZE]);
+
+struct ds__KeyInfoType *soap_wsse_add_KeyInfo(struct soap *soap);
+struct ds__KeyInfoType *soap_wsse_KeyInfo(struct soap *soap);
+
+int soap_wsse_add_KeyInfo_KeyName(struct soap *soap, const char *name);
+const char *soap_wsse_get_KeyInfo_KeyName(struct soap *soap);
+
+int soap_wsse_add_KeyInfo_SecurityTokenReferenceURI(struct soap *soap, const char *URI, const char *valueType);
+int soap_wsse_add_KeyInfo_SecurityTokenReferenceX509(struct soap *soap, const char *URI);
+const char *soap_wsse_get_KeyInfo_SecurityTokenReferenceURI(struct soap *soap);
+X509 *soap_wsse_get_KeyInfo_SecurityTokenReferenceX509(struct soap *soap);
+
+int soap_wsse_add_KeyInfo_SecurityTokenReferenceKeyIdentifier(struct soap *soap, const char *id, const char *valueType, unsigned char *data, int size);
+const char *soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifierValueType(struct soap *soap);
+const unsigned char *soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifier(struct soap *soap, int *size);
+
+int soap_wsse_add_KeyInfo_SecurityTokenReferenceEmbedded(struct soap *soap, const char *id, const char *valueType);
+
+int soap_wsse_fault(struct soap *soap, enum wsse2__FaultcodeEnum fault, const char *detail);
+
+int soap_wsse(struct soap *soap, struct soap_plugin *p, void *arg);
+
+int soap_wsse_sign(struct soap *soap, int alg, const void *key, int keylen);
+int soap_wsse_sign_body(struct soap *soap, int alg, const void *key, int keylen);
+int soap_wsse_verify_init(struct soap *soap);
+int soap_wsse_verify_auto(struct soap *soap, int alg, const void *key, size_t keylen);
+int soap_wsse_verify_done(struct soap *soap);
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_default_xsd__anyType(struct soap*, struct soap_dom_element *node);
+SOAP_FMAC1 int SOAP_FMAC2 soap_out_xsd__anyType(struct soap *soap, const char *tag, int id, const struct soap_dom_element *node, const char *type);
+SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_in_xsd__anyType(struct soap *soap, const char *tag, struct soap_dom_element *node, const char *type);
diff --git a/plugin/wsseapi.c b/plugin/wsseapi.c
new file mode 100644
index 0000000..020c488
--- /dev/null
+++ b/plugin/wsseapi.c
@@ -0,0 +1,2667 @@
+/*
+
+wsseapi.c
+
+WS-Security plugin
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+/**
+
+@mainpage
+
+- @ref wsse documents the wsse plugin for WS-Security 1.0 support.
+- @ref smdevp documents the smdevp engine used by the wsse plugin.
+
+*/
+
+/**
+
+@page wsse The wsse plugin
+
+@section wsse_5 Security Header
+
+The material in this section relates to the WS-Security specification section 5.
+
+To use the wsse plugin:
+-# Run wsdl2h -t typemap.dat on a WSDL of a service that requires WS-Security
+   headers. The typemap.dat file is used to recognize and translate Security
+   header blocks.
+-# Run soapcpp2 on the header file produced by wsdl2h.
+-# (Re-)compile stdsoap2.c/pp, dom.c/pp, smdevp.c, wsseapi.c and the generated
+   source files with the -DWITH_DOM and -DWITH_OPENSSL compile flags set. The
+   smdevp.c and wssapi.c files are located in the 'plugin' directory.
+-# Use the wsse plugin API functions described below to add and verify
+   Security headers.
+
+An example wsse client/server application can be found in samples/wsse.
+
+The Security header block was generated from the WS-Security schema with the
+wsdl2h tool and WS/WS-typemap.dat:
+
+@code
+    $ wsdl2h -cegxy -o wsse.h -t WS/WS-typemap.dat WS/wsse.xsd
+@endcode
+
+The same process was used to generate the header file ds.h from the XML digital
+signatures core schema.
+
+The import/wsse.h file has the following definition for the Security header
+block:
+
+@code
+typedef struct _wsse__Security
+{       struct _wsu__Timestamp*                 wsu__Timestamp;
+        struct _wsse__UsernameToken*            UsernameToken;
+        struct _wsse__BinarySecurityToken*      BinarySecurityToken;
+        struct ds__SignatureType*               ds__Signature;
+        @char*                                  SOAP_ENV__actor;
+        @char*                                  SOAP_ENV__role;
+} _wsse__Security;
+@endcode
+
+To add an empty Security header block to the SOAP header, use:
+
+@code
+    soap_wsse_add_Security(soap);
+@endcode
+
+To delete a Security header, use:
+
+@code
+    soap_wsse_delete_Security(soap);
+@endcode
+
+Adding an empty Security header block is not very useful. We will mainly make
+use of the higher-level functions of the wsse plugin to populate and verify
+Security header content.
+
+Note: The soap context includes an actor value soap.actor that is populated and
+rendered as the SOAP-ENV:actor (SOAP 1.1) or SOAP-ENV:role (SOAP 1.2) attribute
+in XML within the generic SOAP Header. The attribute is optional, but should be
+used to target a recipient such as an intermediate node to process the SOAP
+header.  In contrast, actor or role attributes within Security header blocks
+target specific recipients to process the Security header block. The gSOAP
+implementation does not automate this feature and application should set and
+check the actor/role attribute when necessary. In addition, the current
+implementation supports the inclusion of a single Security header block in the
+SOAP header.
+
+To populate the SOAP-ENV:actor or SOAP-ENV:role attribute within the Security
+header, use:
+
+@code
+    soap_wsse_add_Security_actor(soap, "recipient");
+@endcode
+
+To obtain the actor or role value (e.g. after receiving a message), use:
+
+@code
+    _wsse__Security *security = soap_wsse_Security(soap);
+    if (security)
+    { ... = security->SOAP_ENV__actor; // SOAP 1.1
+      ... = security->SOAP_ENV__role;  // SOAP 1.2
+@endcode
+
+The SOAP-ENV:mustUnderstand attribute is automatically added and checked by the
+gSOAP engine. A gSOAP application compiled without Security support will reject
+Security headers.
+
+Security header blocks are attached to the soap context, which means that the
+information will be automatically kept to support multiple invocations.
+
+@section wsse_6 Security Tokens
+
+The material in this section relates to the WS-Security specification section 6.
+
+@subsection wsse_6_2 User Name Token
+
+To add a user name token to the Security header block, use:
+
+@code
+    soap_wsse_add_UsernameTokenText(soap, "Id", "username", NULL);
+@endcode
+
+The Id value is optional. When non-NULL the user name token is included in the
+digital signature to protect its integrity. It is common for the wsse plugin
+functions to accept such Ids, which are serialized as wsu:Id identifiers for
+cross-referencing XML elements. The signature engine of the wsse plugin is
+designed to automatically sign all wsu:Id attributed elements to simplify the
+code you need to write to implement the signing process.
+
+To add a user name token with clear text password, use:
+
+@code
+    soap_wsse_add_UsernameTokenText(soap, "Id", "username", "password");
+@endcode
+
+It is strongly recommended to use @ref soap_wsse_add_UsernameTokenText only in
+combination with HTTPS encrypted transmission or not at all. A better
+alternative is to use password digests. With password digest authentication,
+the digest value of a password (with message creation time and a random nonce)
+is compared on both sides, thus eliminating the need to exchange a password
+over the wire.
+
+To add a user name token with password digest, use:
+
+@code
+    soap_wsse_add_UsernameTokenDigest(soap, "Id", "username", "password");
+@endcode
+
+Although the password string is passed to this function, it is not rendered in
+XML or stored in a message log. It has been argued that this approach adopted
+by the WS-Security protocol is still vulnerable since the application retrieves
+the password in text form requiring a database to store passwords in clear
+text. However, a digest algorithm can be used to hash the passwords and store
+their digests instead, which eliminates the need to store clear-text passwords.
+Note that this is a common approach adopted by Unix for decades.
+
+By setting the Id value to a unique string, the user name token is also
+digitally signed by the signature engine further preventing tampering with its
+value.
+
+You must use @ref soap_wsse_add_UsernameTokenDigest for each message exchange
+to refresh the password digest even when the user name and password are not
+changed. Otherwise, the receiver might flag the message as a replay attack.
+
+Clear-text passwords and password digests are verified with
+@ref soap_wsse_verify_Password. To verify a password at the receiving side to
+authorize a request (e.g. within a Web service operation), use:
+
+@code
+    int ns__myMethod(struct soap *soap, ...)
+    { const char *username = soap_wsse_get_Username(soap);
+      const char *password;
+      if (!username)
+        return soap->error; // no username: return FailedAuthentication
+      password = ...; // lookup password of username
+      if (soap_wsse_verify_Password(soap, password))
+        return soap->error; // password verification failed: return FailedAuthentication
+      ... // process request
+      return SOAP_OK;
+    }
+@endcode
+
+Note that the @ref soap_wsse_get_Username functions sets the
+wsse:FailedAuthentication fault. It is common for the wsse plugin functions to
+return SOAP_OK or a wsse fault that should be passed to the sender by returning
+soap->error from service operations. The fault is displayed with the @ref
+soap_print_fault function.
+
+Password digest authentication prevents message replay attacks. The wsse plugin
+keeps a database of password digests to thwart replay attacks. This is the
+only part in the plugin code that requires mutex provided by threads.h.  Of
+course, this only works correctly if the server is persistent, such as a
+stand-alone service. Note that CGI-based services do not keep state. Machine
+clocks must be synchronized and clock skew should not exceed @ref
+SOAP_WSSE_CLKSKEW at the server side.
+
+@subsection wsse_6_3 Binary Security Tokens
+
+X509 certificates are commonly included in Security header blocks as binary
+security tokens. A certificate is used to verify the digital signature of a
+digitally signed message using the public key embedded within the certificate.
+The certificate itself is signed by a certificate authority (CA) that vouches
+for the authenticity of the certificate, i.e. to prove the identify of the
+message originator. This verification process is important, because digital
+signatures are useless without verification: an attacker could simply replace
+the message, sign it, and replace the certificate.
+
+Certificates are automatically verified by the wsse plugin signature engine
+when received and accessed, which means that the certificates of the CAs must
+be made accessible to the wsse plugin as follows:
+
+@code
+    soap->cafile = "cacerts.pem";  // use this
+    soap->capath = "dir/to/certs"; // and/or point to CA certs
+    soap->crlfile = "revoked.pem"; // use CRL (optional)
+@endcode
+
+The @ref soap_wsse_verify_X509 function checks the validity of a certificate.
+The check is automatically performed. The check is also performed when
+retrieving the certificate from a Security header block, either automatically
+by the wsse plugin's signature verification engine or manually as follows:
+
+@code
+    X509 *cert = soap_wsse_get_BinarySecurityTokenX509(soap, "Id");
+@endcode
+
+where Id is the identification string of the binary security token or NULL.
+
+The verification is an expensive process that will be optimized in future
+releases by caching the certificate chain.
+
+To attach a binary security token stored in a PEM file to a Security header
+block for transmission, use:
+
+@code
+    soap_wsse_add_BinarySecurityTokenPEM(soap, NULL, "mycert.pem")
+@endcode
+
+A binary security token can be automatically signed by setting its Id
+attribute:
+
+@code
+    soap_wsse_add_BinarySecurityTokenPEM(soap, "X509Token", "mycert.pem")
+@endcode
+
+Repeatedly loading a certificate from a PEM file is inefficient. To reuse a
+certificate loaded from a PEM file for multiple invocations, use:
+
+@code
+    FILE *fd = fopen("mycert.pem", "r");
+    X509 *cert = PEM_read_X509(fd, NULL, NULL, NULL);
+    fclose(fd);
+    if (soap_wsse_add_BinarySecurityTokenX509(soap, "X509Token", cert))
+      ... // an error occurred
+@endcode
+
+Other types of binary security tokens can be added to the Security header block using:
+
+@code
+    soap_wsse_add_BinarySecurityToken(soap, "Id", "valueType", data, datalen);
+@endcode
+
+@section wsse_6_4 XML Tokens
+
+The use and processing rules for XML tokens such as SAML assertions is specific
+to an application.  The wsse plugin does not automate the use of XML tokens.
+The developer is encouraged to generate code for the SAML schema with wsdl2h
+and add the necessary assertions to the Security header block:
+
+@code
+typedef struct _wsse__Security
+{       struct _wsu__Timestamp*                 wsu__Timestamp;
+        struct _wsse__UsernameToken*            UsernameToken;
+        struct _wsse__BinarySecurityToken*      BinarySecurityToken;
+	struct _saml__Assertion*		saml__Assertion; // added
+        struct ds__SignatureType*               ds__Signature;
+        @char*                                  SOAP_ENV__actor;
+        @char*                                  SOAP_ENV__role;
+} _wsse__Security;
+@endcode
+
+Alternatively, a DOM can be used to store and retrieve XML tokens:
+
+@code
+#import "dom.h"
+typedef struct _wsse__Security
+{       struct _wsu__Timestamp*                 wsu__Timestamp;
+        struct _wsse__UsernameToken*            UsernameToken;
+        struct _wsse__BinarySecurityToken*      BinarySecurityToken;
+        struct ds__SignatureType*               ds__Signature;
+	int					__size;
+	xsd__anyType*				any;
+        @char*                                  SOAP_ENV__actor;
+        @char*                                  SOAP_ENV__role;
+} _wsse__Security;
+@endcode
+
+@section wsse_7 Token References
+
+The material in this section relates to the WS-Security specification section 7.
+
+To use a certificate for signature verification, add a direct security token
+reference URI for the token to the KeyInfo, for example:
+
+@code
+    soap_wsse_add_KeyInfo_SecurityTokenReferenceURI(soap, "URI", "valueType");
+@endcode
+
+and:
+
+@code
+    soap_wsse_add_KeyInfo_SecurityTokenReferenceX509(soap, "URI");
+@endcode
+
+For X509 certificates we use this to add a binary security token with the
+certificate and a reference to the local token:
+
+@code
+    if (soap_wsse_add_BinarySecurityTokenX509(soap, "X509Token", cert)
+     || soap_wsse_add_KeyInfo_SecurityTokenReferenceX509(soap, "#X509Token"))
+      ... // an error occurred
+@endcode
+
+This follows the recommended practice to place Security token references in
+the KeyInfo element of a Signature. The KeyInfo is used to verify the validity
+of a signature value.
+
+Key identifiers can be used as well:
+
+@code
+    soap_wsse_add_KeyInfo_SecurityTokenReferenceKeyIdentifier(soap, "Id", "valueType", data, datalen);
+@endcode
+
+Embedded references are added with:
+
+@code
+    soap_wsse_add_KeyInfo_SecurityTokenReferenceEmbedded(soap, "Id", "valueType");
+@endcode
+
+TODO item: full support for embedded reference is currently under construction.
+
+The use of key names is not recommended, but in case they are required they can
+be added with:
+
+@code
+    soap_wsse_add_KeyInfo_KeyName(soap, "name");
+@endcode
+
+@section wsse_8 Signatures
+
+The material in this section relates to the WS-Security specification section 8.
+
+The wsse plugin must be registered to sign and verify messages:
+
+@code
+    soap_register_plugin(soap, soap_wsse);
+@endcode
+
+XML signatures are usually computed over normalized XML (to ensure the XML
+processors of intermediate nodes can accurately reproduce the XML). To this
+end, the exclusive canonical XML standard (exc-c14n) is required, which is set
+using the SOAP_XML_CANONICAL flag:
+
+@code
+    struct soap *soap = soap_new1(SOAP_XML_CANONICAL);
+    soap_register_plugin(soap, soap_wsse);
+@endcode
+
+If you prefer XML indentation, use:
+
+@code
+    struct soap *soap = soap_new1(SOAP_XML_CANONICAL | SOAP_XML_INDENT);
+    soap_register_plugin(soap, soap_wsse);
+@endcode
+
+Next, we decide which signature algorithm is appropriate to use:
+- HMAC-SHA1 uses a secret key (also known as a shared key in symmetric
+  cryptography) to sign the SHA1 digest of the SignedInfo element.
+- DSA-SHA1 uses a DSA private key to sign the SHA1 digest of the SignedInfo
+  element.
+- RSA-SHA1 uses a RSA private key to sign the SHA1 digest of the SignedInfo
+  element.
+
+HMAC-SHA1 is the simplest method, but relies on the fact that you have to make
+absolutely sure the key is kept secret on both the sending and receiving side.
+As long as the secret key is confidential, messages are securely signed.
+However, this is virtually impossible when exchanging messages with untrusted
+disparate parties. The advantage of HMAC-SHA1 is the speed by which messages
+are signed and verified.
+
+DSA-SHA1 and RSA-SHA1 rely on public key cryptography. In simplified terms, a
+message is signed using the (confidential!) private key. The public key is used
+to verify the signature. Since only the originating party could have used its
+private key to sign the message, the integrity of the message is guaranteed. Of
+course, we must trust the public key came from the originator (it is often
+included as an X509 certificate in the message). To this end, a trusted
+certificate authority should have signed the public key, thereby creating a
+X509 certificate that contains the public key and the identity of the message
+originator.
+
+@subsection wsse_8_2a Signing Messages
+
+After the plugin is registered and a signature algorithm selected, the
+@ref soap_wsse_sign function or the @ref soap_wsse_sign_body function is used
+to initiate the signature engine to automatically sign outbound messages.
+
+The code to sign the SOAP Body of a message using HMAC-SHA1 is:
+
+@code
+    static char hmac_key[16] =
+    { 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88,
+      0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00 };
+    struct soap *soap = soap_new1(SOAP_XML_CANONICAL | SOAP_XML_INDENT);
+    soap_register_plugin(soap, soap_wsse);
+    if (soap_wsse_sign_body(soap, SOAP_SMD_HMAC_SHA1, hmac_key, sizeof(hmac_key))
+      ... // an error occurred
+    else if (soap_call_ns__myMethod(soap, ...))
+      ... // a transmission error occurred
+@endcode
+
+The hmac_key is some secret key you generated for the sending side and
+receiving side (don't use the one shown here).
+
+As always, use @ref soap_print_fault to display the error message.
+
+To sign the body of an outbound SOAP message using RSA-SHA1 (DSA-SHA1 is
+similar), we include the X509 certificate with the public key as a
+BinarySecurityToken in the header and a KeyInfo reference to the token to let
+receivers use the public key in the certificate to verify the authenticity of
+the message:
+
+@code
+    FILE *fd;
+    EVP_PKEY *rsa_private_key;
+    X509 *cert;
+    struct soap *soap = soap_new1(SOAP_XML_CANONICAL | SOAP_XML_INDENT);
+    soap_register_plugin(soap, soap_wsse);
+    fd = fopen("privkey.pem", "r");
+    rsa_private_key = PEM_read_PrivateKey(fd, NULL, NULL, "password");
+    fclose(fd);
+    fd = fopen("cert.pem", "r");
+    X509 *cert = PEM_read_X509(fd, NULL, NULL, NULL);
+    fclose(fd);
+    if (soap_wsse_add_BinarySecurityTokenX509(soap, "X509Token", cert)
+     || soap_wsse_add_KeyInfo_SecurityTokenReferenceX509(soap, "#X509Token")
+     || soap_wsse_sign_body(soap, SOAP_SMD_SIGN_RSA_SHA1, rsa_private_key, 0))
+      ... // an error occurred
+    else if (soap_call_ns__myMethod(soap, ...))
+      ... // a transmission error occurred
+@endcode
+
+The private key and its certificate are often placed in the same file, see e.g.
+server.pem in the package.
+
+To summarize the signing process:
+-# Register the wsse plugin.
+-# Obtain an HMAC secret key or a DSA or RSA private key.
+-# For DSA or RSA, obtain the X509 certificate with the public key signed by a
+   certificate authority.
+-# Add the X509 certificate as a BinarySecurityToken to the header.
+-# Add a KeyInfo BinarySecurityTokenReference.
+-# Invoke @ref soap_wsse_sign or @ref soap_wsse_sign_body to sign the message.
+-# Always check the function return values for errors. You don't want to
+   produce and accept messages with an invalid Security headers.
+
+@subsection wsse_8_2b Signing Message Parts
+
+The @ref soap_wsse_sign_body function signs the entire SOAP body. If it is
+desirable to sign individual parts of a message the @ref soap_wsse_sign
+function should be used. Message parts with wsu:Id attributes are signed. These
+message parts should not be nested (nested elements will not be separately
+signed).
+
+For example, consider a transaction in which we only want to sign a contract in
+the SOAP Body. This allows us to modify the rest of the message or extract the
+contract in XML and pass it on with the signature.
+
+The gSOAP header file includes a myContract declaration:
+
+@code
+    struct ns__myContract
+    { @char* wsu_Id = "Contract";
+      char* name;
+      char* title;
+      char* terms;
+    };
+    int ns__myMethod(struct ns__myContract agreement, bool* accepted);
+@endcode
+
+The default value of the wsu:Id is "Contract" so that we can instantiate the
+struct, automatically sign it, and send it as follows:
+
+@code
+    struct ns__myContract contract;
+    bool accept;
+    soap_default_ns__myContract(soap, &contract);
+    contract.name = ...;
+    contract.title = ...;
+    contract.terms = ...;
+    if (soap_wsse_add_BinarySecurityTokenX509(soap, "X509Token", cert)
+     || soap_wsse_add_KeyInfo_SecurityTokenReferenceX509(soap, "#X509Token")
+     || soap_wsse_sign(soap, SOAP_SMD_SIGN_RSA_SHA1, rsa_private_key, 0))
+      ... // an error occurred
+    else if (soap_call_ns__myMethod(soap, contract, &accept))
+      ... // a transmission error occurred
+@endcode
+
+@subsection wsse_8_3 Signing Tokens
+
+To sign security tokens such as user names, passwords, and binary security
+tokens, just assign their Id values with a unique string, such as "Time" for
+timestamps and "User" for user names. For example:
+
+@code
+    soap_wsse_add_Timestamp(soap, "Time", 600);
+    soap_wsse_add_UsernameTokenDigest(soap, "User", "username", "password");
+    ... // the rest of the signing code
+@endcode
+
+@subsection wsse_8_4 Signature Validation
+
+To automatically verify the signature of an inbound message signed with DSA or
+RSA algorithms, assuming the message contains the X509 certificate as a binary
+security token, use:
+
+@code
+    struct soap *soap = soap_new1(SOAP_XML_CANONICAL | SOAP_XML_INDENT);
+    soap_register_plugin(soap, soap_wsse);
+    soap_wsse_verify_auto(soap, SOAP_SMD_NONE, NULL, 0);
+
+    // server:
+    if (soap_serve(soap))
+      ... // an error occurred
+
+    // client:
+    if (soap_call_ns__myMethod(soap, ...))
+      ... // an error occurred
+@endcode
+
+All locally referenced elements in the signed message will be verified.
+Elements referenced with absolute URIs are not automatically verified. The
+received message is stored in a DOM accessible with soap->dom. This enables
+further analysis of the message content.
+
+The @ref soap_wsse_verify_auto function keeps processing signed (and unsigned)
+messages as they arrive. For unsigned messages this can be expensive and the
+verification engine should be shut down using @ref soap_wsse_verify_done.
+
+To verify the HMAC signature of an inbound message, the HMAC key must be
+supplied:
+
+@code
+    static char hmac_key[16] = // the same secret key that was used to sign
+    { 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88,
+      0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00 };
+    struct soap *soap = soap_new1(SOAP_XML_CANONICAL | SOAP_XML_INDENT);
+    soap_register_plugin(soap, soap_wsse);
+    soap_wsse_verify_auto(soap, SOAP_SMD_HMAC_SHA1, hmac_key, sizeof(hmac_key));
+
+    // server:
+    if (soap_serve(soap))
+      ... // an error occurred
+
+    // client:
+    if (soap_call_ns__myMethod(soap, ...))
+      ... // an error occurred
+@endcode
+
+To summarize the signature verification process:
+-# Register the wsse plugin.
+-# For HMAC, obtain the HMAC secret key
+-# Use @ref soap_wsse_verify_auto to verify inbound messages.
+-# After receiving a message, the DOM in soap->dom can be traversed for further    analysis.
+-# Always check the function return values for errors. You don't want to accept
+   a request or response message with an invalid Security header.
+-# Use @ref soap_wsse_verify_done to terminate verification, e.g. to consume
+   plain messages more efficiently.
+
+@section wsse_9 Encryption
+
+The material in this section relates to the WS-Security specification section 9.
+
+TODO item: encryption support is under construction.
+
+@section wsse_10 Security Timestamps
+
+The material in this section relates to the WS-Security specification section
+10.
+
+To add a timestamp with the creation time to the Security header, use:
+
+@code
+    soap_wsse_add_Timestamp(soap, NULL, 0); // no expiration
+@endcode
+
+The lifetime of a message (in seconds) is passed as the third argument, which
+will be displayed as the timestamp expiration time:
+
+@code
+    soap_wsse_add_Timestamp(soap, NULL, 10); // 10 seconds lifetime
+@endcode
+
+Timestamps, like other header elements, are not automatically secured with a
+digital signature. To secure a timestamp, we add an identifier (wsu:Id) to each
+element we want the WS-Security plugin to sign thereby making it impossible for
+someone to tamper with that part of the message. To do this for the timestamp,
+we simply pass a unique identification string as the second argument:
+
+@code
+    soap_wsse_add_Timestamp(soap, "Time", 10); // timestamp will be signed
+@endcode
+
+
+*/
+
+#include "wsseapi.h"
+#include "smdevp.h"
+#include "threads.h"	/* only need threads to enable mutex for MT */
+
+/** Plugin identification for plugin registry */
+const char soap_wsse_id[14] = SOAP_WSSE_ID;
+
+/** Maximum number of SignedInfo References */
+#define SOAP_WSSE_MAX_REF	(100)
+
+/** Clock skew between machines (in sec) to fit message expiration in window */
+#define SOAP_WSSE_CLKSKEW	(600)
+
+/** Size of the random nonce */
+#define SOAP_WSSE_NONCELEN	(20)
+/** Digest authentication accepts messages that are not older than creation time + SOAP_WSSE_NONCETIME */
+#define SOAP_WSSE_NONCETIME	(SOAP_WSSE_CLKSKEW + 240)
+
+/******************************************************************************\
+ *
+ * Common URIs
+ *
+\******************************************************************************/
+
+const char *wsse_PasswordTextURI = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText";
+const char *wsse_PasswordDigestURI = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest";
+const char *wsse_Base64BinaryURI = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary";
+const char *wsse_X509v3URI = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3";
+const char *wsse_X509v3SubjectKeyIdentifierURI = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier";
+
+const char *ds_sha1URI = "http://www.w3.org/2000/09/xmldsig#sha1";
+const char *ds_hmac_sha1URI = "http://www.w3.org/2000/09/xmldsig#hmac-sha1";
+const char *ds_dsa_sha1URI = "http://www.w3.org/2000/09/xmldsig#dsa-sha1";
+const char *ds_rsa_sha1URI = "http://www.w3.org/2000/09/xmldsig#rsa-sha1";
+
+const char *ds_URI = "http://www.w3.org/2000/09/xmldsig#";
+const char *c14n_URI = "http://www.w3.org/2001/10/xml-exc-c14n#";
+const char *wsu_URI = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
+
+/******************************************************************************\
+ *
+ * Digest authentication session
+ *
+\******************************************************************************/
+
+/**
+@struct soap_wsse_session
+@brief Digest authentication session data
+*/
+struct soap_wsse_session
+{ struct soap_wsse_session *next;	/**< Next session in list */
+  time_t expired;			/**< Session expiration */
+  char hash[SOAP_SMD_SHA1_SIZE];	/**< SHA1 digest */
+  char nonce[1]; /**< Nonce string flows into region below this struct */
+};
+
+/** The digest authentication session database */
+static struct soap_wsse_session *soap_wsse_session = NULL;
+
+/** Lock for digest authentication session database exclusive access */
+static MUTEX_TYPE soap_wsse_session_lock;
+
+static int soap_wsse_session_verify(struct soap *soap, const char hash[SOAP_SMD_SHA1_SIZE], const char *created, const char *nonce);
+static void soap_wsse_session_cleanup(struct soap *soap);
+static void calc_digest(struct soap *soap, const char *created, const char *nonce, int noncelen, const char *password, char hash[SOAP_SMD_SHA1_SIZE]);
+static void calc_nonce(struct soap *soap, char nonce[SOAP_WSSE_NONCELEN]);
+
+static int soap_wsse_init(struct soap *soap, struct soap_wsse_data *data);
+static int soap_wsse_copy(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src);
+static void soap_wsse_delete(struct soap *soap, struct soap_plugin *p);
+
+static int soap_wsse_prepareinit(struct soap *soap);
+static int soap_wsse_preparesend(struct soap *soap, const char *buf, size_t len);
+static int soap_wsse_preparefinal(struct soap *soap);
+static void soap_wsse_preparecleanup(struct soap *soap, struct soap_wsse_data *data);
+static int soap_wsse_disconnect(struct soap *soap);
+
+/******************************************************************************\
+ *
+ * wsse:Security header element
+ *
+\******************************************************************************/
+
+/**
+@fn _wsse__Security* soap_wsse_add_Security(struct soap *soap)
+@brief Adds Security header element.
+@param soap context
+@return _wsse__Security object
+*/
+struct _wsse__Security*
+soap_wsse_add_Security(struct soap *soap)
+{ DBGFUN("soap_wsse_add_Security");
+  /* if we don't have a SOAP Header, create one */
+  if (!soap->header)
+  { soap->header = (struct SOAP_ENV__Header*)soap_malloc(soap, sizeof(struct SOAP_ENV__Header));
+    soap_default_SOAP_ENV__Header(soap, soap->header); 
+  }
+  /* if we don't have a wsse:Security element in the SOAP Header, create one */
+  if (!soap->header->wsse__Security)
+  { soap->header->wsse__Security = (_wsse__Security*)soap_malloc(soap, sizeof(_wsse__Security));
+    soap_default__wsse__Security(soap, soap->header->wsse__Security);
+  }
+  return soap->header->wsse__Security;
+}
+
+/**
+@fn _wsse__Security* soap_wsse_add_Security_actor(struct soap *soap, const char *actor)
+@brief Adds Security header element with actor or role attribute.
+@param soap context
+@param actor string
+@return _wsse__Security object
+*/
+struct _wsse__Security*
+soap_wsse_add_Security_actor(struct soap *soap, const char *actor)
+{ _wsse__Security *security = soap_wsse_add_Security(soap);
+  DBGFUN1("soap_wsse_add_Security_actor", "actor=%s", actor);
+  if (soap->namespaces && !strcmp(soap->namespaces[0].ns, "http://schemas.xmlsoap.org/soap/envelope/"))
+    security->SOAP_ENV__actor = soap_strdup(soap, actor);
+  else
+    security->SOAP_ENV__role = soap_strdup(soap, actor);
+  return security;
+}
+
+/**
+@fn void soap_wsse_delete_Security(struct soap *soap)
+@brief Deletes Security header element.
+@param soap context
+*/
+void
+soap_wsse_delete_Security(struct soap *soap)
+{ DBGFUN("soap_wsse_delete_Security");
+  if (soap->header)
+    soap->header->wsse__Security = NULL;
+}
+
+/**
+@fn _wsse__Security* soap_wsse_Security(struct soap *soap)
+@brief Returns Security header element if present.
+@param soap context
+@return _wsse__Security object or NULL
+*/
+struct _wsse__Security*
+soap_wsse_Security(struct soap *soap)
+{ if (soap->header)
+    return soap->header->wsse__Security;
+  return NULL;
+}
+
+/******************************************************************************\
+ *
+ * wsse:Security/ds:Signature header element
+ *
+\******************************************************************************/
+
+/**
+@fn ds__SignatureType* soap_wsse_add_Signature(struct soap *soap)
+@brief Adds Signature header element.
+@param soap context
+@return ds__SignatureType object
+*/
+struct ds__SignatureType*
+soap_wsse_add_Signature(struct soap *soap)
+{ _wsse__Security *security = soap_wsse_add_Security(soap);
+  DBGFUN("soap_wsse_add_Signature");
+  /* if we don't have a ds:Signature, create one */
+  if (!security->ds__Signature)
+  { security->ds__Signature = (ds__SignatureType*)soap_malloc(soap, sizeof(ds__SignatureType));
+    soap_default_ds__SignatureType(soap, security->ds__Signature); 
+  }
+  return security->ds__Signature;
+}
+
+/**
+@fn void soap_wsse_delete_Signature(struct soap *soap)
+@brief Deletes Signature header element.
+@param soap context
+*/
+void
+soap_wsse_delete_Signature(struct soap *soap)
+{ _wsse__Security *security = soap_wsse_Security(soap);
+  DBGFUN("soap_wsse_delete_Signature");
+  if (security)
+    security->ds__Signature = NULL;
+}
+
+/**
+@fn ds__SignatureType* soap_wsse_Signature(struct soap *soap)
+@brief Returns Signature header element if present.
+@param soap context
+@return ds__SignatureType object or NULL
+*/
+struct ds__SignatureType*
+soap_wsse_Signature(struct soap *soap)
+{ _wsse__Security *security = soap_wsse_Security(soap);
+  if (security)
+    return security->ds__Signature;
+  return NULL;
+}
+
+/******************************************************************************\
+ *
+ * wsse:Security/wsu:Timestamp header element
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_wsse_add_Timestamp(struct soap *soap, const char *id, time_t lifetime)
+@brief Adds Timestamp element with optional expiration date+time (lifetime).
+@param[in] soap context
+@param[in] id for signature referencing or NULL
+@param[in] lifetime expressed in time_t units, or 0 for no expiration
+@return SOAP_OK
+*/
+int
+soap_wsse_add_Timestamp(struct soap *soap, const char *id, time_t lifetime)
+{ _wsse__Security *security = soap_wsse_add_Security(soap);
+  time_t now = time(NULL);
+  char *created = soap_strdup(soap, soap_dateTime2s(soap, now));
+  char *expired = lifetime ? soap_strdup(soap, soap_dateTime2s(soap, now + lifetime)) : NULL;
+  DBGFUN1("soap_wsse_add_Timestamp", "id=%s", id?id:"");
+  /* allocate a Timestamp if we don't have one already */
+  if (!security->wsu__Timestamp)
+    security->wsu__Timestamp = (_wsu__Timestamp*)soap_malloc(soap, sizeof(_wsu__Timestamp));
+  soap_default__wsu__Timestamp(soap, security->wsu__Timestamp);
+  /* populate the wsu:Timestamp element */
+  security->wsu__Timestamp->wsu__Id = soap_strdup(soap, id);
+  security->wsu__Timestamp->Created = created;
+  security->wsu__Timestamp->Expires = expired;
+  return SOAP_OK;
+}
+
+/**
+@fn _wsu__Timestamp *soap_wsse_Timestamp(struct soap *soap)
+@brief Returns Timestamp element if present.
+@param soap context
+@return _wsu__Timestamp object or NULL
+*/
+struct _wsu__Timestamp*
+soap_wsse_Timestamp(struct soap *soap)
+{ _wsse__Security *security = soap_wsse_Security(soap);
+  if (security)
+    return security->wsu__Timestamp;
+  return NULL;
+}
+
+/**
+@fn int soap_wsse_verify_Timestamp(struct soap *soap)
+@brief Verifies the Timestamp/Expires element against the current time.
+@param soap context
+@return SOAP_OK or SOAP_FAULT with wsse:FailedAuthentication fault
+
+Sets wsse:FailedAuthentication fault if wsu:Timestamp is expired. The
+SOAP_WSSE_CLKSKEW value is used as a margin to mitigate clock skew. Keeps
+silent when no timestamp is supplied or no expiration date is included in the
+wsu:Timestamp element.
+*/
+int
+soap_wsse_verify_Timestamp(struct soap *soap)
+{ _wsu__Timestamp *timestamp = soap_wsse_Timestamp(soap);
+  DBGFUN("soap_wsse_verify_Timestamp");
+  /* if we have a timestamp with an expiration date, check it */
+  if (timestamp && timestamp->Expires)
+  { time_t now = time(NULL), expired;
+    soap_s2dateTime(soap, timestamp->Expires, &expired);
+    if (expired + SOAP_WSSE_CLKSKEW <= now)
+    { const char *code = soap_wsu__tTimestampFault2s(soap, 0);
+      return soap_sender_fault_subcode(soap, code, "Message has expired", timestamp->Expires);
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************\
+ *
+ * wsse:Security/UsernameToken header element
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_wsse_add_UsernameTokenText(struct soap *soap, const char *id, const char *username, const char *password)
+@brief Adds UsernameToken element with optional clear-text password.
+@param soap context
+@param[in] id string for signature referencing or NULL
+@param[in] username string
+@param[in] password string or NULL to omit the password
+@return SOAP_OK
+
+Passwords are sent in the clear, so transport-level encryption is required.
+Note: this release supports the use of at most one UsernameToken in the header.
+*/
+int
+soap_wsse_add_UsernameTokenText(struct soap *soap, const char *id, const char *username, const char *password)
+{ _wsse__Security *security = soap_wsse_add_Security(soap);
+  DBGFUN2("soap_wsse_add_UsernameTokenText", "id=%s", id?id:"", "username=%s", username?username:"");
+  /* allocate a UsernameToken if we don't have one already */
+  if (!security->UsernameToken)
+    security->UsernameToken = (_wsse__UsernameToken*)soap_malloc(soap, sizeof(_wsse__UsernameToken));
+  soap_default__wsse__UsernameToken(soap, security->UsernameToken);
+  /* populate the UsernameToken */
+  security->UsernameToken->wsu__Id = soap_strdup(soap, id);
+  security->UsernameToken->Username = soap_strdup(soap, username);
+  /* allocate and populate the Password */
+  if (password)
+  { security->UsernameToken->Password = (_wsse__Password*)soap_malloc(soap, sizeof(_wsse__Password));
+    soap_default__wsse__Password(soap, security->UsernameToken->Password);
+    security->UsernameToken->Password->Type = (char*)wsse_PasswordTextURI;
+    security->UsernameToken->Password->__item = soap_strdup(soap, password);
+  }
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_wsse_add_UsernameTokenDigest(struct soap *soap, const char *id, const char *username, const char *password)
+@brief Adds UsernameToken element for digest authentication.
+@param soap context
+@param[in] id string for signature referencing or NULL
+@param[in] username string
+@param[in] password string
+@return SOAP_OK
+
+Computes SHA1 digest of the time stamp, a nonce, and the password. The digest
+provides the authentication credentials. Passwords are NOT sent in the clear.
+Note: this release supports the use of at most one UsernameToken in the header.
+*/
+int
+soap_wsse_add_UsernameTokenDigest(struct soap *soap, const char *id, const char *username, const char *password)
+{ _wsse__Security *security = soap_wsse_add_Security(soap);
+  time_t now = time(NULL);
+  const char *created = soap_dateTime2s(soap, now);
+  char HA[SOAP_SMD_SHA1_SIZE], HABase64[29];
+  char nonce[SOAP_WSSE_NONCELEN], *nonceBase64;
+  DBGFUN2("soap_wsse_add_UsernameTokenDigest", "id=%s", id?id:"", "username=%s", username?username:"");
+  /* generate a nonce */
+  calc_nonce(soap, nonce);
+  nonceBase64 = soap_s2base64(soap, nonce, NULL, SOAP_WSSE_NONCELEN);
+  /* TODO: the specs are not clear: compute digest over binary nonce or base64 nonce?
+  calc_digest(soap, created, nonce, SOAP_WSSE_NONCELEN, password, HA); */
+  /* compute SHA1(created, nonce, password) */
+  calc_digest(soap, created, nonceBase64, strlen(nonceBase64), password, HA);
+  soap_s2base64(soap, HA, HABase64, SOAP_SMD_SHA1_SIZE);
+  /* populate the UsernameToken with digest */
+  soap_wsse_add_UsernameTokenText(soap, id, username, HABase64);
+  /* populate the remainder of the password, nonce, and created */
+  security->UsernameToken->Password->Type = (char*)wsse_PasswordDigestURI;
+  security->UsernameToken->Nonce = nonceBase64;
+  security->UsernameToken->wsu__Created = soap_strdup(soap, created);
+  return SOAP_OK;
+}
+
+/**
+@fn _wsse__UsernameToken* soap_wsse_UsernameToken(struct soap *soap, const char *id)
+@brief Returns UsernameToken element if present.
+@param soap context
+@param[in] id string of UsernameToken or NULL
+@return _wsse__UsernameToken object or NULL
+
+Note: this release supports the use of at most one UsernameToken in the header.
+*/
+struct _wsse__UsernameToken*
+soap_wsse_UsernameToken(struct soap *soap, const char *id)
+{ _wsse__Security *security = soap_wsse_Security(soap);
+  if (security
+   && security->UsernameToken
+   && (!id || (security->UsernameToken->wsu__Id
+            && !strcmp(security->UsernameToken->wsu__Id, id))))
+    return security->UsernameToken;
+  return NULL;
+}
+
+/**
+@fn const char* soap_wsse_get_Username(struct soap *soap)
+@brief Returns UsernameToken/username string or wsse:FailedAuthentication fault.
+@param soap context
+@return UsernameToken/username string or NULL with wsse:FailedAuthentication fault error set
+@see soap_wsse_verify_Password
+
+The returned username should be used to lookup the user's password in a
+dictionary or database for server-side authentication with
+soap_wsse_verify_Password.
+*/
+const char*
+soap_wsse_get_Username(struct soap *soap)
+{ _wsse__UsernameToken *token = soap_wsse_UsernameToken(soap, NULL);
+  DBGFUN("soap_wsse_get_Username");
+  if (token)
+    return token->Username;
+  soap_wsse_fault(soap, wsse__FailedAuthentication, "Authentication required");
+  return NULL;
+}
+
+/**
+@fn int soap_wsse_verify_Password(struct soap *soap, const char *password)
+@brief Verifies the supplied password or sets wsse:FailedAuthentication fault.
+@param soap context
+@param[in] password string to verify against
+@return SOAP_OK (authorized) or SOAP_FAULT with wsse:FailedAuthentication fault
+
+The verification supports both clear-text password verification and digest
+password authentication. For digest authentication a history mechanism with a
+digest authentication session database ensures protection against replay
+attacks.
+Note: this release supports the use of at most one UsernameToken in the header.
+*/
+int
+soap_wsse_verify_Password(struct soap *soap, const char *password)
+{ _wsse__UsernameToken *token = soap_wsse_UsernameToken(soap, NULL);
+  DBGFUN("soap_wsse_verify_Password");
+  /* if we have a UsernameToken with a Password, check it */
+  if (token && token->Password)
+  { /* password digest or text? */
+    if (token->Password->Type
+     && !strcmp(token->Password->Type, wsse_PasswordDigestURI))
+    { /* check password digest: compute SHA1(created, nonce, password) */
+      if (token->Nonce
+       && token->wsu__Created
+       && strlen(token->Password->__item) == 28)	/* digest pw len = 28 */
+      { char HA1[SOAP_SMD_SHA1_SIZE], HA2[SOAP_SMD_SHA1_SIZE];
+	/* TODO: the specs are not clear: compute digest over binary nonce or base64 nonce?
+        int noncelen;
+	const char *nonce = soap_base642s(soap, token->Nonce, NULL, 0, &noncelen);
+        calc_digest(soap, token->wsu__Created, nonce, noncelen, password, HA1); */
+        /* compute HA1 = SHA1(created, nonce, password) */
+        calc_digest(soap, token->wsu__Created, token->Nonce, strlen(token->Nonce), password, HA1);
+	/* get HA2 = supplied digest from base64 Password */
+        soap_base642s(soap, token->Password->__item, HA2, SOAP_SMD_SHA1_SIZE, NULL);
+        /* compare HA1 to HA2 */
+        if (!memcmp(HA1, HA2, SOAP_SMD_SHA1_SIZE))
+	{ /* authorize if HA1 and HA2 identical and not replay attack */
+          if (!soap_wsse_session_verify(soap, HA1, token->wsu__Created, token->Nonce))
+	    return SOAP_OK;
+          return soap->error; 
+        }
+      }
+    }
+    else
+    { /* check password text */
+      if (!strcmp(token->Password->__item, password))
+        return SOAP_OK;
+    }
+  }
+  return soap_wsse_fault(soap, wsse__FailedAuthentication, "Authentication required");
+}
+
+/******************************************************************************\
+ *
+ * wsse:Security/BinarySecurityToken header element
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_wsse_add_BinarySecurityToken(struct soap *soap, const char *id, const char *valueType, const unsigned char *data, int size)
+@brief Adds BinarySecurityToken element.
+@param soap context
+@param[in] id string for signature referencing or NULL
+@param[in] valueType string
+@param[in] data points to binary token data
+@param[in] size is length of binary token
+@return SOAP_OK
+*/
+int
+soap_wsse_add_BinarySecurityToken(struct soap *soap, const char *id, const char *valueType, const unsigned char *data, int size)
+{ _wsse__Security *security = soap_wsse_add_Security(soap);
+  DBGFUN2("wsse_add_BinarySecurityToken", "id=%s", id?id:"", "valueType=%s", valueType?valueType:"");
+  /* allocate BinarySecurityToken if we don't already have one */
+  if (!security->BinarySecurityToken)
+    security->BinarySecurityToken = (_wsse__BinarySecurityToken*)soap_malloc(soap, sizeof(_wsse__BinarySecurityToken));
+  soap_default__wsse__BinarySecurityToken(soap, security->BinarySecurityToken);
+  /* populate the BinarySecurityToken */
+  security->BinarySecurityToken->wsu__Id = soap_strdup(soap, id);
+  security->BinarySecurityToken->ValueType = soap_strdup(soap, valueType);
+  security->BinarySecurityToken->EncodingType = (char*)wsse_Base64BinaryURI;
+  security->BinarySecurityToken->__item = soap_s2base64(soap, data, NULL, size);
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_wsse_add_BinarySecurityTokenX509(struct soap *soap, const char *id, X509 *cert)
+@brief Adds BinarySecurityToken element with X509 certificate.
+@param soap context
+@param[in] id string for signature reference
+@param[in] cert points to the X509 certificate
+@return SOAP_OK or SOAP_EOM
+
+This function uses i2d_X509 from the the OpenSSL library to convert an X509
+object to binary DER format.
+*/
+int
+soap_wsse_add_BinarySecurityTokenX509(struct soap *soap, const char *id, X509 *cert)
+{ int size;
+  unsigned char *data, *next;
+  if (!cert)
+    return soap_wsse_fault(soap, wsse__InvalidSecurityToken, "Invalid certificate");
+  /* determine the storage requirement */
+  size = i2d_X509(cert, NULL);
+  if (size < 0)
+    return soap_wsse_fault(soap, wsse__InvalidSecurityToken, "Invalid certificate");
+  /* use the gSOAP engine's look-aside buffer to temporarily hold the cert */
+  if (soap_store_lab(soap, NULL, size))
+    return SOAP_EOM;
+  data = next = (unsigned char*)soap->labbuf;
+  /* store in DER format */
+  i2d_X509(cert, &next);
+  /* populate the BinarySecurityToken with base64 certificate data */
+  return soap_wsse_add_BinarySecurityToken(soap, id, wsse_X509v3URI, data, size);
+}
+
+/**
+@fn int soap_wsse_add_BinarySecurityTokenPEM(struct soap *soap, const char *id, const char *filename)
+@brief Adds BinarySecurityToken element from a PEM file.
+@param soap context
+@param[in] id string for signature reference
+@param[in] filename
+@return SOAP_OK or SOAP_FAULT with wsse__InvalidSecurity fault when file cannot be read or does not contain a valid certificate
+
+This function uses PEM_read_X509 from the the OpenSSL library to read a
+certificate from a PEM formatted file.
+*/
+int
+soap_wsse_add_BinarySecurityTokenPEM(struct soap *soap, const char *id, const char *filename)
+{ FILE *fd;
+  DBGFUN2("soap_wsse_add_BinarySecurityTokenPEM", "id=%s", id?id:"", "filename=%s", filename?filename:"");
+  if ((fd = fopen(filename, "r")))
+  { /* read the certificate */
+    X509 *cert = PEM_read_X509(fd, NULL, NULL, NULL);
+    fclose(fd);
+    /* if okay, populate the BinarySecurityToken element */
+    if (cert)
+    { int err = soap_wsse_add_BinarySecurityTokenX509(soap, id, cert);
+      X509_free(cert);
+      return err;
+    }
+  }
+  return soap_wsse_fault(soap, wsse__InvalidSecurity, "No certificate");
+}
+
+/**
+@fn _wsse__BinarySecurityToken* soap_wsse_BinarySecurityToken(struct soap *soap, const char *id)
+@brief Returns BinarySecurityToken element if present.
+@param soap context
+@param[in] id string of token to get or NULL
+@return _wsse__BinarySecurityToken object or NULL
+*/
+struct _wsse__BinarySecurityToken*
+soap_wsse_BinarySecurityToken(struct soap *soap, const char *id)
+{ _wsse__Security *security = soap_wsse_Security(soap);
+  if (security
+   && security->BinarySecurityToken
+   && (!id || (security->BinarySecurityToken->wsu__Id
+            && !strcmp(security->BinarySecurityToken->wsu__Id, id))))
+    return security->BinarySecurityToken;
+  return NULL;
+}
+
+/**
+@fn int soap_wsse_get_BinarySecurityToken(struct soap *soap, const char *id, char **valueType, unsigned char **data, int *size)
+@brief Get wsse:BinarySecurityToken element token data in binary form.
+@param soap context
+@param[in] id string of token to get or NULL
+@param[out] valueType string
+@param[out] data points to binary token data
+@param[out] size is length of binary token
+@return SOAP_OK or SOAP_FAULT with wsse:SecurityTokenUnavailable fault
+*/
+int
+soap_wsse_get_BinarySecurityToken(struct soap *soap, const char *id, char **valueType, unsigned char **data, int *size)
+{ _wsse__BinarySecurityToken *token = soap_wsse_BinarySecurityToken(soap, id);
+  DBGFUN1("soap_wsse_get_BinarySecurityToken", "id=%s", id?id:"");
+  if (token)
+  { *valueType = token->ValueType;
+    /* it appears we don't need HexBinary after all
+    if (token->EncodingType && !strcmp(token->EncodingType, wsse_HexBinaryURI))
+      *data = (unsigned char*)soap_hex2s(soap, token->__item, NULL, 0, size);
+    else
+    */
+    /* assume token is represented in base64 by default */
+    *data = (unsigned char*)soap_base642s(soap, token->__item, NULL, 0, size);
+    if (*data)
+      return SOAP_OK;
+  }
+  return soap_wsse_fault(soap, wsse__SecurityTokenUnavailable, "BinarySecurityToken required");
+}
+
+/**
+@fn X509* soap_wsse_get_BinarySecurityTokenX509(struct soap *soap, const char *id)
+@brief Get X509 wsse:BinarySecurityToken certificate and verify its content.
+@param soap context
+@param[in] id string of token to get or NULL
+@return X509 certificate (dynamically allocated) or NULL with wsse:SecurityTokenUnavailable fault
+*/
+X509*
+soap_wsse_get_BinarySecurityTokenX509(struct soap *soap, const char *id)
+{ X509 *cert = NULL;
+  char *valueType;
+  unsigned char *data;
+  int size;
+  DBGFUN1("soap_wsse_get_BinarySecurityTokenX509", "id=%s", id?id:"");
+  if (!soap_wsse_get_BinarySecurityToken(soap, id, &valueType, &data, &size)
+   && valueType
+   && !strcmp(valueType, wsse_X509v3URI))
+    cert = d2i_X509(NULL, &data, size);
+  /* verify the certificate */
+  if (!cert || soap_wsse_verify_X509(soap, cert))
+    return NULL;
+  return cert;
+}
+
+/**
+@fn int soap_wsse_verify_X509(struct soap *soap, X509 *cert)
+@brief Verifies X509 certificate against soap->cafile, soap->capath, and soap->crlfile
+@param soap context
+@param[in] cert X509 certificate
+@return SOAP_OK or fault
+
+This is an expensive operation, since we read the cafile and create the objects
+every time we need to verify a certificate. For future releases, we should
+store this data permanently in the gSOAP engine or plugin.
+*/
+int
+soap_wsse_verify_X509(struct soap *soap, X509 *cert)
+{ X509_STORE *store = NULL;
+  X509_STORE_CTX *verify = NULL;
+  /* OpenSSL_add_all_algorithms(); */
+  DBGFUN("soap_wsse_verify_X509");
+  /* TODO: should keep the store in the gSOAP engine or plugin to avoid excessive loads */
+  if (!(store = X509_STORE_new()))
+  { soap_receiver_fault(soap, "soap_wsse_verify_X509", "Could not create X509_STORE object");
+    goto err;
+  }
+  X509_STORE_set_verify_cb_func(store, soap->fsslverify);
+  if (soap->cafile || soap->capath)
+  { if (X509_STORE_load_locations(store, soap->cafile, soap->capath) != 1)
+    { soap_receiver_fault(soap, "soap_wsse_verify_X509", "Could not load CA file or path");
+      goto err;
+    }
+  }
+#if (OPENSSL_VERSION_NUMBER > 0x00907000L)
+  if (soap->crlfile)
+  { X509_LOOKUP *lookup;
+    if (!(lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file())))
+    { soap_receiver_fault(soap, "soap_wsse_verify_X509", "Could not create X509_LOOKUP object");
+      goto err;
+    }
+    if (X509_load_crl_file(lookup, soap->crlfile, X509_FILETYPE_PEM) != 1)
+    { soap_receiver_fault(soap, "soap_wsse_verify_X509", "Could not read the CRL file");
+      goto err;
+    }
+    X509_STORE_set_flags(store, X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL);
+  }
+#endif
+  if (!(verify = X509_STORE_CTX_new()))
+  { soap_receiver_fault(soap, "soap_wsse_verify_X509", "Could not create X509_STORE_CTX object");
+    goto err;
+  }
+#if (OPENSSL_VERSION_NUMBER > 0x00907000L)
+  if (X509_STORE_CTX_init(verify, store, cert, NULL) != 1)
+  { soap_receiver_fault(soap, "soap_wsse_verify_X509", "Could not initialize X509_STORE_CTX object");
+    goto err;
+  }
+#else
+  X509_STORE_CTX_init(verify, store, cert, NULL);
+#endif
+  if (X509_verify_cert(verify) != 1)
+  { soap_sender_fault(soap, "soap_wsse_verify_X509", "Invalid certificate");
+    goto err;
+  }
+  X509_STORE_CTX_free(verify);
+  X509_STORE_free(store);
+  return SOAP_OK;
+err:
+  if (verify)
+    X509_STORE_CTX_free(verify);
+  if (store)
+    X509_STORE_free(store);
+  return soap->error;
+}
+
+/******************************************************************************\
+ *
+ * ds:Signature/SignedInfo
+ *
+\******************************************************************************/
+
+/**
+@fn ds__SignedInfoType* soap_wsse_add_SignedInfo(struct soap *soap)
+@brief Adds SignedInfo element.
+@param soap context
+@return ds__SignedInfoType object
+*/
+struct ds__SignedInfoType*
+soap_wsse_add_SignedInfo(struct soap *soap)
+{ ds__SignatureType *signature = soap_wsse_add_Signature(soap);
+  if (!signature->SignedInfo)
+  { signature->SignedInfo = (ds__SignedInfoType*)soap_malloc(soap, sizeof(ds__SignedInfoType));
+    soap_default_ds__SignedInfoType(soap, signature->SignedInfo);
+  }
+  return signature->SignedInfo;
+}
+
+/**
+@fn int soap_wsse_add_SignedInfo_Reference(struct soap *soap, const char *URI, const char *transform, const char *inclusiveNamespaces, const char *HA)
+@brief Adds SignedInfo element with Reference URI, transform algorithm used, and digest value.
+@param soap context
+@param[in] URI reference
+@param[in] transform string should be c14n_URI for exc-c14n or NULL
+@param[in] inclusiveNamespaces used by the exc-c14n transform or NULL
+@param[in] HA is the SHA1 digest in binary form (length=SOAP_SMD_SHA1_SIZE)
+@return SOAP_OK or SOAP_EOM when references exceed SOAP_WSSE_MAX_REF
+
+This function can be called to add more references to the wsse:SignedInfo
+element. A maximum number of SOAP_WSSE_MAX_REF references can be added. The
+digest method is always SHA1. 
+Note: XPath transforms cannot be specified in this release.
+*/
+int
+soap_wsse_add_SignedInfo_Reference(struct soap *soap, const char *URI, const char *transform, const char *inclusiveNamespaces, const char *HA)
+{ ds__SignedInfoType *signedInfo = soap_wsse_add_SignedInfo(soap);
+  ds__ReferenceType *reference;
+  DBGFUN2("soap_wsse_add_SignedInfo_Reference", "URI=%s", URI?URI:"", "transform=%s", transform?transform:"");
+  /* if this is the first reference, allocate SOAP_WSSE_MAX_REF references */
+  if (signedInfo->__sizeReference == 0)
+    signedInfo->Reference = (ds__ReferenceType**)soap_malloc(soap, SOAP_WSSE_MAX_REF*sizeof(ds__ReferenceType*));
+  else
+  { /* maximum number of references exceeded? */
+    if (signedInfo->__sizeReference >= SOAP_WSSE_MAX_REF)
+      return SOAP_EOM;
+  }
+  /* allocate fresh new reference */
+  reference = (ds__ReferenceType*)soap_malloc(soap, sizeof(ds__ReferenceType));
+  soap_default_ds__ReferenceType(soap, reference);
+  /* populate the URI */
+  reference->URI = soap_strdup(soap, URI);
+  /* if a transform algorithm was used, populate the Transforms element */
+  if (transform)
+  { reference->Transforms = (ds__TransformsType*)soap_malloc(soap, sizeof(ds__TransformsType));
+    soap_default_ds__TransformsType(soap, reference->Transforms);
+    /* only one transform */
+    reference->Transforms->__sizeTransform = 1;
+    reference->Transforms->Transform = (ds__TransformType*)soap_malloc(soap, sizeof(ds__TransformType));
+    soap_default_ds__TransformType(soap, reference->Transforms->Transform);
+    reference->Transforms->Transform->Algorithm = (char*)transform;
+    /* populate the c14n:InclusiveNamespaces element */
+    if (inclusiveNamespaces)
+    { reference->Transforms->Transform->c14n__InclusiveNamespaces = (_c14n__InclusiveNamespaces*)soap_malloc(soap, sizeof(_c14n__InclusiveNamespaces));
+      soap_default__c14n__InclusiveNamespaces(soap, reference->Transforms->Transform->c14n__InclusiveNamespaces);
+      reference->Transforms->Transform->c14n__InclusiveNamespaces->PrefixList = soap_strdup(soap, inclusiveNamespaces);
+    }
+  }
+  /* populate the DigestMethod element */
+  reference->DigestMethod = (ds__DigestMethodType*)soap_malloc(soap, sizeof(ds__DigestMethodType));
+  soap_default_ds__DigestMethodType(soap, reference->DigestMethod);
+  /* the DigestMethod algorithm is always SHA1 */
+  reference->DigestMethod->Algorithm = (char*)ds_sha1URI;
+  /* populate the DigestValue element */
+  reference->DigestValue = soap_s2base64(soap, HA, NULL, SOAP_SMD_SHA1_SIZE);
+  /* add the fresh new reference to the array */
+  signedInfo->Reference[signedInfo->__sizeReference] = reference;
+  signedInfo->__sizeReference++;
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_wsse_add_SignedInfo_SignatureMethod(struct soap *soap, const char *method, int canonical)
+@brief Adds SignedInfo element with SignatureMethod.
+@param soap context
+@param[in] method is the URI of the signature algorithm (e.g. ds_rsa_sha1)
+@param[in] canonical flag indicating that SignedInfo is signed in exc-c14n form
+@return SOAP_OK
+
+Note: the c14n:InclusiveNamespaces/PrefixList is set to "SOAP-ENV wsse".
+*/
+int
+soap_wsse_add_SignedInfo_SignatureMethod(struct soap *soap, const char *method, int canonical)
+{ ds__SignedInfoType *signedInfo = soap_wsse_add_SignedInfo(soap);
+  DBGFUN2("soap_wsse_add_SignedInfo_SignatureMethod", "method=%s", method?method:"", "canonical=%d", canonical);
+  /* if signed in exc-c14n form, populate CanonicalizationMethod element */
+  if (canonical)
+  { signedInfo->CanonicalizationMethod = (ds__CanonicalizationMethodType*)soap_malloc(soap, sizeof(ds__CanonicalizationMethodType));
+    soap_default_ds__CanonicalizationMethodType(soap, signedInfo->CanonicalizationMethod);
+    signedInfo->CanonicalizationMethod->Algorithm = (char*)c14n_URI;
+    /* TODO: check c14n:InclusiveNamespaces/PrefixList requirements */
+    signedInfo->CanonicalizationMethod->c14n__InclusiveNamespaces = (_c14n__InclusiveNamespaces*)soap_malloc(soap, sizeof(_c14n__InclusiveNamespaces));
+    soap_default__c14n__InclusiveNamespaces(soap, signedInfo->CanonicalizationMethod->c14n__InclusiveNamespaces);
+    signedInfo->CanonicalizationMethod->c14n__InclusiveNamespaces->PrefixList = "SOAP-ENV wsse";
+  }
+  /* populate SignatureMethod element */
+  signedInfo->SignatureMethod = (ds__SignatureMethodType*)soap_malloc(soap, sizeof(ds__SignatureMethodType));
+  soap_default_ds__SignatureMethodType(soap, signedInfo->SignatureMethod);
+  signedInfo->SignatureMethod->Algorithm = (char*)method;
+  return SOAP_OK;
+}
+
+/**
+@fn ds__SignedInfoType* soap_wsse_SignedInfo(struct soap *soap)
+@brief Returns SignedInfo element if present.
+@param soap context
+@return ds__SignedInfoType object or NULL
+*/
+struct ds__SignedInfoType*
+soap_wsse_SignedInfo(struct soap *soap)
+{ ds__SignatureType *signature = soap_wsse_Signature(soap);
+  if (signature)
+    return signature->SignedInfo;
+  return NULL;
+}
+
+/**
+@fn int soap_wsse_get_SignedInfo_SignatureMethod(struct soap *soap, int *alg)
+@brief Get SignatureMethod algorithm
+@param soap context
+@param[out] alg is SOAP_SMD_HMAC_SHA1, SOAP_SMD_VRFY_DSA_SHA1, or SOAP_SMD_VRFY_RSA_SHA1
+@return SOAP_OK or SOAP_FAULT with wsse:UnsupportedAlgorithm or wsse:FailedCheck fault
+*/
+int
+soap_wsse_get_SignedInfo_SignatureMethod(struct soap *soap, int *alg)
+{ ds__SignedInfoType *signedInfo = soap_wsse_SignedInfo(soap);
+  DBGFUN("soap_wsse_get_SignedInfo_SignatureMethod");
+  *alg = SOAP_SMD_NONE;
+  /* if we have a SignedInfo element, get the algorithm */
+  if (signedInfo
+   && signedInfo->SignatureMethod
+   && signedInfo->SignatureMethod->Algorithm)
+  { const char *method = signedInfo->SignatureMethod->Algorithm;
+    if (!strcmp(method, ds_hmac_sha1URI))
+      *alg = SOAP_SMD_HMAC_SHA1;
+    else if (!strcmp(method, ds_dsa_sha1URI))
+      *alg = SOAP_SMD_VRFY_DSA_SHA1;
+    else if (!strcmp(method, ds_rsa_sha1URI))
+      *alg = SOAP_SMD_VRFY_RSA_SHA1;
+    else
+      return soap_wsse_fault(soap, wsse__UnsupportedAlgorithm, method);
+    return SOAP_OK;
+  }
+  return soap_wsse_fault(soap, wsse__FailedCheck, "Signature required");
+}
+
+/******************************************************************************\
+ *
+ * ds:Signature/SignatureValue
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_wsse_add_SignatureValue(struct soap *soap, int alg, const void *key, int keylen)
+@brief Adds SignedInfo/SignatureMethod element, signs the SignedInfo element, and adds the resulting SignatureValue element.
+@param soap context
+@param[in] alg is SOAP_SMD_HMAC_SHA1, SOAP_SMD_SIGN_DSA_SHA1, or SOAP_SMD_SIGN_RSA_SHA1
+@param[in] key to use to sign (HMAC or EVP_PKEY)
+@param[in] keylen length of HMAC key
+@return SOAP_OK, SOAP_EOM, or fault
+
+To sign the SignedInfo element with this function, populate SignedInfo with
+Reference elements first using soap_wsse_add_SignedInfo_Reference. The
+SignedInfo element must not be modified after signing.
+
+The SOAP_XML_INDENT and SOAP_XML_CANONICAL flags are used to serialize the
+SignedInfo to compute the signature.
+*/
+int
+soap_wsse_add_SignatureValue(struct soap *soap, int alg, const void *key, int keylen)
+{ ds__SignatureType *signature = soap_wsse_add_Signature(soap);
+  const char *c14nexclude, *method = NULL;
+  char *sig;
+  int siglen;
+  DBGFUN1("soap_wsse_add_SignatureValue", "alg=%d", alg);
+  /* determine signature algorithm to use */
+  switch (alg)
+  { case SOAP_SMD_HMAC_SHA1:
+      method = ds_hmac_sha1URI;
+      break;
+    case SOAP_SMD_SIGN_DSA_SHA1:
+      method = ds_dsa_sha1URI;
+      break;
+    case SOAP_SMD_SIGN_RSA_SHA1:
+      method = ds_rsa_sha1URI;
+      break;
+    default:
+      return soap_wsse_fault(soap, wsse__UnsupportedAlgorithm, NULL);
+  }
+  /* populate SignedInfo/SignatureMethod based on SOAP_XML_CANONICAL flag */
+  soap_wsse_add_SignedInfo_SignatureMethod(soap, method, (soap->mode & SOAP_XML_CANONICAL));
+  /* use the gSOAP engine's look-aside buffer to temporarily hold the sig */
+  if (soap_store_lab(soap, NULL, soap_smd_size(alg, key)))
+    return SOAP_EOM;
+  sig = soap->labbuf;
+  /* we will serialize SignedInfo as it appears exactly in the SOAP Header */
+  /* set indent level for XML SignedInfo as it appears in the SOAP Header */
+  soap->level = 4;
+  /* with SOAP_XML_CANONICAL flag, exclude the "ds" prefix */
+  c14nexclude = soap->c14nexclude;
+  soap->c14nexclude = "ds";
+  /* use smdevp engine to sign SignedInfo */
+  if (soap_smd_begin(soap, alg, key, keylen)
+   || soap_out_ds__SignedInfoType(soap, "ds:SignedInfo", 0, signature->SignedInfo, NULL)
+   || soap_smd_end(soap, sig, &siglen))
+    return soap_wsse_fault(soap, wsse__InvalidSecurity, "Could not sign");
+  /* restore c14nexclude */
+  soap->c14nexclude = c14nexclude;
+  /* populate the SignatureValue element */
+  signature->SignatureValue = soap_s2base64(soap, sig, NULL, siglen);
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_wsse_verify_SignatureValue(struct soap *soap, int alg, const void *key, int keylen)
+@brief Verifies the SignatureValue of a SignedInfo element.
+@param soap context
+@param[in] alg is SOAP_SMD_HMAC_SHA1, SOAP_SMD_VRFY_DSA_SHA1, or SOAP_SMD_VRFY_RSA_SHA1 determined by the SignedInfo/SignatureMethod
+@param[in] key to use to verify (HMAC or EVP_PKEY)
+@param[in] keylen length of HMAC key
+@return SOAP_OK, SOAP_EOM, or fault
+
+This function searches for the SignedInfo element in the soap->dom DOM tree to
+verify the signature in the SignatureValue element. Using the DOM ensures we
+will verify the signature of a SignedInfo as it was exactly received by the
+parser, by using the -DWITH_DOM compile flag and SOAP_XML_DOM runtime flag. If
+there is no DOM, it verifies the signature of the deserialized SignedInfo
+element in the SOAP Header. However, serializing deserialized data may change
+the octet stream that was signed, unless we're using gSOAP as producers and
+consumers (with the SOAP_XML_INDENT flag reset).
+*/
+int
+soap_wsse_verify_SignatureValue(struct soap *soap, int alg, const void *key, int keylen)
+{ ds__SignatureType *signature = soap_wsse_Signature(soap);
+  DBGFUN1("soap_wsse_verify_SignatureValue", "alg=%d", alg);
+  /* always need an HMAC secret key or DSA/RSA public key to verify */
+  if (!key)
+    return soap_wsse_fault(soap, wsse__SecurityTokenUnavailable, NULL);
+  /* verify the SignedInfo element with the SignatureValue element */
+  if (signature
+   && signature->SignedInfo
+   && signature->SignatureValue)
+  { const char *sig;
+    int method, siglen;
+    /* check that we are using the intended signature algorithm */
+    if (soap_wsse_get_SignedInfo_SignatureMethod(soap, &method))
+      return soap->error;
+    if (alg != method)
+      return soap_wsse_fault(soap, wsse__FailedCheck, "Incorrect signature algorithm");
+    /* retrieve the signature */
+    sig = soap_base642s(soap, signature->SignatureValue, NULL, 0, &siglen);
+    /* search the DOM for SignedInfo */
+    if (soap->dom)
+    { struct soap_dom_element *elt;
+      /* traverse the DOM while searching for SignedInfo in the ds namespace */
+      for (elt = soap->dom; elt; elt = soap_dom_next_element(elt))
+      { if (elt->name
+         && elt->nstr
+	 && !strcmp(elt->nstr, ds_URI)
+	 && (!strcmp(elt->name, "SignedInfo") || !soap_tag_cmp(elt->name, "*:SignedInfo")))
+	  break;
+      }
+      /* found it? */
+      if (elt)
+      { /* output the DOM "as is" */
+	soap->mode &= ~SOAP_XML_CANONICAL;
+	soap->mode |= SOAP_DOM_ASIS;
+	/* should not include leading whitespace in signature verification */
+	elt->head = NULL;
+        /* use smdevp engine to verify SignedInfo */
+        if (soap_smd_begin(soap, alg, key, keylen)
+         || soap_out_xsd__anyType(soap, NULL, 0, elt, NULL)
+         || soap_smd_end(soap, (char*)sig, &siglen))
+          return soap_wsse_fault(soap, wsse__FailedCheck, NULL);
+        return SOAP_OK;
+      }
+    }
+    else
+    { int err = SOAP_OK;
+      const char *c14nexclude;
+      soap_mode mode;
+      /* serialize the SignedInfo element as it appeared in the SOAP Header */
+      soap->level = 4;
+      c14nexclude = soap->c14nexclude;
+      soap->c14nexclude = "ds";
+      mode = soap->mode;
+      if (signature->SignedInfo->CanonicalizationMethod)
+        soap->mode |= SOAP_XML_CANONICAL;
+      else
+        soap->mode &= ~SOAP_XML_CANONICAL;
+      if (soap_smd_begin(soap, alg, key, keylen)
+       || soap_out_ds__SignedInfoType(soap, "ds:SignedInfo", 0, signature->SignedInfo, NULL)
+       || soap_smd_end(soap, (char*)sig, &siglen))
+        err = soap->error;
+      soap->mode = mode;
+      soap->c14nexclude = c14nexclude;
+      if (err)
+        return soap_wsse_fault(soap, wsse__FailedCheck, NULL);
+      return SOAP_OK;
+    }
+  }
+  return soap_wsse_fault(soap, wsse__FailedCheck, "Signature required");
+}
+
+/**
+@fn int soap_wsse_verify_SignedInfo(struct soap *soap)
+@brief Verifies the digest values of the XML elements referenced by the SignedInfo References.
+@param soap context
+@return SOAP_OK or fault
+
+This function searches for the SignedInfo element in the soap->dom DOM tree to
+verify the digests contained therein. Using the DOM ensures we will verify the
+digests of the locally signed elements as they were exactly received by the
+parser, by using the -DWITH_DOM compile flag and SOAP_XML_DOM runtime flag. If
+there is no DOM, the function fails.
+*/
+int
+soap_wsse_verify_SignedInfo(struct soap *soap)
+{ ds__SignedInfoType *signedInfo = soap_wsse_SignedInfo(soap);
+  DBGFUN("soap_wsse_verify_SignedInfo");
+  if (signedInfo)
+  { int i;
+    /* must have at least one reference element */
+    if (signedInfo->__sizeReference == 0)
+      return soap_wsse_fault(soap, wsse__InvalidSecurity, "No SignedInfo/Reference");
+    /* for each reference element, check the digest */
+    for (i = 0; i < signedInfo->__sizeReference; i++)
+    { ds__ReferenceType *reference = signedInfo->Reference[i];
+      /* reference element is complete? */
+      if (!reference->URI
+       || !reference->DigestMethod
+       || !reference->DigestMethod->Algorithm
+       || !reference->DigestValue)
+        return soap_wsse_fault(soap, wsse__InvalidSecurity, "Incomplete SignedInfo/Reference");
+      /* reference is local? */
+      if (*reference->URI == '#')
+      { int alg;
+        unsigned char hash[SOAP_SMD_MAX_SIZE];
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Verifying digest of locally referenced data %s\n", reference->URI));
+	/* digest algorithm should be SHA1 */
+        if (!strcmp(reference->DigestMethod->Algorithm, ds_sha1URI))
+          alg = SOAP_SMD_DGST_SHA1;
+        else
+          return soap_wsse_fault(soap, wsse__UnsupportedAlgorithm, reference->DigestMethod->Algorithm);
+	/* if reference has a transform, it should be an exc-c14n transform */
+        if (reference->Transforms
+	 && (reference->Transforms->__sizeTransform != 1
+	  || !reference->Transforms->Transform[0].Algorithm
+	  || strcmp(reference->Transforms->Transform[0].Algorithm, c14n_URI)))
+          return soap_wsse_fault(soap, wsse__UnsupportedAlgorithm, reference->Transforms->Transform[0].Algorithm);
+	/* convert base64 digest to binary */
+	soap_base642s(soap, reference->DigestValue, hash, SOAP_SMD_MAX_SIZE, NULL);
+	/* verify the digest of a locally signed element */
+        if (soap_wsse_verify_digest(soap, alg, reference->URI + 1, hash))
+	  return soap->error;
+      }
+    }
+    return SOAP_OK;
+  }
+  return soap_wsse_fault(soap, wsse__InvalidSecurity, "No SignedInfo");
+}
+
+/**
+@fn int soap_wsse_verify_digest(struct soap *soap, int alg, const char *id, unsigned char hash[SOAP_SMD_MAX_SIZE])
+@brief Verifies the digest value of an XML element referenced by id against the hash.
+@param soap context
+@param[in] alg digest algorithm
+@param[in] id string of the XML element to verify
+@param[in] hash digest value to verify against
+@return SOAP_OK or fault
+*/
+int
+soap_wsse_verify_digest(struct soap *soap, int alg, const char *id, unsigned char hash[SOAP_SMD_MAX_SIZE])
+{ struct soap_dom_element *elt;
+  DBGFUN1("soap_wsse_verify_digest", "alg=%d", alg);
+  /* traverse the DOM to find the element with matching wsu:Id or ds:Id */
+  for (elt = soap->dom; elt; elt = soap_dom_next_element(elt))
+  { struct soap_dom_attribute *att;
+    for (att = elt->atts; att; att = att->next)
+    { /* check attribute */
+      if (att->name
+       && att->nstr
+       && (!strcmp(att->nstr, wsu_URI) || !strcmp(att->nstr, ds_URI))
+       && (!strcmp(att->name, "Id") || !soap_tag_cmp(att->name, "*:Id")))
+      { /* found a match, compare attribute value with id */
+        if (att->data && !strcmp(att->data, id))
+        { unsigned char HA[SOAP_SMD_SHA1_SIZE];
+          int len;
+	  /* compute digest over DOM node "as is" */
+	  soap->mode &= ~SOAP_XML_CANONICAL;
+	  soap->mode |= SOAP_DOM_ASIS;
+	  /* do not hash leading whitespace */
+	  elt->head = NULL;
+          /* compute digest */
+	  if (soap_smd_begin(soap, alg, NULL, 0)
+	   || soap_out_xsd__anyType(soap, NULL, 0, elt, NULL)
+	   || soap_smd_end(soap, HA, &len))
+            return soap_wsse_fault(soap, wsse__FailedCheck, "Could not compute digest");
+	  /* compare digests, success if identical */
+	  if (!memcmp(hash, HA, (size_t)len))
+	    return SOAP_OK;
+          return soap_wsse_fault(soap, wsse__FailedCheck, "SignedInfo digest mismatch");
+	}
+      }
+    }
+  }
+  return soap_wsse_fault(soap, wsse__FailedCheck, "SignedInfo reference target not found");
+}
+
+/******************************************************************************\
+ *
+ * ds:Signature/KeyInfo
+ *
+\******************************************************************************/
+
+/**
+@fn ds__KeyInfoType* soap_wsse_add_KeyInfo(struct soap *soap)
+@brief Adds KeyInfo element.
+@param soap context
+@return ds__KeyInfo object
+*/
+struct ds__KeyInfoType*
+soap_wsse_add_KeyInfo(struct soap *soap)
+{ ds__SignatureType *signature = soap_wsse_add_Signature(soap);
+  if (!signature->KeyInfo)
+    signature->KeyInfo = (ds__KeyInfoType*)soap_malloc(soap, sizeof(ds__KeyInfoType));
+  soap_default_ds__KeyInfoType(soap, signature->KeyInfo);
+  return signature->KeyInfo;
+}
+
+/**
+@fn ds__KeyInfoType* soap_wsse_KeyInfo(struct soap *soap)
+@brief Returns KeyInfo element if present.
+@param soap context
+@return ds__KeyInfo object or NULL
+*/
+struct ds__KeyInfoType*
+soap_wsse_KeyInfo(struct soap *soap)
+{ ds__SignatureType *signature = soap_wsse_Signature(soap);
+  if (signature)
+    return signature->KeyInfo;
+  return NULL;
+}
+
+/******************************************************************************\
+ *
+ * ds:Signature/KeyInfo/KeyName
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_wsse_add_KeyInfo_KeyName(struct soap *soap, const char *name)
+@brief Adds KeyName element.
+@param soap context
+@param[in] name string of the KeyName
+@return SOAP_OK
+
+Note: the recommended method to add Key information is to utilize KeyIdentifier
+instead of KeyName. A KeyName is useful mainly for internal use.
+*/
+int
+soap_wsse_add_KeyInfo_KeyName(struct soap *soap, const char *name)
+{ ds__KeyInfoType *keyInfo = soap_wsse_add_KeyInfo(soap);
+  DBGFUN1("soap_wsse_add_KeyInfo_KeyName", "name=%s", name);
+  /* populate the KeyName element */
+  keyInfo->KeyName = soap_strdup(soap, name);
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_wsse_get_KeyInfo_KeyName(struct soap *soap)
+@brief Returns KeyName element if present.
+@param soap context
+@return string or NULL
+*/
+const char*
+soap_wsse_get_KeyInfo_KeyName(struct soap *soap)
+{ ds__KeyInfoType *keyInfo = soap_wsse_KeyInfo(soap);
+  DBGFUN("soap_wsse_get_KeyInfo_KeyName");
+  if (!keyInfo)
+    return NULL;
+  return keyInfo->KeyName;
+}
+
+/******************************************************************************\
+ *
+ * ds:Signature/KeyInfo/wsse:SecurityTokenReference/Reference/@URI
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_wsse_add_KeyInfo_SecurityTokenReferenceURI(struct soap *soap, const char *URI, const char *valueType)
+@brief Adds KeyInfo element with SecurityTokenReference URI.
+@param soap context
+@param[in] URI string referencing a security token
+@param[in] valueType string or NULL
+@return SOAP_OK
+*/
+int
+soap_wsse_add_KeyInfo_SecurityTokenReferenceURI(struct soap *soap, const char *URI, const char *valueType)
+{ ds__KeyInfoType *keyInfo = soap_wsse_add_KeyInfo(soap);
+  DBGFUN2("soap_wsse_add_KeyInfo_SecurityTokenReferenceURI", "URI=%s", URI?URI:"", "valueType=%s", valueType?valueType:"");
+  /* allocate SecurityTokenReference element if we don't have one already */
+  if (!keyInfo->wsse__SecurityTokenReference)
+    keyInfo->wsse__SecurityTokenReference = (_wsse__SecurityTokenReference*)soap_malloc(soap, sizeof(_wsse__SecurityTokenReference));
+  soap_default__wsse__SecurityTokenReference(soap, keyInfo->wsse__SecurityTokenReference);
+  /* allocate Reference element */
+  keyInfo->wsse__SecurityTokenReference->Reference = (_wsse__Reference*)soap_malloc(soap, sizeof(_wsse__Reference));
+  soap_default__wsse__Reference(soap, keyInfo->wsse__SecurityTokenReference->Reference);
+  /* populate the Reference element */
+  keyInfo->wsse__SecurityTokenReference->Reference->URI = soap_strdup(soap, URI);
+  keyInfo->wsse__SecurityTokenReference->Reference->ValueType = soap_strdup(soap, valueType);
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_wsse_add_KeyInfo_SecurityTokenReferenceX509(struct soap *soap, const char *URI)
+@brief Adds KeyInfo element with SecurityTokenReference URI to an X509 cert.
+@param soap context
+@param[in] URI string referencing an X509 certificate
+@return SOAP_OK
+*/
+int
+soap_wsse_add_KeyInfo_SecurityTokenReferenceX509(struct soap *soap, const char *URI)
+{ return soap_wsse_add_KeyInfo_SecurityTokenReferenceURI(soap, URI, wsse_X509v3URI);
+}
+
+/**
+@fn const char* soap_wsse_get_KeyInfo_SecurityTokenReferenceURI(struct soap *soap)
+@brief Returns a SecurityTokenReference URI if present.
+@param soap context
+@return string or NULL
+*/
+const char*
+soap_wsse_get_KeyInfo_SecurityTokenReferenceURI(struct soap *soap)
+{ ds__KeyInfoType *keyInfo = soap_wsse_KeyInfo(soap);
+  if (keyInfo
+   && keyInfo->wsse__SecurityTokenReference
+   && keyInfo->wsse__SecurityTokenReference->Reference)
+    return keyInfo->wsse__SecurityTokenReference->Reference->URI;
+  return NULL;
+}
+
+/**
+@fn X509* soap_wsse_get_KeyInfo_SecurityTokenReferenceX509(struct soap *soap)
+@brief Returns a X509 certificate if present as a BinarySecurity token.
+@param soap context
+@return X509 object or NULL with wsse:SecurityTokenUnavailable fault
+*/
+X509*
+soap_wsse_get_KeyInfo_SecurityTokenReferenceX509(struct soap *soap)
+{ const char *URI = soap_wsse_get_KeyInfo_SecurityTokenReferenceURI(soap);
+  DBGFUN("soap_wsse_get_KeyInfo_SecurityTokenReferenceX509");
+  /* TODO: can't hurt to double check Reference->ValueType */
+  if (URI && *URI == '#')
+    return soap_wsse_get_BinarySecurityTokenX509(soap, URI + 1);
+  return NULL;
+}
+
+/******************************************************************************\
+ *
+ * ds:Signature/KeyInfo/wsse:SecurityTokenReference/Reference/KeyIdentifier
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_wsse_add_KeyInfo_SecurityTokenReferenceKeyIdentifier(struct soap *soap, const char *id, const char *valueType, unsigned char *data, int size)
+@brief Adds KeyInfo element with SecurityTokenReference/KeyIdentifier binary data
+@param soap context
+@param[in] id string for signature reference
+@param[in] valueType string
+@param[in] data binary data
+@param[in] size of binary data
+@return SOAP_OK
+*/
+int
+soap_wsse_add_KeyInfo_SecurityTokenReferenceKeyIdentifier(struct soap *soap, const char *id, const char *valueType, unsigned char *data, int size)
+{ ds__KeyInfoType *keyInfo = soap_wsse_add_KeyInfo(soap);
+  DBGFUN2("soap_wsse_add_KeyInfo_SecurityTokenReferenceKeyIdentifier", "id=%s", id?id:"", "valueType=%s", valueType?valueType:"");
+  /* allocate SecurityTokenReference if we don't have one already */
+  if (!keyInfo->wsse__SecurityTokenReference)
+    keyInfo->wsse__SecurityTokenReference = (_wsse__SecurityTokenReference*)soap_malloc(soap, sizeof(_wsse__SecurityTokenReference));
+  soap_default__wsse__SecurityTokenReference(soap, keyInfo->wsse__SecurityTokenReference);
+  /* allocate KeyIdentifier */
+  keyInfo->wsse__SecurityTokenReference->KeyIdentifier = (_wsse__KeyIdentifier*)soap_malloc(soap, sizeof(_wsse__KeyIdentifier));
+  soap_default__wsse__KeyIdentifier(soap, keyInfo->wsse__SecurityTokenReference->KeyIdentifier);
+  /* populate KeyIdentifier */
+  keyInfo->wsse__SecurityTokenReference->KeyIdentifier->wsu__Id = soap_strdup(soap, id);
+  keyInfo->wsse__SecurityTokenReference->KeyIdentifier->ValueType = soap_strdup(soap, valueType);
+  keyInfo->wsse__SecurityTokenReference->KeyIdentifier->EncodingType = (char*)wsse_Base64BinaryURI;
+  keyInfo->wsse__SecurityTokenReference->KeyIdentifier->__item = soap_s2base64(soap, data, NULL, size);
+  return SOAP_OK;
+}
+
+/**
+@fn const char* soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifierValueType(struct soap *soap)
+@brief Returns KeyInfo/SecurityTokenReference/KeyIdentifier/ValueType if present
+@param soap context
+@return string or NULL
+*/
+const char*
+soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifierValueType(struct soap *soap)
+{ ds__KeyInfoType *keyInfo = soap_wsse_KeyInfo(soap);
+  DBGFUN("soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifierValueType");
+  if (!keyInfo
+   || !keyInfo->wsse__SecurityTokenReference
+   || !keyInfo->wsse__SecurityTokenReference->KeyIdentifier)
+    return NULL;
+  return keyInfo->wsse__SecurityTokenReference->KeyIdentifier->ValueType;
+}
+
+/**
+@fn const unsigned char* soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifier(struct soap *soap, int *size)
+@brief Returns KeyInfo/SecurityTokenReference/KeyIdentifier binary data
+@param soap context
+@param[out] size is set to the size of the decoded data
+@return data or NULL
+*/
+const unsigned char*
+soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifier(struct soap *soap, int *size)
+{ ds__KeyInfoType *keyInfo = soap_wsse_KeyInfo(soap);
+  DBGFUN("soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifier");
+  if (!keyInfo
+   || !keyInfo->wsse__SecurityTokenReference
+   || !keyInfo->wsse__SecurityTokenReference->KeyIdentifier)
+    return NULL;
+  return soap_base642s(soap, keyInfo->wsse__SecurityTokenReference->KeyIdentifier->__item, NULL, 0, size);
+}
+
+/******************************************************************************\
+ *
+ * ds:Signature/KeyInfo/wsse:SecurityTokenReference/Reference/Embedded
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_wsse_add_KeyInfo_SecurityTokenReferenceEmbedded(struct soap *soap, const char *id, const char *valueType)
+@brief Adds KeyInfo element with Embedded SecurityTokenReference.
+@param soap context
+@param[in] id string for signature reference
+@param[in] valueType string
+@return SOAP_OK
+
+Note: this function is under construction and the result depends on usage
+scenarios deployed in practice.
+*/
+int
+soap_wsse_add_KeyInfo_SecurityTokenReferenceEmbedded(struct soap *soap, const char *id, const char *valueType)
+{ ds__KeyInfoType *keyInfo = soap_wsse_add_KeyInfo(soap);
+  DBGFUN("soap_wsse_get_KeyInfo_SecurityTokenReferenceEmbedded");
+  /* allocate SecurityTokenReference if we don't have one already */
+  if (!keyInfo->wsse__SecurityTokenReference)
+    keyInfo->wsse__SecurityTokenReference = (_wsse__SecurityTokenReference*)soap_malloc(soap, sizeof(_wsse__SecurityTokenReference));
+  soap_default__wsse__SecurityTokenReference(soap, keyInfo->wsse__SecurityTokenReference);
+  /* allocate Embedded element */
+  keyInfo->wsse__SecurityTokenReference->Embedded = (_wsse__Embedded*)soap_malloc(soap, sizeof(_wsse__Embedded));
+  soap_default__wsse__Embedded(soap, keyInfo->wsse__SecurityTokenReference->Embedded);
+  /* populate Embedded element */
+  keyInfo->wsse__SecurityTokenReference->Embedded->wsu__Id = soap_strdup(soap, id);
+  keyInfo->wsse__SecurityTokenReference->Embedded->ValueType = soap_strdup(soap, valueType);
+  /* TODO: Add embedded tokens and assertions. Could use DOM here?
+  keyInfo->wsse__SecurityTokenReference->Embedded->xyz = ...;
+  */
+  return SOAP_OK;
+}
+
+/******************************************************************************\
+ *
+ * Faults
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_wsse_fault(struct soap *soap, wsse__FaultcodeEnum fault, const char *detail)
+@brief Sets SOAP Fault (sub)code for server response.
+@param soap context
+@param[in] fault is one of wsse:FaultcodeEnum
+@param[in] detail string with optional text message
+@return SOAP_FAULT
+*/
+int
+soap_wsse_fault(struct soap *soap, wsse__FaultcodeEnum fault, const char *detail)
+{ const char *code = soap_wsse__FaultcodeEnum2s(soap, fault);
+  DBGFUN2("soap_wsse_fault", "fault=%s", code?code:"", "detail=%s", detail?detail:"");
+  /* remove incorrect or incomplete Security header */
+  soap_wsse_delete_Security(soap);
+  /* populate the SOAP Fault as per WS-Security spec */
+  switch (fault)
+  { case wsse__UnsupportedSecurityToken:
+      return soap_sender_fault_subcode(soap, code, "An unsupported token was provided", detail);
+    case wsse__UnsupportedAlgorithm:
+      return soap_sender_fault_subcode(soap, code, "An unsupported signature or encryption algorithm was used", detail);
+    case wsse__InvalidSecurity:
+      return soap_sender_fault_subcode(soap, code, "An error was discovered processing the <wsse:Security> header", detail);
+    case wsse__InvalidSecurityToken:
+      return soap_sender_fault_subcode(soap, code, "An invalid security token was provided", detail);
+    case wsse__FailedAuthentication:
+      return soap_sender_fault_subcode(soap, code, "The security token could not be authenticated or authorized", detail);
+    case wsse__FailedCheck:
+      return soap_sender_fault_subcode(soap, code, "The signature or decryption was invalid", detail);
+    case wsse__SecurityTokenUnavailable:
+      return soap_sender_fault_subcode(soap, code, "Referenced security token could not be retrieved", detail);
+  }
+  return SOAP_FAULT;
+}
+
+/******************************************************************************\
+ *
+ * Digest authentication session management
+ *
+\******************************************************************************/
+
+/**
+@fn static int soap_wsse_session_verify(struct soap *soap, const char hash[SOAP_SMD_SHA1_SIZE], const char *created, const char *nonce)
+@brief Verifies and updates the digest, nonce, and creation time against the digest authentication session database to prevent replay attacks.
+@param soap context
+@param[in] hash binary digest value of PasswordDigest
+@param[in] created string
+@param[in] nonce string (base64)
+@return SOAP_OK or SOAP_FAULT
+*/
+static int
+soap_wsse_session_verify(struct soap *soap, const char hash[SOAP_SMD_SHA1_SIZE], const char *created, const char *nonce)
+{ struct soap_wsse_session *session;
+  time_t expired, now = time(NULL);
+  DBGFUN("soap_wsse_session_verify");
+  soap_s2dateTime(soap, created, &expired);
+  /* creation time in the future? */
+  if (expired > now + SOAP_WSSE_CLKSKEW)
+    return soap_wsse_fault(soap, wsse__FailedAuthentication, "Authorization request in future");
+  expired += SOAP_WSSE_NONCETIME;
+  /* expired? */
+  if (expired <= now)
+    return soap_wsse_fault(soap, wsse__FailedAuthentication, "Authentication expired");
+  /* purge expired messages, but don't do this all the time to improve efficiency */
+  if (now % 10 == 0)
+    soap_wsse_session_cleanup(soap);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Verifying session nonce=%s\n", nonce));
+  /* enter mutex to check and update session */
+  MUTEX_LOCK(soap_wsse_session_lock);
+  for (session = soap_wsse_session; session; session = session->next)
+  { if (!memcmp(session->hash, hash, SOAP_SMD_SHA1_SIZE) && !strcmp(session->nonce, nonce))
+      break;
+  }
+  /* if not found, allocate new session data */
+  if (!session)
+  { session = (struct soap_wsse_session*)malloc(sizeof(struct soap_wsse_session) + strlen(nonce));
+    if (session)
+    { session->next = soap_wsse_session;
+      session->expired = expired;
+      memcpy(session->hash, hash, SOAP_SMD_SHA1_SIZE);
+      strcpy(session->nonce, nonce);
+      soap_wsse_session = session;
+    }
+    session = NULL;
+  }
+  /* exit mutex */
+  MUTEX_UNLOCK(soap_wsse_session_lock);
+  /* if replay attack, return non-descript failure */
+  if (session)
+    return soap_wsse_fault(soap, wsse__FailedAuthentication, NULL);
+  return SOAP_OK;
+}
+
+/**
+@fn static void soap_wsse_session_cleanup(struct soap *soap)
+@brief Removes expired authentication data from the digest authentication session database.
+@param soap context
+*/
+static void
+soap_wsse_session_cleanup(struct soap *soap)
+{ struct soap_wsse_session **session;
+  time_t now = time(NULL);
+  DBGFUN("soap_wsse_session_cleanup");
+  /* enter mutex to purge expired session data */
+  MUTEX_LOCK(soap_wsse_session_lock);
+  session = &soap_wsse_session;
+  while (*session)
+  { if ((*session)->expired < now)
+    { struct soap_wsse_session *p = *session;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deleting session nonce=%s\n", p->nonce));
+      *session = p->next;
+      free(p);
+    }
+    else
+      session = &(*session)->next;
+  }
+  /* exit mutex */
+  MUTEX_UNLOCK(soap_wsse_session_lock);
+}
+
+/******************************************************************************\
+ *
+ * Calculate SHA1(created, nonce, password) digest
+ *
+\******************************************************************************/
+
+/**
+@fn static void calc_digest(struct soap *soap, const char *created, const char *nonce, int noncelen, const char *password, char hash[SOAP_SMD_SHA1_SIZE])
+@brief Calculates digest value SHA1(created, nonce, password)
+@param soap context
+@param[in] created string (XSD dateTime format)
+@param[in] nonce value
+@param[in] noncelen length of nonce value
+@param[in] password string
+@param[out] hash SHA1 digest
+*/
+static void
+calc_digest(struct soap *soap, const char *created, const char *nonce, int noncelen, const char *password, char hash[SOAP_SMD_SHA1_SIZE])
+{ struct soap_smd_data context;
+  /* use smdevp engine */
+  soap_smd_init(soap, &context, SOAP_SMD_DGST_SHA1, NULL, 0);
+  soap_smd_update(soap, &context, created, strlen(created));
+  soap_smd_update(soap, &context, nonce, noncelen);
+  soap_smd_update(soap, &context, password, strlen(password));
+  soap_smd_final(soap, &context, hash, NULL);
+}
+
+/******************************************************************************\
+ *
+ * Calculate randomized hex nonce
+ *
+\******************************************************************************/
+
+/**
+@fn static void calc_nonce(struct soap *soap, char nonce[SOAP_WSSE_NONCELEN])
+@brief Calculates randomized nonce
+@param soap context
+@param[out] nonce value
+*/
+static void
+calc_nonce(struct soap *soap, char nonce[SOAP_WSSE_NONCELEN])
+{ static short count = 0xCA53;
+  char buf[SOAP_WSSE_NONCELEN + 1];
+  /* TODO: nonce is converted to base64 so we could use raw binary instead of hex */
+  sprintf(buf, "%8.8x%4.4hx%8.8x", (int)time(NULL), count++, soap_random);
+  memcpy(nonce, buf, SOAP_WSSE_NONCELEN);
+}
+
+/******************************************************************************\
+ *
+ * Plugin registry functions
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_wsse(struct soap *soap, struct soap_plugin *p, void *arg)
+@brief Plugin registry function, used with soap_register_plugin.
+@param soap context
+@param[in,out] p plugin created in registry
+@param[in] arg passed from soap_register_plugin_arg
+@return SOAP_OK
+*/
+int
+soap_wsse(struct soap *soap, struct soap_plugin *p, void *arg)
+{ DBGFUN("soap_wsse");
+  p->id = soap_wsse_id;
+  p->data = (void*)SOAP_MALLOC(soap, sizeof(struct soap_wsse_data));
+  p->fcopy = soap_wsse_copy;
+  p->fdelete = soap_wsse_delete;
+  if (p->data)
+  { if (soap_wsse_init(soap, (struct soap_wsse_data*)p->data))
+    { SOAP_FREE(soap, p->data);
+      return SOAP_EOM;
+    }
+  }
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_wsse_init(struct soap *soap, struct soap_wsse_data *data)
+@brief Initializes plugin data.
+@param soap context
+@param[in,out] data plugin data
+@return SOAP_OK
+*/
+static int
+soap_wsse_init(struct soap *soap, struct soap_wsse_data *data)
+{ static int done = 0;
+  DBGFUN("soap_wsse_init");
+#ifdef WITH_OPENSSL
+  /* OpenSSL: make sure we have the digest algorithms */
+  if (!done)
+  { done = 1;
+    OpenSSL_add_all_digests();
+    OpenSSL_add_all_algorithms();
+  }
+#endif
+  data->sign_alg = SOAP_SMD_NONE;
+  data->sign_key = NULL;
+  data->sign_keylen = 0;
+  data->vrfy_alg = SOAP_SMD_NONE;
+  data->vrfy_key = NULL;
+  data->vrfy_keylen = 0;
+  data->digest = NULL;
+  data->fprepareinit = NULL;
+  data->fpreparesend = NULL;
+  data->fpreparefinal = NULL;
+  data->fdisconnect = NULL;
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_wsse_copy(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src)
+@brief Copies plugin data to localize plugin data for threads.
+@param soap context
+@param[out] dst target plugin
+@param[in] src source plugin
+@return SOAP_OK
+*/
+static int
+soap_wsse_copy(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src)
+{ DBGFUN("soap_wsse_copy");
+  *dst = *src;
+  dst->data = (void*)SOAP_MALLOC(soap, sizeof(struct soap_wsse_data));
+  soap_wsse_init(soap, (struct soap_wsse_data*)dst->data);
+  return SOAP_OK;
+}
+
+/**
+@fn void soap_wsse_delete(struct soap *soap, struct soap_plugin *p)
+@brief Deletes plugin data.
+@param soap context
+@param[in,out] p plugin
+@return SOAP_OK
+*/
+static void
+soap_wsse_delete(struct soap *soap, struct soap_plugin *p)
+{ struct soap_wsse_data *data = (struct soap_wsse_data*)soap_lookup_plugin(soap, soap_wsse_id);
+  DBGFUN("soap_wsse_delete");
+  if (data)
+  { soap_wsse_preparecleanup(soap, data);
+    SOAP_FREE(soap, data);
+  }
+}
+
+/******************************************************************************\
+ *
+ * Plugin-specific functions
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_wsse_sign(struct soap *soap, int alg, const void *key, int keylen)
+@brief Uses the wsse plugin to sign all wsu:Id attributed elements.
+@param soap context
+@param[in] alg is the signature algorithm SOAP_SMD_HMAC_SHA1, SOAP_SMD_SIGN_DSA_SHA1, or SOAP_SMD_SIGN_RSA_SHA1
+@param[in] key is the HMAC secret key or DSA/RSA private EVP_PKEY
+@param[in] keylen is the HMAC key length
+@return SOAP_OK or fault
+
+This function does not actually sign the message, but initiates the plugin's
+signature algorithm to sign the message upon message transfer.
+*/
+int
+soap_wsse_sign(struct soap *soap, int alg, const void *key, int keylen)
+{ struct soap_wsse_digest *digest, *next;
+  struct soap_wsse_data *data = (struct soap_wsse_data*)soap_lookup_plugin(soap, soap_wsse_id);
+  DBGFUN1("soap_wsse_sign", "alg=%d", alg);
+  if (!data)
+    return soap_set_receiver_error(soap, "soap_wsse_sign", "Plugin not registered", SOAP_PLUGIN_ERROR);
+  if (!alg || !key)
+    return soap_wsse_fault(soap, wsse__InvalidSecurity, "Invalid signature algorithm or key");
+  /* store alg and key in plugin data */
+  data->sign_alg = alg;
+  data->sign_key = key;
+  data->sign_keylen = keylen;
+  /* save and set the plugin's callbacks to preprocess outbound messages */
+  if (soap->fprepareinit != soap_wsse_prepareinit)
+  { data->fprepareinit = soap->fprepareinit;
+    soap->fprepareinit = soap_wsse_prepareinit;
+  }
+  if (soap->fpreparesend != soap_wsse_preparesend)
+  { data->fpreparesend = soap->fpreparesend;
+    data->fpreparefinal = soap->fpreparefinal;
+  }
+  if (soap->fpreparefinal != soap_wsse_preparefinal)
+  { soap->fpreparesend = soap_wsse_preparesend;
+    soap->fpreparefinal = soap_wsse_preparefinal;
+  }
+  /* cleanup the digest data */
+  for (digest = data->digest; digest; digest = next)
+  { next = digest->next;
+    SOAP_FREE(soap, digest);
+  }
+  data->digest = NULL;
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_wsse_sign_body(struct soap *soap, int alg, const void *key, int keylen)
+@brief Uses the wsse plugin to sign all wsu:Id attributed elements, including the SOAP Body (by adding a wsu:Id="Body" attribute).
+@param soap context
+@param[in] alg is the signature algorithm SOAP_SMD_HMAC_SHA1, SOAP_SMD_SIGN_DSA_SHA1, or SOAP_SMD_SIGN_RSA_SHA1
+@param[in] key is the HMAC secret key or DSA/RSA private EVP_PKEY
+@param[in] keylen is the HMAC key length
+@return SOAP_OK
+
+This function does not actually sign the message, but initiates the plugin's
+signature algorithm to sign the message upon message transfer.
+*/
+int
+soap_wsse_sign_body(struct soap *soap, int alg, const void *key, int keylen)
+{ int err;
+  DBGFUN1("soap_wsse_sign_body", "alg=%d", alg);
+  soap->omode |= SOAP_XML_SEC;
+  err = soap_wsse_sign(soap, alg, key, keylen);
+  return err;
+}
+
+/**
+@fn int soap_wsse_verify_init(struct soap *soap)
+@brief Uses the wsse plugin to initiate the verification of the signature and SignedInfo Reference digests.
+@param soap context
+@return SOAP_OK
+
+This function does not actually verify the message, but initiates the plugin's
+data to store the message in a DOM to verify the signature. The signature and
+digests in the DOM must be verified manually.
+*/
+int
+soap_wsse_verify_init(struct soap *soap)
+{ DBGFUN("soap_wsse_verify_init");
+  /* deserialize inbound message to DOM */
+  soap->imode |= SOAP_XML_DOM;
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_wsse_verify_auto(struct soap *soap, int alg, const void *key, size_t keylen)
+@brief Uses the wsse plugin to initiate the automatic verification of the signature and SignedInfo Reference digests.
+@param soap context
+@param[in] alg to verify signature if signature has no secret or public key, use SOAP_SMD_NONE to omit
+@param[in] key is HMAC key or EVP_PKEY
+@param[in] keylen is HMAC key length
+@return SOAP_OK
+
+This function does not actually verify the message, but initiates the plugin's
+algorithm to store the message in a DOM to automatically verify the signature
+and digestes. If the message does not contain a key to verify the signature,
+the alg, key, and keylen parameters are used. It is important that the X509
+certificate used to verify the signature is verified, which requires
+soap->cafile and/or soap->capath to be set.
+*/
+int
+soap_wsse_verify_auto(struct soap *soap, int alg, const void *key, size_t keylen)
+{ struct soap_wsse_data *data = (struct soap_wsse_data*)soap_lookup_plugin(soap, soap_wsse_id);
+  DBGFUN("soap_wsse_verify_auto");
+  if (!data)
+    return soap_set_receiver_error(soap, "soap_wsse_verify_auto", "Plugin not registered", SOAP_PLUGIN_ERROR);
+  data->vrfy_alg = alg;
+  data->vrfy_key = key;
+  data->vrfy_keylen = keylen;
+  if (soap->fdisconnect != soap_wsse_disconnect)
+  { data->fdisconnect = soap->fdisconnect;
+    soap->fdisconnect = soap_wsse_disconnect; 
+  }
+  return soap_wsse_verify_init(soap);
+}
+
+/**
+@fn int soap_wsse_verify_done(struct soap *soap)
+@brief Terminates the automatic verification of signatures.
+@param soap context
+@return SOAP_OK
+*/
+int
+soap_wsse_verify_done(struct soap *soap)
+{ struct soap_wsse_data *data = (struct soap_wsse_data*)soap_lookup_plugin(soap, soap_wsse_id);
+  DBGFUN("soap_wsse_verify_done");
+  if (!data)
+    return soap_set_receiver_error(soap, "soap_wsse_verify_done", "Plugin not registered", SOAP_PLUGIN_ERROR);
+  soap->imode &= ~SOAP_XML_DOM;
+  if (soap->fdisconnect == soap_wsse_disconnect)
+    soap->fdisconnect = data->fdisconnect;
+  return SOAP_OK;
+}
+
+/******************************************************************************\
+ *
+ * Callbacks registered by plugin
+ *
+\******************************************************************************/
+
+/**
+@fn int soap_wsse_prepareinit(struct soap *soap)
+@brief Initiates message preprocessing with gSOAP engine's prepareinit callback.
+@param soap context
+@return SOAP_OK or fault
+
+This callback is invoked to analyze a message before transmission.
+*/
+static int
+soap_wsse_prepareinit(struct soap *soap)
+{ struct soap_wsse_data *data = (struct soap_wsse_data*)soap_lookup_plugin(soap, soap_wsse_id);
+  DBGFUN("soap_wsse_prepareinit");
+  if (!data)
+    return SOAP_PLUGIN_ERROR;
+  if (data->fprepareinit)
+    return data->fprepareinit(soap);
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_wsse_preparesend(struct soap *soap, const char *buf, size_t len)
+@brief Takes a piece of the XML message (tokenized) to compute digest.
+@param soap context
+@param[in] buf string (XML "tokenized") to be send
+@param[in] len buf length
+@return SOAP_OK or fault
+
+This callback is invoked to analyze a message (usually during the HTTP content
+length phase).  Note: nested elements with wsu:Id attributes cannot be
+individually signed in this release.
+*/
+static int
+soap_wsse_preparesend(struct soap *soap, const char *buf, size_t len)
+{ struct soap_wsse_data *data = (struct soap_wsse_data*)soap_lookup_plugin(soap, soap_wsse_id);
+  DBGFUN("soap_wsse_preparesend");
+  if (!data)
+    return SOAP_PLUGIN_ERROR;
+  /* the gSOAP engine signals the start of a wsu:Id element */
+  if (soap->part == SOAP_BEGIN_SECURITY)
+  { /* found element with wsu:Id and change engine state */
+    soap->part = SOAP_IN_SECURITY;
+    if (data->digest && data->digest->level)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Nested hashing for signature not possible, wsu:Id='%s' ignored\n", soap->id));
+    }
+    else
+    { /* initialize smdevp engine */
+      struct soap_wsse_digest *digest;
+      digest = (struct soap_wsse_digest*)SOAP_MALLOC(soap, sizeof(struct soap_wsse_digest) + strlen(soap->id) + 1);
+      digest->next = data->digest;
+      digest->level = soap->level;
+      soap_smd_init(soap, &digest->smd, SOAP_SMD_DGST_SHA1, NULL, 0);
+      memset(digest->hash, 0, sizeof(digest->hash));
+      digest->id[0] = '#';
+      strcpy(digest->id + 1, soap->id);
+      data->digest = digest;
+      /* omit indent for indented XML (next time around, we will catch '<') */
+      if (*buf != '<')
+        goto end;
+    }
+  }
+  if (soap->part == SOAP_IN_SECURITY)
+  { /* update smdevp engine */
+    if (data->digest)
+    { soap_smd_update(soap, &data->digest->smd, buf, len);
+      if (soap->level < data->digest->level)
+      { soap->part = SOAP_END_SECURITY;
+	soap_smd_final(soap, &data->digest->smd, data->digest->hash, NULL);
+        data->digest->level = 0;
+      }
+    }
+  }
+end:
+  if (data->fpreparesend)
+    return data->fpreparesend(soap, buf, len);
+  return SOAP_OK;
+}
+
+/**
+@fn int soap_wsse_preparefinal(struct soap *soap)
+@brief Collects the digests of all the wsu:Id elements and populates the SignedInfo.
+@param soap context
+@return SOAP_OK or fault
+
+This callback is invoked just before the message is send.
+*/
+static int
+soap_wsse_preparefinal(struct soap *soap)
+{ struct soap_wsse_data *data = (struct soap_wsse_data*)soap_lookup_plugin(soap, soap_wsse_id);
+  DBGFUN("soap_wsse_preparefinal");
+  if (!data)
+    return SOAP_PLUGIN_ERROR;
+  /* no need to keep looking for wsu:Id */
+  soap->omode |= SOAP_XML_SEC;
+  if (data->digest)
+  { ds__SignatureType *signature = soap_wsse_Signature(soap);
+    struct soap_wsse_digest *digest;
+    const char *transform;
+    int signature_added = 0;
+    /* if message is canonicalized populate transform element accordingly */
+    if (soap->mode & SOAP_XML_CANONICAL)
+      transform = c14n_URI;
+    else
+      transform = NULL;
+    /* to increase the message length counter we need to emit the Signature,
+       SignedInfo and SignatureValue elements. However, this does not work if
+       we already populated the wsse:Signature with SignedInfo! */
+    if (!signature)
+    { signature = soap_wsse_add_Signature(soap);
+      signature_added = 1;
+    }
+    else if (signature->SignedInfo)
+      return soap_set_receiver_error(soap, "wsse error", "Cannot use soap_wsse_sign with populated SignedInfo", SOAP_SSL_ERROR);
+    /* add the SignedInfo/Reference elements for each digest */
+    for (digest = data->digest; digest; digest = digest->next)
+      soap_wsse_add_SignedInfo_Reference(soap, digest->id, transform, "", digest->hash);
+    /* then compute the signature and add it */
+    soap_wsse_add_SignatureValue(soap, data->sign_alg, data->sign_key, data->sign_keylen);
+    /* the code below ensures we increase the message length counter */
+    if (soap->mode & SOAP_XML_CANONICAL)
+      soap->ns = 0; /* need namespaces for canonicalization */
+    if (signature_added)
+    { soap->level = 3; /* indent level for XML Signature */
+      soap_out_ds__SignatureType(soap, "ds:Signature", 0, signature, NULL);
+    }
+    else
+    { soap->level = 4; /* indent level for XML SignedInfo */
+      soap->c14nexclude = "ds"; /* don't add xmlns:ds */
+      soap_out_ds__SignedInfoType(soap, "ds:SignedInfo", 0, signature->SignedInfo, NULL);
+      soap_outstring(soap, "ds:SignatureValue", 0, &signature->SignatureValue, NULL, 0);
+      soap->c14nexclude = NULL;
+    }
+    if (soap->mode & SOAP_XML_INDENT)
+      soap->count += soap->level + 1; /* add \n+indent */
+  }
+  /* Reset the callbacks and cleanup digests */
+  soap_wsse_preparecleanup(soap, data);
+  if (soap->fpreparefinal)
+    return soap->fpreparefinal(soap);
+  return SOAP_OK;
+}
+
+/**
+@fn void soap_wsse_preparecleanup(struct soap *soap, struct soap_wsse_data *data)
+@brief Restores engine state.
+@param soap context
+@param[in,out] data plugin data
+*/
+static void
+soap_wsse_preparecleanup(struct soap *soap, struct soap_wsse_data *data)
+{ struct soap_wsse_digest *digest, *next;
+  DBGFUN("soap_wsse_preparecleanup");
+  data->sign_alg = SOAP_SMD_NONE;
+  data->sign_key = NULL;
+  data->sign_keylen = 0;
+  if (soap->fprepareinit == soap_wsse_prepareinit)
+    soap->fprepareinit = data->fprepareinit;
+  if (soap->fpreparesend == soap_wsse_preparesend)
+    soap->fpreparesend = data->fpreparesend;
+  if (soap->fpreparefinal == soap_wsse_preparefinal)
+    soap->fpreparefinal = data->fpreparefinal;
+  data->fprepareinit = NULL;
+  data->fpreparesend = NULL;
+  data->fpreparefinal = NULL;
+  for (digest = data->digest; digest; digest = next)
+  { next = digest->next;
+    SOAP_FREE(soap, digest);
+  }
+  data->digest = NULL;
+}
+
+/**
+@fn int soap_wsse_disconnect(struct soap *soap)
+@brief Verify signature and SignedInfo digests initiated with soap_wsse_verify_auto.
+@param soap context
+@return SOAP_OK or fault
+@see soap_wsse_verify_auto
+
+This callback is invoked just after a message was received.
+*/
+static int
+soap_wsse_disconnect(struct soap *soap)
+{ struct soap_wsse_data *data = (struct soap_wsse_data*)soap_lookup_plugin(soap, soap_wsse_id);
+  ds__SignedInfoType *signedInfo = soap_wsse_SignedInfo(soap);
+  soap->imode &= ~SOAP_XML_DOM;
+  DBGFUN("soap_wsse_disconnect");
+  if (!data)
+    return SOAP_PLUGIN_ERROR;
+  if (soap->fdisconnect == soap_wsse_disconnect)
+    soap->fdisconnect = data->fdisconnect;
+  if (signedInfo)
+  { int alg, keylen;
+    const void *key = NULL;
+    /* determine which signature algorithm was used */
+    if (soap_wsse_get_SignedInfo_SignatureMethod(soap, &alg))
+      return soap->error;
+    /* for HMAC-SHA1, the secret key might be stored in the KeyIdentifier */
+    if (alg == SOAP_SMD_HMAC_SHA1)
+    { const char *valueType = soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifierValueType(soap);
+      /* if in the KeyIdentifier, retrieve it */
+      if (valueType && !strcmp(valueType, ds_hmac_sha1URI))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Using HMAC key from KeyIdentifier to verify signature\n"));
+        key = soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifier(soap, &keylen);
+      }
+      else if (alg == data->vrfy_alg)
+      { /* get the HMAC secret key from the plugin */
+	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Using HMAC key from plugin to verify signature\n"));
+        key = data->vrfy_key;
+        keylen = data->vrfy_keylen;
+      }
+    }
+    else
+    { X509 *cert;
+      /* get the certificate from the KeyInfo reference */
+      cert = soap_wsse_get_KeyInfo_SecurityTokenReferenceX509(soap);
+      /* obtain the public key from the cert */
+      if (cert)
+        key = X509_get_pubkey(cert);
+      else if (alg == data->vrfy_alg)
+      { /* get the public key from the plugin */
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Using public key from plugin to verify signature\n"));
+        key = data->vrfy_key;
+        soap->error = SOAP_OK;
+      }
+    }
+    /* if still no key, return fault */
+    /* TODO: add user-extensible mechanism too look for key */
+    if (!key)
+      return soap_wsse_fault(soap, wsse__SecurityTokenUnavailable, NULL);
+    /* verify SignedInfo with signature and check digests of local elements */
+    if (soap_wsse_verify_SignatureValue(soap, alg, key, keylen)
+     || soap_wsse_verify_SignedInfo(soap))
+      return soap->error;
+    data->vrfy_alg = SOAP_SMD_NONE;
+    if (soap->fdisconnect)
+      return soap->fdisconnect(soap);
+    return SOAP_OK;
+  }
+  return soap_wsse_fault(soap, wsse__FailedCheck, NULL);
+}
diff --git a/plugin/wsseapi.h b/plugin/wsseapi.h
new file mode 100644
index 0000000..c945976
--- /dev/null
+++ b/plugin/wsseapi.h
@@ -0,0 +1,175 @@
+/*
+
+wsseapi.h
+
+WS-Security plugin
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "soapH.h"
+#include "smdevp.h"
+
+/** plugin identification for plugin registry */
+#define SOAP_WSSE_ID "SOAP-WSSE-0.9"
+
+/** plugin identification for plugin registry */
+extern const char soap_wsse_id[];
+
+/**
+@struct soap_wsse_data
+@brief wssepi plugin data
+
+The signature key (private) and verification key (public) are kept separate.
+*/
+struct soap_wsse_data
+{ int sign_alg;			/**< The digest or signature algorithm used */
+  const void *sign_key;		/**< EVP_PKEY or key string for HMAC */
+  int sign_keylen;		/**< HMAC key length */
+  int vrfy_alg;			/**< The signature verify algorithm used */
+  const void *vrfy_key;		/**< EVP_PKEY or key string for HMAC verify */
+  int vrfy_keylen;		/**< HMAC key length */
+  struct soap_wsse_digest *digest;	/**< List of ID-hash pairs */
+  int (*fprepareinit)(struct soap*);
+  int (*fpreparesend)(struct soap*, const char*, size_t);
+  int (*fpreparefinal)(struct soap*);
+  int (*fdisconnect)(struct soap*);
+};
+
+/**
+@struct soap_wsse_digest
+@brief Digest dictionary: linked list of ID-hash pairs
+
+The digest dictionary is populated by the soap_wsse_preparesend callback. The
+callback intercepts XML elements with wsu:Id attributes and computes the digest
+during the preprocessing of a message transmission. The 'level' field is used
+to determine when the end of an element is reached.
+*/
+struct soap_wsse_digest
+{ struct soap_wsse_digest *next;	/**< Next in list */
+  unsigned int level;			/**< XML parser depth level */
+  struct soap_smd_data smd;		/**< smdevp engine context */
+  unsigned char hash[SOAP_SMD_MAX_SIZE];/**< Digest hash value */
+  char id[1];				/**< String flows down the struct */
+};
+
+extern const char *wsse_PasswordTextURI;
+extern const char *wsse_PasswordDigestURI;
+extern const char *wsse_Base64BinaryURI;
+extern const char *wsse_X509v3URI;
+extern const char *wsse_X509v3SubjectKeyIdentifierURI;
+
+extern const char *ds_sha1URI;
+extern const char *ds_hmac_sha1URI;
+extern const char *ds_dsa_sha1URI;
+extern const char *ds_rsa_sha1URI;
+
+extern const char *ds_URI;
+extern const char *c14n_URI;
+extern const char *wsu_URI;
+
+struct _wsse__Security* soap_wsse_add_Security(struct soap *soap);
+struct _wsse__Security* soap_wsse_add_Security_actor(struct soap *soap, const char *actor);
+void soap_wsse_delete_Security(struct soap *soap);
+struct _wsse__Security* soap_wsse_Security(struct soap *soap);
+
+struct ds__SignatureType* soap_wsse_add_Signature(struct soap *soap);
+void soap_wsse_delete_Signature(struct soap *soap);
+struct ds__SignatureType* soap_wsse_Signature(struct soap *soap);
+
+int soap_wsse_add_Timestamp(struct soap *soap, const char *id, time_t lifetime);
+struct _wsu__Timestamp *soap_wsse_Timestamp(struct soap *soap);
+int soap_wsse_verify_Timestamp(struct soap *soap);
+
+int soap_wsse_add_UsernameTokenText(struct soap *soap, const char *id, const char *username, const char *password);
+int soap_wsse_add_UsernameTokenDigest(struct soap *soap, const char *id, const char *username, const char *password);
+struct _wsse__UsernameToken *soap_wsse_UsernameToken(struct soap *soap, const char *id);
+const char* soap_wsse_get_Username(struct soap *soap);
+int soap_wsse_verify_Password(struct soap *soap, const char *password);
+
+int soap_wsse_add_BinarySecurityToken(struct soap *soap, const char *id, const char *valueType, const unsigned char *data, int size);
+int soap_wsse_add_BinarySecurityTokenX509(struct soap *soap, const char *id, X509 *cert);
+int soap_wsse_add_BinarySecurityTokenPEM(struct soap *soap, const char *id, const char *filename);
+struct _wsse__BinarySecurityToken *soap_wsse_BinarySecurityToken(struct soap *soap, const char *id);
+int soap_wsse_get_BinarySecurityToken(struct soap *soap, const char *id, char **valueType, unsigned char **data, int *size);
+X509 *soap_wsse_get_BinarySecurityTokenX509(struct soap *soap, const char *id);
+int soap_wsse_verify_X509(struct soap *soap, X509 *cert);
+
+struct ds__SignedInfoType *soap_wsse_add_SignedInfo(struct soap *soap);
+int soap_wsse_add_SignedInfo_Reference(struct soap *soap, const char *URI, const char *transform, const char *inclusiveNamespaces, const char *HA);
+int soap_wsse_add_SignedInfo_SignatureMethod(struct soap *soap, const char *method, int canonical);
+struct ds__SignedInfoType *soap_wsse_SignedInfo(struct soap *soap);
+int soap_wsse_get_SignedInfo_SignatureMethod(struct soap *soap, int *alg);
+
+int soap_wsse_add_SignatureValue(struct soap *soap, int alg, const void *key, int keylen);
+int soap_wsse_verify_SignatureValue(struct soap *soap, int alg, const void *key, int keylen);
+int soap_wsse_verify_SignedInfo(struct soap *soap);
+int soap_wsse_verify_digest(struct soap *soap, int alg, const char *id, unsigned char hash[SOAP_SMD_MAX_SIZE]);
+
+struct ds__KeyInfoType *soap_wsse_add_KeyInfo(struct soap *soap);
+struct ds__KeyInfoType *soap_wsse_KeyInfo(struct soap *soap);
+
+int soap_wsse_add_KeyInfo_KeyName(struct soap *soap, const char *name);
+const char *soap_wsse_get_KeyInfo_KeyName(struct soap *soap);
+
+int soap_wsse_add_KeyInfo_SecurityTokenReferenceURI(struct soap *soap, const char *URI, const char *valueType);
+int soap_wsse_add_KeyInfo_SecurityTokenReferenceX509(struct soap *soap, const char *URI);
+const char *soap_wsse_get_KeyInfo_SecurityTokenReferenceURI(struct soap *soap);
+X509 *soap_wsse_get_KeyInfo_SecurityTokenReferenceX509(struct soap *soap);
+
+int soap_wsse_add_KeyInfo_SecurityTokenReferenceKeyIdentifier(struct soap *soap, const char *id, const char *valueType, unsigned char *data, int size);
+const char *soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifierValueType(struct soap *soap);
+const unsigned char *soap_wsse_get_KeyInfo_SecurityTokenReferenceKeyIdentifier(struct soap *soap, int *size);
+
+int soap_wsse_add_KeyInfo_SecurityTokenReferenceEmbedded(struct soap *soap, const char *id, const char *valueType);
+
+int soap_wsse_fault(struct soap *soap, enum wsse__FaultcodeEnum fault, const char *detail);
+
+int soap_wsse(struct soap *soap, struct soap_plugin *p, void *arg);
+
+int soap_wsse_sign(struct soap *soap, int alg, const void *key, int keylen);
+int soap_wsse_sign_body(struct soap *soap, int alg, const void *key, int keylen);
+int soap_wsse_verify_init(struct soap *soap);
+int soap_wsse_verify_auto(struct soap *soap, int alg, const void *key, size_t keylen);
+int soap_wsse_verify_done(struct soap *soap);
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_default_xsd__anyType(struct soap*, struct soap_dom_element *node);
+SOAP_FMAC1 int SOAP_FMAC2 soap_out_xsd__anyType(struct soap *soap, const char *tag, int id, const struct soap_dom_element *node, const char *type);
+SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_in_xsd__anyType(struct soap *soap, const char *tag, struct soap_dom_element *node, const char *type);
diff --git a/samples/Makefile b/samples/Makefile
new file mode 100644
index 0000000..7ba61a0
--- /dev/null
+++ b/samples/Makefile
@@ -0,0 +1,52 @@
+all:
+	cd calc; make; cd ..
+	cd ck; make; cd ..
+	cd dime; make; cd ..
+	cd events; make; cd ..
+	cd factory; make; cd ..
+	cd factorytest; make; cd ..
+	cd googleapi; make; cd ..
+	cd listing; make; cd ..
+	cd localtime; make; cd ..
+	cd lu; make; cd ..
+	cd magic; make; cd ..
+	cd mtom; make; cd ..
+	cd oneliners; make; cd ..
+	cd polytest; make; cd ..
+	cd quote; make; cd ..
+	cd quote2; make; cd ..
+	cd quote3; make; cd ..
+	cd quotex; make; cd ..
+	cd router; make; cd  ..
+	cd rss; make; cd  ..
+	cd xml-rpc; make; cd  ..
+	cd udp; make; cd  ..
+	cd varparam; make; cd ..
+	cd webserver; make; cd ..
+	cd wsse; make; cd ..
+distclean:
+	cd calc; make distclean; cd ..
+	cd ck; make distclean; cd ..
+	cd dime; make distclean; cd ..
+	cd events; make distclean; cd ..
+	cd factory; make distclean; cd ..
+	cd factorytest; make distclean; cd ..
+	cd googleapi; make distclean; cd ..
+	cd listing; make distclean; cd ..
+	cd localtime; make distclean; cd ..
+	cd lu; make distclean; cd ..
+	cd magic; make distclean; cd ..
+	cd mtom; make distclean; cd ..
+	cd oneliners; make distclean; cd ..
+	cd polytest; make distclean; cd ..
+	cd quote; make distclean; cd ..
+	cd quote2; make distclean; cd ..
+	cd quote3; make distclean; cd ..
+	cd quotex; make distclean; cd ..
+	cd router; make distclean; cd ..
+	cd rss; make distclean; cd ..
+	cd xml-rpc; make distclean; cd ..
+	cd udp; make distclean; cd ..
+	cd varparam; make distclean; cd ..
+	cd webserver; make distclean; cd ..
+	cd wsse; make distclean; cd ..
diff --git a/samples/MakefileSolaris b/samples/MakefileSolaris
new file mode 100644
index 0000000..cbe3e98
--- /dev/null
+++ b/samples/MakefileSolaris
@@ -0,0 +1,52 @@
+all:
+	cd calc; make -f MakefileSolaris; cd ..
+	cd ck; make -f MakefileSolaris; cd ..
+	cd dime; make -f MakefileSolaris; cd ..
+	cd events; make -f MakefileSolaris; cd ..
+	cd factory; make -f MakefileSolaris; cd ..
+	cd factorytest; make -f MakefileSolaris; cd ..
+	cd googleapi; make -f MakefileSolaris; cd ..
+	cd listing; make -f MakefileSolaris; cd ..
+	cd localtime; make -f MakefileSolaris; cd ..
+	cd lu; make -f MakefileSolaris; cd ..
+	cd magic; make -f MakefileSolaris; cd ..
+	cd mtom; make -f MakefileSolaris; cd ..
+	cd oneliners; make -f MakefileSolaris; cd ..
+	cd polytest; make -f MakefileSolaris; cd ..
+	cd quote; make -f MakefileSolaris; cd ..
+	cd quote2; make -f MakefileSolaris; cd ..
+	cd quote3; make -f MakefileSolaris; cd ..
+	cd quotex; make -f MakefileSolaris; cd ..
+	cd router; make -f MakefileSolaris; cd  ..
+	cd rss; make -f MakefileSolaris; cd  ..
+	cd xml-rpc; make -f MakefileSolaris; cd  ..
+	cd udp; make -f MakefileSolaris; cd  ..
+	cd varparam; make -f MakefileSolaris; cd ..
+	cd webserver; make -f MakefileSolaris; cd ..
+	cd wsse; make -f MakefileSolaris; cd ..
+distclean:
+	cd calc; make distclean; cd ..
+	cd ck; make distclean; cd ..
+	cd dime; make distclean; cd ..
+	cd events; make distclean; cd ..
+	cd factory; make distclean; cd ..
+	cd factorytest; make distclean; cd ..
+	cd googleapi; make distclean; cd ..
+	cd listing; make distclean; cd ..
+	cd localtime; make distclean; cd ..
+	cd lu; make distclean; cd ..
+	cd magic; make distclean; cd ..
+	cd mtom; make distclean; cd ..
+	cd oneliners; make distclean; cd ..
+	cd polytest; make distclean; cd ..
+	cd quote; make distclean; cd ..
+	cd quote2; make distclean; cd ..
+	cd quote3; make distclean; cd ..
+	cd quotex; make distclean; cd ..
+	cd router; make distclean; cd ..
+	cd rss; make distclean; cd ..
+	cd xml-rpc; make distclean; cd ..
+	cd udp; make distclean; cd ..
+	cd varparam; make distclean; cd ..
+	cd webserver; make distclean; cd ..
+	cd wsse; make distclean; cd ..
diff --git a/samples/README.txt b/samples/README.txt
new file mode 100644
index 0000000..f1ce43e
--- /dev/null
+++ b/samples/README.txt
@@ -0,0 +1,90 @@
+
+EXAMPLES
+
+Examples are included in the 'samples' directory. The examples are:
+
+calc:				Simple calculator client and server
+ck:				HTTP cookie client and server
+components/c, components/cpp:	Multiple clients/services in one executable
+dime:				DIME attachment client and server
+events:				Asynchronous one-way messaging
+factory:			Remote object factory and simple ORB
+factorytest:			Test client for remote object factory
+googleapi:			Google Web API client
+listing:			XMethod service listing client
+localtime:			Get localtime client
+lu:				Linear solver client and server
+magic:				Magic Squares client and server
+mtom:				MTOM attachment client and server
+oneliners:			Several one-liner clients and services
+polytest:			Polymorphic object exchange
+quote:				Get delayed stock quote
+quote2:				Get delayed stock quote (SOAP async messages)
+quote3:				Get delayed stock quote (with Stock class)
+quote4:				Get delayed stock quote (using XML DOM)
+quotex:				Combined client/server example in one
+router:				Router of HTTP messages over TCP/IP
+rss:				RSS 0.91, 0.92, and 2.0 server
+ssl:				HTTPS/SSL example (requires OpenSSL)
+udp:				SOAP-over-UDP example client and server
+varparam:			Variable polymorphic parameters client/server
+webserver:			Stand-alone Web server with a lot of features
+wsse:				WS-Security demo
+xml-rpc:			XML-RPC support
+
+To build the example services and clients, type "make" in the 'samples'
+directory (Sun Solaris users should type "make -f MakefileSolaris").
+
+DISCLAIMER
+
+WE TRY OUR BEST TO PROVIDE YOU WITH "REAL-WORLD" EXAMPLES BUT WE CANNOT
+GUARANTEE THAT ALL CLIENT EXAMPLES CAN CONNECT TO THIRD PARTY WEB SERVICES
+WHEN THESE SERVICES ARE DOWN OR HAVE BEEN REMOVED.
+
+MS WINDOWS
+
+For Windows users, the archive includes 'magic_VC' and 'quote_VC' Visual
+Studio projects in the 'samples' directory.
+
+SSL
+
+To try the SSL-secure SOAP server, install OpenSSL and change the occurrences
+of "linprog2.cs.fsu.edu" in sslclient.c and sslserver.c to the machine name
+(or machine IP) you are using. Example .pem files are included but you need to
+create your own .pem files (see OpenSSL documentation).
+
+The sslclient and sslserver codes can then be build as follows:
+
+soapcpp2 -c ssl.h
+gcc -DWITH_OPENSSL -o sslclient sslclient.c stdsoap2.c soapC.c soapClient.c -lssl -lcrypto
+gcc -DWITH_OPENSSL -o sslserver sslserver.c stdsoap2.c soapC.c soapServer.c -lssl -lcrypto -lpthread
+
+COPYRIGHT AND LICENSE
+
+The gSOAP examples in the 'samples' directory are distributed under the GPL.
+See the gpl.txt file for details.
+
+A commercial license is available from Genivia, Inc. Please contact:
+contact@genivia.com
+
+gSOAP XML Web services tools
+Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+
+--------------------------------------------------------------------------------
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+
diff --git a/samples/calc/Makefile b/samples/calc/Makefile
new file mode 100644
index 0000000..ea92241
--- /dev/null
+++ b/samples/calc/Makefile
@@ -0,0 +1,23 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		calcclient calcserver
+calcclient:	calc.h calcclient.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c calc.h
+		$(CC) $(CFLAGS) -o calcclient calcclient.c soapC.c soapClient.c $(SOAPC) $(LIBS)
+calcserver:	calc.h calcserver.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c calc.h
+		$(CC) $(CFLAGS) -o calcserver calcserver.c soapC.c soapServer.c $(SOAPC) -lm $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h calcclient calcserver
diff --git a/samples/calc/MakefileSolaris b/samples/calc/MakefileSolaris
new file mode 100644
index 0000000..97e126a
--- /dev/null
+++ b/samples/calc/MakefileSolaris
@@ -0,0 +1,23 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lxnet -lnsl -lsocket
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		calcclient calcserver
+calcclient:	calc.h calcclient.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c calc.h
+		$(CC) $(CFLAGS) -o calcclient calcclient.c soapC.c soapClient.c $(SOAPC) $(LIBS)
+calcserver:	calc.h calcserver.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c calc.h
+		$(CC) $(CFLAGS) -o calcserver calcserver.c soapC.c soapServer.c $(SOAPC) -lm $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h calcclient calcserver
diff --git a/samples/calc/calc.h b/samples/calc/calc.h
new file mode 100644
index 0000000..91929e2
--- /dev/null
+++ b/samples/calc/calc.h
@@ -0,0 +1,12 @@
+//gsoap ns service name:	calc
+//gsoap ns service style:	rpc
+//gsoap ns service encoding:	encoded
+//gsoap ns service namespace:	http://websrv.cs.fsu.edu/~engelen/calc.wsdl
+//gsoap ns service location:	http://websrv.cs.fsu.edu/~engelen/calcserver.cgi
+
+//gsoap ns schema namespace: urn:calc
+int ns__add(double a, double b, double *result);
+int ns__sub(double a, double b, double *result);
+int ns__mul(double a, double b, double *result);
+int ns__div(double a, double b, double *result);
+int ns__pow(double a, double b, double *result);
diff --git a/samples/calc/calcclient.c b/samples/calc/calcclient.c
new file mode 100644
index 0000000..35052d8
--- /dev/null
+++ b/samples/calc/calcclient.c
@@ -0,0 +1,46 @@
+#include "soapH.h"
+#include "calc.nsmap"
+
+const char server[] = "http://websrv.cs.fsu.edu/~engelen/calcserver.cgi";
+
+int main(int argc, char **argv)
+{ struct soap soap;
+  double a, b, result;
+  if (argc < 4)
+  { fprintf(stderr, "Usage: [add|sub|mul|div|pow] num num\n");
+    exit(0);
+  }
+  soap_init(&soap);
+  a = strtod(argv[2], NULL);
+  b = strtod(argv[3], NULL);
+  switch (*argv[1])
+  { case 'a':
+      soap_call_ns__add(&soap, server, "", a, b, &result);
+      break;
+    case 's':
+      soap_call_ns__sub(&soap, server, "", a, b, &result);
+      break;
+    case 'm':
+      soap_call_ns__mul(&soap, server, "", a, b, &result);
+      break;
+    case 'd':
+      soap_call_ns__div(&soap, server, "", a, b, &result);
+      break;
+    case 'p':
+      soap_call_ns__pow(&soap, server, "", a, b, &result);
+      break;
+    default:
+      fprintf(stderr, "Unknown command\n");
+      exit(0);
+  }
+  if (soap.error)
+  { soap_print_fault(&soap, stderr);
+    exit(1);
+  }
+  else
+    printf("result = %g\n", result);
+  soap_destroy(&soap);
+  soap_end(&soap);
+  soap_done(&soap);
+  return 0;
+}
diff --git a/samples/calc/calcserver.c b/samples/calc/calcserver.c
new file mode 100644
index 0000000..5cc2686
--- /dev/null
+++ b/samples/calc/calcserver.c
@@ -0,0 +1,66 @@
+#include "soapH.h"
+#include "calc.nsmap"
+
+int main(int argc, char **argv)
+{ int m, s; /* master and slave sockets */
+  struct soap soap;
+  soap_init(&soap);
+  if (argc < 2)
+    soap_serve(&soap);	/* serve as CGI application */
+  else
+  { m = soap_bind(&soap, NULL, atoi(argv[1]), 100);
+    if (m < 0)
+    { soap_print_fault(&soap, stderr);
+      exit(-1);
+    }
+    fprintf(stderr, "Socket connection successful: master socket = %d\n", m);
+    for ( ; ; )
+    { s = soap_accept(&soap);
+      fprintf(stderr, "Socket connection successful: slave socket = %d\n", s);
+      if (s < 0)
+      { soap_print_fault(&soap, stderr);
+        exit(-1);
+      } 
+      soap_serve(&soap);
+      soap_end(&soap);
+    }
+  }
+  return 0;
+} 
+
+int ns__add(struct soap *soap, double a, double b, double *result)
+{ *result = a + b;
+  return SOAP_OK;
+} 
+
+int ns__sub(struct soap *soap, double a, double b, double *result)
+{ *result = a - b;
+  return SOAP_OK;
+} 
+
+int ns__mul(struct soap *soap, double a, double b, double *result)
+{ *result = a * b;
+  return SOAP_OK;
+} 
+
+int ns__div(struct soap *soap, double a, double b, double *result)
+{ if (b)
+    *result = a / b;
+  else
+  { char *s = (char*)soap_malloc(soap, 1024);
+    sprintf(s, "<error xmlns=\"http://tempuri.org/\">Can't divide %f by %f</error>", a, b);
+    return soap_sender_fault(soap, "Division by zero", s);
+  }
+  return SOAP_OK;
+} 
+
+int ns__pow(struct soap *soap, double a, double b, double *result)
+{ *result = pow(a, b);
+  if (soap_errno == EDOM)	/* soap_errno is like errno, but compatible with Win32 */
+  { char *s = (char*)soap_malloc(soap, 1024);
+    sprintf(s, "Can't take the power of %f to %f", a, b);
+    sprintf(s, "<error xmlns=\"http://tempuri.org/\">Can't take power of %f to %f</error>", a, b);
+    return soap_sender_fault(soap, "Power function domain error", s);
+  }
+  return SOAP_OK;
+} 
diff --git a/samples/calc_VC_NOHTTP/calc.h b/samples/calc_VC_NOHTTP/calc.h
new file mode 100644
index 0000000..91929e2
--- /dev/null
+++ b/samples/calc_VC_NOHTTP/calc.h
@@ -0,0 +1,12 @@
+//gsoap ns service name:	calc
+//gsoap ns service style:	rpc
+//gsoap ns service encoding:	encoded
+//gsoap ns service namespace:	http://websrv.cs.fsu.edu/~engelen/calc.wsdl
+//gsoap ns service location:	http://websrv.cs.fsu.edu/~engelen/calcserver.cgi
+
+//gsoap ns schema namespace: urn:calc
+int ns__add(double a, double b, double *result);
+int ns__sub(double a, double b, double *result);
+int ns__mul(double a, double b, double *result);
+int ns__div(double a, double b, double *result);
+int ns__pow(double a, double b, double *result);
diff --git a/samples/calc_VC_NOHTTP/calc.sln b/samples/calc_VC_NOHTTP/calc.sln
new file mode 100644
index 0000000..938e087
--- /dev/null
+++ b/samples/calc_VC_NOHTTP/calc.sln
@@ -0,0 +1,26 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "calcclient", "calcclient.vcproj", "{F647213F-3197-4C80-8A41-3FB59AEE5D43}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "calcserver", "calcserver.vcproj", "{12450B59-BDCC-41F0-ABDD-4C7517BE690D}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{F647213F-3197-4C80-8A41-3FB59AEE5D43}.Debug|Win32.ActiveCfg = Debug|Win32
+		{F647213F-3197-4C80-8A41-3FB59AEE5D43}.Debug|Win32.Build.0 = Debug|Win32
+		{F647213F-3197-4C80-8A41-3FB59AEE5D43}.Release|Win32.ActiveCfg = Release|Win32
+		{F647213F-3197-4C80-8A41-3FB59AEE5D43}.Release|Win32.Build.0 = Release|Win32
+		{12450B59-BDCC-41F0-ABDD-4C7517BE690D}.Debug|Win32.ActiveCfg = Debug|Win32
+		{12450B59-BDCC-41F0-ABDD-4C7517BE690D}.Debug|Win32.Build.0 = Debug|Win32
+		{12450B59-BDCC-41F0-ABDD-4C7517BE690D}.Release|Win32.ActiveCfg = Release|Win32
+		{12450B59-BDCC-41F0-ABDD-4C7517BE690D}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/samples/calc_VC_NOHTTP/calcclient.cpp b/samples/calc_VC_NOHTTP/calcclient.cpp
new file mode 100644
index 0000000..0c79259
--- /dev/null
+++ b/samples/calc_VC_NOHTTP/calcclient.cpp
@@ -0,0 +1,48 @@
+#include "soapH.h"
+#include "calc.nsmap"
+
+//const char server[] = "http://websrv.cs.fsu.edu/~engelen/calcserver.cgi";
+// Changed by ESL
+const char server[] = "http://192.168.0.3:9001/calcserver.cgi";
+
+int main(int argc, char **argv)
+{ struct soap soap;
+  double a, b, result;
+  if (argc < 4)
+  { fprintf(stderr, "Usage: [add|sub|mul|div|pow] num num\n");
+    exit(0);
+  }
+  soap_init(&soap);
+  a = strtod(argv[2], NULL);
+  b = strtod(argv[3], NULL);
+  switch (*argv[1])
+  { case 'a':
+      soap_call_ns__add(&soap, server, "", a, b, &result);
+      break;
+    case 's':
+      soap_call_ns__sub(&soap, server, "", a, b, &result);
+      break;
+    case 'm':
+      soap_call_ns__mul(&soap, server, "", a, b, &result);
+      break;
+    case 'd':
+      soap_call_ns__div(&soap, server, "", a, b, &result);
+      break;
+    case 'p':
+      soap_call_ns__pow(&soap, server, "", a, b, &result);
+      break;
+    default:
+      fprintf(stderr, "Unknown command\n");
+      exit(0);
+  }
+  if (soap.error)
+  { soap_print_fault(&soap, stderr);
+    exit(1);
+  }
+  else
+    printf("result = %g\n", result);
+  soap_destroy(&soap);
+  soap_end(&soap);
+  soap_done(&soap);
+  return 0;
+}
diff --git a/samples/calc_VC_NOHTTP/calcclient.vcproj b/samples/calc_VC_NOHTTP/calcclient.vcproj
new file mode 100644
index 0000000..a8e11bd
--- /dev/null
+++ b/samples/calc_VC_NOHTTP/calcclient.vcproj
@@ -0,0 +1,328 @@
+<?xml version="1.0" encoding="Windows-1252"?>

+<VisualStudioProject

+	ProjectType="Visual C++"

+	Version="8.00"

+	Name="calcclient"

+	ProjectGUID="{F647213F-3197-4C80-8A41-3FB59AEE5D43}"

+	RootNamespace="calcclient"

+	Keyword="Win32Proj"

+	>

+	<Platforms>

+		<Platform

+			Name="Win32"

+		/>

+	</Platforms>

+	<ToolFiles>

+	</ToolFiles>

+	<Configurations>

+		<Configuration

+			Name="Debug|Win32"

+			OutputDirectory=".\Debug"

+			IntermediateDirectory=".\Debug"

+			ConfigurationType="1"

+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"

+			UseOfMFC="0"

+			ATLMinimizesCRunTimeLibraryUsage="false"

+			CharacterSet="2"

+			>

+			<Tool

+				Name="VCPreBuildEventTool"

+			/>

+			<Tool

+				Name="VCCustomBuildTool"

+			/>

+			<Tool

+				Name="VCXMLDataGeneratorTool"

+			/>

+			<Tool

+				Name="VCWebServiceProxyGeneratorTool"

+			/>

+			<Tool

+				Name="VCMIDLTool"

+				TypeLibraryName=".\Debug/calcclient.tlb"

+				HeaderFileName=""

+			/>

+			<Tool

+				Name="VCCLCompilerTool"

+				 

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;WIN32;_DEBUG;_CONSOLE;WITH_NOHTTP"

+				 

+				 

+				 

+				PrecompiledHeaderFile=".\Debug/calcclient.pch"

+				AssemblerListingLocation=".\Debug/"

+				ObjectFile=".\Debug/"

+				ProgramDataBaseFileName=".\Debug/"

+				 

+				SuppressStartupBanner="true"

+				 

+			/>

+			<Tool

+				Name="VCManagedResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCResourceCompilerTool"

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;_DEBUG"

+				Culture="1033"

+			/>

+			<Tool

+				Name="VCPreLinkEventTool"

+			/>

+			<Tool

+				Name="VCLinkerTool"

+				AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib"

+				OutputFile=".\Debug/calcclient.exe"

+				 

+				SuppressStartupBanner="true"

+				

+				ProgramDatabaseFile=".\Debug/calcclient.pdb"

+				SubSystem="1"

+				TargetMachine="1"

+			/>

+			<Tool

+				Name="VCALinkTool"

+			/>

+			<Tool

+				Name="VCManifestTool"

+			/>

+			<Tool

+				Name="VCXDCMakeTool"

+			/>

+			<Tool

+				Name="VCBscMakeTool"

+				SuppressStartupBanner="true"

+				OutputFile=".\Debug/calcclient.bsc"

+			/>

+			<Tool

+				Name="VCFxCopTool"

+			/>

+			<Tool

+				Name="VCAppVerifierTool"

+			/>

+			<Tool

+				Name="VCWebDeploymentTool"

+			/>

+			<Tool

+				Name="VCPostBuildEventTool"

+			/>

+		</Configuration>

+		<Configuration

+			Name="Release|Win32"

+			OutputDirectory=".\Release"

+			IntermediateDirectory=".\Release"

+			ConfigurationType="1"

+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"

+			UseOfMFC="0"

+			ATLMinimizesCRunTimeLibraryUsage="false"

+			CharacterSet="2"

+			>

+			<Tool

+				Name="VCPreBuildEventTool"

+			/>

+			<Tool

+				Name="VCCustomBuildTool"

+			/>

+			<Tool

+				Name="VCXMLDataGeneratorTool"

+			/>

+			<Tool

+				Name="VCWebServiceProxyGeneratorTool"

+			/>

+			<Tool

+				Name="VCMIDLTool"

+				TypeLibraryName=".\Release/calcclient.tlb"

+				HeaderFileName=""

+			/>

+			<Tool

+				Name="VCCLCompilerTool"

+				 

+				InlineFunctionExpansion="1"

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;WIN32;NDEBUG;_CONSOLE"

+				StringPooling="true"

+				 

+				 

+				PrecompiledHeaderFile=".\Release/calcclient.pch"

+				AssemblerListingLocation=".\Release/"

+				ObjectFile=".\Release/"

+				ProgramDataBaseFileName=".\Release/"

+				 

+				SuppressStartupBanner="true"

+			/>

+			<Tool

+				Name="VCManagedResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCResourceCompilerTool"

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;NDEBUG"

+				Culture="1033"

+			/>

+			<Tool

+				Name="VCPreLinkEventTool"

+			/>

+			<Tool

+				Name="VCLinkerTool"

+				OutputFile=".\Release/calcclient.exe"

+				 

+				SuppressStartupBanner="true"

+				ProgramDatabaseFile=".\Release/calcclient.pdb"

+				SubSystem="1"

+				TargetMachine="1"

+			/>

+			<Tool

+				Name="VCALinkTool"

+			/>

+			<Tool

+				Name="VCManifestTool"

+			/>

+			<Tool

+				Name="VCXDCMakeTool"

+			/>

+			<Tool

+				Name="VCBscMakeTool"

+				SuppressStartupBanner="true"

+				OutputFile=".\Release/calcclient.bsc"

+			/>

+			<Tool

+				Name="VCFxCopTool"

+			/>

+			<Tool

+				Name="VCAppVerifierTool"

+			/>

+			<Tool

+				Name="VCWebDeploymentTool"

+			/>

+			<Tool

+				Name="VCPostBuildEventTool"

+			/>

+		</Configuration>

+	</Configurations>

+	<References>

+	</References>

+	<Files>

+		<Filter

+			Name="Source Files"

+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"

+			>

+			<File

+				RelativePath=".\calcclient.cpp"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						ObjectFile="$(IntDir)\$(InputName)1.obj"

+						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"

+					/>

+				</FileConfiguration>

+				<FileConfiguration

+					Name="Release|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						ObjectFile="$(IntDir)\$(InputName)1.obj"

+						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"

+					/>

+				</FileConfiguration>

+			</File>

+			<File

+				RelativePath="soapC.cpp"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+				<FileConfiguration

+					Name="Release|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+			</File>

+			<File

+				RelativePath="soapClient.cpp"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+				<FileConfiguration

+					Name="Release|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+			</File>

+			<File

+				RelativePath="stdsoap2.cpp"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+				<FileConfiguration

+					Name="Release|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+			</File>

+		</Filter>

+		<Filter

+			Name="Header Files"

+			Filter="h;hpp;hxx;hm;inl"

+			>

+			<File

+				RelativePath="calc.h"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCustomBuildTool"

+						Description="gSOAP Web service proxy/skeleton build on $(InputPath)"

+						CommandLine=".\soapcpp2.exe &quot;$(InputPath)&quot;&#x0D;&#x0A;"

+						Outputs="soapStub.h soapH.h soapC.cpp soapClient.cpp"

+					/>

+				</FileConfiguration>

+			</File>

+			<File

+				RelativePath="soapH.h"

+				>

+			</File>

+			<File

+				RelativePath="soapStub.h"

+				>

+			</File>

+			<File

+				RelativePath="stdsoap2.h"

+				>

+			</File>

+		</Filter>

+		<Filter

+			Name="Resource Files"

+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"

+			>

+		</Filter>

+	</Files>

+	<Globals>

+	</Globals>

+</VisualStudioProject>

diff --git a/samples/calc_VC_NOHTTP/calcserver.cpp b/samples/calc_VC_NOHTTP/calcserver.cpp
new file mode 100644
index 0000000..ad68b11
--- /dev/null
+++ b/samples/calc_VC_NOHTTP/calcserver.cpp
@@ -0,0 +1,104 @@
+#include "soapH.h"
+#include "calc.nsmap"
+
+
+#ifdef WITH_NOHTTP
+int main(int argc, char **argv)
+{
+   struct soap soap; 
+   int m, s; // master and slave sockets 
+   soap_init(&soap); 
+   // m = soap_bind(&soap, "machine.cs.fsu.edu", 18083, 100); 
+   // ESL changed to:
+   m = soap_bind(&soap, "192.168.0.3", 9001, 100); 
+   if (m < 0) 
+      soap_print_fault(&soap, stderr); 
+   else
+   { 
+      fprintf(stderr, "Socket connection successful: master socket = %d\n", m); 
+      for (int i = 1; ; i++) 
+      {
+         s = soap_accept(&soap); 
+         if (s < 0) 
+         { 
+            soap_print_fault(&soap, stderr); 
+            break; 
+         } 
+         fprintf(stderr, "%d: accepted connection from IP=%d.%d.%d.%d socket=%d", i, 
+            (soap.ip >> 24)&0xFF, (soap.ip >> 16)&0xFF, (soap.ip >> 8)&0xFF, soap.ip&0xFF, s); 
+         if (soap_serve(&soap) != SOAP_OK) // process RPC request 
+            soap_print_fault(&soap, stderr); // print error 
+         fprintf(stderr, "request served\n"); 
+         soap_destroy(&soap); // clean up class instances 
+         soap_end(&soap); // clean up everything and close socket 
+      } 
+   } 
+   soap_done(&soap); // close master socket and detach environment 
+} 
+
+#else 
+ 
+int main(int argc, char **argv)
+{ int m, s; /* master and slave sockets */
+  struct soap soap;
+  soap_init(&soap);
+  if (argc < 2)
+    soap_serve(&soap);	/* serve as CGI application */
+  else
+  { m = soap_bind(&soap, NULL, atoi(argv[1]), 100);
+    if (m < 0)
+    { soap_print_fault(&soap, stderr);
+      exit(-1);
+    }
+    fprintf(stderr, "Socket connection successful: master socket = %d\n", m);
+    for ( ; ; )
+    { s = soap_accept(&soap);
+      fprintf(stderr, "Socket connection successful: slave socket = %d\n", s);
+      if (s < 0)
+      { soap_print_fault(&soap, stderr);
+        exit(-1);
+      } 
+      soap_serve(&soap);
+      soap_end(&soap);
+    }
+  }
+  return 0;
+} 
+#endif
+
+int ns__add(struct soap *soap, double a, double b, double *result)
+{ *result = a + b;
+  return SOAP_OK;
+} 
+
+int ns__sub(struct soap *soap, double a, double b, double *result)
+{ *result = a - b;
+  return SOAP_OK;
+} 
+
+int ns__mul(struct soap *soap, double a, double b, double *result)
+{ *result = a * b;
+  return SOAP_OK;
+} 
+
+int ns__div(struct soap *soap, double a, double b, double *result)
+{ if (b)
+    *result = a / b;
+  else
+  { char *s = (char*)soap_malloc(soap, 1024);
+    sprintf(s, "<error xmlns=\"http://tempuri.org/\">Can't divide %f by %f</error>", a, b);
+    return soap_sender_fault(soap, "Division by zero", s);
+  }
+  return SOAP_OK;
+} 
+
+int ns__pow(struct soap *soap, double a, double b, double *result)
+{ *result = pow(a, b);
+  if (soap_errno == EDOM)	/* soap_errno is like errno, but compatible with Win32 */
+  { char *s = (char*)soap_malloc(soap, 1024);
+    sprintf(s, "Can't take the power of %f to %f", a, b);
+    sprintf(s, "<error xmlns=\"http://tempuri.org/\">Can't take power of %f to %f</error>", a, b);
+    return soap_sender_fault(soap, "Power function domain error", s);
+  }
+  return SOAP_OK;
+} 
diff --git a/samples/calc_VC_NOHTTP/calcserver.vcproj b/samples/calc_VC_NOHTTP/calcserver.vcproj
new file mode 100644
index 0000000..bc14c6c
--- /dev/null
+++ b/samples/calc_VC_NOHTTP/calcserver.vcproj
@@ -0,0 +1,312 @@
+<?xml version="1.0" encoding="Windows-1252"?>

+<VisualStudioProject

+	ProjectType="Visual C++"

+	Version="8.00"

+	Name="calcserver"

+	ProjectGUID="{12450B59-BDCC-41F0-ABDD-4C7517BE690D}"

+	RootNamespace="calcserver"

+	Keyword="Win32Proj"

+	>

+	<Platforms>

+		<Platform

+			Name="Win32"

+		/>

+	</Platforms>

+	<ToolFiles>

+	</ToolFiles>

+	<Configurations>

+		<Configuration

+			Name="Debug|Win32"

+			OutputDirectory=".\Debug"

+			IntermediateDirectory=".\Debug"

+			ConfigurationType="1"

+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"

+			UseOfMFC="0"

+			ATLMinimizesCRunTimeLibraryUsage="false"

+			CharacterSet="2"

+			>

+			<Tool

+				Name="VCPreBuildEventTool"

+			/>

+			<Tool

+				Name="VCCustomBuildTool"

+			/>

+			<Tool

+				Name="VCXMLDataGeneratorTool"

+			/>

+			<Tool

+				Name="VCWebServiceProxyGeneratorTool"

+			/>

+			<Tool

+				Name="VCMIDLTool"

+				TypeLibraryName=".\Debug/calcserver.tlb"

+				HeaderFileName=""

+			/>

+			<Tool

+				Name="VCCLCompilerTool"

+				 

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;WIN32;_DEBUG;_CONSOLE;WITH_NOHTTP"

+				 

+				 

+				 

+				PrecompiledHeaderFile=".\Debug/calcserver.pch"

+				AssemblerListingLocation=".\Debug/"

+				ObjectFile=".\Debug/"

+				ProgramDataBaseFileName=".\Debug/"

+				 

+				SuppressStartupBanner="true"

+				 

+			/>

+			<Tool

+				Name="VCManagedResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCResourceCompilerTool"

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;_DEBUG"

+				Culture="1033"

+			/>

+			<Tool

+				Name="VCPreLinkEventTool"

+			/>

+			<Tool

+				Name="VCLinkerTool"

+				AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib"

+				OutputFile=".\Debug/calcserver.exe"

+				 

+				SuppressStartupBanner="true"

+				

+				ProgramDatabaseFile=".\Debug/calcserver.pdb"

+				SubSystem="1"

+				TargetMachine="1"

+			/>

+			<Tool

+				Name="VCALinkTool"

+			/>

+			<Tool

+				Name="VCManifestTool"

+			/>

+			<Tool

+				Name="VCXDCMakeTool"

+			/>

+			<Tool

+				Name="VCBscMakeTool"

+				SuppressStartupBanner="true"

+				OutputFile=".\Debug/calcserver.bsc"

+			/>

+			<Tool

+				Name="VCFxCopTool"

+			/>

+			<Tool

+				Name="VCAppVerifierTool"

+			/>

+			<Tool

+				Name="VCWebDeploymentTool"

+			/>

+			<Tool

+				Name="VCPostBuildEventTool"

+			/>

+		</Configuration>

+		<Configuration

+			Name="Release|Win32"

+			OutputDirectory=".\Release"

+			IntermediateDirectory=".\Release"

+			ConfigurationType="1"

+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"

+			UseOfMFC="0"

+			ATLMinimizesCRunTimeLibraryUsage="false"

+			CharacterSet="2"

+			>

+			<Tool

+				Name="VCPreBuildEventTool"

+			/>

+			<Tool

+				Name="VCCustomBuildTool"

+			/>

+			<Tool

+				Name="VCXMLDataGeneratorTool"

+			/>

+			<Tool

+				Name="VCWebServiceProxyGeneratorTool"

+			/>

+			<Tool

+				Name="VCMIDLTool"

+				TypeLibraryName=".\Release/calcserver.tlb"

+				HeaderFileName=""

+			/>

+			<Tool

+				Name="VCCLCompilerTool"

+				 

+				InlineFunctionExpansion="1"

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;WIN32;NDEBUG;_CONSOLE"

+				StringPooling="true"

+				 

+				 

+				PrecompiledHeaderFile=".\Release/calcserver.pch"

+				AssemblerListingLocation=".\Release/"

+				ObjectFile=".\Release/"

+				ProgramDataBaseFileName=".\Release/"

+				 

+				SuppressStartupBanner="true"

+			/>

+			<Tool

+				Name="VCManagedResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCResourceCompilerTool"

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;NDEBUG"

+				Culture="1033"

+			/>

+			<Tool

+				Name="VCPreLinkEventTool"

+			/>

+			<Tool

+				Name="VCLinkerTool"

+				OutputFile=".\Release/calcserver.exe"

+				 

+				SuppressStartupBanner="true"

+				ProgramDatabaseFile=".\Release/calcserver.pdb"

+				SubSystem="1"

+				TargetMachine="1"

+			/>

+			<Tool

+				Name="VCALinkTool"

+			/>

+			<Tool

+				Name="VCManifestTool"

+			/>

+			<Tool

+				Name="VCXDCMakeTool"

+			/>

+			<Tool

+				Name="VCBscMakeTool"

+				SuppressStartupBanner="true"

+				OutputFile=".\Release/calcserver.bsc"

+			/>

+			<Tool

+				Name="VCFxCopTool"

+			/>

+			<Tool

+				Name="VCAppVerifierTool"

+			/>

+			<Tool

+				Name="VCWebDeploymentTool"

+			/>

+			<Tool

+				Name="VCPostBuildEventTool"

+			/>

+		</Configuration>

+	</Configurations>

+	<References>

+	</References>

+	<Files>

+		<Filter

+			Name="Source Files"

+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"

+			>

+			<File

+				RelativePath=".\calcserver.cpp"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						ObjectFile="$(IntDir)\$(InputName)1.obj"

+						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"

+					/>

+				</FileConfiguration>

+				<FileConfiguration

+					Name="Release|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						ObjectFile="$(IntDir)\$(InputName)1.obj"

+						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"

+					/>

+				</FileConfiguration>

+			</File>

+			<File

+				RelativePath="soapC.cpp"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+				<FileConfiguration

+					Name="Release|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+			</File>

+			<File

+				RelativePath=".\soapServer.cpp"

+				>

+			</File>

+			<File

+				RelativePath="stdsoap2.cpp"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+				<FileConfiguration

+					Name="Release|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+			</File>

+		</Filter>

+		<Filter

+			Name="Header Files"

+			Filter="h;hpp;hxx;hm;inl"

+			>

+			<File

+				RelativePath="calc.h"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCustomBuildTool"

+						Description="gSOAP Web service proxy/skeleton build on $(InputPath)"

+						CommandLine=".\soapcpp2.exe &quot;$(InputPath)&quot;&#x0D;&#x0A;"

+						Outputs="soapStub.h soapH.h soapC.cpp soapClient.cpp"

+					/>

+				</FileConfiguration>

+			</File>

+			<File

+				RelativePath="soapH.h"

+				>

+			</File>

+			<File

+				RelativePath="soapStub.h"

+				>

+			</File>

+			<File

+				RelativePath="stdsoap2.h"

+				>

+			</File>

+		</Filter>

+		<Filter

+			Name="Resource Files"

+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"

+			>

+		</Filter>

+	</Files>

+	<Globals>

+	</Globals>

+</VisualStudioProject>

diff --git a/samples/calc_VC_NOHTTP/soapcpp2.exe b/samples/calc_VC_NOHTTP/soapcpp2.exe
new file mode 100755
index 0000000..fea95ba
--- /dev/null
+++ b/samples/calc_VC_NOHTTP/soapcpp2.exe
Binary files differ
diff --git a/samples/calc_VC_NOHTTP/stdsoap2.cpp b/samples/calc_VC_NOHTTP/stdsoap2.cpp
new file mode 100644
index 0000000..dbed460
--- /dev/null
+++ b/samples/calc_VC_NOHTTP/stdsoap2.cpp
@@ -0,0 +1,13448 @@
+/*
+
+stdsoap2.c[pp] 2.7.6e
+
+gSOAP runtime
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+Contributors:
+
+Wind River Systems Inc., for the following additions under gSOAP public license:
+  - vxWorks compatible	(#define VXWORKS)
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+Installation note:
+
+Win32 build needs winsock.dll (Visual C++ "wsock32.lib")
+To do this in Visual C++ 6.0, go to "Project", "settings", select the "Link"
+tab (the project file needs to be selected in the file view) and add
+"wsock32.lib" to the "Object/library modules" entry
+
+On Mac OS X with gcc (GCC) 3.1 20020420 (prerelease) you MUST compile with
+-fstack_check when using -O2 because gcc 3.1 has a bug that smashes the stack
+when locally allocated data exceeds 64K.
+
+*/
+
+#ifdef AS400
+# pragma convert(819)	/* EBCDIC to ASCII */
+#endif
+
+#include "stdsoap2.h"
+
+#ifdef __cplusplus
+SOAP_SOURCE_STAMP("@(#) stdsoap2.cpp ver 2.7.6e 2006-02-18 12:00:00 GMT")
+extern "C" {
+#else
+SOAP_SOURCE_STAMP("@(#) stdsoap2.c ver 2.7.6e 2006-02-18 12:00:00 GMT")
+#endif
+
+/* 8bit character representing unknown/nonrepresentable character data (e.g. not supported by current locale with multibyte support enabled) */
+#ifndef SOAP_UNKNOWN_CHAR
+#define SOAP_UNKNOWN_CHAR (127)
+#endif
+
+/*      EOF=-1 */
+#define SOAP_LT (soap_wchar)(-2) /* XML character '<' */
+#define SOAP_TT (soap_wchar)(-3) /* XML character '</' */
+#define SOAP_GT (soap_wchar)(-4) /* XML character '>' */
+#define SOAP_QT (soap_wchar)(-5) /* XML character '"' */
+#define SOAP_AP (soap_wchar)(-6) /* XML character ''' */
+
+#define soap_blank(c)		((c) >= 0 && (c) <= 32)
+#define soap_notblank(c)	((c) > 32)
+#define soap_hash_ptr(p)	(((unsigned long)(p) >> 3) & (SOAP_PTRHASH - 1))
+
+#ifdef SOAP_DEBUG
+static void soap_init_logs(struct soap*);
+static void soap_close_logfile(struct soap*, int);
+static void soap_set_logfile(struct soap*, int, const char*);
+static void soap_free_mht(struct soap*);
+static void soap_track_unlink(struct soap*, const void*);
+#endif
+
+#ifndef PALM_2
+static int soap_set_error(struct soap*, const char*, const char*, const char*, const char*, int);
+static int soap_copy_fault(struct soap*, const char*, const char*, const char*, const char*);
+static int soap_getattrval(struct soap*, char*, size_t, soap_wchar);
+#endif
+
+#ifndef PALM_1
+static soap_wchar soap_char(struct soap*);
+static soap_wchar soap_get_pi(struct soap*);
+static int soap_isxdigit(int);
+static void *fplugin(struct soap*, const char*);
+#ifndef WITH_NOIDREF
+static void soap_update_ptrs(struct soap*, char*, char*, char*, char*);
+static int soap_has_copies(struct soap*, const char*, const char*);
+static void soap_init_iht(struct soap*);
+static void soap_free_iht(struct soap*);
+static void soap_init_pht(struct soap*);
+static void soap_free_pht(struct soap*);
+#endif
+#endif
+
+#ifndef WITH_LEAN
+static const char *soap_set_validation_fault(struct soap*, const char*, const char*);
+static int soap_isnumeric(struct soap*, const char*);
+static time_t soap_timegm(struct tm*);
+static struct soap_nlist *soap_lookup_ns(struct soap *soap, const char *tag, size_t n);
+static struct soap_nlist *soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized);
+static void soap_pop_ns(struct soap *soap);
+static void soap_utilize_ns(struct soap *soap, const char *tag, size_t n);
+#endif
+
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart *soap_new_multipart(struct soap*, struct soap_multipart**, struct soap_multipart**, char*, size_t);
+static int soap_putdimefield(struct soap*, const char*, size_t);
+static char *soap_getdimefield(struct soap*, size_t);
+static void soap_select_mime_boundary(struct soap*);
+static int soap_valid_mime_boundary(struct soap*);
+static int soap_match_cid(struct soap*, const char*, const char*);
+static void soap_resolve_attachment(struct soap*, struct soap_multipart*);
+#endif
+#endif
+
+#ifdef WITH_GZIP
+static int soap_getgziphdr(struct soap*);
+#endif
+
+#ifdef WITH_OPENSSL
+static int ssl_init_done = 0;
+static int ssl_auth_init(struct soap*);
+static int ssl_verify_callback(int, X509_STORE_CTX*);
+static int ssl_password(char*, int, int, void *);
+static const char *ssl_error(struct soap*, int);
+/* This callback is included for future references. It should not be deleted
+static DH *ssl_tmp_dh(SSL*, int, int);
+*/
+#endif
+
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char *soap_decode(char*, size_t, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar soap_getchunkchar(struct soap*);
+static const char *http_error(struct soap*, int);
+static int http_post(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
+static int http_get(struct soap*);
+static int http_send_header(struct soap*, const char*);
+static int http_post_header(struct soap*, const char*, const char*);
+static int http_response(struct soap*, int, size_t);
+static int http_parse(struct soap*);
+static int http_parse_header(struct soap*, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int fsend(struct soap*, const char*, size_t);
+static size_t frecv(struct soap*, char*, size_t);
+static int tcp_init(struct soap*);
+static const char *tcp_error(struct soap*);
+#ifndef WITH_IPV6
+static int tcp_gethost(struct soap*, const char *addr, struct in_addr *inaddr);
+#endif
+static int tcp_connect(struct soap*, const char *endpoint, const char *host, int port);
+static int tcp_accept(struct soap*, int, struct sockaddr*, int*);
+static int tcp_disconnect(struct soap*);
+static int tcp_closesocket(struct soap*, SOAP_SOCKET);
+static int tcp_shutdownsocket(struct soap*, SOAP_SOCKET, int);
+static const char *soap_strerror(struct soap*);
+#endif
+#endif
+
+#if defined(PALM) && !defined(PALM_2)
+unsigned short errno;
+#endif
+
+#ifndef PALM_1
+static const char soap_env1[42] = "http://schemas.xmlsoap.org/soap/envelope/";
+static const char soap_enc1[42] = "http://schemas.xmlsoap.org/soap/encoding/";
+static const char soap_env2[40] = "http://www.w3.org/2003/05/soap-envelope";
+static const char soap_enc2[40] = "http://www.w3.org/2003/05/soap-encoding";
+static const char soap_rpc[35] = "http://www.w3.org/2003/05/soap-rpc";
+#endif
+
+#ifndef PALM_1
+const struct soap_double_nan soap_double_nan = {0xFFFFFFFF, 0xFFFFFFFF};
+static const char soap_base64o[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+static const char soap_base64i[81] = "\76XXX\77\64\65\66\67\70\71\72\73\74\75XXXXXXX\00\01\02\03\04\05\06\07\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31XXXXXX\32\33\34\35\36\37\40\41\42\43\44\45\46\47\50\51\52\53\54\55\56\57\60\61\62\63";
+#endif
+
+#ifndef WITH_LEAN
+static const char soap_indent[11] = "\n\t\t\t\t\t\t\t\t\t";
+/* Alternative indentation form for SOAP_XML_INDENT:
+static const char soap_indent[21] = "\n                   ";
+*/
+#endif
+
+static const char soap_padding[4] = "\0\0\0";
+#define SOAP_STR_PADDING (soap_padding)
+#define SOAP_STR_EOS (soap_padding)
+#define SOAP_NON_NULL (soap_padding)
+
+#ifndef WITH_LEAN
+static const struct soap_code_map html_entity_codes[] = /* entities for XHTML parsing */
+{ { 160, "nbsp" },
+  { 161, "iexcl" },
+  { 162, "cent" },
+  { 163, "pound" },
+  { 164, "curren" },
+  { 165, "yen" },
+  { 166, "brvbar" },
+  { 167, "sect" },
+  { 168, "uml" },
+  { 169, "copy" },
+  { 170, "ordf" },
+  { 171, "laquo" },
+  { 172, "not" },
+  { 173, "shy" },
+  { 174, "reg" },
+  { 175, "macr" },
+  { 176, "deg" },
+  { 177, "plusmn" },
+  { 178, "sup2" },
+  { 179, "sup3" },
+  { 180, "acute" },
+  { 181, "micro" },
+  { 182, "para" },
+  { 183, "middot" },
+  { 184, "cedil" },
+  { 185, "sup1" },
+  { 186, "ordm" },
+  { 187, "raquo" },
+  { 188, "frac14" },
+  { 189, "frac12" },
+  { 190, "frac34" },
+  { 191, "iquest" },
+  { 192, "Agrave" },
+  { 193, "Aacute" },
+  { 194, "Acirc" },
+  { 195, "Atilde" },
+  { 196, "Auml" },
+  { 197, "Aring" },
+  { 198, "AElig" },
+  { 199, "Ccedil" },
+  { 200, "Egrave" },
+  { 201, "Eacute" },
+  { 202, "Ecirc" },
+  { 203, "Euml" },
+  { 204, "Igrave" },
+  { 205, "Iacute" },
+  { 206, "Icirc" },
+  { 207, "Iuml" },
+  { 208, "ETH" },
+  { 209, "Ntilde" },
+  { 210, "Ograve" },
+  { 211, "Oacute" },
+  { 212, "Ocirc" },
+  { 213, "Otilde" },
+  { 214, "Ouml" },
+  { 215, "times" },
+  { 216, "Oslash" },
+  { 217, "Ugrave" },
+  { 218, "Uacute" },
+  { 219, "Ucirc" },
+  { 220, "Uuml" },
+  { 221, "Yacute" },
+  { 222, "THORN" },
+  { 223, "szlig" },
+  { 224, "agrave" },
+  { 225, "aacute" },
+  { 226, "acirc" },
+  { 227, "atilde" },
+  { 228, "auml" },
+  { 229, "aring" },
+  { 230, "aelig" },
+  { 231, "ccedil" },
+  { 232, "egrave" },
+  { 233, "eacute" },
+  { 234, "ecirc" },
+  { 235, "euml" },
+  { 236, "igrave" },
+  { 237, "iacute" },
+  { 238, "icirc" },
+  { 239, "iuml" },
+  { 240, "eth" },
+  { 241, "ntilde" },
+  { 242, "ograve" },
+  { 243, "oacute" },
+  { 244, "ocirc" },
+  { 245, "otilde" },
+  { 246, "ouml" },
+  { 247, "divide" },
+  { 248, "oslash" },
+  { 249, "ugrave" },
+  { 250, "uacute" },
+  { 251, "ucirc" },
+  { 252, "uuml" },
+  { 253, "yacute" },
+  { 254, "thorn" },
+  { 255, "yuml" },
+  {   0, NULL }
+};
+#endif
+
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+static const struct soap_code_map h_error_codes[] =
+{
+#ifdef HOST_NOT_FOUND   
+  { HOST_NOT_FOUND, "Host not found" },
+#endif
+#ifdef TRY_AGAIN
+  { TRY_AGAIN, "Try Again" },
+#endif
+#ifdef NO_RECOVERY  
+  { NO_RECOVERY, "No Recovery" },
+#endif
+#ifdef NO_DATA
+  { NO_DATA, "No Data" },
+#endif
+#ifdef NO_ADDRESS
+  { NO_ADDRESS, "No Address" },
+#endif
+  { 0, NULL }
+};
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+static const struct soap_code_map h_http_error_codes[] =
+{ { 201, "Created" },
+  { 202, "Accepted" },
+  { 203, "Non-Authoritative Information" },
+  { 204, "No Content" },
+  { 205, "Reset Content" },
+  { 206, "Partial Content" },
+  { 300, "Multiple Choices" },
+  { 301, "Moved Permanently" },
+  { 302, "Found" },
+  { 303, "See Other" },
+  { 304, "Not Modified" },
+  { 305, "Use Proxy" },
+  { 307, "Temporary Redirect" },
+  { 400, "Bad Request" },
+  { 401, "Unauthorized" },
+  { 402, "Payment Required" },
+  { 403, "Forbidden" },
+  { 404, "Not Found" },
+  { 405, "Method Not Allowed" },
+  { 406, "Not Acceptable" },
+  { 407, "Proxy Authentication Required" },
+  { 408, "Request Time-out" },
+  { 409, "Conflict" },
+  { 410, "Gone" },
+  { 411, "Length Required" },
+  { 412, "Precondition Failed" },
+  { 413, "Request Entity Too Large" },
+  { 414, "Request-URI Too Large" },
+  { 415, "Unsupported Media Type" },
+  { 416, "Requested range not satisfiable" },
+  { 417, "Expectation Failed" },
+  { 500, "Internal Server Error" },
+  { 501, "Not Implemented" },
+  { 502, "Bad Gateway" },
+  { 503, "Service Unavailable" },
+  { 504, "Gateway Time-out" },
+  { 505, "HTTP Version not supported" },
+  {   0, NULL }
+};
+#endif
+#endif
+
+#ifdef WITH_OPENSSL
+static const struct soap_code_map h_ssl_error_codes[] =
+{
+#define _SSL_ERROR(e) { e, #e }
+  _SSL_ERROR(SSL_ERROR_SSL),
+  _SSL_ERROR(SSL_ERROR_ZERO_RETURN),
+  _SSL_ERROR(SSL_ERROR_WANT_READ),
+  _SSL_ERROR(SSL_ERROR_WANT_WRITE),
+  _SSL_ERROR(SSL_ERROR_WANT_CONNECT),
+  _SSL_ERROR(SSL_ERROR_WANT_X509_LOOKUP),
+  _SSL_ERROR(SSL_ERROR_SYSCALL),
+  { 0, NULL }
+};
+#endif
+
+#ifndef WITH_LEANER
+static const struct soap_code_map mime_codes[] =
+{ { SOAP_MIME_7BIT,		"7bit" },
+  { SOAP_MIME_8BIT,		"8bit" },
+  { SOAP_MIME_BINARY,		"binary" },
+  { SOAP_MIME_QUOTED_PRINTABLE, "quoted-printable" },
+  { SOAP_MIME_BASE64,		"base64" },
+  { SOAP_MIME_IETF_TOKEN,	"ietf-token" },
+  { SOAP_MIME_X_TOKEN,		"x-token" },
+  { 0,				NULL }
+};
+#endif
+
+#ifdef WIN32
+static int tcp_done = 0;
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+fsend(struct soap *soap, const char *s, size_t n)
+{ register int nwritten;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  if (soap->os)
+  { soap->os->write(s, n);
+    if (soap->os->good())
+      return SOAP_OK;
+    return SOAP_EOF;
+  }
+#endif
+  while (n)
+  { if (soap_valid_socket(soap->socket))
+    { 
+#ifndef WITH_LEAN
+      if (soap->send_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->send_timeout > 0)
+        { timeout.tv_sec = soap->send_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->send_timeout/1000000;
+          timeout.tv_usec = -soap->send_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { register int r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            return SOAP_EOF;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+          { soap->errnum = soap_socket_errno;
+            return SOAP_EOF;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+        nwritten = SSL_write(soap->ssl, s, n);
+      else if (soap->bio)
+        nwritten = BIO_write(soap->bio, s, n);
+      else
+#endif
+#ifdef WITH_UDP
+      if ((soap->omode & SOAP_IO_UDP))
+      { if (soap->peerlen)
+	  nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+        else
+	  nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	/* retry and back-off algorithm */
+	/* TODO: this is not very clear from specs so verify and limit conditions under which we should loop (e.g. ENOBUFS) */
+	if (nwritten < 0)
+        { struct timeval timeout;
+          fd_set fd;
+	  int udp_repeat;
+	  int udp_delay;
+          if ((soap->connect_flags & SO_BROADCAST))
+	    udp_repeat = 3; /* SOAP-over-UDP MULTICAST_UDP_REPEAT - 1 */
+          else
+	    udp_repeat = 1; /* SOAP-over-UDP UNICAST_UDP_REPEAT - 1 */
+	  udp_delay = (soap_random % 201) + 50; /* UDP_MIN_DELAY .. UDP_MAX_DELAY */
+	  do
+          { timeout.tv_sec = 0;
+            timeout.tv_usec = 1000 * udp_delay; /* ms */
+            FD_ZERO(&fd);
+            FD_SET((SOAP_SOCKET)soap->socket, &fd);
+            select((SOAP_SOCKET)(soap->socket + 1), NULL, NULL, &fd, &timeout);
+	    if (soap->peerlen)
+	      nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+            else
+	      nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	    udp_delay <<= 1;
+	    if (udp_delay > 500) /* UDP_UPPER_DELAY */
+	      udp_delay = 500;
+	  }
+	  while (nwritten < 0 && --udp_repeat > 0);
+	}
+      }
+      else
+#endif
+#if !defined(PALM) && !defined(AS400)
+        nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+#else
+        nwritten = send((SOAP_SOCKET)soap->socket, (void*)s, n, soap->socket_flags);
+#endif
+      if (nwritten <= 0)
+      {
+#ifdef WITH_OPENSSL
+	int err;
+        if (soap->ssl && (err = SSL_get_error(soap->ssl, nwritten)) != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return SOAP_EOF;
+#endif
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EWOULDBLOCK && soap_socket_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_socket_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    else
+    {
+#ifdef WITH_FASTCGI
+      nwritten = fwrite((void*)s, 1, n, stdout);
+      fflush(stdout);
+#else
+#ifdef UNDER_CE
+      nwritten = fwrite(s, 1, n, soap->sendfd);
+#else
+#ifdef VXWORKS
+#ifdef WMW_RPM_IO
+      if (soap->rpmreqid)
+        nwritten = (httpBlockPut(soap->rpmreqid, s, n) == 0) ? n : -1; 
+      else
+#endif
+        nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w"));
+#else
+      nwritten = write((SOAP_SOCKET)soap->sendfd, s, n);
+#endif
+#endif
+#endif
+      if (nwritten <= 0)
+      { if (soap_errno != SOAP_EINTR && soap_errno != SOAP_EWOULDBLOCK && soap_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    n -= nwritten;
+    s += nwritten;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_raw(struct soap *soap, const char *s, size_t n)
+{ if (!n)
+    return SOAP_OK;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { soap->count += n;
+#ifndef WITH_LEANER
+    if (soap->fpreparesend && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+  if (soap->mode & SOAP_IO)
+  { register size_t i = SOAP_BUFLEN - soap->bufidx;
+    while (n >= i)
+    { memcpy(soap->buf + soap->bufidx, s, i);
+      soap->bufidx = SOAP_BUFLEN;
+      if (soap_flush(soap))
+        return soap->error;
+      s += i;
+      n -= i;
+      i = SOAP_BUFLEN;
+    }
+    memcpy(soap->buf + soap->bufidx, s, n);
+    soap->bufidx += n;
+    return SOAP_OK;
+  }
+  return soap_flush_raw(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush(struct soap *soap)
+{ register int n = soap->bufidx;
+  if (n)
+  { soap->bufidx = 0;
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { soap->d_stream.next_in = (Byte*)soap->buf;
+      soap->d_stream.avail_in = (unsigned int)n;
+#ifdef WITH_GZIP
+      soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)n);
+#endif
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating %u bytes\n", soap->d_stream.avail_in));
+        if (deflate(&soap->d_stream, Z_NO_FLUSH) != Z_OK)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+          return soap->error = SOAP_ZLIB_ERROR;
+        }
+        if (!soap->d_stream.avail_out)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN))
+            return soap->error;
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (soap->d_stream.avail_in);
+    }
+    else
+#endif
+      return soap_flush_raw(soap, soap->buf, n);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush_raw(struct soap *soap, const char *s, size_t n)
+{ if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+  { register char *t;
+    if (!(t = (char*)soap_push_block(soap, n)))
+      return soap->error = SOAP_EOM;
+    memcpy(t, s, n);
+#ifndef WITH_LEANER
+    if (soap->fpreparesend)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+  { char t[16];
+    sprintf(t, "\r\n%lX\r\n" + (soap->chunksize ? 0 : 2), (unsigned long)n);
+    DBGMSG(SENT, t, strlen(t));
+    if ((soap->error = soap->fsend(soap, t, strlen(t))))
+      return soap->error;
+    soap->chunksize += n;
+  }
+  DBGMSG(SENT, s, n);
+#endif
+  return soap->error = soap->fsend(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send(struct soap *soap, const char *s)
+{ if (s)
+    return soap_send_raw(soap, s, strlen(s));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send2(struct soap *soap, const char *s1, const char *s2)
+{ if (soap_send(soap, s1))
+    return soap->error;
+  return soap_send(soap, s2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send3(struct soap *soap, const char *s1, const char *s2, const char *s3)
+{ if (soap_send(soap, s1)
+   || soap_send(soap, s2))
+    return soap->error;
+  return soap_send(soap, s3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static size_t
+frecv(struct soap *soap, char *s, size_t n)
+{ register int r;
+  soap->errnum = 0;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  if (soap->is)
+  { if (soap->is->good())
+      return soap->is->read(s, n).gcount();
+    return 0;
+  }
+#endif
+  if (soap_valid_socket(soap->socket))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->recv_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->recv_timeout > 0)
+        { timeout.tv_sec = soap->recv_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->recv_timeout/1000000;
+          timeout.tv_usec = -soap->recv_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+	  { soap->errnum = 0;
+            return 0;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+	  { soap->errnum = soap_socket_errno;
+            return 0;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+      { int err;
+	r = SSL_read(soap->ssl, s, n);
+        if (r > 0)
+          return (size_t)r;
+	err = SSL_get_error(soap->ssl, r);
+	if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return 0;
+      }
+      else if (soap->bio)
+      { r = BIO_read(soap->bio, s, n);
+        if (r > 0)
+          return (size_t)r;
+        return 0;
+      }
+      else
+#endif
+      { 
+#ifdef WITH_UDP
+        if ((soap->omode & SOAP_IO_UDP))
+        { SOAP_SOCKLEN_T k = (SOAP_SOCKLEN_T)sizeof(soap->peer);
+	  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+          r = recvfrom((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, &k);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+	  soap->peerlen = (size_t)k;
+#ifndef WITH_IPV6
+          soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+          soap->port = (int)ntohs(soap->peer.sin_port);
+#endif
+        }
+	else
+#endif
+          r = recv((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+        if (r >= 0)
+          return (size_t)r;
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN && soap_socket_errno != SOAP_EWOULDBLOCK)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#ifndef WITH_LEAN
+      { struct timeval timeout;
+        fd_set fd;
+        timeout.tv_sec = 0;
+        timeout.tv_usec = 10000;
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+#ifdef WITH_OPENSSL
+        if (soap->ssl && SSL_get_error(soap->ssl, r) == SSL_ERROR_WANT_WRITE)
+          r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+        else
+          r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#else
+        r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#endif
+        if (r < 0 && soap_socket_errno != SOAP_EINTR)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#endif
+    }
+  }
+#ifdef WITH_FASTCGI
+  return fread(s, 1, n, stdin);
+#else
+#ifdef UNDER_CE
+  return fread(s, 1, n, soap->recvfd);
+#else
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    r = httpBlockRead(soap->rpmreqid, s, n);
+  else
+#endif
+  r = read((SOAP_SOCKET)soap->recvfd, s, n);
+  if (r >= 0)
+    return (size_t)r;
+  soap->errnum = soap_errno;
+  return 0;
+#endif
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar
+soap_getchunkchar(struct soap *soap)
+{ if (soap->bufidx < soap->buflen)
+    return soap->buf[soap->bufidx++];
+  soap->bufidx = 0;
+  soap->buflen = soap->chunkbuflen = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)soap->buflen, soap->socket));
+  DBGMSG(RECV, soap->buf, soap->buflen);
+  if (soap->buflen)
+    return soap->buf[soap->bufidx++];
+  return EOF;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+soap_isxdigit(int c)
+{ return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f');
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_raw(struct soap *soap)
+{ register size_t ret;
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { if (soap->d_stream.next_out == Z_NULL)
+      return EOF;
+    if (soap->d_stream.avail_in || !soap->d_stream.avail_out)
+    { register int r;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflating\n"));
+      soap->d_stream.next_out = (Byte*)soap->buf;
+      soap->d_stream.avail_out = SOAP_BUFLEN;
+      r = inflate(&soap->d_stream, Z_NO_FLUSH);
+      if (r == Z_OK || r == Z_STREAM_END)
+      { soap->bufidx = 0;
+        soap->buflen = SOAP_BUFLEN - soap->d_stream.avail_out;
+        if (soap->zlib_in == SOAP_ZLIB_GZIP)
+          soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+        if (r == Z_STREAM_END)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+          soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+          soap->d_stream.next_out = Z_NULL;
+        }
+        if (soap->buflen)
+        { soap->count += soap->buflen;
+          return SOAP_OK;
+        }
+      }
+      else if (r != Z_BUF_ERROR)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate error: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        soap->d_stream.next_out = Z_NULL;
+	soap->error = SOAP_ZLIB_ERROR;
+        return EOF;
+      }
+    }
+zlib_again:
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK && !soap->chunksize)
+    { memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+      soap->buflen = soap->z_buflen;
+    }
+  }
+#endif
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) /* read HTTP chunked transfer */
+  { 
+chunk_again:
+    if (soap->chunksize)
+    { soap->buflen = ret = soap->frecv(soap, soap->buf, soap->chunksize > SOAP_BUFLEN ? SOAP_BUFLEN : soap->chunksize);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk: read %u bytes\n", (unsigned int)ret));
+      DBGMSG(RECV, soap->buf, ret);
+      soap->bufidx = 0;
+      soap->chunksize -= ret;
+    }
+    else
+    { register soap_wchar c;
+      char *t, tmp[8];
+      t = tmp;
+      if (!soap->chunkbuflen)
+      { soap->chunkbuflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes (chunked) from socket %d\n", (unsigned int)ret, soap->socket));
+        DBGMSG(RECV, soap->buf, ret);
+        soap->bufidx = 0;
+        if (!ret)
+          return soap->ahead = EOF;
+      }
+      else
+        soap->bufidx = soap->buflen;
+      soap->buflen = soap->chunkbuflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk size (idx=%u len=%u)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen));
+      while (!soap_isxdigit((int)(c = soap_getchunkchar(soap))))
+        if ((int)c == EOF)
+	  return soap->ahead = EOF;
+      do
+        *t++ = (char)c;
+      while (soap_isxdigit((int)(c = soap_getchunkchar(soap))) && t - tmp < 7);
+      while ((int)c != EOF && c != '\n')
+        c = soap_getchunkchar(soap);
+      if ((int)c == EOF)
+        return soap->ahead = EOF;
+      *t = '\0';
+      soap->chunksize = soap_strtoul(tmp, &t, 16);
+      if (!soap->chunksize)
+      { soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of chunked message\n"));
+	while ((int)c != EOF && c != '\n')
+          c = soap_getchunkchar(soap);
+        return soap->ahead = EOF;
+      }
+      soap->buflen = soap->bufidx + soap->chunksize;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving buf len to idx=%u len=%u (%s)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen, tmp));
+      if (soap->buflen > soap->chunkbuflen)
+      { soap->buflen = soap->chunkbuflen;
+        soap->chunksize -= soap->buflen - soap->bufidx;
+        soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Passed end of buffer for chunked HTTP (%u bytes left)\n", (unsigned int)(soap->buflen - soap->bufidx)));
+      }
+      else if (soap->chunkbuflen)
+        soap->chunksize = 0;
+      ret = soap->buflen - soap->bufidx;
+      if (!ret)
+        goto chunk_again;
+    }
+  }
+  else
+#endif
+  { soap->bufidx = 0;
+    soap->buflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)ret, soap->socket));
+    DBGMSG(RECV, soap->buf, ret);
+  }
+#ifndef WITH_LEANER
+  if (soap->fpreparerecv && (soap->error = soap->fpreparerecv(soap, soap->buf, ret)))
+    return soap->error;
+#endif
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { register int r;
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = (unsigned int)ret;
+    soap->d_stream.next_out = (Byte*)soap->buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    r = inflate(&soap->d_stream, Z_NO_FLUSH);
+    if (r == Z_OK || r == Z_STREAM_END)
+    { soap->bufidx = 0;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = ret = SOAP_BUFLEN - soap->d_stream.avail_out;
+      if (soap->zlib_in == SOAP_ZLIB_GZIP)
+        soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %u bytes\n", (unsigned int)ret));
+      if (!ret)
+        goto zlib_again;
+      if (r == Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+        soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+        soap->d_stream.next_out = Z_NULL;
+      }
+    }
+    else
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to inflate: (%d) %s\n", r, soap->d_stream.msg?soap->d_stream.msg:""));
+      soap->d_stream.next_out = Z_NULL;
+      soap->error = SOAP_ZLIB_ERROR;
+      return EOF;
+    }
+  }
+#endif
+  soap->count += ret;
+  return !ret;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap->dime.buflen)
+    { char *s;
+      int i;
+      unsigned char tmp[12];
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME hdr for chunked DIME is in buffer\n"));
+      soap->count += soap->dime.buflen - soap->buflen;
+      soap->buflen = soap->dime.buflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Skip padding (%ld bytes)\n", -(long)soap->dime.size&3));
+      for (i = -(long)soap->dime.size&3; i > 0; i--)
+      { soap->bufidx++;
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME hdr for next chunk\n"));
+      s = (char*)tmp;
+      for (i = 12; i > 0; i--)
+      { *s++ = soap->buf[soap->bufidx++];
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      soap->dime.flags = tmp[0] & 0x7;
+      soap->dime.size = ((size_t)tmp[8] << 24) | ((size_t)tmp[9] << 16) | ((size_t)tmp[10] << 8) | ((size_t)tmp[11]);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME chunk (%u bytes)\n", (unsigned int)soap->dime.size));
+      if (soap->dime.flags & SOAP_DIME_CF)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "More chunking\n"));
+        soap->dime.chunksize = soap->dime.size;
+        if (soap->buflen - soap->bufidx >= soap->dime.size)
+        { soap->dime.buflen = soap->buflen;
+          soap->buflen = soap->bufidx + soap->dime.chunksize;
+        }
+        else
+          soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      }
+      else
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Last chunk\n"));
+        soap->dime.buflen = 0;
+        soap->dime.chunksize = 0;
+      }
+      soap->count = soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%u bytes remaining\n", (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+    if (soap->dime.chunksize)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get next DIME hdr for chunked DIME (%u bytes chunk)\n", (unsigned int)soap->dime.chunksize));
+      if (soap_recv_raw(soap))
+        return EOF;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->count -= soap->buflen - soap->bufidx - soap->dime.chunksize;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%lu bytes remaining, count=%u\n", (unsigned long)(soap->buflen-soap->bufidx), (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+  }
+#endif
+  return soap_recv_raw(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getchar(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+    return c;
+  }
+  return soap_get1(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const struct soap_code_map*
+SOAP_FMAC2
+soap_code(const struct soap_code_map *map, const char *str)
+{ if (str)
+  { while (map->string)
+    { if (!strcmp(str, map->string)) /* case sensitive */
+        return map;
+      map++;
+    }
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_int_code(const struct soap_code_map *map, const char *str, long other)
+{ while (map->string)
+  { if (!soap_tag_cmp(str, map->string)) /* case insensitive */
+      return map->code;
+    map++;
+  }
+  return other;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_str_code(const struct soap_code_map *map, long code)
+{ while (map->code != code && map->string)
+    map++;
+  return map->string;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_char(struct soap *soap)
+{ char tmp[8];
+  register int i;
+  register soap_wchar c;
+  register char *s = tmp;
+  for (i = 0; i < 7; i++)
+  { c = soap_get1(soap);
+    if (c == ';' || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+  }
+  *s = '\0';
+  if (*tmp == '#')
+  { if (tmp[1] == 'x' || tmp[1] == 'X')
+      return soap_strtol(tmp + 2, NULL, 16);
+    return atol(tmp + 1);
+  }
+  if (!strcmp(tmp, "lt"))
+    return '<';
+  if (!strcmp(tmp, "gt"))
+    return '>';
+  if (!strcmp(tmp, "amp"))
+    return '&';
+  if (!strcmp(tmp, "quot"))
+    return '"';
+  if (!strcmp(tmp, "apos"))
+    return '\'';
+#ifndef WITH_LEAN
+  return (soap_wchar)soap_int_code(html_entity_codes, tmp, SOAP_UNKNOWN_CHAR);
+#else
+  return SOAP_UNKNOWN_CHAR; /* use this to represent unknown code */
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get0(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx];
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get1(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx++];
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_get(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+  }
+  else
+    c = soap_get1(soap);
+  for (;;)
+  { if (soap->cdata)
+    { if (c == ']')
+      { c = soap_get1(soap);
+        if (c == ']')
+        { soap->cdata = 0;
+          soap_get1(soap); /* skip > */
+          c = soap_get1(soap);
+        }
+	else
+        { soap_revget1(soap);
+          return ']';
+        }
+      }
+      else
+        return c;
+    }
+    switch (c)
+    { case '<':
+        do c = soap_get1(soap);
+        while (soap_blank(c));
+        if (c == '!' || c == '?' || c == '%')
+        { register int k = 1;
+	  if (c == '!')
+          { c = soap_get1(soap);
+            if (c == '[')
+            { do c = soap_get1(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                break;
+              soap->cdata = 1;
+              c = soap_get1(soap);
+	      continue;
+            }
+            if (c == '-' && (c = soap_get1(soap)) == '-')
+            { do
+              { c = soap_get1(soap);
+                if (c == '-' && (c = soap_get1(soap)) == '-')
+                  break;
+              } while ((int)c != EOF);
+            }
+          }
+	  else if (c == '?')
+            c = soap_get_pi(soap);
+          while ((int)c != EOF)
+          { if (c == '<')
+	      k++;
+	    else if (c == '>')
+	    { if (--k <= 0)
+	        break;
+	    }
+	    c = soap_get1(soap);
+	  }
+	  if ((int)c == EOF)
+	    break;
+          c = soap_get1(soap);
+          continue;
+        }
+        if (c == '/')
+          return SOAP_TT;
+        soap_revget1(soap);
+        return SOAP_LT;
+      case '>':
+        return SOAP_GT;
+      case '"':
+        return SOAP_QT;
+      case '\'':
+        return SOAP_AP;
+      case '&':
+        return soap_char(soap) | 0x80000000;
+    }
+    break;
+  }
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_get_pi(struct soap *soap)
+{ char buf[64];
+  register char *s = buf;
+  register int i = sizeof(buf);
+  register soap_wchar c = soap_getchar(soap);
+  /* This is a quick way to parse XML PI and we could use a callback instead to
+   * enable applications to intercept processing instructions */
+  while ((int)c != EOF && c != '?')
+  { if (--i > 0)
+    { if (soap_blank(c))
+        c = ' ';
+      *s++ = (char)c;
+    }
+    c = soap_getchar(soap);
+  }
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML PI <?%s?>\n", buf));
+  if (!strncmp(buf, "xml ", 4))
+  { s = strstr(buf, " encoding=");
+    if (s && s[10])
+    { if (!soap_tag_cmp(s + 11, "iso-8859-1*")
+       || !soap_tag_cmp(s + 11, "latin1*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to latin1 encoding\n"));
+        soap->mode |= SOAP_ENC_LATIN;
+      }
+      else if (!soap_tag_cmp(s + 11, "utf-8*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to utf-8 encoding\n"));
+        soap->mode &= ~SOAP_ENC_LATIN;
+      }
+    }
+  }
+  if ((int)c != EOF)
+    c = soap_getchar(soap);
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_move(struct soap *soap, long n)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving %ld bytes forward\n", (long)n));
+  for (; n > 0; n--)
+    if ((int)soap_getchar(soap) == EOF)
+      return SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_tell(struct soap *soap)
+{ return soap->count - soap->buflen + soap->bufidx - (soap->ahead != 0);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pututf8(struct soap *soap, register unsigned long c)
+{ char tmp[16];
+  if (c > 0 && c < 0x80)
+  { *tmp = (char)c;
+    return soap_send_raw(soap, tmp, 1);
+  }
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { register char *t = tmp;
+    if (c < 0x0800)
+      *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+    else
+    { if (c < 0x010000)
+        *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+      else
+      { if (c < 0x200000)
+          *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+        else
+        { if (c < 0x04000000)
+            *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+          else
+          { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+            *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+        }     
+        *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+      }
+      *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+    }
+    *t++ = (char)(0x80 | (c & 0x3F));
+    *t = '\0';
+  }
+  else
+#endif
+    sprintf(tmp, "&#%lu;", c);
+  return soap_send(soap, tmp);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getutf8(struct soap *soap)
+{ register soap_wchar c, c1, c2, c3, c4;
+  c = soap->ahead;
+  if (c > 0xFF)
+  { soap->ahead = 0;
+    return c;
+  }
+again:
+  c = soap_get(soap);
+  if (c < 0x80 || (soap->mode & SOAP_ENC_LATIN))
+    return c;
+  c1 = soap_get1(soap);
+  if (c1 < 0x80)
+  { soap_revget1(soap); /* doesn't look like this is UTF8 */
+    return c;
+  }
+  c1 &= 0x3F;
+  if (c < 0xE0)
+    return ((soap_wchar)(c & 0x1F) << 6) | c1;
+  c2 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c == 0xEF && c1 == 0x3B && c2 == 0x3F)	/* ignore UTF-8 BOM */
+    goto again;
+  if (c < 0xF0)
+    return ((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2;
+  c3 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xF8)
+    return ((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3;
+  c4 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xFC)
+    return ((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4;
+  return ((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(soap_get1(soap) & 0x3F);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthex(struct soap *soap, const unsigned char *s, int n)
+{ char d[2];
+  register int i;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2hex(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (i = 0; i < n; i++)
+  { register int m = *s++;
+    d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0'));
+    m &= 0x0F;
+    d[1] = (char)(m + (m > 9 ? '7' : '0'));
+    if (soap_send_raw(soap, d, 2))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_gethex(struct soap *soap, int *n)
+{
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_hex2s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register char *s;
+    register int i, k;
+    if (soap_append_lab(soap, NULL, 0))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = soap->lablen;
+    for (i = 0; i < k; i++)
+    { register char d1, d2;
+      register soap_wchar c;
+      c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = (int)(soap->lablen - k + i);
+        p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	if (p)
+	  memcpy(p, soap->labbuf, soap->lablen - k + i);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, SOAP_BLKLEN);
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register char d1, d2;
+      register soap_wchar c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap_end_block(soap);
+	  soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = soap_size_block(soap, i);
+        p = (unsigned char*)soap_save_block(soap, NULL, 0);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putbase64(struct soap *soap, const unsigned char *s, int n)
+{ register int i;
+  register unsigned long m;
+  char d[4];
+  if (!s)
+    return SOAP_OK;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2base64(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      d[i] = '=';
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_getbase64(struct soap *soap, int *n, int malloc_flag)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_base642s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register int i, k;
+    register char *s;
+    if (soap_append_lab(soap, NULL, 2))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = 3 * (soap->lablen / 3);
+    if (!s)
+      return NULL;
+    for (i = 0; i < k - 2; i += 3)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+            *n = (int)(soap->lablen - k + i);
+          p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	  if (p)
+	    memcpy(p, soap->labbuf, soap->lablen - k + i);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, 3 * SOAP_BLKLEN); /* must be multiple of 3 */
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          i *= 3;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n = (int)soap_size_block(soap, i);
+          p = (unsigned char*)soap_save_block(soap, NULL, 0);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_xop_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ /* Check MTOM xop:Include element (within hex/base64Binary) */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  int body = soap->body; /* should save type too? */
+  if (!soap_peek_element(soap))
+  { if (!soap_element_begin_in(soap, "xop:Include", 0) && *soap->href)
+    { if (soap_dime_forward(soap, ptr, size, id, type, options))
+        return soap->error;
+    }
+    if (soap->body && soap_element_end_in(soap, NULL))
+      return soap->error;
+  }
+  soap->body = body;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_dime_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ struct soap_xlist *xp = (struct soap_xlist*)SOAP_MALLOC(soap, sizeof(struct soap_xlist));
+  *ptr = NULL;
+  *size = 0;
+  *id = soap_strdup(soap, soap->href);
+  *type = NULL;
+  *options = NULL;
+  if (!xp)
+    return soap->error = SOAP_EOM;
+  xp->next = soap->xlist;
+  xp->ptr = ptr;
+  xp->size = size;
+  xp->id = *id;
+  xp->type = type;
+  xp->options = options;
+  soap->xlist = xp;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_strdup(struct soap *soap, const char *s)
+{ char *t = NULL;
+  if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1)))
+    strcpy(t, s);
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_new_block(struct soap *soap)
+{ struct soap_blist *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New block sequence (prev=%p)\n", soap->blist));
+  if (!(p = (struct soap_blist*)SOAP_MALLOC(soap, sizeof(struct soap_blist))))
+    return SOAP_EOM;   
+  p->next = soap->blist; 
+  p->ptr = NULL;
+  p->size = 0;
+  soap->blist = p;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_push_block(struct soap *soap, size_t n)
+{ char *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block of %u bytes (%u bytes total)\n", (unsigned int)n, (unsigned int)soap->blist->size + (unsigned int)n));
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(char*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  *(char**)p = soap->blist->ptr;
+  *(size_t*)(p + sizeof(char*)) = n;
+  soap->blist->ptr = p;
+  soap->blist->size += n;
+  return p + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_block(struct soap *soap)
+{ char *p;
+  if (!soap->blist->ptr)
+    return;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block\n"));
+  p = soap->blist->ptr;
+  soap->blist->size -= *(size_t*)(p + sizeof(char*));
+  soap->blist->ptr = *(char**)p;
+  SOAP_FREE(soap, p);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_update_ptrs(struct soap *soap, char *start, char *end, char *p1, char *p2)
+{ int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+#ifndef WITH_LEANER
+  register struct soap_xlist *xp;
+#endif
+  register void *p, **q;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr && (char*)ip->ptr >= start && (char*)ip->ptr < end)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", ip->id, ip->ptr, (char*)ip->ptr + (p1-p2)));
+        ip->ptr = (char*)ip->ptr + (p1-p2);
+      }
+      for (q = &ip->link; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Link update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (q = &ip->copy; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy chain update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (fp = ip->flist; fp; fp = fp->next)
+      { if ((char*)fp->ptr >= start && (char*)fp->ptr < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy list update id='%s' %p\n", ip->id, fp));
+          fp->ptr = (char*)fp->ptr + (p1-p2);
+        }
+      }
+    }
+  }
+#ifndef WITH_LEANER
+  for (xp = soap->xlist; xp; xp = xp->next)
+  { if (xp->ptr && (char*)xp->ptr >= start && (char*)xp->ptr < end)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", xp->id?xp->id:"", xp->ptr, (char*)xp->ptr + (p1-p2)));
+      xp->ptr = (unsigned char**)((char*)xp->ptr + (p1-p2));
+      xp->size = (int*)((char*)xp->size + (p1-p2));
+      xp->type = (char**)((char*)xp->type + (p1-p2));
+      xp->options = (char**)((char*)xp->options + (p1-p2));
+    }
+  }
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static int
+soap_has_copies(struct soap *soap, register const char *start, register const char *end)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  register const char *p;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { for (p = (const char*)ip->copy; p; p = *(const char**)p)
+        if (p >= start && p < end)
+          return SOAP_ERR;
+      for (fp = ip->flist; fp; fp = fp->next)
+        if ((const char*)fp->ptr >= start && (const char*)fp->ptr < end)
+	  return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_resolve(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  short flag;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr)
+      { register void *p, **q, *r;
+        q = (void**)ip->link;
+        ip->link = NULL;
+        r = ip->ptr;
+        DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing link chain to resolve id='%s'\n", ip->id));
+        while (q)
+        { p = *q;
+          *q = r;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "... link %p -> %p\n", q, r));
+          q = (void**)p;
+        }
+      }
+      else if (*ip->id == '#')
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Missing data for id='%s'\n", ip->id));
+        strcpy(soap->id, ip->id + 1);
+        return soap->error = SOAP_MISSING_ID;
+      }
+    }
+  }
+  do
+  { flag = 0;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution phase\n"));
+    for (i = 0; i < SOAP_IDHASH; i++)
+    { for (ip = soap->iht[i]; ip; ip = ip->next)
+      { if (ip->ptr && !soap_has_copies(soap, (const char*)ip->ptr, (const char*)ip->ptr + ip->size))
+        { if (ip->copy)
+          { register void *p, **q = (void**)ip->copy;
+            DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing copy chain to resolve id='%s'\n", ip->id));
+            ip->copy = NULL;
+            do
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... copy %p -> %p (%u bytes)\n", ip->ptr, q, (unsigned int)ip->size));
+	      p = *q;
+              memcpy(q, ip->ptr, ip->size);
+              q = (void**)p;
+            } while (q);
+	    flag = 1;
+	  }
+          for (fp = ip->flist; fp; fp = ip->flist)
+          { register unsigned int k = fp->level;
+	    register void *p = ip->ptr;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data type=%d location=%p level=%u,%u id='%s'\n", ip->type, p, ip->level, fp->level, ip->id));
+	    while (ip->level < k)
+            { register void **q = (void**)soap_malloc(soap, sizeof(void*));  
+	      if (!q)
+	        return soap->error;
+	      *q = p;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level, new location=%p holds=%p...\n", q, *q));
+              p = (void*)q;
+              k--;
+            }
+	    if (fp->fcopy)
+	      fp->fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    else
+	      soap_fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    ip->flist = fp->next;
+	    SOAP_FREE(soap, fp);
+	    flag = 1;
+	  }
+        }
+      }
+    }
+  } while (flag);
+#ifdef SOAP_DEBUG
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->copy || ip->flist)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution error: forwarded data for id='%s' could not be propagated, please report this problem to the developers\n", ip->id));
+      }
+    }
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution done\n"));
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_size_block(struct soap *soap, size_t n)
+{ if (soap->blist->ptr)
+  { soap->blist->size -= *(size_t*)(soap->blist->ptr + sizeof(char*)) - n;
+    *(size_t*)(soap->blist->ptr + sizeof(char*)) = n;
+  }
+  return soap->blist->size;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_first_block(struct soap *soap)
+{ char *p, *q, *r;
+  p = soap->blist->ptr;
+  if (!p)
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "First block\n"));
+  r = NULL;
+  do
+  { q = *(char**)p;
+    *(char**)p = r;
+    r = p;
+    p = q;
+  } while (p);
+  soap->blist->ptr = r;
+  return r + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_next_block(struct soap *soap)
+{ char *p;
+  p = soap->blist->ptr;
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n"));
+    soap->blist->ptr = *(char**)p;
+    SOAP_FREE(soap, p);
+    if (soap->blist->ptr)
+      return soap->blist->ptr + sizeof(char*) + sizeof(size_t);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_block_size(struct soap *soap)
+{ return *(size_t*)(soap->blist->ptr + sizeof(char*));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end_block(struct soap *soap)
+{ struct soap_blist *bp;
+  char *p, *q;
+  bp = soap->blist;
+  if (bp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of block sequence, free all remaining blocks\n"));
+    for (p = bp->ptr; p; p = q)
+    { q = *(char**)p;
+      SOAP_FREE(soap, p);
+    }
+    soap->blist = bp->next;
+    SOAP_FREE(soap, bp);
+  }
+  DBGLOG(TEST, if (soap->blist) SOAP_MESSAGE(fdebug, "Restore previous block sequence\n"));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_save_block(struct soap *soap, char *p, int flag)
+{ register size_t n;
+  register char *q, *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Save all blocks in contiguous memory space of %u bytes (%p->%p)\n", (unsigned int)soap->blist->size, soap->blist->ptr, p));
+  if (soap->blist->size)
+  { if (!p)
+      p = (char*)soap_malloc(soap, soap->blist->size);
+    if (p)
+    { for (s = p, q = soap_first_block(soap); q; q = soap_next_block(soap))
+      { n = soap_block_size(soap);
+#ifndef WITH_NOIDREF
+        if (flag)
+	  soap_update_ptrs(soap, q, q + n, s, q);
+#endif
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy %u bytes from %p to %p\n", (unsigned int)n, q, s));
+        memcpy(s, q, n);
+        s += n;
+      }
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  soap_end_block(soap);
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsize(struct soap *soap, const char *type, int size)
+{ return soap_putsizes(soap, type, &size, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizes(struct soap *soap, const char *type, const int *size, int dim)
+{ return soap_putsizesoffsets(soap, type, size, NULL, dim);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim)
+{ int i;
+  if (!type)
+    return NULL;
+  if (soap->version == 2)
+  { sprintf(soap->type, "%s[%d", type, size[0]);
+    for (i = 1; i < dim; i++)
+      sprintf(soap->type + strlen(soap->type), " %d", size[i]);
+  }
+  else
+  { if (offset)
+    { sprintf(soap->type, "%s[%d", type, size[0] + offset[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i] + offset[i]);
+    }
+    else
+    { sprintf(soap->type, "%s[%d", type, size[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i]);
+    }
+    strcat(soap->type, "]");
+  }
+  return soap->type;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffset(struct soap *soap, int offset)
+{ return soap_putoffsets(soap, &offset, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffsets(struct soap *soap, const int *offset, int dim)
+{ register int i;
+  sprintf(soap->arrayOffset, "[%d", offset[0]);
+  for (i = 1; i < dim; i++)
+    sprintf(soap->arrayOffset + strlen(soap->arrayOffset), ",%d", offset[i]);
+  strcat(soap->arrayOffset, "]");
+  return soap->arrayOffset;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_size(const int *size, int dim)
+{ register int i, n = size[0];
+  for (i = 1; i < dim; i++)
+    n *= size[i];
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getoffsets(const char *attr, const int *size, int *offset, int dim)
+{ register int i, j = 0;
+  if (offset)
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += offset[i] = (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  else
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  return j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsize(const char *attr1, const char *attr2, int *j)
+{ register int n, k;
+  char *s;
+  *j = 0;
+  if (!*attr1)
+    return -1;
+  if (*attr1 == '[')
+    attr1++;
+  n = 1;
+  for (;;)
+  { k = (int)soap_strtol(attr1, &s, 10);
+    n *= k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE || s == attr1)
+      return -1;
+    attr1 = strchr(s, ',');
+    if (!attr1)
+      attr1 = strchr(s, ' ');
+    if (attr2 && *attr2)
+    { attr2++;
+      *j *= k;
+      k = (int)soap_strtol(attr2, &s, 10);
+      *j += k;
+      if (k < 0)
+        return -1;
+      attr2 = s;
+    }
+    if (!attr1)
+      break;
+    attr1++;
+  }
+  return n - *j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsizes(const char *attr, int *size, int dim)
+{ register int i, k, n;
+  if (!*attr)
+    return -1;
+  i = strlen(attr);
+  n = 1;
+  do
+  { for (i = i-1; i >= 0; i--)
+      if (attr[i] == '[' || attr[i] == ',' || attr[i] == ' ')
+        break;
+    k = (int)atol(attr + i + 1);
+    n *= size[--dim] = k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE)
+      return -1;
+  } while (i >= 0 && attr[i] != '[');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getposition(const char *attr, int *pos)
+{ register int i, n;
+  if (!*attr)
+    return -1;
+  n = 0;
+  i = 1;
+  do
+  { pos[n++] = (int)atol(attr + i);
+    while (attr[i] && attr[i] != ',' && attr[i] != ']')
+      i++;
+    if (attr[i] == ',')
+      i++;
+  } while (n < SOAP_MAXDIMS && attr[i] && attr[i] != ']');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_push_namespace(struct soap *soap, const char *id, const char *ns)
+{ register struct soap_nlist *np;
+  register struct Namespace *p;
+  register short i = -1;
+  register size_t n, k;
+  n = strlen(id);
+  k = strlen(ns) + 1;
+  p = soap->local_namespaces;
+  if (p)
+  { for (i = 0; p->id; p++, i++)
+    { if (p->ns && !strcmp(ns, p->ns))
+      { if (p->out)
+        { SOAP_FREE(soap, p->out);
+          p->out = NULL;
+        }
+        break;
+      }
+      if (p->out)
+      { if (!strcmp(ns, p->out))
+          break;
+      }
+      else if (p->in)
+      { if (!soap_tag_cmp(ns, p->in))
+        { if ((p->out = (char*)SOAP_MALLOC(soap, k)))
+            strcpy(p->out, ns);
+          break;
+        }
+      }
+    }
+    if (!p || !p->id)
+      i = -1;
+  }
+  if (i >= 0)
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k);
+  if (!np)
+    return soap->error = SOAP_EOM;
+  np->next = soap->nlist;
+  soap->nlist = np;
+  np->level = soap->level;
+  np->index = i;
+  strcpy(np->id, id);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns));
+  if (i < 0)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push NOT OK: no match found for '%s' in namespace mapping table (added to stack anyway)\n", ns));
+  }
+  else
+  { np->ns = NULL;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push OK ('%s' matches '%s' in namespace table)\n", id, p->id));
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_namespace(struct soap *soap)
+{ register struct soap_nlist *np;
+  while (soap->nlist && soap->nlist->level >= soap->level)
+  { np = soap->nlist->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Popped namespace binding (level=%u) '%s'\n", soap->level, soap->nlist->id));
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_namespace(struct soap *soap, const char *id1, const char *id2, int n1, int n2) 
+{ register struct soap_nlist *np = soap->nlist;
+  while (np && (strncmp(np->id, id1, n1) || np->id[n1]))
+    np = np->next;
+  if (np)
+  { if (np->index < 0
+     || (soap->local_namespaces[np->index].id
+      && (strncmp(soap->local_namespaces[np->index].id, id2, n2)
+       || soap->local_namespaces[np->index].id[n2])))
+      return SOAP_NAMESPACE;
+    return SOAP_OK;
+  }
+  if (n1 == 3 && n1 == n2 && !strcmp(id1, "xml") && !strcmp(id1, id2))
+    return SOAP_OK;
+  return SOAP_SYNTAX_ERROR; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_current_namespace(struct soap *soap, const char *tag)
+{ register struct soap_nlist *np;
+  register const char *s;
+  np = soap->nlist;
+  if (!(s = strchr(tag, ':')))
+  { while (np && *np->id) /* find default namespace, if present */
+      np = np->next;
+  }
+  else
+  { while (np && (strncmp(np->id, tag, s - tag) || np->id[s - tag]))
+      np = np->next;
+    if (!np)
+      soap->error = SOAP_NAMESPACE;
+  }
+  if (np)
+  { if (np->index >= 0)
+      return soap->namespaces[np->index].ns;
+    if (np->ns)
+      return soap_strdup(soap, np->ns);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_tag_cmp(const char *s, const char *t)
+{ for (;;)
+  { register int c1 = *s;
+    register int c2 = *t;
+    if (!c1 || c1 == '"')
+      break;
+    if (c2 != '-')
+    { if (c1 != c2)
+      { if (c1 >= 'A' && c1 <= 'Z')
+          c1 += 'a' - 'A';
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+      }
+      if (c1 != c2)
+      { if (c2 != '*')
+          return 1;
+	c2 = *++t;
+        if (!c2)
+	  return 0;
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+        for (;;)
+        { c1 = *s;
+	  if (!c1 || c1 == '"')
+	    break;
+	  if (c1 >= 'A' && c1 <= 'Z')
+            c1 += 'a' - 'A';
+          if (c1 == c2 && !soap_tag_cmp(s + 1, t + 1))
+            return 0;
+	  s++;
+        }
+        break;
+      }
+    }
+    s++;
+    t++;
+  }
+  if (*t == '*' && !t[1])
+    return 0;
+  return *t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_tag(struct soap *soap, const char *tag1, const char *tag2)
+{ register const char *s, *t;
+  if (!tag1 || !tag2 || !*tag2)
+    return SOAP_OK;
+  s = strchr(tag1, ':');
+  t = strchr(tag2, ':');
+  if (t)
+  { if (s)
+    { if (t[1] && SOAP_STRCMP(s + 1, t + 1))
+        return SOAP_TAG_MISMATCH;
+      if (t != tag2 && soap_match_namespace(soap, tag1, tag2, s - tag1, t - tag2))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+        return SOAP_TAG_MISMATCH;
+      }
+    } 
+    else if (SOAP_STRCMP(tag1, t + 1))
+      return SOAP_TAG_MISMATCH;
+    else if (t != tag2 && soap_match_namespace(soap, tag1, tag2, 0, t - tag2))
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+      return SOAP_TAG_MISMATCH;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags and (default) namespaces match: '%s' '%s'\n", tag1, tag2));
+    return SOAP_OK;
+  }
+  if (s)
+  { if (SOAP_STRCMP(s + 1, tag2))
+      return SOAP_TAG_MISMATCH;
+  }
+  else if (SOAP_STRCMP(tag1, tag2))
+    return SOAP_TAG_MISMATCH;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags match: '%s' '%s'\n", tag1, tag2));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_array(struct soap *soap, const char *type)
+{ if (*soap->arrayType)
+    if (soap_match_tag(soap, soap->arrayType, type)
+     && soap_match_tag(soap, soap->arrayType, "xsd:anyType")
+     && soap_match_tag(soap, soap->arrayType, "xsd:ur-type")
+    )
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array type mismatch: '%s' '%s'\n", soap->arrayType, type));
+      return SOAP_TAG_MISMATCH;
+    }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************\
+ *
+ *	SSL
+ *
+\******************************************************************************/
+
+#ifdef WITH_OPENSSL
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_rand()
+{ unsigned char buf[4];
+  if (!ssl_init_done)
+    soap_ssl_init();
+  RAND_pseudo_bytes(buf, 4);
+  return *(int*)buf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *dhfile, const char *randfile, const char *sid)
+{ int err;
+  soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  if (dhfile)
+  { soap->dhfile = dhfile;
+    soap->rsa = 0;
+  }
+  else
+  { soap->dhfile = NULL;
+    soap->rsa = 1;
+  }
+  soap->randfile = randfile;
+  soap->require_client_auth = (flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION);
+  if (!(err = soap->fsslauth(soap)))
+  { if (sid)
+      SSL_CTX_set_session_id_context(soap->ctx, (unsigned char*)sid, strlen(sid));
+  }
+  return err; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_client_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *randfile)
+{ soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  soap->dhfile = NULL;
+  soap->rsa = 0;
+  soap->randfile = randfile;
+  soap->require_server_auth = (flags & SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION);
+  return soap->fsslauth(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_ssl_init()
+{ /* Note: for MT systems, the main program MUST call soap_ssl_init() before any threads are started */
+  if (!ssl_init_done)
+  { ssl_init_done = 1;
+    SSL_library_init();
+#ifndef WITH_LEAN
+    SSL_load_error_strings();
+#endif
+    if (!RAND_load_file("/dev/urandom", 1024))
+    { char buf[1024];
+      RAND_seed(buf, sizeof(buf));
+      while (!RAND_status())
+      { int r = rand();
+        RAND_seed(&r, sizeof(int));
+      }
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static const char *
+ssl_error(struct soap *soap, int ret)
+{ int err = SSL_get_error(soap->ssl, ret);
+  const char *msg = soap_str_code(h_ssl_error_codes, err);
+  if (msg)
+    strcpy(soap->msgbuf, msg);
+  else
+    return ERR_error_string(err, soap->msgbuf);
+  if (ERR_peek_error())
+  { unsigned long r;
+    strcat(soap->msgbuf, "\n");
+    while ((r = ERR_get_error()))
+      ERR_error_string_n(r, soap->msgbuf + strlen(soap->msgbuf), sizeof(soap->msgbuf) - strlen(soap->msgbuf));
+  } 
+  else
+  { switch (ret)
+    { case 0:
+        strcpy(soap->msgbuf, "EOF was observed that violates the protocol. The client probably provided invalid authentication information.");
+        break;
+      case -1:
+        sprintf(soap->msgbuf, "Error observed by underlying BIO: %s", strerror(errno));  
+        break;
+    }
+  }
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_password(char *buf, int num, int rwflag, void *userdata)
+{ if (num < (int)strlen((char*)userdata) + 1)
+    return 0;
+  return strlen(strcpy(buf, (char*)userdata));
+}
+#endif
+
+/******************************************************************************/
+/* This callback is included for future references. It should not be deleted
+#ifndef PALM_2
+static DH *
+ssl_tmp_dh(SSL *ssl, int is_export, int keylength)
+{ static DH *dh512 = NULL;
+  static DH *dh1024 = NULL;
+  DH *dh;
+  switch (keylength)
+  { case 512:
+      if (!dh512)
+      { BIO *bio = BIO_new_file("dh512.pem", "r");
+        if (bio)
+        { dh512 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+          return dh512;
+        }
+      }
+      else
+        return dh512;
+    default:
+      if (!dh1024)
+      { BIO *bio = BIO_new_file("dh1024.pem", "r");
+        if (bio)
+        { dh1024 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+        }
+      }
+      dh = dh1024;
+  }
+  return dh;
+}
+#endif
+*/
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_auth_init(struct soap *soap)
+{ if (!ssl_init_done)
+    soap_ssl_init();
+  if (!soap->ctx)
+  { if (!(soap->ctx = SSL_CTX_new(SSLv23_method())))
+      return soap_set_receiver_error(soap, "SSL error", "Can't setup context", SOAP_SSL_ERROR);
+  }
+  if (soap->randfile)
+  { if (!RAND_load_file(soap->randfile, -1))
+      return soap_set_receiver_error(soap, "SSL error", "Can't load randomness", SOAP_SSL_ERROR);
+  }
+  if (soap->cafile || soap->capath)
+  { if (!SSL_CTX_load_verify_locations(soap->ctx, soap->cafile, soap->capath))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read CA file and directory", SOAP_SSL_ERROR);
+    if (soap->cafile && soap->require_client_auth)
+      SSL_CTX_set_client_CA_list(soap->ctx, SSL_load_client_CA_file(soap->cafile));
+  }
+  if (!SSL_CTX_set_default_verify_paths(soap->ctx))
+    return soap_set_receiver_error(soap, "SSL error", "Can't read default CA file and/or directory", SOAP_SSL_ERROR);
+/* See below */
+  if (soap->keyfile)
+  { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read certificate key file", SOAP_SSL_ERROR);
+    if (soap->password)
+    { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+      SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+    }
+    if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+  }
+/* Suggested alternative approach to check cafile first before the key file:
+  if (soap->password)
+  { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+    SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+  }
+  if (!soap->cafile || !SSL_CTX_use_certificate_chain_file(soap->ctx, soap->cafile))
+  { if (soap->keyfile)
+    { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read certificate or key file", SOAP_SSL_ERROR);
+      if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+    }
+  }
+*/
+  if (soap->rsa)
+  { RSA *rsa = RSA_generate_key(1024, RSA_F4, NULL, NULL);
+    if (!SSL_CTX_set_tmp_rsa(soap->ctx, rsa))
+    { if (rsa)
+        RSA_free(rsa);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set RSA key", SOAP_SSL_ERROR);
+    }
+    RSA_free(rsa);
+  }
+  else if (soap->dhfile)
+  { DH *dh = 0;
+    BIO *bio;
+    bio = BIO_new_file(soap->dhfile, "r");
+    if (!bio)
+      return soap_set_receiver_error(soap, "SSL error", "Can't read DH file", SOAP_SSL_ERROR);
+    dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+    BIO_free(bio);
+    if (SSL_CTX_set_tmp_dh(soap->ctx, dh) < 0)
+    { if (dh)
+        DH_free(dh);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set DH parameters", SOAP_SSL_ERROR);
+    }
+    DH_free(dh);
+  }
+  SSL_CTX_set_options(soap->ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2);
+  SSL_CTX_set_verify(soap->ctx, soap->require_client_auth ? (SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT) : soap->require_server_auth ? SSL_VERIFY_PEER : SSL_VERIFY_NONE, soap->fsslverify);
+#if (OPENSSL_VERSION_NUMBER < 0x00905100L)
+  SSL_CTX_set_verify_depth(soap->ctx, 1); 
+#else
+  SSL_CTX_set_verify_depth(soap->ctx, 9); 
+#endif  
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_verify_callback(int ok, X509_STORE_CTX *store)
+{
+#ifdef SOAP_DEBUG
+  if (!ok) 
+  { char data[256];
+    X509 *cert = X509_STORE_CTX_get_current_cert(store);
+    fprintf(stderr, "SSL verify error or warning with certificate at depth %d: %s\n", X509_STORE_CTX_get_error_depth(store), X509_verify_cert_error_string(X509_STORE_CTX_get_error(store)));
+    X509_NAME_oneline(X509_get_issuer_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate issuer %s\n", data);
+    X509_NAME_oneline(X509_get_subject_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate subject %s\n", data);
+  }
+#endif
+  /* Note: return 1 to continue, but unsafe progress will be terminated by SSL */
+  return ok;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_accept(struct soap *soap)
+{ BIO *bio;
+  int i, r;
+  if (!soap_valid_socket(soap->socket))
+    return soap_set_receiver_error(soap, "SSL error", "No socket in soap_ssl_accept()", SOAP_SSL_ERROR);
+  if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    return SOAP_INVALID_SOCKET;
+  if (!soap->ssl)
+  { soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+      return soap_set_receiver_error(soap, "SSL error", "SSL_new() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+  }
+  else
+    SSL_clear(soap->ssl);
+  soap->imode |= SOAP_ENC_SSL;
+  soap->omode |= SOAP_ENC_SSL;
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&nonblocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)|O_NONBLOCK);
+#endif
+  bio = BIO_new_socket((SOAP_SOCKET)soap->socket, BIO_NOCLOSE);
+  SSL_set_bio(soap->ssl, bio, bio);
+  i = 100; /* 100 * 0.1 ms retries */
+  while ((r = SSL_accept(soap->ssl)) <= 0)
+  { int err = SSL_get_error(soap->ssl, r);
+    if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE)
+    { struct timeval timeout;
+      fd_set fd;
+      if (i-- <= 0)
+        break;
+      timeout.tv_sec = 0;
+      timeout.tv_usec = 100000;
+      FD_ZERO(&fd);
+      FD_SET((SOAP_SOCKET)soap->socket, &fd);
+      r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+      if (r < 0 && soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        return SOAP_EOF;
+      }
+    }
+    else
+    { soap->errnum = err;
+      break;
+    }
+  }
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&blocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+  if (r <= 0)
+  { soap_set_receiver_error(soap, ssl_error(soap, r), "SSL_accept() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+    soap_closesock(soap);
+    return SOAP_SSL_ERROR;
+  }
+  if (soap->require_client_auth)
+  { X509 *peer;
+    int err;
+    if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    peer = SSL_get_peer_certificate(soap->ssl);
+    if (!peer)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    X509_free(peer);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#endif /* WITH_OPENSSL */
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_init(struct soap *soap)
+{ soap->errmode = 1;
+#ifdef WIN32
+  if (tcp_done)
+    return 0;
+  else
+  { WSADATA w;
+    if (WSAStartup(MAKEWORD(1, 1), &w))
+      return -1;
+    tcp_done = 1;
+  }
+#endif
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_done(struct soap *soap)
+{ 
+#ifdef SOAP_DEBUG
+  int i;
+#endif
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  while (soap->clist)
+  { struct soap_clist *p = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = p;
+  }
+  soap->keep_alive = 0; /* to force close the socket */
+  soap_closesock(soap);
+#ifdef WITH_COOKIES
+  soap_free_cookies(soap);
+#endif
+  while (soap->plugins)
+  { register struct soap_plugin *p = soap->plugins->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Removing plugin '%s'\n", soap->plugins->id));
+    if (soap->plugins->fcopy || soap->state == SOAP_INIT)
+      soap->plugins->fdelete(soap, soap->plugins);
+    SOAP_FREE(soap, soap->plugins);
+    soap->plugins = p;
+  }
+  soap->fplugin = fplugin;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+#ifdef WITH_OPENSSL
+  if (soap->session)
+  { SSL_SESSION_free(soap->session);
+    soap->session = NULL;
+  }
+#endif
+  if (soap->state == SOAP_INIT)
+  { if (soap_valid_socket(soap->master))
+    { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+      soap->master = SOAP_INVALID_SOCKET;
+    }
+#ifdef WITH_OPENSSL
+    if (soap->ctx)
+    { SSL_CTX_free(soap->ctx);
+      soap->ctx = NULL;
+    }
+#endif
+  }
+#ifdef SOAP_DEBUG
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free logfiles\n"));
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { if (soap->logfile[i])
+    { SOAP_FREE(soap, (void*)soap->logfile[i]);
+      soap->logfile[i] = NULL;
+    }
+    soap_close_logfile(soap, i);
+  }
+  soap_free_mht(soap);
+  soap->state = 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_cleanup(struct soap *soap)
+{ soap_done(soap);
+#ifdef WIN32
+  if (!tcp_done)
+    return;
+  tcp_done = 0;
+  WSACleanup();
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+tcp_error(struct soap *soap)
+{ register const char *msg = NULL;
+  switch (soap->errmode)
+  { case 0:
+      msg = soap_strerror(soap);
+      break;
+    case 1:
+      msg = "WSAStartup failed";
+      break;
+    case 2:
+    {
+#ifndef WITH_LEAN
+      msg = soap_str_code(h_error_codes, soap->errnum);
+      if (!msg)
+#endif
+      { sprintf(soap->msgbuf, "TCP/UDP IP error %d", soap->errnum);
+        msg = soap->msgbuf;
+      }
+    }
+  }
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static const char*
+http_error(struct soap *soap, int status)
+{ register const char *msg = SOAP_STR_EOS;
+#ifndef WITH_LEAN
+  msg = soap_str_code(h_http_error_codes, status);
+  if (!msg)
+    msg = SOAP_STR_EOS;
+#endif
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_IPV6
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr)
+{ soap_int32 iadd = -1;
+  struct hostent hostent, *host = &hostent;
+#ifdef VXWORKS
+  int hostint;
+  /* inet_addr(), and hostGetByName() expect "char *"; addr is a "const char *". */
+  iadd = inet_addr((char*)addr);
+#else
+#if defined(_AIXVERSION_431) || defined(TRU64)
+  struct hostent_data ht_data;
+#endif
+#ifdef AS400
+  iadd = inet_addr((void*)addr);
+#else
+  iadd = inet_addr(addr);
+#endif
+#endif
+  if (iadd != -1)
+  { memcpy(inaddr, &iadd, sizeof(iadd));
+    return SOAP_OK;
+  }
+#if defined(__GLIBC__)
+  if (gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &host, &soap->errnum) < 0)
+    host = NULL;
+#elif defined(_AIXVERSION_431) || defined(TRU64)
+  memset((void*)&ht_data, 0, sizeof(ht_data));
+  if (gethostbyname_r(addr, &hostent, &ht_data) < 0)
+  { host = NULL;
+    soap->errnum = h_errno;
+  }
+#elif defined(HAVE_GETHOSTBYNAME_R)
+  host = gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &soap->errnum);
+#elif defined(VXWORKS)
+  /* If the DNS resolver library resolvLib has been configured in the vxWorks
+   * image, a query for the host IP address is sent to the DNS server, if the
+   * name was not found in the local host table. */
+  hostint = hostGetByName((char*)addr);
+  if (hostint == ERROR)
+  { host = NULL;
+    soap->errnum = soap_errno; 
+  }
+#else
+#ifdef AS400
+  if (!(host = gethostbyname((void*)addr)))
+    soap->errnum = h_errno;
+#else
+  if (!(host = gethostbyname(addr)))
+    soap->errnum = h_errno;
+#endif
+#endif
+  if (!host)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Host name not found\n"));
+    return SOAP_ERR;
+  }
+#ifdef VXWORKS
+  inaddr->s_addr = hostint;
+#else
+  memcpy(inaddr, host->h_addr, host->h_length);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_connect(struct soap *soap, const char *endpoint, const char *host, int port)
+{
+#ifdef WITH_IPV6
+  struct addrinfo hints, *res, *ressave;
+  int err;
+#endif
+  register int fd;
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->socket))
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+  soap->socket = SOAP_INVALID_SOCKET;
+  if (tcp_init(soap))
+  { soap->errnum = 0;
+    soap_set_sender_error(soap, tcp_error(soap), "TCP init failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->errmode = 0;
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+    err = getaddrinfo(soap->proxy_host, soap_int2s(soap, soap->proxy_port), &hints, &res);
+  else
+    err = getaddrinfo(host, soap_int2s(soap, port), &hints, &res);
+  if (err)
+  { soap_set_sender_error(soap, gai_strerror(err), "getaddrinfo failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  ressave = res;
+again:
+  fd = (int)socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+  soap->errmode = 0;
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    fd = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    fd = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  if (fd < 0)
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "socket failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_flags & SO_LINGER)
+  { struct linger linger;
+    memset((void*)&linger, 0, sizeof(linger));
+    linger.l_onoff = 1;
+    linger.l_linger = 0;
+    if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+    { soap->errnum = soap_socket_errno;
+      soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  if ((soap->connect_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, soap->connect_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (soap->keep_alive && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)fd, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Opening socket %d to host='%s' port=%d\n", fd, host, port));
+#ifndef WITH_IPV6
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+  { if (soap->fresolve(soap, soap->proxy_host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get proxy host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)soap->proxy_port);
+  }
+  else
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)port);
+  }
+  soap->errmode = 0;
+  if ((soap->omode & SOAP_IO_UDP))
+    return fd;
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking)); /* modified to use fd */
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+  else
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  for (;;)
+  { 
+#ifdef WITH_IPV6
+    if (connect((SOAP_SOCKET)fd, res->ai_addr, res->ai_addrlen))
+#else
+    if (connect((SOAP_SOCKET)fd, (struct sockaddr*)&soap->peer, sizeof(soap->peer)))
+#endif
+    { 
+#ifndef WITH_LEAN
+      if (soap->connect_timeout && (soap_socket_errno == SOAP_EINPROGRESS || soap_socket_errno == SOAP_EWOULDBLOCK))
+      { struct timeval timeout;
+        SOAP_SOCKLEN_T k;
+        fd_set fds;
+        if (soap->connect_timeout > 0)
+        { timeout.tv_sec = soap->connect_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->connect_timeout/1000000;
+          timeout.tv_usec = -soap->connect_timeout%1000000;
+        }
+        FD_ZERO(&fds);
+        FD_SET((SOAP_SOCKET)fd, &fds);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(fd + 1), NULL, &fds, NULL, &timeout);
+          if (r > 0)
+	    break;
+          if (!r)
+          { soap->errnum = 0;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+            soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+            soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+	k = (SOAP_SOCKLEN_T)sizeof(soap->errnum);
+        if (!getsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_ERROR, (char*)&soap->errnum, &k) && !soap->errnum)	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+          break;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap->errnum = soap_socket_errno;
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      else
+#endif
+#ifdef WITH_IPV6
+      if (res->ai_next)
+      { res = res->ai_next;
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        goto again;
+      }
+      else
+#endif
+      if (soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }  
+    else
+      break;
+  }
+#ifdef WITH_IPV6
+  soap->peerlen = 0; /* IPv6: already connected so use send() */
+  freeaddrinfo(ressave);
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  soap->socket = fd;
+  soap->imode &= ~SOAP_ENC_SSL;
+  soap->omode &= ~SOAP_ENC_SSL;
+  if (!strncmp(endpoint, "https:", 6))
+  {
+#ifdef WITH_OPENSSL
+    BIO *bio;
+    int r;
+    if (soap->proxy_host)
+    { short v;
+      unsigned int k = soap->omode; /* make sure we only parse HTTP */
+      size_t n = soap->count; /* save the content length */
+      char *userid, *passwd;
+      soap->omode &= ~SOAP_ENC; /* mask IO and ENC */
+      soap->omode |= SOAP_IO_BUFFER;
+      soap_begin_send(soap);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connecting to proxy server\n"));
+      sprintf(soap->tmpbuf, "CONNECT %s:%d HTTP/%s", host, port, soap->http_version);
+      if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+#ifndef WITH_LEAN
+      if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+      { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+        strcpy(soap->tmpbuf, "Basic ");
+        soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+        if ((soap->error = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+        { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return soap->error;
+        }
+      }
+#endif
+      if ((soap->error = soap->fposthdr(soap, NULL, NULL))
+       || soap_flush(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->omode = k;
+      k = soap->imode;
+      soap->imode &= ~SOAP_ENC; /* mask IO and ENC */
+      v = soap->version; /* preserve */
+      userid = soap->userid; /* preserve */
+      passwd = soap->passwd; /* preserve */
+      if (soap_begin_recv(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->userid = userid; /* restore */
+      soap->passwd = passwd; /* restore */
+      soap->version = v; /* restore */
+      soap->imode = k; /* restore */
+      soap->count = n; /* restore */
+      soap_begin_send(soap);
+    }
+    if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    { soap_set_sender_error(soap, "SSL error", "SSL authentication failed in tcp_connect(): check password, key file, and ca file.", SOAP_SSL_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+    { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      soap->error = SOAP_SSL_ERROR;
+      return SOAP_INVALID_SOCKET;
+    }
+    if (soap->session)
+    { if (!strcmp(soap->session_host, host) && soap->session_port == port)
+        SSL_set_session(soap->ssl, soap->session);
+      SSL_SESSION_free(soap->session);
+      soap->session = NULL;
+    }
+    soap->imode |= SOAP_ENC_SSL;
+    soap->omode |= SOAP_ENC_SSL;
+    bio = BIO_new_socket((SOAP_SOCKET)fd, BIO_NOCLOSE);
+    SSL_set_bio(soap->ssl, bio, bio);
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#if defined(WIN32)
+    { u_long nonblocking = 1;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+    }
+#elif defined(VXWORKS)
+    { u_long nonblocking = 1;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+#endif
+    for (;;)
+    { if ((r = SSL_connect(soap->ssl)) <= 0)
+      { int err = SSL_get_error(soap->ssl, r);
+        if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+        { soap_set_sender_error(soap, ssl_error(soap, r), "SSL connect failed in tcp_connect()", SOAP_SSL_ERROR);
+          soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (soap->connect_timeout)
+        { struct timeval timeout;
+          fd_set fds;
+          if (soap->connect_timeout > 0)
+          { timeout.tv_sec = soap->connect_timeout;
+            timeout.tv_usec = 0;
+          }
+          else
+          { timeout.tv_sec = -soap->connect_timeout/1000000;
+            timeout.tv_usec = -soap->connect_timeout%1000000;
+          }
+          FD_ZERO(&fds);
+          FD_SET((SOAP_SOCKET)fd, &fds);
+          for (;;)
+          { int r = select((SOAP_SOCKET)(fd + 1), &fds, NULL, &fds, &timeout);
+            if (r > 0)
+	      break;
+            if (!r)
+            { soap->errnum = 0;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+              soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+              soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+              return SOAP_INVALID_SOCKET;
+            }
+          }
+	  continue;
+        }
+      }
+      break;
+    }
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#ifdef WIN32
+    { u_long blocking = 0;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+    }
+#elif defined(VXWORKS)
+    { u_long blocking = 0;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+    if (soap->require_server_auth)
+    { X509 *peer;
+      int err;
+      if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+      { soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      peer = SSL_get_peer_certificate(soap->ssl);
+      if (!peer)
+      { soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      X509_NAME_get_text_by_NID(X509_get_subject_name(peer), NID_commonName, soap->msgbuf, sizeof(soap->msgbuf));
+      X509_free(peer);
+      if (soap_tag_cmp(soap->msgbuf, host))
+      { soap_set_sender_error(soap, "SSL error", "SSL certificate host name mismatch in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+#else
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    soap->error = SOAP_SSL_ERROR;
+    return SOAP_INVALID_SOCKET;
+#endif
+  }
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_bind(struct soap *soap, const char *host, int port, int backlog)
+{
+#ifdef WITH_IPV6
+  struct addrinfo *addrinfo = NULL;
+  struct addrinfo hints;
+  struct addrinfo res;
+  int err;
+#endif
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->master))
+  { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+    soap->master = SOAP_INVALID_SOCKET;
+  }
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 1;
+  if (tcp_init(soap))
+  { soap_set_receiver_error(soap, tcp_error(soap), "TCP init failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  hints.ai_flags = AI_PASSIVE;
+  soap->errmode = 2;
+  err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo);
+  if (addrinfo)
+  { res = *addrinfo;
+    soap->peer = *((struct sockaddr_storage*)addrinfo->ai_addr);
+    soap->peerlen = addrinfo->ai_addrlen;
+    res.ai_addr = (struct sockaddr*)&soap->peer;
+    res.ai_addrlen = soap->peerlen;
+    freeaddrinfo(addrinfo);
+  }
+  if (err)
+  { soap_set_receiver_error(soap, gai_strerror(err), "getaddrinfo failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->master = socket(res.ai_family, res.ai_socktype, res.ai_protocol);
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->master = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    soap->master = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  soap->errmode = 0;
+  if (!soap_valid_socket(soap->master))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "socket failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->socket = soap->master;
+#endif
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)soap->master, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(soap->master, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->bind_flags && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, soap->bind_flags, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->master, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+#ifdef WITH_IPV6
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, res.ai_addr, res.ai_addrlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+#else
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (host)
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_receiver_error(soap, tcp_error(soap), "get host by name failed in soap_bind()", SOAP_TCP_ERROR);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  else
+    soap->peer.sin_addr.s_addr = htonl(INADDR_ANY);
+  soap->peer.sin_port = htons((short)port);
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, (struct sockaddr*)&soap->peer, soap->peerlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+  if (!(soap->omode & SOAP_IO_UDP) && listen((SOAP_SOCKET)soap->master, backlog))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "listen failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+  return soap->master;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_poll(struct soap *soap)
+{ 
+#ifndef WITH_LEAN
+  struct timeval timeout;
+  fd_set rfd, sfd, xfd;
+  int r;
+  timeout.tv_sec = 0;
+  timeout.tv_usec = 0;
+  FD_ZERO(&rfd);
+  FD_ZERO(&sfd);
+  FD_ZERO(&xfd);
+  if (soap_valid_socket(soap->socket))
+  { FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &xfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, &xfd, &timeout);
+    if (r > 0 && FD_ISSET((SOAP_SOCKET)soap->socket, &xfd))
+      r = -1;
+  }
+  else if (soap_valid_socket(soap->master))
+  { FD_SET((SOAP_SOCKET)soap->master, &sfd);
+    r = select((SOAP_SOCKET)(soap->master + 1), NULL, &sfd, NULL, &timeout);
+  }
+  else
+    return SOAP_OK;
+  if (r > 0)
+  {
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+    {
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || SSL_peek(soap->ssl, soap->tmpbuf, 1) > 0))
+        return SOAP_OK;
+    }
+    else
+#endif
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) > 0))
+        return SOAP_OK;
+  }
+  else if (r < 0)
+  { soap->errnum = soap_socket_errno;
+    if ((soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) && soap_socket_errno != SOAP_EINTR)
+    { soap_set_receiver_error(soap, tcp_error(soap), "select failed in soap_poll()", SOAP_TCP_ERROR);
+      return soap->error = SOAP_TCP_ERROR;
+    }
+  }
+  else
+    soap->errnum = 0;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Polling: other end down on socket=%d select=%d\n", soap->socket, r));
+  return SOAP_EOF;
+#else
+  return SOAP_OK;
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_accept(struct soap *soap, int s, struct sockaddr *a, int *n)
+{ int fd;
+  fd = (int)accept((SOAP_SOCKET)s, a, (SOAP_SOCKLEN_T*)n);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, FD_CLOEXEC);
+#endif
+#endif
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_accept(struct soap *soap)
+{ int n = (int)sizeof(soap->peer);
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  soap->error = SOAP_OK;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    return soap->socket = soap->master;
+#endif
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 0;
+  soap->keep_alive = 0;
+  if (soap_valid_socket(soap->master))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->accept_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->accept_timeout > 0)
+        { timeout.tv_sec = soap->accept_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->accept_timeout/1000000;
+          timeout.tv_usec = -soap->accept_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->master, &fd);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(soap->master + 1), &fd, &fd, NULL, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            soap_set_receiver_error(soap, "Timeout", "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            soap_closesock(soap);
+            soap_set_sender_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+#if defined(WIN32)
+	{ u_long nonblocking = 1;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &nonblocking);
+        }
+#elif defined(VXWORKS)
+        { u_long nonblocking = 1;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&nonblocking));
+        }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)|O_NONBLOCK);
+#endif
+      }
+      else
+#if defined(WIN32)
+      { u_long blocking = 0;
+        ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+      }
+#elif defined(VXWORKS)
+      { u_long blocking = 0;
+        ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+      }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+      soap->socket = soap->faccept(soap, soap->master, (struct sockaddr*)&soap->peer, &n);
+      soap->peerlen = (size_t)n;
+      if (soap_valid_socket(soap->socket))
+      {
+#ifdef WITH_IPV6
+/* Use soap->host to store the numeric form of the remote host */
+        getnameinfo((struct sockaddr*)&soap->peer, n, soap->host, sizeof(soap->host), NULL, 0, NI_NUMERICHOST | NI_NUMERICSERV); 
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d from %s\n", soap->socket, soap->host));
+        soap->ip = 0; /* info stored in soap->peer and soap->host */
+        soap->port = 0; /* info stored in soap->peer and soap->host */
+#else
+        soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+        soap->port = (int)ntohs(soap->peer.sin_port); /* does not return port number on some systems */
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d at port %d from IP %d.%d.%d.%d\n", soap->socket, soap->port, (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF));
+#endif
+#ifndef WITH_LEAN
+	if (soap->accept_flags & SO_LINGER)
+        { struct linger linger;
+          memset((void*)&linger, 0, sizeof(linger));
+          linger.l_onoff = 1;
+          linger.l_linger = 0;
+	  if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+          { soap->errnum = soap_socket_errno;
+	    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in soap_accept()", SOAP_TCP_ERROR);
+	    soap_closesock(soap);
+            return SOAP_INVALID_SOCKET;
+	  }
+        }
+        if ((soap->accept_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, soap->accept_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#ifdef TCP_NODELAY
+        if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->socket, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#endif
+#endif
+        if (soap->accept_timeout)
+        {
+#if defined(WIN32)
+          u_long blocking = 0;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+          ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+#elif defined(VXWORKS)
+          u_long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+          ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)(&blocking));
+#elif defined(PALM)
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL,0)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL,0)&~O_NONBLOCK);
+#elif defined(SYMBIAN)
+          long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, 0/*FIONBIO*/, &blocking);
+#else
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+	}
+        soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+        return soap->socket;
+      }
+      if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept failed from %s\n", soap->host));
+        soap->errnum = soap_socket_errno;
+        soap_set_receiver_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+	soap_closesock(soap);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+  }
+  else
+  { soap->errnum = 0;
+    soap_set_receiver_error(soap, tcp_error(soap), "no master socket in soap_accept()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_disconnect(struct soap *soap)
+{
+#ifdef WITH_OPENSSL
+  if (soap->ssl)
+  { int r, s = 0;
+    if (soap->session)
+      SSL_SESSION_free(soap->session);
+    if (*soap->host)
+    { soap->session = SSL_get1_session(soap->ssl);
+      if (soap->session)
+      { strcpy(soap->session_host, soap->host);
+        soap->session_port = soap->port;
+      }
+    }
+    r = SSL_shutdown(soap->ssl);
+    if (r != 1)
+    { s = ERR_get_error();
+      if (s)
+      { if (soap_valid_socket(soap->socket))
+        { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1);
+          soap->socket = SOAP_INVALID_SOCKET;
+        }
+        r = SSL_shutdown(soap->ssl);
+      }
+    }
+    DBGLOG(TEST, if (s) SOAP_MESSAGE(fdebug, "Shutdown failed: %d\n", SSL_get_error(soap->ssl, r)));
+    SSL_free(soap->ssl);
+    soap->ssl = NULL;
+    if (s)
+      return SOAP_SSL_ERROR;
+    ERR_remove_state(0);
+  }
+#endif
+  if (soap_valid_socket(soap->socket) && !(soap->omode & SOAP_IO_UDP))
+  { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 2);
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+    soap->socket = SOAP_INVALID_SOCKET;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_closesocket(struct soap *soap, SOAP_SOCKET fd)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Close socket %d\n", (int)fd));
+  return closesocket(fd);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_shutdownsocket(struct soap *soap, SOAP_SOCKET fd, int how)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Shutdown socket %d how=%d\n", (int)fd, how));
+  return shutdown(fd, how);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_closesock(struct soap *soap)
+{ register int status = soap->error;
+  if (status == SOAP_EOF || status == SOAP_TCP_ERROR || status == SOAP_SSL_ERROR || !soap->keep_alive)
+  { if (soap->fclose && (soap->error = soap->fclose(soap)))
+      return soap->error;
+    soap->keep_alive = 0;
+  }
+#ifdef WITH_ZLIB
+  if (soap->zlib_state == SOAP_ZLIB_DEFLATE)
+    deflateEnd(&soap->d_stream);
+  else if (soap->zlib_state == SOAP_ZLIB_INFLATE)
+    inflateEnd(&soap->d_stream);
+  soap->zlib_state = SOAP_ZLIB_NONE;
+#endif
+  return soap->error = status;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_hash(register const char *s)
+{ register size_t h = 0;
+  while (*s)
+    h = 65599*h + *s++;
+  return h % SOAP_IDHASH;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_pht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing pointer hashtable\n"));
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new1(soap_mode mode)
+{ return soap_new2(mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new()
+{ return soap_new2(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new2(soap_mode imode, soap_mode omode)
+{ struct soap *soap = (struct soap*)malloc(sizeof(struct soap));
+  if (soap)
+    soap_init2(soap, imode, omode);
+  return soap;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_del(struct soap *soap)
+{ free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_pht(struct soap *soap)
+{ register struct soap_pblk *pb, *next;
+  register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free pointer hashtable\n"));
+  for (pb = soap->pblk; pb; pb = next)
+  { next = pb->next;
+    SOAP_FREE(soap, pb);
+  }
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type)
+{ register int i;
+  struct soap_plist *pp;
+  if (soap->version != 1)
+    soap->encoding = 1;
+  if (a)
+    i = soap_array_pointer_lookup(soap, p, a, n, type, &pp);
+  else
+    i = soap_pointer_lookup(soap, p, type, &pp);
+  if (i)
+  { if (soap_is_embedded(soap, pp)
+     || soap_is_single(soap, pp))
+      return 0;
+    soap_set_embedded(soap, pp);
+  }
+  return i;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_lookup(struct soap *soap, const void *p, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (p)
+  { for (pp = soap->pht[soap_hash_ptr(p)]; pp; pp = pp->next)
+    { if (pp->ptr == p && pp->type == type)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d id=%d\n", p, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d: not found\n", p, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_enter(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register int h;
+  register struct soap_plist *pp;
+  if (!soap->pblk || soap->pidx >= SOAP_PTRBLK)
+  { register struct soap_pblk *pb = (struct soap_pblk*)SOAP_MALLOC(soap, sizeof(struct soap_pblk));
+    if (!pb)
+    { soap->error = SOAP_EOM;
+      return 0;
+    }
+    pb->next = soap->pblk;
+    soap->pblk = pb;
+    soap->pidx = 0;
+  }
+  *ppp = pp = &soap->pblk->plist[soap->pidx++];
+  if (a)
+    h = soap_hash_ptr(a->__ptr);
+  else
+    h = soap_hash_ptr(p);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pointer enter location=%p array=%p size=%d dim=%d type=%d id=%d\n", p, a?a->__ptr:NULL, a?a->__size:0, n, type, soap->idnum+1));
+  pp->next = soap->pht[h];
+  pp->type = type;
+  pp->mark1 = 0;
+  pp->mark2 = 0;
+  pp->ptr = p;
+  pp->array = a;
+  soap->pht[h] = pp;
+  pp->id = ++soap->idnum;
+  return pp->id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_pointer_lookup(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (!p || !a->__ptr)
+    return 0;
+  for (pp = soap->pht[soap_hash_ptr(a->__ptr)]; pp; pp = pp->next)
+  { if (pp->type == type && pp->array && pp->array->__ptr == a->__ptr)
+    { register int i;
+      for (i = 0; i < n; i++)
+        if (((const int*)&pp->array->__size)[i] != ((const int*)&a->__size)[i])
+	  break;
+      if (i == n)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d id=%d\n", a->__ptr, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d: not found\n", a->__ptr, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_count(struct soap *soap)
+{ soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) || (soap->omode & SOAP_ENC_DIME))
+    soap->mode = soap->omode | SOAP_IO_LENGTH | SOAP_ENC_DIME;
+  else
+#endif
+  { soap->mode = soap->omode;
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE
+     || (((soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_ENC_XML))
+#ifndef WITH_LEANER
+      && !soap->fpreparesend
+#endif
+      ))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    else
+      soap->mode |= SOAP_IO_LENGTH;
+  }
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (!(soap->mode & SOAP_ENC_DIME))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+    soap->mode |= SOAP_ENC_MIME;
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+  soap->dime.list = soap->dime.last;	/* keep track of last DIME attachment */
+#endif
+  soap->count = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->part = SOAP_BEGIN;
+  soap->idnum = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin count phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+#ifndef WITH_LEANER
+  soap->dime.count = 0; /* count # of attachments */
+  soap->dime.size = 0; /* accumulate total size of attachments */
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+    return soap->error = soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_count(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->fpreparefinal)
+    return soap->error = soap->fpreparefinal(soap);
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of count phase\n"));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_send(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+  soap->mode = soap->omode | (soap->mode & (SOAP_IO_LENGTH | SOAP_ENC_DIME));
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+#ifdef WITH_UDP
+  if ((soap->mode & SOAP_IO_UDP))
+  { soap->mode |= SOAP_ENC_XML;
+    if (soap->count > SOAP_BUFLEN)
+      return soap->error = SOAP_UDP_ERROR;
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_FLUSH && soap_valid_socket(soap->socket))
+  { if (soap->count || (soap->mode & SOAP_IO_LENGTH) || (soap->mode & SOAP_ENC_XML))
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+  soap->mode &= ~SOAP_IO_LENGTH;
+  if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap_new_block(soap);
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+  { soap->mode |= SOAP_ENC_MIME;
+    soap->mode &= ~SOAP_ENC_DIME;
+  }
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket)) /* Set win32 stdout or soap->sendfd to BINARY, e.g. to support DIME */
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->sendfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->sendfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#endif
+  if (soap->mode & SOAP_IO)
+  { soap->bufidx = 0;
+    soap->buflen = 0;
+  }
+  soap->chunksize = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+#ifdef WITH_ZLIB
+  soap->z_ratio_out = 1.0;
+  if ((soap->mode & SOAP_ENC_ZLIB) && soap->zlib_state != SOAP_ZLIB_DEFLATE)
+  {
+#ifdef WITH_GZIP
+    memcpy(soap->z_buf, "\37\213\10\0\0\0\0\0\0\377", 10);
+    soap->d_stream.next_out = (Byte*)soap->z_buf + 10;
+    soap->d_stream.avail_out = SOAP_BUFLEN - 10;
+    soap->z_crc = crc32(0L, NULL, 0);
+    if (deflateInit2(&soap->d_stream, soap->z_level, Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY) != Z_OK)
+#else
+    soap->d_stream.next_out = (Byte*)soap->z_buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    if (deflateInit(&soap->d_stream, soap->z_level) != Z_OK)
+#endif
+      return soap->error = SOAP_ZLIB_ERROR;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflate initialized\n"));
+    soap->zlib_state = SOAP_ZLIB_DEFLATE;
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin send phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+  soap->part = SOAP_BEGIN;
+#ifndef WITH_LEANER
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_embedded(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { pp->mark1 = 1;
+    pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded %p type=%d mark set to 1\n", p, t));
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_reference(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (!p || (soap->mode & SOAP_XML_TREE))
+    return 1;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (soap_pointer_enter(soap, p, NULL, 0, t, &pp))
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  else
+    return 1;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reference %p type=%d (%d %d)\n", p, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_reference(struct soap *soap, const void *p, const struct soap_array *a, int n, int t)
+{ register int i;
+  struct soap_plist *pp;
+  if (!p || !a->__ptr)
+    return 1;
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (i)
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (!soap_pointer_enter(soap, p, a, n, t, &pp))
+    return 1;
+  else
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array reference %p ptr=%p dim=%d type=%d (%d %d)\n", p, a->__ptr, n, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embedded_id(struct soap *soap, int id, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap->mode & SOAP_XML_TREE)
+    return id;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id %p type=%d id=%d\n", p, t, id));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (id < 0)
+    { id = soap_pointer_lookup(soap, p, t, &pp);
+      if (id)
+      { if (soap->mode & SOAP_IO_LENGTH)
+          pp->mark1 = 2;
+        else
+          pp->mark2 = 2;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id multiref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+      }
+      return -1;
+    }
+    return id;
+  }
+  if (id < 0)
+    id = soap_pointer_lookup(soap, p, t, &pp);
+  else if (id && !soap_pointer_lookup(soap, p, t, &pp))
+    return 0;
+  if (id && pp)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      pp->mark1 = 1;
+    else
+      pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id embedded ref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+  }
+  return id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Is embedded? %d %d\n", (int)pp->mark1, (int)pp->mark2));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      return pp->mark1 != 0;
+    return pp->mark2 != 0;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 1;
+  return pp->mark2 == 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_single(struct soap *soap, struct soap_plist *pp)
+{ if (soap->part == SOAP_IN_HEADER)
+    return 1;
+  if (!pp)
+    return 0;
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 0;
+  return pp->mark2 == 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return;
+  if (soap->mode & SOAP_IO_LENGTH)
+    pp->mark1 = 1;
+  else
+    pp->mark2 = 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attachment(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, const char *aid, const char *atype, const char *aoptions, int n, const char *type, int t) 
+{ struct soap_plist *pp;
+  int i;
+  if (!p || !a->__ptr || (!aid && !atype))
+    return soap_element_id(soap, tag, id, p, a, n, type, t);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Attachment tag='%s' id='%s' (%d) type='%s'\n", tag, aid?aid:"", id, atype?atype:""));
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (!i)
+  { i = soap_pointer_enter(soap, p, a, n, t, &pp);
+    if (!i)
+    { soap->error = SOAP_EOM;
+      return -1;
+    }
+  }
+  if (id <= 0)
+    id = i;
+  if (!aid)
+  { sprintf(soap->tmpbuf, soap->dime_id_format, id);
+    aid = soap_strdup(soap, soap->tmpbuf);
+  }
+  /* Add MTOM xop:Include element when necessary */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  if ((soap->mode & SOAP_ENC_MTOM) && strcmp(tag, "xop:Include"))
+  { if (soap_element_begin_out(soap, tag, 0, type)
+     || soap_element_href(soap, "xop:Include", 0, "href", aid)
+     || soap_element_end_out(soap, tag))
+      return soap->error;
+  }
+  else if (soap_element_href(soap, tag, 0, "href", aid))
+    return soap->error;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { if (pp->mark1 != 3)
+    { struct soap_multipart *content;
+      if (soap->mode & SOAP_ENC_MTOM)
+        content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, (char*)a->__ptr, a->__size);
+      else
+        content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, (char*)a->__ptr, a->__size);
+      if (!content)
+      { soap->error = SOAP_EOM;
+        return -1;
+      }
+      if (!strncmp(aid, "cid:", 4)) /* RFC 2111 */
+      { if (soap->mode & SOAP_ENC_MTOM)
+        { char *s = (char*)soap_malloc(soap, strlen(aid) - 1);
+	  if (s)
+	  { *s = '<';
+	    strcpy(s + 1, aid + 4);
+	    strcat(s, ">");
+	    content->id = s;
+          }
+        }
+        else
+          content->id = aid + 4;
+      }
+      else
+        content->id = aid;
+      content->type = atype;
+      content->options = aoptions;
+      content->encoding = SOAP_MIME_BINARY;
+      pp->mark1 = 3;
+    }
+  }
+  else
+    pp->mark2 = 3;
+  return -1;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_iht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+    soap->iht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_iht(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip, *p;
+  register struct soap_flist *fp, *fq;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = p)
+    { for (fp = ip->flist; fp; fp = fq)
+      { fq = fp->next;
+        SOAP_FREE(soap, fp);
+      }
+      p = ip->next;
+      SOAP_FREE(soap, ip);
+    }
+    soap->iht[i] = NULL;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_lookup(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  for (ip = soap->iht[soap_hash(id)]; ip; ip = ip->next)
+    if (!strcmp(ip->id, id))
+      return ip;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_enter(struct soap *soap, const char *id)
+{ register size_t h;
+  register struct soap_ilist *ip;
+  ip = (struct soap_ilist*)SOAP_MALLOC(soap, sizeof(struct soap_ilist) + strlen(id));
+  if (ip)
+  { h = soap_hash(id);
+    strcpy(ip->id, id);
+    ip->next = soap->iht[h];
+    soap->iht[h] = ip;
+    return ip;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_malloc(struct soap *soap, size_t n)
+{ register char *p;
+  if (!n)
+    return (void*)SOAP_NON_NULL;
+  if (!soap)
+    return SOAP_MALLOC(soap, n);
+  n += (-(long)n) & (sizeof(void*)-1); /* align at 4-, 8- or 16-byte boundary */
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(void*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  /* keep chain of alloced cells for later destruction */
+  soap->alloced = 1;
+  *(void**)(p + n) = soap->alist;
+  *(size_t*)(p + n + sizeof(void*)) = n;
+  soap->alist = p + n;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_mht(struct soap *soap)
+{ register int i;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->mht[i] = NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_free_mht(struct soap *soap)
+{ register int i;
+  register struct soap_mlist *mp, *mq;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+  { for (mp = soap->mht[i]; mp; mp = mq)
+    { mq = mp->next;
+      if (mp->live)
+        fprintf(stderr, "%s(%d): malloc() = %p not freed (memory leak or forgot to call soap_end()?)\n", mp->file, mp->line, mp->ptr);
+      free(mp);
+    }
+    soap->mht[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_track_malloc(struct soap *soap, const char *file, int line, size_t size)
+{ register void *p = malloc(size);
+  if (soap)
+  { register int h = soap_hash_ptr(p);
+    register struct soap_mlist *mp = (struct soap_mlist*)malloc(sizeof(struct soap_mlist));
+    if (soap->fdebug[SOAP_INDEX_TEST])
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): malloc(%lu) = %p\n", file, line, (unsigned long)size, p));
+    mp->next = soap->mht[h];
+    mp->ptr = p;
+    mp->file = file;
+    mp->line = line;
+    mp->live = 1;
+    soap->mht[h] = mp;
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_track_free(struct soap *soap, const char *file, int line, void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+  { if (mp->live)
+    { free(p);
+      if (soap->fdebug[SOAP_INDEX_TEST])
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): free(%p)\n", file, line, p));
+      mp->live = 0;
+    }
+    else
+      fprintf(stderr, "%s(%d): free(%p) double free of pointer malloced at %s(%d)\n", file, line, p, mp->file, mp->line);
+  }
+  else
+    fprintf(stderr, "%s(%d): free(%p) pointer not malloced\n", file, line, p);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_track_unlink(struct soap *soap, const void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+    mp->live = 0;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_dealloc(struct soap *soap, void *p)
+{ if (!soap)
+    return;
+  if (p)
+  { register char **q;
+    for (q = (char**)&soap->alist; *q; q = *(char***)q)
+    { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+      { *q = **(char***)q;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Freed data at %p\n", p));
+        SOAP_FREE(soap, p);
+        return;
+      }
+    }
+    soap_delete(soap, p);
+  }
+  else
+  { register char *q;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free all soap_malloc() data\n"));
+    while (soap->alist)
+    { q = (char*)soap->alist;
+      soap->alist = *(void**)q;
+      q -= *(size_t*)(q + sizeof(void*));
+      SOAP_FREE(soap, q);
+    }
+  }
+  /* we must assume these were deallocated: */
+  soap->action = NULL;
+  soap->fault = NULL;
+  soap->header = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->authrealm = NULL;
+#ifndef WITH_LEANER
+  soap_clr_mime(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_delete(struct soap *soap, void *p)
+{ register struct soap_clist **cp;
+  if (soap_check_state(soap))
+    return;
+  cp = &soap->clist;
+  if (p)
+  { while (*cp)
+    { if (p == (*cp)->ptr)
+      { register struct soap_clist *q = *cp;
+        *cp = q->next;
+        q->fdelete(q);
+        SOAP_FREE(soap, q);
+        return;
+      }
+      cp = &(*cp)->next;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: address not in list\n", p));
+  }
+  else
+  { while (*cp)
+    { register struct soap_clist *q = *cp;
+      *cp = q->next;
+      if (q->ptr == (void*)soap->fault)
+        soap->fault = NULL; /* this was deallocated */
+      else if (q->ptr == (void*)soap->header)
+        soap->header = NULL; /* this was deallocated */
+      q->fdelete(q);
+      SOAP_FREE(soap, q);
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_clist *
+SOAP_FMAC2
+soap_link(struct soap *soap, void *p, int t, int n, void (*fdelete)(struct soap_clist*))
+{ register struct soap_clist *cp;
+  if ((cp = (struct soap_clist*)SOAP_MALLOC(soap, sizeof(struct soap_clist))))
+  { cp->next = soap->clist;
+    cp->type = t;
+    cp->size = n; 
+    cp->ptr = p;
+    cp->fdelete = fdelete;
+    soap->clist = cp;
+  }
+  return cp;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_unlink(struct soap *soap, const void *p)
+{ register char **q;
+  register struct soap_clist **cp;
+  if (!soap || !p)
+    return;
+  for (q = (char**)&soap->alist; *q; q = *(char***)q)
+  { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+    { *q = **(char***)q;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked data %p\n", p));
+#ifdef SOAP_DEBUG
+      soap_track_unlink(soap, p);
+#endif
+      return;
+    }
+  }
+  for (cp = &soap->clist; *cp; cp = &(*cp)->next)
+  { if (p == (*cp)->ptr)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked class instance %p\n", p));
+      q = (char**)*cp;
+      *cp = (*cp)->next;
+      SOAP_FREE(soap, q);
+      return;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_lookup_type(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  if (id && *id)
+  { ip = soap_lookup(soap, id);
+    if (ip)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup id='%s' type=%d\n", id, ip->type));
+      return ip->type;
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "lookup type id='%s' NOT FOUND! Need to get it from xsi:type\n", id));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, unsigned int k)
+{ struct soap_ilist *ip;
+  void **q;
+  if (!p || !id || !*id)
+    return p;
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding first href='%s' type=%d %p (%u bytes)\n", id, t, p, (unsigned int)n));
+    ip->type = t;
+    ip->size = n; 
+    ip->link = p;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->ptr = NULL;
+    ip->level = k;
+    *p = NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolved href='%s' type=%d location=%p (%u bytes)\n", id, t, ip->ptr, (unsigned int)n));
+    if (ip->type != t)
+    { strcpy(soap->id, id);
+      soap->error = SOAP_HREF;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility: id type=%d href type=%d\n", ip->type, t));
+      return NULL;
+    }
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      if (!q)
+        return NULL;
+      *p = (void*)q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    *p = ip->ptr;
+  }
+  else if (ip->level > k)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving level %u pointers to href='%s'\n", ip->level, id));
+    while (ip->level > k)
+    { void *s, **r = &ip->link;
+      q = (void**)ip->link;
+      while (q)
+      { *r = (void*)soap_malloc(soap, sizeof(void*));
+        s = *q;
+        *q = *r;
+        r = (void**)*r;
+        q = (void**)s;
+      }
+      *r = NULL;
+      ip->size = n; 
+      ip->copy = NULL;
+      ip->level = ip->level - 1;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarded href='%s' type=%d location=%p (%u bytes)\n", id, t, p, (unsigned int)n));
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      *p = q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_forward(struct soap *soap, const char *href, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t))
+{ struct soap_ilist *ip;
+  if (!p || !href || !*href)
+    return p;
+  ip = soap_lookup(soap, href); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, href); /* new hash table entry for string id */
+    ip->type = st;
+    ip->size = n;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->ptr = NULL;
+    ip->level = 0;
+    ip->flist = NULL;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry href='%s' type=%d size=%lu level=%d location=%p\n", href, st, (unsigned long)n, k, p));
+  }
+  else if (ip->type != st || (ip->level == k && ip->size != n))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", href, ip->type, (unsigned long)ip->size, k, st, (unsigned long)n));
+    strcpy(soap->id, href);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  if (fcopy || n < sizeof(void*) || *href != '#')
+  { register struct soap_flist *fp = (struct soap_flist*)SOAP_MALLOC(soap, sizeof(struct soap_flist));
+    if (!fp)
+    { soap->error = SOAP_EOM;
+      return NULL;
+    }
+    fp->next = ip->flist;
+    fp->type = tt;
+    fp->ptr = p;
+    fp->level = k;
+    fp->len = len;
+    if (fcopy)
+      fp->fcopy = fcopy;
+    else
+      fp->fcopy = soap_fcopy;
+    ip->flist = fp;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding type=%d (target type=%d) size=%lu location=%p level=%u len=%lu href='%s'\n", st, tt, (unsigned long)n, p, k, (unsigned long)len, href));
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding copying address %p for type=%d href='%s'\n", p, st, href));
+    *(void**)p = ip->copy;
+    ip->copy = p;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*))
+{
+#ifndef WITH_NOIDREF
+  struct soap_ilist *ip;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Enter id='%s' type=%d loc=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  soap->alloced = 0;
+  if (!p)
+  { if (finstantiate)
+      p = finstantiate(soap, t, type, arrayType, &n);
+    else
+      p = soap_malloc(soap, n);
+    if (p)
+      soap->alloced = 1;
+  }
+#ifndef WITH_NOIDREF
+  if (!id || !*id)
+#endif
+    return p;
+#ifndef WITH_NOIDREF
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Lookup entry id='%s for location=%p'\n", id, p));
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    ip->type = t;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry id='%s' type=%d size=%lu level=%u location=%p\n", id, t, (unsigned long)n, k, p));
+  }
+  else if ((ip->type != t || (ip->level == k && ip->size != n)) && (ip->copy || ip->flist))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", id, ip->type, (unsigned long)ip->size, k, t, (unsigned long)n));
+    strcpy(soap->id, id);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Multiply defined id='%s'\n", id));
+    strcpy(soap->id, id);
+    soap->error = SOAP_DUPLICATE_ID;
+    return NULL;
+  }
+  else 
+  { ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update entry id='%s' type=%d location=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  }
+  return ip->ptr;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{ DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Copying data type=%d (target type=%d) %p -> %p (%lu bytes)\n", st, tt, q, p, (unsigned long)n));
+  memcpy(p, q, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_send(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->dime.list)
+  { /* SOAP body referenced attachments must appear first */
+    soap->dime.last->next = soap->dime.first;
+    soap->dime.first = soap->dime.list->next;
+    soap->dime.list->next = NULL;
+    soap->dime.last = soap->dime.list;
+  }
+  if (soap_putdime(soap) || soap_putmime(soap))
+    return soap->error;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End send\n"));
+  if (soap->mode & SOAP_IO) /* need to flush the remaining data in buffer */
+  { if (soap_flush(soap))
+#ifdef WITH_ZLIB
+    { if (soap->mode & SOAP_ENC_ZLIB && soap->zlib_state == SOAP_ZLIB_DEFLATE)
+      { soap->zlib_state = SOAP_ZLIB_NONE;
+        deflateEnd(&soap->d_stream);
+      }
+      return soap->error;
+    }
+#else
+      return soap->error;
+#endif
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { int r;
+      soap->d_stream.avail_in = 0;
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating remainder\n"));
+        r = deflate(&soap->d_stream, Z_FINISH);
+        if (soap->d_stream.avail_out != SOAP_BUFLEN)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN - soap->d_stream.avail_out))
+          { soap->zlib_state = SOAP_ZLIB_NONE;
+            deflateEnd(&soap->d_stream);
+            return soap->error;
+	  }
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (r == Z_OK);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+      soap->z_ratio_out = (float)soap->d_stream.total_out / (float)soap->d_stream.total_in;
+      soap->mode &= ~SOAP_ENC_ZLIB;
+      soap->zlib_state = SOAP_ZLIB_NONE;
+      if (deflateEnd(&soap->d_stream) != Z_OK || r != Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to end deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+#ifdef WITH_GZIP
+      soap->z_buf[0] = soap->z_crc & 0xFF;
+      soap->z_buf[1] = (soap->z_crc >> 8) & 0xFF;
+      soap->z_buf[2] = (soap->z_crc >> 16) & 0xFF;
+      soap->z_buf[3] = (soap->z_crc >> 24) & 0xFF;
+      soap->z_buf[4] = soap->d_stream.total_in & 0xFF;
+      soap->z_buf[5] = (soap->d_stream.total_in >> 8) & 0xFF;
+      soap->z_buf[6] = (soap->d_stream.total_in >> 16) & 0xFF;
+      soap->z_buf[7] = (soap->d_stream.total_in >> 24) & 0xFF;
+      if (soap_flush_raw(soap, soap->z_buf, 8))
+        return soap->error;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip crc32=%lu\n", (unsigned long)soap->z_crc));
+#endif
+    }
+#endif
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    { char *p;
+#ifndef WITH_NOHTTP
+      if (!(soap->mode & SOAP_ENC_XML))
+      { soap->mode--;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending buffered message of length %u\n", (unsigned int)soap->blist->size));
+        if (soap->status >= SOAP_POST)
+          soap->error = soap->fpost(soap, soap->endpoint, soap->host, soap->port, soap->path, soap->action, soap->blist->size);
+        else if (soap->status != SOAP_STOP)
+          soap->error = soap->fresponse(soap, soap->status, soap->blist->size);
+        if (soap->error || soap_flush(soap))
+          return soap->error;
+        soap->mode++;
+      }
+#endif
+      for (p = soap_first_block(soap); p; p = soap_next_block(soap))
+      { DBGMSG(SENT, p, soap_block_size(soap));
+        if ((soap->error = soap->fsend(soap, p, soap_block_size(soap))))
+        { soap_end_block(soap);
+          return soap->error;
+        }
+      }
+      soap_end_block(soap);
+    }
+#ifndef WITH_LEANER
+    else if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { DBGMSG(SENT, "\r\n0\r\n\r\n", 7);
+      if ((soap->error = soap->fsend(soap, "\r\n0\r\n\r\n", 7)))
+        return soap->error;
+    }
+#endif
+  }
+#ifdef WITH_TCPFIN
+#ifdef WITH_OPENSSL
+  if (!soap->ssl && soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#else
+  if (soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#endif
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of send phase\n"));
+  soap->omode &= ~SOAP_XML_SEC;
+  soap->count = 0;
+  soap->part = SOAP_END;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_recv(struct soap *soap)
+{ soap->part = SOAP_END;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) && soap_getdime(soap))
+    return soap->error;
+  soap->dime.list = soap->dime.first;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  if ((soap->mode & SOAP_ENC_MIME) && soap_getmime(soap))
+    return soap->error;
+  soap->mime.list = soap->mime.first;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "End of receive message ok\n"));
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { soap->mode &= ~SOAP_ENC_ZLIB;
+    memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+    soap->bufidx = (char*)soap->d_stream.next_in - soap->z_buf;
+    soap->buflen = soap->z_buflen;
+    soap->zlib_state = SOAP_ZLIB_NONE;
+    if (inflateEnd(&soap->d_stream) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+#ifdef WITH_GZIP
+    if (soap->zlib_in == SOAP_ZLIB_GZIP)
+    { soap_wchar c;
+      short i;
+      for (i = 0; i < 8; i++)
+      { if ((int)(c = soap_getchar(soap)) == EOF)
+          return soap->error = SOAP_EOF;
+        soap->z_buf[i] = (char)c;
+      }
+      if (soap->z_crc != ((uLong)(unsigned char)soap->z_buf[0] | ((uLong)(unsigned char)soap->z_buf[1] << 8) | ((uLong)(unsigned char)soap->z_buf[2] << 16) | ((uLong)(unsigned char)soap->z_buf[3] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: crc check failed, message corrupted? (crc32=%lu)\n", (unsigned long)soap->z_crc));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+      if (soap->d_stream.total_out != ((uLong)(unsigned char)soap->z_buf[4] | ((uLong)(unsigned char)soap->z_buf[5] << 8) | ((uLong)(unsigned char)soap->z_buf[6] << 16) | ((uLong)(unsigned char)soap->z_buf[7] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: incorrect message length\n"));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+    }
+#endif
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    while ((int)soap_getchar(soap) != EOF) /* advance to last chunk */
+      ;
+  if (soap->fdisconnect && (soap->error = soap->fdisconnect(soap)))
+    return soap->error;
+#ifndef WITH_NOIDREF
+  return soap_resolve(soap);
+#else
+#ifndef WITH_LEANER
+  if (soap->xlist)
+  { if (soap->mode & SOAP_ENC_MTOM)
+      return soap->error = SOAP_MIME_HREF;
+    return soap->error = SOAP_DIME_HREF;
+  }
+#endif
+  return SOAP_OK;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free(struct soap *soap)
+{ register struct Namespace *ns;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free namespace stack\n"));
+  while (soap->nlist)
+  { register struct soap_nlist *np = soap->nlist->next;
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free any remaining temp blocks\n"));
+  while (soap->blist)
+    soap_end_block(soap);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute storage\n"));
+  while (soap->attributes)
+  { register struct soap_attribute *tp = soap->attributes->next;
+    if (soap->attributes->value)
+      SOAP_FREE(soap, soap->attributes->value);
+    SOAP_FREE(soap, soap->attributes);
+    soap->attributes = tp;
+  }
+#ifdef WITH_FAST
+  if (soap->labbuf)
+    SOAP_FREE(soap, soap->labbuf);
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  ns = soap->local_namespaces;
+  if (ns)
+  { for (; ns->id; ns++)
+    { if (ns->out)
+      { if (soap->encodingStyle == ns->out)
+          soap->encodingStyle = SOAP_STR_EOS;
+        SOAP_FREE(soap, ns->out);
+        ns->out = NULL;
+      }
+      if (soap->encodingStyle == ns->ns)
+        soap->encodingStyle = SOAP_STR_EOS;
+    }
+    SOAP_FREE(soap, soap->local_namespaces);
+    soap->local_namespaces = NULL;
+  }
+#ifndef WITH_LEANER
+  while (soap->xlist)
+  { struct soap_xlist *xp = soap->xlist->next;
+    SOAP_FREE(soap, soap->xlist);
+    soap->xlist = xp;
+  }
+#endif
+#ifndef WITH_NOIDREF
+  soap_free_pht(soap);
+  soap_free_iht(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_logs(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { soap->logfile[i] = NULL;
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEAN) || defined(SOAP_DEBUG)
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_open_logfile(struct soap *soap, int i)
+{ if (soap->logfile[i])
+    soap->fdebug[i] = fopen(soap->logfile[i], i < 2 ? "ab" : "a");
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_close_logfile(struct soap *soap, int i)
+{ if (soap->fdebug[i])
+  { fclose(soap->fdebug[i]);
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_close_logfiles(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+    soap_close_logfile(soap, i);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_set_logfile(struct soap *soap, int i, const char *logfile)
+{ char *s = NULL;
+  soap_close_logfile(soap, i);
+  if (soap->logfile[i])
+    SOAP_FREE(soap, (void*)soap->logfile[i]);
+  if (logfile)
+    if ((s = (char*)SOAP_MALLOC(soap, strlen(logfile) + 1)))
+      strcpy(s, logfile);
+  soap->logfile[i] = s;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_recv_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_RECV, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_sent_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_SENT, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_test_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_TEST, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy(struct soap *soap)
+{ return soap_copy_context((struct soap*)malloc(sizeof(struct soap)), soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy_context(struct soap *copy, struct soap *soap)
+{ if (soap_check_state(soap))
+    return NULL;
+  if (copy)
+  { register struct soap_plugin *p;
+    memcpy(copy, soap, sizeof(struct soap));
+    copy->state = SOAP_COPY;
+    copy->user = NULL;
+    copy->error = SOAP_OK;
+    copy->userid = NULL;
+    copy->passwd = NULL;
+    copy->nlist = NULL;
+    copy->blist = NULL;
+    copy->clist = NULL;
+    copy->alist = NULL;
+    copy->attributes = NULL;
+#ifdef WITH_FAST
+    copy->labbuf = NULL;
+    copy->lablen = 0;
+    copy->labidx = 0;
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_mht(copy);
+#endif
+    copy->local_namespaces = NULL;
+#ifndef WITH_NOIDREF
+    soap_init_iht(copy);
+    soap_init_pht(copy);
+#endif
+    copy->header = NULL;
+    copy->fault = NULL;
+    copy->action = NULL;
+#ifndef WITH_LEAN
+#ifdef WITH_COOKIES
+    copy->cookies = soap_copy_cookies(copy);
+#else
+    copy->cookies = NULL;
+#endif
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_logs(copy);
+    soap_set_recv_logfile(copy, soap->logfile[SOAP_INDEX_RECV]);
+    soap_set_sent_logfile(copy, soap->logfile[SOAP_INDEX_SENT]);
+    soap_set_test_logfile(copy, soap->logfile[SOAP_INDEX_TEST]);
+#endif
+    copy->plugins = NULL;
+    for (p = soap->plugins; p; p = p->next)
+    { register struct soap_plugin *q = (struct soap_plugin*)SOAP_MALLOC(copy, sizeof(struct soap_plugin));
+      if (!q)
+        return NULL;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying plugin '%s'\n", p->id));
+      *q = *p;
+      if (p->fcopy && (soap->error = p->fcopy(copy, q, p)))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not copy plugin '%s'\n", p->id));
+        SOAP_FREE(copy, q);
+        return NULL;
+      }
+      q->next = copy->plugins;
+      copy->plugins = q;
+    }
+  }
+  else
+    soap->error = SOAP_EOM;
+  return copy;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init(struct soap *soap)
+{ soap->state = SOAP_INIT;
+  soap->version = 0;
+  soap_imode(soap, SOAP_IO_DEFAULT);
+  soap_omode(soap, SOAP_IO_DEFAULT);
+  soap->plugins = NULL;
+  soap->user = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+  soap->fconnect = NULL;
+  soap->fdisconnect = NULL;
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+  soap->fplugin = fplugin;
+#ifndef WITH_LEANER
+  soap->fdimereadopen = NULL;
+  soap->fdimewriteopen = NULL;
+  soap->fdimereadclose = NULL;
+  soap->fdimewriteclose = NULL;
+  soap->fdimeread = NULL;
+  soap->fdimewrite = NULL;
+#endif
+  soap->float_format = "%.8g"; /* .8 preserves single FP precision as much as possible, but might not be very efficient */
+  soap->double_format = "%.17lg"; /* .17 preserves double FP precision as much as possible, but might not be very efficient */
+  soap->dime_id_format = "cid:id%d"; /* default DIME id format */
+  soap->http_version = "1.1";
+  soap->actor = NULL;
+  soap->max_keep_alive = SOAP_MAXKEEPALIVE;
+  soap->keep_alive = 0;
+  soap->recv_timeout = 0;
+  soap->send_timeout = 0;
+  soap->connect_timeout = 0;
+  soap->accept_timeout = 0;
+  soap->socket_flags = 0;
+  soap->connect_flags = 0;
+  soap->bind_flags = 0;
+  soap->accept_flags = 0;
+  soap->ip = 0;
+#ifdef WITH_FAST
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  soap->encodingStyle = SOAP_STR_EOS;
+#ifndef WITH_NONAMESPACES
+  soap->namespaces = namespaces;
+#else
+  soap->namespaces = NULL;
+#endif
+  soap->local_namespaces = NULL;
+  soap->nlist = NULL;
+  soap->blist = NULL;
+  soap->clist = NULL;
+  soap->alist = NULL;
+  soap->attributes = NULL;
+  soap->header = NULL;
+  soap->fault = NULL;
+  soap->master = SOAP_INVALID_SOCKET;
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->os = NULL;
+  soap->is = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifndef UNDER_CE
+  soap->recvfd = 0;
+  soap->sendfd = 1;
+#else
+  soap->recvfd = stdin;
+  soap->sendfd = stdout;
+#endif 
+  soap->host[0] = '\0';
+  soap->port = 0;
+  soap->action = NULL;
+  soap->proxy_host = NULL;
+  soap->proxy_port = 8080;
+  soap->proxy_userid = NULL;
+  soap->proxy_passwd = NULL;
+  soap->authrealm = NULL;
+  soap->prolog = NULL;
+#ifdef WITH_OPENSSL
+  if (!ssl_init_done)
+    soap_ssl_init();
+  soap->fsslauth = ssl_auth_init;
+  soap->fsslverify = ssl_verify_callback;
+  soap->bio = NULL;
+  soap->ssl = NULL;
+  soap->ctx = NULL;
+  soap->require_server_auth = 0;
+  soap->require_client_auth = 0;
+  soap->rsa = 0;
+  soap->keyfile = NULL;
+  soap->password = NULL;
+  soap->dhfile = NULL;
+  soap->cafile = NULL;
+  soap->capath = NULL;
+  soap->crlfile = NULL;
+  soap->randfile = NULL;
+  soap->session = NULL;
+#endif
+#ifdef WITH_ZLIB
+  soap->zlib_state = SOAP_ZLIB_NONE;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.zalloc = NULL;
+  soap->d_stream.zfree = NULL;
+  soap->d_stream.opaque = NULL;
+  soap->z_level = 6;
+#endif
+#ifndef WITH_LEAN
+  soap->c14ninclude = NULL;
+  soap->c14nexclude = NULL;
+  soap->cookies = NULL;
+  soap->cookie_domain = NULL;
+  soap->cookie_path = NULL;
+  soap->cookie_max = 32;
+#endif
+#ifdef SOAP_DEBUG
+  soap_init_mht(soap);
+  soap_init_logs(soap);
+  soap_set_recv_logfile(soap, "RECV.log");
+  soap_set_sent_logfile(soap, "SENT.log");
+  soap_set_test_logfile(soap, NULL);
+#endif
+#ifdef WMW_RPM_IO
+  soap->rpmreqid = NULL;
+#endif
+#ifdef PALM
+  palmNetLibOpen();
+#endif
+#ifndef WITH_NOIDREF
+  soap_init_iht(soap);
+  soap_init_pht(soap);
+#endif
+  soap_begin(soap);
+#ifdef SOAP_DEBUG
+  soap_set_test_logfile(soap, "TEST.log");
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init1(struct soap *soap, soap_mode mode)
+{ soap_init2(soap, mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init2(struct soap *soap, soap_mode imode, soap_mode omode)
+{ soap_init(soap);
+  soap_imode(soap, imode);
+  soap_omode(soap, omode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_begin(struct soap *soap)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing\n"));
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+  soap->null = 0;
+  soap->position = 0;
+  soap->encoding = 0;
+  soap->mustUnderstand = 0;
+  soap->mode = 0;
+  soap->ns = 0;
+  soap->part = SOAP_END;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  soap->error = SOAP_OK;
+  soap->peeked = 0;
+  soap->ahead = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+  soap->endpoint[0] = '\0';
+#ifndef WITH_LEANER
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+#endif
+  soap_free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end(struct soap *soap)
+{ register struct soap_clist *cp;
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  soap_dealloc(soap, NULL);
+  while (soap->clist)
+  { cp = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = cp;
+  }
+  soap_closesock(soap);
+#ifdef SOAP_DEBUG
+  soap_close_logfiles(soap);
+#endif
+#ifdef PALM
+  palmNetLibClose();
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_namespaces(struct soap *soap, struct Namespace *p)
+{ register struct Namespace *ns = soap->local_namespaces;
+  register struct soap_nlist *np, *nq, *nr;
+  register unsigned int level = soap->level;
+  soap->namespaces = p;
+  soap->local_namespaces = NULL;
+  soap_set_local_namespaces(soap);
+  /* reverse the namespace list */
+  np = soap->nlist;
+  soap->nlist = NULL;
+  if (np)
+  { nq = np->next;
+    np->next = NULL;
+    while (nq)
+    { nr = nq->next;
+      nq->next = np;
+      np = nq;
+      nq = nr;
+    }
+  }
+  /* then push on new stack */
+  while (np)
+  { register const char *s;
+    soap->level = np->level; /* preserve element nesting level */
+    s = np->ns;
+    if (!s && np->index >= 0 && ns)
+    { s = ns[np->index].out;
+      if (!s)
+        s = ns[np->index].ns;
+    }
+    if (s && soap_push_namespace(soap, np->id, s))
+      return soap->error;
+    nq = np;
+    np = np->next;
+    SOAP_FREE(soap, nq);
+  }
+  if (ns)
+  { register int i;
+    for (i = 0; ns[i].id; i++)
+    { if (ns[i].out)
+      { SOAP_FREE(soap, ns[i].out);
+        ns[i].out = NULL;
+      }
+    }
+    SOAP_FREE(soap, ns);
+  }
+  soap->level = level; /* restore level */
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_local_namespaces(struct soap *soap)
+{ if (soap->namespaces && !soap->local_namespaces)
+  { register const struct Namespace *ns1;
+    register struct Namespace *ns2;
+    register size_t n = 1;
+    for (ns1 = soap->namespaces; ns1->id; ns1++)
+      n++;
+    n *= sizeof(struct Namespace);
+    ns2 = (struct Namespace*)SOAP_MALLOC(soap, n);
+    if (ns2)
+    { memcpy(ns2, soap->namespaces, n);
+      if (ns2[0].ns)
+      { if (!strcmp(ns2[0].ns, soap_env1))
+          soap->version = 1;
+        else
+          soap->version = 2;
+      }
+      soap->local_namespaces = ns2;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+#ifndef PALM_1
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_strsearch(const char *big, const char *little)
+{ size_t n = strlen(little);
+  const char *s = big;
+  while (s) 
+  { if (!strncmp(s, little, n) && (s[n] == '\0' || s[n] == ' '))
+      return s;
+    s = strchr(s, ' ');
+    if (s)
+      s++;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_lookup_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np;
+  for (np = soap->nlist; np; np = np->next)
+  { if (!strncmp(np->id, tag, n) && !np->id[n])
+      return np;
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized)
+{ register struct soap_nlist *np;
+  size_t n, k;
+  if (soap_strsearch(soap->c14nexclude, id))
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns?ns:""));
+  if (!utilized)
+  { for (np = soap->nlist; np; np = np->next)
+    { if (!strcmp(np->id, id) && (!np->ns || !strcmp(np->ns, ns)))
+        break;
+    }
+    if (np)
+    { if (np->index == 1)
+        utilized = np->index;
+      else
+        return NULL;
+    }
+  }
+  n = strlen(id);
+  if (ns)
+    k = strlen(ns);
+  else
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k + 1);
+  if (!np)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  np->next = soap->nlist;
+  soap->nlist = np;
+  strcpy(np->id, id);
+  if (ns)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+  }
+  else
+    np->ns = NULL;
+  np->level = soap->level;
+  np->index = utilized;
+  return np;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_utilize_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np = soap_lookup_ns(soap, tag, n);
+  if (np)
+  { if (np->index == 0)
+      soap_push_ns(soap, np->id, np->ns, 1);
+  }
+  else
+  { strncpy(soap->tmpbuf, tag, n);
+    soap->tmpbuf[n] = '\0';
+    soap_push_ns(soap, soap->tmpbuf, NULL, 1);
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_pop_ns(struct soap *soap)
+{ soap_pop_namespace(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element(struct soap *soap, const char *tag, int id, const char *type)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element begin tag='%s' id='%d' type='%s'\n", tag, id, type?type:""));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->soap = soap;
+    elt->next = NULL;
+    elt->prnt = soap->dom;
+    elt->name = soap_strdup(soap, tag);
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->nstr = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->node = NULL;
+    elt->type = 0;
+    elt->head = NULL;
+    elt->tail = NULL;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+  }
+  else
+  {
+#endif
+    soap->level++;
+#ifndef WITH_LEAN
+    if (!soap->ns)
+    { if (!(soap->mode & SOAP_XML_CANONICAL)
+       && soap_send(soap, soap->prolog ? soap->prolog : "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"))
+        return soap->error;
+    }
+    else if (soap->mode & SOAP_XML_INDENT)
+    { if (soap->ns == 1 && soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+      soap->body = 1;
+    }
+#endif
+    if (soap_send_raw(soap, "<", 1)
+     || soap_send(soap, tag))
+      return soap->error;
+#ifdef WITH_DOM
+  }
+#endif
+  if (!soap->ns)
+  { struct Namespace *ns;
+    for (ns = soap->local_namespaces; ns && ns->id; ns++)
+    { if (*ns->id && (ns->out || ns->ns))
+      { sprintf(soap->tmpbuf, "xmlns:%s", ns->id);
+        if (soap_attribute(soap, soap->tmpbuf, ns->out ? ns->out : ns->ns))
+          return soap->error;
+      }
+    }   
+  }
+  soap->ns = 1; /* start with 0 or 2, but should be one to continue */
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { const char *s = strchr(tag, ':');
+    if (s)
+      soap_utilize_ns(soap, tag, s - tag);
+  }
+#endif
+  if (id > 0)
+  { sprintf(soap->tmpbuf, "_%d", id);
+    if (soap_attribute(soap, "id", soap->tmpbuf))
+      return soap->error;
+  }
+  if (type && *type)
+  { if (soap_attribute(soap, "xsi:type", type))
+      return soap->error;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { const char *s = strchr(type, ':');
+      if (s)
+        soap_utilize_ns(soap, type, s - type);
+    }
+#endif
+  }
+  if (soap->null && soap->position > 0)
+  { int i;
+    sprintf(soap->tmpbuf, "[%d", soap->positions[0]);
+    for (i = 1; i < soap->position; i++)
+      sprintf(soap->tmpbuf + strlen(soap->tmpbuf), ",%d", soap->positions[i]);
+    strcat(soap->tmpbuf, "]");
+    if (soap_attribute(soap, "SOAP-ENC:position", soap->tmpbuf))
+      return soap->error;
+  }
+  if (soap->mustUnderstand)
+  { if (soap->actor && *soap->actor)
+    { if (soap_attribute(soap, soap->version == 2 ? "SOAP-ENV:role" : "SOAP-ENV:actor", soap->actor))
+        return soap->error;
+    }
+    if (soap_attribute(soap, "SOAP-ENV:mustUnderstand", soap->version == 2 ? "true" : "1"))
+      return soap->error;
+    soap->mustUnderstand = 0;
+  }
+  if (soap->encoding)
+  { if (soap->encodingStyle && soap->local_namespaces)
+    { if (!*soap->encodingStyle)
+      { if (soap->local_namespaces[1].out)
+          soap->encodingStyle = soap->local_namespaces[1].out;
+        else
+          soap->encodingStyle = soap->local_namespaces[1].ns;
+      }
+      if (soap_attribute(soap, "SOAP-ENV:encodingStyle", soap->encodingStyle))
+        return soap->error;
+    }
+    soap->encoding = 0;
+  }
+  soap->null = 0;
+  soap->position = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_out(struct soap *soap, const char *tag, int id, const char *type)
+{ if (*tag == '-')
+    return SOAP_OK;
+  if (soap_element(soap, tag, id, type))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRRCHR
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_strrchr(const char *s, int t)
+{ register char *r = NULL;
+  while (*s)
+    if (*s++ == t)
+      r = (char*)s - 1;
+  return r;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOL
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_strtol(const char *s, char **t, int b)
+{ register long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { short neg = 0;
+    if (*s == '-')
+    { s++;
+      neg = 1;
+    }
+    else if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 214748364 && (n > 214748364 || c >= '8'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+    if (neg)
+      n = -n;
+  }
+  else /* b == 16 and value is always positive */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x07FFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOUL
+SOAP_FMAC1
+unsigned long
+SOAP_FMAC2
+soap_strtoul(const char *s, char **t, int b)
+{ unsigned long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 429496729 && (n > 429496729 || c >= '6'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+  }
+  else /* b == 16 */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x0FFFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_begin_out(struct soap *soap, const char *tag, int id, const char *type, const char *offset)
+{ if (soap_element(soap, tag, id, "SOAP-ENC:Array"))
+    return soap->error;
+  if (soap->version == 2)
+  { const char *s;
+    s = soap_strrchr(type, '[');
+    if ((size_t)(s - type) < sizeof(soap->tmpbuf))
+    { strncpy(soap->tmpbuf, type, s - type);
+      soap->tmpbuf[s - type] = '\0';
+      if (type && *type && (soap_attribute(soap, "SOAP-ENC:itemType", soap->tmpbuf)))
+        return soap->error;
+      if (s && (soap_attribute(soap, "SOAP-ENC:arraySize", s + 1)))
+        return soap->error;
+    }
+  }
+  else
+  { if (offset && (soap_attribute(soap, "SOAP-ENC:offset", offset)))
+      return soap->error;
+    if (type && *type && (soap_attribute(soap, "SOAP-ENC:arrayType", type)))
+      return soap->error;
+  }
+#ifndef WITH_LEAN
+  if (type && *type && (soap->mode & SOAP_XML_CANONICAL))
+  { const char *s = strchr(type, ':');
+    if (s)
+      soap_utilize_ns(soap, type, s - type);
+  }
+#endif
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_start_end_out(struct soap *soap, const char *tag)
+{ register struct soap_attribute *tp;
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att;
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { att = &soap->dom->atts;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible)
+      { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+	if (!*att)
+	  return soap->error = SOAP_EOM;
+	(*att)->next = NULL;
+        (*att)->nstr = NULL;
+        (*att)->name = soap_strdup(soap, tp->name);
+        (*att)->data = soap_strdup(soap, tp->value);
+        (*att)->wide = NULL;
+        (*att)->soap = soap;
+        tp->visible = 0;
+      }
+    }
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { struct soap_nlist *np;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible && tp->name)
+      { const char *s = strchr(tp->name, ':');
+        if (s)
+          soap_utilize_ns(soap, tp->name, s - tp->name);
+      }
+    }
+    for (np = soap->nlist; np; np = np->next)
+    { if (np->index == 1 && np->ns)
+      { sprintf(soap->tmpbuf, "xmlns:%s", np->id);
+        soap_set_attr(soap, soap->tmpbuf, np->ns);
+        np->index = 2;
+      }
+    }
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible)
+    { if (soap_send(soap, " ") || soap_send(soap, tp->name))
+        return soap->error;
+      if (tp->visible == 2 && tp->value)
+        if (soap_send_raw(soap, "=\"", 2)
+	 || soap_string_out(soap, tp->value, 1)
+	 || soap_send_raw(soap, "\"", 1))
+          return soap->error;
+      tp->visible = 0;
+    }
+  }
+  if (tag)
+  { 
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { if (soap_send_raw(soap, ">", 1)
+       || soap_element_end_out(soap, tag))
+        return soap->error;
+    }
+    else
+#endif
+    soap->level--;	/* decrement level just before /> */
+    if (soap_send_raw(soap, "/>", 2))
+      return soap->error;
+    return SOAP_OK;
+  }
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_out(struct soap *soap, const char *tag)
+{ if (*tag == '-')
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element ending tag='%s'\n", tag));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+    soap_pop_ns(soap);
+  if (soap->mode & SOAP_XML_INDENT)
+  { if (!soap->body)
+    { if (soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+    }
+    soap->body = 0;
+  }
+#endif
+  if (soap_send_raw(soap, "</", 2)
+   || soap_send(soap, tag))
+    return soap->error;
+  soap->level--;	/* decrement level just before > */
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_ref(struct soap *soap, const char *tag, int id, int href)
+{ register int n = 0;
+  if (soap->version == 2)
+    n = 1;
+  sprintf(soap->href, "#_%d", href);
+  return soap_element_href(soap, tag, id, "href" + n, soap->href + n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_href(struct soap *soap, const char *tag, int id, const char *ref, const char *val)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element '%s' reference %s='%s'\n", tag, ref, val));
+  if (soap_element(soap, tag, id, NULL)
+   || soap_attribute(soap, ref, val)
+   || soap_element_start_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_null(struct soap *soap, const char *tag, int id, const char *type)
+{ struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (tp->visible)
+      break;
+  if (tp || (soap->version == 2 && soap->position > 0) || id > 0 || (soap->mode & SOAP_XML_NIL))
+  { if (soap_element(soap, tag, id, type))
+      return soap->error;
+    if (soap->part != SOAP_IN_HEADER && soap->encodingStyle)
+      if (soap_attribute(soap, "xsi:nil", "true"))
+        return soap->error;
+    return soap_element_start_end_out(soap, tag);
+  }
+  soap->null = 1;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_id(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, int n, const char *type, int t) 
+{ if (!p || (a && !a->__ptr))
+  { soap_element_null(soap, tag, id, type);
+    return -1;
+  }
+#ifndef WITH_NOIDREF
+  if (soap->mode & SOAP_XML_TREE)
+    return 0;
+  if (id < 0)
+  { struct soap_plist *pp;
+    if (a)
+      id = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+    else
+      id = soap_pointer_lookup(soap, p, t, &pp);
+    if (id)
+    { if (soap_is_embedded(soap, pp))
+      { soap_element_ref(soap, tag, 0, id);
+        return -1;
+      }
+      if (soap_is_single(soap, pp))
+        return 0;
+      soap_set_embedded(soap, pp);
+    }
+  }
+  return id;
+#else
+  return 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_result(struct soap *soap, const char *tag)
+{ if (soap->version == 2 && soap->encodingStyle)
+    if (soap_element(soap, "SOAP-RPC:result", 0, NULL)
+     || soap_attribute(soap, "xmlns:SOAP-RPC", soap_rpc)
+     || soap_element_start_end_out(soap, NULL)
+     || soap_string_out(soap, tag, 0)
+     || soap_element_end_out(soap, "SOAP-RPC:result"))
+      return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attribute(struct soap *soap, const char *name, const char *value)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+    a->next = soap->dom->atts;
+    a->nstr = NULL;
+    a->name = soap_strdup(soap, name);
+    a->data = soap_strdup(soap, value);
+    a->wide = NULL;
+    a->soap = soap;
+    soap->dom->atts = a;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { /* TODO: consider using this code to handle default namespace
+    if (!strncmp(name, "xmlns", 5) && (name[5] == ':' || name[5] == '\0'))
+    { if (name[5] == ':')
+        soap_push_ns(soap, name + 6, value, 0);
+      else
+        soap_push_ns(soap, "", value, 0);
+    }
+    */
+    if (!strncmp(name, "xmlns:", 6))
+      soap_push_ns(soap, name + 6, value, 0);
+    else if (soap_set_attr(soap, name, value))
+      return soap->error;
+  }
+  else
+#endif
+  { if (soap_send(soap, " ") || soap_send(soap, name))
+      return soap->error;
+    if (value)
+      if (soap_send_raw(soap, "=\"", 2)
+       || soap_string_out(soap, value, 1)
+       || soap_send_raw(soap, "\"", 1))
+        return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_in(struct soap *soap, const char *tag, int nillable)
+{ if (!soap_peek_element(soap))
+  { if (soap->other)
+      return soap->error = SOAP_TAG_MISMATCH;
+    if (tag && *tag == '-')
+      return SOAP_OK;
+    if (!(soap->error = soap_match_tag(soap, soap->tag, tag)))
+    { soap->peeked = 0;
+      if (soap->body)
+        soap->level++;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"" ));
+      if (!nillable && soap->null && (soap->mode & SOAP_XML_STRICT))
+        return soap->error = SOAP_NULL;
+    }
+  }
+  else if (soap->error == SOAP_NO_TAG && tag && *tag == '-')
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_in(struct soap *soap, const char *tag)  
+{ register soap_wchar c;
+  register char *s;
+  register const char *t;
+  register int n = 0;
+  if (tag && *tag == '-')
+    return SOAP_OK;
+  soap->level--;
+  soap_pop_namespace(soap);
+#ifdef WITH_DOM
+  /* this whitespace or mixed content is not insignificant for DOM */
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!soap->peeked && !soap_string_in(soap, 3, -1, -1))
+      return soap->error;
+    if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  if (soap->peeked)
+  { if (soap->error == SOAP_NO_TAG)
+      soap->error = SOAP_OK;
+    if (*soap->tag)
+      n++;
+    soap->peeked = 0;
+  }
+  do
+  { while (((c = soap_get(soap)) != SOAP_TT))
+    { if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      if (c == SOAP_LT)
+        n++;
+      else if (c == '/')
+      { c = soap_get(soap);
+        if (c == SOAP_GT)
+	  n--;
+        else
+	  soap_unget(soap, c);
+      }
+    }
+  } while (n--);
+  s = soap->tag;
+  while (soap_notblank(c = soap_get(soap)))
+    *s++ = (char)c;
+  *s = '\0';
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  while (soap_blank(c))
+    c = soap_get(soap);
+  if (c != SOAP_GT)
+    return soap->error = SOAP_SYNTAX_ERROR;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:""));
+  if (!tag || !*tag)
+    return SOAP_OK;
+  if ((s = strchr(soap->tag, ':')))
+    s++;
+  else
+    s = soap->tag;
+  if ((t = strchr(tag, ':')))
+    t++;
+  else
+    t = tag;
+  if (!SOAP_STRCMP(s, t))
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element tag name does not match\n"));
+  return soap->error = SOAP_SYNTAX_ERROR;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_attr_value(struct soap *soap, const char *name, int flag)
+{ register struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (!soap_match_tag(soap, tp->name, name))
+      break;
+  if (tp && tp->visible == 2)
+  { if (flag == 2 && (soap->mode & SOAP_XML_STRICT))
+      soap->error = SOAP_PROHIBITED;
+    else
+      return tp->value;
+  }
+  else if (flag == 1 && (soap->mode & SOAP_XML_STRICT))
+    soap->error = SOAP_REQUIRED;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_attr(struct soap *soap, const char *name, const char *value)
+{ register struct soap_attribute *tp;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set attribute %s='%s'\n", name, value?value:""));
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (!strcmp(tp->name, name))
+      break;
+  }
+  if (!tp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute %s\n", name));
+    if (!(tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(name))))
+      return soap->error = SOAP_EOM;
+    tp->ns = NULL;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { struct soap_attribute **tpp = &soap->attributes;
+      const char *s = strchr(name, ':');
+      if (!strncmp(name, "xmlns", 5))
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) || strcmp((*tpp)->name + 5, name + 5) > 0)
+            break;
+      }
+      else if (!s)
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) && ((*tpp)->ns || strcmp((*tpp)->name, name) > 0))
+            break;
+      }
+      else
+      { int k;
+        for (; *tpp; tpp = &(*tpp)->next)
+	{ if (!strncmp((*tpp)->name, "xmlns:", 6) && !strncmp((*tpp)->name + 6, name, s - name) && !(*tpp)->name[6 + s - name])
+	  { if (!tp->ns)
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Canonicalization: prefix %s=%p(%s)\n", name, (*tpp)->ns, (*tpp)->ns));
+	      tp->ns = (*tpp)->ns;
+	    }
+	  }
+          else if (strncmp((*tpp)->name, "xmlns", 5) && (*tpp)->ns && tp->ns && ((k = strcmp((*tpp)->ns, tp->ns)) > 0 || (!k && strcmp((*tpp)->name, name) > 0)))
+            break;
+        }
+      }
+      tp->next = *tpp;
+      *tpp = tp;
+    }
+    else
+#endif
+    { tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    strcpy(tp->name, name);
+    tp->value = NULL;
+  }
+  else if (tp->visible)
+  { return SOAP_OK;
+  }
+  else if (value && tp->value && tp->size <= strlen(value))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute value of %s (free %p)\n", name, tp->value));
+    SOAP_FREE(soap, tp->value);
+    tp->value = NULL;
+    tp->ns = NULL;
+  }
+  if (value)
+  { if (!tp->value)
+    { tp->size = strlen(value) + 1;
+      if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+        return soap->error = SOAP_EOM;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute value of %s (%p)\n", tp->name, tp->value));
+    }
+    strcpy(tp->value, value);
+    if (!strncmp(tp->name, "xmlns:", 6))
+      tp->ns = tp->value;
+    tp->visible = 2;
+#ifndef WITH_LEAN
+    if (!strcmp(name, "wsu:Id"))
+    { soap->part = SOAP_BEGIN_SECURITY;
+      strncpy(soap->id, value, sizeof(soap->id));
+      soap->id[sizeof(soap->id)-1] = '\0';
+    }
+#endif
+  }
+  else
+    tp->visible = 1;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_attr(struct soap *soap)
+{ register struct soap_attribute *tp;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_CANONICAL))
+  { while (soap->attributes)
+    { tp = soap->attributes->next;
+      SOAP_FREE(soap, soap->attributes->value);
+      SOAP_FREE(soap, soap->attributes);
+      soap->attributes = tp;
+    }
+  }
+  else
+#endif
+  { for (tp = soap->attributes; tp; tp = tp->next)
+      tp->visible = 0;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d)
+{ register size_t i;
+  for (i = 0; i < n; i++)
+  { register soap_wchar c = soap_get(soap);
+    switch (c)
+    {
+    case SOAP_TT:
+      *s++ = '<';
+      soap_unget(soap, '/');
+      break;
+    case SOAP_LT:
+      *s++ = '<';
+      break;
+    case SOAP_GT:
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '>';
+      break;
+    case SOAP_QT:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '"';
+      break;
+    case SOAP_AP:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '\'';
+      break;
+    case '\t':
+    case '\n':
+    case '\r':
+    case ' ':
+    case '/':
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+    default:
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+  }
+  return soap->error = SOAP_EOM;
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_store_lab(struct soap *soap, const char *s, size_t n)
+{ soap->labidx = 0;
+  return soap_append_lab(soap, s, n);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_append_lab(struct soap *soap, const char *s, size_t n)
+{ if (soap->labidx + n >= soap->lablen)
+  { register char *t = soap->labbuf;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enlarging look-aside buffer to append data, old size=%lu", (unsigned long)soap->lablen));
+    if (soap->lablen == 0)
+      soap->lablen = SOAP_LABLEN;
+    while (soap->labidx + n >= soap->lablen)
+      soap->lablen <<= 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, ", new size=%lu\n", (unsigned long)soap->lablen));
+    soap->labbuf = (char*)SOAP_MALLOC(soap, soap->lablen);
+    if (!soap->labbuf)
+    { if (t)
+        SOAP_FREE(soap, t);
+      return soap->error = SOAP_EOM;
+    }
+    if (t)
+    { memcpy(soap->labbuf, t, soap->labidx);
+      SOAP_FREE(soap, t);
+    }
+  }
+  if (s)
+  { memcpy(soap->labbuf + soap->labidx, s, n);
+    soap->labidx += n;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_peek_element(struct soap *soap)
+{
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att = NULL;
+  register char *lead = NULL;
+#endif
+  register struct soap_attribute *tp;
+  const char *t;
+  register char *s;
+  register soap_wchar c;
+  register int i;
+  if (soap->peeked)
+  { if (!*soap->tag)
+      return soap->error = SOAP_NO_TAG;
+    return SOAP_OK;
+  }
+  soap->peeked = 1;
+  c = soap_getutf8(soap);
+#ifdef WITH_DOM
+  /* whitespace leading to start tag is not insignificant for DOM */
+  if (soap_blank(c))
+  { soap->labidx = 0;
+    do
+    { if (soap_append_lab(soap, NULL, 0))
+        return SOAP_EOM;
+      s = soap->labbuf + soap->labidx;
+      i = soap->lablen - soap->labidx;
+      soap->labidx = soap->lablen;
+      while (soap_blank(c) && i--)
+      { *s++ = c;
+        c = soap_getutf8(soap);
+      }
+    }
+    while (soap_blank(c));
+    *s = '\0';
+    lead = soap_strdup(soap, soap->labbuf);
+  }
+#else
+  while (soap_blank(c))
+    c = soap_getutf8(soap);
+#endif
+  if (c != SOAP_LT)
+  { *soap->tag = '\0';
+    if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, c);
+#ifdef WITH_DOM
+    /* whitespace leading to end tag is not insignificant for DOM */
+    if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+      soap->dom->tail = soap_strdup(soap, lead);
+#endif
+    return soap->error = SOAP_NO_TAG;
+  }
+  s = soap->tag;
+  do c = soap_get1(soap);
+  while (soap_blank(c));
+  i = sizeof(soap->tag);
+  while (c != '>' && c != '/' && soap_notblank(c))
+  { if (--i > 0)
+      *s++ = (char)c;
+    c = soap_get1(soap);
+  }
+  while (soap_blank(c))
+    c = soap_get1(soap);
+  *s = '\0';
+  soap->id[0] = '\0';
+  soap->href[0] = '\0';
+  soap->type[0] = '\0';
+  soap->arrayType[0] = '\0';
+  soap->arraySize[0] = '\0';
+  soap->arrayOffset[0] = '\0';
+  soap->other = 0;
+  soap->root = -1;
+  soap->position = 0;
+  soap->null = 0;
+  soap->mustUnderstand = 0;
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt;
+    elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->next = NULL;
+    elt->nstr = NULL;
+    elt->name = soap_strdup(soap, soap->tag);
+    elt->prnt = soap->dom;
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->type = 0;
+    elt->node = NULL;
+    elt->head = lead;
+    elt->tail = NULL;
+    elt->soap = soap;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+    att = &elt->atts;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+    tp->visible = 0;
+  while ((int)c != EOF && c != '>' && c != '/')
+  { s = soap->tmpbuf;
+    i = sizeof(soap->tmpbuf);
+    while (c != '=' && c != '>' && c != '/' && soap_notblank(c))
+    { if (--i > 0)
+        *s++ = (char)c;
+      c = soap_get1(soap);
+    }
+    *s = '\0';
+    if (i == sizeof(soap->tmpbuf))
+      return soap->error = SOAP_SYNTAX_ERROR;
+#ifdef WITH_DOM
+    /* add attribute name to dom */
+    if (att)
+    { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+       if (!*att)
+         return soap->error = SOAP_EOM;
+       (*att)->next = NULL;
+       (*att)->nstr = NULL;
+       (*att)->name = soap_strdup(soap, soap->tmpbuf);
+       (*att)->data = NULL;
+       (*att)->wide = NULL;
+       (*att)->soap = soap;
+    }
+#endif
+    if (!strncmp(soap->tmpbuf, "xmlns", 5))
+    { if (soap->tmpbuf[5] == ':')
+      { soap->tmpbuf[5] = '\0';
+        t = soap->tmpbuf + 6;
+      }
+      else if (soap->tmpbuf[5])
+        t = NULL;
+      else
+        t = SOAP_STR_EOS;
+    }
+    else
+      t = NULL;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (!SOAP_STRCMP(tp->name, soap->tmpbuf))
+        break;
+    }
+    if (!tp)
+    { tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(soap->tmpbuf));
+      if (!tp)
+        return soap->error = SOAP_EOM;
+      strcpy(tp->name, soap->tmpbuf);
+      tp->value = NULL;
+      tp->size = 0;
+      tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    while (soap_blank(c))
+      c = soap_get1(soap);
+    if (c == '=')
+    { do c = soap_getutf8(soap);
+      while (soap_blank(c));
+      if (c != SOAP_QT && c != SOAP_AP)
+      { soap_unget(soap, c);
+        c = ' '; /* blank delimiter */
+      }
+      if (soap_getattrval(soap, tp->value, tp->size, c))
+      {
+#ifdef WITH_FAST
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+	if (soap_store_lab(soap, tp->value, tp->size))
+	  return soap->error;
+	if (tp->value)
+	  SOAP_FREE(soap, tp->value);
+	for (;;)
+	{ if (soap_getattrval(soap, soap->labbuf + soap->labidx, soap->lablen - soap->labidx, c))
+	  { if (soap->error != SOAP_EOM)
+	      return soap->error;
+            soap->error = SOAP_OK;
+	    soap->labidx = soap->lablen;
+	    if (soap_append_lab(soap, NULL, 0))
+	      return soap->error;
+	  }
+	  else
+	    break;
+	}
+	if (soap->labidx)
+          tp->size = soap->lablen;
+	else
+	{ tp->size = strlen(soap->labbuf) + 1;
+          if (tp->size < SOAP_LABLEN)
+	    tp->size = SOAP_LABLEN;
+        }
+	if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+	  return soap->error = SOAP_EOM;
+        strcpy(tp->value, soap->labbuf);
+#else
+	size_t n;
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+        if (soap_new_block(soap))
+          return soap->error;
+        for (;;)
+        { if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+            return soap->error;
+          if (soap_getattrval(soap, s, SOAP_BLKLEN, c))
+          { if (soap->error != SOAP_EOM)
+              return soap->error;
+            soap->error = SOAP_OK;
+          }
+          else
+            break;
+        }
+	n = tp->size + soap->blist->size;
+        if (!(s = (char*)SOAP_MALLOC(soap, n)))
+          return soap->error = SOAP_EOM;
+        if (tp->value)
+        { memcpy(s, tp->value, tp->size);
+          SOAP_FREE(soap, tp->value);
+        }
+        soap_save_block(soap, s + tp->size, 0);
+        tp->value = s;
+        tp->size = n;
+#endif
+      }
+      do c = soap_get1(soap);
+      while (soap_blank(c));
+      tp->visible = 2; /* seen this attribute w/ value */
+#ifdef WITH_DOM
+      if (att)
+        (*att)->data = soap_strdup(soap, tp->value);
+#endif
+    }
+    else
+      tp->visible = 1; /* seen this attribute w/o value */
+#ifdef WITH_DOM
+    if (att)
+      att = &(*att)->next;
+#endif
+    if (t && tp->value)
+    { if (soap_push_namespace(soap, t, tp->value))
+        return soap->error;
+      tp->visible = 0;
+    }
+  }
+#ifdef WITH_DOM
+  if (att)
+  { soap->dom->nstr = soap_current_namespace(soap, soap->tag);
+    for (att = &soap->dom->atts; *att; att = &(*att)->next)
+      (*att)->nstr = soap_current_namespace(soap, (*att)->name);
+  }
+#endif
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  if (!(soap->body = (c != '/')))
+    do c = soap_get1(soap);
+    while (soap_blank(c));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { if (!soap->body && soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible && tp->value)
+    { if (!strcmp(tp->name, "id"))
+      { *soap->id = '#';
+        strncpy(soap->id + 1, tp->value, sizeof(soap->id) - 2);
+        soap->id[sizeof(soap->id)-1] = '\0';
+      }
+      else if (!strcmp(tp->name, "href"))
+      { strncpy(soap->href, tp->value, sizeof(soap->href) - 1);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if ((soap->version == 2 || (soap->mode & SOAP_XML_GRAPH)) && !strcmp(tp->name, "ref"))
+      { *soap->href = '#';
+        strncpy(soap->href + 1, tp->value, sizeof(soap->href) - 2);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if (!soap_match_tag(soap, tp->name, "xsi:type"))
+      { strncpy(soap->type, tp->value, sizeof(soap->type) - 1);
+        soap->type[sizeof(soap->type)-1] = '\0';
+      }
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arrayType"))
+      { s = soap_strrchr(tp->value, '[');
+        if (s && (size_t)(s - tp->value) < sizeof(soap->arrayType))
+        { strncpy(soap->arrayType, tp->value, s - tp->value);
+          soap->arrayType[s - tp->value] = '\0';
+          strncpy(soap->arraySize, s, sizeof(soap->arraySize) - 1);
+        }
+        else
+          strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+        soap->arraySize[sizeof(soap->arrayType)-1] = '\0';
+        soap->arrayType[sizeof(soap->arrayType)-1] = '\0';
+      }
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:itemType"))
+        strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arraySize"))
+        strncpy(soap->arraySize, tp->value, sizeof(soap->arraySize) - 1);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:offset"))
+        strncpy(soap->arrayOffset, tp->value, sizeof(soap->arrayOffset));
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:position"))
+        soap->position = soap_getposition(tp->value, soap->positions);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:root"))
+        soap->root = ((!strcmp(tp->value, "1") || !strcmp(tp->value, "true")));
+      else if ((soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENV:actor"))
+            || (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENV:role")))
+      { if ((!soap->actor || strcmp(soap->actor, tp->value))
+         && strcmp(tp->value, "http://schemas.xmlsoap.org/soap/actor/next")
+         && strcmp(tp->value, "http://www.w3.org/2003/05/soap-envelope/role/next"))
+          soap->other = 1;
+      }
+      else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:mustUnderstand")
+            && (!strcmp(tp->value, "1") || !strcmp(tp->value, "true")))
+        soap->mustUnderstand = 1;
+      else if ((!soap_match_tag(soap, tp->name, "xsi:null")
+             || !soap_match_tag(soap, tp->name, "xsi:nil"))
+            && (!strcmp(tp->value, "1")
+             || !strcmp(tp->value, "true")))
+        soap->null = 1;
+    }
+  }
+  return soap->error = SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_retry(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_revert(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_revert(struct soap *soap)
+{ if (!soap->peeked)
+  { soap->peeked = 1;
+    if (soap->body)
+      soap->level--;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reverting last element (level=%u)\n", soap->level));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_string_out(struct soap *soap, const char *s, int flag)
+{ register const char *t;
+  register soap_wchar c;
+  register soap_wchar mask = 0xFFFFFF80UL;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_strdup(soap, s);
+    return SOAP_OK;
+  }
+#endif
+  if (soap->mode & SOAP_C_UTFSTRING)
+    mask = 0;
+  t = s;
+  while ((c = *t++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#x9;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xA;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 13:
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xD;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '&':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&amp;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '<':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&lt;", 4))
+        return soap->error;
+      s = t;
+      break;
+    case '>':
+      if (!flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&gt;", 4))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case '"':
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&quot;", 6))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    default:
+#ifndef WITH_LEANER
+#ifdef HAVE_MBTOWC
+      if (soap->mode & SOAP_C_MBSTRING)
+      { wchar_t wc;
+        register int m = mbtowc(&wc, t - 1, MB_CUR_MAX);
+        if (m > 0 && wc != c)
+        { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, wc))
+            return soap->error;
+	  s = t += m - 1;
+	  continue;
+        }
+      }
+#endif
+#endif
+      if (c & mask)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, (unsigned char)c))
+          return soap->error;
+        s = t;
+      }
+    }
+  }
+  return soap_send_raw(soap, s, t - s - 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_string_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ register char *s;
+  char *t = NULL;
+  register size_t i;
+  register long l = 0;
+  register int n = 0;
+  register int m = 0;
+  register soap_wchar c;
+#if !defined(WITH_LEANER) && defined(HAVE_WCTOMB)
+  char buf[MB_LEN_MAX > 8 ? MB_LEN_MAX : 8];
+#else
+  char buf[8];
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+#ifndef WITH_LEAN
+      t = soap->tmpbuf;
+      t[0] = '<';
+      strncpy(t + 1, soap->tag, sizeof(soap->tmpbuf) - 1);
+      strncat(t, ">", sizeof(soap->tmpbuf));
+      m = strlen(soap->tag) + 2;
+#endif
+    }
+  }
+#ifdef WITH_CDATA
+  if (!flag)
+  { register int state = 0;
+#ifdef WITH_FAST
+    soap->labidx = 0;			/* use look-aside buffer */
+#else
+    if (soap_new_block(soap))
+      return NULL;
+#endif
+    for (;;)
+    { 
+#ifdef WITH_FAST
+      register size_t k;
+      if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+        return NULL;
+      s = soap->labbuf + soap->labidx;	/* space to populate */
+      k = soap->lablen - soap->labidx;	/* number of bytes available */
+      soap->labidx = soap->lablen;	/* claim this space */
+#else
+      register size_t k = SOAP_BLKLEN;
+      if (!(s = (char*)soap_push_block(soap, k)))
+        return NULL;
+#endif
+      for (i = 0; i < k; i++)
+      { if (m > 0)
+        { *s++ = *t++;	/* copy multibyte characters */
+	  m--;
+          continue;
+        }
+        c = soap_getchar(soap);
+	if ((int)c == EOF)
+          goto end;
+        if (c >= 0x80 && !(soap->mode & SOAP_ENC_LATIN))
+        { soap_unget(soap, c);
+	  c = soap_getutf8(soap);
+	  if (soap->mode & SOAP_C_UTFSTRING)
+          { if ((c & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+            { c &= 0x7FFFFFFF;
+              t = buf;
+              if (c < 0x0800)
+                *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+              else
+              { if (c < 0x010000)
+                  *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+                else
+                { if (c < 0x200000)
+                    *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+                  else
+                  { if (c < 0x04000000)
+                      *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                    else
+                    { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                      *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                    }
+                    *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+                  }     
+                  *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+              }
+              *t++ = (char)(0x80 | (c & 0x3F));
+	      m = (int)(t - buf) - 1;
+              t = buf;
+              *s++ = *t++;
+              continue;
+	    }
+          }
+        }
+	switch (state)
+        { case 1:
+            if (c == ']')
+	      state = 4;
+	    *s++ = c;
+	    continue;
+	  case 2:
+	    if (c == '-')
+              state = 6;
+	    *s++ = c;
+	    continue;
+	  case 3:
+	    if (c == '?')
+	      state = 8;
+	    *s++ = c;
+	    continue;
+          /* CDATA */
+	  case 4:
+	    if (c == ']')
+              state = 5;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+	  case 5:
+	    if (c == '>')
+	      state = 0;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+          /* comment */
+          case 6:
+            if (c == '-')
+	      state = 7;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          case 7:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          /* PI */
+	  case 8:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 3;
+	    *s++ = c;
+	    continue;
+        }
+        switch (c)
+        {
+        case '/':
+          if (n > 0)
+          { c = soap_getchar(soap);
+            if (c == '>')
+              n--;
+            soap_unget(soap, c);
+          }
+          *s++ = '/';
+          break;
+        case '<':
+	  c = soap_getchar(soap);
+	  if (c == '/')
+	  { if (n == 0)
+	    { c = SOAP_TT;
+	      goto end;
+	    }
+	    n--;
+	  }
+	  else if (c == '!')
+	  { c = soap_getchar(soap);
+	    if (c == '[')
+            { do c = soap_getchar(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                 goto end;
+	      t = (char*)"![CDATA[";
+	      m = 8;
+	      state = 1;
+	    }
+            else if (c == '-')
+	    { if ((c = soap_getchar(soap)) == '-')
+	        state = 2;
+	      t = (char*)"!-";
+	      m = 2;
+	      soap_unget(soap, c);
+	    }
+	    else
+	    { t = (char*)"!";
+	      m = 1;
+	      soap_unget(soap, c);
+	    }
+	    *s++ = '<';
+	    break;
+	  }
+	  else if (c == '?')
+	    state = 3;
+	  else
+	    n++;
+          soap_unget(soap, c);
+          *s++ = '<';
+          break;
+        case '>':
+          *s++ = '>';
+          break;
+        case '"':
+          *s++ = '"';
+          break;
+        default:
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+          if (soap->mode & SOAP_C_MBSTRING)
+          { m = wctomb(buf, c & 0x7FFFFFFF);
+            if (m >= 1 && m <= (int)MB_CUR_MAX)
+            { t = buf;
+              *s++ = *t++;
+              m--;
+            }
+            else
+            { *s++ = SOAP_UNKNOWN_CHAR;
+	      m = 0;
+	    }
+          }
+          else
+#endif
+#endif
+            *s++ = (char)(c & 0xFF);
+        }
+	l++;
+        if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+        { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+          soap->error = SOAP_LENGTH;
+          return NULL;
+        }
+      }
+    }
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;			/* use look-aside buffer */
+#else
+  if (soap_new_block(soap))
+    return NULL;
+#endif
+  for (;;)
+  { 
+#ifdef WITH_FAST
+    register size_t k;
+    if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+      return NULL;
+    s = soap->labbuf + soap->labidx;	/* space to populate */
+    k = soap->lablen - soap->labidx;	/* number of bytes available */
+    soap->labidx = soap->lablen;	/* claim this space */
+#else
+    register size_t k = SOAP_BLKLEN;
+    if (!(s = (char*)soap_push_block(soap, k)))
+      return NULL;
+#endif
+    for (i = 0; i < k; i++)
+    { if (m > 0)
+      { *s++ = *t++;	/* copy multibyte characters */
+        m--;
+        continue;
+      }
+      if (soap->mode & SOAP_C_UTFSTRING)
+      { if (((c = soap_get(soap)) & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+        { c &= 0x7FFFFFFF;
+          t = buf;
+          if (c < 0x0800)
+            *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+          else
+          { if (c < 0x010000)
+              *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+            else
+            { if (c < 0x200000)
+                *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+              else
+              { if (c < 0x04000000)
+                  *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                else
+                { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                  *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+              }     
+              *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+            }
+            *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+          }
+          *t++ = (char)(0x80 | (c & 0x3F));
+	  m = (int)(t - buf) - 1;
+          t = buf;
+          *s++ = *t++;
+          continue;
+        }
+      }
+      else
+        c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        t = (char*)"/";
+	m = 1;
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_get(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<' | 0x80000000:
+        if (flag)
+          *s++ = '<';
+        else
+        { *s++ = '&';
+          t = (char*)"lt;";
+	  m = 3;
+        }
+        break;
+      case '>' | 0x80000000:
+        if (flag)
+          *s++ = '>';
+        else
+        { *s++ = '&';
+          t = (char*)"gt;";
+	  m = 3;
+        }
+        break;
+      case '&' | 0x80000000:
+        if (flag)
+          *s++ = '&';
+        else
+        { *s++ = '&';
+          t = (char*)"amp;";
+	  m = 4;
+        }
+        break;
+      case '"' | 0x80000000:
+        if (flag)
+          *s++ = '"';
+        else
+        { *s++ = '&';
+          t = (char*)"quot;";
+	  m = 5;
+        }
+        break;
+      case '\'' | 0x80000000:
+        if (flag)
+          *s++ = '\'';
+        else
+        { *s++ = '&';
+          t = (char*)"apos;";
+	  m = 5;
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+        if (soap->mode & SOAP_C_MBSTRING)
+        { m = wctomb(buf, c & 0x7FFFFFFF);
+          if (m >= 1 && m <= (int)MB_CUR_MAX)
+          { t = buf;
+            *s++ = *t++;
+            m--;
+          }
+          else
+          { *s++ = SOAP_UNKNOWN_CHAR;
+	    m = 0;
+	  }
+        }
+        else
+#endif
+#endif
+          *s++ = (char)(c & 0xFF);
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+#ifdef WITH_FAST
+  t = soap_strdup(soap, soap->labbuf);
+#else
+  soap_size_block(soap, i+1);
+  t = soap_save_block(soap, NULL, 0);
+#endif
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (flag == 3)
+      soap->dom->tail = t;
+    else
+      soap->dom->data = t;
+  }
+#endif
+  if (flag == 2)
+    if (soap_s2QName(soap, t, &t))
+      return NULL;
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_wstring_out(struct soap *soap, const wchar_t *s, int flag)
+{ const char *t;
+  char tmp;
+  register soap_wchar c;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { wchar_t *r = (wchar_t*)s;
+    int n = 1;
+    while (*r++)
+      n++;
+    soap->dom->wide = r = (wchar_t*)soap_malloc(soap, n * sizeof(wchar_t));
+    while (n--)
+      *r++ = *s++;
+    return SOAP_OK;
+  }
+#endif
+  while ((c = *s++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+        t = "&#x9;";
+      else
+        t = "\t";
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+        t = "&#xA;";
+      else
+        t = "\n";
+      break;
+    case 13:
+      t = "&#xD;";
+      break;
+    case '&':
+      t = "&amp;";
+      break;
+    case '<':
+      t = "&lt;";
+      break;
+    case '>':
+      if (flag)
+        t = ">";
+      else
+	t = "&gt;";
+      break;
+    case '"':
+      if (flag)
+        t = "&quot;";
+      else
+        t = "\"";
+      break;
+    default:
+      if (c > 0 && c < 0x80)
+      { tmp = (char)c;
+        if (soap_send_raw(soap, &tmp, 1))
+          return soap->error;
+      }
+      else if (soap_pututf8(soap, (unsigned long)c))
+        return soap->error;
+      continue;
+    }
+    if (soap_send(soap, t))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t *
+SOAP_FMAC2
+soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ wchar_t *s;
+  register int i, n = 0;
+  register long l = 0;
+  register soap_wchar c;
+  const char *t = NULL;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading wide string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+    }
+  }
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { if (!(s = (wchar_t*)soap_push_block(soap, sizeof(wchar_t)*SOAP_BLKLEN)))
+      return NULL;
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { if (t)
+      { *s++ = (wchar_t)*t++;
+        if (!*t)
+          t = NULL;
+        continue;
+      }
+      c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        soap_unget(soap, '/');
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_getutf8(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<':
+        if (flag)
+          *s++ = (soap_wchar)'<';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "lt;";
+        }
+        break;
+      case '>':
+        if (flag)
+          *s++ = (soap_wchar)'>';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "gt;";
+        }
+        break;
+      case '"':
+        if (flag)
+          *s++ = (soap_wchar)'"';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "quot;";
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+        *s++ = (wchar_t)c & 0x7FFFFFFF;
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+  soap_size_block(soap, sizeof(wchar_t) * (i + 1));
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+  s = (wchar_t*)soap_save_block(soap, NULL, 0);
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->wide = s;
+#endif
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_int2s(struct soap *soap, int n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outint(struct soap *soap, const char *tag, int id, const int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2int(struct soap *soap, const char *s, int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (int)soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int *
+SOAP_FMAC2
+soap_inint(struct soap *soap, const char *tag, int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (int*)soap_id_enter(soap, soap->id, p, t, sizeof(int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(int), 0, NULL);
+  else if (p)
+  { if (soap_s2int(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_long2s(struct soap *soap, long n)
+{ sprintf(soap->tmpbuf, "%ld", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outlong(struct soap *soap, const char *tag, int id, const long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2long(struct soap *soap, const char *s, long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+long *
+SOAP_FMAC2
+soap_inlong(struct soap *soap, const char *tag, long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (long*)soap_id_enter(soap, soap->id, p, t, sizeof(long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(long), 0, NULL);
+  else if (p)
+  { if (soap_s2long(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_LONG642s(struct soap *soap, LONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_LONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outLONG64(struct soap *soap, const char *tag, int id, const LONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_LONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2LONG64(struct soap *soap, const char *s, LONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOLL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoll(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_LONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+LONG64 *
+SOAP_FMAC2
+soap_inLONG64(struct soap *soap, const char *tag, LONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (LONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(LONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (LONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(LONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2LONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_byte2s(struct soap *soap, char n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outbyte(struct soap *soap, const char *tag, int id, const char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2byte(struct soap *soap, const char *s, char *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -128 || n > 127)
+      soap->error = SOAP_TYPE;
+    *p = (char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_inbyte(struct soap *soap, const char *tag, char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (char*)soap_id_enter(soap, soap->id, p, t, sizeof(char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(char), 0, NULL);
+  else if (p)
+  { if (soap_s2byte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_short2s(struct soap *soap, short n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outshort(struct soap *soap, const char *tag, int id, const short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2short(struct soap *soap, const char *s, short *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -32768 || n > 32767)
+      soap->error = SOAP_TYPE;
+    *p = (short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+short *
+SOAP_FMAC2
+soap_inshort(struct soap *soap, const char *tag, short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (short*)soap_id_enter(soap, soap->id, p, t, sizeof(short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(short), 0, NULL);
+  else if (p)
+  { if (soap_s2short(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_float2s(struct soap *soap, float n)
+{ const char *s;
+  if (soap_isnan((double)n))
+    s = "NaN";
+  else if (soap_ispinff(n))
+    s = "INF";
+  else if (soap_isninff(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->float_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outfloat(struct soap *soap, const char *tag, int id, const float *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_float2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2float(struct soap *soap, const char *s, float *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = FLT_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = FLT_NAN;
+    else
+    {
+/* On some systems, strtof appears to be broken or doesn't link: use with caution */
+#if defined(HAVE_STRTOF)
+      char *r;
+      *p = strtof((char*)s, &r);
+      if (*r)
+#elif defined(HAVE_STRTOD)
+      char *r;
+      *p = (float)strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%g", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static int soap_isnumeric(struct soap *soap, const char *type)
+{ if (soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":float")
+   && soap_match_tag(soap, soap->type, ":double")
+   && soap_match_tag(soap, soap->type, ":decimal")
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return SOAP_ERR;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+float *
+SOAP_FMAC2
+soap_infloat(struct soap *soap, const char *tag, float *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (float*)soap_id_enter(soap, soap->id, p, t, sizeof(float), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (float*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(float), 0, NULL);
+  else if (p)
+  { if (soap_s2float(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_double2s(struct soap *soap, double n)
+{ const char *s;
+  if (soap_isnan(n))
+    s = "NaN";
+  else if (soap_ispinfd(n))
+    s = "INF";
+  else if (soap_isninfd(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->double_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdouble(struct soap *soap, const char *tag, int id, const double *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_double2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2double(struct soap *soap, const char *s, double *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = DBL_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = DBL_NAN;
+    else
+    {
+#ifdef HAVE_STRTOD
+      char *r;
+      *p = strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%lg", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+double *
+SOAP_FMAC2
+soap_indouble(struct soap *soap, const char *tag, double *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (double*)soap_id_enter(soap, soap->id, p, t, sizeof(double), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (double*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(double), 0, NULL);
+  else if (p)
+  { if (soap_s2double(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedByte2s(struct soap *soap, unsigned char n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedByte(struct soap *soap, const char *tag, int id, const unsigned char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedByte(struct soap *soap, const char *s, unsigned char *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 255)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned char *
+SOAP_FMAC2
+soap_inunsignedByte(struct soap *soap, const char *tag, unsigned char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned char*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned char), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedByte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedShort2s(struct soap *soap, unsigned short n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedShort(struct soap *soap, const char *tag, int id, const unsigned short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedShort(struct soap *soap, const char *s, unsigned short *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 65535)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned short *
+SOAP_FMAC2
+soap_inunsignedShort(struct soap *soap, const char *tag, unsigned short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned short*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned short), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedShort(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedInt2s(struct soap *soap, unsigned int n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedInt(struct soap *soap, const char *tag, int id, const unsigned int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedInt(struct soap *soap, const char *s, unsigned int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (unsigned int)soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned int *
+SOAP_FMAC2
+soap_inunsignedInt(struct soap *soap, const char *tag, unsigned int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned int*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned int), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedInt(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedLong2s(struct soap *soap, unsigned long n)
+{ sprintf(soap->tmpbuf, "%lu", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedLong(struct soap *soap, const char *tag, int id, const unsigned long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedLong(struct soap *soap, const char *s, unsigned long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned long *
+SOAP_FMAC2
+soap_inunsignedLong(struct soap *soap, const char *tag, unsigned long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned long*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned long), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedLong(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_ULONG642s(struct soap *soap, ULONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_ULONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outULONG64(struct soap *soap, const char *tag, int id, const ULONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_ULONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2ULONG64(struct soap *soap, const char *s, ULONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOULL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoull(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_ULONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+ULONG64 *
+SOAP_FMAC2
+soap_inULONG64(struct soap *soap, const char *tag, ULONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (ULONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(ULONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (ULONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(ULONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2ULONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2string(struct soap *soap, const char *s, char **t)
+{ *t = NULL;
+  if (s)
+  { if (!(*t = soap_strdup(soap, s)))
+      return soap->error = SOAP_EOM;
+    if (!(soap->mode & (SOAP_ENC_LATIN | SOAP_C_UTFSTRING)))
+    { /* TODO: consider truncating UTF8 to ASCII for regular XML attribute strings? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2QName(struct soap *soap, const char *s, char **t)
+{ if (s)
+  { struct soap_nlist *np;
+    const char *p;
+    if (!strncmp(s, "xml:", 4))
+    { *t = soap_strdup(soap, s);
+      return SOAP_OK;
+    }
+    np = soap->nlist;
+    p = strchr(s, ':');
+    if (p)
+    { register int n = p - s;
+      while (np && (strncmp(np->id, s, n) || np->id[n]))
+        np = np->next;
+      p++;
+    }
+    else
+    { while (np && *np->id)
+        np = np->next;
+      p = s;
+    }
+    if (np)
+    { if (np->index >= 0 && soap->local_namespaces)
+      { register const char *q = soap->local_namespaces[np->index].id;
+        if (q)
+        { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(q) + 2)))
+            sprintf(*t, "%s:%s", q, p);
+          return SOAP_OK;
+        }
+      }
+      if (np->ns)
+      { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(np->ns) + 4)))
+          sprintf(*t, "\"%s\":%s", np->ns, p);
+        return SOAP_OK;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined (index=%d, URI=%s)\n", s, np->index, np->ns?np->ns:""));
+      return soap->error = SOAP_NAMESPACE; 
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined, assuming empty namespace\n", s));
+    if ((*t = (char*)soap_malloc(soap, strlen(p) + 4)))
+      sprintf(*t, "\"\":%s", p);
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_QName2s(struct soap *soap, const char *s)
+{ struct Namespace *p;
+  char *t;
+  int n;
+  if (!s || *s != '"')
+  {
+#ifndef WITH_LEAN
+    if (s && (soap->mode & SOAP_XML_CANONICAL))
+    { t = (char*)strchr(s, ':');
+      if (t)
+        soap_utilize_ns(soap, s, t - s);
+    }
+#endif
+    return s;
+  }
+  s++;
+  if ((p = soap->local_namespaces))
+  { for (; p->id; p++)
+    { if (p->ns)
+        if (!soap_tag_cmp(s, p->ns))
+          break;
+      if (p->in)
+        if (!soap_tag_cmp(s, p->in))
+          break;
+    }
+    if (p && p->id)
+    { s = strchr(s, '"');
+      if (s)
+      { t = (char*)soap_malloc(soap, strlen(p->id) + strlen(s));
+        strcpy(t, p->id);
+	strcat(t, s + 1);
+        return t;
+      }
+    }
+  }
+  t = (char*)strchr(s, '"');
+  if (t)
+    n = t - s;
+  else
+    n = 0;
+  t = soap_strdup(soap, s);
+  t[n] = '\0';
+  sprintf(soap->tmpbuf, "xmlns:_%d", soap->idnum++);
+  soap_set_attr(soap, soap->tmpbuf, t);
+  s = strchr(s, '"');
+  if (s)
+  { t = (char*)soap_malloc(soap, strlen(soap->tmpbuf) + strlen(s) - 6);
+    strcpy(t, soap->tmpbuf + 6);
+    strcat(t, s + 1);
+  }
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2wchar(struct soap *soap, const char *s, wchar_t **t)
+{ wchar_t *r;
+  if (!s)
+    *t = NULL;
+  else
+  { *t = r = (wchar_t*)soap_malloc(soap, sizeof(wchar_t) * (strlen(s) + 1));
+    if (!r)
+      return soap->error;
+    if (soap->mode & SOAP_ENC_LATIN)
+    { while (*s)
+        *r++ = (wchar_t)*s++;
+    }
+    else
+    { /* Convert UTF8 to wchar */
+      while (*s)
+      { register soap_wchar c, c1, c2, c3, c4;
+        c = *s++;
+        if (c < 0x80)
+	  *r++ = (wchar_t)c;
+	else
+        { c1 = (soap_wchar)*s++ & 0x3F;
+          if (c < 0xE0)
+            *r++ = (wchar_t)(((soap_wchar)(c & 0x1F) << 6) | c1);
+          else
+	  { c2 = (soap_wchar)*s++ & 0x3F;
+            if (c < 0xF0)
+              *r++ = (wchar_t)(((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2);
+            else
+	    { c3 = (soap_wchar)*s++ & 0x3F;
+              if (c < 0xF8)
+                *r++ = (wchar_t)(((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3);
+              else
+	      { c4 = (soap_wchar)*s++ & 0x3F;
+                if (c < 0xFC)
+                  *r++ = (wchar_t)(((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4);
+                else
+		  *r++ = (wchar_t)(((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(*s++ & 0x3F));
+              }
+            }
+          }
+        }
+      }
+    }
+    *r = L'\0';
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_wchar2s(struct soap *soap, const wchar_t *s)
+{ register soap_wchar c;
+  register char *r, *t;
+  const wchar_t *q = s;
+  size_t n = 0;
+  while ((c = *q++))
+  { if (c > 0 && c < 0x80)
+      n++;
+    else
+      n += 6;
+  }
+  r = t = (char*)soap_malloc(soap, n + 1);
+  if (r)
+  { /* Convert wchar to UTF8 */
+    while ((c = *s++))
+    { if (c > 0 && c < 0x80)
+        *t++ = (char)c;
+      else
+      { if (c < 0x0800)
+          *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+        else
+        { if (c < 0x010000)
+            *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+          else
+          { if (c < 0x200000)
+              *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+            else
+            { if (c < 0x04000000)
+                *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+              else
+              { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+              }
+              *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+            }     
+            *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+        }
+        *t++ = (char)(0x80 | (c & 0x3F));
+      }
+    }
+    *t = '\0';
+  }
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outstring(struct soap *soap, const char *tag, int id, char *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_string_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_instring(struct soap *soap, const char *tag, char **p, const char *type, int t, int flag, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_string_in(soap, flag, minlen, maxlen);
+    if (!*p || !(char*)soap_id_enter(soap, soap->id, *p, t, sizeof(char*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (char**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(char**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwstring(struct soap *soap, const char *tag, int id, wchar_t *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_wstring_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type, int t, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_wstring_in(soap, 1, minlen, maxlen);
+    if (!*p || !(wchar_t*)soap_id_enter(soap, soap->id, *p, t, sizeof(wchar_t*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (wchar_t**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(wchar_t**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static time_t
+soap_timegm(struct tm *T)
+{
+#if defined(HAVE_TIMEGM)
+  return timegm(T);
+#else
+  time_t t, g, z;
+#ifdef HAVE_GMTIME_R
+  struct tm tm, *tmp = &tm;
+#else
+  struct tm *tmp;
+#endif
+  t = mktime(T);
+  if (t == -1)
+    return -1;
+#ifdef HAVE_GMTIME_R
+  gmtime_r(&t, tmp);
+#else
+  tmp = gmtime(&t);
+#endif
+  tmp->tm_isdst = 0;
+  g = mktime(tmp);
+  if (g == -1)
+    return -1;
+  z = g - t;
+  return t - z;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_dateTime2s(struct soap *soap, time_t n)
+{ struct tm T, *pT = &T;
+#if defined(HAVE_GMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PGMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_PGMTIME)
+  if (gmtime(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GMTIME)
+  if ((pT = gmtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GETTIMEOFDAY)
+  struct timezone tz;
+  memset((void*)&tz, 0, sizeof(tz));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+#endif
+#elif defined(HAVE_FTIME)
+  struct timeb t;
+  memset((void*)&t, 0, sizeof(t));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+  /* The following defines were added for VxWorks*/
+# elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf+strlen(soap->tmpbuf), "%+03d:%02d", t.timezone/60, abs(t.timezone)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+# endif
+#elif defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#else
+  if ((pT = localtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#endif
+  else
+    strcpy(soap->tmpbuf, "1969-12-31T23:59:59Z");
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdateTime(struct soap *soap, const char *tag, int id, const time_t *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_dateTime2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2dateTime(struct soap *soap, const char *s, time_t *p)
+{ if (s)
+  { struct tm T;
+    char zone[16];
+    const char *t;
+    memset((void*)&T, 0, sizeof(T));
+    zone[sizeof(zone)-1] = '\0';
+    if (strchr(s, '-'))
+      t = "%d-%d-%dT%d:%d:%d%15s";
+    else if (strchr(s, ':'))
+      t = "%4d%2d%2dT%d:%d:%d%15s";
+    else /* parse non-XSD-standard alternative ISO 8601 format */
+      t = "%4d%2d%2dT%2d%2d%2d%15s";
+    sscanf(s, t, &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, zone);
+    if (T.tm_year == 1)
+      T.tm_year = 70;
+    else
+      T.tm_year -= 1900;
+    T.tm_mon--;
+    if (*zone)
+    { if (*zone == '.')
+      { for (s = zone + 1; *s; s++)
+          if (*s < '0' || *s > '9')
+            break;
+      }
+      else
+        s = zone;
+      if (*s == '+' || *s == '-')
+      { int h = 0, m = 0;
+        if (s[3] == ':')
+	{ sscanf(s, "%d:%d", &h, &m);
+	  if (h < 0)
+	    m = -m;
+	}
+	else
+	{ m = (int)atol(s);
+	  h = m / 100;
+	  m = m % 100;
+	}
+        T.tm_hour -= h;
+        T.tm_min -= m;
+      }
+      T.tm_isdst = 0;
+      *p = soap_timegm(&T);
+    }
+    else
+    { T.tm_isdst = -1;
+      *p = mktime(&T); /* no time zone: suppose it is localtime? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+time_t *
+SOAP_FMAC2
+soap_indateTime(struct soap *soap, const char *tag, time_t *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":dateTime"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (time_t*)soap_id_enter(soap, soap->id, p, t, sizeof(time_t), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (time_t*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(time_t), 0, NULL);
+  else if (p)
+  { if (soap_s2dateTime(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outliteral(struct soap *soap, const char *tag, char *const*p)
+{ int i;
+  const char *t = NULL;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p && *p)
+  { if (soap_send(soap, *p))
+      return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_inliteral(struct soap *soap, const char *tag, char **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_string_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwliteral(struct soap *soap, const char *tag, wchar_t *const*p)
+{ int i;
+  const char *t = NULL;
+  wchar_t c;
+  const wchar_t *s;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p)
+  { s = *p;
+    while ((c = *s++))
+      if (soap_pututf8(soap, (unsigned char)c))
+        return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwliteral(struct soap *soap, const char *tag, wchar_t **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_wstring_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_token(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF || soap_blank(c))
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_value(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  for (s--; i > 0; i--, s--)
+    if (!soap_blank(*s))
+      break;
+  s[1] = '\0';
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->data = soap_strdup(soap, soap->tmpbuf);
+#endif
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEANER) || !defined(WITH_NOHTTP)
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getline(struct soap *soap, char *s, int len)
+{ int i = len;
+  soap_wchar c = 0;
+  for (;;)
+  { while (--i > 0)
+    { c = soap_getchar(soap);
+      if (c == '\r' || c == '\n')
+        break;
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+    if (c != '\n')
+      c = soap_getchar(soap); /* got \r, now get \n */
+    if (c == '\n')
+    { *s = '\0';
+      if (i+1 == len) /* empty line: end of HTTP/MIME header */
+        break;
+      c = soap_unget(soap, soap_getchar(soap));
+      if (c != ' ' && c != '\t') /* HTTP line continuation? */
+        break;
+    }
+    else if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static size_t
+soap_count_attachments(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  register struct soap_multipart *content;
+  register size_t count = soap->count;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the message size with attachments, current count=%lu\n", (unsigned long)count));
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of DIME attachments\n"));
+    for (content = soap->dime.first; content; content = content->next)
+    { count += 12 + ((content->size+3)&(~3));
+      if (content->id)
+        count += ((strlen(content->id)+3)&(~3));
+      if (content->type)
+        count += ((strlen(content->type)+3)&(~3));
+      if (content->options)
+        count += ((((unsigned char)content->options[2] << 8) | ((unsigned char)content->options[3]))+7)&(~3);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of DIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary)
+  { register size_t n = strlen(soap->mime.boundary);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of MIME attachments\n"));
+    for (content = soap->mime.first; content; content = content->next)
+    { register const char *s;
+      /* count \r\n--boundary\r\n */
+      count += 6 + n;
+      /* count Content-Type: ...\r\n */
+      if (content->type)
+        count += 16 + strlen(content->type);
+      /* count Content-Transfer-Encoding: ...\r\n */
+      s = soap_str_code(mime_codes, content->encoding);
+      if (s)
+        count += 29 + strlen(s);
+      /* count Content-ID: ...\r\n */
+      if (content->id)
+        count += 14 + strlen(content->id);
+      /* count Content-Location: ...\r\n */
+      if (content->location)
+        count += 20 + strlen(content->location);
+      /* count Content-Description: ...\r\n */
+      if (content->description)
+        count += 23 + strlen(content->location);
+      /* count \r\n...content */
+      count += 2 + content->size;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of MIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+    /* count \r\n--boundary-- */
+    count += 6 + n;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New count is %lu bytes\n", (unsigned long)count));
+  return count;
+#else
+  return soap->count;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_putdimefield(struct soap *soap, const char *s, size_t n)
+{ if (soap_send_raw(soap, s, n))
+    return soap->error;
+  return soap_send_raw(soap, SOAP_STR_PADDING, -(long)n&3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_dime_option(struct soap *soap, unsigned short optype, const char *option)
+{ size_t n;
+  char *s = NULL;
+  if (option)
+  { n = strlen(option);
+    s = (char*)soap_malloc(soap, n + 5);
+    if (s)
+    { s[0] = optype >> 8;
+      s[1] = optype & 0xFF;
+      s[2] = n >> 8;
+      s[3] = n & 0xFF;
+      strcpy(s + 4, option);
+    }
+  }
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdimehdr(struct soap *soap)
+{ unsigned char tmp[12];
+  size_t optlen = 0, idlen = 0, typelen = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Put DIME header id='%s'\n", soap->dime.id?soap->dime.id:""));
+  if (soap->dime.options)
+    optlen = (((unsigned char)soap->dime.options[2] << 8) | ((unsigned char)soap->dime.options[3])) + 4;
+  if (soap->dime.id)
+    idlen = strlen(soap->dime.id);
+  if (soap->dime.type)
+    typelen = strlen(soap->dime.type);
+  tmp[0] = SOAP_DIME_VERSION | (soap->dime.flags & 0x7);
+  tmp[1] = soap->dime.flags & 0xF0;
+  tmp[2] = optlen >> 8;
+  tmp[3] = optlen & 0xFF;
+  tmp[4] = idlen >> 8;
+  tmp[5] = idlen & 0xFF;
+  tmp[6] = typelen >> 8;
+  tmp[7] = typelen & 0xFF;
+  tmp[8] = soap->dime.size >> 24;
+  tmp[9] = (soap->dime.size >> 16) & 0xFF;
+  tmp[10] = (soap->dime.size >> 8) & 0xFF;
+  tmp[11] = soap->dime.size & 0xFF;
+  if (soap_send_raw(soap, (char*)tmp, 12)
+   || soap_putdimefield(soap, soap->dime.options, optlen)
+   || soap_putdimefield(soap, soap->dime.id, idlen)
+   || soap_putdimefield(soap, soap->dime.type, typelen))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return SOAP_OK;
+  for (content = soap->dime.first; content; content = content->next)
+  { void *handle;
+    soap->dime.size = content->size;
+    soap->dime.id = content->id;
+    soap->dime.type = content->type;
+    soap->dime.options = content->options;
+    soap->dime.flags = SOAP_DIME_VERSION | SOAP_DIME_MEDIA;
+    if (soap->fdimereadopen && ((handle = soap->fdimereadopen(soap, (void*)content->ptr, content->id, content->type, content->options)) || soap->error))
+    { size_t size = content->size;
+      if (!handle)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadopen failed\n"));
+        return soap->error;
+      }
+      if (!content->size && ((soap->mode & SOAP_ENC_XML) || (soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_IO) == SOAP_IO_STORE))
+      { size_t chunksize = sizeof(soap->tmpbuf);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked streaming DIME\n"));
+        do 
+        { size = soap->fdimeread(soap, handle, soap->tmpbuf, chunksize);
+          DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread returned %lu bytes\n", (unsigned long)size));
+          if (size < chunksize)
+ 	  { soap->dime.flags &= ~SOAP_DIME_CF;
+            if (!content->next)
+              soap->dime.flags |= SOAP_DIME_ME;
+	  }
+          else
+            soap->dime.flags |= SOAP_DIME_CF;
+	  soap->dime.size = size;
+          if (soap_putdimehdr(soap)
+	   || soap_putdimefield(soap, soap->tmpbuf, size))
+            break;
+          if (soap->dime.id)
+ 	  { soap->dime.flags &= ~(SOAP_DIME_MB | SOAP_DIME_MEDIA);
+            soap->dime.id = NULL;
+            soap->dime.type = NULL;
+            soap->dime.options = NULL;
+          }  
+        } while (size >= chunksize);
+      }
+      else
+      { if (!content->next)
+          soap->dime.flags |= SOAP_DIME_ME;
+        if (soap_putdimehdr(soap))
+          return soap->error;
+        do
+        { size_t bufsize;
+	  if (size < sizeof(soap->tmpbuf))
+            bufsize = size;
+          else
+            bufsize = sizeof(soap->tmpbuf);
+          if (!(bufsize = soap->fdimeread(soap, handle, soap->tmpbuf, bufsize)))
+          { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread failed: insufficient data (%lu bytes remaining from %lu bytes)\n", (unsigned long)size, (unsigned long)soap->dime.size));
+            soap->error = SOAP_EOF;
+	    break;
+          }
+          if (soap_send_raw(soap, soap->tmpbuf, bufsize))
+            break;
+          size -= bufsize;
+        } while (size);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+        soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+      if (soap->fdimereadclose)
+        soap->fdimereadclose(soap, handle);
+    }
+    else
+    { if (!content->next)
+        soap->dime.flags |= SOAP_DIME_ME;
+      if (soap_putdimehdr(soap)
+       || soap_putdimefield(soap, (char*)content->ptr, content->size))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static char *
+soap_getdimefield(struct soap *soap, size_t n)
+{ register soap_wchar c;
+  register int i;
+  register char *s;
+  char *p = NULL;
+  if (n)
+  { p = (char*)soap_malloc(soap, n + 1);
+    if (p)
+    { s = p;
+      for (i = n; i > 0; i--)
+      { if ((int)(c = soap_get1(soap)) == EOF)
+        { soap->error = SOAP_EOF;
+          return NULL;
+        }
+        *s++ = (char)c;
+      }
+      *s = '\0';
+      if ((soap->error = soap_move(soap, -(long)n&3)))
+        return NULL;
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdimehdr(struct soap *soap)
+{ register soap_wchar c;
+  register char *s;
+  register int i;
+  unsigned char tmp[12];
+  size_t optlen, idlen, typelen;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return soap->error = SOAP_DIME_END;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME header\n"));
+  if (soap->dime.buflen || soap->dime.chunksize)
+  { if (soap_move(soap, (long)(soap->dime.size - soap_tell(soap))))
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, soap_getchar(soap)); /* skip padding and get hdr */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... From chunked\n"));
+    return SOAP_OK;
+  }
+  s = (char*)tmp;
+  for (i = 12; i > 0; i--)
+  { if ((int)(c = soap_getchar(soap)) == EOF)
+      return soap->error = SOAP_EOF;
+    *s++ = (char)c;
+  }
+  if ((tmp[0] & 0xF8) != SOAP_DIME_VERSION)
+    return soap->error = SOAP_DIME_MISMATCH;
+  soap->dime.flags = (tmp[0] & 0x7) | (tmp[1] & 0xF0);
+  optlen = (tmp[2] << 8) | tmp[3];
+  idlen = (tmp[4] << 8) | tmp[5];
+  typelen = (tmp[6] << 8) | tmp[7];
+  soap->dime.size = (tmp[8] << 24) | (tmp[9] << 16) | (tmp[10] << 8) | tmp[11];
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME size=%lu flags=0x%X\n", (unsigned long)soap->dime.size, soap->dime.flags));
+  if (!(soap->dime.options = soap_getdimefield(soap, optlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.id = soap_getdimefield(soap, idlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.type = soap_getdimefield(soap, typelen)) && soap->error)
+    return soap->error;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME id=%s, type=%s, options=%s\n", soap->dime.id?soap->dime.id:"", soap->dime.type?soap->dime.type:"", soap->dime.options?soap->dime.options+4:""));
+  if (soap->dime.flags & SOAP_DIME_ME)
+    soap->mode &= ~SOAP_ENC_DIME;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdime(struct soap *soap)
+{ while (soap->dime.flags & SOAP_DIME_CF)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap_move(soap, soap->dime.size))
+      return soap->error = SOAP_EOF;
+  }
+  if (soap_move(soap, ((soap->dime.size+3)&(~3))-soap_tell(soap)))
+    return soap->error = SOAP_EOF;
+  for (;;)
+  { register struct soap_multipart *content;
+    if (soap_getdimehdr(soap))
+      break;
+    if (soap->fdimewriteopen && ((soap->dime.ptr = (char*)soap->fdimewriteopen(soap, soap->dime.id, soap->dime.type, soap->dime.options)) || soap->error))
+    { const char *id, *type, *options;
+      size_t size, n;
+      if (!soap->dime.ptr)
+        return soap->error;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      for (;;)
+      { size = soap->dime.size;
+        for (;;)
+        { n = soap->buflen - soap->bufidx;
+          if (size < n)
+            n = size;
+          if ((soap->error = soap->fdimewrite(soap, (void*)soap->dime.ptr, soap->buf + soap->bufidx, n)))
+            break;
+	  size -= n;
+	  if (!size)
+	  { soap->bufidx += n;
+	    break;
+	  }
+	  if (soap_recv(soap))
+          { soap->error = SOAP_EOF;
+	    goto end;
+          }
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+        { soap->error = SOAP_EOF;
+	  break;
+        }
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          break;
+      }
+end:
+      if (soap->fdimewriteclose)
+        soap->fdimewriteclose(soap, (void*)soap->dime.ptr);
+      soap->dime.size = 0;
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else if (soap->dime.flags & SOAP_DIME_CF)
+    { const char *id, *type, *options;
+      register soap_wchar c;
+      register char *s;
+      register int i;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      if (soap_new_block(soap))
+        return SOAP_EOM;
+      for (;;)
+      { s = (char*)soap_push_block(soap, soap->dime.size);
+        if (!s)
+          return soap->error = SOAP_EOM;
+        for (i = soap->dime.size; i > 0; i--)
+        { if ((int)(c = soap_get1(soap)) == EOF)
+            return soap->error = SOAP_EOF;
+          *s++ = (char)c;
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+          return soap->error = SOAP_EOF;
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          return soap->error;
+      }
+      soap->dime.size = soap->blist->size++; /* allocate one more for '\0' */
+      if (!(soap->dime.ptr = soap_save_block(soap, NULL, 0)))
+        return soap->error;
+      soap->dime.ptr[soap->dime.size] = '\0'; /* force 0-terminated */
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else
+      soap->dime.ptr = soap_getdimefield(soap, soap->dime.size);
+    content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, soap->dime.ptr, soap->dime.size);
+    if (!content)
+      return soap->error = SOAP_EOM;
+    content->id = soap->dime.id;
+    content->type = soap->dime.type;
+    content->options = soap->dime.options;
+    soap_resolve_attachment(soap, content);
+    if (soap->error)
+      return soap->error;
+  }
+  if (soap->error != SOAP_DIME_END)
+    return soap->error;
+  return soap->error = SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmimehdr(struct soap *soap)
+{ struct soap_multipart *content;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  while (!*soap->msgbuf);
+  if (soap->msgbuf[0] == '-' && soap->msgbuf[1] == '-')
+  { char *s = soap->msgbuf + strlen(soap->msgbuf) - 1;
+    /* remove white space */
+    while (soap_blank(*s))
+      s--;
+    s[1] = '\0';
+    if (soap->mime.boundary)
+    { if (strcmp(soap->msgbuf + 2, soap->mime.boundary))
+        return soap->error = SOAP_MIME_ERROR;
+    }
+    else
+      soap->mime.boundary = soap_strdup(soap, soap->msgbuf + 2);
+    if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  if (soap_set_mime_attachment(soap, NULL, 0, SOAP_MIME_NONE, NULL, NULL, NULL, NULL))
+    return soap->error = SOAP_EOM;
+  content = soap->mime.last;
+  for (;;)
+  { register char *key = soap->msgbuf;
+    register char *val;
+    if (!*key)
+      break;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "MIME header: %s\n", key));
+    val = strchr(soap->msgbuf, ':');
+    if (val)
+    { *val = '\0';
+      do val++;
+      while (*val && *val <= 32);
+      if (!soap_tag_cmp(key, "Content-ID"))
+        content->id = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Location"))
+        content->location = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Disposition"))
+        content->id = soap_strdup(soap, soap_get_header_attribute(soap, val, "name"));
+      else if (!soap_tag_cmp(key, "Content-Type"))
+        content->type = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Description"))
+        content->description = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Transfer-Encoding"))
+        content->encoding = (enum soap_mime_encoding)soap_int_code(mime_codes, val, (long)SOAP_MIME_NONE);
+    }
+    if (soap_getline(soap, key, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmime(struct soap *soap)
+{ register soap_wchar c = 0;
+  if (!soap->mime.last)
+    return SOAP_OK;
+  for (;;)
+  { register size_t i, m = 0;
+    register char *s, *t = NULL;
+    struct soap_multipart *content = soap->mime.last;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Parsing MIME content id=%s type=%s\n", content->id?content->id:"", content->type?content->type:""));
+    if (soap_new_block(soap))
+      return soap->error = SOAP_EOM;
+    for (;;)
+    { register short flag = 0;
+      if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+        return soap->error = SOAP_EOM;
+      for (i = 0; i < SOAP_BLKLEN; i++)
+      { if (m > 0)
+        { *s++ = *t++;
+	  m--;
+	}
+	else
+        { if (!flag)
+	  { c = soap_get1(soap);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	  }
+	  if (flag || c == '\r')
+	  { t = soap->tmpbuf;
+	    memset(t, 0, sizeof(soap->tmpbuf));
+            strcpy(t, "\n--");
+            if (soap->mime.boundary)
+	      strncat(t, soap->mime.boundary, sizeof(soap->tmpbuf)-4);
+	    do c = soap_getchar(soap);
+	    while (c == *t++);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	    if (!*--t)
+	      goto end;
+	    *t = (char)c;
+	    flag = (c == '\r');
+	    m = t - soap->tmpbuf + 1 - flag;
+	    t = soap->tmpbuf;
+	    c = '\r';
+	  }
+	  *s++ = (char)c;
+        }
+      }
+    }
+end:
+    *s = '\0'; /* force 0-terminated */
+    content->size = soap_size_block(soap, i+1)-1;
+    content->ptr = soap_save_block(soap, NULL, 0);
+    soap_resolve_attachment(soap, content);
+    if (c == '-' && soap_getchar(soap) == '-')
+      break;
+    while (c != '\r' && (int)c != EOF && soap_blank(c))
+      c = soap_getchar(soap);
+    if (c != '\r' || soap_getchar(soap) != '\n')
+      return soap->error = SOAP_MIME_ERROR;
+    if (soap_getmimehdr(soap))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_match_cid(struct soap *soap, const char *s, const char *t)
+{ register size_t n;
+  if (!s)
+    return 1;
+  if (!strcmp(s, t))
+    return 0;
+  if (!strncmp(s, "cid:", 4))
+    s += 4;
+  n = strlen(t);
+  if (*t == '<')
+  { t++;
+    n -= 2;
+  }
+  if (!strncmp(s, t, n) && !s[n])
+    return 0;
+  soap_decode(soap->tmpbuf, sizeof(soap->tmpbuf), s, SOAP_STR_EOS);
+  if (!strncmp(soap->tmpbuf, t, n) && !soap->tmpbuf[n])
+    return 0;
+  return 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_resolve_attachment(struct soap *soap, struct soap_multipart *content)
+{ if (content->id)
+  { register struct soap_xlist **xp = &soap->xlist;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving attachment data for id=%s\n", content->id));
+    while (*xp)
+    { register struct soap_xlist *xq = *xp;
+      if (!soap_match_cid(soap, xq->id, content->id))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Found matching attachment %s for content id=%s\n", xq->id, content->id));
+	*xp = xq->next;
+        *xq->ptr = (unsigned char*)content->ptr;
+        *xq->size = (int)content->size;
+        *xq->type = (char*)content->type;
+	if (content->options)
+          *xq->options = (char*)content->options;
+        else
+          *xq->options = (char*)content->description;
+	SOAP_FREE(soap, xq);
+      }
+      else
+        xp = &(*xp)->next;
+    }
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmimehdr(struct soap *soap, struct soap_multipart *content)
+{ const char *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "MIME attachment type=%s\n", content->type?content->type:""));
+  if (soap_send3(soap, "\r\n--", soap->mime.boundary, "\r\n"))
+    return soap->error;
+  if (content->type && soap_send3(soap, "Content-Type: ", content->type, "\r\n"))
+    return soap->error;
+  s = soap_str_code(mime_codes, content->encoding);
+  if (s && soap_send3(soap, "Content-Transfer-Encoding: ", s, "\r\n"))
+    return soap->error;
+  if (content->id && soap_send3(soap, "Content-ID: ", content->id, "\r\n"))
+    return soap->error;
+  if (content->location && soap_send3(soap, "Content-Location: ", content->location, "\r\n"))
+    return soap->error;
+  if (content->description && soap_send3(soap, "Content-Description: ", content->description, "\r\n"))
+    return soap->error;
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_MIME) || !soap->mime.boundary)
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending MIME attachments\n"));
+  for (content = soap->mime.first; content; content = content->next)
+    if (soap_putmimehdr(soap, content)
+     || soap_send_raw(soap, content->ptr, content->size))
+      return soap->error;
+  return soap_send3(soap, "\r\n--", soap->mime.boundary, "--");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_dime(struct soap *soap)
+{ soap->omode |= SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_mime(struct soap *soap, const char *boundary, const char *start)
+{ soap->omode |= SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = soap_strdup(soap, boundary);
+  soap->mime.start = soap_strdup(soap, start);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_dime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_mime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart*
+soap_new_multipart(struct soap *soap, struct soap_multipart **first, struct soap_multipart **last, char *ptr, size_t size)
+{ struct soap_multipart *content;
+  content = (struct soap_multipart*)soap_malloc(soap, sizeof(struct soap_multipart));
+  if (content)
+  { content->next = NULL;
+    content->ptr = ptr;
+    content->size = size;
+    content->id = NULL;
+    content->type = NULL;
+    content->options = NULL;
+    content->encoding = SOAP_MIME_NONE;
+    content->location = NULL;
+    content->description = NULL;
+    if (!*first)
+      *first = content;
+    if (*last)
+      (*last)->next = content;
+    *last = content;
+  }
+  return content;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_dime_attachment(struct soap *soap, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->options = soap_dime_option(soap, optype, option);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_mime_attachment(struct soap *soap, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->encoding = encoding;
+  content->location = soap_strdup(soap, location);
+  content->description = soap_strdup(soap, description);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap_multipart*
+SOAP_FMAC2
+soap_next_multipart(struct soap_multipart *content)
+{ if (content)
+    return content->next;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_select_mime_boundary(struct soap *soap)
+{ while (!soap->mime.boundary || soap_valid_mime_boundary(soap))
+  { register char *s = soap->mime.boundary;
+    register size_t n = 0;
+    if (s)
+      n = strlen(s);
+    if (n < 16)
+    { n = 64;
+      s = soap->mime.boundary = (char*)soap_malloc(soap, n + 1);
+      if (!s)
+        return;
+    }
+    strcpy(s, "==");
+    s += 2;
+    n -= 4;
+    while (n)
+    { *s++ = soap_base64o[soap_random & 0x3F];
+      n--;
+    }
+    strcpy(s, "==");
+  }
+  if (!soap->mime.start)
+    soap->mime.start = "<SOAP-ENV:Envelope>";
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_valid_mime_boundary(struct soap *soap)
+{ register struct soap_multipart *content;
+  register size_t k = strlen(soap->mime.boundary);
+  for (content = soap->mime.first; content; content = content->next)
+  { if (content->ptr && content->size >= k)
+    { register const char *p = (const char*)content->ptr; 
+      register size_t i;
+      for (i = 0; i < content->size - k; i++, p++)
+        if (!strncmp(p, soap->mime.boundary, k))
+          return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	HTTP cookie handling
+ *
+\******************************************************************************/
+
+#ifdef WITH_COOKIES
+/******************************************************************************/
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_encode_cookie(const char *s, char *t, size_t len)
+{ register int c;
+  register size_t n = len;
+  while ((c = *s++) && --n > 0)
+  { if (c > ' ' && c < 128 && !strchr("()<>@,;:\\\"/[]?={}", c))
+      *t++ = c;
+    else if (n > 2)
+    { *t++ = '%';
+      *t++ = (c >> 4) + (c > 159 ? '7' : '0');
+      c &= 0xF;
+      *t++ = c + (c > 9 ? '7' : '0');
+      n -= 2;
+    }
+    else
+      break;
+  }
+  *t = '\0';
+  return len - n;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  size_t n;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (*path == '/')
+    path++;
+  n = strlen(path);
+  for (p = soap->cookies; p; p = p->next)
+    if (!strcmp(p->name, name)
+     && domain
+     && p->domain
+     && !strcmp(p->domain, domain)
+     && !strncmp(p->path, path, n))
+      break;
+  return p;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_set_cookie(struct soap *soap, const char *name, const char *value, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  int n;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set cookie: %s=%s domain=%s path=%s\n", name, value?value:"", domain?domain:"", path?path:""));
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return NULL;
+  }
+  if (*path == '/')
+    path++;
+  q = soap_cookie(soap, name, domain, path);
+  if (!q)
+  { if ((q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+    { if ((q->name = (char*)SOAP_MALLOC(soap, strlen(name)+1)))
+        strcpy(q->name, name);
+      q->value = NULL;
+      q->domain = NULL;
+      q->path = NULL;
+      q->expire = -1;
+      q->version = 0;
+      q->secure = 0;
+      q->modified = 0;
+      for (p = &soap->cookies, n = soap->cookie_max; *p && n; p = &(*p)->next, n--)
+        if (!strcmp((*p)->name, name) && (*p)->path && strcmp((*p)->path, path) < 0)
+          break;
+      if (n)
+      { q->next = *p;
+        *p = q;
+      }
+      else
+      { SOAP_FREE(soap, q->name);
+        SOAP_FREE(soap, q);
+        q = NULL;
+      }
+    }
+  }
+  else
+    q->modified = 1;
+  if (q)
+  { if (q->value)
+    { SOAP_FREE(soap, q->value);
+      q->value = NULL;
+    }
+    if (q->domain)
+    { SOAP_FREE(soap, q->domain);
+      q->domain = NULL;
+    }
+    if (q->path)
+    { SOAP_FREE(soap, q->path);
+      q->path = NULL;
+    }
+    if (value && *value && (q->value = (char*)SOAP_MALLOC(soap, strlen(value)+1)))
+      strcpy(q->value, value);
+    if (domain && *domain && (q->domain = (char*)SOAP_MALLOC(soap, strlen(domain)+1)))
+      strcpy(q->domain, domain);
+    if (path && *path && (q->path = (char*)SOAP_MALLOC(soap, strlen(path)+1)))
+      strcpy(q->path, path);
+    q->session = 1;
+    q->env = 0;
+  }
+  return q;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!domain)
+  { soap_set_receiver_error(soap, "Cookie domain not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (*path == '/')
+    path++;
+  for (p = &soap->cookies, q = *p; q; q = *p)
+    if (!strcmp(q->name, name) && !strcmp(q->domain, domain) && !strncmp(q->path, path, strlen(q->path)))
+    { if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+      p = &q->next;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_env_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)) && p->env)
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_cookie_expire(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->expire;
+  return -1;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_expire(struct soap *soap, const char *name, long expire, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->expire = expire;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 1;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_clr_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 0;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putsetcookies(struct soap *soap)
+{ struct soap_cookie *p;
+  char *s, tmp[4096];
+  const char *t;
+  for (p = soap->cookies; p; p = p->next)
+  { if (p->modified || !p->env)
+    { s = tmp;
+      if (p->name)
+        s += soap_encode_cookie(p->name, s, tmp-s+4064);
+      if (p->value && *p->value)
+      { *s++ = '=';
+        s += soap_encode_cookie(p->value, s, tmp-s+4064);
+      }
+      if (p->domain && (int)strlen(p->domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", p->domain);
+      else if (soap->cookie_domain && (int)strlen(soap->cookie_domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", soap->cookie_domain);
+      strcat(s, ";Path=\"/");
+      if (p->path)
+        t = p->path;
+      else
+        t = soap->cookie_path;
+      if (t)
+      { if (*t == '/')
+          t++;
+        if ((int)strlen(t) < tmp-s+4064)
+          strcat(s, t);
+      }
+      s += strlen(s);
+      *s++ = '"';
+      if (p->version > 0)
+        sprintf(s, ";Version=%u", p->version);
+      if (p->expire >= 0)
+        sprintf(s, ";Max-Age=%ld", p->expire);
+      if (p->secure)
+        strcat(s, ";Secure");
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set-Cookie: %s\n", tmp));
+      if ((soap->error = soap->fposthdr(soap, "Set-Cookie", tmp)))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putcookies(struct soap *soap, const char *domain, const char *path, int secure)
+{ struct soap_cookie **p, *q;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  char *s, tmp[4096];
+  p = &soap->cookies;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending cookies for domain=%s path=%s\n", domain, path));
+  if (*path == '/')
+    path++;
+  while ((q = *p))
+  { if (q->expire && now > q->expire)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie %s expired\n", q->name));
+      SOAP_FREE(soap, q->name);
+      if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+    { size_t domlen = 0;
+      if (q->domain)
+      { const char *s = strchr(q->domain, ':');
+        if (s)
+	  domlen = s - q->domain;
+	else
+          domlen = strlen(q->domain);
+      }
+      if ((!q->domain || !strncmp(q->domain, domain, domlen))
+          && (!q->path || !strncmp(q->path, path, strlen(q->path)))
+          && (!q->secure || secure))
+      { s = tmp;
+        if (q->version != version)
+        { sprintf(s, "$Version=%u;", q->version);
+          version = q->version;
+        }
+        if (q->name)
+          s += soap_encode_cookie(q->name, s, tmp-s+4080);
+        if (q->value && *q->value)
+        { *s++ = '=';
+          s += soap_encode_cookie(q->value, s, tmp-s+4080);
+        }
+        if (q->path && (int)strlen(q->path) < tmp-s+4080)
+        { sprintf(s, ";$Path=\"/%s\"", (*q->path == '/' ? q->path + 1 : q->path));
+          s += strlen(s);
+        }
+        if (q->domain && (int)strlen(q->domain) < tmp-s+4080)
+          sprintf(s, ";$Domain=\"%s\"", q->domain);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie: %s\n", tmp));
+        if ((soap->error = soap->fposthdr(soap, "Cookie", tmp)))
+          return soap->error;
+      }
+      p = &q->next;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_getcookies(struct soap *soap, const char *val)
+{ struct soap_cookie *p = NULL, *q;
+  const char *s;
+  char *t, tmp[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  char *domain = NULL;
+  char *path = NULL;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  if (!val)
+    return;
+  s = val;
+  while (*s)
+  { s = soap_decode_key(tmp, sizeof(tmp), s);
+    if (!soap_tag_cmp(tmp, "$Version"))
+    { if ((s = soap_decode_val(tmp, sizeof(tmp), s)))
+      { if (p)
+          p->version = (int)atol(tmp);
+        else
+          version = (int)atol(tmp);
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Path"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->path)
+          SOAP_FREE(soap, p->path);
+        p->path = t;
+      }
+      else
+      { if (path)
+          SOAP_FREE(soap, path);
+        path = t;
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Domain"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->domain)
+          SOAP_FREE(soap, p->domain);
+	p->domain = t;
+      }
+      else
+      { if (domain)
+          SOAP_FREE(soap, domain);
+        domain = t;
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Path"))
+    { if (p->path)
+        SOAP_FREE(soap, p->path);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->path = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->path, tmp);
+      }
+      else
+        p->path = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Domain"))
+    { if (p->domain)
+        SOAP_FREE(soap, p->domain);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->domain = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->domain, tmp);
+      }
+      else
+        p->domain = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Version"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->version = (unsigned int)atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Max-Age"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->expire = now + atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Expires"))
+    { struct tm T;
+      char a[3]; 
+      static const char mns[] = "anebarprayunulugepctovec";
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (strlen(tmp) > 20)
+      { memset((void*)&T, 0, sizeof(T));
+        a[0] = tmp[4];
+        a[1] = tmp[5];
+        a[2] = '\0';
+        T.tm_mday = (int)atol(a);
+        a[0] = tmp[8];
+        a[1] = tmp[9];
+        T.tm_mon = (strstr(mns, a) - mns) / 2;
+        a[0] = tmp[11];
+        a[1] = tmp[12];
+        T.tm_year = 100 + (int)atol(a);
+        a[0] = tmp[13];
+        a[1] = tmp[14];
+        T.tm_hour = (int)atol(a);
+        a[0] = tmp[16];
+        a[1] = tmp[17];
+        T.tm_min = (int)atol(a);
+        a[0] = tmp[19];
+        a[1] = tmp[20];
+        T.tm_sec = (int)atol(a);
+        p->expire = soap_timegm(&T);
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Secure"))
+      p->secure = 1;
+    else
+    { if (p)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+        if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+        { q->version = p->version;
+          q->expire = p->expire;
+          q->secure = p->secure;
+          q->env = 1;
+        }
+        if (p->name)
+          SOAP_FREE(soap, p->name);
+        if (p->value)
+          SOAP_FREE(soap, p->value);
+        if (p->domain)
+          SOAP_FREE(soap, p->domain);
+        if (p->path)
+          SOAP_FREE(soap, p->path);
+        SOAP_FREE(soap, p);
+      }
+      if ((p = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      { p->name = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+        strcpy(p->name, tmp);
+        s = soap_decode_val(tmp, sizeof(tmp), s);
+        if (*tmp)
+        { p->value = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+          strcpy(p->value, tmp);
+        }
+        else
+          p->value = NULL;
+        p->domain = domain;
+        p->path = path;
+        p->expire = 0;
+        p->secure = 0;
+        p->version = version;
+      }
+    }
+  }
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+    if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+    { q->version = p->version;
+      q->expire = p->expire;
+      q->secure = p->secure;
+      q->env = 1;
+    }
+    if (p->name)
+      SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+  if (domain)
+    SOAP_FREE(soap, domain);
+  if (path)
+    SOAP_FREE(soap, path);
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getenv_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  const char *s;
+  char key[4096], val[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  if (!(s = getenv("HTTP_COOKIE")))
+    return SOAP_ERR;
+  do
+  { s = soap_decode_key(key, sizeof(key), s);
+    s = soap_decode_val(val, sizeof(val), s);
+    p = soap_set_cookie(soap, key, val, NULL, NULL);
+    if (p)
+      p->env = 1;
+  } while (*s);
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_copy_cookies(struct soap *soap)
+{ struct soap_cookie *p, **q, *r;
+  q = &r;
+  for (p = soap->cookies; p; p = p->next)
+  { if (!(*q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      return r;
+    **q = *p;
+    if (p->name)
+    { if (((*q)->name = (char*)SOAP_MALLOC(soap, strlen(p->name)+1)))
+        strcpy((*q)->name, p->name);
+    }
+    if (p->value)
+    { if (((*q)->value = (char*)SOAP_MALLOC(soap, strlen(p->value)+1)))
+        strcpy((*q)->value, p->value);
+    }
+    if (p->domain)
+    { if (((*q)->domain = (char*)SOAP_MALLOC(soap, strlen(p->domain)+1)))
+        strcpy((*q)->domain, p->domain);
+    }
+    if (p->path)
+    { if (((*q)->path = (char*)SOAP_MALLOC(soap, strlen(p->path)+1)))
+        strcpy((*q)->path, p->path);
+    }
+    q = &(*q)->next;
+  }
+  *q = NULL;
+  return r;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  for (p = soap->cookies; p; p = soap->cookies)
+  { soap->cookies = p->next;
+    SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+}
+
+/******************************************************************************/
+#endif /* WITH_COOKIES */
+
+/******************************************************************************/
+#ifdef WITH_GZIP
+#ifndef PALM_1
+static int
+soap_getgziphdr(struct soap *soap)
+{ int i;
+  soap_wchar c, f = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get gzip header\n"));
+  for (i = 0; i < 9; i++)
+  { if ((int)(c = soap_get1(soap) == EOF))
+      return soap->error = SOAP_EOF;
+    if (i == 2)
+      f = c;
+  }
+  if (f & 0x04) /* FEXTRA */
+  { for (i = soap_get1(soap) | (soap_get1(soap) << 8); i; i--)
+      if ((int)soap_get1(soap) == EOF)
+        return soap->error = SOAP_EOF;
+  }
+  if (f & 0x08) /* FNAME */
+    do
+      c = soap_get1(soap);
+    while (c && (int)c != EOF);
+  if ((int)c != EOF && (f & 0x10)) /* FCOMMENT */
+    do
+      c = soap_get1(soap);
+    while (c && (int)f != EOF);
+  if ((int)c != EOF && (f & 0x01)) /* FHCRC */
+  { if ((int)(c = soap_get1(soap)) != EOF)
+      c = soap_get1(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_recv(struct soap *soap)
+{ soap_wchar c;
+  soap->error = SOAP_OK;
+  soap_free(soap);
+  soap_set_local_namespaces(soap);
+  soap->version = 0;	/* don't assume we're parsing SOAP content by default */
+#ifndef WITH_NOIDREF
+  soap_free_iht(soap);
+#endif
+  if ((soap->imode & SOAP_IO) == SOAP_IO_CHUNK)
+    soap->omode |= SOAP_IO_CHUNK;
+  soap->imode &= ~SOAP_IO;
+  soap->mode = soap->imode;
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  soap->ahead = 0;
+  soap->peeked = 0;
+  soap->level = 0;
+  soap->part = SOAP_BEGIN;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  *soap->endpoint = '\0';
+  soap->action = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket))
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->recvfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->recvfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#ifdef WITH_ZLIB
+  soap->mode &= ~SOAP_ENC_ZLIB;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.next_in = Z_NULL;
+  soap->d_stream.avail_in = 0;
+  soap->d_stream.next_out = (Byte*)soap->buf;
+  soap->d_stream.avail_out = SOAP_BUFLEN;
+  soap->z_ratio_in = 1.0;
+#endif
+#ifndef WITH_LEANER
+  if (soap->fprepareinit)
+    soap->fprepareinit(soap);
+#endif
+  c = soap_getchar(soap);
+#ifdef WITH_GZIP
+  if (c == 0x1F)
+  { if (soap_getgziphdr(soap))
+      return soap->error;
+    if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+    soap->zlib_state = SOAP_ZLIB_INFLATE;
+    soap->mode |= SOAP_ENC_ZLIB;
+    soap->zlib_in = SOAP_ZLIB_GZIP;
+    soap->z_crc = crc32(0L, NULL, 0);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    /* should not chunk over plain transport, so why bother to check? */
+    /* if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) */
+    /*   soap->z_buflen = soap->bufidx; */
+    /* else */
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+    soap->z_buflen = soap->buflen;
+    soap->buflen = soap->bufidx;
+    c = soap_getchar(soap);
+  }  
+#endif
+#ifndef WITH_LEANER
+  if (c == '-' && soap_get0(soap) == '-')
+    soap->mode |= SOAP_ENC_MIME;
+  else if ((c & 0xFFFC) == (SOAP_DIME_VERSION | SOAP_DIME_MB) && (soap_get0(soap) & 0xFFF0) == 0x20)
+    soap->mode |= SOAP_ENC_DIME;
+  else
+#endif
+  { while (soap_blank(c))
+      c = soap_getchar(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  soap_unget(soap, c);
+#ifndef WITH_NOHTTP
+  /* if not XML or (start of)BOM or MIME/DIME/ZLIB, assume HTTP header */
+  if (c != '<' && c != 0xEF && !(soap->mode & (SOAP_ENC_MIME | SOAP_ENC_DIME | SOAP_ENC_ZLIB)))
+  { soap->mode &= ~SOAP_IO;
+    soap->error = soap->fparse(soap);
+    if (soap->error && soap->error < SOAP_STOP)
+    { soap->keep_alive = 0; /* force close later */
+      return soap->error;
+    }
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { soap->chunkbuflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+      soap->chunksize = 0;
+    }
+#ifndef WITH_LEANER
+    else if (soap->fpreparerecv && soap->buflen != soap->bufidx)
+      soap->fpreparerecv(soap, soap->buf + soap->bufidx, soap->buflen - soap->bufidx);
+#endif
+#ifdef WITH_ZLIB
+    if (soap->zlib_in != SOAP_ZLIB_NONE)
+    { /* fparse should not use soap_unget to push back last char */
+#ifdef WITH_GZIP
+      c = soap_get1(soap);
+      if (c == 0x1F)
+      { if (soap_getgziphdr(soap))
+          return soap->error;
+        if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        soap->z_crc = crc32(0L, NULL, 0);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+      }
+      else
+      { soap_revget1(soap);
+#else
+      {
+#endif
+        if (inflateInit(&soap->d_stream) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate initialized\n"));
+      }
+      soap->mode |= SOAP_ENC_ZLIB;
+      memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+      soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+      soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+    }
+#endif
+    if (soap->error)
+    { if (soap->error == SOAP_FORM && soap->fform)
+      { soap->error = soap->fform(soap);
+        if (soap->error == SOAP_OK)
+          soap->error = SOAP_STOP; /* prevents further processing */
+      }
+      return soap->error;
+    }
+  }
+#endif
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_MIME)
+  { if (soap_getmimehdr(soap))
+      return soap->error;
+    if (soap_get_header_attribute(soap, soap->mime.first->type, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+  }
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap->dime.flags & SOAP_DIME_CF)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked DIME SOAP message\n"));
+      soap->dime.chunksize = soap->dime.size;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+    }
+    soap->count = soap->buflen - soap->bufidx;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse(struct soap *soap)
+{ char header[SOAP_HDRLEN], *s;
+  unsigned short get = 0, status = 0, k = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Waiting for HTTP request/response...\n"));
+  *soap->endpoint = '\0';
+  soap->length = 0;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->action = NULL;
+  soap->authrealm = NULL;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP status: %s\n", soap->msgbuf));
+    for (;;)
+    { if (soap_getline(soap, header, SOAP_HDRLEN))
+      { if (soap->error == SOAP_EOF)
+	{ soap->error = SOAP_OK;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "EOF in HTTP header, continue anyway\n"));
+	  break;
+	}
+        return soap->error;
+      }
+      if (!*header)
+        break;
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP header: %s\n", header));
+      s = strchr(header, ':');
+      if (s)
+      { *s = '\0';
+        do s++;
+        while (*s && *s <= 32);
+        if ((soap->error = soap->fparsehdr(soap, header, s)))
+        { if (soap->error < SOAP_STOP)
+	    return soap->error;
+	  status = soap->error;
+	  soap->error = SOAP_OK;
+        }
+      }
+    }
+    if ((s = strchr(soap->msgbuf, ' ')))
+    { k = (unsigned short)soap_strtoul(s, &s, 10);
+      if (!soap_blank(*s))
+        k = 0;
+    }
+    else
+      k = 0;
+  } while (k == 100);
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Finished HTTP header parsing\n"));
+  s = strstr(soap->msgbuf, "HTTP/");
+  if (s && s[7] != '1')
+  { if (soap->keep_alive == 1)
+      soap->keep_alive = 0;
+    if (k == 0 && (soap->omode & SOAP_IO) == SOAP_IO_CHUNK) /* k == 0 for HTTP request */
+    { soap->imode |= SOAP_IO_CHUNK;
+      soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE;
+    }
+  }
+  if (soap->keep_alive < 0)
+    soap->keep_alive = 1;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Keep alive connection = %d\n", soap->keep_alive));
+  if (s && (((get = !strncmp(soap->msgbuf, "GET ", 4))) || !strncmp(soap->msgbuf, "POST ", 5)))
+  { size_t m = strlen(soap->endpoint);
+    size_t n = m + (s - soap->msgbuf) - 5 - (!get);
+    if (n >= sizeof(soap->endpoint))
+      n = sizeof(soap->endpoint) - 1;
+    strncpy(soap->path, soap->msgbuf + 4 + (!get), n - m);
+    soap->path[n - m] = '\0';
+    strcat(soap->endpoint, soap->path);
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Target endpoint='%s'\n", soap->endpoint));
+    if (get)
+    { soap->error = soap->fget(soap);
+      if (soap->error == SOAP_OK)
+        soap->error = SOAP_STOP; /* prevents further processing */
+      return soap->error;
+    }
+    if (status)
+      return soap->error = status;
+    return SOAP_OK;
+  }
+  if (k == 0 || (k >= 200 && k <= 299) || k == 400 || k == 500)
+    return SOAP_OK;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP error %d\n", k));
+  return soap_set_receiver_error(soap, "HTTP error", soap->msgbuf, k);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse_header(struct soap *soap, const char *key, const char *val)
+{ if (!soap_tag_cmp(key, "Host"))
+  { 
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+      strcpy(soap->endpoint, "https://");
+    else
+#endif
+      strcpy(soap->endpoint, "http://");
+    strncat(soap->endpoint, val, sizeof(soap->endpoint) - 8);
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifndef WITH_LEANER
+  else if (!soap_tag_cmp(key, "Content-Type"))
+  { if (soap_get_header_attribute(soap, val, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+    else if (soap_get_header_attribute(soap, val, "multipart/related")
+          || soap_get_header_attribute(soap, val, "multipart/form-data"))
+    { soap->mime.boundary = soap_strdup(soap, soap_get_header_attribute(soap, val, "boundary"));
+      soap->mime.start = soap_strdup(soap, soap_get_header_attribute(soap, val, "start"));
+      soap->mode |= SOAP_ENC_MIME;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Content-Length"))
+    soap->length = soap_strtoul(val, NULL, 10);
+  else if (!soap_tag_cmp(key, "Content-Encoding"))
+  { if (!soap_tag_cmp(val, "deflate"))
+#ifdef WITH_ZLIB
+      soap->zlib_in = SOAP_ZLIB_DEFLATE;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+    else if (!soap_tag_cmp(val, "gzip"))
+#ifdef WITH_GZIP
+      soap->zlib_in = SOAP_ZLIB_GZIP;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+  }
+#ifdef WITH_ZLIB
+  else if (!soap_tag_cmp(key, "Accept-Encoding"))
+  {
+#ifdef WITH_GZIP
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "gzip"))
+      soap->zlib_out = SOAP_ZLIB_GZIP;
+    else
+#endif
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "deflate"))
+      soap->zlib_out = SOAP_ZLIB_DEFLATE;
+    else
+      soap->zlib_out = SOAP_ZLIB_NONE;
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Transfer-Encoding"))
+  { soap->mode &= ~SOAP_IO;
+    if (!soap_tag_cmp(val, "chunked"))
+      soap->mode |= SOAP_IO_CHUNK;
+  }
+  else if (!soap_tag_cmp(key, "Connection"))
+  { if (!soap_tag_cmp(val, "keep-alive"))
+      soap->keep_alive = -soap->keep_alive;
+    else if (!soap_tag_cmp(val, "close"))
+      soap->keep_alive = 0;
+  }
+#ifndef WITH_LEAN
+  else if (!soap_tag_cmp(key, "Authorization"))
+  { if (!soap_tag_cmp(val, "Basic *"))
+    { int n;
+      char *s;
+      soap_base642s(soap, val + 6, soap->tmpbuf, sizeof(soap->tmpbuf) - 1, &n);
+      soap->tmpbuf[n] = '\0';
+      if ((s = strchr(soap->tmpbuf, ':')))
+      { *s = '\0';
+	soap->userid = soap_strdup(soap, soap->tmpbuf);
+	soap->passwd = soap_strdup(soap, s + 1);
+      }
+    }
+  }
+  else if (!soap_tag_cmp(key, "WWW-Authenticate"))
+    soap->authrealm = soap_strdup(soap, soap_get_header_attribute(soap, val + 6, "realm"));
+  else if (!soap_tag_cmp(key, "Expect"))
+  { if (!soap_tag_cmp(val, "100-continue"))
+    { if ((soap->error = soap->fposthdr(soap, "HTTP/1.1 100 Continue", NULL))
+       || (soap->error = soap->fposthdr(soap, NULL, NULL)))
+        return soap->error;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "SOAPAction"))
+  { if (*val == '"')
+    { soap->action = soap_strdup(soap, val + 1);
+      soap->action[strlen(soap->action) - 1] = '\0';
+    }
+  }
+  else if (!soap_tag_cmp(key, "Location"))
+  { strncpy(soap->endpoint, val, sizeof(soap->endpoint));
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifdef WITH_COOKIES
+  else if (!soap_tag_cmp(key, "Cookie") || !soap_tag_cmp(key, "Set-Cookie"))
+    soap_getcookies(soap, val);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_get_header_attribute(struct soap *soap, const char *line, const char *key)
+{ register const char *s = line;
+  if (s)
+  { while (*s)
+    { register short flag;
+      s = soap_decode_key(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      flag = soap_tag_cmp(soap->tmpbuf, key);
+      s = soap_decode_val(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      if (!flag)
+        return soap->tmpbuf;
+    }
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_key(char *buf, size_t len, const char *val)
+{ return soap_decode(buf, len, val, "=,;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_val(char *buf, size_t len, const char *val)
+{ if (*val != '=')
+  { *buf = '\0';
+    return val;
+  }
+  return soap_decode(buf, len, val + 1, ",;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char*
+soap_decode(char *buf, size_t len, const char *val, const char *sep)
+{ const char *s;
+  char *t = buf;
+  for (s = val; *s; s++)
+    if (*s != ' ' && *s != '\t' && !strchr(sep, *s))
+      break;
+  if (*s == '"')
+  { s++;
+    while (*s && *s != '"' && --len)
+      *t++ = *s++;
+  }
+  else
+  { while (soap_notblank(*s) && !strchr(sep, *s) && --len)
+    { if (*s == '%')
+      { *t++ = ((s[1] >= 'A' ? (s[1] & 0x7) + 9 : s[1] - '0') << 4)
+              + (s[2] >= 'A' ? (s[2] & 0x7) + 9 : s[2] - '0');
+        s += 3;
+      }
+      else
+        *t++ = *s++;
+    }
+  }
+  *t = '\0';
+  while (*s && !strchr(sep, *s))
+    s++;
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_out(struct soap *soap)
+{
+#ifndef WITH_LEANER
+  size_t n = 0;
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->mime.start)
+  { const char *s;
+    if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+      s = "application/dime";
+    else if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+    sprintf(soap->tmpbuf, "--%s\r\nContent-Type: %s\r\nContent-Transfer-Encoding: binary\r\nContent-ID: %s\r\n\r\n", soap->mime.boundary, s, soap->mime.start);
+    n = strlen(soap->tmpbuf);
+    if (soap_send_raw(soap, soap->tmpbuf, n))
+      return soap->error;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    soap->dime.size = soap->count;	/* DIME in MIME correction */
+  if (!(soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME))
+  { if (soap_putdimehdr(soap))
+      return soap->error;
+  }
+#endif
+  soap->part = SOAP_IN_ENVELOPE;
+  return soap_element_begin_out(soap, "SOAP-ENV:Envelope", 0, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Envelope"))
+    return soap->error;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { soap->dime.size = soap->count - soap->dime.size;	/* DIME in MIME correction */
+    sprintf(soap->id, soap->dime_id_format, 0);
+    soap->dime.id = soap->id;
+    if (soap->local_namespaces)
+    { if (soap->local_namespaces[0].out)
+        soap->dime.type = (char*)soap->local_namespaces[0].out;
+      else
+        soap->dime.type = (char*)soap->local_namespaces[0].ns;
+    }
+    soap->dime.options = NULL;
+    soap->dime.flags = SOAP_DIME_MB | SOAP_DIME_ABSURI;
+    if (!soap->dime.first)
+      soap->dime.flags |= SOAP_DIME_ME;
+    soap->count += 12 + ((strlen(soap->dime.id)+3)&(~3)) + ((strlen(soap->dime.type)+3)&(~3));
+  }
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+    return soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+#endif
+  soap->part = SOAP_END_ENVELOPE;
+  return SOAP_OK;
+} 
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_in(struct soap *soap)
+{ register struct Namespace *p;
+  soap->part = SOAP_IN_ENVELOPE;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Envelope", 0))
+    return soap->error = SOAP_VERSIONMISMATCH;
+  p = soap->local_namespaces;
+  if (p)
+  { const char *ns = p[0].out;
+    if (!ns)
+      ns = p[0].ns;
+    if (!strcmp(ns, soap_env1))
+    { soap->version = 1; /* make sure we use SOAP 1.1 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc1))))
+        strcpy(p[1].out, soap_enc1);
+    }
+    else if (!strcmp(ns, soap_env2))
+    { soap->version = 2; /* make sure we use SOAP 1.2 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc2))))
+        strcpy(p[1].out, soap_enc2);
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_in(struct soap *soap)
+{ soap->part = SOAP_END_ENVELOPE;
+  return soap_element_end_in(soap, "SOAP-ENV:Envelope");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_out(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap->version == 1)
+    soap->encoding = 1;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_SEC) && soap_set_attr(soap, "wsu:Id", "Body"))
+    return soap->error;
+#endif
+  if (soap_element(soap, "SOAP-ENV:Body", 0, NULL))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Body"))
+    return soap->error;
+  soap->part = SOAP_END_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_in(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Body", 0))
+    return soap->error;
+  if (!soap->body)
+    soap->part = SOAP_NO_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_in(struct soap *soap)
+{ if (soap->part == SOAP_NO_BODY)
+    return SOAP_OK;
+  soap->part = SOAP_END_BODY;
+  return soap_element_end_in(soap, "SOAP-ENV:Body");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_header(struct soap *soap)
+{ if (soap_getheader(soap) && soap->error == SOAP_TAG_MISMATCH)
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_endpoint(struct soap *soap, const char *endpoint)
+{ register const char *s;
+  register size_t i, n;
+  soap->endpoint[0] = '\0';
+  soap->host[0] = '\0';
+  soap->path[0] = '/';
+  soap->path[1] = '\0';
+  soap->port = 80;
+  if (!endpoint || !*endpoint)
+    return;
+  if (!strncmp(endpoint, "https:", 6))
+    soap->port = 443;
+  strncpy(soap->endpoint, endpoint, sizeof(soap->endpoint) - 1);
+  s = strchr(endpoint, ':');
+  if (s && s[1] == '/' && s[2] == '/')
+    s += 3;
+  else
+    s = endpoint;
+  n = strlen(s);
+  if (n >= sizeof(soap->host))
+    n = sizeof(soap->host) - 1;
+#ifdef WITH_IPV6
+  if (s[0] == '[')
+  { s++;
+    for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == ']')
+      { s++;
+        break; 
+      }
+    }
+  }
+  else
+  { for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == '/' || s[i] == ':')
+        break; 
+    }
+  }
+#else
+  for (i = 0; i < n; i++)
+  { soap->host[i] = s[i];
+    if (s[i] == '/' || s[i] == ':')
+      break; 
+  }
+#endif
+  soap->host[i] = '\0';
+  if (s[i] == ':')
+  { soap->port = (int)atol(s + i + 1);
+    for (i++; i < n; i++)
+      if (s[i] == '/')
+        break;
+  }
+  if (s[i])
+  { strncpy(soap->path, s + i, sizeof(soap->path));
+    soap->path[sizeof(soap->path) - 1] = '\0';
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect(struct soap *soap, const char *endpoint, const char *action)
+{ return soap_connect_command(soap, SOAP_POST, endpoint, action);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect_command(struct soap *soap, int http_command, const char *endpoint, const char *action)
+{ char host[sizeof(soap->host)];
+  int port;
+  size_t count;
+  soap->error = SOAP_OK;
+  strcpy(host, soap->host); /* save to compare */
+  port = soap->port; /* save to compare */
+  soap_set_endpoint(soap, endpoint);
+#ifndef WITH_LEANER
+  if (soap->fconnect)
+  { if ((soap->error = soap->fconnect(soap, endpoint, soap->host, soap->port)))
+      return soap->error;
+  }
+  else
+#endif
+  if (soap->fopen && *soap->host)
+  { soap->status = http_command;
+    if (!soap->keep_alive || !soap_valid_socket(soap->socket) || strcmp(soap->host, host) || soap->port != port || !soap->fpoll || soap->fpoll(soap))
+    { soap->keep_alive = 0; /* to force close */
+      soap->omode &= ~SOAP_IO_UDP; /* to force close */
+      soap_closesock(soap);
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Connect/reconnect to host='%s' path='%s' port=%d\n", soap->host, soap->path, soap->port));
+#ifdef WITH_UDP
+      if (!strncmp(endpoint, "soap.udp:", 9))
+        soap->omode |= SOAP_IO_UDP;
+#endif
+      soap->socket = soap->fopen(soap, endpoint, soap->host, soap->port);
+      if (soap->error)
+        return soap->error;
+      soap->keep_alive = ((soap->omode & SOAP_IO_KEEPALIVE) != 0);
+    }
+  }
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML) && endpoint)
+  { unsigned int k = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((k & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fpost(soap, endpoint, soap->host, soap->port, soap->path, action, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((k & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = k;
+  }
+  else if (action)
+    soap->action = soap_strdup(soap, action);
+  if (http_command != SOAP_POST)
+    return soap_end_send(soap);
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2base64(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register int i;
+  register unsigned long m;
+  register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, (n + 2) / 3 * 4 + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (!s)
+    return p;
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    t += 4;
+  }
+  t[0] = '\0';
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      t[i] = '=';
+    t[4] = '\0';
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_base642s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register int i, j, c;
+  register unsigned long m;
+  register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = (strlen(s) + 3) / 4 * 3;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  if (n)
+    *n = 0;
+  for (;;)
+  { for (i = 0; i < SOAP_BLKLEN; i++)
+    { m = 0;
+      j = 0;
+      while (j < 4)
+      { c = *s++;
+        if (c == '=' || !c)
+        { i *= 3;
+          switch (j)
+          { case 2:
+              *t++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *t++ = (char)((m >> 10) & 0xFF);
+              *t++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n += i;
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      }
+      *t++ = (char)((m >> 16) & 0xFF);
+      *t++ = (char)((m >> 8) & 0xFF);
+      *t++ = (char)(m & 0xFF);
+      if (l < 3)
+      { if (n)
+	  *n += i;
+        return p;
+      }
+      l -= 3;
+    }
+    if (n)
+      *n += 3 * SOAP_BLKLEN;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2hex(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, 2 * n + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (s)
+  { for (; n > 0; n--)
+    { register int m = *s++;
+      *t++ = (char)((m >> 4) + (m > 159 ? 'a' - 10 : '0'));
+      m &= 0x0F;
+      *t++ = (char)(m + (m > 9 ? 'a' - 10 : '0'));
+    }
+  }
+  *t++ = '\0';
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_hex2s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = strlen(s) / 2;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  while (l)
+  { register int d1, d2;
+    d1 = *s++;
+    if (!d1)
+      break;
+    d2 = *s++;
+    if (!d2)
+      break;
+    *t++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    l--;
+  }
+  if (n)
+    *n = t - p;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthttphdr(struct soap *soap, int status, size_t count)
+{ register const char *s = NULL;
+  register int err = SOAP_OK;
+#ifndef WITH_LEANER
+  register const char *r = NULL;
+#endif
+  if (status == SOAP_FILE && soap->http_content)
+    s = soap->http_content;
+  else if (status == SOAP_HTML)
+    s = "text/html; charset=utf-8";
+  else if (count || ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK))
+  { if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+  }
+#ifndef WITH_LEANER
+  if (soap->mode & (SOAP_ENC_DIME | SOAP_ENC_MTOM))
+  { if (soap->mode & SOAP_ENC_MTOM)
+    { r = s;
+      s = "application/xop+xml; charset=utf-8";
+    }
+    else
+      s = "application/dime";
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->status != SOAP_GET)
+  { register const char *t = strchr(s, ';');
+    sprintf(soap->tmpbuf, "multipart/related; boundary=\"%s\"; type=\"", soap->mime.boundary);
+    if (t)
+      strncat(soap->tmpbuf, s, t - s);
+    else
+      strcat(soap->tmpbuf, s);
+    if (soap->mime.start)
+    { strcat(soap->tmpbuf, "\"; start=\"");
+      strcat(soap->tmpbuf, soap->mime.start);
+    }
+    strcat(soap->tmpbuf, "\"");
+    if (r)
+    { strcat(soap->tmpbuf, "; start-info=\"");
+      strcat(soap->tmpbuf, r);
+      strcat(soap->tmpbuf, "\"");
+    }
+    s = soap->tmpbuf;
+  }
+#endif
+  if (s && (err = soap->fposthdr(soap, "Content-Type", s)))
+    return err;
+#ifdef WITH_ZLIB
+  if (soap->omode & SOAP_ENC_ZLIB)
+  {
+#ifdef WITH_GZIP
+    err = soap->fposthdr(soap, "Content-Encoding", "gzip");
+#else
+    err = soap->fposthdr(soap, "Content-Encoding", "deflate");
+#endif
+    if (err)
+      return err;
+  }
+#endif
+#ifndef WITH_LEANER
+  if ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK)
+    err = soap->fposthdr(soap, "Transfer-Encoding", "chunked");
+  else
+#endif
+  if (soap->status != SOAP_GET)
+  { sprintf(soap->tmpbuf, "%lu", (unsigned long)count);
+    err = soap->fposthdr(soap, "Content-Length", soap->tmpbuf);
+  }
+  if (err)
+    return err;
+  return soap->fposthdr(soap, "Connection", soap->keep_alive ? "keep-alive" : "close");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_get(struct soap *soap)
+{ return SOAP_GET_METHOD;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post(struct soap *soap, const char *endpoint, const char *host, int port, const char *path, const char *action, size_t count)
+{ register const char *s;
+  register int err;
+  if (soap->status == SOAP_GET)
+    s = "GET";
+  else
+    s = "POST";
+#ifdef PALM
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)) && strncmp(endpoint, "_beam:", 6) && strncmp(endpoint, "_local:", 7) && strncmp(endpoint, "_btobex:", 8))
+#else
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)))
+#endif
+    return SOAP_OK;
+  if (soap->proxy_host && strncmp(endpoint, "https:", 6))
+    sprintf(soap->tmpbuf, "%s %s HTTP/%s", s, endpoint, soap->http_version);
+  else
+    sprintf(soap->tmpbuf, "%s /%s HTTP/%s", s, (*path == '/' ? path + 1 : path), soap->http_version);
+  if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+    return err;
+  if (port != 80)
+    sprintf(soap->tmpbuf, "%s:%d", host, port);
+  else
+    strcpy(soap->tmpbuf, host); 
+  if ((err = soap->fposthdr(soap, "Host", soap->tmpbuf))
+   || (err = soap->fposthdr(soap, "User-Agent", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, SOAP_OK, count)))
+    return err;
+#ifdef WITH_ZLIB
+#ifdef WITH_GZIP
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "gzip, deflate")))
+#else
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "deflate")))
+#endif
+    return err;
+#endif
+#ifndef WITH_LEAN
+  if (soap->userid && soap->passwd && strlen(soap->userid) + strlen(soap->passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Authorization", soap->tmpbuf)))
+      return err;
+  }
+  if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+      return err;
+  }
+#endif
+#ifdef WITH_COOKIES
+#ifdef WITH_OPENSSL
+  if (soap_putcookies(soap, host, path, soap->ssl != NULL))
+    return soap->error;
+#else
+  if (soap_putcookies(soap, host, path, 0))
+    return soap->error;
+#endif
+#endif
+  if (action && soap->version == 1)
+  { sprintf(soap->tmpbuf, "\"%s\"", action);
+    if ((err = soap->fposthdr(soap, "SOAPAction", soap->tmpbuf)))
+      return err;
+  }
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_send_header(struct soap *soap, const char *s)
+{ register const char *t;
+  do
+  { t = strchr(s, '\n'); /* disallow \n in HTTP headers */
+    if (!t)
+      t = s + strlen(s);
+    if (soap_send_raw(soap, s, t - s))
+      return soap->error;
+    s = t + 1;
+  } while (*t);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post_header(struct soap *soap, const char *key, const char *val)
+{ if (key)
+  { if (http_send_header(soap, key))
+      return soap->error;
+    if (val && (soap_send_raw(soap, ": ", 2) || http_send_header(soap, val)))
+      return soap->error;
+  }
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_response(struct soap *soap, int status, size_t count)
+{ register int err;
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    httpOutputEnable(soap->rpmreqid);
+#endif
+  if (!status || status == SOAP_HTML || status == SOAP_FILE)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "OK 200\n"));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s 200 OK", soap->http_version);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", "200 OK")))
+      return err;
+  }
+  else if (status > 200 && status < 600)
+  { sprintf(soap->tmpbuf, "HTTP/%s %d %s", soap->http_version, status, http_error(soap, status));
+    if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      return err;
+#ifndef WITH_LEAN 
+    if (status == 401)
+    { sprintf(soap->tmpbuf, "Basic realm=\"%s\"", soap->authrealm ? soap->authrealm : "gSOAP Web Service");
+      if ((err = soap->fposthdr(soap, "WWW-Authenticate", soap->tmpbuf)))
+        return err;
+    }
+    else if ((status >= 301 && status <= 303) || status == 307)
+    { if ((err = soap->fposthdr(soap, "Location", soap->endpoint)))
+        return err;
+    }
+#endif
+  }
+  else
+  { const char *s = *soap_faultcode(soap);
+    if (soap->version == 2 && !strcmp(s, "SOAP-ENV:Sender"))
+      s = "400 Bad Request";
+    else
+      s = "500 Internal Server Error";
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error %s (status=%d)\n", s, status));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s %s", soap->http_version, s);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", s)))
+      return err;
+  }
+  if ((err = soap->fposthdr(soap, "Server", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, status, count)))
+    return err;
+#ifdef WITH_COOKIES
+  if (soap_putsetcookies(soap))
+    return soap->error;
+#endif
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_response(struct soap *soap, int status)
+{ register size_t count;
+  if (!(soap->omode & (SOAP_ENC_XML | SOAP_IO_STORE /* this tests for chunking too */))
+   && (status == SOAP_HTML || status == SOAP_FILE))
+  { soap->omode &= ~SOAP_IO;
+    soap->omode |= SOAP_IO_STORE;
+  }
+  soap->status = status;
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML))
+  { register int n = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((n & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fresponse(soap, status, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((n & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = n;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static const char*
+soap_set_validation_fault(struct soap *soap, const char *s, const char *t)
+{ if (*soap->tag)
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s in element <%s>", s, t?t:SOAP_STR_EOS, soap->tag);
+  else
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s", s, t?t:SOAP_STR_EOS);
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_fault(struct soap *soap)
+{ const char **c = soap_faultcode(soap);
+  const char **s = soap_faultstring(soap);
+  if (!*c && !*s && soap->fseterror)
+    soap->fseterror(soap, c, s);
+  if (!*c)
+  { if (soap->version == 2)
+      *c = "SOAP-ENV:Sender";
+    else
+      *c = "SOAP-ENV:Client";
+  }
+  if (*s)
+    return;
+  switch (soap->error)
+  {
+#ifndef WITH_LEAN
+    case SOAP_CLI_FAULT:
+      *s = "Client fault";
+      break;
+    case SOAP_SVR_FAULT:
+      *s = "Server fault";
+      break;
+    case SOAP_TAG_MISMATCH:
+      *s = soap_set_validation_fault(soap, "tag name or namespace mismatch", NULL);
+      break;
+    case SOAP_TYPE:
+      *s = soap_set_validation_fault(soap, "data type mismatch ", soap->type);
+      break;
+    case SOAP_SYNTAX_ERROR:
+      *s = "Well-formedness violation";
+      break;
+    case SOAP_NO_TAG:
+      *s = "No XML element tag";
+      break;
+    case SOAP_MUSTUNDERSTAND:
+      *c = "SOAP-ENV:MustUnderstand";
+      sprintf(soap->msgbuf, "The data in element '%s' must be understood but cannot be handled", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_VERSIONMISMATCH:
+      *c = "SOAP-ENV:VersionMismatch";
+      *s = "SOAP version mismatch or invalid SOAP message";
+      break;
+    case SOAP_DATAENCODINGUNKNOWN:
+      *c = "SOAP-ENV:DataEncodingUnknown";
+      *s = "Unsupported SOAP data encoding";
+      break;
+    case SOAP_NAMESPACE:
+      *s = soap_set_validation_fault(soap, "namespace mismatch", NULL);
+      break;
+    case SOAP_USER_ERROR:
+      *s = "User error";
+      break;
+    case SOAP_FATAL_ERROR:
+      *s = "Fatal error";
+      break;
+    case SOAP_NO_METHOD:
+      sprintf(soap->msgbuf, "Method '%s' not implemented: method name or namespace not recognized", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_GET_METHOD:
+      *s = "HTTP GET method not implemented";
+      break;
+    case SOAP_EOM:
+      *s = "Out of memory";
+      break;
+    case SOAP_IOB:
+      *s = "Array index out of bounds";
+      break;
+    case SOAP_NULL:
+      *s = soap_set_validation_fault(soap, "nil not allowed", NULL);
+      break;
+    case SOAP_DUPLICATE_ID:
+      *s = soap_set_validation_fault(soap, "multiple definitions of id ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:DuplicateID";
+      break;
+    case SOAP_MISSING_ID:
+      *s = soap_set_validation_fault(soap, "missing id for ref ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:MissingID";
+      break;
+    case SOAP_HREF:
+      *s = soap_set_validation_fault(soap, "incompatible object ref ", soap->id);
+      break;
+    case SOAP_FAULT:
+      break;
+#ifndef WITH_NOIO
+    case SOAP_UDP_ERROR:
+      *s = "Message too large for UDP packet";
+      break;
+    case SOAP_TCP_ERROR:
+      *s = tcp_error(soap);
+      break;
+#endif
+    case SOAP_HTTP_ERROR:
+      *s = "HTTP error";
+      break;
+    case SOAP_SSL_ERROR:
+#ifdef WITH_OPENSSL
+      *s = "SSL error";
+#else
+      *s = "OpenSSL not installed: recompile with -DWITH_OPENSSL";
+#endif
+      break;
+    case SOAP_PLUGIN_ERROR:
+      *s = "Plugin registry error";
+      break;
+    case SOAP_DIME_ERROR:
+      *s = "DIME format error";
+      break;
+    case SOAP_DIME_HREF:
+      *s = "DIME href to missing attachment";
+      break;
+    case SOAP_DIME_MISMATCH:
+      *s = "DIME version/transmission error";
+      break;
+    case SOAP_DIME_END:
+      *s = "End of DIME error";
+      break;
+    case SOAP_MIME_ERROR:
+      *s = "MIME format error";
+      break;
+    case SOAP_MIME_HREF:
+      *s = "MIME href to missing attachment";
+      break;
+    case SOAP_MIME_END:
+      *s = "End of MIME error";
+      break;
+    case SOAP_ZLIB_ERROR:
+#ifdef WITH_ZLIB
+      sprintf(soap->msgbuf, "Zlib/gzip error: '%s'", soap->d_stream.msg?soap->d_stream.msg:"");
+      *s = soap->msgbuf;
+#else
+      *s = "Zlib/gzip not installed for (de)compression: recompile with -DWITH_GZIP";
+#endif
+      break;
+    case SOAP_REQUIRED:
+      *s = soap_set_validation_fault(soap, "missing required attribute", NULL);
+      break;
+    case SOAP_PROHIBITED:
+      *s = soap_set_validation_fault(soap, "prohibited attribute present", NULL);
+      break;
+    case SOAP_OCCURS:
+      *s = soap_set_validation_fault(soap, "min/maxOccurs violation", NULL);
+      break;
+    case SOAP_LENGTH:
+      *s = soap_set_validation_fault(soap, "content length violation", NULL);
+      break;
+    case SOAP_STOP:
+      *s = "Stopped: no response sent";
+      break;
+#endif
+    case SOAP_EOF:
+#ifndef WITH_NOIO
+      sprintf(soap->msgbuf, "End of file or no input: '%s'", soap_strerror(soap));
+      *s = soap->msgbuf;
+      break;
+#else
+      *s = "End of file or no input";
+      break;
+#endif
+    default:
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+      if (soap->error > 200 && soap->error < 600)
+      { sprintf(soap->msgbuf, "HTTP Error: %d %s", soap->error, http_error(soap, soap->error));
+        *s = soap->msgbuf;
+      }
+      else
+#endif
+#endif
+      { sprintf(soap->msgbuf, "Error %d", soap->error);
+        *s = soap->msgbuf;
+      }
+    }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_fault(struct soap *soap)
+{ register int status = soap->error;
+  int r = 1;
+  if (status == SOAP_STOP)
+    return status;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Sending back fault struct for error code %d\n", soap->error));
+  soap->keep_alive = 0; /* to terminate connection */
+  soap_set_fault(soap);
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+  if (soap_valid_socket(soap->socket))
+  { struct timeval timeout;
+    fd_set rfd, sfd;
+    timeout.tv_sec = 0;
+    timeout.tv_usec = 0;
+    FD_ZERO(&rfd);
+    FD_ZERO(&sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, NULL, &timeout);
+    if (r > 0)
+    { if (!FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       || (FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        && recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) < 0))
+        r = 0;
+    }
+  }
+#endif
+#endif
+  if ((status != SOAP_EOF || (!soap->recv_timeout && !soap->send_timeout)) && r > 0)
+  { soap->error = SOAP_OK;
+    soap_serializeheader(soap);
+    soap_serializefault(soap);
+    soap_begin_count(soap);
+    if (soap->mode & SOAP_IO_LENGTH)
+    { soap_envelope_begin_out(soap);
+      soap_putheader(soap);
+      soap_body_begin_out(soap);
+      soap_putfault(soap);
+      soap_body_end_out(soap);
+      soap_envelope_end_out(soap);
+    }
+    soap_end_count(soap);
+    if (soap_response(soap, status)
+     || soap_envelope_begin_out(soap)
+     || soap_putheader(soap)
+     || soap_body_begin_out(soap)
+     || soap_putfault(soap)
+     || soap_body_end_out(soap)
+     || soap_envelope_end_out(soap))
+      return soap_closesock(soap);
+    soap_end_send(soap);
+  }
+  soap->error = status;
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_fault(struct soap *soap)
+{ register int status = soap->error;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Receiving SOAP Fault\n"));
+  soap->error = SOAP_OK;
+  if (soap_getfault(soap))
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Error: soap_get_soapfault() failed. Is this a SOAP message at all?\n"));
+    *soap_faultcode(soap) = (soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client");
+    soap->error = status;
+    soap_set_fault(soap);
+  }
+  else
+  { register const char *s = *soap_faultcode(soap);
+    if (!soap_match_tag(soap, s, "SOAP-ENV:Server") || !soap_match_tag(soap, s, "SOAP-ENV:Receiver"))
+      status = SOAP_SVR_FAULT; 
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:Client") || !soap_match_tag(soap, s, "SOAP-ENV:Sender"))
+      status = SOAP_CLI_FAULT;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:MustUnderstand"))
+      status = SOAP_MUSTUNDERSTAND;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:VersionMismatch"))
+      status = SOAP_VERSIONMISMATCH;
+    else
+    { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Fault code %s\n", s));
+      status = SOAP_FAULT;
+    }
+    if (soap_body_end_in(soap)
+     || soap_envelope_end_in(soap)
+     || soap_end_recv(soap))
+      return soap_closesock(soap);
+    soap->error = status;
+  }
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_empty_response(struct soap *soap)
+{ soap->count = 0;
+  if (soap_response(soap, SOAP_OK) || soap_end_send(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_empty_response(struct soap *soap)
+{ if (soap_begin_recv(soap) || soap_end_recv(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+soap_strerror(struct soap *soap)
+{ register int err = soap->errnum;
+  if (err)
+  {
+#ifndef WIN32
+    return strerror(err);
+#else
+    FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, (LPTSTR)&soap->errorstr, sizeof(soap->errorstr), NULL);
+    return soap->errorstr;
+#endif
+  }
+  return "Operation interrupted or timed out";
+}
+#endif
+#endif 
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_set_error(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail, int soaperror)
+{ *soap_faultcode(soap) = faultcode;
+  if (faultsubcode)
+    *soap_faultsubcode(soap) = faultsubcode;
+  *soap_faultstring(soap) = faultstring;
+  if (faultdetail && *faultdetail)
+  { register const char **s = soap_faultdetail(soap);
+    if (s)
+      *s = faultdetail;
+  }
+  return soap->error = soaperror;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_sender_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_receiver_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_copy_fault(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ char *r = NULL, *s = NULL, *t = NULL;
+  if (faultsubcode)
+    r = soap_strdup(soap, faultsubcode);
+  if (faultstring)
+    s = soap_strdup(soap, faultstring);
+  if (faultdetail)
+    t = soap_strdup(soap, faultdetail);
+  return soap_set_error(soap, faultcode, r, s, t, SOAP_FAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_sender_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_receiver_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault(struct soap *soap, FILE *fd)
+{ if (soap_check_state(soap))
+    fprintf(fd, "Error: soap struct not initialized\n");
+  else if (soap->error)
+  { const char *c, *v = NULL, *s, **d;
+    d = soap_faultcode(soap);
+    if (!*d)
+      soap_set_fault(soap);
+    c = *d;
+    if (soap->version == 2)
+      v = *soap_faultsubcode(soap);
+    s = *soap_faultstring(soap);
+    d = soap_faultdetail(soap);
+    fprintf(fd, "%s%d fault: %s [%s]\n\"%s\"\nDetail: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, c, v ? v : "no subcode", s ? s : "[no reason]", d && *d ? *d : "[no detail]");
+  }
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault_location(struct soap *soap, FILE *fd)
+{ 
+#ifndef WITH_LEAN
+  int i, j, c1, c2;
+  if (soap->error && soap->buflen > 0)
+  { i = (int)soap->bufidx - 1;
+    if (i <= 0)
+      i = 0;
+    c1 = soap->buf[i];
+    soap->buf[i] = '\0';
+    if ((int)soap->buflen >= i + 1024)
+      j = i + 1023;
+    else
+      j = (int)soap->buflen - 1;
+    c2 = soap->buf[j];
+    soap->buf[j] = '\0';
+    fprintf(fd, "%s%c\n** HERE **\n", soap->buf, c1);
+    if (soap->bufidx < soap->buflen)
+      fprintf(fd, "%s\n", soap->buf + soap->bufidx);
+    soap->buf[i] = c1;
+    soap->buf[j] = c2;
+  }
+#endif
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void *arg)
+{ register struct soap_plugin *p;
+  register int r;
+  if (!(p = (struct soap_plugin*)SOAP_MALLOC(soap, sizeof(struct soap_plugin))))
+    return soap->error = SOAP_EOM;
+  p->id = NULL;
+  p->data = NULL;
+  p->fcopy = NULL;
+  p->fdelete = NULL;
+  r = fcreate(soap, p, arg);
+  if (!r && p->fdelete)
+  { p->next = soap->plugins;
+    soap->plugins = p;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Registered '%s' plugin\n", p->id));
+    return SOAP_OK;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not register plugin '%s': plugin returned error %d (or fdelete callback not set)\n", p->id?p->id:"?", r));
+  SOAP_FREE(soap, p);
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static void *
+fplugin(struct soap *soap, const char *id)
+{ register struct soap_plugin *p;
+  for (p = soap->plugins; p; p = p->next)
+    if (p->id == id || !strcmp(p->id, id))
+      return p->data;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void *
+SOAP_FMAC2
+soap_lookup_plugin(struct soap *soap, const char *id)
+{ return soap->fplugin(soap, id);
+}
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap()
+{ soap_init(this);
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	C++ soap struct methods
+ *
+\******************************************************************************/
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode mode)
+{ soap_init1(this, mode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode imode, soap_mode omode)
+{ soap_init2(this, imode, omode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(struct soap& soap)
+{ soap_copy_context(this, &soap);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::~soap()
+{ soap_destroy(this);
+  soap_end(this);
+  soap_done(this);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/samples/calc_VC_NOHTTP/stdsoap2.h b/samples/calc_VC_NOHTTP/stdsoap2.h
new file mode 100644
index 0000000..e7f45bd
--- /dev/null
+++ b/samples/calc_VC_NOHTTP/stdsoap2.h
@@ -0,0 +1,2093 @@
+/*
+
+stdsoap2.h 2.7.6e
+
+gSOAP runtime
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+Contributors:
+
+Wind River Systems, Inc., for the following additions (marked WR[...]):
+  - vxWorks compatible
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#ifdef WITH_SOAPDEFS_H
+# include "soapdefs.h"		/* include user-defined stuff */
+#endif
+
+#ifndef _THREAD_SAFE
+# define _THREAD_SAFE
+#endif
+
+#ifndef OPENSERVER
+# ifndef _REENTRANT
+#  define _REENTRANT
+# endif
+#endif
+
+#ifndef SOAP_FMAC1	/* stdsoap2.h declaration macro */
+# define SOAP_FMAC1
+#endif
+
+#ifndef SOAP_FMAC2	/* stdsoap2.h declaration macro */
+# define SOAP_FMAC2
+#endif
+
+#ifndef SOAP_FMAC3	/* (de)serializer declaration macro */
+# define SOAP_FMAC3
+#endif
+
+#ifndef SOAP_FMAC3S	/* string converter for (de)serializer declaration macro */
+# define SOAP_FMAC3S SOAP_FMAC3
+#endif
+
+#ifndef SOAP_FMAC4	/* (de)serializer declaration macro */
+# define SOAP_FMAC4
+#endif
+
+#ifndef SOAP_FMAC4S	/* string converter for (de)serializer declaration macro */
+# define SOAP_FMAC4S SOAP_FMAC4
+#endif
+
+#ifndef SOAP_FMAC5	/* stub/skeleton declaration macro */
+# define SOAP_FMAC5
+#endif
+
+#ifndef SOAP_FMAC6	/* stub/skeleton declaration macro */
+# define SOAP_FMAC6
+#endif
+
+#ifndef SOAP_CMAC	/* class declaration macro */
+# define SOAP_CMAC
+#endif
+
+#ifndef SOAP_NMAC	/* namespace table declaration macro */
+# define SOAP_NMAC
+#endif
+
+#ifndef SOAP_SOURCE_STAMP
+# define SOAP_SOURCE_STAMP(str)
+#endif
+
+/* gSOAP 2.7.4 and higher: fast look-aside buffering is stable */
+#ifndef WITH_FAST
+# define WITH_FAST
+#endif
+
+#ifdef WITH_LEANER
+# ifndef WITH_LEAN
+#  define WITH_LEAN
+# endif
+#endif
+
+#ifdef WITH_LEAN
+# ifdef WITH_COOKIES
+#  error "Cannot build WITH_LEAN code WITH_COOKIES enabled"
+# endif
+#endif
+
+#ifndef STDSOAP_H
+#define STDSOAP_H
+
+#if defined(__vxworks) || defined(__VXWORKS__)
+# define VXWORKS
+#endif
+
+#ifdef _WIN32
+# ifndef WIN32
+#  define WIN32
+# endif
+#endif
+
+#ifdef UNDER_CE
+# ifndef WIN32
+#  define WIN32
+# endif
+#endif
+
+#ifdef __BORLANDC__
+# ifdef __WIN32__
+#  ifndef WIN32
+#   define WIN32
+#  endif
+# endif
+#endif
+
+#ifdef __CYGWIN__
+# ifndef CYGWIN
+#  define CYGWIN
+# endif
+#endif
+
+#ifdef __SYMBIAN32__ 
+# define SYMBIAN
+# undef WIN32
+#endif
+
+#if defined(__palmos__) || defined(PALM_GCC) || defined(__PALMOS_TRAPS__)
+# ifndef PALM
+#  define PALM
+# endif
+#endif
+
+#if defined(__hpux)
+# ifndef HP_UX
+#  define HP_UX
+# endif
+#endif
+
+#if defined(__alpha) && !defined(__VMS)
+# ifndef TRU64
+#  define TRU64 
+# endif
+#endif
+
+#ifdef __MVS__
+# ifndef OS390
+#  define OS390
+# endif
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+# ifdef WITH_OPENSSL
+#  ifndef HAVE_OPENSSL_SSL_H
+#   undef WITH_OPENSSL
+#  endif
+# endif
+#else
+# if defined(UNDER_CE)
+#  define WITH_LEAN
+#  define HAVE_SSCANF
+# elif defined(WIN32)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define SOAP_LONG_FORMAT "%I64d"
+#  define SOAP_ULONG_FORMAT "%I64u"
+# elif defined(CYGWIN)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(__APPLE__)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_TIMEGM
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(_AIXVERSION_431)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(HP_UX)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(FREEBSD) || defined(__FreeBSD__)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_STRTOLL
+#  define HAVE_STRTOULL
+#  define HAVE_GETTIMEOFDAY
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define SOAP_LONG_FORMAT "%qd"
+#  define SOAP_ULONG_FORMAT "%qu"
+# elif defined(__VMS)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(__GLIBC__) || defined(__GNU__)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_STRTOLL
+#  define HAVE_STRTOULL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_TIMEGM
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define HAVE_ISNAN
+# elif defined(TRU64)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_STRTOLL
+#  define HAVE_STRTOULL
+#  define HAVE_GETTIMEOFDAY
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define __USE_STD_IOSTREAM
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define SOAP_LONG_FORMAT "%ld"
+#  define SOAP_ULONG_FORMAT "%lu"
+# elif defined(MAC_CARBON)
+#  define WITH_NOIO
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GETHOSTBYNAME_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(PALM)
+#  define WITH_LEAN
+#  define HAVE_STRTOD   /* strtod() is defined in palmFunctions.h */
+#  include <stdlib.h>	/* Needs to be included before unix headers */
+#  include <sys_types.h>
+#  define IGNORE_STDIO_STUBS
+#  include <StdIOPalm.h>
+#  define O_NONBLOCK FNONBIO
+#  include <sys_socket.h>
+#  include "palmFunctions.h"
+# elif defined(SYMBIAN)
+#  define WITH_LEAN
+#  define WITH_NONAMESPACES
+#  define HAVE_STRTOD	/* use STRTOD since sscanf doesn't seem to work */
+#  include <e32def.h>
+#  include <sys/ioctl.h>
+# elif defined(VXWORKS)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_PGMTIME_R
+#  define HAVE_PLOCALTIME_R
+#  define HAVE_MKTIME
+# elif defined(OS390)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(AS400)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# else
+/* Default asumptions on supported functions */
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GETHOSTBYNAME_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# endif
+#endif
+
+/* QNX does not have a working version of strtof */
+#if defined(__QNX__) || defined(QNX)
+# undef HAVE_STRTOF
+#endif
+
+#ifndef SOAP_LONG_FORMAT
+# define SOAP_LONG_FORMAT "%lld"	/* printf format for 64 bit ints */
+#endif
+
+#ifndef SOAP_ULONG_FORMAT
+# define SOAP_ULONG_FORMAT "%llu"	/* printf format for unsigned 64 bit ints */
+#endif
+
+#ifndef WITH_NOSTDLIB
+# include <stdlib.h>
+# ifndef PALM
+#  include <stdio.h>
+#  include <string.h>
+# endif
+# include <ctype.h>
+# include <limits.h>
+#endif
+
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+# include <string>
+# include <iostream>
+#endif
+
+#ifdef WITH_NOHTTP
+# ifndef WITH_NOIO
+////#  define WITH_NOIO     ESL TO DO : I added the comment to make this work. This is very strange though!!
+#  undef WITH_COOKIES
+# endif
+#endif
+
+#ifndef UNDER_CE
+# ifndef PALM
+#  ifndef WITH_NOIO
+#   include <errno.h>
+#   include <sys/types.h>
+#  endif
+#  ifndef WITH_LEAN
+#   ifdef HAVE_SYS_TIMEB_H
+#    include <sys/timeb.h>		/* for ftime() */
+#   endif
+#   include <time.h>
+#  endif
+# endif
+#endif
+
+#ifdef OPENSERVER
+# include <sys/socket.h>
+# include <sys/stream.h>
+# include <sys/protosw.h>
+  extern int h_errno;
+#endif
+
+#ifndef WITH_NOIO
+# ifndef WIN32
+#  ifndef PALM
+#   include <sys/socket.h>
+#   ifdef VXWORKS
+#    include <sockLib.h>
+#    include <selectLib.h>
+#   endif
+#   ifndef VXWORKS
+#    ifndef SYMBIAN
+#     include <strings.h>
+#    endif
+#   endif
+#   ifdef SUN_OS
+#    include <sys/stream.h>		/* SUN */
+#    include <sys/socketvar.h>		/* SUN < 2.8 (?) */
+#   endif
+#   ifdef VXWORKS
+#    ifdef _WRS_KERNEL
+#     include <sys/times.h>
+#    endif
+#   else
+#    include <sys/time.h>
+#   endif
+#   include <netinet/in.h>
+#   ifdef OS390
+#    include <netinet/tcp_var.h>
+#   else
+#    include <netinet/tcp.h>          /* TCP_NODELAY */
+#   endif
+#   include <arpa/inet.h>
+#  endif
+# endif
+#endif
+
+#ifdef WITH_FASTCGI
+# include <fcgi_stdio.h>
+#endif
+
+#ifdef WITH_OPENSSL
+# define OPENSSL_NO_KRB5
+# include <openssl/ssl.h>
+# include <openssl/err.h>
+# include <openssl/rand.h>
+# ifndef ALLOW_OLD_VERSIONS
+#  if (OPENSSL_VERSION_NUMBER < 0x00905100L)
+#   error "Must use OpenSSL 0.9.6 or later"
+#  endif
+# endif
+#endif
+
+#ifdef WITH_GZIP
+# ifndef WITH_ZLIB
+#  define WITH_ZLIB
+# endif
+#endif
+
+#ifdef WITH_CASEINSENSITIVETAGS
+# define SOAP_STRCMP soap_tag_cmp	/* case insensitve XML element/attribute names */
+#else
+# define SOAP_STRCMP strcmp		/* case sensitive XML element/attribute names */
+#endif
+
+#ifdef WITH_ZLIB
+# include <zlib.h>
+#endif
+
+#ifndef WITH_NOSTDLIB
+# ifndef PALM
+#  include <math.h>	/* for isnan() */
+# endif
+#endif
+
+/* #define DEBUG */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and messages (in file TEST.log) */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef WIN32
+# ifndef UNDER_CE
+#  include <io.h>
+#  include <fcntl.h>
+# endif
+# include <winsock.h>
+/* # include <winsock2.h> */ /* Alternative: use winsock2 (not available with eVC) */
+# ifdef WITH_IPV6
+#  include <ws2tcpip.h>
+#  include <wspiapi.h>
+# endif
+#else
+# ifdef VXWORKS
+#  include <hostLib.h>
+#  include <ioctl.h>
+#  include <ioLib.h>
+# endif
+# ifndef WITH_NOIO
+#  ifndef PALM
+#   include <netdb.h>
+#   include <netinet/in.h>
+#   include <unistd.h>
+#   include <fcntl.h>
+#  endif
+# endif
+#endif
+
+/* Portability: define SOAP_SOCKLEN_T */
+#if defined(_AIX)
+# define SOAP_SOCKLEN_T socklen_t
+#elif defined(SOCKLEN_T)
+# define SOAP_SOCKLEN_T SOCKLEN_T
+#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) || defined(FREEBSD) || defined(__FreeBSD__) || defined(__QNX__) || defined(QNX)
+# define SOAP_SOCKLEN_T socklen_t
+#elif defined(IRIX) || defined(WIN32) || defined(__APPLE__) || defined(HP_UX) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS)
+# define SOAP_SOCKLEN_T int
+#else
+# define SOAP_SOCKLEN_T size_t
+#endif
+
+#ifndef SOAP_SOCKET
+# ifdef WIN32
+#  define SOAP_SOCKET SOCKET
+# else
+#  define SOAP_SOCKET int
+#  define closesocket(n) close(n)
+# endif
+#endif
+
+#define SOAP_INVALID_SOCKET (-1)
+#define soap_valid_socket(n) ((n) != SOAP_INVALID_SOCKET)
+
+#if defined(SYMBIAN)
+# define LONG64 long
+# define ULONG64 unsigned LONG64
+#elif !defined(WIN32) || defined(__GLIBC__) || defined(__GNU__)
+# ifndef LONG64
+#  define LONG64 long long
+#  define ULONG64 unsigned LONG64
+# endif
+#elif defined(UNDER_CE)
+# define LONG64 __int64
+# define ULONG64 unsigned LONG64
+#elif defined(__BORLANDC__)
+# define LONG64 __int64
+# define ULONG64 unsigned LONG64
+#endif
+
+#if defined(WIN32)
+# define soap_int32 __int32
+#elif defined(SYMBIAN)
+# define soap_int32 long
+#elif defined(PALM)
+# define soap_int32 Int32
+#else
+# define soap_int32 int32_t
+#endif
+
+#ifdef WIN32
+# define SOAP_ERANGE ERANGE
+# define SOAP_EINTR WSAEINTR
+# define SOAP_EAGAIN WSAEWOULDBLOCK
+# define SOAP_EWOULDBLOCK WSAEWOULDBLOCK
+# define SOAP_EINPROGRESS WSAEINPROGRESS
+#else
+# define SOAP_ERANGE ERANGE
+# define SOAP_EINTR EINTR
+# define SOAP_EAGAIN EAGAIN
+# ifdef SYMBIAN
+#  define SOAP_EWOULDBLOCK 9898
+#  define SOAP_EINPROGRESS 9899
+# else
+#  define SOAP_EWOULDBLOCK EWOULDBLOCK
+#  define SOAP_EINPROGRESS EINPROGRESS
+# endif
+#endif
+
+#ifdef WIN32
+# ifdef UNDER_CE
+#  define soap_errno GetLastError()
+#  define soap_socket_errno GetLastError()
+#  define soap_reset_errno SetLastError(0)
+# else
+#  define soap_errno GetLastError()
+#  define soap_socket_errno WSAGetLastError()
+#  define soap_reset_errno SetLastError(0)
+# endif
+#else
+# ifndef WITH_NOIO
+#  define soap_errno errno
+#  define soap_socket_errno errno
+#  define soap_reset_errno (errno = 0)
+# else
+#  define soap_errno 0
+#  define soap_socket_errno 0
+#  define soap_reset_errno
+# endif
+#endif
+
+#ifndef SOAP_BUFLEN
+# ifdef WITH_UDP
+#  define SOAP_BUFLEN (65536) /* max UDP packet size */
+# else
+#  ifndef WITH_LEAN
+#   define SOAP_BUFLEN (65536) /* buffer length for socket packets, also used by gethostbyname_r so don't make this too small */
+#  else
+#   define SOAP_BUFLEN  (2048)
+#  endif
+# endif
+#endif
+#ifndef SOAP_LABLEN
+# define SOAP_LABLEN     (64) /* initial look-aside buffer length */
+#endif
+#ifndef SOAP_PTRBLK
+# define SOAP_PTRBLK     (32) /* block allocation for pointer hash table chains */
+#endif
+#ifndef SOAP_PTRHASH
+# ifndef WITH_LEAN
+#  define SOAP_PTRHASH (1024) /* size of pointer analysis hash table (must be power of 2) */
+# else
+#  define SOAP_PTRHASH   (32)
+# endif
+#endif
+#ifndef SOAP_IDHASH
+# ifndef WITH_LEAN
+#  define SOAP_IDHASH  (1999) /* prime size of hash table for parsed id/ref */
+# else
+#  define SOAP_IDHASH    (19) /* 19, 199 */
+# endif
+#endif
+#ifndef SOAP_BLKLEN
+# ifndef WITH_LEAN
+#  define SOAP_BLKLEN   (256) /* size of blocks to collect long strings and XML attributes */
+# else
+#  define SOAP_BLKLEN    (32)
+# endif
+#endif
+#ifndef SOAP_TAGLEN
+# ifndef WITH_LEAN
+#  define SOAP_TAGLEN  (1024) /* maximum length of XML element tag/attribute name or host/path name + 1 */
+# else
+#  define SOAP_TAGLEN    (64)
+# endif
+#endif
+#ifndef SOAP_HDRLEN
+# ifndef WITH_LEAN
+#  define SOAP_HDRLEN  (8192) /* maximum length of HTTP header line (must be >4096 to read cookies) */
+# else
+#  define SOAP_HDRLEN  (1024)
+# endif
+#endif
+#ifndef SOAP_MAXDIMS
+# ifndef WITH_LEAN
+#  define SOAP_MAXDIMS	 (16) /* maximum array dimensions (array nestings) must be less than 64 to protect soap->tmpbuf */
+# else
+#  define SOAP_MAXDIMS	  (4)
+# endif
+#endif
+
+#ifndef SOAP_MAXLOGS
+# define SOAP_MAXLOGS	  (3) /* max number of debug logs per struct soap environment */
+# define SOAP_INDEX_RECV  (0)
+# define SOAP_INDEX_SENT  (1)
+# define SOAP_INDEX_TEST  (2)
+#endif
+
+#ifndef SOAP_MAXKEEPALIVE
+# define SOAP_MAXKEEPALIVE (100) /* max iterations to keep server connection alive */
+#endif
+
+#ifndef SOAP_MAXARRAYSIZE
+# define SOAP_MAXARRAYSIZE (100000) /* "trusted" max size of inbound SOAP array for compound array allocation */
+#endif
+
+#ifdef VXWORKS
+# ifdef __INCmathh 
+#  include <private/mathP.h>
+#  ifndef HAVE_ISNAN
+#   define HAVE_ISNAN
+#  endif
+#  define soap_isnan(num) isNan(num)
+# endif
+#endif
+
+#ifdef WIN32 
+# include <float.h>
+# ifndef HAVE_ISNAN
+#  define HAVE_ISNAN
+# endif
+# define soap_isnan(num) _isnan(num)
+#endif
+
+#ifdef SUN_OS
+# define soap_isnan(n) isnan(n)
+#endif
+
+#if !defined(HAVE_ISNAN) && (defined(_MATH_H) || defined(_MATH_INCLUDED))
+# define HAVE_ISNAN
+#endif
+
+#ifndef soap_isnan
+# ifdef HAVE_ISNAN
+#  define soap_isnan(n) isnan(n)
+# else
+#  define soap_isnan(_) (0)
+# endif
+#endif
+
+extern const struct soap_double_nan { unsigned int n1, n2; } soap_double_nan;
+
+#ifdef VXWORKS
+# ifndef FLT_MAX
+#  define FLT_MAX _ARCH_FLT_MAX
+# endif
+# ifndef DBL_MAX
+#  define DBL_MAX _ARCH_DBL_MAX
+# endif
+#endif
+
+#ifndef FLT_NAN
+# ifdef HAVE_ISNAN
+#  define FLT_NAN (*(float*)(void*)&soap_double_nan)
+# else
+#  define FLT_NAN (0.0)
+# endif
+#endif
+
+#ifndef FLT_PINFTY
+# if defined(FLT_MAX)
+#  define FLT_PINFTY FLT_MAX
+# elif defined(HUGE_VALF)
+#  define FLT_PINFTY (float)HUGE_VALF
+# elif defined(HUGE_VAL)
+#  define FLT_PINFTY (float)HUGE_VAL
+# elif defined(FLOAT_MAX)
+#  define FLT_PINFTY FLOAT_MAX
+# else
+#  define FLT_PINFTY (3.40282347e+38F)
+# endif
+#endif
+
+#ifndef FLT_NINFTY
+# define FLT_NINFTY (-FLT_PINFTY)
+#endif
+
+#ifndef DBL_NAN
+# ifdef HAVE_ISNAN
+#  define DBL_NAN (*(double*)(void*)&soap_double_nan)
+# else
+#  define DBL_NAN (0.0)
+# endif
+#endif
+
+#ifndef DBL_PINFTY
+# if defined(DBL_MAX)
+#  define DBL_PINFTY DBL_MAX
+# elif defined(HUGE_VALF)
+#  define DBL_PINFTY (double)HUGE_VALF
+# elif defined(HUGE_VAL)
+#  define DBL_PINFTY (double)HUGE_VAL
+# elif defined(DOUBLE_MAX)
+#  define DBL_PINFTY DOUBLE_MAX
+# else
+#  define DBL_PINFTY (1.7976931348623157e+308)
+# endif
+#endif
+
+#ifndef DBL_NINFTY
+# define DBL_NINFTY (-DBL_PINFTY)
+#endif
+
+#define soap_ispinfd(n) ((n) >= DBL_PINFTY)
+#define soap_ispinff(n) ((n) >= FLT_PINFTY)
+#define soap_isninfd(n) ((n) <= DBL_NINFTY)
+#define soap_isninff(n) ((n) <= FLT_NINFTY)
+
+/* gSOAP error codes */
+
+#define SOAP_EOF			EOF
+#define SOAP_ERR			EOF
+#define SOAP_OK				0
+#define SOAP_CLI_FAULT			1
+#define SOAP_SVR_FAULT			2
+#define SOAP_TAG_MISMATCH		3
+#define SOAP_TYPE			4
+#define SOAP_SYNTAX_ERROR		5
+#define SOAP_NO_TAG			6
+#define SOAP_IOB			7
+#define SOAP_MUSTUNDERSTAND		8
+#define SOAP_NAMESPACE			9
+#define SOAP_USER_ERROR			10
+#define SOAP_FATAL_ERROR		11
+#define SOAP_FAULT			12
+#define SOAP_NO_METHOD			13
+#define SOAP_GET_METHOD			14
+#define SOAP_EOM			15
+#define SOAP_NULL			16
+#define SOAP_DUPLICATE_ID		17
+#define SOAP_MISSING_ID			18
+#define SOAP_HREF			19
+#define SOAP_UDP_ERROR			20
+#define SOAP_TCP_ERROR			21
+#define SOAP_HTTP_ERROR			22
+#define SOAP_SSL_ERROR			23
+#define SOAP_ZLIB_ERROR			24
+#define SOAP_DIME_ERROR			25
+#define SOAP_DIME_HREF			26
+#define SOAP_DIME_MISMATCH		27
+#define SOAP_DIME_END			28
+#define SOAP_MIME_ERROR			29
+#define SOAP_MIME_HREF			30
+#define SOAP_MIME_END			31
+#define SOAP_VERSIONMISMATCH		32
+#define SOAP_PLUGIN_ERROR		33
+#define SOAP_DATAENCODINGUNKNOWN	34
+#define SOAP_REQUIRED			35
+#define SOAP_PROHIBITED			36
+#define SOAP_OCCURS			37
+#define SOAP_LENGTH			38
+
+#define soap_xml_error_check(e) ((e) == SOAP_TAG_MISMATCH || (e) == SOAP_TAG_END || (e) == SOAP_SYNTAX_ERROR || (e) == SOAP_NAMESPACE || (e) == SOAP_DUPLICATE_ID || (e) == SOAP_MISSING_ID || (e) == SOAP_REQUIRED || (e) == SOAP_PROHIBITED || (e) == SOAP_OCCURS || (e) == SOAP_LENGTH || (e) == SOAP_NULL || (e) == SOAP_HREF)
+#define soap_soap_error_check(e) ((e) == SOAP_CLI_FAULT || (e) == SOAP_SVR_FAULT || (e) == SOAP_VERSIONMISMATCH || (e) == SOAP_MUSTUNDERSTAND || (e) == SOAP_FAULT || (e) == SOAP_NO_METHOD)
+#define soap_tcp_error_check(e) ((e) == SOAP_EOF || (e) == SOAP_TCP_ERROR)
+#define soap_ssl_error_check(e) ((e) == SOAP_SSL_ERROR)
+#define soap_zlib_error_check(e) ((e) == SOAP_ZLIB_ERROR)
+#define soap_http_error_check(e) ((e) == SOAP_HTTP_ERROR || (e) == SOAP_GET_METHOD || ((e) >= 100 && (e) < 600))
+
+/* gSOAP HTTP response status codes 100 to 599 are reserved */
+
+/* Codes 600 to 999 are user definable */
+
+/* Exceptional gSOAP HTTP response status codes >= 1000 */
+
+#define SOAP_STOP		1000	/* No HTTP response */
+#define SOAP_FORM		1001	/* Form request/response */
+#define SOAP_HTML		1002	/* Custom HTML response */
+#define SOAP_FILE		1003	/* Custom file-based response */
+
+/* gSOAP HTTP method codes */
+
+#define SOAP_POST		2000
+#define SOAP_GET		2001
+
+/* gSOAP DIME */
+
+#define SOAP_DIME_CF		0x01
+#define SOAP_DIME_ME		0x02
+#define SOAP_DIME_MB		0x04
+#define SOAP_DIME_VERSION	0x08 /* DIME version 1 */
+#define SOAP_DIME_MEDIA		0x10
+#define SOAP_DIME_ABSURI	0x20
+
+/* gSOAP ZLIB */
+
+#define SOAP_ZLIB_NONE		0x00
+#define SOAP_ZLIB_DEFLATE	0x01
+#define SOAP_ZLIB_INFLATE	0x02
+#define SOAP_ZLIB_GZIP		0x02
+
+/* gSOAP transport, connection, and content encoding modes */
+
+typedef soap_int32 soap_mode;
+
+#define SOAP_IO			0x00000003	/* IO mask */
+#define SOAP_IO_FLUSH		0x00000000	/* flush output immediately, no buffering */
+#define SOAP_IO_BUFFER		0x00000001	/* buffer output in packets of size SOAP_BUFLEN */
+#define SOAP_IO_STORE		0x00000002	/* store entire output to determine length for transport */
+#define SOAP_IO_CHUNK		0x00000003	/* use HTTP chunked transfer AND buffer packets */
+
+#define SOAP_IO_UDP		0x00000004
+#define SOAP_IO_LENGTH		0x00000008
+#define SOAP_IO_KEEPALIVE	0x00000010
+
+#define SOAP_ENC_LATIN		0x00800020	/* iso-8859-1 encoding */
+#define SOAP_ENC_XML		0x00000040	/* plain XML encoding, no HTTP header */
+#define SOAP_ENC_DIME		0x00000080
+#define SOAP_ENC_MIME		0x00000100
+#define SOAP_ENC_MTOM		0x00000200
+#define SOAP_ENC_ZLIB		0x00000400
+#define SOAP_ENC_SSL		0x00000800
+
+#define SOAP_ENC		0x00000FFF	/* IO and ENC mask */
+
+#define SOAP_XML_STRICT		0x00001000	/* strict validation */
+#define SOAP_XML_INDENT		0x00002000
+#define SOAP_XML_CANONICAL	0x00004000	/* EXC C14N canonical XML */
+#define SOAP_XML_TREE		0x00008000
+#define SOAP_XML_GRAPH		0x00010000
+#define SOAP_XML_NIL		0x00020000
+#define SOAP_XML_DOM		0x00040000
+#define SOAP_XML_SEC		0x00080000	/* reserved for WS security */
+
+#define SOAP_C_NOIOB		0x00100000
+#define SOAP_C_UTFSTRING	0x00200000
+#define SOAP_C_MBSTRING		0x00400000
+
+#define SOAP_DOM_TREE		0x01000000
+#define SOAP_DOM_NODE		0x02000000
+#define SOAP_DOM_ASIS		0x04000000
+
+#define SOAP_IO_DEFAULT		SOAP_IO_FLUSH
+
+/* SSL client/server authentication settings */
+
+#define SOAP_SSL_NO_AUTHENTICATION		0x00	/* for testing purposes */
+#define SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION	0x01	/* client requires server to authenticate */
+#define SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION	0x02	/* server requires client to authenticate */
+
+#define SOAP_SSL_DEFAULT			SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION
+
+/* state */
+
+#define SOAP_INIT	1
+#define SOAP_COPY	2
+
+#define soap_check_state(soap) (!(soap) || ((soap)->state != SOAP_INIT && (soap)->state != SOAP_COPY))
+
+/* part */
+
+#define SOAP_BEGIN		0
+#define SOAP_IN_ENVELOPE	2
+#define SOAP_IN_HEADER		3
+#define SOAP_END_HEADER		4
+#define SOAP_NO_BODY		5
+#define SOAP_IN_BODY		6
+#define SOAP_END_BODY		7
+#define SOAP_END_ENVELOPE	8
+#define SOAP_END		9
+#define SOAP_BEGIN_SECURITY	10
+#define SOAP_IN_SECURITY	11
+#define SOAP_END_SECURITY	12
+
+/* DEBUG macros */
+
+#ifndef WITH_LEAN
+# ifdef DEBUG
+#  ifndef SOAP_DEBUG
+#   define SOAP_DEBUG
+#  endif
+# endif
+#endif
+
+#ifdef SOAP_DEBUG
+# define SOAP_MALLOC(soap, size) soap_track_malloc(soap, __FILE__, __LINE__, size)
+# define SOAP_FREE(soap, ptr) soap_track_free(soap, __FILE__, __LINE__, ptr)
+#endif
+
+#ifndef SOAP_MALLOC			/* use libc malloc */
+# define SOAP_MALLOC(soap, size) malloc(size)
+#endif
+
+#ifndef SOAP_FREE			/* use libc free */
+# define SOAP_FREE(soap, ptr) free(ptr)
+#endif
+
+#ifdef SOAP_DEBUG
+# ifndef SOAP_MESSAGE
+#  define SOAP_MESSAGE fprintf
+# endif
+# ifndef DBGLOG
+#  define DBGLOG(DBGFILE, CMD) \
+{ if (soap)\
+  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
+      soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\
+    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
+    { FILE *fdebug = soap->fdebug[SOAP_INDEX_##DBGFILE];\
+      CMD;\
+      fflush(fdebug);\
+    }\
+  }\
+}
+# endif
+# ifndef DBGMSG
+#  define DBGMSG(DBGFILE, MSG, LEN) \
+{ if (soap)\
+  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
+      soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\
+    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
+    { fwrite((MSG), 1, (LEN), soap->fdebug[SOAP_INDEX_##DBGFILE]);\
+      fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\
+    }\
+  }\
+}
+# endif
+# ifndef DGBFUN
+#  define DBGFUN(FNAME) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s()\n", __FILE__, __LINE__, FNAME))
+#  define DBGFUN1(FNAME, FMT, ARG) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT")\n", __FILE__, __LINE__, FNAME, (ARG)))
+#  define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2)))
+#  define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2", "FMT3")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2), (ARG3)))
+# endif
+# ifndef DBGHEX
+#  define DBGHEX(DBGFILE, MSG, LEN) \
+{ if (soap)\
+  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
+      soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\
+    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
+    { int i; char *s;\
+      for (s = (char*)(MSG), i = (LEN); i; i--)\
+        fprintf(soap->fdebug[SOAP_INDEX_##DBGFILE], "%2.2hhX  ", *s++);\
+      fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\
+    }\
+  }\
+}
+# endif
+#else
+# define DBGLOG(DBGFILE, CMD)
+# define DBGMSG(DBGFILE, MSG, LEN)
+# define DBGFUN(FNAME)
+# define DBGFUN1(FNAME, FMT, ARG)
+# define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2)
+# define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3)
+# define DBGHEX(DBGFILE, MSG, LEN)
+#endif
+
+/* UCS-4 requires 32 bits (0-7FFFFFFF, the sign bit is used by gSOAP to distinguish XML entities) */
+typedef soap_int32 soap_wchar;
+
+/* namespace table row */
+struct Namespace
+{ const char *id;
+  const char *ns;
+  const char *in;
+  char *out;
+};
+
+/* namespace stack */
+struct soap_nlist
+{ struct soap_nlist *next;
+  unsigned int level; /* nesting depth level */
+  short index; /* corresponding entry in ns mapping table */
+  char *ns; /* only set when parsed ns URI is not in the ns mapping table */
+  char id[1]; /* the actual string value flows into the allocated region below this struct */
+};
+
+/* block stack for nested block allocations */
+struct soap_blist
+{ struct soap_blist *next;
+  char *ptr;
+  size_t size;
+};
+
+/* array layout */
+struct soap_array
+{ void *__ptr;
+  int __size;
+};
+
+/* pointer serialization management */
+struct soap_plist
+{ struct soap_plist *next;
+  const void *ptr;
+  const struct soap_array *array;
+  int type;
+  int id;
+  char mark1;
+  char mark2;
+};
+
+/* block allocation for pointer serialization management */
+struct soap_pblk
+{ struct soap_pblk *next;
+  struct soap_plist plist[SOAP_PTRBLK];
+};
+
+#ifdef SOAP_DEBUG
+/* malloc/free tracking for debugging */
+struct soap_mlist
+{ struct soap_mlist *next;
+  const void *ptr;
+  const char *file;
+  int line;
+  short live;
+};
+#endif
+
+/* class allocation list */
+struct soap_clist
+{ struct soap_clist *next;
+  void *ptr;
+  int type;
+  int size;
+  void (*fdelete)(struct soap_clist*);
+};
+
+/* attributes */
+struct soap_attribute
+{ struct soap_attribute *next;
+  char *value;
+  size_t size;
+  char *ns;
+  short visible;
+  char name[1]; /* the actual name string flows into the allocated region below this struct */
+};
+
+struct soap_cookie
+{ struct soap_cookie *next;
+  char *name;
+  char *value;
+  char *domain;
+  char *path;
+  long expire;		/* client-side: local time to expire; server-side: seconds to expire */
+  unsigned int version;
+  short secure;
+  short session;	/* server-side */
+  short env;		/* server-side: got cookie from client and should not be (re)send */
+  short modified;	/* server-side: client cookie was modified and should be send */
+};
+
+#ifdef __cplusplus
+SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*);
+
+class soap_multipart_iterator
+{ public:
+  struct soap_multipart *content;
+  bool operator==(const soap_multipart_iterator& iter) const
+    { return content == iter.content; }
+  bool operator!=(const soap_multipart_iterator& iter) const
+    { return content != iter.content; }
+  struct soap_multipart &operator*() const
+    { return *content; }
+  soap_multipart_iterator &operator++()
+    { content = soap_next_multipart(content); return *this; }
+  soap_multipart_iterator() : content(NULL)
+    { }
+  soap_multipart_iterator(struct soap_multipart *p) : content(p)
+    { }
+};
+#endif
+
+#ifndef WITH_LEANER
+struct soap_dime
+{ size_t count;
+  size_t size;
+  size_t chunksize;
+  size_t buflen;
+  char flags;
+  char *ptr;
+  const char *id;
+  const char *type;
+  const char *options;
+  struct soap_multipart *list;		/* list of DIME attachments received */
+  struct soap_multipart *first, *last;	/* temporary in/out queue */
+#ifdef __cplusplus
+  soap_multipart_iterator begin()
+    { soap_multipart_iterator iter(list); return iter; };
+  soap_multipart_iterator end()
+    { soap_multipart_iterator iter(NULL); return iter; };
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+struct soap_mime
+{ char *boundary;			/* MIME boundary */
+  const char *start;			/* MIME start ID */
+  struct soap_multipart *list;		/* list of MIME attachments received */
+  struct soap_multipart *first, *last;	/* temporary in/out queue */
+#ifdef __cplusplus
+  soap_multipart_iterator begin()
+    { soap_multipart_iterator iter(list); return iter; };
+  soap_multipart_iterator end()
+    { soap_multipart_iterator iter(NULL); return iter; };
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+/* RFC2045 MIME content transfer encodings */
+enum soap_mime_encoding
+{ SOAP_MIME_NONE,
+  SOAP_MIME_7BIT,
+  SOAP_MIME_8BIT,
+  SOAP_MIME_BINARY,
+  SOAP_MIME_QUOTED_PRINTABLE,
+  SOAP_MIME_BASE64,
+  SOAP_MIME_IETF_TOKEN,
+  SOAP_MIME_X_TOKEN
+};
+#endif
+
+#ifndef WITH_LEANER
+/* DIME/MIME multipart list */
+struct soap_multipart
+{ struct soap_multipart *next;
+  char *ptr;				/* points to raw data content */
+  size_t size;				/* size of data content */
+  const char *id;			/* DIME/MIME content ID or form data name */
+  const char *type;			/* DIME/MIME type (MIME type format) */
+  const char *options;			/* DIME options */
+  enum soap_mime_encoding encoding;	/* MIME Content-Transfer-Encoding */
+  const char *location;			/* MIME Content-Location (optional) */
+  const char *description;		/* MIME Content-Description (optional) */
+#ifdef __cplusplus
+  typedef soap_multipart_iterator iterator;
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+/* attachment DIME and MTOM XOP forwarding */
+struct soap_xlist
+{ struct soap_xlist *next;
+  unsigned char **ptr;
+  int *size;
+  char *id;
+  char **type;
+  char **options;
+};
+#endif
+
+/******************************************************************************/
+
+#ifndef WITH_LEANER
+#ifdef __cplusplus
+class soap_dom_attribute_iterator
+{ public:
+  struct soap_dom_attribute *att;
+  const char *nstr;
+  const char *name;
+  bool operator==(const soap_dom_attribute_iterator&) const;
+  bool operator!=(const soap_dom_attribute_iterator&) const;
+  struct soap_dom_attribute &operator*() const;
+  soap_dom_attribute_iterator &operator++();
+  soap_dom_attribute_iterator();
+  soap_dom_attribute_iterator(struct soap_dom_attribute*);
+  ~soap_dom_attribute_iterator();
+};
+#endif
+#endif
+
+#ifndef WITH_LEANER
+struct soap_dom_attribute
+{ struct soap_dom_attribute *next;
+  const char *nstr;
+  char *name;
+  char *data;
+  wchar_t *wide;
+  struct soap *soap;
+#ifdef __cplusplus
+  typedef soap_dom_attribute_iterator iterator;
+  struct soap_dom_attribute &set(const char *nstr, const char *name);	/* set namespace and name */
+  struct soap_dom_attribute &set(const char *data);		/* set data */
+  soap_dom_attribute_iterator begin();
+  soap_dom_attribute_iterator end();
+  soap_dom_attribute_iterator find(const char *nstr, const char *name);
+  void unlink();
+  soap_dom_attribute();
+  soap_dom_attribute(struct soap *soap);
+  soap_dom_attribute(struct soap *soap, const char *nstr, const char *name, const char *data);
+  ~soap_dom_attribute();
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+#ifdef __cplusplus
+class soap_dom_element_iterator
+{ public:
+  struct soap_dom_element *elt;
+  const char *nstr;
+  const char *name;
+  int type;
+  bool operator==(const soap_dom_element_iterator&) const;
+  bool operator!=(const soap_dom_element_iterator&) const;
+  struct soap_dom_element &operator*() const;
+  soap_dom_element_iterator &operator++();
+  soap_dom_element_iterator();
+  soap_dom_element_iterator(struct soap_dom_element*);
+  ~soap_dom_element_iterator();
+};
+#endif
+#endif
+
+#ifndef WITH_LEANER
+struct soap_dom_element
+{ struct soap_dom_element *next;	/* next sibling */
+  struct soap_dom_element *prnt;	/* parent */
+  struct soap_dom_element *elts;	/* list of child elements */
+  struct soap_dom_attribute *atts;	/* list of attributes */
+  const char *nstr;			/* namespace string */
+  char *name;				/* element tag name */
+  char *data;				/* element content data (with SOAP_C_UTFSTRING flag set) */
+  wchar_t *wide;			/* element content data */
+  int type;				/* optional: serialized C/C++ data type */
+  void *node;				/* optional: pointer to serialized C/C++ data */
+  char *head;				/* leading whitespace to start tag */
+  char *tail;				/* leading whitespace to end tag */
+  struct soap *soap;			/* soap context that manages this node */
+#ifdef __cplusplus
+  typedef soap_dom_element_iterator iterator;
+  struct soap_dom_element &set(const char *nstr, const char *name);
+  struct soap_dom_element &set(const char *data);
+  struct soap_dom_element &set(void *node, int type);
+  struct soap_dom_element &add(struct soap_dom_element*);
+  struct soap_dom_element &add(struct soap_dom_element&);
+  struct soap_dom_element &add(struct soap_dom_attribute*);
+  struct soap_dom_element &add(struct soap_dom_attribute&);
+  soap_dom_element_iterator begin();
+  soap_dom_element_iterator end();
+  soap_dom_element_iterator find(const char *nstr, const char *name);
+  soap_dom_element_iterator find(int type);
+  void unlink();
+  soap_dom_element();
+  soap_dom_element(struct soap *soap);
+  soap_dom_element(struct soap *soap, const char *nstr, const char *name);
+  soap_dom_element(struct soap *soap, const char *nstr, const char *name, const char *data);
+  soap_dom_element(struct soap *soap, const char *nstr, const char *name, void *node, int type);
+  ~soap_dom_element();
+#endif
+};
+SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_dom_next_element(struct soap_dom_element *elt);
+SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_dom_next_attribute(struct soap_dom_attribute *att);
+#endif
+
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+}
+extern std::ostream &operator<<(std::ostream&, const struct soap_dom_element&);
+extern std::istream &operator>>(std::istream&, struct soap_dom_element&);
+extern "C" {
+#endif
+
+/******************************************************************************/
+
+struct soap
+{ short state;			/* 0 = uninitialized, 1 = initialized, 2 = copy of another soap struct */
+  short version;		/* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table) */
+  soap_mode mode;
+  soap_mode imode;
+  soap_mode omode;
+  const char *float_format;	/* user-definable format string for floats (<1024 chars) */
+  const char *double_format;	/* user-definable format string for doubles (<1024 chars) */
+  const char *dime_id_format;	/* user-definable format string for integer DIME id (<SOAP_TAGLEN chars) */
+  const char *http_version;	/* HTTP version used "1.0" or "1.1" */
+  const char *http_content;	/* optional custom response content type (with SOAP_FILE) */
+  const char *encodingStyle;	/* default = NULL which means that SOAP encoding is used */
+  const char *actor;		/* SOAP-ENV:actor or role attribute value */
+  int recv_timeout;		/* when > 0, gives socket recv timeout in seconds, < 0 in usec */
+  int send_timeout;		/* when > 0, gives socket send timeout in seconds, < 0 in usec */
+  int connect_timeout;		/* when > 0, gives socket connect() timeout in seconds, < 0 in usec */
+  int accept_timeout;		/* when > 0, gives socket accept() timeout in seconds, < 0 in usec */
+  int socket_flags;		/* socket recv() and send() flags, e.g. set to MSG_NOSIGNAL to disable sigpipe */
+  int connect_flags;		/* connect() SOL_SOCKET sockopt flags, e.g. set to SO_DEBUG to debug socket */
+  int bind_flags;		/* bind() SOL_SOCKET sockopt flags, e.g. set to SO_REUSEADDR to enable reuse */
+  int accept_flags;		/* accept() SOL_SOCKET sockopt flags */
+  const struct Namespace *namespaces;	/* Pointer to global namespace mapping table */
+  struct Namespace *local_namespaces;	/* Local namespace mapping table */
+  struct soap_nlist *nlist;	/* namespace stack */
+  struct soap_blist *blist;	/* block allocation stack */
+  struct soap_clist *clist;	/* class instance allocation list */
+  void *alist;			/* memory allocation (malloc) list */
+  struct soap_ilist *iht[SOAP_IDHASH];
+  struct soap_plist *pht[SOAP_PTRHASH];
+  struct soap_pblk *pblk;	/* plist block allocation */
+  short pidx;			/* plist block allocation */
+  struct SOAP_ENV__Header *header;
+  struct SOAP_ENV__Fault *fault;
+  int idnum;
+  void *user;			/* to pass user-defined data */
+  struct soap_plugin *plugins;	/* linked list of plug-in data */
+  char *userid;			/* HTTP Basic authorization userid */
+  char *passwd;			/* HTTP Basic authorization passwd */
+  int (*fpost)(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
+  int (*fget)(struct soap*);
+  int (*fform)(struct soap*);
+  int (*fposthdr)(struct soap*, const char*, const char*);
+  int (*fresponse)(struct soap*, int, size_t);
+  int (*fparse)(struct soap*);
+  int (*fparsehdr)(struct soap*, const char*, const char*);
+  int (*fresolve)(struct soap*, const char*, struct in_addr* inaddr);
+  int (*fconnect)(struct soap*, const char*, const char*, int);
+  int (*fdisconnect)(struct soap*);
+  int (*fclosesocket)(struct soap*, SOAP_SOCKET);
+  int (*fshutdownsocket)(struct soap*, SOAP_SOCKET, int);
+  int (*fopen)(struct soap*, const char*, const char*, int);
+  int (*faccept)(struct soap*, int, struct sockaddr*, int *n);
+  int (*fclose)(struct soap*);
+  int (*fsend)(struct soap*, const char*, size_t);
+  size_t (*frecv)(struct soap*, char*, size_t);
+  int (*fpoll)(struct soap*);
+  void (*fseterror)(struct soap*, const char **c, const char **s);
+  int (*fignore)(struct soap*, const char*);
+  int (*fserveloop)(struct soap*);
+  void *(*fplugin)(struct soap*, const char*);
+#ifndef WITH_LEANER
+  int (*fprepareinit)(struct soap*);
+  int (*fpreparesend)(struct soap*, const char*, size_t);
+  int (*fpreparerecv)(struct soap*, const char*, size_t);
+  int (*fpreparefinal)(struct soap*);
+  void *(*fdimereadopen)(struct soap*, void*, const char*, const char*, const char*);
+  void *(*fdimewriteopen)(struct soap*, const char*, const char*, const char*);
+  void (*fdimereadclose)(struct soap*, void*);
+  void (*fdimewriteclose)(struct soap*, void*);
+  size_t (*fdimeread)(struct soap*, void*, char*, size_t);
+  int (*fdimewrite)(struct soap*, void*, const char*, size_t);
+#endif
+  int master;
+  int socket;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  std::ostream *os;
+  std::istream *is;
+#else
+  void *os;	/* preserve alignment */
+  void *is;	/* preserve alignment */
+#endif
+#ifndef UNDER_CE
+  int sendfd;
+  int recvfd;
+#else
+  FILE *sendfd;
+  FILE *recvfd;
+#endif
+#ifdef WIN32
+  char errorstr[256];	/* buf for FormatMessage() */
+#endif
+  size_t bufidx;	/* index in soap.buf[] */
+  size_t buflen;	/* length of soap.buf[] content */
+  soap_wchar ahead;	/* parser lookahead */
+  short cdata;		/* CDATA parser state */
+  short body;		/* parsed XML element has a body or not */
+  unsigned int level;	/* XML nesting level */
+  size_t count;		/* message length counter */
+  size_t length;	/* message length as set by HTTP header */
+#ifdef WITH_FAST
+  char *labbuf;		/* look-aside buffer */
+  size_t lablen;	/* look-aside buffer allocated length */
+  size_t labidx;	/* look-aside buffer index to available part */
+#endif
+  char buf[SOAP_BUFLEN];/* send and receive buffer */
+  char tmpbuf[1024];	/* in/output buffer for HTTP headers, simpleType values, attribute names, and DIME >=1024 bytes */
+  char msgbuf[1024];	/* output buffer for (error) messages <=1024 bytes */
+  char tag[SOAP_TAGLEN];
+  char id[SOAP_TAGLEN];
+  char href[SOAP_TAGLEN];
+  char type[SOAP_TAGLEN];
+  char arrayType[SOAP_TAGLEN];
+  char arraySize[SOAP_TAGLEN];
+  char arrayOffset[SOAP_TAGLEN];
+  short other;
+  short position;
+  int positions[SOAP_MAXDIMS];
+  short root;
+  struct soap_attribute *attributes;	/* attribute list */
+  short encoding;	/* when set, output encodingStyle */
+  short mustUnderstand;	/* a mustUnderstand element was parsed or is output */
+  short keep_alive;	/* connection should be kept open */
+  short null;		/* parsed XML is xsi:nil */
+  short ns;		/* when not set, output full xmlns bindings */
+  short part;		/* parsing state */
+  short alloced;
+  short peeked;
+  size_t chunksize;
+  size_t chunkbuflen;
+  char endpoint[SOAP_TAGLEN];
+  char path[SOAP_TAGLEN];
+  char host[SOAP_TAGLEN];
+  char *action;
+  char *authrealm;		/* HTTP authentication realm */
+  char *prolog;			/* XML declaration prolog */
+  unsigned long ip;		/* IP number */
+  int port;			/* port number */
+  unsigned int max_keep_alive;
+  const char *proxy_host;	/* Proxy Server host name */
+  int proxy_port;		/* Proxy Server port (default = 8080) */
+  const char *proxy_userid;	/* Proxy Authorization user name */
+  const char *proxy_passwd;	/* Proxy Authorization password */
+  int status;			/* -1 when request, else error code to be returned by server */
+  int error;
+  int errmode;
+  int errnum;
+#ifndef WITH_LEANER
+  struct soap_dom_element *dom;
+  struct soap_dime dime;
+  struct soap_mime mime;
+  struct soap_xlist *xlist;
+#endif
+#if !defined(WITH_LEAN) || defined(SOAP_DEBUG)
+  const char *logfile[SOAP_MAXLOGS];
+  FILE *fdebug[SOAP_MAXLOGS];
+  struct soap_mlist *mht[SOAP_PTRHASH];
+#endif
+#ifndef WITH_LEAN
+  const char *c14ninclude;
+  const char *c14nexclude;
+  struct soap_cookie *cookies;
+  const char *cookie_domain;
+  const char *cookie_path;
+  int cookie_max;
+#endif
+#ifndef WITH_NOIO
+#ifdef WITH_IPV6
+  struct sockaddr_storage peer;	/* IPv6: set by soap_accept and by UDP recv */
+#else
+  struct sockaddr_in peer;	/* IPv4: set by soap_connect/soap_accept and by UDP recv */
+#endif
+  size_t peerlen;
+#endif
+#ifdef WITH_OPENSSL
+  int (*fsslauth)(struct soap*);
+  int (*fsslverify)(int, X509_STORE_CTX*);
+  BIO *bio;
+  SSL *ssl;
+  SSL_CTX *ctx;
+  short require_server_auth;
+  short require_client_auth;
+  short rsa;			/* when set, use RSA instead of DH */
+  const char *keyfile;
+  const char *password;
+  const char *dhfile;
+  const char *cafile;
+  const char *capath;
+  const char *crlfile;
+  const char *randfile;
+  SSL_SESSION *session;
+  char session_host[SOAP_TAGLEN];
+  int session_port;
+#endif
+#ifdef WITH_ZLIB
+  short zlib_state;		/* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_INFLATE */
+  short zlib_in;		/* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */
+  short zlib_out;		/* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */
+  z_stream d_stream;		/* decompression stream */
+  char z_buf[SOAP_BUFLEN];	/* buffer */
+  size_t z_buflen;
+  unsigned short z_level;	/* compression level to be used (0=none, 1=fast to 9=best) */
+  uLong z_crc;			/* internal gzip crc */
+  float z_ratio_in;		/* detected compression ratio compressed_length/length of inbound message */
+  float z_ratio_out;		/* detected compression ratio compressed_length/length of outbound message */
+#endif
+#ifdef WMW_RPM_IO
+  void *rpmreqid;
+#endif
+#ifndef WITH_LEAN
+#ifdef __cplusplus
+  soap();
+  soap(soap_mode);
+  soap(soap_mode, soap_mode);
+  soap(struct soap&);
+  ~soap();
+#endif
+#endif
+};
+
+struct soap_code_map
+{ long code;
+  const char *string;
+};
+
+/* forwarding list */
+struct soap_flist
+{ struct soap_flist *next;
+  int type;
+  void *ptr;
+  unsigned int level;
+  size_t len;
+  void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t);
+};
+
+/* id-ref forwarding list */
+struct soap_ilist
+{ struct soap_ilist *next;
+  int type;
+  size_t size;
+  void *link;
+  void *copy;
+  struct soap_flist *flist;
+  void *ptr;
+  unsigned int level;
+  char id[1]; /* the actual id string value flows into the allocated region below this struct */
+};
+
+struct soap_plugin
+{ struct soap_plugin *next;
+  const char *id;
+  void *data;
+  int (*fcopy)(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src);
+  void (*fdelete)(struct soap *soap, struct soap_plugin *p); /* should delete fields of plugin only and not free(p) */
+};
+
+#ifndef WITH_NONAMESPACES
+extern SOAP_NMAC struct Namespace namespaces[];
+#endif
+
+#ifndef WITH_LEAN
+# define soap_get0(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx])
+# define soap_get1(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx++])
+#else
+soap_wchar soap_get0(struct soap*);
+soap_wchar soap_get1(struct soap*);
+#endif
+
+#define soap_revget1(soap) ((soap)->bufidx--)
+#define soap_unget(soap, c) ((soap)->ahead = c)
+#define soap_register_plugin(soap, plugin) soap_register_plugin_arg(soap, plugin, NULL)
+#define soap_imode(soap, n) ((soap)->mode = (soap)->imode = (n))
+#define soap_set_imode(soap, n) ((soap)->imode |= (n))
+#define soap_clr_imode(soap, n) ((soap)->imode &= ~(n))
+#define soap_omode(soap, n) ((soap)->mode = (soap)->omode = (n))
+#define soap_set_omode(soap, n) ((soap)->omode |= (n))
+#define soap_clr_omode(soap, n) ((soap)->omode &= ~(n))
+#define soap_set_mode(soap, n) ((soap)->imode |= (n), (soap)->omode |= (n))
+#define soap_clr_mode(soap, n) ((soap)->imode &= ~(n), (soap)->omode &= ~(n))
+#define soap_destroy(soap) soap_delete((soap), NULL)
+
+#ifdef HAVE_STRRCHR
+# define soap_strrchr(s, t) strrchr(s, t)
+#else
+ SOAP_FMAC1 char* SOAP_FMAC2 soap_strrchr(const char *s, int t);
+#endif
+
+#ifdef HAVE_STRTOL
+# define soap_strtol(s, t, b) strtol(s, t, b)
+#else
+ SOAP_FMAC1 long SOAP_FMAC2 soap_strtol(const char *s, char **t, int b);
+#endif
+
+#ifdef HAVE_STRTOUL
+# define soap_strtoul(s, t, b) strtoul(s, t, b)
+#else
+ SOAP_FMAC1 unsigned long SOAP_FMAC2 soap_strtoul(const char *s, char **t, int b);
+#endif
+
+#if defined(WITH_OPENSSL)
+# define soap_random soap_rand()
+SOAP_FMAC1 int SOAP_FMAC2 soap_rand();
+#elif defined(HAVE_RANDOM)
+# define soap_random (int)random()
+#else
+# define soap_random rand()
+#endif
+
+#ifdef WITH_NOIDREF
+# define soap_embedded(s, p, t) (0)
+# define soap_id_lookup(s, i, p, t, n, k) (p)
+# define soap_id_forward(s, h, p, len, st, tt, n, k, fc) (p)
+# define soap_reference(s, a, t) (1)
+# define soap_array_reference(s, p, a, n, t) (1)
+# define soap_embed(s, p, a, n, t, pp) (0)
+# define soap_embedded_id(s, i, p, t) (i)
+# define soap_is_embedded(s, p) (0)
+# define soap_is_single(s, p) (1)
+# define soap_lookup_type(s, i) (0)
+# define soap_getindependent(s) (0)
+# define soap_putindependent(s) (0)
+# define soap_getelement(s, n) (n)
+# define soap_putelement(s, p, t, i, n) (0)
+# define soap_markelement(s, p, n) (0)
+#endif
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_fault(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultcode(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultsubcode(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultstring(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultdetail(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_serializeheader(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putheader(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getheader(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_serializefault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putfault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getfault(struct soap*);
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_ssl_init();
+SOAP_FMAC1 int SOAP_FMAC2 soap_poll(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_connect_command(struct soap*, int, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_connect(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_bind(struct soap*, const char*, int, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_accept(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_accept(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_server_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_client_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_puthttphdr(struct soap*, int status, size_t count);
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_get_header_attribute(struct soap*, const char*, const char*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_key(char*, size_t, const char*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_val(char*, size_t, const char*);
+
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_hash(const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_endpoint(struct soap*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_flush_raw(struct soap*, const char*, size_t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_flush(struct soap*);
+SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_get(struct soap*);
+SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getchar(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_tag_cmp(const char*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_fault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault_subcode(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault_subcode(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_sender_error(struct soap*, const char*, const char*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_receiver_error(struct soap*, const char*, const char*, int);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_send_raw(struct soap*, const char*, size_t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_raw(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_send(struct soap*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_send2(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_send3(struct soap*, const char*, const char*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_pututf8(struct soap*, unsigned long);
+SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getutf8(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_putbase64(struct soap*, const unsigned char*, int);
+SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_getbase64(struct soap*, int*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_puthex(struct soap*, const unsigned char*, int);
+SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_gethex(struct soap*, int*);
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_xop_forward(struct soap*, unsigned char**, int*, char**, char**, char**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_dime_forward(struct soap*, unsigned char**, int*, char**, char**, char**);
+#endif
+
+#ifndef WITH_NOIDREF
+SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup_id(struct soap*, void *p, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup(struct soap*, const void *p, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_enter(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_array_pointer_lookup(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type);
+SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_lookup(struct soap*, const char*);
+SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_enter(struct soap*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_resolve(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_embedded(struct soap*, const void *p, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_reference(struct soap*, const void *p, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_array_reference(struct soap*, const void *p, const struct soap_array *a, int n, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_embedded_id(struct soap*, int id, const void *p, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_is_embedded(struct soap*, struct soap_plist*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_is_single(struct soap*, struct soap_plist*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_embedded(struct soap*, struct soap_plist*);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_begin_count(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_end_count(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_begin_send(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_end_send(struct soap*);
+
+SOAP_FMAC1 const struct soap_code_map* SOAP_FMAC2 soap_code(const struct soap_code_map*, const char *str);
+SOAP_FMAC1 long SOAP_FMAC2 soap_int_code(const struct soap_code_map*, const char *str, long other);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_str_code(const struct soap_code_map*, long code);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_getline(struct soap*, char*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_begin_recv(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_end_recv(struct soap*);
+
+SOAP_FMAC1 void* SOAP_FMAC2 soap_malloc(struct soap*, size_t);
+SOAP_FMAC1 void SOAP_FMAC2 soap_dealloc(struct soap*, void*);
+SOAP_FMAC1 struct soap_clist * SOAP_FMAC2 soap_link(struct soap*, void*, int, int, void (*fdelete)(struct soap_clist*));
+SOAP_FMAC1 void SOAP_FMAC2 soap_unlink(struct soap*, const void*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_free(struct soap*);
+
+SOAP_FMAC1 void* SOAP_FMAC2 soap_track_malloc(struct soap*, const char*, int, size_t);
+SOAP_FMAC1 void SOAP_FMAC2 soap_track_free(struct soap*, const char*, int, void*);
+
+#ifndef WITH_NOIDREF
+SOAP_FMAC1 int SOAP_FMAC2 soap_lookup_type(struct soap*, const char *id);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_id_lookup(struct soap*, const char *id, void **p, int t, size_t n, unsigned int k);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_id_forward(struct soap*, const char *id, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void(*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t));
+#endif
+SOAP_FMAC1 void* SOAP_FMAC2 soap_id_enter(struct soap*, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*));
+SOAP_FMAC1 void SOAP_FMAC2 soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t, const void *q, size_t n);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_size(const int *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getoffsets(const char *, const int *, int *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getsize(const char *, const char *, int *);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getsizes(const char *, int *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getposition(const char *, int *);
+
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putsize(struct soap*, const char *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizesoffsets(struct soap*, const char *, const int *, const int *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizes(struct soap*, const char *, const int *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffset(struct soap*, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffsets(struct soap*, const int *, int);
+ 
+SOAP_FMAC1 int SOAP_FMAC2 soap_closesock(struct soap*);
+
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new(void);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new1(soap_mode);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new2(soap_mode, soap_mode);
+SOAP_FMAC1 void SOAP_FMAC2 soap_del(struct soap*);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy(struct soap*);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy_context(struct soap*, struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_init(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_init1(struct soap*, soap_mode);
+SOAP_FMAC1 void SOAP_FMAC2 soap_init2(struct soap*, soap_mode, soap_mode);
+SOAP_FMAC1 void SOAP_FMAC2 soap_done(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_cleanup(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_begin(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_end(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_delete(struct soap*, void*);
+
+#ifdef SOAP_DEBUG
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_recv_logfile(struct soap*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_sent_logfile(struct soap*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_test_logfile(struct soap*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_close_logfiles(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_open_logfile(struct soap*, int);
+#endif
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_token(struct soap*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_value(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_match_tag(struct soap*, const char*, const char *);
+SOAP_FMAC1 int SOAP_FMAC2 soap_match_array(struct soap*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_element(struct soap*, const char*, int, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_out(struct soap*, const char *tag, int id, const char *type);
+SOAP_FMAC1 int SOAP_FMAC2 soap_array_begin_out(struct soap*, const char *tag, int id, const char *type, const char *offset);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_ref(struct soap*, const char *tag, int id, int href);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_href(struct soap*, const char *tag, int id, const char *ref, const char *val);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_null(struct soap*, const char *tag, int id, const char *type);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_id(struct soap*, const char *tag, int id, const void *p, const struct soap_array *a, int d, const char *type, int n);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_result(struct soap*, const char *tag);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_out(struct soap*, const char *tag);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_start_end_out(struct soap*, const char *tag);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_attribute(struct soap*, const char*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_in(struct soap*, const char *tag, int nillable);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_in(struct soap*, const char *tag);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_peek_element(struct soap*);
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_retry(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_revert(struct soap*);
+
+SOAP_FMAC1 char* SOAP_FMAC2 soap_strdup(struct soap*, const char*);
+SOAP_FMAC1 const char * SOAP_FMAC2 soap_strsearch(const char *big, const char *little);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_string_out(struct soap*, const char *s, int flag);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_string_in(struct soap*, int, long, long);
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_wstring_out(struct soap*, const wchar_t *s, int flag);
+SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstring_in(struct soap*, int, long, long);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_match_namespace(struct soap*, const char *, const char*, int n1, int n2);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_namespaces(struct soap*, struct Namespace*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_local_namespaces(struct soap*);
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_pop_namespace(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_push_namespace(struct soap*, const char *,const char *);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_current_namespace(struct soap *soap, const char *tag);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_store_lab(struct soap*, const char*, size_t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_append_lab(struct soap*, const char*, size_t);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_new_block(struct soap*);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_push_block(struct soap*, size_t);
+SOAP_FMAC1 void SOAP_FMAC2 soap_pop_block(struct soap*);
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_size_block(struct soap*, size_t);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_first_block(struct soap*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_next_block(struct soap*);
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_block_size(struct soap*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_save_block(struct soap*, char*, int);
+SOAP_FMAC1 void SOAP_FMAC2 soap_end_block(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_out(struct soap*);
+SOAP_FMAC1 int soap_envelope_end_out(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_in(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_end_in(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_out(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_out(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_in(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_in(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_header(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_response(struct soap*, int);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_send_empty_response(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_empty_response(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_send_fault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_fault(struct soap*);
+
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault(struct soap*, FILE*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault_location(struct soap*, FILE*);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2byte(struct soap*, const char*, char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2short(struct soap*, const char*, short*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2int(struct soap*, const char*, int*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2long(struct soap*, const char*, long*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2LONG64(struct soap*, const char*, LONG64*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2float(struct soap*, const char*, float*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2double(struct soap*, const char*, double*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedByte(struct soap*, const char*, unsigned char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedShort(struct soap*, const char*, unsigned short*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedInt(struct soap*, const char*, unsigned int*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedLong(struct soap*, const char*, unsigned long*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2ULONG64(struct soap*, const char*, ULONG64*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2string(struct soap*, const char*, char**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2QName(struct soap*, const char*, char**);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2wchar(struct soap*, const char*, wchar_t**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2dateTime(struct soap*, const char*, time_t*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_s2base64(struct soap*, const unsigned char*, char*, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_s2hex(struct soap*, const unsigned char*, char*, int);
+#endif
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_byte2s(struct soap*, char);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_short2s(struct soap*, short);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_int2s(struct soap*, int);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_long2s(struct soap*, long);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_LONG642s(struct soap*, LONG64);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_float2s(struct soap*, float);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_double2s(struct soap*, double);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedByte2s(struct soap*, unsigned char);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedShort2s(struct soap*, unsigned short);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedInt2s(struct soap*, unsigned int);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedLong2s(struct soap*, unsigned long);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_ULONG642s(struct soap*, ULONG64);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_QName2s(struct soap*, const char*);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_wchar2s(struct soap*, const wchar_t*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_dateTime2s(struct soap*, time_t);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_base642s(struct soap*, const char*, char*, size_t, int*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_hex2s(struct soap*, const char*, char*, size_t, int*);
+#endif
+
+
+SOAP_FMAC1 int* SOAP_FMAC2 soap_inint(struct soap*, const char *tag, int *p, const char *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_inbyte(struct soap*, const char *tag, char *p, const char *, int);
+SOAP_FMAC1 long* SOAP_FMAC2 soap_inlong(struct soap*, const char *tag, long *p, const char *, int);
+SOAP_FMAC1 LONG64* SOAP_FMAC2 soap_inLONG64(struct soap*, const char *tag, LONG64 *p, const char *, int);
+SOAP_FMAC1 short* SOAP_FMAC2 soap_inshort(struct soap*, const char *tag, short *p, const char *, int);
+SOAP_FMAC1 float* SOAP_FMAC2 soap_infloat(struct soap*, const char *tag, float *p, const char *, int);
+SOAP_FMAC1 double* SOAP_FMAC2 soap_indouble(struct soap*, const char *tag, double *p, const char *, int);
+SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_inunsignedByte(struct soap*, const char *tag, unsigned char *p, const char *, int);
+SOAP_FMAC1 unsigned short* SOAP_FMAC2 soap_inunsignedShort(struct soap*, const char *tag, unsigned short *p, const char *, int);
+SOAP_FMAC1 unsigned int* SOAP_FMAC2 soap_inunsignedInt(struct soap*, const char *tag, unsigned int *p, const char *, int);
+SOAP_FMAC1 unsigned long* SOAP_FMAC2 soap_inunsignedLong(struct soap*, const char *tag, unsigned long *p, const char *, int);
+SOAP_FMAC1 ULONG64* SOAP_FMAC2 soap_inULONG64(struct soap*, const char *tag, ULONG64 *p, const char *, int);
+SOAP_FMAC1 char** SOAP_FMAC2 soap_instring(struct soap*, const char *tag, char **p, const char *, int, int, long, long);
+SOAP_FMAC1 char** SOAP_FMAC2 soap_inliteral(struct soap*, const char *tag, char **p);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 time_t* SOAP_FMAC2 soap_indateTime(struct soap*, const char *tag, time_t *p, const char *, int);
+#endif
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwstring(struct soap*, const char *tag, wchar_t **p, const char *, int, long, long);
+SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwliteral(struct soap*, const char *tag, wchar_t **p);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_outbyte(struct soap*, const char *tag, int id, const char *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outshort(struct soap*, const char *tag, int id, const short *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outint(struct soap*, const char *tag, int id, const int *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outlong(struct soap*, const char *tag, int id, const long *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outLONG64(struct soap*, const char *tag, int id, const LONG64 *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outfloat(struct soap*, const char *tag, int id, const float *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outdouble(struct soap*, const char *tag, int id, const double *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedByte(struct soap*, const char *tag, int id, const unsigned char *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedShort(struct soap*, const char *tag, int id, const unsigned short *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedInt(struct soap*, const char *tag, int id, const unsigned int *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedLong(struct soap*, const char *tag, int id, const unsigned long *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outULONG64(struct soap*, const char *tag, int id, const ULONG64 *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outstring(struct soap*, const char *tag, int id, char *const*p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outliteral(struct soap*, const char *tag, char *const*p);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 int SOAP_FMAC2 soap_outdateTime(struct soap*, const char *tag, int id, const time_t *p, const char *, int);
+#endif
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_outwstring(struct soap*, const char *tag, int id, wchar_t *const*p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outwliteral(struct soap*, const char *tag, wchar_t *const*p);
+#endif
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_attachment(struct soap *, const char*, int, const void*, const struct soap_array*, const char*, const char*, const char*, int, const char*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_move(struct soap*, long);
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_tell(struct soap*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_dime_option(struct soap*, unsigned short, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getdimehdr(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getdime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putdimehdr(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putdime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getmimehdr(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getmime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putmimehdr(struct soap*, struct soap_multipart*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putmime(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_dime(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_mime(struct soap*, const char *boundary, const char *start);
+SOAP_FMAC1 void SOAP_FMAC2 soap_clr_dime(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_clr_mime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_dime_attachment(struct soap*, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_mime_attachment(struct soap*, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description);
+SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_register_plugin_arg(struct soap*, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void*);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_lookup_plugin(struct soap*, const char*);
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_attr_value(struct soap *soap, const char *name, int flag);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_attr(struct soap *soap, const char *name, const char *value);
+SOAP_FMAC1 void SOAP_FMAC2 soap_clr_attr(struct soap *soap);
+
+#ifdef WITH_COOKIES
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_encode_cookie(const char*, char*, size_t);
+SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_set_cookie(struct soap*, const char*, const char*, const char*, const char*);
+SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_cookie(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern char* SOAP_FMAC2 soap_cookie_value(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern char* SOAP_FMAC2 soap_env_cookie_value(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern long SOAP_FMAC2 soap_cookie_expire(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_expire(struct soap*, const char*, long, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_session(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_clr_cookie_session(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern void SOAP_FMAC2 soap_clr_cookie(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_getenv_cookies(struct soap*);
+SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_copy_cookies(struct soap*);
+SOAP_FMAC1 extern void SOAP_FMAC2 soap_free_cookies(struct soap*);
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif
+
diff --git a/samples/ck/Makefile b/samples/ck/Makefile
new file mode 100644
index 0000000..b537d63
--- /dev/null
+++ b/samples/ck/Makefile
@@ -0,0 +1,23 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		ckclient ckserver
+ckclient:	ck.h ckclient.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) ck.h
+		$(CPP) -DWITH_COOKIES $(CFLAGS) -o ckclient ckclient.cpp soapC.cpp soapClient.cpp $(SOAPCPP) $(LIBS)
+ckserver:	ck.h ckserver.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) ck.h
+		$(CPP) -DWITH_COOKIES $(CFLAGS) -o ckserver ckserver.cpp soapC.cpp soapServer.cpp $(SOAPCPP) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h ckclient ckserver
diff --git a/samples/ck/MakefileSolaris b/samples/ck/MakefileSolaris
new file mode 100644
index 0000000..f7ccd8b
--- /dev/null
+++ b/samples/ck/MakefileSolaris
@@ -0,0 +1,23 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lxnet -lnsl -lsocket
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		ckclient ckserver
+ckclient:	ck.h ckclient.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) ck.h
+		$(CPP) -DWITH_COOKIES $(CFLAGS) -o ckclient ckclient.cpp soapC.cpp soapClient.cpp $(SOAPCPP) $(LIBS)
+ckserver:	ck.h ckserver.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) ck.h
+		$(CPP) -DWITH_COOKIES $(CFLAGS) -o ckserver ckserver.cpp soapC.cpp soapServer.cpp $(SOAPCPP) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h ckclient ckserver
diff --git a/samples/ck/ck.h b/samples/ck/ck.h
new file mode 100644
index 0000000..4554c04
--- /dev/null
+++ b/samples/ck/ck.h
@@ -0,0 +1,8 @@
+//gsoap ck service name:	ck
+//gsoap ck service style:	rpc
+//gsoap ck service encoding:	encoded
+//gsoap ck service location:	http://www.cs.fsu.edu/~engelen/ck.cgi
+//gsoap ck service namespace:	http://www.cs.fsu.edu/~engelen/ck.wsdl
+
+//gsoap ck schema  namespace:	urn:ck
+int ck__demo(char **r);
diff --git a/samples/ck/ckclient.cpp b/samples/ck/ckclient.cpp
new file mode 100644
index 0000000..72f6be9
--- /dev/null
+++ b/samples/ck/ckclient.cpp
@@ -0,0 +1,83 @@
+#include "soapH.h"
+#include "ck.nsmap"
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Example cookie client
+//
+////////////////////////////////////////////////////////////////////////////////
+
+static char *ckserver = "http://www.cs.fsu.edu/~engelen/ck.cgi";
+
+// To access a stand-alone server on a port, use:
+// char ckserver[] = "IP:PORT";
+// char ckserver[] = "http://IP:PORT";	// include HTTP header in request
+// char ckserver[] = "http://linprog1.cs.fsu.edu:18081";
+// char ckserver[] = ""; // use I/O redirect
+// char ckserver[] = "http://"; // use I/O redirect (includes HTTP headers)
+
+int main(int argc, char **argv)
+{ char *r;
+  struct soap soap;
+  if (argc >= 2)
+    ckserver = argv[1];
+  soap_init(&soap);
+
+  // gSOAP's cookie handling is fully automatic at the client-side.
+  // A database of cookies is kept and returned to the appropriate servers.
+  // In this demo, the value (int) of the (invisible) cookie is returned as
+  // an output parameter by the service to demonstrate that each call uses
+  // a unique and updated cookie. Cookies are not automatically saved to a
+  // file by the client. So the internal cookie database is discarded when
+  // the program terminates.
+
+  // To avoid "cookie storms" caused by malicious servers that return an 
+  // unreasonable amount of cookies, gSOAP clients/servers are restricted to
+  // a database size that the user can limit (32 cookies by default):
+  
+  soap.cookie_max = 10;
+
+  // In case all three calls below return the same cookie value 1, the service
+  // (ck.cgi) is unable to return cookies (e.g. because the Web server does
+  // not allow CGI applications to handle cookies which the user need to fix
+  // by reconfiguration and restart of the Web server). Or the
+  // soap.cookie_domain value is not set in the ckserver code to the host on
+  // which the service runs .
+
+  // First call (no cookies returned to service, service will return a cookie):
+  if (soap_call_ck__demo(&soap, ckserver, NULL, &r))
+  { soap_print_fault(&soap, stderr);
+    soap_print_fault_location(&soap, stderr);
+    exit(-1);
+  }
+  printf("The server responded with: %s\n", r);
+
+  // Second call (return cookie to service indicating continuation of session):
+  if (soap_call_ck__demo(&soap, ckserver, NULL, &r))
+  { soap_print_fault(&soap, stderr);
+    soap_print_fault_location(&soap, stderr);
+    exit(-1);
+  }
+  printf("The server responded with: %s\n", r);
+
+  // Third call (return cookie to service indicating continuation of session):
+  if (soap_call_ck__demo(&soap, ckserver, NULL, &r))
+  { soap_print_fault(&soap, stderr);
+    soap_print_fault_location(&soap, stderr);
+    exit(-1);
+  }
+  printf("The server responded with: %s\n", r);
+
+  // Fourth call (let cookie expire)
+  printf("Waiting 6 seconds to let cookie expire...\n");
+  sleep(6); // wait to let cookie expire
+  if (soap_call_ck__demo(&soap, ckserver, NULL, &r))
+  { soap_print_fault(&soap, stderr);
+    soap_print_fault_location(&soap, stderr);
+    exit(-1);
+  }
+  printf("The server responded with: %s\n", r);
+
+  soap_end(&soap);
+  return 0;
+}
diff --git a/samples/ck/ckserver.cpp b/samples/ck/ckserver.cpp
new file mode 100644
index 0000000..6dbeb8d
--- /dev/null
+++ b/samples/ck/ckserver.cpp
@@ -0,0 +1,72 @@
+#include "soapH.h"
+#include "ck.nsmap"
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Example cookie server
+//
+////////////////////////////////////////////////////////////////////////////////
+
+// Install as CGI application (ck.cgi).
+// Alternatively, run from command line to start a stand-alone server
+// $ ck.cgi <port> &
+// where <port> is a port number
+// Please see the ckclient.cpp file for cookie-related details.
+// Remember to change the soap.cookie_domain value to your host
+
+int main(int argc, char **argv)
+{ int m, s;
+  struct soap soap;
+  soap_init(&soap);
+  soap.cookie_domain = "www.cs.fsu.edu"; // must be the current host name (CGI/standalone)
+  //soap.cookie_domain = "linprog1.cs.fsu.edu"; // our stand-alone machine
+  soap.cookie_path = "/"; // the path which is used to filter/set cookies with this destination
+  if (argc < 2)
+  { soap_getenv_cookies(&soap); // CGI app: grab cookies from 'HTTP_COOKIE' env var
+    soap_serve(&soap);
+  }
+  else
+  { m = soap_bind(&soap, NULL, atoi(argv[1]), 100);
+    if (m < 0)
+      exit(1);
+    fprintf(stderr, "Socket connection successful %d\n", m);
+    for (int i = 1; ; i++)
+    { s = soap_accept(&soap);
+      if (s < 0)
+        exit(-1);
+      fprintf(stderr, "%d: accepted %d IP=%d.%d.%d.%d ... ", i, s, (int)(soap.ip>>24)&0xFF, (int)(soap.ip>>16)&0xFF, (int)(soap.ip>>8)&0xFF, (int)soap.ip&0xFF);
+      soap_serve(&soap);
+      fprintf(stderr, "served\n");
+      soap_end(&soap);		// clean up 
+      soap_free_cookies(&soap);	// remove all old cookies from database so no interference when new requests with new cookies arrive
+      // Note: threads can have their own cookie DB which they need to cleanup before they terminate
+    }
+  }
+  return 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Demo cookie
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int ck__demo(struct soap *soap, char **r)
+{ int n;
+  char *s, buf[16];
+  // The host and path are set by soap_cookie_domain and soap_cookie_path
+  // which MUST be the current domain and path of the CGI app or stand-alone
+  // server in order to accept cookies intended for this service
+  s = soap_cookie_value(soap, "demo", NULL, NULL); // cookie was returned by client?
+  if (s)
+    n = atoi(s)+1; // yes: increment int value as demo example session
+  else
+    n = 1; // no: return cookie with value 1 to client to start session
+  sprintf(buf, "%d", n);
+  soap_set_cookie(soap, "demo", buf, NULL, NULL);
+  soap_set_cookie_expire(soap, "demo", 5, NULL, NULL); // cookie expires in 5 seconds
+  if ((*r = (char*)soap_malloc(soap, strlen(buf)+1)))
+    strcpy(*r, buf);
+  return SOAP_OK;
+}
+
diff --git a/samples/components/README.txt b/samples/components/README.txt
new file mode 100644
index 0000000..0a82a4c
--- /dev/null
+++ b/samples/components/README.txt
@@ -0,0 +1,13 @@
+
+The wsdl2h tool can import multiple WSDL files at once to combine multiple
+clients and service into one executable. However, if there is a need to build
+clients and services from multiple gSOAP header files, then an alternative
+approach is required.
+
+The C and C++ examples in this directory illustrate how multiple clients and
+services can be compiled and linked into one executable from multiple gSOAP
+header files. The C examples accomplish this by merging statically declared
+serializers. The C++ examples accomplish this by using C++ namespaces to separate
+the serializers.
+
+See the README.txt in the c and cpp directories for more details.
diff --git a/samples/components/c/Makefile b/samples/components/c/Makefile
new file mode 100644
index 0000000..95a6bc8
--- /dev/null
+++ b/samples/components/c/Makefile
@@ -0,0 +1,31 @@
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I.. -I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+main:		main.c envC.o stdsoap2.o quoteClientLib.o rateClientLib.o calcServerLib.o
+		$(CC) $(CFLAGS) -o main main.c envC.o stdsoap2.o quoteClientLib.o rateClientLib.o calcServerLib.o
+stdsoap2.o:	stdsoap2.h stdsoap2.c
+		$(CC) $(CFLAGS) -DWITH_NONAMESPACES -c stdsoap2.c
+envC.o:		env.h header.h fault.h
+		soapcpp2 -CS -cpenv env.h
+		$(CC) $(CFLAGS) -c envC.c
+quoteClientLib.c:	quote.h
+		soapcpp2 -C -cn -pquote quote.h
+quoteClientLib.o:	quoteClientLib.c
+		$(CC) $(CFLAGS) -c quoteClientLib.c
+rateClientLib.c:	rate.h
+		soapcpp2 -C -cn -prate rate.h
+rateClientLib.o:	rateClientLib.c
+		$(CC) $(CFLAGS) -c rateClientLib.c
+calcServerLib.c:	calc.h
+		soapcpp2 -S -cn -pcalc calc.h
+calcServerLib.o:	calcServerLib.c
+		$(CC) $(CFLAGS) -c calcServerLib.c
+clean:		
+		rm -f *.o *.nsmap *H.h *Stub.h *C.cpp *C.c *Client.cpp *Client.c *ClientLib.c *ClientLib.cpp *Server.cpp *Server.c *ServerLib.c *ServerLib.cpp *ServiceObject.h *ServiceProxy.h
+distclean:		
+		rm -f main *.o *.wsdl *.xsd *.xml *.nsmap *H.h *Stub.h *C.cpp *C.c *Client.cpp *Client.c *ClientLib.c *ClientLib.cpp *Server.cpp *Server.c *ServerLib.c *ServerLib.cpp *ServiceObject.h *ServiceProxy.h
diff --git a/samples/components/c/README.txt b/samples/components/c/README.txt
new file mode 100644
index 0000000..501a5c5
--- /dev/null
+++ b/samples/components/c/README.txt
@@ -0,0 +1,13 @@
+This example demonstrates the use of the *ClientLib.c and *ServerLib.c
+generated files to combine multiple clients and service into one executable.
+
+Clients: XMethods delayed quote and exchange rate
+Service: calculator service
+
+To compile:
+make
+
+Usage:
+./main				runs CGI calculator service (install as CGI)
+./main <stock>			returns stock quote
+./main <stock> <currency>	returns stock quote in currency
diff --git a/samples/components/c/calc.h b/samples/components/c/calc.h
new file mode 100644
index 0000000..8614422
--- /dev/null
+++ b/samples/components/c/calc.h
@@ -0,0 +1,10 @@
+//gsoap ns service name:	Service
+//gsoap ns service style:	rpc
+//gsoap ns service encoding:	encoded
+//gsoap ns service location:	http://www.cs.fsu.edu/~engelen/calc.cgi
+//gsoap ns service namespace:	urn:calc
+
+int ns__add(double a, double b, double *result);
+int ns__sub(double a, double b, double *result);
+int ns__mul(double a, double b, double *result);
+int ns__div(double a, double b, double *result);
diff --git a/samples/components/c/env.h b/samples/components/c/env.h
new file mode 100644
index 0000000..4533193
--- /dev/null
+++ b/samples/components/c/env.h
@@ -0,0 +1,20 @@
+/*	env.h
+
+	Defines gSOAP environment shared by client and service modules
+
+	Imports SOAP Fault and SOAP Header structures, which will be
+	shared by client and service modules. The Header structure
+	should contain all fields required by the clients and services.
+
+	Copyright (C) 2000-2003 Robert A. van Engelen, Genivia inc.
+	All Rights Reserved.
+
+	Compile:
+	soapcpp2 -penv env.h
+	c++ -c envC.cpp
+	c++ -DWITH_NONAMESPACES -c stdsoap2.cpp
+
+*/
+
+#import "header.h"		// optional user-defined headers
+#import "fault.h"		// optional user-defined fault details
diff --git a/samples/components/c/fault.h b/samples/components/c/fault.h
new file mode 100644
index 0000000..21d4b91
--- /dev/null
+++ b/samples/components/c/fault.h
@@ -0,0 +1,40 @@
+/*	fault.h
+
+	Defines optional SOAP Fault derail data structures
+
+	Copyright (C) 2000-2004 Robert A. van Engelen. All Rights Reserved.
+
+*/
+
+/*
+
+Add any data structure you want to serialize as part of the SOAP Fault detail
+element. The detail element '__type' and 'value' fields should be set to
+transmit data. The fields are set when data of corresponding types are received.
+
+For example, we define an <element> of name <f:myData> with a string vector
+(note the leading _ in the following declaration):
+
+class _f__myData
+{ public:
+  std::vector<std::string*> *data;
+};
+
+To return a fault from your service application:
+soap_sender_fault(soap, "An error occurred", NULL));	// set soap fault
+soap->fault->detail = (struct SOAP_ENV__Detail*)soap_malloc(soap, sizeof(struct SOAP_ENV__Fault));
+soap->fault->detail->__type = SOAP_TYPE__f__myData;
+soap->fault->detail->value = soap_new__f__myData(soap, -1);
+return SOAP_FAULT;
+
+In addition, you can modify the SOAP_ENV__Detail struct and add your own set
+of fields, as in:
+
+struct SOAP_ENV__Detail
+{ struct f__myDataType f__myData;
+  int __type;
+  void *value;
+  char *__any;
+};
+ 
+*/
diff --git a/samples/components/c/header.h b/samples/components/c/header.h
new file mode 100644
index 0000000..b6d321a
--- /dev/null
+++ b/samples/components/c/header.h
@@ -0,0 +1,20 @@
+/*	header.h
+
+	Defines SOAP Header data structure shared by client and service modules.
+	As an example, authentication information can be included in the header.
+
+	Copyright (C) 2000-2002 Robert A. van Engelen. All Rights Reserved.
+
+*/
+
+//gsoap h schema namespace: http://websrv.cs.fsu.edu/~engelen/h.xsd
+
+struct h__authentication
+{ char *userid;
+  char *passwd;
+};
+
+struct SOAP_ENV__Header
+{ struct h__authentication *h__credentials;
+};
+
diff --git a/samples/components/c/main.c b/samples/components/c/main.c
new file mode 100644
index 0000000..55ca57c
--- /dev/null
+++ b/samples/components/c/main.c
@@ -0,0 +1,59 @@
+
+// must include envH.h first: it declares the SOAP Header and Fault structures
+// shared among the clients and services
+#include "envH.h"
+
+// include the quote and rate stubs and calc skeleton
+#include "quoteH.h"
+#include "rateH.h"
+#include "calcH.h"
+
+// include the XML namespace mapping tables
+#include "quote.nsmap"
+#include "rate.nsmap"
+#include "calc.nsmap"
+
+int main(int argc, char *argv[])
+{ struct soap *soap = soap_new();
+  if (argc <= 1)
+    return calc_serve(soap);
+  else
+  { float q;
+    if (soap_call_ns__getQuote(soap, NULL, NULL, argv[1], &q))
+      soap_print_fault(soap, stderr);
+    else
+    { if (argc > 2)
+      { float r;
+        if (soap_call_ns__getRate(soap, NULL, NULL, "us", argv[2], &r))
+          soap_print_fault(soap, stderr);
+        else
+          q *= r;
+      }
+      printf("%s: %g\n", argv[1], q);
+    }
+  }
+  soap_end(soap);
+  soap_done(soap);
+  free(soap);
+  return 0;
+}
+
+int ns__add(struct soap *soap, double a, double b, double *result)
+{ *result = a + b;
+  return SOAP_OK;
+}
+
+int ns__sub(struct soap *soap, double a, double b, double *result)
+{ *result = a - b;
+  return SOAP_OK;
+}
+
+int ns__mul(struct soap *soap, double a, double b, double *result)
+{ *result = a * b;
+  return SOAP_OK;
+}
+
+int ns__div(struct soap *soap, double a, double b, double *result)
+{ *result = a / b;
+  return SOAP_OK;
+}
diff --git a/samples/components/c/quote.h b/samples/components/c/quote.h
new file mode 100644
index 0000000..057b0db
--- /dev/null
+++ b/samples/components/c/quote.h
@@ -0,0 +1,8 @@
+//gsoap ns service name:	Service
+//gsoap ns service style:	rpc
+//gsoap ns service encoding:	encoded
+//gsoap ns service location:	http://services.xmethods.net/soap
+//gsoap ns service namespace:	urn:xmethods-delayed-quotes
+
+//gsoap ns service method-action: getQuote ""
+int ns__getQuote(char *symbol, float *Result);
diff --git a/samples/components/c/rate.h b/samples/components/c/rate.h
new file mode 100644
index 0000000..a4beb84
--- /dev/null
+++ b/samples/components/c/rate.h
@@ -0,0 +1,8 @@
+//gsoap ns service name:	Service
+//gsoap ns service style:	rpc
+//gsoap ns service encoding:	encoded
+//gsoap ns service location:	http://services.xmethods.net/soap
+//gsoap ns service namespace:	urn:xmethods-CurrencyExchange
+
+//gsoap ns service method-action: getRate ""
+int ns__getRate(char *country1, char *country2, float *Result);
diff --git a/samples/components/cpp/Makefile b/samples/components/cpp/Makefile
new file mode 100644
index 0000000..d235fe9
--- /dev/null
+++ b/samples/components/cpp/Makefile
@@ -0,0 +1,31 @@
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I.. -I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+main:		main.cpp envC.o stdsoap2.o quoteClientLib.o rateClientLib.o calcServerLib.o
+		$(CPP) $(CFLAGS) -o main main.cpp envC.o stdsoap2.o quoteClientLib.o rateClientLib.o calcServerLib.o
+stdsoap2.o:	stdsoap2.h stdsoap2.cpp
+		$(CPP) $(CFLAGS) -DWITH_NONAMESPACES -c stdsoap2.cpp
+envC.o:		env.h header.h fault.h
+		soapcpp2 -CS -penv env.h
+		$(CPP) $(CFLAGS) -c envC.cpp
+quoteClientLib.cpp:	quote.h
+		soapcpp2 -C -n quote.h
+quoteClientLib.o:	quoteClientLib.cpp
+		$(CPP) $(CFLAGS) -c quoteClientLib.cpp
+rateClientLib.cpp:	rate.h
+		soapcpp2 -C -n rate.h
+rateClientLib.o:	rateClientLib.cpp
+		$(CPP) $(CFLAGS) -c rateClientLib.cpp
+calcServerLib.cpp:	calc.h
+		soapcpp2 -S -n calc.h
+calcServerLib.o:	calcServerLib.cpp
+		$(CPP) $(CFLAGS) -c calcServerLib.cpp
+clean:		
+		rm -f *.o *.nsmap *H.h *Stub.h *C.cpp *C.c *Client.cpp *Client.c *ClientLib.c *ClientLib.cpp *Server.cpp *Server.c *ServerLib.c *ServerLib.cpp *ServiceObject.h *ServiceProxy.h
+distclean:		
+		rm -f main *.o *.wsdl *.xsd *.xml *.nsmap *H.h *Stub.h *C.cpp *C.c *Client.cpp *Client.c *ClientLib.c *ClientLib.cpp *Server.cpp *Server.c *ServerLib.c *ServerLib.cpp *ServiceObject.h *ServiceProxy.h
diff --git a/samples/components/cpp/README.txt b/samples/components/cpp/README.txt
new file mode 100644
index 0000000..a6e1523
--- /dev/null
+++ b/samples/components/cpp/README.txt
@@ -0,0 +1,15 @@
+This example demonstrates the use of C++ namespaces to combine clients and a
+service into a single executable.
+
+The client proxies and server object are separated by C++ namespaces.
+
+Clients: XMethods delayed quote and exchange rate
+Service: calculator service
+
+Compile:
+make
+
+Usage:
+./main				runs CGI calculator service (install as CGI)
+./main <stock>			returns stock quote
+./main <stock> <currency>	returns stock quote in currency
diff --git a/samples/components/cpp/calc.h b/samples/components/cpp/calc.h
new file mode 100644
index 0000000..39ca85d
--- /dev/null
+++ b/samples/components/cpp/calc.h
@@ -0,0 +1,14 @@
+namespace calc {
+
+//gsoap ns service name:	Service
+//gsoap ns service style:	rpc
+//gsoap ns service encoding:	encoded
+//gsoap ns service location:	http://www.cs.fsu.edu/~engelen/calc.cgi
+//gsoap ns service namespace:	urn:calc
+
+int ns__add(double a, double b, double *result);
+int ns__sub(double a, double b, double *result);
+int ns__mul(double a, double b, double *result);
+int ns__div(double a, double b, double *result);
+
+}
diff --git a/samples/components/cpp/env.h b/samples/components/cpp/env.h
new file mode 100644
index 0000000..4533193
--- /dev/null
+++ b/samples/components/cpp/env.h
@@ -0,0 +1,20 @@
+/*	env.h
+
+	Defines gSOAP environment shared by client and service modules
+
+	Imports SOAP Fault and SOAP Header structures, which will be
+	shared by client and service modules. The Header structure
+	should contain all fields required by the clients and services.
+
+	Copyright (C) 2000-2003 Robert A. van Engelen, Genivia inc.
+	All Rights Reserved.
+
+	Compile:
+	soapcpp2 -penv env.h
+	c++ -c envC.cpp
+	c++ -DWITH_NONAMESPACES -c stdsoap2.cpp
+
+*/
+
+#import "header.h"		// optional user-defined headers
+#import "fault.h"		// optional user-defined fault details
diff --git a/samples/components/cpp/fault.h b/samples/components/cpp/fault.h
new file mode 100644
index 0000000..21d4b91
--- /dev/null
+++ b/samples/components/cpp/fault.h
@@ -0,0 +1,40 @@
+/*	fault.h
+
+	Defines optional SOAP Fault derail data structures
+
+	Copyright (C) 2000-2004 Robert A. van Engelen. All Rights Reserved.
+
+*/
+
+/*
+
+Add any data structure you want to serialize as part of the SOAP Fault detail
+element. The detail element '__type' and 'value' fields should be set to
+transmit data. The fields are set when data of corresponding types are received.
+
+For example, we define an <element> of name <f:myData> with a string vector
+(note the leading _ in the following declaration):
+
+class _f__myData
+{ public:
+  std::vector<std::string*> *data;
+};
+
+To return a fault from your service application:
+soap_sender_fault(soap, "An error occurred", NULL));	// set soap fault
+soap->fault->detail = (struct SOAP_ENV__Detail*)soap_malloc(soap, sizeof(struct SOAP_ENV__Fault));
+soap->fault->detail->__type = SOAP_TYPE__f__myData;
+soap->fault->detail->value = soap_new__f__myData(soap, -1);
+return SOAP_FAULT;
+
+In addition, you can modify the SOAP_ENV__Detail struct and add your own set
+of fields, as in:
+
+struct SOAP_ENV__Detail
+{ struct f__myDataType f__myData;
+  int __type;
+  void *value;
+  char *__any;
+};
+ 
+*/
diff --git a/samples/components/cpp/header.h b/samples/components/cpp/header.h
new file mode 100644
index 0000000..f8e1f97
--- /dev/null
+++ b/samples/components/cpp/header.h
@@ -0,0 +1,20 @@
+/*	header.h
+
+	Defines SOAP Header data structure shared by client and service modules
+	As an example, authentication information can be included in the header.
+
+	Copyright (C) 2000-2002 Robert A. van Engelen. All Rights Reserved.
+
+*/
+
+//gsoap h schema namespace: http://websrv.cs.fsu.edu/~engelen/h.xsd
+
+struct h__authentication
+{ char *userid;
+  char *passwd;
+};
+
+struct SOAP_ENV__Header
+{ struct h__authentication *h__credentials;
+};
+
diff --git a/samples/components/cpp/main.cpp b/samples/components/cpp/main.cpp
new file mode 100644
index 0000000..25f4498
--- /dev/null
+++ b/samples/components/cpp/main.cpp
@@ -0,0 +1,63 @@
+
+// must include envH.h first: it declares the SOAP Header and Fault structures
+// shared among the clients and services
+#include "envH.h"
+
+// include the quote and rate proxies and calc object
+#include "quoteServiceProxy.h"
+#include "rateServiceProxy.h"
+#include "calcServiceObject.h"
+
+// include the XML namespace mapping tables
+#include "quote.nsmap"
+#include "rate.nsmap"
+#include "calc.nsmap"
+
+using namespace std;
+
+int main(int argc, char *argv[])
+{ if (argc <= 1)
+  { calc::Service calc;
+    return calc.serve();
+  }
+  quote::Service quote;
+  float q;
+  if (quote.ns__getQuote(argv[1], q))
+    soap_print_fault(quote.soap, stderr);
+  else
+  { if (argc > 2)
+    { rate::Service rate;
+      float r;
+      if (rate.ns__getRate("us", argv[2], r))
+        soap_print_fault(rate.soap, stderr);
+      else
+        q *= r;
+    }
+    cout << argv[1] << ": " << q << endl;
+  }
+  return 0;
+}
+
+namespace calc {
+
+int ns__add(struct soap *soap, double a, double b, double *result)
+{ *result = a + b;
+  return SOAP_OK;
+}
+
+int ns__sub(struct soap *soap, double a, double b, double *result)
+{ *result = a - b;
+  return SOAP_OK;
+}
+
+int ns__mul(struct soap *soap, double a, double b, double *result)
+{ *result = a * b;
+  return SOAP_OK;
+}
+
+int ns__div(struct soap *soap, double a, double b, double *result)
+{ *result = a / b;
+  return SOAP_OK;
+}
+
+}
diff --git a/samples/components/cpp/quote.h b/samples/components/cpp/quote.h
new file mode 100644
index 0000000..bbec978
--- /dev/null
+++ b/samples/components/cpp/quote.h
@@ -0,0 +1,12 @@
+namespace quote {
+
+//gsoap ns service name:	Service
+//gsoap ns service style:	rpc
+//gsoap ns service encoding:	encoded
+//gsoap ns service location:	http://services.xmethods.net/soap
+//gsoap ns service namespace:	urn:xmethods-delayed-quotes
+
+//gsoap ns service method-action: getQuote ""
+int ns__getQuote(char *symbol, float &Result);
+
+}
diff --git a/samples/components/cpp/rate.h b/samples/components/cpp/rate.h
new file mode 100644
index 0000000..51093b7
--- /dev/null
+++ b/samples/components/cpp/rate.h
@@ -0,0 +1,12 @@
+namespace rate {
+
+//gsoap ns service name:	Service
+//gsoap ns service style:	rpc
+//gsoap ns service encoding:	encoded
+//gsoap ns service location:	http://services.xmethods.net/soap
+//gsoap ns service namespace:	urn:xmethods-CurrencyExchange
+
+//gsoap ns service method-action: getRate ""
+int ns__getRate(char *country1, char *country2, float &Result);
+
+}
diff --git a/samples/dime/Makefile b/samples/dime/Makefile
new file mode 100644
index 0000000..b7f78de
--- /dev/null
+++ b/samples/dime/Makefile
@@ -0,0 +1,23 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		dimeclient dimeserver
+dimeclient:	dime.h dimeclient.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) dime.h
+		$(CPP) $(CFLAGS) -o dimeclient dimeclient.cpp soapC.cpp soapClient.cpp $(SOAPCPP) $(LIBS)
+dimeserver:	dime.h dimeserver.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) dime.h
+		$(CPP) $(CFLAGS) -o dimeserver dimeserver.cpp soapC.cpp soapServer.cpp $(SOAPCPP) -lpthread $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h dimeclient dimeserver
diff --git a/samples/dime/MakefileSolaris b/samples/dime/MakefileSolaris
new file mode 100644
index 0000000..3fcbfef
--- /dev/null
+++ b/samples/dime/MakefileSolaris
@@ -0,0 +1,23 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lxnet -lnsl -lsocket
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		dimeclient dimeserver
+dimeclient:	dime.h dimeclient.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) dime.h
+		$(CPP) $(CFLAGS) -o dimeclient dimeclient.cpp soapC.cpp soapClient.cpp $(SOAPCPP) $(LIBS)
+dimeserver:	dime.h dimeserver.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) dime.h
+		$(CPP) $(CFLAGS) -o dimeserver dimeserver.cpp soapC.cpp soapServer.cpp $(SOAPCPP) -lpthread $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h dimeclient dimeserver
diff --git a/samples/dime/dime.h b/samples/dime/dime.h
new file mode 100644
index 0000000..63b73f7
--- /dev/null
+++ b/samples/dime/dime.h
@@ -0,0 +1,41 @@
+//gsoap ns service name:	dime
+//gsoap ns service style:	rpc
+//gsoap ns service encoding:	encoded
+//gsoap ns service namespace:	http://websrv.cs.fsu.edu/~engelen/dime.wsdl
+//gsoap ns service location:	http://websrv.cs.fsu.edu/~engelen/dimesrv.cgi
+
+//gsoap ns schema  namespace:	urn:dime
+class ns__Data
+{ unsigned char *__ptr; /* points to data */
+  int __size;		/* size of data */
+  char *id;		/* dime attachment ID (set to NULL to obtain unique cid) */
+  char *type;		/* dime attachment content type */
+  char *options;	/* dime attachment options (optional) */
+  ns__Data();
+  struct soap *soap;	/* soap context that created this instance */
+};
+class arrayOfData	/* SOAP array of data */
+{ ns__Data *__ptr;
+  int __size;
+  arrayOfData();
+  arrayOfData(struct soap*, int);
+  virtual ~arrayOfData();
+  int size();
+  void resize(int);
+  ns__Data& operator[](int) const;
+  struct soap *soap;
+};
+class arrayOfName	/* SOAP array of strings */
+{ char **__ptr;
+  int __size;
+  arrayOfName();
+  arrayOfName(struct soap*, int);
+  virtual ~arrayOfName();
+  int size();
+  void resize(int);
+  char*& operator[](int) const;
+  struct soap *soap;
+};
+int ns__putData(arrayOfData *data, arrayOfName *names);
+int ns__getData(arrayOfName *names, arrayOfData *data);
+int ns__getImage(char *name, ns__Data &image);
diff --git a/samples/dime/dimeclient.cpp b/samples/dime/dimeclient.cpp
new file mode 100644
index 0000000..0db1f71
--- /dev/null
+++ b/samples/dime/dimeclient.cpp
@@ -0,0 +1,388 @@
+/*	dimeclient.cpp
+
+	Example streaming DIME client for DIME server (dimeserver.cpp).
+	Supports three methods:
+
+	putData stores multiple data sets on the server and returns
+		named references to each data set
+	getData retrieves data sets given named references.
+	getImage is an example file-based image retrieval method
+
+	Change the endpoint in dime.h to your needs.
+
+	Copyright (C) 2000-2003 Robert A. van Engelen, Genivia, Inc.
+	All Rights Reserved.
+
+	Usage (server):
+
+	Start dimeserver on your host at port 8085 (see dimeserver.cpp):
+
+	dimeserver 8085 &
+
+	Usage (client):
+
+	dimeclient [-p] [-g] [-i] name ...
+
+	dimeclient
+		Without args retrieves image.jpg
+	dimeclient name
+		Retrieves image stored under name
+	dimeclient -p name1 name2 ...
+		Stores files name1, name2, etc. The storage keys are printed.
+		The keys provide access to the data on the server.
+	dimeclient -g name1 name2 ...
+		Retrieves files stored under keys name1, name2, etc.
+		The keys must correspond to the keys returned when storing
+		files. Files are stored locally under the key name.
+
+	Unix/Linux: add a sigpipe handler to avoid broken pipes.
+*/
+
+#include "soapH.h"
+#include "dime.nsmap"
+#include <assert.h>
+
+// use the default endpoint set in dime.h for demo:
+const char *endpoint = NULL;
+// use the localhost for -p and -g (put and get):
+const char *localhost = "http://localhost:8085";
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Forward decls
+//
+////////////////////////////////////////////////////////////////////////////////
+
+static void putData(struct soap*, int, char**);
+static void getData(struct soap*, int, char**);
+static void getImage(struct soap*, char*);
+static void saveData(ns__Data&, const char*);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Streaming DIME attachment content handlers
+//
+////////////////////////////////////////////////////////////////////////////////
+
+static void *dime_read_open(struct soap*, void*, const char*, const char*, const char*);
+static void dime_read_close(struct soap*, void*);
+static size_t dime_read(struct soap*, void*, char*, size_t);
+static void *dime_write_open(struct soap*, const char*, const char*, const char*);
+static void dime_write_close(struct soap*, void*);
+static int dime_write(struct soap*, void*, const char*, size_t);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Main
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int main(int argc, char **argv)
+{ struct soap soap;
+  // use HTTP 1.1 chunking
+  // HTTP chunking allows streaming of DIME content without requiring DIME attachment size to be set
+  // DIME attachments can be streamed without chunking ONLY if the attachment size is set
+  soap_init1(&soap, SOAP_IO_CHUNK);
+  // set DIME callbacks
+  soap.fdimereadopen = dime_read_open;
+  soap.fdimereadclose = dime_read_close;
+  soap.fdimeread = dime_read;
+  soap.fdimewriteopen = dime_write_open;
+  soap.fdimewriteclose = dime_write_close;
+  soap.fdimewrite = dime_write;
+  // connect timeout value (not supported by Linux)
+  soap.connect_timeout = 10;
+  // IO timeouts
+  soap.send_timeout = 30;
+  soap.recv_timeout = 30;
+  // Unix/Linux SIGPIPE, this is OS dependent:
+  // soap.accept_flags = SO_NOSIGPIPE;	// some systems like this
+  // soap.socket_flags = MSG_NOSIGNAL;	// others need this
+  // signal(SIGPIPE, sigpipe_handle);	// or a sigpipe handler (portable)
+  if (argc < 3)
+  { char *name;
+    if (argc < 2)
+      name = "image.jpg";
+    else
+      name = argv[1];
+    getImage(&soap, name);
+  }
+  else
+  { switch (argv[1][1])
+    { case 'p':
+	endpoint = localhost;
+        putData(&soap, argc, argv);
+        break;
+      case 'g':
+	endpoint = localhost;
+        getData(&soap, argc, argv);
+        break;
+      default:
+        fprintf(stderr, "Usage: [-p] [-g] name ...\n");
+	exit(0);
+    }
+  }
+  soap_destroy(&soap);
+  soap_end(&soap);
+  soap_done(&soap);
+  return SOAP_OK;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Helper functions
+//
+////////////////////////////////////////////////////////////////////////////////
+
+static void putData(struct soap *soap, int argc, char **argv)
+{ arrayOfData data;
+  arrayOfName names;
+  data.resize(argc - 2);
+  for (int i = 2; i < argc; i++)
+  { data[i - 2].__ptr = (unsigned char*)argv[i];
+    // MUST set id or type to enable DIME
+    // zero size indicates streaming DIME (this requires HTTP chunking)
+    data[i - 2].type = "";
+  }
+  if (soap_call_ns__putData(soap, endpoint, NULL, &data, &names))
+    soap_print_fault(soap, stderr);
+  else
+  { printf("Data stored with keys:\n");
+    for (int j = 0; j < names.size(); j++)
+      printf("\t%s\n", names[j]);
+    printf("Use these keys to retrieve the data\n");
+  }
+}
+
+static void getData(struct soap *soap, int argc, char **argv)
+{ arrayOfData data;
+  arrayOfName names;
+  names.resize(argc - 2);
+  for (int i = 2; i < argc; i++)
+    names[i - 2] = argv[i];
+  soap->user = (void*)names.__ptr;
+  if (soap_call_ns__getData(soap, endpoint, NULL, &names, &data))
+    soap_print_fault(soap, stderr);
+  else
+  { for (int j = 0; j < data.size(); j++)
+      if (!data[j].id)
+        saveData(data[j], argv[j + 2]);
+    printf("Data retrieved\n");
+  }
+}
+
+static void getImage(struct soap *soap, char *name)
+{ ns__Data image;
+  arrayOfName temp;
+  temp.resize(1);
+  temp[0] = name;
+  soap->user = (void*)temp.__ptr;
+  if (soap_call_ns__getImage(soap, endpoint, NULL, name, image))
+    soap_print_fault(soap, stderr);
+  else if (image.id)
+  { if (image.__size)
+      printf("Got image %s size=%d type=%s through streaming DIME\n", name, image.__size, image.type?image.type:"");
+    else
+      printf("Got image %s type=%s through chunked streaming DIME\n", name, image.type?image.type:"");
+  }
+  else
+  { printf("Got image %s\n", name);
+    saveData(image, name);
+  }
+}
+
+static void saveData(ns__Data& data, const char *name)
+{ char *buf = (char*)data.__ptr;
+  int len = data.__size;
+  FILE *fd = fopen(name, "wb");
+  if (!fd)
+  { fprintf(stderr, "Cannot save file %s\n", name);
+    return;
+  }
+  while (len)
+  { size_t nwritten = fwrite(buf, 1, len, fd);
+    if (!nwritten)
+    { fprintf(stderr, "Cannot write to %s\n", name);
+      return;
+    }
+    len -= nwritten;
+    buf += nwritten;
+  }
+  printf("Saved file %s\n", name);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Streaming DIME attachment content handlers
+//
+////////////////////////////////////////////////////////////////////////////////
+
+static void *dime_read_open(struct soap *soap, void *handle, const char *id, const char *type, const char *options)
+{ FILE *fd;
+  // we should return NULL without setting soap->error if we don't want to use the streaming callback for this DIME attachment. The handle contains the non-NULL __ptr field value which should have been set in the application.
+  // return value of this function will be passed on to the fdimeread and fdimereadclose callbacks. The return value will not affect the __ptr field.
+  fd = fopen((char*)handle, "rb");
+  return (void*)fd;
+}
+
+static void dime_read_close(struct soap *soap, void *handle)
+{ fclose((FILE*)handle);
+}
+
+static size_t dime_read(struct soap *soap, void *handle, char *buf, size_t len)
+{ return fread(buf, 1, len, (FILE*)handle);
+}
+
+static void *dime_write_open(struct soap *soap, const char *id, const char *type, const char *options)
+{ // we can return NULL without setting soap->error if we don't want to use the streaming callback for this DIME attachment
+  FILE *handle = NULL;
+  char *name;
+  // get file name from options (not '\0' terminated)
+  if (options)
+  { size_t len = ((unsigned char)options[2] << 8) | ((unsigned char)options[3]); // option string length
+    name = (char*)soap_malloc(soap, len + 1);
+    strncpy(name, options + 4, len);
+    name[len] = '\0';
+    handle = fopen(name, "wb");
+    if (!handle)
+    { soap->error = SOAP_EOF; // could not open file for writing
+      soap->errnum = errno; // get reason
+      return NULL;
+    }
+  }
+  else 
+    soap->error = soap_receiver_fault(soap, "Cannot save to file, because no file name was present in attachment", NULL);
+  return (void*)handle;
+}
+
+static void dime_write_close(struct soap *soap, void *handle)
+{ fclose((FILE*)handle);
+}
+
+static int dime_write(struct soap *soap, void *handle, const char *buf, size_t len)
+{ while (len)
+  { size_t nwritten = fwrite(buf, 1, len, (FILE*)handle);
+    if (!nwritten)
+    { soap->errnum = errno; // get reason
+      return SOAP_EOF;
+    }
+    len -= nwritten;
+    buf += nwritten;
+  }
+  return SOAP_OK;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	ns__Data class
+//
+////////////////////////////////////////////////////////////////////////////////
+
+ns__Data::ns__Data()
+{ __ptr = NULL;
+  __size = 0;
+  id = NULL;
+  type = NULL;
+  options = NULL;
+  soap = NULL;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	arrayOfData class
+//
+////////////////////////////////////////////////////////////////////////////////
+
+arrayOfData::arrayOfData()
+{ __ptr = NULL;
+  __size = 0;
+  soap = NULL;
+}
+
+arrayOfData::arrayOfData(struct soap *soap, int n)
+{ __ptr = NULL;
+  __size = 0;
+  this->soap = soap;
+  resize(n);
+}
+
+arrayOfData::~arrayOfData()
+{ resize(0);
+}
+
+int arrayOfData::size()
+{ return __size;
+}
+
+void arrayOfData::resize(int n)
+{ if (__ptr)
+  { if (soap) // if created by soap environment
+      soap_delete(soap, __ptr); // then delete
+    else
+      delete[] __ptr;
+  }
+  __size = n;
+  if (n <= 0)
+    __ptr = NULL;
+  else if (soap)
+    __ptr = soap_new_ns__Data(soap, n);
+  else
+    __ptr = new ns__Data[n];
+}
+
+ns__Data& arrayOfData::operator[](int i) const
+{ assert(__ptr && i >= 0 && i < __size);
+  return __ptr[i];
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	arrayOfName class
+//
+////////////////////////////////////////////////////////////////////////////////
+
+arrayOfName::arrayOfName()
+{ __ptr = NULL;
+  __size = 0;
+  soap = NULL;
+}
+
+arrayOfName::arrayOfName(struct soap *soap, int n)
+{ __ptr = NULL;
+  __size = 0;
+  this->soap = soap;
+  resize(n);
+}
+
+arrayOfName::~arrayOfName()
+{ resize(0);
+}
+
+int arrayOfName::size()
+{ return __size;
+}
+
+void arrayOfName::resize(int n)
+{ if (__ptr)
+  { if (soap) // if created by soap environment
+      soap_delete(soap, __ptr); // then delete
+    else
+      free(__ptr);
+  }
+  __size = n;
+  if (n <= 0)
+    __ptr = NULL;
+  else
+  { if (soap)
+      __ptr = (char**)soap_malloc(soap, sizeof(char*) * n);
+    else
+      __ptr = (char**)malloc(sizeof(char*) * n);
+    memset(__ptr, 0, n);
+  }
+}
+
+char*& arrayOfName::operator[](int i) const
+{ assert(__ptr && i >= 0 && i < __size);
+  return __ptr[i];
+}
+
diff --git a/samples/dime/dimeserver.cpp b/samples/dime/dimeserver.cpp
new file mode 100644
index 0000000..4df2a78
--- /dev/null
+++ b/samples/dime/dimeserver.cpp
@@ -0,0 +1,495 @@
+/*	dimeserver.cpp
+
+	Example streaming DIME server. Supports three methods:
+
+	putData stores multiple data sets on the server and returns named keys
+		to each data set. The keys are unique and provide access to
+		the data. Once data is stored, it cannot be removed.
+	getData retrieves data sets given a set of named keys.
+	getImage is an example file-based image retrieval method
+
+	Data is stored in the current directory or the directory specified
+	by the TMPDIR environment variable.
+
+	Runs as CGI (not multi-threaded) or multi-threaded stand-alone
+	Web service
+
+	Copyright (C) 2000-2003 Robert A. van Engelen, Genivia, Inc.
+	All Rights Reserved.
+
+	NOTE: THE SERVER WILL ONLY SEND FILES THAT ARE IN THE CURRENT DIR FOR
+	SECURITY REASONS. HOWEVER, THE AUTHOR IS NOT RESPONSIBLE FOR ANY DAMAGES
+	THAT MAY RESULT FROM THE USE OF THIS PROGRAM.
+	
+	Usage:
+	For stand-alone Web service functionality, run from the command line
+	with port number as command line argument, e.g.
+	> dimeserver 8085 &
+	Use port 80 to run as HTTP Web server accessible over the Web
+	Change the 'endpoint' in 'dimeclient.cpp' to
+	endpoint="http://machine:8085"
+	where 'machine' is the host name of the machine on which the service
+	runs, or 'localhost' if the server runs on the same machine. Be careful
+	to run the client in a separate directory from the server. Otherwise,
+	the client and server may interfere in their file access.
+
+	The service is multi-threaded. Multi-threading is not required, but can
+	improve QoS. Remove the pthread code to obtain a non-multi-threaded
+	service.
+
+	Unix/Linux: add a sigpipe handler to avoid broken pipes with
+	stand-alone server.
+
+*/
+
+
+#include "soapH.h"
+#include "dime.nsmap"
+#include <pthread.h>	// use Pthreads
+#include <sys/stat.h>	// use fstat() for streaming DIME
+#include <assert.h>
+
+#define BACKLOG		(100)	// max request backlog
+#define MAX_FILE_SIZE	(10000)	// max file size when buffering file for HTTP 1.0 and file size cannot be determined
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Forward decls
+//
+////////////////////////////////////////////////////////////////////////////////
+
+static void *process_request(void*);
+static int getdata(struct soap*, const char*, ns__Data&);
+static void saveData(ns__Data&, const char*);
+static void sigpipe_handle(int);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Streaming DIME attachment content handlers
+//
+////////////////////////////////////////////////////////////////////////////////
+
+static void *dime_read_open(struct soap*, void*, const char*, const char*, const char*);
+static void dime_read_close(struct soap*, void*);
+static size_t dime_read(struct soap*, void*, char*, size_t);
+static void *dime_write_open(struct soap*, const char*, const char*, const char*);
+static void dime_write_close(struct soap*, void*);
+static int dime_write(struct soap*, void*, const char*, size_t);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Data for streaming DIME write handler
+//
+////////////////////////////////////////////////////////////////////////////////
+
+struct dime_write_handle
+{ char *name;	// file name
+  FILE *fd;	// file fd
+};
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Static data
+//
+////////////////////////////////////////////////////////////////////////////////
+
+static char *TMPDIR = ".";
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Main
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int main(int argc, char **argv)
+{ struct soap soap;
+  char *s = getenv("TMPDIR");
+  if (s)
+    TMPDIR = s;
+  // use HTTP chunking when possible
+  // chunking allows streaming of DIME content without requiring DIME attachment size to be set
+  // DIME attachments can be streamed without chunking only if the attachment size is set
+  soap_init1(&soap, SOAP_IO_KEEPALIVE | SOAP_IO_CHUNK);
+  // set DIME callbacks
+  soap.fdimereadopen = dime_read_open;
+  soap.fdimereadclose = dime_read_close;
+  soap.fdimeread = dime_read;
+  soap.fdimewriteopen = dime_write_open;
+  soap.fdimewriteclose = dime_write_close;
+  soap.fdimewrite = dime_write;
+  if (argc < 2)
+  { // no args: assume this is a CGI application
+    // serve request
+    soap_serve(&soap);
+    // cleanup class instances
+    soap_destroy(&soap);
+    // cleanup
+    soap_end(&soap);
+  }
+  else
+  { struct soap *tsoap;
+    pthread_t tid;
+    int port;
+    int m, s, i;
+    // Unix SIGPIPE, this is OS dependent:
+    // soap.accept_flags = SO_NOSIGPIPE;	// some systems like this
+    // soap.socket_flags = MSG_NOSIGNAL;	// others need this
+    // signal(SIGPIPE, sigpipe_handle);		// or a sigpipe handler (portable)
+    // port is first command line argument
+    port = atoi(argv[1]);
+    // bind to current host and specified port
+    m = soap_bind(&soap, NULL, port, BACKLOG);
+    // if we could not bind, exit
+    if (m < 0)
+    { soap_print_fault(&soap, stderr);
+      exit(1);
+    }
+    fprintf(stderr, "Socket connection successful %d\n", m);
+    // die after 24 hrs waiting for activity on port
+    soap.accept_timeout = 24*60*60;
+    // IO timeouts
+    soap.send_timeout = 30;
+    soap.recv_timeout = 30;
+    // loop through requests
+    for (i = 1; ; i++)
+    { // accept request
+      s = soap_accept(&soap);
+      // if timeout or error, report
+      if (s < 0)
+      { if (soap.errnum)
+          soap_print_fault(&soap, stderr);
+	else
+          fprintf(stderr, "Server timed out\n");
+	break;
+      }
+      fprintf(stderr, "Thread %d accepts socket %d connection from IP %d.%d.%d.%d\n", i, s, (int)(soap.ip>>24)&0xFF, (int)(soap.ip>>16)&0xFF, (int)(soap.ip>>8)&0xFF, (int)soap.ip&0xFF);
+      // copy soap environment and spawn thread
+      tsoap = soap_copy(&soap);
+      pthread_create(&tid, NULL, (void*(*)(void*))process_request, (void*)tsoap);
+    }
+  }
+  // detach
+  soap_done(&soap);
+  return 0;
+}
+
+void *process_request(void *soap)
+{ pthread_detach(pthread_self());
+  // serve request (or multiple requests with keep-alive enabled)
+  soap_serve((struct soap*)soap);
+  // cleanup class instances
+  soap_destroy((struct soap*)soap);
+  // cleanup
+  soap_end((struct soap*)soap);
+  // detach thread's copy of soap environment
+  soap_done((struct soap*)soap);
+  // free soap environment
+  free(soap);
+  return NULL;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Server methods
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int ns__putData(struct soap *soap, arrayOfData *data, arrayOfName *names)
+{ // gSOAP switches to SOAP_IO_STORE when SOAP_IO_CHUNK (HTTP chunking) is not supported by the client
+  // Since it is undesirable to use SOAP_IO_STORE with streaming, we reset it to SOAP_IO_BUFFER
+  if ((soap->omode & SOAP_IO) == SOAP_IO_STORE)
+    soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_BUFFER;
+  // return name (key) for each data item
+  names->resize(data->size());
+  for (int i = 0; i < data->size(); i++)
+  { char *s, *name;
+    // the id field is set when DIME was used so the dime_write callbacks already saved the file
+    if ((*data)[i].id)
+    { assert((*data)[i].__ptr);
+      name = ((struct dime_write_handle*)(*data)[i].__ptr)->name;
+    }
+    else
+    { name = tempnam(TMPDIR, "data");
+      fprintf(stderr, "Saving file %s\n", name);
+      saveData((*data)[i], name);
+    }
+    s = strrchr(name, '/');
+    if (!s)
+      s = strrchr(name, '\\');
+    if (!s)
+      s = name;
+    else
+      s++;
+    (*names)[i] = soap_strdup(soap, s);
+    if (!(*data)[i].id)
+    { // free data alloced with tempnam()
+      free(name);
+    }
+  }
+  return SOAP_OK;
+}
+
+int ns__getData(struct soap *soap, arrayOfName *names, arrayOfData *data)
+{ // gSOAP switches to SOAP_IO_STORE when SOAP_IO_CHUNK (HTTP chunking) is not supported by the client.
+  // Since it is undesirable to use SOAP_IO_STORE, we reset it to SOAP_IO_BUFFER
+  // Important: DIME attachments MAY be transmitted in a permuted order, so we must be careful with streaming data to files at the client side. Therefore, we save the file name in the options field.
+  if ((soap->omode & SOAP_IO) == SOAP_IO_STORE)
+    soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_BUFFER;
+  if (!names)
+    return soap_sender_fault(soap, "Names required", NULL);
+  data->resize(names->size());
+  for (int i = 0; i < names->__size; i++)
+  { if (!(*names)[i])
+      return soap_sender_fault(soap, "Name required", NULL);
+    if (getdata(soap, (*names)[i], (*data)[i]))
+      return soap_sender_fault(soap, "Access denied", NULL);
+  }
+  return SOAP_OK;
+}
+
+int ns__getImage(struct soap *soap, char *name, ns__Data& image)
+{ if (!name)
+    return soap_sender_fault(soap, "Name required", NULL);
+  if (getdata(soap, name, image))
+    return soap_sender_fault(soap, "Access denied", NULL);
+  image.type = "image/jpeg";
+  image.options = soap_dime_option(soap, 0, name);
+  return SOAP_OK;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Helper functions
+//
+////////////////////////////////////////////////////////////////////////////////
+
+static int getdata(struct soap *soap, const char *name, ns__Data& data)
+{ struct stat sb;
+  FILE *fd = NULL;
+  if (!strchr(name, '/') && !strchr(name, '\\') && !strchr(name, ':'))
+  { char *s = (char*)soap_malloc(soap, strlen(TMPDIR) + strlen(name) + 2);
+    strcpy(s, TMPDIR);
+    strcat(s, "/");
+    strcpy(s, name);
+    fd = fopen(s, "rb");
+  }
+  if (!fd)
+    return SOAP_EOF;
+  if ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK) // chunked response is possible
+  { data.__ptr = (unsigned char*)fd; // must set to non-NULL (this is our fd handle which we need in the callbacks)
+    data.__size = 0; // zero size streams data with HTTP chunking
+  }
+  else if (!fstat(fileno(fd), &sb) && sb.st_size > 0)
+  { // since we can get the length of the file, we can stream it
+    data.__ptr = (unsigned char*)fd; // must set to non-NULL (this is our fd handle which we need in the callbacks)
+    data.__size = sb.st_size;
+  }
+  else // we can't use HTTP chunking and we don't know the size, so buffer it
+  { int i;
+    data.__ptr = (unsigned char*)soap_malloc(soap, MAX_FILE_SIZE);
+    for (i = 0; i < MAX_FILE_SIZE; i++)
+    { int c;
+      if ((c = fgetc(fd)) == EOF)
+        break;
+      data.__ptr[i] = c;
+    }
+    fclose(fd);
+    data.__size = i;
+  }
+  data.type = ""; // specify non-NULL id or type to enable DIME
+  data.options = soap_dime_option(soap, 0, name);
+  return SOAP_OK;
+}
+
+static void saveData(ns__Data& data, const char *name)
+{ char *buf = (char*)data.__ptr;
+  int len = data.__size;
+  FILE *fd = fopen(name, "wb");
+  if (!fd)
+  { fprintf(stderr, "Cannot save file %s\n", name);
+    return;
+  }
+  while (len)
+  { size_t nwritten = fwrite(buf, 1, len, fd);
+    if (!nwritten)
+    { fprintf(stderr, "Cannot write to %s\n", name);
+      return;
+    }
+    len -= nwritten;
+    buf += nwritten;
+  }
+}
+
+static void sigpipe_handle(int x) { }
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Streaming DIME attachment content handlers
+//
+////////////////////////////////////////////////////////////////////////////////
+
+static void *dime_read_open(struct soap *soap, void *handle, const char *id, const char *type, const char *options)
+{ // we should return NULL without setting soap->error if we don't want to use the streaming callback for this DIME attachment. The handle contains the non-NULL __ptr field value which should have been set in the application.
+  // return value of this function will be passed on to the fdimeread and fdimereadclose callbacks. The return value will not affect the __ptr field.
+  return handle;
+}
+
+static void dime_read_close(struct soap *soap, void *handle)
+{ fclose((FILE*)handle);
+}
+
+static size_t dime_read(struct soap *soap, void *handle, char *buf, size_t len)
+{ return fread(buf, 1, len, (FILE*)handle);
+}
+
+static void *dime_write_open(struct soap *soap, const char *id, const char *type, const char *options)
+{ // we can return NULL without setting soap->error if we don't want to use the streaming callback for this DIME attachment
+  struct dime_write_handle *handle = (struct dime_write_handle*)soap_malloc(soap, sizeof(struct dime_write_handle));
+  if (!handle)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  char *name = tempnam(TMPDIR, "data");
+  fprintf(stderr, "Saving file %s\n", name);
+  handle->name = soap_strdup(soap, name);
+  free(name);
+  handle->fd = fopen(handle->name, "wb");
+  if (!handle->fd)
+  { soap->error = SOAP_EOF; // could not open file for writing
+    soap->errnum = errno; // get reason
+    return NULL;
+  }
+  return (void*)handle;
+}
+
+static void dime_write_close(struct soap *soap, void *handle)
+{ fclose(((struct dime_write_handle*)handle)->fd);
+}
+
+static int dime_write(struct soap *soap, void *handle, const char *buf, size_t len)
+{ while (len)
+  { size_t nwritten = fwrite(buf, 1, len, ((struct dime_write_handle*)handle)->fd);
+    if (!nwritten)
+    { soap->errnum = errno; // get reason
+      return SOAP_EOF;
+    }
+    len -= nwritten;
+    buf += nwritten;
+  }
+  return SOAP_OK;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	ns__Data class
+//
+////////////////////////////////////////////////////////////////////////////////
+
+ns__Data::ns__Data()
+{ __ptr = NULL;
+  __size = 0;
+  id = NULL;
+  type = NULL;
+  options = NULL;
+  soap = NULL;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	arrayOfData class
+//
+////////////////////////////////////////////////////////////////////////////////
+
+arrayOfData::arrayOfData()
+{ __ptr = NULL;
+  __size = 0;
+  soap = NULL;
+}
+
+arrayOfData::arrayOfData(struct soap *soap, int n)
+{ __ptr = NULL;
+  __size = 0;
+  this->soap = soap;
+  resize(n);
+}
+
+arrayOfData::~arrayOfData()
+{ resize(0);
+}
+
+int arrayOfData::size()
+{ return __size;
+}
+
+void arrayOfData::resize(int n)
+{ if (__ptr)
+  { if (soap) // if created by soap environment
+      soap_delete(soap, __ptr); // then delete
+    else
+      delete[] __ptr;
+  }
+  __size = n;
+  if (n <= 0)
+    __ptr = NULL;
+  else if (soap)
+    __ptr = soap_new_ns__Data(soap, n);
+  else
+    __ptr = new ns__Data[n];
+}
+
+ns__Data& arrayOfData::operator[](int i) const
+{ assert(__ptr && i >= 0 && i < __size);
+  return __ptr[i];
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	arrayOfName class
+//
+////////////////////////////////////////////////////////////////////////////////
+
+arrayOfName::arrayOfName()
+{ __ptr = NULL;
+  __size = 0;
+  soap = NULL;
+}
+
+arrayOfName::arrayOfName(struct soap *soap, int n)
+{ __ptr = NULL;
+  __size = 0;
+  this->soap = soap;
+  resize(n);
+}
+
+arrayOfName::~arrayOfName()
+{ resize(0);
+}
+
+int arrayOfName::size()
+{ return __size;
+}
+
+void arrayOfName::resize(int n)
+{ if (__ptr)
+  { if (soap) // if created by soap environment
+      soap_delete(soap, __ptr); // then delete
+    else
+      free(__ptr);
+  }
+  __size = n;
+  if (n <= 0)
+    __ptr = NULL;
+  else
+  { if (soap)
+      __ptr = (char**)soap_malloc(soap, sizeof(char*) * n);
+    else
+      __ptr = (char**)malloc(sizeof(char*) * n);
+    memset(__ptr, 0, n);
+  }
+}
+
+char*& arrayOfName::operator[](int i) const
+{ assert(__ptr && i >= 0 && i < __size);
+  return __ptr[i];
+}
+
diff --git a/samples/dime/image.jpg b/samples/dime/image.jpg
new file mode 100644
index 0000000..70a04e2
--- /dev/null
+++ b/samples/dime/image.jpg
Binary files differ
diff --git a/samples/events/Makefile b/samples/events/Makefile
new file mode 100644
index 0000000..d216712
--- /dev/null
+++ b/samples/events/Makefile
@@ -0,0 +1,23 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		event handler
+event:		event.h event.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c event.h
+		$(CC) $(CFLAGS) -o event event.c soapC.c soapClient.c $(SOAPC) $(LIBS)
+handler:	event.h handler.c $(SOAPH) $(SOAPC)
+		$(GSOAP) event.h
+		$(CC) $(CFLAGS) -o handler handler.c soapC.c soapClient.c soapServer.c $(SOAPC) -lpthread $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h event handler
diff --git a/samples/events/MakefileSolaris b/samples/events/MakefileSolaris
new file mode 100644
index 0000000..30494c9
--- /dev/null
+++ b/samples/events/MakefileSolaris
@@ -0,0 +1,23 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lxnet -lsocket -lnsl
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		event handler
+event:		event.h event.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c event.h
+		$(CC) $(CFLAGS) -o event event.c soapC.c soapClient.c $(SOAPC) $(LIBS)
+handler:	event.h handler.c $(SOAPH) $(SOAPC)
+		$(GSOAP) event.h
+		$(CC) $(CFLAGS) -o handler handler.c soapC.c soapClient.c soapServer.c $(SOAPC) -lpthread $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h event handler
diff --git a/samples/events/event.c b/samples/events/event.c
new file mode 100644
index 0000000..9bfc51a
--- /dev/null
+++ b/samples/events/event.c
@@ -0,0 +1,83 @@
+/*	event.c
+
+	C-style client
+
+	Events are based on asynchronous one-way SOAP messaging using HTTP
+	keep-alive for persistent connections
+
+	The 'synchronous' global flag illustrates SOAP one-way messaging,
+	which requires an HTTP OK response with an empty body to be returned
+	by the server.
+
+	Copyright (C) 2000-2002 Robert A. van Engelen. All Rights Reserved.
+
+	Compile:
+	soapcpp2 -c event.h
+	cc -o event event.c stdsoap2.c soapC.c soapClient.c
+
+	Run (first start the event handler on localhost port 18000):
+	event
+
+*/
+
+#include "soapH.h"
+#include "Event.nsmap"
+
+int synchronous = 0; /* =1: SOAP interoperable synchronous one-way messaging over HTTP */
+
+/* Service details copied from event.h: */
+const char *event_handler_endpoint = "http://localhost:18000";
+const char *event_handler_action = "event";
+
+int main()
+{ struct soap soap;
+  soap_init2(&soap, SOAP_IO_KEEPALIVE, SOAP_IO_KEEPALIVE);
+  if (soap_send_ns__handle(&soap, event_handler_endpoint, event_handler_action, EVENT_A))
+    soap_print_fault(&soap, stderr);
+  if (synchronous && soap_recv_empty_response(&soap))
+    soap_print_fault(&soap, stderr);
+  if (soap_send_ns__handle(&soap, event_handler_endpoint, event_handler_action, EVENT_B))
+    soap_print_fault(&soap, stderr);
+  if (synchronous && soap_recv_empty_response(&soap))
+    soap_print_fault(&soap, stderr);
+  /* reset keep-alive when client needs to inform the server that it will close the connection. It may reconnect later */
+  soap_clr_omode(&soap, SOAP_IO_KEEPALIVE);
+  if (soap_send_ns__handle(&soap, event_handler_endpoint, event_handler_action, EVENT_C))
+    soap_print_fault(&soap, stderr);
+  if (synchronous && soap_recv_empty_response(&soap))
+    soap_print_fault(&soap, stderr);
+  /* close the socket */
+  soap_closesock(&soap);
+  /* enable keep-alive which is required to accept and execute multiple receives */
+  soap_set_omode(&soap, SOAP_IO_KEEPALIVE);
+  if (soap_send_ns__handle(&soap, event_handler_endpoint, event_handler_action, EVENT_Z))
+    soap_print_fault(&soap, stderr);
+  else
+  { struct ns__handle response;
+    for (;;)
+    { if (!soap_valid_socket(soap.socket))
+      { fprintf(stderr, "Connection was terminated (keep alive disabled?)\n");
+        break;
+      }
+      if (soap_recv_ns__handle(&soap, &response))
+      { if (soap.error == SOAP_EOF)
+          fprintf(stderr, "Connection was gracefully closed by server\n");
+        else
+	  soap_print_fault(&soap, stderr);
+	break;
+      }
+      else
+      { switch (response.event)
+        { case EVENT_A: fprintf(stderr, "Client Event: A\n"); break;
+          case EVENT_B: fprintf(stderr, "Client Event: B\n"); break;
+          case EVENT_C: fprintf(stderr, "Client Event: C\n"); break;
+          case EVENT_Z: fprintf(stderr, "Client Event: Z\n"); break;
+        }
+      }
+    }
+  }
+  soap_closesock(&soap); /* soap_send operations keep the socket open to possibly accept responses, so we need to explicitly close the socket now */
+  soap_end(&soap); /* this will close the socket too (if keep alive is off), just in case */
+  soap_done(&soap); /* detach environment (also closes sockets even with keep-alive) */
+  return 0;
+}
diff --git a/samples/events/event.cpp b/samples/events/event.cpp
new file mode 100644
index 0000000..6262003
--- /dev/null
+++ b/samples/events/event.cpp
@@ -0,0 +1,34 @@
+/*	event.cpp
+
+	C++-style client
+
+	Events based on asynchronous one-way SOAP messaging using HTTP
+	keep-alive for persistent connections. C++ style with Proxy object.
+
+	Copyright (C) 2000-2002 Robert A. van Engelen. All Rights Reserved.
+
+	Compile:
+	soapcpp2 event.h
+	c++ -o event event.cpp stdsoap2.cpp soapC.cpp soapClient.cpp
+
+	Run (first start the event handler on localhost port 18000):
+	event
+
+*/
+
+#include "soapEventProxy.h"
+#include "Event.nsmap"
+
+int main()
+{ Event e;
+  soap_set_omode(e.soap, SOAP_IO_KEEPALIVE);
+  if (e.handle(EVENT_A))
+    soap_print_fault(e.soap, stderr);
+  if (e.handle(EVENT_B))
+    soap_print_fault(e.soap, stderr);
+  /* connection should not be kept alive after the last call: be nice to the server and tell it now */
+  soap_clr_omode(e.soap, SOAP_IO_KEEPALIVE);
+  if (e.handle(EVENT_C))
+   soap_print_fault(e.soap, stderr);
+  return 0;
+}
diff --git a/samples/events/event.h b/samples/events/event.h
new file mode 100644
index 0000000..50d4593
--- /dev/null
+++ b/samples/events/event.h
@@ -0,0 +1,13 @@
+//gsoap ns service name:	Event service is a simple remote event handler
+//gsoap ns service style:	rpc
+//gsoap ns service encoding:	encoded
+//gsoap ns service namespace:	http://www.cs.fsu.edu/~engelen/event.wsdl
+//gsoap ns service location:	http://localhost:18000
+
+//gsoap ns schema namespace: urn:event
+
+enum ns__event { EVENT_A, EVENT_B, EVENT_C, EVENT_Z };
+
+//gsoap ns service method-action: handle "event"
+//gsoap ns service method-documentation: handle handles asynchronous events
+int ns__handle(enum ns__event event, void);
diff --git a/samples/events/handler.c b/samples/events/handler.c
new file mode 100644
index 0000000..54542f9
--- /dev/null
+++ b/samples/events/handler.c
@@ -0,0 +1,111 @@
+/*	handler.c
+
+	Multi-threaded stand-alone event handler service
+
+	Events are based on asynchronous one-way SOAP messaging using HTTP
+	keep-alive for persistent connections
+
+	The 'synchronous' global flag illustrates SOAP one-way messaging,
+	which requires an HTTP OK response with an empty body to be returned
+	by the server.
+
+	Copyright (C) 2000-2002 Robert A. van Engelen. All Rights Reserved.
+
+	Compile:
+	soapcpp2 -c event.h
+	cc -o handler handler.c stdsoap2.c soapC.c soapService.c
+
+	Run:
+	handler 18000 &
+
+	Server will time out after 24hr of inactivity
+
+	This code enables keep-alive support which can cause "broken pipes"
+	when the client prematurely closes the connection while indicating
+	it wants the connection to stay alive. Broken pipes (SIGPIPE) can be
+	fixed using MSG_NOSIGNAL, SO_NOSIGPIPE, or with a signal handler,
+	but this is not very portable (see code below)
+
+*/
+
+#include "soapH.h"
+#include "Event.nsmap"
+#include <pthread.h>
+
+#define BACKLOG (100)
+#define TIMEOUT (24*60*60) /* timeout after 24hrs of inactivity */
+
+void *process_request(void*);
+
+int synchronous = 0; /* =1: SOAP interoperable synchronous one-way messaging over HTTP */
+
+int main(int argc, char **argv)
+{ struct soap soap, *tsoap;
+  pthread_t tid;
+  int port;
+  int m, s, i;
+  if (argc < 2)
+  { fprintf(stderr, "Usage: handler <port>\n");
+    exit(1);
+  }
+  port = atoi(argv[1]);
+  soap_init2(&soap, SOAP_IO_KEEPALIVE, SOAP_IO_KEEPALIVE);	/* keep I/O alive */
+  soap.accept_timeout = TIMEOUT;
+  soap.bind_flags |= SO_REUSEADDR;	/* don't use this in unsecured environments */
+  /* soap.socket_flags = MSG_NOSIGNAL; */	/* use this to disable SIGPIPE */
+  /* soap.bind_flags |= SO_NOSIGPIPE; */	/* or use this to disable SIGPIPE */
+  m = soap_bind(&soap, NULL, port, BACKLOG);
+  if (m < 0)
+  { soap_print_fault(&soap, stderr);
+    exit(1);
+  }
+  fprintf(stderr, "Socket connection successful %d\n", m);
+  for (i = 1; ; i++)
+  { s = soap_accept(&soap);
+    if (s < 0)
+    { if (soap.errnum)
+        soap_print_fault(&soap, stderr);
+      else
+        fprintf(stderr, "%s timed out\n", argv[0]);	/* should really wait for threads to terminate, but 24hr timeout should be enough ... */
+      break;
+    }
+    fprintf(stderr, "Thread %d accepts socket %d connection from IP %d.%d.%d.%d\n", i, s, (int)(soap.ip>>24)&0xFF, (int)(soap.ip>>16)&0xFF, (int)(soap.ip>>8)&0xFF, (int)soap.ip&0xFF);
+    tsoap = soap_copy(&soap);
+    pthread_create(&tid, NULL, (void*(*)(void*))process_request, (void*)tsoap);
+  }
+  return 0;
+}
+
+void *process_request(void *soap)
+{ struct soap *tsoap = (struct soap*)soap;
+  pthread_detach(pthread_self());
+  soap_serve(tsoap);
+  soap_destroy(tsoap);
+  soap_end(tsoap);
+  soap_done(tsoap);
+  free(tsoap);
+  return NULL;
+}
+
+int ns__handle(struct soap *soap, enum ns__event event)
+{ switch (event)
+  { /* each event is just consumed without server response */
+    case EVENT_A: fprintf(stderr, "Server Event: A\n"); break;
+    case EVENT_B: fprintf(stderr, "Server Event: B\n"); break;
+    case EVENT_C: fprintf(stderr, "Server Event: C\n"); break;
+    /* after receiving event Z, we echo events A to C back to the client */
+    case EVENT_Z: fprintf(stderr, "Server Event: Z\n");
+    { struct soap *resp = soap_copy(soap);
+      /* these multiple sends assume that the client enabled keep-alive */
+      soap_send_ns__handle(resp, "http://", NULL, EVENT_A);
+      soap_send_ns__handle(resp, "http://", NULL, EVENT_B);
+      soap_send_ns__handle(resp, "http://", NULL, EVENT_C);
+      soap_end(resp);
+      soap_done(resp);
+      free(resp);
+    }
+  }
+  if (event != EVENT_Z && synchronous)
+    return soap_send_empty_response(soap);
+  return SOAP_OK;
+}
diff --git a/samples/factory/Makefile b/samples/factory/Makefile
new file mode 100644
index 0000000..2a31c78
--- /dev/null
+++ b/samples/factory/Makefile
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		factory
+factory:	factory.h factory.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) factory.h
+		$(CPP) $(CFLAGS) -o factory factory.cpp soapC.cpp soapServer.cpp $(SOAPCPP) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h factory
diff --git a/samples/factory/MakefileSolaris b/samples/factory/MakefileSolaris
new file mode 100644
index 0000000..ffe8b22
--- /dev/null
+++ b/samples/factory/MakefileSolaris
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lxnet -lnsl -lsocket
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		factory
+factory:	factory.h factory.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) factory.h
+		$(CPP) $(CFLAGS) -o factory factory.cpp soapC.cpp soapServer.cpp $(SOAPCPP) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h factory
diff --git a/samples/factory/factory.cpp b/samples/factory/factory.cpp
new file mode 100644
index 0000000..311e057
--- /dev/null
+++ b/samples/factory/factory.cpp
@@ -0,0 +1,477 @@
+/*	factory.cpp
+
+	Remote object factory
+
+	The remote object factory uses a lease-based system. Remote objects
+	are purged from the pool when the lease expires. Supports inheritance.
+
+	Compile:
+	soapcpp2 factory.h
+	c++ -o factory factory.cpp stdsoap2.cpp soapC.cpp soapServer.cpp
+
+	Run (e.g. in the background)
+	factory <port>
+	where <port> is a available port number, e.g. 18085
+
+	Copyright (C) 2000-2002 Robert A. van Engelen. All Rights Reserved.
+*/
+
+#include <sys/stat.h>	// for open()
+
+#include "soapH.h"
+#include "factory.nsmap"
+
+#define POOLSIZE 1000	// max number of remote objects that can be alive at any instance
+
+#define LEASETERM 60	// lease term (in seconds). Also the rate at which objects are purged
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Factory class maintains pool of objects and can act as a simple ORB
+//
+////////////////////////////////////////////////////////////////////////////////
+
+class Factory
+{ public:
+  t__root *ref[POOLSIZE];	// pool of objects (t__root is base class)
+  unsigned int handle;		// handle generation counter (is allowed to wrap around 32 bits)
+  Factory();
+  ~Factory();
+  unsigned int create(struct soap *soap, enum t__object object, char *name);
+  unsigned int lookup(enum t__object object, char *name);
+  unsigned int rename(unsigned int handle, char *name);
+  void release(unsigned int handle);
+  void purge(struct soap* soap);
+  t__root *get(unsigned int handle);
+  t__root *root(unsigned int handle);
+  t__adder *adder(unsigned int handle);
+  t__counter *counter(unsigned int handle);
+  int save(const char *file);
+  int load(const char *file);
+};
+
+// Initialize empty pool and set handle generation counter to 0
+Factory::Factory()
+{ for (int i = 0; i < POOLSIZE; i++)
+    ref[i] = NULL;
+  handle = 0;
+}
+
+// Remove all objects from pool
+Factory::~Factory()
+{ for (int i = 0; i < POOLSIZE; i++)
+    if (ref[i])
+      delete ref[i];
+}
+
+// Create a new object, place it in the pool, and return handle
+unsigned int Factory::create(struct soap *soap, enum t__object object, char *name)
+{ for (int i = 0; i < POOLSIZE; i++)
+    if (!ref[++handle % POOLSIZE])	// succeeds if this slot is available
+    { t__root *r = NULL;
+      if (!handle)
+        handle += POOLSIZE;		// make sure handle is never 0 (0 indicates invalid handle)
+      switch (object)			// type of object to instantiate
+      { case ROOT:
+          r = new t__root();
+	  break;
+        case ADDER:
+          r = new t__adder();
+	  break;
+        case COUNTER:
+          r = new t__counter();
+	  break;
+      }
+      if (r)
+      { ref[handle % POOLSIZE] = r;		// add object to the pool
+        r->object = object;			// save type
+	if (name)				// save name (if assigned)
+	{ r->name = (char*)malloc(strlen(name+1));
+	  strcpy(r->name, name);
+	}
+	else
+	  r->name = NULL;
+        r->handle = handle;			// keep handle for verification
+        r->renew();				// renew its lease
+        return handle;
+      }
+      return 0;
+    }
+  return 0;
+}
+
+// Lookup the name of an object and return handle
+unsigned int Factory::lookup(enum t__object object, char *name)
+{ for (int i = 0; i < POOLSIZE; i++)
+    if (ref[i] && ref[i]->object == object && ref[i]->name && !strcmp(ref[i]->name, name))
+    { ref[i]->renew();
+      return ref[i]->handle;
+    }
+  return 0;
+}
+
+// Rename object and return handle if successful
+unsigned int Factory::rename(unsigned int handle, char *name)
+{ t__root *r = get(handle);
+  if (r)
+  { if (r->name)
+      free(r->name);
+    r->name = (char*)malloc(strlen(name)+1);
+    strcpy(r->name, name);
+    r->renew();
+    return handle;
+  }
+  return 0;
+}
+
+// get ref to object from handle
+t__root *Factory::get(unsigned int handle)
+{ t__root *r = ref[handle % POOLSIZE];
+  if (r && r->handle == handle)
+    return r;
+  return NULL;
+}
+
+// get ref to root object from handle and renew lease
+t__root *Factory::root(unsigned int handle)
+{ t__root *r = get(handle);
+  if (r)
+    r->renew();
+  return r;
+}
+
+// get ref to adder object from handle and renew lease
+t__adder *Factory::adder(unsigned int handle)
+{ t__adder *a = (t__adder*)get(handle);
+  if (a)
+  { if (a->object == ADDER || a->object == COUNTER)
+      a->renew();
+    else
+      a = NULL;
+  }
+  return a;
+}
+
+// get ref to counter object from handle and renew lease
+t__counter *Factory::counter(unsigned int handle)
+{ t__counter *c = (t__counter*)get(handle);
+  if (c)
+  { if (c->object == COUNTER)
+      c->renew();
+    else
+      c = NULL;
+  }
+  return c;
+}
+
+// remove all objects from pool whose lease has expired
+void Factory::purge(struct soap *soap)
+{ time_t t = time(NULL);		// current time
+  int flag = 1;
+  for (int i = 0; i < POOLSIZE; i++)
+  { t__root *r = ref[i];
+    if (r && r->lease < t)		// expired?
+    { if (flag)
+        fprintf(stderr, "\nPurging objects:");
+      if (r->name)
+        fprintf(stderr, "%s(%u)\n", r->name, r->handle);
+      else
+        fprintf(stderr, "(%u)\n", r->handle);
+      soap_delete(soap, r);
+      ref[i] = NULL;
+      flag = 0;
+    }
+  }
+}
+
+// remove object from pool and release slot
+void Factory::release(unsigned int handle)
+{ t__root *r = get(handle);
+  if (r)
+    ref[handle % POOLSIZE] = NULL;
+}
+
+// save object pool to file (or stdout)
+int Factory::save(const char *file)
+{ struct soap soap;	// use a new local gSOAP environment
+  soap_init(&soap);
+  soap_begin(&soap);
+  if (file)
+    soap.sendfd = open(file, O_CREAT|O_TRUNC|O_WRONLY, S_IREAD|S_IWRITE);
+  if (soap.sendfd < 0)
+    return -1;
+  soap_begin_send(&soap);
+  for (int i = 0; i < POOLSIZE; i++)
+    if (ref[i])
+    { ref[i]->soap_serialize(&soap);
+      soap_begin_send(&soap);
+      ref[i]->soap_put(&soap, "item", NULL);
+      soap_end_send(&soap);
+    }
+  if (file)
+    close(soap.sendfd);
+  soap_end(&soap);
+  soap_done(&soap);
+  return 0;
+}
+
+// load object pool from file (or stdin)
+int Factory::load(const char *file)
+{ struct soap soap;
+  t__root *r;
+  soap_init(&soap);
+  if (file)
+    soap.recvfd = open(file, O_RDONLY);
+  if (soap.recvfd < 0)
+    return -1;
+  soap_begin_recv(&soap);
+  for (int i = 0; i < POOLSIZE; i++)
+  { if (ref[i])
+    { delete ref[i];
+      ref[i] = NULL;
+    }
+  }
+  for (;;)
+  { r = soap_in_t__root(&soap, "item", NULL, NULL);	// use the 'in' routine ('get' will also attempt to parse the remaining XML)
+    if (r)
+      ref[r->handle % POOLSIZE] = r;
+    else
+      break;
+  }
+  if (file)
+    close(soap.recvfd);
+  if (soap.error != SOAP_OK && soap.error != SOAP_EOF)
+  { soap_print_fault(&soap, stderr);
+    soap_print_fault_location(&soap, stderr);
+  }
+  soap_free(&soap);	// do not call soap_end: this would remove all deserialized data
+  soap_done(&soap);
+  return 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Main server program
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int main(int argc, char **argv)
+{ int m, s;
+  struct soap soap;
+  Factory factory;			// create factory and simple ORB
+  soap_init(&soap);
+  soap.user = (void*)&factory;		// associate factory with run-time
+  soap.accept_timeout = 1;		// check every second, if not too busy for purging objects
+  if (argc < 2)
+  { factory.load("factory.dat");	// if CGI is used, load the entire pool (not very efficient and there may be a competition for access to this file! This is just to demonstrate load/save of the entire pool)
+    factory.purge(&soap);
+    soap_serve(&soap);
+    factory.save("factory.dat");	// ... and save afterwards
+  }
+  else
+  { m = soap_bind(&soap, NULL, atoi(argv[1]), 100);	// use command line argument as port number
+    if (m < 0)
+    { soap_print_fault(&soap, stderr);
+      exit(1);
+    }
+    fprintf(stderr, "Socket connection successful %d\n", m);
+    for (int i = 1; ; i++)
+    { s = soap_accept(&soap);
+      if (s < 0)
+      { if (soap.errnum)
+          soap_print_fault(&soap, stderr);
+	else			// errnum is 0, which means a timeout has occurred
+	{ factory.purge(&soap);	// purge objects whose lease has ran out
+	  continue;
+	}
+	exit(1);
+      }
+      fprintf(stderr, "%d: accepted %d IP=%d.%d.%d.%d ... ", i, s, (int)(soap.ip>>24)&0xFF, (int)(soap.ip>>16)&0xFF, (int)(soap.ip>>8)&0xFF, (int)soap.ip&0xFF);
+      soap_serve(&soap);
+      fprintf(stderr, "served\n");
+      soap_end(&soap);		// clean up: this will remove deserialized data
+    }
+  }
+  return 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Remote factory method implementations
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int ns__create(struct soap *soap, enum t__object object, char *name, enum t__status &status)
+{ Factory *factory = (Factory*)soap->user;	// get factory from gSOAP environment
+  if (!soap->header)
+    soap->header = (struct SOAP_ENV__Header*)soap_malloc(soap, sizeof(struct SOAP_ENV__Header));
+  if (soap->header)
+  { soap->header->h__handle = factory->create(soap, object, name);
+    if (soap->header->h__handle)
+      status = FACTORY_OK;
+    else
+      status = FACTORY_INVALID;
+  }
+  else
+    status = FACTORY_RETRY;
+  return SOAP_OK;
+}
+
+int ns__lookup(struct soap *soap, enum t__object object, char *name, enum t__status &status)
+{ Factory *factory = (Factory*)soap->user;	// get factory from gSOAP environment
+  if (!soap->header)
+    soap->header = (struct SOAP_ENV__Header*)soap_malloc(soap, sizeof(struct SOAP_ENV__Header));
+  if (soap->header)
+  { soap->header->h__handle = factory->lookup(object, name);
+    if (soap->header->h__handle)
+      status = FACTORY_OK;
+    else
+      status = FACTORY_NOTFOUND;
+  }
+  else
+    status = FACTORY_RETRY;
+  return SOAP_OK;
+}
+
+int ns__rename(struct soap *soap, char *name, enum t__status &status)
+{ Factory *factory = (Factory*)soap->user;	// get factory from gSOAP environment
+  if (soap->header)
+  { soap->header->h__handle = factory->rename(soap->header->h__handle, name);
+    if (soap->header->h__handle)
+      status = FACTORY_OK;
+    else
+      status = FACTORY_INVALID;
+  }
+  else
+    status = FACTORY_INVALID;
+  return SOAP_OK;
+}
+
+int ns__release(struct soap *soap, enum t__status &status)
+{ Factory *factory = (Factory*)soap->user;	// get factory from gSOAP environment
+  if (soap->header && soap->header->h__handle)
+  { factory->release(soap->header->h__handle);
+    status = FACTORY_OK;
+  }
+  else
+    status = FACTORY_INVALID;
+  return SOAP_OK;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Remote adder method implementations
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int ns__set(struct soap *soap, double val, enum t__status &status)
+{ Factory *factory = (Factory*)soap->user;	// get factory from gSOAP environment
+  if (soap->header)
+  { t__adder *adder = factory->adder(soap->header->h__handle);
+    if (adder)
+    { adder->set(val);
+      status = FACTORY_OK;
+    }
+    else
+      status = FACTORY_INVALID;
+  }
+  else
+    status = FACTORY_INVALID;
+  return SOAP_OK;
+}
+
+int ns__get(struct soap *soap, double &val)
+{ Factory *factory = (Factory*)soap->user;	// get factory from gSOAP environment
+  val = DBL_NAN;
+  if (soap->header)
+  { t__adder *adder = factory->adder(soap->header->h__handle);
+    if (adder)
+      val = adder->get();
+  }
+  return SOAP_OK;
+}
+
+int ns__add(struct soap *soap, double val, enum t__status &status)
+{ Factory *factory = (Factory*)soap->user;	// get factory from gSOAP environment
+  if (soap->header)
+  { t__adder *adder = factory->adder(soap->header->h__handle);
+    if (adder)
+    { adder->add(val);
+      status = FACTORY_OK;
+    }
+    else
+      status = FACTORY_INVALID;
+  }
+  else
+    status = FACTORY_INVALID;
+  return SOAP_OK;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Remote counter method implementations
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int ns__inc(struct soap *soap, enum t__status &status)
+{ Factory *factory = (Factory*)soap->user;	// get factory from gSOAP environment
+  if (soap->header)
+  { t__counter *counter = factory->counter(soap->header->h__handle);
+    if (counter)
+    { counter->inc();
+      status = FACTORY_OK;
+    }
+    else
+      status = FACTORY_INVALID;
+  }
+  else
+    status = FACTORY_INVALID;
+  return SOAP_OK;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Server-side base factory class methods
+//
+////////////////////////////////////////////////////////////////////////////////
+
+t__root::t__root()
+{ }
+
+t__root::~t__root()
+{ if (name)
+    free(name);
+}
+
+void t__root::renew()
+{ lease = time(NULL) + LEASETERM;	// can adopt a leasing policy per class
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Server-side adder class methods
+//
+////////////////////////////////////////////////////////////////////////////////
+
+void t__adder::set(double val)
+{ this->val = val;	// copy data to update state
+}
+
+double t__adder::get()
+{ return val;
+}
+
+void t__adder::add(double val)
+{ this->val += val;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Server-side counter class methods
+//
+////////////////////////////////////////////////////////////////////////////////
+
+void t__counter::inc()
+{ add(1.0);
+}
+
diff --git a/samples/factory/factory.h b/samples/factory/factory.h
new file mode 100644
index 0000000..4fe1e9e
--- /dev/null
+++ b/samples/factory/factory.h
@@ -0,0 +1,142 @@
+/*	factory.h
+
+	Server-side remote object factory definitions
+
+	Server code: factory.cpp
+
+	This header file contains all the class declarations of the remote
+	objects to support serialization of these objects for server-side
+	state management (simple save/load operations are implemented).
+
+	The remote object factory uses a lease-based system. Remote objects
+	are purged from the pool when the lease expires (see LEASETERM in
+	factory.cpp). Supports inheritance.
+
+	Compile:
+	soapcpp2 factory.h
+	c++ -o factory factory.cpp stdsoap2.cpp soapC.cpp soapServer.cpp
+
+	Run (e.g. in the background)
+	factory <port>
+	where <port> is a available port number, e.g. 18085
+
+	Copyright (C) 2000-2002 Robert A. van Engelen. All Rights Reserved.
+*/
+
+//gsoap ns service name:	factory
+//gsoap ns service style:	rpc
+//gsoap ns service encoding:	encoded
+//gsoap ns service namespace:	http://websrv.cs.fsu.edu/~engelen/factory.wsdl
+//gsoap ns service location:	http://localhost:18085
+
+//gsoap ns schema namespace: urn:factoryService
+//gsoap t schema namespace: urn:factoryTypes
+//gsoap h schema namespace: urn:factoryHandles
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  SOAP Header: used to exchange stateful object handles
+//
+////////////////////////////////////////////////////////////////////////////////
+
+struct SOAP_ENV__Header
+{ mustUnderstand unsigned int h__handle;
+};
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Server-side root class
+//
+////////////////////////////////////////////////////////////////////////////////
+
+enum t__object				// object types:
+{ ROOT,					// t__root object
+  ADDER,				// t__adder object
+  COUNTER				// t__counter object
+};
+
+enum t__status				// remote object status:
+{ FACTORY_OK,					// ok
+  FACTORY_INVALID,				// invalid handle (wrong type of object or lease expired)
+  FACTORY_NOTFOUND,				// lookup operation not successful
+  FACTORY_RETRY					// cannot create new object: try later
+};
+
+class t__root
+{ public:
+  enum t__object object;		// object type
+  char *name;				// object name for lookup operation (optional)
+  unsigned int handle;			// internal handle
+  time_t lease;				// lease expiration time
+  t__root();
+  virtual ~t__root();
+  virtual void renew();			// to renew lease
+};
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Server-side adder class derived from root
+//
+////////////////////////////////////////////////////////////////////////////////
+
+class t__adder: public t__root
+{ public:
+  double val;				// current value of the adder
+  void set(double val);			// to set the adder
+  double get();				// to get value of the adder
+  void add(double val);			// to add a value to the adder
+};
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Server-side counter class derived from adder
+//
+////////////////////////////////////////////////////////////////////////////////
+
+class t__counter: public t__adder
+{ public:
+  void inc();				// to increment the counter
+};
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Remote factory method interfaces
+//
+////////////////////////////////////////////////////////////////////////////////
+
+//gsoap ns service method-header-part: create h__handle
+int ns__create(enum t__object object, char *name, enum t__status &status);
+
+//gsoap ns service method-header-part: lookup h__handle
+int ns__lookup(enum t__object object, char *name, enum t__status &status);
+
+//gsoap ns service method-header-part: rename h__handle
+int ns__rename(char *name, enum t__status &status);
+
+//gsoap ns service method-header-part: release h__handle
+int ns__release(enum t__status &status);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Rewote adder method interfaces
+//
+////////////////////////////////////////////////////////////////////////////////
+
+//gsoap ns service method-header-part: set h__handle
+int ns__set(double val, enum t__status &status);
+
+//gsoap ns service method-header-part: get h__handle
+int ns__get(double &val);
+
+//gsoap ns service method-header-part: add h__handle
+int ns__add(double val, enum t__status &status);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Remote counter method interfaces
+//
+////////////////////////////////////////////////////////////////////////////////
+
+//gsoap ns service method-header-part: inc h__handle
+int ns__inc(enum t__status &status);
+
diff --git a/samples/factorytest/Makefile b/samples/factorytest/Makefile
new file mode 100644
index 0000000..934462e
--- /dev/null
+++ b/samples/factorytest/Makefile
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		factorytest
+factorytest:	factorytest.h factorytest.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) factorytest.h
+		$(CPP) $(CFLAGS) -o factorytest factorytest.cpp soapC.cpp soapClient.cpp $(SOAPCPP) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h factorytest
diff --git a/samples/factorytest/MakefileSolaris b/samples/factorytest/MakefileSolaris
new file mode 100644
index 0000000..67dc2f0
--- /dev/null
+++ b/samples/factorytest/MakefileSolaris
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lxnet -lnsl -lsocket
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		factorytest
+factorytest:	factorytest.h factorytest.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) factorytest.h
+		$(CPP) $(CFLAGS) -o factorytest factorytest.cpp soapC.cpp soapClient.cpp $(SOAPCPP) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h factorytest
diff --git a/samples/factorytest/factorytest.cpp b/samples/factorytest/factorytest.cpp
new file mode 100644
index 0000000..516489f
--- /dev/null
+++ b/samples/factorytest/factorytest.cpp
@@ -0,0 +1,170 @@
+/*	factorytest.cpp
+
+	Test client for remote object factory
+
+	This is a simple example client program that defines its own proxy
+	objects. The proxy objects utilize the gSOAP remote interfaces to
+	access the remote factory. The remote object interfaces are declared
+	in factorytest.h. Since the remote interfaces are C-style, C-based
+	client programs cam be developed to access remote object factories.
+
+	Compile:
+	soapcpp2 factorytest.h
+	c++ -o factorytest factorytest.cpp stdsoap2.cpp soapC.cpp soapClient.cpp
+
+	Run:
+	factorytest <factory-endpoint>
+	where <factory-endpoint> is the service endpoint of a factory server,
+	e.g. http://localhost:18085
+
+	Copyright (C) 2000-2002 Robert A. van Engelen. All Rights Reserved.
+*/
+
+#include "soapH.h"
+#include "factorytest.nsmap"
+
+#include <iostream.h>
+
+// default factory service endpoint:
+const char *factory = "http://localhost:18085";
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Client-side root proxy class
+//
+////////////////////////////////////////////////////////////////////////////////
+
+class Root
+{ public:
+  char *endpoint;			// factory service endpoint
+  enum t__status status;		// status flag
+  struct soap *soap;			// gSOAP environment (for header h__handle)
+  Root();
+  Root(const char *factory, enum t__object object, char *name);
+  virtual ~Root();
+  void rename(char *name);
+};
+
+Root::Root()
+{ endpoint = NULL;
+  status = FACTORY_OK;
+  soap = NULL;
+}
+
+Root::Root(const char *factory, enum t__object object, char *name)
+{ soap = soap_new();
+  endpoint = (char*)soap_malloc(soap, strlen(factory)+1);
+  strcpy(endpoint, factory);
+  status = FACTORY_NOTFOUND;
+  if (name)
+    if (soap_call_ns__lookup(soap, endpoint, "", object, name, status))
+      soap_print_fault(soap, stderr);	// for demo, just print
+  if (status == FACTORY_NOTFOUND)
+    do
+    { if (soap_call_ns__create(soap, endpoint, "", object, name, status))
+        soap_print_fault(soap, stderr);	// for demo, just print
+    } while (status == FACTORY_RETRY);
+}
+
+Root::~Root()
+{ if (soap_call_ns__release(soap, endpoint, "", status))
+    soap_print_fault(soap, stderr);	// for demo, just print
+  soap_destroy(soap);
+  soap_end(soap);
+  soap_done(soap);
+  free(soap);
+}
+
+void Root::rename(char *name)
+{ if (soap_call_ns__rename(soap, endpoint, "", name, status))
+    soap_print_fault(soap, stderr);	// for demo, just print
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Client-side adder proxy class derived from root
+//
+////////////////////////////////////////////////////////////////////////////////
+
+class Adder: public Root
+{ public:
+  Adder() : Root(factory, ADDER, NULL) {};
+  Adder(char *name) : Root(factory, ADDER, name) {};
+  Adder(const char *factory, enum t__object object, char *name) : Root(factory, object, name) {};
+  void set(double val);			// to set the remote adder
+  double get();				// to get value of the remote adder
+  void add(double val);			// to add a value to the remote adder
+};
+
+void Adder::set(double val)
+{ if (soap_call_ns__set(soap, endpoint, "", val, status))
+    soap_print_fault(soap, stderr);	// for demo, just print
+}
+
+double Adder::get()
+{ double val;
+  if (soap_call_ns__get(soap, endpoint, "", val))
+    soap_print_fault(soap, stderr);	// for demo, just print
+  return val;
+}
+
+void Adder::add(double val)
+{ if (soap_call_ns__add(soap, endpoint, "", val, status))
+    soap_print_fault(soap, stderr);	// for demo, just print
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Client-side counter proxy class derived from adder
+//
+////////////////////////////////////////////////////////////////////////////////
+
+class Counter: public Adder
+{ public:
+  Counter() : Adder(factory, COUNTER, NULL) {};
+  Counter(char *name) : Adder(factory, COUNTER, name) {};
+  Counter(const char *factory, enum t__object object, char *name) : Adder(factory, object, name) {};
+  void inc();				// to increment the remote counter
+};
+
+void Counter::inc()
+{ if (soap_call_ns__inc(soap, endpoint, "", status))
+    soap_print_fault(soap, stderr);	// for demo, just print
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Main client test program
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int main(int argc, char **argv)
+{ if (argc > 1)
+    factory = argv[1];			// use factory from command line arg by default
+  cout << "Connecting to factory " << factory << endl;
+  Adder adder;				// create unique new remote adder object
+  Counter counter1("myCounter");	// new counter object "myCounter" (created if not exists)
+  Counter counter2("myCounter");	// lookup and use counter "myCounter" (this is an alias to counter1!)
+  adder.set(2.0);
+  counter1.set(adder.get());
+  adder.add(3.0);
+  counter1.inc();
+  cout << "Adder=" << adder.get() << endl;
+  cout << "Counter=" << counter2.get() << endl;		// counter2 is an alias for counter1 so this prints the value of counter1
+  cout << "Sleep for 90 seconds to test factory server purging objects:" << endl;
+  // counter is periodically incremented which keeps it alive
+  sleep(30);
+  counter1.inc();
+  cout << "Counter=" << counter2.get() << endl;
+  sleep(30);
+  counter1.inc();
+  cout << "Counter=" << counter2.get() << endl;
+  sleep(30);
+  counter1.inc();
+  cout << "Counter=" << counter2.get() << endl;
+  // after 90 secs, the adder should be gone
+  cout << "Adder is no longer available:" << endl;
+  adder.add(3.0);
+  cout << "Adder status = " << adder.status << endl;
+  return 0;
+}
diff --git a/samples/factorytest/factorytest.h b/samples/factorytest/factorytest.h
new file mode 100644
index 0000000..371c9db
--- /dev/null
+++ b/samples/factorytest/factorytest.h
@@ -0,0 +1,81 @@
+/*	factorytest.h
+
+	Client-side remote object factory definitions
+
+	Copyright (C) 2000-2002 Robert A. van Engelen. All Rights Reserved.
+*/
+
+//gsoap ns service name:	factorytest
+//gsoap ns service style:	rpc
+//gsoap ns service encoding:	encoded
+//gsoap ns service namespace:	http://websrv.cs.fsu.edu/~engelen/factory.wsdl
+//gsoap ns service location:	http://localhost:18085
+
+//gsoap ns schema namespace: urn:factoryService
+
+//gsoap t schema namespace: urn:factoryTypes
+//gsoap h schema namespace: urn:factoryHandles
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  SOAP Header: used to exchange stateful object handles
+//
+////////////////////////////////////////////////////////////////////////////////
+
+struct SOAP_ENV__Header
+{ mustUnderstand unsigned int h__handle;
+};
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Remote factory objects
+//
+////////////////////////////////////////////////////////////////////////////////
+
+enum t__object				// object types:
+{ ROOT,					// t__root object
+  ADDER,				// t__adder object
+  COUNTER				// t__counter object
+};
+
+enum t__status				// remote object status:
+{ FACTORY_OK,					// ok
+  FACTORY_INVALID,				// invalid handle (wrong type of object or lease expired)
+  FACTORY_NOTFOUND,				// lookup operation not successful
+  FACTORY_RETRY					// cannot create new object: try later
+};
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Remote factory method interfaces
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int ns__create(enum t__object object, char *name, enum t__status &status);
+
+int ns__lookup(enum t__object object, char *name, enum t__status &status);
+
+int ns__rename(char *name, enum t__status &status);
+
+int ns__release(enum t__status &status);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Rewote adder method interfaces
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int ns__set(double val, enum t__status &status);
+
+int ns__get(double &val);
+
+int ns__add(double val, enum t__status &status);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Remote counter method interfaces
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int ns__inc(enum t__status &status);
+
diff --git a/samples/googleapi/Makefile b/samples/googleapi/Makefile
new file mode 100644
index 0000000..30b53ff
--- /dev/null
+++ b/samples/googleapi/Makefile
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		googleapi
+googleapi:	googleapi.h googleapi.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c googleapi.h
+		$(CC) $(CFLAGS) -o googleapi googleapi.c soapC.c soapClient.c $(SOAPC) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h googleapi
diff --git a/samples/googleapi/MakefileSolaris b/samples/googleapi/MakefileSolaris
new file mode 100644
index 0000000..fd7a139
--- /dev/null
+++ b/samples/googleapi/MakefileSolaris
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lxnet -lnsl -lsocket
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		googleapi
+googleapi:	googleapi.h googleapi.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c googleapi.h
+		$(CC) $(CFLAGS) -o googleapi googleapi.c soapC.c soapClient.c $(SOAPC) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h googleapi
diff --git a/samples/googleapi/googleapi.c b/samples/googleapi/googleapi.c
new file mode 100644
index 0000000..5ea829e
--- /dev/null
+++ b/samples/googleapi/googleapi.c
@@ -0,0 +1,98 @@
+/*	Google Web API
+	Compile and run from the command line:
+	googleapi <key> search|cached|spell <arg>
+	where <key> is the Google API license key (see http://www.google.com/apis)
+	Example:
+	googleapi XXXXXXXX search gSOAP
+
+Software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
+either express or implied.
+
+Copyright (C) 2002, Robert A. van Engelen, Florida State University.
+
+*/
+
+#include "soapH.h"
+#include "googleapi.nsmap"
+
+int main(int argc, char **argv)
+{ char *key, *dir, *arg;
+  struct soap soap;
+  soap_init2(&soap, SOAP_IO_DEFAULT, SOAP_XML_TREE);
+  if (argc <= 3)
+  { fprintf(stderr, "Usage: googleapi <key> search|cached|spell <arg>\n");
+    return 0;
+  }
+  key = argv[1];
+  dir = argv[2];
+  arg = argv[3];
+  if (!strcmp(dir, "search"))
+  { struct api__doGoogleSearchResponse r;
+    if (soap_call_api__doGoogleSearch(&soap, "http://api.google.com/search/beta2", "urn:GoogleSearchAction", key, arg, 0, 10, true_, "", false_, "", "latin1", "latin1", &r))
+    { soap_print_fault(&soap, stderr);
+      exit(1);
+    }
+    else
+    { int i;
+      printf("documentFiltering          = %d\n", (int)r._return.documentFiltering);
+      printf("searchQuery                = %s\n", r._return.searchQuery?r._return.searchQuery:"<NONE>");
+      printf("searchComments             = %s\n", r._return.searchComments?r._return.searchComments:"<NONE>");
+      printf("searchTips                 = %s\n", r._return.searchTips);
+      printf("searchTime                 = %f\n", r._return.searchTime);
+      printf("estimatedTotalResultsCount = %d\n", r._return.estimatedTotalResultsCount);
+      printf("estimateIsExact            = %d\n", (int)r._return.estimateIsExact);
+      printf("startIndex                 = %d\n", r._return.startIndex);
+      printf("endIndex                   = %d\n", r._return.endIndex);
+      printf("resultElements             = \n");
+      for (i = 0; i < r._return.resultElements.__size; i++)
+      { const char *s1 = r._return.resultElements.__ptr[i].summary;
+        const char *s2 = r._return.resultElements.__ptr[i].URL;
+        const char *s3 = r._return.resultElements.__ptr[i].snippet;
+        const char *s4 = r._return.resultElements.__ptr[i].title;
+        const char *s5 = r._return.resultElements.__ptr[i].cachedSize;
+        const char *s6 = r._return.resultElements.__ptr[i].directoryTitle;
+	/* skipped printing of directoryCategory field */
+        printf("[%3d]\tSummary        = %s\n", i+1, s1?s1:"<NONE>");
+        printf("\ttitle          = %s\n", s4?s4:"<NONE>");
+        printf("\tURL            = %s\n", s2?s2:"<NONE>");
+        printf("\tsnippet        = %s\n", s3?s3:"<NONE>");
+        printf("\tcachedSize     = %s\n", s5?s5:"<NONE>");
+        printf("\trelatedInfo    = %d\n", (int)r._return.resultElements.__ptr[i].relatedInformationPresent);
+        printf("\tdirectoryTitle = %s\n", s6?s6:"<NONE>");
+      }
+      printf("directoryCategories      = \n");
+      for (i = 0; i < r._return.directoryCategories.__size; i++)
+      { const char *s1 = r._return.directoryCategories.__ptr[i].fullViewableName;
+        const char *s2 = r._return.directoryCategories.__ptr[i].specialEncoding;
+        printf("\t%s\t%s\n", s1?s1:"<NONE>", s2?s2:"<NONE>");
+      }
+    }
+  }
+  else if (!strcmp(dir, "cached"))
+  { struct xsd__base64Binary r;
+    if (soap_call_api__doGetCachedPage(&soap, "http://api.google.com/search/beta2", "urn:GoogleSearchAction", key, arg, &r))
+    { soap_print_fault(&soap, stderr);
+      exit(1);
+    }
+    else
+    { int i;
+      for (i = 0; i < r.__size; i++)
+        putchar(r.__ptr[i]);
+      putchar('\n');
+    }
+  }
+  else if (!strcmp(dir, "spell"))
+  { char *r;
+    if (soap_call_api__doSpellingSuggestion(&soap, "http://api.google.com/search/beta2", "urn:GoogleSearchAction", key, arg, &r))
+    { soap_print_fault(&soap, stderr);
+      exit(1);
+    }
+    else
+      printf("Suggested spelling: %s\n", r?r:"<NONE>");
+  }
+  else
+    fprintf(stderr, "Unknown directive\n");
+  soap_end(&soap); /* remove all temporary and deserialized data */
+  soap_done(&soap);
+  return 0;
+}
diff --git a/samples/googleapi/googleapi.h b/samples/googleapi/googleapi.h
new file mode 100644
index 0000000..ea96111
--- /dev/null
+++ b/samples/googleapi/googleapi.h
@@ -0,0 +1,93 @@
+//	Google Web APIs
+
+//gsoap api service name:	googleapi
+//gsoap api service style:	rpc
+//gsoap api service encoding:	encoded
+//gsoap api service location:	http://api.google.com/search/beta2
+//gsoap api service namespace:	urn:GoogleSearch
+
+typedef char *	xsd__string;
+
+// C++ alternative for xsd:boolean:
+// typedef bool	xsd__boolean;
+// pure C alternative is:
+typedef enum {false_, true_} xsd__boolean;
+
+typedef int	xsd__int;
+
+typedef double	xsd__double;
+
+struct xsd__base64Binary
+{	unsigned char *			__ptr;
+	int				__size;
+};
+
+struct api__DirectoryCategory
+{	xsd__string			fullViewableName;
+	xsd__string			specialEncoding;
+};
+
+struct DirectoryCategoryArray
+{	struct api__DirectoryCategory *	__ptr;
+	int				__size;
+};
+
+struct api__ResultElement
+{	xsd__string			summary;
+	xsd__string			URL;
+	xsd__string			snippet;
+	xsd__string			title;
+	xsd__string			cachedSize;
+	xsd__boolean			relatedInformationPresent;
+	xsd__string			hostName;
+	struct api__DirectoryCategory	directoryCategory;
+	xsd__string			directoryTitle;
+};
+
+struct ResultElementArray
+{	struct api__ResultElement *	__ptr;
+	int				__size;
+};
+
+struct api__GoogleSearchResult
+{	xsd__boolean			documentFiltering;
+	xsd__string			searchComments;
+	xsd__int			estimatedTotalResultsCount;
+	xsd__boolean			estimateIsExact;
+	struct ResultElementArray	resultElements;
+	xsd__string			searchQuery;
+	xsd__int			startIndex;
+	xsd__int			endIndex;
+	xsd__string			searchTips;
+	struct DirectoryCategoryArray	directoryCategories;
+	xsd__double			searchTime;
+};
+
+api__doGoogleSearch
+(	xsd__string			key,
+	xsd__string			q,
+	xsd__int			start,
+	xsd__int			maxResults,
+	xsd__boolean			filter,
+	xsd__string			restrict_,
+	xsd__boolean			safeSearch,
+	xsd__string			lr,
+	xsd__string			ie,
+	xsd__string			oe,
+	struct api__doGoogleSearchResponse
+	{	struct api__GoogleSearchResult	_return;
+	}				*response
+);
+
+api__doGetCachedPage
+(	xsd__string			key,
+	xsd__string			url,
+	struct xsd__base64Binary	*_return
+);
+
+api__doSpellingSuggestion
+(	xsd__string			key,
+	xsd__string			phrase,
+	xsd__string			*_return
+);
+
diff --git a/samples/gpl.txt b/samples/gpl.txt
new file mode 100644
index 0000000..b34237a
--- /dev/null
+++ b/samples/gpl.txt
@@ -0,0 +1,309 @@
+The GNU General Public License (GPL)
+
+Version 2, June 1991
+
+Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite
+330, Boston, MA 02111-1307 USA
+
+Everyone is permitted to copy and distribute verbatim copies of this license
+document, but changing it is not allowed.
+
+Preamble
+
+The licenses for most software are designed to take away your freedom to share
+and change it. By contrast, the GNU General Public License is intended to
+guarantee your freedom to share and change free software--to make sure the
+software is free for all its users. This General Public License applies to most
+of the Free Software Foundation's software and to any other program whose
+authors commit to using it. (Some other Free Software Foundation software is
+covered by the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+When we speak of free software, we are referring to freedom, not price. Our
+General Public Licenses are designed to make sure that you have the freedom to
+distribute copies of free software (and charge for this service if you wish),
+that you receive source code or can get it if you want it, that you can change
+the software or use pieces of it in new free programs; and that you know you
+can do these things.
+
+To protect your rights, we need to make restrictions that forbid anyone to deny
+you these rights or to ask you to surrender the rights. These restrictions
+translate to certain responsibilities for you if you distribute copies of the
+software, or if you modify it.
+
+For example, if you distribute copies of such a program, whether gratis or for
+a fee, you must give the recipients all the rights that you have. You must make
+sure that they, too, receive or can get the source code. And you must show them
+these terms so they know their rights.
+
+We protect your rights with two steps: (1) copyright the software, and (2)
+offer you this license which gives you legal permission to copy, distribute
+and/or modify the software.
+
+Also, for each author's protection and ours, we want to make certain that
+everyone understands that there is no warranty for this free software. If the
+software is modified by someone else and passed on, we want its recipients to
+know that what they have is not the original, so that any problems introduced
+by others will not reflect on the original authors' reputations.
+
+Finally, any free program is threatened constantly by software patents. We wish
+to avoid the danger that redistributors of a free program will individually
+obtain patent licenses, in effect making the program proprietary.  To prevent
+this, we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+The precise terms and conditions for copying, distribution and modification
+follow.
+
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+0. This License applies to any program or other work which contains a notice
+placed by the copyright holder saying it may be distributed under the terms of
+this General Public License. The "Program", below, refers to any such program
+or work, and a "work based on the Program" means either the Program or any
+derivative work under copyright law: that is to say, a work containing the
+Program or a portion of it, either verbatim or with modifications and/or
+translated into another language. (Hereinafter, translation is included without
+limitation in the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not covered by
+this License; they are outside its scope. The act of running the Program is not
+restricted, and the output from the Program is covered only if its contents
+constitute a work based on the Program (independent of having been made by
+running the Program). Whether that is true depends on what the Program does.
+
+1. You may copy and distribute verbatim copies of the Program's source code as
+you receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice and
+disclaimer of warranty; keep intact all the notices that refer to this License
+and to the absence of any warranty; and give any other recipients of the
+Program a copy of this License along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and you may
+at your option offer warranty protection in exchange for a fee.
+
+2. You may modify your copy or copies of the Program or any portion of it, thus
+forming a work based on the Program, and copy and distribute such modifications
+or work under the terms of Section 1 above, provided that you also meet all of
+these conditions:
+
+a) You must cause the modified files to carry prominent notices stating that
+you changed the files and the date of any change.
+
+b) You must cause any work that you distribute or publish, that in whole or in
+part contains or is derived from the Program or any part thereof, to be
+licensed as a whole at no charge to all third parties under the terms of this
+License.
+
+c) If the modified program normally reads commands interactively when run, you
+must cause it, when started running for such interactive use in the most
+ordinary way, to print or display an announcement including an appropriate
+copyright notice and a notice that there is no warranty (or else, saying that
+you provide a warranty) and that users may redistribute the program under these
+conditions, and telling the user how to view a copy of this License.
+(Exception: if the Program itself is interactive but does not normally print
+such an announcement, your work based on the Program is not required to print
+an announcement.)
+
+These requirements apply to the modified work as a whole. If identifiable
+sections of that work are not derived from the Program, and can be reasonably
+considered independent and separate works in themselves, then this License, and
+its terms, do not apply to those sections when you distribute them as separate
+works. But when you distribute the same sections as part of a whole which is a
+work based on the Program, the distribution of the whole must be on the terms
+of this License, whose permissions for other licensees extend to the entire
+whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest your
+rights to work written entirely by you; rather, the intent is to exercise the
+right to control the distribution of derivative or collective works based on
+the Program.
+
+In addition, mere aggregation of another work not based on the Program with the
+Program (or with a work based on the Program) on a volume of a storage or
+distribution medium does not bring the other work under the scope of this
+License.
+
+3. You may copy and distribute the Program (or a work based on it, under
+Section 2) in object code or executable form under the terms of Sections 1 and
+2 above provided that you also do one of the following:
+
+a) Accompany it with the complete corresponding machine-readable source code,
+which must be distributed under the terms of Sections 1 and 2 above on a medium
+customarily used for software interchange; or,
+
+b) Accompany it with a written offer, valid for at least three years, to give
+any third party, for a charge no more than your cost of physically performing
+source distribution, a complete machine-readable copy of the corresponding
+source code, to be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange; or,
+
+c) Accompany it with the information you received as to the offer to distribute
+corresponding source code. (This alternative is allowed only for noncommercial
+distribution and only if you received the program in object code or executable
+form with such an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for making
+modifications to it. For an executable work, complete source code means all the
+source code for all modules it contains, plus any associated interface
+definition files, plus the scripts used to control compilation and installation
+of the executable. However, as a special exception, the source code distributed
+need not include anything that is normally distributed (in either source or
+binary form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component itself
+accompanies the executable.
+
+If distribution of executable or object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the source
+code from the same place counts as distribution of the source code, even though
+third parties are not compelled to copy the source along with the object code.
+
+4. You may not copy, modify, sublicense, or distribute the Program except as
+expressly provided under this License. Any attempt otherwise to copy, modify,
+sublicense or distribute the Program is void, and will automatically terminate
+your rights under this License. However, parties who have received copies, or
+rights, from you under this License will not have their licenses terminated so
+long as such parties remain in full compliance.
+
+5. You are not required to accept this License, since you have not signed it.
+However, nothing else grants you permission to modify or distribute the Program
+or its derivative works. These actions are prohibited by law if you do not
+accept this License. Therefore, by modifying or distributing the Program (or
+any work based on the Program), you indicate your acceptance of this License to
+do so, and all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+6. Each time you redistribute the Program (or any work based on the Program),
+the recipient automatically receives a license from the original licensor to
+copy, distribute or modify the Program subject to these terms and conditions.
+You may not impose any further restrictions on the recipients' exercise of the
+rights granted herein. You are not responsible for enforcing compliance by
+third parties to this License.
+
+7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues), conditions
+are imposed on you (whether by court order, agreement or otherwise) that
+contradict the conditions of this License, they do not excuse you from the
+conditions of this License. If you cannot distribute so as to satisfy
+simultaneously your obligations under this License and any other pertinent
+obligations, then as a consequence you may not distribute the Program at all.
+For example, if a patent license would not permit royalty-free redistribution
+of the Program by all those who receive copies directly or indirectly through
+you, then the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply and
+the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any patents or
+other property right claims or to contest validity of any such claims; this
+section has the sole purpose of protecting the integrity of the free software
+distribution system, which is implemented by public license practices. Many
+people have made generous contributions to the wide range of software
+distributed through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing to
+distribute software through any other system and a licensee cannot impose that
+choice.
+
+This section is intended to make thoroughly clear what is believed to be a
+consequence of the rest of this License.
+
+8. If the distribution and/or use of the Program is restricted in certain
+countries either by patents or by copyrighted interfaces, the original
+copyright holder who places the Program under this License may add an explicit
+geographical distribution limitation excluding those countries, so that
+distribution is permitted only in or among countries not thus excluded.  In
+such case, this License incorporates the limitation as if written in the body
+of this License.
+
+9. The Free Software Foundation may publish revised and/or new versions of the
+General Public License from time to time. Such new versions will be similar in
+spirit to the present version, but may differ in detail to address new problems
+or concerns.
+
+Each version is given a distinguishing version number. If the Program specifies
+a version number of this License which applies to it and "any later version",
+you have the option of following the terms and conditions either of that
+version or of any later version published by the Free Software Foundation.  If
+the Program does not specify a version number of this License, you may choose
+any version ever published by the Free Software Foundation.
+
+10. If you wish to incorporate parts of the Program into other free programs
+whose distribution conditions are different, write to the author to ask for
+permission. For software which is copyrighted by the Free Software Foundation,
+write to the Free Software Foundation; we sometimes make exceptions for this.
+Our decision will be guided by the two goals of preserving the free status of
+all derivatives of our free software and of promoting the sharing and reuse of
+software generally.
+
+NO WARRANTY
+
+11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
+THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
+STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
+PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
+PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU
+ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
+ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE
+PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
+INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
+BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
+OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+END OF TERMS AND CONDITIONS
+
+How to Apply These Terms to Your New Programs
+
+If you develop a new program, and you want it to be of the greatest possible
+use to the public, the best way to achieve this is to make it free software
+which everyone can redistribute and change under these terms.
+
+To do so, attach the following notices to the program. It is safest to attach
+them to the start of each source file to most effectively convey the exclusion
+of warranty; and each file should have at least the "copyright" line and a
+pointer to where the full notice is found.
+
+gSOAP XML Web services tools
+Copyright (C) 2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Also add information on how to contact you by electronic and paper mail:
+engelen@genivia.com / engelen@acm.org
+
+If the program is interactive, make it output a short notice like this when it
+starts in an interactive mode:
+
+gSOAP version X.Y.Z, Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc.
+gSOAP comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is
+free software, and you are welcome to redistribute it under certain conditions;
+type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may be
+called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may consider
+it more useful to permit linking proprietary applications with the library. If
+this is what you want to do, use the GNU Library General Public License instead
+of this License.
diff --git a/samples/listing/Makefile b/samples/listing/Makefile
new file mode 100644
index 0000000..d5aa8ec
--- /dev/null
+++ b/samples/listing/Makefile
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		listing
+listing:	listing.h listing.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) listing.h
+		$(CPP) $(CFLAGS) -o listing listing.cpp soapC.cpp soapClient.cpp $(SOAPCPP) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h listing
diff --git a/samples/listing/MakefileSolaris b/samples/listing/MakefileSolaris
new file mode 100644
index 0000000..c1e32c1
--- /dev/null
+++ b/samples/listing/MakefileSolaris
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lxnet -lnsl -lsocket
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		listing
+listing:	listing.h listing.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) listing.h
+		$(CPP) $(CFLAGS) -o listing listing.cpp soapC.cpp soapClient.cpp $(SOAPCPP) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h listing
diff --git a/samples/listing/listing.cpp b/samples/listing/listing.cpp
new file mode 100644
index 0000000..34af2a6
--- /dev/null
+++ b/samples/listing/listing.cpp
@@ -0,0 +1,47 @@
+#include "soapXMethodsQueryProxy.h"
+#include "XMethodsQuery.nsmap"
+
+int main(int argc, char** argv)
+{ XMethodsQuery query;
+  printf("Content-type: text/html\r\n\r\n<html><h1>Most Recent Xmethods Service Listing</h1><pre>\n");
+  if (argc >= 2 && argv[1][1] == 's')
+  { ArrayOfServiceSummary services;
+    if (!query.ns__getAllServiceSummaries(services))
+      services.print();
+    else
+    { soap_print_fault(query.soap, stderr);
+      soap_print_fault_location(query.soap, stderr);
+    }
+  }
+  else
+  { ArrayOfIDNamePair services;
+    if (!query.ns__getAllServiceNames(services))
+      services.print();
+    else
+    { soap_print_fault(query.soap, stderr);
+      soap_print_fault_location(query.soap, stderr);
+    }
+  }
+  printf("</pre></html>\n");
+  return 0;
+}
+
+void ArrayOfIDNamePair::print() const
+{ for (int i = 0; i < __size; i++)
+  { t__IDNamePair &pair = __ptr[i];
+    char *id = pair.id;
+    char *name = pair.name;
+    printf("<a href=\"http://www.xmethods.net/ve2/ViewListing.po?key=%s\">%s</a>\n", id?id:"", name?name:"?");
+  }
+}
+
+void ArrayOfServiceSummary::print() const
+{ for (int i = 0; i < __size; i++)
+  { t__ServiceSummary &summary = __ptr[i];
+    char *id = summary.id;
+    char *name = summary.name;
+    char *shortDescription = summary.shortDescription;
+    char *wsdlURL = summary.wsdlURL;
+    printf("<a href=\"http://www.xmethods.net/ve2/ViewListing.po?key=%s\">%s</a> \"%s\" <a href=\"%s\">%s</a>\n", id?id:"", name?name:"?", shortDescription?shortDescription:"", wsdlURL?wsdlURL:"", wsdlURL?wsdlURL:"no WSDL");
+  }
+}
diff --git a/samples/listing/listing.h b/samples/listing/listing.h
new file mode 100644
index 0000000..9602d88
--- /dev/null
+++ b/samples/listing/listing.h
@@ -0,0 +1,70 @@
+//gsoap ns service name:	XMethodsQuery
+//gsoap ns service style:	rpc
+//gsoap ns service encoding:	encoded
+//gsoap ns service namespace:	http://www.xmethods.net/interfaces/query.wsdl
+//gsoap ns service location:	http://www.xmethods.net/interfaces/query
+
+//gsoap ns schema namespace: http://www.xmethods.net/interfaces/query
+//gsoap t schema namespace: http://www.xmethods.net/interfaces/query.xsd
+
+class t__ServiceSummary
+{ public:
+  char *name;
+  char *id;
+  char *shortDescription;
+  char *wsdlURL;
+  char *publisherID;
+};
+
+class t__ServiceDetail
+{ public:
+  char *name;
+  char *id;
+  char *shortDescription;
+  char *description;
+  char *implementationID;
+  char *email;
+  char *wsdlURL;
+  char *infoURL;
+  char *discussionURL;
+  char *notes;
+  char *tmodelID;
+  char *publisherID;
+  char *uuid;
+};
+
+class t__IDNamePair
+{ public:
+  char *id;
+  char *name;
+};
+
+class ArrayOfServiceSummary
+{ public:
+  t__ServiceSummary *__ptr;
+  int __size;
+  void print() const;
+};
+
+class ArrayOfIDNamePair
+{ public:
+  t__IDNamePair *__ptr;
+  int __size;
+  void print() const;
+};
+
+//gsoap ns service method-action: getAllServiceSummaries ""
+ns__getAllServiceSummaries(ArrayOfServiceSummary&);
+
+//gsoap ns service method-action: getServiceSummariesByPublisher ""
+ns__getServiceSummariesByPublisher(char *publisherID, ArrayOfServiceSummary&);
+
+//gsoap ns service method-action: getServiceDetail ""
+ns__getServiceDetail(char *id, t__ServiceDetail&);
+
+//gsoap ns service method-action: getAllServiceNames ""
+ns__getAllServiceNames(ArrayOfIDNamePair&);
+
+//gsoap ns service method-action: getServiceNamesByPublisher ""
+ns__getServiceNamesByPublisher(char *publisherID, ArrayOfIDNamePair&);
+
diff --git a/samples/localtime/Makefile b/samples/localtime/Makefile
new file mode 100644
index 0000000..14754c2
--- /dev/null
+++ b/samples/localtime/Makefile
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		localtime
+localtime:	localtime.h localtime.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c localtime.h
+		$(CC) $(CFLAGS) -o localtime localtime.c soapC.c soapClient.c $(SOAPC) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h localtime
diff --git a/samples/localtime/MakefileSolaris b/samples/localtime/MakefileSolaris
new file mode 100644
index 0000000..94b0e7c
--- /dev/null
+++ b/samples/localtime/MakefileSolaris
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lxnet -lnsl -lsocket
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		localtime
+localtime:	localtime.h localtime.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c localtime.h
+		$(CC) $(CFLAGS) -o localtime localtime.c soapC.c soapClient.c $(SOAPC) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h localtime
diff --git a/samples/localtime/localtime.c b/samples/localtime/localtime.c
new file mode 100644
index 0000000..9d50b9b
--- /dev/null
+++ b/samples/localtime/localtime.c
@@ -0,0 +1,14 @@
+/* This client invokes a remote method of a service implemented in .NET with SOAP doc/lit encoding */
+/* Change the US zipcode in the subroutine call to obtain your local time */
+#include "soapH.h"
+#include "localtime.nsmap"
+int main()
+{ struct soap soap;
+  char *t;
+  soap_init(&soap);
+  if (soap_call_ns__LocalTimeByZipCode(&soap, "http://www.alethea.net/webservices/LocalTime.asmx", "http://www.alethea.net/webservices/LocalTimeByZipCode", "32306", &t))
+    soap_print_fault(&soap, stderr);
+  else
+    printf("Time = %s\n", t);
+  return 0;
+}
diff --git a/samples/localtime/localtime.h b/samples/localtime/localtime.h
new file mode 100644
index 0000000..c3ee4c8
--- /dev/null
+++ b/samples/localtime/localtime.h
@@ -0,0 +1,5 @@
+//gsoap ns service name:	localtime
+//gsoap ns service style:	document
+//gsoap ns service encoding:	literal
+//gsoap ns service namespace:	http://www.alethea.net/webservices/
+int ns__LocalTimeByZipCode(char *ZipCode, char **LocalTimeByZipCodeResult);
diff --git a/samples/lu/Makefile b/samples/lu/Makefile
new file mode 100644
index 0000000..d1351f9
--- /dev/null
+++ b/samples/lu/Makefile
@@ -0,0 +1,23 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		luclient luserver
+luclient:	lu.h luclient.cpp lumat.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) lu.h
+		$(CPP) $(CFLAGS) -o luclient luclient.cpp lumat.cpp soapC.cpp soapClient.cpp $(SOAPCPP) $(LIBS)
+luserver:	lu.h luserver.cpp lumat.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) lu.h
+		$(CPP) $(CFLAGS) -o luserver luserver.cpp lumat.cpp soapC.cpp soapServer.cpp $(SOAPCPP) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h luclient luserver
diff --git a/samples/lu/MakefileSolaris b/samples/lu/MakefileSolaris
new file mode 100644
index 0000000..cc467c5
--- /dev/null
+++ b/samples/lu/MakefileSolaris
@@ -0,0 +1,23 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lxnet -lnsl -lsocket
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		luclient luserver
+luclient:	lu.h luclient.cpp lumat.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) lu.h
+		$(CPP) $(CFLAGS) -o luclient luclient.cpp lumat.cpp soapC.cpp soapClient.cpp $(SOAPCPP) $(LIBS)
+luserver:	lu.h luserver.cpp lumat.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) lu.h
+		$(CPP) $(CFLAGS) -o luserver luserver.cpp lumat.cpp soapC.cpp soapServer.cpp $(SOAPCPP) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h luclient luserver
diff --git a/samples/lu/lu.h b/samples/lu/lu.h
new file mode 100644
index 0000000..e790960
--- /dev/null
+++ b/samples/lu/lu.h
@@ -0,0 +1,84 @@
+//gsoap ns1 service name:	lu
+//gsoap ns1 service style:	rpc
+//gsoap ns1 service encoding:	encoded
+//gsoap ns1 service namespace:	http://websrv.cs.fsu.edu/~engelen/lu.wsdl
+//gsoap ns1 service location:	http://websrv.cs.fsu.edu/~engelen/luserver.cgi
+
+//gsoap ns1 schema namespace: urn:lu
+typedef double xsd__double;
+typedef int xsd__int;
+class vector // dynamic array of type SOAP-ENC:Array with arrayType="double[]"
+{ public:
+	xsd__double		*__ptr; // pointer to array of double
+	int			__size; // number of elements pointed to
+	int			__offset;
+	struct soap		*soap;	// gSOAP env. instance was created
+				vector();
+				vector(struct soap *env);
+				vector(struct soap *env, int size);
+				vector(struct soap *env, int start, int end);
+	virtual			~vector();
+	virtual int		start(); // index of first element (=__offset)
+	virtual int		end();   // index of last element
+	virtual int		size();  // vector size
+	virtual void		resize(int size);
+	virtual void		resize(int start, int end);
+	virtual double&		operator[](int i);
+	virtual double		operator()(int i);
+	virtual void		print();
+};
+
+class ivector // dynamic array of type SOAP-ENC:Array with arrayType="int[]"
+{ public:
+	xsd__int		*__ptr; // pointer to array of int
+	int			__size; // number of elements pointed to
+	int			__offset;
+	struct soap		*soap;	// gSOAP env. instance was created
+				ivector();
+				ivector(struct soap *env);
+				ivector(struct soap *env, int size);
+				ivector(struct soap *env, int start, int end);
+	virtual			~ivector();
+	virtual int		start(); // index of first element (=__offset)
+	virtual int		end();   // index of last element
+	virtual int		size();  // vector size
+	virtual void		resize(int size);
+	virtual void		resize(int start, int end);
+	virtual int&		operator[](int i);
+	virtual int		operator()(int i);
+	virtual void		print();
+};
+
+class matrix // dynamic array of type SOAP-ENC:Array with arrayType="double[][]"
+{ public:
+	vector			*__ptr; // pointer to array of vectors
+	int			__size; // number of vectors pointed to
+	int			__offset;
+	struct soap		*soap;	// gSOAP env. instance was created
+				matrix();
+				matrix(struct soap *env);
+				matrix(struct soap *env, int rows);
+				matrix(struct soap *env, int rows, int cols);
+				matrix(struct soap *env, int rowstart, int rowend, int colstart, int colend);
+	virtual			~matrix();
+	virtual int		start();
+	virtual int		end();
+	virtual int		size();
+	virtual void		resize(int rows, int cols);
+	virtual void		resize(int rowstart, int rowend, int colstart, int colend);
+	virtual vector&		operator[](int i);
+	virtual double		operator()(int i, int j);
+	virtual void		print();
+};
+// LU decomposition, see Numerical Recipies for C
+ns1__ludcmp(matrix *a, struct ns1__ludcmpResponse {matrix *a; ivector *i; xsd__double d;} &result);
+// backsubstitution, see Numerical Recipies for C
+ns1__lubksb(matrix *a, ivector *i, vector *b, vector *x);
+// Linear system solver using LU decomposition: solves ax=b
+ns1__lusol(matrix *a, vector *b, vector *x);
+// Linear systems solver using LU decomposition: solves ax=b for all rows in x and b
+ns1__lusols(matrix *a, matrix *b, matrix *x);
+// Matrix inversion using LU decomposition
+ns1__luinv(matrix *a, matrix *b);
+// Determinant of matrix
+ns1__ludet(matrix *a, xsd__double &d);
diff --git a/samples/lu/luclient.cpp b/samples/lu/luclient.cpp
new file mode 100644
index 0000000..34db471
--- /dev/null
+++ b/samples/lu/luclient.cpp
@@ -0,0 +1,67 @@
+#include "soapH.h"
+#include <iostream.h>
+
+const char luserver[] = "http://websrv.cs.fsu.edu/~engelen/luserver.cgi";
+
+int main(int argc, char **argv)
+{ struct soap *soap = soap_new();
+  const char *endpoint;
+  matrix a(soap, 3); // matrix with 3 rows created in current soap env.
+  // set up matrix by specifying non-zero elements only (this is optional)
+  a[1].resize(1,2); // 2-element vector indexed from 1 to 2
+  a[1][1] = 2;
+  a[1][2] = 1;
+  a[2].resize(1,3); // 3-element vector
+  a[2][1] = 1;
+  a[2][2] = 2;
+  a[2][3] = 1;
+  a[3].resize(2,3); // 2-element vector indexed from 2 to 3
+  a[3][2] = 1;
+  a[3][3] = 2;
+  cout << "* Demonstration example *" << endl;
+  cout << "Matrix:" << endl;
+  a.print();
+  vector b(soap, 3);
+  b[1] = 1;
+  b[2] = 2;
+  b[3] = 3;
+  cout << "Vector:" << endl;
+  b.print();
+  vector x(soap);
+  if (argc < 2)
+    endpoint = luserver;
+  else
+    endpoint = argv[1];
+  /* solve ax=b */
+  if (soap_call_ns1__lusol(soap, endpoint, "", &a, &b, &x))
+  { soap_print_fault(soap, stderr);
+    soap_print_fault_location(soap, stderr);
+  }
+  else
+  { cout << "Solution vector from service:" << endl;
+    x.print();
+  }
+  matrix a1(soap);
+  if (soap_call_ns1__luinv(soap, endpoint, "", &a, &a1))
+  { soap_print_fault(soap, stderr);
+    soap_print_fault_location(soap, stderr);
+  }
+  else
+  { cout << "Inverse matrix matrix from service:" << endl;
+    a1.print();
+  }
+  soap_destroy(soap);
+  soap_end(soap);
+  free(soap);
+  return 0;
+}
+
+struct Namespace namespaces[] =
+{// "ns-prefix", "ns-name", "ns-pattern"
+  {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"},
+  {"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/"},
+  {"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance"},
+  {"xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema"},
+  {"ns1", "urn:lu"},
+  {NULL, NULL}
+};
diff --git a/samples/lu/lumat.cpp b/samples/lu/lumat.cpp
new file mode 100644
index 0000000..465c306
--- /dev/null
+++ b/samples/lu/lumat.cpp
@@ -0,0 +1,327 @@
+#include "soapH.h"
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  vector
+//
+////////////////////////////////////////////////////////////////////////////////
+
+vector::vector()
+{ vector(NULL);
+}
+
+vector::vector(struct soap *env)
+{ soap = env;
+  __ptr = 0;
+  __size = 0;
+  __offset = 0;
+}
+
+vector::vector(struct soap *env, int size)
+{ soap = env;
+  __size = size;
+  __offset = 1;
+  __ptr = (double*)soap_malloc(soap, size*sizeof(double));
+  for (int i = 0; i < size; i++)
+    __ptr[i] = 0.0;
+}
+
+vector::vector(struct soap *env, int start, int end)
+{ soap = env;
+  __size = end-start+1;
+  __offset = start;
+  __ptr = (double*)soap_malloc(soap, __size*sizeof(double));
+  for (int i = 0; i < __size; i++)
+    __ptr[i] = 0.0;
+}
+
+vector::~vector()
+{	// no deallocation: let gSOAP handle all dynamic allocation and deallocation
+}
+
+int vector::start()
+{ return __offset;
+}
+
+int vector::end()
+{ return __size+__offset-1;
+}
+
+int vector::size()
+{ return __size;
+}
+
+void vector::resize(int size)
+{ resize(1, size);
+}
+
+void vector::resize(int start, int end)
+{ double *p;
+  int n, size = end-start+1;
+  if (__offset == start && __size == size)
+    return; // nothing to do
+  p = (double*)soap_malloc(soap, size*sizeof(double));
+  for (int i = 0; i < size; i++)
+    p[i] = 0.0;
+  if (__ptr)
+  { if (start < __offset)
+    { n = (size-__offset+start <= __size ? size-__offset+start : __size);
+      for (int i = 0; i < n; i++)
+        p[__offset-start+i] = __ptr[i];
+    }
+    else
+    { n = (__size-start+__offset <= size ? __size-start+__offset : size);
+      for (int i = 0; i < n; i++)
+        p[i] = __ptr[start-__offset+i];
+    }
+    soap_dealloc(soap, __ptr);
+  }
+  __ptr = p;
+  __size = size;
+  __offset = start;
+}
+
+double& vector::operator[](int i)
+{ return __ptr[i-__offset];
+}
+
+double vector::operator()(int i)
+{ if (i >= __offset && i < __size+__offset)
+    return __ptr[i-__offset];
+  return 0.0;
+}
+
+void vector::print()
+{ int i;
+  for (i = 1; i <= end(); i++)
+    printf("%f ", (*this)(i));
+  printf("\n");
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ivector
+//
+////////////////////////////////////////////////////////////////////////////////
+
+ivector::ivector()
+{ ivector(NULL);
+}
+
+ivector::ivector(struct soap *env)
+{ soap = env;
+  __ptr = 0;
+  __size = 0;
+}
+
+ivector::ivector(struct soap *env, int size)
+{ soap = env;
+  __size = size;
+  __offset = 1;
+  __ptr = (int*)soap_malloc(soap, size*sizeof(int));
+  for (int i = 0; i < size; i++)
+    __ptr[i] = 0;
+}
+
+ivector::ivector(struct soap *env, int start, int end)
+{ soap = env;
+  __size = end-start+1;
+  __offset = start;
+  __ptr = (int*)soap_malloc(soap, __size*sizeof(int));
+  for (int i = 0; i < __size; i++)
+    __ptr[i] = 0;
+}
+
+ivector::~ivector()
+{	// no deallocation: let gSOAP handle all dynamic allocation and deallocation
+}
+
+int ivector::start()
+{ return __offset;
+}
+
+int ivector::end()
+{ return __size+__offset-1;
+}
+
+int ivector::size()
+{ return __size;
+}
+
+void ivector::resize(int size)
+{ resize(1, size);
+}
+
+void ivector::resize(int start, int end)
+{ int *p;
+  int n, size = end-start+1;
+  if (__offset == start && __size == size)
+    return; // nothing to do
+  p = (int*)soap_malloc(soap, size*sizeof(int));
+  for (int i = 0; i < size; i++)
+    p[i] = 0;
+  if (__ptr)
+  { if (start < __offset)
+    { n = (size-__offset+start <= __size ? size-__offset+start : __size);
+      for (int i = 0; i < n; i++)
+        p[__offset-start+i] = __ptr[i];
+    }
+    else
+    { n = (__size-start+__offset <= size ? __size-start+__offset : size);
+      for (int i = 0; i < n; i++)
+        p[i] = __ptr[start-__offset+i];
+    }
+    soap_dealloc(soap, __ptr);
+  }
+  __ptr = p;
+  __size = size;
+  __offset = start;
+}
+
+int& ivector::operator[](int i)
+{ return __ptr[i-__offset];
+}
+
+int ivector::operator()(int i)
+{ if (i >= __offset && i < __size+__offset)
+    return __ptr[i-__offset];
+  return 0;
+}
+
+void ivector::print()
+{ int i;
+  for (i = 1; i <= end(); i++)
+    printf("%4d ", (*this)(i));
+  printf("\n");
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  matrix
+//
+////////////////////////////////////////////////////////////////////////////////
+
+matrix::matrix()
+{ matrix(NULL);
+}
+
+matrix::matrix(struct soap *env)
+{ soap = env;
+  __ptr = 0;
+  __size = 0;
+  __offset = 0;
+}
+
+matrix::matrix(struct soap *env, int rows)
+{ soap = env;
+  __ptr = soap_new_vector(soap, rows);
+  __size = rows;
+  __offset = 1;
+}
+
+matrix::matrix(struct soap *env, int rows, int cols)
+{ soap = env;
+  __size = rows;
+  __offset = 1;
+  __ptr = soap_new_vector(soap, __size);
+  for (int i = 0; i < __size; i++)
+    __ptr[i].resize(cols);
+}
+
+matrix::matrix(struct soap *env, int rowstart, int rowend, int colstart, int colend)
+{ soap = env;
+  __size = rowend-rowstart+1;
+  __offset = rowstart;
+  __ptr = soap_new_vector(soap, __size);
+  for (int i = 0; i <= __size-__offset; i++)
+    __ptr[i].resize(colstart, colend);
+}
+
+matrix::~matrix()
+{ 	// no deallocation: let gSOAP handle all dynamic allocation and deallocation
+}
+
+int matrix::start()
+{ return __offset;
+}
+
+int matrix::end()
+{ return __size+__offset-1;
+}
+
+int matrix::size()
+{ return __size;
+}
+
+void matrix::resize(int rows, int cols)
+{ resize(1, rows, 1, cols);
+}
+
+void matrix::resize(int rowstart, int rowend, int colstart, int colend)
+{ int i;
+  vector *p;
+  int n, size = rowend-rowstart+1;
+  if (__offset != rowstart || __size != rowend-rowstart+1)
+  { if (__ptr)
+    { p = soap_new_vector(soap, size);
+      if (rowstart < __offset)
+      { for (i = 0; i < __offset-rowstart; i++)
+          p[i].resize(colstart, colend);
+        n = (size-__offset+rowstart <= __size ? size-__offset+rowstart : __size);
+        for (i = 0; i < n; i++)
+        { __ptr[i].resize(colstart, colend);
+          p[__offset-rowstart+i] = __ptr[i];
+        }
+	for (; i < size-__offset+rowstart; i++)
+	  p[i].resize(colstart, colend);
+      }
+      else
+      { n = (__size-rowstart+__offset <= size ? __size-rowstart+__offset : size);
+        for (i = 0; i < n; i++)
+        { __ptr[i].resize(colstart, colend);
+          p[i] = __ptr[rowstart-__offset+i];
+        }
+        for (; i < size; i++)
+          p[i].resize(colstart, colend);
+      }
+      __ptr = p;
+      __size = size;
+      __offset = rowstart;
+    }
+    else
+    { __size = size;
+      __offset = rowstart;
+      __ptr = soap_new_vector(soap, size);
+      for (i = 0; i < size; i++)
+        __ptr[i].resize(colstart, colend);
+    }
+  }
+  else
+    for (i = 0; i < size; i++)
+      __ptr[i].resize(colstart, colend);
+}
+
+vector& matrix::operator[](int i)
+{ return __ptr[i-__offset];
+}
+
+double matrix::operator()(int i, int j)
+{ int s;
+  if (i >= __offset && i < __size+__offset)
+  { s = __ptr[i-__offset].__offset;
+    if (j >= s && j < __ptr[i-__offset].__size+s)
+      return __ptr[i-__offset].__ptr[j-s];
+  }
+  return 0.0;
+}
+
+void matrix::print()
+{ int i, j;
+  for (i = start(); i <= end(); i++)
+  { for (j = 1; j < (*this)[i].start(); j++)
+      printf("-------- ");
+    for (; j <= (*this)[i].end(); j++)
+      printf("%f ", (*this)(i, j));
+    printf("\n");
+  }
+}
diff --git a/samples/lu/luserver.cpp b/samples/lu/luserver.cpp
new file mode 100644
index 0000000..933056f
--- /dev/null
+++ b/samples/lu/luserver.cpp
@@ -0,0 +1,277 @@
+#include "soapH.h"
+#include <math.h>
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  main
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int main(int argc, char **argv)
+{ struct soap *soap;
+  int m, s;
+  soap = soap_new();
+  if (argc < 3)
+    soap_serve(soap); // run as CGI application over the Web
+  else // run as stand-alone server on machine given by argv[1] listening to port argv[2]
+  { m = soap_bind(soap, argv[1], atoi(argv[2]), 100);
+    if (m < 0)
+    { soap_print_fault(soap, stderr);
+      exit(-1);
+    }
+    fprintf(stderr, "Socket connection successful: master socket = %d\n", m);
+    for (int i = 1; ; i++)
+    { s = soap_accept(soap);
+      if (s < 0)
+      { soap_print_fault(soap, stderr);
+        exit(-1);
+      }
+      fprintf(stderr, "%d: accepted connection from IP = %d.%d.%d.%d socket = %d ... ", i, (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF, s);
+      soap_serve(soap);		// process request
+      fprintf(stderr, "request served\n");
+      soap_destroy(soap);	// delete class instances
+      soap_end(soap);		// clean up everything and close socket
+    }
+  }
+  return 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  LU decomposition: remote method interface
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int ludcmp(struct soap*, matrix&, ivector&, double&);
+
+int ns1__ludcmp(struct soap *soap, matrix *a, struct ns1__ludcmpResponse &result)
+{ result.a = a;
+  result.i = soap_new_ivector(soap, -1);
+  if (ludcmp(soap, *result.a, *result.i, result.d))
+    return soap_sender_fault(soap, "Singular matrix in routine ludcmp", NULL);
+  return SOAP_OK;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  LU decomposition: algorithm
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int ludcmp(struct soap *soap, matrix &a, ivector &indx, double &d)
+{ int i, imax = 0, j, k, n;
+  double big, dum, sum, temp;
+  n = a.size();
+  vector vv(soap);
+  vv.resize(n);
+  indx.resize(n);
+  d = 1.0;
+  for (i = 1; i <= n; i++)
+  { big = 0.0;
+    a[i].resize(n);
+    for (j = 1; j <= n; j++)
+      if ((temp = fabs(a[i][j])) > big)
+        big = temp;
+    if (big == 0.0)
+      return -1;
+    vv[i] = 1.0/big;
+  }
+  for (j = 1; j <= n; j++)
+  { for (i = 1; i < j; i++)
+    { sum = a[i][j];
+      for (k = 1; k < i; k++)
+        sum -= a[i][k]*a[k][j];
+      a[i][j] = sum;
+    }
+    big = 0.0;
+    for (i = j; i <= n; i++)
+    { sum = a[i][j];
+      for (k = 1; k < j; k++)
+        sum -= a[i][k]*a[k][j];
+      a[i][j] = sum;
+      if ((dum = vv[i]*fabs(sum)) >= big)
+      { big = dum;
+        imax = i;
+      }
+    }
+    if (j != imax)
+    { for (k = 1; k <= n; k++)
+      { dum = a[imax][k];
+        a[imax][k] = a[j][k];
+        a[j][k] = dum;
+      }
+      d = -d;
+      vv[imax] = vv[j];
+    }
+    indx[j] = imax;
+    if (a[j][j] == 0.0)
+      a[j][j] = 1.0e-20;
+    if (j != n)
+    { dum = 1.0/a[j][j];
+      for (i = j+1; i <= n; i++)
+        a[i][j] *= dum;
+    }
+  }
+  for (i = 1; i <= n; i++)
+  { for (j = 1; j <= n; j++)
+      if (fabs(a[i][j]) > 1.0e-15)
+        break;
+    for (k = n; k > j; k--)
+      if (fabs(a[i][k]) > 1.0e-15)
+        break;
+    a[i].resize(j, k);
+  }
+  return 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Forward- and backsubstitution: remote method interface
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int lubksb(matrix&, ivector&, vector &b);
+
+int ns1__lubksb(struct soap *soap, matrix *a, ivector *i, vector *b, vector *x)
+{ lubksb(*a, *i, *b);
+  *x = *b;
+  return SOAP_OK;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Forward- and backsubstitution: algorithm
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int lubksb(matrix &a, ivector &indx, vector &b)
+{ int i, j, k, ip, n, m, ii = 0;
+  double sum;
+  n = a.size();
+  b.resize(n);
+  for (i = 1; i <= n; i++)
+  { ip = indx[i];
+    sum = b[ip];
+    b[ip] = b[i];
+    if (ii)
+    { k = a[i].start();
+      if (ii > k)
+        k = ii;
+      m = a[i].end();
+      if (i-1 < m)
+        m = i-1;
+      for (j = k; j <= m; j++)
+        sum -= a[i][j]*b[j];
+    }
+    else if (sum)
+      ii = i;
+    b[i] = sum;
+  }
+  for (i = n; i >= 1; i--)
+  { sum = b[i];
+    k = a[i].start();
+    if (i+1 > k)
+      k = i+1;
+    m = a[i].end();
+    if (n < m)
+      m = n;
+    for (j = k; j <= m; j++)
+      sum -= a[i][j]*b[j];
+    b[i] = sum/a[i][i];
+  }
+  return SOAP_OK;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  LU solve: remote method interface
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int ns1__lusol(struct soap *soap, matrix *a, vector *b, vector *x)
+{ ivector indx(soap);
+  double d;
+  if (ludcmp(soap, *a, indx, d))
+    return soap_sender_fault(soap, "Singular matrix in routine ludcmp", NULL);
+  lubksb(*a, indx, *b);
+  *x = *b;
+  return SOAP_OK;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  LU solve multiple: remote method interface
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int ns1__lusols(struct soap *soap, matrix *a, matrix *b, matrix *x)
+{ ivector indx(soap);
+  double d;
+  if (ludcmp(soap, *a, indx, d))
+    return soap_sender_fault(soap, "Singular matrix in routine ludcmp", NULL);
+  for (int i = 1; i <= b->size(); i++)
+    lubksb(*a, indx, (*b)[i]);
+  *x = *b;
+  return SOAP_OK;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  LU inverse: remote method interface
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int ns1__luinv(struct soap *soap, matrix *a, matrix *b)
+{ vector col(soap);
+  ivector indx(soap);
+  double d;
+  int i, j, k, n;
+  if (ludcmp(soap, *a, indx, d))
+    return soap_sender_fault(soap, "Singular matrix in routine ludcmp", NULL);
+  n = a->size();
+  col.resize(n);
+  b->resize(n, n);
+  for (j = 1; j <= n; j++)
+  { for (i = 1; i <= n; i++)
+      col[i] = 0.0;
+    col[j] = 1.0;
+    lubksb(*a, indx, col);
+    for (i = 1; i <= n; i++)
+      (*b)[i][j] = col[i];
+  }
+  for (i = 1; i <= n; i++)
+  { for (j = 1; j <= n; j++)
+      if (fabs((*b)[i][j]) > 1.0e-15)
+        break;
+    for (k = n; k > j; k--)
+      if (fabs((*b)[i][k]) > 1.0e-15)
+        break;
+    (*b)[i].resize(j, k);
+  }
+  return SOAP_OK;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  LU determinant: remote method interface
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int ns1__ludet(struct soap *soap, matrix *a, double &d)
+{ ivector indx(soap);
+  if (ludcmp(soap, *a, indx, d))
+    return soap_sender_fault(soap, "Singular matrix in routine ludcmp", NULL);
+  for (int i = 1; i <= a->__size; i++)
+    d *= (*a)[i][i];
+  return SOAP_OK;
+}
+
+struct Namespace namespaces[] =
+{// "ns-prefix", "ns-name", "ns-pattern"
+  {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"},
+  {"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/"},
+  {"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://wwww.w3.org/*/XMLSchema-instance"},
+  {"xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema"},
+  {"ns1", "urn:lu"},
+  {NULL, NULL}
+};
diff --git a/samples/magic/Makefile b/samples/magic/Makefile
new file mode 100644
index 0000000..5ec43d3
--- /dev/null
+++ b/samples/magic/Makefile
@@ -0,0 +1,26 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		magic magicserver mtmagicserver
+magic:		magic.h magic.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) magic.h
+		$(CPP) $(CFLAGS) -o magic magic.cpp soapC.cpp soapClient.cpp $(SOAPCPP) $(LIBS)
+magicserver:	magic.h magicserver.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) magic.h
+		$(CPP) $(CFLAGS) -o magicserver magicserver.cpp soapC.cpp soapServer.cpp $(SOAPCPP) $(LIBS)
+mtmagicserver:	magic.h mtmagicserver.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) magic.h
+		$(CPP) $(CFLAGS) -o mtmagicserver mtmagicserver.cpp soapC.cpp soapServer.cpp $(SOAPCPP) -lpthread $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h magic magicserver mtmagicserver
diff --git a/samples/magic/MakefileSolaris b/samples/magic/MakefileSolaris
new file mode 100644
index 0000000..ba7a307
--- /dev/null
+++ b/samples/magic/MakefileSolaris
@@ -0,0 +1,26 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lxnet -lnsl -lsocket
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		magic magicserver mtmagicserver
+magic:		magic.h magic.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) magic.h
+		$(CPP) $(CFLAGS) -o magic magic.cpp soapC.cpp soapClient.cpp $(SOAPCPP) $(LIBS)
+magicserver:	magic.h magicserver.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) magic.h
+		$(CPP) $(CFLAGS) -o magicserver magicserver.cpp soapC.cpp soapServer.cpp $(SOAPCPP) $(LIBS)
+mtmagicserver:	magic.h mtmagicserver.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) magic.h
+		$(CPP) $(CFLAGS) -o mtmagicserver mtmagicserver.cpp soapC.cpp soapServer.cpp $(SOAPCPP) -lpthread $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h magic magicserver mtmagicserver
diff --git a/samples/magic/magic.cpp b/samples/magic/magic.cpp
new file mode 100644
index 0000000..b48107b
--- /dev/null
+++ b/samples/magic/magic.cpp
@@ -0,0 +1,143 @@
+#include "soapH.h"
+#include "magic.nsmap"
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Magic Squares Client
+//
+////////////////////////////////////////////////////////////////////////////////
+
+// To access a stand-alone server on a port: magicserver[] = "IP:PORT";
+// use "http://" to include HTTP header, e.g: magicserver[] = "http://IP:PORT";
+const char magicserver[] = "http://www.cs.fsu.edu/~engelen/magicserver.cgi";
+// To send request to stdout and read response from stdin, use:
+// const char magicserver[] = "http://";
+
+int main(int argc, char **argv)
+{ struct soap soap;
+  int r;
+  soap_init(&soap);
+  matrix *A = soap_new_matrix(&soap, -1);
+  if (argc <= 1)
+  { char *s = getenv("QUERY_STRING");
+    if (!s || (r = atoi(s)) == 0)
+      r = rand()%20;
+  }
+  else
+    r = atoi(argv[1]);
+  printf("Content-type: text/html\r\n\r\n<html><h1>Magic Square of Rank %d</h1><pre>\n", r);
+  if (soap_call_ns1__magic(&soap, magicserver, NULL, r, A))
+  { soap_print_fault(&soap, stderr);
+    soap_print_fault_location(&soap, stderr);
+  }
+  else
+  { for (int i = 0; i < (*A).__size; i++)
+    { for (int j = 0; j < (*A)[i].__size; j++)
+        printf("%4d", (*A)[i][j]);
+      printf("\n");
+    }
+  }
+  printf("</pre></html>\n");
+  soap_destroy(&soap);
+  soap_end(&soap);
+  soap_done(&soap);
+  return 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Class vector Methods
+//
+////////////////////////////////////////////////////////////////////////////////
+
+vector::vector()
+{ __ptr = 0;
+  __size = 0;
+}
+
+vector::vector(int size)
+{ __ptr = (int*)soap_malloc(soap, size*sizeof(int));
+  __size = size;
+}
+
+vector::~vector()
+{ soap_unlink(soap, this); // not required, but just to make sure if someone calls delete on this
+}
+
+void vector::resize(int size)
+{ int *p;
+  if (__size == size)
+    return;
+  p = (int*)soap_malloc(soap, size*sizeof(int));
+  if (__ptr)
+  { for (int i = 0; i < (size <= __size ? size : __size); i++)
+      p[i] = __ptr[i];
+    soap_unlink(soap, __ptr);
+    free(__ptr);
+  }
+  __ptr = p;
+  __size = size;
+}
+
+int& vector::operator[](int idx) const
+{ if (!__ptr || idx < 0 || idx >= __size)
+    fprintf(stderr, "Array index out of bounds\n");
+  return __ptr[idx];
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Class matrix Methods
+//
+////////////////////////////////////////////////////////////////////////////////
+
+matrix::matrix()
+{ __ptr = 0;
+  __size = 0;
+}
+
+matrix::~matrix()
+{ soap_unlink(soap, this); // not required, but just to make sure if someone calls delete on this
+}
+
+matrix::matrix(int rows, int cols)
+{ 
+  __ptr = soap_new_vector(soap, rows);
+  for (int i = 0; i < cols; i++)
+    __ptr[i].resize(cols);
+  __size = rows;
+}
+
+void matrix::resize(int rows, int cols)
+{ int i;
+  vector *p;
+  if (__size != rows)
+  { if (__ptr)
+    { p = soap_new_vector(soap, rows);
+      for (i = 0; i < (rows <= __size ? rows : __size); i++)
+      { if (this[i].__size != cols)
+          (*this)[i].resize(cols);
+	(p+i)->__ptr = __ptr[i].__ptr;
+	(p+i)->__size = cols;
+      }
+      for (; i < rows; i++)
+        __ptr[i].resize(cols);
+    }
+    else
+    { 
+      __ptr = soap_new_vector(soap, rows);
+      for (i = 0; i < rows; i++)
+        __ptr[i].resize(cols);
+      __size = rows;
+    }
+  }
+  else
+    for (i = 0; i < __size; i++)
+      __ptr[i].resize(cols);
+}
+
+vector& matrix::operator[](int idx) const
+{ if (!__ptr || idx < 0 || idx >= __size)
+    fprintf(stderr, "Array index out of bounds\n");
+  return __ptr[idx];
+}
diff --git a/samples/magic/magic.h b/samples/magic/magic.h
new file mode 100644
index 0000000..42a44fb
--- /dev/null
+++ b/samples/magic/magic.h
@@ -0,0 +1,36 @@
+//gsoap ns1 service name:	magic
+//gsoap ns1 service style:	rpc
+//gsoap ns1 service encoding:	encoded
+//gsoap ns1 service namespace:	http://websrv.cs.fsu.edu/~engelen/magic.wsdl
+//gsoap ns1 service location:	http://websrv.cs.fsu.edu/~engelen/magicserver.cgi
+//gsoap ns1 service documentation: Demo Magic Squares service
+
+//gsoap ns1 schema namespace: urn:MagicSquare
+
+typedef int xsd__int;
+
+class vector
+{ public:
+  xsd__int *__ptr;
+  int __size;
+  struct soap *soap;
+  vector();
+  vector(int);
+  virtual ~vector();
+  void resize(int);
+  int& operator[](int) const;
+};
+
+class matrix
+{ public:
+  vector *__ptr;
+  int __size;
+  struct soap *soap;
+  matrix();
+  matrix(int, int);
+  virtual ~matrix();
+  void resize(int, int);
+  vector& operator[](int) const;
+};
+
+int ns1__magic(xsd__int rank, matrix *result);
diff --git a/samples/magic/magicserver.cpp b/samples/magic/magicserver.cpp
new file mode 100644
index 0000000..45f846d
--- /dev/null
+++ b/samples/magic/magicserver.cpp
@@ -0,0 +1,189 @@
+#include "soapH.h"
+#include "magic.nsmap"
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Magic Squares Server
+//
+////////////////////////////////////////////////////////////////////////////////
+
+// Install as a CGI application.
+// Alternatively, run from command line with arguments IP (which must be the
+// IP of the current machine you are using) and PORT to run this as a
+// stand-alone server on a port. For example:
+// > magicserver.cgi 18081 &
+// To let 'magic' talk to this service, change the URL in magic.cpp into
+// "http://localhost:18081"
+
+int main(int argc, char **argv)
+{ struct soap soap;
+  int m, s;
+  soap_init(&soap);
+  // soap.accept_timeout = 60; // die if no requests are made within 1 minute
+  if (argc < 2)
+  { soap_serve(&soap);
+    soap_destroy(&soap);
+    soap_end(&soap);	// clean up 
+  }
+  else
+  { m = soap_bind(&soap, NULL, atoi(argv[1]), 100);
+    if (m < 0)
+    { soap_print_fault(&soap, stderr);
+      exit(1);
+    }
+    fprintf(stderr, "Socket connection successful %d\n", m);
+    for (int i = 1; ; i++)
+    { s = soap_accept(&soap);
+      if (s < 0)
+      { if (soap.errnum)
+          soap_print_fault(&soap, stderr);
+	else
+	  fprintf(stderr, "Server timed out\n");
+	break;
+      }
+      fprintf(stderr, "%d: accepted %d IP=%d.%d.%d.%d ... ", i, s, (int)(soap.ip>>24)&0xFF, (int)(soap.ip>>16)&0xFF, (int)(soap.ip>>8)&0xFF, (int)soap.ip&0xFF);
+      soap_serve(&soap);	// process RPC skeletons
+      fprintf(stderr, "served\n");
+      soap_destroy(&soap);
+      soap_end(&soap);	// clean up 
+    }
+  }
+  soap_done(&soap);
+  return 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Magic Square Algorithm
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int ns1__magic(struct soap *soap, int n, matrix *square)
+{ int i, j, k, l, key = 2;
+  if (n < 1)
+    return soap_sender_fault(soap, "Negative or zero size", "<error xmlns=\"http://tempuri.org/\">The input parameter must be positive</error>");
+  if (n > 100)
+    return soap_sender_fault(soap, "size > 100", "<error xmlns=\"http://tempuri.org/\">The input parameter must not be too large</error>");
+  square->resize(n, n);
+  for (i = 0; i < n; i++)
+    for (j = 0; j < n; j++)
+      (*square)[i][j] = 0;
+  i = 0;
+  j = (n-1)/2;
+  (*square)[i][j] = 1;
+  while (key <= n*n)
+  { if (i-1 < 0)
+      k = n-1;
+    else
+      k = i-1;
+    if (j-1 < 0)
+      l = n-1;
+    else
+      l = j-1;
+    if ((*square)[k][l])
+      i = (i+1) % n;
+    else
+    { i = k;
+      j = l;
+    }
+    (*square)[i][j] = key;
+    key++;
+  }
+  return SOAP_OK;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Class vector Methods
+//
+////////////////////////////////////////////////////////////////////////////////
+
+vector::vector()
+{ __ptr = 0;
+  __size = 0;
+}
+
+vector::vector(int n)
+{ __ptr = (int*)soap_malloc(soap, n*sizeof(int));
+  __size = n;
+}
+
+vector::~vector()
+{ soap_unlink(soap, this); // not required, but just to make sure if someone calls delete on this
+}
+
+void vector::resize(int n)
+{ int *p;
+  if (__size == n)
+    return;
+  p = (int*)soap_malloc(soap, n*sizeof(int));
+  if (__ptr)
+  { for (int i = 0; i < (n <= __size ? n : __size); i++)
+      p[i] = __ptr[i];
+    soap_unlink(soap, __ptr);
+    free(__ptr);
+  }
+  __size = n;
+  __ptr = p;
+}
+
+int& vector::operator[](int i) const
+{ if (!__ptr || i < 0 || i >= __size)
+    fprintf(stderr, "Array index out of bounds\n");
+  return (__ptr)[i];
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Class matrix Methods
+//
+////////////////////////////////////////////////////////////////////////////////
+
+matrix::matrix()
+{ __ptr = 0;
+  __size = 0;
+}
+
+matrix::matrix(int rows, int cols)
+{ __ptr = soap_new_vector(soap, rows);
+  for (int i = 0; i < cols; i++)
+    __ptr[i].resize(cols);
+  __size = rows;
+}
+
+matrix::~matrix()
+{ soap_unlink(soap, this); // not required, but just to make sure if someone calls delete on this
+}
+
+void matrix::resize(int rows, int cols)
+{ int i;
+  vector *p;
+  if (__size != rows)
+  { if (__ptr)
+    { p = soap_new_vector(soap, rows);
+      for (i = 0; i < (rows <= __size ? rows : __size); i++)
+      { if (this[i].__size != cols)
+          (*this)[i].resize(cols);
+	(p+i)->__ptr = __ptr[i].__ptr;
+	(p+i)->__size = cols;
+      }
+      for (; i < rows; i++)
+        __ptr[i].resize(cols);
+    }
+    else
+    { __ptr = soap_new_vector(soap, rows);
+      for (i = 0; i < rows; i++)
+        __ptr[i].resize(cols);
+      __size = rows;
+    }
+  }
+  else
+    for (i = 0; i < __size; i++)
+      __ptr[i].resize(cols);
+}
+
+vector& matrix::operator[](int i) const
+{ if (!__ptr || i < 0 || i >= __size)
+    fprintf(stderr, "Array index out of bounds\n");
+  return __ptr[i];
+}
diff --git a/samples/magic/mtmagicserver.cpp b/samples/magic/mtmagicserver.cpp
new file mode 100644
index 0000000..7d56e27
--- /dev/null
+++ b/samples/magic/mtmagicserver.cpp
@@ -0,0 +1,220 @@
+//	mtmagicserver.cpp
+//	Multi-threaded magic squares server
+//	Runs as CGI (not multi-threaded) or multi-threaded standalone
+//	Computation of the magic square has been deliberately slowed down to
+//	demonstrate work load issues (see SLEEP constant)
+
+// Run from the command line with arguments IP (which must be the
+// IP of the current machine you are using) and PORT to run this as a
+// multi-threaded stand-alone server on a port. For example:
+// > mtmagicserver.cgi 18081
+// To let 'magic' client talk to this service, change the URL in code magic.cpp
+// into "localhost:18081"
+
+// This example illustrates two alternative server implementations with threads.
+// The first implementation recycles gSOAP resources but is bounded to a maximum
+// number of threads. Each thread needs to be joined, so runaway processes will
+// halt the server at some point.
+// The second implementation has no thread limitation. Runaway threads are not
+// controlled.
+
+#include "soapH.h"
+#include "magic.nsmap"
+#include <unistd.h>	// import sleep()
+#include <pthread.h>
+
+#define BACKLOG (100)	// Max. request backlog
+#define MAX_THR (8)	// Max. threads to serve requests
+#define SLEEP	(0)	// use this to make each thread sleep to mimic work load latency
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Multi-Threaded Magic Squares Server
+//
+////////////////////////////////////////////////////////////////////////////////
+
+void *process_request(void*);
+
+int main(int argc, char **argv)
+{ struct soap soap;
+  soap_init(&soap);
+  // soap.accept_timeout = 60; // die if no requests are made within 1 minute
+  if (argc < 2)		// no args: assume this is a CGI application
+  { soap_serve(&soap);	// serve request
+    soap_destroy(&soap);// cleanup class instances
+    soap_end(&soap);	// cleanup
+  }
+  else
+  { pthread_t tid;
+    int port;
+    int m, s, i;
+    port = atoi(argv[1]);
+    m = soap_bind(&soap, NULL, port, BACKLOG);
+    if (m < 0)
+    { soap_print_fault(&soap, stderr);
+      exit(1);
+    }
+    fprintf(stderr, "Socket connection successful %d\n", m);
+    for (i = 0; ; i++)
+    { s = soap_accept(&soap);
+      if (s < 0)
+      { if (soap.errnum)
+          soap_print_fault(&soap, stderr);
+	else
+	  fprintf(stderr, "Server timed out\n");
+        break;
+      }
+      fprintf(stderr, "Thread %d accepts socket %d connection from IP %d.%d.%d.%d\n", i, s, (int)(soap.ip>>24)&0xFF, (int)(soap.ip>>16)&0xFF, (int)(soap.ip>>8)&0xFF, (int)soap.ip&0xFF);
+      pthread_create(&tid, NULL, (void*(*)(void*))process_request, (void*)soap_copy(&soap));
+    }
+  }
+  soap_done(&soap);
+  return 0;
+}
+
+void *process_request(void *soap)
+{ pthread_detach(pthread_self());
+  soap_serve((struct soap*)soap);
+  soap_destroy((struct soap*)soap);
+  soap_end((struct soap*)soap);
+  soap_done((struct soap*)soap);
+  free(soap);
+  return NULL;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Magic Square Algorithm
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int ns1__magic(struct soap *soap, int n, matrix *square)
+{ int i, j, k, l, key = 2;
+  if (n < 1)
+    return soap_sender_fault(soap, "Negative or zero size", "<error xmlns=\"http://tempuri.org/\">The input parameter must be positive</error>");
+  if (n > 100)
+    return soap_sender_fault(soap, "size > 100", "<error xmlns=\"http://tempuri.org/\">The input parameter must not be too large</error>");
+  square->resize(n, n);
+  for (i = 0; i < n; i++)
+    for (j = 0; j < n; j++)
+      (*square)[i][j] = 0;
+  i = 0;
+  j = (n-1)/2;
+  (*square)[i][j] = 1;
+  while (key <= n*n)
+  { if (i-1 < 0)
+      k = n-1;
+    else
+      k = i-1;
+    if (j-1 < 0)
+      l = n-1;
+    else
+      l = j-1;
+    if ((*square)[k][l])
+      i = (i+1) % n;
+    else
+    { i = k;
+      j = l;
+    }
+    (*square)[i][j] = key;
+    key++;
+  }
+  sleep(SLEEP);		// mimic work load latency
+  return SOAP_OK;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Class vector Methods
+//
+////////////////////////////////////////////////////////////////////////////////
+
+vector::vector()
+{ __ptr = 0;
+  __size = 0;
+}
+
+vector::vector(int n)
+{ __ptr = (int*)soap_malloc(soap, n*sizeof(int));
+  __size = n;
+}
+
+vector::~vector()
+{ soap_unlink(soap, this); // not required, but just to make sure if someone calls delete on this
+}
+
+void vector::resize(int n)
+{ int *p;
+  if (__size == n)
+    return;
+  p = (int*)soap_malloc(soap, n*sizeof(int));
+  if (__ptr)
+  { for (int i = 0; i < (n <= __size ? n : __size); i++)
+      p[i] = __ptr[i];
+    soap_unlink(soap, __ptr);
+    free(__ptr);
+  }
+  __size = n;
+  __ptr = p;
+}
+
+int& vector::operator[](int i) const
+{ if (!__ptr || i < 0 || i >= __size)
+    fprintf(stderr, "Array index out of bounds\n");
+  return __ptr[i];
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Class matrix Methods
+//
+////////////////////////////////////////////////////////////////////////////////
+
+matrix::matrix()
+{ __ptr = 0;
+  __size = 0;
+}
+
+matrix::matrix(int rows, int cols)
+{ __ptr = soap_new_vector(soap, rows);
+  for (int i = 0; i < cols; i++)
+    __ptr[i].resize(cols);
+  __size = rows;
+}
+
+matrix::~matrix()
+{ soap_unlink(soap, this); // not required, but just to make sure if someone calls delete on this
+}
+
+void matrix::resize(int rows, int cols)
+{ int i;
+  vector *p;
+  if (__size != rows)
+  { if (__ptr)
+    { p = soap_new_vector(soap, rows);
+      for (i = 0; i < (rows <= __size ? rows : __size); i++)
+      { if (this[i].__size != cols)
+          (*this)[i].resize(cols);
+	(p+i)->__ptr = __ptr[i].__ptr;
+	(p+i)->__size = cols;
+      }
+      for (; i < rows; i++)
+        __ptr[i].resize(cols);
+    }
+    else
+    { __ptr = soap_new_vector(soap, rows);
+      for (i = 0; i < rows; i++)
+        __ptr[i].resize(cols);
+      __size = rows;
+    }
+  }
+  else
+    for (i = 0; i < __size; i++)
+      __ptr[i].resize(cols);
+}
+
+vector& matrix::operator[](int i) const
+{ if (!__ptr || i < 0 || i >= __size)
+    fprintf(stderr, "Array index out of bounds\n");
+  return __ptr[i];
+}
diff --git a/samples/magic_VC/Magic2.dsp b/samples/magic_VC/Magic2.dsp
new file mode 100644
index 0000000..85821e7
--- /dev/null
+++ b/samples/magic_VC/Magic2.dsp
@@ -0,0 +1,144 @@
+# Microsoft Developer Studio Project File - Name="Magic2" - Package Owner=<4>

+# Microsoft Developer Studio Generated Build File, Format Version 6.00

+# ** DO NOT EDIT **

+

+# TARGTYPE "Win32 (x86) Console Application" 0x0103

+

+CFG=Magic2 - Win32 Debug

+!MESSAGE This is not a valid makefile. To build this project using NMAKE,

+!MESSAGE use the Export Makefile command and run

+!MESSAGE 

+!MESSAGE NMAKE /f "Magic2.mak".

+!MESSAGE 

+!MESSAGE You can specify a configuration when running NMAKE

+!MESSAGE by defining the macro CFG on the command line. For example:

+!MESSAGE 

+!MESSAGE NMAKE /f "Magic2.mak" CFG="Magic2 - Win32 Debug"

+!MESSAGE 

+!MESSAGE Possible choices for configuration are:

+!MESSAGE 

+!MESSAGE "Magic2 - Win32 Release" (based on "Win32 (x86) Console Application")

+!MESSAGE "Magic2 - Win32 Debug" (based on "Win32 (x86) Console Application")

+!MESSAGE 

+

+# Begin Project

+# PROP AllowPerConfigDependencies 0

+# PROP Scc_ProjName ""

+# PROP Scc_LocalPath ""

+CPP=cl.exe

+RSC=rc.exe

+

+!IF  "$(CFG)" == "Magic2 - Win32 Release"

+

+# PROP BASE Use_MFC 0

+# PROP BASE Use_Debug_Libraries 0

+# PROP BASE Output_Dir "Release"

+# PROP BASE Intermediate_Dir "Release"

+# PROP BASE Target_Dir ""

+# PROP Use_MFC 0

+# PROP Use_Debug_Libraries 0

+# PROP Output_Dir "Release"

+# PROP Intermediate_Dir "Release"

+# PROP Target_Dir ""

+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c

+# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c

+# ADD BASE RSC /l 0x409 /d "NDEBUG"

+# ADD RSC /l 0x409 /d "NDEBUG"

+BSC32=bscmake.exe

+# ADD BASE BSC32 /nologo

+# ADD BSC32 /nologo

+LINK32=link.exe

+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386

+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386

+

+!ELSEIF  "$(CFG)" == "Magic2 - Win32 Debug"

+

+# PROP BASE Use_MFC 0

+# PROP BASE Use_Debug_Libraries 1

+# PROP BASE Output_Dir "Debug"

+# PROP BASE Intermediate_Dir "Debug"

+# PROP BASE Target_Dir ""

+# PROP Use_MFC 0

+# PROP Use_Debug_Libraries 1

+# PROP Output_Dir "Debug"

+# PROP Intermediate_Dir "Debug"

+# PROP Ignore_Export_Lib 0

+# PROP Target_Dir ""

+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c

+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c

+# ADD BASE RSC /l 0x409 /d "_DEBUG"

+# ADD RSC /l 0x409 /d "_DEBUG"

+BSC32=bscmake.exe

+# ADD BASE BSC32 /nologo

+# ADD BSC32 /nologo

+LINK32=link.exe

+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept

+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept

+

+!ENDIF 

+

+# Begin Target

+

+# Name "Magic2 - Win32 Release"

+# Name "Magic2 - Win32 Debug"

+# Begin Group "Source Files"

+

+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"

+# Begin Source File

+

+SOURCE=.\magicclient.cpp

+# End Source File

+# Begin Source File

+

+SOURCE=.\soapC.cpp

+# End Source File

+# Begin Source File

+

+SOURCE=.\soapClient.cpp

+# End Source File

+# Begin Source File

+

+SOURCE=.\stdsoap2.cpp

+# End Source File

+# End Group

+# Begin Group "Header Files"

+

+# PROP Default_Filter "h;hpp;hxx;hm;inl"

+# Begin Source File

+

+SOURCE=.\magic.h

+

+!IF  "$(CFG)" == "Magic2 - Win32 Release"

+

+!ELSEIF  "$(CFG)" == "Magic2 - Win32 Debug"

+

+# Begin Custom Build - gSOAP Web service proxy/skeleton build on $(InputPath)

+InputPath=.\magic.h

+

+"soapStub.h soapH.h soapC.cpp soapClient.cpp soapServer.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+	.\soapcpp2.exe "$(InputPath)"

+

+# End Custom Build

+

+!ENDIF 

+

+# End Source File

+# Begin Source File

+

+SOURCE=.\soapH.h

+# End Source File

+# Begin Source File

+

+SOURCE=.\soapStub.h

+# End Source File

+# Begin Source File

+

+SOURCE=.\stdsoap2.h

+# End Source File

+# End Group

+# Begin Group "Resource Files"

+

+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"

+# End Group

+# End Target

+# End Project

diff --git a/samples/magic_VC/Magic2.dsw b/samples/magic_VC/Magic2.dsw
new file mode 100644
index 0000000..1ee750b
--- /dev/null
+++ b/samples/magic_VC/Magic2.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00

+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!

+

+###############################################################################

+

+Project: "Magic2"=".\Magic2.dsp" - Package Owner=<4>

+

+Package=<5>

+{{{

+}}}

+

+Package=<4>

+{{{

+}}}

+

+###############################################################################

+

+Global:

+

+Package=<5>

+{{{

+}}}

+

+Package=<3>

+{{{

+}}}

+

+###############################################################################

+

diff --git a/samples/magic_VC/Magic2.sln b/samples/magic_VC/Magic2.sln
new file mode 100644
index 0000000..b9686bc
--- /dev/null
+++ b/samples/magic_VC/Magic2.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Magic2", "Magic2.vcproj", "{A861FFB8-ACAF-4E88-8123-B1F638C86D86}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{A861FFB8-ACAF-4E88-8123-B1F638C86D86}.Debug|Win32.ActiveCfg = Debug|Win32
+		{A861FFB8-ACAF-4E88-8123-B1F638C86D86}.Debug|Win32.Build.0 = Debug|Win32
+		{A861FFB8-ACAF-4E88-8123-B1F638C86D86}.Release|Win32.ActiveCfg = Release|Win32
+		{A861FFB8-ACAF-4E88-8123-B1F638C86D86}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/samples/magic_VC/Magic2.vcproj b/samples/magic_VC/Magic2.vcproj
new file mode 100644
index 0000000..7d7da48
--- /dev/null
+++ b/samples/magic_VC/Magic2.vcproj
@@ -0,0 +1,324 @@
+<?xml version="1.0" encoding="Windows-1252"?>

+<VisualStudioProject

+	ProjectType="Visual C++"

+	Version="8.00"

+	Name="Magic2"

+	ProjectGUID="{A861FFB8-ACAF-4E88-8123-B1F638C86D86}"

+	>

+	<Platforms>

+		<Platform

+			Name="Win32"

+		/>

+	</Platforms>

+	<ToolFiles>

+	</ToolFiles>

+	<Configurations>

+		<Configuration

+			Name="Release|Win32"

+			OutputDirectory=".\Release"

+			IntermediateDirectory=".\Release"

+			ConfigurationType="1"

+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"

+			UseOfMFC="0"

+			ATLMinimizesCRunTimeLibraryUsage="false"

+			CharacterSet="2"

+			>

+			<Tool

+				Name="VCPreBuildEventTool"

+			/>

+			<Tool

+				Name="VCCustomBuildTool"

+			/>

+			<Tool

+				Name="VCXMLDataGeneratorTool"

+			/>

+			<Tool

+				Name="VCWebServiceProxyGeneratorTool"

+			/>

+			<Tool

+				Name="VCMIDLTool"

+				TypeLibraryName=".\Release/Magic2.tlb"

+				HeaderFileName=""

+			/>

+			<Tool

+				Name="VCCLCompilerTool"

+				 

+				InlineFunctionExpansion="1"

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;WIN32;NDEBUG;_CONSOLE"

+				StringPooling="true"

+				 

+				 

+				PrecompiledHeaderFile=".\Release/Magic2.pch"

+				AssemblerListingLocation=".\Release/"

+				ObjectFile=".\Release/"

+				ProgramDataBaseFileName=".\Release/"

+				 

+				SuppressStartupBanner="true"

+			/>

+			<Tool

+				Name="VCManagedResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCResourceCompilerTool"

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;NDEBUG"

+				Culture="1033"

+			/>

+			<Tool

+				Name="VCPreLinkEventTool"

+			/>

+			<Tool

+				Name="VCLinkerTool"

+				OutputFile=".\Release/Magic2.exe"

+				 

+				SuppressStartupBanner="true"

+				ProgramDatabaseFile=".\Release/Magic2.pdb"

+				SubSystem="1"

+				TargetMachine="1"

+			/>

+			<Tool

+				Name="VCALinkTool"

+			/>

+			<Tool

+				Name="VCManifestTool"

+			/>

+			<Tool

+				Name="VCXDCMakeTool"

+			/>

+			<Tool

+				Name="VCBscMakeTool"

+				SuppressStartupBanner="true"

+				OutputFile=".\Release/Magic2.bsc"

+			/>

+			<Tool

+				Name="VCFxCopTool"

+			/>

+			<Tool

+				Name="VCAppVerifierTool"

+			/>

+			<Tool

+				Name="VCWebDeploymentTool"

+			/>

+			<Tool

+				Name="VCPostBuildEventTool"

+			/>

+		</Configuration>

+		<Configuration

+			Name="Debug|Win32"

+			OutputDirectory=".\Debug"

+			IntermediateDirectory=".\Debug"

+			ConfigurationType="1"

+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"

+			UseOfMFC="0"

+			ATLMinimizesCRunTimeLibraryUsage="false"

+			CharacterSet="2"

+			>

+			<Tool

+				Name="VCPreBuildEventTool"

+			/>

+			<Tool

+				Name="VCCustomBuildTool"

+			/>

+			<Tool

+				Name="VCXMLDataGeneratorTool"

+			/>

+			<Tool

+				Name="VCWebServiceProxyGeneratorTool"

+			/>

+			<Tool

+				Name="VCMIDLTool"

+				TypeLibraryName=".\Debug/Magic2.tlb"

+				HeaderFileName=""

+			/>

+			<Tool

+				Name="VCCLCompilerTool"

+				 

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;WIN32;_DEBUG;_CONSOLE"

+				 

+				 

+				 

+				PrecompiledHeaderFile=".\Debug/Magic2.pch"

+				AssemblerListingLocation=".\Debug/"

+				ObjectFile=".\Debug/"

+				ProgramDataBaseFileName=".\Debug/"

+				 

+				SuppressStartupBanner="true"

+				 

+			/>

+			<Tool

+				Name="VCManagedResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCResourceCompilerTool"

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;_DEBUG"

+				Culture="1033"

+			/>

+			<Tool

+				Name="VCPreLinkEventTool"

+			/>

+			<Tool

+				Name="VCLinkerTool"

+				AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib"

+				OutputFile=".\Debug/Magic2.exe"

+				 

+				SuppressStartupBanner="true"

+				

+				ProgramDatabaseFile=".\Debug/Magic2.pdb"

+				SubSystem="1"

+				TargetMachine="1"

+			/>

+			<Tool

+				Name="VCALinkTool"

+			/>

+			<Tool

+				Name="VCManifestTool"

+			/>

+			<Tool

+				Name="VCXDCMakeTool"

+			/>

+			<Tool

+				Name="VCBscMakeTool"

+				SuppressStartupBanner="true"

+				OutputFile=".\Debug/Magic2.bsc"

+			/>

+			<Tool

+				Name="VCFxCopTool"

+			/>

+			<Tool

+				Name="VCAppVerifierTool"

+			/>

+			<Tool

+				Name="VCWebDeploymentTool"

+			/>

+			<Tool

+				Name="VCPostBuildEventTool"

+			/>

+		</Configuration>

+	</Configurations>

+	<References>

+	</References>

+	<Files>

+		<Filter

+			Name="Source Files"

+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"

+			>

+			<File

+				RelativePath="magicclient.cpp"

+				>

+				<FileConfiguration

+					Name="Release|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+			</File>

+			<File

+				RelativePath="soapC.cpp"

+				>

+				<FileConfiguration

+					Name="Release|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+			</File>

+			<File

+				RelativePath="soapClient.cpp"

+				>

+				<FileConfiguration

+					Name="Release|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+			</File>

+			<File

+				RelativePath="stdsoap2.cpp"

+				>

+				<FileConfiguration

+					Name="Release|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+			</File>

+		</Filter>

+		<Filter

+			Name="Header Files"

+			Filter="h;hpp;hxx;hm;inl"

+			>

+			<File

+				RelativePath="magic.h"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCustomBuildTool"

+						Description="gSOAP Web service proxy/skeleton build on $(InputPath)"

+						CommandLine=".\soapcpp2.exe &quot;$(InputPath)&quot;&#x0D;&#x0A;"

+						Outputs="soapStub.h soapH.h soapC.cpp soapClient.cpp soapServer.cpp"

+					/>

+				</FileConfiguration>

+			</File>

+			<File

+				RelativePath="soapH.h"

+				>

+			</File>

+			<File

+				RelativePath="soapStub.h"

+				>

+			</File>

+			<File

+				RelativePath="stdsoap2.h"

+				>

+			</File>

+		</Filter>

+		<Filter

+			Name="Resource Files"

+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"

+			>

+		</Filter>

+	</Files>

+	<Globals>

+	</Globals>

+</VisualStudioProject>

diff --git a/samples/magic_VC/magic.h b/samples/magic_VC/magic.h
new file mode 100644
index 0000000..42a44fb
--- /dev/null
+++ b/samples/magic_VC/magic.h
@@ -0,0 +1,36 @@
+//gsoap ns1 service name:	magic
+//gsoap ns1 service style:	rpc
+//gsoap ns1 service encoding:	encoded
+//gsoap ns1 service namespace:	http://websrv.cs.fsu.edu/~engelen/magic.wsdl
+//gsoap ns1 service location:	http://websrv.cs.fsu.edu/~engelen/magicserver.cgi
+//gsoap ns1 service documentation: Demo Magic Squares service
+
+//gsoap ns1 schema namespace: urn:MagicSquare
+
+typedef int xsd__int;
+
+class vector
+{ public:
+  xsd__int *__ptr;
+  int __size;
+  struct soap *soap;
+  vector();
+  vector(int);
+  virtual ~vector();
+  void resize(int);
+  int& operator[](int) const;
+};
+
+class matrix
+{ public:
+  vector *__ptr;
+  int __size;
+  struct soap *soap;
+  matrix();
+  matrix(int, int);
+  virtual ~matrix();
+  void resize(int, int);
+  vector& operator[](int) const;
+};
+
+int ns1__magic(xsd__int rank, matrix *result);
diff --git a/samples/magic_VC/magicclient.cpp b/samples/magic_VC/magicclient.cpp
new file mode 100644
index 0000000..cafbc11
--- /dev/null
+++ b/samples/magic_VC/magicclient.cpp
@@ -0,0 +1,143 @@
+#include "soapH.h"
+#include "magic.nsmap"
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Magic Squares Client
+//
+////////////////////////////////////////////////////////////////////////////////
+
+// To access a stand-alone server on a port: magicserver[] = "IP:PORT";
+// use "http://" to include HTTP header: magicserver[] = "http://IP:PORT";
+// const char magicserver[] = "linprog2.cs.fsu.edu:18081";
+// const char magicserver[] = "http://diablo.cs.fsu.edu:18081";
+// const char magicserver[] = "http://";
+const char magicserver[] = "http://www.cs.fsu.edu/~engelen/magicserver.cgi";
+
+int main(int argc, char **argv)
+{ struct soap soap;
+  int r;
+  soap_init(&soap);
+  matrix *A = soap_new_matrix(&soap, -1);
+  if (argc <= 1)
+  { char *s = getenv("QUERY_STRING");
+    if (!s || (r = atoi(s)) == 0)
+      r = rand()%20;
+  }
+  else
+    r = atoi(argv[1]);
+  printf("Content-type: text/html\r\n\r\n<html><h1>Magic Square of Rank %d</h1><pre>\n", r);
+  if (soap_call_ns1__magic(&soap, magicserver, NULL, r, A))
+  { soap_print_fault(&soap, stderr);
+    soap_print_fault_location(&soap, stderr);
+  }
+  else
+  { for (int i = 0; i < (*A).__size; i++)
+    { for (int j = 0; j < (*A)[i].__size; j++)
+        printf("%4d", (*A)[i][j]);
+      printf("\n");
+    }
+  }
+  printf("</pre></html>\n");
+  soap_destroy(&soap);
+  soap_end(&soap);
+  return 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Class vector Methods
+//
+////////////////////////////////////////////////////////////////////////////////
+
+vector::vector()
+{ __ptr = 0;
+  __size = 0;
+}
+
+vector::vector(int size)
+{ __ptr = (int*)soap_malloc(soap, size*sizeof(int));
+  __size = size;
+}
+
+vector::~vector()
+{ soap_unlink(soap, this); // not required, but just to make sure if someone calls delete on this
+}
+
+void vector::resize(int size)
+{ int *p;
+  if (__size == size)
+    return;
+  p = (int*)soap_malloc(soap, size*sizeof(int));
+  if (__ptr)
+  { for (int i = 0; i < (size <= __size ? size : __size); i++)
+      p[i] = __ptr[i];
+    soap_unlink(soap, __ptr);
+    free(__ptr);
+  }
+  __ptr = p;
+  __size = size;
+}
+
+int& vector::operator[](int idx) const
+{ if (!__ptr || idx < 0 || idx >= __size)
+    fprintf(stderr, "Array index out of bounds\n");
+  return __ptr[idx];
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Class matrix Methods
+//
+////////////////////////////////////////////////////////////////////////////////
+
+matrix::matrix()
+{ __ptr = 0;
+  __size = 0;
+}
+
+matrix::~matrix()
+{ soap_unlink(soap, this); // not required, but just to make sure if someone calls delete on this
+}
+
+matrix::matrix(int rows, int cols)
+{ 
+  __ptr = soap_new_vector(soap, rows);
+  for (int i = 0; i < cols; i++)
+    __ptr[i].resize(cols);
+  __size = rows;
+}
+
+void matrix::resize(int rows, int cols)
+{ int i;
+  vector *p;
+  if (__size != rows)
+  { if (__ptr)
+    { p = soap_new_vector(soap, rows);
+      for (i = 0; i < (rows <= __size ? rows : __size); i++)
+      { if (this[i].__size != cols)
+          (*this)[i].resize(cols);
+	(p+i)->__ptr = __ptr[i].__ptr;
+	(p+i)->__size = cols;
+      }
+      for (; i < rows; i++)
+        __ptr[i].resize(cols);
+    }
+    else
+    { 
+      __ptr = soap_new_vector(soap, rows);
+      for (i = 0; i < rows; i++)
+        __ptr[i].resize(cols);
+      __size = rows;
+    }
+  }
+  else
+    for (i = 0; i < __size; i++)
+      __ptr[i].resize(cols);
+}
+
+vector& matrix::operator[](int idx) const
+{ if (!__ptr || idx < 0 || idx >= __size)
+    fprintf(stderr, "Array index out of bounds\n");
+  return __ptr[idx];
+}
diff --git a/samples/magic_VC/soapcpp2.exe b/samples/magic_VC/soapcpp2.exe
new file mode 100755
index 0000000..fea95ba
--- /dev/null
+++ b/samples/magic_VC/soapcpp2.exe
Binary files differ
diff --git a/samples/magic_VC/stdsoap2.cpp b/samples/magic_VC/stdsoap2.cpp
new file mode 100644
index 0000000..dbed460
--- /dev/null
+++ b/samples/magic_VC/stdsoap2.cpp
@@ -0,0 +1,13448 @@
+/*
+
+stdsoap2.c[pp] 2.7.6e
+
+gSOAP runtime
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+Contributors:
+
+Wind River Systems Inc., for the following additions under gSOAP public license:
+  - vxWorks compatible	(#define VXWORKS)
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+Installation note:
+
+Win32 build needs winsock.dll (Visual C++ "wsock32.lib")
+To do this in Visual C++ 6.0, go to "Project", "settings", select the "Link"
+tab (the project file needs to be selected in the file view) and add
+"wsock32.lib" to the "Object/library modules" entry
+
+On Mac OS X with gcc (GCC) 3.1 20020420 (prerelease) you MUST compile with
+-fstack_check when using -O2 because gcc 3.1 has a bug that smashes the stack
+when locally allocated data exceeds 64K.
+
+*/
+
+#ifdef AS400
+# pragma convert(819)	/* EBCDIC to ASCII */
+#endif
+
+#include "stdsoap2.h"
+
+#ifdef __cplusplus
+SOAP_SOURCE_STAMP("@(#) stdsoap2.cpp ver 2.7.6e 2006-02-18 12:00:00 GMT")
+extern "C" {
+#else
+SOAP_SOURCE_STAMP("@(#) stdsoap2.c ver 2.7.6e 2006-02-18 12:00:00 GMT")
+#endif
+
+/* 8bit character representing unknown/nonrepresentable character data (e.g. not supported by current locale with multibyte support enabled) */
+#ifndef SOAP_UNKNOWN_CHAR
+#define SOAP_UNKNOWN_CHAR (127)
+#endif
+
+/*      EOF=-1 */
+#define SOAP_LT (soap_wchar)(-2) /* XML character '<' */
+#define SOAP_TT (soap_wchar)(-3) /* XML character '</' */
+#define SOAP_GT (soap_wchar)(-4) /* XML character '>' */
+#define SOAP_QT (soap_wchar)(-5) /* XML character '"' */
+#define SOAP_AP (soap_wchar)(-6) /* XML character ''' */
+
+#define soap_blank(c)		((c) >= 0 && (c) <= 32)
+#define soap_notblank(c)	((c) > 32)
+#define soap_hash_ptr(p)	(((unsigned long)(p) >> 3) & (SOAP_PTRHASH - 1))
+
+#ifdef SOAP_DEBUG
+static void soap_init_logs(struct soap*);
+static void soap_close_logfile(struct soap*, int);
+static void soap_set_logfile(struct soap*, int, const char*);
+static void soap_free_mht(struct soap*);
+static void soap_track_unlink(struct soap*, const void*);
+#endif
+
+#ifndef PALM_2
+static int soap_set_error(struct soap*, const char*, const char*, const char*, const char*, int);
+static int soap_copy_fault(struct soap*, const char*, const char*, const char*, const char*);
+static int soap_getattrval(struct soap*, char*, size_t, soap_wchar);
+#endif
+
+#ifndef PALM_1
+static soap_wchar soap_char(struct soap*);
+static soap_wchar soap_get_pi(struct soap*);
+static int soap_isxdigit(int);
+static void *fplugin(struct soap*, const char*);
+#ifndef WITH_NOIDREF
+static void soap_update_ptrs(struct soap*, char*, char*, char*, char*);
+static int soap_has_copies(struct soap*, const char*, const char*);
+static void soap_init_iht(struct soap*);
+static void soap_free_iht(struct soap*);
+static void soap_init_pht(struct soap*);
+static void soap_free_pht(struct soap*);
+#endif
+#endif
+
+#ifndef WITH_LEAN
+static const char *soap_set_validation_fault(struct soap*, const char*, const char*);
+static int soap_isnumeric(struct soap*, const char*);
+static time_t soap_timegm(struct tm*);
+static struct soap_nlist *soap_lookup_ns(struct soap *soap, const char *tag, size_t n);
+static struct soap_nlist *soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized);
+static void soap_pop_ns(struct soap *soap);
+static void soap_utilize_ns(struct soap *soap, const char *tag, size_t n);
+#endif
+
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart *soap_new_multipart(struct soap*, struct soap_multipart**, struct soap_multipart**, char*, size_t);
+static int soap_putdimefield(struct soap*, const char*, size_t);
+static char *soap_getdimefield(struct soap*, size_t);
+static void soap_select_mime_boundary(struct soap*);
+static int soap_valid_mime_boundary(struct soap*);
+static int soap_match_cid(struct soap*, const char*, const char*);
+static void soap_resolve_attachment(struct soap*, struct soap_multipart*);
+#endif
+#endif
+
+#ifdef WITH_GZIP
+static int soap_getgziphdr(struct soap*);
+#endif
+
+#ifdef WITH_OPENSSL
+static int ssl_init_done = 0;
+static int ssl_auth_init(struct soap*);
+static int ssl_verify_callback(int, X509_STORE_CTX*);
+static int ssl_password(char*, int, int, void *);
+static const char *ssl_error(struct soap*, int);
+/* This callback is included for future references. It should not be deleted
+static DH *ssl_tmp_dh(SSL*, int, int);
+*/
+#endif
+
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char *soap_decode(char*, size_t, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar soap_getchunkchar(struct soap*);
+static const char *http_error(struct soap*, int);
+static int http_post(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
+static int http_get(struct soap*);
+static int http_send_header(struct soap*, const char*);
+static int http_post_header(struct soap*, const char*, const char*);
+static int http_response(struct soap*, int, size_t);
+static int http_parse(struct soap*);
+static int http_parse_header(struct soap*, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int fsend(struct soap*, const char*, size_t);
+static size_t frecv(struct soap*, char*, size_t);
+static int tcp_init(struct soap*);
+static const char *tcp_error(struct soap*);
+#ifndef WITH_IPV6
+static int tcp_gethost(struct soap*, const char *addr, struct in_addr *inaddr);
+#endif
+static int tcp_connect(struct soap*, const char *endpoint, const char *host, int port);
+static int tcp_accept(struct soap*, int, struct sockaddr*, int*);
+static int tcp_disconnect(struct soap*);
+static int tcp_closesocket(struct soap*, SOAP_SOCKET);
+static int tcp_shutdownsocket(struct soap*, SOAP_SOCKET, int);
+static const char *soap_strerror(struct soap*);
+#endif
+#endif
+
+#if defined(PALM) && !defined(PALM_2)
+unsigned short errno;
+#endif
+
+#ifndef PALM_1
+static const char soap_env1[42] = "http://schemas.xmlsoap.org/soap/envelope/";
+static const char soap_enc1[42] = "http://schemas.xmlsoap.org/soap/encoding/";
+static const char soap_env2[40] = "http://www.w3.org/2003/05/soap-envelope";
+static const char soap_enc2[40] = "http://www.w3.org/2003/05/soap-encoding";
+static const char soap_rpc[35] = "http://www.w3.org/2003/05/soap-rpc";
+#endif
+
+#ifndef PALM_1
+const struct soap_double_nan soap_double_nan = {0xFFFFFFFF, 0xFFFFFFFF};
+static const char soap_base64o[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+static const char soap_base64i[81] = "\76XXX\77\64\65\66\67\70\71\72\73\74\75XXXXXXX\00\01\02\03\04\05\06\07\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31XXXXXX\32\33\34\35\36\37\40\41\42\43\44\45\46\47\50\51\52\53\54\55\56\57\60\61\62\63";
+#endif
+
+#ifndef WITH_LEAN
+static const char soap_indent[11] = "\n\t\t\t\t\t\t\t\t\t";
+/* Alternative indentation form for SOAP_XML_INDENT:
+static const char soap_indent[21] = "\n                   ";
+*/
+#endif
+
+static const char soap_padding[4] = "\0\0\0";
+#define SOAP_STR_PADDING (soap_padding)
+#define SOAP_STR_EOS (soap_padding)
+#define SOAP_NON_NULL (soap_padding)
+
+#ifndef WITH_LEAN
+static const struct soap_code_map html_entity_codes[] = /* entities for XHTML parsing */
+{ { 160, "nbsp" },
+  { 161, "iexcl" },
+  { 162, "cent" },
+  { 163, "pound" },
+  { 164, "curren" },
+  { 165, "yen" },
+  { 166, "brvbar" },
+  { 167, "sect" },
+  { 168, "uml" },
+  { 169, "copy" },
+  { 170, "ordf" },
+  { 171, "laquo" },
+  { 172, "not" },
+  { 173, "shy" },
+  { 174, "reg" },
+  { 175, "macr" },
+  { 176, "deg" },
+  { 177, "plusmn" },
+  { 178, "sup2" },
+  { 179, "sup3" },
+  { 180, "acute" },
+  { 181, "micro" },
+  { 182, "para" },
+  { 183, "middot" },
+  { 184, "cedil" },
+  { 185, "sup1" },
+  { 186, "ordm" },
+  { 187, "raquo" },
+  { 188, "frac14" },
+  { 189, "frac12" },
+  { 190, "frac34" },
+  { 191, "iquest" },
+  { 192, "Agrave" },
+  { 193, "Aacute" },
+  { 194, "Acirc" },
+  { 195, "Atilde" },
+  { 196, "Auml" },
+  { 197, "Aring" },
+  { 198, "AElig" },
+  { 199, "Ccedil" },
+  { 200, "Egrave" },
+  { 201, "Eacute" },
+  { 202, "Ecirc" },
+  { 203, "Euml" },
+  { 204, "Igrave" },
+  { 205, "Iacute" },
+  { 206, "Icirc" },
+  { 207, "Iuml" },
+  { 208, "ETH" },
+  { 209, "Ntilde" },
+  { 210, "Ograve" },
+  { 211, "Oacute" },
+  { 212, "Ocirc" },
+  { 213, "Otilde" },
+  { 214, "Ouml" },
+  { 215, "times" },
+  { 216, "Oslash" },
+  { 217, "Ugrave" },
+  { 218, "Uacute" },
+  { 219, "Ucirc" },
+  { 220, "Uuml" },
+  { 221, "Yacute" },
+  { 222, "THORN" },
+  { 223, "szlig" },
+  { 224, "agrave" },
+  { 225, "aacute" },
+  { 226, "acirc" },
+  { 227, "atilde" },
+  { 228, "auml" },
+  { 229, "aring" },
+  { 230, "aelig" },
+  { 231, "ccedil" },
+  { 232, "egrave" },
+  { 233, "eacute" },
+  { 234, "ecirc" },
+  { 235, "euml" },
+  { 236, "igrave" },
+  { 237, "iacute" },
+  { 238, "icirc" },
+  { 239, "iuml" },
+  { 240, "eth" },
+  { 241, "ntilde" },
+  { 242, "ograve" },
+  { 243, "oacute" },
+  { 244, "ocirc" },
+  { 245, "otilde" },
+  { 246, "ouml" },
+  { 247, "divide" },
+  { 248, "oslash" },
+  { 249, "ugrave" },
+  { 250, "uacute" },
+  { 251, "ucirc" },
+  { 252, "uuml" },
+  { 253, "yacute" },
+  { 254, "thorn" },
+  { 255, "yuml" },
+  {   0, NULL }
+};
+#endif
+
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+static const struct soap_code_map h_error_codes[] =
+{
+#ifdef HOST_NOT_FOUND   
+  { HOST_NOT_FOUND, "Host not found" },
+#endif
+#ifdef TRY_AGAIN
+  { TRY_AGAIN, "Try Again" },
+#endif
+#ifdef NO_RECOVERY  
+  { NO_RECOVERY, "No Recovery" },
+#endif
+#ifdef NO_DATA
+  { NO_DATA, "No Data" },
+#endif
+#ifdef NO_ADDRESS
+  { NO_ADDRESS, "No Address" },
+#endif
+  { 0, NULL }
+};
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+static const struct soap_code_map h_http_error_codes[] =
+{ { 201, "Created" },
+  { 202, "Accepted" },
+  { 203, "Non-Authoritative Information" },
+  { 204, "No Content" },
+  { 205, "Reset Content" },
+  { 206, "Partial Content" },
+  { 300, "Multiple Choices" },
+  { 301, "Moved Permanently" },
+  { 302, "Found" },
+  { 303, "See Other" },
+  { 304, "Not Modified" },
+  { 305, "Use Proxy" },
+  { 307, "Temporary Redirect" },
+  { 400, "Bad Request" },
+  { 401, "Unauthorized" },
+  { 402, "Payment Required" },
+  { 403, "Forbidden" },
+  { 404, "Not Found" },
+  { 405, "Method Not Allowed" },
+  { 406, "Not Acceptable" },
+  { 407, "Proxy Authentication Required" },
+  { 408, "Request Time-out" },
+  { 409, "Conflict" },
+  { 410, "Gone" },
+  { 411, "Length Required" },
+  { 412, "Precondition Failed" },
+  { 413, "Request Entity Too Large" },
+  { 414, "Request-URI Too Large" },
+  { 415, "Unsupported Media Type" },
+  { 416, "Requested range not satisfiable" },
+  { 417, "Expectation Failed" },
+  { 500, "Internal Server Error" },
+  { 501, "Not Implemented" },
+  { 502, "Bad Gateway" },
+  { 503, "Service Unavailable" },
+  { 504, "Gateway Time-out" },
+  { 505, "HTTP Version not supported" },
+  {   0, NULL }
+};
+#endif
+#endif
+
+#ifdef WITH_OPENSSL
+static const struct soap_code_map h_ssl_error_codes[] =
+{
+#define _SSL_ERROR(e) { e, #e }
+  _SSL_ERROR(SSL_ERROR_SSL),
+  _SSL_ERROR(SSL_ERROR_ZERO_RETURN),
+  _SSL_ERROR(SSL_ERROR_WANT_READ),
+  _SSL_ERROR(SSL_ERROR_WANT_WRITE),
+  _SSL_ERROR(SSL_ERROR_WANT_CONNECT),
+  _SSL_ERROR(SSL_ERROR_WANT_X509_LOOKUP),
+  _SSL_ERROR(SSL_ERROR_SYSCALL),
+  { 0, NULL }
+};
+#endif
+
+#ifndef WITH_LEANER
+static const struct soap_code_map mime_codes[] =
+{ { SOAP_MIME_7BIT,		"7bit" },
+  { SOAP_MIME_8BIT,		"8bit" },
+  { SOAP_MIME_BINARY,		"binary" },
+  { SOAP_MIME_QUOTED_PRINTABLE, "quoted-printable" },
+  { SOAP_MIME_BASE64,		"base64" },
+  { SOAP_MIME_IETF_TOKEN,	"ietf-token" },
+  { SOAP_MIME_X_TOKEN,		"x-token" },
+  { 0,				NULL }
+};
+#endif
+
+#ifdef WIN32
+static int tcp_done = 0;
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+fsend(struct soap *soap, const char *s, size_t n)
+{ register int nwritten;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  if (soap->os)
+  { soap->os->write(s, n);
+    if (soap->os->good())
+      return SOAP_OK;
+    return SOAP_EOF;
+  }
+#endif
+  while (n)
+  { if (soap_valid_socket(soap->socket))
+    { 
+#ifndef WITH_LEAN
+      if (soap->send_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->send_timeout > 0)
+        { timeout.tv_sec = soap->send_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->send_timeout/1000000;
+          timeout.tv_usec = -soap->send_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { register int r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            return SOAP_EOF;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+          { soap->errnum = soap_socket_errno;
+            return SOAP_EOF;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+        nwritten = SSL_write(soap->ssl, s, n);
+      else if (soap->bio)
+        nwritten = BIO_write(soap->bio, s, n);
+      else
+#endif
+#ifdef WITH_UDP
+      if ((soap->omode & SOAP_IO_UDP))
+      { if (soap->peerlen)
+	  nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+        else
+	  nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	/* retry and back-off algorithm */
+	/* TODO: this is not very clear from specs so verify and limit conditions under which we should loop (e.g. ENOBUFS) */
+	if (nwritten < 0)
+        { struct timeval timeout;
+          fd_set fd;
+	  int udp_repeat;
+	  int udp_delay;
+          if ((soap->connect_flags & SO_BROADCAST))
+	    udp_repeat = 3; /* SOAP-over-UDP MULTICAST_UDP_REPEAT - 1 */
+          else
+	    udp_repeat = 1; /* SOAP-over-UDP UNICAST_UDP_REPEAT - 1 */
+	  udp_delay = (soap_random % 201) + 50; /* UDP_MIN_DELAY .. UDP_MAX_DELAY */
+	  do
+          { timeout.tv_sec = 0;
+            timeout.tv_usec = 1000 * udp_delay; /* ms */
+            FD_ZERO(&fd);
+            FD_SET((SOAP_SOCKET)soap->socket, &fd);
+            select((SOAP_SOCKET)(soap->socket + 1), NULL, NULL, &fd, &timeout);
+	    if (soap->peerlen)
+	      nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+            else
+	      nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	    udp_delay <<= 1;
+	    if (udp_delay > 500) /* UDP_UPPER_DELAY */
+	      udp_delay = 500;
+	  }
+	  while (nwritten < 0 && --udp_repeat > 0);
+	}
+      }
+      else
+#endif
+#if !defined(PALM) && !defined(AS400)
+        nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+#else
+        nwritten = send((SOAP_SOCKET)soap->socket, (void*)s, n, soap->socket_flags);
+#endif
+      if (nwritten <= 0)
+      {
+#ifdef WITH_OPENSSL
+	int err;
+        if (soap->ssl && (err = SSL_get_error(soap->ssl, nwritten)) != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return SOAP_EOF;
+#endif
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EWOULDBLOCK && soap_socket_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_socket_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    else
+    {
+#ifdef WITH_FASTCGI
+      nwritten = fwrite((void*)s, 1, n, stdout);
+      fflush(stdout);
+#else
+#ifdef UNDER_CE
+      nwritten = fwrite(s, 1, n, soap->sendfd);
+#else
+#ifdef VXWORKS
+#ifdef WMW_RPM_IO
+      if (soap->rpmreqid)
+        nwritten = (httpBlockPut(soap->rpmreqid, s, n) == 0) ? n : -1; 
+      else
+#endif
+        nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w"));
+#else
+      nwritten = write((SOAP_SOCKET)soap->sendfd, s, n);
+#endif
+#endif
+#endif
+      if (nwritten <= 0)
+      { if (soap_errno != SOAP_EINTR && soap_errno != SOAP_EWOULDBLOCK && soap_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    n -= nwritten;
+    s += nwritten;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_raw(struct soap *soap, const char *s, size_t n)
+{ if (!n)
+    return SOAP_OK;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { soap->count += n;
+#ifndef WITH_LEANER
+    if (soap->fpreparesend && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+  if (soap->mode & SOAP_IO)
+  { register size_t i = SOAP_BUFLEN - soap->bufidx;
+    while (n >= i)
+    { memcpy(soap->buf + soap->bufidx, s, i);
+      soap->bufidx = SOAP_BUFLEN;
+      if (soap_flush(soap))
+        return soap->error;
+      s += i;
+      n -= i;
+      i = SOAP_BUFLEN;
+    }
+    memcpy(soap->buf + soap->bufidx, s, n);
+    soap->bufidx += n;
+    return SOAP_OK;
+  }
+  return soap_flush_raw(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush(struct soap *soap)
+{ register int n = soap->bufidx;
+  if (n)
+  { soap->bufidx = 0;
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { soap->d_stream.next_in = (Byte*)soap->buf;
+      soap->d_stream.avail_in = (unsigned int)n;
+#ifdef WITH_GZIP
+      soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)n);
+#endif
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating %u bytes\n", soap->d_stream.avail_in));
+        if (deflate(&soap->d_stream, Z_NO_FLUSH) != Z_OK)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+          return soap->error = SOAP_ZLIB_ERROR;
+        }
+        if (!soap->d_stream.avail_out)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN))
+            return soap->error;
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (soap->d_stream.avail_in);
+    }
+    else
+#endif
+      return soap_flush_raw(soap, soap->buf, n);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush_raw(struct soap *soap, const char *s, size_t n)
+{ if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+  { register char *t;
+    if (!(t = (char*)soap_push_block(soap, n)))
+      return soap->error = SOAP_EOM;
+    memcpy(t, s, n);
+#ifndef WITH_LEANER
+    if (soap->fpreparesend)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+  { char t[16];
+    sprintf(t, "\r\n%lX\r\n" + (soap->chunksize ? 0 : 2), (unsigned long)n);
+    DBGMSG(SENT, t, strlen(t));
+    if ((soap->error = soap->fsend(soap, t, strlen(t))))
+      return soap->error;
+    soap->chunksize += n;
+  }
+  DBGMSG(SENT, s, n);
+#endif
+  return soap->error = soap->fsend(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send(struct soap *soap, const char *s)
+{ if (s)
+    return soap_send_raw(soap, s, strlen(s));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send2(struct soap *soap, const char *s1, const char *s2)
+{ if (soap_send(soap, s1))
+    return soap->error;
+  return soap_send(soap, s2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send3(struct soap *soap, const char *s1, const char *s2, const char *s3)
+{ if (soap_send(soap, s1)
+   || soap_send(soap, s2))
+    return soap->error;
+  return soap_send(soap, s3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static size_t
+frecv(struct soap *soap, char *s, size_t n)
+{ register int r;
+  soap->errnum = 0;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  if (soap->is)
+  { if (soap->is->good())
+      return soap->is->read(s, n).gcount();
+    return 0;
+  }
+#endif
+  if (soap_valid_socket(soap->socket))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->recv_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->recv_timeout > 0)
+        { timeout.tv_sec = soap->recv_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->recv_timeout/1000000;
+          timeout.tv_usec = -soap->recv_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+	  { soap->errnum = 0;
+            return 0;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+	  { soap->errnum = soap_socket_errno;
+            return 0;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+      { int err;
+	r = SSL_read(soap->ssl, s, n);
+        if (r > 0)
+          return (size_t)r;
+	err = SSL_get_error(soap->ssl, r);
+	if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return 0;
+      }
+      else if (soap->bio)
+      { r = BIO_read(soap->bio, s, n);
+        if (r > 0)
+          return (size_t)r;
+        return 0;
+      }
+      else
+#endif
+      { 
+#ifdef WITH_UDP
+        if ((soap->omode & SOAP_IO_UDP))
+        { SOAP_SOCKLEN_T k = (SOAP_SOCKLEN_T)sizeof(soap->peer);
+	  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+          r = recvfrom((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, &k);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+	  soap->peerlen = (size_t)k;
+#ifndef WITH_IPV6
+          soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+          soap->port = (int)ntohs(soap->peer.sin_port);
+#endif
+        }
+	else
+#endif
+          r = recv((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+        if (r >= 0)
+          return (size_t)r;
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN && soap_socket_errno != SOAP_EWOULDBLOCK)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#ifndef WITH_LEAN
+      { struct timeval timeout;
+        fd_set fd;
+        timeout.tv_sec = 0;
+        timeout.tv_usec = 10000;
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+#ifdef WITH_OPENSSL
+        if (soap->ssl && SSL_get_error(soap->ssl, r) == SSL_ERROR_WANT_WRITE)
+          r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+        else
+          r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#else
+        r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#endif
+        if (r < 0 && soap_socket_errno != SOAP_EINTR)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#endif
+    }
+  }
+#ifdef WITH_FASTCGI
+  return fread(s, 1, n, stdin);
+#else
+#ifdef UNDER_CE
+  return fread(s, 1, n, soap->recvfd);
+#else
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    r = httpBlockRead(soap->rpmreqid, s, n);
+  else
+#endif
+  r = read((SOAP_SOCKET)soap->recvfd, s, n);
+  if (r >= 0)
+    return (size_t)r;
+  soap->errnum = soap_errno;
+  return 0;
+#endif
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar
+soap_getchunkchar(struct soap *soap)
+{ if (soap->bufidx < soap->buflen)
+    return soap->buf[soap->bufidx++];
+  soap->bufidx = 0;
+  soap->buflen = soap->chunkbuflen = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)soap->buflen, soap->socket));
+  DBGMSG(RECV, soap->buf, soap->buflen);
+  if (soap->buflen)
+    return soap->buf[soap->bufidx++];
+  return EOF;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+soap_isxdigit(int c)
+{ return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f');
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_raw(struct soap *soap)
+{ register size_t ret;
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { if (soap->d_stream.next_out == Z_NULL)
+      return EOF;
+    if (soap->d_stream.avail_in || !soap->d_stream.avail_out)
+    { register int r;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflating\n"));
+      soap->d_stream.next_out = (Byte*)soap->buf;
+      soap->d_stream.avail_out = SOAP_BUFLEN;
+      r = inflate(&soap->d_stream, Z_NO_FLUSH);
+      if (r == Z_OK || r == Z_STREAM_END)
+      { soap->bufidx = 0;
+        soap->buflen = SOAP_BUFLEN - soap->d_stream.avail_out;
+        if (soap->zlib_in == SOAP_ZLIB_GZIP)
+          soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+        if (r == Z_STREAM_END)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+          soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+          soap->d_stream.next_out = Z_NULL;
+        }
+        if (soap->buflen)
+        { soap->count += soap->buflen;
+          return SOAP_OK;
+        }
+      }
+      else if (r != Z_BUF_ERROR)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate error: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        soap->d_stream.next_out = Z_NULL;
+	soap->error = SOAP_ZLIB_ERROR;
+        return EOF;
+      }
+    }
+zlib_again:
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK && !soap->chunksize)
+    { memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+      soap->buflen = soap->z_buflen;
+    }
+  }
+#endif
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) /* read HTTP chunked transfer */
+  { 
+chunk_again:
+    if (soap->chunksize)
+    { soap->buflen = ret = soap->frecv(soap, soap->buf, soap->chunksize > SOAP_BUFLEN ? SOAP_BUFLEN : soap->chunksize);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk: read %u bytes\n", (unsigned int)ret));
+      DBGMSG(RECV, soap->buf, ret);
+      soap->bufidx = 0;
+      soap->chunksize -= ret;
+    }
+    else
+    { register soap_wchar c;
+      char *t, tmp[8];
+      t = tmp;
+      if (!soap->chunkbuflen)
+      { soap->chunkbuflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes (chunked) from socket %d\n", (unsigned int)ret, soap->socket));
+        DBGMSG(RECV, soap->buf, ret);
+        soap->bufidx = 0;
+        if (!ret)
+          return soap->ahead = EOF;
+      }
+      else
+        soap->bufidx = soap->buflen;
+      soap->buflen = soap->chunkbuflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk size (idx=%u len=%u)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen));
+      while (!soap_isxdigit((int)(c = soap_getchunkchar(soap))))
+        if ((int)c == EOF)
+	  return soap->ahead = EOF;
+      do
+        *t++ = (char)c;
+      while (soap_isxdigit((int)(c = soap_getchunkchar(soap))) && t - tmp < 7);
+      while ((int)c != EOF && c != '\n')
+        c = soap_getchunkchar(soap);
+      if ((int)c == EOF)
+        return soap->ahead = EOF;
+      *t = '\0';
+      soap->chunksize = soap_strtoul(tmp, &t, 16);
+      if (!soap->chunksize)
+      { soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of chunked message\n"));
+	while ((int)c != EOF && c != '\n')
+          c = soap_getchunkchar(soap);
+        return soap->ahead = EOF;
+      }
+      soap->buflen = soap->bufidx + soap->chunksize;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving buf len to idx=%u len=%u (%s)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen, tmp));
+      if (soap->buflen > soap->chunkbuflen)
+      { soap->buflen = soap->chunkbuflen;
+        soap->chunksize -= soap->buflen - soap->bufidx;
+        soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Passed end of buffer for chunked HTTP (%u bytes left)\n", (unsigned int)(soap->buflen - soap->bufidx)));
+      }
+      else if (soap->chunkbuflen)
+        soap->chunksize = 0;
+      ret = soap->buflen - soap->bufidx;
+      if (!ret)
+        goto chunk_again;
+    }
+  }
+  else
+#endif
+  { soap->bufidx = 0;
+    soap->buflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)ret, soap->socket));
+    DBGMSG(RECV, soap->buf, ret);
+  }
+#ifndef WITH_LEANER
+  if (soap->fpreparerecv && (soap->error = soap->fpreparerecv(soap, soap->buf, ret)))
+    return soap->error;
+#endif
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { register int r;
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = (unsigned int)ret;
+    soap->d_stream.next_out = (Byte*)soap->buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    r = inflate(&soap->d_stream, Z_NO_FLUSH);
+    if (r == Z_OK || r == Z_STREAM_END)
+    { soap->bufidx = 0;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = ret = SOAP_BUFLEN - soap->d_stream.avail_out;
+      if (soap->zlib_in == SOAP_ZLIB_GZIP)
+        soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %u bytes\n", (unsigned int)ret));
+      if (!ret)
+        goto zlib_again;
+      if (r == Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+        soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+        soap->d_stream.next_out = Z_NULL;
+      }
+    }
+    else
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to inflate: (%d) %s\n", r, soap->d_stream.msg?soap->d_stream.msg:""));
+      soap->d_stream.next_out = Z_NULL;
+      soap->error = SOAP_ZLIB_ERROR;
+      return EOF;
+    }
+  }
+#endif
+  soap->count += ret;
+  return !ret;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap->dime.buflen)
+    { char *s;
+      int i;
+      unsigned char tmp[12];
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME hdr for chunked DIME is in buffer\n"));
+      soap->count += soap->dime.buflen - soap->buflen;
+      soap->buflen = soap->dime.buflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Skip padding (%ld bytes)\n", -(long)soap->dime.size&3));
+      for (i = -(long)soap->dime.size&3; i > 0; i--)
+      { soap->bufidx++;
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME hdr for next chunk\n"));
+      s = (char*)tmp;
+      for (i = 12; i > 0; i--)
+      { *s++ = soap->buf[soap->bufidx++];
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      soap->dime.flags = tmp[0] & 0x7;
+      soap->dime.size = ((size_t)tmp[8] << 24) | ((size_t)tmp[9] << 16) | ((size_t)tmp[10] << 8) | ((size_t)tmp[11]);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME chunk (%u bytes)\n", (unsigned int)soap->dime.size));
+      if (soap->dime.flags & SOAP_DIME_CF)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "More chunking\n"));
+        soap->dime.chunksize = soap->dime.size;
+        if (soap->buflen - soap->bufidx >= soap->dime.size)
+        { soap->dime.buflen = soap->buflen;
+          soap->buflen = soap->bufidx + soap->dime.chunksize;
+        }
+        else
+          soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      }
+      else
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Last chunk\n"));
+        soap->dime.buflen = 0;
+        soap->dime.chunksize = 0;
+      }
+      soap->count = soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%u bytes remaining\n", (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+    if (soap->dime.chunksize)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get next DIME hdr for chunked DIME (%u bytes chunk)\n", (unsigned int)soap->dime.chunksize));
+      if (soap_recv_raw(soap))
+        return EOF;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->count -= soap->buflen - soap->bufidx - soap->dime.chunksize;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%lu bytes remaining, count=%u\n", (unsigned long)(soap->buflen-soap->bufidx), (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+  }
+#endif
+  return soap_recv_raw(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getchar(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+    return c;
+  }
+  return soap_get1(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const struct soap_code_map*
+SOAP_FMAC2
+soap_code(const struct soap_code_map *map, const char *str)
+{ if (str)
+  { while (map->string)
+    { if (!strcmp(str, map->string)) /* case sensitive */
+        return map;
+      map++;
+    }
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_int_code(const struct soap_code_map *map, const char *str, long other)
+{ while (map->string)
+  { if (!soap_tag_cmp(str, map->string)) /* case insensitive */
+      return map->code;
+    map++;
+  }
+  return other;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_str_code(const struct soap_code_map *map, long code)
+{ while (map->code != code && map->string)
+    map++;
+  return map->string;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_char(struct soap *soap)
+{ char tmp[8];
+  register int i;
+  register soap_wchar c;
+  register char *s = tmp;
+  for (i = 0; i < 7; i++)
+  { c = soap_get1(soap);
+    if (c == ';' || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+  }
+  *s = '\0';
+  if (*tmp == '#')
+  { if (tmp[1] == 'x' || tmp[1] == 'X')
+      return soap_strtol(tmp + 2, NULL, 16);
+    return atol(tmp + 1);
+  }
+  if (!strcmp(tmp, "lt"))
+    return '<';
+  if (!strcmp(tmp, "gt"))
+    return '>';
+  if (!strcmp(tmp, "amp"))
+    return '&';
+  if (!strcmp(tmp, "quot"))
+    return '"';
+  if (!strcmp(tmp, "apos"))
+    return '\'';
+#ifndef WITH_LEAN
+  return (soap_wchar)soap_int_code(html_entity_codes, tmp, SOAP_UNKNOWN_CHAR);
+#else
+  return SOAP_UNKNOWN_CHAR; /* use this to represent unknown code */
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get0(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx];
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get1(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx++];
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_get(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+  }
+  else
+    c = soap_get1(soap);
+  for (;;)
+  { if (soap->cdata)
+    { if (c == ']')
+      { c = soap_get1(soap);
+        if (c == ']')
+        { soap->cdata = 0;
+          soap_get1(soap); /* skip > */
+          c = soap_get1(soap);
+        }
+	else
+        { soap_revget1(soap);
+          return ']';
+        }
+      }
+      else
+        return c;
+    }
+    switch (c)
+    { case '<':
+        do c = soap_get1(soap);
+        while (soap_blank(c));
+        if (c == '!' || c == '?' || c == '%')
+        { register int k = 1;
+	  if (c == '!')
+          { c = soap_get1(soap);
+            if (c == '[')
+            { do c = soap_get1(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                break;
+              soap->cdata = 1;
+              c = soap_get1(soap);
+	      continue;
+            }
+            if (c == '-' && (c = soap_get1(soap)) == '-')
+            { do
+              { c = soap_get1(soap);
+                if (c == '-' && (c = soap_get1(soap)) == '-')
+                  break;
+              } while ((int)c != EOF);
+            }
+          }
+	  else if (c == '?')
+            c = soap_get_pi(soap);
+          while ((int)c != EOF)
+          { if (c == '<')
+	      k++;
+	    else if (c == '>')
+	    { if (--k <= 0)
+	        break;
+	    }
+	    c = soap_get1(soap);
+	  }
+	  if ((int)c == EOF)
+	    break;
+          c = soap_get1(soap);
+          continue;
+        }
+        if (c == '/')
+          return SOAP_TT;
+        soap_revget1(soap);
+        return SOAP_LT;
+      case '>':
+        return SOAP_GT;
+      case '"':
+        return SOAP_QT;
+      case '\'':
+        return SOAP_AP;
+      case '&':
+        return soap_char(soap) | 0x80000000;
+    }
+    break;
+  }
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_get_pi(struct soap *soap)
+{ char buf[64];
+  register char *s = buf;
+  register int i = sizeof(buf);
+  register soap_wchar c = soap_getchar(soap);
+  /* This is a quick way to parse XML PI and we could use a callback instead to
+   * enable applications to intercept processing instructions */
+  while ((int)c != EOF && c != '?')
+  { if (--i > 0)
+    { if (soap_blank(c))
+        c = ' ';
+      *s++ = (char)c;
+    }
+    c = soap_getchar(soap);
+  }
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML PI <?%s?>\n", buf));
+  if (!strncmp(buf, "xml ", 4))
+  { s = strstr(buf, " encoding=");
+    if (s && s[10])
+    { if (!soap_tag_cmp(s + 11, "iso-8859-1*")
+       || !soap_tag_cmp(s + 11, "latin1*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to latin1 encoding\n"));
+        soap->mode |= SOAP_ENC_LATIN;
+      }
+      else if (!soap_tag_cmp(s + 11, "utf-8*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to utf-8 encoding\n"));
+        soap->mode &= ~SOAP_ENC_LATIN;
+      }
+    }
+  }
+  if ((int)c != EOF)
+    c = soap_getchar(soap);
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_move(struct soap *soap, long n)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving %ld bytes forward\n", (long)n));
+  for (; n > 0; n--)
+    if ((int)soap_getchar(soap) == EOF)
+      return SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_tell(struct soap *soap)
+{ return soap->count - soap->buflen + soap->bufidx - (soap->ahead != 0);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pututf8(struct soap *soap, register unsigned long c)
+{ char tmp[16];
+  if (c > 0 && c < 0x80)
+  { *tmp = (char)c;
+    return soap_send_raw(soap, tmp, 1);
+  }
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { register char *t = tmp;
+    if (c < 0x0800)
+      *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+    else
+    { if (c < 0x010000)
+        *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+      else
+      { if (c < 0x200000)
+          *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+        else
+        { if (c < 0x04000000)
+            *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+          else
+          { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+            *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+        }     
+        *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+      }
+      *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+    }
+    *t++ = (char)(0x80 | (c & 0x3F));
+    *t = '\0';
+  }
+  else
+#endif
+    sprintf(tmp, "&#%lu;", c);
+  return soap_send(soap, tmp);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getutf8(struct soap *soap)
+{ register soap_wchar c, c1, c2, c3, c4;
+  c = soap->ahead;
+  if (c > 0xFF)
+  { soap->ahead = 0;
+    return c;
+  }
+again:
+  c = soap_get(soap);
+  if (c < 0x80 || (soap->mode & SOAP_ENC_LATIN))
+    return c;
+  c1 = soap_get1(soap);
+  if (c1 < 0x80)
+  { soap_revget1(soap); /* doesn't look like this is UTF8 */
+    return c;
+  }
+  c1 &= 0x3F;
+  if (c < 0xE0)
+    return ((soap_wchar)(c & 0x1F) << 6) | c1;
+  c2 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c == 0xEF && c1 == 0x3B && c2 == 0x3F)	/* ignore UTF-8 BOM */
+    goto again;
+  if (c < 0xF0)
+    return ((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2;
+  c3 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xF8)
+    return ((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3;
+  c4 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xFC)
+    return ((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4;
+  return ((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(soap_get1(soap) & 0x3F);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthex(struct soap *soap, const unsigned char *s, int n)
+{ char d[2];
+  register int i;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2hex(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (i = 0; i < n; i++)
+  { register int m = *s++;
+    d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0'));
+    m &= 0x0F;
+    d[1] = (char)(m + (m > 9 ? '7' : '0'));
+    if (soap_send_raw(soap, d, 2))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_gethex(struct soap *soap, int *n)
+{
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_hex2s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register char *s;
+    register int i, k;
+    if (soap_append_lab(soap, NULL, 0))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = soap->lablen;
+    for (i = 0; i < k; i++)
+    { register char d1, d2;
+      register soap_wchar c;
+      c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = (int)(soap->lablen - k + i);
+        p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	if (p)
+	  memcpy(p, soap->labbuf, soap->lablen - k + i);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, SOAP_BLKLEN);
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register char d1, d2;
+      register soap_wchar c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap_end_block(soap);
+	  soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = soap_size_block(soap, i);
+        p = (unsigned char*)soap_save_block(soap, NULL, 0);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putbase64(struct soap *soap, const unsigned char *s, int n)
+{ register int i;
+  register unsigned long m;
+  char d[4];
+  if (!s)
+    return SOAP_OK;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2base64(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      d[i] = '=';
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_getbase64(struct soap *soap, int *n, int malloc_flag)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_base642s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register int i, k;
+    register char *s;
+    if (soap_append_lab(soap, NULL, 2))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = 3 * (soap->lablen / 3);
+    if (!s)
+      return NULL;
+    for (i = 0; i < k - 2; i += 3)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+            *n = (int)(soap->lablen - k + i);
+          p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	  if (p)
+	    memcpy(p, soap->labbuf, soap->lablen - k + i);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, 3 * SOAP_BLKLEN); /* must be multiple of 3 */
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          i *= 3;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n = (int)soap_size_block(soap, i);
+          p = (unsigned char*)soap_save_block(soap, NULL, 0);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_xop_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ /* Check MTOM xop:Include element (within hex/base64Binary) */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  int body = soap->body; /* should save type too? */
+  if (!soap_peek_element(soap))
+  { if (!soap_element_begin_in(soap, "xop:Include", 0) && *soap->href)
+    { if (soap_dime_forward(soap, ptr, size, id, type, options))
+        return soap->error;
+    }
+    if (soap->body && soap_element_end_in(soap, NULL))
+      return soap->error;
+  }
+  soap->body = body;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_dime_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ struct soap_xlist *xp = (struct soap_xlist*)SOAP_MALLOC(soap, sizeof(struct soap_xlist));
+  *ptr = NULL;
+  *size = 0;
+  *id = soap_strdup(soap, soap->href);
+  *type = NULL;
+  *options = NULL;
+  if (!xp)
+    return soap->error = SOAP_EOM;
+  xp->next = soap->xlist;
+  xp->ptr = ptr;
+  xp->size = size;
+  xp->id = *id;
+  xp->type = type;
+  xp->options = options;
+  soap->xlist = xp;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_strdup(struct soap *soap, const char *s)
+{ char *t = NULL;
+  if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1)))
+    strcpy(t, s);
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_new_block(struct soap *soap)
+{ struct soap_blist *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New block sequence (prev=%p)\n", soap->blist));
+  if (!(p = (struct soap_blist*)SOAP_MALLOC(soap, sizeof(struct soap_blist))))
+    return SOAP_EOM;   
+  p->next = soap->blist; 
+  p->ptr = NULL;
+  p->size = 0;
+  soap->blist = p;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_push_block(struct soap *soap, size_t n)
+{ char *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block of %u bytes (%u bytes total)\n", (unsigned int)n, (unsigned int)soap->blist->size + (unsigned int)n));
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(char*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  *(char**)p = soap->blist->ptr;
+  *(size_t*)(p + sizeof(char*)) = n;
+  soap->blist->ptr = p;
+  soap->blist->size += n;
+  return p + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_block(struct soap *soap)
+{ char *p;
+  if (!soap->blist->ptr)
+    return;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block\n"));
+  p = soap->blist->ptr;
+  soap->blist->size -= *(size_t*)(p + sizeof(char*));
+  soap->blist->ptr = *(char**)p;
+  SOAP_FREE(soap, p);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_update_ptrs(struct soap *soap, char *start, char *end, char *p1, char *p2)
+{ int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+#ifndef WITH_LEANER
+  register struct soap_xlist *xp;
+#endif
+  register void *p, **q;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr && (char*)ip->ptr >= start && (char*)ip->ptr < end)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", ip->id, ip->ptr, (char*)ip->ptr + (p1-p2)));
+        ip->ptr = (char*)ip->ptr + (p1-p2);
+      }
+      for (q = &ip->link; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Link update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (q = &ip->copy; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy chain update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (fp = ip->flist; fp; fp = fp->next)
+      { if ((char*)fp->ptr >= start && (char*)fp->ptr < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy list update id='%s' %p\n", ip->id, fp));
+          fp->ptr = (char*)fp->ptr + (p1-p2);
+        }
+      }
+    }
+  }
+#ifndef WITH_LEANER
+  for (xp = soap->xlist; xp; xp = xp->next)
+  { if (xp->ptr && (char*)xp->ptr >= start && (char*)xp->ptr < end)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", xp->id?xp->id:"", xp->ptr, (char*)xp->ptr + (p1-p2)));
+      xp->ptr = (unsigned char**)((char*)xp->ptr + (p1-p2));
+      xp->size = (int*)((char*)xp->size + (p1-p2));
+      xp->type = (char**)((char*)xp->type + (p1-p2));
+      xp->options = (char**)((char*)xp->options + (p1-p2));
+    }
+  }
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static int
+soap_has_copies(struct soap *soap, register const char *start, register const char *end)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  register const char *p;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { for (p = (const char*)ip->copy; p; p = *(const char**)p)
+        if (p >= start && p < end)
+          return SOAP_ERR;
+      for (fp = ip->flist; fp; fp = fp->next)
+        if ((const char*)fp->ptr >= start && (const char*)fp->ptr < end)
+	  return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_resolve(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  short flag;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr)
+      { register void *p, **q, *r;
+        q = (void**)ip->link;
+        ip->link = NULL;
+        r = ip->ptr;
+        DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing link chain to resolve id='%s'\n", ip->id));
+        while (q)
+        { p = *q;
+          *q = r;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "... link %p -> %p\n", q, r));
+          q = (void**)p;
+        }
+      }
+      else if (*ip->id == '#')
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Missing data for id='%s'\n", ip->id));
+        strcpy(soap->id, ip->id + 1);
+        return soap->error = SOAP_MISSING_ID;
+      }
+    }
+  }
+  do
+  { flag = 0;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution phase\n"));
+    for (i = 0; i < SOAP_IDHASH; i++)
+    { for (ip = soap->iht[i]; ip; ip = ip->next)
+      { if (ip->ptr && !soap_has_copies(soap, (const char*)ip->ptr, (const char*)ip->ptr + ip->size))
+        { if (ip->copy)
+          { register void *p, **q = (void**)ip->copy;
+            DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing copy chain to resolve id='%s'\n", ip->id));
+            ip->copy = NULL;
+            do
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... copy %p -> %p (%u bytes)\n", ip->ptr, q, (unsigned int)ip->size));
+	      p = *q;
+              memcpy(q, ip->ptr, ip->size);
+              q = (void**)p;
+            } while (q);
+	    flag = 1;
+	  }
+          for (fp = ip->flist; fp; fp = ip->flist)
+          { register unsigned int k = fp->level;
+	    register void *p = ip->ptr;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data type=%d location=%p level=%u,%u id='%s'\n", ip->type, p, ip->level, fp->level, ip->id));
+	    while (ip->level < k)
+            { register void **q = (void**)soap_malloc(soap, sizeof(void*));  
+	      if (!q)
+	        return soap->error;
+	      *q = p;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level, new location=%p holds=%p...\n", q, *q));
+              p = (void*)q;
+              k--;
+            }
+	    if (fp->fcopy)
+	      fp->fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    else
+	      soap_fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    ip->flist = fp->next;
+	    SOAP_FREE(soap, fp);
+	    flag = 1;
+	  }
+        }
+      }
+    }
+  } while (flag);
+#ifdef SOAP_DEBUG
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->copy || ip->flist)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution error: forwarded data for id='%s' could not be propagated, please report this problem to the developers\n", ip->id));
+      }
+    }
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution done\n"));
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_size_block(struct soap *soap, size_t n)
+{ if (soap->blist->ptr)
+  { soap->blist->size -= *(size_t*)(soap->blist->ptr + sizeof(char*)) - n;
+    *(size_t*)(soap->blist->ptr + sizeof(char*)) = n;
+  }
+  return soap->blist->size;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_first_block(struct soap *soap)
+{ char *p, *q, *r;
+  p = soap->blist->ptr;
+  if (!p)
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "First block\n"));
+  r = NULL;
+  do
+  { q = *(char**)p;
+    *(char**)p = r;
+    r = p;
+    p = q;
+  } while (p);
+  soap->blist->ptr = r;
+  return r + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_next_block(struct soap *soap)
+{ char *p;
+  p = soap->blist->ptr;
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n"));
+    soap->blist->ptr = *(char**)p;
+    SOAP_FREE(soap, p);
+    if (soap->blist->ptr)
+      return soap->blist->ptr + sizeof(char*) + sizeof(size_t);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_block_size(struct soap *soap)
+{ return *(size_t*)(soap->blist->ptr + sizeof(char*));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end_block(struct soap *soap)
+{ struct soap_blist *bp;
+  char *p, *q;
+  bp = soap->blist;
+  if (bp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of block sequence, free all remaining blocks\n"));
+    for (p = bp->ptr; p; p = q)
+    { q = *(char**)p;
+      SOAP_FREE(soap, p);
+    }
+    soap->blist = bp->next;
+    SOAP_FREE(soap, bp);
+  }
+  DBGLOG(TEST, if (soap->blist) SOAP_MESSAGE(fdebug, "Restore previous block sequence\n"));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_save_block(struct soap *soap, char *p, int flag)
+{ register size_t n;
+  register char *q, *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Save all blocks in contiguous memory space of %u bytes (%p->%p)\n", (unsigned int)soap->blist->size, soap->blist->ptr, p));
+  if (soap->blist->size)
+  { if (!p)
+      p = (char*)soap_malloc(soap, soap->blist->size);
+    if (p)
+    { for (s = p, q = soap_first_block(soap); q; q = soap_next_block(soap))
+      { n = soap_block_size(soap);
+#ifndef WITH_NOIDREF
+        if (flag)
+	  soap_update_ptrs(soap, q, q + n, s, q);
+#endif
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy %u bytes from %p to %p\n", (unsigned int)n, q, s));
+        memcpy(s, q, n);
+        s += n;
+      }
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  soap_end_block(soap);
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsize(struct soap *soap, const char *type, int size)
+{ return soap_putsizes(soap, type, &size, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizes(struct soap *soap, const char *type, const int *size, int dim)
+{ return soap_putsizesoffsets(soap, type, size, NULL, dim);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim)
+{ int i;
+  if (!type)
+    return NULL;
+  if (soap->version == 2)
+  { sprintf(soap->type, "%s[%d", type, size[0]);
+    for (i = 1; i < dim; i++)
+      sprintf(soap->type + strlen(soap->type), " %d", size[i]);
+  }
+  else
+  { if (offset)
+    { sprintf(soap->type, "%s[%d", type, size[0] + offset[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i] + offset[i]);
+    }
+    else
+    { sprintf(soap->type, "%s[%d", type, size[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i]);
+    }
+    strcat(soap->type, "]");
+  }
+  return soap->type;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffset(struct soap *soap, int offset)
+{ return soap_putoffsets(soap, &offset, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffsets(struct soap *soap, const int *offset, int dim)
+{ register int i;
+  sprintf(soap->arrayOffset, "[%d", offset[0]);
+  for (i = 1; i < dim; i++)
+    sprintf(soap->arrayOffset + strlen(soap->arrayOffset), ",%d", offset[i]);
+  strcat(soap->arrayOffset, "]");
+  return soap->arrayOffset;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_size(const int *size, int dim)
+{ register int i, n = size[0];
+  for (i = 1; i < dim; i++)
+    n *= size[i];
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getoffsets(const char *attr, const int *size, int *offset, int dim)
+{ register int i, j = 0;
+  if (offset)
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += offset[i] = (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  else
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  return j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsize(const char *attr1, const char *attr2, int *j)
+{ register int n, k;
+  char *s;
+  *j = 0;
+  if (!*attr1)
+    return -1;
+  if (*attr1 == '[')
+    attr1++;
+  n = 1;
+  for (;;)
+  { k = (int)soap_strtol(attr1, &s, 10);
+    n *= k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE || s == attr1)
+      return -1;
+    attr1 = strchr(s, ',');
+    if (!attr1)
+      attr1 = strchr(s, ' ');
+    if (attr2 && *attr2)
+    { attr2++;
+      *j *= k;
+      k = (int)soap_strtol(attr2, &s, 10);
+      *j += k;
+      if (k < 0)
+        return -1;
+      attr2 = s;
+    }
+    if (!attr1)
+      break;
+    attr1++;
+  }
+  return n - *j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsizes(const char *attr, int *size, int dim)
+{ register int i, k, n;
+  if (!*attr)
+    return -1;
+  i = strlen(attr);
+  n = 1;
+  do
+  { for (i = i-1; i >= 0; i--)
+      if (attr[i] == '[' || attr[i] == ',' || attr[i] == ' ')
+        break;
+    k = (int)atol(attr + i + 1);
+    n *= size[--dim] = k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE)
+      return -1;
+  } while (i >= 0 && attr[i] != '[');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getposition(const char *attr, int *pos)
+{ register int i, n;
+  if (!*attr)
+    return -1;
+  n = 0;
+  i = 1;
+  do
+  { pos[n++] = (int)atol(attr + i);
+    while (attr[i] && attr[i] != ',' && attr[i] != ']')
+      i++;
+    if (attr[i] == ',')
+      i++;
+  } while (n < SOAP_MAXDIMS && attr[i] && attr[i] != ']');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_push_namespace(struct soap *soap, const char *id, const char *ns)
+{ register struct soap_nlist *np;
+  register struct Namespace *p;
+  register short i = -1;
+  register size_t n, k;
+  n = strlen(id);
+  k = strlen(ns) + 1;
+  p = soap->local_namespaces;
+  if (p)
+  { for (i = 0; p->id; p++, i++)
+    { if (p->ns && !strcmp(ns, p->ns))
+      { if (p->out)
+        { SOAP_FREE(soap, p->out);
+          p->out = NULL;
+        }
+        break;
+      }
+      if (p->out)
+      { if (!strcmp(ns, p->out))
+          break;
+      }
+      else if (p->in)
+      { if (!soap_tag_cmp(ns, p->in))
+        { if ((p->out = (char*)SOAP_MALLOC(soap, k)))
+            strcpy(p->out, ns);
+          break;
+        }
+      }
+    }
+    if (!p || !p->id)
+      i = -1;
+  }
+  if (i >= 0)
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k);
+  if (!np)
+    return soap->error = SOAP_EOM;
+  np->next = soap->nlist;
+  soap->nlist = np;
+  np->level = soap->level;
+  np->index = i;
+  strcpy(np->id, id);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns));
+  if (i < 0)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push NOT OK: no match found for '%s' in namespace mapping table (added to stack anyway)\n", ns));
+  }
+  else
+  { np->ns = NULL;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push OK ('%s' matches '%s' in namespace table)\n", id, p->id));
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_namespace(struct soap *soap)
+{ register struct soap_nlist *np;
+  while (soap->nlist && soap->nlist->level >= soap->level)
+  { np = soap->nlist->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Popped namespace binding (level=%u) '%s'\n", soap->level, soap->nlist->id));
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_namespace(struct soap *soap, const char *id1, const char *id2, int n1, int n2) 
+{ register struct soap_nlist *np = soap->nlist;
+  while (np && (strncmp(np->id, id1, n1) || np->id[n1]))
+    np = np->next;
+  if (np)
+  { if (np->index < 0
+     || (soap->local_namespaces[np->index].id
+      && (strncmp(soap->local_namespaces[np->index].id, id2, n2)
+       || soap->local_namespaces[np->index].id[n2])))
+      return SOAP_NAMESPACE;
+    return SOAP_OK;
+  }
+  if (n1 == 3 && n1 == n2 && !strcmp(id1, "xml") && !strcmp(id1, id2))
+    return SOAP_OK;
+  return SOAP_SYNTAX_ERROR; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_current_namespace(struct soap *soap, const char *tag)
+{ register struct soap_nlist *np;
+  register const char *s;
+  np = soap->nlist;
+  if (!(s = strchr(tag, ':')))
+  { while (np && *np->id) /* find default namespace, if present */
+      np = np->next;
+  }
+  else
+  { while (np && (strncmp(np->id, tag, s - tag) || np->id[s - tag]))
+      np = np->next;
+    if (!np)
+      soap->error = SOAP_NAMESPACE;
+  }
+  if (np)
+  { if (np->index >= 0)
+      return soap->namespaces[np->index].ns;
+    if (np->ns)
+      return soap_strdup(soap, np->ns);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_tag_cmp(const char *s, const char *t)
+{ for (;;)
+  { register int c1 = *s;
+    register int c2 = *t;
+    if (!c1 || c1 == '"')
+      break;
+    if (c2 != '-')
+    { if (c1 != c2)
+      { if (c1 >= 'A' && c1 <= 'Z')
+          c1 += 'a' - 'A';
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+      }
+      if (c1 != c2)
+      { if (c2 != '*')
+          return 1;
+	c2 = *++t;
+        if (!c2)
+	  return 0;
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+        for (;;)
+        { c1 = *s;
+	  if (!c1 || c1 == '"')
+	    break;
+	  if (c1 >= 'A' && c1 <= 'Z')
+            c1 += 'a' - 'A';
+          if (c1 == c2 && !soap_tag_cmp(s + 1, t + 1))
+            return 0;
+	  s++;
+        }
+        break;
+      }
+    }
+    s++;
+    t++;
+  }
+  if (*t == '*' && !t[1])
+    return 0;
+  return *t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_tag(struct soap *soap, const char *tag1, const char *tag2)
+{ register const char *s, *t;
+  if (!tag1 || !tag2 || !*tag2)
+    return SOAP_OK;
+  s = strchr(tag1, ':');
+  t = strchr(tag2, ':');
+  if (t)
+  { if (s)
+    { if (t[1] && SOAP_STRCMP(s + 1, t + 1))
+        return SOAP_TAG_MISMATCH;
+      if (t != tag2 && soap_match_namespace(soap, tag1, tag2, s - tag1, t - tag2))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+        return SOAP_TAG_MISMATCH;
+      }
+    } 
+    else if (SOAP_STRCMP(tag1, t + 1))
+      return SOAP_TAG_MISMATCH;
+    else if (t != tag2 && soap_match_namespace(soap, tag1, tag2, 0, t - tag2))
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+      return SOAP_TAG_MISMATCH;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags and (default) namespaces match: '%s' '%s'\n", tag1, tag2));
+    return SOAP_OK;
+  }
+  if (s)
+  { if (SOAP_STRCMP(s + 1, tag2))
+      return SOAP_TAG_MISMATCH;
+  }
+  else if (SOAP_STRCMP(tag1, tag2))
+    return SOAP_TAG_MISMATCH;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags match: '%s' '%s'\n", tag1, tag2));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_array(struct soap *soap, const char *type)
+{ if (*soap->arrayType)
+    if (soap_match_tag(soap, soap->arrayType, type)
+     && soap_match_tag(soap, soap->arrayType, "xsd:anyType")
+     && soap_match_tag(soap, soap->arrayType, "xsd:ur-type")
+    )
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array type mismatch: '%s' '%s'\n", soap->arrayType, type));
+      return SOAP_TAG_MISMATCH;
+    }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************\
+ *
+ *	SSL
+ *
+\******************************************************************************/
+
+#ifdef WITH_OPENSSL
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_rand()
+{ unsigned char buf[4];
+  if (!ssl_init_done)
+    soap_ssl_init();
+  RAND_pseudo_bytes(buf, 4);
+  return *(int*)buf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *dhfile, const char *randfile, const char *sid)
+{ int err;
+  soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  if (dhfile)
+  { soap->dhfile = dhfile;
+    soap->rsa = 0;
+  }
+  else
+  { soap->dhfile = NULL;
+    soap->rsa = 1;
+  }
+  soap->randfile = randfile;
+  soap->require_client_auth = (flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION);
+  if (!(err = soap->fsslauth(soap)))
+  { if (sid)
+      SSL_CTX_set_session_id_context(soap->ctx, (unsigned char*)sid, strlen(sid));
+  }
+  return err; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_client_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *randfile)
+{ soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  soap->dhfile = NULL;
+  soap->rsa = 0;
+  soap->randfile = randfile;
+  soap->require_server_auth = (flags & SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION);
+  return soap->fsslauth(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_ssl_init()
+{ /* Note: for MT systems, the main program MUST call soap_ssl_init() before any threads are started */
+  if (!ssl_init_done)
+  { ssl_init_done = 1;
+    SSL_library_init();
+#ifndef WITH_LEAN
+    SSL_load_error_strings();
+#endif
+    if (!RAND_load_file("/dev/urandom", 1024))
+    { char buf[1024];
+      RAND_seed(buf, sizeof(buf));
+      while (!RAND_status())
+      { int r = rand();
+        RAND_seed(&r, sizeof(int));
+      }
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static const char *
+ssl_error(struct soap *soap, int ret)
+{ int err = SSL_get_error(soap->ssl, ret);
+  const char *msg = soap_str_code(h_ssl_error_codes, err);
+  if (msg)
+    strcpy(soap->msgbuf, msg);
+  else
+    return ERR_error_string(err, soap->msgbuf);
+  if (ERR_peek_error())
+  { unsigned long r;
+    strcat(soap->msgbuf, "\n");
+    while ((r = ERR_get_error()))
+      ERR_error_string_n(r, soap->msgbuf + strlen(soap->msgbuf), sizeof(soap->msgbuf) - strlen(soap->msgbuf));
+  } 
+  else
+  { switch (ret)
+    { case 0:
+        strcpy(soap->msgbuf, "EOF was observed that violates the protocol. The client probably provided invalid authentication information.");
+        break;
+      case -1:
+        sprintf(soap->msgbuf, "Error observed by underlying BIO: %s", strerror(errno));  
+        break;
+    }
+  }
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_password(char *buf, int num, int rwflag, void *userdata)
+{ if (num < (int)strlen((char*)userdata) + 1)
+    return 0;
+  return strlen(strcpy(buf, (char*)userdata));
+}
+#endif
+
+/******************************************************************************/
+/* This callback is included for future references. It should not be deleted
+#ifndef PALM_2
+static DH *
+ssl_tmp_dh(SSL *ssl, int is_export, int keylength)
+{ static DH *dh512 = NULL;
+  static DH *dh1024 = NULL;
+  DH *dh;
+  switch (keylength)
+  { case 512:
+      if (!dh512)
+      { BIO *bio = BIO_new_file("dh512.pem", "r");
+        if (bio)
+        { dh512 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+          return dh512;
+        }
+      }
+      else
+        return dh512;
+    default:
+      if (!dh1024)
+      { BIO *bio = BIO_new_file("dh1024.pem", "r");
+        if (bio)
+        { dh1024 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+        }
+      }
+      dh = dh1024;
+  }
+  return dh;
+}
+#endif
+*/
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_auth_init(struct soap *soap)
+{ if (!ssl_init_done)
+    soap_ssl_init();
+  if (!soap->ctx)
+  { if (!(soap->ctx = SSL_CTX_new(SSLv23_method())))
+      return soap_set_receiver_error(soap, "SSL error", "Can't setup context", SOAP_SSL_ERROR);
+  }
+  if (soap->randfile)
+  { if (!RAND_load_file(soap->randfile, -1))
+      return soap_set_receiver_error(soap, "SSL error", "Can't load randomness", SOAP_SSL_ERROR);
+  }
+  if (soap->cafile || soap->capath)
+  { if (!SSL_CTX_load_verify_locations(soap->ctx, soap->cafile, soap->capath))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read CA file and directory", SOAP_SSL_ERROR);
+    if (soap->cafile && soap->require_client_auth)
+      SSL_CTX_set_client_CA_list(soap->ctx, SSL_load_client_CA_file(soap->cafile));
+  }
+  if (!SSL_CTX_set_default_verify_paths(soap->ctx))
+    return soap_set_receiver_error(soap, "SSL error", "Can't read default CA file and/or directory", SOAP_SSL_ERROR);
+/* See below */
+  if (soap->keyfile)
+  { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read certificate key file", SOAP_SSL_ERROR);
+    if (soap->password)
+    { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+      SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+    }
+    if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+  }
+/* Suggested alternative approach to check cafile first before the key file:
+  if (soap->password)
+  { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+    SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+  }
+  if (!soap->cafile || !SSL_CTX_use_certificate_chain_file(soap->ctx, soap->cafile))
+  { if (soap->keyfile)
+    { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read certificate or key file", SOAP_SSL_ERROR);
+      if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+    }
+  }
+*/
+  if (soap->rsa)
+  { RSA *rsa = RSA_generate_key(1024, RSA_F4, NULL, NULL);
+    if (!SSL_CTX_set_tmp_rsa(soap->ctx, rsa))
+    { if (rsa)
+        RSA_free(rsa);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set RSA key", SOAP_SSL_ERROR);
+    }
+    RSA_free(rsa);
+  }
+  else if (soap->dhfile)
+  { DH *dh = 0;
+    BIO *bio;
+    bio = BIO_new_file(soap->dhfile, "r");
+    if (!bio)
+      return soap_set_receiver_error(soap, "SSL error", "Can't read DH file", SOAP_SSL_ERROR);
+    dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+    BIO_free(bio);
+    if (SSL_CTX_set_tmp_dh(soap->ctx, dh) < 0)
+    { if (dh)
+        DH_free(dh);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set DH parameters", SOAP_SSL_ERROR);
+    }
+    DH_free(dh);
+  }
+  SSL_CTX_set_options(soap->ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2);
+  SSL_CTX_set_verify(soap->ctx, soap->require_client_auth ? (SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT) : soap->require_server_auth ? SSL_VERIFY_PEER : SSL_VERIFY_NONE, soap->fsslverify);
+#if (OPENSSL_VERSION_NUMBER < 0x00905100L)
+  SSL_CTX_set_verify_depth(soap->ctx, 1); 
+#else
+  SSL_CTX_set_verify_depth(soap->ctx, 9); 
+#endif  
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_verify_callback(int ok, X509_STORE_CTX *store)
+{
+#ifdef SOAP_DEBUG
+  if (!ok) 
+  { char data[256];
+    X509 *cert = X509_STORE_CTX_get_current_cert(store);
+    fprintf(stderr, "SSL verify error or warning with certificate at depth %d: %s\n", X509_STORE_CTX_get_error_depth(store), X509_verify_cert_error_string(X509_STORE_CTX_get_error(store)));
+    X509_NAME_oneline(X509_get_issuer_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate issuer %s\n", data);
+    X509_NAME_oneline(X509_get_subject_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate subject %s\n", data);
+  }
+#endif
+  /* Note: return 1 to continue, but unsafe progress will be terminated by SSL */
+  return ok;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_accept(struct soap *soap)
+{ BIO *bio;
+  int i, r;
+  if (!soap_valid_socket(soap->socket))
+    return soap_set_receiver_error(soap, "SSL error", "No socket in soap_ssl_accept()", SOAP_SSL_ERROR);
+  if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    return SOAP_INVALID_SOCKET;
+  if (!soap->ssl)
+  { soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+      return soap_set_receiver_error(soap, "SSL error", "SSL_new() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+  }
+  else
+    SSL_clear(soap->ssl);
+  soap->imode |= SOAP_ENC_SSL;
+  soap->omode |= SOAP_ENC_SSL;
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&nonblocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)|O_NONBLOCK);
+#endif
+  bio = BIO_new_socket((SOAP_SOCKET)soap->socket, BIO_NOCLOSE);
+  SSL_set_bio(soap->ssl, bio, bio);
+  i = 100; /* 100 * 0.1 ms retries */
+  while ((r = SSL_accept(soap->ssl)) <= 0)
+  { int err = SSL_get_error(soap->ssl, r);
+    if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE)
+    { struct timeval timeout;
+      fd_set fd;
+      if (i-- <= 0)
+        break;
+      timeout.tv_sec = 0;
+      timeout.tv_usec = 100000;
+      FD_ZERO(&fd);
+      FD_SET((SOAP_SOCKET)soap->socket, &fd);
+      r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+      if (r < 0 && soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        return SOAP_EOF;
+      }
+    }
+    else
+    { soap->errnum = err;
+      break;
+    }
+  }
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&blocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+  if (r <= 0)
+  { soap_set_receiver_error(soap, ssl_error(soap, r), "SSL_accept() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+    soap_closesock(soap);
+    return SOAP_SSL_ERROR;
+  }
+  if (soap->require_client_auth)
+  { X509 *peer;
+    int err;
+    if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    peer = SSL_get_peer_certificate(soap->ssl);
+    if (!peer)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    X509_free(peer);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#endif /* WITH_OPENSSL */
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_init(struct soap *soap)
+{ soap->errmode = 1;
+#ifdef WIN32
+  if (tcp_done)
+    return 0;
+  else
+  { WSADATA w;
+    if (WSAStartup(MAKEWORD(1, 1), &w))
+      return -1;
+    tcp_done = 1;
+  }
+#endif
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_done(struct soap *soap)
+{ 
+#ifdef SOAP_DEBUG
+  int i;
+#endif
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  while (soap->clist)
+  { struct soap_clist *p = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = p;
+  }
+  soap->keep_alive = 0; /* to force close the socket */
+  soap_closesock(soap);
+#ifdef WITH_COOKIES
+  soap_free_cookies(soap);
+#endif
+  while (soap->plugins)
+  { register struct soap_plugin *p = soap->plugins->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Removing plugin '%s'\n", soap->plugins->id));
+    if (soap->plugins->fcopy || soap->state == SOAP_INIT)
+      soap->plugins->fdelete(soap, soap->plugins);
+    SOAP_FREE(soap, soap->plugins);
+    soap->plugins = p;
+  }
+  soap->fplugin = fplugin;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+#ifdef WITH_OPENSSL
+  if (soap->session)
+  { SSL_SESSION_free(soap->session);
+    soap->session = NULL;
+  }
+#endif
+  if (soap->state == SOAP_INIT)
+  { if (soap_valid_socket(soap->master))
+    { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+      soap->master = SOAP_INVALID_SOCKET;
+    }
+#ifdef WITH_OPENSSL
+    if (soap->ctx)
+    { SSL_CTX_free(soap->ctx);
+      soap->ctx = NULL;
+    }
+#endif
+  }
+#ifdef SOAP_DEBUG
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free logfiles\n"));
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { if (soap->logfile[i])
+    { SOAP_FREE(soap, (void*)soap->logfile[i]);
+      soap->logfile[i] = NULL;
+    }
+    soap_close_logfile(soap, i);
+  }
+  soap_free_mht(soap);
+  soap->state = 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_cleanup(struct soap *soap)
+{ soap_done(soap);
+#ifdef WIN32
+  if (!tcp_done)
+    return;
+  tcp_done = 0;
+  WSACleanup();
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+tcp_error(struct soap *soap)
+{ register const char *msg = NULL;
+  switch (soap->errmode)
+  { case 0:
+      msg = soap_strerror(soap);
+      break;
+    case 1:
+      msg = "WSAStartup failed";
+      break;
+    case 2:
+    {
+#ifndef WITH_LEAN
+      msg = soap_str_code(h_error_codes, soap->errnum);
+      if (!msg)
+#endif
+      { sprintf(soap->msgbuf, "TCP/UDP IP error %d", soap->errnum);
+        msg = soap->msgbuf;
+      }
+    }
+  }
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static const char*
+http_error(struct soap *soap, int status)
+{ register const char *msg = SOAP_STR_EOS;
+#ifndef WITH_LEAN
+  msg = soap_str_code(h_http_error_codes, status);
+  if (!msg)
+    msg = SOAP_STR_EOS;
+#endif
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_IPV6
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr)
+{ soap_int32 iadd = -1;
+  struct hostent hostent, *host = &hostent;
+#ifdef VXWORKS
+  int hostint;
+  /* inet_addr(), and hostGetByName() expect "char *"; addr is a "const char *". */
+  iadd = inet_addr((char*)addr);
+#else
+#if defined(_AIXVERSION_431) || defined(TRU64)
+  struct hostent_data ht_data;
+#endif
+#ifdef AS400
+  iadd = inet_addr((void*)addr);
+#else
+  iadd = inet_addr(addr);
+#endif
+#endif
+  if (iadd != -1)
+  { memcpy(inaddr, &iadd, sizeof(iadd));
+    return SOAP_OK;
+  }
+#if defined(__GLIBC__)
+  if (gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &host, &soap->errnum) < 0)
+    host = NULL;
+#elif defined(_AIXVERSION_431) || defined(TRU64)
+  memset((void*)&ht_data, 0, sizeof(ht_data));
+  if (gethostbyname_r(addr, &hostent, &ht_data) < 0)
+  { host = NULL;
+    soap->errnum = h_errno;
+  }
+#elif defined(HAVE_GETHOSTBYNAME_R)
+  host = gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &soap->errnum);
+#elif defined(VXWORKS)
+  /* If the DNS resolver library resolvLib has been configured in the vxWorks
+   * image, a query for the host IP address is sent to the DNS server, if the
+   * name was not found in the local host table. */
+  hostint = hostGetByName((char*)addr);
+  if (hostint == ERROR)
+  { host = NULL;
+    soap->errnum = soap_errno; 
+  }
+#else
+#ifdef AS400
+  if (!(host = gethostbyname((void*)addr)))
+    soap->errnum = h_errno;
+#else
+  if (!(host = gethostbyname(addr)))
+    soap->errnum = h_errno;
+#endif
+#endif
+  if (!host)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Host name not found\n"));
+    return SOAP_ERR;
+  }
+#ifdef VXWORKS
+  inaddr->s_addr = hostint;
+#else
+  memcpy(inaddr, host->h_addr, host->h_length);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_connect(struct soap *soap, const char *endpoint, const char *host, int port)
+{
+#ifdef WITH_IPV6
+  struct addrinfo hints, *res, *ressave;
+  int err;
+#endif
+  register int fd;
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->socket))
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+  soap->socket = SOAP_INVALID_SOCKET;
+  if (tcp_init(soap))
+  { soap->errnum = 0;
+    soap_set_sender_error(soap, tcp_error(soap), "TCP init failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->errmode = 0;
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+    err = getaddrinfo(soap->proxy_host, soap_int2s(soap, soap->proxy_port), &hints, &res);
+  else
+    err = getaddrinfo(host, soap_int2s(soap, port), &hints, &res);
+  if (err)
+  { soap_set_sender_error(soap, gai_strerror(err), "getaddrinfo failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  ressave = res;
+again:
+  fd = (int)socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+  soap->errmode = 0;
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    fd = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    fd = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  if (fd < 0)
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "socket failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_flags & SO_LINGER)
+  { struct linger linger;
+    memset((void*)&linger, 0, sizeof(linger));
+    linger.l_onoff = 1;
+    linger.l_linger = 0;
+    if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+    { soap->errnum = soap_socket_errno;
+      soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  if ((soap->connect_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, soap->connect_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (soap->keep_alive && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)fd, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Opening socket %d to host='%s' port=%d\n", fd, host, port));
+#ifndef WITH_IPV6
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+  { if (soap->fresolve(soap, soap->proxy_host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get proxy host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)soap->proxy_port);
+  }
+  else
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)port);
+  }
+  soap->errmode = 0;
+  if ((soap->omode & SOAP_IO_UDP))
+    return fd;
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking)); /* modified to use fd */
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+  else
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  for (;;)
+  { 
+#ifdef WITH_IPV6
+    if (connect((SOAP_SOCKET)fd, res->ai_addr, res->ai_addrlen))
+#else
+    if (connect((SOAP_SOCKET)fd, (struct sockaddr*)&soap->peer, sizeof(soap->peer)))
+#endif
+    { 
+#ifndef WITH_LEAN
+      if (soap->connect_timeout && (soap_socket_errno == SOAP_EINPROGRESS || soap_socket_errno == SOAP_EWOULDBLOCK))
+      { struct timeval timeout;
+        SOAP_SOCKLEN_T k;
+        fd_set fds;
+        if (soap->connect_timeout > 0)
+        { timeout.tv_sec = soap->connect_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->connect_timeout/1000000;
+          timeout.tv_usec = -soap->connect_timeout%1000000;
+        }
+        FD_ZERO(&fds);
+        FD_SET((SOAP_SOCKET)fd, &fds);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(fd + 1), NULL, &fds, NULL, &timeout);
+          if (r > 0)
+	    break;
+          if (!r)
+          { soap->errnum = 0;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+            soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+            soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+	k = (SOAP_SOCKLEN_T)sizeof(soap->errnum);
+        if (!getsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_ERROR, (char*)&soap->errnum, &k) && !soap->errnum)	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+          break;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap->errnum = soap_socket_errno;
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      else
+#endif
+#ifdef WITH_IPV6
+      if (res->ai_next)
+      { res = res->ai_next;
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        goto again;
+      }
+      else
+#endif
+      if (soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }  
+    else
+      break;
+  }
+#ifdef WITH_IPV6
+  soap->peerlen = 0; /* IPv6: already connected so use send() */
+  freeaddrinfo(ressave);
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  soap->socket = fd;
+  soap->imode &= ~SOAP_ENC_SSL;
+  soap->omode &= ~SOAP_ENC_SSL;
+  if (!strncmp(endpoint, "https:", 6))
+  {
+#ifdef WITH_OPENSSL
+    BIO *bio;
+    int r;
+    if (soap->proxy_host)
+    { short v;
+      unsigned int k = soap->omode; /* make sure we only parse HTTP */
+      size_t n = soap->count; /* save the content length */
+      char *userid, *passwd;
+      soap->omode &= ~SOAP_ENC; /* mask IO and ENC */
+      soap->omode |= SOAP_IO_BUFFER;
+      soap_begin_send(soap);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connecting to proxy server\n"));
+      sprintf(soap->tmpbuf, "CONNECT %s:%d HTTP/%s", host, port, soap->http_version);
+      if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+#ifndef WITH_LEAN
+      if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+      { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+        strcpy(soap->tmpbuf, "Basic ");
+        soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+        if ((soap->error = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+        { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return soap->error;
+        }
+      }
+#endif
+      if ((soap->error = soap->fposthdr(soap, NULL, NULL))
+       || soap_flush(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->omode = k;
+      k = soap->imode;
+      soap->imode &= ~SOAP_ENC; /* mask IO and ENC */
+      v = soap->version; /* preserve */
+      userid = soap->userid; /* preserve */
+      passwd = soap->passwd; /* preserve */
+      if (soap_begin_recv(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->userid = userid; /* restore */
+      soap->passwd = passwd; /* restore */
+      soap->version = v; /* restore */
+      soap->imode = k; /* restore */
+      soap->count = n; /* restore */
+      soap_begin_send(soap);
+    }
+    if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    { soap_set_sender_error(soap, "SSL error", "SSL authentication failed in tcp_connect(): check password, key file, and ca file.", SOAP_SSL_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+    { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      soap->error = SOAP_SSL_ERROR;
+      return SOAP_INVALID_SOCKET;
+    }
+    if (soap->session)
+    { if (!strcmp(soap->session_host, host) && soap->session_port == port)
+        SSL_set_session(soap->ssl, soap->session);
+      SSL_SESSION_free(soap->session);
+      soap->session = NULL;
+    }
+    soap->imode |= SOAP_ENC_SSL;
+    soap->omode |= SOAP_ENC_SSL;
+    bio = BIO_new_socket((SOAP_SOCKET)fd, BIO_NOCLOSE);
+    SSL_set_bio(soap->ssl, bio, bio);
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#if defined(WIN32)
+    { u_long nonblocking = 1;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+    }
+#elif defined(VXWORKS)
+    { u_long nonblocking = 1;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+#endif
+    for (;;)
+    { if ((r = SSL_connect(soap->ssl)) <= 0)
+      { int err = SSL_get_error(soap->ssl, r);
+        if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+        { soap_set_sender_error(soap, ssl_error(soap, r), "SSL connect failed in tcp_connect()", SOAP_SSL_ERROR);
+          soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (soap->connect_timeout)
+        { struct timeval timeout;
+          fd_set fds;
+          if (soap->connect_timeout > 0)
+          { timeout.tv_sec = soap->connect_timeout;
+            timeout.tv_usec = 0;
+          }
+          else
+          { timeout.tv_sec = -soap->connect_timeout/1000000;
+            timeout.tv_usec = -soap->connect_timeout%1000000;
+          }
+          FD_ZERO(&fds);
+          FD_SET((SOAP_SOCKET)fd, &fds);
+          for (;;)
+          { int r = select((SOAP_SOCKET)(fd + 1), &fds, NULL, &fds, &timeout);
+            if (r > 0)
+	      break;
+            if (!r)
+            { soap->errnum = 0;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+              soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+              soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+              return SOAP_INVALID_SOCKET;
+            }
+          }
+	  continue;
+        }
+      }
+      break;
+    }
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#ifdef WIN32
+    { u_long blocking = 0;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+    }
+#elif defined(VXWORKS)
+    { u_long blocking = 0;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+    if (soap->require_server_auth)
+    { X509 *peer;
+      int err;
+      if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+      { soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      peer = SSL_get_peer_certificate(soap->ssl);
+      if (!peer)
+      { soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      X509_NAME_get_text_by_NID(X509_get_subject_name(peer), NID_commonName, soap->msgbuf, sizeof(soap->msgbuf));
+      X509_free(peer);
+      if (soap_tag_cmp(soap->msgbuf, host))
+      { soap_set_sender_error(soap, "SSL error", "SSL certificate host name mismatch in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+#else
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    soap->error = SOAP_SSL_ERROR;
+    return SOAP_INVALID_SOCKET;
+#endif
+  }
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_bind(struct soap *soap, const char *host, int port, int backlog)
+{
+#ifdef WITH_IPV6
+  struct addrinfo *addrinfo = NULL;
+  struct addrinfo hints;
+  struct addrinfo res;
+  int err;
+#endif
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->master))
+  { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+    soap->master = SOAP_INVALID_SOCKET;
+  }
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 1;
+  if (tcp_init(soap))
+  { soap_set_receiver_error(soap, tcp_error(soap), "TCP init failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  hints.ai_flags = AI_PASSIVE;
+  soap->errmode = 2;
+  err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo);
+  if (addrinfo)
+  { res = *addrinfo;
+    soap->peer = *((struct sockaddr_storage*)addrinfo->ai_addr);
+    soap->peerlen = addrinfo->ai_addrlen;
+    res.ai_addr = (struct sockaddr*)&soap->peer;
+    res.ai_addrlen = soap->peerlen;
+    freeaddrinfo(addrinfo);
+  }
+  if (err)
+  { soap_set_receiver_error(soap, gai_strerror(err), "getaddrinfo failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->master = socket(res.ai_family, res.ai_socktype, res.ai_protocol);
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->master = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    soap->master = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  soap->errmode = 0;
+  if (!soap_valid_socket(soap->master))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "socket failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->socket = soap->master;
+#endif
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)soap->master, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(soap->master, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->bind_flags && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, soap->bind_flags, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->master, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+#ifdef WITH_IPV6
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, res.ai_addr, res.ai_addrlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+#else
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (host)
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_receiver_error(soap, tcp_error(soap), "get host by name failed in soap_bind()", SOAP_TCP_ERROR);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  else
+    soap->peer.sin_addr.s_addr = htonl(INADDR_ANY);
+  soap->peer.sin_port = htons((short)port);
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, (struct sockaddr*)&soap->peer, soap->peerlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+  if (!(soap->omode & SOAP_IO_UDP) && listen((SOAP_SOCKET)soap->master, backlog))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "listen failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+  return soap->master;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_poll(struct soap *soap)
+{ 
+#ifndef WITH_LEAN
+  struct timeval timeout;
+  fd_set rfd, sfd, xfd;
+  int r;
+  timeout.tv_sec = 0;
+  timeout.tv_usec = 0;
+  FD_ZERO(&rfd);
+  FD_ZERO(&sfd);
+  FD_ZERO(&xfd);
+  if (soap_valid_socket(soap->socket))
+  { FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &xfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, &xfd, &timeout);
+    if (r > 0 && FD_ISSET((SOAP_SOCKET)soap->socket, &xfd))
+      r = -1;
+  }
+  else if (soap_valid_socket(soap->master))
+  { FD_SET((SOAP_SOCKET)soap->master, &sfd);
+    r = select((SOAP_SOCKET)(soap->master + 1), NULL, &sfd, NULL, &timeout);
+  }
+  else
+    return SOAP_OK;
+  if (r > 0)
+  {
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+    {
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || SSL_peek(soap->ssl, soap->tmpbuf, 1) > 0))
+        return SOAP_OK;
+    }
+    else
+#endif
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) > 0))
+        return SOAP_OK;
+  }
+  else if (r < 0)
+  { soap->errnum = soap_socket_errno;
+    if ((soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) && soap_socket_errno != SOAP_EINTR)
+    { soap_set_receiver_error(soap, tcp_error(soap), "select failed in soap_poll()", SOAP_TCP_ERROR);
+      return soap->error = SOAP_TCP_ERROR;
+    }
+  }
+  else
+    soap->errnum = 0;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Polling: other end down on socket=%d select=%d\n", soap->socket, r));
+  return SOAP_EOF;
+#else
+  return SOAP_OK;
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_accept(struct soap *soap, int s, struct sockaddr *a, int *n)
+{ int fd;
+  fd = (int)accept((SOAP_SOCKET)s, a, (SOAP_SOCKLEN_T*)n);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, FD_CLOEXEC);
+#endif
+#endif
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_accept(struct soap *soap)
+{ int n = (int)sizeof(soap->peer);
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  soap->error = SOAP_OK;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    return soap->socket = soap->master;
+#endif
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 0;
+  soap->keep_alive = 0;
+  if (soap_valid_socket(soap->master))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->accept_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->accept_timeout > 0)
+        { timeout.tv_sec = soap->accept_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->accept_timeout/1000000;
+          timeout.tv_usec = -soap->accept_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->master, &fd);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(soap->master + 1), &fd, &fd, NULL, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            soap_set_receiver_error(soap, "Timeout", "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            soap_closesock(soap);
+            soap_set_sender_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+#if defined(WIN32)
+	{ u_long nonblocking = 1;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &nonblocking);
+        }
+#elif defined(VXWORKS)
+        { u_long nonblocking = 1;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&nonblocking));
+        }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)|O_NONBLOCK);
+#endif
+      }
+      else
+#if defined(WIN32)
+      { u_long blocking = 0;
+        ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+      }
+#elif defined(VXWORKS)
+      { u_long blocking = 0;
+        ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+      }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+      soap->socket = soap->faccept(soap, soap->master, (struct sockaddr*)&soap->peer, &n);
+      soap->peerlen = (size_t)n;
+      if (soap_valid_socket(soap->socket))
+      {
+#ifdef WITH_IPV6
+/* Use soap->host to store the numeric form of the remote host */
+        getnameinfo((struct sockaddr*)&soap->peer, n, soap->host, sizeof(soap->host), NULL, 0, NI_NUMERICHOST | NI_NUMERICSERV); 
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d from %s\n", soap->socket, soap->host));
+        soap->ip = 0; /* info stored in soap->peer and soap->host */
+        soap->port = 0; /* info stored in soap->peer and soap->host */
+#else
+        soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+        soap->port = (int)ntohs(soap->peer.sin_port); /* does not return port number on some systems */
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d at port %d from IP %d.%d.%d.%d\n", soap->socket, soap->port, (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF));
+#endif
+#ifndef WITH_LEAN
+	if (soap->accept_flags & SO_LINGER)
+        { struct linger linger;
+          memset((void*)&linger, 0, sizeof(linger));
+          linger.l_onoff = 1;
+          linger.l_linger = 0;
+	  if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+          { soap->errnum = soap_socket_errno;
+	    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in soap_accept()", SOAP_TCP_ERROR);
+	    soap_closesock(soap);
+            return SOAP_INVALID_SOCKET;
+	  }
+        }
+        if ((soap->accept_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, soap->accept_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#ifdef TCP_NODELAY
+        if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->socket, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#endif
+#endif
+        if (soap->accept_timeout)
+        {
+#if defined(WIN32)
+          u_long blocking = 0;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+          ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+#elif defined(VXWORKS)
+          u_long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+          ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)(&blocking));
+#elif defined(PALM)
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL,0)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL,0)&~O_NONBLOCK);
+#elif defined(SYMBIAN)
+          long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, 0/*FIONBIO*/, &blocking);
+#else
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+	}
+        soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+        return soap->socket;
+      }
+      if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept failed from %s\n", soap->host));
+        soap->errnum = soap_socket_errno;
+        soap_set_receiver_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+	soap_closesock(soap);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+  }
+  else
+  { soap->errnum = 0;
+    soap_set_receiver_error(soap, tcp_error(soap), "no master socket in soap_accept()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_disconnect(struct soap *soap)
+{
+#ifdef WITH_OPENSSL
+  if (soap->ssl)
+  { int r, s = 0;
+    if (soap->session)
+      SSL_SESSION_free(soap->session);
+    if (*soap->host)
+    { soap->session = SSL_get1_session(soap->ssl);
+      if (soap->session)
+      { strcpy(soap->session_host, soap->host);
+        soap->session_port = soap->port;
+      }
+    }
+    r = SSL_shutdown(soap->ssl);
+    if (r != 1)
+    { s = ERR_get_error();
+      if (s)
+      { if (soap_valid_socket(soap->socket))
+        { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1);
+          soap->socket = SOAP_INVALID_SOCKET;
+        }
+        r = SSL_shutdown(soap->ssl);
+      }
+    }
+    DBGLOG(TEST, if (s) SOAP_MESSAGE(fdebug, "Shutdown failed: %d\n", SSL_get_error(soap->ssl, r)));
+    SSL_free(soap->ssl);
+    soap->ssl = NULL;
+    if (s)
+      return SOAP_SSL_ERROR;
+    ERR_remove_state(0);
+  }
+#endif
+  if (soap_valid_socket(soap->socket) && !(soap->omode & SOAP_IO_UDP))
+  { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 2);
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+    soap->socket = SOAP_INVALID_SOCKET;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_closesocket(struct soap *soap, SOAP_SOCKET fd)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Close socket %d\n", (int)fd));
+  return closesocket(fd);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_shutdownsocket(struct soap *soap, SOAP_SOCKET fd, int how)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Shutdown socket %d how=%d\n", (int)fd, how));
+  return shutdown(fd, how);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_closesock(struct soap *soap)
+{ register int status = soap->error;
+  if (status == SOAP_EOF || status == SOAP_TCP_ERROR || status == SOAP_SSL_ERROR || !soap->keep_alive)
+  { if (soap->fclose && (soap->error = soap->fclose(soap)))
+      return soap->error;
+    soap->keep_alive = 0;
+  }
+#ifdef WITH_ZLIB
+  if (soap->zlib_state == SOAP_ZLIB_DEFLATE)
+    deflateEnd(&soap->d_stream);
+  else if (soap->zlib_state == SOAP_ZLIB_INFLATE)
+    inflateEnd(&soap->d_stream);
+  soap->zlib_state = SOAP_ZLIB_NONE;
+#endif
+  return soap->error = status;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_hash(register const char *s)
+{ register size_t h = 0;
+  while (*s)
+    h = 65599*h + *s++;
+  return h % SOAP_IDHASH;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_pht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing pointer hashtable\n"));
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new1(soap_mode mode)
+{ return soap_new2(mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new()
+{ return soap_new2(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new2(soap_mode imode, soap_mode omode)
+{ struct soap *soap = (struct soap*)malloc(sizeof(struct soap));
+  if (soap)
+    soap_init2(soap, imode, omode);
+  return soap;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_del(struct soap *soap)
+{ free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_pht(struct soap *soap)
+{ register struct soap_pblk *pb, *next;
+  register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free pointer hashtable\n"));
+  for (pb = soap->pblk; pb; pb = next)
+  { next = pb->next;
+    SOAP_FREE(soap, pb);
+  }
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type)
+{ register int i;
+  struct soap_plist *pp;
+  if (soap->version != 1)
+    soap->encoding = 1;
+  if (a)
+    i = soap_array_pointer_lookup(soap, p, a, n, type, &pp);
+  else
+    i = soap_pointer_lookup(soap, p, type, &pp);
+  if (i)
+  { if (soap_is_embedded(soap, pp)
+     || soap_is_single(soap, pp))
+      return 0;
+    soap_set_embedded(soap, pp);
+  }
+  return i;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_lookup(struct soap *soap, const void *p, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (p)
+  { for (pp = soap->pht[soap_hash_ptr(p)]; pp; pp = pp->next)
+    { if (pp->ptr == p && pp->type == type)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d id=%d\n", p, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d: not found\n", p, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_enter(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register int h;
+  register struct soap_plist *pp;
+  if (!soap->pblk || soap->pidx >= SOAP_PTRBLK)
+  { register struct soap_pblk *pb = (struct soap_pblk*)SOAP_MALLOC(soap, sizeof(struct soap_pblk));
+    if (!pb)
+    { soap->error = SOAP_EOM;
+      return 0;
+    }
+    pb->next = soap->pblk;
+    soap->pblk = pb;
+    soap->pidx = 0;
+  }
+  *ppp = pp = &soap->pblk->plist[soap->pidx++];
+  if (a)
+    h = soap_hash_ptr(a->__ptr);
+  else
+    h = soap_hash_ptr(p);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pointer enter location=%p array=%p size=%d dim=%d type=%d id=%d\n", p, a?a->__ptr:NULL, a?a->__size:0, n, type, soap->idnum+1));
+  pp->next = soap->pht[h];
+  pp->type = type;
+  pp->mark1 = 0;
+  pp->mark2 = 0;
+  pp->ptr = p;
+  pp->array = a;
+  soap->pht[h] = pp;
+  pp->id = ++soap->idnum;
+  return pp->id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_pointer_lookup(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (!p || !a->__ptr)
+    return 0;
+  for (pp = soap->pht[soap_hash_ptr(a->__ptr)]; pp; pp = pp->next)
+  { if (pp->type == type && pp->array && pp->array->__ptr == a->__ptr)
+    { register int i;
+      for (i = 0; i < n; i++)
+        if (((const int*)&pp->array->__size)[i] != ((const int*)&a->__size)[i])
+	  break;
+      if (i == n)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d id=%d\n", a->__ptr, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d: not found\n", a->__ptr, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_count(struct soap *soap)
+{ soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) || (soap->omode & SOAP_ENC_DIME))
+    soap->mode = soap->omode | SOAP_IO_LENGTH | SOAP_ENC_DIME;
+  else
+#endif
+  { soap->mode = soap->omode;
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE
+     || (((soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_ENC_XML))
+#ifndef WITH_LEANER
+      && !soap->fpreparesend
+#endif
+      ))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    else
+      soap->mode |= SOAP_IO_LENGTH;
+  }
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (!(soap->mode & SOAP_ENC_DIME))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+    soap->mode |= SOAP_ENC_MIME;
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+  soap->dime.list = soap->dime.last;	/* keep track of last DIME attachment */
+#endif
+  soap->count = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->part = SOAP_BEGIN;
+  soap->idnum = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin count phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+#ifndef WITH_LEANER
+  soap->dime.count = 0; /* count # of attachments */
+  soap->dime.size = 0; /* accumulate total size of attachments */
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+    return soap->error = soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_count(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->fpreparefinal)
+    return soap->error = soap->fpreparefinal(soap);
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of count phase\n"));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_send(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+  soap->mode = soap->omode | (soap->mode & (SOAP_IO_LENGTH | SOAP_ENC_DIME));
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+#ifdef WITH_UDP
+  if ((soap->mode & SOAP_IO_UDP))
+  { soap->mode |= SOAP_ENC_XML;
+    if (soap->count > SOAP_BUFLEN)
+      return soap->error = SOAP_UDP_ERROR;
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_FLUSH && soap_valid_socket(soap->socket))
+  { if (soap->count || (soap->mode & SOAP_IO_LENGTH) || (soap->mode & SOAP_ENC_XML))
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+  soap->mode &= ~SOAP_IO_LENGTH;
+  if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap_new_block(soap);
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+  { soap->mode |= SOAP_ENC_MIME;
+    soap->mode &= ~SOAP_ENC_DIME;
+  }
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket)) /* Set win32 stdout or soap->sendfd to BINARY, e.g. to support DIME */
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->sendfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->sendfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#endif
+  if (soap->mode & SOAP_IO)
+  { soap->bufidx = 0;
+    soap->buflen = 0;
+  }
+  soap->chunksize = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+#ifdef WITH_ZLIB
+  soap->z_ratio_out = 1.0;
+  if ((soap->mode & SOAP_ENC_ZLIB) && soap->zlib_state != SOAP_ZLIB_DEFLATE)
+  {
+#ifdef WITH_GZIP
+    memcpy(soap->z_buf, "\37\213\10\0\0\0\0\0\0\377", 10);
+    soap->d_stream.next_out = (Byte*)soap->z_buf + 10;
+    soap->d_stream.avail_out = SOAP_BUFLEN - 10;
+    soap->z_crc = crc32(0L, NULL, 0);
+    if (deflateInit2(&soap->d_stream, soap->z_level, Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY) != Z_OK)
+#else
+    soap->d_stream.next_out = (Byte*)soap->z_buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    if (deflateInit(&soap->d_stream, soap->z_level) != Z_OK)
+#endif
+      return soap->error = SOAP_ZLIB_ERROR;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflate initialized\n"));
+    soap->zlib_state = SOAP_ZLIB_DEFLATE;
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin send phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+  soap->part = SOAP_BEGIN;
+#ifndef WITH_LEANER
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_embedded(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { pp->mark1 = 1;
+    pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded %p type=%d mark set to 1\n", p, t));
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_reference(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (!p || (soap->mode & SOAP_XML_TREE))
+    return 1;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (soap_pointer_enter(soap, p, NULL, 0, t, &pp))
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  else
+    return 1;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reference %p type=%d (%d %d)\n", p, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_reference(struct soap *soap, const void *p, const struct soap_array *a, int n, int t)
+{ register int i;
+  struct soap_plist *pp;
+  if (!p || !a->__ptr)
+    return 1;
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (i)
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (!soap_pointer_enter(soap, p, a, n, t, &pp))
+    return 1;
+  else
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array reference %p ptr=%p dim=%d type=%d (%d %d)\n", p, a->__ptr, n, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embedded_id(struct soap *soap, int id, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap->mode & SOAP_XML_TREE)
+    return id;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id %p type=%d id=%d\n", p, t, id));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (id < 0)
+    { id = soap_pointer_lookup(soap, p, t, &pp);
+      if (id)
+      { if (soap->mode & SOAP_IO_LENGTH)
+          pp->mark1 = 2;
+        else
+          pp->mark2 = 2;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id multiref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+      }
+      return -1;
+    }
+    return id;
+  }
+  if (id < 0)
+    id = soap_pointer_lookup(soap, p, t, &pp);
+  else if (id && !soap_pointer_lookup(soap, p, t, &pp))
+    return 0;
+  if (id && pp)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      pp->mark1 = 1;
+    else
+      pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id embedded ref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+  }
+  return id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Is embedded? %d %d\n", (int)pp->mark1, (int)pp->mark2));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      return pp->mark1 != 0;
+    return pp->mark2 != 0;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 1;
+  return pp->mark2 == 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_single(struct soap *soap, struct soap_plist *pp)
+{ if (soap->part == SOAP_IN_HEADER)
+    return 1;
+  if (!pp)
+    return 0;
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 0;
+  return pp->mark2 == 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return;
+  if (soap->mode & SOAP_IO_LENGTH)
+    pp->mark1 = 1;
+  else
+    pp->mark2 = 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attachment(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, const char *aid, const char *atype, const char *aoptions, int n, const char *type, int t) 
+{ struct soap_plist *pp;
+  int i;
+  if (!p || !a->__ptr || (!aid && !atype))
+    return soap_element_id(soap, tag, id, p, a, n, type, t);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Attachment tag='%s' id='%s' (%d) type='%s'\n", tag, aid?aid:"", id, atype?atype:""));
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (!i)
+  { i = soap_pointer_enter(soap, p, a, n, t, &pp);
+    if (!i)
+    { soap->error = SOAP_EOM;
+      return -1;
+    }
+  }
+  if (id <= 0)
+    id = i;
+  if (!aid)
+  { sprintf(soap->tmpbuf, soap->dime_id_format, id);
+    aid = soap_strdup(soap, soap->tmpbuf);
+  }
+  /* Add MTOM xop:Include element when necessary */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  if ((soap->mode & SOAP_ENC_MTOM) && strcmp(tag, "xop:Include"))
+  { if (soap_element_begin_out(soap, tag, 0, type)
+     || soap_element_href(soap, "xop:Include", 0, "href", aid)
+     || soap_element_end_out(soap, tag))
+      return soap->error;
+  }
+  else if (soap_element_href(soap, tag, 0, "href", aid))
+    return soap->error;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { if (pp->mark1 != 3)
+    { struct soap_multipart *content;
+      if (soap->mode & SOAP_ENC_MTOM)
+        content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, (char*)a->__ptr, a->__size);
+      else
+        content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, (char*)a->__ptr, a->__size);
+      if (!content)
+      { soap->error = SOAP_EOM;
+        return -1;
+      }
+      if (!strncmp(aid, "cid:", 4)) /* RFC 2111 */
+      { if (soap->mode & SOAP_ENC_MTOM)
+        { char *s = (char*)soap_malloc(soap, strlen(aid) - 1);
+	  if (s)
+	  { *s = '<';
+	    strcpy(s + 1, aid + 4);
+	    strcat(s, ">");
+	    content->id = s;
+          }
+        }
+        else
+          content->id = aid + 4;
+      }
+      else
+        content->id = aid;
+      content->type = atype;
+      content->options = aoptions;
+      content->encoding = SOAP_MIME_BINARY;
+      pp->mark1 = 3;
+    }
+  }
+  else
+    pp->mark2 = 3;
+  return -1;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_iht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+    soap->iht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_iht(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip, *p;
+  register struct soap_flist *fp, *fq;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = p)
+    { for (fp = ip->flist; fp; fp = fq)
+      { fq = fp->next;
+        SOAP_FREE(soap, fp);
+      }
+      p = ip->next;
+      SOAP_FREE(soap, ip);
+    }
+    soap->iht[i] = NULL;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_lookup(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  for (ip = soap->iht[soap_hash(id)]; ip; ip = ip->next)
+    if (!strcmp(ip->id, id))
+      return ip;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_enter(struct soap *soap, const char *id)
+{ register size_t h;
+  register struct soap_ilist *ip;
+  ip = (struct soap_ilist*)SOAP_MALLOC(soap, sizeof(struct soap_ilist) + strlen(id));
+  if (ip)
+  { h = soap_hash(id);
+    strcpy(ip->id, id);
+    ip->next = soap->iht[h];
+    soap->iht[h] = ip;
+    return ip;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_malloc(struct soap *soap, size_t n)
+{ register char *p;
+  if (!n)
+    return (void*)SOAP_NON_NULL;
+  if (!soap)
+    return SOAP_MALLOC(soap, n);
+  n += (-(long)n) & (sizeof(void*)-1); /* align at 4-, 8- or 16-byte boundary */
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(void*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  /* keep chain of alloced cells for later destruction */
+  soap->alloced = 1;
+  *(void**)(p + n) = soap->alist;
+  *(size_t*)(p + n + sizeof(void*)) = n;
+  soap->alist = p + n;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_mht(struct soap *soap)
+{ register int i;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->mht[i] = NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_free_mht(struct soap *soap)
+{ register int i;
+  register struct soap_mlist *mp, *mq;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+  { for (mp = soap->mht[i]; mp; mp = mq)
+    { mq = mp->next;
+      if (mp->live)
+        fprintf(stderr, "%s(%d): malloc() = %p not freed (memory leak or forgot to call soap_end()?)\n", mp->file, mp->line, mp->ptr);
+      free(mp);
+    }
+    soap->mht[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_track_malloc(struct soap *soap, const char *file, int line, size_t size)
+{ register void *p = malloc(size);
+  if (soap)
+  { register int h = soap_hash_ptr(p);
+    register struct soap_mlist *mp = (struct soap_mlist*)malloc(sizeof(struct soap_mlist));
+    if (soap->fdebug[SOAP_INDEX_TEST])
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): malloc(%lu) = %p\n", file, line, (unsigned long)size, p));
+    mp->next = soap->mht[h];
+    mp->ptr = p;
+    mp->file = file;
+    mp->line = line;
+    mp->live = 1;
+    soap->mht[h] = mp;
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_track_free(struct soap *soap, const char *file, int line, void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+  { if (mp->live)
+    { free(p);
+      if (soap->fdebug[SOAP_INDEX_TEST])
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): free(%p)\n", file, line, p));
+      mp->live = 0;
+    }
+    else
+      fprintf(stderr, "%s(%d): free(%p) double free of pointer malloced at %s(%d)\n", file, line, p, mp->file, mp->line);
+  }
+  else
+    fprintf(stderr, "%s(%d): free(%p) pointer not malloced\n", file, line, p);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_track_unlink(struct soap *soap, const void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+    mp->live = 0;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_dealloc(struct soap *soap, void *p)
+{ if (!soap)
+    return;
+  if (p)
+  { register char **q;
+    for (q = (char**)&soap->alist; *q; q = *(char***)q)
+    { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+      { *q = **(char***)q;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Freed data at %p\n", p));
+        SOAP_FREE(soap, p);
+        return;
+      }
+    }
+    soap_delete(soap, p);
+  }
+  else
+  { register char *q;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free all soap_malloc() data\n"));
+    while (soap->alist)
+    { q = (char*)soap->alist;
+      soap->alist = *(void**)q;
+      q -= *(size_t*)(q + sizeof(void*));
+      SOAP_FREE(soap, q);
+    }
+  }
+  /* we must assume these were deallocated: */
+  soap->action = NULL;
+  soap->fault = NULL;
+  soap->header = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->authrealm = NULL;
+#ifndef WITH_LEANER
+  soap_clr_mime(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_delete(struct soap *soap, void *p)
+{ register struct soap_clist **cp;
+  if (soap_check_state(soap))
+    return;
+  cp = &soap->clist;
+  if (p)
+  { while (*cp)
+    { if (p == (*cp)->ptr)
+      { register struct soap_clist *q = *cp;
+        *cp = q->next;
+        q->fdelete(q);
+        SOAP_FREE(soap, q);
+        return;
+      }
+      cp = &(*cp)->next;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: address not in list\n", p));
+  }
+  else
+  { while (*cp)
+    { register struct soap_clist *q = *cp;
+      *cp = q->next;
+      if (q->ptr == (void*)soap->fault)
+        soap->fault = NULL; /* this was deallocated */
+      else if (q->ptr == (void*)soap->header)
+        soap->header = NULL; /* this was deallocated */
+      q->fdelete(q);
+      SOAP_FREE(soap, q);
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_clist *
+SOAP_FMAC2
+soap_link(struct soap *soap, void *p, int t, int n, void (*fdelete)(struct soap_clist*))
+{ register struct soap_clist *cp;
+  if ((cp = (struct soap_clist*)SOAP_MALLOC(soap, sizeof(struct soap_clist))))
+  { cp->next = soap->clist;
+    cp->type = t;
+    cp->size = n; 
+    cp->ptr = p;
+    cp->fdelete = fdelete;
+    soap->clist = cp;
+  }
+  return cp;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_unlink(struct soap *soap, const void *p)
+{ register char **q;
+  register struct soap_clist **cp;
+  if (!soap || !p)
+    return;
+  for (q = (char**)&soap->alist; *q; q = *(char***)q)
+  { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+    { *q = **(char***)q;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked data %p\n", p));
+#ifdef SOAP_DEBUG
+      soap_track_unlink(soap, p);
+#endif
+      return;
+    }
+  }
+  for (cp = &soap->clist; *cp; cp = &(*cp)->next)
+  { if (p == (*cp)->ptr)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked class instance %p\n", p));
+      q = (char**)*cp;
+      *cp = (*cp)->next;
+      SOAP_FREE(soap, q);
+      return;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_lookup_type(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  if (id && *id)
+  { ip = soap_lookup(soap, id);
+    if (ip)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup id='%s' type=%d\n", id, ip->type));
+      return ip->type;
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "lookup type id='%s' NOT FOUND! Need to get it from xsi:type\n", id));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, unsigned int k)
+{ struct soap_ilist *ip;
+  void **q;
+  if (!p || !id || !*id)
+    return p;
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding first href='%s' type=%d %p (%u bytes)\n", id, t, p, (unsigned int)n));
+    ip->type = t;
+    ip->size = n; 
+    ip->link = p;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->ptr = NULL;
+    ip->level = k;
+    *p = NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolved href='%s' type=%d location=%p (%u bytes)\n", id, t, ip->ptr, (unsigned int)n));
+    if (ip->type != t)
+    { strcpy(soap->id, id);
+      soap->error = SOAP_HREF;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility: id type=%d href type=%d\n", ip->type, t));
+      return NULL;
+    }
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      if (!q)
+        return NULL;
+      *p = (void*)q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    *p = ip->ptr;
+  }
+  else if (ip->level > k)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving level %u pointers to href='%s'\n", ip->level, id));
+    while (ip->level > k)
+    { void *s, **r = &ip->link;
+      q = (void**)ip->link;
+      while (q)
+      { *r = (void*)soap_malloc(soap, sizeof(void*));
+        s = *q;
+        *q = *r;
+        r = (void**)*r;
+        q = (void**)s;
+      }
+      *r = NULL;
+      ip->size = n; 
+      ip->copy = NULL;
+      ip->level = ip->level - 1;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarded href='%s' type=%d location=%p (%u bytes)\n", id, t, p, (unsigned int)n));
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      *p = q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_forward(struct soap *soap, const char *href, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t))
+{ struct soap_ilist *ip;
+  if (!p || !href || !*href)
+    return p;
+  ip = soap_lookup(soap, href); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, href); /* new hash table entry for string id */
+    ip->type = st;
+    ip->size = n;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->ptr = NULL;
+    ip->level = 0;
+    ip->flist = NULL;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry href='%s' type=%d size=%lu level=%d location=%p\n", href, st, (unsigned long)n, k, p));
+  }
+  else if (ip->type != st || (ip->level == k && ip->size != n))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", href, ip->type, (unsigned long)ip->size, k, st, (unsigned long)n));
+    strcpy(soap->id, href);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  if (fcopy || n < sizeof(void*) || *href != '#')
+  { register struct soap_flist *fp = (struct soap_flist*)SOAP_MALLOC(soap, sizeof(struct soap_flist));
+    if (!fp)
+    { soap->error = SOAP_EOM;
+      return NULL;
+    }
+    fp->next = ip->flist;
+    fp->type = tt;
+    fp->ptr = p;
+    fp->level = k;
+    fp->len = len;
+    if (fcopy)
+      fp->fcopy = fcopy;
+    else
+      fp->fcopy = soap_fcopy;
+    ip->flist = fp;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding type=%d (target type=%d) size=%lu location=%p level=%u len=%lu href='%s'\n", st, tt, (unsigned long)n, p, k, (unsigned long)len, href));
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding copying address %p for type=%d href='%s'\n", p, st, href));
+    *(void**)p = ip->copy;
+    ip->copy = p;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*))
+{
+#ifndef WITH_NOIDREF
+  struct soap_ilist *ip;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Enter id='%s' type=%d loc=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  soap->alloced = 0;
+  if (!p)
+  { if (finstantiate)
+      p = finstantiate(soap, t, type, arrayType, &n);
+    else
+      p = soap_malloc(soap, n);
+    if (p)
+      soap->alloced = 1;
+  }
+#ifndef WITH_NOIDREF
+  if (!id || !*id)
+#endif
+    return p;
+#ifndef WITH_NOIDREF
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Lookup entry id='%s for location=%p'\n", id, p));
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    ip->type = t;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry id='%s' type=%d size=%lu level=%u location=%p\n", id, t, (unsigned long)n, k, p));
+  }
+  else if ((ip->type != t || (ip->level == k && ip->size != n)) && (ip->copy || ip->flist))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", id, ip->type, (unsigned long)ip->size, k, t, (unsigned long)n));
+    strcpy(soap->id, id);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Multiply defined id='%s'\n", id));
+    strcpy(soap->id, id);
+    soap->error = SOAP_DUPLICATE_ID;
+    return NULL;
+  }
+  else 
+  { ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update entry id='%s' type=%d location=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  }
+  return ip->ptr;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{ DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Copying data type=%d (target type=%d) %p -> %p (%lu bytes)\n", st, tt, q, p, (unsigned long)n));
+  memcpy(p, q, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_send(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->dime.list)
+  { /* SOAP body referenced attachments must appear first */
+    soap->dime.last->next = soap->dime.first;
+    soap->dime.first = soap->dime.list->next;
+    soap->dime.list->next = NULL;
+    soap->dime.last = soap->dime.list;
+  }
+  if (soap_putdime(soap) || soap_putmime(soap))
+    return soap->error;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End send\n"));
+  if (soap->mode & SOAP_IO) /* need to flush the remaining data in buffer */
+  { if (soap_flush(soap))
+#ifdef WITH_ZLIB
+    { if (soap->mode & SOAP_ENC_ZLIB && soap->zlib_state == SOAP_ZLIB_DEFLATE)
+      { soap->zlib_state = SOAP_ZLIB_NONE;
+        deflateEnd(&soap->d_stream);
+      }
+      return soap->error;
+    }
+#else
+      return soap->error;
+#endif
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { int r;
+      soap->d_stream.avail_in = 0;
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating remainder\n"));
+        r = deflate(&soap->d_stream, Z_FINISH);
+        if (soap->d_stream.avail_out != SOAP_BUFLEN)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN - soap->d_stream.avail_out))
+          { soap->zlib_state = SOAP_ZLIB_NONE;
+            deflateEnd(&soap->d_stream);
+            return soap->error;
+	  }
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (r == Z_OK);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+      soap->z_ratio_out = (float)soap->d_stream.total_out / (float)soap->d_stream.total_in;
+      soap->mode &= ~SOAP_ENC_ZLIB;
+      soap->zlib_state = SOAP_ZLIB_NONE;
+      if (deflateEnd(&soap->d_stream) != Z_OK || r != Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to end deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+#ifdef WITH_GZIP
+      soap->z_buf[0] = soap->z_crc & 0xFF;
+      soap->z_buf[1] = (soap->z_crc >> 8) & 0xFF;
+      soap->z_buf[2] = (soap->z_crc >> 16) & 0xFF;
+      soap->z_buf[3] = (soap->z_crc >> 24) & 0xFF;
+      soap->z_buf[4] = soap->d_stream.total_in & 0xFF;
+      soap->z_buf[5] = (soap->d_stream.total_in >> 8) & 0xFF;
+      soap->z_buf[6] = (soap->d_stream.total_in >> 16) & 0xFF;
+      soap->z_buf[7] = (soap->d_stream.total_in >> 24) & 0xFF;
+      if (soap_flush_raw(soap, soap->z_buf, 8))
+        return soap->error;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip crc32=%lu\n", (unsigned long)soap->z_crc));
+#endif
+    }
+#endif
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    { char *p;
+#ifndef WITH_NOHTTP
+      if (!(soap->mode & SOAP_ENC_XML))
+      { soap->mode--;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending buffered message of length %u\n", (unsigned int)soap->blist->size));
+        if (soap->status >= SOAP_POST)
+          soap->error = soap->fpost(soap, soap->endpoint, soap->host, soap->port, soap->path, soap->action, soap->blist->size);
+        else if (soap->status != SOAP_STOP)
+          soap->error = soap->fresponse(soap, soap->status, soap->blist->size);
+        if (soap->error || soap_flush(soap))
+          return soap->error;
+        soap->mode++;
+      }
+#endif
+      for (p = soap_first_block(soap); p; p = soap_next_block(soap))
+      { DBGMSG(SENT, p, soap_block_size(soap));
+        if ((soap->error = soap->fsend(soap, p, soap_block_size(soap))))
+        { soap_end_block(soap);
+          return soap->error;
+        }
+      }
+      soap_end_block(soap);
+    }
+#ifndef WITH_LEANER
+    else if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { DBGMSG(SENT, "\r\n0\r\n\r\n", 7);
+      if ((soap->error = soap->fsend(soap, "\r\n0\r\n\r\n", 7)))
+        return soap->error;
+    }
+#endif
+  }
+#ifdef WITH_TCPFIN
+#ifdef WITH_OPENSSL
+  if (!soap->ssl && soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#else
+  if (soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#endif
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of send phase\n"));
+  soap->omode &= ~SOAP_XML_SEC;
+  soap->count = 0;
+  soap->part = SOAP_END;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_recv(struct soap *soap)
+{ soap->part = SOAP_END;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) && soap_getdime(soap))
+    return soap->error;
+  soap->dime.list = soap->dime.first;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  if ((soap->mode & SOAP_ENC_MIME) && soap_getmime(soap))
+    return soap->error;
+  soap->mime.list = soap->mime.first;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "End of receive message ok\n"));
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { soap->mode &= ~SOAP_ENC_ZLIB;
+    memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+    soap->bufidx = (char*)soap->d_stream.next_in - soap->z_buf;
+    soap->buflen = soap->z_buflen;
+    soap->zlib_state = SOAP_ZLIB_NONE;
+    if (inflateEnd(&soap->d_stream) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+#ifdef WITH_GZIP
+    if (soap->zlib_in == SOAP_ZLIB_GZIP)
+    { soap_wchar c;
+      short i;
+      for (i = 0; i < 8; i++)
+      { if ((int)(c = soap_getchar(soap)) == EOF)
+          return soap->error = SOAP_EOF;
+        soap->z_buf[i] = (char)c;
+      }
+      if (soap->z_crc != ((uLong)(unsigned char)soap->z_buf[0] | ((uLong)(unsigned char)soap->z_buf[1] << 8) | ((uLong)(unsigned char)soap->z_buf[2] << 16) | ((uLong)(unsigned char)soap->z_buf[3] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: crc check failed, message corrupted? (crc32=%lu)\n", (unsigned long)soap->z_crc));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+      if (soap->d_stream.total_out != ((uLong)(unsigned char)soap->z_buf[4] | ((uLong)(unsigned char)soap->z_buf[5] << 8) | ((uLong)(unsigned char)soap->z_buf[6] << 16) | ((uLong)(unsigned char)soap->z_buf[7] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: incorrect message length\n"));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+    }
+#endif
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    while ((int)soap_getchar(soap) != EOF) /* advance to last chunk */
+      ;
+  if (soap->fdisconnect && (soap->error = soap->fdisconnect(soap)))
+    return soap->error;
+#ifndef WITH_NOIDREF
+  return soap_resolve(soap);
+#else
+#ifndef WITH_LEANER
+  if (soap->xlist)
+  { if (soap->mode & SOAP_ENC_MTOM)
+      return soap->error = SOAP_MIME_HREF;
+    return soap->error = SOAP_DIME_HREF;
+  }
+#endif
+  return SOAP_OK;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free(struct soap *soap)
+{ register struct Namespace *ns;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free namespace stack\n"));
+  while (soap->nlist)
+  { register struct soap_nlist *np = soap->nlist->next;
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free any remaining temp blocks\n"));
+  while (soap->blist)
+    soap_end_block(soap);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute storage\n"));
+  while (soap->attributes)
+  { register struct soap_attribute *tp = soap->attributes->next;
+    if (soap->attributes->value)
+      SOAP_FREE(soap, soap->attributes->value);
+    SOAP_FREE(soap, soap->attributes);
+    soap->attributes = tp;
+  }
+#ifdef WITH_FAST
+  if (soap->labbuf)
+    SOAP_FREE(soap, soap->labbuf);
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  ns = soap->local_namespaces;
+  if (ns)
+  { for (; ns->id; ns++)
+    { if (ns->out)
+      { if (soap->encodingStyle == ns->out)
+          soap->encodingStyle = SOAP_STR_EOS;
+        SOAP_FREE(soap, ns->out);
+        ns->out = NULL;
+      }
+      if (soap->encodingStyle == ns->ns)
+        soap->encodingStyle = SOAP_STR_EOS;
+    }
+    SOAP_FREE(soap, soap->local_namespaces);
+    soap->local_namespaces = NULL;
+  }
+#ifndef WITH_LEANER
+  while (soap->xlist)
+  { struct soap_xlist *xp = soap->xlist->next;
+    SOAP_FREE(soap, soap->xlist);
+    soap->xlist = xp;
+  }
+#endif
+#ifndef WITH_NOIDREF
+  soap_free_pht(soap);
+  soap_free_iht(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_logs(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { soap->logfile[i] = NULL;
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEAN) || defined(SOAP_DEBUG)
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_open_logfile(struct soap *soap, int i)
+{ if (soap->logfile[i])
+    soap->fdebug[i] = fopen(soap->logfile[i], i < 2 ? "ab" : "a");
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_close_logfile(struct soap *soap, int i)
+{ if (soap->fdebug[i])
+  { fclose(soap->fdebug[i]);
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_close_logfiles(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+    soap_close_logfile(soap, i);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_set_logfile(struct soap *soap, int i, const char *logfile)
+{ char *s = NULL;
+  soap_close_logfile(soap, i);
+  if (soap->logfile[i])
+    SOAP_FREE(soap, (void*)soap->logfile[i]);
+  if (logfile)
+    if ((s = (char*)SOAP_MALLOC(soap, strlen(logfile) + 1)))
+      strcpy(s, logfile);
+  soap->logfile[i] = s;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_recv_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_RECV, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_sent_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_SENT, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_test_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_TEST, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy(struct soap *soap)
+{ return soap_copy_context((struct soap*)malloc(sizeof(struct soap)), soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy_context(struct soap *copy, struct soap *soap)
+{ if (soap_check_state(soap))
+    return NULL;
+  if (copy)
+  { register struct soap_plugin *p;
+    memcpy(copy, soap, sizeof(struct soap));
+    copy->state = SOAP_COPY;
+    copy->user = NULL;
+    copy->error = SOAP_OK;
+    copy->userid = NULL;
+    copy->passwd = NULL;
+    copy->nlist = NULL;
+    copy->blist = NULL;
+    copy->clist = NULL;
+    copy->alist = NULL;
+    copy->attributes = NULL;
+#ifdef WITH_FAST
+    copy->labbuf = NULL;
+    copy->lablen = 0;
+    copy->labidx = 0;
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_mht(copy);
+#endif
+    copy->local_namespaces = NULL;
+#ifndef WITH_NOIDREF
+    soap_init_iht(copy);
+    soap_init_pht(copy);
+#endif
+    copy->header = NULL;
+    copy->fault = NULL;
+    copy->action = NULL;
+#ifndef WITH_LEAN
+#ifdef WITH_COOKIES
+    copy->cookies = soap_copy_cookies(copy);
+#else
+    copy->cookies = NULL;
+#endif
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_logs(copy);
+    soap_set_recv_logfile(copy, soap->logfile[SOAP_INDEX_RECV]);
+    soap_set_sent_logfile(copy, soap->logfile[SOAP_INDEX_SENT]);
+    soap_set_test_logfile(copy, soap->logfile[SOAP_INDEX_TEST]);
+#endif
+    copy->plugins = NULL;
+    for (p = soap->plugins; p; p = p->next)
+    { register struct soap_plugin *q = (struct soap_plugin*)SOAP_MALLOC(copy, sizeof(struct soap_plugin));
+      if (!q)
+        return NULL;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying plugin '%s'\n", p->id));
+      *q = *p;
+      if (p->fcopy && (soap->error = p->fcopy(copy, q, p)))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not copy plugin '%s'\n", p->id));
+        SOAP_FREE(copy, q);
+        return NULL;
+      }
+      q->next = copy->plugins;
+      copy->plugins = q;
+    }
+  }
+  else
+    soap->error = SOAP_EOM;
+  return copy;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init(struct soap *soap)
+{ soap->state = SOAP_INIT;
+  soap->version = 0;
+  soap_imode(soap, SOAP_IO_DEFAULT);
+  soap_omode(soap, SOAP_IO_DEFAULT);
+  soap->plugins = NULL;
+  soap->user = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+  soap->fconnect = NULL;
+  soap->fdisconnect = NULL;
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+  soap->fplugin = fplugin;
+#ifndef WITH_LEANER
+  soap->fdimereadopen = NULL;
+  soap->fdimewriteopen = NULL;
+  soap->fdimereadclose = NULL;
+  soap->fdimewriteclose = NULL;
+  soap->fdimeread = NULL;
+  soap->fdimewrite = NULL;
+#endif
+  soap->float_format = "%.8g"; /* .8 preserves single FP precision as much as possible, but might not be very efficient */
+  soap->double_format = "%.17lg"; /* .17 preserves double FP precision as much as possible, but might not be very efficient */
+  soap->dime_id_format = "cid:id%d"; /* default DIME id format */
+  soap->http_version = "1.1";
+  soap->actor = NULL;
+  soap->max_keep_alive = SOAP_MAXKEEPALIVE;
+  soap->keep_alive = 0;
+  soap->recv_timeout = 0;
+  soap->send_timeout = 0;
+  soap->connect_timeout = 0;
+  soap->accept_timeout = 0;
+  soap->socket_flags = 0;
+  soap->connect_flags = 0;
+  soap->bind_flags = 0;
+  soap->accept_flags = 0;
+  soap->ip = 0;
+#ifdef WITH_FAST
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  soap->encodingStyle = SOAP_STR_EOS;
+#ifndef WITH_NONAMESPACES
+  soap->namespaces = namespaces;
+#else
+  soap->namespaces = NULL;
+#endif
+  soap->local_namespaces = NULL;
+  soap->nlist = NULL;
+  soap->blist = NULL;
+  soap->clist = NULL;
+  soap->alist = NULL;
+  soap->attributes = NULL;
+  soap->header = NULL;
+  soap->fault = NULL;
+  soap->master = SOAP_INVALID_SOCKET;
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->os = NULL;
+  soap->is = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifndef UNDER_CE
+  soap->recvfd = 0;
+  soap->sendfd = 1;
+#else
+  soap->recvfd = stdin;
+  soap->sendfd = stdout;
+#endif 
+  soap->host[0] = '\0';
+  soap->port = 0;
+  soap->action = NULL;
+  soap->proxy_host = NULL;
+  soap->proxy_port = 8080;
+  soap->proxy_userid = NULL;
+  soap->proxy_passwd = NULL;
+  soap->authrealm = NULL;
+  soap->prolog = NULL;
+#ifdef WITH_OPENSSL
+  if (!ssl_init_done)
+    soap_ssl_init();
+  soap->fsslauth = ssl_auth_init;
+  soap->fsslverify = ssl_verify_callback;
+  soap->bio = NULL;
+  soap->ssl = NULL;
+  soap->ctx = NULL;
+  soap->require_server_auth = 0;
+  soap->require_client_auth = 0;
+  soap->rsa = 0;
+  soap->keyfile = NULL;
+  soap->password = NULL;
+  soap->dhfile = NULL;
+  soap->cafile = NULL;
+  soap->capath = NULL;
+  soap->crlfile = NULL;
+  soap->randfile = NULL;
+  soap->session = NULL;
+#endif
+#ifdef WITH_ZLIB
+  soap->zlib_state = SOAP_ZLIB_NONE;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.zalloc = NULL;
+  soap->d_stream.zfree = NULL;
+  soap->d_stream.opaque = NULL;
+  soap->z_level = 6;
+#endif
+#ifndef WITH_LEAN
+  soap->c14ninclude = NULL;
+  soap->c14nexclude = NULL;
+  soap->cookies = NULL;
+  soap->cookie_domain = NULL;
+  soap->cookie_path = NULL;
+  soap->cookie_max = 32;
+#endif
+#ifdef SOAP_DEBUG
+  soap_init_mht(soap);
+  soap_init_logs(soap);
+  soap_set_recv_logfile(soap, "RECV.log");
+  soap_set_sent_logfile(soap, "SENT.log");
+  soap_set_test_logfile(soap, NULL);
+#endif
+#ifdef WMW_RPM_IO
+  soap->rpmreqid = NULL;
+#endif
+#ifdef PALM
+  palmNetLibOpen();
+#endif
+#ifndef WITH_NOIDREF
+  soap_init_iht(soap);
+  soap_init_pht(soap);
+#endif
+  soap_begin(soap);
+#ifdef SOAP_DEBUG
+  soap_set_test_logfile(soap, "TEST.log");
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init1(struct soap *soap, soap_mode mode)
+{ soap_init2(soap, mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init2(struct soap *soap, soap_mode imode, soap_mode omode)
+{ soap_init(soap);
+  soap_imode(soap, imode);
+  soap_omode(soap, omode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_begin(struct soap *soap)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing\n"));
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+  soap->null = 0;
+  soap->position = 0;
+  soap->encoding = 0;
+  soap->mustUnderstand = 0;
+  soap->mode = 0;
+  soap->ns = 0;
+  soap->part = SOAP_END;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  soap->error = SOAP_OK;
+  soap->peeked = 0;
+  soap->ahead = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+  soap->endpoint[0] = '\0';
+#ifndef WITH_LEANER
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+#endif
+  soap_free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end(struct soap *soap)
+{ register struct soap_clist *cp;
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  soap_dealloc(soap, NULL);
+  while (soap->clist)
+  { cp = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = cp;
+  }
+  soap_closesock(soap);
+#ifdef SOAP_DEBUG
+  soap_close_logfiles(soap);
+#endif
+#ifdef PALM
+  palmNetLibClose();
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_namespaces(struct soap *soap, struct Namespace *p)
+{ register struct Namespace *ns = soap->local_namespaces;
+  register struct soap_nlist *np, *nq, *nr;
+  register unsigned int level = soap->level;
+  soap->namespaces = p;
+  soap->local_namespaces = NULL;
+  soap_set_local_namespaces(soap);
+  /* reverse the namespace list */
+  np = soap->nlist;
+  soap->nlist = NULL;
+  if (np)
+  { nq = np->next;
+    np->next = NULL;
+    while (nq)
+    { nr = nq->next;
+      nq->next = np;
+      np = nq;
+      nq = nr;
+    }
+  }
+  /* then push on new stack */
+  while (np)
+  { register const char *s;
+    soap->level = np->level; /* preserve element nesting level */
+    s = np->ns;
+    if (!s && np->index >= 0 && ns)
+    { s = ns[np->index].out;
+      if (!s)
+        s = ns[np->index].ns;
+    }
+    if (s && soap_push_namespace(soap, np->id, s))
+      return soap->error;
+    nq = np;
+    np = np->next;
+    SOAP_FREE(soap, nq);
+  }
+  if (ns)
+  { register int i;
+    for (i = 0; ns[i].id; i++)
+    { if (ns[i].out)
+      { SOAP_FREE(soap, ns[i].out);
+        ns[i].out = NULL;
+      }
+    }
+    SOAP_FREE(soap, ns);
+  }
+  soap->level = level; /* restore level */
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_local_namespaces(struct soap *soap)
+{ if (soap->namespaces && !soap->local_namespaces)
+  { register const struct Namespace *ns1;
+    register struct Namespace *ns2;
+    register size_t n = 1;
+    for (ns1 = soap->namespaces; ns1->id; ns1++)
+      n++;
+    n *= sizeof(struct Namespace);
+    ns2 = (struct Namespace*)SOAP_MALLOC(soap, n);
+    if (ns2)
+    { memcpy(ns2, soap->namespaces, n);
+      if (ns2[0].ns)
+      { if (!strcmp(ns2[0].ns, soap_env1))
+          soap->version = 1;
+        else
+          soap->version = 2;
+      }
+      soap->local_namespaces = ns2;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+#ifndef PALM_1
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_strsearch(const char *big, const char *little)
+{ size_t n = strlen(little);
+  const char *s = big;
+  while (s) 
+  { if (!strncmp(s, little, n) && (s[n] == '\0' || s[n] == ' '))
+      return s;
+    s = strchr(s, ' ');
+    if (s)
+      s++;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_lookup_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np;
+  for (np = soap->nlist; np; np = np->next)
+  { if (!strncmp(np->id, tag, n) && !np->id[n])
+      return np;
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized)
+{ register struct soap_nlist *np;
+  size_t n, k;
+  if (soap_strsearch(soap->c14nexclude, id))
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns?ns:""));
+  if (!utilized)
+  { for (np = soap->nlist; np; np = np->next)
+    { if (!strcmp(np->id, id) && (!np->ns || !strcmp(np->ns, ns)))
+        break;
+    }
+    if (np)
+    { if (np->index == 1)
+        utilized = np->index;
+      else
+        return NULL;
+    }
+  }
+  n = strlen(id);
+  if (ns)
+    k = strlen(ns);
+  else
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k + 1);
+  if (!np)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  np->next = soap->nlist;
+  soap->nlist = np;
+  strcpy(np->id, id);
+  if (ns)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+  }
+  else
+    np->ns = NULL;
+  np->level = soap->level;
+  np->index = utilized;
+  return np;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_utilize_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np = soap_lookup_ns(soap, tag, n);
+  if (np)
+  { if (np->index == 0)
+      soap_push_ns(soap, np->id, np->ns, 1);
+  }
+  else
+  { strncpy(soap->tmpbuf, tag, n);
+    soap->tmpbuf[n] = '\0';
+    soap_push_ns(soap, soap->tmpbuf, NULL, 1);
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_pop_ns(struct soap *soap)
+{ soap_pop_namespace(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element(struct soap *soap, const char *tag, int id, const char *type)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element begin tag='%s' id='%d' type='%s'\n", tag, id, type?type:""));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->soap = soap;
+    elt->next = NULL;
+    elt->prnt = soap->dom;
+    elt->name = soap_strdup(soap, tag);
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->nstr = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->node = NULL;
+    elt->type = 0;
+    elt->head = NULL;
+    elt->tail = NULL;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+  }
+  else
+  {
+#endif
+    soap->level++;
+#ifndef WITH_LEAN
+    if (!soap->ns)
+    { if (!(soap->mode & SOAP_XML_CANONICAL)
+       && soap_send(soap, soap->prolog ? soap->prolog : "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"))
+        return soap->error;
+    }
+    else if (soap->mode & SOAP_XML_INDENT)
+    { if (soap->ns == 1 && soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+      soap->body = 1;
+    }
+#endif
+    if (soap_send_raw(soap, "<", 1)
+     || soap_send(soap, tag))
+      return soap->error;
+#ifdef WITH_DOM
+  }
+#endif
+  if (!soap->ns)
+  { struct Namespace *ns;
+    for (ns = soap->local_namespaces; ns && ns->id; ns++)
+    { if (*ns->id && (ns->out || ns->ns))
+      { sprintf(soap->tmpbuf, "xmlns:%s", ns->id);
+        if (soap_attribute(soap, soap->tmpbuf, ns->out ? ns->out : ns->ns))
+          return soap->error;
+      }
+    }   
+  }
+  soap->ns = 1; /* start with 0 or 2, but should be one to continue */
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { const char *s = strchr(tag, ':');
+    if (s)
+      soap_utilize_ns(soap, tag, s - tag);
+  }
+#endif
+  if (id > 0)
+  { sprintf(soap->tmpbuf, "_%d", id);
+    if (soap_attribute(soap, "id", soap->tmpbuf))
+      return soap->error;
+  }
+  if (type && *type)
+  { if (soap_attribute(soap, "xsi:type", type))
+      return soap->error;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { const char *s = strchr(type, ':');
+      if (s)
+        soap_utilize_ns(soap, type, s - type);
+    }
+#endif
+  }
+  if (soap->null && soap->position > 0)
+  { int i;
+    sprintf(soap->tmpbuf, "[%d", soap->positions[0]);
+    for (i = 1; i < soap->position; i++)
+      sprintf(soap->tmpbuf + strlen(soap->tmpbuf), ",%d", soap->positions[i]);
+    strcat(soap->tmpbuf, "]");
+    if (soap_attribute(soap, "SOAP-ENC:position", soap->tmpbuf))
+      return soap->error;
+  }
+  if (soap->mustUnderstand)
+  { if (soap->actor && *soap->actor)
+    { if (soap_attribute(soap, soap->version == 2 ? "SOAP-ENV:role" : "SOAP-ENV:actor", soap->actor))
+        return soap->error;
+    }
+    if (soap_attribute(soap, "SOAP-ENV:mustUnderstand", soap->version == 2 ? "true" : "1"))
+      return soap->error;
+    soap->mustUnderstand = 0;
+  }
+  if (soap->encoding)
+  { if (soap->encodingStyle && soap->local_namespaces)
+    { if (!*soap->encodingStyle)
+      { if (soap->local_namespaces[1].out)
+          soap->encodingStyle = soap->local_namespaces[1].out;
+        else
+          soap->encodingStyle = soap->local_namespaces[1].ns;
+      }
+      if (soap_attribute(soap, "SOAP-ENV:encodingStyle", soap->encodingStyle))
+        return soap->error;
+    }
+    soap->encoding = 0;
+  }
+  soap->null = 0;
+  soap->position = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_out(struct soap *soap, const char *tag, int id, const char *type)
+{ if (*tag == '-')
+    return SOAP_OK;
+  if (soap_element(soap, tag, id, type))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRRCHR
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_strrchr(const char *s, int t)
+{ register char *r = NULL;
+  while (*s)
+    if (*s++ == t)
+      r = (char*)s - 1;
+  return r;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOL
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_strtol(const char *s, char **t, int b)
+{ register long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { short neg = 0;
+    if (*s == '-')
+    { s++;
+      neg = 1;
+    }
+    else if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 214748364 && (n > 214748364 || c >= '8'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+    if (neg)
+      n = -n;
+  }
+  else /* b == 16 and value is always positive */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x07FFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOUL
+SOAP_FMAC1
+unsigned long
+SOAP_FMAC2
+soap_strtoul(const char *s, char **t, int b)
+{ unsigned long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 429496729 && (n > 429496729 || c >= '6'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+  }
+  else /* b == 16 */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x0FFFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_begin_out(struct soap *soap, const char *tag, int id, const char *type, const char *offset)
+{ if (soap_element(soap, tag, id, "SOAP-ENC:Array"))
+    return soap->error;
+  if (soap->version == 2)
+  { const char *s;
+    s = soap_strrchr(type, '[');
+    if ((size_t)(s - type) < sizeof(soap->tmpbuf))
+    { strncpy(soap->tmpbuf, type, s - type);
+      soap->tmpbuf[s - type] = '\0';
+      if (type && *type && (soap_attribute(soap, "SOAP-ENC:itemType", soap->tmpbuf)))
+        return soap->error;
+      if (s && (soap_attribute(soap, "SOAP-ENC:arraySize", s + 1)))
+        return soap->error;
+    }
+  }
+  else
+  { if (offset && (soap_attribute(soap, "SOAP-ENC:offset", offset)))
+      return soap->error;
+    if (type && *type && (soap_attribute(soap, "SOAP-ENC:arrayType", type)))
+      return soap->error;
+  }
+#ifndef WITH_LEAN
+  if (type && *type && (soap->mode & SOAP_XML_CANONICAL))
+  { const char *s = strchr(type, ':');
+    if (s)
+      soap_utilize_ns(soap, type, s - type);
+  }
+#endif
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_start_end_out(struct soap *soap, const char *tag)
+{ register struct soap_attribute *tp;
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att;
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { att = &soap->dom->atts;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible)
+      { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+	if (!*att)
+	  return soap->error = SOAP_EOM;
+	(*att)->next = NULL;
+        (*att)->nstr = NULL;
+        (*att)->name = soap_strdup(soap, tp->name);
+        (*att)->data = soap_strdup(soap, tp->value);
+        (*att)->wide = NULL;
+        (*att)->soap = soap;
+        tp->visible = 0;
+      }
+    }
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { struct soap_nlist *np;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible && tp->name)
+      { const char *s = strchr(tp->name, ':');
+        if (s)
+          soap_utilize_ns(soap, tp->name, s - tp->name);
+      }
+    }
+    for (np = soap->nlist; np; np = np->next)
+    { if (np->index == 1 && np->ns)
+      { sprintf(soap->tmpbuf, "xmlns:%s", np->id);
+        soap_set_attr(soap, soap->tmpbuf, np->ns);
+        np->index = 2;
+      }
+    }
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible)
+    { if (soap_send(soap, " ") || soap_send(soap, tp->name))
+        return soap->error;
+      if (tp->visible == 2 && tp->value)
+        if (soap_send_raw(soap, "=\"", 2)
+	 || soap_string_out(soap, tp->value, 1)
+	 || soap_send_raw(soap, "\"", 1))
+          return soap->error;
+      tp->visible = 0;
+    }
+  }
+  if (tag)
+  { 
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { if (soap_send_raw(soap, ">", 1)
+       || soap_element_end_out(soap, tag))
+        return soap->error;
+    }
+    else
+#endif
+    soap->level--;	/* decrement level just before /> */
+    if (soap_send_raw(soap, "/>", 2))
+      return soap->error;
+    return SOAP_OK;
+  }
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_out(struct soap *soap, const char *tag)
+{ if (*tag == '-')
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element ending tag='%s'\n", tag));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+    soap_pop_ns(soap);
+  if (soap->mode & SOAP_XML_INDENT)
+  { if (!soap->body)
+    { if (soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+    }
+    soap->body = 0;
+  }
+#endif
+  if (soap_send_raw(soap, "</", 2)
+   || soap_send(soap, tag))
+    return soap->error;
+  soap->level--;	/* decrement level just before > */
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_ref(struct soap *soap, const char *tag, int id, int href)
+{ register int n = 0;
+  if (soap->version == 2)
+    n = 1;
+  sprintf(soap->href, "#_%d", href);
+  return soap_element_href(soap, tag, id, "href" + n, soap->href + n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_href(struct soap *soap, const char *tag, int id, const char *ref, const char *val)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element '%s' reference %s='%s'\n", tag, ref, val));
+  if (soap_element(soap, tag, id, NULL)
+   || soap_attribute(soap, ref, val)
+   || soap_element_start_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_null(struct soap *soap, const char *tag, int id, const char *type)
+{ struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (tp->visible)
+      break;
+  if (tp || (soap->version == 2 && soap->position > 0) || id > 0 || (soap->mode & SOAP_XML_NIL))
+  { if (soap_element(soap, tag, id, type))
+      return soap->error;
+    if (soap->part != SOAP_IN_HEADER && soap->encodingStyle)
+      if (soap_attribute(soap, "xsi:nil", "true"))
+        return soap->error;
+    return soap_element_start_end_out(soap, tag);
+  }
+  soap->null = 1;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_id(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, int n, const char *type, int t) 
+{ if (!p || (a && !a->__ptr))
+  { soap_element_null(soap, tag, id, type);
+    return -1;
+  }
+#ifndef WITH_NOIDREF
+  if (soap->mode & SOAP_XML_TREE)
+    return 0;
+  if (id < 0)
+  { struct soap_plist *pp;
+    if (a)
+      id = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+    else
+      id = soap_pointer_lookup(soap, p, t, &pp);
+    if (id)
+    { if (soap_is_embedded(soap, pp))
+      { soap_element_ref(soap, tag, 0, id);
+        return -1;
+      }
+      if (soap_is_single(soap, pp))
+        return 0;
+      soap_set_embedded(soap, pp);
+    }
+  }
+  return id;
+#else
+  return 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_result(struct soap *soap, const char *tag)
+{ if (soap->version == 2 && soap->encodingStyle)
+    if (soap_element(soap, "SOAP-RPC:result", 0, NULL)
+     || soap_attribute(soap, "xmlns:SOAP-RPC", soap_rpc)
+     || soap_element_start_end_out(soap, NULL)
+     || soap_string_out(soap, tag, 0)
+     || soap_element_end_out(soap, "SOAP-RPC:result"))
+      return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attribute(struct soap *soap, const char *name, const char *value)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+    a->next = soap->dom->atts;
+    a->nstr = NULL;
+    a->name = soap_strdup(soap, name);
+    a->data = soap_strdup(soap, value);
+    a->wide = NULL;
+    a->soap = soap;
+    soap->dom->atts = a;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { /* TODO: consider using this code to handle default namespace
+    if (!strncmp(name, "xmlns", 5) && (name[5] == ':' || name[5] == '\0'))
+    { if (name[5] == ':')
+        soap_push_ns(soap, name + 6, value, 0);
+      else
+        soap_push_ns(soap, "", value, 0);
+    }
+    */
+    if (!strncmp(name, "xmlns:", 6))
+      soap_push_ns(soap, name + 6, value, 0);
+    else if (soap_set_attr(soap, name, value))
+      return soap->error;
+  }
+  else
+#endif
+  { if (soap_send(soap, " ") || soap_send(soap, name))
+      return soap->error;
+    if (value)
+      if (soap_send_raw(soap, "=\"", 2)
+       || soap_string_out(soap, value, 1)
+       || soap_send_raw(soap, "\"", 1))
+        return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_in(struct soap *soap, const char *tag, int nillable)
+{ if (!soap_peek_element(soap))
+  { if (soap->other)
+      return soap->error = SOAP_TAG_MISMATCH;
+    if (tag && *tag == '-')
+      return SOAP_OK;
+    if (!(soap->error = soap_match_tag(soap, soap->tag, tag)))
+    { soap->peeked = 0;
+      if (soap->body)
+        soap->level++;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"" ));
+      if (!nillable && soap->null && (soap->mode & SOAP_XML_STRICT))
+        return soap->error = SOAP_NULL;
+    }
+  }
+  else if (soap->error == SOAP_NO_TAG && tag && *tag == '-')
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_in(struct soap *soap, const char *tag)  
+{ register soap_wchar c;
+  register char *s;
+  register const char *t;
+  register int n = 0;
+  if (tag && *tag == '-')
+    return SOAP_OK;
+  soap->level--;
+  soap_pop_namespace(soap);
+#ifdef WITH_DOM
+  /* this whitespace or mixed content is not insignificant for DOM */
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!soap->peeked && !soap_string_in(soap, 3, -1, -1))
+      return soap->error;
+    if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  if (soap->peeked)
+  { if (soap->error == SOAP_NO_TAG)
+      soap->error = SOAP_OK;
+    if (*soap->tag)
+      n++;
+    soap->peeked = 0;
+  }
+  do
+  { while (((c = soap_get(soap)) != SOAP_TT))
+    { if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      if (c == SOAP_LT)
+        n++;
+      else if (c == '/')
+      { c = soap_get(soap);
+        if (c == SOAP_GT)
+	  n--;
+        else
+	  soap_unget(soap, c);
+      }
+    }
+  } while (n--);
+  s = soap->tag;
+  while (soap_notblank(c = soap_get(soap)))
+    *s++ = (char)c;
+  *s = '\0';
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  while (soap_blank(c))
+    c = soap_get(soap);
+  if (c != SOAP_GT)
+    return soap->error = SOAP_SYNTAX_ERROR;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:""));
+  if (!tag || !*tag)
+    return SOAP_OK;
+  if ((s = strchr(soap->tag, ':')))
+    s++;
+  else
+    s = soap->tag;
+  if ((t = strchr(tag, ':')))
+    t++;
+  else
+    t = tag;
+  if (!SOAP_STRCMP(s, t))
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element tag name does not match\n"));
+  return soap->error = SOAP_SYNTAX_ERROR;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_attr_value(struct soap *soap, const char *name, int flag)
+{ register struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (!soap_match_tag(soap, tp->name, name))
+      break;
+  if (tp && tp->visible == 2)
+  { if (flag == 2 && (soap->mode & SOAP_XML_STRICT))
+      soap->error = SOAP_PROHIBITED;
+    else
+      return tp->value;
+  }
+  else if (flag == 1 && (soap->mode & SOAP_XML_STRICT))
+    soap->error = SOAP_REQUIRED;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_attr(struct soap *soap, const char *name, const char *value)
+{ register struct soap_attribute *tp;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set attribute %s='%s'\n", name, value?value:""));
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (!strcmp(tp->name, name))
+      break;
+  }
+  if (!tp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute %s\n", name));
+    if (!(tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(name))))
+      return soap->error = SOAP_EOM;
+    tp->ns = NULL;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { struct soap_attribute **tpp = &soap->attributes;
+      const char *s = strchr(name, ':');
+      if (!strncmp(name, "xmlns", 5))
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) || strcmp((*tpp)->name + 5, name + 5) > 0)
+            break;
+      }
+      else if (!s)
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) && ((*tpp)->ns || strcmp((*tpp)->name, name) > 0))
+            break;
+      }
+      else
+      { int k;
+        for (; *tpp; tpp = &(*tpp)->next)
+	{ if (!strncmp((*tpp)->name, "xmlns:", 6) && !strncmp((*tpp)->name + 6, name, s - name) && !(*tpp)->name[6 + s - name])
+	  { if (!tp->ns)
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Canonicalization: prefix %s=%p(%s)\n", name, (*tpp)->ns, (*tpp)->ns));
+	      tp->ns = (*tpp)->ns;
+	    }
+	  }
+          else if (strncmp((*tpp)->name, "xmlns", 5) && (*tpp)->ns && tp->ns && ((k = strcmp((*tpp)->ns, tp->ns)) > 0 || (!k && strcmp((*tpp)->name, name) > 0)))
+            break;
+        }
+      }
+      tp->next = *tpp;
+      *tpp = tp;
+    }
+    else
+#endif
+    { tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    strcpy(tp->name, name);
+    tp->value = NULL;
+  }
+  else if (tp->visible)
+  { return SOAP_OK;
+  }
+  else if (value && tp->value && tp->size <= strlen(value))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute value of %s (free %p)\n", name, tp->value));
+    SOAP_FREE(soap, tp->value);
+    tp->value = NULL;
+    tp->ns = NULL;
+  }
+  if (value)
+  { if (!tp->value)
+    { tp->size = strlen(value) + 1;
+      if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+        return soap->error = SOAP_EOM;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute value of %s (%p)\n", tp->name, tp->value));
+    }
+    strcpy(tp->value, value);
+    if (!strncmp(tp->name, "xmlns:", 6))
+      tp->ns = tp->value;
+    tp->visible = 2;
+#ifndef WITH_LEAN
+    if (!strcmp(name, "wsu:Id"))
+    { soap->part = SOAP_BEGIN_SECURITY;
+      strncpy(soap->id, value, sizeof(soap->id));
+      soap->id[sizeof(soap->id)-1] = '\0';
+    }
+#endif
+  }
+  else
+    tp->visible = 1;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_attr(struct soap *soap)
+{ register struct soap_attribute *tp;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_CANONICAL))
+  { while (soap->attributes)
+    { tp = soap->attributes->next;
+      SOAP_FREE(soap, soap->attributes->value);
+      SOAP_FREE(soap, soap->attributes);
+      soap->attributes = tp;
+    }
+  }
+  else
+#endif
+  { for (tp = soap->attributes; tp; tp = tp->next)
+      tp->visible = 0;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d)
+{ register size_t i;
+  for (i = 0; i < n; i++)
+  { register soap_wchar c = soap_get(soap);
+    switch (c)
+    {
+    case SOAP_TT:
+      *s++ = '<';
+      soap_unget(soap, '/');
+      break;
+    case SOAP_LT:
+      *s++ = '<';
+      break;
+    case SOAP_GT:
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '>';
+      break;
+    case SOAP_QT:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '"';
+      break;
+    case SOAP_AP:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '\'';
+      break;
+    case '\t':
+    case '\n':
+    case '\r':
+    case ' ':
+    case '/':
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+    default:
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+  }
+  return soap->error = SOAP_EOM;
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_store_lab(struct soap *soap, const char *s, size_t n)
+{ soap->labidx = 0;
+  return soap_append_lab(soap, s, n);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_append_lab(struct soap *soap, const char *s, size_t n)
+{ if (soap->labidx + n >= soap->lablen)
+  { register char *t = soap->labbuf;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enlarging look-aside buffer to append data, old size=%lu", (unsigned long)soap->lablen));
+    if (soap->lablen == 0)
+      soap->lablen = SOAP_LABLEN;
+    while (soap->labidx + n >= soap->lablen)
+      soap->lablen <<= 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, ", new size=%lu\n", (unsigned long)soap->lablen));
+    soap->labbuf = (char*)SOAP_MALLOC(soap, soap->lablen);
+    if (!soap->labbuf)
+    { if (t)
+        SOAP_FREE(soap, t);
+      return soap->error = SOAP_EOM;
+    }
+    if (t)
+    { memcpy(soap->labbuf, t, soap->labidx);
+      SOAP_FREE(soap, t);
+    }
+  }
+  if (s)
+  { memcpy(soap->labbuf + soap->labidx, s, n);
+    soap->labidx += n;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_peek_element(struct soap *soap)
+{
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att = NULL;
+  register char *lead = NULL;
+#endif
+  register struct soap_attribute *tp;
+  const char *t;
+  register char *s;
+  register soap_wchar c;
+  register int i;
+  if (soap->peeked)
+  { if (!*soap->tag)
+      return soap->error = SOAP_NO_TAG;
+    return SOAP_OK;
+  }
+  soap->peeked = 1;
+  c = soap_getutf8(soap);
+#ifdef WITH_DOM
+  /* whitespace leading to start tag is not insignificant for DOM */
+  if (soap_blank(c))
+  { soap->labidx = 0;
+    do
+    { if (soap_append_lab(soap, NULL, 0))
+        return SOAP_EOM;
+      s = soap->labbuf + soap->labidx;
+      i = soap->lablen - soap->labidx;
+      soap->labidx = soap->lablen;
+      while (soap_blank(c) && i--)
+      { *s++ = c;
+        c = soap_getutf8(soap);
+      }
+    }
+    while (soap_blank(c));
+    *s = '\0';
+    lead = soap_strdup(soap, soap->labbuf);
+  }
+#else
+  while (soap_blank(c))
+    c = soap_getutf8(soap);
+#endif
+  if (c != SOAP_LT)
+  { *soap->tag = '\0';
+    if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, c);
+#ifdef WITH_DOM
+    /* whitespace leading to end tag is not insignificant for DOM */
+    if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+      soap->dom->tail = soap_strdup(soap, lead);
+#endif
+    return soap->error = SOAP_NO_TAG;
+  }
+  s = soap->tag;
+  do c = soap_get1(soap);
+  while (soap_blank(c));
+  i = sizeof(soap->tag);
+  while (c != '>' && c != '/' && soap_notblank(c))
+  { if (--i > 0)
+      *s++ = (char)c;
+    c = soap_get1(soap);
+  }
+  while (soap_blank(c))
+    c = soap_get1(soap);
+  *s = '\0';
+  soap->id[0] = '\0';
+  soap->href[0] = '\0';
+  soap->type[0] = '\0';
+  soap->arrayType[0] = '\0';
+  soap->arraySize[0] = '\0';
+  soap->arrayOffset[0] = '\0';
+  soap->other = 0;
+  soap->root = -1;
+  soap->position = 0;
+  soap->null = 0;
+  soap->mustUnderstand = 0;
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt;
+    elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->next = NULL;
+    elt->nstr = NULL;
+    elt->name = soap_strdup(soap, soap->tag);
+    elt->prnt = soap->dom;
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->type = 0;
+    elt->node = NULL;
+    elt->head = lead;
+    elt->tail = NULL;
+    elt->soap = soap;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+    att = &elt->atts;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+    tp->visible = 0;
+  while ((int)c != EOF && c != '>' && c != '/')
+  { s = soap->tmpbuf;
+    i = sizeof(soap->tmpbuf);
+    while (c != '=' && c != '>' && c != '/' && soap_notblank(c))
+    { if (--i > 0)
+        *s++ = (char)c;
+      c = soap_get1(soap);
+    }
+    *s = '\0';
+    if (i == sizeof(soap->tmpbuf))
+      return soap->error = SOAP_SYNTAX_ERROR;
+#ifdef WITH_DOM
+    /* add attribute name to dom */
+    if (att)
+    { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+       if (!*att)
+         return soap->error = SOAP_EOM;
+       (*att)->next = NULL;
+       (*att)->nstr = NULL;
+       (*att)->name = soap_strdup(soap, soap->tmpbuf);
+       (*att)->data = NULL;
+       (*att)->wide = NULL;
+       (*att)->soap = soap;
+    }
+#endif
+    if (!strncmp(soap->tmpbuf, "xmlns", 5))
+    { if (soap->tmpbuf[5] == ':')
+      { soap->tmpbuf[5] = '\0';
+        t = soap->tmpbuf + 6;
+      }
+      else if (soap->tmpbuf[5])
+        t = NULL;
+      else
+        t = SOAP_STR_EOS;
+    }
+    else
+      t = NULL;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (!SOAP_STRCMP(tp->name, soap->tmpbuf))
+        break;
+    }
+    if (!tp)
+    { tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(soap->tmpbuf));
+      if (!tp)
+        return soap->error = SOAP_EOM;
+      strcpy(tp->name, soap->tmpbuf);
+      tp->value = NULL;
+      tp->size = 0;
+      tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    while (soap_blank(c))
+      c = soap_get1(soap);
+    if (c == '=')
+    { do c = soap_getutf8(soap);
+      while (soap_blank(c));
+      if (c != SOAP_QT && c != SOAP_AP)
+      { soap_unget(soap, c);
+        c = ' '; /* blank delimiter */
+      }
+      if (soap_getattrval(soap, tp->value, tp->size, c))
+      {
+#ifdef WITH_FAST
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+	if (soap_store_lab(soap, tp->value, tp->size))
+	  return soap->error;
+	if (tp->value)
+	  SOAP_FREE(soap, tp->value);
+	for (;;)
+	{ if (soap_getattrval(soap, soap->labbuf + soap->labidx, soap->lablen - soap->labidx, c))
+	  { if (soap->error != SOAP_EOM)
+	      return soap->error;
+            soap->error = SOAP_OK;
+	    soap->labidx = soap->lablen;
+	    if (soap_append_lab(soap, NULL, 0))
+	      return soap->error;
+	  }
+	  else
+	    break;
+	}
+	if (soap->labidx)
+          tp->size = soap->lablen;
+	else
+	{ tp->size = strlen(soap->labbuf) + 1;
+          if (tp->size < SOAP_LABLEN)
+	    tp->size = SOAP_LABLEN;
+        }
+	if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+	  return soap->error = SOAP_EOM;
+        strcpy(tp->value, soap->labbuf);
+#else
+	size_t n;
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+        if (soap_new_block(soap))
+          return soap->error;
+        for (;;)
+        { if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+            return soap->error;
+          if (soap_getattrval(soap, s, SOAP_BLKLEN, c))
+          { if (soap->error != SOAP_EOM)
+              return soap->error;
+            soap->error = SOAP_OK;
+          }
+          else
+            break;
+        }
+	n = tp->size + soap->blist->size;
+        if (!(s = (char*)SOAP_MALLOC(soap, n)))
+          return soap->error = SOAP_EOM;
+        if (tp->value)
+        { memcpy(s, tp->value, tp->size);
+          SOAP_FREE(soap, tp->value);
+        }
+        soap_save_block(soap, s + tp->size, 0);
+        tp->value = s;
+        tp->size = n;
+#endif
+      }
+      do c = soap_get1(soap);
+      while (soap_blank(c));
+      tp->visible = 2; /* seen this attribute w/ value */
+#ifdef WITH_DOM
+      if (att)
+        (*att)->data = soap_strdup(soap, tp->value);
+#endif
+    }
+    else
+      tp->visible = 1; /* seen this attribute w/o value */
+#ifdef WITH_DOM
+    if (att)
+      att = &(*att)->next;
+#endif
+    if (t && tp->value)
+    { if (soap_push_namespace(soap, t, tp->value))
+        return soap->error;
+      tp->visible = 0;
+    }
+  }
+#ifdef WITH_DOM
+  if (att)
+  { soap->dom->nstr = soap_current_namespace(soap, soap->tag);
+    for (att = &soap->dom->atts; *att; att = &(*att)->next)
+      (*att)->nstr = soap_current_namespace(soap, (*att)->name);
+  }
+#endif
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  if (!(soap->body = (c != '/')))
+    do c = soap_get1(soap);
+    while (soap_blank(c));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { if (!soap->body && soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible && tp->value)
+    { if (!strcmp(tp->name, "id"))
+      { *soap->id = '#';
+        strncpy(soap->id + 1, tp->value, sizeof(soap->id) - 2);
+        soap->id[sizeof(soap->id)-1] = '\0';
+      }
+      else if (!strcmp(tp->name, "href"))
+      { strncpy(soap->href, tp->value, sizeof(soap->href) - 1);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if ((soap->version == 2 || (soap->mode & SOAP_XML_GRAPH)) && !strcmp(tp->name, "ref"))
+      { *soap->href = '#';
+        strncpy(soap->href + 1, tp->value, sizeof(soap->href) - 2);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if (!soap_match_tag(soap, tp->name, "xsi:type"))
+      { strncpy(soap->type, tp->value, sizeof(soap->type) - 1);
+        soap->type[sizeof(soap->type)-1] = '\0';
+      }
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arrayType"))
+      { s = soap_strrchr(tp->value, '[');
+        if (s && (size_t)(s - tp->value) < sizeof(soap->arrayType))
+        { strncpy(soap->arrayType, tp->value, s - tp->value);
+          soap->arrayType[s - tp->value] = '\0';
+          strncpy(soap->arraySize, s, sizeof(soap->arraySize) - 1);
+        }
+        else
+          strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+        soap->arraySize[sizeof(soap->arrayType)-1] = '\0';
+        soap->arrayType[sizeof(soap->arrayType)-1] = '\0';
+      }
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:itemType"))
+        strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arraySize"))
+        strncpy(soap->arraySize, tp->value, sizeof(soap->arraySize) - 1);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:offset"))
+        strncpy(soap->arrayOffset, tp->value, sizeof(soap->arrayOffset));
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:position"))
+        soap->position = soap_getposition(tp->value, soap->positions);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:root"))
+        soap->root = ((!strcmp(tp->value, "1") || !strcmp(tp->value, "true")));
+      else if ((soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENV:actor"))
+            || (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENV:role")))
+      { if ((!soap->actor || strcmp(soap->actor, tp->value))
+         && strcmp(tp->value, "http://schemas.xmlsoap.org/soap/actor/next")
+         && strcmp(tp->value, "http://www.w3.org/2003/05/soap-envelope/role/next"))
+          soap->other = 1;
+      }
+      else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:mustUnderstand")
+            && (!strcmp(tp->value, "1") || !strcmp(tp->value, "true")))
+        soap->mustUnderstand = 1;
+      else if ((!soap_match_tag(soap, tp->name, "xsi:null")
+             || !soap_match_tag(soap, tp->name, "xsi:nil"))
+            && (!strcmp(tp->value, "1")
+             || !strcmp(tp->value, "true")))
+        soap->null = 1;
+    }
+  }
+  return soap->error = SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_retry(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_revert(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_revert(struct soap *soap)
+{ if (!soap->peeked)
+  { soap->peeked = 1;
+    if (soap->body)
+      soap->level--;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reverting last element (level=%u)\n", soap->level));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_string_out(struct soap *soap, const char *s, int flag)
+{ register const char *t;
+  register soap_wchar c;
+  register soap_wchar mask = 0xFFFFFF80UL;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_strdup(soap, s);
+    return SOAP_OK;
+  }
+#endif
+  if (soap->mode & SOAP_C_UTFSTRING)
+    mask = 0;
+  t = s;
+  while ((c = *t++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#x9;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xA;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 13:
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xD;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '&':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&amp;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '<':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&lt;", 4))
+        return soap->error;
+      s = t;
+      break;
+    case '>':
+      if (!flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&gt;", 4))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case '"':
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&quot;", 6))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    default:
+#ifndef WITH_LEANER
+#ifdef HAVE_MBTOWC
+      if (soap->mode & SOAP_C_MBSTRING)
+      { wchar_t wc;
+        register int m = mbtowc(&wc, t - 1, MB_CUR_MAX);
+        if (m > 0 && wc != c)
+        { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, wc))
+            return soap->error;
+	  s = t += m - 1;
+	  continue;
+        }
+      }
+#endif
+#endif
+      if (c & mask)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, (unsigned char)c))
+          return soap->error;
+        s = t;
+      }
+    }
+  }
+  return soap_send_raw(soap, s, t - s - 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_string_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ register char *s;
+  char *t = NULL;
+  register size_t i;
+  register long l = 0;
+  register int n = 0;
+  register int m = 0;
+  register soap_wchar c;
+#if !defined(WITH_LEANER) && defined(HAVE_WCTOMB)
+  char buf[MB_LEN_MAX > 8 ? MB_LEN_MAX : 8];
+#else
+  char buf[8];
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+#ifndef WITH_LEAN
+      t = soap->tmpbuf;
+      t[0] = '<';
+      strncpy(t + 1, soap->tag, sizeof(soap->tmpbuf) - 1);
+      strncat(t, ">", sizeof(soap->tmpbuf));
+      m = strlen(soap->tag) + 2;
+#endif
+    }
+  }
+#ifdef WITH_CDATA
+  if (!flag)
+  { register int state = 0;
+#ifdef WITH_FAST
+    soap->labidx = 0;			/* use look-aside buffer */
+#else
+    if (soap_new_block(soap))
+      return NULL;
+#endif
+    for (;;)
+    { 
+#ifdef WITH_FAST
+      register size_t k;
+      if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+        return NULL;
+      s = soap->labbuf + soap->labidx;	/* space to populate */
+      k = soap->lablen - soap->labidx;	/* number of bytes available */
+      soap->labidx = soap->lablen;	/* claim this space */
+#else
+      register size_t k = SOAP_BLKLEN;
+      if (!(s = (char*)soap_push_block(soap, k)))
+        return NULL;
+#endif
+      for (i = 0; i < k; i++)
+      { if (m > 0)
+        { *s++ = *t++;	/* copy multibyte characters */
+	  m--;
+          continue;
+        }
+        c = soap_getchar(soap);
+	if ((int)c == EOF)
+          goto end;
+        if (c >= 0x80 && !(soap->mode & SOAP_ENC_LATIN))
+        { soap_unget(soap, c);
+	  c = soap_getutf8(soap);
+	  if (soap->mode & SOAP_C_UTFSTRING)
+          { if ((c & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+            { c &= 0x7FFFFFFF;
+              t = buf;
+              if (c < 0x0800)
+                *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+              else
+              { if (c < 0x010000)
+                  *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+                else
+                { if (c < 0x200000)
+                    *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+                  else
+                  { if (c < 0x04000000)
+                      *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                    else
+                    { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                      *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                    }
+                    *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+                  }     
+                  *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+              }
+              *t++ = (char)(0x80 | (c & 0x3F));
+	      m = (int)(t - buf) - 1;
+              t = buf;
+              *s++ = *t++;
+              continue;
+	    }
+          }
+        }
+	switch (state)
+        { case 1:
+            if (c == ']')
+	      state = 4;
+	    *s++ = c;
+	    continue;
+	  case 2:
+	    if (c == '-')
+              state = 6;
+	    *s++ = c;
+	    continue;
+	  case 3:
+	    if (c == '?')
+	      state = 8;
+	    *s++ = c;
+	    continue;
+          /* CDATA */
+	  case 4:
+	    if (c == ']')
+              state = 5;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+	  case 5:
+	    if (c == '>')
+	      state = 0;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+          /* comment */
+          case 6:
+            if (c == '-')
+	      state = 7;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          case 7:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          /* PI */
+	  case 8:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 3;
+	    *s++ = c;
+	    continue;
+        }
+        switch (c)
+        {
+        case '/':
+          if (n > 0)
+          { c = soap_getchar(soap);
+            if (c == '>')
+              n--;
+            soap_unget(soap, c);
+          }
+          *s++ = '/';
+          break;
+        case '<':
+	  c = soap_getchar(soap);
+	  if (c == '/')
+	  { if (n == 0)
+	    { c = SOAP_TT;
+	      goto end;
+	    }
+	    n--;
+	  }
+	  else if (c == '!')
+	  { c = soap_getchar(soap);
+	    if (c == '[')
+            { do c = soap_getchar(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                 goto end;
+	      t = (char*)"![CDATA[";
+	      m = 8;
+	      state = 1;
+	    }
+            else if (c == '-')
+	    { if ((c = soap_getchar(soap)) == '-')
+	        state = 2;
+	      t = (char*)"!-";
+	      m = 2;
+	      soap_unget(soap, c);
+	    }
+	    else
+	    { t = (char*)"!";
+	      m = 1;
+	      soap_unget(soap, c);
+	    }
+	    *s++ = '<';
+	    break;
+	  }
+	  else if (c == '?')
+	    state = 3;
+	  else
+	    n++;
+          soap_unget(soap, c);
+          *s++ = '<';
+          break;
+        case '>':
+          *s++ = '>';
+          break;
+        case '"':
+          *s++ = '"';
+          break;
+        default:
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+          if (soap->mode & SOAP_C_MBSTRING)
+          { m = wctomb(buf, c & 0x7FFFFFFF);
+            if (m >= 1 && m <= (int)MB_CUR_MAX)
+            { t = buf;
+              *s++ = *t++;
+              m--;
+            }
+            else
+            { *s++ = SOAP_UNKNOWN_CHAR;
+	      m = 0;
+	    }
+          }
+          else
+#endif
+#endif
+            *s++ = (char)(c & 0xFF);
+        }
+	l++;
+        if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+        { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+          soap->error = SOAP_LENGTH;
+          return NULL;
+        }
+      }
+    }
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;			/* use look-aside buffer */
+#else
+  if (soap_new_block(soap))
+    return NULL;
+#endif
+  for (;;)
+  { 
+#ifdef WITH_FAST
+    register size_t k;
+    if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+      return NULL;
+    s = soap->labbuf + soap->labidx;	/* space to populate */
+    k = soap->lablen - soap->labidx;	/* number of bytes available */
+    soap->labidx = soap->lablen;	/* claim this space */
+#else
+    register size_t k = SOAP_BLKLEN;
+    if (!(s = (char*)soap_push_block(soap, k)))
+      return NULL;
+#endif
+    for (i = 0; i < k; i++)
+    { if (m > 0)
+      { *s++ = *t++;	/* copy multibyte characters */
+        m--;
+        continue;
+      }
+      if (soap->mode & SOAP_C_UTFSTRING)
+      { if (((c = soap_get(soap)) & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+        { c &= 0x7FFFFFFF;
+          t = buf;
+          if (c < 0x0800)
+            *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+          else
+          { if (c < 0x010000)
+              *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+            else
+            { if (c < 0x200000)
+                *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+              else
+              { if (c < 0x04000000)
+                  *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                else
+                { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                  *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+              }     
+              *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+            }
+            *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+          }
+          *t++ = (char)(0x80 | (c & 0x3F));
+	  m = (int)(t - buf) - 1;
+          t = buf;
+          *s++ = *t++;
+          continue;
+        }
+      }
+      else
+        c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        t = (char*)"/";
+	m = 1;
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_get(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<' | 0x80000000:
+        if (flag)
+          *s++ = '<';
+        else
+        { *s++ = '&';
+          t = (char*)"lt;";
+	  m = 3;
+        }
+        break;
+      case '>' | 0x80000000:
+        if (flag)
+          *s++ = '>';
+        else
+        { *s++ = '&';
+          t = (char*)"gt;";
+	  m = 3;
+        }
+        break;
+      case '&' | 0x80000000:
+        if (flag)
+          *s++ = '&';
+        else
+        { *s++ = '&';
+          t = (char*)"amp;";
+	  m = 4;
+        }
+        break;
+      case '"' | 0x80000000:
+        if (flag)
+          *s++ = '"';
+        else
+        { *s++ = '&';
+          t = (char*)"quot;";
+	  m = 5;
+        }
+        break;
+      case '\'' | 0x80000000:
+        if (flag)
+          *s++ = '\'';
+        else
+        { *s++ = '&';
+          t = (char*)"apos;";
+	  m = 5;
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+        if (soap->mode & SOAP_C_MBSTRING)
+        { m = wctomb(buf, c & 0x7FFFFFFF);
+          if (m >= 1 && m <= (int)MB_CUR_MAX)
+          { t = buf;
+            *s++ = *t++;
+            m--;
+          }
+          else
+          { *s++ = SOAP_UNKNOWN_CHAR;
+	    m = 0;
+	  }
+        }
+        else
+#endif
+#endif
+          *s++ = (char)(c & 0xFF);
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+#ifdef WITH_FAST
+  t = soap_strdup(soap, soap->labbuf);
+#else
+  soap_size_block(soap, i+1);
+  t = soap_save_block(soap, NULL, 0);
+#endif
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (flag == 3)
+      soap->dom->tail = t;
+    else
+      soap->dom->data = t;
+  }
+#endif
+  if (flag == 2)
+    if (soap_s2QName(soap, t, &t))
+      return NULL;
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_wstring_out(struct soap *soap, const wchar_t *s, int flag)
+{ const char *t;
+  char tmp;
+  register soap_wchar c;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { wchar_t *r = (wchar_t*)s;
+    int n = 1;
+    while (*r++)
+      n++;
+    soap->dom->wide = r = (wchar_t*)soap_malloc(soap, n * sizeof(wchar_t));
+    while (n--)
+      *r++ = *s++;
+    return SOAP_OK;
+  }
+#endif
+  while ((c = *s++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+        t = "&#x9;";
+      else
+        t = "\t";
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+        t = "&#xA;";
+      else
+        t = "\n";
+      break;
+    case 13:
+      t = "&#xD;";
+      break;
+    case '&':
+      t = "&amp;";
+      break;
+    case '<':
+      t = "&lt;";
+      break;
+    case '>':
+      if (flag)
+        t = ">";
+      else
+	t = "&gt;";
+      break;
+    case '"':
+      if (flag)
+        t = "&quot;";
+      else
+        t = "\"";
+      break;
+    default:
+      if (c > 0 && c < 0x80)
+      { tmp = (char)c;
+        if (soap_send_raw(soap, &tmp, 1))
+          return soap->error;
+      }
+      else if (soap_pututf8(soap, (unsigned long)c))
+        return soap->error;
+      continue;
+    }
+    if (soap_send(soap, t))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t *
+SOAP_FMAC2
+soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ wchar_t *s;
+  register int i, n = 0;
+  register long l = 0;
+  register soap_wchar c;
+  const char *t = NULL;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading wide string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+    }
+  }
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { if (!(s = (wchar_t*)soap_push_block(soap, sizeof(wchar_t)*SOAP_BLKLEN)))
+      return NULL;
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { if (t)
+      { *s++ = (wchar_t)*t++;
+        if (!*t)
+          t = NULL;
+        continue;
+      }
+      c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        soap_unget(soap, '/');
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_getutf8(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<':
+        if (flag)
+          *s++ = (soap_wchar)'<';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "lt;";
+        }
+        break;
+      case '>':
+        if (flag)
+          *s++ = (soap_wchar)'>';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "gt;";
+        }
+        break;
+      case '"':
+        if (flag)
+          *s++ = (soap_wchar)'"';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "quot;";
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+        *s++ = (wchar_t)c & 0x7FFFFFFF;
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+  soap_size_block(soap, sizeof(wchar_t) * (i + 1));
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+  s = (wchar_t*)soap_save_block(soap, NULL, 0);
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->wide = s;
+#endif
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_int2s(struct soap *soap, int n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outint(struct soap *soap, const char *tag, int id, const int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2int(struct soap *soap, const char *s, int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (int)soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int *
+SOAP_FMAC2
+soap_inint(struct soap *soap, const char *tag, int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (int*)soap_id_enter(soap, soap->id, p, t, sizeof(int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(int), 0, NULL);
+  else if (p)
+  { if (soap_s2int(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_long2s(struct soap *soap, long n)
+{ sprintf(soap->tmpbuf, "%ld", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outlong(struct soap *soap, const char *tag, int id, const long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2long(struct soap *soap, const char *s, long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+long *
+SOAP_FMAC2
+soap_inlong(struct soap *soap, const char *tag, long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (long*)soap_id_enter(soap, soap->id, p, t, sizeof(long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(long), 0, NULL);
+  else if (p)
+  { if (soap_s2long(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_LONG642s(struct soap *soap, LONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_LONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outLONG64(struct soap *soap, const char *tag, int id, const LONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_LONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2LONG64(struct soap *soap, const char *s, LONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOLL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoll(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_LONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+LONG64 *
+SOAP_FMAC2
+soap_inLONG64(struct soap *soap, const char *tag, LONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (LONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(LONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (LONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(LONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2LONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_byte2s(struct soap *soap, char n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outbyte(struct soap *soap, const char *tag, int id, const char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2byte(struct soap *soap, const char *s, char *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -128 || n > 127)
+      soap->error = SOAP_TYPE;
+    *p = (char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_inbyte(struct soap *soap, const char *tag, char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (char*)soap_id_enter(soap, soap->id, p, t, sizeof(char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(char), 0, NULL);
+  else if (p)
+  { if (soap_s2byte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_short2s(struct soap *soap, short n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outshort(struct soap *soap, const char *tag, int id, const short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2short(struct soap *soap, const char *s, short *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -32768 || n > 32767)
+      soap->error = SOAP_TYPE;
+    *p = (short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+short *
+SOAP_FMAC2
+soap_inshort(struct soap *soap, const char *tag, short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (short*)soap_id_enter(soap, soap->id, p, t, sizeof(short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(short), 0, NULL);
+  else if (p)
+  { if (soap_s2short(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_float2s(struct soap *soap, float n)
+{ const char *s;
+  if (soap_isnan((double)n))
+    s = "NaN";
+  else if (soap_ispinff(n))
+    s = "INF";
+  else if (soap_isninff(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->float_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outfloat(struct soap *soap, const char *tag, int id, const float *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_float2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2float(struct soap *soap, const char *s, float *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = FLT_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = FLT_NAN;
+    else
+    {
+/* On some systems, strtof appears to be broken or doesn't link: use with caution */
+#if defined(HAVE_STRTOF)
+      char *r;
+      *p = strtof((char*)s, &r);
+      if (*r)
+#elif defined(HAVE_STRTOD)
+      char *r;
+      *p = (float)strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%g", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static int soap_isnumeric(struct soap *soap, const char *type)
+{ if (soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":float")
+   && soap_match_tag(soap, soap->type, ":double")
+   && soap_match_tag(soap, soap->type, ":decimal")
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return SOAP_ERR;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+float *
+SOAP_FMAC2
+soap_infloat(struct soap *soap, const char *tag, float *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (float*)soap_id_enter(soap, soap->id, p, t, sizeof(float), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (float*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(float), 0, NULL);
+  else if (p)
+  { if (soap_s2float(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_double2s(struct soap *soap, double n)
+{ const char *s;
+  if (soap_isnan(n))
+    s = "NaN";
+  else if (soap_ispinfd(n))
+    s = "INF";
+  else if (soap_isninfd(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->double_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdouble(struct soap *soap, const char *tag, int id, const double *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_double2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2double(struct soap *soap, const char *s, double *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = DBL_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = DBL_NAN;
+    else
+    {
+#ifdef HAVE_STRTOD
+      char *r;
+      *p = strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%lg", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+double *
+SOAP_FMAC2
+soap_indouble(struct soap *soap, const char *tag, double *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (double*)soap_id_enter(soap, soap->id, p, t, sizeof(double), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (double*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(double), 0, NULL);
+  else if (p)
+  { if (soap_s2double(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedByte2s(struct soap *soap, unsigned char n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedByte(struct soap *soap, const char *tag, int id, const unsigned char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedByte(struct soap *soap, const char *s, unsigned char *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 255)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned char *
+SOAP_FMAC2
+soap_inunsignedByte(struct soap *soap, const char *tag, unsigned char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned char*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned char), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedByte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedShort2s(struct soap *soap, unsigned short n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedShort(struct soap *soap, const char *tag, int id, const unsigned short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedShort(struct soap *soap, const char *s, unsigned short *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 65535)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned short *
+SOAP_FMAC2
+soap_inunsignedShort(struct soap *soap, const char *tag, unsigned short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned short*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned short), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedShort(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedInt2s(struct soap *soap, unsigned int n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedInt(struct soap *soap, const char *tag, int id, const unsigned int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedInt(struct soap *soap, const char *s, unsigned int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (unsigned int)soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned int *
+SOAP_FMAC2
+soap_inunsignedInt(struct soap *soap, const char *tag, unsigned int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned int*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned int), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedInt(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedLong2s(struct soap *soap, unsigned long n)
+{ sprintf(soap->tmpbuf, "%lu", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedLong(struct soap *soap, const char *tag, int id, const unsigned long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedLong(struct soap *soap, const char *s, unsigned long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned long *
+SOAP_FMAC2
+soap_inunsignedLong(struct soap *soap, const char *tag, unsigned long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned long*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned long), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedLong(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_ULONG642s(struct soap *soap, ULONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_ULONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outULONG64(struct soap *soap, const char *tag, int id, const ULONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_ULONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2ULONG64(struct soap *soap, const char *s, ULONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOULL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoull(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_ULONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+ULONG64 *
+SOAP_FMAC2
+soap_inULONG64(struct soap *soap, const char *tag, ULONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (ULONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(ULONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (ULONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(ULONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2ULONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2string(struct soap *soap, const char *s, char **t)
+{ *t = NULL;
+  if (s)
+  { if (!(*t = soap_strdup(soap, s)))
+      return soap->error = SOAP_EOM;
+    if (!(soap->mode & (SOAP_ENC_LATIN | SOAP_C_UTFSTRING)))
+    { /* TODO: consider truncating UTF8 to ASCII for regular XML attribute strings? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2QName(struct soap *soap, const char *s, char **t)
+{ if (s)
+  { struct soap_nlist *np;
+    const char *p;
+    if (!strncmp(s, "xml:", 4))
+    { *t = soap_strdup(soap, s);
+      return SOAP_OK;
+    }
+    np = soap->nlist;
+    p = strchr(s, ':');
+    if (p)
+    { register int n = p - s;
+      while (np && (strncmp(np->id, s, n) || np->id[n]))
+        np = np->next;
+      p++;
+    }
+    else
+    { while (np && *np->id)
+        np = np->next;
+      p = s;
+    }
+    if (np)
+    { if (np->index >= 0 && soap->local_namespaces)
+      { register const char *q = soap->local_namespaces[np->index].id;
+        if (q)
+        { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(q) + 2)))
+            sprintf(*t, "%s:%s", q, p);
+          return SOAP_OK;
+        }
+      }
+      if (np->ns)
+      { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(np->ns) + 4)))
+          sprintf(*t, "\"%s\":%s", np->ns, p);
+        return SOAP_OK;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined (index=%d, URI=%s)\n", s, np->index, np->ns?np->ns:""));
+      return soap->error = SOAP_NAMESPACE; 
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined, assuming empty namespace\n", s));
+    if ((*t = (char*)soap_malloc(soap, strlen(p) + 4)))
+      sprintf(*t, "\"\":%s", p);
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_QName2s(struct soap *soap, const char *s)
+{ struct Namespace *p;
+  char *t;
+  int n;
+  if (!s || *s != '"')
+  {
+#ifndef WITH_LEAN
+    if (s && (soap->mode & SOAP_XML_CANONICAL))
+    { t = (char*)strchr(s, ':');
+      if (t)
+        soap_utilize_ns(soap, s, t - s);
+    }
+#endif
+    return s;
+  }
+  s++;
+  if ((p = soap->local_namespaces))
+  { for (; p->id; p++)
+    { if (p->ns)
+        if (!soap_tag_cmp(s, p->ns))
+          break;
+      if (p->in)
+        if (!soap_tag_cmp(s, p->in))
+          break;
+    }
+    if (p && p->id)
+    { s = strchr(s, '"');
+      if (s)
+      { t = (char*)soap_malloc(soap, strlen(p->id) + strlen(s));
+        strcpy(t, p->id);
+	strcat(t, s + 1);
+        return t;
+      }
+    }
+  }
+  t = (char*)strchr(s, '"');
+  if (t)
+    n = t - s;
+  else
+    n = 0;
+  t = soap_strdup(soap, s);
+  t[n] = '\0';
+  sprintf(soap->tmpbuf, "xmlns:_%d", soap->idnum++);
+  soap_set_attr(soap, soap->tmpbuf, t);
+  s = strchr(s, '"');
+  if (s)
+  { t = (char*)soap_malloc(soap, strlen(soap->tmpbuf) + strlen(s) - 6);
+    strcpy(t, soap->tmpbuf + 6);
+    strcat(t, s + 1);
+  }
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2wchar(struct soap *soap, const char *s, wchar_t **t)
+{ wchar_t *r;
+  if (!s)
+    *t = NULL;
+  else
+  { *t = r = (wchar_t*)soap_malloc(soap, sizeof(wchar_t) * (strlen(s) + 1));
+    if (!r)
+      return soap->error;
+    if (soap->mode & SOAP_ENC_LATIN)
+    { while (*s)
+        *r++ = (wchar_t)*s++;
+    }
+    else
+    { /* Convert UTF8 to wchar */
+      while (*s)
+      { register soap_wchar c, c1, c2, c3, c4;
+        c = *s++;
+        if (c < 0x80)
+	  *r++ = (wchar_t)c;
+	else
+        { c1 = (soap_wchar)*s++ & 0x3F;
+          if (c < 0xE0)
+            *r++ = (wchar_t)(((soap_wchar)(c & 0x1F) << 6) | c1);
+          else
+	  { c2 = (soap_wchar)*s++ & 0x3F;
+            if (c < 0xF0)
+              *r++ = (wchar_t)(((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2);
+            else
+	    { c3 = (soap_wchar)*s++ & 0x3F;
+              if (c < 0xF8)
+                *r++ = (wchar_t)(((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3);
+              else
+	      { c4 = (soap_wchar)*s++ & 0x3F;
+                if (c < 0xFC)
+                  *r++ = (wchar_t)(((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4);
+                else
+		  *r++ = (wchar_t)(((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(*s++ & 0x3F));
+              }
+            }
+          }
+        }
+      }
+    }
+    *r = L'\0';
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_wchar2s(struct soap *soap, const wchar_t *s)
+{ register soap_wchar c;
+  register char *r, *t;
+  const wchar_t *q = s;
+  size_t n = 0;
+  while ((c = *q++))
+  { if (c > 0 && c < 0x80)
+      n++;
+    else
+      n += 6;
+  }
+  r = t = (char*)soap_malloc(soap, n + 1);
+  if (r)
+  { /* Convert wchar to UTF8 */
+    while ((c = *s++))
+    { if (c > 0 && c < 0x80)
+        *t++ = (char)c;
+      else
+      { if (c < 0x0800)
+          *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+        else
+        { if (c < 0x010000)
+            *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+          else
+          { if (c < 0x200000)
+              *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+            else
+            { if (c < 0x04000000)
+                *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+              else
+              { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+              }
+              *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+            }     
+            *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+        }
+        *t++ = (char)(0x80 | (c & 0x3F));
+      }
+    }
+    *t = '\0';
+  }
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outstring(struct soap *soap, const char *tag, int id, char *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_string_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_instring(struct soap *soap, const char *tag, char **p, const char *type, int t, int flag, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_string_in(soap, flag, minlen, maxlen);
+    if (!*p || !(char*)soap_id_enter(soap, soap->id, *p, t, sizeof(char*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (char**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(char**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwstring(struct soap *soap, const char *tag, int id, wchar_t *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_wstring_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type, int t, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_wstring_in(soap, 1, minlen, maxlen);
+    if (!*p || !(wchar_t*)soap_id_enter(soap, soap->id, *p, t, sizeof(wchar_t*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (wchar_t**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(wchar_t**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static time_t
+soap_timegm(struct tm *T)
+{
+#if defined(HAVE_TIMEGM)
+  return timegm(T);
+#else
+  time_t t, g, z;
+#ifdef HAVE_GMTIME_R
+  struct tm tm, *tmp = &tm;
+#else
+  struct tm *tmp;
+#endif
+  t = mktime(T);
+  if (t == -1)
+    return -1;
+#ifdef HAVE_GMTIME_R
+  gmtime_r(&t, tmp);
+#else
+  tmp = gmtime(&t);
+#endif
+  tmp->tm_isdst = 0;
+  g = mktime(tmp);
+  if (g == -1)
+    return -1;
+  z = g - t;
+  return t - z;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_dateTime2s(struct soap *soap, time_t n)
+{ struct tm T, *pT = &T;
+#if defined(HAVE_GMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PGMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_PGMTIME)
+  if (gmtime(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GMTIME)
+  if ((pT = gmtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GETTIMEOFDAY)
+  struct timezone tz;
+  memset((void*)&tz, 0, sizeof(tz));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+#endif
+#elif defined(HAVE_FTIME)
+  struct timeb t;
+  memset((void*)&t, 0, sizeof(t));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+  /* The following defines were added for VxWorks*/
+# elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf+strlen(soap->tmpbuf), "%+03d:%02d", t.timezone/60, abs(t.timezone)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+# endif
+#elif defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#else
+  if ((pT = localtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#endif
+  else
+    strcpy(soap->tmpbuf, "1969-12-31T23:59:59Z");
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdateTime(struct soap *soap, const char *tag, int id, const time_t *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_dateTime2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2dateTime(struct soap *soap, const char *s, time_t *p)
+{ if (s)
+  { struct tm T;
+    char zone[16];
+    const char *t;
+    memset((void*)&T, 0, sizeof(T));
+    zone[sizeof(zone)-1] = '\0';
+    if (strchr(s, '-'))
+      t = "%d-%d-%dT%d:%d:%d%15s";
+    else if (strchr(s, ':'))
+      t = "%4d%2d%2dT%d:%d:%d%15s";
+    else /* parse non-XSD-standard alternative ISO 8601 format */
+      t = "%4d%2d%2dT%2d%2d%2d%15s";
+    sscanf(s, t, &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, zone);
+    if (T.tm_year == 1)
+      T.tm_year = 70;
+    else
+      T.tm_year -= 1900;
+    T.tm_mon--;
+    if (*zone)
+    { if (*zone == '.')
+      { for (s = zone + 1; *s; s++)
+          if (*s < '0' || *s > '9')
+            break;
+      }
+      else
+        s = zone;
+      if (*s == '+' || *s == '-')
+      { int h = 0, m = 0;
+        if (s[3] == ':')
+	{ sscanf(s, "%d:%d", &h, &m);
+	  if (h < 0)
+	    m = -m;
+	}
+	else
+	{ m = (int)atol(s);
+	  h = m / 100;
+	  m = m % 100;
+	}
+        T.tm_hour -= h;
+        T.tm_min -= m;
+      }
+      T.tm_isdst = 0;
+      *p = soap_timegm(&T);
+    }
+    else
+    { T.tm_isdst = -1;
+      *p = mktime(&T); /* no time zone: suppose it is localtime? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+time_t *
+SOAP_FMAC2
+soap_indateTime(struct soap *soap, const char *tag, time_t *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":dateTime"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (time_t*)soap_id_enter(soap, soap->id, p, t, sizeof(time_t), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (time_t*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(time_t), 0, NULL);
+  else if (p)
+  { if (soap_s2dateTime(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outliteral(struct soap *soap, const char *tag, char *const*p)
+{ int i;
+  const char *t = NULL;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p && *p)
+  { if (soap_send(soap, *p))
+      return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_inliteral(struct soap *soap, const char *tag, char **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_string_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwliteral(struct soap *soap, const char *tag, wchar_t *const*p)
+{ int i;
+  const char *t = NULL;
+  wchar_t c;
+  const wchar_t *s;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p)
+  { s = *p;
+    while ((c = *s++))
+      if (soap_pututf8(soap, (unsigned char)c))
+        return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwliteral(struct soap *soap, const char *tag, wchar_t **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_wstring_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_token(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF || soap_blank(c))
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_value(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  for (s--; i > 0; i--, s--)
+    if (!soap_blank(*s))
+      break;
+  s[1] = '\0';
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->data = soap_strdup(soap, soap->tmpbuf);
+#endif
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEANER) || !defined(WITH_NOHTTP)
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getline(struct soap *soap, char *s, int len)
+{ int i = len;
+  soap_wchar c = 0;
+  for (;;)
+  { while (--i > 0)
+    { c = soap_getchar(soap);
+      if (c == '\r' || c == '\n')
+        break;
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+    if (c != '\n')
+      c = soap_getchar(soap); /* got \r, now get \n */
+    if (c == '\n')
+    { *s = '\0';
+      if (i+1 == len) /* empty line: end of HTTP/MIME header */
+        break;
+      c = soap_unget(soap, soap_getchar(soap));
+      if (c != ' ' && c != '\t') /* HTTP line continuation? */
+        break;
+    }
+    else if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static size_t
+soap_count_attachments(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  register struct soap_multipart *content;
+  register size_t count = soap->count;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the message size with attachments, current count=%lu\n", (unsigned long)count));
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of DIME attachments\n"));
+    for (content = soap->dime.first; content; content = content->next)
+    { count += 12 + ((content->size+3)&(~3));
+      if (content->id)
+        count += ((strlen(content->id)+3)&(~3));
+      if (content->type)
+        count += ((strlen(content->type)+3)&(~3));
+      if (content->options)
+        count += ((((unsigned char)content->options[2] << 8) | ((unsigned char)content->options[3]))+7)&(~3);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of DIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary)
+  { register size_t n = strlen(soap->mime.boundary);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of MIME attachments\n"));
+    for (content = soap->mime.first; content; content = content->next)
+    { register const char *s;
+      /* count \r\n--boundary\r\n */
+      count += 6 + n;
+      /* count Content-Type: ...\r\n */
+      if (content->type)
+        count += 16 + strlen(content->type);
+      /* count Content-Transfer-Encoding: ...\r\n */
+      s = soap_str_code(mime_codes, content->encoding);
+      if (s)
+        count += 29 + strlen(s);
+      /* count Content-ID: ...\r\n */
+      if (content->id)
+        count += 14 + strlen(content->id);
+      /* count Content-Location: ...\r\n */
+      if (content->location)
+        count += 20 + strlen(content->location);
+      /* count Content-Description: ...\r\n */
+      if (content->description)
+        count += 23 + strlen(content->location);
+      /* count \r\n...content */
+      count += 2 + content->size;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of MIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+    /* count \r\n--boundary-- */
+    count += 6 + n;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New count is %lu bytes\n", (unsigned long)count));
+  return count;
+#else
+  return soap->count;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_putdimefield(struct soap *soap, const char *s, size_t n)
+{ if (soap_send_raw(soap, s, n))
+    return soap->error;
+  return soap_send_raw(soap, SOAP_STR_PADDING, -(long)n&3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_dime_option(struct soap *soap, unsigned short optype, const char *option)
+{ size_t n;
+  char *s = NULL;
+  if (option)
+  { n = strlen(option);
+    s = (char*)soap_malloc(soap, n + 5);
+    if (s)
+    { s[0] = optype >> 8;
+      s[1] = optype & 0xFF;
+      s[2] = n >> 8;
+      s[3] = n & 0xFF;
+      strcpy(s + 4, option);
+    }
+  }
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdimehdr(struct soap *soap)
+{ unsigned char tmp[12];
+  size_t optlen = 0, idlen = 0, typelen = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Put DIME header id='%s'\n", soap->dime.id?soap->dime.id:""));
+  if (soap->dime.options)
+    optlen = (((unsigned char)soap->dime.options[2] << 8) | ((unsigned char)soap->dime.options[3])) + 4;
+  if (soap->dime.id)
+    idlen = strlen(soap->dime.id);
+  if (soap->dime.type)
+    typelen = strlen(soap->dime.type);
+  tmp[0] = SOAP_DIME_VERSION | (soap->dime.flags & 0x7);
+  tmp[1] = soap->dime.flags & 0xF0;
+  tmp[2] = optlen >> 8;
+  tmp[3] = optlen & 0xFF;
+  tmp[4] = idlen >> 8;
+  tmp[5] = idlen & 0xFF;
+  tmp[6] = typelen >> 8;
+  tmp[7] = typelen & 0xFF;
+  tmp[8] = soap->dime.size >> 24;
+  tmp[9] = (soap->dime.size >> 16) & 0xFF;
+  tmp[10] = (soap->dime.size >> 8) & 0xFF;
+  tmp[11] = soap->dime.size & 0xFF;
+  if (soap_send_raw(soap, (char*)tmp, 12)
+   || soap_putdimefield(soap, soap->dime.options, optlen)
+   || soap_putdimefield(soap, soap->dime.id, idlen)
+   || soap_putdimefield(soap, soap->dime.type, typelen))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return SOAP_OK;
+  for (content = soap->dime.first; content; content = content->next)
+  { void *handle;
+    soap->dime.size = content->size;
+    soap->dime.id = content->id;
+    soap->dime.type = content->type;
+    soap->dime.options = content->options;
+    soap->dime.flags = SOAP_DIME_VERSION | SOAP_DIME_MEDIA;
+    if (soap->fdimereadopen && ((handle = soap->fdimereadopen(soap, (void*)content->ptr, content->id, content->type, content->options)) || soap->error))
+    { size_t size = content->size;
+      if (!handle)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadopen failed\n"));
+        return soap->error;
+      }
+      if (!content->size && ((soap->mode & SOAP_ENC_XML) || (soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_IO) == SOAP_IO_STORE))
+      { size_t chunksize = sizeof(soap->tmpbuf);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked streaming DIME\n"));
+        do 
+        { size = soap->fdimeread(soap, handle, soap->tmpbuf, chunksize);
+          DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread returned %lu bytes\n", (unsigned long)size));
+          if (size < chunksize)
+ 	  { soap->dime.flags &= ~SOAP_DIME_CF;
+            if (!content->next)
+              soap->dime.flags |= SOAP_DIME_ME;
+	  }
+          else
+            soap->dime.flags |= SOAP_DIME_CF;
+	  soap->dime.size = size;
+          if (soap_putdimehdr(soap)
+	   || soap_putdimefield(soap, soap->tmpbuf, size))
+            break;
+          if (soap->dime.id)
+ 	  { soap->dime.flags &= ~(SOAP_DIME_MB | SOAP_DIME_MEDIA);
+            soap->dime.id = NULL;
+            soap->dime.type = NULL;
+            soap->dime.options = NULL;
+          }  
+        } while (size >= chunksize);
+      }
+      else
+      { if (!content->next)
+          soap->dime.flags |= SOAP_DIME_ME;
+        if (soap_putdimehdr(soap))
+          return soap->error;
+        do
+        { size_t bufsize;
+	  if (size < sizeof(soap->tmpbuf))
+            bufsize = size;
+          else
+            bufsize = sizeof(soap->tmpbuf);
+          if (!(bufsize = soap->fdimeread(soap, handle, soap->tmpbuf, bufsize)))
+          { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread failed: insufficient data (%lu bytes remaining from %lu bytes)\n", (unsigned long)size, (unsigned long)soap->dime.size));
+            soap->error = SOAP_EOF;
+	    break;
+          }
+          if (soap_send_raw(soap, soap->tmpbuf, bufsize))
+            break;
+          size -= bufsize;
+        } while (size);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+        soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+      if (soap->fdimereadclose)
+        soap->fdimereadclose(soap, handle);
+    }
+    else
+    { if (!content->next)
+        soap->dime.flags |= SOAP_DIME_ME;
+      if (soap_putdimehdr(soap)
+       || soap_putdimefield(soap, (char*)content->ptr, content->size))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static char *
+soap_getdimefield(struct soap *soap, size_t n)
+{ register soap_wchar c;
+  register int i;
+  register char *s;
+  char *p = NULL;
+  if (n)
+  { p = (char*)soap_malloc(soap, n + 1);
+    if (p)
+    { s = p;
+      for (i = n; i > 0; i--)
+      { if ((int)(c = soap_get1(soap)) == EOF)
+        { soap->error = SOAP_EOF;
+          return NULL;
+        }
+        *s++ = (char)c;
+      }
+      *s = '\0';
+      if ((soap->error = soap_move(soap, -(long)n&3)))
+        return NULL;
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdimehdr(struct soap *soap)
+{ register soap_wchar c;
+  register char *s;
+  register int i;
+  unsigned char tmp[12];
+  size_t optlen, idlen, typelen;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return soap->error = SOAP_DIME_END;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME header\n"));
+  if (soap->dime.buflen || soap->dime.chunksize)
+  { if (soap_move(soap, (long)(soap->dime.size - soap_tell(soap))))
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, soap_getchar(soap)); /* skip padding and get hdr */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... From chunked\n"));
+    return SOAP_OK;
+  }
+  s = (char*)tmp;
+  for (i = 12; i > 0; i--)
+  { if ((int)(c = soap_getchar(soap)) == EOF)
+      return soap->error = SOAP_EOF;
+    *s++ = (char)c;
+  }
+  if ((tmp[0] & 0xF8) != SOAP_DIME_VERSION)
+    return soap->error = SOAP_DIME_MISMATCH;
+  soap->dime.flags = (tmp[0] & 0x7) | (tmp[1] & 0xF0);
+  optlen = (tmp[2] << 8) | tmp[3];
+  idlen = (tmp[4] << 8) | tmp[5];
+  typelen = (tmp[6] << 8) | tmp[7];
+  soap->dime.size = (tmp[8] << 24) | (tmp[9] << 16) | (tmp[10] << 8) | tmp[11];
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME size=%lu flags=0x%X\n", (unsigned long)soap->dime.size, soap->dime.flags));
+  if (!(soap->dime.options = soap_getdimefield(soap, optlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.id = soap_getdimefield(soap, idlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.type = soap_getdimefield(soap, typelen)) && soap->error)
+    return soap->error;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME id=%s, type=%s, options=%s\n", soap->dime.id?soap->dime.id:"", soap->dime.type?soap->dime.type:"", soap->dime.options?soap->dime.options+4:""));
+  if (soap->dime.flags & SOAP_DIME_ME)
+    soap->mode &= ~SOAP_ENC_DIME;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdime(struct soap *soap)
+{ while (soap->dime.flags & SOAP_DIME_CF)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap_move(soap, soap->dime.size))
+      return soap->error = SOAP_EOF;
+  }
+  if (soap_move(soap, ((soap->dime.size+3)&(~3))-soap_tell(soap)))
+    return soap->error = SOAP_EOF;
+  for (;;)
+  { register struct soap_multipart *content;
+    if (soap_getdimehdr(soap))
+      break;
+    if (soap->fdimewriteopen && ((soap->dime.ptr = (char*)soap->fdimewriteopen(soap, soap->dime.id, soap->dime.type, soap->dime.options)) || soap->error))
+    { const char *id, *type, *options;
+      size_t size, n;
+      if (!soap->dime.ptr)
+        return soap->error;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      for (;;)
+      { size = soap->dime.size;
+        for (;;)
+        { n = soap->buflen - soap->bufidx;
+          if (size < n)
+            n = size;
+          if ((soap->error = soap->fdimewrite(soap, (void*)soap->dime.ptr, soap->buf + soap->bufidx, n)))
+            break;
+	  size -= n;
+	  if (!size)
+	  { soap->bufidx += n;
+	    break;
+	  }
+	  if (soap_recv(soap))
+          { soap->error = SOAP_EOF;
+	    goto end;
+          }
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+        { soap->error = SOAP_EOF;
+	  break;
+        }
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          break;
+      }
+end:
+      if (soap->fdimewriteclose)
+        soap->fdimewriteclose(soap, (void*)soap->dime.ptr);
+      soap->dime.size = 0;
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else if (soap->dime.flags & SOAP_DIME_CF)
+    { const char *id, *type, *options;
+      register soap_wchar c;
+      register char *s;
+      register int i;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      if (soap_new_block(soap))
+        return SOAP_EOM;
+      for (;;)
+      { s = (char*)soap_push_block(soap, soap->dime.size);
+        if (!s)
+          return soap->error = SOAP_EOM;
+        for (i = soap->dime.size; i > 0; i--)
+        { if ((int)(c = soap_get1(soap)) == EOF)
+            return soap->error = SOAP_EOF;
+          *s++ = (char)c;
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+          return soap->error = SOAP_EOF;
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          return soap->error;
+      }
+      soap->dime.size = soap->blist->size++; /* allocate one more for '\0' */
+      if (!(soap->dime.ptr = soap_save_block(soap, NULL, 0)))
+        return soap->error;
+      soap->dime.ptr[soap->dime.size] = '\0'; /* force 0-terminated */
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else
+      soap->dime.ptr = soap_getdimefield(soap, soap->dime.size);
+    content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, soap->dime.ptr, soap->dime.size);
+    if (!content)
+      return soap->error = SOAP_EOM;
+    content->id = soap->dime.id;
+    content->type = soap->dime.type;
+    content->options = soap->dime.options;
+    soap_resolve_attachment(soap, content);
+    if (soap->error)
+      return soap->error;
+  }
+  if (soap->error != SOAP_DIME_END)
+    return soap->error;
+  return soap->error = SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmimehdr(struct soap *soap)
+{ struct soap_multipart *content;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  while (!*soap->msgbuf);
+  if (soap->msgbuf[0] == '-' && soap->msgbuf[1] == '-')
+  { char *s = soap->msgbuf + strlen(soap->msgbuf) - 1;
+    /* remove white space */
+    while (soap_blank(*s))
+      s--;
+    s[1] = '\0';
+    if (soap->mime.boundary)
+    { if (strcmp(soap->msgbuf + 2, soap->mime.boundary))
+        return soap->error = SOAP_MIME_ERROR;
+    }
+    else
+      soap->mime.boundary = soap_strdup(soap, soap->msgbuf + 2);
+    if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  if (soap_set_mime_attachment(soap, NULL, 0, SOAP_MIME_NONE, NULL, NULL, NULL, NULL))
+    return soap->error = SOAP_EOM;
+  content = soap->mime.last;
+  for (;;)
+  { register char *key = soap->msgbuf;
+    register char *val;
+    if (!*key)
+      break;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "MIME header: %s\n", key));
+    val = strchr(soap->msgbuf, ':');
+    if (val)
+    { *val = '\0';
+      do val++;
+      while (*val && *val <= 32);
+      if (!soap_tag_cmp(key, "Content-ID"))
+        content->id = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Location"))
+        content->location = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Disposition"))
+        content->id = soap_strdup(soap, soap_get_header_attribute(soap, val, "name"));
+      else if (!soap_tag_cmp(key, "Content-Type"))
+        content->type = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Description"))
+        content->description = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Transfer-Encoding"))
+        content->encoding = (enum soap_mime_encoding)soap_int_code(mime_codes, val, (long)SOAP_MIME_NONE);
+    }
+    if (soap_getline(soap, key, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmime(struct soap *soap)
+{ register soap_wchar c = 0;
+  if (!soap->mime.last)
+    return SOAP_OK;
+  for (;;)
+  { register size_t i, m = 0;
+    register char *s, *t = NULL;
+    struct soap_multipart *content = soap->mime.last;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Parsing MIME content id=%s type=%s\n", content->id?content->id:"", content->type?content->type:""));
+    if (soap_new_block(soap))
+      return soap->error = SOAP_EOM;
+    for (;;)
+    { register short flag = 0;
+      if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+        return soap->error = SOAP_EOM;
+      for (i = 0; i < SOAP_BLKLEN; i++)
+      { if (m > 0)
+        { *s++ = *t++;
+	  m--;
+	}
+	else
+        { if (!flag)
+	  { c = soap_get1(soap);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	  }
+	  if (flag || c == '\r')
+	  { t = soap->tmpbuf;
+	    memset(t, 0, sizeof(soap->tmpbuf));
+            strcpy(t, "\n--");
+            if (soap->mime.boundary)
+	      strncat(t, soap->mime.boundary, sizeof(soap->tmpbuf)-4);
+	    do c = soap_getchar(soap);
+	    while (c == *t++);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	    if (!*--t)
+	      goto end;
+	    *t = (char)c;
+	    flag = (c == '\r');
+	    m = t - soap->tmpbuf + 1 - flag;
+	    t = soap->tmpbuf;
+	    c = '\r';
+	  }
+	  *s++ = (char)c;
+        }
+      }
+    }
+end:
+    *s = '\0'; /* force 0-terminated */
+    content->size = soap_size_block(soap, i+1)-1;
+    content->ptr = soap_save_block(soap, NULL, 0);
+    soap_resolve_attachment(soap, content);
+    if (c == '-' && soap_getchar(soap) == '-')
+      break;
+    while (c != '\r' && (int)c != EOF && soap_blank(c))
+      c = soap_getchar(soap);
+    if (c != '\r' || soap_getchar(soap) != '\n')
+      return soap->error = SOAP_MIME_ERROR;
+    if (soap_getmimehdr(soap))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_match_cid(struct soap *soap, const char *s, const char *t)
+{ register size_t n;
+  if (!s)
+    return 1;
+  if (!strcmp(s, t))
+    return 0;
+  if (!strncmp(s, "cid:", 4))
+    s += 4;
+  n = strlen(t);
+  if (*t == '<')
+  { t++;
+    n -= 2;
+  }
+  if (!strncmp(s, t, n) && !s[n])
+    return 0;
+  soap_decode(soap->tmpbuf, sizeof(soap->tmpbuf), s, SOAP_STR_EOS);
+  if (!strncmp(soap->tmpbuf, t, n) && !soap->tmpbuf[n])
+    return 0;
+  return 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_resolve_attachment(struct soap *soap, struct soap_multipart *content)
+{ if (content->id)
+  { register struct soap_xlist **xp = &soap->xlist;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving attachment data for id=%s\n", content->id));
+    while (*xp)
+    { register struct soap_xlist *xq = *xp;
+      if (!soap_match_cid(soap, xq->id, content->id))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Found matching attachment %s for content id=%s\n", xq->id, content->id));
+	*xp = xq->next;
+        *xq->ptr = (unsigned char*)content->ptr;
+        *xq->size = (int)content->size;
+        *xq->type = (char*)content->type;
+	if (content->options)
+          *xq->options = (char*)content->options;
+        else
+          *xq->options = (char*)content->description;
+	SOAP_FREE(soap, xq);
+      }
+      else
+        xp = &(*xp)->next;
+    }
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmimehdr(struct soap *soap, struct soap_multipart *content)
+{ const char *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "MIME attachment type=%s\n", content->type?content->type:""));
+  if (soap_send3(soap, "\r\n--", soap->mime.boundary, "\r\n"))
+    return soap->error;
+  if (content->type && soap_send3(soap, "Content-Type: ", content->type, "\r\n"))
+    return soap->error;
+  s = soap_str_code(mime_codes, content->encoding);
+  if (s && soap_send3(soap, "Content-Transfer-Encoding: ", s, "\r\n"))
+    return soap->error;
+  if (content->id && soap_send3(soap, "Content-ID: ", content->id, "\r\n"))
+    return soap->error;
+  if (content->location && soap_send3(soap, "Content-Location: ", content->location, "\r\n"))
+    return soap->error;
+  if (content->description && soap_send3(soap, "Content-Description: ", content->description, "\r\n"))
+    return soap->error;
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_MIME) || !soap->mime.boundary)
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending MIME attachments\n"));
+  for (content = soap->mime.first; content; content = content->next)
+    if (soap_putmimehdr(soap, content)
+     || soap_send_raw(soap, content->ptr, content->size))
+      return soap->error;
+  return soap_send3(soap, "\r\n--", soap->mime.boundary, "--");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_dime(struct soap *soap)
+{ soap->omode |= SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_mime(struct soap *soap, const char *boundary, const char *start)
+{ soap->omode |= SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = soap_strdup(soap, boundary);
+  soap->mime.start = soap_strdup(soap, start);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_dime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_mime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart*
+soap_new_multipart(struct soap *soap, struct soap_multipart **first, struct soap_multipart **last, char *ptr, size_t size)
+{ struct soap_multipart *content;
+  content = (struct soap_multipart*)soap_malloc(soap, sizeof(struct soap_multipart));
+  if (content)
+  { content->next = NULL;
+    content->ptr = ptr;
+    content->size = size;
+    content->id = NULL;
+    content->type = NULL;
+    content->options = NULL;
+    content->encoding = SOAP_MIME_NONE;
+    content->location = NULL;
+    content->description = NULL;
+    if (!*first)
+      *first = content;
+    if (*last)
+      (*last)->next = content;
+    *last = content;
+  }
+  return content;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_dime_attachment(struct soap *soap, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->options = soap_dime_option(soap, optype, option);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_mime_attachment(struct soap *soap, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->encoding = encoding;
+  content->location = soap_strdup(soap, location);
+  content->description = soap_strdup(soap, description);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap_multipart*
+SOAP_FMAC2
+soap_next_multipart(struct soap_multipart *content)
+{ if (content)
+    return content->next;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_select_mime_boundary(struct soap *soap)
+{ while (!soap->mime.boundary || soap_valid_mime_boundary(soap))
+  { register char *s = soap->mime.boundary;
+    register size_t n = 0;
+    if (s)
+      n = strlen(s);
+    if (n < 16)
+    { n = 64;
+      s = soap->mime.boundary = (char*)soap_malloc(soap, n + 1);
+      if (!s)
+        return;
+    }
+    strcpy(s, "==");
+    s += 2;
+    n -= 4;
+    while (n)
+    { *s++ = soap_base64o[soap_random & 0x3F];
+      n--;
+    }
+    strcpy(s, "==");
+  }
+  if (!soap->mime.start)
+    soap->mime.start = "<SOAP-ENV:Envelope>";
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_valid_mime_boundary(struct soap *soap)
+{ register struct soap_multipart *content;
+  register size_t k = strlen(soap->mime.boundary);
+  for (content = soap->mime.first; content; content = content->next)
+  { if (content->ptr && content->size >= k)
+    { register const char *p = (const char*)content->ptr; 
+      register size_t i;
+      for (i = 0; i < content->size - k; i++, p++)
+        if (!strncmp(p, soap->mime.boundary, k))
+          return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	HTTP cookie handling
+ *
+\******************************************************************************/
+
+#ifdef WITH_COOKIES
+/******************************************************************************/
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_encode_cookie(const char *s, char *t, size_t len)
+{ register int c;
+  register size_t n = len;
+  while ((c = *s++) && --n > 0)
+  { if (c > ' ' && c < 128 && !strchr("()<>@,;:\\\"/[]?={}", c))
+      *t++ = c;
+    else if (n > 2)
+    { *t++ = '%';
+      *t++ = (c >> 4) + (c > 159 ? '7' : '0');
+      c &= 0xF;
+      *t++ = c + (c > 9 ? '7' : '0');
+      n -= 2;
+    }
+    else
+      break;
+  }
+  *t = '\0';
+  return len - n;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  size_t n;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (*path == '/')
+    path++;
+  n = strlen(path);
+  for (p = soap->cookies; p; p = p->next)
+    if (!strcmp(p->name, name)
+     && domain
+     && p->domain
+     && !strcmp(p->domain, domain)
+     && !strncmp(p->path, path, n))
+      break;
+  return p;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_set_cookie(struct soap *soap, const char *name, const char *value, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  int n;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set cookie: %s=%s domain=%s path=%s\n", name, value?value:"", domain?domain:"", path?path:""));
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return NULL;
+  }
+  if (*path == '/')
+    path++;
+  q = soap_cookie(soap, name, domain, path);
+  if (!q)
+  { if ((q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+    { if ((q->name = (char*)SOAP_MALLOC(soap, strlen(name)+1)))
+        strcpy(q->name, name);
+      q->value = NULL;
+      q->domain = NULL;
+      q->path = NULL;
+      q->expire = -1;
+      q->version = 0;
+      q->secure = 0;
+      q->modified = 0;
+      for (p = &soap->cookies, n = soap->cookie_max; *p && n; p = &(*p)->next, n--)
+        if (!strcmp((*p)->name, name) && (*p)->path && strcmp((*p)->path, path) < 0)
+          break;
+      if (n)
+      { q->next = *p;
+        *p = q;
+      }
+      else
+      { SOAP_FREE(soap, q->name);
+        SOAP_FREE(soap, q);
+        q = NULL;
+      }
+    }
+  }
+  else
+    q->modified = 1;
+  if (q)
+  { if (q->value)
+    { SOAP_FREE(soap, q->value);
+      q->value = NULL;
+    }
+    if (q->domain)
+    { SOAP_FREE(soap, q->domain);
+      q->domain = NULL;
+    }
+    if (q->path)
+    { SOAP_FREE(soap, q->path);
+      q->path = NULL;
+    }
+    if (value && *value && (q->value = (char*)SOAP_MALLOC(soap, strlen(value)+1)))
+      strcpy(q->value, value);
+    if (domain && *domain && (q->domain = (char*)SOAP_MALLOC(soap, strlen(domain)+1)))
+      strcpy(q->domain, domain);
+    if (path && *path && (q->path = (char*)SOAP_MALLOC(soap, strlen(path)+1)))
+      strcpy(q->path, path);
+    q->session = 1;
+    q->env = 0;
+  }
+  return q;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!domain)
+  { soap_set_receiver_error(soap, "Cookie domain not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (*path == '/')
+    path++;
+  for (p = &soap->cookies, q = *p; q; q = *p)
+    if (!strcmp(q->name, name) && !strcmp(q->domain, domain) && !strncmp(q->path, path, strlen(q->path)))
+    { if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+      p = &q->next;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_env_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)) && p->env)
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_cookie_expire(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->expire;
+  return -1;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_expire(struct soap *soap, const char *name, long expire, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->expire = expire;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 1;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_clr_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 0;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putsetcookies(struct soap *soap)
+{ struct soap_cookie *p;
+  char *s, tmp[4096];
+  const char *t;
+  for (p = soap->cookies; p; p = p->next)
+  { if (p->modified || !p->env)
+    { s = tmp;
+      if (p->name)
+        s += soap_encode_cookie(p->name, s, tmp-s+4064);
+      if (p->value && *p->value)
+      { *s++ = '=';
+        s += soap_encode_cookie(p->value, s, tmp-s+4064);
+      }
+      if (p->domain && (int)strlen(p->domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", p->domain);
+      else if (soap->cookie_domain && (int)strlen(soap->cookie_domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", soap->cookie_domain);
+      strcat(s, ";Path=\"/");
+      if (p->path)
+        t = p->path;
+      else
+        t = soap->cookie_path;
+      if (t)
+      { if (*t == '/')
+          t++;
+        if ((int)strlen(t) < tmp-s+4064)
+          strcat(s, t);
+      }
+      s += strlen(s);
+      *s++ = '"';
+      if (p->version > 0)
+        sprintf(s, ";Version=%u", p->version);
+      if (p->expire >= 0)
+        sprintf(s, ";Max-Age=%ld", p->expire);
+      if (p->secure)
+        strcat(s, ";Secure");
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set-Cookie: %s\n", tmp));
+      if ((soap->error = soap->fposthdr(soap, "Set-Cookie", tmp)))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putcookies(struct soap *soap, const char *domain, const char *path, int secure)
+{ struct soap_cookie **p, *q;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  char *s, tmp[4096];
+  p = &soap->cookies;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending cookies for domain=%s path=%s\n", domain, path));
+  if (*path == '/')
+    path++;
+  while ((q = *p))
+  { if (q->expire && now > q->expire)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie %s expired\n", q->name));
+      SOAP_FREE(soap, q->name);
+      if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+    { size_t domlen = 0;
+      if (q->domain)
+      { const char *s = strchr(q->domain, ':');
+        if (s)
+	  domlen = s - q->domain;
+	else
+          domlen = strlen(q->domain);
+      }
+      if ((!q->domain || !strncmp(q->domain, domain, domlen))
+          && (!q->path || !strncmp(q->path, path, strlen(q->path)))
+          && (!q->secure || secure))
+      { s = tmp;
+        if (q->version != version)
+        { sprintf(s, "$Version=%u;", q->version);
+          version = q->version;
+        }
+        if (q->name)
+          s += soap_encode_cookie(q->name, s, tmp-s+4080);
+        if (q->value && *q->value)
+        { *s++ = '=';
+          s += soap_encode_cookie(q->value, s, tmp-s+4080);
+        }
+        if (q->path && (int)strlen(q->path) < tmp-s+4080)
+        { sprintf(s, ";$Path=\"/%s\"", (*q->path == '/' ? q->path + 1 : q->path));
+          s += strlen(s);
+        }
+        if (q->domain && (int)strlen(q->domain) < tmp-s+4080)
+          sprintf(s, ";$Domain=\"%s\"", q->domain);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie: %s\n", tmp));
+        if ((soap->error = soap->fposthdr(soap, "Cookie", tmp)))
+          return soap->error;
+      }
+      p = &q->next;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_getcookies(struct soap *soap, const char *val)
+{ struct soap_cookie *p = NULL, *q;
+  const char *s;
+  char *t, tmp[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  char *domain = NULL;
+  char *path = NULL;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  if (!val)
+    return;
+  s = val;
+  while (*s)
+  { s = soap_decode_key(tmp, sizeof(tmp), s);
+    if (!soap_tag_cmp(tmp, "$Version"))
+    { if ((s = soap_decode_val(tmp, sizeof(tmp), s)))
+      { if (p)
+          p->version = (int)atol(tmp);
+        else
+          version = (int)atol(tmp);
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Path"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->path)
+          SOAP_FREE(soap, p->path);
+        p->path = t;
+      }
+      else
+      { if (path)
+          SOAP_FREE(soap, path);
+        path = t;
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Domain"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->domain)
+          SOAP_FREE(soap, p->domain);
+	p->domain = t;
+      }
+      else
+      { if (domain)
+          SOAP_FREE(soap, domain);
+        domain = t;
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Path"))
+    { if (p->path)
+        SOAP_FREE(soap, p->path);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->path = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->path, tmp);
+      }
+      else
+        p->path = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Domain"))
+    { if (p->domain)
+        SOAP_FREE(soap, p->domain);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->domain = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->domain, tmp);
+      }
+      else
+        p->domain = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Version"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->version = (unsigned int)atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Max-Age"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->expire = now + atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Expires"))
+    { struct tm T;
+      char a[3]; 
+      static const char mns[] = "anebarprayunulugepctovec";
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (strlen(tmp) > 20)
+      { memset((void*)&T, 0, sizeof(T));
+        a[0] = tmp[4];
+        a[1] = tmp[5];
+        a[2] = '\0';
+        T.tm_mday = (int)atol(a);
+        a[0] = tmp[8];
+        a[1] = tmp[9];
+        T.tm_mon = (strstr(mns, a) - mns) / 2;
+        a[0] = tmp[11];
+        a[1] = tmp[12];
+        T.tm_year = 100 + (int)atol(a);
+        a[0] = tmp[13];
+        a[1] = tmp[14];
+        T.tm_hour = (int)atol(a);
+        a[0] = tmp[16];
+        a[1] = tmp[17];
+        T.tm_min = (int)atol(a);
+        a[0] = tmp[19];
+        a[1] = tmp[20];
+        T.tm_sec = (int)atol(a);
+        p->expire = soap_timegm(&T);
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Secure"))
+      p->secure = 1;
+    else
+    { if (p)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+        if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+        { q->version = p->version;
+          q->expire = p->expire;
+          q->secure = p->secure;
+          q->env = 1;
+        }
+        if (p->name)
+          SOAP_FREE(soap, p->name);
+        if (p->value)
+          SOAP_FREE(soap, p->value);
+        if (p->domain)
+          SOAP_FREE(soap, p->domain);
+        if (p->path)
+          SOAP_FREE(soap, p->path);
+        SOAP_FREE(soap, p);
+      }
+      if ((p = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      { p->name = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+        strcpy(p->name, tmp);
+        s = soap_decode_val(tmp, sizeof(tmp), s);
+        if (*tmp)
+        { p->value = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+          strcpy(p->value, tmp);
+        }
+        else
+          p->value = NULL;
+        p->domain = domain;
+        p->path = path;
+        p->expire = 0;
+        p->secure = 0;
+        p->version = version;
+      }
+    }
+  }
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+    if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+    { q->version = p->version;
+      q->expire = p->expire;
+      q->secure = p->secure;
+      q->env = 1;
+    }
+    if (p->name)
+      SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+  if (domain)
+    SOAP_FREE(soap, domain);
+  if (path)
+    SOAP_FREE(soap, path);
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getenv_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  const char *s;
+  char key[4096], val[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  if (!(s = getenv("HTTP_COOKIE")))
+    return SOAP_ERR;
+  do
+  { s = soap_decode_key(key, sizeof(key), s);
+    s = soap_decode_val(val, sizeof(val), s);
+    p = soap_set_cookie(soap, key, val, NULL, NULL);
+    if (p)
+      p->env = 1;
+  } while (*s);
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_copy_cookies(struct soap *soap)
+{ struct soap_cookie *p, **q, *r;
+  q = &r;
+  for (p = soap->cookies; p; p = p->next)
+  { if (!(*q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      return r;
+    **q = *p;
+    if (p->name)
+    { if (((*q)->name = (char*)SOAP_MALLOC(soap, strlen(p->name)+1)))
+        strcpy((*q)->name, p->name);
+    }
+    if (p->value)
+    { if (((*q)->value = (char*)SOAP_MALLOC(soap, strlen(p->value)+1)))
+        strcpy((*q)->value, p->value);
+    }
+    if (p->domain)
+    { if (((*q)->domain = (char*)SOAP_MALLOC(soap, strlen(p->domain)+1)))
+        strcpy((*q)->domain, p->domain);
+    }
+    if (p->path)
+    { if (((*q)->path = (char*)SOAP_MALLOC(soap, strlen(p->path)+1)))
+        strcpy((*q)->path, p->path);
+    }
+    q = &(*q)->next;
+  }
+  *q = NULL;
+  return r;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  for (p = soap->cookies; p; p = soap->cookies)
+  { soap->cookies = p->next;
+    SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+}
+
+/******************************************************************************/
+#endif /* WITH_COOKIES */
+
+/******************************************************************************/
+#ifdef WITH_GZIP
+#ifndef PALM_1
+static int
+soap_getgziphdr(struct soap *soap)
+{ int i;
+  soap_wchar c, f = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get gzip header\n"));
+  for (i = 0; i < 9; i++)
+  { if ((int)(c = soap_get1(soap) == EOF))
+      return soap->error = SOAP_EOF;
+    if (i == 2)
+      f = c;
+  }
+  if (f & 0x04) /* FEXTRA */
+  { for (i = soap_get1(soap) | (soap_get1(soap) << 8); i; i--)
+      if ((int)soap_get1(soap) == EOF)
+        return soap->error = SOAP_EOF;
+  }
+  if (f & 0x08) /* FNAME */
+    do
+      c = soap_get1(soap);
+    while (c && (int)c != EOF);
+  if ((int)c != EOF && (f & 0x10)) /* FCOMMENT */
+    do
+      c = soap_get1(soap);
+    while (c && (int)f != EOF);
+  if ((int)c != EOF && (f & 0x01)) /* FHCRC */
+  { if ((int)(c = soap_get1(soap)) != EOF)
+      c = soap_get1(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_recv(struct soap *soap)
+{ soap_wchar c;
+  soap->error = SOAP_OK;
+  soap_free(soap);
+  soap_set_local_namespaces(soap);
+  soap->version = 0;	/* don't assume we're parsing SOAP content by default */
+#ifndef WITH_NOIDREF
+  soap_free_iht(soap);
+#endif
+  if ((soap->imode & SOAP_IO) == SOAP_IO_CHUNK)
+    soap->omode |= SOAP_IO_CHUNK;
+  soap->imode &= ~SOAP_IO;
+  soap->mode = soap->imode;
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  soap->ahead = 0;
+  soap->peeked = 0;
+  soap->level = 0;
+  soap->part = SOAP_BEGIN;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  *soap->endpoint = '\0';
+  soap->action = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket))
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->recvfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->recvfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#ifdef WITH_ZLIB
+  soap->mode &= ~SOAP_ENC_ZLIB;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.next_in = Z_NULL;
+  soap->d_stream.avail_in = 0;
+  soap->d_stream.next_out = (Byte*)soap->buf;
+  soap->d_stream.avail_out = SOAP_BUFLEN;
+  soap->z_ratio_in = 1.0;
+#endif
+#ifndef WITH_LEANER
+  if (soap->fprepareinit)
+    soap->fprepareinit(soap);
+#endif
+  c = soap_getchar(soap);
+#ifdef WITH_GZIP
+  if (c == 0x1F)
+  { if (soap_getgziphdr(soap))
+      return soap->error;
+    if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+    soap->zlib_state = SOAP_ZLIB_INFLATE;
+    soap->mode |= SOAP_ENC_ZLIB;
+    soap->zlib_in = SOAP_ZLIB_GZIP;
+    soap->z_crc = crc32(0L, NULL, 0);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    /* should not chunk over plain transport, so why bother to check? */
+    /* if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) */
+    /*   soap->z_buflen = soap->bufidx; */
+    /* else */
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+    soap->z_buflen = soap->buflen;
+    soap->buflen = soap->bufidx;
+    c = soap_getchar(soap);
+  }  
+#endif
+#ifndef WITH_LEANER
+  if (c == '-' && soap_get0(soap) == '-')
+    soap->mode |= SOAP_ENC_MIME;
+  else if ((c & 0xFFFC) == (SOAP_DIME_VERSION | SOAP_DIME_MB) && (soap_get0(soap) & 0xFFF0) == 0x20)
+    soap->mode |= SOAP_ENC_DIME;
+  else
+#endif
+  { while (soap_blank(c))
+      c = soap_getchar(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  soap_unget(soap, c);
+#ifndef WITH_NOHTTP
+  /* if not XML or (start of)BOM or MIME/DIME/ZLIB, assume HTTP header */
+  if (c != '<' && c != 0xEF && !(soap->mode & (SOAP_ENC_MIME | SOAP_ENC_DIME | SOAP_ENC_ZLIB)))
+  { soap->mode &= ~SOAP_IO;
+    soap->error = soap->fparse(soap);
+    if (soap->error && soap->error < SOAP_STOP)
+    { soap->keep_alive = 0; /* force close later */
+      return soap->error;
+    }
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { soap->chunkbuflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+      soap->chunksize = 0;
+    }
+#ifndef WITH_LEANER
+    else if (soap->fpreparerecv && soap->buflen != soap->bufidx)
+      soap->fpreparerecv(soap, soap->buf + soap->bufidx, soap->buflen - soap->bufidx);
+#endif
+#ifdef WITH_ZLIB
+    if (soap->zlib_in != SOAP_ZLIB_NONE)
+    { /* fparse should not use soap_unget to push back last char */
+#ifdef WITH_GZIP
+      c = soap_get1(soap);
+      if (c == 0x1F)
+      { if (soap_getgziphdr(soap))
+          return soap->error;
+        if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        soap->z_crc = crc32(0L, NULL, 0);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+      }
+      else
+      { soap_revget1(soap);
+#else
+      {
+#endif
+        if (inflateInit(&soap->d_stream) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate initialized\n"));
+      }
+      soap->mode |= SOAP_ENC_ZLIB;
+      memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+      soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+      soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+    }
+#endif
+    if (soap->error)
+    { if (soap->error == SOAP_FORM && soap->fform)
+      { soap->error = soap->fform(soap);
+        if (soap->error == SOAP_OK)
+          soap->error = SOAP_STOP; /* prevents further processing */
+      }
+      return soap->error;
+    }
+  }
+#endif
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_MIME)
+  { if (soap_getmimehdr(soap))
+      return soap->error;
+    if (soap_get_header_attribute(soap, soap->mime.first->type, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+  }
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap->dime.flags & SOAP_DIME_CF)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked DIME SOAP message\n"));
+      soap->dime.chunksize = soap->dime.size;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+    }
+    soap->count = soap->buflen - soap->bufidx;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse(struct soap *soap)
+{ char header[SOAP_HDRLEN], *s;
+  unsigned short get = 0, status = 0, k = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Waiting for HTTP request/response...\n"));
+  *soap->endpoint = '\0';
+  soap->length = 0;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->action = NULL;
+  soap->authrealm = NULL;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP status: %s\n", soap->msgbuf));
+    for (;;)
+    { if (soap_getline(soap, header, SOAP_HDRLEN))
+      { if (soap->error == SOAP_EOF)
+	{ soap->error = SOAP_OK;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "EOF in HTTP header, continue anyway\n"));
+	  break;
+	}
+        return soap->error;
+      }
+      if (!*header)
+        break;
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP header: %s\n", header));
+      s = strchr(header, ':');
+      if (s)
+      { *s = '\0';
+        do s++;
+        while (*s && *s <= 32);
+        if ((soap->error = soap->fparsehdr(soap, header, s)))
+        { if (soap->error < SOAP_STOP)
+	    return soap->error;
+	  status = soap->error;
+	  soap->error = SOAP_OK;
+        }
+      }
+    }
+    if ((s = strchr(soap->msgbuf, ' ')))
+    { k = (unsigned short)soap_strtoul(s, &s, 10);
+      if (!soap_blank(*s))
+        k = 0;
+    }
+    else
+      k = 0;
+  } while (k == 100);
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Finished HTTP header parsing\n"));
+  s = strstr(soap->msgbuf, "HTTP/");
+  if (s && s[7] != '1')
+  { if (soap->keep_alive == 1)
+      soap->keep_alive = 0;
+    if (k == 0 && (soap->omode & SOAP_IO) == SOAP_IO_CHUNK) /* k == 0 for HTTP request */
+    { soap->imode |= SOAP_IO_CHUNK;
+      soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE;
+    }
+  }
+  if (soap->keep_alive < 0)
+    soap->keep_alive = 1;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Keep alive connection = %d\n", soap->keep_alive));
+  if (s && (((get = !strncmp(soap->msgbuf, "GET ", 4))) || !strncmp(soap->msgbuf, "POST ", 5)))
+  { size_t m = strlen(soap->endpoint);
+    size_t n = m + (s - soap->msgbuf) - 5 - (!get);
+    if (n >= sizeof(soap->endpoint))
+      n = sizeof(soap->endpoint) - 1;
+    strncpy(soap->path, soap->msgbuf + 4 + (!get), n - m);
+    soap->path[n - m] = '\0';
+    strcat(soap->endpoint, soap->path);
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Target endpoint='%s'\n", soap->endpoint));
+    if (get)
+    { soap->error = soap->fget(soap);
+      if (soap->error == SOAP_OK)
+        soap->error = SOAP_STOP; /* prevents further processing */
+      return soap->error;
+    }
+    if (status)
+      return soap->error = status;
+    return SOAP_OK;
+  }
+  if (k == 0 || (k >= 200 && k <= 299) || k == 400 || k == 500)
+    return SOAP_OK;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP error %d\n", k));
+  return soap_set_receiver_error(soap, "HTTP error", soap->msgbuf, k);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse_header(struct soap *soap, const char *key, const char *val)
+{ if (!soap_tag_cmp(key, "Host"))
+  { 
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+      strcpy(soap->endpoint, "https://");
+    else
+#endif
+      strcpy(soap->endpoint, "http://");
+    strncat(soap->endpoint, val, sizeof(soap->endpoint) - 8);
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifndef WITH_LEANER
+  else if (!soap_tag_cmp(key, "Content-Type"))
+  { if (soap_get_header_attribute(soap, val, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+    else if (soap_get_header_attribute(soap, val, "multipart/related")
+          || soap_get_header_attribute(soap, val, "multipart/form-data"))
+    { soap->mime.boundary = soap_strdup(soap, soap_get_header_attribute(soap, val, "boundary"));
+      soap->mime.start = soap_strdup(soap, soap_get_header_attribute(soap, val, "start"));
+      soap->mode |= SOAP_ENC_MIME;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Content-Length"))
+    soap->length = soap_strtoul(val, NULL, 10);
+  else if (!soap_tag_cmp(key, "Content-Encoding"))
+  { if (!soap_tag_cmp(val, "deflate"))
+#ifdef WITH_ZLIB
+      soap->zlib_in = SOAP_ZLIB_DEFLATE;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+    else if (!soap_tag_cmp(val, "gzip"))
+#ifdef WITH_GZIP
+      soap->zlib_in = SOAP_ZLIB_GZIP;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+  }
+#ifdef WITH_ZLIB
+  else if (!soap_tag_cmp(key, "Accept-Encoding"))
+  {
+#ifdef WITH_GZIP
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "gzip"))
+      soap->zlib_out = SOAP_ZLIB_GZIP;
+    else
+#endif
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "deflate"))
+      soap->zlib_out = SOAP_ZLIB_DEFLATE;
+    else
+      soap->zlib_out = SOAP_ZLIB_NONE;
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Transfer-Encoding"))
+  { soap->mode &= ~SOAP_IO;
+    if (!soap_tag_cmp(val, "chunked"))
+      soap->mode |= SOAP_IO_CHUNK;
+  }
+  else if (!soap_tag_cmp(key, "Connection"))
+  { if (!soap_tag_cmp(val, "keep-alive"))
+      soap->keep_alive = -soap->keep_alive;
+    else if (!soap_tag_cmp(val, "close"))
+      soap->keep_alive = 0;
+  }
+#ifndef WITH_LEAN
+  else if (!soap_tag_cmp(key, "Authorization"))
+  { if (!soap_tag_cmp(val, "Basic *"))
+    { int n;
+      char *s;
+      soap_base642s(soap, val + 6, soap->tmpbuf, sizeof(soap->tmpbuf) - 1, &n);
+      soap->tmpbuf[n] = '\0';
+      if ((s = strchr(soap->tmpbuf, ':')))
+      { *s = '\0';
+	soap->userid = soap_strdup(soap, soap->tmpbuf);
+	soap->passwd = soap_strdup(soap, s + 1);
+      }
+    }
+  }
+  else if (!soap_tag_cmp(key, "WWW-Authenticate"))
+    soap->authrealm = soap_strdup(soap, soap_get_header_attribute(soap, val + 6, "realm"));
+  else if (!soap_tag_cmp(key, "Expect"))
+  { if (!soap_tag_cmp(val, "100-continue"))
+    { if ((soap->error = soap->fposthdr(soap, "HTTP/1.1 100 Continue", NULL))
+       || (soap->error = soap->fposthdr(soap, NULL, NULL)))
+        return soap->error;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "SOAPAction"))
+  { if (*val == '"')
+    { soap->action = soap_strdup(soap, val + 1);
+      soap->action[strlen(soap->action) - 1] = '\0';
+    }
+  }
+  else if (!soap_tag_cmp(key, "Location"))
+  { strncpy(soap->endpoint, val, sizeof(soap->endpoint));
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifdef WITH_COOKIES
+  else if (!soap_tag_cmp(key, "Cookie") || !soap_tag_cmp(key, "Set-Cookie"))
+    soap_getcookies(soap, val);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_get_header_attribute(struct soap *soap, const char *line, const char *key)
+{ register const char *s = line;
+  if (s)
+  { while (*s)
+    { register short flag;
+      s = soap_decode_key(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      flag = soap_tag_cmp(soap->tmpbuf, key);
+      s = soap_decode_val(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      if (!flag)
+        return soap->tmpbuf;
+    }
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_key(char *buf, size_t len, const char *val)
+{ return soap_decode(buf, len, val, "=,;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_val(char *buf, size_t len, const char *val)
+{ if (*val != '=')
+  { *buf = '\0';
+    return val;
+  }
+  return soap_decode(buf, len, val + 1, ",;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char*
+soap_decode(char *buf, size_t len, const char *val, const char *sep)
+{ const char *s;
+  char *t = buf;
+  for (s = val; *s; s++)
+    if (*s != ' ' && *s != '\t' && !strchr(sep, *s))
+      break;
+  if (*s == '"')
+  { s++;
+    while (*s && *s != '"' && --len)
+      *t++ = *s++;
+  }
+  else
+  { while (soap_notblank(*s) && !strchr(sep, *s) && --len)
+    { if (*s == '%')
+      { *t++ = ((s[1] >= 'A' ? (s[1] & 0x7) + 9 : s[1] - '0') << 4)
+              + (s[2] >= 'A' ? (s[2] & 0x7) + 9 : s[2] - '0');
+        s += 3;
+      }
+      else
+        *t++ = *s++;
+    }
+  }
+  *t = '\0';
+  while (*s && !strchr(sep, *s))
+    s++;
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_out(struct soap *soap)
+{
+#ifndef WITH_LEANER
+  size_t n = 0;
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->mime.start)
+  { const char *s;
+    if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+      s = "application/dime";
+    else if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+    sprintf(soap->tmpbuf, "--%s\r\nContent-Type: %s\r\nContent-Transfer-Encoding: binary\r\nContent-ID: %s\r\n\r\n", soap->mime.boundary, s, soap->mime.start);
+    n = strlen(soap->tmpbuf);
+    if (soap_send_raw(soap, soap->tmpbuf, n))
+      return soap->error;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    soap->dime.size = soap->count;	/* DIME in MIME correction */
+  if (!(soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME))
+  { if (soap_putdimehdr(soap))
+      return soap->error;
+  }
+#endif
+  soap->part = SOAP_IN_ENVELOPE;
+  return soap_element_begin_out(soap, "SOAP-ENV:Envelope", 0, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Envelope"))
+    return soap->error;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { soap->dime.size = soap->count - soap->dime.size;	/* DIME in MIME correction */
+    sprintf(soap->id, soap->dime_id_format, 0);
+    soap->dime.id = soap->id;
+    if (soap->local_namespaces)
+    { if (soap->local_namespaces[0].out)
+        soap->dime.type = (char*)soap->local_namespaces[0].out;
+      else
+        soap->dime.type = (char*)soap->local_namespaces[0].ns;
+    }
+    soap->dime.options = NULL;
+    soap->dime.flags = SOAP_DIME_MB | SOAP_DIME_ABSURI;
+    if (!soap->dime.first)
+      soap->dime.flags |= SOAP_DIME_ME;
+    soap->count += 12 + ((strlen(soap->dime.id)+3)&(~3)) + ((strlen(soap->dime.type)+3)&(~3));
+  }
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+    return soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+#endif
+  soap->part = SOAP_END_ENVELOPE;
+  return SOAP_OK;
+} 
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_in(struct soap *soap)
+{ register struct Namespace *p;
+  soap->part = SOAP_IN_ENVELOPE;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Envelope", 0))
+    return soap->error = SOAP_VERSIONMISMATCH;
+  p = soap->local_namespaces;
+  if (p)
+  { const char *ns = p[0].out;
+    if (!ns)
+      ns = p[0].ns;
+    if (!strcmp(ns, soap_env1))
+    { soap->version = 1; /* make sure we use SOAP 1.1 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc1))))
+        strcpy(p[1].out, soap_enc1);
+    }
+    else if (!strcmp(ns, soap_env2))
+    { soap->version = 2; /* make sure we use SOAP 1.2 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc2))))
+        strcpy(p[1].out, soap_enc2);
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_in(struct soap *soap)
+{ soap->part = SOAP_END_ENVELOPE;
+  return soap_element_end_in(soap, "SOAP-ENV:Envelope");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_out(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap->version == 1)
+    soap->encoding = 1;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_SEC) && soap_set_attr(soap, "wsu:Id", "Body"))
+    return soap->error;
+#endif
+  if (soap_element(soap, "SOAP-ENV:Body", 0, NULL))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Body"))
+    return soap->error;
+  soap->part = SOAP_END_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_in(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Body", 0))
+    return soap->error;
+  if (!soap->body)
+    soap->part = SOAP_NO_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_in(struct soap *soap)
+{ if (soap->part == SOAP_NO_BODY)
+    return SOAP_OK;
+  soap->part = SOAP_END_BODY;
+  return soap_element_end_in(soap, "SOAP-ENV:Body");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_header(struct soap *soap)
+{ if (soap_getheader(soap) && soap->error == SOAP_TAG_MISMATCH)
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_endpoint(struct soap *soap, const char *endpoint)
+{ register const char *s;
+  register size_t i, n;
+  soap->endpoint[0] = '\0';
+  soap->host[0] = '\0';
+  soap->path[0] = '/';
+  soap->path[1] = '\0';
+  soap->port = 80;
+  if (!endpoint || !*endpoint)
+    return;
+  if (!strncmp(endpoint, "https:", 6))
+    soap->port = 443;
+  strncpy(soap->endpoint, endpoint, sizeof(soap->endpoint) - 1);
+  s = strchr(endpoint, ':');
+  if (s && s[1] == '/' && s[2] == '/')
+    s += 3;
+  else
+    s = endpoint;
+  n = strlen(s);
+  if (n >= sizeof(soap->host))
+    n = sizeof(soap->host) - 1;
+#ifdef WITH_IPV6
+  if (s[0] == '[')
+  { s++;
+    for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == ']')
+      { s++;
+        break; 
+      }
+    }
+  }
+  else
+  { for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == '/' || s[i] == ':')
+        break; 
+    }
+  }
+#else
+  for (i = 0; i < n; i++)
+  { soap->host[i] = s[i];
+    if (s[i] == '/' || s[i] == ':')
+      break; 
+  }
+#endif
+  soap->host[i] = '\0';
+  if (s[i] == ':')
+  { soap->port = (int)atol(s + i + 1);
+    for (i++; i < n; i++)
+      if (s[i] == '/')
+        break;
+  }
+  if (s[i])
+  { strncpy(soap->path, s + i, sizeof(soap->path));
+    soap->path[sizeof(soap->path) - 1] = '\0';
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect(struct soap *soap, const char *endpoint, const char *action)
+{ return soap_connect_command(soap, SOAP_POST, endpoint, action);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect_command(struct soap *soap, int http_command, const char *endpoint, const char *action)
+{ char host[sizeof(soap->host)];
+  int port;
+  size_t count;
+  soap->error = SOAP_OK;
+  strcpy(host, soap->host); /* save to compare */
+  port = soap->port; /* save to compare */
+  soap_set_endpoint(soap, endpoint);
+#ifndef WITH_LEANER
+  if (soap->fconnect)
+  { if ((soap->error = soap->fconnect(soap, endpoint, soap->host, soap->port)))
+      return soap->error;
+  }
+  else
+#endif
+  if (soap->fopen && *soap->host)
+  { soap->status = http_command;
+    if (!soap->keep_alive || !soap_valid_socket(soap->socket) || strcmp(soap->host, host) || soap->port != port || !soap->fpoll || soap->fpoll(soap))
+    { soap->keep_alive = 0; /* to force close */
+      soap->omode &= ~SOAP_IO_UDP; /* to force close */
+      soap_closesock(soap);
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Connect/reconnect to host='%s' path='%s' port=%d\n", soap->host, soap->path, soap->port));
+#ifdef WITH_UDP
+      if (!strncmp(endpoint, "soap.udp:", 9))
+        soap->omode |= SOAP_IO_UDP;
+#endif
+      soap->socket = soap->fopen(soap, endpoint, soap->host, soap->port);
+      if (soap->error)
+        return soap->error;
+      soap->keep_alive = ((soap->omode & SOAP_IO_KEEPALIVE) != 0);
+    }
+  }
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML) && endpoint)
+  { unsigned int k = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((k & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fpost(soap, endpoint, soap->host, soap->port, soap->path, action, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((k & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = k;
+  }
+  else if (action)
+    soap->action = soap_strdup(soap, action);
+  if (http_command != SOAP_POST)
+    return soap_end_send(soap);
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2base64(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register int i;
+  register unsigned long m;
+  register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, (n + 2) / 3 * 4 + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (!s)
+    return p;
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    t += 4;
+  }
+  t[0] = '\0';
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      t[i] = '=';
+    t[4] = '\0';
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_base642s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register int i, j, c;
+  register unsigned long m;
+  register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = (strlen(s) + 3) / 4 * 3;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  if (n)
+    *n = 0;
+  for (;;)
+  { for (i = 0; i < SOAP_BLKLEN; i++)
+    { m = 0;
+      j = 0;
+      while (j < 4)
+      { c = *s++;
+        if (c == '=' || !c)
+        { i *= 3;
+          switch (j)
+          { case 2:
+              *t++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *t++ = (char)((m >> 10) & 0xFF);
+              *t++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n += i;
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      }
+      *t++ = (char)((m >> 16) & 0xFF);
+      *t++ = (char)((m >> 8) & 0xFF);
+      *t++ = (char)(m & 0xFF);
+      if (l < 3)
+      { if (n)
+	  *n += i;
+        return p;
+      }
+      l -= 3;
+    }
+    if (n)
+      *n += 3 * SOAP_BLKLEN;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2hex(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, 2 * n + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (s)
+  { for (; n > 0; n--)
+    { register int m = *s++;
+      *t++ = (char)((m >> 4) + (m > 159 ? 'a' - 10 : '0'));
+      m &= 0x0F;
+      *t++ = (char)(m + (m > 9 ? 'a' - 10 : '0'));
+    }
+  }
+  *t++ = '\0';
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_hex2s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = strlen(s) / 2;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  while (l)
+  { register int d1, d2;
+    d1 = *s++;
+    if (!d1)
+      break;
+    d2 = *s++;
+    if (!d2)
+      break;
+    *t++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    l--;
+  }
+  if (n)
+    *n = t - p;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthttphdr(struct soap *soap, int status, size_t count)
+{ register const char *s = NULL;
+  register int err = SOAP_OK;
+#ifndef WITH_LEANER
+  register const char *r = NULL;
+#endif
+  if (status == SOAP_FILE && soap->http_content)
+    s = soap->http_content;
+  else if (status == SOAP_HTML)
+    s = "text/html; charset=utf-8";
+  else if (count || ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK))
+  { if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+  }
+#ifndef WITH_LEANER
+  if (soap->mode & (SOAP_ENC_DIME | SOAP_ENC_MTOM))
+  { if (soap->mode & SOAP_ENC_MTOM)
+    { r = s;
+      s = "application/xop+xml; charset=utf-8";
+    }
+    else
+      s = "application/dime";
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->status != SOAP_GET)
+  { register const char *t = strchr(s, ';');
+    sprintf(soap->tmpbuf, "multipart/related; boundary=\"%s\"; type=\"", soap->mime.boundary);
+    if (t)
+      strncat(soap->tmpbuf, s, t - s);
+    else
+      strcat(soap->tmpbuf, s);
+    if (soap->mime.start)
+    { strcat(soap->tmpbuf, "\"; start=\"");
+      strcat(soap->tmpbuf, soap->mime.start);
+    }
+    strcat(soap->tmpbuf, "\"");
+    if (r)
+    { strcat(soap->tmpbuf, "; start-info=\"");
+      strcat(soap->tmpbuf, r);
+      strcat(soap->tmpbuf, "\"");
+    }
+    s = soap->tmpbuf;
+  }
+#endif
+  if (s && (err = soap->fposthdr(soap, "Content-Type", s)))
+    return err;
+#ifdef WITH_ZLIB
+  if (soap->omode & SOAP_ENC_ZLIB)
+  {
+#ifdef WITH_GZIP
+    err = soap->fposthdr(soap, "Content-Encoding", "gzip");
+#else
+    err = soap->fposthdr(soap, "Content-Encoding", "deflate");
+#endif
+    if (err)
+      return err;
+  }
+#endif
+#ifndef WITH_LEANER
+  if ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK)
+    err = soap->fposthdr(soap, "Transfer-Encoding", "chunked");
+  else
+#endif
+  if (soap->status != SOAP_GET)
+  { sprintf(soap->tmpbuf, "%lu", (unsigned long)count);
+    err = soap->fposthdr(soap, "Content-Length", soap->tmpbuf);
+  }
+  if (err)
+    return err;
+  return soap->fposthdr(soap, "Connection", soap->keep_alive ? "keep-alive" : "close");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_get(struct soap *soap)
+{ return SOAP_GET_METHOD;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post(struct soap *soap, const char *endpoint, const char *host, int port, const char *path, const char *action, size_t count)
+{ register const char *s;
+  register int err;
+  if (soap->status == SOAP_GET)
+    s = "GET";
+  else
+    s = "POST";
+#ifdef PALM
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)) && strncmp(endpoint, "_beam:", 6) && strncmp(endpoint, "_local:", 7) && strncmp(endpoint, "_btobex:", 8))
+#else
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)))
+#endif
+    return SOAP_OK;
+  if (soap->proxy_host && strncmp(endpoint, "https:", 6))
+    sprintf(soap->tmpbuf, "%s %s HTTP/%s", s, endpoint, soap->http_version);
+  else
+    sprintf(soap->tmpbuf, "%s /%s HTTP/%s", s, (*path == '/' ? path + 1 : path), soap->http_version);
+  if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+    return err;
+  if (port != 80)
+    sprintf(soap->tmpbuf, "%s:%d", host, port);
+  else
+    strcpy(soap->tmpbuf, host); 
+  if ((err = soap->fposthdr(soap, "Host", soap->tmpbuf))
+   || (err = soap->fposthdr(soap, "User-Agent", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, SOAP_OK, count)))
+    return err;
+#ifdef WITH_ZLIB
+#ifdef WITH_GZIP
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "gzip, deflate")))
+#else
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "deflate")))
+#endif
+    return err;
+#endif
+#ifndef WITH_LEAN
+  if (soap->userid && soap->passwd && strlen(soap->userid) + strlen(soap->passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Authorization", soap->tmpbuf)))
+      return err;
+  }
+  if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+      return err;
+  }
+#endif
+#ifdef WITH_COOKIES
+#ifdef WITH_OPENSSL
+  if (soap_putcookies(soap, host, path, soap->ssl != NULL))
+    return soap->error;
+#else
+  if (soap_putcookies(soap, host, path, 0))
+    return soap->error;
+#endif
+#endif
+  if (action && soap->version == 1)
+  { sprintf(soap->tmpbuf, "\"%s\"", action);
+    if ((err = soap->fposthdr(soap, "SOAPAction", soap->tmpbuf)))
+      return err;
+  }
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_send_header(struct soap *soap, const char *s)
+{ register const char *t;
+  do
+  { t = strchr(s, '\n'); /* disallow \n in HTTP headers */
+    if (!t)
+      t = s + strlen(s);
+    if (soap_send_raw(soap, s, t - s))
+      return soap->error;
+    s = t + 1;
+  } while (*t);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post_header(struct soap *soap, const char *key, const char *val)
+{ if (key)
+  { if (http_send_header(soap, key))
+      return soap->error;
+    if (val && (soap_send_raw(soap, ": ", 2) || http_send_header(soap, val)))
+      return soap->error;
+  }
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_response(struct soap *soap, int status, size_t count)
+{ register int err;
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    httpOutputEnable(soap->rpmreqid);
+#endif
+  if (!status || status == SOAP_HTML || status == SOAP_FILE)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "OK 200\n"));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s 200 OK", soap->http_version);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", "200 OK")))
+      return err;
+  }
+  else if (status > 200 && status < 600)
+  { sprintf(soap->tmpbuf, "HTTP/%s %d %s", soap->http_version, status, http_error(soap, status));
+    if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      return err;
+#ifndef WITH_LEAN 
+    if (status == 401)
+    { sprintf(soap->tmpbuf, "Basic realm=\"%s\"", soap->authrealm ? soap->authrealm : "gSOAP Web Service");
+      if ((err = soap->fposthdr(soap, "WWW-Authenticate", soap->tmpbuf)))
+        return err;
+    }
+    else if ((status >= 301 && status <= 303) || status == 307)
+    { if ((err = soap->fposthdr(soap, "Location", soap->endpoint)))
+        return err;
+    }
+#endif
+  }
+  else
+  { const char *s = *soap_faultcode(soap);
+    if (soap->version == 2 && !strcmp(s, "SOAP-ENV:Sender"))
+      s = "400 Bad Request";
+    else
+      s = "500 Internal Server Error";
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error %s (status=%d)\n", s, status));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s %s", soap->http_version, s);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", s)))
+      return err;
+  }
+  if ((err = soap->fposthdr(soap, "Server", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, status, count)))
+    return err;
+#ifdef WITH_COOKIES
+  if (soap_putsetcookies(soap))
+    return soap->error;
+#endif
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_response(struct soap *soap, int status)
+{ register size_t count;
+  if (!(soap->omode & (SOAP_ENC_XML | SOAP_IO_STORE /* this tests for chunking too */))
+   && (status == SOAP_HTML || status == SOAP_FILE))
+  { soap->omode &= ~SOAP_IO;
+    soap->omode |= SOAP_IO_STORE;
+  }
+  soap->status = status;
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML))
+  { register int n = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((n & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fresponse(soap, status, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((n & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = n;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static const char*
+soap_set_validation_fault(struct soap *soap, const char *s, const char *t)
+{ if (*soap->tag)
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s in element <%s>", s, t?t:SOAP_STR_EOS, soap->tag);
+  else
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s", s, t?t:SOAP_STR_EOS);
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_fault(struct soap *soap)
+{ const char **c = soap_faultcode(soap);
+  const char **s = soap_faultstring(soap);
+  if (!*c && !*s && soap->fseterror)
+    soap->fseterror(soap, c, s);
+  if (!*c)
+  { if (soap->version == 2)
+      *c = "SOAP-ENV:Sender";
+    else
+      *c = "SOAP-ENV:Client";
+  }
+  if (*s)
+    return;
+  switch (soap->error)
+  {
+#ifndef WITH_LEAN
+    case SOAP_CLI_FAULT:
+      *s = "Client fault";
+      break;
+    case SOAP_SVR_FAULT:
+      *s = "Server fault";
+      break;
+    case SOAP_TAG_MISMATCH:
+      *s = soap_set_validation_fault(soap, "tag name or namespace mismatch", NULL);
+      break;
+    case SOAP_TYPE:
+      *s = soap_set_validation_fault(soap, "data type mismatch ", soap->type);
+      break;
+    case SOAP_SYNTAX_ERROR:
+      *s = "Well-formedness violation";
+      break;
+    case SOAP_NO_TAG:
+      *s = "No XML element tag";
+      break;
+    case SOAP_MUSTUNDERSTAND:
+      *c = "SOAP-ENV:MustUnderstand";
+      sprintf(soap->msgbuf, "The data in element '%s' must be understood but cannot be handled", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_VERSIONMISMATCH:
+      *c = "SOAP-ENV:VersionMismatch";
+      *s = "SOAP version mismatch or invalid SOAP message";
+      break;
+    case SOAP_DATAENCODINGUNKNOWN:
+      *c = "SOAP-ENV:DataEncodingUnknown";
+      *s = "Unsupported SOAP data encoding";
+      break;
+    case SOAP_NAMESPACE:
+      *s = soap_set_validation_fault(soap, "namespace mismatch", NULL);
+      break;
+    case SOAP_USER_ERROR:
+      *s = "User error";
+      break;
+    case SOAP_FATAL_ERROR:
+      *s = "Fatal error";
+      break;
+    case SOAP_NO_METHOD:
+      sprintf(soap->msgbuf, "Method '%s' not implemented: method name or namespace not recognized", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_GET_METHOD:
+      *s = "HTTP GET method not implemented";
+      break;
+    case SOAP_EOM:
+      *s = "Out of memory";
+      break;
+    case SOAP_IOB:
+      *s = "Array index out of bounds";
+      break;
+    case SOAP_NULL:
+      *s = soap_set_validation_fault(soap, "nil not allowed", NULL);
+      break;
+    case SOAP_DUPLICATE_ID:
+      *s = soap_set_validation_fault(soap, "multiple definitions of id ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:DuplicateID";
+      break;
+    case SOAP_MISSING_ID:
+      *s = soap_set_validation_fault(soap, "missing id for ref ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:MissingID";
+      break;
+    case SOAP_HREF:
+      *s = soap_set_validation_fault(soap, "incompatible object ref ", soap->id);
+      break;
+    case SOAP_FAULT:
+      break;
+#ifndef WITH_NOIO
+    case SOAP_UDP_ERROR:
+      *s = "Message too large for UDP packet";
+      break;
+    case SOAP_TCP_ERROR:
+      *s = tcp_error(soap);
+      break;
+#endif
+    case SOAP_HTTP_ERROR:
+      *s = "HTTP error";
+      break;
+    case SOAP_SSL_ERROR:
+#ifdef WITH_OPENSSL
+      *s = "SSL error";
+#else
+      *s = "OpenSSL not installed: recompile with -DWITH_OPENSSL";
+#endif
+      break;
+    case SOAP_PLUGIN_ERROR:
+      *s = "Plugin registry error";
+      break;
+    case SOAP_DIME_ERROR:
+      *s = "DIME format error";
+      break;
+    case SOAP_DIME_HREF:
+      *s = "DIME href to missing attachment";
+      break;
+    case SOAP_DIME_MISMATCH:
+      *s = "DIME version/transmission error";
+      break;
+    case SOAP_DIME_END:
+      *s = "End of DIME error";
+      break;
+    case SOAP_MIME_ERROR:
+      *s = "MIME format error";
+      break;
+    case SOAP_MIME_HREF:
+      *s = "MIME href to missing attachment";
+      break;
+    case SOAP_MIME_END:
+      *s = "End of MIME error";
+      break;
+    case SOAP_ZLIB_ERROR:
+#ifdef WITH_ZLIB
+      sprintf(soap->msgbuf, "Zlib/gzip error: '%s'", soap->d_stream.msg?soap->d_stream.msg:"");
+      *s = soap->msgbuf;
+#else
+      *s = "Zlib/gzip not installed for (de)compression: recompile with -DWITH_GZIP";
+#endif
+      break;
+    case SOAP_REQUIRED:
+      *s = soap_set_validation_fault(soap, "missing required attribute", NULL);
+      break;
+    case SOAP_PROHIBITED:
+      *s = soap_set_validation_fault(soap, "prohibited attribute present", NULL);
+      break;
+    case SOAP_OCCURS:
+      *s = soap_set_validation_fault(soap, "min/maxOccurs violation", NULL);
+      break;
+    case SOAP_LENGTH:
+      *s = soap_set_validation_fault(soap, "content length violation", NULL);
+      break;
+    case SOAP_STOP:
+      *s = "Stopped: no response sent";
+      break;
+#endif
+    case SOAP_EOF:
+#ifndef WITH_NOIO
+      sprintf(soap->msgbuf, "End of file or no input: '%s'", soap_strerror(soap));
+      *s = soap->msgbuf;
+      break;
+#else
+      *s = "End of file or no input";
+      break;
+#endif
+    default:
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+      if (soap->error > 200 && soap->error < 600)
+      { sprintf(soap->msgbuf, "HTTP Error: %d %s", soap->error, http_error(soap, soap->error));
+        *s = soap->msgbuf;
+      }
+      else
+#endif
+#endif
+      { sprintf(soap->msgbuf, "Error %d", soap->error);
+        *s = soap->msgbuf;
+      }
+    }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_fault(struct soap *soap)
+{ register int status = soap->error;
+  int r = 1;
+  if (status == SOAP_STOP)
+    return status;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Sending back fault struct for error code %d\n", soap->error));
+  soap->keep_alive = 0; /* to terminate connection */
+  soap_set_fault(soap);
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+  if (soap_valid_socket(soap->socket))
+  { struct timeval timeout;
+    fd_set rfd, sfd;
+    timeout.tv_sec = 0;
+    timeout.tv_usec = 0;
+    FD_ZERO(&rfd);
+    FD_ZERO(&sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, NULL, &timeout);
+    if (r > 0)
+    { if (!FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       || (FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        && recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) < 0))
+        r = 0;
+    }
+  }
+#endif
+#endif
+  if ((status != SOAP_EOF || (!soap->recv_timeout && !soap->send_timeout)) && r > 0)
+  { soap->error = SOAP_OK;
+    soap_serializeheader(soap);
+    soap_serializefault(soap);
+    soap_begin_count(soap);
+    if (soap->mode & SOAP_IO_LENGTH)
+    { soap_envelope_begin_out(soap);
+      soap_putheader(soap);
+      soap_body_begin_out(soap);
+      soap_putfault(soap);
+      soap_body_end_out(soap);
+      soap_envelope_end_out(soap);
+    }
+    soap_end_count(soap);
+    if (soap_response(soap, status)
+     || soap_envelope_begin_out(soap)
+     || soap_putheader(soap)
+     || soap_body_begin_out(soap)
+     || soap_putfault(soap)
+     || soap_body_end_out(soap)
+     || soap_envelope_end_out(soap))
+      return soap_closesock(soap);
+    soap_end_send(soap);
+  }
+  soap->error = status;
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_fault(struct soap *soap)
+{ register int status = soap->error;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Receiving SOAP Fault\n"));
+  soap->error = SOAP_OK;
+  if (soap_getfault(soap))
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Error: soap_get_soapfault() failed. Is this a SOAP message at all?\n"));
+    *soap_faultcode(soap) = (soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client");
+    soap->error = status;
+    soap_set_fault(soap);
+  }
+  else
+  { register const char *s = *soap_faultcode(soap);
+    if (!soap_match_tag(soap, s, "SOAP-ENV:Server") || !soap_match_tag(soap, s, "SOAP-ENV:Receiver"))
+      status = SOAP_SVR_FAULT; 
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:Client") || !soap_match_tag(soap, s, "SOAP-ENV:Sender"))
+      status = SOAP_CLI_FAULT;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:MustUnderstand"))
+      status = SOAP_MUSTUNDERSTAND;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:VersionMismatch"))
+      status = SOAP_VERSIONMISMATCH;
+    else
+    { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Fault code %s\n", s));
+      status = SOAP_FAULT;
+    }
+    if (soap_body_end_in(soap)
+     || soap_envelope_end_in(soap)
+     || soap_end_recv(soap))
+      return soap_closesock(soap);
+    soap->error = status;
+  }
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_empty_response(struct soap *soap)
+{ soap->count = 0;
+  if (soap_response(soap, SOAP_OK) || soap_end_send(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_empty_response(struct soap *soap)
+{ if (soap_begin_recv(soap) || soap_end_recv(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+soap_strerror(struct soap *soap)
+{ register int err = soap->errnum;
+  if (err)
+  {
+#ifndef WIN32
+    return strerror(err);
+#else
+    FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, (LPTSTR)&soap->errorstr, sizeof(soap->errorstr), NULL);
+    return soap->errorstr;
+#endif
+  }
+  return "Operation interrupted or timed out";
+}
+#endif
+#endif 
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_set_error(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail, int soaperror)
+{ *soap_faultcode(soap) = faultcode;
+  if (faultsubcode)
+    *soap_faultsubcode(soap) = faultsubcode;
+  *soap_faultstring(soap) = faultstring;
+  if (faultdetail && *faultdetail)
+  { register const char **s = soap_faultdetail(soap);
+    if (s)
+      *s = faultdetail;
+  }
+  return soap->error = soaperror;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_sender_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_receiver_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_copy_fault(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ char *r = NULL, *s = NULL, *t = NULL;
+  if (faultsubcode)
+    r = soap_strdup(soap, faultsubcode);
+  if (faultstring)
+    s = soap_strdup(soap, faultstring);
+  if (faultdetail)
+    t = soap_strdup(soap, faultdetail);
+  return soap_set_error(soap, faultcode, r, s, t, SOAP_FAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_sender_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_receiver_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault(struct soap *soap, FILE *fd)
+{ if (soap_check_state(soap))
+    fprintf(fd, "Error: soap struct not initialized\n");
+  else if (soap->error)
+  { const char *c, *v = NULL, *s, **d;
+    d = soap_faultcode(soap);
+    if (!*d)
+      soap_set_fault(soap);
+    c = *d;
+    if (soap->version == 2)
+      v = *soap_faultsubcode(soap);
+    s = *soap_faultstring(soap);
+    d = soap_faultdetail(soap);
+    fprintf(fd, "%s%d fault: %s [%s]\n\"%s\"\nDetail: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, c, v ? v : "no subcode", s ? s : "[no reason]", d && *d ? *d : "[no detail]");
+  }
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault_location(struct soap *soap, FILE *fd)
+{ 
+#ifndef WITH_LEAN
+  int i, j, c1, c2;
+  if (soap->error && soap->buflen > 0)
+  { i = (int)soap->bufidx - 1;
+    if (i <= 0)
+      i = 0;
+    c1 = soap->buf[i];
+    soap->buf[i] = '\0';
+    if ((int)soap->buflen >= i + 1024)
+      j = i + 1023;
+    else
+      j = (int)soap->buflen - 1;
+    c2 = soap->buf[j];
+    soap->buf[j] = '\0';
+    fprintf(fd, "%s%c\n** HERE **\n", soap->buf, c1);
+    if (soap->bufidx < soap->buflen)
+      fprintf(fd, "%s\n", soap->buf + soap->bufidx);
+    soap->buf[i] = c1;
+    soap->buf[j] = c2;
+  }
+#endif
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void *arg)
+{ register struct soap_plugin *p;
+  register int r;
+  if (!(p = (struct soap_plugin*)SOAP_MALLOC(soap, sizeof(struct soap_plugin))))
+    return soap->error = SOAP_EOM;
+  p->id = NULL;
+  p->data = NULL;
+  p->fcopy = NULL;
+  p->fdelete = NULL;
+  r = fcreate(soap, p, arg);
+  if (!r && p->fdelete)
+  { p->next = soap->plugins;
+    soap->plugins = p;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Registered '%s' plugin\n", p->id));
+    return SOAP_OK;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not register plugin '%s': plugin returned error %d (or fdelete callback not set)\n", p->id?p->id:"?", r));
+  SOAP_FREE(soap, p);
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static void *
+fplugin(struct soap *soap, const char *id)
+{ register struct soap_plugin *p;
+  for (p = soap->plugins; p; p = p->next)
+    if (p->id == id || !strcmp(p->id, id))
+      return p->data;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void *
+SOAP_FMAC2
+soap_lookup_plugin(struct soap *soap, const char *id)
+{ return soap->fplugin(soap, id);
+}
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap()
+{ soap_init(this);
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	C++ soap struct methods
+ *
+\******************************************************************************/
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode mode)
+{ soap_init1(this, mode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode imode, soap_mode omode)
+{ soap_init2(this, imode, omode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(struct soap& soap)
+{ soap_copy_context(this, &soap);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::~soap()
+{ soap_destroy(this);
+  soap_end(this);
+  soap_done(this);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/samples/magic_VC/stdsoap2.h b/samples/magic_VC/stdsoap2.h
new file mode 100644
index 0000000..1b6c74d
--- /dev/null
+++ b/samples/magic_VC/stdsoap2.h
@@ -0,0 +1,2093 @@
+/*
+
+stdsoap2.h 2.7.6e
+
+gSOAP runtime
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+Contributors:
+
+Wind River Systems, Inc., for the following additions (marked WR[...]):
+  - vxWorks compatible
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#ifdef WITH_SOAPDEFS_H
+# include "soapdefs.h"		/* include user-defined stuff */
+#endif
+
+#ifndef _THREAD_SAFE
+# define _THREAD_SAFE
+#endif
+
+#ifndef OPENSERVER
+# ifndef _REENTRANT
+#  define _REENTRANT
+# endif
+#endif
+
+#ifndef SOAP_FMAC1	/* stdsoap2.h declaration macro */
+# define SOAP_FMAC1
+#endif
+
+#ifndef SOAP_FMAC2	/* stdsoap2.h declaration macro */
+# define SOAP_FMAC2
+#endif
+
+#ifndef SOAP_FMAC3	/* (de)serializer declaration macro */
+# define SOAP_FMAC3
+#endif
+
+#ifndef SOAP_FMAC3S	/* string converter for (de)serializer declaration macro */
+# define SOAP_FMAC3S SOAP_FMAC3
+#endif
+
+#ifndef SOAP_FMAC4	/* (de)serializer declaration macro */
+# define SOAP_FMAC4
+#endif
+
+#ifndef SOAP_FMAC4S	/* string converter for (de)serializer declaration macro */
+# define SOAP_FMAC4S SOAP_FMAC4
+#endif
+
+#ifndef SOAP_FMAC5	/* stub/skeleton declaration macro */
+# define SOAP_FMAC5
+#endif
+
+#ifndef SOAP_FMAC6	/* stub/skeleton declaration macro */
+# define SOAP_FMAC6
+#endif
+
+#ifndef SOAP_CMAC	/* class declaration macro */
+# define SOAP_CMAC
+#endif
+
+#ifndef SOAP_NMAC	/* namespace table declaration macro */
+# define SOAP_NMAC
+#endif
+
+#ifndef SOAP_SOURCE_STAMP
+# define SOAP_SOURCE_STAMP(str)
+#endif
+
+/* gSOAP 2.7.4 and higher: fast look-aside buffering is stable */
+#ifndef WITH_FAST
+# define WITH_FAST
+#endif
+
+#ifdef WITH_LEANER
+# ifndef WITH_LEAN
+#  define WITH_LEAN
+# endif
+#endif
+
+#ifdef WITH_LEAN
+# ifdef WITH_COOKIES
+#  error "Cannot build WITH_LEAN code WITH_COOKIES enabled"
+# endif
+#endif
+
+#ifndef STDSOAP_H
+#define STDSOAP_H
+
+#if defined(__vxworks) || defined(__VXWORKS__)
+# define VXWORKS
+#endif
+
+#ifdef _WIN32
+# ifndef WIN32
+#  define WIN32
+# endif
+#endif
+
+#ifdef UNDER_CE
+# ifndef WIN32
+#  define WIN32
+# endif
+#endif
+
+#ifdef __BORLANDC__
+# ifdef __WIN32__
+#  ifndef WIN32
+#   define WIN32
+#  endif
+# endif
+#endif
+
+#ifdef __CYGWIN__
+# ifndef CYGWIN
+#  define CYGWIN
+# endif
+#endif
+
+#ifdef __SYMBIAN32__ 
+# define SYMBIAN
+# undef WIN32
+#endif
+
+#if defined(__palmos__) || defined(PALM_GCC) || defined(__PALMOS_TRAPS__)
+# ifndef PALM
+#  define PALM
+# endif
+#endif
+
+#if defined(__hpux)
+# ifndef HP_UX
+#  define HP_UX
+# endif
+#endif
+
+#if defined(__alpha) && !defined(__VMS)
+# ifndef TRU64
+#  define TRU64 
+# endif
+#endif
+
+#ifdef __MVS__
+# ifndef OS390
+#  define OS390
+# endif
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+# ifdef WITH_OPENSSL
+#  ifndef HAVE_OPENSSL_SSL_H
+#   undef WITH_OPENSSL
+#  endif
+# endif
+#else
+# if defined(UNDER_CE)
+#  define WITH_LEAN
+#  define HAVE_SSCANF
+# elif defined(WIN32)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define SOAP_LONG_FORMAT "%I64d"
+#  define SOAP_ULONG_FORMAT "%I64u"
+# elif defined(CYGWIN)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(__APPLE__)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_TIMEGM
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(_AIXVERSION_431)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(HP_UX)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(FREEBSD) || defined(__FreeBSD__)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_STRTOLL
+#  define HAVE_STRTOULL
+#  define HAVE_GETTIMEOFDAY
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define SOAP_LONG_FORMAT "%qd"
+#  define SOAP_ULONG_FORMAT "%qu"
+# elif defined(__VMS)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(__GLIBC__) || defined(__GNU__)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_STRTOLL
+#  define HAVE_STRTOULL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_TIMEGM
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define HAVE_ISNAN
+# elif defined(TRU64)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_STRTOLL
+#  define HAVE_STRTOULL
+#  define HAVE_GETTIMEOFDAY
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define __USE_STD_IOSTREAM
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define SOAP_LONG_FORMAT "%ld"
+#  define SOAP_ULONG_FORMAT "%lu"
+# elif defined(MAC_CARBON)
+#  define WITH_NOIO
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GETHOSTBYNAME_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(PALM)
+#  define WITH_LEAN
+#  define HAVE_STRTOD   /* strtod() is defined in palmFunctions.h */
+#  include <stdlib.h>	/* Needs to be included before unix headers */
+#  include <sys_types.h>
+#  define IGNORE_STDIO_STUBS
+#  include <StdIOPalm.h>
+#  define O_NONBLOCK FNONBIO
+#  include <sys_socket.h>
+#  include "palmFunctions.h"
+# elif defined(SYMBIAN)
+#  define WITH_LEAN
+#  define WITH_NONAMESPACES
+#  define HAVE_STRTOD	/* use STRTOD since sscanf doesn't seem to work */
+#  include <e32def.h>
+#  include <sys/ioctl.h>
+# elif defined(VXWORKS)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_PGMTIME_R
+#  define HAVE_PLOCALTIME_R
+#  define HAVE_MKTIME
+# elif defined(OS390)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(AS400)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# else
+/* Default asumptions on supported functions */
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GETHOSTBYNAME_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# endif
+#endif
+
+/* QNX does not have a working version of strtof */
+#if defined(__QNX__) || defined(QNX)
+# undef HAVE_STRTOF
+#endif
+
+#ifndef SOAP_LONG_FORMAT
+# define SOAP_LONG_FORMAT "%lld"	/* printf format for 64 bit ints */
+#endif
+
+#ifndef SOAP_ULONG_FORMAT
+# define SOAP_ULONG_FORMAT "%llu"	/* printf format for unsigned 64 bit ints */
+#endif
+
+#ifndef WITH_NOSTDLIB
+# include <stdlib.h>
+# ifndef PALM
+#  include <stdio.h>
+#  include <string.h>
+# endif
+# include <ctype.h>
+# include <limits.h>
+#endif
+
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+# include <string>
+# include <iostream>
+#endif
+
+#ifdef WITH_NOHTTP
+# ifndef WITH_NOIO
+#  define WITH_NOIO
+#  undef WITH_COOKIES
+# endif
+#endif
+
+#ifndef UNDER_CE
+# ifndef PALM
+#  ifndef WITH_NOIO
+#   include <errno.h>
+#   include <sys/types.h>
+#  endif
+#  ifndef WITH_LEAN
+#   ifdef HAVE_SYS_TIMEB_H
+#    include <sys/timeb.h>		/* for ftime() */
+#   endif
+#   include <time.h>
+#  endif
+# endif
+#endif
+
+#ifdef OPENSERVER
+# include <sys/socket.h>
+# include <sys/stream.h>
+# include <sys/protosw.h>
+  extern int h_errno;
+#endif
+
+#ifndef WITH_NOIO
+# ifndef WIN32
+#  ifndef PALM
+#   include <sys/socket.h>
+#   ifdef VXWORKS
+#    include <sockLib.h>
+#    include <selectLib.h>
+#   endif
+#   ifndef VXWORKS
+#    ifndef SYMBIAN
+#     include <strings.h>
+#    endif
+#   endif
+#   ifdef SUN_OS
+#    include <sys/stream.h>		/* SUN */
+#    include <sys/socketvar.h>		/* SUN < 2.8 (?) */
+#   endif
+#   ifdef VXWORKS
+#    ifdef _WRS_KERNEL
+#     include <sys/times.h>
+#    endif
+#   else
+#    include <sys/time.h>
+#   endif
+#   include <netinet/in.h>
+#   ifdef OS390
+#    include <netinet/tcp_var.h>
+#   else
+#    include <netinet/tcp.h>          /* TCP_NODELAY */
+#   endif
+#   include <arpa/inet.h>
+#  endif
+# endif
+#endif
+
+#ifdef WITH_FASTCGI
+# include <fcgi_stdio.h>
+#endif
+
+#ifdef WITH_OPENSSL
+# define OPENSSL_NO_KRB5
+# include <openssl/ssl.h>
+# include <openssl/err.h>
+# include <openssl/rand.h>
+# ifndef ALLOW_OLD_VERSIONS
+#  if (OPENSSL_VERSION_NUMBER < 0x00905100L)
+#   error "Must use OpenSSL 0.9.6 or later"
+#  endif
+# endif
+#endif
+
+#ifdef WITH_GZIP
+# ifndef WITH_ZLIB
+#  define WITH_ZLIB
+# endif
+#endif
+
+#ifdef WITH_CASEINSENSITIVETAGS
+# define SOAP_STRCMP soap_tag_cmp	/* case insensitve XML element/attribute names */
+#else
+# define SOAP_STRCMP strcmp		/* case sensitive XML element/attribute names */
+#endif
+
+#ifdef WITH_ZLIB
+# include <zlib.h>
+#endif
+
+#ifndef WITH_NOSTDLIB
+# ifndef PALM
+#  include <math.h>	/* for isnan() */
+# endif
+#endif
+
+/* #define DEBUG */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and messages (in file TEST.log) */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef WIN32
+# ifndef UNDER_CE
+#  include <io.h>
+#  include <fcntl.h>
+# endif
+# include <winsock.h>
+/* # include <winsock2.h> */ /* Alternative: use winsock2 (not available with eVC) */
+# ifdef WITH_IPV6
+#  include <ws2tcpip.h>
+#  include <wspiapi.h>
+# endif
+#else
+# ifdef VXWORKS
+#  include <hostLib.h>
+#  include <ioctl.h>
+#  include <ioLib.h>
+# endif
+# ifndef WITH_NOIO
+#  ifndef PALM
+#   include <netdb.h>
+#   include <netinet/in.h>
+#   include <unistd.h>
+#   include <fcntl.h>
+#  endif
+# endif
+#endif
+
+/* Portability: define SOAP_SOCKLEN_T */
+#if defined(_AIX)
+# define SOAP_SOCKLEN_T socklen_t
+#elif defined(SOCKLEN_T)
+# define SOAP_SOCKLEN_T SOCKLEN_T
+#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) || defined(FREEBSD) || defined(__FreeBSD__) || defined(__QNX__) || defined(QNX)
+# define SOAP_SOCKLEN_T socklen_t
+#elif defined(IRIX) || defined(WIN32) || defined(__APPLE__) || defined(HP_UX) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS)
+# define SOAP_SOCKLEN_T int
+#else
+# define SOAP_SOCKLEN_T size_t
+#endif
+
+#ifndef SOAP_SOCKET
+# ifdef WIN32
+#  define SOAP_SOCKET SOCKET
+# else
+#  define SOAP_SOCKET int
+#  define closesocket(n) close(n)
+# endif
+#endif
+
+#define SOAP_INVALID_SOCKET (-1)
+#define soap_valid_socket(n) ((n) != SOAP_INVALID_SOCKET)
+
+#if defined(SYMBIAN)
+# define LONG64 long
+# define ULONG64 unsigned LONG64
+#elif !defined(WIN32) || defined(__GLIBC__) || defined(__GNU__)
+# ifndef LONG64
+#  define LONG64 long long
+#  define ULONG64 unsigned LONG64
+# endif
+#elif defined(UNDER_CE)
+# define LONG64 __int64
+# define ULONG64 unsigned LONG64
+#elif defined(__BORLANDC__)
+# define LONG64 __int64
+# define ULONG64 unsigned LONG64
+#endif
+
+#if defined(WIN32)
+# define soap_int32 __int32
+#elif defined(SYMBIAN)
+# define soap_int32 long
+#elif defined(PALM)
+# define soap_int32 Int32
+#else
+# define soap_int32 int32_t
+#endif
+
+#ifdef WIN32
+# define SOAP_ERANGE ERANGE
+# define SOAP_EINTR WSAEINTR
+# define SOAP_EAGAIN WSAEWOULDBLOCK
+# define SOAP_EWOULDBLOCK WSAEWOULDBLOCK
+# define SOAP_EINPROGRESS WSAEINPROGRESS
+#else
+# define SOAP_ERANGE ERANGE
+# define SOAP_EINTR EINTR
+# define SOAP_EAGAIN EAGAIN
+# ifdef SYMBIAN
+#  define SOAP_EWOULDBLOCK 9898
+#  define SOAP_EINPROGRESS 9899
+# else
+#  define SOAP_EWOULDBLOCK EWOULDBLOCK
+#  define SOAP_EINPROGRESS EINPROGRESS
+# endif
+#endif
+
+#ifdef WIN32
+# ifdef UNDER_CE
+#  define soap_errno GetLastError()
+#  define soap_socket_errno GetLastError()
+#  define soap_reset_errno SetLastError(0)
+# else
+#  define soap_errno GetLastError()
+#  define soap_socket_errno WSAGetLastError()
+#  define soap_reset_errno SetLastError(0)
+# endif
+#else
+# ifndef WITH_NOIO
+#  define soap_errno errno
+#  define soap_socket_errno errno
+#  define soap_reset_errno (errno = 0)
+# else
+#  define soap_errno 0
+#  define soap_socket_errno 0
+#  define soap_reset_errno
+# endif
+#endif
+
+#ifndef SOAP_BUFLEN
+# ifdef WITH_UDP
+#  define SOAP_BUFLEN (65536) /* max UDP packet size */
+# else
+#  ifndef WITH_LEAN
+#   define SOAP_BUFLEN (65536) /* buffer length for socket packets, also used by gethostbyname_r so don't make this too small */
+#  else
+#   define SOAP_BUFLEN  (2048)
+#  endif
+# endif
+#endif
+#ifndef SOAP_LABLEN
+# define SOAP_LABLEN     (64) /* initial look-aside buffer length */
+#endif
+#ifndef SOAP_PTRBLK
+# define SOAP_PTRBLK     (32) /* block allocation for pointer hash table chains */
+#endif
+#ifndef SOAP_PTRHASH
+# ifndef WITH_LEAN
+#  define SOAP_PTRHASH (1024) /* size of pointer analysis hash table (must be power of 2) */
+# else
+#  define SOAP_PTRHASH   (32)
+# endif
+#endif
+#ifndef SOAP_IDHASH
+# ifndef WITH_LEAN
+#  define SOAP_IDHASH  (1999) /* prime size of hash table for parsed id/ref */
+# else
+#  define SOAP_IDHASH    (19) /* 19, 199 */
+# endif
+#endif
+#ifndef SOAP_BLKLEN
+# ifndef WITH_LEAN
+#  define SOAP_BLKLEN   (256) /* size of blocks to collect long strings and XML attributes */
+# else
+#  define SOAP_BLKLEN    (32)
+# endif
+#endif
+#ifndef SOAP_TAGLEN
+# ifndef WITH_LEAN
+#  define SOAP_TAGLEN  (1024) /* maximum length of XML element tag/attribute name or host/path name + 1 */
+# else
+#  define SOAP_TAGLEN    (64)
+# endif
+#endif
+#ifndef SOAP_HDRLEN
+# ifndef WITH_LEAN
+#  define SOAP_HDRLEN  (8192) /* maximum length of HTTP header line (must be >4096 to read cookies) */
+# else
+#  define SOAP_HDRLEN  (1024)
+# endif
+#endif
+#ifndef SOAP_MAXDIMS
+# ifndef WITH_LEAN
+#  define SOAP_MAXDIMS	 (16) /* maximum array dimensions (array nestings) must be less than 64 to protect soap->tmpbuf */
+# else
+#  define SOAP_MAXDIMS	  (4)
+# endif
+#endif
+
+#ifndef SOAP_MAXLOGS
+# define SOAP_MAXLOGS	  (3) /* max number of debug logs per struct soap environment */
+# define SOAP_INDEX_RECV  (0)
+# define SOAP_INDEX_SENT  (1)
+# define SOAP_INDEX_TEST  (2)
+#endif
+
+#ifndef SOAP_MAXKEEPALIVE
+# define SOAP_MAXKEEPALIVE (100) /* max iterations to keep server connection alive */
+#endif
+
+#ifndef SOAP_MAXARRAYSIZE
+# define SOAP_MAXARRAYSIZE (100000) /* "trusted" max size of inbound SOAP array for compound array allocation */
+#endif
+
+#ifdef VXWORKS
+# ifdef __INCmathh 
+#  include <private/mathP.h>
+#  ifndef HAVE_ISNAN
+#   define HAVE_ISNAN
+#  endif
+#  define soap_isnan(num) isNan(num)
+# endif
+#endif
+
+#ifdef WIN32 
+# include <float.h>
+# ifndef HAVE_ISNAN
+#  define HAVE_ISNAN
+# endif
+# define soap_isnan(num) _isnan(num)
+#endif
+
+#ifdef SUN_OS
+# define soap_isnan(n) isnan(n)
+#endif
+
+#if !defined(HAVE_ISNAN) && (defined(_MATH_H) || defined(_MATH_INCLUDED))
+# define HAVE_ISNAN
+#endif
+
+#ifndef soap_isnan
+# ifdef HAVE_ISNAN
+#  define soap_isnan(n) isnan(n)
+# else
+#  define soap_isnan(_) (0)
+# endif
+#endif
+
+extern const struct soap_double_nan { unsigned int n1, n2; } soap_double_nan;
+
+#ifdef VXWORKS
+# ifndef FLT_MAX
+#  define FLT_MAX _ARCH_FLT_MAX
+# endif
+# ifndef DBL_MAX
+#  define DBL_MAX _ARCH_DBL_MAX
+# endif
+#endif
+
+#ifndef FLT_NAN
+# ifdef HAVE_ISNAN
+#  define FLT_NAN (*(float*)(void*)&soap_double_nan)
+# else
+#  define FLT_NAN (0.0)
+# endif
+#endif
+
+#ifndef FLT_PINFTY
+# if defined(FLT_MAX)
+#  define FLT_PINFTY FLT_MAX
+# elif defined(HUGE_VALF)
+#  define FLT_PINFTY (float)HUGE_VALF
+# elif defined(HUGE_VAL)
+#  define FLT_PINFTY (float)HUGE_VAL
+# elif defined(FLOAT_MAX)
+#  define FLT_PINFTY FLOAT_MAX
+# else
+#  define FLT_PINFTY (3.40282347e+38F)
+# endif
+#endif
+
+#ifndef FLT_NINFTY
+# define FLT_NINFTY (-FLT_PINFTY)
+#endif
+
+#ifndef DBL_NAN
+# ifdef HAVE_ISNAN
+#  define DBL_NAN (*(double*)(void*)&soap_double_nan)
+# else
+#  define DBL_NAN (0.0)
+# endif
+#endif
+
+#ifndef DBL_PINFTY
+# if defined(DBL_MAX)
+#  define DBL_PINFTY DBL_MAX
+# elif defined(HUGE_VALF)
+#  define DBL_PINFTY (double)HUGE_VALF
+# elif defined(HUGE_VAL)
+#  define DBL_PINFTY (double)HUGE_VAL
+# elif defined(DOUBLE_MAX)
+#  define DBL_PINFTY DOUBLE_MAX
+# else
+#  define DBL_PINFTY (1.7976931348623157e+308)
+# endif
+#endif
+
+#ifndef DBL_NINFTY
+# define DBL_NINFTY (-DBL_PINFTY)
+#endif
+
+#define soap_ispinfd(n) ((n) >= DBL_PINFTY)
+#define soap_ispinff(n) ((n) >= FLT_PINFTY)
+#define soap_isninfd(n) ((n) <= DBL_NINFTY)
+#define soap_isninff(n) ((n) <= FLT_NINFTY)
+
+/* gSOAP error codes */
+
+#define SOAP_EOF			EOF
+#define SOAP_ERR			EOF
+#define SOAP_OK				0
+#define SOAP_CLI_FAULT			1
+#define SOAP_SVR_FAULT			2
+#define SOAP_TAG_MISMATCH		3
+#define SOAP_TYPE			4
+#define SOAP_SYNTAX_ERROR		5
+#define SOAP_NO_TAG			6
+#define SOAP_IOB			7
+#define SOAP_MUSTUNDERSTAND		8
+#define SOAP_NAMESPACE			9
+#define SOAP_USER_ERROR			10
+#define SOAP_FATAL_ERROR		11
+#define SOAP_FAULT			12
+#define SOAP_NO_METHOD			13
+#define SOAP_GET_METHOD			14
+#define SOAP_EOM			15
+#define SOAP_NULL			16
+#define SOAP_DUPLICATE_ID		17
+#define SOAP_MISSING_ID			18
+#define SOAP_HREF			19
+#define SOAP_UDP_ERROR			20
+#define SOAP_TCP_ERROR			21
+#define SOAP_HTTP_ERROR			22
+#define SOAP_SSL_ERROR			23
+#define SOAP_ZLIB_ERROR			24
+#define SOAP_DIME_ERROR			25
+#define SOAP_DIME_HREF			26
+#define SOAP_DIME_MISMATCH		27
+#define SOAP_DIME_END			28
+#define SOAP_MIME_ERROR			29
+#define SOAP_MIME_HREF			30
+#define SOAP_MIME_END			31
+#define SOAP_VERSIONMISMATCH		32
+#define SOAP_PLUGIN_ERROR		33
+#define SOAP_DATAENCODINGUNKNOWN	34
+#define SOAP_REQUIRED			35
+#define SOAP_PROHIBITED			36
+#define SOAP_OCCURS			37
+#define SOAP_LENGTH			38
+
+#define soap_xml_error_check(e) ((e) == SOAP_TAG_MISMATCH || (e) == SOAP_TAG_END || (e) == SOAP_SYNTAX_ERROR || (e) == SOAP_NAMESPACE || (e) == SOAP_DUPLICATE_ID || (e) == SOAP_MISSING_ID || (e) == SOAP_REQUIRED || (e) == SOAP_PROHIBITED || (e) == SOAP_OCCURS || (e) == SOAP_LENGTH || (e) == SOAP_NULL || (e) == SOAP_HREF)
+#define soap_soap_error_check(e) ((e) == SOAP_CLI_FAULT || (e) == SOAP_SVR_FAULT || (e) == SOAP_VERSIONMISMATCH || (e) == SOAP_MUSTUNDERSTAND || (e) == SOAP_FAULT || (e) == SOAP_NO_METHOD)
+#define soap_tcp_error_check(e) ((e) == SOAP_EOF || (e) == SOAP_TCP_ERROR)
+#define soap_ssl_error_check(e) ((e) == SOAP_SSL_ERROR)
+#define soap_zlib_error_check(e) ((e) == SOAP_ZLIB_ERROR)
+#define soap_http_error_check(e) ((e) == SOAP_HTTP_ERROR || (e) == SOAP_GET_METHOD || ((e) >= 100 && (e) < 600))
+
+/* gSOAP HTTP response status codes 100 to 599 are reserved */
+
+/* Codes 600 to 999 are user definable */
+
+/* Exceptional gSOAP HTTP response status codes >= 1000 */
+
+#define SOAP_STOP		1000	/* No HTTP response */
+#define SOAP_FORM		1001	/* Form request/response */
+#define SOAP_HTML		1002	/* Custom HTML response */
+#define SOAP_FILE		1003	/* Custom file-based response */
+
+/* gSOAP HTTP method codes */
+
+#define SOAP_POST		2000
+#define SOAP_GET		2001
+
+/* gSOAP DIME */
+
+#define SOAP_DIME_CF		0x01
+#define SOAP_DIME_ME		0x02
+#define SOAP_DIME_MB		0x04
+#define SOAP_DIME_VERSION	0x08 /* DIME version 1 */
+#define SOAP_DIME_MEDIA		0x10
+#define SOAP_DIME_ABSURI	0x20
+
+/* gSOAP ZLIB */
+
+#define SOAP_ZLIB_NONE		0x00
+#define SOAP_ZLIB_DEFLATE	0x01
+#define SOAP_ZLIB_INFLATE	0x02
+#define SOAP_ZLIB_GZIP		0x02
+
+/* gSOAP transport, connection, and content encoding modes */
+
+typedef soap_int32 soap_mode;
+
+#define SOAP_IO			0x00000003	/* IO mask */
+#define SOAP_IO_FLUSH		0x00000000	/* flush output immediately, no buffering */
+#define SOAP_IO_BUFFER		0x00000001	/* buffer output in packets of size SOAP_BUFLEN */
+#define SOAP_IO_STORE		0x00000002	/* store entire output to determine length for transport */
+#define SOAP_IO_CHUNK		0x00000003	/* use HTTP chunked transfer AND buffer packets */
+
+#define SOAP_IO_UDP		0x00000004
+#define SOAP_IO_LENGTH		0x00000008
+#define SOAP_IO_KEEPALIVE	0x00000010
+
+#define SOAP_ENC_LATIN		0x00800020	/* iso-8859-1 encoding */
+#define SOAP_ENC_XML		0x00000040	/* plain XML encoding, no HTTP header */
+#define SOAP_ENC_DIME		0x00000080
+#define SOAP_ENC_MIME		0x00000100
+#define SOAP_ENC_MTOM		0x00000200
+#define SOAP_ENC_ZLIB		0x00000400
+#define SOAP_ENC_SSL		0x00000800
+
+#define SOAP_ENC		0x00000FFF	/* IO and ENC mask */
+
+#define SOAP_XML_STRICT		0x00001000	/* strict validation */
+#define SOAP_XML_INDENT		0x00002000
+#define SOAP_XML_CANONICAL	0x00004000	/* EXC C14N canonical XML */
+#define SOAP_XML_TREE		0x00008000
+#define SOAP_XML_GRAPH		0x00010000
+#define SOAP_XML_NIL		0x00020000
+#define SOAP_XML_DOM		0x00040000
+#define SOAP_XML_SEC		0x00080000	/* reserved for WS security */
+
+#define SOAP_C_NOIOB		0x00100000
+#define SOAP_C_UTFSTRING	0x00200000
+#define SOAP_C_MBSTRING		0x00400000
+
+#define SOAP_DOM_TREE		0x01000000
+#define SOAP_DOM_NODE		0x02000000
+#define SOAP_DOM_ASIS		0x04000000
+
+#define SOAP_IO_DEFAULT		SOAP_IO_FLUSH
+
+/* SSL client/server authentication settings */
+
+#define SOAP_SSL_NO_AUTHENTICATION		0x00	/* for testing purposes */
+#define SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION	0x01	/* client requires server to authenticate */
+#define SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION	0x02	/* server requires client to authenticate */
+
+#define SOAP_SSL_DEFAULT			SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION
+
+/* state */
+
+#define SOAP_INIT	1
+#define SOAP_COPY	2
+
+#define soap_check_state(soap) (!(soap) || ((soap)->state != SOAP_INIT && (soap)->state != SOAP_COPY))
+
+/* part */
+
+#define SOAP_BEGIN		0
+#define SOAP_IN_ENVELOPE	2
+#define SOAP_IN_HEADER		3
+#define SOAP_END_HEADER		4
+#define SOAP_NO_BODY		5
+#define SOAP_IN_BODY		6
+#define SOAP_END_BODY		7
+#define SOAP_END_ENVELOPE	8
+#define SOAP_END		9
+#define SOAP_BEGIN_SECURITY	10
+#define SOAP_IN_SECURITY	11
+#define SOAP_END_SECURITY	12
+
+/* DEBUG macros */
+
+#ifndef WITH_LEAN
+# ifdef DEBUG
+#  ifndef SOAP_DEBUG
+#   define SOAP_DEBUG
+#  endif
+# endif
+#endif
+
+#ifdef SOAP_DEBUG
+# define SOAP_MALLOC(soap, size) soap_track_malloc(soap, __FILE__, __LINE__, size)
+# define SOAP_FREE(soap, ptr) soap_track_free(soap, __FILE__, __LINE__, ptr)
+#endif
+
+#ifndef SOAP_MALLOC			/* use libc malloc */
+# define SOAP_MALLOC(soap, size) malloc(size)
+#endif
+
+#ifndef SOAP_FREE			/* use libc free */
+# define SOAP_FREE(soap, ptr) free(ptr)
+#endif
+
+#ifdef SOAP_DEBUG
+# ifndef SOAP_MESSAGE
+#  define SOAP_MESSAGE fprintf
+# endif
+# ifndef DBGLOG
+#  define DBGLOG(DBGFILE, CMD) \
+{ if (soap)\
+  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
+      soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\
+    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
+    { FILE *fdebug = soap->fdebug[SOAP_INDEX_##DBGFILE];\
+      CMD;\
+      fflush(fdebug);\
+    }\
+  }\
+}
+# endif
+# ifndef DBGMSG
+#  define DBGMSG(DBGFILE, MSG, LEN) \
+{ if (soap)\
+  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
+      soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\
+    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
+    { fwrite((MSG), 1, (LEN), soap->fdebug[SOAP_INDEX_##DBGFILE]);\
+      fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\
+    }\
+  }\
+}
+# endif
+# ifndef DGBFUN
+#  define DBGFUN(FNAME) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s()\n", __FILE__, __LINE__, FNAME))
+#  define DBGFUN1(FNAME, FMT, ARG) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT")\n", __FILE__, __LINE__, FNAME, (ARG)))
+#  define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2)))
+#  define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2", "FMT3")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2), (ARG3)))
+# endif
+# ifndef DBGHEX
+#  define DBGHEX(DBGFILE, MSG, LEN) \
+{ if (soap)\
+  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
+      soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\
+    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
+    { int i; char *s;\
+      for (s = (char*)(MSG), i = (LEN); i; i--)\
+        fprintf(soap->fdebug[SOAP_INDEX_##DBGFILE], "%2.2hhX  ", *s++);\
+      fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\
+    }\
+  }\
+}
+# endif
+#else
+# define DBGLOG(DBGFILE, CMD)
+# define DBGMSG(DBGFILE, MSG, LEN)
+# define DBGFUN(FNAME)
+# define DBGFUN1(FNAME, FMT, ARG)
+# define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2)
+# define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3)
+# define DBGHEX(DBGFILE, MSG, LEN)
+#endif
+
+/* UCS-4 requires 32 bits (0-7FFFFFFF, the sign bit is used by gSOAP to distinguish XML entities) */
+typedef soap_int32 soap_wchar;
+
+/* namespace table row */
+struct Namespace
+{ const char *id;
+  const char *ns;
+  const char *in;
+  char *out;
+};
+
+/* namespace stack */
+struct soap_nlist
+{ struct soap_nlist *next;
+  unsigned int level; /* nesting depth level */
+  short index; /* corresponding entry in ns mapping table */
+  char *ns; /* only set when parsed ns URI is not in the ns mapping table */
+  char id[1]; /* the actual string value flows into the allocated region below this struct */
+};
+
+/* block stack for nested block allocations */
+struct soap_blist
+{ struct soap_blist *next;
+  char *ptr;
+  size_t size;
+};
+
+/* array layout */
+struct soap_array
+{ void *__ptr;
+  int __size;
+};
+
+/* pointer serialization management */
+struct soap_plist
+{ struct soap_plist *next;
+  const void *ptr;
+  const struct soap_array *array;
+  int type;
+  int id;
+  char mark1;
+  char mark2;
+};
+
+/* block allocation for pointer serialization management */
+struct soap_pblk
+{ struct soap_pblk *next;
+  struct soap_plist plist[SOAP_PTRBLK];
+};
+
+#ifdef SOAP_DEBUG
+/* malloc/free tracking for debugging */
+struct soap_mlist
+{ struct soap_mlist *next;
+  const void *ptr;
+  const char *file;
+  int line;
+  short live;
+};
+#endif
+
+/* class allocation list */
+struct soap_clist
+{ struct soap_clist *next;
+  void *ptr;
+  int type;
+  int size;
+  void (*fdelete)(struct soap_clist*);
+};
+
+/* attributes */
+struct soap_attribute
+{ struct soap_attribute *next;
+  char *value;
+  size_t size;
+  char *ns;
+  short visible;
+  char name[1]; /* the actual name string flows into the allocated region below this struct */
+};
+
+struct soap_cookie
+{ struct soap_cookie *next;
+  char *name;
+  char *value;
+  char *domain;
+  char *path;
+  long expire;		/* client-side: local time to expire; server-side: seconds to expire */
+  unsigned int version;
+  short secure;
+  short session;	/* server-side */
+  short env;		/* server-side: got cookie from client and should not be (re)send */
+  short modified;	/* server-side: client cookie was modified and should be send */
+};
+
+#ifdef __cplusplus
+SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*);
+
+class soap_multipart_iterator
+{ public:
+  struct soap_multipart *content;
+  bool operator==(const soap_multipart_iterator& iter) const
+    { return content == iter.content; }
+  bool operator!=(const soap_multipart_iterator& iter) const
+    { return content != iter.content; }
+  struct soap_multipart &operator*() const
+    { return *content; }
+  soap_multipart_iterator &operator++()
+    { content = soap_next_multipart(content); return *this; }
+  soap_multipart_iterator() : content(NULL)
+    { }
+  soap_multipart_iterator(struct soap_multipart *p) : content(p)
+    { }
+};
+#endif
+
+#ifndef WITH_LEANER
+struct soap_dime
+{ size_t count;
+  size_t size;
+  size_t chunksize;
+  size_t buflen;
+  char flags;
+  char *ptr;
+  const char *id;
+  const char *type;
+  const char *options;
+  struct soap_multipart *list;		/* list of DIME attachments received */
+  struct soap_multipart *first, *last;	/* temporary in/out queue */
+#ifdef __cplusplus
+  soap_multipart_iterator begin()
+    { soap_multipart_iterator iter(list); return iter; };
+  soap_multipart_iterator end()
+    { soap_multipart_iterator iter(NULL); return iter; };
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+struct soap_mime
+{ char *boundary;			/* MIME boundary */
+  const char *start;			/* MIME start ID */
+  struct soap_multipart *list;		/* list of MIME attachments received */
+  struct soap_multipart *first, *last;	/* temporary in/out queue */
+#ifdef __cplusplus
+  soap_multipart_iterator begin()
+    { soap_multipart_iterator iter(list); return iter; };
+  soap_multipart_iterator end()
+    { soap_multipart_iterator iter(NULL); return iter; };
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+/* RFC2045 MIME content transfer encodings */
+enum soap_mime_encoding
+{ SOAP_MIME_NONE,
+  SOAP_MIME_7BIT,
+  SOAP_MIME_8BIT,
+  SOAP_MIME_BINARY,
+  SOAP_MIME_QUOTED_PRINTABLE,
+  SOAP_MIME_BASE64,
+  SOAP_MIME_IETF_TOKEN,
+  SOAP_MIME_X_TOKEN
+};
+#endif
+
+#ifndef WITH_LEANER
+/* DIME/MIME multipart list */
+struct soap_multipart
+{ struct soap_multipart *next;
+  char *ptr;				/* points to raw data content */
+  size_t size;				/* size of data content */
+  const char *id;			/* DIME/MIME content ID or form data name */
+  const char *type;			/* DIME/MIME type (MIME type format) */
+  const char *options;			/* DIME options */
+  enum soap_mime_encoding encoding;	/* MIME Content-Transfer-Encoding */
+  const char *location;			/* MIME Content-Location (optional) */
+  const char *description;		/* MIME Content-Description (optional) */
+#ifdef __cplusplus
+  typedef soap_multipart_iterator iterator;
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+/* attachment DIME and MTOM XOP forwarding */
+struct soap_xlist
+{ struct soap_xlist *next;
+  unsigned char **ptr;
+  int *size;
+  char *id;
+  char **type;
+  char **options;
+};
+#endif
+
+/******************************************************************************/
+
+#ifndef WITH_LEANER
+#ifdef __cplusplus
+class soap_dom_attribute_iterator
+{ public:
+  struct soap_dom_attribute *att;
+  const char *nstr;
+  const char *name;
+  bool operator==(const soap_dom_attribute_iterator&) const;
+  bool operator!=(const soap_dom_attribute_iterator&) const;
+  struct soap_dom_attribute &operator*() const;
+  soap_dom_attribute_iterator &operator++();
+  soap_dom_attribute_iterator();
+  soap_dom_attribute_iterator(struct soap_dom_attribute*);
+  ~soap_dom_attribute_iterator();
+};
+#endif
+#endif
+
+#ifndef WITH_LEANER
+struct soap_dom_attribute
+{ struct soap_dom_attribute *next;
+  const char *nstr;
+  char *name;
+  char *data;
+  wchar_t *wide;
+  struct soap *soap;
+#ifdef __cplusplus
+  typedef soap_dom_attribute_iterator iterator;
+  struct soap_dom_attribute &set(const char *nstr, const char *name);	/* set namespace and name */
+  struct soap_dom_attribute &set(const char *data);		/* set data */
+  soap_dom_attribute_iterator begin();
+  soap_dom_attribute_iterator end();
+  soap_dom_attribute_iterator find(const char *nstr, const char *name);
+  void unlink();
+  soap_dom_attribute();
+  soap_dom_attribute(struct soap *soap);
+  soap_dom_attribute(struct soap *soap, const char *nstr, const char *name, const char *data);
+  ~soap_dom_attribute();
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+#ifdef __cplusplus
+class soap_dom_element_iterator
+{ public:
+  struct soap_dom_element *elt;
+  const char *nstr;
+  const char *name;
+  int type;
+  bool operator==(const soap_dom_element_iterator&) const;
+  bool operator!=(const soap_dom_element_iterator&) const;
+  struct soap_dom_element &operator*() const;
+  soap_dom_element_iterator &operator++();
+  soap_dom_element_iterator();
+  soap_dom_element_iterator(struct soap_dom_element*);
+  ~soap_dom_element_iterator();
+};
+#endif
+#endif
+
+#ifndef WITH_LEANER
+struct soap_dom_element
+{ struct soap_dom_element *next;	/* next sibling */
+  struct soap_dom_element *prnt;	/* parent */
+  struct soap_dom_element *elts;	/* list of child elements */
+  struct soap_dom_attribute *atts;	/* list of attributes */
+  const char *nstr;			/* namespace string */
+  char *name;				/* element tag name */
+  char *data;				/* element content data (with SOAP_C_UTFSTRING flag set) */
+  wchar_t *wide;			/* element content data */
+  int type;				/* optional: serialized C/C++ data type */
+  void *node;				/* optional: pointer to serialized C/C++ data */
+  char *head;				/* leading whitespace to start tag */
+  char *tail;				/* leading whitespace to end tag */
+  struct soap *soap;			/* soap context that manages this node */
+#ifdef __cplusplus
+  typedef soap_dom_element_iterator iterator;
+  struct soap_dom_element &set(const char *nstr, const char *name);
+  struct soap_dom_element &set(const char *data);
+  struct soap_dom_element &set(void *node, int type);
+  struct soap_dom_element &add(struct soap_dom_element*);
+  struct soap_dom_element &add(struct soap_dom_element&);
+  struct soap_dom_element &add(struct soap_dom_attribute*);
+  struct soap_dom_element &add(struct soap_dom_attribute&);
+  soap_dom_element_iterator begin();
+  soap_dom_element_iterator end();
+  soap_dom_element_iterator find(const char *nstr, const char *name);
+  soap_dom_element_iterator find(int type);
+  void unlink();
+  soap_dom_element();
+  soap_dom_element(struct soap *soap);
+  soap_dom_element(struct soap *soap, const char *nstr, const char *name);
+  soap_dom_element(struct soap *soap, const char *nstr, const char *name, const char *data);
+  soap_dom_element(struct soap *soap, const char *nstr, const char *name, void *node, int type);
+  ~soap_dom_element();
+#endif
+};
+SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_dom_next_element(struct soap_dom_element *elt);
+SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_dom_next_attribute(struct soap_dom_attribute *att);
+#endif
+
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+}
+extern std::ostream &operator<<(std::ostream&, const struct soap_dom_element&);
+extern std::istream &operator>>(std::istream&, struct soap_dom_element&);
+extern "C" {
+#endif
+
+/******************************************************************************/
+
+struct soap
+{ short state;			/* 0 = uninitialized, 1 = initialized, 2 = copy of another soap struct */
+  short version;		/* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table) */
+  soap_mode mode;
+  soap_mode imode;
+  soap_mode omode;
+  const char *float_format;	/* user-definable format string for floats (<1024 chars) */
+  const char *double_format;	/* user-definable format string for doubles (<1024 chars) */
+  const char *dime_id_format;	/* user-definable format string for integer DIME id (<SOAP_TAGLEN chars) */
+  const char *http_version;	/* HTTP version used "1.0" or "1.1" */
+  const char *http_content;	/* optional custom response content type (with SOAP_FILE) */
+  const char *encodingStyle;	/* default = NULL which means that SOAP encoding is used */
+  const char *actor;		/* SOAP-ENV:actor or role attribute value */
+  int recv_timeout;		/* when > 0, gives socket recv timeout in seconds, < 0 in usec */
+  int send_timeout;		/* when > 0, gives socket send timeout in seconds, < 0 in usec */
+  int connect_timeout;		/* when > 0, gives socket connect() timeout in seconds, < 0 in usec */
+  int accept_timeout;		/* when > 0, gives socket accept() timeout in seconds, < 0 in usec */
+  int socket_flags;		/* socket recv() and send() flags, e.g. set to MSG_NOSIGNAL to disable sigpipe */
+  int connect_flags;		/* connect() SOL_SOCKET sockopt flags, e.g. set to SO_DEBUG to debug socket */
+  int bind_flags;		/* bind() SOL_SOCKET sockopt flags, e.g. set to SO_REUSEADDR to enable reuse */
+  int accept_flags;		/* accept() SOL_SOCKET sockopt flags */
+  const struct Namespace *namespaces;	/* Pointer to global namespace mapping table */
+  struct Namespace *local_namespaces;	/* Local namespace mapping table */
+  struct soap_nlist *nlist;	/* namespace stack */
+  struct soap_blist *blist;	/* block allocation stack */
+  struct soap_clist *clist;	/* class instance allocation list */
+  void *alist;			/* memory allocation (malloc) list */
+  struct soap_ilist *iht[SOAP_IDHASH];
+  struct soap_plist *pht[SOAP_PTRHASH];
+  struct soap_pblk *pblk;	/* plist block allocation */
+  short pidx;			/* plist block allocation */
+  struct SOAP_ENV__Header *header;
+  struct SOAP_ENV__Fault *fault;
+  int idnum;
+  void *user;			/* to pass user-defined data */
+  struct soap_plugin *plugins;	/* linked list of plug-in data */
+  char *userid;			/* HTTP Basic authorization userid */
+  char *passwd;			/* HTTP Basic authorization passwd */
+  int (*fpost)(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
+  int (*fget)(struct soap*);
+  int (*fform)(struct soap*);
+  int (*fposthdr)(struct soap*, const char*, const char*);
+  int (*fresponse)(struct soap*, int, size_t);
+  int (*fparse)(struct soap*);
+  int (*fparsehdr)(struct soap*, const char*, const char*);
+  int (*fresolve)(struct soap*, const char*, struct in_addr* inaddr);
+  int (*fconnect)(struct soap*, const char*, const char*, int);
+  int (*fdisconnect)(struct soap*);
+  int (*fclosesocket)(struct soap*, SOAP_SOCKET);
+  int (*fshutdownsocket)(struct soap*, SOAP_SOCKET, int);
+  int (*fopen)(struct soap*, const char*, const char*, int);
+  int (*faccept)(struct soap*, int, struct sockaddr*, int *n);
+  int (*fclose)(struct soap*);
+  int (*fsend)(struct soap*, const char*, size_t);
+  size_t (*frecv)(struct soap*, char*, size_t);
+  int (*fpoll)(struct soap*);
+  void (*fseterror)(struct soap*, const char **c, const char **s);
+  int (*fignore)(struct soap*, const char*);
+  int (*fserveloop)(struct soap*);
+  void *(*fplugin)(struct soap*, const char*);
+#ifndef WITH_LEANER
+  int (*fprepareinit)(struct soap*);
+  int (*fpreparesend)(struct soap*, const char*, size_t);
+  int (*fpreparerecv)(struct soap*, const char*, size_t);
+  int (*fpreparefinal)(struct soap*);
+  void *(*fdimereadopen)(struct soap*, void*, const char*, const char*, const char*);
+  void *(*fdimewriteopen)(struct soap*, const char*, const char*, const char*);
+  void (*fdimereadclose)(struct soap*, void*);
+  void (*fdimewriteclose)(struct soap*, void*);
+  size_t (*fdimeread)(struct soap*, void*, char*, size_t);
+  int (*fdimewrite)(struct soap*, void*, const char*, size_t);
+#endif
+  int master;
+  int socket;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  std::ostream *os;
+  std::istream *is;
+#else
+  void *os;	/* preserve alignment */
+  void *is;	/* preserve alignment */
+#endif
+#ifndef UNDER_CE
+  int sendfd;
+  int recvfd;
+#else
+  FILE *sendfd;
+  FILE *recvfd;
+#endif
+#ifdef WIN32
+  char errorstr[256];	/* buf for FormatMessage() */
+#endif
+  size_t bufidx;	/* index in soap.buf[] */
+  size_t buflen;	/* length of soap.buf[] content */
+  soap_wchar ahead;	/* parser lookahead */
+  short cdata;		/* CDATA parser state */
+  short body;		/* parsed XML element has a body or not */
+  unsigned int level;	/* XML nesting level */
+  size_t count;		/* message length counter */
+  size_t length;	/* message length as set by HTTP header */
+#ifdef WITH_FAST
+  char *labbuf;		/* look-aside buffer */
+  size_t lablen;	/* look-aside buffer allocated length */
+  size_t labidx;	/* look-aside buffer index to available part */
+#endif
+  char buf[SOAP_BUFLEN];/* send and receive buffer */
+  char tmpbuf[1024];	/* in/output buffer for HTTP headers, simpleType values, attribute names, and DIME >=1024 bytes */
+  char msgbuf[1024];	/* output buffer for (error) messages <=1024 bytes */
+  char tag[SOAP_TAGLEN];
+  char id[SOAP_TAGLEN];
+  char href[SOAP_TAGLEN];
+  char type[SOAP_TAGLEN];
+  char arrayType[SOAP_TAGLEN];
+  char arraySize[SOAP_TAGLEN];
+  char arrayOffset[SOAP_TAGLEN];
+  short other;
+  short position;
+  int positions[SOAP_MAXDIMS];
+  short root;
+  struct soap_attribute *attributes;	/* attribute list */
+  short encoding;	/* when set, output encodingStyle */
+  short mustUnderstand;	/* a mustUnderstand element was parsed or is output */
+  short keep_alive;	/* connection should be kept open */
+  short null;		/* parsed XML is xsi:nil */
+  short ns;		/* when not set, output full xmlns bindings */
+  short part;		/* parsing state */
+  short alloced;
+  short peeked;
+  size_t chunksize;
+  size_t chunkbuflen;
+  char endpoint[SOAP_TAGLEN];
+  char path[SOAP_TAGLEN];
+  char host[SOAP_TAGLEN];
+  char *action;
+  char *authrealm;		/* HTTP authentication realm */
+  char *prolog;			/* XML declaration prolog */
+  unsigned long ip;		/* IP number */
+  int port;			/* port number */
+  unsigned int max_keep_alive;
+  const char *proxy_host;	/* Proxy Server host name */
+  int proxy_port;		/* Proxy Server port (default = 8080) */
+  const char *proxy_userid;	/* Proxy Authorization user name */
+  const char *proxy_passwd;	/* Proxy Authorization password */
+  int status;			/* -1 when request, else error code to be returned by server */
+  int error;
+  int errmode;
+  int errnum;
+#ifndef WITH_LEANER
+  struct soap_dom_element *dom;
+  struct soap_dime dime;
+  struct soap_mime mime;
+  struct soap_xlist *xlist;
+#endif
+#if !defined(WITH_LEAN) || defined(SOAP_DEBUG)
+  const char *logfile[SOAP_MAXLOGS];
+  FILE *fdebug[SOAP_MAXLOGS];
+  struct soap_mlist *mht[SOAP_PTRHASH];
+#endif
+#ifndef WITH_LEAN
+  const char *c14ninclude;
+  const char *c14nexclude;
+  struct soap_cookie *cookies;
+  const char *cookie_domain;
+  const char *cookie_path;
+  int cookie_max;
+#endif
+#ifndef WITH_NOIO
+#ifdef WITH_IPV6
+  struct sockaddr_storage peer;	/* IPv6: set by soap_accept and by UDP recv */
+#else
+  struct sockaddr_in peer;	/* IPv4: set by soap_connect/soap_accept and by UDP recv */
+#endif
+  size_t peerlen;
+#endif
+#ifdef WITH_OPENSSL
+  int (*fsslauth)(struct soap*);
+  int (*fsslverify)(int, X509_STORE_CTX*);
+  BIO *bio;
+  SSL *ssl;
+  SSL_CTX *ctx;
+  short require_server_auth;
+  short require_client_auth;
+  short rsa;			/* when set, use RSA instead of DH */
+  const char *keyfile;
+  const char *password;
+  const char *dhfile;
+  const char *cafile;
+  const char *capath;
+  const char *crlfile;
+  const char *randfile;
+  SSL_SESSION *session;
+  char session_host[SOAP_TAGLEN];
+  int session_port;
+#endif
+#ifdef WITH_ZLIB
+  short zlib_state;		/* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_INFLATE */
+  short zlib_in;		/* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */
+  short zlib_out;		/* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */
+  z_stream d_stream;		/* decompression stream */
+  char z_buf[SOAP_BUFLEN];	/* buffer */
+  size_t z_buflen;
+  unsigned short z_level;	/* compression level to be used (0=none, 1=fast to 9=best) */
+  uLong z_crc;			/* internal gzip crc */
+  float z_ratio_in;		/* detected compression ratio compressed_length/length of inbound message */
+  float z_ratio_out;		/* detected compression ratio compressed_length/length of outbound message */
+#endif
+#ifdef WMW_RPM_IO
+  void *rpmreqid;
+#endif
+#ifndef WITH_LEAN
+#ifdef __cplusplus
+  soap();
+  soap(soap_mode);
+  soap(soap_mode, soap_mode);
+  soap(struct soap&);
+  ~soap();
+#endif
+#endif
+};
+
+struct soap_code_map
+{ long code;
+  const char *string;
+};
+
+/* forwarding list */
+struct soap_flist
+{ struct soap_flist *next;
+  int type;
+  void *ptr;
+  unsigned int level;
+  size_t len;
+  void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t);
+};
+
+/* id-ref forwarding list */
+struct soap_ilist
+{ struct soap_ilist *next;
+  int type;
+  size_t size;
+  void *link;
+  void *copy;
+  struct soap_flist *flist;
+  void *ptr;
+  unsigned int level;
+  char id[1]; /* the actual id string value flows into the allocated region below this struct */
+};
+
+struct soap_plugin
+{ struct soap_plugin *next;
+  const char *id;
+  void *data;
+  int (*fcopy)(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src);
+  void (*fdelete)(struct soap *soap, struct soap_plugin *p); /* should delete fields of plugin only and not free(p) */
+};
+
+#ifndef WITH_NONAMESPACES
+extern SOAP_NMAC struct Namespace namespaces[];
+#endif
+
+#ifndef WITH_LEAN
+# define soap_get0(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx])
+# define soap_get1(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx++])
+#else
+soap_wchar soap_get0(struct soap*);
+soap_wchar soap_get1(struct soap*);
+#endif
+
+#define soap_revget1(soap) ((soap)->bufidx--)
+#define soap_unget(soap, c) ((soap)->ahead = c)
+#define soap_register_plugin(soap, plugin) soap_register_plugin_arg(soap, plugin, NULL)
+#define soap_imode(soap, n) ((soap)->mode = (soap)->imode = (n))
+#define soap_set_imode(soap, n) ((soap)->imode |= (n))
+#define soap_clr_imode(soap, n) ((soap)->imode &= ~(n))
+#define soap_omode(soap, n) ((soap)->mode = (soap)->omode = (n))
+#define soap_set_omode(soap, n) ((soap)->omode |= (n))
+#define soap_clr_omode(soap, n) ((soap)->omode &= ~(n))
+#define soap_set_mode(soap, n) ((soap)->imode |= (n), (soap)->omode |= (n))
+#define soap_clr_mode(soap, n) ((soap)->imode &= ~(n), (soap)->omode &= ~(n))
+#define soap_destroy(soap) soap_delete((soap), NULL)
+
+#ifdef HAVE_STRRCHR
+# define soap_strrchr(s, t) strrchr(s, t)
+#else
+ SOAP_FMAC1 char* SOAP_FMAC2 soap_strrchr(const char *s, int t);
+#endif
+
+#ifdef HAVE_STRTOL
+# define soap_strtol(s, t, b) strtol(s, t, b)
+#else
+ SOAP_FMAC1 long SOAP_FMAC2 soap_strtol(const char *s, char **t, int b);
+#endif
+
+#ifdef HAVE_STRTOUL
+# define soap_strtoul(s, t, b) strtoul(s, t, b)
+#else
+ SOAP_FMAC1 unsigned long SOAP_FMAC2 soap_strtoul(const char *s, char **t, int b);
+#endif
+
+#if defined(WITH_OPENSSL)
+# define soap_random soap_rand()
+SOAP_FMAC1 int SOAP_FMAC2 soap_rand();
+#elif defined(HAVE_RANDOM)
+# define soap_random (int)random()
+#else
+# define soap_random rand()
+#endif
+
+#ifdef WITH_NOIDREF
+# define soap_embedded(s, p, t) (0)
+# define soap_id_lookup(s, i, p, t, n, k) (p)
+# define soap_id_forward(s, h, p, len, st, tt, n, k, fc) (p)
+# define soap_reference(s, a, t) (1)
+# define soap_array_reference(s, p, a, n, t) (1)
+# define soap_embed(s, p, a, n, t, pp) (0)
+# define soap_embedded_id(s, i, p, t) (i)
+# define soap_is_embedded(s, p) (0)
+# define soap_is_single(s, p) (1)
+# define soap_lookup_type(s, i) (0)
+# define soap_getindependent(s) (0)
+# define soap_putindependent(s) (0)
+# define soap_getelement(s, n) (n)
+# define soap_putelement(s, p, t, i, n) (0)
+# define soap_markelement(s, p, n) (0)
+#endif
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_fault(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultcode(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultsubcode(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultstring(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultdetail(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_serializeheader(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putheader(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getheader(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_serializefault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putfault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getfault(struct soap*);
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_ssl_init();
+SOAP_FMAC1 int SOAP_FMAC2 soap_poll(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_connect_command(struct soap*, int, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_connect(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_bind(struct soap*, const char*, int, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_accept(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_accept(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_server_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_client_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_puthttphdr(struct soap*, int status, size_t count);
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_get_header_attribute(struct soap*, const char*, const char*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_key(char*, size_t, const char*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_val(char*, size_t, const char*);
+
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_hash(const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_endpoint(struct soap*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_flush_raw(struct soap*, const char*, size_t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_flush(struct soap*);
+SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_get(struct soap*);
+SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getchar(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_tag_cmp(const char*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_fault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault_subcode(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault_subcode(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_sender_error(struct soap*, const char*, const char*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_receiver_error(struct soap*, const char*, const char*, int);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_send_raw(struct soap*, const char*, size_t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_raw(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_send(struct soap*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_send2(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_send3(struct soap*, const char*, const char*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_pututf8(struct soap*, unsigned long);
+SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getutf8(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_putbase64(struct soap*, const unsigned char*, int);
+SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_getbase64(struct soap*, int*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_puthex(struct soap*, const unsigned char*, int);
+SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_gethex(struct soap*, int*);
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_xop_forward(struct soap*, unsigned char**, int*, char**, char**, char**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_dime_forward(struct soap*, unsigned char**, int*, char**, char**, char**);
+#endif
+
+#ifndef WITH_NOIDREF
+SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup_id(struct soap*, void *p, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup(struct soap*, const void *p, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_enter(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_array_pointer_lookup(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type);
+SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_lookup(struct soap*, const char*);
+SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_enter(struct soap*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_resolve(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_embedded(struct soap*, const void *p, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_reference(struct soap*, const void *p, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_array_reference(struct soap*, const void *p, const struct soap_array *a, int n, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_embedded_id(struct soap*, int id, const void *p, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_is_embedded(struct soap*, struct soap_plist*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_is_single(struct soap*, struct soap_plist*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_embedded(struct soap*, struct soap_plist*);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_begin_count(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_end_count(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_begin_send(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_end_send(struct soap*);
+
+SOAP_FMAC1 const struct soap_code_map* SOAP_FMAC2 soap_code(const struct soap_code_map*, const char *str);
+SOAP_FMAC1 long SOAP_FMAC2 soap_int_code(const struct soap_code_map*, const char *str, long other);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_str_code(const struct soap_code_map*, long code);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_getline(struct soap*, char*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_begin_recv(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_end_recv(struct soap*);
+
+SOAP_FMAC1 void* SOAP_FMAC2 soap_malloc(struct soap*, size_t);
+SOAP_FMAC1 void SOAP_FMAC2 soap_dealloc(struct soap*, void*);
+SOAP_FMAC1 struct soap_clist * SOAP_FMAC2 soap_link(struct soap*, void*, int, int, void (*fdelete)(struct soap_clist*));
+SOAP_FMAC1 void SOAP_FMAC2 soap_unlink(struct soap*, const void*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_free(struct soap*);
+
+SOAP_FMAC1 void* SOAP_FMAC2 soap_track_malloc(struct soap*, const char*, int, size_t);
+SOAP_FMAC1 void SOAP_FMAC2 soap_track_free(struct soap*, const char*, int, void*);
+
+#ifndef WITH_NOIDREF
+SOAP_FMAC1 int SOAP_FMAC2 soap_lookup_type(struct soap*, const char *id);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_id_lookup(struct soap*, const char *id, void **p, int t, size_t n, unsigned int k);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_id_forward(struct soap*, const char *id, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void(*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t));
+#endif
+SOAP_FMAC1 void* SOAP_FMAC2 soap_id_enter(struct soap*, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*));
+SOAP_FMAC1 void SOAP_FMAC2 soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t, const void *q, size_t n);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_size(const int *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getoffsets(const char *, const int *, int *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getsize(const char *, const char *, int *);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getsizes(const char *, int *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getposition(const char *, int *);
+
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putsize(struct soap*, const char *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizesoffsets(struct soap*, const char *, const int *, const int *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizes(struct soap*, const char *, const int *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffset(struct soap*, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffsets(struct soap*, const int *, int);
+ 
+SOAP_FMAC1 int SOAP_FMAC2 soap_closesock(struct soap*);
+
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new(void);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new1(soap_mode);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new2(soap_mode, soap_mode);
+SOAP_FMAC1 void SOAP_FMAC2 soap_del(struct soap*);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy(struct soap*);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy_context(struct soap*, struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_init(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_init1(struct soap*, soap_mode);
+SOAP_FMAC1 void SOAP_FMAC2 soap_init2(struct soap*, soap_mode, soap_mode);
+SOAP_FMAC1 void SOAP_FMAC2 soap_done(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_cleanup(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_begin(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_end(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_delete(struct soap*, void*);
+
+#ifdef SOAP_DEBUG
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_recv_logfile(struct soap*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_sent_logfile(struct soap*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_test_logfile(struct soap*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_close_logfiles(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_open_logfile(struct soap*, int);
+#endif
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_token(struct soap*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_value(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_match_tag(struct soap*, const char*, const char *);
+SOAP_FMAC1 int SOAP_FMAC2 soap_match_array(struct soap*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_element(struct soap*, const char*, int, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_out(struct soap*, const char *tag, int id, const char *type);
+SOAP_FMAC1 int SOAP_FMAC2 soap_array_begin_out(struct soap*, const char *tag, int id, const char *type, const char *offset);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_ref(struct soap*, const char *tag, int id, int href);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_href(struct soap*, const char *tag, int id, const char *ref, const char *val);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_null(struct soap*, const char *tag, int id, const char *type);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_id(struct soap*, const char *tag, int id, const void *p, const struct soap_array *a, int d, const char *type, int n);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_result(struct soap*, const char *tag);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_out(struct soap*, const char *tag);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_start_end_out(struct soap*, const char *tag);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_attribute(struct soap*, const char*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_in(struct soap*, const char *tag, int nillable);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_in(struct soap*, const char *tag);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_peek_element(struct soap*);
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_retry(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_revert(struct soap*);
+
+SOAP_FMAC1 char* SOAP_FMAC2 soap_strdup(struct soap*, const char*);
+SOAP_FMAC1 const char * SOAP_FMAC2 soap_strsearch(const char *big, const char *little);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_string_out(struct soap*, const char *s, int flag);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_string_in(struct soap*, int, long, long);
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_wstring_out(struct soap*, const wchar_t *s, int flag);
+SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstring_in(struct soap*, int, long, long);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_match_namespace(struct soap*, const char *, const char*, int n1, int n2);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_namespaces(struct soap*, struct Namespace*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_local_namespaces(struct soap*);
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_pop_namespace(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_push_namespace(struct soap*, const char *,const char *);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_current_namespace(struct soap *soap, const char *tag);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_store_lab(struct soap*, const char*, size_t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_append_lab(struct soap*, const char*, size_t);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_new_block(struct soap*);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_push_block(struct soap*, size_t);
+SOAP_FMAC1 void SOAP_FMAC2 soap_pop_block(struct soap*);
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_size_block(struct soap*, size_t);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_first_block(struct soap*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_next_block(struct soap*);
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_block_size(struct soap*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_save_block(struct soap*, char*, int);
+SOAP_FMAC1 void SOAP_FMAC2 soap_end_block(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_out(struct soap*);
+SOAP_FMAC1 int soap_envelope_end_out(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_in(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_end_in(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_out(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_out(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_in(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_in(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_header(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_response(struct soap*, int);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_send_empty_response(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_empty_response(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_send_fault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_fault(struct soap*);
+
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault(struct soap*, FILE*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault_location(struct soap*, FILE*);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2byte(struct soap*, const char*, char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2short(struct soap*, const char*, short*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2int(struct soap*, const char*, int*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2long(struct soap*, const char*, long*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2LONG64(struct soap*, const char*, LONG64*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2float(struct soap*, const char*, float*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2double(struct soap*, const char*, double*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedByte(struct soap*, const char*, unsigned char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedShort(struct soap*, const char*, unsigned short*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedInt(struct soap*, const char*, unsigned int*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedLong(struct soap*, const char*, unsigned long*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2ULONG64(struct soap*, const char*, ULONG64*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2string(struct soap*, const char*, char**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2QName(struct soap*, const char*, char**);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2wchar(struct soap*, const char*, wchar_t**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2dateTime(struct soap*, const char*, time_t*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_s2base64(struct soap*, const unsigned char*, char*, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_s2hex(struct soap*, const unsigned char*, char*, int);
+#endif
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_byte2s(struct soap*, char);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_short2s(struct soap*, short);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_int2s(struct soap*, int);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_long2s(struct soap*, long);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_LONG642s(struct soap*, LONG64);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_float2s(struct soap*, float);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_double2s(struct soap*, double);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedByte2s(struct soap*, unsigned char);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedShort2s(struct soap*, unsigned short);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedInt2s(struct soap*, unsigned int);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedLong2s(struct soap*, unsigned long);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_ULONG642s(struct soap*, ULONG64);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_QName2s(struct soap*, const char*);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_wchar2s(struct soap*, const wchar_t*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_dateTime2s(struct soap*, time_t);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_base642s(struct soap*, const char*, char*, size_t, int*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_hex2s(struct soap*, const char*, char*, size_t, int*);
+#endif
+
+
+SOAP_FMAC1 int* SOAP_FMAC2 soap_inint(struct soap*, const char *tag, int *p, const char *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_inbyte(struct soap*, const char *tag, char *p, const char *, int);
+SOAP_FMAC1 long* SOAP_FMAC2 soap_inlong(struct soap*, const char *tag, long *p, const char *, int);
+SOAP_FMAC1 LONG64* SOAP_FMAC2 soap_inLONG64(struct soap*, const char *tag, LONG64 *p, const char *, int);
+SOAP_FMAC1 short* SOAP_FMAC2 soap_inshort(struct soap*, const char *tag, short *p, const char *, int);
+SOAP_FMAC1 float* SOAP_FMAC2 soap_infloat(struct soap*, const char *tag, float *p, const char *, int);
+SOAP_FMAC1 double* SOAP_FMAC2 soap_indouble(struct soap*, const char *tag, double *p, const char *, int);
+SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_inunsignedByte(struct soap*, const char *tag, unsigned char *p, const char *, int);
+SOAP_FMAC1 unsigned short* SOAP_FMAC2 soap_inunsignedShort(struct soap*, const char *tag, unsigned short *p, const char *, int);
+SOAP_FMAC1 unsigned int* SOAP_FMAC2 soap_inunsignedInt(struct soap*, const char *tag, unsigned int *p, const char *, int);
+SOAP_FMAC1 unsigned long* SOAP_FMAC2 soap_inunsignedLong(struct soap*, const char *tag, unsigned long *p, const char *, int);
+SOAP_FMAC1 ULONG64* SOAP_FMAC2 soap_inULONG64(struct soap*, const char *tag, ULONG64 *p, const char *, int);
+SOAP_FMAC1 char** SOAP_FMAC2 soap_instring(struct soap*, const char *tag, char **p, const char *, int, int, long, long);
+SOAP_FMAC1 char** SOAP_FMAC2 soap_inliteral(struct soap*, const char *tag, char **p);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 time_t* SOAP_FMAC2 soap_indateTime(struct soap*, const char *tag, time_t *p, const char *, int);
+#endif
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwstring(struct soap*, const char *tag, wchar_t **p, const char *, int, long, long);
+SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwliteral(struct soap*, const char *tag, wchar_t **p);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_outbyte(struct soap*, const char *tag, int id, const char *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outshort(struct soap*, const char *tag, int id, const short *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outint(struct soap*, const char *tag, int id, const int *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outlong(struct soap*, const char *tag, int id, const long *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outLONG64(struct soap*, const char *tag, int id, const LONG64 *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outfloat(struct soap*, const char *tag, int id, const float *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outdouble(struct soap*, const char *tag, int id, const double *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedByte(struct soap*, const char *tag, int id, const unsigned char *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedShort(struct soap*, const char *tag, int id, const unsigned short *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedInt(struct soap*, const char *tag, int id, const unsigned int *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedLong(struct soap*, const char *tag, int id, const unsigned long *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outULONG64(struct soap*, const char *tag, int id, const ULONG64 *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outstring(struct soap*, const char *tag, int id, char *const*p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outliteral(struct soap*, const char *tag, char *const*p);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 int SOAP_FMAC2 soap_outdateTime(struct soap*, const char *tag, int id, const time_t *p, const char *, int);
+#endif
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_outwstring(struct soap*, const char *tag, int id, wchar_t *const*p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outwliteral(struct soap*, const char *tag, wchar_t *const*p);
+#endif
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_attachment(struct soap *, const char*, int, const void*, const struct soap_array*, const char*, const char*, const char*, int, const char*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_move(struct soap*, long);
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_tell(struct soap*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_dime_option(struct soap*, unsigned short, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getdimehdr(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getdime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putdimehdr(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putdime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getmimehdr(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getmime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putmimehdr(struct soap*, struct soap_multipart*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putmime(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_dime(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_mime(struct soap*, const char *boundary, const char *start);
+SOAP_FMAC1 void SOAP_FMAC2 soap_clr_dime(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_clr_mime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_dime_attachment(struct soap*, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_mime_attachment(struct soap*, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description);
+SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_register_plugin_arg(struct soap*, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void*);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_lookup_plugin(struct soap*, const char*);
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_attr_value(struct soap *soap, const char *name, int flag);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_attr(struct soap *soap, const char *name, const char *value);
+SOAP_FMAC1 void SOAP_FMAC2 soap_clr_attr(struct soap *soap);
+
+#ifdef WITH_COOKIES
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_encode_cookie(const char*, char*, size_t);
+SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_set_cookie(struct soap*, const char*, const char*, const char*, const char*);
+SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_cookie(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern char* SOAP_FMAC2 soap_cookie_value(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern char* SOAP_FMAC2 soap_env_cookie_value(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern long SOAP_FMAC2 soap_cookie_expire(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_expire(struct soap*, const char*, long, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_session(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_clr_cookie_session(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern void SOAP_FMAC2 soap_clr_cookie(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_getenv_cookies(struct soap*);
+SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_copy_cookies(struct soap*);
+SOAP_FMAC1 extern void SOAP_FMAC2 soap_free_cookies(struct soap*);
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif
+
diff --git a/samples/mtom/Makefile b/samples/mtom/Makefile
new file mode 100644
index 0000000..cf7e4f2
--- /dev/null
+++ b/samples/mtom/Makefile
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		mtom
+mtom:		mtom-test.h mtom-test.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c -I../../import mtom-test.h
+		$(CC) $(CFLAGS) -o mtom-test mtom-test.c soapC.c soapClient.c soapServer.c $(SOAPC) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h mtom
diff --git a/samples/mtom/MakefileSolaris b/samples/mtom/MakefileSolaris
new file mode 100644
index 0000000..e43b65d
--- /dev/null
+++ b/samples/mtom/MakefileSolaris
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lnsl -lxnet -lsocket
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		mtom
+mtom:		mtom-test.h mtom-test.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c mtom-test.h
+		$(CC) $(CFLAGS) -o mtom-test mtom-test.c soapC.c soapClient.c soapServer.c $(SOAPC) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h mtom
diff --git a/samples/mtom/mtom-test.c b/samples/mtom/mtom-test.c
new file mode 100644
index 0000000..d2bcbef
--- /dev/null
+++ b/samples/mtom/mtom-test.c
@@ -0,0 +1,281 @@
+/*
+
+mtom-test.c
+
+This application includes a MTOM test client and server. As a client
+application, it fires four different base64 or MTOM attachments to the server.
+As a server, it will respond to the messages by converting base64 into MTOM
+attachments and vice versa.
+
+Usage (server):
+mtom-test <port>
+
+Usage (client):
+mtom-test http://localhost:<port> "<message>" "<MIME-type>"
+
+Usage (client):
+mtom-test http://localhost:<port> "<message>" "<MIME-type>" "<message2>" "<message3>" ...
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "soapH.h"
+#include "mtom_test.nsmap"
+
+int cgi_serve();
+int run_serve(int port);
+int run_tests(int,char**);
+
+int main(int argc, char **argv)
+{ if (argc < 2)
+    return cgi_serve();
+  if (argc < 3)
+    return run_serve(atoi(argv[1]));
+  return run_tests(argc, argv);
+}
+
+int cgi_serve()
+{ /* CGI-style: serve request from stdin */
+  return soap_serve(soap_new1(SOAP_ENC_MTOM)); /* enable MTOM XOP attachments */
+}
+
+int run_serve(int port)
+{ struct soap *soap = soap_new1(SOAP_ENC_MTOM);
+  int ret;
+  if (!soap_valid_socket(soap_bind(soap, NULL, port, 100)))
+    soap_print_fault(soap, stderr);
+  else
+  { fprintf(stderr, "Bind to port %d successful\n", port);
+    soap->accept_timeout = 3600; /* let server time out after one hour */
+    for (;;)
+    { int sock = soap_accept(soap);
+      if (!soap_valid_socket(sock))
+      { if (soap->errnum)
+          soap_print_fault(soap, stderr);
+        else
+        { fprintf(stderr, "Server timed out\n");
+          break;
+        }
+      }
+      fprintf(stderr, "Accepting socket %d connection from IP %d.%d.%d.%d... ", sock, (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF);
+      if (soap_serve(soap))
+        soap_print_fault(soap, stderr);
+      fprintf(stderr, "done\n");
+      soap_destroy(soap);
+      soap_end(soap);
+    } 
+  }
+  ret = soap->error;
+  soap_done(soap);
+  free(soap);
+  return ret;
+}
+
+int run_tests(int argc, char **argv)
+{ struct soap *soap = soap_new1(SOAP_ENC_MTOM);
+  int i, ret;
+  struct x__DataType data;
+  struct x__WrapperType wrap;
+  struct __m__EchoTestSingleResponse single;
+  struct __m__EchoTestMultipleResponse multiple;
+  soap_default_x__DataType(soap, &data);
+  soap_default_x__WrapperType(soap, &wrap);
+
+  /* First test call */
+  data.__union = SOAP_UNION_x__data_base64;
+  data.choice.base64.__ptr = (unsigned char*)argv[2];
+  data.choice.base64.__size = (int)strlen(argv[2]) + 1;
+  if (argc > 3)
+    data.xmlmime__contentType = argv[3];
+  if (soap_call___m__EchoTestSingle(soap, argv[1], NULL, &data, &single))
+    soap_print_fault(soap, stderr);
+  else
+  { if (!single.x__Data || single.x__Data->__union != SOAP_UNION_x__data_xop__Include || !single.x__Data->choice.xop__Include.__ptr || single.x__Data->choice.xop__Include.__size != data.choice.base64.__size || strcmp((char*)single.x__Data->choice.xop__Include.__ptr, (char*)data.choice.base64.__ptr))
+      fprintf(stderr, "EchoTestSingle 1: data transcription error\n");
+    else
+      fprintf(stderr, "EchoTestSingle 1: OK\n");
+    /* Second test call */
+    data.__union = SOAP_UNION_x__data_xop__Include;
+    data.choice.xop__Include.__ptr = (unsigned char*)argv[2];
+    data.choice.xop__Include.__size = (int)strlen(argv[2]) + 1;
+    data.choice.xop__Include.id = NULL;
+    data.choice.xop__Include.type = "text/xml; charset=utf-8";
+    data.choice.xop__Include.options = NULL;
+    if (soap_call___m__EchoTestSingle(soap, argv[1], NULL, &data, &single))
+      soap_print_fault(soap, stderr);
+    else
+    { if (!single.x__Data
+       || single.x__Data->__union != SOAP_UNION_x__data_base64
+       || !single.x__Data->choice.base64.__ptr
+       || single.x__Data->choice.base64.__size != data.choice.xop__Include.__size
+       || strcmp((char*)single.x__Data->choice.base64.__ptr, (char*)data.choice.xop__Include.__ptr))
+        fprintf(stderr, "EchoTestSingle 2: data transcription error\n");
+      else
+      { fprintf(stderr, "EchoTestSingle 2: OK\n");
+        /* Third test call */
+        wrap.__size = argc - 2;
+        wrap.Data = (struct x__DataType*)soap_malloc(soap, wrap.__size * sizeof(struct x__DataType));
+        for (i = 0; i < wrap.__size; ++i)
+        { soap_default_x__DataType(soap, &wrap.Data[i]);
+          wrap.Data[i].__union = SOAP_UNION_x__data_base64;
+          wrap.Data[i].choice.base64.__ptr = (unsigned char*)argv[i + 2];
+          wrap.Data[i].choice.base64.__size = (int)strlen(argv[i + 2]) + 1;
+          wrap.Data[i].xmlmime__contentType = "text/xml";
+        }
+        if (soap_call___m__EchoTestMultiple(soap, argv[1], NULL, &wrap, &multiple))
+          soap_print_fault(soap, stderr);
+        else
+        { int okay = 1;
+          if (!multiple.x__EchoTest
+	   || multiple.x__EchoTest->__size != wrap.__size)
+            okay = 0;
+          else
+          { for (i = 0; i < multiple.x__EchoTest->__size; ++i)
+              if (multiple.x__EchoTest->Data[i].__union != SOAP_UNION_x__data_xop__Include
+	       || !multiple.x__EchoTest->Data[i].choice.xop__Include.__ptr
+	       || multiple.x__EchoTest->Data[i].choice.xop__Include.__size != wrap.Data[i].choice.base64.__size
+	       || strcmp((char*)multiple.x__EchoTest->Data[i].choice.xop__Include.__ptr, (char*)wrap.Data[i].choice.base64.__ptr))
+                okay = 0;
+          }
+          if (!okay)
+            fprintf(stderr, "EchoTestMultiple 1: data transcription error\n");
+          else
+          { fprintf(stderr, "EchoTestMultiple 1: OK\n");
+            /* Fourth test call */
+            for (i = 0; i < wrap.__size; ++i)
+            { soap_default_x__DataType(soap, &wrap.Data[i]);
+              wrap.Data[i].__union = SOAP_UNION_x__data_xop__Include;
+              wrap.Data[i].choice.xop__Include.__ptr = (unsigned char*)argv[i + 2];
+              wrap.Data[i].choice.xop__Include.__size = (int)strlen(argv[i + 2]) + 1;
+              wrap.Data[i].choice.xop__Include.id = NULL;
+              wrap.Data[i].choice.xop__Include.type = "text/xml";
+              wrap.Data[i].choice.xop__Include.options = NULL;
+              wrap.Data[i].xmlmime__contentType = "text/xml";
+            }
+            if (soap_call___m__EchoTestMultiple(soap, argv[1], NULL, &wrap, &multiple))
+              soap_print_fault(soap, stderr);
+            else
+            { int okay = 1;
+              if (!multiple.x__EchoTest
+	       || multiple.x__EchoTest->__size != wrap.__size)
+                okay = 0;
+              else
+              { for (i = 0; i < multiple.x__EchoTest->__size; ++i)
+                  if (multiple.x__EchoTest->Data[i].__union != SOAP_UNION_x__data_base64
+		   || !multiple.x__EchoTest->Data[i].choice.base64.__ptr
+		   || multiple.x__EchoTest->Data[i].choice.base64.__size != wrap.Data[i].choice.xop__Include.__size || strcmp((char*)multiple.x__EchoTest->Data[i].choice.base64.__ptr, (char*)wrap.Data[i].choice.xop__Include.__ptr))
+                    okay = 0;
+              }
+              if (!okay)
+                fprintf(stderr, "EchoTestMultiple 2: data transcription error\n");
+              else
+                fprintf(stderr, "EchoTestMultiple 2: OK\n");
+            }
+          }
+        }
+      }
+    }
+  }
+  ret = soap->error;
+  soap_destroy(soap);
+  soap_end(soap);
+  soap_done(soap);
+  free(soap);
+  return ret;
+}
+
+int __m__EchoTestSingle(struct soap *soap, struct x__DataType *data, struct __m__EchoTestSingleResponse *response)
+{ if (!data)
+    return soap_sender_fault(soap, "No data", NULL);
+  /* allocate response */
+  response->x__Data = (struct x__DataType*)soap_malloc(soap, sizeof(struct x__DataType));
+  if (!response->x__Data)
+    return SOAP_EOM;
+  /* copy data into response, switching from base64 to MTOM and vice versa */
+  switch (data->__union)
+  { case SOAP_UNION_x__data_xop__Include:
+      /* convert MTOM attachment to base64Binary */
+      response->x__Data->__union = SOAP_UNION_x__data_base64;
+      response->x__Data->choice.base64.__ptr = data->choice.xop__Include.__ptr;
+      response->x__Data->choice.base64.__size = data->choice.xop__Include.__size;
+      response->x__Data->xmlmime__contentType = data->choice.xop__Include.type;
+      break;
+    case SOAP_UNION_x__data_base64:
+      /* convert base64Binary to MTOM attachment */
+      response->x__Data->__union = SOAP_UNION_x__data_xop__Include;
+      response->x__Data->choice.xop__Include.__ptr = data->choice.base64.__ptr;
+      response->x__Data->choice.xop__Include.__size = data->choice.base64.__size;
+      response->x__Data->choice.xop__Include.id = NULL;
+      response->x__Data->choice.xop__Include.type = data->xmlmime__contentType;
+      response->x__Data->choice.xop__Include.options = NULL;
+      response->x__Data->xmlmime__contentType = data->xmlmime__contentType;
+      break;
+    default:
+      return soap_sender_fault(soap, "Wrong data format", NULL);
+  }
+  return SOAP_OK;
+}
+
+int __m__EchoTestMultiple(struct soap *soap, struct x__WrapperType *x__EchoTest, struct __m__EchoTestMultipleResponse *response)
+{ int i;
+  if (!x__EchoTest)
+    return soap_sender_fault(soap, "No data", NULL);
+  /* allocate response */
+  response->x__EchoTest = (struct x__WrapperType*)soap_malloc(soap, sizeof(struct x__WrapperType));
+  if (!response->x__EchoTest)
+    return SOAP_EOM;
+  response->x__EchoTest->__size = x__EchoTest->__size;
+  response->x__EchoTest->Data = (struct x__DataType*)soap_malloc(soap, sizeof(struct x__DataType) * x__EchoTest->__size);
+  if (!response->x__EchoTest->Data)
+    return SOAP_EOM;
+  /* copy data into response, switching from base64 to MTOM and vice versa */
+  for (i = 0; i < x__EchoTest->__size; ++i)
+  { switch (x__EchoTest->Data[i].__union)
+    { case SOAP_UNION_x__data_xop__Include:
+        /* convert MTOM attachment to base64Binary */
+        response->x__EchoTest->Data[i].__union = SOAP_UNION_x__data_base64;
+        response->x__EchoTest->Data[i].choice.base64.__ptr = x__EchoTest->Data[i].choice.xop__Include.__ptr;
+        response->x__EchoTest->Data[i].choice.base64.__size = x__EchoTest->Data[i].choice.xop__Include.__size;
+        response->x__EchoTest->Data[i].xmlmime__contentType = x__EchoTest->Data[i].choice.xop__Include.type;
+        break;
+      case SOAP_UNION_x__data_base64:
+        /* convert base64Binary to MTOM attachment */
+        response->x__EchoTest->Data[i].__union = SOAP_UNION_x__data_xop__Include;
+        response->x__EchoTest->Data[i].choice.xop__Include.__ptr = x__EchoTest->Data[i].choice.base64.__ptr;
+        response->x__EchoTest->Data[i].choice.xop__Include.__size = x__EchoTest->Data[i].choice.base64.__size;
+        response->x__EchoTest->Data[i].choice.xop__Include.id = NULL;
+        response->x__EchoTest->Data[i].choice.xop__Include.type = x__EchoTest->Data[i].xmlmime__contentType;
+        response->x__EchoTest->Data[i].choice.xop__Include.options = NULL;
+        response->x__EchoTest->Data[i].xmlmime__contentType = x__EchoTest->Data[i].xmlmime__contentType;
+        break;
+      default:
+        return soap_sender_fault(soap, "Wrong data format", NULL);
+    }
+  }
+  return SOAP_OK;
+}
diff --git a/samples/mtom/mtom-test.h b/samples/mtom/mtom-test.h
new file mode 100644
index 0000000..93f3c15
--- /dev/null
+++ b/samples/mtom/mtom-test.h
@@ -0,0 +1,88 @@
+/*
+
+mtom-test.h
+
+This application includes a MTOM test client and server. As a client
+application, it fires four different base64 or MTOM attachments to the server.
+As a server, it will respond to the messages by converting base64 into MTOM
+attachments and vice versa.
+
+Usage (server):
+mtom-test <port>
+
+Usage (client):
+mtom-test http://localhost:<port> "<message>" "<MIME-type>"
+
+Usage (client):
+mtom-test http://localhost:<port> "<message>" "<MIME-type>" "<message2>" "<message3>" ...
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#import "soap12.h"
+#import "xop.h"
+#import "xmlmime.h"
+
+//gsoap m service namespace:	http://www.genivia.com/wsdl/mtom-test.wsdl
+//gsoap m service name:		mtom-test
+
+//gsoap x schema namespace:	http://www.genivia.com/schemas/mtom-test.xsd
+//gsoap x schema elementForm:	qualified
+
+struct xsd__base64Binary
+{ unsigned char *__ptr;
+  int __size;
+};
+
+struct x__DataType
+{ int __union;
+  union x__data
+  { _xop__Include xop__Include;
+    struct xsd__base64Binary base64;
+  } choice;
+  @char *xmlmime__contentType;
+};
+
+struct x__WrapperType
+{ int __size;
+  struct x__DataType *Data;
+};
+
+int __m__EchoTestSingle(
+  struct x__DataType *x__Data,
+  struct __m__EchoTestSingleResponse
+  { struct x__DataType *x__Data;
+  }*
+);
+
+int __m__EchoTestMultiple(
+  struct x__WrapperType *x__EchoTest,
+  struct __m__EchoTestMultipleResponse
+  { struct x__WrapperType *x__EchoTest;
+  }*
+);
diff --git a/samples/oneliners/Makefile b/samples/oneliners/Makefile
new file mode 100644
index 0000000..8df7cb4
--- /dev/null
+++ b/samples/oneliners/Makefile
@@ -0,0 +1,35 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		gmtclient gmtserver.cgi helloclient helloserver.cgi rollclient rollserver.cgi
+gmtclient:	gmt.h gmtclient.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) gmt.h
+		$(CPP) $(CFLAGS) -o gmtclient gmtclient.cpp soapC.cpp soapClient.cpp $(SOAPCPP) $(LIBS)
+gmtserver.cgi:	gmt.h gmtserver.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) gmt.h
+		$(CPP) $(CFLAGS) -o gmtserver.cgi gmtserver.cpp soapC.cpp soapServer.cpp $(SOAPCPP) $(LIBS)
+helloclient:	hello.h helloclient.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) hello.h
+		$(CPP) $(CFLAGS) -o helloclient helloclient.cpp soapC.cpp soapClient.cpp $(SOAPCPP) $(LIBS)
+helloserver.cgi:hello.h helloserver.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) hello.h
+		$(CPP) $(CFLAGS) -o helloserver.cgi helloserver.cpp soapC.cpp soapServer.cpp $(SOAPCPP) $(LIBS)
+rollclient:	roll.h rollclient.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) roll.h
+		$(CPP) $(CFLAGS) -o rollclient rollclient.cpp soapC.cpp soapClient.cpp $(SOAPCPP) $(LIBS)
+rollserver.cgi:	roll.h rollserver.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) roll.h
+		$(CPP) $(CFLAGS) -o rollserver.cgi rollserver.cpp soapC.cpp soapServer.cpp $(SOAPCPP) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h gmtclient gmtserver.cgi helloclient helloserver.cgi rollclient rollserver.cgi
diff --git a/samples/oneliners/MakefileSolaris b/samples/oneliners/MakefileSolaris
new file mode 100644
index 0000000..77bd212
--- /dev/null
+++ b/samples/oneliners/MakefileSolaris
@@ -0,0 +1,35 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lxnet -lnsl -lsocket
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		gmtclient gmtserver.cgi helloclient helloserver.cgi rollclient rollserver.cgi
+gmtclient:	gmt.h gmtclient.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) gmt.h
+		$(CPP) $(CFLAGS) -o gmtclient gmtclient.cpp soapC.cpp soapClient.cpp $(SOAPCPP) $(LIBS)
+gmtserver.cgi:	gmt.h gmtserver.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) gmt.h
+		$(CPP) $(CFLAGS) -o gmtserver.cgi gmtserver.cpp soapC.cpp soapServer.cpp $(SOAPCPP) $(LIBS)
+helloclient:	hello.h helloclient.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) hello.h
+		$(CPP) $(CFLAGS) -o helloclient helloclient.cpp soapC.cpp soapClient.cpp $(SOAPCPP) $(LIBS)
+helloserver.cgi:hello.h helloserver.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) hello.h
+		$(CPP) $(CFLAGS) -o helloserver.cgi helloserver.cpp soapC.cpp soapServer.cpp $(SOAPCPP) $(LIBS)
+rollclient:	roll.h rollclient.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) roll.h
+		$(CPP) $(CFLAGS) -o rollclient rollclient.cpp soapC.cpp soapClient.cpp $(SOAPCPP) $(LIBS)
+rollserver.cgi:	roll.h rollserver.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) roll.h
+		$(CPP) $(CFLAGS) -o rollserver.cgi rollserver.cpp soapC.cpp soapServer.cpp $(SOAPCPP) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h gmtclient gmtserver.cgi helloclient helloserver.cgi rollclient rollserver.cgi
diff --git a/samples/oneliners/README.txt b/samples/oneliners/README.txt
new file mode 100644
index 0000000..3e99b51
--- /dev/null
+++ b/samples/oneliners/README.txt
@@ -0,0 +1,12 @@
+This directory contains a number of "one-liners": gSOAP Web Services and client
+applications that are only one line long (not counting the usual #includes).
+
+The programs are small, but they can do a number of useful things:
+
+gmt.h, gmtclient.cpp, gmtserver.cpp:		return current time in GMT
+hello.h, helloclient.cpp, helloserver.cpp:	Hello World!
+roll.h, rollclient.cpp, rollserver.cpp:		roll of a die
+
+You can use the client programs right away after compilation, because they
+connect to our server. To run the server examples you have to install them
+as CGI applications.
diff --git a/samples/oneliners/gmt.h b/samples/oneliners/gmt.h
new file mode 100644
index 0000000..ad23524
--- /dev/null
+++ b/samples/oneliners/gmt.h
@@ -0,0 +1 @@
+t__gmt(time_t&);
diff --git a/samples/oneliners/gmtclient.cpp b/samples/oneliners/gmtclient.cpp
new file mode 100644
index 0000000..6461773
--- /dev/null
+++ b/samples/oneliners/gmtclient.cpp
@@ -0,0 +1,3 @@
+#include "soapH.h"
+#include "t.nsmap"
+int main() { time_t t; soap_call_t__gmt(soap_new(), "http://www.cs.fsu.edu/~engelen/gmtlitserver.cgi", "", t); return printf("The current time is %s\n", ctime(&t)); }
diff --git a/samples/oneliners/gmtserver.cpp b/samples/oneliners/gmtserver.cpp
new file mode 100644
index 0000000..3cc36bf
--- /dev/null
+++ b/samples/oneliners/gmtserver.cpp
@@ -0,0 +1,3 @@
+#include "soapH.h"
+#include "t.nsmap"
+int main() { return soap_serve(soap_new()); } int t__gmt(struct soap *soap, time_t &t) { t = time(0); return SOAP_OK; }
diff --git a/samples/oneliners/hello.h b/samples/oneliners/hello.h
new file mode 100644
index 0000000..fa3c720
--- /dev/null
+++ b/samples/oneliners/hello.h
@@ -0,0 +1 @@
+h__hello(char*&);
diff --git a/samples/oneliners/helloclient.cpp b/samples/oneliners/helloclient.cpp
new file mode 100644
index 0000000..a696187
--- /dev/null
+++ b/samples/oneliners/helloclient.cpp
@@ -0,0 +1,4 @@
+#include "soapH.h"
+#include "h.nsmap"
+int main() { char *s; soap_call_h__hello(soap_new(), "http://www.cs.fsu.edu/~engelen/hellolitserver.cgi", "", s); return !printf("%s\n", s); }
+
diff --git a/samples/oneliners/helloserver.cpp b/samples/oneliners/helloserver.cpp
new file mode 100644
index 0000000..b902ca0
--- /dev/null
+++ b/samples/oneliners/helloserver.cpp
@@ -0,0 +1,4 @@
+#include "soapH.h"
+#include "h.nsmap"
+int main() { return soap_serve(soap_new()); } int h__hello(struct soap *soap, char *&s) { s = "Hello World!"; return SOAP_OK; }
+
diff --git a/samples/oneliners/roll.h b/samples/oneliners/roll.h
new file mode 100644
index 0000000..180d536
--- /dev/null
+++ b/samples/oneliners/roll.h
@@ -0,0 +1 @@
+r__roll(int&);
diff --git a/samples/oneliners/rollclient.cpp b/samples/oneliners/rollclient.cpp
new file mode 100644
index 0000000..b47a76f
--- /dev/null
+++ b/samples/oneliners/rollclient.cpp
@@ -0,0 +1,4 @@
+#include "soapH.h"
+#include "r.nsmap"
+int main() { int d; soap_call_r__roll(soap_new(), "http://www.cs.fsu.edu/~engelen/rolllitserver.cgi", "", d); return !printf("%d\n", d); }
+
diff --git a/samples/oneliners/rollserver.cpp b/samples/oneliners/rollserver.cpp
new file mode 100644
index 0000000..013b27f
--- /dev/null
+++ b/samples/oneliners/rollserver.cpp
@@ -0,0 +1,4 @@
+#include "soapH.h"
+#include "r.nsmap"
+int main() { return soap_serve(soap_new()); } int r__roll(struct soap *soap, int &r) { srand(time(0)); r = rand()%6+1; return SOAP_OK; }
+
diff --git a/samples/polytest/Makefile b/samples/polytest/Makefile
new file mode 100644
index 0000000..6a66214
--- /dev/null
+++ b/samples/polytest/Makefile
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		polytest
+polytest:	polymorph.h polymorph.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) polymorph.h
+		$(CPP) $(CFLAGS) -o polytest polymorph.cpp soapC.cpp soapClient.cpp soapServer.cpp $(SOAPCPP) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h polytest
diff --git a/samples/polytest/MakefileSolaris b/samples/polytest/MakefileSolaris
new file mode 100644
index 0000000..a2c1cab
--- /dev/null
+++ b/samples/polytest/MakefileSolaris
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lxnet -lnsl -lsocket
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		polytest
+polytest:	polymorph.h polymorph.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) polymorph.h
+		$(CPP) $(CFLAGS) -o polytest polymorph.cpp soapC.cpp soapClient.cpp soapServer.cpp $(SOAPCPP) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h polytest
diff --git a/samples/polytest/polymorph.cpp b/samples/polytest/polymorph.cpp
new file mode 100644
index 0000000..669dc2e
--- /dev/null
+++ b/samples/polytest/polymorph.cpp
@@ -0,0 +1,166 @@
+/* This is both a client and CGI-based server to demonstrate
+   object exchange (derived types + overriding)
+   Install as CGI
+   From the command line:
+   polytest.cgi o
+   polytest.cgi s
+   polytest.cgi q
+   polytest.cgi l
+*/
+
+#include "soapH.h"
+#include <iostream.h>
+
+const char *server = "http://www.cs.fsu.edu/~engelen/polytest2.cgi";
+
+int main(int argc, char **argv)
+{ struct soap soap;
+  ns__polytestResponse r;
+  soap_init(&soap);
+  if (argc <= 1)
+    soap_serve(&soap); // if no args, act as a CGI Web service
+  else
+  { switch (*argv[1])
+    { case 'o':
+      { ns__Object o("SOAP");
+        cout << "Sending: ";
+	o.print();
+        soap_call_ns__polytest(&soap, server, "", &o, r);
+        break;
+      }
+      case 's':
+      { ns__Shape s("Triangle", 3);
+        cout << "Sending: ";
+	s.print();
+        soap_call_ns__polytest(&soap, server, "", &s, r);
+        break;
+      }
+      case 'q':
+      { ns__Shape q("Cubicle", 2);
+        cout << "Sending: ";
+	q.print();
+        soap_call_ns__polytest(&soap, server, "", &q, r);
+        break;
+      }
+      case 'l':
+      { ns__List l(4);
+	l[0] = new ns__Object("SOAP");
+	l[1] = new ns__Shape("Triangle", 3);
+	l[2] = new ns__Square("Cubicle", 2);
+	ns__List l2(1);
+        l[3] = &l2;
+	l2[0] = new ns__Object("End");
+        cout << "Sending: ";
+	l.print();
+        soap_call_ns__polytest(&soap, server, "", &l, r);
+        break;
+      }
+      default:
+        fprintf(stderr, "Unknown command\nPlease use 'o', 's', 'q', or 'l'\n");
+	return -1;
+    }
+    if (soap.error)
+      soap_print_fault(&soap, stderr);
+    else
+    { cout << "Received: ";
+      r.out->print();
+    }
+  }
+  return 0;
+}
+
+ns__Object::ns__Object()
+{ name = "Object";
+}
+
+ns__Object::ns__Object(const char *name)
+{ this->name = (char*)name;
+}
+
+ns__Object::~ns__Object()
+{
+}
+
+void ns__Object::print()
+{ cout << "Object: " << (name?name:"") << endl;
+}
+
+ns__Shape::ns__Shape()
+{ name = "Shape";
+  sides = 0;
+}
+
+ns__Shape::ns__Shape(const char *name, int sides)
+{ this->name = (char*)name;
+  this->sides = sides;
+}
+
+ns__Shape::~ns__Shape()
+{
+}
+
+void ns__Shape::print()
+{ cout << "Shape: " << (name?name:"") << " sides=" << sides << endl;
+}
+
+ns__Square::ns__Square()
+{ name = "Square";
+  ns__Shape::sides = 4;
+}
+
+ns__Square::ns__Square(const char *name, int size)
+{ this->name = (char*)name;
+  this->size = size;
+  ns__Shape::sides = 4;
+}
+
+ns__Square::~ns__Square()
+{
+}
+
+void ns__Square::print()
+{ cout << "Square: " << (name?name:"") << " size=" << size << endl;
+}
+
+ns__List::ns__List()
+{ __ptr = 0;
+  __size = 0;
+}
+
+ns__List::ns__List(int size)
+{ __ptr = (ns__Object**)malloc(size*sizeof(ns__Object*));
+  __size = size;
+}
+
+ns__List::~ns__List()
+{
+}
+
+ns__Object*& ns__List::operator[](int i)
+{ return __ptr[i];
+}
+
+void ns__List::print()
+{ cout << "List: [" << endl;
+  for (int i = 0; i < __size; i++)
+    __ptr[i]->print();
+  cout << "]" << endl;
+}
+
+// Web service remote method implementation:
+
+int ns__polytest(struct soap *soap, ns__Object *in, struct ns__polytestResponse &result)
+{ result.out = in;
+  return SOAP_OK;
+}
+
+struct Namespace namespaces[] =
+{
+  {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"},	// MUST be first
+  {"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/"},	// MUST be second
+  {"xsi", "http://www.w3.org/2000/XMLSchema-instance"},		// MUST be third
+  {"xsd", "http://www.w3.org/2000/XMLSchema"},
+  {"ns", "urn:copy"},
+  {NULL, NULL}
+};
+
diff --git a/samples/polytest/polymorph.h b/samples/polytest/polymorph.h
new file mode 100644
index 0000000..acfd7e4
--- /dev/null
+++ b/samples/polytest/polymorph.h
@@ -0,0 +1,45 @@
+//gsoap ns service name:	polymorph
+//gsoap ns service style:	rpc
+//gsoap ns service encoding:	encoded
+//gsoap ns service namespace:	http://websrv.cs.fsu.edu/~engelen/polymorph.wsdl
+//gsoap ns service location:	http://websrv.cs.fsu.edu/~engelen/polytest.cgi
+
+//gsoap ns schema namespace: urn:copy
+class ns__Object
+{ public:
+  char *name;
+  ns__Object();
+  ns__Object(const char *name);
+  virtual ~ns__Object();
+  virtual void print();
+};
+class ns__Shape: public ns__Object
+{ public:
+  char *name; // test overriding, both the ns__Object:name and ns__Shape:name are encoded
+  int sides;
+  ns__Shape();
+  ns__Shape(const char *name, int sides);
+  virtual ~ns__Shape();
+  virtual void print();
+};
+class ns__Square: public ns__Shape
+{ public:
+  char *name; // test overriding
+  static const int sides = 4; // will not be endoded and decoded
+  int size;
+  ns__Square();
+  ns__Square(const char *name, int size);
+  virtual ~ns__Square();
+  virtual void print();
+};
+class ns__List: public ns__Object // ns__List is a dynamic array
+{ public:
+  ns__Object **__ptr; // array of pointers to objects
+  int __size;
+  ns__List();
+  ns__List(int size);
+  virtual ~ns__List();
+  virtual ns__Object*& operator[](int i);
+  virtual void print();
+};
+ns__polytest(ns__Object *in, struct ns__polytestResponse { ns__Object *out; } &result);
diff --git a/samples/quote/Makefile b/samples/quote/Makefile
new file mode 100644
index 0000000..ac094af
--- /dev/null
+++ b/samples/quote/Makefile
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		quote
+quote:		quote.h quote.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c quote.h
+		$(CC) $(CFLAGS) -o quote quote.c soapC.c soapClient.c $(SOAPC) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h quote
diff --git a/samples/quote/MakefileSolaris b/samples/quote/MakefileSolaris
new file mode 100644
index 0000000..7037536
--- /dev/null
+++ b/samples/quote/MakefileSolaris
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lxnet -lnsl -lsocket
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		quote
+quote:		quote.h quote.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c quote.h
+		$(CC) $(CFLAGS) -o quote quote.c soapC.c soapClient.c $(SOAPC) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h quote
diff --git a/samples/quote/quote.c b/samples/quote/quote.c
new file mode 100644
index 0000000..113c2e0
--- /dev/null
+++ b/samples/quote/quote.c
@@ -0,0 +1,34 @@
+#include "soapH.h"	/* include generated proxy and SOAP support */
+
+int main(int argc, char **argv)
+{ struct soap soap;
+  float q;
+  char *sym;
+  if (argc > 1)
+    sym = argv[1];
+  else
+  { fprintf(stderr, "Usage: quote <ticker>\n");
+    exit(1);
+  }
+  soap_init(&soap);
+  if (soap_call_ns__getQuote(&soap, "http://services.xmethods.net/soap", "", sym, &q) == 0)
+     printf("\nCompany - %s    Quote - %f\n", sym, q);
+  else
+    soap_print_fault(&soap, stderr);
+  soap_end(&soap);
+  soap_done(&soap);
+  return 0;
+}
+
+/* The namespace mapping table is required and associates namespace prefixes with namespace names: */
+struct Namespace namespaces[] =
+{
+  {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"},	/* MUST be first */
+  {"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/"},	/* MUST be second */
+  {"xsi", "http://www.w3.org/1999/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance"},	/* MUST be third */
+  {"xsd", "http://www.w3.org/1999/XMLSchema", "http://www.w3.org/*/XMLSchema"},
+  {"ns", "urn:xmethods-delayed-quotes"},	/* Method namespace URI */
+  {NULL, NULL}
+};
+
+
diff --git a/samples/quote/quote.h b/samples/quote/quote.h
new file mode 100644
index 0000000..69ff37f
--- /dev/null
+++ b/samples/quote/quote.h
@@ -0,0 +1,9 @@
+//gsoap ns service name:	quote
+//gsoap ns service style:	rpc
+//gsoap ns service encoding:	encoded
+//gsoap ns service namespace:	urn:xmethods-delayed-quotes
+//gsoap ns service location:	http://services.xmethods.net/soap
+
+//gsoap ns service method-action: getQuote ""
+
+int ns__getQuote(char *symbol, float *Result);
diff --git a/samples/quote2/Makefile b/samples/quote2/Makefile
new file mode 100644
index 0000000..fa150cf
--- /dev/null
+++ b/samples/quote2/Makefile
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		quote2
+quote2:		quote2.h quote2.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c quote2.h
+		$(CC) $(CFLAGS) -o quote2 quote2.c soapC.c soapClient.c $(SOAPC) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h quote2
diff --git a/samples/quote2/MakefileSolaris b/samples/quote2/MakefileSolaris
new file mode 100644
index 0000000..54642fe
--- /dev/null
+++ b/samples/quote2/MakefileSolaris
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lxnet -lnsl -lsocket
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		quote2
+quote2:		quote2.h quote2.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c quote2.h
+		$(CC) $(CFLAGS) -o quote2 quote2.c soapC.c soapClient.c $(SOAPC) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h quote2
diff --git a/samples/quote2/quote2.c b/samples/quote2/quote2.c
new file mode 100644
index 0000000..4895a0d
--- /dev/null
+++ b/samples/quote2/quote2.c
@@ -0,0 +1,30 @@
+/*	getQuote example with asynchronous SOAP messaging
+*/
+#include "soapH.h"
+
+int main()
+{ struct soap soap;
+  struct ns__getQuoteResponse r;
+  soap_init(&soap);
+  if (soap_send_ns__getQuote(&soap, "http://services.xmethods.net/soap", "", "IBM"))
+    soap_print_fault(&soap, stderr);
+  else if (soap_recv_ns__getQuoteResponse(&soap, &r))
+    soap_print_fault(&soap, stderr);
+  else
+    printf("IBM: %f\n", r.Result);
+  soap_end(&soap);
+  soap_done(&soap);
+  return 0;
+}
+
+struct Namespace namespaces[] =
+{
+  {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"},	/* MUST be first */
+  {"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/"},	/* MUST be second */
+  {"xsi", "http://www.w3.org/1999/XMLSchema-instance"},		/* MUST be third */
+  {"xsd", "http://www.w3.org/1999/XMLSchema"},
+  {"ns", "urn:xmethods-delayed-quotes"},	/* Method namespace URI */
+  {NULL, NULL}
+};
+
+
diff --git a/samples/quote2/quote2.h b/samples/quote2/quote2.h
new file mode 100644
index 0000000..ef8529b
--- /dev/null
+++ b/samples/quote2/quote2.h
@@ -0,0 +1,9 @@
+/*	getQuote example with asynchronous SOAP messaging
+*/
+//gsoap ns service name:	quote
+//gsoap ns service style:	rpc
+//gsoap ns service encoding:	encoded
+//gsoap ns service namespace:	urn:xmethods-delayed-quotes
+//gsoap ns service location:	http://services.xmethods.net/soap
+ns__getQuote(char *symbol, void dummy);
+ns__getQuoteResponse(float Result, void dummy);
diff --git a/samples/quote3/Makefile b/samples/quote3/Makefile
new file mode 100644
index 0000000..681a71f
--- /dev/null
+++ b/samples/quote3/Makefile
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		quote3
+quote3:		quote3.h quote3.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) quote3.h
+		$(CPP) $(CFLAGS) -o quote3 quote3.cpp soapC.cpp soapClient.cpp $(SOAPCPP) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h quote3
diff --git a/samples/quote3/MakefileSolaris b/samples/quote3/MakefileSolaris
new file mode 100644
index 0000000..2225f52
--- /dev/null
+++ b/samples/quote3/MakefileSolaris
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lxnet -lnsl -lsocket
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		quote3
+quote3:		quote3.h quote3.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) quote3.h
+		$(CPP) $(CFLAGS) -o quote3 quote3.cpp soapC.cpp soapClient.cpp $(SOAPCPP) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h quote3
diff --git a/samples/quote3/quote3.cpp b/samples/quote3/quote3.cpp
new file mode 100644
index 0000000..756e434
--- /dev/null
+++ b/samples/quote3/quote3.cpp
@@ -0,0 +1,27 @@
+#include "soapQuoteProxy.h"	// get proxy
+#include "Quote.nsmap"		// get namespace bindings
+
+using namespace std;
+
+class Stock : public Quote	// Quote is the name of the service (see quote3.h and Quote.wsdl)
+{ public:
+  char *symbol;			// Stock ticker
+  Stock() : Quote() { symbol = NULL; };
+  Stock(char *ticker) { symbol = ticker; };
+  void ticker(char *ticker) { symbol = ticker; };
+  float quote() { float q; ns__getQuote(symbol, q); return q; };
+};
+
+int main()
+{ Quote q;
+  float r;
+  // Example using the Quote proxy class directly:
+  if (q.ns__getQuote("IBM", r) == SOAP_OK)
+    cout << r << endl;
+  else
+    soap_print_fault(q.soap, stderr);
+  // Example using the derived Stock proxy class:
+  Stock IBM("IBM");
+  cout << IBM.quote() << endl;
+  return 0;
+}
diff --git a/samples/quote3/quote3.h b/samples/quote3/quote3.h
new file mode 100644
index 0000000..91e4e5e
--- /dev/null
+++ b/samples/quote3/quote3.h
@@ -0,0 +1,8 @@
+//gsoap ns service name:	Quote
+//gsoap ns service style:	rpc
+//gsoap ns service encoding:	encoded
+//gsoap ns service namespace:	urn:xmethods-delayed-quotes
+//gsoap ns service location:	http://services.xmethods.net/soap
+
+//gsoap ns service method-action: getQuote ""
+int ns__getQuote(char *symbol, float &Result);
diff --git a/samples/quote4/Makefile b/samples/quote4/Makefile
new file mode 100644
index 0000000..af262f3
--- /dev/null
+++ b/samples/quote4/Makefile
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		quote4
+quote4:		quote4.h quote4.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) $(CIFLAGS) quote4.h
+		$(CPP) $(CFLAGS) -o quote4 quote4.cpp dom++.cpp soapC.cpp soapClient.cpp $(SOAPCPP) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h quote4
diff --git a/samples/quote4/MakefileSolaris b/samples/quote4/MakefileSolaris
new file mode 100644
index 0000000..e206c3a
--- /dev/null
+++ b/samples/quote4/MakefileSolaris
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lxnet -lnsl -lsocket
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		quote4
+quote4:		quote4.h quote4.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) $(CIFLAGS) quote4.h
+		$(CPP) $(CFLAGS) -o quote4 quote4.cpp soapC.cpp soapClient.cpp $(SOAPCPP) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h quote4
diff --git a/samples/quote4/dom++.cpp b/samples/quote4/dom++.cpp
new file mode 100644
index 0000000..db14996
--- /dev/null
+++ b/samples/quote4/dom++.cpp
@@ -0,0 +1,909 @@
+/*
+
+dom.c[pp]
+
+gSOAP DOM implementation
+
+gSOAP XML Web services tools
+Copyright (C) 2001-2005, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2004 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+	Development note:
+	Reused the gSOAP struct soap id hash table for handling namespace
+	bindings when transmitting DOMs
+
+Changes:
+	Renamed __type to type (correction)
+	dom.c, dom++.cpp, and dom.cpp are equivalent
+	Renamed SOAP_XML_TREE to SOAP_DOM_TREE
+	Renamed SOAP_XML_GRAPH to SOAP_DOM_NODE
+	Added SOAP_DOM_ASIS
+
+TODO:	Improve mixed content handling
+*/
+
+#include "stdsoap2.h"
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_xsd__anyType(struct soap*, struct soap_dom_element const*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_default_xsd__anyType(struct soap*, struct soap_dom_element *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_xsd__anyType(struct soap*, const struct soap_dom_element *, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_out_xsd__anyType(struct soap*, const char*, int, const struct soap_dom_element *, const char*);
+SOAP_FMAC3 struct soap_dom_element * SOAP_FMAC4 soap_get_xsd__anyType(struct soap*, struct soap_dom_element *, const char*, const char*);
+SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_in_xsd__anyType(struct soap*, const char*, struct soap_dom_element *, const char*);
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_markelement(struct soap*, const void*, int);
+SOAP_FMAC3 int SOAP_FMAC4 soap_putelement(struct soap*, const void*, const char*, int, int);
+SOAP_FMAC3 void *SOAP_FMAC4 soap_getelement(struct soap*, int*);
+
+/* format string for generating DOM namespace prefixes (<= 16 chars total) */
+#define SOAP_DOMID_FORMAT "dom%d"
+
+/* namespace name (URI) lookup and store routines */
+static struct soap_ilist *soap_lookup_ns(struct soap*, const char*);
+static struct soap_ilist *soap_enter_ns(struct soap*, const char*, const char*);
+
+/******************************************************************************\
+ *
+ *	DOM custom (de)serializers
+ *
+\******************************************************************************/
+
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_serialize_xsd__anyType(struct soap *soap, const struct soap_dom_element *node)
+{ if (node)
+  { if (node->type && node->node)
+      soap_markelement(soap, node->node, node->type);
+    else
+    { const struct soap_dom_element *elt;
+      for (elt = node->elts; elt; elt = elt->next)
+        soap_serialize_xsd__anyType(soap, elt);
+    }
+  }
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_default_xsd__anyType(struct soap *soap, struct soap_dom_element *node)
+{ node->next = NULL;
+  node->prnt = NULL;
+  node->elts = NULL;
+  node->atts = NULL;
+  node->nstr = NULL;
+  node->name = NULL;
+  node->data = NULL;
+  node->wide = NULL;
+  node->node = NULL;
+  node->type = 0;
+  node->head = NULL;
+  node->tail = NULL;
+  node->soap = soap;
+}
+
+/******************************************************************************/
+static int 
+out_element(struct soap *soap, const struct soap_dom_element *node, const char *prefix, const char *name, const char *nstr)
+{ if (node->head && soap_send(soap, node->head))
+    return soap->error;
+  if (!prefix)
+  { if (node->type && node->node)
+      return soap_putelement(soap, node->node, name, 0, node->type);
+    return soap_element(soap, name, 0, NULL); /* element() */
+  }
+  if (node->type && node->node)
+  { char *s = (char*)SOAP_MALLOC(soap, strlen(prefix) + strlen(name) + 2);
+    if (!s)
+      return soap->error = SOAP_EOM;
+    sprintf(s, "%s:%s", prefix, name);
+    soap_putelement(soap, node->node, s, 0, node->type);
+    SOAP_FREE(soap, s);
+  }
+  else
+  { char *s;
+    if (strlen(prefix) + strlen(name) < sizeof(soap->msgbuf))
+      s = soap->msgbuf;
+    else
+    { s = (char*)SOAP_MALLOC(soap, strlen(prefix) + strlen(name) + 2);
+      if (!s)
+        return soap->error = SOAP_EOM;
+    }
+    sprintf(s, "%s:%s", prefix, name);
+    if (soap_element(soap, s, 0, NULL)) /* element() */
+      return soap->error;
+    if (nstr)
+    { sprintf(s, "xmlns:%s", prefix);
+      soap_attribute(soap, s, nstr);
+    }
+    if (s != soap->msgbuf)
+      SOAP_FREE(soap, s);
+  }
+  return soap->error;
+}
+
+/******************************************************************************/
+static int
+out_attribute(struct soap *soap, const char *prefix, const char *name, const char *data)
+{ char *s;
+  const char *t;
+  if (!prefix)
+    return soap_attribute(soap, name, data);
+  t = strchr(name, ':');
+  if (t)
+    t++;
+  else
+    t = name;
+  if (strlen(prefix) + strlen(t) < sizeof(soap->msgbuf))
+    s = soap->msgbuf;
+  else
+  { s = (char*)SOAP_MALLOC(soap, strlen(prefix) + strlen(t) + 2);
+    if (!s)
+      return soap->error = SOAP_EOM;
+  } 
+  sprintf(s, "%s:%s", prefix, t);
+  soap_attribute(soap, s, data);
+  if (s != soap->msgbuf)
+    SOAP_FREE(soap, s);
+  return soap->error;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_out_xsd__anyType(struct soap *soap, const char *tag, int id, const struct soap_dom_element *node, const char *type)
+{ if (node)
+  { register struct soap_ilist *p = NULL;
+    const char *prefix;		/* namespace prefix, if namespace is present */
+    size_t colon;
+    if (!(soap->mode & SOAP_DOM_ASIS))
+    { struct soap_dom_attribute *att;
+      for (att = node->atts; att; att = att->next)
+      { if (att->name && att->nstr)
+        { if ((prefix = strchr(att->name, ':')))
+          { colon = prefix - att->name + 1;
+            if (colon > sizeof(soap->tag))
+              colon = sizeof(soap->tag);
+	    strncpy(soap->tag, att->name, colon - 1);
+            soap->tag[colon - 1] = '\0';
+            if (!(soap_enter_ns(soap, soap->tag, att->nstr)))
+              return soap->error = SOAP_EOM;
+          }
+        }
+      }
+    }
+    if (node->name)
+      tag = node->name;
+    else if (!tag)
+      tag = "-";
+    if ((prefix = strchr(tag, ':')))
+    { colon = prefix - tag + 1;
+      if (colon > sizeof(soap->tag))
+        colon = sizeof(soap->tag);
+    }
+    else
+      colon = 0;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DOM node '%s'\n", tag));
+    prefix = NULL;
+    if (node->nstr && !(soap->mode & SOAP_DOM_ASIS))
+    { if (colon)
+      { strncpy(soap->tag, tag, colon - 1);
+        soap->tag[colon - 1] = '\0';
+        if (!(p = soap_enter_ns(soap, soap->tag, node->nstr)))
+          return soap->error = SOAP_EOM;
+        prefix = p->id;
+        if (out_element(soap, node, prefix, tag + colon, node->nstr))
+          return soap->error;
+      }
+      else
+      { struct Namespace *ns;
+        for (ns = soap->local_namespaces; ns && ns->id; ns++)
+        { if (ns->ns == node->nstr || !strcmp(ns->ns, node->nstr))
+          { /* if (soap->encodingStyle || ns == soap->local_namespaces) */
+              prefix = ns->id;
+            if (out_element(soap, node, ns->id, tag + colon, NULL))
+              return soap->error;
+            break;
+          }
+	}
+        if (!ns || !ns->id)
+        { if ((p = soap_lookup_ns(soap, node->nstr)))
+          { prefix = p->id;
+            p = NULL;
+            if (out_element(soap, node, prefix, tag + colon, NULL))
+              return soap->error;
+          }
+	  else
+          { sprintf(soap->tag, SOAP_DOMID_FORMAT, soap->idnum++);
+            if (!(p = soap_enter_ns(soap, soap->tag, node->nstr)))
+              return soap->error = SOAP_EOM;
+            prefix = p->id;
+            if (out_element(soap, node, prefix, tag + colon, node->nstr))
+              return soap->error;
+	  }
+        }
+      }
+    }
+    else
+    { colon = 0;
+      if (out_element(soap, node, NULL, tag, NULL))
+        return soap->error;
+    }
+    if (!node->type || !node->node)
+    { struct soap_dom_attribute *att;
+      for (att = node->atts; att; att = att->next)
+      { if (att->name)
+        { if (att->nstr)
+          { register struct soap_ilist *q;
+            if ((att->nstr == node->nstr || (node->nstr && !strcmp(att->nstr, node->nstr))) && prefix)
+	    { if (out_attribute(soap, prefix, att->name, att->data))
+	        return soap->error;
+	    }
+	    else if ((q = soap_lookup_ns(soap, att->nstr)))
+	    { if (out_attribute(soap, q->id, att->name, att->data))
+	        return soap->error;
+	    }
+	    else
+            { struct Namespace *ns;
+	      for (ns = soap->local_namespaces; ns && ns->id; ns++)
+              { if (ns->ns == att->nstr || !strcmp(ns->ns, att->nstr))
+	        { if (out_attribute(soap, ns->id, att->name, att->data))
+	            return soap->error;
+	          break;
+	        }
+	      }
+	      if (!ns || !ns->id)
+              { sprintf(soap->msgbuf, "xmlns:"SOAP_DOMID_FORMAT, soap->idnum++);
+	        if (soap_attribute(soap, soap->msgbuf, att->nstr))
+	          return soap->error;
+	        strcat(soap->msgbuf, ":");
+	        strcat(soap->msgbuf, att->name);
+	        if (soap_attribute(soap, soap->msgbuf + 6, att->data))
+	          return soap->error;
+              }
+            }
+          }
+	  else if (soap_attribute(soap, att->name, att->data))
+            return soap->error;
+        }
+      }
+      if (soap_element_start_end_out(soap, NULL))
+        return soap->error;
+      struct soap_dom_element *elt;
+      if (node->data)
+      { if (soap_string_out(soap, node->data, 0))
+          return soap->error;
+      }
+      else if (node->wide)
+      { if (soap_wstring_out(soap, node->wide, 0))
+          return soap->error;
+      }
+      for (elt = node->elts; elt; elt = elt->next)
+      { if (soap_out_xsd__anyType(soap, tag, 0, elt, NULL))
+          return soap->error;
+      }
+      if (node->tail && soap_send(soap, node->tail))
+        return soap->error;
+      if (!prefix)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of DOM node '%s'\n", tag + colon));
+        if (soap_element_end_out(soap, tag + colon))
+          return soap->error;
+      }
+      else
+      { char *s;
+        if (strlen(prefix) + strlen(tag + colon) < sizeof(soap->msgbuf))
+	  s = soap->msgbuf;
+	else
+	{ s = (char*)SOAP_MALLOC(soap, strlen(prefix) + strlen(tag + colon) + 2);
+          if (!s)
+            return soap->error = SOAP_EOM;
+	}
+	sprintf(s, "%s:%s", prefix, tag + colon);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of DOM node '%s'\n", s));
+        if (soap_element_end_out(soap, s))
+          return soap->error;
+        if (s != soap->msgbuf)
+	  SOAP_FREE(soap, s);
+      }
+      if (p)
+        p->level = 0; /* xmlns binding is out of scope */
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_dom_element *
+SOAP_FMAC2
+soap_in_xsd__anyType(struct soap *soap, const char *tag, struct soap_dom_element *node, const char *type)
+{ register struct soap_attribute *tp;
+  register struct soap_dom_attribute **att;
+  if (soap_peek_element(soap))
+    return NULL;
+  if (!node)
+  { if (!(node = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element))))
+    { soap->error = SOAP_EOM;
+      return NULL;
+    }
+  }
+  soap_default_xsd__anyType(soap, node);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DOM node %s\n", soap->tag));
+  node->nstr = soap_current_namespace(soap, soap->tag);
+  node->name = soap_strdup(soap, soap->tag);
+  if ((soap->mode & SOAP_DOM_NODE) || (!(soap->mode & SOAP_DOM_TREE) && *soap->id))
+  { if ((node->node = soap_getelement(soap, &node->type)))
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DOM node contains type %d from xsi:type\n", node->type));
+      return node;
+    }
+    if (soap->error == SOAP_TAG_MISMATCH)
+      soap->error = SOAP_OK;
+    else
+      return NULL;
+  }
+  att = &node->atts;
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DOM node attribute='%s'\n", tp->name));
+      *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+      if (!*att)
+      { soap->error = SOAP_EOM;
+        return NULL;
+      }
+      (*att)->next = NULL;
+      (*att)->nstr = soap_current_namespace(soap, tp->name);
+      (*att)->name = soap_strdup(soap, tp->name);
+      if (tp->visible == 2)
+        (*att)->data = soap_strdup(soap, tp->value);
+      else
+        (*att)->data = NULL;
+      (*att)->wide = NULL;
+      (*att)->soap = soap;
+      att = &(*att)->next;
+      tp->visible = 0;
+    }
+  }
+  soap_element_begin_in(soap, NULL, 1);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DOM node '%s' accepted\n", node->name));
+  if (soap->body)
+  { if (!soap_peek_element(soap))
+    { struct soap_dom_element **elt;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DOM node '%s' has subelements\n", node->name));
+      elt = &node->elts;
+      for (;;)
+      { if (!(*elt = soap_in_xsd__anyType(soap, NULL, NULL, NULL)))
+        { if (soap->error == SOAP_NO_TAG)
+            soap->error = SOAP_OK;
+          else
+            return NULL;
+          break;
+        }
+	(*elt)->prnt = node;
+        elt = &(*elt)->next;
+      }
+    }
+    else if (soap->error == SOAP_NO_TAG)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DOM node '%s' has cdata\n", node->name));
+      if ((soap->mode & SOAP_C_UTFSTRING) || (soap->mode & SOAP_C_MBSTRING))
+      { if (!(node->data = soap_string_in(soap, 1, -1, -1)))
+          return NULL;
+      }
+      else if (!(node->wide = soap_wstring_in(soap, 1, -1, -1)))
+        return NULL;
+    }
+    else
+      return NULL;
+    if (soap_element_end_in(soap, node->name))
+      return NULL;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of DOM node '%s'\n", node->name));
+  }
+  return node;
+}
+
+/******************************************************************************\
+ *
+ *	DOM traversing
+ *
+\******************************************************************************/
+
+SOAP_FMAC1
+struct soap_dom_element *
+SOAP_FMAC2
+soap_dom_next_element(struct soap_dom_element *elt)
+{ if (elt->elts)
+    return elt->elts;
+  if (elt->next)
+    return elt->next;
+  do elt = elt->prnt;
+  while (elt && !elt->next);
+  if (elt)
+    elt = elt->next;
+  return elt;
+}
+
+/******************************************************************************/
+struct soap_dom_attribute *soap_dom_next_attribute(struct soap_dom_attribute *att)
+{ return att->next;
+}
+
+/******************************************************************************\
+ *
+ *	Namespace prefix lookup/store
+ *
+\******************************************************************************/
+
+static struct soap_ilist *
+soap_lookup_ns(struct soap *soap, const char *nstr)
+{ register struct soap_ilist *ip;
+  for (ip = soap->iht[soap_hash(nstr)]; ip; ip = ip->next)
+    if (!strcmp((char*)ip->ptr, nstr) && ip->level)
+      return ip;
+  return NULL;
+}
+
+/******************************************************************************/
+static struct soap_ilist *
+soap_enter_ns(struct soap *soap, const char *prefix, const char *nstr)
+{ int h;
+  register struct soap_ilist *ip;
+  for (ip = soap->iht[soap_hash(nstr)]; ip; ip = ip->next)
+  { if (!strcmp((char*)ip->ptr, nstr) && !ip->level)
+    { strcpy(ip->id, prefix);
+      ip->level = 1;
+      return ip;
+    }
+  }
+  ip = (struct soap_ilist*)SOAP_MALLOC(soap, sizeof(struct soap_ilist) + strlen(nstr) + SOAP_TAGLEN);
+  if (ip)
+  { h = soap_hash(nstr);
+    strcpy(ip->id, prefix);
+    ip->ptr = ip->id + SOAP_TAGLEN;
+    strcpy((char*)ip->ptr, nstr);
+    ip->next = soap->iht[h];
+    soap->iht[h] = ip;
+    ip->flist = NULL;
+    ip->copy = NULL;
+    ip->level = 1;
+    return ip;
+  }
+  return NULL;
+}
+
+#ifdef __cplusplus
+
+/******************************************************************************\
+ *
+ *	soap_dom_element class
+ *
+\******************************************************************************/
+
+soap_dom_element::soap_dom_element()
+{ soap_default_xsd__anyType(NULL, this);
+}
+
+/******************************************************************************/
+soap_dom_element::soap_dom_element(struct soap *soap)
+{ soap_default_xsd__anyType(soap, this);
+}
+
+/******************************************************************************/
+soap_dom_element::soap_dom_element(struct soap *soap, const char *nstr, const char *name)
+{ soap_default_xsd__anyType(soap, this);
+  this->nstr = soap_strdup(soap, nstr);
+  this->name = soap_strdup(soap, name);
+}
+
+/******************************************************************************/
+soap_dom_element::soap_dom_element(struct soap *soap, const char *nstr, const char *name, const char *data)
+{ soap_default_xsd__anyType(soap, this);
+  this->nstr = soap_strdup(soap, nstr);
+  this->name = soap_strdup(soap, name);
+  this->data = soap_strdup(soap, data);
+}
+
+/******************************************************************************/
+soap_dom_element::soap_dom_element(struct soap *soap, const char *nstr, const char *name, void *node, int type)
+{ soap_default_xsd__anyType(soap, this);
+  this->nstr = soap_strdup(soap, nstr);
+  this->name = soap_strdup(soap, name);
+  this->node = node;
+  this->type = type;
+}
+
+/******************************************************************************/
+soap_dom_element::~soap_dom_element()
+{ }
+
+/******************************************************************************/
+soap_dom_element &soap_dom_element::set(const char *nstr, const char *name)
+{ this->nstr = soap_strdup(soap, nstr);
+  this->name = soap_strdup(soap, name);
+  return *this;
+}
+
+/******************************************************************************/
+soap_dom_element &soap_dom_element::set(const char *data)
+{ this->data = soap_strdup(soap, data);
+  return *this;
+}
+
+/******************************************************************************/
+soap_dom_element &soap_dom_element::set(void *node, int type)
+{ this->node = node;
+  this->type = type;
+  return *this;
+}
+
+/******************************************************************************/
+soap_dom_element &soap_dom_element::add(struct soap_dom_element *elt)
+{ elt->prnt = this;
+  for (struct soap_dom_element *e = elts; e; e = e->next)
+  { if (!e->next)
+    { e->next = elt;
+      return *this;
+    }
+  }
+  elts = elt;
+  return *this;
+}
+
+/******************************************************************************/
+soap_dom_element &soap_dom_element::add(struct soap_dom_element &elt)
+{ return add(&elt);
+}
+
+/******************************************************************************/
+soap_dom_element &soap_dom_element::add(struct soap_dom_attribute *att)
+{ for (struct soap_dom_attribute *a = atts; a; a = a->next)
+  { if (!a->next)
+    { a->next = att;
+      return *this;
+    }
+  }
+  atts = att;
+  return *this;
+}
+
+/******************************************************************************/
+soap_dom_element &soap_dom_element::add(struct soap_dom_attribute &att)
+{ return add(&att);
+}
+
+/******************************************************************************/
+soap_dom_element_iterator soap_dom_element::begin()
+{ soap_dom_element_iterator iter(this);
+  return iter;
+}
+
+/******************************************************************************/
+soap_dom_element_iterator soap_dom_element::end()
+{ soap_dom_element_iterator iter(NULL);
+  return iter;
+}
+
+/******************************************************************************/
+soap_dom_element_iterator soap_dom_element::find(const char *nstr, const char *name)
+{ soap_dom_element_iterator iter(this);
+  iter.nstr = nstr;
+  iter.name = name;
+  if (name && soap_tag_cmp(this->name, name))
+    return ++iter;
+  if (nstr && this->nstr && soap_tag_cmp(this->nstr, nstr))
+    return ++iter;
+  return iter;
+}
+
+/******************************************************************************/
+soap_dom_element_iterator soap_dom_element::find(int type)
+{ soap_dom_element_iterator iter(this);
+  iter.type = type;
+  if (this->type != type)
+    return ++iter;
+  return iter;
+}
+
+/******************************************************************************/
+void soap_dom_element::unlink()
+{ soap_unlink(soap, this);
+  soap_unlink(soap, nstr);
+  soap_unlink(soap, name);
+  soap_unlink(soap, data);
+  soap_unlink(soap, wide);
+  if (elts)
+    elts->unlink();
+  if (atts)
+    elts->unlink();
+  if (next)
+    next->unlink();
+  node = NULL;
+  type = 0;
+}
+
+/******************************************************************************\
+ *
+ *	soap_dom_attribute class
+ *
+\******************************************************************************/
+
+soap_dom_attribute::soap_dom_attribute()
+{ this->soap = NULL;
+  this->next = NULL;
+  this->nstr = NULL;
+  this->name = NULL;
+  this->data = NULL;
+  this->wide = NULL;
+}
+
+/******************************************************************************/
+soap_dom_attribute::soap_dom_attribute(struct soap *soap)
+{ this->soap = soap;
+  this->next = NULL;
+  this->nstr = NULL;
+  this->name = NULL;
+  this->data = NULL;
+  this->wide = NULL;
+}
+
+/******************************************************************************/
+soap_dom_attribute::soap_dom_attribute(struct soap *soap, const char *nstr, const char *name, const char *data)
+{ this->soap = soap;
+  this->next = NULL;
+  this->nstr = soap_strdup(soap, nstr);
+  this->name = soap_strdup(soap, name);
+  this->data = soap_strdup(soap, data);
+  this->wide = NULL;
+}
+
+/******************************************************************************/
+soap_dom_attribute::~soap_dom_attribute()
+{ }
+
+/******************************************************************************/
+soap_dom_attribute_iterator soap_dom_attribute::begin()
+{ soap_dom_attribute_iterator iter(this);
+  return iter;
+}
+
+/******************************************************************************/
+soap_dom_attribute_iterator soap_dom_attribute::end()
+{ soap_dom_attribute_iterator iter(NULL);
+  return iter;
+}
+
+/******************************************************************************/
+soap_dom_attribute_iterator soap_dom_attribute::find(const char *nstr, const char *name)
+{ soap_dom_attribute_iterator iter(this);
+  iter.nstr = nstr;
+  iter.name = name;
+  if (name && soap_tag_cmp(this->name, name))
+    return ++iter;
+  if (nstr && this->nstr && soap_tag_cmp(this->nstr, nstr))
+    return ++iter;
+  return iter;
+}
+
+/******************************************************************************/
+void soap_dom_attribute::unlink()
+{ soap_unlink(soap, this);
+  soap_unlink(soap, nstr);
+  soap_unlink(soap, name);
+  soap_unlink(soap, data);
+  soap_unlink(soap, wide);
+  if (next)
+    next->unlink();
+}
+
+/******************************************************************************\
+ *
+ *	soap_dom_element_iterator class
+ *
+\******************************************************************************/
+
+soap_dom_element_iterator::soap_dom_element_iterator()
+{ elt = NULL;
+  nstr = NULL;
+  name = NULL;
+  type = 0;
+}
+
+/******************************************************************************/
+soap_dom_element_iterator::soap_dom_element_iterator(struct soap_dom_element *elt)
+{ this->elt = elt;
+  nstr = NULL;
+  name = NULL;
+  type = 0;
+}
+
+/******************************************************************************/
+soap_dom_element_iterator::~soap_dom_element_iterator()
+{ }
+
+/******************************************************************************/
+bool soap_dom_element_iterator::operator==(const soap_dom_element_iterator &iter) const
+{ return this->elt == iter.elt;
+}
+
+/******************************************************************************/
+bool soap_dom_element_iterator::operator!=(const soap_dom_element_iterator &iter) const
+{ return this->elt != iter.elt;
+}
+
+/******************************************************************************/
+struct soap_dom_element &soap_dom_element_iterator::operator*() const
+{ return *this->elt;
+}
+
+/******************************************************************************/
+soap_dom_element_iterator &soap_dom_element_iterator::operator++()
+{ while (elt)
+  { elt = soap_dom_next_element(elt);
+    if (!elt)
+      break;
+    if (name && elt->name)
+    { if (!soap_tag_cmp(elt->name, name))
+      { if (nstr && elt->nstr)
+        { if (!soap_tag_cmp(elt->nstr, nstr))
+	    break;
+        }
+        else
+          break;
+      }
+    }
+    else if (type)
+    { if (elt->type == type)
+        break;
+    }
+    else
+      break;
+  }
+  return *this;
+}
+
+/******************************************************************************\
+ *
+ *	soap_dom_attribute_iterator class
+ *
+\******************************************************************************/
+
+soap_dom_attribute_iterator::soap_dom_attribute_iterator()
+{ att = NULL;
+  nstr = NULL;
+  name = NULL;
+}
+
+/******************************************************************************/
+soap_dom_attribute_iterator::soap_dom_attribute_iterator(struct soap_dom_attribute *att)
+{ this->att = att;
+  nstr = NULL;
+  name = NULL;
+}
+
+/******************************************************************************/
+soap_dom_attribute_iterator::~soap_dom_attribute_iterator()
+{ }
+
+/******************************************************************************/
+bool soap_dom_attribute_iterator::operator==(const soap_dom_attribute_iterator &iter) const
+{ return this->att == iter.att;
+}
+
+/******************************************************************************/
+bool soap_dom_attribute_iterator::operator!=(const soap_dom_attribute_iterator &iter) const
+{ return this->att != iter.att;
+}
+
+/******************************************************************************/
+struct soap_dom_attribute &soap_dom_attribute_iterator::operator*() const
+{ return *this->att;
+}
+
+/******************************************************************************/
+soap_dom_attribute_iterator &soap_dom_attribute_iterator::operator++()
+{ while (att)
+  { att = soap_dom_next_attribute(att);
+    if (!att)
+      break;
+    if (name && att->name)
+    { if (!soap_tag_cmp(att->name, name))
+      { if (nstr && att->nstr)
+        { if (!soap_tag_cmp(att->nstr, nstr))
+	    break;
+        }
+        else
+          break;
+      }
+    }
+    else
+      break;
+  }
+  return *this;
+}
+
+/******************************************************************************\
+ *
+ *	I/O
+ *
+\******************************************************************************/
+
+#ifndef UNDER_CE
+
+std::ostream &operator<<(std::ostream &o, const struct soap_dom_element &e)
+{ if (!e.soap)
+  { struct soap soap;
+    soap_init2(&soap, SOAP_IO_DEFAULT, SOAP_XML_GRAPH);
+    soap_serialize_xsd__anyType(&soap, &e);
+    soap_begin_send(&soap);
+    soap_out_xsd__anyType(&soap, NULL, 0, &e, NULL);
+    soap_end_send(&soap);
+    soap_end(&soap);
+    soap_done(&soap);
+  }
+  else
+  { std::ostream *os = e.soap->os;
+    e.soap->os = &o;
+    short omode = e.soap->omode;
+    soap_set_omode(e.soap, SOAP_XML_GRAPH);
+    soap_serialize_xsd__anyType(e.soap, &e);
+    soap_begin_send(e.soap);
+    soap_out_xsd__anyType(e.soap, NULL, 0, &e, NULL);
+    soap_end_send(e.soap);
+    e.soap->os = os;
+    e.soap->omode = omode;
+  }
+  return o;
+}
+
+/******************************************************************************/
+std::istream &operator>>(std::istream &i, struct soap_dom_element &e)
+{ if (!e.soap)
+    e.soap = soap_new();
+  std::istream *is = e.soap->is;
+  e.soap->is = &i;
+  if (soap_begin_recv(e.soap)
+   || !soap_in_xsd__anyType(e.soap, NULL, &e, NULL)
+   || soap_end_recv(e.soap))
+    ; /* handle error? Note: e.soap->error is set and app should check */
+  e.soap->is = is;
+  return i;
+}
+
+#endif
+
+#endif
diff --git a/samples/quote4/dom.h b/samples/quote4/dom.h
new file mode 100644
index 0000000..4eb8b78
--- /dev/null
+++ b/samples/quote4/dom.h
@@ -0,0 +1,630 @@
+/*
+
+dom.h
+
+gSOAP DOM interface
+
+gSOAP XML Web services tools
+Copyright (C) 2001-2005, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2004 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+/**
+
+@mainpage The gSOAP level-2 DOM parser
+
+The gSOAP level-2 DOM parser features "smart" XML namespace handling and can be
+used to mix gSOAP XML serializers with plain XML parsing. The DOM parser is
+also an essential component of the wsse plugin to verify digital signatures.
+
+The DOM parser is not a stand-alone application. The DOM parser is integrated
+with the SOAP engine to populate a node set and to render a node set in XML.
+
+Two files are needed to work with DOM node sets:
+
+- dom.h to use a DOM node set in a gSOAP header file with service definitions.
+- dom.cpp (or dom.c) to be linked with your application code.
+
+@section dom_1 Declaring DOM Node Sets in a gSOAP Header File
+
+To use the DOM node set with the data structures defined in a gSOAP header
+file, import the dom.h file into your header file:
+
+@code
+    #import "dom.h"
+@endcode
+
+By importing dom.h a special data type @ref xsd__anyType is available that
+represents a hierarchical DOM node set. The DOM node set data structure can be
+used within structs, classes, STL containers, and as arguments of service
+operations. For example:
+
+@code
+    #import "dom.h"
+    #import "wsu.h"
+    class ns__myProduct
+    { public:
+	@char*            wsu__Id;
+	_wsu__Timestamp*  wsu__Timestamp;
+        char*             name;
+	int               SKU;
+	double            price;
+	xsd__anyType*	  any;
+                          ns__myProduct();
+                          ~ns__myProduct();
+    };
+@endcode
+
+It is important to declare the @ref xsd__anyType at the end of the struct or
+class, since the DOM parser consumes any XML element (the field name, 'any' in
+this case, is irrelavant).  Thus, the other fields must be defined first to
+ensure they are populated first before the DOM node set is populated with any
+non-previously matched XML element.
+
+Note that we also imported wsu.h as an example to show how to add a wsu:Id
+attribute to a struct or class if we want to digitally sign instances, and how
+to add a standardized wsu:Timestamp element to record creation and expiration
+times.
+
+To compile, run soapcpp2 (with -Iimport) and compile your code by linking
+dom.cpp (or dom.c for C). Note that the DOM data structures are declared in
+stdsoap2.h, while the DOM operations are defined in dom.cpp (or dom.c for C).
+
+Methods to populate and traverse DOM node sets will be explained later. First,
+let's take a look at parsing and generating XML documents.
+
+@section dom_2 Parsing and Generating XML
+
+The following examples assume that the soapcpp2 compiler was used on a header
+file (just the dom.h file will do) and the generated soapC.cpp or (soapC.c for
+C) code was compiled and linked with dom.cpp (or dom.c for C), stdsoap2.cpp (or
+stdsoap2.c) and the example application code. The generated namespace table
+should also be used, since the namespace bindings are relevant for consuming
+and producing XML for DOM node sets. Therefore, each of the example codes
+in this documentation is assumed to start with the following two includes:
+
+@code
+    #include "soapH.h"  // generated by soapcpp2
+    #include "ns.nsmap" // a namespace table with the XML namespace used
+@endcode
+
+The C++ std::iostream operators are overloaded to parse XML octet streams into
+node sets and to emit XML from node sets:
+
+@code
+    soap_dom_element dom;
+    dom.soap = soap_new1(SOAP_DOM_TREE | SOAP_C_UTFSTRING);
+    cin >> dom; // parse XML
+    if (dom.soap->error)
+      ... // parse error
+    cout << dom; // display XML
+    if (dom.soap->error)
+      ... // output error
+    soap_destroy(dom.soap);
+    soap_end(dom.soap);
+    soap_done(dom.soap);
+    free(dom.soap);
+@endcode
+
+In the example above we copied an XML document from stdin to stdout.
+
+In C we use the DOM "serializers" to accomplish this as follows:
+
+@code
+    soap_dom_element dom;
+    dom.soap = soap_new1(SOAP_DOM_TREE | SOAP_C_UTFSTRING);
+    dom.soap->recvfd = stdin;
+    if (soap_begin_recv(dom.soap)
+     || NULL != soap_in_xsd__anyType(dom.soap, NULL, &dom, NULL)
+     || soap_end_recv(dom.soap))
+      ... // parse error
+    dom.soap->sendfd = stdout;
+    if (soap_begin_send(dom.soap)
+     || soap_out_xsd__anyType(dom.soap, NULL, 0, &dom, NULL)
+     || soap_end_send(dom.soap))
+      ... // output error
+    soap_end(dom.soap);
+    soap_done(dom.soap);
+    free(dom.soap);
+@endcode
+
+The SOAP_DOM_NODE flag is used to instruct the parser to populate a DOM node
+set with deserialized C and C++ data structures using the data type's
+deserializers that were generated with soapcpp2 from a header file with the
+data type declarations. Suppose for example that the following header file was
+used (in fact, this declaration appears in wsu.h):
+
+@code
+    typedef struct _wsu__Timestamp
+    {	@char*	wsu__Id;
+    	char*	Created;
+	char*	Expires;
+    } _wsu__Timestamp;
+@endcode
+
+Note that the leading underscore of the type name indicates an XML element
+definition (rather than a complexType definition), so the name of the data type
+is relevant when comparing XML element tags to C/C++ data types by the
+deserializers.
+
+When an XML document is parsed with one or more <wsu:Timestamp> elements, the
+DOM will be automatically populated with the _wsu__Timestamp objects. Suppose
+the XML document root is a <wsu:Timestamp>, then the root node of the DOM is a
+_wsu__Timestamp object:
+
+@code
+    soap_dom_element dom;
+    dom.soap = soap_new1(SOAP_DOM_NODE);
+    cin >> dom; // parse XML
+    if (dom.soap->error)
+      ... // parse error
+    if (dom.type == SOAP_TYPE__wsu__Timestamp)
+    { _wsu__Timestamp *t = (_wsu__Timestamp*)dom.node;
+      cout << "Start " << (t->Created ? t->Created : "")
+           << " till " << (t->Expires ? t->Expires : "") << endl;
+    }
+@endcode
+
+Note that the soapcpp2 compiler generates a unique type identification constant
+SOAP_TYPE_X for each data type X, which is used to determine the node's type in
+the example above.
+
+When objects occur deeper within the DOM node set then the DOM tree should be
+traversed. This subject will be discussed next.
+
+@section dom_3 Traversing a DOM Node Set
+
+The DOM node set is traversed with a C++ iterator or with the C functions @ref
+soap_dom_next_element and @ref soap_dom_next_attribute. For example, to walk
+the node set visiting nodes in the same order as they appeared in the document,
+use:
+
+@code
+    soap_dom_element dom;
+    dom.soap = soap_new1(SOAP_DOM_TREE | SOAP_C_UTFSTRING);
+    ...
+    for (soap_dom_element::iterator iter = dom.begin(); iter != dom.end(); ++iter)
+      for (soap_dom_attribute::iterator attr = (*iter).atts.begin(); attr != (*iter).atts.end(); ++attr)
+        ...
+@endcode
+
+In C code, use:
+
+@code
+    soap_dom_element dom, *iter;
+    soap_dom_attribute *attr;
+    dom.soap = soap_new1(SOAP_DOM_TREE | SOAP_C_UTFSTRING);
+    ...
+    for (iter = &dom; iter; iter = soap_dom_next_element(iter))
+      for (attr = iter->atts; attr; attr = soap_dom_next_attribute(attr))
+         ...
+@endcode
+
+The @ref soap_dom_element and @ref soap_dom_attribute structs form essentially
+linked lists, so it would not be too difficult to write your own tree walkers:
+
+- @ref soap_dom_element::prnt points to the parent soap_dom_element node.
+- @ref soap_dom_element::elts points to the linked list of child element nodes.
+- @ref soap_dom_element::atts points to the linked list of attribute nodes.
+
+The linked lists of sibling elements nodes and attribute nodes are respectively:
+
+- @ref soap_dom_element::next points to the next sibling element node.
+- @ref soap_dom_attribute::next points to the next attribute in the attribute
+  list of an element node.
+
+Note that for a root node, the @ref soap_dom_element::prnt and @ref
+soap_dom_element::next are both NULL.
+
+Tag names of elements and attributes are stored in @ref soap_dom_element::name
+and @ref soap_dom_attribute::name strings, respectively. The names are UTF-8
+encoded.
+
+XML namespace bindings are explicitly propagated throughout the DOM node set
+for those elements and attributes that are namespace qualified (either with a
+namespace prefix or when they occur in a xmlns default namespace scope). The
+namespaces are stored in the @ref soap_dom_element::nstr and @ref
+soap_dom_attribute::nstr strings. The following example shows how to traverse a
+DOM node set and print the elements with their namespace URIs when present:
+
+@code
+    soap_dom_element dom;
+    dom.soap = soap_new1(SOAP_DOM_TREE | SOAP_C_UTFSTRING);
+    cin >> dom;
+    for (soap_dom_element::iterator iter = dom.begin(); iter != dom.end(); ++iter)
+    { cout << "Element " << (*iter).name;
+      if ((*iter).nstr)
+        cout << " has namespace " << (*iter).nstr;
+      cout << endl;
+    }
+    soap_destroy(dom.soap);
+    soap_end(dom.soap);
+    soap_done(dom.soap);
+    free(dom.soap);
+@endcode
+
+Text content of a node is stored in the @ref soap_dom_element::data string in
+UTF-8 format. This string is populated if the SOAP_C_UTFSTRING flag was set.
+Otherwise the data content will be stored in the @ref soap_dom_element::wide
+wide-character string.
+
+The following example prints those element nodes that have text content
+(in UTF-8 format):
+
+@code
+    soap_dom_element dom;
+    ...
+    for (soap_dom_element::iterator iter = dom.begin(); iter != dom.end(); ++iter)
+    { cout << "Element " << (*iter).name;
+      if ((*iter).data)
+        cout << " = " << (*iter).data;
+      cout << endl;
+    }
+    ...
+@endcode
+
+When a DOM node set contains deserialized objects (enabled with the
+SOAP_DOM_NODE flag), the @ref soap_dom_element::type and @ref
+soap_dom_element::node values are set:
+
+@code
+    soap_dom_element dom;
+    ...
+    for (soap_dom_element::iterator iter = dom.begin(); iter != dom.end(); ++iter)
+    { cout << "Element " << (*iter).name;
+      if ((*iter).type)
+        cout << "Element " << (*iter).name << " contains a deserialized object" << endl;
+      cout << endl;
+    }
+    ...
+@endcode
+
+The @ref soap_dom_element::type is 0 or a SOAP_TYPE_X constant, where X is the
+name of the deserialized type. The @ref soap_dom_element::node points to the
+deserialized object. If this is a char* string, it points directly to the
+character sequence.
+
+Note: the SOAP_DOM_TREE flag restricts the parser to DOM content only, so
+deserializers is not used. When the SOAP_DOM_TREE flag is not used, an
+appropriate deserializer MAY be used by gSOAP when an element contains an id
+attribute and gSOAP can determine the type from the id attribute reference
+and/or the xsi:type attribute of an element. 
+
+@section dom_4 Searching
+
+Common operations on DOM node sets in level-2 DOM parsers are searching and
+filtering.
+
+For C++ code, the built-in @ref soap_dom_element::iterator can be used to
+search for matching element nodes. C programmers are out of luck as they should
+write looping code to search for nodes explicitly.
+
+The @ref soap_dom_element::find method returns a search iterator. The method
+takes an optional namespace URI and element name to match elements in the DOM
+node set.  For example, to iterate over all "product" elements:
+
+@code
+    soap_dom_element dom;
+    ...
+    for (soap_dom_element::iterator iter = dom.find(NULL, "product"); iter != dom.end(); ++iter)
+      cout << "Element " << (*iter).name << endl;
+    ...
+@endcode
+
+To iterate over all elements in a particular namespace:
+
+@code
+    soap_dom_element dom;
+    ...
+    for (soap_dom_element::iterator iter = dom.find("http://www.w3.org/2001/XMLSchema", NULL); iter != dom.end(); ++iter)
+      cout << "Element " << (*iter).name << endl;
+    ...
+@endcode
+
+Since namespaces may have different version, a '*' wildcard can be used with
+the namespace string. Likewise, tag names may be namespace qualified with
+prefixes that are not relevant to the search:
+
+@code
+    soap_dom_element dom;
+    ...
+    for (soap_dom_element::iterator iter = dom.find("http://www.w3.org/*XMLSchema", "*:schema"); iter != dom.end(); ++iter)
+      cout << "Element " << (*iter).name << endl;
+    ...
+@endcode
+
+This searches for qualified elements in one of the XSD namespaces.
+
+@section dom_5 Constructing DOM Node Sets
+
+The @ref soap_dom_element::set and @ref soap_dom_element::add methods are used
+to decorate a DOM node set with child element nodes and attribute nodes.
+Application data with serializers can be incorporated in the node set as well.
+
+The following examples are shown in C++.  C programmers can use the @ref
+soap_dom_element:elts list and @ref soap_dom_elements::atts list to add child
+nodes and attribute nodes, respectively.
+
+@code
+    soap_dom_element dom;
+    dom.soap = soap_new1(SOAP_C_UTFSTRING | SOAP_XML_INDENT);
+    const char *myURI = "http://www.mydomain.com/myproducts";
+    ns__myProduct product();
+    product.soap_default(dom.soap); // method generated by soapcpp2
+    product.name = "Ernie";
+    product.SKU = 123;
+    product.price = 9.95;
+    dom.set(myURI, "list");
+    dom.add(soap_dom_attribute(dom.soap, myURI, "version", "0.9"));
+    dom.add(soap_dom_element(dom.soap, myURI, "documentation", "List of products"));
+    dom.add(soap_dom_element(dom.soap, myURI, "product", SOAP_TYPE_ns__myProduct, &product);
+    cout << dom;
+    ...
+@endcode
+
+Assuming that myURI is associated with namespace prefix "ns" in the namespace
+table, the rendition is
+
+@code
+<?xml version="1.0" encoding="UTF-8"?>
+<ns:list
+  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
+  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+  xmlns:ns="http://domain/schemas/product.xsd"
+  version="0.9" >
+	<ns:documentation>List of products</ns:documentation>
+	<ns:product>
+		<name>Ernie</name>
+		<SKU>123</SKU>
+		<price>9.95</price>
+	</ns:product>
+</ns:list>
+@endcode
+
+Note that the namespace table content is "dumped" into the XML rendition.
+
+The global namespace mapping table "namespaces[]" contains the namespace
+bindings that should be meaningful to the application. The soap context can be
+set to a new table as follows:
+
+@code
+    Namespace myNamespaces[] = { { "ns", "..." }, ... , { NULL } };
+    soap_dom_element dom;
+    dom.soap = soap_new1(SOAP_C_UTFSTRING | SOAP_XML_INDENT);
+    dom.soap->namespaces = myNamespaces;
+@endcode
+
+To produce cleaner XML, use the SOAP_XML_CANONICAL flag to initiate the soap
+context:
+
+@code
+<ns:list xmlns:ns="http://domain/schemas/product.xsd" version="0.9" >
+	<ns:documentation>List of products</ns:documentation>
+	<ns:product>
+		<name>Ernie</name>
+		<SKU>123</SKU>
+		<price>9.95</price>
+	</ns:product>
+</ns:list>
+@endcode
+
+Note that the xmlns bindings are rendered automatically. When parsing an XML
+document, xmlns bindings are not added to the attribute node set. The @ref
+soap_dom_element::nstr and @ref soap_dom_attribute::nstr namespace strings are
+set to retain namespace URIs. The XML rendering algorithm uses the namespace
+strings to add xmlns bindings that are not already in the namespace table.
+
+When it is desirable to render XML exactly as represented in the DOM node set,
+e.g. when xmlns bindings are explicitly included in the attribute node set, use
+the SOAP_DOM_ASIS flag:
+
+@code
+    soap_dom_element dom;
+    dom.soap = soap_new1(SOAP_C_UTFSTRING | SOAP_DOM_ASIS);
+@endcode
+
+@section dom_6 Example
+
+The gSOAP header file below imports DOM and declares xsd:float to enable
+serializing floats embedded within DOM node sets and deserializing floats to
+populate DOM node sets:
+
+@code
+    #import "dom.h"
+    typedef float xsd__float;
+@endcode
+
+Consider invoking the XMethods delayed stock quote service to obtain a stock
+quote. The float deserializer is used to store the floating-point value of a
+stock given that the <Result> element has an xsi:type="xsd:float" attribute.
+
+@code
+    struct soap *soap = soap_new1(SOAP_C_UTFSTRING | SOAP_DOM_NODE);
+    soap_dom_element envelope(soap, "http://schemas.xmlsoap.org/soap/envelope/", "Envelope");
+    soap_dom_element body(soap, "http://schemas.xmlsoap.org/soap/envelope/", "Body");
+    soap_dom_attribute encodingStyle(soap, "http://schemas.xmlsoap.org/soap/envelope/", "encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/");
+    soap_dom_element request(soap, "urn:xmethods-delayed-quotes", "getQuote");
+    soap_dom_element symbol(soap, NULL, "symbol", "IBM");
+    soap_dom_element response(soap);
+    envelope.add(body);
+    body.add(encodingStyle);
+    body.add(request);
+    request.add(symbol);
+    cout << "Request message:" << endl << envelope << endl;
+    if (soap_connect(soap, "http://services.xmethods.net/soap", "")
+     || soap_out_xsd__anyType(soap, NULL, 0, &envelope, NULL)
+     || soap_end_send(soap)
+     || soap_begin_recv(soap)
+     || NULL != soap_in_xsd__anyType(soap, NULL, &response, NULL)
+     || soap_end_recv(soap)
+     || soap_closesock(soap))
+    { soap_print_fault(soap, stderr);
+      soap_print_fault_location(soap, stderr);
+    }
+    else
+    { cout << "Response message:" << endl << response << endl;
+      for (soap_dom_element::iterator walker = response.find(SOAP_TYPE_xsd__float); walker != response.end(); ++walker)
+        cout << "Quote = " << *(xsd__float*)(*walker).node << endl;
+    }
+    soap_destroy(soap);
+    soap_end(soap);
+    soap_done(soap);
+    free(soap);
+@endcode
+
+@section dom_7 Summary
+
+The DOM parser needs a soap context to allocate nodes:
+
+@code
+    soap_dom_element dom;
+    dom.soap = soap_new1(... flags ...);
+    ...
+    soap_destroy(dom.soap);
+    soap_end(dom.soap);
+    soap_done(dom.soap);
+    soap_free(dom.soap);
+@endcode
+
+The nodes are removed with soap_destroy (for C++) and soap_end. The soap_done
+function should only be used before the soap context is deallocated.
+
+The soap context flags that control the parsing and rendition of XML are:
+
+- (no flag): only elements with an id attribute are deserialized as C/C++ data
+  types (when a deserializer is available). XML elements with character data
+  are deserialized into the @ref soap_dom_element::wide field.
+- SOAP_C_UTFSTRING: store character data in UTF-8 format in @ref
+  soap_dom_element::data.
+- SOAP_C_MBSTRING: store character data in multi-byte format in @ref
+  soap_dom_element::data, where the decoding depends on the current
+  localication. The platform must support MB strings (HAVE_MBTOWC).
+- SOAP_DOM_TREE: prevents deserialization of C/C++ data structures into the
+  DOM.
+- SOAP_DOM_NODE: attempt to deserialize C/C++ data structures when a
+  deserializer is available. A deserializer is selected based on the element
+  name or the xsi:type attribute.
+- SOAP_DOM_ASIS: render XML "as is", i.e. do not insert xmlns bindings for URIs
+  stored in nstr. Assumes the DOM is self-contained.
+- SOAP_XML_INDENT: render XML with indent.
+- SOAP_XML_CANONICAL: render XML in exc-c14n form.
+
+The DOM traversal operations:
+
+- @ref soap_dom_next_element returns the next element in an in-order traversal.
+- @ref soap_dom_next_attribute returns the next attribute of a node.
+
+The @ref soap_dom_element fields:
+
+- @ref soap_dom_element::next pointer to next sibling in list.
+- @ref soap_dom_element::prnt pointer to parent node.
+- @ref soap_dom_element::elts pointer to list of child element nodes.
+- @ref soap_dom_element::atts pointer to list of attribute nodes.
+- @ref soap_dom_element::nstr optional namespace string of this node.
+- @ref soap_dom_element::name the name of the element node (with optional
+  prefix).
+- @ref soap_dom_element::data optional character data in UTF-8 format.
+- @ref soap_dom_element::wide optional character data in wide string format.
+- @ref soap_dom_element::type optional SOAP_TYPE_X type of a C/C++ data
+  structure stored with this node.
+- @ref soap_dom_element::node optional pointer to the C/C++ data structure
+  stored with this node.
+- @ref soap_dom_element::head optional leading whitespace to the start tag.
+- @ref soap_dom_element::tail optional leading whitespace to the end tag.
+- @ref soap_dom_element::soap the soap context that manages this node.
+
+The @ref soap_dom_element types:
+
+- @ref soap_dom_element::iterator
+
+The @ref soap_dom_element methods:
+
+- @ref soap_dom_element::set(nstr, name);
+- @ref soap_dom_element::set(data);
+- @ref soap_dom_element::set(node, type);
+- @ref soap_dom_element::add(soap_dom_element);
+- @ref soap_dom_element::add(soap_dom_attribute);
+- @ref soap_dom_element::begin();
+- @ref soap_dom_element::end();
+- @ref soap_dom_element::find(nstr, name);
+- @ref soap_dom_element::find(type);
+- @ref soap_dom_element::unlink();
+
+The @ref soap_dom_element constructors:
+
+- @ref soap_dom_element();
+- @ref soap_dom_element(soap);
+- @ref soap_dom_element(soap, nstr, name);
+- @ref soap_dom_element(soap, nstr, name, data);
+- @ref soap_dom_element(soap, nstr, name, node, type);
+
+The @ref soap_dom_attribute fields:
+
+- @ref soap_dom_attribute::next pointer to next attribute node in list.
+- @ref soap_dom_attribute::nstr optional namespace string of this node.
+- @ref soap_dom_attribute::name the name of the attribute (with optional
+  prefix).
+- @ref soap_dom_attribute::data optional character data in UTF-8 format.
+- @ref soap_dom_attribute::soap the soap context that manages this node.
+
+The @ref soap_dom_attribute types:
+
+- @ref soap_dom_attribute::iterator
+
+The @ref soap_dom_attribute methods:
+
+- @ref soap_dom_attribute::set(nstr, name);
+- @ref soap_dom_attribute::set(data);
+- @ref soap_dom_attribute::begin();
+- @ref soap_dom_attribute::end();
+- @ref soap_dom_attribute::find(nstr, name);
+- @ref soap_dom_attribute::unlink();
+
+The @ref soap_dom_attribute constructors:
+
+- @ref soap_dom_attribute();
+- @ref soap_dom_attribute(soap);
+- @ref soap_dom_attribute(soap, nstr, name, data);
+
+*/
+
+/// @brief The custom serializer for DOM nodes is represented by xsd__anyType.
+extern typedef struct soap_dom_element xsd__anyType;
+
diff --git a/samples/quote4/quote4.cpp b/samples/quote4/quote4.cpp
new file mode 100644
index 0000000..4779bc7
--- /dev/null
+++ b/samples/quote4/quote4.cpp
@@ -0,0 +1,50 @@
+#include "soapH.h"
+using namespace std;
+int main(int argc, char **argv)
+{ soap *soap = soap_new1(SOAP_DOM_NODE); // enable deserialization of application data
+  if (argc <= 1)
+  { fprintf(stderr, "Usage: quote4 <ticker>\n");
+    exit(1);
+  }
+  soap_dom_element envelope(soap, "http://schemas.xmlsoap.org/soap/envelope/", "Envelope");
+  soap_dom_element body(soap, "http://schemas.xmlsoap.org/soap/envelope/", "Body");
+  soap_dom_attribute encodingStyle(soap, "http://schemas.xmlsoap.org/soap/envelope/", "encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/");
+  soap_dom_element request(soap, "urn:xmethods-delayed-quotes", "getQuote");
+  soap_dom_element symbol(soap, NULL, "symbol", argv[1]);
+  soap_dom_element response(soap);
+  envelope.add(body);
+  body.add(encodingStyle);
+  body.add(request);
+  request.add(symbol);
+  cout << "Request message:" << endl << envelope << endl;
+  soap_serialize_xsd__anyType(soap, &envelope);
+  if (soap_connect(soap, "http://services.xmethods.net/soap", "")
+   || soap_put_xsd__anyType(soap, &envelope, NULL, NULL)
+   || soap_end_send(soap)
+   || soap_begin_recv(soap)
+   || !soap_get_xsd__anyType(soap, &response, NULL, NULL) // returns pointer when successful
+   || soap_end_recv(soap)
+   || soap_closesock(soap))
+  { soap_print_fault(soap, stderr);
+    soap_print_fault_location(soap, stderr);
+  }
+  else
+  { cout << "Response message:" << endl << response << endl;
+    for (soap_dom_element::iterator walker = response.find(SOAP_TYPE_xsd__float); walker != response.end(); ++walker)
+      cout << "Quote = " << *(xsd__float*)(*walker).node << endl;
+  }
+  soap_destroy(soap);
+  soap_end(soap);
+  soap_done(soap);
+  free(soap);
+  return 0;
+}
+SOAP_NMAC struct Namespace namespaces[] =
+{
+  {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/", "http://www.w3.org/*/soap-envelope"},
+  {"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/", "http://www.w3.org/*/soap-encoding"},
+  {"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance"},
+  {"xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema"},
+  {NULL, NULL}
+};
+
diff --git a/samples/quote4/quote4.h b/samples/quote4/quote4.h
new file mode 100644
index 0000000..4aa0095
--- /dev/null
+++ b/samples/quote4/quote4.h
@@ -0,0 +1,2 @@
+#import "dom.h"
+typedef float xsd__float;
diff --git a/samples/quote_MAC_ProjBuild/Quote.1 b/samples/quote_MAC_ProjBuild/Quote.1
new file mode 100644
index 0000000..bc0d926
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/Quote.1
@@ -0,0 +1,79 @@
+.\"Modified from man(1) of FreeBSD, the NetBSD mdoc.template, and mdoc.samples.
+.\"See Also:
+.\"man mdoc.samples for a complete listing of options
+.\"man mdoc for the short list of editing options
+.\"/usr/share/misc/mdoc.template
+.Dd Tue Jun 24 2003               \" DATE 
+.Dt Quote 1      \" Program name and manual section number 
+.Os Darwin
+.Sh NAME                 \" Section Header - required - don't modify 
+.Nm Quote,
+.\" The following lines are read in generating the apropos(man -k) database. Use only key
+.\" words here as the database is built based on the words here and in the .ND line. 
+.Nm Other_name_for_same_program(),
+.Nm Yet another name for the same program.
+.\" Use .Nm macro to designate other names for the documented program.
+.Nd This line parsed for whatis database.
+.Sh SYNOPSIS             \" Section Header - required - don't modify
+.Nm
+.Op Fl abcd              \" [-abcd]
+.Op Fl a Ar path         \" [-a path] 
+.Op Ar file              \" [file]
+.Op Ar                   \" [file ...]
+.Ar arg0                 \" Underlined argument - use .Ar anywhere to underline
+arg2 ...                 \" Arguments
+.Sh DESCRIPTION          \" Section Header - required - don't modify
+Use the .Nm macro to refer to your program throughout the man page like such:
+.Nm
+Underlining is accomplished with the .Ar macro like this:
+.Ar underlined text .
+.Pp                      \" Inserts a space
+A list of items with descriptions:
+.Bl -tag -width -indent  \" Begins a tagged list 
+.It item a               \" Each item preceded by .It macro
+Description of item a
+.It item b
+Description of item b
+.El                      \" Ends the list
+.Pp
+A list of flags and their descriptions:
+.Bl -tag -width -indent  \" Differs from above in tag removed 
+.It Fl a                 \"-a flag as a list item
+Description of -a flag
+.It Fl b
+Description of -b flag
+.El                      \" Ends the list
+.Pp
+.\" .Sh ENVIRONMENT      \" May not be needed
+.\" .Bl -tag -width "ENV_VAR_1" -indent \" ENV_VAR_1 is width of the string ENV_VAR_1
+.\" .It Ev ENV_VAR_1
+.\" Description of ENV_VAR_1
+.\" .It Ev ENV_VAR_2
+.\" Description of ENV_VAR_2
+.\" .El                      
+.Sh FILES                \" File used or created by the topic of the man page
+.Bl -tag -width "/Users/joeuser/Library/really_long_file_name" -compact
+.It Pa /usr/share/file_name
+FILE_1description
+.It Pa /Users/joeuser/Library/really_long_file_name
+FILE_2 description
+.\" .Sh DIAGNOSTICS       \" May not be needed
+.\" .Bl -diag
+.\" .It Diagnostic Tag
+.\" Diagnostic informtion here.
+.\" .It Diagnostic Tag
+.\" Diagnostic informtion here.
+.\" .El
+.Sh SEE ALSO 
+.\" List links in ascending order by section, alphabetically within a section.
+.\" Please do not reference files that do not exist without filing a bug report
+.Xr a 1 , 
+.Xr b 1 ,
+.Xr c 1 ,
+.Xr a 2 ,
+.Xr b 2 ,
+.Xr a 3 ,
+.Xr b 3 
+.\" .Sh BUGS              \" Document known, unremedied bugs 
+.\" .Sh HISTORY           \" Document history if command behaves in a unique manner 
+

diff --git a/samples/quote_MAC_ProjBuild/Quote.pbproj/project.pbxproj b/samples/quote_MAC_ProjBuild/Quote.pbproj/project.pbxproj
new file mode 100644
index 0000000..7e9c643
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/Quote.pbproj/project.pbxproj
@@ -0,0 +1,326 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 38;
+	objects = {
+		014CEA520018CE5811CA2923 = {
+			buildRules = (
+			);
+			buildSettings = {
+				COPY_PHASE_STRIP = NO;
+				OPTIMIZATION_CFLAGS = "-O0";
+			};
+			isa = PBXBuildStyle;
+			name = Development;
+		};
+		014CEA530018CE5811CA2923 = {
+			buildRules = (
+			);
+			buildSettings = {
+				COPY_PHASE_STRIP = YES;
+			};
+			isa = PBXBuildStyle;
+			name = Deployment;
+		};
+//010
+//011
+//012
+//013
+//014
+//030
+//031
+//032
+//033
+//034
+		034768E8FF38A79811DB9C8B = {
+			isa = PBXExecutableFileReference;
+			path = Quote;
+			refType = 3;
+		};
+//030
+//031
+//032
+//033
+//034
+//080
+//081
+//082
+//083
+//084
+		08FB7793FE84155DC02AAC07 = {
+			buildStyles = (
+				014CEA520018CE5811CA2923,
+				014CEA530018CE5811CA2923,
+			);
+			isa = PBXProject;
+			mainGroup = 08FB7794FE84155DC02AAC07;
+			projectDirPath = "";
+			targets = (
+				08FB779FFE84155DC02AAC07,
+			);
+		};
+		08FB7794FE84155DC02AAC07 = {
+			children = (
+				08FB7795FE84155DC02AAC07,
+				C6A0FF2B0290797F04C91782,
+				1AB674ADFE9D54B511CA2CBB,
+			);
+			isa = PBXGroup;
+			name = Quote;
+			refType = 4;
+		};
+		08FB7795FE84155DC02AAC07 = {
+			children = (
+				F58F8DA804A90C7A0145D34B,
+				F58F8DA904A90C7A0145D34B,
+				F58F8DBD04A90E5B0145D34B,
+				F58F8DAD04A90C940145D34B,
+				F58F8DBA04A90E3D0145D34B,
+				F58F8DB904A90E3D0145D34B,
+				F58F8DB304A90DBE0145D34B,
+				F58F8DB704A90DD20145D34B,
+			);
+			isa = PBXGroup;
+			name = Source;
+			refType = 4;
+		};
+		08FB779FFE84155DC02AAC07 = {
+			buildPhases = (
+				F58F8DB004A90D0E0145D34B,
+				08FB77A0FE84155DC02AAC07,
+				08FB77A1FE84155DC02AAC07,
+				08FB77A3FE84155DC02AAC07,
+				08FB77A5FE84155DC02AAC07,
+				C6A0FF2D029079AD04C91782,
+			);
+			buildSettings = {
+				FRAMEWORK_SEARCH_PATHS = "";
+				HEADER_SEARCH_PATHS = "";
+				INSTALL_PATH = "$(HOME)/bin";
+				LIBRARY_SEARCH_PATHS = "";
+				OTHER_CFLAGS = "";
+				OTHER_LDFLAGS = "";
+				OTHER_REZFLAGS = "";
+				PRODUCT_NAME = Quote;
+				REZ_EXECUTABLE = YES;
+				SECTORDER_FLAGS = "";
+				WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+			};
+			dependencies = (
+			);
+			isa = PBXToolTarget;
+			name = Quote;
+			productInstallPath = "$(HOME)/bin";
+			productName = Quote;
+			productReference = 034768E8FF38A79811DB9C8B;
+			shouldUseHeadermap = 1;
+		};
+		08FB77A0FE84155DC02AAC07 = {
+			buildActionMask = 2147483647;
+			files = (
+				F58F8DAB04A90C7A0145D34B,
+				F58F8DAF04A90C940145D34B,
+				F58F8DB604A90DBE0145D34B,
+				F58F8DB804A90DD20145D34B,
+			);
+			isa = PBXHeadersBuildPhase;
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		08FB77A1FE84155DC02AAC07 = {
+			buildActionMask = 2147483647;
+			files = (
+				F58F8DAA04A90C7A0145D34B,
+				F58F8DBB04A90E3D0145D34B,
+				F58F8DBC04A90E3D0145D34B,
+				F58F8DBE04A90E5B0145D34B,
+			);
+			isa = PBXSourcesBuildPhase;
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		08FB77A3FE84155DC02AAC07 = {
+			buildActionMask = 2147483647;
+			files = (
+			);
+			isa = PBXFrameworksBuildPhase;
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		08FB77A5FE84155DC02AAC07 = {
+			buildActionMask = 2147483647;
+			files = (
+			);
+			isa = PBXRezBuildPhase;
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+//080
+//081
+//082
+//083
+//084
+//1A0
+//1A1
+//1A2
+//1A3
+//1A4
+		1AB674ADFE9D54B511CA2CBB = {
+			children = (
+				034768E8FF38A79811DB9C8B,
+			);
+			isa = PBXGroup;
+			name = Products;
+			refType = 4;
+		};
+//1A0
+//1A1
+//1A2
+//1A3
+//1A4
+//C60
+//C61
+//C62
+//C63
+//C64
+		C6A0FF2B0290797F04C91782 = {
+			children = (
+				C6A0FF2C0290799A04C91782,
+			);
+			isa = PBXGroup;
+			name = Documentation;
+			refType = 4;
+		};
+		C6A0FF2C0290799A04C91782 = {
+			isa = PBXFileReference;
+			path = Quote.1;
+			refType = 4;
+		};
+		C6A0FF2D029079AD04C91782 = {
+			buildActionMask = 8;
+			dstPath = /usr/share/man/man1/;
+			dstSubfolderSpec = 0;
+			files = (
+				C6A0FF2E029079C004C91782,
+			);
+			isa = PBXCopyFilesBuildPhase;
+			runOnlyForDeploymentPostprocessing = 1;
+		};
+		C6A0FF2E029079C004C91782 = {
+			fileRef = C6A0FF2C0290799A04C91782;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+//C60
+//C61
+//C62
+//C63
+//C64
+//F50
+//F51
+//F52
+//F53
+//F54
+		F58F8DA804A90C7A0145D34B = {
+			isa = PBXFileReference;
+			path = quote.c;
+			refType = 4;
+		};
+		F58F8DA904A90C7A0145D34B = {
+			isa = PBXFileReference;
+			path = quote.h;
+			refType = 4;
+		};
+		F58F8DAA04A90C7A0145D34B = {
+			fileRef = F58F8DA804A90C7A0145D34B;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		F58F8DAB04A90C7A0145D34B = {
+			fileRef = F58F8DA904A90C7A0145D34B;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		F58F8DAD04A90C940145D34B = {
+			isa = PBXFileReference;
+			path = stdsoap2.h;
+			refType = 4;
+		};
+		F58F8DAF04A90C940145D34B = {
+			fileRef = F58F8DAD04A90C940145D34B;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		F58F8DB004A90D0E0145D34B = {
+			buildActionMask = 2147483647;
+			files = (
+			);
+			generatedFileNames = (
+			);
+			isa = PBXShellScriptBuildPhase;
+			neededFileNames = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "~/bin/soapcpp2 -c quote.h";
+		};
+		F58F8DB304A90DBE0145D34B = {
+			isa = PBXFileReference;
+			path = soapH.h;
+			refType = 4;
+		};
+		F58F8DB604A90DBE0145D34B = {
+			fileRef = F58F8DB304A90DBE0145D34B;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		F58F8DB704A90DD20145D34B = {
+			isa = PBXFileReference;
+			path = soapStub.h;
+			refType = 4;
+		};
+		F58F8DB804A90DD20145D34B = {
+			fileRef = F58F8DB704A90DD20145D34B;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		F58F8DB904A90E3D0145D34B = {
+			isa = PBXFileReference;
+			path = soapC.c;
+			refType = 4;
+		};
+		F58F8DBA04A90E3D0145D34B = {
+			isa = PBXFileReference;
+			path = soapClient.c;
+			refType = 4;
+		};
+		F58F8DBB04A90E3D0145D34B = {
+			fileRef = F58F8DB904A90E3D0145D34B;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		F58F8DBC04A90E3D0145D34B = {
+			fileRef = F58F8DBA04A90E3D0145D34B;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		F58F8DBD04A90E5B0145D34B = {
+			isa = PBXFileReference;
+			path = stdsoap2.c;
+			refType = 4;
+		};
+		F58F8DBE04A90E5B0145D34B = {
+			fileRef = F58F8DBD04A90E5B0145D34B;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+	};
+	rootObject = 08FB7793FE84155DC02AAC07;
+}
diff --git a/samples/quote_MAC_ProjBuild/README.txt b/samples/quote_MAC_ProjBuild/README.txt
new file mode 100644
index 0000000..86f41e2
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/README.txt
@@ -0,0 +1,33 @@
+Quote_PB: Delayed Stock Quotes Apple Mac OS X Project Builder Project
+
+This folder contains an example Apple Project Builder project to build an
+XMethods Delayed Stock Quote client application in C.
+
+The custom build step runs the gSOAP compiler to generate stubs and skeletons.
+
+To add (or modify) the custom build step, open the Quote.pbproj file and:
+1. select the "Targets" tab in the "Build" window
+2. in the "Targets" folder select "Quote"
+3. select "Build Phases" in "Summary"
+4. from the menu select "Project" then "New Build Phase"
+   and "New Shell Script Build Phase"
+5. in the "Script" entry add: "/usr/local/bin/soapcpp2 -c quote.h"
+
+In step 5 you need to enter the path to soapcpp2, which in this example is
+/usr/local/bin
+
+To install soapcpp2 in /usr/local/bin, enter these commands:
+sudo echo
+<enter your admin password>
+sudo cp soapcpp2 /usr/local/bin
+
+To build and debug the application, select "Build and Debug". When the link
+phase fails, check if soapC.c, soapClient.c (or soapServer.c to build a server)
+are present in the project sources. If not, add them from the menu "Project"
+"Add Files..."
+
+To view the output of the program while running, select the "Standard I/O" tab
+in the debugger.
+
+To change the command-line argument before running, select "Targets" and
+"Executables", "Quote".
diff --git a/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.build/BPTag000-script.sh b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.build/BPTag000-script.sh
new file mode 100755
index 0000000..196baea
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.build/BPTag000-script.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+~/bin/soapcpp2 -c quote.h
diff --git a/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.build/Objects-normal/LinkFileList b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.build/Objects-normal/LinkFileList
new file mode 100644
index 0000000..7a1c771
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.build/Objects-normal/LinkFileList
@@ -0,0 +1 @@
+/Users/engelen/Projects/Quote_PB/build/Quote.build/Quote.build/Objects-normal/ProjectBuilderMasterObjectFile.o
diff --git a/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.build/Objects-normal/LinkFileListPrelink b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.build/Objects-normal/LinkFileListPrelink
new file mode 100644
index 0000000..184fe45
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.build/Objects-normal/LinkFileListPrelink
@@ -0,0 +1,4 @@
+/Users/engelen/Projects/Quote_PB/build/Quote.build/Quote.build/Objects-normal/ppc/quote.o
+/Users/engelen/Projects/Quote_PB/build/Quote.build/Quote.build/Objects-normal/ppc/soapC.o
+/Users/engelen/Projects/Quote_PB/build/Quote.build/Quote.build/Objects-normal/ppc/soapClient.o
+/Users/engelen/Projects/Quote_PB/build/Quote.build/Quote.build/Objects-normal/ppc/stdsoap2.o
diff --git a/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.build/Quote.hmap b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.build/Quote.hmap
new file mode 100644
index 0000000..532300a
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.build/Quote.hmap
Binary files differ
diff --git a/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.build/TrustedPrecomps.txt b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.build/TrustedPrecomps.txt
new file mode 100644
index 0000000..6e6d6f1
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.build/TrustedPrecomps.txt
@@ -0,0 +1 @@
+/usr/include/unistd.h
diff --git a/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/Quote.indexed-precomps b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/Quote.indexed-precomps
new file mode 100644
index 0000000..13fff8c
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/Quote.indexed-precomps
@@ -0,0 +1 @@
+/usr/include/unistd-gcc3.p|1031973081
diff --git a/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/categories.pbxbtree b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/categories.pbxbtree
new file mode 100644
index 0000000..3fb6981
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/categories.pbxbtree
Binary files differ
diff --git a/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/decls.pbxbtree b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/decls.pbxbtree
new file mode 100644
index 0000000..466d81d
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/decls.pbxbtree
Binary files differ
diff --git a/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/files.pbxbtree b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/files.pbxbtree
new file mode 100644
index 0000000..5270fb1
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/files.pbxbtree
Binary files differ
diff --git a/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/imports.pbxbtree b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/imports.pbxbtree
new file mode 100644
index 0000000..6dcbd84
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/imports.pbxbtree
Binary files differ
diff --git a/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/pbxindex.header b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/pbxindex.header
new file mode 100644
index 0000000..1334d07
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/pbxindex.header
Binary files differ
diff --git a/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/protocols.pbxbtree b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/protocols.pbxbtree
new file mode 100644
index 0000000..3fb6981
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/protocols.pbxbtree
Binary files differ
diff --git a/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/refs.pbxbtree b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/refs.pbxbtree
new file mode 100644
index 0000000..f4e3705
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/refs.pbxbtree
Binary files differ
diff --git a/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/strings.pbxstrings/control b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/strings.pbxstrings/control
new file mode 100644
index 0000000..3420549
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/strings.pbxstrings/control
Binary files differ
diff --git a/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/strings.pbxstrings/strings b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/strings.pbxstrings/strings
new file mode 100644
index 0000000..59cbe9f
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/strings.pbxstrings/strings
Binary files differ
diff --git a/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/subclasses.pbxbtree b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/subclasses.pbxbtree
new file mode 100644
index 0000000..4c4f6e7
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/subclasses.pbxbtree
Binary files differ
diff --git a/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/symbols0.pbxsymbols b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/symbols0.pbxsymbols
new file mode 100644
index 0000000..6e213b6
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/build/Quote.build/Quote.pbxindex/symbols0.pbxsymbols
Binary files differ
diff --git a/samples/quote_MAC_ProjBuild/quote.c b/samples/quote_MAC_ProjBuild/quote.c
new file mode 100644
index 0000000..1278486
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/quote.c
@@ -0,0 +1,34 @@
+#include "soapH.h"	/* include generated proxy and SOAP support */
+
+int main(int argc, char **argv)
+{ struct soap soap;
+  float q;
+  char *sym;
+  if (argc > 1)
+    sym = argv[1];
+  else
+  { fprintf(stderr, "Usage: quote <ticker>\n");
+    exit(1);
+  }
+  soap_init(&soap);
+  if (soap_call_ns__getQuote(&soap, "http://services.xmethods.net/soap", "", sym, &q) == 0)
+    printf("\nCompany - %s    Quote - %f\n", sym, q);
+  else
+    soap_print_fault(&soap, stderr);
+  soap_end(&soap);
+  soap_done(&soap);
+  return 0;
+}
+
+/* The namespace mapping table is required and associates namespace prefixes with namespace names: */
+struct Namespace namespaces[] =
+{
+  {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"},	/* MUST be first */
+  {"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/"},	/* MUST be second */
+  {"xsi", "http://www.w3.org/1999/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance"},	/* MUST be third */
+  {"xsd", "http://www.w3.org/1999/XMLSchema", "http://www.w3.org/*/XMLSchema"},
+  {"ns", "urn:xmethods-delayed-quotes"},	/* Method namespace URI */
+  {NULL, NULL}
+};
+
+
diff --git a/samples/quote_MAC_ProjBuild/quote.h b/samples/quote_MAC_ProjBuild/quote.h
new file mode 100644
index 0000000..69ff37f
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/quote.h
@@ -0,0 +1,9 @@
+//gsoap ns service name:	quote
+//gsoap ns service style:	rpc
+//gsoap ns service encoding:	encoded
+//gsoap ns service namespace:	urn:xmethods-delayed-quotes
+//gsoap ns service location:	http://services.xmethods.net/soap
+
+//gsoap ns service method-action: getQuote ""
+
+int ns__getQuote(char *symbol, float *Result);
diff --git a/samples/quote_MAC_ProjBuild/soapC.c b/samples/quote_MAC_ProjBuild/soapC.c
new file mode 100644
index 0000000..f2cbc29
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/soapC.c
@@ -0,0 +1,1226 @@
+/* soapC.c
+   Generated by gSOAP 2.3 from quote.h
+   Copyright (C) 2001-2003 Genivia inc.
+   All Rights Reserved.
+*/
+#include "soapH.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+SOAP_SOURCE_STAMP("@(#) soapC.c ver 2.3 2003-06-24 23:24:12 GMT")
+
+
+#ifndef WITH_NOGLOBAL
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_serializeheader(struct soap *soap)
+{
+	soap_serialize_SOAP_ENV__Header(soap, soap->header);
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_putheader(struct soap *soap)
+{
+	if (soap->header)
+	{	soap->part = SOAP_IN_HEADER;
+		soap_out_SOAP_ENV__Header(soap, "SOAP-ENV:Header", 0, soap->header, NULL);
+		soap->part = SOAP_END_HEADER;
+	}
+	return SOAP_OK;
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_getheader(struct soap *soap)
+{
+	soap->part = SOAP_IN_HEADER;
+	soap->header = soap_in_SOAP_ENV__Header(soap, "SOAP-ENV:Header", NULL, NULL);
+	soap->part = SOAP_END_HEADER;
+	return soap->header == NULL;
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_fault(struct soap *soap)
+{
+	if (!soap->fault)
+	{	soap->fault = (struct SOAP_ENV__Fault*)soap_malloc(soap, sizeof(struct SOAP_ENV__Fault));
+		soap_default_SOAP_ENV__Fault(soap, soap->fault);
+	}
+	if (soap->version == 2 && !soap->fault->SOAP_ENV__Code)
+	{	soap->fault->SOAP_ENV__Code = (struct SOAP_ENV__Code*)soap_malloc(soap, sizeof(struct SOAP_ENV__Code));
+		soap_default_SOAP_ENV__Code(soap, soap->fault->SOAP_ENV__Code);
+	}
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_serializefault(struct soap *soap)
+{
+	soap_serialize_SOAP_ENV__Fault(soap, soap->fault);
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_putfault(struct soap *soap)
+{
+	return soap_out_SOAP_ENV__Fault(soap, "SOAP-ENV:Fault", 0, soap->fault, NULL);
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_getfault(struct soap *soap)
+{
+	return (soap->fault = soap_in_SOAP_ENV__Fault(soap, "SOAP-ENV:Fault", NULL, NULL)) == NULL;
+}
+
+SOAP_FMAC1 const char ** SOAP_FMAC2 soap_faultcode(struct soap *soap)
+{
+	soap_fault(soap);
+	if (soap->version == 2)
+		return (const char**)&soap->fault->SOAP_ENV__Code->SOAP_ENV__Value;
+	return (const char**)&soap->fault->faultcode;
+}
+
+SOAP_FMAC1 const char ** SOAP_FMAC2 soap_faultstring(struct soap *soap)
+{
+	soap_fault(soap);
+	if (soap->version == 2)
+		return (const char**)&soap->fault->SOAP_ENV__Reason;
+	return (const char**)&soap->fault->faultstring;
+}
+
+SOAP_FMAC1 const char ** SOAP_FMAC2 soap_faultdetail(struct soap *soap)
+{
+	soap_fault(soap);
+	if (soap->version == 2)
+		return (const char**)&soap->fault->SOAP_ENV__Detail;
+	return (const char**)&soap->fault->detail;
+}
+
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_getindependent(struct soap *soap)
+{
+	int t;
+	for (;;)
+		if (!soap_getelement(soap, &t))
+			if (soap->error || soap_ignore_element(soap))
+				break;
+	if (soap->error == SOAP_NO_TAG || soap->error == SOAP_EOF)
+		soap->error = SOAP_OK;
+	return soap->error;
+}
+
+SOAP_FMAC1 void * SOAP_FMAC2 soap_getelement(struct soap *soap, int *type)
+{
+	if (soap_peek_element(soap))
+		return NULL;
+	if (!*soap->id || !(*type = soap_lookup_type(soap, soap->id)))
+		*type = soap_lookup_type(soap, soap->href);
+	switch (*type)
+	{
+	case SOAP_TYPE_byte:
+		return soap_in_byte(soap, NULL, NULL, "xsd:byte");
+	case SOAP_TYPE_int:
+		return soap_in_int(soap, NULL, NULL, "xsd:int");
+	case SOAP_TYPE_float:
+		return soap_in_float(soap, NULL, NULL, "xsd:float");
+	case SOAP_TYPE_ns__getQuote:
+		return soap_in_ns__getQuote(soap, NULL, NULL, "ns:getQuote");
+	case SOAP_TYPE_ns__getQuoteResponse:
+		return soap_in_ns__getQuoteResponse(soap, NULL, NULL, "ns:getQuoteResponse");
+	case SOAP_TYPE_PointerTofloat:
+		return soap_in_PointerTofloat(soap, NULL, NULL, "xsd:float");
+	case SOAP_TYPE__QName:
+	{	char **s;
+		s = soap_in__QName(soap, NULL, NULL, "QName");
+		return s ? *s : NULL;
+	}
+	case SOAP_TYPE_string:
+	{	char **s;
+		s = soap_in_string(soap, NULL, NULL, "xsd:string");
+		return s ? *s : NULL;
+	}
+	default:
+		if (!*soap->type)
+			return NULL;
+		if (!soap_match_tag(soap, soap->type, "xsd:byte"))
+		{	*type = SOAP_TYPE_byte;
+			return soap_in_byte(soap, NULL, NULL, NULL);
+		}
+		if (!soap_match_tag(soap, soap->type, "xsd:int"))
+		{	*type = SOAP_TYPE_int;
+			return soap_in_int(soap, NULL, NULL, NULL);
+		}
+		if (!soap_match_tag(soap, soap->type, "xsd:float"))
+		{	*type = SOAP_TYPE_float;
+			return soap_in_float(soap, NULL, NULL, NULL);
+		}
+		if (!soap_match_tag(soap, soap->type, "ns:getQuote"))
+		{	*type = SOAP_TYPE_ns__getQuote;
+			return soap_in_ns__getQuote(soap, NULL, NULL, NULL);
+		}
+		if (!soap_match_tag(soap, soap->type, "ns:getQuoteResponse"))
+		{	*type = SOAP_TYPE_ns__getQuoteResponse;
+			return soap_in_ns__getQuoteResponse(soap, NULL, NULL, NULL);
+		}
+		if (!soap_match_tag(soap, soap->type, "QName"))
+		{	char **s;
+			*type = SOAP_TYPE__QName;
+			s = soap_in__QName(soap, NULL, NULL, NULL);
+			return s ? *s : NULL;
+		}
+		if (!soap_match_tag(soap, soap->type, "xsd:string"))
+		{	char **s;
+			*type = SOAP_TYPE_string;
+			s = soap_in_string(soap, NULL, NULL, NULL);
+			return s ? *s : NULL;
+		}
+	return NULL;
+	}
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_ignore_element(struct soap *soap)
+{	if (soap->mode & SOAP_XML_STRICT)
+		return SOAP_TAG_MISMATCH;
+	if (!soap_peek_element(soap))
+	{	int t;
+		if (soap->mustUnderstand && !soap->other)
+			return soap->error = SOAP_MUSTUNDERSTAND;
+		if (!*soap->id || !soap_getelement(soap, &t))
+		{	soap->peeked = 0;
+			DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unknown element '%s' (level=%u, %d)\n", soap->tag, soap->level, soap->body));
+			if (soap->fignore)
+				soap->error = soap->fignore(soap, soap->tag);			else
+				soap->error = SOAP_OK;
+			DBGLOG(TEST, if (!soap->error) SOAP_MESSAGE(fdebug, "IGNORING element '%s'\n", soap->tag));
+			if (!soap->error && soap->body)
+			{	soap->level++;
+				while (!soap_ignore_element(soap))
+					;
+				if (soap->error == SOAP_NO_TAG)
+					soap->error = soap_element_end_in(soap, NULL);
+			}
+		}
+	}
+	return soap->error;}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_putindependent(struct soap *soap)
+{
+	int i;
+	struct soap_plist *pp;
+	if (soap->version == 1 && !(soap->mode & (SOAP_XML_TREE | SOAP_XML_GRAPH)))
+		for (i = 0; i < SOAP_PTRHASH; i++)
+			for (pp = soap->pht[i]; pp; pp = pp->next)
+				if ((soap->mode & SOAP_IO_LENGTH) ? pp->mark1 == 2 : pp->mark2 == 2)
+					if (soap_putelement(soap, pp->ptr, "id", pp->id, pp->type))
+						return soap->error;
+	return SOAP_OK;
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_putelement(struct soap *soap, const void *ptr, const char *tag, int id, int type)
+{
+	switch (type)
+	{
+	case SOAP_TYPE_byte:
+		return soap_out_byte(soap, tag, id, (const char *)ptr, "xsd:byte");
+	case SOAP_TYPE_int:
+		return soap_out_int(soap, tag, id, (const int *)ptr, "xsd:int");
+	case SOAP_TYPE_float:
+		return soap_out_float(soap, tag, id, (const float *)ptr, "xsd:float");
+	case SOAP_TYPE_ns__getQuote:
+		return soap_out_ns__getQuote(soap, tag, id, (const struct ns__getQuote *)ptr, "ns:getQuote");
+	case SOAP_TYPE_ns__getQuoteResponse:
+		return soap_out_ns__getQuoteResponse(soap, tag, id, (const struct ns__getQuoteResponse *)ptr, "ns:getQuoteResponse");
+	case SOAP_TYPE_PointerTofloat:
+		return soap_out_PointerTofloat(soap, tag, id, (float *const*)ptr, "xsd:float");
+	case SOAP_TYPE__QName:
+		return soap_out_string(soap, tag, id, (char**)&ptr, "QName");
+	case SOAP_TYPE_string:
+		return soap_out_string(soap, tag, id, (char**)&ptr, "xsd:string");
+	}
+	return SOAP_OK;
+}
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_getattachments(struct soap *soap)
+{
+	if (!(soap->mode & SOAP_ENC_DIME))
+		return SOAP_OK;
+	while (soap->dime_flags & SOAP_DIME_CF)
+	{	if (soap_getdimehdr(soap))
+			return soap->error;
+		if (soap_move(soap, soap->dime_size))
+			return soap->error = SOAP_EOF;
+	}
+	if (soap_move(soap, ((soap->dime_size+3)&(~3))-soap_tell(soap)))
+		return soap->error = SOAP_EOF;
+	for (;;)
+	{	if (soap_getdime(soap) || !soap->dime_id)
+			break;
+		switch (soap_lookup_type(soap, soap->dime_id))
+		{
+		case SOAP_TYPE__QName:
+		{	char ** a;
+			a = (char **)soap_id_enter(soap, soap->dime_id, NULL, SOAP_TYPE__QName, sizeof(char *), 0);
+			if (a)
+				*a = soap->dime_ptr;
+			break;
+		}
+		case SOAP_TYPE_string:
+		{	char ** a;
+			a = (char **)soap_id_enter(soap, soap->dime_id, NULL, SOAP_TYPE_string, sizeof(char *), 0);
+			if (a)
+				*a = soap->dime_ptr;
+			break;
+		}
+		default:
+			soap->error = SOAP_DIME_ERROR;
+		}
+		if (soap->error)
+			break;
+	}
+	if (soap->error == SOAP_EOD)
+		soap->error = SOAP_OK;
+	return soap->error;
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_putattachments(struct soap *soap)
+{
+	int i;
+	struct soap_plist *pp;
+	if (!(soap->mode & SOAP_ENC_DIME))
+		return SOAP_OK;
+	for (i = 0; i < SOAP_PTRHASH; i++)
+		for (pp = soap->pht[i]; pp; pp = pp->next)
+			if (pp->mark2 == 3)
+				switch (pp->type)
+				{
+				}
+		
+	return SOAP_OK;
+}
+#endif
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_default_byte(struct soap *soap, char *a)
+{
+#ifdef SOAP_DEFAULT_byte
+	*a = SOAP_DEFAULT_byte;
+#else
+	*a = (char)0;
+#endif
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_serialize_byte(struct soap *soap, char const*a)
+{
+	soap_reference(soap, a, SOAP_TYPE_byte);
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_put_byte(struct soap *soap, char *a, const char *tag, const char *type)
+{
+	int i = soap_embed_element(soap, (void*)a, tag, SOAP_TYPE_byte);
+	if (i >= 0)
+		soap_out_byte(soap, tag, i, a, type);
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_out_byte(struct soap *soap, const char *tag, int id, const char *a, const char *type)
+{
+	return soap_outbyte(soap, tag, id, a, type, SOAP_TYPE_byte);
+}
+
+SOAP_FMAC1 char * SOAP_FMAC2 soap_get_byte(struct soap *soap, char *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_byte(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC1 char * SOAP_FMAC2 soap_in_byte(struct soap *soap, const char *tag, char *a, const char *type)
+{
+	return soap_inbyte(soap, tag, a, type, SOAP_TYPE_byte);
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_default_int(struct soap *soap, int *a)
+{
+#ifdef SOAP_DEFAULT_int
+	*a = SOAP_DEFAULT_int;
+#else
+	*a = (int)0;
+#endif
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_serialize_int(struct soap *soap, int const*a)
+{
+	soap_reference(soap, a, SOAP_TYPE_int);
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_put_int(struct soap *soap, int *a, const char *tag, const char *type)
+{
+	int i = soap_embed_element(soap, (void*)a, tag, SOAP_TYPE_int);
+	if (i >= 0)
+		soap_out_int(soap, tag, i, a, type);
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_out_int(struct soap *soap, const char *tag, int id, const int *a, const char *type)
+{
+	return soap_outint(soap, tag, id, a, type, SOAP_TYPE_int);
+}
+
+SOAP_FMAC1 int * SOAP_FMAC2 soap_get_int(struct soap *soap, int *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_int(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC1 int * SOAP_FMAC2 soap_in_int(struct soap *soap, const char *tag, int *a, const char *type)
+{
+	return soap_inint(soap, tag, a, type, SOAP_TYPE_int);
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_default_float(struct soap *soap, float *a)
+{
+#ifdef SOAP_DEFAULT_float
+	*a = SOAP_DEFAULT_float;
+#else
+	*a = (float)0;
+#endif
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_serialize_float(struct soap *soap, float const*a)
+{
+	soap_reference(soap, a, SOAP_TYPE_float);
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_put_float(struct soap *soap, float *a, const char *tag, const char *type)
+{
+	int i = soap_embed_element(soap, (void*)a, tag, SOAP_TYPE_float);
+	if (i >= 0)
+		soap_out_float(soap, tag, i, a, type);
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_out_float(struct soap *soap, const char *tag, int id, const float *a, const char *type)
+{
+	return soap_outfloat(soap, tag, id, a, type, SOAP_TYPE_float);
+}
+
+SOAP_FMAC1 float * SOAP_FMAC2 soap_get_float(struct soap *soap, float *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_float(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC1 float * SOAP_FMAC2 soap_in_float(struct soap *soap, const char *tag, float *a, const char *type)
+{
+	return soap_infloat(soap, tag, a, type, SOAP_TYPE_float);
+}
+
+#ifndef WITH_NOGLOBAL
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_serialize_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault const*a)
+{
+	if (!soap_reference(soap, a, SOAP_TYPE_SOAP_ENV__Fault))
+		soap_mark_SOAP_ENV__Fault(soap, a);
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_mark_SOAP_ENV__Fault(struct soap *soap, const struct SOAP_ENV__Fault *a)
+{
+	soap_embedded(soap, &a->faultcode, SOAP_TYPE__QName);
+	soap_mark__QName(soap, &a->faultcode);
+	soap_embedded(soap, &a->faultstring, SOAP_TYPE_string);
+	soap_mark_string(soap, &a->faultstring);
+	soap_embedded(soap, &a->faultactor, SOAP_TYPE_string);
+	soap_mark_string(soap, &a->faultactor);
+	soap_embedded(soap, &a->detail, SOAP_TYPE_string);
+	soap_mark_string(soap, &a->detail);
+	soap_embedded(soap, &a->SOAP_ENV__Code, SOAP_TYPE_PointerToSOAP_ENV__Code);
+	soap_mark_PointerToSOAP_ENV__Code(soap, &a->SOAP_ENV__Code);
+	soap_embedded(soap, &a->SOAP_ENV__Reason, SOAP_TYPE_string);
+	soap_mark_string(soap, &a->SOAP_ENV__Reason);
+	soap_embedded(soap, &a->SOAP_ENV__Detail, SOAP_TYPE_string);
+	soap_mark_string(soap, &a->SOAP_ENV__Detail);
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_default_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault *a)
+{
+	soap_default__QName(soap, &a->faultcode);
+	soap_default_string(soap, &a->faultstring);
+	soap_default_string(soap, &a->faultactor);
+	soap_default_string(soap, &a->detail);
+	soap_default_PointerToSOAP_ENV__Code(soap, &a->SOAP_ENV__Code);
+	soap_default_string(soap, &a->SOAP_ENV__Reason);
+	soap_default_string(soap, &a->SOAP_ENV__Detail);
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_put_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault *a, const char *tag, const char *type)
+{
+	int i = soap_embed_element(soap, (void*)a, tag, SOAP_TYPE_SOAP_ENV__Fault);
+	if (i >= 0)
+		soap_out_SOAP_ENV__Fault(soap, tag, i, a, type);
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_out_SOAP_ENV__Fault(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Fault *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Fault), type);
+	soap_out__QName(soap, "faultcode", -1, &a->faultcode, "");
+	soap_out_string(soap, "faultstring", -1, &a->faultstring, "");
+	soap_out_string(soap, "faultactor", -1, &a->faultactor, "");
+	soap_out_string(soap, "detail", -1, &a->detail, "");
+	soap_out_PointerToSOAP_ENV__Code(soap, "SOAP-ENV:Code", -1, &a->SOAP_ENV__Code, "");
+	soap_out_string(soap, "SOAP-ENV:Reason", -1, &a->SOAP_ENV__Reason, "");
+	soap_out_string(soap, "SOAP-ENV:Detail", -1, &a->SOAP_ENV__Detail, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC1 struct SOAP_ENV__Fault * SOAP_FMAC2 soap_get_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_SOAP_ENV__Fault(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC1 struct SOAP_ENV__Fault * SOAP_FMAC2 soap_in_SOAP_ENV__Fault(struct soap *soap, const char *tag, struct SOAP_ENV__Fault *a, const char *type)
+{
+	short soap_flag_faultcode = 1, soap_flag_faultstring = 1, soap_flag_faultactor = 1, soap_flag_detail = 1, soap_flag_SOAP_ENV__Code = 1, soap_flag_SOAP_ENV__Reason = 1, soap_flag_SOAP_ENV__Detail = 1;
+	if (soap_element_begin_in(soap, tag))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE_MISMATCH;
+		soap_revert(soap);
+		return NULL;
+	}
+	if (soap->null)
+	{	if (soap->mode & SOAP_XML_NIL)
+		{	soap->error = SOAP_NULL;
+			return NULL;
+		}
+		else
+			return a;
+	}
+	if (!*soap->href)
+	{	a = (struct SOAP_ENV__Fault *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Fault, sizeof(struct SOAP_ENV__Fault), 0);
+		if (!a)
+			return NULL;
+		if (soap->alloced)
+			soap_default_SOAP_ENV__Fault(soap, a);
+		if (soap->body)
+		{	for (;;)
+			{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_faultcode && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in__QName(soap, "faultcode", &a->faultcode, ""))
+				{	soap_flag_faultcode = 0;
+					continue;
+				}
+			if (soap_flag_faultstring && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_string(soap, "faultstring", &a->faultstring, ""))
+				{	soap_flag_faultstring = 0;
+					continue;
+				}
+			if (soap_flag_faultactor && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_string(soap, "faultactor", &a->faultactor, ""))
+				{	soap_flag_faultactor = 0;
+					continue;
+				}
+			if (soap_flag_detail && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_string(soap, "detail", &a->detail, ""))
+				{	soap_flag_detail = 0;
+					continue;
+				}
+			if (soap_flag_SOAP_ENV__Code && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_PointerToSOAP_ENV__Code(soap, "SOAP-ENV:Code", &a->SOAP_ENV__Code, ""))
+				{	soap_flag_SOAP_ENV__Code = 0;
+					continue;
+				}
+			if (soap_flag_SOAP_ENV__Reason && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_string(soap, "SOAP-ENV:Reason", &a->SOAP_ENV__Reason, ""))
+				{	soap_flag_SOAP_ENV__Reason = 0;
+					continue;
+				}
+			if (soap_flag_SOAP_ENV__Detail && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_string(soap, "SOAP-ENV:Detail", &a->SOAP_ENV__Detail, ""))
+				{	soap_flag_SOAP_ENV__Detail = 0;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+			{	return NULL;
+			}
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+		}
+	}
+	else
+	{	a = (struct SOAP_ENV__Fault *)soap_id_forward(soap, soap->href, (void**)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Fault, sizeof(struct SOAP_ENV__Fault), 0), SOAP_TYPE_SOAP_ENV__Fault, sizeof(struct SOAP_ENV__Fault));
+		if (soap->alloced)
+			soap_default_SOAP_ENV__Fault(soap, a);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+#endif
+
+#ifndef WITH_NOGLOBAL
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_serialize_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code const*a)
+{
+	if (!soap_reference(soap, a, SOAP_TYPE_SOAP_ENV__Code))
+		soap_mark_SOAP_ENV__Code(soap, a);
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_mark_SOAP_ENV__Code(struct soap *soap, const struct SOAP_ENV__Code *a)
+{
+	soap_embedded(soap, &a->SOAP_ENV__Value, SOAP_TYPE__QName);
+	soap_mark__QName(soap, &a->SOAP_ENV__Value);
+	soap_embedded(soap, &a->SOAP_ENV__Node, SOAP_TYPE_string);
+	soap_mark_string(soap, &a->SOAP_ENV__Node);
+	soap_embedded(soap, &a->SOAP_ENV__Role, SOAP_TYPE_string);
+	soap_mark_string(soap, &a->SOAP_ENV__Role);
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_default_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *a)
+{
+	soap_default__QName(soap, &a->SOAP_ENV__Value);
+	soap_default_string(soap, &a->SOAP_ENV__Node);
+	soap_default_string(soap, &a->SOAP_ENV__Role);
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_put_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *a, const char *tag, const char *type)
+{
+	int i = soap_embed_element(soap, (void*)a, tag, SOAP_TYPE_SOAP_ENV__Code);
+	if (i >= 0)
+		soap_out_SOAP_ENV__Code(soap, tag, i, a, type);
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_out_SOAP_ENV__Code(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Code *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Code), type);
+	soap_out__QName(soap, "SOAP-ENV:Value", -1, &a->SOAP_ENV__Value, "");
+	soap_out_string(soap, "SOAP-ENV:Node", -1, &a->SOAP_ENV__Node, "");
+	soap_out_string(soap, "SOAP-ENV:Role", -1, &a->SOAP_ENV__Role, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC1 struct SOAP_ENV__Code * SOAP_FMAC2 soap_get_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_SOAP_ENV__Code(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC1 struct SOAP_ENV__Code * SOAP_FMAC2 soap_in_SOAP_ENV__Code(struct soap *soap, const char *tag, struct SOAP_ENV__Code *a, const char *type)
+{
+	short soap_flag_SOAP_ENV__Value = 1, soap_flag_SOAP_ENV__Node = 1, soap_flag_SOAP_ENV__Role = 1;
+	if (soap_element_begin_in(soap, tag))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE_MISMATCH;
+		soap_revert(soap);
+		return NULL;
+	}
+	if (soap->null)
+	{	if (soap->mode & SOAP_XML_NIL)
+		{	soap->error = SOAP_NULL;
+			return NULL;
+		}
+		else
+			return a;
+	}
+	if (!*soap->href)
+	{	a = (struct SOAP_ENV__Code *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Code, sizeof(struct SOAP_ENV__Code), 0);
+		if (!a)
+			return NULL;
+		if (soap->alloced)
+			soap_default_SOAP_ENV__Code(soap, a);
+		if (soap->body)
+		{	for (;;)
+			{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_SOAP_ENV__Value && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in__QName(soap, "SOAP-ENV:Value", &a->SOAP_ENV__Value, ""))
+				{	soap_flag_SOAP_ENV__Value = 0;
+					continue;
+				}
+			if (soap_flag_SOAP_ENV__Node && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_string(soap, "SOAP-ENV:Node", &a->SOAP_ENV__Node, ""))
+				{	soap_flag_SOAP_ENV__Node = 0;
+					continue;
+				}
+			if (soap_flag_SOAP_ENV__Role && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_string(soap, "SOAP-ENV:Role", &a->SOAP_ENV__Role, ""))
+				{	soap_flag_SOAP_ENV__Role = 0;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+			{	return NULL;
+			}
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+		}
+	}
+	else
+	{	a = (struct SOAP_ENV__Code *)soap_id_forward(soap, soap->href, (void**)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Code, sizeof(struct SOAP_ENV__Code), 0), SOAP_TYPE_SOAP_ENV__Code, sizeof(struct SOAP_ENV__Code));
+		if (soap->alloced)
+			soap_default_SOAP_ENV__Code(soap, a);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+#endif
+
+#ifndef WITH_NOGLOBAL
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_serialize_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Header const*a)
+{
+	if (!soap_reference(soap, a, SOAP_TYPE_SOAP_ENV__Header))
+		soap_mark_SOAP_ENV__Header(soap, a);
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_mark_SOAP_ENV__Header(struct soap *soap, const struct SOAP_ENV__Header *a)
+{
+	/* transient dummy skipped */
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_default_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Header *a)
+{
+	/* transient dummy skipped */
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_put_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Header *a, const char *tag, const char *type)
+{
+	int i = soap_embed_element(soap, (void*)a, tag, SOAP_TYPE_SOAP_ENV__Header);
+	if (i >= 0)
+		soap_out_SOAP_ENV__Header(soap, tag, i, a, type);
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_out_SOAP_ENV__Header(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Header *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Header), type);
+	/* transient dummy skipped */
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC1 struct SOAP_ENV__Header * SOAP_FMAC2 soap_get_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Header *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_SOAP_ENV__Header(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC1 struct SOAP_ENV__Header * SOAP_FMAC2 soap_in_SOAP_ENV__Header(struct soap *soap, const char *tag, struct SOAP_ENV__Header *a, const char *type)
+{;
+	if (soap_element_begin_in(soap, tag))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE_MISMATCH;
+		soap_revert(soap);
+		return NULL;
+	}
+	if (soap->null)
+	{	if (soap->mode & SOAP_XML_NIL)
+		{	soap->error = SOAP_NULL;
+			return NULL;
+		}
+		else
+			return a;
+	}
+	if (!*soap->href)
+	{	a = (struct SOAP_ENV__Header *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Header, sizeof(struct SOAP_ENV__Header), 0);
+		if (!a)
+			return NULL;
+		if (soap->alloced)
+			soap_default_SOAP_ENV__Header(soap, a);
+		if (soap->body)
+		{	for (;;)
+			{	soap->error = SOAP_TAG_MISMATCH;
+		/* transient dummy skipped */
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+			{	return NULL;
+			}
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+		}
+	}
+	else
+	{	a = (struct SOAP_ENV__Header *)soap_id_forward(soap, soap->href, (void**)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Header, sizeof(struct SOAP_ENV__Header), 0), SOAP_TYPE_SOAP_ENV__Header, sizeof(struct SOAP_ENV__Header));
+		if (soap->alloced)
+			soap_default_SOAP_ENV__Header(soap, a);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+#endif
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_serialize_ns__getQuote(struct soap *soap, struct ns__getQuote const*a)
+{
+	if (!soap_reference(soap, a, SOAP_TYPE_ns__getQuote))
+		soap_mark_ns__getQuote(soap, a);
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_mark_ns__getQuote(struct soap *soap, const struct ns__getQuote *a)
+{
+	soap_embedded(soap, &a->symbol, SOAP_TYPE_string);
+	soap_mark_string(soap, &a->symbol);
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_default_ns__getQuote(struct soap *soap, struct ns__getQuote *a)
+{
+	soap_default_string(soap, &a->symbol);
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_put_ns__getQuote(struct soap *soap, struct ns__getQuote *a, const char *tag, const char *type)
+{
+	int i = soap_embed_element(soap, (void*)a, tag, SOAP_TYPE_ns__getQuote);
+	if (i >= 0)
+		soap_out_ns__getQuote(soap, tag, i, a, type);
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_out_ns__getQuote(struct soap *soap, const char *tag, int id, const struct ns__getQuote *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__getQuote), type);
+	soap_out_string(soap, "symbol", -1, &a->symbol, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC1 struct ns__getQuote * SOAP_FMAC2 soap_get_ns__getQuote(struct soap *soap, struct ns__getQuote *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__getQuote(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC1 struct ns__getQuote * SOAP_FMAC2 soap_in_ns__getQuote(struct soap *soap, const char *tag, struct ns__getQuote *a, const char *type)
+{
+	short soap_flag_symbol = 1;
+	if (soap_element_begin_in(soap, tag))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE_MISMATCH;
+		soap_revert(soap);
+		return NULL;
+	}
+	if (soap->null)
+	{	if (soap->mode & SOAP_XML_NIL)
+		{	soap->error = SOAP_NULL;
+			return NULL;
+		}
+		else
+			return a;
+	}
+	if (!*soap->href)
+	{	a = (struct ns__getQuote *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__getQuote, sizeof(struct ns__getQuote), 0);
+		if (!a)
+			return NULL;
+		if (soap->alloced)
+			soap_default_ns__getQuote(soap, a);
+		if (soap->body)
+		{	for (;;)
+			{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_symbol && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_string(soap, "symbol", &a->symbol, ""))
+				{	soap_flag_symbol = 0;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+			{	return NULL;
+			}
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+		}
+	}
+	else
+	{	a = (struct ns__getQuote *)soap_id_forward(soap, soap->href, (void**)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__getQuote, sizeof(struct ns__getQuote), 0), SOAP_TYPE_ns__getQuote, sizeof(struct ns__getQuote));
+		if (soap->alloced)
+			soap_default_ns__getQuote(soap, a);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_serialize_ns__getQuoteResponse(struct soap *soap, struct ns__getQuoteResponse const*a)
+{
+	if (!soap_reference(soap, a, SOAP_TYPE_ns__getQuoteResponse))
+		soap_mark_ns__getQuoteResponse(soap, a);
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_mark_ns__getQuoteResponse(struct soap *soap, const struct ns__getQuoteResponse *a)
+{
+	soap_embedded(soap, &a->Result, SOAP_TYPE_PointerTofloat);
+	soap_mark_PointerTofloat(soap, &a->Result);
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_default_ns__getQuoteResponse(struct soap *soap, struct ns__getQuoteResponse *a)
+{
+	soap_default_PointerTofloat(soap, &a->Result);
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_put_ns__getQuoteResponse(struct soap *soap, struct ns__getQuoteResponse *a, const char *tag, const char *type)
+{
+	int i = soap_embed_element(soap, (void*)a, tag, SOAP_TYPE_ns__getQuoteResponse);
+	if (i >= 0)
+		soap_out_ns__getQuoteResponse(soap, tag, i, a, type);
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_out_ns__getQuoteResponse(struct soap *soap, const char *tag, int id, const struct ns__getQuoteResponse *a, const char *type)
+{
+	soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__getQuoteResponse), type);
+	if (a->Result)
+		soap_element_result(soap, "Result");
+	soap_out_PointerTofloat(soap, "Result", -1, &a->Result, "");
+	soap_element_end_out(soap, tag);
+	return SOAP_OK;
+}
+
+SOAP_FMAC1 struct ns__getQuoteResponse * SOAP_FMAC2 soap_get_ns__getQuoteResponse(struct soap *soap, struct ns__getQuoteResponse *p, const char *tag, const char *type)
+{
+	if ((p = soap_in_ns__getQuoteResponse(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC1 struct ns__getQuoteResponse * SOAP_FMAC2 soap_in_ns__getQuoteResponse(struct soap *soap, const char *tag, struct ns__getQuoteResponse *a, const char *type)
+{
+	short soap_flag_Result = 1;
+	if (soap_element_begin_in(soap, tag))
+		return NULL;
+	if (*soap->type && soap_match_tag(soap, soap->type, type))
+	{	soap->error = SOAP_TYPE_MISMATCH;
+		soap_revert(soap);
+		return NULL;
+	}
+	if (soap->null)
+	{	if (soap->mode & SOAP_XML_NIL)
+		{	soap->error = SOAP_NULL;
+			return NULL;
+		}
+		else
+			return a;
+	}
+	if (!*soap->href)
+	{	a = (struct ns__getQuoteResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__getQuoteResponse, sizeof(struct ns__getQuoteResponse), 0);
+		if (!a)
+			return NULL;
+		if (soap->alloced)
+			soap_default_ns__getQuoteResponse(soap, a);
+		if (soap->body)
+		{	for (;;)
+			{	soap->error = SOAP_TAG_MISMATCH;
+			if (soap_flag_Result && soap->error == SOAP_TAG_MISMATCH)
+				if (soap_in_PointerTofloat(soap, "Result", &a->Result, ""))
+				{	soap_flag_Result = 0;
+					continue;
+				}
+			if (soap->error == SOAP_TAG_MISMATCH)
+				soap->error = soap_ignore_element(soap);
+			if (soap->error == SOAP_NO_TAG)
+				break;
+			if (soap->error)
+			{	return NULL;
+			}
+		}
+		if (soap_element_end_in(soap, tag))
+			return NULL;
+		}
+	}
+	else
+	{	a = (struct ns__getQuoteResponse *)soap_id_forward(soap, soap->href, (void**)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__getQuoteResponse, sizeof(struct ns__getQuoteResponse), 0), SOAP_TYPE_ns__getQuoteResponse, sizeof(struct ns__getQuoteResponse));
+		if (soap->alloced)
+			soap_default_ns__getQuoteResponse(soap, a);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+#ifndef WITH_NOGLOBAL
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_serialize_PointerToSOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *const*a)
+{
+	if (!soap_reference(soap, a, SOAP_TYPE_PointerToSOAP_ENV__Code))
+		soap_mark_PointerToSOAP_ENV__Code(soap, a);
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_mark_PointerToSOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *const*a)
+{
+	if (!soap_reference(soap, *a, SOAP_TYPE_SOAP_ENV__Code))
+		soap_mark_SOAP_ENV__Code(soap, *a);
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_default_PointerToSOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code **a)
+{
+	*a = NULL;
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_put_PointerToSOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code **a, const char *tag, const char *type)
+{
+	int i = soap_embed_element(soap, (void*)a, tag, SOAP_TYPE_PointerToSOAP_ENV__Code);
+	if (i >= 0)
+		soap_out_PointerToSOAP_ENV__Code(soap, tag, i, a, type);
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_out_PointerToSOAP_ENV__Code(struct soap *soap, const char *tag, int id, struct SOAP_ENV__Code *const*a, const char *type)
+{
+	struct soap_plist *pp;
+	register int i;
+	id = soap_embedded_id(soap, id, a, SOAP_TYPE_PointerToSOAP_ENV__Code);
+	if (!*a)
+		return soap_element_null(soap, tag, id, type);
+	i = soap_pointer_lookup(soap, *a, SOAP_TYPE_SOAP_ENV__Code, &pp);
+	if (i)
+	{	if (soap_is_embedded(soap, pp))
+			return soap_element_ref(soap, tag, id, i);
+		if (soap_is_single(soap, pp))
+			return soap_out_SOAP_ENV__Code(soap, tag, 0, *a, type);
+		soap_set_embedded(soap, pp);
+		return soap_out_SOAP_ENV__Code(soap, tag, i, *a, type);
+	}
+	return soap_out_SOAP_ENV__Code(soap, tag, soap_pointer_enter(soap, *a, SOAP_TYPE_SOAP_ENV__Code, &pp), *a, type);
+}
+
+SOAP_FMAC1 struct SOAP_ENV__Code ** SOAP_FMAC2 soap_get_PointerToSOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code **p, const char *tag, const char *type)
+{
+	if ((p = soap_in_PointerToSOAP_ENV__Code(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC1 struct SOAP_ENV__Code ** SOAP_FMAC2 soap_in_PointerToSOAP_ENV__Code(struct soap *soap, const char *tag, struct SOAP_ENV__Code **a, const char *type)
+{
+	struct SOAP_ENV__Code *p;
+	if (soap_element_begin_in(soap, tag))
+		return NULL;
+	if (soap->null)
+	{	a = (struct SOAP_ENV__Code **)soap_id_enter(soap, soap->id, a, SOAP_TYPE_PointerToSOAP_ENV__Code, sizeof(struct SOAP_ENV__Code *), 1);
+		if (a)
+			*a = NULL;
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else if (!*soap->href)
+	{	soap_revert(soap);
+		if (a)
+		{	if ((p = soap_in_SOAP_ENV__Code(soap, tag, *a, type)))
+				*a = p;
+			else
+				a = NULL;
+		}
+		else if ((p = soap_in_SOAP_ENV__Code(soap, tag, NULL, type)))
+		{	a = (struct SOAP_ENV__Code **)soap_id_enter(soap, "", NULL, SOAP_TYPE_PointerToSOAP_ENV__Code, sizeof(struct SOAP_ENV__Code *), 0);
+			if (a)
+				*a = p;
+		}
+	}
+	else
+	{	a = (struct SOAP_ENV__Code **)soap_id_lookup(soap, soap->href, (void**)soap_id_enter(soap, soap->id, a, SOAP_TYPE_PointerToSOAP_ENV__Code, sizeof(struct SOAP_ENV__Code *), 1), SOAP_TYPE_SOAP_ENV__Code, sizeof(struct SOAP_ENV__Code), 0);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+#endif
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_serialize_PointerTofloat(struct soap *soap, float *const*a)
+{
+	if (!soap_reference(soap, a, SOAP_TYPE_PointerTofloat))
+		soap_mark_PointerTofloat(soap, a);
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_mark_PointerTofloat(struct soap *soap, float *const*a)
+{
+	soap_reference(soap, *a, SOAP_TYPE_float);
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_default_PointerTofloat(struct soap *soap, float **a)
+{
+	*a = NULL;
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_put_PointerTofloat(struct soap *soap, float **a, const char *tag, const char *type)
+{
+	int i = soap_embed_element(soap, (void*)a, tag, SOAP_TYPE_PointerTofloat);
+	if (i >= 0)
+		soap_out_PointerTofloat(soap, tag, i, a, type);
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_out_PointerTofloat(struct soap *soap, const char *tag, int id, float *const*a, const char *type)
+{
+	struct soap_plist *pp;
+	register int i;
+	id = soap_embedded_id(soap, id, a, SOAP_TYPE_PointerTofloat);
+	if (!*a)
+		return soap_element_null(soap, tag, id, type);
+	i = soap_pointer_lookup(soap, *a, SOAP_TYPE_float, &pp);
+	if (i)
+	{	if (soap_is_embedded(soap, pp))
+			return soap_element_ref(soap, tag, id, i);
+		if (soap_is_single(soap, pp))
+			return soap_out_float(soap, tag, 0, *a, type);
+		soap_set_embedded(soap, pp);
+		return soap_out_float(soap, tag, i, *a, type);
+	}
+	return soap_out_float(soap, tag, soap_pointer_enter(soap, *a, SOAP_TYPE_float, &pp), *a, type);
+}
+
+SOAP_FMAC1 float ** SOAP_FMAC2 soap_get_PointerTofloat(struct soap *soap, float **p, const char *tag, const char *type)
+{
+	if ((p = soap_in_PointerTofloat(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC1 float ** SOAP_FMAC2 soap_in_PointerTofloat(struct soap *soap, const char *tag, float **a, const char *type)
+{
+	float *p;
+	if (soap_element_begin_in(soap, tag))
+		return NULL;
+	if (soap->null)
+	{	a = (float **)soap_id_enter(soap, soap->id, a, SOAP_TYPE_PointerTofloat, sizeof(float *), 1);
+		if (a)
+			*a = NULL;
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	else if (!*soap->href)
+	{	soap_revert(soap);
+		if (a)
+		{	if ((p = soap_in_float(soap, tag, *a, type)))
+				*a = p;
+			else
+				a = NULL;
+		}
+		else if ((p = soap_in_float(soap, tag, NULL, type)))
+		{	a = (float **)soap_id_enter(soap, "", NULL, SOAP_TYPE_PointerTofloat, sizeof(float *), 0);
+			if (a)
+				*a = p;
+		}
+	}
+	else
+	{	a = (float **)soap_id_lookup(soap, soap->href, (void**)soap_id_enter(soap, soap->id, a, SOAP_TYPE_PointerTofloat, sizeof(float *), 1), SOAP_TYPE_float, sizeof(float), 0);
+		if (soap->body && soap_element_end_in(soap, tag))
+			return NULL;
+	}
+	return a;
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_default__QName(struct soap *soap, char **a)
+{
+#ifdef SOAP_DEFAULT__QName
+	*a = SOAP_DEFAULT__QName;
+#else
+	*a = (char *)0;
+#endif
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_serialize__QName(struct soap *soap, char *const*a)
+{
+	soap_reference(soap, *a, SOAP_TYPE__QName);
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_mark__QName(struct soap *soap, char *const*a)
+{
+	soap_reference(soap, *a, SOAP_TYPE__QName);
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_put__QName(struct soap *soap, char **a, const char *tag, const char *type)
+{
+	int i = soap_embed_element(soap, (void*)a, tag, SOAP_TYPE__QName);
+	if (i >= 0)
+		soap_out__QName(soap, tag, i, a, type);
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_out__QName(struct soap *soap, const char *tag, int id, char *const*a, const char *type)
+{
+	return soap_outstring(soap, tag, id, a, type, SOAP_TYPE__QName);
+}
+
+SOAP_FMAC1 char ** SOAP_FMAC2 soap_get__QName(struct soap *soap, char **p, const char *tag, const char *type)
+{
+	if ((p = soap_in__QName(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC1 char * * SOAP_FMAC2 soap_in__QName(struct soap *soap, const char *tag, char **a, const char *type)
+{
+	return soap_instring(soap, tag, a, type, SOAP_TYPE__QName, 2);
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_default_string(struct soap *soap, char **a)
+{
+#ifdef SOAP_DEFAULT_string
+	*a = SOAP_DEFAULT_string;
+#else
+	*a = (char *)0;
+#endif
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_serialize_string(struct soap *soap, char *const*a)
+{
+	soap_reference(soap, *a, SOAP_TYPE_string);
+}
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_mark_string(struct soap *soap, char *const*a)
+{
+	soap_reference(soap, *a, SOAP_TYPE_string);
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_put_string(struct soap *soap, char **a, const char *tag, const char *type)
+{
+	int i = soap_embed_element(soap, (void*)a, tag, SOAP_TYPE_string);
+	if (i >= 0)
+		soap_out_string(soap, tag, i, a, type);
+	return soap_putindependent(soap);
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_out_string(struct soap *soap, const char *tag, int id, char *const*a, const char *type)
+{
+	return soap_outstring(soap, tag, id, a, type, SOAP_TYPE_string);
+}
+
+SOAP_FMAC1 char ** SOAP_FMAC2 soap_get_string(struct soap *soap, char **p, const char *tag, const char *type)
+{
+	if ((p = soap_in_string(soap, tag, p, type)))
+		soap_getindependent(soap);
+	return p;
+}
+
+SOAP_FMAC1 char * * SOAP_FMAC2 soap_in_string(struct soap *soap, const char *tag, char **a, const char *type)
+{
+	return soap_instring(soap, tag, a, type, SOAP_TYPE_string, 1);
+}
+#ifdef __cplusplus
+}
+#endif
+
+/* end of soapC.c */
diff --git a/samples/quote_MAC_ProjBuild/soapClient.c b/samples/quote_MAC_ProjBuild/soapClient.c
new file mode 100644
index 0000000..c9e4f92
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/soapClient.c
@@ -0,0 +1,70 @@
+/* soapClient.c
+   Generated by gSOAP 2.3 from quote.h
+   Copyright (C) 2001-2003 Genivia inc.
+   All Rights Reserved.
+*/
+#include "soapH.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+SOAP_SOURCE_STAMP("@(#) soapClient.c ver 2.3 2003-06-24 23:24:12 GMT")
+
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_call_ns__getQuote(struct soap *soap, const char *URL, const char *action, char *symbol, float *Result)
+{
+	struct ns__getQuote soap_tmp_ns__getQuote;
+	struct ns__getQuoteResponse *soap_tmp_ns__getQuoteResponse;
+	soap_tmp_ns__getQuote.symbol=symbol;
+	soap_begin(soap);
+	soap_serializeheader(soap);
+	soap_serialize_ns__getQuote(soap, &soap_tmp_ns__getQuote);
+	soap_begin_count(soap);
+	if (soap->mode & SOAP_IO_LENGTH)
+	{	soap_envelope_begin_out(soap);
+		soap_putheader(soap);
+		soap_body_begin_out(soap);
+		soap_put_ns__getQuote(soap, &soap_tmp_ns__getQuote, "ns:getQuote", "");
+		soap_body_end_out(soap);
+		soap_envelope_end_out(soap);
+	}
+	if (soap_connect(soap, URL, action)
+	 || soap_envelope_begin_out(soap)
+	 || soap_putheader(soap)
+	 || soap_body_begin_out(soap)
+	 || soap_put_ns__getQuote(soap, &soap_tmp_ns__getQuote, "ns:getQuote", "")
+	 || soap_body_end_out(soap)
+	 || soap_envelope_end_out(soap)
+#ifndef WITH_LEANER
+	 || soap_putattachments(soap)
+#endif
+	 || soap_end_send(soap))
+		return soap_closesock(soap);
+	soap_default_float(soap, Result);
+	if (soap_begin_recv(soap)
+	 || soap_envelope_begin_in(soap)
+	 || soap_recv_header(soap)
+	 || soap_body_begin_in(soap))
+		return soap_closesock(soap);
+	soap_tmp_ns__getQuoteResponse = soap_get_ns__getQuoteResponse(soap, NULL, "ns:getQuoteResponse", "ns:getQuoteResponse");
+	if (soap->error)
+	{	if (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)
+			return soap_recv_fault(soap);
+		return soap_closesock(soap);
+	}
+	if (soap_body_end_in(soap)
+	 || soap_envelope_end_in(soap)
+#ifndef WITH_LEANER
+	 || soap_getattachments(soap)
+#endif
+	 || soap_end_recv(soap))
+		return soap_closesock(soap);
+	if (soap_tmp_ns__getQuoteResponse->Result)
+		*Result = *soap_tmp_ns__getQuoteResponse->Result;
+	return soap_closesock(soap);
+}
+#ifdef __cplusplus
+}
+#endif
+
+/* end of soapClient.c */
diff --git a/samples/quote_MAC_ProjBuild/soapServer.c b/samples/quote_MAC_ProjBuild/soapServer.c
new file mode 100644
index 0000000..b015c94
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/soapServer.c
@@ -0,0 +1,90 @@
+/* soapServer.c
+   Generated by gSOAP 2.3 from quote.h
+   Copyright (C) 2001-2003 Genivia inc.
+   All Rights Reserved.
+*/
+#include "soapH.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+SOAP_SOURCE_STAMP("@(#) soapServer.c ver 2.3 2003-06-24 23:24:12 GMT")
+
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_serve(struct soap *soap)
+{
+	unsigned int n = SOAP_MAXKEEPALIVE;
+	do
+	{	soap_begin(soap);
+		if (!--n)
+			soap->keep_alive = 0;
+		if (soap_begin_recv(soap))
+		{	if (soap->error < SOAP_STOP)
+				return soap_send_fault(soap);
+			else
+				continue;
+		}
+		if (soap_envelope_begin_in(soap) || soap_recv_header(soap) || soap_body_begin_in(soap))
+			return soap_send_fault(soap);
+		soap->error = soap_serve_ns__getQuote(soap);
+		if (soap->error)
+			return soap_send_fault(soap);
+	} while (soap->keep_alive);
+	return SOAP_OK;
+}
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_serve_ns__getQuote(struct soap *soap)
+{	struct ns__getQuote soap_tmp_ns__getQuote;
+	struct ns__getQuoteResponse soap_tmp_ns__getQuoteResponse;
+	float soap_tmp_float;
+	soap_default_ns__getQuoteResponse(soap, &soap_tmp_ns__getQuoteResponse);
+	soap_default_float(soap, &soap_tmp_float);
+	soap_tmp_ns__getQuoteResponse.Result = &soap_tmp_float;
+	soap_default_ns__getQuote(soap, &soap_tmp_ns__getQuote);
+	soap_get_ns__getQuote(soap, &soap_tmp_ns__getQuote, "ns:getQuote", NULL);
+	if (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)
+		soap->error = SOAP_NO_METHOD;
+	if (soap->error)
+		return soap->error;
+	
+	if (soap_body_end_in(soap)
+	 || soap_envelope_end_in(soap)
+#ifndef WITH_LEANER
+	 || soap_getattachments(soap)
+#endif
+	 || soap_end_recv(soap))
+		return soap->error;
+	soap->error = ns__getQuote(soap, soap_tmp_ns__getQuote.symbol, &soap_tmp_float);
+	if (soap->error)
+		return soap->error;
+	soap_serializeheader(soap);
+	soap_serialize_ns__getQuoteResponse(soap, &soap_tmp_ns__getQuoteResponse);
+	soap_begin_count(soap);
+	if (soap->mode & SOAP_IO_LENGTH)
+	{	soap_envelope_begin_out(soap);
+		soap_putheader(soap);
+		soap_body_begin_out(soap);
+		soap_put_ns__getQuoteResponse(soap, &soap_tmp_ns__getQuoteResponse, "ns:getQuoteResponse", "");
+		soap_body_end_out(soap);
+		soap_envelope_end_out(soap);
+	};
+	if (soap_response(soap, SOAP_OK)
+	 || soap_envelope_begin_out(soap)
+	 || soap_putheader(soap)
+	 || soap_body_begin_out(soap)
+	 || soap_put_ns__getQuoteResponse(soap, &soap_tmp_ns__getQuoteResponse, "ns:getQuoteResponse", "")
+	 || soap_body_end_out(soap)
+	 || soap_envelope_end_out(soap)
+#ifndef WITH_LEANER
+	 || soap_putattachments(soap)
+#endif
+	 || soap_end_send(soap))
+		return soap->error;
+	soap_closesock(soap);
+	return SOAP_OK;
+}
+#ifdef __cplusplus
+}
+#endif
+
+/* end of soapServer.c */
diff --git a/samples/quote_MAC_ProjBuild/stdsoap2.c b/samples/quote_MAC_ProjBuild/stdsoap2.c
new file mode 100644
index 0000000..dbed460
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/stdsoap2.c
@@ -0,0 +1,13448 @@
+/*
+
+stdsoap2.c[pp] 2.7.6e
+
+gSOAP runtime
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+Contributors:
+
+Wind River Systems Inc., for the following additions under gSOAP public license:
+  - vxWorks compatible	(#define VXWORKS)
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+Installation note:
+
+Win32 build needs winsock.dll (Visual C++ "wsock32.lib")
+To do this in Visual C++ 6.0, go to "Project", "settings", select the "Link"
+tab (the project file needs to be selected in the file view) and add
+"wsock32.lib" to the "Object/library modules" entry
+
+On Mac OS X with gcc (GCC) 3.1 20020420 (prerelease) you MUST compile with
+-fstack_check when using -O2 because gcc 3.1 has a bug that smashes the stack
+when locally allocated data exceeds 64K.
+
+*/
+
+#ifdef AS400
+# pragma convert(819)	/* EBCDIC to ASCII */
+#endif
+
+#include "stdsoap2.h"
+
+#ifdef __cplusplus
+SOAP_SOURCE_STAMP("@(#) stdsoap2.cpp ver 2.7.6e 2006-02-18 12:00:00 GMT")
+extern "C" {
+#else
+SOAP_SOURCE_STAMP("@(#) stdsoap2.c ver 2.7.6e 2006-02-18 12:00:00 GMT")
+#endif
+
+/* 8bit character representing unknown/nonrepresentable character data (e.g. not supported by current locale with multibyte support enabled) */
+#ifndef SOAP_UNKNOWN_CHAR
+#define SOAP_UNKNOWN_CHAR (127)
+#endif
+
+/*      EOF=-1 */
+#define SOAP_LT (soap_wchar)(-2) /* XML character '<' */
+#define SOAP_TT (soap_wchar)(-3) /* XML character '</' */
+#define SOAP_GT (soap_wchar)(-4) /* XML character '>' */
+#define SOAP_QT (soap_wchar)(-5) /* XML character '"' */
+#define SOAP_AP (soap_wchar)(-6) /* XML character ''' */
+
+#define soap_blank(c)		((c) >= 0 && (c) <= 32)
+#define soap_notblank(c)	((c) > 32)
+#define soap_hash_ptr(p)	(((unsigned long)(p) >> 3) & (SOAP_PTRHASH - 1))
+
+#ifdef SOAP_DEBUG
+static void soap_init_logs(struct soap*);
+static void soap_close_logfile(struct soap*, int);
+static void soap_set_logfile(struct soap*, int, const char*);
+static void soap_free_mht(struct soap*);
+static void soap_track_unlink(struct soap*, const void*);
+#endif
+
+#ifndef PALM_2
+static int soap_set_error(struct soap*, const char*, const char*, const char*, const char*, int);
+static int soap_copy_fault(struct soap*, const char*, const char*, const char*, const char*);
+static int soap_getattrval(struct soap*, char*, size_t, soap_wchar);
+#endif
+
+#ifndef PALM_1
+static soap_wchar soap_char(struct soap*);
+static soap_wchar soap_get_pi(struct soap*);
+static int soap_isxdigit(int);
+static void *fplugin(struct soap*, const char*);
+#ifndef WITH_NOIDREF
+static void soap_update_ptrs(struct soap*, char*, char*, char*, char*);
+static int soap_has_copies(struct soap*, const char*, const char*);
+static void soap_init_iht(struct soap*);
+static void soap_free_iht(struct soap*);
+static void soap_init_pht(struct soap*);
+static void soap_free_pht(struct soap*);
+#endif
+#endif
+
+#ifndef WITH_LEAN
+static const char *soap_set_validation_fault(struct soap*, const char*, const char*);
+static int soap_isnumeric(struct soap*, const char*);
+static time_t soap_timegm(struct tm*);
+static struct soap_nlist *soap_lookup_ns(struct soap *soap, const char *tag, size_t n);
+static struct soap_nlist *soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized);
+static void soap_pop_ns(struct soap *soap);
+static void soap_utilize_ns(struct soap *soap, const char *tag, size_t n);
+#endif
+
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart *soap_new_multipart(struct soap*, struct soap_multipart**, struct soap_multipart**, char*, size_t);
+static int soap_putdimefield(struct soap*, const char*, size_t);
+static char *soap_getdimefield(struct soap*, size_t);
+static void soap_select_mime_boundary(struct soap*);
+static int soap_valid_mime_boundary(struct soap*);
+static int soap_match_cid(struct soap*, const char*, const char*);
+static void soap_resolve_attachment(struct soap*, struct soap_multipart*);
+#endif
+#endif
+
+#ifdef WITH_GZIP
+static int soap_getgziphdr(struct soap*);
+#endif
+
+#ifdef WITH_OPENSSL
+static int ssl_init_done = 0;
+static int ssl_auth_init(struct soap*);
+static int ssl_verify_callback(int, X509_STORE_CTX*);
+static int ssl_password(char*, int, int, void *);
+static const char *ssl_error(struct soap*, int);
+/* This callback is included for future references. It should not be deleted
+static DH *ssl_tmp_dh(SSL*, int, int);
+*/
+#endif
+
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char *soap_decode(char*, size_t, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar soap_getchunkchar(struct soap*);
+static const char *http_error(struct soap*, int);
+static int http_post(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
+static int http_get(struct soap*);
+static int http_send_header(struct soap*, const char*);
+static int http_post_header(struct soap*, const char*, const char*);
+static int http_response(struct soap*, int, size_t);
+static int http_parse(struct soap*);
+static int http_parse_header(struct soap*, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int fsend(struct soap*, const char*, size_t);
+static size_t frecv(struct soap*, char*, size_t);
+static int tcp_init(struct soap*);
+static const char *tcp_error(struct soap*);
+#ifndef WITH_IPV6
+static int tcp_gethost(struct soap*, const char *addr, struct in_addr *inaddr);
+#endif
+static int tcp_connect(struct soap*, const char *endpoint, const char *host, int port);
+static int tcp_accept(struct soap*, int, struct sockaddr*, int*);
+static int tcp_disconnect(struct soap*);
+static int tcp_closesocket(struct soap*, SOAP_SOCKET);
+static int tcp_shutdownsocket(struct soap*, SOAP_SOCKET, int);
+static const char *soap_strerror(struct soap*);
+#endif
+#endif
+
+#if defined(PALM) && !defined(PALM_2)
+unsigned short errno;
+#endif
+
+#ifndef PALM_1
+static const char soap_env1[42] = "http://schemas.xmlsoap.org/soap/envelope/";
+static const char soap_enc1[42] = "http://schemas.xmlsoap.org/soap/encoding/";
+static const char soap_env2[40] = "http://www.w3.org/2003/05/soap-envelope";
+static const char soap_enc2[40] = "http://www.w3.org/2003/05/soap-encoding";
+static const char soap_rpc[35] = "http://www.w3.org/2003/05/soap-rpc";
+#endif
+
+#ifndef PALM_1
+const struct soap_double_nan soap_double_nan = {0xFFFFFFFF, 0xFFFFFFFF};
+static const char soap_base64o[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+static const char soap_base64i[81] = "\76XXX\77\64\65\66\67\70\71\72\73\74\75XXXXXXX\00\01\02\03\04\05\06\07\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31XXXXXX\32\33\34\35\36\37\40\41\42\43\44\45\46\47\50\51\52\53\54\55\56\57\60\61\62\63";
+#endif
+
+#ifndef WITH_LEAN
+static const char soap_indent[11] = "\n\t\t\t\t\t\t\t\t\t";
+/* Alternative indentation form for SOAP_XML_INDENT:
+static const char soap_indent[21] = "\n                   ";
+*/
+#endif
+
+static const char soap_padding[4] = "\0\0\0";
+#define SOAP_STR_PADDING (soap_padding)
+#define SOAP_STR_EOS (soap_padding)
+#define SOAP_NON_NULL (soap_padding)
+
+#ifndef WITH_LEAN
+static const struct soap_code_map html_entity_codes[] = /* entities for XHTML parsing */
+{ { 160, "nbsp" },
+  { 161, "iexcl" },
+  { 162, "cent" },
+  { 163, "pound" },
+  { 164, "curren" },
+  { 165, "yen" },
+  { 166, "brvbar" },
+  { 167, "sect" },
+  { 168, "uml" },
+  { 169, "copy" },
+  { 170, "ordf" },
+  { 171, "laquo" },
+  { 172, "not" },
+  { 173, "shy" },
+  { 174, "reg" },
+  { 175, "macr" },
+  { 176, "deg" },
+  { 177, "plusmn" },
+  { 178, "sup2" },
+  { 179, "sup3" },
+  { 180, "acute" },
+  { 181, "micro" },
+  { 182, "para" },
+  { 183, "middot" },
+  { 184, "cedil" },
+  { 185, "sup1" },
+  { 186, "ordm" },
+  { 187, "raquo" },
+  { 188, "frac14" },
+  { 189, "frac12" },
+  { 190, "frac34" },
+  { 191, "iquest" },
+  { 192, "Agrave" },
+  { 193, "Aacute" },
+  { 194, "Acirc" },
+  { 195, "Atilde" },
+  { 196, "Auml" },
+  { 197, "Aring" },
+  { 198, "AElig" },
+  { 199, "Ccedil" },
+  { 200, "Egrave" },
+  { 201, "Eacute" },
+  { 202, "Ecirc" },
+  { 203, "Euml" },
+  { 204, "Igrave" },
+  { 205, "Iacute" },
+  { 206, "Icirc" },
+  { 207, "Iuml" },
+  { 208, "ETH" },
+  { 209, "Ntilde" },
+  { 210, "Ograve" },
+  { 211, "Oacute" },
+  { 212, "Ocirc" },
+  { 213, "Otilde" },
+  { 214, "Ouml" },
+  { 215, "times" },
+  { 216, "Oslash" },
+  { 217, "Ugrave" },
+  { 218, "Uacute" },
+  { 219, "Ucirc" },
+  { 220, "Uuml" },
+  { 221, "Yacute" },
+  { 222, "THORN" },
+  { 223, "szlig" },
+  { 224, "agrave" },
+  { 225, "aacute" },
+  { 226, "acirc" },
+  { 227, "atilde" },
+  { 228, "auml" },
+  { 229, "aring" },
+  { 230, "aelig" },
+  { 231, "ccedil" },
+  { 232, "egrave" },
+  { 233, "eacute" },
+  { 234, "ecirc" },
+  { 235, "euml" },
+  { 236, "igrave" },
+  { 237, "iacute" },
+  { 238, "icirc" },
+  { 239, "iuml" },
+  { 240, "eth" },
+  { 241, "ntilde" },
+  { 242, "ograve" },
+  { 243, "oacute" },
+  { 244, "ocirc" },
+  { 245, "otilde" },
+  { 246, "ouml" },
+  { 247, "divide" },
+  { 248, "oslash" },
+  { 249, "ugrave" },
+  { 250, "uacute" },
+  { 251, "ucirc" },
+  { 252, "uuml" },
+  { 253, "yacute" },
+  { 254, "thorn" },
+  { 255, "yuml" },
+  {   0, NULL }
+};
+#endif
+
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+static const struct soap_code_map h_error_codes[] =
+{
+#ifdef HOST_NOT_FOUND   
+  { HOST_NOT_FOUND, "Host not found" },
+#endif
+#ifdef TRY_AGAIN
+  { TRY_AGAIN, "Try Again" },
+#endif
+#ifdef NO_RECOVERY  
+  { NO_RECOVERY, "No Recovery" },
+#endif
+#ifdef NO_DATA
+  { NO_DATA, "No Data" },
+#endif
+#ifdef NO_ADDRESS
+  { NO_ADDRESS, "No Address" },
+#endif
+  { 0, NULL }
+};
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+static const struct soap_code_map h_http_error_codes[] =
+{ { 201, "Created" },
+  { 202, "Accepted" },
+  { 203, "Non-Authoritative Information" },
+  { 204, "No Content" },
+  { 205, "Reset Content" },
+  { 206, "Partial Content" },
+  { 300, "Multiple Choices" },
+  { 301, "Moved Permanently" },
+  { 302, "Found" },
+  { 303, "See Other" },
+  { 304, "Not Modified" },
+  { 305, "Use Proxy" },
+  { 307, "Temporary Redirect" },
+  { 400, "Bad Request" },
+  { 401, "Unauthorized" },
+  { 402, "Payment Required" },
+  { 403, "Forbidden" },
+  { 404, "Not Found" },
+  { 405, "Method Not Allowed" },
+  { 406, "Not Acceptable" },
+  { 407, "Proxy Authentication Required" },
+  { 408, "Request Time-out" },
+  { 409, "Conflict" },
+  { 410, "Gone" },
+  { 411, "Length Required" },
+  { 412, "Precondition Failed" },
+  { 413, "Request Entity Too Large" },
+  { 414, "Request-URI Too Large" },
+  { 415, "Unsupported Media Type" },
+  { 416, "Requested range not satisfiable" },
+  { 417, "Expectation Failed" },
+  { 500, "Internal Server Error" },
+  { 501, "Not Implemented" },
+  { 502, "Bad Gateway" },
+  { 503, "Service Unavailable" },
+  { 504, "Gateway Time-out" },
+  { 505, "HTTP Version not supported" },
+  {   0, NULL }
+};
+#endif
+#endif
+
+#ifdef WITH_OPENSSL
+static const struct soap_code_map h_ssl_error_codes[] =
+{
+#define _SSL_ERROR(e) { e, #e }
+  _SSL_ERROR(SSL_ERROR_SSL),
+  _SSL_ERROR(SSL_ERROR_ZERO_RETURN),
+  _SSL_ERROR(SSL_ERROR_WANT_READ),
+  _SSL_ERROR(SSL_ERROR_WANT_WRITE),
+  _SSL_ERROR(SSL_ERROR_WANT_CONNECT),
+  _SSL_ERROR(SSL_ERROR_WANT_X509_LOOKUP),
+  _SSL_ERROR(SSL_ERROR_SYSCALL),
+  { 0, NULL }
+};
+#endif
+
+#ifndef WITH_LEANER
+static const struct soap_code_map mime_codes[] =
+{ { SOAP_MIME_7BIT,		"7bit" },
+  { SOAP_MIME_8BIT,		"8bit" },
+  { SOAP_MIME_BINARY,		"binary" },
+  { SOAP_MIME_QUOTED_PRINTABLE, "quoted-printable" },
+  { SOAP_MIME_BASE64,		"base64" },
+  { SOAP_MIME_IETF_TOKEN,	"ietf-token" },
+  { SOAP_MIME_X_TOKEN,		"x-token" },
+  { 0,				NULL }
+};
+#endif
+
+#ifdef WIN32
+static int tcp_done = 0;
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+fsend(struct soap *soap, const char *s, size_t n)
+{ register int nwritten;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  if (soap->os)
+  { soap->os->write(s, n);
+    if (soap->os->good())
+      return SOAP_OK;
+    return SOAP_EOF;
+  }
+#endif
+  while (n)
+  { if (soap_valid_socket(soap->socket))
+    { 
+#ifndef WITH_LEAN
+      if (soap->send_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->send_timeout > 0)
+        { timeout.tv_sec = soap->send_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->send_timeout/1000000;
+          timeout.tv_usec = -soap->send_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { register int r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            return SOAP_EOF;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+          { soap->errnum = soap_socket_errno;
+            return SOAP_EOF;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+        nwritten = SSL_write(soap->ssl, s, n);
+      else if (soap->bio)
+        nwritten = BIO_write(soap->bio, s, n);
+      else
+#endif
+#ifdef WITH_UDP
+      if ((soap->omode & SOAP_IO_UDP))
+      { if (soap->peerlen)
+	  nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+        else
+	  nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	/* retry and back-off algorithm */
+	/* TODO: this is not very clear from specs so verify and limit conditions under which we should loop (e.g. ENOBUFS) */
+	if (nwritten < 0)
+        { struct timeval timeout;
+          fd_set fd;
+	  int udp_repeat;
+	  int udp_delay;
+          if ((soap->connect_flags & SO_BROADCAST))
+	    udp_repeat = 3; /* SOAP-over-UDP MULTICAST_UDP_REPEAT - 1 */
+          else
+	    udp_repeat = 1; /* SOAP-over-UDP UNICAST_UDP_REPEAT - 1 */
+	  udp_delay = (soap_random % 201) + 50; /* UDP_MIN_DELAY .. UDP_MAX_DELAY */
+	  do
+          { timeout.tv_sec = 0;
+            timeout.tv_usec = 1000 * udp_delay; /* ms */
+            FD_ZERO(&fd);
+            FD_SET((SOAP_SOCKET)soap->socket, &fd);
+            select((SOAP_SOCKET)(soap->socket + 1), NULL, NULL, &fd, &timeout);
+	    if (soap->peerlen)
+	      nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+            else
+	      nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	    udp_delay <<= 1;
+	    if (udp_delay > 500) /* UDP_UPPER_DELAY */
+	      udp_delay = 500;
+	  }
+	  while (nwritten < 0 && --udp_repeat > 0);
+	}
+      }
+      else
+#endif
+#if !defined(PALM) && !defined(AS400)
+        nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+#else
+        nwritten = send((SOAP_SOCKET)soap->socket, (void*)s, n, soap->socket_flags);
+#endif
+      if (nwritten <= 0)
+      {
+#ifdef WITH_OPENSSL
+	int err;
+        if (soap->ssl && (err = SSL_get_error(soap->ssl, nwritten)) != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return SOAP_EOF;
+#endif
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EWOULDBLOCK && soap_socket_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_socket_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    else
+    {
+#ifdef WITH_FASTCGI
+      nwritten = fwrite((void*)s, 1, n, stdout);
+      fflush(stdout);
+#else
+#ifdef UNDER_CE
+      nwritten = fwrite(s, 1, n, soap->sendfd);
+#else
+#ifdef VXWORKS
+#ifdef WMW_RPM_IO
+      if (soap->rpmreqid)
+        nwritten = (httpBlockPut(soap->rpmreqid, s, n) == 0) ? n : -1; 
+      else
+#endif
+        nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w"));
+#else
+      nwritten = write((SOAP_SOCKET)soap->sendfd, s, n);
+#endif
+#endif
+#endif
+      if (nwritten <= 0)
+      { if (soap_errno != SOAP_EINTR && soap_errno != SOAP_EWOULDBLOCK && soap_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    n -= nwritten;
+    s += nwritten;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_raw(struct soap *soap, const char *s, size_t n)
+{ if (!n)
+    return SOAP_OK;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { soap->count += n;
+#ifndef WITH_LEANER
+    if (soap->fpreparesend && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+  if (soap->mode & SOAP_IO)
+  { register size_t i = SOAP_BUFLEN - soap->bufidx;
+    while (n >= i)
+    { memcpy(soap->buf + soap->bufidx, s, i);
+      soap->bufidx = SOAP_BUFLEN;
+      if (soap_flush(soap))
+        return soap->error;
+      s += i;
+      n -= i;
+      i = SOAP_BUFLEN;
+    }
+    memcpy(soap->buf + soap->bufidx, s, n);
+    soap->bufidx += n;
+    return SOAP_OK;
+  }
+  return soap_flush_raw(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush(struct soap *soap)
+{ register int n = soap->bufidx;
+  if (n)
+  { soap->bufidx = 0;
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { soap->d_stream.next_in = (Byte*)soap->buf;
+      soap->d_stream.avail_in = (unsigned int)n;
+#ifdef WITH_GZIP
+      soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)n);
+#endif
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating %u bytes\n", soap->d_stream.avail_in));
+        if (deflate(&soap->d_stream, Z_NO_FLUSH) != Z_OK)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+          return soap->error = SOAP_ZLIB_ERROR;
+        }
+        if (!soap->d_stream.avail_out)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN))
+            return soap->error;
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (soap->d_stream.avail_in);
+    }
+    else
+#endif
+      return soap_flush_raw(soap, soap->buf, n);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush_raw(struct soap *soap, const char *s, size_t n)
+{ if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+  { register char *t;
+    if (!(t = (char*)soap_push_block(soap, n)))
+      return soap->error = SOAP_EOM;
+    memcpy(t, s, n);
+#ifndef WITH_LEANER
+    if (soap->fpreparesend)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+  { char t[16];
+    sprintf(t, "\r\n%lX\r\n" + (soap->chunksize ? 0 : 2), (unsigned long)n);
+    DBGMSG(SENT, t, strlen(t));
+    if ((soap->error = soap->fsend(soap, t, strlen(t))))
+      return soap->error;
+    soap->chunksize += n;
+  }
+  DBGMSG(SENT, s, n);
+#endif
+  return soap->error = soap->fsend(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send(struct soap *soap, const char *s)
+{ if (s)
+    return soap_send_raw(soap, s, strlen(s));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send2(struct soap *soap, const char *s1, const char *s2)
+{ if (soap_send(soap, s1))
+    return soap->error;
+  return soap_send(soap, s2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send3(struct soap *soap, const char *s1, const char *s2, const char *s3)
+{ if (soap_send(soap, s1)
+   || soap_send(soap, s2))
+    return soap->error;
+  return soap_send(soap, s3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static size_t
+frecv(struct soap *soap, char *s, size_t n)
+{ register int r;
+  soap->errnum = 0;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  if (soap->is)
+  { if (soap->is->good())
+      return soap->is->read(s, n).gcount();
+    return 0;
+  }
+#endif
+  if (soap_valid_socket(soap->socket))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->recv_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->recv_timeout > 0)
+        { timeout.tv_sec = soap->recv_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->recv_timeout/1000000;
+          timeout.tv_usec = -soap->recv_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+	  { soap->errnum = 0;
+            return 0;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+	  { soap->errnum = soap_socket_errno;
+            return 0;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+      { int err;
+	r = SSL_read(soap->ssl, s, n);
+        if (r > 0)
+          return (size_t)r;
+	err = SSL_get_error(soap->ssl, r);
+	if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return 0;
+      }
+      else if (soap->bio)
+      { r = BIO_read(soap->bio, s, n);
+        if (r > 0)
+          return (size_t)r;
+        return 0;
+      }
+      else
+#endif
+      { 
+#ifdef WITH_UDP
+        if ((soap->omode & SOAP_IO_UDP))
+        { SOAP_SOCKLEN_T k = (SOAP_SOCKLEN_T)sizeof(soap->peer);
+	  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+          r = recvfrom((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, &k);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+	  soap->peerlen = (size_t)k;
+#ifndef WITH_IPV6
+          soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+          soap->port = (int)ntohs(soap->peer.sin_port);
+#endif
+        }
+	else
+#endif
+          r = recv((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+        if (r >= 0)
+          return (size_t)r;
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN && soap_socket_errno != SOAP_EWOULDBLOCK)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#ifndef WITH_LEAN
+      { struct timeval timeout;
+        fd_set fd;
+        timeout.tv_sec = 0;
+        timeout.tv_usec = 10000;
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+#ifdef WITH_OPENSSL
+        if (soap->ssl && SSL_get_error(soap->ssl, r) == SSL_ERROR_WANT_WRITE)
+          r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+        else
+          r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#else
+        r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#endif
+        if (r < 0 && soap_socket_errno != SOAP_EINTR)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#endif
+    }
+  }
+#ifdef WITH_FASTCGI
+  return fread(s, 1, n, stdin);
+#else
+#ifdef UNDER_CE
+  return fread(s, 1, n, soap->recvfd);
+#else
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    r = httpBlockRead(soap->rpmreqid, s, n);
+  else
+#endif
+  r = read((SOAP_SOCKET)soap->recvfd, s, n);
+  if (r >= 0)
+    return (size_t)r;
+  soap->errnum = soap_errno;
+  return 0;
+#endif
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar
+soap_getchunkchar(struct soap *soap)
+{ if (soap->bufidx < soap->buflen)
+    return soap->buf[soap->bufidx++];
+  soap->bufidx = 0;
+  soap->buflen = soap->chunkbuflen = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)soap->buflen, soap->socket));
+  DBGMSG(RECV, soap->buf, soap->buflen);
+  if (soap->buflen)
+    return soap->buf[soap->bufidx++];
+  return EOF;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+soap_isxdigit(int c)
+{ return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f');
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_raw(struct soap *soap)
+{ register size_t ret;
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { if (soap->d_stream.next_out == Z_NULL)
+      return EOF;
+    if (soap->d_stream.avail_in || !soap->d_stream.avail_out)
+    { register int r;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflating\n"));
+      soap->d_stream.next_out = (Byte*)soap->buf;
+      soap->d_stream.avail_out = SOAP_BUFLEN;
+      r = inflate(&soap->d_stream, Z_NO_FLUSH);
+      if (r == Z_OK || r == Z_STREAM_END)
+      { soap->bufidx = 0;
+        soap->buflen = SOAP_BUFLEN - soap->d_stream.avail_out;
+        if (soap->zlib_in == SOAP_ZLIB_GZIP)
+          soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+        if (r == Z_STREAM_END)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+          soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+          soap->d_stream.next_out = Z_NULL;
+        }
+        if (soap->buflen)
+        { soap->count += soap->buflen;
+          return SOAP_OK;
+        }
+      }
+      else if (r != Z_BUF_ERROR)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate error: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        soap->d_stream.next_out = Z_NULL;
+	soap->error = SOAP_ZLIB_ERROR;
+        return EOF;
+      }
+    }
+zlib_again:
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK && !soap->chunksize)
+    { memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+      soap->buflen = soap->z_buflen;
+    }
+  }
+#endif
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) /* read HTTP chunked transfer */
+  { 
+chunk_again:
+    if (soap->chunksize)
+    { soap->buflen = ret = soap->frecv(soap, soap->buf, soap->chunksize > SOAP_BUFLEN ? SOAP_BUFLEN : soap->chunksize);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk: read %u bytes\n", (unsigned int)ret));
+      DBGMSG(RECV, soap->buf, ret);
+      soap->bufidx = 0;
+      soap->chunksize -= ret;
+    }
+    else
+    { register soap_wchar c;
+      char *t, tmp[8];
+      t = tmp;
+      if (!soap->chunkbuflen)
+      { soap->chunkbuflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes (chunked) from socket %d\n", (unsigned int)ret, soap->socket));
+        DBGMSG(RECV, soap->buf, ret);
+        soap->bufidx = 0;
+        if (!ret)
+          return soap->ahead = EOF;
+      }
+      else
+        soap->bufidx = soap->buflen;
+      soap->buflen = soap->chunkbuflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk size (idx=%u len=%u)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen));
+      while (!soap_isxdigit((int)(c = soap_getchunkchar(soap))))
+        if ((int)c == EOF)
+	  return soap->ahead = EOF;
+      do
+        *t++ = (char)c;
+      while (soap_isxdigit((int)(c = soap_getchunkchar(soap))) && t - tmp < 7);
+      while ((int)c != EOF && c != '\n')
+        c = soap_getchunkchar(soap);
+      if ((int)c == EOF)
+        return soap->ahead = EOF;
+      *t = '\0';
+      soap->chunksize = soap_strtoul(tmp, &t, 16);
+      if (!soap->chunksize)
+      { soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of chunked message\n"));
+	while ((int)c != EOF && c != '\n')
+          c = soap_getchunkchar(soap);
+        return soap->ahead = EOF;
+      }
+      soap->buflen = soap->bufidx + soap->chunksize;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving buf len to idx=%u len=%u (%s)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen, tmp));
+      if (soap->buflen > soap->chunkbuflen)
+      { soap->buflen = soap->chunkbuflen;
+        soap->chunksize -= soap->buflen - soap->bufidx;
+        soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Passed end of buffer for chunked HTTP (%u bytes left)\n", (unsigned int)(soap->buflen - soap->bufidx)));
+      }
+      else if (soap->chunkbuflen)
+        soap->chunksize = 0;
+      ret = soap->buflen - soap->bufidx;
+      if (!ret)
+        goto chunk_again;
+    }
+  }
+  else
+#endif
+  { soap->bufidx = 0;
+    soap->buflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)ret, soap->socket));
+    DBGMSG(RECV, soap->buf, ret);
+  }
+#ifndef WITH_LEANER
+  if (soap->fpreparerecv && (soap->error = soap->fpreparerecv(soap, soap->buf, ret)))
+    return soap->error;
+#endif
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { register int r;
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = (unsigned int)ret;
+    soap->d_stream.next_out = (Byte*)soap->buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    r = inflate(&soap->d_stream, Z_NO_FLUSH);
+    if (r == Z_OK || r == Z_STREAM_END)
+    { soap->bufidx = 0;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = ret = SOAP_BUFLEN - soap->d_stream.avail_out;
+      if (soap->zlib_in == SOAP_ZLIB_GZIP)
+        soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %u bytes\n", (unsigned int)ret));
+      if (!ret)
+        goto zlib_again;
+      if (r == Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+        soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+        soap->d_stream.next_out = Z_NULL;
+      }
+    }
+    else
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to inflate: (%d) %s\n", r, soap->d_stream.msg?soap->d_stream.msg:""));
+      soap->d_stream.next_out = Z_NULL;
+      soap->error = SOAP_ZLIB_ERROR;
+      return EOF;
+    }
+  }
+#endif
+  soap->count += ret;
+  return !ret;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap->dime.buflen)
+    { char *s;
+      int i;
+      unsigned char tmp[12];
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME hdr for chunked DIME is in buffer\n"));
+      soap->count += soap->dime.buflen - soap->buflen;
+      soap->buflen = soap->dime.buflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Skip padding (%ld bytes)\n", -(long)soap->dime.size&3));
+      for (i = -(long)soap->dime.size&3; i > 0; i--)
+      { soap->bufidx++;
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME hdr for next chunk\n"));
+      s = (char*)tmp;
+      for (i = 12; i > 0; i--)
+      { *s++ = soap->buf[soap->bufidx++];
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      soap->dime.flags = tmp[0] & 0x7;
+      soap->dime.size = ((size_t)tmp[8] << 24) | ((size_t)tmp[9] << 16) | ((size_t)tmp[10] << 8) | ((size_t)tmp[11]);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME chunk (%u bytes)\n", (unsigned int)soap->dime.size));
+      if (soap->dime.flags & SOAP_DIME_CF)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "More chunking\n"));
+        soap->dime.chunksize = soap->dime.size;
+        if (soap->buflen - soap->bufidx >= soap->dime.size)
+        { soap->dime.buflen = soap->buflen;
+          soap->buflen = soap->bufidx + soap->dime.chunksize;
+        }
+        else
+          soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      }
+      else
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Last chunk\n"));
+        soap->dime.buflen = 0;
+        soap->dime.chunksize = 0;
+      }
+      soap->count = soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%u bytes remaining\n", (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+    if (soap->dime.chunksize)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get next DIME hdr for chunked DIME (%u bytes chunk)\n", (unsigned int)soap->dime.chunksize));
+      if (soap_recv_raw(soap))
+        return EOF;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->count -= soap->buflen - soap->bufidx - soap->dime.chunksize;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%lu bytes remaining, count=%u\n", (unsigned long)(soap->buflen-soap->bufidx), (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+  }
+#endif
+  return soap_recv_raw(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getchar(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+    return c;
+  }
+  return soap_get1(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const struct soap_code_map*
+SOAP_FMAC2
+soap_code(const struct soap_code_map *map, const char *str)
+{ if (str)
+  { while (map->string)
+    { if (!strcmp(str, map->string)) /* case sensitive */
+        return map;
+      map++;
+    }
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_int_code(const struct soap_code_map *map, const char *str, long other)
+{ while (map->string)
+  { if (!soap_tag_cmp(str, map->string)) /* case insensitive */
+      return map->code;
+    map++;
+  }
+  return other;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_str_code(const struct soap_code_map *map, long code)
+{ while (map->code != code && map->string)
+    map++;
+  return map->string;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_char(struct soap *soap)
+{ char tmp[8];
+  register int i;
+  register soap_wchar c;
+  register char *s = tmp;
+  for (i = 0; i < 7; i++)
+  { c = soap_get1(soap);
+    if (c == ';' || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+  }
+  *s = '\0';
+  if (*tmp == '#')
+  { if (tmp[1] == 'x' || tmp[1] == 'X')
+      return soap_strtol(tmp + 2, NULL, 16);
+    return atol(tmp + 1);
+  }
+  if (!strcmp(tmp, "lt"))
+    return '<';
+  if (!strcmp(tmp, "gt"))
+    return '>';
+  if (!strcmp(tmp, "amp"))
+    return '&';
+  if (!strcmp(tmp, "quot"))
+    return '"';
+  if (!strcmp(tmp, "apos"))
+    return '\'';
+#ifndef WITH_LEAN
+  return (soap_wchar)soap_int_code(html_entity_codes, tmp, SOAP_UNKNOWN_CHAR);
+#else
+  return SOAP_UNKNOWN_CHAR; /* use this to represent unknown code */
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get0(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx];
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get1(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx++];
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_get(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+  }
+  else
+    c = soap_get1(soap);
+  for (;;)
+  { if (soap->cdata)
+    { if (c == ']')
+      { c = soap_get1(soap);
+        if (c == ']')
+        { soap->cdata = 0;
+          soap_get1(soap); /* skip > */
+          c = soap_get1(soap);
+        }
+	else
+        { soap_revget1(soap);
+          return ']';
+        }
+      }
+      else
+        return c;
+    }
+    switch (c)
+    { case '<':
+        do c = soap_get1(soap);
+        while (soap_blank(c));
+        if (c == '!' || c == '?' || c == '%')
+        { register int k = 1;
+	  if (c == '!')
+          { c = soap_get1(soap);
+            if (c == '[')
+            { do c = soap_get1(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                break;
+              soap->cdata = 1;
+              c = soap_get1(soap);
+	      continue;
+            }
+            if (c == '-' && (c = soap_get1(soap)) == '-')
+            { do
+              { c = soap_get1(soap);
+                if (c == '-' && (c = soap_get1(soap)) == '-')
+                  break;
+              } while ((int)c != EOF);
+            }
+          }
+	  else if (c == '?')
+            c = soap_get_pi(soap);
+          while ((int)c != EOF)
+          { if (c == '<')
+	      k++;
+	    else if (c == '>')
+	    { if (--k <= 0)
+	        break;
+	    }
+	    c = soap_get1(soap);
+	  }
+	  if ((int)c == EOF)
+	    break;
+          c = soap_get1(soap);
+          continue;
+        }
+        if (c == '/')
+          return SOAP_TT;
+        soap_revget1(soap);
+        return SOAP_LT;
+      case '>':
+        return SOAP_GT;
+      case '"':
+        return SOAP_QT;
+      case '\'':
+        return SOAP_AP;
+      case '&':
+        return soap_char(soap) | 0x80000000;
+    }
+    break;
+  }
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_get_pi(struct soap *soap)
+{ char buf[64];
+  register char *s = buf;
+  register int i = sizeof(buf);
+  register soap_wchar c = soap_getchar(soap);
+  /* This is a quick way to parse XML PI and we could use a callback instead to
+   * enable applications to intercept processing instructions */
+  while ((int)c != EOF && c != '?')
+  { if (--i > 0)
+    { if (soap_blank(c))
+        c = ' ';
+      *s++ = (char)c;
+    }
+    c = soap_getchar(soap);
+  }
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML PI <?%s?>\n", buf));
+  if (!strncmp(buf, "xml ", 4))
+  { s = strstr(buf, " encoding=");
+    if (s && s[10])
+    { if (!soap_tag_cmp(s + 11, "iso-8859-1*")
+       || !soap_tag_cmp(s + 11, "latin1*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to latin1 encoding\n"));
+        soap->mode |= SOAP_ENC_LATIN;
+      }
+      else if (!soap_tag_cmp(s + 11, "utf-8*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to utf-8 encoding\n"));
+        soap->mode &= ~SOAP_ENC_LATIN;
+      }
+    }
+  }
+  if ((int)c != EOF)
+    c = soap_getchar(soap);
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_move(struct soap *soap, long n)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving %ld bytes forward\n", (long)n));
+  for (; n > 0; n--)
+    if ((int)soap_getchar(soap) == EOF)
+      return SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_tell(struct soap *soap)
+{ return soap->count - soap->buflen + soap->bufidx - (soap->ahead != 0);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pututf8(struct soap *soap, register unsigned long c)
+{ char tmp[16];
+  if (c > 0 && c < 0x80)
+  { *tmp = (char)c;
+    return soap_send_raw(soap, tmp, 1);
+  }
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { register char *t = tmp;
+    if (c < 0x0800)
+      *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+    else
+    { if (c < 0x010000)
+        *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+      else
+      { if (c < 0x200000)
+          *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+        else
+        { if (c < 0x04000000)
+            *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+          else
+          { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+            *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+        }     
+        *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+      }
+      *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+    }
+    *t++ = (char)(0x80 | (c & 0x3F));
+    *t = '\0';
+  }
+  else
+#endif
+    sprintf(tmp, "&#%lu;", c);
+  return soap_send(soap, tmp);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getutf8(struct soap *soap)
+{ register soap_wchar c, c1, c2, c3, c4;
+  c = soap->ahead;
+  if (c > 0xFF)
+  { soap->ahead = 0;
+    return c;
+  }
+again:
+  c = soap_get(soap);
+  if (c < 0x80 || (soap->mode & SOAP_ENC_LATIN))
+    return c;
+  c1 = soap_get1(soap);
+  if (c1 < 0x80)
+  { soap_revget1(soap); /* doesn't look like this is UTF8 */
+    return c;
+  }
+  c1 &= 0x3F;
+  if (c < 0xE0)
+    return ((soap_wchar)(c & 0x1F) << 6) | c1;
+  c2 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c == 0xEF && c1 == 0x3B && c2 == 0x3F)	/* ignore UTF-8 BOM */
+    goto again;
+  if (c < 0xF0)
+    return ((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2;
+  c3 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xF8)
+    return ((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3;
+  c4 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xFC)
+    return ((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4;
+  return ((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(soap_get1(soap) & 0x3F);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthex(struct soap *soap, const unsigned char *s, int n)
+{ char d[2];
+  register int i;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2hex(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (i = 0; i < n; i++)
+  { register int m = *s++;
+    d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0'));
+    m &= 0x0F;
+    d[1] = (char)(m + (m > 9 ? '7' : '0'));
+    if (soap_send_raw(soap, d, 2))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_gethex(struct soap *soap, int *n)
+{
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_hex2s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register char *s;
+    register int i, k;
+    if (soap_append_lab(soap, NULL, 0))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = soap->lablen;
+    for (i = 0; i < k; i++)
+    { register char d1, d2;
+      register soap_wchar c;
+      c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = (int)(soap->lablen - k + i);
+        p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	if (p)
+	  memcpy(p, soap->labbuf, soap->lablen - k + i);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, SOAP_BLKLEN);
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register char d1, d2;
+      register soap_wchar c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap_end_block(soap);
+	  soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = soap_size_block(soap, i);
+        p = (unsigned char*)soap_save_block(soap, NULL, 0);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putbase64(struct soap *soap, const unsigned char *s, int n)
+{ register int i;
+  register unsigned long m;
+  char d[4];
+  if (!s)
+    return SOAP_OK;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2base64(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      d[i] = '=';
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_getbase64(struct soap *soap, int *n, int malloc_flag)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_base642s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register int i, k;
+    register char *s;
+    if (soap_append_lab(soap, NULL, 2))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = 3 * (soap->lablen / 3);
+    if (!s)
+      return NULL;
+    for (i = 0; i < k - 2; i += 3)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+            *n = (int)(soap->lablen - k + i);
+          p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	  if (p)
+	    memcpy(p, soap->labbuf, soap->lablen - k + i);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, 3 * SOAP_BLKLEN); /* must be multiple of 3 */
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          i *= 3;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n = (int)soap_size_block(soap, i);
+          p = (unsigned char*)soap_save_block(soap, NULL, 0);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_xop_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ /* Check MTOM xop:Include element (within hex/base64Binary) */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  int body = soap->body; /* should save type too? */
+  if (!soap_peek_element(soap))
+  { if (!soap_element_begin_in(soap, "xop:Include", 0) && *soap->href)
+    { if (soap_dime_forward(soap, ptr, size, id, type, options))
+        return soap->error;
+    }
+    if (soap->body && soap_element_end_in(soap, NULL))
+      return soap->error;
+  }
+  soap->body = body;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_dime_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ struct soap_xlist *xp = (struct soap_xlist*)SOAP_MALLOC(soap, sizeof(struct soap_xlist));
+  *ptr = NULL;
+  *size = 0;
+  *id = soap_strdup(soap, soap->href);
+  *type = NULL;
+  *options = NULL;
+  if (!xp)
+    return soap->error = SOAP_EOM;
+  xp->next = soap->xlist;
+  xp->ptr = ptr;
+  xp->size = size;
+  xp->id = *id;
+  xp->type = type;
+  xp->options = options;
+  soap->xlist = xp;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_strdup(struct soap *soap, const char *s)
+{ char *t = NULL;
+  if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1)))
+    strcpy(t, s);
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_new_block(struct soap *soap)
+{ struct soap_blist *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New block sequence (prev=%p)\n", soap->blist));
+  if (!(p = (struct soap_blist*)SOAP_MALLOC(soap, sizeof(struct soap_blist))))
+    return SOAP_EOM;   
+  p->next = soap->blist; 
+  p->ptr = NULL;
+  p->size = 0;
+  soap->blist = p;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_push_block(struct soap *soap, size_t n)
+{ char *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block of %u bytes (%u bytes total)\n", (unsigned int)n, (unsigned int)soap->blist->size + (unsigned int)n));
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(char*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  *(char**)p = soap->blist->ptr;
+  *(size_t*)(p + sizeof(char*)) = n;
+  soap->blist->ptr = p;
+  soap->blist->size += n;
+  return p + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_block(struct soap *soap)
+{ char *p;
+  if (!soap->blist->ptr)
+    return;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block\n"));
+  p = soap->blist->ptr;
+  soap->blist->size -= *(size_t*)(p + sizeof(char*));
+  soap->blist->ptr = *(char**)p;
+  SOAP_FREE(soap, p);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_update_ptrs(struct soap *soap, char *start, char *end, char *p1, char *p2)
+{ int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+#ifndef WITH_LEANER
+  register struct soap_xlist *xp;
+#endif
+  register void *p, **q;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr && (char*)ip->ptr >= start && (char*)ip->ptr < end)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", ip->id, ip->ptr, (char*)ip->ptr + (p1-p2)));
+        ip->ptr = (char*)ip->ptr + (p1-p2);
+      }
+      for (q = &ip->link; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Link update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (q = &ip->copy; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy chain update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (fp = ip->flist; fp; fp = fp->next)
+      { if ((char*)fp->ptr >= start && (char*)fp->ptr < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy list update id='%s' %p\n", ip->id, fp));
+          fp->ptr = (char*)fp->ptr + (p1-p2);
+        }
+      }
+    }
+  }
+#ifndef WITH_LEANER
+  for (xp = soap->xlist; xp; xp = xp->next)
+  { if (xp->ptr && (char*)xp->ptr >= start && (char*)xp->ptr < end)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", xp->id?xp->id:"", xp->ptr, (char*)xp->ptr + (p1-p2)));
+      xp->ptr = (unsigned char**)((char*)xp->ptr + (p1-p2));
+      xp->size = (int*)((char*)xp->size + (p1-p2));
+      xp->type = (char**)((char*)xp->type + (p1-p2));
+      xp->options = (char**)((char*)xp->options + (p1-p2));
+    }
+  }
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static int
+soap_has_copies(struct soap *soap, register const char *start, register const char *end)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  register const char *p;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { for (p = (const char*)ip->copy; p; p = *(const char**)p)
+        if (p >= start && p < end)
+          return SOAP_ERR;
+      for (fp = ip->flist; fp; fp = fp->next)
+        if ((const char*)fp->ptr >= start && (const char*)fp->ptr < end)
+	  return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_resolve(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  short flag;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr)
+      { register void *p, **q, *r;
+        q = (void**)ip->link;
+        ip->link = NULL;
+        r = ip->ptr;
+        DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing link chain to resolve id='%s'\n", ip->id));
+        while (q)
+        { p = *q;
+          *q = r;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "... link %p -> %p\n", q, r));
+          q = (void**)p;
+        }
+      }
+      else if (*ip->id == '#')
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Missing data for id='%s'\n", ip->id));
+        strcpy(soap->id, ip->id + 1);
+        return soap->error = SOAP_MISSING_ID;
+      }
+    }
+  }
+  do
+  { flag = 0;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution phase\n"));
+    for (i = 0; i < SOAP_IDHASH; i++)
+    { for (ip = soap->iht[i]; ip; ip = ip->next)
+      { if (ip->ptr && !soap_has_copies(soap, (const char*)ip->ptr, (const char*)ip->ptr + ip->size))
+        { if (ip->copy)
+          { register void *p, **q = (void**)ip->copy;
+            DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing copy chain to resolve id='%s'\n", ip->id));
+            ip->copy = NULL;
+            do
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... copy %p -> %p (%u bytes)\n", ip->ptr, q, (unsigned int)ip->size));
+	      p = *q;
+              memcpy(q, ip->ptr, ip->size);
+              q = (void**)p;
+            } while (q);
+	    flag = 1;
+	  }
+          for (fp = ip->flist; fp; fp = ip->flist)
+          { register unsigned int k = fp->level;
+	    register void *p = ip->ptr;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data type=%d location=%p level=%u,%u id='%s'\n", ip->type, p, ip->level, fp->level, ip->id));
+	    while (ip->level < k)
+            { register void **q = (void**)soap_malloc(soap, sizeof(void*));  
+	      if (!q)
+	        return soap->error;
+	      *q = p;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level, new location=%p holds=%p...\n", q, *q));
+              p = (void*)q;
+              k--;
+            }
+	    if (fp->fcopy)
+	      fp->fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    else
+	      soap_fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    ip->flist = fp->next;
+	    SOAP_FREE(soap, fp);
+	    flag = 1;
+	  }
+        }
+      }
+    }
+  } while (flag);
+#ifdef SOAP_DEBUG
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->copy || ip->flist)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution error: forwarded data for id='%s' could not be propagated, please report this problem to the developers\n", ip->id));
+      }
+    }
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution done\n"));
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_size_block(struct soap *soap, size_t n)
+{ if (soap->blist->ptr)
+  { soap->blist->size -= *(size_t*)(soap->blist->ptr + sizeof(char*)) - n;
+    *(size_t*)(soap->blist->ptr + sizeof(char*)) = n;
+  }
+  return soap->blist->size;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_first_block(struct soap *soap)
+{ char *p, *q, *r;
+  p = soap->blist->ptr;
+  if (!p)
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "First block\n"));
+  r = NULL;
+  do
+  { q = *(char**)p;
+    *(char**)p = r;
+    r = p;
+    p = q;
+  } while (p);
+  soap->blist->ptr = r;
+  return r + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_next_block(struct soap *soap)
+{ char *p;
+  p = soap->blist->ptr;
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n"));
+    soap->blist->ptr = *(char**)p;
+    SOAP_FREE(soap, p);
+    if (soap->blist->ptr)
+      return soap->blist->ptr + sizeof(char*) + sizeof(size_t);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_block_size(struct soap *soap)
+{ return *(size_t*)(soap->blist->ptr + sizeof(char*));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end_block(struct soap *soap)
+{ struct soap_blist *bp;
+  char *p, *q;
+  bp = soap->blist;
+  if (bp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of block sequence, free all remaining blocks\n"));
+    for (p = bp->ptr; p; p = q)
+    { q = *(char**)p;
+      SOAP_FREE(soap, p);
+    }
+    soap->blist = bp->next;
+    SOAP_FREE(soap, bp);
+  }
+  DBGLOG(TEST, if (soap->blist) SOAP_MESSAGE(fdebug, "Restore previous block sequence\n"));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_save_block(struct soap *soap, char *p, int flag)
+{ register size_t n;
+  register char *q, *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Save all blocks in contiguous memory space of %u bytes (%p->%p)\n", (unsigned int)soap->blist->size, soap->blist->ptr, p));
+  if (soap->blist->size)
+  { if (!p)
+      p = (char*)soap_malloc(soap, soap->blist->size);
+    if (p)
+    { for (s = p, q = soap_first_block(soap); q; q = soap_next_block(soap))
+      { n = soap_block_size(soap);
+#ifndef WITH_NOIDREF
+        if (flag)
+	  soap_update_ptrs(soap, q, q + n, s, q);
+#endif
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy %u bytes from %p to %p\n", (unsigned int)n, q, s));
+        memcpy(s, q, n);
+        s += n;
+      }
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  soap_end_block(soap);
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsize(struct soap *soap, const char *type, int size)
+{ return soap_putsizes(soap, type, &size, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizes(struct soap *soap, const char *type, const int *size, int dim)
+{ return soap_putsizesoffsets(soap, type, size, NULL, dim);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim)
+{ int i;
+  if (!type)
+    return NULL;
+  if (soap->version == 2)
+  { sprintf(soap->type, "%s[%d", type, size[0]);
+    for (i = 1; i < dim; i++)
+      sprintf(soap->type + strlen(soap->type), " %d", size[i]);
+  }
+  else
+  { if (offset)
+    { sprintf(soap->type, "%s[%d", type, size[0] + offset[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i] + offset[i]);
+    }
+    else
+    { sprintf(soap->type, "%s[%d", type, size[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i]);
+    }
+    strcat(soap->type, "]");
+  }
+  return soap->type;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffset(struct soap *soap, int offset)
+{ return soap_putoffsets(soap, &offset, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffsets(struct soap *soap, const int *offset, int dim)
+{ register int i;
+  sprintf(soap->arrayOffset, "[%d", offset[0]);
+  for (i = 1; i < dim; i++)
+    sprintf(soap->arrayOffset + strlen(soap->arrayOffset), ",%d", offset[i]);
+  strcat(soap->arrayOffset, "]");
+  return soap->arrayOffset;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_size(const int *size, int dim)
+{ register int i, n = size[0];
+  for (i = 1; i < dim; i++)
+    n *= size[i];
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getoffsets(const char *attr, const int *size, int *offset, int dim)
+{ register int i, j = 0;
+  if (offset)
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += offset[i] = (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  else
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  return j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsize(const char *attr1, const char *attr2, int *j)
+{ register int n, k;
+  char *s;
+  *j = 0;
+  if (!*attr1)
+    return -1;
+  if (*attr1 == '[')
+    attr1++;
+  n = 1;
+  for (;;)
+  { k = (int)soap_strtol(attr1, &s, 10);
+    n *= k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE || s == attr1)
+      return -1;
+    attr1 = strchr(s, ',');
+    if (!attr1)
+      attr1 = strchr(s, ' ');
+    if (attr2 && *attr2)
+    { attr2++;
+      *j *= k;
+      k = (int)soap_strtol(attr2, &s, 10);
+      *j += k;
+      if (k < 0)
+        return -1;
+      attr2 = s;
+    }
+    if (!attr1)
+      break;
+    attr1++;
+  }
+  return n - *j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsizes(const char *attr, int *size, int dim)
+{ register int i, k, n;
+  if (!*attr)
+    return -1;
+  i = strlen(attr);
+  n = 1;
+  do
+  { for (i = i-1; i >= 0; i--)
+      if (attr[i] == '[' || attr[i] == ',' || attr[i] == ' ')
+        break;
+    k = (int)atol(attr + i + 1);
+    n *= size[--dim] = k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE)
+      return -1;
+  } while (i >= 0 && attr[i] != '[');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getposition(const char *attr, int *pos)
+{ register int i, n;
+  if (!*attr)
+    return -1;
+  n = 0;
+  i = 1;
+  do
+  { pos[n++] = (int)atol(attr + i);
+    while (attr[i] && attr[i] != ',' && attr[i] != ']')
+      i++;
+    if (attr[i] == ',')
+      i++;
+  } while (n < SOAP_MAXDIMS && attr[i] && attr[i] != ']');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_push_namespace(struct soap *soap, const char *id, const char *ns)
+{ register struct soap_nlist *np;
+  register struct Namespace *p;
+  register short i = -1;
+  register size_t n, k;
+  n = strlen(id);
+  k = strlen(ns) + 1;
+  p = soap->local_namespaces;
+  if (p)
+  { for (i = 0; p->id; p++, i++)
+    { if (p->ns && !strcmp(ns, p->ns))
+      { if (p->out)
+        { SOAP_FREE(soap, p->out);
+          p->out = NULL;
+        }
+        break;
+      }
+      if (p->out)
+      { if (!strcmp(ns, p->out))
+          break;
+      }
+      else if (p->in)
+      { if (!soap_tag_cmp(ns, p->in))
+        { if ((p->out = (char*)SOAP_MALLOC(soap, k)))
+            strcpy(p->out, ns);
+          break;
+        }
+      }
+    }
+    if (!p || !p->id)
+      i = -1;
+  }
+  if (i >= 0)
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k);
+  if (!np)
+    return soap->error = SOAP_EOM;
+  np->next = soap->nlist;
+  soap->nlist = np;
+  np->level = soap->level;
+  np->index = i;
+  strcpy(np->id, id);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns));
+  if (i < 0)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push NOT OK: no match found for '%s' in namespace mapping table (added to stack anyway)\n", ns));
+  }
+  else
+  { np->ns = NULL;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push OK ('%s' matches '%s' in namespace table)\n", id, p->id));
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_namespace(struct soap *soap)
+{ register struct soap_nlist *np;
+  while (soap->nlist && soap->nlist->level >= soap->level)
+  { np = soap->nlist->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Popped namespace binding (level=%u) '%s'\n", soap->level, soap->nlist->id));
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_namespace(struct soap *soap, const char *id1, const char *id2, int n1, int n2) 
+{ register struct soap_nlist *np = soap->nlist;
+  while (np && (strncmp(np->id, id1, n1) || np->id[n1]))
+    np = np->next;
+  if (np)
+  { if (np->index < 0
+     || (soap->local_namespaces[np->index].id
+      && (strncmp(soap->local_namespaces[np->index].id, id2, n2)
+       || soap->local_namespaces[np->index].id[n2])))
+      return SOAP_NAMESPACE;
+    return SOAP_OK;
+  }
+  if (n1 == 3 && n1 == n2 && !strcmp(id1, "xml") && !strcmp(id1, id2))
+    return SOAP_OK;
+  return SOAP_SYNTAX_ERROR; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_current_namespace(struct soap *soap, const char *tag)
+{ register struct soap_nlist *np;
+  register const char *s;
+  np = soap->nlist;
+  if (!(s = strchr(tag, ':')))
+  { while (np && *np->id) /* find default namespace, if present */
+      np = np->next;
+  }
+  else
+  { while (np && (strncmp(np->id, tag, s - tag) || np->id[s - tag]))
+      np = np->next;
+    if (!np)
+      soap->error = SOAP_NAMESPACE;
+  }
+  if (np)
+  { if (np->index >= 0)
+      return soap->namespaces[np->index].ns;
+    if (np->ns)
+      return soap_strdup(soap, np->ns);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_tag_cmp(const char *s, const char *t)
+{ for (;;)
+  { register int c1 = *s;
+    register int c2 = *t;
+    if (!c1 || c1 == '"')
+      break;
+    if (c2 != '-')
+    { if (c1 != c2)
+      { if (c1 >= 'A' && c1 <= 'Z')
+          c1 += 'a' - 'A';
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+      }
+      if (c1 != c2)
+      { if (c2 != '*')
+          return 1;
+	c2 = *++t;
+        if (!c2)
+	  return 0;
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+        for (;;)
+        { c1 = *s;
+	  if (!c1 || c1 == '"')
+	    break;
+	  if (c1 >= 'A' && c1 <= 'Z')
+            c1 += 'a' - 'A';
+          if (c1 == c2 && !soap_tag_cmp(s + 1, t + 1))
+            return 0;
+	  s++;
+        }
+        break;
+      }
+    }
+    s++;
+    t++;
+  }
+  if (*t == '*' && !t[1])
+    return 0;
+  return *t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_tag(struct soap *soap, const char *tag1, const char *tag2)
+{ register const char *s, *t;
+  if (!tag1 || !tag2 || !*tag2)
+    return SOAP_OK;
+  s = strchr(tag1, ':');
+  t = strchr(tag2, ':');
+  if (t)
+  { if (s)
+    { if (t[1] && SOAP_STRCMP(s + 1, t + 1))
+        return SOAP_TAG_MISMATCH;
+      if (t != tag2 && soap_match_namespace(soap, tag1, tag2, s - tag1, t - tag2))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+        return SOAP_TAG_MISMATCH;
+      }
+    } 
+    else if (SOAP_STRCMP(tag1, t + 1))
+      return SOAP_TAG_MISMATCH;
+    else if (t != tag2 && soap_match_namespace(soap, tag1, tag2, 0, t - tag2))
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+      return SOAP_TAG_MISMATCH;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags and (default) namespaces match: '%s' '%s'\n", tag1, tag2));
+    return SOAP_OK;
+  }
+  if (s)
+  { if (SOAP_STRCMP(s + 1, tag2))
+      return SOAP_TAG_MISMATCH;
+  }
+  else if (SOAP_STRCMP(tag1, tag2))
+    return SOAP_TAG_MISMATCH;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags match: '%s' '%s'\n", tag1, tag2));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_array(struct soap *soap, const char *type)
+{ if (*soap->arrayType)
+    if (soap_match_tag(soap, soap->arrayType, type)
+     && soap_match_tag(soap, soap->arrayType, "xsd:anyType")
+     && soap_match_tag(soap, soap->arrayType, "xsd:ur-type")
+    )
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array type mismatch: '%s' '%s'\n", soap->arrayType, type));
+      return SOAP_TAG_MISMATCH;
+    }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************\
+ *
+ *	SSL
+ *
+\******************************************************************************/
+
+#ifdef WITH_OPENSSL
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_rand()
+{ unsigned char buf[4];
+  if (!ssl_init_done)
+    soap_ssl_init();
+  RAND_pseudo_bytes(buf, 4);
+  return *(int*)buf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *dhfile, const char *randfile, const char *sid)
+{ int err;
+  soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  if (dhfile)
+  { soap->dhfile = dhfile;
+    soap->rsa = 0;
+  }
+  else
+  { soap->dhfile = NULL;
+    soap->rsa = 1;
+  }
+  soap->randfile = randfile;
+  soap->require_client_auth = (flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION);
+  if (!(err = soap->fsslauth(soap)))
+  { if (sid)
+      SSL_CTX_set_session_id_context(soap->ctx, (unsigned char*)sid, strlen(sid));
+  }
+  return err; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_client_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *randfile)
+{ soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  soap->dhfile = NULL;
+  soap->rsa = 0;
+  soap->randfile = randfile;
+  soap->require_server_auth = (flags & SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION);
+  return soap->fsslauth(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_ssl_init()
+{ /* Note: for MT systems, the main program MUST call soap_ssl_init() before any threads are started */
+  if (!ssl_init_done)
+  { ssl_init_done = 1;
+    SSL_library_init();
+#ifndef WITH_LEAN
+    SSL_load_error_strings();
+#endif
+    if (!RAND_load_file("/dev/urandom", 1024))
+    { char buf[1024];
+      RAND_seed(buf, sizeof(buf));
+      while (!RAND_status())
+      { int r = rand();
+        RAND_seed(&r, sizeof(int));
+      }
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static const char *
+ssl_error(struct soap *soap, int ret)
+{ int err = SSL_get_error(soap->ssl, ret);
+  const char *msg = soap_str_code(h_ssl_error_codes, err);
+  if (msg)
+    strcpy(soap->msgbuf, msg);
+  else
+    return ERR_error_string(err, soap->msgbuf);
+  if (ERR_peek_error())
+  { unsigned long r;
+    strcat(soap->msgbuf, "\n");
+    while ((r = ERR_get_error()))
+      ERR_error_string_n(r, soap->msgbuf + strlen(soap->msgbuf), sizeof(soap->msgbuf) - strlen(soap->msgbuf));
+  } 
+  else
+  { switch (ret)
+    { case 0:
+        strcpy(soap->msgbuf, "EOF was observed that violates the protocol. The client probably provided invalid authentication information.");
+        break;
+      case -1:
+        sprintf(soap->msgbuf, "Error observed by underlying BIO: %s", strerror(errno));  
+        break;
+    }
+  }
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_password(char *buf, int num, int rwflag, void *userdata)
+{ if (num < (int)strlen((char*)userdata) + 1)
+    return 0;
+  return strlen(strcpy(buf, (char*)userdata));
+}
+#endif
+
+/******************************************************************************/
+/* This callback is included for future references. It should not be deleted
+#ifndef PALM_2
+static DH *
+ssl_tmp_dh(SSL *ssl, int is_export, int keylength)
+{ static DH *dh512 = NULL;
+  static DH *dh1024 = NULL;
+  DH *dh;
+  switch (keylength)
+  { case 512:
+      if (!dh512)
+      { BIO *bio = BIO_new_file("dh512.pem", "r");
+        if (bio)
+        { dh512 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+          return dh512;
+        }
+      }
+      else
+        return dh512;
+    default:
+      if (!dh1024)
+      { BIO *bio = BIO_new_file("dh1024.pem", "r");
+        if (bio)
+        { dh1024 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+        }
+      }
+      dh = dh1024;
+  }
+  return dh;
+}
+#endif
+*/
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_auth_init(struct soap *soap)
+{ if (!ssl_init_done)
+    soap_ssl_init();
+  if (!soap->ctx)
+  { if (!(soap->ctx = SSL_CTX_new(SSLv23_method())))
+      return soap_set_receiver_error(soap, "SSL error", "Can't setup context", SOAP_SSL_ERROR);
+  }
+  if (soap->randfile)
+  { if (!RAND_load_file(soap->randfile, -1))
+      return soap_set_receiver_error(soap, "SSL error", "Can't load randomness", SOAP_SSL_ERROR);
+  }
+  if (soap->cafile || soap->capath)
+  { if (!SSL_CTX_load_verify_locations(soap->ctx, soap->cafile, soap->capath))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read CA file and directory", SOAP_SSL_ERROR);
+    if (soap->cafile && soap->require_client_auth)
+      SSL_CTX_set_client_CA_list(soap->ctx, SSL_load_client_CA_file(soap->cafile));
+  }
+  if (!SSL_CTX_set_default_verify_paths(soap->ctx))
+    return soap_set_receiver_error(soap, "SSL error", "Can't read default CA file and/or directory", SOAP_SSL_ERROR);
+/* See below */
+  if (soap->keyfile)
+  { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read certificate key file", SOAP_SSL_ERROR);
+    if (soap->password)
+    { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+      SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+    }
+    if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+  }
+/* Suggested alternative approach to check cafile first before the key file:
+  if (soap->password)
+  { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+    SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+  }
+  if (!soap->cafile || !SSL_CTX_use_certificate_chain_file(soap->ctx, soap->cafile))
+  { if (soap->keyfile)
+    { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read certificate or key file", SOAP_SSL_ERROR);
+      if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+    }
+  }
+*/
+  if (soap->rsa)
+  { RSA *rsa = RSA_generate_key(1024, RSA_F4, NULL, NULL);
+    if (!SSL_CTX_set_tmp_rsa(soap->ctx, rsa))
+    { if (rsa)
+        RSA_free(rsa);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set RSA key", SOAP_SSL_ERROR);
+    }
+    RSA_free(rsa);
+  }
+  else if (soap->dhfile)
+  { DH *dh = 0;
+    BIO *bio;
+    bio = BIO_new_file(soap->dhfile, "r");
+    if (!bio)
+      return soap_set_receiver_error(soap, "SSL error", "Can't read DH file", SOAP_SSL_ERROR);
+    dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+    BIO_free(bio);
+    if (SSL_CTX_set_tmp_dh(soap->ctx, dh) < 0)
+    { if (dh)
+        DH_free(dh);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set DH parameters", SOAP_SSL_ERROR);
+    }
+    DH_free(dh);
+  }
+  SSL_CTX_set_options(soap->ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2);
+  SSL_CTX_set_verify(soap->ctx, soap->require_client_auth ? (SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT) : soap->require_server_auth ? SSL_VERIFY_PEER : SSL_VERIFY_NONE, soap->fsslverify);
+#if (OPENSSL_VERSION_NUMBER < 0x00905100L)
+  SSL_CTX_set_verify_depth(soap->ctx, 1); 
+#else
+  SSL_CTX_set_verify_depth(soap->ctx, 9); 
+#endif  
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_verify_callback(int ok, X509_STORE_CTX *store)
+{
+#ifdef SOAP_DEBUG
+  if (!ok) 
+  { char data[256];
+    X509 *cert = X509_STORE_CTX_get_current_cert(store);
+    fprintf(stderr, "SSL verify error or warning with certificate at depth %d: %s\n", X509_STORE_CTX_get_error_depth(store), X509_verify_cert_error_string(X509_STORE_CTX_get_error(store)));
+    X509_NAME_oneline(X509_get_issuer_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate issuer %s\n", data);
+    X509_NAME_oneline(X509_get_subject_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate subject %s\n", data);
+  }
+#endif
+  /* Note: return 1 to continue, but unsafe progress will be terminated by SSL */
+  return ok;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_accept(struct soap *soap)
+{ BIO *bio;
+  int i, r;
+  if (!soap_valid_socket(soap->socket))
+    return soap_set_receiver_error(soap, "SSL error", "No socket in soap_ssl_accept()", SOAP_SSL_ERROR);
+  if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    return SOAP_INVALID_SOCKET;
+  if (!soap->ssl)
+  { soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+      return soap_set_receiver_error(soap, "SSL error", "SSL_new() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+  }
+  else
+    SSL_clear(soap->ssl);
+  soap->imode |= SOAP_ENC_SSL;
+  soap->omode |= SOAP_ENC_SSL;
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&nonblocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)|O_NONBLOCK);
+#endif
+  bio = BIO_new_socket((SOAP_SOCKET)soap->socket, BIO_NOCLOSE);
+  SSL_set_bio(soap->ssl, bio, bio);
+  i = 100; /* 100 * 0.1 ms retries */
+  while ((r = SSL_accept(soap->ssl)) <= 0)
+  { int err = SSL_get_error(soap->ssl, r);
+    if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE)
+    { struct timeval timeout;
+      fd_set fd;
+      if (i-- <= 0)
+        break;
+      timeout.tv_sec = 0;
+      timeout.tv_usec = 100000;
+      FD_ZERO(&fd);
+      FD_SET((SOAP_SOCKET)soap->socket, &fd);
+      r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+      if (r < 0 && soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        return SOAP_EOF;
+      }
+    }
+    else
+    { soap->errnum = err;
+      break;
+    }
+  }
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&blocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+  if (r <= 0)
+  { soap_set_receiver_error(soap, ssl_error(soap, r), "SSL_accept() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+    soap_closesock(soap);
+    return SOAP_SSL_ERROR;
+  }
+  if (soap->require_client_auth)
+  { X509 *peer;
+    int err;
+    if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    peer = SSL_get_peer_certificate(soap->ssl);
+    if (!peer)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    X509_free(peer);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#endif /* WITH_OPENSSL */
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_init(struct soap *soap)
+{ soap->errmode = 1;
+#ifdef WIN32
+  if (tcp_done)
+    return 0;
+  else
+  { WSADATA w;
+    if (WSAStartup(MAKEWORD(1, 1), &w))
+      return -1;
+    tcp_done = 1;
+  }
+#endif
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_done(struct soap *soap)
+{ 
+#ifdef SOAP_DEBUG
+  int i;
+#endif
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  while (soap->clist)
+  { struct soap_clist *p = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = p;
+  }
+  soap->keep_alive = 0; /* to force close the socket */
+  soap_closesock(soap);
+#ifdef WITH_COOKIES
+  soap_free_cookies(soap);
+#endif
+  while (soap->plugins)
+  { register struct soap_plugin *p = soap->plugins->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Removing plugin '%s'\n", soap->plugins->id));
+    if (soap->plugins->fcopy || soap->state == SOAP_INIT)
+      soap->plugins->fdelete(soap, soap->plugins);
+    SOAP_FREE(soap, soap->plugins);
+    soap->plugins = p;
+  }
+  soap->fplugin = fplugin;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+#ifdef WITH_OPENSSL
+  if (soap->session)
+  { SSL_SESSION_free(soap->session);
+    soap->session = NULL;
+  }
+#endif
+  if (soap->state == SOAP_INIT)
+  { if (soap_valid_socket(soap->master))
+    { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+      soap->master = SOAP_INVALID_SOCKET;
+    }
+#ifdef WITH_OPENSSL
+    if (soap->ctx)
+    { SSL_CTX_free(soap->ctx);
+      soap->ctx = NULL;
+    }
+#endif
+  }
+#ifdef SOAP_DEBUG
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free logfiles\n"));
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { if (soap->logfile[i])
+    { SOAP_FREE(soap, (void*)soap->logfile[i]);
+      soap->logfile[i] = NULL;
+    }
+    soap_close_logfile(soap, i);
+  }
+  soap_free_mht(soap);
+  soap->state = 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_cleanup(struct soap *soap)
+{ soap_done(soap);
+#ifdef WIN32
+  if (!tcp_done)
+    return;
+  tcp_done = 0;
+  WSACleanup();
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+tcp_error(struct soap *soap)
+{ register const char *msg = NULL;
+  switch (soap->errmode)
+  { case 0:
+      msg = soap_strerror(soap);
+      break;
+    case 1:
+      msg = "WSAStartup failed";
+      break;
+    case 2:
+    {
+#ifndef WITH_LEAN
+      msg = soap_str_code(h_error_codes, soap->errnum);
+      if (!msg)
+#endif
+      { sprintf(soap->msgbuf, "TCP/UDP IP error %d", soap->errnum);
+        msg = soap->msgbuf;
+      }
+    }
+  }
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static const char*
+http_error(struct soap *soap, int status)
+{ register const char *msg = SOAP_STR_EOS;
+#ifndef WITH_LEAN
+  msg = soap_str_code(h_http_error_codes, status);
+  if (!msg)
+    msg = SOAP_STR_EOS;
+#endif
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_IPV6
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr)
+{ soap_int32 iadd = -1;
+  struct hostent hostent, *host = &hostent;
+#ifdef VXWORKS
+  int hostint;
+  /* inet_addr(), and hostGetByName() expect "char *"; addr is a "const char *". */
+  iadd = inet_addr((char*)addr);
+#else
+#if defined(_AIXVERSION_431) || defined(TRU64)
+  struct hostent_data ht_data;
+#endif
+#ifdef AS400
+  iadd = inet_addr((void*)addr);
+#else
+  iadd = inet_addr(addr);
+#endif
+#endif
+  if (iadd != -1)
+  { memcpy(inaddr, &iadd, sizeof(iadd));
+    return SOAP_OK;
+  }
+#if defined(__GLIBC__)
+  if (gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &host, &soap->errnum) < 0)
+    host = NULL;
+#elif defined(_AIXVERSION_431) || defined(TRU64)
+  memset((void*)&ht_data, 0, sizeof(ht_data));
+  if (gethostbyname_r(addr, &hostent, &ht_data) < 0)
+  { host = NULL;
+    soap->errnum = h_errno;
+  }
+#elif defined(HAVE_GETHOSTBYNAME_R)
+  host = gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &soap->errnum);
+#elif defined(VXWORKS)
+  /* If the DNS resolver library resolvLib has been configured in the vxWorks
+   * image, a query for the host IP address is sent to the DNS server, if the
+   * name was not found in the local host table. */
+  hostint = hostGetByName((char*)addr);
+  if (hostint == ERROR)
+  { host = NULL;
+    soap->errnum = soap_errno; 
+  }
+#else
+#ifdef AS400
+  if (!(host = gethostbyname((void*)addr)))
+    soap->errnum = h_errno;
+#else
+  if (!(host = gethostbyname(addr)))
+    soap->errnum = h_errno;
+#endif
+#endif
+  if (!host)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Host name not found\n"));
+    return SOAP_ERR;
+  }
+#ifdef VXWORKS
+  inaddr->s_addr = hostint;
+#else
+  memcpy(inaddr, host->h_addr, host->h_length);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_connect(struct soap *soap, const char *endpoint, const char *host, int port)
+{
+#ifdef WITH_IPV6
+  struct addrinfo hints, *res, *ressave;
+  int err;
+#endif
+  register int fd;
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->socket))
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+  soap->socket = SOAP_INVALID_SOCKET;
+  if (tcp_init(soap))
+  { soap->errnum = 0;
+    soap_set_sender_error(soap, tcp_error(soap), "TCP init failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->errmode = 0;
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+    err = getaddrinfo(soap->proxy_host, soap_int2s(soap, soap->proxy_port), &hints, &res);
+  else
+    err = getaddrinfo(host, soap_int2s(soap, port), &hints, &res);
+  if (err)
+  { soap_set_sender_error(soap, gai_strerror(err), "getaddrinfo failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  ressave = res;
+again:
+  fd = (int)socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+  soap->errmode = 0;
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    fd = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    fd = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  if (fd < 0)
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "socket failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_flags & SO_LINGER)
+  { struct linger linger;
+    memset((void*)&linger, 0, sizeof(linger));
+    linger.l_onoff = 1;
+    linger.l_linger = 0;
+    if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+    { soap->errnum = soap_socket_errno;
+      soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  if ((soap->connect_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, soap->connect_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (soap->keep_alive && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)fd, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Opening socket %d to host='%s' port=%d\n", fd, host, port));
+#ifndef WITH_IPV6
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+  { if (soap->fresolve(soap, soap->proxy_host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get proxy host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)soap->proxy_port);
+  }
+  else
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)port);
+  }
+  soap->errmode = 0;
+  if ((soap->omode & SOAP_IO_UDP))
+    return fd;
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking)); /* modified to use fd */
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+  else
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  for (;;)
+  { 
+#ifdef WITH_IPV6
+    if (connect((SOAP_SOCKET)fd, res->ai_addr, res->ai_addrlen))
+#else
+    if (connect((SOAP_SOCKET)fd, (struct sockaddr*)&soap->peer, sizeof(soap->peer)))
+#endif
+    { 
+#ifndef WITH_LEAN
+      if (soap->connect_timeout && (soap_socket_errno == SOAP_EINPROGRESS || soap_socket_errno == SOAP_EWOULDBLOCK))
+      { struct timeval timeout;
+        SOAP_SOCKLEN_T k;
+        fd_set fds;
+        if (soap->connect_timeout > 0)
+        { timeout.tv_sec = soap->connect_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->connect_timeout/1000000;
+          timeout.tv_usec = -soap->connect_timeout%1000000;
+        }
+        FD_ZERO(&fds);
+        FD_SET((SOAP_SOCKET)fd, &fds);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(fd + 1), NULL, &fds, NULL, &timeout);
+          if (r > 0)
+	    break;
+          if (!r)
+          { soap->errnum = 0;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+            soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+            soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+	k = (SOAP_SOCKLEN_T)sizeof(soap->errnum);
+        if (!getsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_ERROR, (char*)&soap->errnum, &k) && !soap->errnum)	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+          break;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap->errnum = soap_socket_errno;
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      else
+#endif
+#ifdef WITH_IPV6
+      if (res->ai_next)
+      { res = res->ai_next;
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        goto again;
+      }
+      else
+#endif
+      if (soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }  
+    else
+      break;
+  }
+#ifdef WITH_IPV6
+  soap->peerlen = 0; /* IPv6: already connected so use send() */
+  freeaddrinfo(ressave);
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  soap->socket = fd;
+  soap->imode &= ~SOAP_ENC_SSL;
+  soap->omode &= ~SOAP_ENC_SSL;
+  if (!strncmp(endpoint, "https:", 6))
+  {
+#ifdef WITH_OPENSSL
+    BIO *bio;
+    int r;
+    if (soap->proxy_host)
+    { short v;
+      unsigned int k = soap->omode; /* make sure we only parse HTTP */
+      size_t n = soap->count; /* save the content length */
+      char *userid, *passwd;
+      soap->omode &= ~SOAP_ENC; /* mask IO and ENC */
+      soap->omode |= SOAP_IO_BUFFER;
+      soap_begin_send(soap);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connecting to proxy server\n"));
+      sprintf(soap->tmpbuf, "CONNECT %s:%d HTTP/%s", host, port, soap->http_version);
+      if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+#ifndef WITH_LEAN
+      if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+      { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+        strcpy(soap->tmpbuf, "Basic ");
+        soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+        if ((soap->error = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+        { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return soap->error;
+        }
+      }
+#endif
+      if ((soap->error = soap->fposthdr(soap, NULL, NULL))
+       || soap_flush(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->omode = k;
+      k = soap->imode;
+      soap->imode &= ~SOAP_ENC; /* mask IO and ENC */
+      v = soap->version; /* preserve */
+      userid = soap->userid; /* preserve */
+      passwd = soap->passwd; /* preserve */
+      if (soap_begin_recv(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->userid = userid; /* restore */
+      soap->passwd = passwd; /* restore */
+      soap->version = v; /* restore */
+      soap->imode = k; /* restore */
+      soap->count = n; /* restore */
+      soap_begin_send(soap);
+    }
+    if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    { soap_set_sender_error(soap, "SSL error", "SSL authentication failed in tcp_connect(): check password, key file, and ca file.", SOAP_SSL_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+    { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      soap->error = SOAP_SSL_ERROR;
+      return SOAP_INVALID_SOCKET;
+    }
+    if (soap->session)
+    { if (!strcmp(soap->session_host, host) && soap->session_port == port)
+        SSL_set_session(soap->ssl, soap->session);
+      SSL_SESSION_free(soap->session);
+      soap->session = NULL;
+    }
+    soap->imode |= SOAP_ENC_SSL;
+    soap->omode |= SOAP_ENC_SSL;
+    bio = BIO_new_socket((SOAP_SOCKET)fd, BIO_NOCLOSE);
+    SSL_set_bio(soap->ssl, bio, bio);
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#if defined(WIN32)
+    { u_long nonblocking = 1;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+    }
+#elif defined(VXWORKS)
+    { u_long nonblocking = 1;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+#endif
+    for (;;)
+    { if ((r = SSL_connect(soap->ssl)) <= 0)
+      { int err = SSL_get_error(soap->ssl, r);
+        if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+        { soap_set_sender_error(soap, ssl_error(soap, r), "SSL connect failed in tcp_connect()", SOAP_SSL_ERROR);
+          soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (soap->connect_timeout)
+        { struct timeval timeout;
+          fd_set fds;
+          if (soap->connect_timeout > 0)
+          { timeout.tv_sec = soap->connect_timeout;
+            timeout.tv_usec = 0;
+          }
+          else
+          { timeout.tv_sec = -soap->connect_timeout/1000000;
+            timeout.tv_usec = -soap->connect_timeout%1000000;
+          }
+          FD_ZERO(&fds);
+          FD_SET((SOAP_SOCKET)fd, &fds);
+          for (;;)
+          { int r = select((SOAP_SOCKET)(fd + 1), &fds, NULL, &fds, &timeout);
+            if (r > 0)
+	      break;
+            if (!r)
+            { soap->errnum = 0;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+              soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+              soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+              return SOAP_INVALID_SOCKET;
+            }
+          }
+	  continue;
+        }
+      }
+      break;
+    }
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#ifdef WIN32
+    { u_long blocking = 0;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+    }
+#elif defined(VXWORKS)
+    { u_long blocking = 0;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+    if (soap->require_server_auth)
+    { X509 *peer;
+      int err;
+      if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+      { soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      peer = SSL_get_peer_certificate(soap->ssl);
+      if (!peer)
+      { soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      X509_NAME_get_text_by_NID(X509_get_subject_name(peer), NID_commonName, soap->msgbuf, sizeof(soap->msgbuf));
+      X509_free(peer);
+      if (soap_tag_cmp(soap->msgbuf, host))
+      { soap_set_sender_error(soap, "SSL error", "SSL certificate host name mismatch in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+#else
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    soap->error = SOAP_SSL_ERROR;
+    return SOAP_INVALID_SOCKET;
+#endif
+  }
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_bind(struct soap *soap, const char *host, int port, int backlog)
+{
+#ifdef WITH_IPV6
+  struct addrinfo *addrinfo = NULL;
+  struct addrinfo hints;
+  struct addrinfo res;
+  int err;
+#endif
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->master))
+  { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+    soap->master = SOAP_INVALID_SOCKET;
+  }
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 1;
+  if (tcp_init(soap))
+  { soap_set_receiver_error(soap, tcp_error(soap), "TCP init failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  hints.ai_flags = AI_PASSIVE;
+  soap->errmode = 2;
+  err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo);
+  if (addrinfo)
+  { res = *addrinfo;
+    soap->peer = *((struct sockaddr_storage*)addrinfo->ai_addr);
+    soap->peerlen = addrinfo->ai_addrlen;
+    res.ai_addr = (struct sockaddr*)&soap->peer;
+    res.ai_addrlen = soap->peerlen;
+    freeaddrinfo(addrinfo);
+  }
+  if (err)
+  { soap_set_receiver_error(soap, gai_strerror(err), "getaddrinfo failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->master = socket(res.ai_family, res.ai_socktype, res.ai_protocol);
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->master = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    soap->master = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  soap->errmode = 0;
+  if (!soap_valid_socket(soap->master))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "socket failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->socket = soap->master;
+#endif
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)soap->master, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(soap->master, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->bind_flags && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, soap->bind_flags, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->master, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+#ifdef WITH_IPV6
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, res.ai_addr, res.ai_addrlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+#else
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (host)
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_receiver_error(soap, tcp_error(soap), "get host by name failed in soap_bind()", SOAP_TCP_ERROR);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  else
+    soap->peer.sin_addr.s_addr = htonl(INADDR_ANY);
+  soap->peer.sin_port = htons((short)port);
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, (struct sockaddr*)&soap->peer, soap->peerlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+  if (!(soap->omode & SOAP_IO_UDP) && listen((SOAP_SOCKET)soap->master, backlog))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "listen failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+  return soap->master;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_poll(struct soap *soap)
+{ 
+#ifndef WITH_LEAN
+  struct timeval timeout;
+  fd_set rfd, sfd, xfd;
+  int r;
+  timeout.tv_sec = 0;
+  timeout.tv_usec = 0;
+  FD_ZERO(&rfd);
+  FD_ZERO(&sfd);
+  FD_ZERO(&xfd);
+  if (soap_valid_socket(soap->socket))
+  { FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &xfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, &xfd, &timeout);
+    if (r > 0 && FD_ISSET((SOAP_SOCKET)soap->socket, &xfd))
+      r = -1;
+  }
+  else if (soap_valid_socket(soap->master))
+  { FD_SET((SOAP_SOCKET)soap->master, &sfd);
+    r = select((SOAP_SOCKET)(soap->master + 1), NULL, &sfd, NULL, &timeout);
+  }
+  else
+    return SOAP_OK;
+  if (r > 0)
+  {
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+    {
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || SSL_peek(soap->ssl, soap->tmpbuf, 1) > 0))
+        return SOAP_OK;
+    }
+    else
+#endif
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) > 0))
+        return SOAP_OK;
+  }
+  else if (r < 0)
+  { soap->errnum = soap_socket_errno;
+    if ((soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) && soap_socket_errno != SOAP_EINTR)
+    { soap_set_receiver_error(soap, tcp_error(soap), "select failed in soap_poll()", SOAP_TCP_ERROR);
+      return soap->error = SOAP_TCP_ERROR;
+    }
+  }
+  else
+    soap->errnum = 0;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Polling: other end down on socket=%d select=%d\n", soap->socket, r));
+  return SOAP_EOF;
+#else
+  return SOAP_OK;
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_accept(struct soap *soap, int s, struct sockaddr *a, int *n)
+{ int fd;
+  fd = (int)accept((SOAP_SOCKET)s, a, (SOAP_SOCKLEN_T*)n);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, FD_CLOEXEC);
+#endif
+#endif
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_accept(struct soap *soap)
+{ int n = (int)sizeof(soap->peer);
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  soap->error = SOAP_OK;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    return soap->socket = soap->master;
+#endif
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 0;
+  soap->keep_alive = 0;
+  if (soap_valid_socket(soap->master))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->accept_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->accept_timeout > 0)
+        { timeout.tv_sec = soap->accept_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->accept_timeout/1000000;
+          timeout.tv_usec = -soap->accept_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->master, &fd);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(soap->master + 1), &fd, &fd, NULL, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            soap_set_receiver_error(soap, "Timeout", "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            soap_closesock(soap);
+            soap_set_sender_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+#if defined(WIN32)
+	{ u_long nonblocking = 1;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &nonblocking);
+        }
+#elif defined(VXWORKS)
+        { u_long nonblocking = 1;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&nonblocking));
+        }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)|O_NONBLOCK);
+#endif
+      }
+      else
+#if defined(WIN32)
+      { u_long blocking = 0;
+        ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+      }
+#elif defined(VXWORKS)
+      { u_long blocking = 0;
+        ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+      }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+      soap->socket = soap->faccept(soap, soap->master, (struct sockaddr*)&soap->peer, &n);
+      soap->peerlen = (size_t)n;
+      if (soap_valid_socket(soap->socket))
+      {
+#ifdef WITH_IPV6
+/* Use soap->host to store the numeric form of the remote host */
+        getnameinfo((struct sockaddr*)&soap->peer, n, soap->host, sizeof(soap->host), NULL, 0, NI_NUMERICHOST | NI_NUMERICSERV); 
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d from %s\n", soap->socket, soap->host));
+        soap->ip = 0; /* info stored in soap->peer and soap->host */
+        soap->port = 0; /* info stored in soap->peer and soap->host */
+#else
+        soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+        soap->port = (int)ntohs(soap->peer.sin_port); /* does not return port number on some systems */
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d at port %d from IP %d.%d.%d.%d\n", soap->socket, soap->port, (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF));
+#endif
+#ifndef WITH_LEAN
+	if (soap->accept_flags & SO_LINGER)
+        { struct linger linger;
+          memset((void*)&linger, 0, sizeof(linger));
+          linger.l_onoff = 1;
+          linger.l_linger = 0;
+	  if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+          { soap->errnum = soap_socket_errno;
+	    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in soap_accept()", SOAP_TCP_ERROR);
+	    soap_closesock(soap);
+            return SOAP_INVALID_SOCKET;
+	  }
+        }
+        if ((soap->accept_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, soap->accept_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#ifdef TCP_NODELAY
+        if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->socket, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#endif
+#endif
+        if (soap->accept_timeout)
+        {
+#if defined(WIN32)
+          u_long blocking = 0;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+          ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+#elif defined(VXWORKS)
+          u_long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+          ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)(&blocking));
+#elif defined(PALM)
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL,0)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL,0)&~O_NONBLOCK);
+#elif defined(SYMBIAN)
+          long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, 0/*FIONBIO*/, &blocking);
+#else
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+	}
+        soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+        return soap->socket;
+      }
+      if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept failed from %s\n", soap->host));
+        soap->errnum = soap_socket_errno;
+        soap_set_receiver_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+	soap_closesock(soap);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+  }
+  else
+  { soap->errnum = 0;
+    soap_set_receiver_error(soap, tcp_error(soap), "no master socket in soap_accept()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_disconnect(struct soap *soap)
+{
+#ifdef WITH_OPENSSL
+  if (soap->ssl)
+  { int r, s = 0;
+    if (soap->session)
+      SSL_SESSION_free(soap->session);
+    if (*soap->host)
+    { soap->session = SSL_get1_session(soap->ssl);
+      if (soap->session)
+      { strcpy(soap->session_host, soap->host);
+        soap->session_port = soap->port;
+      }
+    }
+    r = SSL_shutdown(soap->ssl);
+    if (r != 1)
+    { s = ERR_get_error();
+      if (s)
+      { if (soap_valid_socket(soap->socket))
+        { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1);
+          soap->socket = SOAP_INVALID_SOCKET;
+        }
+        r = SSL_shutdown(soap->ssl);
+      }
+    }
+    DBGLOG(TEST, if (s) SOAP_MESSAGE(fdebug, "Shutdown failed: %d\n", SSL_get_error(soap->ssl, r)));
+    SSL_free(soap->ssl);
+    soap->ssl = NULL;
+    if (s)
+      return SOAP_SSL_ERROR;
+    ERR_remove_state(0);
+  }
+#endif
+  if (soap_valid_socket(soap->socket) && !(soap->omode & SOAP_IO_UDP))
+  { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 2);
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+    soap->socket = SOAP_INVALID_SOCKET;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_closesocket(struct soap *soap, SOAP_SOCKET fd)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Close socket %d\n", (int)fd));
+  return closesocket(fd);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_shutdownsocket(struct soap *soap, SOAP_SOCKET fd, int how)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Shutdown socket %d how=%d\n", (int)fd, how));
+  return shutdown(fd, how);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_closesock(struct soap *soap)
+{ register int status = soap->error;
+  if (status == SOAP_EOF || status == SOAP_TCP_ERROR || status == SOAP_SSL_ERROR || !soap->keep_alive)
+  { if (soap->fclose && (soap->error = soap->fclose(soap)))
+      return soap->error;
+    soap->keep_alive = 0;
+  }
+#ifdef WITH_ZLIB
+  if (soap->zlib_state == SOAP_ZLIB_DEFLATE)
+    deflateEnd(&soap->d_stream);
+  else if (soap->zlib_state == SOAP_ZLIB_INFLATE)
+    inflateEnd(&soap->d_stream);
+  soap->zlib_state = SOAP_ZLIB_NONE;
+#endif
+  return soap->error = status;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_hash(register const char *s)
+{ register size_t h = 0;
+  while (*s)
+    h = 65599*h + *s++;
+  return h % SOAP_IDHASH;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_pht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing pointer hashtable\n"));
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new1(soap_mode mode)
+{ return soap_new2(mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new()
+{ return soap_new2(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new2(soap_mode imode, soap_mode omode)
+{ struct soap *soap = (struct soap*)malloc(sizeof(struct soap));
+  if (soap)
+    soap_init2(soap, imode, omode);
+  return soap;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_del(struct soap *soap)
+{ free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_pht(struct soap *soap)
+{ register struct soap_pblk *pb, *next;
+  register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free pointer hashtable\n"));
+  for (pb = soap->pblk; pb; pb = next)
+  { next = pb->next;
+    SOAP_FREE(soap, pb);
+  }
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type)
+{ register int i;
+  struct soap_plist *pp;
+  if (soap->version != 1)
+    soap->encoding = 1;
+  if (a)
+    i = soap_array_pointer_lookup(soap, p, a, n, type, &pp);
+  else
+    i = soap_pointer_lookup(soap, p, type, &pp);
+  if (i)
+  { if (soap_is_embedded(soap, pp)
+     || soap_is_single(soap, pp))
+      return 0;
+    soap_set_embedded(soap, pp);
+  }
+  return i;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_lookup(struct soap *soap, const void *p, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (p)
+  { for (pp = soap->pht[soap_hash_ptr(p)]; pp; pp = pp->next)
+    { if (pp->ptr == p && pp->type == type)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d id=%d\n", p, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d: not found\n", p, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_enter(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register int h;
+  register struct soap_plist *pp;
+  if (!soap->pblk || soap->pidx >= SOAP_PTRBLK)
+  { register struct soap_pblk *pb = (struct soap_pblk*)SOAP_MALLOC(soap, sizeof(struct soap_pblk));
+    if (!pb)
+    { soap->error = SOAP_EOM;
+      return 0;
+    }
+    pb->next = soap->pblk;
+    soap->pblk = pb;
+    soap->pidx = 0;
+  }
+  *ppp = pp = &soap->pblk->plist[soap->pidx++];
+  if (a)
+    h = soap_hash_ptr(a->__ptr);
+  else
+    h = soap_hash_ptr(p);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pointer enter location=%p array=%p size=%d dim=%d type=%d id=%d\n", p, a?a->__ptr:NULL, a?a->__size:0, n, type, soap->idnum+1));
+  pp->next = soap->pht[h];
+  pp->type = type;
+  pp->mark1 = 0;
+  pp->mark2 = 0;
+  pp->ptr = p;
+  pp->array = a;
+  soap->pht[h] = pp;
+  pp->id = ++soap->idnum;
+  return pp->id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_pointer_lookup(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (!p || !a->__ptr)
+    return 0;
+  for (pp = soap->pht[soap_hash_ptr(a->__ptr)]; pp; pp = pp->next)
+  { if (pp->type == type && pp->array && pp->array->__ptr == a->__ptr)
+    { register int i;
+      for (i = 0; i < n; i++)
+        if (((const int*)&pp->array->__size)[i] != ((const int*)&a->__size)[i])
+	  break;
+      if (i == n)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d id=%d\n", a->__ptr, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d: not found\n", a->__ptr, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_count(struct soap *soap)
+{ soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) || (soap->omode & SOAP_ENC_DIME))
+    soap->mode = soap->omode | SOAP_IO_LENGTH | SOAP_ENC_DIME;
+  else
+#endif
+  { soap->mode = soap->omode;
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE
+     || (((soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_ENC_XML))
+#ifndef WITH_LEANER
+      && !soap->fpreparesend
+#endif
+      ))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    else
+      soap->mode |= SOAP_IO_LENGTH;
+  }
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (!(soap->mode & SOAP_ENC_DIME))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+    soap->mode |= SOAP_ENC_MIME;
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+  soap->dime.list = soap->dime.last;	/* keep track of last DIME attachment */
+#endif
+  soap->count = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->part = SOAP_BEGIN;
+  soap->idnum = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin count phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+#ifndef WITH_LEANER
+  soap->dime.count = 0; /* count # of attachments */
+  soap->dime.size = 0; /* accumulate total size of attachments */
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+    return soap->error = soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_count(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->fpreparefinal)
+    return soap->error = soap->fpreparefinal(soap);
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of count phase\n"));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_send(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+  soap->mode = soap->omode | (soap->mode & (SOAP_IO_LENGTH | SOAP_ENC_DIME));
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+#ifdef WITH_UDP
+  if ((soap->mode & SOAP_IO_UDP))
+  { soap->mode |= SOAP_ENC_XML;
+    if (soap->count > SOAP_BUFLEN)
+      return soap->error = SOAP_UDP_ERROR;
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_FLUSH && soap_valid_socket(soap->socket))
+  { if (soap->count || (soap->mode & SOAP_IO_LENGTH) || (soap->mode & SOAP_ENC_XML))
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+  soap->mode &= ~SOAP_IO_LENGTH;
+  if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap_new_block(soap);
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+  { soap->mode |= SOAP_ENC_MIME;
+    soap->mode &= ~SOAP_ENC_DIME;
+  }
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket)) /* Set win32 stdout or soap->sendfd to BINARY, e.g. to support DIME */
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->sendfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->sendfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#endif
+  if (soap->mode & SOAP_IO)
+  { soap->bufidx = 0;
+    soap->buflen = 0;
+  }
+  soap->chunksize = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+#ifdef WITH_ZLIB
+  soap->z_ratio_out = 1.0;
+  if ((soap->mode & SOAP_ENC_ZLIB) && soap->zlib_state != SOAP_ZLIB_DEFLATE)
+  {
+#ifdef WITH_GZIP
+    memcpy(soap->z_buf, "\37\213\10\0\0\0\0\0\0\377", 10);
+    soap->d_stream.next_out = (Byte*)soap->z_buf + 10;
+    soap->d_stream.avail_out = SOAP_BUFLEN - 10;
+    soap->z_crc = crc32(0L, NULL, 0);
+    if (deflateInit2(&soap->d_stream, soap->z_level, Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY) != Z_OK)
+#else
+    soap->d_stream.next_out = (Byte*)soap->z_buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    if (deflateInit(&soap->d_stream, soap->z_level) != Z_OK)
+#endif
+      return soap->error = SOAP_ZLIB_ERROR;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflate initialized\n"));
+    soap->zlib_state = SOAP_ZLIB_DEFLATE;
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin send phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+  soap->part = SOAP_BEGIN;
+#ifndef WITH_LEANER
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_embedded(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { pp->mark1 = 1;
+    pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded %p type=%d mark set to 1\n", p, t));
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_reference(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (!p || (soap->mode & SOAP_XML_TREE))
+    return 1;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (soap_pointer_enter(soap, p, NULL, 0, t, &pp))
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  else
+    return 1;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reference %p type=%d (%d %d)\n", p, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_reference(struct soap *soap, const void *p, const struct soap_array *a, int n, int t)
+{ register int i;
+  struct soap_plist *pp;
+  if (!p || !a->__ptr)
+    return 1;
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (i)
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (!soap_pointer_enter(soap, p, a, n, t, &pp))
+    return 1;
+  else
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array reference %p ptr=%p dim=%d type=%d (%d %d)\n", p, a->__ptr, n, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embedded_id(struct soap *soap, int id, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap->mode & SOAP_XML_TREE)
+    return id;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id %p type=%d id=%d\n", p, t, id));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (id < 0)
+    { id = soap_pointer_lookup(soap, p, t, &pp);
+      if (id)
+      { if (soap->mode & SOAP_IO_LENGTH)
+          pp->mark1 = 2;
+        else
+          pp->mark2 = 2;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id multiref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+      }
+      return -1;
+    }
+    return id;
+  }
+  if (id < 0)
+    id = soap_pointer_lookup(soap, p, t, &pp);
+  else if (id && !soap_pointer_lookup(soap, p, t, &pp))
+    return 0;
+  if (id && pp)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      pp->mark1 = 1;
+    else
+      pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id embedded ref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+  }
+  return id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Is embedded? %d %d\n", (int)pp->mark1, (int)pp->mark2));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      return pp->mark1 != 0;
+    return pp->mark2 != 0;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 1;
+  return pp->mark2 == 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_single(struct soap *soap, struct soap_plist *pp)
+{ if (soap->part == SOAP_IN_HEADER)
+    return 1;
+  if (!pp)
+    return 0;
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 0;
+  return pp->mark2 == 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return;
+  if (soap->mode & SOAP_IO_LENGTH)
+    pp->mark1 = 1;
+  else
+    pp->mark2 = 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attachment(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, const char *aid, const char *atype, const char *aoptions, int n, const char *type, int t) 
+{ struct soap_plist *pp;
+  int i;
+  if (!p || !a->__ptr || (!aid && !atype))
+    return soap_element_id(soap, tag, id, p, a, n, type, t);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Attachment tag='%s' id='%s' (%d) type='%s'\n", tag, aid?aid:"", id, atype?atype:""));
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (!i)
+  { i = soap_pointer_enter(soap, p, a, n, t, &pp);
+    if (!i)
+    { soap->error = SOAP_EOM;
+      return -1;
+    }
+  }
+  if (id <= 0)
+    id = i;
+  if (!aid)
+  { sprintf(soap->tmpbuf, soap->dime_id_format, id);
+    aid = soap_strdup(soap, soap->tmpbuf);
+  }
+  /* Add MTOM xop:Include element when necessary */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  if ((soap->mode & SOAP_ENC_MTOM) && strcmp(tag, "xop:Include"))
+  { if (soap_element_begin_out(soap, tag, 0, type)
+     || soap_element_href(soap, "xop:Include", 0, "href", aid)
+     || soap_element_end_out(soap, tag))
+      return soap->error;
+  }
+  else if (soap_element_href(soap, tag, 0, "href", aid))
+    return soap->error;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { if (pp->mark1 != 3)
+    { struct soap_multipart *content;
+      if (soap->mode & SOAP_ENC_MTOM)
+        content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, (char*)a->__ptr, a->__size);
+      else
+        content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, (char*)a->__ptr, a->__size);
+      if (!content)
+      { soap->error = SOAP_EOM;
+        return -1;
+      }
+      if (!strncmp(aid, "cid:", 4)) /* RFC 2111 */
+      { if (soap->mode & SOAP_ENC_MTOM)
+        { char *s = (char*)soap_malloc(soap, strlen(aid) - 1);
+	  if (s)
+	  { *s = '<';
+	    strcpy(s + 1, aid + 4);
+	    strcat(s, ">");
+	    content->id = s;
+          }
+        }
+        else
+          content->id = aid + 4;
+      }
+      else
+        content->id = aid;
+      content->type = atype;
+      content->options = aoptions;
+      content->encoding = SOAP_MIME_BINARY;
+      pp->mark1 = 3;
+    }
+  }
+  else
+    pp->mark2 = 3;
+  return -1;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_iht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+    soap->iht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_iht(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip, *p;
+  register struct soap_flist *fp, *fq;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = p)
+    { for (fp = ip->flist; fp; fp = fq)
+      { fq = fp->next;
+        SOAP_FREE(soap, fp);
+      }
+      p = ip->next;
+      SOAP_FREE(soap, ip);
+    }
+    soap->iht[i] = NULL;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_lookup(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  for (ip = soap->iht[soap_hash(id)]; ip; ip = ip->next)
+    if (!strcmp(ip->id, id))
+      return ip;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_enter(struct soap *soap, const char *id)
+{ register size_t h;
+  register struct soap_ilist *ip;
+  ip = (struct soap_ilist*)SOAP_MALLOC(soap, sizeof(struct soap_ilist) + strlen(id));
+  if (ip)
+  { h = soap_hash(id);
+    strcpy(ip->id, id);
+    ip->next = soap->iht[h];
+    soap->iht[h] = ip;
+    return ip;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_malloc(struct soap *soap, size_t n)
+{ register char *p;
+  if (!n)
+    return (void*)SOAP_NON_NULL;
+  if (!soap)
+    return SOAP_MALLOC(soap, n);
+  n += (-(long)n) & (sizeof(void*)-1); /* align at 4-, 8- or 16-byte boundary */
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(void*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  /* keep chain of alloced cells for later destruction */
+  soap->alloced = 1;
+  *(void**)(p + n) = soap->alist;
+  *(size_t*)(p + n + sizeof(void*)) = n;
+  soap->alist = p + n;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_mht(struct soap *soap)
+{ register int i;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->mht[i] = NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_free_mht(struct soap *soap)
+{ register int i;
+  register struct soap_mlist *mp, *mq;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+  { for (mp = soap->mht[i]; mp; mp = mq)
+    { mq = mp->next;
+      if (mp->live)
+        fprintf(stderr, "%s(%d): malloc() = %p not freed (memory leak or forgot to call soap_end()?)\n", mp->file, mp->line, mp->ptr);
+      free(mp);
+    }
+    soap->mht[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_track_malloc(struct soap *soap, const char *file, int line, size_t size)
+{ register void *p = malloc(size);
+  if (soap)
+  { register int h = soap_hash_ptr(p);
+    register struct soap_mlist *mp = (struct soap_mlist*)malloc(sizeof(struct soap_mlist));
+    if (soap->fdebug[SOAP_INDEX_TEST])
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): malloc(%lu) = %p\n", file, line, (unsigned long)size, p));
+    mp->next = soap->mht[h];
+    mp->ptr = p;
+    mp->file = file;
+    mp->line = line;
+    mp->live = 1;
+    soap->mht[h] = mp;
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_track_free(struct soap *soap, const char *file, int line, void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+  { if (mp->live)
+    { free(p);
+      if (soap->fdebug[SOAP_INDEX_TEST])
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): free(%p)\n", file, line, p));
+      mp->live = 0;
+    }
+    else
+      fprintf(stderr, "%s(%d): free(%p) double free of pointer malloced at %s(%d)\n", file, line, p, mp->file, mp->line);
+  }
+  else
+    fprintf(stderr, "%s(%d): free(%p) pointer not malloced\n", file, line, p);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_track_unlink(struct soap *soap, const void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+    mp->live = 0;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_dealloc(struct soap *soap, void *p)
+{ if (!soap)
+    return;
+  if (p)
+  { register char **q;
+    for (q = (char**)&soap->alist; *q; q = *(char***)q)
+    { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+      { *q = **(char***)q;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Freed data at %p\n", p));
+        SOAP_FREE(soap, p);
+        return;
+      }
+    }
+    soap_delete(soap, p);
+  }
+  else
+  { register char *q;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free all soap_malloc() data\n"));
+    while (soap->alist)
+    { q = (char*)soap->alist;
+      soap->alist = *(void**)q;
+      q -= *(size_t*)(q + sizeof(void*));
+      SOAP_FREE(soap, q);
+    }
+  }
+  /* we must assume these were deallocated: */
+  soap->action = NULL;
+  soap->fault = NULL;
+  soap->header = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->authrealm = NULL;
+#ifndef WITH_LEANER
+  soap_clr_mime(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_delete(struct soap *soap, void *p)
+{ register struct soap_clist **cp;
+  if (soap_check_state(soap))
+    return;
+  cp = &soap->clist;
+  if (p)
+  { while (*cp)
+    { if (p == (*cp)->ptr)
+      { register struct soap_clist *q = *cp;
+        *cp = q->next;
+        q->fdelete(q);
+        SOAP_FREE(soap, q);
+        return;
+      }
+      cp = &(*cp)->next;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: address not in list\n", p));
+  }
+  else
+  { while (*cp)
+    { register struct soap_clist *q = *cp;
+      *cp = q->next;
+      if (q->ptr == (void*)soap->fault)
+        soap->fault = NULL; /* this was deallocated */
+      else if (q->ptr == (void*)soap->header)
+        soap->header = NULL; /* this was deallocated */
+      q->fdelete(q);
+      SOAP_FREE(soap, q);
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_clist *
+SOAP_FMAC2
+soap_link(struct soap *soap, void *p, int t, int n, void (*fdelete)(struct soap_clist*))
+{ register struct soap_clist *cp;
+  if ((cp = (struct soap_clist*)SOAP_MALLOC(soap, sizeof(struct soap_clist))))
+  { cp->next = soap->clist;
+    cp->type = t;
+    cp->size = n; 
+    cp->ptr = p;
+    cp->fdelete = fdelete;
+    soap->clist = cp;
+  }
+  return cp;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_unlink(struct soap *soap, const void *p)
+{ register char **q;
+  register struct soap_clist **cp;
+  if (!soap || !p)
+    return;
+  for (q = (char**)&soap->alist; *q; q = *(char***)q)
+  { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+    { *q = **(char***)q;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked data %p\n", p));
+#ifdef SOAP_DEBUG
+      soap_track_unlink(soap, p);
+#endif
+      return;
+    }
+  }
+  for (cp = &soap->clist; *cp; cp = &(*cp)->next)
+  { if (p == (*cp)->ptr)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked class instance %p\n", p));
+      q = (char**)*cp;
+      *cp = (*cp)->next;
+      SOAP_FREE(soap, q);
+      return;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_lookup_type(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  if (id && *id)
+  { ip = soap_lookup(soap, id);
+    if (ip)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup id='%s' type=%d\n", id, ip->type));
+      return ip->type;
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "lookup type id='%s' NOT FOUND! Need to get it from xsi:type\n", id));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, unsigned int k)
+{ struct soap_ilist *ip;
+  void **q;
+  if (!p || !id || !*id)
+    return p;
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding first href='%s' type=%d %p (%u bytes)\n", id, t, p, (unsigned int)n));
+    ip->type = t;
+    ip->size = n; 
+    ip->link = p;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->ptr = NULL;
+    ip->level = k;
+    *p = NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolved href='%s' type=%d location=%p (%u bytes)\n", id, t, ip->ptr, (unsigned int)n));
+    if (ip->type != t)
+    { strcpy(soap->id, id);
+      soap->error = SOAP_HREF;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility: id type=%d href type=%d\n", ip->type, t));
+      return NULL;
+    }
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      if (!q)
+        return NULL;
+      *p = (void*)q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    *p = ip->ptr;
+  }
+  else if (ip->level > k)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving level %u pointers to href='%s'\n", ip->level, id));
+    while (ip->level > k)
+    { void *s, **r = &ip->link;
+      q = (void**)ip->link;
+      while (q)
+      { *r = (void*)soap_malloc(soap, sizeof(void*));
+        s = *q;
+        *q = *r;
+        r = (void**)*r;
+        q = (void**)s;
+      }
+      *r = NULL;
+      ip->size = n; 
+      ip->copy = NULL;
+      ip->level = ip->level - 1;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarded href='%s' type=%d location=%p (%u bytes)\n", id, t, p, (unsigned int)n));
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      *p = q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_forward(struct soap *soap, const char *href, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t))
+{ struct soap_ilist *ip;
+  if (!p || !href || !*href)
+    return p;
+  ip = soap_lookup(soap, href); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, href); /* new hash table entry for string id */
+    ip->type = st;
+    ip->size = n;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->ptr = NULL;
+    ip->level = 0;
+    ip->flist = NULL;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry href='%s' type=%d size=%lu level=%d location=%p\n", href, st, (unsigned long)n, k, p));
+  }
+  else if (ip->type != st || (ip->level == k && ip->size != n))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", href, ip->type, (unsigned long)ip->size, k, st, (unsigned long)n));
+    strcpy(soap->id, href);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  if (fcopy || n < sizeof(void*) || *href != '#')
+  { register struct soap_flist *fp = (struct soap_flist*)SOAP_MALLOC(soap, sizeof(struct soap_flist));
+    if (!fp)
+    { soap->error = SOAP_EOM;
+      return NULL;
+    }
+    fp->next = ip->flist;
+    fp->type = tt;
+    fp->ptr = p;
+    fp->level = k;
+    fp->len = len;
+    if (fcopy)
+      fp->fcopy = fcopy;
+    else
+      fp->fcopy = soap_fcopy;
+    ip->flist = fp;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding type=%d (target type=%d) size=%lu location=%p level=%u len=%lu href='%s'\n", st, tt, (unsigned long)n, p, k, (unsigned long)len, href));
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding copying address %p for type=%d href='%s'\n", p, st, href));
+    *(void**)p = ip->copy;
+    ip->copy = p;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*))
+{
+#ifndef WITH_NOIDREF
+  struct soap_ilist *ip;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Enter id='%s' type=%d loc=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  soap->alloced = 0;
+  if (!p)
+  { if (finstantiate)
+      p = finstantiate(soap, t, type, arrayType, &n);
+    else
+      p = soap_malloc(soap, n);
+    if (p)
+      soap->alloced = 1;
+  }
+#ifndef WITH_NOIDREF
+  if (!id || !*id)
+#endif
+    return p;
+#ifndef WITH_NOIDREF
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Lookup entry id='%s for location=%p'\n", id, p));
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    ip->type = t;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry id='%s' type=%d size=%lu level=%u location=%p\n", id, t, (unsigned long)n, k, p));
+  }
+  else if ((ip->type != t || (ip->level == k && ip->size != n)) && (ip->copy || ip->flist))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", id, ip->type, (unsigned long)ip->size, k, t, (unsigned long)n));
+    strcpy(soap->id, id);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Multiply defined id='%s'\n", id));
+    strcpy(soap->id, id);
+    soap->error = SOAP_DUPLICATE_ID;
+    return NULL;
+  }
+  else 
+  { ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update entry id='%s' type=%d location=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  }
+  return ip->ptr;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{ DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Copying data type=%d (target type=%d) %p -> %p (%lu bytes)\n", st, tt, q, p, (unsigned long)n));
+  memcpy(p, q, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_send(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->dime.list)
+  { /* SOAP body referenced attachments must appear first */
+    soap->dime.last->next = soap->dime.first;
+    soap->dime.first = soap->dime.list->next;
+    soap->dime.list->next = NULL;
+    soap->dime.last = soap->dime.list;
+  }
+  if (soap_putdime(soap) || soap_putmime(soap))
+    return soap->error;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End send\n"));
+  if (soap->mode & SOAP_IO) /* need to flush the remaining data in buffer */
+  { if (soap_flush(soap))
+#ifdef WITH_ZLIB
+    { if (soap->mode & SOAP_ENC_ZLIB && soap->zlib_state == SOAP_ZLIB_DEFLATE)
+      { soap->zlib_state = SOAP_ZLIB_NONE;
+        deflateEnd(&soap->d_stream);
+      }
+      return soap->error;
+    }
+#else
+      return soap->error;
+#endif
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { int r;
+      soap->d_stream.avail_in = 0;
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating remainder\n"));
+        r = deflate(&soap->d_stream, Z_FINISH);
+        if (soap->d_stream.avail_out != SOAP_BUFLEN)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN - soap->d_stream.avail_out))
+          { soap->zlib_state = SOAP_ZLIB_NONE;
+            deflateEnd(&soap->d_stream);
+            return soap->error;
+	  }
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (r == Z_OK);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+      soap->z_ratio_out = (float)soap->d_stream.total_out / (float)soap->d_stream.total_in;
+      soap->mode &= ~SOAP_ENC_ZLIB;
+      soap->zlib_state = SOAP_ZLIB_NONE;
+      if (deflateEnd(&soap->d_stream) != Z_OK || r != Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to end deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+#ifdef WITH_GZIP
+      soap->z_buf[0] = soap->z_crc & 0xFF;
+      soap->z_buf[1] = (soap->z_crc >> 8) & 0xFF;
+      soap->z_buf[2] = (soap->z_crc >> 16) & 0xFF;
+      soap->z_buf[3] = (soap->z_crc >> 24) & 0xFF;
+      soap->z_buf[4] = soap->d_stream.total_in & 0xFF;
+      soap->z_buf[5] = (soap->d_stream.total_in >> 8) & 0xFF;
+      soap->z_buf[6] = (soap->d_stream.total_in >> 16) & 0xFF;
+      soap->z_buf[7] = (soap->d_stream.total_in >> 24) & 0xFF;
+      if (soap_flush_raw(soap, soap->z_buf, 8))
+        return soap->error;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip crc32=%lu\n", (unsigned long)soap->z_crc));
+#endif
+    }
+#endif
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    { char *p;
+#ifndef WITH_NOHTTP
+      if (!(soap->mode & SOAP_ENC_XML))
+      { soap->mode--;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending buffered message of length %u\n", (unsigned int)soap->blist->size));
+        if (soap->status >= SOAP_POST)
+          soap->error = soap->fpost(soap, soap->endpoint, soap->host, soap->port, soap->path, soap->action, soap->blist->size);
+        else if (soap->status != SOAP_STOP)
+          soap->error = soap->fresponse(soap, soap->status, soap->blist->size);
+        if (soap->error || soap_flush(soap))
+          return soap->error;
+        soap->mode++;
+      }
+#endif
+      for (p = soap_first_block(soap); p; p = soap_next_block(soap))
+      { DBGMSG(SENT, p, soap_block_size(soap));
+        if ((soap->error = soap->fsend(soap, p, soap_block_size(soap))))
+        { soap_end_block(soap);
+          return soap->error;
+        }
+      }
+      soap_end_block(soap);
+    }
+#ifndef WITH_LEANER
+    else if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { DBGMSG(SENT, "\r\n0\r\n\r\n", 7);
+      if ((soap->error = soap->fsend(soap, "\r\n0\r\n\r\n", 7)))
+        return soap->error;
+    }
+#endif
+  }
+#ifdef WITH_TCPFIN
+#ifdef WITH_OPENSSL
+  if (!soap->ssl && soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#else
+  if (soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#endif
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of send phase\n"));
+  soap->omode &= ~SOAP_XML_SEC;
+  soap->count = 0;
+  soap->part = SOAP_END;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_recv(struct soap *soap)
+{ soap->part = SOAP_END;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) && soap_getdime(soap))
+    return soap->error;
+  soap->dime.list = soap->dime.first;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  if ((soap->mode & SOAP_ENC_MIME) && soap_getmime(soap))
+    return soap->error;
+  soap->mime.list = soap->mime.first;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "End of receive message ok\n"));
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { soap->mode &= ~SOAP_ENC_ZLIB;
+    memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+    soap->bufidx = (char*)soap->d_stream.next_in - soap->z_buf;
+    soap->buflen = soap->z_buflen;
+    soap->zlib_state = SOAP_ZLIB_NONE;
+    if (inflateEnd(&soap->d_stream) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+#ifdef WITH_GZIP
+    if (soap->zlib_in == SOAP_ZLIB_GZIP)
+    { soap_wchar c;
+      short i;
+      for (i = 0; i < 8; i++)
+      { if ((int)(c = soap_getchar(soap)) == EOF)
+          return soap->error = SOAP_EOF;
+        soap->z_buf[i] = (char)c;
+      }
+      if (soap->z_crc != ((uLong)(unsigned char)soap->z_buf[0] | ((uLong)(unsigned char)soap->z_buf[1] << 8) | ((uLong)(unsigned char)soap->z_buf[2] << 16) | ((uLong)(unsigned char)soap->z_buf[3] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: crc check failed, message corrupted? (crc32=%lu)\n", (unsigned long)soap->z_crc));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+      if (soap->d_stream.total_out != ((uLong)(unsigned char)soap->z_buf[4] | ((uLong)(unsigned char)soap->z_buf[5] << 8) | ((uLong)(unsigned char)soap->z_buf[6] << 16) | ((uLong)(unsigned char)soap->z_buf[7] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: incorrect message length\n"));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+    }
+#endif
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    while ((int)soap_getchar(soap) != EOF) /* advance to last chunk */
+      ;
+  if (soap->fdisconnect && (soap->error = soap->fdisconnect(soap)))
+    return soap->error;
+#ifndef WITH_NOIDREF
+  return soap_resolve(soap);
+#else
+#ifndef WITH_LEANER
+  if (soap->xlist)
+  { if (soap->mode & SOAP_ENC_MTOM)
+      return soap->error = SOAP_MIME_HREF;
+    return soap->error = SOAP_DIME_HREF;
+  }
+#endif
+  return SOAP_OK;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free(struct soap *soap)
+{ register struct Namespace *ns;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free namespace stack\n"));
+  while (soap->nlist)
+  { register struct soap_nlist *np = soap->nlist->next;
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free any remaining temp blocks\n"));
+  while (soap->blist)
+    soap_end_block(soap);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute storage\n"));
+  while (soap->attributes)
+  { register struct soap_attribute *tp = soap->attributes->next;
+    if (soap->attributes->value)
+      SOAP_FREE(soap, soap->attributes->value);
+    SOAP_FREE(soap, soap->attributes);
+    soap->attributes = tp;
+  }
+#ifdef WITH_FAST
+  if (soap->labbuf)
+    SOAP_FREE(soap, soap->labbuf);
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  ns = soap->local_namespaces;
+  if (ns)
+  { for (; ns->id; ns++)
+    { if (ns->out)
+      { if (soap->encodingStyle == ns->out)
+          soap->encodingStyle = SOAP_STR_EOS;
+        SOAP_FREE(soap, ns->out);
+        ns->out = NULL;
+      }
+      if (soap->encodingStyle == ns->ns)
+        soap->encodingStyle = SOAP_STR_EOS;
+    }
+    SOAP_FREE(soap, soap->local_namespaces);
+    soap->local_namespaces = NULL;
+  }
+#ifndef WITH_LEANER
+  while (soap->xlist)
+  { struct soap_xlist *xp = soap->xlist->next;
+    SOAP_FREE(soap, soap->xlist);
+    soap->xlist = xp;
+  }
+#endif
+#ifndef WITH_NOIDREF
+  soap_free_pht(soap);
+  soap_free_iht(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_logs(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { soap->logfile[i] = NULL;
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEAN) || defined(SOAP_DEBUG)
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_open_logfile(struct soap *soap, int i)
+{ if (soap->logfile[i])
+    soap->fdebug[i] = fopen(soap->logfile[i], i < 2 ? "ab" : "a");
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_close_logfile(struct soap *soap, int i)
+{ if (soap->fdebug[i])
+  { fclose(soap->fdebug[i]);
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_close_logfiles(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+    soap_close_logfile(soap, i);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_set_logfile(struct soap *soap, int i, const char *logfile)
+{ char *s = NULL;
+  soap_close_logfile(soap, i);
+  if (soap->logfile[i])
+    SOAP_FREE(soap, (void*)soap->logfile[i]);
+  if (logfile)
+    if ((s = (char*)SOAP_MALLOC(soap, strlen(logfile) + 1)))
+      strcpy(s, logfile);
+  soap->logfile[i] = s;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_recv_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_RECV, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_sent_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_SENT, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_test_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_TEST, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy(struct soap *soap)
+{ return soap_copy_context((struct soap*)malloc(sizeof(struct soap)), soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy_context(struct soap *copy, struct soap *soap)
+{ if (soap_check_state(soap))
+    return NULL;
+  if (copy)
+  { register struct soap_plugin *p;
+    memcpy(copy, soap, sizeof(struct soap));
+    copy->state = SOAP_COPY;
+    copy->user = NULL;
+    copy->error = SOAP_OK;
+    copy->userid = NULL;
+    copy->passwd = NULL;
+    copy->nlist = NULL;
+    copy->blist = NULL;
+    copy->clist = NULL;
+    copy->alist = NULL;
+    copy->attributes = NULL;
+#ifdef WITH_FAST
+    copy->labbuf = NULL;
+    copy->lablen = 0;
+    copy->labidx = 0;
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_mht(copy);
+#endif
+    copy->local_namespaces = NULL;
+#ifndef WITH_NOIDREF
+    soap_init_iht(copy);
+    soap_init_pht(copy);
+#endif
+    copy->header = NULL;
+    copy->fault = NULL;
+    copy->action = NULL;
+#ifndef WITH_LEAN
+#ifdef WITH_COOKIES
+    copy->cookies = soap_copy_cookies(copy);
+#else
+    copy->cookies = NULL;
+#endif
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_logs(copy);
+    soap_set_recv_logfile(copy, soap->logfile[SOAP_INDEX_RECV]);
+    soap_set_sent_logfile(copy, soap->logfile[SOAP_INDEX_SENT]);
+    soap_set_test_logfile(copy, soap->logfile[SOAP_INDEX_TEST]);
+#endif
+    copy->plugins = NULL;
+    for (p = soap->plugins; p; p = p->next)
+    { register struct soap_plugin *q = (struct soap_plugin*)SOAP_MALLOC(copy, sizeof(struct soap_plugin));
+      if (!q)
+        return NULL;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying plugin '%s'\n", p->id));
+      *q = *p;
+      if (p->fcopy && (soap->error = p->fcopy(copy, q, p)))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not copy plugin '%s'\n", p->id));
+        SOAP_FREE(copy, q);
+        return NULL;
+      }
+      q->next = copy->plugins;
+      copy->plugins = q;
+    }
+  }
+  else
+    soap->error = SOAP_EOM;
+  return copy;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init(struct soap *soap)
+{ soap->state = SOAP_INIT;
+  soap->version = 0;
+  soap_imode(soap, SOAP_IO_DEFAULT);
+  soap_omode(soap, SOAP_IO_DEFAULT);
+  soap->plugins = NULL;
+  soap->user = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+  soap->fconnect = NULL;
+  soap->fdisconnect = NULL;
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+  soap->fplugin = fplugin;
+#ifndef WITH_LEANER
+  soap->fdimereadopen = NULL;
+  soap->fdimewriteopen = NULL;
+  soap->fdimereadclose = NULL;
+  soap->fdimewriteclose = NULL;
+  soap->fdimeread = NULL;
+  soap->fdimewrite = NULL;
+#endif
+  soap->float_format = "%.8g"; /* .8 preserves single FP precision as much as possible, but might not be very efficient */
+  soap->double_format = "%.17lg"; /* .17 preserves double FP precision as much as possible, but might not be very efficient */
+  soap->dime_id_format = "cid:id%d"; /* default DIME id format */
+  soap->http_version = "1.1";
+  soap->actor = NULL;
+  soap->max_keep_alive = SOAP_MAXKEEPALIVE;
+  soap->keep_alive = 0;
+  soap->recv_timeout = 0;
+  soap->send_timeout = 0;
+  soap->connect_timeout = 0;
+  soap->accept_timeout = 0;
+  soap->socket_flags = 0;
+  soap->connect_flags = 0;
+  soap->bind_flags = 0;
+  soap->accept_flags = 0;
+  soap->ip = 0;
+#ifdef WITH_FAST
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  soap->encodingStyle = SOAP_STR_EOS;
+#ifndef WITH_NONAMESPACES
+  soap->namespaces = namespaces;
+#else
+  soap->namespaces = NULL;
+#endif
+  soap->local_namespaces = NULL;
+  soap->nlist = NULL;
+  soap->blist = NULL;
+  soap->clist = NULL;
+  soap->alist = NULL;
+  soap->attributes = NULL;
+  soap->header = NULL;
+  soap->fault = NULL;
+  soap->master = SOAP_INVALID_SOCKET;
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->os = NULL;
+  soap->is = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifndef UNDER_CE
+  soap->recvfd = 0;
+  soap->sendfd = 1;
+#else
+  soap->recvfd = stdin;
+  soap->sendfd = stdout;
+#endif 
+  soap->host[0] = '\0';
+  soap->port = 0;
+  soap->action = NULL;
+  soap->proxy_host = NULL;
+  soap->proxy_port = 8080;
+  soap->proxy_userid = NULL;
+  soap->proxy_passwd = NULL;
+  soap->authrealm = NULL;
+  soap->prolog = NULL;
+#ifdef WITH_OPENSSL
+  if (!ssl_init_done)
+    soap_ssl_init();
+  soap->fsslauth = ssl_auth_init;
+  soap->fsslverify = ssl_verify_callback;
+  soap->bio = NULL;
+  soap->ssl = NULL;
+  soap->ctx = NULL;
+  soap->require_server_auth = 0;
+  soap->require_client_auth = 0;
+  soap->rsa = 0;
+  soap->keyfile = NULL;
+  soap->password = NULL;
+  soap->dhfile = NULL;
+  soap->cafile = NULL;
+  soap->capath = NULL;
+  soap->crlfile = NULL;
+  soap->randfile = NULL;
+  soap->session = NULL;
+#endif
+#ifdef WITH_ZLIB
+  soap->zlib_state = SOAP_ZLIB_NONE;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.zalloc = NULL;
+  soap->d_stream.zfree = NULL;
+  soap->d_stream.opaque = NULL;
+  soap->z_level = 6;
+#endif
+#ifndef WITH_LEAN
+  soap->c14ninclude = NULL;
+  soap->c14nexclude = NULL;
+  soap->cookies = NULL;
+  soap->cookie_domain = NULL;
+  soap->cookie_path = NULL;
+  soap->cookie_max = 32;
+#endif
+#ifdef SOAP_DEBUG
+  soap_init_mht(soap);
+  soap_init_logs(soap);
+  soap_set_recv_logfile(soap, "RECV.log");
+  soap_set_sent_logfile(soap, "SENT.log");
+  soap_set_test_logfile(soap, NULL);
+#endif
+#ifdef WMW_RPM_IO
+  soap->rpmreqid = NULL;
+#endif
+#ifdef PALM
+  palmNetLibOpen();
+#endif
+#ifndef WITH_NOIDREF
+  soap_init_iht(soap);
+  soap_init_pht(soap);
+#endif
+  soap_begin(soap);
+#ifdef SOAP_DEBUG
+  soap_set_test_logfile(soap, "TEST.log");
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init1(struct soap *soap, soap_mode mode)
+{ soap_init2(soap, mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init2(struct soap *soap, soap_mode imode, soap_mode omode)
+{ soap_init(soap);
+  soap_imode(soap, imode);
+  soap_omode(soap, omode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_begin(struct soap *soap)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing\n"));
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+  soap->null = 0;
+  soap->position = 0;
+  soap->encoding = 0;
+  soap->mustUnderstand = 0;
+  soap->mode = 0;
+  soap->ns = 0;
+  soap->part = SOAP_END;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  soap->error = SOAP_OK;
+  soap->peeked = 0;
+  soap->ahead = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+  soap->endpoint[0] = '\0';
+#ifndef WITH_LEANER
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+#endif
+  soap_free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end(struct soap *soap)
+{ register struct soap_clist *cp;
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  soap_dealloc(soap, NULL);
+  while (soap->clist)
+  { cp = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = cp;
+  }
+  soap_closesock(soap);
+#ifdef SOAP_DEBUG
+  soap_close_logfiles(soap);
+#endif
+#ifdef PALM
+  palmNetLibClose();
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_namespaces(struct soap *soap, struct Namespace *p)
+{ register struct Namespace *ns = soap->local_namespaces;
+  register struct soap_nlist *np, *nq, *nr;
+  register unsigned int level = soap->level;
+  soap->namespaces = p;
+  soap->local_namespaces = NULL;
+  soap_set_local_namespaces(soap);
+  /* reverse the namespace list */
+  np = soap->nlist;
+  soap->nlist = NULL;
+  if (np)
+  { nq = np->next;
+    np->next = NULL;
+    while (nq)
+    { nr = nq->next;
+      nq->next = np;
+      np = nq;
+      nq = nr;
+    }
+  }
+  /* then push on new stack */
+  while (np)
+  { register const char *s;
+    soap->level = np->level; /* preserve element nesting level */
+    s = np->ns;
+    if (!s && np->index >= 0 && ns)
+    { s = ns[np->index].out;
+      if (!s)
+        s = ns[np->index].ns;
+    }
+    if (s && soap_push_namespace(soap, np->id, s))
+      return soap->error;
+    nq = np;
+    np = np->next;
+    SOAP_FREE(soap, nq);
+  }
+  if (ns)
+  { register int i;
+    for (i = 0; ns[i].id; i++)
+    { if (ns[i].out)
+      { SOAP_FREE(soap, ns[i].out);
+        ns[i].out = NULL;
+      }
+    }
+    SOAP_FREE(soap, ns);
+  }
+  soap->level = level; /* restore level */
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_local_namespaces(struct soap *soap)
+{ if (soap->namespaces && !soap->local_namespaces)
+  { register const struct Namespace *ns1;
+    register struct Namespace *ns2;
+    register size_t n = 1;
+    for (ns1 = soap->namespaces; ns1->id; ns1++)
+      n++;
+    n *= sizeof(struct Namespace);
+    ns2 = (struct Namespace*)SOAP_MALLOC(soap, n);
+    if (ns2)
+    { memcpy(ns2, soap->namespaces, n);
+      if (ns2[0].ns)
+      { if (!strcmp(ns2[0].ns, soap_env1))
+          soap->version = 1;
+        else
+          soap->version = 2;
+      }
+      soap->local_namespaces = ns2;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+#ifndef PALM_1
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_strsearch(const char *big, const char *little)
+{ size_t n = strlen(little);
+  const char *s = big;
+  while (s) 
+  { if (!strncmp(s, little, n) && (s[n] == '\0' || s[n] == ' '))
+      return s;
+    s = strchr(s, ' ');
+    if (s)
+      s++;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_lookup_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np;
+  for (np = soap->nlist; np; np = np->next)
+  { if (!strncmp(np->id, tag, n) && !np->id[n])
+      return np;
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized)
+{ register struct soap_nlist *np;
+  size_t n, k;
+  if (soap_strsearch(soap->c14nexclude, id))
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns?ns:""));
+  if (!utilized)
+  { for (np = soap->nlist; np; np = np->next)
+    { if (!strcmp(np->id, id) && (!np->ns || !strcmp(np->ns, ns)))
+        break;
+    }
+    if (np)
+    { if (np->index == 1)
+        utilized = np->index;
+      else
+        return NULL;
+    }
+  }
+  n = strlen(id);
+  if (ns)
+    k = strlen(ns);
+  else
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k + 1);
+  if (!np)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  np->next = soap->nlist;
+  soap->nlist = np;
+  strcpy(np->id, id);
+  if (ns)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+  }
+  else
+    np->ns = NULL;
+  np->level = soap->level;
+  np->index = utilized;
+  return np;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_utilize_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np = soap_lookup_ns(soap, tag, n);
+  if (np)
+  { if (np->index == 0)
+      soap_push_ns(soap, np->id, np->ns, 1);
+  }
+  else
+  { strncpy(soap->tmpbuf, tag, n);
+    soap->tmpbuf[n] = '\0';
+    soap_push_ns(soap, soap->tmpbuf, NULL, 1);
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_pop_ns(struct soap *soap)
+{ soap_pop_namespace(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element(struct soap *soap, const char *tag, int id, const char *type)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element begin tag='%s' id='%d' type='%s'\n", tag, id, type?type:""));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->soap = soap;
+    elt->next = NULL;
+    elt->prnt = soap->dom;
+    elt->name = soap_strdup(soap, tag);
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->nstr = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->node = NULL;
+    elt->type = 0;
+    elt->head = NULL;
+    elt->tail = NULL;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+  }
+  else
+  {
+#endif
+    soap->level++;
+#ifndef WITH_LEAN
+    if (!soap->ns)
+    { if (!(soap->mode & SOAP_XML_CANONICAL)
+       && soap_send(soap, soap->prolog ? soap->prolog : "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"))
+        return soap->error;
+    }
+    else if (soap->mode & SOAP_XML_INDENT)
+    { if (soap->ns == 1 && soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+      soap->body = 1;
+    }
+#endif
+    if (soap_send_raw(soap, "<", 1)
+     || soap_send(soap, tag))
+      return soap->error;
+#ifdef WITH_DOM
+  }
+#endif
+  if (!soap->ns)
+  { struct Namespace *ns;
+    for (ns = soap->local_namespaces; ns && ns->id; ns++)
+    { if (*ns->id && (ns->out || ns->ns))
+      { sprintf(soap->tmpbuf, "xmlns:%s", ns->id);
+        if (soap_attribute(soap, soap->tmpbuf, ns->out ? ns->out : ns->ns))
+          return soap->error;
+      }
+    }   
+  }
+  soap->ns = 1; /* start with 0 or 2, but should be one to continue */
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { const char *s = strchr(tag, ':');
+    if (s)
+      soap_utilize_ns(soap, tag, s - tag);
+  }
+#endif
+  if (id > 0)
+  { sprintf(soap->tmpbuf, "_%d", id);
+    if (soap_attribute(soap, "id", soap->tmpbuf))
+      return soap->error;
+  }
+  if (type && *type)
+  { if (soap_attribute(soap, "xsi:type", type))
+      return soap->error;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { const char *s = strchr(type, ':');
+      if (s)
+        soap_utilize_ns(soap, type, s - type);
+    }
+#endif
+  }
+  if (soap->null && soap->position > 0)
+  { int i;
+    sprintf(soap->tmpbuf, "[%d", soap->positions[0]);
+    for (i = 1; i < soap->position; i++)
+      sprintf(soap->tmpbuf + strlen(soap->tmpbuf), ",%d", soap->positions[i]);
+    strcat(soap->tmpbuf, "]");
+    if (soap_attribute(soap, "SOAP-ENC:position", soap->tmpbuf))
+      return soap->error;
+  }
+  if (soap->mustUnderstand)
+  { if (soap->actor && *soap->actor)
+    { if (soap_attribute(soap, soap->version == 2 ? "SOAP-ENV:role" : "SOAP-ENV:actor", soap->actor))
+        return soap->error;
+    }
+    if (soap_attribute(soap, "SOAP-ENV:mustUnderstand", soap->version == 2 ? "true" : "1"))
+      return soap->error;
+    soap->mustUnderstand = 0;
+  }
+  if (soap->encoding)
+  { if (soap->encodingStyle && soap->local_namespaces)
+    { if (!*soap->encodingStyle)
+      { if (soap->local_namespaces[1].out)
+          soap->encodingStyle = soap->local_namespaces[1].out;
+        else
+          soap->encodingStyle = soap->local_namespaces[1].ns;
+      }
+      if (soap_attribute(soap, "SOAP-ENV:encodingStyle", soap->encodingStyle))
+        return soap->error;
+    }
+    soap->encoding = 0;
+  }
+  soap->null = 0;
+  soap->position = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_out(struct soap *soap, const char *tag, int id, const char *type)
+{ if (*tag == '-')
+    return SOAP_OK;
+  if (soap_element(soap, tag, id, type))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRRCHR
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_strrchr(const char *s, int t)
+{ register char *r = NULL;
+  while (*s)
+    if (*s++ == t)
+      r = (char*)s - 1;
+  return r;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOL
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_strtol(const char *s, char **t, int b)
+{ register long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { short neg = 0;
+    if (*s == '-')
+    { s++;
+      neg = 1;
+    }
+    else if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 214748364 && (n > 214748364 || c >= '8'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+    if (neg)
+      n = -n;
+  }
+  else /* b == 16 and value is always positive */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x07FFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOUL
+SOAP_FMAC1
+unsigned long
+SOAP_FMAC2
+soap_strtoul(const char *s, char **t, int b)
+{ unsigned long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 429496729 && (n > 429496729 || c >= '6'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+  }
+  else /* b == 16 */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x0FFFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_begin_out(struct soap *soap, const char *tag, int id, const char *type, const char *offset)
+{ if (soap_element(soap, tag, id, "SOAP-ENC:Array"))
+    return soap->error;
+  if (soap->version == 2)
+  { const char *s;
+    s = soap_strrchr(type, '[');
+    if ((size_t)(s - type) < sizeof(soap->tmpbuf))
+    { strncpy(soap->tmpbuf, type, s - type);
+      soap->tmpbuf[s - type] = '\0';
+      if (type && *type && (soap_attribute(soap, "SOAP-ENC:itemType", soap->tmpbuf)))
+        return soap->error;
+      if (s && (soap_attribute(soap, "SOAP-ENC:arraySize", s + 1)))
+        return soap->error;
+    }
+  }
+  else
+  { if (offset && (soap_attribute(soap, "SOAP-ENC:offset", offset)))
+      return soap->error;
+    if (type && *type && (soap_attribute(soap, "SOAP-ENC:arrayType", type)))
+      return soap->error;
+  }
+#ifndef WITH_LEAN
+  if (type && *type && (soap->mode & SOAP_XML_CANONICAL))
+  { const char *s = strchr(type, ':');
+    if (s)
+      soap_utilize_ns(soap, type, s - type);
+  }
+#endif
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_start_end_out(struct soap *soap, const char *tag)
+{ register struct soap_attribute *tp;
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att;
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { att = &soap->dom->atts;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible)
+      { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+	if (!*att)
+	  return soap->error = SOAP_EOM;
+	(*att)->next = NULL;
+        (*att)->nstr = NULL;
+        (*att)->name = soap_strdup(soap, tp->name);
+        (*att)->data = soap_strdup(soap, tp->value);
+        (*att)->wide = NULL;
+        (*att)->soap = soap;
+        tp->visible = 0;
+      }
+    }
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { struct soap_nlist *np;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible && tp->name)
+      { const char *s = strchr(tp->name, ':');
+        if (s)
+          soap_utilize_ns(soap, tp->name, s - tp->name);
+      }
+    }
+    for (np = soap->nlist; np; np = np->next)
+    { if (np->index == 1 && np->ns)
+      { sprintf(soap->tmpbuf, "xmlns:%s", np->id);
+        soap_set_attr(soap, soap->tmpbuf, np->ns);
+        np->index = 2;
+      }
+    }
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible)
+    { if (soap_send(soap, " ") || soap_send(soap, tp->name))
+        return soap->error;
+      if (tp->visible == 2 && tp->value)
+        if (soap_send_raw(soap, "=\"", 2)
+	 || soap_string_out(soap, tp->value, 1)
+	 || soap_send_raw(soap, "\"", 1))
+          return soap->error;
+      tp->visible = 0;
+    }
+  }
+  if (tag)
+  { 
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { if (soap_send_raw(soap, ">", 1)
+       || soap_element_end_out(soap, tag))
+        return soap->error;
+    }
+    else
+#endif
+    soap->level--;	/* decrement level just before /> */
+    if (soap_send_raw(soap, "/>", 2))
+      return soap->error;
+    return SOAP_OK;
+  }
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_out(struct soap *soap, const char *tag)
+{ if (*tag == '-')
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element ending tag='%s'\n", tag));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+    soap_pop_ns(soap);
+  if (soap->mode & SOAP_XML_INDENT)
+  { if (!soap->body)
+    { if (soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+    }
+    soap->body = 0;
+  }
+#endif
+  if (soap_send_raw(soap, "</", 2)
+   || soap_send(soap, tag))
+    return soap->error;
+  soap->level--;	/* decrement level just before > */
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_ref(struct soap *soap, const char *tag, int id, int href)
+{ register int n = 0;
+  if (soap->version == 2)
+    n = 1;
+  sprintf(soap->href, "#_%d", href);
+  return soap_element_href(soap, tag, id, "href" + n, soap->href + n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_href(struct soap *soap, const char *tag, int id, const char *ref, const char *val)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element '%s' reference %s='%s'\n", tag, ref, val));
+  if (soap_element(soap, tag, id, NULL)
+   || soap_attribute(soap, ref, val)
+   || soap_element_start_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_null(struct soap *soap, const char *tag, int id, const char *type)
+{ struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (tp->visible)
+      break;
+  if (tp || (soap->version == 2 && soap->position > 0) || id > 0 || (soap->mode & SOAP_XML_NIL))
+  { if (soap_element(soap, tag, id, type))
+      return soap->error;
+    if (soap->part != SOAP_IN_HEADER && soap->encodingStyle)
+      if (soap_attribute(soap, "xsi:nil", "true"))
+        return soap->error;
+    return soap_element_start_end_out(soap, tag);
+  }
+  soap->null = 1;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_id(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, int n, const char *type, int t) 
+{ if (!p || (a && !a->__ptr))
+  { soap_element_null(soap, tag, id, type);
+    return -1;
+  }
+#ifndef WITH_NOIDREF
+  if (soap->mode & SOAP_XML_TREE)
+    return 0;
+  if (id < 0)
+  { struct soap_plist *pp;
+    if (a)
+      id = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+    else
+      id = soap_pointer_lookup(soap, p, t, &pp);
+    if (id)
+    { if (soap_is_embedded(soap, pp))
+      { soap_element_ref(soap, tag, 0, id);
+        return -1;
+      }
+      if (soap_is_single(soap, pp))
+        return 0;
+      soap_set_embedded(soap, pp);
+    }
+  }
+  return id;
+#else
+  return 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_result(struct soap *soap, const char *tag)
+{ if (soap->version == 2 && soap->encodingStyle)
+    if (soap_element(soap, "SOAP-RPC:result", 0, NULL)
+     || soap_attribute(soap, "xmlns:SOAP-RPC", soap_rpc)
+     || soap_element_start_end_out(soap, NULL)
+     || soap_string_out(soap, tag, 0)
+     || soap_element_end_out(soap, "SOAP-RPC:result"))
+      return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attribute(struct soap *soap, const char *name, const char *value)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+    a->next = soap->dom->atts;
+    a->nstr = NULL;
+    a->name = soap_strdup(soap, name);
+    a->data = soap_strdup(soap, value);
+    a->wide = NULL;
+    a->soap = soap;
+    soap->dom->atts = a;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { /* TODO: consider using this code to handle default namespace
+    if (!strncmp(name, "xmlns", 5) && (name[5] == ':' || name[5] == '\0'))
+    { if (name[5] == ':')
+        soap_push_ns(soap, name + 6, value, 0);
+      else
+        soap_push_ns(soap, "", value, 0);
+    }
+    */
+    if (!strncmp(name, "xmlns:", 6))
+      soap_push_ns(soap, name + 6, value, 0);
+    else if (soap_set_attr(soap, name, value))
+      return soap->error;
+  }
+  else
+#endif
+  { if (soap_send(soap, " ") || soap_send(soap, name))
+      return soap->error;
+    if (value)
+      if (soap_send_raw(soap, "=\"", 2)
+       || soap_string_out(soap, value, 1)
+       || soap_send_raw(soap, "\"", 1))
+        return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_in(struct soap *soap, const char *tag, int nillable)
+{ if (!soap_peek_element(soap))
+  { if (soap->other)
+      return soap->error = SOAP_TAG_MISMATCH;
+    if (tag && *tag == '-')
+      return SOAP_OK;
+    if (!(soap->error = soap_match_tag(soap, soap->tag, tag)))
+    { soap->peeked = 0;
+      if (soap->body)
+        soap->level++;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"" ));
+      if (!nillable && soap->null && (soap->mode & SOAP_XML_STRICT))
+        return soap->error = SOAP_NULL;
+    }
+  }
+  else if (soap->error == SOAP_NO_TAG && tag && *tag == '-')
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_in(struct soap *soap, const char *tag)  
+{ register soap_wchar c;
+  register char *s;
+  register const char *t;
+  register int n = 0;
+  if (tag && *tag == '-')
+    return SOAP_OK;
+  soap->level--;
+  soap_pop_namespace(soap);
+#ifdef WITH_DOM
+  /* this whitespace or mixed content is not insignificant for DOM */
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!soap->peeked && !soap_string_in(soap, 3, -1, -1))
+      return soap->error;
+    if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  if (soap->peeked)
+  { if (soap->error == SOAP_NO_TAG)
+      soap->error = SOAP_OK;
+    if (*soap->tag)
+      n++;
+    soap->peeked = 0;
+  }
+  do
+  { while (((c = soap_get(soap)) != SOAP_TT))
+    { if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      if (c == SOAP_LT)
+        n++;
+      else if (c == '/')
+      { c = soap_get(soap);
+        if (c == SOAP_GT)
+	  n--;
+        else
+	  soap_unget(soap, c);
+      }
+    }
+  } while (n--);
+  s = soap->tag;
+  while (soap_notblank(c = soap_get(soap)))
+    *s++ = (char)c;
+  *s = '\0';
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  while (soap_blank(c))
+    c = soap_get(soap);
+  if (c != SOAP_GT)
+    return soap->error = SOAP_SYNTAX_ERROR;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:""));
+  if (!tag || !*tag)
+    return SOAP_OK;
+  if ((s = strchr(soap->tag, ':')))
+    s++;
+  else
+    s = soap->tag;
+  if ((t = strchr(tag, ':')))
+    t++;
+  else
+    t = tag;
+  if (!SOAP_STRCMP(s, t))
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element tag name does not match\n"));
+  return soap->error = SOAP_SYNTAX_ERROR;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_attr_value(struct soap *soap, const char *name, int flag)
+{ register struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (!soap_match_tag(soap, tp->name, name))
+      break;
+  if (tp && tp->visible == 2)
+  { if (flag == 2 && (soap->mode & SOAP_XML_STRICT))
+      soap->error = SOAP_PROHIBITED;
+    else
+      return tp->value;
+  }
+  else if (flag == 1 && (soap->mode & SOAP_XML_STRICT))
+    soap->error = SOAP_REQUIRED;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_attr(struct soap *soap, const char *name, const char *value)
+{ register struct soap_attribute *tp;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set attribute %s='%s'\n", name, value?value:""));
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (!strcmp(tp->name, name))
+      break;
+  }
+  if (!tp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute %s\n", name));
+    if (!(tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(name))))
+      return soap->error = SOAP_EOM;
+    tp->ns = NULL;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { struct soap_attribute **tpp = &soap->attributes;
+      const char *s = strchr(name, ':');
+      if (!strncmp(name, "xmlns", 5))
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) || strcmp((*tpp)->name + 5, name + 5) > 0)
+            break;
+      }
+      else if (!s)
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) && ((*tpp)->ns || strcmp((*tpp)->name, name) > 0))
+            break;
+      }
+      else
+      { int k;
+        for (; *tpp; tpp = &(*tpp)->next)
+	{ if (!strncmp((*tpp)->name, "xmlns:", 6) && !strncmp((*tpp)->name + 6, name, s - name) && !(*tpp)->name[6 + s - name])
+	  { if (!tp->ns)
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Canonicalization: prefix %s=%p(%s)\n", name, (*tpp)->ns, (*tpp)->ns));
+	      tp->ns = (*tpp)->ns;
+	    }
+	  }
+          else if (strncmp((*tpp)->name, "xmlns", 5) && (*tpp)->ns && tp->ns && ((k = strcmp((*tpp)->ns, tp->ns)) > 0 || (!k && strcmp((*tpp)->name, name) > 0)))
+            break;
+        }
+      }
+      tp->next = *tpp;
+      *tpp = tp;
+    }
+    else
+#endif
+    { tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    strcpy(tp->name, name);
+    tp->value = NULL;
+  }
+  else if (tp->visible)
+  { return SOAP_OK;
+  }
+  else if (value && tp->value && tp->size <= strlen(value))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute value of %s (free %p)\n", name, tp->value));
+    SOAP_FREE(soap, tp->value);
+    tp->value = NULL;
+    tp->ns = NULL;
+  }
+  if (value)
+  { if (!tp->value)
+    { tp->size = strlen(value) + 1;
+      if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+        return soap->error = SOAP_EOM;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute value of %s (%p)\n", tp->name, tp->value));
+    }
+    strcpy(tp->value, value);
+    if (!strncmp(tp->name, "xmlns:", 6))
+      tp->ns = tp->value;
+    tp->visible = 2;
+#ifndef WITH_LEAN
+    if (!strcmp(name, "wsu:Id"))
+    { soap->part = SOAP_BEGIN_SECURITY;
+      strncpy(soap->id, value, sizeof(soap->id));
+      soap->id[sizeof(soap->id)-1] = '\0';
+    }
+#endif
+  }
+  else
+    tp->visible = 1;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_attr(struct soap *soap)
+{ register struct soap_attribute *tp;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_CANONICAL))
+  { while (soap->attributes)
+    { tp = soap->attributes->next;
+      SOAP_FREE(soap, soap->attributes->value);
+      SOAP_FREE(soap, soap->attributes);
+      soap->attributes = tp;
+    }
+  }
+  else
+#endif
+  { for (tp = soap->attributes; tp; tp = tp->next)
+      tp->visible = 0;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d)
+{ register size_t i;
+  for (i = 0; i < n; i++)
+  { register soap_wchar c = soap_get(soap);
+    switch (c)
+    {
+    case SOAP_TT:
+      *s++ = '<';
+      soap_unget(soap, '/');
+      break;
+    case SOAP_LT:
+      *s++ = '<';
+      break;
+    case SOAP_GT:
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '>';
+      break;
+    case SOAP_QT:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '"';
+      break;
+    case SOAP_AP:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '\'';
+      break;
+    case '\t':
+    case '\n':
+    case '\r':
+    case ' ':
+    case '/':
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+    default:
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+  }
+  return soap->error = SOAP_EOM;
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_store_lab(struct soap *soap, const char *s, size_t n)
+{ soap->labidx = 0;
+  return soap_append_lab(soap, s, n);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_append_lab(struct soap *soap, const char *s, size_t n)
+{ if (soap->labidx + n >= soap->lablen)
+  { register char *t = soap->labbuf;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enlarging look-aside buffer to append data, old size=%lu", (unsigned long)soap->lablen));
+    if (soap->lablen == 0)
+      soap->lablen = SOAP_LABLEN;
+    while (soap->labidx + n >= soap->lablen)
+      soap->lablen <<= 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, ", new size=%lu\n", (unsigned long)soap->lablen));
+    soap->labbuf = (char*)SOAP_MALLOC(soap, soap->lablen);
+    if (!soap->labbuf)
+    { if (t)
+        SOAP_FREE(soap, t);
+      return soap->error = SOAP_EOM;
+    }
+    if (t)
+    { memcpy(soap->labbuf, t, soap->labidx);
+      SOAP_FREE(soap, t);
+    }
+  }
+  if (s)
+  { memcpy(soap->labbuf + soap->labidx, s, n);
+    soap->labidx += n;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_peek_element(struct soap *soap)
+{
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att = NULL;
+  register char *lead = NULL;
+#endif
+  register struct soap_attribute *tp;
+  const char *t;
+  register char *s;
+  register soap_wchar c;
+  register int i;
+  if (soap->peeked)
+  { if (!*soap->tag)
+      return soap->error = SOAP_NO_TAG;
+    return SOAP_OK;
+  }
+  soap->peeked = 1;
+  c = soap_getutf8(soap);
+#ifdef WITH_DOM
+  /* whitespace leading to start tag is not insignificant for DOM */
+  if (soap_blank(c))
+  { soap->labidx = 0;
+    do
+    { if (soap_append_lab(soap, NULL, 0))
+        return SOAP_EOM;
+      s = soap->labbuf + soap->labidx;
+      i = soap->lablen - soap->labidx;
+      soap->labidx = soap->lablen;
+      while (soap_blank(c) && i--)
+      { *s++ = c;
+        c = soap_getutf8(soap);
+      }
+    }
+    while (soap_blank(c));
+    *s = '\0';
+    lead = soap_strdup(soap, soap->labbuf);
+  }
+#else
+  while (soap_blank(c))
+    c = soap_getutf8(soap);
+#endif
+  if (c != SOAP_LT)
+  { *soap->tag = '\0';
+    if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, c);
+#ifdef WITH_DOM
+    /* whitespace leading to end tag is not insignificant for DOM */
+    if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+      soap->dom->tail = soap_strdup(soap, lead);
+#endif
+    return soap->error = SOAP_NO_TAG;
+  }
+  s = soap->tag;
+  do c = soap_get1(soap);
+  while (soap_blank(c));
+  i = sizeof(soap->tag);
+  while (c != '>' && c != '/' && soap_notblank(c))
+  { if (--i > 0)
+      *s++ = (char)c;
+    c = soap_get1(soap);
+  }
+  while (soap_blank(c))
+    c = soap_get1(soap);
+  *s = '\0';
+  soap->id[0] = '\0';
+  soap->href[0] = '\0';
+  soap->type[0] = '\0';
+  soap->arrayType[0] = '\0';
+  soap->arraySize[0] = '\0';
+  soap->arrayOffset[0] = '\0';
+  soap->other = 0;
+  soap->root = -1;
+  soap->position = 0;
+  soap->null = 0;
+  soap->mustUnderstand = 0;
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt;
+    elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->next = NULL;
+    elt->nstr = NULL;
+    elt->name = soap_strdup(soap, soap->tag);
+    elt->prnt = soap->dom;
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->type = 0;
+    elt->node = NULL;
+    elt->head = lead;
+    elt->tail = NULL;
+    elt->soap = soap;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+    att = &elt->atts;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+    tp->visible = 0;
+  while ((int)c != EOF && c != '>' && c != '/')
+  { s = soap->tmpbuf;
+    i = sizeof(soap->tmpbuf);
+    while (c != '=' && c != '>' && c != '/' && soap_notblank(c))
+    { if (--i > 0)
+        *s++ = (char)c;
+      c = soap_get1(soap);
+    }
+    *s = '\0';
+    if (i == sizeof(soap->tmpbuf))
+      return soap->error = SOAP_SYNTAX_ERROR;
+#ifdef WITH_DOM
+    /* add attribute name to dom */
+    if (att)
+    { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+       if (!*att)
+         return soap->error = SOAP_EOM;
+       (*att)->next = NULL;
+       (*att)->nstr = NULL;
+       (*att)->name = soap_strdup(soap, soap->tmpbuf);
+       (*att)->data = NULL;
+       (*att)->wide = NULL;
+       (*att)->soap = soap;
+    }
+#endif
+    if (!strncmp(soap->tmpbuf, "xmlns", 5))
+    { if (soap->tmpbuf[5] == ':')
+      { soap->tmpbuf[5] = '\0';
+        t = soap->tmpbuf + 6;
+      }
+      else if (soap->tmpbuf[5])
+        t = NULL;
+      else
+        t = SOAP_STR_EOS;
+    }
+    else
+      t = NULL;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (!SOAP_STRCMP(tp->name, soap->tmpbuf))
+        break;
+    }
+    if (!tp)
+    { tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(soap->tmpbuf));
+      if (!tp)
+        return soap->error = SOAP_EOM;
+      strcpy(tp->name, soap->tmpbuf);
+      tp->value = NULL;
+      tp->size = 0;
+      tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    while (soap_blank(c))
+      c = soap_get1(soap);
+    if (c == '=')
+    { do c = soap_getutf8(soap);
+      while (soap_blank(c));
+      if (c != SOAP_QT && c != SOAP_AP)
+      { soap_unget(soap, c);
+        c = ' '; /* blank delimiter */
+      }
+      if (soap_getattrval(soap, tp->value, tp->size, c))
+      {
+#ifdef WITH_FAST
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+	if (soap_store_lab(soap, tp->value, tp->size))
+	  return soap->error;
+	if (tp->value)
+	  SOAP_FREE(soap, tp->value);
+	for (;;)
+	{ if (soap_getattrval(soap, soap->labbuf + soap->labidx, soap->lablen - soap->labidx, c))
+	  { if (soap->error != SOAP_EOM)
+	      return soap->error;
+            soap->error = SOAP_OK;
+	    soap->labidx = soap->lablen;
+	    if (soap_append_lab(soap, NULL, 0))
+	      return soap->error;
+	  }
+	  else
+	    break;
+	}
+	if (soap->labidx)
+          tp->size = soap->lablen;
+	else
+	{ tp->size = strlen(soap->labbuf) + 1;
+          if (tp->size < SOAP_LABLEN)
+	    tp->size = SOAP_LABLEN;
+        }
+	if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+	  return soap->error = SOAP_EOM;
+        strcpy(tp->value, soap->labbuf);
+#else
+	size_t n;
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+        if (soap_new_block(soap))
+          return soap->error;
+        for (;;)
+        { if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+            return soap->error;
+          if (soap_getattrval(soap, s, SOAP_BLKLEN, c))
+          { if (soap->error != SOAP_EOM)
+              return soap->error;
+            soap->error = SOAP_OK;
+          }
+          else
+            break;
+        }
+	n = tp->size + soap->blist->size;
+        if (!(s = (char*)SOAP_MALLOC(soap, n)))
+          return soap->error = SOAP_EOM;
+        if (tp->value)
+        { memcpy(s, tp->value, tp->size);
+          SOAP_FREE(soap, tp->value);
+        }
+        soap_save_block(soap, s + tp->size, 0);
+        tp->value = s;
+        tp->size = n;
+#endif
+      }
+      do c = soap_get1(soap);
+      while (soap_blank(c));
+      tp->visible = 2; /* seen this attribute w/ value */
+#ifdef WITH_DOM
+      if (att)
+        (*att)->data = soap_strdup(soap, tp->value);
+#endif
+    }
+    else
+      tp->visible = 1; /* seen this attribute w/o value */
+#ifdef WITH_DOM
+    if (att)
+      att = &(*att)->next;
+#endif
+    if (t && tp->value)
+    { if (soap_push_namespace(soap, t, tp->value))
+        return soap->error;
+      tp->visible = 0;
+    }
+  }
+#ifdef WITH_DOM
+  if (att)
+  { soap->dom->nstr = soap_current_namespace(soap, soap->tag);
+    for (att = &soap->dom->atts; *att; att = &(*att)->next)
+      (*att)->nstr = soap_current_namespace(soap, (*att)->name);
+  }
+#endif
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  if (!(soap->body = (c != '/')))
+    do c = soap_get1(soap);
+    while (soap_blank(c));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { if (!soap->body && soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible && tp->value)
+    { if (!strcmp(tp->name, "id"))
+      { *soap->id = '#';
+        strncpy(soap->id + 1, tp->value, sizeof(soap->id) - 2);
+        soap->id[sizeof(soap->id)-1] = '\0';
+      }
+      else if (!strcmp(tp->name, "href"))
+      { strncpy(soap->href, tp->value, sizeof(soap->href) - 1);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if ((soap->version == 2 || (soap->mode & SOAP_XML_GRAPH)) && !strcmp(tp->name, "ref"))
+      { *soap->href = '#';
+        strncpy(soap->href + 1, tp->value, sizeof(soap->href) - 2);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if (!soap_match_tag(soap, tp->name, "xsi:type"))
+      { strncpy(soap->type, tp->value, sizeof(soap->type) - 1);
+        soap->type[sizeof(soap->type)-1] = '\0';
+      }
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arrayType"))
+      { s = soap_strrchr(tp->value, '[');
+        if (s && (size_t)(s - tp->value) < sizeof(soap->arrayType))
+        { strncpy(soap->arrayType, tp->value, s - tp->value);
+          soap->arrayType[s - tp->value] = '\0';
+          strncpy(soap->arraySize, s, sizeof(soap->arraySize) - 1);
+        }
+        else
+          strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+        soap->arraySize[sizeof(soap->arrayType)-1] = '\0';
+        soap->arrayType[sizeof(soap->arrayType)-1] = '\0';
+      }
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:itemType"))
+        strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arraySize"))
+        strncpy(soap->arraySize, tp->value, sizeof(soap->arraySize) - 1);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:offset"))
+        strncpy(soap->arrayOffset, tp->value, sizeof(soap->arrayOffset));
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:position"))
+        soap->position = soap_getposition(tp->value, soap->positions);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:root"))
+        soap->root = ((!strcmp(tp->value, "1") || !strcmp(tp->value, "true")));
+      else if ((soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENV:actor"))
+            || (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENV:role")))
+      { if ((!soap->actor || strcmp(soap->actor, tp->value))
+         && strcmp(tp->value, "http://schemas.xmlsoap.org/soap/actor/next")
+         && strcmp(tp->value, "http://www.w3.org/2003/05/soap-envelope/role/next"))
+          soap->other = 1;
+      }
+      else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:mustUnderstand")
+            && (!strcmp(tp->value, "1") || !strcmp(tp->value, "true")))
+        soap->mustUnderstand = 1;
+      else if ((!soap_match_tag(soap, tp->name, "xsi:null")
+             || !soap_match_tag(soap, tp->name, "xsi:nil"))
+            && (!strcmp(tp->value, "1")
+             || !strcmp(tp->value, "true")))
+        soap->null = 1;
+    }
+  }
+  return soap->error = SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_retry(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_revert(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_revert(struct soap *soap)
+{ if (!soap->peeked)
+  { soap->peeked = 1;
+    if (soap->body)
+      soap->level--;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reverting last element (level=%u)\n", soap->level));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_string_out(struct soap *soap, const char *s, int flag)
+{ register const char *t;
+  register soap_wchar c;
+  register soap_wchar mask = 0xFFFFFF80UL;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_strdup(soap, s);
+    return SOAP_OK;
+  }
+#endif
+  if (soap->mode & SOAP_C_UTFSTRING)
+    mask = 0;
+  t = s;
+  while ((c = *t++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#x9;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xA;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 13:
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xD;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '&':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&amp;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '<':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&lt;", 4))
+        return soap->error;
+      s = t;
+      break;
+    case '>':
+      if (!flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&gt;", 4))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case '"':
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&quot;", 6))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    default:
+#ifndef WITH_LEANER
+#ifdef HAVE_MBTOWC
+      if (soap->mode & SOAP_C_MBSTRING)
+      { wchar_t wc;
+        register int m = mbtowc(&wc, t - 1, MB_CUR_MAX);
+        if (m > 0 && wc != c)
+        { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, wc))
+            return soap->error;
+	  s = t += m - 1;
+	  continue;
+        }
+      }
+#endif
+#endif
+      if (c & mask)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, (unsigned char)c))
+          return soap->error;
+        s = t;
+      }
+    }
+  }
+  return soap_send_raw(soap, s, t - s - 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_string_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ register char *s;
+  char *t = NULL;
+  register size_t i;
+  register long l = 0;
+  register int n = 0;
+  register int m = 0;
+  register soap_wchar c;
+#if !defined(WITH_LEANER) && defined(HAVE_WCTOMB)
+  char buf[MB_LEN_MAX > 8 ? MB_LEN_MAX : 8];
+#else
+  char buf[8];
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+#ifndef WITH_LEAN
+      t = soap->tmpbuf;
+      t[0] = '<';
+      strncpy(t + 1, soap->tag, sizeof(soap->tmpbuf) - 1);
+      strncat(t, ">", sizeof(soap->tmpbuf));
+      m = strlen(soap->tag) + 2;
+#endif
+    }
+  }
+#ifdef WITH_CDATA
+  if (!flag)
+  { register int state = 0;
+#ifdef WITH_FAST
+    soap->labidx = 0;			/* use look-aside buffer */
+#else
+    if (soap_new_block(soap))
+      return NULL;
+#endif
+    for (;;)
+    { 
+#ifdef WITH_FAST
+      register size_t k;
+      if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+        return NULL;
+      s = soap->labbuf + soap->labidx;	/* space to populate */
+      k = soap->lablen - soap->labidx;	/* number of bytes available */
+      soap->labidx = soap->lablen;	/* claim this space */
+#else
+      register size_t k = SOAP_BLKLEN;
+      if (!(s = (char*)soap_push_block(soap, k)))
+        return NULL;
+#endif
+      for (i = 0; i < k; i++)
+      { if (m > 0)
+        { *s++ = *t++;	/* copy multibyte characters */
+	  m--;
+          continue;
+        }
+        c = soap_getchar(soap);
+	if ((int)c == EOF)
+          goto end;
+        if (c >= 0x80 && !(soap->mode & SOAP_ENC_LATIN))
+        { soap_unget(soap, c);
+	  c = soap_getutf8(soap);
+	  if (soap->mode & SOAP_C_UTFSTRING)
+          { if ((c & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+            { c &= 0x7FFFFFFF;
+              t = buf;
+              if (c < 0x0800)
+                *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+              else
+              { if (c < 0x010000)
+                  *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+                else
+                { if (c < 0x200000)
+                    *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+                  else
+                  { if (c < 0x04000000)
+                      *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                    else
+                    { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                      *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                    }
+                    *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+                  }     
+                  *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+              }
+              *t++ = (char)(0x80 | (c & 0x3F));
+	      m = (int)(t - buf) - 1;
+              t = buf;
+              *s++ = *t++;
+              continue;
+	    }
+          }
+        }
+	switch (state)
+        { case 1:
+            if (c == ']')
+	      state = 4;
+	    *s++ = c;
+	    continue;
+	  case 2:
+	    if (c == '-')
+              state = 6;
+	    *s++ = c;
+	    continue;
+	  case 3:
+	    if (c == '?')
+	      state = 8;
+	    *s++ = c;
+	    continue;
+          /* CDATA */
+	  case 4:
+	    if (c == ']')
+              state = 5;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+	  case 5:
+	    if (c == '>')
+	      state = 0;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+          /* comment */
+          case 6:
+            if (c == '-')
+	      state = 7;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          case 7:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          /* PI */
+	  case 8:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 3;
+	    *s++ = c;
+	    continue;
+        }
+        switch (c)
+        {
+        case '/':
+          if (n > 0)
+          { c = soap_getchar(soap);
+            if (c == '>')
+              n--;
+            soap_unget(soap, c);
+          }
+          *s++ = '/';
+          break;
+        case '<':
+	  c = soap_getchar(soap);
+	  if (c == '/')
+	  { if (n == 0)
+	    { c = SOAP_TT;
+	      goto end;
+	    }
+	    n--;
+	  }
+	  else if (c == '!')
+	  { c = soap_getchar(soap);
+	    if (c == '[')
+            { do c = soap_getchar(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                 goto end;
+	      t = (char*)"![CDATA[";
+	      m = 8;
+	      state = 1;
+	    }
+            else if (c == '-')
+	    { if ((c = soap_getchar(soap)) == '-')
+	        state = 2;
+	      t = (char*)"!-";
+	      m = 2;
+	      soap_unget(soap, c);
+	    }
+	    else
+	    { t = (char*)"!";
+	      m = 1;
+	      soap_unget(soap, c);
+	    }
+	    *s++ = '<';
+	    break;
+	  }
+	  else if (c == '?')
+	    state = 3;
+	  else
+	    n++;
+          soap_unget(soap, c);
+          *s++ = '<';
+          break;
+        case '>':
+          *s++ = '>';
+          break;
+        case '"':
+          *s++ = '"';
+          break;
+        default:
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+          if (soap->mode & SOAP_C_MBSTRING)
+          { m = wctomb(buf, c & 0x7FFFFFFF);
+            if (m >= 1 && m <= (int)MB_CUR_MAX)
+            { t = buf;
+              *s++ = *t++;
+              m--;
+            }
+            else
+            { *s++ = SOAP_UNKNOWN_CHAR;
+	      m = 0;
+	    }
+          }
+          else
+#endif
+#endif
+            *s++ = (char)(c & 0xFF);
+        }
+	l++;
+        if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+        { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+          soap->error = SOAP_LENGTH;
+          return NULL;
+        }
+      }
+    }
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;			/* use look-aside buffer */
+#else
+  if (soap_new_block(soap))
+    return NULL;
+#endif
+  for (;;)
+  { 
+#ifdef WITH_FAST
+    register size_t k;
+    if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+      return NULL;
+    s = soap->labbuf + soap->labidx;	/* space to populate */
+    k = soap->lablen - soap->labidx;	/* number of bytes available */
+    soap->labidx = soap->lablen;	/* claim this space */
+#else
+    register size_t k = SOAP_BLKLEN;
+    if (!(s = (char*)soap_push_block(soap, k)))
+      return NULL;
+#endif
+    for (i = 0; i < k; i++)
+    { if (m > 0)
+      { *s++ = *t++;	/* copy multibyte characters */
+        m--;
+        continue;
+      }
+      if (soap->mode & SOAP_C_UTFSTRING)
+      { if (((c = soap_get(soap)) & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+        { c &= 0x7FFFFFFF;
+          t = buf;
+          if (c < 0x0800)
+            *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+          else
+          { if (c < 0x010000)
+              *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+            else
+            { if (c < 0x200000)
+                *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+              else
+              { if (c < 0x04000000)
+                  *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                else
+                { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                  *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+              }     
+              *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+            }
+            *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+          }
+          *t++ = (char)(0x80 | (c & 0x3F));
+	  m = (int)(t - buf) - 1;
+          t = buf;
+          *s++ = *t++;
+          continue;
+        }
+      }
+      else
+        c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        t = (char*)"/";
+	m = 1;
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_get(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<' | 0x80000000:
+        if (flag)
+          *s++ = '<';
+        else
+        { *s++ = '&';
+          t = (char*)"lt;";
+	  m = 3;
+        }
+        break;
+      case '>' | 0x80000000:
+        if (flag)
+          *s++ = '>';
+        else
+        { *s++ = '&';
+          t = (char*)"gt;";
+	  m = 3;
+        }
+        break;
+      case '&' | 0x80000000:
+        if (flag)
+          *s++ = '&';
+        else
+        { *s++ = '&';
+          t = (char*)"amp;";
+	  m = 4;
+        }
+        break;
+      case '"' | 0x80000000:
+        if (flag)
+          *s++ = '"';
+        else
+        { *s++ = '&';
+          t = (char*)"quot;";
+	  m = 5;
+        }
+        break;
+      case '\'' | 0x80000000:
+        if (flag)
+          *s++ = '\'';
+        else
+        { *s++ = '&';
+          t = (char*)"apos;";
+	  m = 5;
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+        if (soap->mode & SOAP_C_MBSTRING)
+        { m = wctomb(buf, c & 0x7FFFFFFF);
+          if (m >= 1 && m <= (int)MB_CUR_MAX)
+          { t = buf;
+            *s++ = *t++;
+            m--;
+          }
+          else
+          { *s++ = SOAP_UNKNOWN_CHAR;
+	    m = 0;
+	  }
+        }
+        else
+#endif
+#endif
+          *s++ = (char)(c & 0xFF);
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+#ifdef WITH_FAST
+  t = soap_strdup(soap, soap->labbuf);
+#else
+  soap_size_block(soap, i+1);
+  t = soap_save_block(soap, NULL, 0);
+#endif
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (flag == 3)
+      soap->dom->tail = t;
+    else
+      soap->dom->data = t;
+  }
+#endif
+  if (flag == 2)
+    if (soap_s2QName(soap, t, &t))
+      return NULL;
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_wstring_out(struct soap *soap, const wchar_t *s, int flag)
+{ const char *t;
+  char tmp;
+  register soap_wchar c;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { wchar_t *r = (wchar_t*)s;
+    int n = 1;
+    while (*r++)
+      n++;
+    soap->dom->wide = r = (wchar_t*)soap_malloc(soap, n * sizeof(wchar_t));
+    while (n--)
+      *r++ = *s++;
+    return SOAP_OK;
+  }
+#endif
+  while ((c = *s++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+        t = "&#x9;";
+      else
+        t = "\t";
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+        t = "&#xA;";
+      else
+        t = "\n";
+      break;
+    case 13:
+      t = "&#xD;";
+      break;
+    case '&':
+      t = "&amp;";
+      break;
+    case '<':
+      t = "&lt;";
+      break;
+    case '>':
+      if (flag)
+        t = ">";
+      else
+	t = "&gt;";
+      break;
+    case '"':
+      if (flag)
+        t = "&quot;";
+      else
+        t = "\"";
+      break;
+    default:
+      if (c > 0 && c < 0x80)
+      { tmp = (char)c;
+        if (soap_send_raw(soap, &tmp, 1))
+          return soap->error;
+      }
+      else if (soap_pututf8(soap, (unsigned long)c))
+        return soap->error;
+      continue;
+    }
+    if (soap_send(soap, t))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t *
+SOAP_FMAC2
+soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ wchar_t *s;
+  register int i, n = 0;
+  register long l = 0;
+  register soap_wchar c;
+  const char *t = NULL;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading wide string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+    }
+  }
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { if (!(s = (wchar_t*)soap_push_block(soap, sizeof(wchar_t)*SOAP_BLKLEN)))
+      return NULL;
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { if (t)
+      { *s++ = (wchar_t)*t++;
+        if (!*t)
+          t = NULL;
+        continue;
+      }
+      c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        soap_unget(soap, '/');
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_getutf8(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<':
+        if (flag)
+          *s++ = (soap_wchar)'<';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "lt;";
+        }
+        break;
+      case '>':
+        if (flag)
+          *s++ = (soap_wchar)'>';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "gt;";
+        }
+        break;
+      case '"':
+        if (flag)
+          *s++ = (soap_wchar)'"';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "quot;";
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+        *s++ = (wchar_t)c & 0x7FFFFFFF;
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+  soap_size_block(soap, sizeof(wchar_t) * (i + 1));
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+  s = (wchar_t*)soap_save_block(soap, NULL, 0);
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->wide = s;
+#endif
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_int2s(struct soap *soap, int n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outint(struct soap *soap, const char *tag, int id, const int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2int(struct soap *soap, const char *s, int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (int)soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int *
+SOAP_FMAC2
+soap_inint(struct soap *soap, const char *tag, int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (int*)soap_id_enter(soap, soap->id, p, t, sizeof(int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(int), 0, NULL);
+  else if (p)
+  { if (soap_s2int(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_long2s(struct soap *soap, long n)
+{ sprintf(soap->tmpbuf, "%ld", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outlong(struct soap *soap, const char *tag, int id, const long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2long(struct soap *soap, const char *s, long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+long *
+SOAP_FMAC2
+soap_inlong(struct soap *soap, const char *tag, long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (long*)soap_id_enter(soap, soap->id, p, t, sizeof(long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(long), 0, NULL);
+  else if (p)
+  { if (soap_s2long(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_LONG642s(struct soap *soap, LONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_LONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outLONG64(struct soap *soap, const char *tag, int id, const LONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_LONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2LONG64(struct soap *soap, const char *s, LONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOLL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoll(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_LONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+LONG64 *
+SOAP_FMAC2
+soap_inLONG64(struct soap *soap, const char *tag, LONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (LONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(LONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (LONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(LONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2LONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_byte2s(struct soap *soap, char n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outbyte(struct soap *soap, const char *tag, int id, const char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2byte(struct soap *soap, const char *s, char *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -128 || n > 127)
+      soap->error = SOAP_TYPE;
+    *p = (char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_inbyte(struct soap *soap, const char *tag, char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (char*)soap_id_enter(soap, soap->id, p, t, sizeof(char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(char), 0, NULL);
+  else if (p)
+  { if (soap_s2byte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_short2s(struct soap *soap, short n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outshort(struct soap *soap, const char *tag, int id, const short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2short(struct soap *soap, const char *s, short *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -32768 || n > 32767)
+      soap->error = SOAP_TYPE;
+    *p = (short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+short *
+SOAP_FMAC2
+soap_inshort(struct soap *soap, const char *tag, short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (short*)soap_id_enter(soap, soap->id, p, t, sizeof(short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(short), 0, NULL);
+  else if (p)
+  { if (soap_s2short(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_float2s(struct soap *soap, float n)
+{ const char *s;
+  if (soap_isnan((double)n))
+    s = "NaN";
+  else if (soap_ispinff(n))
+    s = "INF";
+  else if (soap_isninff(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->float_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outfloat(struct soap *soap, const char *tag, int id, const float *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_float2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2float(struct soap *soap, const char *s, float *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = FLT_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = FLT_NAN;
+    else
+    {
+/* On some systems, strtof appears to be broken or doesn't link: use with caution */
+#if defined(HAVE_STRTOF)
+      char *r;
+      *p = strtof((char*)s, &r);
+      if (*r)
+#elif defined(HAVE_STRTOD)
+      char *r;
+      *p = (float)strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%g", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static int soap_isnumeric(struct soap *soap, const char *type)
+{ if (soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":float")
+   && soap_match_tag(soap, soap->type, ":double")
+   && soap_match_tag(soap, soap->type, ":decimal")
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return SOAP_ERR;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+float *
+SOAP_FMAC2
+soap_infloat(struct soap *soap, const char *tag, float *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (float*)soap_id_enter(soap, soap->id, p, t, sizeof(float), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (float*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(float), 0, NULL);
+  else if (p)
+  { if (soap_s2float(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_double2s(struct soap *soap, double n)
+{ const char *s;
+  if (soap_isnan(n))
+    s = "NaN";
+  else if (soap_ispinfd(n))
+    s = "INF";
+  else if (soap_isninfd(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->double_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdouble(struct soap *soap, const char *tag, int id, const double *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_double2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2double(struct soap *soap, const char *s, double *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = DBL_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = DBL_NAN;
+    else
+    {
+#ifdef HAVE_STRTOD
+      char *r;
+      *p = strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%lg", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+double *
+SOAP_FMAC2
+soap_indouble(struct soap *soap, const char *tag, double *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (double*)soap_id_enter(soap, soap->id, p, t, sizeof(double), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (double*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(double), 0, NULL);
+  else if (p)
+  { if (soap_s2double(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedByte2s(struct soap *soap, unsigned char n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedByte(struct soap *soap, const char *tag, int id, const unsigned char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedByte(struct soap *soap, const char *s, unsigned char *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 255)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned char *
+SOAP_FMAC2
+soap_inunsignedByte(struct soap *soap, const char *tag, unsigned char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned char*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned char), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedByte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedShort2s(struct soap *soap, unsigned short n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedShort(struct soap *soap, const char *tag, int id, const unsigned short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedShort(struct soap *soap, const char *s, unsigned short *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 65535)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned short *
+SOAP_FMAC2
+soap_inunsignedShort(struct soap *soap, const char *tag, unsigned short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned short*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned short), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedShort(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedInt2s(struct soap *soap, unsigned int n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedInt(struct soap *soap, const char *tag, int id, const unsigned int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedInt(struct soap *soap, const char *s, unsigned int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (unsigned int)soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned int *
+SOAP_FMAC2
+soap_inunsignedInt(struct soap *soap, const char *tag, unsigned int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned int*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned int), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedInt(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedLong2s(struct soap *soap, unsigned long n)
+{ sprintf(soap->tmpbuf, "%lu", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedLong(struct soap *soap, const char *tag, int id, const unsigned long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedLong(struct soap *soap, const char *s, unsigned long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned long *
+SOAP_FMAC2
+soap_inunsignedLong(struct soap *soap, const char *tag, unsigned long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned long*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned long), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedLong(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_ULONG642s(struct soap *soap, ULONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_ULONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outULONG64(struct soap *soap, const char *tag, int id, const ULONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_ULONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2ULONG64(struct soap *soap, const char *s, ULONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOULL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoull(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_ULONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+ULONG64 *
+SOAP_FMAC2
+soap_inULONG64(struct soap *soap, const char *tag, ULONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (ULONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(ULONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (ULONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(ULONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2ULONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2string(struct soap *soap, const char *s, char **t)
+{ *t = NULL;
+  if (s)
+  { if (!(*t = soap_strdup(soap, s)))
+      return soap->error = SOAP_EOM;
+    if (!(soap->mode & (SOAP_ENC_LATIN | SOAP_C_UTFSTRING)))
+    { /* TODO: consider truncating UTF8 to ASCII for regular XML attribute strings? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2QName(struct soap *soap, const char *s, char **t)
+{ if (s)
+  { struct soap_nlist *np;
+    const char *p;
+    if (!strncmp(s, "xml:", 4))
+    { *t = soap_strdup(soap, s);
+      return SOAP_OK;
+    }
+    np = soap->nlist;
+    p = strchr(s, ':');
+    if (p)
+    { register int n = p - s;
+      while (np && (strncmp(np->id, s, n) || np->id[n]))
+        np = np->next;
+      p++;
+    }
+    else
+    { while (np && *np->id)
+        np = np->next;
+      p = s;
+    }
+    if (np)
+    { if (np->index >= 0 && soap->local_namespaces)
+      { register const char *q = soap->local_namespaces[np->index].id;
+        if (q)
+        { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(q) + 2)))
+            sprintf(*t, "%s:%s", q, p);
+          return SOAP_OK;
+        }
+      }
+      if (np->ns)
+      { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(np->ns) + 4)))
+          sprintf(*t, "\"%s\":%s", np->ns, p);
+        return SOAP_OK;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined (index=%d, URI=%s)\n", s, np->index, np->ns?np->ns:""));
+      return soap->error = SOAP_NAMESPACE; 
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined, assuming empty namespace\n", s));
+    if ((*t = (char*)soap_malloc(soap, strlen(p) + 4)))
+      sprintf(*t, "\"\":%s", p);
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_QName2s(struct soap *soap, const char *s)
+{ struct Namespace *p;
+  char *t;
+  int n;
+  if (!s || *s != '"')
+  {
+#ifndef WITH_LEAN
+    if (s && (soap->mode & SOAP_XML_CANONICAL))
+    { t = (char*)strchr(s, ':');
+      if (t)
+        soap_utilize_ns(soap, s, t - s);
+    }
+#endif
+    return s;
+  }
+  s++;
+  if ((p = soap->local_namespaces))
+  { for (; p->id; p++)
+    { if (p->ns)
+        if (!soap_tag_cmp(s, p->ns))
+          break;
+      if (p->in)
+        if (!soap_tag_cmp(s, p->in))
+          break;
+    }
+    if (p && p->id)
+    { s = strchr(s, '"');
+      if (s)
+      { t = (char*)soap_malloc(soap, strlen(p->id) + strlen(s));
+        strcpy(t, p->id);
+	strcat(t, s + 1);
+        return t;
+      }
+    }
+  }
+  t = (char*)strchr(s, '"');
+  if (t)
+    n = t - s;
+  else
+    n = 0;
+  t = soap_strdup(soap, s);
+  t[n] = '\0';
+  sprintf(soap->tmpbuf, "xmlns:_%d", soap->idnum++);
+  soap_set_attr(soap, soap->tmpbuf, t);
+  s = strchr(s, '"');
+  if (s)
+  { t = (char*)soap_malloc(soap, strlen(soap->tmpbuf) + strlen(s) - 6);
+    strcpy(t, soap->tmpbuf + 6);
+    strcat(t, s + 1);
+  }
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2wchar(struct soap *soap, const char *s, wchar_t **t)
+{ wchar_t *r;
+  if (!s)
+    *t = NULL;
+  else
+  { *t = r = (wchar_t*)soap_malloc(soap, sizeof(wchar_t) * (strlen(s) + 1));
+    if (!r)
+      return soap->error;
+    if (soap->mode & SOAP_ENC_LATIN)
+    { while (*s)
+        *r++ = (wchar_t)*s++;
+    }
+    else
+    { /* Convert UTF8 to wchar */
+      while (*s)
+      { register soap_wchar c, c1, c2, c3, c4;
+        c = *s++;
+        if (c < 0x80)
+	  *r++ = (wchar_t)c;
+	else
+        { c1 = (soap_wchar)*s++ & 0x3F;
+          if (c < 0xE0)
+            *r++ = (wchar_t)(((soap_wchar)(c & 0x1F) << 6) | c1);
+          else
+	  { c2 = (soap_wchar)*s++ & 0x3F;
+            if (c < 0xF0)
+              *r++ = (wchar_t)(((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2);
+            else
+	    { c3 = (soap_wchar)*s++ & 0x3F;
+              if (c < 0xF8)
+                *r++ = (wchar_t)(((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3);
+              else
+	      { c4 = (soap_wchar)*s++ & 0x3F;
+                if (c < 0xFC)
+                  *r++ = (wchar_t)(((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4);
+                else
+		  *r++ = (wchar_t)(((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(*s++ & 0x3F));
+              }
+            }
+          }
+        }
+      }
+    }
+    *r = L'\0';
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_wchar2s(struct soap *soap, const wchar_t *s)
+{ register soap_wchar c;
+  register char *r, *t;
+  const wchar_t *q = s;
+  size_t n = 0;
+  while ((c = *q++))
+  { if (c > 0 && c < 0x80)
+      n++;
+    else
+      n += 6;
+  }
+  r = t = (char*)soap_malloc(soap, n + 1);
+  if (r)
+  { /* Convert wchar to UTF8 */
+    while ((c = *s++))
+    { if (c > 0 && c < 0x80)
+        *t++ = (char)c;
+      else
+      { if (c < 0x0800)
+          *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+        else
+        { if (c < 0x010000)
+            *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+          else
+          { if (c < 0x200000)
+              *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+            else
+            { if (c < 0x04000000)
+                *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+              else
+              { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+              }
+              *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+            }     
+            *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+        }
+        *t++ = (char)(0x80 | (c & 0x3F));
+      }
+    }
+    *t = '\0';
+  }
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outstring(struct soap *soap, const char *tag, int id, char *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_string_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_instring(struct soap *soap, const char *tag, char **p, const char *type, int t, int flag, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_string_in(soap, flag, minlen, maxlen);
+    if (!*p || !(char*)soap_id_enter(soap, soap->id, *p, t, sizeof(char*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (char**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(char**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwstring(struct soap *soap, const char *tag, int id, wchar_t *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_wstring_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type, int t, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_wstring_in(soap, 1, minlen, maxlen);
+    if (!*p || !(wchar_t*)soap_id_enter(soap, soap->id, *p, t, sizeof(wchar_t*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (wchar_t**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(wchar_t**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static time_t
+soap_timegm(struct tm *T)
+{
+#if defined(HAVE_TIMEGM)
+  return timegm(T);
+#else
+  time_t t, g, z;
+#ifdef HAVE_GMTIME_R
+  struct tm tm, *tmp = &tm;
+#else
+  struct tm *tmp;
+#endif
+  t = mktime(T);
+  if (t == -1)
+    return -1;
+#ifdef HAVE_GMTIME_R
+  gmtime_r(&t, tmp);
+#else
+  tmp = gmtime(&t);
+#endif
+  tmp->tm_isdst = 0;
+  g = mktime(tmp);
+  if (g == -1)
+    return -1;
+  z = g - t;
+  return t - z;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_dateTime2s(struct soap *soap, time_t n)
+{ struct tm T, *pT = &T;
+#if defined(HAVE_GMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PGMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_PGMTIME)
+  if (gmtime(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GMTIME)
+  if ((pT = gmtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GETTIMEOFDAY)
+  struct timezone tz;
+  memset((void*)&tz, 0, sizeof(tz));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+#endif
+#elif defined(HAVE_FTIME)
+  struct timeb t;
+  memset((void*)&t, 0, sizeof(t));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+  /* The following defines were added for VxWorks*/
+# elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf+strlen(soap->tmpbuf), "%+03d:%02d", t.timezone/60, abs(t.timezone)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+# endif
+#elif defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#else
+  if ((pT = localtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#endif
+  else
+    strcpy(soap->tmpbuf, "1969-12-31T23:59:59Z");
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdateTime(struct soap *soap, const char *tag, int id, const time_t *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_dateTime2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2dateTime(struct soap *soap, const char *s, time_t *p)
+{ if (s)
+  { struct tm T;
+    char zone[16];
+    const char *t;
+    memset((void*)&T, 0, sizeof(T));
+    zone[sizeof(zone)-1] = '\0';
+    if (strchr(s, '-'))
+      t = "%d-%d-%dT%d:%d:%d%15s";
+    else if (strchr(s, ':'))
+      t = "%4d%2d%2dT%d:%d:%d%15s";
+    else /* parse non-XSD-standard alternative ISO 8601 format */
+      t = "%4d%2d%2dT%2d%2d%2d%15s";
+    sscanf(s, t, &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, zone);
+    if (T.tm_year == 1)
+      T.tm_year = 70;
+    else
+      T.tm_year -= 1900;
+    T.tm_mon--;
+    if (*zone)
+    { if (*zone == '.')
+      { for (s = zone + 1; *s; s++)
+          if (*s < '0' || *s > '9')
+            break;
+      }
+      else
+        s = zone;
+      if (*s == '+' || *s == '-')
+      { int h = 0, m = 0;
+        if (s[3] == ':')
+	{ sscanf(s, "%d:%d", &h, &m);
+	  if (h < 0)
+	    m = -m;
+	}
+	else
+	{ m = (int)atol(s);
+	  h = m / 100;
+	  m = m % 100;
+	}
+        T.tm_hour -= h;
+        T.tm_min -= m;
+      }
+      T.tm_isdst = 0;
+      *p = soap_timegm(&T);
+    }
+    else
+    { T.tm_isdst = -1;
+      *p = mktime(&T); /* no time zone: suppose it is localtime? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+time_t *
+SOAP_FMAC2
+soap_indateTime(struct soap *soap, const char *tag, time_t *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":dateTime"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (time_t*)soap_id_enter(soap, soap->id, p, t, sizeof(time_t), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (time_t*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(time_t), 0, NULL);
+  else if (p)
+  { if (soap_s2dateTime(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outliteral(struct soap *soap, const char *tag, char *const*p)
+{ int i;
+  const char *t = NULL;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p && *p)
+  { if (soap_send(soap, *p))
+      return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_inliteral(struct soap *soap, const char *tag, char **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_string_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwliteral(struct soap *soap, const char *tag, wchar_t *const*p)
+{ int i;
+  const char *t = NULL;
+  wchar_t c;
+  const wchar_t *s;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p)
+  { s = *p;
+    while ((c = *s++))
+      if (soap_pututf8(soap, (unsigned char)c))
+        return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwliteral(struct soap *soap, const char *tag, wchar_t **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_wstring_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_token(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF || soap_blank(c))
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_value(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  for (s--; i > 0; i--, s--)
+    if (!soap_blank(*s))
+      break;
+  s[1] = '\0';
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->data = soap_strdup(soap, soap->tmpbuf);
+#endif
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEANER) || !defined(WITH_NOHTTP)
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getline(struct soap *soap, char *s, int len)
+{ int i = len;
+  soap_wchar c = 0;
+  for (;;)
+  { while (--i > 0)
+    { c = soap_getchar(soap);
+      if (c == '\r' || c == '\n')
+        break;
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+    if (c != '\n')
+      c = soap_getchar(soap); /* got \r, now get \n */
+    if (c == '\n')
+    { *s = '\0';
+      if (i+1 == len) /* empty line: end of HTTP/MIME header */
+        break;
+      c = soap_unget(soap, soap_getchar(soap));
+      if (c != ' ' && c != '\t') /* HTTP line continuation? */
+        break;
+    }
+    else if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static size_t
+soap_count_attachments(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  register struct soap_multipart *content;
+  register size_t count = soap->count;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the message size with attachments, current count=%lu\n", (unsigned long)count));
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of DIME attachments\n"));
+    for (content = soap->dime.first; content; content = content->next)
+    { count += 12 + ((content->size+3)&(~3));
+      if (content->id)
+        count += ((strlen(content->id)+3)&(~3));
+      if (content->type)
+        count += ((strlen(content->type)+3)&(~3));
+      if (content->options)
+        count += ((((unsigned char)content->options[2] << 8) | ((unsigned char)content->options[3]))+7)&(~3);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of DIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary)
+  { register size_t n = strlen(soap->mime.boundary);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of MIME attachments\n"));
+    for (content = soap->mime.first; content; content = content->next)
+    { register const char *s;
+      /* count \r\n--boundary\r\n */
+      count += 6 + n;
+      /* count Content-Type: ...\r\n */
+      if (content->type)
+        count += 16 + strlen(content->type);
+      /* count Content-Transfer-Encoding: ...\r\n */
+      s = soap_str_code(mime_codes, content->encoding);
+      if (s)
+        count += 29 + strlen(s);
+      /* count Content-ID: ...\r\n */
+      if (content->id)
+        count += 14 + strlen(content->id);
+      /* count Content-Location: ...\r\n */
+      if (content->location)
+        count += 20 + strlen(content->location);
+      /* count Content-Description: ...\r\n */
+      if (content->description)
+        count += 23 + strlen(content->location);
+      /* count \r\n...content */
+      count += 2 + content->size;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of MIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+    /* count \r\n--boundary-- */
+    count += 6 + n;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New count is %lu bytes\n", (unsigned long)count));
+  return count;
+#else
+  return soap->count;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_putdimefield(struct soap *soap, const char *s, size_t n)
+{ if (soap_send_raw(soap, s, n))
+    return soap->error;
+  return soap_send_raw(soap, SOAP_STR_PADDING, -(long)n&3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_dime_option(struct soap *soap, unsigned short optype, const char *option)
+{ size_t n;
+  char *s = NULL;
+  if (option)
+  { n = strlen(option);
+    s = (char*)soap_malloc(soap, n + 5);
+    if (s)
+    { s[0] = optype >> 8;
+      s[1] = optype & 0xFF;
+      s[2] = n >> 8;
+      s[3] = n & 0xFF;
+      strcpy(s + 4, option);
+    }
+  }
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdimehdr(struct soap *soap)
+{ unsigned char tmp[12];
+  size_t optlen = 0, idlen = 0, typelen = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Put DIME header id='%s'\n", soap->dime.id?soap->dime.id:""));
+  if (soap->dime.options)
+    optlen = (((unsigned char)soap->dime.options[2] << 8) | ((unsigned char)soap->dime.options[3])) + 4;
+  if (soap->dime.id)
+    idlen = strlen(soap->dime.id);
+  if (soap->dime.type)
+    typelen = strlen(soap->dime.type);
+  tmp[0] = SOAP_DIME_VERSION | (soap->dime.flags & 0x7);
+  tmp[1] = soap->dime.flags & 0xF0;
+  tmp[2] = optlen >> 8;
+  tmp[3] = optlen & 0xFF;
+  tmp[4] = idlen >> 8;
+  tmp[5] = idlen & 0xFF;
+  tmp[6] = typelen >> 8;
+  tmp[7] = typelen & 0xFF;
+  tmp[8] = soap->dime.size >> 24;
+  tmp[9] = (soap->dime.size >> 16) & 0xFF;
+  tmp[10] = (soap->dime.size >> 8) & 0xFF;
+  tmp[11] = soap->dime.size & 0xFF;
+  if (soap_send_raw(soap, (char*)tmp, 12)
+   || soap_putdimefield(soap, soap->dime.options, optlen)
+   || soap_putdimefield(soap, soap->dime.id, idlen)
+   || soap_putdimefield(soap, soap->dime.type, typelen))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return SOAP_OK;
+  for (content = soap->dime.first; content; content = content->next)
+  { void *handle;
+    soap->dime.size = content->size;
+    soap->dime.id = content->id;
+    soap->dime.type = content->type;
+    soap->dime.options = content->options;
+    soap->dime.flags = SOAP_DIME_VERSION | SOAP_DIME_MEDIA;
+    if (soap->fdimereadopen && ((handle = soap->fdimereadopen(soap, (void*)content->ptr, content->id, content->type, content->options)) || soap->error))
+    { size_t size = content->size;
+      if (!handle)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadopen failed\n"));
+        return soap->error;
+      }
+      if (!content->size && ((soap->mode & SOAP_ENC_XML) || (soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_IO) == SOAP_IO_STORE))
+      { size_t chunksize = sizeof(soap->tmpbuf);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked streaming DIME\n"));
+        do 
+        { size = soap->fdimeread(soap, handle, soap->tmpbuf, chunksize);
+          DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread returned %lu bytes\n", (unsigned long)size));
+          if (size < chunksize)
+ 	  { soap->dime.flags &= ~SOAP_DIME_CF;
+            if (!content->next)
+              soap->dime.flags |= SOAP_DIME_ME;
+	  }
+          else
+            soap->dime.flags |= SOAP_DIME_CF;
+	  soap->dime.size = size;
+          if (soap_putdimehdr(soap)
+	   || soap_putdimefield(soap, soap->tmpbuf, size))
+            break;
+          if (soap->dime.id)
+ 	  { soap->dime.flags &= ~(SOAP_DIME_MB | SOAP_DIME_MEDIA);
+            soap->dime.id = NULL;
+            soap->dime.type = NULL;
+            soap->dime.options = NULL;
+          }  
+        } while (size >= chunksize);
+      }
+      else
+      { if (!content->next)
+          soap->dime.flags |= SOAP_DIME_ME;
+        if (soap_putdimehdr(soap))
+          return soap->error;
+        do
+        { size_t bufsize;
+	  if (size < sizeof(soap->tmpbuf))
+            bufsize = size;
+          else
+            bufsize = sizeof(soap->tmpbuf);
+          if (!(bufsize = soap->fdimeread(soap, handle, soap->tmpbuf, bufsize)))
+          { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread failed: insufficient data (%lu bytes remaining from %lu bytes)\n", (unsigned long)size, (unsigned long)soap->dime.size));
+            soap->error = SOAP_EOF;
+	    break;
+          }
+          if (soap_send_raw(soap, soap->tmpbuf, bufsize))
+            break;
+          size -= bufsize;
+        } while (size);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+        soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+      if (soap->fdimereadclose)
+        soap->fdimereadclose(soap, handle);
+    }
+    else
+    { if (!content->next)
+        soap->dime.flags |= SOAP_DIME_ME;
+      if (soap_putdimehdr(soap)
+       || soap_putdimefield(soap, (char*)content->ptr, content->size))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static char *
+soap_getdimefield(struct soap *soap, size_t n)
+{ register soap_wchar c;
+  register int i;
+  register char *s;
+  char *p = NULL;
+  if (n)
+  { p = (char*)soap_malloc(soap, n + 1);
+    if (p)
+    { s = p;
+      for (i = n; i > 0; i--)
+      { if ((int)(c = soap_get1(soap)) == EOF)
+        { soap->error = SOAP_EOF;
+          return NULL;
+        }
+        *s++ = (char)c;
+      }
+      *s = '\0';
+      if ((soap->error = soap_move(soap, -(long)n&3)))
+        return NULL;
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdimehdr(struct soap *soap)
+{ register soap_wchar c;
+  register char *s;
+  register int i;
+  unsigned char tmp[12];
+  size_t optlen, idlen, typelen;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return soap->error = SOAP_DIME_END;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME header\n"));
+  if (soap->dime.buflen || soap->dime.chunksize)
+  { if (soap_move(soap, (long)(soap->dime.size - soap_tell(soap))))
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, soap_getchar(soap)); /* skip padding and get hdr */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... From chunked\n"));
+    return SOAP_OK;
+  }
+  s = (char*)tmp;
+  for (i = 12; i > 0; i--)
+  { if ((int)(c = soap_getchar(soap)) == EOF)
+      return soap->error = SOAP_EOF;
+    *s++ = (char)c;
+  }
+  if ((tmp[0] & 0xF8) != SOAP_DIME_VERSION)
+    return soap->error = SOAP_DIME_MISMATCH;
+  soap->dime.flags = (tmp[0] & 0x7) | (tmp[1] & 0xF0);
+  optlen = (tmp[2] << 8) | tmp[3];
+  idlen = (tmp[4] << 8) | tmp[5];
+  typelen = (tmp[6] << 8) | tmp[7];
+  soap->dime.size = (tmp[8] << 24) | (tmp[9] << 16) | (tmp[10] << 8) | tmp[11];
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME size=%lu flags=0x%X\n", (unsigned long)soap->dime.size, soap->dime.flags));
+  if (!(soap->dime.options = soap_getdimefield(soap, optlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.id = soap_getdimefield(soap, idlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.type = soap_getdimefield(soap, typelen)) && soap->error)
+    return soap->error;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME id=%s, type=%s, options=%s\n", soap->dime.id?soap->dime.id:"", soap->dime.type?soap->dime.type:"", soap->dime.options?soap->dime.options+4:""));
+  if (soap->dime.flags & SOAP_DIME_ME)
+    soap->mode &= ~SOAP_ENC_DIME;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdime(struct soap *soap)
+{ while (soap->dime.flags & SOAP_DIME_CF)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap_move(soap, soap->dime.size))
+      return soap->error = SOAP_EOF;
+  }
+  if (soap_move(soap, ((soap->dime.size+3)&(~3))-soap_tell(soap)))
+    return soap->error = SOAP_EOF;
+  for (;;)
+  { register struct soap_multipart *content;
+    if (soap_getdimehdr(soap))
+      break;
+    if (soap->fdimewriteopen && ((soap->dime.ptr = (char*)soap->fdimewriteopen(soap, soap->dime.id, soap->dime.type, soap->dime.options)) || soap->error))
+    { const char *id, *type, *options;
+      size_t size, n;
+      if (!soap->dime.ptr)
+        return soap->error;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      for (;;)
+      { size = soap->dime.size;
+        for (;;)
+        { n = soap->buflen - soap->bufidx;
+          if (size < n)
+            n = size;
+          if ((soap->error = soap->fdimewrite(soap, (void*)soap->dime.ptr, soap->buf + soap->bufidx, n)))
+            break;
+	  size -= n;
+	  if (!size)
+	  { soap->bufidx += n;
+	    break;
+	  }
+	  if (soap_recv(soap))
+          { soap->error = SOAP_EOF;
+	    goto end;
+          }
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+        { soap->error = SOAP_EOF;
+	  break;
+        }
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          break;
+      }
+end:
+      if (soap->fdimewriteclose)
+        soap->fdimewriteclose(soap, (void*)soap->dime.ptr);
+      soap->dime.size = 0;
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else if (soap->dime.flags & SOAP_DIME_CF)
+    { const char *id, *type, *options;
+      register soap_wchar c;
+      register char *s;
+      register int i;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      if (soap_new_block(soap))
+        return SOAP_EOM;
+      for (;;)
+      { s = (char*)soap_push_block(soap, soap->dime.size);
+        if (!s)
+          return soap->error = SOAP_EOM;
+        for (i = soap->dime.size; i > 0; i--)
+        { if ((int)(c = soap_get1(soap)) == EOF)
+            return soap->error = SOAP_EOF;
+          *s++ = (char)c;
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+          return soap->error = SOAP_EOF;
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          return soap->error;
+      }
+      soap->dime.size = soap->blist->size++; /* allocate one more for '\0' */
+      if (!(soap->dime.ptr = soap_save_block(soap, NULL, 0)))
+        return soap->error;
+      soap->dime.ptr[soap->dime.size] = '\0'; /* force 0-terminated */
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else
+      soap->dime.ptr = soap_getdimefield(soap, soap->dime.size);
+    content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, soap->dime.ptr, soap->dime.size);
+    if (!content)
+      return soap->error = SOAP_EOM;
+    content->id = soap->dime.id;
+    content->type = soap->dime.type;
+    content->options = soap->dime.options;
+    soap_resolve_attachment(soap, content);
+    if (soap->error)
+      return soap->error;
+  }
+  if (soap->error != SOAP_DIME_END)
+    return soap->error;
+  return soap->error = SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmimehdr(struct soap *soap)
+{ struct soap_multipart *content;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  while (!*soap->msgbuf);
+  if (soap->msgbuf[0] == '-' && soap->msgbuf[1] == '-')
+  { char *s = soap->msgbuf + strlen(soap->msgbuf) - 1;
+    /* remove white space */
+    while (soap_blank(*s))
+      s--;
+    s[1] = '\0';
+    if (soap->mime.boundary)
+    { if (strcmp(soap->msgbuf + 2, soap->mime.boundary))
+        return soap->error = SOAP_MIME_ERROR;
+    }
+    else
+      soap->mime.boundary = soap_strdup(soap, soap->msgbuf + 2);
+    if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  if (soap_set_mime_attachment(soap, NULL, 0, SOAP_MIME_NONE, NULL, NULL, NULL, NULL))
+    return soap->error = SOAP_EOM;
+  content = soap->mime.last;
+  for (;;)
+  { register char *key = soap->msgbuf;
+    register char *val;
+    if (!*key)
+      break;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "MIME header: %s\n", key));
+    val = strchr(soap->msgbuf, ':');
+    if (val)
+    { *val = '\0';
+      do val++;
+      while (*val && *val <= 32);
+      if (!soap_tag_cmp(key, "Content-ID"))
+        content->id = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Location"))
+        content->location = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Disposition"))
+        content->id = soap_strdup(soap, soap_get_header_attribute(soap, val, "name"));
+      else if (!soap_tag_cmp(key, "Content-Type"))
+        content->type = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Description"))
+        content->description = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Transfer-Encoding"))
+        content->encoding = (enum soap_mime_encoding)soap_int_code(mime_codes, val, (long)SOAP_MIME_NONE);
+    }
+    if (soap_getline(soap, key, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmime(struct soap *soap)
+{ register soap_wchar c = 0;
+  if (!soap->mime.last)
+    return SOAP_OK;
+  for (;;)
+  { register size_t i, m = 0;
+    register char *s, *t = NULL;
+    struct soap_multipart *content = soap->mime.last;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Parsing MIME content id=%s type=%s\n", content->id?content->id:"", content->type?content->type:""));
+    if (soap_new_block(soap))
+      return soap->error = SOAP_EOM;
+    for (;;)
+    { register short flag = 0;
+      if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+        return soap->error = SOAP_EOM;
+      for (i = 0; i < SOAP_BLKLEN; i++)
+      { if (m > 0)
+        { *s++ = *t++;
+	  m--;
+	}
+	else
+        { if (!flag)
+	  { c = soap_get1(soap);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	  }
+	  if (flag || c == '\r')
+	  { t = soap->tmpbuf;
+	    memset(t, 0, sizeof(soap->tmpbuf));
+            strcpy(t, "\n--");
+            if (soap->mime.boundary)
+	      strncat(t, soap->mime.boundary, sizeof(soap->tmpbuf)-4);
+	    do c = soap_getchar(soap);
+	    while (c == *t++);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	    if (!*--t)
+	      goto end;
+	    *t = (char)c;
+	    flag = (c == '\r');
+	    m = t - soap->tmpbuf + 1 - flag;
+	    t = soap->tmpbuf;
+	    c = '\r';
+	  }
+	  *s++ = (char)c;
+        }
+      }
+    }
+end:
+    *s = '\0'; /* force 0-terminated */
+    content->size = soap_size_block(soap, i+1)-1;
+    content->ptr = soap_save_block(soap, NULL, 0);
+    soap_resolve_attachment(soap, content);
+    if (c == '-' && soap_getchar(soap) == '-')
+      break;
+    while (c != '\r' && (int)c != EOF && soap_blank(c))
+      c = soap_getchar(soap);
+    if (c != '\r' || soap_getchar(soap) != '\n')
+      return soap->error = SOAP_MIME_ERROR;
+    if (soap_getmimehdr(soap))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_match_cid(struct soap *soap, const char *s, const char *t)
+{ register size_t n;
+  if (!s)
+    return 1;
+  if (!strcmp(s, t))
+    return 0;
+  if (!strncmp(s, "cid:", 4))
+    s += 4;
+  n = strlen(t);
+  if (*t == '<')
+  { t++;
+    n -= 2;
+  }
+  if (!strncmp(s, t, n) && !s[n])
+    return 0;
+  soap_decode(soap->tmpbuf, sizeof(soap->tmpbuf), s, SOAP_STR_EOS);
+  if (!strncmp(soap->tmpbuf, t, n) && !soap->tmpbuf[n])
+    return 0;
+  return 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_resolve_attachment(struct soap *soap, struct soap_multipart *content)
+{ if (content->id)
+  { register struct soap_xlist **xp = &soap->xlist;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving attachment data for id=%s\n", content->id));
+    while (*xp)
+    { register struct soap_xlist *xq = *xp;
+      if (!soap_match_cid(soap, xq->id, content->id))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Found matching attachment %s for content id=%s\n", xq->id, content->id));
+	*xp = xq->next;
+        *xq->ptr = (unsigned char*)content->ptr;
+        *xq->size = (int)content->size;
+        *xq->type = (char*)content->type;
+	if (content->options)
+          *xq->options = (char*)content->options;
+        else
+          *xq->options = (char*)content->description;
+	SOAP_FREE(soap, xq);
+      }
+      else
+        xp = &(*xp)->next;
+    }
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmimehdr(struct soap *soap, struct soap_multipart *content)
+{ const char *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "MIME attachment type=%s\n", content->type?content->type:""));
+  if (soap_send3(soap, "\r\n--", soap->mime.boundary, "\r\n"))
+    return soap->error;
+  if (content->type && soap_send3(soap, "Content-Type: ", content->type, "\r\n"))
+    return soap->error;
+  s = soap_str_code(mime_codes, content->encoding);
+  if (s && soap_send3(soap, "Content-Transfer-Encoding: ", s, "\r\n"))
+    return soap->error;
+  if (content->id && soap_send3(soap, "Content-ID: ", content->id, "\r\n"))
+    return soap->error;
+  if (content->location && soap_send3(soap, "Content-Location: ", content->location, "\r\n"))
+    return soap->error;
+  if (content->description && soap_send3(soap, "Content-Description: ", content->description, "\r\n"))
+    return soap->error;
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_MIME) || !soap->mime.boundary)
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending MIME attachments\n"));
+  for (content = soap->mime.first; content; content = content->next)
+    if (soap_putmimehdr(soap, content)
+     || soap_send_raw(soap, content->ptr, content->size))
+      return soap->error;
+  return soap_send3(soap, "\r\n--", soap->mime.boundary, "--");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_dime(struct soap *soap)
+{ soap->omode |= SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_mime(struct soap *soap, const char *boundary, const char *start)
+{ soap->omode |= SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = soap_strdup(soap, boundary);
+  soap->mime.start = soap_strdup(soap, start);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_dime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_mime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart*
+soap_new_multipart(struct soap *soap, struct soap_multipart **first, struct soap_multipart **last, char *ptr, size_t size)
+{ struct soap_multipart *content;
+  content = (struct soap_multipart*)soap_malloc(soap, sizeof(struct soap_multipart));
+  if (content)
+  { content->next = NULL;
+    content->ptr = ptr;
+    content->size = size;
+    content->id = NULL;
+    content->type = NULL;
+    content->options = NULL;
+    content->encoding = SOAP_MIME_NONE;
+    content->location = NULL;
+    content->description = NULL;
+    if (!*first)
+      *first = content;
+    if (*last)
+      (*last)->next = content;
+    *last = content;
+  }
+  return content;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_dime_attachment(struct soap *soap, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->options = soap_dime_option(soap, optype, option);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_mime_attachment(struct soap *soap, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->encoding = encoding;
+  content->location = soap_strdup(soap, location);
+  content->description = soap_strdup(soap, description);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap_multipart*
+SOAP_FMAC2
+soap_next_multipart(struct soap_multipart *content)
+{ if (content)
+    return content->next;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_select_mime_boundary(struct soap *soap)
+{ while (!soap->mime.boundary || soap_valid_mime_boundary(soap))
+  { register char *s = soap->mime.boundary;
+    register size_t n = 0;
+    if (s)
+      n = strlen(s);
+    if (n < 16)
+    { n = 64;
+      s = soap->mime.boundary = (char*)soap_malloc(soap, n + 1);
+      if (!s)
+        return;
+    }
+    strcpy(s, "==");
+    s += 2;
+    n -= 4;
+    while (n)
+    { *s++ = soap_base64o[soap_random & 0x3F];
+      n--;
+    }
+    strcpy(s, "==");
+  }
+  if (!soap->mime.start)
+    soap->mime.start = "<SOAP-ENV:Envelope>";
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_valid_mime_boundary(struct soap *soap)
+{ register struct soap_multipart *content;
+  register size_t k = strlen(soap->mime.boundary);
+  for (content = soap->mime.first; content; content = content->next)
+  { if (content->ptr && content->size >= k)
+    { register const char *p = (const char*)content->ptr; 
+      register size_t i;
+      for (i = 0; i < content->size - k; i++, p++)
+        if (!strncmp(p, soap->mime.boundary, k))
+          return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	HTTP cookie handling
+ *
+\******************************************************************************/
+
+#ifdef WITH_COOKIES
+/******************************************************************************/
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_encode_cookie(const char *s, char *t, size_t len)
+{ register int c;
+  register size_t n = len;
+  while ((c = *s++) && --n > 0)
+  { if (c > ' ' && c < 128 && !strchr("()<>@,;:\\\"/[]?={}", c))
+      *t++ = c;
+    else if (n > 2)
+    { *t++ = '%';
+      *t++ = (c >> 4) + (c > 159 ? '7' : '0');
+      c &= 0xF;
+      *t++ = c + (c > 9 ? '7' : '0');
+      n -= 2;
+    }
+    else
+      break;
+  }
+  *t = '\0';
+  return len - n;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  size_t n;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (*path == '/')
+    path++;
+  n = strlen(path);
+  for (p = soap->cookies; p; p = p->next)
+    if (!strcmp(p->name, name)
+     && domain
+     && p->domain
+     && !strcmp(p->domain, domain)
+     && !strncmp(p->path, path, n))
+      break;
+  return p;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_set_cookie(struct soap *soap, const char *name, const char *value, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  int n;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set cookie: %s=%s domain=%s path=%s\n", name, value?value:"", domain?domain:"", path?path:""));
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return NULL;
+  }
+  if (*path == '/')
+    path++;
+  q = soap_cookie(soap, name, domain, path);
+  if (!q)
+  { if ((q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+    { if ((q->name = (char*)SOAP_MALLOC(soap, strlen(name)+1)))
+        strcpy(q->name, name);
+      q->value = NULL;
+      q->domain = NULL;
+      q->path = NULL;
+      q->expire = -1;
+      q->version = 0;
+      q->secure = 0;
+      q->modified = 0;
+      for (p = &soap->cookies, n = soap->cookie_max; *p && n; p = &(*p)->next, n--)
+        if (!strcmp((*p)->name, name) && (*p)->path && strcmp((*p)->path, path) < 0)
+          break;
+      if (n)
+      { q->next = *p;
+        *p = q;
+      }
+      else
+      { SOAP_FREE(soap, q->name);
+        SOAP_FREE(soap, q);
+        q = NULL;
+      }
+    }
+  }
+  else
+    q->modified = 1;
+  if (q)
+  { if (q->value)
+    { SOAP_FREE(soap, q->value);
+      q->value = NULL;
+    }
+    if (q->domain)
+    { SOAP_FREE(soap, q->domain);
+      q->domain = NULL;
+    }
+    if (q->path)
+    { SOAP_FREE(soap, q->path);
+      q->path = NULL;
+    }
+    if (value && *value && (q->value = (char*)SOAP_MALLOC(soap, strlen(value)+1)))
+      strcpy(q->value, value);
+    if (domain && *domain && (q->domain = (char*)SOAP_MALLOC(soap, strlen(domain)+1)))
+      strcpy(q->domain, domain);
+    if (path && *path && (q->path = (char*)SOAP_MALLOC(soap, strlen(path)+1)))
+      strcpy(q->path, path);
+    q->session = 1;
+    q->env = 0;
+  }
+  return q;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!domain)
+  { soap_set_receiver_error(soap, "Cookie domain not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (*path == '/')
+    path++;
+  for (p = &soap->cookies, q = *p; q; q = *p)
+    if (!strcmp(q->name, name) && !strcmp(q->domain, domain) && !strncmp(q->path, path, strlen(q->path)))
+    { if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+      p = &q->next;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_env_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)) && p->env)
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_cookie_expire(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->expire;
+  return -1;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_expire(struct soap *soap, const char *name, long expire, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->expire = expire;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 1;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_clr_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 0;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putsetcookies(struct soap *soap)
+{ struct soap_cookie *p;
+  char *s, tmp[4096];
+  const char *t;
+  for (p = soap->cookies; p; p = p->next)
+  { if (p->modified || !p->env)
+    { s = tmp;
+      if (p->name)
+        s += soap_encode_cookie(p->name, s, tmp-s+4064);
+      if (p->value && *p->value)
+      { *s++ = '=';
+        s += soap_encode_cookie(p->value, s, tmp-s+4064);
+      }
+      if (p->domain && (int)strlen(p->domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", p->domain);
+      else if (soap->cookie_domain && (int)strlen(soap->cookie_domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", soap->cookie_domain);
+      strcat(s, ";Path=\"/");
+      if (p->path)
+        t = p->path;
+      else
+        t = soap->cookie_path;
+      if (t)
+      { if (*t == '/')
+          t++;
+        if ((int)strlen(t) < tmp-s+4064)
+          strcat(s, t);
+      }
+      s += strlen(s);
+      *s++ = '"';
+      if (p->version > 0)
+        sprintf(s, ";Version=%u", p->version);
+      if (p->expire >= 0)
+        sprintf(s, ";Max-Age=%ld", p->expire);
+      if (p->secure)
+        strcat(s, ";Secure");
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set-Cookie: %s\n", tmp));
+      if ((soap->error = soap->fposthdr(soap, "Set-Cookie", tmp)))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putcookies(struct soap *soap, const char *domain, const char *path, int secure)
+{ struct soap_cookie **p, *q;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  char *s, tmp[4096];
+  p = &soap->cookies;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending cookies for domain=%s path=%s\n", domain, path));
+  if (*path == '/')
+    path++;
+  while ((q = *p))
+  { if (q->expire && now > q->expire)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie %s expired\n", q->name));
+      SOAP_FREE(soap, q->name);
+      if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+    { size_t domlen = 0;
+      if (q->domain)
+      { const char *s = strchr(q->domain, ':');
+        if (s)
+	  domlen = s - q->domain;
+	else
+          domlen = strlen(q->domain);
+      }
+      if ((!q->domain || !strncmp(q->domain, domain, domlen))
+          && (!q->path || !strncmp(q->path, path, strlen(q->path)))
+          && (!q->secure || secure))
+      { s = tmp;
+        if (q->version != version)
+        { sprintf(s, "$Version=%u;", q->version);
+          version = q->version;
+        }
+        if (q->name)
+          s += soap_encode_cookie(q->name, s, tmp-s+4080);
+        if (q->value && *q->value)
+        { *s++ = '=';
+          s += soap_encode_cookie(q->value, s, tmp-s+4080);
+        }
+        if (q->path && (int)strlen(q->path) < tmp-s+4080)
+        { sprintf(s, ";$Path=\"/%s\"", (*q->path == '/' ? q->path + 1 : q->path));
+          s += strlen(s);
+        }
+        if (q->domain && (int)strlen(q->domain) < tmp-s+4080)
+          sprintf(s, ";$Domain=\"%s\"", q->domain);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie: %s\n", tmp));
+        if ((soap->error = soap->fposthdr(soap, "Cookie", tmp)))
+          return soap->error;
+      }
+      p = &q->next;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_getcookies(struct soap *soap, const char *val)
+{ struct soap_cookie *p = NULL, *q;
+  const char *s;
+  char *t, tmp[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  char *domain = NULL;
+  char *path = NULL;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  if (!val)
+    return;
+  s = val;
+  while (*s)
+  { s = soap_decode_key(tmp, sizeof(tmp), s);
+    if (!soap_tag_cmp(tmp, "$Version"))
+    { if ((s = soap_decode_val(tmp, sizeof(tmp), s)))
+      { if (p)
+          p->version = (int)atol(tmp);
+        else
+          version = (int)atol(tmp);
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Path"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->path)
+          SOAP_FREE(soap, p->path);
+        p->path = t;
+      }
+      else
+      { if (path)
+          SOAP_FREE(soap, path);
+        path = t;
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Domain"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->domain)
+          SOAP_FREE(soap, p->domain);
+	p->domain = t;
+      }
+      else
+      { if (domain)
+          SOAP_FREE(soap, domain);
+        domain = t;
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Path"))
+    { if (p->path)
+        SOAP_FREE(soap, p->path);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->path = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->path, tmp);
+      }
+      else
+        p->path = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Domain"))
+    { if (p->domain)
+        SOAP_FREE(soap, p->domain);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->domain = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->domain, tmp);
+      }
+      else
+        p->domain = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Version"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->version = (unsigned int)atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Max-Age"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->expire = now + atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Expires"))
+    { struct tm T;
+      char a[3]; 
+      static const char mns[] = "anebarprayunulugepctovec";
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (strlen(tmp) > 20)
+      { memset((void*)&T, 0, sizeof(T));
+        a[0] = tmp[4];
+        a[1] = tmp[5];
+        a[2] = '\0';
+        T.tm_mday = (int)atol(a);
+        a[0] = tmp[8];
+        a[1] = tmp[9];
+        T.tm_mon = (strstr(mns, a) - mns) / 2;
+        a[0] = tmp[11];
+        a[1] = tmp[12];
+        T.tm_year = 100 + (int)atol(a);
+        a[0] = tmp[13];
+        a[1] = tmp[14];
+        T.tm_hour = (int)atol(a);
+        a[0] = tmp[16];
+        a[1] = tmp[17];
+        T.tm_min = (int)atol(a);
+        a[0] = tmp[19];
+        a[1] = tmp[20];
+        T.tm_sec = (int)atol(a);
+        p->expire = soap_timegm(&T);
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Secure"))
+      p->secure = 1;
+    else
+    { if (p)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+        if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+        { q->version = p->version;
+          q->expire = p->expire;
+          q->secure = p->secure;
+          q->env = 1;
+        }
+        if (p->name)
+          SOAP_FREE(soap, p->name);
+        if (p->value)
+          SOAP_FREE(soap, p->value);
+        if (p->domain)
+          SOAP_FREE(soap, p->domain);
+        if (p->path)
+          SOAP_FREE(soap, p->path);
+        SOAP_FREE(soap, p);
+      }
+      if ((p = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      { p->name = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+        strcpy(p->name, tmp);
+        s = soap_decode_val(tmp, sizeof(tmp), s);
+        if (*tmp)
+        { p->value = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+          strcpy(p->value, tmp);
+        }
+        else
+          p->value = NULL;
+        p->domain = domain;
+        p->path = path;
+        p->expire = 0;
+        p->secure = 0;
+        p->version = version;
+      }
+    }
+  }
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+    if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+    { q->version = p->version;
+      q->expire = p->expire;
+      q->secure = p->secure;
+      q->env = 1;
+    }
+    if (p->name)
+      SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+  if (domain)
+    SOAP_FREE(soap, domain);
+  if (path)
+    SOAP_FREE(soap, path);
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getenv_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  const char *s;
+  char key[4096], val[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  if (!(s = getenv("HTTP_COOKIE")))
+    return SOAP_ERR;
+  do
+  { s = soap_decode_key(key, sizeof(key), s);
+    s = soap_decode_val(val, sizeof(val), s);
+    p = soap_set_cookie(soap, key, val, NULL, NULL);
+    if (p)
+      p->env = 1;
+  } while (*s);
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_copy_cookies(struct soap *soap)
+{ struct soap_cookie *p, **q, *r;
+  q = &r;
+  for (p = soap->cookies; p; p = p->next)
+  { if (!(*q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      return r;
+    **q = *p;
+    if (p->name)
+    { if (((*q)->name = (char*)SOAP_MALLOC(soap, strlen(p->name)+1)))
+        strcpy((*q)->name, p->name);
+    }
+    if (p->value)
+    { if (((*q)->value = (char*)SOAP_MALLOC(soap, strlen(p->value)+1)))
+        strcpy((*q)->value, p->value);
+    }
+    if (p->domain)
+    { if (((*q)->domain = (char*)SOAP_MALLOC(soap, strlen(p->domain)+1)))
+        strcpy((*q)->domain, p->domain);
+    }
+    if (p->path)
+    { if (((*q)->path = (char*)SOAP_MALLOC(soap, strlen(p->path)+1)))
+        strcpy((*q)->path, p->path);
+    }
+    q = &(*q)->next;
+  }
+  *q = NULL;
+  return r;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  for (p = soap->cookies; p; p = soap->cookies)
+  { soap->cookies = p->next;
+    SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+}
+
+/******************************************************************************/
+#endif /* WITH_COOKIES */
+
+/******************************************************************************/
+#ifdef WITH_GZIP
+#ifndef PALM_1
+static int
+soap_getgziphdr(struct soap *soap)
+{ int i;
+  soap_wchar c, f = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get gzip header\n"));
+  for (i = 0; i < 9; i++)
+  { if ((int)(c = soap_get1(soap) == EOF))
+      return soap->error = SOAP_EOF;
+    if (i == 2)
+      f = c;
+  }
+  if (f & 0x04) /* FEXTRA */
+  { for (i = soap_get1(soap) | (soap_get1(soap) << 8); i; i--)
+      if ((int)soap_get1(soap) == EOF)
+        return soap->error = SOAP_EOF;
+  }
+  if (f & 0x08) /* FNAME */
+    do
+      c = soap_get1(soap);
+    while (c && (int)c != EOF);
+  if ((int)c != EOF && (f & 0x10)) /* FCOMMENT */
+    do
+      c = soap_get1(soap);
+    while (c && (int)f != EOF);
+  if ((int)c != EOF && (f & 0x01)) /* FHCRC */
+  { if ((int)(c = soap_get1(soap)) != EOF)
+      c = soap_get1(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_recv(struct soap *soap)
+{ soap_wchar c;
+  soap->error = SOAP_OK;
+  soap_free(soap);
+  soap_set_local_namespaces(soap);
+  soap->version = 0;	/* don't assume we're parsing SOAP content by default */
+#ifndef WITH_NOIDREF
+  soap_free_iht(soap);
+#endif
+  if ((soap->imode & SOAP_IO) == SOAP_IO_CHUNK)
+    soap->omode |= SOAP_IO_CHUNK;
+  soap->imode &= ~SOAP_IO;
+  soap->mode = soap->imode;
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  soap->ahead = 0;
+  soap->peeked = 0;
+  soap->level = 0;
+  soap->part = SOAP_BEGIN;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  *soap->endpoint = '\0';
+  soap->action = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket))
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->recvfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->recvfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#ifdef WITH_ZLIB
+  soap->mode &= ~SOAP_ENC_ZLIB;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.next_in = Z_NULL;
+  soap->d_stream.avail_in = 0;
+  soap->d_stream.next_out = (Byte*)soap->buf;
+  soap->d_stream.avail_out = SOAP_BUFLEN;
+  soap->z_ratio_in = 1.0;
+#endif
+#ifndef WITH_LEANER
+  if (soap->fprepareinit)
+    soap->fprepareinit(soap);
+#endif
+  c = soap_getchar(soap);
+#ifdef WITH_GZIP
+  if (c == 0x1F)
+  { if (soap_getgziphdr(soap))
+      return soap->error;
+    if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+    soap->zlib_state = SOAP_ZLIB_INFLATE;
+    soap->mode |= SOAP_ENC_ZLIB;
+    soap->zlib_in = SOAP_ZLIB_GZIP;
+    soap->z_crc = crc32(0L, NULL, 0);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    /* should not chunk over plain transport, so why bother to check? */
+    /* if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) */
+    /*   soap->z_buflen = soap->bufidx; */
+    /* else */
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+    soap->z_buflen = soap->buflen;
+    soap->buflen = soap->bufidx;
+    c = soap_getchar(soap);
+  }  
+#endif
+#ifndef WITH_LEANER
+  if (c == '-' && soap_get0(soap) == '-')
+    soap->mode |= SOAP_ENC_MIME;
+  else if ((c & 0xFFFC) == (SOAP_DIME_VERSION | SOAP_DIME_MB) && (soap_get0(soap) & 0xFFF0) == 0x20)
+    soap->mode |= SOAP_ENC_DIME;
+  else
+#endif
+  { while (soap_blank(c))
+      c = soap_getchar(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  soap_unget(soap, c);
+#ifndef WITH_NOHTTP
+  /* if not XML or (start of)BOM or MIME/DIME/ZLIB, assume HTTP header */
+  if (c != '<' && c != 0xEF && !(soap->mode & (SOAP_ENC_MIME | SOAP_ENC_DIME | SOAP_ENC_ZLIB)))
+  { soap->mode &= ~SOAP_IO;
+    soap->error = soap->fparse(soap);
+    if (soap->error && soap->error < SOAP_STOP)
+    { soap->keep_alive = 0; /* force close later */
+      return soap->error;
+    }
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { soap->chunkbuflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+      soap->chunksize = 0;
+    }
+#ifndef WITH_LEANER
+    else if (soap->fpreparerecv && soap->buflen != soap->bufidx)
+      soap->fpreparerecv(soap, soap->buf + soap->bufidx, soap->buflen - soap->bufidx);
+#endif
+#ifdef WITH_ZLIB
+    if (soap->zlib_in != SOAP_ZLIB_NONE)
+    { /* fparse should not use soap_unget to push back last char */
+#ifdef WITH_GZIP
+      c = soap_get1(soap);
+      if (c == 0x1F)
+      { if (soap_getgziphdr(soap))
+          return soap->error;
+        if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        soap->z_crc = crc32(0L, NULL, 0);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+      }
+      else
+      { soap_revget1(soap);
+#else
+      {
+#endif
+        if (inflateInit(&soap->d_stream) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate initialized\n"));
+      }
+      soap->mode |= SOAP_ENC_ZLIB;
+      memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+      soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+      soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+    }
+#endif
+    if (soap->error)
+    { if (soap->error == SOAP_FORM && soap->fform)
+      { soap->error = soap->fform(soap);
+        if (soap->error == SOAP_OK)
+          soap->error = SOAP_STOP; /* prevents further processing */
+      }
+      return soap->error;
+    }
+  }
+#endif
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_MIME)
+  { if (soap_getmimehdr(soap))
+      return soap->error;
+    if (soap_get_header_attribute(soap, soap->mime.first->type, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+  }
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap->dime.flags & SOAP_DIME_CF)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked DIME SOAP message\n"));
+      soap->dime.chunksize = soap->dime.size;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+    }
+    soap->count = soap->buflen - soap->bufidx;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse(struct soap *soap)
+{ char header[SOAP_HDRLEN], *s;
+  unsigned short get = 0, status = 0, k = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Waiting for HTTP request/response...\n"));
+  *soap->endpoint = '\0';
+  soap->length = 0;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->action = NULL;
+  soap->authrealm = NULL;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP status: %s\n", soap->msgbuf));
+    for (;;)
+    { if (soap_getline(soap, header, SOAP_HDRLEN))
+      { if (soap->error == SOAP_EOF)
+	{ soap->error = SOAP_OK;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "EOF in HTTP header, continue anyway\n"));
+	  break;
+	}
+        return soap->error;
+      }
+      if (!*header)
+        break;
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP header: %s\n", header));
+      s = strchr(header, ':');
+      if (s)
+      { *s = '\0';
+        do s++;
+        while (*s && *s <= 32);
+        if ((soap->error = soap->fparsehdr(soap, header, s)))
+        { if (soap->error < SOAP_STOP)
+	    return soap->error;
+	  status = soap->error;
+	  soap->error = SOAP_OK;
+        }
+      }
+    }
+    if ((s = strchr(soap->msgbuf, ' ')))
+    { k = (unsigned short)soap_strtoul(s, &s, 10);
+      if (!soap_blank(*s))
+        k = 0;
+    }
+    else
+      k = 0;
+  } while (k == 100);
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Finished HTTP header parsing\n"));
+  s = strstr(soap->msgbuf, "HTTP/");
+  if (s && s[7] != '1')
+  { if (soap->keep_alive == 1)
+      soap->keep_alive = 0;
+    if (k == 0 && (soap->omode & SOAP_IO) == SOAP_IO_CHUNK) /* k == 0 for HTTP request */
+    { soap->imode |= SOAP_IO_CHUNK;
+      soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE;
+    }
+  }
+  if (soap->keep_alive < 0)
+    soap->keep_alive = 1;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Keep alive connection = %d\n", soap->keep_alive));
+  if (s && (((get = !strncmp(soap->msgbuf, "GET ", 4))) || !strncmp(soap->msgbuf, "POST ", 5)))
+  { size_t m = strlen(soap->endpoint);
+    size_t n = m + (s - soap->msgbuf) - 5 - (!get);
+    if (n >= sizeof(soap->endpoint))
+      n = sizeof(soap->endpoint) - 1;
+    strncpy(soap->path, soap->msgbuf + 4 + (!get), n - m);
+    soap->path[n - m] = '\0';
+    strcat(soap->endpoint, soap->path);
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Target endpoint='%s'\n", soap->endpoint));
+    if (get)
+    { soap->error = soap->fget(soap);
+      if (soap->error == SOAP_OK)
+        soap->error = SOAP_STOP; /* prevents further processing */
+      return soap->error;
+    }
+    if (status)
+      return soap->error = status;
+    return SOAP_OK;
+  }
+  if (k == 0 || (k >= 200 && k <= 299) || k == 400 || k == 500)
+    return SOAP_OK;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP error %d\n", k));
+  return soap_set_receiver_error(soap, "HTTP error", soap->msgbuf, k);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse_header(struct soap *soap, const char *key, const char *val)
+{ if (!soap_tag_cmp(key, "Host"))
+  { 
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+      strcpy(soap->endpoint, "https://");
+    else
+#endif
+      strcpy(soap->endpoint, "http://");
+    strncat(soap->endpoint, val, sizeof(soap->endpoint) - 8);
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifndef WITH_LEANER
+  else if (!soap_tag_cmp(key, "Content-Type"))
+  { if (soap_get_header_attribute(soap, val, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+    else if (soap_get_header_attribute(soap, val, "multipart/related")
+          || soap_get_header_attribute(soap, val, "multipart/form-data"))
+    { soap->mime.boundary = soap_strdup(soap, soap_get_header_attribute(soap, val, "boundary"));
+      soap->mime.start = soap_strdup(soap, soap_get_header_attribute(soap, val, "start"));
+      soap->mode |= SOAP_ENC_MIME;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Content-Length"))
+    soap->length = soap_strtoul(val, NULL, 10);
+  else if (!soap_tag_cmp(key, "Content-Encoding"))
+  { if (!soap_tag_cmp(val, "deflate"))
+#ifdef WITH_ZLIB
+      soap->zlib_in = SOAP_ZLIB_DEFLATE;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+    else if (!soap_tag_cmp(val, "gzip"))
+#ifdef WITH_GZIP
+      soap->zlib_in = SOAP_ZLIB_GZIP;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+  }
+#ifdef WITH_ZLIB
+  else if (!soap_tag_cmp(key, "Accept-Encoding"))
+  {
+#ifdef WITH_GZIP
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "gzip"))
+      soap->zlib_out = SOAP_ZLIB_GZIP;
+    else
+#endif
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "deflate"))
+      soap->zlib_out = SOAP_ZLIB_DEFLATE;
+    else
+      soap->zlib_out = SOAP_ZLIB_NONE;
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Transfer-Encoding"))
+  { soap->mode &= ~SOAP_IO;
+    if (!soap_tag_cmp(val, "chunked"))
+      soap->mode |= SOAP_IO_CHUNK;
+  }
+  else if (!soap_tag_cmp(key, "Connection"))
+  { if (!soap_tag_cmp(val, "keep-alive"))
+      soap->keep_alive = -soap->keep_alive;
+    else if (!soap_tag_cmp(val, "close"))
+      soap->keep_alive = 0;
+  }
+#ifndef WITH_LEAN
+  else if (!soap_tag_cmp(key, "Authorization"))
+  { if (!soap_tag_cmp(val, "Basic *"))
+    { int n;
+      char *s;
+      soap_base642s(soap, val + 6, soap->tmpbuf, sizeof(soap->tmpbuf) - 1, &n);
+      soap->tmpbuf[n] = '\0';
+      if ((s = strchr(soap->tmpbuf, ':')))
+      { *s = '\0';
+	soap->userid = soap_strdup(soap, soap->tmpbuf);
+	soap->passwd = soap_strdup(soap, s + 1);
+      }
+    }
+  }
+  else if (!soap_tag_cmp(key, "WWW-Authenticate"))
+    soap->authrealm = soap_strdup(soap, soap_get_header_attribute(soap, val + 6, "realm"));
+  else if (!soap_tag_cmp(key, "Expect"))
+  { if (!soap_tag_cmp(val, "100-continue"))
+    { if ((soap->error = soap->fposthdr(soap, "HTTP/1.1 100 Continue", NULL))
+       || (soap->error = soap->fposthdr(soap, NULL, NULL)))
+        return soap->error;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "SOAPAction"))
+  { if (*val == '"')
+    { soap->action = soap_strdup(soap, val + 1);
+      soap->action[strlen(soap->action) - 1] = '\0';
+    }
+  }
+  else if (!soap_tag_cmp(key, "Location"))
+  { strncpy(soap->endpoint, val, sizeof(soap->endpoint));
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifdef WITH_COOKIES
+  else if (!soap_tag_cmp(key, "Cookie") || !soap_tag_cmp(key, "Set-Cookie"))
+    soap_getcookies(soap, val);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_get_header_attribute(struct soap *soap, const char *line, const char *key)
+{ register const char *s = line;
+  if (s)
+  { while (*s)
+    { register short flag;
+      s = soap_decode_key(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      flag = soap_tag_cmp(soap->tmpbuf, key);
+      s = soap_decode_val(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      if (!flag)
+        return soap->tmpbuf;
+    }
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_key(char *buf, size_t len, const char *val)
+{ return soap_decode(buf, len, val, "=,;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_val(char *buf, size_t len, const char *val)
+{ if (*val != '=')
+  { *buf = '\0';
+    return val;
+  }
+  return soap_decode(buf, len, val + 1, ",;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char*
+soap_decode(char *buf, size_t len, const char *val, const char *sep)
+{ const char *s;
+  char *t = buf;
+  for (s = val; *s; s++)
+    if (*s != ' ' && *s != '\t' && !strchr(sep, *s))
+      break;
+  if (*s == '"')
+  { s++;
+    while (*s && *s != '"' && --len)
+      *t++ = *s++;
+  }
+  else
+  { while (soap_notblank(*s) && !strchr(sep, *s) && --len)
+    { if (*s == '%')
+      { *t++ = ((s[1] >= 'A' ? (s[1] & 0x7) + 9 : s[1] - '0') << 4)
+              + (s[2] >= 'A' ? (s[2] & 0x7) + 9 : s[2] - '0');
+        s += 3;
+      }
+      else
+        *t++ = *s++;
+    }
+  }
+  *t = '\0';
+  while (*s && !strchr(sep, *s))
+    s++;
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_out(struct soap *soap)
+{
+#ifndef WITH_LEANER
+  size_t n = 0;
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->mime.start)
+  { const char *s;
+    if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+      s = "application/dime";
+    else if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+    sprintf(soap->tmpbuf, "--%s\r\nContent-Type: %s\r\nContent-Transfer-Encoding: binary\r\nContent-ID: %s\r\n\r\n", soap->mime.boundary, s, soap->mime.start);
+    n = strlen(soap->tmpbuf);
+    if (soap_send_raw(soap, soap->tmpbuf, n))
+      return soap->error;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    soap->dime.size = soap->count;	/* DIME in MIME correction */
+  if (!(soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME))
+  { if (soap_putdimehdr(soap))
+      return soap->error;
+  }
+#endif
+  soap->part = SOAP_IN_ENVELOPE;
+  return soap_element_begin_out(soap, "SOAP-ENV:Envelope", 0, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Envelope"))
+    return soap->error;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { soap->dime.size = soap->count - soap->dime.size;	/* DIME in MIME correction */
+    sprintf(soap->id, soap->dime_id_format, 0);
+    soap->dime.id = soap->id;
+    if (soap->local_namespaces)
+    { if (soap->local_namespaces[0].out)
+        soap->dime.type = (char*)soap->local_namespaces[0].out;
+      else
+        soap->dime.type = (char*)soap->local_namespaces[0].ns;
+    }
+    soap->dime.options = NULL;
+    soap->dime.flags = SOAP_DIME_MB | SOAP_DIME_ABSURI;
+    if (!soap->dime.first)
+      soap->dime.flags |= SOAP_DIME_ME;
+    soap->count += 12 + ((strlen(soap->dime.id)+3)&(~3)) + ((strlen(soap->dime.type)+3)&(~3));
+  }
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+    return soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+#endif
+  soap->part = SOAP_END_ENVELOPE;
+  return SOAP_OK;
+} 
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_in(struct soap *soap)
+{ register struct Namespace *p;
+  soap->part = SOAP_IN_ENVELOPE;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Envelope", 0))
+    return soap->error = SOAP_VERSIONMISMATCH;
+  p = soap->local_namespaces;
+  if (p)
+  { const char *ns = p[0].out;
+    if (!ns)
+      ns = p[0].ns;
+    if (!strcmp(ns, soap_env1))
+    { soap->version = 1; /* make sure we use SOAP 1.1 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc1))))
+        strcpy(p[1].out, soap_enc1);
+    }
+    else if (!strcmp(ns, soap_env2))
+    { soap->version = 2; /* make sure we use SOAP 1.2 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc2))))
+        strcpy(p[1].out, soap_enc2);
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_in(struct soap *soap)
+{ soap->part = SOAP_END_ENVELOPE;
+  return soap_element_end_in(soap, "SOAP-ENV:Envelope");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_out(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap->version == 1)
+    soap->encoding = 1;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_SEC) && soap_set_attr(soap, "wsu:Id", "Body"))
+    return soap->error;
+#endif
+  if (soap_element(soap, "SOAP-ENV:Body", 0, NULL))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Body"))
+    return soap->error;
+  soap->part = SOAP_END_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_in(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Body", 0))
+    return soap->error;
+  if (!soap->body)
+    soap->part = SOAP_NO_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_in(struct soap *soap)
+{ if (soap->part == SOAP_NO_BODY)
+    return SOAP_OK;
+  soap->part = SOAP_END_BODY;
+  return soap_element_end_in(soap, "SOAP-ENV:Body");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_header(struct soap *soap)
+{ if (soap_getheader(soap) && soap->error == SOAP_TAG_MISMATCH)
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_endpoint(struct soap *soap, const char *endpoint)
+{ register const char *s;
+  register size_t i, n;
+  soap->endpoint[0] = '\0';
+  soap->host[0] = '\0';
+  soap->path[0] = '/';
+  soap->path[1] = '\0';
+  soap->port = 80;
+  if (!endpoint || !*endpoint)
+    return;
+  if (!strncmp(endpoint, "https:", 6))
+    soap->port = 443;
+  strncpy(soap->endpoint, endpoint, sizeof(soap->endpoint) - 1);
+  s = strchr(endpoint, ':');
+  if (s && s[1] == '/' && s[2] == '/')
+    s += 3;
+  else
+    s = endpoint;
+  n = strlen(s);
+  if (n >= sizeof(soap->host))
+    n = sizeof(soap->host) - 1;
+#ifdef WITH_IPV6
+  if (s[0] == '[')
+  { s++;
+    for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == ']')
+      { s++;
+        break; 
+      }
+    }
+  }
+  else
+  { for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == '/' || s[i] == ':')
+        break; 
+    }
+  }
+#else
+  for (i = 0; i < n; i++)
+  { soap->host[i] = s[i];
+    if (s[i] == '/' || s[i] == ':')
+      break; 
+  }
+#endif
+  soap->host[i] = '\0';
+  if (s[i] == ':')
+  { soap->port = (int)atol(s + i + 1);
+    for (i++; i < n; i++)
+      if (s[i] == '/')
+        break;
+  }
+  if (s[i])
+  { strncpy(soap->path, s + i, sizeof(soap->path));
+    soap->path[sizeof(soap->path) - 1] = '\0';
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect(struct soap *soap, const char *endpoint, const char *action)
+{ return soap_connect_command(soap, SOAP_POST, endpoint, action);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect_command(struct soap *soap, int http_command, const char *endpoint, const char *action)
+{ char host[sizeof(soap->host)];
+  int port;
+  size_t count;
+  soap->error = SOAP_OK;
+  strcpy(host, soap->host); /* save to compare */
+  port = soap->port; /* save to compare */
+  soap_set_endpoint(soap, endpoint);
+#ifndef WITH_LEANER
+  if (soap->fconnect)
+  { if ((soap->error = soap->fconnect(soap, endpoint, soap->host, soap->port)))
+      return soap->error;
+  }
+  else
+#endif
+  if (soap->fopen && *soap->host)
+  { soap->status = http_command;
+    if (!soap->keep_alive || !soap_valid_socket(soap->socket) || strcmp(soap->host, host) || soap->port != port || !soap->fpoll || soap->fpoll(soap))
+    { soap->keep_alive = 0; /* to force close */
+      soap->omode &= ~SOAP_IO_UDP; /* to force close */
+      soap_closesock(soap);
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Connect/reconnect to host='%s' path='%s' port=%d\n", soap->host, soap->path, soap->port));
+#ifdef WITH_UDP
+      if (!strncmp(endpoint, "soap.udp:", 9))
+        soap->omode |= SOAP_IO_UDP;
+#endif
+      soap->socket = soap->fopen(soap, endpoint, soap->host, soap->port);
+      if (soap->error)
+        return soap->error;
+      soap->keep_alive = ((soap->omode & SOAP_IO_KEEPALIVE) != 0);
+    }
+  }
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML) && endpoint)
+  { unsigned int k = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((k & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fpost(soap, endpoint, soap->host, soap->port, soap->path, action, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((k & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = k;
+  }
+  else if (action)
+    soap->action = soap_strdup(soap, action);
+  if (http_command != SOAP_POST)
+    return soap_end_send(soap);
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2base64(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register int i;
+  register unsigned long m;
+  register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, (n + 2) / 3 * 4 + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (!s)
+    return p;
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    t += 4;
+  }
+  t[0] = '\0';
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      t[i] = '=';
+    t[4] = '\0';
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_base642s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register int i, j, c;
+  register unsigned long m;
+  register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = (strlen(s) + 3) / 4 * 3;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  if (n)
+    *n = 0;
+  for (;;)
+  { for (i = 0; i < SOAP_BLKLEN; i++)
+    { m = 0;
+      j = 0;
+      while (j < 4)
+      { c = *s++;
+        if (c == '=' || !c)
+        { i *= 3;
+          switch (j)
+          { case 2:
+              *t++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *t++ = (char)((m >> 10) & 0xFF);
+              *t++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n += i;
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      }
+      *t++ = (char)((m >> 16) & 0xFF);
+      *t++ = (char)((m >> 8) & 0xFF);
+      *t++ = (char)(m & 0xFF);
+      if (l < 3)
+      { if (n)
+	  *n += i;
+        return p;
+      }
+      l -= 3;
+    }
+    if (n)
+      *n += 3 * SOAP_BLKLEN;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2hex(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, 2 * n + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (s)
+  { for (; n > 0; n--)
+    { register int m = *s++;
+      *t++ = (char)((m >> 4) + (m > 159 ? 'a' - 10 : '0'));
+      m &= 0x0F;
+      *t++ = (char)(m + (m > 9 ? 'a' - 10 : '0'));
+    }
+  }
+  *t++ = '\0';
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_hex2s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = strlen(s) / 2;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  while (l)
+  { register int d1, d2;
+    d1 = *s++;
+    if (!d1)
+      break;
+    d2 = *s++;
+    if (!d2)
+      break;
+    *t++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    l--;
+  }
+  if (n)
+    *n = t - p;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthttphdr(struct soap *soap, int status, size_t count)
+{ register const char *s = NULL;
+  register int err = SOAP_OK;
+#ifndef WITH_LEANER
+  register const char *r = NULL;
+#endif
+  if (status == SOAP_FILE && soap->http_content)
+    s = soap->http_content;
+  else if (status == SOAP_HTML)
+    s = "text/html; charset=utf-8";
+  else if (count || ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK))
+  { if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+  }
+#ifndef WITH_LEANER
+  if (soap->mode & (SOAP_ENC_DIME | SOAP_ENC_MTOM))
+  { if (soap->mode & SOAP_ENC_MTOM)
+    { r = s;
+      s = "application/xop+xml; charset=utf-8";
+    }
+    else
+      s = "application/dime";
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->status != SOAP_GET)
+  { register const char *t = strchr(s, ';');
+    sprintf(soap->tmpbuf, "multipart/related; boundary=\"%s\"; type=\"", soap->mime.boundary);
+    if (t)
+      strncat(soap->tmpbuf, s, t - s);
+    else
+      strcat(soap->tmpbuf, s);
+    if (soap->mime.start)
+    { strcat(soap->tmpbuf, "\"; start=\"");
+      strcat(soap->tmpbuf, soap->mime.start);
+    }
+    strcat(soap->tmpbuf, "\"");
+    if (r)
+    { strcat(soap->tmpbuf, "; start-info=\"");
+      strcat(soap->tmpbuf, r);
+      strcat(soap->tmpbuf, "\"");
+    }
+    s = soap->tmpbuf;
+  }
+#endif
+  if (s && (err = soap->fposthdr(soap, "Content-Type", s)))
+    return err;
+#ifdef WITH_ZLIB
+  if (soap->omode & SOAP_ENC_ZLIB)
+  {
+#ifdef WITH_GZIP
+    err = soap->fposthdr(soap, "Content-Encoding", "gzip");
+#else
+    err = soap->fposthdr(soap, "Content-Encoding", "deflate");
+#endif
+    if (err)
+      return err;
+  }
+#endif
+#ifndef WITH_LEANER
+  if ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK)
+    err = soap->fposthdr(soap, "Transfer-Encoding", "chunked");
+  else
+#endif
+  if (soap->status != SOAP_GET)
+  { sprintf(soap->tmpbuf, "%lu", (unsigned long)count);
+    err = soap->fposthdr(soap, "Content-Length", soap->tmpbuf);
+  }
+  if (err)
+    return err;
+  return soap->fposthdr(soap, "Connection", soap->keep_alive ? "keep-alive" : "close");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_get(struct soap *soap)
+{ return SOAP_GET_METHOD;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post(struct soap *soap, const char *endpoint, const char *host, int port, const char *path, const char *action, size_t count)
+{ register const char *s;
+  register int err;
+  if (soap->status == SOAP_GET)
+    s = "GET";
+  else
+    s = "POST";
+#ifdef PALM
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)) && strncmp(endpoint, "_beam:", 6) && strncmp(endpoint, "_local:", 7) && strncmp(endpoint, "_btobex:", 8))
+#else
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)))
+#endif
+    return SOAP_OK;
+  if (soap->proxy_host && strncmp(endpoint, "https:", 6))
+    sprintf(soap->tmpbuf, "%s %s HTTP/%s", s, endpoint, soap->http_version);
+  else
+    sprintf(soap->tmpbuf, "%s /%s HTTP/%s", s, (*path == '/' ? path + 1 : path), soap->http_version);
+  if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+    return err;
+  if (port != 80)
+    sprintf(soap->tmpbuf, "%s:%d", host, port);
+  else
+    strcpy(soap->tmpbuf, host); 
+  if ((err = soap->fposthdr(soap, "Host", soap->tmpbuf))
+   || (err = soap->fposthdr(soap, "User-Agent", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, SOAP_OK, count)))
+    return err;
+#ifdef WITH_ZLIB
+#ifdef WITH_GZIP
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "gzip, deflate")))
+#else
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "deflate")))
+#endif
+    return err;
+#endif
+#ifndef WITH_LEAN
+  if (soap->userid && soap->passwd && strlen(soap->userid) + strlen(soap->passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Authorization", soap->tmpbuf)))
+      return err;
+  }
+  if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+      return err;
+  }
+#endif
+#ifdef WITH_COOKIES
+#ifdef WITH_OPENSSL
+  if (soap_putcookies(soap, host, path, soap->ssl != NULL))
+    return soap->error;
+#else
+  if (soap_putcookies(soap, host, path, 0))
+    return soap->error;
+#endif
+#endif
+  if (action && soap->version == 1)
+  { sprintf(soap->tmpbuf, "\"%s\"", action);
+    if ((err = soap->fposthdr(soap, "SOAPAction", soap->tmpbuf)))
+      return err;
+  }
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_send_header(struct soap *soap, const char *s)
+{ register const char *t;
+  do
+  { t = strchr(s, '\n'); /* disallow \n in HTTP headers */
+    if (!t)
+      t = s + strlen(s);
+    if (soap_send_raw(soap, s, t - s))
+      return soap->error;
+    s = t + 1;
+  } while (*t);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post_header(struct soap *soap, const char *key, const char *val)
+{ if (key)
+  { if (http_send_header(soap, key))
+      return soap->error;
+    if (val && (soap_send_raw(soap, ": ", 2) || http_send_header(soap, val)))
+      return soap->error;
+  }
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_response(struct soap *soap, int status, size_t count)
+{ register int err;
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    httpOutputEnable(soap->rpmreqid);
+#endif
+  if (!status || status == SOAP_HTML || status == SOAP_FILE)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "OK 200\n"));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s 200 OK", soap->http_version);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", "200 OK")))
+      return err;
+  }
+  else if (status > 200 && status < 600)
+  { sprintf(soap->tmpbuf, "HTTP/%s %d %s", soap->http_version, status, http_error(soap, status));
+    if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      return err;
+#ifndef WITH_LEAN 
+    if (status == 401)
+    { sprintf(soap->tmpbuf, "Basic realm=\"%s\"", soap->authrealm ? soap->authrealm : "gSOAP Web Service");
+      if ((err = soap->fposthdr(soap, "WWW-Authenticate", soap->tmpbuf)))
+        return err;
+    }
+    else if ((status >= 301 && status <= 303) || status == 307)
+    { if ((err = soap->fposthdr(soap, "Location", soap->endpoint)))
+        return err;
+    }
+#endif
+  }
+  else
+  { const char *s = *soap_faultcode(soap);
+    if (soap->version == 2 && !strcmp(s, "SOAP-ENV:Sender"))
+      s = "400 Bad Request";
+    else
+      s = "500 Internal Server Error";
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error %s (status=%d)\n", s, status));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s %s", soap->http_version, s);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", s)))
+      return err;
+  }
+  if ((err = soap->fposthdr(soap, "Server", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, status, count)))
+    return err;
+#ifdef WITH_COOKIES
+  if (soap_putsetcookies(soap))
+    return soap->error;
+#endif
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_response(struct soap *soap, int status)
+{ register size_t count;
+  if (!(soap->omode & (SOAP_ENC_XML | SOAP_IO_STORE /* this tests for chunking too */))
+   && (status == SOAP_HTML || status == SOAP_FILE))
+  { soap->omode &= ~SOAP_IO;
+    soap->omode |= SOAP_IO_STORE;
+  }
+  soap->status = status;
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML))
+  { register int n = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((n & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fresponse(soap, status, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((n & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = n;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static const char*
+soap_set_validation_fault(struct soap *soap, const char *s, const char *t)
+{ if (*soap->tag)
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s in element <%s>", s, t?t:SOAP_STR_EOS, soap->tag);
+  else
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s", s, t?t:SOAP_STR_EOS);
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_fault(struct soap *soap)
+{ const char **c = soap_faultcode(soap);
+  const char **s = soap_faultstring(soap);
+  if (!*c && !*s && soap->fseterror)
+    soap->fseterror(soap, c, s);
+  if (!*c)
+  { if (soap->version == 2)
+      *c = "SOAP-ENV:Sender";
+    else
+      *c = "SOAP-ENV:Client";
+  }
+  if (*s)
+    return;
+  switch (soap->error)
+  {
+#ifndef WITH_LEAN
+    case SOAP_CLI_FAULT:
+      *s = "Client fault";
+      break;
+    case SOAP_SVR_FAULT:
+      *s = "Server fault";
+      break;
+    case SOAP_TAG_MISMATCH:
+      *s = soap_set_validation_fault(soap, "tag name or namespace mismatch", NULL);
+      break;
+    case SOAP_TYPE:
+      *s = soap_set_validation_fault(soap, "data type mismatch ", soap->type);
+      break;
+    case SOAP_SYNTAX_ERROR:
+      *s = "Well-formedness violation";
+      break;
+    case SOAP_NO_TAG:
+      *s = "No XML element tag";
+      break;
+    case SOAP_MUSTUNDERSTAND:
+      *c = "SOAP-ENV:MustUnderstand";
+      sprintf(soap->msgbuf, "The data in element '%s' must be understood but cannot be handled", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_VERSIONMISMATCH:
+      *c = "SOAP-ENV:VersionMismatch";
+      *s = "SOAP version mismatch or invalid SOAP message";
+      break;
+    case SOAP_DATAENCODINGUNKNOWN:
+      *c = "SOAP-ENV:DataEncodingUnknown";
+      *s = "Unsupported SOAP data encoding";
+      break;
+    case SOAP_NAMESPACE:
+      *s = soap_set_validation_fault(soap, "namespace mismatch", NULL);
+      break;
+    case SOAP_USER_ERROR:
+      *s = "User error";
+      break;
+    case SOAP_FATAL_ERROR:
+      *s = "Fatal error";
+      break;
+    case SOAP_NO_METHOD:
+      sprintf(soap->msgbuf, "Method '%s' not implemented: method name or namespace not recognized", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_GET_METHOD:
+      *s = "HTTP GET method not implemented";
+      break;
+    case SOAP_EOM:
+      *s = "Out of memory";
+      break;
+    case SOAP_IOB:
+      *s = "Array index out of bounds";
+      break;
+    case SOAP_NULL:
+      *s = soap_set_validation_fault(soap, "nil not allowed", NULL);
+      break;
+    case SOAP_DUPLICATE_ID:
+      *s = soap_set_validation_fault(soap, "multiple definitions of id ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:DuplicateID";
+      break;
+    case SOAP_MISSING_ID:
+      *s = soap_set_validation_fault(soap, "missing id for ref ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:MissingID";
+      break;
+    case SOAP_HREF:
+      *s = soap_set_validation_fault(soap, "incompatible object ref ", soap->id);
+      break;
+    case SOAP_FAULT:
+      break;
+#ifndef WITH_NOIO
+    case SOAP_UDP_ERROR:
+      *s = "Message too large for UDP packet";
+      break;
+    case SOAP_TCP_ERROR:
+      *s = tcp_error(soap);
+      break;
+#endif
+    case SOAP_HTTP_ERROR:
+      *s = "HTTP error";
+      break;
+    case SOAP_SSL_ERROR:
+#ifdef WITH_OPENSSL
+      *s = "SSL error";
+#else
+      *s = "OpenSSL not installed: recompile with -DWITH_OPENSSL";
+#endif
+      break;
+    case SOAP_PLUGIN_ERROR:
+      *s = "Plugin registry error";
+      break;
+    case SOAP_DIME_ERROR:
+      *s = "DIME format error";
+      break;
+    case SOAP_DIME_HREF:
+      *s = "DIME href to missing attachment";
+      break;
+    case SOAP_DIME_MISMATCH:
+      *s = "DIME version/transmission error";
+      break;
+    case SOAP_DIME_END:
+      *s = "End of DIME error";
+      break;
+    case SOAP_MIME_ERROR:
+      *s = "MIME format error";
+      break;
+    case SOAP_MIME_HREF:
+      *s = "MIME href to missing attachment";
+      break;
+    case SOAP_MIME_END:
+      *s = "End of MIME error";
+      break;
+    case SOAP_ZLIB_ERROR:
+#ifdef WITH_ZLIB
+      sprintf(soap->msgbuf, "Zlib/gzip error: '%s'", soap->d_stream.msg?soap->d_stream.msg:"");
+      *s = soap->msgbuf;
+#else
+      *s = "Zlib/gzip not installed for (de)compression: recompile with -DWITH_GZIP";
+#endif
+      break;
+    case SOAP_REQUIRED:
+      *s = soap_set_validation_fault(soap, "missing required attribute", NULL);
+      break;
+    case SOAP_PROHIBITED:
+      *s = soap_set_validation_fault(soap, "prohibited attribute present", NULL);
+      break;
+    case SOAP_OCCURS:
+      *s = soap_set_validation_fault(soap, "min/maxOccurs violation", NULL);
+      break;
+    case SOAP_LENGTH:
+      *s = soap_set_validation_fault(soap, "content length violation", NULL);
+      break;
+    case SOAP_STOP:
+      *s = "Stopped: no response sent";
+      break;
+#endif
+    case SOAP_EOF:
+#ifndef WITH_NOIO
+      sprintf(soap->msgbuf, "End of file or no input: '%s'", soap_strerror(soap));
+      *s = soap->msgbuf;
+      break;
+#else
+      *s = "End of file or no input";
+      break;
+#endif
+    default:
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+      if (soap->error > 200 && soap->error < 600)
+      { sprintf(soap->msgbuf, "HTTP Error: %d %s", soap->error, http_error(soap, soap->error));
+        *s = soap->msgbuf;
+      }
+      else
+#endif
+#endif
+      { sprintf(soap->msgbuf, "Error %d", soap->error);
+        *s = soap->msgbuf;
+      }
+    }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_fault(struct soap *soap)
+{ register int status = soap->error;
+  int r = 1;
+  if (status == SOAP_STOP)
+    return status;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Sending back fault struct for error code %d\n", soap->error));
+  soap->keep_alive = 0; /* to terminate connection */
+  soap_set_fault(soap);
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+  if (soap_valid_socket(soap->socket))
+  { struct timeval timeout;
+    fd_set rfd, sfd;
+    timeout.tv_sec = 0;
+    timeout.tv_usec = 0;
+    FD_ZERO(&rfd);
+    FD_ZERO(&sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, NULL, &timeout);
+    if (r > 0)
+    { if (!FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       || (FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        && recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) < 0))
+        r = 0;
+    }
+  }
+#endif
+#endif
+  if ((status != SOAP_EOF || (!soap->recv_timeout && !soap->send_timeout)) && r > 0)
+  { soap->error = SOAP_OK;
+    soap_serializeheader(soap);
+    soap_serializefault(soap);
+    soap_begin_count(soap);
+    if (soap->mode & SOAP_IO_LENGTH)
+    { soap_envelope_begin_out(soap);
+      soap_putheader(soap);
+      soap_body_begin_out(soap);
+      soap_putfault(soap);
+      soap_body_end_out(soap);
+      soap_envelope_end_out(soap);
+    }
+    soap_end_count(soap);
+    if (soap_response(soap, status)
+     || soap_envelope_begin_out(soap)
+     || soap_putheader(soap)
+     || soap_body_begin_out(soap)
+     || soap_putfault(soap)
+     || soap_body_end_out(soap)
+     || soap_envelope_end_out(soap))
+      return soap_closesock(soap);
+    soap_end_send(soap);
+  }
+  soap->error = status;
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_fault(struct soap *soap)
+{ register int status = soap->error;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Receiving SOAP Fault\n"));
+  soap->error = SOAP_OK;
+  if (soap_getfault(soap))
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Error: soap_get_soapfault() failed. Is this a SOAP message at all?\n"));
+    *soap_faultcode(soap) = (soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client");
+    soap->error = status;
+    soap_set_fault(soap);
+  }
+  else
+  { register const char *s = *soap_faultcode(soap);
+    if (!soap_match_tag(soap, s, "SOAP-ENV:Server") || !soap_match_tag(soap, s, "SOAP-ENV:Receiver"))
+      status = SOAP_SVR_FAULT; 
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:Client") || !soap_match_tag(soap, s, "SOAP-ENV:Sender"))
+      status = SOAP_CLI_FAULT;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:MustUnderstand"))
+      status = SOAP_MUSTUNDERSTAND;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:VersionMismatch"))
+      status = SOAP_VERSIONMISMATCH;
+    else
+    { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Fault code %s\n", s));
+      status = SOAP_FAULT;
+    }
+    if (soap_body_end_in(soap)
+     || soap_envelope_end_in(soap)
+     || soap_end_recv(soap))
+      return soap_closesock(soap);
+    soap->error = status;
+  }
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_empty_response(struct soap *soap)
+{ soap->count = 0;
+  if (soap_response(soap, SOAP_OK) || soap_end_send(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_empty_response(struct soap *soap)
+{ if (soap_begin_recv(soap) || soap_end_recv(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+soap_strerror(struct soap *soap)
+{ register int err = soap->errnum;
+  if (err)
+  {
+#ifndef WIN32
+    return strerror(err);
+#else
+    FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, (LPTSTR)&soap->errorstr, sizeof(soap->errorstr), NULL);
+    return soap->errorstr;
+#endif
+  }
+  return "Operation interrupted or timed out";
+}
+#endif
+#endif 
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_set_error(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail, int soaperror)
+{ *soap_faultcode(soap) = faultcode;
+  if (faultsubcode)
+    *soap_faultsubcode(soap) = faultsubcode;
+  *soap_faultstring(soap) = faultstring;
+  if (faultdetail && *faultdetail)
+  { register const char **s = soap_faultdetail(soap);
+    if (s)
+      *s = faultdetail;
+  }
+  return soap->error = soaperror;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_sender_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_receiver_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_copy_fault(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ char *r = NULL, *s = NULL, *t = NULL;
+  if (faultsubcode)
+    r = soap_strdup(soap, faultsubcode);
+  if (faultstring)
+    s = soap_strdup(soap, faultstring);
+  if (faultdetail)
+    t = soap_strdup(soap, faultdetail);
+  return soap_set_error(soap, faultcode, r, s, t, SOAP_FAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_sender_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_receiver_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault(struct soap *soap, FILE *fd)
+{ if (soap_check_state(soap))
+    fprintf(fd, "Error: soap struct not initialized\n");
+  else if (soap->error)
+  { const char *c, *v = NULL, *s, **d;
+    d = soap_faultcode(soap);
+    if (!*d)
+      soap_set_fault(soap);
+    c = *d;
+    if (soap->version == 2)
+      v = *soap_faultsubcode(soap);
+    s = *soap_faultstring(soap);
+    d = soap_faultdetail(soap);
+    fprintf(fd, "%s%d fault: %s [%s]\n\"%s\"\nDetail: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, c, v ? v : "no subcode", s ? s : "[no reason]", d && *d ? *d : "[no detail]");
+  }
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault_location(struct soap *soap, FILE *fd)
+{ 
+#ifndef WITH_LEAN
+  int i, j, c1, c2;
+  if (soap->error && soap->buflen > 0)
+  { i = (int)soap->bufidx - 1;
+    if (i <= 0)
+      i = 0;
+    c1 = soap->buf[i];
+    soap->buf[i] = '\0';
+    if ((int)soap->buflen >= i + 1024)
+      j = i + 1023;
+    else
+      j = (int)soap->buflen - 1;
+    c2 = soap->buf[j];
+    soap->buf[j] = '\0';
+    fprintf(fd, "%s%c\n** HERE **\n", soap->buf, c1);
+    if (soap->bufidx < soap->buflen)
+      fprintf(fd, "%s\n", soap->buf + soap->bufidx);
+    soap->buf[i] = c1;
+    soap->buf[j] = c2;
+  }
+#endif
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void *arg)
+{ register struct soap_plugin *p;
+  register int r;
+  if (!(p = (struct soap_plugin*)SOAP_MALLOC(soap, sizeof(struct soap_plugin))))
+    return soap->error = SOAP_EOM;
+  p->id = NULL;
+  p->data = NULL;
+  p->fcopy = NULL;
+  p->fdelete = NULL;
+  r = fcreate(soap, p, arg);
+  if (!r && p->fdelete)
+  { p->next = soap->plugins;
+    soap->plugins = p;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Registered '%s' plugin\n", p->id));
+    return SOAP_OK;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not register plugin '%s': plugin returned error %d (or fdelete callback not set)\n", p->id?p->id:"?", r));
+  SOAP_FREE(soap, p);
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static void *
+fplugin(struct soap *soap, const char *id)
+{ register struct soap_plugin *p;
+  for (p = soap->plugins; p; p = p->next)
+    if (p->id == id || !strcmp(p->id, id))
+      return p->data;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void *
+SOAP_FMAC2
+soap_lookup_plugin(struct soap *soap, const char *id)
+{ return soap->fplugin(soap, id);
+}
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap()
+{ soap_init(this);
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	C++ soap struct methods
+ *
+\******************************************************************************/
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode mode)
+{ soap_init1(this, mode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode imode, soap_mode omode)
+{ soap_init2(this, imode, omode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(struct soap& soap)
+{ soap_copy_context(this, &soap);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::~soap()
+{ soap_destroy(this);
+  soap_end(this);
+  soap_done(this);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/samples/quote_MAC_ProjBuild/stdsoap2.h b/samples/quote_MAC_ProjBuild/stdsoap2.h
new file mode 100644
index 0000000..1b6c74d
--- /dev/null
+++ b/samples/quote_MAC_ProjBuild/stdsoap2.h
@@ -0,0 +1,2093 @@
+/*
+
+stdsoap2.h 2.7.6e
+
+gSOAP runtime
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+Contributors:
+
+Wind River Systems, Inc., for the following additions (marked WR[...]):
+  - vxWorks compatible
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#ifdef WITH_SOAPDEFS_H
+# include "soapdefs.h"		/* include user-defined stuff */
+#endif
+
+#ifndef _THREAD_SAFE
+# define _THREAD_SAFE
+#endif
+
+#ifndef OPENSERVER
+# ifndef _REENTRANT
+#  define _REENTRANT
+# endif
+#endif
+
+#ifndef SOAP_FMAC1	/* stdsoap2.h declaration macro */
+# define SOAP_FMAC1
+#endif
+
+#ifndef SOAP_FMAC2	/* stdsoap2.h declaration macro */
+# define SOAP_FMAC2
+#endif
+
+#ifndef SOAP_FMAC3	/* (de)serializer declaration macro */
+# define SOAP_FMAC3
+#endif
+
+#ifndef SOAP_FMAC3S	/* string converter for (de)serializer declaration macro */
+# define SOAP_FMAC3S SOAP_FMAC3
+#endif
+
+#ifndef SOAP_FMAC4	/* (de)serializer declaration macro */
+# define SOAP_FMAC4
+#endif
+
+#ifndef SOAP_FMAC4S	/* string converter for (de)serializer declaration macro */
+# define SOAP_FMAC4S SOAP_FMAC4
+#endif
+
+#ifndef SOAP_FMAC5	/* stub/skeleton declaration macro */
+# define SOAP_FMAC5
+#endif
+
+#ifndef SOAP_FMAC6	/* stub/skeleton declaration macro */
+# define SOAP_FMAC6
+#endif
+
+#ifndef SOAP_CMAC	/* class declaration macro */
+# define SOAP_CMAC
+#endif
+
+#ifndef SOAP_NMAC	/* namespace table declaration macro */
+# define SOAP_NMAC
+#endif
+
+#ifndef SOAP_SOURCE_STAMP
+# define SOAP_SOURCE_STAMP(str)
+#endif
+
+/* gSOAP 2.7.4 and higher: fast look-aside buffering is stable */
+#ifndef WITH_FAST
+# define WITH_FAST
+#endif
+
+#ifdef WITH_LEANER
+# ifndef WITH_LEAN
+#  define WITH_LEAN
+# endif
+#endif
+
+#ifdef WITH_LEAN
+# ifdef WITH_COOKIES
+#  error "Cannot build WITH_LEAN code WITH_COOKIES enabled"
+# endif
+#endif
+
+#ifndef STDSOAP_H
+#define STDSOAP_H
+
+#if defined(__vxworks) || defined(__VXWORKS__)
+# define VXWORKS
+#endif
+
+#ifdef _WIN32
+# ifndef WIN32
+#  define WIN32
+# endif
+#endif
+
+#ifdef UNDER_CE
+# ifndef WIN32
+#  define WIN32
+# endif
+#endif
+
+#ifdef __BORLANDC__
+# ifdef __WIN32__
+#  ifndef WIN32
+#   define WIN32
+#  endif
+# endif
+#endif
+
+#ifdef __CYGWIN__
+# ifndef CYGWIN
+#  define CYGWIN
+# endif
+#endif
+
+#ifdef __SYMBIAN32__ 
+# define SYMBIAN
+# undef WIN32
+#endif
+
+#if defined(__palmos__) || defined(PALM_GCC) || defined(__PALMOS_TRAPS__)
+# ifndef PALM
+#  define PALM
+# endif
+#endif
+
+#if defined(__hpux)
+# ifndef HP_UX
+#  define HP_UX
+# endif
+#endif
+
+#if defined(__alpha) && !defined(__VMS)
+# ifndef TRU64
+#  define TRU64 
+# endif
+#endif
+
+#ifdef __MVS__
+# ifndef OS390
+#  define OS390
+# endif
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+# ifdef WITH_OPENSSL
+#  ifndef HAVE_OPENSSL_SSL_H
+#   undef WITH_OPENSSL
+#  endif
+# endif
+#else
+# if defined(UNDER_CE)
+#  define WITH_LEAN
+#  define HAVE_SSCANF
+# elif defined(WIN32)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define SOAP_LONG_FORMAT "%I64d"
+#  define SOAP_ULONG_FORMAT "%I64u"
+# elif defined(CYGWIN)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(__APPLE__)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_TIMEGM
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(_AIXVERSION_431)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(HP_UX)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(FREEBSD) || defined(__FreeBSD__)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_STRTOLL
+#  define HAVE_STRTOULL
+#  define HAVE_GETTIMEOFDAY
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define SOAP_LONG_FORMAT "%qd"
+#  define SOAP_ULONG_FORMAT "%qu"
+# elif defined(__VMS)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(__GLIBC__) || defined(__GNU__)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_STRTOLL
+#  define HAVE_STRTOULL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_TIMEGM
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define HAVE_ISNAN
+# elif defined(TRU64)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_STRTOLL
+#  define HAVE_STRTOULL
+#  define HAVE_GETTIMEOFDAY
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define __USE_STD_IOSTREAM
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define SOAP_LONG_FORMAT "%ld"
+#  define SOAP_ULONG_FORMAT "%lu"
+# elif defined(MAC_CARBON)
+#  define WITH_NOIO
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GETHOSTBYNAME_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(PALM)
+#  define WITH_LEAN
+#  define HAVE_STRTOD   /* strtod() is defined in palmFunctions.h */
+#  include <stdlib.h>	/* Needs to be included before unix headers */
+#  include <sys_types.h>
+#  define IGNORE_STDIO_STUBS
+#  include <StdIOPalm.h>
+#  define O_NONBLOCK FNONBIO
+#  include <sys_socket.h>
+#  include "palmFunctions.h"
+# elif defined(SYMBIAN)
+#  define WITH_LEAN
+#  define WITH_NONAMESPACES
+#  define HAVE_STRTOD	/* use STRTOD since sscanf doesn't seem to work */
+#  include <e32def.h>
+#  include <sys/ioctl.h>
+# elif defined(VXWORKS)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_PGMTIME_R
+#  define HAVE_PLOCALTIME_R
+#  define HAVE_MKTIME
+# elif defined(OS390)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(AS400)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# else
+/* Default asumptions on supported functions */
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GETHOSTBYNAME_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# endif
+#endif
+
+/* QNX does not have a working version of strtof */
+#if defined(__QNX__) || defined(QNX)
+# undef HAVE_STRTOF
+#endif
+
+#ifndef SOAP_LONG_FORMAT
+# define SOAP_LONG_FORMAT "%lld"	/* printf format for 64 bit ints */
+#endif
+
+#ifndef SOAP_ULONG_FORMAT
+# define SOAP_ULONG_FORMAT "%llu"	/* printf format for unsigned 64 bit ints */
+#endif
+
+#ifndef WITH_NOSTDLIB
+# include <stdlib.h>
+# ifndef PALM
+#  include <stdio.h>
+#  include <string.h>
+# endif
+# include <ctype.h>
+# include <limits.h>
+#endif
+
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+# include <string>
+# include <iostream>
+#endif
+
+#ifdef WITH_NOHTTP
+# ifndef WITH_NOIO
+#  define WITH_NOIO
+#  undef WITH_COOKIES
+# endif
+#endif
+
+#ifndef UNDER_CE
+# ifndef PALM
+#  ifndef WITH_NOIO
+#   include <errno.h>
+#   include <sys/types.h>
+#  endif
+#  ifndef WITH_LEAN
+#   ifdef HAVE_SYS_TIMEB_H
+#    include <sys/timeb.h>		/* for ftime() */
+#   endif
+#   include <time.h>
+#  endif
+# endif
+#endif
+
+#ifdef OPENSERVER
+# include <sys/socket.h>
+# include <sys/stream.h>
+# include <sys/protosw.h>
+  extern int h_errno;
+#endif
+
+#ifndef WITH_NOIO
+# ifndef WIN32
+#  ifndef PALM
+#   include <sys/socket.h>
+#   ifdef VXWORKS
+#    include <sockLib.h>
+#    include <selectLib.h>
+#   endif
+#   ifndef VXWORKS
+#    ifndef SYMBIAN
+#     include <strings.h>
+#    endif
+#   endif
+#   ifdef SUN_OS
+#    include <sys/stream.h>		/* SUN */
+#    include <sys/socketvar.h>		/* SUN < 2.8 (?) */
+#   endif
+#   ifdef VXWORKS
+#    ifdef _WRS_KERNEL
+#     include <sys/times.h>
+#    endif
+#   else
+#    include <sys/time.h>
+#   endif
+#   include <netinet/in.h>
+#   ifdef OS390
+#    include <netinet/tcp_var.h>
+#   else
+#    include <netinet/tcp.h>          /* TCP_NODELAY */
+#   endif
+#   include <arpa/inet.h>
+#  endif
+# endif
+#endif
+
+#ifdef WITH_FASTCGI
+# include <fcgi_stdio.h>
+#endif
+
+#ifdef WITH_OPENSSL
+# define OPENSSL_NO_KRB5
+# include <openssl/ssl.h>
+# include <openssl/err.h>
+# include <openssl/rand.h>
+# ifndef ALLOW_OLD_VERSIONS
+#  if (OPENSSL_VERSION_NUMBER < 0x00905100L)
+#   error "Must use OpenSSL 0.9.6 or later"
+#  endif
+# endif
+#endif
+
+#ifdef WITH_GZIP
+# ifndef WITH_ZLIB
+#  define WITH_ZLIB
+# endif
+#endif
+
+#ifdef WITH_CASEINSENSITIVETAGS
+# define SOAP_STRCMP soap_tag_cmp	/* case insensitve XML element/attribute names */
+#else
+# define SOAP_STRCMP strcmp		/* case sensitive XML element/attribute names */
+#endif
+
+#ifdef WITH_ZLIB
+# include <zlib.h>
+#endif
+
+#ifndef WITH_NOSTDLIB
+# ifndef PALM
+#  include <math.h>	/* for isnan() */
+# endif
+#endif
+
+/* #define DEBUG */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and messages (in file TEST.log) */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef WIN32
+# ifndef UNDER_CE
+#  include <io.h>
+#  include <fcntl.h>
+# endif
+# include <winsock.h>
+/* # include <winsock2.h> */ /* Alternative: use winsock2 (not available with eVC) */
+# ifdef WITH_IPV6
+#  include <ws2tcpip.h>
+#  include <wspiapi.h>
+# endif
+#else
+# ifdef VXWORKS
+#  include <hostLib.h>
+#  include <ioctl.h>
+#  include <ioLib.h>
+# endif
+# ifndef WITH_NOIO
+#  ifndef PALM
+#   include <netdb.h>
+#   include <netinet/in.h>
+#   include <unistd.h>
+#   include <fcntl.h>
+#  endif
+# endif
+#endif
+
+/* Portability: define SOAP_SOCKLEN_T */
+#if defined(_AIX)
+# define SOAP_SOCKLEN_T socklen_t
+#elif defined(SOCKLEN_T)
+# define SOAP_SOCKLEN_T SOCKLEN_T
+#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) || defined(FREEBSD) || defined(__FreeBSD__) || defined(__QNX__) || defined(QNX)
+# define SOAP_SOCKLEN_T socklen_t
+#elif defined(IRIX) || defined(WIN32) || defined(__APPLE__) || defined(HP_UX) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS)
+# define SOAP_SOCKLEN_T int
+#else
+# define SOAP_SOCKLEN_T size_t
+#endif
+
+#ifndef SOAP_SOCKET
+# ifdef WIN32
+#  define SOAP_SOCKET SOCKET
+# else
+#  define SOAP_SOCKET int
+#  define closesocket(n) close(n)
+# endif
+#endif
+
+#define SOAP_INVALID_SOCKET (-1)
+#define soap_valid_socket(n) ((n) != SOAP_INVALID_SOCKET)
+
+#if defined(SYMBIAN)
+# define LONG64 long
+# define ULONG64 unsigned LONG64
+#elif !defined(WIN32) || defined(__GLIBC__) || defined(__GNU__)
+# ifndef LONG64
+#  define LONG64 long long
+#  define ULONG64 unsigned LONG64
+# endif
+#elif defined(UNDER_CE)
+# define LONG64 __int64
+# define ULONG64 unsigned LONG64
+#elif defined(__BORLANDC__)
+# define LONG64 __int64
+# define ULONG64 unsigned LONG64
+#endif
+
+#if defined(WIN32)
+# define soap_int32 __int32
+#elif defined(SYMBIAN)
+# define soap_int32 long
+#elif defined(PALM)
+# define soap_int32 Int32
+#else
+# define soap_int32 int32_t
+#endif
+
+#ifdef WIN32
+# define SOAP_ERANGE ERANGE
+# define SOAP_EINTR WSAEINTR
+# define SOAP_EAGAIN WSAEWOULDBLOCK
+# define SOAP_EWOULDBLOCK WSAEWOULDBLOCK
+# define SOAP_EINPROGRESS WSAEINPROGRESS
+#else
+# define SOAP_ERANGE ERANGE
+# define SOAP_EINTR EINTR
+# define SOAP_EAGAIN EAGAIN
+# ifdef SYMBIAN
+#  define SOAP_EWOULDBLOCK 9898
+#  define SOAP_EINPROGRESS 9899
+# else
+#  define SOAP_EWOULDBLOCK EWOULDBLOCK
+#  define SOAP_EINPROGRESS EINPROGRESS
+# endif
+#endif
+
+#ifdef WIN32
+# ifdef UNDER_CE
+#  define soap_errno GetLastError()
+#  define soap_socket_errno GetLastError()
+#  define soap_reset_errno SetLastError(0)
+# else
+#  define soap_errno GetLastError()
+#  define soap_socket_errno WSAGetLastError()
+#  define soap_reset_errno SetLastError(0)
+# endif
+#else
+# ifndef WITH_NOIO
+#  define soap_errno errno
+#  define soap_socket_errno errno
+#  define soap_reset_errno (errno = 0)
+# else
+#  define soap_errno 0
+#  define soap_socket_errno 0
+#  define soap_reset_errno
+# endif
+#endif
+
+#ifndef SOAP_BUFLEN
+# ifdef WITH_UDP
+#  define SOAP_BUFLEN (65536) /* max UDP packet size */
+# else
+#  ifndef WITH_LEAN
+#   define SOAP_BUFLEN (65536) /* buffer length for socket packets, also used by gethostbyname_r so don't make this too small */
+#  else
+#   define SOAP_BUFLEN  (2048)
+#  endif
+# endif
+#endif
+#ifndef SOAP_LABLEN
+# define SOAP_LABLEN     (64) /* initial look-aside buffer length */
+#endif
+#ifndef SOAP_PTRBLK
+# define SOAP_PTRBLK     (32) /* block allocation for pointer hash table chains */
+#endif
+#ifndef SOAP_PTRHASH
+# ifndef WITH_LEAN
+#  define SOAP_PTRHASH (1024) /* size of pointer analysis hash table (must be power of 2) */
+# else
+#  define SOAP_PTRHASH   (32)
+# endif
+#endif
+#ifndef SOAP_IDHASH
+# ifndef WITH_LEAN
+#  define SOAP_IDHASH  (1999) /* prime size of hash table for parsed id/ref */
+# else
+#  define SOAP_IDHASH    (19) /* 19, 199 */
+# endif
+#endif
+#ifndef SOAP_BLKLEN
+# ifndef WITH_LEAN
+#  define SOAP_BLKLEN   (256) /* size of blocks to collect long strings and XML attributes */
+# else
+#  define SOAP_BLKLEN    (32)
+# endif
+#endif
+#ifndef SOAP_TAGLEN
+# ifndef WITH_LEAN
+#  define SOAP_TAGLEN  (1024) /* maximum length of XML element tag/attribute name or host/path name + 1 */
+# else
+#  define SOAP_TAGLEN    (64)
+# endif
+#endif
+#ifndef SOAP_HDRLEN
+# ifndef WITH_LEAN
+#  define SOAP_HDRLEN  (8192) /* maximum length of HTTP header line (must be >4096 to read cookies) */
+# else
+#  define SOAP_HDRLEN  (1024)
+# endif
+#endif
+#ifndef SOAP_MAXDIMS
+# ifndef WITH_LEAN
+#  define SOAP_MAXDIMS	 (16) /* maximum array dimensions (array nestings) must be less than 64 to protect soap->tmpbuf */
+# else
+#  define SOAP_MAXDIMS	  (4)
+# endif
+#endif
+
+#ifndef SOAP_MAXLOGS
+# define SOAP_MAXLOGS	  (3) /* max number of debug logs per struct soap environment */
+# define SOAP_INDEX_RECV  (0)
+# define SOAP_INDEX_SENT  (1)
+# define SOAP_INDEX_TEST  (2)
+#endif
+
+#ifndef SOAP_MAXKEEPALIVE
+# define SOAP_MAXKEEPALIVE (100) /* max iterations to keep server connection alive */
+#endif
+
+#ifndef SOAP_MAXARRAYSIZE
+# define SOAP_MAXARRAYSIZE (100000) /* "trusted" max size of inbound SOAP array for compound array allocation */
+#endif
+
+#ifdef VXWORKS
+# ifdef __INCmathh 
+#  include <private/mathP.h>
+#  ifndef HAVE_ISNAN
+#   define HAVE_ISNAN
+#  endif
+#  define soap_isnan(num) isNan(num)
+# endif
+#endif
+
+#ifdef WIN32 
+# include <float.h>
+# ifndef HAVE_ISNAN
+#  define HAVE_ISNAN
+# endif
+# define soap_isnan(num) _isnan(num)
+#endif
+
+#ifdef SUN_OS
+# define soap_isnan(n) isnan(n)
+#endif
+
+#if !defined(HAVE_ISNAN) && (defined(_MATH_H) || defined(_MATH_INCLUDED))
+# define HAVE_ISNAN
+#endif
+
+#ifndef soap_isnan
+# ifdef HAVE_ISNAN
+#  define soap_isnan(n) isnan(n)
+# else
+#  define soap_isnan(_) (0)
+# endif
+#endif
+
+extern const struct soap_double_nan { unsigned int n1, n2; } soap_double_nan;
+
+#ifdef VXWORKS
+# ifndef FLT_MAX
+#  define FLT_MAX _ARCH_FLT_MAX
+# endif
+# ifndef DBL_MAX
+#  define DBL_MAX _ARCH_DBL_MAX
+# endif
+#endif
+
+#ifndef FLT_NAN
+# ifdef HAVE_ISNAN
+#  define FLT_NAN (*(float*)(void*)&soap_double_nan)
+# else
+#  define FLT_NAN (0.0)
+# endif
+#endif
+
+#ifndef FLT_PINFTY
+# if defined(FLT_MAX)
+#  define FLT_PINFTY FLT_MAX
+# elif defined(HUGE_VALF)
+#  define FLT_PINFTY (float)HUGE_VALF
+# elif defined(HUGE_VAL)
+#  define FLT_PINFTY (float)HUGE_VAL
+# elif defined(FLOAT_MAX)
+#  define FLT_PINFTY FLOAT_MAX
+# else
+#  define FLT_PINFTY (3.40282347e+38F)
+# endif
+#endif
+
+#ifndef FLT_NINFTY
+# define FLT_NINFTY (-FLT_PINFTY)
+#endif
+
+#ifndef DBL_NAN
+# ifdef HAVE_ISNAN
+#  define DBL_NAN (*(double*)(void*)&soap_double_nan)
+# else
+#  define DBL_NAN (0.0)
+# endif
+#endif
+
+#ifndef DBL_PINFTY
+# if defined(DBL_MAX)
+#  define DBL_PINFTY DBL_MAX
+# elif defined(HUGE_VALF)
+#  define DBL_PINFTY (double)HUGE_VALF
+# elif defined(HUGE_VAL)
+#  define DBL_PINFTY (double)HUGE_VAL
+# elif defined(DOUBLE_MAX)
+#  define DBL_PINFTY DOUBLE_MAX
+# else
+#  define DBL_PINFTY (1.7976931348623157e+308)
+# endif
+#endif
+
+#ifndef DBL_NINFTY
+# define DBL_NINFTY (-DBL_PINFTY)
+#endif
+
+#define soap_ispinfd(n) ((n) >= DBL_PINFTY)
+#define soap_ispinff(n) ((n) >= FLT_PINFTY)
+#define soap_isninfd(n) ((n) <= DBL_NINFTY)
+#define soap_isninff(n) ((n) <= FLT_NINFTY)
+
+/* gSOAP error codes */
+
+#define SOAP_EOF			EOF
+#define SOAP_ERR			EOF
+#define SOAP_OK				0
+#define SOAP_CLI_FAULT			1
+#define SOAP_SVR_FAULT			2
+#define SOAP_TAG_MISMATCH		3
+#define SOAP_TYPE			4
+#define SOAP_SYNTAX_ERROR		5
+#define SOAP_NO_TAG			6
+#define SOAP_IOB			7
+#define SOAP_MUSTUNDERSTAND		8
+#define SOAP_NAMESPACE			9
+#define SOAP_USER_ERROR			10
+#define SOAP_FATAL_ERROR		11
+#define SOAP_FAULT			12
+#define SOAP_NO_METHOD			13
+#define SOAP_GET_METHOD			14
+#define SOAP_EOM			15
+#define SOAP_NULL			16
+#define SOAP_DUPLICATE_ID		17
+#define SOAP_MISSING_ID			18
+#define SOAP_HREF			19
+#define SOAP_UDP_ERROR			20
+#define SOAP_TCP_ERROR			21
+#define SOAP_HTTP_ERROR			22
+#define SOAP_SSL_ERROR			23
+#define SOAP_ZLIB_ERROR			24
+#define SOAP_DIME_ERROR			25
+#define SOAP_DIME_HREF			26
+#define SOAP_DIME_MISMATCH		27
+#define SOAP_DIME_END			28
+#define SOAP_MIME_ERROR			29
+#define SOAP_MIME_HREF			30
+#define SOAP_MIME_END			31
+#define SOAP_VERSIONMISMATCH		32
+#define SOAP_PLUGIN_ERROR		33
+#define SOAP_DATAENCODINGUNKNOWN	34
+#define SOAP_REQUIRED			35
+#define SOAP_PROHIBITED			36
+#define SOAP_OCCURS			37
+#define SOAP_LENGTH			38
+
+#define soap_xml_error_check(e) ((e) == SOAP_TAG_MISMATCH || (e) == SOAP_TAG_END || (e) == SOAP_SYNTAX_ERROR || (e) == SOAP_NAMESPACE || (e) == SOAP_DUPLICATE_ID || (e) == SOAP_MISSING_ID || (e) == SOAP_REQUIRED || (e) == SOAP_PROHIBITED || (e) == SOAP_OCCURS || (e) == SOAP_LENGTH || (e) == SOAP_NULL || (e) == SOAP_HREF)
+#define soap_soap_error_check(e) ((e) == SOAP_CLI_FAULT || (e) == SOAP_SVR_FAULT || (e) == SOAP_VERSIONMISMATCH || (e) == SOAP_MUSTUNDERSTAND || (e) == SOAP_FAULT || (e) == SOAP_NO_METHOD)
+#define soap_tcp_error_check(e) ((e) == SOAP_EOF || (e) == SOAP_TCP_ERROR)
+#define soap_ssl_error_check(e) ((e) == SOAP_SSL_ERROR)
+#define soap_zlib_error_check(e) ((e) == SOAP_ZLIB_ERROR)
+#define soap_http_error_check(e) ((e) == SOAP_HTTP_ERROR || (e) == SOAP_GET_METHOD || ((e) >= 100 && (e) < 600))
+
+/* gSOAP HTTP response status codes 100 to 599 are reserved */
+
+/* Codes 600 to 999 are user definable */
+
+/* Exceptional gSOAP HTTP response status codes >= 1000 */
+
+#define SOAP_STOP		1000	/* No HTTP response */
+#define SOAP_FORM		1001	/* Form request/response */
+#define SOAP_HTML		1002	/* Custom HTML response */
+#define SOAP_FILE		1003	/* Custom file-based response */
+
+/* gSOAP HTTP method codes */
+
+#define SOAP_POST		2000
+#define SOAP_GET		2001
+
+/* gSOAP DIME */
+
+#define SOAP_DIME_CF		0x01
+#define SOAP_DIME_ME		0x02
+#define SOAP_DIME_MB		0x04
+#define SOAP_DIME_VERSION	0x08 /* DIME version 1 */
+#define SOAP_DIME_MEDIA		0x10
+#define SOAP_DIME_ABSURI	0x20
+
+/* gSOAP ZLIB */
+
+#define SOAP_ZLIB_NONE		0x00
+#define SOAP_ZLIB_DEFLATE	0x01
+#define SOAP_ZLIB_INFLATE	0x02
+#define SOAP_ZLIB_GZIP		0x02
+
+/* gSOAP transport, connection, and content encoding modes */
+
+typedef soap_int32 soap_mode;
+
+#define SOAP_IO			0x00000003	/* IO mask */
+#define SOAP_IO_FLUSH		0x00000000	/* flush output immediately, no buffering */
+#define SOAP_IO_BUFFER		0x00000001	/* buffer output in packets of size SOAP_BUFLEN */
+#define SOAP_IO_STORE		0x00000002	/* store entire output to determine length for transport */
+#define SOAP_IO_CHUNK		0x00000003	/* use HTTP chunked transfer AND buffer packets */
+
+#define SOAP_IO_UDP		0x00000004
+#define SOAP_IO_LENGTH		0x00000008
+#define SOAP_IO_KEEPALIVE	0x00000010
+
+#define SOAP_ENC_LATIN		0x00800020	/* iso-8859-1 encoding */
+#define SOAP_ENC_XML		0x00000040	/* plain XML encoding, no HTTP header */
+#define SOAP_ENC_DIME		0x00000080
+#define SOAP_ENC_MIME		0x00000100
+#define SOAP_ENC_MTOM		0x00000200
+#define SOAP_ENC_ZLIB		0x00000400
+#define SOAP_ENC_SSL		0x00000800
+
+#define SOAP_ENC		0x00000FFF	/* IO and ENC mask */
+
+#define SOAP_XML_STRICT		0x00001000	/* strict validation */
+#define SOAP_XML_INDENT		0x00002000
+#define SOAP_XML_CANONICAL	0x00004000	/* EXC C14N canonical XML */
+#define SOAP_XML_TREE		0x00008000
+#define SOAP_XML_GRAPH		0x00010000
+#define SOAP_XML_NIL		0x00020000
+#define SOAP_XML_DOM		0x00040000
+#define SOAP_XML_SEC		0x00080000	/* reserved for WS security */
+
+#define SOAP_C_NOIOB		0x00100000
+#define SOAP_C_UTFSTRING	0x00200000
+#define SOAP_C_MBSTRING		0x00400000
+
+#define SOAP_DOM_TREE		0x01000000
+#define SOAP_DOM_NODE		0x02000000
+#define SOAP_DOM_ASIS		0x04000000
+
+#define SOAP_IO_DEFAULT		SOAP_IO_FLUSH
+
+/* SSL client/server authentication settings */
+
+#define SOAP_SSL_NO_AUTHENTICATION		0x00	/* for testing purposes */
+#define SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION	0x01	/* client requires server to authenticate */
+#define SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION	0x02	/* server requires client to authenticate */
+
+#define SOAP_SSL_DEFAULT			SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION
+
+/* state */
+
+#define SOAP_INIT	1
+#define SOAP_COPY	2
+
+#define soap_check_state(soap) (!(soap) || ((soap)->state != SOAP_INIT && (soap)->state != SOAP_COPY))
+
+/* part */
+
+#define SOAP_BEGIN		0
+#define SOAP_IN_ENVELOPE	2
+#define SOAP_IN_HEADER		3
+#define SOAP_END_HEADER		4
+#define SOAP_NO_BODY		5
+#define SOAP_IN_BODY		6
+#define SOAP_END_BODY		7
+#define SOAP_END_ENVELOPE	8
+#define SOAP_END		9
+#define SOAP_BEGIN_SECURITY	10
+#define SOAP_IN_SECURITY	11
+#define SOAP_END_SECURITY	12
+
+/* DEBUG macros */
+
+#ifndef WITH_LEAN
+# ifdef DEBUG
+#  ifndef SOAP_DEBUG
+#   define SOAP_DEBUG
+#  endif
+# endif
+#endif
+
+#ifdef SOAP_DEBUG
+# define SOAP_MALLOC(soap, size) soap_track_malloc(soap, __FILE__, __LINE__, size)
+# define SOAP_FREE(soap, ptr) soap_track_free(soap, __FILE__, __LINE__, ptr)
+#endif
+
+#ifndef SOAP_MALLOC			/* use libc malloc */
+# define SOAP_MALLOC(soap, size) malloc(size)
+#endif
+
+#ifndef SOAP_FREE			/* use libc free */
+# define SOAP_FREE(soap, ptr) free(ptr)
+#endif
+
+#ifdef SOAP_DEBUG
+# ifndef SOAP_MESSAGE
+#  define SOAP_MESSAGE fprintf
+# endif
+# ifndef DBGLOG
+#  define DBGLOG(DBGFILE, CMD) \
+{ if (soap)\
+  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
+      soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\
+    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
+    { FILE *fdebug = soap->fdebug[SOAP_INDEX_##DBGFILE];\
+      CMD;\
+      fflush(fdebug);\
+    }\
+  }\
+}
+# endif
+# ifndef DBGMSG
+#  define DBGMSG(DBGFILE, MSG, LEN) \
+{ if (soap)\
+  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
+      soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\
+    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
+    { fwrite((MSG), 1, (LEN), soap->fdebug[SOAP_INDEX_##DBGFILE]);\
+      fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\
+    }\
+  }\
+}
+# endif
+# ifndef DGBFUN
+#  define DBGFUN(FNAME) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s()\n", __FILE__, __LINE__, FNAME))
+#  define DBGFUN1(FNAME, FMT, ARG) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT")\n", __FILE__, __LINE__, FNAME, (ARG)))
+#  define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2)))
+#  define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2", "FMT3")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2), (ARG3)))
+# endif
+# ifndef DBGHEX
+#  define DBGHEX(DBGFILE, MSG, LEN) \
+{ if (soap)\
+  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
+      soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\
+    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
+    { int i; char *s;\
+      for (s = (char*)(MSG), i = (LEN); i; i--)\
+        fprintf(soap->fdebug[SOAP_INDEX_##DBGFILE], "%2.2hhX  ", *s++);\
+      fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\
+    }\
+  }\
+}
+# endif
+#else
+# define DBGLOG(DBGFILE, CMD)
+# define DBGMSG(DBGFILE, MSG, LEN)
+# define DBGFUN(FNAME)
+# define DBGFUN1(FNAME, FMT, ARG)
+# define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2)
+# define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3)
+# define DBGHEX(DBGFILE, MSG, LEN)
+#endif
+
+/* UCS-4 requires 32 bits (0-7FFFFFFF, the sign bit is used by gSOAP to distinguish XML entities) */
+typedef soap_int32 soap_wchar;
+
+/* namespace table row */
+struct Namespace
+{ const char *id;
+  const char *ns;
+  const char *in;
+  char *out;
+};
+
+/* namespace stack */
+struct soap_nlist
+{ struct soap_nlist *next;
+  unsigned int level; /* nesting depth level */
+  short index; /* corresponding entry in ns mapping table */
+  char *ns; /* only set when parsed ns URI is not in the ns mapping table */
+  char id[1]; /* the actual string value flows into the allocated region below this struct */
+};
+
+/* block stack for nested block allocations */
+struct soap_blist
+{ struct soap_blist *next;
+  char *ptr;
+  size_t size;
+};
+
+/* array layout */
+struct soap_array
+{ void *__ptr;
+  int __size;
+};
+
+/* pointer serialization management */
+struct soap_plist
+{ struct soap_plist *next;
+  const void *ptr;
+  const struct soap_array *array;
+  int type;
+  int id;
+  char mark1;
+  char mark2;
+};
+
+/* block allocation for pointer serialization management */
+struct soap_pblk
+{ struct soap_pblk *next;
+  struct soap_plist plist[SOAP_PTRBLK];
+};
+
+#ifdef SOAP_DEBUG
+/* malloc/free tracking for debugging */
+struct soap_mlist
+{ struct soap_mlist *next;
+  const void *ptr;
+  const char *file;
+  int line;
+  short live;
+};
+#endif
+
+/* class allocation list */
+struct soap_clist
+{ struct soap_clist *next;
+  void *ptr;
+  int type;
+  int size;
+  void (*fdelete)(struct soap_clist*);
+};
+
+/* attributes */
+struct soap_attribute
+{ struct soap_attribute *next;
+  char *value;
+  size_t size;
+  char *ns;
+  short visible;
+  char name[1]; /* the actual name string flows into the allocated region below this struct */
+};
+
+struct soap_cookie
+{ struct soap_cookie *next;
+  char *name;
+  char *value;
+  char *domain;
+  char *path;
+  long expire;		/* client-side: local time to expire; server-side: seconds to expire */
+  unsigned int version;
+  short secure;
+  short session;	/* server-side */
+  short env;		/* server-side: got cookie from client and should not be (re)send */
+  short modified;	/* server-side: client cookie was modified and should be send */
+};
+
+#ifdef __cplusplus
+SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*);
+
+class soap_multipart_iterator
+{ public:
+  struct soap_multipart *content;
+  bool operator==(const soap_multipart_iterator& iter) const
+    { return content == iter.content; }
+  bool operator!=(const soap_multipart_iterator& iter) const
+    { return content != iter.content; }
+  struct soap_multipart &operator*() const
+    { return *content; }
+  soap_multipart_iterator &operator++()
+    { content = soap_next_multipart(content); return *this; }
+  soap_multipart_iterator() : content(NULL)
+    { }
+  soap_multipart_iterator(struct soap_multipart *p) : content(p)
+    { }
+};
+#endif
+
+#ifndef WITH_LEANER
+struct soap_dime
+{ size_t count;
+  size_t size;
+  size_t chunksize;
+  size_t buflen;
+  char flags;
+  char *ptr;
+  const char *id;
+  const char *type;
+  const char *options;
+  struct soap_multipart *list;		/* list of DIME attachments received */
+  struct soap_multipart *first, *last;	/* temporary in/out queue */
+#ifdef __cplusplus
+  soap_multipart_iterator begin()
+    { soap_multipart_iterator iter(list); return iter; };
+  soap_multipart_iterator end()
+    { soap_multipart_iterator iter(NULL); return iter; };
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+struct soap_mime
+{ char *boundary;			/* MIME boundary */
+  const char *start;			/* MIME start ID */
+  struct soap_multipart *list;		/* list of MIME attachments received */
+  struct soap_multipart *first, *last;	/* temporary in/out queue */
+#ifdef __cplusplus
+  soap_multipart_iterator begin()
+    { soap_multipart_iterator iter(list); return iter; };
+  soap_multipart_iterator end()
+    { soap_multipart_iterator iter(NULL); return iter; };
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+/* RFC2045 MIME content transfer encodings */
+enum soap_mime_encoding
+{ SOAP_MIME_NONE,
+  SOAP_MIME_7BIT,
+  SOAP_MIME_8BIT,
+  SOAP_MIME_BINARY,
+  SOAP_MIME_QUOTED_PRINTABLE,
+  SOAP_MIME_BASE64,
+  SOAP_MIME_IETF_TOKEN,
+  SOAP_MIME_X_TOKEN
+};
+#endif
+
+#ifndef WITH_LEANER
+/* DIME/MIME multipart list */
+struct soap_multipart
+{ struct soap_multipart *next;
+  char *ptr;				/* points to raw data content */
+  size_t size;				/* size of data content */
+  const char *id;			/* DIME/MIME content ID or form data name */
+  const char *type;			/* DIME/MIME type (MIME type format) */
+  const char *options;			/* DIME options */
+  enum soap_mime_encoding encoding;	/* MIME Content-Transfer-Encoding */
+  const char *location;			/* MIME Content-Location (optional) */
+  const char *description;		/* MIME Content-Description (optional) */
+#ifdef __cplusplus
+  typedef soap_multipart_iterator iterator;
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+/* attachment DIME and MTOM XOP forwarding */
+struct soap_xlist
+{ struct soap_xlist *next;
+  unsigned char **ptr;
+  int *size;
+  char *id;
+  char **type;
+  char **options;
+};
+#endif
+
+/******************************************************************************/
+
+#ifndef WITH_LEANER
+#ifdef __cplusplus
+class soap_dom_attribute_iterator
+{ public:
+  struct soap_dom_attribute *att;
+  const char *nstr;
+  const char *name;
+  bool operator==(const soap_dom_attribute_iterator&) const;
+  bool operator!=(const soap_dom_attribute_iterator&) const;
+  struct soap_dom_attribute &operator*() const;
+  soap_dom_attribute_iterator &operator++();
+  soap_dom_attribute_iterator();
+  soap_dom_attribute_iterator(struct soap_dom_attribute*);
+  ~soap_dom_attribute_iterator();
+};
+#endif
+#endif
+
+#ifndef WITH_LEANER
+struct soap_dom_attribute
+{ struct soap_dom_attribute *next;
+  const char *nstr;
+  char *name;
+  char *data;
+  wchar_t *wide;
+  struct soap *soap;
+#ifdef __cplusplus
+  typedef soap_dom_attribute_iterator iterator;
+  struct soap_dom_attribute &set(const char *nstr, const char *name);	/* set namespace and name */
+  struct soap_dom_attribute &set(const char *data);		/* set data */
+  soap_dom_attribute_iterator begin();
+  soap_dom_attribute_iterator end();
+  soap_dom_attribute_iterator find(const char *nstr, const char *name);
+  void unlink();
+  soap_dom_attribute();
+  soap_dom_attribute(struct soap *soap);
+  soap_dom_attribute(struct soap *soap, const char *nstr, const char *name, const char *data);
+  ~soap_dom_attribute();
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+#ifdef __cplusplus
+class soap_dom_element_iterator
+{ public:
+  struct soap_dom_element *elt;
+  const char *nstr;
+  const char *name;
+  int type;
+  bool operator==(const soap_dom_element_iterator&) const;
+  bool operator!=(const soap_dom_element_iterator&) const;
+  struct soap_dom_element &operator*() const;
+  soap_dom_element_iterator &operator++();
+  soap_dom_element_iterator();
+  soap_dom_element_iterator(struct soap_dom_element*);
+  ~soap_dom_element_iterator();
+};
+#endif
+#endif
+
+#ifndef WITH_LEANER
+struct soap_dom_element
+{ struct soap_dom_element *next;	/* next sibling */
+  struct soap_dom_element *prnt;	/* parent */
+  struct soap_dom_element *elts;	/* list of child elements */
+  struct soap_dom_attribute *atts;	/* list of attributes */
+  const char *nstr;			/* namespace string */
+  char *name;				/* element tag name */
+  char *data;				/* element content data (with SOAP_C_UTFSTRING flag set) */
+  wchar_t *wide;			/* element content data */
+  int type;				/* optional: serialized C/C++ data type */
+  void *node;				/* optional: pointer to serialized C/C++ data */
+  char *head;				/* leading whitespace to start tag */
+  char *tail;				/* leading whitespace to end tag */
+  struct soap *soap;			/* soap context that manages this node */
+#ifdef __cplusplus
+  typedef soap_dom_element_iterator iterator;
+  struct soap_dom_element &set(const char *nstr, const char *name);
+  struct soap_dom_element &set(const char *data);
+  struct soap_dom_element &set(void *node, int type);
+  struct soap_dom_element &add(struct soap_dom_element*);
+  struct soap_dom_element &add(struct soap_dom_element&);
+  struct soap_dom_element &add(struct soap_dom_attribute*);
+  struct soap_dom_element &add(struct soap_dom_attribute&);
+  soap_dom_element_iterator begin();
+  soap_dom_element_iterator end();
+  soap_dom_element_iterator find(const char *nstr, const char *name);
+  soap_dom_element_iterator find(int type);
+  void unlink();
+  soap_dom_element();
+  soap_dom_element(struct soap *soap);
+  soap_dom_element(struct soap *soap, const char *nstr, const char *name);
+  soap_dom_element(struct soap *soap, const char *nstr, const char *name, const char *data);
+  soap_dom_element(struct soap *soap, const char *nstr, const char *name, void *node, int type);
+  ~soap_dom_element();
+#endif
+};
+SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_dom_next_element(struct soap_dom_element *elt);
+SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_dom_next_attribute(struct soap_dom_attribute *att);
+#endif
+
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+}
+extern std::ostream &operator<<(std::ostream&, const struct soap_dom_element&);
+extern std::istream &operator>>(std::istream&, struct soap_dom_element&);
+extern "C" {
+#endif
+
+/******************************************************************************/
+
+struct soap
+{ short state;			/* 0 = uninitialized, 1 = initialized, 2 = copy of another soap struct */
+  short version;		/* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table) */
+  soap_mode mode;
+  soap_mode imode;
+  soap_mode omode;
+  const char *float_format;	/* user-definable format string for floats (<1024 chars) */
+  const char *double_format;	/* user-definable format string for doubles (<1024 chars) */
+  const char *dime_id_format;	/* user-definable format string for integer DIME id (<SOAP_TAGLEN chars) */
+  const char *http_version;	/* HTTP version used "1.0" or "1.1" */
+  const char *http_content;	/* optional custom response content type (with SOAP_FILE) */
+  const char *encodingStyle;	/* default = NULL which means that SOAP encoding is used */
+  const char *actor;		/* SOAP-ENV:actor or role attribute value */
+  int recv_timeout;		/* when > 0, gives socket recv timeout in seconds, < 0 in usec */
+  int send_timeout;		/* when > 0, gives socket send timeout in seconds, < 0 in usec */
+  int connect_timeout;		/* when > 0, gives socket connect() timeout in seconds, < 0 in usec */
+  int accept_timeout;		/* when > 0, gives socket accept() timeout in seconds, < 0 in usec */
+  int socket_flags;		/* socket recv() and send() flags, e.g. set to MSG_NOSIGNAL to disable sigpipe */
+  int connect_flags;		/* connect() SOL_SOCKET sockopt flags, e.g. set to SO_DEBUG to debug socket */
+  int bind_flags;		/* bind() SOL_SOCKET sockopt flags, e.g. set to SO_REUSEADDR to enable reuse */
+  int accept_flags;		/* accept() SOL_SOCKET sockopt flags */
+  const struct Namespace *namespaces;	/* Pointer to global namespace mapping table */
+  struct Namespace *local_namespaces;	/* Local namespace mapping table */
+  struct soap_nlist *nlist;	/* namespace stack */
+  struct soap_blist *blist;	/* block allocation stack */
+  struct soap_clist *clist;	/* class instance allocation list */
+  void *alist;			/* memory allocation (malloc) list */
+  struct soap_ilist *iht[SOAP_IDHASH];
+  struct soap_plist *pht[SOAP_PTRHASH];
+  struct soap_pblk *pblk;	/* plist block allocation */
+  short pidx;			/* plist block allocation */
+  struct SOAP_ENV__Header *header;
+  struct SOAP_ENV__Fault *fault;
+  int idnum;
+  void *user;			/* to pass user-defined data */
+  struct soap_plugin *plugins;	/* linked list of plug-in data */
+  char *userid;			/* HTTP Basic authorization userid */
+  char *passwd;			/* HTTP Basic authorization passwd */
+  int (*fpost)(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
+  int (*fget)(struct soap*);
+  int (*fform)(struct soap*);
+  int (*fposthdr)(struct soap*, const char*, const char*);
+  int (*fresponse)(struct soap*, int, size_t);
+  int (*fparse)(struct soap*);
+  int (*fparsehdr)(struct soap*, const char*, const char*);
+  int (*fresolve)(struct soap*, const char*, struct in_addr* inaddr);
+  int (*fconnect)(struct soap*, const char*, const char*, int);
+  int (*fdisconnect)(struct soap*);
+  int (*fclosesocket)(struct soap*, SOAP_SOCKET);
+  int (*fshutdownsocket)(struct soap*, SOAP_SOCKET, int);
+  int (*fopen)(struct soap*, const char*, const char*, int);
+  int (*faccept)(struct soap*, int, struct sockaddr*, int *n);
+  int (*fclose)(struct soap*);
+  int (*fsend)(struct soap*, const char*, size_t);
+  size_t (*frecv)(struct soap*, char*, size_t);
+  int (*fpoll)(struct soap*);
+  void (*fseterror)(struct soap*, const char **c, const char **s);
+  int (*fignore)(struct soap*, const char*);
+  int (*fserveloop)(struct soap*);
+  void *(*fplugin)(struct soap*, const char*);
+#ifndef WITH_LEANER
+  int (*fprepareinit)(struct soap*);
+  int (*fpreparesend)(struct soap*, const char*, size_t);
+  int (*fpreparerecv)(struct soap*, const char*, size_t);
+  int (*fpreparefinal)(struct soap*);
+  void *(*fdimereadopen)(struct soap*, void*, const char*, const char*, const char*);
+  void *(*fdimewriteopen)(struct soap*, const char*, const char*, const char*);
+  void (*fdimereadclose)(struct soap*, void*);
+  void (*fdimewriteclose)(struct soap*, void*);
+  size_t (*fdimeread)(struct soap*, void*, char*, size_t);
+  int (*fdimewrite)(struct soap*, void*, const char*, size_t);
+#endif
+  int master;
+  int socket;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  std::ostream *os;
+  std::istream *is;
+#else
+  void *os;	/* preserve alignment */
+  void *is;	/* preserve alignment */
+#endif
+#ifndef UNDER_CE
+  int sendfd;
+  int recvfd;
+#else
+  FILE *sendfd;
+  FILE *recvfd;
+#endif
+#ifdef WIN32
+  char errorstr[256];	/* buf for FormatMessage() */
+#endif
+  size_t bufidx;	/* index in soap.buf[] */
+  size_t buflen;	/* length of soap.buf[] content */
+  soap_wchar ahead;	/* parser lookahead */
+  short cdata;		/* CDATA parser state */
+  short body;		/* parsed XML element has a body or not */
+  unsigned int level;	/* XML nesting level */
+  size_t count;		/* message length counter */
+  size_t length;	/* message length as set by HTTP header */
+#ifdef WITH_FAST
+  char *labbuf;		/* look-aside buffer */
+  size_t lablen;	/* look-aside buffer allocated length */
+  size_t labidx;	/* look-aside buffer index to available part */
+#endif
+  char buf[SOAP_BUFLEN];/* send and receive buffer */
+  char tmpbuf[1024];	/* in/output buffer for HTTP headers, simpleType values, attribute names, and DIME >=1024 bytes */
+  char msgbuf[1024];	/* output buffer for (error) messages <=1024 bytes */
+  char tag[SOAP_TAGLEN];
+  char id[SOAP_TAGLEN];
+  char href[SOAP_TAGLEN];
+  char type[SOAP_TAGLEN];
+  char arrayType[SOAP_TAGLEN];
+  char arraySize[SOAP_TAGLEN];
+  char arrayOffset[SOAP_TAGLEN];
+  short other;
+  short position;
+  int positions[SOAP_MAXDIMS];
+  short root;
+  struct soap_attribute *attributes;	/* attribute list */
+  short encoding;	/* when set, output encodingStyle */
+  short mustUnderstand;	/* a mustUnderstand element was parsed or is output */
+  short keep_alive;	/* connection should be kept open */
+  short null;		/* parsed XML is xsi:nil */
+  short ns;		/* when not set, output full xmlns bindings */
+  short part;		/* parsing state */
+  short alloced;
+  short peeked;
+  size_t chunksize;
+  size_t chunkbuflen;
+  char endpoint[SOAP_TAGLEN];
+  char path[SOAP_TAGLEN];
+  char host[SOAP_TAGLEN];
+  char *action;
+  char *authrealm;		/* HTTP authentication realm */
+  char *prolog;			/* XML declaration prolog */
+  unsigned long ip;		/* IP number */
+  int port;			/* port number */
+  unsigned int max_keep_alive;
+  const char *proxy_host;	/* Proxy Server host name */
+  int proxy_port;		/* Proxy Server port (default = 8080) */
+  const char *proxy_userid;	/* Proxy Authorization user name */
+  const char *proxy_passwd;	/* Proxy Authorization password */
+  int status;			/* -1 when request, else error code to be returned by server */
+  int error;
+  int errmode;
+  int errnum;
+#ifndef WITH_LEANER
+  struct soap_dom_element *dom;
+  struct soap_dime dime;
+  struct soap_mime mime;
+  struct soap_xlist *xlist;
+#endif
+#if !defined(WITH_LEAN) || defined(SOAP_DEBUG)
+  const char *logfile[SOAP_MAXLOGS];
+  FILE *fdebug[SOAP_MAXLOGS];
+  struct soap_mlist *mht[SOAP_PTRHASH];
+#endif
+#ifndef WITH_LEAN
+  const char *c14ninclude;
+  const char *c14nexclude;
+  struct soap_cookie *cookies;
+  const char *cookie_domain;
+  const char *cookie_path;
+  int cookie_max;
+#endif
+#ifndef WITH_NOIO
+#ifdef WITH_IPV6
+  struct sockaddr_storage peer;	/* IPv6: set by soap_accept and by UDP recv */
+#else
+  struct sockaddr_in peer;	/* IPv4: set by soap_connect/soap_accept and by UDP recv */
+#endif
+  size_t peerlen;
+#endif
+#ifdef WITH_OPENSSL
+  int (*fsslauth)(struct soap*);
+  int (*fsslverify)(int, X509_STORE_CTX*);
+  BIO *bio;
+  SSL *ssl;
+  SSL_CTX *ctx;
+  short require_server_auth;
+  short require_client_auth;
+  short rsa;			/* when set, use RSA instead of DH */
+  const char *keyfile;
+  const char *password;
+  const char *dhfile;
+  const char *cafile;
+  const char *capath;
+  const char *crlfile;
+  const char *randfile;
+  SSL_SESSION *session;
+  char session_host[SOAP_TAGLEN];
+  int session_port;
+#endif
+#ifdef WITH_ZLIB
+  short zlib_state;		/* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_INFLATE */
+  short zlib_in;		/* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */
+  short zlib_out;		/* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */
+  z_stream d_stream;		/* decompression stream */
+  char z_buf[SOAP_BUFLEN];	/* buffer */
+  size_t z_buflen;
+  unsigned short z_level;	/* compression level to be used (0=none, 1=fast to 9=best) */
+  uLong z_crc;			/* internal gzip crc */
+  float z_ratio_in;		/* detected compression ratio compressed_length/length of inbound message */
+  float z_ratio_out;		/* detected compression ratio compressed_length/length of outbound message */
+#endif
+#ifdef WMW_RPM_IO
+  void *rpmreqid;
+#endif
+#ifndef WITH_LEAN
+#ifdef __cplusplus
+  soap();
+  soap(soap_mode);
+  soap(soap_mode, soap_mode);
+  soap(struct soap&);
+  ~soap();
+#endif
+#endif
+};
+
+struct soap_code_map
+{ long code;
+  const char *string;
+};
+
+/* forwarding list */
+struct soap_flist
+{ struct soap_flist *next;
+  int type;
+  void *ptr;
+  unsigned int level;
+  size_t len;
+  void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t);
+};
+
+/* id-ref forwarding list */
+struct soap_ilist
+{ struct soap_ilist *next;
+  int type;
+  size_t size;
+  void *link;
+  void *copy;
+  struct soap_flist *flist;
+  void *ptr;
+  unsigned int level;
+  char id[1]; /* the actual id string value flows into the allocated region below this struct */
+};
+
+struct soap_plugin
+{ struct soap_plugin *next;
+  const char *id;
+  void *data;
+  int (*fcopy)(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src);
+  void (*fdelete)(struct soap *soap, struct soap_plugin *p); /* should delete fields of plugin only and not free(p) */
+};
+
+#ifndef WITH_NONAMESPACES
+extern SOAP_NMAC struct Namespace namespaces[];
+#endif
+
+#ifndef WITH_LEAN
+# define soap_get0(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx])
+# define soap_get1(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx++])
+#else
+soap_wchar soap_get0(struct soap*);
+soap_wchar soap_get1(struct soap*);
+#endif
+
+#define soap_revget1(soap) ((soap)->bufidx--)
+#define soap_unget(soap, c) ((soap)->ahead = c)
+#define soap_register_plugin(soap, plugin) soap_register_plugin_arg(soap, plugin, NULL)
+#define soap_imode(soap, n) ((soap)->mode = (soap)->imode = (n))
+#define soap_set_imode(soap, n) ((soap)->imode |= (n))
+#define soap_clr_imode(soap, n) ((soap)->imode &= ~(n))
+#define soap_omode(soap, n) ((soap)->mode = (soap)->omode = (n))
+#define soap_set_omode(soap, n) ((soap)->omode |= (n))
+#define soap_clr_omode(soap, n) ((soap)->omode &= ~(n))
+#define soap_set_mode(soap, n) ((soap)->imode |= (n), (soap)->omode |= (n))
+#define soap_clr_mode(soap, n) ((soap)->imode &= ~(n), (soap)->omode &= ~(n))
+#define soap_destroy(soap) soap_delete((soap), NULL)
+
+#ifdef HAVE_STRRCHR
+# define soap_strrchr(s, t) strrchr(s, t)
+#else
+ SOAP_FMAC1 char* SOAP_FMAC2 soap_strrchr(const char *s, int t);
+#endif
+
+#ifdef HAVE_STRTOL
+# define soap_strtol(s, t, b) strtol(s, t, b)
+#else
+ SOAP_FMAC1 long SOAP_FMAC2 soap_strtol(const char *s, char **t, int b);
+#endif
+
+#ifdef HAVE_STRTOUL
+# define soap_strtoul(s, t, b) strtoul(s, t, b)
+#else
+ SOAP_FMAC1 unsigned long SOAP_FMAC2 soap_strtoul(const char *s, char **t, int b);
+#endif
+
+#if defined(WITH_OPENSSL)
+# define soap_random soap_rand()
+SOAP_FMAC1 int SOAP_FMAC2 soap_rand();
+#elif defined(HAVE_RANDOM)
+# define soap_random (int)random()
+#else
+# define soap_random rand()
+#endif
+
+#ifdef WITH_NOIDREF
+# define soap_embedded(s, p, t) (0)
+# define soap_id_lookup(s, i, p, t, n, k) (p)
+# define soap_id_forward(s, h, p, len, st, tt, n, k, fc) (p)
+# define soap_reference(s, a, t) (1)
+# define soap_array_reference(s, p, a, n, t) (1)
+# define soap_embed(s, p, a, n, t, pp) (0)
+# define soap_embedded_id(s, i, p, t) (i)
+# define soap_is_embedded(s, p) (0)
+# define soap_is_single(s, p) (1)
+# define soap_lookup_type(s, i) (0)
+# define soap_getindependent(s) (0)
+# define soap_putindependent(s) (0)
+# define soap_getelement(s, n) (n)
+# define soap_putelement(s, p, t, i, n) (0)
+# define soap_markelement(s, p, n) (0)
+#endif
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_fault(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultcode(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultsubcode(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultstring(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultdetail(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_serializeheader(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putheader(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getheader(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_serializefault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putfault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getfault(struct soap*);
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_ssl_init();
+SOAP_FMAC1 int SOAP_FMAC2 soap_poll(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_connect_command(struct soap*, int, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_connect(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_bind(struct soap*, const char*, int, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_accept(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_accept(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_server_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_client_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_puthttphdr(struct soap*, int status, size_t count);
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_get_header_attribute(struct soap*, const char*, const char*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_key(char*, size_t, const char*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_val(char*, size_t, const char*);
+
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_hash(const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_endpoint(struct soap*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_flush_raw(struct soap*, const char*, size_t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_flush(struct soap*);
+SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_get(struct soap*);
+SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getchar(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_tag_cmp(const char*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_fault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault_subcode(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault_subcode(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_sender_error(struct soap*, const char*, const char*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_receiver_error(struct soap*, const char*, const char*, int);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_send_raw(struct soap*, const char*, size_t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_raw(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_send(struct soap*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_send2(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_send3(struct soap*, const char*, const char*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_pututf8(struct soap*, unsigned long);
+SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getutf8(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_putbase64(struct soap*, const unsigned char*, int);
+SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_getbase64(struct soap*, int*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_puthex(struct soap*, const unsigned char*, int);
+SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_gethex(struct soap*, int*);
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_xop_forward(struct soap*, unsigned char**, int*, char**, char**, char**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_dime_forward(struct soap*, unsigned char**, int*, char**, char**, char**);
+#endif
+
+#ifndef WITH_NOIDREF
+SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup_id(struct soap*, void *p, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup(struct soap*, const void *p, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_enter(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_array_pointer_lookup(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type);
+SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_lookup(struct soap*, const char*);
+SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_enter(struct soap*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_resolve(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_embedded(struct soap*, const void *p, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_reference(struct soap*, const void *p, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_array_reference(struct soap*, const void *p, const struct soap_array *a, int n, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_embedded_id(struct soap*, int id, const void *p, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_is_embedded(struct soap*, struct soap_plist*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_is_single(struct soap*, struct soap_plist*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_embedded(struct soap*, struct soap_plist*);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_begin_count(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_end_count(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_begin_send(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_end_send(struct soap*);
+
+SOAP_FMAC1 const struct soap_code_map* SOAP_FMAC2 soap_code(const struct soap_code_map*, const char *str);
+SOAP_FMAC1 long SOAP_FMAC2 soap_int_code(const struct soap_code_map*, const char *str, long other);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_str_code(const struct soap_code_map*, long code);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_getline(struct soap*, char*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_begin_recv(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_end_recv(struct soap*);
+
+SOAP_FMAC1 void* SOAP_FMAC2 soap_malloc(struct soap*, size_t);
+SOAP_FMAC1 void SOAP_FMAC2 soap_dealloc(struct soap*, void*);
+SOAP_FMAC1 struct soap_clist * SOAP_FMAC2 soap_link(struct soap*, void*, int, int, void (*fdelete)(struct soap_clist*));
+SOAP_FMAC1 void SOAP_FMAC2 soap_unlink(struct soap*, const void*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_free(struct soap*);
+
+SOAP_FMAC1 void* SOAP_FMAC2 soap_track_malloc(struct soap*, const char*, int, size_t);
+SOAP_FMAC1 void SOAP_FMAC2 soap_track_free(struct soap*, const char*, int, void*);
+
+#ifndef WITH_NOIDREF
+SOAP_FMAC1 int SOAP_FMAC2 soap_lookup_type(struct soap*, const char *id);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_id_lookup(struct soap*, const char *id, void **p, int t, size_t n, unsigned int k);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_id_forward(struct soap*, const char *id, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void(*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t));
+#endif
+SOAP_FMAC1 void* SOAP_FMAC2 soap_id_enter(struct soap*, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*));
+SOAP_FMAC1 void SOAP_FMAC2 soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t, const void *q, size_t n);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_size(const int *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getoffsets(const char *, const int *, int *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getsize(const char *, const char *, int *);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getsizes(const char *, int *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getposition(const char *, int *);
+
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putsize(struct soap*, const char *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizesoffsets(struct soap*, const char *, const int *, const int *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizes(struct soap*, const char *, const int *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffset(struct soap*, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffsets(struct soap*, const int *, int);
+ 
+SOAP_FMAC1 int SOAP_FMAC2 soap_closesock(struct soap*);
+
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new(void);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new1(soap_mode);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new2(soap_mode, soap_mode);
+SOAP_FMAC1 void SOAP_FMAC2 soap_del(struct soap*);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy(struct soap*);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy_context(struct soap*, struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_init(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_init1(struct soap*, soap_mode);
+SOAP_FMAC1 void SOAP_FMAC2 soap_init2(struct soap*, soap_mode, soap_mode);
+SOAP_FMAC1 void SOAP_FMAC2 soap_done(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_cleanup(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_begin(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_end(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_delete(struct soap*, void*);
+
+#ifdef SOAP_DEBUG
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_recv_logfile(struct soap*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_sent_logfile(struct soap*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_test_logfile(struct soap*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_close_logfiles(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_open_logfile(struct soap*, int);
+#endif
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_token(struct soap*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_value(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_match_tag(struct soap*, const char*, const char *);
+SOAP_FMAC1 int SOAP_FMAC2 soap_match_array(struct soap*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_element(struct soap*, const char*, int, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_out(struct soap*, const char *tag, int id, const char *type);
+SOAP_FMAC1 int SOAP_FMAC2 soap_array_begin_out(struct soap*, const char *tag, int id, const char *type, const char *offset);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_ref(struct soap*, const char *tag, int id, int href);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_href(struct soap*, const char *tag, int id, const char *ref, const char *val);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_null(struct soap*, const char *tag, int id, const char *type);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_id(struct soap*, const char *tag, int id, const void *p, const struct soap_array *a, int d, const char *type, int n);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_result(struct soap*, const char *tag);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_out(struct soap*, const char *tag);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_start_end_out(struct soap*, const char *tag);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_attribute(struct soap*, const char*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_in(struct soap*, const char *tag, int nillable);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_in(struct soap*, const char *tag);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_peek_element(struct soap*);
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_retry(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_revert(struct soap*);
+
+SOAP_FMAC1 char* SOAP_FMAC2 soap_strdup(struct soap*, const char*);
+SOAP_FMAC1 const char * SOAP_FMAC2 soap_strsearch(const char *big, const char *little);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_string_out(struct soap*, const char *s, int flag);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_string_in(struct soap*, int, long, long);
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_wstring_out(struct soap*, const wchar_t *s, int flag);
+SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstring_in(struct soap*, int, long, long);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_match_namespace(struct soap*, const char *, const char*, int n1, int n2);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_namespaces(struct soap*, struct Namespace*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_local_namespaces(struct soap*);
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_pop_namespace(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_push_namespace(struct soap*, const char *,const char *);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_current_namespace(struct soap *soap, const char *tag);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_store_lab(struct soap*, const char*, size_t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_append_lab(struct soap*, const char*, size_t);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_new_block(struct soap*);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_push_block(struct soap*, size_t);
+SOAP_FMAC1 void SOAP_FMAC2 soap_pop_block(struct soap*);
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_size_block(struct soap*, size_t);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_first_block(struct soap*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_next_block(struct soap*);
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_block_size(struct soap*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_save_block(struct soap*, char*, int);
+SOAP_FMAC1 void SOAP_FMAC2 soap_end_block(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_out(struct soap*);
+SOAP_FMAC1 int soap_envelope_end_out(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_in(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_end_in(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_out(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_out(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_in(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_in(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_header(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_response(struct soap*, int);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_send_empty_response(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_empty_response(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_send_fault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_fault(struct soap*);
+
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault(struct soap*, FILE*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault_location(struct soap*, FILE*);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2byte(struct soap*, const char*, char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2short(struct soap*, const char*, short*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2int(struct soap*, const char*, int*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2long(struct soap*, const char*, long*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2LONG64(struct soap*, const char*, LONG64*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2float(struct soap*, const char*, float*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2double(struct soap*, const char*, double*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedByte(struct soap*, const char*, unsigned char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedShort(struct soap*, const char*, unsigned short*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedInt(struct soap*, const char*, unsigned int*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedLong(struct soap*, const char*, unsigned long*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2ULONG64(struct soap*, const char*, ULONG64*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2string(struct soap*, const char*, char**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2QName(struct soap*, const char*, char**);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2wchar(struct soap*, const char*, wchar_t**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2dateTime(struct soap*, const char*, time_t*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_s2base64(struct soap*, const unsigned char*, char*, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_s2hex(struct soap*, const unsigned char*, char*, int);
+#endif
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_byte2s(struct soap*, char);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_short2s(struct soap*, short);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_int2s(struct soap*, int);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_long2s(struct soap*, long);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_LONG642s(struct soap*, LONG64);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_float2s(struct soap*, float);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_double2s(struct soap*, double);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedByte2s(struct soap*, unsigned char);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedShort2s(struct soap*, unsigned short);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedInt2s(struct soap*, unsigned int);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedLong2s(struct soap*, unsigned long);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_ULONG642s(struct soap*, ULONG64);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_QName2s(struct soap*, const char*);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_wchar2s(struct soap*, const wchar_t*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_dateTime2s(struct soap*, time_t);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_base642s(struct soap*, const char*, char*, size_t, int*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_hex2s(struct soap*, const char*, char*, size_t, int*);
+#endif
+
+
+SOAP_FMAC1 int* SOAP_FMAC2 soap_inint(struct soap*, const char *tag, int *p, const char *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_inbyte(struct soap*, const char *tag, char *p, const char *, int);
+SOAP_FMAC1 long* SOAP_FMAC2 soap_inlong(struct soap*, const char *tag, long *p, const char *, int);
+SOAP_FMAC1 LONG64* SOAP_FMAC2 soap_inLONG64(struct soap*, const char *tag, LONG64 *p, const char *, int);
+SOAP_FMAC1 short* SOAP_FMAC2 soap_inshort(struct soap*, const char *tag, short *p, const char *, int);
+SOAP_FMAC1 float* SOAP_FMAC2 soap_infloat(struct soap*, const char *tag, float *p, const char *, int);
+SOAP_FMAC1 double* SOAP_FMAC2 soap_indouble(struct soap*, const char *tag, double *p, const char *, int);
+SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_inunsignedByte(struct soap*, const char *tag, unsigned char *p, const char *, int);
+SOAP_FMAC1 unsigned short* SOAP_FMAC2 soap_inunsignedShort(struct soap*, const char *tag, unsigned short *p, const char *, int);
+SOAP_FMAC1 unsigned int* SOAP_FMAC2 soap_inunsignedInt(struct soap*, const char *tag, unsigned int *p, const char *, int);
+SOAP_FMAC1 unsigned long* SOAP_FMAC2 soap_inunsignedLong(struct soap*, const char *tag, unsigned long *p, const char *, int);
+SOAP_FMAC1 ULONG64* SOAP_FMAC2 soap_inULONG64(struct soap*, const char *tag, ULONG64 *p, const char *, int);
+SOAP_FMAC1 char** SOAP_FMAC2 soap_instring(struct soap*, const char *tag, char **p, const char *, int, int, long, long);
+SOAP_FMAC1 char** SOAP_FMAC2 soap_inliteral(struct soap*, const char *tag, char **p);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 time_t* SOAP_FMAC2 soap_indateTime(struct soap*, const char *tag, time_t *p, const char *, int);
+#endif
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwstring(struct soap*, const char *tag, wchar_t **p, const char *, int, long, long);
+SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwliteral(struct soap*, const char *tag, wchar_t **p);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_outbyte(struct soap*, const char *tag, int id, const char *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outshort(struct soap*, const char *tag, int id, const short *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outint(struct soap*, const char *tag, int id, const int *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outlong(struct soap*, const char *tag, int id, const long *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outLONG64(struct soap*, const char *tag, int id, const LONG64 *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outfloat(struct soap*, const char *tag, int id, const float *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outdouble(struct soap*, const char *tag, int id, const double *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedByte(struct soap*, const char *tag, int id, const unsigned char *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedShort(struct soap*, const char *tag, int id, const unsigned short *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedInt(struct soap*, const char *tag, int id, const unsigned int *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedLong(struct soap*, const char *tag, int id, const unsigned long *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outULONG64(struct soap*, const char *tag, int id, const ULONG64 *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outstring(struct soap*, const char *tag, int id, char *const*p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outliteral(struct soap*, const char *tag, char *const*p);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 int SOAP_FMAC2 soap_outdateTime(struct soap*, const char *tag, int id, const time_t *p, const char *, int);
+#endif
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_outwstring(struct soap*, const char *tag, int id, wchar_t *const*p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outwliteral(struct soap*, const char *tag, wchar_t *const*p);
+#endif
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_attachment(struct soap *, const char*, int, const void*, const struct soap_array*, const char*, const char*, const char*, int, const char*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_move(struct soap*, long);
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_tell(struct soap*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_dime_option(struct soap*, unsigned short, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getdimehdr(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getdime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putdimehdr(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putdime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getmimehdr(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getmime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putmimehdr(struct soap*, struct soap_multipart*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putmime(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_dime(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_mime(struct soap*, const char *boundary, const char *start);
+SOAP_FMAC1 void SOAP_FMAC2 soap_clr_dime(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_clr_mime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_dime_attachment(struct soap*, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_mime_attachment(struct soap*, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description);
+SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_register_plugin_arg(struct soap*, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void*);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_lookup_plugin(struct soap*, const char*);
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_attr_value(struct soap *soap, const char *name, int flag);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_attr(struct soap *soap, const char *name, const char *value);
+SOAP_FMAC1 void SOAP_FMAC2 soap_clr_attr(struct soap *soap);
+
+#ifdef WITH_COOKIES
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_encode_cookie(const char*, char*, size_t);
+SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_set_cookie(struct soap*, const char*, const char*, const char*, const char*);
+SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_cookie(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern char* SOAP_FMAC2 soap_cookie_value(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern char* SOAP_FMAC2 soap_env_cookie_value(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern long SOAP_FMAC2 soap_cookie_expire(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_expire(struct soap*, const char*, long, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_session(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_clr_cookie_session(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern void SOAP_FMAC2 soap_clr_cookie(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_getenv_cookies(struct soap*);
+SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_copy_cookies(struct soap*);
+SOAP_FMAC1 extern void SOAP_FMAC2 soap_free_cookies(struct soap*);
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif
+
diff --git a/samples/quote_VC/Quote2.dsp b/samples/quote_VC/Quote2.dsp
new file mode 100644
index 0000000..039fb95
--- /dev/null
+++ b/samples/quote_VC/Quote2.dsp
@@ -0,0 +1,144 @@
+# Microsoft Developer Studio Project File - Name="Quote2" - Package Owner=<4>

+# Microsoft Developer Studio Generated Build File, Format Version 6.00

+# ** DO NOT EDIT **

+

+# TARGTYPE "Win32 (x86) Console Application" 0x0103

+

+CFG=Quote2 - Win32 Debug

+!MESSAGE This is not a valid makefile. To build this project using NMAKE,

+!MESSAGE use the Export Makefile command and run

+!MESSAGE 

+!MESSAGE NMAKE /f "Quote2.mak".

+!MESSAGE 

+!MESSAGE You can specify a configuration when running NMAKE

+!MESSAGE by defining the macro CFG on the command line. For example:

+!MESSAGE 

+!MESSAGE NMAKE /f "Quote2.mak" CFG="Quote2 - Win32 Debug"

+!MESSAGE 

+!MESSAGE Possible choices for configuration are:

+!MESSAGE 

+!MESSAGE "Quote2 - Win32 Release" (based on "Win32 (x86) Console Application")

+!MESSAGE "Quote2 - Win32 Debug" (based on "Win32 (x86) Console Application")

+!MESSAGE 

+

+# Begin Project

+# PROP AllowPerConfigDependencies 0

+# PROP Scc_ProjName ""

+# PROP Scc_LocalPath ""

+CPP=cl.exe

+RSC=rc.exe

+

+!IF  "$(CFG)" == "Quote2 - Win32 Release"

+

+# PROP BASE Use_MFC 0

+# PROP BASE Use_Debug_Libraries 0

+# PROP BASE Output_Dir "Release"

+# PROP BASE Intermediate_Dir "Release"

+# PROP BASE Target_Dir ""

+# PROP Use_MFC 0

+# PROP Use_Debug_Libraries 0

+# PROP Output_Dir "Release"

+# PROP Intermediate_Dir "Release"

+# PROP Target_Dir ""

+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c

+# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c

+# ADD BASE RSC /l 0x409 /d "NDEBUG"

+# ADD RSC /l 0x409 /d "NDEBUG"

+BSC32=bscmake.exe

+# ADD BASE BSC32 /nologo

+# ADD BSC32 /nologo

+LINK32=link.exe

+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386

+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386

+

+!ELSEIF  "$(CFG)" == "Quote2 - Win32 Debug"

+

+# PROP BASE Use_MFC 0

+# PROP BASE Use_Debug_Libraries 1

+# PROP BASE Output_Dir "Debug"

+# PROP BASE Intermediate_Dir "Debug"

+# PROP BASE Target_Dir ""

+# PROP Use_MFC 0

+# PROP Use_Debug_Libraries 1

+# PROP Output_Dir "Debug"

+# PROP Intermediate_Dir "Debug"

+# PROP Ignore_Export_Lib 0

+# PROP Target_Dir ""

+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c

+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c

+# ADD BASE RSC /l 0x409 /d "_DEBUG"

+# ADD RSC /l 0x409 /d "_DEBUG"

+BSC32=bscmake.exe

+# ADD BASE BSC32 /nologo

+# ADD BSC32 /nologo

+LINK32=link.exe

+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept

+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept

+

+!ENDIF 

+

+# Begin Target

+

+# Name "Quote2 - Win32 Release"

+# Name "Quote2 - Win32 Debug"

+# Begin Group "Source Files"

+

+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"

+# Begin Source File

+

+SOURCE=.\quote.cpp

+# End Source File

+# Begin Source File

+

+SOURCE=.\soapC.cpp

+# End Source File

+# Begin Source File

+

+SOURCE=.\soapClient.cpp

+# End Source File

+# Begin Source File

+

+SOURCE=.\stdsoap2.cpp

+# End Source File

+# End Group

+# Begin Group "Header Files"

+

+# PROP Default_Filter "h;hpp;hxx;hm;inl"

+# Begin Source File

+

+SOURCE=.\quote.h

+

+!IF  "$(CFG)" == "Quote2 - Win32 Release"

+

+!ELSEIF  "$(CFG)" == "Quote2 - Win32 Debug"

+

+# Begin Custom Build - gSOAP Web service proxy/skeleton build on $(InputPath)

+InputPath=.\quote.h

+

+"soapStub.h soapH.h soapC.cpp soapClient.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

+	.\soapcpp2.exe "$(InputPath)"

+

+# End Custom Build

+

+!ENDIF 

+

+# End Source File

+# Begin Source File

+

+SOURCE=.\soapH.h

+# End Source File

+# Begin Source File

+

+SOURCE=.\soapStub.h

+# End Source File

+# Begin Source File

+

+SOURCE=.\stdsoap2.h

+# End Source File

+# End Group

+# Begin Group "Resource Files"

+

+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"

+# End Group

+# End Target

+# End Project

diff --git a/samples/quote_VC/Quote2.dsw b/samples/quote_VC/Quote2.dsw
new file mode 100644
index 0000000..c9b0046
--- /dev/null
+++ b/samples/quote_VC/Quote2.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00

+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!

+

+###############################################################################

+

+Project: "Quote2"=".\Quote2.dsp" - Package Owner=<4>

+

+Package=<5>

+{{{

+}}}

+

+Package=<4>

+{{{

+}}}

+

+###############################################################################

+

+Global:

+

+Package=<5>

+{{{

+}}}

+

+Package=<3>

+{{{

+}}}

+

+###############################################################################

+

diff --git a/samples/quote_VC/Quote2.sln b/samples/quote_VC/Quote2.sln
new file mode 100644
index 0000000..8943d9a
--- /dev/null
+++ b/samples/quote_VC/Quote2.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Quote2", "Quote2.vcproj", "{ADEFF409-9FE3-413F-89B5-8204D6A91954}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{ADEFF409-9FE3-413F-89B5-8204D6A91954}.Debug|Win32.ActiveCfg = Debug|Win32
+		{ADEFF409-9FE3-413F-89B5-8204D6A91954}.Debug|Win32.Build.0 = Debug|Win32
+		{ADEFF409-9FE3-413F-89B5-8204D6A91954}.Release|Win32.ActiveCfg = Release|Win32
+		{ADEFF409-9FE3-413F-89B5-8204D6A91954}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/samples/quote_VC/Quote2.vcproj b/samples/quote_VC/Quote2.vcproj
new file mode 100644
index 0000000..ee36674
--- /dev/null
+++ b/samples/quote_VC/Quote2.vcproj
@@ -0,0 +1,324 @@
+<?xml version="1.0" encoding="Windows-1252"?>

+<VisualStudioProject

+	ProjectType="Visual C++"

+	Version="8.00"

+	Name="Quote2"

+	ProjectGUID="{ADEFF409-9FE3-413F-89B5-8204D6A91954}"

+	>

+	<Platforms>

+		<Platform

+			Name="Win32"

+		/>

+	</Platforms>

+	<ToolFiles>

+	</ToolFiles>

+	<Configurations>

+		<Configuration

+			Name="Debug|Win32"

+			OutputDirectory=".\Debug"

+			IntermediateDirectory=".\Debug"

+			ConfigurationType="1"

+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"

+			UseOfMFC="0"

+			ATLMinimizesCRunTimeLibraryUsage="false"

+			CharacterSet="2"

+			>

+			<Tool

+				Name="VCPreBuildEventTool"

+			/>

+			<Tool

+				Name="VCCustomBuildTool"

+			/>

+			<Tool

+				Name="VCXMLDataGeneratorTool"

+			/>

+			<Tool

+				Name="VCWebServiceProxyGeneratorTool"

+			/>

+			<Tool

+				Name="VCMIDLTool"

+				TypeLibraryName=".\Debug/Quote2.tlb"

+				HeaderFileName=""

+			/>

+			<Tool

+				Name="VCCLCompilerTool"

+				 

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;WIN32;_DEBUG;_CONSOLE"

+				 

+				 

+				 

+				PrecompiledHeaderFile=".\Debug/Quote2.pch"

+				AssemblerListingLocation=".\Debug/"

+				ObjectFile=".\Debug/"

+				ProgramDataBaseFileName=".\Debug/"

+				 

+				SuppressStartupBanner="true"

+				 

+			/>

+			<Tool

+				Name="VCManagedResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCResourceCompilerTool"

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;_DEBUG"

+				Culture="1033"

+			/>

+			<Tool

+				Name="VCPreLinkEventTool"

+			/>

+			<Tool

+				Name="VCLinkerTool"

+				AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib"

+				OutputFile=".\Debug/Quote2.exe"

+				 

+				SuppressStartupBanner="true"

+				

+				ProgramDatabaseFile=".\Debug/Quote2.pdb"

+				SubSystem="1"

+				TargetMachine="1"

+			/>

+			<Tool

+				Name="VCALinkTool"

+			/>

+			<Tool

+				Name="VCManifestTool"

+			/>

+			<Tool

+				Name="VCXDCMakeTool"

+			/>

+			<Tool

+				Name="VCBscMakeTool"

+				SuppressStartupBanner="true"

+				OutputFile=".\Debug/Quote2.bsc"

+			/>

+			<Tool

+				Name="VCFxCopTool"

+			/>

+			<Tool

+				Name="VCAppVerifierTool"

+			/>

+			<Tool

+				Name="VCWebDeploymentTool"

+			/>

+			<Tool

+				Name="VCPostBuildEventTool"

+			/>

+		</Configuration>

+		<Configuration

+			Name="Release|Win32"

+			OutputDirectory=".\Release"

+			IntermediateDirectory=".\Release"

+			ConfigurationType="1"

+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"

+			UseOfMFC="0"

+			ATLMinimizesCRunTimeLibraryUsage="false"

+			CharacterSet="2"

+			>

+			<Tool

+				Name="VCPreBuildEventTool"

+			/>

+			<Tool

+				Name="VCCustomBuildTool"

+			/>

+			<Tool

+				Name="VCXMLDataGeneratorTool"

+			/>

+			<Tool

+				Name="VCWebServiceProxyGeneratorTool"

+			/>

+			<Tool

+				Name="VCMIDLTool"

+				TypeLibraryName=".\Release/Quote2.tlb"

+				HeaderFileName=""

+			/>

+			<Tool

+				Name="VCCLCompilerTool"

+				 

+				InlineFunctionExpansion="1"

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;WIN32;NDEBUG;_CONSOLE"

+				StringPooling="true"

+				 

+				 

+				PrecompiledHeaderFile=".\Release/Quote2.pch"

+				AssemblerListingLocation=".\Release/"

+				ObjectFile=".\Release/"

+				ProgramDataBaseFileName=".\Release/"

+				 

+				SuppressStartupBanner="true"

+			/>

+			<Tool

+				Name="VCManagedResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCResourceCompilerTool"

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;NDEBUG"

+				Culture="1033"

+			/>

+			<Tool

+				Name="VCPreLinkEventTool"

+			/>

+			<Tool

+				Name="VCLinkerTool"

+				OutputFile=".\Release/Quote2.exe"

+				 

+				SuppressStartupBanner="true"

+				ProgramDatabaseFile=".\Release/Quote2.pdb"

+				SubSystem="1"

+				TargetMachine="1"

+			/>

+			<Tool

+				Name="VCALinkTool"

+			/>

+			<Tool

+				Name="VCManifestTool"

+			/>

+			<Tool

+				Name="VCXDCMakeTool"

+			/>

+			<Tool

+				Name="VCBscMakeTool"

+				SuppressStartupBanner="true"

+				OutputFile=".\Release/Quote2.bsc"

+			/>

+			<Tool

+				Name="VCFxCopTool"

+			/>

+			<Tool

+				Name="VCAppVerifierTool"

+			/>

+			<Tool

+				Name="VCWebDeploymentTool"

+			/>

+			<Tool

+				Name="VCPostBuildEventTool"

+			/>

+		</Configuration>

+	</Configurations>

+	<References>

+	</References>

+	<Files>

+		<Filter

+			Name="Source Files"

+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"

+			>

+			<File

+				RelativePath="quote.cpp"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+				<FileConfiguration

+					Name="Release|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+			</File>

+			<File

+				RelativePath="soapC.cpp"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+				<FileConfiguration

+					Name="Release|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+			</File>

+			<File

+				RelativePath="soapClient.cpp"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+				<FileConfiguration

+					Name="Release|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+			</File>

+			<File

+				RelativePath="stdsoap2.cpp"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+				<FileConfiguration

+					Name="Release|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+			</File>

+		</Filter>

+		<Filter

+			Name="Header Files"

+			Filter="h;hpp;hxx;hm;inl"

+			>

+			<File

+				RelativePath="quote.h"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCustomBuildTool"

+						Description="gSOAP Web service proxy/skeleton build on $(InputPath)"

+						CommandLine=".\soapcpp2.exe &quot;$(InputPath)&quot;&#x0D;&#x0A;"

+						Outputs="soapStub.h soapH.h soapC.cpp soapClient.cpp"

+					/>

+				</FileConfiguration>

+			</File>

+			<File

+				RelativePath="soapH.h"

+				>

+			</File>

+			<File

+				RelativePath="soapStub.h"

+				>

+			</File>

+			<File

+				RelativePath="stdsoap2.h"

+				>

+			</File>

+		</Filter>

+		<Filter

+			Name="Resource Files"

+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"

+			>

+		</Filter>

+	</Files>

+	<Globals>

+	</Globals>

+</VisualStudioProject>

diff --git a/samples/quote_VC/quote.cpp b/samples/quote_VC/quote.cpp
new file mode 100644
index 0000000..647e72b
--- /dev/null
+++ b/samples/quote_VC/quote.cpp
@@ -0,0 +1,32 @@
+#include "soapH.h"	// include generated proxy and SOAP support
+
+int main(int argc, char **argv)
+{ struct soap soap;	// allocate gSOAP runtime environment
+  char *sym;
+  float q;
+  if (argc <= 1)
+    sym = "IBM";
+  else
+    sym = argv[1];
+  soap_init(&soap);	// must initialize
+  if (soap_call_ns__getQuote(&soap, "http://services.xmethods.net/soap", "", sym, &q) == 0)
+    printf("\nCompany - %s    Quote - %f\n", sym, q);
+  else
+  { soap_print_fault(&soap, stderr);
+    soap_print_fault_location(&soap, stderr);
+  }
+  return 0;
+}
+
+// The namespace mapping table is required and associates namespace prefixes with namespace names:
+struct Namespace namespaces[] =
+{//{"ns-prefix", "ns-name" [, "ns-name-input-pattern"]}
+   {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"}, // MUST be first
+   {"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/"}, // MUST be second
+   {"xsi", "http://www.w3.org/1999/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance"}, // MUST be third
+   {"xsd", "http://www.w3.org/1999/XMLSchema", "http://www.w3.org/*/XMLSchema"},
+   {"ns", "urn:xmethods-delayed-quotes"},	// Method namespace URI
+   {NULL, NULL}
+};
+
+
diff --git a/samples/quote_VC/quote.h b/samples/quote_VC/quote.h
new file mode 100644
index 0000000..69ff37f
--- /dev/null
+++ b/samples/quote_VC/quote.h
@@ -0,0 +1,9 @@
+//gsoap ns service name:	quote
+//gsoap ns service style:	rpc
+//gsoap ns service encoding:	encoded
+//gsoap ns service namespace:	urn:xmethods-delayed-quotes
+//gsoap ns service location:	http://services.xmethods.net/soap
+
+//gsoap ns service method-action: getQuote ""
+
+int ns__getQuote(char *symbol, float *Result);
diff --git a/samples/quote_VC/soapcpp2.exe b/samples/quote_VC/soapcpp2.exe
new file mode 100755
index 0000000..fea95ba
--- /dev/null
+++ b/samples/quote_VC/soapcpp2.exe
Binary files differ
diff --git a/samples/quote_VC/stdsoap2.cpp b/samples/quote_VC/stdsoap2.cpp
new file mode 100644
index 0000000..dbed460
--- /dev/null
+++ b/samples/quote_VC/stdsoap2.cpp
@@ -0,0 +1,13448 @@
+/*
+
+stdsoap2.c[pp] 2.7.6e
+
+gSOAP runtime
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+Contributors:
+
+Wind River Systems Inc., for the following additions under gSOAP public license:
+  - vxWorks compatible	(#define VXWORKS)
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+Installation note:
+
+Win32 build needs winsock.dll (Visual C++ "wsock32.lib")
+To do this in Visual C++ 6.0, go to "Project", "settings", select the "Link"
+tab (the project file needs to be selected in the file view) and add
+"wsock32.lib" to the "Object/library modules" entry
+
+On Mac OS X with gcc (GCC) 3.1 20020420 (prerelease) you MUST compile with
+-fstack_check when using -O2 because gcc 3.1 has a bug that smashes the stack
+when locally allocated data exceeds 64K.
+
+*/
+
+#ifdef AS400
+# pragma convert(819)	/* EBCDIC to ASCII */
+#endif
+
+#include "stdsoap2.h"
+
+#ifdef __cplusplus
+SOAP_SOURCE_STAMP("@(#) stdsoap2.cpp ver 2.7.6e 2006-02-18 12:00:00 GMT")
+extern "C" {
+#else
+SOAP_SOURCE_STAMP("@(#) stdsoap2.c ver 2.7.6e 2006-02-18 12:00:00 GMT")
+#endif
+
+/* 8bit character representing unknown/nonrepresentable character data (e.g. not supported by current locale with multibyte support enabled) */
+#ifndef SOAP_UNKNOWN_CHAR
+#define SOAP_UNKNOWN_CHAR (127)
+#endif
+
+/*      EOF=-1 */
+#define SOAP_LT (soap_wchar)(-2) /* XML character '<' */
+#define SOAP_TT (soap_wchar)(-3) /* XML character '</' */
+#define SOAP_GT (soap_wchar)(-4) /* XML character '>' */
+#define SOAP_QT (soap_wchar)(-5) /* XML character '"' */
+#define SOAP_AP (soap_wchar)(-6) /* XML character ''' */
+
+#define soap_blank(c)		((c) >= 0 && (c) <= 32)
+#define soap_notblank(c)	((c) > 32)
+#define soap_hash_ptr(p)	(((unsigned long)(p) >> 3) & (SOAP_PTRHASH - 1))
+
+#ifdef SOAP_DEBUG
+static void soap_init_logs(struct soap*);
+static void soap_close_logfile(struct soap*, int);
+static void soap_set_logfile(struct soap*, int, const char*);
+static void soap_free_mht(struct soap*);
+static void soap_track_unlink(struct soap*, const void*);
+#endif
+
+#ifndef PALM_2
+static int soap_set_error(struct soap*, const char*, const char*, const char*, const char*, int);
+static int soap_copy_fault(struct soap*, const char*, const char*, const char*, const char*);
+static int soap_getattrval(struct soap*, char*, size_t, soap_wchar);
+#endif
+
+#ifndef PALM_1
+static soap_wchar soap_char(struct soap*);
+static soap_wchar soap_get_pi(struct soap*);
+static int soap_isxdigit(int);
+static void *fplugin(struct soap*, const char*);
+#ifndef WITH_NOIDREF
+static void soap_update_ptrs(struct soap*, char*, char*, char*, char*);
+static int soap_has_copies(struct soap*, const char*, const char*);
+static void soap_init_iht(struct soap*);
+static void soap_free_iht(struct soap*);
+static void soap_init_pht(struct soap*);
+static void soap_free_pht(struct soap*);
+#endif
+#endif
+
+#ifndef WITH_LEAN
+static const char *soap_set_validation_fault(struct soap*, const char*, const char*);
+static int soap_isnumeric(struct soap*, const char*);
+static time_t soap_timegm(struct tm*);
+static struct soap_nlist *soap_lookup_ns(struct soap *soap, const char *tag, size_t n);
+static struct soap_nlist *soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized);
+static void soap_pop_ns(struct soap *soap);
+static void soap_utilize_ns(struct soap *soap, const char *tag, size_t n);
+#endif
+
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart *soap_new_multipart(struct soap*, struct soap_multipart**, struct soap_multipart**, char*, size_t);
+static int soap_putdimefield(struct soap*, const char*, size_t);
+static char *soap_getdimefield(struct soap*, size_t);
+static void soap_select_mime_boundary(struct soap*);
+static int soap_valid_mime_boundary(struct soap*);
+static int soap_match_cid(struct soap*, const char*, const char*);
+static void soap_resolve_attachment(struct soap*, struct soap_multipart*);
+#endif
+#endif
+
+#ifdef WITH_GZIP
+static int soap_getgziphdr(struct soap*);
+#endif
+
+#ifdef WITH_OPENSSL
+static int ssl_init_done = 0;
+static int ssl_auth_init(struct soap*);
+static int ssl_verify_callback(int, X509_STORE_CTX*);
+static int ssl_password(char*, int, int, void *);
+static const char *ssl_error(struct soap*, int);
+/* This callback is included for future references. It should not be deleted
+static DH *ssl_tmp_dh(SSL*, int, int);
+*/
+#endif
+
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char *soap_decode(char*, size_t, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar soap_getchunkchar(struct soap*);
+static const char *http_error(struct soap*, int);
+static int http_post(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
+static int http_get(struct soap*);
+static int http_send_header(struct soap*, const char*);
+static int http_post_header(struct soap*, const char*, const char*);
+static int http_response(struct soap*, int, size_t);
+static int http_parse(struct soap*);
+static int http_parse_header(struct soap*, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int fsend(struct soap*, const char*, size_t);
+static size_t frecv(struct soap*, char*, size_t);
+static int tcp_init(struct soap*);
+static const char *tcp_error(struct soap*);
+#ifndef WITH_IPV6
+static int tcp_gethost(struct soap*, const char *addr, struct in_addr *inaddr);
+#endif
+static int tcp_connect(struct soap*, const char *endpoint, const char *host, int port);
+static int tcp_accept(struct soap*, int, struct sockaddr*, int*);
+static int tcp_disconnect(struct soap*);
+static int tcp_closesocket(struct soap*, SOAP_SOCKET);
+static int tcp_shutdownsocket(struct soap*, SOAP_SOCKET, int);
+static const char *soap_strerror(struct soap*);
+#endif
+#endif
+
+#if defined(PALM) && !defined(PALM_2)
+unsigned short errno;
+#endif
+
+#ifndef PALM_1
+static const char soap_env1[42] = "http://schemas.xmlsoap.org/soap/envelope/";
+static const char soap_enc1[42] = "http://schemas.xmlsoap.org/soap/encoding/";
+static const char soap_env2[40] = "http://www.w3.org/2003/05/soap-envelope";
+static const char soap_enc2[40] = "http://www.w3.org/2003/05/soap-encoding";
+static const char soap_rpc[35] = "http://www.w3.org/2003/05/soap-rpc";
+#endif
+
+#ifndef PALM_1
+const struct soap_double_nan soap_double_nan = {0xFFFFFFFF, 0xFFFFFFFF};
+static const char soap_base64o[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+static const char soap_base64i[81] = "\76XXX\77\64\65\66\67\70\71\72\73\74\75XXXXXXX\00\01\02\03\04\05\06\07\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31XXXXXX\32\33\34\35\36\37\40\41\42\43\44\45\46\47\50\51\52\53\54\55\56\57\60\61\62\63";
+#endif
+
+#ifndef WITH_LEAN
+static const char soap_indent[11] = "\n\t\t\t\t\t\t\t\t\t";
+/* Alternative indentation form for SOAP_XML_INDENT:
+static const char soap_indent[21] = "\n                   ";
+*/
+#endif
+
+static const char soap_padding[4] = "\0\0\0";
+#define SOAP_STR_PADDING (soap_padding)
+#define SOAP_STR_EOS (soap_padding)
+#define SOAP_NON_NULL (soap_padding)
+
+#ifndef WITH_LEAN
+static const struct soap_code_map html_entity_codes[] = /* entities for XHTML parsing */
+{ { 160, "nbsp" },
+  { 161, "iexcl" },
+  { 162, "cent" },
+  { 163, "pound" },
+  { 164, "curren" },
+  { 165, "yen" },
+  { 166, "brvbar" },
+  { 167, "sect" },
+  { 168, "uml" },
+  { 169, "copy" },
+  { 170, "ordf" },
+  { 171, "laquo" },
+  { 172, "not" },
+  { 173, "shy" },
+  { 174, "reg" },
+  { 175, "macr" },
+  { 176, "deg" },
+  { 177, "plusmn" },
+  { 178, "sup2" },
+  { 179, "sup3" },
+  { 180, "acute" },
+  { 181, "micro" },
+  { 182, "para" },
+  { 183, "middot" },
+  { 184, "cedil" },
+  { 185, "sup1" },
+  { 186, "ordm" },
+  { 187, "raquo" },
+  { 188, "frac14" },
+  { 189, "frac12" },
+  { 190, "frac34" },
+  { 191, "iquest" },
+  { 192, "Agrave" },
+  { 193, "Aacute" },
+  { 194, "Acirc" },
+  { 195, "Atilde" },
+  { 196, "Auml" },
+  { 197, "Aring" },
+  { 198, "AElig" },
+  { 199, "Ccedil" },
+  { 200, "Egrave" },
+  { 201, "Eacute" },
+  { 202, "Ecirc" },
+  { 203, "Euml" },
+  { 204, "Igrave" },
+  { 205, "Iacute" },
+  { 206, "Icirc" },
+  { 207, "Iuml" },
+  { 208, "ETH" },
+  { 209, "Ntilde" },
+  { 210, "Ograve" },
+  { 211, "Oacute" },
+  { 212, "Ocirc" },
+  { 213, "Otilde" },
+  { 214, "Ouml" },
+  { 215, "times" },
+  { 216, "Oslash" },
+  { 217, "Ugrave" },
+  { 218, "Uacute" },
+  { 219, "Ucirc" },
+  { 220, "Uuml" },
+  { 221, "Yacute" },
+  { 222, "THORN" },
+  { 223, "szlig" },
+  { 224, "agrave" },
+  { 225, "aacute" },
+  { 226, "acirc" },
+  { 227, "atilde" },
+  { 228, "auml" },
+  { 229, "aring" },
+  { 230, "aelig" },
+  { 231, "ccedil" },
+  { 232, "egrave" },
+  { 233, "eacute" },
+  { 234, "ecirc" },
+  { 235, "euml" },
+  { 236, "igrave" },
+  { 237, "iacute" },
+  { 238, "icirc" },
+  { 239, "iuml" },
+  { 240, "eth" },
+  { 241, "ntilde" },
+  { 242, "ograve" },
+  { 243, "oacute" },
+  { 244, "ocirc" },
+  { 245, "otilde" },
+  { 246, "ouml" },
+  { 247, "divide" },
+  { 248, "oslash" },
+  { 249, "ugrave" },
+  { 250, "uacute" },
+  { 251, "ucirc" },
+  { 252, "uuml" },
+  { 253, "yacute" },
+  { 254, "thorn" },
+  { 255, "yuml" },
+  {   0, NULL }
+};
+#endif
+
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+static const struct soap_code_map h_error_codes[] =
+{
+#ifdef HOST_NOT_FOUND   
+  { HOST_NOT_FOUND, "Host not found" },
+#endif
+#ifdef TRY_AGAIN
+  { TRY_AGAIN, "Try Again" },
+#endif
+#ifdef NO_RECOVERY  
+  { NO_RECOVERY, "No Recovery" },
+#endif
+#ifdef NO_DATA
+  { NO_DATA, "No Data" },
+#endif
+#ifdef NO_ADDRESS
+  { NO_ADDRESS, "No Address" },
+#endif
+  { 0, NULL }
+};
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+static const struct soap_code_map h_http_error_codes[] =
+{ { 201, "Created" },
+  { 202, "Accepted" },
+  { 203, "Non-Authoritative Information" },
+  { 204, "No Content" },
+  { 205, "Reset Content" },
+  { 206, "Partial Content" },
+  { 300, "Multiple Choices" },
+  { 301, "Moved Permanently" },
+  { 302, "Found" },
+  { 303, "See Other" },
+  { 304, "Not Modified" },
+  { 305, "Use Proxy" },
+  { 307, "Temporary Redirect" },
+  { 400, "Bad Request" },
+  { 401, "Unauthorized" },
+  { 402, "Payment Required" },
+  { 403, "Forbidden" },
+  { 404, "Not Found" },
+  { 405, "Method Not Allowed" },
+  { 406, "Not Acceptable" },
+  { 407, "Proxy Authentication Required" },
+  { 408, "Request Time-out" },
+  { 409, "Conflict" },
+  { 410, "Gone" },
+  { 411, "Length Required" },
+  { 412, "Precondition Failed" },
+  { 413, "Request Entity Too Large" },
+  { 414, "Request-URI Too Large" },
+  { 415, "Unsupported Media Type" },
+  { 416, "Requested range not satisfiable" },
+  { 417, "Expectation Failed" },
+  { 500, "Internal Server Error" },
+  { 501, "Not Implemented" },
+  { 502, "Bad Gateway" },
+  { 503, "Service Unavailable" },
+  { 504, "Gateway Time-out" },
+  { 505, "HTTP Version not supported" },
+  {   0, NULL }
+};
+#endif
+#endif
+
+#ifdef WITH_OPENSSL
+static const struct soap_code_map h_ssl_error_codes[] =
+{
+#define _SSL_ERROR(e) { e, #e }
+  _SSL_ERROR(SSL_ERROR_SSL),
+  _SSL_ERROR(SSL_ERROR_ZERO_RETURN),
+  _SSL_ERROR(SSL_ERROR_WANT_READ),
+  _SSL_ERROR(SSL_ERROR_WANT_WRITE),
+  _SSL_ERROR(SSL_ERROR_WANT_CONNECT),
+  _SSL_ERROR(SSL_ERROR_WANT_X509_LOOKUP),
+  _SSL_ERROR(SSL_ERROR_SYSCALL),
+  { 0, NULL }
+};
+#endif
+
+#ifndef WITH_LEANER
+static const struct soap_code_map mime_codes[] =
+{ { SOAP_MIME_7BIT,		"7bit" },
+  { SOAP_MIME_8BIT,		"8bit" },
+  { SOAP_MIME_BINARY,		"binary" },
+  { SOAP_MIME_QUOTED_PRINTABLE, "quoted-printable" },
+  { SOAP_MIME_BASE64,		"base64" },
+  { SOAP_MIME_IETF_TOKEN,	"ietf-token" },
+  { SOAP_MIME_X_TOKEN,		"x-token" },
+  { 0,				NULL }
+};
+#endif
+
+#ifdef WIN32
+static int tcp_done = 0;
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+fsend(struct soap *soap, const char *s, size_t n)
+{ register int nwritten;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  if (soap->os)
+  { soap->os->write(s, n);
+    if (soap->os->good())
+      return SOAP_OK;
+    return SOAP_EOF;
+  }
+#endif
+  while (n)
+  { if (soap_valid_socket(soap->socket))
+    { 
+#ifndef WITH_LEAN
+      if (soap->send_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->send_timeout > 0)
+        { timeout.tv_sec = soap->send_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->send_timeout/1000000;
+          timeout.tv_usec = -soap->send_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { register int r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            return SOAP_EOF;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+          { soap->errnum = soap_socket_errno;
+            return SOAP_EOF;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+        nwritten = SSL_write(soap->ssl, s, n);
+      else if (soap->bio)
+        nwritten = BIO_write(soap->bio, s, n);
+      else
+#endif
+#ifdef WITH_UDP
+      if ((soap->omode & SOAP_IO_UDP))
+      { if (soap->peerlen)
+	  nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+        else
+	  nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	/* retry and back-off algorithm */
+	/* TODO: this is not very clear from specs so verify and limit conditions under which we should loop (e.g. ENOBUFS) */
+	if (nwritten < 0)
+        { struct timeval timeout;
+          fd_set fd;
+	  int udp_repeat;
+	  int udp_delay;
+          if ((soap->connect_flags & SO_BROADCAST))
+	    udp_repeat = 3; /* SOAP-over-UDP MULTICAST_UDP_REPEAT - 1 */
+          else
+	    udp_repeat = 1; /* SOAP-over-UDP UNICAST_UDP_REPEAT - 1 */
+	  udp_delay = (soap_random % 201) + 50; /* UDP_MIN_DELAY .. UDP_MAX_DELAY */
+	  do
+          { timeout.tv_sec = 0;
+            timeout.tv_usec = 1000 * udp_delay; /* ms */
+            FD_ZERO(&fd);
+            FD_SET((SOAP_SOCKET)soap->socket, &fd);
+            select((SOAP_SOCKET)(soap->socket + 1), NULL, NULL, &fd, &timeout);
+	    if (soap->peerlen)
+	      nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+            else
+	      nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	    udp_delay <<= 1;
+	    if (udp_delay > 500) /* UDP_UPPER_DELAY */
+	      udp_delay = 500;
+	  }
+	  while (nwritten < 0 && --udp_repeat > 0);
+	}
+      }
+      else
+#endif
+#if !defined(PALM) && !defined(AS400)
+        nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+#else
+        nwritten = send((SOAP_SOCKET)soap->socket, (void*)s, n, soap->socket_flags);
+#endif
+      if (nwritten <= 0)
+      {
+#ifdef WITH_OPENSSL
+	int err;
+        if (soap->ssl && (err = SSL_get_error(soap->ssl, nwritten)) != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return SOAP_EOF;
+#endif
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EWOULDBLOCK && soap_socket_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_socket_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    else
+    {
+#ifdef WITH_FASTCGI
+      nwritten = fwrite((void*)s, 1, n, stdout);
+      fflush(stdout);
+#else
+#ifdef UNDER_CE
+      nwritten = fwrite(s, 1, n, soap->sendfd);
+#else
+#ifdef VXWORKS
+#ifdef WMW_RPM_IO
+      if (soap->rpmreqid)
+        nwritten = (httpBlockPut(soap->rpmreqid, s, n) == 0) ? n : -1; 
+      else
+#endif
+        nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w"));
+#else
+      nwritten = write((SOAP_SOCKET)soap->sendfd, s, n);
+#endif
+#endif
+#endif
+      if (nwritten <= 0)
+      { if (soap_errno != SOAP_EINTR && soap_errno != SOAP_EWOULDBLOCK && soap_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    n -= nwritten;
+    s += nwritten;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_raw(struct soap *soap, const char *s, size_t n)
+{ if (!n)
+    return SOAP_OK;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { soap->count += n;
+#ifndef WITH_LEANER
+    if (soap->fpreparesend && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+  if (soap->mode & SOAP_IO)
+  { register size_t i = SOAP_BUFLEN - soap->bufidx;
+    while (n >= i)
+    { memcpy(soap->buf + soap->bufidx, s, i);
+      soap->bufidx = SOAP_BUFLEN;
+      if (soap_flush(soap))
+        return soap->error;
+      s += i;
+      n -= i;
+      i = SOAP_BUFLEN;
+    }
+    memcpy(soap->buf + soap->bufidx, s, n);
+    soap->bufidx += n;
+    return SOAP_OK;
+  }
+  return soap_flush_raw(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush(struct soap *soap)
+{ register int n = soap->bufidx;
+  if (n)
+  { soap->bufidx = 0;
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { soap->d_stream.next_in = (Byte*)soap->buf;
+      soap->d_stream.avail_in = (unsigned int)n;
+#ifdef WITH_GZIP
+      soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)n);
+#endif
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating %u bytes\n", soap->d_stream.avail_in));
+        if (deflate(&soap->d_stream, Z_NO_FLUSH) != Z_OK)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+          return soap->error = SOAP_ZLIB_ERROR;
+        }
+        if (!soap->d_stream.avail_out)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN))
+            return soap->error;
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (soap->d_stream.avail_in);
+    }
+    else
+#endif
+      return soap_flush_raw(soap, soap->buf, n);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush_raw(struct soap *soap, const char *s, size_t n)
+{ if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+  { register char *t;
+    if (!(t = (char*)soap_push_block(soap, n)))
+      return soap->error = SOAP_EOM;
+    memcpy(t, s, n);
+#ifndef WITH_LEANER
+    if (soap->fpreparesend)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+  { char t[16];
+    sprintf(t, "\r\n%lX\r\n" + (soap->chunksize ? 0 : 2), (unsigned long)n);
+    DBGMSG(SENT, t, strlen(t));
+    if ((soap->error = soap->fsend(soap, t, strlen(t))))
+      return soap->error;
+    soap->chunksize += n;
+  }
+  DBGMSG(SENT, s, n);
+#endif
+  return soap->error = soap->fsend(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send(struct soap *soap, const char *s)
+{ if (s)
+    return soap_send_raw(soap, s, strlen(s));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send2(struct soap *soap, const char *s1, const char *s2)
+{ if (soap_send(soap, s1))
+    return soap->error;
+  return soap_send(soap, s2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send3(struct soap *soap, const char *s1, const char *s2, const char *s3)
+{ if (soap_send(soap, s1)
+   || soap_send(soap, s2))
+    return soap->error;
+  return soap_send(soap, s3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static size_t
+frecv(struct soap *soap, char *s, size_t n)
+{ register int r;
+  soap->errnum = 0;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  if (soap->is)
+  { if (soap->is->good())
+      return soap->is->read(s, n).gcount();
+    return 0;
+  }
+#endif
+  if (soap_valid_socket(soap->socket))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->recv_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->recv_timeout > 0)
+        { timeout.tv_sec = soap->recv_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->recv_timeout/1000000;
+          timeout.tv_usec = -soap->recv_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+	  { soap->errnum = 0;
+            return 0;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+	  { soap->errnum = soap_socket_errno;
+            return 0;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+      { int err;
+	r = SSL_read(soap->ssl, s, n);
+        if (r > 0)
+          return (size_t)r;
+	err = SSL_get_error(soap->ssl, r);
+	if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return 0;
+      }
+      else if (soap->bio)
+      { r = BIO_read(soap->bio, s, n);
+        if (r > 0)
+          return (size_t)r;
+        return 0;
+      }
+      else
+#endif
+      { 
+#ifdef WITH_UDP
+        if ((soap->omode & SOAP_IO_UDP))
+        { SOAP_SOCKLEN_T k = (SOAP_SOCKLEN_T)sizeof(soap->peer);
+	  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+          r = recvfrom((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, &k);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+	  soap->peerlen = (size_t)k;
+#ifndef WITH_IPV6
+          soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+          soap->port = (int)ntohs(soap->peer.sin_port);
+#endif
+        }
+	else
+#endif
+          r = recv((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+        if (r >= 0)
+          return (size_t)r;
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN && soap_socket_errno != SOAP_EWOULDBLOCK)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#ifndef WITH_LEAN
+      { struct timeval timeout;
+        fd_set fd;
+        timeout.tv_sec = 0;
+        timeout.tv_usec = 10000;
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+#ifdef WITH_OPENSSL
+        if (soap->ssl && SSL_get_error(soap->ssl, r) == SSL_ERROR_WANT_WRITE)
+          r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+        else
+          r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#else
+        r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#endif
+        if (r < 0 && soap_socket_errno != SOAP_EINTR)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#endif
+    }
+  }
+#ifdef WITH_FASTCGI
+  return fread(s, 1, n, stdin);
+#else
+#ifdef UNDER_CE
+  return fread(s, 1, n, soap->recvfd);
+#else
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    r = httpBlockRead(soap->rpmreqid, s, n);
+  else
+#endif
+  r = read((SOAP_SOCKET)soap->recvfd, s, n);
+  if (r >= 0)
+    return (size_t)r;
+  soap->errnum = soap_errno;
+  return 0;
+#endif
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar
+soap_getchunkchar(struct soap *soap)
+{ if (soap->bufidx < soap->buflen)
+    return soap->buf[soap->bufidx++];
+  soap->bufidx = 0;
+  soap->buflen = soap->chunkbuflen = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)soap->buflen, soap->socket));
+  DBGMSG(RECV, soap->buf, soap->buflen);
+  if (soap->buflen)
+    return soap->buf[soap->bufidx++];
+  return EOF;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+soap_isxdigit(int c)
+{ return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f');
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_raw(struct soap *soap)
+{ register size_t ret;
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { if (soap->d_stream.next_out == Z_NULL)
+      return EOF;
+    if (soap->d_stream.avail_in || !soap->d_stream.avail_out)
+    { register int r;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflating\n"));
+      soap->d_stream.next_out = (Byte*)soap->buf;
+      soap->d_stream.avail_out = SOAP_BUFLEN;
+      r = inflate(&soap->d_stream, Z_NO_FLUSH);
+      if (r == Z_OK || r == Z_STREAM_END)
+      { soap->bufidx = 0;
+        soap->buflen = SOAP_BUFLEN - soap->d_stream.avail_out;
+        if (soap->zlib_in == SOAP_ZLIB_GZIP)
+          soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+        if (r == Z_STREAM_END)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+          soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+          soap->d_stream.next_out = Z_NULL;
+        }
+        if (soap->buflen)
+        { soap->count += soap->buflen;
+          return SOAP_OK;
+        }
+      }
+      else if (r != Z_BUF_ERROR)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate error: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        soap->d_stream.next_out = Z_NULL;
+	soap->error = SOAP_ZLIB_ERROR;
+        return EOF;
+      }
+    }
+zlib_again:
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK && !soap->chunksize)
+    { memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+      soap->buflen = soap->z_buflen;
+    }
+  }
+#endif
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) /* read HTTP chunked transfer */
+  { 
+chunk_again:
+    if (soap->chunksize)
+    { soap->buflen = ret = soap->frecv(soap, soap->buf, soap->chunksize > SOAP_BUFLEN ? SOAP_BUFLEN : soap->chunksize);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk: read %u bytes\n", (unsigned int)ret));
+      DBGMSG(RECV, soap->buf, ret);
+      soap->bufidx = 0;
+      soap->chunksize -= ret;
+    }
+    else
+    { register soap_wchar c;
+      char *t, tmp[8];
+      t = tmp;
+      if (!soap->chunkbuflen)
+      { soap->chunkbuflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes (chunked) from socket %d\n", (unsigned int)ret, soap->socket));
+        DBGMSG(RECV, soap->buf, ret);
+        soap->bufidx = 0;
+        if (!ret)
+          return soap->ahead = EOF;
+      }
+      else
+        soap->bufidx = soap->buflen;
+      soap->buflen = soap->chunkbuflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk size (idx=%u len=%u)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen));
+      while (!soap_isxdigit((int)(c = soap_getchunkchar(soap))))
+        if ((int)c == EOF)
+	  return soap->ahead = EOF;
+      do
+        *t++ = (char)c;
+      while (soap_isxdigit((int)(c = soap_getchunkchar(soap))) && t - tmp < 7);
+      while ((int)c != EOF && c != '\n')
+        c = soap_getchunkchar(soap);
+      if ((int)c == EOF)
+        return soap->ahead = EOF;
+      *t = '\0';
+      soap->chunksize = soap_strtoul(tmp, &t, 16);
+      if (!soap->chunksize)
+      { soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of chunked message\n"));
+	while ((int)c != EOF && c != '\n')
+          c = soap_getchunkchar(soap);
+        return soap->ahead = EOF;
+      }
+      soap->buflen = soap->bufidx + soap->chunksize;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving buf len to idx=%u len=%u (%s)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen, tmp));
+      if (soap->buflen > soap->chunkbuflen)
+      { soap->buflen = soap->chunkbuflen;
+        soap->chunksize -= soap->buflen - soap->bufidx;
+        soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Passed end of buffer for chunked HTTP (%u bytes left)\n", (unsigned int)(soap->buflen - soap->bufidx)));
+      }
+      else if (soap->chunkbuflen)
+        soap->chunksize = 0;
+      ret = soap->buflen - soap->bufidx;
+      if (!ret)
+        goto chunk_again;
+    }
+  }
+  else
+#endif
+  { soap->bufidx = 0;
+    soap->buflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)ret, soap->socket));
+    DBGMSG(RECV, soap->buf, ret);
+  }
+#ifndef WITH_LEANER
+  if (soap->fpreparerecv && (soap->error = soap->fpreparerecv(soap, soap->buf, ret)))
+    return soap->error;
+#endif
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { register int r;
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = (unsigned int)ret;
+    soap->d_stream.next_out = (Byte*)soap->buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    r = inflate(&soap->d_stream, Z_NO_FLUSH);
+    if (r == Z_OK || r == Z_STREAM_END)
+    { soap->bufidx = 0;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = ret = SOAP_BUFLEN - soap->d_stream.avail_out;
+      if (soap->zlib_in == SOAP_ZLIB_GZIP)
+        soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %u bytes\n", (unsigned int)ret));
+      if (!ret)
+        goto zlib_again;
+      if (r == Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+        soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+        soap->d_stream.next_out = Z_NULL;
+      }
+    }
+    else
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to inflate: (%d) %s\n", r, soap->d_stream.msg?soap->d_stream.msg:""));
+      soap->d_stream.next_out = Z_NULL;
+      soap->error = SOAP_ZLIB_ERROR;
+      return EOF;
+    }
+  }
+#endif
+  soap->count += ret;
+  return !ret;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap->dime.buflen)
+    { char *s;
+      int i;
+      unsigned char tmp[12];
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME hdr for chunked DIME is in buffer\n"));
+      soap->count += soap->dime.buflen - soap->buflen;
+      soap->buflen = soap->dime.buflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Skip padding (%ld bytes)\n", -(long)soap->dime.size&3));
+      for (i = -(long)soap->dime.size&3; i > 0; i--)
+      { soap->bufidx++;
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME hdr for next chunk\n"));
+      s = (char*)tmp;
+      for (i = 12; i > 0; i--)
+      { *s++ = soap->buf[soap->bufidx++];
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      soap->dime.flags = tmp[0] & 0x7;
+      soap->dime.size = ((size_t)tmp[8] << 24) | ((size_t)tmp[9] << 16) | ((size_t)tmp[10] << 8) | ((size_t)tmp[11]);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME chunk (%u bytes)\n", (unsigned int)soap->dime.size));
+      if (soap->dime.flags & SOAP_DIME_CF)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "More chunking\n"));
+        soap->dime.chunksize = soap->dime.size;
+        if (soap->buflen - soap->bufidx >= soap->dime.size)
+        { soap->dime.buflen = soap->buflen;
+          soap->buflen = soap->bufidx + soap->dime.chunksize;
+        }
+        else
+          soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      }
+      else
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Last chunk\n"));
+        soap->dime.buflen = 0;
+        soap->dime.chunksize = 0;
+      }
+      soap->count = soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%u bytes remaining\n", (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+    if (soap->dime.chunksize)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get next DIME hdr for chunked DIME (%u bytes chunk)\n", (unsigned int)soap->dime.chunksize));
+      if (soap_recv_raw(soap))
+        return EOF;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->count -= soap->buflen - soap->bufidx - soap->dime.chunksize;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%lu bytes remaining, count=%u\n", (unsigned long)(soap->buflen-soap->bufidx), (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+  }
+#endif
+  return soap_recv_raw(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getchar(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+    return c;
+  }
+  return soap_get1(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const struct soap_code_map*
+SOAP_FMAC2
+soap_code(const struct soap_code_map *map, const char *str)
+{ if (str)
+  { while (map->string)
+    { if (!strcmp(str, map->string)) /* case sensitive */
+        return map;
+      map++;
+    }
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_int_code(const struct soap_code_map *map, const char *str, long other)
+{ while (map->string)
+  { if (!soap_tag_cmp(str, map->string)) /* case insensitive */
+      return map->code;
+    map++;
+  }
+  return other;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_str_code(const struct soap_code_map *map, long code)
+{ while (map->code != code && map->string)
+    map++;
+  return map->string;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_char(struct soap *soap)
+{ char tmp[8];
+  register int i;
+  register soap_wchar c;
+  register char *s = tmp;
+  for (i = 0; i < 7; i++)
+  { c = soap_get1(soap);
+    if (c == ';' || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+  }
+  *s = '\0';
+  if (*tmp == '#')
+  { if (tmp[1] == 'x' || tmp[1] == 'X')
+      return soap_strtol(tmp + 2, NULL, 16);
+    return atol(tmp + 1);
+  }
+  if (!strcmp(tmp, "lt"))
+    return '<';
+  if (!strcmp(tmp, "gt"))
+    return '>';
+  if (!strcmp(tmp, "amp"))
+    return '&';
+  if (!strcmp(tmp, "quot"))
+    return '"';
+  if (!strcmp(tmp, "apos"))
+    return '\'';
+#ifndef WITH_LEAN
+  return (soap_wchar)soap_int_code(html_entity_codes, tmp, SOAP_UNKNOWN_CHAR);
+#else
+  return SOAP_UNKNOWN_CHAR; /* use this to represent unknown code */
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get0(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx];
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get1(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx++];
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_get(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+  }
+  else
+    c = soap_get1(soap);
+  for (;;)
+  { if (soap->cdata)
+    { if (c == ']')
+      { c = soap_get1(soap);
+        if (c == ']')
+        { soap->cdata = 0;
+          soap_get1(soap); /* skip > */
+          c = soap_get1(soap);
+        }
+	else
+        { soap_revget1(soap);
+          return ']';
+        }
+      }
+      else
+        return c;
+    }
+    switch (c)
+    { case '<':
+        do c = soap_get1(soap);
+        while (soap_blank(c));
+        if (c == '!' || c == '?' || c == '%')
+        { register int k = 1;
+	  if (c == '!')
+          { c = soap_get1(soap);
+            if (c == '[')
+            { do c = soap_get1(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                break;
+              soap->cdata = 1;
+              c = soap_get1(soap);
+	      continue;
+            }
+            if (c == '-' && (c = soap_get1(soap)) == '-')
+            { do
+              { c = soap_get1(soap);
+                if (c == '-' && (c = soap_get1(soap)) == '-')
+                  break;
+              } while ((int)c != EOF);
+            }
+          }
+	  else if (c == '?')
+            c = soap_get_pi(soap);
+          while ((int)c != EOF)
+          { if (c == '<')
+	      k++;
+	    else if (c == '>')
+	    { if (--k <= 0)
+	        break;
+	    }
+	    c = soap_get1(soap);
+	  }
+	  if ((int)c == EOF)
+	    break;
+          c = soap_get1(soap);
+          continue;
+        }
+        if (c == '/')
+          return SOAP_TT;
+        soap_revget1(soap);
+        return SOAP_LT;
+      case '>':
+        return SOAP_GT;
+      case '"':
+        return SOAP_QT;
+      case '\'':
+        return SOAP_AP;
+      case '&':
+        return soap_char(soap) | 0x80000000;
+    }
+    break;
+  }
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_get_pi(struct soap *soap)
+{ char buf[64];
+  register char *s = buf;
+  register int i = sizeof(buf);
+  register soap_wchar c = soap_getchar(soap);
+  /* This is a quick way to parse XML PI and we could use a callback instead to
+   * enable applications to intercept processing instructions */
+  while ((int)c != EOF && c != '?')
+  { if (--i > 0)
+    { if (soap_blank(c))
+        c = ' ';
+      *s++ = (char)c;
+    }
+    c = soap_getchar(soap);
+  }
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML PI <?%s?>\n", buf));
+  if (!strncmp(buf, "xml ", 4))
+  { s = strstr(buf, " encoding=");
+    if (s && s[10])
+    { if (!soap_tag_cmp(s + 11, "iso-8859-1*")
+       || !soap_tag_cmp(s + 11, "latin1*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to latin1 encoding\n"));
+        soap->mode |= SOAP_ENC_LATIN;
+      }
+      else if (!soap_tag_cmp(s + 11, "utf-8*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to utf-8 encoding\n"));
+        soap->mode &= ~SOAP_ENC_LATIN;
+      }
+    }
+  }
+  if ((int)c != EOF)
+    c = soap_getchar(soap);
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_move(struct soap *soap, long n)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving %ld bytes forward\n", (long)n));
+  for (; n > 0; n--)
+    if ((int)soap_getchar(soap) == EOF)
+      return SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_tell(struct soap *soap)
+{ return soap->count - soap->buflen + soap->bufidx - (soap->ahead != 0);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pututf8(struct soap *soap, register unsigned long c)
+{ char tmp[16];
+  if (c > 0 && c < 0x80)
+  { *tmp = (char)c;
+    return soap_send_raw(soap, tmp, 1);
+  }
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { register char *t = tmp;
+    if (c < 0x0800)
+      *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+    else
+    { if (c < 0x010000)
+        *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+      else
+      { if (c < 0x200000)
+          *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+        else
+        { if (c < 0x04000000)
+            *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+          else
+          { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+            *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+        }     
+        *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+      }
+      *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+    }
+    *t++ = (char)(0x80 | (c & 0x3F));
+    *t = '\0';
+  }
+  else
+#endif
+    sprintf(tmp, "&#%lu;", c);
+  return soap_send(soap, tmp);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getutf8(struct soap *soap)
+{ register soap_wchar c, c1, c2, c3, c4;
+  c = soap->ahead;
+  if (c > 0xFF)
+  { soap->ahead = 0;
+    return c;
+  }
+again:
+  c = soap_get(soap);
+  if (c < 0x80 || (soap->mode & SOAP_ENC_LATIN))
+    return c;
+  c1 = soap_get1(soap);
+  if (c1 < 0x80)
+  { soap_revget1(soap); /* doesn't look like this is UTF8 */
+    return c;
+  }
+  c1 &= 0x3F;
+  if (c < 0xE0)
+    return ((soap_wchar)(c & 0x1F) << 6) | c1;
+  c2 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c == 0xEF && c1 == 0x3B && c2 == 0x3F)	/* ignore UTF-8 BOM */
+    goto again;
+  if (c < 0xF0)
+    return ((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2;
+  c3 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xF8)
+    return ((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3;
+  c4 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xFC)
+    return ((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4;
+  return ((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(soap_get1(soap) & 0x3F);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthex(struct soap *soap, const unsigned char *s, int n)
+{ char d[2];
+  register int i;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2hex(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (i = 0; i < n; i++)
+  { register int m = *s++;
+    d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0'));
+    m &= 0x0F;
+    d[1] = (char)(m + (m > 9 ? '7' : '0'));
+    if (soap_send_raw(soap, d, 2))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_gethex(struct soap *soap, int *n)
+{
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_hex2s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register char *s;
+    register int i, k;
+    if (soap_append_lab(soap, NULL, 0))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = soap->lablen;
+    for (i = 0; i < k; i++)
+    { register char d1, d2;
+      register soap_wchar c;
+      c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = (int)(soap->lablen - k + i);
+        p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	if (p)
+	  memcpy(p, soap->labbuf, soap->lablen - k + i);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, SOAP_BLKLEN);
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register char d1, d2;
+      register soap_wchar c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap_end_block(soap);
+	  soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = soap_size_block(soap, i);
+        p = (unsigned char*)soap_save_block(soap, NULL, 0);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putbase64(struct soap *soap, const unsigned char *s, int n)
+{ register int i;
+  register unsigned long m;
+  char d[4];
+  if (!s)
+    return SOAP_OK;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2base64(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      d[i] = '=';
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_getbase64(struct soap *soap, int *n, int malloc_flag)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_base642s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register int i, k;
+    register char *s;
+    if (soap_append_lab(soap, NULL, 2))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = 3 * (soap->lablen / 3);
+    if (!s)
+      return NULL;
+    for (i = 0; i < k - 2; i += 3)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+            *n = (int)(soap->lablen - k + i);
+          p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	  if (p)
+	    memcpy(p, soap->labbuf, soap->lablen - k + i);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, 3 * SOAP_BLKLEN); /* must be multiple of 3 */
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          i *= 3;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n = (int)soap_size_block(soap, i);
+          p = (unsigned char*)soap_save_block(soap, NULL, 0);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_xop_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ /* Check MTOM xop:Include element (within hex/base64Binary) */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  int body = soap->body; /* should save type too? */
+  if (!soap_peek_element(soap))
+  { if (!soap_element_begin_in(soap, "xop:Include", 0) && *soap->href)
+    { if (soap_dime_forward(soap, ptr, size, id, type, options))
+        return soap->error;
+    }
+    if (soap->body && soap_element_end_in(soap, NULL))
+      return soap->error;
+  }
+  soap->body = body;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_dime_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ struct soap_xlist *xp = (struct soap_xlist*)SOAP_MALLOC(soap, sizeof(struct soap_xlist));
+  *ptr = NULL;
+  *size = 0;
+  *id = soap_strdup(soap, soap->href);
+  *type = NULL;
+  *options = NULL;
+  if (!xp)
+    return soap->error = SOAP_EOM;
+  xp->next = soap->xlist;
+  xp->ptr = ptr;
+  xp->size = size;
+  xp->id = *id;
+  xp->type = type;
+  xp->options = options;
+  soap->xlist = xp;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_strdup(struct soap *soap, const char *s)
+{ char *t = NULL;
+  if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1)))
+    strcpy(t, s);
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_new_block(struct soap *soap)
+{ struct soap_blist *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New block sequence (prev=%p)\n", soap->blist));
+  if (!(p = (struct soap_blist*)SOAP_MALLOC(soap, sizeof(struct soap_blist))))
+    return SOAP_EOM;   
+  p->next = soap->blist; 
+  p->ptr = NULL;
+  p->size = 0;
+  soap->blist = p;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_push_block(struct soap *soap, size_t n)
+{ char *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block of %u bytes (%u bytes total)\n", (unsigned int)n, (unsigned int)soap->blist->size + (unsigned int)n));
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(char*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  *(char**)p = soap->blist->ptr;
+  *(size_t*)(p + sizeof(char*)) = n;
+  soap->blist->ptr = p;
+  soap->blist->size += n;
+  return p + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_block(struct soap *soap)
+{ char *p;
+  if (!soap->blist->ptr)
+    return;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block\n"));
+  p = soap->blist->ptr;
+  soap->blist->size -= *(size_t*)(p + sizeof(char*));
+  soap->blist->ptr = *(char**)p;
+  SOAP_FREE(soap, p);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_update_ptrs(struct soap *soap, char *start, char *end, char *p1, char *p2)
+{ int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+#ifndef WITH_LEANER
+  register struct soap_xlist *xp;
+#endif
+  register void *p, **q;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr && (char*)ip->ptr >= start && (char*)ip->ptr < end)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", ip->id, ip->ptr, (char*)ip->ptr + (p1-p2)));
+        ip->ptr = (char*)ip->ptr + (p1-p2);
+      }
+      for (q = &ip->link; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Link update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (q = &ip->copy; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy chain update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (fp = ip->flist; fp; fp = fp->next)
+      { if ((char*)fp->ptr >= start && (char*)fp->ptr < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy list update id='%s' %p\n", ip->id, fp));
+          fp->ptr = (char*)fp->ptr + (p1-p2);
+        }
+      }
+    }
+  }
+#ifndef WITH_LEANER
+  for (xp = soap->xlist; xp; xp = xp->next)
+  { if (xp->ptr && (char*)xp->ptr >= start && (char*)xp->ptr < end)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", xp->id?xp->id:"", xp->ptr, (char*)xp->ptr + (p1-p2)));
+      xp->ptr = (unsigned char**)((char*)xp->ptr + (p1-p2));
+      xp->size = (int*)((char*)xp->size + (p1-p2));
+      xp->type = (char**)((char*)xp->type + (p1-p2));
+      xp->options = (char**)((char*)xp->options + (p1-p2));
+    }
+  }
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static int
+soap_has_copies(struct soap *soap, register const char *start, register const char *end)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  register const char *p;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { for (p = (const char*)ip->copy; p; p = *(const char**)p)
+        if (p >= start && p < end)
+          return SOAP_ERR;
+      for (fp = ip->flist; fp; fp = fp->next)
+        if ((const char*)fp->ptr >= start && (const char*)fp->ptr < end)
+	  return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_resolve(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  short flag;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr)
+      { register void *p, **q, *r;
+        q = (void**)ip->link;
+        ip->link = NULL;
+        r = ip->ptr;
+        DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing link chain to resolve id='%s'\n", ip->id));
+        while (q)
+        { p = *q;
+          *q = r;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "... link %p -> %p\n", q, r));
+          q = (void**)p;
+        }
+      }
+      else if (*ip->id == '#')
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Missing data for id='%s'\n", ip->id));
+        strcpy(soap->id, ip->id + 1);
+        return soap->error = SOAP_MISSING_ID;
+      }
+    }
+  }
+  do
+  { flag = 0;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution phase\n"));
+    for (i = 0; i < SOAP_IDHASH; i++)
+    { for (ip = soap->iht[i]; ip; ip = ip->next)
+      { if (ip->ptr && !soap_has_copies(soap, (const char*)ip->ptr, (const char*)ip->ptr + ip->size))
+        { if (ip->copy)
+          { register void *p, **q = (void**)ip->copy;
+            DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing copy chain to resolve id='%s'\n", ip->id));
+            ip->copy = NULL;
+            do
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... copy %p -> %p (%u bytes)\n", ip->ptr, q, (unsigned int)ip->size));
+	      p = *q;
+              memcpy(q, ip->ptr, ip->size);
+              q = (void**)p;
+            } while (q);
+	    flag = 1;
+	  }
+          for (fp = ip->flist; fp; fp = ip->flist)
+          { register unsigned int k = fp->level;
+	    register void *p = ip->ptr;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data type=%d location=%p level=%u,%u id='%s'\n", ip->type, p, ip->level, fp->level, ip->id));
+	    while (ip->level < k)
+            { register void **q = (void**)soap_malloc(soap, sizeof(void*));  
+	      if (!q)
+	        return soap->error;
+	      *q = p;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level, new location=%p holds=%p...\n", q, *q));
+              p = (void*)q;
+              k--;
+            }
+	    if (fp->fcopy)
+	      fp->fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    else
+	      soap_fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    ip->flist = fp->next;
+	    SOAP_FREE(soap, fp);
+	    flag = 1;
+	  }
+        }
+      }
+    }
+  } while (flag);
+#ifdef SOAP_DEBUG
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->copy || ip->flist)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution error: forwarded data for id='%s' could not be propagated, please report this problem to the developers\n", ip->id));
+      }
+    }
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution done\n"));
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_size_block(struct soap *soap, size_t n)
+{ if (soap->blist->ptr)
+  { soap->blist->size -= *(size_t*)(soap->blist->ptr + sizeof(char*)) - n;
+    *(size_t*)(soap->blist->ptr + sizeof(char*)) = n;
+  }
+  return soap->blist->size;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_first_block(struct soap *soap)
+{ char *p, *q, *r;
+  p = soap->blist->ptr;
+  if (!p)
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "First block\n"));
+  r = NULL;
+  do
+  { q = *(char**)p;
+    *(char**)p = r;
+    r = p;
+    p = q;
+  } while (p);
+  soap->blist->ptr = r;
+  return r + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_next_block(struct soap *soap)
+{ char *p;
+  p = soap->blist->ptr;
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n"));
+    soap->blist->ptr = *(char**)p;
+    SOAP_FREE(soap, p);
+    if (soap->blist->ptr)
+      return soap->blist->ptr + sizeof(char*) + sizeof(size_t);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_block_size(struct soap *soap)
+{ return *(size_t*)(soap->blist->ptr + sizeof(char*));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end_block(struct soap *soap)
+{ struct soap_blist *bp;
+  char *p, *q;
+  bp = soap->blist;
+  if (bp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of block sequence, free all remaining blocks\n"));
+    for (p = bp->ptr; p; p = q)
+    { q = *(char**)p;
+      SOAP_FREE(soap, p);
+    }
+    soap->blist = bp->next;
+    SOAP_FREE(soap, bp);
+  }
+  DBGLOG(TEST, if (soap->blist) SOAP_MESSAGE(fdebug, "Restore previous block sequence\n"));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_save_block(struct soap *soap, char *p, int flag)
+{ register size_t n;
+  register char *q, *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Save all blocks in contiguous memory space of %u bytes (%p->%p)\n", (unsigned int)soap->blist->size, soap->blist->ptr, p));
+  if (soap->blist->size)
+  { if (!p)
+      p = (char*)soap_malloc(soap, soap->blist->size);
+    if (p)
+    { for (s = p, q = soap_first_block(soap); q; q = soap_next_block(soap))
+      { n = soap_block_size(soap);
+#ifndef WITH_NOIDREF
+        if (flag)
+	  soap_update_ptrs(soap, q, q + n, s, q);
+#endif
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy %u bytes from %p to %p\n", (unsigned int)n, q, s));
+        memcpy(s, q, n);
+        s += n;
+      }
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  soap_end_block(soap);
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsize(struct soap *soap, const char *type, int size)
+{ return soap_putsizes(soap, type, &size, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizes(struct soap *soap, const char *type, const int *size, int dim)
+{ return soap_putsizesoffsets(soap, type, size, NULL, dim);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim)
+{ int i;
+  if (!type)
+    return NULL;
+  if (soap->version == 2)
+  { sprintf(soap->type, "%s[%d", type, size[0]);
+    for (i = 1; i < dim; i++)
+      sprintf(soap->type + strlen(soap->type), " %d", size[i]);
+  }
+  else
+  { if (offset)
+    { sprintf(soap->type, "%s[%d", type, size[0] + offset[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i] + offset[i]);
+    }
+    else
+    { sprintf(soap->type, "%s[%d", type, size[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i]);
+    }
+    strcat(soap->type, "]");
+  }
+  return soap->type;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffset(struct soap *soap, int offset)
+{ return soap_putoffsets(soap, &offset, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffsets(struct soap *soap, const int *offset, int dim)
+{ register int i;
+  sprintf(soap->arrayOffset, "[%d", offset[0]);
+  for (i = 1; i < dim; i++)
+    sprintf(soap->arrayOffset + strlen(soap->arrayOffset), ",%d", offset[i]);
+  strcat(soap->arrayOffset, "]");
+  return soap->arrayOffset;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_size(const int *size, int dim)
+{ register int i, n = size[0];
+  for (i = 1; i < dim; i++)
+    n *= size[i];
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getoffsets(const char *attr, const int *size, int *offset, int dim)
+{ register int i, j = 0;
+  if (offset)
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += offset[i] = (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  else
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  return j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsize(const char *attr1, const char *attr2, int *j)
+{ register int n, k;
+  char *s;
+  *j = 0;
+  if (!*attr1)
+    return -1;
+  if (*attr1 == '[')
+    attr1++;
+  n = 1;
+  for (;;)
+  { k = (int)soap_strtol(attr1, &s, 10);
+    n *= k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE || s == attr1)
+      return -1;
+    attr1 = strchr(s, ',');
+    if (!attr1)
+      attr1 = strchr(s, ' ');
+    if (attr2 && *attr2)
+    { attr2++;
+      *j *= k;
+      k = (int)soap_strtol(attr2, &s, 10);
+      *j += k;
+      if (k < 0)
+        return -1;
+      attr2 = s;
+    }
+    if (!attr1)
+      break;
+    attr1++;
+  }
+  return n - *j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsizes(const char *attr, int *size, int dim)
+{ register int i, k, n;
+  if (!*attr)
+    return -1;
+  i = strlen(attr);
+  n = 1;
+  do
+  { for (i = i-1; i >= 0; i--)
+      if (attr[i] == '[' || attr[i] == ',' || attr[i] == ' ')
+        break;
+    k = (int)atol(attr + i + 1);
+    n *= size[--dim] = k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE)
+      return -1;
+  } while (i >= 0 && attr[i] != '[');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getposition(const char *attr, int *pos)
+{ register int i, n;
+  if (!*attr)
+    return -1;
+  n = 0;
+  i = 1;
+  do
+  { pos[n++] = (int)atol(attr + i);
+    while (attr[i] && attr[i] != ',' && attr[i] != ']')
+      i++;
+    if (attr[i] == ',')
+      i++;
+  } while (n < SOAP_MAXDIMS && attr[i] && attr[i] != ']');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_push_namespace(struct soap *soap, const char *id, const char *ns)
+{ register struct soap_nlist *np;
+  register struct Namespace *p;
+  register short i = -1;
+  register size_t n, k;
+  n = strlen(id);
+  k = strlen(ns) + 1;
+  p = soap->local_namespaces;
+  if (p)
+  { for (i = 0; p->id; p++, i++)
+    { if (p->ns && !strcmp(ns, p->ns))
+      { if (p->out)
+        { SOAP_FREE(soap, p->out);
+          p->out = NULL;
+        }
+        break;
+      }
+      if (p->out)
+      { if (!strcmp(ns, p->out))
+          break;
+      }
+      else if (p->in)
+      { if (!soap_tag_cmp(ns, p->in))
+        { if ((p->out = (char*)SOAP_MALLOC(soap, k)))
+            strcpy(p->out, ns);
+          break;
+        }
+      }
+    }
+    if (!p || !p->id)
+      i = -1;
+  }
+  if (i >= 0)
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k);
+  if (!np)
+    return soap->error = SOAP_EOM;
+  np->next = soap->nlist;
+  soap->nlist = np;
+  np->level = soap->level;
+  np->index = i;
+  strcpy(np->id, id);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns));
+  if (i < 0)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push NOT OK: no match found for '%s' in namespace mapping table (added to stack anyway)\n", ns));
+  }
+  else
+  { np->ns = NULL;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push OK ('%s' matches '%s' in namespace table)\n", id, p->id));
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_namespace(struct soap *soap)
+{ register struct soap_nlist *np;
+  while (soap->nlist && soap->nlist->level >= soap->level)
+  { np = soap->nlist->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Popped namespace binding (level=%u) '%s'\n", soap->level, soap->nlist->id));
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_namespace(struct soap *soap, const char *id1, const char *id2, int n1, int n2) 
+{ register struct soap_nlist *np = soap->nlist;
+  while (np && (strncmp(np->id, id1, n1) || np->id[n1]))
+    np = np->next;
+  if (np)
+  { if (np->index < 0
+     || (soap->local_namespaces[np->index].id
+      && (strncmp(soap->local_namespaces[np->index].id, id2, n2)
+       || soap->local_namespaces[np->index].id[n2])))
+      return SOAP_NAMESPACE;
+    return SOAP_OK;
+  }
+  if (n1 == 3 && n1 == n2 && !strcmp(id1, "xml") && !strcmp(id1, id2))
+    return SOAP_OK;
+  return SOAP_SYNTAX_ERROR; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_current_namespace(struct soap *soap, const char *tag)
+{ register struct soap_nlist *np;
+  register const char *s;
+  np = soap->nlist;
+  if (!(s = strchr(tag, ':')))
+  { while (np && *np->id) /* find default namespace, if present */
+      np = np->next;
+  }
+  else
+  { while (np && (strncmp(np->id, tag, s - tag) || np->id[s - tag]))
+      np = np->next;
+    if (!np)
+      soap->error = SOAP_NAMESPACE;
+  }
+  if (np)
+  { if (np->index >= 0)
+      return soap->namespaces[np->index].ns;
+    if (np->ns)
+      return soap_strdup(soap, np->ns);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_tag_cmp(const char *s, const char *t)
+{ for (;;)
+  { register int c1 = *s;
+    register int c2 = *t;
+    if (!c1 || c1 == '"')
+      break;
+    if (c2 != '-')
+    { if (c1 != c2)
+      { if (c1 >= 'A' && c1 <= 'Z')
+          c1 += 'a' - 'A';
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+      }
+      if (c1 != c2)
+      { if (c2 != '*')
+          return 1;
+	c2 = *++t;
+        if (!c2)
+	  return 0;
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+        for (;;)
+        { c1 = *s;
+	  if (!c1 || c1 == '"')
+	    break;
+	  if (c1 >= 'A' && c1 <= 'Z')
+            c1 += 'a' - 'A';
+          if (c1 == c2 && !soap_tag_cmp(s + 1, t + 1))
+            return 0;
+	  s++;
+        }
+        break;
+      }
+    }
+    s++;
+    t++;
+  }
+  if (*t == '*' && !t[1])
+    return 0;
+  return *t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_tag(struct soap *soap, const char *tag1, const char *tag2)
+{ register const char *s, *t;
+  if (!tag1 || !tag2 || !*tag2)
+    return SOAP_OK;
+  s = strchr(tag1, ':');
+  t = strchr(tag2, ':');
+  if (t)
+  { if (s)
+    { if (t[1] && SOAP_STRCMP(s + 1, t + 1))
+        return SOAP_TAG_MISMATCH;
+      if (t != tag2 && soap_match_namespace(soap, tag1, tag2, s - tag1, t - tag2))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+        return SOAP_TAG_MISMATCH;
+      }
+    } 
+    else if (SOAP_STRCMP(tag1, t + 1))
+      return SOAP_TAG_MISMATCH;
+    else if (t != tag2 && soap_match_namespace(soap, tag1, tag2, 0, t - tag2))
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+      return SOAP_TAG_MISMATCH;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags and (default) namespaces match: '%s' '%s'\n", tag1, tag2));
+    return SOAP_OK;
+  }
+  if (s)
+  { if (SOAP_STRCMP(s + 1, tag2))
+      return SOAP_TAG_MISMATCH;
+  }
+  else if (SOAP_STRCMP(tag1, tag2))
+    return SOAP_TAG_MISMATCH;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags match: '%s' '%s'\n", tag1, tag2));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_array(struct soap *soap, const char *type)
+{ if (*soap->arrayType)
+    if (soap_match_tag(soap, soap->arrayType, type)
+     && soap_match_tag(soap, soap->arrayType, "xsd:anyType")
+     && soap_match_tag(soap, soap->arrayType, "xsd:ur-type")
+    )
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array type mismatch: '%s' '%s'\n", soap->arrayType, type));
+      return SOAP_TAG_MISMATCH;
+    }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************\
+ *
+ *	SSL
+ *
+\******************************************************************************/
+
+#ifdef WITH_OPENSSL
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_rand()
+{ unsigned char buf[4];
+  if (!ssl_init_done)
+    soap_ssl_init();
+  RAND_pseudo_bytes(buf, 4);
+  return *(int*)buf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *dhfile, const char *randfile, const char *sid)
+{ int err;
+  soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  if (dhfile)
+  { soap->dhfile = dhfile;
+    soap->rsa = 0;
+  }
+  else
+  { soap->dhfile = NULL;
+    soap->rsa = 1;
+  }
+  soap->randfile = randfile;
+  soap->require_client_auth = (flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION);
+  if (!(err = soap->fsslauth(soap)))
+  { if (sid)
+      SSL_CTX_set_session_id_context(soap->ctx, (unsigned char*)sid, strlen(sid));
+  }
+  return err; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_client_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *randfile)
+{ soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  soap->dhfile = NULL;
+  soap->rsa = 0;
+  soap->randfile = randfile;
+  soap->require_server_auth = (flags & SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION);
+  return soap->fsslauth(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_ssl_init()
+{ /* Note: for MT systems, the main program MUST call soap_ssl_init() before any threads are started */
+  if (!ssl_init_done)
+  { ssl_init_done = 1;
+    SSL_library_init();
+#ifndef WITH_LEAN
+    SSL_load_error_strings();
+#endif
+    if (!RAND_load_file("/dev/urandom", 1024))
+    { char buf[1024];
+      RAND_seed(buf, sizeof(buf));
+      while (!RAND_status())
+      { int r = rand();
+        RAND_seed(&r, sizeof(int));
+      }
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static const char *
+ssl_error(struct soap *soap, int ret)
+{ int err = SSL_get_error(soap->ssl, ret);
+  const char *msg = soap_str_code(h_ssl_error_codes, err);
+  if (msg)
+    strcpy(soap->msgbuf, msg);
+  else
+    return ERR_error_string(err, soap->msgbuf);
+  if (ERR_peek_error())
+  { unsigned long r;
+    strcat(soap->msgbuf, "\n");
+    while ((r = ERR_get_error()))
+      ERR_error_string_n(r, soap->msgbuf + strlen(soap->msgbuf), sizeof(soap->msgbuf) - strlen(soap->msgbuf));
+  } 
+  else
+  { switch (ret)
+    { case 0:
+        strcpy(soap->msgbuf, "EOF was observed that violates the protocol. The client probably provided invalid authentication information.");
+        break;
+      case -1:
+        sprintf(soap->msgbuf, "Error observed by underlying BIO: %s", strerror(errno));  
+        break;
+    }
+  }
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_password(char *buf, int num, int rwflag, void *userdata)
+{ if (num < (int)strlen((char*)userdata) + 1)
+    return 0;
+  return strlen(strcpy(buf, (char*)userdata));
+}
+#endif
+
+/******************************************************************************/
+/* This callback is included for future references. It should not be deleted
+#ifndef PALM_2
+static DH *
+ssl_tmp_dh(SSL *ssl, int is_export, int keylength)
+{ static DH *dh512 = NULL;
+  static DH *dh1024 = NULL;
+  DH *dh;
+  switch (keylength)
+  { case 512:
+      if (!dh512)
+      { BIO *bio = BIO_new_file("dh512.pem", "r");
+        if (bio)
+        { dh512 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+          return dh512;
+        }
+      }
+      else
+        return dh512;
+    default:
+      if (!dh1024)
+      { BIO *bio = BIO_new_file("dh1024.pem", "r");
+        if (bio)
+        { dh1024 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+        }
+      }
+      dh = dh1024;
+  }
+  return dh;
+}
+#endif
+*/
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_auth_init(struct soap *soap)
+{ if (!ssl_init_done)
+    soap_ssl_init();
+  if (!soap->ctx)
+  { if (!(soap->ctx = SSL_CTX_new(SSLv23_method())))
+      return soap_set_receiver_error(soap, "SSL error", "Can't setup context", SOAP_SSL_ERROR);
+  }
+  if (soap->randfile)
+  { if (!RAND_load_file(soap->randfile, -1))
+      return soap_set_receiver_error(soap, "SSL error", "Can't load randomness", SOAP_SSL_ERROR);
+  }
+  if (soap->cafile || soap->capath)
+  { if (!SSL_CTX_load_verify_locations(soap->ctx, soap->cafile, soap->capath))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read CA file and directory", SOAP_SSL_ERROR);
+    if (soap->cafile && soap->require_client_auth)
+      SSL_CTX_set_client_CA_list(soap->ctx, SSL_load_client_CA_file(soap->cafile));
+  }
+  if (!SSL_CTX_set_default_verify_paths(soap->ctx))
+    return soap_set_receiver_error(soap, "SSL error", "Can't read default CA file and/or directory", SOAP_SSL_ERROR);
+/* See below */
+  if (soap->keyfile)
+  { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read certificate key file", SOAP_SSL_ERROR);
+    if (soap->password)
+    { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+      SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+    }
+    if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+  }
+/* Suggested alternative approach to check cafile first before the key file:
+  if (soap->password)
+  { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+    SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+  }
+  if (!soap->cafile || !SSL_CTX_use_certificate_chain_file(soap->ctx, soap->cafile))
+  { if (soap->keyfile)
+    { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read certificate or key file", SOAP_SSL_ERROR);
+      if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+    }
+  }
+*/
+  if (soap->rsa)
+  { RSA *rsa = RSA_generate_key(1024, RSA_F4, NULL, NULL);
+    if (!SSL_CTX_set_tmp_rsa(soap->ctx, rsa))
+    { if (rsa)
+        RSA_free(rsa);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set RSA key", SOAP_SSL_ERROR);
+    }
+    RSA_free(rsa);
+  }
+  else if (soap->dhfile)
+  { DH *dh = 0;
+    BIO *bio;
+    bio = BIO_new_file(soap->dhfile, "r");
+    if (!bio)
+      return soap_set_receiver_error(soap, "SSL error", "Can't read DH file", SOAP_SSL_ERROR);
+    dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+    BIO_free(bio);
+    if (SSL_CTX_set_tmp_dh(soap->ctx, dh) < 0)
+    { if (dh)
+        DH_free(dh);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set DH parameters", SOAP_SSL_ERROR);
+    }
+    DH_free(dh);
+  }
+  SSL_CTX_set_options(soap->ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2);
+  SSL_CTX_set_verify(soap->ctx, soap->require_client_auth ? (SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT) : soap->require_server_auth ? SSL_VERIFY_PEER : SSL_VERIFY_NONE, soap->fsslverify);
+#if (OPENSSL_VERSION_NUMBER < 0x00905100L)
+  SSL_CTX_set_verify_depth(soap->ctx, 1); 
+#else
+  SSL_CTX_set_verify_depth(soap->ctx, 9); 
+#endif  
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_verify_callback(int ok, X509_STORE_CTX *store)
+{
+#ifdef SOAP_DEBUG
+  if (!ok) 
+  { char data[256];
+    X509 *cert = X509_STORE_CTX_get_current_cert(store);
+    fprintf(stderr, "SSL verify error or warning with certificate at depth %d: %s\n", X509_STORE_CTX_get_error_depth(store), X509_verify_cert_error_string(X509_STORE_CTX_get_error(store)));
+    X509_NAME_oneline(X509_get_issuer_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate issuer %s\n", data);
+    X509_NAME_oneline(X509_get_subject_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate subject %s\n", data);
+  }
+#endif
+  /* Note: return 1 to continue, but unsafe progress will be terminated by SSL */
+  return ok;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_accept(struct soap *soap)
+{ BIO *bio;
+  int i, r;
+  if (!soap_valid_socket(soap->socket))
+    return soap_set_receiver_error(soap, "SSL error", "No socket in soap_ssl_accept()", SOAP_SSL_ERROR);
+  if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    return SOAP_INVALID_SOCKET;
+  if (!soap->ssl)
+  { soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+      return soap_set_receiver_error(soap, "SSL error", "SSL_new() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+  }
+  else
+    SSL_clear(soap->ssl);
+  soap->imode |= SOAP_ENC_SSL;
+  soap->omode |= SOAP_ENC_SSL;
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&nonblocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)|O_NONBLOCK);
+#endif
+  bio = BIO_new_socket((SOAP_SOCKET)soap->socket, BIO_NOCLOSE);
+  SSL_set_bio(soap->ssl, bio, bio);
+  i = 100; /* 100 * 0.1 ms retries */
+  while ((r = SSL_accept(soap->ssl)) <= 0)
+  { int err = SSL_get_error(soap->ssl, r);
+    if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE)
+    { struct timeval timeout;
+      fd_set fd;
+      if (i-- <= 0)
+        break;
+      timeout.tv_sec = 0;
+      timeout.tv_usec = 100000;
+      FD_ZERO(&fd);
+      FD_SET((SOAP_SOCKET)soap->socket, &fd);
+      r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+      if (r < 0 && soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        return SOAP_EOF;
+      }
+    }
+    else
+    { soap->errnum = err;
+      break;
+    }
+  }
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&blocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+  if (r <= 0)
+  { soap_set_receiver_error(soap, ssl_error(soap, r), "SSL_accept() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+    soap_closesock(soap);
+    return SOAP_SSL_ERROR;
+  }
+  if (soap->require_client_auth)
+  { X509 *peer;
+    int err;
+    if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    peer = SSL_get_peer_certificate(soap->ssl);
+    if (!peer)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    X509_free(peer);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#endif /* WITH_OPENSSL */
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_init(struct soap *soap)
+{ soap->errmode = 1;
+#ifdef WIN32
+  if (tcp_done)
+    return 0;
+  else
+  { WSADATA w;
+    if (WSAStartup(MAKEWORD(1, 1), &w))
+      return -1;
+    tcp_done = 1;
+  }
+#endif
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_done(struct soap *soap)
+{ 
+#ifdef SOAP_DEBUG
+  int i;
+#endif
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  while (soap->clist)
+  { struct soap_clist *p = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = p;
+  }
+  soap->keep_alive = 0; /* to force close the socket */
+  soap_closesock(soap);
+#ifdef WITH_COOKIES
+  soap_free_cookies(soap);
+#endif
+  while (soap->plugins)
+  { register struct soap_plugin *p = soap->plugins->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Removing plugin '%s'\n", soap->plugins->id));
+    if (soap->plugins->fcopy || soap->state == SOAP_INIT)
+      soap->plugins->fdelete(soap, soap->plugins);
+    SOAP_FREE(soap, soap->plugins);
+    soap->plugins = p;
+  }
+  soap->fplugin = fplugin;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+#ifdef WITH_OPENSSL
+  if (soap->session)
+  { SSL_SESSION_free(soap->session);
+    soap->session = NULL;
+  }
+#endif
+  if (soap->state == SOAP_INIT)
+  { if (soap_valid_socket(soap->master))
+    { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+      soap->master = SOAP_INVALID_SOCKET;
+    }
+#ifdef WITH_OPENSSL
+    if (soap->ctx)
+    { SSL_CTX_free(soap->ctx);
+      soap->ctx = NULL;
+    }
+#endif
+  }
+#ifdef SOAP_DEBUG
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free logfiles\n"));
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { if (soap->logfile[i])
+    { SOAP_FREE(soap, (void*)soap->logfile[i]);
+      soap->logfile[i] = NULL;
+    }
+    soap_close_logfile(soap, i);
+  }
+  soap_free_mht(soap);
+  soap->state = 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_cleanup(struct soap *soap)
+{ soap_done(soap);
+#ifdef WIN32
+  if (!tcp_done)
+    return;
+  tcp_done = 0;
+  WSACleanup();
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+tcp_error(struct soap *soap)
+{ register const char *msg = NULL;
+  switch (soap->errmode)
+  { case 0:
+      msg = soap_strerror(soap);
+      break;
+    case 1:
+      msg = "WSAStartup failed";
+      break;
+    case 2:
+    {
+#ifndef WITH_LEAN
+      msg = soap_str_code(h_error_codes, soap->errnum);
+      if (!msg)
+#endif
+      { sprintf(soap->msgbuf, "TCP/UDP IP error %d", soap->errnum);
+        msg = soap->msgbuf;
+      }
+    }
+  }
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static const char*
+http_error(struct soap *soap, int status)
+{ register const char *msg = SOAP_STR_EOS;
+#ifndef WITH_LEAN
+  msg = soap_str_code(h_http_error_codes, status);
+  if (!msg)
+    msg = SOAP_STR_EOS;
+#endif
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_IPV6
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr)
+{ soap_int32 iadd = -1;
+  struct hostent hostent, *host = &hostent;
+#ifdef VXWORKS
+  int hostint;
+  /* inet_addr(), and hostGetByName() expect "char *"; addr is a "const char *". */
+  iadd = inet_addr((char*)addr);
+#else
+#if defined(_AIXVERSION_431) || defined(TRU64)
+  struct hostent_data ht_data;
+#endif
+#ifdef AS400
+  iadd = inet_addr((void*)addr);
+#else
+  iadd = inet_addr(addr);
+#endif
+#endif
+  if (iadd != -1)
+  { memcpy(inaddr, &iadd, sizeof(iadd));
+    return SOAP_OK;
+  }
+#if defined(__GLIBC__)
+  if (gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &host, &soap->errnum) < 0)
+    host = NULL;
+#elif defined(_AIXVERSION_431) || defined(TRU64)
+  memset((void*)&ht_data, 0, sizeof(ht_data));
+  if (gethostbyname_r(addr, &hostent, &ht_data) < 0)
+  { host = NULL;
+    soap->errnum = h_errno;
+  }
+#elif defined(HAVE_GETHOSTBYNAME_R)
+  host = gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &soap->errnum);
+#elif defined(VXWORKS)
+  /* If the DNS resolver library resolvLib has been configured in the vxWorks
+   * image, a query for the host IP address is sent to the DNS server, if the
+   * name was not found in the local host table. */
+  hostint = hostGetByName((char*)addr);
+  if (hostint == ERROR)
+  { host = NULL;
+    soap->errnum = soap_errno; 
+  }
+#else
+#ifdef AS400
+  if (!(host = gethostbyname((void*)addr)))
+    soap->errnum = h_errno;
+#else
+  if (!(host = gethostbyname(addr)))
+    soap->errnum = h_errno;
+#endif
+#endif
+  if (!host)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Host name not found\n"));
+    return SOAP_ERR;
+  }
+#ifdef VXWORKS
+  inaddr->s_addr = hostint;
+#else
+  memcpy(inaddr, host->h_addr, host->h_length);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_connect(struct soap *soap, const char *endpoint, const char *host, int port)
+{
+#ifdef WITH_IPV6
+  struct addrinfo hints, *res, *ressave;
+  int err;
+#endif
+  register int fd;
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->socket))
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+  soap->socket = SOAP_INVALID_SOCKET;
+  if (tcp_init(soap))
+  { soap->errnum = 0;
+    soap_set_sender_error(soap, tcp_error(soap), "TCP init failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->errmode = 0;
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+    err = getaddrinfo(soap->proxy_host, soap_int2s(soap, soap->proxy_port), &hints, &res);
+  else
+    err = getaddrinfo(host, soap_int2s(soap, port), &hints, &res);
+  if (err)
+  { soap_set_sender_error(soap, gai_strerror(err), "getaddrinfo failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  ressave = res;
+again:
+  fd = (int)socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+  soap->errmode = 0;
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    fd = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    fd = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  if (fd < 0)
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "socket failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_flags & SO_LINGER)
+  { struct linger linger;
+    memset((void*)&linger, 0, sizeof(linger));
+    linger.l_onoff = 1;
+    linger.l_linger = 0;
+    if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+    { soap->errnum = soap_socket_errno;
+      soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  if ((soap->connect_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, soap->connect_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (soap->keep_alive && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)fd, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Opening socket %d to host='%s' port=%d\n", fd, host, port));
+#ifndef WITH_IPV6
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+  { if (soap->fresolve(soap, soap->proxy_host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get proxy host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)soap->proxy_port);
+  }
+  else
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)port);
+  }
+  soap->errmode = 0;
+  if ((soap->omode & SOAP_IO_UDP))
+    return fd;
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking)); /* modified to use fd */
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+  else
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  for (;;)
+  { 
+#ifdef WITH_IPV6
+    if (connect((SOAP_SOCKET)fd, res->ai_addr, res->ai_addrlen))
+#else
+    if (connect((SOAP_SOCKET)fd, (struct sockaddr*)&soap->peer, sizeof(soap->peer)))
+#endif
+    { 
+#ifndef WITH_LEAN
+      if (soap->connect_timeout && (soap_socket_errno == SOAP_EINPROGRESS || soap_socket_errno == SOAP_EWOULDBLOCK))
+      { struct timeval timeout;
+        SOAP_SOCKLEN_T k;
+        fd_set fds;
+        if (soap->connect_timeout > 0)
+        { timeout.tv_sec = soap->connect_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->connect_timeout/1000000;
+          timeout.tv_usec = -soap->connect_timeout%1000000;
+        }
+        FD_ZERO(&fds);
+        FD_SET((SOAP_SOCKET)fd, &fds);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(fd + 1), NULL, &fds, NULL, &timeout);
+          if (r > 0)
+	    break;
+          if (!r)
+          { soap->errnum = 0;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+            soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+            soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+	k = (SOAP_SOCKLEN_T)sizeof(soap->errnum);
+        if (!getsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_ERROR, (char*)&soap->errnum, &k) && !soap->errnum)	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+          break;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap->errnum = soap_socket_errno;
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      else
+#endif
+#ifdef WITH_IPV6
+      if (res->ai_next)
+      { res = res->ai_next;
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        goto again;
+      }
+      else
+#endif
+      if (soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }  
+    else
+      break;
+  }
+#ifdef WITH_IPV6
+  soap->peerlen = 0; /* IPv6: already connected so use send() */
+  freeaddrinfo(ressave);
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  soap->socket = fd;
+  soap->imode &= ~SOAP_ENC_SSL;
+  soap->omode &= ~SOAP_ENC_SSL;
+  if (!strncmp(endpoint, "https:", 6))
+  {
+#ifdef WITH_OPENSSL
+    BIO *bio;
+    int r;
+    if (soap->proxy_host)
+    { short v;
+      unsigned int k = soap->omode; /* make sure we only parse HTTP */
+      size_t n = soap->count; /* save the content length */
+      char *userid, *passwd;
+      soap->omode &= ~SOAP_ENC; /* mask IO and ENC */
+      soap->omode |= SOAP_IO_BUFFER;
+      soap_begin_send(soap);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connecting to proxy server\n"));
+      sprintf(soap->tmpbuf, "CONNECT %s:%d HTTP/%s", host, port, soap->http_version);
+      if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+#ifndef WITH_LEAN
+      if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+      { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+        strcpy(soap->tmpbuf, "Basic ");
+        soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+        if ((soap->error = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+        { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return soap->error;
+        }
+      }
+#endif
+      if ((soap->error = soap->fposthdr(soap, NULL, NULL))
+       || soap_flush(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->omode = k;
+      k = soap->imode;
+      soap->imode &= ~SOAP_ENC; /* mask IO and ENC */
+      v = soap->version; /* preserve */
+      userid = soap->userid; /* preserve */
+      passwd = soap->passwd; /* preserve */
+      if (soap_begin_recv(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->userid = userid; /* restore */
+      soap->passwd = passwd; /* restore */
+      soap->version = v; /* restore */
+      soap->imode = k; /* restore */
+      soap->count = n; /* restore */
+      soap_begin_send(soap);
+    }
+    if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    { soap_set_sender_error(soap, "SSL error", "SSL authentication failed in tcp_connect(): check password, key file, and ca file.", SOAP_SSL_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+    { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      soap->error = SOAP_SSL_ERROR;
+      return SOAP_INVALID_SOCKET;
+    }
+    if (soap->session)
+    { if (!strcmp(soap->session_host, host) && soap->session_port == port)
+        SSL_set_session(soap->ssl, soap->session);
+      SSL_SESSION_free(soap->session);
+      soap->session = NULL;
+    }
+    soap->imode |= SOAP_ENC_SSL;
+    soap->omode |= SOAP_ENC_SSL;
+    bio = BIO_new_socket((SOAP_SOCKET)fd, BIO_NOCLOSE);
+    SSL_set_bio(soap->ssl, bio, bio);
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#if defined(WIN32)
+    { u_long nonblocking = 1;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+    }
+#elif defined(VXWORKS)
+    { u_long nonblocking = 1;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+#endif
+    for (;;)
+    { if ((r = SSL_connect(soap->ssl)) <= 0)
+      { int err = SSL_get_error(soap->ssl, r);
+        if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+        { soap_set_sender_error(soap, ssl_error(soap, r), "SSL connect failed in tcp_connect()", SOAP_SSL_ERROR);
+          soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (soap->connect_timeout)
+        { struct timeval timeout;
+          fd_set fds;
+          if (soap->connect_timeout > 0)
+          { timeout.tv_sec = soap->connect_timeout;
+            timeout.tv_usec = 0;
+          }
+          else
+          { timeout.tv_sec = -soap->connect_timeout/1000000;
+            timeout.tv_usec = -soap->connect_timeout%1000000;
+          }
+          FD_ZERO(&fds);
+          FD_SET((SOAP_SOCKET)fd, &fds);
+          for (;;)
+          { int r = select((SOAP_SOCKET)(fd + 1), &fds, NULL, &fds, &timeout);
+            if (r > 0)
+	      break;
+            if (!r)
+            { soap->errnum = 0;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+              soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+              soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+              return SOAP_INVALID_SOCKET;
+            }
+          }
+	  continue;
+        }
+      }
+      break;
+    }
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#ifdef WIN32
+    { u_long blocking = 0;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+    }
+#elif defined(VXWORKS)
+    { u_long blocking = 0;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+    if (soap->require_server_auth)
+    { X509 *peer;
+      int err;
+      if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+      { soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      peer = SSL_get_peer_certificate(soap->ssl);
+      if (!peer)
+      { soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      X509_NAME_get_text_by_NID(X509_get_subject_name(peer), NID_commonName, soap->msgbuf, sizeof(soap->msgbuf));
+      X509_free(peer);
+      if (soap_tag_cmp(soap->msgbuf, host))
+      { soap_set_sender_error(soap, "SSL error", "SSL certificate host name mismatch in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+#else
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    soap->error = SOAP_SSL_ERROR;
+    return SOAP_INVALID_SOCKET;
+#endif
+  }
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_bind(struct soap *soap, const char *host, int port, int backlog)
+{
+#ifdef WITH_IPV6
+  struct addrinfo *addrinfo = NULL;
+  struct addrinfo hints;
+  struct addrinfo res;
+  int err;
+#endif
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->master))
+  { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+    soap->master = SOAP_INVALID_SOCKET;
+  }
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 1;
+  if (tcp_init(soap))
+  { soap_set_receiver_error(soap, tcp_error(soap), "TCP init failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  hints.ai_flags = AI_PASSIVE;
+  soap->errmode = 2;
+  err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo);
+  if (addrinfo)
+  { res = *addrinfo;
+    soap->peer = *((struct sockaddr_storage*)addrinfo->ai_addr);
+    soap->peerlen = addrinfo->ai_addrlen;
+    res.ai_addr = (struct sockaddr*)&soap->peer;
+    res.ai_addrlen = soap->peerlen;
+    freeaddrinfo(addrinfo);
+  }
+  if (err)
+  { soap_set_receiver_error(soap, gai_strerror(err), "getaddrinfo failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->master = socket(res.ai_family, res.ai_socktype, res.ai_protocol);
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->master = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    soap->master = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  soap->errmode = 0;
+  if (!soap_valid_socket(soap->master))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "socket failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->socket = soap->master;
+#endif
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)soap->master, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(soap->master, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->bind_flags && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, soap->bind_flags, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->master, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+#ifdef WITH_IPV6
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, res.ai_addr, res.ai_addrlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+#else
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (host)
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_receiver_error(soap, tcp_error(soap), "get host by name failed in soap_bind()", SOAP_TCP_ERROR);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  else
+    soap->peer.sin_addr.s_addr = htonl(INADDR_ANY);
+  soap->peer.sin_port = htons((short)port);
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, (struct sockaddr*)&soap->peer, soap->peerlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+  if (!(soap->omode & SOAP_IO_UDP) && listen((SOAP_SOCKET)soap->master, backlog))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "listen failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+  return soap->master;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_poll(struct soap *soap)
+{ 
+#ifndef WITH_LEAN
+  struct timeval timeout;
+  fd_set rfd, sfd, xfd;
+  int r;
+  timeout.tv_sec = 0;
+  timeout.tv_usec = 0;
+  FD_ZERO(&rfd);
+  FD_ZERO(&sfd);
+  FD_ZERO(&xfd);
+  if (soap_valid_socket(soap->socket))
+  { FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &xfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, &xfd, &timeout);
+    if (r > 0 && FD_ISSET((SOAP_SOCKET)soap->socket, &xfd))
+      r = -1;
+  }
+  else if (soap_valid_socket(soap->master))
+  { FD_SET((SOAP_SOCKET)soap->master, &sfd);
+    r = select((SOAP_SOCKET)(soap->master + 1), NULL, &sfd, NULL, &timeout);
+  }
+  else
+    return SOAP_OK;
+  if (r > 0)
+  {
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+    {
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || SSL_peek(soap->ssl, soap->tmpbuf, 1) > 0))
+        return SOAP_OK;
+    }
+    else
+#endif
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) > 0))
+        return SOAP_OK;
+  }
+  else if (r < 0)
+  { soap->errnum = soap_socket_errno;
+    if ((soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) && soap_socket_errno != SOAP_EINTR)
+    { soap_set_receiver_error(soap, tcp_error(soap), "select failed in soap_poll()", SOAP_TCP_ERROR);
+      return soap->error = SOAP_TCP_ERROR;
+    }
+  }
+  else
+    soap->errnum = 0;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Polling: other end down on socket=%d select=%d\n", soap->socket, r));
+  return SOAP_EOF;
+#else
+  return SOAP_OK;
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_accept(struct soap *soap, int s, struct sockaddr *a, int *n)
+{ int fd;
+  fd = (int)accept((SOAP_SOCKET)s, a, (SOAP_SOCKLEN_T*)n);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, FD_CLOEXEC);
+#endif
+#endif
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_accept(struct soap *soap)
+{ int n = (int)sizeof(soap->peer);
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  soap->error = SOAP_OK;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    return soap->socket = soap->master;
+#endif
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 0;
+  soap->keep_alive = 0;
+  if (soap_valid_socket(soap->master))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->accept_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->accept_timeout > 0)
+        { timeout.tv_sec = soap->accept_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->accept_timeout/1000000;
+          timeout.tv_usec = -soap->accept_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->master, &fd);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(soap->master + 1), &fd, &fd, NULL, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            soap_set_receiver_error(soap, "Timeout", "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            soap_closesock(soap);
+            soap_set_sender_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+#if defined(WIN32)
+	{ u_long nonblocking = 1;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &nonblocking);
+        }
+#elif defined(VXWORKS)
+        { u_long nonblocking = 1;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&nonblocking));
+        }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)|O_NONBLOCK);
+#endif
+      }
+      else
+#if defined(WIN32)
+      { u_long blocking = 0;
+        ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+      }
+#elif defined(VXWORKS)
+      { u_long blocking = 0;
+        ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+      }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+      soap->socket = soap->faccept(soap, soap->master, (struct sockaddr*)&soap->peer, &n);
+      soap->peerlen = (size_t)n;
+      if (soap_valid_socket(soap->socket))
+      {
+#ifdef WITH_IPV6
+/* Use soap->host to store the numeric form of the remote host */
+        getnameinfo((struct sockaddr*)&soap->peer, n, soap->host, sizeof(soap->host), NULL, 0, NI_NUMERICHOST | NI_NUMERICSERV); 
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d from %s\n", soap->socket, soap->host));
+        soap->ip = 0; /* info stored in soap->peer and soap->host */
+        soap->port = 0; /* info stored in soap->peer and soap->host */
+#else
+        soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+        soap->port = (int)ntohs(soap->peer.sin_port); /* does not return port number on some systems */
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d at port %d from IP %d.%d.%d.%d\n", soap->socket, soap->port, (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF));
+#endif
+#ifndef WITH_LEAN
+	if (soap->accept_flags & SO_LINGER)
+        { struct linger linger;
+          memset((void*)&linger, 0, sizeof(linger));
+          linger.l_onoff = 1;
+          linger.l_linger = 0;
+	  if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+          { soap->errnum = soap_socket_errno;
+	    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in soap_accept()", SOAP_TCP_ERROR);
+	    soap_closesock(soap);
+            return SOAP_INVALID_SOCKET;
+	  }
+        }
+        if ((soap->accept_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, soap->accept_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#ifdef TCP_NODELAY
+        if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->socket, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#endif
+#endif
+        if (soap->accept_timeout)
+        {
+#if defined(WIN32)
+          u_long blocking = 0;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+          ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+#elif defined(VXWORKS)
+          u_long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+          ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)(&blocking));
+#elif defined(PALM)
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL,0)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL,0)&~O_NONBLOCK);
+#elif defined(SYMBIAN)
+          long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, 0/*FIONBIO*/, &blocking);
+#else
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+	}
+        soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+        return soap->socket;
+      }
+      if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept failed from %s\n", soap->host));
+        soap->errnum = soap_socket_errno;
+        soap_set_receiver_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+	soap_closesock(soap);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+  }
+  else
+  { soap->errnum = 0;
+    soap_set_receiver_error(soap, tcp_error(soap), "no master socket in soap_accept()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_disconnect(struct soap *soap)
+{
+#ifdef WITH_OPENSSL
+  if (soap->ssl)
+  { int r, s = 0;
+    if (soap->session)
+      SSL_SESSION_free(soap->session);
+    if (*soap->host)
+    { soap->session = SSL_get1_session(soap->ssl);
+      if (soap->session)
+      { strcpy(soap->session_host, soap->host);
+        soap->session_port = soap->port;
+      }
+    }
+    r = SSL_shutdown(soap->ssl);
+    if (r != 1)
+    { s = ERR_get_error();
+      if (s)
+      { if (soap_valid_socket(soap->socket))
+        { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1);
+          soap->socket = SOAP_INVALID_SOCKET;
+        }
+        r = SSL_shutdown(soap->ssl);
+      }
+    }
+    DBGLOG(TEST, if (s) SOAP_MESSAGE(fdebug, "Shutdown failed: %d\n", SSL_get_error(soap->ssl, r)));
+    SSL_free(soap->ssl);
+    soap->ssl = NULL;
+    if (s)
+      return SOAP_SSL_ERROR;
+    ERR_remove_state(0);
+  }
+#endif
+  if (soap_valid_socket(soap->socket) && !(soap->omode & SOAP_IO_UDP))
+  { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 2);
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+    soap->socket = SOAP_INVALID_SOCKET;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_closesocket(struct soap *soap, SOAP_SOCKET fd)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Close socket %d\n", (int)fd));
+  return closesocket(fd);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_shutdownsocket(struct soap *soap, SOAP_SOCKET fd, int how)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Shutdown socket %d how=%d\n", (int)fd, how));
+  return shutdown(fd, how);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_closesock(struct soap *soap)
+{ register int status = soap->error;
+  if (status == SOAP_EOF || status == SOAP_TCP_ERROR || status == SOAP_SSL_ERROR || !soap->keep_alive)
+  { if (soap->fclose && (soap->error = soap->fclose(soap)))
+      return soap->error;
+    soap->keep_alive = 0;
+  }
+#ifdef WITH_ZLIB
+  if (soap->zlib_state == SOAP_ZLIB_DEFLATE)
+    deflateEnd(&soap->d_stream);
+  else if (soap->zlib_state == SOAP_ZLIB_INFLATE)
+    inflateEnd(&soap->d_stream);
+  soap->zlib_state = SOAP_ZLIB_NONE;
+#endif
+  return soap->error = status;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_hash(register const char *s)
+{ register size_t h = 0;
+  while (*s)
+    h = 65599*h + *s++;
+  return h % SOAP_IDHASH;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_pht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing pointer hashtable\n"));
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new1(soap_mode mode)
+{ return soap_new2(mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new()
+{ return soap_new2(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new2(soap_mode imode, soap_mode omode)
+{ struct soap *soap = (struct soap*)malloc(sizeof(struct soap));
+  if (soap)
+    soap_init2(soap, imode, omode);
+  return soap;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_del(struct soap *soap)
+{ free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_pht(struct soap *soap)
+{ register struct soap_pblk *pb, *next;
+  register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free pointer hashtable\n"));
+  for (pb = soap->pblk; pb; pb = next)
+  { next = pb->next;
+    SOAP_FREE(soap, pb);
+  }
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type)
+{ register int i;
+  struct soap_plist *pp;
+  if (soap->version != 1)
+    soap->encoding = 1;
+  if (a)
+    i = soap_array_pointer_lookup(soap, p, a, n, type, &pp);
+  else
+    i = soap_pointer_lookup(soap, p, type, &pp);
+  if (i)
+  { if (soap_is_embedded(soap, pp)
+     || soap_is_single(soap, pp))
+      return 0;
+    soap_set_embedded(soap, pp);
+  }
+  return i;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_lookup(struct soap *soap, const void *p, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (p)
+  { for (pp = soap->pht[soap_hash_ptr(p)]; pp; pp = pp->next)
+    { if (pp->ptr == p && pp->type == type)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d id=%d\n", p, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d: not found\n", p, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_enter(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register int h;
+  register struct soap_plist *pp;
+  if (!soap->pblk || soap->pidx >= SOAP_PTRBLK)
+  { register struct soap_pblk *pb = (struct soap_pblk*)SOAP_MALLOC(soap, sizeof(struct soap_pblk));
+    if (!pb)
+    { soap->error = SOAP_EOM;
+      return 0;
+    }
+    pb->next = soap->pblk;
+    soap->pblk = pb;
+    soap->pidx = 0;
+  }
+  *ppp = pp = &soap->pblk->plist[soap->pidx++];
+  if (a)
+    h = soap_hash_ptr(a->__ptr);
+  else
+    h = soap_hash_ptr(p);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pointer enter location=%p array=%p size=%d dim=%d type=%d id=%d\n", p, a?a->__ptr:NULL, a?a->__size:0, n, type, soap->idnum+1));
+  pp->next = soap->pht[h];
+  pp->type = type;
+  pp->mark1 = 0;
+  pp->mark2 = 0;
+  pp->ptr = p;
+  pp->array = a;
+  soap->pht[h] = pp;
+  pp->id = ++soap->idnum;
+  return pp->id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_pointer_lookup(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (!p || !a->__ptr)
+    return 0;
+  for (pp = soap->pht[soap_hash_ptr(a->__ptr)]; pp; pp = pp->next)
+  { if (pp->type == type && pp->array && pp->array->__ptr == a->__ptr)
+    { register int i;
+      for (i = 0; i < n; i++)
+        if (((const int*)&pp->array->__size)[i] != ((const int*)&a->__size)[i])
+	  break;
+      if (i == n)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d id=%d\n", a->__ptr, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d: not found\n", a->__ptr, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_count(struct soap *soap)
+{ soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) || (soap->omode & SOAP_ENC_DIME))
+    soap->mode = soap->omode | SOAP_IO_LENGTH | SOAP_ENC_DIME;
+  else
+#endif
+  { soap->mode = soap->omode;
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE
+     || (((soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_ENC_XML))
+#ifndef WITH_LEANER
+      && !soap->fpreparesend
+#endif
+      ))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    else
+      soap->mode |= SOAP_IO_LENGTH;
+  }
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (!(soap->mode & SOAP_ENC_DIME))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+    soap->mode |= SOAP_ENC_MIME;
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+  soap->dime.list = soap->dime.last;	/* keep track of last DIME attachment */
+#endif
+  soap->count = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->part = SOAP_BEGIN;
+  soap->idnum = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin count phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+#ifndef WITH_LEANER
+  soap->dime.count = 0; /* count # of attachments */
+  soap->dime.size = 0; /* accumulate total size of attachments */
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+    return soap->error = soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_count(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->fpreparefinal)
+    return soap->error = soap->fpreparefinal(soap);
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of count phase\n"));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_send(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+  soap->mode = soap->omode | (soap->mode & (SOAP_IO_LENGTH | SOAP_ENC_DIME));
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+#ifdef WITH_UDP
+  if ((soap->mode & SOAP_IO_UDP))
+  { soap->mode |= SOAP_ENC_XML;
+    if (soap->count > SOAP_BUFLEN)
+      return soap->error = SOAP_UDP_ERROR;
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_FLUSH && soap_valid_socket(soap->socket))
+  { if (soap->count || (soap->mode & SOAP_IO_LENGTH) || (soap->mode & SOAP_ENC_XML))
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+  soap->mode &= ~SOAP_IO_LENGTH;
+  if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap_new_block(soap);
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+  { soap->mode |= SOAP_ENC_MIME;
+    soap->mode &= ~SOAP_ENC_DIME;
+  }
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket)) /* Set win32 stdout or soap->sendfd to BINARY, e.g. to support DIME */
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->sendfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->sendfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#endif
+  if (soap->mode & SOAP_IO)
+  { soap->bufidx = 0;
+    soap->buflen = 0;
+  }
+  soap->chunksize = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+#ifdef WITH_ZLIB
+  soap->z_ratio_out = 1.0;
+  if ((soap->mode & SOAP_ENC_ZLIB) && soap->zlib_state != SOAP_ZLIB_DEFLATE)
+  {
+#ifdef WITH_GZIP
+    memcpy(soap->z_buf, "\37\213\10\0\0\0\0\0\0\377", 10);
+    soap->d_stream.next_out = (Byte*)soap->z_buf + 10;
+    soap->d_stream.avail_out = SOAP_BUFLEN - 10;
+    soap->z_crc = crc32(0L, NULL, 0);
+    if (deflateInit2(&soap->d_stream, soap->z_level, Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY) != Z_OK)
+#else
+    soap->d_stream.next_out = (Byte*)soap->z_buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    if (deflateInit(&soap->d_stream, soap->z_level) != Z_OK)
+#endif
+      return soap->error = SOAP_ZLIB_ERROR;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflate initialized\n"));
+    soap->zlib_state = SOAP_ZLIB_DEFLATE;
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin send phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+  soap->part = SOAP_BEGIN;
+#ifndef WITH_LEANER
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_embedded(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { pp->mark1 = 1;
+    pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded %p type=%d mark set to 1\n", p, t));
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_reference(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (!p || (soap->mode & SOAP_XML_TREE))
+    return 1;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (soap_pointer_enter(soap, p, NULL, 0, t, &pp))
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  else
+    return 1;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reference %p type=%d (%d %d)\n", p, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_reference(struct soap *soap, const void *p, const struct soap_array *a, int n, int t)
+{ register int i;
+  struct soap_plist *pp;
+  if (!p || !a->__ptr)
+    return 1;
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (i)
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (!soap_pointer_enter(soap, p, a, n, t, &pp))
+    return 1;
+  else
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array reference %p ptr=%p dim=%d type=%d (%d %d)\n", p, a->__ptr, n, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embedded_id(struct soap *soap, int id, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap->mode & SOAP_XML_TREE)
+    return id;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id %p type=%d id=%d\n", p, t, id));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (id < 0)
+    { id = soap_pointer_lookup(soap, p, t, &pp);
+      if (id)
+      { if (soap->mode & SOAP_IO_LENGTH)
+          pp->mark1 = 2;
+        else
+          pp->mark2 = 2;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id multiref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+      }
+      return -1;
+    }
+    return id;
+  }
+  if (id < 0)
+    id = soap_pointer_lookup(soap, p, t, &pp);
+  else if (id && !soap_pointer_lookup(soap, p, t, &pp))
+    return 0;
+  if (id && pp)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      pp->mark1 = 1;
+    else
+      pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id embedded ref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+  }
+  return id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Is embedded? %d %d\n", (int)pp->mark1, (int)pp->mark2));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      return pp->mark1 != 0;
+    return pp->mark2 != 0;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 1;
+  return pp->mark2 == 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_single(struct soap *soap, struct soap_plist *pp)
+{ if (soap->part == SOAP_IN_HEADER)
+    return 1;
+  if (!pp)
+    return 0;
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 0;
+  return pp->mark2 == 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return;
+  if (soap->mode & SOAP_IO_LENGTH)
+    pp->mark1 = 1;
+  else
+    pp->mark2 = 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attachment(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, const char *aid, const char *atype, const char *aoptions, int n, const char *type, int t) 
+{ struct soap_plist *pp;
+  int i;
+  if (!p || !a->__ptr || (!aid && !atype))
+    return soap_element_id(soap, tag, id, p, a, n, type, t);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Attachment tag='%s' id='%s' (%d) type='%s'\n", tag, aid?aid:"", id, atype?atype:""));
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (!i)
+  { i = soap_pointer_enter(soap, p, a, n, t, &pp);
+    if (!i)
+    { soap->error = SOAP_EOM;
+      return -1;
+    }
+  }
+  if (id <= 0)
+    id = i;
+  if (!aid)
+  { sprintf(soap->tmpbuf, soap->dime_id_format, id);
+    aid = soap_strdup(soap, soap->tmpbuf);
+  }
+  /* Add MTOM xop:Include element when necessary */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  if ((soap->mode & SOAP_ENC_MTOM) && strcmp(tag, "xop:Include"))
+  { if (soap_element_begin_out(soap, tag, 0, type)
+     || soap_element_href(soap, "xop:Include", 0, "href", aid)
+     || soap_element_end_out(soap, tag))
+      return soap->error;
+  }
+  else if (soap_element_href(soap, tag, 0, "href", aid))
+    return soap->error;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { if (pp->mark1 != 3)
+    { struct soap_multipart *content;
+      if (soap->mode & SOAP_ENC_MTOM)
+        content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, (char*)a->__ptr, a->__size);
+      else
+        content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, (char*)a->__ptr, a->__size);
+      if (!content)
+      { soap->error = SOAP_EOM;
+        return -1;
+      }
+      if (!strncmp(aid, "cid:", 4)) /* RFC 2111 */
+      { if (soap->mode & SOAP_ENC_MTOM)
+        { char *s = (char*)soap_malloc(soap, strlen(aid) - 1);
+	  if (s)
+	  { *s = '<';
+	    strcpy(s + 1, aid + 4);
+	    strcat(s, ">");
+	    content->id = s;
+          }
+        }
+        else
+          content->id = aid + 4;
+      }
+      else
+        content->id = aid;
+      content->type = atype;
+      content->options = aoptions;
+      content->encoding = SOAP_MIME_BINARY;
+      pp->mark1 = 3;
+    }
+  }
+  else
+    pp->mark2 = 3;
+  return -1;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_iht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+    soap->iht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_iht(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip, *p;
+  register struct soap_flist *fp, *fq;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = p)
+    { for (fp = ip->flist; fp; fp = fq)
+      { fq = fp->next;
+        SOAP_FREE(soap, fp);
+      }
+      p = ip->next;
+      SOAP_FREE(soap, ip);
+    }
+    soap->iht[i] = NULL;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_lookup(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  for (ip = soap->iht[soap_hash(id)]; ip; ip = ip->next)
+    if (!strcmp(ip->id, id))
+      return ip;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_enter(struct soap *soap, const char *id)
+{ register size_t h;
+  register struct soap_ilist *ip;
+  ip = (struct soap_ilist*)SOAP_MALLOC(soap, sizeof(struct soap_ilist) + strlen(id));
+  if (ip)
+  { h = soap_hash(id);
+    strcpy(ip->id, id);
+    ip->next = soap->iht[h];
+    soap->iht[h] = ip;
+    return ip;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_malloc(struct soap *soap, size_t n)
+{ register char *p;
+  if (!n)
+    return (void*)SOAP_NON_NULL;
+  if (!soap)
+    return SOAP_MALLOC(soap, n);
+  n += (-(long)n) & (sizeof(void*)-1); /* align at 4-, 8- or 16-byte boundary */
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(void*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  /* keep chain of alloced cells for later destruction */
+  soap->alloced = 1;
+  *(void**)(p + n) = soap->alist;
+  *(size_t*)(p + n + sizeof(void*)) = n;
+  soap->alist = p + n;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_mht(struct soap *soap)
+{ register int i;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->mht[i] = NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_free_mht(struct soap *soap)
+{ register int i;
+  register struct soap_mlist *mp, *mq;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+  { for (mp = soap->mht[i]; mp; mp = mq)
+    { mq = mp->next;
+      if (mp->live)
+        fprintf(stderr, "%s(%d): malloc() = %p not freed (memory leak or forgot to call soap_end()?)\n", mp->file, mp->line, mp->ptr);
+      free(mp);
+    }
+    soap->mht[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_track_malloc(struct soap *soap, const char *file, int line, size_t size)
+{ register void *p = malloc(size);
+  if (soap)
+  { register int h = soap_hash_ptr(p);
+    register struct soap_mlist *mp = (struct soap_mlist*)malloc(sizeof(struct soap_mlist));
+    if (soap->fdebug[SOAP_INDEX_TEST])
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): malloc(%lu) = %p\n", file, line, (unsigned long)size, p));
+    mp->next = soap->mht[h];
+    mp->ptr = p;
+    mp->file = file;
+    mp->line = line;
+    mp->live = 1;
+    soap->mht[h] = mp;
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_track_free(struct soap *soap, const char *file, int line, void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+  { if (mp->live)
+    { free(p);
+      if (soap->fdebug[SOAP_INDEX_TEST])
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): free(%p)\n", file, line, p));
+      mp->live = 0;
+    }
+    else
+      fprintf(stderr, "%s(%d): free(%p) double free of pointer malloced at %s(%d)\n", file, line, p, mp->file, mp->line);
+  }
+  else
+    fprintf(stderr, "%s(%d): free(%p) pointer not malloced\n", file, line, p);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_track_unlink(struct soap *soap, const void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+    mp->live = 0;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_dealloc(struct soap *soap, void *p)
+{ if (!soap)
+    return;
+  if (p)
+  { register char **q;
+    for (q = (char**)&soap->alist; *q; q = *(char***)q)
+    { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+      { *q = **(char***)q;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Freed data at %p\n", p));
+        SOAP_FREE(soap, p);
+        return;
+      }
+    }
+    soap_delete(soap, p);
+  }
+  else
+  { register char *q;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free all soap_malloc() data\n"));
+    while (soap->alist)
+    { q = (char*)soap->alist;
+      soap->alist = *(void**)q;
+      q -= *(size_t*)(q + sizeof(void*));
+      SOAP_FREE(soap, q);
+    }
+  }
+  /* we must assume these were deallocated: */
+  soap->action = NULL;
+  soap->fault = NULL;
+  soap->header = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->authrealm = NULL;
+#ifndef WITH_LEANER
+  soap_clr_mime(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_delete(struct soap *soap, void *p)
+{ register struct soap_clist **cp;
+  if (soap_check_state(soap))
+    return;
+  cp = &soap->clist;
+  if (p)
+  { while (*cp)
+    { if (p == (*cp)->ptr)
+      { register struct soap_clist *q = *cp;
+        *cp = q->next;
+        q->fdelete(q);
+        SOAP_FREE(soap, q);
+        return;
+      }
+      cp = &(*cp)->next;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: address not in list\n", p));
+  }
+  else
+  { while (*cp)
+    { register struct soap_clist *q = *cp;
+      *cp = q->next;
+      if (q->ptr == (void*)soap->fault)
+        soap->fault = NULL; /* this was deallocated */
+      else if (q->ptr == (void*)soap->header)
+        soap->header = NULL; /* this was deallocated */
+      q->fdelete(q);
+      SOAP_FREE(soap, q);
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_clist *
+SOAP_FMAC2
+soap_link(struct soap *soap, void *p, int t, int n, void (*fdelete)(struct soap_clist*))
+{ register struct soap_clist *cp;
+  if ((cp = (struct soap_clist*)SOAP_MALLOC(soap, sizeof(struct soap_clist))))
+  { cp->next = soap->clist;
+    cp->type = t;
+    cp->size = n; 
+    cp->ptr = p;
+    cp->fdelete = fdelete;
+    soap->clist = cp;
+  }
+  return cp;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_unlink(struct soap *soap, const void *p)
+{ register char **q;
+  register struct soap_clist **cp;
+  if (!soap || !p)
+    return;
+  for (q = (char**)&soap->alist; *q; q = *(char***)q)
+  { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+    { *q = **(char***)q;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked data %p\n", p));
+#ifdef SOAP_DEBUG
+      soap_track_unlink(soap, p);
+#endif
+      return;
+    }
+  }
+  for (cp = &soap->clist; *cp; cp = &(*cp)->next)
+  { if (p == (*cp)->ptr)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked class instance %p\n", p));
+      q = (char**)*cp;
+      *cp = (*cp)->next;
+      SOAP_FREE(soap, q);
+      return;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_lookup_type(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  if (id && *id)
+  { ip = soap_lookup(soap, id);
+    if (ip)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup id='%s' type=%d\n", id, ip->type));
+      return ip->type;
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "lookup type id='%s' NOT FOUND! Need to get it from xsi:type\n", id));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, unsigned int k)
+{ struct soap_ilist *ip;
+  void **q;
+  if (!p || !id || !*id)
+    return p;
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding first href='%s' type=%d %p (%u bytes)\n", id, t, p, (unsigned int)n));
+    ip->type = t;
+    ip->size = n; 
+    ip->link = p;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->ptr = NULL;
+    ip->level = k;
+    *p = NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolved href='%s' type=%d location=%p (%u bytes)\n", id, t, ip->ptr, (unsigned int)n));
+    if (ip->type != t)
+    { strcpy(soap->id, id);
+      soap->error = SOAP_HREF;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility: id type=%d href type=%d\n", ip->type, t));
+      return NULL;
+    }
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      if (!q)
+        return NULL;
+      *p = (void*)q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    *p = ip->ptr;
+  }
+  else if (ip->level > k)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving level %u pointers to href='%s'\n", ip->level, id));
+    while (ip->level > k)
+    { void *s, **r = &ip->link;
+      q = (void**)ip->link;
+      while (q)
+      { *r = (void*)soap_malloc(soap, sizeof(void*));
+        s = *q;
+        *q = *r;
+        r = (void**)*r;
+        q = (void**)s;
+      }
+      *r = NULL;
+      ip->size = n; 
+      ip->copy = NULL;
+      ip->level = ip->level - 1;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarded href='%s' type=%d location=%p (%u bytes)\n", id, t, p, (unsigned int)n));
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      *p = q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_forward(struct soap *soap, const char *href, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t))
+{ struct soap_ilist *ip;
+  if (!p || !href || !*href)
+    return p;
+  ip = soap_lookup(soap, href); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, href); /* new hash table entry for string id */
+    ip->type = st;
+    ip->size = n;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->ptr = NULL;
+    ip->level = 0;
+    ip->flist = NULL;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry href='%s' type=%d size=%lu level=%d location=%p\n", href, st, (unsigned long)n, k, p));
+  }
+  else if (ip->type != st || (ip->level == k && ip->size != n))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", href, ip->type, (unsigned long)ip->size, k, st, (unsigned long)n));
+    strcpy(soap->id, href);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  if (fcopy || n < sizeof(void*) || *href != '#')
+  { register struct soap_flist *fp = (struct soap_flist*)SOAP_MALLOC(soap, sizeof(struct soap_flist));
+    if (!fp)
+    { soap->error = SOAP_EOM;
+      return NULL;
+    }
+    fp->next = ip->flist;
+    fp->type = tt;
+    fp->ptr = p;
+    fp->level = k;
+    fp->len = len;
+    if (fcopy)
+      fp->fcopy = fcopy;
+    else
+      fp->fcopy = soap_fcopy;
+    ip->flist = fp;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding type=%d (target type=%d) size=%lu location=%p level=%u len=%lu href='%s'\n", st, tt, (unsigned long)n, p, k, (unsigned long)len, href));
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding copying address %p for type=%d href='%s'\n", p, st, href));
+    *(void**)p = ip->copy;
+    ip->copy = p;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*))
+{
+#ifndef WITH_NOIDREF
+  struct soap_ilist *ip;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Enter id='%s' type=%d loc=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  soap->alloced = 0;
+  if (!p)
+  { if (finstantiate)
+      p = finstantiate(soap, t, type, arrayType, &n);
+    else
+      p = soap_malloc(soap, n);
+    if (p)
+      soap->alloced = 1;
+  }
+#ifndef WITH_NOIDREF
+  if (!id || !*id)
+#endif
+    return p;
+#ifndef WITH_NOIDREF
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Lookup entry id='%s for location=%p'\n", id, p));
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    ip->type = t;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry id='%s' type=%d size=%lu level=%u location=%p\n", id, t, (unsigned long)n, k, p));
+  }
+  else if ((ip->type != t || (ip->level == k && ip->size != n)) && (ip->copy || ip->flist))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", id, ip->type, (unsigned long)ip->size, k, t, (unsigned long)n));
+    strcpy(soap->id, id);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Multiply defined id='%s'\n", id));
+    strcpy(soap->id, id);
+    soap->error = SOAP_DUPLICATE_ID;
+    return NULL;
+  }
+  else 
+  { ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update entry id='%s' type=%d location=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  }
+  return ip->ptr;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{ DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Copying data type=%d (target type=%d) %p -> %p (%lu bytes)\n", st, tt, q, p, (unsigned long)n));
+  memcpy(p, q, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_send(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->dime.list)
+  { /* SOAP body referenced attachments must appear first */
+    soap->dime.last->next = soap->dime.first;
+    soap->dime.first = soap->dime.list->next;
+    soap->dime.list->next = NULL;
+    soap->dime.last = soap->dime.list;
+  }
+  if (soap_putdime(soap) || soap_putmime(soap))
+    return soap->error;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End send\n"));
+  if (soap->mode & SOAP_IO) /* need to flush the remaining data in buffer */
+  { if (soap_flush(soap))
+#ifdef WITH_ZLIB
+    { if (soap->mode & SOAP_ENC_ZLIB && soap->zlib_state == SOAP_ZLIB_DEFLATE)
+      { soap->zlib_state = SOAP_ZLIB_NONE;
+        deflateEnd(&soap->d_stream);
+      }
+      return soap->error;
+    }
+#else
+      return soap->error;
+#endif
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { int r;
+      soap->d_stream.avail_in = 0;
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating remainder\n"));
+        r = deflate(&soap->d_stream, Z_FINISH);
+        if (soap->d_stream.avail_out != SOAP_BUFLEN)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN - soap->d_stream.avail_out))
+          { soap->zlib_state = SOAP_ZLIB_NONE;
+            deflateEnd(&soap->d_stream);
+            return soap->error;
+	  }
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (r == Z_OK);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+      soap->z_ratio_out = (float)soap->d_stream.total_out / (float)soap->d_stream.total_in;
+      soap->mode &= ~SOAP_ENC_ZLIB;
+      soap->zlib_state = SOAP_ZLIB_NONE;
+      if (deflateEnd(&soap->d_stream) != Z_OK || r != Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to end deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+#ifdef WITH_GZIP
+      soap->z_buf[0] = soap->z_crc & 0xFF;
+      soap->z_buf[1] = (soap->z_crc >> 8) & 0xFF;
+      soap->z_buf[2] = (soap->z_crc >> 16) & 0xFF;
+      soap->z_buf[3] = (soap->z_crc >> 24) & 0xFF;
+      soap->z_buf[4] = soap->d_stream.total_in & 0xFF;
+      soap->z_buf[5] = (soap->d_stream.total_in >> 8) & 0xFF;
+      soap->z_buf[6] = (soap->d_stream.total_in >> 16) & 0xFF;
+      soap->z_buf[7] = (soap->d_stream.total_in >> 24) & 0xFF;
+      if (soap_flush_raw(soap, soap->z_buf, 8))
+        return soap->error;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip crc32=%lu\n", (unsigned long)soap->z_crc));
+#endif
+    }
+#endif
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    { char *p;
+#ifndef WITH_NOHTTP
+      if (!(soap->mode & SOAP_ENC_XML))
+      { soap->mode--;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending buffered message of length %u\n", (unsigned int)soap->blist->size));
+        if (soap->status >= SOAP_POST)
+          soap->error = soap->fpost(soap, soap->endpoint, soap->host, soap->port, soap->path, soap->action, soap->blist->size);
+        else if (soap->status != SOAP_STOP)
+          soap->error = soap->fresponse(soap, soap->status, soap->blist->size);
+        if (soap->error || soap_flush(soap))
+          return soap->error;
+        soap->mode++;
+      }
+#endif
+      for (p = soap_first_block(soap); p; p = soap_next_block(soap))
+      { DBGMSG(SENT, p, soap_block_size(soap));
+        if ((soap->error = soap->fsend(soap, p, soap_block_size(soap))))
+        { soap_end_block(soap);
+          return soap->error;
+        }
+      }
+      soap_end_block(soap);
+    }
+#ifndef WITH_LEANER
+    else if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { DBGMSG(SENT, "\r\n0\r\n\r\n", 7);
+      if ((soap->error = soap->fsend(soap, "\r\n0\r\n\r\n", 7)))
+        return soap->error;
+    }
+#endif
+  }
+#ifdef WITH_TCPFIN
+#ifdef WITH_OPENSSL
+  if (!soap->ssl && soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#else
+  if (soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#endif
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of send phase\n"));
+  soap->omode &= ~SOAP_XML_SEC;
+  soap->count = 0;
+  soap->part = SOAP_END;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_recv(struct soap *soap)
+{ soap->part = SOAP_END;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) && soap_getdime(soap))
+    return soap->error;
+  soap->dime.list = soap->dime.first;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  if ((soap->mode & SOAP_ENC_MIME) && soap_getmime(soap))
+    return soap->error;
+  soap->mime.list = soap->mime.first;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "End of receive message ok\n"));
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { soap->mode &= ~SOAP_ENC_ZLIB;
+    memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+    soap->bufidx = (char*)soap->d_stream.next_in - soap->z_buf;
+    soap->buflen = soap->z_buflen;
+    soap->zlib_state = SOAP_ZLIB_NONE;
+    if (inflateEnd(&soap->d_stream) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+#ifdef WITH_GZIP
+    if (soap->zlib_in == SOAP_ZLIB_GZIP)
+    { soap_wchar c;
+      short i;
+      for (i = 0; i < 8; i++)
+      { if ((int)(c = soap_getchar(soap)) == EOF)
+          return soap->error = SOAP_EOF;
+        soap->z_buf[i] = (char)c;
+      }
+      if (soap->z_crc != ((uLong)(unsigned char)soap->z_buf[0] | ((uLong)(unsigned char)soap->z_buf[1] << 8) | ((uLong)(unsigned char)soap->z_buf[2] << 16) | ((uLong)(unsigned char)soap->z_buf[3] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: crc check failed, message corrupted? (crc32=%lu)\n", (unsigned long)soap->z_crc));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+      if (soap->d_stream.total_out != ((uLong)(unsigned char)soap->z_buf[4] | ((uLong)(unsigned char)soap->z_buf[5] << 8) | ((uLong)(unsigned char)soap->z_buf[6] << 16) | ((uLong)(unsigned char)soap->z_buf[7] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: incorrect message length\n"));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+    }
+#endif
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    while ((int)soap_getchar(soap) != EOF) /* advance to last chunk */
+      ;
+  if (soap->fdisconnect && (soap->error = soap->fdisconnect(soap)))
+    return soap->error;
+#ifndef WITH_NOIDREF
+  return soap_resolve(soap);
+#else
+#ifndef WITH_LEANER
+  if (soap->xlist)
+  { if (soap->mode & SOAP_ENC_MTOM)
+      return soap->error = SOAP_MIME_HREF;
+    return soap->error = SOAP_DIME_HREF;
+  }
+#endif
+  return SOAP_OK;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free(struct soap *soap)
+{ register struct Namespace *ns;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free namespace stack\n"));
+  while (soap->nlist)
+  { register struct soap_nlist *np = soap->nlist->next;
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free any remaining temp blocks\n"));
+  while (soap->blist)
+    soap_end_block(soap);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute storage\n"));
+  while (soap->attributes)
+  { register struct soap_attribute *tp = soap->attributes->next;
+    if (soap->attributes->value)
+      SOAP_FREE(soap, soap->attributes->value);
+    SOAP_FREE(soap, soap->attributes);
+    soap->attributes = tp;
+  }
+#ifdef WITH_FAST
+  if (soap->labbuf)
+    SOAP_FREE(soap, soap->labbuf);
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  ns = soap->local_namespaces;
+  if (ns)
+  { for (; ns->id; ns++)
+    { if (ns->out)
+      { if (soap->encodingStyle == ns->out)
+          soap->encodingStyle = SOAP_STR_EOS;
+        SOAP_FREE(soap, ns->out);
+        ns->out = NULL;
+      }
+      if (soap->encodingStyle == ns->ns)
+        soap->encodingStyle = SOAP_STR_EOS;
+    }
+    SOAP_FREE(soap, soap->local_namespaces);
+    soap->local_namespaces = NULL;
+  }
+#ifndef WITH_LEANER
+  while (soap->xlist)
+  { struct soap_xlist *xp = soap->xlist->next;
+    SOAP_FREE(soap, soap->xlist);
+    soap->xlist = xp;
+  }
+#endif
+#ifndef WITH_NOIDREF
+  soap_free_pht(soap);
+  soap_free_iht(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_logs(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { soap->logfile[i] = NULL;
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEAN) || defined(SOAP_DEBUG)
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_open_logfile(struct soap *soap, int i)
+{ if (soap->logfile[i])
+    soap->fdebug[i] = fopen(soap->logfile[i], i < 2 ? "ab" : "a");
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_close_logfile(struct soap *soap, int i)
+{ if (soap->fdebug[i])
+  { fclose(soap->fdebug[i]);
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_close_logfiles(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+    soap_close_logfile(soap, i);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_set_logfile(struct soap *soap, int i, const char *logfile)
+{ char *s = NULL;
+  soap_close_logfile(soap, i);
+  if (soap->logfile[i])
+    SOAP_FREE(soap, (void*)soap->logfile[i]);
+  if (logfile)
+    if ((s = (char*)SOAP_MALLOC(soap, strlen(logfile) + 1)))
+      strcpy(s, logfile);
+  soap->logfile[i] = s;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_recv_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_RECV, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_sent_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_SENT, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_test_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_TEST, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy(struct soap *soap)
+{ return soap_copy_context((struct soap*)malloc(sizeof(struct soap)), soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy_context(struct soap *copy, struct soap *soap)
+{ if (soap_check_state(soap))
+    return NULL;
+  if (copy)
+  { register struct soap_plugin *p;
+    memcpy(copy, soap, sizeof(struct soap));
+    copy->state = SOAP_COPY;
+    copy->user = NULL;
+    copy->error = SOAP_OK;
+    copy->userid = NULL;
+    copy->passwd = NULL;
+    copy->nlist = NULL;
+    copy->blist = NULL;
+    copy->clist = NULL;
+    copy->alist = NULL;
+    copy->attributes = NULL;
+#ifdef WITH_FAST
+    copy->labbuf = NULL;
+    copy->lablen = 0;
+    copy->labidx = 0;
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_mht(copy);
+#endif
+    copy->local_namespaces = NULL;
+#ifndef WITH_NOIDREF
+    soap_init_iht(copy);
+    soap_init_pht(copy);
+#endif
+    copy->header = NULL;
+    copy->fault = NULL;
+    copy->action = NULL;
+#ifndef WITH_LEAN
+#ifdef WITH_COOKIES
+    copy->cookies = soap_copy_cookies(copy);
+#else
+    copy->cookies = NULL;
+#endif
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_logs(copy);
+    soap_set_recv_logfile(copy, soap->logfile[SOAP_INDEX_RECV]);
+    soap_set_sent_logfile(copy, soap->logfile[SOAP_INDEX_SENT]);
+    soap_set_test_logfile(copy, soap->logfile[SOAP_INDEX_TEST]);
+#endif
+    copy->plugins = NULL;
+    for (p = soap->plugins; p; p = p->next)
+    { register struct soap_plugin *q = (struct soap_plugin*)SOAP_MALLOC(copy, sizeof(struct soap_plugin));
+      if (!q)
+        return NULL;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying plugin '%s'\n", p->id));
+      *q = *p;
+      if (p->fcopy && (soap->error = p->fcopy(copy, q, p)))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not copy plugin '%s'\n", p->id));
+        SOAP_FREE(copy, q);
+        return NULL;
+      }
+      q->next = copy->plugins;
+      copy->plugins = q;
+    }
+  }
+  else
+    soap->error = SOAP_EOM;
+  return copy;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init(struct soap *soap)
+{ soap->state = SOAP_INIT;
+  soap->version = 0;
+  soap_imode(soap, SOAP_IO_DEFAULT);
+  soap_omode(soap, SOAP_IO_DEFAULT);
+  soap->plugins = NULL;
+  soap->user = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+  soap->fconnect = NULL;
+  soap->fdisconnect = NULL;
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+  soap->fplugin = fplugin;
+#ifndef WITH_LEANER
+  soap->fdimereadopen = NULL;
+  soap->fdimewriteopen = NULL;
+  soap->fdimereadclose = NULL;
+  soap->fdimewriteclose = NULL;
+  soap->fdimeread = NULL;
+  soap->fdimewrite = NULL;
+#endif
+  soap->float_format = "%.8g"; /* .8 preserves single FP precision as much as possible, but might not be very efficient */
+  soap->double_format = "%.17lg"; /* .17 preserves double FP precision as much as possible, but might not be very efficient */
+  soap->dime_id_format = "cid:id%d"; /* default DIME id format */
+  soap->http_version = "1.1";
+  soap->actor = NULL;
+  soap->max_keep_alive = SOAP_MAXKEEPALIVE;
+  soap->keep_alive = 0;
+  soap->recv_timeout = 0;
+  soap->send_timeout = 0;
+  soap->connect_timeout = 0;
+  soap->accept_timeout = 0;
+  soap->socket_flags = 0;
+  soap->connect_flags = 0;
+  soap->bind_flags = 0;
+  soap->accept_flags = 0;
+  soap->ip = 0;
+#ifdef WITH_FAST
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  soap->encodingStyle = SOAP_STR_EOS;
+#ifndef WITH_NONAMESPACES
+  soap->namespaces = namespaces;
+#else
+  soap->namespaces = NULL;
+#endif
+  soap->local_namespaces = NULL;
+  soap->nlist = NULL;
+  soap->blist = NULL;
+  soap->clist = NULL;
+  soap->alist = NULL;
+  soap->attributes = NULL;
+  soap->header = NULL;
+  soap->fault = NULL;
+  soap->master = SOAP_INVALID_SOCKET;
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->os = NULL;
+  soap->is = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifndef UNDER_CE
+  soap->recvfd = 0;
+  soap->sendfd = 1;
+#else
+  soap->recvfd = stdin;
+  soap->sendfd = stdout;
+#endif 
+  soap->host[0] = '\0';
+  soap->port = 0;
+  soap->action = NULL;
+  soap->proxy_host = NULL;
+  soap->proxy_port = 8080;
+  soap->proxy_userid = NULL;
+  soap->proxy_passwd = NULL;
+  soap->authrealm = NULL;
+  soap->prolog = NULL;
+#ifdef WITH_OPENSSL
+  if (!ssl_init_done)
+    soap_ssl_init();
+  soap->fsslauth = ssl_auth_init;
+  soap->fsslverify = ssl_verify_callback;
+  soap->bio = NULL;
+  soap->ssl = NULL;
+  soap->ctx = NULL;
+  soap->require_server_auth = 0;
+  soap->require_client_auth = 0;
+  soap->rsa = 0;
+  soap->keyfile = NULL;
+  soap->password = NULL;
+  soap->dhfile = NULL;
+  soap->cafile = NULL;
+  soap->capath = NULL;
+  soap->crlfile = NULL;
+  soap->randfile = NULL;
+  soap->session = NULL;
+#endif
+#ifdef WITH_ZLIB
+  soap->zlib_state = SOAP_ZLIB_NONE;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.zalloc = NULL;
+  soap->d_stream.zfree = NULL;
+  soap->d_stream.opaque = NULL;
+  soap->z_level = 6;
+#endif
+#ifndef WITH_LEAN
+  soap->c14ninclude = NULL;
+  soap->c14nexclude = NULL;
+  soap->cookies = NULL;
+  soap->cookie_domain = NULL;
+  soap->cookie_path = NULL;
+  soap->cookie_max = 32;
+#endif
+#ifdef SOAP_DEBUG
+  soap_init_mht(soap);
+  soap_init_logs(soap);
+  soap_set_recv_logfile(soap, "RECV.log");
+  soap_set_sent_logfile(soap, "SENT.log");
+  soap_set_test_logfile(soap, NULL);
+#endif
+#ifdef WMW_RPM_IO
+  soap->rpmreqid = NULL;
+#endif
+#ifdef PALM
+  palmNetLibOpen();
+#endif
+#ifndef WITH_NOIDREF
+  soap_init_iht(soap);
+  soap_init_pht(soap);
+#endif
+  soap_begin(soap);
+#ifdef SOAP_DEBUG
+  soap_set_test_logfile(soap, "TEST.log");
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init1(struct soap *soap, soap_mode mode)
+{ soap_init2(soap, mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init2(struct soap *soap, soap_mode imode, soap_mode omode)
+{ soap_init(soap);
+  soap_imode(soap, imode);
+  soap_omode(soap, omode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_begin(struct soap *soap)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing\n"));
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+  soap->null = 0;
+  soap->position = 0;
+  soap->encoding = 0;
+  soap->mustUnderstand = 0;
+  soap->mode = 0;
+  soap->ns = 0;
+  soap->part = SOAP_END;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  soap->error = SOAP_OK;
+  soap->peeked = 0;
+  soap->ahead = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+  soap->endpoint[0] = '\0';
+#ifndef WITH_LEANER
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+#endif
+  soap_free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end(struct soap *soap)
+{ register struct soap_clist *cp;
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  soap_dealloc(soap, NULL);
+  while (soap->clist)
+  { cp = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = cp;
+  }
+  soap_closesock(soap);
+#ifdef SOAP_DEBUG
+  soap_close_logfiles(soap);
+#endif
+#ifdef PALM
+  palmNetLibClose();
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_namespaces(struct soap *soap, struct Namespace *p)
+{ register struct Namespace *ns = soap->local_namespaces;
+  register struct soap_nlist *np, *nq, *nr;
+  register unsigned int level = soap->level;
+  soap->namespaces = p;
+  soap->local_namespaces = NULL;
+  soap_set_local_namespaces(soap);
+  /* reverse the namespace list */
+  np = soap->nlist;
+  soap->nlist = NULL;
+  if (np)
+  { nq = np->next;
+    np->next = NULL;
+    while (nq)
+    { nr = nq->next;
+      nq->next = np;
+      np = nq;
+      nq = nr;
+    }
+  }
+  /* then push on new stack */
+  while (np)
+  { register const char *s;
+    soap->level = np->level; /* preserve element nesting level */
+    s = np->ns;
+    if (!s && np->index >= 0 && ns)
+    { s = ns[np->index].out;
+      if (!s)
+        s = ns[np->index].ns;
+    }
+    if (s && soap_push_namespace(soap, np->id, s))
+      return soap->error;
+    nq = np;
+    np = np->next;
+    SOAP_FREE(soap, nq);
+  }
+  if (ns)
+  { register int i;
+    for (i = 0; ns[i].id; i++)
+    { if (ns[i].out)
+      { SOAP_FREE(soap, ns[i].out);
+        ns[i].out = NULL;
+      }
+    }
+    SOAP_FREE(soap, ns);
+  }
+  soap->level = level; /* restore level */
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_local_namespaces(struct soap *soap)
+{ if (soap->namespaces && !soap->local_namespaces)
+  { register const struct Namespace *ns1;
+    register struct Namespace *ns2;
+    register size_t n = 1;
+    for (ns1 = soap->namespaces; ns1->id; ns1++)
+      n++;
+    n *= sizeof(struct Namespace);
+    ns2 = (struct Namespace*)SOAP_MALLOC(soap, n);
+    if (ns2)
+    { memcpy(ns2, soap->namespaces, n);
+      if (ns2[0].ns)
+      { if (!strcmp(ns2[0].ns, soap_env1))
+          soap->version = 1;
+        else
+          soap->version = 2;
+      }
+      soap->local_namespaces = ns2;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+#ifndef PALM_1
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_strsearch(const char *big, const char *little)
+{ size_t n = strlen(little);
+  const char *s = big;
+  while (s) 
+  { if (!strncmp(s, little, n) && (s[n] == '\0' || s[n] == ' '))
+      return s;
+    s = strchr(s, ' ');
+    if (s)
+      s++;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_lookup_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np;
+  for (np = soap->nlist; np; np = np->next)
+  { if (!strncmp(np->id, tag, n) && !np->id[n])
+      return np;
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized)
+{ register struct soap_nlist *np;
+  size_t n, k;
+  if (soap_strsearch(soap->c14nexclude, id))
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns?ns:""));
+  if (!utilized)
+  { for (np = soap->nlist; np; np = np->next)
+    { if (!strcmp(np->id, id) && (!np->ns || !strcmp(np->ns, ns)))
+        break;
+    }
+    if (np)
+    { if (np->index == 1)
+        utilized = np->index;
+      else
+        return NULL;
+    }
+  }
+  n = strlen(id);
+  if (ns)
+    k = strlen(ns);
+  else
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k + 1);
+  if (!np)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  np->next = soap->nlist;
+  soap->nlist = np;
+  strcpy(np->id, id);
+  if (ns)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+  }
+  else
+    np->ns = NULL;
+  np->level = soap->level;
+  np->index = utilized;
+  return np;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_utilize_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np = soap_lookup_ns(soap, tag, n);
+  if (np)
+  { if (np->index == 0)
+      soap_push_ns(soap, np->id, np->ns, 1);
+  }
+  else
+  { strncpy(soap->tmpbuf, tag, n);
+    soap->tmpbuf[n] = '\0';
+    soap_push_ns(soap, soap->tmpbuf, NULL, 1);
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_pop_ns(struct soap *soap)
+{ soap_pop_namespace(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element(struct soap *soap, const char *tag, int id, const char *type)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element begin tag='%s' id='%d' type='%s'\n", tag, id, type?type:""));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->soap = soap;
+    elt->next = NULL;
+    elt->prnt = soap->dom;
+    elt->name = soap_strdup(soap, tag);
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->nstr = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->node = NULL;
+    elt->type = 0;
+    elt->head = NULL;
+    elt->tail = NULL;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+  }
+  else
+  {
+#endif
+    soap->level++;
+#ifndef WITH_LEAN
+    if (!soap->ns)
+    { if (!(soap->mode & SOAP_XML_CANONICAL)
+       && soap_send(soap, soap->prolog ? soap->prolog : "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"))
+        return soap->error;
+    }
+    else if (soap->mode & SOAP_XML_INDENT)
+    { if (soap->ns == 1 && soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+      soap->body = 1;
+    }
+#endif
+    if (soap_send_raw(soap, "<", 1)
+     || soap_send(soap, tag))
+      return soap->error;
+#ifdef WITH_DOM
+  }
+#endif
+  if (!soap->ns)
+  { struct Namespace *ns;
+    for (ns = soap->local_namespaces; ns && ns->id; ns++)
+    { if (*ns->id && (ns->out || ns->ns))
+      { sprintf(soap->tmpbuf, "xmlns:%s", ns->id);
+        if (soap_attribute(soap, soap->tmpbuf, ns->out ? ns->out : ns->ns))
+          return soap->error;
+      }
+    }   
+  }
+  soap->ns = 1; /* start with 0 or 2, but should be one to continue */
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { const char *s = strchr(tag, ':');
+    if (s)
+      soap_utilize_ns(soap, tag, s - tag);
+  }
+#endif
+  if (id > 0)
+  { sprintf(soap->tmpbuf, "_%d", id);
+    if (soap_attribute(soap, "id", soap->tmpbuf))
+      return soap->error;
+  }
+  if (type && *type)
+  { if (soap_attribute(soap, "xsi:type", type))
+      return soap->error;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { const char *s = strchr(type, ':');
+      if (s)
+        soap_utilize_ns(soap, type, s - type);
+    }
+#endif
+  }
+  if (soap->null && soap->position > 0)
+  { int i;
+    sprintf(soap->tmpbuf, "[%d", soap->positions[0]);
+    for (i = 1; i < soap->position; i++)
+      sprintf(soap->tmpbuf + strlen(soap->tmpbuf), ",%d", soap->positions[i]);
+    strcat(soap->tmpbuf, "]");
+    if (soap_attribute(soap, "SOAP-ENC:position", soap->tmpbuf))
+      return soap->error;
+  }
+  if (soap->mustUnderstand)
+  { if (soap->actor && *soap->actor)
+    { if (soap_attribute(soap, soap->version == 2 ? "SOAP-ENV:role" : "SOAP-ENV:actor", soap->actor))
+        return soap->error;
+    }
+    if (soap_attribute(soap, "SOAP-ENV:mustUnderstand", soap->version == 2 ? "true" : "1"))
+      return soap->error;
+    soap->mustUnderstand = 0;
+  }
+  if (soap->encoding)
+  { if (soap->encodingStyle && soap->local_namespaces)
+    { if (!*soap->encodingStyle)
+      { if (soap->local_namespaces[1].out)
+          soap->encodingStyle = soap->local_namespaces[1].out;
+        else
+          soap->encodingStyle = soap->local_namespaces[1].ns;
+      }
+      if (soap_attribute(soap, "SOAP-ENV:encodingStyle", soap->encodingStyle))
+        return soap->error;
+    }
+    soap->encoding = 0;
+  }
+  soap->null = 0;
+  soap->position = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_out(struct soap *soap, const char *tag, int id, const char *type)
+{ if (*tag == '-')
+    return SOAP_OK;
+  if (soap_element(soap, tag, id, type))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRRCHR
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_strrchr(const char *s, int t)
+{ register char *r = NULL;
+  while (*s)
+    if (*s++ == t)
+      r = (char*)s - 1;
+  return r;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOL
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_strtol(const char *s, char **t, int b)
+{ register long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { short neg = 0;
+    if (*s == '-')
+    { s++;
+      neg = 1;
+    }
+    else if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 214748364 && (n > 214748364 || c >= '8'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+    if (neg)
+      n = -n;
+  }
+  else /* b == 16 and value is always positive */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x07FFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOUL
+SOAP_FMAC1
+unsigned long
+SOAP_FMAC2
+soap_strtoul(const char *s, char **t, int b)
+{ unsigned long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 429496729 && (n > 429496729 || c >= '6'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+  }
+  else /* b == 16 */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x0FFFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_begin_out(struct soap *soap, const char *tag, int id, const char *type, const char *offset)
+{ if (soap_element(soap, tag, id, "SOAP-ENC:Array"))
+    return soap->error;
+  if (soap->version == 2)
+  { const char *s;
+    s = soap_strrchr(type, '[');
+    if ((size_t)(s - type) < sizeof(soap->tmpbuf))
+    { strncpy(soap->tmpbuf, type, s - type);
+      soap->tmpbuf[s - type] = '\0';
+      if (type && *type && (soap_attribute(soap, "SOAP-ENC:itemType", soap->tmpbuf)))
+        return soap->error;
+      if (s && (soap_attribute(soap, "SOAP-ENC:arraySize", s + 1)))
+        return soap->error;
+    }
+  }
+  else
+  { if (offset && (soap_attribute(soap, "SOAP-ENC:offset", offset)))
+      return soap->error;
+    if (type && *type && (soap_attribute(soap, "SOAP-ENC:arrayType", type)))
+      return soap->error;
+  }
+#ifndef WITH_LEAN
+  if (type && *type && (soap->mode & SOAP_XML_CANONICAL))
+  { const char *s = strchr(type, ':');
+    if (s)
+      soap_utilize_ns(soap, type, s - type);
+  }
+#endif
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_start_end_out(struct soap *soap, const char *tag)
+{ register struct soap_attribute *tp;
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att;
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { att = &soap->dom->atts;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible)
+      { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+	if (!*att)
+	  return soap->error = SOAP_EOM;
+	(*att)->next = NULL;
+        (*att)->nstr = NULL;
+        (*att)->name = soap_strdup(soap, tp->name);
+        (*att)->data = soap_strdup(soap, tp->value);
+        (*att)->wide = NULL;
+        (*att)->soap = soap;
+        tp->visible = 0;
+      }
+    }
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { struct soap_nlist *np;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible && tp->name)
+      { const char *s = strchr(tp->name, ':');
+        if (s)
+          soap_utilize_ns(soap, tp->name, s - tp->name);
+      }
+    }
+    for (np = soap->nlist; np; np = np->next)
+    { if (np->index == 1 && np->ns)
+      { sprintf(soap->tmpbuf, "xmlns:%s", np->id);
+        soap_set_attr(soap, soap->tmpbuf, np->ns);
+        np->index = 2;
+      }
+    }
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible)
+    { if (soap_send(soap, " ") || soap_send(soap, tp->name))
+        return soap->error;
+      if (tp->visible == 2 && tp->value)
+        if (soap_send_raw(soap, "=\"", 2)
+	 || soap_string_out(soap, tp->value, 1)
+	 || soap_send_raw(soap, "\"", 1))
+          return soap->error;
+      tp->visible = 0;
+    }
+  }
+  if (tag)
+  { 
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { if (soap_send_raw(soap, ">", 1)
+       || soap_element_end_out(soap, tag))
+        return soap->error;
+    }
+    else
+#endif
+    soap->level--;	/* decrement level just before /> */
+    if (soap_send_raw(soap, "/>", 2))
+      return soap->error;
+    return SOAP_OK;
+  }
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_out(struct soap *soap, const char *tag)
+{ if (*tag == '-')
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element ending tag='%s'\n", tag));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+    soap_pop_ns(soap);
+  if (soap->mode & SOAP_XML_INDENT)
+  { if (!soap->body)
+    { if (soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+    }
+    soap->body = 0;
+  }
+#endif
+  if (soap_send_raw(soap, "</", 2)
+   || soap_send(soap, tag))
+    return soap->error;
+  soap->level--;	/* decrement level just before > */
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_ref(struct soap *soap, const char *tag, int id, int href)
+{ register int n = 0;
+  if (soap->version == 2)
+    n = 1;
+  sprintf(soap->href, "#_%d", href);
+  return soap_element_href(soap, tag, id, "href" + n, soap->href + n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_href(struct soap *soap, const char *tag, int id, const char *ref, const char *val)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element '%s' reference %s='%s'\n", tag, ref, val));
+  if (soap_element(soap, tag, id, NULL)
+   || soap_attribute(soap, ref, val)
+   || soap_element_start_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_null(struct soap *soap, const char *tag, int id, const char *type)
+{ struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (tp->visible)
+      break;
+  if (tp || (soap->version == 2 && soap->position > 0) || id > 0 || (soap->mode & SOAP_XML_NIL))
+  { if (soap_element(soap, tag, id, type))
+      return soap->error;
+    if (soap->part != SOAP_IN_HEADER && soap->encodingStyle)
+      if (soap_attribute(soap, "xsi:nil", "true"))
+        return soap->error;
+    return soap_element_start_end_out(soap, tag);
+  }
+  soap->null = 1;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_id(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, int n, const char *type, int t) 
+{ if (!p || (a && !a->__ptr))
+  { soap_element_null(soap, tag, id, type);
+    return -1;
+  }
+#ifndef WITH_NOIDREF
+  if (soap->mode & SOAP_XML_TREE)
+    return 0;
+  if (id < 0)
+  { struct soap_plist *pp;
+    if (a)
+      id = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+    else
+      id = soap_pointer_lookup(soap, p, t, &pp);
+    if (id)
+    { if (soap_is_embedded(soap, pp))
+      { soap_element_ref(soap, tag, 0, id);
+        return -1;
+      }
+      if (soap_is_single(soap, pp))
+        return 0;
+      soap_set_embedded(soap, pp);
+    }
+  }
+  return id;
+#else
+  return 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_result(struct soap *soap, const char *tag)
+{ if (soap->version == 2 && soap->encodingStyle)
+    if (soap_element(soap, "SOAP-RPC:result", 0, NULL)
+     || soap_attribute(soap, "xmlns:SOAP-RPC", soap_rpc)
+     || soap_element_start_end_out(soap, NULL)
+     || soap_string_out(soap, tag, 0)
+     || soap_element_end_out(soap, "SOAP-RPC:result"))
+      return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attribute(struct soap *soap, const char *name, const char *value)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+    a->next = soap->dom->atts;
+    a->nstr = NULL;
+    a->name = soap_strdup(soap, name);
+    a->data = soap_strdup(soap, value);
+    a->wide = NULL;
+    a->soap = soap;
+    soap->dom->atts = a;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { /* TODO: consider using this code to handle default namespace
+    if (!strncmp(name, "xmlns", 5) && (name[5] == ':' || name[5] == '\0'))
+    { if (name[5] == ':')
+        soap_push_ns(soap, name + 6, value, 0);
+      else
+        soap_push_ns(soap, "", value, 0);
+    }
+    */
+    if (!strncmp(name, "xmlns:", 6))
+      soap_push_ns(soap, name + 6, value, 0);
+    else if (soap_set_attr(soap, name, value))
+      return soap->error;
+  }
+  else
+#endif
+  { if (soap_send(soap, " ") || soap_send(soap, name))
+      return soap->error;
+    if (value)
+      if (soap_send_raw(soap, "=\"", 2)
+       || soap_string_out(soap, value, 1)
+       || soap_send_raw(soap, "\"", 1))
+        return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_in(struct soap *soap, const char *tag, int nillable)
+{ if (!soap_peek_element(soap))
+  { if (soap->other)
+      return soap->error = SOAP_TAG_MISMATCH;
+    if (tag && *tag == '-')
+      return SOAP_OK;
+    if (!(soap->error = soap_match_tag(soap, soap->tag, tag)))
+    { soap->peeked = 0;
+      if (soap->body)
+        soap->level++;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"" ));
+      if (!nillable && soap->null && (soap->mode & SOAP_XML_STRICT))
+        return soap->error = SOAP_NULL;
+    }
+  }
+  else if (soap->error == SOAP_NO_TAG && tag && *tag == '-')
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_in(struct soap *soap, const char *tag)  
+{ register soap_wchar c;
+  register char *s;
+  register const char *t;
+  register int n = 0;
+  if (tag && *tag == '-')
+    return SOAP_OK;
+  soap->level--;
+  soap_pop_namespace(soap);
+#ifdef WITH_DOM
+  /* this whitespace or mixed content is not insignificant for DOM */
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!soap->peeked && !soap_string_in(soap, 3, -1, -1))
+      return soap->error;
+    if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  if (soap->peeked)
+  { if (soap->error == SOAP_NO_TAG)
+      soap->error = SOAP_OK;
+    if (*soap->tag)
+      n++;
+    soap->peeked = 0;
+  }
+  do
+  { while (((c = soap_get(soap)) != SOAP_TT))
+    { if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      if (c == SOAP_LT)
+        n++;
+      else if (c == '/')
+      { c = soap_get(soap);
+        if (c == SOAP_GT)
+	  n--;
+        else
+	  soap_unget(soap, c);
+      }
+    }
+  } while (n--);
+  s = soap->tag;
+  while (soap_notblank(c = soap_get(soap)))
+    *s++ = (char)c;
+  *s = '\0';
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  while (soap_blank(c))
+    c = soap_get(soap);
+  if (c != SOAP_GT)
+    return soap->error = SOAP_SYNTAX_ERROR;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:""));
+  if (!tag || !*tag)
+    return SOAP_OK;
+  if ((s = strchr(soap->tag, ':')))
+    s++;
+  else
+    s = soap->tag;
+  if ((t = strchr(tag, ':')))
+    t++;
+  else
+    t = tag;
+  if (!SOAP_STRCMP(s, t))
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element tag name does not match\n"));
+  return soap->error = SOAP_SYNTAX_ERROR;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_attr_value(struct soap *soap, const char *name, int flag)
+{ register struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (!soap_match_tag(soap, tp->name, name))
+      break;
+  if (tp && tp->visible == 2)
+  { if (flag == 2 && (soap->mode & SOAP_XML_STRICT))
+      soap->error = SOAP_PROHIBITED;
+    else
+      return tp->value;
+  }
+  else if (flag == 1 && (soap->mode & SOAP_XML_STRICT))
+    soap->error = SOAP_REQUIRED;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_attr(struct soap *soap, const char *name, const char *value)
+{ register struct soap_attribute *tp;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set attribute %s='%s'\n", name, value?value:""));
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (!strcmp(tp->name, name))
+      break;
+  }
+  if (!tp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute %s\n", name));
+    if (!(tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(name))))
+      return soap->error = SOAP_EOM;
+    tp->ns = NULL;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { struct soap_attribute **tpp = &soap->attributes;
+      const char *s = strchr(name, ':');
+      if (!strncmp(name, "xmlns", 5))
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) || strcmp((*tpp)->name + 5, name + 5) > 0)
+            break;
+      }
+      else if (!s)
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) && ((*tpp)->ns || strcmp((*tpp)->name, name) > 0))
+            break;
+      }
+      else
+      { int k;
+        for (; *tpp; tpp = &(*tpp)->next)
+	{ if (!strncmp((*tpp)->name, "xmlns:", 6) && !strncmp((*tpp)->name + 6, name, s - name) && !(*tpp)->name[6 + s - name])
+	  { if (!tp->ns)
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Canonicalization: prefix %s=%p(%s)\n", name, (*tpp)->ns, (*tpp)->ns));
+	      tp->ns = (*tpp)->ns;
+	    }
+	  }
+          else if (strncmp((*tpp)->name, "xmlns", 5) && (*tpp)->ns && tp->ns && ((k = strcmp((*tpp)->ns, tp->ns)) > 0 || (!k && strcmp((*tpp)->name, name) > 0)))
+            break;
+        }
+      }
+      tp->next = *tpp;
+      *tpp = tp;
+    }
+    else
+#endif
+    { tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    strcpy(tp->name, name);
+    tp->value = NULL;
+  }
+  else if (tp->visible)
+  { return SOAP_OK;
+  }
+  else if (value && tp->value && tp->size <= strlen(value))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute value of %s (free %p)\n", name, tp->value));
+    SOAP_FREE(soap, tp->value);
+    tp->value = NULL;
+    tp->ns = NULL;
+  }
+  if (value)
+  { if (!tp->value)
+    { tp->size = strlen(value) + 1;
+      if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+        return soap->error = SOAP_EOM;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute value of %s (%p)\n", tp->name, tp->value));
+    }
+    strcpy(tp->value, value);
+    if (!strncmp(tp->name, "xmlns:", 6))
+      tp->ns = tp->value;
+    tp->visible = 2;
+#ifndef WITH_LEAN
+    if (!strcmp(name, "wsu:Id"))
+    { soap->part = SOAP_BEGIN_SECURITY;
+      strncpy(soap->id, value, sizeof(soap->id));
+      soap->id[sizeof(soap->id)-1] = '\0';
+    }
+#endif
+  }
+  else
+    tp->visible = 1;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_attr(struct soap *soap)
+{ register struct soap_attribute *tp;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_CANONICAL))
+  { while (soap->attributes)
+    { tp = soap->attributes->next;
+      SOAP_FREE(soap, soap->attributes->value);
+      SOAP_FREE(soap, soap->attributes);
+      soap->attributes = tp;
+    }
+  }
+  else
+#endif
+  { for (tp = soap->attributes; tp; tp = tp->next)
+      tp->visible = 0;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d)
+{ register size_t i;
+  for (i = 0; i < n; i++)
+  { register soap_wchar c = soap_get(soap);
+    switch (c)
+    {
+    case SOAP_TT:
+      *s++ = '<';
+      soap_unget(soap, '/');
+      break;
+    case SOAP_LT:
+      *s++ = '<';
+      break;
+    case SOAP_GT:
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '>';
+      break;
+    case SOAP_QT:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '"';
+      break;
+    case SOAP_AP:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '\'';
+      break;
+    case '\t':
+    case '\n':
+    case '\r':
+    case ' ':
+    case '/':
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+    default:
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+  }
+  return soap->error = SOAP_EOM;
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_store_lab(struct soap *soap, const char *s, size_t n)
+{ soap->labidx = 0;
+  return soap_append_lab(soap, s, n);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_append_lab(struct soap *soap, const char *s, size_t n)
+{ if (soap->labidx + n >= soap->lablen)
+  { register char *t = soap->labbuf;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enlarging look-aside buffer to append data, old size=%lu", (unsigned long)soap->lablen));
+    if (soap->lablen == 0)
+      soap->lablen = SOAP_LABLEN;
+    while (soap->labidx + n >= soap->lablen)
+      soap->lablen <<= 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, ", new size=%lu\n", (unsigned long)soap->lablen));
+    soap->labbuf = (char*)SOAP_MALLOC(soap, soap->lablen);
+    if (!soap->labbuf)
+    { if (t)
+        SOAP_FREE(soap, t);
+      return soap->error = SOAP_EOM;
+    }
+    if (t)
+    { memcpy(soap->labbuf, t, soap->labidx);
+      SOAP_FREE(soap, t);
+    }
+  }
+  if (s)
+  { memcpy(soap->labbuf + soap->labidx, s, n);
+    soap->labidx += n;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_peek_element(struct soap *soap)
+{
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att = NULL;
+  register char *lead = NULL;
+#endif
+  register struct soap_attribute *tp;
+  const char *t;
+  register char *s;
+  register soap_wchar c;
+  register int i;
+  if (soap->peeked)
+  { if (!*soap->tag)
+      return soap->error = SOAP_NO_TAG;
+    return SOAP_OK;
+  }
+  soap->peeked = 1;
+  c = soap_getutf8(soap);
+#ifdef WITH_DOM
+  /* whitespace leading to start tag is not insignificant for DOM */
+  if (soap_blank(c))
+  { soap->labidx = 0;
+    do
+    { if (soap_append_lab(soap, NULL, 0))
+        return SOAP_EOM;
+      s = soap->labbuf + soap->labidx;
+      i = soap->lablen - soap->labidx;
+      soap->labidx = soap->lablen;
+      while (soap_blank(c) && i--)
+      { *s++ = c;
+        c = soap_getutf8(soap);
+      }
+    }
+    while (soap_blank(c));
+    *s = '\0';
+    lead = soap_strdup(soap, soap->labbuf);
+  }
+#else
+  while (soap_blank(c))
+    c = soap_getutf8(soap);
+#endif
+  if (c != SOAP_LT)
+  { *soap->tag = '\0';
+    if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, c);
+#ifdef WITH_DOM
+    /* whitespace leading to end tag is not insignificant for DOM */
+    if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+      soap->dom->tail = soap_strdup(soap, lead);
+#endif
+    return soap->error = SOAP_NO_TAG;
+  }
+  s = soap->tag;
+  do c = soap_get1(soap);
+  while (soap_blank(c));
+  i = sizeof(soap->tag);
+  while (c != '>' && c != '/' && soap_notblank(c))
+  { if (--i > 0)
+      *s++ = (char)c;
+    c = soap_get1(soap);
+  }
+  while (soap_blank(c))
+    c = soap_get1(soap);
+  *s = '\0';
+  soap->id[0] = '\0';
+  soap->href[0] = '\0';
+  soap->type[0] = '\0';
+  soap->arrayType[0] = '\0';
+  soap->arraySize[0] = '\0';
+  soap->arrayOffset[0] = '\0';
+  soap->other = 0;
+  soap->root = -1;
+  soap->position = 0;
+  soap->null = 0;
+  soap->mustUnderstand = 0;
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt;
+    elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->next = NULL;
+    elt->nstr = NULL;
+    elt->name = soap_strdup(soap, soap->tag);
+    elt->prnt = soap->dom;
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->type = 0;
+    elt->node = NULL;
+    elt->head = lead;
+    elt->tail = NULL;
+    elt->soap = soap;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+    att = &elt->atts;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+    tp->visible = 0;
+  while ((int)c != EOF && c != '>' && c != '/')
+  { s = soap->tmpbuf;
+    i = sizeof(soap->tmpbuf);
+    while (c != '=' && c != '>' && c != '/' && soap_notblank(c))
+    { if (--i > 0)
+        *s++ = (char)c;
+      c = soap_get1(soap);
+    }
+    *s = '\0';
+    if (i == sizeof(soap->tmpbuf))
+      return soap->error = SOAP_SYNTAX_ERROR;
+#ifdef WITH_DOM
+    /* add attribute name to dom */
+    if (att)
+    { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+       if (!*att)
+         return soap->error = SOAP_EOM;
+       (*att)->next = NULL;
+       (*att)->nstr = NULL;
+       (*att)->name = soap_strdup(soap, soap->tmpbuf);
+       (*att)->data = NULL;
+       (*att)->wide = NULL;
+       (*att)->soap = soap;
+    }
+#endif
+    if (!strncmp(soap->tmpbuf, "xmlns", 5))
+    { if (soap->tmpbuf[5] == ':')
+      { soap->tmpbuf[5] = '\0';
+        t = soap->tmpbuf + 6;
+      }
+      else if (soap->tmpbuf[5])
+        t = NULL;
+      else
+        t = SOAP_STR_EOS;
+    }
+    else
+      t = NULL;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (!SOAP_STRCMP(tp->name, soap->tmpbuf))
+        break;
+    }
+    if (!tp)
+    { tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(soap->tmpbuf));
+      if (!tp)
+        return soap->error = SOAP_EOM;
+      strcpy(tp->name, soap->tmpbuf);
+      tp->value = NULL;
+      tp->size = 0;
+      tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    while (soap_blank(c))
+      c = soap_get1(soap);
+    if (c == '=')
+    { do c = soap_getutf8(soap);
+      while (soap_blank(c));
+      if (c != SOAP_QT && c != SOAP_AP)
+      { soap_unget(soap, c);
+        c = ' '; /* blank delimiter */
+      }
+      if (soap_getattrval(soap, tp->value, tp->size, c))
+      {
+#ifdef WITH_FAST
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+	if (soap_store_lab(soap, tp->value, tp->size))
+	  return soap->error;
+	if (tp->value)
+	  SOAP_FREE(soap, tp->value);
+	for (;;)
+	{ if (soap_getattrval(soap, soap->labbuf + soap->labidx, soap->lablen - soap->labidx, c))
+	  { if (soap->error != SOAP_EOM)
+	      return soap->error;
+            soap->error = SOAP_OK;
+	    soap->labidx = soap->lablen;
+	    if (soap_append_lab(soap, NULL, 0))
+	      return soap->error;
+	  }
+	  else
+	    break;
+	}
+	if (soap->labidx)
+          tp->size = soap->lablen;
+	else
+	{ tp->size = strlen(soap->labbuf) + 1;
+          if (tp->size < SOAP_LABLEN)
+	    tp->size = SOAP_LABLEN;
+        }
+	if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+	  return soap->error = SOAP_EOM;
+        strcpy(tp->value, soap->labbuf);
+#else
+	size_t n;
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+        if (soap_new_block(soap))
+          return soap->error;
+        for (;;)
+        { if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+            return soap->error;
+          if (soap_getattrval(soap, s, SOAP_BLKLEN, c))
+          { if (soap->error != SOAP_EOM)
+              return soap->error;
+            soap->error = SOAP_OK;
+          }
+          else
+            break;
+        }
+	n = tp->size + soap->blist->size;
+        if (!(s = (char*)SOAP_MALLOC(soap, n)))
+          return soap->error = SOAP_EOM;
+        if (tp->value)
+        { memcpy(s, tp->value, tp->size);
+          SOAP_FREE(soap, tp->value);
+        }
+        soap_save_block(soap, s + tp->size, 0);
+        tp->value = s;
+        tp->size = n;
+#endif
+      }
+      do c = soap_get1(soap);
+      while (soap_blank(c));
+      tp->visible = 2; /* seen this attribute w/ value */
+#ifdef WITH_DOM
+      if (att)
+        (*att)->data = soap_strdup(soap, tp->value);
+#endif
+    }
+    else
+      tp->visible = 1; /* seen this attribute w/o value */
+#ifdef WITH_DOM
+    if (att)
+      att = &(*att)->next;
+#endif
+    if (t && tp->value)
+    { if (soap_push_namespace(soap, t, tp->value))
+        return soap->error;
+      tp->visible = 0;
+    }
+  }
+#ifdef WITH_DOM
+  if (att)
+  { soap->dom->nstr = soap_current_namespace(soap, soap->tag);
+    for (att = &soap->dom->atts; *att; att = &(*att)->next)
+      (*att)->nstr = soap_current_namespace(soap, (*att)->name);
+  }
+#endif
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  if (!(soap->body = (c != '/')))
+    do c = soap_get1(soap);
+    while (soap_blank(c));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { if (!soap->body && soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible && tp->value)
+    { if (!strcmp(tp->name, "id"))
+      { *soap->id = '#';
+        strncpy(soap->id + 1, tp->value, sizeof(soap->id) - 2);
+        soap->id[sizeof(soap->id)-1] = '\0';
+      }
+      else if (!strcmp(tp->name, "href"))
+      { strncpy(soap->href, tp->value, sizeof(soap->href) - 1);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if ((soap->version == 2 || (soap->mode & SOAP_XML_GRAPH)) && !strcmp(tp->name, "ref"))
+      { *soap->href = '#';
+        strncpy(soap->href + 1, tp->value, sizeof(soap->href) - 2);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if (!soap_match_tag(soap, tp->name, "xsi:type"))
+      { strncpy(soap->type, tp->value, sizeof(soap->type) - 1);
+        soap->type[sizeof(soap->type)-1] = '\0';
+      }
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arrayType"))
+      { s = soap_strrchr(tp->value, '[');
+        if (s && (size_t)(s - tp->value) < sizeof(soap->arrayType))
+        { strncpy(soap->arrayType, tp->value, s - tp->value);
+          soap->arrayType[s - tp->value] = '\0';
+          strncpy(soap->arraySize, s, sizeof(soap->arraySize) - 1);
+        }
+        else
+          strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+        soap->arraySize[sizeof(soap->arrayType)-1] = '\0';
+        soap->arrayType[sizeof(soap->arrayType)-1] = '\0';
+      }
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:itemType"))
+        strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arraySize"))
+        strncpy(soap->arraySize, tp->value, sizeof(soap->arraySize) - 1);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:offset"))
+        strncpy(soap->arrayOffset, tp->value, sizeof(soap->arrayOffset));
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:position"))
+        soap->position = soap_getposition(tp->value, soap->positions);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:root"))
+        soap->root = ((!strcmp(tp->value, "1") || !strcmp(tp->value, "true")));
+      else if ((soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENV:actor"))
+            || (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENV:role")))
+      { if ((!soap->actor || strcmp(soap->actor, tp->value))
+         && strcmp(tp->value, "http://schemas.xmlsoap.org/soap/actor/next")
+         && strcmp(tp->value, "http://www.w3.org/2003/05/soap-envelope/role/next"))
+          soap->other = 1;
+      }
+      else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:mustUnderstand")
+            && (!strcmp(tp->value, "1") || !strcmp(tp->value, "true")))
+        soap->mustUnderstand = 1;
+      else if ((!soap_match_tag(soap, tp->name, "xsi:null")
+             || !soap_match_tag(soap, tp->name, "xsi:nil"))
+            && (!strcmp(tp->value, "1")
+             || !strcmp(tp->value, "true")))
+        soap->null = 1;
+    }
+  }
+  return soap->error = SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_retry(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_revert(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_revert(struct soap *soap)
+{ if (!soap->peeked)
+  { soap->peeked = 1;
+    if (soap->body)
+      soap->level--;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reverting last element (level=%u)\n", soap->level));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_string_out(struct soap *soap, const char *s, int flag)
+{ register const char *t;
+  register soap_wchar c;
+  register soap_wchar mask = 0xFFFFFF80UL;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_strdup(soap, s);
+    return SOAP_OK;
+  }
+#endif
+  if (soap->mode & SOAP_C_UTFSTRING)
+    mask = 0;
+  t = s;
+  while ((c = *t++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#x9;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xA;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 13:
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xD;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '&':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&amp;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '<':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&lt;", 4))
+        return soap->error;
+      s = t;
+      break;
+    case '>':
+      if (!flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&gt;", 4))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case '"':
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&quot;", 6))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    default:
+#ifndef WITH_LEANER
+#ifdef HAVE_MBTOWC
+      if (soap->mode & SOAP_C_MBSTRING)
+      { wchar_t wc;
+        register int m = mbtowc(&wc, t - 1, MB_CUR_MAX);
+        if (m > 0 && wc != c)
+        { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, wc))
+            return soap->error;
+	  s = t += m - 1;
+	  continue;
+        }
+      }
+#endif
+#endif
+      if (c & mask)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, (unsigned char)c))
+          return soap->error;
+        s = t;
+      }
+    }
+  }
+  return soap_send_raw(soap, s, t - s - 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_string_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ register char *s;
+  char *t = NULL;
+  register size_t i;
+  register long l = 0;
+  register int n = 0;
+  register int m = 0;
+  register soap_wchar c;
+#if !defined(WITH_LEANER) && defined(HAVE_WCTOMB)
+  char buf[MB_LEN_MAX > 8 ? MB_LEN_MAX : 8];
+#else
+  char buf[8];
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+#ifndef WITH_LEAN
+      t = soap->tmpbuf;
+      t[0] = '<';
+      strncpy(t + 1, soap->tag, sizeof(soap->tmpbuf) - 1);
+      strncat(t, ">", sizeof(soap->tmpbuf));
+      m = strlen(soap->tag) + 2;
+#endif
+    }
+  }
+#ifdef WITH_CDATA
+  if (!flag)
+  { register int state = 0;
+#ifdef WITH_FAST
+    soap->labidx = 0;			/* use look-aside buffer */
+#else
+    if (soap_new_block(soap))
+      return NULL;
+#endif
+    for (;;)
+    { 
+#ifdef WITH_FAST
+      register size_t k;
+      if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+        return NULL;
+      s = soap->labbuf + soap->labidx;	/* space to populate */
+      k = soap->lablen - soap->labidx;	/* number of bytes available */
+      soap->labidx = soap->lablen;	/* claim this space */
+#else
+      register size_t k = SOAP_BLKLEN;
+      if (!(s = (char*)soap_push_block(soap, k)))
+        return NULL;
+#endif
+      for (i = 0; i < k; i++)
+      { if (m > 0)
+        { *s++ = *t++;	/* copy multibyte characters */
+	  m--;
+          continue;
+        }
+        c = soap_getchar(soap);
+	if ((int)c == EOF)
+          goto end;
+        if (c >= 0x80 && !(soap->mode & SOAP_ENC_LATIN))
+        { soap_unget(soap, c);
+	  c = soap_getutf8(soap);
+	  if (soap->mode & SOAP_C_UTFSTRING)
+          { if ((c & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+            { c &= 0x7FFFFFFF;
+              t = buf;
+              if (c < 0x0800)
+                *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+              else
+              { if (c < 0x010000)
+                  *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+                else
+                { if (c < 0x200000)
+                    *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+                  else
+                  { if (c < 0x04000000)
+                      *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                    else
+                    { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                      *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                    }
+                    *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+                  }     
+                  *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+              }
+              *t++ = (char)(0x80 | (c & 0x3F));
+	      m = (int)(t - buf) - 1;
+              t = buf;
+              *s++ = *t++;
+              continue;
+	    }
+          }
+        }
+	switch (state)
+        { case 1:
+            if (c == ']')
+	      state = 4;
+	    *s++ = c;
+	    continue;
+	  case 2:
+	    if (c == '-')
+              state = 6;
+	    *s++ = c;
+	    continue;
+	  case 3:
+	    if (c == '?')
+	      state = 8;
+	    *s++ = c;
+	    continue;
+          /* CDATA */
+	  case 4:
+	    if (c == ']')
+              state = 5;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+	  case 5:
+	    if (c == '>')
+	      state = 0;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+          /* comment */
+          case 6:
+            if (c == '-')
+	      state = 7;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          case 7:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          /* PI */
+	  case 8:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 3;
+	    *s++ = c;
+	    continue;
+        }
+        switch (c)
+        {
+        case '/':
+          if (n > 0)
+          { c = soap_getchar(soap);
+            if (c == '>')
+              n--;
+            soap_unget(soap, c);
+          }
+          *s++ = '/';
+          break;
+        case '<':
+	  c = soap_getchar(soap);
+	  if (c == '/')
+	  { if (n == 0)
+	    { c = SOAP_TT;
+	      goto end;
+	    }
+	    n--;
+	  }
+	  else if (c == '!')
+	  { c = soap_getchar(soap);
+	    if (c == '[')
+            { do c = soap_getchar(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                 goto end;
+	      t = (char*)"![CDATA[";
+	      m = 8;
+	      state = 1;
+	    }
+            else if (c == '-')
+	    { if ((c = soap_getchar(soap)) == '-')
+	        state = 2;
+	      t = (char*)"!-";
+	      m = 2;
+	      soap_unget(soap, c);
+	    }
+	    else
+	    { t = (char*)"!";
+	      m = 1;
+	      soap_unget(soap, c);
+	    }
+	    *s++ = '<';
+	    break;
+	  }
+	  else if (c == '?')
+	    state = 3;
+	  else
+	    n++;
+          soap_unget(soap, c);
+          *s++ = '<';
+          break;
+        case '>':
+          *s++ = '>';
+          break;
+        case '"':
+          *s++ = '"';
+          break;
+        default:
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+          if (soap->mode & SOAP_C_MBSTRING)
+          { m = wctomb(buf, c & 0x7FFFFFFF);
+            if (m >= 1 && m <= (int)MB_CUR_MAX)
+            { t = buf;
+              *s++ = *t++;
+              m--;
+            }
+            else
+            { *s++ = SOAP_UNKNOWN_CHAR;
+	      m = 0;
+	    }
+          }
+          else
+#endif
+#endif
+            *s++ = (char)(c & 0xFF);
+        }
+	l++;
+        if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+        { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+          soap->error = SOAP_LENGTH;
+          return NULL;
+        }
+      }
+    }
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;			/* use look-aside buffer */
+#else
+  if (soap_new_block(soap))
+    return NULL;
+#endif
+  for (;;)
+  { 
+#ifdef WITH_FAST
+    register size_t k;
+    if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+      return NULL;
+    s = soap->labbuf + soap->labidx;	/* space to populate */
+    k = soap->lablen - soap->labidx;	/* number of bytes available */
+    soap->labidx = soap->lablen;	/* claim this space */
+#else
+    register size_t k = SOAP_BLKLEN;
+    if (!(s = (char*)soap_push_block(soap, k)))
+      return NULL;
+#endif
+    for (i = 0; i < k; i++)
+    { if (m > 0)
+      { *s++ = *t++;	/* copy multibyte characters */
+        m--;
+        continue;
+      }
+      if (soap->mode & SOAP_C_UTFSTRING)
+      { if (((c = soap_get(soap)) & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+        { c &= 0x7FFFFFFF;
+          t = buf;
+          if (c < 0x0800)
+            *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+          else
+          { if (c < 0x010000)
+              *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+            else
+            { if (c < 0x200000)
+                *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+              else
+              { if (c < 0x04000000)
+                  *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                else
+                { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                  *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+              }     
+              *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+            }
+            *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+          }
+          *t++ = (char)(0x80 | (c & 0x3F));
+	  m = (int)(t - buf) - 1;
+          t = buf;
+          *s++ = *t++;
+          continue;
+        }
+      }
+      else
+        c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        t = (char*)"/";
+	m = 1;
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_get(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<' | 0x80000000:
+        if (flag)
+          *s++ = '<';
+        else
+        { *s++ = '&';
+          t = (char*)"lt;";
+	  m = 3;
+        }
+        break;
+      case '>' | 0x80000000:
+        if (flag)
+          *s++ = '>';
+        else
+        { *s++ = '&';
+          t = (char*)"gt;";
+	  m = 3;
+        }
+        break;
+      case '&' | 0x80000000:
+        if (flag)
+          *s++ = '&';
+        else
+        { *s++ = '&';
+          t = (char*)"amp;";
+	  m = 4;
+        }
+        break;
+      case '"' | 0x80000000:
+        if (flag)
+          *s++ = '"';
+        else
+        { *s++ = '&';
+          t = (char*)"quot;";
+	  m = 5;
+        }
+        break;
+      case '\'' | 0x80000000:
+        if (flag)
+          *s++ = '\'';
+        else
+        { *s++ = '&';
+          t = (char*)"apos;";
+	  m = 5;
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+        if (soap->mode & SOAP_C_MBSTRING)
+        { m = wctomb(buf, c & 0x7FFFFFFF);
+          if (m >= 1 && m <= (int)MB_CUR_MAX)
+          { t = buf;
+            *s++ = *t++;
+            m--;
+          }
+          else
+          { *s++ = SOAP_UNKNOWN_CHAR;
+	    m = 0;
+	  }
+        }
+        else
+#endif
+#endif
+          *s++ = (char)(c & 0xFF);
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+#ifdef WITH_FAST
+  t = soap_strdup(soap, soap->labbuf);
+#else
+  soap_size_block(soap, i+1);
+  t = soap_save_block(soap, NULL, 0);
+#endif
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (flag == 3)
+      soap->dom->tail = t;
+    else
+      soap->dom->data = t;
+  }
+#endif
+  if (flag == 2)
+    if (soap_s2QName(soap, t, &t))
+      return NULL;
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_wstring_out(struct soap *soap, const wchar_t *s, int flag)
+{ const char *t;
+  char tmp;
+  register soap_wchar c;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { wchar_t *r = (wchar_t*)s;
+    int n = 1;
+    while (*r++)
+      n++;
+    soap->dom->wide = r = (wchar_t*)soap_malloc(soap, n * sizeof(wchar_t));
+    while (n--)
+      *r++ = *s++;
+    return SOAP_OK;
+  }
+#endif
+  while ((c = *s++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+        t = "&#x9;";
+      else
+        t = "\t";
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+        t = "&#xA;";
+      else
+        t = "\n";
+      break;
+    case 13:
+      t = "&#xD;";
+      break;
+    case '&':
+      t = "&amp;";
+      break;
+    case '<':
+      t = "&lt;";
+      break;
+    case '>':
+      if (flag)
+        t = ">";
+      else
+	t = "&gt;";
+      break;
+    case '"':
+      if (flag)
+        t = "&quot;";
+      else
+        t = "\"";
+      break;
+    default:
+      if (c > 0 && c < 0x80)
+      { tmp = (char)c;
+        if (soap_send_raw(soap, &tmp, 1))
+          return soap->error;
+      }
+      else if (soap_pututf8(soap, (unsigned long)c))
+        return soap->error;
+      continue;
+    }
+    if (soap_send(soap, t))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t *
+SOAP_FMAC2
+soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ wchar_t *s;
+  register int i, n = 0;
+  register long l = 0;
+  register soap_wchar c;
+  const char *t = NULL;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading wide string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+    }
+  }
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { if (!(s = (wchar_t*)soap_push_block(soap, sizeof(wchar_t)*SOAP_BLKLEN)))
+      return NULL;
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { if (t)
+      { *s++ = (wchar_t)*t++;
+        if (!*t)
+          t = NULL;
+        continue;
+      }
+      c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        soap_unget(soap, '/');
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_getutf8(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<':
+        if (flag)
+          *s++ = (soap_wchar)'<';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "lt;";
+        }
+        break;
+      case '>':
+        if (flag)
+          *s++ = (soap_wchar)'>';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "gt;";
+        }
+        break;
+      case '"':
+        if (flag)
+          *s++ = (soap_wchar)'"';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "quot;";
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+        *s++ = (wchar_t)c & 0x7FFFFFFF;
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+  soap_size_block(soap, sizeof(wchar_t) * (i + 1));
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+  s = (wchar_t*)soap_save_block(soap, NULL, 0);
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->wide = s;
+#endif
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_int2s(struct soap *soap, int n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outint(struct soap *soap, const char *tag, int id, const int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2int(struct soap *soap, const char *s, int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (int)soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int *
+SOAP_FMAC2
+soap_inint(struct soap *soap, const char *tag, int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (int*)soap_id_enter(soap, soap->id, p, t, sizeof(int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(int), 0, NULL);
+  else if (p)
+  { if (soap_s2int(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_long2s(struct soap *soap, long n)
+{ sprintf(soap->tmpbuf, "%ld", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outlong(struct soap *soap, const char *tag, int id, const long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2long(struct soap *soap, const char *s, long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+long *
+SOAP_FMAC2
+soap_inlong(struct soap *soap, const char *tag, long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (long*)soap_id_enter(soap, soap->id, p, t, sizeof(long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(long), 0, NULL);
+  else if (p)
+  { if (soap_s2long(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_LONG642s(struct soap *soap, LONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_LONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outLONG64(struct soap *soap, const char *tag, int id, const LONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_LONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2LONG64(struct soap *soap, const char *s, LONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOLL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoll(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_LONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+LONG64 *
+SOAP_FMAC2
+soap_inLONG64(struct soap *soap, const char *tag, LONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (LONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(LONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (LONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(LONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2LONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_byte2s(struct soap *soap, char n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outbyte(struct soap *soap, const char *tag, int id, const char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2byte(struct soap *soap, const char *s, char *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -128 || n > 127)
+      soap->error = SOAP_TYPE;
+    *p = (char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_inbyte(struct soap *soap, const char *tag, char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (char*)soap_id_enter(soap, soap->id, p, t, sizeof(char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(char), 0, NULL);
+  else if (p)
+  { if (soap_s2byte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_short2s(struct soap *soap, short n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outshort(struct soap *soap, const char *tag, int id, const short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2short(struct soap *soap, const char *s, short *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -32768 || n > 32767)
+      soap->error = SOAP_TYPE;
+    *p = (short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+short *
+SOAP_FMAC2
+soap_inshort(struct soap *soap, const char *tag, short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (short*)soap_id_enter(soap, soap->id, p, t, sizeof(short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(short), 0, NULL);
+  else if (p)
+  { if (soap_s2short(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_float2s(struct soap *soap, float n)
+{ const char *s;
+  if (soap_isnan((double)n))
+    s = "NaN";
+  else if (soap_ispinff(n))
+    s = "INF";
+  else if (soap_isninff(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->float_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outfloat(struct soap *soap, const char *tag, int id, const float *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_float2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2float(struct soap *soap, const char *s, float *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = FLT_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = FLT_NAN;
+    else
+    {
+/* On some systems, strtof appears to be broken or doesn't link: use with caution */
+#if defined(HAVE_STRTOF)
+      char *r;
+      *p = strtof((char*)s, &r);
+      if (*r)
+#elif defined(HAVE_STRTOD)
+      char *r;
+      *p = (float)strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%g", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static int soap_isnumeric(struct soap *soap, const char *type)
+{ if (soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":float")
+   && soap_match_tag(soap, soap->type, ":double")
+   && soap_match_tag(soap, soap->type, ":decimal")
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return SOAP_ERR;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+float *
+SOAP_FMAC2
+soap_infloat(struct soap *soap, const char *tag, float *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (float*)soap_id_enter(soap, soap->id, p, t, sizeof(float), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (float*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(float), 0, NULL);
+  else if (p)
+  { if (soap_s2float(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_double2s(struct soap *soap, double n)
+{ const char *s;
+  if (soap_isnan(n))
+    s = "NaN";
+  else if (soap_ispinfd(n))
+    s = "INF";
+  else if (soap_isninfd(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->double_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdouble(struct soap *soap, const char *tag, int id, const double *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_double2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2double(struct soap *soap, const char *s, double *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = DBL_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = DBL_NAN;
+    else
+    {
+#ifdef HAVE_STRTOD
+      char *r;
+      *p = strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%lg", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+double *
+SOAP_FMAC2
+soap_indouble(struct soap *soap, const char *tag, double *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (double*)soap_id_enter(soap, soap->id, p, t, sizeof(double), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (double*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(double), 0, NULL);
+  else if (p)
+  { if (soap_s2double(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedByte2s(struct soap *soap, unsigned char n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedByte(struct soap *soap, const char *tag, int id, const unsigned char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedByte(struct soap *soap, const char *s, unsigned char *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 255)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned char *
+SOAP_FMAC2
+soap_inunsignedByte(struct soap *soap, const char *tag, unsigned char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned char*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned char), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedByte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedShort2s(struct soap *soap, unsigned short n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedShort(struct soap *soap, const char *tag, int id, const unsigned short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedShort(struct soap *soap, const char *s, unsigned short *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 65535)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned short *
+SOAP_FMAC2
+soap_inunsignedShort(struct soap *soap, const char *tag, unsigned short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned short*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned short), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedShort(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedInt2s(struct soap *soap, unsigned int n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedInt(struct soap *soap, const char *tag, int id, const unsigned int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedInt(struct soap *soap, const char *s, unsigned int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (unsigned int)soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned int *
+SOAP_FMAC2
+soap_inunsignedInt(struct soap *soap, const char *tag, unsigned int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned int*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned int), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedInt(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedLong2s(struct soap *soap, unsigned long n)
+{ sprintf(soap->tmpbuf, "%lu", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedLong(struct soap *soap, const char *tag, int id, const unsigned long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedLong(struct soap *soap, const char *s, unsigned long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned long *
+SOAP_FMAC2
+soap_inunsignedLong(struct soap *soap, const char *tag, unsigned long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned long*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned long), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedLong(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_ULONG642s(struct soap *soap, ULONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_ULONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outULONG64(struct soap *soap, const char *tag, int id, const ULONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_ULONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2ULONG64(struct soap *soap, const char *s, ULONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOULL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoull(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_ULONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+ULONG64 *
+SOAP_FMAC2
+soap_inULONG64(struct soap *soap, const char *tag, ULONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (ULONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(ULONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (ULONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(ULONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2ULONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2string(struct soap *soap, const char *s, char **t)
+{ *t = NULL;
+  if (s)
+  { if (!(*t = soap_strdup(soap, s)))
+      return soap->error = SOAP_EOM;
+    if (!(soap->mode & (SOAP_ENC_LATIN | SOAP_C_UTFSTRING)))
+    { /* TODO: consider truncating UTF8 to ASCII for regular XML attribute strings? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2QName(struct soap *soap, const char *s, char **t)
+{ if (s)
+  { struct soap_nlist *np;
+    const char *p;
+    if (!strncmp(s, "xml:", 4))
+    { *t = soap_strdup(soap, s);
+      return SOAP_OK;
+    }
+    np = soap->nlist;
+    p = strchr(s, ':');
+    if (p)
+    { register int n = p - s;
+      while (np && (strncmp(np->id, s, n) || np->id[n]))
+        np = np->next;
+      p++;
+    }
+    else
+    { while (np && *np->id)
+        np = np->next;
+      p = s;
+    }
+    if (np)
+    { if (np->index >= 0 && soap->local_namespaces)
+      { register const char *q = soap->local_namespaces[np->index].id;
+        if (q)
+        { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(q) + 2)))
+            sprintf(*t, "%s:%s", q, p);
+          return SOAP_OK;
+        }
+      }
+      if (np->ns)
+      { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(np->ns) + 4)))
+          sprintf(*t, "\"%s\":%s", np->ns, p);
+        return SOAP_OK;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined (index=%d, URI=%s)\n", s, np->index, np->ns?np->ns:""));
+      return soap->error = SOAP_NAMESPACE; 
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined, assuming empty namespace\n", s));
+    if ((*t = (char*)soap_malloc(soap, strlen(p) + 4)))
+      sprintf(*t, "\"\":%s", p);
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_QName2s(struct soap *soap, const char *s)
+{ struct Namespace *p;
+  char *t;
+  int n;
+  if (!s || *s != '"')
+  {
+#ifndef WITH_LEAN
+    if (s && (soap->mode & SOAP_XML_CANONICAL))
+    { t = (char*)strchr(s, ':');
+      if (t)
+        soap_utilize_ns(soap, s, t - s);
+    }
+#endif
+    return s;
+  }
+  s++;
+  if ((p = soap->local_namespaces))
+  { for (; p->id; p++)
+    { if (p->ns)
+        if (!soap_tag_cmp(s, p->ns))
+          break;
+      if (p->in)
+        if (!soap_tag_cmp(s, p->in))
+          break;
+    }
+    if (p && p->id)
+    { s = strchr(s, '"');
+      if (s)
+      { t = (char*)soap_malloc(soap, strlen(p->id) + strlen(s));
+        strcpy(t, p->id);
+	strcat(t, s + 1);
+        return t;
+      }
+    }
+  }
+  t = (char*)strchr(s, '"');
+  if (t)
+    n = t - s;
+  else
+    n = 0;
+  t = soap_strdup(soap, s);
+  t[n] = '\0';
+  sprintf(soap->tmpbuf, "xmlns:_%d", soap->idnum++);
+  soap_set_attr(soap, soap->tmpbuf, t);
+  s = strchr(s, '"');
+  if (s)
+  { t = (char*)soap_malloc(soap, strlen(soap->tmpbuf) + strlen(s) - 6);
+    strcpy(t, soap->tmpbuf + 6);
+    strcat(t, s + 1);
+  }
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2wchar(struct soap *soap, const char *s, wchar_t **t)
+{ wchar_t *r;
+  if (!s)
+    *t = NULL;
+  else
+  { *t = r = (wchar_t*)soap_malloc(soap, sizeof(wchar_t) * (strlen(s) + 1));
+    if (!r)
+      return soap->error;
+    if (soap->mode & SOAP_ENC_LATIN)
+    { while (*s)
+        *r++ = (wchar_t)*s++;
+    }
+    else
+    { /* Convert UTF8 to wchar */
+      while (*s)
+      { register soap_wchar c, c1, c2, c3, c4;
+        c = *s++;
+        if (c < 0x80)
+	  *r++ = (wchar_t)c;
+	else
+        { c1 = (soap_wchar)*s++ & 0x3F;
+          if (c < 0xE0)
+            *r++ = (wchar_t)(((soap_wchar)(c & 0x1F) << 6) | c1);
+          else
+	  { c2 = (soap_wchar)*s++ & 0x3F;
+            if (c < 0xF0)
+              *r++ = (wchar_t)(((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2);
+            else
+	    { c3 = (soap_wchar)*s++ & 0x3F;
+              if (c < 0xF8)
+                *r++ = (wchar_t)(((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3);
+              else
+	      { c4 = (soap_wchar)*s++ & 0x3F;
+                if (c < 0xFC)
+                  *r++ = (wchar_t)(((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4);
+                else
+		  *r++ = (wchar_t)(((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(*s++ & 0x3F));
+              }
+            }
+          }
+        }
+      }
+    }
+    *r = L'\0';
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_wchar2s(struct soap *soap, const wchar_t *s)
+{ register soap_wchar c;
+  register char *r, *t;
+  const wchar_t *q = s;
+  size_t n = 0;
+  while ((c = *q++))
+  { if (c > 0 && c < 0x80)
+      n++;
+    else
+      n += 6;
+  }
+  r = t = (char*)soap_malloc(soap, n + 1);
+  if (r)
+  { /* Convert wchar to UTF8 */
+    while ((c = *s++))
+    { if (c > 0 && c < 0x80)
+        *t++ = (char)c;
+      else
+      { if (c < 0x0800)
+          *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+        else
+        { if (c < 0x010000)
+            *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+          else
+          { if (c < 0x200000)
+              *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+            else
+            { if (c < 0x04000000)
+                *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+              else
+              { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+              }
+              *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+            }     
+            *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+        }
+        *t++ = (char)(0x80 | (c & 0x3F));
+      }
+    }
+    *t = '\0';
+  }
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outstring(struct soap *soap, const char *tag, int id, char *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_string_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_instring(struct soap *soap, const char *tag, char **p, const char *type, int t, int flag, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_string_in(soap, flag, minlen, maxlen);
+    if (!*p || !(char*)soap_id_enter(soap, soap->id, *p, t, sizeof(char*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (char**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(char**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwstring(struct soap *soap, const char *tag, int id, wchar_t *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_wstring_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type, int t, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_wstring_in(soap, 1, minlen, maxlen);
+    if (!*p || !(wchar_t*)soap_id_enter(soap, soap->id, *p, t, sizeof(wchar_t*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (wchar_t**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(wchar_t**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static time_t
+soap_timegm(struct tm *T)
+{
+#if defined(HAVE_TIMEGM)
+  return timegm(T);
+#else
+  time_t t, g, z;
+#ifdef HAVE_GMTIME_R
+  struct tm tm, *tmp = &tm;
+#else
+  struct tm *tmp;
+#endif
+  t = mktime(T);
+  if (t == -1)
+    return -1;
+#ifdef HAVE_GMTIME_R
+  gmtime_r(&t, tmp);
+#else
+  tmp = gmtime(&t);
+#endif
+  tmp->tm_isdst = 0;
+  g = mktime(tmp);
+  if (g == -1)
+    return -1;
+  z = g - t;
+  return t - z;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_dateTime2s(struct soap *soap, time_t n)
+{ struct tm T, *pT = &T;
+#if defined(HAVE_GMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PGMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_PGMTIME)
+  if (gmtime(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GMTIME)
+  if ((pT = gmtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GETTIMEOFDAY)
+  struct timezone tz;
+  memset((void*)&tz, 0, sizeof(tz));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+#endif
+#elif defined(HAVE_FTIME)
+  struct timeb t;
+  memset((void*)&t, 0, sizeof(t));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+  /* The following defines were added for VxWorks*/
+# elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf+strlen(soap->tmpbuf), "%+03d:%02d", t.timezone/60, abs(t.timezone)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+# endif
+#elif defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#else
+  if ((pT = localtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#endif
+  else
+    strcpy(soap->tmpbuf, "1969-12-31T23:59:59Z");
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdateTime(struct soap *soap, const char *tag, int id, const time_t *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_dateTime2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2dateTime(struct soap *soap, const char *s, time_t *p)
+{ if (s)
+  { struct tm T;
+    char zone[16];
+    const char *t;
+    memset((void*)&T, 0, sizeof(T));
+    zone[sizeof(zone)-1] = '\0';
+    if (strchr(s, '-'))
+      t = "%d-%d-%dT%d:%d:%d%15s";
+    else if (strchr(s, ':'))
+      t = "%4d%2d%2dT%d:%d:%d%15s";
+    else /* parse non-XSD-standard alternative ISO 8601 format */
+      t = "%4d%2d%2dT%2d%2d%2d%15s";
+    sscanf(s, t, &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, zone);
+    if (T.tm_year == 1)
+      T.tm_year = 70;
+    else
+      T.tm_year -= 1900;
+    T.tm_mon--;
+    if (*zone)
+    { if (*zone == '.')
+      { for (s = zone + 1; *s; s++)
+          if (*s < '0' || *s > '9')
+            break;
+      }
+      else
+        s = zone;
+      if (*s == '+' || *s == '-')
+      { int h = 0, m = 0;
+        if (s[3] == ':')
+	{ sscanf(s, "%d:%d", &h, &m);
+	  if (h < 0)
+	    m = -m;
+	}
+	else
+	{ m = (int)atol(s);
+	  h = m / 100;
+	  m = m % 100;
+	}
+        T.tm_hour -= h;
+        T.tm_min -= m;
+      }
+      T.tm_isdst = 0;
+      *p = soap_timegm(&T);
+    }
+    else
+    { T.tm_isdst = -1;
+      *p = mktime(&T); /* no time zone: suppose it is localtime? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+time_t *
+SOAP_FMAC2
+soap_indateTime(struct soap *soap, const char *tag, time_t *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":dateTime"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (time_t*)soap_id_enter(soap, soap->id, p, t, sizeof(time_t), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (time_t*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(time_t), 0, NULL);
+  else if (p)
+  { if (soap_s2dateTime(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outliteral(struct soap *soap, const char *tag, char *const*p)
+{ int i;
+  const char *t = NULL;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p && *p)
+  { if (soap_send(soap, *p))
+      return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_inliteral(struct soap *soap, const char *tag, char **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_string_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwliteral(struct soap *soap, const char *tag, wchar_t *const*p)
+{ int i;
+  const char *t = NULL;
+  wchar_t c;
+  const wchar_t *s;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p)
+  { s = *p;
+    while ((c = *s++))
+      if (soap_pututf8(soap, (unsigned char)c))
+        return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwliteral(struct soap *soap, const char *tag, wchar_t **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_wstring_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_token(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF || soap_blank(c))
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_value(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  for (s--; i > 0; i--, s--)
+    if (!soap_blank(*s))
+      break;
+  s[1] = '\0';
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->data = soap_strdup(soap, soap->tmpbuf);
+#endif
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEANER) || !defined(WITH_NOHTTP)
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getline(struct soap *soap, char *s, int len)
+{ int i = len;
+  soap_wchar c = 0;
+  for (;;)
+  { while (--i > 0)
+    { c = soap_getchar(soap);
+      if (c == '\r' || c == '\n')
+        break;
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+    if (c != '\n')
+      c = soap_getchar(soap); /* got \r, now get \n */
+    if (c == '\n')
+    { *s = '\0';
+      if (i+1 == len) /* empty line: end of HTTP/MIME header */
+        break;
+      c = soap_unget(soap, soap_getchar(soap));
+      if (c != ' ' && c != '\t') /* HTTP line continuation? */
+        break;
+    }
+    else if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static size_t
+soap_count_attachments(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  register struct soap_multipart *content;
+  register size_t count = soap->count;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the message size with attachments, current count=%lu\n", (unsigned long)count));
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of DIME attachments\n"));
+    for (content = soap->dime.first; content; content = content->next)
+    { count += 12 + ((content->size+3)&(~3));
+      if (content->id)
+        count += ((strlen(content->id)+3)&(~3));
+      if (content->type)
+        count += ((strlen(content->type)+3)&(~3));
+      if (content->options)
+        count += ((((unsigned char)content->options[2] << 8) | ((unsigned char)content->options[3]))+7)&(~3);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of DIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary)
+  { register size_t n = strlen(soap->mime.boundary);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of MIME attachments\n"));
+    for (content = soap->mime.first; content; content = content->next)
+    { register const char *s;
+      /* count \r\n--boundary\r\n */
+      count += 6 + n;
+      /* count Content-Type: ...\r\n */
+      if (content->type)
+        count += 16 + strlen(content->type);
+      /* count Content-Transfer-Encoding: ...\r\n */
+      s = soap_str_code(mime_codes, content->encoding);
+      if (s)
+        count += 29 + strlen(s);
+      /* count Content-ID: ...\r\n */
+      if (content->id)
+        count += 14 + strlen(content->id);
+      /* count Content-Location: ...\r\n */
+      if (content->location)
+        count += 20 + strlen(content->location);
+      /* count Content-Description: ...\r\n */
+      if (content->description)
+        count += 23 + strlen(content->location);
+      /* count \r\n...content */
+      count += 2 + content->size;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of MIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+    /* count \r\n--boundary-- */
+    count += 6 + n;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New count is %lu bytes\n", (unsigned long)count));
+  return count;
+#else
+  return soap->count;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_putdimefield(struct soap *soap, const char *s, size_t n)
+{ if (soap_send_raw(soap, s, n))
+    return soap->error;
+  return soap_send_raw(soap, SOAP_STR_PADDING, -(long)n&3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_dime_option(struct soap *soap, unsigned short optype, const char *option)
+{ size_t n;
+  char *s = NULL;
+  if (option)
+  { n = strlen(option);
+    s = (char*)soap_malloc(soap, n + 5);
+    if (s)
+    { s[0] = optype >> 8;
+      s[1] = optype & 0xFF;
+      s[2] = n >> 8;
+      s[3] = n & 0xFF;
+      strcpy(s + 4, option);
+    }
+  }
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdimehdr(struct soap *soap)
+{ unsigned char tmp[12];
+  size_t optlen = 0, idlen = 0, typelen = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Put DIME header id='%s'\n", soap->dime.id?soap->dime.id:""));
+  if (soap->dime.options)
+    optlen = (((unsigned char)soap->dime.options[2] << 8) | ((unsigned char)soap->dime.options[3])) + 4;
+  if (soap->dime.id)
+    idlen = strlen(soap->dime.id);
+  if (soap->dime.type)
+    typelen = strlen(soap->dime.type);
+  tmp[0] = SOAP_DIME_VERSION | (soap->dime.flags & 0x7);
+  tmp[1] = soap->dime.flags & 0xF0;
+  tmp[2] = optlen >> 8;
+  tmp[3] = optlen & 0xFF;
+  tmp[4] = idlen >> 8;
+  tmp[5] = idlen & 0xFF;
+  tmp[6] = typelen >> 8;
+  tmp[7] = typelen & 0xFF;
+  tmp[8] = soap->dime.size >> 24;
+  tmp[9] = (soap->dime.size >> 16) & 0xFF;
+  tmp[10] = (soap->dime.size >> 8) & 0xFF;
+  tmp[11] = soap->dime.size & 0xFF;
+  if (soap_send_raw(soap, (char*)tmp, 12)
+   || soap_putdimefield(soap, soap->dime.options, optlen)
+   || soap_putdimefield(soap, soap->dime.id, idlen)
+   || soap_putdimefield(soap, soap->dime.type, typelen))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return SOAP_OK;
+  for (content = soap->dime.first; content; content = content->next)
+  { void *handle;
+    soap->dime.size = content->size;
+    soap->dime.id = content->id;
+    soap->dime.type = content->type;
+    soap->dime.options = content->options;
+    soap->dime.flags = SOAP_DIME_VERSION | SOAP_DIME_MEDIA;
+    if (soap->fdimereadopen && ((handle = soap->fdimereadopen(soap, (void*)content->ptr, content->id, content->type, content->options)) || soap->error))
+    { size_t size = content->size;
+      if (!handle)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadopen failed\n"));
+        return soap->error;
+      }
+      if (!content->size && ((soap->mode & SOAP_ENC_XML) || (soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_IO) == SOAP_IO_STORE))
+      { size_t chunksize = sizeof(soap->tmpbuf);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked streaming DIME\n"));
+        do 
+        { size = soap->fdimeread(soap, handle, soap->tmpbuf, chunksize);
+          DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread returned %lu bytes\n", (unsigned long)size));
+          if (size < chunksize)
+ 	  { soap->dime.flags &= ~SOAP_DIME_CF;
+            if (!content->next)
+              soap->dime.flags |= SOAP_DIME_ME;
+	  }
+          else
+            soap->dime.flags |= SOAP_DIME_CF;
+	  soap->dime.size = size;
+          if (soap_putdimehdr(soap)
+	   || soap_putdimefield(soap, soap->tmpbuf, size))
+            break;
+          if (soap->dime.id)
+ 	  { soap->dime.flags &= ~(SOAP_DIME_MB | SOAP_DIME_MEDIA);
+            soap->dime.id = NULL;
+            soap->dime.type = NULL;
+            soap->dime.options = NULL;
+          }  
+        } while (size >= chunksize);
+      }
+      else
+      { if (!content->next)
+          soap->dime.flags |= SOAP_DIME_ME;
+        if (soap_putdimehdr(soap))
+          return soap->error;
+        do
+        { size_t bufsize;
+	  if (size < sizeof(soap->tmpbuf))
+            bufsize = size;
+          else
+            bufsize = sizeof(soap->tmpbuf);
+          if (!(bufsize = soap->fdimeread(soap, handle, soap->tmpbuf, bufsize)))
+          { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread failed: insufficient data (%lu bytes remaining from %lu bytes)\n", (unsigned long)size, (unsigned long)soap->dime.size));
+            soap->error = SOAP_EOF;
+	    break;
+          }
+          if (soap_send_raw(soap, soap->tmpbuf, bufsize))
+            break;
+          size -= bufsize;
+        } while (size);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+        soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+      if (soap->fdimereadclose)
+        soap->fdimereadclose(soap, handle);
+    }
+    else
+    { if (!content->next)
+        soap->dime.flags |= SOAP_DIME_ME;
+      if (soap_putdimehdr(soap)
+       || soap_putdimefield(soap, (char*)content->ptr, content->size))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static char *
+soap_getdimefield(struct soap *soap, size_t n)
+{ register soap_wchar c;
+  register int i;
+  register char *s;
+  char *p = NULL;
+  if (n)
+  { p = (char*)soap_malloc(soap, n + 1);
+    if (p)
+    { s = p;
+      for (i = n; i > 0; i--)
+      { if ((int)(c = soap_get1(soap)) == EOF)
+        { soap->error = SOAP_EOF;
+          return NULL;
+        }
+        *s++ = (char)c;
+      }
+      *s = '\0';
+      if ((soap->error = soap_move(soap, -(long)n&3)))
+        return NULL;
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdimehdr(struct soap *soap)
+{ register soap_wchar c;
+  register char *s;
+  register int i;
+  unsigned char tmp[12];
+  size_t optlen, idlen, typelen;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return soap->error = SOAP_DIME_END;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME header\n"));
+  if (soap->dime.buflen || soap->dime.chunksize)
+  { if (soap_move(soap, (long)(soap->dime.size - soap_tell(soap))))
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, soap_getchar(soap)); /* skip padding and get hdr */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... From chunked\n"));
+    return SOAP_OK;
+  }
+  s = (char*)tmp;
+  for (i = 12; i > 0; i--)
+  { if ((int)(c = soap_getchar(soap)) == EOF)
+      return soap->error = SOAP_EOF;
+    *s++ = (char)c;
+  }
+  if ((tmp[0] & 0xF8) != SOAP_DIME_VERSION)
+    return soap->error = SOAP_DIME_MISMATCH;
+  soap->dime.flags = (tmp[0] & 0x7) | (tmp[1] & 0xF0);
+  optlen = (tmp[2] << 8) | tmp[3];
+  idlen = (tmp[4] << 8) | tmp[5];
+  typelen = (tmp[6] << 8) | tmp[7];
+  soap->dime.size = (tmp[8] << 24) | (tmp[9] << 16) | (tmp[10] << 8) | tmp[11];
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME size=%lu flags=0x%X\n", (unsigned long)soap->dime.size, soap->dime.flags));
+  if (!(soap->dime.options = soap_getdimefield(soap, optlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.id = soap_getdimefield(soap, idlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.type = soap_getdimefield(soap, typelen)) && soap->error)
+    return soap->error;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME id=%s, type=%s, options=%s\n", soap->dime.id?soap->dime.id:"", soap->dime.type?soap->dime.type:"", soap->dime.options?soap->dime.options+4:""));
+  if (soap->dime.flags & SOAP_DIME_ME)
+    soap->mode &= ~SOAP_ENC_DIME;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdime(struct soap *soap)
+{ while (soap->dime.flags & SOAP_DIME_CF)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap_move(soap, soap->dime.size))
+      return soap->error = SOAP_EOF;
+  }
+  if (soap_move(soap, ((soap->dime.size+3)&(~3))-soap_tell(soap)))
+    return soap->error = SOAP_EOF;
+  for (;;)
+  { register struct soap_multipart *content;
+    if (soap_getdimehdr(soap))
+      break;
+    if (soap->fdimewriteopen && ((soap->dime.ptr = (char*)soap->fdimewriteopen(soap, soap->dime.id, soap->dime.type, soap->dime.options)) || soap->error))
+    { const char *id, *type, *options;
+      size_t size, n;
+      if (!soap->dime.ptr)
+        return soap->error;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      for (;;)
+      { size = soap->dime.size;
+        for (;;)
+        { n = soap->buflen - soap->bufidx;
+          if (size < n)
+            n = size;
+          if ((soap->error = soap->fdimewrite(soap, (void*)soap->dime.ptr, soap->buf + soap->bufidx, n)))
+            break;
+	  size -= n;
+	  if (!size)
+	  { soap->bufidx += n;
+	    break;
+	  }
+	  if (soap_recv(soap))
+          { soap->error = SOAP_EOF;
+	    goto end;
+          }
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+        { soap->error = SOAP_EOF;
+	  break;
+        }
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          break;
+      }
+end:
+      if (soap->fdimewriteclose)
+        soap->fdimewriteclose(soap, (void*)soap->dime.ptr);
+      soap->dime.size = 0;
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else if (soap->dime.flags & SOAP_DIME_CF)
+    { const char *id, *type, *options;
+      register soap_wchar c;
+      register char *s;
+      register int i;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      if (soap_new_block(soap))
+        return SOAP_EOM;
+      for (;;)
+      { s = (char*)soap_push_block(soap, soap->dime.size);
+        if (!s)
+          return soap->error = SOAP_EOM;
+        for (i = soap->dime.size; i > 0; i--)
+        { if ((int)(c = soap_get1(soap)) == EOF)
+            return soap->error = SOAP_EOF;
+          *s++ = (char)c;
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+          return soap->error = SOAP_EOF;
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          return soap->error;
+      }
+      soap->dime.size = soap->blist->size++; /* allocate one more for '\0' */
+      if (!(soap->dime.ptr = soap_save_block(soap, NULL, 0)))
+        return soap->error;
+      soap->dime.ptr[soap->dime.size] = '\0'; /* force 0-terminated */
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else
+      soap->dime.ptr = soap_getdimefield(soap, soap->dime.size);
+    content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, soap->dime.ptr, soap->dime.size);
+    if (!content)
+      return soap->error = SOAP_EOM;
+    content->id = soap->dime.id;
+    content->type = soap->dime.type;
+    content->options = soap->dime.options;
+    soap_resolve_attachment(soap, content);
+    if (soap->error)
+      return soap->error;
+  }
+  if (soap->error != SOAP_DIME_END)
+    return soap->error;
+  return soap->error = SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmimehdr(struct soap *soap)
+{ struct soap_multipart *content;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  while (!*soap->msgbuf);
+  if (soap->msgbuf[0] == '-' && soap->msgbuf[1] == '-')
+  { char *s = soap->msgbuf + strlen(soap->msgbuf) - 1;
+    /* remove white space */
+    while (soap_blank(*s))
+      s--;
+    s[1] = '\0';
+    if (soap->mime.boundary)
+    { if (strcmp(soap->msgbuf + 2, soap->mime.boundary))
+        return soap->error = SOAP_MIME_ERROR;
+    }
+    else
+      soap->mime.boundary = soap_strdup(soap, soap->msgbuf + 2);
+    if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  if (soap_set_mime_attachment(soap, NULL, 0, SOAP_MIME_NONE, NULL, NULL, NULL, NULL))
+    return soap->error = SOAP_EOM;
+  content = soap->mime.last;
+  for (;;)
+  { register char *key = soap->msgbuf;
+    register char *val;
+    if (!*key)
+      break;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "MIME header: %s\n", key));
+    val = strchr(soap->msgbuf, ':');
+    if (val)
+    { *val = '\0';
+      do val++;
+      while (*val && *val <= 32);
+      if (!soap_tag_cmp(key, "Content-ID"))
+        content->id = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Location"))
+        content->location = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Disposition"))
+        content->id = soap_strdup(soap, soap_get_header_attribute(soap, val, "name"));
+      else if (!soap_tag_cmp(key, "Content-Type"))
+        content->type = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Description"))
+        content->description = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Transfer-Encoding"))
+        content->encoding = (enum soap_mime_encoding)soap_int_code(mime_codes, val, (long)SOAP_MIME_NONE);
+    }
+    if (soap_getline(soap, key, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmime(struct soap *soap)
+{ register soap_wchar c = 0;
+  if (!soap->mime.last)
+    return SOAP_OK;
+  for (;;)
+  { register size_t i, m = 0;
+    register char *s, *t = NULL;
+    struct soap_multipart *content = soap->mime.last;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Parsing MIME content id=%s type=%s\n", content->id?content->id:"", content->type?content->type:""));
+    if (soap_new_block(soap))
+      return soap->error = SOAP_EOM;
+    for (;;)
+    { register short flag = 0;
+      if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+        return soap->error = SOAP_EOM;
+      for (i = 0; i < SOAP_BLKLEN; i++)
+      { if (m > 0)
+        { *s++ = *t++;
+	  m--;
+	}
+	else
+        { if (!flag)
+	  { c = soap_get1(soap);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	  }
+	  if (flag || c == '\r')
+	  { t = soap->tmpbuf;
+	    memset(t, 0, sizeof(soap->tmpbuf));
+            strcpy(t, "\n--");
+            if (soap->mime.boundary)
+	      strncat(t, soap->mime.boundary, sizeof(soap->tmpbuf)-4);
+	    do c = soap_getchar(soap);
+	    while (c == *t++);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	    if (!*--t)
+	      goto end;
+	    *t = (char)c;
+	    flag = (c == '\r');
+	    m = t - soap->tmpbuf + 1 - flag;
+	    t = soap->tmpbuf;
+	    c = '\r';
+	  }
+	  *s++ = (char)c;
+        }
+      }
+    }
+end:
+    *s = '\0'; /* force 0-terminated */
+    content->size = soap_size_block(soap, i+1)-1;
+    content->ptr = soap_save_block(soap, NULL, 0);
+    soap_resolve_attachment(soap, content);
+    if (c == '-' && soap_getchar(soap) == '-')
+      break;
+    while (c != '\r' && (int)c != EOF && soap_blank(c))
+      c = soap_getchar(soap);
+    if (c != '\r' || soap_getchar(soap) != '\n')
+      return soap->error = SOAP_MIME_ERROR;
+    if (soap_getmimehdr(soap))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_match_cid(struct soap *soap, const char *s, const char *t)
+{ register size_t n;
+  if (!s)
+    return 1;
+  if (!strcmp(s, t))
+    return 0;
+  if (!strncmp(s, "cid:", 4))
+    s += 4;
+  n = strlen(t);
+  if (*t == '<')
+  { t++;
+    n -= 2;
+  }
+  if (!strncmp(s, t, n) && !s[n])
+    return 0;
+  soap_decode(soap->tmpbuf, sizeof(soap->tmpbuf), s, SOAP_STR_EOS);
+  if (!strncmp(soap->tmpbuf, t, n) && !soap->tmpbuf[n])
+    return 0;
+  return 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_resolve_attachment(struct soap *soap, struct soap_multipart *content)
+{ if (content->id)
+  { register struct soap_xlist **xp = &soap->xlist;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving attachment data for id=%s\n", content->id));
+    while (*xp)
+    { register struct soap_xlist *xq = *xp;
+      if (!soap_match_cid(soap, xq->id, content->id))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Found matching attachment %s for content id=%s\n", xq->id, content->id));
+	*xp = xq->next;
+        *xq->ptr = (unsigned char*)content->ptr;
+        *xq->size = (int)content->size;
+        *xq->type = (char*)content->type;
+	if (content->options)
+          *xq->options = (char*)content->options;
+        else
+          *xq->options = (char*)content->description;
+	SOAP_FREE(soap, xq);
+      }
+      else
+        xp = &(*xp)->next;
+    }
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmimehdr(struct soap *soap, struct soap_multipart *content)
+{ const char *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "MIME attachment type=%s\n", content->type?content->type:""));
+  if (soap_send3(soap, "\r\n--", soap->mime.boundary, "\r\n"))
+    return soap->error;
+  if (content->type && soap_send3(soap, "Content-Type: ", content->type, "\r\n"))
+    return soap->error;
+  s = soap_str_code(mime_codes, content->encoding);
+  if (s && soap_send3(soap, "Content-Transfer-Encoding: ", s, "\r\n"))
+    return soap->error;
+  if (content->id && soap_send3(soap, "Content-ID: ", content->id, "\r\n"))
+    return soap->error;
+  if (content->location && soap_send3(soap, "Content-Location: ", content->location, "\r\n"))
+    return soap->error;
+  if (content->description && soap_send3(soap, "Content-Description: ", content->description, "\r\n"))
+    return soap->error;
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_MIME) || !soap->mime.boundary)
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending MIME attachments\n"));
+  for (content = soap->mime.first; content; content = content->next)
+    if (soap_putmimehdr(soap, content)
+     || soap_send_raw(soap, content->ptr, content->size))
+      return soap->error;
+  return soap_send3(soap, "\r\n--", soap->mime.boundary, "--");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_dime(struct soap *soap)
+{ soap->omode |= SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_mime(struct soap *soap, const char *boundary, const char *start)
+{ soap->omode |= SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = soap_strdup(soap, boundary);
+  soap->mime.start = soap_strdup(soap, start);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_dime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_mime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart*
+soap_new_multipart(struct soap *soap, struct soap_multipart **first, struct soap_multipart **last, char *ptr, size_t size)
+{ struct soap_multipart *content;
+  content = (struct soap_multipart*)soap_malloc(soap, sizeof(struct soap_multipart));
+  if (content)
+  { content->next = NULL;
+    content->ptr = ptr;
+    content->size = size;
+    content->id = NULL;
+    content->type = NULL;
+    content->options = NULL;
+    content->encoding = SOAP_MIME_NONE;
+    content->location = NULL;
+    content->description = NULL;
+    if (!*first)
+      *first = content;
+    if (*last)
+      (*last)->next = content;
+    *last = content;
+  }
+  return content;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_dime_attachment(struct soap *soap, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->options = soap_dime_option(soap, optype, option);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_mime_attachment(struct soap *soap, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->encoding = encoding;
+  content->location = soap_strdup(soap, location);
+  content->description = soap_strdup(soap, description);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap_multipart*
+SOAP_FMAC2
+soap_next_multipart(struct soap_multipart *content)
+{ if (content)
+    return content->next;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_select_mime_boundary(struct soap *soap)
+{ while (!soap->mime.boundary || soap_valid_mime_boundary(soap))
+  { register char *s = soap->mime.boundary;
+    register size_t n = 0;
+    if (s)
+      n = strlen(s);
+    if (n < 16)
+    { n = 64;
+      s = soap->mime.boundary = (char*)soap_malloc(soap, n + 1);
+      if (!s)
+        return;
+    }
+    strcpy(s, "==");
+    s += 2;
+    n -= 4;
+    while (n)
+    { *s++ = soap_base64o[soap_random & 0x3F];
+      n--;
+    }
+    strcpy(s, "==");
+  }
+  if (!soap->mime.start)
+    soap->mime.start = "<SOAP-ENV:Envelope>";
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_valid_mime_boundary(struct soap *soap)
+{ register struct soap_multipart *content;
+  register size_t k = strlen(soap->mime.boundary);
+  for (content = soap->mime.first; content; content = content->next)
+  { if (content->ptr && content->size >= k)
+    { register const char *p = (const char*)content->ptr; 
+      register size_t i;
+      for (i = 0; i < content->size - k; i++, p++)
+        if (!strncmp(p, soap->mime.boundary, k))
+          return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	HTTP cookie handling
+ *
+\******************************************************************************/
+
+#ifdef WITH_COOKIES
+/******************************************************************************/
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_encode_cookie(const char *s, char *t, size_t len)
+{ register int c;
+  register size_t n = len;
+  while ((c = *s++) && --n > 0)
+  { if (c > ' ' && c < 128 && !strchr("()<>@,;:\\\"/[]?={}", c))
+      *t++ = c;
+    else if (n > 2)
+    { *t++ = '%';
+      *t++ = (c >> 4) + (c > 159 ? '7' : '0');
+      c &= 0xF;
+      *t++ = c + (c > 9 ? '7' : '0');
+      n -= 2;
+    }
+    else
+      break;
+  }
+  *t = '\0';
+  return len - n;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  size_t n;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (*path == '/')
+    path++;
+  n = strlen(path);
+  for (p = soap->cookies; p; p = p->next)
+    if (!strcmp(p->name, name)
+     && domain
+     && p->domain
+     && !strcmp(p->domain, domain)
+     && !strncmp(p->path, path, n))
+      break;
+  return p;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_set_cookie(struct soap *soap, const char *name, const char *value, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  int n;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set cookie: %s=%s domain=%s path=%s\n", name, value?value:"", domain?domain:"", path?path:""));
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return NULL;
+  }
+  if (*path == '/')
+    path++;
+  q = soap_cookie(soap, name, domain, path);
+  if (!q)
+  { if ((q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+    { if ((q->name = (char*)SOAP_MALLOC(soap, strlen(name)+1)))
+        strcpy(q->name, name);
+      q->value = NULL;
+      q->domain = NULL;
+      q->path = NULL;
+      q->expire = -1;
+      q->version = 0;
+      q->secure = 0;
+      q->modified = 0;
+      for (p = &soap->cookies, n = soap->cookie_max; *p && n; p = &(*p)->next, n--)
+        if (!strcmp((*p)->name, name) && (*p)->path && strcmp((*p)->path, path) < 0)
+          break;
+      if (n)
+      { q->next = *p;
+        *p = q;
+      }
+      else
+      { SOAP_FREE(soap, q->name);
+        SOAP_FREE(soap, q);
+        q = NULL;
+      }
+    }
+  }
+  else
+    q->modified = 1;
+  if (q)
+  { if (q->value)
+    { SOAP_FREE(soap, q->value);
+      q->value = NULL;
+    }
+    if (q->domain)
+    { SOAP_FREE(soap, q->domain);
+      q->domain = NULL;
+    }
+    if (q->path)
+    { SOAP_FREE(soap, q->path);
+      q->path = NULL;
+    }
+    if (value && *value && (q->value = (char*)SOAP_MALLOC(soap, strlen(value)+1)))
+      strcpy(q->value, value);
+    if (domain && *domain && (q->domain = (char*)SOAP_MALLOC(soap, strlen(domain)+1)))
+      strcpy(q->domain, domain);
+    if (path && *path && (q->path = (char*)SOAP_MALLOC(soap, strlen(path)+1)))
+      strcpy(q->path, path);
+    q->session = 1;
+    q->env = 0;
+  }
+  return q;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!domain)
+  { soap_set_receiver_error(soap, "Cookie domain not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (*path == '/')
+    path++;
+  for (p = &soap->cookies, q = *p; q; q = *p)
+    if (!strcmp(q->name, name) && !strcmp(q->domain, domain) && !strncmp(q->path, path, strlen(q->path)))
+    { if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+      p = &q->next;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_env_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)) && p->env)
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_cookie_expire(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->expire;
+  return -1;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_expire(struct soap *soap, const char *name, long expire, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->expire = expire;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 1;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_clr_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 0;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putsetcookies(struct soap *soap)
+{ struct soap_cookie *p;
+  char *s, tmp[4096];
+  const char *t;
+  for (p = soap->cookies; p; p = p->next)
+  { if (p->modified || !p->env)
+    { s = tmp;
+      if (p->name)
+        s += soap_encode_cookie(p->name, s, tmp-s+4064);
+      if (p->value && *p->value)
+      { *s++ = '=';
+        s += soap_encode_cookie(p->value, s, tmp-s+4064);
+      }
+      if (p->domain && (int)strlen(p->domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", p->domain);
+      else if (soap->cookie_domain && (int)strlen(soap->cookie_domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", soap->cookie_domain);
+      strcat(s, ";Path=\"/");
+      if (p->path)
+        t = p->path;
+      else
+        t = soap->cookie_path;
+      if (t)
+      { if (*t == '/')
+          t++;
+        if ((int)strlen(t) < tmp-s+4064)
+          strcat(s, t);
+      }
+      s += strlen(s);
+      *s++ = '"';
+      if (p->version > 0)
+        sprintf(s, ";Version=%u", p->version);
+      if (p->expire >= 0)
+        sprintf(s, ";Max-Age=%ld", p->expire);
+      if (p->secure)
+        strcat(s, ";Secure");
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set-Cookie: %s\n", tmp));
+      if ((soap->error = soap->fposthdr(soap, "Set-Cookie", tmp)))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putcookies(struct soap *soap, const char *domain, const char *path, int secure)
+{ struct soap_cookie **p, *q;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  char *s, tmp[4096];
+  p = &soap->cookies;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending cookies for domain=%s path=%s\n", domain, path));
+  if (*path == '/')
+    path++;
+  while ((q = *p))
+  { if (q->expire && now > q->expire)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie %s expired\n", q->name));
+      SOAP_FREE(soap, q->name);
+      if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+    { size_t domlen = 0;
+      if (q->domain)
+      { const char *s = strchr(q->domain, ':');
+        if (s)
+	  domlen = s - q->domain;
+	else
+          domlen = strlen(q->domain);
+      }
+      if ((!q->domain || !strncmp(q->domain, domain, domlen))
+          && (!q->path || !strncmp(q->path, path, strlen(q->path)))
+          && (!q->secure || secure))
+      { s = tmp;
+        if (q->version != version)
+        { sprintf(s, "$Version=%u;", q->version);
+          version = q->version;
+        }
+        if (q->name)
+          s += soap_encode_cookie(q->name, s, tmp-s+4080);
+        if (q->value && *q->value)
+        { *s++ = '=';
+          s += soap_encode_cookie(q->value, s, tmp-s+4080);
+        }
+        if (q->path && (int)strlen(q->path) < tmp-s+4080)
+        { sprintf(s, ";$Path=\"/%s\"", (*q->path == '/' ? q->path + 1 : q->path));
+          s += strlen(s);
+        }
+        if (q->domain && (int)strlen(q->domain) < tmp-s+4080)
+          sprintf(s, ";$Domain=\"%s\"", q->domain);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie: %s\n", tmp));
+        if ((soap->error = soap->fposthdr(soap, "Cookie", tmp)))
+          return soap->error;
+      }
+      p = &q->next;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_getcookies(struct soap *soap, const char *val)
+{ struct soap_cookie *p = NULL, *q;
+  const char *s;
+  char *t, tmp[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  char *domain = NULL;
+  char *path = NULL;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  if (!val)
+    return;
+  s = val;
+  while (*s)
+  { s = soap_decode_key(tmp, sizeof(tmp), s);
+    if (!soap_tag_cmp(tmp, "$Version"))
+    { if ((s = soap_decode_val(tmp, sizeof(tmp), s)))
+      { if (p)
+          p->version = (int)atol(tmp);
+        else
+          version = (int)atol(tmp);
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Path"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->path)
+          SOAP_FREE(soap, p->path);
+        p->path = t;
+      }
+      else
+      { if (path)
+          SOAP_FREE(soap, path);
+        path = t;
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Domain"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->domain)
+          SOAP_FREE(soap, p->domain);
+	p->domain = t;
+      }
+      else
+      { if (domain)
+          SOAP_FREE(soap, domain);
+        domain = t;
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Path"))
+    { if (p->path)
+        SOAP_FREE(soap, p->path);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->path = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->path, tmp);
+      }
+      else
+        p->path = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Domain"))
+    { if (p->domain)
+        SOAP_FREE(soap, p->domain);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->domain = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->domain, tmp);
+      }
+      else
+        p->domain = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Version"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->version = (unsigned int)atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Max-Age"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->expire = now + atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Expires"))
+    { struct tm T;
+      char a[3]; 
+      static const char mns[] = "anebarprayunulugepctovec";
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (strlen(tmp) > 20)
+      { memset((void*)&T, 0, sizeof(T));
+        a[0] = tmp[4];
+        a[1] = tmp[5];
+        a[2] = '\0';
+        T.tm_mday = (int)atol(a);
+        a[0] = tmp[8];
+        a[1] = tmp[9];
+        T.tm_mon = (strstr(mns, a) - mns) / 2;
+        a[0] = tmp[11];
+        a[1] = tmp[12];
+        T.tm_year = 100 + (int)atol(a);
+        a[0] = tmp[13];
+        a[1] = tmp[14];
+        T.tm_hour = (int)atol(a);
+        a[0] = tmp[16];
+        a[1] = tmp[17];
+        T.tm_min = (int)atol(a);
+        a[0] = tmp[19];
+        a[1] = tmp[20];
+        T.tm_sec = (int)atol(a);
+        p->expire = soap_timegm(&T);
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Secure"))
+      p->secure = 1;
+    else
+    { if (p)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+        if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+        { q->version = p->version;
+          q->expire = p->expire;
+          q->secure = p->secure;
+          q->env = 1;
+        }
+        if (p->name)
+          SOAP_FREE(soap, p->name);
+        if (p->value)
+          SOAP_FREE(soap, p->value);
+        if (p->domain)
+          SOAP_FREE(soap, p->domain);
+        if (p->path)
+          SOAP_FREE(soap, p->path);
+        SOAP_FREE(soap, p);
+      }
+      if ((p = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      { p->name = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+        strcpy(p->name, tmp);
+        s = soap_decode_val(tmp, sizeof(tmp), s);
+        if (*tmp)
+        { p->value = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+          strcpy(p->value, tmp);
+        }
+        else
+          p->value = NULL;
+        p->domain = domain;
+        p->path = path;
+        p->expire = 0;
+        p->secure = 0;
+        p->version = version;
+      }
+    }
+  }
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+    if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+    { q->version = p->version;
+      q->expire = p->expire;
+      q->secure = p->secure;
+      q->env = 1;
+    }
+    if (p->name)
+      SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+  if (domain)
+    SOAP_FREE(soap, domain);
+  if (path)
+    SOAP_FREE(soap, path);
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getenv_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  const char *s;
+  char key[4096], val[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  if (!(s = getenv("HTTP_COOKIE")))
+    return SOAP_ERR;
+  do
+  { s = soap_decode_key(key, sizeof(key), s);
+    s = soap_decode_val(val, sizeof(val), s);
+    p = soap_set_cookie(soap, key, val, NULL, NULL);
+    if (p)
+      p->env = 1;
+  } while (*s);
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_copy_cookies(struct soap *soap)
+{ struct soap_cookie *p, **q, *r;
+  q = &r;
+  for (p = soap->cookies; p; p = p->next)
+  { if (!(*q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      return r;
+    **q = *p;
+    if (p->name)
+    { if (((*q)->name = (char*)SOAP_MALLOC(soap, strlen(p->name)+1)))
+        strcpy((*q)->name, p->name);
+    }
+    if (p->value)
+    { if (((*q)->value = (char*)SOAP_MALLOC(soap, strlen(p->value)+1)))
+        strcpy((*q)->value, p->value);
+    }
+    if (p->domain)
+    { if (((*q)->domain = (char*)SOAP_MALLOC(soap, strlen(p->domain)+1)))
+        strcpy((*q)->domain, p->domain);
+    }
+    if (p->path)
+    { if (((*q)->path = (char*)SOAP_MALLOC(soap, strlen(p->path)+1)))
+        strcpy((*q)->path, p->path);
+    }
+    q = &(*q)->next;
+  }
+  *q = NULL;
+  return r;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  for (p = soap->cookies; p; p = soap->cookies)
+  { soap->cookies = p->next;
+    SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+}
+
+/******************************************************************************/
+#endif /* WITH_COOKIES */
+
+/******************************************************************************/
+#ifdef WITH_GZIP
+#ifndef PALM_1
+static int
+soap_getgziphdr(struct soap *soap)
+{ int i;
+  soap_wchar c, f = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get gzip header\n"));
+  for (i = 0; i < 9; i++)
+  { if ((int)(c = soap_get1(soap) == EOF))
+      return soap->error = SOAP_EOF;
+    if (i == 2)
+      f = c;
+  }
+  if (f & 0x04) /* FEXTRA */
+  { for (i = soap_get1(soap) | (soap_get1(soap) << 8); i; i--)
+      if ((int)soap_get1(soap) == EOF)
+        return soap->error = SOAP_EOF;
+  }
+  if (f & 0x08) /* FNAME */
+    do
+      c = soap_get1(soap);
+    while (c && (int)c != EOF);
+  if ((int)c != EOF && (f & 0x10)) /* FCOMMENT */
+    do
+      c = soap_get1(soap);
+    while (c && (int)f != EOF);
+  if ((int)c != EOF && (f & 0x01)) /* FHCRC */
+  { if ((int)(c = soap_get1(soap)) != EOF)
+      c = soap_get1(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_recv(struct soap *soap)
+{ soap_wchar c;
+  soap->error = SOAP_OK;
+  soap_free(soap);
+  soap_set_local_namespaces(soap);
+  soap->version = 0;	/* don't assume we're parsing SOAP content by default */
+#ifndef WITH_NOIDREF
+  soap_free_iht(soap);
+#endif
+  if ((soap->imode & SOAP_IO) == SOAP_IO_CHUNK)
+    soap->omode |= SOAP_IO_CHUNK;
+  soap->imode &= ~SOAP_IO;
+  soap->mode = soap->imode;
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  soap->ahead = 0;
+  soap->peeked = 0;
+  soap->level = 0;
+  soap->part = SOAP_BEGIN;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  *soap->endpoint = '\0';
+  soap->action = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket))
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->recvfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->recvfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#ifdef WITH_ZLIB
+  soap->mode &= ~SOAP_ENC_ZLIB;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.next_in = Z_NULL;
+  soap->d_stream.avail_in = 0;
+  soap->d_stream.next_out = (Byte*)soap->buf;
+  soap->d_stream.avail_out = SOAP_BUFLEN;
+  soap->z_ratio_in = 1.0;
+#endif
+#ifndef WITH_LEANER
+  if (soap->fprepareinit)
+    soap->fprepareinit(soap);
+#endif
+  c = soap_getchar(soap);
+#ifdef WITH_GZIP
+  if (c == 0x1F)
+  { if (soap_getgziphdr(soap))
+      return soap->error;
+    if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+    soap->zlib_state = SOAP_ZLIB_INFLATE;
+    soap->mode |= SOAP_ENC_ZLIB;
+    soap->zlib_in = SOAP_ZLIB_GZIP;
+    soap->z_crc = crc32(0L, NULL, 0);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    /* should not chunk over plain transport, so why bother to check? */
+    /* if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) */
+    /*   soap->z_buflen = soap->bufidx; */
+    /* else */
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+    soap->z_buflen = soap->buflen;
+    soap->buflen = soap->bufidx;
+    c = soap_getchar(soap);
+  }  
+#endif
+#ifndef WITH_LEANER
+  if (c == '-' && soap_get0(soap) == '-')
+    soap->mode |= SOAP_ENC_MIME;
+  else if ((c & 0xFFFC) == (SOAP_DIME_VERSION | SOAP_DIME_MB) && (soap_get0(soap) & 0xFFF0) == 0x20)
+    soap->mode |= SOAP_ENC_DIME;
+  else
+#endif
+  { while (soap_blank(c))
+      c = soap_getchar(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  soap_unget(soap, c);
+#ifndef WITH_NOHTTP
+  /* if not XML or (start of)BOM or MIME/DIME/ZLIB, assume HTTP header */
+  if (c != '<' && c != 0xEF && !(soap->mode & (SOAP_ENC_MIME | SOAP_ENC_DIME | SOAP_ENC_ZLIB)))
+  { soap->mode &= ~SOAP_IO;
+    soap->error = soap->fparse(soap);
+    if (soap->error && soap->error < SOAP_STOP)
+    { soap->keep_alive = 0; /* force close later */
+      return soap->error;
+    }
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { soap->chunkbuflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+      soap->chunksize = 0;
+    }
+#ifndef WITH_LEANER
+    else if (soap->fpreparerecv && soap->buflen != soap->bufidx)
+      soap->fpreparerecv(soap, soap->buf + soap->bufidx, soap->buflen - soap->bufidx);
+#endif
+#ifdef WITH_ZLIB
+    if (soap->zlib_in != SOAP_ZLIB_NONE)
+    { /* fparse should not use soap_unget to push back last char */
+#ifdef WITH_GZIP
+      c = soap_get1(soap);
+      if (c == 0x1F)
+      { if (soap_getgziphdr(soap))
+          return soap->error;
+        if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        soap->z_crc = crc32(0L, NULL, 0);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+      }
+      else
+      { soap_revget1(soap);
+#else
+      {
+#endif
+        if (inflateInit(&soap->d_stream) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate initialized\n"));
+      }
+      soap->mode |= SOAP_ENC_ZLIB;
+      memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+      soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+      soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+    }
+#endif
+    if (soap->error)
+    { if (soap->error == SOAP_FORM && soap->fform)
+      { soap->error = soap->fform(soap);
+        if (soap->error == SOAP_OK)
+          soap->error = SOAP_STOP; /* prevents further processing */
+      }
+      return soap->error;
+    }
+  }
+#endif
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_MIME)
+  { if (soap_getmimehdr(soap))
+      return soap->error;
+    if (soap_get_header_attribute(soap, soap->mime.first->type, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+  }
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap->dime.flags & SOAP_DIME_CF)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked DIME SOAP message\n"));
+      soap->dime.chunksize = soap->dime.size;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+    }
+    soap->count = soap->buflen - soap->bufidx;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse(struct soap *soap)
+{ char header[SOAP_HDRLEN], *s;
+  unsigned short get = 0, status = 0, k = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Waiting for HTTP request/response...\n"));
+  *soap->endpoint = '\0';
+  soap->length = 0;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->action = NULL;
+  soap->authrealm = NULL;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP status: %s\n", soap->msgbuf));
+    for (;;)
+    { if (soap_getline(soap, header, SOAP_HDRLEN))
+      { if (soap->error == SOAP_EOF)
+	{ soap->error = SOAP_OK;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "EOF in HTTP header, continue anyway\n"));
+	  break;
+	}
+        return soap->error;
+      }
+      if (!*header)
+        break;
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP header: %s\n", header));
+      s = strchr(header, ':');
+      if (s)
+      { *s = '\0';
+        do s++;
+        while (*s && *s <= 32);
+        if ((soap->error = soap->fparsehdr(soap, header, s)))
+        { if (soap->error < SOAP_STOP)
+	    return soap->error;
+	  status = soap->error;
+	  soap->error = SOAP_OK;
+        }
+      }
+    }
+    if ((s = strchr(soap->msgbuf, ' ')))
+    { k = (unsigned short)soap_strtoul(s, &s, 10);
+      if (!soap_blank(*s))
+        k = 0;
+    }
+    else
+      k = 0;
+  } while (k == 100);
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Finished HTTP header parsing\n"));
+  s = strstr(soap->msgbuf, "HTTP/");
+  if (s && s[7] != '1')
+  { if (soap->keep_alive == 1)
+      soap->keep_alive = 0;
+    if (k == 0 && (soap->omode & SOAP_IO) == SOAP_IO_CHUNK) /* k == 0 for HTTP request */
+    { soap->imode |= SOAP_IO_CHUNK;
+      soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE;
+    }
+  }
+  if (soap->keep_alive < 0)
+    soap->keep_alive = 1;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Keep alive connection = %d\n", soap->keep_alive));
+  if (s && (((get = !strncmp(soap->msgbuf, "GET ", 4))) || !strncmp(soap->msgbuf, "POST ", 5)))
+  { size_t m = strlen(soap->endpoint);
+    size_t n = m + (s - soap->msgbuf) - 5 - (!get);
+    if (n >= sizeof(soap->endpoint))
+      n = sizeof(soap->endpoint) - 1;
+    strncpy(soap->path, soap->msgbuf + 4 + (!get), n - m);
+    soap->path[n - m] = '\0';
+    strcat(soap->endpoint, soap->path);
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Target endpoint='%s'\n", soap->endpoint));
+    if (get)
+    { soap->error = soap->fget(soap);
+      if (soap->error == SOAP_OK)
+        soap->error = SOAP_STOP; /* prevents further processing */
+      return soap->error;
+    }
+    if (status)
+      return soap->error = status;
+    return SOAP_OK;
+  }
+  if (k == 0 || (k >= 200 && k <= 299) || k == 400 || k == 500)
+    return SOAP_OK;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP error %d\n", k));
+  return soap_set_receiver_error(soap, "HTTP error", soap->msgbuf, k);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse_header(struct soap *soap, const char *key, const char *val)
+{ if (!soap_tag_cmp(key, "Host"))
+  { 
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+      strcpy(soap->endpoint, "https://");
+    else
+#endif
+      strcpy(soap->endpoint, "http://");
+    strncat(soap->endpoint, val, sizeof(soap->endpoint) - 8);
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifndef WITH_LEANER
+  else if (!soap_tag_cmp(key, "Content-Type"))
+  { if (soap_get_header_attribute(soap, val, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+    else if (soap_get_header_attribute(soap, val, "multipart/related")
+          || soap_get_header_attribute(soap, val, "multipart/form-data"))
+    { soap->mime.boundary = soap_strdup(soap, soap_get_header_attribute(soap, val, "boundary"));
+      soap->mime.start = soap_strdup(soap, soap_get_header_attribute(soap, val, "start"));
+      soap->mode |= SOAP_ENC_MIME;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Content-Length"))
+    soap->length = soap_strtoul(val, NULL, 10);
+  else if (!soap_tag_cmp(key, "Content-Encoding"))
+  { if (!soap_tag_cmp(val, "deflate"))
+#ifdef WITH_ZLIB
+      soap->zlib_in = SOAP_ZLIB_DEFLATE;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+    else if (!soap_tag_cmp(val, "gzip"))
+#ifdef WITH_GZIP
+      soap->zlib_in = SOAP_ZLIB_GZIP;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+  }
+#ifdef WITH_ZLIB
+  else if (!soap_tag_cmp(key, "Accept-Encoding"))
+  {
+#ifdef WITH_GZIP
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "gzip"))
+      soap->zlib_out = SOAP_ZLIB_GZIP;
+    else
+#endif
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "deflate"))
+      soap->zlib_out = SOAP_ZLIB_DEFLATE;
+    else
+      soap->zlib_out = SOAP_ZLIB_NONE;
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Transfer-Encoding"))
+  { soap->mode &= ~SOAP_IO;
+    if (!soap_tag_cmp(val, "chunked"))
+      soap->mode |= SOAP_IO_CHUNK;
+  }
+  else if (!soap_tag_cmp(key, "Connection"))
+  { if (!soap_tag_cmp(val, "keep-alive"))
+      soap->keep_alive = -soap->keep_alive;
+    else if (!soap_tag_cmp(val, "close"))
+      soap->keep_alive = 0;
+  }
+#ifndef WITH_LEAN
+  else if (!soap_tag_cmp(key, "Authorization"))
+  { if (!soap_tag_cmp(val, "Basic *"))
+    { int n;
+      char *s;
+      soap_base642s(soap, val + 6, soap->tmpbuf, sizeof(soap->tmpbuf) - 1, &n);
+      soap->tmpbuf[n] = '\0';
+      if ((s = strchr(soap->tmpbuf, ':')))
+      { *s = '\0';
+	soap->userid = soap_strdup(soap, soap->tmpbuf);
+	soap->passwd = soap_strdup(soap, s + 1);
+      }
+    }
+  }
+  else if (!soap_tag_cmp(key, "WWW-Authenticate"))
+    soap->authrealm = soap_strdup(soap, soap_get_header_attribute(soap, val + 6, "realm"));
+  else if (!soap_tag_cmp(key, "Expect"))
+  { if (!soap_tag_cmp(val, "100-continue"))
+    { if ((soap->error = soap->fposthdr(soap, "HTTP/1.1 100 Continue", NULL))
+       || (soap->error = soap->fposthdr(soap, NULL, NULL)))
+        return soap->error;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "SOAPAction"))
+  { if (*val == '"')
+    { soap->action = soap_strdup(soap, val + 1);
+      soap->action[strlen(soap->action) - 1] = '\0';
+    }
+  }
+  else if (!soap_tag_cmp(key, "Location"))
+  { strncpy(soap->endpoint, val, sizeof(soap->endpoint));
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifdef WITH_COOKIES
+  else if (!soap_tag_cmp(key, "Cookie") || !soap_tag_cmp(key, "Set-Cookie"))
+    soap_getcookies(soap, val);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_get_header_attribute(struct soap *soap, const char *line, const char *key)
+{ register const char *s = line;
+  if (s)
+  { while (*s)
+    { register short flag;
+      s = soap_decode_key(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      flag = soap_tag_cmp(soap->tmpbuf, key);
+      s = soap_decode_val(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      if (!flag)
+        return soap->tmpbuf;
+    }
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_key(char *buf, size_t len, const char *val)
+{ return soap_decode(buf, len, val, "=,;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_val(char *buf, size_t len, const char *val)
+{ if (*val != '=')
+  { *buf = '\0';
+    return val;
+  }
+  return soap_decode(buf, len, val + 1, ",;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char*
+soap_decode(char *buf, size_t len, const char *val, const char *sep)
+{ const char *s;
+  char *t = buf;
+  for (s = val; *s; s++)
+    if (*s != ' ' && *s != '\t' && !strchr(sep, *s))
+      break;
+  if (*s == '"')
+  { s++;
+    while (*s && *s != '"' && --len)
+      *t++ = *s++;
+  }
+  else
+  { while (soap_notblank(*s) && !strchr(sep, *s) && --len)
+    { if (*s == '%')
+      { *t++ = ((s[1] >= 'A' ? (s[1] & 0x7) + 9 : s[1] - '0') << 4)
+              + (s[2] >= 'A' ? (s[2] & 0x7) + 9 : s[2] - '0');
+        s += 3;
+      }
+      else
+        *t++ = *s++;
+    }
+  }
+  *t = '\0';
+  while (*s && !strchr(sep, *s))
+    s++;
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_out(struct soap *soap)
+{
+#ifndef WITH_LEANER
+  size_t n = 0;
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->mime.start)
+  { const char *s;
+    if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+      s = "application/dime";
+    else if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+    sprintf(soap->tmpbuf, "--%s\r\nContent-Type: %s\r\nContent-Transfer-Encoding: binary\r\nContent-ID: %s\r\n\r\n", soap->mime.boundary, s, soap->mime.start);
+    n = strlen(soap->tmpbuf);
+    if (soap_send_raw(soap, soap->tmpbuf, n))
+      return soap->error;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    soap->dime.size = soap->count;	/* DIME in MIME correction */
+  if (!(soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME))
+  { if (soap_putdimehdr(soap))
+      return soap->error;
+  }
+#endif
+  soap->part = SOAP_IN_ENVELOPE;
+  return soap_element_begin_out(soap, "SOAP-ENV:Envelope", 0, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Envelope"))
+    return soap->error;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { soap->dime.size = soap->count - soap->dime.size;	/* DIME in MIME correction */
+    sprintf(soap->id, soap->dime_id_format, 0);
+    soap->dime.id = soap->id;
+    if (soap->local_namespaces)
+    { if (soap->local_namespaces[0].out)
+        soap->dime.type = (char*)soap->local_namespaces[0].out;
+      else
+        soap->dime.type = (char*)soap->local_namespaces[0].ns;
+    }
+    soap->dime.options = NULL;
+    soap->dime.flags = SOAP_DIME_MB | SOAP_DIME_ABSURI;
+    if (!soap->dime.first)
+      soap->dime.flags |= SOAP_DIME_ME;
+    soap->count += 12 + ((strlen(soap->dime.id)+3)&(~3)) + ((strlen(soap->dime.type)+3)&(~3));
+  }
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+    return soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+#endif
+  soap->part = SOAP_END_ENVELOPE;
+  return SOAP_OK;
+} 
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_in(struct soap *soap)
+{ register struct Namespace *p;
+  soap->part = SOAP_IN_ENVELOPE;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Envelope", 0))
+    return soap->error = SOAP_VERSIONMISMATCH;
+  p = soap->local_namespaces;
+  if (p)
+  { const char *ns = p[0].out;
+    if (!ns)
+      ns = p[0].ns;
+    if (!strcmp(ns, soap_env1))
+    { soap->version = 1; /* make sure we use SOAP 1.1 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc1))))
+        strcpy(p[1].out, soap_enc1);
+    }
+    else if (!strcmp(ns, soap_env2))
+    { soap->version = 2; /* make sure we use SOAP 1.2 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc2))))
+        strcpy(p[1].out, soap_enc2);
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_in(struct soap *soap)
+{ soap->part = SOAP_END_ENVELOPE;
+  return soap_element_end_in(soap, "SOAP-ENV:Envelope");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_out(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap->version == 1)
+    soap->encoding = 1;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_SEC) && soap_set_attr(soap, "wsu:Id", "Body"))
+    return soap->error;
+#endif
+  if (soap_element(soap, "SOAP-ENV:Body", 0, NULL))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Body"))
+    return soap->error;
+  soap->part = SOAP_END_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_in(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Body", 0))
+    return soap->error;
+  if (!soap->body)
+    soap->part = SOAP_NO_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_in(struct soap *soap)
+{ if (soap->part == SOAP_NO_BODY)
+    return SOAP_OK;
+  soap->part = SOAP_END_BODY;
+  return soap_element_end_in(soap, "SOAP-ENV:Body");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_header(struct soap *soap)
+{ if (soap_getheader(soap) && soap->error == SOAP_TAG_MISMATCH)
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_endpoint(struct soap *soap, const char *endpoint)
+{ register const char *s;
+  register size_t i, n;
+  soap->endpoint[0] = '\0';
+  soap->host[0] = '\0';
+  soap->path[0] = '/';
+  soap->path[1] = '\0';
+  soap->port = 80;
+  if (!endpoint || !*endpoint)
+    return;
+  if (!strncmp(endpoint, "https:", 6))
+    soap->port = 443;
+  strncpy(soap->endpoint, endpoint, sizeof(soap->endpoint) - 1);
+  s = strchr(endpoint, ':');
+  if (s && s[1] == '/' && s[2] == '/')
+    s += 3;
+  else
+    s = endpoint;
+  n = strlen(s);
+  if (n >= sizeof(soap->host))
+    n = sizeof(soap->host) - 1;
+#ifdef WITH_IPV6
+  if (s[0] == '[')
+  { s++;
+    for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == ']')
+      { s++;
+        break; 
+      }
+    }
+  }
+  else
+  { for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == '/' || s[i] == ':')
+        break; 
+    }
+  }
+#else
+  for (i = 0; i < n; i++)
+  { soap->host[i] = s[i];
+    if (s[i] == '/' || s[i] == ':')
+      break; 
+  }
+#endif
+  soap->host[i] = '\0';
+  if (s[i] == ':')
+  { soap->port = (int)atol(s + i + 1);
+    for (i++; i < n; i++)
+      if (s[i] == '/')
+        break;
+  }
+  if (s[i])
+  { strncpy(soap->path, s + i, sizeof(soap->path));
+    soap->path[sizeof(soap->path) - 1] = '\0';
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect(struct soap *soap, const char *endpoint, const char *action)
+{ return soap_connect_command(soap, SOAP_POST, endpoint, action);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect_command(struct soap *soap, int http_command, const char *endpoint, const char *action)
+{ char host[sizeof(soap->host)];
+  int port;
+  size_t count;
+  soap->error = SOAP_OK;
+  strcpy(host, soap->host); /* save to compare */
+  port = soap->port; /* save to compare */
+  soap_set_endpoint(soap, endpoint);
+#ifndef WITH_LEANER
+  if (soap->fconnect)
+  { if ((soap->error = soap->fconnect(soap, endpoint, soap->host, soap->port)))
+      return soap->error;
+  }
+  else
+#endif
+  if (soap->fopen && *soap->host)
+  { soap->status = http_command;
+    if (!soap->keep_alive || !soap_valid_socket(soap->socket) || strcmp(soap->host, host) || soap->port != port || !soap->fpoll || soap->fpoll(soap))
+    { soap->keep_alive = 0; /* to force close */
+      soap->omode &= ~SOAP_IO_UDP; /* to force close */
+      soap_closesock(soap);
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Connect/reconnect to host='%s' path='%s' port=%d\n", soap->host, soap->path, soap->port));
+#ifdef WITH_UDP
+      if (!strncmp(endpoint, "soap.udp:", 9))
+        soap->omode |= SOAP_IO_UDP;
+#endif
+      soap->socket = soap->fopen(soap, endpoint, soap->host, soap->port);
+      if (soap->error)
+        return soap->error;
+      soap->keep_alive = ((soap->omode & SOAP_IO_KEEPALIVE) != 0);
+    }
+  }
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML) && endpoint)
+  { unsigned int k = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((k & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fpost(soap, endpoint, soap->host, soap->port, soap->path, action, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((k & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = k;
+  }
+  else if (action)
+    soap->action = soap_strdup(soap, action);
+  if (http_command != SOAP_POST)
+    return soap_end_send(soap);
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2base64(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register int i;
+  register unsigned long m;
+  register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, (n + 2) / 3 * 4 + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (!s)
+    return p;
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    t += 4;
+  }
+  t[0] = '\0';
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      t[i] = '=';
+    t[4] = '\0';
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_base642s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register int i, j, c;
+  register unsigned long m;
+  register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = (strlen(s) + 3) / 4 * 3;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  if (n)
+    *n = 0;
+  for (;;)
+  { for (i = 0; i < SOAP_BLKLEN; i++)
+    { m = 0;
+      j = 0;
+      while (j < 4)
+      { c = *s++;
+        if (c == '=' || !c)
+        { i *= 3;
+          switch (j)
+          { case 2:
+              *t++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *t++ = (char)((m >> 10) & 0xFF);
+              *t++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n += i;
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      }
+      *t++ = (char)((m >> 16) & 0xFF);
+      *t++ = (char)((m >> 8) & 0xFF);
+      *t++ = (char)(m & 0xFF);
+      if (l < 3)
+      { if (n)
+	  *n += i;
+        return p;
+      }
+      l -= 3;
+    }
+    if (n)
+      *n += 3 * SOAP_BLKLEN;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2hex(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, 2 * n + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (s)
+  { for (; n > 0; n--)
+    { register int m = *s++;
+      *t++ = (char)((m >> 4) + (m > 159 ? 'a' - 10 : '0'));
+      m &= 0x0F;
+      *t++ = (char)(m + (m > 9 ? 'a' - 10 : '0'));
+    }
+  }
+  *t++ = '\0';
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_hex2s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = strlen(s) / 2;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  while (l)
+  { register int d1, d2;
+    d1 = *s++;
+    if (!d1)
+      break;
+    d2 = *s++;
+    if (!d2)
+      break;
+    *t++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    l--;
+  }
+  if (n)
+    *n = t - p;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthttphdr(struct soap *soap, int status, size_t count)
+{ register const char *s = NULL;
+  register int err = SOAP_OK;
+#ifndef WITH_LEANER
+  register const char *r = NULL;
+#endif
+  if (status == SOAP_FILE && soap->http_content)
+    s = soap->http_content;
+  else if (status == SOAP_HTML)
+    s = "text/html; charset=utf-8";
+  else if (count || ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK))
+  { if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+  }
+#ifndef WITH_LEANER
+  if (soap->mode & (SOAP_ENC_DIME | SOAP_ENC_MTOM))
+  { if (soap->mode & SOAP_ENC_MTOM)
+    { r = s;
+      s = "application/xop+xml; charset=utf-8";
+    }
+    else
+      s = "application/dime";
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->status != SOAP_GET)
+  { register const char *t = strchr(s, ';');
+    sprintf(soap->tmpbuf, "multipart/related; boundary=\"%s\"; type=\"", soap->mime.boundary);
+    if (t)
+      strncat(soap->tmpbuf, s, t - s);
+    else
+      strcat(soap->tmpbuf, s);
+    if (soap->mime.start)
+    { strcat(soap->tmpbuf, "\"; start=\"");
+      strcat(soap->tmpbuf, soap->mime.start);
+    }
+    strcat(soap->tmpbuf, "\"");
+    if (r)
+    { strcat(soap->tmpbuf, "; start-info=\"");
+      strcat(soap->tmpbuf, r);
+      strcat(soap->tmpbuf, "\"");
+    }
+    s = soap->tmpbuf;
+  }
+#endif
+  if (s && (err = soap->fposthdr(soap, "Content-Type", s)))
+    return err;
+#ifdef WITH_ZLIB
+  if (soap->omode & SOAP_ENC_ZLIB)
+  {
+#ifdef WITH_GZIP
+    err = soap->fposthdr(soap, "Content-Encoding", "gzip");
+#else
+    err = soap->fposthdr(soap, "Content-Encoding", "deflate");
+#endif
+    if (err)
+      return err;
+  }
+#endif
+#ifndef WITH_LEANER
+  if ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK)
+    err = soap->fposthdr(soap, "Transfer-Encoding", "chunked");
+  else
+#endif
+  if (soap->status != SOAP_GET)
+  { sprintf(soap->tmpbuf, "%lu", (unsigned long)count);
+    err = soap->fposthdr(soap, "Content-Length", soap->tmpbuf);
+  }
+  if (err)
+    return err;
+  return soap->fposthdr(soap, "Connection", soap->keep_alive ? "keep-alive" : "close");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_get(struct soap *soap)
+{ return SOAP_GET_METHOD;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post(struct soap *soap, const char *endpoint, const char *host, int port, const char *path, const char *action, size_t count)
+{ register const char *s;
+  register int err;
+  if (soap->status == SOAP_GET)
+    s = "GET";
+  else
+    s = "POST";
+#ifdef PALM
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)) && strncmp(endpoint, "_beam:", 6) && strncmp(endpoint, "_local:", 7) && strncmp(endpoint, "_btobex:", 8))
+#else
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)))
+#endif
+    return SOAP_OK;
+  if (soap->proxy_host && strncmp(endpoint, "https:", 6))
+    sprintf(soap->tmpbuf, "%s %s HTTP/%s", s, endpoint, soap->http_version);
+  else
+    sprintf(soap->tmpbuf, "%s /%s HTTP/%s", s, (*path == '/' ? path + 1 : path), soap->http_version);
+  if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+    return err;
+  if (port != 80)
+    sprintf(soap->tmpbuf, "%s:%d", host, port);
+  else
+    strcpy(soap->tmpbuf, host); 
+  if ((err = soap->fposthdr(soap, "Host", soap->tmpbuf))
+   || (err = soap->fposthdr(soap, "User-Agent", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, SOAP_OK, count)))
+    return err;
+#ifdef WITH_ZLIB
+#ifdef WITH_GZIP
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "gzip, deflate")))
+#else
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "deflate")))
+#endif
+    return err;
+#endif
+#ifndef WITH_LEAN
+  if (soap->userid && soap->passwd && strlen(soap->userid) + strlen(soap->passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Authorization", soap->tmpbuf)))
+      return err;
+  }
+  if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+      return err;
+  }
+#endif
+#ifdef WITH_COOKIES
+#ifdef WITH_OPENSSL
+  if (soap_putcookies(soap, host, path, soap->ssl != NULL))
+    return soap->error;
+#else
+  if (soap_putcookies(soap, host, path, 0))
+    return soap->error;
+#endif
+#endif
+  if (action && soap->version == 1)
+  { sprintf(soap->tmpbuf, "\"%s\"", action);
+    if ((err = soap->fposthdr(soap, "SOAPAction", soap->tmpbuf)))
+      return err;
+  }
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_send_header(struct soap *soap, const char *s)
+{ register const char *t;
+  do
+  { t = strchr(s, '\n'); /* disallow \n in HTTP headers */
+    if (!t)
+      t = s + strlen(s);
+    if (soap_send_raw(soap, s, t - s))
+      return soap->error;
+    s = t + 1;
+  } while (*t);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post_header(struct soap *soap, const char *key, const char *val)
+{ if (key)
+  { if (http_send_header(soap, key))
+      return soap->error;
+    if (val && (soap_send_raw(soap, ": ", 2) || http_send_header(soap, val)))
+      return soap->error;
+  }
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_response(struct soap *soap, int status, size_t count)
+{ register int err;
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    httpOutputEnable(soap->rpmreqid);
+#endif
+  if (!status || status == SOAP_HTML || status == SOAP_FILE)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "OK 200\n"));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s 200 OK", soap->http_version);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", "200 OK")))
+      return err;
+  }
+  else if (status > 200 && status < 600)
+  { sprintf(soap->tmpbuf, "HTTP/%s %d %s", soap->http_version, status, http_error(soap, status));
+    if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      return err;
+#ifndef WITH_LEAN 
+    if (status == 401)
+    { sprintf(soap->tmpbuf, "Basic realm=\"%s\"", soap->authrealm ? soap->authrealm : "gSOAP Web Service");
+      if ((err = soap->fposthdr(soap, "WWW-Authenticate", soap->tmpbuf)))
+        return err;
+    }
+    else if ((status >= 301 && status <= 303) || status == 307)
+    { if ((err = soap->fposthdr(soap, "Location", soap->endpoint)))
+        return err;
+    }
+#endif
+  }
+  else
+  { const char *s = *soap_faultcode(soap);
+    if (soap->version == 2 && !strcmp(s, "SOAP-ENV:Sender"))
+      s = "400 Bad Request";
+    else
+      s = "500 Internal Server Error";
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error %s (status=%d)\n", s, status));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s %s", soap->http_version, s);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", s)))
+      return err;
+  }
+  if ((err = soap->fposthdr(soap, "Server", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, status, count)))
+    return err;
+#ifdef WITH_COOKIES
+  if (soap_putsetcookies(soap))
+    return soap->error;
+#endif
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_response(struct soap *soap, int status)
+{ register size_t count;
+  if (!(soap->omode & (SOAP_ENC_XML | SOAP_IO_STORE /* this tests for chunking too */))
+   && (status == SOAP_HTML || status == SOAP_FILE))
+  { soap->omode &= ~SOAP_IO;
+    soap->omode |= SOAP_IO_STORE;
+  }
+  soap->status = status;
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML))
+  { register int n = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((n & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fresponse(soap, status, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((n & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = n;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static const char*
+soap_set_validation_fault(struct soap *soap, const char *s, const char *t)
+{ if (*soap->tag)
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s in element <%s>", s, t?t:SOAP_STR_EOS, soap->tag);
+  else
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s", s, t?t:SOAP_STR_EOS);
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_fault(struct soap *soap)
+{ const char **c = soap_faultcode(soap);
+  const char **s = soap_faultstring(soap);
+  if (!*c && !*s && soap->fseterror)
+    soap->fseterror(soap, c, s);
+  if (!*c)
+  { if (soap->version == 2)
+      *c = "SOAP-ENV:Sender";
+    else
+      *c = "SOAP-ENV:Client";
+  }
+  if (*s)
+    return;
+  switch (soap->error)
+  {
+#ifndef WITH_LEAN
+    case SOAP_CLI_FAULT:
+      *s = "Client fault";
+      break;
+    case SOAP_SVR_FAULT:
+      *s = "Server fault";
+      break;
+    case SOAP_TAG_MISMATCH:
+      *s = soap_set_validation_fault(soap, "tag name or namespace mismatch", NULL);
+      break;
+    case SOAP_TYPE:
+      *s = soap_set_validation_fault(soap, "data type mismatch ", soap->type);
+      break;
+    case SOAP_SYNTAX_ERROR:
+      *s = "Well-formedness violation";
+      break;
+    case SOAP_NO_TAG:
+      *s = "No XML element tag";
+      break;
+    case SOAP_MUSTUNDERSTAND:
+      *c = "SOAP-ENV:MustUnderstand";
+      sprintf(soap->msgbuf, "The data in element '%s' must be understood but cannot be handled", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_VERSIONMISMATCH:
+      *c = "SOAP-ENV:VersionMismatch";
+      *s = "SOAP version mismatch or invalid SOAP message";
+      break;
+    case SOAP_DATAENCODINGUNKNOWN:
+      *c = "SOAP-ENV:DataEncodingUnknown";
+      *s = "Unsupported SOAP data encoding";
+      break;
+    case SOAP_NAMESPACE:
+      *s = soap_set_validation_fault(soap, "namespace mismatch", NULL);
+      break;
+    case SOAP_USER_ERROR:
+      *s = "User error";
+      break;
+    case SOAP_FATAL_ERROR:
+      *s = "Fatal error";
+      break;
+    case SOAP_NO_METHOD:
+      sprintf(soap->msgbuf, "Method '%s' not implemented: method name or namespace not recognized", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_GET_METHOD:
+      *s = "HTTP GET method not implemented";
+      break;
+    case SOAP_EOM:
+      *s = "Out of memory";
+      break;
+    case SOAP_IOB:
+      *s = "Array index out of bounds";
+      break;
+    case SOAP_NULL:
+      *s = soap_set_validation_fault(soap, "nil not allowed", NULL);
+      break;
+    case SOAP_DUPLICATE_ID:
+      *s = soap_set_validation_fault(soap, "multiple definitions of id ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:DuplicateID";
+      break;
+    case SOAP_MISSING_ID:
+      *s = soap_set_validation_fault(soap, "missing id for ref ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:MissingID";
+      break;
+    case SOAP_HREF:
+      *s = soap_set_validation_fault(soap, "incompatible object ref ", soap->id);
+      break;
+    case SOAP_FAULT:
+      break;
+#ifndef WITH_NOIO
+    case SOAP_UDP_ERROR:
+      *s = "Message too large for UDP packet";
+      break;
+    case SOAP_TCP_ERROR:
+      *s = tcp_error(soap);
+      break;
+#endif
+    case SOAP_HTTP_ERROR:
+      *s = "HTTP error";
+      break;
+    case SOAP_SSL_ERROR:
+#ifdef WITH_OPENSSL
+      *s = "SSL error";
+#else
+      *s = "OpenSSL not installed: recompile with -DWITH_OPENSSL";
+#endif
+      break;
+    case SOAP_PLUGIN_ERROR:
+      *s = "Plugin registry error";
+      break;
+    case SOAP_DIME_ERROR:
+      *s = "DIME format error";
+      break;
+    case SOAP_DIME_HREF:
+      *s = "DIME href to missing attachment";
+      break;
+    case SOAP_DIME_MISMATCH:
+      *s = "DIME version/transmission error";
+      break;
+    case SOAP_DIME_END:
+      *s = "End of DIME error";
+      break;
+    case SOAP_MIME_ERROR:
+      *s = "MIME format error";
+      break;
+    case SOAP_MIME_HREF:
+      *s = "MIME href to missing attachment";
+      break;
+    case SOAP_MIME_END:
+      *s = "End of MIME error";
+      break;
+    case SOAP_ZLIB_ERROR:
+#ifdef WITH_ZLIB
+      sprintf(soap->msgbuf, "Zlib/gzip error: '%s'", soap->d_stream.msg?soap->d_stream.msg:"");
+      *s = soap->msgbuf;
+#else
+      *s = "Zlib/gzip not installed for (de)compression: recompile with -DWITH_GZIP";
+#endif
+      break;
+    case SOAP_REQUIRED:
+      *s = soap_set_validation_fault(soap, "missing required attribute", NULL);
+      break;
+    case SOAP_PROHIBITED:
+      *s = soap_set_validation_fault(soap, "prohibited attribute present", NULL);
+      break;
+    case SOAP_OCCURS:
+      *s = soap_set_validation_fault(soap, "min/maxOccurs violation", NULL);
+      break;
+    case SOAP_LENGTH:
+      *s = soap_set_validation_fault(soap, "content length violation", NULL);
+      break;
+    case SOAP_STOP:
+      *s = "Stopped: no response sent";
+      break;
+#endif
+    case SOAP_EOF:
+#ifndef WITH_NOIO
+      sprintf(soap->msgbuf, "End of file or no input: '%s'", soap_strerror(soap));
+      *s = soap->msgbuf;
+      break;
+#else
+      *s = "End of file or no input";
+      break;
+#endif
+    default:
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+      if (soap->error > 200 && soap->error < 600)
+      { sprintf(soap->msgbuf, "HTTP Error: %d %s", soap->error, http_error(soap, soap->error));
+        *s = soap->msgbuf;
+      }
+      else
+#endif
+#endif
+      { sprintf(soap->msgbuf, "Error %d", soap->error);
+        *s = soap->msgbuf;
+      }
+    }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_fault(struct soap *soap)
+{ register int status = soap->error;
+  int r = 1;
+  if (status == SOAP_STOP)
+    return status;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Sending back fault struct for error code %d\n", soap->error));
+  soap->keep_alive = 0; /* to terminate connection */
+  soap_set_fault(soap);
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+  if (soap_valid_socket(soap->socket))
+  { struct timeval timeout;
+    fd_set rfd, sfd;
+    timeout.tv_sec = 0;
+    timeout.tv_usec = 0;
+    FD_ZERO(&rfd);
+    FD_ZERO(&sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, NULL, &timeout);
+    if (r > 0)
+    { if (!FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       || (FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        && recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) < 0))
+        r = 0;
+    }
+  }
+#endif
+#endif
+  if ((status != SOAP_EOF || (!soap->recv_timeout && !soap->send_timeout)) && r > 0)
+  { soap->error = SOAP_OK;
+    soap_serializeheader(soap);
+    soap_serializefault(soap);
+    soap_begin_count(soap);
+    if (soap->mode & SOAP_IO_LENGTH)
+    { soap_envelope_begin_out(soap);
+      soap_putheader(soap);
+      soap_body_begin_out(soap);
+      soap_putfault(soap);
+      soap_body_end_out(soap);
+      soap_envelope_end_out(soap);
+    }
+    soap_end_count(soap);
+    if (soap_response(soap, status)
+     || soap_envelope_begin_out(soap)
+     || soap_putheader(soap)
+     || soap_body_begin_out(soap)
+     || soap_putfault(soap)
+     || soap_body_end_out(soap)
+     || soap_envelope_end_out(soap))
+      return soap_closesock(soap);
+    soap_end_send(soap);
+  }
+  soap->error = status;
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_fault(struct soap *soap)
+{ register int status = soap->error;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Receiving SOAP Fault\n"));
+  soap->error = SOAP_OK;
+  if (soap_getfault(soap))
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Error: soap_get_soapfault() failed. Is this a SOAP message at all?\n"));
+    *soap_faultcode(soap) = (soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client");
+    soap->error = status;
+    soap_set_fault(soap);
+  }
+  else
+  { register const char *s = *soap_faultcode(soap);
+    if (!soap_match_tag(soap, s, "SOAP-ENV:Server") || !soap_match_tag(soap, s, "SOAP-ENV:Receiver"))
+      status = SOAP_SVR_FAULT; 
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:Client") || !soap_match_tag(soap, s, "SOAP-ENV:Sender"))
+      status = SOAP_CLI_FAULT;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:MustUnderstand"))
+      status = SOAP_MUSTUNDERSTAND;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:VersionMismatch"))
+      status = SOAP_VERSIONMISMATCH;
+    else
+    { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Fault code %s\n", s));
+      status = SOAP_FAULT;
+    }
+    if (soap_body_end_in(soap)
+     || soap_envelope_end_in(soap)
+     || soap_end_recv(soap))
+      return soap_closesock(soap);
+    soap->error = status;
+  }
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_empty_response(struct soap *soap)
+{ soap->count = 0;
+  if (soap_response(soap, SOAP_OK) || soap_end_send(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_empty_response(struct soap *soap)
+{ if (soap_begin_recv(soap) || soap_end_recv(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+soap_strerror(struct soap *soap)
+{ register int err = soap->errnum;
+  if (err)
+  {
+#ifndef WIN32
+    return strerror(err);
+#else
+    FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, (LPTSTR)&soap->errorstr, sizeof(soap->errorstr), NULL);
+    return soap->errorstr;
+#endif
+  }
+  return "Operation interrupted or timed out";
+}
+#endif
+#endif 
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_set_error(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail, int soaperror)
+{ *soap_faultcode(soap) = faultcode;
+  if (faultsubcode)
+    *soap_faultsubcode(soap) = faultsubcode;
+  *soap_faultstring(soap) = faultstring;
+  if (faultdetail && *faultdetail)
+  { register const char **s = soap_faultdetail(soap);
+    if (s)
+      *s = faultdetail;
+  }
+  return soap->error = soaperror;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_sender_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_receiver_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_copy_fault(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ char *r = NULL, *s = NULL, *t = NULL;
+  if (faultsubcode)
+    r = soap_strdup(soap, faultsubcode);
+  if (faultstring)
+    s = soap_strdup(soap, faultstring);
+  if (faultdetail)
+    t = soap_strdup(soap, faultdetail);
+  return soap_set_error(soap, faultcode, r, s, t, SOAP_FAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_sender_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_receiver_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault(struct soap *soap, FILE *fd)
+{ if (soap_check_state(soap))
+    fprintf(fd, "Error: soap struct not initialized\n");
+  else if (soap->error)
+  { const char *c, *v = NULL, *s, **d;
+    d = soap_faultcode(soap);
+    if (!*d)
+      soap_set_fault(soap);
+    c = *d;
+    if (soap->version == 2)
+      v = *soap_faultsubcode(soap);
+    s = *soap_faultstring(soap);
+    d = soap_faultdetail(soap);
+    fprintf(fd, "%s%d fault: %s [%s]\n\"%s\"\nDetail: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, c, v ? v : "no subcode", s ? s : "[no reason]", d && *d ? *d : "[no detail]");
+  }
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault_location(struct soap *soap, FILE *fd)
+{ 
+#ifndef WITH_LEAN
+  int i, j, c1, c2;
+  if (soap->error && soap->buflen > 0)
+  { i = (int)soap->bufidx - 1;
+    if (i <= 0)
+      i = 0;
+    c1 = soap->buf[i];
+    soap->buf[i] = '\0';
+    if ((int)soap->buflen >= i + 1024)
+      j = i + 1023;
+    else
+      j = (int)soap->buflen - 1;
+    c2 = soap->buf[j];
+    soap->buf[j] = '\0';
+    fprintf(fd, "%s%c\n** HERE **\n", soap->buf, c1);
+    if (soap->bufidx < soap->buflen)
+      fprintf(fd, "%s\n", soap->buf + soap->bufidx);
+    soap->buf[i] = c1;
+    soap->buf[j] = c2;
+  }
+#endif
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void *arg)
+{ register struct soap_plugin *p;
+  register int r;
+  if (!(p = (struct soap_plugin*)SOAP_MALLOC(soap, sizeof(struct soap_plugin))))
+    return soap->error = SOAP_EOM;
+  p->id = NULL;
+  p->data = NULL;
+  p->fcopy = NULL;
+  p->fdelete = NULL;
+  r = fcreate(soap, p, arg);
+  if (!r && p->fdelete)
+  { p->next = soap->plugins;
+    soap->plugins = p;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Registered '%s' plugin\n", p->id));
+    return SOAP_OK;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not register plugin '%s': plugin returned error %d (or fdelete callback not set)\n", p->id?p->id:"?", r));
+  SOAP_FREE(soap, p);
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static void *
+fplugin(struct soap *soap, const char *id)
+{ register struct soap_plugin *p;
+  for (p = soap->plugins; p; p = p->next)
+    if (p->id == id || !strcmp(p->id, id))
+      return p->data;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void *
+SOAP_FMAC2
+soap_lookup_plugin(struct soap *soap, const char *id)
+{ return soap->fplugin(soap, id);
+}
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap()
+{ soap_init(this);
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	C++ soap struct methods
+ *
+\******************************************************************************/
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode mode)
+{ soap_init1(this, mode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode imode, soap_mode omode)
+{ soap_init2(this, imode, omode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(struct soap& soap)
+{ soap_copy_context(this, &soap);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::~soap()
+{ soap_destroy(this);
+  soap_end(this);
+  soap_done(this);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/samples/quote_VC/stdsoap2.h b/samples/quote_VC/stdsoap2.h
new file mode 100644
index 0000000..1b6c74d
--- /dev/null
+++ b/samples/quote_VC/stdsoap2.h
@@ -0,0 +1,2093 @@
+/*
+
+stdsoap2.h 2.7.6e
+
+gSOAP runtime
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+Contributors:
+
+Wind River Systems, Inc., for the following additions (marked WR[...]):
+  - vxWorks compatible
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#ifdef WITH_SOAPDEFS_H
+# include "soapdefs.h"		/* include user-defined stuff */
+#endif
+
+#ifndef _THREAD_SAFE
+# define _THREAD_SAFE
+#endif
+
+#ifndef OPENSERVER
+# ifndef _REENTRANT
+#  define _REENTRANT
+# endif
+#endif
+
+#ifndef SOAP_FMAC1	/* stdsoap2.h declaration macro */
+# define SOAP_FMAC1
+#endif
+
+#ifndef SOAP_FMAC2	/* stdsoap2.h declaration macro */
+# define SOAP_FMAC2
+#endif
+
+#ifndef SOAP_FMAC3	/* (de)serializer declaration macro */
+# define SOAP_FMAC3
+#endif
+
+#ifndef SOAP_FMAC3S	/* string converter for (de)serializer declaration macro */
+# define SOAP_FMAC3S SOAP_FMAC3
+#endif
+
+#ifndef SOAP_FMAC4	/* (de)serializer declaration macro */
+# define SOAP_FMAC4
+#endif
+
+#ifndef SOAP_FMAC4S	/* string converter for (de)serializer declaration macro */
+# define SOAP_FMAC4S SOAP_FMAC4
+#endif
+
+#ifndef SOAP_FMAC5	/* stub/skeleton declaration macro */
+# define SOAP_FMAC5
+#endif
+
+#ifndef SOAP_FMAC6	/* stub/skeleton declaration macro */
+# define SOAP_FMAC6
+#endif
+
+#ifndef SOAP_CMAC	/* class declaration macro */
+# define SOAP_CMAC
+#endif
+
+#ifndef SOAP_NMAC	/* namespace table declaration macro */
+# define SOAP_NMAC
+#endif
+
+#ifndef SOAP_SOURCE_STAMP
+# define SOAP_SOURCE_STAMP(str)
+#endif
+
+/* gSOAP 2.7.4 and higher: fast look-aside buffering is stable */
+#ifndef WITH_FAST
+# define WITH_FAST
+#endif
+
+#ifdef WITH_LEANER
+# ifndef WITH_LEAN
+#  define WITH_LEAN
+# endif
+#endif
+
+#ifdef WITH_LEAN
+# ifdef WITH_COOKIES
+#  error "Cannot build WITH_LEAN code WITH_COOKIES enabled"
+# endif
+#endif
+
+#ifndef STDSOAP_H
+#define STDSOAP_H
+
+#if defined(__vxworks) || defined(__VXWORKS__)
+# define VXWORKS
+#endif
+
+#ifdef _WIN32
+# ifndef WIN32
+#  define WIN32
+# endif
+#endif
+
+#ifdef UNDER_CE
+# ifndef WIN32
+#  define WIN32
+# endif
+#endif
+
+#ifdef __BORLANDC__
+# ifdef __WIN32__
+#  ifndef WIN32
+#   define WIN32
+#  endif
+# endif
+#endif
+
+#ifdef __CYGWIN__
+# ifndef CYGWIN
+#  define CYGWIN
+# endif
+#endif
+
+#ifdef __SYMBIAN32__ 
+# define SYMBIAN
+# undef WIN32
+#endif
+
+#if defined(__palmos__) || defined(PALM_GCC) || defined(__PALMOS_TRAPS__)
+# ifndef PALM
+#  define PALM
+# endif
+#endif
+
+#if defined(__hpux)
+# ifndef HP_UX
+#  define HP_UX
+# endif
+#endif
+
+#if defined(__alpha) && !defined(__VMS)
+# ifndef TRU64
+#  define TRU64 
+# endif
+#endif
+
+#ifdef __MVS__
+# ifndef OS390
+#  define OS390
+# endif
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+# ifdef WITH_OPENSSL
+#  ifndef HAVE_OPENSSL_SSL_H
+#   undef WITH_OPENSSL
+#  endif
+# endif
+#else
+# if defined(UNDER_CE)
+#  define WITH_LEAN
+#  define HAVE_SSCANF
+# elif defined(WIN32)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define SOAP_LONG_FORMAT "%I64d"
+#  define SOAP_ULONG_FORMAT "%I64u"
+# elif defined(CYGWIN)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(__APPLE__)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_TIMEGM
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(_AIXVERSION_431)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(HP_UX)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(FREEBSD) || defined(__FreeBSD__)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_STRTOLL
+#  define HAVE_STRTOULL
+#  define HAVE_GETTIMEOFDAY
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define SOAP_LONG_FORMAT "%qd"
+#  define SOAP_ULONG_FORMAT "%qu"
+# elif defined(__VMS)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(__GLIBC__) || defined(__GNU__)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_STRTOLL
+#  define HAVE_STRTOULL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_TIMEGM
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define HAVE_ISNAN
+# elif defined(TRU64)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_STRTOLL
+#  define HAVE_STRTOULL
+#  define HAVE_GETTIMEOFDAY
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define __USE_STD_IOSTREAM
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define SOAP_LONG_FORMAT "%ld"
+#  define SOAP_ULONG_FORMAT "%lu"
+# elif defined(MAC_CARBON)
+#  define WITH_NOIO
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GETHOSTBYNAME_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(PALM)
+#  define WITH_LEAN
+#  define HAVE_STRTOD   /* strtod() is defined in palmFunctions.h */
+#  include <stdlib.h>	/* Needs to be included before unix headers */
+#  include <sys_types.h>
+#  define IGNORE_STDIO_STUBS
+#  include <StdIOPalm.h>
+#  define O_NONBLOCK FNONBIO
+#  include <sys_socket.h>
+#  include "palmFunctions.h"
+# elif defined(SYMBIAN)
+#  define WITH_LEAN
+#  define WITH_NONAMESPACES
+#  define HAVE_STRTOD	/* use STRTOD since sscanf doesn't seem to work */
+#  include <e32def.h>
+#  include <sys/ioctl.h>
+# elif defined(VXWORKS)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_PGMTIME_R
+#  define HAVE_PLOCALTIME_R
+#  define HAVE_MKTIME
+# elif defined(OS390)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(AS400)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# else
+/* Default asumptions on supported functions */
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GETHOSTBYNAME_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# endif
+#endif
+
+/* QNX does not have a working version of strtof */
+#if defined(__QNX__) || defined(QNX)
+# undef HAVE_STRTOF
+#endif
+
+#ifndef SOAP_LONG_FORMAT
+# define SOAP_LONG_FORMAT "%lld"	/* printf format for 64 bit ints */
+#endif
+
+#ifndef SOAP_ULONG_FORMAT
+# define SOAP_ULONG_FORMAT "%llu"	/* printf format for unsigned 64 bit ints */
+#endif
+
+#ifndef WITH_NOSTDLIB
+# include <stdlib.h>
+# ifndef PALM
+#  include <stdio.h>
+#  include <string.h>
+# endif
+# include <ctype.h>
+# include <limits.h>
+#endif
+
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+# include <string>
+# include <iostream>
+#endif
+
+#ifdef WITH_NOHTTP
+# ifndef WITH_NOIO
+#  define WITH_NOIO
+#  undef WITH_COOKIES
+# endif
+#endif
+
+#ifndef UNDER_CE
+# ifndef PALM
+#  ifndef WITH_NOIO
+#   include <errno.h>
+#   include <sys/types.h>
+#  endif
+#  ifndef WITH_LEAN
+#   ifdef HAVE_SYS_TIMEB_H
+#    include <sys/timeb.h>		/* for ftime() */
+#   endif
+#   include <time.h>
+#  endif
+# endif
+#endif
+
+#ifdef OPENSERVER
+# include <sys/socket.h>
+# include <sys/stream.h>
+# include <sys/protosw.h>
+  extern int h_errno;
+#endif
+
+#ifndef WITH_NOIO
+# ifndef WIN32
+#  ifndef PALM
+#   include <sys/socket.h>
+#   ifdef VXWORKS
+#    include <sockLib.h>
+#    include <selectLib.h>
+#   endif
+#   ifndef VXWORKS
+#    ifndef SYMBIAN
+#     include <strings.h>
+#    endif
+#   endif
+#   ifdef SUN_OS
+#    include <sys/stream.h>		/* SUN */
+#    include <sys/socketvar.h>		/* SUN < 2.8 (?) */
+#   endif
+#   ifdef VXWORKS
+#    ifdef _WRS_KERNEL
+#     include <sys/times.h>
+#    endif
+#   else
+#    include <sys/time.h>
+#   endif
+#   include <netinet/in.h>
+#   ifdef OS390
+#    include <netinet/tcp_var.h>
+#   else
+#    include <netinet/tcp.h>          /* TCP_NODELAY */
+#   endif
+#   include <arpa/inet.h>
+#  endif
+# endif
+#endif
+
+#ifdef WITH_FASTCGI
+# include <fcgi_stdio.h>
+#endif
+
+#ifdef WITH_OPENSSL
+# define OPENSSL_NO_KRB5
+# include <openssl/ssl.h>
+# include <openssl/err.h>
+# include <openssl/rand.h>
+# ifndef ALLOW_OLD_VERSIONS
+#  if (OPENSSL_VERSION_NUMBER < 0x00905100L)
+#   error "Must use OpenSSL 0.9.6 or later"
+#  endif
+# endif
+#endif
+
+#ifdef WITH_GZIP
+# ifndef WITH_ZLIB
+#  define WITH_ZLIB
+# endif
+#endif
+
+#ifdef WITH_CASEINSENSITIVETAGS
+# define SOAP_STRCMP soap_tag_cmp	/* case insensitve XML element/attribute names */
+#else
+# define SOAP_STRCMP strcmp		/* case sensitive XML element/attribute names */
+#endif
+
+#ifdef WITH_ZLIB
+# include <zlib.h>
+#endif
+
+#ifndef WITH_NOSTDLIB
+# ifndef PALM
+#  include <math.h>	/* for isnan() */
+# endif
+#endif
+
+/* #define DEBUG */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and messages (in file TEST.log) */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef WIN32
+# ifndef UNDER_CE
+#  include <io.h>
+#  include <fcntl.h>
+# endif
+# include <winsock.h>
+/* # include <winsock2.h> */ /* Alternative: use winsock2 (not available with eVC) */
+# ifdef WITH_IPV6
+#  include <ws2tcpip.h>
+#  include <wspiapi.h>
+# endif
+#else
+# ifdef VXWORKS
+#  include <hostLib.h>
+#  include <ioctl.h>
+#  include <ioLib.h>
+# endif
+# ifndef WITH_NOIO
+#  ifndef PALM
+#   include <netdb.h>
+#   include <netinet/in.h>
+#   include <unistd.h>
+#   include <fcntl.h>
+#  endif
+# endif
+#endif
+
+/* Portability: define SOAP_SOCKLEN_T */
+#if defined(_AIX)
+# define SOAP_SOCKLEN_T socklen_t
+#elif defined(SOCKLEN_T)
+# define SOAP_SOCKLEN_T SOCKLEN_T
+#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) || defined(FREEBSD) || defined(__FreeBSD__) || defined(__QNX__) || defined(QNX)
+# define SOAP_SOCKLEN_T socklen_t
+#elif defined(IRIX) || defined(WIN32) || defined(__APPLE__) || defined(HP_UX) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS)
+# define SOAP_SOCKLEN_T int
+#else
+# define SOAP_SOCKLEN_T size_t
+#endif
+
+#ifndef SOAP_SOCKET
+# ifdef WIN32
+#  define SOAP_SOCKET SOCKET
+# else
+#  define SOAP_SOCKET int
+#  define closesocket(n) close(n)
+# endif
+#endif
+
+#define SOAP_INVALID_SOCKET (-1)
+#define soap_valid_socket(n) ((n) != SOAP_INVALID_SOCKET)
+
+#if defined(SYMBIAN)
+# define LONG64 long
+# define ULONG64 unsigned LONG64
+#elif !defined(WIN32) || defined(__GLIBC__) || defined(__GNU__)
+# ifndef LONG64
+#  define LONG64 long long
+#  define ULONG64 unsigned LONG64
+# endif
+#elif defined(UNDER_CE)
+# define LONG64 __int64
+# define ULONG64 unsigned LONG64
+#elif defined(__BORLANDC__)
+# define LONG64 __int64
+# define ULONG64 unsigned LONG64
+#endif
+
+#if defined(WIN32)
+# define soap_int32 __int32
+#elif defined(SYMBIAN)
+# define soap_int32 long
+#elif defined(PALM)
+# define soap_int32 Int32
+#else
+# define soap_int32 int32_t
+#endif
+
+#ifdef WIN32
+# define SOAP_ERANGE ERANGE
+# define SOAP_EINTR WSAEINTR
+# define SOAP_EAGAIN WSAEWOULDBLOCK
+# define SOAP_EWOULDBLOCK WSAEWOULDBLOCK
+# define SOAP_EINPROGRESS WSAEINPROGRESS
+#else
+# define SOAP_ERANGE ERANGE
+# define SOAP_EINTR EINTR
+# define SOAP_EAGAIN EAGAIN
+# ifdef SYMBIAN
+#  define SOAP_EWOULDBLOCK 9898
+#  define SOAP_EINPROGRESS 9899
+# else
+#  define SOAP_EWOULDBLOCK EWOULDBLOCK
+#  define SOAP_EINPROGRESS EINPROGRESS
+# endif
+#endif
+
+#ifdef WIN32
+# ifdef UNDER_CE
+#  define soap_errno GetLastError()
+#  define soap_socket_errno GetLastError()
+#  define soap_reset_errno SetLastError(0)
+# else
+#  define soap_errno GetLastError()
+#  define soap_socket_errno WSAGetLastError()
+#  define soap_reset_errno SetLastError(0)
+# endif
+#else
+# ifndef WITH_NOIO
+#  define soap_errno errno
+#  define soap_socket_errno errno
+#  define soap_reset_errno (errno = 0)
+# else
+#  define soap_errno 0
+#  define soap_socket_errno 0
+#  define soap_reset_errno
+# endif
+#endif
+
+#ifndef SOAP_BUFLEN
+# ifdef WITH_UDP
+#  define SOAP_BUFLEN (65536) /* max UDP packet size */
+# else
+#  ifndef WITH_LEAN
+#   define SOAP_BUFLEN (65536) /* buffer length for socket packets, also used by gethostbyname_r so don't make this too small */
+#  else
+#   define SOAP_BUFLEN  (2048)
+#  endif
+# endif
+#endif
+#ifndef SOAP_LABLEN
+# define SOAP_LABLEN     (64) /* initial look-aside buffer length */
+#endif
+#ifndef SOAP_PTRBLK
+# define SOAP_PTRBLK     (32) /* block allocation for pointer hash table chains */
+#endif
+#ifndef SOAP_PTRHASH
+# ifndef WITH_LEAN
+#  define SOAP_PTRHASH (1024) /* size of pointer analysis hash table (must be power of 2) */
+# else
+#  define SOAP_PTRHASH   (32)
+# endif
+#endif
+#ifndef SOAP_IDHASH
+# ifndef WITH_LEAN
+#  define SOAP_IDHASH  (1999) /* prime size of hash table for parsed id/ref */
+# else
+#  define SOAP_IDHASH    (19) /* 19, 199 */
+# endif
+#endif
+#ifndef SOAP_BLKLEN
+# ifndef WITH_LEAN
+#  define SOAP_BLKLEN   (256) /* size of blocks to collect long strings and XML attributes */
+# else
+#  define SOAP_BLKLEN    (32)
+# endif
+#endif
+#ifndef SOAP_TAGLEN
+# ifndef WITH_LEAN
+#  define SOAP_TAGLEN  (1024) /* maximum length of XML element tag/attribute name or host/path name + 1 */
+# else
+#  define SOAP_TAGLEN    (64)
+# endif
+#endif
+#ifndef SOAP_HDRLEN
+# ifndef WITH_LEAN
+#  define SOAP_HDRLEN  (8192) /* maximum length of HTTP header line (must be >4096 to read cookies) */
+# else
+#  define SOAP_HDRLEN  (1024)
+# endif
+#endif
+#ifndef SOAP_MAXDIMS
+# ifndef WITH_LEAN
+#  define SOAP_MAXDIMS	 (16) /* maximum array dimensions (array nestings) must be less than 64 to protect soap->tmpbuf */
+# else
+#  define SOAP_MAXDIMS	  (4)
+# endif
+#endif
+
+#ifndef SOAP_MAXLOGS
+# define SOAP_MAXLOGS	  (3) /* max number of debug logs per struct soap environment */
+# define SOAP_INDEX_RECV  (0)
+# define SOAP_INDEX_SENT  (1)
+# define SOAP_INDEX_TEST  (2)
+#endif
+
+#ifndef SOAP_MAXKEEPALIVE
+# define SOAP_MAXKEEPALIVE (100) /* max iterations to keep server connection alive */
+#endif
+
+#ifndef SOAP_MAXARRAYSIZE
+# define SOAP_MAXARRAYSIZE (100000) /* "trusted" max size of inbound SOAP array for compound array allocation */
+#endif
+
+#ifdef VXWORKS
+# ifdef __INCmathh 
+#  include <private/mathP.h>
+#  ifndef HAVE_ISNAN
+#   define HAVE_ISNAN
+#  endif
+#  define soap_isnan(num) isNan(num)
+# endif
+#endif
+
+#ifdef WIN32 
+# include <float.h>
+# ifndef HAVE_ISNAN
+#  define HAVE_ISNAN
+# endif
+# define soap_isnan(num) _isnan(num)
+#endif
+
+#ifdef SUN_OS
+# define soap_isnan(n) isnan(n)
+#endif
+
+#if !defined(HAVE_ISNAN) && (defined(_MATH_H) || defined(_MATH_INCLUDED))
+# define HAVE_ISNAN
+#endif
+
+#ifndef soap_isnan
+# ifdef HAVE_ISNAN
+#  define soap_isnan(n) isnan(n)
+# else
+#  define soap_isnan(_) (0)
+# endif
+#endif
+
+extern const struct soap_double_nan { unsigned int n1, n2; } soap_double_nan;
+
+#ifdef VXWORKS
+# ifndef FLT_MAX
+#  define FLT_MAX _ARCH_FLT_MAX
+# endif
+# ifndef DBL_MAX
+#  define DBL_MAX _ARCH_DBL_MAX
+# endif
+#endif
+
+#ifndef FLT_NAN
+# ifdef HAVE_ISNAN
+#  define FLT_NAN (*(float*)(void*)&soap_double_nan)
+# else
+#  define FLT_NAN (0.0)
+# endif
+#endif
+
+#ifndef FLT_PINFTY
+# if defined(FLT_MAX)
+#  define FLT_PINFTY FLT_MAX
+# elif defined(HUGE_VALF)
+#  define FLT_PINFTY (float)HUGE_VALF
+# elif defined(HUGE_VAL)
+#  define FLT_PINFTY (float)HUGE_VAL
+# elif defined(FLOAT_MAX)
+#  define FLT_PINFTY FLOAT_MAX
+# else
+#  define FLT_PINFTY (3.40282347e+38F)
+# endif
+#endif
+
+#ifndef FLT_NINFTY
+# define FLT_NINFTY (-FLT_PINFTY)
+#endif
+
+#ifndef DBL_NAN
+# ifdef HAVE_ISNAN
+#  define DBL_NAN (*(double*)(void*)&soap_double_nan)
+# else
+#  define DBL_NAN (0.0)
+# endif
+#endif
+
+#ifndef DBL_PINFTY
+# if defined(DBL_MAX)
+#  define DBL_PINFTY DBL_MAX
+# elif defined(HUGE_VALF)
+#  define DBL_PINFTY (double)HUGE_VALF
+# elif defined(HUGE_VAL)
+#  define DBL_PINFTY (double)HUGE_VAL
+# elif defined(DOUBLE_MAX)
+#  define DBL_PINFTY DOUBLE_MAX
+# else
+#  define DBL_PINFTY (1.7976931348623157e+308)
+# endif
+#endif
+
+#ifndef DBL_NINFTY
+# define DBL_NINFTY (-DBL_PINFTY)
+#endif
+
+#define soap_ispinfd(n) ((n) >= DBL_PINFTY)
+#define soap_ispinff(n) ((n) >= FLT_PINFTY)
+#define soap_isninfd(n) ((n) <= DBL_NINFTY)
+#define soap_isninff(n) ((n) <= FLT_NINFTY)
+
+/* gSOAP error codes */
+
+#define SOAP_EOF			EOF
+#define SOAP_ERR			EOF
+#define SOAP_OK				0
+#define SOAP_CLI_FAULT			1
+#define SOAP_SVR_FAULT			2
+#define SOAP_TAG_MISMATCH		3
+#define SOAP_TYPE			4
+#define SOAP_SYNTAX_ERROR		5
+#define SOAP_NO_TAG			6
+#define SOAP_IOB			7
+#define SOAP_MUSTUNDERSTAND		8
+#define SOAP_NAMESPACE			9
+#define SOAP_USER_ERROR			10
+#define SOAP_FATAL_ERROR		11
+#define SOAP_FAULT			12
+#define SOAP_NO_METHOD			13
+#define SOAP_GET_METHOD			14
+#define SOAP_EOM			15
+#define SOAP_NULL			16
+#define SOAP_DUPLICATE_ID		17
+#define SOAP_MISSING_ID			18
+#define SOAP_HREF			19
+#define SOAP_UDP_ERROR			20
+#define SOAP_TCP_ERROR			21
+#define SOAP_HTTP_ERROR			22
+#define SOAP_SSL_ERROR			23
+#define SOAP_ZLIB_ERROR			24
+#define SOAP_DIME_ERROR			25
+#define SOAP_DIME_HREF			26
+#define SOAP_DIME_MISMATCH		27
+#define SOAP_DIME_END			28
+#define SOAP_MIME_ERROR			29
+#define SOAP_MIME_HREF			30
+#define SOAP_MIME_END			31
+#define SOAP_VERSIONMISMATCH		32
+#define SOAP_PLUGIN_ERROR		33
+#define SOAP_DATAENCODINGUNKNOWN	34
+#define SOAP_REQUIRED			35
+#define SOAP_PROHIBITED			36
+#define SOAP_OCCURS			37
+#define SOAP_LENGTH			38
+
+#define soap_xml_error_check(e) ((e) == SOAP_TAG_MISMATCH || (e) == SOAP_TAG_END || (e) == SOAP_SYNTAX_ERROR || (e) == SOAP_NAMESPACE || (e) == SOAP_DUPLICATE_ID || (e) == SOAP_MISSING_ID || (e) == SOAP_REQUIRED || (e) == SOAP_PROHIBITED || (e) == SOAP_OCCURS || (e) == SOAP_LENGTH || (e) == SOAP_NULL || (e) == SOAP_HREF)
+#define soap_soap_error_check(e) ((e) == SOAP_CLI_FAULT || (e) == SOAP_SVR_FAULT || (e) == SOAP_VERSIONMISMATCH || (e) == SOAP_MUSTUNDERSTAND || (e) == SOAP_FAULT || (e) == SOAP_NO_METHOD)
+#define soap_tcp_error_check(e) ((e) == SOAP_EOF || (e) == SOAP_TCP_ERROR)
+#define soap_ssl_error_check(e) ((e) == SOAP_SSL_ERROR)
+#define soap_zlib_error_check(e) ((e) == SOAP_ZLIB_ERROR)
+#define soap_http_error_check(e) ((e) == SOAP_HTTP_ERROR || (e) == SOAP_GET_METHOD || ((e) >= 100 && (e) < 600))
+
+/* gSOAP HTTP response status codes 100 to 599 are reserved */
+
+/* Codes 600 to 999 are user definable */
+
+/* Exceptional gSOAP HTTP response status codes >= 1000 */
+
+#define SOAP_STOP		1000	/* No HTTP response */
+#define SOAP_FORM		1001	/* Form request/response */
+#define SOAP_HTML		1002	/* Custom HTML response */
+#define SOAP_FILE		1003	/* Custom file-based response */
+
+/* gSOAP HTTP method codes */
+
+#define SOAP_POST		2000
+#define SOAP_GET		2001
+
+/* gSOAP DIME */
+
+#define SOAP_DIME_CF		0x01
+#define SOAP_DIME_ME		0x02
+#define SOAP_DIME_MB		0x04
+#define SOAP_DIME_VERSION	0x08 /* DIME version 1 */
+#define SOAP_DIME_MEDIA		0x10
+#define SOAP_DIME_ABSURI	0x20
+
+/* gSOAP ZLIB */
+
+#define SOAP_ZLIB_NONE		0x00
+#define SOAP_ZLIB_DEFLATE	0x01
+#define SOAP_ZLIB_INFLATE	0x02
+#define SOAP_ZLIB_GZIP		0x02
+
+/* gSOAP transport, connection, and content encoding modes */
+
+typedef soap_int32 soap_mode;
+
+#define SOAP_IO			0x00000003	/* IO mask */
+#define SOAP_IO_FLUSH		0x00000000	/* flush output immediately, no buffering */
+#define SOAP_IO_BUFFER		0x00000001	/* buffer output in packets of size SOAP_BUFLEN */
+#define SOAP_IO_STORE		0x00000002	/* store entire output to determine length for transport */
+#define SOAP_IO_CHUNK		0x00000003	/* use HTTP chunked transfer AND buffer packets */
+
+#define SOAP_IO_UDP		0x00000004
+#define SOAP_IO_LENGTH		0x00000008
+#define SOAP_IO_KEEPALIVE	0x00000010
+
+#define SOAP_ENC_LATIN		0x00800020	/* iso-8859-1 encoding */
+#define SOAP_ENC_XML		0x00000040	/* plain XML encoding, no HTTP header */
+#define SOAP_ENC_DIME		0x00000080
+#define SOAP_ENC_MIME		0x00000100
+#define SOAP_ENC_MTOM		0x00000200
+#define SOAP_ENC_ZLIB		0x00000400
+#define SOAP_ENC_SSL		0x00000800
+
+#define SOAP_ENC		0x00000FFF	/* IO and ENC mask */
+
+#define SOAP_XML_STRICT		0x00001000	/* strict validation */
+#define SOAP_XML_INDENT		0x00002000
+#define SOAP_XML_CANONICAL	0x00004000	/* EXC C14N canonical XML */
+#define SOAP_XML_TREE		0x00008000
+#define SOAP_XML_GRAPH		0x00010000
+#define SOAP_XML_NIL		0x00020000
+#define SOAP_XML_DOM		0x00040000
+#define SOAP_XML_SEC		0x00080000	/* reserved for WS security */
+
+#define SOAP_C_NOIOB		0x00100000
+#define SOAP_C_UTFSTRING	0x00200000
+#define SOAP_C_MBSTRING		0x00400000
+
+#define SOAP_DOM_TREE		0x01000000
+#define SOAP_DOM_NODE		0x02000000
+#define SOAP_DOM_ASIS		0x04000000
+
+#define SOAP_IO_DEFAULT		SOAP_IO_FLUSH
+
+/* SSL client/server authentication settings */
+
+#define SOAP_SSL_NO_AUTHENTICATION		0x00	/* for testing purposes */
+#define SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION	0x01	/* client requires server to authenticate */
+#define SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION	0x02	/* server requires client to authenticate */
+
+#define SOAP_SSL_DEFAULT			SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION
+
+/* state */
+
+#define SOAP_INIT	1
+#define SOAP_COPY	2
+
+#define soap_check_state(soap) (!(soap) || ((soap)->state != SOAP_INIT && (soap)->state != SOAP_COPY))
+
+/* part */
+
+#define SOAP_BEGIN		0
+#define SOAP_IN_ENVELOPE	2
+#define SOAP_IN_HEADER		3
+#define SOAP_END_HEADER		4
+#define SOAP_NO_BODY		5
+#define SOAP_IN_BODY		6
+#define SOAP_END_BODY		7
+#define SOAP_END_ENVELOPE	8
+#define SOAP_END		9
+#define SOAP_BEGIN_SECURITY	10
+#define SOAP_IN_SECURITY	11
+#define SOAP_END_SECURITY	12
+
+/* DEBUG macros */
+
+#ifndef WITH_LEAN
+# ifdef DEBUG
+#  ifndef SOAP_DEBUG
+#   define SOAP_DEBUG
+#  endif
+# endif
+#endif
+
+#ifdef SOAP_DEBUG
+# define SOAP_MALLOC(soap, size) soap_track_malloc(soap, __FILE__, __LINE__, size)
+# define SOAP_FREE(soap, ptr) soap_track_free(soap, __FILE__, __LINE__, ptr)
+#endif
+
+#ifndef SOAP_MALLOC			/* use libc malloc */
+# define SOAP_MALLOC(soap, size) malloc(size)
+#endif
+
+#ifndef SOAP_FREE			/* use libc free */
+# define SOAP_FREE(soap, ptr) free(ptr)
+#endif
+
+#ifdef SOAP_DEBUG
+# ifndef SOAP_MESSAGE
+#  define SOAP_MESSAGE fprintf
+# endif
+# ifndef DBGLOG
+#  define DBGLOG(DBGFILE, CMD) \
+{ if (soap)\
+  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
+      soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\
+    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
+    { FILE *fdebug = soap->fdebug[SOAP_INDEX_##DBGFILE];\
+      CMD;\
+      fflush(fdebug);\
+    }\
+  }\
+}
+# endif
+# ifndef DBGMSG
+#  define DBGMSG(DBGFILE, MSG, LEN) \
+{ if (soap)\
+  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
+      soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\
+    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
+    { fwrite((MSG), 1, (LEN), soap->fdebug[SOAP_INDEX_##DBGFILE]);\
+      fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\
+    }\
+  }\
+}
+# endif
+# ifndef DGBFUN
+#  define DBGFUN(FNAME) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s()\n", __FILE__, __LINE__, FNAME))
+#  define DBGFUN1(FNAME, FMT, ARG) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT")\n", __FILE__, __LINE__, FNAME, (ARG)))
+#  define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2)))
+#  define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2", "FMT3")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2), (ARG3)))
+# endif
+# ifndef DBGHEX
+#  define DBGHEX(DBGFILE, MSG, LEN) \
+{ if (soap)\
+  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
+      soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\
+    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
+    { int i; char *s;\
+      for (s = (char*)(MSG), i = (LEN); i; i--)\
+        fprintf(soap->fdebug[SOAP_INDEX_##DBGFILE], "%2.2hhX  ", *s++);\
+      fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\
+    }\
+  }\
+}
+# endif
+#else
+# define DBGLOG(DBGFILE, CMD)
+# define DBGMSG(DBGFILE, MSG, LEN)
+# define DBGFUN(FNAME)
+# define DBGFUN1(FNAME, FMT, ARG)
+# define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2)
+# define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3)
+# define DBGHEX(DBGFILE, MSG, LEN)
+#endif
+
+/* UCS-4 requires 32 bits (0-7FFFFFFF, the sign bit is used by gSOAP to distinguish XML entities) */
+typedef soap_int32 soap_wchar;
+
+/* namespace table row */
+struct Namespace
+{ const char *id;
+  const char *ns;
+  const char *in;
+  char *out;
+};
+
+/* namespace stack */
+struct soap_nlist
+{ struct soap_nlist *next;
+  unsigned int level; /* nesting depth level */
+  short index; /* corresponding entry in ns mapping table */
+  char *ns; /* only set when parsed ns URI is not in the ns mapping table */
+  char id[1]; /* the actual string value flows into the allocated region below this struct */
+};
+
+/* block stack for nested block allocations */
+struct soap_blist
+{ struct soap_blist *next;
+  char *ptr;
+  size_t size;
+};
+
+/* array layout */
+struct soap_array
+{ void *__ptr;
+  int __size;
+};
+
+/* pointer serialization management */
+struct soap_plist
+{ struct soap_plist *next;
+  const void *ptr;
+  const struct soap_array *array;
+  int type;
+  int id;
+  char mark1;
+  char mark2;
+};
+
+/* block allocation for pointer serialization management */
+struct soap_pblk
+{ struct soap_pblk *next;
+  struct soap_plist plist[SOAP_PTRBLK];
+};
+
+#ifdef SOAP_DEBUG
+/* malloc/free tracking for debugging */
+struct soap_mlist
+{ struct soap_mlist *next;
+  const void *ptr;
+  const char *file;
+  int line;
+  short live;
+};
+#endif
+
+/* class allocation list */
+struct soap_clist
+{ struct soap_clist *next;
+  void *ptr;
+  int type;
+  int size;
+  void (*fdelete)(struct soap_clist*);
+};
+
+/* attributes */
+struct soap_attribute
+{ struct soap_attribute *next;
+  char *value;
+  size_t size;
+  char *ns;
+  short visible;
+  char name[1]; /* the actual name string flows into the allocated region below this struct */
+};
+
+struct soap_cookie
+{ struct soap_cookie *next;
+  char *name;
+  char *value;
+  char *domain;
+  char *path;
+  long expire;		/* client-side: local time to expire; server-side: seconds to expire */
+  unsigned int version;
+  short secure;
+  short session;	/* server-side */
+  short env;		/* server-side: got cookie from client and should not be (re)send */
+  short modified;	/* server-side: client cookie was modified and should be send */
+};
+
+#ifdef __cplusplus
+SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*);
+
+class soap_multipart_iterator
+{ public:
+  struct soap_multipart *content;
+  bool operator==(const soap_multipart_iterator& iter) const
+    { return content == iter.content; }
+  bool operator!=(const soap_multipart_iterator& iter) const
+    { return content != iter.content; }
+  struct soap_multipart &operator*() const
+    { return *content; }
+  soap_multipart_iterator &operator++()
+    { content = soap_next_multipart(content); return *this; }
+  soap_multipart_iterator() : content(NULL)
+    { }
+  soap_multipart_iterator(struct soap_multipart *p) : content(p)
+    { }
+};
+#endif
+
+#ifndef WITH_LEANER
+struct soap_dime
+{ size_t count;
+  size_t size;
+  size_t chunksize;
+  size_t buflen;
+  char flags;
+  char *ptr;
+  const char *id;
+  const char *type;
+  const char *options;
+  struct soap_multipart *list;		/* list of DIME attachments received */
+  struct soap_multipart *first, *last;	/* temporary in/out queue */
+#ifdef __cplusplus
+  soap_multipart_iterator begin()
+    { soap_multipart_iterator iter(list); return iter; };
+  soap_multipart_iterator end()
+    { soap_multipart_iterator iter(NULL); return iter; };
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+struct soap_mime
+{ char *boundary;			/* MIME boundary */
+  const char *start;			/* MIME start ID */
+  struct soap_multipart *list;		/* list of MIME attachments received */
+  struct soap_multipart *first, *last;	/* temporary in/out queue */
+#ifdef __cplusplus
+  soap_multipart_iterator begin()
+    { soap_multipart_iterator iter(list); return iter; };
+  soap_multipart_iterator end()
+    { soap_multipart_iterator iter(NULL); return iter; };
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+/* RFC2045 MIME content transfer encodings */
+enum soap_mime_encoding
+{ SOAP_MIME_NONE,
+  SOAP_MIME_7BIT,
+  SOAP_MIME_8BIT,
+  SOAP_MIME_BINARY,
+  SOAP_MIME_QUOTED_PRINTABLE,
+  SOAP_MIME_BASE64,
+  SOAP_MIME_IETF_TOKEN,
+  SOAP_MIME_X_TOKEN
+};
+#endif
+
+#ifndef WITH_LEANER
+/* DIME/MIME multipart list */
+struct soap_multipart
+{ struct soap_multipart *next;
+  char *ptr;				/* points to raw data content */
+  size_t size;				/* size of data content */
+  const char *id;			/* DIME/MIME content ID or form data name */
+  const char *type;			/* DIME/MIME type (MIME type format) */
+  const char *options;			/* DIME options */
+  enum soap_mime_encoding encoding;	/* MIME Content-Transfer-Encoding */
+  const char *location;			/* MIME Content-Location (optional) */
+  const char *description;		/* MIME Content-Description (optional) */
+#ifdef __cplusplus
+  typedef soap_multipart_iterator iterator;
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+/* attachment DIME and MTOM XOP forwarding */
+struct soap_xlist
+{ struct soap_xlist *next;
+  unsigned char **ptr;
+  int *size;
+  char *id;
+  char **type;
+  char **options;
+};
+#endif
+
+/******************************************************************************/
+
+#ifndef WITH_LEANER
+#ifdef __cplusplus
+class soap_dom_attribute_iterator
+{ public:
+  struct soap_dom_attribute *att;
+  const char *nstr;
+  const char *name;
+  bool operator==(const soap_dom_attribute_iterator&) const;
+  bool operator!=(const soap_dom_attribute_iterator&) const;
+  struct soap_dom_attribute &operator*() const;
+  soap_dom_attribute_iterator &operator++();
+  soap_dom_attribute_iterator();
+  soap_dom_attribute_iterator(struct soap_dom_attribute*);
+  ~soap_dom_attribute_iterator();
+};
+#endif
+#endif
+
+#ifndef WITH_LEANER
+struct soap_dom_attribute
+{ struct soap_dom_attribute *next;
+  const char *nstr;
+  char *name;
+  char *data;
+  wchar_t *wide;
+  struct soap *soap;
+#ifdef __cplusplus
+  typedef soap_dom_attribute_iterator iterator;
+  struct soap_dom_attribute &set(const char *nstr, const char *name);	/* set namespace and name */
+  struct soap_dom_attribute &set(const char *data);		/* set data */
+  soap_dom_attribute_iterator begin();
+  soap_dom_attribute_iterator end();
+  soap_dom_attribute_iterator find(const char *nstr, const char *name);
+  void unlink();
+  soap_dom_attribute();
+  soap_dom_attribute(struct soap *soap);
+  soap_dom_attribute(struct soap *soap, const char *nstr, const char *name, const char *data);
+  ~soap_dom_attribute();
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+#ifdef __cplusplus
+class soap_dom_element_iterator
+{ public:
+  struct soap_dom_element *elt;
+  const char *nstr;
+  const char *name;
+  int type;
+  bool operator==(const soap_dom_element_iterator&) const;
+  bool operator!=(const soap_dom_element_iterator&) const;
+  struct soap_dom_element &operator*() const;
+  soap_dom_element_iterator &operator++();
+  soap_dom_element_iterator();
+  soap_dom_element_iterator(struct soap_dom_element*);
+  ~soap_dom_element_iterator();
+};
+#endif
+#endif
+
+#ifndef WITH_LEANER
+struct soap_dom_element
+{ struct soap_dom_element *next;	/* next sibling */
+  struct soap_dom_element *prnt;	/* parent */
+  struct soap_dom_element *elts;	/* list of child elements */
+  struct soap_dom_attribute *atts;	/* list of attributes */
+  const char *nstr;			/* namespace string */
+  char *name;				/* element tag name */
+  char *data;				/* element content data (with SOAP_C_UTFSTRING flag set) */
+  wchar_t *wide;			/* element content data */
+  int type;				/* optional: serialized C/C++ data type */
+  void *node;				/* optional: pointer to serialized C/C++ data */
+  char *head;				/* leading whitespace to start tag */
+  char *tail;				/* leading whitespace to end tag */
+  struct soap *soap;			/* soap context that manages this node */
+#ifdef __cplusplus
+  typedef soap_dom_element_iterator iterator;
+  struct soap_dom_element &set(const char *nstr, const char *name);
+  struct soap_dom_element &set(const char *data);
+  struct soap_dom_element &set(void *node, int type);
+  struct soap_dom_element &add(struct soap_dom_element*);
+  struct soap_dom_element &add(struct soap_dom_element&);
+  struct soap_dom_element &add(struct soap_dom_attribute*);
+  struct soap_dom_element &add(struct soap_dom_attribute&);
+  soap_dom_element_iterator begin();
+  soap_dom_element_iterator end();
+  soap_dom_element_iterator find(const char *nstr, const char *name);
+  soap_dom_element_iterator find(int type);
+  void unlink();
+  soap_dom_element();
+  soap_dom_element(struct soap *soap);
+  soap_dom_element(struct soap *soap, const char *nstr, const char *name);
+  soap_dom_element(struct soap *soap, const char *nstr, const char *name, const char *data);
+  soap_dom_element(struct soap *soap, const char *nstr, const char *name, void *node, int type);
+  ~soap_dom_element();
+#endif
+};
+SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_dom_next_element(struct soap_dom_element *elt);
+SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_dom_next_attribute(struct soap_dom_attribute *att);
+#endif
+
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+}
+extern std::ostream &operator<<(std::ostream&, const struct soap_dom_element&);
+extern std::istream &operator>>(std::istream&, struct soap_dom_element&);
+extern "C" {
+#endif
+
+/******************************************************************************/
+
+struct soap
+{ short state;			/* 0 = uninitialized, 1 = initialized, 2 = copy of another soap struct */
+  short version;		/* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table) */
+  soap_mode mode;
+  soap_mode imode;
+  soap_mode omode;
+  const char *float_format;	/* user-definable format string for floats (<1024 chars) */
+  const char *double_format;	/* user-definable format string for doubles (<1024 chars) */
+  const char *dime_id_format;	/* user-definable format string for integer DIME id (<SOAP_TAGLEN chars) */
+  const char *http_version;	/* HTTP version used "1.0" or "1.1" */
+  const char *http_content;	/* optional custom response content type (with SOAP_FILE) */
+  const char *encodingStyle;	/* default = NULL which means that SOAP encoding is used */
+  const char *actor;		/* SOAP-ENV:actor or role attribute value */
+  int recv_timeout;		/* when > 0, gives socket recv timeout in seconds, < 0 in usec */
+  int send_timeout;		/* when > 0, gives socket send timeout in seconds, < 0 in usec */
+  int connect_timeout;		/* when > 0, gives socket connect() timeout in seconds, < 0 in usec */
+  int accept_timeout;		/* when > 0, gives socket accept() timeout in seconds, < 0 in usec */
+  int socket_flags;		/* socket recv() and send() flags, e.g. set to MSG_NOSIGNAL to disable sigpipe */
+  int connect_flags;		/* connect() SOL_SOCKET sockopt flags, e.g. set to SO_DEBUG to debug socket */
+  int bind_flags;		/* bind() SOL_SOCKET sockopt flags, e.g. set to SO_REUSEADDR to enable reuse */
+  int accept_flags;		/* accept() SOL_SOCKET sockopt flags */
+  const struct Namespace *namespaces;	/* Pointer to global namespace mapping table */
+  struct Namespace *local_namespaces;	/* Local namespace mapping table */
+  struct soap_nlist *nlist;	/* namespace stack */
+  struct soap_blist *blist;	/* block allocation stack */
+  struct soap_clist *clist;	/* class instance allocation list */
+  void *alist;			/* memory allocation (malloc) list */
+  struct soap_ilist *iht[SOAP_IDHASH];
+  struct soap_plist *pht[SOAP_PTRHASH];
+  struct soap_pblk *pblk;	/* plist block allocation */
+  short pidx;			/* plist block allocation */
+  struct SOAP_ENV__Header *header;
+  struct SOAP_ENV__Fault *fault;
+  int idnum;
+  void *user;			/* to pass user-defined data */
+  struct soap_plugin *plugins;	/* linked list of plug-in data */
+  char *userid;			/* HTTP Basic authorization userid */
+  char *passwd;			/* HTTP Basic authorization passwd */
+  int (*fpost)(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
+  int (*fget)(struct soap*);
+  int (*fform)(struct soap*);
+  int (*fposthdr)(struct soap*, const char*, const char*);
+  int (*fresponse)(struct soap*, int, size_t);
+  int (*fparse)(struct soap*);
+  int (*fparsehdr)(struct soap*, const char*, const char*);
+  int (*fresolve)(struct soap*, const char*, struct in_addr* inaddr);
+  int (*fconnect)(struct soap*, const char*, const char*, int);
+  int (*fdisconnect)(struct soap*);
+  int (*fclosesocket)(struct soap*, SOAP_SOCKET);
+  int (*fshutdownsocket)(struct soap*, SOAP_SOCKET, int);
+  int (*fopen)(struct soap*, const char*, const char*, int);
+  int (*faccept)(struct soap*, int, struct sockaddr*, int *n);
+  int (*fclose)(struct soap*);
+  int (*fsend)(struct soap*, const char*, size_t);
+  size_t (*frecv)(struct soap*, char*, size_t);
+  int (*fpoll)(struct soap*);
+  void (*fseterror)(struct soap*, const char **c, const char **s);
+  int (*fignore)(struct soap*, const char*);
+  int (*fserveloop)(struct soap*);
+  void *(*fplugin)(struct soap*, const char*);
+#ifndef WITH_LEANER
+  int (*fprepareinit)(struct soap*);
+  int (*fpreparesend)(struct soap*, const char*, size_t);
+  int (*fpreparerecv)(struct soap*, const char*, size_t);
+  int (*fpreparefinal)(struct soap*);
+  void *(*fdimereadopen)(struct soap*, void*, const char*, const char*, const char*);
+  void *(*fdimewriteopen)(struct soap*, const char*, const char*, const char*);
+  void (*fdimereadclose)(struct soap*, void*);
+  void (*fdimewriteclose)(struct soap*, void*);
+  size_t (*fdimeread)(struct soap*, void*, char*, size_t);
+  int (*fdimewrite)(struct soap*, void*, const char*, size_t);
+#endif
+  int master;
+  int socket;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  std::ostream *os;
+  std::istream *is;
+#else
+  void *os;	/* preserve alignment */
+  void *is;	/* preserve alignment */
+#endif
+#ifndef UNDER_CE
+  int sendfd;
+  int recvfd;
+#else
+  FILE *sendfd;
+  FILE *recvfd;
+#endif
+#ifdef WIN32
+  char errorstr[256];	/* buf for FormatMessage() */
+#endif
+  size_t bufidx;	/* index in soap.buf[] */
+  size_t buflen;	/* length of soap.buf[] content */
+  soap_wchar ahead;	/* parser lookahead */
+  short cdata;		/* CDATA parser state */
+  short body;		/* parsed XML element has a body or not */
+  unsigned int level;	/* XML nesting level */
+  size_t count;		/* message length counter */
+  size_t length;	/* message length as set by HTTP header */
+#ifdef WITH_FAST
+  char *labbuf;		/* look-aside buffer */
+  size_t lablen;	/* look-aside buffer allocated length */
+  size_t labidx;	/* look-aside buffer index to available part */
+#endif
+  char buf[SOAP_BUFLEN];/* send and receive buffer */
+  char tmpbuf[1024];	/* in/output buffer for HTTP headers, simpleType values, attribute names, and DIME >=1024 bytes */
+  char msgbuf[1024];	/* output buffer for (error) messages <=1024 bytes */
+  char tag[SOAP_TAGLEN];
+  char id[SOAP_TAGLEN];
+  char href[SOAP_TAGLEN];
+  char type[SOAP_TAGLEN];
+  char arrayType[SOAP_TAGLEN];
+  char arraySize[SOAP_TAGLEN];
+  char arrayOffset[SOAP_TAGLEN];
+  short other;
+  short position;
+  int positions[SOAP_MAXDIMS];
+  short root;
+  struct soap_attribute *attributes;	/* attribute list */
+  short encoding;	/* when set, output encodingStyle */
+  short mustUnderstand;	/* a mustUnderstand element was parsed or is output */
+  short keep_alive;	/* connection should be kept open */
+  short null;		/* parsed XML is xsi:nil */
+  short ns;		/* when not set, output full xmlns bindings */
+  short part;		/* parsing state */
+  short alloced;
+  short peeked;
+  size_t chunksize;
+  size_t chunkbuflen;
+  char endpoint[SOAP_TAGLEN];
+  char path[SOAP_TAGLEN];
+  char host[SOAP_TAGLEN];
+  char *action;
+  char *authrealm;		/* HTTP authentication realm */
+  char *prolog;			/* XML declaration prolog */
+  unsigned long ip;		/* IP number */
+  int port;			/* port number */
+  unsigned int max_keep_alive;
+  const char *proxy_host;	/* Proxy Server host name */
+  int proxy_port;		/* Proxy Server port (default = 8080) */
+  const char *proxy_userid;	/* Proxy Authorization user name */
+  const char *proxy_passwd;	/* Proxy Authorization password */
+  int status;			/* -1 when request, else error code to be returned by server */
+  int error;
+  int errmode;
+  int errnum;
+#ifndef WITH_LEANER
+  struct soap_dom_element *dom;
+  struct soap_dime dime;
+  struct soap_mime mime;
+  struct soap_xlist *xlist;
+#endif
+#if !defined(WITH_LEAN) || defined(SOAP_DEBUG)
+  const char *logfile[SOAP_MAXLOGS];
+  FILE *fdebug[SOAP_MAXLOGS];
+  struct soap_mlist *mht[SOAP_PTRHASH];
+#endif
+#ifndef WITH_LEAN
+  const char *c14ninclude;
+  const char *c14nexclude;
+  struct soap_cookie *cookies;
+  const char *cookie_domain;
+  const char *cookie_path;
+  int cookie_max;
+#endif
+#ifndef WITH_NOIO
+#ifdef WITH_IPV6
+  struct sockaddr_storage peer;	/* IPv6: set by soap_accept and by UDP recv */
+#else
+  struct sockaddr_in peer;	/* IPv4: set by soap_connect/soap_accept and by UDP recv */
+#endif
+  size_t peerlen;
+#endif
+#ifdef WITH_OPENSSL
+  int (*fsslauth)(struct soap*);
+  int (*fsslverify)(int, X509_STORE_CTX*);
+  BIO *bio;
+  SSL *ssl;
+  SSL_CTX *ctx;
+  short require_server_auth;
+  short require_client_auth;
+  short rsa;			/* when set, use RSA instead of DH */
+  const char *keyfile;
+  const char *password;
+  const char *dhfile;
+  const char *cafile;
+  const char *capath;
+  const char *crlfile;
+  const char *randfile;
+  SSL_SESSION *session;
+  char session_host[SOAP_TAGLEN];
+  int session_port;
+#endif
+#ifdef WITH_ZLIB
+  short zlib_state;		/* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_INFLATE */
+  short zlib_in;		/* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */
+  short zlib_out;		/* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */
+  z_stream d_stream;		/* decompression stream */
+  char z_buf[SOAP_BUFLEN];	/* buffer */
+  size_t z_buflen;
+  unsigned short z_level;	/* compression level to be used (0=none, 1=fast to 9=best) */
+  uLong z_crc;			/* internal gzip crc */
+  float z_ratio_in;		/* detected compression ratio compressed_length/length of inbound message */
+  float z_ratio_out;		/* detected compression ratio compressed_length/length of outbound message */
+#endif
+#ifdef WMW_RPM_IO
+  void *rpmreqid;
+#endif
+#ifndef WITH_LEAN
+#ifdef __cplusplus
+  soap();
+  soap(soap_mode);
+  soap(soap_mode, soap_mode);
+  soap(struct soap&);
+  ~soap();
+#endif
+#endif
+};
+
+struct soap_code_map
+{ long code;
+  const char *string;
+};
+
+/* forwarding list */
+struct soap_flist
+{ struct soap_flist *next;
+  int type;
+  void *ptr;
+  unsigned int level;
+  size_t len;
+  void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t);
+};
+
+/* id-ref forwarding list */
+struct soap_ilist
+{ struct soap_ilist *next;
+  int type;
+  size_t size;
+  void *link;
+  void *copy;
+  struct soap_flist *flist;
+  void *ptr;
+  unsigned int level;
+  char id[1]; /* the actual id string value flows into the allocated region below this struct */
+};
+
+struct soap_plugin
+{ struct soap_plugin *next;
+  const char *id;
+  void *data;
+  int (*fcopy)(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src);
+  void (*fdelete)(struct soap *soap, struct soap_plugin *p); /* should delete fields of plugin only and not free(p) */
+};
+
+#ifndef WITH_NONAMESPACES
+extern SOAP_NMAC struct Namespace namespaces[];
+#endif
+
+#ifndef WITH_LEAN
+# define soap_get0(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx])
+# define soap_get1(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx++])
+#else
+soap_wchar soap_get0(struct soap*);
+soap_wchar soap_get1(struct soap*);
+#endif
+
+#define soap_revget1(soap) ((soap)->bufidx--)
+#define soap_unget(soap, c) ((soap)->ahead = c)
+#define soap_register_plugin(soap, plugin) soap_register_plugin_arg(soap, plugin, NULL)
+#define soap_imode(soap, n) ((soap)->mode = (soap)->imode = (n))
+#define soap_set_imode(soap, n) ((soap)->imode |= (n))
+#define soap_clr_imode(soap, n) ((soap)->imode &= ~(n))
+#define soap_omode(soap, n) ((soap)->mode = (soap)->omode = (n))
+#define soap_set_omode(soap, n) ((soap)->omode |= (n))
+#define soap_clr_omode(soap, n) ((soap)->omode &= ~(n))
+#define soap_set_mode(soap, n) ((soap)->imode |= (n), (soap)->omode |= (n))
+#define soap_clr_mode(soap, n) ((soap)->imode &= ~(n), (soap)->omode &= ~(n))
+#define soap_destroy(soap) soap_delete((soap), NULL)
+
+#ifdef HAVE_STRRCHR
+# define soap_strrchr(s, t) strrchr(s, t)
+#else
+ SOAP_FMAC1 char* SOAP_FMAC2 soap_strrchr(const char *s, int t);
+#endif
+
+#ifdef HAVE_STRTOL
+# define soap_strtol(s, t, b) strtol(s, t, b)
+#else
+ SOAP_FMAC1 long SOAP_FMAC2 soap_strtol(const char *s, char **t, int b);
+#endif
+
+#ifdef HAVE_STRTOUL
+# define soap_strtoul(s, t, b) strtoul(s, t, b)
+#else
+ SOAP_FMAC1 unsigned long SOAP_FMAC2 soap_strtoul(const char *s, char **t, int b);
+#endif
+
+#if defined(WITH_OPENSSL)
+# define soap_random soap_rand()
+SOAP_FMAC1 int SOAP_FMAC2 soap_rand();
+#elif defined(HAVE_RANDOM)
+# define soap_random (int)random()
+#else
+# define soap_random rand()
+#endif
+
+#ifdef WITH_NOIDREF
+# define soap_embedded(s, p, t) (0)
+# define soap_id_lookup(s, i, p, t, n, k) (p)
+# define soap_id_forward(s, h, p, len, st, tt, n, k, fc) (p)
+# define soap_reference(s, a, t) (1)
+# define soap_array_reference(s, p, a, n, t) (1)
+# define soap_embed(s, p, a, n, t, pp) (0)
+# define soap_embedded_id(s, i, p, t) (i)
+# define soap_is_embedded(s, p) (0)
+# define soap_is_single(s, p) (1)
+# define soap_lookup_type(s, i) (0)
+# define soap_getindependent(s) (0)
+# define soap_putindependent(s) (0)
+# define soap_getelement(s, n) (n)
+# define soap_putelement(s, p, t, i, n) (0)
+# define soap_markelement(s, p, n) (0)
+#endif
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_fault(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultcode(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultsubcode(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultstring(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultdetail(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_serializeheader(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putheader(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getheader(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_serializefault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putfault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getfault(struct soap*);
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_ssl_init();
+SOAP_FMAC1 int SOAP_FMAC2 soap_poll(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_connect_command(struct soap*, int, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_connect(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_bind(struct soap*, const char*, int, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_accept(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_accept(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_server_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_client_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_puthttphdr(struct soap*, int status, size_t count);
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_get_header_attribute(struct soap*, const char*, const char*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_key(char*, size_t, const char*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_val(char*, size_t, const char*);
+
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_hash(const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_endpoint(struct soap*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_flush_raw(struct soap*, const char*, size_t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_flush(struct soap*);
+SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_get(struct soap*);
+SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getchar(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_tag_cmp(const char*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_fault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault_subcode(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault_subcode(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_sender_error(struct soap*, const char*, const char*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_receiver_error(struct soap*, const char*, const char*, int);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_send_raw(struct soap*, const char*, size_t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_raw(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_send(struct soap*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_send2(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_send3(struct soap*, const char*, const char*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_pututf8(struct soap*, unsigned long);
+SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getutf8(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_putbase64(struct soap*, const unsigned char*, int);
+SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_getbase64(struct soap*, int*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_puthex(struct soap*, const unsigned char*, int);
+SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_gethex(struct soap*, int*);
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_xop_forward(struct soap*, unsigned char**, int*, char**, char**, char**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_dime_forward(struct soap*, unsigned char**, int*, char**, char**, char**);
+#endif
+
+#ifndef WITH_NOIDREF
+SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup_id(struct soap*, void *p, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup(struct soap*, const void *p, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_enter(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_array_pointer_lookup(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type);
+SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_lookup(struct soap*, const char*);
+SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_enter(struct soap*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_resolve(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_embedded(struct soap*, const void *p, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_reference(struct soap*, const void *p, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_array_reference(struct soap*, const void *p, const struct soap_array *a, int n, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_embedded_id(struct soap*, int id, const void *p, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_is_embedded(struct soap*, struct soap_plist*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_is_single(struct soap*, struct soap_plist*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_embedded(struct soap*, struct soap_plist*);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_begin_count(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_end_count(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_begin_send(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_end_send(struct soap*);
+
+SOAP_FMAC1 const struct soap_code_map* SOAP_FMAC2 soap_code(const struct soap_code_map*, const char *str);
+SOAP_FMAC1 long SOAP_FMAC2 soap_int_code(const struct soap_code_map*, const char *str, long other);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_str_code(const struct soap_code_map*, long code);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_getline(struct soap*, char*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_begin_recv(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_end_recv(struct soap*);
+
+SOAP_FMAC1 void* SOAP_FMAC2 soap_malloc(struct soap*, size_t);
+SOAP_FMAC1 void SOAP_FMAC2 soap_dealloc(struct soap*, void*);
+SOAP_FMAC1 struct soap_clist * SOAP_FMAC2 soap_link(struct soap*, void*, int, int, void (*fdelete)(struct soap_clist*));
+SOAP_FMAC1 void SOAP_FMAC2 soap_unlink(struct soap*, const void*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_free(struct soap*);
+
+SOAP_FMAC1 void* SOAP_FMAC2 soap_track_malloc(struct soap*, const char*, int, size_t);
+SOAP_FMAC1 void SOAP_FMAC2 soap_track_free(struct soap*, const char*, int, void*);
+
+#ifndef WITH_NOIDREF
+SOAP_FMAC1 int SOAP_FMAC2 soap_lookup_type(struct soap*, const char *id);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_id_lookup(struct soap*, const char *id, void **p, int t, size_t n, unsigned int k);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_id_forward(struct soap*, const char *id, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void(*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t));
+#endif
+SOAP_FMAC1 void* SOAP_FMAC2 soap_id_enter(struct soap*, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*));
+SOAP_FMAC1 void SOAP_FMAC2 soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t, const void *q, size_t n);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_size(const int *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getoffsets(const char *, const int *, int *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getsize(const char *, const char *, int *);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getsizes(const char *, int *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getposition(const char *, int *);
+
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putsize(struct soap*, const char *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizesoffsets(struct soap*, const char *, const int *, const int *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizes(struct soap*, const char *, const int *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffset(struct soap*, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffsets(struct soap*, const int *, int);
+ 
+SOAP_FMAC1 int SOAP_FMAC2 soap_closesock(struct soap*);
+
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new(void);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new1(soap_mode);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new2(soap_mode, soap_mode);
+SOAP_FMAC1 void SOAP_FMAC2 soap_del(struct soap*);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy(struct soap*);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy_context(struct soap*, struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_init(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_init1(struct soap*, soap_mode);
+SOAP_FMAC1 void SOAP_FMAC2 soap_init2(struct soap*, soap_mode, soap_mode);
+SOAP_FMAC1 void SOAP_FMAC2 soap_done(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_cleanup(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_begin(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_end(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_delete(struct soap*, void*);
+
+#ifdef SOAP_DEBUG
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_recv_logfile(struct soap*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_sent_logfile(struct soap*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_test_logfile(struct soap*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_close_logfiles(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_open_logfile(struct soap*, int);
+#endif
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_token(struct soap*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_value(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_match_tag(struct soap*, const char*, const char *);
+SOAP_FMAC1 int SOAP_FMAC2 soap_match_array(struct soap*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_element(struct soap*, const char*, int, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_out(struct soap*, const char *tag, int id, const char *type);
+SOAP_FMAC1 int SOAP_FMAC2 soap_array_begin_out(struct soap*, const char *tag, int id, const char *type, const char *offset);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_ref(struct soap*, const char *tag, int id, int href);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_href(struct soap*, const char *tag, int id, const char *ref, const char *val);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_null(struct soap*, const char *tag, int id, const char *type);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_id(struct soap*, const char *tag, int id, const void *p, const struct soap_array *a, int d, const char *type, int n);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_result(struct soap*, const char *tag);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_out(struct soap*, const char *tag);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_start_end_out(struct soap*, const char *tag);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_attribute(struct soap*, const char*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_in(struct soap*, const char *tag, int nillable);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_in(struct soap*, const char *tag);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_peek_element(struct soap*);
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_retry(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_revert(struct soap*);
+
+SOAP_FMAC1 char* SOAP_FMAC2 soap_strdup(struct soap*, const char*);
+SOAP_FMAC1 const char * SOAP_FMAC2 soap_strsearch(const char *big, const char *little);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_string_out(struct soap*, const char *s, int flag);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_string_in(struct soap*, int, long, long);
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_wstring_out(struct soap*, const wchar_t *s, int flag);
+SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstring_in(struct soap*, int, long, long);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_match_namespace(struct soap*, const char *, const char*, int n1, int n2);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_namespaces(struct soap*, struct Namespace*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_local_namespaces(struct soap*);
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_pop_namespace(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_push_namespace(struct soap*, const char *,const char *);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_current_namespace(struct soap *soap, const char *tag);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_store_lab(struct soap*, const char*, size_t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_append_lab(struct soap*, const char*, size_t);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_new_block(struct soap*);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_push_block(struct soap*, size_t);
+SOAP_FMAC1 void SOAP_FMAC2 soap_pop_block(struct soap*);
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_size_block(struct soap*, size_t);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_first_block(struct soap*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_next_block(struct soap*);
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_block_size(struct soap*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_save_block(struct soap*, char*, int);
+SOAP_FMAC1 void SOAP_FMAC2 soap_end_block(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_out(struct soap*);
+SOAP_FMAC1 int soap_envelope_end_out(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_in(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_end_in(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_out(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_out(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_in(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_in(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_header(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_response(struct soap*, int);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_send_empty_response(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_empty_response(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_send_fault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_fault(struct soap*);
+
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault(struct soap*, FILE*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault_location(struct soap*, FILE*);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2byte(struct soap*, const char*, char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2short(struct soap*, const char*, short*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2int(struct soap*, const char*, int*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2long(struct soap*, const char*, long*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2LONG64(struct soap*, const char*, LONG64*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2float(struct soap*, const char*, float*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2double(struct soap*, const char*, double*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedByte(struct soap*, const char*, unsigned char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedShort(struct soap*, const char*, unsigned short*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedInt(struct soap*, const char*, unsigned int*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedLong(struct soap*, const char*, unsigned long*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2ULONG64(struct soap*, const char*, ULONG64*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2string(struct soap*, const char*, char**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2QName(struct soap*, const char*, char**);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2wchar(struct soap*, const char*, wchar_t**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2dateTime(struct soap*, const char*, time_t*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_s2base64(struct soap*, const unsigned char*, char*, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_s2hex(struct soap*, const unsigned char*, char*, int);
+#endif
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_byte2s(struct soap*, char);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_short2s(struct soap*, short);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_int2s(struct soap*, int);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_long2s(struct soap*, long);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_LONG642s(struct soap*, LONG64);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_float2s(struct soap*, float);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_double2s(struct soap*, double);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedByte2s(struct soap*, unsigned char);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedShort2s(struct soap*, unsigned short);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedInt2s(struct soap*, unsigned int);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedLong2s(struct soap*, unsigned long);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_ULONG642s(struct soap*, ULONG64);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_QName2s(struct soap*, const char*);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_wchar2s(struct soap*, const wchar_t*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_dateTime2s(struct soap*, time_t);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_base642s(struct soap*, const char*, char*, size_t, int*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_hex2s(struct soap*, const char*, char*, size_t, int*);
+#endif
+
+
+SOAP_FMAC1 int* SOAP_FMAC2 soap_inint(struct soap*, const char *tag, int *p, const char *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_inbyte(struct soap*, const char *tag, char *p, const char *, int);
+SOAP_FMAC1 long* SOAP_FMAC2 soap_inlong(struct soap*, const char *tag, long *p, const char *, int);
+SOAP_FMAC1 LONG64* SOAP_FMAC2 soap_inLONG64(struct soap*, const char *tag, LONG64 *p, const char *, int);
+SOAP_FMAC1 short* SOAP_FMAC2 soap_inshort(struct soap*, const char *tag, short *p, const char *, int);
+SOAP_FMAC1 float* SOAP_FMAC2 soap_infloat(struct soap*, const char *tag, float *p, const char *, int);
+SOAP_FMAC1 double* SOAP_FMAC2 soap_indouble(struct soap*, const char *tag, double *p, const char *, int);
+SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_inunsignedByte(struct soap*, const char *tag, unsigned char *p, const char *, int);
+SOAP_FMAC1 unsigned short* SOAP_FMAC2 soap_inunsignedShort(struct soap*, const char *tag, unsigned short *p, const char *, int);
+SOAP_FMAC1 unsigned int* SOAP_FMAC2 soap_inunsignedInt(struct soap*, const char *tag, unsigned int *p, const char *, int);
+SOAP_FMAC1 unsigned long* SOAP_FMAC2 soap_inunsignedLong(struct soap*, const char *tag, unsigned long *p, const char *, int);
+SOAP_FMAC1 ULONG64* SOAP_FMAC2 soap_inULONG64(struct soap*, const char *tag, ULONG64 *p, const char *, int);
+SOAP_FMAC1 char** SOAP_FMAC2 soap_instring(struct soap*, const char *tag, char **p, const char *, int, int, long, long);
+SOAP_FMAC1 char** SOAP_FMAC2 soap_inliteral(struct soap*, const char *tag, char **p);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 time_t* SOAP_FMAC2 soap_indateTime(struct soap*, const char *tag, time_t *p, const char *, int);
+#endif
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwstring(struct soap*, const char *tag, wchar_t **p, const char *, int, long, long);
+SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwliteral(struct soap*, const char *tag, wchar_t **p);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_outbyte(struct soap*, const char *tag, int id, const char *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outshort(struct soap*, const char *tag, int id, const short *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outint(struct soap*, const char *tag, int id, const int *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outlong(struct soap*, const char *tag, int id, const long *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outLONG64(struct soap*, const char *tag, int id, const LONG64 *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outfloat(struct soap*, const char *tag, int id, const float *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outdouble(struct soap*, const char *tag, int id, const double *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedByte(struct soap*, const char *tag, int id, const unsigned char *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedShort(struct soap*, const char *tag, int id, const unsigned short *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedInt(struct soap*, const char *tag, int id, const unsigned int *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedLong(struct soap*, const char *tag, int id, const unsigned long *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outULONG64(struct soap*, const char *tag, int id, const ULONG64 *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outstring(struct soap*, const char *tag, int id, char *const*p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outliteral(struct soap*, const char *tag, char *const*p);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 int SOAP_FMAC2 soap_outdateTime(struct soap*, const char *tag, int id, const time_t *p, const char *, int);
+#endif
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_outwstring(struct soap*, const char *tag, int id, wchar_t *const*p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outwliteral(struct soap*, const char *tag, wchar_t *const*p);
+#endif
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_attachment(struct soap *, const char*, int, const void*, const struct soap_array*, const char*, const char*, const char*, int, const char*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_move(struct soap*, long);
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_tell(struct soap*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_dime_option(struct soap*, unsigned short, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getdimehdr(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getdime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putdimehdr(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putdime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getmimehdr(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getmime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putmimehdr(struct soap*, struct soap_multipart*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putmime(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_dime(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_mime(struct soap*, const char *boundary, const char *start);
+SOAP_FMAC1 void SOAP_FMAC2 soap_clr_dime(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_clr_mime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_dime_attachment(struct soap*, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_mime_attachment(struct soap*, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description);
+SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_register_plugin_arg(struct soap*, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void*);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_lookup_plugin(struct soap*, const char*);
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_attr_value(struct soap *soap, const char *name, int flag);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_attr(struct soap *soap, const char *name, const char *value);
+SOAP_FMAC1 void SOAP_FMAC2 soap_clr_attr(struct soap *soap);
+
+#ifdef WITH_COOKIES
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_encode_cookie(const char*, char*, size_t);
+SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_set_cookie(struct soap*, const char*, const char*, const char*, const char*);
+SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_cookie(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern char* SOAP_FMAC2 soap_cookie_value(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern char* SOAP_FMAC2 soap_env_cookie_value(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern long SOAP_FMAC2 soap_cookie_expire(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_expire(struct soap*, const char*, long, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_session(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_clr_cookie_session(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern void SOAP_FMAC2 soap_clr_cookie(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_getenv_cookies(struct soap*);
+SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_copy_cookies(struct soap*);
+SOAP_FMAC1 extern void SOAP_FMAC2 soap_free_cookies(struct soap*);
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif
+
diff --git a/samples/quotex/Makefile b/samples/quotex/Makefile
new file mode 100644
index 0000000..1548c9f
--- /dev/null
+++ b/samples/quotex/Makefile
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		quotex
+quotex:		quotex.h quotex.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) quotex.h
+		$(CPP) $(CFLAGS) -o quotex quotex.cpp soapC.cpp soapClient.cpp soapServer.cpp $(SOAPCPP) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h quotex
diff --git a/samples/quotex/MakefileSolaris b/samples/quotex/MakefileSolaris
new file mode 100644
index 0000000..86dc230
--- /dev/null
+++ b/samples/quotex/MakefileSolaris
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lxnet -lnsl -lsocket
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		quotex
+quotex:		quotex.h quotex.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) quotex.h
+		$(CPP) $(CFLAGS) -o quotex quotex.cpp soapC.cpp soapClient.cpp soapServer.cpp $(SOAPCPP) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h quotex
diff --git a/samples/quotex/quotex.cpp b/samples/quotex/quotex.cpp
new file mode 100644
index 0000000..0e85fac
--- /dev/null
+++ b/samples/quotex/quotex.cpp
@@ -0,0 +1,61 @@
+/*	quotex.cpp
+	This example is both a SOAP service and a client application.
+	As a CGI program, it will serve currency-converted stock quote requests.
+	As a client, it will return the currency-converted stock quote given as
+	arguments to the program on the command-line. For example
+	> quotex AOL uk
+*/
+
+#include "soapH.h"	// include generated proxy and SOAP support
+#include "quotex.nsmap"	// include generated namespace map file
+
+const char endpoint[] = "http://websrv.cs.fsu.edu/~engelen/quotex.cgi";
+
+int main(int argc, char **argv)
+{ struct soap *soap = soap_new();
+  float q;
+  if (argc <= 2)
+  { soap->user = soap_new(); // pass a new gSOAP environment which we need to make server-side client calls
+    soap_serve(soap);	// serve request
+    soap_destroy((struct soap*)soap->user);
+    soap_end((struct soap*)soap->user);
+    soap_done((struct soap*)soap->user);
+    free(soap->user);
+    soap->user = NULL;
+  }
+  else if (soap_call_ns3__getQuote(soap, endpoint, NULL, argv[1], argv[2], q) == 0)
+    printf("\nCompany %s: %f (%s)\n", argv[1], q, argv[2]);
+  else
+  { soap_print_fault(soap, stderr);
+    soap_print_fault_location(soap, stderr);
+  }
+  soap_destroy(soap);
+  soap_end(soap);
+  soap_done(soap);
+  free(soap);
+  return 0;
+}
+
+int ns3__getQuote(struct soap *soap, char *symbol, char *country, float &result)
+{ float q, r;
+  // soap->user contains an environment that we can use to make calls that do not interfere with the current service environment
+  if (soap_call_ns1__getQuote((struct soap*)soap->user, "http://services.xmethods.net/soap", NULL, symbol, q) == 0 &&
+      soap_call_ns2__getRate((struct soap*)soap->user, "http://services.xmethods.net/soap", NULL, "us", country, r) == 0)
+  { result = q*r;
+    return SOAP_OK;
+  }
+  soap_receiver_fault(soap, *soap_faultstring((struct soap*)soap->user), NULL);
+  return SOAP_FAULT;	// pass soap fault messages on to the client of this app
+}
+
+/*	Since this app is a combined client-server, it is easy to put it together with
+ * 	one header file that describes all remote methods. However, as a consequence we
+ *	have to implement the methods that are not ours. Since these implementations are
+ * 	never called, we can make them dummies.
+ */
+
+int ns1__getQuote(struct soap *soap, char *symbol, float &Result)
+{ return SOAP_NO_METHOD; } // dummy: will never be called
+int ns2__getRate(struct soap *soap, char *country1, char *country2, float &Result)
+{ return SOAP_NO_METHOD; } // dummy: will never be called
+
diff --git a/samples/quotex/quotex.h b/samples/quotex/quotex.h
new file mode 100644
index 0000000..5bee5da
--- /dev/null
+++ b/samples/quotex/quotex.h
@@ -0,0 +1,17 @@
+//gsoap ns1 service namespace:	urn:xmethods-delayed-quotes
+//gsoap ns1 service style:	rpc
+//gsoap ns1 service encoding:	encoded
+int ns1__getQuote(char *symbol, float &Result);
+
+//gsoap ns2 service namespace:	urn:xmethods-CurrencyExchange
+//gsoap ns2 service style:	rpc
+//gsoap ns2 service encoding:	encoded
+int ns2__getRate(char *country1, char *country2, float &Result);
+
+//gsoap ns3 service name:	quotex
+//gsoap ns3 service style:	rpc
+//gsoap ns3 service encoding:	encoded
+//gsoap ns3 service location:	http://www.cs.fsu.edu/~engelen/quotex.cgi
+//gsoap ns3 service namespace:	http://www.cs.fsu.edu/~engelen/quotex.wsdl
+//gsoap ns3 schema  namespace:	urn:quotex
+int ns3__getQuote(char *symbol, char *country, float &result);
diff --git a/samples/router/Makefile b/samples/router/Makefile
new file mode 100644
index 0000000..80309da
--- /dev/null
+++ b/samples/router/Makefile
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lpthread
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		router
+router:		router.h router.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c router.h
+		$(CC) $(CFLAGS) -o router router.c soapC.c $(SOAPC) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h router
diff --git a/samples/router/MakefileSolaris b/samples/router/MakefileSolaris
new file mode 100644
index 0000000..2497043
--- /dev/null
+++ b/samples/router/MakefileSolaris
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lxnet -lsocket -lnsl -lpthread
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		router
+router:		router.h router.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c router.h
+		$(CC) $(CFLAGS) -o router router.c soapC.c $(SOAPC) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h router
diff --git a/samples/router/router.c b/samples/router/router.c
new file mode 100644
index 0000000..562813c
--- /dev/null
+++ b/samples/router/router.c
@@ -0,0 +1,724 @@
+/*	router.c
+
+	Web Service message router (relay server and message forwarding)
+	Note: HTTP cookies are not supported
+
+	Copyright (C) 2000-2002 Robert A. van Engelen. All Rights Reserved.
+
+	Configure:
+	The router uses two routing tables: an internal table (for speed) and
+	an external routing file (for flexibility). The internal is always
+	checked first. Change the contents of the tables to your needs.
+	Internal table: struct t__Routing routing[] (see below)
+	External table: provide the name of a default routing file (see below)
+			or use router option -r
+
+	Compile:
+	soapcpp2 -c router.h
+	gcc -o router router.c stdsoap2.c soapC.c
+
+	NOTE: Unix/Linux SIGPIPE handler must be added to avoid broken pipe.
+
+	Usage scenarios
+	===============
+
+	Forwarding of messages to a service
+	-----------------------------------
+
+	router [-e<endpoint> | -g<endpoint>] [-a<SOAPAction>] [-r<routingfile>] [-t<timeout>] [-c] [<msgfile>]
+
+	Examples:
+
+	1.
+	router -c request.soap
+	Sends the request message stored in file request.soap and returns
+	response to stdout where file request.soap contains a SOAP request with
+	HTTP header and SOAP/XML/DIME body. If the SOAPAction in the message is
+	present and matches one or more keys in the routing table, the
+	alternative service endpoints in the table will be tried first until
+	one service endpoint is found to accept the connection. If no
+	SOAPAction is given or the SOAPAction does not match any key, then the
+	endpoint in the HTTP header in request.soap is searched in the routing
+	table. If the endoint matches one or more keys in the routing table,
+	the alternative endpoints will be tried first until one endpoint is
+	found to accept the connection. Finally, the endpoint in the HTTP
+	header of request.soap is used to establish a connection if all other
+	service endpoints in the table failed and if option -c is enabled.
+
+	2.
+	router -ehttp://domain/path request.soap
+	Sends request message to http://domain/path and returns the service
+	response to stdout. If http://domain/path matches one or more keys in
+	the routing table, then the alternative service endpoints in the table
+	will be tried first until one service endpoint is found to accept the
+	connection. The http://domain/path endpoint is tried last when all
+	other service endpoints in the table failed. File request.soap MAY
+	contain an HTTP header but MUST of course contain a body.
+
+	To try this, compile the 'quote' client (samples/quote). Edit the
+	'quote.getQuote.req.xml' SOAP/XML request file and replace
+	<symbol></symbol> with <symbol>IBM</symbol>. Then run
+	router -ehttp://services.xmethods.net/soap -a"" quote.getQuote.req.xml
+	The SOAP/XML response is returned.
+
+	3.
+	router -aSOAPAction request.soap
+	When SOAPAction matches one or more keys in the routing table, then the
+	alternative endpoints in the table will be tried first until one
+	endpoint is found to accept the connection. When all endpoints fail,
+	or when SOAPAction does not match a key, the router fails. File
+	request.soap MAY contain an HTTP header but MUST of course contain a
+	body.
+
+	4.
+	router -c -rroutingtable.xml request.soap
+	Same as 1. but uses routingtable.xml as the routing table after
+	checking keys in the internal routing table. The XSD schema of
+	routingtable.xml is generated as t.xsd. The default routing table file
+	is router.xml.
+
+	5.
+	router -c -t5 request.soap
+	Same as 1. but searches the routing table for an endpoint that takes
+	less than 5 seconds to connect to. Use negative timeouts to specify a
+	timeout value in microseconds. The timeout also specifies the message
+	receive timeout AFTER the connection was established.
+
+	6.
+	cat request.soap | router -ehttp://domain/path | more
+	When request.soap does not contain an HTTP header, the router computes
+	the HTTP content length by buffering the entire request message which
+	allows you to use it as a filter as in this example. (fstat() is
+	generally tried first to determine file length.)
+
+	7.
+	router -ghttp://domain/path/file.html
+	Sends an HTTP GET request to the host and copies the response to stdout.
+
+	CGI-based relay server
+	----------------------
+
+	Install the router as CGI application. The CGI-based relay service uses
+	SOAPActions in the messages and HTTP query strings to index the routing
+	table.
+
+	Examples:
+
+	Messages addressed to "http://domain/cgi-bin/router?key" will be routed
+	by the router to the service endpoint associated with the key in the
+	routing table. When messages use SOAPActions, the SOAPActions will be
+	used to find service endpoints instead of a query string.
+
+	To tunnel SOAP through firewals to stateful stand-alone Web services:
+	run a stand-alone gSOAP Web service on a port, e.g. 18000. Add the
+	key-endpoint pair "myservice", "http://localhost:18000" to the router
+	table. After installing the router, all requests for endpoint
+	http://domain/cgi-bin/router?myservice will be tunneled to the
+	stand-alone Web service.
+
+	To add backup services: add multiple key-endpoint pairs to the routing
+	table with the same key. Given a key (e.g. SOAPAction or Query string)
+	the router will check the endpoints in sequence until it can connect.
+	If one or more of the backup services are down, an active service
+	endpoint will be selected.
+
+	Multi-threaded stand-alone relay server
+	---------------------------------------
+
+	router -p<port> [-r<routingfile>] [-t<timeout>] &
+	
+	Examples:
+	
+	router -p18000 -rtable.xml -t5 &
+	Runs a stand-alone router on port 18000 using table.xml as the external
+	routing table for lookup. Service endpoints are selected from
+	alternative endpoints that take less than 5 seconds to connect to.
+
+	Clients connect to the router with a service endpoint such as
+	"http://machine:<port>/path" where the endpoint "http://machine/path"
+	(note the absence of the port) will be used as a key in the routing
+	table to find an endpoint when no SOAPAction is present. For example, a
+	stand-alone Web service called "quote" runs on a machine named "zulu"
+	port 18080. To address this service through the router, add key
+	"http://zulu/quote" and endpoint "http://zulu:18080" to the routing
+	table. Run the router on port 18000.  Router requests with endpoint
+	"http://zulu:18000/quote" will be relayed to zulu:18080
+
+	Gateway keeper
+	--------------
+
+	When the routing table contains userid and passwd information, the
+	client requests are only tunnelled when the proper HTTP Authorization
+	userid and passwd are provided in the client request message. It is
+	possible to provide different service endpoint in the table depending
+	on the client's HTTP Authorization information.
+
+	Notes
+	-----
+
+	* Table lookup algorithm:
+	  SOAPActions (if provided) are used first to match routing table keys.
+	  Next, HTTP query string in the endpoint URL (CGI only) is used to
+	  match routing table keys.
+	  Next, the service endpoint is checked to match routing table keys.
+	  Finally, if the -c option is set the service endpoint URL itself is
+	  used to connect.
+	* Keys in routing table may contain * (multi-char) and - (single-char)
+	  wildcards to match multiple SOAPActions and endpoints.
+	* When a match is found but the endpoint is NULL in the table, the
+	  search is terminated. This can be used to prevent searches in the
+	  routing file for specific patterns.
+	* Optional HTTP Authorization userid and passwd are checked if present
+	  in the routing table. The userid and passwd may be patterns with '*'
+	  and '-' wildcards. An endpoint in the table is selected for which
+	  the userid and passwd match.
+	* <timeout> is TCP connect and I/O timeout for router-server connection
+	  in seconds (use negative value for timeout in microseconds).
+	* When an external routing table is once read by a stand-alone router,
+	  it will be cached to optimize speed. But this also means that
+	  changing the contents of the routing table file does not affect the
+	  actual routing while the stand-alone router is running.
+	* HTTP POST and HTTP GET styles of SOAP messaging is supported
+	  (but CGI-based router does not support HTTP GET)
+	* Supports any type of messages (e.g. DIME)
+	* HTTP cookies are not handled and will be deleted from the HTTP header
+	* Keep-alive support has not been tested and might not work
+*/
+
+#include "soapH.h"
+#include <sys/stat.h>	/* need fstat */
+#include <pthread.h>	/* use Posix threads */
+
+/* Maximum request backlog */
+#define BACKLOG (100)
+
+/* Default file name of external routing table (or NULL if none used) */
+#define DEFAULT_ROUTINGFILE "router.xml"
+
+/* Internal routine table (fast) */
+static struct t__Routing routing[] =
+/* SOAPAction/endpoint	-> target endpoint [userid, passwd] */
+{ {"dime",		"http://websrv.cs.fsu.edu/~engelen/dimesrv.cgi"},
+  {"http://*/dime",	"http://websrv.cs.fsu.edu/~engelen/dimesrv.cgi"},
+  {"factory",		"http://localhost:18085"},
+  {NULL, NULL}
+};
+
+#ifdef WIN32
+#define OPTION_CHAR '/'
+#else
+#define OPTION_CHAR '-'
+#endif
+
+struct header
+{ struct header *next;
+  char line[SOAP_HDRLEN];
+};
+
+static int port_number = 0;
+static const char *input_file = NULL;
+static const char *service_endpoint = NULL;
+static const char *service_action = NULL;
+static const char *routing_file = DEFAULT_ROUTINGFILE;
+static int server_timeout = 0;
+static int method = SOAP_POST;
+static int connect_flag = 0;
+
+void options(int, char**);
+void *process_request(void*);
+const char *lookup(struct t__RoutingTable*, const char*, const char*, const char*);
+int copy_header(struct soap*, struct soap*, const char*, const char*);
+int create_header(struct soap*, int, const char*, const char*, size_t);
+int buffer_body(struct soap*);
+int copy_body(struct soap*, struct soap*);
+int server_connect(struct soap*, const char*, const char*, const char*, const char*);
+int make_connect(struct soap*, const char*);
+
+int
+main(int argc, char **argv)
+{ options(argc, argv);
+  if (port_number)
+  { struct soap soap, *tsoap;
+    pthread_t tid;
+    int m, s, i;
+    soap_init(&soap);
+    soap.bind_flags = SO_REUSEADDR; /* don't use this in a secure environment. We keep it here so you can quickly restart the router */
+    m = soap_bind(&soap, NULL, port_number, BACKLOG);
+    if (m < 0)
+    { soap_print_fault(&soap, stderr);
+      exit(1);
+    }
+    fprintf(stderr, "Socket connection successful %d\n", m);
+    for (i = 1; ; i++)
+    { s = soap_accept(&soap);
+      if (s < 0)
+      { if (soap.errnum)
+          soap_print_fault(&soap, stderr);
+        else
+          fprintf(stderr, "router timed out\n"); /* if accept_timeout is set */
+        break;
+      }
+      fprintf(stderr, "Thread %d accepts socket %d connection from IP %d.%d.%d.%d\n", i, s, (int)(soap.ip>>24)&0xFF, (int)(soap.ip>>16)&0xFF, (int)(soap.ip>>8)&0xFF, (int)soap.ip&0xFF);
+      tsoap = soap_copy(&soap);
+      pthread_create(&tid, NULL, (void*(*)(void*))process_request, (void*)tsoap);
+    }
+  }
+  else
+  { struct soap client;
+    struct soap server;
+    soap_init(&client);
+    soap_init(&server);
+    soap_begin(&client);
+    if (argc <= 1) /* try CGI env vars */
+    { char *s = getenv("REQUEST_METHOD");
+      if (s && !strcmp(s, "GET"))
+        method = SOAP_GET;
+      else
+      { s = getenv("Content-Length");
+        if (s)
+          client.length = strtoul(s, NULL, 10);
+      }
+      service_action = getenv("HTTP_SOAPAction");
+      if (!service_action)
+        service_action = getenv("QUERY_STRING");
+    }
+    if (method == SOAP_POST)
+    { soap_wchar c;
+      if (input_file)
+      { client.recvfd = open(input_file, O_RDONLY);
+        if (client.recvfd < 0)
+        { fprintf(stderr, "router: cannot open file '%s' for reading\n", input_file);
+          exit(1);
+        }
+      }
+      c = soap_get0(&client);
+      if (c == 'G' || c == 'P') /* simple check to see if HTTP GET/POST header is present */
+      { if (copy_header(&client, &server, service_endpoint, service_action))
+        { client.error = server.error;
+          soap_send_fault(&client);
+          exit(1);
+        }
+      }
+      else
+      { struct stat sb;
+        if (!fstat(client.recvfd, &sb) && sb.st_size > 0)
+          client.length = sb.st_size;
+        else
+          buffer_body(&client);
+        if (create_header(&server, SOAP_POST, service_endpoint, service_action, client.length))
+        { client.error = server.error;
+          soap_send_fault(&client);
+          exit(1);
+        }
+      }
+      copy_body(&client, &server);
+    }
+    else
+    { if (create_header(&server, SOAP_GET, service_endpoint, service_action, 0))
+      { client.error = server.error;
+        soap_send_fault(&client);
+        exit(1);
+      }
+      soap_end_send(&server);
+    }
+    soap_begin(&server);
+    /* should check these for errors: */
+    copy_header(&server, &client, NULL, NULL);
+    copy_body(&server, &client);
+    soap_closesock(&client);
+    soap_closesock(&server);
+    soap_end(&client);
+    soap_end(&server);
+    soap_done(&client);
+    soap_done(&server);
+  }
+  return 0;
+}
+
+void
+options(int argc, char **argv)
+{ int i, flag;
+  char *arg;
+  for (i = 1; i < argc; i++)
+  { arg = argv[i];
+    if (*arg == OPTION_CHAR)
+    { flag = 1;
+      while (flag && *++arg)
+        switch (*arg)
+        { case 'h':
+            fprintf(stderr, "Usage: router [-p<port>] [-e<endpoint> | -g<endpoint>] [-a<action>] [-r<routingfile>] [-c] [<msgfile>]\n");
+            exit(0);
+          case 'p':
+            flag = 0;
+            if (*++arg)
+              port_number = atol(arg);
+            else if (i < argc && argv[++i])
+              port_number = atol(argv[i]);
+            else
+            { fprintf(stderr, "router: -p requires <port>\n");
+              exit(1);
+            }
+            break;
+          case 'g':
+	    method = SOAP_GET;
+          case 'e':
+            flag = 0;
+            if (*++arg)
+              service_endpoint = arg;
+            else if (i < argc && argv[++i])
+              service_endpoint = argv[i];
+            else
+            { fprintf(stderr, "router: -e and -g require <endpoint>\n");
+              exit(1);
+            }
+            break;
+          case 'a':
+            flag = 0;
+            if (*++arg)
+              service_action = arg;
+            else if (i < argc && argv[++i])
+              service_action = argv[i];
+            else
+            { fprintf(stderr, "router: -a requires <action>\n");
+              exit(1);
+            }
+            break;
+          case 'r':
+            flag = 0;
+            if (*++arg)
+              routing_file = arg;
+            else if (i < argc && argv[++i])
+              routing_file = argv[i];
+            else
+            { fprintf(stderr, "router: -r requires <routingfile>\n");
+              exit(1);
+            }
+            break;
+          case 't':
+            flag = 0;
+            if (*++arg)
+              server_timeout = atol(arg);
+            else if (i < argc && argv[++i])
+              server_timeout = atol(argv[i]);
+            else
+            { fprintf(stderr, "router: -t requires <timeout>\n");
+              exit(1);
+            }
+            break;
+	  case 'c':
+	    connect_flag = 1;
+	    break;
+          default:
+            fprintf(stderr, "router: unknown option -%c\n", *arg);
+	}
+    }
+    else
+      input_file = arg;
+  }
+}
+
+void*
+process_request(void *soap)
+{ struct soap *client, server;
+  soap_wchar c;
+  pthread_detach(pthread_self());
+  client = (struct soap*)soap;
+  soap_init(&server);
+  soap_begin(client);
+  c = soap_get0(client);
+  if (c == 'G' || c == 'P') /* simple check to see if HTTP GET/POST header is present */
+  { if (copy_header(client, &server, NULL, NULL))
+      client->error = server.error;
+  }
+  else
+  { buffer_body(client);
+    if (create_header(&server, method, service_endpoint, service_action, client->length))
+      client->error = server.error;
+  }
+  if (!client->error)
+  { copy_body(client, &server);
+    soap_begin(&server);
+    copy_header(&server, client, NULL, NULL);
+    copy_body(&server, client);
+  }
+  else
+    soap_send_fault(client);
+  soap_closesock(client);
+  soap_closesock(&server);
+  soap_end(client);
+  soap_end(&server);
+  soap_done(client);
+  soap_done(&server);
+  free(soap);
+  return NULL;
+}
+
+const char*
+lookup(struct t__RoutingTable *route, const char *key, const char *userid, const char *passwd)
+{ static struct t__RoutingTable routing_table = {0, NULL}; /* file-based routing table cache */
+  if (!key)
+    return NULL; /* can't do lookup on nil key */
+  if (!route->__ptr)
+  { route->__ptr = routing; /* first stage: use internal routing table */
+    route->__size = 999999999;
+  }
+  else if (route->__size)
+  { route->__ptr++;
+    route->__size--;
+  }
+  for (;;)
+  { if (route->__ptr)
+    { while (route->__size && route->__ptr->key)
+      { if (!soap_tag_cmp(key, route->__ptr->key))
+	  if (!route->__ptr->userid
+	   || !route->__ptr->passwd
+	   || !soap_tag_cmp(userid, route->__ptr->userid)
+	   || !soap_tag_cmp(passwd, route->__ptr->passwd))
+          return route->__ptr->endpoint;
+        route->__ptr++;
+        route->__size--;
+      }
+    }
+    if (route->__size) /* second stage: use file-based routing table */
+    { if (routing_table.__ptr)
+        *route = routing_table; /* table is already cached in memory */
+      else if (routing_file) /* else read table from file */
+      { struct soap soap;
+        soap_init(&soap);
+        soap.recvfd = open(routing_file, O_RDONLY);
+        if (soap.recvfd < 0) /* no routing file: silently stop */
+	{ soap_done(&soap);
+	  break;
+	}
+        if (!soap_begin_recv(&soap))
+	  if (!soap_get_t__RoutingTable(&soap, &routing_table, "router", NULL))
+	  { close(soap.recvfd);
+	    soap_done(&soap);
+	    break;
+	  }
+	soap_end_recv(&soap);
+	close(soap.recvfd);
+	soap_done(&soap);
+	*route = routing_table;
+      }
+    }
+    else
+      break;
+  }
+  return NULL;
+}
+
+int
+make_connect(struct soap *server, const char *endpoint)
+{ char host[SOAP_TAGLEN];
+  int port;
+  strcpy(host, server->host);
+  port = server->port;
+  soap_set_endpoint(server, endpoint);	/* get host, path, and port */
+  server->connect_timeout = server_timeout;
+  server->recv_timeout = server_timeout;
+  server->send_timeout = server_timeout;
+  /* server->connect_flags = SO_NOSIGPIPE; */	/* prevents UNIX SIGPIPE */
+  /* server->socket_flags = MSG_NOSIGNAL; */	/* prevents UNIX SIGPIPE */
+  if (*server->host)
+  { if (server->socket < 0 || strcmp(server->host, host) || server->port != port)
+    { soap_closesock(server);
+      server->socket = server->fopen(server, endpoint, server->host, server->port);
+      if (server->socket < 0)
+        return server->error;
+    }
+  }
+  return SOAP_OK;
+}
+
+int
+server_connect(struct soap *server, const char *endpoint, const char *action, const char *userid, const char *passwd)
+{ if (action && *action)
+  { struct t__RoutingTable route;
+    route.__ptr = NULL;
+    route.__size = 0;
+    fprintf(stderr, "Searching services on action %s...\n", action);
+    while (lookup(&route, action, userid, passwd))
+    { fprintf(stderr, "Attempting to connect to '%s'\n", route.__ptr->endpoint);
+      if (!make_connect(server, route.__ptr->endpoint))
+        return SOAP_OK;
+    }
+  }
+  if (endpoint && *endpoint)
+  { struct t__RoutingTable route;
+    route.__ptr = NULL;
+    route.__size = 0;
+    fprintf(stderr, "Searching services on endpoint %s...\n", endpoint);
+    while (lookup(&route, endpoint, userid, passwd))
+    { fprintf(stderr, "Attempting to connect to '%s'\n", route.__ptr->endpoint);
+      if (!make_connect(server, route.__ptr->endpoint))
+        return SOAP_OK;
+    }
+  }
+  if (connect_flag && endpoint && *endpoint)
+  { fprintf(stderr, "Connect to endpoint %s...\n", endpoint);
+    if (!make_connect(server, endpoint))
+      return SOAP_OK;
+  }
+  return server->error = SOAP_TCP_ERROR;
+}
+
+int
+copy_header(struct soap *sender, struct soap *receiver, const char *endpoint, const char *action)
+{ struct header *h, *p;
+  char *s, *t;
+  h = (struct header*)malloc(sizeof(struct header));
+  for (;;)
+  { if (soap_getline(sender, h->line, SOAP_HDRLEN))
+    { free(h);
+      return sender->error = SOAP_EOF;
+    }
+    t = strchr(h->line, ' ');
+    if (!t || strncmp(t, " 100 ", 5))
+      break;
+    do
+    { if (soap_getline(sender, h->line, SOAP_HDRLEN))
+      { free(h);
+        return sender->error = SOAP_EOF;
+      }
+    } while (*h->line); 
+  }
+  p = h;
+  for (;;)
+  { p = p->next = (struct header*)malloc(sizeof(struct header));
+    p->next = NULL;
+    if (soap_getline(sender, p->line, SOAP_HDRLEN))
+    { while (h)
+      { p = h->next;
+        free(h);
+        h = p;
+      }
+      return sender->error = SOAP_EOF;
+    }
+    if (!*p->line)
+      break;
+    s = t = strchr(p->line, ':');
+    if (t)
+    { *t = '\0';
+      do t++;
+      while (*t && *t <= 32);
+    }
+    sender->fparsehdr(sender, p->line, t);
+    if (s)
+      *s = ':';
+  }
+  s = strstr(h->line, "HTTP/");
+  if (s && (!strncmp(h->line, "GET ", 4) || !strncmp(h->line, "POST ", 5)))
+  { size_t m = strlen(sender->endpoint);
+    size_t n = m + (s - h->line) - 5 - (*h->line == 'P');
+    if (n >= sizeof(sender->endpoint))
+      n = sizeof(sender->endpoint) - 1;
+    strncpy(sender->path, h->line + 4 + (*h->line == 'P'), n - m);
+    sender->path[n - m] = '\0';
+    strcat(sender->endpoint, sender->path);
+  }
+  if (!endpoint || !*endpoint)
+    endpoint = sender->endpoint;
+  if (!action || !*action)
+    action = sender->action;
+  if (server_connect(receiver, endpoint, action, receiver->userid, receiver->passwd))
+  { while (h)
+    { p = h->next;
+      free(h);
+      h = p;
+    }
+    return receiver->error;
+  }
+  receiver->count = sender->length;
+  soap_begin_send(receiver);
+  receiver->mode &= ~SOAP_IO;
+  receiver->mode |= SOAP_IO_BUFFER;
+  while (h)
+  { receiver->fposthdr(receiver, h->line, NULL);
+    p = h->next;
+    free(h);
+    h = p;
+  }
+  if ((sender->mode & SOAP_IO) == SOAP_IO_CHUNK)
+  { if (soap_flush(receiver))
+      return receiver->error;
+    receiver->mode &= ~SOAP_IO;
+    receiver->mode |= SOAP_IO_CHUNK;
+  }
+  return SOAP_OK;
+}
+
+int
+create_header(struct soap *server, int method, const char *endpoint, const char *action, size_t count)
+{ if (server_connect(server, endpoint, action, NULL, NULL))
+    return server->error;
+  soap_begin_send(server);
+  server->status = method;
+  return server->error = server->fpost(server, server->endpoint, server->host, server->port, server->path, action, count);
+}
+
+int
+buffer_body(struct soap *sender)
+{ char *s;
+  if (soap_new_block(sender))
+    return sender->error;
+  for (;;)
+  { if (!(s = (char*)soap_push_block(sender, sender->buflen - sender->bufidx)))
+      return SOAP_EOM;
+    memcpy(s, sender->buf + sender->bufidx, sender->buflen - sender->bufidx);
+    if (soap_recv_raw(sender))
+      break;
+  }
+  if (soap_end_recv(sender))
+    return sender->error;
+  sender->length = sender->blist->size;
+  return SOAP_OK;
+}
+
+int
+copy_body(struct soap *sender, struct soap *receiver)
+{ if (sender->blist)
+  { char *p;
+    for (p = soap_first_block(sender); p; p = soap_next_block(sender))
+      soap_send_raw(receiver, p, soap_block_size(sender));
+    soap_end_block(sender);
+  }
+  else
+  { if ((sender->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { sender->chunkbuflen = sender->buflen;
+      sender->buflen = sender->bufidx;
+      sender->chunksize = 0;
+      while (!soap_recv_raw(sender))
+      { if (soap_send_raw(receiver, sender->buf + sender->bufidx, sender->buflen - sender->bufidx))
+          return receiver->error;
+      }
+    }
+    else
+    { soap_send_raw(receiver, sender->buf + sender->bufidx, sender->buflen - sender->bufidx); /* send part after HTTP header */
+      if (sender->buflen - sender->bufidx < sender->length)
+      { sender->length -= sender->buflen - sender->bufidx;
+        while (!soap_recv_raw(sender))
+        { if (soap_send_raw(receiver, sender->buf, sender->buflen))
+            return receiver->error;
+	  if (sender->buflen >= sender->length)
+	    break;
+          sender->length -= sender->buflen;
+        }
+      }
+    }
+    if (soap_end_recv(sender))
+      return sender->error;
+  }
+  if (soap_end_send(receiver))
+    return receiver->error;
+  return SOAP_OK;
+}
+
+struct Namespace namespaces[] =
+{ {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"},
+  {"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/"},
+  {"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance"},
+  {"xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema"},
+  {"t", "http://tempuri.org"},
+  {NULL, NULL}
+};
diff --git a/samples/router/router.h b/samples/router/router.h
new file mode 100644
index 0000000..1ed8316
--- /dev/null
+++ b/samples/router/router.h
@@ -0,0 +1,19 @@
+/*	router.h
+
+	Simple Web Service message router (relay server)
+
+	Copyright (C) 2000-2002 Robert A. van Engelen. All Rights Reserved.
+
+*/
+
+struct t__Routing
+{ char *key;		// key matches SOAPAction or query string or endpoint URL
+  char *endpoint;
+  char *userid;		// optional HTTP Authorization userid
+  char *passwd;		// optional HTTP Authorization passwd
+};
+
+struct t__RoutingTable
+{ int __size;
+  struct t__Routing *__ptr;
+};
diff --git a/samples/router/router.xml b/samples/router/router.xml
new file mode 100644
index 0000000..a807896
--- /dev/null
+++ b/samples/router/router.xml
@@ -0,0 +1,8 @@
+<router>
+ <item>
+  <key>dime</key>
+  <endpoint>http://localhost:18000</endpoint>
+  <userid>guest</userid>
+  <passwd>guest</passwd>
+ </item>
+</router>
diff --git a/samples/rss/Makefile b/samples/rss/Makefile
new file mode 100644
index 0000000..5b80d14
--- /dev/null
+++ b/samples/rss/Makefile
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		rss
+rss:		rss.h rss.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c rss.h
+		$(CC) $(CFLAGS) -o rss rss.c soapC.c $(SOAPC) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h rss
diff --git a/samples/rss/MakefileSolaris b/samples/rss/MakefileSolaris
new file mode 100644
index 0000000..0adcf39
--- /dev/null
+++ b/samples/rss/MakefileSolaris
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lnsl -lsocket -lxnet
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		rss
+rss:		rss.h rss.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c rss.h
+		$(CC) $(CFLAGS) -o rss rss.c soapC.c $(SOAPC) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h rss
diff --git a/samples/rss/rss.c b/samples/rss/rss.c
new file mode 100644
index 0000000..50d28e1
--- /dev/null
+++ b/samples/rss/rss.c
@@ -0,0 +1,351 @@
+/*
+
+RSS 0.91 and 2.0
+
+Retrieve RSS feeds.
+
+Compile:
+soapcpp2 -c rss.h
+cc rss.c stdsoap2.c soapC.c
+
+Usage: rss [maxitems] URL
+Prints RSS content in text format.
+
+Usage: rss.cgi
+Installed as CGI application prints Javascript code to view RSS feeds in Web
+pages. The Javascript code produced by this application is executed with the
+following example script embedded in the Web page, e.g. to display BBC news:
+
+<script src="http://www.cs.fsu.edu/~engelen/rss.cgi/?rss=http%3A%2F%2Fwww.bbc.co.uk%2Fsyndication%2Ffeeds%2Fnews%2Fukfs_news%2Ffront_page%2Frss091.xml&max=10"></script>
+<noscript><a href="http://www.cs.fsu.edu/~engelen/rss.cgi/?rss=http%3A%2F%2Fwww.bbc.co.uk%2Fsyndication%2Ffeeds%2Fnews%2Fukfs_news%2Ffront_page%2Frss091.xml&max=10">View BBC News | Front Page | UK Edition</a></noscript> 
+
+To control the appearance with cascading style sheets:
+rss_box		the bounding div for the entire display 
+rss_table	the table with title, image, and items
+rss_title	the title of the feed and link style if displayed
+rss_image	the image
+rss_bar		the dividing bar
+rss_item	the title of the item
+rss_desc	the description of the item
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "soapH.h"
+
+#define STR(s) (s?s:"")
+
+/* Maximum number of HTTP redirects */
+#define MAX_REDIRECTS 10
+
+static void docwrite0(struct soap *soap, const char *s);
+static void docwrite1(struct soap *soap, const char *s1, const char *s2, const char *s3);
+static void docwrite2(struct soap *soap, const char *s1, const char *s2, const char *s3, const char *s4, const char *s5);
+static void docerror(struct soap *soap, const char *s);
+static void strwrite(struct soap *soop, const char *s);
+static char *query_key(char *buf, size_t len, char **s);
+static char *query_val(char *buf, size_t len, char **s);
+
+int main(int argc, char **argv)
+{ struct soap *soap = soap_new1(SOAP_C_UTFSTRING); /* preserve UTF8 string content */
+  const char *endpoint = NULL;
+  struct rss *rss;
+  int maxitems = 10; /* max items to show */
+  int show_date = 1; /* show date yes/no */
+  int i;
+  /* RSS has no encoding style */
+  soap->encodingStyle = NULL;
+  /* get URL of RSS feed or run as CGI app */
+  if (argc >= 3)
+  { maxitems = atoi(argv[1]);
+    endpoint = argv[2];
+  }
+  else if (argc >= 2)
+    endpoint = argv[1];
+  else
+  { char *query = getenv("QUERY_STRING"); /* CGI app: get query string */
+    char *keybuf;
+    char *valbuf;
+    int len;
+    if (query)
+    { len = strlen(query);
+      keybuf = (char*)soap_malloc(soap, len + 1);
+      valbuf = (char*)soap_malloc(soap, len + 1);
+      while (query)
+      { char *key = query_key(keybuf, len, &query); /* decode next query string key */
+        char *val = query_val(valbuf, len, &query); /* decode next query string value (if any) */
+        /* get endpoint and max number of items to display */
+        if (key && val)
+        { if (!strcmp(key, "rss"))
+            endpoint = soap_strdup(soap, val);
+          else if (!strcmp(key, "max"))
+            maxitems = atoi(val);
+          else if (!strcmp(key, "date"))
+            show_date = (*val == 'y');
+        }
+      }
+    }
+    if (!endpoint)
+    { docerror(soap, "No RSS URL");
+      exit(0);
+    }
+  }
+  /* connect and parse HTTP header (max HTTP redirects) */
+  for (i = 0; i < MAX_REDIRECTS; i++)
+  { /* HTTP GET and parse HTTP header */
+    if (soap_connect_command(soap, SOAP_GET, endpoint, NULL)
+     || soap_begin_recv(soap))
+    { if ((soap->error >= 301 && soap->error <= 303) || soap->error == 307)
+        endpoint = soap_strdup(soap, soap->endpoint); /* HTTP redirects */
+      else
+      { soap_print_fault(soap, stderr);
+        exit(soap->error);
+      }
+    }
+    else
+      break;
+  }
+  /* parse RSS */
+  rss = soap_get_rss(soap, NULL, "rss", NULL);
+  /* close connection */
+  soap_end_recv(soap);
+  soap_closesock(soap);
+  if (argc < 2)
+  { /* CGI application: produce Javascript */
+    if (rss && (!strcmp(rss->version, "0.91") || !strcmp(rss->version, "0.92") || !strcmp(rss->version, "2.0")))
+    { soap_begin_send(soap);
+      soap->http_content = "application/javascript";
+      soap_response(soap, SOAP_FILE); /* SOAP_FILE specifies http_content should be used */
+      docwrite0(soap, "<div class='rss_box' align='center'>");
+      docwrite0(soap, "<table cellpadding='2' width='100%' class='rss_table'>");
+      if (rss->channel.title)
+      { if (rss->channel.link)
+	  docwrite2(soap, "<tr><th class='rss_title'><a href='", rss->channel.link, "'>", rss->channel.title, "</a></th></tr>");
+        else
+	  docwrite1(soap, "<tr><th class='rss_title'>", rss->channel.title, "</th></tr>");
+      }
+      if (rss->channel.image && rss->channel.image->url)
+      { struct image *image = rss->channel.image;
+        if (image->link)
+          docwrite2(soap, "<tr><th class='rss_image'><a href='", image->link, "'><img src='", image->url, "' alt='Channel Image' border='0'</a></th></tr>");
+	else if (rss->channel.link)
+          docwrite2(soap, "<tr><th class='rss_image'><a href='", rss->channel.link, "'><img src='", image->url, "' alt='Channel Image' border='0'</a></th></tr>");
+        else
+          docwrite1(soap, "<tr><th class='rss_image'><img src='", image->url, "' alt='Channel Image' border='0'</th></tr>");
+	if (!rss->channel.title && image->title)
+          docwrite1(soap, "<tr><td class='rss_title'>", image->title, "</td></tr>");
+	if (!rss->channel.description && image->description)
+          docwrite1(soap, "<tr><td class='rss_desc'>", image->description, "</td></tr>");
+      }
+      if (rss->channel.description)
+        docwrite1(soap, "<tr><th class='rss_desc'>", rss->channel.description, "</th></tr>");
+      if (rss->channel.copyright)
+        docwrite1(soap, "<tr><td class='rss_desc'>", rss->channel.copyright, "</td></tr>");
+      if (rss->channel.__size < maxitems)
+        maxitems = rss->channel.__size;
+      for (i = 0; i < maxitems; i++)
+      { struct item *item = &rss->channel.item[i];
+        docwrite0(soap, "<tr><td class='rss_bar' bgcolor='#bbbbbb'></td></tr>");
+	if (item->title)
+        { if (item->link)
+	    docwrite2(soap, "<tr><td class='rss_item' bgcolor='#dddddd'><a href='", item->link, "'>", item->title, "</a></td></tr>");
+	  else
+	    docwrite1(soap, "<tr><td class='rss_item' bgcolor='#dddddd'>", item->title, "</td></tr>");
+	  if (show_date && item->pubDate)
+	    docwrite1(soap, "<tr><td class='rss_date' bgcolor='#dddddd'>Posted on ", item->pubDate, "</td></tr>");
+	  else if (show_date && item->dc__date)
+	    docwrite1(soap, "<tr><td class='rss_date' bgcolor='#dddddd'>Posted on ", ctime(item->dc__date), "</td></tr>");
+	  if (item->description)
+	    docwrite1(soap, "<tr><td class='rss_desc' bgcolor='#eeeeee'>", item->description, "</td></tr>");
+        }
+      }
+      docwrite0(soap, "</table>");
+      docwrite0(soap, "</div>");
+      soap_end_send(soap);
+    }
+    else
+    { docerror(soap, "No RSS 0.91, 0.92, or 2.0 data");
+      exit(0);
+    }
+  }
+  else if (rss)
+  { /* Interactive: produce text output */
+    if (!strcmp(rss->version, "0.91") || !strcmp(rss->version, "0.92") || !strcmp(rss->version, "2.0"))
+    { printf("Title: %s\n", STR(rss->channel.title));
+      printf("Link: %s\n", STR(rss->channel.link));
+      printf("Language: %s\n", STR(rss->channel.language));
+      printf("Description: %s\n", STR(rss->channel.description));
+      if (rss->channel.image)
+      { printf("Image title: %s\n", STR(rss->channel.image->title));
+        printf("Image url: %s\n", STR(rss->channel.image->url));
+        printf("Image link: %s\n", STR(rss->channel.image->link));
+        printf("Image dimensions: %d x %d\n", rss->channel.image->width, rss->channel.image->height);
+        printf("Image description: %s\n", STR(rss->channel.image->description));
+      }
+      if (rss->channel.__size < maxitems)
+        maxitems = rss->channel.__size;
+      for (i = 0; i < maxitems; i++)
+      { printf("\n%3d Title: %s\n", i+1, STR(rss->channel.item[i].title));
+        printf("    Link: %s\n", STR(rss->channel.item[i].link));
+        printf("    Description: %s\n", STR(rss->channel.item[i].description));
+        if (rss->channel.item[i].pubDate)
+          printf("    Posted: %s\n", rss->channel.item[i].pubDate);
+        else if (rss->channel.item[i].dc__date)
+          printf("    Posted: %s\n", ctime(rss->channel.item[i].dc__date));
+      }
+      printf("\nCopyright: %s\n", STR(rss->channel.copyright));
+    }
+    else
+      fprintf(stderr, "RSS 0.91, 0.92, or 2.0 content expected\n");
+  }
+  else
+    soap_print_fault(soap, stderr);
+  soap_end(soap);
+  soap_done(soap);
+  soap_free(soap);
+  return 0;
+}
+
+static void docwrite0(struct soap *soap, const char *s)
+{ soap_send3(soap, "document.write(\"", s, "\");\n");
+}
+
+static void docwrite1(struct soap *soap, const char *s1, const char *s2, const char *s3)
+{ soap_send2(soap, "document.write(\"", s1);
+  strwrite(soap, s2);
+  soap_send2(soap, s3, "\");\n");
+}
+
+static void docwrite2(struct soap *soap, const char *s1, const char *s2, const char *s3, const char *s4, const char *s5)
+{ soap_send2(soap, "document.write(\"", s1);
+  strwrite(soap, s2);
+  soap_send(soap, s3);
+  strwrite(soap, s4);
+  soap_send2(soap, s5, "\");\n");
+}
+
+static void docerror(struct soap *soap, const char *s)
+{ soap_begin_send(soap);
+  soap->http_content = "application/javascript";
+  soap_response(soap, SOAP_FILE);
+  soap_send(soap, s);
+  soap_end_send(soap);
+}
+
+static void strwrite(struct soap *soap, const char *s)
+{ while (*s)
+  { const char *t;
+    for (t = s; *t; t++)
+       if (*t == '\\' || *t == '"' || *t == '\n')
+         break;
+    soap_send_raw(soap, s, t - s);
+    if (*t == '\\')
+    { soap_send(soap, "\\\\");
+      t++;
+    }
+    else if (*t == '"')
+    { soap_send(soap, "\\\"");
+      t++;
+    }
+    else if (*t == '\n')
+    { t++;
+      if (*t == '\n')
+      { soap_send(soap, "<p/>"); /* two line breaks? Probably a new paragraph was intended */
+        t++;
+      }
+      else
+        soap_send(soap, " ");
+    }
+    s = t;
+  }
+}
+
+static const char *decode_url(char *buf, size_t len, const char *val)
+{ const char *s;
+  char *t;
+  if (!buf)
+    return NULL;
+  for (s = val; *s; s++)
+    if (*s != ' ' && *s != '=')
+      break;
+  if (*s == '"')
+  { t = buf;
+    s++;
+    while (*s && *s != '"' && --len)
+      *t++ = *s++;
+    *t = '\0';
+    do s++;
+    while (*s && *s != '&' && *s != '=');
+  }
+  else
+  { t = buf;
+    while (*s && *s != '&' && *s != '=' && --len)
+    { switch (*s)
+      { case '+':
+          *t++ = ' ';
+        case ' ':
+          s++;
+          break;
+        case '%':
+          *t++ = ((s[1] >= 'A' ? (s[1]&0x7) + 9 : s[1] - '0') << 4) + (s[2] >= 'A' ? (s[2]&0x7) + 9 : s[2] - '0');
+          s += 3;
+          break;
+        default:
+          *t++ = *s++;
+      }
+    }
+    *t = '\0';
+  }
+  if (*s == '&')
+    s++;
+  return s;
+}
+
+static char *query_key(char *buf, size_t len, char **s)
+{ char *t = *s;
+  if (t && *t)
+  { *s = (char*)decode_url(buf, len, t);
+    return buf;
+  }
+  return *s = NULL;
+}
+
+static char *query_val(char *buf, size_t len, char **s)
+{ char *t = *s;
+  if (t && *t == '=')
+  { *s = (char*)decode_url(buf, len, t);
+    return buf;
+  }
+  return NULL;
+}
+
+/* RSS 0.91 doesn't use namespaces, but RSS 2.0 does, which means that soap->namespace=NULL when serializing RSS 0.91 feeds */
+struct Namespace namespaces[] = {
+{ "dc", "http://purl.org/dc/elements/1.1/" },
+{ NULL, NULL } 
+};
diff --git a/samples/rss/rss.h b/samples/rss/rss.h
new file mode 100644
index 0000000..fc4c697
--- /dev/null
+++ b/samples/rss/rss.h
@@ -0,0 +1,71 @@
+/*
+
+RSS 0.91, 0.92 and 2.0
+
+Retrieve RSS feeds.
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+//gsoap dc schema namespace: http://purl.org/dc/elements/1.1/
+
+typedef char *XML;	// mixed content
+
+struct channel
+{ char *title;
+  char *link;
+  char *language;
+  char *copyright;
+  XML description;	// description may contain XHTML that we want to preserve
+  struct image *image;
+  int __size;
+  struct item *item;
+  time_t *dc__date;	// RSS 2.0 dc schema element
+};
+
+struct item
+{ char *title;
+  char *link;
+  XML description;	// description may contain XHTML that we want to preserve
+  char *pubDate;
+  time_t *dc__date;	// RSS 2.0 dc schema element
+};
+
+struct image
+{ char *title;
+  char *url;
+  char *link;
+  int width  0:1 = 0;	// optional, default value = 0
+  int height 0:1 = 0;	// optional, default value = 0
+  XML description;	// description may contain XHTML that we want to preserve
+};
+
+struct rss
+{ @char *version = "2.0";
+  struct channel channel;
+};
diff --git a/samples/rss/rsstest.html b/samples/rss/rsstest.html
new file mode 100644
index 0000000..d071ad6
--- /dev/null
+++ b/samples/rss/rsstest.html
@@ -0,0 +1,8 @@
+<html>

+<body>

+

+<script src="http://www.cs.fsu.edu/~engelen/rss.cgi/?rss=http%3A%2F%2Fwww.bbc.co.uk%2Fsyndication%2Ffeeds%2Fnews%2Fukfs_news%2Ffront_page%2Frss091.xml&max=10"></script>

+<noscript><a href="http://www.cs.fsu.edu/~engelen/rss.cgi/?rss=http%3A%2F%2Fwww.bbc.co.uk%2Fsyndication%2Ffeeds%2Fnews%2Fukfs_news%2Ffront_page%2Frss091.xml&max=10">View BBC News | Front Page | UK Edition</a></noscript> 

+

+</body>

+</html>

diff --git a/samples/ssl/Makefile b/samples/ssl/Makefile
new file mode 100644
index 0000000..9d3a28a
--- /dev/null
+++ b/samples/ssl/Makefile
@@ -0,0 +1,23 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		sslclient sslserver
+sslclient:	ssl.h sslclient.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c ssl.h
+		$(CC) -DWITH_OPENSSL $(CFLAGS) -o sslclient sslclient.c soapC.c soapClient.c $(SOAPC) -lssl -lcrypto $(LIBS)
+sslserver:	ssl.h sslserver.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c ssl.h
+		$(CC) -DWITH_OPENSSL $(CFLAGS) -o sslserver sslserver.c soapC.c soapServer.c $(SOAPC) -lssl -lcrypto -lpthread $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h sslclient sslserver
diff --git a/samples/ssl/MakefileSolaris b/samples/ssl/MakefileSolaris
new file mode 100644
index 0000000..d8bdb3c
--- /dev/null
+++ b/samples/ssl/MakefileSolaris
@@ -0,0 +1,23 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lxnet -lnsl -lsocket
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		sslclient sslserver
+sslclient:	ssl.h sslclient.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c ssl.h
+		$(CC) -DWITH_OPENSSL $(CFLAGS) -o sslclient sslclient.c soapC.c soapClient.c $(SOAPC) -lssl -lcrypto $(LIBS)
+sslserver:	ssl.h sslserver.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c ssl.h
+		$(CC) -DWITH_OPENSSL $(CFLAGS) -o sslserver sslserver.c soapC.c soapServer.c $(SOAPC) -lssl -lcrypto -lpthread $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h sslclient sslserver
diff --git a/samples/ssl/README.txt b/samples/ssl/README.txt
new file mode 100644
index 0000000..d1f04c6
--- /dev/null
+++ b/samples/ssl/README.txt
@@ -0,0 +1,50 @@
+How to generate self-signed root certificate and client.pem/server.pem
+
+Create HOME/CA directory and copy openssl.cnf, root.sh, and cert.sh to this dir.
+
+Change dir to HOME/CA
+
+To generate the root CA (root.pem and cacert.pem):
+
+./root.sh
+
+Save the root.pem and the passphrase in a safe place (don't distribute them!).
+You need these to create certificates.
+
+The root.pem and cacert.pem are valid for three years. Don't repeat this step
+until the certificate expires.
+
+To generate the client.pem key file (enter "password" and "localhost" and use
+the root CA passphrase when prompted to sign the client certificate):
+
+./cert.sh client
+
+To generate the server.pem key file (enter "password" and "localhost" and use
+the root CA passphrase when prompted to sign the server certificate):
+
+./cert.sh server
+
+The client.pem and server.pem certificates are valid for one year.
+
+Required files in HOME/CA directory:
+
+openssl.cnf
+root.sh
+cert.sh
+
+Files generated:
+
+cacert.pem	root's certificate for distribution
+root.pem	root CA (to sign client/server key files, do not distribute)
+rootkey.pem	private key
+rootreq.pem	sign request
+root.srl	serial number
+
+client.pem	client key file
+clientkey.pem	private key
+clientreq.pem	sign request
+
+server.pem	server key file
+serverkey.pem	private key
+serverreq.pem	sign request
+
diff --git a/samples/ssl/cacert.pem b/samples/ssl/cacert.pem
new file mode 100644
index 0000000..004b05f
--- /dev/null
+++ b/samples/ssl/cacert.pem
@@ -0,0 +1,21 @@
+-----BEGIN CERTIFICATE-----
+MIIDhjCCAu+gAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMCVVMx
+CzAJBgNVBAgTAkZMMRQwEgYDVQQHEwtUYWxsYWhhc3NlZTEWMBQGA1UEChMNR2Vu
+aXZpYSwgSW5jLjELMAkGA1UECxMCSVQxFDASBgNVBAMTC2dlbml2aWEuY29tMSIw
+IAYJKoZIhvcNAQkBFhNjb250YWN0QGdlbml2aWEuY29tMB4XDTA0MTAwMjE3MDgw
+NloXDTA3MTAwMjE3MDgwNlowgY8xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJGTDEU
+MBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2aWEsIEluYy4xCzAJ
+BgNVBAsTAklUMRQwEgYDVQQDEwtnZW5pdmlhLmNvbTEiMCAGCSqGSIb3DQEJARYT
+Y29udGFjdEBnZW5pdmlhLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
+l6K9bLMcrJ6Bz+8hxyolSJy5TdZKo8OmmskP+NAJct7aGWa33u2lkZ+GkoUmLKZ/
+rDNpgmYVNQlOQC4rt5oDt4AUoj584G8PJKSPwymJcX0sbfB7k8xRmLO+vVgSUvDu
+asLMWJ6PsYIuGhp4BwOAgnYACTzsd6kSeIsed8XSx7cCAwEAAaOB7zCB7DAdBgNV
+HQ4EFgQU4MyIi0GgIUqkYRhnJ2GgyUmVd8owgbwGA1UdIwSBtDCBsYAU4MyIi0Gg
+IUqkYRhnJ2GgyUmVd8qhgZWkgZIwgY8xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJG
+TDEUMBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2aWEsIEluYy4x
+CzAJBgNVBAsTAklUMRQwEgYDVQQDEwtnZW5pdmlhLmNvbTEiMCAGCSqGSIb3DQEJ
+ARYTY29udGFjdEBnZW5pdmlhLmNvbYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3
+DQEBBQUAA4GBAFmb9kV+EDx5O4j7dLMu909nFgnBL06sepjqtBIIbZY3GnCgefxK
+p1S6If01/mdV79nZGJldegM77tz4VIlzuIaz+2NO+Gqbr6ErOR+3UGOrRuH39aMT
+1DvwHYpU5GU+lG1aWHdQp8uZ5y4okMg3Z9IZ5nijkUnpCHQO+q/8FrML
+-----END CERTIFICATE-----
diff --git a/samples/ssl/cacerts.pem b/samples/ssl/cacerts.pem
new file mode 100644
index 0000000..1983d88
--- /dev/null
+++ b/samples/ssl/cacerts.pem
@@ -0,0 +1,4354 @@
+ABAecom (sub., Am. Bankers Assn.) Root CA
+=========================================
+MD5 Fingerprint: 82:12:F7:89:E1:0B:91:60:A4:B6:22:9F:94:68:11:92
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIID+DCCAuCgAwIBAgIRANAeQJAAACdLAAAAAQAAAAQwDQYJKoZIhvcNAQEFBQAw
+gYwxCzAJBgNVBAYTAlVTMQ0wCwYDVQQIEwRVdGFoMRcwFQYDVQQHEw5TYWx0IExh
+a2UgQ2l0eTEYMBYGA1UEChMPWGNlcnQgRVogYnkgRFNUMRgwFgYDVQQDEw9YY2Vy
+dCBFWiBieSBEU1QxITAfBgkqhkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTAe
+Fw05OTA3MTQxNjE0MThaFw0wOTA3MTExNjE0MThaMIGMMQswCQYDVQQGEwJVUzEN
+MAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxGDAWBgNVBAoT
+D1hjZXJ0IEVaIGJ5IERTVDEYMBYGA1UEAxMPWGNlcnQgRVogYnkgRFNUMSEwHwYJ
+KoZIhvcNAQkBFhJjYUBkaWdzaWd0cnVzdC5jb20wggEiMA0GCSqGSIb3DQEBAQUA
+A4IBDwAwggEKAoIBAQCtVBjetL/3reh0qu2LfI/C1HUa1YS5tmL8ie/kl2GS+x24
+4VpHNJ6eBiL70+o4y7iLB/caoBd3B1owHNQpOCDXJ0DYUJNDv9IYoil2BXKqa7Zp
+mKt5Hhxl9WqL/MUWqqJy2mDtTm4ZJXoKHTDjUJtCPETrobAgHtsCfv49H7/QAIrb
+QHamGKUVp1e2UsIBF5h3j4qBxhq0airmr6nWAKzP2BVJfNsbof6B+of505DBAsD5
+0ELpkWglX8a/hznplQBgKL+DLMDnXrbXNhbnYId26OcnsiUNi3rlqh3lWc3OCw5v
+xsic4xDZhTnTt5v6xrp8dNJddVardKSiUb9SfO5xAgMBAAGjUzBRMA8GA1UdEwEB
+/wQFMAMBAf8wHwYDVR0jBBgwFoAUCCBsZuuBCmxc1bWmPEHdHJaRJ3cwHQYDVR0O
+BBYEFAggbGbrgQpsXNW1pjxB3RyWkSd3MA0GCSqGSIb3DQEBBQUAA4IBAQBah1iP
+Lat2IWtUDNnxQfZOzSue4x+boy1/2St9WMhnpCn16ezVvZY/o3P4xFs2fNBjLDQ5
+m0i4PW/2FMWeY+anNG7T6DOzxzwYbiOuQ5KZP5jFaTDxNjutuTCC1rZZFpYCCykS
+YbQRifcML5SQhZgonFNsfmPdc/QZ/0qB0bJSI/08SjTOWhvgUIrtT4GV2GDn5MQN
+u1g+WPdOaG8+Z8nLepcWJ+xCYRR2uwDF6wg9FX9LtiJdhzuQ9PPA/jez6dliDMDD
+Wa9gvR8N26E0HzDEPYutsB0Ek+1f1eS/IDAE9EjpMwHRLpAnUrOb3jocq6mXf5vr
+wo3CbezcE9NGxXl8
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            d0:1e:40:90:00:00:27:4b:00:00:00:01:00:00:00:04
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, ST=Utah, L=Salt Lake City, O=Xcert EZ by DST, CN=Xcert EZ by DST/Email=ca@digsigtrust.com
+        Validity
+            Not Before: Jul 14 16:14:18 1999 GMT
+            Not After : Jul 11 16:14:18 2009 GMT
+        Subject: C=US, ST=Utah, L=Salt Lake City, O=Xcert EZ by DST, CN=Xcert EZ by DST/Email=ca@digsigtrust.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:ad:54:18:de:b4:bf:f7:ad:e8:74:aa:ed:8b:7c:
+                    8f:c2:d4:75:1a:d5:84:b9:b6:62:fc:89:ef:e4:97:
+                    61:92:fb:1d:b8:e1:5a:47:34:9e:9e:06:22:fb:d3:
+                    ea:38:cb:b8:8b:07:f7:1a:a0:17:77:07:5a:30:1c:
+                    d4:29:38:20:d7:27:40:d8:50:93:43:bf:d2:18:a2:
+                    29:76:05:72:aa:6b:b6:69:98:ab:79:1e:1c:65:f5:
+                    6a:8b:fc:c5:16:aa:a2:72:da:60:ed:4e:6e:19:25:
+                    7a:0a:1d:30:e3:50:9b:42:3c:44:eb:a1:b0:20:1e:
+                    db:02:7e:fe:3d:1f:bf:d0:00:8a:db:40:76:a6:18:
+                    a5:15:a7:57:b6:52:c2:01:17:98:77:8f:8a:81:c6:
+                    1a:b4:6a:2a:e6:af:a9:d6:00:ac:cf:d8:15:49:7c:
+                    db:1b:a1:fe:81:fa:87:f9:d3:90:c1:02:c0:f9:d0:
+                    42:e9:91:68:25:5f:c6:bf:87:39:e9:95:00:60:28:
+                    bf:83:2c:c0:e7:5e:b6:d7:36:16:e7:60:87:76:e8:
+                    e7:27:b2:25:0d:8b:7a:e5:aa:1d:e5:59:cd:ce:0b:
+                    0e:6f:c6:c8:9c:e3:10:d9:85:39:d3:b7:9b:fa:c6:
+                    ba:7c:74:d2:5d:75:56:ab:74:a4:a2:51:bf:52:7c:
+                    ee:71
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+            X509v3 Authority Key Identifier: 
+                keyid:08:20:6C:66:EB:81:0A:6C:5C:D5:B5:A6:3C:41:DD:1C:96:91:27:77
+
+            X509v3 Subject Key Identifier: 
+                08:20:6C:66:EB:81:0A:6C:5C:D5:B5:A6:3C:41:DD:1C:96:91:27:77
+    Signature Algorithm: sha1WithRSAEncryption
+        5a:87:58:8f:2d:ab:76:21:6b:54:0c:d9:f1:41:f6:4e:cd:2b:
+        9e:e3:1f:9b:a3:2d:7f:d9:2b:7d:58:c8:67:a4:29:f5:e9:ec:
+        d5:bd:96:3f:a3:73:f8:c4:5b:36:7c:d0:63:2c:34:39:9b:48:
+        b8:3d:6f:f6:14:c5:9e:63:e6:a7:34:6e:d3:e8:33:b3:c7:3c:
+        18:6e:23:ae:43:92:99:3f:98:c5:69:30:f1:36:3b:ad:b9:30:
+        82:d6:b6:59:16:96:02:0b:29:12:61:b4:11:89:f7:0c:2f:94:
+        90:85:98:28:9c:53:6c:7e:63:dd:73:f4:19:ff:4a:81:d1:b2:
+        52:23:fd:3c:4a:34:ce:5a:1b:e0:50:8a:ed:4f:81:95:d8:60:
+        e7:e4:c4:0d:bb:58:3e:58:f7:4e:68:6f:3e:67:c9:cb:7a:97:
+        16:27:ec:42:61:14:76:bb:00:c5:eb:08:3d:15:7f:4b:b6:22:
+        5d:87:3b:90:f4:f3:c0:fe:37:b3:e9:d9:62:0c:c0:c3:59:af:
+        60:bd:1f:0d:db:a1:34:1f:30:c4:3d:8b:ad:b0:1d:04:93:ed:
+        5f:d5:e4:bf:20:30:04:f4:48:e9:33:01:d1:2e:90:27:52:b3:
+        9b:de:3a:1c:ab:a9:97:7f:9b:eb:c2:8d:c2:6d:ec:dc:13:d3:
+        46:c5:79:7c
+
+ANX Network CA by DST
+=====================
+MD5 Fingerprint: A8:ED:DE:EB:93:88:66:D8:2F:C3:BD:1D:BE:45:BE:4D
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDTTCCAragAwIBAgIENm6ibzANBgkqhkiG9w0BAQUFADBSMQswCQYDVQQGEwJV
+UzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMR0wGwYDVQQL
+ExREU1QgKEFOWCBOZXR3b3JrKSBDQTAeFw05ODEyMDkxNTQ2NDhaFw0xODEyMDkx
+NjE2NDhaMFIxCzAJBgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVy
+ZSBUcnVzdCBDby4xHTAbBgNVBAsTFERTVCAoQU5YIE5ldHdvcmspIENBMIGdMA0G
+CSqGSIb3DQEBAQUAA4GLADCBhwKBgQC0SBGAWKDVpZkP9jcsRLZu0XzzKmueEbaI
+IwRccSWeahJ3EW6/aDllqPay9qIYsokVoGe3eowiSGv2hDQftsr3G3LL8ltI04ce
+InYTBLSsbJZ/5w4IyTJRMC3VgOghZ7rzXggkLAdZnZAa7kbJtaQelrRBkdR/0o04
+JrBvQ24JfQIBA6OCATAwggEsMBEGCWCGSAGG+EIBAQQEAwIABzB0BgNVHR8EbTBr
+MGmgZ6BlpGMwYTELMAkGA1UEBhMCVVMxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0
+dXJlIFRydXN0IENvLjEdMBsGA1UECxMURFNUIChBTlggTmV0d29yaykgQ0ExDTAL
+BgNVBAMTBENSTDEwKwYDVR0QBCQwIoAPMTk5ODEyMDkxNTQ2NDhagQ8yMDE4MTIw
+OTE1NDY0OFowCwYDVR0PBAQDAgEGMB8GA1UdIwQYMBaAFIwWVXDMFgpTZMKlhKqz
+ZBdDP4I2MB0GA1UdDgQWBBSMFlVwzBYKU2TCpYSqs2QXQz+CNjAMBgNVHRMEBTAD
+AQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4GB
+AEklyWCxDF+pORDTxTRVfc95wynr3vnCQPnoVsXwL+z02exIUbhjOF6TbhiWhbnK
+UJykuOpmJmiThW9vTHHQvnoLPDG5975pnhDX0UDorBZxq66rOOFwscqSFuBdhaYY
+gAYAnOGmGEJRp2hoWe8mlF+tMQz+KR4XAYQ3W+gSMqNd
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 913220207 (0x366ea26f)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Digital Signature Trust Co., OU=DST (ANX Network) CA
+        Validity
+            Not Before: Dec  9 15:46:48 1998 GMT
+            Not After : Dec  9 16:16:48 2018 GMT
+        Subject: C=US, O=Digital Signature Trust Co., OU=DST (ANX Network) CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b4:48:11:80:58:a0:d5:a5:99:0f:f6:37:2c:44:
+                    b6:6e:d1:7c:f3:2a:6b:9e:11:b6:88:23:04:5c:71:
+                    25:9e:6a:12:77:11:6e:bf:68:39:65:a8:f6:b2:f6:
+                    a2:18:b2:89:15:a0:67:b7:7a:8c:22:48:6b:f6:84:
+                    34:1f:b6:ca:f7:1b:72:cb:f2:5b:48:d3:87:1e:22:
+                    76:13:04:b4:ac:6c:96:7f:e7:0e:08:c9:32:51:30:
+                    2d:d5:80:e8:21:67:ba:f3:5e:08:24:2c:07:59:9d:
+                    90:1a:ee:46:c9:b5:a4:1e:96:b4:41:91:d4:7f:d2:
+                    8d:38:26:b0:6f:43:6e:09:7d
+                Exponent: 3 (0x3)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Digital Signature Trust Co./OU=DST (ANX Network) CA/CN=CRL1
+
+            X509v3 Private Key Usage Period: 
+                Not Before: Dec  9 15:46:48 1998 GMT, Not After: Dec  9 15:46:48 2018 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:8C:16:55:70:CC:16:0A:53:64:C2:A5:84:AA:B3:64:17:43:3F:82:36
+
+            X509v3 Subject Key Identifier: 
+                8C:16:55:70:CC:16:0A:53:64:C2:A5:84:AA:B3:64:17:43:3F:82:36
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0
+..V4.0....
+    Signature Algorithm: sha1WithRSAEncryption
+        49:25:c9:60:b1:0c:5f:a9:39:10:d3:c5:34:55:7d:cf:79:c3:
+        29:eb:de:f9:c2:40:f9:e8:56:c5:f0:2f:ec:f4:d9:ec:48:51:
+        b8:63:38:5e:93:6e:18:96:85:b9:ca:50:9c:a4:b8:ea:66:26:
+        68:93:85:6f:6f:4c:71:d0:be:7a:0b:3c:31:b9:f7:be:69:9e:
+        10:d7:d1:40:e8:ac:16:71:ab:ae:ab:38:e1:70:b1:ca:92:16:
+        e0:5d:85:a6:18:80:06:00:9c:e1:a6:18:42:51:a7:68:68:59:
+        ef:26:94:5f:ad:31:0c:fe:29:1e:17:01:84:37:5b:e8:12:32:
+        a3:5d
+
+American Express CA
+===================
+MD5 Fingerprint: 1C:D5:8E:82:BE:70:55:8E:39:61:DF:AD:51:DB:6B:A0
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICkDCCAfkCAgCNMA0GCSqGSIb3DQEBBAUAMIGPMQswCQYDVQQGEwJVUzEnMCUG
+A1UEChMeQW1lcmljYW4gRXhwcmVzcyBDb21wYW55LCBJbmMuMSYwJAYDVQQLEx1B
+bWVyaWNhbiBFeHByZXNzIFRlY2hub2xvZ2llczEvMC0GA1UEAxMmQW1lcmljYW4g
+RXhwcmVzcyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNOTgwODE0MjIwMTAwWhcN
+MDYwODE0MjM1OTAwWjCBjzELMAkGA1UEBhMCVVMxJzAlBgNVBAoTHkFtZXJpY2Fu
+IEV4cHJlc3MgQ29tcGFueSwgSW5jLjEmMCQGA1UECxMdQW1lcmljYW4gRXhwcmVz
+cyBUZWNobm9sb2dpZXMxLzAtBgNVBAMTJkFtZXJpY2FuIEV4cHJlc3MgQ2VydGlm
+aWNhdGUgQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJ8kmS
+hcr9FSm1BrZE7PyIo/KGzv8UTyQckvnCI8HOQ99dNMi4FOzVKnCRSZXXVs2U8amT
+0Ggi3E19oApyKkfqJfCFAF82VGHPC/k3Wmed6R/pZD9wlWGn0DAC3iYopGYDBOkw
++48zB/lvYYeictvzaHhjZlmpybdm4RWySDYs+QIDAQABMA0GCSqGSIb3DQEBBAUA
+A4GBAGgXYrhzi0xs60qlPqvlnS7SzYoHV/PGWZd2Fxf4Uo4nk9hY2Chs9KIEeorC
+diSxArTfKPL386infiNIYYj0EWiuJl32oUtTJWrYKhQCDuCHIG6eGVxzkAsj4jGX
+Iz/VIqLTBnvaN/XXtUFEF3pFAtmFRWbWjsfwegyZYiJpW+3S
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 141 (0x8d)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=US, O=American Express Company, Inc., OU=American Express Technologies, CN=American Express Certificate Authority
+        Validity
+            Not Before: Aug 14 22:01:00 1998 GMT
+            Not After : Aug 14 23:59:00 2006 GMT
+        Subject: C=US, O=American Express Company, Inc., OU=American Express Technologies, CN=American Express Certificate Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:c9:f2:49:92:85:ca:fd:15:29:b5:06:b6:44:ec:
+                    fc:88:a3:f2:86:ce:ff:14:4f:24:1c:92:f9:c2:23:
+                    c1:ce:43:df:5d:34:c8:b8:14:ec:d5:2a:70:91:49:
+                    95:d7:56:cd:94:f1:a9:93:d0:68:22:dc:4d:7d:a0:
+                    0a:72:2a:47:ea:25:f0:85:00:5f:36:54:61:cf:0b:
+                    f9:37:5a:67:9d:e9:1f:e9:64:3f:70:95:61:a7:d0:
+                    30:02:de:26:28:a4:66:03:04:e9:30:fb:8f:33:07:
+                    f9:6f:61:87:a2:72:db:f3:68:78:63:66:59:a9:c9:
+                    b7:66:e1:15:b2:48:36:2c:f9
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        68:17:62:b8:73:8b:4c:6c:eb:4a:a5:3e:ab:e5:9d:2e:d2:cd:
+        8a:07:57:f3:c6:59:97:76:17:17:f8:52:8e:27:93:d8:58:d8:
+        28:6c:f4:a2:04:7a:8a:c2:76:24:b1:02:b4:df:28:f2:f7:f3:
+        a8:a7:7e:23:48:61:88:f4:11:68:ae:26:5d:f6:a1:4b:53:25:
+        6a:d8:2a:14:02:0e:e0:87:20:6e:9e:19:5c:73:90:0b:23:e2:
+        31:97:23:3f:d5:22:a2:d3:06:7b:da:37:f5:d7:b5:41:44:17:
+        7a:45:02:d9:85:45:66:d6:8e:c7:f0:7a:0c:99:62:22:69:5b:
+        ed:d2
+
+American Express Global CA
+==========================
+MD5 Fingerprint: 63:1B:66:93:8C:F3:66:CB:3C:79:57:DC:05:49:EA:DB
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEBDCCAuygAwIBAgICAIUwDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNVBAYTAlVT
+MScwJQYDVQQKEx5BbWVyaWNhbiBFeHByZXNzIENvbXBhbnksIEluYy4xJjAkBgNV
+BAsTHUFtZXJpY2FuIEV4cHJlc3MgVGVjaG5vbG9naWVzMTYwNAYDVQQDEy1BbWVy
+aWNhbiBFeHByZXNzIEdsb2JhbCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNOTgw
+ODE0MTkwNjAwWhcNMTMwODE0MjM1OTAwWjCBljELMAkGA1UEBhMCVVMxJzAlBgNV
+BAoTHkFtZXJpY2FuIEV4cHJlc3MgQ29tcGFueSwgSW5jLjEmMCQGA1UECxMdQW1l
+cmljYW4gRXhwcmVzcyBUZWNobm9sb2dpZXMxNjA0BgNVBAMTLUFtZXJpY2FuIEV4
+cHJlc3MgR2xvYmFsIENlcnRpZmljYXRlIEF1dGhvcml0eTCCASIwDQYJKoZIhvcN
+AQEBBQADggEPADCCAQoCggEBAPAkJmYu++tKc3FTiUfLJjxTkpRMysKFtQ34w1e9
+Lyofahi3V68MABb6oLaQpvcaoS5mJsdoo4qTaWa1RlYtHYLqkAwKIsKJUI0F89Sr
+c0HwzxKsKLRvFJSWWUuekHWG3+JH6+HpT0N+h8onGGaetcFAZX38YW+tm3LPqV7Y
+8/nabpEQ+ky16n4g3qk5L/WI5IpvNcYgnCuGRjMK/DFVpWusFkDpzTVZbzIEw3u1
+D3t3cPNIuypSgs6vKW3xEW9t5gcAAe+a8yYNpnkTZ6/4qxx1rJG1a75AsN6cDLFp
+hRlxkRNFyt/R/eayypaDedvFuKpbepALeFY+xteflEgR9a0CAwEAAaNaMFgwEgYD
+VR0TAQH/BAgwBgEB/wIBBTAOBgNVHQ8BAf8EBAMCAQYwFwYDVR0gBBAwDjAMBgoq
+hkiG+Q8KAQUBMBkGA1UdDgQSBBBXRzV7NicRqAj8L0Yl6yRpMA0GCSqGSIb3DQEB
+BQUAA4IBAQDHYUWoinG5vjTpIXshzVYTmNUwY+kYqkuSFb8LHbvskmnFLsNhi+gw
+RcsQRsFzOFyLGdIr80DrfHKzLh4n43WVihybLsSVBYZy0FX0oZJSeVzb9Pjc5dcS
+sUDHPIbkMWVKyjfG3nZXGWlMRmn8Kq0WN3qTrPchSy3766lQy8HRQAjaA2mHpzde
+VcHF7cTjjgwml5tcV0ty4/IDBdACOyYDQJCevgtbSQx48dVMVSng9v1MA6lUAjLR
+V1qFrEPtWzsWX6C/NdtLnnvo/+cNPDuom0lBRvVzTv+SZSGDE1Vx60k8f4gawhIo
+JaFGS0E3l3/sjvHUoZbCILZerakcHhGg
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 133 (0x85)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=American Express Company, Inc., OU=American Express Technologies, CN=American Express Global Certificate Authority
+        Validity
+            Not Before: Aug 14 19:06:00 1998 GMT
+            Not After : Aug 14 23:59:00 2013 GMT
+        Subject: C=US, O=American Express Company, Inc., OU=American Express Technologies, CN=American Express Global Certificate Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:f0:24:26:66:2e:fb:eb:4a:73:71:53:89:47:cb:
+                    26:3c:53:92:94:4c:ca:c2:85:b5:0d:f8:c3:57:bd:
+                    2f:2a:1f:6a:18:b7:57:af:0c:00:16:fa:a0:b6:90:
+                    a6:f7:1a:a1:2e:66:26:c7:68:a3:8a:93:69:66:b5:
+                    46:56:2d:1d:82:ea:90:0c:0a:22:c2:89:50:8d:05:
+                    f3:d4:ab:73:41:f0:cf:12:ac:28:b4:6f:14:94:96:
+                    59:4b:9e:90:75:86:df:e2:47:eb:e1:e9:4f:43:7e:
+                    87:ca:27:18:66:9e:b5:c1:40:65:7d:fc:61:6f:ad:
+                    9b:72:cf:a9:5e:d8:f3:f9:da:6e:91:10:fa:4c:b5:
+                    ea:7e:20:de:a9:39:2f:f5:88:e4:8a:6f:35:c6:20:
+                    9c:2b:86:46:33:0a:fc:31:55:a5:6b:ac:16:40:e9:
+                    cd:35:59:6f:32:04:c3:7b:b5:0f:7b:77:70:f3:48:
+                    bb:2a:52:82:ce:af:29:6d:f1:11:6f:6d:e6:07:00:
+                    01:ef:9a:f3:26:0d:a6:79:13:67:af:f8:ab:1c:75:
+                    ac:91:b5:6b:be:40:b0:de:9c:0c:b1:69:85:19:71:
+                    91:13:45:ca:df:d1:fd:e6:b2:ca:96:83:79:db:c5:
+                    b8:aa:5b:7a:90:0b:78:56:3e:c6:d7:9f:94:48:11:
+                    f5:ad
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE, pathlen:5
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Certificate Policies: 
+                Policy: 1.2.840.113807.10.1.5.1
+
+            X509v3 Subject Key Identifier: 
+                57:47:35:7B:36:27:11:A8:08:FC:2F:46:25:EB:24:69
+    Signature Algorithm: sha1WithRSAEncryption
+        c7:61:45:a8:8a:71:b9:be:34:e9:21:7b:21:cd:56:13:98:d5:
+        30:63:e9:18:aa:4b:92:15:bf:0b:1d:bb:ec:92:69:c5:2e:c3:
+        61:8b:e8:30:45:cb:10:46:c1:73:38:5c:8b:19:d2:2b:f3:40:
+        eb:7c:72:b3:2e:1e:27:e3:75:95:8a:1c:9b:2e:c4:95:05:86:
+        72:d0:55:f4:a1:92:52:79:5c:db:f4:f8:dc:e5:d7:12:b1:40:
+        c7:3c:86:e4:31:65:4a:ca:37:c6:de:76:57:19:69:4c:46:69:
+        fc:2a:ad:16:37:7a:93:ac:f7:21:4b:2d:fb:eb:a9:50:cb:c1:
+        d1:40:08:da:03:69:87:a7:37:5e:55:c1:c5:ed:c4:e3:8e:0c:
+        26:97:9b:5c:57:4b:72:e3:f2:03:05:d0:02:3b:26:03:40:90:
+        9e:be:0b:5b:49:0c:78:f1:d5:4c:55:29:e0:f6:fd:4c:03:a9:
+        54:02:32:d1:57:5a:85:ac:43:ed:5b:3b:16:5f:a0:bf:35:db:
+        4b:9e:7b:e8:ff:e7:0d:3c:3b:a8:9b:49:41:46:f5:73:4e:ff:
+        92:65:21:83:13:55:71:eb:49:3c:7f:88:1a:c2:12:28:25:a1:
+        46:4b:41:37:97:7f:ec:8e:f1:d4:a1:96:c2:20:b6:5e:ad:a9:
+        1c:1e:11:a0
+
+BelSign Object Publishing CA
+============================
+MD5 Fingerprint: 8A:02:F8:DF:B8:E1:84:9F:5A:C2:60:24:65:D1:73:FB
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDAzCCAmygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBuzELMAkGA1UEBhMCQkUx
+ETAPBgNVBAcTCEJydXNzZWxzMRMwEQYDVQQKEwpCZWxTaWduIE5WMTgwNgYDVQQL
+Ey9CZWxTaWduIE9iamVjdCBQdWJsaXNoaW5nIENlcnRpZmljYXRlIEF1dGhvcml0
+eTElMCMGA1UEAxMcQmVsU2lnbiBPYmplY3QgUHVibGlzaGluZyBDQTEjMCEGCSqG
+SIb3DQEJARYUd2VibWFzdGVyQGJlbHNpZ24uYmUwHhcNOTcwOTE5MjIwMzAwWhcN
+MDcwOTE5MjIwMzAwWjCBuzELMAkGA1UEBhMCQkUxETAPBgNVBAcTCEJydXNzZWxz
+MRMwEQYDVQQKEwpCZWxTaWduIE5WMTgwNgYDVQQLEy9CZWxTaWduIE9iamVjdCBQ
+dWJsaXNoaW5nIENlcnRpZmljYXRlIEF1dGhvcml0eTElMCMGA1UEAxMcQmVsU2ln
+biBPYmplY3QgUHVibGlzaGluZyBDQTEjMCEGCSqGSIb3DQEJARYUd2VibWFzdGVy
+QGJlbHNpZ24uYmUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMQuH7a/7oJA
+3fm3LkHVngWxWtAmfGJVA5v8y2HeS+/+6Jn+h7mIz5DaDwk8dt8Xl7bLPyVF/bS8
+WAC+sFq2FIeP7mdkrR2Ig7tnn2VhAFgIgFCfgMkx9iqQHC33SmwQ9iNDXTgJYIhX
+As0WbBj8zfuSKnfQnpOjXYhk0Mj4XVRRAgMBAAGjFTATMBEGCWCGSAGG+EIBAQQE
+AwIABzANBgkqhkiG9w0BAQQFAAOBgQBjdhd8lvBTpV0BHFPOKcJ+daxMDaIIc7Rq
+Mf0CBhSZ3FQEpL/IloafMUMyJVf2hfYluze+oXkjyVcGJXFrRU/49AJAFoIir1Tq
+Mij2De6ZuksIUQ9uhiMhTC0liIHELg7xEyw4ipUCJMM6lWPkk45IuwhHcl+u5jpa
+R9Zxxp6aUg==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, L=Brussels, O=BelSign NV, OU=BelSign Object Publishing Certificate Authority, CN=BelSign Object Publishing CA/Email=webmaster@belsign.be
+        Validity
+            Not Before: Sep 19 22:03:00 1997 GMT
+            Not After : Sep 19 22:03:00 2007 GMT
+        Subject: C=BE, L=Brussels, O=BelSign NV, OU=BelSign Object Publishing Certificate Authority, CN=BelSign Object Publishing CA/Email=webmaster@belsign.be
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:c4:2e:1f:b6:bf:ee:82:40:dd:f9:b7:2e:41:d5:
+                    9e:05:b1:5a:d0:26:7c:62:55:03:9b:fc:cb:61:de:
+                    4b:ef:fe:e8:99:fe:87:b9:88:cf:90:da:0f:09:3c:
+                    76:df:17:97:b6:cb:3f:25:45:fd:b4:bc:58:00:be:
+                    b0:5a:b6:14:87:8f:ee:67:64:ad:1d:88:83:bb:67:
+                    9f:65:61:00:58:08:80:50:9f:80:c9:31:f6:2a:90:
+                    1c:2d:f7:4a:6c:10:f6:23:43:5d:38:09:60:88:57:
+                    02:cd:16:6c:18:fc:cd:fb:92:2a:77:d0:9e:93:a3:
+                    5d:88:64:d0:c8:f8:5d:54:51
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+    Signature Algorithm: md5WithRSAEncryption
+        63:76:17:7c:96:f0:53:a5:5d:01:1c:53:ce:29:c2:7e:75:ac:
+        4c:0d:a2:08:73:b4:6a:31:fd:02:06:14:99:dc:54:04:a4:bf:
+        c8:96:86:9f:31:43:32:25:57:f6:85:f6:25:bb:37:be:a1:79:
+        23:c9:57:06:25:71:6b:45:4f:f8:f4:02:40:16:82:22:af:54:
+        ea:32:28:f6:0d:ee:99:ba:4b:08:51:0f:6e:86:23:21:4c:2d:
+        25:88:81:c4:2e:0e:f1:13:2c:38:8a:95:02:24:c3:3a:95:63:
+        e4:93:8e:48:bb:08:47:72:5f:ae:e6:3a:5a:47:d6:71:c6:9e:
+        9a:52
+
+BelSign Secure Server CA
+========================
+MD5 Fingerprint: 3D:5E:82:C6:D9:AD:D9:8B:93:6B:0C:10:B9:49:0A:B1
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIC8zCCAlygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBszELMAkGA1UEBhMCQkUx
+ETAPBgNVBAcTCEJydXNzZWxzMRMwEQYDVQQKEwpCZWxTaWduIE5WMTQwMgYDVQQL
+EytCZWxTaWduIFNlY3VyZSBTZXJ2ZXIgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MSEw
+HwYDVQQDExhCZWxTaWduIFNlY3VyZSBTZXJ2ZXIgQ0ExIzAhBgkqhkiG9w0BCQEW
+FHdlYm1hc3RlckBiZWxzaWduLmJlMB4XDTk3MDcxNjIyMDA1NFoXDTA3MDcxNjIy
+MDA1NFowgbMxCzAJBgNVBAYTAkJFMREwDwYDVQQHEwhCcnVzc2VsczETMBEGA1UE
+ChMKQmVsU2lnbiBOVjE0MDIGA1UECxMrQmVsU2lnbiBTZWN1cmUgU2VydmVyIENl
+cnRpZmljYXRlIEF1dGhvcml0eTEhMB8GA1UEAxMYQmVsU2lnbiBTZWN1cmUgU2Vy
+dmVyIENBMSMwIQYJKoZIhvcNAQkBFhR3ZWJtYXN0ZXJAYmVsc2lnbi5iZTCBnzAN
+BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1gESeJL4BEJ/yccig/x8R3AwK0kLPjZA
+kCjaIXODU/LE0RZAwFP/rqbGJLMnbaWzPTl3XagG9ubpvGMRTgZlcAqdk/miQIt/
+SoQOjRax1swIZBIM4ChLyKWEkBf7EUYu1qeFGMsYrmOasFgG9ADP+MQJGjUMofnu
+Sv1t3v4mpTsCAwEAAaMVMBMwEQYJYIZIAYb4QgEBBAQDAgCgMA0GCSqGSIb3DQEB
+BAUAA4GBAGw9mcMF4h3K5S2qaIWLQDEgZhNo5lg6idCNdbLFYth9go/32TKBd/Y1
+W4UpzmeyubwrGXjP84f9RvGVdbIJVwMwwXrNckdxgMp9ncllPEcRIn36BwsoeKGT
+6AVFSOIyMko96FMcELfHc4wHUOH5yStTQfWDjeUJOUqOA2KqQGOL
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, L=Brussels, O=BelSign NV, OU=BelSign Secure Server Certificate Authority, CN=BelSign Secure Server CA/Email=webmaster@belsign.be
+        Validity
+            Not Before: Jul 16 22:00:54 1997 GMT
+            Not After : Jul 16 22:00:54 2007 GMT
+        Subject: C=BE, L=Brussels, O=BelSign NV, OU=BelSign Secure Server Certificate Authority, CN=BelSign Secure Server CA/Email=webmaster@belsign.be
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d6:01:12:78:92:f8:04:42:7f:c9:c7:22:83:fc:
+                    7c:47:70:30:2b:49:0b:3e:36:40:90:28:da:21:73:
+                    83:53:f2:c4:d1:16:40:c0:53:ff:ae:a6:c6:24:b3:
+                    27:6d:a5:b3:3d:39:77:5d:a8:06:f6:e6:e9:bc:63:
+                    11:4e:06:65:70:0a:9d:93:f9:a2:40:8b:7f:4a:84:
+                    0e:8d:16:b1:d6:cc:08:64:12:0c:e0:28:4b:c8:a5:
+                    84:90:17:fb:11:46:2e:d6:a7:85:18:cb:18:ae:63:
+                    9a:b0:58:06:f4:00:cf:f8:c4:09:1a:35:0c:a1:f9:
+                    ee:4a:fd:6d:de:fe:26:a5:3b
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL Client, S/MIME
+    Signature Algorithm: md5WithRSAEncryption
+        6c:3d:99:c3:05:e2:1d:ca:e5:2d:aa:68:85:8b:40:31:20:66:
+        13:68:e6:58:3a:89:d0:8d:75:b2:c5:62:d8:7d:82:8f:f7:d9:
+        32:81:77:f6:35:5b:85:29:ce:67:b2:b9:bc:2b:19:78:cf:f3:
+        87:fd:46:f1:95:75:b2:09:57:03:30:c1:7a:cd:72:47:71:80:
+        ca:7d:9d:c9:65:3c:47:11:22:7d:fa:07:0b:28:78:a1:93:e8:
+        05:45:48:e2:32:32:4a:3d:e8:53:1c:10:b7:c7:73:8c:07:50:
+        e1:f9:c9:2b:53:41:f5:83:8d:e5:09:39:4a:8e:03:62:aa:40:
+        63:8b
+
+Deutsche Telekom AG Root CA
+===========================
+MD5 Fingerprint: 77:DE:04:94:77:D0:0C:5F:A7:B1:F4:30:18:87:FB:55
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICjjCCAfegAwIBAgIBBjANBgkqhkiG9w0BAQQFADBtMQswCQYDVQQGEwJERTEc
+MBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEdMBsGA1UECxMUVGVsZVNlYyBU
+cnVzdCBDZW50ZXIxITAfBgNVBAMTGERldXRzY2hlIFRlbGVrb20gUm9vdCBDQTAe
+Fw05ODEyMDkwOTExMDBaFw0wNDEyMDkyMzU5MDBaMG0xCzAJBgNVBAYTAkRFMRww
+GgYDVQQKExNEZXV0c2NoZSBUZWxla29tIEFHMR0wGwYDVQQLExRUZWxlU2VjIFRy
+dXN0IENlbnRlcjEhMB8GA1UEAxMYRGV1dHNjaGUgVGVsZWtvbSBSb290IENBMIGf
+MA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDdBSz5BbO5EtdpcffqVjAIVxRDe7sa
+nG0vV2HX4vVEa+42QZb2ZM7hwbK5pBQEmFDocPiONZp9ScFhHVmu2gYYlX2tzuyp
+vtEYD0CRdiqj5f3+iRX0V/fgVdp1rQD0LME1zLRDJlViRC4BJZyKW/DB0AA1eP41
+3pRAZHiDocw5iQIDAQABoz4wPDAPBgNVHRMECDAGAQH/AgEFMA4GA1UdDwEB/wQE
+AwIBBjAZBgNVHQ4EEgQQLIdZH4sTgLL5hp0+En5YljANBgkqhkiG9w0BAQQFAAOB
+gQAP/nO1B4hvoAuJ6spQH5TelCsLJ15P9RyVJtqMllStGZE3Q12ryYuzzW+YOT3t
+3TXjcbftE5OD6IblKTMTE7w1e/0oL3BZ1dO0jSgTWTvI1XT5RcIHYKq4GFT5pWj/
+1wXVj7YFMS5BSvQQH2BHGguLGU2SVyDS71AZ6M3QcLy8Ng==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 6 (0x6)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=DE, O=Deutsche Telekom AG, OU=TeleSec Trust Center, CN=Deutsche Telekom Root CA
+        Validity
+            Not Before: Dec  9 09:11:00 1998 GMT
+            Not After : Dec  9 23:59:00 2004 GMT
+        Subject: C=DE, O=Deutsche Telekom AG, OU=TeleSec Trust Center, CN=Deutsche Telekom Root CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:dd:05:2c:f9:05:b3:b9:12:d7:69:71:f7:ea:56:
+                    30:08:57:14:43:7b:bb:1a:9c:6d:2f:57:61:d7:e2:
+                    f5:44:6b:ee:36:41:96:f6:64:ce:e1:c1:b2:b9:a4:
+                    14:04:98:50:e8:70:f8:8e:35:9a:7d:49:c1:61:1d:
+                    59:ae:da:06:18:95:7d:ad:ce:ec:a9:be:d1:18:0f:
+                    40:91:76:2a:a3:e5:fd:fe:89:15:f4:57:f7:e0:55:
+                    da:75:ad:00:f4:2c:c1:35:cc:b4:43:26:55:62:44:
+                    2e:01:25:9c:8a:5b:f0:c1:d0:00:35:78:fe:35:de:
+                    94:40:64:78:83:a1:cc:39:89
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: 
+                CA:TRUE, pathlen:5
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Subject Key Identifier: 
+                2C:87:59:1F:8B:13:80:B2:F9:86:9D:3E:12:7E:58:96
+    Signature Algorithm: md5WithRSAEncryption
+        0f:fe:73:b5:07:88:6f:a0:0b:89:ea:ca:50:1f:94:de:94:2b:
+        0b:27:5e:4f:f5:1c:95:26:da:8c:96:54:ad:19:91:37:43:5d:
+        ab:c9:8b:b3:cd:6f:98:39:3d:ed:dd:35:e3:71:b7:ed:13:93:
+        83:e8:86:e5:29:33:13:13:bc:35:7b:fd:28:2f:70:59:d5:d3:
+        b4:8d:28:13:59:3b:c8:d5:74:f9:45:c2:07:60:aa:b8:18:54:
+        f9:a5:68:ff:d7:05:d5:8f:b6:05:31:2e:41:4a:f4:10:1f:60:
+        47:1a:0b:8b:19:4d:92:57:20:d2:ef:50:19:e8:cd:d0:70:bc:
+        bc:36
+
+Digital Signature Trust Co. Global CA 1
+=======================================
+MD5 Fingerprint: 25:7A:BA:83:2E:B6:A2:0B:DA:FE:F5:02:0F:08:D7:AD
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDKTCCApKgAwIBAgIENnAVljANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJV
+UzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQL
+EwhEU1RDQSBFMTAeFw05ODEyMTAxODEwMjNaFw0xODEyMTAxODQwMjNaMEYxCzAJ
+BgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4x
+ETAPBgNVBAsTCERTVENBIEUxMIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQCg
+bIGpzzQeJN3+hijM3oMv+V7UQtLodGBmE5gGHKlREmlvMVW5SXIACH7TpWJENySZ
+j9mDSI+ZbZUTu0M7LklOiDfBu1h//uG9+LthzfNHwJmm8fOR6Hh8AMthyUQncWlV
+Sn5JTe2io74CTADKAqjuAQIxZA9SLRN0dja1erQtcQIBA6OCASQwggEgMBEGCWCG
+SAGG+EIBAQQEAwIABzBoBgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMx
+JDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UECxMI
+RFNUQ0EgRTExDTALBgNVBAMTBENSTDEwKwYDVR0QBCQwIoAPMTk5ODEyMTAxODEw
+MjNagQ8yMDE4MTIxMDE4MTAyM1owCwYDVR0PBAQDAgEGMB8GA1UdIwQYMBaAFGp5
+fpFpRhgTCgJ3pVlbYJglDqL4MB0GA1UdDgQWBBRqeX6RaUYYEwoCd6VZW2CYJQ6i
++DAMBgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqG
+SIb3DQEBBQUAA4GBACIS2Hod3IEGtgllsofIH160L+nEHvI8wbsEkBFKg05+k7lN
+QseSJqBcNJo4cvj9axY+IO6CizEqkzaFI4iKPANo08kJD038bKTaKHKTDomAsH3+
+gG9lbRgzl4vCa4nuYD3Im+9/KzJic5PLPON74nZ4RbyhkwS7hp86W0N6w4pl
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 913315222 (0x36701596)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Digital Signature Trust Co., OU=DSTCA E1
+        Validity
+            Not Before: Dec 10 18:10:23 1998 GMT
+            Not After : Dec 10 18:40:23 2018 GMT
+        Subject: C=US, O=Digital Signature Trust Co., OU=DSTCA E1
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:a0:6c:81:a9:cf:34:1e:24:dd:fe:86:28:cc:de:
+                    83:2f:f9:5e:d4:42:d2:e8:74:60:66:13:98:06:1c:
+                    a9:51:12:69:6f:31:55:b9:49:72:00:08:7e:d3:a5:
+                    62:44:37:24:99:8f:d9:83:48:8f:99:6d:95:13:bb:
+                    43:3b:2e:49:4e:88:37:c1:bb:58:7f:fe:e1:bd:f8:
+                    bb:61:cd:f3:47:c0:99:a6:f1:f3:91:e8:78:7c:00:
+                    cb:61:c9:44:27:71:69:55:4a:7e:49:4d:ed:a2:a3:
+                    be:02:4c:00:ca:02:a8:ee:01:02:31:64:0f:52:2d:
+                    13:74:76:36:b5:7a:b4:2d:71
+                Exponent: 3 (0x3)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Digital Signature Trust Co./OU=DSTCA E1/CN=CRL1
+
+            X509v3 Private Key Usage Period: 
+                Not Before: Dec 10 18:10:23 1998 GMT, Not After: Dec 10 18:10:23 2018 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:6A:79:7E:91:69:46:18:13:0A:02:77:A5:59:5B:60:98:25:0E:A2:F8
+
+            X509v3 Subject Key Identifier: 
+                6A:79:7E:91:69:46:18:13:0A:02:77:A5:59:5B:60:98:25:0E:A2:F8
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0
+..V4.0....
+    Signature Algorithm: sha1WithRSAEncryption
+        22:12:d8:7a:1d:dc:81:06:b6:09:65:b2:87:c8:1f:5e:b4:2f:
+        e9:c4:1e:f2:3c:c1:bb:04:90:11:4a:83:4e:7e:93:b9:4d:42:
+        c7:92:26:a0:5c:34:9a:38:72:f8:fd:6b:16:3e:20:ee:82:8b:
+        31:2a:93:36:85:23:88:8a:3c:03:68:d3:c9:09:0f:4d:fc:6c:
+        a4:da:28:72:93:0e:89:80:b0:7d:fe:80:6f:65:6d:18:33:97:
+        8b:c2:6b:89:ee:60:3d:c8:9b:ef:7f:2b:32:62:73:93:cb:3c:
+        e3:7b:e2:76:78:45:bc:a1:93:04:bb:86:9f:3a:5b:43:7a:c3:
+        8a:65
+
+Digital Signature Trust Co. Global CA 2
+=======================================
+MD5 Fingerprint: 6C:C9:A7:6E:47:F1:0C:E3:53:3B:78:4C:4D:C2:6A:C5
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIID2DCCAsACEQDQHkCLAAACfAAAAAIAAAABMA0GCSqGSIb3DQEBBQUAMIGpMQsw
+CQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENp
+dHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UE
+CxMIRFNUQ0EgWDExFjAUBgNVBAMTDURTVCBSb290Q0EgWDExITAfBgkqhkiG9w0B
+CQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTAeFw05ODEyMDExODE4NTVaFw0wODExMjgx
+ODE4NTVaMIGpMQswCQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMO
+U2FsdCBMYWtlIENpdHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0
+IENvLjERMA8GA1UECxMIRFNUQ0EgWDExFjAUBgNVBAMTDURTVCBSb290Q0EgWDEx
+ITAfBgkqhkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTCCASIwDQYJKoZIhvcN
+AQEBBQADggEPADCCAQoCggEBANLGJrbnpT3BxGjVUG9TxW9JEwm4ryxIjRRqoxdf
+WvnTLnUv2Chi0ZMv/E3Uq4flCMeZ55I/db3rJbQVwZsZPdJEjdd0IG03Ao9pk1uK
+xBmd9LIO/BZsubEFkoPRhSxglD5FVaDZqwgh5mDoO3TymVBRaNADLbGAvqPYUrBE
+zUNKcI5YhZXhTizWLUFv1oTnyJhEykfbLCSlaSbPa7gnYsP0yXqSI+0TZ4KuRS5F
+5X5yP4WdlGIQ5jyRoa13AOAV7POEgHJ6jm5gl8ckWRA0g1vhpaRptlc1HHhZxtMv
+OnNn7pTKBBMFYgZwI7P0fO5F2WQLW0mqpEPOJsREEmy43XkCAwEAATANBgkqhkiG
+9w0BAQUFAAOCAQEAojeyP2n714Z5VEkxlTMr89EJFEliYIalsBHiUMIdBlc+Legz
+ZL6bqq1fG03UmZWii5rJYnK1aerZWKs17RWiQ9a2vAd5ZWRzfdd5ynvVWlHG4VME
+lo04z6MXrDlxawHDi1M8Y+nuecDkvpIyZHqzH5eUYr3qsiAVlfuX8ngvYzZAOONG
+Dx3drJXK50uQe7FLqdTF65raqtWjlBRGjS0f8zrWkzr2Pnn86Oawde3uPclwx12q
+gUtGJRzHbBXjlU4PqjI3lAoXJJIThFjSY28r9+ZbYgsTF7ANUkz+/m9c4pFuHf2k
+Ytdo+o56T9II2pPc8JIRetDccpMMc5NihWjQ9A==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            d0:1e:40:8b:00:00:02:7c:00:00:00:02:00:00:00:01
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=DSTCA X1, CN=DST RootCA X1/Email=ca@digsigtrust.com
+        Validity
+            Not Before: Dec  1 18:18:55 1998 GMT
+            Not After : Nov 28 18:18:55 2008 GMT
+        Subject: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=DSTCA X1, CN=DST RootCA X1/Email=ca@digsigtrust.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:d2:c6:26:b6:e7:a5:3d:c1:c4:68:d5:50:6f:53:
+                    c5:6f:49:13:09:b8:af:2c:48:8d:14:6a:a3:17:5f:
+                    5a:f9:d3:2e:75:2f:d8:28:62:d1:93:2f:fc:4d:d4:
+                    ab:87:e5:08:c7:99:e7:92:3f:75:bd:eb:25:b4:15:
+                    c1:9b:19:3d:d2:44:8d:d7:74:20:6d:37:02:8f:69:
+                    93:5b:8a:c4:19:9d:f4:b2:0e:fc:16:6c:b9:b1:05:
+                    92:83:d1:85:2c:60:94:3e:45:55:a0:d9:ab:08:21:
+                    e6:60:e8:3b:74:f2:99:50:51:68:d0:03:2d:b1:80:
+                    be:a3:d8:52:b0:44:cd:43:4a:70:8e:58:85:95:e1:
+                    4e:2c:d6:2d:41:6f:d6:84:e7:c8:98:44:ca:47:db:
+                    2c:24:a5:69:26:cf:6b:b8:27:62:c3:f4:c9:7a:92:
+                    23:ed:13:67:82:ae:45:2e:45:e5:7e:72:3f:85:9d:
+                    94:62:10:e6:3c:91:a1:ad:77:00:e0:15:ec:f3:84:
+                    80:72:7a:8e:6e:60:97:c7:24:59:10:34:83:5b:e1:
+                    a5:a4:69:b6:57:35:1c:78:59:c6:d3:2f:3a:73:67:
+                    ee:94:ca:04:13:05:62:06:70:23:b3:f4:7c:ee:45:
+                    d9:64:0b:5b:49:aa:a4:43:ce:26:c4:44:12:6c:b8:
+                    dd:79
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        a2:37:b2:3f:69:fb:d7:86:79:54:49:31:95:33:2b:f3:d1:09:
+        14:49:62:60:86:a5:b0:11:e2:50:c2:1d:06:57:3e:2d:e8:33:
+        64:be:9b:aa:ad:5f:1b:4d:d4:99:95:a2:8b:9a:c9:62:72:b5:
+        69:ea:d9:58:ab:35:ed:15:a2:43:d6:b6:bc:07:79:65:64:73:
+        7d:d7:79:ca:7b:d5:5a:51:c6:e1:53:04:96:8d:38:cf:a3:17:
+        ac:39:71:6b:01:c3:8b:53:3c:63:e9:ee:79:c0:e4:be:92:32:
+        64:7a:b3:1f:97:94:62:bd:ea:b2:20:15:95:fb:97:f2:78:2f:
+        63:36:40:38:e3:46:0f:1d:dd:ac:95:ca:e7:4b:90:7b:b1:4b:
+        a9:d4:c5:eb:9a:da:aa:d5:a3:94:14:46:8d:2d:1f:f3:3a:d6:
+        93:3a:f6:3e:79:fc:e8:e6:b0:75:ed:ee:3d:c9:70:c7:5d:aa:
+        81:4b:46:25:1c:c7:6c:15:e3:95:4e:0f:aa:32:37:94:0a:17:
+        24:92:13:84:58:d2:63:6f:2b:f7:e6:5b:62:0b:13:17:b0:0d:
+        52:4c:fe:fe:6f:5c:e2:91:6e:1d:fd:a4:62:d7:68:fa:8e:7a:
+        4f:d2:08:da:93:dc:f0:92:11:7a:d0:dc:72:93:0c:73:93:62:
+        85:68:d0:f4
+
+Digital Signature Trust Co. Global CA 3
+=======================================
+MD5 Fingerprint: 93:C2:8E:11:7B:D4:F3:03:19:BD:28:75:13:4A:45:4A
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDKTCCApKgAwIBAgIENm7TzjANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJV
+UzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQL
+EwhEU1RDQSBFMjAeFw05ODEyMDkxOTE3MjZaFw0xODEyMDkxOTQ3MjZaMEYxCzAJ
+BgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4x
+ETAPBgNVBAsTCERTVENBIEUyMIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQC/
+k48Xku8zExjrEH9OFr//Bo8qhbxe+SSmJIi2A7fBw18DW9Fvrn5C6mYjuGODVvso
+LeE4i7TuqAHhzhy2iCoiRoX7n6dwqUcUP87eZfCocfdPJmyMvMa1795JJ/9IKn3o
+TQPMx7JSxhcxEzu1TdvIxPbDDyQq2gyd55FbgM2UnQIBA6OCASQwggEgMBEGCWCG
+SAGG+EIBAQQEAwIABzBoBgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMx
+JDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UECxMI
+RFNUQ0EgRTIxDTALBgNVBAMTBENSTDEwKwYDVR0QBCQwIoAPMTk5ODEyMDkxOTE3
+MjZagQ8yMDE4MTIwOTE5MTcyNlowCwYDVR0PBAQDAgEGMB8GA1UdIwQYMBaAFB6C
+TShlgDzJQW6sNS5ay97u+DlbMB0GA1UdDgQWBBQegk0oZYA8yUFurDUuWsve7vg5
+WzAMBgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqG
+SIb3DQEBBQUAA4GBAEeNg61i8tuwnkUiBbmi1gMOOHLnnvx75pO2mqWilMg0HZHR
+xdf0CiUPPXiBng+xZ8SQTGPdXqfiup/1902lMXucKS1M/mQ+7LZT/uqb7YLbdHVL
+B3luHtgZg3Pe9T7Qtd7nS2h9Qy4qIOF+oHhEngj1mPnHfxsb1gYgAlihw6ID
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 913232846 (0x366ed3ce)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Digital Signature Trust Co., OU=DSTCA E2
+        Validity
+            Not Before: Dec  9 19:17:26 1998 GMT
+            Not After : Dec  9 19:47:26 2018 GMT
+        Subject: C=US, O=Digital Signature Trust Co., OU=DSTCA E2
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:bf:93:8f:17:92:ef:33:13:18:eb:10:7f:4e:16:
+                    bf:ff:06:8f:2a:85:bc:5e:f9:24:a6:24:88:b6:03:
+                    b7:c1:c3:5f:03:5b:d1:6f:ae:7e:42:ea:66:23:b8:
+                    63:83:56:fb:28:2d:e1:38:8b:b4:ee:a8:01:e1:ce:
+                    1c:b6:88:2a:22:46:85:fb:9f:a7:70:a9:47:14:3f:
+                    ce:de:65:f0:a8:71:f7:4f:26:6c:8c:bc:c6:b5:ef:
+                    de:49:27:ff:48:2a:7d:e8:4d:03:cc:c7:b2:52:c6:
+                    17:31:13:3b:b5:4d:db:c8:c4:f6:c3:0f:24:2a:da:
+                    0c:9d:e7:91:5b:80:cd:94:9d
+                Exponent: 3 (0x3)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Digital Signature Trust Co./OU=DSTCA E2/CN=CRL1
+
+            X509v3 Private Key Usage Period: 
+                Not Before: Dec  9 19:17:26 1998 GMT, Not After: Dec  9 19:17:26 2018 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:1E:82:4D:28:65:80:3C:C9:41:6E:AC:35:2E:5A:CB:DE:EE:F8:39:5B
+
+            X509v3 Subject Key Identifier: 
+                1E:82:4D:28:65:80:3C:C9:41:6E:AC:35:2E:5A:CB:DE:EE:F8:39:5B
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0
+..V4.0....
+    Signature Algorithm: sha1WithRSAEncryption
+        47:8d:83:ad:62:f2:db:b0:9e:45:22:05:b9:a2:d6:03:0e:38:
+        72:e7:9e:fc:7b:e6:93:b6:9a:a5:a2:94:c8:34:1d:91:d1:c5:
+        d7:f4:0a:25:0f:3d:78:81:9e:0f:b1:67:c4:90:4c:63:dd:5e:
+        a7:e2:ba:9f:f5:f7:4d:a5:31:7b:9c:29:2d:4c:fe:64:3e:ec:
+        b6:53:fe:ea:9b:ed:82:db:74:75:4b:07:79:6e:1e:d8:19:83:
+        73:de:f5:3e:d0:b5:de:e7:4b:68:7d:43:2e:2a:20:e1:7e:a0:
+        78:44:9e:08:f5:98:f9:c7:7f:1b:1b:d6:06:20:02:58:a1:c3:
+        a2:03
+
+Digital Signature Trust Co. Global CA 4
+=======================================
+MD5 Fingerprint: CD:3B:3D:62:5B:09:B8:09:36:87:9E:12:2F:71:64:BA
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIID2DCCAsACEQDQHkCLAAB3bQAAAAEAAAAEMA0GCSqGSIb3DQEBBQUAMIGpMQsw
+CQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENp
+dHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UE
+CxMIRFNUQ0EgWDIxFjAUBgNVBAMTDURTVCBSb290Q0EgWDIxITAfBgkqhkiG9w0B
+CQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTAeFw05ODExMzAyMjQ2MTZaFw0wODExMjcy
+MjQ2MTZaMIGpMQswCQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMO
+U2FsdCBMYWtlIENpdHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0
+IENvLjERMA8GA1UECxMIRFNUQ0EgWDIxFjAUBgNVBAMTDURTVCBSb290Q0EgWDIx
+ITAfBgkqhkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTCCASIwDQYJKoZIhvcN
+AQEBBQADggEPADCCAQoCggEBANx18IzAdZaawGIfJvfE4Zrq4FZzW5nNAUSoCLbV
+p9oaBBg5kkp4o4HC9Xd6ULRw/5qrxsfKboNPQpj7Jgva3G3WqZlVUmfpKAOS3OWw
+BZoPFflrWXJW8vo5/Kpo7g8fEIMv/J36F5bdguPmRX3AS4BEH+0s4IT9kVySVGkl
+5WJp3OXuAFK9MwutdQKFp2RQLcUZGTDAJtvJ0/0uma1ZtQtN1EGuhUhDWdy3qOKi
+3sOP17ihYqZoUFLkzzGnlIXan0YyF1bl8utmPRL/Q9uY73fPy4GNNLHGUEom0eQ+
+QVCvbK4iNC7Va26Dunm4dmVI2gkpZGMiuftHdoWMhkTLCdsCAwEAATANBgkqhkiG
+9w0BAQUFAAOCAQEAtTYOXeFhKFoRZcA/gwN5Tb4opgsHAlKFzfiR0BBstWogWxyQ
+2TA8xkieil5k+aFxd+8EJx8H6+Qm93N0yUQYGmbT4EOvkTvRyyzYdFQ6HE3K1GjN
+I3wdEJ5F6fYAbqbNGf9PLCmPV03Ed5K+4EwJ+11EhmYhqLkyolbV6YyDfFk/xPEL
+553snr2cGA4+wjl5KLcDDQjLxufZATdQEOzMYRZA1K8xdHv8PzGn0EdzMzkbzE5q
+10mDEQb+64JYMzJM8FasHpwvVpp7wUocpf1VNs78lk30sPDst2yC7S8xmUJMqbIN
+uBVd8d+6ybVK1GSYsyapMMj9puyrliGtf8J4tg==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            d0:1e:40:8b:00:00:77:6d:00:00:00:01:00:00:00:04
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=DSTCA X2, CN=DST RootCA X2/Email=ca@digsigtrust.com
+        Validity
+            Not Before: Nov 30 22:46:16 1998 GMT
+            Not After : Nov 27 22:46:16 2008 GMT
+        Subject: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=DSTCA X2, CN=DST RootCA X2/Email=ca@digsigtrust.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:dc:75:f0:8c:c0:75:96:9a:c0:62:1f:26:f7:c4:
+                    e1:9a:ea:e0:56:73:5b:99:cd:01:44:a8:08:b6:d5:
+                    a7:da:1a:04:18:39:92:4a:78:a3:81:c2:f5:77:7a:
+                    50:b4:70:ff:9a:ab:c6:c7:ca:6e:83:4f:42:98:fb:
+                    26:0b:da:dc:6d:d6:a9:99:55:52:67:e9:28:03:92:
+                    dc:e5:b0:05:9a:0f:15:f9:6b:59:72:56:f2:fa:39:
+                    fc:aa:68:ee:0f:1f:10:83:2f:fc:9d:fa:17:96:dd:
+                    82:e3:e6:45:7d:c0:4b:80:44:1f:ed:2c:e0:84:fd:
+                    91:5c:92:54:69:25:e5:62:69:dc:e5:ee:00:52:bd:
+                    33:0b:ad:75:02:85:a7:64:50:2d:c5:19:19:30:c0:
+                    26:db:c9:d3:fd:2e:99:ad:59:b5:0b:4d:d4:41:ae:
+                    85:48:43:59:dc:b7:a8:e2:a2:de:c3:8f:d7:b8:a1:
+                    62:a6:68:50:52:e4:cf:31:a7:94:85:da:9f:46:32:
+                    17:56:e5:f2:eb:66:3d:12:ff:43:db:98:ef:77:cf:
+                    cb:81:8d:34:b1:c6:50:4a:26:d1:e4:3e:41:50:af:
+                    6c:ae:22:34:2e:d5:6b:6e:83:ba:79:b8:76:65:48:
+                    da:09:29:64:63:22:b9:fb:47:76:85:8c:86:44:cb:
+                    09:db
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        b5:36:0e:5d:e1:61:28:5a:11:65:c0:3f:83:03:79:4d:be:28:
+        a6:0b:07:02:52:85:cd:f8:91:d0:10:6c:b5:6a:20:5b:1c:90:
+        d9:30:3c:c6:48:9e:8a:5e:64:f9:a1:71:77:ef:04:27:1f:07:
+        eb:e4:26:f7:73:74:c9:44:18:1a:66:d3:e0:43:af:91:3b:d1:
+        cb:2c:d8:74:54:3a:1c:4d:ca:d4:68:cd:23:7c:1d:10:9e:45:
+        e9:f6:00:6e:a6:cd:19:ff:4f:2c:29:8f:57:4d:c4:77:92:be:
+        e0:4c:09:fb:5d:44:86:66:21:a8:b9:32:a2:56:d5:e9:8c:83:
+        7c:59:3f:c4:f1:0b:e7:9d:ec:9e:bd:9c:18:0e:3e:c2:39:79:
+        28:b7:03:0d:08:cb:c6:e7:d9:01:37:50:10:ec:cc:61:16:40:
+        d4:af:31:74:7b:fc:3f:31:a7:d0:47:73:33:39:1b:cc:4e:6a:
+        d7:49:83:11:06:fe:eb:82:58:33:32:4c:f0:56:ac:1e:9c:2f:
+        56:9a:7b:c1:4a:1c:a5:fd:55:36:ce:fc:96:4d:f4:b0:f0:ec:
+        b7:6c:82:ed:2f:31:99:42:4c:a9:b2:0d:b8:15:5d:f1:df:ba:
+        c9:b5:4a:d4:64:98:b3:26:a9:30:c8:fd:a6:ec:ab:96:21:ad:
+        7f:c2:78:b6
+
+Entrust Worldwide by DST
+========================
+MD5 Fingerprint: B4:65:22:0A:7C:AD:DF:41:B7:D5:44:D5:AD:FA:9A:75
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDRzCCArCgAwIBAgIENm3FGDANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJV
+UzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRswGQYDVQQL
+ExJEU1QtRW50cnVzdCBHVEkgQ0EwHhcNOTgxMjA5MDAwMjI0WhcNMTgxMjA5MDAz
+MjI0WjBQMQswCQYDVQQGEwJVUzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUg
+VHJ1c3QgQ28uMRswGQYDVQQLExJEU1QtRW50cnVzdCBHVEkgQ0EwgZ0wDQYJKoZI
+hvcNAQEBBQADgYsAMIGHAoGBALYd90uNDxPjEvUJ/gYyDq9MQfV91Ec9KgrfgwXe
+3n3mAxb2UTrLRxpKrX7E/R20vnSKeN0Lg460hBPE+/htKa6h4Q8PQ+O1XmBp+oOU
+/Hnm3Hbt0UQrjv0Su/4XdxcMie2n71F9xO04wzujevviTaBgtfL9E2XTxuw/vjWc
+PSLvAgEDo4IBLjCCASowEQYJYIZIAYb4QgEBBAQDAgAHMHIGA1UdHwRrMGkwZ6Bl
+oGOkYTBfMQswCQYDVQQGEwJVUzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUg
+VHJ1c3QgQ28uMRswGQYDVQQLExJEU1QtRW50cnVzdCBHVEkgQ0ExDTALBgNVBAMT
+BENSTDEwKwYDVR0QBCQwIoAPMTk5ODEyMDkwMDAyMjRagQ8yMDE4MTIwOTAwMDIy
+NFowCwYDVR0PBAQDAgEGMB8GA1UdIwQYMBaAFJOaRMrQeFOAKUkE38evMz+ZdV+u
+MB0GA1UdDgQWBBSTmkTK0HhTgClJBN/HrzM/mXVfrjAMBgNVHRMEBTADAQH/MBkG
+CSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4GBAGSJzAOn
+3AryWCDn/RegKHLNh7DNmLUkR2MzMRAQsu+KV3KuTAPgZ5+sYEOEIsGpo+Wxp94J
+1M8NeEYjW49Je/4TIpeU6nJI4SwgeJbpZkUZywllY2E/0UmYsXYQVdVjSmZLpAdr
+3nt/ueaTWxoCW4AO3Y0Y1Iqjwmjxo+AY0U5M
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 913163544 (0x366dc518)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Digital Signature Trust Co., OU=DST-Entrust GTI CA
+        Validity
+            Not Before: Dec  9 00:02:24 1998 GMT
+            Not After : Dec  9 00:32:24 2018 GMT
+        Subject: C=US, O=Digital Signature Trust Co., OU=DST-Entrust GTI CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b6:1d:f7:4b:8d:0f:13:e3:12:f5:09:fe:06:32:
+                    0e:af:4c:41:f5:7d:d4:47:3d:2a:0a:df:83:05:de:
+                    de:7d:e6:03:16:f6:51:3a:cb:47:1a:4a:ad:7e:c4:
+                    fd:1d:b4:be:74:8a:78:dd:0b:83:8e:b4:84:13:c4:
+                    fb:f8:6d:29:ae:a1:e1:0f:0f:43:e3:b5:5e:60:69:
+                    fa:83:94:fc:79:e6:dc:76:ed:d1:44:2b:8e:fd:12:
+                    bb:fe:17:77:17:0c:89:ed:a7:ef:51:7d:c4:ed:38:
+                    c3:3b:a3:7a:fb:e2:4d:a0:60:b5:f2:fd:13:65:d3:
+                    c6:ec:3f:be:35:9c:3d:22:ef
+                Exponent: 3 (0x3)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Digital Signature Trust Co./OU=DST-Entrust GTI CA/CN=CRL1
+
+            X509v3 Private Key Usage Period: 
+                Not Before: Dec  9 00:02:24 1998 GMT, Not After: Dec  9 00:02:24 2018 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:93:9A:44:CA:D0:78:53:80:29:49:04:DF:C7:AF:33:3F:99:75:5F:AE
+
+            X509v3 Subject Key Identifier: 
+                93:9A:44:CA:D0:78:53:80:29:49:04:DF:C7:AF:33:3F:99:75:5F:AE
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0
+..V4.0....
+    Signature Algorithm: sha1WithRSAEncryption
+        64:89:cc:03:a7:dc:0a:f2:58:20:e7:fd:17:a0:28:72:cd:87:
+        b0:cd:98:b5:24:47:63:33:31:10:10:b2:ef:8a:57:72:ae:4c:
+        03:e0:67:9f:ac:60:43:84:22:c1:a9:a3:e5:b1:a7:de:09:d4:
+        cf:0d:78:46:23:5b:8f:49:7b:fe:13:22:97:94:ea:72:48:e1:
+        2c:20:78:96:e9:66:45:19:cb:09:65:63:61:3f:d1:49:98:b1:
+        76:10:55:d5:63:4a:66:4b:a4:07:6b:de:7b:7f:b9:e6:93:5b:
+        1a:02:5b:80:0e:dd:8d:18:d4:8a:a3:c2:68:f1:a3:e0:18:d1:
+        4e:4c
+
+Entrust.net Premium 2048 Secure Server CA
+=========================================
+MD5 Fingerprint: BA:21:EA:20:D6:DD:DB:8F:C1:57:8B:40:AD:A1:FC:FC
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEXDCCA0SgAwIBAgIEOGO5ZjANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChML
+RW50cnVzdC5uZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBp
+bmNvcnAuIGJ5IHJlZi4gKGxpbWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5
+IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNVBAMTKkVudHJ1c3QubmV0IENlcnRp
+ZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQxNzUwNTFaFw0xOTEy
+MjQxODIwNTFaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3d3d3
+LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxp
+YWIuKTElMCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEG
+A1UEAxMqRW50cnVzdC5uZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgp
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArU1LqRKGsuqjIAcVFmQq
+K0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOLGp18EzoOH1u3Hs/lJBQe
+sYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSrhRSGlVuX
+MlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVT
+XTzWnLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/
+HoZdenoVve8AjhUiVBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH
+4QIDAQABo3QwcjARBglghkgBhvhCAQEEBAMCAAcwHwYDVR0jBBgwFoAUVeSB0RGA
+vtiJuQijMfmhJAkWuXAwHQYDVR0OBBYEFFXkgdERgL7YibkIozH5oSQJFrlwMB0G
+CSqGSIb2fQdBAAQQMA4bCFY1LjA6NC4wAwIEkDANBgkqhkiG9w0BAQUFAAOCAQEA
+WUesIYSKF8mciVMeuoCFGsY8Tj6xnLZ8xpJdGGQC49MGCBFhfGPjK50xA3B20qMo
+oPS7mmNz7W3lKtvtFKkrxjYR0CvrB4ul2p5cGZ1WEvVUKcgF7bISKo30Axv/55IQ
+h7A6tcOdBTcSo8f0FbnVpDkWm1M6I5HxqIKiaohowXkCIryqptau37AUX7iH0N18
+f3v/rxzP5tsHrV7bhZ3QKw0z2wTR5klAEyt2+z7pnIkPFc4YsIV4IU9rTw76NmfN
+B/L/CNDi3tm/Kq+4h4YhPATKt5Rof8886ZjXOP/swNlQ8C5LWK5Gb9Auw2DaclVy
+vUxFnmG6v4SBkgPR0ml8xQ==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 946059622 (0x3863b966)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: O=Entrust.net, OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Certification Authority (2048)
+        Validity
+            Not Before: Dec 24 17:50:51 1999 GMT
+            Not After : Dec 24 18:20:51 2019 GMT
+        Subject: O=Entrust.net, OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Certification Authority (2048)
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:ad:4d:4b:a9:12:86:b2:ea:a3:20:07:15:16:64:
+                    2a:2b:4b:d1:bf:0b:4a:4d:8e:ed:80:76:a5:67:b7:
+                    78:40:c0:73:42:c8:68:c0:db:53:2b:dd:5e:b8:76:
+                    98:35:93:8b:1a:9d:7c:13:3a:0e:1f:5b:b7:1e:cf:
+                    e5:24:14:1e:b1:81:a9:8d:7d:b8:cc:6b:4b:03:f1:
+                    02:0c:dc:ab:a5:40:24:00:7f:74:94:a1:9d:08:29:
+                    b3:88:0b:f5:87:77:9d:55:cd:e4:c3:7e:d7:6a:64:
+                    ab:85:14:86:95:5b:97:32:50:6f:3d:c8:ba:66:0c:
+                    e3:fc:bd:b8:49:c1:76:89:49:19:fd:c0:a8:bd:89:
+                    a3:67:2f:c6:9f:bc:71:19:60:b8:2d:e9:2c:c9:90:
+                    76:66:7b:94:e2:af:78:d6:65:53:5d:3c:d6:9c:b2:
+                    cf:29:03:f9:2f:a4:50:b2:d4:48:ce:05:32:55:8a:
+                    fd:b2:64:4c:0e:e4:98:07:75:db:7f:df:b9:08:55:
+                    60:85:30:29:f9:7b:48:a4:69:86:e3:35:3f:1e:86:
+                    5d:7a:7a:15:bd:ef:00:8e:15:22:54:17:00:90:26:
+                    93:bc:0e:49:68:91:bf:f8:47:d3:9d:95:42:c1:0e:
+                    4d:df:6f:26:cf:c3:18:21:62:66:43:70:d6:d5:c0:
+                    07:e1
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 Authority Key Identifier: 
+                keyid:55:E4:81:D1:11:80:BE:D8:89:B9:08:A3:31:F9:A1:24:09:16:B9:70
+
+            X509v3 Subject Key Identifier: 
+                55:E4:81:D1:11:80:BE:D8:89:B9:08:A3:31:F9:A1:24:09:16:B9:70
+            1.2.840.113533.7.65.0: 
+                0...V5.0:4.0....
+    Signature Algorithm: sha1WithRSAEncryption
+        59:47:ac:21:84:8a:17:c9:9c:89:53:1e:ba:80:85:1a:c6:3c:
+        4e:3e:b1:9c:b6:7c:c6:92:5d:18:64:02:e3:d3:06:08:11:61:
+        7c:63:e3:2b:9d:31:03:70:76:d2:a3:28:a0:f4:bb:9a:63:73:
+        ed:6d:e5:2a:db:ed:14:a9:2b:c6:36:11:d0:2b:eb:07:8b:a5:
+        da:9e:5c:19:9d:56:12:f5:54:29:c8:05:ed:b2:12:2a:8d:f4:
+        03:1b:ff:e7:92:10:87:b0:3a:b5:c3:9d:05:37:12:a3:c7:f4:
+        15:b9:d5:a4:39:16:9b:53:3a:23:91:f1:a8:82:a2:6a:88:68:
+        c1:79:02:22:bc:aa:a6:d6:ae:df:b0:14:5f:b8:87:d0:dd:7c:
+        7f:7b:ff:af:1c:cf:e6:db:07:ad:5e:db:85:9d:d0:2b:0d:33:
+        db:04:d1:e6:49:40:13:2b:76:fb:3e:e9:9c:89:0f:15:ce:18:
+        b0:85:78:21:4f:6b:4f:0e:fa:36:67:cd:07:f2:ff:08:d0:e2:
+        de:d9:bf:2a:af:b8:87:86:21:3c:04:ca:b7:94:68:7f:cf:3c:
+        e9:98:d7:38:ff:ec:c0:d9:50:f0:2e:4b:58:ae:46:6f:d0:2e:
+        c3:60:da:72:55:72:bd:4c:45:9e:61:ba:bf:84:81:92:03:d1:
+        d2:69:7c:c5
+
+Entrust.net Secure Personal CA
+==============================
+MD5 Fingerprint: 0C:41:2F:13:5B:A0:54:F5:96:66:2D:7E:CD:0E:03:F4
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIE7TCCBFagAwIBAgIEOAOR7jANBgkqhkiG9w0BAQQFADCByTELMAkGA1UEBhMC
+VVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MUgwRgYDVQQLFD93d3cuZW50cnVzdC5u
+ZXQvQ2xpZW50X0NBX0luZm8vQ1BTIGluY29ycC4gYnkgcmVmLiBsaW1pdHMgbGlh
+Yi4xJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNV
+BAMTKkVudHJ1c3QubmV0IENsaWVudCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAe
+Fw05OTEwMTIxOTI0MzBaFw0xOTEwMTIxOTU0MzBaMIHJMQswCQYDVQQGEwJVUzEU
+MBIGA1UEChMLRW50cnVzdC5uZXQxSDBGBgNVBAsUP3d3dy5lbnRydXN0Lm5ldC9D
+bGllbnRfQ0FfSW5mby9DUFMgaW5jb3JwLiBieSByZWYuIGxpbWl0cyBsaWFiLjEl
+MCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMq
+RW50cnVzdC5uZXQgQ2xpZW50IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGdMA0G
+CSqGSIb3DQEBAQUAA4GLADCBhwKBgQDIOpleMRffrCdvkHvkGf9FozTC28GoT/Bo
+6oT9n3V5z8GKUZSvx1cDR2SerYIbWtp/N3hHuzeYEpbOxhN979IMMFGpOZ5V+Pux
+5zDeg7K6PvHViTs7hbqqdCz+PzFur5GVbgbUB01LLFZHGARS2g4Qk79jkJvh34zm
+AqTmT173iwIBA6OCAeAwggHcMBEGCWCGSAGG+EIBAQQEAwIABzCCASIGA1UdHwSC
+ARkwggEVMIHkoIHhoIHepIHbMIHYMQswCQYDVQQGEwJVUzEUMBIGA1UEChMLRW50
+cnVzdC5uZXQxSDBGBgNVBAsUP3d3dy5lbnRydXN0Lm5ldC9DbGllbnRfQ0FfSW5m
+by9DUFMgaW5jb3JwLiBieSByZWYuIGxpbWl0cyBsaWFiLjElMCMGA1UECxMcKGMp
+IDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMqRW50cnVzdC5uZXQg
+Q2xpZW50IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCyg
+KqAohiZodHRwOi8vd3d3LmVudHJ1c3QubmV0L0NSTC9DbGllbnQxLmNybDArBgNV
+HRAEJDAigA8xOTk5MTAxMjE5MjQzMFqBDzIwMTkxMDEyMTkyNDMwWjALBgNVHQ8E
+BAMCAQYwHwYDVR0jBBgwFoAUxPucKXuXzUyW/O5bs8qZdIuV6kwwHQYDVR0OBBYE
+FMT7nCl7l81MlvzuW7PKmXSLlepMMAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EA
+BAwwChsEVjQuMAMCBJAwDQYJKoZIhvcNAQEEBQADgYEAP66K8ddmAwWePvrqHEa7
+pFuPeJoSSJn59DXeDDYHAmsQOokUgZwxpnyyQbJq5wcBoUv5nyU7lsqZwz6hURzz
+wy5E97BnRqqS5TvaHBkUODDV4qIxJS7x7EU47fgGWANzYrAQMY9Av2TgXD7FTx/a
+EkP/TOYGJqibGapEPHayXOw=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 939758062 (0x380391ee)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=US, O=Entrust.net, OU=www.entrust.net/Client_CA_Info/CPS incorp. by ref. limits liab., OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Client Certification Authority
+        Validity
+            Not Before: Oct 12 19:24:30 1999 GMT
+            Not After : Oct 12 19:54:30 2019 GMT
+        Subject: C=US, O=Entrust.net, OU=www.entrust.net/Client_CA_Info/CPS incorp. by ref. limits liab., OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Client Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:c8:3a:99:5e:31:17:df:ac:27:6f:90:7b:e4:19:
+                    ff:45:a3:34:c2:db:c1:a8:4f:f0:68:ea:84:fd:9f:
+                    75:79:cf:c1:8a:51:94:af:c7:57:03:47:64:9e:ad:
+                    82:1b:5a:da:7f:37:78:47:bb:37:98:12:96:ce:c6:
+                    13:7d:ef:d2:0c:30:51:a9:39:9e:55:f8:fb:b1:e7:
+                    30:de:83:b2:ba:3e:f1:d5:89:3b:3b:85:ba:aa:74:
+                    2c:fe:3f:31:6e:af:91:95:6e:06:d4:07:4d:4b:2c:
+                    56:47:18:04:52:da:0e:10:93:bf:63:90:9b:e1:df:
+                    8c:e6:02:a4:e6:4f:5e:f7:8b
+                Exponent: 3 (0x3)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Entrust.net/OU=www.entrust.net/Client_CA_Info/CPS incorp. by ref. limits liab./OU=(c) 1999 Entrust.net Limited/CN=Entrust.net Client Certification Authority/CN=CRL1
+                URI:http://www.entrust.net/CRL/Client1.crl
+
+            X509v3 Private Key Usage Period: 
+                Not Before: Oct 12 19:24:30 1999 GMT, Not After: Oct 12 19:24:30 2019 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:C4:FB:9C:29:7B:97:CD:4C:96:FC:EE:5B:B3:CA:99:74:8B:95:EA:4C
+
+            X509v3 Subject Key Identifier: 
+                C4:FB:9C:29:7B:97:CD:4C:96:FC:EE:5B:B3:CA:99:74:8B:95:EA:4C
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0
+..V4.0....
+    Signature Algorithm: md5WithRSAEncryption
+        3f:ae:8a:f1:d7:66:03:05:9e:3e:fa:ea:1c:46:bb:a4:5b:8f:
+        78:9a:12:48:99:f9:f4:35:de:0c:36:07:02:6b:10:3a:89:14:
+        81:9c:31:a6:7c:b2:41:b2:6a:e7:07:01:a1:4b:f9:9f:25:3b:
+        96:ca:99:c3:3e:a1:51:1c:f3:c3:2e:44:f7:b0:67:46:aa:92:
+        e5:3b:da:1c:19:14:38:30:d5:e2:a2:31:25:2e:f1:ec:45:38:
+        ed:f8:06:58:03:73:62:b0:10:31:8f:40:bf:64:e0:5c:3e:c5:
+        4f:1f:da:12:43:ff:4c:e6:06:26:a8:9b:19:aa:44:3c:76:b2:
+        5c:ec
+
+Entrust.net Secure Server CA
+============================
+MD5 Fingerprint: DF:F2:80:73:CC:F1:E6:61:73:FC:F5:42:E9:C5:7C:EE
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMC
+VVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5u
+ZXQvQ1BTIGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMc
+KGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDE6MDgGA1UEAxMxRW50cnVzdC5u
+ZXQgU2VjdXJlIFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05OTA1
+MjUxNjA5NDBaFw0xOTA1MjUxNjM5NDBaMIHDMQswCQYDVQQGEwJVUzEUMBIGA1UE
+ChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5j
+b3JwLiBieSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBF
+bnRydXN0Lm5ldCBMaW1pdGVkMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUg
+U2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGdMA0GCSqGSIb3DQEBAQUA
+A4GLADCBhwKBgQDNKIM0VBuJ8w+vN5Ex/68xYMmo6LIQaO2f55M28Qpku0f1BBc/
+I0dNxScZgSYMVHINiC3ZH5oSn7yzcdOAGT9HZnuMNSjSuQrfJNqc1lB5gXpa0zf3
+wkrYKZImZNHkmGw6AIr1NJtl+O3jEP/9uElY3KDegjlrgbEWGWG5VLbmQwIBA6OC
+AdcwggHTMBEGCWCGSAGG+EIBAQQEAwIABzCCARkGA1UdHwSCARAwggEMMIHeoIHb
+oIHYpIHVMIHSMQswCQYDVQQGEwJVUzEUMBIGA1UEChMLRW50cnVzdC5uZXQxOzA5
+BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5jb3JwLiBieSByZWYuIChsaW1p
+dHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBFbnRydXN0Lm5ldCBMaW1pdGVk
+MTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENlcnRpZmljYXRp
+b24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCmgJ6AlhiNodHRwOi8vd3d3LmVu
+dHJ1c3QubmV0L0NSTC9uZXQxLmNybDArBgNVHRAEJDAigA8xOTk5MDUyNTE2MDk0
+MFqBDzIwMTkwNTI1MTYwOTQwWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAU8Bdi
+E1U9s/8KAGv7UISX8+1i0BowHQYDVR0OBBYEFPAXYhNVPbP/CgBr+1CEl/PtYtAa
+MAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EABAwwChsEVjQuMAMCBJAwDQYJKoZI
+hvcNAQEFBQADgYEAkNwwAvpkdMKnCqV8IY00F6j7Rw7/JXyNEwr75Ji174z4xRAN
+95K+8cPV1ZVqBLssziY2ZcgxxufuP+NXdYR6Ee9GTxj005i7qIcyunL2POI9n9cd
+2cNgQ4xYDiKWL2KjLB+6rQXvqzJ4h6BUcxm1XAX5Uj5tLUUL9wqT6u0G+bI=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 927650371 (0x374ad243)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Entrust.net, OU=www.entrust.net/CPS incorp. by ref. (limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Secure Server Certification Authority
+        Validity
+            Not Before: May 25 16:09:40 1999 GMT
+            Not After : May 25 16:39:40 2019 GMT
+        Subject: C=US, O=Entrust.net, OU=www.entrust.net/CPS incorp. by ref. (limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Secure Server Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:cd:28:83:34:54:1b:89:f3:0f:af:37:91:31:ff:
+                    af:31:60:c9:a8:e8:b2:10:68:ed:9f:e7:93:36:f1:
+                    0a:64:bb:47:f5:04:17:3f:23:47:4d:c5:27:19:81:
+                    26:0c:54:72:0d:88:2d:d9:1f:9a:12:9f:bc:b3:71:
+                    d3:80:19:3f:47:66:7b:8c:35:28:d2:b9:0a:df:24:
+                    da:9c:d6:50:79:81:7a:5a:d3:37:f7:c2:4a:d8:29:
+                    92:26:64:d1:e4:98:6c:3a:00:8a:f5:34:9b:65:f8:
+                    ed:e3:10:ff:fd:b8:49:58:dc:a0:de:82:39:6b:81:
+                    b1:16:19:61:b9:54:b6:e6:43
+                Exponent: 3 (0x3)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Entrust.net/OU=www.entrust.net/CPS incorp. by ref. (limits liab.)/OU=(c) 1999 Entrust.net Limited/CN=Entrust.net Secure Server Certification Authority/CN=CRL1
+                URI:http://www.entrust.net/CRL/net1.crl
+
+            X509v3 Private Key Usage Period: 
+                Not Before: May 25 16:09:40 1999 GMT, Not After: May 25 16:09:40 2019 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:F0:17:62:13:55:3D:B3:FF:0A:00:6B:FB:50:84:97:F3:ED:62:D0:1A
+
+            X509v3 Subject Key Identifier: 
+                F0:17:62:13:55:3D:B3:FF:0A:00:6B:FB:50:84:97:F3:ED:62:D0:1A
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0
+..V4.0....
+    Signature Algorithm: sha1WithRSAEncryption
+        90:dc:30:02:fa:64:74:c2:a7:0a:a5:7c:21:8d:34:17:a8:fb:
+        47:0e:ff:25:7c:8d:13:0a:fb:e4:98:b5:ef:8c:f8:c5:10:0d:
+        f7:92:be:f1:c3:d5:d5:95:6a:04:bb:2c:ce:26:36:65:c8:31:
+        c6:e7:ee:3f:e3:57:75:84:7a:11:ef:46:4f:18:f4:d3:98:bb:
+        a8:87:32:ba:72:f6:3c:e2:3d:9f:d7:1d:d9:c3:60:43:8c:58:
+        0e:22:96:2f:62:a3:2c:1f:ba:ad:05:ef:ab:32:78:87:a0:54:
+        73:19:b5:5c:05:f9:52:3e:6d:2d:45:0b:f7:0a:93:ea:ed:06:
+        f9:b2
+
+Equifax Premium CA
+==================
+MD5 Fingerprint: A9:E9:A8:9D:0E:73:E3:B1:2F:37:0D:E8:48:3F:86:ED
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDIzCCAoygAwIBAgIENeHvHjANBgkqhkiG9w0BAQUFADBPMQswCQYDVQQGEwJV
+UzEQMA4GA1UEChMHRXF1aWZheDEuMCwGA1UECxMlRXF1aWZheCBQcmVtaXVtIENl
+cnRpZmljYXRlIEF1dGhvcml0eTAeFw05ODA4MjQyMjU0MjNaFw0xODA4MjQyMjU0
+MjNaME8xCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFcXVpZmF4MS4wLAYDVQQLEyVF
+cXVpZmF4IFByZW1pdW0gQ2VydGlmaWNhdGUgQXV0aG9yaXR5MIGfMA0GCSqGSIb3
+DQEBAQUAA4GNADCBiQKBgQDOoQaOBswIC8GGqN4g1Q0O0Q3En+pq2bPCMkdAb4qI
+pAm9OCwd5svmpPM269rrvPxkswf2Lbyqzp8ZSGhK/PWiRX4JEPWPs0lcIwY56hOL
+uAvNkR12X9k3oUT7X5DyZ7PNGJlDH3YSawLylYM4Q8L2YjTKyXhdX9LYupr/vhBg
+WwIDAQABo4IBCjCCAQYwcQYDVR0fBGowaDBmoGSgYqRgMF4xCzAJBgNVBAYTAlVT
+MRAwDgYDVQQKEwdFcXVpZmF4MS4wLAYDVQQLEyVFcXVpZmF4IFByZW1pdW0gQ2Vy
+dGlmaWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIw
+MTgwODI0MjI1NDIzWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUFe6yKFmrbuX4
+z4uB9CThrj91G5gwHQYDVR0OBBYEFBXusihZq27l+M+LgfQk4a4/dRuYMAwGA1Ud
+EwQFMAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEB
+BQUAA4GBAL0LnCepA9so3JipS9DRjqeoGlqR4Jzx9xh8LiKeNh/JqLXNRkpu+jUH
+G4YI65/iqPmdQS06rlxctl80BOv8KmCw+3TkhellOJbuFcfGd2MSvYpoH6tsfdrK
+XBPO6snrCVzFc+cSAdXZUwee4A+W8Iu0u0VIn4bFGVWgy5bFA/xI
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 903999262 (0x35e1ef1e)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Equifax, OU=Equifax Premium Certificate Authority
+        Validity
+            Not Before: Aug 24 22:54:23 1998 GMT
+            Not After : Aug 24 22:54:23 2018 GMT
+        Subject: C=US, O=Equifax, OU=Equifax Premium Certificate Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:ce:a1:06:8e:06:cc:08:0b:c1:86:a8:de:20:d5:
+                    0d:0e:d1:0d:c4:9f:ea:6a:d9:b3:c2:32:47:40:6f:
+                    8a:88:a4:09:bd:38:2c:1d:e6:cb:e6:a4:f3:36:eb:
+                    da:eb:bc:fc:64:b3:07:f6:2d:bc:aa:ce:9f:19:48:
+                    68:4a:fc:f5:a2:45:7e:09:10:f5:8f:b3:49:5c:23:
+                    06:39:ea:13:8b:b8:0b:cd:91:1d:76:5f:d9:37:a1:
+                    44:fb:5f:90:f2:67:b3:cd:18:99:43:1f:76:12:6b:
+                    02:f2:95:83:38:43:c2:f6:62:34:ca:c9:78:5d:5f:
+                    d2:d8:ba:9a:ff:be:10:60:5b
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Equifax/OU=Equifax Premium Certificate Authority/CN=CRL1
+
+            X509v3 Private Key Usage Period: 
+                Not After: Aug 24 22:54:23 2018 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:15:EE:B2:28:59:AB:6E:E5:F8:CF:8B:81:F4:24:E1:AE:3F:75:1B:98
+
+            X509v3 Subject Key Identifier: 
+                15:EE:B2:28:59:AB:6E:E5:F8:CF:8B:81:F4:24:E1:AE:3F:75:1B:98
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0...V3.0c....
+    Signature Algorithm: sha1WithRSAEncryption
+        bd:0b:9c:27:a9:03:db:28:dc:98:a9:4b:d0:d1:8e:a7:a8:1a:
+        5a:91:e0:9c:f1:f7:18:7c:2e:22:9e:36:1f:c9:a8:b5:cd:46:
+        4a:6e:fa:35:07:1b:86:08:eb:9f:e2:a8:f9:9d:41:2d:3a:ae:
+        5c:5c:b6:5f:34:04:eb:fc:2a:60:b0:fb:74:e4:85:e9:65:38:
+        96:ee:15:c7:c6:77:63:12:bd:8a:68:1f:ab:6c:7d:da:ca:5c:
+        13:ce:ea:c9:eb:09:5c:c5:73:e7:12:01:d5:d9:53:07:9e:e0:
+        0f:96:f0:8b:b4:bb:45:48:9f:86:c5:19:55:a0:cb:96:c5:03:
+        fc:48
+
+Equifax Secure CA
+=================
+MD5 Fingerprint: 67:CB:9D:C0:13:24:8A:82:9B:B2:17:1E:D1:1B:EC:D4
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
+UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy
+dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1
+MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx
+dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B
+AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f
+BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A
+cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC
+AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ
+MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm
+aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw
+ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj
+IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF
+MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA
+A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y
+7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh
+1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 903804111 (0x35def4cf)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Equifax, OU=Equifax Secure Certificate Authority
+        Validity
+            Not Before: Aug 22 16:41:51 1998 GMT
+            Not After : Aug 22 16:41:51 2018 GMT
+        Subject: C=US, O=Equifax, OU=Equifax Secure Certificate Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:c1:5d:b1:58:67:08:62:ee:a0:9a:2d:1f:08:6d:
+                    91:14:68:98:0a:1e:fe:da:04:6f:13:84:62:21:c3:
+                    d1:7c:ce:9f:05:e0:b8:01:f0:4e:34:ec:e2:8a:95:
+                    04:64:ac:f1:6b:53:5f:05:b3:cb:67:80:bf:42:02:
+                    8e:fe:dd:01:09:ec:e1:00:14:4f:fc:fb:f0:0c:dd:
+                    43:ba:5b:2b:e1:1f:80:70:99:15:57:93:16:f1:0f:
+                    97:6a:b7:c2:68:23:1c:cc:4d:59:30:ac:51:1e:3b:
+                    af:2b:d6:ee:63:45:7b:c5:d9:5f:50:d2:e3:50:0f:
+                    3a:88:e7:bf:14:fd:e0:c7:b9
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority/CN=CRL1
+
+            X509v3 Private Key Usage Period: 
+                Not After: Aug 22 16:41:51 2018 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:48:E6:68:F9:2B:D2:B2:95:D7:47:D8:23:20:10:4F:33:98:90:9F:D4
+
+            X509v3 Subject Key Identifier: 
+                48:E6:68:F9:2B:D2:B2:95:D7:47:D8:23:20:10:4F:33:98:90:9F:D4
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0...V3.0c....
+    Signature Algorithm: sha1WithRSAEncryption
+        58:ce:29:ea:fc:f7:de:b5:ce:02:b9:17:b5:85:d1:b9:e3:e0:
+        95:cc:25:31:0d:00:a6:92:6e:7f:b6:92:63:9e:50:95:d1:9a:
+        6f:e4:11:de:63:85:6e:98:ee:a8:ff:5a:c8:d3:55:b2:66:71:
+        57:de:c0:21:eb:3d:2a:a7:23:49:01:04:86:42:7b:fc:ee:7f:
+        a2:16:52:b5:67:67:d3:40:db:3b:26:58:b2:28:77:3d:ae:14:
+        77:61:d6:fa:2a:66:27:a0:0d:fa:a7:73:5c:ea:70:f1:94:21:
+        65:44:5f:fa:fc:ef:29:68:a9:a2:87:79:ef:79:ef:4f:ac:07:
+        77:38
+
+GTE CyberTrust Global Root
+==========================
+MD5 Fingerprint: CA:3D:D3:68:F1:03:5C:D0:32:FA:B8:2B:59:E8:5A:DB
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICWjCCAcMCAgGlMA0GCSqGSIb3DQEBBAUAMHUxCzAJBgNVBAYTAlVTMRgwFgYD
+VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv
+bHV0aW9ucywgSW5jLjEjMCEGA1UEAxMaR1RFIEN5YmVyVHJ1c3QgR2xvYmFsIFJv
+b3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEzMjM1OTAwWjB1MQswCQYDVQQGEwJV
+UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQLEx5HVEUgQ3liZXJU
+cnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0IEds
+b2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrH
+iM3dFw4usJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTS
+r41tiGeA5u2ylc9yMcqlHHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1Yh0X4
+04Wqk2kmhXBIgD8SFcd5tB8FLztimQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAG3r
+GwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMWM4ETCJ57NE7fQMh017l9
+3PR2VX2bY1QY6fDq81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OFNMQkpw0P
+lZPvy5TYnh+dXIVtx6quTx8itc2VrbqnzPmrC3p/
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 421 (0x1a5)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Global Root
+        Validity
+            Not Before: Aug 13 00:29:00 1998 GMT
+            Not After : Aug 13 23:59:00 2018 GMT
+        Subject: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Global Root
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:95:0f:a0:b6:f0:50:9c:e8:7a:c7:88:cd:dd:17:
+                    0e:2e:b0:94:d0:1b:3d:0e:f6:94:c0:8a:94:c7:06:
+                    c8:90:97:c8:b8:64:1a:7a:7e:6c:3c:53:e1:37:28:
+                    73:60:7f:b2:97:53:07:9f:53:f9:6d:58:94:d2:af:
+                    8d:6d:88:67:80:e6:ed:b2:95:cf:72:31:ca:a5:1c:
+                    72:ba:5c:02:e7:64:42:e7:f9:a9:2c:d6:3a:0d:ac:
+                    8d:42:aa:24:01:39:e6:9c:3f:01:85:57:0d:58:87:
+                    45:f8:d3:85:aa:93:69:26:85:70:48:80:3f:12:15:
+                    c7:79:b4:1f:05:2f:3b:62:99
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        6d:eb:1b:09:e9:5e:d9:51:db:67:22:61:a4:2a:3c:48:77:e3:
+        a0:7c:a6:de:73:a2:14:03:85:3d:fb:ab:0e:30:c5:83:16:33:
+        81:13:08:9e:7b:34:4e:df:40:c8:74:d7:b9:7d:dc:f4:76:55:
+        7d:9b:63:54:18:e9:f0:ea:f3:5c:b1:d9:8b:42:1e:b9:c0:95:
+        4e:ba:fa:d5:e2:7c:f5:68:61:bf:8e:ec:05:97:5f:5b:b0:d7:
+        a3:85:34:c4:24:a7:0d:0f:95:93:ef:cb:94:d8:9e:1f:9d:5c:
+        85:6d:c7:aa:ae:4f:1f:22:b5:cd:95:ad:ba:a7:cc:f9:ab:0b:
+        7a:7f
+
+GTE CyberTrust Japan Root CA
+============================
+MD5 Fingerprint: DE:AB:FF:43:2A:65:37:06:9B:28:B5:7A:E8:84:D3:8E
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICETCCAXoCAU4wDQYJKoZIhvcNAQEEBQAwUTELMAkGA1UEBhMCSlAxHzAdBgNV
+BAoTFkN5YmVyVHJ1c3QgSmFwYW4sIEluYy4xITAfBgNVBAMTGEN5YmVyVHJ1c3Qg
+SkFQQU4gUm9vdCBDQTAeFw05ODA4MDQwNzU3MDBaFw0wMzA4MDQyMzU5MDBaMFEx
+CzAJBgNVBAYTAkpQMR8wHQYDVQQKExZDeWJlclRydXN0IEphcGFuLCBJbmMuMSEw
+HwYDVQQDExhDeWJlclRydXN0IEpBUEFOIFJvb3QgQ0EwgZ8wDQYJKoZIhvcNAQEB
+BQADgY0AMIGJAoGBALet/MpHEHaJ/Wes5HMGfIFLHda1fA5Hr+ymVHWoxP1lr+fI
+sbFsNDWN97lkVygLIVredP7ceC6GRhJMfxEf3JO9X75mmIa4t+xtSdOQ2eF5AFZo
+uq1sHyw7H8ksjEOwBELqgXOmzjN1RQ2KRXIvqldV5AfDQ+J1Og+8PNCEzrrvAgMB
+AAEwDQYJKoZIhvcNAQEEBQADgYEAt6ZkowyAPBzE2O5BO+WGpJ5gXdYBMqhqZC0g
+cEC6ck5m+gdlTgOOC/1W4K07IKcy+rISHoDfHuN6GMxX2+bJNGDvdesQFtCkLnDY
+JCO4pXdzQvkHOt0BbAiTBzUmECVgKf8J5WSfabkWSfNc3SRjRpMNsFM2dbxIILsZ
+to/QIv0=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 78 (0x4e)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=JP, O=CyberTrust Japan, Inc., CN=CyberTrust JAPAN Root CA
+        Validity
+            Not Before: Aug  4 07:57:00 1998 GMT
+            Not After : Aug  4 23:59:00 2003 GMT
+        Subject: C=JP, O=CyberTrust Japan, Inc., CN=CyberTrust JAPAN Root CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b7:ad:fc:ca:47:10:76:89:fd:67:ac:e4:73:06:
+                    7c:81:4b:1d:d6:b5:7c:0e:47:af:ec:a6:54:75:a8:
+                    c4:fd:65:af:e7:c8:b1:b1:6c:34:35:8d:f7:b9:64:
+                    57:28:0b:21:5a:de:74:fe:dc:78:2e:86:46:12:4c:
+                    7f:11:1f:dc:93:bd:5f:be:66:98:86:b8:b7:ec:6d:
+                    49:d3:90:d9:e1:79:00:56:68:ba:ad:6c:1f:2c:3b:
+                    1f:c9:2c:8c:43:b0:04:42:ea:81:73:a6:ce:33:75:
+                    45:0d:8a:45:72:2f:aa:57:55:e4:07:c3:43:e2:75:
+                    3a:0f:bc:3c:d0:84:ce:ba:ef
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        b7:a6:64:a3:0c:80:3c:1c:c4:d8:ee:41:3b:e5:86:a4:9e:60:
+        5d:d6:01:32:a8:6a:64:2d:20:70:40:ba:72:4e:66:fa:07:65:
+        4e:03:8e:0b:fd:56:e0:ad:3b:20:a7:32:fa:b2:12:1e:80:df:
+        1e:e3:7a:18:cc:57:db:e6:c9:34:60:ef:75:eb:10:16:d0:a4:
+        2e:70:d8:24:23:b8:a5:77:73:42:f9:07:3a:dd:01:6c:08:93:
+        07:35:26:10:25:60:29:ff:09:e5:64:9f:69:b9:16:49:f3:5c:
+        dd:24:63:46:93:0d:b0:53:36:75:bc:48:20:bb:19:b6:8f:d0:
+        22:fd
+
+GTE CyberTrust Japan Secure Server CA
+=====================================
+MD5 Fingerprint: DD:0D:0D:B4:78:4B:7D:CE:30:0A:A6:35:C6:AB:4C:88
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICIzCCAYwCAU8wDQYJKoZIhvcNAQEEBQAwWjELMAkGA1UEBhMCSlAxHzAdBgNV
+BAoTFkN5YmVyVHJ1c3QgSmFwYW4sIEluYy4xKjAoBgNVBAMTIUN5YmVyVHJ1c3Qg
+SkFQQU4gU2VjdXJlIFNlcnZlciBDQTAeFw05ODA4MDQwODA2MzJaFw0wMzA4MDQy
+MzU5MDBaMFoxCzAJBgNVBAYTAkpQMR8wHQYDVQQKExZDeWJlclRydXN0IEphcGFu
+LCBJbmMuMSowKAYDVQQDEyFDeWJlclRydXN0IEpBUEFOIFNlY3VyZSBTZXJ2ZXIg
+Q0EwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKwmo6G4b2rALBL52zEFkuf9
++tSBtLjVKtWQ+vBDZfwSFcrs27lh3jNjN0+vADx/kjcbGHPlnzyI8RoTRP558sMm
+lQ8L8J4UByFsV8Jdw+JRsM2LX81fhjj4eZc57Oi/Ui6xXqqprozt7tfIty4xi7Q5
+kjt8gScHGgFEL0lzILbJAgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAaB17Eu5aeSkx
+ygGsi1CpJ5ksAPw4Ghz/wtXwE/4bpzn1gBTrUfrAjXuEG1musTVRbqE+1xvsoJ7f
+4KWCluOxP9io8ct5gI738ESZfhT1I6MR42hLBTZuiOOrhqo4UwNCO9O5+eC/BenT
+X8NKp7b9t12QSfiasq1mpoIAk65g/yA=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 79 (0x4f)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=JP, O=CyberTrust Japan, Inc., CN=CyberTrust JAPAN Secure Server CA
+        Validity
+            Not Before: Aug  4 08:06:32 1998 GMT
+            Not After : Aug  4 23:59:00 2003 GMT
+        Subject: C=JP, O=CyberTrust Japan, Inc., CN=CyberTrust JAPAN Secure Server CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:ac:26:a3:a1:b8:6f:6a:c0:2c:12:f9:db:31:05:
+                    92:e7:fd:fa:d4:81:b4:b8:d5:2a:d5:90:fa:f0:43:
+                    65:fc:12:15:ca:ec:db:b9:61:de:33:63:37:4f:af:
+                    00:3c:7f:92:37:1b:18:73:e5:9f:3c:88:f1:1a:13:
+                    44:fe:79:f2:c3:26:95:0f:0b:f0:9e:14:07:21:6c:
+                    57:c2:5d:c3:e2:51:b0:cd:8b:5f:cd:5f:86:38:f8:
+                    79:97:39:ec:e8:bf:52:2e:b1:5e:aa:a9:ae:8c:ed:
+                    ee:d7:c8:b7:2e:31:8b:b4:39:92:3b:7c:81:27:07:
+                    1a:01:44:2f:49:73:20:b6:c9
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        68:1d:7b:12:ee:5a:79:29:31:ca:01:ac:8b:50:a9:27:99:2c:
+        00:fc:38:1a:1c:ff:c2:d5:f0:13:fe:1b:a7:39:f5:80:14:eb:
+        51:fa:c0:8d:7b:84:1b:59:ae:b1:35:51:6e:a1:3e:d7:1b:ec:
+        a0:9e:df:e0:a5:82:96:e3:b1:3f:d8:a8:f1:cb:79:80:8e:f7:
+        f0:44:99:7e:14:f5:23:a3:11:e3:68:4b:05:36:6e:88:e3:ab:
+        86:aa:38:53:03:42:3b:d3:b9:f9:e0:bf:05:e9:d3:5f:c3:4a:
+        a7:b6:fd:b7:5d:90:49:f8:9a:b2:ad:66:a6:82:00:93:ae:60:
+        ff:20
+
+GTE CyberTrust Root 2
+=====================
+MD5 Fingerprint: BA:ED:17:57:9A:4B:FF:7C:F9:C9:1F:A2:CD:1A:D6:87
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICUDCCAbkCAgGbMA0GCSqGSIb3DQEBBAUAMHAxCzAJBgNVBAYTAlVTMRgwFgYD
+VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv
+bHV0aW9ucywgSW5jLjEeMBwGA1UEAxMVR1RFIEN5YmVyVHJ1c3QgUm9vdCAyMB4X
+DTk4MDgxMTExMzUwN1oXDTA4MDgxMTExMjIxNlowcDELMAkGA1UEBhMCVVMxGDAW
+BgNVBAoTD0dURSBDb3Jwb3JhdGlvbjEnMCUGA1UECxMeR1RFIEN5YmVyVHJ1c3Qg
+U29sdXRpb25zLCBJbmMuMR4wHAYDVQQDExVHVEUgQ3liZXJUcnVzdCBSb290IDIw
+gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANksTE4vaRoj41a6886EwAnAefFE
+XzMfFZF/iogouCRFzI8YzR900bWPcUzWMfZzloSUQMWpg2Akfa9vNLdLTMIJgDtF
+BJ7EPMQndXsADKFkR7UUXYJLUTpYu0RMPdPlBjjoYVyYeLuAs5zacoJioN+cX+v5
+T3fCzGAYAGs0giWzAgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAo2SRbxDt526iQkCU
+eM74FAjR+kOF60bNkhTQ7y4tNjkY2brJJ4gp6UgXb/jBqshhbS39QC11QzCXOfgU
+ZL1v72OoK0LfsloNJex7N9jOkSmCFvnoYqLhdsQCfd0li5jh9g1gjPZZkEBRRNHC
++xkkHhc5a3QhFTPWVdeCHnAsJ6g=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 411 (0x19b)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 2
+        Validity
+            Not Before: Aug 11 11:35:07 1998 GMT
+            Not After : Aug 11 11:22:16 2008 GMT
+        Subject: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 2
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d9:2c:4c:4e:2f:69:1a:23:e3:56:ba:f3:ce:84:
+                    c0:09:c0:79:f1:44:5f:33:1f:15:91:7f:8a:88:28:
+                    b8:24:45:cc:8f:18:cd:1f:74:d1:b5:8f:71:4c:d6:
+                    31:f6:73:96:84:94:40:c5:a9:83:60:24:7d:af:6f:
+                    34:b7:4b:4c:c2:09:80:3b:45:04:9e:c4:3c:c4:27:
+                    75:7b:00:0c:a1:64:47:b5:14:5d:82:4b:51:3a:58:
+                    bb:44:4c:3d:d3:e5:06:38:e8:61:5c:98:78:bb:80:
+                    b3:9c:da:72:82:62:a0:df:9c:5f:eb:f9:4f:77:c2:
+                    cc:60:18:00:6b:34:82:25:b3
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        a3:64:91:6f:10:ed:e7:6e:a2:42:40:94:78:ce:f8:14:08:d1:
+        fa:43:85:eb:46:cd:92:14:d0:ef:2e:2d:36:39:18:d9:ba:c9:
+        27:88:29:e9:48:17:6f:f8:c1:aa:c8:61:6d:2d:fd:40:2d:75:
+        43:30:97:39:f8:14:64:bd:6f:ef:63:a8:2b:42:df:b2:5a:0d:
+        25:ec:7b:37:d8:ce:91:29:82:16:f9:e8:62:a2:e1:76:c4:02:
+        7d:dd:25:8b:98:e1:f6:0d:60:8c:f6:59:90:40:51:44:d1:c2:
+        fb:19:24:1e:17:39:6b:74:21:15:33:d6:55:d7:82:1e:70:2c:
+        27:a8
+
+GTE CyberTrust Root 3
+=====================
+MD5 Fingerprint: DB:81:96:57:AE:64:61:EF:77:A7:83:C4:51:24:3C:87
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICUDCCAbkCAgGXMA0GCSqGSIb3DQEBBQUAMHAxCzAJBgNVBAYTAlVTMRgwFgYD
+VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv
+bHV0aW9ucywgSW5jLjEeMBwGA1UEAxMVR1RFIEN5YmVyVHJ1c3QgUm9vdCAzMB4X
+DTk4MDgxMDE5NTkwOFoXDTA4MDgxMDE5MzYzOVowcDELMAkGA1UEBhMCVVMxGDAW
+BgNVBAoTD0dURSBDb3Jwb3JhdGlvbjEnMCUGA1UECxMeR1RFIEN5YmVyVHJ1c3Qg
+U29sdXRpb25zLCBJbmMuMR4wHAYDVQQDExVHVEUgQ3liZXJUcnVzdCBSb290IDMw
+gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOHzsSsLztwU2TSXYlASVmOETFP6
+wIXP+sHdD955E39T+6oOYN3iYr/G7k6ZNKpoQzWZ+KP982O9AVRqnrI6lix7eCjG
+WrWNGhUY/eOMLqJQCVtx1g21GB8ZjgQpk5N4q18U53NC8gMMV6IbUDsLu1ngoDoD
+7icbWky5sAjKuRqJAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAheutlCAG6bKiazvy
+ZuvjS7gSJgXl9JGo3IfcmPSUwfRhvdWcbFFzlV7QvdfmRdw8z0aE1ee57ORnY24A
+KHdxXUoF6bl8hszCRLveKUja6t29F58dUQGo6BResVf3/9qPzpX+Le0yEnf/fGph
+la4xcgYI8PnzDY7i76hTXZEDg94=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 407 (0x197)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 3
+        Validity
+            Not Before: Aug 10 19:59:08 1998 GMT
+            Not After : Aug 10 19:36:39 2008 GMT
+        Subject: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 3
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:e1:f3:b1:2b:0b:ce:dc:14:d9:34:97:62:50:12:
+                    56:63:84:4c:53:fa:c0:85:cf:fa:c1:dd:0f:de:79:
+                    13:7f:53:fb:aa:0e:60:dd:e2:62:bf:c6:ee:4e:99:
+                    34:aa:68:43:35:99:f8:a3:fd:f3:63:bd:01:54:6a:
+                    9e:b2:3a:96:2c:7b:78:28:c6:5a:b5:8d:1a:15:18:
+                    fd:e3:8c:2e:a2:50:09:5b:71:d6:0d:b5:18:1f:19:
+                    8e:04:29:93:93:78:ab:5f:14:e7:73:42:f2:03:0c:
+                    57:a2:1b:50:3b:0b:bb:59:e0:a0:3a:03:ee:27:1b:
+                    5a:4c:b9:b0:08:ca:b9:1a:89
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        85:eb:ad:94:20:06:e9:b2:a2:6b:3b:f2:66:eb:e3:4b:b8:12:
+        26:05:e5:f4:91:a8:dc:87:dc:98:f4:94:c1:f4:61:bd:d5:9c:
+        6c:51:73:95:5e:d0:bd:d7:e6:45:dc:3c:cf:46:84:d5:e7:b9:
+        ec:e4:67:63:6e:00:28:77:71:5d:4a:05:e9:b9:7c:86:cc:c2:
+        44:bb:de:29:48:da:ea:dd:bd:17:9f:1d:51:01:a8:e8:14:5e:
+        b1:57:f7:ff:da:8f:ce:95:fe:2d:ed:32:12:77:ff:7c:6a:61:
+        95:ae:31:72:06:08:f0:f9:f3:0d:8e:e2:ef:a8:53:5d:91:03:
+        83:de
+
+GTE CyberTrust Root 4
+=====================
+MD5 Fingerprint: 33:43:02:B1:B9:E0:73:B1:B1:20:CA:CB:C7:84:03:50
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDVTCCAj0CAgGoMA0GCSqGSIb3DQEBBQUAMHAxCzAJBgNVBAYTAlVTMRgwFgYD
+VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv
+bHV0aW9ucywgSW5jLjEeMBwGA1UEAxMVR1RFIEN5YmVyVHJ1c3QgUm9vdCA0MB4X
+DTk4MDgxMzEzNTEwMFoXDTEzMDgxMzIzNTkwMFowcDELMAkGA1UEBhMCVVMxGDAW
+BgNVBAoTD0dURSBDb3Jwb3JhdGlvbjEnMCUGA1UECxMeR1RFIEN5YmVyVHJ1c3Qg
+U29sdXRpb25zLCBJbmMuMR4wHAYDVQQDExVHVEUgQ3liZXJUcnVzdCBSb290IDQw
+ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6nSJuf9pmPDlCsaMqb9P3
+vK6sMVrXEZBHuZ0ZLvnzGyKgw+GnusT8XgqUS5haSybkH/Tc8/6OiNxsLXx3hyZQ
+wF5OqCih6hdpT03GAQ7amg0GViYVtqRdejWvje14Uob5OKuzAdPaBZaxtlCrwKGu
+F1P6QzkgcWUj223Etu2YRYPX0vbiqWv7+XXM78WrcZY16N+OkZuoEHUft84Tjmuz
+lneXGpEvxyxpmfAPKmgAmHZEG4wo0uuO9IO0f6QlXmw72cZo1WG41F4xB7VbkDVS
+V3sXIO0tuB6OiDk+Usvf8FyxZbulErSQY79xnTLB2r9QSpW+BjrEK+vNmHZETQvl
+AgMBAAEwDQYJKoZIhvcNAQEFBQADggEBAEOvHIfJSbpliTRJPOoHO0eiedSgO5Bs
+3n+oVMPoTEAyvMjsHOXZrEC6/Iw/wnOc9GTq36ntTlvIAWDuOW1DJ/N/qgjS/k5v
+FDJNfeQ0gKU1xNZGULQ7oC1lH09lfjQoLcCndn0xyQ0zFvYgGSARULsDzHBtlrfv
+TKfaNhXPu03UltyITWyY7blz/ihXoO1k+AqBKXP29pcyhzm0ge/ZTRoHNPe6QjXe
+V9xc1vfF6wonDIGmwtBoTv2SW0iD9haKjzZb7TFsP0F6cfeSPzGkCkBM84biYcE8
+SYEtpbjvupcPvCsdm4ny0o4eTYbywqv2LZnAGyoNobZP+SxYTT19Nwo=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 424 (0x1a8)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 4
+        Validity
+            Not Before: Aug 13 13:51:00 1998 GMT
+            Not After : Aug 13 23:59:00 2013 GMT
+        Subject: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 4
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:ba:9d:22:6e:7f:da:66:3c:39:42:b1:a3:2a:6f:
+                    d3:f7:bc:ae:ac:31:5a:d7:11:90:47:b9:9d:19:2e:
+                    f9:f3:1b:22:a0:c3:e1:a7:ba:c4:fc:5e:0a:94:4b:
+                    98:5a:4b:26:e4:1f:f4:dc:f3:fe:8e:88:dc:6c:2d:
+                    7c:77:87:26:50:c0:5e:4e:a8:28:a1:ea:17:69:4f:
+                    4d:c6:01:0e:da:9a:0d:06:56:26:15:b6:a4:5d:7a:
+                    35:af:8d:ed:78:52:86:f9:38:ab:b3:01:d3:da:05:
+                    96:b1:b6:50:ab:c0:a1:ae:17:53:fa:43:39:20:71:
+                    65:23:db:6d:c4:b6:ed:98:45:83:d7:d2:f6:e2:a9:
+                    6b:fb:f9:75:cc:ef:c5:ab:71:96:35:e8:df:8e:91:
+                    9b:a8:10:75:1f:b7:ce:13:8e:6b:b3:96:77:97:1a:
+                    91:2f:c7:2c:69:99:f0:0f:2a:68:00:98:76:44:1b:
+                    8c:28:d2:eb:8e:f4:83:b4:7f:a4:25:5e:6c:3b:d9:
+                    c6:68:d5:61:b8:d4:5e:31:07:b5:5b:90:35:52:57:
+                    7b:17:20:ed:2d:b8:1e:8e:88:39:3e:52:cb:df:f0:
+                    5c:b1:65:bb:a5:12:b4:90:63:bf:71:9d:32:c1:da:
+                    bf:50:4a:95:be:06:3a:c4:2b:eb:cd:98:76:44:4d:
+                    0b:e5
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        43:af:1c:87:c9:49:ba:65:89:34:49:3c:ea:07:3b:47:a2:79:
+        d4:a0:3b:90:6c:de:7f:a8:54:c3:e8:4c:40:32:bc:c8:ec:1c:
+        e5:d9:ac:40:ba:fc:8c:3f:c2:73:9c:f4:64:ea:df:a9:ed:4e:
+        5b:c8:01:60:ee:39:6d:43:27:f3:7f:aa:08:d2:fe:4e:6f:14:
+        32:4d:7d:e4:34:80:a5:35:c4:d6:46:50:b4:3b:a0:2d:65:1f:
+        4f:65:7e:34:28:2d:c0:a7:76:7d:31:c9:0d:33:16:f6:20:19:
+        20:11:50:bb:03:cc:70:6d:96:b7:ef:4c:a7:da:36:15:cf:bb:
+        4d:d4:96:dc:88:4d:6c:98:ed:b9:73:fe:28:57:a0:ed:64:f8:
+        0a:81:29:73:f6:f6:97:32:87:39:b4:81:ef:d9:4d:1a:07:34:
+        f7:ba:42:35:de:57:dc:5c:d6:f7:c5:eb:0a:27:0c:81:a6:c2:
+        d0:68:4e:fd:92:5b:48:83:f6:16:8a:8f:36:5b:ed:31:6c:3f:
+        41:7a:71:f7:92:3f:31:a4:0a:40:4c:f3:86:e2:61:c1:3c:49:
+        81:2d:a5:b8:ef:ba:97:0f:bc:2b:1d:9b:89:f2:d2:8e:1e:4d:
+        86:f2:c2:ab:f6:2d:99:c0:1b:2a:0d:a1:b6:4f:f9:2c:58:4d:
+        3d:7d:37:0a
+
+GTE CyberTrust Root 5
+=====================
+MD5 Fingerprint: 7D:6C:86:E4:FC:4D:D1:0B:00:BA:22:BB:4E:7C:6A:8E
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDtjCCAp6gAwIBAgICAbYwDQYJKoZIhvcNAQEFBQAwcDELMAkGA1UEBhMCVVMx
+GDAWBgNVBAoTD0dURSBDb3Jwb3JhdGlvbjEnMCUGA1UECxMeR1RFIEN5YmVyVHJ1
+c3QgU29sdXRpb25zLCBJbmMuMR4wHAYDVQQDExVHVEUgQ3liZXJUcnVzdCBSb290
+IDUwHhcNOTgwODE0MTQ1MDAwWhcNMTMwODE0MjM1OTAwWjBwMQswCQYDVQQGEwJV
+UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQLEx5HVEUgQ3liZXJU
+cnVzdCBTb2x1dGlvbnMsIEluYy4xHjAcBgNVBAMTFUdURSBDeWJlclRydXN0IFJv
+b3QgNTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALwSbj+KfHqXAewe
+uzlaAvR4RKJIG457SVJ6uHtHs6+Um2+7lvoramVcuByUc76/iQoigO5X/IwFu3Cf
+lzkE2qOHXKjlyq/AM5rVN1xLrOSA0KYjYPv9ci6UncfOwgQy73hgXe2thw9FZR48
+mgqavl0dmezn8tHGehfZrZtUln/EfGC/haoVNR1A2hG87FQhKC0joajwzy3N3fx+
+D17hZQdWywe00lboXjHMGGPEhtIthc+Tkqtt/mg5+95zvYb45EZ66p8My/QZ/mO8
+0Sx7iDM29uThnAxTgWAc2i6rlqkWiBNQmbK9Vd8VMH7o5Zj7cH5stQf8/Ea30O03
+ln4y/iECAwEAAaNaMFgwEgYDVR0TAQH/BAgwBgEB/wIBBTAOBgNVHQ8BAf8EBAMC
+AQYwFwYDVR0gBBAwDjAMBgoqhkiG+GMBAgEDMBkGA1UdDgQSBBB2CkkhOEyf3vjE
+ScdxcZGdMA0GCSqGSIb3DQEBBQUAA4IBAQBBOtQYW9q43iEc4Y4J5fFoNP/elvQH
+9ac886xKsZv6kvqb7eYyIapKdsXcTzjl39WG5NXIdn2Y17HNj021kSNsi4rr6nzv
+FJTExvAfSi0ycWMrY5EmAgm2gB3t4sy4f9uHY8jh0GwmsTUdQGYQG82VVBgzYewT
+T9oT95mvPtDPjqZyorPDBZrJJ32SzH5SjbOrcG2eiZ9N6xp1wpiq1QIW1wyKvyXk
+6y28mOlYOBl8uTf+2+KZCHMGx5eDan0QAS8yuRcFSmXmL86+XlOmgumaUwqEdC2D
+ysiUFnZflGEo8IWnObvXi9moshMdVAk0JH0ggX1mfqKQdFwQxr3sqxvC
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 438 (0x1b6)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 5
+        Validity
+            Not Before: Aug 14 14:50:00 1998 GMT
+            Not After : Aug 14 23:59:00 2013 GMT
+        Subject: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 5
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:bc:12:6e:3f:8a:7c:7a:97:01:ec:1e:bb:39:5a:
+                    02:f4:78:44:a2:48:1b:8e:7b:49:52:7a:b8:7b:47:
+                    b3:af:94:9b:6f:bb:96:fa:2b:6a:65:5c:b8:1c:94:
+                    73:be:bf:89:0a:22:80:ee:57:fc:8c:05:bb:70:9f:
+                    97:39:04:da:a3:87:5c:a8:e5:ca:af:c0:33:9a:d5:
+                    37:5c:4b:ac:e4:80:d0:a6:23:60:fb:fd:72:2e:94:
+                    9d:c7:ce:c2:04:32:ef:78:60:5d:ed:ad:87:0f:45:
+                    65:1e:3c:9a:0a:9a:be:5d:1d:99:ec:e7:f2:d1:c6:
+                    7a:17:d9:ad:9b:54:96:7f:c4:7c:60:bf:85:aa:15:
+                    35:1d:40:da:11:bc:ec:54:21:28:2d:23:a1:a8:f0:
+                    cf:2d:cd:dd:fc:7e:0f:5e:e1:65:07:56:cb:07:b4:
+                    d2:56:e8:5e:31:cc:18:63:c4:86:d2:2d:85:cf:93:
+                    92:ab:6d:fe:68:39:fb:de:73:bd:86:f8:e4:46:7a:
+                    ea:9f:0c:cb:f4:19:fe:63:bc:d1:2c:7b:88:33:36:
+                    f6:e4:e1:9c:0c:53:81:60:1c:da:2e:ab:96:a9:16:
+                    88:13:50:99:b2:bd:55:df:15:30:7e:e8:e5:98:fb:
+                    70:7e:6c:b5:07:fc:fc:46:b7:d0:ed:37:96:7e:32:
+                    fe:21
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE, pathlen:5
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Certificate Policies: 
+                Policy: 1.2.840.113763.1.2.1.3
+
+            X509v3 Subject Key Identifier: 
+                76:0A:49:21:38:4C:9F:DE:F8:C4:49:C7:71:71:91:9D
+    Signature Algorithm: sha1WithRSAEncryption
+        41:3a:d4:18:5b:da:b8:de:21:1c:e1:8e:09:e5:f1:68:34:ff:
+        de:96:f4:07:f5:a7:3c:f3:ac:4a:b1:9b:fa:92:fa:9b:ed:e6:
+        32:21:aa:4a:76:c5:dc:4f:38:e5:df:d5:86:e4:d5:c8:76:7d:
+        98:d7:b1:cd:8f:4d:b5:91:23:6c:8b:8a:eb:ea:7c:ef:14:94:
+        c4:c6:f0:1f:4a:2d:32:71:63:2b:63:91:26:02:09:b6:80:1d:
+        ed:e2:cc:b8:7f:db:87:63:c8:e1:d0:6c:26:b1:35:1d:40:66:
+        10:1b:cd:95:54:18:33:61:ec:13:4f:da:13:f7:99:af:3e:d0:
+        cf:8e:a6:72:a2:b3:c3:05:9a:c9:27:7d:92:cc:7e:52:8d:b3:
+        ab:70:6d:9e:89:9f:4d:eb:1a:75:c2:98:aa:d5:02:16:d7:0c:
+        8a:bf:25:e4:eb:2d:bc:98:e9:58:38:19:7c:b9:37:fe:db:e2:
+        99:08:73:06:c7:97:83:6a:7d:10:01:2f:32:b9:17:05:4a:65:
+        e6:2f:ce:be:5e:53:a6:82:e9:9a:53:0a:84:74:2d:83:ca:c8:
+        94:16:76:5f:94:61:28:f0:85:a7:39:bb:d7:8b:d9:a8:b2:13:
+        1d:54:09:34:24:7d:20:81:7d:66:7e:a2:90:74:5c:10:c6:bd:
+        ec:ab:1b:c2
+
+GTE CyberTrust Root CA
+======================
+MD5 Fingerprint: C4:D7:F0:B2:A3:C5:7D:61:67:F0:04:CD:43:D3:BA:58
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIB+jCCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD
+VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv
+b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV
+UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU
+cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC45k+625h8cXyv
+RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M
+ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5
+1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz
+dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl
+IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy
+bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 419 (0x1a3)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=US, O=GTE Corporation, CN=GTE CyberTrust Root
+        Validity
+            Not Before: Feb 23 23:01:00 1996 GMT
+            Not After : Feb 23 23:59:00 2006 GMT
+        Subject: C=US, O=GTE Corporation, CN=GTE CyberTrust Root
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b8:e6:4f:ba:db:98:7c:71:7c:af:44:b7:d3:0f:
+                    46:d9:64:e5:93:c1:42:8e:c7:ba:49:8d:35:2d:7a:
+                    e7:8b:bd:e5:05:31:59:c6:b1:2f:0a:0c:fb:9f:a7:
+                    3f:a2:09:66:84:56:1e:37:29:1b:87:e9:7e:0c:ca:
+                    9a:9f:a5:7f:f5:15:94:a3:d5:a2:46:82:d8:68:4c:
+                    d1:37:15:06:68:af:bd:f8:b0:b3:f0:29:f5:95:5a:
+                    09:16:61:77:0a:22:25:d4:4f:45:aa:c7:bd:e5:96:
+                    df:f9:d4:a8:8e:42:cc:24:c0:1e:91:27:4a:b5:6d:
+                    06:80:63:39:c4:a2:5e:38:03
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        12:b3:75:c6:5f:1d:e1:61:55:80:00:d4:81:4b:7b:31:0f:23:
+        63:e7:3d:f3:03:f9:f4:36:a8:bb:d9:e3:a5:97:4d:ea:2b:29:
+        e0:d6:6a:73:81:e6:c0:89:a3:d3:f1:e0:a5:a5:22:37:9a:63:
+        c2:48:20:b4:db:72:e3:c8:f6:d9:7c:be:b1:af:53:da:14:b4:
+        21:b8:d6:d5:96:e3:fe:4e:0c:59:62:b6:9a:4a:f9:42:dd:8c:
+        6f:81:a9:71:ff:f4:0a:72:6d:6d:44:0e:9d:f3:74:74:a8:d5:
+        34:49:e9:5e:9e:e9:b4:7a:e1:e5:5a:1f:84:30:9c:d3:9f:a5:
+        25:d8
+
+GlobalSign Partners CA
+======================
+MD5 Fingerprint: 3C:75:CD:4C:BD:A9:D0:8A:79:4F:50:16:37:84:F4:2B
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDnjCCAoagAwIBAgILAgAAAAAA1ni50a8wDQYJKoZIhvcNAQEEBQAwVzELMAkG
+A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
+b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05OTAxMjgxMjAw
+MDBaFw0wOTAxMjgxMjAwMDBaMF8xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
+YWxTaWduIG52LXNhMRQwEgYDVQQLEwtQYXJ0bmVycyBDQTEfMB0GA1UEAxMWR2xv
+YmFsU2lnbiBQYXJ0bmVycyBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBANIs+DKsShJ6N8gpkaWujG4eDsA0M4jlM3EWHHiEaMMYNFAuFj6xlIJPsZqf
+APjGETXGaXuYAq0ABohs50wzKACIJ0Yfh7NxdWO8MruI3mYYDlAGk7T2vBQ3MD0i
+3z3/dX7ZChrFn7P80KyzCHqJ0wHoAFznSgs9TXsmordiBovaRt2TFz8/WwJLC7aI
+IBGSAK27xy7U40Wu9YlafI2krYVkMsAnjMbyioCShiRWWY10aKKDQrOePVBBhm8g
+bvb9ztMZ4zLMj+2aXm0fKPVSrG4YXvg90ZLlumwBiEsK8i3eZTMFQqBMqjF2vv2/
+gXj5cRxGXi0VlS0wWY5MQdFiqz0CAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgAGMB0G
+A1UdDgQWBBRDJI1wFQhiVZxPDEAXXYZeD6JM+zAfBgNVHSMEGDAWgBRge2YaRQ2X
+yolQL30EzTSo//z9SzAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBBAUAA4IB
+AQBm7bSIaRGZgiGDrKFti5uErQ8tyB6Mynt+rarUjt4H1p5Fx6W4nAc5YCVVGsBP
+GeXPFylJiRg1ZuXrKEBOV8mvs+S4IAWjO5VQkUmUKX0s5YhBpUWIXp2CJ/fS71u1
+T5++/jVlLFVkn+FR2iJhd7pYTo/GeVlZbjCAok+QbiELrdBoOZAQm+0iZW8eETjm
+f4zS8zltR9Uh6Op1OkHRrfYWnV0LIb3zH2MGJR3BHzVxLOsgGdXBsOw95W/tAgc/
+E3tmktZEwZj3X1CLelvCb22w0fjldKBAN6MlD+Q9ymQxk5BcMHu5OTGaXkzNuUFP
+UOQ9OK7IZtnHO11RR6ybq/Kt
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            02:00:00:00:00:00:d6:78:b9:d1:af
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
+        Validity
+            Not Before: Jan 28 12:00:00 1999 GMT
+            Not After : Jan 28 12:00:00 2009 GMT
+        Subject: C=BE, O=GlobalSign nv-sa, OU=Partners CA, CN=GlobalSign Partners CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:d2:2c:f8:32:ac:4a:12:7a:37:c8:29:91:a5:ae:
+                    8c:6e:1e:0e:c0:34:33:88:e5:33:71:16:1c:78:84:
+                    68:c3:18:34:50:2e:16:3e:b1:94:82:4f:b1:9a:9f:
+                    00:f8:c6:11:35:c6:69:7b:98:02:ad:00:06:88:6c:
+                    e7:4c:33:28:00:88:27:46:1f:87:b3:71:75:63:bc:
+                    32:bb:88:de:66:18:0e:50:06:93:b4:f6:bc:14:37:
+                    30:3d:22:df:3d:ff:75:7e:d9:0a:1a:c5:9f:b3:fc:
+                    d0:ac:b3:08:7a:89:d3:01:e8:00:5c:e7:4a:0b:3d:
+                    4d:7b:26:a2:b7:62:06:8b:da:46:dd:93:17:3f:3f:
+                    5b:02:4b:0b:b6:88:20:11:92:00:ad:bb:c7:2e:d4:
+                    e3:45:ae:f5:89:5a:7c:8d:a4:ad:85:64:32:c0:27:
+                    8c:c6:f2:8a:80:92:86:24:56:59:8d:74:68:a2:83:
+                    42:b3:9e:3d:50:41:86:6f:20:6e:f6:fd:ce:d3:19:
+                    e3:32:cc:8f:ed:9a:5e:6d:1f:28:f5:52:ac:6e:18:
+                    5e:f8:3d:d1:92:e5:ba:6c:01:88:4b:0a:f2:2d:de:
+                    65:33:05:42:a0:4c:aa:31:76:be:fd:bf:81:78:f9:
+                    71:1c:46:5e:2d:15:95:2d:30:59:8e:4c:41:d1:62:
+                    ab:3d
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Subject Key Identifier: 
+                43:24:8D:70:15:08:62:55:9C:4F:0C:40:17:5D:86:5E:0F:A2:4C:FB
+            X509v3 Authority Key Identifier: 
+                keyid:60:7B:66:1A:45:0D:97:CA:89:50:2F:7D:04:CD:34:A8:FF:FC:FD:4B
+
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        66:ed:b4:88:69:11:99:82:21:83:ac:a1:6d:8b:9b:84:ad:0f:
+        2d:c8:1e:8c:ca:7b:7e:ad:aa:d4:8e:de:07:d6:9e:45:c7:a5:
+        b8:9c:07:39:60:25:55:1a:c0:4f:19:e5:cf:17:29:49:89:18:
+        35:66:e5:eb:28:40:4e:57:c9:af:b3:e4:b8:20:05:a3:3b:95:
+        50:91:49:94:29:7d:2c:e5:88:41:a5:45:88:5e:9d:82:27:f7:
+        d2:ef:5b:b5:4f:9f:be:fe:35:65:2c:55:64:9f:e1:51:da:22:
+        61:77:ba:58:4e:8f:c6:79:59:59:6e:30:80:a2:4f:90:6e:21:
+        0b:ad:d0:68:39:90:10:9b:ed:22:65:6f:1e:11:38:e6:7f:8c:
+        d2:f3:39:6d:47:d5:21:e8:ea:75:3a:41:d1:ad:f6:16:9d:5d:
+        0b:21:bd:f3:1f:63:06:25:1d:c1:1f:35:71:2c:eb:20:19:d5:
+        c1:b0:ec:3d:e5:6f:ed:02:07:3f:13:7b:66:92:d6:44:c1:98:
+        f7:5f:50:8b:7a:5b:c2:6f:6d:b0:d1:f8:e5:74:a0:40:37:a3:
+        25:0f:e4:3d:ca:64:31:93:90:5c:30:7b:b9:39:31:9a:5e:4c:
+        cd:b9:41:4f:50:e4:3d:38:ae:c8:66:d9:c7:3b:5d:51:47:ac:
+        9b:ab:f2:ad
+
+GlobalSign Primary Class 1 CA
+=============================
+MD5 Fingerprint: 5C:AC:59:01:A4:86:53:CB:10:66:B5:D6:D6:71:FF:01
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDrDCCApSgAwIBAgILAgAAAAAA1ni4N88wDQYJKoZIhvcNAQEEBQAwVzELMAkG
+A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
+b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MTUxMjAw
+MDBaFw0wOTAxMjgxMjAwMDBaMG0xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
+YWxTaWduIG52LXNhMRswGQYDVQQLExJQcmltYXJ5IENsYXNzIDEgQ0ExJjAkBgNV
+BAMTHUdsb2JhbFNpZ24gUHJpbWFyeSBDbGFzcyAxIENBMIIBIjANBgkqhkiG9w0B
+AQEFAAOCAQ8AMIIBCgKCAQEAvSA1R9Eo1gijEjkjRw29cCFSDlcxlaY0V2vsfkN5
+wwZSSM28taGZvdgfMrzP125ybS53IpCCTkuPmgwBQprZcFm2nR/mY9EMrR1O+IWB
++a7vn6ZSYUR5GnVF4GFWRW1CjD1yy6akErea9dZg0GBQs46mpuy09BLNf6jO77Ph
+hTD+csTm53eznlhB1lGDiAfGtmlPNt7RC0g/vdafIXRkbycGPkv9Dqabv6RIV4yQ
+7okYCwKBGL5n/lNgiCe6o3M0S1pWtN5zBe2Yll3sSudA/EsJYuvQ4zFPhdF6q1ln
+K/uID+uqg701/WEn7GYOQlf3acIM7/xqwm5J2o9BOK5IqQIDAQABo2MwYTAOBgNV
+HQ8BAf8EBAMCAAYwHQYDVR0OBBYEFPzgZvZaNZnrQB7SuB5DvJiOH4rDMB8GA1Ud
+IwQYMBaAFGB7ZhpFDZfKiVAvfQTNNKj//P1LMA8GA1UdEwEB/wQFMAMBAf8wDQYJ
+KoZIhvcNAQEEBQADggEBAJujCETO8pCdcfMyswVqterPKZjeVT6gFn0GekTWr9L6
+E1iM+BzHqx20G+9paJhcCDmP4Pf7SMwh57gz2wWqNCRsSuXpe2Deg7MfCr5BdfzM
+MEi3wSYdBDOqtnjtKsu6VpcybvcxlS5G8hTuJ8f3Yom5XFrTOIpk9Te08bM0ctXV
+IT1L13iT1zFmNR6j2EdJbxyt4YB/+JgkbHOsDsIadwKjJge3x2tdvILVKkgdY89Q
+Mqb7HBhHFQpbDFw4JJoEmKgISF98NIdjqy2NTAB3lBt2uvUWGKMVry+U9ikAdsEV
+F9PpN0121MtLKVkkrNpKoOpj3l9Usfrz0UXLxWS0cyE=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            02:00:00:00:00:00:d6:78:b8:37:cf
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
+        Validity
+            Not Before: Sep 15 12:00:00 1998 GMT
+            Not After : Jan 28 12:00:00 2009 GMT
+        Subject: C=BE, O=GlobalSign nv-sa, OU=Primary Class 1 CA, CN=GlobalSign Primary Class 1 CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:bd:20:35:47:d1:28:d6:08:a3:12:39:23:47:0d:
+                    bd:70:21:52:0e:57:31:95:a6:34:57:6b:ec:7e:43:
+                    79:c3:06:52:48:cd:bc:b5:a1:99:bd:d8:1f:32:bc:
+                    cf:d7:6e:72:6d:2e:77:22:90:82:4e:4b:8f:9a:0c:
+                    01:42:9a:d9:70:59:b6:9d:1f:e6:63:d1:0c:ad:1d:
+                    4e:f8:85:81:f9:ae:ef:9f:a6:52:61:44:79:1a:75:
+                    45:e0:61:56:45:6d:42:8c:3d:72:cb:a6:a4:12:b7:
+                    9a:f5:d6:60:d0:60:50:b3:8e:a6:a6:ec:b4:f4:12:
+                    cd:7f:a8:ce:ef:b3:e1:85:30:fe:72:c4:e6:e7:77:
+                    b3:9e:58:41:d6:51:83:88:07:c6:b6:69:4f:36:de:
+                    d1:0b:48:3f:bd:d6:9f:21:74:64:6f:27:06:3e:4b:
+                    fd:0e:a6:9b:bf:a4:48:57:8c:90:ee:89:18:0b:02:
+                    81:18:be:67:fe:53:60:88:27:ba:a3:73:34:4b:5a:
+                    56:b4:de:73:05:ed:98:96:5d:ec:4a:e7:40:fc:4b:
+                    09:62:eb:d0:e3:31:4f:85:d1:7a:ab:59:67:2b:fb:
+                    88:0f:eb:aa:83:bd:35:fd:61:27:ec:66:0e:42:57:
+                    f7:69:c2:0c:ef:fc:6a:c2:6e:49:da:8f:41:38:ae:
+                    48:a9
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Subject Key Identifier: 
+                FC:E0:66:F6:5A:35:99:EB:40:1E:D2:B8:1E:43:BC:98:8E:1F:8A:C3
+            X509v3 Authority Key Identifier: 
+                keyid:60:7B:66:1A:45:0D:97:CA:89:50:2F:7D:04:CD:34:A8:FF:FC:FD:4B
+
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        9b:a3:08:44:ce:f2:90:9d:71:f3:32:b3:05:6a:b5:ea:cf:29:
+        98:de:55:3e:a0:16:7d:06:7a:44:d6:af:d2:fa:13:58:8c:f8:
+        1c:c7:ab:1d:b4:1b:ef:69:68:98:5c:08:39:8f:e0:f7:fb:48:
+        cc:21:e7:b8:33:db:05:aa:34:24:6c:4a:e5:e9:7b:60:de:83:
+        b3:1f:0a:be:41:75:fc:cc:30:48:b7:c1:26:1d:04:33:aa:b6:
+        78:ed:2a:cb:ba:56:97:32:6e:f7:31:95:2e:46:f2:14:ee:27:
+        c7:f7:62:89:b9:5c:5a:d3:38:8a:64:f5:37:b4:f1:b3:34:72:
+        d5:d5:21:3d:4b:d7:78:93:d7:31:66:35:1e:a3:d8:47:49:6f:
+        1c:ad:e1:80:7f:f8:98:24:6c:73:ac:0e:c2:1a:77:02:a3:26:
+        07:b7:c7:6b:5d:bc:82:d5:2a:48:1d:63:cf:50:32:a6:fb:1c:
+        18:47:15:0a:5b:0c:5c:38:24:9a:04:98:a8:08:48:5f:7c:34:
+        87:63:ab:2d:8d:4c:00:77:94:1b:76:ba:f5:16:18:a3:15:af:
+        2f:94:f6:29:00:76:c1:15:17:d3:e9:37:4d:76:d4:cb:4b:29:
+        59:24:ac:da:4a:a0:ea:63:de:5f:54:b1:fa:f3:d1:45:cb:c5:
+        64:b4:73:21
+
+GlobalSign Primary Class 2 CA
+=============================
+MD5 Fingerprint: A9:A9:42:59:7E:BE:5A:94:E4:2C:C6:8B:1C:2A:44:B6
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDrDCCApSgAwIBAgILAgAAAAAA1ni4jY0wDQYJKoZIhvcNAQEEBQAwVzELMAkG
+A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
+b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05OTAxMjgxMjAw
+MDBaFw0wOTAxMjgxMjAwMDBaMG0xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
+YWxTaWduIG52LXNhMRswGQYDVQQLExJQcmltYXJ5IENsYXNzIDIgQ0ExJjAkBgNV
+BAMTHUdsb2JhbFNpZ24gUHJpbWFyeSBDbGFzcyAyIENBMIIBIjANBgkqhkiG9w0B
+AQEFAAOCAQ8AMIIBCgKCAQEAkoz+7/RFjhdBbvzYvyFvqwadUsEsAJ0/joW4f0qP
+vaBjKspJJ65agvR04lWS/8LRqnmitvrVnYIET8ayxl5jpzq62O7rim+ftrsoQcAi
++05IGgaS17/Xz7nZvThPOw1EblVB/vwJ29i/844h8egStfYTpdPGTJMisAL/7h0M
+xKhrT3VoVujcKBJQ96gknS4kOfsJBd7lo2RJIdBofnEwkbFg4Dn0UPh6TZgAa3x5
+uk7OSuK6Nh23xTYVlZxkQupfxLr1QAW+4TpZvYSnGbjeTVNQzgfR0lHT7w2BbObn
+bctdfD98zOxPgycl/3BQ9oNZdYQGZlgs3omNAKZJ+aVDdwIDAQABo2MwYTAOBgNV
+HQ8BAf8EBAMCAAYwHQYDVR0OBBYEFHznsrEs3rGna+l2DOGj/U5sx7n2MB8GA1Ud
+IwQYMBaAFGB7ZhpFDZfKiVAvfQTNNKj//P1LMA8GA1UdEwEB/wQFMAMBAf8wDQYJ
+KoZIhvcNAQEEBQADggEBAGPdWc6KeaqYnU7FiWQ3foqTZy8Q6m8nw413bfJcVpQZ
+GmlgMEZdj/JtRTyONZd8L7hR4uiJvYjPJxwINFyIwWgk25GF5M/7+0ON6CUBG8QO
+9wBCSIYfJAhYWoyN8mtHLGiRsWlC/Q2NySbmkoamZG6Sxc4+PH1x4yOkq8fVqKnf
+gqc76IbVw08Y40TQ4NzzxWgu/qUvBYTIfkdCU2uHSv4y/14+cIy3qBXMF8L/RuzQ
+7C20bhIoqflA6evUZpdTqWlVwKmqsi7N0Wn0vvi7fGnuVKbbnvtapj7+mu+UUUt1
+7tjU4ZrxAlYTiQ6nQouWi4UMG4W+Jq6rppm8IvFz30I=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            02:00:00:00:00:00:d6:78:b8:8d:8d
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
+        Validity
+            Not Before: Jan 28 12:00:00 1999 GMT
+            Not After : Jan 28 12:00:00 2009 GMT
+        Subject: C=BE, O=GlobalSign nv-sa, OU=Primary Class 2 CA, CN=GlobalSign Primary Class 2 CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:92:8c:fe:ef:f4:45:8e:17:41:6e:fc:d8:bf:21:
+                    6f:ab:06:9d:52:c1:2c:00:9d:3f:8e:85:b8:7f:4a:
+                    8f:bd:a0:63:2a:ca:49:27:ae:5a:82:f4:74:e2:55:
+                    92:ff:c2:d1:aa:79:a2:b6:fa:d5:9d:82:04:4f:c6:
+                    b2:c6:5e:63:a7:3a:ba:d8:ee:eb:8a:6f:9f:b6:bb:
+                    28:41:c0:22:fb:4e:48:1a:06:92:d7:bf:d7:cf:b9:
+                    d9:bd:38:4f:3b:0d:44:6e:55:41:fe:fc:09:db:d8:
+                    bf:f3:8e:21:f1:e8:12:b5:f6:13:a5:d3:c6:4c:93:
+                    22:b0:02:ff:ee:1d:0c:c4:a8:6b:4f:75:68:56:e8:
+                    dc:28:12:50:f7:a8:24:9d:2e:24:39:fb:09:05:de:
+                    e5:a3:64:49:21:d0:68:7e:71:30:91:b1:60:e0:39:
+                    f4:50:f8:7a:4d:98:00:6b:7c:79:ba:4e:ce:4a:e2:
+                    ba:36:1d:b7:c5:36:15:95:9c:64:42:ea:5f:c4:ba:
+                    f5:40:05:be:e1:3a:59:bd:84:a7:19:b8:de:4d:53:
+                    50:ce:07:d1:d2:51:d3:ef:0d:81:6c:e6:e7:6d:cb:
+                    5d:7c:3f:7c:cc:ec:4f:83:27:25:ff:70:50:f6:83:
+                    59:75:84:06:66:58:2c:de:89:8d:00:a6:49:f9:a5:
+                    43:77
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Subject Key Identifier: 
+                7C:E7:B2:B1:2C:DE:B1:A7:6B:E9:76:0C:E1:A3:FD:4E:6C:C7:B9:F6
+            X509v3 Authority Key Identifier: 
+                keyid:60:7B:66:1A:45:0D:97:CA:89:50:2F:7D:04:CD:34:A8:FF:FC:FD:4B
+
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        63:dd:59:ce:8a:79:aa:98:9d:4e:c5:89:64:37:7e:8a:93:67:
+        2f:10:ea:6f:27:c3:8d:77:6d:f2:5c:56:94:19:1a:69:60:30:
+        46:5d:8f:f2:6d:45:3c:8e:35:97:7c:2f:b8:51:e2:e8:89:bd:
+        88:cf:27:1c:08:34:5c:88:c1:68:24:db:91:85:e4:cf:fb:fb:
+        43:8d:e8:25:01:1b:c4:0e:f7:00:42:48:86:1f:24:08:58:5a:
+        8c:8d:f2:6b:47:2c:68:91:b1:69:42:fd:0d:8d:c9:26:e6:92:
+        86:a6:64:6e:92:c5:ce:3e:3c:7d:71:e3:23:a4:ab:c7:d5:a8:
+        a9:df:82:a7:3b:e8:86:d5:c3:4f:18:e3:44:d0:e0:dc:f3:c5:
+        68:2e:fe:a5:2f:05:84:c8:7e:47:42:53:6b:87:4a:fe:32:ff:
+        5e:3e:70:8c:b7:a8:15:cc:17:c2:ff:46:ec:d0:ec:2d:b4:6e:
+        12:28:a9:f9:40:e9:eb:d4:66:97:53:a9:69:55:c0:a9:aa:b2:
+        2e:cd:d1:69:f4:be:f8:bb:7c:69:ee:54:a6:db:9e:fb:5a:a6:
+        3e:fe:9a:ef:94:51:4b:75:ee:d8:d4:e1:9a:f1:02:56:13:89:
+        0e:a7:42:8b:96:8b:85:0c:1b:85:be:26:ae:ab:a6:99:bc:22:
+        f1:73:df:42
+
+GlobalSign Primary Class 3 CA
+=============================
+MD5 Fingerprint: 98:12:A3:4B:95:A9:96:64:94:E7:50:8C:3E:E1:83:5A
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDrDCCApSgAwIBAgILAgAAAAAA1ni41sMwDQYJKoZIhvcNAQEEBQAwVzELMAkG
+A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
+b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05OTAxMjgxMjAw
+MDBaFw0wOTAxMjgxMjAwMDBaMG0xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
+YWxTaWduIG52LXNhMRswGQYDVQQLExJQcmltYXJ5IENsYXNzIDMgQ0ExJjAkBgNV
+BAMTHUdsb2JhbFNpZ24gUHJpbWFyeSBDbGFzcyAzIENBMIIBIjANBgkqhkiG9w0B
+AQEFAAOCAQ8AMIIBCgKCAQEAkV5WZdbAwAScv0fEXHt6MQH5WJaZ4xyEL9xWj631
+WYHVQ2ZdWpOMdcqp5xHBURAUYMks1HuvxneGq3onrm+VuQvKtkb7fhr0DRRt0slO
+sq7wVPZcQEw2SHToVIxlZhCnvSu3II0FSa14fdIkI1Dj8LR5mwE5/6870y3u4UmN
+jS88akFFL5vjPeES5JF1ns+gPjySgW+KLhjc4PKMjP2H2Qf0QJTJTk9D32dWb70D
+UHyZZ6S5PJFsAm6E1vxG98xvGD4X8O8LZBZX5qyG8UiqQ8HJJ3hzREXihX26/7Ph
++xsFpEs7mRIlAVAUaq9d6sgM7uTa7EuLXGgTldzDtTA61wIDAQABo2MwYTAOBgNV
+HQ8BAf8EBAMCAAYwHQYDVR0OBBYEFMw2zBe0RZEv7c87MEh3+7UUmb7jMB8GA1Ud
+IwQYMBaAFGB7ZhpFDZfKiVAvfQTNNKj//P1LMA8GA1UdEwEB/wQFMAMBAf8wDQYJ
+KoZIhvcNAQEEBQADggEBAFeyVMy9lRdkYIm2U5EMRZLDPahsw8yyGPV4QXTYfaMn
+r3cNWT6UHWn6idMMvRoB9D/o4Hcagiha5mLXt+M2yQ6feuPC08xZiQzvFovwNnci
+yqS2t8FCZwFAY8znOGSHWxSWZnstFO69SW3/d9DiTlvTgMJND8q4nYGXpzRux+Oc
+SOW0qkX19mVMSPISwtKTjMIVJPMrUv/jCK64btYsEs85yxIq56l7X5g9o+HMpmOJ
+XH0xdfnV1l3y0NQ9355xqA7c5CCXeOZ/U6QNUU+OOwOuow1aTcN55zVYcELJXqFe
+tNkio0RTNaTQz3OAxc+fVph2+RRMd4eCydx+XTTVNnU=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            02:00:00:00:00:00:d6:78:b8:d6:c3
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
+        Validity
+            Not Before: Jan 28 12:00:00 1999 GMT
+            Not After : Jan 28 12:00:00 2009 GMT
+        Subject: C=BE, O=GlobalSign nv-sa, OU=Primary Class 3 CA, CN=GlobalSign Primary Class 3 CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:91:5e:56:65:d6:c0:c0:04:9c:bf:47:c4:5c:7b:
+                    7a:31:01:f9:58:96:99:e3:1c:84:2f:dc:56:8f:ad:
+                    f5:59:81:d5:43:66:5d:5a:93:8c:75:ca:a9:e7:11:
+                    c1:51:10:14:60:c9:2c:d4:7b:af:c6:77:86:ab:7a:
+                    27:ae:6f:95:b9:0b:ca:b6:46:fb:7e:1a:f4:0d:14:
+                    6d:d2:c9:4e:b2:ae:f0:54:f6:5c:40:4c:36:48:74:
+                    e8:54:8c:65:66:10:a7:bd:2b:b7:20:8d:05:49:ad:
+                    78:7d:d2:24:23:50:e3:f0:b4:79:9b:01:39:ff:af:
+                    3b:d3:2d:ee:e1:49:8d:8d:2f:3c:6a:41:45:2f:9b:
+                    e3:3d:e1:12:e4:91:75:9e:cf:a0:3e:3c:92:81:6f:
+                    8a:2e:18:dc:e0:f2:8c:8c:fd:87:d9:07:f4:40:94:
+                    c9:4e:4f:43:df:67:56:6f:bd:03:50:7c:99:67:a4:
+                    b9:3c:91:6c:02:6e:84:d6:fc:46:f7:cc:6f:18:3e:
+                    17:f0:ef:0b:64:16:57:e6:ac:86:f1:48:aa:43:c1:
+                    c9:27:78:73:44:45:e2:85:7d:ba:ff:b3:e1:fb:1b:
+                    05:a4:4b:3b:99:12:25:01:50:14:6a:af:5d:ea:c8:
+                    0c:ee:e4:da:ec:4b:8b:5c:68:13:95:dc:c3:b5:30:
+                    3a:d7
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Subject Key Identifier: 
+                CC:36:CC:17:B4:45:91:2F:ED:CF:3B:30:48:77:FB:B5:14:99:BE:E3
+            X509v3 Authority Key Identifier: 
+                keyid:60:7B:66:1A:45:0D:97:CA:89:50:2F:7D:04:CD:34:A8:FF:FC:FD:4B
+
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        57:b2:54:cc:bd:95:17:64:60:89:b6:53:91:0c:45:92:c3:3d:
+        a8:6c:c3:cc:b2:18:f5:78:41:74:d8:7d:a3:27:af:77:0d:59:
+        3e:94:1d:69:fa:89:d3:0c:bd:1a:01:f4:3f:e8:e0:77:1a:82:
+        28:5a:e6:62:d7:b7:e3:36:c9:0e:9f:7a:e3:c2:d3:cc:59:89:
+        0c:ef:16:8b:f0:36:77:22:ca:a4:b6:b7:c1:42:67:01:40:63:
+        cc:e7:38:64:87:5b:14:96:66:7b:2d:14:ee:bd:49:6d:ff:77:
+        d0:e2:4e:5b:d3:80:c2:4d:0f:ca:b8:9d:81:97:a7:34:6e:c7:
+        e3:9c:48:e5:b4:aa:45:f5:f6:65:4c:48:f2:12:c2:d2:93:8c:
+        c2:15:24:f3:2b:52:ff:e3:08:ae:b8:6e:d6:2c:12:cf:39:cb:
+        12:2a:e7:a9:7b:5f:98:3d:a3:e1:cc:a6:63:89:5c:7d:31:75:
+        f9:d5:d6:5d:f2:d0:d4:3d:df:9e:71:a8:0e:dc:e4:20:97:78:
+        e6:7f:53:a4:0d:51:4f:8e:3b:03:ae:a3:0d:5a:4d:c3:79:e7:
+        35:58:70:42:c9:5e:a1:5e:b4:d9:22:a3:44:53:35:a4:d0:cf:
+        73:80:c5:cf:9f:56:98:76:f9:14:4c:77:87:82:c9:dc:7e:5d:
+        34:d5:36:75
+
+GlobalSign Root CA
+==================
+MD5 Fingerprint: AB:BF:EA:E3:6B:29:A6:CC:A6:78:35:99:EF:AD:2B:80
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDdTCCAl2gAwIBAgILAgAAAAAA1ni3lAUwDQYJKoZIhvcNAQEEBQAwVzELMAkG
+A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
+b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAw
+MDBaFw0xNDAxMjgxMjAwMDBaMFcxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
+YWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYDVQQDExJHbG9iYWxT
+aWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDaDuaZ
+jc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavp
+xy0Sy6scTHAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp
+1Wrjsok6Vjk4bwY8iGlbKk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdG
+snUOhugZitVtbNV4FpWi6cgKOOvyJBNPc1STE4U6G7weNLWLBYy5d4ux2x8gkasJ
+U26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrXgzT/LCrBbBlDSgeF59N8
+9iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIABjAdBgNVHQ4EFgQU
+YHtmGkUNl8qJUC99BM00qP/8/UswDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0B
+AQQFAAOCAQEArqqf/LfSyx9fOSkoGJ40yWxPbxrwZKJwSk8ThptgKJ7ogUmYfQq7
+5bCdPTbbjwVR/wkxKh/diXeeDy5slQTthsu0AD+EAk2AaioteAuubyuig0SDH81Q
+gkwkr733pbTIWg/050deSY43lv6aiAU62cDbKYfmGZZHpzqmjIs8d/5GY6dT2iHR
+rH5Jokvmw2dZL7OKDrssvamqQnw1wdh/1acxOk5jQzmvCLBhNIzTmKlDNPYPhyk7
+ncJWWJh3w/cbrPad+D6qp1RF8PX51TFl/mtYnHGzHtdS6jIX/EBgHcl5JLL2bP2o
+Zg6C3ZjL2sJETy6ge/L3ayx2EYRGinij4w==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            02:00:00:00:00:00:d6:78:b7:94:05
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
+        Validity
+            Not Before: Sep  1 12:00:00 1998 GMT
+            Not After : Jan 28 12:00:00 2014 GMT
+        Subject: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:da:0e:e6:99:8d:ce:a3:e3:4f:8a:7e:fb:f1:8b:
+                    83:25:6b:ea:48:1f:f1:2a:b0:b9:95:11:04:bd:f0:
+                    63:d1:e2:67:66:cf:1c:dd:cf:1b:48:2b:ee:8d:89:
+                    8e:9a:af:29:80:65:ab:e9:c7:2d:12:cb:ab:1c:4c:
+                    70:07:a1:3d:0a:30:cd:15:8d:4f:f8:dd:d4:8c:50:
+                    15:1c:ef:50:ee:c4:2e:f7:fc:e9:52:f2:91:7d:e0:
+                    6d:d5:35:30:8e:5e:43:73:f2:41:e9:d5:6a:e3:b2:
+                    89:3a:56:39:38:6f:06:3c:88:69:5b:2a:4d:c5:a7:
+                    54:b8:6c:89:cc:9b:f9:3c:ca:e5:fd:89:f5:12:3c:
+                    92:78:96:d6:dc:74:6e:93:44:61:d1:8d:c7:46:b2:
+                    75:0e:86:e8:19:8a:d5:6d:6c:d5:78:16:95:a2:e9:
+                    c8:0a:38:eb:f2:24:13:4f:73:54:93:13:85:3a:1b:
+                    bc:1e:34:b5:8b:05:8c:b9:77:8b:b1:db:1f:20:91:
+                    ab:09:53:6e:90:ce:7b:37:74:b9:70:47:91:22:51:
+                    63:16:79:ae:b1:ae:41:26:08:c8:19:2b:d1:46:aa:
+                    48:d6:64:2a:d7:83:34:ff:2c:2a:c1:6c:19:43:4a:
+                    07:85:e7:d3:7c:f6:21:68:ef:ea:f2:52:9f:7f:93:
+                    90:cf
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Subject Key Identifier: 
+                60:7B:66:1A:45:0D:97:CA:89:50:2F:7D:04:CD:34:A8:FF:FC:FD:4B
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        ae:aa:9f:fc:b7:d2:cb:1f:5f:39:29:28:18:9e:34:c9:6c:4f:
+        6f:1a:f0:64:a2:70:4a:4f:13:86:9b:60:28:9e:e8:81:49:98:
+        7d:0a:bb:e5:b0:9d:3d:36:db:8f:05:51:ff:09:31:2a:1f:dd:
+        89:77:9e:0f:2e:6c:95:04:ed:86:cb:b4:00:3f:84:02:4d:80:
+        6a:2a:2d:78:0b:ae:6f:2b:a2:83:44:83:1f:cd:50:82:4c:24:
+        af:bd:f7:a5:b4:c8:5a:0f:f4:e7:47:5e:49:8e:37:96:fe:9a:
+        88:05:3a:d9:c0:db:29:87:e6:19:96:47:a7:3a:a6:8c:8b:3c:
+        77:fe:46:63:a7:53:da:21:d1:ac:7e:49:a2:4b:e6:c3:67:59:
+        2f:b3:8a:0e:bb:2c:bd:a9:aa:42:7c:35:c1:d8:7f:d5:a7:31:
+        3a:4e:63:43:39:af:08:b0:61:34:8c:d3:98:a9:43:34:f6:0f:
+        87:29:3b:9d:c2:56:58:98:77:c3:f7:1b:ac:f6:9d:f8:3e:aa:
+        a7:54:45:f0:f5:f9:d5:31:65:fe:6b:58:9c:71:b3:1e:d7:52:
+        ea:32:17:fc:40:60:1d:c9:79:24:b2:f6:6c:fd:a8:66:0e:82:
+        dd:98:cb:da:c2:44:4f:2e:a0:7b:f2:f7:6b:2c:76:11:84:46:
+        8a:78:a3:e3
+
+National Retail Federation by DST
+=================================
+MD5 Fingerprint: AD:8E:0F:9E:01:6B:A0:C5:74:D5:0C:D3:68:65:4F:1E
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEAjCCAuoCEQDQHkCKAAACfAAAAAMAAAABMA0GCSqGSIb3DQEBBQUAMIG+MQsw
+CQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENp
+dHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjEjMCEGA1UE
+CxMaTmF0aW9uYWwgUmV0YWlsIEZlZGVyYXRpb24xGTAXBgNVBAMTEERTVCAoTlJG
+KSBSb290Q0ExITAfBgkqhkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTAeFw05
+ODEyMTExNjE0MTZaFw0wODEyMDgxNjE0MTZaMIG+MQswCQYDVQQGEwJ1czENMAsG
+A1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxJDAiBgNVBAoTG0Rp
+Z2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjEjMCEGA1UECxMaTmF0aW9uYWwgUmV0
+YWlsIEZlZGVyYXRpb24xGTAXBgNVBAMTEERTVCAoTlJGKSBSb290Q0ExITAfBgkq
+hkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTCCASIwDQYJKoZIhvcNAQEBBQAD
+ggEPADCCAQoCggEBANmsm3f6UNPM3LlArLlyagCHI/wPliHQJq/k4rVf+tOmfSEw
+LswXgo+YdPxnpKbfiJeiQin1p9sRk/teIzDCqrwi50Eb5e0l3sg/295XRXhARoOy
+1Ro93w9FbdVjAnXYL8Zuq5WRdDcNy00JXNHUWzra3Q7Ia5nY1TnM34VVxJJTAqPh
+94DJcKPa3DPEf6JHCBw1lh+hAxwwg/TEzP+Yw7BGRKLAv63b0oH2TJgsp14k84bK
+Y9W6ffCawErQG1ju7Klnz2kCbCLAYCws0cgg6sgt+92cu8tRTNznVwQ7VJsRpTJ0
+7HQB85AVWy98LJNluWZntIGINeWekRh/gahByMsCAwEAATANBgkqhkiG9w0BAQUF
+AAOCAQEAhF4LO+ygjRyb0DwdcWnkGn9kvoFlYcWMatd8AHTgemJV7SR84GHj8t0U
+5hFugw7h6qmegK2aIL/gV37V0LWEYy3ZGOS9GzUsXq5hdqpnhTs44TGBHzF/5tf4
+W9K7Y3mGxIzF3gqu19H8AXT/trYNYoFnHLsm+CSA4Fxe2KSKOo99y/+So/18qTJp
+B1hYYUKZUgOxOD3GcW9s8uh9BqrBfFPLGi2IT8mpp6xpb/ekH9h0gfVKv7FVt9N3
+OKdvwkrI4nOJ01dy4UMvcjz2H7f4BEpuwemUF+SXF/QOE4ZvjavoXy20/2zWorQf
+7LmUaqoSTxrd9Xe1JYzyigrx/FJbWA==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            d0:1e:40:8a:00:00:02:7c:00:00:00:03:00:00:00:01
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=National Retail Federation, CN=DST (NRF) RootCA/Email=ca@digsigtrust.com
+        Validity
+            Not Before: Dec 11 16:14:16 1998 GMT
+            Not After : Dec  8 16:14:16 2008 GMT
+        Subject: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=National Retail Federation, CN=DST (NRF) RootCA/Email=ca@digsigtrust.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:d9:ac:9b:77:fa:50:d3:cc:dc:b9:40:ac:b9:72:
+                    6a:00:87:23:fc:0f:96:21:d0:26:af:e4:e2:b5:5f:
+                    fa:d3:a6:7d:21:30:2e:cc:17:82:8f:98:74:fc:67:
+                    a4:a6:df:88:97:a2:42:29:f5:a7:db:11:93:fb:5e:
+                    23:30:c2:aa:bc:22:e7:41:1b:e5:ed:25:de:c8:3f:
+                    db:de:57:45:78:40:46:83:b2:d5:1a:3d:df:0f:45:
+                    6d:d5:63:02:75:d8:2f:c6:6e:ab:95:91:74:37:0d:
+                    cb:4d:09:5c:d1:d4:5b:3a:da:dd:0e:c8:6b:99:d8:
+                    d5:39:cc:df:85:55:c4:92:53:02:a3:e1:f7:80:c9:
+                    70:a3:da:dc:33:c4:7f:a2:47:08:1c:35:96:1f:a1:
+                    03:1c:30:83:f4:c4:cc:ff:98:c3:b0:46:44:a2:c0:
+                    bf:ad:db:d2:81:f6:4c:98:2c:a7:5e:24:f3:86:ca:
+                    63:d5:ba:7d:f0:9a:c0:4a:d0:1b:58:ee:ec:a9:67:
+                    cf:69:02:6c:22:c0:60:2c:2c:d1:c8:20:ea:c8:2d:
+                    fb:dd:9c:bb:cb:51:4c:dc:e7:57:04:3b:54:9b:11:
+                    a5:32:74:ec:74:01:f3:90:15:5b:2f:7c:2c:93:65:
+                    b9:66:67:b4:81:88:35:e5:9e:91:18:7f:81:a8:41:
+                    c8:cb
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        84:5e:0b:3b:ec:a0:8d:1c:9b:d0:3c:1d:71:69:e4:1a:7f:64:
+        be:81:65:61:c5:8c:6a:d7:7c:00:74:e0:7a:62:55:ed:24:7c:
+        e0:61:e3:f2:dd:14:e6:11:6e:83:0e:e1:ea:a9:9e:80:ad:9a:
+        20:bf:e0:57:7e:d5:d0:b5:84:63:2d:d9:18:e4:bd:1b:35:2c:
+        5e:ae:61:76:aa:67:85:3b:38:e1:31:81:1f:31:7f:e6:d7:f8:
+        5b:d2:bb:63:79:86:c4:8c:c5:de:0a:ae:d7:d1:fc:01:74:ff:
+        b6:b6:0d:62:81:67:1c:bb:26:f8:24:80:e0:5c:5e:d8:a4:8a:
+        3a:8f:7d:cb:ff:92:a3:fd:7c:a9:32:69:07:58:58:61:42:99:
+        52:03:b1:38:3d:c6:71:6f:6c:f2:e8:7d:06:aa:c1:7c:53:cb:
+        1a:2d:88:4f:c9:a9:a7:ac:69:6f:f7:a4:1f:d8:74:81:f5:4a:
+        bf:b1:55:b7:d3:77:38:a7:6f:c2:4a:c8:e2:73:89:d3:57:72:
+        e1:43:2f:72:3c:f6:1f:b7:f8:04:4a:6e:c1:e9:94:17:e4:97:
+        17:f4:0e:13:86:6f:8d:ab:e8:5f:2d:b4:ff:6c:d6:a2:b4:1f:
+        ec:b9:94:6a:aa:12:4f:1a:dd:f5:77:b5:25:8c:f2:8a:0a:f1:
+        fc:52:5b:58
+
+TC TrustCenter, Germany, Class 1 CA
+===================================
+MD5 Fingerprint: 64:3F:F8:3E:52:14:4A:59:BA:93:56:04:0B:23:02:D1
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIENTCCA56gAwIBAgIBAjANBgkqhkiG9w0BAQQFADCBvDELMAkGA1UEBhMCREUx
+EDAOBgNVBAgTB0hhbWJ1cmcxEDAOBgNVBAcTB0hhbWJ1cmcxOjA4BgNVBAoTMVRD
+IFRydXN0Q2VudGVyIGZvciBTZWN1cml0eSBpbiBEYXRhIE5ldHdvcmtzIEdtYkgx
+IjAgBgNVBAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDEgQ0ExKTAnBgkqhkiG9w0B
+CQEWGmNlcnRpZmljYXRlQHRydXN0Y2VudGVyLmRlMB4XDTk4MDMwOTEzNTYzM1oX
+DTA1MTIzMTEzNTYzM1owgbwxCzAJBgNVBAYTAkRFMRAwDgYDVQQIEwdIYW1idXJn
+MRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFUQyBUcnVzdENlbnRlciBmb3Ig
+U2VjdXJpdHkgaW4gRGF0YSBOZXR3b3JrcyBHbWJIMSIwIAYDVQQLExlUQyBUcnVz
+dENlbnRlciBDbGFzcyAxIENBMSkwJwYJKoZIhvcNAQkBFhpjZXJ0aWZpY2F0ZUB0
+cnVzdGNlbnRlci5kZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAsCnrtHaz
+rte2W7Re573jsZxJBFdboavZfxMb/bphq9jncd8tAJRdUUh9I+91YoSQPAofWRF0
+L46Apf0wAj0pUs1yGkkhnLzLUo5IoWOWyBCFMGlXdEXAWobG1T3gaFd9MWokjUWX
+PjF+aGYybiRt7DI2yUHK8DFEyKNhyhugNh8CAwEAAaOCAUMwggE/MEAGCWCGSAGG
++EIBAwQzFjFodHRwczovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL2NoZWNr
+LXJldi5jZ2k/MEAGCWCGSAGG+EIBBAQzFjFodHRwczovL3d3dy50cnVzdGNlbnRl
+ci5kZS9jZ2ktYmluL2NoZWNrLXJldi5jZ2k/MDwGCWCGSAGG+EIBBwQvFi1odHRw
+czovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL1JlbmV3LmNnaT8wPgYJYIZI
+AYb4QgEIBDEWL2h0dHA6Ly93d3cudHJ1c3RjZW50ZXIuZGUvZ3VpZGVsaW5lcy9p
+bmRleC5odG1sMCgGCWCGSAGG+EIBDQQbFhlUQyBUcnVzdENlbnRlciBDbGFzcyAx
+IENBMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQQFAAOBgQAFQlImpAwn
+AUSsXCUowkRCVAi5HcU+bFlmxLNOUKf4+JZ1oZZ16BY4oM1dbvp5pxt7HR7DALlm
+vlrWYg/n8nu470zgwD9Zrjm3hAmeq/GpLmtp4q3M8up4CQUgOEJxGH7Hspfm1QIF
+BlajX/GqwsRP/vfvFg+d7KqFzz0pJPEEzQ==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 2 (0x2)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 1 CA/Email=certificate@trustcenter.de
+        Validity
+            Not Before: Mar  9 13:56:33 1998 GMT
+            Not After : Dec 31 13:56:33 2005 GMT
+        Subject: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 1 CA/Email=certificate@trustcenter.de
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b0:29:eb:b4:76:b3:ae:d7:b6:5b:b4:5e:e7:bd:
+                    e3:b1:9c:49:04:57:5b:a1:ab:d9:7f:13:1b:fd:ba:
+                    61:ab:d8:e7:71:df:2d:00:94:5d:51:48:7d:23:ef:
+                    75:62:84:90:3c:0a:1f:59:11:74:2f:8e:80:a5:fd:
+                    30:02:3d:29:52:cd:72:1a:49:21:9c:bc:cb:52:8e:
+                    48:a1:63:96:c8:10:85:30:69:57:74:45:c0:5a:86:
+                    c6:d5:3d:e0:68:57:7d:31:6a:24:8d:45:97:3e:31:
+                    7e:68:66:32:6e:24:6d:ec:32:36:c9:41:ca:f0:31:
+                    44:c8:a3:61:ca:1b:a0:36:1f
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape CA Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape Renewal Url: 
+                https://www.trustcenter.de/cgi-bin/Renew.cgi?
+            Netscape CA Policy Url: 
+                http://www.trustcenter.de/guidelines/index.html
+            Netscape Comment: 
+                TC TrustCenter Class 1 CA
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+    Signature Algorithm: md5WithRSAEncryption
+        05:42:52:26:a4:0c:27:01:44:ac:5c:25:28:c2:44:42:54:08:
+        b9:1d:c5:3e:6c:59:66:c4:b3:4e:50:a7:f8:f8:96:75:a1:96:
+        75:e8:16:38:a0:cd:5d:6e:fa:79:a7:1b:7b:1d:1e:c3:00:b9:
+        66:be:5a:d6:62:0f:e7:f2:7b:b8:ef:4c:e0:c0:3f:59:ae:39:
+        b7:84:09:9e:ab:f1:a9:2e:6b:69:e2:ad:cc:f2:ea:78:09:05:
+        20:38:42:71:18:7e:c7:b2:97:e6:d5:02:05:06:56:a3:5f:f1:
+        aa:c2:c4:4f:fe:f7:ef:16:0f:9d:ec:aa:85:cf:3d:29:24:f1:
+        04:cd
+
+TC TrustCenter, Germany, Class 2 CA
+===================================
+MD5 Fingerprint: E1:E9:96:53:77:E1:F0:38:A0:02:AB:94:C6:95:7B:FC
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIENTCCA56gAwIBAgIBAzANBgkqhkiG9w0BAQQFADCBvDELMAkGA1UEBhMCREUx
+EDAOBgNVBAgTB0hhbWJ1cmcxEDAOBgNVBAcTB0hhbWJ1cmcxOjA4BgNVBAoTMVRD
+IFRydXN0Q2VudGVyIGZvciBTZWN1cml0eSBpbiBEYXRhIE5ldHdvcmtzIEdtYkgx
+IjAgBgNVBAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDIgQ0ExKTAnBgkqhkiG9w0B
+CQEWGmNlcnRpZmljYXRlQHRydXN0Y2VudGVyLmRlMB4XDTk4MDMwOTEzNTc0NFoX
+DTA1MTIzMTEzNTc0NFowgbwxCzAJBgNVBAYTAkRFMRAwDgYDVQQIEwdIYW1idXJn
+MRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFUQyBUcnVzdENlbnRlciBmb3Ig
+U2VjdXJpdHkgaW4gRGF0YSBOZXR3b3JrcyBHbWJIMSIwIAYDVQQLExlUQyBUcnVz
+dENlbnRlciBDbGFzcyAyIENBMSkwJwYJKoZIhvcNAQkBFhpjZXJ0aWZpY2F0ZUB0
+cnVzdGNlbnRlci5kZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA2jjo7TIA
+KXGDAQ2/jAHc2satOaSpii/Vi1xoX1DGYvVmvcqRIuyqHVHXPbNRsoNOXctJsPBM
+VeVrLceFCzAckk6C1MoC7fdvvtzg4xS4BVPymvRWi1qehZPRtIJWrk27qEtXFrz+
++Fie+CmNsHvNeMlPrItnDPGc+/xXm1dcTw0CAwEAAaOCAUMwggE/MEAGCWCGSAGG
++EIBAwQzFjFodHRwczovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL2NoZWNr
+LXJldi5jZ2k/MEAGCWCGSAGG+EIBBAQzFjFodHRwczovL3d3dy50cnVzdGNlbnRl
+ci5kZS9jZ2ktYmluL2NoZWNrLXJldi5jZ2k/MDwGCWCGSAGG+EIBBwQvFi1odHRw
+czovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL1JlbmV3LmNnaT8wPgYJYIZI
+AYb4QgEIBDEWL2h0dHA6Ly93d3cudHJ1c3RjZW50ZXIuZGUvZ3VpZGVsaW5lcy9p
+bmRleC5odG1sMCgGCWCGSAGG+EIBDQQbFhlUQyBUcnVzdENlbnRlciBDbGFzcyAy
+IENBMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQQFAAOBgQCJG/Tv6Tji
+bAz2zW9JzinM+6YP+Y0+lUbW/EcyibLIBmF60ucNEwKUC9mLVkf0u+fFX3v0Y0yu
+fDTqDaKpsyyF8+P+J1QQkrCPksGYQhhwSNtOLOsNJGjk0fe+Cakph7vo2tw+o4hC
+MfXR43+u2I4AWnSYsE/G/yN7XHMAeMnbTg==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 3 (0x3)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 2 CA/Email=certificate@trustcenter.de
+        Validity
+            Not Before: Mar  9 13:57:44 1998 GMT
+            Not After : Dec 31 13:57:44 2005 GMT
+        Subject: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 2 CA/Email=certificate@trustcenter.de
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:da:38:e8:ed:32:00:29:71:83:01:0d:bf:8c:01:
+                    dc:da:c6:ad:39:a4:a9:8a:2f:d5:8b:5c:68:5f:50:
+                    c6:62:f5:66:bd:ca:91:22:ec:aa:1d:51:d7:3d:b3:
+                    51:b2:83:4e:5d:cb:49:b0:f0:4c:55:e5:6b:2d:c7:
+                    85:0b:30:1c:92:4e:82:d4:ca:02:ed:f7:6f:be:dc:
+                    e0:e3:14:b8:05:53:f2:9a:f4:56:8b:5a:9e:85:93:
+                    d1:b4:82:56:ae:4d:bb:a8:4b:57:16:bc:fe:f8:58:
+                    9e:f8:29:8d:b0:7b:cd:78:c9:4f:ac:8b:67:0c:f1:
+                    9c:fb:fc:57:9b:57:5c:4f:0d
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape CA Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape Renewal Url: 
+                https://www.trustcenter.de/cgi-bin/Renew.cgi?
+            Netscape CA Policy Url: 
+                http://www.trustcenter.de/guidelines/index.html
+            Netscape Comment: 
+                TC TrustCenter Class 2 CA
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+    Signature Algorithm: md5WithRSAEncryption
+        89:1b:f4:ef:e9:38:e2:6c:0c:f6:cd:6f:49:ce:29:cc:fb:a6:
+        0f:f9:8d:3e:95:46:d6:fc:47:32:89:b2:c8:06:61:7a:d2:e7:
+        0d:13:02:94:0b:d9:8b:56:47:f4:bb:e7:c5:5f:7b:f4:63:4c:
+        ae:7c:34:ea:0d:a2:a9:b3:2c:85:f3:e3:fe:27:54:10:92:b0:
+        8f:92:c1:98:42:18:70:48:db:4e:2c:eb:0d:24:68:e4:d1:f7:
+        be:09:a9:29:87:bb:e8:da:dc:3e:a3:88:42:31:f5:d1:e3:7f:
+        ae:d8:8e:00:5a:74:98:b0:4f:c6:ff:23:7b:5c:73:00:78:c9:
+        db:4e
+
+TC TrustCenter, Germany, Class 3 CA
+===================================
+MD5 Fingerprint: 62:AB:B6:15:4A:B4:B0:16:77:FF:AE:CF:16:16:2B:8C
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIENTCCA56gAwIBAgIBBDANBgkqhkiG9w0BAQQFADCBvDELMAkGA1UEBhMCREUx
+EDAOBgNVBAgTB0hhbWJ1cmcxEDAOBgNVBAcTB0hhbWJ1cmcxOjA4BgNVBAoTMVRD
+IFRydXN0Q2VudGVyIGZvciBTZWN1cml0eSBpbiBEYXRhIE5ldHdvcmtzIEdtYkgx
+IjAgBgNVBAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDMgQ0ExKTAnBgkqhkiG9w0B
+CQEWGmNlcnRpZmljYXRlQHRydXN0Y2VudGVyLmRlMB4XDTk4MDMwOTEzNTg0OVoX
+DTA1MTIzMTEzNTg0OVowgbwxCzAJBgNVBAYTAkRFMRAwDgYDVQQIEwdIYW1idXJn
+MRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFUQyBUcnVzdENlbnRlciBmb3Ig
+U2VjdXJpdHkgaW4gRGF0YSBOZXR3b3JrcyBHbWJIMSIwIAYDVQQLExlUQyBUcnVz
+dENlbnRlciBDbGFzcyAzIENBMSkwJwYJKoZIhvcNAQkBFhpjZXJ0aWZpY2F0ZUB0
+cnVzdGNlbnRlci5kZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAtrTBNQUu
+DY3soEBqHA4nplCSa1AbB94u53bM4Nr8hKhejGNqK03ZTgJ2EcEL8o15ygC28bAO
+1/ukFz2vq2l6lie/rzOhmipZqsS1NwjyEqUxtkP1MpZxKCirjSiG37vu4wx9MNbD
+UquPXSeca8Cj5wVrV0lEs27qZM/SjnpQd3cCAwEAAaOCAUMwggE/MEAGCWCGSAGG
++EIBAwQzFjFodHRwczovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL2NoZWNr
+LXJldi5jZ2k/MEAGCWCGSAGG+EIBBAQzFjFodHRwczovL3d3dy50cnVzdGNlbnRl
+ci5kZS9jZ2ktYmluL2NoZWNrLXJldi5jZ2k/MDwGCWCGSAGG+EIBBwQvFi1odHRw
+czovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL1JlbmV3LmNnaT8wPgYJYIZI
+AYb4QgEIBDEWL2h0dHA6Ly93d3cudHJ1c3RjZW50ZXIuZGUvZ3VpZGVsaW5lcy9p
+bmRleC5odG1sMCgGCWCGSAGG+EIBDQQbFhlUQyBUcnVzdENlbnRlciBDbGFzcyAz
+IENBMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQQFAAOBgQCEhlBieaAn
+4SW6CbE0DxMJ7S3Ko+aV+TCszRelzj2Xnex8jyZ/wGHKIveR3Tw2WZqbdfe85Mjt
+7AK2IqfzLPHIknhttu7FKOyAIE+5awjnL6eGHn2xCJ9UuQA3PKDYGsiWHPQyFJw5
+lbfu8ENJwl7oy3lvU7/7SYos2EvZVfIScA==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 4 (0x4)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 3 CA/Email=certificate@trustcenter.de
+        Validity
+            Not Before: Mar  9 13:58:49 1998 GMT
+            Not After : Dec 31 13:58:49 2005 GMT
+        Subject: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 3 CA/Email=certificate@trustcenter.de
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b6:b4:c1:35:05:2e:0d:8d:ec:a0:40:6a:1c:0e:
+                    27:a6:50:92:6b:50:1b:07:de:2e:e7:76:cc:e0:da:
+                    fc:84:a8:5e:8c:63:6a:2b:4d:d9:4e:02:76:11:c1:
+                    0b:f2:8d:79:ca:00:b6:f1:b0:0e:d7:fb:a4:17:3d:
+                    af:ab:69:7a:96:27:bf:af:33:a1:9a:2a:59:aa:c4:
+                    b5:37:08:f2:12:a5:31:b6:43:f5:32:96:71:28:28:
+                    ab:8d:28:86:df:bb:ee:e3:0c:7d:30:d6:c3:52:ab:
+                    8f:5d:27:9c:6b:c0:a3:e7:05:6b:57:49:44:b3:6e:
+                    ea:64:cf:d2:8e:7a:50:77:77
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape CA Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape Renewal Url: 
+                https://www.trustcenter.de/cgi-bin/Renew.cgi?
+            Netscape CA Policy Url: 
+                http://www.trustcenter.de/guidelines/index.html
+            Netscape Comment: 
+                TC TrustCenter Class 3 CA
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+    Signature Algorithm: md5WithRSAEncryption
+        84:86:50:62:79:a0:27:e1:25:ba:09:b1:34:0f:13:09:ed:2d:
+        ca:a3:e6:95:f9:30:ac:cd:17:a5:ce:3d:97:9d:ec:7c:8f:26:
+        7f:c0:61:ca:22:f7:91:dd:3c:36:59:9a:9b:75:f7:bc:e4:c8:
+        ed:ec:02:b6:22:a7:f3:2c:f1:c8:92:78:6d:b6:ee:c5:28:ec:
+        80:20:4f:b9:6b:08:e7:2f:a7:86:1e:7d:b1:08:9f:54:b9:00:
+        37:3c:a0:d8:1a:c8:96:1c:f4:32:14:9c:39:95:b7:ee:f0:43:
+        49:c2:5e:e8:cb:79:6f:53:bf:fb:49:8a:2c:d8:4b:d9:55:f2:
+        12:70
+
+TC TrustCenter, Germany, Class 4 CA
+===================================
+MD5 Fingerprint: BF:AF:EC:C4:DA:F9:30:F9:CA:35:CA:25:E4:3F:8D:89
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIENTCCA56gAwIBAgIBBTANBgkqhkiG9w0BAQQFADCBvDELMAkGA1UEBhMCREUx
+EDAOBgNVBAgTB0hhbWJ1cmcxEDAOBgNVBAcTB0hhbWJ1cmcxOjA4BgNVBAoTMVRD
+IFRydXN0Q2VudGVyIGZvciBTZWN1cml0eSBpbiBEYXRhIE5ldHdvcmtzIEdtYkgx
+IjAgBgNVBAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDQgQ0ExKTAnBgkqhkiG9w0B
+CQEWGmNlcnRpZmljYXRlQHRydXN0Y2VudGVyLmRlMB4XDTk4MDMwOTE0MDAyMFoX
+DTA1MTIzMTE0MDAyMFowgbwxCzAJBgNVBAYTAkRFMRAwDgYDVQQIEwdIYW1idXJn
+MRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFUQyBUcnVzdENlbnRlciBmb3Ig
+U2VjdXJpdHkgaW4gRGF0YSBOZXR3b3JrcyBHbWJIMSIwIAYDVQQLExlUQyBUcnVz
+dENlbnRlciBDbGFzcyA0IENBMSkwJwYJKoZIhvcNAQkBFhpjZXJ0aWZpY2F0ZUB0
+cnVzdGNlbnRlci5kZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAvy9j1jZ7
+sg3TVfVkbOYlXca0yBS6JTiD61ZipVWpZaP0I5nCS7nQzVRnpqOgo6kzK3bkva13
+su1cEnTDxbYPUppyk0OQYmYVD0Wl3eDduG9AblfBeXKjYKq6dh0SiVNa/AK+4QkT
+xUov3D2LGa3XiyRF+0z0zVw1HSlMUfPybFUCAwEAAaOCAUMwggE/MEAGCWCGSAGG
++EIBAwQzFjFodHRwczovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL2NoZWNr
+LXJldi5jZ2k/MEAGCWCGSAGG+EIBBAQzFjFodHRwczovL3d3dy50cnVzdGNlbnRl
+ci5kZS9jZ2ktYmluL2NoZWNrLXJldi5jZ2k/MDwGCWCGSAGG+EIBBwQvFi1odHRw
+czovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL1JlbmV3LmNnaT8wPgYJYIZI
+AYb4QgEIBDEWL2h0dHA6Ly93d3cudHJ1c3RjZW50ZXIuZGUvZ3VpZGVsaW5lcy9p
+bmRleC5odG1sMCgGCWCGSAGG+EIBDQQbFhlUQyBUcnVzdENlbnRlciBDbGFzcyA0
+IENBMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQQFAAOBgQCUaBQbJZ4p
+mbGyI9JEs5Wf0Z5VBN3jL4IzVZZ3GZ0rnmUc+orjx48l/LEeVUYPj/9PNy+kdlmm
+ZOvVFnC93ZUzDKQNJOtkULRDEfJDvg1xmCLsAa/s98dcccN1kVgZ6N2g9LTxvBBK
+85O0Bkm7H2bSvXRH4Zr569erbR+64R0s2g==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 5 (0x5)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 4 CA/Email=certificate@trustcenter.de
+        Validity
+            Not Before: Mar  9 14:00:20 1998 GMT
+            Not After : Dec 31 14:00:20 2005 GMT
+        Subject: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 4 CA/Email=certificate@trustcenter.de
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:bf:2f:63:d6:36:7b:b2:0d:d3:55:f5:64:6c:e6:
+                    25:5d:c6:b4:c8:14:ba:25:38:83:eb:56:62:a5:55:
+                    a9:65:a3:f4:23:99:c2:4b:b9:d0:cd:54:67:a6:a3:
+                    a0:a3:a9:33:2b:76:e4:bd:ad:77:b2:ed:5c:12:74:
+                    c3:c5:b6:0f:52:9a:72:93:43:90:62:66:15:0f:45:
+                    a5:dd:e0:dd:b8:6f:40:6e:57:c1:79:72:a3:60:aa:
+                    ba:76:1d:12:89:53:5a:fc:02:be:e1:09:13:c5:4a:
+                    2f:dc:3d:8b:19:ad:d7:8b:24:45:fb:4c:f4:cd:5c:
+                    35:1d:29:4c:51:f3:f2:6c:55
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape CA Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape Renewal Url: 
+                https://www.trustcenter.de/cgi-bin/Renew.cgi?
+            Netscape CA Policy Url: 
+                http://www.trustcenter.de/guidelines/index.html
+            Netscape Comment: 
+                TC TrustCenter Class 4 CA
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+    Signature Algorithm: md5WithRSAEncryption
+        94:68:14:1b:25:9e:29:99:b1:b2:23:d2:44:b3:95:9f:d1:9e:
+        55:04:dd:e3:2f:82:33:55:96:77:19:9d:2b:9e:65:1c:fa:8a:
+        e3:c7:8f:25:fc:b1:1e:55:46:0f:8f:ff:4f:37:2f:a4:76:59:
+        a6:64:eb:d5:16:70:bd:dd:95:33:0c:a4:0d:24:eb:64:50:b4:
+        43:11:f2:43:be:0d:71:98:22:ec:01:af:ec:f7:c7:5c:71:c3:
+        75:91:58:19:e8:dd:a0:f4:b4:f1:bc:10:4a:f3:93:b4:06:49:
+        bb:1f:66:d2:bd:74:47:e1:9a:f9:eb:d7:ab:6d:1f:ba:e1:1d:
+        2c:da
+
+Thawte Personal Basic CA
+========================
+MD5 Fingerprint: E6:0B:D2:C9:CA:2D:88:DB:1A:71:0E:4B:78:EB:02:41
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDITCCAoqgAwIBAgIBADANBgkqhkiG9w0BAQQFADCByzELMAkGA1UEBhMCWkEx
+FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYD
+VQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT
+ZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFBlcnNvbmFsIEJhc2lj
+IENBMSgwJgYJKoZIhvcNAQkBFhlwZXJzb25hbC1iYXNpY0B0aGF3dGUuY29tMB4X
+DTk2MDEwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgcsxCzAJBgNVBAYTAlpBMRUw
+EwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEaMBgGA1UE
+ChMRVGhhd3RlIENvbnN1bHRpbmcxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2Vy
+dmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQZXJzb25hbCBCYXNpYyBD
+QTEoMCYGCSqGSIb3DQEJARYZcGVyc29uYWwtYmFzaWNAdGhhd3RlLmNvbTCBnzAN
+BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAvLyTU23AUE+CFeZIlDWmWr5vQvoPR+53
+dXLdjUmbllegeNTKP1GzaQuRdhciB5dqxFGTS+CN7zeVoQxN2jSQHReJl+A1OFdK
+wPQIcOk8RHtQfmGakOMj04gRRif1CwcOu93RfyAKiLlWCy4cgNrx454p7xS9CkT7
+G1sY0b8jkyECAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQQF
+AAOBgQAt4plrsD16iddZopQBHyvdEktTwq1/qqcAXJFAVyVKOKqEcLnZgA+le1z7
+c8a914phXAPjLSeoF+CEhULcXpvGt7Jtu3Sv5D/Lp7ew4F2+eIMllNLbgQ95B21P
+9DkVWlIBe94y1k049hJcBlDfBVu9FEuh3ym6O0GN92NWod8isQ==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 0 (0x0)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Basic CA/Email=personal-basic@thawte.com
+        Validity
+            Not Before: Jan  1 00:00:00 1996 GMT
+            Not After : Dec 31 23:59:59 2020 GMT
+        Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Basic CA/Email=personal-basic@thawte.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:bc:bc:93:53:6d:c0:50:4f:82:15:e6:48:94:35:
+                    a6:5a:be:6f:42:fa:0f:47:ee:77:75:72:dd:8d:49:
+                    9b:96:57:a0:78:d4:ca:3f:51:b3:69:0b:91:76:17:
+                    22:07:97:6a:c4:51:93:4b:e0:8d:ef:37:95:a1:0c:
+                    4d:da:34:90:1d:17:89:97:e0:35:38:57:4a:c0:f4:
+                    08:70:e9:3c:44:7b:50:7e:61:9a:90:e3:23:d3:88:
+                    11:46:27:f5:0b:07:0e:bb:dd:d1:7f:20:0a:88:b9:
+                    56:0b:2e:1c:80:da:f1:e3:9e:29:ef:14:bd:0a:44:
+                    fb:1b:5b:18:d1:bf:23:93:21
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        2d:e2:99:6b:b0:3d:7a:89:d7:59:a2:94:01:1f:2b:dd:12:4b:
+        53:c2:ad:7f:aa:a7:00:5c:91:40:57:25:4a:38:aa:84:70:b9:
+        d9:80:0f:a5:7b:5c:fb:73:c6:bd:d7:8a:61:5c:03:e3:2d:27:
+        a8:17:e0:84:85:42:dc:5e:9b:c6:b7:b2:6d:bb:74:af:e4:3f:
+        cb:a7:b7:b0:e0:5d:be:78:83:25:94:d2:db:81:0f:79:07:6d:
+        4f:f4:39:15:5a:52:01:7b:de:32:d6:4d:38:f6:12:5c:06:50:
+        df:05:5b:bd:14:4b:a1:df:29:ba:3b:41:8d:f7:63:56:a1:df:
+        22:b1
+
+Thawte Personal Freemail CA
+===========================
+MD5 Fingerprint: 1E:74:C3:86:3C:0C:35:C5:3E:C2:7F:EF:3C:AA:3C:D9
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDLTCCApagAwIBAgIBADANBgkqhkiG9w0BAQQFADCB0TELMAkGA1UEBhMCWkEx
+FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYD
+VQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT
+ZXJ2aWNlcyBEaXZpc2lvbjEkMCIGA1UEAxMbVGhhd3RlIFBlcnNvbmFsIEZyZWVt
+YWlsIENBMSswKQYJKoZIhvcNAQkBFhxwZXJzb25hbC1mcmVlbWFpbEB0aGF3dGUu
+Y29tMB4XDTk2MDEwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgdExCzAJBgNVBAYT
+AlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEa
+MBgGA1UEChMRVGhhd3RlIENvbnN1bHRpbmcxKDAmBgNVBAsTH0NlcnRpZmljYXRp
+b24gU2VydmljZXMgRGl2aXNpb24xJDAiBgNVBAMTG1RoYXd0ZSBQZXJzb25hbCBG
+cmVlbWFpbCBDQTErMCkGCSqGSIb3DQEJARYccGVyc29uYWwtZnJlZW1haWxAdGhh
+d3RlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1GnX1LCUZFtx6UfY
+DFG26nKRsIRefS0Nj3sS34UldSh0OkIsYyeflXtL734Zhx2G6qPduc6WZBrCFG5E
+rHzmj+hND3EfQDimAKOHePb5lIZererAXnbr2RSjXW56fAylS1V/Bhkpf56aJtVq
+uzgkCGqYx7Hao5iR/Xnb5VrEHLkCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zAN
+BgkqhkiG9w0BAQQFAAOBgQDH7JJ+Tvj1lqVnYiqk8E0RYNBvjWBYYawmu1I1XAjP
+MPuoSpaKH2JCI4wXD/S6ZJwXrEcp352YXtJsYHFcoqzceePnbgBHH7UNKOgCneSa
+/RP0ptl8sfjcXyMmCZGAc9AUG95DqYMl8uacLxXK/qarigd1iwzdUYRr5PjRznei
+gQ==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 0 (0x0)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Freemail CA/Email=personal-freemail@thawte.com
+        Validity
+            Not Before: Jan  1 00:00:00 1996 GMT
+            Not After : Dec 31 23:59:59 2020 GMT
+        Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Freemail CA/Email=personal-freemail@thawte.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d4:69:d7:d4:b0:94:64:5b:71:e9:47:d8:0c:51:
+                    b6:ea:72:91:b0:84:5e:7d:2d:0d:8f:7b:12:df:85:
+                    25:75:28:74:3a:42:2c:63:27:9f:95:7b:4b:ef:7e:
+                    19:87:1d:86:ea:a3:dd:b9:ce:96:64:1a:c2:14:6e:
+                    44:ac:7c:e6:8f:e8:4d:0f:71:1f:40:38:a6:00:a3:
+                    87:78:f6:f9:94:86:5e:ad:ea:c0:5e:76:eb:d9:14:
+                    a3:5d:6e:7a:7c:0c:a5:4b:55:7f:06:19:29:7f:9e:
+                    9a:26:d5:6a:bb:38:24:08:6a:98:c7:b1:da:a3:98:
+                    91:fd:79:db:e5:5a:c4:1c:b9
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        c7:ec:92:7e:4e:f8:f5:96:a5:67:62:2a:a4:f0:4d:11:60:d0:
+        6f:8d:60:58:61:ac:26:bb:52:35:5c:08:cf:30:fb:a8:4a:96:
+        8a:1f:62:42:23:8c:17:0f:f4:ba:64:9c:17:ac:47:29:df:9d:
+        98:5e:d2:6c:60:71:5c:a2:ac:dc:79:e3:e7:6e:00:47:1f:b5:
+        0d:28:e8:02:9d:e4:9a:fd:13:f4:a6:d9:7c:b1:f8:dc:5f:23:
+        26:09:91:80:73:d0:14:1b:de:43:a9:83:25:f2:e6:9c:2f:15:
+        ca:fe:a6:ab:8a:07:75:8b:0c:dd:51:84:6b:e4:f8:d1:ce:77:
+        a2:81
+
+Thawte Personal Premium CA
+==========================
+MD5 Fingerprint: 3A:B2:DE:22:9A:20:93:49:F9:ED:C8:D2:8A:E7:68:0D
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDKTCCApKgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBzzELMAkGA1UEBhMCWkEx
+FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYD
+VQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT
+ZXJ2aWNlcyBEaXZpc2lvbjEjMCEGA1UEAxMaVGhhd3RlIFBlcnNvbmFsIFByZW1p
+dW0gQ0ExKjAoBgkqhkiG9w0BCQEWG3BlcnNvbmFsLXByZW1pdW1AdGhhd3RlLmNv
+bTAeFw05NjAxMDEwMDAwMDBaFw0yMDEyMzEyMzU5NTlaMIHPMQswCQYDVQQGEwJa
+QTEVMBMGA1UECBMMV2VzdGVybiBDYXBlMRIwEAYDVQQHEwlDYXBlIFRvd24xGjAY
+BgNVBAoTEVRoYXd0ZSBDb25zdWx0aW5nMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9u
+IFNlcnZpY2VzIERpdmlzaW9uMSMwIQYDVQQDExpUaGF3dGUgUGVyc29uYWwgUHJl
+bWl1bSBDQTEqMCgGCSqGSIb3DQEJARYbcGVyc29uYWwtcHJlbWl1bUB0aGF3dGUu
+Y29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJZtn4B0TPuYwu8KHvE0Vs
+Bd/eJxZRNkERbGw77f4QfRKe5ZtCmv5gMcNmt3M6SK5O0DI3lIi1DbbZ8/JE2dWI
+Et12TfIa/G8jHnrx2JhFTgcQ7xZC0EN1bUre4qrJMf8fAHB8Zs8QJQi6+u4A6UYD
+ZicRFTuqW/KY3TZCstqIdQIDAQABoxMwETAPBgNVHRMBAf8EBTADAQH/MA0GCSqG
+SIb3DQEBBAUAA4GBAGk2ifc0KjNyL2071CKyuG+axTZmDhs8obF1Wub9NdP4qPIH
+b4Vnjt4rueIXsDqg8A6iAJrf8xQVbrvIhVqYgPn/vnQdPfP+MCXRNzRn+qVxeTBh
+KXLA4CxM+1bkOqhv5TJZUtt1KFBZDPgLGeSs2a+WjS9Q2wfD6h+rM+D1KzGJ
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 0 (0x0)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Premium CA/Email=personal-premium@thawte.com
+        Validity
+            Not Before: Jan  1 00:00:00 1996 GMT
+            Not After : Dec 31 23:59:59 2020 GMT
+        Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Premium CA/Email=personal-premium@thawte.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:c9:66:d9:f8:07:44:cf:b9:8c:2e:f0:a1:ef:13:
+                    45:6c:05:df:de:27:16:51:36:41:11:6c:6c:3b:ed:
+                    fe:10:7d:12:9e:e5:9b:42:9a:fe:60:31:c3:66:b7:
+                    73:3a:48:ae:4e:d0:32:37:94:88:b5:0d:b6:d9:f3:
+                    f2:44:d9:d5:88:12:dd:76:4d:f2:1a:fc:6f:23:1e:
+                    7a:f1:d8:98:45:4e:07:10:ef:16:42:d0:43:75:6d:
+                    4a:de:e2:aa:c9:31:ff:1f:00:70:7c:66:cf:10:25:
+                    08:ba:fa:ee:00:e9:46:03:66:27:11:15:3b:aa:5b:
+                    f2:98:dd:36:42:b2:da:88:75
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        69:36:89:f7:34:2a:33:72:2f:6d:3b:d4:22:b2:b8:6f:9a:c5:
+        36:66:0e:1b:3c:a1:b1:75:5a:e6:fd:35:d3:f8:a8:f2:07:6f:
+        85:67:8e:de:2b:b9:e2:17:b0:3a:a0:f0:0e:a2:00:9a:df:f3:
+        14:15:6e:bb:c8:85:5a:98:80:f9:ff:be:74:1d:3d:f3:fe:30:
+        25:d1:37:34:67:fa:a5:71:79:30:61:29:72:c0:e0:2c:4c:fb:
+        56:e4:3a:a8:6f:e5:32:59:52:db:75:28:50:59:0c:f8:0b:19:
+        e4:ac:d9:af:96:8d:2f:50:db:07:c3:ea:1f:ab:33:e0:f5:2b:
+        31:89
+
+Thawte Premium Server CA
+========================
+MD5 Fingerprint: 06:9F:69:79:16:66:90:02:1B:8C:8C:A2:C3:07:6F:3A
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkEx
+FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
+VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
+biBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFByZW1pdW0gU2Vy
+dmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZlckB0aGF3dGUuY29t
+MB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYTAlpB
+MRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsG
+A1UEChMUVGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRp
+b24gU2VydmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNl
+cnZlciBDQTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNv
+bTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2aovXwlue2oFBYo847kkE
+VdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIhUdib0GfQ
+ug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j+ao6hnO2RlNYyIkFvYMR
+uHM/qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG
+9w0BAQQFAAOBgQAmSCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUI
+hfzJATj/Tb7yFkJD57taRvvBxhEf8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JM
+pAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7tUCemDaYj+bvLpgcUQg==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Premium Server CA/Email=premium-server@thawte.com
+        Validity
+            Not Before: Aug  1 00:00:00 1996 GMT
+            Not After : Dec 31 23:59:59 2020 GMT
+        Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Premium Server CA/Email=premium-server@thawte.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d2:36:36:6a:8b:d7:c2:5b:9e:da:81:41:62:8f:
+                    38:ee:49:04:55:d6:d0:ef:1c:1b:95:16:47:ef:18:
+                    48:35:3a:52:f4:2b:6a:06:8f:3b:2f:ea:56:e3:af:
+                    86:8d:9e:17:f7:9e:b4:65:75:02:4d:ef:cb:09:a2:
+                    21:51:d8:9b:d0:67:d0:ba:0d:92:06:14:73:d4:93:
+                    cb:97:2a:00:9c:5c:4e:0c:bc:fa:15:52:fc:f2:44:
+                    6e:da:11:4a:6e:08:9f:2f:2d:e3:f9:aa:3a:86:73:
+                    b6:46:53:58:c8:89:05:bd:83:11:b8:73:3f:aa:07:
+                    8d:f4:42:4d:e7:40:9d:1c:37
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        26:48:2c:16:c2:58:fa:e8:16:74:0c:aa:aa:5f:54:3f:f2:d7:
+        c9:78:60:5e:5e:6e:37:63:22:77:36:7e:b2:17:c4:34:b9:f5:
+        08:85:fc:c9:01:38:ff:4d:be:f2:16:42:43:e7:bb:5a:46:fb:
+        c1:c6:11:1f:f1:4a:b0:28:46:c9:c3:c4:42:7d:bc:fa:ab:59:
+        6e:d5:b7:51:88:11:e3:a4:85:19:6b:82:4c:a4:0c:12:ad:e9:
+        a4:ae:3f:f1:c3:49:65:9a:8c:c5:c8:3e:25:b7:94:99:bb:92:
+        32:71:07:f0:86:5e:ed:50:27:a6:0d:a6:23:f9:bb:cb:a6:07:
+        14:42
+
+Thawte Server CA
+================
+MD5 Fingerprint: C5:70:C4:A2:ED:53:78:0C:C8:10:53:81:64:CB:D0:1D
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDEzCCAnygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBxDELMAkGA1UEBhMCWkEx
+FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
+VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
+biBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEm
+MCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wHhcNOTYwODAx
+MDAwMDAwWhcNMjAxMjMxMjM1OTU5WjCBxDELMAkGA1UEBhMCWkExFTATBgNVBAgT
+DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3
+dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNl
+cyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3
+DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQAD
+gY0AMIGJAoGBANOkUG7I/1Zr5s9dtuoMaHVHoqrC2oQl/Kj0R1HahbUgdJSGHg91
+yekIYfUGbTBuFRkC6VLAYttNmZ7iagxEOM3+vuNkCXDF/rFrKbYvScg71CcEJRCX
+L+eQbcAoQpnXTEPew/UhbVSfXcNY4cDk2VuwuNy0e982OsK1ZiIS1ocNAgMBAAGj
+EzARMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAB/pMaVz7lcxG
+7oWDTSEwjsrZqG9JGubaUeNgcGyEYRGhGshIPllDfU+VPaGLtwtimHp1it2ITk6e
+QNuozDJ0uW8NxuOzRAvZim+aKZuZGCg70eNAKJpaPNW15yAbi8qkq43pUdniTCxZ
+qdq5snUb9kLy78fyGPmJvKP/iiMucEc=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Server CA/Email=server-certs@thawte.com
+        Validity
+            Not Before: Aug  1 00:00:00 1996 GMT
+            Not After : Dec 31 23:59:59 2020 GMT
+        Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Server CA/Email=server-certs@thawte.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d3:a4:50:6e:c8:ff:56:6b:e6:cf:5d:b6:ea:0c:
+                    68:75:47:a2:aa:c2:da:84:25:fc:a8:f4:47:51:da:
+                    85:b5:20:74:94:86:1e:0f:75:c9:e9:08:61:f5:06:
+                    6d:30:6e:15:19:02:e9:52:c0:62:db:4d:99:9e:e2:
+                    6a:0c:44:38:cd:fe:be:e3:64:09:70:c5:fe:b1:6b:
+                    29:b6:2f:49:c8:3b:d4:27:04:25:10:97:2f:e7:90:
+                    6d:c0:28:42:99:d7:4c:43:de:c3:f5:21:6d:54:9f:
+                    5d:c3:58:e1:c0:e4:d9:5b:b0:b8:dc:b4:7b:df:36:
+                    3a:c2:b5:66:22:12:d6:87:0d
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        07:fa:4c:69:5c:fb:95:cc:46:ee:85:83:4d:21:30:8e:ca:d9:
+        a8:6f:49:1a:e6:da:51:e3:60:70:6c:84:61:11:a1:1a:c8:48:
+        3e:59:43:7d:4f:95:3d:a1:8b:b7:0b:62:98:7a:75:8a:dd:88:
+        4e:4e:9e:40:db:a8:cc:32:74:b9:6f:0d:c6:e3:b3:44:0b:d9:
+        8a:6f:9a:29:9b:99:18:28:3b:d1:e3:40:28:9a:5a:3c:d5:b5:
+        e7:20:1b:8b:ca:a4:ab:8d:e9:51:d9:e2:4c:2c:59:a9:da:b9:
+        b2:75:1b:f6:42:f2:ef:c7:f2:18:f9:89:bc:a3:ff:8a:23:2e:
+        70:47
+
+Thawte Universal CA Root
+========================
+MD5 Fingerprint: 17:AF:71:16:52:7B:73:65:22:05:29:28:84:71:9D:13
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIRIjCCCQoCAQAwDQYJKoZIhvcNAQEFBQAwVzEPMA0GA1UEChMGVGhhd3RlMSEw
+HwYDVQQLExhUaGF3dGUgVW5pdmVyc2FsIENBIFJvb3QxITAfBgNVBAMTGFRoYXd0
+ZSBVbml2ZXJzYWwgQ0EgUm9vdDAeFw05OTEyMDUxMzU2MDVaFw0zNzA0MDMxMzU2
+MDVaMFcxDzANBgNVBAoTBlRoYXd0ZTEhMB8GA1UECxMYVGhhd3RlIFVuaXZlcnNh
+bCBDQSBSb290MSEwHwYDVQQDExhUaGF3dGUgVW5pdmVyc2FsIENBIFJvb3Qwgggi
+MA0GCSqGSIb3DQEBAQUAA4IIDwAwgggKAoIIAQDiiQVtw3+tpok6/7vHzZ03seHS
+IR6bYSoV53tXT1U80Lv52T0+przstK1TmhYC6wty/Yryj0QFxevT5b22RDnm+0e/
+ap4KlRjiaOLWltYhrYj99Rf109pCpZDtKZWWdTrah6HU9dOH3gVipuNmdJLPpby7
+32j/cXVWQVk16zNaZlHy0qMKwYzOc1wRby2MlYyRsf3P5a1WlcyFkoOQVUHJwnft
++aN0QgpoCPPQ0WX9Zyw0/yR/53nIBzslV92kDJg9vuDMGWXb8lSir0LUneKuhCMl
+CTMStWoedsSL2UkAbF66H/Ib2mfKJ6qjRCMbg4LO8qsz7VSk3MmrWWXROA7BPhtn
+j9Z1AeBVIt12d+yO3fTPeSJtuVcD9ZkIpzw+NPvEF64jWM0k8yPKagIolAGBNLRs
+a66LGsOj0gk8FlT1Nl8k459KoeJkxhbDpoF6JDZHjsFeDvv5FXgE1g5Z2Z1YZmLS
+lCkyMsh4uWb2tVbhbMYUS5ZSWZECJGpVR9c/tiMaYHeXLuJAr54EV56tEcXJQ3Dv
+SLRerBxpLi6C1VuLvoK+GRRe5w0ix1Eb/x6b8TCPcTEGszQnj196ZoJPii0Tq0LP
+IVael45mNg+Wm+Ur9AKpKmqMLMTDuHAsLSkeP1B3Hm0qVORVCpE4ocW1ZqJ2Wu4P
+v7Rn4ShuD+E2oYLRv9R34cRnMpN4yOdUU/4jeeZozCaQ9hBjXSpvkS2kczJRIfK7
+Fd+qJAhIBt6hnia/uoO/fKTIoIy90v+8hGknEyQYxEUYIyZeGBTKLoiHYqNT5iG3
+uIV7moW7FSZy+Ln3anQPST+SvqkFt5knv78JF0uZTK0REHzfdDH2jyZfqoiuOFfI
+VS3T+9gbUZm+JRs6usB9G+3O0km5z/PFfYmQgdhpSCAQo/jvklEYMosRGMA/G4VW
+zlfJ8oJkxt8CCS5KES+xJ203UvDwFmHxZ43fh3Kvh9rP+1CUbtSUheuKLOoh9ZZK
+RNXgzmp0RE3QBdOHFe020KSLZlVwk+5HBsF+LqUYeWfzKIXxcPcOg6R+VJ5adjLL
+ZRu4zfvIKAPSVJHRp8WFQwgXdqXmL2cI2KGigi0M+MGvY9RQd21rRkpBhdWQX3kt
+xOzXEYdAiuFo4mT4VTL7b5Ms2nfZIcEX5TYsTn6Qf6yUKzJnvjhQdriuQbnXIcUJ
+TGDIo1HENJtXN9/LyTNXi+v7dp8ZTcVqHypFrivtL42npQDLBPolYi50SBvKKoy6
+27Z+9rsCfKnD21h4ob/w/hoQVRHO6GlOlmXGFwPWB2iMVIKuHCJVP/H0CZcowEb3
+TgslHfcH1wkdOhhXODvoMwbnj3hGHlv1BrbsuKYN8boTS9YYIN1pM0ozFa64yJiK
+JyyTvC377jO/ZuZNurabBlVgl0u8RM1+9KHYqi/AAighFmJ42whU8vz0NOPGjxxD
+V86QGkvcLjsokYk/eto1HY4s7kns9DOtyVOojJ8EUz4kHFLJEvliV6O87izrQHwg
+I3ArlflzF4rRwRxpprc4mmf3cB16WgxAz2IPhTzCAk5+tfbFKimEsx83KuGqckLE
+7Wsaj5IcXb7R8lvyq6qp0vW4pEErK5FuEkjKmNg3jcjtADC1tgROfpzahOzA+nvl
+HYikU0awlORcG6ElLA9IUneXCWzsWxgzgwLlgn7NhSEwEf0nT8/kHuw/pVds6Sow
+GSqI5cNpOKtvOXF/hOFBw+HMKokgUi6DD2w5P0stFqwt8CSsAHP0m7MGPwW4FIUf
+q55cPJ5inQ5tO4AJ/ALqopd0ysf541bhw8qlpprAkOAkElPSwovavu0CQ15n4YmY
+ee7LqsrDG9znpUalfGsWh7ZaKNfbJzxepb22Ud0fQ887Jsg6jSVhwUn0PBvJROqv
+HMIrlAEqDjDRW4srR+XD0QQDmw45LNYn1OZwWtl1zyrYyQAF5BOI7MM5+4dhMDZD
+A8ienKIGwi/F/PCAY7FUBKBMqS7G9XZ62NDk1JQR5RW1eAbcuICPmakgMz0QhUxl
+Cco+WF5gk5qqYl3AUQYcXWCgDZxLQ/anFiGkh6rywS7ukjC4nt/fEAGLhglw2Gyo
+t1AeFpa092f9NTohkCoyxwB7TQcQCbkvc9gYfmeZBE8G/FDHhZudQJ2zljf6pdyy
+ck7vTgks/ZH9Tfe7pqE+q3uiA0CmqVUn4vr5Gc6HdarxdTbz87iR+JHDi3UTjkxl
+mhY5auU06HqWWX81sAD9W2n8Qyb69Shu/ofZfiT7tKCCblSi/66/YrT0cgHCy5hH
+mOFMtReAgM6PpijuHkVq+9/xHfxaO9bq9GwdYklXO4qPhurwUwTOnBZo/7q5/IgP
+R/cCRHJAuMo7LVOd3DxWjFl7aBosjXG7bADHGs5vQJKxoy8P2UTyo3Aunu4OrjLQ
+Oz6LB+rmebNcKeJ9a6he+Vox6AiWoowDmEbxuH2QVCbtdmL+numabl7JScdcNFMp
+VNns5EbhgDt12d/7edWH8bqe6xnOTFJz5luHriVPOXnMxrj5EHvs8JtxpAWg0ynT
+Tn8f9C0oeMxVlXsekS/MVhhzi7LbvGkH5tDYT+2i/1iFo23gSlO3Z32NDFxbe3co
+AjVEegTTKEPIazAXXTK4KTW6dto7FEp2GFik+JI8nk0zb0ZrCNkxSGjd9PskVjSy
+z2lmvkjSimYizfJpzcJTE0UpQSLWXZgftqSyo8LuAi9RG9yDpOxwJajUCGEyb+Sh
+gS58Y3L6KWW8cETPXQIDAQABMA0GCSqGSIb3DQEBBQUAA4IIAQBVmjRqIgZpCUUz
+x66pXMcJTpuGvEGQ1JRS9s0jKZRLIs3ovf6dzVLyve2rh8mrq0YEtL2iPyIwR1DA
+S4x2DwP1ktKxLcR6NZzJc4frpp/eD3ON03+Z2LqPb8Tzvhqui6KUNpDi5euNBfT8
+Zd+V8cSUTRdW1588j1A853e/lYYmZPtq/8ba6YyuQrtp5TPG2OkNxlUhScEMtKP5
+m0tc3oNPQQPOKnloOH3wVEkg9bYQ/wjcM2aWm/8G3gCe185WQ5pR/HDN9vBRo7fN
+tFyFYs1xt8YrIyvdw25AQvo3/zcc9npXlIeFI9fUycdfwU0vyQ3XXOycJe6eMIKR
+lnK4dR34CWhXl7ItS+4l7HokKe5y1JwT26vcAwrYShTJCFdEXaG1U4A08hSXz1Le
+og6KEOkU79BgvmGh8SVd1RhzP5MQypbus0DS26NVz1dapQ5PdUff6veQmm31cC4d
+FBw3ZARZULDccoZvnDc9XSivc1Xv0u4kdHQT79zbMUn7P2P10wg+M6XnnQreUyxR
+jmfbm0FlQVC91KSWbIe8EuCUx9PA5MtzWACD4awnhdadU51cvQo+A0OcDJH1bXv4
+QHJ1qxF2kSvhxqofcGl2cBUJ/pPQ1i23FWqbZ1y0aZ8lpn2K+30iqXHyzk6MuCEt
+3v5BcQ3/nexzprsHT4gOWEcufqnCx3jdunqeTuAwTmNvhdQgQen6/kNF5/uverLO
+pAUdIppYht/kzkyp/tgWpW/72M5We/XWIO/kR81jJP+5vvFIo8EBcua9wK3tJg3K
+NJ/8Ai0gTwUgriE9DMIgPD/wBITcz4n9uSWRjtBD5rMgq1wt1UCeoEvY9LLMffFY
+Co6H7YisNpbkVqARivKa0LNXozS7Gas44XRrIsQxzgHVGzbjHjhMM5PfQONZV06s
+bnseWj3FHVusyBCCNQIisvx16BCRjcR9eJNHnhydrGtiAliM1hwj1q94woCcpKok
+VBS1FJjG+CsaJMtxMgrimw5pa91+jGTRLmPvDn+xPohMnVXlyW4XBLdB/72KQcsl
+MW9Edz9HsfyBiAeOBUkgtxHZaQMqA525M4Sa399640Zzo9iijFMZiFVMdLj2RIQr
+0RQtTjkukmj/afyFYhvrVU/vJYRiRZnW2E5vP1MIfR0GlYGAf09OdDaYteKHcJjc
+1/XcUhXmxtZ5ljl/j5XPq4BTrRsLRUAO1Bi9LN6Kd3b98kRHxiHQ5HTw2BgFyHww
+csff8bv8AjCp9EImWQ2TBYKhc+005ThdzVCQ/pT8E7y9/KiiiKdzxLKo0V2IxAKi
+evEEyf6MdMnvHWRBn6welmdkrKsoQced98CYG24HwmR9WoNmVig2nOf7HHcOKKDE
+92t5OQQghMdXk7wboOq860LlqBH+/KxlzP34KIj0pZrlc1HgqJsNA3dO5eCYs4ja
+febGnnwUZsEuU0qSBzegfuk9CeQVfM/9uEGl755mncReBx2H+EGt6ucv0kFjGDf5
+FONN0OX3Q/0V4/k2cwYm3wFPqcNO3iBGd5i0eiQrO3UrTliNm12kxxagvDKIP6GD
+8wDI+NhY6WNdTCu18HJB2Kt3N9ZydK62NpzIpoNJS+DJVgspvgAwy93WyEKKANns
+FdE0cfJbZIf2J9K364awkL8p2yGeNozjIC+VI1FsG8Kk1ebYAkNnoP6bUANEf7vk
+ctXR5NqPkhRk+10UEBJKlQbJZQgpyiGjJjgRySffcGcE/cpIMn9jskV0MVBPh9kg
+cNIhcLHWEJ0zXXiDkW1Vguza5GJjx4FG1xllcipDGZC41yNNTBzgRKlmZ6zucXkn
+Jnhtcg71XUsjtXx8ZekXxjoLDd1eHlHDhrjsf8cnSqVG6GotGcGHo8uZk4dkolUU
+TLdDpZPX59JOeUDKZZlGPT96gHqIaswe5WszRvRQwNUfCbjNii6hJ+tdc6foawrl
+V4IqsPziVFJW8KupEsYjlgcknOC8RqW0IATaCZNj5dQuwn7FMe21FXSGF7mz8yaK
+HQJq2ho/6LrxBG2UUVTiWrRZgx1g0C1zzAe1Joz518aIke+Az10PoWDLRdRCItGx
+cB390LcwkDrGSG1n5TLaj9vjqOMdICWiHOFMuaT2xj9cWA27xrJ3ARaRnxcGDbdA
+PsyPjpxL4J1+mx4Fq4gi+tMoG1cUZEo+JCw4TSFpAHMu0FUtdPIV6JRDPkAqxsa5
+alveoswYUFRdTiqFbPaSiykZfufqSuAiKyW892bPd5pBdPI8FA10afVQg83NLyHb
+IkaK0PdRGpVX8gWLGhntO0XoNsJufvtXIgAfBlOprpPGj3EqMUWS545t5pkiwIP8
+79xXZndPojYx+6ETjeXKo5V9AQxkcDtTQmiAx7udqAA1aZgMqGfYQ+Wqz5XgUZWk
+Fz9CnbgEztN5ecjTihYykuDXou7XN0wvrLh7vkX28RgznHs3piTZvECrAOnDN4ur
+2LbzXoFOsBRrBz4f7ML2RCKVu7Pmb9b5cGW6CoNlqg4TL4MTI1OLQBb6zi/8TQT4
+69isxTbCFVdIOOxVs7Qeuq3SQgYXDXPIV6a+lk2p8sD7eiEc9clwqYKQtfEM1HkQ
+voGm6VxhnHd5mqTDNyZXN8lSLPoI/9BfxmHA9Ha+/N5Oz6tRmXHH33701s8GVhkT
+UwttdFlIGZtTBS2dMlTT5SxTi2Q+1GR744AJFMz+FkZja3Fp+PnLJ/aIVLxFs84C
+yJTuQFv5QgLC/7DYLOsof17JJgGZpw==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 0 (0x0)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: O=Thawte, OU=Thawte Universal CA Root, CN=Thawte Universal CA Root
+        Validity
+            Not Before: Dec  5 13:56:05 1999 GMT
+            Not After : Apr  3 13:56:05 2037 GMT
+        Subject: O=Thawte, OU=Thawte Universal CA Root, CN=Thawte Universal CA Root
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (16384 bit)
+                Modulus (16384 bit):
+                    00:e2:89:05:6d:c3:7f:ad:a6:89:3a:ff:bb:c7:cd:
+                    9d:37:b1:e1:d2:21:1e:9b:61:2a:15:e7:7b:57:4f:
+                    55:3c:d0:bb:f9:d9:3d:3e:a6:bc:ec:b4:ad:53:9a:
+                    16:02:eb:0b:72:fd:8a:f2:8f:44:05:c5:eb:d3:e5:
+                    bd:b6:44:39:e6:fb:47:bf:6a:9e:0a:95:18:e2:68:
+                    e2:d6:96:d6:21:ad:88:fd:f5:17:f5:d3:da:42:a5:
+                    90:ed:29:95:96:75:3a:da:87:a1:d4:f5:d3:87:de:
+                    05:62:a6:e3:66:74:92:cf:a5:bc:bb:df:68:ff:71:
+                    75:56:41:59:35:eb:33:5a:66:51:f2:d2:a3:0a:c1:
+                    8c:ce:73:5c:11:6f:2d:8c:95:8c:91:b1:fd:cf:e5:
+                    ad:56:95:cc:85:92:83:90:55:41:c9:c2:77:ed:f9:
+                    a3:74:42:0a:68:08:f3:d0:d1:65:fd:67:2c:34:ff:
+                    24:7f:e7:79:c8:07:3b:25:57:dd:a4:0c:98:3d:be:
+                    e0:cc:19:65:db:f2:54:a2:af:42:d4:9d:e2:ae:84:
+                    23:25:09:33:12:b5:6a:1e:76:c4:8b:d9:49:00:6c:
+                    5e:ba:1f:f2:1b:da:67:ca:27:aa:a3:44:23:1b:83:
+                    82:ce:f2:ab:33:ed:54:a4:dc:c9:ab:59:65:d1:38:
+                    0e:c1:3e:1b:67:8f:d6:75:01:e0:55:22:dd:76:77:
+                    ec:8e:dd:f4:cf:79:22:6d:b9:57:03:f5:99:08:a7:
+                    3c:3e:34:fb:c4:17:ae:23:58:cd:24:f3:23:ca:6a:
+                    02:28:94:01:81:34:b4:6c:6b:ae:8b:1a:c3:a3:d2:
+                    09:3c:16:54:f5:36:5f:24:e3:9f:4a:a1:e2:64:c6:
+                    16:c3:a6:81:7a:24:36:47:8e:c1:5e:0e:fb:f9:15:
+                    78:04:d6:0e:59:d9:9d:58:66:62:d2:94:29:32:32:
+                    c8:78:b9:66:f6:b5:56:e1:6c:c6:14:4b:96:52:59:
+                    91:02:24:6a:55:47:d7:3f:b6:23:1a:60:77:97:2e:
+                    e2:40:af:9e:04:57:9e:ad:11:c5:c9:43:70:ef:48:
+                    b4:5e:ac:1c:69:2e:2e:82:d5:5b:8b:be:82:be:19:
+                    14:5e:e7:0d:22:c7:51:1b:ff:1e:9b:f1:30:8f:71:
+                    31:06:b3:34:27:8f:5f:7a:66:82:4f:8a:2d:13:ab:
+                    42:cf:21:56:9e:97:8e:66:36:0f:96:9b:e5:2b:f4:
+                    02:a9:2a:6a:8c:2c:c4:c3:b8:70:2c:2d:29:1e:3f:
+                    50:77:1e:6d:2a:54:e4:55:0a:91:38:a1:c5:b5:66:
+                    a2:76:5a:ee:0f:bf:b4:67:e1:28:6e:0f:e1:36:a1:
+                    82:d1:bf:d4:77:e1:c4:67:32:93:78:c8:e7:54:53:
+                    fe:23:79:e6:68:cc:26:90:f6:10:63:5d:2a:6f:91:
+                    2d:a4:73:32:51:21:f2:bb:15:df:aa:24:08:48:06:
+                    de:a1:9e:26:bf:ba:83:bf:7c:a4:c8:a0:8c:bd:d2:
+                    ff:bc:84:69:27:13:24:18:c4:45:18:23:26:5e:18:
+                    14:ca:2e:88:87:62:a3:53:e6:21:b7:b8:85:7b:9a:
+                    85:bb:15:26:72:f8:b9:f7:6a:74:0f:49:3f:92:be:
+                    a9:05:b7:99:27:bf:bf:09:17:4b:99:4c:ad:11:10:
+                    7c:df:74:31:f6:8f:26:5f:aa:88:ae:38:57:c8:55:
+                    2d:d3:fb:d8:1b:51:99:be:25:1b:3a:ba:c0:7d:1b:
+                    ed:ce:d2:49:b9:cf:f3:c5:7d:89:90:81:d8:69:48:
+                    20:10:a3:f8:ef:92:51:18:32:8b:11:18:c0:3f:1b:
+                    85:56:ce:57:c9:f2:82:64:c6:df:02:09:2e:4a:11:
+                    2f:b1:27:6d:37:52:f0:f0:16:61:f1:67:8d:df:87:
+                    72:af:87:da:cf:fb:50:94:6e:d4:94:85:eb:8a:2c:
+                    ea:21:f5:96:4a:44:d5:e0:ce:6a:74:44:4d:d0:05:
+                    d3:87:15:ed:36:d0:a4:8b:66:55:70:93:ee:47:06:
+                    c1:7e:2e:a5:18:79:67:f3:28:85:f1:70:f7:0e:83:
+                    a4:7e:54:9e:5a:76:32:cb:65:1b:b8:cd:fb:c8:28:
+                    03:d2:54:91:d1:a7:c5:85:43:08:17:76:a5:e6:2f:
+                    67:08:d8:a1:a2:82:2d:0c:f8:c1:af:63:d4:50:77:
+                    6d:6b:46:4a:41:85:d5:90:5f:79:2d:c4:ec:d7:11:
+                    87:40:8a:e1:68:e2:64:f8:55:32:fb:6f:93:2c:da:
+                    77:d9:21:c1:17:e5:36:2c:4e:7e:90:7f:ac:94:2b:
+                    32:67:be:38:50:76:b8:ae:41:b9:d7:21:c5:09:4c:
+                    60:c8:a3:51:c4:34:9b:57:37:df:cb:c9:33:57:8b:
+                    eb:fb:76:9f:19:4d:c5:6a:1f:2a:45:ae:2b:ed:2f:
+                    8d:a7:a5:00:cb:04:fa:25:62:2e:74:48:1b:ca:2a:
+                    8c:ba:db:b6:7e:f6:bb:02:7c:a9:c3:db:58:78:a1:
+                    bf:f0:fe:1a:10:55:11:ce:e8:69:4e:96:65:c6:17:
+                    03:d6:07:68:8c:54:82:ae:1c:22:55:3f:f1:f4:09:
+                    97:28:c0:46:f7:4e:0b:25:1d:f7:07:d7:09:1d:3a:
+                    18:57:38:3b:e8:33:06:e7:8f:78:46:1e:5b:f5:06:
+                    b6:ec:b8:a6:0d:f1:ba:13:4b:d6:18:20:dd:69:33:
+                    4a:33:15:ae:b8:c8:98:8a:27:2c:93:bc:2d:fb:ee:
+                    33:bf:66:e6:4d:ba:b6:9b:06:55:60:97:4b:bc:44:
+                    cd:7e:f4:a1:d8:aa:2f:c0:02:28:21:16:62:78:db:
+                    08:54:f2:fc:f4:34:e3:c6:8f:1c:43:57:ce:90:1a:
+                    4b:dc:2e:3b:28:91:89:3f:7a:da:35:1d:8e:2c:ee:
+                    49:ec:f4:33:ad:c9:53:a8:8c:9f:04:53:3e:24:1c:
+                    52:c9:12:f9:62:57:a3:bc:ee:2c:eb:40:7c:20:23:
+                    70:2b:95:f9:73:17:8a:d1:c1:1c:69:a6:b7:38:9a:
+                    67:f7:70:1d:7a:5a:0c:40:cf:62:0f:85:3c:c2:02:
+                    4e:7e:b5:f6:c5:2a:29:84:b3:1f:37:2a:e1:aa:72:
+                    42:c4:ed:6b:1a:8f:92:1c:5d:be:d1:f2:5b:f2:ab:
+                    aa:a9:d2:f5:b8:a4:41:2b:2b:91:6e:12:48:ca:98:
+                    d8:37:8d:c8:ed:00:30:b5:b6:04:4e:7e:9c:da:84:
+                    ec:c0:fa:7b:e5:1d:88:a4:53:46:b0:94:e4:5c:1b:
+                    a1:25:2c:0f:48:52:77:97:09:6c:ec:5b:18:33:83:
+                    02:e5:82:7e:cd:85:21:30:11:fd:27:4f:cf:e4:1e:
+                    ec:3f:a5:57:6c:e9:2a:30:19:2a:88:e5:c3:69:38:
+                    ab:6f:39:71:7f:84:e1:41:c3:e1:cc:2a:89:20:52:
+                    2e:83:0f:6c:39:3f:4b:2d:16:ac:2d:f0:24:ac:00:
+                    73:f4:9b:b3:06:3f:05:b8:14:85:1f:ab:9e:5c:3c:
+                    9e:62:9d:0e:6d:3b:80:09:fc:02:ea:a2:97:74:ca:
+                    c7:f9:e3:56:e1:c3:ca:a5:a6:9a:c0:90:e0:24:12:
+                    53:d2:c2:8b:da:be:ed:02:43:5e:67:e1:89:98:79:
+                    ee:cb:aa:ca:c3:1b:dc:e7:a5:46:a5:7c:6b:16:87:
+                    b6:5a:28:d7:db:27:3c:5e:a5:bd:b6:51:dd:1f:43:
+                    cf:3b:26:c8:3a:8d:25:61:c1:49:f4:3c:1b:c9:44:
+                    ea:af:1c:c2:2b:94:01:2a:0e:30:d1:5b:8b:2b:47:
+                    e5:c3:d1:04:03:9b:0e:39:2c:d6:27:d4:e6:70:5a:
+                    d9:75:cf:2a:d8:c9:00:05:e4:13:88:ec:c3:39:fb:
+                    87:61:30:36:43:03:c8:9e:9c:a2:06:c2:2f:c5:fc:
+                    f0:80:63:b1:54:04:a0:4c:a9:2e:c6:f5:76:7a:d8:
+                    d0:e4:d4:94:11:e5:15:b5:78:06:dc:b8:80:8f:99:
+                    a9:20:33:3d:10:85:4c:65:09:ca:3e:58:5e:60:93:
+                    9a:aa:62:5d:c0:51:06:1c:5d:60:a0:0d:9c:4b:43:
+                    f6:a7:16:21:a4:87:aa:f2:c1:2e:ee:92:30:b8:9e:
+                    df:df:10:01:8b:86:09:70:d8:6c:a8:b7:50:1e:16:
+                    96:b4:f7:67:fd:35:3a:21:90:2a:32:c7:00:7b:4d:
+                    07:10:09:b9:2f:73:d8:18:7e:67:99:04:4f:06:fc:
+                    50:c7:85:9b:9d:40:9d:b3:96:37:fa:a5:dc:b2:72:
+                    4e:ef:4e:09:2c:fd:91:fd:4d:f7:bb:a6:a1:3e:ab:
+                    7b:a2:03:40:a6:a9:55:27:e2:fa:f9:19:ce:87:75:
+                    aa:f1:75:36:f3:f3:b8:91:f8:91:c3:8b:75:13:8e:
+                    4c:65:9a:16:39:6a:e5:34:e8:7a:96:59:7f:35:b0:
+                    00:fd:5b:69:fc:43:26:fa:f5:28:6e:fe:87:d9:7e:
+                    24:fb:b4:a0:82:6e:54:a2:ff:ae:bf:62:b4:f4:72:
+                    01:c2:cb:98:47:98:e1:4c:b5:17:80:80:ce:8f:a6:
+                    28:ee:1e:45:6a:fb:df:f1:1d:fc:5a:3b:d6:ea:f4:
+                    6c:1d:62:49:57:3b:8a:8f:86:ea:f0:53:04:ce:9c:
+                    16:68:ff:ba:b9:fc:88:0f:47:f7:02:44:72:40:b8:
+                    ca:3b:2d:53:9d:dc:3c:56:8c:59:7b:68:1a:2c:8d:
+                    71:bb:6c:00:c7:1a:ce:6f:40:92:b1:a3:2f:0f:d9:
+                    44:f2:a3:70:2e:9e:ee:0e:ae:32:d0:3b:3e:8b:07:
+                    ea:e6:79:b3:5c:29:e2:7d:6b:a8:5e:f9:5a:31:e8:
+                    08:96:a2:8c:03:98:46:f1:b8:7d:90:54:26:ed:76:
+                    62:fe:9e:e9:9a:6e:5e:c9:49:c7:5c:34:53:29:54:
+                    d9:ec:e4:46:e1:80:3b:75:d9:df:fb:79:d5:87:f1:
+                    ba:9e:eb:19:ce:4c:52:73:e6:5b:87:ae:25:4f:39:
+                    79:cc:c6:b8:f9:10:7b:ec:f0:9b:71:a4:05:a0:d3:
+                    29:d3:4e:7f:1f:f4:2d:28:78:cc:55:95:7b:1e:91:
+                    2f:cc:56:18:73:8b:b2:db:bc:69:07:e6:d0:d8:4f:
+                    ed:a2:ff:58:85:a3:6d:e0:4a:53:b7:67:7d:8d:0c:
+                    5c:5b:7b:77:28:02:35:44:7a:04:d3:28:43:c8:6b:
+                    30:17:5d:32:b8:29:35:ba:76:da:3b:14:4a:76:18:
+                    58:a4:f8:92:3c:9e:4d:33:6f:46:6b:08:d9:31:48:
+                    68:dd:f4:fb:24:56:34:b2:cf:69:66:be:48:d2:8a:
+                    66:22:cd:f2:69:cd:c2:53:13:45:29:41:22:d6:5d:
+                    98:1f:b6:a4:b2:a3:c2:ee:02:2f:51:1b:dc:83:a4:
+                    ec:70:25:a8:d4:08:61:32:6f:e4:a1:81:2e:7c:63:
+                    72:fa:29:65:bc:70:44:cf:5d
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        55:9a:34:6a:22:06:69:09:45:33:c7:ae:a9:5c:c7:09:4e:9b:
+        86:bc:41:90:d4:94:52:f6:cd:23:29:94:4b:22:cd:e8:bd:fe:
+        9d:cd:52:f2:bd:ed:ab:87:c9:ab:ab:46:04:b4:bd:a2:3f:22:
+        30:47:50:c0:4b:8c:76:0f:03:f5:92:d2:b1:2d:c4:7a:35:9c:
+        c9:73:87:eb:a6:9f:de:0f:73:8d:d3:7f:99:d8:ba:8f:6f:c4:
+        f3:be:1a:ae:8b:a2:94:36:90:e2:e5:eb:8d:05:f4:fc:65:df:
+        95:f1:c4:94:4d:17:56:d7:9f:3c:8f:50:3c:e7:77:bf:95:86:
+        26:64:fb:6a:ff:c6:da:e9:8c:ae:42:bb:69:e5:33:c6:d8:e9:
+        0d:c6:55:21:49:c1:0c:b4:a3:f9:9b:4b:5c:de:83:4f:41:03:
+        ce:2a:79:68:38:7d:f0:54:49:20:f5:b6:10:ff:08:dc:33:66:
+        96:9b:ff:06:de:00:9e:d7:ce:56:43:9a:51:fc:70:cd:f6:f0:
+        51:a3:b7:cd:b4:5c:85:62:cd:71:b7:c6:2b:23:2b:dd:c3:6e:
+        40:42:fa:37:ff:37:1c:f6:7a:57:94:87:85:23:d7:d4:c9:c7:
+        5f:c1:4d:2f:c9:0d:d7:5c:ec:9c:25:ee:9e:30:82:91:96:72:
+        b8:75:1d:f8:09:68:57:97:b2:2d:4b:ee:25:ec:7a:24:29:ee:
+        72:d4:9c:13:db:ab:dc:03:0a:d8:4a:14:c9:08:57:44:5d:a1:
+        b5:53:80:34:f2:14:97:cf:52:de:a2:0e:8a:10:e9:14:ef:d0:
+        60:be:61:a1:f1:25:5d:d5:18:73:3f:93:10:ca:96:ee:b3:40:
+        d2:db:a3:55:cf:57:5a:a5:0e:4f:75:47:df:ea:f7:90:9a:6d:
+        f5:70:2e:1d:14:1c:37:64:04:59:50:b0:dc:72:86:6f:9c:37:
+        3d:5d:28:af:73:55:ef:d2:ee:24:74:74:13:ef:dc:db:31:49:
+        fb:3f:63:f5:d3:08:3e:33:a5:e7:9d:0a:de:53:2c:51:8e:67:
+        db:9b:41:65:41:50:bd:d4:a4:96:6c:87:bc:12:e0:94:c7:d3:
+        c0:e4:cb:73:58:00:83:e1:ac:27:85:d6:9d:53:9d:5c:bd:0a:
+        3e:03:43:9c:0c:91:f5:6d:7b:f8:40:72:75:ab:11:76:91:2b:
+        e1:c6:aa:1f:70:69:76:70:15:09:fe:93:d0:d6:2d:b7:15:6a:
+        9b:67:5c:b4:69:9f:25:a6:7d:8a:fb:7d:22:a9:71:f2:ce:4e:
+        8c:b8:21:2d:de:fe:41:71:0d:ff:9d:ec:73:a6:bb:07:4f:88:
+        0e:58:47:2e:7e:a9:c2:c7:78:dd:ba:7a:9e:4e:e0:30:4e:63:
+        6f:85:d4:20:41:e9:fa:fe:43:45:e7:fb:af:7a:b2:ce:a4:05:
+        1d:22:9a:58:86:df:e4:ce:4c:a9:fe:d8:16:a5:6f:fb:d8:ce:
+        56:7b:f5:d6:20:ef:e4:47:cd:63:24:ff:b9:be:f1:48:a3:c1:
+        01:72:e6:bd:c0:ad:ed:26:0d:ca:34:9f:fc:02:2d:20:4f:05:
+        20:ae:21:3d:0c:c2:20:3c:3f:f0:04:84:dc:cf:89:fd:b9:25:
+        91:8e:d0:43:e6:b3:20:ab:5c:2d:d5:40:9e:a0:4b:d8:f4:b2:
+        cc:7d:f1:58:0a:8e:87:ed:88:ac:36:96:e4:56:a0:11:8a:f2:
+        9a:d0:b3:57:a3:34:bb:19:ab:38:e1:74:6b:22:c4:31:ce:01:
+        d5:1b:36:e3:1e:38:4c:33:93:df:40:e3:59:57:4e:ac:6e:7b:
+        1e:5a:3d:c5:1d:5b:ac:c8:10:82:35:02:22:b2:fc:75:e8:10:
+        91:8d:c4:7d:78:93:47:9e:1c:9d:ac:6b:62:02:58:8c:d6:1c:
+        23:d6:af:78:c2:80:9c:a4:aa:24:54:14:b5:14:98:c6:f8:2b:
+        1a:24:cb:71:32:0a:e2:9b:0e:69:6b:dd:7e:8c:64:d1:2e:63:
+        ef:0e:7f:b1:3e:88:4c:9d:55:e5:c9:6e:17:04:b7:41:ff:bd:
+        8a:41:cb:25:31:6f:44:77:3f:47:b1:fc:81:88:07:8e:05:49:
+        20:b7:11:d9:69:03:2a:03:9d:b9:33:84:9a:df:df:7a:e3:46:
+        73:a3:d8:a2:8c:53:19:88:55:4c:74:b8:f6:44:84:2b:d1:14:
+        2d:4e:39:2e:92:68:ff:69:fc:85:62:1b:eb:55:4f:ef:25:84:
+        62:45:99:d6:d8:4e:6f:3f:53:08:7d:1d:06:95:81:80:7f:4f:
+        4e:74:36:98:b5:e2:87:70:98:dc:d7:f5:dc:52:15:e6:c6:d6:
+        79:96:39:7f:8f:95:cf:ab:80:53:ad:1b:0b:45:40:0e:d4:18:
+        bd:2c:de:8a:77:76:fd:f2:44:47:c6:21:d0:e4:74:f0:d8:18:
+        05:c8:7c:30:72:c7:df:f1:bb:fc:02:30:a9:f4:42:26:59:0d:
+        93:05:82:a1:73:ed:34:e5:38:5d:cd:50:90:fe:94:fc:13:bc:
+        bd:fc:a8:a2:88:a7:73:c4:b2:a8:d1:5d:88:c4:02:a2:7a:f1:
+        04:c9:fe:8c:74:c9:ef:1d:64:41:9f:ac:1e:96:67:64:ac:ab:
+        28:41:c7:9d:f7:c0:98:1b:6e:07:c2:64:7d:5a:83:66:56:28:
+        36:9c:e7:fb:1c:77:0e:28:a0:c4:f7:6b:79:39:04:20:84:c7:
+        57:93:bc:1b:a0:ea:bc:eb:42:e5:a8:11:fe:fc:ac:65:cc:fd:
+        f8:28:88:f4:a5:9a:e5:73:51:e0:a8:9b:0d:03:77:4e:e5:e0:
+        98:b3:88:da:7d:e6:c6:9e:7c:14:66:c1:2e:53:4a:92:07:37:
+        a0:7e:e9:3d:09:e4:15:7c:cf:fd:b8:41:a5:ef:9e:66:9d:c4:
+        5e:07:1d:87:f8:41:ad:ea:e7:2f:d2:41:63:18:37:f9:14:e3:
+        4d:d0:e5:f7:43:fd:15:e3:f9:36:73:06:26:df:01:4f:a9:c3:
+        4e:de:20:46:77:98:b4:7a:24:2b:3b:75:2b:4e:58:8d:9b:5d:
+        a4:c7:16:a0:bc:32:88:3f:a1:83:f3:00:c8:f8:d8:58:e9:63:
+        5d:4c:2b:b5:f0:72:41:d8:ab:77:37:d6:72:74:ae:b6:36:9c:
+        c8:a6:83:49:4b:e0:c9:56:0b:29:be:00:30:cb:dd:d6:c8:42:
+        8a:00:d9:ec:15:d1:34:71:f2:5b:64:87:f6:27:d2:b7:eb:86:
+        b0:90:bf:29:db:21:9e:36:8c:e3:20:2f:95:23:51:6c:1b:c2:
+        a4:d5:e6:d8:02:43:67:a0:fe:9b:50:03:44:7f:bb:e4:72:d5:
+        d1:e4:da:8f:92:14:64:fb:5d:14:10:12:4a:95:06:c9:65:08:
+        29:ca:21:a3:26:38:11:c9:27:df:70:67:04:fd:ca:48:32:7f:
+        63:b2:45:74:31:50:4f:87:d9:20:70:d2:21:70:b1:d6:10:9d:
+        33:5d:78:83:91:6d:55:82:ec:da:e4:62:63:c7:81:46:d7:19:
+        65:72:2a:43:19:90:b8:d7:23:4d:4c:1c:e0:44:a9:66:67:ac:
+        ee:71:79:27:26:78:6d:72:0e:f5:5d:4b:23:b5:7c:7c:65:e9:
+        17:c6:3a:0b:0d:dd:5e:1e:51:c3:86:b8:ec:7f:c7:27:4a:a5:
+        46:e8:6a:2d:19:c1:87:a3:cb:99:93:87:64:a2:55:14:4c:b7:
+        43:a5:93:d7:e7:d2:4e:79:40:ca:65:99:46:3d:3f:7a:80:7a:
+        88:6a:cc:1e:e5:6b:33:46:f4:50:c0:d5:1f:09:b8:cd:8a:2e:
+        a1:27:eb:5d:73:a7:e8:6b:0a:e5:57:82:2a:b0:fc:e2:54:52:
+        56:f0:ab:a9:12:c6:23:96:07:24:9c:e0:bc:46:a5:b4:20:04:
+        da:09:93:63:e5:d4:2e:c2:7e:c5:31:ed:b5:15:74:86:17:b9:
+        b3:f3:26:8a:1d:02:6a:da:1a:3f:e8:ba:f1:04:6d:94:51:54:
+        e2:5a:b4:59:83:1d:60:d0:2d:73:cc:07:b5:26:8c:f9:d7:c6:
+        88:91:ef:80:cf:5d:0f:a1:60:cb:45:d4:42:22:d1:b1:70:1d:
+        fd:d0:b7:30:90:3a:c6:48:6d:67:e5:32:da:8f:db:e3:a8:e3:
+        1d:20:25:a2:1c:e1:4c:b9:a4:f6:c6:3f:5c:58:0d:bb:c6:b2:
+        77:01:16:91:9f:17:06:0d:b7:40:3e:cc:8f:8e:9c:4b:e0:9d:
+        7e:9b:1e:05:ab:88:22:fa:d3:28:1b:57:14:64:4a:3e:24:2c:
+        38:4d:21:69:00:73:2e:d0:55:2d:74:f2:15:e8:94:43:3e:40:
+        2a:c6:c6:b9:6a:5b:de:a2:cc:18:50:54:5d:4e:2a:85:6c:f6:
+        92:8b:29:19:7e:e7:ea:4a:e0:22:2b:25:bc:f7:66:cf:77:9a:
+        41:74:f2:3c:14:0d:74:69:f5:50:83:cd:cd:2f:21:db:22:46:
+        8a:d0:f7:51:1a:95:57:f2:05:8b:1a:19:ed:3b:45:e8:36:c2:
+        6e:7e:fb:57:22:00:1f:06:53:a9:ae:93:c6:8f:71:2a:31:45:
+        92:e7:8e:6d:e6:99:22:c0:83:fc:ef:dc:57:66:77:4f:a2:36:
+        31:fb:a1:13:8d:e5:ca:a3:95:7d:01:0c:64:70:3b:53:42:68:
+        80:c7:bb:9d:a8:00:35:69:98:0c:a8:67:d8:43:e5:aa:cf:95:
+        e0:51:95:a4:17:3f:42:9d:b8:04:ce:d3:79:79:c8:d3:8a:16:
+        32:92:e0:d7:a2:ee:d7:37:4c:2f:ac:b8:7b:be:45:f6:f1:18:
+        33:9c:7b:37:a6:24:d9:bc:40:ab:00:e9:c3:37:8b:ab:d8:b6:
+        f3:5e:81:4e:b0:14:6b:07:3e:1f:ec:c2:f6:44:22:95:bb:b3:
+        e6:6f:d6:f9:70:65:ba:0a:83:65:aa:0e:13:2f:83:13:23:53:
+        8b:40:16:fa:ce:2f:fc:4d:04:f8:eb:d8:ac:c5:36:c2:15:57:
+        48:38:ec:55:b3:b4:1e:ba:ad:d2:42:06:17:0d:73:c8:57:a6:
+        be:96:4d:a9:f2:c0:fb:7a:21:1c:f5:c9:70:a9:82:90:b5:f1:
+        0c:d4:79:10:be:81:a6:e9:5c:61:9c:77:79:9a:a4:c3:37:26:
+        57:37:c9:52:2c:fa:08:ff:d0:5f:c6:61:c0:f4:76:be:fc:de:
+        4e:cf:ab:51:99:71:c7:df:7e:f4:d6:cf:06:56:19:13:53:0b:
+        6d:74:59:48:19:9b:53:05:2d:9d:32:54:d3:e5:2c:53:8b:64:
+        3e:d4:64:7b:e3:80:09:14:cc:fe:16:46:63:6b:71:69:f8:f9:
+        cb:27:f6:88:54:bc:45:b3:ce:02:c8:94:ee:40:5b:f9:42:02:
+        c2:ff:b0:d8:2c:eb:28:7f:5e:c9:26:01:99:a7
+
+UPS Document Exchange by DST
+============================
+MD5 Fingerprint: 78:A5:FB:10:4B:E4:63:2E:D2:6B:FB:F2:B6:C2:4B:8E
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIID+DCCAuACEQDQHkCLAAACfAAAAAcAAAABMA0GCSqGSIb3DQEBBQUAMIG5MQsw
+CQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENp
+dHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjEeMBwGA1UE
+CxMVVW5pdGVkIFBhcmNlbCBTZXJ2aWNlMRkwFwYDVQQDExBEU1QgKFVQUykgUm9v
+dENBMSEwHwYJKoZIhvcNAQkBFhJjYUBkaWdzaWd0cnVzdC5jb20wHhcNOTgxMjEw
+MDAyNTQ2WhcNMDgxMjA3MDAyNTQ2WjCBuTELMAkGA1UEBhMCdXMxDTALBgNVBAgT
+BFV0YWgxFzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR5MSQwIgYDVQQKExtEaWdpdGFs
+IFNpZ25hdHVyZSBUcnVzdCBDby4xHjAcBgNVBAsTFVVuaXRlZCBQYXJjZWwgU2Vy
+dmljZTEZMBcGA1UEAxMQRFNUIChVUFMpIFJvb3RDQTEhMB8GCSqGSIb3DQEJARYS
+Y2FAZGlnc2lndHJ1c3QuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
+AQEA7xfsrynm2SsnwNt7JJ9m9ASjwq0KyrDNhCuqN/OAoWDvQo/lXXdfV0JU3Svb
+YbJxXpN7b1/rJCvnpPLr8XOzC431Wdcy36yQjk4xuiVNtgym8eWvDOHlb1IDFcHf
+vn5KpqYYRnA/76dNqNz1dNlhekA8oZQo6sKUiMs3FQUZPJViuhwt+yiM0ciekjxb
+EVQ7eNlHO5stSuY+e2vf9PYFzyj2upg2AJ48N4UKnN63pIXFY/23YhRtFx7MioCF
+QjIRsCHinXfJgBZBnuvlFIl/t8O8T8Gfh5uW7GP2+ZBWDpWjIwqMZNqbuxx3sExd
+5sjo9X15LVckP8zjPSyYzxKfFwIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQC7OI4E
+IiZYDiFEVsy9WXwpaMtcD8iGVD+BeKetj8xG9xxUuHktW3IFaugh0OwdHf6kNFG+
+7u3OzJwWaOJddXMIQzGRahArEMJLafjJrZio/bjv9qvwXyHvy4VrCe0vSGa1YHLA
+6KDHmNsO9xtzjTQICnvFd2KqMCObsB6LgJhU3AWHs6liWfyLtxWarETszzUa9w8u
+XZJLAch77qA37eQdgg2ZQUMXrdTVyuP5fReiAdAwD0C53LkEgmmDtvkP+gaS96j0
+1hcc8F5/xCnI5uHi/zZoIVGu/6m6hJKtinsz2JDSwXltMzM5dKwbOHGfLAeQ6h3g
+04lfy+8UjSdUpb1G
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            d0:1e:40:8b:00:00:02:7c:00:00:00:07:00:00:00:01
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=United Parcel Service, CN=DST (UPS) RootCA/Email=ca@digsigtrust.com
+        Validity
+            Not Before: Dec 10 00:25:46 1998 GMT
+            Not After : Dec  7 00:25:46 2008 GMT
+        Subject: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=United Parcel Service, CN=DST (UPS) RootCA/Email=ca@digsigtrust.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:ef:17:ec:af:29:e6:d9:2b:27:c0:db:7b:24:9f:
+                    66:f4:04:a3:c2:ad:0a:ca:b0:cd:84:2b:aa:37:f3:
+                    80:a1:60:ef:42:8f:e5:5d:77:5f:57:42:54:dd:2b:
+                    db:61:b2:71:5e:93:7b:6f:5f:eb:24:2b:e7:a4:f2:
+                    eb:f1:73:b3:0b:8d:f5:59:d7:32:df:ac:90:8e:4e:
+                    31:ba:25:4d:b6:0c:a6:f1:e5:af:0c:e1:e5:6f:52:
+                    03:15:c1:df:be:7e:4a:a6:a6:18:46:70:3f:ef:a7:
+                    4d:a8:dc:f5:74:d9:61:7a:40:3c:a1:94:28:ea:c2:
+                    94:88:cb:37:15:05:19:3c:95:62:ba:1c:2d:fb:28:
+                    8c:d1:c8:9e:92:3c:5b:11:54:3b:78:d9:47:3b:9b:
+                    2d:4a:e6:3e:7b:6b:df:f4:f6:05:cf:28:f6:ba:98:
+                    36:00:9e:3c:37:85:0a:9c:de:b7:a4:85:c5:63:fd:
+                    b7:62:14:6d:17:1e:cc:8a:80:85:42:32:11:b0:21:
+                    e2:9d:77:c9:80:16:41:9e:eb:e5:14:89:7f:b7:c3:
+                    bc:4f:c1:9f:87:9b:96:ec:63:f6:f9:90:56:0e:95:
+                    a3:23:0a:8c:64:da:9b:bb:1c:77:b0:4c:5d:e6:c8:
+                    e8:f5:7d:79:2d:57:24:3f:cc:e3:3d:2c:98:cf:12:
+                    9f:17
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        bb:38:8e:04:22:26:58:0e:21:44:56:cc:bd:59:7c:29:68:cb:
+        5c:0f:c8:86:54:3f:81:78:a7:ad:8f:cc:46:f7:1c:54:b8:79:
+        2d:5b:72:05:6a:e8:21:d0:ec:1d:1d:fe:a4:34:51:be:ee:ed:
+        ce:cc:9c:16:68:e2:5d:75:73:08:43:31:91:6a:10:2b:10:c2:
+        4b:69:f8:c9:ad:98:a8:fd:b8:ef:f6:ab:f0:5f:21:ef:cb:85:
+        6b:09:ed:2f:48:66:b5:60:72:c0:e8:a0:c7:98:db:0e:f7:1b:
+        73:8d:34:08:0a:7b:c5:77:62:aa:30:23:9b:b0:1e:8b:80:98:
+        54:dc:05:87:b3:a9:62:59:fc:8b:b7:15:9a:ac:44:ec:cf:35:
+        1a:f7:0f:2e:5d:92:4b:01:c8:7b:ee:a0:37:ed:e4:1d:82:0d:
+        99:41:43:17:ad:d4:d5:ca:e3:f9:7d:17:a2:01:d0:30:0f:40:
+        b9:dc:b9:04:82:69:83:b6:f9:0f:fa:06:92:f7:a8:f4:d6:17:
+        1c:f0:5e:7f:c4:29:c8:e6:e1:e2:ff:36:68:21:51:ae:ff:a9:
+        ba:84:92:ad:8a:7b:33:d8:90:d2:c1:79:6d:33:33:39:74:ac:
+        1b:38:71:9f:2c:07:90:ea:1d:e0:d3:89:5f:cb:ef:14:8d:27:
+        54:a5:bd:46
+
+ValiCert Class 1 VA
+===================
+MD5 Fingerprint: 65:58:AB:15:AD:57:6C:1E:A8:A7:B5:69:AC:BF:FF:EB
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
+IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
+BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
+aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
+9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNTIyMjM0OFoXDTE5MDYy
+NTIyMjM0OFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
+azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
+YXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
+Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
+cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDYWYJ6ibiWuqYvaG9Y
+LqdUHAZu9OqNSLwxlBfw8068srg1knaw0KWlAdcAAxIiGQj4/xEjm84H9b9pGib+
+TunRf50sQB1ZaG6m+FiwnRqP0z/x3BkGgagO4DrdyFNFCQbmD3DD+kCmDuJWBQ8Y
+TfwggtFzVXSNdnKgHZ0dwN0/cQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFBoPUn0
+LBwGlN+VYH+Wexf+T3GtZMjdd9LvWVXoP+iOBSoh8gfStadS/pyxtuJbdxdA6nLW
+I8sogTLDAHkY7FkXicnGah5xyf23dKUlRWnFSKsZ4UWKJWsZ7uW7EvV/96aNUcPw
+nXS3qT6gpf+2SQMT2iLM7XGCK5nPOrf1LXLI
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 1 Policy Validation Authority, CN=http://www.valicert.com//Email=info@valicert.com
+        Validity
+            Not Before: Jun 25 22:23:48 1999 GMT
+            Not After : Jun 25 22:23:48 2019 GMT
+        Subject: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 1 Policy Validation Authority, CN=http://www.valicert.com//Email=info@valicert.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d8:59:82:7a:89:b8:96:ba:a6:2f:68:6f:58:2e:
+                    a7:54:1c:06:6e:f4:ea:8d:48:bc:31:94:17:f0:f3:
+                    4e:bc:b2:b8:35:92:76:b0:d0:a5:a5:01:d7:00:03:
+                    12:22:19:08:f8:ff:11:23:9b:ce:07:f5:bf:69:1a:
+                    26:fe:4e:e9:d1:7f:9d:2c:40:1d:59:68:6e:a6:f8:
+                    58:b0:9d:1a:8f:d3:3f:f1:dc:19:06:81:a8:0e:e0:
+                    3a:dd:c8:53:45:09:06:e6:0f:70:c3:fa:40:a6:0e:
+                    e2:56:05:0f:18:4d:fc:20:82:d1:73:55:74:8d:76:
+                    72:a0:1d:9d:1d:c0:dd:3f:71
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        50:68:3d:49:f4:2c:1c:06:94:df:95:60:7f:96:7b:17:fe:4f:
+        71:ad:64:c8:dd:77:d2:ef:59:55:e8:3f:e8:8e:05:2a:21:f2:
+        07:d2:b5:a7:52:fe:9c:b1:b6:e2:5b:77:17:40:ea:72:d6:23:
+        cb:28:81:32:c3:00:79:18:ec:59:17:89:c9:c6:6a:1e:71:c9:
+        fd:b7:74:a5:25:45:69:c5:48:ab:19:e1:45:8a:25:6b:19:ee:
+        e5:bb:12:f5:7f:f7:a6:8d:51:c3:f0:9d:74:b7:a9:3e:a0:a5:
+        ff:b6:49:03:13:da:22:cc:ed:71:82:2b:99:cf:3a:b7:f5:2d:
+        72:c8
+
+ValiCert Class 2 VA
+===================
+MD5 Fingerprint: A9:23:75:9B:BA:49:36:6E:31:C2:DB:F2:E7:66:BA:87
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
+IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
+BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
+aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
+9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMTk1NFoXDTE5MDYy
+NjAwMTk1NFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
+azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
+YXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
+Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
+cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDOOnHK5avIWZJV16vY
+dA757tn2VUdZZUcOBVXc65g2PFxTXdMwzzjsvUGJ7SVCCSRrCl6zfN1SLUzm1NZ9
+WlmpZdRJEy0kTRxQb7XBhVQ7/nHk01xC+YDgkRoKWzk2Z/M/VXwbP7RfZHM047QS
+v4dk+NoS/zcnwbNDu+97bi5p9wIDAQABMA0GCSqGSIb3DQEBBQUAA4GBADt/UG9v
+UJSZSWI4OB9L+KXIPqeCgfYrx+jFzug6EILLGACOTb2oWH+heQC1u+mNr0HZDzTu
+IYEZoDJJKPTEjlbVUjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMMj4QssxsodyamEwC
+W/POuZ6lcg5Ktz885hZo+L7tdEy8W9ViH0Pd
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 2 Policy Validation Authority, CN=http://www.valicert.com//Email=info@valicert.com
+        Validity
+            Not Before: Jun 26 00:19:54 1999 GMT
+            Not After : Jun 26 00:19:54 2019 GMT
+        Subject: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 2 Policy Validation Authority, CN=http://www.valicert.com//Email=info@valicert.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:ce:3a:71:ca:e5:ab:c8:59:92:55:d7:ab:d8:74:
+                    0e:f9:ee:d9:f6:55:47:59:65:47:0e:05:55:dc:eb:
+                    98:36:3c:5c:53:5d:d3:30:cf:38:ec:bd:41:89:ed:
+                    25:42:09:24:6b:0a:5e:b3:7c:dd:52:2d:4c:e6:d4:
+                    d6:7d:5a:59:a9:65:d4:49:13:2d:24:4d:1c:50:6f:
+                    b5:c1:85:54:3b:fe:71:e4:d3:5c:42:f9:80:e0:91:
+                    1a:0a:5b:39:36:67:f3:3f:55:7c:1b:3f:b4:5f:64:
+                    73:34:e3:b4:12:bf:87:64:f8:da:12:ff:37:27:c1:
+                    b3:43:bb:ef:7b:6e:2e:69:f7
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        3b:7f:50:6f:6f:50:94:99:49:62:38:38:1f:4b:f8:a5:c8:3e:
+        a7:82:81:f6:2b:c7:e8:c5:ce:e8:3a:10:82:cb:18:00:8e:4d:
+        bd:a8:58:7f:a1:79:00:b5:bb:e9:8d:af:41:d9:0f:34:ee:21:
+        81:19:a0:32:49:28:f4:c4:8e:56:d5:52:33:fd:50:d5:7e:99:
+        6c:03:e4:c9:4c:fc:cb:6c:ab:66:b3:4a:21:8c:e5:b5:0c:32:
+        3e:10:b2:cc:6c:a1:dc:9a:98:4c:02:5b:f3:ce:b9:9e:a5:72:
+        0e:4a:b7:3f:3c:e6:16:68:f8:be:ed:74:4c:bc:5b:d5:62:1f:
+        43:dd
+
+ValiCert Class 3 VA
+===================
+MD5 Fingerprint: A2:6F:53:B7:EE:40:DB:4A:68:E7:FA:18:D9:10:4B:72
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
+IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
+BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
+aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
+9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMjIzM1oXDTE5MDYy
+NjAwMjIzM1owgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
+azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
+YXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
+Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
+cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDjmFGWHOjVsQaBalfD
+cnWTq8+epvzzFlLWLU2fNUSoLgRNB0mKOCn1dzfnt6td3zZxFJmP3MKS8edgkpfs
+2Ejcv8ECIMYkpChMMFp2bbFc893enhBxoYjHW5tBbcqwuI4V7q0zK89HBFx1cQqY
+JJgpp0lZpd34t0NiYfPT4tBVPwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFa7AliE
+Zwgs3x/be0kz9dNnnfS0ChCzycUs4pJqcXgn8nCDQtM+z6lU9PHYkhaM0QTLS6vJ
+n0WuPIqpsHEzXcjFV9+vqDWzf4mH6eglkrh/hXqu1rweN1gqZ8mRzyqBPu3GOd/A
+PhmcGcwTTYJBtYze4D1gCCAPRX5ron+jjBXu
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 3 Policy Validation Authority, CN=http://www.valicert.com//Email=info@valicert.com
+        Validity
+            Not Before: Jun 26 00:22:33 1999 GMT
+            Not After : Jun 26 00:22:33 2019 GMT
+        Subject: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 3 Policy Validation Authority, CN=http://www.valicert.com//Email=info@valicert.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:e3:98:51:96:1c:e8:d5:b1:06:81:6a:57:c3:72:
+                    75:93:ab:cf:9e:a6:fc:f3:16:52:d6:2d:4d:9f:35:
+                    44:a8:2e:04:4d:07:49:8a:38:29:f5:77:37:e7:b7:
+                    ab:5d:df:36:71:14:99:8f:dc:c2:92:f1:e7:60:92:
+                    97:ec:d8:48:dc:bf:c1:02:20:c6:24:a4:28:4c:30:
+                    5a:76:6d:b1:5c:f3:dd:de:9e:10:71:a1:88:c7:5b:
+                    9b:41:6d:ca:b0:b8:8e:15:ee:ad:33:2b:cf:47:04:
+                    5c:75:71:0a:98:24:98:29:a7:49:59:a5:dd:f8:b7:
+                    43:62:61:f3:d3:e2:d0:55:3f
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        56:bb:02:58:84:67:08:2c:df:1f:db:7b:49:33:f5:d3:67:9d:
+        f4:b4:0a:10:b3:c9:c5:2c:e2:92:6a:71:78:27:f2:70:83:42:
+        d3:3e:cf:a9:54:f4:f1:d8:92:16:8c:d1:04:cb:4b:ab:c9:9f:
+        45:ae:3c:8a:a9:b0:71:33:5d:c8:c5:57:df:af:a8:35:b3:7f:
+        89:87:e9:e8:25:92:b8:7f:85:7a:ae:d6:bc:1e:37:58:2a:67:
+        c9:91:cf:2a:81:3e:ed:c6:39:df:c0:3e:19:9c:19:cc:13:4d:
+        82:41:b5:8c:de:e0:3d:60:08:20:0f:45:7e:6b:a2:7f:a3:8c:
+        15:ee
+
+VeriSign Class 4 Primary CA
+===========================
+MD5 Fingerprint: 1B:D1:AD:17:8B:7F:22:13:24:F5:26:E2:5D:4E:B9:10
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICMTCCAZoCBQKmAAABMA0GCSqGSIb3DQEBAgUAMF8xCzAJBgNVBAYTAlVTMRcw
+FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgNCBQdWJsaWMg
+UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NjAxMjkwMDAwMDBa
+Fw05OTEyMzEyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2ln
+biwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgNCBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZp
+Y2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0LJ1
+9njQrlpQ9OlQqZ+M1++RlHDo0iSQdomF1t+s5gEXMoDwnZNHvJplnR+Xrr/phnVj
+IIm9gFidBAydqMEk6QvlMXi9/C0MN2qeeIDpRnX57aP7E3vIwUzSo+/1PLBij0pd
+O92VZ48TucE81qcmm+zDO3rZTbxtm+gVAePwR6kCAwEAATANBgkqhkiG9w0BAQIF
+AAOBgQBT3dPwnCR+QKri/AAa19oM/DJhuBUNlvP6Vxt/M3yv6ZiaYch6s7f/sdyZ
+g9ysEvxwyR84Qu1E9oAuW2szaayc01znX1oYx7EteQSWQZGZQbE8DbqEOcY7l/Am
+yY7uvcxClf8exwI/VAx49byqYHwCaejcrOICdmHEPgPq0ook0Q==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            02:a6:00:00:01
+        Signature Algorithm: md2WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 4 Public Primary Certification Authority
+        Validity
+            Not Before: Jan 29 00:00:00 1996 GMT
+            Not After : Dec 31 23:59:59 1999 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 4 Public Primary Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d0:b2:75:f6:78:d0:ae:5a:50:f4:e9:50:a9:9f:
+                    8c:d7:ef:91:94:70:e8:d2:24:90:76:89:85:d6:df:
+                    ac:e6:01:17:32:80:f0:9d:93:47:bc:9a:65:9d:1f:
+                    97:ae:bf:e9:86:75:63:20:89:bd:80:58:9d:04:0c:
+                    9d:a8:c1:24:e9:0b:e5:31:78:bd:fc:2d:0c:37:6a:
+                    9e:78:80:e9:46:75:f9:ed:a3:fb:13:7b:c8:c1:4c:
+                    d2:a3:ef:f5:3c:b0:62:8f:4a:5d:3b:dd:95:67:8f:
+                    13:b9:c1:3c:d6:a7:26:9b:ec:c3:3b:7a:d9:4d:bc:
+                    6d:9b:e8:15:01:e3:f0:47:a9
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md2WithRSAEncryption
+        53:dd:d3:f0:9c:24:7e:40:aa:e2:fc:00:1a:d7:da:0c:fc:32:
+        61:b8:15:0d:96:f3:fa:57:1b:7f:33:7c:af:e9:98:9a:61:c8:
+        7a:b3:b7:ff:b1:dc:99:83:dc:ac:12:fc:70:c9:1f:38:42:ed:
+        44:f6:80:2e:5b:6b:33:69:ac:9c:d3:5c:e7:5f:5a:18:c7:b1:
+        2d:79:04:96:41:91:99:41:b1:3c:0d:ba:84:39:c6:3b:97:f0:
+        26:c9:8e:ee:bd:cc:42:95:ff:1e:c7:02:3f:54:0c:78:f5:bc:
+        aa:60:7c:02:69:e8:dc:ac:e2:02:76:61:c4:3e:03:ea:d2:8a:
+        24:d1
+
+Verisign Class 1 Public Primary Certification Authority
+=======================================================
+MD5 Fingerprint: 97:60:E8:57:5F:D3:50:47:E5:43:0C:94:36:8A:B0:62
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICPTCCAaYCEQDNun9W8N/kvFT+IqyzcqpVMA0GCSqGSIb3DQEBAgUAMF8xCzAJ
+BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xh
+c3MgMSBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05
+NjAxMjkwMDAwMDBaFw0yODA4MDEyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYD
+VQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMSBQdWJsaWMgUHJp
+bWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOB
+jQAwgYkCgYEA5Rm/baNWYS2ZSHH2Z965jeu3noaACpEO+jglr0aIguVzqKCbJF0N
+H8xlbgyw0FaEGIeaBpsQoXPftFg5a27B9hXVqKg/qhIGjTGsf7A01480Z4gJzRQR
+4k5FVmkfeAKA2txHkSm7NsljXMXg1y2He6G3MrB7MLoqLzGq7qNn2tsCAwEAATAN
+BgkqhkiG9w0BAQIFAAOBgQBMP7iLxmjf7kMzDl3ppssHhE16M/+SG/Q2rdiVIjZo
+EWx8QszznC7EBz8UsA9P/5CSdvnivErpj82ggAr3xSnxgiJduLHdgSOjeyUVRjB5
+FvjqBUuUfx3CHMjjt/QQQDwTw18fU+hI5Ia0e6E1sHslurjTjqs/OJ0ANACY89Fx
+lA==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            cd:ba:7f:56:f0:df:e4:bc:54:fe:22:ac:b3:72:aa:55
+        Signature Algorithm: md2WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 1 Public Primary Certification Authority
+        Validity
+            Not Before: Jan 29 00:00:00 1996 GMT
+            Not After : Aug  1 23:59:59 2028 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 1 Public Primary Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:e5:19:bf:6d:a3:56:61:2d:99:48:71:f6:67:de:
+                    b9:8d:eb:b7:9e:86:80:0a:91:0e:fa:38:25:af:46:
+                    88:82:e5:73:a8:a0:9b:24:5d:0d:1f:cc:65:6e:0c:
+                    b0:d0:56:84:18:87:9a:06:9b:10:a1:73:df:b4:58:
+                    39:6b:6e:c1:f6:15:d5:a8:a8:3f:aa:12:06:8d:31:
+                    ac:7f:b0:34:d7:8f:34:67:88:09:cd:14:11:e2:4e:
+                    45:56:69:1f:78:02:80:da:dc:47:91:29:bb:36:c9:
+                    63:5c:c5:e0:d7:2d:87:7b:a1:b7:32:b0:7b:30:ba:
+                    2a:2f:31:aa:ee:a3:67:da:db
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md2WithRSAEncryption
+        4c:3f:b8:8b:c6:68:df:ee:43:33:0e:5d:e9:a6:cb:07:84:4d:
+        7a:33:ff:92:1b:f4:36:ad:d8:95:22:36:68:11:6c:7c:42:cc:
+        f3:9c:2e:c4:07:3f:14:b0:0f:4f:ff:90:92:76:f9:e2:bc:4a:
+        e9:8f:cd:a0:80:0a:f7:c5:29:f1:82:22:5d:b8:b1:dd:81:23:
+        a3:7b:25:15:46:30:79:16:f8:ea:05:4b:94:7f:1d:c2:1c:c8:
+        e3:b7:f4:10:40:3c:13:c3:5f:1f:53:e8:48:e4:86:b4:7b:a1:
+        35:b0:7b:25:ba:b8:d3:8e:ab:3f:38:9d:00:34:00:98:f3:d1:
+        71:94
+
+Verisign Class 1 Public Primary Certification Authority - G2
+============================================================
+MD5 Fingerprint: F2:7D:E9:54:E4:A3:22:0D:76:9F:E7:0B:BB:B3:24:2B
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDAjCCAmsCEDnKVIn+UCIy/jLZ2/sbhBkwDQYJKoZIhvcNAQEFBQAwgcExCzAJ
+BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh
+c3MgMSBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy
+MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp
+emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X
+DTk4MDUxODAwMDAwMFoXDTE4MDUxODIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw
+FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMSBQdWJsaWMg
+UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo
+YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5
+MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB
+AQUAA4GNADCBiQKBgQCq0Lq+Fi24g9TK0g+8djHKlNgdk4xWArzZbxpvUjZudVYK
+VdPfQ4chEWWKfo+9Id5rMj8bhDSVBZ1BNeuS65bdqlk/AVNtmU/t5eIqWpDBucSm
+Fc/IReumXY6cPvBkJHalzasab7bYe1FhbqZ/h8jit+U03EGI6glAvnOSPWvndQID
+AQABMA0GCSqGSIb3DQEBBQUAA4GBAIv3GhDOdlwHq4OZ3BeAbzQ5XZg+a3Is4cei
+e0ApuXiIukzFo2penm574/ICQQxmvq37rqIUzpLzojSLtLK2JPLl1eDI5WJthHvL
+vrsDi3xXyvA3qZCviu4Dvh0onNkmdqDNxJ1O8K4HFtW+r1cIatCgQkJCHvQgzKV4
+gpUmOIpH
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            39:ca:54:89:fe:50:22:32:fe:32:d9:db:fb:1b:84:19
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 1 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Validity
+            Not Before: May 18 00:00:00 1998 GMT
+            Not After : May 18 23:59:59 2018 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 1 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:aa:d0:ba:be:16:2d:b8:83:d4:ca:d2:0f:bc:76:
+                    31:ca:94:d8:1d:93:8c:56:02:bc:d9:6f:1a:6f:52:
+                    36:6e:75:56:0a:55:d3:df:43:87:21:11:65:8a:7e:
+                    8f:bd:21:de:6b:32:3f:1b:84:34:95:05:9d:41:35:
+                    eb:92:eb:96:dd:aa:59:3f:01:53:6d:99:4f:ed:e5:
+                    e2:2a:5a:90:c1:b9:c4:a6:15:cf:c8:45:eb:a6:5d:
+                    8e:9c:3e:f0:64:24:76:a5:cd:ab:1a:6f:b6:d8:7b:
+                    51:61:6e:a6:7f:87:c8:e2:b7:e5:34:dc:41:88:ea:
+                    09:40:be:73:92:3d:6b:e7:75
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        8b:f7:1a:10:ce:76:5c:07:ab:83:99:dc:17:80:6f:34:39:5d:
+        98:3e:6b:72:2c:e1:c7:a2:7b:40:29:b9:78:88:ba:4c:c5:a3:
+        6a:5e:9e:6e:7b:e3:f2:02:41:0c:66:be:ad:fb:ae:a2:14:ce:
+        92:f3:a2:34:8b:b4:b2:b6:24:f2:e5:d5:e0:c8:e5:62:6d:84:
+        7b:cb:be:bb:03:8b:7c:57:ca:f0:37:a9:90:af:8a:ee:03:be:
+        1d:28:9c:d9:26:76:a0:cd:c4:9d:4e:f0:ae:07:16:d5:be:af:
+        57:08:6a:d0:a0:42:42:42:1e:f4:20:cc:a5:78:82:95:26:38:
+        8a:47
+
+Verisign Class 1 Public Primary Certification Authority - G3
+============================================================
+MD5 Fingerprint: B1:47:BC:18:57:D1:18:A0:78:2D:EC:71:E8:2A:95:73
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEGjCCAwICEQCLW3VWhFSFCwDPrzhIzrGkMA0GCSqGSIb3DQEBBQUAMIHKMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl
+cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu
+LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT
+aWduIENsYXNzIDEgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
+dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD
+VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT
+aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ
+bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu
+IENsYXNzIDEgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
+LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN2E1Lm0+afY8wR4
+nN493GwTFtl63SRRZsDHJlkNrAYIwpTRMx/wgzUfbhvI3qpuFU5UJ+/EbRrsC+MO
+8ESlV8dAWB6jRx9x7GD2bZTIGDnt/kIYVt/kTEkQeE4BdjVjEjbdZrwBBDajVWjV
+ojYJrKshJlQGrT/KFOCsyq0GHZXi+J3x4GD/wn91K0zM2v6HmSHquv4+VNfSWXjb
+PG7PoBMAGrgnoeS+Z5bKoMWznN3JdZ7rMJpfo83ZrngZPyPpXNspva1VyBtUjGP2
+6KbqxzcSXKMpHgLZ2x87tNcPVkeBFQRKr4Mn0cVYiMHd9qqnoxjaaKptEVHhv2Vr
+n5Z20T0CAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAq2aN17O6x5q25lXQBfGfMY1a
+qtmqRiYPce2lrVNWYgFHKkTp/j90CxObufRNG7LRX7K20ohcs5/Ny9Sn2WCVhDr4
+wTcdYcrnsMXlkdpUpqwxga6X3s0IrLjAl4B/bnKk52kTlWUfxJM8/XmPBNQ+T+r3
+ns7NZ3xPZQL/kYVUc8f/NveGLezQXk//EZ9yBta4GvFMDSZl4kSAHsef493oCtrs
+pSCAaWihT37ha88HQfqDjrw43bAuEbFrskLMmrz5SCJ5ShkPshw+IHTZasO+8ih4
+E1Z5T21Q6huwtVexN2ZYI/PcD98Kh8TvhgXVOBRgmaNL3gaWcSzy27YfpO8/7g==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            8b:5b:75:56:84:54:85:0b:00:cf:af:38:48:ce:b1:a4
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 1 Public Primary Certification Authority - G3
+        Validity
+            Not Before: Oct  1 00:00:00 1999 GMT
+            Not After : Jul 16 23:59:59 2036 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 1 Public Primary Certification Authority - G3
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:dd:84:d4:b9:b4:f9:a7:d8:f3:04:78:9c:de:3d:
+                    dc:6c:13:16:d9:7a:dd:24:51:66:c0:c7:26:59:0d:
+                    ac:06:08:c2:94:d1:33:1f:f0:83:35:1f:6e:1b:c8:
+                    de:aa:6e:15:4e:54:27:ef:c4:6d:1a:ec:0b:e3:0e:
+                    f0:44:a5:57:c7:40:58:1e:a3:47:1f:71:ec:60:f6:
+                    6d:94:c8:18:39:ed:fe:42:18:56:df:e4:4c:49:10:
+                    78:4e:01:76:35:63:12:36:dd:66:bc:01:04:36:a3:
+                    55:68:d5:a2:36:09:ac:ab:21:26:54:06:ad:3f:ca:
+                    14:e0:ac:ca:ad:06:1d:95:e2:f8:9d:f1:e0:60:ff:
+                    c2:7f:75:2b:4c:cc:da:fe:87:99:21:ea:ba:fe:3e:
+                    54:d7:d2:59:78:db:3c:6e:cf:a0:13:00:1a:b8:27:
+                    a1:e4:be:67:96:ca:a0:c5:b3:9c:dd:c9:75:9e:eb:
+                    30:9a:5f:a3:cd:d9:ae:78:19:3f:23:e9:5c:db:29:
+                    bd:ad:55:c8:1b:54:8c:63:f6:e8:a6:ea:c7:37:12:
+                    5c:a3:29:1e:02:d9:db:1f:3b:b4:d7:0f:56:47:81:
+                    15:04:4a:af:83:27:d1:c5:58:88:c1:dd:f6:aa:a7:
+                    a3:18:da:68:aa:6d:11:51:e1:bf:65:6b:9f:96:76:
+                    d1:3d
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        ab:66:8d:d7:b3:ba:c7:9a:b6:e6:55:d0:05:f1:9f:31:8d:5a:
+        aa:d9:aa:46:26:0f:71:ed:a5:ad:53:56:62:01:47:2a:44:e9:
+        fe:3f:74:0b:13:9b:b9:f4:4d:1b:b2:d1:5f:b2:b6:d2:88:5c:
+        b3:9f:cd:cb:d4:a7:d9:60:95:84:3a:f8:c1:37:1d:61:ca:e7:
+        b0:c5:e5:91:da:54:a6:ac:31:81:ae:97:de:cd:08:ac:b8:c0:
+        97:80:7f:6e:72:a4:e7:69:13:95:65:1f:c4:93:3c:fd:79:8f:
+        04:d4:3e:4f:ea:f7:9e:ce:cd:67:7c:4f:65:02:ff:91:85:54:
+        73:c7:ff:36:f7:86:2d:ec:d0:5e:4f:ff:11:9f:72:06:d6:b8:
+        1a:f1:4c:0d:26:65:e2:44:80:1e:c7:9f:e3:dd:e8:0a:da:ec:
+        a5:20:80:69:68:a1:4f:7e:e1:6b:cf:07:41:fa:83:8e:bc:38:
+        dd:b0:2e:11:b1:6b:b2:42:cc:9a:bc:f9:48:22:79:4a:19:0f:
+        b2:1c:3e:20:74:d9:6a:c3:be:f2:28:78:13:56:79:4f:6d:50:
+        ea:1b:b0:b5:57:b1:37:66:58:23:f3:dc:0f:df:0a:87:c4:ef:
+        86:05:d5:38:14:60:99:a3:4b:de:06:96:71:2c:f2:db:b6:1f:
+        a4:ef:3f:ee
+
+Verisign Class 2 Public Primary Certification Authority
+=======================================================
+MD5 Fingerprint: B3:9C:25:B1:C3:2E:32:53:80:15:30:9D:4D:02:77:3E
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICPDCCAaUCEC0b/EoXjaOR6+f/9YtFvgswDQYJKoZIhvcNAQECBQAwXzELMAkG
+A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
+cyAyIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
+MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
+BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAyIFB1YmxpYyBQcmlt
+YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
+ADCBiQKBgQC2WoujDWojg4BrzzmH9CETMwZMJaLtVRKXxaeAufqDwSCg+i8VDXyh
+YGt+eSz6Bg86rvYbb7HS/y8oUl+DfUvEerf4Zh+AVPy3wo5ZShRXRtGak75BkQO7
+FYCTXOvnzAhsPz6zSvz/S2wj1VCCJkQZjiPDceoZJEcEnnW/yKYAHwIDAQABMA0G
+CSqGSIb3DQEBAgUAA4GBAIobK/o5wXTXXtgZZKJYSi034DNHD6zt96rbHuSLBlxg
+J8pFUs4W7z8GZOeUaHxgMxURaa+dYo2jA1Rrpr7l7gUYYAS/QoD90KioHgE796Nc
+r6Pc5iaAIzy4RHT3Cq5Ji2F4zCS/iIqnDupzGUH9TQPwiNHleI2lKk/2lw0Xd8rY
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            2d:1b:fc:4a:17:8d:a3:91:eb:e7:ff:f5:8b:45:be:0b
+        Signature Algorithm: md2WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 2 Public Primary Certification Authority
+        Validity
+            Not Before: Jan 29 00:00:00 1996 GMT
+            Not After : Aug  1 23:59:59 2028 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 2 Public Primary Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b6:5a:8b:a3:0d:6a:23:83:80:6b:cf:39:87:f4:
+                    21:13:33:06:4c:25:a2:ed:55:12:97:c5:a7:80:b9:
+                    fa:83:c1:20:a0:fa:2f:15:0d:7c:a1:60:6b:7e:79:
+                    2c:fa:06:0f:3a:ae:f6:1b:6f:b1:d2:ff:2f:28:52:
+                    5f:83:7d:4b:c4:7a:b7:f8:66:1f:80:54:fc:b7:c2:
+                    8e:59:4a:14:57:46:d1:9a:93:be:41:91:03:bb:15:
+                    80:93:5c:eb:e7:cc:08:6c:3f:3e:b3:4a:fc:ff:4b:
+                    6c:23:d5:50:82:26:44:19:8e:23:c3:71:ea:19:24:
+                    47:04:9e:75:bf:c8:a6:00:1f
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md2WithRSAEncryption
+        8a:1b:2b:fa:39:c1:74:d7:5e:d8:19:64:a2:58:4a:2d:37:e0:
+        33:47:0f:ac:ed:f7:aa:db:1e:e4:8b:06:5c:60:27:ca:45:52:
+        ce:16:ef:3f:06:64:e7:94:68:7c:60:33:15:11:69:af:9d:62:
+        8d:a3:03:54:6b:a6:be:e5:ee:05:18:60:04:bf:42:80:fd:d0:
+        a8:a8:1e:01:3b:f7:a3:5c:af:a3:dc:e6:26:80:23:3c:b8:44:
+        74:f7:0a:ae:49:8b:61:78:cc:24:bf:88:8a:a7:0e:ea:73:19:
+        41:fd:4d:03:f0:88:d1:e5:78:8d:a5:2a:4f:f6:97:0d:17:77:
+        ca:d8
+
+Verisign Class 2 Public Primary Certification Authority - G2
+============================================================
+MD5 Fingerprint: 2D:BB:E5:25:D3:D1:65:82:3A:B7:0E:FA:E6:EB:E2:E1
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDAzCCAmwCEQC5L2DMiJ+hekYJuFtwbIqvMA0GCSqGSIb3DQEBBQUAMIHBMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xPDA6BgNVBAsTM0Ns
+YXNzIDIgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBH
+MjE6MDgGA1UECxMxKGMpIDE5OTggVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0aG9y
+aXplZCB1c2Ugb25seTEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazAe
+Fw05ODA1MTgwMDAwMDBaFw0yODA4MDEyMzU5NTlaMIHBMQswCQYDVQQGEwJVUzEX
+MBUGA1UEChMOVmVyaVNpZ24sIEluYy4xPDA6BgNVBAsTM0NsYXNzIDIgUHVibGlj
+IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjE6MDgGA1UECxMx
+KGMpIDE5OTggVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25s
+eTEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazCBnzANBgkqhkiG9w0B
+AQEFAAOBjQAwgYkCgYEAp4gBIXQs5xoD8JjhlzwPIQjxnNuX6Zr8wgQGE75fUsjM
+HiwSViy4AWkszJkfrbCWrnkE8hM5wXuYuggs6MKEEyyqaekJ9MepAqRCwiNPStjw
+DqL7MWzJ5m+ZJwf15vRMeJ5t60aG+rmGyVTyssSv1EYcWskVMP8NbPUtDm3Of3cC
+AwEAATANBgkqhkiG9w0BAQUFAAOBgQByLvl/0fFx+8Se9sVeUYpAmLho+Jscg9ji
+nb3/7aHmZuovCfTK1+qlK5X2JGCGTUQug6XELaDTrnhpb3LabK4I8GOSN+a7xDAX
+rXfMSTWqz9iP0b63GJZHc2pUIjRkLbYWm1lbtFFZOrMLFPQS32eg9K0yZF6xRnIn
+jBJ7xUS0rg==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            b9:2f:60:cc:88:9f:a1:7a:46:09:b8:5b:70:6c:8a:af
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 2 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Validity
+            Not Before: May 18 00:00:00 1998 GMT
+            Not After : Aug  1 23:59:59 2028 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 2 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:a7:88:01:21:74:2c:e7:1a:03:f0:98:e1:97:3c:
+                    0f:21:08:f1:9c:db:97:e9:9a:fc:c2:04:06:13:be:
+                    5f:52:c8:cc:1e:2c:12:56:2c:b8:01:69:2c:cc:99:
+                    1f:ad:b0:96:ae:79:04:f2:13:39:c1:7b:98:ba:08:
+                    2c:e8:c2:84:13:2c:aa:69:e9:09:f4:c7:a9:02:a4:
+                    42:c2:23:4f:4a:d8:f0:0e:a2:fb:31:6c:c9:e6:6f:
+                    99:27:07:f5:e6:f4:4c:78:9e:6d:eb:46:86:fa:b9:
+                    86:c9:54:f2:b2:c4:af:d4:46:1c:5a:c9:15:30:ff:
+                    0d:6c:f5:2d:0e:6d:ce:7f:77
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        72:2e:f9:7f:d1:f1:71:fb:c4:9e:f6:c5:5e:51:8a:40:98:b8:
+        68:f8:9b:1c:83:d8:e2:9d:bd:ff:ed:a1:e6:66:ea:2f:09:f4:
+        ca:d7:ea:a5:2b:95:f6:24:60:86:4d:44:2e:83:a5:c4:2d:a0:
+        d3:ae:78:69:6f:72:da:6c:ae:08:f0:63:92:37:e6:bb:c4:30:
+        17:ad:77:cc:49:35:aa:cf:d8:8f:d1:be:b7:18:96:47:73:6a:
+        54:22:34:64:2d:b6:16:9b:59:5b:b4:51:59:3a:b3:0b:14:f4:
+        12:df:67:a0:f4:ad:32:64:5e:b1:46:72:27:8c:12:7b:c5:44:
+        b4:ae
+
+Verisign Class 2 Public Primary Certification Authority - G3
+============================================================
+MD5 Fingerprint: F8:BE:C4:63:22:C9:A8:46:74:8B:B8:1D:1E:4A:2B:F6
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEGTCCAwECEGFwy0mMX5hFKeewptlQW3owDQYJKoZIhvcNAQEFBQAwgcoxCzAJ
+BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVy
+aVNpZ24gVHJ1c3QgTmV0d29yazE6MDgGA1UECxMxKGMpIDE5OTkgVmVyaVNpZ24s
+IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTFFMEMGA1UEAxM8VmVyaVNp
+Z24gQ2xhc3MgMiBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0
+eSAtIEczMB4XDTk5MTAwMTAwMDAwMFoXDTM2MDcxNjIzNTk1OVowgcoxCzAJBgNV
+BAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVyaVNp
+Z24gVHJ1c3QgTmV0d29yazE6MDgGA1UECxMxKGMpIDE5OTkgVmVyaVNpZ24sIElu
+Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTFFMEMGA1UEAxM8VmVyaVNpZ24g
+Q2xhc3MgMiBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAt
+IEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArwoNwtUs22e5LeWU
+J92lvuCwTY+zYVY81nzD9M0+hsuiiOLh2KRpxbXiv8GmR1BeRjmL1Za6tW8UvxDO
+JxOeBUebMXoT2B/Z0wI3i60sR/COgQanDTAM6/c8DyAd3HJG7qUCyFvDyVZpTMUY
+wZF7C9UTAJu878NIPkZgIIUq1ZC2zYugzDLdt/1AVbJQHFauzI13TccgTacxdu9o
+koqQHgiBVrKtaaNS0MscxCM9H5n+TOgWY47GCI72MfbS+uV23bUckqNJzc0BzWjN
+qWm6o+sdDZykIKbBoMXRRkwXbdKsZj+WjOCE1Db/IlnF+RFgqF8EffIa9iVCYQ/E
+Srg+iQIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQA0JhU8wI1NQ0kdvekhktdmnLfe
+xbjQ5F1fdiLAJvmEOjr5jLX77GDx6M4EsMjdpwOPMPOY36TmpDHf0xwLRtxyID+u
+7gU8pDM/CzmscHhzS5kr3zDCVLCoO1Wh/hYozUK9dG6A2ydEp85EXdQbkJgNHkKU
+sQAsBNB0owIFImNjzYO1+8FtYmtpdf1dcEG59b98377BMnMiIYtYgXsVkXq642RI
+sH/7NiXaldDxJBQX3RiAa0YjOVT1jmIJBB2UkKab5iXiQkWquJCtvgiPqQtCGJTP
+cjnhsUPgKM+351psE2tJs//jGHyJizNdrDPXp/naOlXJWBD5qu9ats9LS98q
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            61:70:cb:49:8c:5f:98:45:29:e7:b0:a6:d9:50:5b:7a
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 2 Public Primary Certification Authority - G3
+        Validity
+            Not Before: Oct  1 00:00:00 1999 GMT
+            Not After : Jul 16 23:59:59 2036 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 2 Public Primary Certification Authority - G3
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:af:0a:0d:c2:d5:2c:db:67:b9:2d:e5:94:27:dd:
+                    a5:be:e0:b0:4d:8f:b3:61:56:3c:d6:7c:c3:f4:cd:
+                    3e:86:cb:a2:88:e2:e1:d8:a4:69:c5:b5:e2:bf:c1:
+                    a6:47:50:5e:46:39:8b:d5:96:ba:b5:6f:14:bf:10:
+                    ce:27:13:9e:05:47:9b:31:7a:13:d8:1f:d9:d3:02:
+                    37:8b:ad:2c:47:f0:8e:81:06:a7:0d:30:0c:eb:f7:
+                    3c:0f:20:1d:dc:72:46:ee:a5:02:c8:5b:c3:c9:56:
+                    69:4c:c5:18:c1:91:7b:0b:d5:13:00:9b:bc:ef:c3:
+                    48:3e:46:60:20:85:2a:d5:90:b6:cd:8b:a0:cc:32:
+                    dd:b7:fd:40:55:b2:50:1c:56:ae:cc:8d:77:4d:c7:
+                    20:4d:a7:31:76:ef:68:92:8a:90:1e:08:81:56:b2:
+                    ad:69:a3:52:d0:cb:1c:c4:23:3d:1f:99:fe:4c:e8:
+                    16:63:8e:c6:08:8e:f6:31:f6:d2:fa:e5:76:dd:b5:
+                    1c:92:a3:49:cd:cd:01:cd:68:cd:a9:69:ba:a3:eb:
+                    1d:0d:9c:a4:20:a6:c1:a0:c5:d1:46:4c:17:6d:d2:
+                    ac:66:3f:96:8c:e0:84:d4:36:ff:22:59:c5:f9:11:
+                    60:a8:5f:04:7d:f2:1a:f6:25:42:61:0f:c4:4a:b8:
+                    3e:89
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        34:26:15:3c:c0:8d:4d:43:49:1d:bd:e9:21:92:d7:66:9c:b7:
+        de:c5:b8:d0:e4:5d:5f:76:22:c0:26:f9:84:3a:3a:f9:8c:b5:
+        fb:ec:60:f1:e8:ce:04:b0:c8:dd:a7:03:8f:30:f3:98:df:a4:
+        e6:a4:31:df:d3:1c:0b:46:dc:72:20:3f:ae:ee:05:3c:a4:33:
+        3f:0b:39:ac:70:78:73:4b:99:2b:df:30:c2:54:b0:a8:3b:55:
+        a1:fe:16:28:cd:42:bd:74:6e:80:db:27:44:a7:ce:44:5d:d4:
+        1b:90:98:0d:1e:42:94:b1:00:2c:04:d0:74:a3:02:05:22:63:
+        63:cd:83:b5:fb:c1:6d:62:6b:69:75:fd:5d:70:41:b9:f5:bf:
+        7c:df:be:c1:32:73:22:21:8b:58:81:7b:15:91:7a:ba:e3:64:
+        48:b0:7f:fb:36:25:da:95:d0:f1:24:14:17:dd:18:80:6b:46:
+        23:39:54:f5:8e:62:09:04:1d:94:90:a6:9b:e6:25:e2:42:45:
+        aa:b8:90:ad:be:08:8f:a9:0b:42:18:94:cf:72:39:e1:b1:43:
+        e0:28:cf:b7:e7:5a:6c:13:6b:49:b3:ff:e3:18:7c:89:8b:33:
+        5d:ac:33:d7:a7:f9:da:3a:55:c9:58:10:f9:aa:ef:5a:b6:cf:
+        4b:4b:df:2a
+
+Verisign Class 3 Public Primary Certification Authority
+=======================================================
+MD5 Fingerprint: 10:FC:63:5D:F6:26:3E:0D:F3:25:BE:5F:79:CD:67:67
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG
+A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
+cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
+MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
+BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt
+YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
+ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE
+BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is
+I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G
+CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do
+lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc
+AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            70:ba:e4:1d:10:d9:29:34:b6:38:ca:7b:03:cc:ba:bf
+        Signature Algorithm: md2WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority
+        Validity
+            Not Before: Jan 29 00:00:00 1996 GMT
+            Not After : Aug  1 23:59:59 2028 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:c9:5c:59:9e:f2:1b:8a:01:14:b4:10:df:04:40:
+                    db:e3:57:af:6a:45:40:8f:84:0c:0b:d1:33:d9:d9:
+                    11:cf:ee:02:58:1f:25:f7:2a:a8:44:05:aa:ec:03:
+                    1f:78:7f:9e:93:b9:9a:00:aa:23:7d:d6:ac:85:a2:
+                    63:45:c7:72:27:cc:f4:4c:c6:75:71:d2:39:ef:4f:
+                    42:f0:75:df:0a:90:c6:8e:20:6f:98:0f:f8:ac:23:
+                    5f:70:29:36:a4:c9:86:e7:b1:9a:20:cb:53:a5:85:
+                    e7:3d:be:7d:9a:fe:24:45:33:dc:76:15:ed:0f:a2:
+                    71:64:4c:65:2e:81:68:45:a7
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md2WithRSAEncryption
+        bb:4c:12:2b:cf:2c:26:00:4f:14:13:dd:a6:fb:fc:0a:11:84:
+        8c:f3:28:1c:67:92:2f:7c:b6:c5:fa:df:f0:e8:95:bc:1d:8f:
+        6c:2c:a8:51:cc:73:d8:a4:c0:53:f0:4e:d6:26:c0:76:01:57:
+        81:92:5e:21:f1:d1:b1:ff:e7:d0:21:58:cd:69:17:e3:44:1c:
+        9c:19:44:39:89:5c:dc:9c:00:0f:56:8d:02:99:ed:a2:90:45:
+        4c:e4:bb:10:a4:3d:f0:32:03:0e:f1:ce:f8:e8:c9:51:8c:e6:
+        62:9f:e6:9f:c0:7d:b7:72:9c:c9:36:3a:6b:9f:4e:a8:ff:64:
+        0d:64
+
+Verisign Class 3 Public Primary Certification Authority - G2
+============================================================
+MD5 Fingerprint: A2:33:9B:4C:74:78:73:D4:6C:E7:C1:F3:8D:CB:5C:E9
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJ
+BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh
+c3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy
+MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp
+emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X
+DTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw
+FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMg
+UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo
+YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5
+MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB
+AQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCOFoUgRm1HP9SFIIThbbP4
+pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71lSk8UOg0
+13gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwID
+AQABMA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSk
+U01UbSuvDV1Ai2TT1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7i
+F6YM40AIOw7n60RzKprxaZLvcRTDOaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpY
+oJ2daZH9
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            7d:d9:fe:07:cf:a8:1e:b7:10:79:67:fb:a7:89:34:c6
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Validity
+            Not Before: May 18 00:00:00 1998 GMT
+            Not After : Aug  1 23:59:59 2028 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:cc:5e:d1:11:5d:5c:69:d0:ab:d3:b9:6a:4c:99:
+                    1f:59:98:30:8e:16:85:20:46:6d:47:3f:d4:85:20:
+                    84:e1:6d:b3:f8:a4:ed:0c:f1:17:0f:3b:f9:a7:f9:
+                    25:d7:c1:cf:84:63:f2:7c:63:cf:a2:47:f2:c6:5b:
+                    33:8e:64:40:04:68:c1:80:b9:64:1c:45:77:c7:d8:
+                    6e:f5:95:29:3c:50:e8:34:d7:78:1f:a8:ba:6d:43:
+                    91:95:8f:45:57:5e:7e:c5:fb:ca:a4:04:eb:ea:97:
+                    37:54:30:6f:bb:01:47:32:33:cd:dc:57:9b:64:69:
+                    61:f8:9b:1d:1c:89:4f:5c:67
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        51:4d:cd:be:5c:cb:98:19:9c:15:b2:01:39:78:2e:4d:0f:67:
+        70:70:99:c6:10:5a:94:a4:53:4d:54:6d:2b:af:0d:5d:40:8b:
+        64:d3:d7:ee:de:56:61:92:5f:a6:c4:1d:10:61:36:d3:2c:27:
+        3c:e8:29:09:b9:11:64:74:cc:b5:73:9f:1c:48:a9:bc:61:01:
+        ee:e2:17:a6:0c:e3:40:08:3b:0e:e7:eb:44:73:2a:9a:f1:69:
+        92:ef:71:14:c3:39:ac:71:a7:91:09:6f:e4:71:06:b3:ba:59:
+        57:26:79:00:f6:f8:0d:a2:33:30:28:d4:aa:58:a0:9d:9d:69:
+        91:fd
+
+Verisign Class 3 Public Primary Certification Authority - G3
+============================================================
+MD5 Fingerprint: CD:68:B6:A7:C7:C4:CE:75:E0:1D:4F:57:44:61:92:09
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl
+cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu
+LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT
+aWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
+dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD
+VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT
+aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ
+bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu
+IENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
+LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMu6nFL8eB8aHm8b
+N3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1EUGO+i2t
+KmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGu
+kxUccLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBm
+CC+Vk7+qRy+oRpfwEuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJ
+Xwzw3sJ2zq/3avL6QaaiMxTJ5Xpj055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWu
+imi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAERSWwauSCPc/L8my/uRan2Te
+2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5fj267Cz3qWhMe
+DGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC
+/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565p
+F4ErWjfJXir0xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGt
+TxzhT5yvDwyd93gN2PQ1VoDat20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            9b:7e:06:49:a3:3e:62:b9:d5:ee:90:48:71:29:ef:57
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 3 Public Primary Certification Authority - G3
+        Validity
+            Not Before: Oct  1 00:00:00 1999 GMT
+            Not After : Jul 16 23:59:59 2036 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 3 Public Primary Certification Authority - G3
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:cb:ba:9c:52:fc:78:1f:1a:1e:6f:1b:37:73:bd:
+                    f8:c9:6b:94:12:30:4f:f0:36:47:f5:d0:91:0a:f5:
+                    17:c8:a5:61:c1:16:40:4d:fb:8a:61:90:e5:76:20:
+                    c1:11:06:7d:ab:2c:6e:a6:f5:11:41:8e:fa:2d:ad:
+                    2a:61:59:a4:67:26:4c:d0:e8:bc:52:5b:70:20:04:
+                    58:d1:7a:c9:a4:69:bc:83:17:64:ad:05:8b:bc:d0:
+                    58:ce:8d:8c:f5:eb:f0:42:49:0b:9d:97:27:67:32:
+                    6e:e1:ae:93:15:1c:70:bc:20:4d:2f:18:de:92:88:
+                    e8:6c:85:57:11:1a:e9:7e:e3:26:11:54:a2:45:96:
+                    55:83:ca:30:89:e8:dc:d8:a3:ed:2a:80:3f:7f:79:
+                    65:57:3e:15:20:66:08:2f:95:93:bf:aa:47:2f:a8:
+                    46:97:f0:12:e2:fe:c2:0a:2b:51:e6:76:e6:b7:46:
+                    b7:e2:0d:a6:cc:a8:c3:4c:59:55:89:e6:e8:53:5c:
+                    1c:ea:9d:f0:62:16:0b:a7:c9:5f:0c:f0:de:c2:76:
+                    ce:af:f7:6a:f2:fa:41:a6:a2:33:14:c9:e5:7a:63:
+                    d3:9e:62:37:d5:85:65:9e:0e:e6:53:24:74:1b:5e:
+                    1d:12:53:5b:c7:2c:e7:83:49:3b:15:ae:8a:68:b9:
+                    57:97
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        11:14:96:c1:ab:92:08:f7:3f:2f:c9:b2:fe:e4:5a:9f:64:de:
+        db:21:4f:86:99:34:76:36:57:dd:d0:15:2f:c5:ad:7f:15:1f:
+        37:62:73:3e:d4:e7:5f:ce:17:03:db:35:fa:2b:db:ae:60:09:
+        5f:1e:5f:8f:6e:bb:0b:3d:ea:5a:13:1e:0c:60:6f:b5:c0:b5:
+        23:22:2e:07:0b:cb:a9:74:cb:47:bb:1d:c1:d7:a5:6b:cc:2f:
+        d2:42:fd:49:dd:a7:89:cf:53:ba:da:00:5a:28:bf:82:df:f8:
+        ba:13:1d:50:86:82:fd:8e:30:8f:29:46:b0:1e:3d:35:da:38:
+        62:16:18:4a:ad:e6:b6:51:6c:de:af:62:eb:01:d0:1e:24:fe:
+        7a:8f:12:1a:12:68:b8:fb:66:99:14:14:45:5c:ae:e7:ae:69:
+        17:81:2b:5a:37:c9:5e:2a:f4:c6:e2:a1:5c:54:9b:a6:54:00:
+        cf:f0:f1:c1:c7:98:30:1a:3b:36:16:db:a3:6e:ea:fd:ad:b2:
+        c2:da:ef:02:47:13:8a:c0:f1:b3:31:ad:4f:1c:e1:4f:9c:af:
+        0f:0c:9d:f7:78:0d:d8:f4:35:56:80:da:b7:6d:17:8f:9d:1e:
+        81:64:e1:fe:c5:45:ba:ad:6b:b9:0a:7a:4e:4f:4b:84:ee:4b:
+        f1:7d:dd:11
+
+Verisign Class 4 Public Primary Certification Authority - G2
+============================================================
+MD5 Fingerprint: 26:6D:2C:19:98:B6:70:68:38:50:54:19:EC:90:34:60
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDAjCCAmsCEDKIjprS9esTR/h/xCA3JfgwDQYJKoZIhvcNAQEFBQAwgcExCzAJ
+BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh
+c3MgNCBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy
+MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp
+emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X
+DTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw
+FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgNCBQdWJsaWMg
+UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo
+YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5
+MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB
+AQUAA4GNADCBiQKBgQC68OTP+cSuhVS5B1f5j8V/aBH4xBewRNzjMHPVKmIquNDM
+HO0oW369atyzkSTKQWI8/AIBvxwWMZQFl3Zuoq29YRdsTjCG8FE3KlDHqGKB3FtK
+qsGgtG7rL+VXxbErQHDbWk2hjh+9Ax/YA9SPTJlxvOKCzFjomDqG04Y48wApHwID
+AQABMA0GCSqGSIb3DQEBBQUAA4GBAIWMEsGnuVAVess+rLhDityq3RS6iYF+ATwj
+cSGIL4LcY/oCRaxFWdcqWERbt5+BO5JoPeI3JPV7bI92NZYJqFmduc4jq3TWg/0y
+cyfYaT5DdPauxYma51N86Xv2S/PBZYPejYqcPIiNOVn8qj8ijaHBZlCBckztImRP
+T8qAkbYp
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            32:88:8e:9a:d2:f5:eb:13:47:f8:7f:c4:20:37:25:f8
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 4 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Validity
+            Not Before: May 18 00:00:00 1998 GMT
+            Not After : Aug  1 23:59:59 2028 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 4 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:ba:f0:e4:cf:f9:c4:ae:85:54:b9:07:57:f9:8f:
+                    c5:7f:68:11:f8:c4:17:b0:44:dc:e3:30:73:d5:2a:
+                    62:2a:b8:d0:cc:1c:ed:28:5b:7e:bd:6a:dc:b3:91:
+                    24:ca:41:62:3c:fc:02:01:bf:1c:16:31:94:05:97:
+                    76:6e:a2:ad:bd:61:17:6c:4e:30:86:f0:51:37:2a:
+                    50:c7:a8:62:81:dc:5b:4a:aa:c1:a0:b4:6e:eb:2f:
+                    e5:57:c5:b1:2b:40:70:db:5a:4d:a1:8e:1f:bd:03:
+                    1f:d8:03:d4:8f:4c:99:71:bc:e2:82:cc:58:e8:98:
+                    3a:86:d3:86:38:f3:00:29:1f
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        85:8c:12:c1:a7:b9:50:15:7a:cb:3e:ac:b8:43:8a:dc:aa:dd:
+        14:ba:89:81:7e:01:3c:23:71:21:88:2f:82:dc:63:fa:02:45:
+        ac:45:59:d7:2a:58:44:5b:b7:9f:81:3b:92:68:3d:e2:37:24:
+        f5:7b:6c:8f:76:35:96:09:a8:59:9d:b9:ce:23:ab:74:d6:83:
+        fd:32:73:27:d8:69:3e:43:74:f6:ae:c5:89:9a:e7:53:7c:e9:
+        7b:f6:4b:f3:c1:65:83:de:8d:8a:9c:3c:88:8d:39:59:fc:aa:
+        3f:22:8d:a1:c1:66:50:81:72:4c:ed:22:64:4f:4f:ca:80:91:
+        b6:29
+
+Verisign Class 4 Public Primary Certification Authority - G3
+============================================================
+MD5 Fingerprint: DB:C8:F2:27:2E:B1:EA:6A:29:23:5D:FE:56:3E:33:DF
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl
+cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu
+LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT
+aWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
+dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD
+VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT
+aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ
+bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu
+IENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
+LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK3LpRFpxlmr8Y+1
+GQ9Wzsy1HyDkniYlS+BzZYlZ3tCD5PUPtbut8XzoIfzk6AzufEUiGXaStBO3IFsJ
++mGuqPKljYXCKtbeZjbSmwL0qJJgfJxptI8kHtCGUvYynEFYHiK9zUVilQhu0Gbd
+U6LM8BDcVHOLBKFGMzNcF0C5nk3T875Vg+ixiY5afJqWIpA7iCXy0lOIAgwLePLm
+NxdLMEYH5IBtptiWLugs+BGzOA1mppvqySNb247i8xOOGlktqgLw7KSHZtzBP/XY
+ufTsgsbSPZUd5cBPhMnZo0QoBmrXRazwa2rvTl/4EYIeOGM0ZlDUPpNz+jDDZq3/
+ky2X7wMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAj/ola09b5KROJ1WrIhVZPMq1
+CtRK26vdoV9TxaBXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXttmhwwjIDLk5Mq
+g6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKm
+fjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c
+2NU8Qh0XwRJdRTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/
+bLvSHgCwIe34QWKCudiyxLtGUPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            ec:a0:a7:8b:6e:75:6a:01:cf:c4:7c:cc:2f:94:5e:d7
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 4 Public Primary Certification Authority - G3
+        Validity
+            Not Before: Oct  1 00:00:00 1999 GMT
+            Not After : Jul 16 23:59:59 2036 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 4 Public Primary Certification Authority - G3
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:ad:cb:a5:11:69:c6:59:ab:f1:8f:b5:19:0f:56:
+                    ce:cc:b5:1f:20:e4:9e:26:25:4b:e0:73:65:89:59:
+                    de:d0:83:e4:f5:0f:b5:bb:ad:f1:7c:e8:21:fc:e4:
+                    e8:0c:ee:7c:45:22:19:76:92:b4:13:b7:20:5b:09:
+                    fa:61:ae:a8:f2:a5:8d:85:c2:2a:d6:de:66:36:d2:
+                    9b:02:f4:a8:92:60:7c:9c:69:b4:8f:24:1e:d0:86:
+                    52:f6:32:9c:41:58:1e:22:bd:cd:45:62:95:08:6e:
+                    d0:66:dd:53:a2:cc:f0:10:dc:54:73:8b:04:a1:46:
+                    33:33:5c:17:40:b9:9e:4d:d3:f3:be:55:83:e8:b1:
+                    89:8e:5a:7c:9a:96:22:90:3b:88:25:f2:d2:53:88:
+                    02:0c:0b:78:f2:e6:37:17:4b:30:46:07:e4:80:6d:
+                    a6:d8:96:2e:e8:2c:f8:11:b3:38:0d:66:a6:9b:ea:
+                    c9:23:5b:db:8e:e2:f3:13:8e:1a:59:2d:aa:02:f0:
+                    ec:a4:87:66:dc:c1:3f:f5:d8:b9:f4:ec:82:c6:d2:
+                    3d:95:1d:e5:c0:4f:84:c9:d9:a3:44:28:06:6a:d7:
+                    45:ac:f0:6b:6a:ef:4e:5f:f8:11:82:1e:38:63:34:
+                    66:50:d4:3e:93:73:fa:30:c3:66:ad:ff:93:2d:97:
+                    ef:03
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        8f:fa:25:6b:4f:5b:e4:a4:4e:27:55:ab:22:15:59:3c:ca:b5:
+        0a:d4:4a:db:ab:dd:a1:5f:53:c5:a0:57:39:c2:ce:47:2b:be:
+        3a:c8:56:bf:c2:d9:27:10:3a:b1:05:3c:c0:77:31:bb:3a:d3:
+        05:7b:6d:9a:1c:30:8c:80:cb:93:93:2a:83:ab:05:51:82:02:
+        00:11:67:6b:f3:88:61:47:5f:03:93:d5:5b:0d:e0:f1:d4:a1:
+        32:35:85:b2:3a:db:b0:82:ab:d1:cb:0a:bc:4f:8c:5b:c5:4b:
+        00:3b:1f:2a:82:a6:7e:36:85:dc:7e:3c:67:00:b5:e4:3b:52:
+        e0:a8:eb:5d:15:f9:c6:6d:f0:ad:1d:0e:85:b7:a9:9a:73:14:
+        5a:5b:8f:41:28:c0:d5:e8:2d:4d:a4:5e:cd:aa:d9:ed:ce:dc:
+        d8:d5:3c:42:1d:17:c1:12:5d:45:38:c3:38:f3:fc:85:2e:83:
+        46:48:b2:d7:20:5f:92:36:8f:e7:79:0f:98:5e:99:e8:f0:d0:
+        a4:bb:f5:53:bd:2a:ce:59:b0:af:6e:7f:6c:bb:d2:1e:00:b0:
+        21:ed:f8:41:62:82:b9:d8:b2:c4:bb:46:50:f3:31:c5:8f:01:
+        a8:74:eb:f5:78:27:da:e7:f7:66:43:f3:9e:83:3e:20:aa:c3:
+        35:60:91:ce
+
+Verisign/RSA Commercial CA
+==========================
+MD5 Fingerprint: 5A:0B:DD:42:9E:B2:B4:62:97:32:7F:7F:0A:AA:9A:39
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICIzCCAZACBQJBAAAWMA0GCSqGSIb3DQEBAgUAMFwxCzAJBgNVBAYTAlVTMSAw
+HgYDVQQKExdSU0EgRGF0YSBTZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVy
+Y2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NDExMDQxODU4MzRaFw05
+OTExMDMxODU4MzRaMFwxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdSU0EgRGF0YSBT
+ZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVyY2lhbCBDZXJ0aWZpY2F0aW9u
+IEF1dGhvcml0eTCBmzANBgkqhkiG9w0BAQEFAAOBiQAwgYUCfgCk+4Fie84QJ93o
+975sbsZwmdu41QUDaSiCnHJ/lj+O7Kwpkj+KFPhCdr69XQO5kNTQvAayUTNfxMK/
+touPmbZiImDd298ggrTKoi8tUO2UMt7gVY3UaOLgTNLNBRYulWZcYVI4HlGogqHE
+7yXpCuaLK44xZtn42f29O2nZ6wIDAQABMA0GCSqGSIb3DQEBAgUAA34AdrW2EP4j
+9/dZYkuwX5zBaLxJu7NJbyFHXSudVMQAKD+YufKKg5tgf+tQx6sFEC097TgCwaVI
+0v5loMC86qYjFmZsGySp8+x5NRhPJsjjr1BKx6cxa9B8GJ1Qv6km+iYrRpwUqbtb
+MJhCKLVLU7tDCZJAuqiqWqTGtotXTcU=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            02:41:00:00:16
+        Signature Algorithm: md2WithRSAEncryption
+        Issuer: C=US, O=RSA Data Security, Inc., OU=Commercial Certification Authority
+        Validity
+            Not Before: Nov  4 18:58:34 1994 GMT
+            Not After : Nov  3 18:58:34 1999 GMT
+        Subject: C=US, O=RSA Data Security, Inc., OU=Commercial Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1000 bit)
+                Modulus (1000 bit):
+                    00:a4:fb:81:62:7b:ce:10:27:dd:e8:f7:be:6c:6e:
+                    c6:70:99:db:b8:d5:05:03:69:28:82:9c:72:7f:96:
+                    3f:8e:ec:ac:29:92:3f:8a:14:f8:42:76:be:bd:5d:
+                    03:b9:90:d4:d0:bc:06:b2:51:33:5f:c4:c2:bf:b6:
+                    8b:8f:99:b6:62:22:60:dd:db:df:20:82:b4:ca:a2:
+                    2f:2d:50:ed:94:32:de:e0:55:8d:d4:68:e2:e0:4c:
+                    d2:cd:05:16:2e:95:66:5c:61:52:38:1e:51:a8:82:
+                    a1:c4:ef:25:e9:0a:e6:8b:2b:8e:31:66:d9:f8:d9:
+                    fd:bd:3b:69:d9:eb
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md2WithRSAEncryption
+        76:b5:b6:10:fe:23:f7:f7:59:62:4b:b0:5f:9c:c1:68:bc:49:
+        bb:b3:49:6f:21:47:5d:2b:9d:54:c4:00:28:3f:98:b9:f2:8a:
+        83:9b:60:7f:eb:50:c7:ab:05:10:2d:3d:ed:38:02:c1:a5:48:
+        d2:fe:65:a0:c0:bc:ea:a6:23:16:66:6c:1b:24:a9:f3:ec:79:
+        35:18:4f:26:c8:e3:af:50:4a:c7:a7:31:6b:d0:7c:18:9d:50:
+        bf:a9:26:fa:26:2b:46:9c:14:a9:bb:5b:30:98:42:28:b5:4b:
+        53:bb:43:09:92:40:ba:a8:aa:5a:a4:c6:b6:8b:57:4d:c5
+
+Verisign/RSA Secure Server CA
+=============================
+MD5 Fingerprint: 74:7B:82:03:43:F0:00:9E:6B:B3:EC:47:BF:85:A5:93
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICNDCCAaECEAKtZn5ORf5eV288mBle3cAwDQYJKoZIhvcNAQECBQAwXzELMAkG
+A1UEBhMCVVMxIDAeBgNVBAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYD
+VQQLEyVTZWN1cmUgU2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk0
+MTEwOTAwMDAwMFoXDTEwMDEwNzIzNTk1OVowXzELMAkGA1UEBhMCVVMxIDAeBgNV
+BAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYDVQQLEyVTZWN1cmUgU2Vy
+dmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGbMA0GCSqGSIb3DQEBAQUAA4GJ
+ADCBhQJ+AJLOesGugz5aqomDV6wlAXYMra6OLDfO6zV4ZFQD5YRAUcm/jwjiioII
+0haGN1XpsSECrXZogZoFokvJSyVmIlZsiAeP94FZbYQHZXATcXY+m3dM41CJVphI
+uR2nKRoTLkoRWZweFdVJVCxzOmmCsZc5nG1wZ0jl3S3WyB57AgMBAAEwDQYJKoZI
+hvcNAQECBQADfgBl3X7hsuyw4jrg7HFGmhkRuNPHoLQDQCYCPgmc4RKz0Vr2N6W3
+YQO2WxZpO8ZECAyIUwxrl0nHPjXcbLm7qt9cuzovk2C2qUtN8iD3zV9/ZHuO3ABc
+1/p3yjkWWW8O6tO1g39NTUJWdrTJXwT4OPjr0l91X817/OWOgHz8UA==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            02:ad:66:7e:4e:45:fe:5e:57:6f:3c:98:19:5e:dd:c0
+        Signature Algorithm: md2WithRSAEncryption
+        Issuer: C=US, O=RSA Data Security, Inc., OU=Secure Server Certification Authority
+        Validity
+            Not Before: Nov  9 00:00:00 1994 GMT
+            Not After : Jan  7 23:59:59 2010 GMT
+        Subject: C=US, O=RSA Data Security, Inc., OU=Secure Server Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1000 bit)
+                Modulus (1000 bit):
+                    00:92:ce:7a:c1:ae:83:3e:5a:aa:89:83:57:ac:25:
+                    01:76:0c:ad:ae:8e:2c:37:ce:eb:35:78:64:54:03:
+                    e5:84:40:51:c9:bf:8f:08:e2:8a:82:08:d2:16:86:
+                    37:55:e9:b1:21:02:ad:76:68:81:9a:05:a2:4b:c9:
+                    4b:25:66:22:56:6c:88:07:8f:f7:81:59:6d:84:07:
+                    65:70:13:71:76:3e:9b:77:4c:e3:50:89:56:98:48:
+                    b9:1d:a7:29:1a:13:2e:4a:11:59:9c:1e:15:d5:49:
+                    54:2c:73:3a:69:82:b1:97:39:9c:6d:70:67:48:e5:
+                    dd:2d:d6:c8:1e:7b
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md2WithRSAEncryption
+        65:dd:7e:e1:b2:ec:b0:e2:3a:e0:ec:71:46:9a:19:11:b8:d3:
+        c7:a0:b4:03:40:26:02:3e:09:9c:e1:12:b3:d1:5a:f6:37:a5:
+        b7:61:03:b6:5b:16:69:3b:c6:44:08:0c:88:53:0c:6b:97:49:
+        c7:3e:35:dc:6c:b9:bb:aa:df:5c:bb:3a:2f:93:60:b6:a9:4b:
+        4d:f2:20:f7:cd:5f:7f:64:7b:8e:dc:00:5c:d7:fa:77:ca:39:
+        16:59:6f:0e:ea:d3:b5:83:7f:4d:4d:42:56:76:b4:c9:5f:04:
+        f8:38:f8:eb:d2:5f:75:5f:cd:7b:fc:e5:8e:80:7c:fc:50
diff --git a/samples/ssl/cert.sh b/samples/ssl/cert.sh
new file mode 100755
index 0000000..066eff0
--- /dev/null
+++ b/samples/ssl/cert.sh
@@ -0,0 +1,30 @@
+#!/bin/csh
+
+if ($#) then
+
+  echo "* Create certificate ${1}.pem signed by the root CA"
+  echo "* Store the ${1}.pem key file locally with your client/server application"
+  echo "* Enter a secret pass phrase when requested"
+  echo "* The pass phrase is used to access ${1}.pem in your application"
+  echo "* Enter the application's host name as the Common Name when requested"
+  echo "* Enter the root CA pass phrase (Getting CA Private Key) to sign the key file"
+  echo "* The key file will expire after one year or sooner when the root CA expires"
+
+  # Create a certificate and signing request
+
+  openssl req -newkey rsa:1024 -sha1 -keyout ${1}key.pem -out ${1}req.pem
+
+  # Sign the certificate with the root CA
+
+  openssl x509 -req -in ${1}req.pem -sha1 -extfile openssl.cnf -extensions usr_cert -CA root.pem -CAkey root.pem -CAcreateserial -out ${1}cert.pem -days 365
+
+  cat ${1}cert.pem ${1}key.pem cacert.pem > ${1}.pem
+
+  openssl x509 -subject -issuer -dates -noout -in ${1}.pem
+
+else
+
+  echo "Usage: cert.sh <certname>"
+  exit (1)
+
+endif
diff --git a/samples/ssl/client.pem b/samples/ssl/client.pem
new file mode 100644
index 0000000..5a882a1
--- /dev/null
+++ b/samples/ssl/client.pem
@@ -0,0 +1,61 @@
+-----BEGIN CERTIFICATE-----
+MIIDsTCCAxqgAwIBAgIBBzANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMCVVMx
+CzAJBgNVBAgTAkZMMRQwEgYDVQQHEwtUYWxsYWhhc3NlZTEWMBQGA1UEChMNR2Vu
+aXZpYSwgSW5jLjELMAkGA1UECxMCSVQxFDASBgNVBAMTC2dlbml2aWEuY29tMSIw
+IAYJKoZIhvcNAQkBFhNjb250YWN0QGdlbml2aWEuY29tMB4XDTA1MTIyNDE5MzE1
+M1oXDTA4MTIyMzE5MzE1M1owgY0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJGTDEU
+MBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2aWEsIEluYy4xCzAJ
+BgNVBAsTAklUMRIwEAYDVQQDEwlsb2NhbGhvc3QxIjAgBgkqhkiG9w0BCQEWE2Nv
+bnRhY3RAZ2VuaXZpYS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKKx
+BOIjID++K6gninFhbBIKZMC6BuQTkgOrQ9BwFTpknGn+tjSr4OJdkdyvOTNCKoUW
+5Bw3trLuEFJDSAFQaNamVLMiuoV4FVoESgPrCI8UoZBP3KTFXlHLbvkJ8ALk8onj
+AOdBteHJd4FvG+DK/zuuHtmERHjiL3kfYAwmJe8TAgMBAAGjggEbMIIBFzAJBgNV
+HRMEAjAAMCwGCWCGSAGG+EIBDQQfFh1PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZp
+Y2F0ZTAdBgNVHQ4EFgQUqJ7pX1afyFP4JqRi+1X2V8B8KCowgbwGA1UdIwSBtDCB
+sYAU4MyIi0GgIUqkYRhnJ2GgyUmVd8qhgZWkgZIwgY8xCzAJBgNVBAYTAlVTMQsw
+CQYDVQQIEwJGTDEUMBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2
+aWEsIEluYy4xCzAJBgNVBAsTAklUMRQwEgYDVQQDEwtnZW5pdmlhLmNvbTEiMCAG
+CSqGSIb3DQEJARYTY29udGFjdEBnZW5pdmlhLmNvbYIBADANBgkqhkiG9w0BAQUF
+AAOBgQBfsCaQb+ALfjWGrH0hKEsfl6AuXktHzSv/N5D0UTE7PTx3OAvTeXLNTfXx
+CfkT0nfVtYOK2RZiyliRqCLkpJF159nbngMDO1GwXpuKnEv6fcNAg0PE9Jbfe4GO
+n1RIYJJ+h1uUt71XKFswzg4nwmB8lkuZ9ikeDA7nDzagbqEXpg==
+-----END CERTIFICATE-----
+-----BEGIN RSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: DES-EDE3-CBC,A2AEEBCAB1BAB8A7
+
+qi2X7VaZEZZV5YdBICTEwV0Rt6n6KOQMZRdArLGNxuufLTPn0rz6JcuR+of9rxIz
+kTK/6SGsUZnMH5o4luabeEOe7DtcAuuDT00lBRXcTxIRvAyiwtRDMkTUuGbNEMDs
+/6FWz1tWEDbsYrYtz0f7Sly6hk6khPVjiEtUmKznGiX31LBZQFJ090MTOroDmAYF
+XMNFAveXiLD78HV7+wNhBhYeVwmkPFWKu3jpEZ09+mDdmQ0yOI2Z2ejiiObilqco
+nvp7tt8gzQayB48BOMyMMfp16U+MPtWsfHT/ZggAvt99s+wuasaazPbFUMuumhQu
+Olo5yWBTUEqhuYzYzlRRYbb3mAu1AVJ64X0kO/Xt1/E46F+flII5aFMQSq2aihtJ
+us2PCXZ2RMlWylMgdczcrEwzkaSzKlBSX/MW4csNEcoFpNXoekYHmzDUHQhvPihP
+3akmS1dZ/cY5hS1IcIb+YX6KPMvhGPr2UHnohQFS1X6k9ibHli8p0wBgMA5+c4i7
+div2HTIFvXCm0skbZO534V11Ctix75z0ZmIwcbn++Ytn2KSWyz0N7DNlG2qaXKsd
+VVDHokDSPSirwkAubpQHLhlOMby04pPBVEd/DZKveOt0stWDroxkUcGvb5AL/cDB
+2P/h60JAeDGQYv0Z8eOkA1ZVXyrmpPQPAcdhFna0wMb+JbmMrnDrtEEKxX1LefzB
+m6INmEj5FvvYM8JFMvMAsdr8sdkLpfDlfQS48QuLXXDPySAbW6IiZleiuI3hkX5f
+RHEeEC85WZVoll9/+knBW6lnufhoFUV7ST7XNnS1PeHgZzRBiPJGMw==
+-----END RSA PRIVATE KEY-----
+-----BEGIN CERTIFICATE-----
+MIIDhjCCAu+gAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMCVVMx
+CzAJBgNVBAgTAkZMMRQwEgYDVQQHEwtUYWxsYWhhc3NlZTEWMBQGA1UEChMNR2Vu
+aXZpYSwgSW5jLjELMAkGA1UECxMCSVQxFDASBgNVBAMTC2dlbml2aWEuY29tMSIw
+IAYJKoZIhvcNAQkBFhNjb250YWN0QGdlbml2aWEuY29tMB4XDTA0MTAwMjE3MDgw
+NloXDTA3MTAwMjE3MDgwNlowgY8xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJGTDEU
+MBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2aWEsIEluYy4xCzAJ
+BgNVBAsTAklUMRQwEgYDVQQDEwtnZW5pdmlhLmNvbTEiMCAGCSqGSIb3DQEJARYT
+Y29udGFjdEBnZW5pdmlhLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
+l6K9bLMcrJ6Bz+8hxyolSJy5TdZKo8OmmskP+NAJct7aGWa33u2lkZ+GkoUmLKZ/
+rDNpgmYVNQlOQC4rt5oDt4AUoj584G8PJKSPwymJcX0sbfB7k8xRmLO+vVgSUvDu
+asLMWJ6PsYIuGhp4BwOAgnYACTzsd6kSeIsed8XSx7cCAwEAAaOB7zCB7DAdBgNV
+HQ4EFgQU4MyIi0GgIUqkYRhnJ2GgyUmVd8owgbwGA1UdIwSBtDCBsYAU4MyIi0Gg
+IUqkYRhnJ2GgyUmVd8qhgZWkgZIwgY8xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJG
+TDEUMBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2aWEsIEluYy4x
+CzAJBgNVBAsTAklUMRQwEgYDVQQDEwtnZW5pdmlhLmNvbTEiMCAGCSqGSIb3DQEJ
+ARYTY29udGFjdEBnZW5pdmlhLmNvbYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3
+DQEBBQUAA4GBAFmb9kV+EDx5O4j7dLMu909nFgnBL06sepjqtBIIbZY3GnCgefxK
+p1S6If01/mdV79nZGJldegM77tz4VIlzuIaz+2NO+Gqbr6ErOR+3UGOrRuH39aMT
+1DvwHYpU5GU+lG1aWHdQp8uZ5y4okMg3Z9IZ5nijkUnpCHQO+q/8FrML
+-----END CERTIFICATE-----
diff --git a/samples/ssl/dh512.pem b/samples/ssl/dh512.pem
new file mode 100644
index 0000000..8a70880
--- /dev/null
+++ b/samples/ssl/dh512.pem
@@ -0,0 +1,4 @@
+-----BEGIN DH PARAMETERS-----
+MEYCQQDYbhGNVV6GoxOPsX+rBNGmgfJqh7+e1PFj8IketLqWtA2gkXAB9PKxrkDQ
+jvuEoXE4A6PVPfstmP/Ef4uNfCqLAgEC
+-----END DH PARAMETERS-----
diff --git a/samples/ssl/root.sh b/samples/ssl/root.sh
new file mode 100755
index 0000000..151c85e
--- /dev/null
+++ b/samples/ssl/root.sh
@@ -0,0 +1,17 @@
+# Create the self-signed root CA and root's certificate: root.pem cacert.pem
+
+echo "* Create the self-signed root CA and root's certificate: root.pem cacert.pem"
+echo "* Distribute the cacert.pem to clients to authenticate your server"
+echo "* Enter a (new) secret pass phrase when requested"
+echo "* Enter it again when prompted"
+echo "* You need the pass phrase later to sign the client and server key files"
+echo "* Enter your company name as the Common Name (e.g. genivia.com) when requested"
+echo "* The root CA will expire after three years (1095 days)"
+
+openssl req -newkey rsa:1024 -sha1 -keyout rootkey.pem -out rootreq.pem
+
+openssl x509 -req -in rootreq.pem -sha1 -extfile openssl.cnf -extensions v3_ca -signkey rootkey.pem -out cacert.pem -days 1095
+
+cat cacert.pem rootkey.pem > root.pem
+
+openssl x509 -subject -issuer -dates -noout -in root.pem
diff --git a/samples/ssl/server.pem b/samples/ssl/server.pem
new file mode 100644
index 0000000..b5ef00f
--- /dev/null
+++ b/samples/ssl/server.pem
@@ -0,0 +1,61 @@
+-----BEGIN CERTIFICATE-----
+MIIDsTCCAxqgAwIBAgIBCDANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMCVVMx
+CzAJBgNVBAgTAkZMMRQwEgYDVQQHEwtUYWxsYWhhc3NlZTEWMBQGA1UEChMNR2Vu
+aXZpYSwgSW5jLjELMAkGA1UECxMCSVQxFDASBgNVBAMTC2dlbml2aWEuY29tMSIw
+IAYJKoZIhvcNAQkBFhNjb250YWN0QGdlbml2aWEuY29tMB4XDTA1MTIyNDE5MzMx
+M1oXDTA4MTIyMzE5MzMxM1owgY0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJGTDEU
+MBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2aWEsIEluYy4xCzAJ
+BgNVBAsTAklUMRIwEAYDVQQDEwlsb2NhbGhvc3QxIjAgBgkqhkiG9w0BCQEWE2Nv
+bnRhY3RAZ2VuaXZpYS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM5R
+ShAu0f3F267b+Xhu4Hl3Pe5zTiUlkK95+v7Fg6DE5qX1O4DCWCrgvaVU7jgyJp57
+UM3n4YvERHy2vwlpOlieo91VMVGn4NCD/hv1+2KGtFTiJ2bcNLbMxeP6V9zAFbmm
+UAnRMemUr4RPREK03IKIF1g5+UAgwBmj3p/JwZb3AgMBAAGjggEbMIIBFzAJBgNV
+HRMEAjAAMCwGCWCGSAGG+EIBDQQfFh1PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZp
+Y2F0ZTAdBgNVHQ4EFgQUPcHItRkXw4wSZDwFwyLue7ontMEwgbwGA1UdIwSBtDCB
+sYAU4MyIi0GgIUqkYRhnJ2GgyUmVd8qhgZWkgZIwgY8xCzAJBgNVBAYTAlVTMQsw
+CQYDVQQIEwJGTDEUMBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2
+aWEsIEluYy4xCzAJBgNVBAsTAklUMRQwEgYDVQQDEwtnZW5pdmlhLmNvbTEiMCAG
+CSqGSIb3DQEJARYTY29udGFjdEBnZW5pdmlhLmNvbYIBADANBgkqhkiG9w0BAQUF
+AAOBgQBu0A7sheqpcWBdyxM6DMLGoZIVFCq7hiodaLFLQcAL+zXHD25RmbMllU9Y
+GD1z8gYYY0Ahp0Qdq0bb3WwgfSMjCISSzgSTELPLhGf9P1OBUSVg7tECiQZY5uC0
+wiDY6ISKTo1ZYmczTJW9o/dodl662YQ/gMgeSTpZ0LR0ni3N9g==
+-----END CERTIFICATE-----
+-----BEGIN RSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: DES-EDE3-CBC,F120AF3AE8B2A1F9
+
+3NxVM2+vqMh88SbEjRXWR1anwXE60x4VXB0SEkNmzv3bOSYGpeIY7sEb4m93LLjj
+mkvMBOSJYWzuUxWHePcdIKokDRkCwDjm6UR9Hsf82E0IMBiwPspynP396DZaXEDY
+okqlGBmFX5z6FujG9gNl58Zm09FRl8zmriJtoSu4esasRaez/KaklugrMiMHwVVZ
+PWL4fZxmoxf/gRWjwYG/uYfnMrX2YtIZrOzWn5bJ+EFzs/8IfkMhR5emPCD67oMn
+Q1F6AZgmC9J2QQ0B+evmUbJJLGkM0KITp3r6kfxwupFYgiq3Pxyj6T4hbGXhl3Ts
+y2k2BFlR7O5ijJOSBc6VvKh84KgPMeRGC04p35dzCOv9jvBVJXmj8vb3I/Ux1GjY
+tqmiSekcsjXnFzjQ3Vz39e9Ix0EuHmd6IBZKEBEVixy6l9YK+tk6Xd/2ofh5Gb8h
+qcCb87b+ujvkTfitVp3zxnlkOW1SO3Pnv3HJE4PcCIZJfHdgFxCioPMomYk5/ZYZ
+kXHLeFMqYHRUgYx0EQn/Z6tub36EO4u7B1rWl42HhKkar7VdmIWl3ve6cGKva/6l
+cX5WSFk8/6WtmPcWt8ztE8m+5Y0EjELcf9NZxC+1wLOD0TnhfhdkISIBhl4Ocw1s
+BJ1QonCb1XIUd0e3D6EF5ozcEmhlbcOih63NwAeD3oEFyAvf6Ri9+ranY5y9mT6M
+Mlr2C+hE5fIkvCJhhEfEmeJuv4CCJlUWJ+mVPNgxCyeXp7P7G5k1kiVqLYQFmQeJ
+pklLSHXATZ53iiXVViUCpGz1iUdVJtdf+iUtuT0MIAWUeUjyybsHHA==
+-----END RSA PRIVATE KEY-----
+-----BEGIN CERTIFICATE-----
+MIIDhjCCAu+gAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMCVVMx
+CzAJBgNVBAgTAkZMMRQwEgYDVQQHEwtUYWxsYWhhc3NlZTEWMBQGA1UEChMNR2Vu
+aXZpYSwgSW5jLjELMAkGA1UECxMCSVQxFDASBgNVBAMTC2dlbml2aWEuY29tMSIw
+IAYJKoZIhvcNAQkBFhNjb250YWN0QGdlbml2aWEuY29tMB4XDTA0MTAwMjE3MDgw
+NloXDTA3MTAwMjE3MDgwNlowgY8xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJGTDEU
+MBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2aWEsIEluYy4xCzAJ
+BgNVBAsTAklUMRQwEgYDVQQDEwtnZW5pdmlhLmNvbTEiMCAGCSqGSIb3DQEJARYT
+Y29udGFjdEBnZW5pdmlhLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
+l6K9bLMcrJ6Bz+8hxyolSJy5TdZKo8OmmskP+NAJct7aGWa33u2lkZ+GkoUmLKZ/
+rDNpgmYVNQlOQC4rt5oDt4AUoj584G8PJKSPwymJcX0sbfB7k8xRmLO+vVgSUvDu
+asLMWJ6PsYIuGhp4BwOAgnYACTzsd6kSeIsed8XSx7cCAwEAAaOB7zCB7DAdBgNV
+HQ4EFgQU4MyIi0GgIUqkYRhnJ2GgyUmVd8owgbwGA1UdIwSBtDCBsYAU4MyIi0Gg
+IUqkYRhnJ2GgyUmVd8qhgZWkgZIwgY8xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJG
+TDEUMBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2aWEsIEluYy4x
+CzAJBgNVBAsTAklUMRQwEgYDVQQDEwtnZW5pdmlhLmNvbTEiMCAGCSqGSIb3DQEJ
+ARYTY29udGFjdEBnZW5pdmlhLmNvbYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3
+DQEBBQUAA4GBAFmb9kV+EDx5O4j7dLMu909nFgnBL06sepjqtBIIbZY3GnCgefxK
+p1S6If01/mdV79nZGJldegM77tz4VIlzuIaz+2NO+Gqbr6ErOR+3UGOrRuH39aMT
+1DvwHYpU5GU+lG1aWHdQp8uZ5y4okMg3Z9IZ5nijkUnpCHQO+q/8FrML
+-----END CERTIFICATE-----
diff --git a/samples/ssl/ssl.h b/samples/ssl/ssl.h
new file mode 100644
index 0000000..5d2f1c3
--- /dev/null
+++ b/samples/ssl/ssl.h
@@ -0,0 +1,7 @@
+//gsoap ns service name:	ssl
+//gsoap ns service style:	rpc
+//gsoap ns service encoding:	encoded
+//gsoap ns service namespace:	urn:ssl
+//gsoap ns service location:	https://linprog1.cs.fsu.edu:18081
+typedef double xsd__double;
+int ns__add(xsd__double a, xsd__double b, xsd__double *result);
diff --git a/samples/ssl/sslclient.c b/samples/ssl/sslclient.c
new file mode 100644
index 0000000..2a1b999
--- /dev/null
+++ b/samples/ssl/sslclient.c
@@ -0,0 +1,178 @@
+/*	sslclient.c
+
+	Example secure client.
+
+	Copyright (C) 2000-2003 Robert A. van Engelen, Genivia inc.
+	All Rights Reserved.
+*/
+
+#include "soapH.h"
+#include "ssl.nsmap"
+#include <unistd.h>		/* defines _POSIX_THREADS if pthreads are available */
+#ifdef _POSIX_THREADS
+# include <pthread.h>
+#endif
+#include <signal.h>		/* defines SIGPIPE */
+
+const char server[] = "https://localhost:18081";
+
+int CRYPTO_thread_setup();
+void CRYPTO_thread_cleanup();
+void sigpipe_handle(int);
+
+int main()
+{ struct soap soap;
+  double a, b, result;
+  /* Init OpenSSL */
+  soap_ssl_init();
+  if (CRYPTO_thread_setup())
+  { fprintf(stderr, "Cannot setup thread mutex\n");
+    exit(1);
+  }
+  a = 10.0;
+  b = 20.0;
+  /* Init gSOAP context */
+  soap_init(&soap);
+  /* The supplied server certificate "server.pem" assumes that the server is
+    running on 'localhost', so clients can only connect from the same host when
+    verifying the server's certificate. Use SOAP_SSL_NO_AUTHENTICATION to omit
+    the authentication of the server and use encryption directly from any site.
+    To verify the certificates of third-party services, they must provide a
+    certificate issued by Verisign or another trusted CA. At the client-side,
+    the capath parameter should point to a directory that contains these
+    trusted (root) certificates or the cafile parameter should refer to one
+    file will all certificates. To help you out, the supplied "cacerts.pem"
+    file contains the certificates issued by various CAs. You should use this
+    file for the cafile parameter instead of "cacert.pem" to connect to trusted
+    servers.  Note that the client may fail to connect if the server's
+    credentials have problems (e.g. expired). Use SOAP_SSL_NO_AUTHENTICATION
+    and set cacert to NULL to encrypt messages if you don't care about the
+    trustworthyness of the server.  Note: setting capath may not work on
+    Windows.
+  */
+  if (soap_ssl_client_context(&soap,
+    SOAP_SSL_DEFAULT,	/* use SOAP_SSL_DEFAULT in production code */
+    NULL, 		/* keyfile: required only when client must authenticate to server (see SSL docs on how to obtain this file) */
+    NULL, 		/* password to read the keyfile */
+    "cacert.pem",	/* optional cacert file to store trusted certificates */
+    NULL,		/* optional capath to directory with trusted certificates */
+    NULL		/* if randfile!=NULL: use a file with random data to seed randomness */ 
+  ))
+  { soap_print_fault(&soap, stderr);
+    exit(1);
+  }
+  if (soap_call_ns__add(&soap, server, "", a, b, &result) == SOAP_OK)
+    fprintf(stdout, "Result: %f + %f = %f\n", a, b, result);
+  else
+    soap_print_fault(&soap, stderr);
+  soap_destroy(&soap); /* C++ */
+  soap_end(&soap);
+  soap_done(&soap);
+  CRYPTO_thread_cleanup();
+  return 0;
+}
+
+/******************************************************************************\
+ *
+ *	OpenSSL
+ *
+\******************************************************************************/
+
+#ifdef WITH_OPENSSL
+
+#if defined(WIN32)
+# define MUTEX_TYPE		HANDLE
+# define MUTEX_SETUP(x)		(x) = CreateMutex(NULL, FALSE, NULL)
+# define MUTEX_CLEANUP(x)	CloseHandle(x)
+# define MUTEX_LOCK(x)		WaitForSingleObject((x), INFINITE)
+# define MUTEX_UNLOCK(x)	ReleaseMutex(x)
+# define THREAD_ID		GetCurrentThreadId()
+#elif defined(_POSIX_THREADS)
+# define MUTEX_TYPE		pthread_mutex_t
+# define MUTEX_SETUP(x)		pthread_mutex_init(&(x), NULL)
+# define MUTEX_CLEANUP(x)	pthread_mutex_destroy(&(x))
+# define MUTEX_LOCK(x)		pthread_mutex_lock(&(x))
+# define MUTEX_UNLOCK(x)	pthread_mutex_unlock(&(x))
+# define THREAD_ID		pthread_self()
+#else
+# error "You must define mutex operations appropriate for your platform"
+# error	"See OpenSSL /threads/th-lock.c on how to implement mutex on your platform"
+#endif
+
+struct CRYPTO_dynlock_value
+{ MUTEX_TYPE mutex;
+};
+
+static MUTEX_TYPE *mutex_buf;
+
+static struct CRYPTO_dynlock_value *dyn_create_function(const char *file, int line)
+{ struct CRYPTO_dynlock_value *value;
+  value = (struct CRYPTO_dynlock_value*)malloc(sizeof(struct CRYPTO_dynlock_value));
+  if (value)
+    MUTEX_SETUP(value->mutex);
+  return value;
+}
+
+static void dyn_lock_function(int mode, struct CRYPTO_dynlock_value *l, const char *file, int line)
+{ if (mode & CRYPTO_LOCK)
+    MUTEX_LOCK(l->mutex);
+  else
+    MUTEX_UNLOCK(l->mutex);
+}
+
+static void dyn_destroy_function(struct CRYPTO_dynlock_value *l, const char *file, int line)
+{ MUTEX_CLEANUP(l->mutex);
+  free(l);
+}
+
+void locking_function(int mode, int n, const char *file, int line)
+{ if (mode & CRYPTO_LOCK)
+    MUTEX_LOCK(mutex_buf[n]);
+  else
+    MUTEX_UNLOCK(mutex_buf[n]);
+}
+
+unsigned long id_function()
+{ return (unsigned long)THREAD_ID;
+}
+
+int CRYPTO_thread_setup()
+{ int i;
+  mutex_buf = (MUTEX_TYPE*)malloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t));
+  if (!mutex_buf)
+    return SOAP_EOM;
+  for (i = 0; i < CRYPTO_num_locks(); i++)
+    MUTEX_SETUP(mutex_buf[i]);
+  CRYPTO_set_id_callback(id_function);
+  CRYPTO_set_locking_callback(locking_function);
+  CRYPTO_set_dynlock_create_callback(dyn_create_function);
+  CRYPTO_set_dynlock_lock_callback(dyn_lock_function);
+  CRYPTO_set_dynlock_destroy_callback(dyn_destroy_function);
+  return SOAP_OK;
+}
+
+void CRYPTO_thread_cleanup()
+{ int i;
+  if (!mutex_buf)
+    return;
+  CRYPTO_set_id_callback(NULL);
+  CRYPTO_set_locking_callback(NULL);
+  CRYPTO_set_dynlock_create_callback(NULL);
+  CRYPTO_set_dynlock_lock_callback(NULL);
+  CRYPTO_set_dynlock_destroy_callback(NULL);
+  for (i = 0; i < CRYPTO_num_locks(); i++)
+    MUTEX_CLEANUP(mutex_buf[i]);
+  free(mutex_buf);
+  mutex_buf = NULL;
+}
+
+#endif
+
+/******************************************************************************\
+ *
+ *	SIGPIPE
+ *
+\******************************************************************************/
+
+void sigpipe_handle(int x) { }
+
diff --git a/samples/ssl/sslserver.c b/samples/ssl/sslserver.c
new file mode 100644
index 0000000..949e3f8
--- /dev/null
+++ b/samples/ssl/sslserver.c
@@ -0,0 +1,223 @@
+/*	sslserver.c
+
+	Example stand-alone secure gSOAP Web service.
+
+	Copyright (C) 2000-2003 Robert A. van Engelen, Genivia inc.
+	All Rights Reserved.
+*/
+
+#include "soapH.h"
+#include "ssl.nsmap"
+#include <unistd.h>		/* defines _POSIX_THREADS if pthreads are available */
+#ifdef _POSIX_THREADS
+# include <pthread.h>
+#endif
+#include <signal.h>		/* defines SIGPIPE */
+
+/******************************************************************************\
+ *
+ *	Forward decls
+ *
+\******************************************************************************/
+
+void *process_request(void*);
+int CRYPTO_thread_setup();
+void CRYPTO_thread_cleanup();
+void sigpipe_handle(int);
+
+/******************************************************************************\
+ *
+ *	Main
+ *
+\******************************************************************************/
+
+int main()
+{ int m, s; /* master and slave sockets */
+  pthread_t tid;
+  struct soap soap, *tsoap;
+  /* Need SIGPIPE handler on Unix/Linux systems to catch broken pipes: */
+  signal(SIGPIPE, sigpipe_handle);
+  /* Init OpenSSL */
+  soap_ssl_init();
+  if (CRYPTO_thread_setup())
+  { fprintf(stderr, "Cannot setup thread mutex\n");
+    exit(1);
+  }
+  soap_init(&soap);
+  if (soap_ssl_server_context(&soap,
+    SOAP_SSL_DEFAULT,
+    "server.pem",	/* keyfile: see SSL docs on how to obtain this file */
+    "password",		/* password to read the key file */
+    NULL, 		/* cacert file to store trusted certificates (to authenticate clients) */
+    NULL,		/* capath */
+    "dh512.pem",	/* DH file, if NULL use RSA */
+    NULL,		/* if randfile!=NULL: use a file with random data to seed randomness */ 
+    "sslserver"		/* server identification for SSL session cache (unique server name, e.g. use argv[0]) */
+  ))
+  { soap_print_fault(&soap, stderr);
+    exit(1);
+  }
+  soap.accept_timeout = 60;	/* server times out after 10 minutes of inactivity */
+  soap.recv_timeout = 30;	/* if read stalls, then timeout after 60 seconds */
+  m = soap_bind(&soap, NULL, 18081, 100);
+  if (m < 0)
+  { soap_print_fault(&soap, stderr);
+    exit(1);
+  }
+  fprintf(stderr, "Bind successful: socket = %d\n", m);
+  for (;;)
+  { s = soap_accept(&soap);
+    if (s < 0)
+    { if (soap.errnum)
+        soap_print_fault(&soap, stderr);
+      else
+        fprintf(stderr, "Server timed out\n");
+      break;
+    }
+    fprintf(stderr, "Socket %d connection from IP %d.%d.%d.%d\n", s, (int)(soap.ip>>24)&0xFF, (int)(soap.ip>>16)&0xFF, (int)(soap.ip>>8)&0xFF, (int)soap.ip&0xFF);
+    tsoap = soap_copy(&soap);
+    if (!tsoap)
+    { soap_closesock(&soap);
+      continue;
+    }
+    if (soap_ssl_accept(tsoap))
+    { soap_print_fault(tsoap, stderr);
+      fprintf(stderr, "SSL request failed, continue with next call...\n");
+      soap_end(tsoap);
+      soap_done(tsoap);
+      free(tsoap);
+      continue;
+    }
+    pthread_create(&tid, NULL, &process_request, (void*)tsoap);
+  }
+  soap_end(&soap);
+  soap_done(&soap); /* MUST call after CRYPTO_thread_cleanup */
+  CRYPTO_thread_cleanup();
+  return 0;
+} 
+
+void *process_request(void *soap)
+{ pthread_detach(pthread_self());
+  soap_serve((struct soap*)soap);
+  soap_destroy((struct soap*)soap); /* for C++ */
+  soap_end((struct soap*)soap);
+  soap_done((struct soap*)soap);
+  free(soap);
+  return NULL;
+}
+
+/******************************************************************************\
+ *
+ *	Service methods
+ *
+\******************************************************************************/
+
+int ns__add(struct soap *soap, double a, double b, double *result)
+{ *result = a + b;
+  return SOAP_OK;
+} 
+
+/******************************************************************************\
+ *
+ *	OpenSSL
+ *
+\******************************************************************************/
+
+#ifdef WITH_OPENSSL
+
+#if defined(WIN32)
+# define MUTEX_TYPE		HANDLE
+# define MUTEX_SETUP(x)		(x) = CreateMutex(NULL, FALSE, NULL)
+# define MUTEX_CLEANUP(x)	CloseHandle(x)
+# define MUTEX_LOCK(x)		WaitForSingleObject((x), INFINITE)
+# define MUTEX_UNLOCK(x)	ReleaseMutex(x)
+# define THREAD_ID		GetCurrentThreadId()
+#elif defined(_POSIX_THREADS)
+# define MUTEX_TYPE		pthread_mutex_t
+# define MUTEX_SETUP(x)		pthread_mutex_init(&(x), NULL)
+# define MUTEX_CLEANUP(x)	pthread_mutex_destroy(&(x))
+# define MUTEX_LOCK(x)		pthread_mutex_lock(&(x))
+# define MUTEX_UNLOCK(x)	pthread_mutex_unlock(&(x))
+# define THREAD_ID		pthread_self()
+#else
+# error "You must define mutex operations appropriate for your platform"
+# error	"See OpenSSL /threads/th-lock.c on how to implement mutex on your platform"
+#endif
+
+struct CRYPTO_dynlock_value
+{ MUTEX_TYPE mutex;
+};
+
+static MUTEX_TYPE *mutex_buf;
+
+static struct CRYPTO_dynlock_value *dyn_create_function(const char *file, int line)
+{ struct CRYPTO_dynlock_value *value;
+  value = (struct CRYPTO_dynlock_value*)malloc(sizeof(struct CRYPTO_dynlock_value));
+  if (value)
+    MUTEX_SETUP(value->mutex);
+  return value;
+}
+
+static void dyn_lock_function(int mode, struct CRYPTO_dynlock_value *l, const char *file, int line)
+{ if (mode & CRYPTO_LOCK)
+    MUTEX_LOCK(l->mutex);
+  else
+    MUTEX_UNLOCK(l->mutex);
+}
+
+static void dyn_destroy_function(struct CRYPTO_dynlock_value *l, const char *file, int line)
+{ MUTEX_CLEANUP(l->mutex);
+  free(l);
+}
+
+void locking_function(int mode, int n, const char *file, int line)
+{ if (mode & CRYPTO_LOCK)
+    MUTEX_LOCK(mutex_buf[n]);
+  else
+    MUTEX_UNLOCK(mutex_buf[n]);
+}
+
+unsigned long id_function()
+{ return (unsigned long)THREAD_ID;
+}
+
+int CRYPTO_thread_setup()
+{ int i;
+  mutex_buf = (MUTEX_TYPE*)malloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t));
+  if (!mutex_buf)
+    return SOAP_EOM;
+  for (i = 0; i < CRYPTO_num_locks(); i++)
+    MUTEX_SETUP(mutex_buf[i]);
+  CRYPTO_set_id_callback(id_function);
+  CRYPTO_set_locking_callback(locking_function);
+  CRYPTO_set_dynlock_create_callback(dyn_create_function);
+  CRYPTO_set_dynlock_lock_callback(dyn_lock_function);
+  CRYPTO_set_dynlock_destroy_callback(dyn_destroy_function);
+  return SOAP_OK;
+}
+
+void CRYPTO_thread_cleanup()
+{ int i;
+  if (!mutex_buf)
+    return;
+  CRYPTO_set_id_callback(NULL);
+  CRYPTO_set_locking_callback(NULL);
+  CRYPTO_set_dynlock_create_callback(NULL);
+  CRYPTO_set_dynlock_lock_callback(NULL);
+  CRYPTO_set_dynlock_destroy_callback(NULL);
+  for (i = 0; i < CRYPTO_num_locks(); i++)
+    MUTEX_CLEANUP(mutex_buf[i]);
+  free(mutex_buf);
+  mutex_buf = NULL;
+}
+
+#endif
+
+/******************************************************************************\
+ *
+ *	SIGPIPE
+ *
+\******************************************************************************/
+
+void sigpipe_handle(int x) { }
+
diff --git a/samples/udp/Makefile b/samples/udp/Makefile
new file mode 100644
index 0000000..b166e2e
--- /dev/null
+++ b/samples/udp/Makefile
@@ -0,0 +1,23 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=-DWITH_UDP -DWITH_GZIP
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		udpclient udpserver
+udpclient:	udp.h udpclient.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c -I../../import udp.h
+		$(CC) $(CFLAGS) -o udpclient udpclient.c soapC.c soapClient.c $(SOAPC) $(LIBS) -lz
+udpserver:	udp.h udpserver.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c -I../../import udp.h
+		$(CC) $(CFLAGS) -o udpserver udpserver.c soapC.c soapServer.c $(SOAPC) $(LIBS) -lz
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h soap*Object.h
+distclean:
+		rm -f *.o *.wsdl *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h soap*Object.h udpclient udpserver
diff --git a/samples/udp/MakefileSolaris b/samples/udp/MakefileSolaris
new file mode 100644
index 0000000..a6af373
--- /dev/null
+++ b/samples/udp/MakefileSolaris
@@ -0,0 +1,23 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lxnet -lnsl -lsocket
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=-DWITH_UDP -DWITH_GZIP
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		udpclient udpserver
+udpclient:	udp.h udpclient.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c -I../../import udp.h
+		$(CC) $(CFLAGS) -o udpclient udpclient.c soapC.c soapClient.c $(SOAPC) $(LIBS) -lz
+udpserver:	udp.h udpserver.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c -I../../import udp.h
+		$(CC) $(CFLAGS) -o udpserver udpserver.c soapC.c soapServer.c $(SOAPC) $(LIBS) -lz
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h soap*Object.h
+distclean:
+		rm -f *.o *.wsdl *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h soap*Object.h udpclient udpserver
diff --git a/samples/udp/README.txt b/samples/udp/README.txt
new file mode 100644
index 0000000..b0151f2
--- /dev/null
+++ b/samples/udp/README.txt
@@ -0,0 +1,267 @@
+
+SOAP-over-UDP
+
+Conformance
+-----------
+
+The SOAP-over-UDP specification relies on WS-Addressing. The WS-Addressing.h
+file defines the WS-Addressing elements for client and server applications.
+
+The implementation conforms to the SOAP-over-UDP requirements:
+
+* SOAP-over-UDP server endpoint URL format: soap.udp://host:port/path
+* Support one-way message-exchange pattern (MEP) where a SOAP envelope is
+  carried in a user datagram.
+* Support request-response message-exchange pattern (MEP) where SOAP envelopes
+  are carried in user datagrams.
+* Support multicast transmission of SOAP envelopes carried in user datagrams.
+* Support both SOAP 1.1 and SOAP 1.2 envelopes.
+
+The SOAP-over-UDP specification can be found at:
+
+http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnglobspec/html/soap-over-udp.asp
+
+Features
+--------
+
+The following additional features are also available:
+
+* Zlib/gzip message compression (compile -DWITH_GZIP).
+* SOAP with DIME attachments over UDP.
+* SOAP with MIME attachments (SwA) over UDP.
+* Support for IPv6 (compile -DWITH_IPV6)
+
+Message retransmission
+----------------------
+
+Retransmission is implemented using a retry and exponential back-off algorithm
+as per SOAP-over-UDP retransmission requirements, see SOAP-over-UDP Appendix I.
+
+Duplicate message detection
+---------------------------
+
+The user is responsible for implementing a duplicate message detection
+algorithm, see SOAP-over-UDP Appendix II. An example algorithm is given in
+udpserver.c
+
+Usage
+-----
+
+Note: UDP support requires compilation with -DWITH_UDP
+
+* Header file:
+
+//gsoap wsa schema import: http://schemas.xmlsoap.org/ws/2004/08/addressing
+#import "was.h"
+struct SOAP_ENV__Header
+{ mustUnderstand wsa__AttributedURI                     wsa__MessageID  0;
+  mustUnderstand struct wsa__Relationship               *wsa__RelatesTo 0;
+  mustUnderstand struct wsa__EndpointReferenceType      *wsa__From      0;
+  mustUnderstand struct wsa__EndpointReferenceType      *wsa__ReplyTo   0;
+  mustUnderstand struct wsa__EndpointReferenceType      *wsa__FaultTo   0;
+  mustUnderstand struct wsa__EndpointReferenceType      *wsa__Recipient 0;
+  mustUnderstand wsa__AttributedURI                     wsa__To         0;
+  mustUnderstand wsa__AttributedURI                     wsa__Action     0;
+};
+... your declarations go here (request-response and one-way) ...
+... for example:
+    int ns__echoString(char *str, char **res);
+    int ns__sendString(char *str, void);
+    int ns__sendStringResponse(char *res, void);
+
+* Client-side one-way unicast/multicast:
+  struct soap soap;
+  struct SOAP_ENV__Header header;
+  soap_init(&soap);
+  if (multicast)
+    soap.connect_flags = SO_BROADCAST;
+  soap.send_timeout = 1; // 1s timeout
+  soap_default_SOAP_ENV__Header(&soap, &header);
+  soap.header = &header;
+  header.wsa__MessageID = "<message ID>";
+  header.wsa__To = "<server URL>";
+  header.wsa__Action = "<server action>";
+  if (soap_send_ns__echoString(&soap, "soap.udp://...", NULL, "hello world!"))
+    soap_print_fault(&soap, stderr);
+  soap_end(&soap); // cleanup
+  soap_destroy(&soap); // cleanup
+  soap_done(&soap); // close connection (should not use soap struct after this)
+
+* Client-side request-response unicast:
+  struct soap soap;
+  struct SOAP_ENV__Header header;
+  struct wsa__EndpointReferenceType replyTo;
+  char *res;
+  soap_init(&soap);
+  soap.send_timeout = 1; // 1s timeout
+  soap.recv_timeout = 1; // 1s timeout
+  soap_default_SOAP_ENV__Header(&soap, &header);
+  soap.header = &header;
+  soap_default_wsa__EndpointReferenceType(&soap, &replyTo);
+  replyTo.Address = "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous";
+  header.wsa__MessageID = "<message ID>";
+  header.wsa__To = "<server URL>";
+  header.wsa__Action = "<server action>";
+  header.wsa__ReplyTo = &replyTo;
+  if (soap_call_ns__echoString(&soap, "soap.udp://...", NULL, "hello world!", &res))
+  { if (soap.error == SOAP_EOF && soap.errnum == 0)
+      printf("Timeout: message probably already delivered\n");
+    else
+      soap_print_fault(&soap, stderr);
+  }
+  else
+    printf("UDP server response: %s\n", res);
+  soap_end(&soap); // cleanup
+  soap_destroy(&soap); // cleanup
+  soap_done(&soap); // close connection (should not use soap struct after this)
+
+* Client-side request-response multicast:
+  struct soap soap;
+  struct SOAP_ENV__Header header;
+  struct wsa__EndpointReferenceType replyTo;
+  char *res;
+  soap_init(&soap);
+  soap.connect_flags = SO_BROADCAST;
+  soap.send_timeout = 1; // 1s timeout
+  soap.recv_timeout = 1; // 1s timeout
+  soap_default_SOAP_ENV__Header(&soap, &header);
+  soap.header = &header;
+  soap_default_wsa__EndpointReferenceType(&soap, &replyTo);
+  replyTo.Address = "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous";
+  header.wsa__MessageID = "<message ID>";
+  header.wsa__To = "<server URL>";
+  header.wsa__Action = "<server action>";
+  header.wsa__ReplyTo = &replyTo;
+  if (soap_send_ns__echoString(&soap, "soap.udp://...", NULL, "hello world!"))
+    soap_print_fault(&soap, stderr);
+  else
+  { for (;;)
+    { if (soap_recv_ns__sendStringResponse(&soap, &res))
+        break;
+      printf("Multicast response: %s\n", res);
+    }
+    if (soap.error == SOAP_EOF && soap.errnum == 0)
+      printf("Timeout: no more messages received\n");
+    else
+      soap_print_fault(&soap, stderr);
+  }
+  soap_end(&soap); // cleanup
+  soap_destroy(&soap); // cleanup
+  soap_done(&soap); // close connection (should not use soap struct after this)
+
+
+* Server-side
+  struct soap soap;
+  soap_init1(&soap, SOAP_IO_UDP); // must set UDP flag
+  if (!soap_valid_socket(soap_bind(&soap, host, port, 100)))
+  { soap_print_fault(&soap, stderr);
+    exit(1);
+  }
+  for (;;)
+  { if (soap_serve(&soap))
+      soap_print_fault(&soap, stderr); // just report the problem
+    soap_destroy(&soap);
+    soap_end(&soap);
+  }
+  soap_done(&soap); // close connection
+  ...
+  int ns__echoString(struct soap *soap, char *str, char **res)
+  { if (!soap->header)
+      return soap_sender_fault(soap, "No SOAP header", NULL);
+    if (!soap->header->wsa__MessageID)
+      return soap_sender_fault(soap, "No WS-Addressing MessageID", NULL);
+    soap->header->wsa__RelatesTo = (struct wsa__Relationship*)soap_malloc(soap, sizeof(struct wsa__Relationship));
+    soap_default_wsa__Relationship(soap, soap->header->wsa__RelatesTo);
+    soap->header->wsa__RelatesTo->__item = soap->header->wsa__MessageID;
+    // must check for duplicate messages
+    if (check_received(soap->header->wsa__MessageID))
+    { printf("Request message %s already received\n", soap->header->wsa__MessageID);
+      return SOAP_STOP; // don't return response
+    }
+    if (!soap->header->wsa__ReplyTo || !soap->header->wsa__ReplyTo->Address)
+      return soap_sender_fault(soap, "No WS-Addressing ReplyTo address", NULL);
+    soap->header->wsa__To = soap->header->wsa__ReplyTo->Address;
+    soap->header->wsa__MessageID = soap_strdup(soap, soap_int2s(soap,
+id_count++)) ;
+    soap->header->wsa__Action = "http://genivia.com/udp/echoStringResponse";
+    *res = str;
+    return SOAP_OK;
+  }
+  ...
+  int ns__sendString(struct soap *soap, char *str)
+  { if (!soap->header)
+      return SOAP_STOP;
+    if (!soap->header->wsa__MessageID)
+      return SOAP_STOP;
+    // must check for duplicate messages
+    if (check_received(soap->header->wsa__MessageID))
+      return SOAP_STOP;
+    return SOAP_OK;
+  }
+  ...
+  int ns__sendStringResponse(struct soap *soap, char *res)
+  { return SOAP_NO_METHOD; } // we don't expect to serve this message
+
+Built steps
+-----------
+
+Important: To build SOAP-over-UDP client and server applications, you MUST
+compile all sources using the -DWITH_UDP compiler option.
+
+A Makefile is included to build client and server applications.
+
+To build the example client:
+make udpclient
+
+To build the example server:
+make udpserver
+
+To generate the wsa.h file:
+
+wsdl2h -c -t ../../WS/WS-typemap.dat -o wsa.h http://schemas.xmlsoap.org/ws/2004/08/addressing
+
+Then manually replace in WS-Addressing.h
+//gsoapopt cw
+with
+//gsoapopt c
+to ensure .wsdl and .xsd files are generated for your Web service
+applications.
+
+Example run
+-----------
+
+Start udpserver in a shell window (window 1):
+$ ./udpserver
+
+Execute udpclient in another shell window (window 2):
+$ ./udpclient
+
+Window 1 displays (server):
+
+Accepting requests...
+Request message id1 accepted
+Response message 1 returned
+Accepting requests...
+One-way message id2 accepted and serviced
+Accepting requests...
+
+Window 2 displays (client):
+
+UDP server response: hello world!
+
+Re-execute the udpclient (window 2):
+$ ./udpclient
+
+Window 1 displays (server):
+
+Request message id1 already received
+SOAP FAULT: SOAP-ENV:Client
+"Stopped: no response sent"
+Accepting requests...
+One-way message id2 already received
+Accepting requests...
+
+Window 2 displays (client):
+
+Timeout: message probably already delivered
+
diff --git a/samples/udp/udp.h b/samples/udp/udp.h
new file mode 100644
index 0000000..fc1cef8
--- /dev/null
+++ b/samples/udp/udp.h
@@ -0,0 +1,107 @@
+/*
+
+udp.h
+
+SOAP-over-UDP demo specification for udpclient and udpserver examples
+
+Requires WS-Addressing from import/wsa.h
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Import WS-Addressing
+//
+////////////////////////////////////////////////////////////////////////////////
+
+//gsoap wsa schema import: http://schemas.xmlsoap.org/ws/2004/08/addressing
+
+#import "wsa.h"		// wsa.h is in the import directory
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Demo UDP service
+//
+////////////////////////////////////////////////////////////////////////////////
+
+//gsoap ns service name:	udp
+//gsoap ns service namespace:	urn:gsoap-udp-demo
+//gsoap ns service location:	soap.udp://localhost:10000
+
+//	I would assume UDP transport to be defined in the WSDL bindings, but
+//	this doesn't appear to be possible, so we will use the default HTTP
+//	transport binding and omit the transport directive below.
+//	gsoap ns service transport:	... ???
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	SOAP-over-UDP SOAP Headers with WS-Addressing
+//
+////////////////////////////////////////////////////////////////////////////////
+
+struct SOAP_ENV__Header
+{
+  mustUnderstand _wsa__MessageID      wsa__MessageID 0; ///< WS-Addressing
+  mustUnderstand _wsa__RelatesTo     *wsa__RelatesTo 0; ///< WS-Addressing
+  mustUnderstand _wsa__From          *wsa__From      0; ///< WS-Addressing
+  mustUnderstand _wsa__ReplyTo       *wsa__ReplyTo   0; ///< WS-Addressing
+  mustUnderstand _wsa__FaultTo       *wsa__FaultTo   0; ///< WS-Addressing
+  mustUnderstand _wsa__To             wsa__To        0; ///< WS-Addressing
+  mustUnderstand _wsa__Action         wsa__Action    0; ///< WS-Addressing
+};
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	echoString (anonymous) request-response MEP over UDP
+//
+////////////////////////////////////////////////////////////////////////////////
+
+//gsoap ns service method-documentation: echoString Demo (anonymous) request-response MEP over UDP
+
+//gsoap ns service method-header-part:		echoString wsa__MessageID
+//gsoap ns service method-header-part:		echoString wsa__To
+//gsoap ns service method-header-part:		echoString wsa__Action
+//gsoap ns service method-input-header-part:	sendString wsa__ReplyTo
+//gsoap ns service method-output-header-part:	echoString wsa__RelatesTo
+
+int ns__echoString(char *str, char **res);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	sendString one-way MEP over UDP
+//
+////////////////////////////////////////////////////////////////////////////////
+
+//gsoap ns service method-documentation: sendString Demo one-way MEP over UDP
+
+//gsoap ns service method-header-part:		sendString wsa__MessageID
+//gsoap ns service method-header-part:		sendString wsa__To
+//gsoap ns service method-header-part:		sendString wsa__Action
+
+int ns__sendString(char *str, void);
diff --git a/samples/udp/udpclient.c b/samples/udp/udpclient.c
new file mode 100644
index 0000000..c475244
--- /dev/null
+++ b/samples/udp/udpclient.c
@@ -0,0 +1,110 @@
+/*
+
+udpclient.c
+
+SOAP-over-UDP demo client
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "soapH.h"
+#include "udp.nsmap"
+
+int main(int argc, char **argv)
+{ struct soap soap;
+  struct SOAP_ENV__Header header;
+  struct wsa__EndpointReferenceType replyTo;
+  char *res;
+  char *mid1 = "id1";
+  char *mid2 = "id2";
+
+  if (argc > 1)
+    mid1 = argv[1];
+  if (argc > 2)
+    mid2 = argv[2];
+
+  soap_init(&soap);
+
+  soap.send_timeout = 1;
+  soap.recv_timeout = 1;
+
+  /* To compress the request message (compile with -DWITH_GZIP):
+  soap_set_omode(&soap, SOAP_ENC_ZLIB);
+  */
+
+  /* To transmit DIME attachments:
+  soap_set_dime(&soap);
+  soap_set_dime_attachment(&soap, "abc", 3, "cid:abc", "text/xml", 0, NULL);
+  */
+
+  /* To transmit MIME attachments:
+  soap_set_mime(&soap, NULL, NULL);
+  soap_set_mime_attachment(&soap, "abc", 3, SOAP_MIME_7BIT, "text/xml", "cid:abc", NULL, NULL);
+  */
+
+  /* Prepare SOAP Header */
+  soap_default_SOAP_ENV__Header(&soap, &header);
+  soap.header = &header;
+
+  soap_default_wsa__EndpointReferenceType(&soap, &replyTo);
+  replyTo.Address = "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous";
+
+  /* Set WS-Addressing elements for request-response unicast */
+  header.wsa__MessageID = mid1;
+  header.wsa__To = "http://genivia.com/udp/server";
+  header.wsa__Action = "http://genivia.com/udp/echoString";
+  header.wsa__ReplyTo = &replyTo;
+
+  /* Make request-response call */
+  if (soap_call_ns__echoString(&soap, NULL, NULL, "hello world!", &res))
+  { if (soap.error == SOAP_EOF && soap.errnum == 0)
+      printf("Timeout: message probably already delivered\n");
+    else
+      soap_print_fault(&soap, stderr);
+  }
+  else
+    printf("UDP server response: %s\n", res);
+
+  /* Reset the SOAP Header */
+  soap_default_SOAP_ENV__Header(&soap, &header);
+  soap.header = &header;
+
+  /* Set WS-Addressing elements for one-way unicast */
+  header.wsa__MessageID = mid2;
+  header.wsa__To = "http://genivia.com/udp/server";
+  header.wsa__Action = "http://genivia.com/udp/sendString";
+
+  /* Send one-way message */
+  if (soap_send_ns__sendString(&soap, NULL, NULL, "hello world!"))
+    soap_print_fault(&soap, stderr);
+
+  soap_end(&soap);
+  soap_done(&soap);
+
+  return 0;
+}
diff --git a/samples/udp/udpserver.c b/samples/udp/udpserver.c
new file mode 100644
index 0000000..a560bf8
--- /dev/null
+++ b/samples/udp/udpserver.c
@@ -0,0 +1,143 @@
+/*
+
+udpserver.c
+
+SOAP-over-UDP demo server
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "soapH.h"
+#include "udp.nsmap"
+
+#define MAX_HISTORY (1000)
+
+char *received_id[MAX_HISTORY];
+int last_received;
+void init_received();
+int check_received(const char *id);
+
+int id_count = 1;
+
+int main()
+{ struct soap soap;
+  init_received();
+  soap_init1(&soap, SOAP_IO_UDP);
+  if (!soap_valid_socket(soap_bind(&soap, NULL, 10000, 100)))
+  { soap_print_fault(&soap, stderr);
+    exit(1);
+  }
+  for (;;)
+  { printf("Accepting requests...\n");
+    if (soap_serve(&soap))
+      soap_print_fault(&soap, stderr);
+    soap_end(&soap);
+  }
+  soap_done(&soap);
+  return 0;
+}
+
+void init_received()
+{ int i;
+  for (i = 0; i < MAX_HISTORY; i++)
+    received_id[i] = NULL;
+  last_received = 0;
+}
+
+int check_received(const char *id)
+{ int i;
+  if (!id)
+    return 1;
+  /* Check if Message ID already received */
+  for (i = 0; i < MAX_HISTORY; i++)
+  { if (received_id[i] && !strcmp(id, received_id[i]))
+      return 1;
+  }
+  if (received_id[last_received])
+    free(received_id[last_received]);
+  received_id[last_received++] = strdup(id);
+  /* Wrap to overwrite old IDs */
+  if (last_received >= MAX_HISTORY)
+    last_received = 0;
+  return 0;
+}
+
+int check_header(struct soap *soap)
+{ /* MUST have received a SOAP Header */
+  if (!soap->header)
+    return soap_sender_fault(soap, "No SOAP header", NULL);
+  /* ... with a Message ID */
+  if (!soap->header->wsa__MessageID)
+    return soap_sender_fault(soap, "No WS-Addressing MessageID", NULL);
+  soap->header->wsa__RelatesTo = (struct wsa__Relationship*)soap_malloc(soap, sizeof(struct wsa__Relationship));
+  soap_default_wsa__Relationship(soap, soap->header->wsa__RelatesTo);
+  soap->header->wsa__RelatesTo->__item = soap->header->wsa__MessageID;
+  return SOAP_OK;
+}
+
+int ns__echoString(struct soap *soap, char *str, char **res)
+{ /* Get Header info and setup response Header */
+  if (check_header(soap))
+  { printf("Malformed header\n");
+    return SOAP_FAULT; /* there was a problem */
+  }
+
+  /* If message with MessageID already received, ignore it */
+  if (check_received(soap->header->wsa__MessageID))
+  { printf("Request message %s already received\n", soap->header->wsa__MessageID);
+    return SOAP_STOP;
+  }
+
+  printf("Request message %s accepted\n", soap->header->wsa__MessageID);
+
+  /* Check ReplyTo has Address */
+  if (!soap->header->wsa__ReplyTo || !soap->header->wsa__ReplyTo->Address)
+    return soap_sender_fault(soap, "No WS-Addressing ReplyTo address", NULL);
+  /* Copy Header info into response Header */
+  soap->header->wsa__To = soap->header->wsa__ReplyTo->Address;
+
+  /* Add info to response Header */
+  soap->header->wsa__MessageID = soap_strdup(soap, soap_int2s(soap, id_count++));
+  soap->header->wsa__Action = "http://genivia.com/udp/echoStringResponse";
+
+  /* Copy request string into response string */
+  printf("Response message %s returned\n", soap->header->wsa__MessageID);
+  *res = str;
+
+  return SOAP_OK;
+}
+
+int ns__sendString(struct soap *soap, char *str)
+{ if (check_header(soap))
+    printf("Malformed header\n");
+  else if (check_received(soap->header->wsa__MessageID))
+    printf("One-way message %s already received\n", soap->header->wsa__MessageID);
+  else
+    printf("One-way message %s accepted and serviced\n", soap->header->wsa__MessageID);
+  return SOAP_OK;
+}
diff --git a/samples/udp_VC/README.txt b/samples/udp_VC/README.txt
new file mode 100644
index 0000000..b0151f2
--- /dev/null
+++ b/samples/udp_VC/README.txt
@@ -0,0 +1,267 @@
+
+SOAP-over-UDP
+
+Conformance
+-----------
+
+The SOAP-over-UDP specification relies on WS-Addressing. The WS-Addressing.h
+file defines the WS-Addressing elements for client and server applications.
+
+The implementation conforms to the SOAP-over-UDP requirements:
+
+* SOAP-over-UDP server endpoint URL format: soap.udp://host:port/path
+* Support one-way message-exchange pattern (MEP) where a SOAP envelope is
+  carried in a user datagram.
+* Support request-response message-exchange pattern (MEP) where SOAP envelopes
+  are carried in user datagrams.
+* Support multicast transmission of SOAP envelopes carried in user datagrams.
+* Support both SOAP 1.1 and SOAP 1.2 envelopes.
+
+The SOAP-over-UDP specification can be found at:
+
+http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnglobspec/html/soap-over-udp.asp
+
+Features
+--------
+
+The following additional features are also available:
+
+* Zlib/gzip message compression (compile -DWITH_GZIP).
+* SOAP with DIME attachments over UDP.
+* SOAP with MIME attachments (SwA) over UDP.
+* Support for IPv6 (compile -DWITH_IPV6)
+
+Message retransmission
+----------------------
+
+Retransmission is implemented using a retry and exponential back-off algorithm
+as per SOAP-over-UDP retransmission requirements, see SOAP-over-UDP Appendix I.
+
+Duplicate message detection
+---------------------------
+
+The user is responsible for implementing a duplicate message detection
+algorithm, see SOAP-over-UDP Appendix II. An example algorithm is given in
+udpserver.c
+
+Usage
+-----
+
+Note: UDP support requires compilation with -DWITH_UDP
+
+* Header file:
+
+//gsoap wsa schema import: http://schemas.xmlsoap.org/ws/2004/08/addressing
+#import "was.h"
+struct SOAP_ENV__Header
+{ mustUnderstand wsa__AttributedURI                     wsa__MessageID  0;
+  mustUnderstand struct wsa__Relationship               *wsa__RelatesTo 0;
+  mustUnderstand struct wsa__EndpointReferenceType      *wsa__From      0;
+  mustUnderstand struct wsa__EndpointReferenceType      *wsa__ReplyTo   0;
+  mustUnderstand struct wsa__EndpointReferenceType      *wsa__FaultTo   0;
+  mustUnderstand struct wsa__EndpointReferenceType      *wsa__Recipient 0;
+  mustUnderstand wsa__AttributedURI                     wsa__To         0;
+  mustUnderstand wsa__AttributedURI                     wsa__Action     0;
+};
+... your declarations go here (request-response and one-way) ...
+... for example:
+    int ns__echoString(char *str, char **res);
+    int ns__sendString(char *str, void);
+    int ns__sendStringResponse(char *res, void);
+
+* Client-side one-way unicast/multicast:
+  struct soap soap;
+  struct SOAP_ENV__Header header;
+  soap_init(&soap);
+  if (multicast)
+    soap.connect_flags = SO_BROADCAST;
+  soap.send_timeout = 1; // 1s timeout
+  soap_default_SOAP_ENV__Header(&soap, &header);
+  soap.header = &header;
+  header.wsa__MessageID = "<message ID>";
+  header.wsa__To = "<server URL>";
+  header.wsa__Action = "<server action>";
+  if (soap_send_ns__echoString(&soap, "soap.udp://...", NULL, "hello world!"))
+    soap_print_fault(&soap, stderr);
+  soap_end(&soap); // cleanup
+  soap_destroy(&soap); // cleanup
+  soap_done(&soap); // close connection (should not use soap struct after this)
+
+* Client-side request-response unicast:
+  struct soap soap;
+  struct SOAP_ENV__Header header;
+  struct wsa__EndpointReferenceType replyTo;
+  char *res;
+  soap_init(&soap);
+  soap.send_timeout = 1; // 1s timeout
+  soap.recv_timeout = 1; // 1s timeout
+  soap_default_SOAP_ENV__Header(&soap, &header);
+  soap.header = &header;
+  soap_default_wsa__EndpointReferenceType(&soap, &replyTo);
+  replyTo.Address = "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous";
+  header.wsa__MessageID = "<message ID>";
+  header.wsa__To = "<server URL>";
+  header.wsa__Action = "<server action>";
+  header.wsa__ReplyTo = &replyTo;
+  if (soap_call_ns__echoString(&soap, "soap.udp://...", NULL, "hello world!", &res))
+  { if (soap.error == SOAP_EOF && soap.errnum == 0)
+      printf("Timeout: message probably already delivered\n");
+    else
+      soap_print_fault(&soap, stderr);
+  }
+  else
+    printf("UDP server response: %s\n", res);
+  soap_end(&soap); // cleanup
+  soap_destroy(&soap); // cleanup
+  soap_done(&soap); // close connection (should not use soap struct after this)
+
+* Client-side request-response multicast:
+  struct soap soap;
+  struct SOAP_ENV__Header header;
+  struct wsa__EndpointReferenceType replyTo;
+  char *res;
+  soap_init(&soap);
+  soap.connect_flags = SO_BROADCAST;
+  soap.send_timeout = 1; // 1s timeout
+  soap.recv_timeout = 1; // 1s timeout
+  soap_default_SOAP_ENV__Header(&soap, &header);
+  soap.header = &header;
+  soap_default_wsa__EndpointReferenceType(&soap, &replyTo);
+  replyTo.Address = "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous";
+  header.wsa__MessageID = "<message ID>";
+  header.wsa__To = "<server URL>";
+  header.wsa__Action = "<server action>";
+  header.wsa__ReplyTo = &replyTo;
+  if (soap_send_ns__echoString(&soap, "soap.udp://...", NULL, "hello world!"))
+    soap_print_fault(&soap, stderr);
+  else
+  { for (;;)
+    { if (soap_recv_ns__sendStringResponse(&soap, &res))
+        break;
+      printf("Multicast response: %s\n", res);
+    }
+    if (soap.error == SOAP_EOF && soap.errnum == 0)
+      printf("Timeout: no more messages received\n");
+    else
+      soap_print_fault(&soap, stderr);
+  }
+  soap_end(&soap); // cleanup
+  soap_destroy(&soap); // cleanup
+  soap_done(&soap); // close connection (should not use soap struct after this)
+
+
+* Server-side
+  struct soap soap;
+  soap_init1(&soap, SOAP_IO_UDP); // must set UDP flag
+  if (!soap_valid_socket(soap_bind(&soap, host, port, 100)))
+  { soap_print_fault(&soap, stderr);
+    exit(1);
+  }
+  for (;;)
+  { if (soap_serve(&soap))
+      soap_print_fault(&soap, stderr); // just report the problem
+    soap_destroy(&soap);
+    soap_end(&soap);
+  }
+  soap_done(&soap); // close connection
+  ...
+  int ns__echoString(struct soap *soap, char *str, char **res)
+  { if (!soap->header)
+      return soap_sender_fault(soap, "No SOAP header", NULL);
+    if (!soap->header->wsa__MessageID)
+      return soap_sender_fault(soap, "No WS-Addressing MessageID", NULL);
+    soap->header->wsa__RelatesTo = (struct wsa__Relationship*)soap_malloc(soap, sizeof(struct wsa__Relationship));
+    soap_default_wsa__Relationship(soap, soap->header->wsa__RelatesTo);
+    soap->header->wsa__RelatesTo->__item = soap->header->wsa__MessageID;
+    // must check for duplicate messages
+    if (check_received(soap->header->wsa__MessageID))
+    { printf("Request message %s already received\n", soap->header->wsa__MessageID);
+      return SOAP_STOP; // don't return response
+    }
+    if (!soap->header->wsa__ReplyTo || !soap->header->wsa__ReplyTo->Address)
+      return soap_sender_fault(soap, "No WS-Addressing ReplyTo address", NULL);
+    soap->header->wsa__To = soap->header->wsa__ReplyTo->Address;
+    soap->header->wsa__MessageID = soap_strdup(soap, soap_int2s(soap,
+id_count++)) ;
+    soap->header->wsa__Action = "http://genivia.com/udp/echoStringResponse";
+    *res = str;
+    return SOAP_OK;
+  }
+  ...
+  int ns__sendString(struct soap *soap, char *str)
+  { if (!soap->header)
+      return SOAP_STOP;
+    if (!soap->header->wsa__MessageID)
+      return SOAP_STOP;
+    // must check for duplicate messages
+    if (check_received(soap->header->wsa__MessageID))
+      return SOAP_STOP;
+    return SOAP_OK;
+  }
+  ...
+  int ns__sendStringResponse(struct soap *soap, char *res)
+  { return SOAP_NO_METHOD; } // we don't expect to serve this message
+
+Built steps
+-----------
+
+Important: To build SOAP-over-UDP client and server applications, you MUST
+compile all sources using the -DWITH_UDP compiler option.
+
+A Makefile is included to build client and server applications.
+
+To build the example client:
+make udpclient
+
+To build the example server:
+make udpserver
+
+To generate the wsa.h file:
+
+wsdl2h -c -t ../../WS/WS-typemap.dat -o wsa.h http://schemas.xmlsoap.org/ws/2004/08/addressing
+
+Then manually replace in WS-Addressing.h
+//gsoapopt cw
+with
+//gsoapopt c
+to ensure .wsdl and .xsd files are generated for your Web service
+applications.
+
+Example run
+-----------
+
+Start udpserver in a shell window (window 1):
+$ ./udpserver
+
+Execute udpclient in another shell window (window 2):
+$ ./udpclient
+
+Window 1 displays (server):
+
+Accepting requests...
+Request message id1 accepted
+Response message 1 returned
+Accepting requests...
+One-way message id2 accepted and serviced
+Accepting requests...
+
+Window 2 displays (client):
+
+UDP server response: hello world!
+
+Re-execute the udpclient (window 2):
+$ ./udpclient
+
+Window 1 displays (server):
+
+Request message id1 already received
+SOAP FAULT: SOAP-ENV:Client
+"Stopped: no response sent"
+Accepting requests...
+One-way message id2 already received
+Accepting requests...
+
+Window 2 displays (client):
+
+Timeout: message probably already delivered
+
diff --git a/samples/udp_VC/soapcpp2.exe b/samples/udp_VC/soapcpp2.exe
new file mode 100755
index 0000000..fea95ba
--- /dev/null
+++ b/samples/udp_VC/soapcpp2.exe
Binary files differ
diff --git a/samples/udp_VC/stdsoap2.cpp b/samples/udp_VC/stdsoap2.cpp
new file mode 100644
index 0000000..dbed460
--- /dev/null
+++ b/samples/udp_VC/stdsoap2.cpp
@@ -0,0 +1,13448 @@
+/*
+
+stdsoap2.c[pp] 2.7.6e
+
+gSOAP runtime
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+Contributors:
+
+Wind River Systems Inc., for the following additions under gSOAP public license:
+  - vxWorks compatible	(#define VXWORKS)
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+Installation note:
+
+Win32 build needs winsock.dll (Visual C++ "wsock32.lib")
+To do this in Visual C++ 6.0, go to "Project", "settings", select the "Link"
+tab (the project file needs to be selected in the file view) and add
+"wsock32.lib" to the "Object/library modules" entry
+
+On Mac OS X with gcc (GCC) 3.1 20020420 (prerelease) you MUST compile with
+-fstack_check when using -O2 because gcc 3.1 has a bug that smashes the stack
+when locally allocated data exceeds 64K.
+
+*/
+
+#ifdef AS400
+# pragma convert(819)	/* EBCDIC to ASCII */
+#endif
+
+#include "stdsoap2.h"
+
+#ifdef __cplusplus
+SOAP_SOURCE_STAMP("@(#) stdsoap2.cpp ver 2.7.6e 2006-02-18 12:00:00 GMT")
+extern "C" {
+#else
+SOAP_SOURCE_STAMP("@(#) stdsoap2.c ver 2.7.6e 2006-02-18 12:00:00 GMT")
+#endif
+
+/* 8bit character representing unknown/nonrepresentable character data (e.g. not supported by current locale with multibyte support enabled) */
+#ifndef SOAP_UNKNOWN_CHAR
+#define SOAP_UNKNOWN_CHAR (127)
+#endif
+
+/*      EOF=-1 */
+#define SOAP_LT (soap_wchar)(-2) /* XML character '<' */
+#define SOAP_TT (soap_wchar)(-3) /* XML character '</' */
+#define SOAP_GT (soap_wchar)(-4) /* XML character '>' */
+#define SOAP_QT (soap_wchar)(-5) /* XML character '"' */
+#define SOAP_AP (soap_wchar)(-6) /* XML character ''' */
+
+#define soap_blank(c)		((c) >= 0 && (c) <= 32)
+#define soap_notblank(c)	((c) > 32)
+#define soap_hash_ptr(p)	(((unsigned long)(p) >> 3) & (SOAP_PTRHASH - 1))
+
+#ifdef SOAP_DEBUG
+static void soap_init_logs(struct soap*);
+static void soap_close_logfile(struct soap*, int);
+static void soap_set_logfile(struct soap*, int, const char*);
+static void soap_free_mht(struct soap*);
+static void soap_track_unlink(struct soap*, const void*);
+#endif
+
+#ifndef PALM_2
+static int soap_set_error(struct soap*, const char*, const char*, const char*, const char*, int);
+static int soap_copy_fault(struct soap*, const char*, const char*, const char*, const char*);
+static int soap_getattrval(struct soap*, char*, size_t, soap_wchar);
+#endif
+
+#ifndef PALM_1
+static soap_wchar soap_char(struct soap*);
+static soap_wchar soap_get_pi(struct soap*);
+static int soap_isxdigit(int);
+static void *fplugin(struct soap*, const char*);
+#ifndef WITH_NOIDREF
+static void soap_update_ptrs(struct soap*, char*, char*, char*, char*);
+static int soap_has_copies(struct soap*, const char*, const char*);
+static void soap_init_iht(struct soap*);
+static void soap_free_iht(struct soap*);
+static void soap_init_pht(struct soap*);
+static void soap_free_pht(struct soap*);
+#endif
+#endif
+
+#ifndef WITH_LEAN
+static const char *soap_set_validation_fault(struct soap*, const char*, const char*);
+static int soap_isnumeric(struct soap*, const char*);
+static time_t soap_timegm(struct tm*);
+static struct soap_nlist *soap_lookup_ns(struct soap *soap, const char *tag, size_t n);
+static struct soap_nlist *soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized);
+static void soap_pop_ns(struct soap *soap);
+static void soap_utilize_ns(struct soap *soap, const char *tag, size_t n);
+#endif
+
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart *soap_new_multipart(struct soap*, struct soap_multipart**, struct soap_multipart**, char*, size_t);
+static int soap_putdimefield(struct soap*, const char*, size_t);
+static char *soap_getdimefield(struct soap*, size_t);
+static void soap_select_mime_boundary(struct soap*);
+static int soap_valid_mime_boundary(struct soap*);
+static int soap_match_cid(struct soap*, const char*, const char*);
+static void soap_resolve_attachment(struct soap*, struct soap_multipart*);
+#endif
+#endif
+
+#ifdef WITH_GZIP
+static int soap_getgziphdr(struct soap*);
+#endif
+
+#ifdef WITH_OPENSSL
+static int ssl_init_done = 0;
+static int ssl_auth_init(struct soap*);
+static int ssl_verify_callback(int, X509_STORE_CTX*);
+static int ssl_password(char*, int, int, void *);
+static const char *ssl_error(struct soap*, int);
+/* This callback is included for future references. It should not be deleted
+static DH *ssl_tmp_dh(SSL*, int, int);
+*/
+#endif
+
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char *soap_decode(char*, size_t, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar soap_getchunkchar(struct soap*);
+static const char *http_error(struct soap*, int);
+static int http_post(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
+static int http_get(struct soap*);
+static int http_send_header(struct soap*, const char*);
+static int http_post_header(struct soap*, const char*, const char*);
+static int http_response(struct soap*, int, size_t);
+static int http_parse(struct soap*);
+static int http_parse_header(struct soap*, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int fsend(struct soap*, const char*, size_t);
+static size_t frecv(struct soap*, char*, size_t);
+static int tcp_init(struct soap*);
+static const char *tcp_error(struct soap*);
+#ifndef WITH_IPV6
+static int tcp_gethost(struct soap*, const char *addr, struct in_addr *inaddr);
+#endif
+static int tcp_connect(struct soap*, const char *endpoint, const char *host, int port);
+static int tcp_accept(struct soap*, int, struct sockaddr*, int*);
+static int tcp_disconnect(struct soap*);
+static int tcp_closesocket(struct soap*, SOAP_SOCKET);
+static int tcp_shutdownsocket(struct soap*, SOAP_SOCKET, int);
+static const char *soap_strerror(struct soap*);
+#endif
+#endif
+
+#if defined(PALM) && !defined(PALM_2)
+unsigned short errno;
+#endif
+
+#ifndef PALM_1
+static const char soap_env1[42] = "http://schemas.xmlsoap.org/soap/envelope/";
+static const char soap_enc1[42] = "http://schemas.xmlsoap.org/soap/encoding/";
+static const char soap_env2[40] = "http://www.w3.org/2003/05/soap-envelope";
+static const char soap_enc2[40] = "http://www.w3.org/2003/05/soap-encoding";
+static const char soap_rpc[35] = "http://www.w3.org/2003/05/soap-rpc";
+#endif
+
+#ifndef PALM_1
+const struct soap_double_nan soap_double_nan = {0xFFFFFFFF, 0xFFFFFFFF};
+static const char soap_base64o[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+static const char soap_base64i[81] = "\76XXX\77\64\65\66\67\70\71\72\73\74\75XXXXXXX\00\01\02\03\04\05\06\07\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31XXXXXX\32\33\34\35\36\37\40\41\42\43\44\45\46\47\50\51\52\53\54\55\56\57\60\61\62\63";
+#endif
+
+#ifndef WITH_LEAN
+static const char soap_indent[11] = "\n\t\t\t\t\t\t\t\t\t";
+/* Alternative indentation form for SOAP_XML_INDENT:
+static const char soap_indent[21] = "\n                   ";
+*/
+#endif
+
+static const char soap_padding[4] = "\0\0\0";
+#define SOAP_STR_PADDING (soap_padding)
+#define SOAP_STR_EOS (soap_padding)
+#define SOAP_NON_NULL (soap_padding)
+
+#ifndef WITH_LEAN
+static const struct soap_code_map html_entity_codes[] = /* entities for XHTML parsing */
+{ { 160, "nbsp" },
+  { 161, "iexcl" },
+  { 162, "cent" },
+  { 163, "pound" },
+  { 164, "curren" },
+  { 165, "yen" },
+  { 166, "brvbar" },
+  { 167, "sect" },
+  { 168, "uml" },
+  { 169, "copy" },
+  { 170, "ordf" },
+  { 171, "laquo" },
+  { 172, "not" },
+  { 173, "shy" },
+  { 174, "reg" },
+  { 175, "macr" },
+  { 176, "deg" },
+  { 177, "plusmn" },
+  { 178, "sup2" },
+  { 179, "sup3" },
+  { 180, "acute" },
+  { 181, "micro" },
+  { 182, "para" },
+  { 183, "middot" },
+  { 184, "cedil" },
+  { 185, "sup1" },
+  { 186, "ordm" },
+  { 187, "raquo" },
+  { 188, "frac14" },
+  { 189, "frac12" },
+  { 190, "frac34" },
+  { 191, "iquest" },
+  { 192, "Agrave" },
+  { 193, "Aacute" },
+  { 194, "Acirc" },
+  { 195, "Atilde" },
+  { 196, "Auml" },
+  { 197, "Aring" },
+  { 198, "AElig" },
+  { 199, "Ccedil" },
+  { 200, "Egrave" },
+  { 201, "Eacute" },
+  { 202, "Ecirc" },
+  { 203, "Euml" },
+  { 204, "Igrave" },
+  { 205, "Iacute" },
+  { 206, "Icirc" },
+  { 207, "Iuml" },
+  { 208, "ETH" },
+  { 209, "Ntilde" },
+  { 210, "Ograve" },
+  { 211, "Oacute" },
+  { 212, "Ocirc" },
+  { 213, "Otilde" },
+  { 214, "Ouml" },
+  { 215, "times" },
+  { 216, "Oslash" },
+  { 217, "Ugrave" },
+  { 218, "Uacute" },
+  { 219, "Ucirc" },
+  { 220, "Uuml" },
+  { 221, "Yacute" },
+  { 222, "THORN" },
+  { 223, "szlig" },
+  { 224, "agrave" },
+  { 225, "aacute" },
+  { 226, "acirc" },
+  { 227, "atilde" },
+  { 228, "auml" },
+  { 229, "aring" },
+  { 230, "aelig" },
+  { 231, "ccedil" },
+  { 232, "egrave" },
+  { 233, "eacute" },
+  { 234, "ecirc" },
+  { 235, "euml" },
+  { 236, "igrave" },
+  { 237, "iacute" },
+  { 238, "icirc" },
+  { 239, "iuml" },
+  { 240, "eth" },
+  { 241, "ntilde" },
+  { 242, "ograve" },
+  { 243, "oacute" },
+  { 244, "ocirc" },
+  { 245, "otilde" },
+  { 246, "ouml" },
+  { 247, "divide" },
+  { 248, "oslash" },
+  { 249, "ugrave" },
+  { 250, "uacute" },
+  { 251, "ucirc" },
+  { 252, "uuml" },
+  { 253, "yacute" },
+  { 254, "thorn" },
+  { 255, "yuml" },
+  {   0, NULL }
+};
+#endif
+
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+static const struct soap_code_map h_error_codes[] =
+{
+#ifdef HOST_NOT_FOUND   
+  { HOST_NOT_FOUND, "Host not found" },
+#endif
+#ifdef TRY_AGAIN
+  { TRY_AGAIN, "Try Again" },
+#endif
+#ifdef NO_RECOVERY  
+  { NO_RECOVERY, "No Recovery" },
+#endif
+#ifdef NO_DATA
+  { NO_DATA, "No Data" },
+#endif
+#ifdef NO_ADDRESS
+  { NO_ADDRESS, "No Address" },
+#endif
+  { 0, NULL }
+};
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+static const struct soap_code_map h_http_error_codes[] =
+{ { 201, "Created" },
+  { 202, "Accepted" },
+  { 203, "Non-Authoritative Information" },
+  { 204, "No Content" },
+  { 205, "Reset Content" },
+  { 206, "Partial Content" },
+  { 300, "Multiple Choices" },
+  { 301, "Moved Permanently" },
+  { 302, "Found" },
+  { 303, "See Other" },
+  { 304, "Not Modified" },
+  { 305, "Use Proxy" },
+  { 307, "Temporary Redirect" },
+  { 400, "Bad Request" },
+  { 401, "Unauthorized" },
+  { 402, "Payment Required" },
+  { 403, "Forbidden" },
+  { 404, "Not Found" },
+  { 405, "Method Not Allowed" },
+  { 406, "Not Acceptable" },
+  { 407, "Proxy Authentication Required" },
+  { 408, "Request Time-out" },
+  { 409, "Conflict" },
+  { 410, "Gone" },
+  { 411, "Length Required" },
+  { 412, "Precondition Failed" },
+  { 413, "Request Entity Too Large" },
+  { 414, "Request-URI Too Large" },
+  { 415, "Unsupported Media Type" },
+  { 416, "Requested range not satisfiable" },
+  { 417, "Expectation Failed" },
+  { 500, "Internal Server Error" },
+  { 501, "Not Implemented" },
+  { 502, "Bad Gateway" },
+  { 503, "Service Unavailable" },
+  { 504, "Gateway Time-out" },
+  { 505, "HTTP Version not supported" },
+  {   0, NULL }
+};
+#endif
+#endif
+
+#ifdef WITH_OPENSSL
+static const struct soap_code_map h_ssl_error_codes[] =
+{
+#define _SSL_ERROR(e) { e, #e }
+  _SSL_ERROR(SSL_ERROR_SSL),
+  _SSL_ERROR(SSL_ERROR_ZERO_RETURN),
+  _SSL_ERROR(SSL_ERROR_WANT_READ),
+  _SSL_ERROR(SSL_ERROR_WANT_WRITE),
+  _SSL_ERROR(SSL_ERROR_WANT_CONNECT),
+  _SSL_ERROR(SSL_ERROR_WANT_X509_LOOKUP),
+  _SSL_ERROR(SSL_ERROR_SYSCALL),
+  { 0, NULL }
+};
+#endif
+
+#ifndef WITH_LEANER
+static const struct soap_code_map mime_codes[] =
+{ { SOAP_MIME_7BIT,		"7bit" },
+  { SOAP_MIME_8BIT,		"8bit" },
+  { SOAP_MIME_BINARY,		"binary" },
+  { SOAP_MIME_QUOTED_PRINTABLE, "quoted-printable" },
+  { SOAP_MIME_BASE64,		"base64" },
+  { SOAP_MIME_IETF_TOKEN,	"ietf-token" },
+  { SOAP_MIME_X_TOKEN,		"x-token" },
+  { 0,				NULL }
+};
+#endif
+
+#ifdef WIN32
+static int tcp_done = 0;
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+fsend(struct soap *soap, const char *s, size_t n)
+{ register int nwritten;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  if (soap->os)
+  { soap->os->write(s, n);
+    if (soap->os->good())
+      return SOAP_OK;
+    return SOAP_EOF;
+  }
+#endif
+  while (n)
+  { if (soap_valid_socket(soap->socket))
+    { 
+#ifndef WITH_LEAN
+      if (soap->send_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->send_timeout > 0)
+        { timeout.tv_sec = soap->send_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->send_timeout/1000000;
+          timeout.tv_usec = -soap->send_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { register int r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            return SOAP_EOF;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+          { soap->errnum = soap_socket_errno;
+            return SOAP_EOF;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+        nwritten = SSL_write(soap->ssl, s, n);
+      else if (soap->bio)
+        nwritten = BIO_write(soap->bio, s, n);
+      else
+#endif
+#ifdef WITH_UDP
+      if ((soap->omode & SOAP_IO_UDP))
+      { if (soap->peerlen)
+	  nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+        else
+	  nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	/* retry and back-off algorithm */
+	/* TODO: this is not very clear from specs so verify and limit conditions under which we should loop (e.g. ENOBUFS) */
+	if (nwritten < 0)
+        { struct timeval timeout;
+          fd_set fd;
+	  int udp_repeat;
+	  int udp_delay;
+          if ((soap->connect_flags & SO_BROADCAST))
+	    udp_repeat = 3; /* SOAP-over-UDP MULTICAST_UDP_REPEAT - 1 */
+          else
+	    udp_repeat = 1; /* SOAP-over-UDP UNICAST_UDP_REPEAT - 1 */
+	  udp_delay = (soap_random % 201) + 50; /* UDP_MIN_DELAY .. UDP_MAX_DELAY */
+	  do
+          { timeout.tv_sec = 0;
+            timeout.tv_usec = 1000 * udp_delay; /* ms */
+            FD_ZERO(&fd);
+            FD_SET((SOAP_SOCKET)soap->socket, &fd);
+            select((SOAP_SOCKET)(soap->socket + 1), NULL, NULL, &fd, &timeout);
+	    if (soap->peerlen)
+	      nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+            else
+	      nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	    udp_delay <<= 1;
+	    if (udp_delay > 500) /* UDP_UPPER_DELAY */
+	      udp_delay = 500;
+	  }
+	  while (nwritten < 0 && --udp_repeat > 0);
+	}
+      }
+      else
+#endif
+#if !defined(PALM) && !defined(AS400)
+        nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+#else
+        nwritten = send((SOAP_SOCKET)soap->socket, (void*)s, n, soap->socket_flags);
+#endif
+      if (nwritten <= 0)
+      {
+#ifdef WITH_OPENSSL
+	int err;
+        if (soap->ssl && (err = SSL_get_error(soap->ssl, nwritten)) != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return SOAP_EOF;
+#endif
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EWOULDBLOCK && soap_socket_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_socket_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    else
+    {
+#ifdef WITH_FASTCGI
+      nwritten = fwrite((void*)s, 1, n, stdout);
+      fflush(stdout);
+#else
+#ifdef UNDER_CE
+      nwritten = fwrite(s, 1, n, soap->sendfd);
+#else
+#ifdef VXWORKS
+#ifdef WMW_RPM_IO
+      if (soap->rpmreqid)
+        nwritten = (httpBlockPut(soap->rpmreqid, s, n) == 0) ? n : -1; 
+      else
+#endif
+        nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w"));
+#else
+      nwritten = write((SOAP_SOCKET)soap->sendfd, s, n);
+#endif
+#endif
+#endif
+      if (nwritten <= 0)
+      { if (soap_errno != SOAP_EINTR && soap_errno != SOAP_EWOULDBLOCK && soap_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    n -= nwritten;
+    s += nwritten;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_raw(struct soap *soap, const char *s, size_t n)
+{ if (!n)
+    return SOAP_OK;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { soap->count += n;
+#ifndef WITH_LEANER
+    if (soap->fpreparesend && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+  if (soap->mode & SOAP_IO)
+  { register size_t i = SOAP_BUFLEN - soap->bufidx;
+    while (n >= i)
+    { memcpy(soap->buf + soap->bufidx, s, i);
+      soap->bufidx = SOAP_BUFLEN;
+      if (soap_flush(soap))
+        return soap->error;
+      s += i;
+      n -= i;
+      i = SOAP_BUFLEN;
+    }
+    memcpy(soap->buf + soap->bufidx, s, n);
+    soap->bufidx += n;
+    return SOAP_OK;
+  }
+  return soap_flush_raw(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush(struct soap *soap)
+{ register int n = soap->bufidx;
+  if (n)
+  { soap->bufidx = 0;
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { soap->d_stream.next_in = (Byte*)soap->buf;
+      soap->d_stream.avail_in = (unsigned int)n;
+#ifdef WITH_GZIP
+      soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)n);
+#endif
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating %u bytes\n", soap->d_stream.avail_in));
+        if (deflate(&soap->d_stream, Z_NO_FLUSH) != Z_OK)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+          return soap->error = SOAP_ZLIB_ERROR;
+        }
+        if (!soap->d_stream.avail_out)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN))
+            return soap->error;
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (soap->d_stream.avail_in);
+    }
+    else
+#endif
+      return soap_flush_raw(soap, soap->buf, n);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush_raw(struct soap *soap, const char *s, size_t n)
+{ if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+  { register char *t;
+    if (!(t = (char*)soap_push_block(soap, n)))
+      return soap->error = SOAP_EOM;
+    memcpy(t, s, n);
+#ifndef WITH_LEANER
+    if (soap->fpreparesend)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+  { char t[16];
+    sprintf(t, "\r\n%lX\r\n" + (soap->chunksize ? 0 : 2), (unsigned long)n);
+    DBGMSG(SENT, t, strlen(t));
+    if ((soap->error = soap->fsend(soap, t, strlen(t))))
+      return soap->error;
+    soap->chunksize += n;
+  }
+  DBGMSG(SENT, s, n);
+#endif
+  return soap->error = soap->fsend(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send(struct soap *soap, const char *s)
+{ if (s)
+    return soap_send_raw(soap, s, strlen(s));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send2(struct soap *soap, const char *s1, const char *s2)
+{ if (soap_send(soap, s1))
+    return soap->error;
+  return soap_send(soap, s2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send3(struct soap *soap, const char *s1, const char *s2, const char *s3)
+{ if (soap_send(soap, s1)
+   || soap_send(soap, s2))
+    return soap->error;
+  return soap_send(soap, s3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static size_t
+frecv(struct soap *soap, char *s, size_t n)
+{ register int r;
+  soap->errnum = 0;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  if (soap->is)
+  { if (soap->is->good())
+      return soap->is->read(s, n).gcount();
+    return 0;
+  }
+#endif
+  if (soap_valid_socket(soap->socket))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->recv_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->recv_timeout > 0)
+        { timeout.tv_sec = soap->recv_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->recv_timeout/1000000;
+          timeout.tv_usec = -soap->recv_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+	  { soap->errnum = 0;
+            return 0;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+	  { soap->errnum = soap_socket_errno;
+            return 0;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+      { int err;
+	r = SSL_read(soap->ssl, s, n);
+        if (r > 0)
+          return (size_t)r;
+	err = SSL_get_error(soap->ssl, r);
+	if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return 0;
+      }
+      else if (soap->bio)
+      { r = BIO_read(soap->bio, s, n);
+        if (r > 0)
+          return (size_t)r;
+        return 0;
+      }
+      else
+#endif
+      { 
+#ifdef WITH_UDP
+        if ((soap->omode & SOAP_IO_UDP))
+        { SOAP_SOCKLEN_T k = (SOAP_SOCKLEN_T)sizeof(soap->peer);
+	  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+          r = recvfrom((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, &k);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+	  soap->peerlen = (size_t)k;
+#ifndef WITH_IPV6
+          soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+          soap->port = (int)ntohs(soap->peer.sin_port);
+#endif
+        }
+	else
+#endif
+          r = recv((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+        if (r >= 0)
+          return (size_t)r;
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN && soap_socket_errno != SOAP_EWOULDBLOCK)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#ifndef WITH_LEAN
+      { struct timeval timeout;
+        fd_set fd;
+        timeout.tv_sec = 0;
+        timeout.tv_usec = 10000;
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+#ifdef WITH_OPENSSL
+        if (soap->ssl && SSL_get_error(soap->ssl, r) == SSL_ERROR_WANT_WRITE)
+          r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+        else
+          r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#else
+        r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#endif
+        if (r < 0 && soap_socket_errno != SOAP_EINTR)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#endif
+    }
+  }
+#ifdef WITH_FASTCGI
+  return fread(s, 1, n, stdin);
+#else
+#ifdef UNDER_CE
+  return fread(s, 1, n, soap->recvfd);
+#else
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    r = httpBlockRead(soap->rpmreqid, s, n);
+  else
+#endif
+  r = read((SOAP_SOCKET)soap->recvfd, s, n);
+  if (r >= 0)
+    return (size_t)r;
+  soap->errnum = soap_errno;
+  return 0;
+#endif
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar
+soap_getchunkchar(struct soap *soap)
+{ if (soap->bufidx < soap->buflen)
+    return soap->buf[soap->bufidx++];
+  soap->bufidx = 0;
+  soap->buflen = soap->chunkbuflen = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)soap->buflen, soap->socket));
+  DBGMSG(RECV, soap->buf, soap->buflen);
+  if (soap->buflen)
+    return soap->buf[soap->bufidx++];
+  return EOF;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+soap_isxdigit(int c)
+{ return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f');
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_raw(struct soap *soap)
+{ register size_t ret;
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { if (soap->d_stream.next_out == Z_NULL)
+      return EOF;
+    if (soap->d_stream.avail_in || !soap->d_stream.avail_out)
+    { register int r;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflating\n"));
+      soap->d_stream.next_out = (Byte*)soap->buf;
+      soap->d_stream.avail_out = SOAP_BUFLEN;
+      r = inflate(&soap->d_stream, Z_NO_FLUSH);
+      if (r == Z_OK || r == Z_STREAM_END)
+      { soap->bufidx = 0;
+        soap->buflen = SOAP_BUFLEN - soap->d_stream.avail_out;
+        if (soap->zlib_in == SOAP_ZLIB_GZIP)
+          soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+        if (r == Z_STREAM_END)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+          soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+          soap->d_stream.next_out = Z_NULL;
+        }
+        if (soap->buflen)
+        { soap->count += soap->buflen;
+          return SOAP_OK;
+        }
+      }
+      else if (r != Z_BUF_ERROR)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate error: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        soap->d_stream.next_out = Z_NULL;
+	soap->error = SOAP_ZLIB_ERROR;
+        return EOF;
+      }
+    }
+zlib_again:
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK && !soap->chunksize)
+    { memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+      soap->buflen = soap->z_buflen;
+    }
+  }
+#endif
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) /* read HTTP chunked transfer */
+  { 
+chunk_again:
+    if (soap->chunksize)
+    { soap->buflen = ret = soap->frecv(soap, soap->buf, soap->chunksize > SOAP_BUFLEN ? SOAP_BUFLEN : soap->chunksize);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk: read %u bytes\n", (unsigned int)ret));
+      DBGMSG(RECV, soap->buf, ret);
+      soap->bufidx = 0;
+      soap->chunksize -= ret;
+    }
+    else
+    { register soap_wchar c;
+      char *t, tmp[8];
+      t = tmp;
+      if (!soap->chunkbuflen)
+      { soap->chunkbuflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes (chunked) from socket %d\n", (unsigned int)ret, soap->socket));
+        DBGMSG(RECV, soap->buf, ret);
+        soap->bufidx = 0;
+        if (!ret)
+          return soap->ahead = EOF;
+      }
+      else
+        soap->bufidx = soap->buflen;
+      soap->buflen = soap->chunkbuflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk size (idx=%u len=%u)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen));
+      while (!soap_isxdigit((int)(c = soap_getchunkchar(soap))))
+        if ((int)c == EOF)
+	  return soap->ahead = EOF;
+      do
+        *t++ = (char)c;
+      while (soap_isxdigit((int)(c = soap_getchunkchar(soap))) && t - tmp < 7);
+      while ((int)c != EOF && c != '\n')
+        c = soap_getchunkchar(soap);
+      if ((int)c == EOF)
+        return soap->ahead = EOF;
+      *t = '\0';
+      soap->chunksize = soap_strtoul(tmp, &t, 16);
+      if (!soap->chunksize)
+      { soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of chunked message\n"));
+	while ((int)c != EOF && c != '\n')
+          c = soap_getchunkchar(soap);
+        return soap->ahead = EOF;
+      }
+      soap->buflen = soap->bufidx + soap->chunksize;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving buf len to idx=%u len=%u (%s)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen, tmp));
+      if (soap->buflen > soap->chunkbuflen)
+      { soap->buflen = soap->chunkbuflen;
+        soap->chunksize -= soap->buflen - soap->bufidx;
+        soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Passed end of buffer for chunked HTTP (%u bytes left)\n", (unsigned int)(soap->buflen - soap->bufidx)));
+      }
+      else if (soap->chunkbuflen)
+        soap->chunksize = 0;
+      ret = soap->buflen - soap->bufidx;
+      if (!ret)
+        goto chunk_again;
+    }
+  }
+  else
+#endif
+  { soap->bufidx = 0;
+    soap->buflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)ret, soap->socket));
+    DBGMSG(RECV, soap->buf, ret);
+  }
+#ifndef WITH_LEANER
+  if (soap->fpreparerecv && (soap->error = soap->fpreparerecv(soap, soap->buf, ret)))
+    return soap->error;
+#endif
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { register int r;
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = (unsigned int)ret;
+    soap->d_stream.next_out = (Byte*)soap->buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    r = inflate(&soap->d_stream, Z_NO_FLUSH);
+    if (r == Z_OK || r == Z_STREAM_END)
+    { soap->bufidx = 0;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = ret = SOAP_BUFLEN - soap->d_stream.avail_out;
+      if (soap->zlib_in == SOAP_ZLIB_GZIP)
+        soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %u bytes\n", (unsigned int)ret));
+      if (!ret)
+        goto zlib_again;
+      if (r == Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+        soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+        soap->d_stream.next_out = Z_NULL;
+      }
+    }
+    else
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to inflate: (%d) %s\n", r, soap->d_stream.msg?soap->d_stream.msg:""));
+      soap->d_stream.next_out = Z_NULL;
+      soap->error = SOAP_ZLIB_ERROR;
+      return EOF;
+    }
+  }
+#endif
+  soap->count += ret;
+  return !ret;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap->dime.buflen)
+    { char *s;
+      int i;
+      unsigned char tmp[12];
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME hdr for chunked DIME is in buffer\n"));
+      soap->count += soap->dime.buflen - soap->buflen;
+      soap->buflen = soap->dime.buflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Skip padding (%ld bytes)\n", -(long)soap->dime.size&3));
+      for (i = -(long)soap->dime.size&3; i > 0; i--)
+      { soap->bufidx++;
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME hdr for next chunk\n"));
+      s = (char*)tmp;
+      for (i = 12; i > 0; i--)
+      { *s++ = soap->buf[soap->bufidx++];
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      soap->dime.flags = tmp[0] & 0x7;
+      soap->dime.size = ((size_t)tmp[8] << 24) | ((size_t)tmp[9] << 16) | ((size_t)tmp[10] << 8) | ((size_t)tmp[11]);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME chunk (%u bytes)\n", (unsigned int)soap->dime.size));
+      if (soap->dime.flags & SOAP_DIME_CF)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "More chunking\n"));
+        soap->dime.chunksize = soap->dime.size;
+        if (soap->buflen - soap->bufidx >= soap->dime.size)
+        { soap->dime.buflen = soap->buflen;
+          soap->buflen = soap->bufidx + soap->dime.chunksize;
+        }
+        else
+          soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      }
+      else
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Last chunk\n"));
+        soap->dime.buflen = 0;
+        soap->dime.chunksize = 0;
+      }
+      soap->count = soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%u bytes remaining\n", (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+    if (soap->dime.chunksize)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get next DIME hdr for chunked DIME (%u bytes chunk)\n", (unsigned int)soap->dime.chunksize));
+      if (soap_recv_raw(soap))
+        return EOF;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->count -= soap->buflen - soap->bufidx - soap->dime.chunksize;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%lu bytes remaining, count=%u\n", (unsigned long)(soap->buflen-soap->bufidx), (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+  }
+#endif
+  return soap_recv_raw(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getchar(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+    return c;
+  }
+  return soap_get1(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const struct soap_code_map*
+SOAP_FMAC2
+soap_code(const struct soap_code_map *map, const char *str)
+{ if (str)
+  { while (map->string)
+    { if (!strcmp(str, map->string)) /* case sensitive */
+        return map;
+      map++;
+    }
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_int_code(const struct soap_code_map *map, const char *str, long other)
+{ while (map->string)
+  { if (!soap_tag_cmp(str, map->string)) /* case insensitive */
+      return map->code;
+    map++;
+  }
+  return other;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_str_code(const struct soap_code_map *map, long code)
+{ while (map->code != code && map->string)
+    map++;
+  return map->string;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_char(struct soap *soap)
+{ char tmp[8];
+  register int i;
+  register soap_wchar c;
+  register char *s = tmp;
+  for (i = 0; i < 7; i++)
+  { c = soap_get1(soap);
+    if (c == ';' || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+  }
+  *s = '\0';
+  if (*tmp == '#')
+  { if (tmp[1] == 'x' || tmp[1] == 'X')
+      return soap_strtol(tmp + 2, NULL, 16);
+    return atol(tmp + 1);
+  }
+  if (!strcmp(tmp, "lt"))
+    return '<';
+  if (!strcmp(tmp, "gt"))
+    return '>';
+  if (!strcmp(tmp, "amp"))
+    return '&';
+  if (!strcmp(tmp, "quot"))
+    return '"';
+  if (!strcmp(tmp, "apos"))
+    return '\'';
+#ifndef WITH_LEAN
+  return (soap_wchar)soap_int_code(html_entity_codes, tmp, SOAP_UNKNOWN_CHAR);
+#else
+  return SOAP_UNKNOWN_CHAR; /* use this to represent unknown code */
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get0(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx];
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get1(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx++];
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_get(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+  }
+  else
+    c = soap_get1(soap);
+  for (;;)
+  { if (soap->cdata)
+    { if (c == ']')
+      { c = soap_get1(soap);
+        if (c == ']')
+        { soap->cdata = 0;
+          soap_get1(soap); /* skip > */
+          c = soap_get1(soap);
+        }
+	else
+        { soap_revget1(soap);
+          return ']';
+        }
+      }
+      else
+        return c;
+    }
+    switch (c)
+    { case '<':
+        do c = soap_get1(soap);
+        while (soap_blank(c));
+        if (c == '!' || c == '?' || c == '%')
+        { register int k = 1;
+	  if (c == '!')
+          { c = soap_get1(soap);
+            if (c == '[')
+            { do c = soap_get1(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                break;
+              soap->cdata = 1;
+              c = soap_get1(soap);
+	      continue;
+            }
+            if (c == '-' && (c = soap_get1(soap)) == '-')
+            { do
+              { c = soap_get1(soap);
+                if (c == '-' && (c = soap_get1(soap)) == '-')
+                  break;
+              } while ((int)c != EOF);
+            }
+          }
+	  else if (c == '?')
+            c = soap_get_pi(soap);
+          while ((int)c != EOF)
+          { if (c == '<')
+	      k++;
+	    else if (c == '>')
+	    { if (--k <= 0)
+	        break;
+	    }
+	    c = soap_get1(soap);
+	  }
+	  if ((int)c == EOF)
+	    break;
+          c = soap_get1(soap);
+          continue;
+        }
+        if (c == '/')
+          return SOAP_TT;
+        soap_revget1(soap);
+        return SOAP_LT;
+      case '>':
+        return SOAP_GT;
+      case '"':
+        return SOAP_QT;
+      case '\'':
+        return SOAP_AP;
+      case '&':
+        return soap_char(soap) | 0x80000000;
+    }
+    break;
+  }
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_get_pi(struct soap *soap)
+{ char buf[64];
+  register char *s = buf;
+  register int i = sizeof(buf);
+  register soap_wchar c = soap_getchar(soap);
+  /* This is a quick way to parse XML PI and we could use a callback instead to
+   * enable applications to intercept processing instructions */
+  while ((int)c != EOF && c != '?')
+  { if (--i > 0)
+    { if (soap_blank(c))
+        c = ' ';
+      *s++ = (char)c;
+    }
+    c = soap_getchar(soap);
+  }
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML PI <?%s?>\n", buf));
+  if (!strncmp(buf, "xml ", 4))
+  { s = strstr(buf, " encoding=");
+    if (s && s[10])
+    { if (!soap_tag_cmp(s + 11, "iso-8859-1*")
+       || !soap_tag_cmp(s + 11, "latin1*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to latin1 encoding\n"));
+        soap->mode |= SOAP_ENC_LATIN;
+      }
+      else if (!soap_tag_cmp(s + 11, "utf-8*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to utf-8 encoding\n"));
+        soap->mode &= ~SOAP_ENC_LATIN;
+      }
+    }
+  }
+  if ((int)c != EOF)
+    c = soap_getchar(soap);
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_move(struct soap *soap, long n)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving %ld bytes forward\n", (long)n));
+  for (; n > 0; n--)
+    if ((int)soap_getchar(soap) == EOF)
+      return SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_tell(struct soap *soap)
+{ return soap->count - soap->buflen + soap->bufidx - (soap->ahead != 0);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pututf8(struct soap *soap, register unsigned long c)
+{ char tmp[16];
+  if (c > 0 && c < 0x80)
+  { *tmp = (char)c;
+    return soap_send_raw(soap, tmp, 1);
+  }
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { register char *t = tmp;
+    if (c < 0x0800)
+      *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+    else
+    { if (c < 0x010000)
+        *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+      else
+      { if (c < 0x200000)
+          *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+        else
+        { if (c < 0x04000000)
+            *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+          else
+          { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+            *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+        }     
+        *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+      }
+      *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+    }
+    *t++ = (char)(0x80 | (c & 0x3F));
+    *t = '\0';
+  }
+  else
+#endif
+    sprintf(tmp, "&#%lu;", c);
+  return soap_send(soap, tmp);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getutf8(struct soap *soap)
+{ register soap_wchar c, c1, c2, c3, c4;
+  c = soap->ahead;
+  if (c > 0xFF)
+  { soap->ahead = 0;
+    return c;
+  }
+again:
+  c = soap_get(soap);
+  if (c < 0x80 || (soap->mode & SOAP_ENC_LATIN))
+    return c;
+  c1 = soap_get1(soap);
+  if (c1 < 0x80)
+  { soap_revget1(soap); /* doesn't look like this is UTF8 */
+    return c;
+  }
+  c1 &= 0x3F;
+  if (c < 0xE0)
+    return ((soap_wchar)(c & 0x1F) << 6) | c1;
+  c2 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c == 0xEF && c1 == 0x3B && c2 == 0x3F)	/* ignore UTF-8 BOM */
+    goto again;
+  if (c < 0xF0)
+    return ((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2;
+  c3 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xF8)
+    return ((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3;
+  c4 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xFC)
+    return ((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4;
+  return ((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(soap_get1(soap) & 0x3F);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthex(struct soap *soap, const unsigned char *s, int n)
+{ char d[2];
+  register int i;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2hex(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (i = 0; i < n; i++)
+  { register int m = *s++;
+    d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0'));
+    m &= 0x0F;
+    d[1] = (char)(m + (m > 9 ? '7' : '0'));
+    if (soap_send_raw(soap, d, 2))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_gethex(struct soap *soap, int *n)
+{
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_hex2s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register char *s;
+    register int i, k;
+    if (soap_append_lab(soap, NULL, 0))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = soap->lablen;
+    for (i = 0; i < k; i++)
+    { register char d1, d2;
+      register soap_wchar c;
+      c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = (int)(soap->lablen - k + i);
+        p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	if (p)
+	  memcpy(p, soap->labbuf, soap->lablen - k + i);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, SOAP_BLKLEN);
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register char d1, d2;
+      register soap_wchar c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap_end_block(soap);
+	  soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = soap_size_block(soap, i);
+        p = (unsigned char*)soap_save_block(soap, NULL, 0);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putbase64(struct soap *soap, const unsigned char *s, int n)
+{ register int i;
+  register unsigned long m;
+  char d[4];
+  if (!s)
+    return SOAP_OK;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2base64(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      d[i] = '=';
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_getbase64(struct soap *soap, int *n, int malloc_flag)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_base642s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register int i, k;
+    register char *s;
+    if (soap_append_lab(soap, NULL, 2))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = 3 * (soap->lablen / 3);
+    if (!s)
+      return NULL;
+    for (i = 0; i < k - 2; i += 3)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+            *n = (int)(soap->lablen - k + i);
+          p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	  if (p)
+	    memcpy(p, soap->labbuf, soap->lablen - k + i);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, 3 * SOAP_BLKLEN); /* must be multiple of 3 */
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          i *= 3;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n = (int)soap_size_block(soap, i);
+          p = (unsigned char*)soap_save_block(soap, NULL, 0);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_xop_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ /* Check MTOM xop:Include element (within hex/base64Binary) */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  int body = soap->body; /* should save type too? */
+  if (!soap_peek_element(soap))
+  { if (!soap_element_begin_in(soap, "xop:Include", 0) && *soap->href)
+    { if (soap_dime_forward(soap, ptr, size, id, type, options))
+        return soap->error;
+    }
+    if (soap->body && soap_element_end_in(soap, NULL))
+      return soap->error;
+  }
+  soap->body = body;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_dime_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ struct soap_xlist *xp = (struct soap_xlist*)SOAP_MALLOC(soap, sizeof(struct soap_xlist));
+  *ptr = NULL;
+  *size = 0;
+  *id = soap_strdup(soap, soap->href);
+  *type = NULL;
+  *options = NULL;
+  if (!xp)
+    return soap->error = SOAP_EOM;
+  xp->next = soap->xlist;
+  xp->ptr = ptr;
+  xp->size = size;
+  xp->id = *id;
+  xp->type = type;
+  xp->options = options;
+  soap->xlist = xp;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_strdup(struct soap *soap, const char *s)
+{ char *t = NULL;
+  if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1)))
+    strcpy(t, s);
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_new_block(struct soap *soap)
+{ struct soap_blist *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New block sequence (prev=%p)\n", soap->blist));
+  if (!(p = (struct soap_blist*)SOAP_MALLOC(soap, sizeof(struct soap_blist))))
+    return SOAP_EOM;   
+  p->next = soap->blist; 
+  p->ptr = NULL;
+  p->size = 0;
+  soap->blist = p;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_push_block(struct soap *soap, size_t n)
+{ char *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block of %u bytes (%u bytes total)\n", (unsigned int)n, (unsigned int)soap->blist->size + (unsigned int)n));
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(char*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  *(char**)p = soap->blist->ptr;
+  *(size_t*)(p + sizeof(char*)) = n;
+  soap->blist->ptr = p;
+  soap->blist->size += n;
+  return p + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_block(struct soap *soap)
+{ char *p;
+  if (!soap->blist->ptr)
+    return;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block\n"));
+  p = soap->blist->ptr;
+  soap->blist->size -= *(size_t*)(p + sizeof(char*));
+  soap->blist->ptr = *(char**)p;
+  SOAP_FREE(soap, p);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_update_ptrs(struct soap *soap, char *start, char *end, char *p1, char *p2)
+{ int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+#ifndef WITH_LEANER
+  register struct soap_xlist *xp;
+#endif
+  register void *p, **q;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr && (char*)ip->ptr >= start && (char*)ip->ptr < end)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", ip->id, ip->ptr, (char*)ip->ptr + (p1-p2)));
+        ip->ptr = (char*)ip->ptr + (p1-p2);
+      }
+      for (q = &ip->link; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Link update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (q = &ip->copy; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy chain update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (fp = ip->flist; fp; fp = fp->next)
+      { if ((char*)fp->ptr >= start && (char*)fp->ptr < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy list update id='%s' %p\n", ip->id, fp));
+          fp->ptr = (char*)fp->ptr + (p1-p2);
+        }
+      }
+    }
+  }
+#ifndef WITH_LEANER
+  for (xp = soap->xlist; xp; xp = xp->next)
+  { if (xp->ptr && (char*)xp->ptr >= start && (char*)xp->ptr < end)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", xp->id?xp->id:"", xp->ptr, (char*)xp->ptr + (p1-p2)));
+      xp->ptr = (unsigned char**)((char*)xp->ptr + (p1-p2));
+      xp->size = (int*)((char*)xp->size + (p1-p2));
+      xp->type = (char**)((char*)xp->type + (p1-p2));
+      xp->options = (char**)((char*)xp->options + (p1-p2));
+    }
+  }
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static int
+soap_has_copies(struct soap *soap, register const char *start, register const char *end)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  register const char *p;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { for (p = (const char*)ip->copy; p; p = *(const char**)p)
+        if (p >= start && p < end)
+          return SOAP_ERR;
+      for (fp = ip->flist; fp; fp = fp->next)
+        if ((const char*)fp->ptr >= start && (const char*)fp->ptr < end)
+	  return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_resolve(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  short flag;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr)
+      { register void *p, **q, *r;
+        q = (void**)ip->link;
+        ip->link = NULL;
+        r = ip->ptr;
+        DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing link chain to resolve id='%s'\n", ip->id));
+        while (q)
+        { p = *q;
+          *q = r;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "... link %p -> %p\n", q, r));
+          q = (void**)p;
+        }
+      }
+      else if (*ip->id == '#')
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Missing data for id='%s'\n", ip->id));
+        strcpy(soap->id, ip->id + 1);
+        return soap->error = SOAP_MISSING_ID;
+      }
+    }
+  }
+  do
+  { flag = 0;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution phase\n"));
+    for (i = 0; i < SOAP_IDHASH; i++)
+    { for (ip = soap->iht[i]; ip; ip = ip->next)
+      { if (ip->ptr && !soap_has_copies(soap, (const char*)ip->ptr, (const char*)ip->ptr + ip->size))
+        { if (ip->copy)
+          { register void *p, **q = (void**)ip->copy;
+            DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing copy chain to resolve id='%s'\n", ip->id));
+            ip->copy = NULL;
+            do
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... copy %p -> %p (%u bytes)\n", ip->ptr, q, (unsigned int)ip->size));
+	      p = *q;
+              memcpy(q, ip->ptr, ip->size);
+              q = (void**)p;
+            } while (q);
+	    flag = 1;
+	  }
+          for (fp = ip->flist; fp; fp = ip->flist)
+          { register unsigned int k = fp->level;
+	    register void *p = ip->ptr;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data type=%d location=%p level=%u,%u id='%s'\n", ip->type, p, ip->level, fp->level, ip->id));
+	    while (ip->level < k)
+            { register void **q = (void**)soap_malloc(soap, sizeof(void*));  
+	      if (!q)
+	        return soap->error;
+	      *q = p;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level, new location=%p holds=%p...\n", q, *q));
+              p = (void*)q;
+              k--;
+            }
+	    if (fp->fcopy)
+	      fp->fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    else
+	      soap_fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    ip->flist = fp->next;
+	    SOAP_FREE(soap, fp);
+	    flag = 1;
+	  }
+        }
+      }
+    }
+  } while (flag);
+#ifdef SOAP_DEBUG
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->copy || ip->flist)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution error: forwarded data for id='%s' could not be propagated, please report this problem to the developers\n", ip->id));
+      }
+    }
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution done\n"));
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_size_block(struct soap *soap, size_t n)
+{ if (soap->blist->ptr)
+  { soap->blist->size -= *(size_t*)(soap->blist->ptr + sizeof(char*)) - n;
+    *(size_t*)(soap->blist->ptr + sizeof(char*)) = n;
+  }
+  return soap->blist->size;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_first_block(struct soap *soap)
+{ char *p, *q, *r;
+  p = soap->blist->ptr;
+  if (!p)
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "First block\n"));
+  r = NULL;
+  do
+  { q = *(char**)p;
+    *(char**)p = r;
+    r = p;
+    p = q;
+  } while (p);
+  soap->blist->ptr = r;
+  return r + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_next_block(struct soap *soap)
+{ char *p;
+  p = soap->blist->ptr;
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n"));
+    soap->blist->ptr = *(char**)p;
+    SOAP_FREE(soap, p);
+    if (soap->blist->ptr)
+      return soap->blist->ptr + sizeof(char*) + sizeof(size_t);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_block_size(struct soap *soap)
+{ return *(size_t*)(soap->blist->ptr + sizeof(char*));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end_block(struct soap *soap)
+{ struct soap_blist *bp;
+  char *p, *q;
+  bp = soap->blist;
+  if (bp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of block sequence, free all remaining blocks\n"));
+    for (p = bp->ptr; p; p = q)
+    { q = *(char**)p;
+      SOAP_FREE(soap, p);
+    }
+    soap->blist = bp->next;
+    SOAP_FREE(soap, bp);
+  }
+  DBGLOG(TEST, if (soap->blist) SOAP_MESSAGE(fdebug, "Restore previous block sequence\n"));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_save_block(struct soap *soap, char *p, int flag)
+{ register size_t n;
+  register char *q, *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Save all blocks in contiguous memory space of %u bytes (%p->%p)\n", (unsigned int)soap->blist->size, soap->blist->ptr, p));
+  if (soap->blist->size)
+  { if (!p)
+      p = (char*)soap_malloc(soap, soap->blist->size);
+    if (p)
+    { for (s = p, q = soap_first_block(soap); q; q = soap_next_block(soap))
+      { n = soap_block_size(soap);
+#ifndef WITH_NOIDREF
+        if (flag)
+	  soap_update_ptrs(soap, q, q + n, s, q);
+#endif
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy %u bytes from %p to %p\n", (unsigned int)n, q, s));
+        memcpy(s, q, n);
+        s += n;
+      }
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  soap_end_block(soap);
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsize(struct soap *soap, const char *type, int size)
+{ return soap_putsizes(soap, type, &size, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizes(struct soap *soap, const char *type, const int *size, int dim)
+{ return soap_putsizesoffsets(soap, type, size, NULL, dim);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim)
+{ int i;
+  if (!type)
+    return NULL;
+  if (soap->version == 2)
+  { sprintf(soap->type, "%s[%d", type, size[0]);
+    for (i = 1; i < dim; i++)
+      sprintf(soap->type + strlen(soap->type), " %d", size[i]);
+  }
+  else
+  { if (offset)
+    { sprintf(soap->type, "%s[%d", type, size[0] + offset[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i] + offset[i]);
+    }
+    else
+    { sprintf(soap->type, "%s[%d", type, size[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i]);
+    }
+    strcat(soap->type, "]");
+  }
+  return soap->type;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffset(struct soap *soap, int offset)
+{ return soap_putoffsets(soap, &offset, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffsets(struct soap *soap, const int *offset, int dim)
+{ register int i;
+  sprintf(soap->arrayOffset, "[%d", offset[0]);
+  for (i = 1; i < dim; i++)
+    sprintf(soap->arrayOffset + strlen(soap->arrayOffset), ",%d", offset[i]);
+  strcat(soap->arrayOffset, "]");
+  return soap->arrayOffset;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_size(const int *size, int dim)
+{ register int i, n = size[0];
+  for (i = 1; i < dim; i++)
+    n *= size[i];
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getoffsets(const char *attr, const int *size, int *offset, int dim)
+{ register int i, j = 0;
+  if (offset)
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += offset[i] = (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  else
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  return j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsize(const char *attr1, const char *attr2, int *j)
+{ register int n, k;
+  char *s;
+  *j = 0;
+  if (!*attr1)
+    return -1;
+  if (*attr1 == '[')
+    attr1++;
+  n = 1;
+  for (;;)
+  { k = (int)soap_strtol(attr1, &s, 10);
+    n *= k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE || s == attr1)
+      return -1;
+    attr1 = strchr(s, ',');
+    if (!attr1)
+      attr1 = strchr(s, ' ');
+    if (attr2 && *attr2)
+    { attr2++;
+      *j *= k;
+      k = (int)soap_strtol(attr2, &s, 10);
+      *j += k;
+      if (k < 0)
+        return -1;
+      attr2 = s;
+    }
+    if (!attr1)
+      break;
+    attr1++;
+  }
+  return n - *j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsizes(const char *attr, int *size, int dim)
+{ register int i, k, n;
+  if (!*attr)
+    return -1;
+  i = strlen(attr);
+  n = 1;
+  do
+  { for (i = i-1; i >= 0; i--)
+      if (attr[i] == '[' || attr[i] == ',' || attr[i] == ' ')
+        break;
+    k = (int)atol(attr + i + 1);
+    n *= size[--dim] = k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE)
+      return -1;
+  } while (i >= 0 && attr[i] != '[');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getposition(const char *attr, int *pos)
+{ register int i, n;
+  if (!*attr)
+    return -1;
+  n = 0;
+  i = 1;
+  do
+  { pos[n++] = (int)atol(attr + i);
+    while (attr[i] && attr[i] != ',' && attr[i] != ']')
+      i++;
+    if (attr[i] == ',')
+      i++;
+  } while (n < SOAP_MAXDIMS && attr[i] && attr[i] != ']');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_push_namespace(struct soap *soap, const char *id, const char *ns)
+{ register struct soap_nlist *np;
+  register struct Namespace *p;
+  register short i = -1;
+  register size_t n, k;
+  n = strlen(id);
+  k = strlen(ns) + 1;
+  p = soap->local_namespaces;
+  if (p)
+  { for (i = 0; p->id; p++, i++)
+    { if (p->ns && !strcmp(ns, p->ns))
+      { if (p->out)
+        { SOAP_FREE(soap, p->out);
+          p->out = NULL;
+        }
+        break;
+      }
+      if (p->out)
+      { if (!strcmp(ns, p->out))
+          break;
+      }
+      else if (p->in)
+      { if (!soap_tag_cmp(ns, p->in))
+        { if ((p->out = (char*)SOAP_MALLOC(soap, k)))
+            strcpy(p->out, ns);
+          break;
+        }
+      }
+    }
+    if (!p || !p->id)
+      i = -1;
+  }
+  if (i >= 0)
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k);
+  if (!np)
+    return soap->error = SOAP_EOM;
+  np->next = soap->nlist;
+  soap->nlist = np;
+  np->level = soap->level;
+  np->index = i;
+  strcpy(np->id, id);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns));
+  if (i < 0)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push NOT OK: no match found for '%s' in namespace mapping table (added to stack anyway)\n", ns));
+  }
+  else
+  { np->ns = NULL;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push OK ('%s' matches '%s' in namespace table)\n", id, p->id));
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_namespace(struct soap *soap)
+{ register struct soap_nlist *np;
+  while (soap->nlist && soap->nlist->level >= soap->level)
+  { np = soap->nlist->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Popped namespace binding (level=%u) '%s'\n", soap->level, soap->nlist->id));
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_namespace(struct soap *soap, const char *id1, const char *id2, int n1, int n2) 
+{ register struct soap_nlist *np = soap->nlist;
+  while (np && (strncmp(np->id, id1, n1) || np->id[n1]))
+    np = np->next;
+  if (np)
+  { if (np->index < 0
+     || (soap->local_namespaces[np->index].id
+      && (strncmp(soap->local_namespaces[np->index].id, id2, n2)
+       || soap->local_namespaces[np->index].id[n2])))
+      return SOAP_NAMESPACE;
+    return SOAP_OK;
+  }
+  if (n1 == 3 && n1 == n2 && !strcmp(id1, "xml") && !strcmp(id1, id2))
+    return SOAP_OK;
+  return SOAP_SYNTAX_ERROR; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_current_namespace(struct soap *soap, const char *tag)
+{ register struct soap_nlist *np;
+  register const char *s;
+  np = soap->nlist;
+  if (!(s = strchr(tag, ':')))
+  { while (np && *np->id) /* find default namespace, if present */
+      np = np->next;
+  }
+  else
+  { while (np && (strncmp(np->id, tag, s - tag) || np->id[s - tag]))
+      np = np->next;
+    if (!np)
+      soap->error = SOAP_NAMESPACE;
+  }
+  if (np)
+  { if (np->index >= 0)
+      return soap->namespaces[np->index].ns;
+    if (np->ns)
+      return soap_strdup(soap, np->ns);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_tag_cmp(const char *s, const char *t)
+{ for (;;)
+  { register int c1 = *s;
+    register int c2 = *t;
+    if (!c1 || c1 == '"')
+      break;
+    if (c2 != '-')
+    { if (c1 != c2)
+      { if (c1 >= 'A' && c1 <= 'Z')
+          c1 += 'a' - 'A';
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+      }
+      if (c1 != c2)
+      { if (c2 != '*')
+          return 1;
+	c2 = *++t;
+        if (!c2)
+	  return 0;
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+        for (;;)
+        { c1 = *s;
+	  if (!c1 || c1 == '"')
+	    break;
+	  if (c1 >= 'A' && c1 <= 'Z')
+            c1 += 'a' - 'A';
+          if (c1 == c2 && !soap_tag_cmp(s + 1, t + 1))
+            return 0;
+	  s++;
+        }
+        break;
+      }
+    }
+    s++;
+    t++;
+  }
+  if (*t == '*' && !t[1])
+    return 0;
+  return *t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_tag(struct soap *soap, const char *tag1, const char *tag2)
+{ register const char *s, *t;
+  if (!tag1 || !tag2 || !*tag2)
+    return SOAP_OK;
+  s = strchr(tag1, ':');
+  t = strchr(tag2, ':');
+  if (t)
+  { if (s)
+    { if (t[1] && SOAP_STRCMP(s + 1, t + 1))
+        return SOAP_TAG_MISMATCH;
+      if (t != tag2 && soap_match_namespace(soap, tag1, tag2, s - tag1, t - tag2))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+        return SOAP_TAG_MISMATCH;
+      }
+    } 
+    else if (SOAP_STRCMP(tag1, t + 1))
+      return SOAP_TAG_MISMATCH;
+    else if (t != tag2 && soap_match_namespace(soap, tag1, tag2, 0, t - tag2))
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+      return SOAP_TAG_MISMATCH;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags and (default) namespaces match: '%s' '%s'\n", tag1, tag2));
+    return SOAP_OK;
+  }
+  if (s)
+  { if (SOAP_STRCMP(s + 1, tag2))
+      return SOAP_TAG_MISMATCH;
+  }
+  else if (SOAP_STRCMP(tag1, tag2))
+    return SOAP_TAG_MISMATCH;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags match: '%s' '%s'\n", tag1, tag2));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_array(struct soap *soap, const char *type)
+{ if (*soap->arrayType)
+    if (soap_match_tag(soap, soap->arrayType, type)
+     && soap_match_tag(soap, soap->arrayType, "xsd:anyType")
+     && soap_match_tag(soap, soap->arrayType, "xsd:ur-type")
+    )
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array type mismatch: '%s' '%s'\n", soap->arrayType, type));
+      return SOAP_TAG_MISMATCH;
+    }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************\
+ *
+ *	SSL
+ *
+\******************************************************************************/
+
+#ifdef WITH_OPENSSL
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_rand()
+{ unsigned char buf[4];
+  if (!ssl_init_done)
+    soap_ssl_init();
+  RAND_pseudo_bytes(buf, 4);
+  return *(int*)buf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *dhfile, const char *randfile, const char *sid)
+{ int err;
+  soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  if (dhfile)
+  { soap->dhfile = dhfile;
+    soap->rsa = 0;
+  }
+  else
+  { soap->dhfile = NULL;
+    soap->rsa = 1;
+  }
+  soap->randfile = randfile;
+  soap->require_client_auth = (flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION);
+  if (!(err = soap->fsslauth(soap)))
+  { if (sid)
+      SSL_CTX_set_session_id_context(soap->ctx, (unsigned char*)sid, strlen(sid));
+  }
+  return err; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_client_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *randfile)
+{ soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  soap->dhfile = NULL;
+  soap->rsa = 0;
+  soap->randfile = randfile;
+  soap->require_server_auth = (flags & SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION);
+  return soap->fsslauth(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_ssl_init()
+{ /* Note: for MT systems, the main program MUST call soap_ssl_init() before any threads are started */
+  if (!ssl_init_done)
+  { ssl_init_done = 1;
+    SSL_library_init();
+#ifndef WITH_LEAN
+    SSL_load_error_strings();
+#endif
+    if (!RAND_load_file("/dev/urandom", 1024))
+    { char buf[1024];
+      RAND_seed(buf, sizeof(buf));
+      while (!RAND_status())
+      { int r = rand();
+        RAND_seed(&r, sizeof(int));
+      }
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static const char *
+ssl_error(struct soap *soap, int ret)
+{ int err = SSL_get_error(soap->ssl, ret);
+  const char *msg = soap_str_code(h_ssl_error_codes, err);
+  if (msg)
+    strcpy(soap->msgbuf, msg);
+  else
+    return ERR_error_string(err, soap->msgbuf);
+  if (ERR_peek_error())
+  { unsigned long r;
+    strcat(soap->msgbuf, "\n");
+    while ((r = ERR_get_error()))
+      ERR_error_string_n(r, soap->msgbuf + strlen(soap->msgbuf), sizeof(soap->msgbuf) - strlen(soap->msgbuf));
+  } 
+  else
+  { switch (ret)
+    { case 0:
+        strcpy(soap->msgbuf, "EOF was observed that violates the protocol. The client probably provided invalid authentication information.");
+        break;
+      case -1:
+        sprintf(soap->msgbuf, "Error observed by underlying BIO: %s", strerror(errno));  
+        break;
+    }
+  }
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_password(char *buf, int num, int rwflag, void *userdata)
+{ if (num < (int)strlen((char*)userdata) + 1)
+    return 0;
+  return strlen(strcpy(buf, (char*)userdata));
+}
+#endif
+
+/******************************************************************************/
+/* This callback is included for future references. It should not be deleted
+#ifndef PALM_2
+static DH *
+ssl_tmp_dh(SSL *ssl, int is_export, int keylength)
+{ static DH *dh512 = NULL;
+  static DH *dh1024 = NULL;
+  DH *dh;
+  switch (keylength)
+  { case 512:
+      if (!dh512)
+      { BIO *bio = BIO_new_file("dh512.pem", "r");
+        if (bio)
+        { dh512 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+          return dh512;
+        }
+      }
+      else
+        return dh512;
+    default:
+      if (!dh1024)
+      { BIO *bio = BIO_new_file("dh1024.pem", "r");
+        if (bio)
+        { dh1024 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+        }
+      }
+      dh = dh1024;
+  }
+  return dh;
+}
+#endif
+*/
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_auth_init(struct soap *soap)
+{ if (!ssl_init_done)
+    soap_ssl_init();
+  if (!soap->ctx)
+  { if (!(soap->ctx = SSL_CTX_new(SSLv23_method())))
+      return soap_set_receiver_error(soap, "SSL error", "Can't setup context", SOAP_SSL_ERROR);
+  }
+  if (soap->randfile)
+  { if (!RAND_load_file(soap->randfile, -1))
+      return soap_set_receiver_error(soap, "SSL error", "Can't load randomness", SOAP_SSL_ERROR);
+  }
+  if (soap->cafile || soap->capath)
+  { if (!SSL_CTX_load_verify_locations(soap->ctx, soap->cafile, soap->capath))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read CA file and directory", SOAP_SSL_ERROR);
+    if (soap->cafile && soap->require_client_auth)
+      SSL_CTX_set_client_CA_list(soap->ctx, SSL_load_client_CA_file(soap->cafile));
+  }
+  if (!SSL_CTX_set_default_verify_paths(soap->ctx))
+    return soap_set_receiver_error(soap, "SSL error", "Can't read default CA file and/or directory", SOAP_SSL_ERROR);
+/* See below */
+  if (soap->keyfile)
+  { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read certificate key file", SOAP_SSL_ERROR);
+    if (soap->password)
+    { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+      SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+    }
+    if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+  }
+/* Suggested alternative approach to check cafile first before the key file:
+  if (soap->password)
+  { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+    SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+  }
+  if (!soap->cafile || !SSL_CTX_use_certificate_chain_file(soap->ctx, soap->cafile))
+  { if (soap->keyfile)
+    { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read certificate or key file", SOAP_SSL_ERROR);
+      if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+    }
+  }
+*/
+  if (soap->rsa)
+  { RSA *rsa = RSA_generate_key(1024, RSA_F4, NULL, NULL);
+    if (!SSL_CTX_set_tmp_rsa(soap->ctx, rsa))
+    { if (rsa)
+        RSA_free(rsa);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set RSA key", SOAP_SSL_ERROR);
+    }
+    RSA_free(rsa);
+  }
+  else if (soap->dhfile)
+  { DH *dh = 0;
+    BIO *bio;
+    bio = BIO_new_file(soap->dhfile, "r");
+    if (!bio)
+      return soap_set_receiver_error(soap, "SSL error", "Can't read DH file", SOAP_SSL_ERROR);
+    dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+    BIO_free(bio);
+    if (SSL_CTX_set_tmp_dh(soap->ctx, dh) < 0)
+    { if (dh)
+        DH_free(dh);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set DH parameters", SOAP_SSL_ERROR);
+    }
+    DH_free(dh);
+  }
+  SSL_CTX_set_options(soap->ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2);
+  SSL_CTX_set_verify(soap->ctx, soap->require_client_auth ? (SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT) : soap->require_server_auth ? SSL_VERIFY_PEER : SSL_VERIFY_NONE, soap->fsslverify);
+#if (OPENSSL_VERSION_NUMBER < 0x00905100L)
+  SSL_CTX_set_verify_depth(soap->ctx, 1); 
+#else
+  SSL_CTX_set_verify_depth(soap->ctx, 9); 
+#endif  
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_verify_callback(int ok, X509_STORE_CTX *store)
+{
+#ifdef SOAP_DEBUG
+  if (!ok) 
+  { char data[256];
+    X509 *cert = X509_STORE_CTX_get_current_cert(store);
+    fprintf(stderr, "SSL verify error or warning with certificate at depth %d: %s\n", X509_STORE_CTX_get_error_depth(store), X509_verify_cert_error_string(X509_STORE_CTX_get_error(store)));
+    X509_NAME_oneline(X509_get_issuer_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate issuer %s\n", data);
+    X509_NAME_oneline(X509_get_subject_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate subject %s\n", data);
+  }
+#endif
+  /* Note: return 1 to continue, but unsafe progress will be terminated by SSL */
+  return ok;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_accept(struct soap *soap)
+{ BIO *bio;
+  int i, r;
+  if (!soap_valid_socket(soap->socket))
+    return soap_set_receiver_error(soap, "SSL error", "No socket in soap_ssl_accept()", SOAP_SSL_ERROR);
+  if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    return SOAP_INVALID_SOCKET;
+  if (!soap->ssl)
+  { soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+      return soap_set_receiver_error(soap, "SSL error", "SSL_new() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+  }
+  else
+    SSL_clear(soap->ssl);
+  soap->imode |= SOAP_ENC_SSL;
+  soap->omode |= SOAP_ENC_SSL;
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&nonblocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)|O_NONBLOCK);
+#endif
+  bio = BIO_new_socket((SOAP_SOCKET)soap->socket, BIO_NOCLOSE);
+  SSL_set_bio(soap->ssl, bio, bio);
+  i = 100; /* 100 * 0.1 ms retries */
+  while ((r = SSL_accept(soap->ssl)) <= 0)
+  { int err = SSL_get_error(soap->ssl, r);
+    if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE)
+    { struct timeval timeout;
+      fd_set fd;
+      if (i-- <= 0)
+        break;
+      timeout.tv_sec = 0;
+      timeout.tv_usec = 100000;
+      FD_ZERO(&fd);
+      FD_SET((SOAP_SOCKET)soap->socket, &fd);
+      r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+      if (r < 0 && soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        return SOAP_EOF;
+      }
+    }
+    else
+    { soap->errnum = err;
+      break;
+    }
+  }
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&blocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+  if (r <= 0)
+  { soap_set_receiver_error(soap, ssl_error(soap, r), "SSL_accept() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+    soap_closesock(soap);
+    return SOAP_SSL_ERROR;
+  }
+  if (soap->require_client_auth)
+  { X509 *peer;
+    int err;
+    if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    peer = SSL_get_peer_certificate(soap->ssl);
+    if (!peer)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    X509_free(peer);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#endif /* WITH_OPENSSL */
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_init(struct soap *soap)
+{ soap->errmode = 1;
+#ifdef WIN32
+  if (tcp_done)
+    return 0;
+  else
+  { WSADATA w;
+    if (WSAStartup(MAKEWORD(1, 1), &w))
+      return -1;
+    tcp_done = 1;
+  }
+#endif
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_done(struct soap *soap)
+{ 
+#ifdef SOAP_DEBUG
+  int i;
+#endif
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  while (soap->clist)
+  { struct soap_clist *p = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = p;
+  }
+  soap->keep_alive = 0; /* to force close the socket */
+  soap_closesock(soap);
+#ifdef WITH_COOKIES
+  soap_free_cookies(soap);
+#endif
+  while (soap->plugins)
+  { register struct soap_plugin *p = soap->plugins->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Removing plugin '%s'\n", soap->plugins->id));
+    if (soap->plugins->fcopy || soap->state == SOAP_INIT)
+      soap->plugins->fdelete(soap, soap->plugins);
+    SOAP_FREE(soap, soap->plugins);
+    soap->plugins = p;
+  }
+  soap->fplugin = fplugin;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+#ifdef WITH_OPENSSL
+  if (soap->session)
+  { SSL_SESSION_free(soap->session);
+    soap->session = NULL;
+  }
+#endif
+  if (soap->state == SOAP_INIT)
+  { if (soap_valid_socket(soap->master))
+    { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+      soap->master = SOAP_INVALID_SOCKET;
+    }
+#ifdef WITH_OPENSSL
+    if (soap->ctx)
+    { SSL_CTX_free(soap->ctx);
+      soap->ctx = NULL;
+    }
+#endif
+  }
+#ifdef SOAP_DEBUG
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free logfiles\n"));
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { if (soap->logfile[i])
+    { SOAP_FREE(soap, (void*)soap->logfile[i]);
+      soap->logfile[i] = NULL;
+    }
+    soap_close_logfile(soap, i);
+  }
+  soap_free_mht(soap);
+  soap->state = 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_cleanup(struct soap *soap)
+{ soap_done(soap);
+#ifdef WIN32
+  if (!tcp_done)
+    return;
+  tcp_done = 0;
+  WSACleanup();
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+tcp_error(struct soap *soap)
+{ register const char *msg = NULL;
+  switch (soap->errmode)
+  { case 0:
+      msg = soap_strerror(soap);
+      break;
+    case 1:
+      msg = "WSAStartup failed";
+      break;
+    case 2:
+    {
+#ifndef WITH_LEAN
+      msg = soap_str_code(h_error_codes, soap->errnum);
+      if (!msg)
+#endif
+      { sprintf(soap->msgbuf, "TCP/UDP IP error %d", soap->errnum);
+        msg = soap->msgbuf;
+      }
+    }
+  }
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static const char*
+http_error(struct soap *soap, int status)
+{ register const char *msg = SOAP_STR_EOS;
+#ifndef WITH_LEAN
+  msg = soap_str_code(h_http_error_codes, status);
+  if (!msg)
+    msg = SOAP_STR_EOS;
+#endif
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_IPV6
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr)
+{ soap_int32 iadd = -1;
+  struct hostent hostent, *host = &hostent;
+#ifdef VXWORKS
+  int hostint;
+  /* inet_addr(), and hostGetByName() expect "char *"; addr is a "const char *". */
+  iadd = inet_addr((char*)addr);
+#else
+#if defined(_AIXVERSION_431) || defined(TRU64)
+  struct hostent_data ht_data;
+#endif
+#ifdef AS400
+  iadd = inet_addr((void*)addr);
+#else
+  iadd = inet_addr(addr);
+#endif
+#endif
+  if (iadd != -1)
+  { memcpy(inaddr, &iadd, sizeof(iadd));
+    return SOAP_OK;
+  }
+#if defined(__GLIBC__)
+  if (gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &host, &soap->errnum) < 0)
+    host = NULL;
+#elif defined(_AIXVERSION_431) || defined(TRU64)
+  memset((void*)&ht_data, 0, sizeof(ht_data));
+  if (gethostbyname_r(addr, &hostent, &ht_data) < 0)
+  { host = NULL;
+    soap->errnum = h_errno;
+  }
+#elif defined(HAVE_GETHOSTBYNAME_R)
+  host = gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &soap->errnum);
+#elif defined(VXWORKS)
+  /* If the DNS resolver library resolvLib has been configured in the vxWorks
+   * image, a query for the host IP address is sent to the DNS server, if the
+   * name was not found in the local host table. */
+  hostint = hostGetByName((char*)addr);
+  if (hostint == ERROR)
+  { host = NULL;
+    soap->errnum = soap_errno; 
+  }
+#else
+#ifdef AS400
+  if (!(host = gethostbyname((void*)addr)))
+    soap->errnum = h_errno;
+#else
+  if (!(host = gethostbyname(addr)))
+    soap->errnum = h_errno;
+#endif
+#endif
+  if (!host)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Host name not found\n"));
+    return SOAP_ERR;
+  }
+#ifdef VXWORKS
+  inaddr->s_addr = hostint;
+#else
+  memcpy(inaddr, host->h_addr, host->h_length);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_connect(struct soap *soap, const char *endpoint, const char *host, int port)
+{
+#ifdef WITH_IPV6
+  struct addrinfo hints, *res, *ressave;
+  int err;
+#endif
+  register int fd;
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->socket))
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+  soap->socket = SOAP_INVALID_SOCKET;
+  if (tcp_init(soap))
+  { soap->errnum = 0;
+    soap_set_sender_error(soap, tcp_error(soap), "TCP init failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->errmode = 0;
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+    err = getaddrinfo(soap->proxy_host, soap_int2s(soap, soap->proxy_port), &hints, &res);
+  else
+    err = getaddrinfo(host, soap_int2s(soap, port), &hints, &res);
+  if (err)
+  { soap_set_sender_error(soap, gai_strerror(err), "getaddrinfo failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  ressave = res;
+again:
+  fd = (int)socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+  soap->errmode = 0;
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    fd = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    fd = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  if (fd < 0)
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "socket failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_flags & SO_LINGER)
+  { struct linger linger;
+    memset((void*)&linger, 0, sizeof(linger));
+    linger.l_onoff = 1;
+    linger.l_linger = 0;
+    if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+    { soap->errnum = soap_socket_errno;
+      soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  if ((soap->connect_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, soap->connect_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (soap->keep_alive && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)fd, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Opening socket %d to host='%s' port=%d\n", fd, host, port));
+#ifndef WITH_IPV6
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+  { if (soap->fresolve(soap, soap->proxy_host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get proxy host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)soap->proxy_port);
+  }
+  else
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)port);
+  }
+  soap->errmode = 0;
+  if ((soap->omode & SOAP_IO_UDP))
+    return fd;
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking)); /* modified to use fd */
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+  else
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  for (;;)
+  { 
+#ifdef WITH_IPV6
+    if (connect((SOAP_SOCKET)fd, res->ai_addr, res->ai_addrlen))
+#else
+    if (connect((SOAP_SOCKET)fd, (struct sockaddr*)&soap->peer, sizeof(soap->peer)))
+#endif
+    { 
+#ifndef WITH_LEAN
+      if (soap->connect_timeout && (soap_socket_errno == SOAP_EINPROGRESS || soap_socket_errno == SOAP_EWOULDBLOCK))
+      { struct timeval timeout;
+        SOAP_SOCKLEN_T k;
+        fd_set fds;
+        if (soap->connect_timeout > 0)
+        { timeout.tv_sec = soap->connect_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->connect_timeout/1000000;
+          timeout.tv_usec = -soap->connect_timeout%1000000;
+        }
+        FD_ZERO(&fds);
+        FD_SET((SOAP_SOCKET)fd, &fds);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(fd + 1), NULL, &fds, NULL, &timeout);
+          if (r > 0)
+	    break;
+          if (!r)
+          { soap->errnum = 0;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+            soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+            soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+	k = (SOAP_SOCKLEN_T)sizeof(soap->errnum);
+        if (!getsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_ERROR, (char*)&soap->errnum, &k) && !soap->errnum)	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+          break;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap->errnum = soap_socket_errno;
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      else
+#endif
+#ifdef WITH_IPV6
+      if (res->ai_next)
+      { res = res->ai_next;
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        goto again;
+      }
+      else
+#endif
+      if (soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }  
+    else
+      break;
+  }
+#ifdef WITH_IPV6
+  soap->peerlen = 0; /* IPv6: already connected so use send() */
+  freeaddrinfo(ressave);
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  soap->socket = fd;
+  soap->imode &= ~SOAP_ENC_SSL;
+  soap->omode &= ~SOAP_ENC_SSL;
+  if (!strncmp(endpoint, "https:", 6))
+  {
+#ifdef WITH_OPENSSL
+    BIO *bio;
+    int r;
+    if (soap->proxy_host)
+    { short v;
+      unsigned int k = soap->omode; /* make sure we only parse HTTP */
+      size_t n = soap->count; /* save the content length */
+      char *userid, *passwd;
+      soap->omode &= ~SOAP_ENC; /* mask IO and ENC */
+      soap->omode |= SOAP_IO_BUFFER;
+      soap_begin_send(soap);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connecting to proxy server\n"));
+      sprintf(soap->tmpbuf, "CONNECT %s:%d HTTP/%s", host, port, soap->http_version);
+      if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+#ifndef WITH_LEAN
+      if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+      { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+        strcpy(soap->tmpbuf, "Basic ");
+        soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+        if ((soap->error = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+        { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return soap->error;
+        }
+      }
+#endif
+      if ((soap->error = soap->fposthdr(soap, NULL, NULL))
+       || soap_flush(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->omode = k;
+      k = soap->imode;
+      soap->imode &= ~SOAP_ENC; /* mask IO and ENC */
+      v = soap->version; /* preserve */
+      userid = soap->userid; /* preserve */
+      passwd = soap->passwd; /* preserve */
+      if (soap_begin_recv(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->userid = userid; /* restore */
+      soap->passwd = passwd; /* restore */
+      soap->version = v; /* restore */
+      soap->imode = k; /* restore */
+      soap->count = n; /* restore */
+      soap_begin_send(soap);
+    }
+    if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    { soap_set_sender_error(soap, "SSL error", "SSL authentication failed in tcp_connect(): check password, key file, and ca file.", SOAP_SSL_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+    { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      soap->error = SOAP_SSL_ERROR;
+      return SOAP_INVALID_SOCKET;
+    }
+    if (soap->session)
+    { if (!strcmp(soap->session_host, host) && soap->session_port == port)
+        SSL_set_session(soap->ssl, soap->session);
+      SSL_SESSION_free(soap->session);
+      soap->session = NULL;
+    }
+    soap->imode |= SOAP_ENC_SSL;
+    soap->omode |= SOAP_ENC_SSL;
+    bio = BIO_new_socket((SOAP_SOCKET)fd, BIO_NOCLOSE);
+    SSL_set_bio(soap->ssl, bio, bio);
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#if defined(WIN32)
+    { u_long nonblocking = 1;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+    }
+#elif defined(VXWORKS)
+    { u_long nonblocking = 1;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+#endif
+    for (;;)
+    { if ((r = SSL_connect(soap->ssl)) <= 0)
+      { int err = SSL_get_error(soap->ssl, r);
+        if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+        { soap_set_sender_error(soap, ssl_error(soap, r), "SSL connect failed in tcp_connect()", SOAP_SSL_ERROR);
+          soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (soap->connect_timeout)
+        { struct timeval timeout;
+          fd_set fds;
+          if (soap->connect_timeout > 0)
+          { timeout.tv_sec = soap->connect_timeout;
+            timeout.tv_usec = 0;
+          }
+          else
+          { timeout.tv_sec = -soap->connect_timeout/1000000;
+            timeout.tv_usec = -soap->connect_timeout%1000000;
+          }
+          FD_ZERO(&fds);
+          FD_SET((SOAP_SOCKET)fd, &fds);
+          for (;;)
+          { int r = select((SOAP_SOCKET)(fd + 1), &fds, NULL, &fds, &timeout);
+            if (r > 0)
+	      break;
+            if (!r)
+            { soap->errnum = 0;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+              soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+              soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+              return SOAP_INVALID_SOCKET;
+            }
+          }
+	  continue;
+        }
+      }
+      break;
+    }
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#ifdef WIN32
+    { u_long blocking = 0;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+    }
+#elif defined(VXWORKS)
+    { u_long blocking = 0;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+    if (soap->require_server_auth)
+    { X509 *peer;
+      int err;
+      if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+      { soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      peer = SSL_get_peer_certificate(soap->ssl);
+      if (!peer)
+      { soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      X509_NAME_get_text_by_NID(X509_get_subject_name(peer), NID_commonName, soap->msgbuf, sizeof(soap->msgbuf));
+      X509_free(peer);
+      if (soap_tag_cmp(soap->msgbuf, host))
+      { soap_set_sender_error(soap, "SSL error", "SSL certificate host name mismatch in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+#else
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    soap->error = SOAP_SSL_ERROR;
+    return SOAP_INVALID_SOCKET;
+#endif
+  }
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_bind(struct soap *soap, const char *host, int port, int backlog)
+{
+#ifdef WITH_IPV6
+  struct addrinfo *addrinfo = NULL;
+  struct addrinfo hints;
+  struct addrinfo res;
+  int err;
+#endif
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->master))
+  { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+    soap->master = SOAP_INVALID_SOCKET;
+  }
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 1;
+  if (tcp_init(soap))
+  { soap_set_receiver_error(soap, tcp_error(soap), "TCP init failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  hints.ai_flags = AI_PASSIVE;
+  soap->errmode = 2;
+  err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo);
+  if (addrinfo)
+  { res = *addrinfo;
+    soap->peer = *((struct sockaddr_storage*)addrinfo->ai_addr);
+    soap->peerlen = addrinfo->ai_addrlen;
+    res.ai_addr = (struct sockaddr*)&soap->peer;
+    res.ai_addrlen = soap->peerlen;
+    freeaddrinfo(addrinfo);
+  }
+  if (err)
+  { soap_set_receiver_error(soap, gai_strerror(err), "getaddrinfo failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->master = socket(res.ai_family, res.ai_socktype, res.ai_protocol);
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->master = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    soap->master = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  soap->errmode = 0;
+  if (!soap_valid_socket(soap->master))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "socket failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->socket = soap->master;
+#endif
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)soap->master, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(soap->master, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->bind_flags && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, soap->bind_flags, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->master, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+#ifdef WITH_IPV6
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, res.ai_addr, res.ai_addrlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+#else
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (host)
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_receiver_error(soap, tcp_error(soap), "get host by name failed in soap_bind()", SOAP_TCP_ERROR);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  else
+    soap->peer.sin_addr.s_addr = htonl(INADDR_ANY);
+  soap->peer.sin_port = htons((short)port);
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, (struct sockaddr*)&soap->peer, soap->peerlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+  if (!(soap->omode & SOAP_IO_UDP) && listen((SOAP_SOCKET)soap->master, backlog))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "listen failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+  return soap->master;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_poll(struct soap *soap)
+{ 
+#ifndef WITH_LEAN
+  struct timeval timeout;
+  fd_set rfd, sfd, xfd;
+  int r;
+  timeout.tv_sec = 0;
+  timeout.tv_usec = 0;
+  FD_ZERO(&rfd);
+  FD_ZERO(&sfd);
+  FD_ZERO(&xfd);
+  if (soap_valid_socket(soap->socket))
+  { FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &xfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, &xfd, &timeout);
+    if (r > 0 && FD_ISSET((SOAP_SOCKET)soap->socket, &xfd))
+      r = -1;
+  }
+  else if (soap_valid_socket(soap->master))
+  { FD_SET((SOAP_SOCKET)soap->master, &sfd);
+    r = select((SOAP_SOCKET)(soap->master + 1), NULL, &sfd, NULL, &timeout);
+  }
+  else
+    return SOAP_OK;
+  if (r > 0)
+  {
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+    {
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || SSL_peek(soap->ssl, soap->tmpbuf, 1) > 0))
+        return SOAP_OK;
+    }
+    else
+#endif
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) > 0))
+        return SOAP_OK;
+  }
+  else if (r < 0)
+  { soap->errnum = soap_socket_errno;
+    if ((soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) && soap_socket_errno != SOAP_EINTR)
+    { soap_set_receiver_error(soap, tcp_error(soap), "select failed in soap_poll()", SOAP_TCP_ERROR);
+      return soap->error = SOAP_TCP_ERROR;
+    }
+  }
+  else
+    soap->errnum = 0;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Polling: other end down on socket=%d select=%d\n", soap->socket, r));
+  return SOAP_EOF;
+#else
+  return SOAP_OK;
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_accept(struct soap *soap, int s, struct sockaddr *a, int *n)
+{ int fd;
+  fd = (int)accept((SOAP_SOCKET)s, a, (SOAP_SOCKLEN_T*)n);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, FD_CLOEXEC);
+#endif
+#endif
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_accept(struct soap *soap)
+{ int n = (int)sizeof(soap->peer);
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  soap->error = SOAP_OK;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    return soap->socket = soap->master;
+#endif
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 0;
+  soap->keep_alive = 0;
+  if (soap_valid_socket(soap->master))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->accept_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->accept_timeout > 0)
+        { timeout.tv_sec = soap->accept_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->accept_timeout/1000000;
+          timeout.tv_usec = -soap->accept_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->master, &fd);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(soap->master + 1), &fd, &fd, NULL, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            soap_set_receiver_error(soap, "Timeout", "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            soap_closesock(soap);
+            soap_set_sender_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+#if defined(WIN32)
+	{ u_long nonblocking = 1;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &nonblocking);
+        }
+#elif defined(VXWORKS)
+        { u_long nonblocking = 1;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&nonblocking));
+        }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)|O_NONBLOCK);
+#endif
+      }
+      else
+#if defined(WIN32)
+      { u_long blocking = 0;
+        ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+      }
+#elif defined(VXWORKS)
+      { u_long blocking = 0;
+        ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+      }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+      soap->socket = soap->faccept(soap, soap->master, (struct sockaddr*)&soap->peer, &n);
+      soap->peerlen = (size_t)n;
+      if (soap_valid_socket(soap->socket))
+      {
+#ifdef WITH_IPV6
+/* Use soap->host to store the numeric form of the remote host */
+        getnameinfo((struct sockaddr*)&soap->peer, n, soap->host, sizeof(soap->host), NULL, 0, NI_NUMERICHOST | NI_NUMERICSERV); 
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d from %s\n", soap->socket, soap->host));
+        soap->ip = 0; /* info stored in soap->peer and soap->host */
+        soap->port = 0; /* info stored in soap->peer and soap->host */
+#else
+        soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+        soap->port = (int)ntohs(soap->peer.sin_port); /* does not return port number on some systems */
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d at port %d from IP %d.%d.%d.%d\n", soap->socket, soap->port, (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF));
+#endif
+#ifndef WITH_LEAN
+	if (soap->accept_flags & SO_LINGER)
+        { struct linger linger;
+          memset((void*)&linger, 0, sizeof(linger));
+          linger.l_onoff = 1;
+          linger.l_linger = 0;
+	  if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+          { soap->errnum = soap_socket_errno;
+	    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in soap_accept()", SOAP_TCP_ERROR);
+	    soap_closesock(soap);
+            return SOAP_INVALID_SOCKET;
+	  }
+        }
+        if ((soap->accept_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, soap->accept_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#ifdef TCP_NODELAY
+        if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->socket, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#endif
+#endif
+        if (soap->accept_timeout)
+        {
+#if defined(WIN32)
+          u_long blocking = 0;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+          ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+#elif defined(VXWORKS)
+          u_long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+          ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)(&blocking));
+#elif defined(PALM)
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL,0)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL,0)&~O_NONBLOCK);
+#elif defined(SYMBIAN)
+          long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, 0/*FIONBIO*/, &blocking);
+#else
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+	}
+        soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+        return soap->socket;
+      }
+      if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept failed from %s\n", soap->host));
+        soap->errnum = soap_socket_errno;
+        soap_set_receiver_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+	soap_closesock(soap);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+  }
+  else
+  { soap->errnum = 0;
+    soap_set_receiver_error(soap, tcp_error(soap), "no master socket in soap_accept()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_disconnect(struct soap *soap)
+{
+#ifdef WITH_OPENSSL
+  if (soap->ssl)
+  { int r, s = 0;
+    if (soap->session)
+      SSL_SESSION_free(soap->session);
+    if (*soap->host)
+    { soap->session = SSL_get1_session(soap->ssl);
+      if (soap->session)
+      { strcpy(soap->session_host, soap->host);
+        soap->session_port = soap->port;
+      }
+    }
+    r = SSL_shutdown(soap->ssl);
+    if (r != 1)
+    { s = ERR_get_error();
+      if (s)
+      { if (soap_valid_socket(soap->socket))
+        { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1);
+          soap->socket = SOAP_INVALID_SOCKET;
+        }
+        r = SSL_shutdown(soap->ssl);
+      }
+    }
+    DBGLOG(TEST, if (s) SOAP_MESSAGE(fdebug, "Shutdown failed: %d\n", SSL_get_error(soap->ssl, r)));
+    SSL_free(soap->ssl);
+    soap->ssl = NULL;
+    if (s)
+      return SOAP_SSL_ERROR;
+    ERR_remove_state(0);
+  }
+#endif
+  if (soap_valid_socket(soap->socket) && !(soap->omode & SOAP_IO_UDP))
+  { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 2);
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+    soap->socket = SOAP_INVALID_SOCKET;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_closesocket(struct soap *soap, SOAP_SOCKET fd)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Close socket %d\n", (int)fd));
+  return closesocket(fd);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_shutdownsocket(struct soap *soap, SOAP_SOCKET fd, int how)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Shutdown socket %d how=%d\n", (int)fd, how));
+  return shutdown(fd, how);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_closesock(struct soap *soap)
+{ register int status = soap->error;
+  if (status == SOAP_EOF || status == SOAP_TCP_ERROR || status == SOAP_SSL_ERROR || !soap->keep_alive)
+  { if (soap->fclose && (soap->error = soap->fclose(soap)))
+      return soap->error;
+    soap->keep_alive = 0;
+  }
+#ifdef WITH_ZLIB
+  if (soap->zlib_state == SOAP_ZLIB_DEFLATE)
+    deflateEnd(&soap->d_stream);
+  else if (soap->zlib_state == SOAP_ZLIB_INFLATE)
+    inflateEnd(&soap->d_stream);
+  soap->zlib_state = SOAP_ZLIB_NONE;
+#endif
+  return soap->error = status;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_hash(register const char *s)
+{ register size_t h = 0;
+  while (*s)
+    h = 65599*h + *s++;
+  return h % SOAP_IDHASH;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_pht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing pointer hashtable\n"));
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new1(soap_mode mode)
+{ return soap_new2(mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new()
+{ return soap_new2(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new2(soap_mode imode, soap_mode omode)
+{ struct soap *soap = (struct soap*)malloc(sizeof(struct soap));
+  if (soap)
+    soap_init2(soap, imode, omode);
+  return soap;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_del(struct soap *soap)
+{ free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_pht(struct soap *soap)
+{ register struct soap_pblk *pb, *next;
+  register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free pointer hashtable\n"));
+  for (pb = soap->pblk; pb; pb = next)
+  { next = pb->next;
+    SOAP_FREE(soap, pb);
+  }
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type)
+{ register int i;
+  struct soap_plist *pp;
+  if (soap->version != 1)
+    soap->encoding = 1;
+  if (a)
+    i = soap_array_pointer_lookup(soap, p, a, n, type, &pp);
+  else
+    i = soap_pointer_lookup(soap, p, type, &pp);
+  if (i)
+  { if (soap_is_embedded(soap, pp)
+     || soap_is_single(soap, pp))
+      return 0;
+    soap_set_embedded(soap, pp);
+  }
+  return i;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_lookup(struct soap *soap, const void *p, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (p)
+  { for (pp = soap->pht[soap_hash_ptr(p)]; pp; pp = pp->next)
+    { if (pp->ptr == p && pp->type == type)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d id=%d\n", p, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d: not found\n", p, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_enter(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register int h;
+  register struct soap_plist *pp;
+  if (!soap->pblk || soap->pidx >= SOAP_PTRBLK)
+  { register struct soap_pblk *pb = (struct soap_pblk*)SOAP_MALLOC(soap, sizeof(struct soap_pblk));
+    if (!pb)
+    { soap->error = SOAP_EOM;
+      return 0;
+    }
+    pb->next = soap->pblk;
+    soap->pblk = pb;
+    soap->pidx = 0;
+  }
+  *ppp = pp = &soap->pblk->plist[soap->pidx++];
+  if (a)
+    h = soap_hash_ptr(a->__ptr);
+  else
+    h = soap_hash_ptr(p);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pointer enter location=%p array=%p size=%d dim=%d type=%d id=%d\n", p, a?a->__ptr:NULL, a?a->__size:0, n, type, soap->idnum+1));
+  pp->next = soap->pht[h];
+  pp->type = type;
+  pp->mark1 = 0;
+  pp->mark2 = 0;
+  pp->ptr = p;
+  pp->array = a;
+  soap->pht[h] = pp;
+  pp->id = ++soap->idnum;
+  return pp->id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_pointer_lookup(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (!p || !a->__ptr)
+    return 0;
+  for (pp = soap->pht[soap_hash_ptr(a->__ptr)]; pp; pp = pp->next)
+  { if (pp->type == type && pp->array && pp->array->__ptr == a->__ptr)
+    { register int i;
+      for (i = 0; i < n; i++)
+        if (((const int*)&pp->array->__size)[i] != ((const int*)&a->__size)[i])
+	  break;
+      if (i == n)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d id=%d\n", a->__ptr, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d: not found\n", a->__ptr, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_count(struct soap *soap)
+{ soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) || (soap->omode & SOAP_ENC_DIME))
+    soap->mode = soap->omode | SOAP_IO_LENGTH | SOAP_ENC_DIME;
+  else
+#endif
+  { soap->mode = soap->omode;
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE
+     || (((soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_ENC_XML))
+#ifndef WITH_LEANER
+      && !soap->fpreparesend
+#endif
+      ))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    else
+      soap->mode |= SOAP_IO_LENGTH;
+  }
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (!(soap->mode & SOAP_ENC_DIME))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+    soap->mode |= SOAP_ENC_MIME;
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+  soap->dime.list = soap->dime.last;	/* keep track of last DIME attachment */
+#endif
+  soap->count = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->part = SOAP_BEGIN;
+  soap->idnum = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin count phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+#ifndef WITH_LEANER
+  soap->dime.count = 0; /* count # of attachments */
+  soap->dime.size = 0; /* accumulate total size of attachments */
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+    return soap->error = soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_count(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->fpreparefinal)
+    return soap->error = soap->fpreparefinal(soap);
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of count phase\n"));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_send(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+  soap->mode = soap->omode | (soap->mode & (SOAP_IO_LENGTH | SOAP_ENC_DIME));
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+#ifdef WITH_UDP
+  if ((soap->mode & SOAP_IO_UDP))
+  { soap->mode |= SOAP_ENC_XML;
+    if (soap->count > SOAP_BUFLEN)
+      return soap->error = SOAP_UDP_ERROR;
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_FLUSH && soap_valid_socket(soap->socket))
+  { if (soap->count || (soap->mode & SOAP_IO_LENGTH) || (soap->mode & SOAP_ENC_XML))
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+  soap->mode &= ~SOAP_IO_LENGTH;
+  if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap_new_block(soap);
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+  { soap->mode |= SOAP_ENC_MIME;
+    soap->mode &= ~SOAP_ENC_DIME;
+  }
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket)) /* Set win32 stdout or soap->sendfd to BINARY, e.g. to support DIME */
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->sendfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->sendfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#endif
+  if (soap->mode & SOAP_IO)
+  { soap->bufidx = 0;
+    soap->buflen = 0;
+  }
+  soap->chunksize = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+#ifdef WITH_ZLIB
+  soap->z_ratio_out = 1.0;
+  if ((soap->mode & SOAP_ENC_ZLIB) && soap->zlib_state != SOAP_ZLIB_DEFLATE)
+  {
+#ifdef WITH_GZIP
+    memcpy(soap->z_buf, "\37\213\10\0\0\0\0\0\0\377", 10);
+    soap->d_stream.next_out = (Byte*)soap->z_buf + 10;
+    soap->d_stream.avail_out = SOAP_BUFLEN - 10;
+    soap->z_crc = crc32(0L, NULL, 0);
+    if (deflateInit2(&soap->d_stream, soap->z_level, Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY) != Z_OK)
+#else
+    soap->d_stream.next_out = (Byte*)soap->z_buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    if (deflateInit(&soap->d_stream, soap->z_level) != Z_OK)
+#endif
+      return soap->error = SOAP_ZLIB_ERROR;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflate initialized\n"));
+    soap->zlib_state = SOAP_ZLIB_DEFLATE;
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin send phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+  soap->part = SOAP_BEGIN;
+#ifndef WITH_LEANER
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_embedded(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { pp->mark1 = 1;
+    pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded %p type=%d mark set to 1\n", p, t));
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_reference(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (!p || (soap->mode & SOAP_XML_TREE))
+    return 1;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (soap_pointer_enter(soap, p, NULL, 0, t, &pp))
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  else
+    return 1;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reference %p type=%d (%d %d)\n", p, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_reference(struct soap *soap, const void *p, const struct soap_array *a, int n, int t)
+{ register int i;
+  struct soap_plist *pp;
+  if (!p || !a->__ptr)
+    return 1;
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (i)
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (!soap_pointer_enter(soap, p, a, n, t, &pp))
+    return 1;
+  else
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array reference %p ptr=%p dim=%d type=%d (%d %d)\n", p, a->__ptr, n, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embedded_id(struct soap *soap, int id, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap->mode & SOAP_XML_TREE)
+    return id;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id %p type=%d id=%d\n", p, t, id));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (id < 0)
+    { id = soap_pointer_lookup(soap, p, t, &pp);
+      if (id)
+      { if (soap->mode & SOAP_IO_LENGTH)
+          pp->mark1 = 2;
+        else
+          pp->mark2 = 2;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id multiref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+      }
+      return -1;
+    }
+    return id;
+  }
+  if (id < 0)
+    id = soap_pointer_lookup(soap, p, t, &pp);
+  else if (id && !soap_pointer_lookup(soap, p, t, &pp))
+    return 0;
+  if (id && pp)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      pp->mark1 = 1;
+    else
+      pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id embedded ref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+  }
+  return id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Is embedded? %d %d\n", (int)pp->mark1, (int)pp->mark2));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      return pp->mark1 != 0;
+    return pp->mark2 != 0;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 1;
+  return pp->mark2 == 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_single(struct soap *soap, struct soap_plist *pp)
+{ if (soap->part == SOAP_IN_HEADER)
+    return 1;
+  if (!pp)
+    return 0;
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 0;
+  return pp->mark2 == 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return;
+  if (soap->mode & SOAP_IO_LENGTH)
+    pp->mark1 = 1;
+  else
+    pp->mark2 = 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attachment(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, const char *aid, const char *atype, const char *aoptions, int n, const char *type, int t) 
+{ struct soap_plist *pp;
+  int i;
+  if (!p || !a->__ptr || (!aid && !atype))
+    return soap_element_id(soap, tag, id, p, a, n, type, t);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Attachment tag='%s' id='%s' (%d) type='%s'\n", tag, aid?aid:"", id, atype?atype:""));
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (!i)
+  { i = soap_pointer_enter(soap, p, a, n, t, &pp);
+    if (!i)
+    { soap->error = SOAP_EOM;
+      return -1;
+    }
+  }
+  if (id <= 0)
+    id = i;
+  if (!aid)
+  { sprintf(soap->tmpbuf, soap->dime_id_format, id);
+    aid = soap_strdup(soap, soap->tmpbuf);
+  }
+  /* Add MTOM xop:Include element when necessary */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  if ((soap->mode & SOAP_ENC_MTOM) && strcmp(tag, "xop:Include"))
+  { if (soap_element_begin_out(soap, tag, 0, type)
+     || soap_element_href(soap, "xop:Include", 0, "href", aid)
+     || soap_element_end_out(soap, tag))
+      return soap->error;
+  }
+  else if (soap_element_href(soap, tag, 0, "href", aid))
+    return soap->error;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { if (pp->mark1 != 3)
+    { struct soap_multipart *content;
+      if (soap->mode & SOAP_ENC_MTOM)
+        content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, (char*)a->__ptr, a->__size);
+      else
+        content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, (char*)a->__ptr, a->__size);
+      if (!content)
+      { soap->error = SOAP_EOM;
+        return -1;
+      }
+      if (!strncmp(aid, "cid:", 4)) /* RFC 2111 */
+      { if (soap->mode & SOAP_ENC_MTOM)
+        { char *s = (char*)soap_malloc(soap, strlen(aid) - 1);
+	  if (s)
+	  { *s = '<';
+	    strcpy(s + 1, aid + 4);
+	    strcat(s, ">");
+	    content->id = s;
+          }
+        }
+        else
+          content->id = aid + 4;
+      }
+      else
+        content->id = aid;
+      content->type = atype;
+      content->options = aoptions;
+      content->encoding = SOAP_MIME_BINARY;
+      pp->mark1 = 3;
+    }
+  }
+  else
+    pp->mark2 = 3;
+  return -1;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_iht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+    soap->iht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_iht(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip, *p;
+  register struct soap_flist *fp, *fq;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = p)
+    { for (fp = ip->flist; fp; fp = fq)
+      { fq = fp->next;
+        SOAP_FREE(soap, fp);
+      }
+      p = ip->next;
+      SOAP_FREE(soap, ip);
+    }
+    soap->iht[i] = NULL;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_lookup(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  for (ip = soap->iht[soap_hash(id)]; ip; ip = ip->next)
+    if (!strcmp(ip->id, id))
+      return ip;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_enter(struct soap *soap, const char *id)
+{ register size_t h;
+  register struct soap_ilist *ip;
+  ip = (struct soap_ilist*)SOAP_MALLOC(soap, sizeof(struct soap_ilist) + strlen(id));
+  if (ip)
+  { h = soap_hash(id);
+    strcpy(ip->id, id);
+    ip->next = soap->iht[h];
+    soap->iht[h] = ip;
+    return ip;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_malloc(struct soap *soap, size_t n)
+{ register char *p;
+  if (!n)
+    return (void*)SOAP_NON_NULL;
+  if (!soap)
+    return SOAP_MALLOC(soap, n);
+  n += (-(long)n) & (sizeof(void*)-1); /* align at 4-, 8- or 16-byte boundary */
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(void*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  /* keep chain of alloced cells for later destruction */
+  soap->alloced = 1;
+  *(void**)(p + n) = soap->alist;
+  *(size_t*)(p + n + sizeof(void*)) = n;
+  soap->alist = p + n;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_mht(struct soap *soap)
+{ register int i;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->mht[i] = NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_free_mht(struct soap *soap)
+{ register int i;
+  register struct soap_mlist *mp, *mq;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+  { for (mp = soap->mht[i]; mp; mp = mq)
+    { mq = mp->next;
+      if (mp->live)
+        fprintf(stderr, "%s(%d): malloc() = %p not freed (memory leak or forgot to call soap_end()?)\n", mp->file, mp->line, mp->ptr);
+      free(mp);
+    }
+    soap->mht[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_track_malloc(struct soap *soap, const char *file, int line, size_t size)
+{ register void *p = malloc(size);
+  if (soap)
+  { register int h = soap_hash_ptr(p);
+    register struct soap_mlist *mp = (struct soap_mlist*)malloc(sizeof(struct soap_mlist));
+    if (soap->fdebug[SOAP_INDEX_TEST])
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): malloc(%lu) = %p\n", file, line, (unsigned long)size, p));
+    mp->next = soap->mht[h];
+    mp->ptr = p;
+    mp->file = file;
+    mp->line = line;
+    mp->live = 1;
+    soap->mht[h] = mp;
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_track_free(struct soap *soap, const char *file, int line, void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+  { if (mp->live)
+    { free(p);
+      if (soap->fdebug[SOAP_INDEX_TEST])
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): free(%p)\n", file, line, p));
+      mp->live = 0;
+    }
+    else
+      fprintf(stderr, "%s(%d): free(%p) double free of pointer malloced at %s(%d)\n", file, line, p, mp->file, mp->line);
+  }
+  else
+    fprintf(stderr, "%s(%d): free(%p) pointer not malloced\n", file, line, p);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_track_unlink(struct soap *soap, const void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+    mp->live = 0;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_dealloc(struct soap *soap, void *p)
+{ if (!soap)
+    return;
+  if (p)
+  { register char **q;
+    for (q = (char**)&soap->alist; *q; q = *(char***)q)
+    { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+      { *q = **(char***)q;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Freed data at %p\n", p));
+        SOAP_FREE(soap, p);
+        return;
+      }
+    }
+    soap_delete(soap, p);
+  }
+  else
+  { register char *q;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free all soap_malloc() data\n"));
+    while (soap->alist)
+    { q = (char*)soap->alist;
+      soap->alist = *(void**)q;
+      q -= *(size_t*)(q + sizeof(void*));
+      SOAP_FREE(soap, q);
+    }
+  }
+  /* we must assume these were deallocated: */
+  soap->action = NULL;
+  soap->fault = NULL;
+  soap->header = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->authrealm = NULL;
+#ifndef WITH_LEANER
+  soap_clr_mime(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_delete(struct soap *soap, void *p)
+{ register struct soap_clist **cp;
+  if (soap_check_state(soap))
+    return;
+  cp = &soap->clist;
+  if (p)
+  { while (*cp)
+    { if (p == (*cp)->ptr)
+      { register struct soap_clist *q = *cp;
+        *cp = q->next;
+        q->fdelete(q);
+        SOAP_FREE(soap, q);
+        return;
+      }
+      cp = &(*cp)->next;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: address not in list\n", p));
+  }
+  else
+  { while (*cp)
+    { register struct soap_clist *q = *cp;
+      *cp = q->next;
+      if (q->ptr == (void*)soap->fault)
+        soap->fault = NULL; /* this was deallocated */
+      else if (q->ptr == (void*)soap->header)
+        soap->header = NULL; /* this was deallocated */
+      q->fdelete(q);
+      SOAP_FREE(soap, q);
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_clist *
+SOAP_FMAC2
+soap_link(struct soap *soap, void *p, int t, int n, void (*fdelete)(struct soap_clist*))
+{ register struct soap_clist *cp;
+  if ((cp = (struct soap_clist*)SOAP_MALLOC(soap, sizeof(struct soap_clist))))
+  { cp->next = soap->clist;
+    cp->type = t;
+    cp->size = n; 
+    cp->ptr = p;
+    cp->fdelete = fdelete;
+    soap->clist = cp;
+  }
+  return cp;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_unlink(struct soap *soap, const void *p)
+{ register char **q;
+  register struct soap_clist **cp;
+  if (!soap || !p)
+    return;
+  for (q = (char**)&soap->alist; *q; q = *(char***)q)
+  { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+    { *q = **(char***)q;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked data %p\n", p));
+#ifdef SOAP_DEBUG
+      soap_track_unlink(soap, p);
+#endif
+      return;
+    }
+  }
+  for (cp = &soap->clist; *cp; cp = &(*cp)->next)
+  { if (p == (*cp)->ptr)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked class instance %p\n", p));
+      q = (char**)*cp;
+      *cp = (*cp)->next;
+      SOAP_FREE(soap, q);
+      return;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_lookup_type(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  if (id && *id)
+  { ip = soap_lookup(soap, id);
+    if (ip)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup id='%s' type=%d\n", id, ip->type));
+      return ip->type;
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "lookup type id='%s' NOT FOUND! Need to get it from xsi:type\n", id));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, unsigned int k)
+{ struct soap_ilist *ip;
+  void **q;
+  if (!p || !id || !*id)
+    return p;
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding first href='%s' type=%d %p (%u bytes)\n", id, t, p, (unsigned int)n));
+    ip->type = t;
+    ip->size = n; 
+    ip->link = p;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->ptr = NULL;
+    ip->level = k;
+    *p = NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolved href='%s' type=%d location=%p (%u bytes)\n", id, t, ip->ptr, (unsigned int)n));
+    if (ip->type != t)
+    { strcpy(soap->id, id);
+      soap->error = SOAP_HREF;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility: id type=%d href type=%d\n", ip->type, t));
+      return NULL;
+    }
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      if (!q)
+        return NULL;
+      *p = (void*)q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    *p = ip->ptr;
+  }
+  else if (ip->level > k)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving level %u pointers to href='%s'\n", ip->level, id));
+    while (ip->level > k)
+    { void *s, **r = &ip->link;
+      q = (void**)ip->link;
+      while (q)
+      { *r = (void*)soap_malloc(soap, sizeof(void*));
+        s = *q;
+        *q = *r;
+        r = (void**)*r;
+        q = (void**)s;
+      }
+      *r = NULL;
+      ip->size = n; 
+      ip->copy = NULL;
+      ip->level = ip->level - 1;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarded href='%s' type=%d location=%p (%u bytes)\n", id, t, p, (unsigned int)n));
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      *p = q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_forward(struct soap *soap, const char *href, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t))
+{ struct soap_ilist *ip;
+  if (!p || !href || !*href)
+    return p;
+  ip = soap_lookup(soap, href); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, href); /* new hash table entry for string id */
+    ip->type = st;
+    ip->size = n;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->ptr = NULL;
+    ip->level = 0;
+    ip->flist = NULL;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry href='%s' type=%d size=%lu level=%d location=%p\n", href, st, (unsigned long)n, k, p));
+  }
+  else if (ip->type != st || (ip->level == k && ip->size != n))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", href, ip->type, (unsigned long)ip->size, k, st, (unsigned long)n));
+    strcpy(soap->id, href);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  if (fcopy || n < sizeof(void*) || *href != '#')
+  { register struct soap_flist *fp = (struct soap_flist*)SOAP_MALLOC(soap, sizeof(struct soap_flist));
+    if (!fp)
+    { soap->error = SOAP_EOM;
+      return NULL;
+    }
+    fp->next = ip->flist;
+    fp->type = tt;
+    fp->ptr = p;
+    fp->level = k;
+    fp->len = len;
+    if (fcopy)
+      fp->fcopy = fcopy;
+    else
+      fp->fcopy = soap_fcopy;
+    ip->flist = fp;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding type=%d (target type=%d) size=%lu location=%p level=%u len=%lu href='%s'\n", st, tt, (unsigned long)n, p, k, (unsigned long)len, href));
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding copying address %p for type=%d href='%s'\n", p, st, href));
+    *(void**)p = ip->copy;
+    ip->copy = p;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*))
+{
+#ifndef WITH_NOIDREF
+  struct soap_ilist *ip;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Enter id='%s' type=%d loc=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  soap->alloced = 0;
+  if (!p)
+  { if (finstantiate)
+      p = finstantiate(soap, t, type, arrayType, &n);
+    else
+      p = soap_malloc(soap, n);
+    if (p)
+      soap->alloced = 1;
+  }
+#ifndef WITH_NOIDREF
+  if (!id || !*id)
+#endif
+    return p;
+#ifndef WITH_NOIDREF
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Lookup entry id='%s for location=%p'\n", id, p));
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    ip->type = t;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry id='%s' type=%d size=%lu level=%u location=%p\n", id, t, (unsigned long)n, k, p));
+  }
+  else if ((ip->type != t || (ip->level == k && ip->size != n)) && (ip->copy || ip->flist))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", id, ip->type, (unsigned long)ip->size, k, t, (unsigned long)n));
+    strcpy(soap->id, id);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Multiply defined id='%s'\n", id));
+    strcpy(soap->id, id);
+    soap->error = SOAP_DUPLICATE_ID;
+    return NULL;
+  }
+  else 
+  { ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update entry id='%s' type=%d location=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  }
+  return ip->ptr;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{ DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Copying data type=%d (target type=%d) %p -> %p (%lu bytes)\n", st, tt, q, p, (unsigned long)n));
+  memcpy(p, q, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_send(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->dime.list)
+  { /* SOAP body referenced attachments must appear first */
+    soap->dime.last->next = soap->dime.first;
+    soap->dime.first = soap->dime.list->next;
+    soap->dime.list->next = NULL;
+    soap->dime.last = soap->dime.list;
+  }
+  if (soap_putdime(soap) || soap_putmime(soap))
+    return soap->error;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End send\n"));
+  if (soap->mode & SOAP_IO) /* need to flush the remaining data in buffer */
+  { if (soap_flush(soap))
+#ifdef WITH_ZLIB
+    { if (soap->mode & SOAP_ENC_ZLIB && soap->zlib_state == SOAP_ZLIB_DEFLATE)
+      { soap->zlib_state = SOAP_ZLIB_NONE;
+        deflateEnd(&soap->d_stream);
+      }
+      return soap->error;
+    }
+#else
+      return soap->error;
+#endif
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { int r;
+      soap->d_stream.avail_in = 0;
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating remainder\n"));
+        r = deflate(&soap->d_stream, Z_FINISH);
+        if (soap->d_stream.avail_out != SOAP_BUFLEN)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN - soap->d_stream.avail_out))
+          { soap->zlib_state = SOAP_ZLIB_NONE;
+            deflateEnd(&soap->d_stream);
+            return soap->error;
+	  }
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (r == Z_OK);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+      soap->z_ratio_out = (float)soap->d_stream.total_out / (float)soap->d_stream.total_in;
+      soap->mode &= ~SOAP_ENC_ZLIB;
+      soap->zlib_state = SOAP_ZLIB_NONE;
+      if (deflateEnd(&soap->d_stream) != Z_OK || r != Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to end deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+#ifdef WITH_GZIP
+      soap->z_buf[0] = soap->z_crc & 0xFF;
+      soap->z_buf[1] = (soap->z_crc >> 8) & 0xFF;
+      soap->z_buf[2] = (soap->z_crc >> 16) & 0xFF;
+      soap->z_buf[3] = (soap->z_crc >> 24) & 0xFF;
+      soap->z_buf[4] = soap->d_stream.total_in & 0xFF;
+      soap->z_buf[5] = (soap->d_stream.total_in >> 8) & 0xFF;
+      soap->z_buf[6] = (soap->d_stream.total_in >> 16) & 0xFF;
+      soap->z_buf[7] = (soap->d_stream.total_in >> 24) & 0xFF;
+      if (soap_flush_raw(soap, soap->z_buf, 8))
+        return soap->error;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip crc32=%lu\n", (unsigned long)soap->z_crc));
+#endif
+    }
+#endif
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    { char *p;
+#ifndef WITH_NOHTTP
+      if (!(soap->mode & SOAP_ENC_XML))
+      { soap->mode--;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending buffered message of length %u\n", (unsigned int)soap->blist->size));
+        if (soap->status >= SOAP_POST)
+          soap->error = soap->fpost(soap, soap->endpoint, soap->host, soap->port, soap->path, soap->action, soap->blist->size);
+        else if (soap->status != SOAP_STOP)
+          soap->error = soap->fresponse(soap, soap->status, soap->blist->size);
+        if (soap->error || soap_flush(soap))
+          return soap->error;
+        soap->mode++;
+      }
+#endif
+      for (p = soap_first_block(soap); p; p = soap_next_block(soap))
+      { DBGMSG(SENT, p, soap_block_size(soap));
+        if ((soap->error = soap->fsend(soap, p, soap_block_size(soap))))
+        { soap_end_block(soap);
+          return soap->error;
+        }
+      }
+      soap_end_block(soap);
+    }
+#ifndef WITH_LEANER
+    else if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { DBGMSG(SENT, "\r\n0\r\n\r\n", 7);
+      if ((soap->error = soap->fsend(soap, "\r\n0\r\n\r\n", 7)))
+        return soap->error;
+    }
+#endif
+  }
+#ifdef WITH_TCPFIN
+#ifdef WITH_OPENSSL
+  if (!soap->ssl && soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#else
+  if (soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#endif
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of send phase\n"));
+  soap->omode &= ~SOAP_XML_SEC;
+  soap->count = 0;
+  soap->part = SOAP_END;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_recv(struct soap *soap)
+{ soap->part = SOAP_END;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) && soap_getdime(soap))
+    return soap->error;
+  soap->dime.list = soap->dime.first;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  if ((soap->mode & SOAP_ENC_MIME) && soap_getmime(soap))
+    return soap->error;
+  soap->mime.list = soap->mime.first;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "End of receive message ok\n"));
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { soap->mode &= ~SOAP_ENC_ZLIB;
+    memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+    soap->bufidx = (char*)soap->d_stream.next_in - soap->z_buf;
+    soap->buflen = soap->z_buflen;
+    soap->zlib_state = SOAP_ZLIB_NONE;
+    if (inflateEnd(&soap->d_stream) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+#ifdef WITH_GZIP
+    if (soap->zlib_in == SOAP_ZLIB_GZIP)
+    { soap_wchar c;
+      short i;
+      for (i = 0; i < 8; i++)
+      { if ((int)(c = soap_getchar(soap)) == EOF)
+          return soap->error = SOAP_EOF;
+        soap->z_buf[i] = (char)c;
+      }
+      if (soap->z_crc != ((uLong)(unsigned char)soap->z_buf[0] | ((uLong)(unsigned char)soap->z_buf[1] << 8) | ((uLong)(unsigned char)soap->z_buf[2] << 16) | ((uLong)(unsigned char)soap->z_buf[3] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: crc check failed, message corrupted? (crc32=%lu)\n", (unsigned long)soap->z_crc));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+      if (soap->d_stream.total_out != ((uLong)(unsigned char)soap->z_buf[4] | ((uLong)(unsigned char)soap->z_buf[5] << 8) | ((uLong)(unsigned char)soap->z_buf[6] << 16) | ((uLong)(unsigned char)soap->z_buf[7] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: incorrect message length\n"));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+    }
+#endif
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    while ((int)soap_getchar(soap) != EOF) /* advance to last chunk */
+      ;
+  if (soap->fdisconnect && (soap->error = soap->fdisconnect(soap)))
+    return soap->error;
+#ifndef WITH_NOIDREF
+  return soap_resolve(soap);
+#else
+#ifndef WITH_LEANER
+  if (soap->xlist)
+  { if (soap->mode & SOAP_ENC_MTOM)
+      return soap->error = SOAP_MIME_HREF;
+    return soap->error = SOAP_DIME_HREF;
+  }
+#endif
+  return SOAP_OK;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free(struct soap *soap)
+{ register struct Namespace *ns;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free namespace stack\n"));
+  while (soap->nlist)
+  { register struct soap_nlist *np = soap->nlist->next;
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free any remaining temp blocks\n"));
+  while (soap->blist)
+    soap_end_block(soap);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute storage\n"));
+  while (soap->attributes)
+  { register struct soap_attribute *tp = soap->attributes->next;
+    if (soap->attributes->value)
+      SOAP_FREE(soap, soap->attributes->value);
+    SOAP_FREE(soap, soap->attributes);
+    soap->attributes = tp;
+  }
+#ifdef WITH_FAST
+  if (soap->labbuf)
+    SOAP_FREE(soap, soap->labbuf);
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  ns = soap->local_namespaces;
+  if (ns)
+  { for (; ns->id; ns++)
+    { if (ns->out)
+      { if (soap->encodingStyle == ns->out)
+          soap->encodingStyle = SOAP_STR_EOS;
+        SOAP_FREE(soap, ns->out);
+        ns->out = NULL;
+      }
+      if (soap->encodingStyle == ns->ns)
+        soap->encodingStyle = SOAP_STR_EOS;
+    }
+    SOAP_FREE(soap, soap->local_namespaces);
+    soap->local_namespaces = NULL;
+  }
+#ifndef WITH_LEANER
+  while (soap->xlist)
+  { struct soap_xlist *xp = soap->xlist->next;
+    SOAP_FREE(soap, soap->xlist);
+    soap->xlist = xp;
+  }
+#endif
+#ifndef WITH_NOIDREF
+  soap_free_pht(soap);
+  soap_free_iht(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_logs(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { soap->logfile[i] = NULL;
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEAN) || defined(SOAP_DEBUG)
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_open_logfile(struct soap *soap, int i)
+{ if (soap->logfile[i])
+    soap->fdebug[i] = fopen(soap->logfile[i], i < 2 ? "ab" : "a");
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_close_logfile(struct soap *soap, int i)
+{ if (soap->fdebug[i])
+  { fclose(soap->fdebug[i]);
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_close_logfiles(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+    soap_close_logfile(soap, i);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_set_logfile(struct soap *soap, int i, const char *logfile)
+{ char *s = NULL;
+  soap_close_logfile(soap, i);
+  if (soap->logfile[i])
+    SOAP_FREE(soap, (void*)soap->logfile[i]);
+  if (logfile)
+    if ((s = (char*)SOAP_MALLOC(soap, strlen(logfile) + 1)))
+      strcpy(s, logfile);
+  soap->logfile[i] = s;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_recv_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_RECV, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_sent_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_SENT, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_test_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_TEST, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy(struct soap *soap)
+{ return soap_copy_context((struct soap*)malloc(sizeof(struct soap)), soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy_context(struct soap *copy, struct soap *soap)
+{ if (soap_check_state(soap))
+    return NULL;
+  if (copy)
+  { register struct soap_plugin *p;
+    memcpy(copy, soap, sizeof(struct soap));
+    copy->state = SOAP_COPY;
+    copy->user = NULL;
+    copy->error = SOAP_OK;
+    copy->userid = NULL;
+    copy->passwd = NULL;
+    copy->nlist = NULL;
+    copy->blist = NULL;
+    copy->clist = NULL;
+    copy->alist = NULL;
+    copy->attributes = NULL;
+#ifdef WITH_FAST
+    copy->labbuf = NULL;
+    copy->lablen = 0;
+    copy->labidx = 0;
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_mht(copy);
+#endif
+    copy->local_namespaces = NULL;
+#ifndef WITH_NOIDREF
+    soap_init_iht(copy);
+    soap_init_pht(copy);
+#endif
+    copy->header = NULL;
+    copy->fault = NULL;
+    copy->action = NULL;
+#ifndef WITH_LEAN
+#ifdef WITH_COOKIES
+    copy->cookies = soap_copy_cookies(copy);
+#else
+    copy->cookies = NULL;
+#endif
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_logs(copy);
+    soap_set_recv_logfile(copy, soap->logfile[SOAP_INDEX_RECV]);
+    soap_set_sent_logfile(copy, soap->logfile[SOAP_INDEX_SENT]);
+    soap_set_test_logfile(copy, soap->logfile[SOAP_INDEX_TEST]);
+#endif
+    copy->plugins = NULL;
+    for (p = soap->plugins; p; p = p->next)
+    { register struct soap_plugin *q = (struct soap_plugin*)SOAP_MALLOC(copy, sizeof(struct soap_plugin));
+      if (!q)
+        return NULL;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying plugin '%s'\n", p->id));
+      *q = *p;
+      if (p->fcopy && (soap->error = p->fcopy(copy, q, p)))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not copy plugin '%s'\n", p->id));
+        SOAP_FREE(copy, q);
+        return NULL;
+      }
+      q->next = copy->plugins;
+      copy->plugins = q;
+    }
+  }
+  else
+    soap->error = SOAP_EOM;
+  return copy;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init(struct soap *soap)
+{ soap->state = SOAP_INIT;
+  soap->version = 0;
+  soap_imode(soap, SOAP_IO_DEFAULT);
+  soap_omode(soap, SOAP_IO_DEFAULT);
+  soap->plugins = NULL;
+  soap->user = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+  soap->fconnect = NULL;
+  soap->fdisconnect = NULL;
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+  soap->fplugin = fplugin;
+#ifndef WITH_LEANER
+  soap->fdimereadopen = NULL;
+  soap->fdimewriteopen = NULL;
+  soap->fdimereadclose = NULL;
+  soap->fdimewriteclose = NULL;
+  soap->fdimeread = NULL;
+  soap->fdimewrite = NULL;
+#endif
+  soap->float_format = "%.8g"; /* .8 preserves single FP precision as much as possible, but might not be very efficient */
+  soap->double_format = "%.17lg"; /* .17 preserves double FP precision as much as possible, but might not be very efficient */
+  soap->dime_id_format = "cid:id%d"; /* default DIME id format */
+  soap->http_version = "1.1";
+  soap->actor = NULL;
+  soap->max_keep_alive = SOAP_MAXKEEPALIVE;
+  soap->keep_alive = 0;
+  soap->recv_timeout = 0;
+  soap->send_timeout = 0;
+  soap->connect_timeout = 0;
+  soap->accept_timeout = 0;
+  soap->socket_flags = 0;
+  soap->connect_flags = 0;
+  soap->bind_flags = 0;
+  soap->accept_flags = 0;
+  soap->ip = 0;
+#ifdef WITH_FAST
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  soap->encodingStyle = SOAP_STR_EOS;
+#ifndef WITH_NONAMESPACES
+  soap->namespaces = namespaces;
+#else
+  soap->namespaces = NULL;
+#endif
+  soap->local_namespaces = NULL;
+  soap->nlist = NULL;
+  soap->blist = NULL;
+  soap->clist = NULL;
+  soap->alist = NULL;
+  soap->attributes = NULL;
+  soap->header = NULL;
+  soap->fault = NULL;
+  soap->master = SOAP_INVALID_SOCKET;
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->os = NULL;
+  soap->is = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifndef UNDER_CE
+  soap->recvfd = 0;
+  soap->sendfd = 1;
+#else
+  soap->recvfd = stdin;
+  soap->sendfd = stdout;
+#endif 
+  soap->host[0] = '\0';
+  soap->port = 0;
+  soap->action = NULL;
+  soap->proxy_host = NULL;
+  soap->proxy_port = 8080;
+  soap->proxy_userid = NULL;
+  soap->proxy_passwd = NULL;
+  soap->authrealm = NULL;
+  soap->prolog = NULL;
+#ifdef WITH_OPENSSL
+  if (!ssl_init_done)
+    soap_ssl_init();
+  soap->fsslauth = ssl_auth_init;
+  soap->fsslverify = ssl_verify_callback;
+  soap->bio = NULL;
+  soap->ssl = NULL;
+  soap->ctx = NULL;
+  soap->require_server_auth = 0;
+  soap->require_client_auth = 0;
+  soap->rsa = 0;
+  soap->keyfile = NULL;
+  soap->password = NULL;
+  soap->dhfile = NULL;
+  soap->cafile = NULL;
+  soap->capath = NULL;
+  soap->crlfile = NULL;
+  soap->randfile = NULL;
+  soap->session = NULL;
+#endif
+#ifdef WITH_ZLIB
+  soap->zlib_state = SOAP_ZLIB_NONE;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.zalloc = NULL;
+  soap->d_stream.zfree = NULL;
+  soap->d_stream.opaque = NULL;
+  soap->z_level = 6;
+#endif
+#ifndef WITH_LEAN
+  soap->c14ninclude = NULL;
+  soap->c14nexclude = NULL;
+  soap->cookies = NULL;
+  soap->cookie_domain = NULL;
+  soap->cookie_path = NULL;
+  soap->cookie_max = 32;
+#endif
+#ifdef SOAP_DEBUG
+  soap_init_mht(soap);
+  soap_init_logs(soap);
+  soap_set_recv_logfile(soap, "RECV.log");
+  soap_set_sent_logfile(soap, "SENT.log");
+  soap_set_test_logfile(soap, NULL);
+#endif
+#ifdef WMW_RPM_IO
+  soap->rpmreqid = NULL;
+#endif
+#ifdef PALM
+  palmNetLibOpen();
+#endif
+#ifndef WITH_NOIDREF
+  soap_init_iht(soap);
+  soap_init_pht(soap);
+#endif
+  soap_begin(soap);
+#ifdef SOAP_DEBUG
+  soap_set_test_logfile(soap, "TEST.log");
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init1(struct soap *soap, soap_mode mode)
+{ soap_init2(soap, mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init2(struct soap *soap, soap_mode imode, soap_mode omode)
+{ soap_init(soap);
+  soap_imode(soap, imode);
+  soap_omode(soap, omode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_begin(struct soap *soap)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing\n"));
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+  soap->null = 0;
+  soap->position = 0;
+  soap->encoding = 0;
+  soap->mustUnderstand = 0;
+  soap->mode = 0;
+  soap->ns = 0;
+  soap->part = SOAP_END;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  soap->error = SOAP_OK;
+  soap->peeked = 0;
+  soap->ahead = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+  soap->endpoint[0] = '\0';
+#ifndef WITH_LEANER
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+#endif
+  soap_free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end(struct soap *soap)
+{ register struct soap_clist *cp;
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  soap_dealloc(soap, NULL);
+  while (soap->clist)
+  { cp = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = cp;
+  }
+  soap_closesock(soap);
+#ifdef SOAP_DEBUG
+  soap_close_logfiles(soap);
+#endif
+#ifdef PALM
+  palmNetLibClose();
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_namespaces(struct soap *soap, struct Namespace *p)
+{ register struct Namespace *ns = soap->local_namespaces;
+  register struct soap_nlist *np, *nq, *nr;
+  register unsigned int level = soap->level;
+  soap->namespaces = p;
+  soap->local_namespaces = NULL;
+  soap_set_local_namespaces(soap);
+  /* reverse the namespace list */
+  np = soap->nlist;
+  soap->nlist = NULL;
+  if (np)
+  { nq = np->next;
+    np->next = NULL;
+    while (nq)
+    { nr = nq->next;
+      nq->next = np;
+      np = nq;
+      nq = nr;
+    }
+  }
+  /* then push on new stack */
+  while (np)
+  { register const char *s;
+    soap->level = np->level; /* preserve element nesting level */
+    s = np->ns;
+    if (!s && np->index >= 0 && ns)
+    { s = ns[np->index].out;
+      if (!s)
+        s = ns[np->index].ns;
+    }
+    if (s && soap_push_namespace(soap, np->id, s))
+      return soap->error;
+    nq = np;
+    np = np->next;
+    SOAP_FREE(soap, nq);
+  }
+  if (ns)
+  { register int i;
+    for (i = 0; ns[i].id; i++)
+    { if (ns[i].out)
+      { SOAP_FREE(soap, ns[i].out);
+        ns[i].out = NULL;
+      }
+    }
+    SOAP_FREE(soap, ns);
+  }
+  soap->level = level; /* restore level */
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_local_namespaces(struct soap *soap)
+{ if (soap->namespaces && !soap->local_namespaces)
+  { register const struct Namespace *ns1;
+    register struct Namespace *ns2;
+    register size_t n = 1;
+    for (ns1 = soap->namespaces; ns1->id; ns1++)
+      n++;
+    n *= sizeof(struct Namespace);
+    ns2 = (struct Namespace*)SOAP_MALLOC(soap, n);
+    if (ns2)
+    { memcpy(ns2, soap->namespaces, n);
+      if (ns2[0].ns)
+      { if (!strcmp(ns2[0].ns, soap_env1))
+          soap->version = 1;
+        else
+          soap->version = 2;
+      }
+      soap->local_namespaces = ns2;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+#ifndef PALM_1
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_strsearch(const char *big, const char *little)
+{ size_t n = strlen(little);
+  const char *s = big;
+  while (s) 
+  { if (!strncmp(s, little, n) && (s[n] == '\0' || s[n] == ' '))
+      return s;
+    s = strchr(s, ' ');
+    if (s)
+      s++;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_lookup_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np;
+  for (np = soap->nlist; np; np = np->next)
+  { if (!strncmp(np->id, tag, n) && !np->id[n])
+      return np;
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized)
+{ register struct soap_nlist *np;
+  size_t n, k;
+  if (soap_strsearch(soap->c14nexclude, id))
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns?ns:""));
+  if (!utilized)
+  { for (np = soap->nlist; np; np = np->next)
+    { if (!strcmp(np->id, id) && (!np->ns || !strcmp(np->ns, ns)))
+        break;
+    }
+    if (np)
+    { if (np->index == 1)
+        utilized = np->index;
+      else
+        return NULL;
+    }
+  }
+  n = strlen(id);
+  if (ns)
+    k = strlen(ns);
+  else
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k + 1);
+  if (!np)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  np->next = soap->nlist;
+  soap->nlist = np;
+  strcpy(np->id, id);
+  if (ns)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+  }
+  else
+    np->ns = NULL;
+  np->level = soap->level;
+  np->index = utilized;
+  return np;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_utilize_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np = soap_lookup_ns(soap, tag, n);
+  if (np)
+  { if (np->index == 0)
+      soap_push_ns(soap, np->id, np->ns, 1);
+  }
+  else
+  { strncpy(soap->tmpbuf, tag, n);
+    soap->tmpbuf[n] = '\0';
+    soap_push_ns(soap, soap->tmpbuf, NULL, 1);
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_pop_ns(struct soap *soap)
+{ soap_pop_namespace(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element(struct soap *soap, const char *tag, int id, const char *type)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element begin tag='%s' id='%d' type='%s'\n", tag, id, type?type:""));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->soap = soap;
+    elt->next = NULL;
+    elt->prnt = soap->dom;
+    elt->name = soap_strdup(soap, tag);
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->nstr = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->node = NULL;
+    elt->type = 0;
+    elt->head = NULL;
+    elt->tail = NULL;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+  }
+  else
+  {
+#endif
+    soap->level++;
+#ifndef WITH_LEAN
+    if (!soap->ns)
+    { if (!(soap->mode & SOAP_XML_CANONICAL)
+       && soap_send(soap, soap->prolog ? soap->prolog : "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"))
+        return soap->error;
+    }
+    else if (soap->mode & SOAP_XML_INDENT)
+    { if (soap->ns == 1 && soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+      soap->body = 1;
+    }
+#endif
+    if (soap_send_raw(soap, "<", 1)
+     || soap_send(soap, tag))
+      return soap->error;
+#ifdef WITH_DOM
+  }
+#endif
+  if (!soap->ns)
+  { struct Namespace *ns;
+    for (ns = soap->local_namespaces; ns && ns->id; ns++)
+    { if (*ns->id && (ns->out || ns->ns))
+      { sprintf(soap->tmpbuf, "xmlns:%s", ns->id);
+        if (soap_attribute(soap, soap->tmpbuf, ns->out ? ns->out : ns->ns))
+          return soap->error;
+      }
+    }   
+  }
+  soap->ns = 1; /* start with 0 or 2, but should be one to continue */
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { const char *s = strchr(tag, ':');
+    if (s)
+      soap_utilize_ns(soap, tag, s - tag);
+  }
+#endif
+  if (id > 0)
+  { sprintf(soap->tmpbuf, "_%d", id);
+    if (soap_attribute(soap, "id", soap->tmpbuf))
+      return soap->error;
+  }
+  if (type && *type)
+  { if (soap_attribute(soap, "xsi:type", type))
+      return soap->error;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { const char *s = strchr(type, ':');
+      if (s)
+        soap_utilize_ns(soap, type, s - type);
+    }
+#endif
+  }
+  if (soap->null && soap->position > 0)
+  { int i;
+    sprintf(soap->tmpbuf, "[%d", soap->positions[0]);
+    for (i = 1; i < soap->position; i++)
+      sprintf(soap->tmpbuf + strlen(soap->tmpbuf), ",%d", soap->positions[i]);
+    strcat(soap->tmpbuf, "]");
+    if (soap_attribute(soap, "SOAP-ENC:position", soap->tmpbuf))
+      return soap->error;
+  }
+  if (soap->mustUnderstand)
+  { if (soap->actor && *soap->actor)
+    { if (soap_attribute(soap, soap->version == 2 ? "SOAP-ENV:role" : "SOAP-ENV:actor", soap->actor))
+        return soap->error;
+    }
+    if (soap_attribute(soap, "SOAP-ENV:mustUnderstand", soap->version == 2 ? "true" : "1"))
+      return soap->error;
+    soap->mustUnderstand = 0;
+  }
+  if (soap->encoding)
+  { if (soap->encodingStyle && soap->local_namespaces)
+    { if (!*soap->encodingStyle)
+      { if (soap->local_namespaces[1].out)
+          soap->encodingStyle = soap->local_namespaces[1].out;
+        else
+          soap->encodingStyle = soap->local_namespaces[1].ns;
+      }
+      if (soap_attribute(soap, "SOAP-ENV:encodingStyle", soap->encodingStyle))
+        return soap->error;
+    }
+    soap->encoding = 0;
+  }
+  soap->null = 0;
+  soap->position = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_out(struct soap *soap, const char *tag, int id, const char *type)
+{ if (*tag == '-')
+    return SOAP_OK;
+  if (soap_element(soap, tag, id, type))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRRCHR
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_strrchr(const char *s, int t)
+{ register char *r = NULL;
+  while (*s)
+    if (*s++ == t)
+      r = (char*)s - 1;
+  return r;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOL
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_strtol(const char *s, char **t, int b)
+{ register long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { short neg = 0;
+    if (*s == '-')
+    { s++;
+      neg = 1;
+    }
+    else if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 214748364 && (n > 214748364 || c >= '8'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+    if (neg)
+      n = -n;
+  }
+  else /* b == 16 and value is always positive */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x07FFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOUL
+SOAP_FMAC1
+unsigned long
+SOAP_FMAC2
+soap_strtoul(const char *s, char **t, int b)
+{ unsigned long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 429496729 && (n > 429496729 || c >= '6'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+  }
+  else /* b == 16 */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x0FFFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_begin_out(struct soap *soap, const char *tag, int id, const char *type, const char *offset)
+{ if (soap_element(soap, tag, id, "SOAP-ENC:Array"))
+    return soap->error;
+  if (soap->version == 2)
+  { const char *s;
+    s = soap_strrchr(type, '[');
+    if ((size_t)(s - type) < sizeof(soap->tmpbuf))
+    { strncpy(soap->tmpbuf, type, s - type);
+      soap->tmpbuf[s - type] = '\0';
+      if (type && *type && (soap_attribute(soap, "SOAP-ENC:itemType", soap->tmpbuf)))
+        return soap->error;
+      if (s && (soap_attribute(soap, "SOAP-ENC:arraySize", s + 1)))
+        return soap->error;
+    }
+  }
+  else
+  { if (offset && (soap_attribute(soap, "SOAP-ENC:offset", offset)))
+      return soap->error;
+    if (type && *type && (soap_attribute(soap, "SOAP-ENC:arrayType", type)))
+      return soap->error;
+  }
+#ifndef WITH_LEAN
+  if (type && *type && (soap->mode & SOAP_XML_CANONICAL))
+  { const char *s = strchr(type, ':');
+    if (s)
+      soap_utilize_ns(soap, type, s - type);
+  }
+#endif
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_start_end_out(struct soap *soap, const char *tag)
+{ register struct soap_attribute *tp;
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att;
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { att = &soap->dom->atts;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible)
+      { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+	if (!*att)
+	  return soap->error = SOAP_EOM;
+	(*att)->next = NULL;
+        (*att)->nstr = NULL;
+        (*att)->name = soap_strdup(soap, tp->name);
+        (*att)->data = soap_strdup(soap, tp->value);
+        (*att)->wide = NULL;
+        (*att)->soap = soap;
+        tp->visible = 0;
+      }
+    }
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { struct soap_nlist *np;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible && tp->name)
+      { const char *s = strchr(tp->name, ':');
+        if (s)
+          soap_utilize_ns(soap, tp->name, s - tp->name);
+      }
+    }
+    for (np = soap->nlist; np; np = np->next)
+    { if (np->index == 1 && np->ns)
+      { sprintf(soap->tmpbuf, "xmlns:%s", np->id);
+        soap_set_attr(soap, soap->tmpbuf, np->ns);
+        np->index = 2;
+      }
+    }
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible)
+    { if (soap_send(soap, " ") || soap_send(soap, tp->name))
+        return soap->error;
+      if (tp->visible == 2 && tp->value)
+        if (soap_send_raw(soap, "=\"", 2)
+	 || soap_string_out(soap, tp->value, 1)
+	 || soap_send_raw(soap, "\"", 1))
+          return soap->error;
+      tp->visible = 0;
+    }
+  }
+  if (tag)
+  { 
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { if (soap_send_raw(soap, ">", 1)
+       || soap_element_end_out(soap, tag))
+        return soap->error;
+    }
+    else
+#endif
+    soap->level--;	/* decrement level just before /> */
+    if (soap_send_raw(soap, "/>", 2))
+      return soap->error;
+    return SOAP_OK;
+  }
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_out(struct soap *soap, const char *tag)
+{ if (*tag == '-')
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element ending tag='%s'\n", tag));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+    soap_pop_ns(soap);
+  if (soap->mode & SOAP_XML_INDENT)
+  { if (!soap->body)
+    { if (soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+    }
+    soap->body = 0;
+  }
+#endif
+  if (soap_send_raw(soap, "</", 2)
+   || soap_send(soap, tag))
+    return soap->error;
+  soap->level--;	/* decrement level just before > */
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_ref(struct soap *soap, const char *tag, int id, int href)
+{ register int n = 0;
+  if (soap->version == 2)
+    n = 1;
+  sprintf(soap->href, "#_%d", href);
+  return soap_element_href(soap, tag, id, "href" + n, soap->href + n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_href(struct soap *soap, const char *tag, int id, const char *ref, const char *val)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element '%s' reference %s='%s'\n", tag, ref, val));
+  if (soap_element(soap, tag, id, NULL)
+   || soap_attribute(soap, ref, val)
+   || soap_element_start_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_null(struct soap *soap, const char *tag, int id, const char *type)
+{ struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (tp->visible)
+      break;
+  if (tp || (soap->version == 2 && soap->position > 0) || id > 0 || (soap->mode & SOAP_XML_NIL))
+  { if (soap_element(soap, tag, id, type))
+      return soap->error;
+    if (soap->part != SOAP_IN_HEADER && soap->encodingStyle)
+      if (soap_attribute(soap, "xsi:nil", "true"))
+        return soap->error;
+    return soap_element_start_end_out(soap, tag);
+  }
+  soap->null = 1;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_id(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, int n, const char *type, int t) 
+{ if (!p || (a && !a->__ptr))
+  { soap_element_null(soap, tag, id, type);
+    return -1;
+  }
+#ifndef WITH_NOIDREF
+  if (soap->mode & SOAP_XML_TREE)
+    return 0;
+  if (id < 0)
+  { struct soap_plist *pp;
+    if (a)
+      id = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+    else
+      id = soap_pointer_lookup(soap, p, t, &pp);
+    if (id)
+    { if (soap_is_embedded(soap, pp))
+      { soap_element_ref(soap, tag, 0, id);
+        return -1;
+      }
+      if (soap_is_single(soap, pp))
+        return 0;
+      soap_set_embedded(soap, pp);
+    }
+  }
+  return id;
+#else
+  return 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_result(struct soap *soap, const char *tag)
+{ if (soap->version == 2 && soap->encodingStyle)
+    if (soap_element(soap, "SOAP-RPC:result", 0, NULL)
+     || soap_attribute(soap, "xmlns:SOAP-RPC", soap_rpc)
+     || soap_element_start_end_out(soap, NULL)
+     || soap_string_out(soap, tag, 0)
+     || soap_element_end_out(soap, "SOAP-RPC:result"))
+      return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attribute(struct soap *soap, const char *name, const char *value)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+    a->next = soap->dom->atts;
+    a->nstr = NULL;
+    a->name = soap_strdup(soap, name);
+    a->data = soap_strdup(soap, value);
+    a->wide = NULL;
+    a->soap = soap;
+    soap->dom->atts = a;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { /* TODO: consider using this code to handle default namespace
+    if (!strncmp(name, "xmlns", 5) && (name[5] == ':' || name[5] == '\0'))
+    { if (name[5] == ':')
+        soap_push_ns(soap, name + 6, value, 0);
+      else
+        soap_push_ns(soap, "", value, 0);
+    }
+    */
+    if (!strncmp(name, "xmlns:", 6))
+      soap_push_ns(soap, name + 6, value, 0);
+    else if (soap_set_attr(soap, name, value))
+      return soap->error;
+  }
+  else
+#endif
+  { if (soap_send(soap, " ") || soap_send(soap, name))
+      return soap->error;
+    if (value)
+      if (soap_send_raw(soap, "=\"", 2)
+       || soap_string_out(soap, value, 1)
+       || soap_send_raw(soap, "\"", 1))
+        return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_in(struct soap *soap, const char *tag, int nillable)
+{ if (!soap_peek_element(soap))
+  { if (soap->other)
+      return soap->error = SOAP_TAG_MISMATCH;
+    if (tag && *tag == '-')
+      return SOAP_OK;
+    if (!(soap->error = soap_match_tag(soap, soap->tag, tag)))
+    { soap->peeked = 0;
+      if (soap->body)
+        soap->level++;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"" ));
+      if (!nillable && soap->null && (soap->mode & SOAP_XML_STRICT))
+        return soap->error = SOAP_NULL;
+    }
+  }
+  else if (soap->error == SOAP_NO_TAG && tag && *tag == '-')
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_in(struct soap *soap, const char *tag)  
+{ register soap_wchar c;
+  register char *s;
+  register const char *t;
+  register int n = 0;
+  if (tag && *tag == '-')
+    return SOAP_OK;
+  soap->level--;
+  soap_pop_namespace(soap);
+#ifdef WITH_DOM
+  /* this whitespace or mixed content is not insignificant for DOM */
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!soap->peeked && !soap_string_in(soap, 3, -1, -1))
+      return soap->error;
+    if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  if (soap->peeked)
+  { if (soap->error == SOAP_NO_TAG)
+      soap->error = SOAP_OK;
+    if (*soap->tag)
+      n++;
+    soap->peeked = 0;
+  }
+  do
+  { while (((c = soap_get(soap)) != SOAP_TT))
+    { if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      if (c == SOAP_LT)
+        n++;
+      else if (c == '/')
+      { c = soap_get(soap);
+        if (c == SOAP_GT)
+	  n--;
+        else
+	  soap_unget(soap, c);
+      }
+    }
+  } while (n--);
+  s = soap->tag;
+  while (soap_notblank(c = soap_get(soap)))
+    *s++ = (char)c;
+  *s = '\0';
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  while (soap_blank(c))
+    c = soap_get(soap);
+  if (c != SOAP_GT)
+    return soap->error = SOAP_SYNTAX_ERROR;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:""));
+  if (!tag || !*tag)
+    return SOAP_OK;
+  if ((s = strchr(soap->tag, ':')))
+    s++;
+  else
+    s = soap->tag;
+  if ((t = strchr(tag, ':')))
+    t++;
+  else
+    t = tag;
+  if (!SOAP_STRCMP(s, t))
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element tag name does not match\n"));
+  return soap->error = SOAP_SYNTAX_ERROR;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_attr_value(struct soap *soap, const char *name, int flag)
+{ register struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (!soap_match_tag(soap, tp->name, name))
+      break;
+  if (tp && tp->visible == 2)
+  { if (flag == 2 && (soap->mode & SOAP_XML_STRICT))
+      soap->error = SOAP_PROHIBITED;
+    else
+      return tp->value;
+  }
+  else if (flag == 1 && (soap->mode & SOAP_XML_STRICT))
+    soap->error = SOAP_REQUIRED;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_attr(struct soap *soap, const char *name, const char *value)
+{ register struct soap_attribute *tp;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set attribute %s='%s'\n", name, value?value:""));
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (!strcmp(tp->name, name))
+      break;
+  }
+  if (!tp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute %s\n", name));
+    if (!(tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(name))))
+      return soap->error = SOAP_EOM;
+    tp->ns = NULL;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { struct soap_attribute **tpp = &soap->attributes;
+      const char *s = strchr(name, ':');
+      if (!strncmp(name, "xmlns", 5))
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) || strcmp((*tpp)->name + 5, name + 5) > 0)
+            break;
+      }
+      else if (!s)
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) && ((*tpp)->ns || strcmp((*tpp)->name, name) > 0))
+            break;
+      }
+      else
+      { int k;
+        for (; *tpp; tpp = &(*tpp)->next)
+	{ if (!strncmp((*tpp)->name, "xmlns:", 6) && !strncmp((*tpp)->name + 6, name, s - name) && !(*tpp)->name[6 + s - name])
+	  { if (!tp->ns)
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Canonicalization: prefix %s=%p(%s)\n", name, (*tpp)->ns, (*tpp)->ns));
+	      tp->ns = (*tpp)->ns;
+	    }
+	  }
+          else if (strncmp((*tpp)->name, "xmlns", 5) && (*tpp)->ns && tp->ns && ((k = strcmp((*tpp)->ns, tp->ns)) > 0 || (!k && strcmp((*tpp)->name, name) > 0)))
+            break;
+        }
+      }
+      tp->next = *tpp;
+      *tpp = tp;
+    }
+    else
+#endif
+    { tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    strcpy(tp->name, name);
+    tp->value = NULL;
+  }
+  else if (tp->visible)
+  { return SOAP_OK;
+  }
+  else if (value && tp->value && tp->size <= strlen(value))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute value of %s (free %p)\n", name, tp->value));
+    SOAP_FREE(soap, tp->value);
+    tp->value = NULL;
+    tp->ns = NULL;
+  }
+  if (value)
+  { if (!tp->value)
+    { tp->size = strlen(value) + 1;
+      if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+        return soap->error = SOAP_EOM;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute value of %s (%p)\n", tp->name, tp->value));
+    }
+    strcpy(tp->value, value);
+    if (!strncmp(tp->name, "xmlns:", 6))
+      tp->ns = tp->value;
+    tp->visible = 2;
+#ifndef WITH_LEAN
+    if (!strcmp(name, "wsu:Id"))
+    { soap->part = SOAP_BEGIN_SECURITY;
+      strncpy(soap->id, value, sizeof(soap->id));
+      soap->id[sizeof(soap->id)-1] = '\0';
+    }
+#endif
+  }
+  else
+    tp->visible = 1;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_attr(struct soap *soap)
+{ register struct soap_attribute *tp;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_CANONICAL))
+  { while (soap->attributes)
+    { tp = soap->attributes->next;
+      SOAP_FREE(soap, soap->attributes->value);
+      SOAP_FREE(soap, soap->attributes);
+      soap->attributes = tp;
+    }
+  }
+  else
+#endif
+  { for (tp = soap->attributes; tp; tp = tp->next)
+      tp->visible = 0;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d)
+{ register size_t i;
+  for (i = 0; i < n; i++)
+  { register soap_wchar c = soap_get(soap);
+    switch (c)
+    {
+    case SOAP_TT:
+      *s++ = '<';
+      soap_unget(soap, '/');
+      break;
+    case SOAP_LT:
+      *s++ = '<';
+      break;
+    case SOAP_GT:
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '>';
+      break;
+    case SOAP_QT:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '"';
+      break;
+    case SOAP_AP:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '\'';
+      break;
+    case '\t':
+    case '\n':
+    case '\r':
+    case ' ':
+    case '/':
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+    default:
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+  }
+  return soap->error = SOAP_EOM;
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_store_lab(struct soap *soap, const char *s, size_t n)
+{ soap->labidx = 0;
+  return soap_append_lab(soap, s, n);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_append_lab(struct soap *soap, const char *s, size_t n)
+{ if (soap->labidx + n >= soap->lablen)
+  { register char *t = soap->labbuf;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enlarging look-aside buffer to append data, old size=%lu", (unsigned long)soap->lablen));
+    if (soap->lablen == 0)
+      soap->lablen = SOAP_LABLEN;
+    while (soap->labidx + n >= soap->lablen)
+      soap->lablen <<= 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, ", new size=%lu\n", (unsigned long)soap->lablen));
+    soap->labbuf = (char*)SOAP_MALLOC(soap, soap->lablen);
+    if (!soap->labbuf)
+    { if (t)
+        SOAP_FREE(soap, t);
+      return soap->error = SOAP_EOM;
+    }
+    if (t)
+    { memcpy(soap->labbuf, t, soap->labidx);
+      SOAP_FREE(soap, t);
+    }
+  }
+  if (s)
+  { memcpy(soap->labbuf + soap->labidx, s, n);
+    soap->labidx += n;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_peek_element(struct soap *soap)
+{
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att = NULL;
+  register char *lead = NULL;
+#endif
+  register struct soap_attribute *tp;
+  const char *t;
+  register char *s;
+  register soap_wchar c;
+  register int i;
+  if (soap->peeked)
+  { if (!*soap->tag)
+      return soap->error = SOAP_NO_TAG;
+    return SOAP_OK;
+  }
+  soap->peeked = 1;
+  c = soap_getutf8(soap);
+#ifdef WITH_DOM
+  /* whitespace leading to start tag is not insignificant for DOM */
+  if (soap_blank(c))
+  { soap->labidx = 0;
+    do
+    { if (soap_append_lab(soap, NULL, 0))
+        return SOAP_EOM;
+      s = soap->labbuf + soap->labidx;
+      i = soap->lablen - soap->labidx;
+      soap->labidx = soap->lablen;
+      while (soap_blank(c) && i--)
+      { *s++ = c;
+        c = soap_getutf8(soap);
+      }
+    }
+    while (soap_blank(c));
+    *s = '\0';
+    lead = soap_strdup(soap, soap->labbuf);
+  }
+#else
+  while (soap_blank(c))
+    c = soap_getutf8(soap);
+#endif
+  if (c != SOAP_LT)
+  { *soap->tag = '\0';
+    if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, c);
+#ifdef WITH_DOM
+    /* whitespace leading to end tag is not insignificant for DOM */
+    if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+      soap->dom->tail = soap_strdup(soap, lead);
+#endif
+    return soap->error = SOAP_NO_TAG;
+  }
+  s = soap->tag;
+  do c = soap_get1(soap);
+  while (soap_blank(c));
+  i = sizeof(soap->tag);
+  while (c != '>' && c != '/' && soap_notblank(c))
+  { if (--i > 0)
+      *s++ = (char)c;
+    c = soap_get1(soap);
+  }
+  while (soap_blank(c))
+    c = soap_get1(soap);
+  *s = '\0';
+  soap->id[0] = '\0';
+  soap->href[0] = '\0';
+  soap->type[0] = '\0';
+  soap->arrayType[0] = '\0';
+  soap->arraySize[0] = '\0';
+  soap->arrayOffset[0] = '\0';
+  soap->other = 0;
+  soap->root = -1;
+  soap->position = 0;
+  soap->null = 0;
+  soap->mustUnderstand = 0;
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt;
+    elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->next = NULL;
+    elt->nstr = NULL;
+    elt->name = soap_strdup(soap, soap->tag);
+    elt->prnt = soap->dom;
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->type = 0;
+    elt->node = NULL;
+    elt->head = lead;
+    elt->tail = NULL;
+    elt->soap = soap;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+    att = &elt->atts;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+    tp->visible = 0;
+  while ((int)c != EOF && c != '>' && c != '/')
+  { s = soap->tmpbuf;
+    i = sizeof(soap->tmpbuf);
+    while (c != '=' && c != '>' && c != '/' && soap_notblank(c))
+    { if (--i > 0)
+        *s++ = (char)c;
+      c = soap_get1(soap);
+    }
+    *s = '\0';
+    if (i == sizeof(soap->tmpbuf))
+      return soap->error = SOAP_SYNTAX_ERROR;
+#ifdef WITH_DOM
+    /* add attribute name to dom */
+    if (att)
+    { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+       if (!*att)
+         return soap->error = SOAP_EOM;
+       (*att)->next = NULL;
+       (*att)->nstr = NULL;
+       (*att)->name = soap_strdup(soap, soap->tmpbuf);
+       (*att)->data = NULL;
+       (*att)->wide = NULL;
+       (*att)->soap = soap;
+    }
+#endif
+    if (!strncmp(soap->tmpbuf, "xmlns", 5))
+    { if (soap->tmpbuf[5] == ':')
+      { soap->tmpbuf[5] = '\0';
+        t = soap->tmpbuf + 6;
+      }
+      else if (soap->tmpbuf[5])
+        t = NULL;
+      else
+        t = SOAP_STR_EOS;
+    }
+    else
+      t = NULL;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (!SOAP_STRCMP(tp->name, soap->tmpbuf))
+        break;
+    }
+    if (!tp)
+    { tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(soap->tmpbuf));
+      if (!tp)
+        return soap->error = SOAP_EOM;
+      strcpy(tp->name, soap->tmpbuf);
+      tp->value = NULL;
+      tp->size = 0;
+      tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    while (soap_blank(c))
+      c = soap_get1(soap);
+    if (c == '=')
+    { do c = soap_getutf8(soap);
+      while (soap_blank(c));
+      if (c != SOAP_QT && c != SOAP_AP)
+      { soap_unget(soap, c);
+        c = ' '; /* blank delimiter */
+      }
+      if (soap_getattrval(soap, tp->value, tp->size, c))
+      {
+#ifdef WITH_FAST
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+	if (soap_store_lab(soap, tp->value, tp->size))
+	  return soap->error;
+	if (tp->value)
+	  SOAP_FREE(soap, tp->value);
+	for (;;)
+	{ if (soap_getattrval(soap, soap->labbuf + soap->labidx, soap->lablen - soap->labidx, c))
+	  { if (soap->error != SOAP_EOM)
+	      return soap->error;
+            soap->error = SOAP_OK;
+	    soap->labidx = soap->lablen;
+	    if (soap_append_lab(soap, NULL, 0))
+	      return soap->error;
+	  }
+	  else
+	    break;
+	}
+	if (soap->labidx)
+          tp->size = soap->lablen;
+	else
+	{ tp->size = strlen(soap->labbuf) + 1;
+          if (tp->size < SOAP_LABLEN)
+	    tp->size = SOAP_LABLEN;
+        }
+	if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+	  return soap->error = SOAP_EOM;
+        strcpy(tp->value, soap->labbuf);
+#else
+	size_t n;
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+        if (soap_new_block(soap))
+          return soap->error;
+        for (;;)
+        { if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+            return soap->error;
+          if (soap_getattrval(soap, s, SOAP_BLKLEN, c))
+          { if (soap->error != SOAP_EOM)
+              return soap->error;
+            soap->error = SOAP_OK;
+          }
+          else
+            break;
+        }
+	n = tp->size + soap->blist->size;
+        if (!(s = (char*)SOAP_MALLOC(soap, n)))
+          return soap->error = SOAP_EOM;
+        if (tp->value)
+        { memcpy(s, tp->value, tp->size);
+          SOAP_FREE(soap, tp->value);
+        }
+        soap_save_block(soap, s + tp->size, 0);
+        tp->value = s;
+        tp->size = n;
+#endif
+      }
+      do c = soap_get1(soap);
+      while (soap_blank(c));
+      tp->visible = 2; /* seen this attribute w/ value */
+#ifdef WITH_DOM
+      if (att)
+        (*att)->data = soap_strdup(soap, tp->value);
+#endif
+    }
+    else
+      tp->visible = 1; /* seen this attribute w/o value */
+#ifdef WITH_DOM
+    if (att)
+      att = &(*att)->next;
+#endif
+    if (t && tp->value)
+    { if (soap_push_namespace(soap, t, tp->value))
+        return soap->error;
+      tp->visible = 0;
+    }
+  }
+#ifdef WITH_DOM
+  if (att)
+  { soap->dom->nstr = soap_current_namespace(soap, soap->tag);
+    for (att = &soap->dom->atts; *att; att = &(*att)->next)
+      (*att)->nstr = soap_current_namespace(soap, (*att)->name);
+  }
+#endif
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  if (!(soap->body = (c != '/')))
+    do c = soap_get1(soap);
+    while (soap_blank(c));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { if (!soap->body && soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible && tp->value)
+    { if (!strcmp(tp->name, "id"))
+      { *soap->id = '#';
+        strncpy(soap->id + 1, tp->value, sizeof(soap->id) - 2);
+        soap->id[sizeof(soap->id)-1] = '\0';
+      }
+      else if (!strcmp(tp->name, "href"))
+      { strncpy(soap->href, tp->value, sizeof(soap->href) - 1);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if ((soap->version == 2 || (soap->mode & SOAP_XML_GRAPH)) && !strcmp(tp->name, "ref"))
+      { *soap->href = '#';
+        strncpy(soap->href + 1, tp->value, sizeof(soap->href) - 2);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if (!soap_match_tag(soap, tp->name, "xsi:type"))
+      { strncpy(soap->type, tp->value, sizeof(soap->type) - 1);
+        soap->type[sizeof(soap->type)-1] = '\0';
+      }
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arrayType"))
+      { s = soap_strrchr(tp->value, '[');
+        if (s && (size_t)(s - tp->value) < sizeof(soap->arrayType))
+        { strncpy(soap->arrayType, tp->value, s - tp->value);
+          soap->arrayType[s - tp->value] = '\0';
+          strncpy(soap->arraySize, s, sizeof(soap->arraySize) - 1);
+        }
+        else
+          strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+        soap->arraySize[sizeof(soap->arrayType)-1] = '\0';
+        soap->arrayType[sizeof(soap->arrayType)-1] = '\0';
+      }
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:itemType"))
+        strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arraySize"))
+        strncpy(soap->arraySize, tp->value, sizeof(soap->arraySize) - 1);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:offset"))
+        strncpy(soap->arrayOffset, tp->value, sizeof(soap->arrayOffset));
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:position"))
+        soap->position = soap_getposition(tp->value, soap->positions);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:root"))
+        soap->root = ((!strcmp(tp->value, "1") || !strcmp(tp->value, "true")));
+      else if ((soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENV:actor"))
+            || (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENV:role")))
+      { if ((!soap->actor || strcmp(soap->actor, tp->value))
+         && strcmp(tp->value, "http://schemas.xmlsoap.org/soap/actor/next")
+         && strcmp(tp->value, "http://www.w3.org/2003/05/soap-envelope/role/next"))
+          soap->other = 1;
+      }
+      else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:mustUnderstand")
+            && (!strcmp(tp->value, "1") || !strcmp(tp->value, "true")))
+        soap->mustUnderstand = 1;
+      else if ((!soap_match_tag(soap, tp->name, "xsi:null")
+             || !soap_match_tag(soap, tp->name, "xsi:nil"))
+            && (!strcmp(tp->value, "1")
+             || !strcmp(tp->value, "true")))
+        soap->null = 1;
+    }
+  }
+  return soap->error = SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_retry(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_revert(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_revert(struct soap *soap)
+{ if (!soap->peeked)
+  { soap->peeked = 1;
+    if (soap->body)
+      soap->level--;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reverting last element (level=%u)\n", soap->level));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_string_out(struct soap *soap, const char *s, int flag)
+{ register const char *t;
+  register soap_wchar c;
+  register soap_wchar mask = 0xFFFFFF80UL;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_strdup(soap, s);
+    return SOAP_OK;
+  }
+#endif
+  if (soap->mode & SOAP_C_UTFSTRING)
+    mask = 0;
+  t = s;
+  while ((c = *t++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#x9;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xA;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 13:
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xD;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '&':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&amp;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '<':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&lt;", 4))
+        return soap->error;
+      s = t;
+      break;
+    case '>':
+      if (!flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&gt;", 4))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case '"':
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&quot;", 6))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    default:
+#ifndef WITH_LEANER
+#ifdef HAVE_MBTOWC
+      if (soap->mode & SOAP_C_MBSTRING)
+      { wchar_t wc;
+        register int m = mbtowc(&wc, t - 1, MB_CUR_MAX);
+        if (m > 0 && wc != c)
+        { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, wc))
+            return soap->error;
+	  s = t += m - 1;
+	  continue;
+        }
+      }
+#endif
+#endif
+      if (c & mask)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, (unsigned char)c))
+          return soap->error;
+        s = t;
+      }
+    }
+  }
+  return soap_send_raw(soap, s, t - s - 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_string_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ register char *s;
+  char *t = NULL;
+  register size_t i;
+  register long l = 0;
+  register int n = 0;
+  register int m = 0;
+  register soap_wchar c;
+#if !defined(WITH_LEANER) && defined(HAVE_WCTOMB)
+  char buf[MB_LEN_MAX > 8 ? MB_LEN_MAX : 8];
+#else
+  char buf[8];
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+#ifndef WITH_LEAN
+      t = soap->tmpbuf;
+      t[0] = '<';
+      strncpy(t + 1, soap->tag, sizeof(soap->tmpbuf) - 1);
+      strncat(t, ">", sizeof(soap->tmpbuf));
+      m = strlen(soap->tag) + 2;
+#endif
+    }
+  }
+#ifdef WITH_CDATA
+  if (!flag)
+  { register int state = 0;
+#ifdef WITH_FAST
+    soap->labidx = 0;			/* use look-aside buffer */
+#else
+    if (soap_new_block(soap))
+      return NULL;
+#endif
+    for (;;)
+    { 
+#ifdef WITH_FAST
+      register size_t k;
+      if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+        return NULL;
+      s = soap->labbuf + soap->labidx;	/* space to populate */
+      k = soap->lablen - soap->labidx;	/* number of bytes available */
+      soap->labidx = soap->lablen;	/* claim this space */
+#else
+      register size_t k = SOAP_BLKLEN;
+      if (!(s = (char*)soap_push_block(soap, k)))
+        return NULL;
+#endif
+      for (i = 0; i < k; i++)
+      { if (m > 0)
+        { *s++ = *t++;	/* copy multibyte characters */
+	  m--;
+          continue;
+        }
+        c = soap_getchar(soap);
+	if ((int)c == EOF)
+          goto end;
+        if (c >= 0x80 && !(soap->mode & SOAP_ENC_LATIN))
+        { soap_unget(soap, c);
+	  c = soap_getutf8(soap);
+	  if (soap->mode & SOAP_C_UTFSTRING)
+          { if ((c & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+            { c &= 0x7FFFFFFF;
+              t = buf;
+              if (c < 0x0800)
+                *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+              else
+              { if (c < 0x010000)
+                  *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+                else
+                { if (c < 0x200000)
+                    *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+                  else
+                  { if (c < 0x04000000)
+                      *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                    else
+                    { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                      *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                    }
+                    *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+                  }     
+                  *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+              }
+              *t++ = (char)(0x80 | (c & 0x3F));
+	      m = (int)(t - buf) - 1;
+              t = buf;
+              *s++ = *t++;
+              continue;
+	    }
+          }
+        }
+	switch (state)
+        { case 1:
+            if (c == ']')
+	      state = 4;
+	    *s++ = c;
+	    continue;
+	  case 2:
+	    if (c == '-')
+              state = 6;
+	    *s++ = c;
+	    continue;
+	  case 3:
+	    if (c == '?')
+	      state = 8;
+	    *s++ = c;
+	    continue;
+          /* CDATA */
+	  case 4:
+	    if (c == ']')
+              state = 5;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+	  case 5:
+	    if (c == '>')
+	      state = 0;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+          /* comment */
+          case 6:
+            if (c == '-')
+	      state = 7;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          case 7:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          /* PI */
+	  case 8:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 3;
+	    *s++ = c;
+	    continue;
+        }
+        switch (c)
+        {
+        case '/':
+          if (n > 0)
+          { c = soap_getchar(soap);
+            if (c == '>')
+              n--;
+            soap_unget(soap, c);
+          }
+          *s++ = '/';
+          break;
+        case '<':
+	  c = soap_getchar(soap);
+	  if (c == '/')
+	  { if (n == 0)
+	    { c = SOAP_TT;
+	      goto end;
+	    }
+	    n--;
+	  }
+	  else if (c == '!')
+	  { c = soap_getchar(soap);
+	    if (c == '[')
+            { do c = soap_getchar(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                 goto end;
+	      t = (char*)"![CDATA[";
+	      m = 8;
+	      state = 1;
+	    }
+            else if (c == '-')
+	    { if ((c = soap_getchar(soap)) == '-')
+	        state = 2;
+	      t = (char*)"!-";
+	      m = 2;
+	      soap_unget(soap, c);
+	    }
+	    else
+	    { t = (char*)"!";
+	      m = 1;
+	      soap_unget(soap, c);
+	    }
+	    *s++ = '<';
+	    break;
+	  }
+	  else if (c == '?')
+	    state = 3;
+	  else
+	    n++;
+          soap_unget(soap, c);
+          *s++ = '<';
+          break;
+        case '>':
+          *s++ = '>';
+          break;
+        case '"':
+          *s++ = '"';
+          break;
+        default:
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+          if (soap->mode & SOAP_C_MBSTRING)
+          { m = wctomb(buf, c & 0x7FFFFFFF);
+            if (m >= 1 && m <= (int)MB_CUR_MAX)
+            { t = buf;
+              *s++ = *t++;
+              m--;
+            }
+            else
+            { *s++ = SOAP_UNKNOWN_CHAR;
+	      m = 0;
+	    }
+          }
+          else
+#endif
+#endif
+            *s++ = (char)(c & 0xFF);
+        }
+	l++;
+        if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+        { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+          soap->error = SOAP_LENGTH;
+          return NULL;
+        }
+      }
+    }
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;			/* use look-aside buffer */
+#else
+  if (soap_new_block(soap))
+    return NULL;
+#endif
+  for (;;)
+  { 
+#ifdef WITH_FAST
+    register size_t k;
+    if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+      return NULL;
+    s = soap->labbuf + soap->labidx;	/* space to populate */
+    k = soap->lablen - soap->labidx;	/* number of bytes available */
+    soap->labidx = soap->lablen;	/* claim this space */
+#else
+    register size_t k = SOAP_BLKLEN;
+    if (!(s = (char*)soap_push_block(soap, k)))
+      return NULL;
+#endif
+    for (i = 0; i < k; i++)
+    { if (m > 0)
+      { *s++ = *t++;	/* copy multibyte characters */
+        m--;
+        continue;
+      }
+      if (soap->mode & SOAP_C_UTFSTRING)
+      { if (((c = soap_get(soap)) & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+        { c &= 0x7FFFFFFF;
+          t = buf;
+          if (c < 0x0800)
+            *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+          else
+          { if (c < 0x010000)
+              *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+            else
+            { if (c < 0x200000)
+                *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+              else
+              { if (c < 0x04000000)
+                  *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                else
+                { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                  *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+              }     
+              *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+            }
+            *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+          }
+          *t++ = (char)(0x80 | (c & 0x3F));
+	  m = (int)(t - buf) - 1;
+          t = buf;
+          *s++ = *t++;
+          continue;
+        }
+      }
+      else
+        c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        t = (char*)"/";
+	m = 1;
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_get(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<' | 0x80000000:
+        if (flag)
+          *s++ = '<';
+        else
+        { *s++ = '&';
+          t = (char*)"lt;";
+	  m = 3;
+        }
+        break;
+      case '>' | 0x80000000:
+        if (flag)
+          *s++ = '>';
+        else
+        { *s++ = '&';
+          t = (char*)"gt;";
+	  m = 3;
+        }
+        break;
+      case '&' | 0x80000000:
+        if (flag)
+          *s++ = '&';
+        else
+        { *s++ = '&';
+          t = (char*)"amp;";
+	  m = 4;
+        }
+        break;
+      case '"' | 0x80000000:
+        if (flag)
+          *s++ = '"';
+        else
+        { *s++ = '&';
+          t = (char*)"quot;";
+	  m = 5;
+        }
+        break;
+      case '\'' | 0x80000000:
+        if (flag)
+          *s++ = '\'';
+        else
+        { *s++ = '&';
+          t = (char*)"apos;";
+	  m = 5;
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+        if (soap->mode & SOAP_C_MBSTRING)
+        { m = wctomb(buf, c & 0x7FFFFFFF);
+          if (m >= 1 && m <= (int)MB_CUR_MAX)
+          { t = buf;
+            *s++ = *t++;
+            m--;
+          }
+          else
+          { *s++ = SOAP_UNKNOWN_CHAR;
+	    m = 0;
+	  }
+        }
+        else
+#endif
+#endif
+          *s++ = (char)(c & 0xFF);
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+#ifdef WITH_FAST
+  t = soap_strdup(soap, soap->labbuf);
+#else
+  soap_size_block(soap, i+1);
+  t = soap_save_block(soap, NULL, 0);
+#endif
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (flag == 3)
+      soap->dom->tail = t;
+    else
+      soap->dom->data = t;
+  }
+#endif
+  if (flag == 2)
+    if (soap_s2QName(soap, t, &t))
+      return NULL;
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_wstring_out(struct soap *soap, const wchar_t *s, int flag)
+{ const char *t;
+  char tmp;
+  register soap_wchar c;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { wchar_t *r = (wchar_t*)s;
+    int n = 1;
+    while (*r++)
+      n++;
+    soap->dom->wide = r = (wchar_t*)soap_malloc(soap, n * sizeof(wchar_t));
+    while (n--)
+      *r++ = *s++;
+    return SOAP_OK;
+  }
+#endif
+  while ((c = *s++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+        t = "&#x9;";
+      else
+        t = "\t";
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+        t = "&#xA;";
+      else
+        t = "\n";
+      break;
+    case 13:
+      t = "&#xD;";
+      break;
+    case '&':
+      t = "&amp;";
+      break;
+    case '<':
+      t = "&lt;";
+      break;
+    case '>':
+      if (flag)
+        t = ">";
+      else
+	t = "&gt;";
+      break;
+    case '"':
+      if (flag)
+        t = "&quot;";
+      else
+        t = "\"";
+      break;
+    default:
+      if (c > 0 && c < 0x80)
+      { tmp = (char)c;
+        if (soap_send_raw(soap, &tmp, 1))
+          return soap->error;
+      }
+      else if (soap_pututf8(soap, (unsigned long)c))
+        return soap->error;
+      continue;
+    }
+    if (soap_send(soap, t))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t *
+SOAP_FMAC2
+soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ wchar_t *s;
+  register int i, n = 0;
+  register long l = 0;
+  register soap_wchar c;
+  const char *t = NULL;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading wide string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+    }
+  }
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { if (!(s = (wchar_t*)soap_push_block(soap, sizeof(wchar_t)*SOAP_BLKLEN)))
+      return NULL;
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { if (t)
+      { *s++ = (wchar_t)*t++;
+        if (!*t)
+          t = NULL;
+        continue;
+      }
+      c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        soap_unget(soap, '/');
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_getutf8(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<':
+        if (flag)
+          *s++ = (soap_wchar)'<';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "lt;";
+        }
+        break;
+      case '>':
+        if (flag)
+          *s++ = (soap_wchar)'>';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "gt;";
+        }
+        break;
+      case '"':
+        if (flag)
+          *s++ = (soap_wchar)'"';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "quot;";
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+        *s++ = (wchar_t)c & 0x7FFFFFFF;
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+  soap_size_block(soap, sizeof(wchar_t) * (i + 1));
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+  s = (wchar_t*)soap_save_block(soap, NULL, 0);
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->wide = s;
+#endif
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_int2s(struct soap *soap, int n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outint(struct soap *soap, const char *tag, int id, const int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2int(struct soap *soap, const char *s, int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (int)soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int *
+SOAP_FMAC2
+soap_inint(struct soap *soap, const char *tag, int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (int*)soap_id_enter(soap, soap->id, p, t, sizeof(int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(int), 0, NULL);
+  else if (p)
+  { if (soap_s2int(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_long2s(struct soap *soap, long n)
+{ sprintf(soap->tmpbuf, "%ld", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outlong(struct soap *soap, const char *tag, int id, const long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2long(struct soap *soap, const char *s, long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+long *
+SOAP_FMAC2
+soap_inlong(struct soap *soap, const char *tag, long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (long*)soap_id_enter(soap, soap->id, p, t, sizeof(long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(long), 0, NULL);
+  else if (p)
+  { if (soap_s2long(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_LONG642s(struct soap *soap, LONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_LONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outLONG64(struct soap *soap, const char *tag, int id, const LONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_LONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2LONG64(struct soap *soap, const char *s, LONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOLL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoll(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_LONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+LONG64 *
+SOAP_FMAC2
+soap_inLONG64(struct soap *soap, const char *tag, LONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (LONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(LONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (LONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(LONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2LONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_byte2s(struct soap *soap, char n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outbyte(struct soap *soap, const char *tag, int id, const char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2byte(struct soap *soap, const char *s, char *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -128 || n > 127)
+      soap->error = SOAP_TYPE;
+    *p = (char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_inbyte(struct soap *soap, const char *tag, char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (char*)soap_id_enter(soap, soap->id, p, t, sizeof(char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(char), 0, NULL);
+  else if (p)
+  { if (soap_s2byte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_short2s(struct soap *soap, short n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outshort(struct soap *soap, const char *tag, int id, const short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2short(struct soap *soap, const char *s, short *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -32768 || n > 32767)
+      soap->error = SOAP_TYPE;
+    *p = (short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+short *
+SOAP_FMAC2
+soap_inshort(struct soap *soap, const char *tag, short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (short*)soap_id_enter(soap, soap->id, p, t, sizeof(short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(short), 0, NULL);
+  else if (p)
+  { if (soap_s2short(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_float2s(struct soap *soap, float n)
+{ const char *s;
+  if (soap_isnan((double)n))
+    s = "NaN";
+  else if (soap_ispinff(n))
+    s = "INF";
+  else if (soap_isninff(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->float_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outfloat(struct soap *soap, const char *tag, int id, const float *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_float2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2float(struct soap *soap, const char *s, float *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = FLT_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = FLT_NAN;
+    else
+    {
+/* On some systems, strtof appears to be broken or doesn't link: use with caution */
+#if defined(HAVE_STRTOF)
+      char *r;
+      *p = strtof((char*)s, &r);
+      if (*r)
+#elif defined(HAVE_STRTOD)
+      char *r;
+      *p = (float)strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%g", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static int soap_isnumeric(struct soap *soap, const char *type)
+{ if (soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":float")
+   && soap_match_tag(soap, soap->type, ":double")
+   && soap_match_tag(soap, soap->type, ":decimal")
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return SOAP_ERR;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+float *
+SOAP_FMAC2
+soap_infloat(struct soap *soap, const char *tag, float *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (float*)soap_id_enter(soap, soap->id, p, t, sizeof(float), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (float*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(float), 0, NULL);
+  else if (p)
+  { if (soap_s2float(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_double2s(struct soap *soap, double n)
+{ const char *s;
+  if (soap_isnan(n))
+    s = "NaN";
+  else if (soap_ispinfd(n))
+    s = "INF";
+  else if (soap_isninfd(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->double_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdouble(struct soap *soap, const char *tag, int id, const double *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_double2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2double(struct soap *soap, const char *s, double *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = DBL_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = DBL_NAN;
+    else
+    {
+#ifdef HAVE_STRTOD
+      char *r;
+      *p = strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%lg", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+double *
+SOAP_FMAC2
+soap_indouble(struct soap *soap, const char *tag, double *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (double*)soap_id_enter(soap, soap->id, p, t, sizeof(double), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (double*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(double), 0, NULL);
+  else if (p)
+  { if (soap_s2double(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedByte2s(struct soap *soap, unsigned char n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedByte(struct soap *soap, const char *tag, int id, const unsigned char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedByte(struct soap *soap, const char *s, unsigned char *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 255)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned char *
+SOAP_FMAC2
+soap_inunsignedByte(struct soap *soap, const char *tag, unsigned char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned char*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned char), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedByte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedShort2s(struct soap *soap, unsigned short n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedShort(struct soap *soap, const char *tag, int id, const unsigned short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedShort(struct soap *soap, const char *s, unsigned short *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 65535)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned short *
+SOAP_FMAC2
+soap_inunsignedShort(struct soap *soap, const char *tag, unsigned short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned short*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned short), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedShort(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedInt2s(struct soap *soap, unsigned int n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedInt(struct soap *soap, const char *tag, int id, const unsigned int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedInt(struct soap *soap, const char *s, unsigned int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (unsigned int)soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned int *
+SOAP_FMAC2
+soap_inunsignedInt(struct soap *soap, const char *tag, unsigned int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned int*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned int), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedInt(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedLong2s(struct soap *soap, unsigned long n)
+{ sprintf(soap->tmpbuf, "%lu", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedLong(struct soap *soap, const char *tag, int id, const unsigned long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedLong(struct soap *soap, const char *s, unsigned long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned long *
+SOAP_FMAC2
+soap_inunsignedLong(struct soap *soap, const char *tag, unsigned long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned long*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned long), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedLong(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_ULONG642s(struct soap *soap, ULONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_ULONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outULONG64(struct soap *soap, const char *tag, int id, const ULONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_ULONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2ULONG64(struct soap *soap, const char *s, ULONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOULL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoull(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_ULONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+ULONG64 *
+SOAP_FMAC2
+soap_inULONG64(struct soap *soap, const char *tag, ULONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (ULONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(ULONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (ULONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(ULONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2ULONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2string(struct soap *soap, const char *s, char **t)
+{ *t = NULL;
+  if (s)
+  { if (!(*t = soap_strdup(soap, s)))
+      return soap->error = SOAP_EOM;
+    if (!(soap->mode & (SOAP_ENC_LATIN | SOAP_C_UTFSTRING)))
+    { /* TODO: consider truncating UTF8 to ASCII for regular XML attribute strings? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2QName(struct soap *soap, const char *s, char **t)
+{ if (s)
+  { struct soap_nlist *np;
+    const char *p;
+    if (!strncmp(s, "xml:", 4))
+    { *t = soap_strdup(soap, s);
+      return SOAP_OK;
+    }
+    np = soap->nlist;
+    p = strchr(s, ':');
+    if (p)
+    { register int n = p - s;
+      while (np && (strncmp(np->id, s, n) || np->id[n]))
+        np = np->next;
+      p++;
+    }
+    else
+    { while (np && *np->id)
+        np = np->next;
+      p = s;
+    }
+    if (np)
+    { if (np->index >= 0 && soap->local_namespaces)
+      { register const char *q = soap->local_namespaces[np->index].id;
+        if (q)
+        { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(q) + 2)))
+            sprintf(*t, "%s:%s", q, p);
+          return SOAP_OK;
+        }
+      }
+      if (np->ns)
+      { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(np->ns) + 4)))
+          sprintf(*t, "\"%s\":%s", np->ns, p);
+        return SOAP_OK;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined (index=%d, URI=%s)\n", s, np->index, np->ns?np->ns:""));
+      return soap->error = SOAP_NAMESPACE; 
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined, assuming empty namespace\n", s));
+    if ((*t = (char*)soap_malloc(soap, strlen(p) + 4)))
+      sprintf(*t, "\"\":%s", p);
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_QName2s(struct soap *soap, const char *s)
+{ struct Namespace *p;
+  char *t;
+  int n;
+  if (!s || *s != '"')
+  {
+#ifndef WITH_LEAN
+    if (s && (soap->mode & SOAP_XML_CANONICAL))
+    { t = (char*)strchr(s, ':');
+      if (t)
+        soap_utilize_ns(soap, s, t - s);
+    }
+#endif
+    return s;
+  }
+  s++;
+  if ((p = soap->local_namespaces))
+  { for (; p->id; p++)
+    { if (p->ns)
+        if (!soap_tag_cmp(s, p->ns))
+          break;
+      if (p->in)
+        if (!soap_tag_cmp(s, p->in))
+          break;
+    }
+    if (p && p->id)
+    { s = strchr(s, '"');
+      if (s)
+      { t = (char*)soap_malloc(soap, strlen(p->id) + strlen(s));
+        strcpy(t, p->id);
+	strcat(t, s + 1);
+        return t;
+      }
+    }
+  }
+  t = (char*)strchr(s, '"');
+  if (t)
+    n = t - s;
+  else
+    n = 0;
+  t = soap_strdup(soap, s);
+  t[n] = '\0';
+  sprintf(soap->tmpbuf, "xmlns:_%d", soap->idnum++);
+  soap_set_attr(soap, soap->tmpbuf, t);
+  s = strchr(s, '"');
+  if (s)
+  { t = (char*)soap_malloc(soap, strlen(soap->tmpbuf) + strlen(s) - 6);
+    strcpy(t, soap->tmpbuf + 6);
+    strcat(t, s + 1);
+  }
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2wchar(struct soap *soap, const char *s, wchar_t **t)
+{ wchar_t *r;
+  if (!s)
+    *t = NULL;
+  else
+  { *t = r = (wchar_t*)soap_malloc(soap, sizeof(wchar_t) * (strlen(s) + 1));
+    if (!r)
+      return soap->error;
+    if (soap->mode & SOAP_ENC_LATIN)
+    { while (*s)
+        *r++ = (wchar_t)*s++;
+    }
+    else
+    { /* Convert UTF8 to wchar */
+      while (*s)
+      { register soap_wchar c, c1, c2, c3, c4;
+        c = *s++;
+        if (c < 0x80)
+	  *r++ = (wchar_t)c;
+	else
+        { c1 = (soap_wchar)*s++ & 0x3F;
+          if (c < 0xE0)
+            *r++ = (wchar_t)(((soap_wchar)(c & 0x1F) << 6) | c1);
+          else
+	  { c2 = (soap_wchar)*s++ & 0x3F;
+            if (c < 0xF0)
+              *r++ = (wchar_t)(((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2);
+            else
+	    { c3 = (soap_wchar)*s++ & 0x3F;
+              if (c < 0xF8)
+                *r++ = (wchar_t)(((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3);
+              else
+	      { c4 = (soap_wchar)*s++ & 0x3F;
+                if (c < 0xFC)
+                  *r++ = (wchar_t)(((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4);
+                else
+		  *r++ = (wchar_t)(((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(*s++ & 0x3F));
+              }
+            }
+          }
+        }
+      }
+    }
+    *r = L'\0';
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_wchar2s(struct soap *soap, const wchar_t *s)
+{ register soap_wchar c;
+  register char *r, *t;
+  const wchar_t *q = s;
+  size_t n = 0;
+  while ((c = *q++))
+  { if (c > 0 && c < 0x80)
+      n++;
+    else
+      n += 6;
+  }
+  r = t = (char*)soap_malloc(soap, n + 1);
+  if (r)
+  { /* Convert wchar to UTF8 */
+    while ((c = *s++))
+    { if (c > 0 && c < 0x80)
+        *t++ = (char)c;
+      else
+      { if (c < 0x0800)
+          *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+        else
+        { if (c < 0x010000)
+            *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+          else
+          { if (c < 0x200000)
+              *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+            else
+            { if (c < 0x04000000)
+                *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+              else
+              { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+              }
+              *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+            }     
+            *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+        }
+        *t++ = (char)(0x80 | (c & 0x3F));
+      }
+    }
+    *t = '\0';
+  }
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outstring(struct soap *soap, const char *tag, int id, char *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_string_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_instring(struct soap *soap, const char *tag, char **p, const char *type, int t, int flag, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_string_in(soap, flag, minlen, maxlen);
+    if (!*p || !(char*)soap_id_enter(soap, soap->id, *p, t, sizeof(char*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (char**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(char**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwstring(struct soap *soap, const char *tag, int id, wchar_t *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_wstring_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type, int t, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_wstring_in(soap, 1, minlen, maxlen);
+    if (!*p || !(wchar_t*)soap_id_enter(soap, soap->id, *p, t, sizeof(wchar_t*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (wchar_t**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(wchar_t**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static time_t
+soap_timegm(struct tm *T)
+{
+#if defined(HAVE_TIMEGM)
+  return timegm(T);
+#else
+  time_t t, g, z;
+#ifdef HAVE_GMTIME_R
+  struct tm tm, *tmp = &tm;
+#else
+  struct tm *tmp;
+#endif
+  t = mktime(T);
+  if (t == -1)
+    return -1;
+#ifdef HAVE_GMTIME_R
+  gmtime_r(&t, tmp);
+#else
+  tmp = gmtime(&t);
+#endif
+  tmp->tm_isdst = 0;
+  g = mktime(tmp);
+  if (g == -1)
+    return -1;
+  z = g - t;
+  return t - z;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_dateTime2s(struct soap *soap, time_t n)
+{ struct tm T, *pT = &T;
+#if defined(HAVE_GMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PGMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_PGMTIME)
+  if (gmtime(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GMTIME)
+  if ((pT = gmtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GETTIMEOFDAY)
+  struct timezone tz;
+  memset((void*)&tz, 0, sizeof(tz));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+#endif
+#elif defined(HAVE_FTIME)
+  struct timeb t;
+  memset((void*)&t, 0, sizeof(t));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+  /* The following defines were added for VxWorks*/
+# elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf+strlen(soap->tmpbuf), "%+03d:%02d", t.timezone/60, abs(t.timezone)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+# endif
+#elif defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#else
+  if ((pT = localtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#endif
+  else
+    strcpy(soap->tmpbuf, "1969-12-31T23:59:59Z");
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdateTime(struct soap *soap, const char *tag, int id, const time_t *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_dateTime2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2dateTime(struct soap *soap, const char *s, time_t *p)
+{ if (s)
+  { struct tm T;
+    char zone[16];
+    const char *t;
+    memset((void*)&T, 0, sizeof(T));
+    zone[sizeof(zone)-1] = '\0';
+    if (strchr(s, '-'))
+      t = "%d-%d-%dT%d:%d:%d%15s";
+    else if (strchr(s, ':'))
+      t = "%4d%2d%2dT%d:%d:%d%15s";
+    else /* parse non-XSD-standard alternative ISO 8601 format */
+      t = "%4d%2d%2dT%2d%2d%2d%15s";
+    sscanf(s, t, &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, zone);
+    if (T.tm_year == 1)
+      T.tm_year = 70;
+    else
+      T.tm_year -= 1900;
+    T.tm_mon--;
+    if (*zone)
+    { if (*zone == '.')
+      { for (s = zone + 1; *s; s++)
+          if (*s < '0' || *s > '9')
+            break;
+      }
+      else
+        s = zone;
+      if (*s == '+' || *s == '-')
+      { int h = 0, m = 0;
+        if (s[3] == ':')
+	{ sscanf(s, "%d:%d", &h, &m);
+	  if (h < 0)
+	    m = -m;
+	}
+	else
+	{ m = (int)atol(s);
+	  h = m / 100;
+	  m = m % 100;
+	}
+        T.tm_hour -= h;
+        T.tm_min -= m;
+      }
+      T.tm_isdst = 0;
+      *p = soap_timegm(&T);
+    }
+    else
+    { T.tm_isdst = -1;
+      *p = mktime(&T); /* no time zone: suppose it is localtime? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+time_t *
+SOAP_FMAC2
+soap_indateTime(struct soap *soap, const char *tag, time_t *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":dateTime"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (time_t*)soap_id_enter(soap, soap->id, p, t, sizeof(time_t), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (time_t*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(time_t), 0, NULL);
+  else if (p)
+  { if (soap_s2dateTime(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outliteral(struct soap *soap, const char *tag, char *const*p)
+{ int i;
+  const char *t = NULL;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p && *p)
+  { if (soap_send(soap, *p))
+      return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_inliteral(struct soap *soap, const char *tag, char **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_string_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwliteral(struct soap *soap, const char *tag, wchar_t *const*p)
+{ int i;
+  const char *t = NULL;
+  wchar_t c;
+  const wchar_t *s;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p)
+  { s = *p;
+    while ((c = *s++))
+      if (soap_pututf8(soap, (unsigned char)c))
+        return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwliteral(struct soap *soap, const char *tag, wchar_t **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_wstring_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_token(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF || soap_blank(c))
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_value(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  for (s--; i > 0; i--, s--)
+    if (!soap_blank(*s))
+      break;
+  s[1] = '\0';
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->data = soap_strdup(soap, soap->tmpbuf);
+#endif
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEANER) || !defined(WITH_NOHTTP)
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getline(struct soap *soap, char *s, int len)
+{ int i = len;
+  soap_wchar c = 0;
+  for (;;)
+  { while (--i > 0)
+    { c = soap_getchar(soap);
+      if (c == '\r' || c == '\n')
+        break;
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+    if (c != '\n')
+      c = soap_getchar(soap); /* got \r, now get \n */
+    if (c == '\n')
+    { *s = '\0';
+      if (i+1 == len) /* empty line: end of HTTP/MIME header */
+        break;
+      c = soap_unget(soap, soap_getchar(soap));
+      if (c != ' ' && c != '\t') /* HTTP line continuation? */
+        break;
+    }
+    else if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static size_t
+soap_count_attachments(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  register struct soap_multipart *content;
+  register size_t count = soap->count;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the message size with attachments, current count=%lu\n", (unsigned long)count));
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of DIME attachments\n"));
+    for (content = soap->dime.first; content; content = content->next)
+    { count += 12 + ((content->size+3)&(~3));
+      if (content->id)
+        count += ((strlen(content->id)+3)&(~3));
+      if (content->type)
+        count += ((strlen(content->type)+3)&(~3));
+      if (content->options)
+        count += ((((unsigned char)content->options[2] << 8) | ((unsigned char)content->options[3]))+7)&(~3);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of DIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary)
+  { register size_t n = strlen(soap->mime.boundary);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of MIME attachments\n"));
+    for (content = soap->mime.first; content; content = content->next)
+    { register const char *s;
+      /* count \r\n--boundary\r\n */
+      count += 6 + n;
+      /* count Content-Type: ...\r\n */
+      if (content->type)
+        count += 16 + strlen(content->type);
+      /* count Content-Transfer-Encoding: ...\r\n */
+      s = soap_str_code(mime_codes, content->encoding);
+      if (s)
+        count += 29 + strlen(s);
+      /* count Content-ID: ...\r\n */
+      if (content->id)
+        count += 14 + strlen(content->id);
+      /* count Content-Location: ...\r\n */
+      if (content->location)
+        count += 20 + strlen(content->location);
+      /* count Content-Description: ...\r\n */
+      if (content->description)
+        count += 23 + strlen(content->location);
+      /* count \r\n...content */
+      count += 2 + content->size;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of MIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+    /* count \r\n--boundary-- */
+    count += 6 + n;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New count is %lu bytes\n", (unsigned long)count));
+  return count;
+#else
+  return soap->count;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_putdimefield(struct soap *soap, const char *s, size_t n)
+{ if (soap_send_raw(soap, s, n))
+    return soap->error;
+  return soap_send_raw(soap, SOAP_STR_PADDING, -(long)n&3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_dime_option(struct soap *soap, unsigned short optype, const char *option)
+{ size_t n;
+  char *s = NULL;
+  if (option)
+  { n = strlen(option);
+    s = (char*)soap_malloc(soap, n + 5);
+    if (s)
+    { s[0] = optype >> 8;
+      s[1] = optype & 0xFF;
+      s[2] = n >> 8;
+      s[3] = n & 0xFF;
+      strcpy(s + 4, option);
+    }
+  }
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdimehdr(struct soap *soap)
+{ unsigned char tmp[12];
+  size_t optlen = 0, idlen = 0, typelen = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Put DIME header id='%s'\n", soap->dime.id?soap->dime.id:""));
+  if (soap->dime.options)
+    optlen = (((unsigned char)soap->dime.options[2] << 8) | ((unsigned char)soap->dime.options[3])) + 4;
+  if (soap->dime.id)
+    idlen = strlen(soap->dime.id);
+  if (soap->dime.type)
+    typelen = strlen(soap->dime.type);
+  tmp[0] = SOAP_DIME_VERSION | (soap->dime.flags & 0x7);
+  tmp[1] = soap->dime.flags & 0xF0;
+  tmp[2] = optlen >> 8;
+  tmp[3] = optlen & 0xFF;
+  tmp[4] = idlen >> 8;
+  tmp[5] = idlen & 0xFF;
+  tmp[6] = typelen >> 8;
+  tmp[7] = typelen & 0xFF;
+  tmp[8] = soap->dime.size >> 24;
+  tmp[9] = (soap->dime.size >> 16) & 0xFF;
+  tmp[10] = (soap->dime.size >> 8) & 0xFF;
+  tmp[11] = soap->dime.size & 0xFF;
+  if (soap_send_raw(soap, (char*)tmp, 12)
+   || soap_putdimefield(soap, soap->dime.options, optlen)
+   || soap_putdimefield(soap, soap->dime.id, idlen)
+   || soap_putdimefield(soap, soap->dime.type, typelen))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return SOAP_OK;
+  for (content = soap->dime.first; content; content = content->next)
+  { void *handle;
+    soap->dime.size = content->size;
+    soap->dime.id = content->id;
+    soap->dime.type = content->type;
+    soap->dime.options = content->options;
+    soap->dime.flags = SOAP_DIME_VERSION | SOAP_DIME_MEDIA;
+    if (soap->fdimereadopen && ((handle = soap->fdimereadopen(soap, (void*)content->ptr, content->id, content->type, content->options)) || soap->error))
+    { size_t size = content->size;
+      if (!handle)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadopen failed\n"));
+        return soap->error;
+      }
+      if (!content->size && ((soap->mode & SOAP_ENC_XML) || (soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_IO) == SOAP_IO_STORE))
+      { size_t chunksize = sizeof(soap->tmpbuf);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked streaming DIME\n"));
+        do 
+        { size = soap->fdimeread(soap, handle, soap->tmpbuf, chunksize);
+          DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread returned %lu bytes\n", (unsigned long)size));
+          if (size < chunksize)
+ 	  { soap->dime.flags &= ~SOAP_DIME_CF;
+            if (!content->next)
+              soap->dime.flags |= SOAP_DIME_ME;
+	  }
+          else
+            soap->dime.flags |= SOAP_DIME_CF;
+	  soap->dime.size = size;
+          if (soap_putdimehdr(soap)
+	   || soap_putdimefield(soap, soap->tmpbuf, size))
+            break;
+          if (soap->dime.id)
+ 	  { soap->dime.flags &= ~(SOAP_DIME_MB | SOAP_DIME_MEDIA);
+            soap->dime.id = NULL;
+            soap->dime.type = NULL;
+            soap->dime.options = NULL;
+          }  
+        } while (size >= chunksize);
+      }
+      else
+      { if (!content->next)
+          soap->dime.flags |= SOAP_DIME_ME;
+        if (soap_putdimehdr(soap))
+          return soap->error;
+        do
+        { size_t bufsize;
+	  if (size < sizeof(soap->tmpbuf))
+            bufsize = size;
+          else
+            bufsize = sizeof(soap->tmpbuf);
+          if (!(bufsize = soap->fdimeread(soap, handle, soap->tmpbuf, bufsize)))
+          { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread failed: insufficient data (%lu bytes remaining from %lu bytes)\n", (unsigned long)size, (unsigned long)soap->dime.size));
+            soap->error = SOAP_EOF;
+	    break;
+          }
+          if (soap_send_raw(soap, soap->tmpbuf, bufsize))
+            break;
+          size -= bufsize;
+        } while (size);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+        soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+      if (soap->fdimereadclose)
+        soap->fdimereadclose(soap, handle);
+    }
+    else
+    { if (!content->next)
+        soap->dime.flags |= SOAP_DIME_ME;
+      if (soap_putdimehdr(soap)
+       || soap_putdimefield(soap, (char*)content->ptr, content->size))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static char *
+soap_getdimefield(struct soap *soap, size_t n)
+{ register soap_wchar c;
+  register int i;
+  register char *s;
+  char *p = NULL;
+  if (n)
+  { p = (char*)soap_malloc(soap, n + 1);
+    if (p)
+    { s = p;
+      for (i = n; i > 0; i--)
+      { if ((int)(c = soap_get1(soap)) == EOF)
+        { soap->error = SOAP_EOF;
+          return NULL;
+        }
+        *s++ = (char)c;
+      }
+      *s = '\0';
+      if ((soap->error = soap_move(soap, -(long)n&3)))
+        return NULL;
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdimehdr(struct soap *soap)
+{ register soap_wchar c;
+  register char *s;
+  register int i;
+  unsigned char tmp[12];
+  size_t optlen, idlen, typelen;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return soap->error = SOAP_DIME_END;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME header\n"));
+  if (soap->dime.buflen || soap->dime.chunksize)
+  { if (soap_move(soap, (long)(soap->dime.size - soap_tell(soap))))
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, soap_getchar(soap)); /* skip padding and get hdr */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... From chunked\n"));
+    return SOAP_OK;
+  }
+  s = (char*)tmp;
+  for (i = 12; i > 0; i--)
+  { if ((int)(c = soap_getchar(soap)) == EOF)
+      return soap->error = SOAP_EOF;
+    *s++ = (char)c;
+  }
+  if ((tmp[0] & 0xF8) != SOAP_DIME_VERSION)
+    return soap->error = SOAP_DIME_MISMATCH;
+  soap->dime.flags = (tmp[0] & 0x7) | (tmp[1] & 0xF0);
+  optlen = (tmp[2] << 8) | tmp[3];
+  idlen = (tmp[4] << 8) | tmp[5];
+  typelen = (tmp[6] << 8) | tmp[7];
+  soap->dime.size = (tmp[8] << 24) | (tmp[9] << 16) | (tmp[10] << 8) | tmp[11];
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME size=%lu flags=0x%X\n", (unsigned long)soap->dime.size, soap->dime.flags));
+  if (!(soap->dime.options = soap_getdimefield(soap, optlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.id = soap_getdimefield(soap, idlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.type = soap_getdimefield(soap, typelen)) && soap->error)
+    return soap->error;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME id=%s, type=%s, options=%s\n", soap->dime.id?soap->dime.id:"", soap->dime.type?soap->dime.type:"", soap->dime.options?soap->dime.options+4:""));
+  if (soap->dime.flags & SOAP_DIME_ME)
+    soap->mode &= ~SOAP_ENC_DIME;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdime(struct soap *soap)
+{ while (soap->dime.flags & SOAP_DIME_CF)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap_move(soap, soap->dime.size))
+      return soap->error = SOAP_EOF;
+  }
+  if (soap_move(soap, ((soap->dime.size+3)&(~3))-soap_tell(soap)))
+    return soap->error = SOAP_EOF;
+  for (;;)
+  { register struct soap_multipart *content;
+    if (soap_getdimehdr(soap))
+      break;
+    if (soap->fdimewriteopen && ((soap->dime.ptr = (char*)soap->fdimewriteopen(soap, soap->dime.id, soap->dime.type, soap->dime.options)) || soap->error))
+    { const char *id, *type, *options;
+      size_t size, n;
+      if (!soap->dime.ptr)
+        return soap->error;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      for (;;)
+      { size = soap->dime.size;
+        for (;;)
+        { n = soap->buflen - soap->bufidx;
+          if (size < n)
+            n = size;
+          if ((soap->error = soap->fdimewrite(soap, (void*)soap->dime.ptr, soap->buf + soap->bufidx, n)))
+            break;
+	  size -= n;
+	  if (!size)
+	  { soap->bufidx += n;
+	    break;
+	  }
+	  if (soap_recv(soap))
+          { soap->error = SOAP_EOF;
+	    goto end;
+          }
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+        { soap->error = SOAP_EOF;
+	  break;
+        }
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          break;
+      }
+end:
+      if (soap->fdimewriteclose)
+        soap->fdimewriteclose(soap, (void*)soap->dime.ptr);
+      soap->dime.size = 0;
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else if (soap->dime.flags & SOAP_DIME_CF)
+    { const char *id, *type, *options;
+      register soap_wchar c;
+      register char *s;
+      register int i;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      if (soap_new_block(soap))
+        return SOAP_EOM;
+      for (;;)
+      { s = (char*)soap_push_block(soap, soap->dime.size);
+        if (!s)
+          return soap->error = SOAP_EOM;
+        for (i = soap->dime.size; i > 0; i--)
+        { if ((int)(c = soap_get1(soap)) == EOF)
+            return soap->error = SOAP_EOF;
+          *s++ = (char)c;
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+          return soap->error = SOAP_EOF;
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          return soap->error;
+      }
+      soap->dime.size = soap->blist->size++; /* allocate one more for '\0' */
+      if (!(soap->dime.ptr = soap_save_block(soap, NULL, 0)))
+        return soap->error;
+      soap->dime.ptr[soap->dime.size] = '\0'; /* force 0-terminated */
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else
+      soap->dime.ptr = soap_getdimefield(soap, soap->dime.size);
+    content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, soap->dime.ptr, soap->dime.size);
+    if (!content)
+      return soap->error = SOAP_EOM;
+    content->id = soap->dime.id;
+    content->type = soap->dime.type;
+    content->options = soap->dime.options;
+    soap_resolve_attachment(soap, content);
+    if (soap->error)
+      return soap->error;
+  }
+  if (soap->error != SOAP_DIME_END)
+    return soap->error;
+  return soap->error = SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmimehdr(struct soap *soap)
+{ struct soap_multipart *content;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  while (!*soap->msgbuf);
+  if (soap->msgbuf[0] == '-' && soap->msgbuf[1] == '-')
+  { char *s = soap->msgbuf + strlen(soap->msgbuf) - 1;
+    /* remove white space */
+    while (soap_blank(*s))
+      s--;
+    s[1] = '\0';
+    if (soap->mime.boundary)
+    { if (strcmp(soap->msgbuf + 2, soap->mime.boundary))
+        return soap->error = SOAP_MIME_ERROR;
+    }
+    else
+      soap->mime.boundary = soap_strdup(soap, soap->msgbuf + 2);
+    if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  if (soap_set_mime_attachment(soap, NULL, 0, SOAP_MIME_NONE, NULL, NULL, NULL, NULL))
+    return soap->error = SOAP_EOM;
+  content = soap->mime.last;
+  for (;;)
+  { register char *key = soap->msgbuf;
+    register char *val;
+    if (!*key)
+      break;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "MIME header: %s\n", key));
+    val = strchr(soap->msgbuf, ':');
+    if (val)
+    { *val = '\0';
+      do val++;
+      while (*val && *val <= 32);
+      if (!soap_tag_cmp(key, "Content-ID"))
+        content->id = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Location"))
+        content->location = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Disposition"))
+        content->id = soap_strdup(soap, soap_get_header_attribute(soap, val, "name"));
+      else if (!soap_tag_cmp(key, "Content-Type"))
+        content->type = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Description"))
+        content->description = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Transfer-Encoding"))
+        content->encoding = (enum soap_mime_encoding)soap_int_code(mime_codes, val, (long)SOAP_MIME_NONE);
+    }
+    if (soap_getline(soap, key, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmime(struct soap *soap)
+{ register soap_wchar c = 0;
+  if (!soap->mime.last)
+    return SOAP_OK;
+  for (;;)
+  { register size_t i, m = 0;
+    register char *s, *t = NULL;
+    struct soap_multipart *content = soap->mime.last;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Parsing MIME content id=%s type=%s\n", content->id?content->id:"", content->type?content->type:""));
+    if (soap_new_block(soap))
+      return soap->error = SOAP_EOM;
+    for (;;)
+    { register short flag = 0;
+      if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+        return soap->error = SOAP_EOM;
+      for (i = 0; i < SOAP_BLKLEN; i++)
+      { if (m > 0)
+        { *s++ = *t++;
+	  m--;
+	}
+	else
+        { if (!flag)
+	  { c = soap_get1(soap);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	  }
+	  if (flag || c == '\r')
+	  { t = soap->tmpbuf;
+	    memset(t, 0, sizeof(soap->tmpbuf));
+            strcpy(t, "\n--");
+            if (soap->mime.boundary)
+	      strncat(t, soap->mime.boundary, sizeof(soap->tmpbuf)-4);
+	    do c = soap_getchar(soap);
+	    while (c == *t++);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	    if (!*--t)
+	      goto end;
+	    *t = (char)c;
+	    flag = (c == '\r');
+	    m = t - soap->tmpbuf + 1 - flag;
+	    t = soap->tmpbuf;
+	    c = '\r';
+	  }
+	  *s++ = (char)c;
+        }
+      }
+    }
+end:
+    *s = '\0'; /* force 0-terminated */
+    content->size = soap_size_block(soap, i+1)-1;
+    content->ptr = soap_save_block(soap, NULL, 0);
+    soap_resolve_attachment(soap, content);
+    if (c == '-' && soap_getchar(soap) == '-')
+      break;
+    while (c != '\r' && (int)c != EOF && soap_blank(c))
+      c = soap_getchar(soap);
+    if (c != '\r' || soap_getchar(soap) != '\n')
+      return soap->error = SOAP_MIME_ERROR;
+    if (soap_getmimehdr(soap))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_match_cid(struct soap *soap, const char *s, const char *t)
+{ register size_t n;
+  if (!s)
+    return 1;
+  if (!strcmp(s, t))
+    return 0;
+  if (!strncmp(s, "cid:", 4))
+    s += 4;
+  n = strlen(t);
+  if (*t == '<')
+  { t++;
+    n -= 2;
+  }
+  if (!strncmp(s, t, n) && !s[n])
+    return 0;
+  soap_decode(soap->tmpbuf, sizeof(soap->tmpbuf), s, SOAP_STR_EOS);
+  if (!strncmp(soap->tmpbuf, t, n) && !soap->tmpbuf[n])
+    return 0;
+  return 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_resolve_attachment(struct soap *soap, struct soap_multipart *content)
+{ if (content->id)
+  { register struct soap_xlist **xp = &soap->xlist;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving attachment data for id=%s\n", content->id));
+    while (*xp)
+    { register struct soap_xlist *xq = *xp;
+      if (!soap_match_cid(soap, xq->id, content->id))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Found matching attachment %s for content id=%s\n", xq->id, content->id));
+	*xp = xq->next;
+        *xq->ptr = (unsigned char*)content->ptr;
+        *xq->size = (int)content->size;
+        *xq->type = (char*)content->type;
+	if (content->options)
+          *xq->options = (char*)content->options;
+        else
+          *xq->options = (char*)content->description;
+	SOAP_FREE(soap, xq);
+      }
+      else
+        xp = &(*xp)->next;
+    }
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmimehdr(struct soap *soap, struct soap_multipart *content)
+{ const char *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "MIME attachment type=%s\n", content->type?content->type:""));
+  if (soap_send3(soap, "\r\n--", soap->mime.boundary, "\r\n"))
+    return soap->error;
+  if (content->type && soap_send3(soap, "Content-Type: ", content->type, "\r\n"))
+    return soap->error;
+  s = soap_str_code(mime_codes, content->encoding);
+  if (s && soap_send3(soap, "Content-Transfer-Encoding: ", s, "\r\n"))
+    return soap->error;
+  if (content->id && soap_send3(soap, "Content-ID: ", content->id, "\r\n"))
+    return soap->error;
+  if (content->location && soap_send3(soap, "Content-Location: ", content->location, "\r\n"))
+    return soap->error;
+  if (content->description && soap_send3(soap, "Content-Description: ", content->description, "\r\n"))
+    return soap->error;
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_MIME) || !soap->mime.boundary)
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending MIME attachments\n"));
+  for (content = soap->mime.first; content; content = content->next)
+    if (soap_putmimehdr(soap, content)
+     || soap_send_raw(soap, content->ptr, content->size))
+      return soap->error;
+  return soap_send3(soap, "\r\n--", soap->mime.boundary, "--");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_dime(struct soap *soap)
+{ soap->omode |= SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_mime(struct soap *soap, const char *boundary, const char *start)
+{ soap->omode |= SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = soap_strdup(soap, boundary);
+  soap->mime.start = soap_strdup(soap, start);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_dime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_mime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart*
+soap_new_multipart(struct soap *soap, struct soap_multipart **first, struct soap_multipart **last, char *ptr, size_t size)
+{ struct soap_multipart *content;
+  content = (struct soap_multipart*)soap_malloc(soap, sizeof(struct soap_multipart));
+  if (content)
+  { content->next = NULL;
+    content->ptr = ptr;
+    content->size = size;
+    content->id = NULL;
+    content->type = NULL;
+    content->options = NULL;
+    content->encoding = SOAP_MIME_NONE;
+    content->location = NULL;
+    content->description = NULL;
+    if (!*first)
+      *first = content;
+    if (*last)
+      (*last)->next = content;
+    *last = content;
+  }
+  return content;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_dime_attachment(struct soap *soap, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->options = soap_dime_option(soap, optype, option);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_mime_attachment(struct soap *soap, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->encoding = encoding;
+  content->location = soap_strdup(soap, location);
+  content->description = soap_strdup(soap, description);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap_multipart*
+SOAP_FMAC2
+soap_next_multipart(struct soap_multipart *content)
+{ if (content)
+    return content->next;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_select_mime_boundary(struct soap *soap)
+{ while (!soap->mime.boundary || soap_valid_mime_boundary(soap))
+  { register char *s = soap->mime.boundary;
+    register size_t n = 0;
+    if (s)
+      n = strlen(s);
+    if (n < 16)
+    { n = 64;
+      s = soap->mime.boundary = (char*)soap_malloc(soap, n + 1);
+      if (!s)
+        return;
+    }
+    strcpy(s, "==");
+    s += 2;
+    n -= 4;
+    while (n)
+    { *s++ = soap_base64o[soap_random & 0x3F];
+      n--;
+    }
+    strcpy(s, "==");
+  }
+  if (!soap->mime.start)
+    soap->mime.start = "<SOAP-ENV:Envelope>";
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_valid_mime_boundary(struct soap *soap)
+{ register struct soap_multipart *content;
+  register size_t k = strlen(soap->mime.boundary);
+  for (content = soap->mime.first; content; content = content->next)
+  { if (content->ptr && content->size >= k)
+    { register const char *p = (const char*)content->ptr; 
+      register size_t i;
+      for (i = 0; i < content->size - k; i++, p++)
+        if (!strncmp(p, soap->mime.boundary, k))
+          return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	HTTP cookie handling
+ *
+\******************************************************************************/
+
+#ifdef WITH_COOKIES
+/******************************************************************************/
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_encode_cookie(const char *s, char *t, size_t len)
+{ register int c;
+  register size_t n = len;
+  while ((c = *s++) && --n > 0)
+  { if (c > ' ' && c < 128 && !strchr("()<>@,;:\\\"/[]?={}", c))
+      *t++ = c;
+    else if (n > 2)
+    { *t++ = '%';
+      *t++ = (c >> 4) + (c > 159 ? '7' : '0');
+      c &= 0xF;
+      *t++ = c + (c > 9 ? '7' : '0');
+      n -= 2;
+    }
+    else
+      break;
+  }
+  *t = '\0';
+  return len - n;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  size_t n;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (*path == '/')
+    path++;
+  n = strlen(path);
+  for (p = soap->cookies; p; p = p->next)
+    if (!strcmp(p->name, name)
+     && domain
+     && p->domain
+     && !strcmp(p->domain, domain)
+     && !strncmp(p->path, path, n))
+      break;
+  return p;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_set_cookie(struct soap *soap, const char *name, const char *value, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  int n;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set cookie: %s=%s domain=%s path=%s\n", name, value?value:"", domain?domain:"", path?path:""));
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return NULL;
+  }
+  if (*path == '/')
+    path++;
+  q = soap_cookie(soap, name, domain, path);
+  if (!q)
+  { if ((q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+    { if ((q->name = (char*)SOAP_MALLOC(soap, strlen(name)+1)))
+        strcpy(q->name, name);
+      q->value = NULL;
+      q->domain = NULL;
+      q->path = NULL;
+      q->expire = -1;
+      q->version = 0;
+      q->secure = 0;
+      q->modified = 0;
+      for (p = &soap->cookies, n = soap->cookie_max; *p && n; p = &(*p)->next, n--)
+        if (!strcmp((*p)->name, name) && (*p)->path && strcmp((*p)->path, path) < 0)
+          break;
+      if (n)
+      { q->next = *p;
+        *p = q;
+      }
+      else
+      { SOAP_FREE(soap, q->name);
+        SOAP_FREE(soap, q);
+        q = NULL;
+      }
+    }
+  }
+  else
+    q->modified = 1;
+  if (q)
+  { if (q->value)
+    { SOAP_FREE(soap, q->value);
+      q->value = NULL;
+    }
+    if (q->domain)
+    { SOAP_FREE(soap, q->domain);
+      q->domain = NULL;
+    }
+    if (q->path)
+    { SOAP_FREE(soap, q->path);
+      q->path = NULL;
+    }
+    if (value && *value && (q->value = (char*)SOAP_MALLOC(soap, strlen(value)+1)))
+      strcpy(q->value, value);
+    if (domain && *domain && (q->domain = (char*)SOAP_MALLOC(soap, strlen(domain)+1)))
+      strcpy(q->domain, domain);
+    if (path && *path && (q->path = (char*)SOAP_MALLOC(soap, strlen(path)+1)))
+      strcpy(q->path, path);
+    q->session = 1;
+    q->env = 0;
+  }
+  return q;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!domain)
+  { soap_set_receiver_error(soap, "Cookie domain not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (*path == '/')
+    path++;
+  for (p = &soap->cookies, q = *p; q; q = *p)
+    if (!strcmp(q->name, name) && !strcmp(q->domain, domain) && !strncmp(q->path, path, strlen(q->path)))
+    { if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+      p = &q->next;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_env_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)) && p->env)
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_cookie_expire(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->expire;
+  return -1;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_expire(struct soap *soap, const char *name, long expire, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->expire = expire;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 1;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_clr_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 0;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putsetcookies(struct soap *soap)
+{ struct soap_cookie *p;
+  char *s, tmp[4096];
+  const char *t;
+  for (p = soap->cookies; p; p = p->next)
+  { if (p->modified || !p->env)
+    { s = tmp;
+      if (p->name)
+        s += soap_encode_cookie(p->name, s, tmp-s+4064);
+      if (p->value && *p->value)
+      { *s++ = '=';
+        s += soap_encode_cookie(p->value, s, tmp-s+4064);
+      }
+      if (p->domain && (int)strlen(p->domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", p->domain);
+      else if (soap->cookie_domain && (int)strlen(soap->cookie_domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", soap->cookie_domain);
+      strcat(s, ";Path=\"/");
+      if (p->path)
+        t = p->path;
+      else
+        t = soap->cookie_path;
+      if (t)
+      { if (*t == '/')
+          t++;
+        if ((int)strlen(t) < tmp-s+4064)
+          strcat(s, t);
+      }
+      s += strlen(s);
+      *s++ = '"';
+      if (p->version > 0)
+        sprintf(s, ";Version=%u", p->version);
+      if (p->expire >= 0)
+        sprintf(s, ";Max-Age=%ld", p->expire);
+      if (p->secure)
+        strcat(s, ";Secure");
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set-Cookie: %s\n", tmp));
+      if ((soap->error = soap->fposthdr(soap, "Set-Cookie", tmp)))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putcookies(struct soap *soap, const char *domain, const char *path, int secure)
+{ struct soap_cookie **p, *q;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  char *s, tmp[4096];
+  p = &soap->cookies;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending cookies for domain=%s path=%s\n", domain, path));
+  if (*path == '/')
+    path++;
+  while ((q = *p))
+  { if (q->expire && now > q->expire)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie %s expired\n", q->name));
+      SOAP_FREE(soap, q->name);
+      if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+    { size_t domlen = 0;
+      if (q->domain)
+      { const char *s = strchr(q->domain, ':');
+        if (s)
+	  domlen = s - q->domain;
+	else
+          domlen = strlen(q->domain);
+      }
+      if ((!q->domain || !strncmp(q->domain, domain, domlen))
+          && (!q->path || !strncmp(q->path, path, strlen(q->path)))
+          && (!q->secure || secure))
+      { s = tmp;
+        if (q->version != version)
+        { sprintf(s, "$Version=%u;", q->version);
+          version = q->version;
+        }
+        if (q->name)
+          s += soap_encode_cookie(q->name, s, tmp-s+4080);
+        if (q->value && *q->value)
+        { *s++ = '=';
+          s += soap_encode_cookie(q->value, s, tmp-s+4080);
+        }
+        if (q->path && (int)strlen(q->path) < tmp-s+4080)
+        { sprintf(s, ";$Path=\"/%s\"", (*q->path == '/' ? q->path + 1 : q->path));
+          s += strlen(s);
+        }
+        if (q->domain && (int)strlen(q->domain) < tmp-s+4080)
+          sprintf(s, ";$Domain=\"%s\"", q->domain);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie: %s\n", tmp));
+        if ((soap->error = soap->fposthdr(soap, "Cookie", tmp)))
+          return soap->error;
+      }
+      p = &q->next;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_getcookies(struct soap *soap, const char *val)
+{ struct soap_cookie *p = NULL, *q;
+  const char *s;
+  char *t, tmp[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  char *domain = NULL;
+  char *path = NULL;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  if (!val)
+    return;
+  s = val;
+  while (*s)
+  { s = soap_decode_key(tmp, sizeof(tmp), s);
+    if (!soap_tag_cmp(tmp, "$Version"))
+    { if ((s = soap_decode_val(tmp, sizeof(tmp), s)))
+      { if (p)
+          p->version = (int)atol(tmp);
+        else
+          version = (int)atol(tmp);
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Path"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->path)
+          SOAP_FREE(soap, p->path);
+        p->path = t;
+      }
+      else
+      { if (path)
+          SOAP_FREE(soap, path);
+        path = t;
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Domain"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->domain)
+          SOAP_FREE(soap, p->domain);
+	p->domain = t;
+      }
+      else
+      { if (domain)
+          SOAP_FREE(soap, domain);
+        domain = t;
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Path"))
+    { if (p->path)
+        SOAP_FREE(soap, p->path);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->path = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->path, tmp);
+      }
+      else
+        p->path = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Domain"))
+    { if (p->domain)
+        SOAP_FREE(soap, p->domain);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->domain = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->domain, tmp);
+      }
+      else
+        p->domain = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Version"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->version = (unsigned int)atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Max-Age"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->expire = now + atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Expires"))
+    { struct tm T;
+      char a[3]; 
+      static const char mns[] = "anebarprayunulugepctovec";
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (strlen(tmp) > 20)
+      { memset((void*)&T, 0, sizeof(T));
+        a[0] = tmp[4];
+        a[1] = tmp[5];
+        a[2] = '\0';
+        T.tm_mday = (int)atol(a);
+        a[0] = tmp[8];
+        a[1] = tmp[9];
+        T.tm_mon = (strstr(mns, a) - mns) / 2;
+        a[0] = tmp[11];
+        a[1] = tmp[12];
+        T.tm_year = 100 + (int)atol(a);
+        a[0] = tmp[13];
+        a[1] = tmp[14];
+        T.tm_hour = (int)atol(a);
+        a[0] = tmp[16];
+        a[1] = tmp[17];
+        T.tm_min = (int)atol(a);
+        a[0] = tmp[19];
+        a[1] = tmp[20];
+        T.tm_sec = (int)atol(a);
+        p->expire = soap_timegm(&T);
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Secure"))
+      p->secure = 1;
+    else
+    { if (p)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+        if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+        { q->version = p->version;
+          q->expire = p->expire;
+          q->secure = p->secure;
+          q->env = 1;
+        }
+        if (p->name)
+          SOAP_FREE(soap, p->name);
+        if (p->value)
+          SOAP_FREE(soap, p->value);
+        if (p->domain)
+          SOAP_FREE(soap, p->domain);
+        if (p->path)
+          SOAP_FREE(soap, p->path);
+        SOAP_FREE(soap, p);
+      }
+      if ((p = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      { p->name = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+        strcpy(p->name, tmp);
+        s = soap_decode_val(tmp, sizeof(tmp), s);
+        if (*tmp)
+        { p->value = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+          strcpy(p->value, tmp);
+        }
+        else
+          p->value = NULL;
+        p->domain = domain;
+        p->path = path;
+        p->expire = 0;
+        p->secure = 0;
+        p->version = version;
+      }
+    }
+  }
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+    if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+    { q->version = p->version;
+      q->expire = p->expire;
+      q->secure = p->secure;
+      q->env = 1;
+    }
+    if (p->name)
+      SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+  if (domain)
+    SOAP_FREE(soap, domain);
+  if (path)
+    SOAP_FREE(soap, path);
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getenv_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  const char *s;
+  char key[4096], val[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  if (!(s = getenv("HTTP_COOKIE")))
+    return SOAP_ERR;
+  do
+  { s = soap_decode_key(key, sizeof(key), s);
+    s = soap_decode_val(val, sizeof(val), s);
+    p = soap_set_cookie(soap, key, val, NULL, NULL);
+    if (p)
+      p->env = 1;
+  } while (*s);
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_copy_cookies(struct soap *soap)
+{ struct soap_cookie *p, **q, *r;
+  q = &r;
+  for (p = soap->cookies; p; p = p->next)
+  { if (!(*q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      return r;
+    **q = *p;
+    if (p->name)
+    { if (((*q)->name = (char*)SOAP_MALLOC(soap, strlen(p->name)+1)))
+        strcpy((*q)->name, p->name);
+    }
+    if (p->value)
+    { if (((*q)->value = (char*)SOAP_MALLOC(soap, strlen(p->value)+1)))
+        strcpy((*q)->value, p->value);
+    }
+    if (p->domain)
+    { if (((*q)->domain = (char*)SOAP_MALLOC(soap, strlen(p->domain)+1)))
+        strcpy((*q)->domain, p->domain);
+    }
+    if (p->path)
+    { if (((*q)->path = (char*)SOAP_MALLOC(soap, strlen(p->path)+1)))
+        strcpy((*q)->path, p->path);
+    }
+    q = &(*q)->next;
+  }
+  *q = NULL;
+  return r;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  for (p = soap->cookies; p; p = soap->cookies)
+  { soap->cookies = p->next;
+    SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+}
+
+/******************************************************************************/
+#endif /* WITH_COOKIES */
+
+/******************************************************************************/
+#ifdef WITH_GZIP
+#ifndef PALM_1
+static int
+soap_getgziphdr(struct soap *soap)
+{ int i;
+  soap_wchar c, f = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get gzip header\n"));
+  for (i = 0; i < 9; i++)
+  { if ((int)(c = soap_get1(soap) == EOF))
+      return soap->error = SOAP_EOF;
+    if (i == 2)
+      f = c;
+  }
+  if (f & 0x04) /* FEXTRA */
+  { for (i = soap_get1(soap) | (soap_get1(soap) << 8); i; i--)
+      if ((int)soap_get1(soap) == EOF)
+        return soap->error = SOAP_EOF;
+  }
+  if (f & 0x08) /* FNAME */
+    do
+      c = soap_get1(soap);
+    while (c && (int)c != EOF);
+  if ((int)c != EOF && (f & 0x10)) /* FCOMMENT */
+    do
+      c = soap_get1(soap);
+    while (c && (int)f != EOF);
+  if ((int)c != EOF && (f & 0x01)) /* FHCRC */
+  { if ((int)(c = soap_get1(soap)) != EOF)
+      c = soap_get1(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_recv(struct soap *soap)
+{ soap_wchar c;
+  soap->error = SOAP_OK;
+  soap_free(soap);
+  soap_set_local_namespaces(soap);
+  soap->version = 0;	/* don't assume we're parsing SOAP content by default */
+#ifndef WITH_NOIDREF
+  soap_free_iht(soap);
+#endif
+  if ((soap->imode & SOAP_IO) == SOAP_IO_CHUNK)
+    soap->omode |= SOAP_IO_CHUNK;
+  soap->imode &= ~SOAP_IO;
+  soap->mode = soap->imode;
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  soap->ahead = 0;
+  soap->peeked = 0;
+  soap->level = 0;
+  soap->part = SOAP_BEGIN;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  *soap->endpoint = '\0';
+  soap->action = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket))
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->recvfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->recvfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#ifdef WITH_ZLIB
+  soap->mode &= ~SOAP_ENC_ZLIB;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.next_in = Z_NULL;
+  soap->d_stream.avail_in = 0;
+  soap->d_stream.next_out = (Byte*)soap->buf;
+  soap->d_stream.avail_out = SOAP_BUFLEN;
+  soap->z_ratio_in = 1.0;
+#endif
+#ifndef WITH_LEANER
+  if (soap->fprepareinit)
+    soap->fprepareinit(soap);
+#endif
+  c = soap_getchar(soap);
+#ifdef WITH_GZIP
+  if (c == 0x1F)
+  { if (soap_getgziphdr(soap))
+      return soap->error;
+    if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+    soap->zlib_state = SOAP_ZLIB_INFLATE;
+    soap->mode |= SOAP_ENC_ZLIB;
+    soap->zlib_in = SOAP_ZLIB_GZIP;
+    soap->z_crc = crc32(0L, NULL, 0);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    /* should not chunk over plain transport, so why bother to check? */
+    /* if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) */
+    /*   soap->z_buflen = soap->bufidx; */
+    /* else */
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+    soap->z_buflen = soap->buflen;
+    soap->buflen = soap->bufidx;
+    c = soap_getchar(soap);
+  }  
+#endif
+#ifndef WITH_LEANER
+  if (c == '-' && soap_get0(soap) == '-')
+    soap->mode |= SOAP_ENC_MIME;
+  else if ((c & 0xFFFC) == (SOAP_DIME_VERSION | SOAP_DIME_MB) && (soap_get0(soap) & 0xFFF0) == 0x20)
+    soap->mode |= SOAP_ENC_DIME;
+  else
+#endif
+  { while (soap_blank(c))
+      c = soap_getchar(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  soap_unget(soap, c);
+#ifndef WITH_NOHTTP
+  /* if not XML or (start of)BOM or MIME/DIME/ZLIB, assume HTTP header */
+  if (c != '<' && c != 0xEF && !(soap->mode & (SOAP_ENC_MIME | SOAP_ENC_DIME | SOAP_ENC_ZLIB)))
+  { soap->mode &= ~SOAP_IO;
+    soap->error = soap->fparse(soap);
+    if (soap->error && soap->error < SOAP_STOP)
+    { soap->keep_alive = 0; /* force close later */
+      return soap->error;
+    }
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { soap->chunkbuflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+      soap->chunksize = 0;
+    }
+#ifndef WITH_LEANER
+    else if (soap->fpreparerecv && soap->buflen != soap->bufidx)
+      soap->fpreparerecv(soap, soap->buf + soap->bufidx, soap->buflen - soap->bufidx);
+#endif
+#ifdef WITH_ZLIB
+    if (soap->zlib_in != SOAP_ZLIB_NONE)
+    { /* fparse should not use soap_unget to push back last char */
+#ifdef WITH_GZIP
+      c = soap_get1(soap);
+      if (c == 0x1F)
+      { if (soap_getgziphdr(soap))
+          return soap->error;
+        if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        soap->z_crc = crc32(0L, NULL, 0);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+      }
+      else
+      { soap_revget1(soap);
+#else
+      {
+#endif
+        if (inflateInit(&soap->d_stream) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate initialized\n"));
+      }
+      soap->mode |= SOAP_ENC_ZLIB;
+      memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+      soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+      soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+    }
+#endif
+    if (soap->error)
+    { if (soap->error == SOAP_FORM && soap->fform)
+      { soap->error = soap->fform(soap);
+        if (soap->error == SOAP_OK)
+          soap->error = SOAP_STOP; /* prevents further processing */
+      }
+      return soap->error;
+    }
+  }
+#endif
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_MIME)
+  { if (soap_getmimehdr(soap))
+      return soap->error;
+    if (soap_get_header_attribute(soap, soap->mime.first->type, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+  }
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap->dime.flags & SOAP_DIME_CF)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked DIME SOAP message\n"));
+      soap->dime.chunksize = soap->dime.size;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+    }
+    soap->count = soap->buflen - soap->bufidx;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse(struct soap *soap)
+{ char header[SOAP_HDRLEN], *s;
+  unsigned short get = 0, status = 0, k = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Waiting for HTTP request/response...\n"));
+  *soap->endpoint = '\0';
+  soap->length = 0;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->action = NULL;
+  soap->authrealm = NULL;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP status: %s\n", soap->msgbuf));
+    for (;;)
+    { if (soap_getline(soap, header, SOAP_HDRLEN))
+      { if (soap->error == SOAP_EOF)
+	{ soap->error = SOAP_OK;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "EOF in HTTP header, continue anyway\n"));
+	  break;
+	}
+        return soap->error;
+      }
+      if (!*header)
+        break;
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP header: %s\n", header));
+      s = strchr(header, ':');
+      if (s)
+      { *s = '\0';
+        do s++;
+        while (*s && *s <= 32);
+        if ((soap->error = soap->fparsehdr(soap, header, s)))
+        { if (soap->error < SOAP_STOP)
+	    return soap->error;
+	  status = soap->error;
+	  soap->error = SOAP_OK;
+        }
+      }
+    }
+    if ((s = strchr(soap->msgbuf, ' ')))
+    { k = (unsigned short)soap_strtoul(s, &s, 10);
+      if (!soap_blank(*s))
+        k = 0;
+    }
+    else
+      k = 0;
+  } while (k == 100);
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Finished HTTP header parsing\n"));
+  s = strstr(soap->msgbuf, "HTTP/");
+  if (s && s[7] != '1')
+  { if (soap->keep_alive == 1)
+      soap->keep_alive = 0;
+    if (k == 0 && (soap->omode & SOAP_IO) == SOAP_IO_CHUNK) /* k == 0 for HTTP request */
+    { soap->imode |= SOAP_IO_CHUNK;
+      soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE;
+    }
+  }
+  if (soap->keep_alive < 0)
+    soap->keep_alive = 1;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Keep alive connection = %d\n", soap->keep_alive));
+  if (s && (((get = !strncmp(soap->msgbuf, "GET ", 4))) || !strncmp(soap->msgbuf, "POST ", 5)))
+  { size_t m = strlen(soap->endpoint);
+    size_t n = m + (s - soap->msgbuf) - 5 - (!get);
+    if (n >= sizeof(soap->endpoint))
+      n = sizeof(soap->endpoint) - 1;
+    strncpy(soap->path, soap->msgbuf + 4 + (!get), n - m);
+    soap->path[n - m] = '\0';
+    strcat(soap->endpoint, soap->path);
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Target endpoint='%s'\n", soap->endpoint));
+    if (get)
+    { soap->error = soap->fget(soap);
+      if (soap->error == SOAP_OK)
+        soap->error = SOAP_STOP; /* prevents further processing */
+      return soap->error;
+    }
+    if (status)
+      return soap->error = status;
+    return SOAP_OK;
+  }
+  if (k == 0 || (k >= 200 && k <= 299) || k == 400 || k == 500)
+    return SOAP_OK;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP error %d\n", k));
+  return soap_set_receiver_error(soap, "HTTP error", soap->msgbuf, k);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse_header(struct soap *soap, const char *key, const char *val)
+{ if (!soap_tag_cmp(key, "Host"))
+  { 
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+      strcpy(soap->endpoint, "https://");
+    else
+#endif
+      strcpy(soap->endpoint, "http://");
+    strncat(soap->endpoint, val, sizeof(soap->endpoint) - 8);
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifndef WITH_LEANER
+  else if (!soap_tag_cmp(key, "Content-Type"))
+  { if (soap_get_header_attribute(soap, val, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+    else if (soap_get_header_attribute(soap, val, "multipart/related")
+          || soap_get_header_attribute(soap, val, "multipart/form-data"))
+    { soap->mime.boundary = soap_strdup(soap, soap_get_header_attribute(soap, val, "boundary"));
+      soap->mime.start = soap_strdup(soap, soap_get_header_attribute(soap, val, "start"));
+      soap->mode |= SOAP_ENC_MIME;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Content-Length"))
+    soap->length = soap_strtoul(val, NULL, 10);
+  else if (!soap_tag_cmp(key, "Content-Encoding"))
+  { if (!soap_tag_cmp(val, "deflate"))
+#ifdef WITH_ZLIB
+      soap->zlib_in = SOAP_ZLIB_DEFLATE;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+    else if (!soap_tag_cmp(val, "gzip"))
+#ifdef WITH_GZIP
+      soap->zlib_in = SOAP_ZLIB_GZIP;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+  }
+#ifdef WITH_ZLIB
+  else if (!soap_tag_cmp(key, "Accept-Encoding"))
+  {
+#ifdef WITH_GZIP
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "gzip"))
+      soap->zlib_out = SOAP_ZLIB_GZIP;
+    else
+#endif
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "deflate"))
+      soap->zlib_out = SOAP_ZLIB_DEFLATE;
+    else
+      soap->zlib_out = SOAP_ZLIB_NONE;
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Transfer-Encoding"))
+  { soap->mode &= ~SOAP_IO;
+    if (!soap_tag_cmp(val, "chunked"))
+      soap->mode |= SOAP_IO_CHUNK;
+  }
+  else if (!soap_tag_cmp(key, "Connection"))
+  { if (!soap_tag_cmp(val, "keep-alive"))
+      soap->keep_alive = -soap->keep_alive;
+    else if (!soap_tag_cmp(val, "close"))
+      soap->keep_alive = 0;
+  }
+#ifndef WITH_LEAN
+  else if (!soap_tag_cmp(key, "Authorization"))
+  { if (!soap_tag_cmp(val, "Basic *"))
+    { int n;
+      char *s;
+      soap_base642s(soap, val + 6, soap->tmpbuf, sizeof(soap->tmpbuf) - 1, &n);
+      soap->tmpbuf[n] = '\0';
+      if ((s = strchr(soap->tmpbuf, ':')))
+      { *s = '\0';
+	soap->userid = soap_strdup(soap, soap->tmpbuf);
+	soap->passwd = soap_strdup(soap, s + 1);
+      }
+    }
+  }
+  else if (!soap_tag_cmp(key, "WWW-Authenticate"))
+    soap->authrealm = soap_strdup(soap, soap_get_header_attribute(soap, val + 6, "realm"));
+  else if (!soap_tag_cmp(key, "Expect"))
+  { if (!soap_tag_cmp(val, "100-continue"))
+    { if ((soap->error = soap->fposthdr(soap, "HTTP/1.1 100 Continue", NULL))
+       || (soap->error = soap->fposthdr(soap, NULL, NULL)))
+        return soap->error;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "SOAPAction"))
+  { if (*val == '"')
+    { soap->action = soap_strdup(soap, val + 1);
+      soap->action[strlen(soap->action) - 1] = '\0';
+    }
+  }
+  else if (!soap_tag_cmp(key, "Location"))
+  { strncpy(soap->endpoint, val, sizeof(soap->endpoint));
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifdef WITH_COOKIES
+  else if (!soap_tag_cmp(key, "Cookie") || !soap_tag_cmp(key, "Set-Cookie"))
+    soap_getcookies(soap, val);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_get_header_attribute(struct soap *soap, const char *line, const char *key)
+{ register const char *s = line;
+  if (s)
+  { while (*s)
+    { register short flag;
+      s = soap_decode_key(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      flag = soap_tag_cmp(soap->tmpbuf, key);
+      s = soap_decode_val(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      if (!flag)
+        return soap->tmpbuf;
+    }
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_key(char *buf, size_t len, const char *val)
+{ return soap_decode(buf, len, val, "=,;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_val(char *buf, size_t len, const char *val)
+{ if (*val != '=')
+  { *buf = '\0';
+    return val;
+  }
+  return soap_decode(buf, len, val + 1, ",;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char*
+soap_decode(char *buf, size_t len, const char *val, const char *sep)
+{ const char *s;
+  char *t = buf;
+  for (s = val; *s; s++)
+    if (*s != ' ' && *s != '\t' && !strchr(sep, *s))
+      break;
+  if (*s == '"')
+  { s++;
+    while (*s && *s != '"' && --len)
+      *t++ = *s++;
+  }
+  else
+  { while (soap_notblank(*s) && !strchr(sep, *s) && --len)
+    { if (*s == '%')
+      { *t++ = ((s[1] >= 'A' ? (s[1] & 0x7) + 9 : s[1] - '0') << 4)
+              + (s[2] >= 'A' ? (s[2] & 0x7) + 9 : s[2] - '0');
+        s += 3;
+      }
+      else
+        *t++ = *s++;
+    }
+  }
+  *t = '\0';
+  while (*s && !strchr(sep, *s))
+    s++;
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_out(struct soap *soap)
+{
+#ifndef WITH_LEANER
+  size_t n = 0;
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->mime.start)
+  { const char *s;
+    if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+      s = "application/dime";
+    else if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+    sprintf(soap->tmpbuf, "--%s\r\nContent-Type: %s\r\nContent-Transfer-Encoding: binary\r\nContent-ID: %s\r\n\r\n", soap->mime.boundary, s, soap->mime.start);
+    n = strlen(soap->tmpbuf);
+    if (soap_send_raw(soap, soap->tmpbuf, n))
+      return soap->error;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    soap->dime.size = soap->count;	/* DIME in MIME correction */
+  if (!(soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME))
+  { if (soap_putdimehdr(soap))
+      return soap->error;
+  }
+#endif
+  soap->part = SOAP_IN_ENVELOPE;
+  return soap_element_begin_out(soap, "SOAP-ENV:Envelope", 0, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Envelope"))
+    return soap->error;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { soap->dime.size = soap->count - soap->dime.size;	/* DIME in MIME correction */
+    sprintf(soap->id, soap->dime_id_format, 0);
+    soap->dime.id = soap->id;
+    if (soap->local_namespaces)
+    { if (soap->local_namespaces[0].out)
+        soap->dime.type = (char*)soap->local_namespaces[0].out;
+      else
+        soap->dime.type = (char*)soap->local_namespaces[0].ns;
+    }
+    soap->dime.options = NULL;
+    soap->dime.flags = SOAP_DIME_MB | SOAP_DIME_ABSURI;
+    if (!soap->dime.first)
+      soap->dime.flags |= SOAP_DIME_ME;
+    soap->count += 12 + ((strlen(soap->dime.id)+3)&(~3)) + ((strlen(soap->dime.type)+3)&(~3));
+  }
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+    return soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+#endif
+  soap->part = SOAP_END_ENVELOPE;
+  return SOAP_OK;
+} 
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_in(struct soap *soap)
+{ register struct Namespace *p;
+  soap->part = SOAP_IN_ENVELOPE;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Envelope", 0))
+    return soap->error = SOAP_VERSIONMISMATCH;
+  p = soap->local_namespaces;
+  if (p)
+  { const char *ns = p[0].out;
+    if (!ns)
+      ns = p[0].ns;
+    if (!strcmp(ns, soap_env1))
+    { soap->version = 1; /* make sure we use SOAP 1.1 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc1))))
+        strcpy(p[1].out, soap_enc1);
+    }
+    else if (!strcmp(ns, soap_env2))
+    { soap->version = 2; /* make sure we use SOAP 1.2 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc2))))
+        strcpy(p[1].out, soap_enc2);
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_in(struct soap *soap)
+{ soap->part = SOAP_END_ENVELOPE;
+  return soap_element_end_in(soap, "SOAP-ENV:Envelope");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_out(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap->version == 1)
+    soap->encoding = 1;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_SEC) && soap_set_attr(soap, "wsu:Id", "Body"))
+    return soap->error;
+#endif
+  if (soap_element(soap, "SOAP-ENV:Body", 0, NULL))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Body"))
+    return soap->error;
+  soap->part = SOAP_END_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_in(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Body", 0))
+    return soap->error;
+  if (!soap->body)
+    soap->part = SOAP_NO_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_in(struct soap *soap)
+{ if (soap->part == SOAP_NO_BODY)
+    return SOAP_OK;
+  soap->part = SOAP_END_BODY;
+  return soap_element_end_in(soap, "SOAP-ENV:Body");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_header(struct soap *soap)
+{ if (soap_getheader(soap) && soap->error == SOAP_TAG_MISMATCH)
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_endpoint(struct soap *soap, const char *endpoint)
+{ register const char *s;
+  register size_t i, n;
+  soap->endpoint[0] = '\0';
+  soap->host[0] = '\0';
+  soap->path[0] = '/';
+  soap->path[1] = '\0';
+  soap->port = 80;
+  if (!endpoint || !*endpoint)
+    return;
+  if (!strncmp(endpoint, "https:", 6))
+    soap->port = 443;
+  strncpy(soap->endpoint, endpoint, sizeof(soap->endpoint) - 1);
+  s = strchr(endpoint, ':');
+  if (s && s[1] == '/' && s[2] == '/')
+    s += 3;
+  else
+    s = endpoint;
+  n = strlen(s);
+  if (n >= sizeof(soap->host))
+    n = sizeof(soap->host) - 1;
+#ifdef WITH_IPV6
+  if (s[0] == '[')
+  { s++;
+    for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == ']')
+      { s++;
+        break; 
+      }
+    }
+  }
+  else
+  { for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == '/' || s[i] == ':')
+        break; 
+    }
+  }
+#else
+  for (i = 0; i < n; i++)
+  { soap->host[i] = s[i];
+    if (s[i] == '/' || s[i] == ':')
+      break; 
+  }
+#endif
+  soap->host[i] = '\0';
+  if (s[i] == ':')
+  { soap->port = (int)atol(s + i + 1);
+    for (i++; i < n; i++)
+      if (s[i] == '/')
+        break;
+  }
+  if (s[i])
+  { strncpy(soap->path, s + i, sizeof(soap->path));
+    soap->path[sizeof(soap->path) - 1] = '\0';
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect(struct soap *soap, const char *endpoint, const char *action)
+{ return soap_connect_command(soap, SOAP_POST, endpoint, action);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect_command(struct soap *soap, int http_command, const char *endpoint, const char *action)
+{ char host[sizeof(soap->host)];
+  int port;
+  size_t count;
+  soap->error = SOAP_OK;
+  strcpy(host, soap->host); /* save to compare */
+  port = soap->port; /* save to compare */
+  soap_set_endpoint(soap, endpoint);
+#ifndef WITH_LEANER
+  if (soap->fconnect)
+  { if ((soap->error = soap->fconnect(soap, endpoint, soap->host, soap->port)))
+      return soap->error;
+  }
+  else
+#endif
+  if (soap->fopen && *soap->host)
+  { soap->status = http_command;
+    if (!soap->keep_alive || !soap_valid_socket(soap->socket) || strcmp(soap->host, host) || soap->port != port || !soap->fpoll || soap->fpoll(soap))
+    { soap->keep_alive = 0; /* to force close */
+      soap->omode &= ~SOAP_IO_UDP; /* to force close */
+      soap_closesock(soap);
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Connect/reconnect to host='%s' path='%s' port=%d\n", soap->host, soap->path, soap->port));
+#ifdef WITH_UDP
+      if (!strncmp(endpoint, "soap.udp:", 9))
+        soap->omode |= SOAP_IO_UDP;
+#endif
+      soap->socket = soap->fopen(soap, endpoint, soap->host, soap->port);
+      if (soap->error)
+        return soap->error;
+      soap->keep_alive = ((soap->omode & SOAP_IO_KEEPALIVE) != 0);
+    }
+  }
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML) && endpoint)
+  { unsigned int k = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((k & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fpost(soap, endpoint, soap->host, soap->port, soap->path, action, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((k & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = k;
+  }
+  else if (action)
+    soap->action = soap_strdup(soap, action);
+  if (http_command != SOAP_POST)
+    return soap_end_send(soap);
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2base64(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register int i;
+  register unsigned long m;
+  register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, (n + 2) / 3 * 4 + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (!s)
+    return p;
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    t += 4;
+  }
+  t[0] = '\0';
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      t[i] = '=';
+    t[4] = '\0';
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_base642s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register int i, j, c;
+  register unsigned long m;
+  register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = (strlen(s) + 3) / 4 * 3;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  if (n)
+    *n = 0;
+  for (;;)
+  { for (i = 0; i < SOAP_BLKLEN; i++)
+    { m = 0;
+      j = 0;
+      while (j < 4)
+      { c = *s++;
+        if (c == '=' || !c)
+        { i *= 3;
+          switch (j)
+          { case 2:
+              *t++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *t++ = (char)((m >> 10) & 0xFF);
+              *t++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n += i;
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      }
+      *t++ = (char)((m >> 16) & 0xFF);
+      *t++ = (char)((m >> 8) & 0xFF);
+      *t++ = (char)(m & 0xFF);
+      if (l < 3)
+      { if (n)
+	  *n += i;
+        return p;
+      }
+      l -= 3;
+    }
+    if (n)
+      *n += 3 * SOAP_BLKLEN;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2hex(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, 2 * n + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (s)
+  { for (; n > 0; n--)
+    { register int m = *s++;
+      *t++ = (char)((m >> 4) + (m > 159 ? 'a' - 10 : '0'));
+      m &= 0x0F;
+      *t++ = (char)(m + (m > 9 ? 'a' - 10 : '0'));
+    }
+  }
+  *t++ = '\0';
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_hex2s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = strlen(s) / 2;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  while (l)
+  { register int d1, d2;
+    d1 = *s++;
+    if (!d1)
+      break;
+    d2 = *s++;
+    if (!d2)
+      break;
+    *t++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    l--;
+  }
+  if (n)
+    *n = t - p;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthttphdr(struct soap *soap, int status, size_t count)
+{ register const char *s = NULL;
+  register int err = SOAP_OK;
+#ifndef WITH_LEANER
+  register const char *r = NULL;
+#endif
+  if (status == SOAP_FILE && soap->http_content)
+    s = soap->http_content;
+  else if (status == SOAP_HTML)
+    s = "text/html; charset=utf-8";
+  else if (count || ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK))
+  { if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+  }
+#ifndef WITH_LEANER
+  if (soap->mode & (SOAP_ENC_DIME | SOAP_ENC_MTOM))
+  { if (soap->mode & SOAP_ENC_MTOM)
+    { r = s;
+      s = "application/xop+xml; charset=utf-8";
+    }
+    else
+      s = "application/dime";
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->status != SOAP_GET)
+  { register const char *t = strchr(s, ';');
+    sprintf(soap->tmpbuf, "multipart/related; boundary=\"%s\"; type=\"", soap->mime.boundary);
+    if (t)
+      strncat(soap->tmpbuf, s, t - s);
+    else
+      strcat(soap->tmpbuf, s);
+    if (soap->mime.start)
+    { strcat(soap->tmpbuf, "\"; start=\"");
+      strcat(soap->tmpbuf, soap->mime.start);
+    }
+    strcat(soap->tmpbuf, "\"");
+    if (r)
+    { strcat(soap->tmpbuf, "; start-info=\"");
+      strcat(soap->tmpbuf, r);
+      strcat(soap->tmpbuf, "\"");
+    }
+    s = soap->tmpbuf;
+  }
+#endif
+  if (s && (err = soap->fposthdr(soap, "Content-Type", s)))
+    return err;
+#ifdef WITH_ZLIB
+  if (soap->omode & SOAP_ENC_ZLIB)
+  {
+#ifdef WITH_GZIP
+    err = soap->fposthdr(soap, "Content-Encoding", "gzip");
+#else
+    err = soap->fposthdr(soap, "Content-Encoding", "deflate");
+#endif
+    if (err)
+      return err;
+  }
+#endif
+#ifndef WITH_LEANER
+  if ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK)
+    err = soap->fposthdr(soap, "Transfer-Encoding", "chunked");
+  else
+#endif
+  if (soap->status != SOAP_GET)
+  { sprintf(soap->tmpbuf, "%lu", (unsigned long)count);
+    err = soap->fposthdr(soap, "Content-Length", soap->tmpbuf);
+  }
+  if (err)
+    return err;
+  return soap->fposthdr(soap, "Connection", soap->keep_alive ? "keep-alive" : "close");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_get(struct soap *soap)
+{ return SOAP_GET_METHOD;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post(struct soap *soap, const char *endpoint, const char *host, int port, const char *path, const char *action, size_t count)
+{ register const char *s;
+  register int err;
+  if (soap->status == SOAP_GET)
+    s = "GET";
+  else
+    s = "POST";
+#ifdef PALM
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)) && strncmp(endpoint, "_beam:", 6) && strncmp(endpoint, "_local:", 7) && strncmp(endpoint, "_btobex:", 8))
+#else
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)))
+#endif
+    return SOAP_OK;
+  if (soap->proxy_host && strncmp(endpoint, "https:", 6))
+    sprintf(soap->tmpbuf, "%s %s HTTP/%s", s, endpoint, soap->http_version);
+  else
+    sprintf(soap->tmpbuf, "%s /%s HTTP/%s", s, (*path == '/' ? path + 1 : path), soap->http_version);
+  if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+    return err;
+  if (port != 80)
+    sprintf(soap->tmpbuf, "%s:%d", host, port);
+  else
+    strcpy(soap->tmpbuf, host); 
+  if ((err = soap->fposthdr(soap, "Host", soap->tmpbuf))
+   || (err = soap->fposthdr(soap, "User-Agent", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, SOAP_OK, count)))
+    return err;
+#ifdef WITH_ZLIB
+#ifdef WITH_GZIP
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "gzip, deflate")))
+#else
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "deflate")))
+#endif
+    return err;
+#endif
+#ifndef WITH_LEAN
+  if (soap->userid && soap->passwd && strlen(soap->userid) + strlen(soap->passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Authorization", soap->tmpbuf)))
+      return err;
+  }
+  if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+      return err;
+  }
+#endif
+#ifdef WITH_COOKIES
+#ifdef WITH_OPENSSL
+  if (soap_putcookies(soap, host, path, soap->ssl != NULL))
+    return soap->error;
+#else
+  if (soap_putcookies(soap, host, path, 0))
+    return soap->error;
+#endif
+#endif
+  if (action && soap->version == 1)
+  { sprintf(soap->tmpbuf, "\"%s\"", action);
+    if ((err = soap->fposthdr(soap, "SOAPAction", soap->tmpbuf)))
+      return err;
+  }
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_send_header(struct soap *soap, const char *s)
+{ register const char *t;
+  do
+  { t = strchr(s, '\n'); /* disallow \n in HTTP headers */
+    if (!t)
+      t = s + strlen(s);
+    if (soap_send_raw(soap, s, t - s))
+      return soap->error;
+    s = t + 1;
+  } while (*t);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post_header(struct soap *soap, const char *key, const char *val)
+{ if (key)
+  { if (http_send_header(soap, key))
+      return soap->error;
+    if (val && (soap_send_raw(soap, ": ", 2) || http_send_header(soap, val)))
+      return soap->error;
+  }
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_response(struct soap *soap, int status, size_t count)
+{ register int err;
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    httpOutputEnable(soap->rpmreqid);
+#endif
+  if (!status || status == SOAP_HTML || status == SOAP_FILE)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "OK 200\n"));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s 200 OK", soap->http_version);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", "200 OK")))
+      return err;
+  }
+  else if (status > 200 && status < 600)
+  { sprintf(soap->tmpbuf, "HTTP/%s %d %s", soap->http_version, status, http_error(soap, status));
+    if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      return err;
+#ifndef WITH_LEAN 
+    if (status == 401)
+    { sprintf(soap->tmpbuf, "Basic realm=\"%s\"", soap->authrealm ? soap->authrealm : "gSOAP Web Service");
+      if ((err = soap->fposthdr(soap, "WWW-Authenticate", soap->tmpbuf)))
+        return err;
+    }
+    else if ((status >= 301 && status <= 303) || status == 307)
+    { if ((err = soap->fposthdr(soap, "Location", soap->endpoint)))
+        return err;
+    }
+#endif
+  }
+  else
+  { const char *s = *soap_faultcode(soap);
+    if (soap->version == 2 && !strcmp(s, "SOAP-ENV:Sender"))
+      s = "400 Bad Request";
+    else
+      s = "500 Internal Server Error";
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error %s (status=%d)\n", s, status));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s %s", soap->http_version, s);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", s)))
+      return err;
+  }
+  if ((err = soap->fposthdr(soap, "Server", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, status, count)))
+    return err;
+#ifdef WITH_COOKIES
+  if (soap_putsetcookies(soap))
+    return soap->error;
+#endif
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_response(struct soap *soap, int status)
+{ register size_t count;
+  if (!(soap->omode & (SOAP_ENC_XML | SOAP_IO_STORE /* this tests for chunking too */))
+   && (status == SOAP_HTML || status == SOAP_FILE))
+  { soap->omode &= ~SOAP_IO;
+    soap->omode |= SOAP_IO_STORE;
+  }
+  soap->status = status;
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML))
+  { register int n = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((n & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fresponse(soap, status, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((n & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = n;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static const char*
+soap_set_validation_fault(struct soap *soap, const char *s, const char *t)
+{ if (*soap->tag)
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s in element <%s>", s, t?t:SOAP_STR_EOS, soap->tag);
+  else
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s", s, t?t:SOAP_STR_EOS);
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_fault(struct soap *soap)
+{ const char **c = soap_faultcode(soap);
+  const char **s = soap_faultstring(soap);
+  if (!*c && !*s && soap->fseterror)
+    soap->fseterror(soap, c, s);
+  if (!*c)
+  { if (soap->version == 2)
+      *c = "SOAP-ENV:Sender";
+    else
+      *c = "SOAP-ENV:Client";
+  }
+  if (*s)
+    return;
+  switch (soap->error)
+  {
+#ifndef WITH_LEAN
+    case SOAP_CLI_FAULT:
+      *s = "Client fault";
+      break;
+    case SOAP_SVR_FAULT:
+      *s = "Server fault";
+      break;
+    case SOAP_TAG_MISMATCH:
+      *s = soap_set_validation_fault(soap, "tag name or namespace mismatch", NULL);
+      break;
+    case SOAP_TYPE:
+      *s = soap_set_validation_fault(soap, "data type mismatch ", soap->type);
+      break;
+    case SOAP_SYNTAX_ERROR:
+      *s = "Well-formedness violation";
+      break;
+    case SOAP_NO_TAG:
+      *s = "No XML element tag";
+      break;
+    case SOAP_MUSTUNDERSTAND:
+      *c = "SOAP-ENV:MustUnderstand";
+      sprintf(soap->msgbuf, "The data in element '%s' must be understood but cannot be handled", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_VERSIONMISMATCH:
+      *c = "SOAP-ENV:VersionMismatch";
+      *s = "SOAP version mismatch or invalid SOAP message";
+      break;
+    case SOAP_DATAENCODINGUNKNOWN:
+      *c = "SOAP-ENV:DataEncodingUnknown";
+      *s = "Unsupported SOAP data encoding";
+      break;
+    case SOAP_NAMESPACE:
+      *s = soap_set_validation_fault(soap, "namespace mismatch", NULL);
+      break;
+    case SOAP_USER_ERROR:
+      *s = "User error";
+      break;
+    case SOAP_FATAL_ERROR:
+      *s = "Fatal error";
+      break;
+    case SOAP_NO_METHOD:
+      sprintf(soap->msgbuf, "Method '%s' not implemented: method name or namespace not recognized", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_GET_METHOD:
+      *s = "HTTP GET method not implemented";
+      break;
+    case SOAP_EOM:
+      *s = "Out of memory";
+      break;
+    case SOAP_IOB:
+      *s = "Array index out of bounds";
+      break;
+    case SOAP_NULL:
+      *s = soap_set_validation_fault(soap, "nil not allowed", NULL);
+      break;
+    case SOAP_DUPLICATE_ID:
+      *s = soap_set_validation_fault(soap, "multiple definitions of id ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:DuplicateID";
+      break;
+    case SOAP_MISSING_ID:
+      *s = soap_set_validation_fault(soap, "missing id for ref ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:MissingID";
+      break;
+    case SOAP_HREF:
+      *s = soap_set_validation_fault(soap, "incompatible object ref ", soap->id);
+      break;
+    case SOAP_FAULT:
+      break;
+#ifndef WITH_NOIO
+    case SOAP_UDP_ERROR:
+      *s = "Message too large for UDP packet";
+      break;
+    case SOAP_TCP_ERROR:
+      *s = tcp_error(soap);
+      break;
+#endif
+    case SOAP_HTTP_ERROR:
+      *s = "HTTP error";
+      break;
+    case SOAP_SSL_ERROR:
+#ifdef WITH_OPENSSL
+      *s = "SSL error";
+#else
+      *s = "OpenSSL not installed: recompile with -DWITH_OPENSSL";
+#endif
+      break;
+    case SOAP_PLUGIN_ERROR:
+      *s = "Plugin registry error";
+      break;
+    case SOAP_DIME_ERROR:
+      *s = "DIME format error";
+      break;
+    case SOAP_DIME_HREF:
+      *s = "DIME href to missing attachment";
+      break;
+    case SOAP_DIME_MISMATCH:
+      *s = "DIME version/transmission error";
+      break;
+    case SOAP_DIME_END:
+      *s = "End of DIME error";
+      break;
+    case SOAP_MIME_ERROR:
+      *s = "MIME format error";
+      break;
+    case SOAP_MIME_HREF:
+      *s = "MIME href to missing attachment";
+      break;
+    case SOAP_MIME_END:
+      *s = "End of MIME error";
+      break;
+    case SOAP_ZLIB_ERROR:
+#ifdef WITH_ZLIB
+      sprintf(soap->msgbuf, "Zlib/gzip error: '%s'", soap->d_stream.msg?soap->d_stream.msg:"");
+      *s = soap->msgbuf;
+#else
+      *s = "Zlib/gzip not installed for (de)compression: recompile with -DWITH_GZIP";
+#endif
+      break;
+    case SOAP_REQUIRED:
+      *s = soap_set_validation_fault(soap, "missing required attribute", NULL);
+      break;
+    case SOAP_PROHIBITED:
+      *s = soap_set_validation_fault(soap, "prohibited attribute present", NULL);
+      break;
+    case SOAP_OCCURS:
+      *s = soap_set_validation_fault(soap, "min/maxOccurs violation", NULL);
+      break;
+    case SOAP_LENGTH:
+      *s = soap_set_validation_fault(soap, "content length violation", NULL);
+      break;
+    case SOAP_STOP:
+      *s = "Stopped: no response sent";
+      break;
+#endif
+    case SOAP_EOF:
+#ifndef WITH_NOIO
+      sprintf(soap->msgbuf, "End of file or no input: '%s'", soap_strerror(soap));
+      *s = soap->msgbuf;
+      break;
+#else
+      *s = "End of file or no input";
+      break;
+#endif
+    default:
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+      if (soap->error > 200 && soap->error < 600)
+      { sprintf(soap->msgbuf, "HTTP Error: %d %s", soap->error, http_error(soap, soap->error));
+        *s = soap->msgbuf;
+      }
+      else
+#endif
+#endif
+      { sprintf(soap->msgbuf, "Error %d", soap->error);
+        *s = soap->msgbuf;
+      }
+    }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_fault(struct soap *soap)
+{ register int status = soap->error;
+  int r = 1;
+  if (status == SOAP_STOP)
+    return status;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Sending back fault struct for error code %d\n", soap->error));
+  soap->keep_alive = 0; /* to terminate connection */
+  soap_set_fault(soap);
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+  if (soap_valid_socket(soap->socket))
+  { struct timeval timeout;
+    fd_set rfd, sfd;
+    timeout.tv_sec = 0;
+    timeout.tv_usec = 0;
+    FD_ZERO(&rfd);
+    FD_ZERO(&sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, NULL, &timeout);
+    if (r > 0)
+    { if (!FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       || (FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        && recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) < 0))
+        r = 0;
+    }
+  }
+#endif
+#endif
+  if ((status != SOAP_EOF || (!soap->recv_timeout && !soap->send_timeout)) && r > 0)
+  { soap->error = SOAP_OK;
+    soap_serializeheader(soap);
+    soap_serializefault(soap);
+    soap_begin_count(soap);
+    if (soap->mode & SOAP_IO_LENGTH)
+    { soap_envelope_begin_out(soap);
+      soap_putheader(soap);
+      soap_body_begin_out(soap);
+      soap_putfault(soap);
+      soap_body_end_out(soap);
+      soap_envelope_end_out(soap);
+    }
+    soap_end_count(soap);
+    if (soap_response(soap, status)
+     || soap_envelope_begin_out(soap)
+     || soap_putheader(soap)
+     || soap_body_begin_out(soap)
+     || soap_putfault(soap)
+     || soap_body_end_out(soap)
+     || soap_envelope_end_out(soap))
+      return soap_closesock(soap);
+    soap_end_send(soap);
+  }
+  soap->error = status;
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_fault(struct soap *soap)
+{ register int status = soap->error;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Receiving SOAP Fault\n"));
+  soap->error = SOAP_OK;
+  if (soap_getfault(soap))
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Error: soap_get_soapfault() failed. Is this a SOAP message at all?\n"));
+    *soap_faultcode(soap) = (soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client");
+    soap->error = status;
+    soap_set_fault(soap);
+  }
+  else
+  { register const char *s = *soap_faultcode(soap);
+    if (!soap_match_tag(soap, s, "SOAP-ENV:Server") || !soap_match_tag(soap, s, "SOAP-ENV:Receiver"))
+      status = SOAP_SVR_FAULT; 
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:Client") || !soap_match_tag(soap, s, "SOAP-ENV:Sender"))
+      status = SOAP_CLI_FAULT;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:MustUnderstand"))
+      status = SOAP_MUSTUNDERSTAND;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:VersionMismatch"))
+      status = SOAP_VERSIONMISMATCH;
+    else
+    { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Fault code %s\n", s));
+      status = SOAP_FAULT;
+    }
+    if (soap_body_end_in(soap)
+     || soap_envelope_end_in(soap)
+     || soap_end_recv(soap))
+      return soap_closesock(soap);
+    soap->error = status;
+  }
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_empty_response(struct soap *soap)
+{ soap->count = 0;
+  if (soap_response(soap, SOAP_OK) || soap_end_send(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_empty_response(struct soap *soap)
+{ if (soap_begin_recv(soap) || soap_end_recv(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+soap_strerror(struct soap *soap)
+{ register int err = soap->errnum;
+  if (err)
+  {
+#ifndef WIN32
+    return strerror(err);
+#else
+    FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, (LPTSTR)&soap->errorstr, sizeof(soap->errorstr), NULL);
+    return soap->errorstr;
+#endif
+  }
+  return "Operation interrupted or timed out";
+}
+#endif
+#endif 
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_set_error(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail, int soaperror)
+{ *soap_faultcode(soap) = faultcode;
+  if (faultsubcode)
+    *soap_faultsubcode(soap) = faultsubcode;
+  *soap_faultstring(soap) = faultstring;
+  if (faultdetail && *faultdetail)
+  { register const char **s = soap_faultdetail(soap);
+    if (s)
+      *s = faultdetail;
+  }
+  return soap->error = soaperror;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_sender_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_receiver_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_copy_fault(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ char *r = NULL, *s = NULL, *t = NULL;
+  if (faultsubcode)
+    r = soap_strdup(soap, faultsubcode);
+  if (faultstring)
+    s = soap_strdup(soap, faultstring);
+  if (faultdetail)
+    t = soap_strdup(soap, faultdetail);
+  return soap_set_error(soap, faultcode, r, s, t, SOAP_FAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_sender_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_receiver_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault(struct soap *soap, FILE *fd)
+{ if (soap_check_state(soap))
+    fprintf(fd, "Error: soap struct not initialized\n");
+  else if (soap->error)
+  { const char *c, *v = NULL, *s, **d;
+    d = soap_faultcode(soap);
+    if (!*d)
+      soap_set_fault(soap);
+    c = *d;
+    if (soap->version == 2)
+      v = *soap_faultsubcode(soap);
+    s = *soap_faultstring(soap);
+    d = soap_faultdetail(soap);
+    fprintf(fd, "%s%d fault: %s [%s]\n\"%s\"\nDetail: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, c, v ? v : "no subcode", s ? s : "[no reason]", d && *d ? *d : "[no detail]");
+  }
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault_location(struct soap *soap, FILE *fd)
+{ 
+#ifndef WITH_LEAN
+  int i, j, c1, c2;
+  if (soap->error && soap->buflen > 0)
+  { i = (int)soap->bufidx - 1;
+    if (i <= 0)
+      i = 0;
+    c1 = soap->buf[i];
+    soap->buf[i] = '\0';
+    if ((int)soap->buflen >= i + 1024)
+      j = i + 1023;
+    else
+      j = (int)soap->buflen - 1;
+    c2 = soap->buf[j];
+    soap->buf[j] = '\0';
+    fprintf(fd, "%s%c\n** HERE **\n", soap->buf, c1);
+    if (soap->bufidx < soap->buflen)
+      fprintf(fd, "%s\n", soap->buf + soap->bufidx);
+    soap->buf[i] = c1;
+    soap->buf[j] = c2;
+  }
+#endif
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void *arg)
+{ register struct soap_plugin *p;
+  register int r;
+  if (!(p = (struct soap_plugin*)SOAP_MALLOC(soap, sizeof(struct soap_plugin))))
+    return soap->error = SOAP_EOM;
+  p->id = NULL;
+  p->data = NULL;
+  p->fcopy = NULL;
+  p->fdelete = NULL;
+  r = fcreate(soap, p, arg);
+  if (!r && p->fdelete)
+  { p->next = soap->plugins;
+    soap->plugins = p;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Registered '%s' plugin\n", p->id));
+    return SOAP_OK;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not register plugin '%s': plugin returned error %d (or fdelete callback not set)\n", p->id?p->id:"?", r));
+  SOAP_FREE(soap, p);
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static void *
+fplugin(struct soap *soap, const char *id)
+{ register struct soap_plugin *p;
+  for (p = soap->plugins; p; p = p->next)
+    if (p->id == id || !strcmp(p->id, id))
+      return p->data;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void *
+SOAP_FMAC2
+soap_lookup_plugin(struct soap *soap, const char *id)
+{ return soap->fplugin(soap, id);
+}
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap()
+{ soap_init(this);
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	C++ soap struct methods
+ *
+\******************************************************************************/
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode mode)
+{ soap_init1(this, mode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode imode, soap_mode omode)
+{ soap_init2(this, imode, omode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(struct soap& soap)
+{ soap_copy_context(this, &soap);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::~soap()
+{ soap_destroy(this);
+  soap_end(this);
+  soap_done(this);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/samples/udp_VC/stdsoap2.h b/samples/udp_VC/stdsoap2.h
new file mode 100644
index 0000000..e7f45bd
--- /dev/null
+++ b/samples/udp_VC/stdsoap2.h
@@ -0,0 +1,2093 @@
+/*
+
+stdsoap2.h 2.7.6e
+
+gSOAP runtime
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+Contributors:
+
+Wind River Systems, Inc., for the following additions (marked WR[...]):
+  - vxWorks compatible
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#ifdef WITH_SOAPDEFS_H
+# include "soapdefs.h"		/* include user-defined stuff */
+#endif
+
+#ifndef _THREAD_SAFE
+# define _THREAD_SAFE
+#endif
+
+#ifndef OPENSERVER
+# ifndef _REENTRANT
+#  define _REENTRANT
+# endif
+#endif
+
+#ifndef SOAP_FMAC1	/* stdsoap2.h declaration macro */
+# define SOAP_FMAC1
+#endif
+
+#ifndef SOAP_FMAC2	/* stdsoap2.h declaration macro */
+# define SOAP_FMAC2
+#endif
+
+#ifndef SOAP_FMAC3	/* (de)serializer declaration macro */
+# define SOAP_FMAC3
+#endif
+
+#ifndef SOAP_FMAC3S	/* string converter for (de)serializer declaration macro */
+# define SOAP_FMAC3S SOAP_FMAC3
+#endif
+
+#ifndef SOAP_FMAC4	/* (de)serializer declaration macro */
+# define SOAP_FMAC4
+#endif
+
+#ifndef SOAP_FMAC4S	/* string converter for (de)serializer declaration macro */
+# define SOAP_FMAC4S SOAP_FMAC4
+#endif
+
+#ifndef SOAP_FMAC5	/* stub/skeleton declaration macro */
+# define SOAP_FMAC5
+#endif
+
+#ifndef SOAP_FMAC6	/* stub/skeleton declaration macro */
+# define SOAP_FMAC6
+#endif
+
+#ifndef SOAP_CMAC	/* class declaration macro */
+# define SOAP_CMAC
+#endif
+
+#ifndef SOAP_NMAC	/* namespace table declaration macro */
+# define SOAP_NMAC
+#endif
+
+#ifndef SOAP_SOURCE_STAMP
+# define SOAP_SOURCE_STAMP(str)
+#endif
+
+/* gSOAP 2.7.4 and higher: fast look-aside buffering is stable */
+#ifndef WITH_FAST
+# define WITH_FAST
+#endif
+
+#ifdef WITH_LEANER
+# ifndef WITH_LEAN
+#  define WITH_LEAN
+# endif
+#endif
+
+#ifdef WITH_LEAN
+# ifdef WITH_COOKIES
+#  error "Cannot build WITH_LEAN code WITH_COOKIES enabled"
+# endif
+#endif
+
+#ifndef STDSOAP_H
+#define STDSOAP_H
+
+#if defined(__vxworks) || defined(__VXWORKS__)
+# define VXWORKS
+#endif
+
+#ifdef _WIN32
+# ifndef WIN32
+#  define WIN32
+# endif
+#endif
+
+#ifdef UNDER_CE
+# ifndef WIN32
+#  define WIN32
+# endif
+#endif
+
+#ifdef __BORLANDC__
+# ifdef __WIN32__
+#  ifndef WIN32
+#   define WIN32
+#  endif
+# endif
+#endif
+
+#ifdef __CYGWIN__
+# ifndef CYGWIN
+#  define CYGWIN
+# endif
+#endif
+
+#ifdef __SYMBIAN32__ 
+# define SYMBIAN
+# undef WIN32
+#endif
+
+#if defined(__palmos__) || defined(PALM_GCC) || defined(__PALMOS_TRAPS__)
+# ifndef PALM
+#  define PALM
+# endif
+#endif
+
+#if defined(__hpux)
+# ifndef HP_UX
+#  define HP_UX
+# endif
+#endif
+
+#if defined(__alpha) && !defined(__VMS)
+# ifndef TRU64
+#  define TRU64 
+# endif
+#endif
+
+#ifdef __MVS__
+# ifndef OS390
+#  define OS390
+# endif
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+# ifdef WITH_OPENSSL
+#  ifndef HAVE_OPENSSL_SSL_H
+#   undef WITH_OPENSSL
+#  endif
+# endif
+#else
+# if defined(UNDER_CE)
+#  define WITH_LEAN
+#  define HAVE_SSCANF
+# elif defined(WIN32)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define SOAP_LONG_FORMAT "%I64d"
+#  define SOAP_ULONG_FORMAT "%I64u"
+# elif defined(CYGWIN)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(__APPLE__)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_TIMEGM
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(_AIXVERSION_431)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(HP_UX)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(FREEBSD) || defined(__FreeBSD__)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_STRTOLL
+#  define HAVE_STRTOULL
+#  define HAVE_GETTIMEOFDAY
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define SOAP_LONG_FORMAT "%qd"
+#  define SOAP_ULONG_FORMAT "%qu"
+# elif defined(__VMS)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(__GLIBC__) || defined(__GNU__)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_STRTOLL
+#  define HAVE_STRTOULL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_TIMEGM
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define HAVE_ISNAN
+# elif defined(TRU64)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_STRTOLL
+#  define HAVE_STRTOULL
+#  define HAVE_GETTIMEOFDAY
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define __USE_STD_IOSTREAM
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define SOAP_LONG_FORMAT "%ld"
+#  define SOAP_ULONG_FORMAT "%lu"
+# elif defined(MAC_CARBON)
+#  define WITH_NOIO
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GETHOSTBYNAME_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(PALM)
+#  define WITH_LEAN
+#  define HAVE_STRTOD   /* strtod() is defined in palmFunctions.h */
+#  include <stdlib.h>	/* Needs to be included before unix headers */
+#  include <sys_types.h>
+#  define IGNORE_STDIO_STUBS
+#  include <StdIOPalm.h>
+#  define O_NONBLOCK FNONBIO
+#  include <sys_socket.h>
+#  include "palmFunctions.h"
+# elif defined(SYMBIAN)
+#  define WITH_LEAN
+#  define WITH_NONAMESPACES
+#  define HAVE_STRTOD	/* use STRTOD since sscanf doesn't seem to work */
+#  include <e32def.h>
+#  include <sys/ioctl.h>
+# elif defined(VXWORKS)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_PGMTIME_R
+#  define HAVE_PLOCALTIME_R
+#  define HAVE_MKTIME
+# elif defined(OS390)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(AS400)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# else
+/* Default asumptions on supported functions */
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GETHOSTBYNAME_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# endif
+#endif
+
+/* QNX does not have a working version of strtof */
+#if defined(__QNX__) || defined(QNX)
+# undef HAVE_STRTOF
+#endif
+
+#ifndef SOAP_LONG_FORMAT
+# define SOAP_LONG_FORMAT "%lld"	/* printf format for 64 bit ints */
+#endif
+
+#ifndef SOAP_ULONG_FORMAT
+# define SOAP_ULONG_FORMAT "%llu"	/* printf format for unsigned 64 bit ints */
+#endif
+
+#ifndef WITH_NOSTDLIB
+# include <stdlib.h>
+# ifndef PALM
+#  include <stdio.h>
+#  include <string.h>
+# endif
+# include <ctype.h>
+# include <limits.h>
+#endif
+
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+# include <string>
+# include <iostream>
+#endif
+
+#ifdef WITH_NOHTTP
+# ifndef WITH_NOIO
+////#  define WITH_NOIO     ESL TO DO : I added the comment to make this work. This is very strange though!!
+#  undef WITH_COOKIES
+# endif
+#endif
+
+#ifndef UNDER_CE
+# ifndef PALM
+#  ifndef WITH_NOIO
+#   include <errno.h>
+#   include <sys/types.h>
+#  endif
+#  ifndef WITH_LEAN
+#   ifdef HAVE_SYS_TIMEB_H
+#    include <sys/timeb.h>		/* for ftime() */
+#   endif
+#   include <time.h>
+#  endif
+# endif
+#endif
+
+#ifdef OPENSERVER
+# include <sys/socket.h>
+# include <sys/stream.h>
+# include <sys/protosw.h>
+  extern int h_errno;
+#endif
+
+#ifndef WITH_NOIO
+# ifndef WIN32
+#  ifndef PALM
+#   include <sys/socket.h>
+#   ifdef VXWORKS
+#    include <sockLib.h>
+#    include <selectLib.h>
+#   endif
+#   ifndef VXWORKS
+#    ifndef SYMBIAN
+#     include <strings.h>
+#    endif
+#   endif
+#   ifdef SUN_OS
+#    include <sys/stream.h>		/* SUN */
+#    include <sys/socketvar.h>		/* SUN < 2.8 (?) */
+#   endif
+#   ifdef VXWORKS
+#    ifdef _WRS_KERNEL
+#     include <sys/times.h>
+#    endif
+#   else
+#    include <sys/time.h>
+#   endif
+#   include <netinet/in.h>
+#   ifdef OS390
+#    include <netinet/tcp_var.h>
+#   else
+#    include <netinet/tcp.h>          /* TCP_NODELAY */
+#   endif
+#   include <arpa/inet.h>
+#  endif
+# endif
+#endif
+
+#ifdef WITH_FASTCGI
+# include <fcgi_stdio.h>
+#endif
+
+#ifdef WITH_OPENSSL
+# define OPENSSL_NO_KRB5
+# include <openssl/ssl.h>
+# include <openssl/err.h>
+# include <openssl/rand.h>
+# ifndef ALLOW_OLD_VERSIONS
+#  if (OPENSSL_VERSION_NUMBER < 0x00905100L)
+#   error "Must use OpenSSL 0.9.6 or later"
+#  endif
+# endif
+#endif
+
+#ifdef WITH_GZIP
+# ifndef WITH_ZLIB
+#  define WITH_ZLIB
+# endif
+#endif
+
+#ifdef WITH_CASEINSENSITIVETAGS
+# define SOAP_STRCMP soap_tag_cmp	/* case insensitve XML element/attribute names */
+#else
+# define SOAP_STRCMP strcmp		/* case sensitive XML element/attribute names */
+#endif
+
+#ifdef WITH_ZLIB
+# include <zlib.h>
+#endif
+
+#ifndef WITH_NOSTDLIB
+# ifndef PALM
+#  include <math.h>	/* for isnan() */
+# endif
+#endif
+
+/* #define DEBUG */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and messages (in file TEST.log) */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef WIN32
+# ifndef UNDER_CE
+#  include <io.h>
+#  include <fcntl.h>
+# endif
+# include <winsock.h>
+/* # include <winsock2.h> */ /* Alternative: use winsock2 (not available with eVC) */
+# ifdef WITH_IPV6
+#  include <ws2tcpip.h>
+#  include <wspiapi.h>
+# endif
+#else
+# ifdef VXWORKS
+#  include <hostLib.h>
+#  include <ioctl.h>
+#  include <ioLib.h>
+# endif
+# ifndef WITH_NOIO
+#  ifndef PALM
+#   include <netdb.h>
+#   include <netinet/in.h>
+#   include <unistd.h>
+#   include <fcntl.h>
+#  endif
+# endif
+#endif
+
+/* Portability: define SOAP_SOCKLEN_T */
+#if defined(_AIX)
+# define SOAP_SOCKLEN_T socklen_t
+#elif defined(SOCKLEN_T)
+# define SOAP_SOCKLEN_T SOCKLEN_T
+#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) || defined(FREEBSD) || defined(__FreeBSD__) || defined(__QNX__) || defined(QNX)
+# define SOAP_SOCKLEN_T socklen_t
+#elif defined(IRIX) || defined(WIN32) || defined(__APPLE__) || defined(HP_UX) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS)
+# define SOAP_SOCKLEN_T int
+#else
+# define SOAP_SOCKLEN_T size_t
+#endif
+
+#ifndef SOAP_SOCKET
+# ifdef WIN32
+#  define SOAP_SOCKET SOCKET
+# else
+#  define SOAP_SOCKET int
+#  define closesocket(n) close(n)
+# endif
+#endif
+
+#define SOAP_INVALID_SOCKET (-1)
+#define soap_valid_socket(n) ((n) != SOAP_INVALID_SOCKET)
+
+#if defined(SYMBIAN)
+# define LONG64 long
+# define ULONG64 unsigned LONG64
+#elif !defined(WIN32) || defined(__GLIBC__) || defined(__GNU__)
+# ifndef LONG64
+#  define LONG64 long long
+#  define ULONG64 unsigned LONG64
+# endif
+#elif defined(UNDER_CE)
+# define LONG64 __int64
+# define ULONG64 unsigned LONG64
+#elif defined(__BORLANDC__)
+# define LONG64 __int64
+# define ULONG64 unsigned LONG64
+#endif
+
+#if defined(WIN32)
+# define soap_int32 __int32
+#elif defined(SYMBIAN)
+# define soap_int32 long
+#elif defined(PALM)
+# define soap_int32 Int32
+#else
+# define soap_int32 int32_t
+#endif
+
+#ifdef WIN32
+# define SOAP_ERANGE ERANGE
+# define SOAP_EINTR WSAEINTR
+# define SOAP_EAGAIN WSAEWOULDBLOCK
+# define SOAP_EWOULDBLOCK WSAEWOULDBLOCK
+# define SOAP_EINPROGRESS WSAEINPROGRESS
+#else
+# define SOAP_ERANGE ERANGE
+# define SOAP_EINTR EINTR
+# define SOAP_EAGAIN EAGAIN
+# ifdef SYMBIAN
+#  define SOAP_EWOULDBLOCK 9898
+#  define SOAP_EINPROGRESS 9899
+# else
+#  define SOAP_EWOULDBLOCK EWOULDBLOCK
+#  define SOAP_EINPROGRESS EINPROGRESS
+# endif
+#endif
+
+#ifdef WIN32
+# ifdef UNDER_CE
+#  define soap_errno GetLastError()
+#  define soap_socket_errno GetLastError()
+#  define soap_reset_errno SetLastError(0)
+# else
+#  define soap_errno GetLastError()
+#  define soap_socket_errno WSAGetLastError()
+#  define soap_reset_errno SetLastError(0)
+# endif
+#else
+# ifndef WITH_NOIO
+#  define soap_errno errno
+#  define soap_socket_errno errno
+#  define soap_reset_errno (errno = 0)
+# else
+#  define soap_errno 0
+#  define soap_socket_errno 0
+#  define soap_reset_errno
+# endif
+#endif
+
+#ifndef SOAP_BUFLEN
+# ifdef WITH_UDP
+#  define SOAP_BUFLEN (65536) /* max UDP packet size */
+# else
+#  ifndef WITH_LEAN
+#   define SOAP_BUFLEN (65536) /* buffer length for socket packets, also used by gethostbyname_r so don't make this too small */
+#  else
+#   define SOAP_BUFLEN  (2048)
+#  endif
+# endif
+#endif
+#ifndef SOAP_LABLEN
+# define SOAP_LABLEN     (64) /* initial look-aside buffer length */
+#endif
+#ifndef SOAP_PTRBLK
+# define SOAP_PTRBLK     (32) /* block allocation for pointer hash table chains */
+#endif
+#ifndef SOAP_PTRHASH
+# ifndef WITH_LEAN
+#  define SOAP_PTRHASH (1024) /* size of pointer analysis hash table (must be power of 2) */
+# else
+#  define SOAP_PTRHASH   (32)
+# endif
+#endif
+#ifndef SOAP_IDHASH
+# ifndef WITH_LEAN
+#  define SOAP_IDHASH  (1999) /* prime size of hash table for parsed id/ref */
+# else
+#  define SOAP_IDHASH    (19) /* 19, 199 */
+# endif
+#endif
+#ifndef SOAP_BLKLEN
+# ifndef WITH_LEAN
+#  define SOAP_BLKLEN   (256) /* size of blocks to collect long strings and XML attributes */
+# else
+#  define SOAP_BLKLEN    (32)
+# endif
+#endif
+#ifndef SOAP_TAGLEN
+# ifndef WITH_LEAN
+#  define SOAP_TAGLEN  (1024) /* maximum length of XML element tag/attribute name or host/path name + 1 */
+# else
+#  define SOAP_TAGLEN    (64)
+# endif
+#endif
+#ifndef SOAP_HDRLEN
+# ifndef WITH_LEAN
+#  define SOAP_HDRLEN  (8192) /* maximum length of HTTP header line (must be >4096 to read cookies) */
+# else
+#  define SOAP_HDRLEN  (1024)
+# endif
+#endif
+#ifndef SOAP_MAXDIMS
+# ifndef WITH_LEAN
+#  define SOAP_MAXDIMS	 (16) /* maximum array dimensions (array nestings) must be less than 64 to protect soap->tmpbuf */
+# else
+#  define SOAP_MAXDIMS	  (4)
+# endif
+#endif
+
+#ifndef SOAP_MAXLOGS
+# define SOAP_MAXLOGS	  (3) /* max number of debug logs per struct soap environment */
+# define SOAP_INDEX_RECV  (0)
+# define SOAP_INDEX_SENT  (1)
+# define SOAP_INDEX_TEST  (2)
+#endif
+
+#ifndef SOAP_MAXKEEPALIVE
+# define SOAP_MAXKEEPALIVE (100) /* max iterations to keep server connection alive */
+#endif
+
+#ifndef SOAP_MAXARRAYSIZE
+# define SOAP_MAXARRAYSIZE (100000) /* "trusted" max size of inbound SOAP array for compound array allocation */
+#endif
+
+#ifdef VXWORKS
+# ifdef __INCmathh 
+#  include <private/mathP.h>
+#  ifndef HAVE_ISNAN
+#   define HAVE_ISNAN
+#  endif
+#  define soap_isnan(num) isNan(num)
+# endif
+#endif
+
+#ifdef WIN32 
+# include <float.h>
+# ifndef HAVE_ISNAN
+#  define HAVE_ISNAN
+# endif
+# define soap_isnan(num) _isnan(num)
+#endif
+
+#ifdef SUN_OS
+# define soap_isnan(n) isnan(n)
+#endif
+
+#if !defined(HAVE_ISNAN) && (defined(_MATH_H) || defined(_MATH_INCLUDED))
+# define HAVE_ISNAN
+#endif
+
+#ifndef soap_isnan
+# ifdef HAVE_ISNAN
+#  define soap_isnan(n) isnan(n)
+# else
+#  define soap_isnan(_) (0)
+# endif
+#endif
+
+extern const struct soap_double_nan { unsigned int n1, n2; } soap_double_nan;
+
+#ifdef VXWORKS
+# ifndef FLT_MAX
+#  define FLT_MAX _ARCH_FLT_MAX
+# endif
+# ifndef DBL_MAX
+#  define DBL_MAX _ARCH_DBL_MAX
+# endif
+#endif
+
+#ifndef FLT_NAN
+# ifdef HAVE_ISNAN
+#  define FLT_NAN (*(float*)(void*)&soap_double_nan)
+# else
+#  define FLT_NAN (0.0)
+# endif
+#endif
+
+#ifndef FLT_PINFTY
+# if defined(FLT_MAX)
+#  define FLT_PINFTY FLT_MAX
+# elif defined(HUGE_VALF)
+#  define FLT_PINFTY (float)HUGE_VALF
+# elif defined(HUGE_VAL)
+#  define FLT_PINFTY (float)HUGE_VAL
+# elif defined(FLOAT_MAX)
+#  define FLT_PINFTY FLOAT_MAX
+# else
+#  define FLT_PINFTY (3.40282347e+38F)
+# endif
+#endif
+
+#ifndef FLT_NINFTY
+# define FLT_NINFTY (-FLT_PINFTY)
+#endif
+
+#ifndef DBL_NAN
+# ifdef HAVE_ISNAN
+#  define DBL_NAN (*(double*)(void*)&soap_double_nan)
+# else
+#  define DBL_NAN (0.0)
+# endif
+#endif
+
+#ifndef DBL_PINFTY
+# if defined(DBL_MAX)
+#  define DBL_PINFTY DBL_MAX
+# elif defined(HUGE_VALF)
+#  define DBL_PINFTY (double)HUGE_VALF
+# elif defined(HUGE_VAL)
+#  define DBL_PINFTY (double)HUGE_VAL
+# elif defined(DOUBLE_MAX)
+#  define DBL_PINFTY DOUBLE_MAX
+# else
+#  define DBL_PINFTY (1.7976931348623157e+308)
+# endif
+#endif
+
+#ifndef DBL_NINFTY
+# define DBL_NINFTY (-DBL_PINFTY)
+#endif
+
+#define soap_ispinfd(n) ((n) >= DBL_PINFTY)
+#define soap_ispinff(n) ((n) >= FLT_PINFTY)
+#define soap_isninfd(n) ((n) <= DBL_NINFTY)
+#define soap_isninff(n) ((n) <= FLT_NINFTY)
+
+/* gSOAP error codes */
+
+#define SOAP_EOF			EOF
+#define SOAP_ERR			EOF
+#define SOAP_OK				0
+#define SOAP_CLI_FAULT			1
+#define SOAP_SVR_FAULT			2
+#define SOAP_TAG_MISMATCH		3
+#define SOAP_TYPE			4
+#define SOAP_SYNTAX_ERROR		5
+#define SOAP_NO_TAG			6
+#define SOAP_IOB			7
+#define SOAP_MUSTUNDERSTAND		8
+#define SOAP_NAMESPACE			9
+#define SOAP_USER_ERROR			10
+#define SOAP_FATAL_ERROR		11
+#define SOAP_FAULT			12
+#define SOAP_NO_METHOD			13
+#define SOAP_GET_METHOD			14
+#define SOAP_EOM			15
+#define SOAP_NULL			16
+#define SOAP_DUPLICATE_ID		17
+#define SOAP_MISSING_ID			18
+#define SOAP_HREF			19
+#define SOAP_UDP_ERROR			20
+#define SOAP_TCP_ERROR			21
+#define SOAP_HTTP_ERROR			22
+#define SOAP_SSL_ERROR			23
+#define SOAP_ZLIB_ERROR			24
+#define SOAP_DIME_ERROR			25
+#define SOAP_DIME_HREF			26
+#define SOAP_DIME_MISMATCH		27
+#define SOAP_DIME_END			28
+#define SOAP_MIME_ERROR			29
+#define SOAP_MIME_HREF			30
+#define SOAP_MIME_END			31
+#define SOAP_VERSIONMISMATCH		32
+#define SOAP_PLUGIN_ERROR		33
+#define SOAP_DATAENCODINGUNKNOWN	34
+#define SOAP_REQUIRED			35
+#define SOAP_PROHIBITED			36
+#define SOAP_OCCURS			37
+#define SOAP_LENGTH			38
+
+#define soap_xml_error_check(e) ((e) == SOAP_TAG_MISMATCH || (e) == SOAP_TAG_END || (e) == SOAP_SYNTAX_ERROR || (e) == SOAP_NAMESPACE || (e) == SOAP_DUPLICATE_ID || (e) == SOAP_MISSING_ID || (e) == SOAP_REQUIRED || (e) == SOAP_PROHIBITED || (e) == SOAP_OCCURS || (e) == SOAP_LENGTH || (e) == SOAP_NULL || (e) == SOAP_HREF)
+#define soap_soap_error_check(e) ((e) == SOAP_CLI_FAULT || (e) == SOAP_SVR_FAULT || (e) == SOAP_VERSIONMISMATCH || (e) == SOAP_MUSTUNDERSTAND || (e) == SOAP_FAULT || (e) == SOAP_NO_METHOD)
+#define soap_tcp_error_check(e) ((e) == SOAP_EOF || (e) == SOAP_TCP_ERROR)
+#define soap_ssl_error_check(e) ((e) == SOAP_SSL_ERROR)
+#define soap_zlib_error_check(e) ((e) == SOAP_ZLIB_ERROR)
+#define soap_http_error_check(e) ((e) == SOAP_HTTP_ERROR || (e) == SOAP_GET_METHOD || ((e) >= 100 && (e) < 600))
+
+/* gSOAP HTTP response status codes 100 to 599 are reserved */
+
+/* Codes 600 to 999 are user definable */
+
+/* Exceptional gSOAP HTTP response status codes >= 1000 */
+
+#define SOAP_STOP		1000	/* No HTTP response */
+#define SOAP_FORM		1001	/* Form request/response */
+#define SOAP_HTML		1002	/* Custom HTML response */
+#define SOAP_FILE		1003	/* Custom file-based response */
+
+/* gSOAP HTTP method codes */
+
+#define SOAP_POST		2000
+#define SOAP_GET		2001
+
+/* gSOAP DIME */
+
+#define SOAP_DIME_CF		0x01
+#define SOAP_DIME_ME		0x02
+#define SOAP_DIME_MB		0x04
+#define SOAP_DIME_VERSION	0x08 /* DIME version 1 */
+#define SOAP_DIME_MEDIA		0x10
+#define SOAP_DIME_ABSURI	0x20
+
+/* gSOAP ZLIB */
+
+#define SOAP_ZLIB_NONE		0x00
+#define SOAP_ZLIB_DEFLATE	0x01
+#define SOAP_ZLIB_INFLATE	0x02
+#define SOAP_ZLIB_GZIP		0x02
+
+/* gSOAP transport, connection, and content encoding modes */
+
+typedef soap_int32 soap_mode;
+
+#define SOAP_IO			0x00000003	/* IO mask */
+#define SOAP_IO_FLUSH		0x00000000	/* flush output immediately, no buffering */
+#define SOAP_IO_BUFFER		0x00000001	/* buffer output in packets of size SOAP_BUFLEN */
+#define SOAP_IO_STORE		0x00000002	/* store entire output to determine length for transport */
+#define SOAP_IO_CHUNK		0x00000003	/* use HTTP chunked transfer AND buffer packets */
+
+#define SOAP_IO_UDP		0x00000004
+#define SOAP_IO_LENGTH		0x00000008
+#define SOAP_IO_KEEPALIVE	0x00000010
+
+#define SOAP_ENC_LATIN		0x00800020	/* iso-8859-1 encoding */
+#define SOAP_ENC_XML		0x00000040	/* plain XML encoding, no HTTP header */
+#define SOAP_ENC_DIME		0x00000080
+#define SOAP_ENC_MIME		0x00000100
+#define SOAP_ENC_MTOM		0x00000200
+#define SOAP_ENC_ZLIB		0x00000400
+#define SOAP_ENC_SSL		0x00000800
+
+#define SOAP_ENC		0x00000FFF	/* IO and ENC mask */
+
+#define SOAP_XML_STRICT		0x00001000	/* strict validation */
+#define SOAP_XML_INDENT		0x00002000
+#define SOAP_XML_CANONICAL	0x00004000	/* EXC C14N canonical XML */
+#define SOAP_XML_TREE		0x00008000
+#define SOAP_XML_GRAPH		0x00010000
+#define SOAP_XML_NIL		0x00020000
+#define SOAP_XML_DOM		0x00040000
+#define SOAP_XML_SEC		0x00080000	/* reserved for WS security */
+
+#define SOAP_C_NOIOB		0x00100000
+#define SOAP_C_UTFSTRING	0x00200000
+#define SOAP_C_MBSTRING		0x00400000
+
+#define SOAP_DOM_TREE		0x01000000
+#define SOAP_DOM_NODE		0x02000000
+#define SOAP_DOM_ASIS		0x04000000
+
+#define SOAP_IO_DEFAULT		SOAP_IO_FLUSH
+
+/* SSL client/server authentication settings */
+
+#define SOAP_SSL_NO_AUTHENTICATION		0x00	/* for testing purposes */
+#define SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION	0x01	/* client requires server to authenticate */
+#define SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION	0x02	/* server requires client to authenticate */
+
+#define SOAP_SSL_DEFAULT			SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION
+
+/* state */
+
+#define SOAP_INIT	1
+#define SOAP_COPY	2
+
+#define soap_check_state(soap) (!(soap) || ((soap)->state != SOAP_INIT && (soap)->state != SOAP_COPY))
+
+/* part */
+
+#define SOAP_BEGIN		0
+#define SOAP_IN_ENVELOPE	2
+#define SOAP_IN_HEADER		3
+#define SOAP_END_HEADER		4
+#define SOAP_NO_BODY		5
+#define SOAP_IN_BODY		6
+#define SOAP_END_BODY		7
+#define SOAP_END_ENVELOPE	8
+#define SOAP_END		9
+#define SOAP_BEGIN_SECURITY	10
+#define SOAP_IN_SECURITY	11
+#define SOAP_END_SECURITY	12
+
+/* DEBUG macros */
+
+#ifndef WITH_LEAN
+# ifdef DEBUG
+#  ifndef SOAP_DEBUG
+#   define SOAP_DEBUG
+#  endif
+# endif
+#endif
+
+#ifdef SOAP_DEBUG
+# define SOAP_MALLOC(soap, size) soap_track_malloc(soap, __FILE__, __LINE__, size)
+# define SOAP_FREE(soap, ptr) soap_track_free(soap, __FILE__, __LINE__, ptr)
+#endif
+
+#ifndef SOAP_MALLOC			/* use libc malloc */
+# define SOAP_MALLOC(soap, size) malloc(size)
+#endif
+
+#ifndef SOAP_FREE			/* use libc free */
+# define SOAP_FREE(soap, ptr) free(ptr)
+#endif
+
+#ifdef SOAP_DEBUG
+# ifndef SOAP_MESSAGE
+#  define SOAP_MESSAGE fprintf
+# endif
+# ifndef DBGLOG
+#  define DBGLOG(DBGFILE, CMD) \
+{ if (soap)\
+  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
+      soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\
+    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
+    { FILE *fdebug = soap->fdebug[SOAP_INDEX_##DBGFILE];\
+      CMD;\
+      fflush(fdebug);\
+    }\
+  }\
+}
+# endif
+# ifndef DBGMSG
+#  define DBGMSG(DBGFILE, MSG, LEN) \
+{ if (soap)\
+  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
+      soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\
+    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
+    { fwrite((MSG), 1, (LEN), soap->fdebug[SOAP_INDEX_##DBGFILE]);\
+      fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\
+    }\
+  }\
+}
+# endif
+# ifndef DGBFUN
+#  define DBGFUN(FNAME) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s()\n", __FILE__, __LINE__, FNAME))
+#  define DBGFUN1(FNAME, FMT, ARG) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT")\n", __FILE__, __LINE__, FNAME, (ARG)))
+#  define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2)))
+#  define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2", "FMT3")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2), (ARG3)))
+# endif
+# ifndef DBGHEX
+#  define DBGHEX(DBGFILE, MSG, LEN) \
+{ if (soap)\
+  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
+      soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\
+    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
+    { int i; char *s;\
+      for (s = (char*)(MSG), i = (LEN); i; i--)\
+        fprintf(soap->fdebug[SOAP_INDEX_##DBGFILE], "%2.2hhX  ", *s++);\
+      fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\
+    }\
+  }\
+}
+# endif
+#else
+# define DBGLOG(DBGFILE, CMD)
+# define DBGMSG(DBGFILE, MSG, LEN)
+# define DBGFUN(FNAME)
+# define DBGFUN1(FNAME, FMT, ARG)
+# define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2)
+# define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3)
+# define DBGHEX(DBGFILE, MSG, LEN)
+#endif
+
+/* UCS-4 requires 32 bits (0-7FFFFFFF, the sign bit is used by gSOAP to distinguish XML entities) */
+typedef soap_int32 soap_wchar;
+
+/* namespace table row */
+struct Namespace
+{ const char *id;
+  const char *ns;
+  const char *in;
+  char *out;
+};
+
+/* namespace stack */
+struct soap_nlist
+{ struct soap_nlist *next;
+  unsigned int level; /* nesting depth level */
+  short index; /* corresponding entry in ns mapping table */
+  char *ns; /* only set when parsed ns URI is not in the ns mapping table */
+  char id[1]; /* the actual string value flows into the allocated region below this struct */
+};
+
+/* block stack for nested block allocations */
+struct soap_blist
+{ struct soap_blist *next;
+  char *ptr;
+  size_t size;
+};
+
+/* array layout */
+struct soap_array
+{ void *__ptr;
+  int __size;
+};
+
+/* pointer serialization management */
+struct soap_plist
+{ struct soap_plist *next;
+  const void *ptr;
+  const struct soap_array *array;
+  int type;
+  int id;
+  char mark1;
+  char mark2;
+};
+
+/* block allocation for pointer serialization management */
+struct soap_pblk
+{ struct soap_pblk *next;
+  struct soap_plist plist[SOAP_PTRBLK];
+};
+
+#ifdef SOAP_DEBUG
+/* malloc/free tracking for debugging */
+struct soap_mlist
+{ struct soap_mlist *next;
+  const void *ptr;
+  const char *file;
+  int line;
+  short live;
+};
+#endif
+
+/* class allocation list */
+struct soap_clist
+{ struct soap_clist *next;
+  void *ptr;
+  int type;
+  int size;
+  void (*fdelete)(struct soap_clist*);
+};
+
+/* attributes */
+struct soap_attribute
+{ struct soap_attribute *next;
+  char *value;
+  size_t size;
+  char *ns;
+  short visible;
+  char name[1]; /* the actual name string flows into the allocated region below this struct */
+};
+
+struct soap_cookie
+{ struct soap_cookie *next;
+  char *name;
+  char *value;
+  char *domain;
+  char *path;
+  long expire;		/* client-side: local time to expire; server-side: seconds to expire */
+  unsigned int version;
+  short secure;
+  short session;	/* server-side */
+  short env;		/* server-side: got cookie from client and should not be (re)send */
+  short modified;	/* server-side: client cookie was modified and should be send */
+};
+
+#ifdef __cplusplus
+SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*);
+
+class soap_multipart_iterator
+{ public:
+  struct soap_multipart *content;
+  bool operator==(const soap_multipart_iterator& iter) const
+    { return content == iter.content; }
+  bool operator!=(const soap_multipart_iterator& iter) const
+    { return content != iter.content; }
+  struct soap_multipart &operator*() const
+    { return *content; }
+  soap_multipart_iterator &operator++()
+    { content = soap_next_multipart(content); return *this; }
+  soap_multipart_iterator() : content(NULL)
+    { }
+  soap_multipart_iterator(struct soap_multipart *p) : content(p)
+    { }
+};
+#endif
+
+#ifndef WITH_LEANER
+struct soap_dime
+{ size_t count;
+  size_t size;
+  size_t chunksize;
+  size_t buflen;
+  char flags;
+  char *ptr;
+  const char *id;
+  const char *type;
+  const char *options;
+  struct soap_multipart *list;		/* list of DIME attachments received */
+  struct soap_multipart *first, *last;	/* temporary in/out queue */
+#ifdef __cplusplus
+  soap_multipart_iterator begin()
+    { soap_multipart_iterator iter(list); return iter; };
+  soap_multipart_iterator end()
+    { soap_multipart_iterator iter(NULL); return iter; };
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+struct soap_mime
+{ char *boundary;			/* MIME boundary */
+  const char *start;			/* MIME start ID */
+  struct soap_multipart *list;		/* list of MIME attachments received */
+  struct soap_multipart *first, *last;	/* temporary in/out queue */
+#ifdef __cplusplus
+  soap_multipart_iterator begin()
+    { soap_multipart_iterator iter(list); return iter; };
+  soap_multipart_iterator end()
+    { soap_multipart_iterator iter(NULL); return iter; };
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+/* RFC2045 MIME content transfer encodings */
+enum soap_mime_encoding
+{ SOAP_MIME_NONE,
+  SOAP_MIME_7BIT,
+  SOAP_MIME_8BIT,
+  SOAP_MIME_BINARY,
+  SOAP_MIME_QUOTED_PRINTABLE,
+  SOAP_MIME_BASE64,
+  SOAP_MIME_IETF_TOKEN,
+  SOAP_MIME_X_TOKEN
+};
+#endif
+
+#ifndef WITH_LEANER
+/* DIME/MIME multipart list */
+struct soap_multipart
+{ struct soap_multipart *next;
+  char *ptr;				/* points to raw data content */
+  size_t size;				/* size of data content */
+  const char *id;			/* DIME/MIME content ID or form data name */
+  const char *type;			/* DIME/MIME type (MIME type format) */
+  const char *options;			/* DIME options */
+  enum soap_mime_encoding encoding;	/* MIME Content-Transfer-Encoding */
+  const char *location;			/* MIME Content-Location (optional) */
+  const char *description;		/* MIME Content-Description (optional) */
+#ifdef __cplusplus
+  typedef soap_multipart_iterator iterator;
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+/* attachment DIME and MTOM XOP forwarding */
+struct soap_xlist
+{ struct soap_xlist *next;
+  unsigned char **ptr;
+  int *size;
+  char *id;
+  char **type;
+  char **options;
+};
+#endif
+
+/******************************************************************************/
+
+#ifndef WITH_LEANER
+#ifdef __cplusplus
+class soap_dom_attribute_iterator
+{ public:
+  struct soap_dom_attribute *att;
+  const char *nstr;
+  const char *name;
+  bool operator==(const soap_dom_attribute_iterator&) const;
+  bool operator!=(const soap_dom_attribute_iterator&) const;
+  struct soap_dom_attribute &operator*() const;
+  soap_dom_attribute_iterator &operator++();
+  soap_dom_attribute_iterator();
+  soap_dom_attribute_iterator(struct soap_dom_attribute*);
+  ~soap_dom_attribute_iterator();
+};
+#endif
+#endif
+
+#ifndef WITH_LEANER
+struct soap_dom_attribute
+{ struct soap_dom_attribute *next;
+  const char *nstr;
+  char *name;
+  char *data;
+  wchar_t *wide;
+  struct soap *soap;
+#ifdef __cplusplus
+  typedef soap_dom_attribute_iterator iterator;
+  struct soap_dom_attribute &set(const char *nstr, const char *name);	/* set namespace and name */
+  struct soap_dom_attribute &set(const char *data);		/* set data */
+  soap_dom_attribute_iterator begin();
+  soap_dom_attribute_iterator end();
+  soap_dom_attribute_iterator find(const char *nstr, const char *name);
+  void unlink();
+  soap_dom_attribute();
+  soap_dom_attribute(struct soap *soap);
+  soap_dom_attribute(struct soap *soap, const char *nstr, const char *name, const char *data);
+  ~soap_dom_attribute();
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+#ifdef __cplusplus
+class soap_dom_element_iterator
+{ public:
+  struct soap_dom_element *elt;
+  const char *nstr;
+  const char *name;
+  int type;
+  bool operator==(const soap_dom_element_iterator&) const;
+  bool operator!=(const soap_dom_element_iterator&) const;
+  struct soap_dom_element &operator*() const;
+  soap_dom_element_iterator &operator++();
+  soap_dom_element_iterator();
+  soap_dom_element_iterator(struct soap_dom_element*);
+  ~soap_dom_element_iterator();
+};
+#endif
+#endif
+
+#ifndef WITH_LEANER
+struct soap_dom_element
+{ struct soap_dom_element *next;	/* next sibling */
+  struct soap_dom_element *prnt;	/* parent */
+  struct soap_dom_element *elts;	/* list of child elements */
+  struct soap_dom_attribute *atts;	/* list of attributes */
+  const char *nstr;			/* namespace string */
+  char *name;				/* element tag name */
+  char *data;				/* element content data (with SOAP_C_UTFSTRING flag set) */
+  wchar_t *wide;			/* element content data */
+  int type;				/* optional: serialized C/C++ data type */
+  void *node;				/* optional: pointer to serialized C/C++ data */
+  char *head;				/* leading whitespace to start tag */
+  char *tail;				/* leading whitespace to end tag */
+  struct soap *soap;			/* soap context that manages this node */
+#ifdef __cplusplus
+  typedef soap_dom_element_iterator iterator;
+  struct soap_dom_element &set(const char *nstr, const char *name);
+  struct soap_dom_element &set(const char *data);
+  struct soap_dom_element &set(void *node, int type);
+  struct soap_dom_element &add(struct soap_dom_element*);
+  struct soap_dom_element &add(struct soap_dom_element&);
+  struct soap_dom_element &add(struct soap_dom_attribute*);
+  struct soap_dom_element &add(struct soap_dom_attribute&);
+  soap_dom_element_iterator begin();
+  soap_dom_element_iterator end();
+  soap_dom_element_iterator find(const char *nstr, const char *name);
+  soap_dom_element_iterator find(int type);
+  void unlink();
+  soap_dom_element();
+  soap_dom_element(struct soap *soap);
+  soap_dom_element(struct soap *soap, const char *nstr, const char *name);
+  soap_dom_element(struct soap *soap, const char *nstr, const char *name, const char *data);
+  soap_dom_element(struct soap *soap, const char *nstr, const char *name, void *node, int type);
+  ~soap_dom_element();
+#endif
+};
+SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_dom_next_element(struct soap_dom_element *elt);
+SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_dom_next_attribute(struct soap_dom_attribute *att);
+#endif
+
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+}
+extern std::ostream &operator<<(std::ostream&, const struct soap_dom_element&);
+extern std::istream &operator>>(std::istream&, struct soap_dom_element&);
+extern "C" {
+#endif
+
+/******************************************************************************/
+
+struct soap
+{ short state;			/* 0 = uninitialized, 1 = initialized, 2 = copy of another soap struct */
+  short version;		/* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table) */
+  soap_mode mode;
+  soap_mode imode;
+  soap_mode omode;
+  const char *float_format;	/* user-definable format string for floats (<1024 chars) */
+  const char *double_format;	/* user-definable format string for doubles (<1024 chars) */
+  const char *dime_id_format;	/* user-definable format string for integer DIME id (<SOAP_TAGLEN chars) */
+  const char *http_version;	/* HTTP version used "1.0" or "1.1" */
+  const char *http_content;	/* optional custom response content type (with SOAP_FILE) */
+  const char *encodingStyle;	/* default = NULL which means that SOAP encoding is used */
+  const char *actor;		/* SOAP-ENV:actor or role attribute value */
+  int recv_timeout;		/* when > 0, gives socket recv timeout in seconds, < 0 in usec */
+  int send_timeout;		/* when > 0, gives socket send timeout in seconds, < 0 in usec */
+  int connect_timeout;		/* when > 0, gives socket connect() timeout in seconds, < 0 in usec */
+  int accept_timeout;		/* when > 0, gives socket accept() timeout in seconds, < 0 in usec */
+  int socket_flags;		/* socket recv() and send() flags, e.g. set to MSG_NOSIGNAL to disable sigpipe */
+  int connect_flags;		/* connect() SOL_SOCKET sockopt flags, e.g. set to SO_DEBUG to debug socket */
+  int bind_flags;		/* bind() SOL_SOCKET sockopt flags, e.g. set to SO_REUSEADDR to enable reuse */
+  int accept_flags;		/* accept() SOL_SOCKET sockopt flags */
+  const struct Namespace *namespaces;	/* Pointer to global namespace mapping table */
+  struct Namespace *local_namespaces;	/* Local namespace mapping table */
+  struct soap_nlist *nlist;	/* namespace stack */
+  struct soap_blist *blist;	/* block allocation stack */
+  struct soap_clist *clist;	/* class instance allocation list */
+  void *alist;			/* memory allocation (malloc) list */
+  struct soap_ilist *iht[SOAP_IDHASH];
+  struct soap_plist *pht[SOAP_PTRHASH];
+  struct soap_pblk *pblk;	/* plist block allocation */
+  short pidx;			/* plist block allocation */
+  struct SOAP_ENV__Header *header;
+  struct SOAP_ENV__Fault *fault;
+  int idnum;
+  void *user;			/* to pass user-defined data */
+  struct soap_plugin *plugins;	/* linked list of plug-in data */
+  char *userid;			/* HTTP Basic authorization userid */
+  char *passwd;			/* HTTP Basic authorization passwd */
+  int (*fpost)(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
+  int (*fget)(struct soap*);
+  int (*fform)(struct soap*);
+  int (*fposthdr)(struct soap*, const char*, const char*);
+  int (*fresponse)(struct soap*, int, size_t);
+  int (*fparse)(struct soap*);
+  int (*fparsehdr)(struct soap*, const char*, const char*);
+  int (*fresolve)(struct soap*, const char*, struct in_addr* inaddr);
+  int (*fconnect)(struct soap*, const char*, const char*, int);
+  int (*fdisconnect)(struct soap*);
+  int (*fclosesocket)(struct soap*, SOAP_SOCKET);
+  int (*fshutdownsocket)(struct soap*, SOAP_SOCKET, int);
+  int (*fopen)(struct soap*, const char*, const char*, int);
+  int (*faccept)(struct soap*, int, struct sockaddr*, int *n);
+  int (*fclose)(struct soap*);
+  int (*fsend)(struct soap*, const char*, size_t);
+  size_t (*frecv)(struct soap*, char*, size_t);
+  int (*fpoll)(struct soap*);
+  void (*fseterror)(struct soap*, const char **c, const char **s);
+  int (*fignore)(struct soap*, const char*);
+  int (*fserveloop)(struct soap*);
+  void *(*fplugin)(struct soap*, const char*);
+#ifndef WITH_LEANER
+  int (*fprepareinit)(struct soap*);
+  int (*fpreparesend)(struct soap*, const char*, size_t);
+  int (*fpreparerecv)(struct soap*, const char*, size_t);
+  int (*fpreparefinal)(struct soap*);
+  void *(*fdimereadopen)(struct soap*, void*, const char*, const char*, const char*);
+  void *(*fdimewriteopen)(struct soap*, const char*, const char*, const char*);
+  void (*fdimereadclose)(struct soap*, void*);
+  void (*fdimewriteclose)(struct soap*, void*);
+  size_t (*fdimeread)(struct soap*, void*, char*, size_t);
+  int (*fdimewrite)(struct soap*, void*, const char*, size_t);
+#endif
+  int master;
+  int socket;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  std::ostream *os;
+  std::istream *is;
+#else
+  void *os;	/* preserve alignment */
+  void *is;	/* preserve alignment */
+#endif
+#ifndef UNDER_CE
+  int sendfd;
+  int recvfd;
+#else
+  FILE *sendfd;
+  FILE *recvfd;
+#endif
+#ifdef WIN32
+  char errorstr[256];	/* buf for FormatMessage() */
+#endif
+  size_t bufidx;	/* index in soap.buf[] */
+  size_t buflen;	/* length of soap.buf[] content */
+  soap_wchar ahead;	/* parser lookahead */
+  short cdata;		/* CDATA parser state */
+  short body;		/* parsed XML element has a body or not */
+  unsigned int level;	/* XML nesting level */
+  size_t count;		/* message length counter */
+  size_t length;	/* message length as set by HTTP header */
+#ifdef WITH_FAST
+  char *labbuf;		/* look-aside buffer */
+  size_t lablen;	/* look-aside buffer allocated length */
+  size_t labidx;	/* look-aside buffer index to available part */
+#endif
+  char buf[SOAP_BUFLEN];/* send and receive buffer */
+  char tmpbuf[1024];	/* in/output buffer for HTTP headers, simpleType values, attribute names, and DIME >=1024 bytes */
+  char msgbuf[1024];	/* output buffer for (error) messages <=1024 bytes */
+  char tag[SOAP_TAGLEN];
+  char id[SOAP_TAGLEN];
+  char href[SOAP_TAGLEN];
+  char type[SOAP_TAGLEN];
+  char arrayType[SOAP_TAGLEN];
+  char arraySize[SOAP_TAGLEN];
+  char arrayOffset[SOAP_TAGLEN];
+  short other;
+  short position;
+  int positions[SOAP_MAXDIMS];
+  short root;
+  struct soap_attribute *attributes;	/* attribute list */
+  short encoding;	/* when set, output encodingStyle */
+  short mustUnderstand;	/* a mustUnderstand element was parsed or is output */
+  short keep_alive;	/* connection should be kept open */
+  short null;		/* parsed XML is xsi:nil */
+  short ns;		/* when not set, output full xmlns bindings */
+  short part;		/* parsing state */
+  short alloced;
+  short peeked;
+  size_t chunksize;
+  size_t chunkbuflen;
+  char endpoint[SOAP_TAGLEN];
+  char path[SOAP_TAGLEN];
+  char host[SOAP_TAGLEN];
+  char *action;
+  char *authrealm;		/* HTTP authentication realm */
+  char *prolog;			/* XML declaration prolog */
+  unsigned long ip;		/* IP number */
+  int port;			/* port number */
+  unsigned int max_keep_alive;
+  const char *proxy_host;	/* Proxy Server host name */
+  int proxy_port;		/* Proxy Server port (default = 8080) */
+  const char *proxy_userid;	/* Proxy Authorization user name */
+  const char *proxy_passwd;	/* Proxy Authorization password */
+  int status;			/* -1 when request, else error code to be returned by server */
+  int error;
+  int errmode;
+  int errnum;
+#ifndef WITH_LEANER
+  struct soap_dom_element *dom;
+  struct soap_dime dime;
+  struct soap_mime mime;
+  struct soap_xlist *xlist;
+#endif
+#if !defined(WITH_LEAN) || defined(SOAP_DEBUG)
+  const char *logfile[SOAP_MAXLOGS];
+  FILE *fdebug[SOAP_MAXLOGS];
+  struct soap_mlist *mht[SOAP_PTRHASH];
+#endif
+#ifndef WITH_LEAN
+  const char *c14ninclude;
+  const char *c14nexclude;
+  struct soap_cookie *cookies;
+  const char *cookie_domain;
+  const char *cookie_path;
+  int cookie_max;
+#endif
+#ifndef WITH_NOIO
+#ifdef WITH_IPV6
+  struct sockaddr_storage peer;	/* IPv6: set by soap_accept and by UDP recv */
+#else
+  struct sockaddr_in peer;	/* IPv4: set by soap_connect/soap_accept and by UDP recv */
+#endif
+  size_t peerlen;
+#endif
+#ifdef WITH_OPENSSL
+  int (*fsslauth)(struct soap*);
+  int (*fsslverify)(int, X509_STORE_CTX*);
+  BIO *bio;
+  SSL *ssl;
+  SSL_CTX *ctx;
+  short require_server_auth;
+  short require_client_auth;
+  short rsa;			/* when set, use RSA instead of DH */
+  const char *keyfile;
+  const char *password;
+  const char *dhfile;
+  const char *cafile;
+  const char *capath;
+  const char *crlfile;
+  const char *randfile;
+  SSL_SESSION *session;
+  char session_host[SOAP_TAGLEN];
+  int session_port;
+#endif
+#ifdef WITH_ZLIB
+  short zlib_state;		/* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_INFLATE */
+  short zlib_in;		/* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */
+  short zlib_out;		/* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */
+  z_stream d_stream;		/* decompression stream */
+  char z_buf[SOAP_BUFLEN];	/* buffer */
+  size_t z_buflen;
+  unsigned short z_level;	/* compression level to be used (0=none, 1=fast to 9=best) */
+  uLong z_crc;			/* internal gzip crc */
+  float z_ratio_in;		/* detected compression ratio compressed_length/length of inbound message */
+  float z_ratio_out;		/* detected compression ratio compressed_length/length of outbound message */
+#endif
+#ifdef WMW_RPM_IO
+  void *rpmreqid;
+#endif
+#ifndef WITH_LEAN
+#ifdef __cplusplus
+  soap();
+  soap(soap_mode);
+  soap(soap_mode, soap_mode);
+  soap(struct soap&);
+  ~soap();
+#endif
+#endif
+};
+
+struct soap_code_map
+{ long code;
+  const char *string;
+};
+
+/* forwarding list */
+struct soap_flist
+{ struct soap_flist *next;
+  int type;
+  void *ptr;
+  unsigned int level;
+  size_t len;
+  void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t);
+};
+
+/* id-ref forwarding list */
+struct soap_ilist
+{ struct soap_ilist *next;
+  int type;
+  size_t size;
+  void *link;
+  void *copy;
+  struct soap_flist *flist;
+  void *ptr;
+  unsigned int level;
+  char id[1]; /* the actual id string value flows into the allocated region below this struct */
+};
+
+struct soap_plugin
+{ struct soap_plugin *next;
+  const char *id;
+  void *data;
+  int (*fcopy)(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src);
+  void (*fdelete)(struct soap *soap, struct soap_plugin *p); /* should delete fields of plugin only and not free(p) */
+};
+
+#ifndef WITH_NONAMESPACES
+extern SOAP_NMAC struct Namespace namespaces[];
+#endif
+
+#ifndef WITH_LEAN
+# define soap_get0(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx])
+# define soap_get1(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx++])
+#else
+soap_wchar soap_get0(struct soap*);
+soap_wchar soap_get1(struct soap*);
+#endif
+
+#define soap_revget1(soap) ((soap)->bufidx--)
+#define soap_unget(soap, c) ((soap)->ahead = c)
+#define soap_register_plugin(soap, plugin) soap_register_plugin_arg(soap, plugin, NULL)
+#define soap_imode(soap, n) ((soap)->mode = (soap)->imode = (n))
+#define soap_set_imode(soap, n) ((soap)->imode |= (n))
+#define soap_clr_imode(soap, n) ((soap)->imode &= ~(n))
+#define soap_omode(soap, n) ((soap)->mode = (soap)->omode = (n))
+#define soap_set_omode(soap, n) ((soap)->omode |= (n))
+#define soap_clr_omode(soap, n) ((soap)->omode &= ~(n))
+#define soap_set_mode(soap, n) ((soap)->imode |= (n), (soap)->omode |= (n))
+#define soap_clr_mode(soap, n) ((soap)->imode &= ~(n), (soap)->omode &= ~(n))
+#define soap_destroy(soap) soap_delete((soap), NULL)
+
+#ifdef HAVE_STRRCHR
+# define soap_strrchr(s, t) strrchr(s, t)
+#else
+ SOAP_FMAC1 char* SOAP_FMAC2 soap_strrchr(const char *s, int t);
+#endif
+
+#ifdef HAVE_STRTOL
+# define soap_strtol(s, t, b) strtol(s, t, b)
+#else
+ SOAP_FMAC1 long SOAP_FMAC2 soap_strtol(const char *s, char **t, int b);
+#endif
+
+#ifdef HAVE_STRTOUL
+# define soap_strtoul(s, t, b) strtoul(s, t, b)
+#else
+ SOAP_FMAC1 unsigned long SOAP_FMAC2 soap_strtoul(const char *s, char **t, int b);
+#endif
+
+#if defined(WITH_OPENSSL)
+# define soap_random soap_rand()
+SOAP_FMAC1 int SOAP_FMAC2 soap_rand();
+#elif defined(HAVE_RANDOM)
+# define soap_random (int)random()
+#else
+# define soap_random rand()
+#endif
+
+#ifdef WITH_NOIDREF
+# define soap_embedded(s, p, t) (0)
+# define soap_id_lookup(s, i, p, t, n, k) (p)
+# define soap_id_forward(s, h, p, len, st, tt, n, k, fc) (p)
+# define soap_reference(s, a, t) (1)
+# define soap_array_reference(s, p, a, n, t) (1)
+# define soap_embed(s, p, a, n, t, pp) (0)
+# define soap_embedded_id(s, i, p, t) (i)
+# define soap_is_embedded(s, p) (0)
+# define soap_is_single(s, p) (1)
+# define soap_lookup_type(s, i) (0)
+# define soap_getindependent(s) (0)
+# define soap_putindependent(s) (0)
+# define soap_getelement(s, n) (n)
+# define soap_putelement(s, p, t, i, n) (0)
+# define soap_markelement(s, p, n) (0)
+#endif
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_fault(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultcode(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultsubcode(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultstring(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultdetail(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_serializeheader(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putheader(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getheader(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_serializefault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putfault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getfault(struct soap*);
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_ssl_init();
+SOAP_FMAC1 int SOAP_FMAC2 soap_poll(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_connect_command(struct soap*, int, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_connect(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_bind(struct soap*, const char*, int, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_accept(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_accept(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_server_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_client_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_puthttphdr(struct soap*, int status, size_t count);
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_get_header_attribute(struct soap*, const char*, const char*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_key(char*, size_t, const char*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_val(char*, size_t, const char*);
+
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_hash(const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_endpoint(struct soap*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_flush_raw(struct soap*, const char*, size_t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_flush(struct soap*);
+SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_get(struct soap*);
+SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getchar(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_tag_cmp(const char*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_fault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault_subcode(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault_subcode(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_sender_error(struct soap*, const char*, const char*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_receiver_error(struct soap*, const char*, const char*, int);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_send_raw(struct soap*, const char*, size_t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_raw(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_send(struct soap*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_send2(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_send3(struct soap*, const char*, const char*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_pututf8(struct soap*, unsigned long);
+SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getutf8(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_putbase64(struct soap*, const unsigned char*, int);
+SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_getbase64(struct soap*, int*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_puthex(struct soap*, const unsigned char*, int);
+SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_gethex(struct soap*, int*);
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_xop_forward(struct soap*, unsigned char**, int*, char**, char**, char**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_dime_forward(struct soap*, unsigned char**, int*, char**, char**, char**);
+#endif
+
+#ifndef WITH_NOIDREF
+SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup_id(struct soap*, void *p, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup(struct soap*, const void *p, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_enter(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_array_pointer_lookup(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type);
+SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_lookup(struct soap*, const char*);
+SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_enter(struct soap*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_resolve(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_embedded(struct soap*, const void *p, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_reference(struct soap*, const void *p, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_array_reference(struct soap*, const void *p, const struct soap_array *a, int n, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_embedded_id(struct soap*, int id, const void *p, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_is_embedded(struct soap*, struct soap_plist*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_is_single(struct soap*, struct soap_plist*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_embedded(struct soap*, struct soap_plist*);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_begin_count(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_end_count(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_begin_send(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_end_send(struct soap*);
+
+SOAP_FMAC1 const struct soap_code_map* SOAP_FMAC2 soap_code(const struct soap_code_map*, const char *str);
+SOAP_FMAC1 long SOAP_FMAC2 soap_int_code(const struct soap_code_map*, const char *str, long other);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_str_code(const struct soap_code_map*, long code);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_getline(struct soap*, char*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_begin_recv(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_end_recv(struct soap*);
+
+SOAP_FMAC1 void* SOAP_FMAC2 soap_malloc(struct soap*, size_t);
+SOAP_FMAC1 void SOAP_FMAC2 soap_dealloc(struct soap*, void*);
+SOAP_FMAC1 struct soap_clist * SOAP_FMAC2 soap_link(struct soap*, void*, int, int, void (*fdelete)(struct soap_clist*));
+SOAP_FMAC1 void SOAP_FMAC2 soap_unlink(struct soap*, const void*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_free(struct soap*);
+
+SOAP_FMAC1 void* SOAP_FMAC2 soap_track_malloc(struct soap*, const char*, int, size_t);
+SOAP_FMAC1 void SOAP_FMAC2 soap_track_free(struct soap*, const char*, int, void*);
+
+#ifndef WITH_NOIDREF
+SOAP_FMAC1 int SOAP_FMAC2 soap_lookup_type(struct soap*, const char *id);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_id_lookup(struct soap*, const char *id, void **p, int t, size_t n, unsigned int k);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_id_forward(struct soap*, const char *id, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void(*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t));
+#endif
+SOAP_FMAC1 void* SOAP_FMAC2 soap_id_enter(struct soap*, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*));
+SOAP_FMAC1 void SOAP_FMAC2 soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t, const void *q, size_t n);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_size(const int *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getoffsets(const char *, const int *, int *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getsize(const char *, const char *, int *);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getsizes(const char *, int *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getposition(const char *, int *);
+
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putsize(struct soap*, const char *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizesoffsets(struct soap*, const char *, const int *, const int *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizes(struct soap*, const char *, const int *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffset(struct soap*, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffsets(struct soap*, const int *, int);
+ 
+SOAP_FMAC1 int SOAP_FMAC2 soap_closesock(struct soap*);
+
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new(void);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new1(soap_mode);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new2(soap_mode, soap_mode);
+SOAP_FMAC1 void SOAP_FMAC2 soap_del(struct soap*);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy(struct soap*);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy_context(struct soap*, struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_init(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_init1(struct soap*, soap_mode);
+SOAP_FMAC1 void SOAP_FMAC2 soap_init2(struct soap*, soap_mode, soap_mode);
+SOAP_FMAC1 void SOAP_FMAC2 soap_done(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_cleanup(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_begin(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_end(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_delete(struct soap*, void*);
+
+#ifdef SOAP_DEBUG
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_recv_logfile(struct soap*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_sent_logfile(struct soap*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_test_logfile(struct soap*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_close_logfiles(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_open_logfile(struct soap*, int);
+#endif
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_token(struct soap*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_value(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_match_tag(struct soap*, const char*, const char *);
+SOAP_FMAC1 int SOAP_FMAC2 soap_match_array(struct soap*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_element(struct soap*, const char*, int, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_out(struct soap*, const char *tag, int id, const char *type);
+SOAP_FMAC1 int SOAP_FMAC2 soap_array_begin_out(struct soap*, const char *tag, int id, const char *type, const char *offset);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_ref(struct soap*, const char *tag, int id, int href);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_href(struct soap*, const char *tag, int id, const char *ref, const char *val);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_null(struct soap*, const char *tag, int id, const char *type);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_id(struct soap*, const char *tag, int id, const void *p, const struct soap_array *a, int d, const char *type, int n);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_result(struct soap*, const char *tag);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_out(struct soap*, const char *tag);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_start_end_out(struct soap*, const char *tag);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_attribute(struct soap*, const char*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_in(struct soap*, const char *tag, int nillable);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_in(struct soap*, const char *tag);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_peek_element(struct soap*);
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_retry(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_revert(struct soap*);
+
+SOAP_FMAC1 char* SOAP_FMAC2 soap_strdup(struct soap*, const char*);
+SOAP_FMAC1 const char * SOAP_FMAC2 soap_strsearch(const char *big, const char *little);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_string_out(struct soap*, const char *s, int flag);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_string_in(struct soap*, int, long, long);
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_wstring_out(struct soap*, const wchar_t *s, int flag);
+SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstring_in(struct soap*, int, long, long);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_match_namespace(struct soap*, const char *, const char*, int n1, int n2);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_namespaces(struct soap*, struct Namespace*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_local_namespaces(struct soap*);
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_pop_namespace(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_push_namespace(struct soap*, const char *,const char *);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_current_namespace(struct soap *soap, const char *tag);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_store_lab(struct soap*, const char*, size_t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_append_lab(struct soap*, const char*, size_t);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_new_block(struct soap*);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_push_block(struct soap*, size_t);
+SOAP_FMAC1 void SOAP_FMAC2 soap_pop_block(struct soap*);
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_size_block(struct soap*, size_t);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_first_block(struct soap*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_next_block(struct soap*);
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_block_size(struct soap*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_save_block(struct soap*, char*, int);
+SOAP_FMAC1 void SOAP_FMAC2 soap_end_block(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_out(struct soap*);
+SOAP_FMAC1 int soap_envelope_end_out(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_in(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_end_in(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_out(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_out(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_in(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_in(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_header(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_response(struct soap*, int);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_send_empty_response(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_empty_response(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_send_fault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_fault(struct soap*);
+
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault(struct soap*, FILE*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault_location(struct soap*, FILE*);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2byte(struct soap*, const char*, char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2short(struct soap*, const char*, short*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2int(struct soap*, const char*, int*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2long(struct soap*, const char*, long*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2LONG64(struct soap*, const char*, LONG64*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2float(struct soap*, const char*, float*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2double(struct soap*, const char*, double*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedByte(struct soap*, const char*, unsigned char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedShort(struct soap*, const char*, unsigned short*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedInt(struct soap*, const char*, unsigned int*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedLong(struct soap*, const char*, unsigned long*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2ULONG64(struct soap*, const char*, ULONG64*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2string(struct soap*, const char*, char**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2QName(struct soap*, const char*, char**);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2wchar(struct soap*, const char*, wchar_t**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2dateTime(struct soap*, const char*, time_t*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_s2base64(struct soap*, const unsigned char*, char*, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_s2hex(struct soap*, const unsigned char*, char*, int);
+#endif
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_byte2s(struct soap*, char);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_short2s(struct soap*, short);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_int2s(struct soap*, int);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_long2s(struct soap*, long);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_LONG642s(struct soap*, LONG64);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_float2s(struct soap*, float);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_double2s(struct soap*, double);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedByte2s(struct soap*, unsigned char);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedShort2s(struct soap*, unsigned short);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedInt2s(struct soap*, unsigned int);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedLong2s(struct soap*, unsigned long);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_ULONG642s(struct soap*, ULONG64);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_QName2s(struct soap*, const char*);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_wchar2s(struct soap*, const wchar_t*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_dateTime2s(struct soap*, time_t);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_base642s(struct soap*, const char*, char*, size_t, int*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_hex2s(struct soap*, const char*, char*, size_t, int*);
+#endif
+
+
+SOAP_FMAC1 int* SOAP_FMAC2 soap_inint(struct soap*, const char *tag, int *p, const char *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_inbyte(struct soap*, const char *tag, char *p, const char *, int);
+SOAP_FMAC1 long* SOAP_FMAC2 soap_inlong(struct soap*, const char *tag, long *p, const char *, int);
+SOAP_FMAC1 LONG64* SOAP_FMAC2 soap_inLONG64(struct soap*, const char *tag, LONG64 *p, const char *, int);
+SOAP_FMAC1 short* SOAP_FMAC2 soap_inshort(struct soap*, const char *tag, short *p, const char *, int);
+SOAP_FMAC1 float* SOAP_FMAC2 soap_infloat(struct soap*, const char *tag, float *p, const char *, int);
+SOAP_FMAC1 double* SOAP_FMAC2 soap_indouble(struct soap*, const char *tag, double *p, const char *, int);
+SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_inunsignedByte(struct soap*, const char *tag, unsigned char *p, const char *, int);
+SOAP_FMAC1 unsigned short* SOAP_FMAC2 soap_inunsignedShort(struct soap*, const char *tag, unsigned short *p, const char *, int);
+SOAP_FMAC1 unsigned int* SOAP_FMAC2 soap_inunsignedInt(struct soap*, const char *tag, unsigned int *p, const char *, int);
+SOAP_FMAC1 unsigned long* SOAP_FMAC2 soap_inunsignedLong(struct soap*, const char *tag, unsigned long *p, const char *, int);
+SOAP_FMAC1 ULONG64* SOAP_FMAC2 soap_inULONG64(struct soap*, const char *tag, ULONG64 *p, const char *, int);
+SOAP_FMAC1 char** SOAP_FMAC2 soap_instring(struct soap*, const char *tag, char **p, const char *, int, int, long, long);
+SOAP_FMAC1 char** SOAP_FMAC2 soap_inliteral(struct soap*, const char *tag, char **p);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 time_t* SOAP_FMAC2 soap_indateTime(struct soap*, const char *tag, time_t *p, const char *, int);
+#endif
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwstring(struct soap*, const char *tag, wchar_t **p, const char *, int, long, long);
+SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwliteral(struct soap*, const char *tag, wchar_t **p);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_outbyte(struct soap*, const char *tag, int id, const char *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outshort(struct soap*, const char *tag, int id, const short *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outint(struct soap*, const char *tag, int id, const int *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outlong(struct soap*, const char *tag, int id, const long *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outLONG64(struct soap*, const char *tag, int id, const LONG64 *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outfloat(struct soap*, const char *tag, int id, const float *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outdouble(struct soap*, const char *tag, int id, const double *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedByte(struct soap*, const char *tag, int id, const unsigned char *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedShort(struct soap*, const char *tag, int id, const unsigned short *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedInt(struct soap*, const char *tag, int id, const unsigned int *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedLong(struct soap*, const char *tag, int id, const unsigned long *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outULONG64(struct soap*, const char *tag, int id, const ULONG64 *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outstring(struct soap*, const char *tag, int id, char *const*p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outliteral(struct soap*, const char *tag, char *const*p);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 int SOAP_FMAC2 soap_outdateTime(struct soap*, const char *tag, int id, const time_t *p, const char *, int);
+#endif
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_outwstring(struct soap*, const char *tag, int id, wchar_t *const*p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outwliteral(struct soap*, const char *tag, wchar_t *const*p);
+#endif
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_attachment(struct soap *, const char*, int, const void*, const struct soap_array*, const char*, const char*, const char*, int, const char*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_move(struct soap*, long);
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_tell(struct soap*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_dime_option(struct soap*, unsigned short, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getdimehdr(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getdime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putdimehdr(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putdime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getmimehdr(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getmime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putmimehdr(struct soap*, struct soap_multipart*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putmime(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_dime(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_mime(struct soap*, const char *boundary, const char *start);
+SOAP_FMAC1 void SOAP_FMAC2 soap_clr_dime(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_clr_mime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_dime_attachment(struct soap*, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_mime_attachment(struct soap*, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description);
+SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_register_plugin_arg(struct soap*, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void*);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_lookup_plugin(struct soap*, const char*);
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_attr_value(struct soap *soap, const char *name, int flag);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_attr(struct soap *soap, const char *name, const char *value);
+SOAP_FMAC1 void SOAP_FMAC2 soap_clr_attr(struct soap *soap);
+
+#ifdef WITH_COOKIES
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_encode_cookie(const char*, char*, size_t);
+SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_set_cookie(struct soap*, const char*, const char*, const char*, const char*);
+SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_cookie(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern char* SOAP_FMAC2 soap_cookie_value(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern char* SOAP_FMAC2 soap_env_cookie_value(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern long SOAP_FMAC2 soap_cookie_expire(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_expire(struct soap*, const char*, long, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_session(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_clr_cookie_session(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern void SOAP_FMAC2 soap_clr_cookie(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_getenv_cookies(struct soap*);
+SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_copy_cookies(struct soap*);
+SOAP_FMAC1 extern void SOAP_FMAC2 soap_free_cookies(struct soap*);
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif
+
diff --git a/samples/udp_VC/udp.h b/samples/udp_VC/udp.h
new file mode 100644
index 0000000..fc1cef8
--- /dev/null
+++ b/samples/udp_VC/udp.h
@@ -0,0 +1,107 @@
+/*
+
+udp.h
+
+SOAP-over-UDP demo specification for udpclient and udpserver examples
+
+Requires WS-Addressing from import/wsa.h
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Import WS-Addressing
+//
+////////////////////////////////////////////////////////////////////////////////
+
+//gsoap wsa schema import: http://schemas.xmlsoap.org/ws/2004/08/addressing
+
+#import "wsa.h"		// wsa.h is in the import directory
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Demo UDP service
+//
+////////////////////////////////////////////////////////////////////////////////
+
+//gsoap ns service name:	udp
+//gsoap ns service namespace:	urn:gsoap-udp-demo
+//gsoap ns service location:	soap.udp://localhost:10000
+
+//	I would assume UDP transport to be defined in the WSDL bindings, but
+//	this doesn't appear to be possible, so we will use the default HTTP
+//	transport binding and omit the transport directive below.
+//	gsoap ns service transport:	... ???
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	SOAP-over-UDP SOAP Headers with WS-Addressing
+//
+////////////////////////////////////////////////////////////////////////////////
+
+struct SOAP_ENV__Header
+{
+  mustUnderstand _wsa__MessageID      wsa__MessageID 0; ///< WS-Addressing
+  mustUnderstand _wsa__RelatesTo     *wsa__RelatesTo 0; ///< WS-Addressing
+  mustUnderstand _wsa__From          *wsa__From      0; ///< WS-Addressing
+  mustUnderstand _wsa__ReplyTo       *wsa__ReplyTo   0; ///< WS-Addressing
+  mustUnderstand _wsa__FaultTo       *wsa__FaultTo   0; ///< WS-Addressing
+  mustUnderstand _wsa__To             wsa__To        0; ///< WS-Addressing
+  mustUnderstand _wsa__Action         wsa__Action    0; ///< WS-Addressing
+};
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	echoString (anonymous) request-response MEP over UDP
+//
+////////////////////////////////////////////////////////////////////////////////
+
+//gsoap ns service method-documentation: echoString Demo (anonymous) request-response MEP over UDP
+
+//gsoap ns service method-header-part:		echoString wsa__MessageID
+//gsoap ns service method-header-part:		echoString wsa__To
+//gsoap ns service method-header-part:		echoString wsa__Action
+//gsoap ns service method-input-header-part:	sendString wsa__ReplyTo
+//gsoap ns service method-output-header-part:	echoString wsa__RelatesTo
+
+int ns__echoString(char *str, char **res);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	sendString one-way MEP over UDP
+//
+////////////////////////////////////////////////////////////////////////////////
+
+//gsoap ns service method-documentation: sendString Demo one-way MEP over UDP
+
+//gsoap ns service method-header-part:		sendString wsa__MessageID
+//gsoap ns service method-header-part:		sendString wsa__To
+//gsoap ns service method-header-part:		sendString wsa__Action
+
+int ns__sendString(char *str, void);
diff --git a/samples/udp_VC/udpclient.cpp b/samples/udp_VC/udpclient.cpp
new file mode 100644
index 0000000..c475244
--- /dev/null
+++ b/samples/udp_VC/udpclient.cpp
@@ -0,0 +1,110 @@
+/*
+
+udpclient.c
+
+SOAP-over-UDP demo client
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "soapH.h"
+#include "udp.nsmap"
+
+int main(int argc, char **argv)
+{ struct soap soap;
+  struct SOAP_ENV__Header header;
+  struct wsa__EndpointReferenceType replyTo;
+  char *res;
+  char *mid1 = "id1";
+  char *mid2 = "id2";
+
+  if (argc > 1)
+    mid1 = argv[1];
+  if (argc > 2)
+    mid2 = argv[2];
+
+  soap_init(&soap);
+
+  soap.send_timeout = 1;
+  soap.recv_timeout = 1;
+
+  /* To compress the request message (compile with -DWITH_GZIP):
+  soap_set_omode(&soap, SOAP_ENC_ZLIB);
+  */
+
+  /* To transmit DIME attachments:
+  soap_set_dime(&soap);
+  soap_set_dime_attachment(&soap, "abc", 3, "cid:abc", "text/xml", 0, NULL);
+  */
+
+  /* To transmit MIME attachments:
+  soap_set_mime(&soap, NULL, NULL);
+  soap_set_mime_attachment(&soap, "abc", 3, SOAP_MIME_7BIT, "text/xml", "cid:abc", NULL, NULL);
+  */
+
+  /* Prepare SOAP Header */
+  soap_default_SOAP_ENV__Header(&soap, &header);
+  soap.header = &header;
+
+  soap_default_wsa__EndpointReferenceType(&soap, &replyTo);
+  replyTo.Address = "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous";
+
+  /* Set WS-Addressing elements for request-response unicast */
+  header.wsa__MessageID = mid1;
+  header.wsa__To = "http://genivia.com/udp/server";
+  header.wsa__Action = "http://genivia.com/udp/echoString";
+  header.wsa__ReplyTo = &replyTo;
+
+  /* Make request-response call */
+  if (soap_call_ns__echoString(&soap, NULL, NULL, "hello world!", &res))
+  { if (soap.error == SOAP_EOF && soap.errnum == 0)
+      printf("Timeout: message probably already delivered\n");
+    else
+      soap_print_fault(&soap, stderr);
+  }
+  else
+    printf("UDP server response: %s\n", res);
+
+  /* Reset the SOAP Header */
+  soap_default_SOAP_ENV__Header(&soap, &header);
+  soap.header = &header;
+
+  /* Set WS-Addressing elements for one-way unicast */
+  header.wsa__MessageID = mid2;
+  header.wsa__To = "http://genivia.com/udp/server";
+  header.wsa__Action = "http://genivia.com/udp/sendString";
+
+  /* Send one-way message */
+  if (soap_send_ns__sendString(&soap, NULL, NULL, "hello world!"))
+    soap_print_fault(&soap, stderr);
+
+  soap_end(&soap);
+  soap_done(&soap);
+
+  return 0;
+}
diff --git a/samples/udp_VC/udpclient.sln b/samples/udp_VC/udpclient.sln
new file mode 100644
index 0000000..da4b313
--- /dev/null
+++ b/samples/udp_VC/udpclient.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "udpclient", "udpclient.vcproj", "{F647213F-3197-4C80-8A41-3FB59AEE5D43}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{F647213F-3197-4C80-8A41-3FB59AEE5D43}.Debug|Win32.ActiveCfg = Debug|Win32
+		{F647213F-3197-4C80-8A41-3FB59AEE5D43}.Debug|Win32.Build.0 = Debug|Win32
+		{F647213F-3197-4C80-8A41-3FB59AEE5D43}.Release|Win32.ActiveCfg = Release|Win32
+		{F647213F-3197-4C80-8A41-3FB59AEE5D43}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/samples/udp_VC/udpclient.vcproj b/samples/udp_VC/udpclient.vcproj
new file mode 100644
index 0000000..d2dbbf1
--- /dev/null
+++ b/samples/udp_VC/udpclient.vcproj
@@ -0,0 +1,329 @@
+<?xml version="1.0" encoding="Windows-1252"?>

+<VisualStudioProject

+	ProjectType="Visual C++"

+	Version="8.00"

+	Name="udpclient"

+	ProjectGUID="{F647213F-3197-4C80-8A41-3FB59AEE5D43}"

+	RootNamespace="udpclient"

+	Keyword="Win32Proj"

+	>

+	<Platforms>

+		<Platform

+			Name="Win32"

+		/>

+	</Platforms>

+	<ToolFiles>

+	</ToolFiles>

+	<Configurations>

+		<Configuration

+			Name="Debug|Win32"

+			OutputDirectory=".\DebugClient"

+			IntermediateDirectory=".\DebugClient"

+			ConfigurationType="1"

+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"

+			UseOfMFC="0"

+			ATLMinimizesCRunTimeLibraryUsage="false"

+			CharacterSet="2"

+			>

+			<Tool

+				Name="VCPreBuildEventTool"

+			/>

+			<Tool

+				Name="VCCustomBuildTool"

+			/>

+			<Tool

+				Name="VCXMLDataGeneratorTool"

+			/>

+			<Tool

+				Name="VCWebServiceProxyGeneratorTool"

+			/>

+			<Tool

+				Name="VCMIDLTool"

+				TypeLibraryName=".\DebugClient/udpclient.tlb"

+				HeaderFileName=""

+			/>

+			<Tool

+				Name="VCCLCompilerTool"

+				 

+				AdditionalIncludeDirectories=""

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;WIN32;_DEBUG;_CONSOLE;WITH_NOHTTP;WITH_UDP"

+				 

+				 

+				 

+				PrecompiledHeaderFile=".\DebugClient/udpclient.pch"

+				AssemblerListingLocation=".\DebugClient/"

+				ObjectFile=".\DebugClient/"

+				ProgramDataBaseFileName=".\DebugClient/"

+				 

+				SuppressStartupBanner="true"

+				 

+			/>

+			<Tool

+				Name="VCManagedResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCResourceCompilerTool"

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;_DEBUG"

+				Culture="1033"

+			/>

+			<Tool

+				Name="VCPreLinkEventTool"

+			/>

+			<Tool

+				Name="VCLinkerTool"

+				AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib"

+				OutputFile=".\DebugClient/udpclient.exe"

+				 

+				SuppressStartupBanner="true"

+				

+				ProgramDatabaseFile=".\DebugClient/udpclient.pdb"

+				SubSystem="1"

+				TargetMachine="1"

+			/>

+			<Tool

+				Name="VCALinkTool"

+			/>

+			<Tool

+				Name="VCManifestTool"

+			/>

+			<Tool

+				Name="VCXDCMakeTool"

+			/>

+			<Tool

+				Name="VCBscMakeTool"

+				SuppressStartupBanner="true"

+				OutputFile=".\DebugClient/udpclient.bsc"

+			/>

+			<Tool

+				Name="VCFxCopTool"

+			/>

+			<Tool

+				Name="VCAppVerifierTool"

+			/>

+			<Tool

+				Name="VCWebDeploymentTool"

+			/>

+			<Tool

+				Name="VCPostBuildEventTool"

+			/>

+		</Configuration>

+		<Configuration

+			Name="Release|Win32"

+			OutputDirectory=".\ReleaseClient"

+			IntermediateDirectory=".\ReleaseClient"

+			ConfigurationType="1"

+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"

+			UseOfMFC="0"

+			ATLMinimizesCRunTimeLibraryUsage="false"

+			CharacterSet="2"

+			>

+			<Tool

+				Name="VCPreBuildEventTool"

+			/>

+			<Tool

+				Name="VCCustomBuildTool"

+			/>

+			<Tool

+				Name="VCXMLDataGeneratorTool"

+			/>

+			<Tool

+				Name="VCWebServiceProxyGeneratorTool"

+			/>

+			<Tool

+				Name="VCMIDLTool"

+				TypeLibraryName=".\ReleaseClient/udpclient.tlb"

+				HeaderFileName=""

+			/>

+			<Tool

+				Name="VCCLCompilerTool"

+				 

+				InlineFunctionExpansion="1"

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;WIN32;NDEBUG;_CONSOLE"

+				StringPooling="true"

+				 

+				 

+				PrecompiledHeaderFile=".\ReleaseClient/udpclient.pch"

+				AssemblerListingLocation=".\ReleaseClient/"

+				ObjectFile=".\ReleaseClient/"

+				ProgramDataBaseFileName=".\ReleaseClient/"

+				 

+				SuppressStartupBanner="true"

+			/>

+			<Tool

+				Name="VCManagedResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCResourceCompilerTool"

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;NDEBUG"

+				Culture="1033"

+			/>

+			<Tool

+				Name="VCPreLinkEventTool"

+			/>

+			<Tool

+				Name="VCLinkerTool"

+				OutputFile=".\ReleaseClient/udpclient.exe"

+				 

+				SuppressStartupBanner="true"

+				ProgramDatabaseFile=".\ReleaseClient/udpclient.pdb"

+				SubSystem="1"

+				TargetMachine="1"

+			/>

+			<Tool

+				Name="VCALinkTool"

+			/>

+			<Tool

+				Name="VCManifestTool"

+			/>

+			<Tool

+				Name="VCXDCMakeTool"

+			/>

+			<Tool

+				Name="VCBscMakeTool"

+				SuppressStartupBanner="true"

+				OutputFile=".\ReleaseClient/udpclient.bsc"

+			/>

+			<Tool

+				Name="VCFxCopTool"

+			/>

+			<Tool

+				Name="VCAppVerifierTool"

+			/>

+			<Tool

+				Name="VCWebDeploymentTool"

+			/>

+			<Tool

+				Name="VCPostBuildEventTool"

+			/>

+		</Configuration>

+	</Configurations>

+	<References>

+	</References>

+	<Files>

+		<Filter

+			Name="Source Files"

+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"

+			>

+			<File

+				RelativePath="soapC.cpp"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+				<FileConfiguration

+					Name="Release|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+			</File>

+			<File

+				RelativePath="soapClient.cpp"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+				<FileConfiguration

+					Name="Release|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+			</File>

+			<File

+				RelativePath="stdsoap2.cpp"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+				<FileConfiguration

+					Name="Release|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+			</File>

+			<File

+				RelativePath=".\udpclient.cpp"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						ObjectFile="$(IntDir)\$(InputName)1.obj"

+						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"

+					/>

+				</FileConfiguration>

+				<FileConfiguration

+					Name="Release|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						ObjectFile="$(IntDir)\$(InputName)1.obj"

+						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"

+					/>

+				</FileConfiguration>

+			</File>

+		</Filter>

+		<Filter

+			Name="Header Files"

+			Filter="h;hpp;hxx;hm;inl"

+			>

+			<File

+				RelativePath="soapH.h"

+				>

+			</File>

+			<File

+				RelativePath="soapStub.h"

+				>

+			</File>

+			<File

+				RelativePath="stdsoap2.h"

+				>

+			</File>

+			<File

+				RelativePath="udp.h"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCustomBuildTool"

+						Description="gSOAP Web service proxy/skeleton build on $(InputPath)"

+						CommandLine=".\soapcpp2.exe &quot;$(InputPath)&quot; -I\dev\third_party\gsoap-win32-2.7\import&#x0D;&#x0A;"

+						Outputs="soapStub.h soapH.h soapC.cpp soapClient.cpp"

+					/>

+				</FileConfiguration>

+			</File>

+		</Filter>

+		<Filter

+			Name="Resource Files"

+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"

+			>

+		</Filter>

+	</Files>

+	<Globals>

+	</Globals>

+</VisualStudioProject>

diff --git a/samples/udp_VC/udpserver.cpp b/samples/udp_VC/udpserver.cpp
new file mode 100644
index 0000000..a560bf8
--- /dev/null
+++ b/samples/udp_VC/udpserver.cpp
@@ -0,0 +1,143 @@
+/*
+
+udpserver.c
+
+SOAP-over-UDP demo server
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "soapH.h"
+#include "udp.nsmap"
+
+#define MAX_HISTORY (1000)
+
+char *received_id[MAX_HISTORY];
+int last_received;
+void init_received();
+int check_received(const char *id);
+
+int id_count = 1;
+
+int main()
+{ struct soap soap;
+  init_received();
+  soap_init1(&soap, SOAP_IO_UDP);
+  if (!soap_valid_socket(soap_bind(&soap, NULL, 10000, 100)))
+  { soap_print_fault(&soap, stderr);
+    exit(1);
+  }
+  for (;;)
+  { printf("Accepting requests...\n");
+    if (soap_serve(&soap))
+      soap_print_fault(&soap, stderr);
+    soap_end(&soap);
+  }
+  soap_done(&soap);
+  return 0;
+}
+
+void init_received()
+{ int i;
+  for (i = 0; i < MAX_HISTORY; i++)
+    received_id[i] = NULL;
+  last_received = 0;
+}
+
+int check_received(const char *id)
+{ int i;
+  if (!id)
+    return 1;
+  /* Check if Message ID already received */
+  for (i = 0; i < MAX_HISTORY; i++)
+  { if (received_id[i] && !strcmp(id, received_id[i]))
+      return 1;
+  }
+  if (received_id[last_received])
+    free(received_id[last_received]);
+  received_id[last_received++] = strdup(id);
+  /* Wrap to overwrite old IDs */
+  if (last_received >= MAX_HISTORY)
+    last_received = 0;
+  return 0;
+}
+
+int check_header(struct soap *soap)
+{ /* MUST have received a SOAP Header */
+  if (!soap->header)
+    return soap_sender_fault(soap, "No SOAP header", NULL);
+  /* ... with a Message ID */
+  if (!soap->header->wsa__MessageID)
+    return soap_sender_fault(soap, "No WS-Addressing MessageID", NULL);
+  soap->header->wsa__RelatesTo = (struct wsa__Relationship*)soap_malloc(soap, sizeof(struct wsa__Relationship));
+  soap_default_wsa__Relationship(soap, soap->header->wsa__RelatesTo);
+  soap->header->wsa__RelatesTo->__item = soap->header->wsa__MessageID;
+  return SOAP_OK;
+}
+
+int ns__echoString(struct soap *soap, char *str, char **res)
+{ /* Get Header info and setup response Header */
+  if (check_header(soap))
+  { printf("Malformed header\n");
+    return SOAP_FAULT; /* there was a problem */
+  }
+
+  /* If message with MessageID already received, ignore it */
+  if (check_received(soap->header->wsa__MessageID))
+  { printf("Request message %s already received\n", soap->header->wsa__MessageID);
+    return SOAP_STOP;
+  }
+
+  printf("Request message %s accepted\n", soap->header->wsa__MessageID);
+
+  /* Check ReplyTo has Address */
+  if (!soap->header->wsa__ReplyTo || !soap->header->wsa__ReplyTo->Address)
+    return soap_sender_fault(soap, "No WS-Addressing ReplyTo address", NULL);
+  /* Copy Header info into response Header */
+  soap->header->wsa__To = soap->header->wsa__ReplyTo->Address;
+
+  /* Add info to response Header */
+  soap->header->wsa__MessageID = soap_strdup(soap, soap_int2s(soap, id_count++));
+  soap->header->wsa__Action = "http://genivia.com/udp/echoStringResponse";
+
+  /* Copy request string into response string */
+  printf("Response message %s returned\n", soap->header->wsa__MessageID);
+  *res = str;
+
+  return SOAP_OK;
+}
+
+int ns__sendString(struct soap *soap, char *str)
+{ if (check_header(soap))
+    printf("Malformed header\n");
+  else if (check_received(soap->header->wsa__MessageID))
+    printf("One-way message %s already received\n", soap->header->wsa__MessageID);
+  else
+    printf("One-way message %s accepted and serviced\n", soap->header->wsa__MessageID);
+  return SOAP_OK;
+}
diff --git a/samples/udp_VC/udpserver.sln b/samples/udp_VC/udpserver.sln
new file mode 100644
index 0000000..9db9bf4
--- /dev/null
+++ b/samples/udp_VC/udpserver.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "udpserver", "udpserver.vcproj", "{12450B59-BDCC-41F0-ABDD-4C7517BE690D}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{12450B59-BDCC-41F0-ABDD-4C7517BE690D}.Debug|Win32.ActiveCfg = Debug|Win32
+		{12450B59-BDCC-41F0-ABDD-4C7517BE690D}.Debug|Win32.Build.0 = Debug|Win32
+		{12450B59-BDCC-41F0-ABDD-4C7517BE690D}.Release|Win32.ActiveCfg = Release|Win32
+		{12450B59-BDCC-41F0-ABDD-4C7517BE690D}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/samples/udp_VC/udpserver.vcproj b/samples/udp_VC/udpserver.vcproj
new file mode 100644
index 0000000..e2c0138
--- /dev/null
+++ b/samples/udp_VC/udpserver.vcproj
@@ -0,0 +1,312 @@
+<?xml version="1.0" encoding="Windows-1252"?>

+<VisualStudioProject

+	ProjectType="Visual C++"

+	Version="8.00"

+	Name="udpserver"

+	ProjectGUID="{12450B59-BDCC-41F0-ABDD-4C7517BE690D}"

+	RootNamespace="udpserver"

+	Keyword="Win32Proj"

+	>

+	<Platforms>

+		<Platform

+			Name="Win32"

+		/>

+	</Platforms>

+	<ToolFiles>

+	</ToolFiles>

+	<Configurations>

+		<Configuration

+			Name="Debug|Win32"

+			OutputDirectory=".\DebugServer"

+			IntermediateDirectory=".\DebugServer"

+			ConfigurationType="1"

+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"

+			UseOfMFC="0"

+			ATLMinimizesCRunTimeLibraryUsage="false"

+			CharacterSet="2"

+			>

+			<Tool

+				Name="VCPreBuildEventTool"

+			/>

+			<Tool

+				Name="VCCustomBuildTool"

+			/>

+			<Tool

+				Name="VCXMLDataGeneratorTool"

+			/>

+			<Tool

+				Name="VCWebServiceProxyGeneratorTool"

+			/>

+			<Tool

+				Name="VCMIDLTool"

+				TypeLibraryName=".\DebugServer/udpserver.tlb"

+				HeaderFileName=""

+			/>

+			<Tool

+				Name="VCCLCompilerTool"

+				 

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;WIN32;_DEBUG;_CONSOLE;WITH_NOHTTP;WITH_UDP"

+				 

+				 

+				 

+				PrecompiledHeaderFile=".\DebugServer/udpserver.pch"

+				AssemblerListingLocation=".\DebugServer/"

+				ObjectFile=".\DebugServer/"

+				ProgramDataBaseFileName=".\DebugServer/"

+				 

+				SuppressStartupBanner="true"

+				 

+			/>

+			<Tool

+				Name="VCManagedResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCResourceCompilerTool"

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;_DEBUG"

+				Culture="1033"

+			/>

+			<Tool

+				Name="VCPreLinkEventTool"

+			/>

+			<Tool

+				Name="VCLinkerTool"

+				AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib"

+				OutputFile=".\DebugServer/udpserver.exe"

+				 

+				SuppressStartupBanner="true"

+				

+				ProgramDatabaseFile=".\DebugServer/udpserver.pdb"

+				SubSystem="1"

+				TargetMachine="1"

+			/>

+			<Tool

+				Name="VCALinkTool"

+			/>

+			<Tool

+				Name="VCManifestTool"

+			/>

+			<Tool

+				Name="VCXDCMakeTool"

+			/>

+			<Tool

+				Name="VCBscMakeTool"

+				SuppressStartupBanner="true"

+				OutputFile=".\DebugServer/udpserver.bsc"

+			/>

+			<Tool

+				Name="VCFxCopTool"

+			/>

+			<Tool

+				Name="VCAppVerifierTool"

+			/>

+			<Tool

+				Name="VCWebDeploymentTool"

+			/>

+			<Tool

+				Name="VCPostBuildEventTool"

+			/>

+		</Configuration>

+		<Configuration

+			Name="Release|Win32"

+			OutputDirectory=".\ReleaseServer"

+			IntermediateDirectory=".\ReleaseServer"

+			ConfigurationType="1"

+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"

+			UseOfMFC="0"

+			ATLMinimizesCRunTimeLibraryUsage="false"

+			CharacterSet="2"

+			>

+			<Tool

+				Name="VCPreBuildEventTool"

+			/>

+			<Tool

+				Name="VCCustomBuildTool"

+			/>

+			<Tool

+				Name="VCXMLDataGeneratorTool"

+			/>

+			<Tool

+				Name="VCWebServiceProxyGeneratorTool"

+			/>

+			<Tool

+				Name="VCMIDLTool"

+				TypeLibraryName=".\ReleaseServer/udpserver.tlb"

+				HeaderFileName=""

+			/>

+			<Tool

+				Name="VCCLCompilerTool"

+				 

+				InlineFunctionExpansion="1"

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;WIN32;NDEBUG;_CONSOLE"

+				StringPooling="true"

+				 

+				 

+				PrecompiledHeaderFile=".\ReleaseServer/udpserver.pch"

+				AssemblerListingLocation=".\ReleaseServer/"

+				ObjectFile=".\ReleaseServer/"

+				ProgramDataBaseFileName=".\ReleaseServer/"

+				 

+				SuppressStartupBanner="true"

+			/>

+			<Tool

+				Name="VCManagedResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCResourceCompilerTool"

+				PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;NDEBUG"

+				Culture="1033"

+			/>

+			<Tool

+				Name="VCPreLinkEventTool"

+			/>

+			<Tool

+				Name="VCLinkerTool"

+				OutputFile=".\ReleaseServer/udpserver.exe"

+				 

+				SuppressStartupBanner="true"

+				ProgramDatabaseFile=".\ReleaseServer/udpserver.pdb"

+				SubSystem="1"

+				TargetMachine="1"

+			/>

+			<Tool

+				Name="VCALinkTool"

+			/>

+			<Tool

+				Name="VCManifestTool"

+			/>

+			<Tool

+				Name="VCXDCMakeTool"

+			/>

+			<Tool

+				Name="VCBscMakeTool"

+				SuppressStartupBanner="true"

+				OutputFile=".\ReleaseServer/udpserver.bsc"

+			/>

+			<Tool

+				Name="VCFxCopTool"

+			/>

+			<Tool

+				Name="VCAppVerifierTool"

+			/>

+			<Tool

+				Name="VCWebDeploymentTool"

+			/>

+			<Tool

+				Name="VCPostBuildEventTool"

+			/>

+		</Configuration>

+	</Configurations>

+	<References>

+	</References>

+	<Files>

+		<Filter

+			Name="Source Files"

+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"

+			>

+			<File

+				RelativePath="soapC.cpp"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+				<FileConfiguration

+					Name="Release|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+			</File>

+			<File

+				RelativePath=".\soapServer.cpp"

+				>

+			</File>

+			<File

+				RelativePath="stdsoap2.cpp"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+				<FileConfiguration

+					Name="Release|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						PreprocessorDefinitions="_WIN32_WINNT=0x0501;WINVER=0x0501;_WIN32_IE=0x0603;"

+					/>

+				</FileConfiguration>

+			</File>

+			<File

+				RelativePath=".\udpserver.cpp"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						ObjectFile="$(IntDir)\$(InputName)1.obj"

+						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"

+					/>

+				</FileConfiguration>

+				<FileConfiguration

+					Name="Release|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						ObjectFile="$(IntDir)\$(InputName)1.obj"

+						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"

+					/>

+				</FileConfiguration>

+			</File>

+		</Filter>

+		<Filter

+			Name="Header Files"

+			Filter="h;hpp;hxx;hm;inl"

+			>

+			<File

+				RelativePath="soapH.h"

+				>

+			</File>

+			<File

+				RelativePath="soapStub.h"

+				>

+			</File>

+			<File

+				RelativePath="stdsoap2.h"

+				>

+			</File>

+			<File

+				RelativePath="udp.h"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCustomBuildTool"

+						Description="gSOAP Web service proxy/skeleton build on $(InputPath)"

+						CommandLine=".\soapcpp2.exe &quot;$(InputPath)&quot; -I\dev\third_party\gsoap-win32-2.7\import&#x0D;&#x0A;"

+						Outputs="soapStub.h soapH.h soapC.cpp soapClient.cpp"

+					/>

+				</FileConfiguration>

+			</File>

+		</Filter>

+		<Filter

+			Name="Resource Files"

+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"

+			>

+		</Filter>

+	</Files>

+	<Globals>

+	</Globals>

+</VisualStudioProject>

diff --git a/samples/varparam/Makefile b/samples/varparam/Makefile
new file mode 100644
index 0000000..4c1da21
--- /dev/null
+++ b/samples/varparam/Makefile
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		varparam
+varparam:	varparam.h varparam.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) varparam.h
+		$(CPP) $(CFLAGS) -o varparam varparam.cpp soapC.cpp soapClient.cpp soapServer.cpp $(SOAPCPP) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h varparam
diff --git a/samples/varparam/MakefileSolaris b/samples/varparam/MakefileSolaris
new file mode 100644
index 0000000..35086fa
--- /dev/null
+++ b/samples/varparam/MakefileSolaris
@@ -0,0 +1,20 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lxnet -lnsl -lsocket
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		varparam
+varparam:	varparam.h varparam.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) varparam.h
+		$(CPP) $(CFLAGS) -o varparam varparam.cpp soapC.cpp soapClient.cpp soapServer.cpp $(SOAPCPP) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h varparam
diff --git a/samples/varparam/varparam.cpp b/samples/varparam/varparam.cpp
new file mode 100644
index 0000000..82d7f26
--- /dev/null
+++ b/samples/varparam/varparam.cpp
@@ -0,0 +1,390 @@
+/*	varparam.cpp
+
+	Example use of variable parameter lists with the full XML
+	schema type hierarchy implemented as a C++ class hierarchy.
+
+	Copyright (C) 2000-2002 Robert A. van Engelen. All Rights Reserved.
+
+Demonstrates the use of variable number of parameters and polymorphic
+parameters. The 'trick' is to use __size parameters. The __size fields
+can be used in structs/classes to embed arrays. Because a request message
+of a remote method is essentially a struct, the use of __size in 
+parameters of a method has the effect of sending a variable number of
+parameters.
+
+Use option -i with soapcpp2 to compile the header file varparam.h
+
+Run the executable as client from the command line with one argument
+to test the polymorphic parameter exchange. Run with more arguments
+to send the arguments as a variable parameter list to the server.
+
+*/
+
+#include "soapH.h"
+#include "varparam.nsmap"
+
+char *endpoint = "http://websrv.cs.fsu.edu/~engelen/varparam.cgi";
+
+#define N 100 // max number of parameters
+
+int main(int argc, char **argv)
+{ struct soap soap;
+  struct ns__varPolyParamTestResponse r;
+  int n;
+  xsd__anyType *p[N];	// array of polymorphic parameters
+  soap_init(&soap);
+  if (argc < 2)
+  { soap_serve(&soap);
+    soap_destroy(&soap);
+    soap_end(&soap);
+    return 0;
+  }
+  if (argc < 3)
+  { p[0] = new xsd__anyURI(endpoint);
+    p[1] = new xsd__string(argv[1]);
+    p[2] = new xsd__boolean(true);
+    p[3] = new xsd__dateTime(time(NULL));
+    p[4] = new xsd__double(1234567.89);
+    p[5] = new xsd__base64Binary("encoded in base64");
+    p[6] = new xsd__hexBinary("encoded in hex");
+    p[7] = new array(4);
+    (*p[7])[0] = new xsd__int(7);
+    (*p[7])[1] = NULL;
+    (*p[7])[2] = new xsd__token("x");
+    (*p[7])[3] = p[1];
+    p[8] = p[1];
+    n = 9; // actual number of parameters
+    if (soap_call_ns__varPolyParamTest(&soap, endpoint, "", n, p, r))
+      soap_print_fault(&soap, stderr);
+    else
+    { std::cout << "Server has echoed:" << std::endl;
+      for (int i = 0; i < r.__size; i++)
+        r.param[i]->print(std::cout);
+      std::cout << std::endl;
+    }
+    for (int i = 0; i < n; i++)
+      delete p[i];
+  }
+  else
+  { if (soap_call_ns__varStringParamTest(&soap, endpoint, "", argc, argv, n))
+      soap_print_fault(&soap, stderr);
+    else
+      printf("Server has responded to %d strings\n", n);
+  }
+  soap_destroy(&soap);
+  soap_end(&soap);
+  soap_done(&soap);
+  return 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Remote method implementations
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int ns__varStringParamTest(struct soap *soap, int __size, char **param, int &return_)
+{ return_ = __size;
+  return SOAP_OK;
+}
+
+int ns__varPolyParamTest(struct soap *soap, int __size, xsd__anyType **param, struct ns__varPolyParamTestResponse &out)
+{ out.__size = __size;
+  out.param = param;
+  return SOAP_OK;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  XSD schema class hierarchy
+//
+////////////////////////////////////////////////////////////////////////////////
+
+xsd__anyType::xsd__anyType()
+{ soap = NULL;			// This will be set by gSOAP environment later (upon deserialization or calling soap_new_X()
+}
+xsd__anyType::~xsd__anyType()
+{ soap_unlink(soap, this);	// Let gSOAP not deallocate this object again if this object was explicitly removed
+}
+xsd__anyType*& xsd__anyType::operator[](int i)
+{ static xsd__anyType *p = this;	// trick: we don't expect the operator to be applied, but we need a method
+  return p;
+}
+void xsd__anyType::print(std::ostream &s) const
+{ s << "<anyType>"; }
+
+xsd__anySimpleType::xsd__anySimpleType()
+{ }
+xsd__anySimpleType::~xsd__anySimpleType()
+{ }
+void xsd__anySimpleType::print(std::ostream &s) const
+{ s << "<anySimpleType>"; }
+
+xsd__anyURI::xsd__anyURI()
+{ }
+xsd__anyURI::~xsd__anyURI()
+{ }
+xsd__anyURI::xsd__anyURI(char *s)
+{ __item = s; }
+void xsd__anyURI::print(std::ostream &s) const
+{ s << "<anyURI=" << (__item ? __item : "(null)") << ">"; }
+
+xsd__boolean::xsd__boolean()
+{ }
+xsd__boolean::~xsd__boolean()
+{ }
+xsd__boolean::xsd__boolean(bool b)
+{ __item = b; }
+void xsd__boolean::print(std::ostream &s) const
+{ s << "<boolean=" << __item << ">"; }
+
+xsd__date::xsd__date()
+{ }
+xsd__date::~xsd__date()
+{ }
+xsd__date::xsd__date(char *s)
+{ __item = s; }
+void xsd__date::print(std::ostream &s) const
+{ s << "<date=" << (__item ? __item : "(null)") << ">"; }
+
+xsd__dateTime::xsd__dateTime()
+{ }
+xsd__dateTime::~xsd__dateTime()
+{ }
+xsd__dateTime::xsd__dateTime(time_t t)
+{ __item = t; }
+void xsd__dateTime::print(std::ostream &s) const
+{ s << "<dateTime=" << __item << ">"; }
+
+xsd__double::xsd__double()
+{ }
+xsd__double::~xsd__double()
+{ }
+xsd__double::xsd__double(double d)
+{ __item = d; }
+void xsd__double::print(std::ostream &s) const
+{ s << "<double=" << __item << ">"; }
+
+xsd__duration::xsd__duration()
+{ }
+xsd__duration::~xsd__duration()
+{ }
+xsd__duration::xsd__duration(char *s)
+{ __item = s; }
+void xsd__duration::print(std::ostream &s) const
+{ s << "<duration=" << (__item ? __item : "(null)") << ">"; }
+
+xsd__float::xsd__float()
+{ }
+xsd__float::~xsd__float()
+{ }
+xsd__float::xsd__float(float f)
+{ __item = f; }
+void xsd__float::print(std::ostream &s) const
+{ s << "<float=" << __item << ">"; }
+
+xsd__time::xsd__time()
+{ }
+xsd__time::~xsd__time()
+{ }
+xsd__time::xsd__time(char *s)
+{ __item = s; }
+void xsd__time::print(std::ostream &s) const
+{ s << "<time=" << (__item ? __item : "(null)") << ">"; }
+
+xsd__string::xsd__string()
+{ }
+xsd__string::~xsd__string()
+{ }
+xsd__string::xsd__string(char *s)
+{ __item = s; }
+void xsd__string::print(std::ostream &s) const
+{ s << "<string=" << (__item ? __item : "(null)") << ">"; }
+
+xsd__normalizedString::xsd__normalizedString()
+{ }
+xsd__normalizedString::~xsd__normalizedString()
+{ }
+xsd__normalizedString::xsd__normalizedString(char *s)
+{ __item = s; }
+void xsd__normalizedString::print(std::ostream &s) const
+{ s << "<normalizedString=" << (__item ? __item : "(null)") << ">"; }
+
+xsd__token::xsd__token()
+{ }
+xsd__token::~xsd__token()
+{ }
+xsd__token::xsd__token(char *s)
+{ __item = s; }
+void xsd__token::print(std::ostream &s) const
+{ s << "<token=" << (__item ? __item : "(null)") << ">"; }
+
+xsd__decimal::xsd__decimal()
+{ }
+xsd__decimal::~xsd__decimal()
+{ }
+xsd__decimal::xsd__decimal(char *s)
+{ __item = s; }
+void xsd__decimal::print(std::ostream &s) const
+{ s << "<decimal=" << (__item ? __item : "(null)") << ">"; }
+
+xsd__integer::xsd__integer()
+{ }
+xsd__integer::~xsd__integer()
+{ }
+xsd__integer::xsd__integer(char *s)
+{ __item = s; }
+void xsd__integer::print(std::ostream &s) const
+{ s << "<integer=" << (__item ? __item : "(null)") << ">"; }
+
+xsd__nonPositiveInteger::xsd__nonPositiveInteger()
+{ }
+xsd__nonPositiveInteger::~xsd__nonPositiveInteger()
+{ }
+xsd__nonPositiveInteger::xsd__nonPositiveInteger(char *s)
+{ __item = s; }
+void xsd__nonPositiveInteger::print(std::ostream &s) const
+{ s << "<nonPositiveInteger=" << (__item ? __item : "(null)") << ">"; }
+
+xsd__negativeInteger::xsd__negativeInteger()
+{ }
+xsd__negativeInteger::~xsd__negativeInteger()
+{ }
+xsd__negativeInteger::xsd__negativeInteger(char *s)
+{ __item = s; }
+void xsd__negativeInteger::print(std::ostream &s) const
+{ s << "<negativeInteger=" << (__item ? __item : "(null)") << ">"; }
+
+xsd__nonNegativeInteger::xsd__nonNegativeInteger()
+{ }
+xsd__nonNegativeInteger::~xsd__nonNegativeInteger()
+{ }
+xsd__nonNegativeInteger::xsd__nonNegativeInteger(char *s)
+{ __item = s; }
+void xsd__nonNegativeInteger::print(std::ostream &s) const
+{ s << "<nonNegativeInteger=" << (__item ? __item : "(null)") << ">"; }
+
+xsd__positiveInteger::xsd__positiveInteger()
+{ }
+xsd__positiveInteger::~xsd__positiveInteger()
+{ }
+xsd__positiveInteger::xsd__positiveInteger(char *s)
+{ __item = s; }
+void xsd__positiveInteger::print(std::ostream &s) const
+{ s << "<positiveInteger=" << (__item ? __item : "(null)") << ">"; }
+
+xsd__long::xsd__long()
+{ }
+xsd__long::~xsd__long()
+{ }
+xsd__long::xsd__long(LONG64 ll)
+{ __item = ll; }
+void xsd__long::print(std::ostream &s) const
+{ s << "<long=" << __item << ">"; }
+
+xsd__int::xsd__int()
+{ }
+xsd__int::~xsd__int()
+{ }
+xsd__int::xsd__int(int i)
+{ __item = i; }
+void xsd__int::print(std::ostream &s) const
+{ s << "<int=" << __item << ">"; }
+
+xsd__short::xsd__short()
+{ }
+xsd__short::~xsd__short()
+{ }
+xsd__short::xsd__short(short h)
+{ __item = h; }
+void xsd__short::print(std::ostream &s) const
+{ s << "<short=" << __item << ">"; }
+
+xsd__byte::xsd__byte()
+{ }
+xsd__byte::~xsd__byte()
+{ }
+xsd__byte::xsd__byte(char c)
+{ __item = c; }
+void xsd__byte::print(std::ostream &s) const
+{ s << "<byte=" << __item << ">"; }
+
+xsd__unsignedLong::xsd__unsignedLong()
+{ }
+xsd__unsignedLong::~xsd__unsignedLong()
+{ }
+xsd__unsignedLong::xsd__unsignedLong(ULONG64 ull)
+{ __item = ull; }
+void xsd__unsignedLong::print(std::ostream &s) const
+{ s << "<unsignedLong=" << __item << ">"; }
+
+xsd__unsignedInt::xsd__unsignedInt()
+{ }
+xsd__unsignedInt::~xsd__unsignedInt()
+{ }
+xsd__unsignedInt::xsd__unsignedInt(unsigned int ui)
+{ __item = ui; }
+void xsd__unsignedInt::print(std::ostream &s) const
+{ s << "<unsignedInt=" << __item << ">"; }
+
+xsd__unsignedShort::xsd__unsignedShort()
+{ }
+xsd__unsignedShort::~xsd__unsignedShort()
+{ }
+xsd__unsignedShort::xsd__unsignedShort(unsigned short uh)
+{ __item = uh; }
+void xsd__unsignedShort::print(std::ostream &s) const
+{ s << "<unsignedShort=" << __item << ">"; }
+
+xsd__unsignedByte::xsd__unsignedByte()
+{ }
+xsd__unsignedByte::~xsd__unsignedByte()
+{ }
+xsd__unsignedByte::xsd__unsignedByte(unsigned char uc)
+{ __item = uc; }
+void xsd__unsignedByte::print(std::ostream &s) const
+{ s << "<unsignedByte=" << __item << ">"; }
+
+xsd__base64Binary::xsd__base64Binary()
+{ }
+xsd__base64Binary::~xsd__base64Binary()
+{ }
+xsd__base64Binary::xsd__base64Binary(char *s)
+{ __size = strlen(s)+1;
+  __ptr = (unsigned char*)s;
+}
+void xsd__base64Binary::print(std::ostream &s) const
+{ s << "<base64Binary=" << __size << " bytes>"; }
+
+xsd__hexBinary::xsd__hexBinary()
+{ }
+xsd__hexBinary::~xsd__hexBinary()
+{ }
+xsd__hexBinary::xsd__hexBinary(char *s)
+{ __size = strlen(s)+1;
+  __ptr = (unsigned char*)s;
+}
+void xsd__hexBinary::print(std::ostream &s) const
+{ s << "<hexBinary=" << __size << " bytes>"; }
+
+array::array()
+{ }
+array::~array()
+{ }
+array::array(int n)
+{ __size = n;
+  __ptr = (xsd__anyType**)soap_malloc(soap, n*sizeof(xsd__anyType*));
+}
+xsd__anyType*& array::operator[](int i)
+{ return __ptr[i];
+}
+void array::print(std::ostream &s) const
+{ s << "<array=";
+  for (int i = 0; i < __size; i++)
+    if (__ptr[i])
+      __ptr[i]->print(s);
+    else
+      s << "<[none]>";
+  s << ">";
+}
+
diff --git a/samples/varparam/varparam.h b/samples/varparam/varparam.h
new file mode 100644
index 0000000..f4a9ce0
--- /dev/null
+++ b/samples/varparam/varparam.h
@@ -0,0 +1,250 @@
+/*	varparam.h
+
+	Example use of variable parameter lists with the full XML
+	schema type hierarchy implemented as a C++ class hierarchy.
+
+	Copyright (C) 2000-2002 Robert A. van Engelen. All Rights Reserved.
+*/
+
+//gsoap ns service name:	varparam
+//gsoap ns service style:	rpc
+//gsoap ns service encoding:	encoded
+//gsoap ns service namespace:	urn:varparam
+//gsoap ns service location:	http://websrv.cs.fsu.edu/~engelen/varparam.cgi
+
+#include <iostream>
+extern class std::ostream;	// transient (external) type
+
+class xsd__anyType
+{ char *__item;		// default is string, also to hold mixed-content when receiving typeless XML
+  struct soap *soap;	// points to current gSOAP environment that created this object
+  xsd__anyType();
+  virtual ~xsd__anyType();
+  virtual xsd__anyType*& operator[](int i);
+  virtual void print(std::ostream &s) const;
+};
+
+class xsd__anySimpleType: xsd__anyType
+{ xsd__anySimpleType();
+  virtual ~xsd__anySimpleType();
+  virtual void print(std::ostream &s) const;
+};
+
+class xsd__anyURI: xsd__anySimpleType
+{ xsd__anyURI();
+  virtual ~xsd__anyURI();
+  xsd__anyURI(char *s);
+  virtual void print(std::ostream &s) const;
+}; 
+
+class xsd__boolean: xsd__anySimpleType
+{ bool __item;
+  xsd__boolean();
+  virtual ~xsd__boolean();
+  xsd__boolean(bool b);
+  virtual void print(std::ostream &s) const;
+}; 
+
+class xsd__date: xsd__anySimpleType	// requires "CCYY-MM-DD" string values
+{ xsd__date();
+  virtual ~xsd__date();
+  xsd__date(char *s);
+  virtual void print(std::ostream &s) const;
+};
+
+class xsd__dateTime: xsd__anySimpleType
+{ time_t __item;		// remove time_t __item to use char*__item with "CCYY-MM-DDThh:mm:ssi" for dates outside the range 1902-2037
+  xsd__dateTime();
+  virtual ~xsd__dateTime();
+  xsd__dateTime(time_t t);
+  virtual void print(std::ostream &s) const;
+};
+
+class xsd__double: xsd__anySimpleType
+{ double __item;
+  xsd__double();
+  virtual ~xsd__double();
+  xsd__double(double d);
+  virtual void print(std::ostream &s) const;
+}; 
+
+class xsd__duration: xsd__anySimpleType	// requires "PnYnMnDTnHnMnS" string values
+{ xsd__duration();
+  virtual ~xsd__duration();
+  xsd__duration(char *s);
+  virtual void print(std::ostream &s) const;
+};
+
+class xsd__float: xsd__anySimpleType
+{ float __item;
+  xsd__float();
+  virtual ~xsd__float();
+  xsd__float(float f);
+  virtual void print(std::ostream &s) const;
+}; 
+
+class xsd__time: xsd__anySimpleType	// requires "hh:mm:ss" string values
+{ xsd__time();
+  virtual ~xsd__time();
+  xsd__time(char *s);
+  virtual void print(std::ostream &s) const;
+};
+
+class xsd__string: xsd__anySimpleType
+{ xsd__string();
+  xsd__string(char *s);
+  virtual ~xsd__string();
+  virtual void print(std::ostream &s) const;
+}; 
+
+class xsd__normalizedString: xsd__string	// requires strings without CR, LF, TAB
+{ xsd__normalizedString();
+  xsd__normalizedString(char *s);
+  virtual ~xsd__normalizedString();
+  virtual void print(std::ostream &s) const;
+}; 
+
+class xsd__token: xsd__normalizedString		// requires strings without CR, LF, TAB, no leading/trailing spaces, and no sequences of more than one space
+{ xsd__token();
+  xsd__token(char *s);
+  virtual ~xsd__token();
+  virtual void print(std::ostream &s) const;
+}; 
+
+class xsd__decimal: xsd__anySimpleType	// requires decimal as string values, can use double, but possible loss of precision
+{ xsd__decimal();
+  virtual ~xsd__decimal();
+  xsd__decimal(char *s);
+  virtual void print(std::ostream &s) const;
+};
+
+class xsd__integer: xsd__decimal	// requires integer as string values, can use loong long, but possible loss of data
+{ xsd__integer();
+  virtual ~xsd__integer();
+  xsd__integer(char *s);
+  virtual void print(std::ostream &s) const;
+};
+
+class xsd__nonPositiveInteger: xsd__integer	// requires non-positive integer as string values
+{ xsd__nonPositiveInteger();
+  virtual ~xsd__nonPositiveInteger();
+  xsd__nonPositiveInteger(char *s);
+  virtual void print(std::ostream &s) const;
+}; 
+
+class xsd__negativeInteger: xsd__nonPositiveInteger	// requires negative integer as string values
+{ xsd__negativeInteger();
+  virtual ~xsd__negativeInteger();
+  xsd__negativeInteger(char *s);
+  virtual void print(std::ostream &s) const;
+}; 
+
+class xsd__nonNegativeInteger: xsd__integer	// requires non-negative integer as string values
+{ xsd__nonNegativeInteger();
+  virtual ~xsd__nonNegativeInteger();
+  xsd__nonNegativeInteger(char *s);
+  virtual void print(std::ostream &s) const;
+}; 
+
+class xsd__positiveInteger: xsd__nonNegativeInteger	// requires positive integer as string values
+{ xsd__positiveInteger();
+  virtual ~xsd__positiveInteger();
+  xsd__positiveInteger(char *s);
+  virtual void print(std::ostream &s) const;
+}; 
+
+class xsd__long: xsd__integer
+{ LONG64 __item;
+  xsd__long();
+  virtual ~xsd__long();
+  xsd__long(LONG64 ll);
+  virtual void print(std::ostream &s) const;
+}; 
+
+class xsd__int: xsd__long
+{ int __item;
+  xsd__int();
+  virtual ~xsd__int();
+  xsd__int(int i);
+  virtual void print(std::ostream &s) const;
+}; 
+
+class xsd__short: xsd__int
+{ short __item;
+  xsd__short();
+  virtual ~xsd__short();
+  xsd__short(short h);
+  virtual void print(std::ostream &s) const;
+}; 
+
+class xsd__byte: xsd__short
+{ char __item;
+  xsd__byte();
+  virtual ~xsd__byte();
+  xsd__byte(char c);
+  virtual void print(std::ostream &s) const;
+}; 
+
+class xsd__unsignedLong: xsd__nonNegativeInteger
+{ ULONG64 __item;
+  xsd__unsignedLong();
+  virtual ~xsd__unsignedLong();
+  xsd__unsignedLong(ULONG64 ull);
+  virtual void print(std::ostream &s) const;
+}; 
+
+class xsd__unsignedInt: xsd__unsignedLong
+{ unsigned int __item;
+  xsd__unsignedInt();
+  virtual ~xsd__unsignedInt();
+  xsd__unsignedInt(unsigned int ui);
+  virtual void print(std::ostream &s) const;
+}; 
+
+class xsd__unsignedShort: xsd__unsignedInt
+{ unsigned short __item;
+  xsd__unsignedShort();
+  virtual ~xsd__unsignedShort();
+  xsd__unsignedShort(unsigned short uh);
+  virtual void print(std::ostream &s) const;
+}; 
+
+class xsd__unsignedByte: xsd__unsignedShort
+{ unsigned char __item;
+  xsd__unsignedByte();
+  virtual ~xsd__unsignedByte();
+  xsd__unsignedByte(unsigned char uc);
+  virtual void print(std::ostream &s) const;
+}; 
+
+class xsd__base64Binary: xsd__anySimpleType
+{ unsigned char *__ptr;
+  int __size;
+  xsd__base64Binary();
+  virtual ~xsd__base64Binary();
+  xsd__base64Binary(char *s);
+  virtual void print(std::ostream &s) const;
+};
+
+class xsd__hexBinary: xsd__anySimpleType
+{ unsigned char *__ptr;
+  int __size;
+  xsd__hexBinary();
+  virtual ~xsd__hexBinary();
+  xsd__hexBinary(char *s);
+  virtual void print(std::ostream &s) const;
+};
+
+class array: xsd__anyType
+{ xsd__anyType **__ptr;
+  int __size;
+  array();
+  virtual ~array();
+  array(int n);
+  virtual xsd__anyType*& operator[](int i);
+  virtual void print(std::ostream &s) const;
+};
+
+int ns__varStringParamTest(int __size, char **param, int &return_);
+
+int ns__varPolyParamTest(int __size, xsd__anyType **param, struct ns__varPolyParamTestResponse { int __size; xsd__anyType **param; } &out);
diff --git a/samples/webserver/Makefile b/samples/webserver/Makefile
new file mode 100644
index 0000000..6b5e569
--- /dev/null
+++ b/samples/webserver/Makefile
@@ -0,0 +1,31 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lpthread -lz -lssl -lcrypto
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../.. -I../../plugin
+CMFLAGS=-DWITH_COOKIES -DWITH_GZIP -DWITH_OPENSSL
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		webserver
+webserver:	webserver.h webserver.c logging.o httpget.o httpform.o threads.o options.o $(SOAPH) $(SOAPC)
+		$(GSOAP) -c webserver.h
+		$(CC) $(CFLAGS) -o webserver webserver.c logging.o httpget.o httpform.o threads.o options.o soapC.c soapClient.c soapServer.c $(SOAPC) $(LIBS)
+options.o:	opt.h options.h options.c
+		$(GSOAP) -cnpopt opt.h
+		$(CC) $(CFLAGS) -c options.c
+logging.o:	../../plugin/logging.h ../../plugin/logging.c
+		$(CC) $(CFLAGS) -c ../../plugin/logging.c
+httpget.o:	../../plugin/httpget.h ../../plugin/httpget.c
+		$(CC) $(CFLAGS) -c ../../plugin/httpget.c
+httpform.o:	../../plugin/httpform.h ../../plugin/httpform.c
+		$(CC) $(CFLAGS) -c ../../plugin/httpform.c
+threads.o:	../../plugin/threads.h ../../plugin/threads.c
+		$(CC) $(CFLAGS) -c ../../plugin/threads.c
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soapClientLib.c soapClientLib.cpp soapServerLib.c soapServerLib.cpp soap*Proxy.h webserver
diff --git a/samples/webserver/MakefileSolaris b/samples/webserver/MakefileSolaris
new file mode 100644
index 0000000..dac47c1
--- /dev/null
+++ b/samples/webserver/MakefileSolaris
@@ -0,0 +1,31 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lpthread -lz -lssl -lcrypto -lnsl -lxnet -lsocket
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../.. -I../../plugin
+CMFLAGS=-DWITH_COOKIES -DWITH_GZIP -DWITH_OPENSSL
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		webserver
+webserver:	webserver.h webserver.c logging.o httpget.o httpform.o threads.o options.o $(SOAPH) $(SOAPC)
+		$(GSOAP) -c webserver.h
+		$(CC) $(CFLAGS) -o webserver webserver.c logging.o httpget.o httpform.o threads.o options.o soapC.c soapClient.c soapServer.c $(SOAPC) $(LIBS)
+options.o:	opt.h options.h options.c
+		$(GSOAP) -cnpopt opt.h
+		$(CC) $(CFLAGS) -c options.c
+logging.o:	../../plugin/logging.h ../../plugin/logging.c
+		$(CC) $(CFLAGS) -c ../../plugin/logging.c
+httpget.o:	../../plugin/httpget.h ../../plugin/httpget.c
+		$(CC) $(CFLAGS) -c ../../plugin/httpget.c
+httpform.o:	../../plugin/httpform.h ../../plugin/httpform.c
+		$(CC) $(CFLAGS) -c ../../plugin/httpform.c
+threads.o:	../../plugin/threads.h ../../plugin/threads.c
+		$(CC) $(CFLAGS) -c ../../plugin/threads.c
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soapClientLib.c soapClientLib.cpp soapServerLib.c soapServerLib.cpp soap*Proxy.h webserver
diff --git a/samples/webserver/README.txt b/samples/webserver/README.txt
new file mode 100644
index 0000000..23b8ef4
--- /dev/null
+++ b/samples/webserver/README.txt
@@ -0,0 +1,87 @@
+This directory contains an example stand-alone gSOAP Web server. It uses the
+gSOAP HTTP GET plugin to serve HTTP GET requests as well as SOAP/XML HTTP POST
+requests.
+
+This is a small but fully functional (embedded) Web server that can serve both
+static and dynamic pages and provide SOAP/XML responses.
+
+This Web server implements a simple calculator XML Web service for
+demonstration purposes.
+
+This application requires Zlib and Pthreads (you can replace Pthreads with
+another thread library, but you need to study the OpenSSL Pthread
+implementation when you plan to use OpenSSL).
+
+On Unix/Linux, please enable SIGPIPE handling, see the main function in
+webserver.c. SIGPIPE handling will avoid your server from termination when
+sockets are disconnected by clients before the transaction was completed
+(aka broken pipe).
+
+Please don't be tempted to run the webserver with root permission! The best
+way to protect your site is by creating a dummy account with very limited
+system access and run the webserver under this account.
+
+	Compile without OpenSSL:
+	soapcpp2 -c -n -popt opt.h
+	soapcpp2 -c webserver.h
+	Customize your COOKIE_DOMAIN in webserver.c (if you use cookies)
+	gcc -DWITH_COOKIES -DWITH_ZLIB -I../.. -o webserver webserver.c
+	options.c ../../plugin/httpget.c ../../plugin/logging.c
+	../../plugin/threads.c ../../stdsoap2.c soapC.c soapClient.c
+	soapServer.c -lpthread -lz
+
+	Compile with OpenSSL:
+	soapcpp2 -c -n -popt opt.h
+	soapcpp2 -c webserver.h
+	gcc -DWITH_OPENSSL -DWITH_COOKIES -DWITH_ZLIB -I../.. -o webserver
+	webserver.c options.c ../../plugin/httpget.c ../../plugin/logging.c
+	../../plugin/threads.c ../../stdsoap2.c soapC.c
+	soapClient.c soapServer.c -lpthread -lz -lssl -lcrypto
+
+	Use (HTTP GET):
+	Compile the web server as explained above
+	Start the web server on an even numbered port (e.g. 8080):
+	> webserver 8080 &
+	Start a web browser and open a (localhost) location:
+	http://127.0.0.1:8080
+	and type userid 'admin' and passwd 'guest' to gain access
+	Open the location:
+	http://127.0.0.1:8080/calc.html
+	and enter an expression
+	Open the locations:
+	http://127.0.0.1:8080/test.html
+	http://127.0.0.1:8081/webserver.wsdl
+
+	Use (HTTPS GET):
+	Create the SSL certificate
+	Compile the web server with OpenSSL as explained above
+	Start the web server on an odd numbered port (e.g. 8081)
+	> webserver 8081 &
+	Actually, you can start two servers, one on 8080 and a secure one on
+	8081
+	Start a web browser and open a (localhost) location:
+	https://127.0.0.1:8081
+	and type userid 'admin' and passwd 'guest' to gain access
+	Open the location:
+	https://127.0.0.1:8081/calc.html
+	and enter an expression
+	Open the locations:
+	https://127.0.0.1:8081/test.html
+	https://127.0.0.1:8081/webserver.wsdl
+
+	Use (HTTP POST):
+	Serves SOAP/XML calculation requests
+
+	Command-line options:
+	-z		enables compression
+	-c		enables chunking
+	-k		enables keep-alive
+	-i		enables non-threaded iterative server
+	-v		enables verbose mode
+	-t<val>		sets I/O timeout value (seconds)
+	-s<val>		sets server timeout value (seconds)
+	-d<host>	sets cookie domain
+	-p<path>	sets cookie path
+	-l[none inbound outbound both]
+			enables logging
+
diff --git a/samples/webserver/bar.gif b/samples/webserver/bar.gif
new file mode 100644
index 0000000..40fab82
--- /dev/null
+++ b/samples/webserver/bar.gif
Binary files differ
diff --git a/samples/webserver/bb.gif b/samples/webserver/bb.gif
new file mode 100644
index 0000000..c68554d
--- /dev/null
+++ b/samples/webserver/bb.gif
Binary files differ
diff --git a/samples/webserver/bbl.gif b/samples/webserver/bbl.gif
new file mode 100644
index 0000000..6377fe9
--- /dev/null
+++ b/samples/webserver/bbl.gif
Binary files differ
diff --git a/samples/webserver/bbr.gif b/samples/webserver/bbr.gif
new file mode 100644
index 0000000..385dfe9
--- /dev/null
+++ b/samples/webserver/bbr.gif
Binary files differ
diff --git a/samples/webserver/bl.gif b/samples/webserver/bl.gif
new file mode 100644
index 0000000..79989dd
--- /dev/null
+++ b/samples/webserver/bl.gif
Binary files differ
diff --git a/samples/webserver/br.gif b/samples/webserver/br.gif
new file mode 100644
index 0000000..48343b7
--- /dev/null
+++ b/samples/webserver/br.gif
Binary files differ
diff --git a/samples/webserver/bs.gif b/samples/webserver/bs.gif
new file mode 100644
index 0000000..5ccaf80
--- /dev/null
+++ b/samples/webserver/bs.gif
Binary files differ
diff --git a/samples/webserver/bt.gif b/samples/webserver/bt.gif
new file mode 100644
index 0000000..4e4d00a
--- /dev/null
+++ b/samples/webserver/bt.gif
Binary files differ
diff --git a/samples/webserver/btl.gif b/samples/webserver/btl.gif
new file mode 100644
index 0000000..913fc12
--- /dev/null
+++ b/samples/webserver/btl.gif
Binary files differ
diff --git a/samples/webserver/btr.gif b/samples/webserver/btr.gif
new file mode 100644
index 0000000..8fb3726
--- /dev/null
+++ b/samples/webserver/btr.gif
Binary files differ
diff --git a/samples/webserver/cacert.pem b/samples/webserver/cacert.pem
new file mode 100644
index 0000000..004b05f
--- /dev/null
+++ b/samples/webserver/cacert.pem
@@ -0,0 +1,21 @@
+-----BEGIN CERTIFICATE-----
+MIIDhjCCAu+gAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMCVVMx
+CzAJBgNVBAgTAkZMMRQwEgYDVQQHEwtUYWxsYWhhc3NlZTEWMBQGA1UEChMNR2Vu
+aXZpYSwgSW5jLjELMAkGA1UECxMCSVQxFDASBgNVBAMTC2dlbml2aWEuY29tMSIw
+IAYJKoZIhvcNAQkBFhNjb250YWN0QGdlbml2aWEuY29tMB4XDTA0MTAwMjE3MDgw
+NloXDTA3MTAwMjE3MDgwNlowgY8xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJGTDEU
+MBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2aWEsIEluYy4xCzAJ
+BgNVBAsTAklUMRQwEgYDVQQDEwtnZW5pdmlhLmNvbTEiMCAGCSqGSIb3DQEJARYT
+Y29udGFjdEBnZW5pdmlhLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
+l6K9bLMcrJ6Bz+8hxyolSJy5TdZKo8OmmskP+NAJct7aGWa33u2lkZ+GkoUmLKZ/
+rDNpgmYVNQlOQC4rt5oDt4AUoj584G8PJKSPwymJcX0sbfB7k8xRmLO+vVgSUvDu
+asLMWJ6PsYIuGhp4BwOAgnYACTzsd6kSeIsed8XSx7cCAwEAAaOB7zCB7DAdBgNV
+HQ4EFgQU4MyIi0GgIUqkYRhnJ2GgyUmVd8owgbwGA1UdIwSBtDCBsYAU4MyIi0Gg
+IUqkYRhnJ2GgyUmVd8qhgZWkgZIwgY8xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJG
+TDEUMBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2aWEsIEluYy4x
+CzAJBgNVBAsTAklUMRQwEgYDVQQDEwtnZW5pdmlhLmNvbTEiMCAGCSqGSIb3DQEJ
+ARYTY29udGFjdEBnZW5pdmlhLmNvbYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3
+DQEBBQUAA4GBAFmb9kV+EDx5O4j7dLMu909nFgnBL06sepjqtBIIbZY3GnCgefxK
+p1S6If01/mdV79nZGJldegM77tz4VIlzuIaz+2NO+Gqbr6ErOR+3UGOrRuH39aMT
+1DvwHYpU5GU+lG1aWHdQp8uZ5y4okMg3Z9IZ5nijkUnpCHQO+q/8FrML
+-----END CERTIFICATE-----
diff --git a/samples/webserver/cacerts.pem b/samples/webserver/cacerts.pem
new file mode 100644
index 0000000..1983d88
--- /dev/null
+++ b/samples/webserver/cacerts.pem
@@ -0,0 +1,4354 @@
+ABAecom (sub., Am. Bankers Assn.) Root CA
+=========================================
+MD5 Fingerprint: 82:12:F7:89:E1:0B:91:60:A4:B6:22:9F:94:68:11:92
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIID+DCCAuCgAwIBAgIRANAeQJAAACdLAAAAAQAAAAQwDQYJKoZIhvcNAQEFBQAw
+gYwxCzAJBgNVBAYTAlVTMQ0wCwYDVQQIEwRVdGFoMRcwFQYDVQQHEw5TYWx0IExh
+a2UgQ2l0eTEYMBYGA1UEChMPWGNlcnQgRVogYnkgRFNUMRgwFgYDVQQDEw9YY2Vy
+dCBFWiBieSBEU1QxITAfBgkqhkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTAe
+Fw05OTA3MTQxNjE0MThaFw0wOTA3MTExNjE0MThaMIGMMQswCQYDVQQGEwJVUzEN
+MAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxGDAWBgNVBAoT
+D1hjZXJ0IEVaIGJ5IERTVDEYMBYGA1UEAxMPWGNlcnQgRVogYnkgRFNUMSEwHwYJ
+KoZIhvcNAQkBFhJjYUBkaWdzaWd0cnVzdC5jb20wggEiMA0GCSqGSIb3DQEBAQUA
+A4IBDwAwggEKAoIBAQCtVBjetL/3reh0qu2LfI/C1HUa1YS5tmL8ie/kl2GS+x24
+4VpHNJ6eBiL70+o4y7iLB/caoBd3B1owHNQpOCDXJ0DYUJNDv9IYoil2BXKqa7Zp
+mKt5Hhxl9WqL/MUWqqJy2mDtTm4ZJXoKHTDjUJtCPETrobAgHtsCfv49H7/QAIrb
+QHamGKUVp1e2UsIBF5h3j4qBxhq0airmr6nWAKzP2BVJfNsbof6B+of505DBAsD5
+0ELpkWglX8a/hznplQBgKL+DLMDnXrbXNhbnYId26OcnsiUNi3rlqh3lWc3OCw5v
+xsic4xDZhTnTt5v6xrp8dNJddVardKSiUb9SfO5xAgMBAAGjUzBRMA8GA1UdEwEB
+/wQFMAMBAf8wHwYDVR0jBBgwFoAUCCBsZuuBCmxc1bWmPEHdHJaRJ3cwHQYDVR0O
+BBYEFAggbGbrgQpsXNW1pjxB3RyWkSd3MA0GCSqGSIb3DQEBBQUAA4IBAQBah1iP
+Lat2IWtUDNnxQfZOzSue4x+boy1/2St9WMhnpCn16ezVvZY/o3P4xFs2fNBjLDQ5
+m0i4PW/2FMWeY+anNG7T6DOzxzwYbiOuQ5KZP5jFaTDxNjutuTCC1rZZFpYCCykS
+YbQRifcML5SQhZgonFNsfmPdc/QZ/0qB0bJSI/08SjTOWhvgUIrtT4GV2GDn5MQN
+u1g+WPdOaG8+Z8nLepcWJ+xCYRR2uwDF6wg9FX9LtiJdhzuQ9PPA/jez6dliDMDD
+Wa9gvR8N26E0HzDEPYutsB0Ek+1f1eS/IDAE9EjpMwHRLpAnUrOb3jocq6mXf5vr
+wo3CbezcE9NGxXl8
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            d0:1e:40:90:00:00:27:4b:00:00:00:01:00:00:00:04
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, ST=Utah, L=Salt Lake City, O=Xcert EZ by DST, CN=Xcert EZ by DST/Email=ca@digsigtrust.com
+        Validity
+            Not Before: Jul 14 16:14:18 1999 GMT
+            Not After : Jul 11 16:14:18 2009 GMT
+        Subject: C=US, ST=Utah, L=Salt Lake City, O=Xcert EZ by DST, CN=Xcert EZ by DST/Email=ca@digsigtrust.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:ad:54:18:de:b4:bf:f7:ad:e8:74:aa:ed:8b:7c:
+                    8f:c2:d4:75:1a:d5:84:b9:b6:62:fc:89:ef:e4:97:
+                    61:92:fb:1d:b8:e1:5a:47:34:9e:9e:06:22:fb:d3:
+                    ea:38:cb:b8:8b:07:f7:1a:a0:17:77:07:5a:30:1c:
+                    d4:29:38:20:d7:27:40:d8:50:93:43:bf:d2:18:a2:
+                    29:76:05:72:aa:6b:b6:69:98:ab:79:1e:1c:65:f5:
+                    6a:8b:fc:c5:16:aa:a2:72:da:60:ed:4e:6e:19:25:
+                    7a:0a:1d:30:e3:50:9b:42:3c:44:eb:a1:b0:20:1e:
+                    db:02:7e:fe:3d:1f:bf:d0:00:8a:db:40:76:a6:18:
+                    a5:15:a7:57:b6:52:c2:01:17:98:77:8f:8a:81:c6:
+                    1a:b4:6a:2a:e6:af:a9:d6:00:ac:cf:d8:15:49:7c:
+                    db:1b:a1:fe:81:fa:87:f9:d3:90:c1:02:c0:f9:d0:
+                    42:e9:91:68:25:5f:c6:bf:87:39:e9:95:00:60:28:
+                    bf:83:2c:c0:e7:5e:b6:d7:36:16:e7:60:87:76:e8:
+                    e7:27:b2:25:0d:8b:7a:e5:aa:1d:e5:59:cd:ce:0b:
+                    0e:6f:c6:c8:9c:e3:10:d9:85:39:d3:b7:9b:fa:c6:
+                    ba:7c:74:d2:5d:75:56:ab:74:a4:a2:51:bf:52:7c:
+                    ee:71
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+            X509v3 Authority Key Identifier: 
+                keyid:08:20:6C:66:EB:81:0A:6C:5C:D5:B5:A6:3C:41:DD:1C:96:91:27:77
+
+            X509v3 Subject Key Identifier: 
+                08:20:6C:66:EB:81:0A:6C:5C:D5:B5:A6:3C:41:DD:1C:96:91:27:77
+    Signature Algorithm: sha1WithRSAEncryption
+        5a:87:58:8f:2d:ab:76:21:6b:54:0c:d9:f1:41:f6:4e:cd:2b:
+        9e:e3:1f:9b:a3:2d:7f:d9:2b:7d:58:c8:67:a4:29:f5:e9:ec:
+        d5:bd:96:3f:a3:73:f8:c4:5b:36:7c:d0:63:2c:34:39:9b:48:
+        b8:3d:6f:f6:14:c5:9e:63:e6:a7:34:6e:d3:e8:33:b3:c7:3c:
+        18:6e:23:ae:43:92:99:3f:98:c5:69:30:f1:36:3b:ad:b9:30:
+        82:d6:b6:59:16:96:02:0b:29:12:61:b4:11:89:f7:0c:2f:94:
+        90:85:98:28:9c:53:6c:7e:63:dd:73:f4:19:ff:4a:81:d1:b2:
+        52:23:fd:3c:4a:34:ce:5a:1b:e0:50:8a:ed:4f:81:95:d8:60:
+        e7:e4:c4:0d:bb:58:3e:58:f7:4e:68:6f:3e:67:c9:cb:7a:97:
+        16:27:ec:42:61:14:76:bb:00:c5:eb:08:3d:15:7f:4b:b6:22:
+        5d:87:3b:90:f4:f3:c0:fe:37:b3:e9:d9:62:0c:c0:c3:59:af:
+        60:bd:1f:0d:db:a1:34:1f:30:c4:3d:8b:ad:b0:1d:04:93:ed:
+        5f:d5:e4:bf:20:30:04:f4:48:e9:33:01:d1:2e:90:27:52:b3:
+        9b:de:3a:1c:ab:a9:97:7f:9b:eb:c2:8d:c2:6d:ec:dc:13:d3:
+        46:c5:79:7c
+
+ANX Network CA by DST
+=====================
+MD5 Fingerprint: A8:ED:DE:EB:93:88:66:D8:2F:C3:BD:1D:BE:45:BE:4D
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDTTCCAragAwIBAgIENm6ibzANBgkqhkiG9w0BAQUFADBSMQswCQYDVQQGEwJV
+UzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMR0wGwYDVQQL
+ExREU1QgKEFOWCBOZXR3b3JrKSBDQTAeFw05ODEyMDkxNTQ2NDhaFw0xODEyMDkx
+NjE2NDhaMFIxCzAJBgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVy
+ZSBUcnVzdCBDby4xHTAbBgNVBAsTFERTVCAoQU5YIE5ldHdvcmspIENBMIGdMA0G
+CSqGSIb3DQEBAQUAA4GLADCBhwKBgQC0SBGAWKDVpZkP9jcsRLZu0XzzKmueEbaI
+IwRccSWeahJ3EW6/aDllqPay9qIYsokVoGe3eowiSGv2hDQftsr3G3LL8ltI04ce
+InYTBLSsbJZ/5w4IyTJRMC3VgOghZ7rzXggkLAdZnZAa7kbJtaQelrRBkdR/0o04
+JrBvQ24JfQIBA6OCATAwggEsMBEGCWCGSAGG+EIBAQQEAwIABzB0BgNVHR8EbTBr
+MGmgZ6BlpGMwYTELMAkGA1UEBhMCVVMxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0
+dXJlIFRydXN0IENvLjEdMBsGA1UECxMURFNUIChBTlggTmV0d29yaykgQ0ExDTAL
+BgNVBAMTBENSTDEwKwYDVR0QBCQwIoAPMTk5ODEyMDkxNTQ2NDhagQ8yMDE4MTIw
+OTE1NDY0OFowCwYDVR0PBAQDAgEGMB8GA1UdIwQYMBaAFIwWVXDMFgpTZMKlhKqz
+ZBdDP4I2MB0GA1UdDgQWBBSMFlVwzBYKU2TCpYSqs2QXQz+CNjAMBgNVHRMEBTAD
+AQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4GB
+AEklyWCxDF+pORDTxTRVfc95wynr3vnCQPnoVsXwL+z02exIUbhjOF6TbhiWhbnK
+UJykuOpmJmiThW9vTHHQvnoLPDG5975pnhDX0UDorBZxq66rOOFwscqSFuBdhaYY
+gAYAnOGmGEJRp2hoWe8mlF+tMQz+KR4XAYQ3W+gSMqNd
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 913220207 (0x366ea26f)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Digital Signature Trust Co., OU=DST (ANX Network) CA
+        Validity
+            Not Before: Dec  9 15:46:48 1998 GMT
+            Not After : Dec  9 16:16:48 2018 GMT
+        Subject: C=US, O=Digital Signature Trust Co., OU=DST (ANX Network) CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b4:48:11:80:58:a0:d5:a5:99:0f:f6:37:2c:44:
+                    b6:6e:d1:7c:f3:2a:6b:9e:11:b6:88:23:04:5c:71:
+                    25:9e:6a:12:77:11:6e:bf:68:39:65:a8:f6:b2:f6:
+                    a2:18:b2:89:15:a0:67:b7:7a:8c:22:48:6b:f6:84:
+                    34:1f:b6:ca:f7:1b:72:cb:f2:5b:48:d3:87:1e:22:
+                    76:13:04:b4:ac:6c:96:7f:e7:0e:08:c9:32:51:30:
+                    2d:d5:80:e8:21:67:ba:f3:5e:08:24:2c:07:59:9d:
+                    90:1a:ee:46:c9:b5:a4:1e:96:b4:41:91:d4:7f:d2:
+                    8d:38:26:b0:6f:43:6e:09:7d
+                Exponent: 3 (0x3)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Digital Signature Trust Co./OU=DST (ANX Network) CA/CN=CRL1
+
+            X509v3 Private Key Usage Period: 
+                Not Before: Dec  9 15:46:48 1998 GMT, Not After: Dec  9 15:46:48 2018 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:8C:16:55:70:CC:16:0A:53:64:C2:A5:84:AA:B3:64:17:43:3F:82:36
+
+            X509v3 Subject Key Identifier: 
+                8C:16:55:70:CC:16:0A:53:64:C2:A5:84:AA:B3:64:17:43:3F:82:36
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0
+..V4.0....
+    Signature Algorithm: sha1WithRSAEncryption
+        49:25:c9:60:b1:0c:5f:a9:39:10:d3:c5:34:55:7d:cf:79:c3:
+        29:eb:de:f9:c2:40:f9:e8:56:c5:f0:2f:ec:f4:d9:ec:48:51:
+        b8:63:38:5e:93:6e:18:96:85:b9:ca:50:9c:a4:b8:ea:66:26:
+        68:93:85:6f:6f:4c:71:d0:be:7a:0b:3c:31:b9:f7:be:69:9e:
+        10:d7:d1:40:e8:ac:16:71:ab:ae:ab:38:e1:70:b1:ca:92:16:
+        e0:5d:85:a6:18:80:06:00:9c:e1:a6:18:42:51:a7:68:68:59:
+        ef:26:94:5f:ad:31:0c:fe:29:1e:17:01:84:37:5b:e8:12:32:
+        a3:5d
+
+American Express CA
+===================
+MD5 Fingerprint: 1C:D5:8E:82:BE:70:55:8E:39:61:DF:AD:51:DB:6B:A0
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICkDCCAfkCAgCNMA0GCSqGSIb3DQEBBAUAMIGPMQswCQYDVQQGEwJVUzEnMCUG
+A1UEChMeQW1lcmljYW4gRXhwcmVzcyBDb21wYW55LCBJbmMuMSYwJAYDVQQLEx1B
+bWVyaWNhbiBFeHByZXNzIFRlY2hub2xvZ2llczEvMC0GA1UEAxMmQW1lcmljYW4g
+RXhwcmVzcyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNOTgwODE0MjIwMTAwWhcN
+MDYwODE0MjM1OTAwWjCBjzELMAkGA1UEBhMCVVMxJzAlBgNVBAoTHkFtZXJpY2Fu
+IEV4cHJlc3MgQ29tcGFueSwgSW5jLjEmMCQGA1UECxMdQW1lcmljYW4gRXhwcmVz
+cyBUZWNobm9sb2dpZXMxLzAtBgNVBAMTJkFtZXJpY2FuIEV4cHJlc3MgQ2VydGlm
+aWNhdGUgQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJ8kmS
+hcr9FSm1BrZE7PyIo/KGzv8UTyQckvnCI8HOQ99dNMi4FOzVKnCRSZXXVs2U8amT
+0Ggi3E19oApyKkfqJfCFAF82VGHPC/k3Wmed6R/pZD9wlWGn0DAC3iYopGYDBOkw
++48zB/lvYYeictvzaHhjZlmpybdm4RWySDYs+QIDAQABMA0GCSqGSIb3DQEBBAUA
+A4GBAGgXYrhzi0xs60qlPqvlnS7SzYoHV/PGWZd2Fxf4Uo4nk9hY2Chs9KIEeorC
+diSxArTfKPL386infiNIYYj0EWiuJl32oUtTJWrYKhQCDuCHIG6eGVxzkAsj4jGX
+Iz/VIqLTBnvaN/XXtUFEF3pFAtmFRWbWjsfwegyZYiJpW+3S
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 141 (0x8d)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=US, O=American Express Company, Inc., OU=American Express Technologies, CN=American Express Certificate Authority
+        Validity
+            Not Before: Aug 14 22:01:00 1998 GMT
+            Not After : Aug 14 23:59:00 2006 GMT
+        Subject: C=US, O=American Express Company, Inc., OU=American Express Technologies, CN=American Express Certificate Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:c9:f2:49:92:85:ca:fd:15:29:b5:06:b6:44:ec:
+                    fc:88:a3:f2:86:ce:ff:14:4f:24:1c:92:f9:c2:23:
+                    c1:ce:43:df:5d:34:c8:b8:14:ec:d5:2a:70:91:49:
+                    95:d7:56:cd:94:f1:a9:93:d0:68:22:dc:4d:7d:a0:
+                    0a:72:2a:47:ea:25:f0:85:00:5f:36:54:61:cf:0b:
+                    f9:37:5a:67:9d:e9:1f:e9:64:3f:70:95:61:a7:d0:
+                    30:02:de:26:28:a4:66:03:04:e9:30:fb:8f:33:07:
+                    f9:6f:61:87:a2:72:db:f3:68:78:63:66:59:a9:c9:
+                    b7:66:e1:15:b2:48:36:2c:f9
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        68:17:62:b8:73:8b:4c:6c:eb:4a:a5:3e:ab:e5:9d:2e:d2:cd:
+        8a:07:57:f3:c6:59:97:76:17:17:f8:52:8e:27:93:d8:58:d8:
+        28:6c:f4:a2:04:7a:8a:c2:76:24:b1:02:b4:df:28:f2:f7:f3:
+        a8:a7:7e:23:48:61:88:f4:11:68:ae:26:5d:f6:a1:4b:53:25:
+        6a:d8:2a:14:02:0e:e0:87:20:6e:9e:19:5c:73:90:0b:23:e2:
+        31:97:23:3f:d5:22:a2:d3:06:7b:da:37:f5:d7:b5:41:44:17:
+        7a:45:02:d9:85:45:66:d6:8e:c7:f0:7a:0c:99:62:22:69:5b:
+        ed:d2
+
+American Express Global CA
+==========================
+MD5 Fingerprint: 63:1B:66:93:8C:F3:66:CB:3C:79:57:DC:05:49:EA:DB
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEBDCCAuygAwIBAgICAIUwDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNVBAYTAlVT
+MScwJQYDVQQKEx5BbWVyaWNhbiBFeHByZXNzIENvbXBhbnksIEluYy4xJjAkBgNV
+BAsTHUFtZXJpY2FuIEV4cHJlc3MgVGVjaG5vbG9naWVzMTYwNAYDVQQDEy1BbWVy
+aWNhbiBFeHByZXNzIEdsb2JhbCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNOTgw
+ODE0MTkwNjAwWhcNMTMwODE0MjM1OTAwWjCBljELMAkGA1UEBhMCVVMxJzAlBgNV
+BAoTHkFtZXJpY2FuIEV4cHJlc3MgQ29tcGFueSwgSW5jLjEmMCQGA1UECxMdQW1l
+cmljYW4gRXhwcmVzcyBUZWNobm9sb2dpZXMxNjA0BgNVBAMTLUFtZXJpY2FuIEV4
+cHJlc3MgR2xvYmFsIENlcnRpZmljYXRlIEF1dGhvcml0eTCCASIwDQYJKoZIhvcN
+AQEBBQADggEPADCCAQoCggEBAPAkJmYu++tKc3FTiUfLJjxTkpRMysKFtQ34w1e9
+Lyofahi3V68MABb6oLaQpvcaoS5mJsdoo4qTaWa1RlYtHYLqkAwKIsKJUI0F89Sr
+c0HwzxKsKLRvFJSWWUuekHWG3+JH6+HpT0N+h8onGGaetcFAZX38YW+tm3LPqV7Y
+8/nabpEQ+ky16n4g3qk5L/WI5IpvNcYgnCuGRjMK/DFVpWusFkDpzTVZbzIEw3u1
+D3t3cPNIuypSgs6vKW3xEW9t5gcAAe+a8yYNpnkTZ6/4qxx1rJG1a75AsN6cDLFp
+hRlxkRNFyt/R/eayypaDedvFuKpbepALeFY+xteflEgR9a0CAwEAAaNaMFgwEgYD
+VR0TAQH/BAgwBgEB/wIBBTAOBgNVHQ8BAf8EBAMCAQYwFwYDVR0gBBAwDjAMBgoq
+hkiG+Q8KAQUBMBkGA1UdDgQSBBBXRzV7NicRqAj8L0Yl6yRpMA0GCSqGSIb3DQEB
+BQUAA4IBAQDHYUWoinG5vjTpIXshzVYTmNUwY+kYqkuSFb8LHbvskmnFLsNhi+gw
+RcsQRsFzOFyLGdIr80DrfHKzLh4n43WVihybLsSVBYZy0FX0oZJSeVzb9Pjc5dcS
+sUDHPIbkMWVKyjfG3nZXGWlMRmn8Kq0WN3qTrPchSy3766lQy8HRQAjaA2mHpzde
+VcHF7cTjjgwml5tcV0ty4/IDBdACOyYDQJCevgtbSQx48dVMVSng9v1MA6lUAjLR
+V1qFrEPtWzsWX6C/NdtLnnvo/+cNPDuom0lBRvVzTv+SZSGDE1Vx60k8f4gawhIo
+JaFGS0E3l3/sjvHUoZbCILZerakcHhGg
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 133 (0x85)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=American Express Company, Inc., OU=American Express Technologies, CN=American Express Global Certificate Authority
+        Validity
+            Not Before: Aug 14 19:06:00 1998 GMT
+            Not After : Aug 14 23:59:00 2013 GMT
+        Subject: C=US, O=American Express Company, Inc., OU=American Express Technologies, CN=American Express Global Certificate Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:f0:24:26:66:2e:fb:eb:4a:73:71:53:89:47:cb:
+                    26:3c:53:92:94:4c:ca:c2:85:b5:0d:f8:c3:57:bd:
+                    2f:2a:1f:6a:18:b7:57:af:0c:00:16:fa:a0:b6:90:
+                    a6:f7:1a:a1:2e:66:26:c7:68:a3:8a:93:69:66:b5:
+                    46:56:2d:1d:82:ea:90:0c:0a:22:c2:89:50:8d:05:
+                    f3:d4:ab:73:41:f0:cf:12:ac:28:b4:6f:14:94:96:
+                    59:4b:9e:90:75:86:df:e2:47:eb:e1:e9:4f:43:7e:
+                    87:ca:27:18:66:9e:b5:c1:40:65:7d:fc:61:6f:ad:
+                    9b:72:cf:a9:5e:d8:f3:f9:da:6e:91:10:fa:4c:b5:
+                    ea:7e:20:de:a9:39:2f:f5:88:e4:8a:6f:35:c6:20:
+                    9c:2b:86:46:33:0a:fc:31:55:a5:6b:ac:16:40:e9:
+                    cd:35:59:6f:32:04:c3:7b:b5:0f:7b:77:70:f3:48:
+                    bb:2a:52:82:ce:af:29:6d:f1:11:6f:6d:e6:07:00:
+                    01:ef:9a:f3:26:0d:a6:79:13:67:af:f8:ab:1c:75:
+                    ac:91:b5:6b:be:40:b0:de:9c:0c:b1:69:85:19:71:
+                    91:13:45:ca:df:d1:fd:e6:b2:ca:96:83:79:db:c5:
+                    b8:aa:5b:7a:90:0b:78:56:3e:c6:d7:9f:94:48:11:
+                    f5:ad
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE, pathlen:5
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Certificate Policies: 
+                Policy: 1.2.840.113807.10.1.5.1
+
+            X509v3 Subject Key Identifier: 
+                57:47:35:7B:36:27:11:A8:08:FC:2F:46:25:EB:24:69
+    Signature Algorithm: sha1WithRSAEncryption
+        c7:61:45:a8:8a:71:b9:be:34:e9:21:7b:21:cd:56:13:98:d5:
+        30:63:e9:18:aa:4b:92:15:bf:0b:1d:bb:ec:92:69:c5:2e:c3:
+        61:8b:e8:30:45:cb:10:46:c1:73:38:5c:8b:19:d2:2b:f3:40:
+        eb:7c:72:b3:2e:1e:27:e3:75:95:8a:1c:9b:2e:c4:95:05:86:
+        72:d0:55:f4:a1:92:52:79:5c:db:f4:f8:dc:e5:d7:12:b1:40:
+        c7:3c:86:e4:31:65:4a:ca:37:c6:de:76:57:19:69:4c:46:69:
+        fc:2a:ad:16:37:7a:93:ac:f7:21:4b:2d:fb:eb:a9:50:cb:c1:
+        d1:40:08:da:03:69:87:a7:37:5e:55:c1:c5:ed:c4:e3:8e:0c:
+        26:97:9b:5c:57:4b:72:e3:f2:03:05:d0:02:3b:26:03:40:90:
+        9e:be:0b:5b:49:0c:78:f1:d5:4c:55:29:e0:f6:fd:4c:03:a9:
+        54:02:32:d1:57:5a:85:ac:43:ed:5b:3b:16:5f:a0:bf:35:db:
+        4b:9e:7b:e8:ff:e7:0d:3c:3b:a8:9b:49:41:46:f5:73:4e:ff:
+        92:65:21:83:13:55:71:eb:49:3c:7f:88:1a:c2:12:28:25:a1:
+        46:4b:41:37:97:7f:ec:8e:f1:d4:a1:96:c2:20:b6:5e:ad:a9:
+        1c:1e:11:a0
+
+BelSign Object Publishing CA
+============================
+MD5 Fingerprint: 8A:02:F8:DF:B8:E1:84:9F:5A:C2:60:24:65:D1:73:FB
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDAzCCAmygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBuzELMAkGA1UEBhMCQkUx
+ETAPBgNVBAcTCEJydXNzZWxzMRMwEQYDVQQKEwpCZWxTaWduIE5WMTgwNgYDVQQL
+Ey9CZWxTaWduIE9iamVjdCBQdWJsaXNoaW5nIENlcnRpZmljYXRlIEF1dGhvcml0
+eTElMCMGA1UEAxMcQmVsU2lnbiBPYmplY3QgUHVibGlzaGluZyBDQTEjMCEGCSqG
+SIb3DQEJARYUd2VibWFzdGVyQGJlbHNpZ24uYmUwHhcNOTcwOTE5MjIwMzAwWhcN
+MDcwOTE5MjIwMzAwWjCBuzELMAkGA1UEBhMCQkUxETAPBgNVBAcTCEJydXNzZWxz
+MRMwEQYDVQQKEwpCZWxTaWduIE5WMTgwNgYDVQQLEy9CZWxTaWduIE9iamVjdCBQ
+dWJsaXNoaW5nIENlcnRpZmljYXRlIEF1dGhvcml0eTElMCMGA1UEAxMcQmVsU2ln
+biBPYmplY3QgUHVibGlzaGluZyBDQTEjMCEGCSqGSIb3DQEJARYUd2VibWFzdGVy
+QGJlbHNpZ24uYmUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMQuH7a/7oJA
+3fm3LkHVngWxWtAmfGJVA5v8y2HeS+/+6Jn+h7mIz5DaDwk8dt8Xl7bLPyVF/bS8
+WAC+sFq2FIeP7mdkrR2Ig7tnn2VhAFgIgFCfgMkx9iqQHC33SmwQ9iNDXTgJYIhX
+As0WbBj8zfuSKnfQnpOjXYhk0Mj4XVRRAgMBAAGjFTATMBEGCWCGSAGG+EIBAQQE
+AwIABzANBgkqhkiG9w0BAQQFAAOBgQBjdhd8lvBTpV0BHFPOKcJ+daxMDaIIc7Rq
+Mf0CBhSZ3FQEpL/IloafMUMyJVf2hfYluze+oXkjyVcGJXFrRU/49AJAFoIir1Tq
+Mij2De6ZuksIUQ9uhiMhTC0liIHELg7xEyw4ipUCJMM6lWPkk45IuwhHcl+u5jpa
+R9Zxxp6aUg==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, L=Brussels, O=BelSign NV, OU=BelSign Object Publishing Certificate Authority, CN=BelSign Object Publishing CA/Email=webmaster@belsign.be
+        Validity
+            Not Before: Sep 19 22:03:00 1997 GMT
+            Not After : Sep 19 22:03:00 2007 GMT
+        Subject: C=BE, L=Brussels, O=BelSign NV, OU=BelSign Object Publishing Certificate Authority, CN=BelSign Object Publishing CA/Email=webmaster@belsign.be
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:c4:2e:1f:b6:bf:ee:82:40:dd:f9:b7:2e:41:d5:
+                    9e:05:b1:5a:d0:26:7c:62:55:03:9b:fc:cb:61:de:
+                    4b:ef:fe:e8:99:fe:87:b9:88:cf:90:da:0f:09:3c:
+                    76:df:17:97:b6:cb:3f:25:45:fd:b4:bc:58:00:be:
+                    b0:5a:b6:14:87:8f:ee:67:64:ad:1d:88:83:bb:67:
+                    9f:65:61:00:58:08:80:50:9f:80:c9:31:f6:2a:90:
+                    1c:2d:f7:4a:6c:10:f6:23:43:5d:38:09:60:88:57:
+                    02:cd:16:6c:18:fc:cd:fb:92:2a:77:d0:9e:93:a3:
+                    5d:88:64:d0:c8:f8:5d:54:51
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+    Signature Algorithm: md5WithRSAEncryption
+        63:76:17:7c:96:f0:53:a5:5d:01:1c:53:ce:29:c2:7e:75:ac:
+        4c:0d:a2:08:73:b4:6a:31:fd:02:06:14:99:dc:54:04:a4:bf:
+        c8:96:86:9f:31:43:32:25:57:f6:85:f6:25:bb:37:be:a1:79:
+        23:c9:57:06:25:71:6b:45:4f:f8:f4:02:40:16:82:22:af:54:
+        ea:32:28:f6:0d:ee:99:ba:4b:08:51:0f:6e:86:23:21:4c:2d:
+        25:88:81:c4:2e:0e:f1:13:2c:38:8a:95:02:24:c3:3a:95:63:
+        e4:93:8e:48:bb:08:47:72:5f:ae:e6:3a:5a:47:d6:71:c6:9e:
+        9a:52
+
+BelSign Secure Server CA
+========================
+MD5 Fingerprint: 3D:5E:82:C6:D9:AD:D9:8B:93:6B:0C:10:B9:49:0A:B1
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIC8zCCAlygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBszELMAkGA1UEBhMCQkUx
+ETAPBgNVBAcTCEJydXNzZWxzMRMwEQYDVQQKEwpCZWxTaWduIE5WMTQwMgYDVQQL
+EytCZWxTaWduIFNlY3VyZSBTZXJ2ZXIgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MSEw
+HwYDVQQDExhCZWxTaWduIFNlY3VyZSBTZXJ2ZXIgQ0ExIzAhBgkqhkiG9w0BCQEW
+FHdlYm1hc3RlckBiZWxzaWduLmJlMB4XDTk3MDcxNjIyMDA1NFoXDTA3MDcxNjIy
+MDA1NFowgbMxCzAJBgNVBAYTAkJFMREwDwYDVQQHEwhCcnVzc2VsczETMBEGA1UE
+ChMKQmVsU2lnbiBOVjE0MDIGA1UECxMrQmVsU2lnbiBTZWN1cmUgU2VydmVyIENl
+cnRpZmljYXRlIEF1dGhvcml0eTEhMB8GA1UEAxMYQmVsU2lnbiBTZWN1cmUgU2Vy
+dmVyIENBMSMwIQYJKoZIhvcNAQkBFhR3ZWJtYXN0ZXJAYmVsc2lnbi5iZTCBnzAN
+BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1gESeJL4BEJ/yccig/x8R3AwK0kLPjZA
+kCjaIXODU/LE0RZAwFP/rqbGJLMnbaWzPTl3XagG9ubpvGMRTgZlcAqdk/miQIt/
+SoQOjRax1swIZBIM4ChLyKWEkBf7EUYu1qeFGMsYrmOasFgG9ADP+MQJGjUMofnu
+Sv1t3v4mpTsCAwEAAaMVMBMwEQYJYIZIAYb4QgEBBAQDAgCgMA0GCSqGSIb3DQEB
+BAUAA4GBAGw9mcMF4h3K5S2qaIWLQDEgZhNo5lg6idCNdbLFYth9go/32TKBd/Y1
+W4UpzmeyubwrGXjP84f9RvGVdbIJVwMwwXrNckdxgMp9ncllPEcRIn36BwsoeKGT
+6AVFSOIyMko96FMcELfHc4wHUOH5yStTQfWDjeUJOUqOA2KqQGOL
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, L=Brussels, O=BelSign NV, OU=BelSign Secure Server Certificate Authority, CN=BelSign Secure Server CA/Email=webmaster@belsign.be
+        Validity
+            Not Before: Jul 16 22:00:54 1997 GMT
+            Not After : Jul 16 22:00:54 2007 GMT
+        Subject: C=BE, L=Brussels, O=BelSign NV, OU=BelSign Secure Server Certificate Authority, CN=BelSign Secure Server CA/Email=webmaster@belsign.be
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d6:01:12:78:92:f8:04:42:7f:c9:c7:22:83:fc:
+                    7c:47:70:30:2b:49:0b:3e:36:40:90:28:da:21:73:
+                    83:53:f2:c4:d1:16:40:c0:53:ff:ae:a6:c6:24:b3:
+                    27:6d:a5:b3:3d:39:77:5d:a8:06:f6:e6:e9:bc:63:
+                    11:4e:06:65:70:0a:9d:93:f9:a2:40:8b:7f:4a:84:
+                    0e:8d:16:b1:d6:cc:08:64:12:0c:e0:28:4b:c8:a5:
+                    84:90:17:fb:11:46:2e:d6:a7:85:18:cb:18:ae:63:
+                    9a:b0:58:06:f4:00:cf:f8:c4:09:1a:35:0c:a1:f9:
+                    ee:4a:fd:6d:de:fe:26:a5:3b
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL Client, S/MIME
+    Signature Algorithm: md5WithRSAEncryption
+        6c:3d:99:c3:05:e2:1d:ca:e5:2d:aa:68:85:8b:40:31:20:66:
+        13:68:e6:58:3a:89:d0:8d:75:b2:c5:62:d8:7d:82:8f:f7:d9:
+        32:81:77:f6:35:5b:85:29:ce:67:b2:b9:bc:2b:19:78:cf:f3:
+        87:fd:46:f1:95:75:b2:09:57:03:30:c1:7a:cd:72:47:71:80:
+        ca:7d:9d:c9:65:3c:47:11:22:7d:fa:07:0b:28:78:a1:93:e8:
+        05:45:48:e2:32:32:4a:3d:e8:53:1c:10:b7:c7:73:8c:07:50:
+        e1:f9:c9:2b:53:41:f5:83:8d:e5:09:39:4a:8e:03:62:aa:40:
+        63:8b
+
+Deutsche Telekom AG Root CA
+===========================
+MD5 Fingerprint: 77:DE:04:94:77:D0:0C:5F:A7:B1:F4:30:18:87:FB:55
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICjjCCAfegAwIBAgIBBjANBgkqhkiG9w0BAQQFADBtMQswCQYDVQQGEwJERTEc
+MBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEdMBsGA1UECxMUVGVsZVNlYyBU
+cnVzdCBDZW50ZXIxITAfBgNVBAMTGERldXRzY2hlIFRlbGVrb20gUm9vdCBDQTAe
+Fw05ODEyMDkwOTExMDBaFw0wNDEyMDkyMzU5MDBaMG0xCzAJBgNVBAYTAkRFMRww
+GgYDVQQKExNEZXV0c2NoZSBUZWxla29tIEFHMR0wGwYDVQQLExRUZWxlU2VjIFRy
+dXN0IENlbnRlcjEhMB8GA1UEAxMYRGV1dHNjaGUgVGVsZWtvbSBSb290IENBMIGf
+MA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDdBSz5BbO5EtdpcffqVjAIVxRDe7sa
+nG0vV2HX4vVEa+42QZb2ZM7hwbK5pBQEmFDocPiONZp9ScFhHVmu2gYYlX2tzuyp
+vtEYD0CRdiqj5f3+iRX0V/fgVdp1rQD0LME1zLRDJlViRC4BJZyKW/DB0AA1eP41
+3pRAZHiDocw5iQIDAQABoz4wPDAPBgNVHRMECDAGAQH/AgEFMA4GA1UdDwEB/wQE
+AwIBBjAZBgNVHQ4EEgQQLIdZH4sTgLL5hp0+En5YljANBgkqhkiG9w0BAQQFAAOB
+gQAP/nO1B4hvoAuJ6spQH5TelCsLJ15P9RyVJtqMllStGZE3Q12ryYuzzW+YOT3t
+3TXjcbftE5OD6IblKTMTE7w1e/0oL3BZ1dO0jSgTWTvI1XT5RcIHYKq4GFT5pWj/
+1wXVj7YFMS5BSvQQH2BHGguLGU2SVyDS71AZ6M3QcLy8Ng==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 6 (0x6)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=DE, O=Deutsche Telekom AG, OU=TeleSec Trust Center, CN=Deutsche Telekom Root CA
+        Validity
+            Not Before: Dec  9 09:11:00 1998 GMT
+            Not After : Dec  9 23:59:00 2004 GMT
+        Subject: C=DE, O=Deutsche Telekom AG, OU=TeleSec Trust Center, CN=Deutsche Telekom Root CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:dd:05:2c:f9:05:b3:b9:12:d7:69:71:f7:ea:56:
+                    30:08:57:14:43:7b:bb:1a:9c:6d:2f:57:61:d7:e2:
+                    f5:44:6b:ee:36:41:96:f6:64:ce:e1:c1:b2:b9:a4:
+                    14:04:98:50:e8:70:f8:8e:35:9a:7d:49:c1:61:1d:
+                    59:ae:da:06:18:95:7d:ad:ce:ec:a9:be:d1:18:0f:
+                    40:91:76:2a:a3:e5:fd:fe:89:15:f4:57:f7:e0:55:
+                    da:75:ad:00:f4:2c:c1:35:cc:b4:43:26:55:62:44:
+                    2e:01:25:9c:8a:5b:f0:c1:d0:00:35:78:fe:35:de:
+                    94:40:64:78:83:a1:cc:39:89
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: 
+                CA:TRUE, pathlen:5
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Subject Key Identifier: 
+                2C:87:59:1F:8B:13:80:B2:F9:86:9D:3E:12:7E:58:96
+    Signature Algorithm: md5WithRSAEncryption
+        0f:fe:73:b5:07:88:6f:a0:0b:89:ea:ca:50:1f:94:de:94:2b:
+        0b:27:5e:4f:f5:1c:95:26:da:8c:96:54:ad:19:91:37:43:5d:
+        ab:c9:8b:b3:cd:6f:98:39:3d:ed:dd:35:e3:71:b7:ed:13:93:
+        83:e8:86:e5:29:33:13:13:bc:35:7b:fd:28:2f:70:59:d5:d3:
+        b4:8d:28:13:59:3b:c8:d5:74:f9:45:c2:07:60:aa:b8:18:54:
+        f9:a5:68:ff:d7:05:d5:8f:b6:05:31:2e:41:4a:f4:10:1f:60:
+        47:1a:0b:8b:19:4d:92:57:20:d2:ef:50:19:e8:cd:d0:70:bc:
+        bc:36
+
+Digital Signature Trust Co. Global CA 1
+=======================================
+MD5 Fingerprint: 25:7A:BA:83:2E:B6:A2:0B:DA:FE:F5:02:0F:08:D7:AD
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDKTCCApKgAwIBAgIENnAVljANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJV
+UzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQL
+EwhEU1RDQSBFMTAeFw05ODEyMTAxODEwMjNaFw0xODEyMTAxODQwMjNaMEYxCzAJ
+BgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4x
+ETAPBgNVBAsTCERTVENBIEUxMIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQCg
+bIGpzzQeJN3+hijM3oMv+V7UQtLodGBmE5gGHKlREmlvMVW5SXIACH7TpWJENySZ
+j9mDSI+ZbZUTu0M7LklOiDfBu1h//uG9+LthzfNHwJmm8fOR6Hh8AMthyUQncWlV
+Sn5JTe2io74CTADKAqjuAQIxZA9SLRN0dja1erQtcQIBA6OCASQwggEgMBEGCWCG
+SAGG+EIBAQQEAwIABzBoBgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMx
+JDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UECxMI
+RFNUQ0EgRTExDTALBgNVBAMTBENSTDEwKwYDVR0QBCQwIoAPMTk5ODEyMTAxODEw
+MjNagQ8yMDE4MTIxMDE4MTAyM1owCwYDVR0PBAQDAgEGMB8GA1UdIwQYMBaAFGp5
+fpFpRhgTCgJ3pVlbYJglDqL4MB0GA1UdDgQWBBRqeX6RaUYYEwoCd6VZW2CYJQ6i
++DAMBgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqG
+SIb3DQEBBQUAA4GBACIS2Hod3IEGtgllsofIH160L+nEHvI8wbsEkBFKg05+k7lN
+QseSJqBcNJo4cvj9axY+IO6CizEqkzaFI4iKPANo08kJD038bKTaKHKTDomAsH3+
+gG9lbRgzl4vCa4nuYD3Im+9/KzJic5PLPON74nZ4RbyhkwS7hp86W0N6w4pl
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 913315222 (0x36701596)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Digital Signature Trust Co., OU=DSTCA E1
+        Validity
+            Not Before: Dec 10 18:10:23 1998 GMT
+            Not After : Dec 10 18:40:23 2018 GMT
+        Subject: C=US, O=Digital Signature Trust Co., OU=DSTCA E1
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:a0:6c:81:a9:cf:34:1e:24:dd:fe:86:28:cc:de:
+                    83:2f:f9:5e:d4:42:d2:e8:74:60:66:13:98:06:1c:
+                    a9:51:12:69:6f:31:55:b9:49:72:00:08:7e:d3:a5:
+                    62:44:37:24:99:8f:d9:83:48:8f:99:6d:95:13:bb:
+                    43:3b:2e:49:4e:88:37:c1:bb:58:7f:fe:e1:bd:f8:
+                    bb:61:cd:f3:47:c0:99:a6:f1:f3:91:e8:78:7c:00:
+                    cb:61:c9:44:27:71:69:55:4a:7e:49:4d:ed:a2:a3:
+                    be:02:4c:00:ca:02:a8:ee:01:02:31:64:0f:52:2d:
+                    13:74:76:36:b5:7a:b4:2d:71
+                Exponent: 3 (0x3)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Digital Signature Trust Co./OU=DSTCA E1/CN=CRL1
+
+            X509v3 Private Key Usage Period: 
+                Not Before: Dec 10 18:10:23 1998 GMT, Not After: Dec 10 18:10:23 2018 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:6A:79:7E:91:69:46:18:13:0A:02:77:A5:59:5B:60:98:25:0E:A2:F8
+
+            X509v3 Subject Key Identifier: 
+                6A:79:7E:91:69:46:18:13:0A:02:77:A5:59:5B:60:98:25:0E:A2:F8
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0
+..V4.0....
+    Signature Algorithm: sha1WithRSAEncryption
+        22:12:d8:7a:1d:dc:81:06:b6:09:65:b2:87:c8:1f:5e:b4:2f:
+        e9:c4:1e:f2:3c:c1:bb:04:90:11:4a:83:4e:7e:93:b9:4d:42:
+        c7:92:26:a0:5c:34:9a:38:72:f8:fd:6b:16:3e:20:ee:82:8b:
+        31:2a:93:36:85:23:88:8a:3c:03:68:d3:c9:09:0f:4d:fc:6c:
+        a4:da:28:72:93:0e:89:80:b0:7d:fe:80:6f:65:6d:18:33:97:
+        8b:c2:6b:89:ee:60:3d:c8:9b:ef:7f:2b:32:62:73:93:cb:3c:
+        e3:7b:e2:76:78:45:bc:a1:93:04:bb:86:9f:3a:5b:43:7a:c3:
+        8a:65
+
+Digital Signature Trust Co. Global CA 2
+=======================================
+MD5 Fingerprint: 6C:C9:A7:6E:47:F1:0C:E3:53:3B:78:4C:4D:C2:6A:C5
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIID2DCCAsACEQDQHkCLAAACfAAAAAIAAAABMA0GCSqGSIb3DQEBBQUAMIGpMQsw
+CQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENp
+dHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UE
+CxMIRFNUQ0EgWDExFjAUBgNVBAMTDURTVCBSb290Q0EgWDExITAfBgkqhkiG9w0B
+CQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTAeFw05ODEyMDExODE4NTVaFw0wODExMjgx
+ODE4NTVaMIGpMQswCQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMO
+U2FsdCBMYWtlIENpdHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0
+IENvLjERMA8GA1UECxMIRFNUQ0EgWDExFjAUBgNVBAMTDURTVCBSb290Q0EgWDEx
+ITAfBgkqhkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTCCASIwDQYJKoZIhvcN
+AQEBBQADggEPADCCAQoCggEBANLGJrbnpT3BxGjVUG9TxW9JEwm4ryxIjRRqoxdf
+WvnTLnUv2Chi0ZMv/E3Uq4flCMeZ55I/db3rJbQVwZsZPdJEjdd0IG03Ao9pk1uK
+xBmd9LIO/BZsubEFkoPRhSxglD5FVaDZqwgh5mDoO3TymVBRaNADLbGAvqPYUrBE
+zUNKcI5YhZXhTizWLUFv1oTnyJhEykfbLCSlaSbPa7gnYsP0yXqSI+0TZ4KuRS5F
+5X5yP4WdlGIQ5jyRoa13AOAV7POEgHJ6jm5gl8ckWRA0g1vhpaRptlc1HHhZxtMv
+OnNn7pTKBBMFYgZwI7P0fO5F2WQLW0mqpEPOJsREEmy43XkCAwEAATANBgkqhkiG
+9w0BAQUFAAOCAQEAojeyP2n714Z5VEkxlTMr89EJFEliYIalsBHiUMIdBlc+Legz
+ZL6bqq1fG03UmZWii5rJYnK1aerZWKs17RWiQ9a2vAd5ZWRzfdd5ynvVWlHG4VME
+lo04z6MXrDlxawHDi1M8Y+nuecDkvpIyZHqzH5eUYr3qsiAVlfuX8ngvYzZAOONG
+Dx3drJXK50uQe7FLqdTF65raqtWjlBRGjS0f8zrWkzr2Pnn86Oawde3uPclwx12q
+gUtGJRzHbBXjlU4PqjI3lAoXJJIThFjSY28r9+ZbYgsTF7ANUkz+/m9c4pFuHf2k
+Ytdo+o56T9II2pPc8JIRetDccpMMc5NihWjQ9A==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            d0:1e:40:8b:00:00:02:7c:00:00:00:02:00:00:00:01
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=DSTCA X1, CN=DST RootCA X1/Email=ca@digsigtrust.com
+        Validity
+            Not Before: Dec  1 18:18:55 1998 GMT
+            Not After : Nov 28 18:18:55 2008 GMT
+        Subject: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=DSTCA X1, CN=DST RootCA X1/Email=ca@digsigtrust.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:d2:c6:26:b6:e7:a5:3d:c1:c4:68:d5:50:6f:53:
+                    c5:6f:49:13:09:b8:af:2c:48:8d:14:6a:a3:17:5f:
+                    5a:f9:d3:2e:75:2f:d8:28:62:d1:93:2f:fc:4d:d4:
+                    ab:87:e5:08:c7:99:e7:92:3f:75:bd:eb:25:b4:15:
+                    c1:9b:19:3d:d2:44:8d:d7:74:20:6d:37:02:8f:69:
+                    93:5b:8a:c4:19:9d:f4:b2:0e:fc:16:6c:b9:b1:05:
+                    92:83:d1:85:2c:60:94:3e:45:55:a0:d9:ab:08:21:
+                    e6:60:e8:3b:74:f2:99:50:51:68:d0:03:2d:b1:80:
+                    be:a3:d8:52:b0:44:cd:43:4a:70:8e:58:85:95:e1:
+                    4e:2c:d6:2d:41:6f:d6:84:e7:c8:98:44:ca:47:db:
+                    2c:24:a5:69:26:cf:6b:b8:27:62:c3:f4:c9:7a:92:
+                    23:ed:13:67:82:ae:45:2e:45:e5:7e:72:3f:85:9d:
+                    94:62:10:e6:3c:91:a1:ad:77:00:e0:15:ec:f3:84:
+                    80:72:7a:8e:6e:60:97:c7:24:59:10:34:83:5b:e1:
+                    a5:a4:69:b6:57:35:1c:78:59:c6:d3:2f:3a:73:67:
+                    ee:94:ca:04:13:05:62:06:70:23:b3:f4:7c:ee:45:
+                    d9:64:0b:5b:49:aa:a4:43:ce:26:c4:44:12:6c:b8:
+                    dd:79
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        a2:37:b2:3f:69:fb:d7:86:79:54:49:31:95:33:2b:f3:d1:09:
+        14:49:62:60:86:a5:b0:11:e2:50:c2:1d:06:57:3e:2d:e8:33:
+        64:be:9b:aa:ad:5f:1b:4d:d4:99:95:a2:8b:9a:c9:62:72:b5:
+        69:ea:d9:58:ab:35:ed:15:a2:43:d6:b6:bc:07:79:65:64:73:
+        7d:d7:79:ca:7b:d5:5a:51:c6:e1:53:04:96:8d:38:cf:a3:17:
+        ac:39:71:6b:01:c3:8b:53:3c:63:e9:ee:79:c0:e4:be:92:32:
+        64:7a:b3:1f:97:94:62:bd:ea:b2:20:15:95:fb:97:f2:78:2f:
+        63:36:40:38:e3:46:0f:1d:dd:ac:95:ca:e7:4b:90:7b:b1:4b:
+        a9:d4:c5:eb:9a:da:aa:d5:a3:94:14:46:8d:2d:1f:f3:3a:d6:
+        93:3a:f6:3e:79:fc:e8:e6:b0:75:ed:ee:3d:c9:70:c7:5d:aa:
+        81:4b:46:25:1c:c7:6c:15:e3:95:4e:0f:aa:32:37:94:0a:17:
+        24:92:13:84:58:d2:63:6f:2b:f7:e6:5b:62:0b:13:17:b0:0d:
+        52:4c:fe:fe:6f:5c:e2:91:6e:1d:fd:a4:62:d7:68:fa:8e:7a:
+        4f:d2:08:da:93:dc:f0:92:11:7a:d0:dc:72:93:0c:73:93:62:
+        85:68:d0:f4
+
+Digital Signature Trust Co. Global CA 3
+=======================================
+MD5 Fingerprint: 93:C2:8E:11:7B:D4:F3:03:19:BD:28:75:13:4A:45:4A
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDKTCCApKgAwIBAgIENm7TzjANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJV
+UzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQL
+EwhEU1RDQSBFMjAeFw05ODEyMDkxOTE3MjZaFw0xODEyMDkxOTQ3MjZaMEYxCzAJ
+BgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4x
+ETAPBgNVBAsTCERTVENBIEUyMIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQC/
+k48Xku8zExjrEH9OFr//Bo8qhbxe+SSmJIi2A7fBw18DW9Fvrn5C6mYjuGODVvso
+LeE4i7TuqAHhzhy2iCoiRoX7n6dwqUcUP87eZfCocfdPJmyMvMa1795JJ/9IKn3o
+TQPMx7JSxhcxEzu1TdvIxPbDDyQq2gyd55FbgM2UnQIBA6OCASQwggEgMBEGCWCG
+SAGG+EIBAQQEAwIABzBoBgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMx
+JDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UECxMI
+RFNUQ0EgRTIxDTALBgNVBAMTBENSTDEwKwYDVR0QBCQwIoAPMTk5ODEyMDkxOTE3
+MjZagQ8yMDE4MTIwOTE5MTcyNlowCwYDVR0PBAQDAgEGMB8GA1UdIwQYMBaAFB6C
+TShlgDzJQW6sNS5ay97u+DlbMB0GA1UdDgQWBBQegk0oZYA8yUFurDUuWsve7vg5
+WzAMBgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqG
+SIb3DQEBBQUAA4GBAEeNg61i8tuwnkUiBbmi1gMOOHLnnvx75pO2mqWilMg0HZHR
+xdf0CiUPPXiBng+xZ8SQTGPdXqfiup/1902lMXucKS1M/mQ+7LZT/uqb7YLbdHVL
+B3luHtgZg3Pe9T7Qtd7nS2h9Qy4qIOF+oHhEngj1mPnHfxsb1gYgAlihw6ID
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 913232846 (0x366ed3ce)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Digital Signature Trust Co., OU=DSTCA E2
+        Validity
+            Not Before: Dec  9 19:17:26 1998 GMT
+            Not After : Dec  9 19:47:26 2018 GMT
+        Subject: C=US, O=Digital Signature Trust Co., OU=DSTCA E2
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:bf:93:8f:17:92:ef:33:13:18:eb:10:7f:4e:16:
+                    bf:ff:06:8f:2a:85:bc:5e:f9:24:a6:24:88:b6:03:
+                    b7:c1:c3:5f:03:5b:d1:6f:ae:7e:42:ea:66:23:b8:
+                    63:83:56:fb:28:2d:e1:38:8b:b4:ee:a8:01:e1:ce:
+                    1c:b6:88:2a:22:46:85:fb:9f:a7:70:a9:47:14:3f:
+                    ce:de:65:f0:a8:71:f7:4f:26:6c:8c:bc:c6:b5:ef:
+                    de:49:27:ff:48:2a:7d:e8:4d:03:cc:c7:b2:52:c6:
+                    17:31:13:3b:b5:4d:db:c8:c4:f6:c3:0f:24:2a:da:
+                    0c:9d:e7:91:5b:80:cd:94:9d
+                Exponent: 3 (0x3)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Digital Signature Trust Co./OU=DSTCA E2/CN=CRL1
+
+            X509v3 Private Key Usage Period: 
+                Not Before: Dec  9 19:17:26 1998 GMT, Not After: Dec  9 19:17:26 2018 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:1E:82:4D:28:65:80:3C:C9:41:6E:AC:35:2E:5A:CB:DE:EE:F8:39:5B
+
+            X509v3 Subject Key Identifier: 
+                1E:82:4D:28:65:80:3C:C9:41:6E:AC:35:2E:5A:CB:DE:EE:F8:39:5B
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0
+..V4.0....
+    Signature Algorithm: sha1WithRSAEncryption
+        47:8d:83:ad:62:f2:db:b0:9e:45:22:05:b9:a2:d6:03:0e:38:
+        72:e7:9e:fc:7b:e6:93:b6:9a:a5:a2:94:c8:34:1d:91:d1:c5:
+        d7:f4:0a:25:0f:3d:78:81:9e:0f:b1:67:c4:90:4c:63:dd:5e:
+        a7:e2:ba:9f:f5:f7:4d:a5:31:7b:9c:29:2d:4c:fe:64:3e:ec:
+        b6:53:fe:ea:9b:ed:82:db:74:75:4b:07:79:6e:1e:d8:19:83:
+        73:de:f5:3e:d0:b5:de:e7:4b:68:7d:43:2e:2a:20:e1:7e:a0:
+        78:44:9e:08:f5:98:f9:c7:7f:1b:1b:d6:06:20:02:58:a1:c3:
+        a2:03
+
+Digital Signature Trust Co. Global CA 4
+=======================================
+MD5 Fingerprint: CD:3B:3D:62:5B:09:B8:09:36:87:9E:12:2F:71:64:BA
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIID2DCCAsACEQDQHkCLAAB3bQAAAAEAAAAEMA0GCSqGSIb3DQEBBQUAMIGpMQsw
+CQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENp
+dHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UE
+CxMIRFNUQ0EgWDIxFjAUBgNVBAMTDURTVCBSb290Q0EgWDIxITAfBgkqhkiG9w0B
+CQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTAeFw05ODExMzAyMjQ2MTZaFw0wODExMjcy
+MjQ2MTZaMIGpMQswCQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMO
+U2FsdCBMYWtlIENpdHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0
+IENvLjERMA8GA1UECxMIRFNUQ0EgWDIxFjAUBgNVBAMTDURTVCBSb290Q0EgWDIx
+ITAfBgkqhkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTCCASIwDQYJKoZIhvcN
+AQEBBQADggEPADCCAQoCggEBANx18IzAdZaawGIfJvfE4Zrq4FZzW5nNAUSoCLbV
+p9oaBBg5kkp4o4HC9Xd6ULRw/5qrxsfKboNPQpj7Jgva3G3WqZlVUmfpKAOS3OWw
+BZoPFflrWXJW8vo5/Kpo7g8fEIMv/J36F5bdguPmRX3AS4BEH+0s4IT9kVySVGkl
+5WJp3OXuAFK9MwutdQKFp2RQLcUZGTDAJtvJ0/0uma1ZtQtN1EGuhUhDWdy3qOKi
+3sOP17ihYqZoUFLkzzGnlIXan0YyF1bl8utmPRL/Q9uY73fPy4GNNLHGUEom0eQ+
+QVCvbK4iNC7Va26Dunm4dmVI2gkpZGMiuftHdoWMhkTLCdsCAwEAATANBgkqhkiG
+9w0BAQUFAAOCAQEAtTYOXeFhKFoRZcA/gwN5Tb4opgsHAlKFzfiR0BBstWogWxyQ
+2TA8xkieil5k+aFxd+8EJx8H6+Qm93N0yUQYGmbT4EOvkTvRyyzYdFQ6HE3K1GjN
+I3wdEJ5F6fYAbqbNGf9PLCmPV03Ed5K+4EwJ+11EhmYhqLkyolbV6YyDfFk/xPEL
+553snr2cGA4+wjl5KLcDDQjLxufZATdQEOzMYRZA1K8xdHv8PzGn0EdzMzkbzE5q
+10mDEQb+64JYMzJM8FasHpwvVpp7wUocpf1VNs78lk30sPDst2yC7S8xmUJMqbIN
+uBVd8d+6ybVK1GSYsyapMMj9puyrliGtf8J4tg==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            d0:1e:40:8b:00:00:77:6d:00:00:00:01:00:00:00:04
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=DSTCA X2, CN=DST RootCA X2/Email=ca@digsigtrust.com
+        Validity
+            Not Before: Nov 30 22:46:16 1998 GMT
+            Not After : Nov 27 22:46:16 2008 GMT
+        Subject: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=DSTCA X2, CN=DST RootCA X2/Email=ca@digsigtrust.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:dc:75:f0:8c:c0:75:96:9a:c0:62:1f:26:f7:c4:
+                    e1:9a:ea:e0:56:73:5b:99:cd:01:44:a8:08:b6:d5:
+                    a7:da:1a:04:18:39:92:4a:78:a3:81:c2:f5:77:7a:
+                    50:b4:70:ff:9a:ab:c6:c7:ca:6e:83:4f:42:98:fb:
+                    26:0b:da:dc:6d:d6:a9:99:55:52:67:e9:28:03:92:
+                    dc:e5:b0:05:9a:0f:15:f9:6b:59:72:56:f2:fa:39:
+                    fc:aa:68:ee:0f:1f:10:83:2f:fc:9d:fa:17:96:dd:
+                    82:e3:e6:45:7d:c0:4b:80:44:1f:ed:2c:e0:84:fd:
+                    91:5c:92:54:69:25:e5:62:69:dc:e5:ee:00:52:bd:
+                    33:0b:ad:75:02:85:a7:64:50:2d:c5:19:19:30:c0:
+                    26:db:c9:d3:fd:2e:99:ad:59:b5:0b:4d:d4:41:ae:
+                    85:48:43:59:dc:b7:a8:e2:a2:de:c3:8f:d7:b8:a1:
+                    62:a6:68:50:52:e4:cf:31:a7:94:85:da:9f:46:32:
+                    17:56:e5:f2:eb:66:3d:12:ff:43:db:98:ef:77:cf:
+                    cb:81:8d:34:b1:c6:50:4a:26:d1:e4:3e:41:50:af:
+                    6c:ae:22:34:2e:d5:6b:6e:83:ba:79:b8:76:65:48:
+                    da:09:29:64:63:22:b9:fb:47:76:85:8c:86:44:cb:
+                    09:db
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        b5:36:0e:5d:e1:61:28:5a:11:65:c0:3f:83:03:79:4d:be:28:
+        a6:0b:07:02:52:85:cd:f8:91:d0:10:6c:b5:6a:20:5b:1c:90:
+        d9:30:3c:c6:48:9e:8a:5e:64:f9:a1:71:77:ef:04:27:1f:07:
+        eb:e4:26:f7:73:74:c9:44:18:1a:66:d3:e0:43:af:91:3b:d1:
+        cb:2c:d8:74:54:3a:1c:4d:ca:d4:68:cd:23:7c:1d:10:9e:45:
+        e9:f6:00:6e:a6:cd:19:ff:4f:2c:29:8f:57:4d:c4:77:92:be:
+        e0:4c:09:fb:5d:44:86:66:21:a8:b9:32:a2:56:d5:e9:8c:83:
+        7c:59:3f:c4:f1:0b:e7:9d:ec:9e:bd:9c:18:0e:3e:c2:39:79:
+        28:b7:03:0d:08:cb:c6:e7:d9:01:37:50:10:ec:cc:61:16:40:
+        d4:af:31:74:7b:fc:3f:31:a7:d0:47:73:33:39:1b:cc:4e:6a:
+        d7:49:83:11:06:fe:eb:82:58:33:32:4c:f0:56:ac:1e:9c:2f:
+        56:9a:7b:c1:4a:1c:a5:fd:55:36:ce:fc:96:4d:f4:b0:f0:ec:
+        b7:6c:82:ed:2f:31:99:42:4c:a9:b2:0d:b8:15:5d:f1:df:ba:
+        c9:b5:4a:d4:64:98:b3:26:a9:30:c8:fd:a6:ec:ab:96:21:ad:
+        7f:c2:78:b6
+
+Entrust Worldwide by DST
+========================
+MD5 Fingerprint: B4:65:22:0A:7C:AD:DF:41:B7:D5:44:D5:AD:FA:9A:75
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDRzCCArCgAwIBAgIENm3FGDANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJV
+UzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRswGQYDVQQL
+ExJEU1QtRW50cnVzdCBHVEkgQ0EwHhcNOTgxMjA5MDAwMjI0WhcNMTgxMjA5MDAz
+MjI0WjBQMQswCQYDVQQGEwJVUzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUg
+VHJ1c3QgQ28uMRswGQYDVQQLExJEU1QtRW50cnVzdCBHVEkgQ0EwgZ0wDQYJKoZI
+hvcNAQEBBQADgYsAMIGHAoGBALYd90uNDxPjEvUJ/gYyDq9MQfV91Ec9KgrfgwXe
+3n3mAxb2UTrLRxpKrX7E/R20vnSKeN0Lg460hBPE+/htKa6h4Q8PQ+O1XmBp+oOU
+/Hnm3Hbt0UQrjv0Su/4XdxcMie2n71F9xO04wzujevviTaBgtfL9E2XTxuw/vjWc
+PSLvAgEDo4IBLjCCASowEQYJYIZIAYb4QgEBBAQDAgAHMHIGA1UdHwRrMGkwZ6Bl
+oGOkYTBfMQswCQYDVQQGEwJVUzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUg
+VHJ1c3QgQ28uMRswGQYDVQQLExJEU1QtRW50cnVzdCBHVEkgQ0ExDTALBgNVBAMT
+BENSTDEwKwYDVR0QBCQwIoAPMTk5ODEyMDkwMDAyMjRagQ8yMDE4MTIwOTAwMDIy
+NFowCwYDVR0PBAQDAgEGMB8GA1UdIwQYMBaAFJOaRMrQeFOAKUkE38evMz+ZdV+u
+MB0GA1UdDgQWBBSTmkTK0HhTgClJBN/HrzM/mXVfrjAMBgNVHRMEBTADAQH/MBkG
+CSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4GBAGSJzAOn
+3AryWCDn/RegKHLNh7DNmLUkR2MzMRAQsu+KV3KuTAPgZ5+sYEOEIsGpo+Wxp94J
+1M8NeEYjW49Je/4TIpeU6nJI4SwgeJbpZkUZywllY2E/0UmYsXYQVdVjSmZLpAdr
+3nt/ueaTWxoCW4AO3Y0Y1Iqjwmjxo+AY0U5M
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 913163544 (0x366dc518)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Digital Signature Trust Co., OU=DST-Entrust GTI CA
+        Validity
+            Not Before: Dec  9 00:02:24 1998 GMT
+            Not After : Dec  9 00:32:24 2018 GMT
+        Subject: C=US, O=Digital Signature Trust Co., OU=DST-Entrust GTI CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b6:1d:f7:4b:8d:0f:13:e3:12:f5:09:fe:06:32:
+                    0e:af:4c:41:f5:7d:d4:47:3d:2a:0a:df:83:05:de:
+                    de:7d:e6:03:16:f6:51:3a:cb:47:1a:4a:ad:7e:c4:
+                    fd:1d:b4:be:74:8a:78:dd:0b:83:8e:b4:84:13:c4:
+                    fb:f8:6d:29:ae:a1:e1:0f:0f:43:e3:b5:5e:60:69:
+                    fa:83:94:fc:79:e6:dc:76:ed:d1:44:2b:8e:fd:12:
+                    bb:fe:17:77:17:0c:89:ed:a7:ef:51:7d:c4:ed:38:
+                    c3:3b:a3:7a:fb:e2:4d:a0:60:b5:f2:fd:13:65:d3:
+                    c6:ec:3f:be:35:9c:3d:22:ef
+                Exponent: 3 (0x3)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Digital Signature Trust Co./OU=DST-Entrust GTI CA/CN=CRL1
+
+            X509v3 Private Key Usage Period: 
+                Not Before: Dec  9 00:02:24 1998 GMT, Not After: Dec  9 00:02:24 2018 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:93:9A:44:CA:D0:78:53:80:29:49:04:DF:C7:AF:33:3F:99:75:5F:AE
+
+            X509v3 Subject Key Identifier: 
+                93:9A:44:CA:D0:78:53:80:29:49:04:DF:C7:AF:33:3F:99:75:5F:AE
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0
+..V4.0....
+    Signature Algorithm: sha1WithRSAEncryption
+        64:89:cc:03:a7:dc:0a:f2:58:20:e7:fd:17:a0:28:72:cd:87:
+        b0:cd:98:b5:24:47:63:33:31:10:10:b2:ef:8a:57:72:ae:4c:
+        03:e0:67:9f:ac:60:43:84:22:c1:a9:a3:e5:b1:a7:de:09:d4:
+        cf:0d:78:46:23:5b:8f:49:7b:fe:13:22:97:94:ea:72:48:e1:
+        2c:20:78:96:e9:66:45:19:cb:09:65:63:61:3f:d1:49:98:b1:
+        76:10:55:d5:63:4a:66:4b:a4:07:6b:de:7b:7f:b9:e6:93:5b:
+        1a:02:5b:80:0e:dd:8d:18:d4:8a:a3:c2:68:f1:a3:e0:18:d1:
+        4e:4c
+
+Entrust.net Premium 2048 Secure Server CA
+=========================================
+MD5 Fingerprint: BA:21:EA:20:D6:DD:DB:8F:C1:57:8B:40:AD:A1:FC:FC
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEXDCCA0SgAwIBAgIEOGO5ZjANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChML
+RW50cnVzdC5uZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBp
+bmNvcnAuIGJ5IHJlZi4gKGxpbWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5
+IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNVBAMTKkVudHJ1c3QubmV0IENlcnRp
+ZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQxNzUwNTFaFw0xOTEy
+MjQxODIwNTFaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3d3d3
+LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxp
+YWIuKTElMCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEG
+A1UEAxMqRW50cnVzdC5uZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgp
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArU1LqRKGsuqjIAcVFmQq
+K0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOLGp18EzoOH1u3Hs/lJBQe
+sYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSrhRSGlVuX
+MlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVT
+XTzWnLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/
+HoZdenoVve8AjhUiVBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH
+4QIDAQABo3QwcjARBglghkgBhvhCAQEEBAMCAAcwHwYDVR0jBBgwFoAUVeSB0RGA
+vtiJuQijMfmhJAkWuXAwHQYDVR0OBBYEFFXkgdERgL7YibkIozH5oSQJFrlwMB0G
+CSqGSIb2fQdBAAQQMA4bCFY1LjA6NC4wAwIEkDANBgkqhkiG9w0BAQUFAAOCAQEA
+WUesIYSKF8mciVMeuoCFGsY8Tj6xnLZ8xpJdGGQC49MGCBFhfGPjK50xA3B20qMo
+oPS7mmNz7W3lKtvtFKkrxjYR0CvrB4ul2p5cGZ1WEvVUKcgF7bISKo30Axv/55IQ
+h7A6tcOdBTcSo8f0FbnVpDkWm1M6I5HxqIKiaohowXkCIryqptau37AUX7iH0N18
+f3v/rxzP5tsHrV7bhZ3QKw0z2wTR5klAEyt2+z7pnIkPFc4YsIV4IU9rTw76NmfN
+B/L/CNDi3tm/Kq+4h4YhPATKt5Rof8886ZjXOP/swNlQ8C5LWK5Gb9Auw2DaclVy
+vUxFnmG6v4SBkgPR0ml8xQ==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 946059622 (0x3863b966)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: O=Entrust.net, OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Certification Authority (2048)
+        Validity
+            Not Before: Dec 24 17:50:51 1999 GMT
+            Not After : Dec 24 18:20:51 2019 GMT
+        Subject: O=Entrust.net, OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Certification Authority (2048)
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:ad:4d:4b:a9:12:86:b2:ea:a3:20:07:15:16:64:
+                    2a:2b:4b:d1:bf:0b:4a:4d:8e:ed:80:76:a5:67:b7:
+                    78:40:c0:73:42:c8:68:c0:db:53:2b:dd:5e:b8:76:
+                    98:35:93:8b:1a:9d:7c:13:3a:0e:1f:5b:b7:1e:cf:
+                    e5:24:14:1e:b1:81:a9:8d:7d:b8:cc:6b:4b:03:f1:
+                    02:0c:dc:ab:a5:40:24:00:7f:74:94:a1:9d:08:29:
+                    b3:88:0b:f5:87:77:9d:55:cd:e4:c3:7e:d7:6a:64:
+                    ab:85:14:86:95:5b:97:32:50:6f:3d:c8:ba:66:0c:
+                    e3:fc:bd:b8:49:c1:76:89:49:19:fd:c0:a8:bd:89:
+                    a3:67:2f:c6:9f:bc:71:19:60:b8:2d:e9:2c:c9:90:
+                    76:66:7b:94:e2:af:78:d6:65:53:5d:3c:d6:9c:b2:
+                    cf:29:03:f9:2f:a4:50:b2:d4:48:ce:05:32:55:8a:
+                    fd:b2:64:4c:0e:e4:98:07:75:db:7f:df:b9:08:55:
+                    60:85:30:29:f9:7b:48:a4:69:86:e3:35:3f:1e:86:
+                    5d:7a:7a:15:bd:ef:00:8e:15:22:54:17:00:90:26:
+                    93:bc:0e:49:68:91:bf:f8:47:d3:9d:95:42:c1:0e:
+                    4d:df:6f:26:cf:c3:18:21:62:66:43:70:d6:d5:c0:
+                    07:e1
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 Authority Key Identifier: 
+                keyid:55:E4:81:D1:11:80:BE:D8:89:B9:08:A3:31:F9:A1:24:09:16:B9:70
+
+            X509v3 Subject Key Identifier: 
+                55:E4:81:D1:11:80:BE:D8:89:B9:08:A3:31:F9:A1:24:09:16:B9:70
+            1.2.840.113533.7.65.0: 
+                0...V5.0:4.0....
+    Signature Algorithm: sha1WithRSAEncryption
+        59:47:ac:21:84:8a:17:c9:9c:89:53:1e:ba:80:85:1a:c6:3c:
+        4e:3e:b1:9c:b6:7c:c6:92:5d:18:64:02:e3:d3:06:08:11:61:
+        7c:63:e3:2b:9d:31:03:70:76:d2:a3:28:a0:f4:bb:9a:63:73:
+        ed:6d:e5:2a:db:ed:14:a9:2b:c6:36:11:d0:2b:eb:07:8b:a5:
+        da:9e:5c:19:9d:56:12:f5:54:29:c8:05:ed:b2:12:2a:8d:f4:
+        03:1b:ff:e7:92:10:87:b0:3a:b5:c3:9d:05:37:12:a3:c7:f4:
+        15:b9:d5:a4:39:16:9b:53:3a:23:91:f1:a8:82:a2:6a:88:68:
+        c1:79:02:22:bc:aa:a6:d6:ae:df:b0:14:5f:b8:87:d0:dd:7c:
+        7f:7b:ff:af:1c:cf:e6:db:07:ad:5e:db:85:9d:d0:2b:0d:33:
+        db:04:d1:e6:49:40:13:2b:76:fb:3e:e9:9c:89:0f:15:ce:18:
+        b0:85:78:21:4f:6b:4f:0e:fa:36:67:cd:07:f2:ff:08:d0:e2:
+        de:d9:bf:2a:af:b8:87:86:21:3c:04:ca:b7:94:68:7f:cf:3c:
+        e9:98:d7:38:ff:ec:c0:d9:50:f0:2e:4b:58:ae:46:6f:d0:2e:
+        c3:60:da:72:55:72:bd:4c:45:9e:61:ba:bf:84:81:92:03:d1:
+        d2:69:7c:c5
+
+Entrust.net Secure Personal CA
+==============================
+MD5 Fingerprint: 0C:41:2F:13:5B:A0:54:F5:96:66:2D:7E:CD:0E:03:F4
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIE7TCCBFagAwIBAgIEOAOR7jANBgkqhkiG9w0BAQQFADCByTELMAkGA1UEBhMC
+VVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MUgwRgYDVQQLFD93d3cuZW50cnVzdC5u
+ZXQvQ2xpZW50X0NBX0luZm8vQ1BTIGluY29ycC4gYnkgcmVmLiBsaW1pdHMgbGlh
+Yi4xJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNV
+BAMTKkVudHJ1c3QubmV0IENsaWVudCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAe
+Fw05OTEwMTIxOTI0MzBaFw0xOTEwMTIxOTU0MzBaMIHJMQswCQYDVQQGEwJVUzEU
+MBIGA1UEChMLRW50cnVzdC5uZXQxSDBGBgNVBAsUP3d3dy5lbnRydXN0Lm5ldC9D
+bGllbnRfQ0FfSW5mby9DUFMgaW5jb3JwLiBieSByZWYuIGxpbWl0cyBsaWFiLjEl
+MCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMq
+RW50cnVzdC5uZXQgQ2xpZW50IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGdMA0G
+CSqGSIb3DQEBAQUAA4GLADCBhwKBgQDIOpleMRffrCdvkHvkGf9FozTC28GoT/Bo
+6oT9n3V5z8GKUZSvx1cDR2SerYIbWtp/N3hHuzeYEpbOxhN979IMMFGpOZ5V+Pux
+5zDeg7K6PvHViTs7hbqqdCz+PzFur5GVbgbUB01LLFZHGARS2g4Qk79jkJvh34zm
+AqTmT173iwIBA6OCAeAwggHcMBEGCWCGSAGG+EIBAQQEAwIABzCCASIGA1UdHwSC
+ARkwggEVMIHkoIHhoIHepIHbMIHYMQswCQYDVQQGEwJVUzEUMBIGA1UEChMLRW50
+cnVzdC5uZXQxSDBGBgNVBAsUP3d3dy5lbnRydXN0Lm5ldC9DbGllbnRfQ0FfSW5m
+by9DUFMgaW5jb3JwLiBieSByZWYuIGxpbWl0cyBsaWFiLjElMCMGA1UECxMcKGMp
+IDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMqRW50cnVzdC5uZXQg
+Q2xpZW50IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCyg
+KqAohiZodHRwOi8vd3d3LmVudHJ1c3QubmV0L0NSTC9DbGllbnQxLmNybDArBgNV
+HRAEJDAigA8xOTk5MTAxMjE5MjQzMFqBDzIwMTkxMDEyMTkyNDMwWjALBgNVHQ8E
+BAMCAQYwHwYDVR0jBBgwFoAUxPucKXuXzUyW/O5bs8qZdIuV6kwwHQYDVR0OBBYE
+FMT7nCl7l81MlvzuW7PKmXSLlepMMAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EA
+BAwwChsEVjQuMAMCBJAwDQYJKoZIhvcNAQEEBQADgYEAP66K8ddmAwWePvrqHEa7
+pFuPeJoSSJn59DXeDDYHAmsQOokUgZwxpnyyQbJq5wcBoUv5nyU7lsqZwz6hURzz
+wy5E97BnRqqS5TvaHBkUODDV4qIxJS7x7EU47fgGWANzYrAQMY9Av2TgXD7FTx/a
+EkP/TOYGJqibGapEPHayXOw=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 939758062 (0x380391ee)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=US, O=Entrust.net, OU=www.entrust.net/Client_CA_Info/CPS incorp. by ref. limits liab., OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Client Certification Authority
+        Validity
+            Not Before: Oct 12 19:24:30 1999 GMT
+            Not After : Oct 12 19:54:30 2019 GMT
+        Subject: C=US, O=Entrust.net, OU=www.entrust.net/Client_CA_Info/CPS incorp. by ref. limits liab., OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Client Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:c8:3a:99:5e:31:17:df:ac:27:6f:90:7b:e4:19:
+                    ff:45:a3:34:c2:db:c1:a8:4f:f0:68:ea:84:fd:9f:
+                    75:79:cf:c1:8a:51:94:af:c7:57:03:47:64:9e:ad:
+                    82:1b:5a:da:7f:37:78:47:bb:37:98:12:96:ce:c6:
+                    13:7d:ef:d2:0c:30:51:a9:39:9e:55:f8:fb:b1:e7:
+                    30:de:83:b2:ba:3e:f1:d5:89:3b:3b:85:ba:aa:74:
+                    2c:fe:3f:31:6e:af:91:95:6e:06:d4:07:4d:4b:2c:
+                    56:47:18:04:52:da:0e:10:93:bf:63:90:9b:e1:df:
+                    8c:e6:02:a4:e6:4f:5e:f7:8b
+                Exponent: 3 (0x3)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Entrust.net/OU=www.entrust.net/Client_CA_Info/CPS incorp. by ref. limits liab./OU=(c) 1999 Entrust.net Limited/CN=Entrust.net Client Certification Authority/CN=CRL1
+                URI:http://www.entrust.net/CRL/Client1.crl
+
+            X509v3 Private Key Usage Period: 
+                Not Before: Oct 12 19:24:30 1999 GMT, Not After: Oct 12 19:24:30 2019 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:C4:FB:9C:29:7B:97:CD:4C:96:FC:EE:5B:B3:CA:99:74:8B:95:EA:4C
+
+            X509v3 Subject Key Identifier: 
+                C4:FB:9C:29:7B:97:CD:4C:96:FC:EE:5B:B3:CA:99:74:8B:95:EA:4C
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0
+..V4.0....
+    Signature Algorithm: md5WithRSAEncryption
+        3f:ae:8a:f1:d7:66:03:05:9e:3e:fa:ea:1c:46:bb:a4:5b:8f:
+        78:9a:12:48:99:f9:f4:35:de:0c:36:07:02:6b:10:3a:89:14:
+        81:9c:31:a6:7c:b2:41:b2:6a:e7:07:01:a1:4b:f9:9f:25:3b:
+        96:ca:99:c3:3e:a1:51:1c:f3:c3:2e:44:f7:b0:67:46:aa:92:
+        e5:3b:da:1c:19:14:38:30:d5:e2:a2:31:25:2e:f1:ec:45:38:
+        ed:f8:06:58:03:73:62:b0:10:31:8f:40:bf:64:e0:5c:3e:c5:
+        4f:1f:da:12:43:ff:4c:e6:06:26:a8:9b:19:aa:44:3c:76:b2:
+        5c:ec
+
+Entrust.net Secure Server CA
+============================
+MD5 Fingerprint: DF:F2:80:73:CC:F1:E6:61:73:FC:F5:42:E9:C5:7C:EE
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMC
+VVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5u
+ZXQvQ1BTIGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMc
+KGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDE6MDgGA1UEAxMxRW50cnVzdC5u
+ZXQgU2VjdXJlIFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05OTA1
+MjUxNjA5NDBaFw0xOTA1MjUxNjM5NDBaMIHDMQswCQYDVQQGEwJVUzEUMBIGA1UE
+ChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5j
+b3JwLiBieSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBF
+bnRydXN0Lm5ldCBMaW1pdGVkMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUg
+U2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGdMA0GCSqGSIb3DQEBAQUA
+A4GLADCBhwKBgQDNKIM0VBuJ8w+vN5Ex/68xYMmo6LIQaO2f55M28Qpku0f1BBc/
+I0dNxScZgSYMVHINiC3ZH5oSn7yzcdOAGT9HZnuMNSjSuQrfJNqc1lB5gXpa0zf3
+wkrYKZImZNHkmGw6AIr1NJtl+O3jEP/9uElY3KDegjlrgbEWGWG5VLbmQwIBA6OC
+AdcwggHTMBEGCWCGSAGG+EIBAQQEAwIABzCCARkGA1UdHwSCARAwggEMMIHeoIHb
+oIHYpIHVMIHSMQswCQYDVQQGEwJVUzEUMBIGA1UEChMLRW50cnVzdC5uZXQxOzA5
+BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5jb3JwLiBieSByZWYuIChsaW1p
+dHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBFbnRydXN0Lm5ldCBMaW1pdGVk
+MTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENlcnRpZmljYXRp
+b24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCmgJ6AlhiNodHRwOi8vd3d3LmVu
+dHJ1c3QubmV0L0NSTC9uZXQxLmNybDArBgNVHRAEJDAigA8xOTk5MDUyNTE2MDk0
+MFqBDzIwMTkwNTI1MTYwOTQwWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAU8Bdi
+E1U9s/8KAGv7UISX8+1i0BowHQYDVR0OBBYEFPAXYhNVPbP/CgBr+1CEl/PtYtAa
+MAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EABAwwChsEVjQuMAMCBJAwDQYJKoZI
+hvcNAQEFBQADgYEAkNwwAvpkdMKnCqV8IY00F6j7Rw7/JXyNEwr75Ji174z4xRAN
+95K+8cPV1ZVqBLssziY2ZcgxxufuP+NXdYR6Ee9GTxj005i7qIcyunL2POI9n9cd
+2cNgQ4xYDiKWL2KjLB+6rQXvqzJ4h6BUcxm1XAX5Uj5tLUUL9wqT6u0G+bI=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 927650371 (0x374ad243)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Entrust.net, OU=www.entrust.net/CPS incorp. by ref. (limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Secure Server Certification Authority
+        Validity
+            Not Before: May 25 16:09:40 1999 GMT
+            Not After : May 25 16:39:40 2019 GMT
+        Subject: C=US, O=Entrust.net, OU=www.entrust.net/CPS incorp. by ref. (limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Secure Server Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:cd:28:83:34:54:1b:89:f3:0f:af:37:91:31:ff:
+                    af:31:60:c9:a8:e8:b2:10:68:ed:9f:e7:93:36:f1:
+                    0a:64:bb:47:f5:04:17:3f:23:47:4d:c5:27:19:81:
+                    26:0c:54:72:0d:88:2d:d9:1f:9a:12:9f:bc:b3:71:
+                    d3:80:19:3f:47:66:7b:8c:35:28:d2:b9:0a:df:24:
+                    da:9c:d6:50:79:81:7a:5a:d3:37:f7:c2:4a:d8:29:
+                    92:26:64:d1:e4:98:6c:3a:00:8a:f5:34:9b:65:f8:
+                    ed:e3:10:ff:fd:b8:49:58:dc:a0:de:82:39:6b:81:
+                    b1:16:19:61:b9:54:b6:e6:43
+                Exponent: 3 (0x3)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Entrust.net/OU=www.entrust.net/CPS incorp. by ref. (limits liab.)/OU=(c) 1999 Entrust.net Limited/CN=Entrust.net Secure Server Certification Authority/CN=CRL1
+                URI:http://www.entrust.net/CRL/net1.crl
+
+            X509v3 Private Key Usage Period: 
+                Not Before: May 25 16:09:40 1999 GMT, Not After: May 25 16:09:40 2019 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:F0:17:62:13:55:3D:B3:FF:0A:00:6B:FB:50:84:97:F3:ED:62:D0:1A
+
+            X509v3 Subject Key Identifier: 
+                F0:17:62:13:55:3D:B3:FF:0A:00:6B:FB:50:84:97:F3:ED:62:D0:1A
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0
+..V4.0....
+    Signature Algorithm: sha1WithRSAEncryption
+        90:dc:30:02:fa:64:74:c2:a7:0a:a5:7c:21:8d:34:17:a8:fb:
+        47:0e:ff:25:7c:8d:13:0a:fb:e4:98:b5:ef:8c:f8:c5:10:0d:
+        f7:92:be:f1:c3:d5:d5:95:6a:04:bb:2c:ce:26:36:65:c8:31:
+        c6:e7:ee:3f:e3:57:75:84:7a:11:ef:46:4f:18:f4:d3:98:bb:
+        a8:87:32:ba:72:f6:3c:e2:3d:9f:d7:1d:d9:c3:60:43:8c:58:
+        0e:22:96:2f:62:a3:2c:1f:ba:ad:05:ef:ab:32:78:87:a0:54:
+        73:19:b5:5c:05:f9:52:3e:6d:2d:45:0b:f7:0a:93:ea:ed:06:
+        f9:b2
+
+Equifax Premium CA
+==================
+MD5 Fingerprint: A9:E9:A8:9D:0E:73:E3:B1:2F:37:0D:E8:48:3F:86:ED
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDIzCCAoygAwIBAgIENeHvHjANBgkqhkiG9w0BAQUFADBPMQswCQYDVQQGEwJV
+UzEQMA4GA1UEChMHRXF1aWZheDEuMCwGA1UECxMlRXF1aWZheCBQcmVtaXVtIENl
+cnRpZmljYXRlIEF1dGhvcml0eTAeFw05ODA4MjQyMjU0MjNaFw0xODA4MjQyMjU0
+MjNaME8xCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFcXVpZmF4MS4wLAYDVQQLEyVF
+cXVpZmF4IFByZW1pdW0gQ2VydGlmaWNhdGUgQXV0aG9yaXR5MIGfMA0GCSqGSIb3
+DQEBAQUAA4GNADCBiQKBgQDOoQaOBswIC8GGqN4g1Q0O0Q3En+pq2bPCMkdAb4qI
+pAm9OCwd5svmpPM269rrvPxkswf2Lbyqzp8ZSGhK/PWiRX4JEPWPs0lcIwY56hOL
+uAvNkR12X9k3oUT7X5DyZ7PNGJlDH3YSawLylYM4Q8L2YjTKyXhdX9LYupr/vhBg
+WwIDAQABo4IBCjCCAQYwcQYDVR0fBGowaDBmoGSgYqRgMF4xCzAJBgNVBAYTAlVT
+MRAwDgYDVQQKEwdFcXVpZmF4MS4wLAYDVQQLEyVFcXVpZmF4IFByZW1pdW0gQ2Vy
+dGlmaWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIw
+MTgwODI0MjI1NDIzWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUFe6yKFmrbuX4
+z4uB9CThrj91G5gwHQYDVR0OBBYEFBXusihZq27l+M+LgfQk4a4/dRuYMAwGA1Ud
+EwQFMAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEB
+BQUAA4GBAL0LnCepA9so3JipS9DRjqeoGlqR4Jzx9xh8LiKeNh/JqLXNRkpu+jUH
+G4YI65/iqPmdQS06rlxctl80BOv8KmCw+3TkhellOJbuFcfGd2MSvYpoH6tsfdrK
+XBPO6snrCVzFc+cSAdXZUwee4A+W8Iu0u0VIn4bFGVWgy5bFA/xI
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 903999262 (0x35e1ef1e)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Equifax, OU=Equifax Premium Certificate Authority
+        Validity
+            Not Before: Aug 24 22:54:23 1998 GMT
+            Not After : Aug 24 22:54:23 2018 GMT
+        Subject: C=US, O=Equifax, OU=Equifax Premium Certificate Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:ce:a1:06:8e:06:cc:08:0b:c1:86:a8:de:20:d5:
+                    0d:0e:d1:0d:c4:9f:ea:6a:d9:b3:c2:32:47:40:6f:
+                    8a:88:a4:09:bd:38:2c:1d:e6:cb:e6:a4:f3:36:eb:
+                    da:eb:bc:fc:64:b3:07:f6:2d:bc:aa:ce:9f:19:48:
+                    68:4a:fc:f5:a2:45:7e:09:10:f5:8f:b3:49:5c:23:
+                    06:39:ea:13:8b:b8:0b:cd:91:1d:76:5f:d9:37:a1:
+                    44:fb:5f:90:f2:67:b3:cd:18:99:43:1f:76:12:6b:
+                    02:f2:95:83:38:43:c2:f6:62:34:ca:c9:78:5d:5f:
+                    d2:d8:ba:9a:ff:be:10:60:5b
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Equifax/OU=Equifax Premium Certificate Authority/CN=CRL1
+
+            X509v3 Private Key Usage Period: 
+                Not After: Aug 24 22:54:23 2018 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:15:EE:B2:28:59:AB:6E:E5:F8:CF:8B:81:F4:24:E1:AE:3F:75:1B:98
+
+            X509v3 Subject Key Identifier: 
+                15:EE:B2:28:59:AB:6E:E5:F8:CF:8B:81:F4:24:E1:AE:3F:75:1B:98
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0...V3.0c....
+    Signature Algorithm: sha1WithRSAEncryption
+        bd:0b:9c:27:a9:03:db:28:dc:98:a9:4b:d0:d1:8e:a7:a8:1a:
+        5a:91:e0:9c:f1:f7:18:7c:2e:22:9e:36:1f:c9:a8:b5:cd:46:
+        4a:6e:fa:35:07:1b:86:08:eb:9f:e2:a8:f9:9d:41:2d:3a:ae:
+        5c:5c:b6:5f:34:04:eb:fc:2a:60:b0:fb:74:e4:85:e9:65:38:
+        96:ee:15:c7:c6:77:63:12:bd:8a:68:1f:ab:6c:7d:da:ca:5c:
+        13:ce:ea:c9:eb:09:5c:c5:73:e7:12:01:d5:d9:53:07:9e:e0:
+        0f:96:f0:8b:b4:bb:45:48:9f:86:c5:19:55:a0:cb:96:c5:03:
+        fc:48
+
+Equifax Secure CA
+=================
+MD5 Fingerprint: 67:CB:9D:C0:13:24:8A:82:9B:B2:17:1E:D1:1B:EC:D4
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
+UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy
+dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1
+MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx
+dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B
+AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f
+BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A
+cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC
+AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ
+MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm
+aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw
+ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj
+IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF
+MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA
+A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y
+7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh
+1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 903804111 (0x35def4cf)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Equifax, OU=Equifax Secure Certificate Authority
+        Validity
+            Not Before: Aug 22 16:41:51 1998 GMT
+            Not After : Aug 22 16:41:51 2018 GMT
+        Subject: C=US, O=Equifax, OU=Equifax Secure Certificate Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:c1:5d:b1:58:67:08:62:ee:a0:9a:2d:1f:08:6d:
+                    91:14:68:98:0a:1e:fe:da:04:6f:13:84:62:21:c3:
+                    d1:7c:ce:9f:05:e0:b8:01:f0:4e:34:ec:e2:8a:95:
+                    04:64:ac:f1:6b:53:5f:05:b3:cb:67:80:bf:42:02:
+                    8e:fe:dd:01:09:ec:e1:00:14:4f:fc:fb:f0:0c:dd:
+                    43:ba:5b:2b:e1:1f:80:70:99:15:57:93:16:f1:0f:
+                    97:6a:b7:c2:68:23:1c:cc:4d:59:30:ac:51:1e:3b:
+                    af:2b:d6:ee:63:45:7b:c5:d9:5f:50:d2:e3:50:0f:
+                    3a:88:e7:bf:14:fd:e0:c7:b9
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority/CN=CRL1
+
+            X509v3 Private Key Usage Period: 
+                Not After: Aug 22 16:41:51 2018 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:48:E6:68:F9:2B:D2:B2:95:D7:47:D8:23:20:10:4F:33:98:90:9F:D4
+
+            X509v3 Subject Key Identifier: 
+                48:E6:68:F9:2B:D2:B2:95:D7:47:D8:23:20:10:4F:33:98:90:9F:D4
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0...V3.0c....
+    Signature Algorithm: sha1WithRSAEncryption
+        58:ce:29:ea:fc:f7:de:b5:ce:02:b9:17:b5:85:d1:b9:e3:e0:
+        95:cc:25:31:0d:00:a6:92:6e:7f:b6:92:63:9e:50:95:d1:9a:
+        6f:e4:11:de:63:85:6e:98:ee:a8:ff:5a:c8:d3:55:b2:66:71:
+        57:de:c0:21:eb:3d:2a:a7:23:49:01:04:86:42:7b:fc:ee:7f:
+        a2:16:52:b5:67:67:d3:40:db:3b:26:58:b2:28:77:3d:ae:14:
+        77:61:d6:fa:2a:66:27:a0:0d:fa:a7:73:5c:ea:70:f1:94:21:
+        65:44:5f:fa:fc:ef:29:68:a9:a2:87:79:ef:79:ef:4f:ac:07:
+        77:38
+
+GTE CyberTrust Global Root
+==========================
+MD5 Fingerprint: CA:3D:D3:68:F1:03:5C:D0:32:FA:B8:2B:59:E8:5A:DB
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICWjCCAcMCAgGlMA0GCSqGSIb3DQEBBAUAMHUxCzAJBgNVBAYTAlVTMRgwFgYD
+VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv
+bHV0aW9ucywgSW5jLjEjMCEGA1UEAxMaR1RFIEN5YmVyVHJ1c3QgR2xvYmFsIFJv
+b3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEzMjM1OTAwWjB1MQswCQYDVQQGEwJV
+UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQLEx5HVEUgQ3liZXJU
+cnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0IEds
+b2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrH
+iM3dFw4usJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTS
+r41tiGeA5u2ylc9yMcqlHHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1Yh0X4
+04Wqk2kmhXBIgD8SFcd5tB8FLztimQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAG3r
+GwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMWM4ETCJ57NE7fQMh017l9
+3PR2VX2bY1QY6fDq81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OFNMQkpw0P
+lZPvy5TYnh+dXIVtx6quTx8itc2VrbqnzPmrC3p/
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 421 (0x1a5)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Global Root
+        Validity
+            Not Before: Aug 13 00:29:00 1998 GMT
+            Not After : Aug 13 23:59:00 2018 GMT
+        Subject: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Global Root
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:95:0f:a0:b6:f0:50:9c:e8:7a:c7:88:cd:dd:17:
+                    0e:2e:b0:94:d0:1b:3d:0e:f6:94:c0:8a:94:c7:06:
+                    c8:90:97:c8:b8:64:1a:7a:7e:6c:3c:53:e1:37:28:
+                    73:60:7f:b2:97:53:07:9f:53:f9:6d:58:94:d2:af:
+                    8d:6d:88:67:80:e6:ed:b2:95:cf:72:31:ca:a5:1c:
+                    72:ba:5c:02:e7:64:42:e7:f9:a9:2c:d6:3a:0d:ac:
+                    8d:42:aa:24:01:39:e6:9c:3f:01:85:57:0d:58:87:
+                    45:f8:d3:85:aa:93:69:26:85:70:48:80:3f:12:15:
+                    c7:79:b4:1f:05:2f:3b:62:99
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        6d:eb:1b:09:e9:5e:d9:51:db:67:22:61:a4:2a:3c:48:77:e3:
+        a0:7c:a6:de:73:a2:14:03:85:3d:fb:ab:0e:30:c5:83:16:33:
+        81:13:08:9e:7b:34:4e:df:40:c8:74:d7:b9:7d:dc:f4:76:55:
+        7d:9b:63:54:18:e9:f0:ea:f3:5c:b1:d9:8b:42:1e:b9:c0:95:
+        4e:ba:fa:d5:e2:7c:f5:68:61:bf:8e:ec:05:97:5f:5b:b0:d7:
+        a3:85:34:c4:24:a7:0d:0f:95:93:ef:cb:94:d8:9e:1f:9d:5c:
+        85:6d:c7:aa:ae:4f:1f:22:b5:cd:95:ad:ba:a7:cc:f9:ab:0b:
+        7a:7f
+
+GTE CyberTrust Japan Root CA
+============================
+MD5 Fingerprint: DE:AB:FF:43:2A:65:37:06:9B:28:B5:7A:E8:84:D3:8E
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICETCCAXoCAU4wDQYJKoZIhvcNAQEEBQAwUTELMAkGA1UEBhMCSlAxHzAdBgNV
+BAoTFkN5YmVyVHJ1c3QgSmFwYW4sIEluYy4xITAfBgNVBAMTGEN5YmVyVHJ1c3Qg
+SkFQQU4gUm9vdCBDQTAeFw05ODA4MDQwNzU3MDBaFw0wMzA4MDQyMzU5MDBaMFEx
+CzAJBgNVBAYTAkpQMR8wHQYDVQQKExZDeWJlclRydXN0IEphcGFuLCBJbmMuMSEw
+HwYDVQQDExhDeWJlclRydXN0IEpBUEFOIFJvb3QgQ0EwgZ8wDQYJKoZIhvcNAQEB
+BQADgY0AMIGJAoGBALet/MpHEHaJ/Wes5HMGfIFLHda1fA5Hr+ymVHWoxP1lr+fI
+sbFsNDWN97lkVygLIVredP7ceC6GRhJMfxEf3JO9X75mmIa4t+xtSdOQ2eF5AFZo
+uq1sHyw7H8ksjEOwBELqgXOmzjN1RQ2KRXIvqldV5AfDQ+J1Og+8PNCEzrrvAgMB
+AAEwDQYJKoZIhvcNAQEEBQADgYEAt6ZkowyAPBzE2O5BO+WGpJ5gXdYBMqhqZC0g
+cEC6ck5m+gdlTgOOC/1W4K07IKcy+rISHoDfHuN6GMxX2+bJNGDvdesQFtCkLnDY
+JCO4pXdzQvkHOt0BbAiTBzUmECVgKf8J5WSfabkWSfNc3SRjRpMNsFM2dbxIILsZ
+to/QIv0=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 78 (0x4e)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=JP, O=CyberTrust Japan, Inc., CN=CyberTrust JAPAN Root CA
+        Validity
+            Not Before: Aug  4 07:57:00 1998 GMT
+            Not After : Aug  4 23:59:00 2003 GMT
+        Subject: C=JP, O=CyberTrust Japan, Inc., CN=CyberTrust JAPAN Root CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b7:ad:fc:ca:47:10:76:89:fd:67:ac:e4:73:06:
+                    7c:81:4b:1d:d6:b5:7c:0e:47:af:ec:a6:54:75:a8:
+                    c4:fd:65:af:e7:c8:b1:b1:6c:34:35:8d:f7:b9:64:
+                    57:28:0b:21:5a:de:74:fe:dc:78:2e:86:46:12:4c:
+                    7f:11:1f:dc:93:bd:5f:be:66:98:86:b8:b7:ec:6d:
+                    49:d3:90:d9:e1:79:00:56:68:ba:ad:6c:1f:2c:3b:
+                    1f:c9:2c:8c:43:b0:04:42:ea:81:73:a6:ce:33:75:
+                    45:0d:8a:45:72:2f:aa:57:55:e4:07:c3:43:e2:75:
+                    3a:0f:bc:3c:d0:84:ce:ba:ef
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        b7:a6:64:a3:0c:80:3c:1c:c4:d8:ee:41:3b:e5:86:a4:9e:60:
+        5d:d6:01:32:a8:6a:64:2d:20:70:40:ba:72:4e:66:fa:07:65:
+        4e:03:8e:0b:fd:56:e0:ad:3b:20:a7:32:fa:b2:12:1e:80:df:
+        1e:e3:7a:18:cc:57:db:e6:c9:34:60:ef:75:eb:10:16:d0:a4:
+        2e:70:d8:24:23:b8:a5:77:73:42:f9:07:3a:dd:01:6c:08:93:
+        07:35:26:10:25:60:29:ff:09:e5:64:9f:69:b9:16:49:f3:5c:
+        dd:24:63:46:93:0d:b0:53:36:75:bc:48:20:bb:19:b6:8f:d0:
+        22:fd
+
+GTE CyberTrust Japan Secure Server CA
+=====================================
+MD5 Fingerprint: DD:0D:0D:B4:78:4B:7D:CE:30:0A:A6:35:C6:AB:4C:88
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICIzCCAYwCAU8wDQYJKoZIhvcNAQEEBQAwWjELMAkGA1UEBhMCSlAxHzAdBgNV
+BAoTFkN5YmVyVHJ1c3QgSmFwYW4sIEluYy4xKjAoBgNVBAMTIUN5YmVyVHJ1c3Qg
+SkFQQU4gU2VjdXJlIFNlcnZlciBDQTAeFw05ODA4MDQwODA2MzJaFw0wMzA4MDQy
+MzU5MDBaMFoxCzAJBgNVBAYTAkpQMR8wHQYDVQQKExZDeWJlclRydXN0IEphcGFu
+LCBJbmMuMSowKAYDVQQDEyFDeWJlclRydXN0IEpBUEFOIFNlY3VyZSBTZXJ2ZXIg
+Q0EwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKwmo6G4b2rALBL52zEFkuf9
++tSBtLjVKtWQ+vBDZfwSFcrs27lh3jNjN0+vADx/kjcbGHPlnzyI8RoTRP558sMm
+lQ8L8J4UByFsV8Jdw+JRsM2LX81fhjj4eZc57Oi/Ui6xXqqprozt7tfIty4xi7Q5
+kjt8gScHGgFEL0lzILbJAgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAaB17Eu5aeSkx
+ygGsi1CpJ5ksAPw4Ghz/wtXwE/4bpzn1gBTrUfrAjXuEG1musTVRbqE+1xvsoJ7f
+4KWCluOxP9io8ct5gI738ESZfhT1I6MR42hLBTZuiOOrhqo4UwNCO9O5+eC/BenT
+X8NKp7b9t12QSfiasq1mpoIAk65g/yA=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 79 (0x4f)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=JP, O=CyberTrust Japan, Inc., CN=CyberTrust JAPAN Secure Server CA
+        Validity
+            Not Before: Aug  4 08:06:32 1998 GMT
+            Not After : Aug  4 23:59:00 2003 GMT
+        Subject: C=JP, O=CyberTrust Japan, Inc., CN=CyberTrust JAPAN Secure Server CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:ac:26:a3:a1:b8:6f:6a:c0:2c:12:f9:db:31:05:
+                    92:e7:fd:fa:d4:81:b4:b8:d5:2a:d5:90:fa:f0:43:
+                    65:fc:12:15:ca:ec:db:b9:61:de:33:63:37:4f:af:
+                    00:3c:7f:92:37:1b:18:73:e5:9f:3c:88:f1:1a:13:
+                    44:fe:79:f2:c3:26:95:0f:0b:f0:9e:14:07:21:6c:
+                    57:c2:5d:c3:e2:51:b0:cd:8b:5f:cd:5f:86:38:f8:
+                    79:97:39:ec:e8:bf:52:2e:b1:5e:aa:a9:ae:8c:ed:
+                    ee:d7:c8:b7:2e:31:8b:b4:39:92:3b:7c:81:27:07:
+                    1a:01:44:2f:49:73:20:b6:c9
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        68:1d:7b:12:ee:5a:79:29:31:ca:01:ac:8b:50:a9:27:99:2c:
+        00:fc:38:1a:1c:ff:c2:d5:f0:13:fe:1b:a7:39:f5:80:14:eb:
+        51:fa:c0:8d:7b:84:1b:59:ae:b1:35:51:6e:a1:3e:d7:1b:ec:
+        a0:9e:df:e0:a5:82:96:e3:b1:3f:d8:a8:f1:cb:79:80:8e:f7:
+        f0:44:99:7e:14:f5:23:a3:11:e3:68:4b:05:36:6e:88:e3:ab:
+        86:aa:38:53:03:42:3b:d3:b9:f9:e0:bf:05:e9:d3:5f:c3:4a:
+        a7:b6:fd:b7:5d:90:49:f8:9a:b2:ad:66:a6:82:00:93:ae:60:
+        ff:20
+
+GTE CyberTrust Root 2
+=====================
+MD5 Fingerprint: BA:ED:17:57:9A:4B:FF:7C:F9:C9:1F:A2:CD:1A:D6:87
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICUDCCAbkCAgGbMA0GCSqGSIb3DQEBBAUAMHAxCzAJBgNVBAYTAlVTMRgwFgYD
+VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv
+bHV0aW9ucywgSW5jLjEeMBwGA1UEAxMVR1RFIEN5YmVyVHJ1c3QgUm9vdCAyMB4X
+DTk4MDgxMTExMzUwN1oXDTA4MDgxMTExMjIxNlowcDELMAkGA1UEBhMCVVMxGDAW
+BgNVBAoTD0dURSBDb3Jwb3JhdGlvbjEnMCUGA1UECxMeR1RFIEN5YmVyVHJ1c3Qg
+U29sdXRpb25zLCBJbmMuMR4wHAYDVQQDExVHVEUgQ3liZXJUcnVzdCBSb290IDIw
+gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANksTE4vaRoj41a6886EwAnAefFE
+XzMfFZF/iogouCRFzI8YzR900bWPcUzWMfZzloSUQMWpg2Akfa9vNLdLTMIJgDtF
+BJ7EPMQndXsADKFkR7UUXYJLUTpYu0RMPdPlBjjoYVyYeLuAs5zacoJioN+cX+v5
+T3fCzGAYAGs0giWzAgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAo2SRbxDt526iQkCU
+eM74FAjR+kOF60bNkhTQ7y4tNjkY2brJJ4gp6UgXb/jBqshhbS39QC11QzCXOfgU
+ZL1v72OoK0LfsloNJex7N9jOkSmCFvnoYqLhdsQCfd0li5jh9g1gjPZZkEBRRNHC
++xkkHhc5a3QhFTPWVdeCHnAsJ6g=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 411 (0x19b)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 2
+        Validity
+            Not Before: Aug 11 11:35:07 1998 GMT
+            Not After : Aug 11 11:22:16 2008 GMT
+        Subject: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 2
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d9:2c:4c:4e:2f:69:1a:23:e3:56:ba:f3:ce:84:
+                    c0:09:c0:79:f1:44:5f:33:1f:15:91:7f:8a:88:28:
+                    b8:24:45:cc:8f:18:cd:1f:74:d1:b5:8f:71:4c:d6:
+                    31:f6:73:96:84:94:40:c5:a9:83:60:24:7d:af:6f:
+                    34:b7:4b:4c:c2:09:80:3b:45:04:9e:c4:3c:c4:27:
+                    75:7b:00:0c:a1:64:47:b5:14:5d:82:4b:51:3a:58:
+                    bb:44:4c:3d:d3:e5:06:38:e8:61:5c:98:78:bb:80:
+                    b3:9c:da:72:82:62:a0:df:9c:5f:eb:f9:4f:77:c2:
+                    cc:60:18:00:6b:34:82:25:b3
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        a3:64:91:6f:10:ed:e7:6e:a2:42:40:94:78:ce:f8:14:08:d1:
+        fa:43:85:eb:46:cd:92:14:d0:ef:2e:2d:36:39:18:d9:ba:c9:
+        27:88:29:e9:48:17:6f:f8:c1:aa:c8:61:6d:2d:fd:40:2d:75:
+        43:30:97:39:f8:14:64:bd:6f:ef:63:a8:2b:42:df:b2:5a:0d:
+        25:ec:7b:37:d8:ce:91:29:82:16:f9:e8:62:a2:e1:76:c4:02:
+        7d:dd:25:8b:98:e1:f6:0d:60:8c:f6:59:90:40:51:44:d1:c2:
+        fb:19:24:1e:17:39:6b:74:21:15:33:d6:55:d7:82:1e:70:2c:
+        27:a8
+
+GTE CyberTrust Root 3
+=====================
+MD5 Fingerprint: DB:81:96:57:AE:64:61:EF:77:A7:83:C4:51:24:3C:87
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICUDCCAbkCAgGXMA0GCSqGSIb3DQEBBQUAMHAxCzAJBgNVBAYTAlVTMRgwFgYD
+VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv
+bHV0aW9ucywgSW5jLjEeMBwGA1UEAxMVR1RFIEN5YmVyVHJ1c3QgUm9vdCAzMB4X
+DTk4MDgxMDE5NTkwOFoXDTA4MDgxMDE5MzYzOVowcDELMAkGA1UEBhMCVVMxGDAW
+BgNVBAoTD0dURSBDb3Jwb3JhdGlvbjEnMCUGA1UECxMeR1RFIEN5YmVyVHJ1c3Qg
+U29sdXRpb25zLCBJbmMuMR4wHAYDVQQDExVHVEUgQ3liZXJUcnVzdCBSb290IDMw
+gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOHzsSsLztwU2TSXYlASVmOETFP6
+wIXP+sHdD955E39T+6oOYN3iYr/G7k6ZNKpoQzWZ+KP982O9AVRqnrI6lix7eCjG
+WrWNGhUY/eOMLqJQCVtx1g21GB8ZjgQpk5N4q18U53NC8gMMV6IbUDsLu1ngoDoD
+7icbWky5sAjKuRqJAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAheutlCAG6bKiazvy
+ZuvjS7gSJgXl9JGo3IfcmPSUwfRhvdWcbFFzlV7QvdfmRdw8z0aE1ee57ORnY24A
+KHdxXUoF6bl8hszCRLveKUja6t29F58dUQGo6BResVf3/9qPzpX+Le0yEnf/fGph
+la4xcgYI8PnzDY7i76hTXZEDg94=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 407 (0x197)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 3
+        Validity
+            Not Before: Aug 10 19:59:08 1998 GMT
+            Not After : Aug 10 19:36:39 2008 GMT
+        Subject: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 3
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:e1:f3:b1:2b:0b:ce:dc:14:d9:34:97:62:50:12:
+                    56:63:84:4c:53:fa:c0:85:cf:fa:c1:dd:0f:de:79:
+                    13:7f:53:fb:aa:0e:60:dd:e2:62:bf:c6:ee:4e:99:
+                    34:aa:68:43:35:99:f8:a3:fd:f3:63:bd:01:54:6a:
+                    9e:b2:3a:96:2c:7b:78:28:c6:5a:b5:8d:1a:15:18:
+                    fd:e3:8c:2e:a2:50:09:5b:71:d6:0d:b5:18:1f:19:
+                    8e:04:29:93:93:78:ab:5f:14:e7:73:42:f2:03:0c:
+                    57:a2:1b:50:3b:0b:bb:59:e0:a0:3a:03:ee:27:1b:
+                    5a:4c:b9:b0:08:ca:b9:1a:89
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        85:eb:ad:94:20:06:e9:b2:a2:6b:3b:f2:66:eb:e3:4b:b8:12:
+        26:05:e5:f4:91:a8:dc:87:dc:98:f4:94:c1:f4:61:bd:d5:9c:
+        6c:51:73:95:5e:d0:bd:d7:e6:45:dc:3c:cf:46:84:d5:e7:b9:
+        ec:e4:67:63:6e:00:28:77:71:5d:4a:05:e9:b9:7c:86:cc:c2:
+        44:bb:de:29:48:da:ea:dd:bd:17:9f:1d:51:01:a8:e8:14:5e:
+        b1:57:f7:ff:da:8f:ce:95:fe:2d:ed:32:12:77:ff:7c:6a:61:
+        95:ae:31:72:06:08:f0:f9:f3:0d:8e:e2:ef:a8:53:5d:91:03:
+        83:de
+
+GTE CyberTrust Root 4
+=====================
+MD5 Fingerprint: 33:43:02:B1:B9:E0:73:B1:B1:20:CA:CB:C7:84:03:50
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDVTCCAj0CAgGoMA0GCSqGSIb3DQEBBQUAMHAxCzAJBgNVBAYTAlVTMRgwFgYD
+VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv
+bHV0aW9ucywgSW5jLjEeMBwGA1UEAxMVR1RFIEN5YmVyVHJ1c3QgUm9vdCA0MB4X
+DTk4MDgxMzEzNTEwMFoXDTEzMDgxMzIzNTkwMFowcDELMAkGA1UEBhMCVVMxGDAW
+BgNVBAoTD0dURSBDb3Jwb3JhdGlvbjEnMCUGA1UECxMeR1RFIEN5YmVyVHJ1c3Qg
+U29sdXRpb25zLCBJbmMuMR4wHAYDVQQDExVHVEUgQ3liZXJUcnVzdCBSb290IDQw
+ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6nSJuf9pmPDlCsaMqb9P3
+vK6sMVrXEZBHuZ0ZLvnzGyKgw+GnusT8XgqUS5haSybkH/Tc8/6OiNxsLXx3hyZQ
+wF5OqCih6hdpT03GAQ7amg0GViYVtqRdejWvje14Uob5OKuzAdPaBZaxtlCrwKGu
+F1P6QzkgcWUj223Etu2YRYPX0vbiqWv7+XXM78WrcZY16N+OkZuoEHUft84Tjmuz
+lneXGpEvxyxpmfAPKmgAmHZEG4wo0uuO9IO0f6QlXmw72cZo1WG41F4xB7VbkDVS
+V3sXIO0tuB6OiDk+Usvf8FyxZbulErSQY79xnTLB2r9QSpW+BjrEK+vNmHZETQvl
+AgMBAAEwDQYJKoZIhvcNAQEFBQADggEBAEOvHIfJSbpliTRJPOoHO0eiedSgO5Bs
+3n+oVMPoTEAyvMjsHOXZrEC6/Iw/wnOc9GTq36ntTlvIAWDuOW1DJ/N/qgjS/k5v
+FDJNfeQ0gKU1xNZGULQ7oC1lH09lfjQoLcCndn0xyQ0zFvYgGSARULsDzHBtlrfv
+TKfaNhXPu03UltyITWyY7blz/ihXoO1k+AqBKXP29pcyhzm0ge/ZTRoHNPe6QjXe
+V9xc1vfF6wonDIGmwtBoTv2SW0iD9haKjzZb7TFsP0F6cfeSPzGkCkBM84biYcE8
+SYEtpbjvupcPvCsdm4ny0o4eTYbywqv2LZnAGyoNobZP+SxYTT19Nwo=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 424 (0x1a8)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 4
+        Validity
+            Not Before: Aug 13 13:51:00 1998 GMT
+            Not After : Aug 13 23:59:00 2013 GMT
+        Subject: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 4
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:ba:9d:22:6e:7f:da:66:3c:39:42:b1:a3:2a:6f:
+                    d3:f7:bc:ae:ac:31:5a:d7:11:90:47:b9:9d:19:2e:
+                    f9:f3:1b:22:a0:c3:e1:a7:ba:c4:fc:5e:0a:94:4b:
+                    98:5a:4b:26:e4:1f:f4:dc:f3:fe:8e:88:dc:6c:2d:
+                    7c:77:87:26:50:c0:5e:4e:a8:28:a1:ea:17:69:4f:
+                    4d:c6:01:0e:da:9a:0d:06:56:26:15:b6:a4:5d:7a:
+                    35:af:8d:ed:78:52:86:f9:38:ab:b3:01:d3:da:05:
+                    96:b1:b6:50:ab:c0:a1:ae:17:53:fa:43:39:20:71:
+                    65:23:db:6d:c4:b6:ed:98:45:83:d7:d2:f6:e2:a9:
+                    6b:fb:f9:75:cc:ef:c5:ab:71:96:35:e8:df:8e:91:
+                    9b:a8:10:75:1f:b7:ce:13:8e:6b:b3:96:77:97:1a:
+                    91:2f:c7:2c:69:99:f0:0f:2a:68:00:98:76:44:1b:
+                    8c:28:d2:eb:8e:f4:83:b4:7f:a4:25:5e:6c:3b:d9:
+                    c6:68:d5:61:b8:d4:5e:31:07:b5:5b:90:35:52:57:
+                    7b:17:20:ed:2d:b8:1e:8e:88:39:3e:52:cb:df:f0:
+                    5c:b1:65:bb:a5:12:b4:90:63:bf:71:9d:32:c1:da:
+                    bf:50:4a:95:be:06:3a:c4:2b:eb:cd:98:76:44:4d:
+                    0b:e5
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        43:af:1c:87:c9:49:ba:65:89:34:49:3c:ea:07:3b:47:a2:79:
+        d4:a0:3b:90:6c:de:7f:a8:54:c3:e8:4c:40:32:bc:c8:ec:1c:
+        e5:d9:ac:40:ba:fc:8c:3f:c2:73:9c:f4:64:ea:df:a9:ed:4e:
+        5b:c8:01:60:ee:39:6d:43:27:f3:7f:aa:08:d2:fe:4e:6f:14:
+        32:4d:7d:e4:34:80:a5:35:c4:d6:46:50:b4:3b:a0:2d:65:1f:
+        4f:65:7e:34:28:2d:c0:a7:76:7d:31:c9:0d:33:16:f6:20:19:
+        20:11:50:bb:03:cc:70:6d:96:b7:ef:4c:a7:da:36:15:cf:bb:
+        4d:d4:96:dc:88:4d:6c:98:ed:b9:73:fe:28:57:a0:ed:64:f8:
+        0a:81:29:73:f6:f6:97:32:87:39:b4:81:ef:d9:4d:1a:07:34:
+        f7:ba:42:35:de:57:dc:5c:d6:f7:c5:eb:0a:27:0c:81:a6:c2:
+        d0:68:4e:fd:92:5b:48:83:f6:16:8a:8f:36:5b:ed:31:6c:3f:
+        41:7a:71:f7:92:3f:31:a4:0a:40:4c:f3:86:e2:61:c1:3c:49:
+        81:2d:a5:b8:ef:ba:97:0f:bc:2b:1d:9b:89:f2:d2:8e:1e:4d:
+        86:f2:c2:ab:f6:2d:99:c0:1b:2a:0d:a1:b6:4f:f9:2c:58:4d:
+        3d:7d:37:0a
+
+GTE CyberTrust Root 5
+=====================
+MD5 Fingerprint: 7D:6C:86:E4:FC:4D:D1:0B:00:BA:22:BB:4E:7C:6A:8E
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDtjCCAp6gAwIBAgICAbYwDQYJKoZIhvcNAQEFBQAwcDELMAkGA1UEBhMCVVMx
+GDAWBgNVBAoTD0dURSBDb3Jwb3JhdGlvbjEnMCUGA1UECxMeR1RFIEN5YmVyVHJ1
+c3QgU29sdXRpb25zLCBJbmMuMR4wHAYDVQQDExVHVEUgQ3liZXJUcnVzdCBSb290
+IDUwHhcNOTgwODE0MTQ1MDAwWhcNMTMwODE0MjM1OTAwWjBwMQswCQYDVQQGEwJV
+UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQLEx5HVEUgQ3liZXJU
+cnVzdCBTb2x1dGlvbnMsIEluYy4xHjAcBgNVBAMTFUdURSBDeWJlclRydXN0IFJv
+b3QgNTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALwSbj+KfHqXAewe
+uzlaAvR4RKJIG457SVJ6uHtHs6+Um2+7lvoramVcuByUc76/iQoigO5X/IwFu3Cf
+lzkE2qOHXKjlyq/AM5rVN1xLrOSA0KYjYPv9ci6UncfOwgQy73hgXe2thw9FZR48
+mgqavl0dmezn8tHGehfZrZtUln/EfGC/haoVNR1A2hG87FQhKC0joajwzy3N3fx+
+D17hZQdWywe00lboXjHMGGPEhtIthc+Tkqtt/mg5+95zvYb45EZ66p8My/QZ/mO8
+0Sx7iDM29uThnAxTgWAc2i6rlqkWiBNQmbK9Vd8VMH7o5Zj7cH5stQf8/Ea30O03
+ln4y/iECAwEAAaNaMFgwEgYDVR0TAQH/BAgwBgEB/wIBBTAOBgNVHQ8BAf8EBAMC
+AQYwFwYDVR0gBBAwDjAMBgoqhkiG+GMBAgEDMBkGA1UdDgQSBBB2CkkhOEyf3vjE
+ScdxcZGdMA0GCSqGSIb3DQEBBQUAA4IBAQBBOtQYW9q43iEc4Y4J5fFoNP/elvQH
+9ac886xKsZv6kvqb7eYyIapKdsXcTzjl39WG5NXIdn2Y17HNj021kSNsi4rr6nzv
+FJTExvAfSi0ycWMrY5EmAgm2gB3t4sy4f9uHY8jh0GwmsTUdQGYQG82VVBgzYewT
+T9oT95mvPtDPjqZyorPDBZrJJ32SzH5SjbOrcG2eiZ9N6xp1wpiq1QIW1wyKvyXk
+6y28mOlYOBl8uTf+2+KZCHMGx5eDan0QAS8yuRcFSmXmL86+XlOmgumaUwqEdC2D
+ysiUFnZflGEo8IWnObvXi9moshMdVAk0JH0ggX1mfqKQdFwQxr3sqxvC
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 438 (0x1b6)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 5
+        Validity
+            Not Before: Aug 14 14:50:00 1998 GMT
+            Not After : Aug 14 23:59:00 2013 GMT
+        Subject: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 5
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:bc:12:6e:3f:8a:7c:7a:97:01:ec:1e:bb:39:5a:
+                    02:f4:78:44:a2:48:1b:8e:7b:49:52:7a:b8:7b:47:
+                    b3:af:94:9b:6f:bb:96:fa:2b:6a:65:5c:b8:1c:94:
+                    73:be:bf:89:0a:22:80:ee:57:fc:8c:05:bb:70:9f:
+                    97:39:04:da:a3:87:5c:a8:e5:ca:af:c0:33:9a:d5:
+                    37:5c:4b:ac:e4:80:d0:a6:23:60:fb:fd:72:2e:94:
+                    9d:c7:ce:c2:04:32:ef:78:60:5d:ed:ad:87:0f:45:
+                    65:1e:3c:9a:0a:9a:be:5d:1d:99:ec:e7:f2:d1:c6:
+                    7a:17:d9:ad:9b:54:96:7f:c4:7c:60:bf:85:aa:15:
+                    35:1d:40:da:11:bc:ec:54:21:28:2d:23:a1:a8:f0:
+                    cf:2d:cd:dd:fc:7e:0f:5e:e1:65:07:56:cb:07:b4:
+                    d2:56:e8:5e:31:cc:18:63:c4:86:d2:2d:85:cf:93:
+                    92:ab:6d:fe:68:39:fb:de:73:bd:86:f8:e4:46:7a:
+                    ea:9f:0c:cb:f4:19:fe:63:bc:d1:2c:7b:88:33:36:
+                    f6:e4:e1:9c:0c:53:81:60:1c:da:2e:ab:96:a9:16:
+                    88:13:50:99:b2:bd:55:df:15:30:7e:e8:e5:98:fb:
+                    70:7e:6c:b5:07:fc:fc:46:b7:d0:ed:37:96:7e:32:
+                    fe:21
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE, pathlen:5
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Certificate Policies: 
+                Policy: 1.2.840.113763.1.2.1.3
+
+            X509v3 Subject Key Identifier: 
+                76:0A:49:21:38:4C:9F:DE:F8:C4:49:C7:71:71:91:9D
+    Signature Algorithm: sha1WithRSAEncryption
+        41:3a:d4:18:5b:da:b8:de:21:1c:e1:8e:09:e5:f1:68:34:ff:
+        de:96:f4:07:f5:a7:3c:f3:ac:4a:b1:9b:fa:92:fa:9b:ed:e6:
+        32:21:aa:4a:76:c5:dc:4f:38:e5:df:d5:86:e4:d5:c8:76:7d:
+        98:d7:b1:cd:8f:4d:b5:91:23:6c:8b:8a:eb:ea:7c:ef:14:94:
+        c4:c6:f0:1f:4a:2d:32:71:63:2b:63:91:26:02:09:b6:80:1d:
+        ed:e2:cc:b8:7f:db:87:63:c8:e1:d0:6c:26:b1:35:1d:40:66:
+        10:1b:cd:95:54:18:33:61:ec:13:4f:da:13:f7:99:af:3e:d0:
+        cf:8e:a6:72:a2:b3:c3:05:9a:c9:27:7d:92:cc:7e:52:8d:b3:
+        ab:70:6d:9e:89:9f:4d:eb:1a:75:c2:98:aa:d5:02:16:d7:0c:
+        8a:bf:25:e4:eb:2d:bc:98:e9:58:38:19:7c:b9:37:fe:db:e2:
+        99:08:73:06:c7:97:83:6a:7d:10:01:2f:32:b9:17:05:4a:65:
+        e6:2f:ce:be:5e:53:a6:82:e9:9a:53:0a:84:74:2d:83:ca:c8:
+        94:16:76:5f:94:61:28:f0:85:a7:39:bb:d7:8b:d9:a8:b2:13:
+        1d:54:09:34:24:7d:20:81:7d:66:7e:a2:90:74:5c:10:c6:bd:
+        ec:ab:1b:c2
+
+GTE CyberTrust Root CA
+======================
+MD5 Fingerprint: C4:D7:F0:B2:A3:C5:7D:61:67:F0:04:CD:43:D3:BA:58
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIB+jCCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD
+VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv
+b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV
+UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU
+cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC45k+625h8cXyv
+RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M
+ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5
+1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz
+dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl
+IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy
+bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 419 (0x1a3)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=US, O=GTE Corporation, CN=GTE CyberTrust Root
+        Validity
+            Not Before: Feb 23 23:01:00 1996 GMT
+            Not After : Feb 23 23:59:00 2006 GMT
+        Subject: C=US, O=GTE Corporation, CN=GTE CyberTrust Root
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b8:e6:4f:ba:db:98:7c:71:7c:af:44:b7:d3:0f:
+                    46:d9:64:e5:93:c1:42:8e:c7:ba:49:8d:35:2d:7a:
+                    e7:8b:bd:e5:05:31:59:c6:b1:2f:0a:0c:fb:9f:a7:
+                    3f:a2:09:66:84:56:1e:37:29:1b:87:e9:7e:0c:ca:
+                    9a:9f:a5:7f:f5:15:94:a3:d5:a2:46:82:d8:68:4c:
+                    d1:37:15:06:68:af:bd:f8:b0:b3:f0:29:f5:95:5a:
+                    09:16:61:77:0a:22:25:d4:4f:45:aa:c7:bd:e5:96:
+                    df:f9:d4:a8:8e:42:cc:24:c0:1e:91:27:4a:b5:6d:
+                    06:80:63:39:c4:a2:5e:38:03
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        12:b3:75:c6:5f:1d:e1:61:55:80:00:d4:81:4b:7b:31:0f:23:
+        63:e7:3d:f3:03:f9:f4:36:a8:bb:d9:e3:a5:97:4d:ea:2b:29:
+        e0:d6:6a:73:81:e6:c0:89:a3:d3:f1:e0:a5:a5:22:37:9a:63:
+        c2:48:20:b4:db:72:e3:c8:f6:d9:7c:be:b1:af:53:da:14:b4:
+        21:b8:d6:d5:96:e3:fe:4e:0c:59:62:b6:9a:4a:f9:42:dd:8c:
+        6f:81:a9:71:ff:f4:0a:72:6d:6d:44:0e:9d:f3:74:74:a8:d5:
+        34:49:e9:5e:9e:e9:b4:7a:e1:e5:5a:1f:84:30:9c:d3:9f:a5:
+        25:d8
+
+GlobalSign Partners CA
+======================
+MD5 Fingerprint: 3C:75:CD:4C:BD:A9:D0:8A:79:4F:50:16:37:84:F4:2B
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDnjCCAoagAwIBAgILAgAAAAAA1ni50a8wDQYJKoZIhvcNAQEEBQAwVzELMAkG
+A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
+b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05OTAxMjgxMjAw
+MDBaFw0wOTAxMjgxMjAwMDBaMF8xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
+YWxTaWduIG52LXNhMRQwEgYDVQQLEwtQYXJ0bmVycyBDQTEfMB0GA1UEAxMWR2xv
+YmFsU2lnbiBQYXJ0bmVycyBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBANIs+DKsShJ6N8gpkaWujG4eDsA0M4jlM3EWHHiEaMMYNFAuFj6xlIJPsZqf
+APjGETXGaXuYAq0ABohs50wzKACIJ0Yfh7NxdWO8MruI3mYYDlAGk7T2vBQ3MD0i
+3z3/dX7ZChrFn7P80KyzCHqJ0wHoAFznSgs9TXsmordiBovaRt2TFz8/WwJLC7aI
+IBGSAK27xy7U40Wu9YlafI2krYVkMsAnjMbyioCShiRWWY10aKKDQrOePVBBhm8g
+bvb9ztMZ4zLMj+2aXm0fKPVSrG4YXvg90ZLlumwBiEsK8i3eZTMFQqBMqjF2vv2/
+gXj5cRxGXi0VlS0wWY5MQdFiqz0CAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgAGMB0G
+A1UdDgQWBBRDJI1wFQhiVZxPDEAXXYZeD6JM+zAfBgNVHSMEGDAWgBRge2YaRQ2X
+yolQL30EzTSo//z9SzAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBBAUAA4IB
+AQBm7bSIaRGZgiGDrKFti5uErQ8tyB6Mynt+rarUjt4H1p5Fx6W4nAc5YCVVGsBP
+GeXPFylJiRg1ZuXrKEBOV8mvs+S4IAWjO5VQkUmUKX0s5YhBpUWIXp2CJ/fS71u1
+T5++/jVlLFVkn+FR2iJhd7pYTo/GeVlZbjCAok+QbiELrdBoOZAQm+0iZW8eETjm
+f4zS8zltR9Uh6Op1OkHRrfYWnV0LIb3zH2MGJR3BHzVxLOsgGdXBsOw95W/tAgc/
+E3tmktZEwZj3X1CLelvCb22w0fjldKBAN6MlD+Q9ymQxk5BcMHu5OTGaXkzNuUFP
+UOQ9OK7IZtnHO11RR6ybq/Kt
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            02:00:00:00:00:00:d6:78:b9:d1:af
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
+        Validity
+            Not Before: Jan 28 12:00:00 1999 GMT
+            Not After : Jan 28 12:00:00 2009 GMT
+        Subject: C=BE, O=GlobalSign nv-sa, OU=Partners CA, CN=GlobalSign Partners CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:d2:2c:f8:32:ac:4a:12:7a:37:c8:29:91:a5:ae:
+                    8c:6e:1e:0e:c0:34:33:88:e5:33:71:16:1c:78:84:
+                    68:c3:18:34:50:2e:16:3e:b1:94:82:4f:b1:9a:9f:
+                    00:f8:c6:11:35:c6:69:7b:98:02:ad:00:06:88:6c:
+                    e7:4c:33:28:00:88:27:46:1f:87:b3:71:75:63:bc:
+                    32:bb:88:de:66:18:0e:50:06:93:b4:f6:bc:14:37:
+                    30:3d:22:df:3d:ff:75:7e:d9:0a:1a:c5:9f:b3:fc:
+                    d0:ac:b3:08:7a:89:d3:01:e8:00:5c:e7:4a:0b:3d:
+                    4d:7b:26:a2:b7:62:06:8b:da:46:dd:93:17:3f:3f:
+                    5b:02:4b:0b:b6:88:20:11:92:00:ad:bb:c7:2e:d4:
+                    e3:45:ae:f5:89:5a:7c:8d:a4:ad:85:64:32:c0:27:
+                    8c:c6:f2:8a:80:92:86:24:56:59:8d:74:68:a2:83:
+                    42:b3:9e:3d:50:41:86:6f:20:6e:f6:fd:ce:d3:19:
+                    e3:32:cc:8f:ed:9a:5e:6d:1f:28:f5:52:ac:6e:18:
+                    5e:f8:3d:d1:92:e5:ba:6c:01:88:4b:0a:f2:2d:de:
+                    65:33:05:42:a0:4c:aa:31:76:be:fd:bf:81:78:f9:
+                    71:1c:46:5e:2d:15:95:2d:30:59:8e:4c:41:d1:62:
+                    ab:3d
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Subject Key Identifier: 
+                43:24:8D:70:15:08:62:55:9C:4F:0C:40:17:5D:86:5E:0F:A2:4C:FB
+            X509v3 Authority Key Identifier: 
+                keyid:60:7B:66:1A:45:0D:97:CA:89:50:2F:7D:04:CD:34:A8:FF:FC:FD:4B
+
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        66:ed:b4:88:69:11:99:82:21:83:ac:a1:6d:8b:9b:84:ad:0f:
+        2d:c8:1e:8c:ca:7b:7e:ad:aa:d4:8e:de:07:d6:9e:45:c7:a5:
+        b8:9c:07:39:60:25:55:1a:c0:4f:19:e5:cf:17:29:49:89:18:
+        35:66:e5:eb:28:40:4e:57:c9:af:b3:e4:b8:20:05:a3:3b:95:
+        50:91:49:94:29:7d:2c:e5:88:41:a5:45:88:5e:9d:82:27:f7:
+        d2:ef:5b:b5:4f:9f:be:fe:35:65:2c:55:64:9f:e1:51:da:22:
+        61:77:ba:58:4e:8f:c6:79:59:59:6e:30:80:a2:4f:90:6e:21:
+        0b:ad:d0:68:39:90:10:9b:ed:22:65:6f:1e:11:38:e6:7f:8c:
+        d2:f3:39:6d:47:d5:21:e8:ea:75:3a:41:d1:ad:f6:16:9d:5d:
+        0b:21:bd:f3:1f:63:06:25:1d:c1:1f:35:71:2c:eb:20:19:d5:
+        c1:b0:ec:3d:e5:6f:ed:02:07:3f:13:7b:66:92:d6:44:c1:98:
+        f7:5f:50:8b:7a:5b:c2:6f:6d:b0:d1:f8:e5:74:a0:40:37:a3:
+        25:0f:e4:3d:ca:64:31:93:90:5c:30:7b:b9:39:31:9a:5e:4c:
+        cd:b9:41:4f:50:e4:3d:38:ae:c8:66:d9:c7:3b:5d:51:47:ac:
+        9b:ab:f2:ad
+
+GlobalSign Primary Class 1 CA
+=============================
+MD5 Fingerprint: 5C:AC:59:01:A4:86:53:CB:10:66:B5:D6:D6:71:FF:01
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDrDCCApSgAwIBAgILAgAAAAAA1ni4N88wDQYJKoZIhvcNAQEEBQAwVzELMAkG
+A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
+b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MTUxMjAw
+MDBaFw0wOTAxMjgxMjAwMDBaMG0xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
+YWxTaWduIG52LXNhMRswGQYDVQQLExJQcmltYXJ5IENsYXNzIDEgQ0ExJjAkBgNV
+BAMTHUdsb2JhbFNpZ24gUHJpbWFyeSBDbGFzcyAxIENBMIIBIjANBgkqhkiG9w0B
+AQEFAAOCAQ8AMIIBCgKCAQEAvSA1R9Eo1gijEjkjRw29cCFSDlcxlaY0V2vsfkN5
+wwZSSM28taGZvdgfMrzP125ybS53IpCCTkuPmgwBQprZcFm2nR/mY9EMrR1O+IWB
++a7vn6ZSYUR5GnVF4GFWRW1CjD1yy6akErea9dZg0GBQs46mpuy09BLNf6jO77Ph
+hTD+csTm53eznlhB1lGDiAfGtmlPNt7RC0g/vdafIXRkbycGPkv9Dqabv6RIV4yQ
+7okYCwKBGL5n/lNgiCe6o3M0S1pWtN5zBe2Yll3sSudA/EsJYuvQ4zFPhdF6q1ln
+K/uID+uqg701/WEn7GYOQlf3acIM7/xqwm5J2o9BOK5IqQIDAQABo2MwYTAOBgNV
+HQ8BAf8EBAMCAAYwHQYDVR0OBBYEFPzgZvZaNZnrQB7SuB5DvJiOH4rDMB8GA1Ud
+IwQYMBaAFGB7ZhpFDZfKiVAvfQTNNKj//P1LMA8GA1UdEwEB/wQFMAMBAf8wDQYJ
+KoZIhvcNAQEEBQADggEBAJujCETO8pCdcfMyswVqterPKZjeVT6gFn0GekTWr9L6
+E1iM+BzHqx20G+9paJhcCDmP4Pf7SMwh57gz2wWqNCRsSuXpe2Deg7MfCr5BdfzM
+MEi3wSYdBDOqtnjtKsu6VpcybvcxlS5G8hTuJ8f3Yom5XFrTOIpk9Te08bM0ctXV
+IT1L13iT1zFmNR6j2EdJbxyt4YB/+JgkbHOsDsIadwKjJge3x2tdvILVKkgdY89Q
+Mqb7HBhHFQpbDFw4JJoEmKgISF98NIdjqy2NTAB3lBt2uvUWGKMVry+U9ikAdsEV
+F9PpN0121MtLKVkkrNpKoOpj3l9Usfrz0UXLxWS0cyE=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            02:00:00:00:00:00:d6:78:b8:37:cf
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
+        Validity
+            Not Before: Sep 15 12:00:00 1998 GMT
+            Not After : Jan 28 12:00:00 2009 GMT
+        Subject: C=BE, O=GlobalSign nv-sa, OU=Primary Class 1 CA, CN=GlobalSign Primary Class 1 CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:bd:20:35:47:d1:28:d6:08:a3:12:39:23:47:0d:
+                    bd:70:21:52:0e:57:31:95:a6:34:57:6b:ec:7e:43:
+                    79:c3:06:52:48:cd:bc:b5:a1:99:bd:d8:1f:32:bc:
+                    cf:d7:6e:72:6d:2e:77:22:90:82:4e:4b:8f:9a:0c:
+                    01:42:9a:d9:70:59:b6:9d:1f:e6:63:d1:0c:ad:1d:
+                    4e:f8:85:81:f9:ae:ef:9f:a6:52:61:44:79:1a:75:
+                    45:e0:61:56:45:6d:42:8c:3d:72:cb:a6:a4:12:b7:
+                    9a:f5:d6:60:d0:60:50:b3:8e:a6:a6:ec:b4:f4:12:
+                    cd:7f:a8:ce:ef:b3:e1:85:30:fe:72:c4:e6:e7:77:
+                    b3:9e:58:41:d6:51:83:88:07:c6:b6:69:4f:36:de:
+                    d1:0b:48:3f:bd:d6:9f:21:74:64:6f:27:06:3e:4b:
+                    fd:0e:a6:9b:bf:a4:48:57:8c:90:ee:89:18:0b:02:
+                    81:18:be:67:fe:53:60:88:27:ba:a3:73:34:4b:5a:
+                    56:b4:de:73:05:ed:98:96:5d:ec:4a:e7:40:fc:4b:
+                    09:62:eb:d0:e3:31:4f:85:d1:7a:ab:59:67:2b:fb:
+                    88:0f:eb:aa:83:bd:35:fd:61:27:ec:66:0e:42:57:
+                    f7:69:c2:0c:ef:fc:6a:c2:6e:49:da:8f:41:38:ae:
+                    48:a9
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Subject Key Identifier: 
+                FC:E0:66:F6:5A:35:99:EB:40:1E:D2:B8:1E:43:BC:98:8E:1F:8A:C3
+            X509v3 Authority Key Identifier: 
+                keyid:60:7B:66:1A:45:0D:97:CA:89:50:2F:7D:04:CD:34:A8:FF:FC:FD:4B
+
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        9b:a3:08:44:ce:f2:90:9d:71:f3:32:b3:05:6a:b5:ea:cf:29:
+        98:de:55:3e:a0:16:7d:06:7a:44:d6:af:d2:fa:13:58:8c:f8:
+        1c:c7:ab:1d:b4:1b:ef:69:68:98:5c:08:39:8f:e0:f7:fb:48:
+        cc:21:e7:b8:33:db:05:aa:34:24:6c:4a:e5:e9:7b:60:de:83:
+        b3:1f:0a:be:41:75:fc:cc:30:48:b7:c1:26:1d:04:33:aa:b6:
+        78:ed:2a:cb:ba:56:97:32:6e:f7:31:95:2e:46:f2:14:ee:27:
+        c7:f7:62:89:b9:5c:5a:d3:38:8a:64:f5:37:b4:f1:b3:34:72:
+        d5:d5:21:3d:4b:d7:78:93:d7:31:66:35:1e:a3:d8:47:49:6f:
+        1c:ad:e1:80:7f:f8:98:24:6c:73:ac:0e:c2:1a:77:02:a3:26:
+        07:b7:c7:6b:5d:bc:82:d5:2a:48:1d:63:cf:50:32:a6:fb:1c:
+        18:47:15:0a:5b:0c:5c:38:24:9a:04:98:a8:08:48:5f:7c:34:
+        87:63:ab:2d:8d:4c:00:77:94:1b:76:ba:f5:16:18:a3:15:af:
+        2f:94:f6:29:00:76:c1:15:17:d3:e9:37:4d:76:d4:cb:4b:29:
+        59:24:ac:da:4a:a0:ea:63:de:5f:54:b1:fa:f3:d1:45:cb:c5:
+        64:b4:73:21
+
+GlobalSign Primary Class 2 CA
+=============================
+MD5 Fingerprint: A9:A9:42:59:7E:BE:5A:94:E4:2C:C6:8B:1C:2A:44:B6
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDrDCCApSgAwIBAgILAgAAAAAA1ni4jY0wDQYJKoZIhvcNAQEEBQAwVzELMAkG
+A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
+b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05OTAxMjgxMjAw
+MDBaFw0wOTAxMjgxMjAwMDBaMG0xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
+YWxTaWduIG52LXNhMRswGQYDVQQLExJQcmltYXJ5IENsYXNzIDIgQ0ExJjAkBgNV
+BAMTHUdsb2JhbFNpZ24gUHJpbWFyeSBDbGFzcyAyIENBMIIBIjANBgkqhkiG9w0B
+AQEFAAOCAQ8AMIIBCgKCAQEAkoz+7/RFjhdBbvzYvyFvqwadUsEsAJ0/joW4f0qP
+vaBjKspJJ65agvR04lWS/8LRqnmitvrVnYIET8ayxl5jpzq62O7rim+ftrsoQcAi
++05IGgaS17/Xz7nZvThPOw1EblVB/vwJ29i/844h8egStfYTpdPGTJMisAL/7h0M
+xKhrT3VoVujcKBJQ96gknS4kOfsJBd7lo2RJIdBofnEwkbFg4Dn0UPh6TZgAa3x5
+uk7OSuK6Nh23xTYVlZxkQupfxLr1QAW+4TpZvYSnGbjeTVNQzgfR0lHT7w2BbObn
+bctdfD98zOxPgycl/3BQ9oNZdYQGZlgs3omNAKZJ+aVDdwIDAQABo2MwYTAOBgNV
+HQ8BAf8EBAMCAAYwHQYDVR0OBBYEFHznsrEs3rGna+l2DOGj/U5sx7n2MB8GA1Ud
+IwQYMBaAFGB7ZhpFDZfKiVAvfQTNNKj//P1LMA8GA1UdEwEB/wQFMAMBAf8wDQYJ
+KoZIhvcNAQEEBQADggEBAGPdWc6KeaqYnU7FiWQ3foqTZy8Q6m8nw413bfJcVpQZ
+GmlgMEZdj/JtRTyONZd8L7hR4uiJvYjPJxwINFyIwWgk25GF5M/7+0ON6CUBG8QO
+9wBCSIYfJAhYWoyN8mtHLGiRsWlC/Q2NySbmkoamZG6Sxc4+PH1x4yOkq8fVqKnf
+gqc76IbVw08Y40TQ4NzzxWgu/qUvBYTIfkdCU2uHSv4y/14+cIy3qBXMF8L/RuzQ
+7C20bhIoqflA6evUZpdTqWlVwKmqsi7N0Wn0vvi7fGnuVKbbnvtapj7+mu+UUUt1
+7tjU4ZrxAlYTiQ6nQouWi4UMG4W+Jq6rppm8IvFz30I=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            02:00:00:00:00:00:d6:78:b8:8d:8d
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
+        Validity
+            Not Before: Jan 28 12:00:00 1999 GMT
+            Not After : Jan 28 12:00:00 2009 GMT
+        Subject: C=BE, O=GlobalSign nv-sa, OU=Primary Class 2 CA, CN=GlobalSign Primary Class 2 CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:92:8c:fe:ef:f4:45:8e:17:41:6e:fc:d8:bf:21:
+                    6f:ab:06:9d:52:c1:2c:00:9d:3f:8e:85:b8:7f:4a:
+                    8f:bd:a0:63:2a:ca:49:27:ae:5a:82:f4:74:e2:55:
+                    92:ff:c2:d1:aa:79:a2:b6:fa:d5:9d:82:04:4f:c6:
+                    b2:c6:5e:63:a7:3a:ba:d8:ee:eb:8a:6f:9f:b6:bb:
+                    28:41:c0:22:fb:4e:48:1a:06:92:d7:bf:d7:cf:b9:
+                    d9:bd:38:4f:3b:0d:44:6e:55:41:fe:fc:09:db:d8:
+                    bf:f3:8e:21:f1:e8:12:b5:f6:13:a5:d3:c6:4c:93:
+                    22:b0:02:ff:ee:1d:0c:c4:a8:6b:4f:75:68:56:e8:
+                    dc:28:12:50:f7:a8:24:9d:2e:24:39:fb:09:05:de:
+                    e5:a3:64:49:21:d0:68:7e:71:30:91:b1:60:e0:39:
+                    f4:50:f8:7a:4d:98:00:6b:7c:79:ba:4e:ce:4a:e2:
+                    ba:36:1d:b7:c5:36:15:95:9c:64:42:ea:5f:c4:ba:
+                    f5:40:05:be:e1:3a:59:bd:84:a7:19:b8:de:4d:53:
+                    50:ce:07:d1:d2:51:d3:ef:0d:81:6c:e6:e7:6d:cb:
+                    5d:7c:3f:7c:cc:ec:4f:83:27:25:ff:70:50:f6:83:
+                    59:75:84:06:66:58:2c:de:89:8d:00:a6:49:f9:a5:
+                    43:77
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Subject Key Identifier: 
+                7C:E7:B2:B1:2C:DE:B1:A7:6B:E9:76:0C:E1:A3:FD:4E:6C:C7:B9:F6
+            X509v3 Authority Key Identifier: 
+                keyid:60:7B:66:1A:45:0D:97:CA:89:50:2F:7D:04:CD:34:A8:FF:FC:FD:4B
+
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        63:dd:59:ce:8a:79:aa:98:9d:4e:c5:89:64:37:7e:8a:93:67:
+        2f:10:ea:6f:27:c3:8d:77:6d:f2:5c:56:94:19:1a:69:60:30:
+        46:5d:8f:f2:6d:45:3c:8e:35:97:7c:2f:b8:51:e2:e8:89:bd:
+        88:cf:27:1c:08:34:5c:88:c1:68:24:db:91:85:e4:cf:fb:fb:
+        43:8d:e8:25:01:1b:c4:0e:f7:00:42:48:86:1f:24:08:58:5a:
+        8c:8d:f2:6b:47:2c:68:91:b1:69:42:fd:0d:8d:c9:26:e6:92:
+        86:a6:64:6e:92:c5:ce:3e:3c:7d:71:e3:23:a4:ab:c7:d5:a8:
+        a9:df:82:a7:3b:e8:86:d5:c3:4f:18:e3:44:d0:e0:dc:f3:c5:
+        68:2e:fe:a5:2f:05:84:c8:7e:47:42:53:6b:87:4a:fe:32:ff:
+        5e:3e:70:8c:b7:a8:15:cc:17:c2:ff:46:ec:d0:ec:2d:b4:6e:
+        12:28:a9:f9:40:e9:eb:d4:66:97:53:a9:69:55:c0:a9:aa:b2:
+        2e:cd:d1:69:f4:be:f8:bb:7c:69:ee:54:a6:db:9e:fb:5a:a6:
+        3e:fe:9a:ef:94:51:4b:75:ee:d8:d4:e1:9a:f1:02:56:13:89:
+        0e:a7:42:8b:96:8b:85:0c:1b:85:be:26:ae:ab:a6:99:bc:22:
+        f1:73:df:42
+
+GlobalSign Primary Class 3 CA
+=============================
+MD5 Fingerprint: 98:12:A3:4B:95:A9:96:64:94:E7:50:8C:3E:E1:83:5A
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDrDCCApSgAwIBAgILAgAAAAAA1ni41sMwDQYJKoZIhvcNAQEEBQAwVzELMAkG
+A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
+b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05OTAxMjgxMjAw
+MDBaFw0wOTAxMjgxMjAwMDBaMG0xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
+YWxTaWduIG52LXNhMRswGQYDVQQLExJQcmltYXJ5IENsYXNzIDMgQ0ExJjAkBgNV
+BAMTHUdsb2JhbFNpZ24gUHJpbWFyeSBDbGFzcyAzIENBMIIBIjANBgkqhkiG9w0B
+AQEFAAOCAQ8AMIIBCgKCAQEAkV5WZdbAwAScv0fEXHt6MQH5WJaZ4xyEL9xWj631
+WYHVQ2ZdWpOMdcqp5xHBURAUYMks1HuvxneGq3onrm+VuQvKtkb7fhr0DRRt0slO
+sq7wVPZcQEw2SHToVIxlZhCnvSu3II0FSa14fdIkI1Dj8LR5mwE5/6870y3u4UmN
+jS88akFFL5vjPeES5JF1ns+gPjySgW+KLhjc4PKMjP2H2Qf0QJTJTk9D32dWb70D
+UHyZZ6S5PJFsAm6E1vxG98xvGD4X8O8LZBZX5qyG8UiqQ8HJJ3hzREXihX26/7Ph
++xsFpEs7mRIlAVAUaq9d6sgM7uTa7EuLXGgTldzDtTA61wIDAQABo2MwYTAOBgNV
+HQ8BAf8EBAMCAAYwHQYDVR0OBBYEFMw2zBe0RZEv7c87MEh3+7UUmb7jMB8GA1Ud
+IwQYMBaAFGB7ZhpFDZfKiVAvfQTNNKj//P1LMA8GA1UdEwEB/wQFMAMBAf8wDQYJ
+KoZIhvcNAQEEBQADggEBAFeyVMy9lRdkYIm2U5EMRZLDPahsw8yyGPV4QXTYfaMn
+r3cNWT6UHWn6idMMvRoB9D/o4Hcagiha5mLXt+M2yQ6feuPC08xZiQzvFovwNnci
+yqS2t8FCZwFAY8znOGSHWxSWZnstFO69SW3/d9DiTlvTgMJND8q4nYGXpzRux+Oc
+SOW0qkX19mVMSPISwtKTjMIVJPMrUv/jCK64btYsEs85yxIq56l7X5g9o+HMpmOJ
+XH0xdfnV1l3y0NQ9355xqA7c5CCXeOZ/U6QNUU+OOwOuow1aTcN55zVYcELJXqFe
+tNkio0RTNaTQz3OAxc+fVph2+RRMd4eCydx+XTTVNnU=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            02:00:00:00:00:00:d6:78:b8:d6:c3
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
+        Validity
+            Not Before: Jan 28 12:00:00 1999 GMT
+            Not After : Jan 28 12:00:00 2009 GMT
+        Subject: C=BE, O=GlobalSign nv-sa, OU=Primary Class 3 CA, CN=GlobalSign Primary Class 3 CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:91:5e:56:65:d6:c0:c0:04:9c:bf:47:c4:5c:7b:
+                    7a:31:01:f9:58:96:99:e3:1c:84:2f:dc:56:8f:ad:
+                    f5:59:81:d5:43:66:5d:5a:93:8c:75:ca:a9:e7:11:
+                    c1:51:10:14:60:c9:2c:d4:7b:af:c6:77:86:ab:7a:
+                    27:ae:6f:95:b9:0b:ca:b6:46:fb:7e:1a:f4:0d:14:
+                    6d:d2:c9:4e:b2:ae:f0:54:f6:5c:40:4c:36:48:74:
+                    e8:54:8c:65:66:10:a7:bd:2b:b7:20:8d:05:49:ad:
+                    78:7d:d2:24:23:50:e3:f0:b4:79:9b:01:39:ff:af:
+                    3b:d3:2d:ee:e1:49:8d:8d:2f:3c:6a:41:45:2f:9b:
+                    e3:3d:e1:12:e4:91:75:9e:cf:a0:3e:3c:92:81:6f:
+                    8a:2e:18:dc:e0:f2:8c:8c:fd:87:d9:07:f4:40:94:
+                    c9:4e:4f:43:df:67:56:6f:bd:03:50:7c:99:67:a4:
+                    b9:3c:91:6c:02:6e:84:d6:fc:46:f7:cc:6f:18:3e:
+                    17:f0:ef:0b:64:16:57:e6:ac:86:f1:48:aa:43:c1:
+                    c9:27:78:73:44:45:e2:85:7d:ba:ff:b3:e1:fb:1b:
+                    05:a4:4b:3b:99:12:25:01:50:14:6a:af:5d:ea:c8:
+                    0c:ee:e4:da:ec:4b:8b:5c:68:13:95:dc:c3:b5:30:
+                    3a:d7
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Subject Key Identifier: 
+                CC:36:CC:17:B4:45:91:2F:ED:CF:3B:30:48:77:FB:B5:14:99:BE:E3
+            X509v3 Authority Key Identifier: 
+                keyid:60:7B:66:1A:45:0D:97:CA:89:50:2F:7D:04:CD:34:A8:FF:FC:FD:4B
+
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        57:b2:54:cc:bd:95:17:64:60:89:b6:53:91:0c:45:92:c3:3d:
+        a8:6c:c3:cc:b2:18:f5:78:41:74:d8:7d:a3:27:af:77:0d:59:
+        3e:94:1d:69:fa:89:d3:0c:bd:1a:01:f4:3f:e8:e0:77:1a:82:
+        28:5a:e6:62:d7:b7:e3:36:c9:0e:9f:7a:e3:c2:d3:cc:59:89:
+        0c:ef:16:8b:f0:36:77:22:ca:a4:b6:b7:c1:42:67:01:40:63:
+        cc:e7:38:64:87:5b:14:96:66:7b:2d:14:ee:bd:49:6d:ff:77:
+        d0:e2:4e:5b:d3:80:c2:4d:0f:ca:b8:9d:81:97:a7:34:6e:c7:
+        e3:9c:48:e5:b4:aa:45:f5:f6:65:4c:48:f2:12:c2:d2:93:8c:
+        c2:15:24:f3:2b:52:ff:e3:08:ae:b8:6e:d6:2c:12:cf:39:cb:
+        12:2a:e7:a9:7b:5f:98:3d:a3:e1:cc:a6:63:89:5c:7d:31:75:
+        f9:d5:d6:5d:f2:d0:d4:3d:df:9e:71:a8:0e:dc:e4:20:97:78:
+        e6:7f:53:a4:0d:51:4f:8e:3b:03:ae:a3:0d:5a:4d:c3:79:e7:
+        35:58:70:42:c9:5e:a1:5e:b4:d9:22:a3:44:53:35:a4:d0:cf:
+        73:80:c5:cf:9f:56:98:76:f9:14:4c:77:87:82:c9:dc:7e:5d:
+        34:d5:36:75
+
+GlobalSign Root CA
+==================
+MD5 Fingerprint: AB:BF:EA:E3:6B:29:A6:CC:A6:78:35:99:EF:AD:2B:80
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDdTCCAl2gAwIBAgILAgAAAAAA1ni3lAUwDQYJKoZIhvcNAQEEBQAwVzELMAkG
+A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
+b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAw
+MDBaFw0xNDAxMjgxMjAwMDBaMFcxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
+YWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYDVQQDExJHbG9iYWxT
+aWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDaDuaZ
+jc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavp
+xy0Sy6scTHAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp
+1Wrjsok6Vjk4bwY8iGlbKk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdG
+snUOhugZitVtbNV4FpWi6cgKOOvyJBNPc1STE4U6G7weNLWLBYy5d4ux2x8gkasJ
+U26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrXgzT/LCrBbBlDSgeF59N8
+9iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIABjAdBgNVHQ4EFgQU
+YHtmGkUNl8qJUC99BM00qP/8/UswDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0B
+AQQFAAOCAQEArqqf/LfSyx9fOSkoGJ40yWxPbxrwZKJwSk8ThptgKJ7ogUmYfQq7
+5bCdPTbbjwVR/wkxKh/diXeeDy5slQTthsu0AD+EAk2AaioteAuubyuig0SDH81Q
+gkwkr733pbTIWg/050deSY43lv6aiAU62cDbKYfmGZZHpzqmjIs8d/5GY6dT2iHR
+rH5Jokvmw2dZL7OKDrssvamqQnw1wdh/1acxOk5jQzmvCLBhNIzTmKlDNPYPhyk7
+ncJWWJh3w/cbrPad+D6qp1RF8PX51TFl/mtYnHGzHtdS6jIX/EBgHcl5JLL2bP2o
+Zg6C3ZjL2sJETy6ge/L3ayx2EYRGinij4w==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            02:00:00:00:00:00:d6:78:b7:94:05
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
+        Validity
+            Not Before: Sep  1 12:00:00 1998 GMT
+            Not After : Jan 28 12:00:00 2014 GMT
+        Subject: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:da:0e:e6:99:8d:ce:a3:e3:4f:8a:7e:fb:f1:8b:
+                    83:25:6b:ea:48:1f:f1:2a:b0:b9:95:11:04:bd:f0:
+                    63:d1:e2:67:66:cf:1c:dd:cf:1b:48:2b:ee:8d:89:
+                    8e:9a:af:29:80:65:ab:e9:c7:2d:12:cb:ab:1c:4c:
+                    70:07:a1:3d:0a:30:cd:15:8d:4f:f8:dd:d4:8c:50:
+                    15:1c:ef:50:ee:c4:2e:f7:fc:e9:52:f2:91:7d:e0:
+                    6d:d5:35:30:8e:5e:43:73:f2:41:e9:d5:6a:e3:b2:
+                    89:3a:56:39:38:6f:06:3c:88:69:5b:2a:4d:c5:a7:
+                    54:b8:6c:89:cc:9b:f9:3c:ca:e5:fd:89:f5:12:3c:
+                    92:78:96:d6:dc:74:6e:93:44:61:d1:8d:c7:46:b2:
+                    75:0e:86:e8:19:8a:d5:6d:6c:d5:78:16:95:a2:e9:
+                    c8:0a:38:eb:f2:24:13:4f:73:54:93:13:85:3a:1b:
+                    bc:1e:34:b5:8b:05:8c:b9:77:8b:b1:db:1f:20:91:
+                    ab:09:53:6e:90:ce:7b:37:74:b9:70:47:91:22:51:
+                    63:16:79:ae:b1:ae:41:26:08:c8:19:2b:d1:46:aa:
+                    48:d6:64:2a:d7:83:34:ff:2c:2a:c1:6c:19:43:4a:
+                    07:85:e7:d3:7c:f6:21:68:ef:ea:f2:52:9f:7f:93:
+                    90:cf
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Subject Key Identifier: 
+                60:7B:66:1A:45:0D:97:CA:89:50:2F:7D:04:CD:34:A8:FF:FC:FD:4B
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        ae:aa:9f:fc:b7:d2:cb:1f:5f:39:29:28:18:9e:34:c9:6c:4f:
+        6f:1a:f0:64:a2:70:4a:4f:13:86:9b:60:28:9e:e8:81:49:98:
+        7d:0a:bb:e5:b0:9d:3d:36:db:8f:05:51:ff:09:31:2a:1f:dd:
+        89:77:9e:0f:2e:6c:95:04:ed:86:cb:b4:00:3f:84:02:4d:80:
+        6a:2a:2d:78:0b:ae:6f:2b:a2:83:44:83:1f:cd:50:82:4c:24:
+        af:bd:f7:a5:b4:c8:5a:0f:f4:e7:47:5e:49:8e:37:96:fe:9a:
+        88:05:3a:d9:c0:db:29:87:e6:19:96:47:a7:3a:a6:8c:8b:3c:
+        77:fe:46:63:a7:53:da:21:d1:ac:7e:49:a2:4b:e6:c3:67:59:
+        2f:b3:8a:0e:bb:2c:bd:a9:aa:42:7c:35:c1:d8:7f:d5:a7:31:
+        3a:4e:63:43:39:af:08:b0:61:34:8c:d3:98:a9:43:34:f6:0f:
+        87:29:3b:9d:c2:56:58:98:77:c3:f7:1b:ac:f6:9d:f8:3e:aa:
+        a7:54:45:f0:f5:f9:d5:31:65:fe:6b:58:9c:71:b3:1e:d7:52:
+        ea:32:17:fc:40:60:1d:c9:79:24:b2:f6:6c:fd:a8:66:0e:82:
+        dd:98:cb:da:c2:44:4f:2e:a0:7b:f2:f7:6b:2c:76:11:84:46:
+        8a:78:a3:e3
+
+National Retail Federation by DST
+=================================
+MD5 Fingerprint: AD:8E:0F:9E:01:6B:A0:C5:74:D5:0C:D3:68:65:4F:1E
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEAjCCAuoCEQDQHkCKAAACfAAAAAMAAAABMA0GCSqGSIb3DQEBBQUAMIG+MQsw
+CQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENp
+dHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjEjMCEGA1UE
+CxMaTmF0aW9uYWwgUmV0YWlsIEZlZGVyYXRpb24xGTAXBgNVBAMTEERTVCAoTlJG
+KSBSb290Q0ExITAfBgkqhkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTAeFw05
+ODEyMTExNjE0MTZaFw0wODEyMDgxNjE0MTZaMIG+MQswCQYDVQQGEwJ1czENMAsG
+A1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxJDAiBgNVBAoTG0Rp
+Z2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjEjMCEGA1UECxMaTmF0aW9uYWwgUmV0
+YWlsIEZlZGVyYXRpb24xGTAXBgNVBAMTEERTVCAoTlJGKSBSb290Q0ExITAfBgkq
+hkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTCCASIwDQYJKoZIhvcNAQEBBQAD
+ggEPADCCAQoCggEBANmsm3f6UNPM3LlArLlyagCHI/wPliHQJq/k4rVf+tOmfSEw
+LswXgo+YdPxnpKbfiJeiQin1p9sRk/teIzDCqrwi50Eb5e0l3sg/295XRXhARoOy
+1Ro93w9FbdVjAnXYL8Zuq5WRdDcNy00JXNHUWzra3Q7Ia5nY1TnM34VVxJJTAqPh
+94DJcKPa3DPEf6JHCBw1lh+hAxwwg/TEzP+Yw7BGRKLAv63b0oH2TJgsp14k84bK
+Y9W6ffCawErQG1ju7Klnz2kCbCLAYCws0cgg6sgt+92cu8tRTNznVwQ7VJsRpTJ0
+7HQB85AVWy98LJNluWZntIGINeWekRh/gahByMsCAwEAATANBgkqhkiG9w0BAQUF
+AAOCAQEAhF4LO+ygjRyb0DwdcWnkGn9kvoFlYcWMatd8AHTgemJV7SR84GHj8t0U
+5hFugw7h6qmegK2aIL/gV37V0LWEYy3ZGOS9GzUsXq5hdqpnhTs44TGBHzF/5tf4
+W9K7Y3mGxIzF3gqu19H8AXT/trYNYoFnHLsm+CSA4Fxe2KSKOo99y/+So/18qTJp
+B1hYYUKZUgOxOD3GcW9s8uh9BqrBfFPLGi2IT8mpp6xpb/ekH9h0gfVKv7FVt9N3
+OKdvwkrI4nOJ01dy4UMvcjz2H7f4BEpuwemUF+SXF/QOE4ZvjavoXy20/2zWorQf
+7LmUaqoSTxrd9Xe1JYzyigrx/FJbWA==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            d0:1e:40:8a:00:00:02:7c:00:00:00:03:00:00:00:01
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=National Retail Federation, CN=DST (NRF) RootCA/Email=ca@digsigtrust.com
+        Validity
+            Not Before: Dec 11 16:14:16 1998 GMT
+            Not After : Dec  8 16:14:16 2008 GMT
+        Subject: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=National Retail Federation, CN=DST (NRF) RootCA/Email=ca@digsigtrust.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:d9:ac:9b:77:fa:50:d3:cc:dc:b9:40:ac:b9:72:
+                    6a:00:87:23:fc:0f:96:21:d0:26:af:e4:e2:b5:5f:
+                    fa:d3:a6:7d:21:30:2e:cc:17:82:8f:98:74:fc:67:
+                    a4:a6:df:88:97:a2:42:29:f5:a7:db:11:93:fb:5e:
+                    23:30:c2:aa:bc:22:e7:41:1b:e5:ed:25:de:c8:3f:
+                    db:de:57:45:78:40:46:83:b2:d5:1a:3d:df:0f:45:
+                    6d:d5:63:02:75:d8:2f:c6:6e:ab:95:91:74:37:0d:
+                    cb:4d:09:5c:d1:d4:5b:3a:da:dd:0e:c8:6b:99:d8:
+                    d5:39:cc:df:85:55:c4:92:53:02:a3:e1:f7:80:c9:
+                    70:a3:da:dc:33:c4:7f:a2:47:08:1c:35:96:1f:a1:
+                    03:1c:30:83:f4:c4:cc:ff:98:c3:b0:46:44:a2:c0:
+                    bf:ad:db:d2:81:f6:4c:98:2c:a7:5e:24:f3:86:ca:
+                    63:d5:ba:7d:f0:9a:c0:4a:d0:1b:58:ee:ec:a9:67:
+                    cf:69:02:6c:22:c0:60:2c:2c:d1:c8:20:ea:c8:2d:
+                    fb:dd:9c:bb:cb:51:4c:dc:e7:57:04:3b:54:9b:11:
+                    a5:32:74:ec:74:01:f3:90:15:5b:2f:7c:2c:93:65:
+                    b9:66:67:b4:81:88:35:e5:9e:91:18:7f:81:a8:41:
+                    c8:cb
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        84:5e:0b:3b:ec:a0:8d:1c:9b:d0:3c:1d:71:69:e4:1a:7f:64:
+        be:81:65:61:c5:8c:6a:d7:7c:00:74:e0:7a:62:55:ed:24:7c:
+        e0:61:e3:f2:dd:14:e6:11:6e:83:0e:e1:ea:a9:9e:80:ad:9a:
+        20:bf:e0:57:7e:d5:d0:b5:84:63:2d:d9:18:e4:bd:1b:35:2c:
+        5e:ae:61:76:aa:67:85:3b:38:e1:31:81:1f:31:7f:e6:d7:f8:
+        5b:d2:bb:63:79:86:c4:8c:c5:de:0a:ae:d7:d1:fc:01:74:ff:
+        b6:b6:0d:62:81:67:1c:bb:26:f8:24:80:e0:5c:5e:d8:a4:8a:
+        3a:8f:7d:cb:ff:92:a3:fd:7c:a9:32:69:07:58:58:61:42:99:
+        52:03:b1:38:3d:c6:71:6f:6c:f2:e8:7d:06:aa:c1:7c:53:cb:
+        1a:2d:88:4f:c9:a9:a7:ac:69:6f:f7:a4:1f:d8:74:81:f5:4a:
+        bf:b1:55:b7:d3:77:38:a7:6f:c2:4a:c8:e2:73:89:d3:57:72:
+        e1:43:2f:72:3c:f6:1f:b7:f8:04:4a:6e:c1:e9:94:17:e4:97:
+        17:f4:0e:13:86:6f:8d:ab:e8:5f:2d:b4:ff:6c:d6:a2:b4:1f:
+        ec:b9:94:6a:aa:12:4f:1a:dd:f5:77:b5:25:8c:f2:8a:0a:f1:
+        fc:52:5b:58
+
+TC TrustCenter, Germany, Class 1 CA
+===================================
+MD5 Fingerprint: 64:3F:F8:3E:52:14:4A:59:BA:93:56:04:0B:23:02:D1
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIENTCCA56gAwIBAgIBAjANBgkqhkiG9w0BAQQFADCBvDELMAkGA1UEBhMCREUx
+EDAOBgNVBAgTB0hhbWJ1cmcxEDAOBgNVBAcTB0hhbWJ1cmcxOjA4BgNVBAoTMVRD
+IFRydXN0Q2VudGVyIGZvciBTZWN1cml0eSBpbiBEYXRhIE5ldHdvcmtzIEdtYkgx
+IjAgBgNVBAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDEgQ0ExKTAnBgkqhkiG9w0B
+CQEWGmNlcnRpZmljYXRlQHRydXN0Y2VudGVyLmRlMB4XDTk4MDMwOTEzNTYzM1oX
+DTA1MTIzMTEzNTYzM1owgbwxCzAJBgNVBAYTAkRFMRAwDgYDVQQIEwdIYW1idXJn
+MRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFUQyBUcnVzdENlbnRlciBmb3Ig
+U2VjdXJpdHkgaW4gRGF0YSBOZXR3b3JrcyBHbWJIMSIwIAYDVQQLExlUQyBUcnVz
+dENlbnRlciBDbGFzcyAxIENBMSkwJwYJKoZIhvcNAQkBFhpjZXJ0aWZpY2F0ZUB0
+cnVzdGNlbnRlci5kZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAsCnrtHaz
+rte2W7Re573jsZxJBFdboavZfxMb/bphq9jncd8tAJRdUUh9I+91YoSQPAofWRF0
+L46Apf0wAj0pUs1yGkkhnLzLUo5IoWOWyBCFMGlXdEXAWobG1T3gaFd9MWokjUWX
+PjF+aGYybiRt7DI2yUHK8DFEyKNhyhugNh8CAwEAAaOCAUMwggE/MEAGCWCGSAGG
++EIBAwQzFjFodHRwczovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL2NoZWNr
+LXJldi5jZ2k/MEAGCWCGSAGG+EIBBAQzFjFodHRwczovL3d3dy50cnVzdGNlbnRl
+ci5kZS9jZ2ktYmluL2NoZWNrLXJldi5jZ2k/MDwGCWCGSAGG+EIBBwQvFi1odHRw
+czovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL1JlbmV3LmNnaT8wPgYJYIZI
+AYb4QgEIBDEWL2h0dHA6Ly93d3cudHJ1c3RjZW50ZXIuZGUvZ3VpZGVsaW5lcy9p
+bmRleC5odG1sMCgGCWCGSAGG+EIBDQQbFhlUQyBUcnVzdENlbnRlciBDbGFzcyAx
+IENBMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQQFAAOBgQAFQlImpAwn
+AUSsXCUowkRCVAi5HcU+bFlmxLNOUKf4+JZ1oZZ16BY4oM1dbvp5pxt7HR7DALlm
+vlrWYg/n8nu470zgwD9Zrjm3hAmeq/GpLmtp4q3M8up4CQUgOEJxGH7Hspfm1QIF
+BlajX/GqwsRP/vfvFg+d7KqFzz0pJPEEzQ==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 2 (0x2)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 1 CA/Email=certificate@trustcenter.de
+        Validity
+            Not Before: Mar  9 13:56:33 1998 GMT
+            Not After : Dec 31 13:56:33 2005 GMT
+        Subject: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 1 CA/Email=certificate@trustcenter.de
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b0:29:eb:b4:76:b3:ae:d7:b6:5b:b4:5e:e7:bd:
+                    e3:b1:9c:49:04:57:5b:a1:ab:d9:7f:13:1b:fd:ba:
+                    61:ab:d8:e7:71:df:2d:00:94:5d:51:48:7d:23:ef:
+                    75:62:84:90:3c:0a:1f:59:11:74:2f:8e:80:a5:fd:
+                    30:02:3d:29:52:cd:72:1a:49:21:9c:bc:cb:52:8e:
+                    48:a1:63:96:c8:10:85:30:69:57:74:45:c0:5a:86:
+                    c6:d5:3d:e0:68:57:7d:31:6a:24:8d:45:97:3e:31:
+                    7e:68:66:32:6e:24:6d:ec:32:36:c9:41:ca:f0:31:
+                    44:c8:a3:61:ca:1b:a0:36:1f
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape CA Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape Renewal Url: 
+                https://www.trustcenter.de/cgi-bin/Renew.cgi?
+            Netscape CA Policy Url: 
+                http://www.trustcenter.de/guidelines/index.html
+            Netscape Comment: 
+                TC TrustCenter Class 1 CA
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+    Signature Algorithm: md5WithRSAEncryption
+        05:42:52:26:a4:0c:27:01:44:ac:5c:25:28:c2:44:42:54:08:
+        b9:1d:c5:3e:6c:59:66:c4:b3:4e:50:a7:f8:f8:96:75:a1:96:
+        75:e8:16:38:a0:cd:5d:6e:fa:79:a7:1b:7b:1d:1e:c3:00:b9:
+        66:be:5a:d6:62:0f:e7:f2:7b:b8:ef:4c:e0:c0:3f:59:ae:39:
+        b7:84:09:9e:ab:f1:a9:2e:6b:69:e2:ad:cc:f2:ea:78:09:05:
+        20:38:42:71:18:7e:c7:b2:97:e6:d5:02:05:06:56:a3:5f:f1:
+        aa:c2:c4:4f:fe:f7:ef:16:0f:9d:ec:aa:85:cf:3d:29:24:f1:
+        04:cd
+
+TC TrustCenter, Germany, Class 2 CA
+===================================
+MD5 Fingerprint: E1:E9:96:53:77:E1:F0:38:A0:02:AB:94:C6:95:7B:FC
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIENTCCA56gAwIBAgIBAzANBgkqhkiG9w0BAQQFADCBvDELMAkGA1UEBhMCREUx
+EDAOBgNVBAgTB0hhbWJ1cmcxEDAOBgNVBAcTB0hhbWJ1cmcxOjA4BgNVBAoTMVRD
+IFRydXN0Q2VudGVyIGZvciBTZWN1cml0eSBpbiBEYXRhIE5ldHdvcmtzIEdtYkgx
+IjAgBgNVBAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDIgQ0ExKTAnBgkqhkiG9w0B
+CQEWGmNlcnRpZmljYXRlQHRydXN0Y2VudGVyLmRlMB4XDTk4MDMwOTEzNTc0NFoX
+DTA1MTIzMTEzNTc0NFowgbwxCzAJBgNVBAYTAkRFMRAwDgYDVQQIEwdIYW1idXJn
+MRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFUQyBUcnVzdENlbnRlciBmb3Ig
+U2VjdXJpdHkgaW4gRGF0YSBOZXR3b3JrcyBHbWJIMSIwIAYDVQQLExlUQyBUcnVz
+dENlbnRlciBDbGFzcyAyIENBMSkwJwYJKoZIhvcNAQkBFhpjZXJ0aWZpY2F0ZUB0
+cnVzdGNlbnRlci5kZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA2jjo7TIA
+KXGDAQ2/jAHc2satOaSpii/Vi1xoX1DGYvVmvcqRIuyqHVHXPbNRsoNOXctJsPBM
+VeVrLceFCzAckk6C1MoC7fdvvtzg4xS4BVPymvRWi1qehZPRtIJWrk27qEtXFrz+
++Fie+CmNsHvNeMlPrItnDPGc+/xXm1dcTw0CAwEAAaOCAUMwggE/MEAGCWCGSAGG
++EIBAwQzFjFodHRwczovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL2NoZWNr
+LXJldi5jZ2k/MEAGCWCGSAGG+EIBBAQzFjFodHRwczovL3d3dy50cnVzdGNlbnRl
+ci5kZS9jZ2ktYmluL2NoZWNrLXJldi5jZ2k/MDwGCWCGSAGG+EIBBwQvFi1odHRw
+czovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL1JlbmV3LmNnaT8wPgYJYIZI
+AYb4QgEIBDEWL2h0dHA6Ly93d3cudHJ1c3RjZW50ZXIuZGUvZ3VpZGVsaW5lcy9p
+bmRleC5odG1sMCgGCWCGSAGG+EIBDQQbFhlUQyBUcnVzdENlbnRlciBDbGFzcyAy
+IENBMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQQFAAOBgQCJG/Tv6Tji
+bAz2zW9JzinM+6YP+Y0+lUbW/EcyibLIBmF60ucNEwKUC9mLVkf0u+fFX3v0Y0yu
+fDTqDaKpsyyF8+P+J1QQkrCPksGYQhhwSNtOLOsNJGjk0fe+Cakph7vo2tw+o4hC
+MfXR43+u2I4AWnSYsE/G/yN7XHMAeMnbTg==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 3 (0x3)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 2 CA/Email=certificate@trustcenter.de
+        Validity
+            Not Before: Mar  9 13:57:44 1998 GMT
+            Not After : Dec 31 13:57:44 2005 GMT
+        Subject: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 2 CA/Email=certificate@trustcenter.de
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:da:38:e8:ed:32:00:29:71:83:01:0d:bf:8c:01:
+                    dc:da:c6:ad:39:a4:a9:8a:2f:d5:8b:5c:68:5f:50:
+                    c6:62:f5:66:bd:ca:91:22:ec:aa:1d:51:d7:3d:b3:
+                    51:b2:83:4e:5d:cb:49:b0:f0:4c:55:e5:6b:2d:c7:
+                    85:0b:30:1c:92:4e:82:d4:ca:02:ed:f7:6f:be:dc:
+                    e0:e3:14:b8:05:53:f2:9a:f4:56:8b:5a:9e:85:93:
+                    d1:b4:82:56:ae:4d:bb:a8:4b:57:16:bc:fe:f8:58:
+                    9e:f8:29:8d:b0:7b:cd:78:c9:4f:ac:8b:67:0c:f1:
+                    9c:fb:fc:57:9b:57:5c:4f:0d
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape CA Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape Renewal Url: 
+                https://www.trustcenter.de/cgi-bin/Renew.cgi?
+            Netscape CA Policy Url: 
+                http://www.trustcenter.de/guidelines/index.html
+            Netscape Comment: 
+                TC TrustCenter Class 2 CA
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+    Signature Algorithm: md5WithRSAEncryption
+        89:1b:f4:ef:e9:38:e2:6c:0c:f6:cd:6f:49:ce:29:cc:fb:a6:
+        0f:f9:8d:3e:95:46:d6:fc:47:32:89:b2:c8:06:61:7a:d2:e7:
+        0d:13:02:94:0b:d9:8b:56:47:f4:bb:e7:c5:5f:7b:f4:63:4c:
+        ae:7c:34:ea:0d:a2:a9:b3:2c:85:f3:e3:fe:27:54:10:92:b0:
+        8f:92:c1:98:42:18:70:48:db:4e:2c:eb:0d:24:68:e4:d1:f7:
+        be:09:a9:29:87:bb:e8:da:dc:3e:a3:88:42:31:f5:d1:e3:7f:
+        ae:d8:8e:00:5a:74:98:b0:4f:c6:ff:23:7b:5c:73:00:78:c9:
+        db:4e
+
+TC TrustCenter, Germany, Class 3 CA
+===================================
+MD5 Fingerprint: 62:AB:B6:15:4A:B4:B0:16:77:FF:AE:CF:16:16:2B:8C
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIENTCCA56gAwIBAgIBBDANBgkqhkiG9w0BAQQFADCBvDELMAkGA1UEBhMCREUx
+EDAOBgNVBAgTB0hhbWJ1cmcxEDAOBgNVBAcTB0hhbWJ1cmcxOjA4BgNVBAoTMVRD
+IFRydXN0Q2VudGVyIGZvciBTZWN1cml0eSBpbiBEYXRhIE5ldHdvcmtzIEdtYkgx
+IjAgBgNVBAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDMgQ0ExKTAnBgkqhkiG9w0B
+CQEWGmNlcnRpZmljYXRlQHRydXN0Y2VudGVyLmRlMB4XDTk4MDMwOTEzNTg0OVoX
+DTA1MTIzMTEzNTg0OVowgbwxCzAJBgNVBAYTAkRFMRAwDgYDVQQIEwdIYW1idXJn
+MRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFUQyBUcnVzdENlbnRlciBmb3Ig
+U2VjdXJpdHkgaW4gRGF0YSBOZXR3b3JrcyBHbWJIMSIwIAYDVQQLExlUQyBUcnVz
+dENlbnRlciBDbGFzcyAzIENBMSkwJwYJKoZIhvcNAQkBFhpjZXJ0aWZpY2F0ZUB0
+cnVzdGNlbnRlci5kZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAtrTBNQUu
+DY3soEBqHA4nplCSa1AbB94u53bM4Nr8hKhejGNqK03ZTgJ2EcEL8o15ygC28bAO
+1/ukFz2vq2l6lie/rzOhmipZqsS1NwjyEqUxtkP1MpZxKCirjSiG37vu4wx9MNbD
+UquPXSeca8Cj5wVrV0lEs27qZM/SjnpQd3cCAwEAAaOCAUMwggE/MEAGCWCGSAGG
++EIBAwQzFjFodHRwczovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL2NoZWNr
+LXJldi5jZ2k/MEAGCWCGSAGG+EIBBAQzFjFodHRwczovL3d3dy50cnVzdGNlbnRl
+ci5kZS9jZ2ktYmluL2NoZWNrLXJldi5jZ2k/MDwGCWCGSAGG+EIBBwQvFi1odHRw
+czovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL1JlbmV3LmNnaT8wPgYJYIZI
+AYb4QgEIBDEWL2h0dHA6Ly93d3cudHJ1c3RjZW50ZXIuZGUvZ3VpZGVsaW5lcy9p
+bmRleC5odG1sMCgGCWCGSAGG+EIBDQQbFhlUQyBUcnVzdENlbnRlciBDbGFzcyAz
+IENBMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQQFAAOBgQCEhlBieaAn
+4SW6CbE0DxMJ7S3Ko+aV+TCszRelzj2Xnex8jyZ/wGHKIveR3Tw2WZqbdfe85Mjt
+7AK2IqfzLPHIknhttu7FKOyAIE+5awjnL6eGHn2xCJ9UuQA3PKDYGsiWHPQyFJw5
+lbfu8ENJwl7oy3lvU7/7SYos2EvZVfIScA==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 4 (0x4)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 3 CA/Email=certificate@trustcenter.de
+        Validity
+            Not Before: Mar  9 13:58:49 1998 GMT
+            Not After : Dec 31 13:58:49 2005 GMT
+        Subject: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 3 CA/Email=certificate@trustcenter.de
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b6:b4:c1:35:05:2e:0d:8d:ec:a0:40:6a:1c:0e:
+                    27:a6:50:92:6b:50:1b:07:de:2e:e7:76:cc:e0:da:
+                    fc:84:a8:5e:8c:63:6a:2b:4d:d9:4e:02:76:11:c1:
+                    0b:f2:8d:79:ca:00:b6:f1:b0:0e:d7:fb:a4:17:3d:
+                    af:ab:69:7a:96:27:bf:af:33:a1:9a:2a:59:aa:c4:
+                    b5:37:08:f2:12:a5:31:b6:43:f5:32:96:71:28:28:
+                    ab:8d:28:86:df:bb:ee:e3:0c:7d:30:d6:c3:52:ab:
+                    8f:5d:27:9c:6b:c0:a3:e7:05:6b:57:49:44:b3:6e:
+                    ea:64:cf:d2:8e:7a:50:77:77
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape CA Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape Renewal Url: 
+                https://www.trustcenter.de/cgi-bin/Renew.cgi?
+            Netscape CA Policy Url: 
+                http://www.trustcenter.de/guidelines/index.html
+            Netscape Comment: 
+                TC TrustCenter Class 3 CA
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+    Signature Algorithm: md5WithRSAEncryption
+        84:86:50:62:79:a0:27:e1:25:ba:09:b1:34:0f:13:09:ed:2d:
+        ca:a3:e6:95:f9:30:ac:cd:17:a5:ce:3d:97:9d:ec:7c:8f:26:
+        7f:c0:61:ca:22:f7:91:dd:3c:36:59:9a:9b:75:f7:bc:e4:c8:
+        ed:ec:02:b6:22:a7:f3:2c:f1:c8:92:78:6d:b6:ee:c5:28:ec:
+        80:20:4f:b9:6b:08:e7:2f:a7:86:1e:7d:b1:08:9f:54:b9:00:
+        37:3c:a0:d8:1a:c8:96:1c:f4:32:14:9c:39:95:b7:ee:f0:43:
+        49:c2:5e:e8:cb:79:6f:53:bf:fb:49:8a:2c:d8:4b:d9:55:f2:
+        12:70
+
+TC TrustCenter, Germany, Class 4 CA
+===================================
+MD5 Fingerprint: BF:AF:EC:C4:DA:F9:30:F9:CA:35:CA:25:E4:3F:8D:89
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIENTCCA56gAwIBAgIBBTANBgkqhkiG9w0BAQQFADCBvDELMAkGA1UEBhMCREUx
+EDAOBgNVBAgTB0hhbWJ1cmcxEDAOBgNVBAcTB0hhbWJ1cmcxOjA4BgNVBAoTMVRD
+IFRydXN0Q2VudGVyIGZvciBTZWN1cml0eSBpbiBEYXRhIE5ldHdvcmtzIEdtYkgx
+IjAgBgNVBAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDQgQ0ExKTAnBgkqhkiG9w0B
+CQEWGmNlcnRpZmljYXRlQHRydXN0Y2VudGVyLmRlMB4XDTk4MDMwOTE0MDAyMFoX
+DTA1MTIzMTE0MDAyMFowgbwxCzAJBgNVBAYTAkRFMRAwDgYDVQQIEwdIYW1idXJn
+MRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFUQyBUcnVzdENlbnRlciBmb3Ig
+U2VjdXJpdHkgaW4gRGF0YSBOZXR3b3JrcyBHbWJIMSIwIAYDVQQLExlUQyBUcnVz
+dENlbnRlciBDbGFzcyA0IENBMSkwJwYJKoZIhvcNAQkBFhpjZXJ0aWZpY2F0ZUB0
+cnVzdGNlbnRlci5kZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAvy9j1jZ7
+sg3TVfVkbOYlXca0yBS6JTiD61ZipVWpZaP0I5nCS7nQzVRnpqOgo6kzK3bkva13
+su1cEnTDxbYPUppyk0OQYmYVD0Wl3eDduG9AblfBeXKjYKq6dh0SiVNa/AK+4QkT
+xUov3D2LGa3XiyRF+0z0zVw1HSlMUfPybFUCAwEAAaOCAUMwggE/MEAGCWCGSAGG
++EIBAwQzFjFodHRwczovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL2NoZWNr
+LXJldi5jZ2k/MEAGCWCGSAGG+EIBBAQzFjFodHRwczovL3d3dy50cnVzdGNlbnRl
+ci5kZS9jZ2ktYmluL2NoZWNrLXJldi5jZ2k/MDwGCWCGSAGG+EIBBwQvFi1odHRw
+czovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL1JlbmV3LmNnaT8wPgYJYIZI
+AYb4QgEIBDEWL2h0dHA6Ly93d3cudHJ1c3RjZW50ZXIuZGUvZ3VpZGVsaW5lcy9p
+bmRleC5odG1sMCgGCWCGSAGG+EIBDQQbFhlUQyBUcnVzdENlbnRlciBDbGFzcyA0
+IENBMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQQFAAOBgQCUaBQbJZ4p
+mbGyI9JEs5Wf0Z5VBN3jL4IzVZZ3GZ0rnmUc+orjx48l/LEeVUYPj/9PNy+kdlmm
+ZOvVFnC93ZUzDKQNJOtkULRDEfJDvg1xmCLsAa/s98dcccN1kVgZ6N2g9LTxvBBK
+85O0Bkm7H2bSvXRH4Zr569erbR+64R0s2g==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 5 (0x5)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 4 CA/Email=certificate@trustcenter.de
+        Validity
+            Not Before: Mar  9 14:00:20 1998 GMT
+            Not After : Dec 31 14:00:20 2005 GMT
+        Subject: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 4 CA/Email=certificate@trustcenter.de
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:bf:2f:63:d6:36:7b:b2:0d:d3:55:f5:64:6c:e6:
+                    25:5d:c6:b4:c8:14:ba:25:38:83:eb:56:62:a5:55:
+                    a9:65:a3:f4:23:99:c2:4b:b9:d0:cd:54:67:a6:a3:
+                    a0:a3:a9:33:2b:76:e4:bd:ad:77:b2:ed:5c:12:74:
+                    c3:c5:b6:0f:52:9a:72:93:43:90:62:66:15:0f:45:
+                    a5:dd:e0:dd:b8:6f:40:6e:57:c1:79:72:a3:60:aa:
+                    ba:76:1d:12:89:53:5a:fc:02:be:e1:09:13:c5:4a:
+                    2f:dc:3d:8b:19:ad:d7:8b:24:45:fb:4c:f4:cd:5c:
+                    35:1d:29:4c:51:f3:f2:6c:55
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape CA Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape Renewal Url: 
+                https://www.trustcenter.de/cgi-bin/Renew.cgi?
+            Netscape CA Policy Url: 
+                http://www.trustcenter.de/guidelines/index.html
+            Netscape Comment: 
+                TC TrustCenter Class 4 CA
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+    Signature Algorithm: md5WithRSAEncryption
+        94:68:14:1b:25:9e:29:99:b1:b2:23:d2:44:b3:95:9f:d1:9e:
+        55:04:dd:e3:2f:82:33:55:96:77:19:9d:2b:9e:65:1c:fa:8a:
+        e3:c7:8f:25:fc:b1:1e:55:46:0f:8f:ff:4f:37:2f:a4:76:59:
+        a6:64:eb:d5:16:70:bd:dd:95:33:0c:a4:0d:24:eb:64:50:b4:
+        43:11:f2:43:be:0d:71:98:22:ec:01:af:ec:f7:c7:5c:71:c3:
+        75:91:58:19:e8:dd:a0:f4:b4:f1:bc:10:4a:f3:93:b4:06:49:
+        bb:1f:66:d2:bd:74:47:e1:9a:f9:eb:d7:ab:6d:1f:ba:e1:1d:
+        2c:da
+
+Thawte Personal Basic CA
+========================
+MD5 Fingerprint: E6:0B:D2:C9:CA:2D:88:DB:1A:71:0E:4B:78:EB:02:41
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDITCCAoqgAwIBAgIBADANBgkqhkiG9w0BAQQFADCByzELMAkGA1UEBhMCWkEx
+FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYD
+VQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT
+ZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFBlcnNvbmFsIEJhc2lj
+IENBMSgwJgYJKoZIhvcNAQkBFhlwZXJzb25hbC1iYXNpY0B0aGF3dGUuY29tMB4X
+DTk2MDEwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgcsxCzAJBgNVBAYTAlpBMRUw
+EwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEaMBgGA1UE
+ChMRVGhhd3RlIENvbnN1bHRpbmcxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2Vy
+dmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQZXJzb25hbCBCYXNpYyBD
+QTEoMCYGCSqGSIb3DQEJARYZcGVyc29uYWwtYmFzaWNAdGhhd3RlLmNvbTCBnzAN
+BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAvLyTU23AUE+CFeZIlDWmWr5vQvoPR+53
+dXLdjUmbllegeNTKP1GzaQuRdhciB5dqxFGTS+CN7zeVoQxN2jSQHReJl+A1OFdK
+wPQIcOk8RHtQfmGakOMj04gRRif1CwcOu93RfyAKiLlWCy4cgNrx454p7xS9CkT7
+G1sY0b8jkyECAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQQF
+AAOBgQAt4plrsD16iddZopQBHyvdEktTwq1/qqcAXJFAVyVKOKqEcLnZgA+le1z7
+c8a914phXAPjLSeoF+CEhULcXpvGt7Jtu3Sv5D/Lp7ew4F2+eIMllNLbgQ95B21P
+9DkVWlIBe94y1k049hJcBlDfBVu9FEuh3ym6O0GN92NWod8isQ==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 0 (0x0)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Basic CA/Email=personal-basic@thawte.com
+        Validity
+            Not Before: Jan  1 00:00:00 1996 GMT
+            Not After : Dec 31 23:59:59 2020 GMT
+        Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Basic CA/Email=personal-basic@thawte.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:bc:bc:93:53:6d:c0:50:4f:82:15:e6:48:94:35:
+                    a6:5a:be:6f:42:fa:0f:47:ee:77:75:72:dd:8d:49:
+                    9b:96:57:a0:78:d4:ca:3f:51:b3:69:0b:91:76:17:
+                    22:07:97:6a:c4:51:93:4b:e0:8d:ef:37:95:a1:0c:
+                    4d:da:34:90:1d:17:89:97:e0:35:38:57:4a:c0:f4:
+                    08:70:e9:3c:44:7b:50:7e:61:9a:90:e3:23:d3:88:
+                    11:46:27:f5:0b:07:0e:bb:dd:d1:7f:20:0a:88:b9:
+                    56:0b:2e:1c:80:da:f1:e3:9e:29:ef:14:bd:0a:44:
+                    fb:1b:5b:18:d1:bf:23:93:21
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        2d:e2:99:6b:b0:3d:7a:89:d7:59:a2:94:01:1f:2b:dd:12:4b:
+        53:c2:ad:7f:aa:a7:00:5c:91:40:57:25:4a:38:aa:84:70:b9:
+        d9:80:0f:a5:7b:5c:fb:73:c6:bd:d7:8a:61:5c:03:e3:2d:27:
+        a8:17:e0:84:85:42:dc:5e:9b:c6:b7:b2:6d:bb:74:af:e4:3f:
+        cb:a7:b7:b0:e0:5d:be:78:83:25:94:d2:db:81:0f:79:07:6d:
+        4f:f4:39:15:5a:52:01:7b:de:32:d6:4d:38:f6:12:5c:06:50:
+        df:05:5b:bd:14:4b:a1:df:29:ba:3b:41:8d:f7:63:56:a1:df:
+        22:b1
+
+Thawte Personal Freemail CA
+===========================
+MD5 Fingerprint: 1E:74:C3:86:3C:0C:35:C5:3E:C2:7F:EF:3C:AA:3C:D9
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDLTCCApagAwIBAgIBADANBgkqhkiG9w0BAQQFADCB0TELMAkGA1UEBhMCWkEx
+FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYD
+VQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT
+ZXJ2aWNlcyBEaXZpc2lvbjEkMCIGA1UEAxMbVGhhd3RlIFBlcnNvbmFsIEZyZWVt
+YWlsIENBMSswKQYJKoZIhvcNAQkBFhxwZXJzb25hbC1mcmVlbWFpbEB0aGF3dGUu
+Y29tMB4XDTk2MDEwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgdExCzAJBgNVBAYT
+AlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEa
+MBgGA1UEChMRVGhhd3RlIENvbnN1bHRpbmcxKDAmBgNVBAsTH0NlcnRpZmljYXRp
+b24gU2VydmljZXMgRGl2aXNpb24xJDAiBgNVBAMTG1RoYXd0ZSBQZXJzb25hbCBG
+cmVlbWFpbCBDQTErMCkGCSqGSIb3DQEJARYccGVyc29uYWwtZnJlZW1haWxAdGhh
+d3RlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1GnX1LCUZFtx6UfY
+DFG26nKRsIRefS0Nj3sS34UldSh0OkIsYyeflXtL734Zhx2G6qPduc6WZBrCFG5E
+rHzmj+hND3EfQDimAKOHePb5lIZererAXnbr2RSjXW56fAylS1V/Bhkpf56aJtVq
+uzgkCGqYx7Hao5iR/Xnb5VrEHLkCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zAN
+BgkqhkiG9w0BAQQFAAOBgQDH7JJ+Tvj1lqVnYiqk8E0RYNBvjWBYYawmu1I1XAjP
+MPuoSpaKH2JCI4wXD/S6ZJwXrEcp352YXtJsYHFcoqzceePnbgBHH7UNKOgCneSa
+/RP0ptl8sfjcXyMmCZGAc9AUG95DqYMl8uacLxXK/qarigd1iwzdUYRr5PjRznei
+gQ==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 0 (0x0)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Freemail CA/Email=personal-freemail@thawte.com
+        Validity
+            Not Before: Jan  1 00:00:00 1996 GMT
+            Not After : Dec 31 23:59:59 2020 GMT
+        Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Freemail CA/Email=personal-freemail@thawte.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d4:69:d7:d4:b0:94:64:5b:71:e9:47:d8:0c:51:
+                    b6:ea:72:91:b0:84:5e:7d:2d:0d:8f:7b:12:df:85:
+                    25:75:28:74:3a:42:2c:63:27:9f:95:7b:4b:ef:7e:
+                    19:87:1d:86:ea:a3:dd:b9:ce:96:64:1a:c2:14:6e:
+                    44:ac:7c:e6:8f:e8:4d:0f:71:1f:40:38:a6:00:a3:
+                    87:78:f6:f9:94:86:5e:ad:ea:c0:5e:76:eb:d9:14:
+                    a3:5d:6e:7a:7c:0c:a5:4b:55:7f:06:19:29:7f:9e:
+                    9a:26:d5:6a:bb:38:24:08:6a:98:c7:b1:da:a3:98:
+                    91:fd:79:db:e5:5a:c4:1c:b9
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        c7:ec:92:7e:4e:f8:f5:96:a5:67:62:2a:a4:f0:4d:11:60:d0:
+        6f:8d:60:58:61:ac:26:bb:52:35:5c:08:cf:30:fb:a8:4a:96:
+        8a:1f:62:42:23:8c:17:0f:f4:ba:64:9c:17:ac:47:29:df:9d:
+        98:5e:d2:6c:60:71:5c:a2:ac:dc:79:e3:e7:6e:00:47:1f:b5:
+        0d:28:e8:02:9d:e4:9a:fd:13:f4:a6:d9:7c:b1:f8:dc:5f:23:
+        26:09:91:80:73:d0:14:1b:de:43:a9:83:25:f2:e6:9c:2f:15:
+        ca:fe:a6:ab:8a:07:75:8b:0c:dd:51:84:6b:e4:f8:d1:ce:77:
+        a2:81
+
+Thawte Personal Premium CA
+==========================
+MD5 Fingerprint: 3A:B2:DE:22:9A:20:93:49:F9:ED:C8:D2:8A:E7:68:0D
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDKTCCApKgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBzzELMAkGA1UEBhMCWkEx
+FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYD
+VQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT
+ZXJ2aWNlcyBEaXZpc2lvbjEjMCEGA1UEAxMaVGhhd3RlIFBlcnNvbmFsIFByZW1p
+dW0gQ0ExKjAoBgkqhkiG9w0BCQEWG3BlcnNvbmFsLXByZW1pdW1AdGhhd3RlLmNv
+bTAeFw05NjAxMDEwMDAwMDBaFw0yMDEyMzEyMzU5NTlaMIHPMQswCQYDVQQGEwJa
+QTEVMBMGA1UECBMMV2VzdGVybiBDYXBlMRIwEAYDVQQHEwlDYXBlIFRvd24xGjAY
+BgNVBAoTEVRoYXd0ZSBDb25zdWx0aW5nMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9u
+IFNlcnZpY2VzIERpdmlzaW9uMSMwIQYDVQQDExpUaGF3dGUgUGVyc29uYWwgUHJl
+bWl1bSBDQTEqMCgGCSqGSIb3DQEJARYbcGVyc29uYWwtcHJlbWl1bUB0aGF3dGUu
+Y29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJZtn4B0TPuYwu8KHvE0Vs
+Bd/eJxZRNkERbGw77f4QfRKe5ZtCmv5gMcNmt3M6SK5O0DI3lIi1DbbZ8/JE2dWI
+Et12TfIa/G8jHnrx2JhFTgcQ7xZC0EN1bUre4qrJMf8fAHB8Zs8QJQi6+u4A6UYD
+ZicRFTuqW/KY3TZCstqIdQIDAQABoxMwETAPBgNVHRMBAf8EBTADAQH/MA0GCSqG
+SIb3DQEBBAUAA4GBAGk2ifc0KjNyL2071CKyuG+axTZmDhs8obF1Wub9NdP4qPIH
+b4Vnjt4rueIXsDqg8A6iAJrf8xQVbrvIhVqYgPn/vnQdPfP+MCXRNzRn+qVxeTBh
+KXLA4CxM+1bkOqhv5TJZUtt1KFBZDPgLGeSs2a+WjS9Q2wfD6h+rM+D1KzGJ
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 0 (0x0)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Premium CA/Email=personal-premium@thawte.com
+        Validity
+            Not Before: Jan  1 00:00:00 1996 GMT
+            Not After : Dec 31 23:59:59 2020 GMT
+        Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Premium CA/Email=personal-premium@thawte.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:c9:66:d9:f8:07:44:cf:b9:8c:2e:f0:a1:ef:13:
+                    45:6c:05:df:de:27:16:51:36:41:11:6c:6c:3b:ed:
+                    fe:10:7d:12:9e:e5:9b:42:9a:fe:60:31:c3:66:b7:
+                    73:3a:48:ae:4e:d0:32:37:94:88:b5:0d:b6:d9:f3:
+                    f2:44:d9:d5:88:12:dd:76:4d:f2:1a:fc:6f:23:1e:
+                    7a:f1:d8:98:45:4e:07:10:ef:16:42:d0:43:75:6d:
+                    4a:de:e2:aa:c9:31:ff:1f:00:70:7c:66:cf:10:25:
+                    08:ba:fa:ee:00:e9:46:03:66:27:11:15:3b:aa:5b:
+                    f2:98:dd:36:42:b2:da:88:75
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        69:36:89:f7:34:2a:33:72:2f:6d:3b:d4:22:b2:b8:6f:9a:c5:
+        36:66:0e:1b:3c:a1:b1:75:5a:e6:fd:35:d3:f8:a8:f2:07:6f:
+        85:67:8e:de:2b:b9:e2:17:b0:3a:a0:f0:0e:a2:00:9a:df:f3:
+        14:15:6e:bb:c8:85:5a:98:80:f9:ff:be:74:1d:3d:f3:fe:30:
+        25:d1:37:34:67:fa:a5:71:79:30:61:29:72:c0:e0:2c:4c:fb:
+        56:e4:3a:a8:6f:e5:32:59:52:db:75:28:50:59:0c:f8:0b:19:
+        e4:ac:d9:af:96:8d:2f:50:db:07:c3:ea:1f:ab:33:e0:f5:2b:
+        31:89
+
+Thawte Premium Server CA
+========================
+MD5 Fingerprint: 06:9F:69:79:16:66:90:02:1B:8C:8C:A2:C3:07:6F:3A
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkEx
+FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
+VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
+biBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFByZW1pdW0gU2Vy
+dmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZlckB0aGF3dGUuY29t
+MB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYTAlpB
+MRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsG
+A1UEChMUVGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRp
+b24gU2VydmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNl
+cnZlciBDQTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNv
+bTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2aovXwlue2oFBYo847kkE
+VdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIhUdib0GfQ
+ug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j+ao6hnO2RlNYyIkFvYMR
+uHM/qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG
+9w0BAQQFAAOBgQAmSCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUI
+hfzJATj/Tb7yFkJD57taRvvBxhEf8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JM
+pAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7tUCemDaYj+bvLpgcUQg==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Premium Server CA/Email=premium-server@thawte.com
+        Validity
+            Not Before: Aug  1 00:00:00 1996 GMT
+            Not After : Dec 31 23:59:59 2020 GMT
+        Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Premium Server CA/Email=premium-server@thawte.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d2:36:36:6a:8b:d7:c2:5b:9e:da:81:41:62:8f:
+                    38:ee:49:04:55:d6:d0:ef:1c:1b:95:16:47:ef:18:
+                    48:35:3a:52:f4:2b:6a:06:8f:3b:2f:ea:56:e3:af:
+                    86:8d:9e:17:f7:9e:b4:65:75:02:4d:ef:cb:09:a2:
+                    21:51:d8:9b:d0:67:d0:ba:0d:92:06:14:73:d4:93:
+                    cb:97:2a:00:9c:5c:4e:0c:bc:fa:15:52:fc:f2:44:
+                    6e:da:11:4a:6e:08:9f:2f:2d:e3:f9:aa:3a:86:73:
+                    b6:46:53:58:c8:89:05:bd:83:11:b8:73:3f:aa:07:
+                    8d:f4:42:4d:e7:40:9d:1c:37
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        26:48:2c:16:c2:58:fa:e8:16:74:0c:aa:aa:5f:54:3f:f2:d7:
+        c9:78:60:5e:5e:6e:37:63:22:77:36:7e:b2:17:c4:34:b9:f5:
+        08:85:fc:c9:01:38:ff:4d:be:f2:16:42:43:e7:bb:5a:46:fb:
+        c1:c6:11:1f:f1:4a:b0:28:46:c9:c3:c4:42:7d:bc:fa:ab:59:
+        6e:d5:b7:51:88:11:e3:a4:85:19:6b:82:4c:a4:0c:12:ad:e9:
+        a4:ae:3f:f1:c3:49:65:9a:8c:c5:c8:3e:25:b7:94:99:bb:92:
+        32:71:07:f0:86:5e:ed:50:27:a6:0d:a6:23:f9:bb:cb:a6:07:
+        14:42
+
+Thawte Server CA
+================
+MD5 Fingerprint: C5:70:C4:A2:ED:53:78:0C:C8:10:53:81:64:CB:D0:1D
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDEzCCAnygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBxDELMAkGA1UEBhMCWkEx
+FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
+VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
+biBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEm
+MCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wHhcNOTYwODAx
+MDAwMDAwWhcNMjAxMjMxMjM1OTU5WjCBxDELMAkGA1UEBhMCWkExFTATBgNVBAgT
+DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3
+dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNl
+cyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3
+DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQAD
+gY0AMIGJAoGBANOkUG7I/1Zr5s9dtuoMaHVHoqrC2oQl/Kj0R1HahbUgdJSGHg91
+yekIYfUGbTBuFRkC6VLAYttNmZ7iagxEOM3+vuNkCXDF/rFrKbYvScg71CcEJRCX
+L+eQbcAoQpnXTEPew/UhbVSfXcNY4cDk2VuwuNy0e982OsK1ZiIS1ocNAgMBAAGj
+EzARMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAB/pMaVz7lcxG
+7oWDTSEwjsrZqG9JGubaUeNgcGyEYRGhGshIPllDfU+VPaGLtwtimHp1it2ITk6e
+QNuozDJ0uW8NxuOzRAvZim+aKZuZGCg70eNAKJpaPNW15yAbi8qkq43pUdniTCxZ
+qdq5snUb9kLy78fyGPmJvKP/iiMucEc=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Server CA/Email=server-certs@thawte.com
+        Validity
+            Not Before: Aug  1 00:00:00 1996 GMT
+            Not After : Dec 31 23:59:59 2020 GMT
+        Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Server CA/Email=server-certs@thawte.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d3:a4:50:6e:c8:ff:56:6b:e6:cf:5d:b6:ea:0c:
+                    68:75:47:a2:aa:c2:da:84:25:fc:a8:f4:47:51:da:
+                    85:b5:20:74:94:86:1e:0f:75:c9:e9:08:61:f5:06:
+                    6d:30:6e:15:19:02:e9:52:c0:62:db:4d:99:9e:e2:
+                    6a:0c:44:38:cd:fe:be:e3:64:09:70:c5:fe:b1:6b:
+                    29:b6:2f:49:c8:3b:d4:27:04:25:10:97:2f:e7:90:
+                    6d:c0:28:42:99:d7:4c:43:de:c3:f5:21:6d:54:9f:
+                    5d:c3:58:e1:c0:e4:d9:5b:b0:b8:dc:b4:7b:df:36:
+                    3a:c2:b5:66:22:12:d6:87:0d
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        07:fa:4c:69:5c:fb:95:cc:46:ee:85:83:4d:21:30:8e:ca:d9:
+        a8:6f:49:1a:e6:da:51:e3:60:70:6c:84:61:11:a1:1a:c8:48:
+        3e:59:43:7d:4f:95:3d:a1:8b:b7:0b:62:98:7a:75:8a:dd:88:
+        4e:4e:9e:40:db:a8:cc:32:74:b9:6f:0d:c6:e3:b3:44:0b:d9:
+        8a:6f:9a:29:9b:99:18:28:3b:d1:e3:40:28:9a:5a:3c:d5:b5:
+        e7:20:1b:8b:ca:a4:ab:8d:e9:51:d9:e2:4c:2c:59:a9:da:b9:
+        b2:75:1b:f6:42:f2:ef:c7:f2:18:f9:89:bc:a3:ff:8a:23:2e:
+        70:47
+
+Thawte Universal CA Root
+========================
+MD5 Fingerprint: 17:AF:71:16:52:7B:73:65:22:05:29:28:84:71:9D:13
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIRIjCCCQoCAQAwDQYJKoZIhvcNAQEFBQAwVzEPMA0GA1UEChMGVGhhd3RlMSEw
+HwYDVQQLExhUaGF3dGUgVW5pdmVyc2FsIENBIFJvb3QxITAfBgNVBAMTGFRoYXd0
+ZSBVbml2ZXJzYWwgQ0EgUm9vdDAeFw05OTEyMDUxMzU2MDVaFw0zNzA0MDMxMzU2
+MDVaMFcxDzANBgNVBAoTBlRoYXd0ZTEhMB8GA1UECxMYVGhhd3RlIFVuaXZlcnNh
+bCBDQSBSb290MSEwHwYDVQQDExhUaGF3dGUgVW5pdmVyc2FsIENBIFJvb3Qwgggi
+MA0GCSqGSIb3DQEBAQUAA4IIDwAwgggKAoIIAQDiiQVtw3+tpok6/7vHzZ03seHS
+IR6bYSoV53tXT1U80Lv52T0+przstK1TmhYC6wty/Yryj0QFxevT5b22RDnm+0e/
+ap4KlRjiaOLWltYhrYj99Rf109pCpZDtKZWWdTrah6HU9dOH3gVipuNmdJLPpby7
+32j/cXVWQVk16zNaZlHy0qMKwYzOc1wRby2MlYyRsf3P5a1WlcyFkoOQVUHJwnft
++aN0QgpoCPPQ0WX9Zyw0/yR/53nIBzslV92kDJg9vuDMGWXb8lSir0LUneKuhCMl
+CTMStWoedsSL2UkAbF66H/Ib2mfKJ6qjRCMbg4LO8qsz7VSk3MmrWWXROA7BPhtn
+j9Z1AeBVIt12d+yO3fTPeSJtuVcD9ZkIpzw+NPvEF64jWM0k8yPKagIolAGBNLRs
+a66LGsOj0gk8FlT1Nl8k459KoeJkxhbDpoF6JDZHjsFeDvv5FXgE1g5Z2Z1YZmLS
+lCkyMsh4uWb2tVbhbMYUS5ZSWZECJGpVR9c/tiMaYHeXLuJAr54EV56tEcXJQ3Dv
+SLRerBxpLi6C1VuLvoK+GRRe5w0ix1Eb/x6b8TCPcTEGszQnj196ZoJPii0Tq0LP
+IVael45mNg+Wm+Ur9AKpKmqMLMTDuHAsLSkeP1B3Hm0qVORVCpE4ocW1ZqJ2Wu4P
+v7Rn4ShuD+E2oYLRv9R34cRnMpN4yOdUU/4jeeZozCaQ9hBjXSpvkS2kczJRIfK7
+Fd+qJAhIBt6hnia/uoO/fKTIoIy90v+8hGknEyQYxEUYIyZeGBTKLoiHYqNT5iG3
+uIV7moW7FSZy+Ln3anQPST+SvqkFt5knv78JF0uZTK0REHzfdDH2jyZfqoiuOFfI
+VS3T+9gbUZm+JRs6usB9G+3O0km5z/PFfYmQgdhpSCAQo/jvklEYMosRGMA/G4VW
+zlfJ8oJkxt8CCS5KES+xJ203UvDwFmHxZ43fh3Kvh9rP+1CUbtSUheuKLOoh9ZZK
+RNXgzmp0RE3QBdOHFe020KSLZlVwk+5HBsF+LqUYeWfzKIXxcPcOg6R+VJ5adjLL
+ZRu4zfvIKAPSVJHRp8WFQwgXdqXmL2cI2KGigi0M+MGvY9RQd21rRkpBhdWQX3kt
+xOzXEYdAiuFo4mT4VTL7b5Ms2nfZIcEX5TYsTn6Qf6yUKzJnvjhQdriuQbnXIcUJ
+TGDIo1HENJtXN9/LyTNXi+v7dp8ZTcVqHypFrivtL42npQDLBPolYi50SBvKKoy6
+27Z+9rsCfKnD21h4ob/w/hoQVRHO6GlOlmXGFwPWB2iMVIKuHCJVP/H0CZcowEb3
+TgslHfcH1wkdOhhXODvoMwbnj3hGHlv1BrbsuKYN8boTS9YYIN1pM0ozFa64yJiK
+JyyTvC377jO/ZuZNurabBlVgl0u8RM1+9KHYqi/AAighFmJ42whU8vz0NOPGjxxD
+V86QGkvcLjsokYk/eto1HY4s7kns9DOtyVOojJ8EUz4kHFLJEvliV6O87izrQHwg
+I3ArlflzF4rRwRxpprc4mmf3cB16WgxAz2IPhTzCAk5+tfbFKimEsx83KuGqckLE
+7Wsaj5IcXb7R8lvyq6qp0vW4pEErK5FuEkjKmNg3jcjtADC1tgROfpzahOzA+nvl
+HYikU0awlORcG6ElLA9IUneXCWzsWxgzgwLlgn7NhSEwEf0nT8/kHuw/pVds6Sow
+GSqI5cNpOKtvOXF/hOFBw+HMKokgUi6DD2w5P0stFqwt8CSsAHP0m7MGPwW4FIUf
+q55cPJ5inQ5tO4AJ/ALqopd0ysf541bhw8qlpprAkOAkElPSwovavu0CQ15n4YmY
+ee7LqsrDG9znpUalfGsWh7ZaKNfbJzxepb22Ud0fQ887Jsg6jSVhwUn0PBvJROqv
+HMIrlAEqDjDRW4srR+XD0QQDmw45LNYn1OZwWtl1zyrYyQAF5BOI7MM5+4dhMDZD
+A8ienKIGwi/F/PCAY7FUBKBMqS7G9XZ62NDk1JQR5RW1eAbcuICPmakgMz0QhUxl
+Cco+WF5gk5qqYl3AUQYcXWCgDZxLQ/anFiGkh6rywS7ukjC4nt/fEAGLhglw2Gyo
+t1AeFpa092f9NTohkCoyxwB7TQcQCbkvc9gYfmeZBE8G/FDHhZudQJ2zljf6pdyy
+ck7vTgks/ZH9Tfe7pqE+q3uiA0CmqVUn4vr5Gc6HdarxdTbz87iR+JHDi3UTjkxl
+mhY5auU06HqWWX81sAD9W2n8Qyb69Shu/ofZfiT7tKCCblSi/66/YrT0cgHCy5hH
+mOFMtReAgM6PpijuHkVq+9/xHfxaO9bq9GwdYklXO4qPhurwUwTOnBZo/7q5/IgP
+R/cCRHJAuMo7LVOd3DxWjFl7aBosjXG7bADHGs5vQJKxoy8P2UTyo3Aunu4OrjLQ
+Oz6LB+rmebNcKeJ9a6he+Vox6AiWoowDmEbxuH2QVCbtdmL+numabl7JScdcNFMp
+VNns5EbhgDt12d/7edWH8bqe6xnOTFJz5luHriVPOXnMxrj5EHvs8JtxpAWg0ynT
+Tn8f9C0oeMxVlXsekS/MVhhzi7LbvGkH5tDYT+2i/1iFo23gSlO3Z32NDFxbe3co
+AjVEegTTKEPIazAXXTK4KTW6dto7FEp2GFik+JI8nk0zb0ZrCNkxSGjd9PskVjSy
+z2lmvkjSimYizfJpzcJTE0UpQSLWXZgftqSyo8LuAi9RG9yDpOxwJajUCGEyb+Sh
+gS58Y3L6KWW8cETPXQIDAQABMA0GCSqGSIb3DQEBBQUAA4IIAQBVmjRqIgZpCUUz
+x66pXMcJTpuGvEGQ1JRS9s0jKZRLIs3ovf6dzVLyve2rh8mrq0YEtL2iPyIwR1DA
+S4x2DwP1ktKxLcR6NZzJc4frpp/eD3ON03+Z2LqPb8Tzvhqui6KUNpDi5euNBfT8
+Zd+V8cSUTRdW1588j1A853e/lYYmZPtq/8ba6YyuQrtp5TPG2OkNxlUhScEMtKP5
+m0tc3oNPQQPOKnloOH3wVEkg9bYQ/wjcM2aWm/8G3gCe185WQ5pR/HDN9vBRo7fN
+tFyFYs1xt8YrIyvdw25AQvo3/zcc9npXlIeFI9fUycdfwU0vyQ3XXOycJe6eMIKR
+lnK4dR34CWhXl7ItS+4l7HokKe5y1JwT26vcAwrYShTJCFdEXaG1U4A08hSXz1Le
+og6KEOkU79BgvmGh8SVd1RhzP5MQypbus0DS26NVz1dapQ5PdUff6veQmm31cC4d
+FBw3ZARZULDccoZvnDc9XSivc1Xv0u4kdHQT79zbMUn7P2P10wg+M6XnnQreUyxR
+jmfbm0FlQVC91KSWbIe8EuCUx9PA5MtzWACD4awnhdadU51cvQo+A0OcDJH1bXv4
+QHJ1qxF2kSvhxqofcGl2cBUJ/pPQ1i23FWqbZ1y0aZ8lpn2K+30iqXHyzk6MuCEt
+3v5BcQ3/nexzprsHT4gOWEcufqnCx3jdunqeTuAwTmNvhdQgQen6/kNF5/uverLO
+pAUdIppYht/kzkyp/tgWpW/72M5We/XWIO/kR81jJP+5vvFIo8EBcua9wK3tJg3K
+NJ/8Ai0gTwUgriE9DMIgPD/wBITcz4n9uSWRjtBD5rMgq1wt1UCeoEvY9LLMffFY
+Co6H7YisNpbkVqARivKa0LNXozS7Gas44XRrIsQxzgHVGzbjHjhMM5PfQONZV06s
+bnseWj3FHVusyBCCNQIisvx16BCRjcR9eJNHnhydrGtiAliM1hwj1q94woCcpKok
+VBS1FJjG+CsaJMtxMgrimw5pa91+jGTRLmPvDn+xPohMnVXlyW4XBLdB/72KQcsl
+MW9Edz9HsfyBiAeOBUkgtxHZaQMqA525M4Sa399640Zzo9iijFMZiFVMdLj2RIQr
+0RQtTjkukmj/afyFYhvrVU/vJYRiRZnW2E5vP1MIfR0GlYGAf09OdDaYteKHcJjc
+1/XcUhXmxtZ5ljl/j5XPq4BTrRsLRUAO1Bi9LN6Kd3b98kRHxiHQ5HTw2BgFyHww
+csff8bv8AjCp9EImWQ2TBYKhc+005ThdzVCQ/pT8E7y9/KiiiKdzxLKo0V2IxAKi
+evEEyf6MdMnvHWRBn6welmdkrKsoQced98CYG24HwmR9WoNmVig2nOf7HHcOKKDE
+92t5OQQghMdXk7wboOq860LlqBH+/KxlzP34KIj0pZrlc1HgqJsNA3dO5eCYs4ja
+febGnnwUZsEuU0qSBzegfuk9CeQVfM/9uEGl755mncReBx2H+EGt6ucv0kFjGDf5
+FONN0OX3Q/0V4/k2cwYm3wFPqcNO3iBGd5i0eiQrO3UrTliNm12kxxagvDKIP6GD
+8wDI+NhY6WNdTCu18HJB2Kt3N9ZydK62NpzIpoNJS+DJVgspvgAwy93WyEKKANns
+FdE0cfJbZIf2J9K364awkL8p2yGeNozjIC+VI1FsG8Kk1ebYAkNnoP6bUANEf7vk
+ctXR5NqPkhRk+10UEBJKlQbJZQgpyiGjJjgRySffcGcE/cpIMn9jskV0MVBPh9kg
+cNIhcLHWEJ0zXXiDkW1Vguza5GJjx4FG1xllcipDGZC41yNNTBzgRKlmZ6zucXkn
+Jnhtcg71XUsjtXx8ZekXxjoLDd1eHlHDhrjsf8cnSqVG6GotGcGHo8uZk4dkolUU
+TLdDpZPX59JOeUDKZZlGPT96gHqIaswe5WszRvRQwNUfCbjNii6hJ+tdc6foawrl
+V4IqsPziVFJW8KupEsYjlgcknOC8RqW0IATaCZNj5dQuwn7FMe21FXSGF7mz8yaK
+HQJq2ho/6LrxBG2UUVTiWrRZgx1g0C1zzAe1Joz518aIke+Az10PoWDLRdRCItGx
+cB390LcwkDrGSG1n5TLaj9vjqOMdICWiHOFMuaT2xj9cWA27xrJ3ARaRnxcGDbdA
+PsyPjpxL4J1+mx4Fq4gi+tMoG1cUZEo+JCw4TSFpAHMu0FUtdPIV6JRDPkAqxsa5
+alveoswYUFRdTiqFbPaSiykZfufqSuAiKyW892bPd5pBdPI8FA10afVQg83NLyHb
+IkaK0PdRGpVX8gWLGhntO0XoNsJufvtXIgAfBlOprpPGj3EqMUWS545t5pkiwIP8
+79xXZndPojYx+6ETjeXKo5V9AQxkcDtTQmiAx7udqAA1aZgMqGfYQ+Wqz5XgUZWk
+Fz9CnbgEztN5ecjTihYykuDXou7XN0wvrLh7vkX28RgznHs3piTZvECrAOnDN4ur
+2LbzXoFOsBRrBz4f7ML2RCKVu7Pmb9b5cGW6CoNlqg4TL4MTI1OLQBb6zi/8TQT4
+69isxTbCFVdIOOxVs7Qeuq3SQgYXDXPIV6a+lk2p8sD7eiEc9clwqYKQtfEM1HkQ
+voGm6VxhnHd5mqTDNyZXN8lSLPoI/9BfxmHA9Ha+/N5Oz6tRmXHH33701s8GVhkT
+UwttdFlIGZtTBS2dMlTT5SxTi2Q+1GR744AJFMz+FkZja3Fp+PnLJ/aIVLxFs84C
+yJTuQFv5QgLC/7DYLOsof17JJgGZpw==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 0 (0x0)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: O=Thawte, OU=Thawte Universal CA Root, CN=Thawte Universal CA Root
+        Validity
+            Not Before: Dec  5 13:56:05 1999 GMT
+            Not After : Apr  3 13:56:05 2037 GMT
+        Subject: O=Thawte, OU=Thawte Universal CA Root, CN=Thawte Universal CA Root
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (16384 bit)
+                Modulus (16384 bit):
+                    00:e2:89:05:6d:c3:7f:ad:a6:89:3a:ff:bb:c7:cd:
+                    9d:37:b1:e1:d2:21:1e:9b:61:2a:15:e7:7b:57:4f:
+                    55:3c:d0:bb:f9:d9:3d:3e:a6:bc:ec:b4:ad:53:9a:
+                    16:02:eb:0b:72:fd:8a:f2:8f:44:05:c5:eb:d3:e5:
+                    bd:b6:44:39:e6:fb:47:bf:6a:9e:0a:95:18:e2:68:
+                    e2:d6:96:d6:21:ad:88:fd:f5:17:f5:d3:da:42:a5:
+                    90:ed:29:95:96:75:3a:da:87:a1:d4:f5:d3:87:de:
+                    05:62:a6:e3:66:74:92:cf:a5:bc:bb:df:68:ff:71:
+                    75:56:41:59:35:eb:33:5a:66:51:f2:d2:a3:0a:c1:
+                    8c:ce:73:5c:11:6f:2d:8c:95:8c:91:b1:fd:cf:e5:
+                    ad:56:95:cc:85:92:83:90:55:41:c9:c2:77:ed:f9:
+                    a3:74:42:0a:68:08:f3:d0:d1:65:fd:67:2c:34:ff:
+                    24:7f:e7:79:c8:07:3b:25:57:dd:a4:0c:98:3d:be:
+                    e0:cc:19:65:db:f2:54:a2:af:42:d4:9d:e2:ae:84:
+                    23:25:09:33:12:b5:6a:1e:76:c4:8b:d9:49:00:6c:
+                    5e:ba:1f:f2:1b:da:67:ca:27:aa:a3:44:23:1b:83:
+                    82:ce:f2:ab:33:ed:54:a4:dc:c9:ab:59:65:d1:38:
+                    0e:c1:3e:1b:67:8f:d6:75:01:e0:55:22:dd:76:77:
+                    ec:8e:dd:f4:cf:79:22:6d:b9:57:03:f5:99:08:a7:
+                    3c:3e:34:fb:c4:17:ae:23:58:cd:24:f3:23:ca:6a:
+                    02:28:94:01:81:34:b4:6c:6b:ae:8b:1a:c3:a3:d2:
+                    09:3c:16:54:f5:36:5f:24:e3:9f:4a:a1:e2:64:c6:
+                    16:c3:a6:81:7a:24:36:47:8e:c1:5e:0e:fb:f9:15:
+                    78:04:d6:0e:59:d9:9d:58:66:62:d2:94:29:32:32:
+                    c8:78:b9:66:f6:b5:56:e1:6c:c6:14:4b:96:52:59:
+                    91:02:24:6a:55:47:d7:3f:b6:23:1a:60:77:97:2e:
+                    e2:40:af:9e:04:57:9e:ad:11:c5:c9:43:70:ef:48:
+                    b4:5e:ac:1c:69:2e:2e:82:d5:5b:8b:be:82:be:19:
+                    14:5e:e7:0d:22:c7:51:1b:ff:1e:9b:f1:30:8f:71:
+                    31:06:b3:34:27:8f:5f:7a:66:82:4f:8a:2d:13:ab:
+                    42:cf:21:56:9e:97:8e:66:36:0f:96:9b:e5:2b:f4:
+                    02:a9:2a:6a:8c:2c:c4:c3:b8:70:2c:2d:29:1e:3f:
+                    50:77:1e:6d:2a:54:e4:55:0a:91:38:a1:c5:b5:66:
+                    a2:76:5a:ee:0f:bf:b4:67:e1:28:6e:0f:e1:36:a1:
+                    82:d1:bf:d4:77:e1:c4:67:32:93:78:c8:e7:54:53:
+                    fe:23:79:e6:68:cc:26:90:f6:10:63:5d:2a:6f:91:
+                    2d:a4:73:32:51:21:f2:bb:15:df:aa:24:08:48:06:
+                    de:a1:9e:26:bf:ba:83:bf:7c:a4:c8:a0:8c:bd:d2:
+                    ff:bc:84:69:27:13:24:18:c4:45:18:23:26:5e:18:
+                    14:ca:2e:88:87:62:a3:53:e6:21:b7:b8:85:7b:9a:
+                    85:bb:15:26:72:f8:b9:f7:6a:74:0f:49:3f:92:be:
+                    a9:05:b7:99:27:bf:bf:09:17:4b:99:4c:ad:11:10:
+                    7c:df:74:31:f6:8f:26:5f:aa:88:ae:38:57:c8:55:
+                    2d:d3:fb:d8:1b:51:99:be:25:1b:3a:ba:c0:7d:1b:
+                    ed:ce:d2:49:b9:cf:f3:c5:7d:89:90:81:d8:69:48:
+                    20:10:a3:f8:ef:92:51:18:32:8b:11:18:c0:3f:1b:
+                    85:56:ce:57:c9:f2:82:64:c6:df:02:09:2e:4a:11:
+                    2f:b1:27:6d:37:52:f0:f0:16:61:f1:67:8d:df:87:
+                    72:af:87:da:cf:fb:50:94:6e:d4:94:85:eb:8a:2c:
+                    ea:21:f5:96:4a:44:d5:e0:ce:6a:74:44:4d:d0:05:
+                    d3:87:15:ed:36:d0:a4:8b:66:55:70:93:ee:47:06:
+                    c1:7e:2e:a5:18:79:67:f3:28:85:f1:70:f7:0e:83:
+                    a4:7e:54:9e:5a:76:32:cb:65:1b:b8:cd:fb:c8:28:
+                    03:d2:54:91:d1:a7:c5:85:43:08:17:76:a5:e6:2f:
+                    67:08:d8:a1:a2:82:2d:0c:f8:c1:af:63:d4:50:77:
+                    6d:6b:46:4a:41:85:d5:90:5f:79:2d:c4:ec:d7:11:
+                    87:40:8a:e1:68:e2:64:f8:55:32:fb:6f:93:2c:da:
+                    77:d9:21:c1:17:e5:36:2c:4e:7e:90:7f:ac:94:2b:
+                    32:67:be:38:50:76:b8:ae:41:b9:d7:21:c5:09:4c:
+                    60:c8:a3:51:c4:34:9b:57:37:df:cb:c9:33:57:8b:
+                    eb:fb:76:9f:19:4d:c5:6a:1f:2a:45:ae:2b:ed:2f:
+                    8d:a7:a5:00:cb:04:fa:25:62:2e:74:48:1b:ca:2a:
+                    8c:ba:db:b6:7e:f6:bb:02:7c:a9:c3:db:58:78:a1:
+                    bf:f0:fe:1a:10:55:11:ce:e8:69:4e:96:65:c6:17:
+                    03:d6:07:68:8c:54:82:ae:1c:22:55:3f:f1:f4:09:
+                    97:28:c0:46:f7:4e:0b:25:1d:f7:07:d7:09:1d:3a:
+                    18:57:38:3b:e8:33:06:e7:8f:78:46:1e:5b:f5:06:
+                    b6:ec:b8:a6:0d:f1:ba:13:4b:d6:18:20:dd:69:33:
+                    4a:33:15:ae:b8:c8:98:8a:27:2c:93:bc:2d:fb:ee:
+                    33:bf:66:e6:4d:ba:b6:9b:06:55:60:97:4b:bc:44:
+                    cd:7e:f4:a1:d8:aa:2f:c0:02:28:21:16:62:78:db:
+                    08:54:f2:fc:f4:34:e3:c6:8f:1c:43:57:ce:90:1a:
+                    4b:dc:2e:3b:28:91:89:3f:7a:da:35:1d:8e:2c:ee:
+                    49:ec:f4:33:ad:c9:53:a8:8c:9f:04:53:3e:24:1c:
+                    52:c9:12:f9:62:57:a3:bc:ee:2c:eb:40:7c:20:23:
+                    70:2b:95:f9:73:17:8a:d1:c1:1c:69:a6:b7:38:9a:
+                    67:f7:70:1d:7a:5a:0c:40:cf:62:0f:85:3c:c2:02:
+                    4e:7e:b5:f6:c5:2a:29:84:b3:1f:37:2a:e1:aa:72:
+                    42:c4:ed:6b:1a:8f:92:1c:5d:be:d1:f2:5b:f2:ab:
+                    aa:a9:d2:f5:b8:a4:41:2b:2b:91:6e:12:48:ca:98:
+                    d8:37:8d:c8:ed:00:30:b5:b6:04:4e:7e:9c:da:84:
+                    ec:c0:fa:7b:e5:1d:88:a4:53:46:b0:94:e4:5c:1b:
+                    a1:25:2c:0f:48:52:77:97:09:6c:ec:5b:18:33:83:
+                    02:e5:82:7e:cd:85:21:30:11:fd:27:4f:cf:e4:1e:
+                    ec:3f:a5:57:6c:e9:2a:30:19:2a:88:e5:c3:69:38:
+                    ab:6f:39:71:7f:84:e1:41:c3:e1:cc:2a:89:20:52:
+                    2e:83:0f:6c:39:3f:4b:2d:16:ac:2d:f0:24:ac:00:
+                    73:f4:9b:b3:06:3f:05:b8:14:85:1f:ab:9e:5c:3c:
+                    9e:62:9d:0e:6d:3b:80:09:fc:02:ea:a2:97:74:ca:
+                    c7:f9:e3:56:e1:c3:ca:a5:a6:9a:c0:90:e0:24:12:
+                    53:d2:c2:8b:da:be:ed:02:43:5e:67:e1:89:98:79:
+                    ee:cb:aa:ca:c3:1b:dc:e7:a5:46:a5:7c:6b:16:87:
+                    b6:5a:28:d7:db:27:3c:5e:a5:bd:b6:51:dd:1f:43:
+                    cf:3b:26:c8:3a:8d:25:61:c1:49:f4:3c:1b:c9:44:
+                    ea:af:1c:c2:2b:94:01:2a:0e:30:d1:5b:8b:2b:47:
+                    e5:c3:d1:04:03:9b:0e:39:2c:d6:27:d4:e6:70:5a:
+                    d9:75:cf:2a:d8:c9:00:05:e4:13:88:ec:c3:39:fb:
+                    87:61:30:36:43:03:c8:9e:9c:a2:06:c2:2f:c5:fc:
+                    f0:80:63:b1:54:04:a0:4c:a9:2e:c6:f5:76:7a:d8:
+                    d0:e4:d4:94:11:e5:15:b5:78:06:dc:b8:80:8f:99:
+                    a9:20:33:3d:10:85:4c:65:09:ca:3e:58:5e:60:93:
+                    9a:aa:62:5d:c0:51:06:1c:5d:60:a0:0d:9c:4b:43:
+                    f6:a7:16:21:a4:87:aa:f2:c1:2e:ee:92:30:b8:9e:
+                    df:df:10:01:8b:86:09:70:d8:6c:a8:b7:50:1e:16:
+                    96:b4:f7:67:fd:35:3a:21:90:2a:32:c7:00:7b:4d:
+                    07:10:09:b9:2f:73:d8:18:7e:67:99:04:4f:06:fc:
+                    50:c7:85:9b:9d:40:9d:b3:96:37:fa:a5:dc:b2:72:
+                    4e:ef:4e:09:2c:fd:91:fd:4d:f7:bb:a6:a1:3e:ab:
+                    7b:a2:03:40:a6:a9:55:27:e2:fa:f9:19:ce:87:75:
+                    aa:f1:75:36:f3:f3:b8:91:f8:91:c3:8b:75:13:8e:
+                    4c:65:9a:16:39:6a:e5:34:e8:7a:96:59:7f:35:b0:
+                    00:fd:5b:69:fc:43:26:fa:f5:28:6e:fe:87:d9:7e:
+                    24:fb:b4:a0:82:6e:54:a2:ff:ae:bf:62:b4:f4:72:
+                    01:c2:cb:98:47:98:e1:4c:b5:17:80:80:ce:8f:a6:
+                    28:ee:1e:45:6a:fb:df:f1:1d:fc:5a:3b:d6:ea:f4:
+                    6c:1d:62:49:57:3b:8a:8f:86:ea:f0:53:04:ce:9c:
+                    16:68:ff:ba:b9:fc:88:0f:47:f7:02:44:72:40:b8:
+                    ca:3b:2d:53:9d:dc:3c:56:8c:59:7b:68:1a:2c:8d:
+                    71:bb:6c:00:c7:1a:ce:6f:40:92:b1:a3:2f:0f:d9:
+                    44:f2:a3:70:2e:9e:ee:0e:ae:32:d0:3b:3e:8b:07:
+                    ea:e6:79:b3:5c:29:e2:7d:6b:a8:5e:f9:5a:31:e8:
+                    08:96:a2:8c:03:98:46:f1:b8:7d:90:54:26:ed:76:
+                    62:fe:9e:e9:9a:6e:5e:c9:49:c7:5c:34:53:29:54:
+                    d9:ec:e4:46:e1:80:3b:75:d9:df:fb:79:d5:87:f1:
+                    ba:9e:eb:19:ce:4c:52:73:e6:5b:87:ae:25:4f:39:
+                    79:cc:c6:b8:f9:10:7b:ec:f0:9b:71:a4:05:a0:d3:
+                    29:d3:4e:7f:1f:f4:2d:28:78:cc:55:95:7b:1e:91:
+                    2f:cc:56:18:73:8b:b2:db:bc:69:07:e6:d0:d8:4f:
+                    ed:a2:ff:58:85:a3:6d:e0:4a:53:b7:67:7d:8d:0c:
+                    5c:5b:7b:77:28:02:35:44:7a:04:d3:28:43:c8:6b:
+                    30:17:5d:32:b8:29:35:ba:76:da:3b:14:4a:76:18:
+                    58:a4:f8:92:3c:9e:4d:33:6f:46:6b:08:d9:31:48:
+                    68:dd:f4:fb:24:56:34:b2:cf:69:66:be:48:d2:8a:
+                    66:22:cd:f2:69:cd:c2:53:13:45:29:41:22:d6:5d:
+                    98:1f:b6:a4:b2:a3:c2:ee:02:2f:51:1b:dc:83:a4:
+                    ec:70:25:a8:d4:08:61:32:6f:e4:a1:81:2e:7c:63:
+                    72:fa:29:65:bc:70:44:cf:5d
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        55:9a:34:6a:22:06:69:09:45:33:c7:ae:a9:5c:c7:09:4e:9b:
+        86:bc:41:90:d4:94:52:f6:cd:23:29:94:4b:22:cd:e8:bd:fe:
+        9d:cd:52:f2:bd:ed:ab:87:c9:ab:ab:46:04:b4:bd:a2:3f:22:
+        30:47:50:c0:4b:8c:76:0f:03:f5:92:d2:b1:2d:c4:7a:35:9c:
+        c9:73:87:eb:a6:9f:de:0f:73:8d:d3:7f:99:d8:ba:8f:6f:c4:
+        f3:be:1a:ae:8b:a2:94:36:90:e2:e5:eb:8d:05:f4:fc:65:df:
+        95:f1:c4:94:4d:17:56:d7:9f:3c:8f:50:3c:e7:77:bf:95:86:
+        26:64:fb:6a:ff:c6:da:e9:8c:ae:42:bb:69:e5:33:c6:d8:e9:
+        0d:c6:55:21:49:c1:0c:b4:a3:f9:9b:4b:5c:de:83:4f:41:03:
+        ce:2a:79:68:38:7d:f0:54:49:20:f5:b6:10:ff:08:dc:33:66:
+        96:9b:ff:06:de:00:9e:d7:ce:56:43:9a:51:fc:70:cd:f6:f0:
+        51:a3:b7:cd:b4:5c:85:62:cd:71:b7:c6:2b:23:2b:dd:c3:6e:
+        40:42:fa:37:ff:37:1c:f6:7a:57:94:87:85:23:d7:d4:c9:c7:
+        5f:c1:4d:2f:c9:0d:d7:5c:ec:9c:25:ee:9e:30:82:91:96:72:
+        b8:75:1d:f8:09:68:57:97:b2:2d:4b:ee:25:ec:7a:24:29:ee:
+        72:d4:9c:13:db:ab:dc:03:0a:d8:4a:14:c9:08:57:44:5d:a1:
+        b5:53:80:34:f2:14:97:cf:52:de:a2:0e:8a:10:e9:14:ef:d0:
+        60:be:61:a1:f1:25:5d:d5:18:73:3f:93:10:ca:96:ee:b3:40:
+        d2:db:a3:55:cf:57:5a:a5:0e:4f:75:47:df:ea:f7:90:9a:6d:
+        f5:70:2e:1d:14:1c:37:64:04:59:50:b0:dc:72:86:6f:9c:37:
+        3d:5d:28:af:73:55:ef:d2:ee:24:74:74:13:ef:dc:db:31:49:
+        fb:3f:63:f5:d3:08:3e:33:a5:e7:9d:0a:de:53:2c:51:8e:67:
+        db:9b:41:65:41:50:bd:d4:a4:96:6c:87:bc:12:e0:94:c7:d3:
+        c0:e4:cb:73:58:00:83:e1:ac:27:85:d6:9d:53:9d:5c:bd:0a:
+        3e:03:43:9c:0c:91:f5:6d:7b:f8:40:72:75:ab:11:76:91:2b:
+        e1:c6:aa:1f:70:69:76:70:15:09:fe:93:d0:d6:2d:b7:15:6a:
+        9b:67:5c:b4:69:9f:25:a6:7d:8a:fb:7d:22:a9:71:f2:ce:4e:
+        8c:b8:21:2d:de:fe:41:71:0d:ff:9d:ec:73:a6:bb:07:4f:88:
+        0e:58:47:2e:7e:a9:c2:c7:78:dd:ba:7a:9e:4e:e0:30:4e:63:
+        6f:85:d4:20:41:e9:fa:fe:43:45:e7:fb:af:7a:b2:ce:a4:05:
+        1d:22:9a:58:86:df:e4:ce:4c:a9:fe:d8:16:a5:6f:fb:d8:ce:
+        56:7b:f5:d6:20:ef:e4:47:cd:63:24:ff:b9:be:f1:48:a3:c1:
+        01:72:e6:bd:c0:ad:ed:26:0d:ca:34:9f:fc:02:2d:20:4f:05:
+        20:ae:21:3d:0c:c2:20:3c:3f:f0:04:84:dc:cf:89:fd:b9:25:
+        91:8e:d0:43:e6:b3:20:ab:5c:2d:d5:40:9e:a0:4b:d8:f4:b2:
+        cc:7d:f1:58:0a:8e:87:ed:88:ac:36:96:e4:56:a0:11:8a:f2:
+        9a:d0:b3:57:a3:34:bb:19:ab:38:e1:74:6b:22:c4:31:ce:01:
+        d5:1b:36:e3:1e:38:4c:33:93:df:40:e3:59:57:4e:ac:6e:7b:
+        1e:5a:3d:c5:1d:5b:ac:c8:10:82:35:02:22:b2:fc:75:e8:10:
+        91:8d:c4:7d:78:93:47:9e:1c:9d:ac:6b:62:02:58:8c:d6:1c:
+        23:d6:af:78:c2:80:9c:a4:aa:24:54:14:b5:14:98:c6:f8:2b:
+        1a:24:cb:71:32:0a:e2:9b:0e:69:6b:dd:7e:8c:64:d1:2e:63:
+        ef:0e:7f:b1:3e:88:4c:9d:55:e5:c9:6e:17:04:b7:41:ff:bd:
+        8a:41:cb:25:31:6f:44:77:3f:47:b1:fc:81:88:07:8e:05:49:
+        20:b7:11:d9:69:03:2a:03:9d:b9:33:84:9a:df:df:7a:e3:46:
+        73:a3:d8:a2:8c:53:19:88:55:4c:74:b8:f6:44:84:2b:d1:14:
+        2d:4e:39:2e:92:68:ff:69:fc:85:62:1b:eb:55:4f:ef:25:84:
+        62:45:99:d6:d8:4e:6f:3f:53:08:7d:1d:06:95:81:80:7f:4f:
+        4e:74:36:98:b5:e2:87:70:98:dc:d7:f5:dc:52:15:e6:c6:d6:
+        79:96:39:7f:8f:95:cf:ab:80:53:ad:1b:0b:45:40:0e:d4:18:
+        bd:2c:de:8a:77:76:fd:f2:44:47:c6:21:d0:e4:74:f0:d8:18:
+        05:c8:7c:30:72:c7:df:f1:bb:fc:02:30:a9:f4:42:26:59:0d:
+        93:05:82:a1:73:ed:34:e5:38:5d:cd:50:90:fe:94:fc:13:bc:
+        bd:fc:a8:a2:88:a7:73:c4:b2:a8:d1:5d:88:c4:02:a2:7a:f1:
+        04:c9:fe:8c:74:c9:ef:1d:64:41:9f:ac:1e:96:67:64:ac:ab:
+        28:41:c7:9d:f7:c0:98:1b:6e:07:c2:64:7d:5a:83:66:56:28:
+        36:9c:e7:fb:1c:77:0e:28:a0:c4:f7:6b:79:39:04:20:84:c7:
+        57:93:bc:1b:a0:ea:bc:eb:42:e5:a8:11:fe:fc:ac:65:cc:fd:
+        f8:28:88:f4:a5:9a:e5:73:51:e0:a8:9b:0d:03:77:4e:e5:e0:
+        98:b3:88:da:7d:e6:c6:9e:7c:14:66:c1:2e:53:4a:92:07:37:
+        a0:7e:e9:3d:09:e4:15:7c:cf:fd:b8:41:a5:ef:9e:66:9d:c4:
+        5e:07:1d:87:f8:41:ad:ea:e7:2f:d2:41:63:18:37:f9:14:e3:
+        4d:d0:e5:f7:43:fd:15:e3:f9:36:73:06:26:df:01:4f:a9:c3:
+        4e:de:20:46:77:98:b4:7a:24:2b:3b:75:2b:4e:58:8d:9b:5d:
+        a4:c7:16:a0:bc:32:88:3f:a1:83:f3:00:c8:f8:d8:58:e9:63:
+        5d:4c:2b:b5:f0:72:41:d8:ab:77:37:d6:72:74:ae:b6:36:9c:
+        c8:a6:83:49:4b:e0:c9:56:0b:29:be:00:30:cb:dd:d6:c8:42:
+        8a:00:d9:ec:15:d1:34:71:f2:5b:64:87:f6:27:d2:b7:eb:86:
+        b0:90:bf:29:db:21:9e:36:8c:e3:20:2f:95:23:51:6c:1b:c2:
+        a4:d5:e6:d8:02:43:67:a0:fe:9b:50:03:44:7f:bb:e4:72:d5:
+        d1:e4:da:8f:92:14:64:fb:5d:14:10:12:4a:95:06:c9:65:08:
+        29:ca:21:a3:26:38:11:c9:27:df:70:67:04:fd:ca:48:32:7f:
+        63:b2:45:74:31:50:4f:87:d9:20:70:d2:21:70:b1:d6:10:9d:
+        33:5d:78:83:91:6d:55:82:ec:da:e4:62:63:c7:81:46:d7:19:
+        65:72:2a:43:19:90:b8:d7:23:4d:4c:1c:e0:44:a9:66:67:ac:
+        ee:71:79:27:26:78:6d:72:0e:f5:5d:4b:23:b5:7c:7c:65:e9:
+        17:c6:3a:0b:0d:dd:5e:1e:51:c3:86:b8:ec:7f:c7:27:4a:a5:
+        46:e8:6a:2d:19:c1:87:a3:cb:99:93:87:64:a2:55:14:4c:b7:
+        43:a5:93:d7:e7:d2:4e:79:40:ca:65:99:46:3d:3f:7a:80:7a:
+        88:6a:cc:1e:e5:6b:33:46:f4:50:c0:d5:1f:09:b8:cd:8a:2e:
+        a1:27:eb:5d:73:a7:e8:6b:0a:e5:57:82:2a:b0:fc:e2:54:52:
+        56:f0:ab:a9:12:c6:23:96:07:24:9c:e0:bc:46:a5:b4:20:04:
+        da:09:93:63:e5:d4:2e:c2:7e:c5:31:ed:b5:15:74:86:17:b9:
+        b3:f3:26:8a:1d:02:6a:da:1a:3f:e8:ba:f1:04:6d:94:51:54:
+        e2:5a:b4:59:83:1d:60:d0:2d:73:cc:07:b5:26:8c:f9:d7:c6:
+        88:91:ef:80:cf:5d:0f:a1:60:cb:45:d4:42:22:d1:b1:70:1d:
+        fd:d0:b7:30:90:3a:c6:48:6d:67:e5:32:da:8f:db:e3:a8:e3:
+        1d:20:25:a2:1c:e1:4c:b9:a4:f6:c6:3f:5c:58:0d:bb:c6:b2:
+        77:01:16:91:9f:17:06:0d:b7:40:3e:cc:8f:8e:9c:4b:e0:9d:
+        7e:9b:1e:05:ab:88:22:fa:d3:28:1b:57:14:64:4a:3e:24:2c:
+        38:4d:21:69:00:73:2e:d0:55:2d:74:f2:15:e8:94:43:3e:40:
+        2a:c6:c6:b9:6a:5b:de:a2:cc:18:50:54:5d:4e:2a:85:6c:f6:
+        92:8b:29:19:7e:e7:ea:4a:e0:22:2b:25:bc:f7:66:cf:77:9a:
+        41:74:f2:3c:14:0d:74:69:f5:50:83:cd:cd:2f:21:db:22:46:
+        8a:d0:f7:51:1a:95:57:f2:05:8b:1a:19:ed:3b:45:e8:36:c2:
+        6e:7e:fb:57:22:00:1f:06:53:a9:ae:93:c6:8f:71:2a:31:45:
+        92:e7:8e:6d:e6:99:22:c0:83:fc:ef:dc:57:66:77:4f:a2:36:
+        31:fb:a1:13:8d:e5:ca:a3:95:7d:01:0c:64:70:3b:53:42:68:
+        80:c7:bb:9d:a8:00:35:69:98:0c:a8:67:d8:43:e5:aa:cf:95:
+        e0:51:95:a4:17:3f:42:9d:b8:04:ce:d3:79:79:c8:d3:8a:16:
+        32:92:e0:d7:a2:ee:d7:37:4c:2f:ac:b8:7b:be:45:f6:f1:18:
+        33:9c:7b:37:a6:24:d9:bc:40:ab:00:e9:c3:37:8b:ab:d8:b6:
+        f3:5e:81:4e:b0:14:6b:07:3e:1f:ec:c2:f6:44:22:95:bb:b3:
+        e6:6f:d6:f9:70:65:ba:0a:83:65:aa:0e:13:2f:83:13:23:53:
+        8b:40:16:fa:ce:2f:fc:4d:04:f8:eb:d8:ac:c5:36:c2:15:57:
+        48:38:ec:55:b3:b4:1e:ba:ad:d2:42:06:17:0d:73:c8:57:a6:
+        be:96:4d:a9:f2:c0:fb:7a:21:1c:f5:c9:70:a9:82:90:b5:f1:
+        0c:d4:79:10:be:81:a6:e9:5c:61:9c:77:79:9a:a4:c3:37:26:
+        57:37:c9:52:2c:fa:08:ff:d0:5f:c6:61:c0:f4:76:be:fc:de:
+        4e:cf:ab:51:99:71:c7:df:7e:f4:d6:cf:06:56:19:13:53:0b:
+        6d:74:59:48:19:9b:53:05:2d:9d:32:54:d3:e5:2c:53:8b:64:
+        3e:d4:64:7b:e3:80:09:14:cc:fe:16:46:63:6b:71:69:f8:f9:
+        cb:27:f6:88:54:bc:45:b3:ce:02:c8:94:ee:40:5b:f9:42:02:
+        c2:ff:b0:d8:2c:eb:28:7f:5e:c9:26:01:99:a7
+
+UPS Document Exchange by DST
+============================
+MD5 Fingerprint: 78:A5:FB:10:4B:E4:63:2E:D2:6B:FB:F2:B6:C2:4B:8E
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIID+DCCAuACEQDQHkCLAAACfAAAAAcAAAABMA0GCSqGSIb3DQEBBQUAMIG5MQsw
+CQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENp
+dHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjEeMBwGA1UE
+CxMVVW5pdGVkIFBhcmNlbCBTZXJ2aWNlMRkwFwYDVQQDExBEU1QgKFVQUykgUm9v
+dENBMSEwHwYJKoZIhvcNAQkBFhJjYUBkaWdzaWd0cnVzdC5jb20wHhcNOTgxMjEw
+MDAyNTQ2WhcNMDgxMjA3MDAyNTQ2WjCBuTELMAkGA1UEBhMCdXMxDTALBgNVBAgT
+BFV0YWgxFzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR5MSQwIgYDVQQKExtEaWdpdGFs
+IFNpZ25hdHVyZSBUcnVzdCBDby4xHjAcBgNVBAsTFVVuaXRlZCBQYXJjZWwgU2Vy
+dmljZTEZMBcGA1UEAxMQRFNUIChVUFMpIFJvb3RDQTEhMB8GCSqGSIb3DQEJARYS
+Y2FAZGlnc2lndHJ1c3QuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
+AQEA7xfsrynm2SsnwNt7JJ9m9ASjwq0KyrDNhCuqN/OAoWDvQo/lXXdfV0JU3Svb
+YbJxXpN7b1/rJCvnpPLr8XOzC431Wdcy36yQjk4xuiVNtgym8eWvDOHlb1IDFcHf
+vn5KpqYYRnA/76dNqNz1dNlhekA8oZQo6sKUiMs3FQUZPJViuhwt+yiM0ciekjxb
+EVQ7eNlHO5stSuY+e2vf9PYFzyj2upg2AJ48N4UKnN63pIXFY/23YhRtFx7MioCF
+QjIRsCHinXfJgBZBnuvlFIl/t8O8T8Gfh5uW7GP2+ZBWDpWjIwqMZNqbuxx3sExd
+5sjo9X15LVckP8zjPSyYzxKfFwIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQC7OI4E
+IiZYDiFEVsy9WXwpaMtcD8iGVD+BeKetj8xG9xxUuHktW3IFaugh0OwdHf6kNFG+
+7u3OzJwWaOJddXMIQzGRahArEMJLafjJrZio/bjv9qvwXyHvy4VrCe0vSGa1YHLA
+6KDHmNsO9xtzjTQICnvFd2KqMCObsB6LgJhU3AWHs6liWfyLtxWarETszzUa9w8u
+XZJLAch77qA37eQdgg2ZQUMXrdTVyuP5fReiAdAwD0C53LkEgmmDtvkP+gaS96j0
+1hcc8F5/xCnI5uHi/zZoIVGu/6m6hJKtinsz2JDSwXltMzM5dKwbOHGfLAeQ6h3g
+04lfy+8UjSdUpb1G
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            d0:1e:40:8b:00:00:02:7c:00:00:00:07:00:00:00:01
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=United Parcel Service, CN=DST (UPS) RootCA/Email=ca@digsigtrust.com
+        Validity
+            Not Before: Dec 10 00:25:46 1998 GMT
+            Not After : Dec  7 00:25:46 2008 GMT
+        Subject: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=United Parcel Service, CN=DST (UPS) RootCA/Email=ca@digsigtrust.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:ef:17:ec:af:29:e6:d9:2b:27:c0:db:7b:24:9f:
+                    66:f4:04:a3:c2:ad:0a:ca:b0:cd:84:2b:aa:37:f3:
+                    80:a1:60:ef:42:8f:e5:5d:77:5f:57:42:54:dd:2b:
+                    db:61:b2:71:5e:93:7b:6f:5f:eb:24:2b:e7:a4:f2:
+                    eb:f1:73:b3:0b:8d:f5:59:d7:32:df:ac:90:8e:4e:
+                    31:ba:25:4d:b6:0c:a6:f1:e5:af:0c:e1:e5:6f:52:
+                    03:15:c1:df:be:7e:4a:a6:a6:18:46:70:3f:ef:a7:
+                    4d:a8:dc:f5:74:d9:61:7a:40:3c:a1:94:28:ea:c2:
+                    94:88:cb:37:15:05:19:3c:95:62:ba:1c:2d:fb:28:
+                    8c:d1:c8:9e:92:3c:5b:11:54:3b:78:d9:47:3b:9b:
+                    2d:4a:e6:3e:7b:6b:df:f4:f6:05:cf:28:f6:ba:98:
+                    36:00:9e:3c:37:85:0a:9c:de:b7:a4:85:c5:63:fd:
+                    b7:62:14:6d:17:1e:cc:8a:80:85:42:32:11:b0:21:
+                    e2:9d:77:c9:80:16:41:9e:eb:e5:14:89:7f:b7:c3:
+                    bc:4f:c1:9f:87:9b:96:ec:63:f6:f9:90:56:0e:95:
+                    a3:23:0a:8c:64:da:9b:bb:1c:77:b0:4c:5d:e6:c8:
+                    e8:f5:7d:79:2d:57:24:3f:cc:e3:3d:2c:98:cf:12:
+                    9f:17
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        bb:38:8e:04:22:26:58:0e:21:44:56:cc:bd:59:7c:29:68:cb:
+        5c:0f:c8:86:54:3f:81:78:a7:ad:8f:cc:46:f7:1c:54:b8:79:
+        2d:5b:72:05:6a:e8:21:d0:ec:1d:1d:fe:a4:34:51:be:ee:ed:
+        ce:cc:9c:16:68:e2:5d:75:73:08:43:31:91:6a:10:2b:10:c2:
+        4b:69:f8:c9:ad:98:a8:fd:b8:ef:f6:ab:f0:5f:21:ef:cb:85:
+        6b:09:ed:2f:48:66:b5:60:72:c0:e8:a0:c7:98:db:0e:f7:1b:
+        73:8d:34:08:0a:7b:c5:77:62:aa:30:23:9b:b0:1e:8b:80:98:
+        54:dc:05:87:b3:a9:62:59:fc:8b:b7:15:9a:ac:44:ec:cf:35:
+        1a:f7:0f:2e:5d:92:4b:01:c8:7b:ee:a0:37:ed:e4:1d:82:0d:
+        99:41:43:17:ad:d4:d5:ca:e3:f9:7d:17:a2:01:d0:30:0f:40:
+        b9:dc:b9:04:82:69:83:b6:f9:0f:fa:06:92:f7:a8:f4:d6:17:
+        1c:f0:5e:7f:c4:29:c8:e6:e1:e2:ff:36:68:21:51:ae:ff:a9:
+        ba:84:92:ad:8a:7b:33:d8:90:d2:c1:79:6d:33:33:39:74:ac:
+        1b:38:71:9f:2c:07:90:ea:1d:e0:d3:89:5f:cb:ef:14:8d:27:
+        54:a5:bd:46
+
+ValiCert Class 1 VA
+===================
+MD5 Fingerprint: 65:58:AB:15:AD:57:6C:1E:A8:A7:B5:69:AC:BF:FF:EB
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
+IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
+BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
+aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
+9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNTIyMjM0OFoXDTE5MDYy
+NTIyMjM0OFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
+azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
+YXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
+Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
+cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDYWYJ6ibiWuqYvaG9Y
+LqdUHAZu9OqNSLwxlBfw8068srg1knaw0KWlAdcAAxIiGQj4/xEjm84H9b9pGib+
+TunRf50sQB1ZaG6m+FiwnRqP0z/x3BkGgagO4DrdyFNFCQbmD3DD+kCmDuJWBQ8Y
+TfwggtFzVXSNdnKgHZ0dwN0/cQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFBoPUn0
+LBwGlN+VYH+Wexf+T3GtZMjdd9LvWVXoP+iOBSoh8gfStadS/pyxtuJbdxdA6nLW
+I8sogTLDAHkY7FkXicnGah5xyf23dKUlRWnFSKsZ4UWKJWsZ7uW7EvV/96aNUcPw
+nXS3qT6gpf+2SQMT2iLM7XGCK5nPOrf1LXLI
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 1 Policy Validation Authority, CN=http://www.valicert.com//Email=info@valicert.com
+        Validity
+            Not Before: Jun 25 22:23:48 1999 GMT
+            Not After : Jun 25 22:23:48 2019 GMT
+        Subject: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 1 Policy Validation Authority, CN=http://www.valicert.com//Email=info@valicert.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d8:59:82:7a:89:b8:96:ba:a6:2f:68:6f:58:2e:
+                    a7:54:1c:06:6e:f4:ea:8d:48:bc:31:94:17:f0:f3:
+                    4e:bc:b2:b8:35:92:76:b0:d0:a5:a5:01:d7:00:03:
+                    12:22:19:08:f8:ff:11:23:9b:ce:07:f5:bf:69:1a:
+                    26:fe:4e:e9:d1:7f:9d:2c:40:1d:59:68:6e:a6:f8:
+                    58:b0:9d:1a:8f:d3:3f:f1:dc:19:06:81:a8:0e:e0:
+                    3a:dd:c8:53:45:09:06:e6:0f:70:c3:fa:40:a6:0e:
+                    e2:56:05:0f:18:4d:fc:20:82:d1:73:55:74:8d:76:
+                    72:a0:1d:9d:1d:c0:dd:3f:71
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        50:68:3d:49:f4:2c:1c:06:94:df:95:60:7f:96:7b:17:fe:4f:
+        71:ad:64:c8:dd:77:d2:ef:59:55:e8:3f:e8:8e:05:2a:21:f2:
+        07:d2:b5:a7:52:fe:9c:b1:b6:e2:5b:77:17:40:ea:72:d6:23:
+        cb:28:81:32:c3:00:79:18:ec:59:17:89:c9:c6:6a:1e:71:c9:
+        fd:b7:74:a5:25:45:69:c5:48:ab:19:e1:45:8a:25:6b:19:ee:
+        e5:bb:12:f5:7f:f7:a6:8d:51:c3:f0:9d:74:b7:a9:3e:a0:a5:
+        ff:b6:49:03:13:da:22:cc:ed:71:82:2b:99:cf:3a:b7:f5:2d:
+        72:c8
+
+ValiCert Class 2 VA
+===================
+MD5 Fingerprint: A9:23:75:9B:BA:49:36:6E:31:C2:DB:F2:E7:66:BA:87
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
+IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
+BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
+aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
+9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMTk1NFoXDTE5MDYy
+NjAwMTk1NFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
+azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
+YXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
+Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
+cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDOOnHK5avIWZJV16vY
+dA757tn2VUdZZUcOBVXc65g2PFxTXdMwzzjsvUGJ7SVCCSRrCl6zfN1SLUzm1NZ9
+WlmpZdRJEy0kTRxQb7XBhVQ7/nHk01xC+YDgkRoKWzk2Z/M/VXwbP7RfZHM047QS
+v4dk+NoS/zcnwbNDu+97bi5p9wIDAQABMA0GCSqGSIb3DQEBBQUAA4GBADt/UG9v
+UJSZSWI4OB9L+KXIPqeCgfYrx+jFzug6EILLGACOTb2oWH+heQC1u+mNr0HZDzTu
+IYEZoDJJKPTEjlbVUjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMMj4QssxsodyamEwC
+W/POuZ6lcg5Ktz885hZo+L7tdEy8W9ViH0Pd
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 2 Policy Validation Authority, CN=http://www.valicert.com//Email=info@valicert.com
+        Validity
+            Not Before: Jun 26 00:19:54 1999 GMT
+            Not After : Jun 26 00:19:54 2019 GMT
+        Subject: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 2 Policy Validation Authority, CN=http://www.valicert.com//Email=info@valicert.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:ce:3a:71:ca:e5:ab:c8:59:92:55:d7:ab:d8:74:
+                    0e:f9:ee:d9:f6:55:47:59:65:47:0e:05:55:dc:eb:
+                    98:36:3c:5c:53:5d:d3:30:cf:38:ec:bd:41:89:ed:
+                    25:42:09:24:6b:0a:5e:b3:7c:dd:52:2d:4c:e6:d4:
+                    d6:7d:5a:59:a9:65:d4:49:13:2d:24:4d:1c:50:6f:
+                    b5:c1:85:54:3b:fe:71:e4:d3:5c:42:f9:80:e0:91:
+                    1a:0a:5b:39:36:67:f3:3f:55:7c:1b:3f:b4:5f:64:
+                    73:34:e3:b4:12:bf:87:64:f8:da:12:ff:37:27:c1:
+                    b3:43:bb:ef:7b:6e:2e:69:f7
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        3b:7f:50:6f:6f:50:94:99:49:62:38:38:1f:4b:f8:a5:c8:3e:
+        a7:82:81:f6:2b:c7:e8:c5:ce:e8:3a:10:82:cb:18:00:8e:4d:
+        bd:a8:58:7f:a1:79:00:b5:bb:e9:8d:af:41:d9:0f:34:ee:21:
+        81:19:a0:32:49:28:f4:c4:8e:56:d5:52:33:fd:50:d5:7e:99:
+        6c:03:e4:c9:4c:fc:cb:6c:ab:66:b3:4a:21:8c:e5:b5:0c:32:
+        3e:10:b2:cc:6c:a1:dc:9a:98:4c:02:5b:f3:ce:b9:9e:a5:72:
+        0e:4a:b7:3f:3c:e6:16:68:f8:be:ed:74:4c:bc:5b:d5:62:1f:
+        43:dd
+
+ValiCert Class 3 VA
+===================
+MD5 Fingerprint: A2:6F:53:B7:EE:40:DB:4A:68:E7:FA:18:D9:10:4B:72
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
+IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
+BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
+aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
+9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMjIzM1oXDTE5MDYy
+NjAwMjIzM1owgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
+azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
+YXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
+Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
+cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDjmFGWHOjVsQaBalfD
+cnWTq8+epvzzFlLWLU2fNUSoLgRNB0mKOCn1dzfnt6td3zZxFJmP3MKS8edgkpfs
+2Ejcv8ECIMYkpChMMFp2bbFc893enhBxoYjHW5tBbcqwuI4V7q0zK89HBFx1cQqY
+JJgpp0lZpd34t0NiYfPT4tBVPwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFa7AliE
+Zwgs3x/be0kz9dNnnfS0ChCzycUs4pJqcXgn8nCDQtM+z6lU9PHYkhaM0QTLS6vJ
+n0WuPIqpsHEzXcjFV9+vqDWzf4mH6eglkrh/hXqu1rweN1gqZ8mRzyqBPu3GOd/A
+PhmcGcwTTYJBtYze4D1gCCAPRX5ron+jjBXu
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 3 Policy Validation Authority, CN=http://www.valicert.com//Email=info@valicert.com
+        Validity
+            Not Before: Jun 26 00:22:33 1999 GMT
+            Not After : Jun 26 00:22:33 2019 GMT
+        Subject: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 3 Policy Validation Authority, CN=http://www.valicert.com//Email=info@valicert.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:e3:98:51:96:1c:e8:d5:b1:06:81:6a:57:c3:72:
+                    75:93:ab:cf:9e:a6:fc:f3:16:52:d6:2d:4d:9f:35:
+                    44:a8:2e:04:4d:07:49:8a:38:29:f5:77:37:e7:b7:
+                    ab:5d:df:36:71:14:99:8f:dc:c2:92:f1:e7:60:92:
+                    97:ec:d8:48:dc:bf:c1:02:20:c6:24:a4:28:4c:30:
+                    5a:76:6d:b1:5c:f3:dd:de:9e:10:71:a1:88:c7:5b:
+                    9b:41:6d:ca:b0:b8:8e:15:ee:ad:33:2b:cf:47:04:
+                    5c:75:71:0a:98:24:98:29:a7:49:59:a5:dd:f8:b7:
+                    43:62:61:f3:d3:e2:d0:55:3f
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        56:bb:02:58:84:67:08:2c:df:1f:db:7b:49:33:f5:d3:67:9d:
+        f4:b4:0a:10:b3:c9:c5:2c:e2:92:6a:71:78:27:f2:70:83:42:
+        d3:3e:cf:a9:54:f4:f1:d8:92:16:8c:d1:04:cb:4b:ab:c9:9f:
+        45:ae:3c:8a:a9:b0:71:33:5d:c8:c5:57:df:af:a8:35:b3:7f:
+        89:87:e9:e8:25:92:b8:7f:85:7a:ae:d6:bc:1e:37:58:2a:67:
+        c9:91:cf:2a:81:3e:ed:c6:39:df:c0:3e:19:9c:19:cc:13:4d:
+        82:41:b5:8c:de:e0:3d:60:08:20:0f:45:7e:6b:a2:7f:a3:8c:
+        15:ee
+
+VeriSign Class 4 Primary CA
+===========================
+MD5 Fingerprint: 1B:D1:AD:17:8B:7F:22:13:24:F5:26:E2:5D:4E:B9:10
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICMTCCAZoCBQKmAAABMA0GCSqGSIb3DQEBAgUAMF8xCzAJBgNVBAYTAlVTMRcw
+FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgNCBQdWJsaWMg
+UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NjAxMjkwMDAwMDBa
+Fw05OTEyMzEyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2ln
+biwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgNCBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZp
+Y2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0LJ1
+9njQrlpQ9OlQqZ+M1++RlHDo0iSQdomF1t+s5gEXMoDwnZNHvJplnR+Xrr/phnVj
+IIm9gFidBAydqMEk6QvlMXi9/C0MN2qeeIDpRnX57aP7E3vIwUzSo+/1PLBij0pd
+O92VZ48TucE81qcmm+zDO3rZTbxtm+gVAePwR6kCAwEAATANBgkqhkiG9w0BAQIF
+AAOBgQBT3dPwnCR+QKri/AAa19oM/DJhuBUNlvP6Vxt/M3yv6ZiaYch6s7f/sdyZ
+g9ysEvxwyR84Qu1E9oAuW2szaayc01znX1oYx7EteQSWQZGZQbE8DbqEOcY7l/Am
+yY7uvcxClf8exwI/VAx49byqYHwCaejcrOICdmHEPgPq0ook0Q==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            02:a6:00:00:01
+        Signature Algorithm: md2WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 4 Public Primary Certification Authority
+        Validity
+            Not Before: Jan 29 00:00:00 1996 GMT
+            Not After : Dec 31 23:59:59 1999 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 4 Public Primary Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d0:b2:75:f6:78:d0:ae:5a:50:f4:e9:50:a9:9f:
+                    8c:d7:ef:91:94:70:e8:d2:24:90:76:89:85:d6:df:
+                    ac:e6:01:17:32:80:f0:9d:93:47:bc:9a:65:9d:1f:
+                    97:ae:bf:e9:86:75:63:20:89:bd:80:58:9d:04:0c:
+                    9d:a8:c1:24:e9:0b:e5:31:78:bd:fc:2d:0c:37:6a:
+                    9e:78:80:e9:46:75:f9:ed:a3:fb:13:7b:c8:c1:4c:
+                    d2:a3:ef:f5:3c:b0:62:8f:4a:5d:3b:dd:95:67:8f:
+                    13:b9:c1:3c:d6:a7:26:9b:ec:c3:3b:7a:d9:4d:bc:
+                    6d:9b:e8:15:01:e3:f0:47:a9
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md2WithRSAEncryption
+        53:dd:d3:f0:9c:24:7e:40:aa:e2:fc:00:1a:d7:da:0c:fc:32:
+        61:b8:15:0d:96:f3:fa:57:1b:7f:33:7c:af:e9:98:9a:61:c8:
+        7a:b3:b7:ff:b1:dc:99:83:dc:ac:12:fc:70:c9:1f:38:42:ed:
+        44:f6:80:2e:5b:6b:33:69:ac:9c:d3:5c:e7:5f:5a:18:c7:b1:
+        2d:79:04:96:41:91:99:41:b1:3c:0d:ba:84:39:c6:3b:97:f0:
+        26:c9:8e:ee:bd:cc:42:95:ff:1e:c7:02:3f:54:0c:78:f5:bc:
+        aa:60:7c:02:69:e8:dc:ac:e2:02:76:61:c4:3e:03:ea:d2:8a:
+        24:d1
+
+Verisign Class 1 Public Primary Certification Authority
+=======================================================
+MD5 Fingerprint: 97:60:E8:57:5F:D3:50:47:E5:43:0C:94:36:8A:B0:62
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICPTCCAaYCEQDNun9W8N/kvFT+IqyzcqpVMA0GCSqGSIb3DQEBAgUAMF8xCzAJ
+BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xh
+c3MgMSBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05
+NjAxMjkwMDAwMDBaFw0yODA4MDEyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYD
+VQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMSBQdWJsaWMgUHJp
+bWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOB
+jQAwgYkCgYEA5Rm/baNWYS2ZSHH2Z965jeu3noaACpEO+jglr0aIguVzqKCbJF0N
+H8xlbgyw0FaEGIeaBpsQoXPftFg5a27B9hXVqKg/qhIGjTGsf7A01480Z4gJzRQR
+4k5FVmkfeAKA2txHkSm7NsljXMXg1y2He6G3MrB7MLoqLzGq7qNn2tsCAwEAATAN
+BgkqhkiG9w0BAQIFAAOBgQBMP7iLxmjf7kMzDl3ppssHhE16M/+SG/Q2rdiVIjZo
+EWx8QszznC7EBz8UsA9P/5CSdvnivErpj82ggAr3xSnxgiJduLHdgSOjeyUVRjB5
+FvjqBUuUfx3CHMjjt/QQQDwTw18fU+hI5Ia0e6E1sHslurjTjqs/OJ0ANACY89Fx
+lA==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            cd:ba:7f:56:f0:df:e4:bc:54:fe:22:ac:b3:72:aa:55
+        Signature Algorithm: md2WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 1 Public Primary Certification Authority
+        Validity
+            Not Before: Jan 29 00:00:00 1996 GMT
+            Not After : Aug  1 23:59:59 2028 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 1 Public Primary Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:e5:19:bf:6d:a3:56:61:2d:99:48:71:f6:67:de:
+                    b9:8d:eb:b7:9e:86:80:0a:91:0e:fa:38:25:af:46:
+                    88:82:e5:73:a8:a0:9b:24:5d:0d:1f:cc:65:6e:0c:
+                    b0:d0:56:84:18:87:9a:06:9b:10:a1:73:df:b4:58:
+                    39:6b:6e:c1:f6:15:d5:a8:a8:3f:aa:12:06:8d:31:
+                    ac:7f:b0:34:d7:8f:34:67:88:09:cd:14:11:e2:4e:
+                    45:56:69:1f:78:02:80:da:dc:47:91:29:bb:36:c9:
+                    63:5c:c5:e0:d7:2d:87:7b:a1:b7:32:b0:7b:30:ba:
+                    2a:2f:31:aa:ee:a3:67:da:db
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md2WithRSAEncryption
+        4c:3f:b8:8b:c6:68:df:ee:43:33:0e:5d:e9:a6:cb:07:84:4d:
+        7a:33:ff:92:1b:f4:36:ad:d8:95:22:36:68:11:6c:7c:42:cc:
+        f3:9c:2e:c4:07:3f:14:b0:0f:4f:ff:90:92:76:f9:e2:bc:4a:
+        e9:8f:cd:a0:80:0a:f7:c5:29:f1:82:22:5d:b8:b1:dd:81:23:
+        a3:7b:25:15:46:30:79:16:f8:ea:05:4b:94:7f:1d:c2:1c:c8:
+        e3:b7:f4:10:40:3c:13:c3:5f:1f:53:e8:48:e4:86:b4:7b:a1:
+        35:b0:7b:25:ba:b8:d3:8e:ab:3f:38:9d:00:34:00:98:f3:d1:
+        71:94
+
+Verisign Class 1 Public Primary Certification Authority - G2
+============================================================
+MD5 Fingerprint: F2:7D:E9:54:E4:A3:22:0D:76:9F:E7:0B:BB:B3:24:2B
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDAjCCAmsCEDnKVIn+UCIy/jLZ2/sbhBkwDQYJKoZIhvcNAQEFBQAwgcExCzAJ
+BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh
+c3MgMSBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy
+MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp
+emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X
+DTk4MDUxODAwMDAwMFoXDTE4MDUxODIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw
+FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMSBQdWJsaWMg
+UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo
+YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5
+MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB
+AQUAA4GNADCBiQKBgQCq0Lq+Fi24g9TK0g+8djHKlNgdk4xWArzZbxpvUjZudVYK
+VdPfQ4chEWWKfo+9Id5rMj8bhDSVBZ1BNeuS65bdqlk/AVNtmU/t5eIqWpDBucSm
+Fc/IReumXY6cPvBkJHalzasab7bYe1FhbqZ/h8jit+U03EGI6glAvnOSPWvndQID
+AQABMA0GCSqGSIb3DQEBBQUAA4GBAIv3GhDOdlwHq4OZ3BeAbzQ5XZg+a3Is4cei
+e0ApuXiIukzFo2penm574/ICQQxmvq37rqIUzpLzojSLtLK2JPLl1eDI5WJthHvL
+vrsDi3xXyvA3qZCviu4Dvh0onNkmdqDNxJ1O8K4HFtW+r1cIatCgQkJCHvQgzKV4
+gpUmOIpH
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            39:ca:54:89:fe:50:22:32:fe:32:d9:db:fb:1b:84:19
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 1 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Validity
+            Not Before: May 18 00:00:00 1998 GMT
+            Not After : May 18 23:59:59 2018 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 1 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:aa:d0:ba:be:16:2d:b8:83:d4:ca:d2:0f:bc:76:
+                    31:ca:94:d8:1d:93:8c:56:02:bc:d9:6f:1a:6f:52:
+                    36:6e:75:56:0a:55:d3:df:43:87:21:11:65:8a:7e:
+                    8f:bd:21:de:6b:32:3f:1b:84:34:95:05:9d:41:35:
+                    eb:92:eb:96:dd:aa:59:3f:01:53:6d:99:4f:ed:e5:
+                    e2:2a:5a:90:c1:b9:c4:a6:15:cf:c8:45:eb:a6:5d:
+                    8e:9c:3e:f0:64:24:76:a5:cd:ab:1a:6f:b6:d8:7b:
+                    51:61:6e:a6:7f:87:c8:e2:b7:e5:34:dc:41:88:ea:
+                    09:40:be:73:92:3d:6b:e7:75
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        8b:f7:1a:10:ce:76:5c:07:ab:83:99:dc:17:80:6f:34:39:5d:
+        98:3e:6b:72:2c:e1:c7:a2:7b:40:29:b9:78:88:ba:4c:c5:a3:
+        6a:5e:9e:6e:7b:e3:f2:02:41:0c:66:be:ad:fb:ae:a2:14:ce:
+        92:f3:a2:34:8b:b4:b2:b6:24:f2:e5:d5:e0:c8:e5:62:6d:84:
+        7b:cb:be:bb:03:8b:7c:57:ca:f0:37:a9:90:af:8a:ee:03:be:
+        1d:28:9c:d9:26:76:a0:cd:c4:9d:4e:f0:ae:07:16:d5:be:af:
+        57:08:6a:d0:a0:42:42:42:1e:f4:20:cc:a5:78:82:95:26:38:
+        8a:47
+
+Verisign Class 1 Public Primary Certification Authority - G3
+============================================================
+MD5 Fingerprint: B1:47:BC:18:57:D1:18:A0:78:2D:EC:71:E8:2A:95:73
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEGjCCAwICEQCLW3VWhFSFCwDPrzhIzrGkMA0GCSqGSIb3DQEBBQUAMIHKMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl
+cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu
+LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT
+aWduIENsYXNzIDEgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
+dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD
+VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT
+aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ
+bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu
+IENsYXNzIDEgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
+LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN2E1Lm0+afY8wR4
+nN493GwTFtl63SRRZsDHJlkNrAYIwpTRMx/wgzUfbhvI3qpuFU5UJ+/EbRrsC+MO
+8ESlV8dAWB6jRx9x7GD2bZTIGDnt/kIYVt/kTEkQeE4BdjVjEjbdZrwBBDajVWjV
+ojYJrKshJlQGrT/KFOCsyq0GHZXi+J3x4GD/wn91K0zM2v6HmSHquv4+VNfSWXjb
+PG7PoBMAGrgnoeS+Z5bKoMWznN3JdZ7rMJpfo83ZrngZPyPpXNspva1VyBtUjGP2
+6KbqxzcSXKMpHgLZ2x87tNcPVkeBFQRKr4Mn0cVYiMHd9qqnoxjaaKptEVHhv2Vr
+n5Z20T0CAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAq2aN17O6x5q25lXQBfGfMY1a
+qtmqRiYPce2lrVNWYgFHKkTp/j90CxObufRNG7LRX7K20ohcs5/Ny9Sn2WCVhDr4
+wTcdYcrnsMXlkdpUpqwxga6X3s0IrLjAl4B/bnKk52kTlWUfxJM8/XmPBNQ+T+r3
+ns7NZ3xPZQL/kYVUc8f/NveGLezQXk//EZ9yBta4GvFMDSZl4kSAHsef493oCtrs
+pSCAaWihT37ha88HQfqDjrw43bAuEbFrskLMmrz5SCJ5ShkPshw+IHTZasO+8ih4
+E1Z5T21Q6huwtVexN2ZYI/PcD98Kh8TvhgXVOBRgmaNL3gaWcSzy27YfpO8/7g==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            8b:5b:75:56:84:54:85:0b:00:cf:af:38:48:ce:b1:a4
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 1 Public Primary Certification Authority - G3
+        Validity
+            Not Before: Oct  1 00:00:00 1999 GMT
+            Not After : Jul 16 23:59:59 2036 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 1 Public Primary Certification Authority - G3
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:dd:84:d4:b9:b4:f9:a7:d8:f3:04:78:9c:de:3d:
+                    dc:6c:13:16:d9:7a:dd:24:51:66:c0:c7:26:59:0d:
+                    ac:06:08:c2:94:d1:33:1f:f0:83:35:1f:6e:1b:c8:
+                    de:aa:6e:15:4e:54:27:ef:c4:6d:1a:ec:0b:e3:0e:
+                    f0:44:a5:57:c7:40:58:1e:a3:47:1f:71:ec:60:f6:
+                    6d:94:c8:18:39:ed:fe:42:18:56:df:e4:4c:49:10:
+                    78:4e:01:76:35:63:12:36:dd:66:bc:01:04:36:a3:
+                    55:68:d5:a2:36:09:ac:ab:21:26:54:06:ad:3f:ca:
+                    14:e0:ac:ca:ad:06:1d:95:e2:f8:9d:f1:e0:60:ff:
+                    c2:7f:75:2b:4c:cc:da:fe:87:99:21:ea:ba:fe:3e:
+                    54:d7:d2:59:78:db:3c:6e:cf:a0:13:00:1a:b8:27:
+                    a1:e4:be:67:96:ca:a0:c5:b3:9c:dd:c9:75:9e:eb:
+                    30:9a:5f:a3:cd:d9:ae:78:19:3f:23:e9:5c:db:29:
+                    bd:ad:55:c8:1b:54:8c:63:f6:e8:a6:ea:c7:37:12:
+                    5c:a3:29:1e:02:d9:db:1f:3b:b4:d7:0f:56:47:81:
+                    15:04:4a:af:83:27:d1:c5:58:88:c1:dd:f6:aa:a7:
+                    a3:18:da:68:aa:6d:11:51:e1:bf:65:6b:9f:96:76:
+                    d1:3d
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        ab:66:8d:d7:b3:ba:c7:9a:b6:e6:55:d0:05:f1:9f:31:8d:5a:
+        aa:d9:aa:46:26:0f:71:ed:a5:ad:53:56:62:01:47:2a:44:e9:
+        fe:3f:74:0b:13:9b:b9:f4:4d:1b:b2:d1:5f:b2:b6:d2:88:5c:
+        b3:9f:cd:cb:d4:a7:d9:60:95:84:3a:f8:c1:37:1d:61:ca:e7:
+        b0:c5:e5:91:da:54:a6:ac:31:81:ae:97:de:cd:08:ac:b8:c0:
+        97:80:7f:6e:72:a4:e7:69:13:95:65:1f:c4:93:3c:fd:79:8f:
+        04:d4:3e:4f:ea:f7:9e:ce:cd:67:7c:4f:65:02:ff:91:85:54:
+        73:c7:ff:36:f7:86:2d:ec:d0:5e:4f:ff:11:9f:72:06:d6:b8:
+        1a:f1:4c:0d:26:65:e2:44:80:1e:c7:9f:e3:dd:e8:0a:da:ec:
+        a5:20:80:69:68:a1:4f:7e:e1:6b:cf:07:41:fa:83:8e:bc:38:
+        dd:b0:2e:11:b1:6b:b2:42:cc:9a:bc:f9:48:22:79:4a:19:0f:
+        b2:1c:3e:20:74:d9:6a:c3:be:f2:28:78:13:56:79:4f:6d:50:
+        ea:1b:b0:b5:57:b1:37:66:58:23:f3:dc:0f:df:0a:87:c4:ef:
+        86:05:d5:38:14:60:99:a3:4b:de:06:96:71:2c:f2:db:b6:1f:
+        a4:ef:3f:ee
+
+Verisign Class 2 Public Primary Certification Authority
+=======================================================
+MD5 Fingerprint: B3:9C:25:B1:C3:2E:32:53:80:15:30:9D:4D:02:77:3E
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICPDCCAaUCEC0b/EoXjaOR6+f/9YtFvgswDQYJKoZIhvcNAQECBQAwXzELMAkG
+A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
+cyAyIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
+MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
+BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAyIFB1YmxpYyBQcmlt
+YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
+ADCBiQKBgQC2WoujDWojg4BrzzmH9CETMwZMJaLtVRKXxaeAufqDwSCg+i8VDXyh
+YGt+eSz6Bg86rvYbb7HS/y8oUl+DfUvEerf4Zh+AVPy3wo5ZShRXRtGak75BkQO7
+FYCTXOvnzAhsPz6zSvz/S2wj1VCCJkQZjiPDceoZJEcEnnW/yKYAHwIDAQABMA0G
+CSqGSIb3DQEBAgUAA4GBAIobK/o5wXTXXtgZZKJYSi034DNHD6zt96rbHuSLBlxg
+J8pFUs4W7z8GZOeUaHxgMxURaa+dYo2jA1Rrpr7l7gUYYAS/QoD90KioHgE796Nc
+r6Pc5iaAIzy4RHT3Cq5Ji2F4zCS/iIqnDupzGUH9TQPwiNHleI2lKk/2lw0Xd8rY
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            2d:1b:fc:4a:17:8d:a3:91:eb:e7:ff:f5:8b:45:be:0b
+        Signature Algorithm: md2WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 2 Public Primary Certification Authority
+        Validity
+            Not Before: Jan 29 00:00:00 1996 GMT
+            Not After : Aug  1 23:59:59 2028 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 2 Public Primary Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b6:5a:8b:a3:0d:6a:23:83:80:6b:cf:39:87:f4:
+                    21:13:33:06:4c:25:a2:ed:55:12:97:c5:a7:80:b9:
+                    fa:83:c1:20:a0:fa:2f:15:0d:7c:a1:60:6b:7e:79:
+                    2c:fa:06:0f:3a:ae:f6:1b:6f:b1:d2:ff:2f:28:52:
+                    5f:83:7d:4b:c4:7a:b7:f8:66:1f:80:54:fc:b7:c2:
+                    8e:59:4a:14:57:46:d1:9a:93:be:41:91:03:bb:15:
+                    80:93:5c:eb:e7:cc:08:6c:3f:3e:b3:4a:fc:ff:4b:
+                    6c:23:d5:50:82:26:44:19:8e:23:c3:71:ea:19:24:
+                    47:04:9e:75:bf:c8:a6:00:1f
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md2WithRSAEncryption
+        8a:1b:2b:fa:39:c1:74:d7:5e:d8:19:64:a2:58:4a:2d:37:e0:
+        33:47:0f:ac:ed:f7:aa:db:1e:e4:8b:06:5c:60:27:ca:45:52:
+        ce:16:ef:3f:06:64:e7:94:68:7c:60:33:15:11:69:af:9d:62:
+        8d:a3:03:54:6b:a6:be:e5:ee:05:18:60:04:bf:42:80:fd:d0:
+        a8:a8:1e:01:3b:f7:a3:5c:af:a3:dc:e6:26:80:23:3c:b8:44:
+        74:f7:0a:ae:49:8b:61:78:cc:24:bf:88:8a:a7:0e:ea:73:19:
+        41:fd:4d:03:f0:88:d1:e5:78:8d:a5:2a:4f:f6:97:0d:17:77:
+        ca:d8
+
+Verisign Class 2 Public Primary Certification Authority - G2
+============================================================
+MD5 Fingerprint: 2D:BB:E5:25:D3:D1:65:82:3A:B7:0E:FA:E6:EB:E2:E1
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDAzCCAmwCEQC5L2DMiJ+hekYJuFtwbIqvMA0GCSqGSIb3DQEBBQUAMIHBMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xPDA6BgNVBAsTM0Ns
+YXNzIDIgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBH
+MjE6MDgGA1UECxMxKGMpIDE5OTggVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0aG9y
+aXplZCB1c2Ugb25seTEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazAe
+Fw05ODA1MTgwMDAwMDBaFw0yODA4MDEyMzU5NTlaMIHBMQswCQYDVQQGEwJVUzEX
+MBUGA1UEChMOVmVyaVNpZ24sIEluYy4xPDA6BgNVBAsTM0NsYXNzIDIgUHVibGlj
+IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjE6MDgGA1UECxMx
+KGMpIDE5OTggVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25s
+eTEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazCBnzANBgkqhkiG9w0B
+AQEFAAOBjQAwgYkCgYEAp4gBIXQs5xoD8JjhlzwPIQjxnNuX6Zr8wgQGE75fUsjM
+HiwSViy4AWkszJkfrbCWrnkE8hM5wXuYuggs6MKEEyyqaekJ9MepAqRCwiNPStjw
+DqL7MWzJ5m+ZJwf15vRMeJ5t60aG+rmGyVTyssSv1EYcWskVMP8NbPUtDm3Of3cC
+AwEAATANBgkqhkiG9w0BAQUFAAOBgQByLvl/0fFx+8Se9sVeUYpAmLho+Jscg9ji
+nb3/7aHmZuovCfTK1+qlK5X2JGCGTUQug6XELaDTrnhpb3LabK4I8GOSN+a7xDAX
+rXfMSTWqz9iP0b63GJZHc2pUIjRkLbYWm1lbtFFZOrMLFPQS32eg9K0yZF6xRnIn
+jBJ7xUS0rg==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            b9:2f:60:cc:88:9f:a1:7a:46:09:b8:5b:70:6c:8a:af
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 2 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Validity
+            Not Before: May 18 00:00:00 1998 GMT
+            Not After : Aug  1 23:59:59 2028 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 2 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:a7:88:01:21:74:2c:e7:1a:03:f0:98:e1:97:3c:
+                    0f:21:08:f1:9c:db:97:e9:9a:fc:c2:04:06:13:be:
+                    5f:52:c8:cc:1e:2c:12:56:2c:b8:01:69:2c:cc:99:
+                    1f:ad:b0:96:ae:79:04:f2:13:39:c1:7b:98:ba:08:
+                    2c:e8:c2:84:13:2c:aa:69:e9:09:f4:c7:a9:02:a4:
+                    42:c2:23:4f:4a:d8:f0:0e:a2:fb:31:6c:c9:e6:6f:
+                    99:27:07:f5:e6:f4:4c:78:9e:6d:eb:46:86:fa:b9:
+                    86:c9:54:f2:b2:c4:af:d4:46:1c:5a:c9:15:30:ff:
+                    0d:6c:f5:2d:0e:6d:ce:7f:77
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        72:2e:f9:7f:d1:f1:71:fb:c4:9e:f6:c5:5e:51:8a:40:98:b8:
+        68:f8:9b:1c:83:d8:e2:9d:bd:ff:ed:a1:e6:66:ea:2f:09:f4:
+        ca:d7:ea:a5:2b:95:f6:24:60:86:4d:44:2e:83:a5:c4:2d:a0:
+        d3:ae:78:69:6f:72:da:6c:ae:08:f0:63:92:37:e6:bb:c4:30:
+        17:ad:77:cc:49:35:aa:cf:d8:8f:d1:be:b7:18:96:47:73:6a:
+        54:22:34:64:2d:b6:16:9b:59:5b:b4:51:59:3a:b3:0b:14:f4:
+        12:df:67:a0:f4:ad:32:64:5e:b1:46:72:27:8c:12:7b:c5:44:
+        b4:ae
+
+Verisign Class 2 Public Primary Certification Authority - G3
+============================================================
+MD5 Fingerprint: F8:BE:C4:63:22:C9:A8:46:74:8B:B8:1D:1E:4A:2B:F6
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEGTCCAwECEGFwy0mMX5hFKeewptlQW3owDQYJKoZIhvcNAQEFBQAwgcoxCzAJ
+BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVy
+aVNpZ24gVHJ1c3QgTmV0d29yazE6MDgGA1UECxMxKGMpIDE5OTkgVmVyaVNpZ24s
+IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTFFMEMGA1UEAxM8VmVyaVNp
+Z24gQ2xhc3MgMiBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0
+eSAtIEczMB4XDTk5MTAwMTAwMDAwMFoXDTM2MDcxNjIzNTk1OVowgcoxCzAJBgNV
+BAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVyaVNp
+Z24gVHJ1c3QgTmV0d29yazE6MDgGA1UECxMxKGMpIDE5OTkgVmVyaVNpZ24sIElu
+Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTFFMEMGA1UEAxM8VmVyaVNpZ24g
+Q2xhc3MgMiBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAt
+IEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArwoNwtUs22e5LeWU
+J92lvuCwTY+zYVY81nzD9M0+hsuiiOLh2KRpxbXiv8GmR1BeRjmL1Za6tW8UvxDO
+JxOeBUebMXoT2B/Z0wI3i60sR/COgQanDTAM6/c8DyAd3HJG7qUCyFvDyVZpTMUY
+wZF7C9UTAJu878NIPkZgIIUq1ZC2zYugzDLdt/1AVbJQHFauzI13TccgTacxdu9o
+koqQHgiBVrKtaaNS0MscxCM9H5n+TOgWY47GCI72MfbS+uV23bUckqNJzc0BzWjN
+qWm6o+sdDZykIKbBoMXRRkwXbdKsZj+WjOCE1Db/IlnF+RFgqF8EffIa9iVCYQ/E
+Srg+iQIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQA0JhU8wI1NQ0kdvekhktdmnLfe
+xbjQ5F1fdiLAJvmEOjr5jLX77GDx6M4EsMjdpwOPMPOY36TmpDHf0xwLRtxyID+u
+7gU8pDM/CzmscHhzS5kr3zDCVLCoO1Wh/hYozUK9dG6A2ydEp85EXdQbkJgNHkKU
+sQAsBNB0owIFImNjzYO1+8FtYmtpdf1dcEG59b98377BMnMiIYtYgXsVkXq642RI
+sH/7NiXaldDxJBQX3RiAa0YjOVT1jmIJBB2UkKab5iXiQkWquJCtvgiPqQtCGJTP
+cjnhsUPgKM+351psE2tJs//jGHyJizNdrDPXp/naOlXJWBD5qu9ats9LS98q
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            61:70:cb:49:8c:5f:98:45:29:e7:b0:a6:d9:50:5b:7a
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 2 Public Primary Certification Authority - G3
+        Validity
+            Not Before: Oct  1 00:00:00 1999 GMT
+            Not After : Jul 16 23:59:59 2036 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 2 Public Primary Certification Authority - G3
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:af:0a:0d:c2:d5:2c:db:67:b9:2d:e5:94:27:dd:
+                    a5:be:e0:b0:4d:8f:b3:61:56:3c:d6:7c:c3:f4:cd:
+                    3e:86:cb:a2:88:e2:e1:d8:a4:69:c5:b5:e2:bf:c1:
+                    a6:47:50:5e:46:39:8b:d5:96:ba:b5:6f:14:bf:10:
+                    ce:27:13:9e:05:47:9b:31:7a:13:d8:1f:d9:d3:02:
+                    37:8b:ad:2c:47:f0:8e:81:06:a7:0d:30:0c:eb:f7:
+                    3c:0f:20:1d:dc:72:46:ee:a5:02:c8:5b:c3:c9:56:
+                    69:4c:c5:18:c1:91:7b:0b:d5:13:00:9b:bc:ef:c3:
+                    48:3e:46:60:20:85:2a:d5:90:b6:cd:8b:a0:cc:32:
+                    dd:b7:fd:40:55:b2:50:1c:56:ae:cc:8d:77:4d:c7:
+                    20:4d:a7:31:76:ef:68:92:8a:90:1e:08:81:56:b2:
+                    ad:69:a3:52:d0:cb:1c:c4:23:3d:1f:99:fe:4c:e8:
+                    16:63:8e:c6:08:8e:f6:31:f6:d2:fa:e5:76:dd:b5:
+                    1c:92:a3:49:cd:cd:01:cd:68:cd:a9:69:ba:a3:eb:
+                    1d:0d:9c:a4:20:a6:c1:a0:c5:d1:46:4c:17:6d:d2:
+                    ac:66:3f:96:8c:e0:84:d4:36:ff:22:59:c5:f9:11:
+                    60:a8:5f:04:7d:f2:1a:f6:25:42:61:0f:c4:4a:b8:
+                    3e:89
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        34:26:15:3c:c0:8d:4d:43:49:1d:bd:e9:21:92:d7:66:9c:b7:
+        de:c5:b8:d0:e4:5d:5f:76:22:c0:26:f9:84:3a:3a:f9:8c:b5:
+        fb:ec:60:f1:e8:ce:04:b0:c8:dd:a7:03:8f:30:f3:98:df:a4:
+        e6:a4:31:df:d3:1c:0b:46:dc:72:20:3f:ae:ee:05:3c:a4:33:
+        3f:0b:39:ac:70:78:73:4b:99:2b:df:30:c2:54:b0:a8:3b:55:
+        a1:fe:16:28:cd:42:bd:74:6e:80:db:27:44:a7:ce:44:5d:d4:
+        1b:90:98:0d:1e:42:94:b1:00:2c:04:d0:74:a3:02:05:22:63:
+        63:cd:83:b5:fb:c1:6d:62:6b:69:75:fd:5d:70:41:b9:f5:bf:
+        7c:df:be:c1:32:73:22:21:8b:58:81:7b:15:91:7a:ba:e3:64:
+        48:b0:7f:fb:36:25:da:95:d0:f1:24:14:17:dd:18:80:6b:46:
+        23:39:54:f5:8e:62:09:04:1d:94:90:a6:9b:e6:25:e2:42:45:
+        aa:b8:90:ad:be:08:8f:a9:0b:42:18:94:cf:72:39:e1:b1:43:
+        e0:28:cf:b7:e7:5a:6c:13:6b:49:b3:ff:e3:18:7c:89:8b:33:
+        5d:ac:33:d7:a7:f9:da:3a:55:c9:58:10:f9:aa:ef:5a:b6:cf:
+        4b:4b:df:2a
+
+Verisign Class 3 Public Primary Certification Authority
+=======================================================
+MD5 Fingerprint: 10:FC:63:5D:F6:26:3E:0D:F3:25:BE:5F:79:CD:67:67
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG
+A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
+cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
+MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
+BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt
+YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
+ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE
+BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is
+I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G
+CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do
+lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc
+AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            70:ba:e4:1d:10:d9:29:34:b6:38:ca:7b:03:cc:ba:bf
+        Signature Algorithm: md2WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority
+        Validity
+            Not Before: Jan 29 00:00:00 1996 GMT
+            Not After : Aug  1 23:59:59 2028 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:c9:5c:59:9e:f2:1b:8a:01:14:b4:10:df:04:40:
+                    db:e3:57:af:6a:45:40:8f:84:0c:0b:d1:33:d9:d9:
+                    11:cf:ee:02:58:1f:25:f7:2a:a8:44:05:aa:ec:03:
+                    1f:78:7f:9e:93:b9:9a:00:aa:23:7d:d6:ac:85:a2:
+                    63:45:c7:72:27:cc:f4:4c:c6:75:71:d2:39:ef:4f:
+                    42:f0:75:df:0a:90:c6:8e:20:6f:98:0f:f8:ac:23:
+                    5f:70:29:36:a4:c9:86:e7:b1:9a:20:cb:53:a5:85:
+                    e7:3d:be:7d:9a:fe:24:45:33:dc:76:15:ed:0f:a2:
+                    71:64:4c:65:2e:81:68:45:a7
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md2WithRSAEncryption
+        bb:4c:12:2b:cf:2c:26:00:4f:14:13:dd:a6:fb:fc:0a:11:84:
+        8c:f3:28:1c:67:92:2f:7c:b6:c5:fa:df:f0:e8:95:bc:1d:8f:
+        6c:2c:a8:51:cc:73:d8:a4:c0:53:f0:4e:d6:26:c0:76:01:57:
+        81:92:5e:21:f1:d1:b1:ff:e7:d0:21:58:cd:69:17:e3:44:1c:
+        9c:19:44:39:89:5c:dc:9c:00:0f:56:8d:02:99:ed:a2:90:45:
+        4c:e4:bb:10:a4:3d:f0:32:03:0e:f1:ce:f8:e8:c9:51:8c:e6:
+        62:9f:e6:9f:c0:7d:b7:72:9c:c9:36:3a:6b:9f:4e:a8:ff:64:
+        0d:64
+
+Verisign Class 3 Public Primary Certification Authority - G2
+============================================================
+MD5 Fingerprint: A2:33:9B:4C:74:78:73:D4:6C:E7:C1:F3:8D:CB:5C:E9
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJ
+BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh
+c3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy
+MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp
+emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X
+DTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw
+FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMg
+UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo
+YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5
+MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB
+AQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCOFoUgRm1HP9SFIIThbbP4
+pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71lSk8UOg0
+13gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwID
+AQABMA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSk
+U01UbSuvDV1Ai2TT1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7i
+F6YM40AIOw7n60RzKprxaZLvcRTDOaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpY
+oJ2daZH9
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            7d:d9:fe:07:cf:a8:1e:b7:10:79:67:fb:a7:89:34:c6
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Validity
+            Not Before: May 18 00:00:00 1998 GMT
+            Not After : Aug  1 23:59:59 2028 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:cc:5e:d1:11:5d:5c:69:d0:ab:d3:b9:6a:4c:99:
+                    1f:59:98:30:8e:16:85:20:46:6d:47:3f:d4:85:20:
+                    84:e1:6d:b3:f8:a4:ed:0c:f1:17:0f:3b:f9:a7:f9:
+                    25:d7:c1:cf:84:63:f2:7c:63:cf:a2:47:f2:c6:5b:
+                    33:8e:64:40:04:68:c1:80:b9:64:1c:45:77:c7:d8:
+                    6e:f5:95:29:3c:50:e8:34:d7:78:1f:a8:ba:6d:43:
+                    91:95:8f:45:57:5e:7e:c5:fb:ca:a4:04:eb:ea:97:
+                    37:54:30:6f:bb:01:47:32:33:cd:dc:57:9b:64:69:
+                    61:f8:9b:1d:1c:89:4f:5c:67
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        51:4d:cd:be:5c:cb:98:19:9c:15:b2:01:39:78:2e:4d:0f:67:
+        70:70:99:c6:10:5a:94:a4:53:4d:54:6d:2b:af:0d:5d:40:8b:
+        64:d3:d7:ee:de:56:61:92:5f:a6:c4:1d:10:61:36:d3:2c:27:
+        3c:e8:29:09:b9:11:64:74:cc:b5:73:9f:1c:48:a9:bc:61:01:
+        ee:e2:17:a6:0c:e3:40:08:3b:0e:e7:eb:44:73:2a:9a:f1:69:
+        92:ef:71:14:c3:39:ac:71:a7:91:09:6f:e4:71:06:b3:ba:59:
+        57:26:79:00:f6:f8:0d:a2:33:30:28:d4:aa:58:a0:9d:9d:69:
+        91:fd
+
+Verisign Class 3 Public Primary Certification Authority - G3
+============================================================
+MD5 Fingerprint: CD:68:B6:A7:C7:C4:CE:75:E0:1D:4F:57:44:61:92:09
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl
+cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu
+LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT
+aWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
+dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD
+VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT
+aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ
+bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu
+IENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
+LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMu6nFL8eB8aHm8b
+N3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1EUGO+i2t
+KmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGu
+kxUccLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBm
+CC+Vk7+qRy+oRpfwEuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJ
+Xwzw3sJ2zq/3avL6QaaiMxTJ5Xpj055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWu
+imi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAERSWwauSCPc/L8my/uRan2Te
+2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5fj267Cz3qWhMe
+DGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC
+/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565p
+F4ErWjfJXir0xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGt
+TxzhT5yvDwyd93gN2PQ1VoDat20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            9b:7e:06:49:a3:3e:62:b9:d5:ee:90:48:71:29:ef:57
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 3 Public Primary Certification Authority - G3
+        Validity
+            Not Before: Oct  1 00:00:00 1999 GMT
+            Not After : Jul 16 23:59:59 2036 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 3 Public Primary Certification Authority - G3
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:cb:ba:9c:52:fc:78:1f:1a:1e:6f:1b:37:73:bd:
+                    f8:c9:6b:94:12:30:4f:f0:36:47:f5:d0:91:0a:f5:
+                    17:c8:a5:61:c1:16:40:4d:fb:8a:61:90:e5:76:20:
+                    c1:11:06:7d:ab:2c:6e:a6:f5:11:41:8e:fa:2d:ad:
+                    2a:61:59:a4:67:26:4c:d0:e8:bc:52:5b:70:20:04:
+                    58:d1:7a:c9:a4:69:bc:83:17:64:ad:05:8b:bc:d0:
+                    58:ce:8d:8c:f5:eb:f0:42:49:0b:9d:97:27:67:32:
+                    6e:e1:ae:93:15:1c:70:bc:20:4d:2f:18:de:92:88:
+                    e8:6c:85:57:11:1a:e9:7e:e3:26:11:54:a2:45:96:
+                    55:83:ca:30:89:e8:dc:d8:a3:ed:2a:80:3f:7f:79:
+                    65:57:3e:15:20:66:08:2f:95:93:bf:aa:47:2f:a8:
+                    46:97:f0:12:e2:fe:c2:0a:2b:51:e6:76:e6:b7:46:
+                    b7:e2:0d:a6:cc:a8:c3:4c:59:55:89:e6:e8:53:5c:
+                    1c:ea:9d:f0:62:16:0b:a7:c9:5f:0c:f0:de:c2:76:
+                    ce:af:f7:6a:f2:fa:41:a6:a2:33:14:c9:e5:7a:63:
+                    d3:9e:62:37:d5:85:65:9e:0e:e6:53:24:74:1b:5e:
+                    1d:12:53:5b:c7:2c:e7:83:49:3b:15:ae:8a:68:b9:
+                    57:97
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        11:14:96:c1:ab:92:08:f7:3f:2f:c9:b2:fe:e4:5a:9f:64:de:
+        db:21:4f:86:99:34:76:36:57:dd:d0:15:2f:c5:ad:7f:15:1f:
+        37:62:73:3e:d4:e7:5f:ce:17:03:db:35:fa:2b:db:ae:60:09:
+        5f:1e:5f:8f:6e:bb:0b:3d:ea:5a:13:1e:0c:60:6f:b5:c0:b5:
+        23:22:2e:07:0b:cb:a9:74:cb:47:bb:1d:c1:d7:a5:6b:cc:2f:
+        d2:42:fd:49:dd:a7:89:cf:53:ba:da:00:5a:28:bf:82:df:f8:
+        ba:13:1d:50:86:82:fd:8e:30:8f:29:46:b0:1e:3d:35:da:38:
+        62:16:18:4a:ad:e6:b6:51:6c:de:af:62:eb:01:d0:1e:24:fe:
+        7a:8f:12:1a:12:68:b8:fb:66:99:14:14:45:5c:ae:e7:ae:69:
+        17:81:2b:5a:37:c9:5e:2a:f4:c6:e2:a1:5c:54:9b:a6:54:00:
+        cf:f0:f1:c1:c7:98:30:1a:3b:36:16:db:a3:6e:ea:fd:ad:b2:
+        c2:da:ef:02:47:13:8a:c0:f1:b3:31:ad:4f:1c:e1:4f:9c:af:
+        0f:0c:9d:f7:78:0d:d8:f4:35:56:80:da:b7:6d:17:8f:9d:1e:
+        81:64:e1:fe:c5:45:ba:ad:6b:b9:0a:7a:4e:4f:4b:84:ee:4b:
+        f1:7d:dd:11
+
+Verisign Class 4 Public Primary Certification Authority - G2
+============================================================
+MD5 Fingerprint: 26:6D:2C:19:98:B6:70:68:38:50:54:19:EC:90:34:60
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDAjCCAmsCEDKIjprS9esTR/h/xCA3JfgwDQYJKoZIhvcNAQEFBQAwgcExCzAJ
+BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh
+c3MgNCBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy
+MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp
+emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X
+DTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw
+FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgNCBQdWJsaWMg
+UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo
+YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5
+MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB
+AQUAA4GNADCBiQKBgQC68OTP+cSuhVS5B1f5j8V/aBH4xBewRNzjMHPVKmIquNDM
+HO0oW369atyzkSTKQWI8/AIBvxwWMZQFl3Zuoq29YRdsTjCG8FE3KlDHqGKB3FtK
+qsGgtG7rL+VXxbErQHDbWk2hjh+9Ax/YA9SPTJlxvOKCzFjomDqG04Y48wApHwID
+AQABMA0GCSqGSIb3DQEBBQUAA4GBAIWMEsGnuVAVess+rLhDityq3RS6iYF+ATwj
+cSGIL4LcY/oCRaxFWdcqWERbt5+BO5JoPeI3JPV7bI92NZYJqFmduc4jq3TWg/0y
+cyfYaT5DdPauxYma51N86Xv2S/PBZYPejYqcPIiNOVn8qj8ijaHBZlCBckztImRP
+T8qAkbYp
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            32:88:8e:9a:d2:f5:eb:13:47:f8:7f:c4:20:37:25:f8
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 4 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Validity
+            Not Before: May 18 00:00:00 1998 GMT
+            Not After : Aug  1 23:59:59 2028 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 4 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:ba:f0:e4:cf:f9:c4:ae:85:54:b9:07:57:f9:8f:
+                    c5:7f:68:11:f8:c4:17:b0:44:dc:e3:30:73:d5:2a:
+                    62:2a:b8:d0:cc:1c:ed:28:5b:7e:bd:6a:dc:b3:91:
+                    24:ca:41:62:3c:fc:02:01:bf:1c:16:31:94:05:97:
+                    76:6e:a2:ad:bd:61:17:6c:4e:30:86:f0:51:37:2a:
+                    50:c7:a8:62:81:dc:5b:4a:aa:c1:a0:b4:6e:eb:2f:
+                    e5:57:c5:b1:2b:40:70:db:5a:4d:a1:8e:1f:bd:03:
+                    1f:d8:03:d4:8f:4c:99:71:bc:e2:82:cc:58:e8:98:
+                    3a:86:d3:86:38:f3:00:29:1f
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        85:8c:12:c1:a7:b9:50:15:7a:cb:3e:ac:b8:43:8a:dc:aa:dd:
+        14:ba:89:81:7e:01:3c:23:71:21:88:2f:82:dc:63:fa:02:45:
+        ac:45:59:d7:2a:58:44:5b:b7:9f:81:3b:92:68:3d:e2:37:24:
+        f5:7b:6c:8f:76:35:96:09:a8:59:9d:b9:ce:23:ab:74:d6:83:
+        fd:32:73:27:d8:69:3e:43:74:f6:ae:c5:89:9a:e7:53:7c:e9:
+        7b:f6:4b:f3:c1:65:83:de:8d:8a:9c:3c:88:8d:39:59:fc:aa:
+        3f:22:8d:a1:c1:66:50:81:72:4c:ed:22:64:4f:4f:ca:80:91:
+        b6:29
+
+Verisign Class 4 Public Primary Certification Authority - G3
+============================================================
+MD5 Fingerprint: DB:C8:F2:27:2E:B1:EA:6A:29:23:5D:FE:56:3E:33:DF
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl
+cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu
+LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT
+aWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
+dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD
+VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT
+aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ
+bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu
+IENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
+LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK3LpRFpxlmr8Y+1
+GQ9Wzsy1HyDkniYlS+BzZYlZ3tCD5PUPtbut8XzoIfzk6AzufEUiGXaStBO3IFsJ
++mGuqPKljYXCKtbeZjbSmwL0qJJgfJxptI8kHtCGUvYynEFYHiK9zUVilQhu0Gbd
+U6LM8BDcVHOLBKFGMzNcF0C5nk3T875Vg+ixiY5afJqWIpA7iCXy0lOIAgwLePLm
+NxdLMEYH5IBtptiWLugs+BGzOA1mppvqySNb247i8xOOGlktqgLw7KSHZtzBP/XY
+ufTsgsbSPZUd5cBPhMnZo0QoBmrXRazwa2rvTl/4EYIeOGM0ZlDUPpNz+jDDZq3/
+ky2X7wMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAj/ola09b5KROJ1WrIhVZPMq1
+CtRK26vdoV9TxaBXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXttmhwwjIDLk5Mq
+g6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKm
+fjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c
+2NU8Qh0XwRJdRTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/
+bLvSHgCwIe34QWKCudiyxLtGUPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            ec:a0:a7:8b:6e:75:6a:01:cf:c4:7c:cc:2f:94:5e:d7
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 4 Public Primary Certification Authority - G3
+        Validity
+            Not Before: Oct  1 00:00:00 1999 GMT
+            Not After : Jul 16 23:59:59 2036 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 4 Public Primary Certification Authority - G3
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:ad:cb:a5:11:69:c6:59:ab:f1:8f:b5:19:0f:56:
+                    ce:cc:b5:1f:20:e4:9e:26:25:4b:e0:73:65:89:59:
+                    de:d0:83:e4:f5:0f:b5:bb:ad:f1:7c:e8:21:fc:e4:
+                    e8:0c:ee:7c:45:22:19:76:92:b4:13:b7:20:5b:09:
+                    fa:61:ae:a8:f2:a5:8d:85:c2:2a:d6:de:66:36:d2:
+                    9b:02:f4:a8:92:60:7c:9c:69:b4:8f:24:1e:d0:86:
+                    52:f6:32:9c:41:58:1e:22:bd:cd:45:62:95:08:6e:
+                    d0:66:dd:53:a2:cc:f0:10:dc:54:73:8b:04:a1:46:
+                    33:33:5c:17:40:b9:9e:4d:d3:f3:be:55:83:e8:b1:
+                    89:8e:5a:7c:9a:96:22:90:3b:88:25:f2:d2:53:88:
+                    02:0c:0b:78:f2:e6:37:17:4b:30:46:07:e4:80:6d:
+                    a6:d8:96:2e:e8:2c:f8:11:b3:38:0d:66:a6:9b:ea:
+                    c9:23:5b:db:8e:e2:f3:13:8e:1a:59:2d:aa:02:f0:
+                    ec:a4:87:66:dc:c1:3f:f5:d8:b9:f4:ec:82:c6:d2:
+                    3d:95:1d:e5:c0:4f:84:c9:d9:a3:44:28:06:6a:d7:
+                    45:ac:f0:6b:6a:ef:4e:5f:f8:11:82:1e:38:63:34:
+                    66:50:d4:3e:93:73:fa:30:c3:66:ad:ff:93:2d:97:
+                    ef:03
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        8f:fa:25:6b:4f:5b:e4:a4:4e:27:55:ab:22:15:59:3c:ca:b5:
+        0a:d4:4a:db:ab:dd:a1:5f:53:c5:a0:57:39:c2:ce:47:2b:be:
+        3a:c8:56:bf:c2:d9:27:10:3a:b1:05:3c:c0:77:31:bb:3a:d3:
+        05:7b:6d:9a:1c:30:8c:80:cb:93:93:2a:83:ab:05:51:82:02:
+        00:11:67:6b:f3:88:61:47:5f:03:93:d5:5b:0d:e0:f1:d4:a1:
+        32:35:85:b2:3a:db:b0:82:ab:d1:cb:0a:bc:4f:8c:5b:c5:4b:
+        00:3b:1f:2a:82:a6:7e:36:85:dc:7e:3c:67:00:b5:e4:3b:52:
+        e0:a8:eb:5d:15:f9:c6:6d:f0:ad:1d:0e:85:b7:a9:9a:73:14:
+        5a:5b:8f:41:28:c0:d5:e8:2d:4d:a4:5e:cd:aa:d9:ed:ce:dc:
+        d8:d5:3c:42:1d:17:c1:12:5d:45:38:c3:38:f3:fc:85:2e:83:
+        46:48:b2:d7:20:5f:92:36:8f:e7:79:0f:98:5e:99:e8:f0:d0:
+        a4:bb:f5:53:bd:2a:ce:59:b0:af:6e:7f:6c:bb:d2:1e:00:b0:
+        21:ed:f8:41:62:82:b9:d8:b2:c4:bb:46:50:f3:31:c5:8f:01:
+        a8:74:eb:f5:78:27:da:e7:f7:66:43:f3:9e:83:3e:20:aa:c3:
+        35:60:91:ce
+
+Verisign/RSA Commercial CA
+==========================
+MD5 Fingerprint: 5A:0B:DD:42:9E:B2:B4:62:97:32:7F:7F:0A:AA:9A:39
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICIzCCAZACBQJBAAAWMA0GCSqGSIb3DQEBAgUAMFwxCzAJBgNVBAYTAlVTMSAw
+HgYDVQQKExdSU0EgRGF0YSBTZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVy
+Y2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NDExMDQxODU4MzRaFw05
+OTExMDMxODU4MzRaMFwxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdSU0EgRGF0YSBT
+ZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVyY2lhbCBDZXJ0aWZpY2F0aW9u
+IEF1dGhvcml0eTCBmzANBgkqhkiG9w0BAQEFAAOBiQAwgYUCfgCk+4Fie84QJ93o
+975sbsZwmdu41QUDaSiCnHJ/lj+O7Kwpkj+KFPhCdr69XQO5kNTQvAayUTNfxMK/
+touPmbZiImDd298ggrTKoi8tUO2UMt7gVY3UaOLgTNLNBRYulWZcYVI4HlGogqHE
+7yXpCuaLK44xZtn42f29O2nZ6wIDAQABMA0GCSqGSIb3DQEBAgUAA34AdrW2EP4j
+9/dZYkuwX5zBaLxJu7NJbyFHXSudVMQAKD+YufKKg5tgf+tQx6sFEC097TgCwaVI
+0v5loMC86qYjFmZsGySp8+x5NRhPJsjjr1BKx6cxa9B8GJ1Qv6km+iYrRpwUqbtb
+MJhCKLVLU7tDCZJAuqiqWqTGtotXTcU=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            02:41:00:00:16
+        Signature Algorithm: md2WithRSAEncryption
+        Issuer: C=US, O=RSA Data Security, Inc., OU=Commercial Certification Authority
+        Validity
+            Not Before: Nov  4 18:58:34 1994 GMT
+            Not After : Nov  3 18:58:34 1999 GMT
+        Subject: C=US, O=RSA Data Security, Inc., OU=Commercial Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1000 bit)
+                Modulus (1000 bit):
+                    00:a4:fb:81:62:7b:ce:10:27:dd:e8:f7:be:6c:6e:
+                    c6:70:99:db:b8:d5:05:03:69:28:82:9c:72:7f:96:
+                    3f:8e:ec:ac:29:92:3f:8a:14:f8:42:76:be:bd:5d:
+                    03:b9:90:d4:d0:bc:06:b2:51:33:5f:c4:c2:bf:b6:
+                    8b:8f:99:b6:62:22:60:dd:db:df:20:82:b4:ca:a2:
+                    2f:2d:50:ed:94:32:de:e0:55:8d:d4:68:e2:e0:4c:
+                    d2:cd:05:16:2e:95:66:5c:61:52:38:1e:51:a8:82:
+                    a1:c4:ef:25:e9:0a:e6:8b:2b:8e:31:66:d9:f8:d9:
+                    fd:bd:3b:69:d9:eb
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md2WithRSAEncryption
+        76:b5:b6:10:fe:23:f7:f7:59:62:4b:b0:5f:9c:c1:68:bc:49:
+        bb:b3:49:6f:21:47:5d:2b:9d:54:c4:00:28:3f:98:b9:f2:8a:
+        83:9b:60:7f:eb:50:c7:ab:05:10:2d:3d:ed:38:02:c1:a5:48:
+        d2:fe:65:a0:c0:bc:ea:a6:23:16:66:6c:1b:24:a9:f3:ec:79:
+        35:18:4f:26:c8:e3:af:50:4a:c7:a7:31:6b:d0:7c:18:9d:50:
+        bf:a9:26:fa:26:2b:46:9c:14:a9:bb:5b:30:98:42:28:b5:4b:
+        53:bb:43:09:92:40:ba:a8:aa:5a:a4:c6:b6:8b:57:4d:c5
+
+Verisign/RSA Secure Server CA
+=============================
+MD5 Fingerprint: 74:7B:82:03:43:F0:00:9E:6B:B3:EC:47:BF:85:A5:93
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICNDCCAaECEAKtZn5ORf5eV288mBle3cAwDQYJKoZIhvcNAQECBQAwXzELMAkG
+A1UEBhMCVVMxIDAeBgNVBAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYD
+VQQLEyVTZWN1cmUgU2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk0
+MTEwOTAwMDAwMFoXDTEwMDEwNzIzNTk1OVowXzELMAkGA1UEBhMCVVMxIDAeBgNV
+BAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYDVQQLEyVTZWN1cmUgU2Vy
+dmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGbMA0GCSqGSIb3DQEBAQUAA4GJ
+ADCBhQJ+AJLOesGugz5aqomDV6wlAXYMra6OLDfO6zV4ZFQD5YRAUcm/jwjiioII
+0haGN1XpsSECrXZogZoFokvJSyVmIlZsiAeP94FZbYQHZXATcXY+m3dM41CJVphI
+uR2nKRoTLkoRWZweFdVJVCxzOmmCsZc5nG1wZ0jl3S3WyB57AgMBAAEwDQYJKoZI
+hvcNAQECBQADfgBl3X7hsuyw4jrg7HFGmhkRuNPHoLQDQCYCPgmc4RKz0Vr2N6W3
+YQO2WxZpO8ZECAyIUwxrl0nHPjXcbLm7qt9cuzovk2C2qUtN8iD3zV9/ZHuO3ABc
+1/p3yjkWWW8O6tO1g39NTUJWdrTJXwT4OPjr0l91X817/OWOgHz8UA==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            02:ad:66:7e:4e:45:fe:5e:57:6f:3c:98:19:5e:dd:c0
+        Signature Algorithm: md2WithRSAEncryption
+        Issuer: C=US, O=RSA Data Security, Inc., OU=Secure Server Certification Authority
+        Validity
+            Not Before: Nov  9 00:00:00 1994 GMT
+            Not After : Jan  7 23:59:59 2010 GMT
+        Subject: C=US, O=RSA Data Security, Inc., OU=Secure Server Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1000 bit)
+                Modulus (1000 bit):
+                    00:92:ce:7a:c1:ae:83:3e:5a:aa:89:83:57:ac:25:
+                    01:76:0c:ad:ae:8e:2c:37:ce:eb:35:78:64:54:03:
+                    e5:84:40:51:c9:bf:8f:08:e2:8a:82:08:d2:16:86:
+                    37:55:e9:b1:21:02:ad:76:68:81:9a:05:a2:4b:c9:
+                    4b:25:66:22:56:6c:88:07:8f:f7:81:59:6d:84:07:
+                    65:70:13:71:76:3e:9b:77:4c:e3:50:89:56:98:48:
+                    b9:1d:a7:29:1a:13:2e:4a:11:59:9c:1e:15:d5:49:
+                    54:2c:73:3a:69:82:b1:97:39:9c:6d:70:67:48:e5:
+                    dd:2d:d6:c8:1e:7b
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md2WithRSAEncryption
+        65:dd:7e:e1:b2:ec:b0:e2:3a:e0:ec:71:46:9a:19:11:b8:d3:
+        c7:a0:b4:03:40:26:02:3e:09:9c:e1:12:b3:d1:5a:f6:37:a5:
+        b7:61:03:b6:5b:16:69:3b:c6:44:08:0c:88:53:0c:6b:97:49:
+        c7:3e:35:dc:6c:b9:bb:aa:df:5c:bb:3a:2f:93:60:b6:a9:4b:
+        4d:f2:20:f7:cd:5f:7f:64:7b:8e:dc:00:5c:d7:fa:77:ca:39:
+        16:59:6f:0e:ea:d3:b5:83:7f:4d:4d:42:56:76:b4:c9:5f:04:
+        f8:38:f8:eb:d2:5f:75:5f:cd:7b:fc:e5:8e:80:7c:fc:50
diff --git a/samples/webserver/calcform1.html b/samples/webserver/calcform1.html
new file mode 100644
index 0000000..800d166
--- /dev/null
+++ b/samples/webserver/calcform1.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+

+<html>

+

+	<head>

+		<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">

+		<meta name="generator" content="Adobe GoLive 6">

+		<title>Simple Calculator Web Service Using HTTP POST multipart/form-data</title>

+	</head>

+

+	<body bgcolor="#ffffff">

+		<form action="form" method="post" name="Calc" enctype="multipart/form-data">

+		<!-- The first <input> form element must be a hidden type with

+		     the SOAP/XML request message as a value attribute that

+		     triggers the server's operation (f:form1 in this example).

+		     The other form values are passed as MIME attachments to

+		     the operation. The operation returns a SOAP/XML response

+		     message, unless its defined as a asynchronous one-way

+		     message. In that case, code can be added to return a

+		     custom (e.g. HTML) response.

+		-->

+			<input type="hidden" name="SOAP" value="<s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'><s:Body><f:form1 xmlns:f='urn:form'/></s:Body></s:Envelope>">

+			<input type="text" name="a" value="1" size="8" tabindex="1">

+			<select name="o" size="1" tabindex="4">

+				<option value="a">+</option>

+				<option value="s">-</option>

+				<option value="m">*</option>

+				<option value="d">/</option>

+			</select>

+			<input type="text" name="b" value="2" size="8" tabindex="3">=

+			<input type="submit" name="submit" tabindex="4">

+		</form>

+	</body>

+

+</html>

diff --git a/samples/webserver/calcform2.html b/samples/webserver/calcform2.html
new file mode 100644
index 0000000..78a9b4f
--- /dev/null
+++ b/samples/webserver/calcform2.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+

+<html>

+

+	<head>

+		<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">

+		<meta name="generator" content="Adobe GoLive 6">

+		<title>Simple Calculator Web Service Using HTTP POST multipart/form-data</title>

+	</head>

+

+	<body bgcolor="#ffffff">

+		<form action="form" method="post" name="Calc" enctype="multipart/form-data">

+		<!-- The first <input> form element must be a hidden type with

+		     the SOAP/XML request message as a value attribute that

+		     triggers the server's operation (f:form2 in this example).

+		     The other form values are passed as MIME attachments to

+		     the operation. The operation returns a SOAP/XML response

+		     message, unless its defined as a asynchronous one-way

+		     message. In that case, code can be added to return a

+		     custom (e.g. HTML) response.

+		-->

+			<input type="hidden" name="SOAP" value="<s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'><s:Body><f:form2 xmlns:f='urn:form'/></s:Body></s:Envelope>">

+			<input type="text" name="a" value="1" size="8" tabindex="1">

+			<select name="o" size="1" tabindex="4">

+				<option value="a">+</option>

+				<option value="s">-</option>

+				<option value="m">*</option>

+				<option value="d">/</option>

+			</select>

+			<input type="text" name="b" value="2" size="8" tabindex="3">=

+			<input type="submit" name="submit" tabindex="4">

+		</form>

+	</body>

+

+</html>

diff --git a/samples/webserver/calcget.html b/samples/webserver/calcget.html
new file mode 100644
index 0000000..d6cf568
--- /dev/null
+++ b/samples/webserver/calcget.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+

+<html>

+

+	<head>

+		<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">

+		<meta name="generator" content="Adobe GoLive 6">

+		<title>Simple Calculator Web Service Using HTTP GET</title>

+	</head>

+

+	<body bgcolor="#ffffff">

+		<form action="calc" method="get" name="Calc">

+			<input type="text" name="a" value="1" size="8" tabindex="1"><select name="o" size="1" tabindex="4">

+				<option value="a">+</option>

+				<option value="s">-</option>

+				<option value="m">*</option>

+				<option value="d">/</option>

+			</select><input type="text" name="b" value="2" size="8" tabindex="3">=<input type="submit" name="submit" tabindex="4">

+		</form>

+	</body>

+

+</html>

diff --git a/samples/webserver/calcpost.html b/samples/webserver/calcpost.html
new file mode 100644
index 0000000..664060a
--- /dev/null
+++ b/samples/webserver/calcpost.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

+

+<html>

+

+	<head>

+		<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">

+		<meta name="generator" content="Adobe GoLive 6">

+		<title>Simple Calculator Web Service Using HTTP POST</title>

+	</head>

+

+	<body bgcolor="#ffffff">

+		<form action="calc" method="post" name="Calc">

+			<input type="text" name="a" value="1" size="8" tabindex="1"><select name="o" size="1" tabindex="4">

+				<option value="a">+</option>

+				<option value="s">-</option>

+				<option value="m">*</option>

+				<option value="d">/</option>

+			</select><input type="text" name="b" value="2" size="8" tabindex="3">=<input type="submit" name="submit" tabindex="4">

+		</form>

+	</body>

+

+</html>

diff --git a/samples/webserver/checked.gif b/samples/webserver/checked.gif
new file mode 100644
index 0000000..6b76b9a
--- /dev/null
+++ b/samples/webserver/checked.gif
Binary files differ
diff --git a/samples/webserver/client.pem b/samples/webserver/client.pem
new file mode 100644
index 0000000..5a882a1
--- /dev/null
+++ b/samples/webserver/client.pem
@@ -0,0 +1,61 @@
+-----BEGIN CERTIFICATE-----
+MIIDsTCCAxqgAwIBAgIBBzANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMCVVMx
+CzAJBgNVBAgTAkZMMRQwEgYDVQQHEwtUYWxsYWhhc3NlZTEWMBQGA1UEChMNR2Vu
+aXZpYSwgSW5jLjELMAkGA1UECxMCSVQxFDASBgNVBAMTC2dlbml2aWEuY29tMSIw
+IAYJKoZIhvcNAQkBFhNjb250YWN0QGdlbml2aWEuY29tMB4XDTA1MTIyNDE5MzE1
+M1oXDTA4MTIyMzE5MzE1M1owgY0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJGTDEU
+MBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2aWEsIEluYy4xCzAJ
+BgNVBAsTAklUMRIwEAYDVQQDEwlsb2NhbGhvc3QxIjAgBgkqhkiG9w0BCQEWE2Nv
+bnRhY3RAZ2VuaXZpYS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKKx
+BOIjID++K6gninFhbBIKZMC6BuQTkgOrQ9BwFTpknGn+tjSr4OJdkdyvOTNCKoUW
+5Bw3trLuEFJDSAFQaNamVLMiuoV4FVoESgPrCI8UoZBP3KTFXlHLbvkJ8ALk8onj
+AOdBteHJd4FvG+DK/zuuHtmERHjiL3kfYAwmJe8TAgMBAAGjggEbMIIBFzAJBgNV
+HRMEAjAAMCwGCWCGSAGG+EIBDQQfFh1PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZp
+Y2F0ZTAdBgNVHQ4EFgQUqJ7pX1afyFP4JqRi+1X2V8B8KCowgbwGA1UdIwSBtDCB
+sYAU4MyIi0GgIUqkYRhnJ2GgyUmVd8qhgZWkgZIwgY8xCzAJBgNVBAYTAlVTMQsw
+CQYDVQQIEwJGTDEUMBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2
+aWEsIEluYy4xCzAJBgNVBAsTAklUMRQwEgYDVQQDEwtnZW5pdmlhLmNvbTEiMCAG
+CSqGSIb3DQEJARYTY29udGFjdEBnZW5pdmlhLmNvbYIBADANBgkqhkiG9w0BAQUF
+AAOBgQBfsCaQb+ALfjWGrH0hKEsfl6AuXktHzSv/N5D0UTE7PTx3OAvTeXLNTfXx
+CfkT0nfVtYOK2RZiyliRqCLkpJF159nbngMDO1GwXpuKnEv6fcNAg0PE9Jbfe4GO
+n1RIYJJ+h1uUt71XKFswzg4nwmB8lkuZ9ikeDA7nDzagbqEXpg==
+-----END CERTIFICATE-----
+-----BEGIN RSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: DES-EDE3-CBC,A2AEEBCAB1BAB8A7
+
+qi2X7VaZEZZV5YdBICTEwV0Rt6n6KOQMZRdArLGNxuufLTPn0rz6JcuR+of9rxIz
+kTK/6SGsUZnMH5o4luabeEOe7DtcAuuDT00lBRXcTxIRvAyiwtRDMkTUuGbNEMDs
+/6FWz1tWEDbsYrYtz0f7Sly6hk6khPVjiEtUmKznGiX31LBZQFJ090MTOroDmAYF
+XMNFAveXiLD78HV7+wNhBhYeVwmkPFWKu3jpEZ09+mDdmQ0yOI2Z2ejiiObilqco
+nvp7tt8gzQayB48BOMyMMfp16U+MPtWsfHT/ZggAvt99s+wuasaazPbFUMuumhQu
+Olo5yWBTUEqhuYzYzlRRYbb3mAu1AVJ64X0kO/Xt1/E46F+flII5aFMQSq2aihtJ
+us2PCXZ2RMlWylMgdczcrEwzkaSzKlBSX/MW4csNEcoFpNXoekYHmzDUHQhvPihP
+3akmS1dZ/cY5hS1IcIb+YX6KPMvhGPr2UHnohQFS1X6k9ibHli8p0wBgMA5+c4i7
+div2HTIFvXCm0skbZO534V11Ctix75z0ZmIwcbn++Ytn2KSWyz0N7DNlG2qaXKsd
+VVDHokDSPSirwkAubpQHLhlOMby04pPBVEd/DZKveOt0stWDroxkUcGvb5AL/cDB
+2P/h60JAeDGQYv0Z8eOkA1ZVXyrmpPQPAcdhFna0wMb+JbmMrnDrtEEKxX1LefzB
+m6INmEj5FvvYM8JFMvMAsdr8sdkLpfDlfQS48QuLXXDPySAbW6IiZleiuI3hkX5f
+RHEeEC85WZVoll9/+knBW6lnufhoFUV7ST7XNnS1PeHgZzRBiPJGMw==
+-----END RSA PRIVATE KEY-----
+-----BEGIN CERTIFICATE-----
+MIIDhjCCAu+gAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMCVVMx
+CzAJBgNVBAgTAkZMMRQwEgYDVQQHEwtUYWxsYWhhc3NlZTEWMBQGA1UEChMNR2Vu
+aXZpYSwgSW5jLjELMAkGA1UECxMCSVQxFDASBgNVBAMTC2dlbml2aWEuY29tMSIw
+IAYJKoZIhvcNAQkBFhNjb250YWN0QGdlbml2aWEuY29tMB4XDTA0MTAwMjE3MDgw
+NloXDTA3MTAwMjE3MDgwNlowgY8xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJGTDEU
+MBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2aWEsIEluYy4xCzAJ
+BgNVBAsTAklUMRQwEgYDVQQDEwtnZW5pdmlhLmNvbTEiMCAGCSqGSIb3DQEJARYT
+Y29udGFjdEBnZW5pdmlhLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
+l6K9bLMcrJ6Bz+8hxyolSJy5TdZKo8OmmskP+NAJct7aGWa33u2lkZ+GkoUmLKZ/
+rDNpgmYVNQlOQC4rt5oDt4AUoj584G8PJKSPwymJcX0sbfB7k8xRmLO+vVgSUvDu
+asLMWJ6PsYIuGhp4BwOAgnYACTzsd6kSeIsed8XSx7cCAwEAAaOB7zCB7DAdBgNV
+HQ4EFgQU4MyIi0GgIUqkYRhnJ2GgyUmVd8owgbwGA1UdIwSBtDCBsYAU4MyIi0Gg
+IUqkYRhnJ2GgyUmVd8qhgZWkgZIwgY8xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJG
+TDEUMBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2aWEsIEluYy4x
+CzAJBgNVBAsTAklUMRQwEgYDVQQDEwtnZW5pdmlhLmNvbTEiMCAGCSqGSIb3DQEJ
+ARYTY29udGFjdEBnZW5pdmlhLmNvbYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3
+DQEBBQUAA4GBAFmb9kV+EDx5O4j7dLMu909nFgnBL06sepjqtBIIbZY3GnCgefxK
+p1S6If01/mdV79nZGJldegM77tz4VIlzuIaz+2NO+Gqbr6ErOR+3UGOrRuH39aMT
+1DvwHYpU5GU+lG1aWHdQp8uZ5y4okMg3Z9IZ5nijkUnpCHQO+q/8FrML
+-----END CERTIFICATE-----
diff --git a/samples/webserver/deselected.gif b/samples/webserver/deselected.gif
new file mode 100644
index 0000000..c16ba58
--- /dev/null
+++ b/samples/webserver/deselected.gif
Binary files differ
diff --git a/samples/webserver/dh512.pem b/samples/webserver/dh512.pem
new file mode 100644
index 0000000..8a70880
--- /dev/null
+++ b/samples/webserver/dh512.pem
@@ -0,0 +1,4 @@
+-----BEGIN DH PARAMETERS-----
+MEYCQQDYbhGNVV6GoxOPsX+rBNGmgfJqh7+e1PFj8IketLqWtA2gkXAB9PKxrkDQ
+jvuEoXE4A6PVPfstmP/Ef4uNfCqLAgEC
+-----END DH PARAMETERS-----
diff --git a/samples/webserver/favicon.gif b/samples/webserver/favicon.gif
new file mode 100644
index 0000000..5a60fbd
--- /dev/null
+++ b/samples/webserver/favicon.gif
Binary files differ
diff --git a/samples/webserver/favicon.ico b/samples/webserver/favicon.ico
new file mode 100644
index 0000000..800fc38
--- /dev/null
+++ b/samples/webserver/favicon.ico
Binary files differ
diff --git a/samples/webserver/ibls.gif b/samples/webserver/ibls.gif
new file mode 100644
index 0000000..f8753d3
--- /dev/null
+++ b/samples/webserver/ibls.gif
Binary files differ
diff --git a/samples/webserver/ibrs.gif b/samples/webserver/ibrs.gif
new file mode 100644
index 0000000..5f97fef
--- /dev/null
+++ b/samples/webserver/ibrs.gif
Binary files differ
diff --git a/samples/webserver/itls.gif b/samples/webserver/itls.gif
new file mode 100644
index 0000000..46fb546
--- /dev/null
+++ b/samples/webserver/itls.gif
Binary files differ
diff --git a/samples/webserver/itrs.gif b/samples/webserver/itrs.gif
new file mode 100644
index 0000000..4643c91
--- /dev/null
+++ b/samples/webserver/itrs.gif
Binary files differ
diff --git a/samples/webserver/ls.gif b/samples/webserver/ls.gif
new file mode 100644
index 0000000..05f006e
--- /dev/null
+++ b/samples/webserver/ls.gif
Binary files differ
diff --git a/samples/webserver/obls.gif b/samples/webserver/obls.gif
new file mode 100644
index 0000000..de09ea4
--- /dev/null
+++ b/samples/webserver/obls.gif
Binary files differ
diff --git a/samples/webserver/obrs.gif b/samples/webserver/obrs.gif
new file mode 100644
index 0000000..38c3fdf
--- /dev/null
+++ b/samples/webserver/obrs.gif
Binary files differ
diff --git a/samples/webserver/opt.h b/samples/webserver/opt.h
new file mode 100644
index 0000000..a0e158c
--- /dev/null
+++ b/samples/webserver/opt.h
@@ -0,0 +1,41 @@
+/*
+
+opt.h
+
+To generate serializers for options.c.
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+*/
+
+#module "opt"
+
+struct t__Option
+{ char *key;
+  char *val;
+};
diff --git a/samples/webserver/options.c b/samples/webserver/options.c
new file mode 100644
index 0000000..5953713
--- /dev/null
+++ b/samples/webserver/options.c
@@ -0,0 +1,444 @@
+/*
+
+options.c
+
+Parses command line options and provides options control panel with an
+interactive Web interface for the Web server (webserver.c).
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+*/
+
+#define SOAP_NOGLOBAL
+#define SOAP_FMAC3 static
+#include "optC.c"
+#include "options.h"
+#include "httpget.h"
+
+#ifdef WIN32
+#define OPTION_CHAR '/'
+#else
+#define OPTION_CHAR '-'
+#endif
+
+struct option *copy_options(const struct option *options);
+int parse_options(int argc, char **argv, struct option *options);
+void query_options(struct soap *soap, struct option *options);
+int load_options(const char *file, const char *name, struct option *options);
+int save_options(const char *file, const char *name, struct option *options);
+int html_options(struct soap *soap, struct option *options);
+int html_form_options(struct soap *soap, struct option *options);
+static int set_option(const char *key, const char *val, struct option *options);
+static int set_selection(const char *val, struct option *p);
+static int find_selection(const char *value, const char *selections);
+static void print_usage(int argc, char **argv, struct option *options);
+
+struct option *copy_options(const struct option *options)
+{ struct option *p;
+  int n;
+  for (n = 0; options[n].name; n++)
+    ;
+  p = (struct option*)malloc((n + 1) * sizeof(struct option));
+  if (p)
+  { for (n = 0; options[n].name; n++)
+    { p[n].name = options[n].name;
+      p[n].selections = options[n].selections;
+      p[n].selected = options[n].selected;
+      if (options[n].value)
+      { p[n].value = (char*)malloc(strlen(options[n].value) + 1);
+        strcpy(p[n].value, options[n].value);
+      }
+      else
+        p[n].value = NULL;
+    }
+    p[n].name = NULL;
+    p[n].selections = NULL;
+    p[n].selected = 0;
+    p[n].value = NULL;
+  }
+  return p;
+}
+
+void free_options(struct option *options)
+{ if (options)
+  { struct option *p;
+    for (p = options; p->name; p++ )
+    { if (p->value)
+        free(p->value);
+    }
+    free(options);
+  }
+}
+
+int parse_options(int argc, char **argv, struct option *options)
+{ int i;
+  for (i = 1; i < argc; i++)
+  { const char *key, *val;
+    key = argv[i];
+    if (*key == OPTION_CHAR)
+    { int flag = 1;
+      while (flag && *++key)
+      { if (*key == '?' || !strcmp(key, "help"))
+        { print_usage(argc, argv, options);
+	  return 1;
+        }
+	if (i < argc)
+	  val = argv[i + 1];
+	else
+	  val = NULL;
+	switch (set_option(key, val, options))
+	{ case 2:
+	    i++;
+	  case 1:
+	    flag = 0;
+	  case 0:
+	    break;
+	  case -1:
+            fprintf(stderr, "%s: missing argument value for option %c%s\n", argv[0], OPTION_CHAR, key);
+	    print_usage(argc, argv, options);
+	    return 1;
+	  case -2:
+            fprintf(stderr, "%s: unknown option %c%s\n", argv[0], OPTION_CHAR, key);
+	    print_usage(argc, argv, options);
+	    return 1;
+	}
+      }
+    }
+    else if (set_option(NULL, key, options) < 0)
+      fprintf(stderr, "%s: invalid argument %s\n", argv[0], key);
+  }
+  return 0;
+}
+
+void query_options(struct soap *soap, struct option *options)
+{ char *s = query(soap); /* get arguments from query string */
+  while (s)
+  { char *key = query_key(soap, &s); /* decode next query string key */
+    char *val = query_val(soap, &s); /* decode next query string value */
+    if (key)
+      set_option(key, val, options);
+  }
+}
+
+int load_options(const char *file, const char *name, struct option *options)
+{ struct soap soap;
+  soap_init(&soap);
+  if (file)
+  { soap.recvfd = open(file, O_RDONLY);
+    if (soap.recvfd < 0)
+    { soap_done(&soap);
+      return EOF;
+    }
+  }
+  if (!soap_begin_recv(&soap) && !soap_element_begin_in(&soap, name, 1))
+  { struct t__Option t;
+    while (soap_in_t__Option(&soap, "option", &t, NULL))
+      if (set_option(t.key, t.val, options) < 0)
+        ; /* error, just ignore for now */
+    if (!soap_element_end_in(&soap, name))
+      soap_end_recv(&soap);
+  }
+  if (file)
+    close(soap.recvfd);
+  soap_end(&soap);
+  soap_done(&soap);
+  return soap.error;
+}
+
+int save_options(const char *file, const char *name, struct option *options)
+{ struct soap soap;
+  soap_init1(&soap, SOAP_XML_TREE);
+  soap.namespaces = NULL;
+  soap.encodingStyle = NULL;
+  if (file)
+  { soap.sendfd = open(file, O_CREAT | O_WRONLY);
+    if (soap.sendfd < 0)
+    { soap_done(&soap);
+      return EOF;
+    }
+  }
+  if (!soap_begin_send(&soap) && !soap_element_begin_out(&soap, name, 0, NULL))
+  { struct option *p;
+    struct t__Option t;
+    for (p = options; p->name; p++)
+    { t.val = NULL;
+      if (!p->name[0])
+      { if (!p->value)
+          continue;
+	t.key = NULL;
+	t.val = p->value;
+      }
+      else if (p->name[1] == '.')
+        t.key = (char*)p->name + 2;
+      else
+        t.key = (char*)p->name;
+      if (p->selections && strchr(p->selections, ' '))
+      { const char *s = p->selections - 1;
+        char *r;
+	int i;
+        for (i = p->selected; i > 0; i--)
+        { s = strchr(s + 1, ' ');
+	  if (!s)
+	    break;
+	}
+        if (s)
+	{ t.val = soap_strdup(&soap, s + 1);
+          r = strchr(t.val, ' ');
+	  if (r)
+	    *r = '\0';
+        }
+      }
+      else if (p->value)
+        t.val = p->value;
+      else if (!p->selected)
+        continue;
+      if (soap_out_t__Option(&soap, "option", 0, &t, NULL))
+        break;
+    }
+    if (!soap_element_end_out(&soap, name))
+      soap_end_send(&soap);
+  }
+  if (file)
+    close(soap.sendfd);
+  soap_end(&soap);
+  soap_done(&soap);
+  return soap.error;
+}
+
+int html_options(struct soap *soap, struct option *options)
+{ struct option *p;
+  soap_send(soap, "<table border='0' cellspacing='0' cellpadding='0' bgcolor='#666666' nosave>\n");
+  soap_send(soap, "<tr height='10'><td background='btl.gif'></td><td background='bt.gif'></td><td background='bt.gif'></td><td background='bt.gif'></td><td background='bt.gif'></td><td background='bt.gif'></td><td width='10' background='btr.gif'></td><td width='10' height='10' background='obls.gif'></td></tr>");
+  for (p = options; p->name; p++)
+  { const char *s, *t, *n;
+    int i;
+    n = p->name;
+    if (n[0] && n[1] == '.')
+      n += 2;
+    s = p->selections;
+    soap_send(soap, "<tr><td background='bl.gif'></td><td align='right'>");
+    if (!n[0])
+    { if (s)
+        soap_send(soap, s);
+      soap_send(soap, "</td><td></td><td></td><td></td><td>");
+      if (p->value)
+        soap_send(soap, p->value);
+      soap_send(soap, "</td>");
+    }
+    else if (!s)
+    { soap_send(soap, n);
+      soap_send(soap, "</td><td width='10' background='ls.gif'></td><td bgcolor='#FFFFFF'><a href='?");
+      soap_send(soap, n);
+      if (p->selected)
+        soap_send(soap, "='><img src='checked.gif' align='absmiddle' border='0'></a></td><td width='10' background='rs.gif'></td><td>on</td>");
+      else
+        soap_send(soap, "'><img src='unchecked.gif' align='absmiddle' border='0'></a></td><td width='10' background='rs.gif'></td><td>off</td>");
+    }
+    else if (strchr(s, ' '))
+    { soap_send(soap, n);
+      soap_send(soap, "</td>");
+      for (i = 0; ; i++)
+      { t = strchr(s, ' ');
+        if (i == 0)
+	  soap_send(soap, "<td width='10' background='ls.gif'></td><td bgcolor='#FFFFFF'>");
+        else
+	  soap_send(soap, "<tr><td background='bl.gif'></td><td></td><td width='10' background='ls.gif'></td><td bgcolor='#FFFFFF'>");
+        if (i == p->selected)
+          soap_send(soap, "<img src='selected.gif' align='absmiddle' border='0'></td><td width='10' background='rs.gif'></td><td>");
+        else
+        { soap_send(soap, "<a href='?");
+          soap_send(soap, n);
+          soap_send(soap, "=");
+          if (t)
+            soap_send_raw(soap, s, t - s);
+          else
+            soap_send(soap, s);
+          soap_send(soap, "'>");
+          soap_send(soap, "<img src='deselected.gif' align='absmiddle' border='0'></a></td><td width='10' background='rs.gif'></td><td>");
+	}
+        if (t)
+          soap_send_raw(soap, s, t - s);
+        else
+          soap_send(soap, s);
+        soap_send(soap, "</td>");
+        if (!t)
+          break;
+        soap_send(soap, "<td width='10' background='br.gif'></td><td width='10' background='ls.gif'></td></tr>\n");
+        s = t + 1;
+      }
+    }
+    else
+    { char buf[16];
+      soap_send(soap, n);
+      soap_send(soap, "</td><td width='10' background='ls.gif'></td><td bgcolor='#FFFFFF'>&nbsp;</td><td width='10' background='rs.gif'></td><td><input type='text' name='");
+      soap_send(soap, n);
+      soap_send(soap, "' value='");
+      if (p->value)
+        soap_send(soap, p->value);
+      soap_send(soap, "' size='");
+      sprintf(buf, "%d", p->selected > 0 ? p->selected : 24);
+      soap_send(soap, buf);
+      soap_send(soap, "'><input type='submit' value='Set ");
+      soap_send(soap, s);
+      soap_send(soap, "'></td>");
+    }
+    soap_send(soap, "<td width='10' background='br.gif'></td><td width='10' background='ls.gif'></td></tr>\n");
+    // <tr height='1'><td height='1' background='bl.gif'></td><td></td><td></td><td></td><td></td><td width='10' height='1' background='br.gif'></td><td width='10' height='1' background='ls.gif'></td></tr>\n");
+  }
+  soap_send(soap, "<tr height='10'><td background='bbl.gif'></td><td background='bb.gif'></td><td background='bb.gif'></td><td background='bb.gif'></td><td background='bb.gif'></td><td background='bb.gif'></td><td width='10' background='bbr.gif'><td width='10' height='10' background='ls.gif'</td></tr>\n<tr height='10'><td width='10' height='10' background=otrs.gif></td><td height='10' background='ts.gif'></td><td height='10' background='ts.gif'></td><td height='10' background='ts.gif'></td><td height='10' background='ts.gif'></td><td height='10' background='ts.gif'></td><td height='10' background='ts.gif'></td><td width='10' height='10' background='otls.gif'></td></tr>\n</table>\n");
+  return SOAP_OK;
+}
+
+int html_form_options(struct soap *soap, struct option *options)
+{ soap_send(soap, "<form action='' method='get' name='form'>");
+  html_options(soap, options);
+  return soap_send(soap, "</form>");
+}
+
+static int set_option(const char *key, const char *val, struct option *options)
+{ struct option *p;
+  if (!key)
+  { for (p = options; p->name; p++)
+    { if (!p->name[0])
+      { if (p->value)
+        { char *s = (char*)malloc(strlen(p->value) + strlen(val) + 1);
+	  if (s)
+	  { strcpy(s, p->value);
+	    strcat(s, " ");
+	    strcat(s, val);
+	    free((void*)p->value);
+	    p->value = s;
+          }
+        }
+        else
+        { p->value = (char*)malloc(strlen(val) + 1);
+          if (p->value)
+            strcpy(p->value, val);
+        }
+        return 2;
+      }
+    }
+    return -2;
+  }
+  for (p = options; p->name; p++)
+  { if (p->name[0] && ((p->name[1] == '.' && !strcmp(key, p->name + 2)) || (p->name[1] != '.' && !strcmp(key, p->name))))
+    { if (p->selections)
+      { if (!val)
+          return -1;
+        if (set_selection(val, p) < 0)
+          return -1;
+        return 2;
+      }
+      if (val && !*val)
+      { p->selected = 0;
+        return 2;
+      }
+      p->selected = 1;
+      return 1;
+    }
+  }
+  for (p = options; p->name; p++)
+  { if (p->name[0] == key[0] && p->name[1] == '.')
+    { if (p->selections)
+      { const char *s = key + 1;
+        if (!s[0])
+        { s = val;
+          if (!s)
+            return -1;
+        }
+        if (set_selection(s, p) < 0)
+          return -1;
+        if (s == val)
+          return 2;
+        return 1;
+      }
+      p->selected = 1;
+      return 0;
+    }
+  }
+  return -2;
+}
+
+static int set_selection(const char *val, struct option *p)
+{ if (strchr(p->selections, ' '))
+    return p->selected = find_selection(val, p->selections);
+  if (p->value)
+    free(p->value);
+  p->value = (char*)malloc(strlen(val) + 1);
+  if (p->value)
+    strcpy(p->value, val);
+  return 0;
+}
+
+static int find_selection(const char *val, const char *selections)
+{ int i = 0;
+  const char *s = selections;
+  size_t n = strlen(val);
+  for (;;)
+  { if (!strncmp(s, val, n) && (s[n] == ' ' || s[n] == '\0'))
+      return i;
+    s = strchr(s, ' ');
+    if (!s)
+      break;
+    s++;
+    i++;
+  }
+  return -1;
+}
+
+static void print_usage(int argc, char **argv, struct option *options)
+{ struct option *p;
+  fprintf(stderr, "Usage: %s", argv[0]);
+  for (p = options; p->name; p++)
+  { if (p->name[0])
+    { int flag = (p->name[1] == '.');
+      if (p->selections)
+      { if (strchr(p->selections, ' '))
+        { if (flag)
+	    fprintf(stderr, " %c%c[%s]", OPTION_CHAR, p->name[0], p->selections);
+          else
+	    fprintf(stderr, " %c%s [%s]", OPTION_CHAR, p->name, p->selections);
+        }
+        else if (flag)
+          fprintf(stderr, " %c%c<%s>", OPTION_CHAR, p->name[0], p->selections);
+        else
+          fprintf(stderr, " %c%s <%s>", OPTION_CHAR, p->name, p->selections);
+      }
+      else if (flag)
+        fprintf(stderr, " %c%c", OPTION_CHAR, p->name[0]);
+      else
+        fprintf(stderr, " %c%s", OPTION_CHAR, p->name);
+    }
+    else if (p->selections)
+      fprintf(stderr, " %s", p->selections);
+    else
+      fprintf(stderr, " ...");
+  }
+  fprintf(stderr, "\n");
+}
+
diff --git a/samples/webserver/options.h b/samples/webserver/options.h
new file mode 100644
index 0000000..c3ea7c5
--- /dev/null
+++ b/samples/webserver/options.h
@@ -0,0 +1,124 @@
+/*
+
+options.h
+
+Command line option handler for webserver.
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+	The option structure defines a program option as follows:
+	name		the name of the option, which may include a period to
+			define a one-character name for command-line options
+			(single character followed by a period and the full
+			name). The last option in an array MUST be NULL.
+			When the name is empty (""), then this option is used to
+			collect remaining command-line arguments, such as file
+			names and so on.
+	selections:	either must be NULL to define a boolean option. In this
+				case selected=0 is false and selected=1 is true.
+			or a space-delimited string of option values. In this
+				case 'selected' is set to # word in list.
+			or a single-word description for option values. In this
+				case the argument is stored in 'value' field.
+	selected:	word index in 'selections' list, or 0/1 for boolean
+			option, or max length of string value a user can enter
+			(see below).
+	value:		the (default) string value of option
+
+	Example:
+
+	static struct option options[] =
+	{ { "c.compress", NULL },	on/off option (-c turns it on)
+  	  { "e.endpoint", "URL" }, 	this option requires an argument value
+  	  { "name", "alphanum", 20, "demo" },
+	  				this option requires an argument value.
+					The default value will be "demo".
+					The HTML slot will be 20 chars wide.
+  	  { "action", "start finish" }, this option requires an argument "start"
+	  				or "finish"
+  	  { "", "file1 file2 ..." },	collect remaining arguments
+  	  { NULL },			end of table
+	};
+
+	Functionality:
+
+	int parse_options(int argc, char **argv, struct option *options)
+	Parses options from the command line (argc, argv). When the command
+	line options include the '-?' and '-help', a diagnostic 'Usage:'
+	message is produced and the function returns 1 instead of a normal 0
+	return value.
+
+	void query_options(struct soap *soap, struct option *options)
+	Parses options from the HTTP query string. This requires linking the
+	httpget plugin. The function is normally called in the HTTP GET handler.
+	
+	int save_options(const char *file, const char *name, struct option *options)
+	Saves an array of options to a file. The last option in the 'options'
+	array MUST have a NULL name to delimit the array. Options are saved
+	in XML format.
+
+	int load_options(const char *file, const char *name, struct option *options)
+	Parses options from a file saved with save_options(). The last option
+	in the 'options' array MUST have a NULL name to delimit the array.
+
+	int html_options(struct soap *soap, struct option *options)
+	Produces an HTML table with options and form submit buttons to
+	interactively change options through a Web page. The table is output
+	via soap_send() which uses the current soap.socket or soap.sendfd
+	descriptors. The table should be produced within a form, see also
+	html_form_options().
+	The HTML table uses the following picture files:
+		checked.gif		check box (checked)
+		unchecked.gif		check box (unchecked)
+		selected.gif		radio button (selected)
+		deselected.gif		radio button (deselected)
+
+	int html_form_options(struct soap *soap, struct option *options)
+	Produces an HTML form with action='' and method='get' (to send the
+	request back to the current service. An HTML option table is produced
+	within the form.
+*/
+
+struct option
+{ const char *name;		/* name */
+  const char *selections;	/* NULL (option does not require argument),
+  				   or one-word description,
+				   or selection of possible values (separated by spaces) */
+  int selected;			/* >=0: current selection in selections list */
+  char *value;			/* parsed value (when 'selections' is one name) */
+};
+
+extern struct option *copy_options(const struct option *options);
+extern void free_options(struct option *options);
+extern int parse_options(int argc, char **argv, struct option *options);
+extern void query_options(struct soap *soap, struct option *options);
+extern int save_options(const char *file, const char *name, struct option *options);
+extern int load_options(const char *file, const char *name, struct option *options);
+extern int html_options(struct soap *soap, struct option *options);
+extern int html_form_options(struct soap *soap, struct option *options);
+
diff --git a/samples/webserver/otls.gif b/samples/webserver/otls.gif
new file mode 100644
index 0000000..f82cd70
--- /dev/null
+++ b/samples/webserver/otls.gif
Binary files differ
diff --git a/samples/webserver/otrs.gif b/samples/webserver/otrs.gif
new file mode 100644
index 0000000..43f1b8d
--- /dev/null
+++ b/samples/webserver/otrs.gif
Binary files differ
diff --git a/samples/webserver/rs.gif b/samples/webserver/rs.gif
new file mode 100644
index 0000000..e16c28d
--- /dev/null
+++ b/samples/webserver/rs.gif
Binary files differ
diff --git a/samples/webserver/ruler.gif b/samples/webserver/ruler.gif
new file mode 100644
index 0000000..8e67f8b
--- /dev/null
+++ b/samples/webserver/ruler.gif
Binary files differ
diff --git a/samples/webserver/selected.gif b/samples/webserver/selected.gif
new file mode 100644
index 0000000..e5ba1bf
--- /dev/null
+++ b/samples/webserver/selected.gif
Binary files differ
diff --git a/samples/webserver/server.pem b/samples/webserver/server.pem
new file mode 100644
index 0000000..b5ef00f
--- /dev/null
+++ b/samples/webserver/server.pem
@@ -0,0 +1,61 @@
+-----BEGIN CERTIFICATE-----
+MIIDsTCCAxqgAwIBAgIBCDANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMCVVMx
+CzAJBgNVBAgTAkZMMRQwEgYDVQQHEwtUYWxsYWhhc3NlZTEWMBQGA1UEChMNR2Vu
+aXZpYSwgSW5jLjELMAkGA1UECxMCSVQxFDASBgNVBAMTC2dlbml2aWEuY29tMSIw
+IAYJKoZIhvcNAQkBFhNjb250YWN0QGdlbml2aWEuY29tMB4XDTA1MTIyNDE5MzMx
+M1oXDTA4MTIyMzE5MzMxM1owgY0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJGTDEU
+MBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2aWEsIEluYy4xCzAJ
+BgNVBAsTAklUMRIwEAYDVQQDEwlsb2NhbGhvc3QxIjAgBgkqhkiG9w0BCQEWE2Nv
+bnRhY3RAZ2VuaXZpYS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM5R
+ShAu0f3F267b+Xhu4Hl3Pe5zTiUlkK95+v7Fg6DE5qX1O4DCWCrgvaVU7jgyJp57
+UM3n4YvERHy2vwlpOlieo91VMVGn4NCD/hv1+2KGtFTiJ2bcNLbMxeP6V9zAFbmm
+UAnRMemUr4RPREK03IKIF1g5+UAgwBmj3p/JwZb3AgMBAAGjggEbMIIBFzAJBgNV
+HRMEAjAAMCwGCWCGSAGG+EIBDQQfFh1PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZp
+Y2F0ZTAdBgNVHQ4EFgQUPcHItRkXw4wSZDwFwyLue7ontMEwgbwGA1UdIwSBtDCB
+sYAU4MyIi0GgIUqkYRhnJ2GgyUmVd8qhgZWkgZIwgY8xCzAJBgNVBAYTAlVTMQsw
+CQYDVQQIEwJGTDEUMBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2
+aWEsIEluYy4xCzAJBgNVBAsTAklUMRQwEgYDVQQDEwtnZW5pdmlhLmNvbTEiMCAG
+CSqGSIb3DQEJARYTY29udGFjdEBnZW5pdmlhLmNvbYIBADANBgkqhkiG9w0BAQUF
+AAOBgQBu0A7sheqpcWBdyxM6DMLGoZIVFCq7hiodaLFLQcAL+zXHD25RmbMllU9Y
+GD1z8gYYY0Ahp0Qdq0bb3WwgfSMjCISSzgSTELPLhGf9P1OBUSVg7tECiQZY5uC0
+wiDY6ISKTo1ZYmczTJW9o/dodl662YQ/gMgeSTpZ0LR0ni3N9g==
+-----END CERTIFICATE-----
+-----BEGIN RSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: DES-EDE3-CBC,F120AF3AE8B2A1F9
+
+3NxVM2+vqMh88SbEjRXWR1anwXE60x4VXB0SEkNmzv3bOSYGpeIY7sEb4m93LLjj
+mkvMBOSJYWzuUxWHePcdIKokDRkCwDjm6UR9Hsf82E0IMBiwPspynP396DZaXEDY
+okqlGBmFX5z6FujG9gNl58Zm09FRl8zmriJtoSu4esasRaez/KaklugrMiMHwVVZ
+PWL4fZxmoxf/gRWjwYG/uYfnMrX2YtIZrOzWn5bJ+EFzs/8IfkMhR5emPCD67oMn
+Q1F6AZgmC9J2QQ0B+evmUbJJLGkM0KITp3r6kfxwupFYgiq3Pxyj6T4hbGXhl3Ts
+y2k2BFlR7O5ijJOSBc6VvKh84KgPMeRGC04p35dzCOv9jvBVJXmj8vb3I/Ux1GjY
+tqmiSekcsjXnFzjQ3Vz39e9Ix0EuHmd6IBZKEBEVixy6l9YK+tk6Xd/2ofh5Gb8h
+qcCb87b+ujvkTfitVp3zxnlkOW1SO3Pnv3HJE4PcCIZJfHdgFxCioPMomYk5/ZYZ
+kXHLeFMqYHRUgYx0EQn/Z6tub36EO4u7B1rWl42HhKkar7VdmIWl3ve6cGKva/6l
+cX5WSFk8/6WtmPcWt8ztE8m+5Y0EjELcf9NZxC+1wLOD0TnhfhdkISIBhl4Ocw1s
+BJ1QonCb1XIUd0e3D6EF5ozcEmhlbcOih63NwAeD3oEFyAvf6Ri9+ranY5y9mT6M
+Mlr2C+hE5fIkvCJhhEfEmeJuv4CCJlUWJ+mVPNgxCyeXp7P7G5k1kiVqLYQFmQeJ
+pklLSHXATZ53iiXVViUCpGz1iUdVJtdf+iUtuT0MIAWUeUjyybsHHA==
+-----END RSA PRIVATE KEY-----
+-----BEGIN CERTIFICATE-----
+MIIDhjCCAu+gAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMCVVMx
+CzAJBgNVBAgTAkZMMRQwEgYDVQQHEwtUYWxsYWhhc3NlZTEWMBQGA1UEChMNR2Vu
+aXZpYSwgSW5jLjELMAkGA1UECxMCSVQxFDASBgNVBAMTC2dlbml2aWEuY29tMSIw
+IAYJKoZIhvcNAQkBFhNjb250YWN0QGdlbml2aWEuY29tMB4XDTA0MTAwMjE3MDgw
+NloXDTA3MTAwMjE3MDgwNlowgY8xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJGTDEU
+MBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2aWEsIEluYy4xCzAJ
+BgNVBAsTAklUMRQwEgYDVQQDEwtnZW5pdmlhLmNvbTEiMCAGCSqGSIb3DQEJARYT
+Y29udGFjdEBnZW5pdmlhLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
+l6K9bLMcrJ6Bz+8hxyolSJy5TdZKo8OmmskP+NAJct7aGWa33u2lkZ+GkoUmLKZ/
+rDNpgmYVNQlOQC4rt5oDt4AUoj584G8PJKSPwymJcX0sbfB7k8xRmLO+vVgSUvDu
+asLMWJ6PsYIuGhp4BwOAgnYACTzsd6kSeIsed8XSx7cCAwEAAaOB7zCB7DAdBgNV
+HQ4EFgQU4MyIi0GgIUqkYRhnJ2GgyUmVd8owgbwGA1UdIwSBtDCBsYAU4MyIi0Gg
+IUqkYRhnJ2GgyUmVd8qhgZWkgZIwgY8xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJG
+TDEUMBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2aWEsIEluYy4x
+CzAJBgNVBAsTAklUMRQwEgYDVQQDEwtnZW5pdmlhLmNvbTEiMCAGCSqGSIb3DQEJ
+ARYTY29udGFjdEBnZW5pdmlhLmNvbYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3
+DQEBBQUAA4GBAFmb9kV+EDx5O4j7dLMu909nFgnBL06sepjqtBIIbZY3GnCgefxK
+p1S6If01/mdV79nZGJldegM77tz4VIlzuIaz+2NO+Gqbr6ErOR+3UGOrRuH39aMT
+1DvwHYpU5GU+lG1aWHdQp8uZ5y4okMg3Z9IZ5nijkUnpCHQO+q/8FrML
+-----END CERTIFICATE-----
diff --git a/samples/webserver/test.html b/samples/webserver/test.html
new file mode 100644
index 0000000..91cd115
--- /dev/null
+++ b/samples/webserver/test.html
@@ -0,0 +1,24 @@
+<HTML>

+<BODY>

+<H1>Test Page</H1>

+Text test.

+<p>

+<img src="favicon.gif"> Image test.

+<p>

+<a href="calcget.html">HTTP GET form test</a> (HTML response).

+<p>

+<a href="calcpost.html">HTTP POST form test</a> (HTML response).

+<p>

+<a href="calcform1.html">HTTP POST multipart/form-data test</a> (HTML response).

+<p>

+<a href="calcform2.html">HTTP POST multipart/form-data test</a> (XML response).

+<br>

+<br>

+Powered by gSOAP.

+<br>

+<br>

+<br>

+<br>

+Copyright (c) 2005 Robert van Engelen, Florida State University and <a href="genivia">Genivia Inc.</a>

+</BODY>

+</HTML>

diff --git a/samples/webserver/top.gif b/samples/webserver/top.gif
new file mode 100644
index 0000000..44deb99
--- /dev/null
+++ b/samples/webserver/top.gif
Binary files differ
diff --git a/samples/webserver/ts.gif b/samples/webserver/ts.gif
new file mode 100644
index 0000000..3479237
--- /dev/null
+++ b/samples/webserver/ts.gif
Binary files differ
diff --git a/samples/webserver/unchecked.gif b/samples/webserver/unchecked.gif
new file mode 100644
index 0000000..48736f0
--- /dev/null
+++ b/samples/webserver/unchecked.gif
Binary files differ
diff --git a/samples/webserver/webserver.c b/samples/webserver/webserver.c
new file mode 100644
index 0000000..17351ae
--- /dev/null
+++ b/samples/webserver/webserver.c
@@ -0,0 +1,1326 @@
+/*
+
+webserver.c
+
+Example stand-alone gSOAP Web server based on the gSOAP HTTP GET plugin.
+This is a small but fully functional (embedded) Web server for serving
+static and dynamic pages and SOAP/XML responses.
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+	The Web server handles HTTP GET requests to serve pages and HTTP POST
+	reguests to handle SOAP/XML messages. This example only implements
+	a simple calculator XML Web service for demonstration purposes (the
+	service responds with SOAP/XML).
+
+	This application requires Zlib and Pthreads (you can replace Pthreads
+	with another thread library, but you need to study the OpenSSL thread
+	changes in the OpenSSL documentation).
+
+	On Unix/Linux, please enable SIGPIPE handling, see main function below.
+	SIGPIPE handling will avoid your server from termination when sockets
+	are disconnected by clients before the transaction was completed
+	(aka broken pipe).
+
+	Compile without OpenSSL:
+	soapcpp2 -c -n -popt opt.h
+	soapcpp2 -c webserver.h
+	Customize your COOKIE_DOMAIN in this file
+	gcc -DWITH_COOKIES -DWITH_ZLIB -o webserver webserver.c options.c plugin/httpget.c plugin/httpform.c plugin/logging.c stdsoap2.c soapC.c soapClient.c soapServer.c -lpthread -lz
+
+	Compile with OpenSSL:
+	soapcpp2 -c -n -popt opt.h
+	soapcpp2 -c webserver.h
+	Customize your COOKIE_DOMAIN in this file
+	gcc -DWITH_OPENSSL -DWITH_COOKIES -DWITH_ZLIB -o webserver webserver.c options.c plugin/httpget.c plugin/httpform.c plugin/logging.c stdsoap2.c soapC.c soapClient.c soapServer.c -lpthread -lz -lssl -lcrypto
+
+	Use (HTTP GET):
+	Compile the web server as explained above
+	Start the web server on an even numbered port (e.g. 8080):
+	> webserver 8080 &
+	Start a web browser and open a (localhost) location:
+	http://127.0.0.1:8080
+	and type userid 'admin' and passwd 'guest' to gain access
+	Open the location:
+	http://127.0.0.1:8080/calc.html
+	then enter an expression
+	Open the locations:
+	http://127.0.0.1:8080/test.html
+	http://127.0.0.1:8081/webserver.wsdl
+
+	Use (HTTPS GET):
+	Create the SSL certificate
+	Compile the web server with OpenSSL as explained above
+	Start the web server on an odd numbered port (e.g. 8081)
+	> webserver 8081 &
+	Actually, you can start two servers, one on 8080 and a secure one on
+	8081
+	Start a web browser and open a (localhost) location:
+	https://127.0.0.1:8081
+	and type userid 'admin' and passwd 'guest' to gain access
+	Open the location:
+	https://127.0.0.1:8081/calc.html
+	and enter an expression
+	Open the locations:
+	https://127.0.0.1:8081/test.html
+	https://127.0.0.1:8081/webserver.wsdl
+
+	Use (HTTP POST):
+	Serves SOAP/XML calculation requests
+
+	Command-line options:
+	-z		enables compression
+	-c		enables chunking
+	-k		enables keep-alive
+	-i		enables non-threaded iterative server
+	-v		enables verbose mode
+	-o<num>		pool of <num> threads (cannot be used with option -i)
+			Note: interactive chunking/keep-alive settings cannot be
+			changed, unless the number of threads is interactively
+			changed to restart the pool
+			Note: <num>=0 specifies unlimited threads
+	-t<num>		sets I/O timeout value (seconds)
+	-s<num>		sets server timeout value (seconds)
+	-d<host>	sets cookie domain
+	-p<path>	sets cookie path
+	-l[none inbound outbound both]
+			enables logging
+
+	Requires options.h and options.c for command line option parsing and
+	for parsing interactive Web page options settings. The
+	default_options[] array defines application options, short-hands,
+	selection lists, and default values. See options.h for more details.
+*/
+
+#include "soapH.h"
+#include "webserver.nsmap"
+#include "options.h"
+#include "httpget.h"
+#include "httpform.h"
+#include "logging.h"
+#include "threads.h"
+/* #include "httpda.h" */	/* enable HTTP Digest Authentication */
+#include <signal.h>		/* defines SIGPIPE */
+
+#define BACKLOG (100)
+
+#define AUTH_REALM "gSOAP Web Server Admin"
+#define AUTH_USERID "admin"	/* user ID to access admin pages */
+#define AUTH_PASSWD "guest"	/* user pw to access admin pages */
+
+/******************************************************************************\
+ *
+ *	Thread pool and request queue
+ *
+\******************************************************************************/
+
+#define MAX_THR (100)
+#define MAX_QUEUE (1000)
+
+static int poolsize = 0;
+
+static int queue[MAX_QUEUE];
+static int head = 0, tail = 0;
+
+static MUTEX_TYPE queue_cs;
+static COND_TYPE queue_cv;
+
+/******************************************************************************\
+ *
+ *	Program options
+ *
+\******************************************************************************/
+
+static const struct option default_options[] =
+{ { "z.compress", NULL, },
+  { "c.chunking", NULL, },
+  { "k.keepalive", NULL, },
+  { "i.iterative", NULL, },
+  { "v.verbose", NULL, },
+  { "o.pool", "threads", 6, "none"},
+  { "t.ioTimeout", "seconds", 6, "120"},
+  { "s.serverTimeout", "seconds", 6, "3600"},
+  { "d.cookieDomain", "host", 20, "localhost:8080"},
+  { "p.cookiePath", "path", 20, "/"},
+  { "l.logging", "none inbound outbound both", },
+  { "", "port", },		/* rest of command line args */
+  { NULL },			/* must be NULL terminated */
+};
+
+/* The numbering of these defines must correspond to the option sequence */
+#define OPTION_z	0
+#define OPTION_c	1
+#define OPTION_k	2
+#define OPTION_i	3
+#define OPTION_v	4
+#define OPTION_o	5
+#define OPTION_t	6
+#define OPTION_s	7
+#define OPTION_d	8
+#define OPTION_p	9
+#define OPTION_l	10
+#define OPTION_port	11
+
+/******************************************************************************\
+ *
+ *	Static
+ *
+\******************************************************************************/
+
+static struct option *options = NULL;
+static time_t start;
+static int secure = 0;		/* =0: no SSL, =1: support SSL */
+
+static const char *minutes[60] = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" };
+static const char *hours[24] = {"00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23"};
+
+/******************************************************************************\
+ *
+ *	Forward decls
+ *
+\******************************************************************************/
+
+void server_loop(struct soap*);
+void *process_request(void*);	/* multi-threaded request handler */
+void *process_queue(void*);	/* multi-threaded request handler for pool */
+int enqueue(SOAP_SOCKET);
+SOAP_SOCKET dequeue();
+int http_get_handler(struct soap*);	/* HTTP get handler */
+int http_form_handler(struct soap*);	/* HTTP form handler */
+int check_authentication(struct soap*);	/* HTTP authentication check */
+int copy_file(struct soap*, const char*, const char*);	/* copy file as HTTP response */
+int calcget(struct soap*);
+int calcpost(struct soap*);
+int info(struct soap*);
+int html_hbar(struct soap*, const char*, size_t, size_t, unsigned long);
+int html_hist(struct soap*, const char*, size_t, size_t, size_t, const char**, size_t*, size_t);
+void sigpipe_handle(int); /* SIGPIPE handler: Unix/Linux only */
+
+/******************************************************************************\
+ *
+ *	OpenSSL
+ *
+\******************************************************************************/
+
+int CRYPTO_thread_setup();
+void CRYPTO_thread_cleanup();
+
+/******************************************************************************\
+ *
+ *	Main
+ *
+\******************************************************************************/
+
+int main(int argc, char **argv)
+{
+  struct soap soap;
+  SOAP_SOCKET master;
+  int port = 0;
+
+  start = time(NULL);
+
+  options = copy_options(default_options); /* must copy, so option values can be modified */
+  if (parse_options(argc, argv, options))
+    exit(0);
+
+  if (options[OPTION_port].value)
+    port = atol(options[OPTION_port].value);
+  if (!port)
+    port = 8080;
+  fprintf(stderr, "Starting Web server on port %d\n", port);
+  if (port != 8080)
+    fprintf(stderr, "[Note: use port 8080 to test server from browser with test.html and calc.html]\n");
+  fprintf(stderr, "[Note: you must enable Linux/Unix SIGPIPE handler to avoid broken pipe]\n");
+
+  soap_init2(&soap, SOAP_IO_KEEPALIVE, SOAP_IO_DEFAULT);
+
+  /* SSL init (to enable: compile all sources with -DWITH_OPENSSL) */
+  soap_ssl_init();
+#ifdef WITH_OPENSSL
+  if (CRYPTO_thread_setup())
+  {
+    fprintf(stderr, "Cannot setup thread mutex\n");
+    exit(1);
+  }
+  /* if the port is an odd number, the Web server uses HTTPS only */
+  if (port % 2)
+    secure = 1;
+  if (secure && soap_ssl_server_context(&soap,
+    SOAP_SSL_DEFAULT,
+    "server.pem",	/* keyfile: see SSL docs on how to obtain this file */
+    "password",		/* password to read the key file */
+    NULL, 		/* cacert */
+    NULL,		/* capath */
+    "dh512.pem",	/* DH file, if NULL use RSA */
+    NULL,		/* if randfile!=NULL: use a file with random data to seed randomness */ 
+    "webserver"		/* server identification for SSL session cache (must be a unique name) */
+  ))
+  {
+    soap_print_fault(&soap, stderr);
+    exit(1);
+  }
+#endif
+  /* Register HTTP GET plugin */
+  if (soap_register_plugin_arg(&soap, http_get, (void*)http_get_handler))
+    soap_print_fault(&soap, stderr);
+  /* Register HTTP POST plugin */
+  if (soap_register_plugin_arg(&soap, http_form, (void*)http_form_handler))
+    soap_print_fault(&soap, stderr);
+  /* Register logging plugin */
+  if (soap_register_plugin(&soap, logging))
+    soap_print_fault(&soap, stderr);
+#ifdef HTTPDA_H
+  /* Register HTTP Digest Authentication plugin */
+  if (soap_register_plugin(&soap, http_da))
+    soap_print_fault(&soap, stderr);
+#endif
+  /* Unix SIGPIPE, this is OS dependent (win does not need this) */
+  /* soap.accept_flags = SO_NOSIGPIPE; */ 	/* some systems like this */
+  /* soap.socket_flags = MSG_NOSIGNAL; */	/* others need this */
+  /* signal(SIGPIPE, sigpipe_handle); */	/* and some older Unix systems may require a sigpipe handler */
+  master = soap_bind(&soap, NULL, port, BACKLOG);
+  if (!soap_valid_socket(master))
+  {
+    soap_print_fault(&soap, stderr);
+    exit(1);
+  }
+  fprintf(stderr, "Port bind successful: master socket = %d\n", master);
+  MUTEX_SETUP(queue_cs);
+  COND_SETUP(queue_cv);
+  server_loop(&soap);
+  MUTEX_CLEANUP(queue_cs);
+  COND_CLEANUP(queue_cv);
+#ifdef WITH_OPENSSL
+  CRYPTO_thread_cleanup();
+#endif
+  free_options(options);
+  soap_end(&soap);
+  soap_done(&soap);
+  THREAD_EXIT;
+  return 0;
+}
+
+void server_loop(struct soap *soap)
+{
+  struct soap *soap_thr[MAX_THR];
+  THREAD_TYPE tid, tids[MAX_THR];
+  int req;
+  struct logging_data *logdata;
+
+  logdata = (struct logging_data*)soap_lookup_plugin(soap, logging_id); /* need to access plugin's data */
+
+  for (req = 1; ; req++)
+  {
+    SOAP_SOCKET sock;
+    int newpoolsize;
+    
+    soap->cookie_domain = options[OPTION_d].value;
+    soap->cookie_path = options[OPTION_p].value;
+    soap_set_cookie(soap, "visit", "true", NULL, NULL);
+    soap_set_cookie_expire(soap, "visit", 600, NULL, NULL);
+
+    if (options[OPTION_c].selected)
+      soap_set_omode(soap, SOAP_IO_CHUNK); /* use chunked HTTP content (fast) */
+    if (options[OPTION_k].selected)
+      soap_set_omode(soap, SOAP_IO_KEEPALIVE);
+    if (options[OPTION_t].value)
+      soap->send_timeout = soap->recv_timeout = atol(options[OPTION_t].value);
+    if (options[OPTION_s].value)
+      soap->accept_timeout = atol(options[OPTION_s].value);
+    if (options[OPTION_l].selected == 1 || options[OPTION_l].selected == 3)
+      logdata->inbound = stdout;
+    else
+      logdata->inbound = NULL;
+    if (options[OPTION_l].selected == 2 || options[OPTION_l].selected == 3)
+      logdata->outbound = stdout;
+    else
+      logdata->outbound = NULL;
+
+    newpoolsize = atol(options[OPTION_o].value);
+
+    if (newpoolsize < 0)
+      newpoolsize = 0;
+    else if (newpoolsize > MAX_THR)
+      newpoolsize = MAX_THR;
+
+    if (poolsize > newpoolsize)
+    {
+      int job;
+
+      for (job = 0; job < poolsize; job++)
+      {
+        while (enqueue(SOAP_INVALID_SOCKET) == SOAP_EOM)
+          sleep(1);
+      }
+
+      for (job = 0; job < poolsize; job++)
+      {
+        fprintf(stderr, "Waiting for thread %d to terminate...\n", job);
+        THREAD_JOIN(tids[job]);
+        fprintf(stderr, "Thread %d has stopped\n", job);
+        soap_done(soap_thr[job]);
+        free(soap_thr[job]);
+      }
+
+      poolsize = 0;
+    }
+
+    if (poolsize < newpoolsize)
+    {
+      int job;
+
+      for (job = poolsize; job < newpoolsize; job++)
+      {
+        soap_thr[job] = soap_copy(soap);
+	if (!soap_thr[job])
+	  break;
+
+        soap_thr[job]->user = (void*)job;
+	
+        fprintf(stderr, "Starting thread %d\n", job);
+        THREAD_CREATE(&tids[job], (void*(*)(void*))process_queue, (void*)soap_thr[job]);
+      }
+
+      poolsize = job;
+    }
+
+    sock = soap_accept(soap);
+    if (!soap_valid_socket(sock))
+    {
+      if (soap->errnum)
+      {
+        soap_print_fault(soap, stderr);
+        fprintf(stderr, "Retry...\n");
+	continue;
+      }
+      fprintf(stderr, "gSOAP Web server timed out\n");
+      break;
+    }
+
+    if (options[OPTION_v].selected)
+      fprintf(stderr, "Request #%d accepted on socket %d connected from IP %d.%d.%d.%d\n", req, sock, (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF);
+
+    if (poolsize > 0)
+    {
+      while (enqueue(sock) == SOAP_EOM)
+        sleep(1);
+    }
+    else
+    {
+      struct soap *tsoap = NULL;
+
+      if (!options[OPTION_i].selected)
+        tsoap = soap_copy(soap);
+
+      if (tsoap)
+      {
+#ifdef WITH_OPENSSL
+        if (secure && soap_ssl_accept(tsoap))
+        {
+	  soap_print_fault(tsoap, stderr);
+          fprintf(stderr, "SSL request failed, continue with next call...\n");
+          soap_end(tsoap);
+          soap_done(tsoap);
+          free(tsoap);
+          continue;
+        }
+#endif
+        tsoap->user = (void*)req;
+        THREAD_CREATE(&tid, (void*(*)(void*))process_request, (void*)tsoap);
+      }
+      else
+      {
+#ifdef WITH_OPENSSL
+        if (secure && soap_ssl_accept(soap))
+        {
+	  soap_print_fault(soap, stderr);
+          fprintf(stderr, "SSL request failed, continue with next call...\n");
+          soap_end(soap);
+          continue;
+        }
+#endif
+        if (soap_serve(soap))
+        {
+	  fprintf(stderr, "Request #%d completed with failure %d\n", req, soap->error);
+          soap_print_fault(soap, stderr);
+        }
+
+        soap_end(soap);
+        if (options[OPTION_v].selected)
+          fprintf(stderr, "Request #%d completed\n", req);
+      }
+    }
+  }
+
+  if (poolsize > 0)
+  {
+    int job;
+
+    for (job = 0; job < poolsize; job++)
+    {
+      while (enqueue(SOAP_INVALID_SOCKET) == SOAP_EOM)
+        sleep(1);
+    }
+
+    for (job = 0; job < poolsize; job++)
+    {
+      fprintf(stderr, "Waiting for thread %d to terminate... ", job);
+      THREAD_JOIN(tids[job]);
+      fprintf(stderr, "terminated\n");
+      soap_done(soap_thr[job]);
+      free(soap_thr[job]);
+    }
+  }
+}
+
+/******************************************************************************\
+ *
+ *	Process dispatcher
+ *
+\******************************************************************************/
+
+void *process_request(void *soap)
+{
+  struct soap *tsoap = (struct soap*)soap;
+
+  THREAD_DETACH(THREAD_ID);
+
+  if (soap_serve(tsoap))
+  {
+    fprintf(stderr, "Thread %d completed with failure %d\n", (int)tsoap->user, tsoap->error);
+    soap_print_fault(tsoap, stderr);
+  }
+  else if (options[OPTION_v].selected)
+    fprintf(stderr, "Thread %d completed\n", (int)tsoap->user);
+  /* soap_destroy((struct soap*)soap); */ /* cleanup class instances (but this is a C app) */
+
+  soap_end(tsoap);
+  soap_done(tsoap);
+  free(soap);
+
+  return NULL;
+}
+
+/******************************************************************************\
+ *
+ *	Thread pool (enabled with option -o<num>)
+ *
+\******************************************************************************/
+
+void *process_queue(void *soap)
+{
+  struct soap *tsoap = (struct soap*)soap;
+
+  for (;;)
+  {
+    tsoap->socket = dequeue();
+    if (!soap_valid_socket(tsoap->socket))
+    { if (options[OPTION_v].selected)
+        fprintf(stderr, "Thread %d terminating\n", (int)tsoap->user);
+      break;
+    }
+
+#ifdef WITH_OPENSSL
+    if (secure && soap_ssl_accept(tsoap))
+    {
+      soap_print_fault(tsoap, stderr);
+      fprintf(stderr, "SSL request failed, continue with next call...\n");
+      soap_end(tsoap);
+      soap_done(tsoap);
+      continue;
+    }
+#endif
+
+    if (options[OPTION_v].selected)
+      fprintf(stderr, "Thread %d accepted a request\n", (int)tsoap->user);
+    if (soap_serve(tsoap))
+    {
+      fprintf(stderr, "Thread %d finished serving request with failure %d\n", (int)tsoap->user, tsoap->error);
+      soap_print_fault(tsoap, stderr);
+    }
+    else if (options[OPTION_v].selected)
+      fprintf(stderr, "Thread %d finished serving request\n", (int)tsoap->user);
+
+    soap_destroy(tsoap);
+    soap_end(tsoap);
+  }
+
+  return NULL;
+}
+
+int enqueue(SOAP_SOCKET sock)
+{
+  int status = SOAP_OK;
+  int next;
+  int ret;
+
+  if ((ret = MUTEX_LOCK(queue_cs)))
+    fprintf(stderr, "MUTEX_LOCK error %d\n", ret);
+
+  next = (tail + 1) % MAX_QUEUE;
+  if (head == next)
+  {
+    /* don't block on full queue, return SOAP_EOM */
+    status = SOAP_EOM;
+  }
+  else
+  {
+    queue[tail] = sock;
+    tail = next;
+
+    if (options[OPTION_v].selected)
+      fprintf(stderr, "enqueue(%d)\n", sock);
+
+    if ((ret = COND_SIGNAL(queue_cv)))
+      fprintf(stderr, "COND_SIGNAL error %d\n", ret);
+  }
+
+  if ((ret = MUTEX_UNLOCK(queue_cs)))
+    fprintf(stderr, "MUTEX_UNLOCK error %d\n", ret);
+
+  return status;
+}
+
+SOAP_SOCKET dequeue()
+{
+  SOAP_SOCKET sock;
+  int ret;
+
+  if ((ret = MUTEX_LOCK(queue_cs)))
+    fprintf(stderr, "MUTEX_LOCK error %d\n", ret);
+
+  while (head == tail)
+    if ((ret = COND_WAIT(queue_cv, queue_cs)))
+      fprintf(stderr, "COND_WAIT error %d\n", ret);
+
+  sock = queue[head];
+  
+  head = (head + 1) % MAX_QUEUE;
+
+  if (options[OPTION_v].selected)
+    fprintf(stderr, "dequeue(%d)\n", sock);
+
+  if ((ret = MUTEX_UNLOCK(queue_cs)))
+    fprintf(stderr, "MUTEX_UNLOCK error %d\n", ret);
+
+  return sock;
+}
+
+/******************************************************************************\
+ *
+ *	SOAP/XML handling: calculator example
+ *
+\******************************************************************************/
+
+int ns__add(struct soap *soap, double a, double b, double *c)
+{
+  *c = a + b;
+  return SOAP_OK;
+}
+
+int ns__sub(struct soap *soap, double a, double b, double *c)
+{
+  *c = a - b;
+  return SOAP_OK;
+}
+
+int ns__mul(struct soap *soap, double a, double b, double *c)
+{
+  *c = a * b;
+  return SOAP_OK;
+}
+
+int ns__div(struct soap *soap, double a, double b, double *c)
+{
+  *c = a / b;
+  return SOAP_OK;
+}
+
+/******************************************************************************\
+ *
+ *	Server dummy methods to avoid link errors
+ *
+\******************************************************************************/
+
+int ns__addResponse_(struct soap *soap, double a)
+{
+  return SOAP_NO_METHOD; /* we don't use this: we use soap_send_ns__addResponse instead */
+}
+
+int ns__subResponse_(struct soap *soap, double a)
+{
+  return SOAP_NO_METHOD; /* we don't use this: we use soap_send_ns__subResponse instead */
+}
+
+int ns__mulResponse_(struct soap *soap, double a)
+{
+  return SOAP_NO_METHOD; /* we don't use this: we use soap_send_ns__mulResponse instead */
+}
+
+int ns__divResponse_(struct soap *soap, double a)
+{
+  return SOAP_NO_METHOD; /* we don't use this: we use soap_send_ns__divResponse instead */
+}
+
+/******************************************************************************\
+ *
+ *	HTTP GET handler for plugin
+ *
+\******************************************************************************/
+
+int http_get_handler(struct soap *soap)
+{
+  /* gSOAP >=2.5 soap_response() will do this automatically for us, when sending SOAP_HTML or SOAP_FILE:
+  if ((soap->omode & SOAP_IO) != SOAP_IO_CHUNK)
+    soap_set_omode(soap, SOAP_IO_STORE); */ /* if not chunking we MUST buffer entire content when returning HTML pages to determine content length */
+#ifdef WITH_ZLIB
+  if (options[OPTION_z].selected && soap->zlib_out == SOAP_ZLIB_GZIP) /* client accepts gzip */
+    soap_set_omode(soap, SOAP_ENC_ZLIB); /* so we can compress content (gzip) */
+  soap->z_level = 9; /* best compression */
+#endif
+  /* Use soap->path (from request URL) to determine request: */
+  if (options[OPTION_v].selected)
+    fprintf(stderr, "HTTP GET Request: %s\n", soap->endpoint);
+  /* Note: soap->path always starts with '/' */
+  if (strchr(soap->path + 1, '/') || strchr(soap->path + 1, '\\'))	/* we don't like snooping in dirs */
+    return 403; /* HTTP forbidden */
+  if (!soap_tag_cmp(soap->path, "*.html"))
+    return copy_file(soap, soap->path + 1, "text/html");
+  if (!soap_tag_cmp(soap->path, "*.xml")
+   || !soap_tag_cmp(soap->path, "*.xsd")
+   || !soap_tag_cmp(soap->path, "*.wsdl"))
+    return copy_file(soap, soap->path + 1, "text/xml");
+  if (!soap_tag_cmp(soap->path, "*.jpg"))
+    return copy_file(soap, soap->path + 1, "image/jpeg");
+  if (!soap_tag_cmp(soap->path, "*.gif"))
+    return copy_file(soap, soap->path + 1, "image/gif");
+  if (!soap_tag_cmp(soap->path, "*.png"))
+    return copy_file(soap, soap->path + 1, "image/png");
+  if (!soap_tag_cmp(soap->path, "*.ico"))
+    return copy_file(soap, soap->path + 1, "image/ico");
+  if (!strncmp(soap->path, "/calc?", 6))
+    return calcget(soap);
+  if (!strncmp(soap->path, "/genivia", 8))
+  { strcpy(soap->endpoint, "http://genivia.com"); /* redirect */
+    strcat(soap->endpoint, soap->path + 8);
+    return 307; /* Temporary Redirect */
+  }
+  /* Check requestor's authentication: */
+  if (check_authentication(soap))
+    return 401; /* HTTP not authorized */
+  /* Return Web server status */
+  if (soap->path[1] == '\0' || soap->path[1] == '?')
+    return info(soap);
+  return 404; /* HTTP not found */
+}
+
+int check_authentication(struct soap *soap)
+{ if (soap->userid && soap->passwd)
+  { if (!strcmp(soap->userid, AUTH_USERID) && !strcmp(soap->passwd, AUTH_PASSWD))
+      return SOAP_OK;
+  }
+#ifdef HTTPDA_H
+  else if (soap->authrealm && soap->userid)
+  { if (!strcmp(soap->authrealm, AUTH_REALM) && !strcmp(soap->userid, AUTH_USERID))
+      if (!http_da_verify_get(soap, AUTH_PASSWD))
+        return SOAP_OK;
+  }
+#endif
+  soap->authrealm = AUTH_REALM;
+  return 401;
+}
+
+/******************************************************************************\
+ *
+ *	HTTP POST application/x-www-form-urlencoded handler for plugin
+ *
+\******************************************************************************/
+
+int http_form_handler(struct soap *soap)
+{
+#ifdef WITH_ZLIB
+  if (options[OPTION_z].selected && soap->zlib_out == SOAP_ZLIB_GZIP) /* client accepts gzip */
+    soap_set_omode(soap, SOAP_ENC_ZLIB); /* so we can compress content (gzip) */
+  soap->z_level = 9; /* best compression */
+#endif
+  /* Use soap->path (from request URL) to determine request: */
+  if (options[OPTION_v].selected)
+    fprintf(stderr, "HTTP POST Request: %s\n", soap->endpoint);
+  /* Note: soap->path always starts with '/' */
+  if (!strcmp(soap->path, "/calc"))
+    return calcpost(soap);
+  return 404; /* HTTP not found */
+}
+
+/******************************************************************************\
+ *
+ *	Copy static page
+ *
+\******************************************************************************/
+
+int copy_file(struct soap *soap, const char *name, const char *type)
+{ FILE *fd;
+  size_t r;
+  fd = fopen(name, "rb"); /* open file to copy */
+  if (!fd)
+    return 404; /* return HTTP not found */
+  soap->http_content = type;
+  if (soap_response(soap, SOAP_FILE)) /* OK HTTP response header */
+  { soap_end_send(soap);
+    fclose(fd);
+    return soap->error;
+  }
+  for (;;)
+  { r = fread(soap->tmpbuf, 1, sizeof(soap->tmpbuf), fd);
+    if (!r)
+      break;
+    if (soap_send_raw(soap, soap->tmpbuf, r))
+    { soap_end_send(soap);
+      fclose(fd);
+      return soap->error;
+    }
+  }
+  fclose(fd);
+  return soap_end_send(soap);
+}
+
+/******************************************************************************\
+ *
+ *	Example dynamic HTTP GET application/x-www-form-urlencoded calculator
+ *
+\******************************************************************************/
+
+int calcget(struct soap *soap)
+{ int o = 0, a = 0, b = 0, val;
+  char buf[256];
+  char *s = query(soap); /* get argument string from URL ?query string */
+  while (s)
+  { char *key = query_key(soap, &s); /* decode next query string key */
+    char *val = query_val(soap, &s); /* decode next query string value (if any) */
+    if (key && val)
+    { if (!strcmp(key, "o"))
+        o = val[0];
+      else if (!strcmp(key, "a"))
+        a = strtol(val, NULL, 10);
+      else if (!strcmp(key, "b"))
+        b = strtol(val, NULL, 10);
+    }
+  }
+  switch (o)
+  { case 'a':
+      val = a + b;
+      break;
+    case 's':
+      val = a - b;
+      break;
+    case 'm':
+      val = a * b;
+      break;
+    case 'd':
+      val = a / b;
+      break;
+    default:
+      return soap_sender_fault(soap, "Unknown operation", NULL);
+  }
+  soap_response(soap, SOAP_HTML);
+  sprintf(buf, "<html>value=%d</html>", val);
+  soap_send(soap, buf);
+  soap_end_send(soap);
+  return SOAP_OK;
+}
+
+/******************************************************************************\
+ *
+ *	Example dynamic HTTP POST application/x-www-form-urlencoded calculator
+ *
+\******************************************************************************/
+
+int calcpost(struct soap *soap)
+{ int o = 0, a = 0, b = 0, val;
+  char buf[256];
+  char *s = form(soap); /* get form data from body */
+  while (s)
+  { char *key = query_key(soap, &s); /* decode next key */
+    char *val = query_val(soap, &s); /* decode next value (if any) */
+    if (key && val)
+    { if (!strcmp(key, "o"))
+        o = val[0];
+      else if (!strcmp(key, "a"))
+        a = strtol(val, NULL, 10);
+      else if (!strcmp(key, "b"))
+        b = strtol(val, NULL, 10);
+    }
+  }
+  switch (o)
+  { case 'a':
+      val = a + b;
+      break;
+    case 's':
+      val = a - b;
+      break;
+    case 'm':
+      val = a * b;
+      break;
+    case 'd':
+      val = a / b;
+      break;
+    default:
+      return soap_sender_fault(soap, "Unknown operation", NULL);
+  }
+  soap_response(soap, SOAP_HTML);
+  sprintf(buf, "<html>value=%d</html>", val);
+  soap_send(soap, buf);
+  soap_end_send(soap);
+  return SOAP_OK;
+}
+
+/******************************************************************************\
+ *
+ *	Example dynamic HTTP POST multipart/form-data form-based calculator
+ *
+\******************************************************************************/
+
+int f__form1(struct soap *soap)
+{ int o = 0, a = 0, b = 0, val;
+  char buf[256];
+  struct soap_multipart *content;
+  for (content = soap->mime.list; content; content = content->next)
+  { if (content->id && content->ptr)
+    { /* may have to check content->encoding to convert data when necessary! */
+      if (!strcmp(content->id, "o"))
+        o = content->ptr[0];
+      else if (!strcmp(content->id, "a"))
+        a = strtol(content->ptr, NULL, 10);
+      else if (!strcmp(content->id, "b"))
+        b = strtol(content->ptr, NULL, 10);
+    }
+  }
+  switch (o)
+  { case 'a':
+      val = a + b;
+      break;
+    case 's':
+      val = a - b;
+      break;
+    case 'm':
+      val = a * b;
+      break;
+    case 'd':
+      val = a / b;
+      break;
+    default:
+      return soap_sender_fault(soap, "Unknown operation", NULL);
+  }
+  soap_response(soap, SOAP_HTML);
+  sprintf(buf, "<html>value=%d</html>", val);
+  soap_send(soap, buf);
+  soap_end_send(soap);
+  return SOAP_OK;
+  return SOAP_OK;
+}
+
+int f__form2(struct soap *soap, struct f__formResponse *response)
+{ int o = 0, a = 0, b = 0;
+  struct soap_multipart *content;
+  for (content = soap->mime.list; content; content = content->next)
+  { if (content->id && content->ptr)
+    { /* may have to check content->encoding to convert data when necessary! */
+      if (!strcmp(content->id, "o"))
+        o = content->ptr[0];
+      else if (!strcmp(content->id, "a"))
+        a = strtol(content->ptr, NULL, 10);
+      else if (!strcmp(content->id, "b"))
+        b = strtol(content->ptr, NULL, 10);
+    }
+  }
+  switch (o)
+  { case 'a':
+      response->result = a + b;
+      break;
+    case 's':
+      response->result = a - b;
+      break;
+    case 'm':
+      response->result = a * b;
+      break;
+    case 'd':
+      response->result = a / b;
+      break;
+    default:
+      return soap_sender_fault(soap, "Unknown operation", NULL);
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************\
+ *
+ *	Dynamic Web server info page
+ *
+\******************************************************************************/
+
+int info(struct soap *soap)
+{ struct http_get_data *getdata;
+  struct logging_data *logdata;
+  const char *t0, *t1, *t2, *t3, *t4, *t5, *t6, *t7;
+  char buf[2048]; /* buffer large enough to hold HTML content */
+  struct soap_plugin *p;
+  time_t now = time(NULL), elapsed = now - start;
+  query_options(soap, options);
+  if (soap->omode & SOAP_IO_KEEPALIVE)
+    t0 = "<td align='center' bgcolor='green'>YES</td>";
+  else
+    t0 = "<td align='center' bgcolor='red'>NO</td>";
+#ifdef WITH_COOKIES
+  t1 = "<td align='center' bgcolor='green'>YES</td>";
+  /* soap_env_cookie_value() returns value of a cookie received (from client) */
+  if (soap_env_cookie_value(soap, "visit", NULL, NULL))
+    t2 = "<td align='center' bgcolor='green'>PASS</td>";
+  else
+    t2 = "<td align='center' bgcolor='yellow'>WAIT</td>";
+#else
+  t1 = "<td align='center' bgcolor='red'>NO</td>";
+  t2 = "<td align='center' bgcolor='blue'>N/A</td>";
+#endif
+  if (secure)
+  { t3 = "<td align='center' bgcolor='green'>YES</td>";
+    if (soap->imode & SOAP_ENC_SSL)
+      t4 = "<td align='center' bgcolor='green'>PASS</td>";
+    else
+      t4 = "<td align='center' bgcolor='red'><blink>FAIL</blink></td>";
+  }
+  else
+  { t3 = "<td align='center' bgcolor='red'>NO</td>";
+    t4 = "<td align='center' bgcolor='blue'>N/A</td>";
+  }
+#ifdef WITH_ZLIB
+  if (options[OPTION_z].selected)
+  { t5 = "<td align='center' bgcolor='green'>YES</td>";
+    if (soap->omode & SOAP_ENC_ZLIB)
+      t6 = "<td align='center' bgcolor='green'>PASS</td>";
+    else
+      t6 = "<td align='center' bgcolor='yellow'>WAIT</td>";
+  }
+  else
+  { t5 = "<td align='center' bgcolor='red'>NO</td>";
+    t6 = "<td align='center' bgcolor='blue'>N/A</td>";
+  }
+#else
+  t5 = "<td align='center' bgcolor='red'>NO</td>";
+  t6 = "<td align='center' bgcolor='blue'>N/A</td>";
+#endif
+  if (options[OPTION_c].selected || (soap->omode & SOAP_IO) == SOAP_IO_CHUNK)
+    t7 = "<td align='center' bgcolor='green'>YES</td>";
+  else
+    t7 = "<td align='center' bgcolor='red'>NO</td>";
+  if (soap_response(soap, SOAP_HTML))
+    return soap->error;
+  sprintf(buf, "\
+<html>\
+<head>\
+<meta name='Author' content='Robert A. van Engelen'>\
+<meta name='Generator' content='gSOAP'>\
+<meta http-equiv='Refresh' content='60'>\
+<style type='text/css' media='screen'><!-- table { background-color: #666 } td { color: white; font-size: 10px; line-height: 10px; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular } --></style>\
+<title>gSOAP Web Server Administration</title>\
+</head>\
+<body bgcolor='#FFFFFF'>\
+<h1>gSOAP Web Server Administration</h1>\
+<p>Server endpoint=%s client agent IP=%d.%d.%d.%d\
+<h2>Registered Plugins</h2>\
+", soap->endpoint, (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF);
+  if (soap_send(soap, buf))
+    return soap->error;
+  for (p = soap->plugins; p; p = p->next)
+  { sprintf(buf, "%s<br>", p->id);
+    if (soap_send(soap, buf))
+      return soap->error;
+  }
+  if (soap_send(soap, "<h2>Elapsed Time</h2>"))
+    return soap->error;
+  if (elapsed >= 86400)
+    html_hbar(soap, "Days:", 100, elapsed/86400, 0x000000);
+  if (elapsed >= 3600)
+    html_hbar(soap, "Hours:", 100, elapsed/3600%24, 0x000000);
+  html_hbar(soap, "Minutes:", 100, elapsed/60%60, 0x000000);
+  soap_send(soap, "<h2>Control Panel</h2>");
+  if (html_form_options(soap, options))
+    return soap->error;
+  sprintf(buf, "\
+<h2>Function Tests</h2>\
+<table border='0' cellspacing='0' cellpadding='0' bgcolor='#666666' nosave>\
+<tr height='10'><td height='10' background='bl.gif'></td><td height='10'><i>Function</i></td><td align='center' height='10'><i>Result</i></td><td height='10' background='obls.gif'></td></tr>\
+<tr><td background='bl.gif'></td><td>HTTP operational</td><td align='center' bgcolor='green'>YES</td><td width='10' background='ls.gif'></td></tr>\
+<tr><td background='bl.gif'></td><td>HTTP keep alive enabled</td>%s<td width='10' background='ls.gif'></td></tr>\
+<tr><td background='bl.gif'></td><td>HTTP cookies enabled</td>%s<td width='10' background='ls.gif'></td></tr>\
+<tr><td background='bl.gif'></td><td>HTTP cookies test</td>%s<td width='10' background='ls.gif'></td></tr>\
+<tr><td background='bl.gif'></td><td>HTTPS (OpenSSL) enabled</td>%s<td width='10' background='ls.gif'></td></tr>\
+<tr><td background='bl.gif'></td><td>HTTPS (OpenSSL) test</td>%s<td width='10' background='ls.gif'></td></tr>\
+<tr><td background='bl.gif'></td><td>HTTP compression enabled</td>%s<td width='10' background='ls.gif'></td></tr>\
+<tr><td background='bl.gif'></td><td>HTTP compression test</td>%s<td width='10' background='ls.gif'></td></tr>\
+<tr><td background='bl.gif'></td><td>HTTP chunking enabled</td>%s<td width='10' background='ls.gif'></td></tr>\
+<tr height='10'><td width='10' height='10' background=otrs.gif></td><td height='10' background='ts.gif'></td><td height='10' background='ts.gif'></td><td width='10' height='10' background='otls.gif'></td></tr>\
+</table>", t0, t1, t2, t3, t4, t5, t6, t7);
+  if (soap_send(soap, buf))
+    return soap->error;
+  getdata = (struct http_get_data*)soap_lookup_plugin(soap, http_get_id);
+  logdata = (struct logging_data*)soap_lookup_plugin(soap, logging_id);
+  soap_send(soap, "<h2>Usage Statistics</h2>");
+  if (getdata)
+  { html_hbar(soap, "HTTP&nbsp;GET", 120, getdata->stat_get, 0x0000FF);
+    html_hbar(soap, "HTTP&nbsp;POST", 120, getdata->stat_post, 0x00FF00);
+    html_hbar(soap, "HTTP&nbsp;FAIL", 120, getdata->stat_fail, 0xFF0000);
+  }
+  if (logdata)
+  { html_hbar(soap, "SENT(kB)", 120, logdata->stat_sent/1024, 0x00FFFF);
+    html_hbar(soap, "RECV(kB)", 120, logdata->stat_recv/1024, 0x00FFFF);
+    if (elapsed > 0)
+    { html_hbar(soap, "SENT(kB/s)", 120, logdata->stat_sent/elapsed/1024, 0x00FFFF);
+      html_hbar(soap, "RECV(kB/s)", 120, logdata->stat_recv/elapsed/1024, 0x00FFFF);
+    }
+  }
+  if (getdata)
+  { struct tm T;
+    T.tm_min = 99;
+    T.tm_hour = 99;
+    T.tm_yday = 999;
+#ifdef HAVE_LOCALTIME_R
+    localtime_r(&now, &T);
+#else
+    T = *localtime(&now);
+#endif
+    soap_send(soap, "<h2>Requests by the Minute</h2>");
+    html_hist(soap, "Minute", 12, 0, 60, minutes, getdata->min, T.tm_min);
+    soap_send(soap, "<h2>Requests by the Hour</h2>");
+    html_hist(soap, "Hour", 30, 0, 24, hours, getdata->hour, T.tm_hour);
+    soap_send(soap, "<h2>Requests by Day of the Year</h2>");
+    html_hist(soap, "Day", 2, 0, 365, NULL, getdata->day, T.tm_yday);
+  }
+  soap_send(soap, "\
+<p>This page will automatically reload every minute to refresh the statistics.\
+<br><br><br><img src='favicon.gif' align='absmiddle'>Powered by gSOAP\
+</body>\
+</HTML>");
+  return soap_end_send(soap);
+}
+
+static size_t html_scaled(char *buf, size_t len)
+{ if (len > 1000000)
+  { sprintf(buf, "%.2f&#183;10<sup>6</sup>", (float)len/1000000.0);
+    return len / 1000000;
+  }
+  if (len > 1000)
+  { sprintf(buf, "%.2f&#183;10<sup>3</sup>", (float)len/1000.0);
+    return len / 1000;
+  }
+  sprintf(buf, "%lu", (unsigned long)len);
+  return len;
+}
+
+int html_hbar(struct soap *soap, const char *title, size_t pix, size_t len, unsigned long color)
+{ char buf[2048]; /* buffer large enough to hold HTML content */
+  char lab[32];
+  len = html_scaled(lab, len);
+  sprintf(buf, "\
+<table border='0' cellspacing='0' cellpadding='0' height='30'>\
+<tr height='10'>\
+<td width='10' height='10' background='bl.gif'></td>\
+<td rowspan='2' bgcolor='#666666' width='%lu' height='20'>%s&nbsp;%s</td>\
+<td bgcolor='#%.6lx' width='%lu' height='10'></td>\
+<td width='10' height='10' background='obls.gif'></td>\
+</tr>\
+<tr height='10'>\
+<td width='10' height='10' background='bl.gif'></td>\
+<td height='10' background='ruler.gif'></td>\
+<td width='10' height='10' background='ls.gif'></td>\
+</tr>\
+<tr height='10'>\
+<td width='10' height='10' background='otrs.gif'></td>\
+<td colspan='2' height='10' background='ts.gif'></td>\
+<td width='10' height='10' background='otls.gif'></td>\
+</tr>\
+</table>", (unsigned long)pix, title ? title : "", lab, color, (unsigned long)len * 2);
+  return soap_send(soap, buf);
+}
+
+int html_hist(struct soap *soap, const char *title, size_t barwidth, size_t height, size_t num, const char **key, size_t *val, size_t highlight)
+{ char buf[2048]; /* buffer large enough to hold HTML content */
+  char lab[32];
+  size_t i, max;
+  float scale;
+  max = 0;
+  for (i = 0; i < num; i++)
+  { if (val[i] > max)
+      max = val[i];
+  }
+  if (height < 20)
+  { height = max;
+    if (height < 20)
+      height = 20;
+    else if (height > 256)
+      height = 256;
+  }
+  scale = (float)height / (float)max;
+  html_scaled(lab, max);
+  sprintf(buf, "\
+<a name='%s'></a>\
+<table bgcolor='#FFFFFF' border='0' cellspacing='0' cellpadding='0' height='%lu' align='center'>\
+<tr height='10'>\
+<td width='10' height='10' background='btl.gif'></td><td colspan='%lu' height='10' background='bt.gif'></td><td width='10' height='10' background='btr.gif'></td><td width='10' height='10' background='obls.gif'></td>\
+</tr>\
+<tr height='%lu' align='center' valign='bottom'>\
+<td width='10' height='%lu' background='bl.gif'></td>\
+<td bgcolor='#666666' valign='top'>%s</td>", title ? title : "", (unsigned long)height + 50, (unsigned long)num + 1, (unsigned long)height, (unsigned long)height, lab);
+  if (soap_send(soap, buf))
+    return soap->error;
+  for (i = 0; i < num; i++)
+  { unsigned long bar = (scale * val[i] + 0.5);
+    if (bar >= 1)
+      sprintf(buf, "\
+<td bgcolor='#FFFFFF'><a onmouseover=\"window.status='%lu';return true\" onmouseout=\"window.status='';return true\" href='#%s'><img src='top.gif' alt='' width='%lu' height='1' align='bottom' border='0'><br><img src='bar.gif' alt='' width='%lu' height='%lu' align='bottom' border='0'></a></td>", (unsigned long)i, title ? title : "", (unsigned long)barwidth, (unsigned long)barwidth, bar - 1);
+    else
+      sprintf(buf, "\
+<td bgcolor='#FFFFFF'><img src='bar.gif' alt='' width='%lu' height='0' align='bottom' border='0'></td>", (unsigned long)barwidth);
+    if (soap_send(soap, buf))
+      return soap->error;
+  }
+  sprintf(buf, "\
+<td width='10' height='%lu' background='br.gif'></td>\
+<td width='10' height='%lu' background='ls.gif'></td>\
+</tr>\
+<tr bgcolor='#666666' height='20' align='center'>\
+<td width='10' height='20' background='bl.gif'></td>\
+<td bgcolor='#666666'>%s</td>", (unsigned long)height, (unsigned long)height, title ? title : "");
+  if (soap_send(soap, buf))
+    return soap->error;
+  for (i = 0; i < num; i++)
+  { sprintf(buf, "<td%s>%s</td>", (i == highlight) ? " bgcolor='#777777'" : "", key ? key[i] : "<img src='bar.gif'>");
+    if (soap_send(soap, buf))
+      return soap->error;
+  }
+  if (soap_send(soap, "\
+<td width='10' height='20' background='br.gif'></td>\
+<td width='10' height='20' background='ls.gif'></td>"))
+    return soap->error;
+  sprintf(buf, "\
+</tr>\
+<tr height='10'>\
+<td width='10' height='10' background='bbl.gif'></td><td colspan='%lu' height='10' background='bb.gif'></td><td width='10' height='10' background='bbr.gif'></td><td width='10' height='10' background='ls.gif'></td>\
+</tr>\
+<tr height='10'>\
+<td width='10' height='10' background='otrs.gif'></td>\
+<td colspan='%lu' height='10' background='ts.gif'></td>\
+<td width='10' height='10' background='otls.gif'></td>\
+</tr>\
+</table>", (unsigned long)num + 1, (unsigned long)num + 2);
+  return soap_send(soap, buf);
+}
+
+/******************************************************************************\
+ *
+ *	OpenSSL
+ *
+\******************************************************************************/
+
+#ifdef WITH_OPENSSL
+
+struct CRYPTO_dynlock_value
+{ MUTEX_TYPE mutex;
+};
+
+static MUTEX_TYPE *mutex_buf;
+
+static struct CRYPTO_dynlock_value *dyn_create_function(const char *file, int line)
+{ struct CRYPTO_dynlock_value *value;
+  value = (struct CRYPTO_dynlock_value*)malloc(sizeof(struct CRYPTO_dynlock_value));
+  if (value)
+    MUTEX_SETUP(value->mutex);
+  return value;
+}
+
+static void dyn_lock_function(int mode, struct CRYPTO_dynlock_value *l, const char *file, int line)
+{ if (mode & CRYPTO_LOCK)
+    MUTEX_LOCK(l->mutex);
+  else
+    MUTEX_UNLOCK(l->mutex);
+}
+
+static void dyn_destroy_function(struct CRYPTO_dynlock_value *l, const char *file, int line)
+{ MUTEX_CLEANUP(l->mutex);
+  free(l);
+}
+
+void locking_function(int mode, int n, const char *file, int line)
+{ if (mode & CRYPTO_LOCK)
+    MUTEX_LOCK(mutex_buf[n]);
+  else
+    MUTEX_UNLOCK(mutex_buf[n]);
+}
+
+unsigned long id_function()
+{ return (unsigned long)THREAD_ID;
+}
+
+int CRYPTO_thread_setup()
+{ int i;
+  mutex_buf = (MUTEX_TYPE*)malloc(CRYPTO_num_locks() * sizeof(MUTEX_TYPE));
+  if (!mutex_buf)
+    return SOAP_EOM;
+  for (i = 0; i < CRYPTO_num_locks(); i++)
+    MUTEX_SETUP(mutex_buf[i]);
+  CRYPTO_set_id_callback(id_function);
+  CRYPTO_set_locking_callback(locking_function);
+  CRYPTO_set_dynlock_create_callback(dyn_create_function);
+  CRYPTO_set_dynlock_lock_callback(dyn_lock_function);
+  CRYPTO_set_dynlock_destroy_callback(dyn_destroy_function);
+  return SOAP_OK;
+}
+
+void CRYPTO_thread_cleanup()
+{ int i;
+  if (!mutex_buf)
+    return;
+  CRYPTO_set_id_callback(NULL);
+  CRYPTO_set_locking_callback(NULL);
+  CRYPTO_set_dynlock_create_callback(NULL);
+  CRYPTO_set_dynlock_lock_callback(NULL);
+  CRYPTO_set_dynlock_destroy_callback(NULL);
+  for (i = 0; i < CRYPTO_num_locks(); i++)
+    MUTEX_CLEANUP(mutex_buf[i]);
+  free(mutex_buf);
+  mutex_buf = NULL;
+}
+
+#endif
+
+/******************************************************************************\
+ *
+ *	SIGPIPE
+ *
+\******************************************************************************/
+
+void sigpipe_handle(int x) { }
diff --git a/samples/webserver/webserver.h b/samples/webserver/webserver.h
new file mode 100644
index 0000000..9f56d0f
--- /dev/null
+++ b/samples/webserver/webserver.h
@@ -0,0 +1,52 @@
+/*
+
+webserver.h
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+*/
+
+//gsoap ns service name:	webserver
+//gsoap ns service namespace:	http://www.cs.fsu.edu/~engelen/webserver.wsdl
+//gsoap ns service location:	http://localhost:8080
+//gsoap ns service style:	rpc
+//gsoap ns service encoding:	encoded
+
+//gsoap ns schema namespace: urn:demowebserver
+
+int ns__add(double, double, double*);		// HTTP POST request - response
+int ns__sub(double, double, double*);		// HTTP POST request - response
+int ns__mul(double, double, double*);		// HTTP POST request - response
+int ns__div(double, double, double*);		// HTTP POST request - response
+
+//gsoap f schema namespace: urn:form
+
+int f__form1(void);	// one-way MEP
+
+int f__form2(struct f__formResponse { double result; } *);
+
diff --git a/samples/wsse/Makefile b/samples/wsse/Makefile
new file mode 100644
index 0000000..998b360
--- /dev/null
+++ b/samples/wsse/Makefile
@@ -0,0 +1,28 @@
+GSOAP=../../soapcpp2
+GWSDL=../../wsdl2h
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lcrypto -lssl
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I. -I../.. -I../../plugin
+CMFLAGS=-DWITH_DOM -DWITH_OPENSSL
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		wssedemo
+wssedemo:	wssedemo.h wssedemo.c soapC.c $(SOAPH) $(SOAPC) ../../dom.c wsseapi.o smdevp.o
+		$(CC) $(CFLAGS) -o wssedemo wssedemo.c soapC.c soapClient.c soapServer.c ../../dom.c $(SOAPC) wsseapi.o smdevp.o $(LIBS)
+wssedemo.h:	wssedemo.wsdl
+		$(GWSDL) -c -t ../../typemap.dat wssedemo.wsdl
+soapC.c:	wssedemo.h
+		$(GSOAP) -c -I../../import wssedemo.h
+wsseapi.o:	../../plugin/wsseapi.h ../../plugin/wsseapi.c
+		$(CC) $(CFLAGS) -c ../../plugin/wsseapi.c
+smdevp.o:	../../plugin/smdevp.h ../../plugin/smdevp.c
+		$(CC) $(CFLAGS) -c ../../plugin/smdevp.c
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h soap*Object.h soapClientLib.c soapServerLib.c
+distclean:
+		rm -f *.o *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soapClientLib.c soapServerLib.c soap*Proxy.h soap*Object.h wssedemo wssedemo.h
diff --git a/samples/wsse/MakefileSolaris b/samples/wsse/MakefileSolaris
new file mode 100644
index 0000000..5a48409
--- /dev/null
+++ b/samples/wsse/MakefileSolaris
@@ -0,0 +1,28 @@
+GSOAP=../../soapcpp2
+GWSDL=../../wsdl2h
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lcrypto -lssl -lxnet -lnsl -lsocket
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I. -I../.. -I../../plugin
+CMFLAGS=-DWITH_DOM -DWITH_OPENSSL
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		wssedemo
+wssedemo:	wssedemo.h wssedemo.c soapC.c $(SOAPH) $(SOAPC) ../../dom.c wsseapi.o smdevp.o
+		$(CC) $(CFLAGS) -o wssedemo wssedemo.c soapC.c soapClient.c soapServer.c ../../dom.c $(SOAPC) wsseapi.o smdevp.o $(LIBS)
+wssedemo.h:	wssedemo.wsdl
+		$(GWSDL) -c -t ../../typemap.dat wssedemo.wsdl
+soapC.c:	wssedemo.h
+		$(GSOAP) -c -I../../import wssedemo.h
+wsseapi.o:	../../plugin/wsseapi.h ../../plugin/wsseapi.c
+		$(CC) $(CFLAGS) -c ../../plugin/wsseapi.c
+smdevp.o:	../../plugin/smdevp.h ../../plugin/smdevp.c
+		$(CC) $(CFLAGS) -c ../../plugin/smdevp.c
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h soap*Object.h soapClientLib.c soapServerLib.c
+distclean:
+		rm -f *.o *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soapClientLib.c soapServerLib.c soap*Proxy.h soap*Object.h wssedemo wssedemo.h
diff --git a/samples/wsse/cacert.pem b/samples/wsse/cacert.pem
new file mode 100644
index 0000000..004b05f
--- /dev/null
+++ b/samples/wsse/cacert.pem
@@ -0,0 +1,21 @@
+-----BEGIN CERTIFICATE-----
+MIIDhjCCAu+gAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMCVVMx
+CzAJBgNVBAgTAkZMMRQwEgYDVQQHEwtUYWxsYWhhc3NlZTEWMBQGA1UEChMNR2Vu
+aXZpYSwgSW5jLjELMAkGA1UECxMCSVQxFDASBgNVBAMTC2dlbml2aWEuY29tMSIw
+IAYJKoZIhvcNAQkBFhNjb250YWN0QGdlbml2aWEuY29tMB4XDTA0MTAwMjE3MDgw
+NloXDTA3MTAwMjE3MDgwNlowgY8xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJGTDEU
+MBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2aWEsIEluYy4xCzAJ
+BgNVBAsTAklUMRQwEgYDVQQDEwtnZW5pdmlhLmNvbTEiMCAGCSqGSIb3DQEJARYT
+Y29udGFjdEBnZW5pdmlhLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
+l6K9bLMcrJ6Bz+8hxyolSJy5TdZKo8OmmskP+NAJct7aGWa33u2lkZ+GkoUmLKZ/
+rDNpgmYVNQlOQC4rt5oDt4AUoj584G8PJKSPwymJcX0sbfB7k8xRmLO+vVgSUvDu
+asLMWJ6PsYIuGhp4BwOAgnYACTzsd6kSeIsed8XSx7cCAwEAAaOB7zCB7DAdBgNV
+HQ4EFgQU4MyIi0GgIUqkYRhnJ2GgyUmVd8owgbwGA1UdIwSBtDCBsYAU4MyIi0Gg
+IUqkYRhnJ2GgyUmVd8qhgZWkgZIwgY8xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJG
+TDEUMBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2aWEsIEluYy4x
+CzAJBgNVBAsTAklUMRQwEgYDVQQDEwtnZW5pdmlhLmNvbTEiMCAGCSqGSIb3DQEJ
+ARYTY29udGFjdEBnZW5pdmlhLmNvbYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3
+DQEBBQUAA4GBAFmb9kV+EDx5O4j7dLMu909nFgnBL06sepjqtBIIbZY3GnCgefxK
+p1S6If01/mdV79nZGJldegM77tz4VIlzuIaz+2NO+Gqbr6ErOR+3UGOrRuH39aMT
+1DvwHYpU5GU+lG1aWHdQp8uZ5y4okMg3Z9IZ5nijkUnpCHQO+q/8FrML
+-----END CERTIFICATE-----
diff --git a/samples/wsse/server.pem b/samples/wsse/server.pem
new file mode 100644
index 0000000..b5ef00f
--- /dev/null
+++ b/samples/wsse/server.pem
@@ -0,0 +1,61 @@
+-----BEGIN CERTIFICATE-----
+MIIDsTCCAxqgAwIBAgIBCDANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMCVVMx
+CzAJBgNVBAgTAkZMMRQwEgYDVQQHEwtUYWxsYWhhc3NlZTEWMBQGA1UEChMNR2Vu
+aXZpYSwgSW5jLjELMAkGA1UECxMCSVQxFDASBgNVBAMTC2dlbml2aWEuY29tMSIw
+IAYJKoZIhvcNAQkBFhNjb250YWN0QGdlbml2aWEuY29tMB4XDTA1MTIyNDE5MzMx
+M1oXDTA4MTIyMzE5MzMxM1owgY0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJGTDEU
+MBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2aWEsIEluYy4xCzAJ
+BgNVBAsTAklUMRIwEAYDVQQDEwlsb2NhbGhvc3QxIjAgBgkqhkiG9w0BCQEWE2Nv
+bnRhY3RAZ2VuaXZpYS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM5R
+ShAu0f3F267b+Xhu4Hl3Pe5zTiUlkK95+v7Fg6DE5qX1O4DCWCrgvaVU7jgyJp57
+UM3n4YvERHy2vwlpOlieo91VMVGn4NCD/hv1+2KGtFTiJ2bcNLbMxeP6V9zAFbmm
+UAnRMemUr4RPREK03IKIF1g5+UAgwBmj3p/JwZb3AgMBAAGjggEbMIIBFzAJBgNV
+HRMEAjAAMCwGCWCGSAGG+EIBDQQfFh1PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZp
+Y2F0ZTAdBgNVHQ4EFgQUPcHItRkXw4wSZDwFwyLue7ontMEwgbwGA1UdIwSBtDCB
+sYAU4MyIi0GgIUqkYRhnJ2GgyUmVd8qhgZWkgZIwgY8xCzAJBgNVBAYTAlVTMQsw
+CQYDVQQIEwJGTDEUMBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2
+aWEsIEluYy4xCzAJBgNVBAsTAklUMRQwEgYDVQQDEwtnZW5pdmlhLmNvbTEiMCAG
+CSqGSIb3DQEJARYTY29udGFjdEBnZW5pdmlhLmNvbYIBADANBgkqhkiG9w0BAQUF
+AAOBgQBu0A7sheqpcWBdyxM6DMLGoZIVFCq7hiodaLFLQcAL+zXHD25RmbMllU9Y
+GD1z8gYYY0Ahp0Qdq0bb3WwgfSMjCISSzgSTELPLhGf9P1OBUSVg7tECiQZY5uC0
+wiDY6ISKTo1ZYmczTJW9o/dodl662YQ/gMgeSTpZ0LR0ni3N9g==
+-----END CERTIFICATE-----
+-----BEGIN RSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: DES-EDE3-CBC,F120AF3AE8B2A1F9
+
+3NxVM2+vqMh88SbEjRXWR1anwXE60x4VXB0SEkNmzv3bOSYGpeIY7sEb4m93LLjj
+mkvMBOSJYWzuUxWHePcdIKokDRkCwDjm6UR9Hsf82E0IMBiwPspynP396DZaXEDY
+okqlGBmFX5z6FujG9gNl58Zm09FRl8zmriJtoSu4esasRaez/KaklugrMiMHwVVZ
+PWL4fZxmoxf/gRWjwYG/uYfnMrX2YtIZrOzWn5bJ+EFzs/8IfkMhR5emPCD67oMn
+Q1F6AZgmC9J2QQ0B+evmUbJJLGkM0KITp3r6kfxwupFYgiq3Pxyj6T4hbGXhl3Ts
+y2k2BFlR7O5ijJOSBc6VvKh84KgPMeRGC04p35dzCOv9jvBVJXmj8vb3I/Ux1GjY
+tqmiSekcsjXnFzjQ3Vz39e9Ix0EuHmd6IBZKEBEVixy6l9YK+tk6Xd/2ofh5Gb8h
+qcCb87b+ujvkTfitVp3zxnlkOW1SO3Pnv3HJE4PcCIZJfHdgFxCioPMomYk5/ZYZ
+kXHLeFMqYHRUgYx0EQn/Z6tub36EO4u7B1rWl42HhKkar7VdmIWl3ve6cGKva/6l
+cX5WSFk8/6WtmPcWt8ztE8m+5Y0EjELcf9NZxC+1wLOD0TnhfhdkISIBhl4Ocw1s
+BJ1QonCb1XIUd0e3D6EF5ozcEmhlbcOih63NwAeD3oEFyAvf6Ri9+ranY5y9mT6M
+Mlr2C+hE5fIkvCJhhEfEmeJuv4CCJlUWJ+mVPNgxCyeXp7P7G5k1kiVqLYQFmQeJ
+pklLSHXATZ53iiXVViUCpGz1iUdVJtdf+iUtuT0MIAWUeUjyybsHHA==
+-----END RSA PRIVATE KEY-----
+-----BEGIN CERTIFICATE-----
+MIIDhjCCAu+gAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMCVVMx
+CzAJBgNVBAgTAkZMMRQwEgYDVQQHEwtUYWxsYWhhc3NlZTEWMBQGA1UEChMNR2Vu
+aXZpYSwgSW5jLjELMAkGA1UECxMCSVQxFDASBgNVBAMTC2dlbml2aWEuY29tMSIw
+IAYJKoZIhvcNAQkBFhNjb250YWN0QGdlbml2aWEuY29tMB4XDTA0MTAwMjE3MDgw
+NloXDTA3MTAwMjE3MDgwNlowgY8xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJGTDEU
+MBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2aWEsIEluYy4xCzAJ
+BgNVBAsTAklUMRQwEgYDVQQDEwtnZW5pdmlhLmNvbTEiMCAGCSqGSIb3DQEJARYT
+Y29udGFjdEBnZW5pdmlhLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
+l6K9bLMcrJ6Bz+8hxyolSJy5TdZKo8OmmskP+NAJct7aGWa33u2lkZ+GkoUmLKZ/
+rDNpgmYVNQlOQC4rt5oDt4AUoj584G8PJKSPwymJcX0sbfB7k8xRmLO+vVgSUvDu
+asLMWJ6PsYIuGhp4BwOAgnYACTzsd6kSeIsed8XSx7cCAwEAAaOB7zCB7DAdBgNV
+HQ4EFgQU4MyIi0GgIUqkYRhnJ2GgyUmVd8owgbwGA1UdIwSBtDCBsYAU4MyIi0Gg
+IUqkYRhnJ2GgyUmVd8qhgZWkgZIwgY8xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJG
+TDEUMBIGA1UEBxMLVGFsbGFoYXNzZWUxFjAUBgNVBAoTDUdlbml2aWEsIEluYy4x
+CzAJBgNVBAsTAklUMRQwEgYDVQQDEwtnZW5pdmlhLmNvbTEiMCAGCSqGSIb3DQEJ
+ARYTY29udGFjdEBnZW5pdmlhLmNvbYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3
+DQEBBQUAA4GBAFmb9kV+EDx5O4j7dLMu909nFgnBL06sepjqtBIIbZY3GnCgefxK
+p1S6If01/mdV79nZGJldegM77tz4VIlzuIaz+2NO+Gqbr6ErOR+3UGOrRuH39aMT
+1DvwHYpU5GU+lG1aWHdQp8uZ5y4okMg3Z9IZ5nijkUnpCHQO+q/8FrML
+-----END CERTIFICATE-----
diff --git a/samples/wsse/wssedemo.c b/samples/wsse/wssedemo.c
new file mode 100644
index 0000000..77d0aea
--- /dev/null
+++ b/samples/wsse/wssedemo.c
@@ -0,0 +1,273 @@
+/*
+
+wssedemo.c
+
+WS-Security plugin demo application
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+/*
+
+This application demonstrates the use of the wsse plugin.
+
+Compile:
+
+wsdl2h -c -t typemap.dat wssedemo.wsdl
+soapcpp2 -I import wssedemo.h
+cc -o wssedemo wssedemo.c wsseapi.c smdevp.c dom.c stdsoap2.c soapC.c soapClient.c soapServer.c -lcrypto -lssl
+
+Other files required:
+
+server.pem
+cacert.pem
+
+Note:
+
+The wsse.h, wsu.h, ds.h, c14n.h files are located in 'import'.
+The smdevp.* and wsseapi.* files are located in 'plugin'.
+
+Usage: wssedemo cinhkst [port]
+
+with options:
+
+c chunked HTTP
+i indent XML
+n canonical XML
+h use hmac
+k don't use keys
+s server
+t use plain-text passwords
+
+For example, to generate a request message and store it in a file:
+
+./wssedemo in > wssedemo.xml < /dev/null
+
+To parse and verify this request message:
+
+./wssedemo s < wssedemo.xml
+
+*/
+
+#include "smdevp.h"
+#include "wsseapi.h"
+#include "wssetest.nsmap"
+
+int main(int argc, char **argv)
+{ struct soap *soap;
+  int server = 0;
+  int hmac = 0;
+  int text = 0;
+  int nokey = 0;
+  int port = 0;
+  X509 *cert = NULL;
+  EVP_PKEY *rsa_privk = NULL, *rsa_pubk = NULL;
+  FILE *fd;
+  double result;
+  /* not-so-random HMAC key for testing */
+  static char hmac_key[16] =
+  { 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88,
+    0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00 };
+  /* create context */
+  soap = soap_new();
+  /* register wsse plugin */
+  soap_register_plugin(soap, soap_wsse);
+  /* options */
+  if (argc >= 2)
+  { if (strchr(argv[1], 'c'))
+      soap_set_omode(soap, SOAP_IO_CHUNK);
+    if (strchr(argv[1], 'i'))
+      soap_set_omode(soap, SOAP_XML_INDENT);
+    if (strchr(argv[1], 'n'))
+      soap_set_omode(soap, SOAP_XML_CANONICAL);
+    if (strchr(argv[1], 'h'))
+      hmac = 1;
+    if (strchr(argv[1], 'k'))
+      nokey = 1;
+    if (strchr(argv[1], 's'))
+      server = 1;
+    if (strchr(argv[1], 't'))
+      text = 1;
+  }
+  /* soap->actor = "..."; */ /* set only when required */
+  soap_wsse_add_Timestamp(soap, "Time", 10);	/* lifetime of 10 seconds */
+  /* add text or digest password */
+  if (text)
+    soap_wsse_add_UsernameTokenText(soap, "User", "john doe", "secret");
+  else
+    soap_wsse_add_UsernameTokenDigest(soap, "User", "john doe", "secret");
+  /* read RSA private key for signing */
+  if ((fd = fopen("server.pem", "r")))
+  { rsa_privk = PEM_read_PrivateKey(fd, NULL, NULL, "password");
+    fclose(fd);
+    if (!rsa_privk)
+    { fprintf(stderr, "Could not read private RSA key from server.pem\n");
+      exit(1);
+    }
+  }
+  else
+    fprintf(stderr, "Could not read server.pem\n");
+  /* read certificate (more efficient is to keep certificate in memory): */
+  if ((fd = fopen("server.pem", "r")))
+  { cert = PEM_read_X509(fd, NULL, NULL, NULL);
+    fclose(fd);
+    if (!cert)
+    { fprintf(stderr, "Could not read certificate from server.pem\n");
+      exit(1);
+    }
+  }
+  else
+    fprintf(stderr, "Could not read server.pem\n");
+  rsa_pubk = X509_get_pubkey(cert);
+  if (!rsa_pubk)
+  { fprintf(stderr, "Could not get public key from certificate\n");
+    exit(1);
+  }
+  /* port argument */
+  if (argc >= 3)
+    port = atoi(argv[2]);
+  /* need cacert to verify certificate */
+  soap->cafile = "cacert.pem";
+  /* server or client/ */
+  if (server)
+  { if (port)
+    { /* stand-alone server serving messages over port */
+      if (!soap_valid_socket(soap_bind(soap, NULL, port, 100)))
+      { soap_print_fault(soap, stderr);
+        exit(1);
+      }
+      while (soap_valid_socket(soap_accept(soap)))
+      { if (hmac)
+          soap_wsse_verify_auto(soap, SOAP_SMD_HMAC_SHA1, hmac_key, sizeof(hmac_key));
+        else if (nokey)
+          soap_wsse_verify_auto(soap, SOAP_SMD_VRFY_RSA_SHA1, rsa_pubk, 0);
+        else
+          soap_wsse_verify_auto(soap, SOAP_SMD_NONE, NULL, 0);
+        if (soap_serve(soap))
+        { soap_wsse_delete_Security(soap);
+          soap_print_fault(soap, stderr);
+          soap_print_fault_location(soap, stderr);
+        }
+      }
+      soap_print_fault(soap, stderr);
+      exit(1);
+    }
+    else
+    { /* CGI-style server serving messages over stdin/out */
+      if (hmac)
+        soap_wsse_verify_auto(soap, SOAP_SMD_HMAC_SHA1, hmac_key, sizeof(hmac_key));
+      else if (nokey)
+        soap_wsse_verify_auto(soap, SOAP_SMD_VRFY_RSA_SHA1, rsa_pubk, 0);
+      else
+        soap_wsse_verify_auto(soap, SOAP_SMD_NONE, NULL, 0);
+      if (soap_serve(soap))
+      { soap_wsse_delete_Security(soap);
+        soap_print_fault(soap, stderr);
+        soap_print_fault_location(soap, stderr);
+      }
+    }
+  }
+  else /* client */
+  { char endpoint[80];
+    /* client sending messages to stdout or over port */
+    if (port)
+      sprintf(endpoint, "http://localhost:%d", port);
+    else
+      strcpy(endpoint, "http://");
+    if (hmac)
+      soap_wsse_sign_body(soap, SOAP_SMD_HMAC_SHA1, hmac_key, sizeof(hmac_key));
+    else
+    { if (nokey)
+        soap_wsse_add_KeyInfo_KeyName(soap, "MyKey");
+      else
+      { soap_wsse_add_BinarySecurityTokenX509(soap, "X509Token", cert);
+        soap_wsse_add_KeyInfo_SecurityTokenReferenceX509(soap, "#X509Token");
+      }
+      soap_wsse_sign_body(soap, SOAP_SMD_SIGN_RSA_SHA1, rsa_privk, 0);
+    }
+    soap_wsse_verify_auto(soap, SOAP_SMD_NONE, NULL, 0);
+    if (!soap_call_ns1__add(soap, endpoint, NULL, 1.0, 2.0, &result)
+     && !soap_wsse_verify_Timestamp(soap)
+     && !soap_wsse_verify_Password(soap, "secret"))
+      printf("Result = %g\n", result);
+    else
+    { soap_wsse_delete_Security(soap);
+      soap_print_fault(soap, stderr);
+      soap_print_fault_location(soap, stderr);
+    }
+    soap_wsse_verify_done(soap);
+  }
+  /* cleanup keys */
+  if (rsa_privk)
+    EVP_PKEY_free(rsa_privk);
+  if (rsa_pubk)
+    EVP_PKEY_free(rsa_pubk);
+  if (cert)
+    X509_free(cert);
+  /* cleanup gSOAP engine */
+  soap_end(soap);
+  soap_done(soap);
+  free(soap);
+  /* done */
+  return 0;
+}
+
+int ns1__add(struct soap *soap, double a, double b, double *result)
+{ const char *username = soap_wsse_get_Username(soap);
+  if (username)
+    fprintf(stderr, "Hello %s, want to add %g + %g = ?\n", username, a, b);
+  if (soap_wsse_verify_Timestamp(soap)
+   || soap_wsse_verify_Password(soap, "secret"))
+  { soap_wsse_delete_Security(soap);
+    return soap->error;
+  }
+  *result = a + b;
+  soap_wsse_delete_Security(soap);
+  return SOAP_OK;
+}
+
+int ns1__sub(struct soap *soap, double a, double b, double *result)
+{ *result = a - b;
+  soap_wsse_delete_Security(soap);
+  return SOAP_OK;
+}
+
+int ns1__mul(struct soap *soap, double a, double b, double *result)
+{ *result = a * b;
+  soap_wsse_delete_Security(soap);
+  return SOAP_OK;
+}
+
+int ns1__div(struct soap *soap, double a, double b, double *result)
+{ soap_wsse_delete_Security(soap);
+  if (b != 0.0)
+  { *result = a / b;
+    return SOAP_OK;
+  }
+  return soap_sender_fault(soap, "Division by zero", NULL);
+}
+
diff --git a/samples/wsse/wssedemo.wsdl b/samples/wsse/wssedemo.wsdl
new file mode 100644
index 0000000..bf7e5ab
--- /dev/null
+++ b/samples/wsse/wssedemo.wsdl
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="wssetest"
+ targetNamespace="http://www.genivia.com/wsdl/wssetest.wsdl"
+ xmlns:tns="http://www.genivia.com/wsdl/wssetest.wsdl"
+ xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:ns="http://www.genivia.com/schemas/wssetest.xsd"
+ xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
+ xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/"
+ xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"
+ xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+<message name="addRequest">
+ <part name="a" type="xsd:double"/>
+ <part name="b" type="xsd:double"/>
+</message>
+
+<message name="addResponse">
+ <part name="result" type="xsd:double"/>
+</message>
+
+<message name="subRequest">
+ <part name="a" type="xsd:double"/>
+ <part name="b" type="xsd:double"/>
+</message>
+
+<message name="subResponse">
+ <part name="result" type="xsd:double"/>
+</message>
+
+<message name="mulRequest">
+ <part name="a" type="xsd:double"/>
+ <part name="b" type="xsd:double"/>
+</message>
+
+<message name="mulResponse">
+ <part name="result" type="xsd:double"/>
+</message>
+
+<message name="divRequest">
+ <part name="a" type="xsd:double"/>
+ <part name="b" type="xsd:double"/>
+</message>
+
+<message name="divResponse">
+ <part name="result" type="xsd:double"/>
+</message>
+
+<message name="Header">
+ <part name="Security" element="wsse:Security"/>
+</message>
+
+<portType name="wssetestPortType">
+ <operation name="add">
+  <input message="tns:addRequest"/>
+  <output message="tns:addResponse"/>
+ </operation>
+ <operation name="sub">
+  <input message="tns:subRequest"/>
+  <output message="tns:subResponse"/>
+ </operation>
+ <operation name="mul">
+  <input message="tns:mulRequest"/>
+  <output message="tns:mulResponse"/>
+ </operation>
+ <operation name="div">
+  <input message="tns:divRequest"/>
+  <output message="tns:divResponse"/>
+ </operation>
+</portType>
+
+<binding name="wssetest" type="tns:wssetestPortType">
+ <SOAP:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="add">
+  <SOAP:operation style="rpc" soapAction=""/>
+  <input>
+     <SOAP:body use="encoded" namespace="http://www.genivia.com/schemas/wssetest.xsd" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+     <SOAP:header use="literal" message="tns:Header" part="Security"/>
+  </input>
+  <output>
+     <SOAP:body use="encoded" namespace="http://www.genivia.com/schemas/wssetest.xsd" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+     <SOAP:header use="literal" message="tns:Header" part="Security"/>
+  </output>
+ </operation>
+ <operation name="sub">
+  <SOAP:operation style="rpc" soapAction=""/>
+  <input>
+     <SOAP:body use="encoded" namespace="http://www.genivia.com/schemas/wssetest.xsd" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+     <SOAP:header use="literal" message="tns:Header" part="Security"/>
+  </input>
+  <output>
+     <SOAP:body use="encoded" namespace="http://www.genivia.com/schemas/wssetest.xsd" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+     <SOAP:header use="literal" message="tns:Header" part="Security"/>
+  </output>
+ </operation>
+ <operation name="mul">
+  <SOAP:operation style="rpc" soapAction=""/>
+  <input>
+     <SOAP:body use="encoded" namespace="http://www.genivia.com/schemas/wssetest.xsd" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+     <SOAP:header use="literal" message="tns:Header" part="Security"/>
+  </input>
+  <output>
+     <SOAP:body use="encoded" namespace="http://www.genivia.com/schemas/wssetest.xsd" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+     <SOAP:header use="literal" message="tns:Header" part="Security"/>
+  </output>
+ </operation>
+ <operation name="div">
+  <SOAP:operation style="rpc" soapAction=""/>
+  <input>
+     <SOAP:body use="encoded" namespace="http://www.genivia.com/schemas/wssetest.xsd" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+     <SOAP:header use="literal" message="tns:Header" part="Security"/>
+  </input>
+  <output>
+     <SOAP:body use="encoded" namespace="http://www.genivia.com/schemas/wssetest.xsd" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+     <SOAP:header use="literal" message="tns:Header" part="Security"/>
+  </output>
+ </operation>
+</binding>
+
+<service name="wssetest">
+ <port name="wssetest" binding="tns:wssetest">
+  <SOAP:address location="http://localhost:80"/>
+ </port>
+</service>
+
+</definitions>
diff --git a/samples/xml-rpc/Makefile b/samples/xml-rpc/Makefile
new file mode 100644
index 0000000..6584106
--- /dev/null
+++ b/samples/xml-rpc/Makefile
@@ -0,0 +1,24 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		xml-rpc-currentTime xml-rpc-weblogs
+xml-rpc-currentTime:	xml-rpc.h xml-rpc-currentTime.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c xml-rpc.h
+		$(CC) $(CFLAGS) -o xml-rpc-currentTime xml-rpc-currentTime.c soapC.c $(SOAPC) $(LIBS)
+xml-rpc-weblogs:	xml-rpc.h xml-rpc-io.h xml-rpc-iters.h xml-rpc.cpp
+xml-rpc-io.cpp xml-rpc-weblogs.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) xml-rpc.h
+		$(CPP) $(CFLAGS) -o xml-rpc-weblogs xml-rpc-weblogs.cpp xml-rpc.cpp xml-rpc-io.cpp $(SOAPCPP) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h xml-rpc-currentTime xml-rpc-weblogs
diff --git a/samples/xml-rpc/MakefileSolaris b/samples/xml-rpc/MakefileSolaris
new file mode 100644
index 0000000..4a9be82
--- /dev/null
+++ b/samples/xml-rpc/MakefileSolaris
@@ -0,0 +1,24 @@
+GSOAP=../../soapcpp2
+SOAPH=../../stdsoap2.h
+SOAPC=../../stdsoap2.c
+SOAPCPP=../../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lxnet -lnsl -lsocket
+COFLAGS=-O2
+CWFLAGS=-Wall
+CIFLAGS=-I../..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:		xml-rpc-currentTime xml-rpc-weblogs
+xml-rpc-currentTime:	xml-rpc.h xml-rpc-currentTime.c $(SOAPH) $(SOAPC)
+		$(GSOAP) -c xml-rpc.h
+		$(CC) $(CFLAGS) -o xml-rpc-currentTime xml-rpc-currentTime.c soapC.c $(SOAPC) $(LIBS)
+xml-rpc-weblogs:	xml-rpc.h xml-rpc-io.h xml-rpc-iters.h xml-rpc.cpp
+xml-rpc-io.cpp xml-rpc-weblogs.cpp $(SOAPH) $(SOAPCPP)
+		$(GSOAP) xml-rpc.h
+		$(CPP) $(CFLAGS) -o xml-rpc-weblogs xml-rpc-weblogs.cpp xml-rpc.cpp xml-rpc-io.cpp $(SOAPCPP) $(LIBS)
+clean:
+		rm -f *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
+distclean:
+		rm -f *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h xml-rpc-currentTime xml-rpc-weblogs
diff --git a/samples/xml-rpc/xml-rpc-currentTime.c b/samples/xml-rpc/xml-rpc-currentTime.c
new file mode 100644
index 0000000..30dfc7f
--- /dev/null
+++ b/samples/xml-rpc/xml-rpc-currentTime.c
@@ -0,0 +1,92 @@
+/*
+
+XML-RPC currenTime example
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "soapH.h"
+
+int methodCall(struct soap *soap, const char *URL, struct methodCall *m, struct methodResponse *r);
+
+int main()
+{ struct soap *soap = soap_new();
+  struct methodCall m;
+  struct methodResponse r;
+  /* Set up method call */
+  m.methodName = "currentTime.getCurrentTime";
+  /* no parameters */
+  m.params.__size = 0;
+  /* no namespaces */
+  soap->namespaces = NULL;
+  /* no SOAP encodingStyle */
+  soap->encodingStyle = NULL;
+  /* connect, send request, and receive response */
+  if (methodCall(soap, "http://time.xmlrpc.com/RPC2", &m, &r))
+  { soap_print_fault(soap, stderr);
+    exit(soap->error);
+  }
+  if (r.fault)
+  { /* print fault on stdout */
+    soap_begin_send(soap);
+    soap_put_fault(soap, r.fault, "fault", NULL);
+    soap_end_send(soap);
+  }
+  else if (r.params && r.params->__size == 1)
+  { /* print response parameter */
+    if (r.params->param[0].value.__type == SOAP_TYPE__dateTime_DOTiso8601)
+      printf("Time = %s\n", (char*)r.params->param[0].value.ref);
+    else
+      printf("Time not provided\n");
+  }
+  soap_end(soap);
+  soap_done(soap);
+  free(soap);
+  return 0;
+}
+
+int methodCall(struct soap *soap, const char *URL, struct methodCall *m, struct methodResponse *r)
+{ /* no namespaces */
+  soap->namespaces = NULL;
+  /* no SOAP encodingStyle */
+  soap->encodingStyle = NULL;
+  /* connect, send request, and receive response */
+  if (soap_connect(soap, URL, NULL)
+   || soap_begin_send(soap)
+   || soap_put_methodCall(soap, m, "methodCall", NULL)
+   || soap_end_send(soap)
+   || soap_begin_recv(soap)
+   || !soap_get_methodResponse(soap, r, "methodResponse", NULL)
+   || soap_end_recv(soap))
+    return soap_closesock(soap); /* closes socket and returns soap->error */
+  soap_closesock(soap);
+  return SOAP_OK;
+}
+
+/* Don't need a namespace table. We put an empty one here to avoid link errors */
+struct Namespace namespaces[] = { {NULL, NULL} };
diff --git a/samples/xml-rpc/xml-rpc-io.cpp b/samples/xml-rpc/xml-rpc-io.cpp
new file mode 100644
index 0000000..879d2e8
--- /dev/null
+++ b/samples/xml-rpc/xml-rpc-io.cpp
@@ -0,0 +1,85 @@
+/*
+
+XML-RPC io stream operations on XML-RPC values
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "soapH.h"
+#include "xml-rpc-io.h"
+
+std::ostream& operator<<(std::ostream& o, const struct value& v)
+{ switch (v.__type)
+  { case SOAP_TYPE__array: 
+      o << "{array" << std::endl;
+      for (_array::iterator i = ((struct _array)v).begin(); i != ((struct _array)v).end(); ++i)
+	  o << "[" << i.index() << "]=" << *i << std::endl;
+      o << "}";
+      break;
+    case SOAP_TYPE__base64: 
+      o << "{base64 " << ((struct _base64)v).size() << " bytes}";
+      break;
+    case SOAP_TYPE__boolean: 
+      if (v.is_true())
+        o << "TRUE";
+      else
+	o << "FALSE";
+      break;
+    case SOAP_TYPE__dateTime_DOTiso8601: 
+      o << (const char*)v;
+      break;
+    case SOAP_TYPE__double: 
+      o << (double)v;
+      break;
+    case SOAP_TYPE__i4: 
+    case SOAP_TYPE__int: 
+      o << (int)v;
+      break;
+    case SOAP_TYPE__string: 
+      o << (const char*)v;
+      break;
+    case SOAP_TYPE__struct: 
+      o << "{struct" << std::endl;
+      for (struct _struct::iterator i = ((struct _struct)v).begin(); i != ((struct _struct)v).end(); ++i)
+        o << "[" << i.index() << "]=" << *i << std::endl;
+      o << "}";
+      break;
+    default:
+      if (v.__any)
+        o << v.__any;
+      else
+        o << "{?}";
+  }
+  return o;
+}
+
+std::istream& operator>>(std::istream& i, struct value& v)
+{ // TODO
+  return i;
+}
+
diff --git a/samples/xml-rpc/xml-rpc-io.h b/samples/xml-rpc/xml-rpc-io.h
new file mode 100644
index 0000000..4ca72f4
--- /dev/null
+++ b/samples/xml-rpc/xml-rpc-io.h
@@ -0,0 +1,35 @@
+/*
+
+XML-RPC io stream operations on XML-RPC values
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+extern std::ostream& operator<<(std::ostream&, const struct value&);
+extern std::istream& operator>>(std::istream&, struct value&);
+
diff --git a/samples/xml-rpc/xml-rpc-iters.h b/samples/xml-rpc/xml-rpc-iters.h
new file mode 100644
index 0000000..33bd74d
--- /dev/null
+++ b/samples/xml-rpc/xml-rpc-iters.h
@@ -0,0 +1,86 @@
+/*
+
+XML-RPC iterator definitions for C++
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#ifndef XML_RPC_ITERS_H
+#define XML_RPC_ITERS_H
+
+#ifdef __cplusplus
+
+class _struct_iterator
+{
+private:
+  struct member*	member;
+public:
+  			_struct_iterator();
+  			_struct_iterator(const struct _struct*);
+  bool			operator==(const _struct_iterator&) const;
+  bool			operator!=(const _struct_iterator&) const;
+  const char*		index() const;
+  struct value&		operator*() const;
+  _struct_iterator&	operator++();
+  _struct_iterator&	operator+=(int);
+};
+
+class _array_iterator
+{
+private:
+  struct value*		start;
+  struct value*		value;
+public:
+  			_array_iterator();
+  			_array_iterator(const struct _array*);
+  bool			operator==(const _array_iterator&) const;
+  bool			operator!=(const _array_iterator&) const;
+  int 			index() const;
+  struct value&		operator*() const;
+  _array_iterator&	operator++();
+  _array_iterator&	operator+=(int);
+};
+
+class params_iterator
+{
+private:
+  struct param*		start;
+  struct param*		param;
+public:
+  			params_iterator();
+  			params_iterator(const struct params*);
+  bool			operator==(const params_iterator&) const;
+  bool			operator!=(const params_iterator&) const;
+  int			index() const;
+  struct value&		operator*() const;
+  params_iterator&	operator++();
+  params_iterator&	operator+=(int);
+};
+
+#endif
+#endif
diff --git a/samples/xml-rpc/xml-rpc-weblogs.c b/samples/xml-rpc/xml-rpc-weblogs.c
new file mode 100644
index 0000000..f9cf6b1
--- /dev/null
+++ b/samples/xml-rpc/xml-rpc-weblogs.c
@@ -0,0 +1,117 @@
+/*
+
+XML-RPC weblogUpdates.ping example in C
+
+See http://xmlrpc.scripting.com/weblogsCom for more details.
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "soapH.h"
+
+int methodCall(struct soap *soap, const char *URL, struct methodCall *m, struct methodResponse *r);
+
+int main()
+{ struct soap *soap = soap_new();
+  struct methodCall m;
+  struct methodResponse r;
+  struct param p[2];
+  /* Set up method call */
+  m.methodName = "weblogUpdates.ping";
+  /* two parameters with string content */
+  m.params.__size = 2;
+  m.params.param = p;
+  p[0].value.__any = "Scripting News";
+  p[1].value.__any = "http://www.scripting.com/";
+  /* connect, send request, and receive response */
+  if (methodCall(soap, "http://rpc.weblogs.com/RPC2", &m, &r))
+  { soap_print_fault(soap, stderr);
+    exit(soap->error);
+  }
+  if (r.fault)
+  { /* print fault on stdout */
+    soap_begin_send(soap);
+    soap_put_fault(soap, r.fault, "fault", NULL);
+    soap_end_send(soap);
+  }
+  else if (r.params && r.params->__size == 1)
+  { /* print response parameter, check if first is a struct */
+    if (r.params->param[0].value.__type == SOAP_TYPE__struct)
+    { /* it is a struct with two members */
+      struct _struct *s = r.params->param[0].value.ref;
+      if (s->__size == 2)
+      { if (!strcmp(s->member[0].name, "flerror"))
+	  if (s->member[0].value.__type == SOAP_TYPE__boolean)
+	    if ((*(_boolean*)s->member[0].value.ref) == 0)
+	      printf("Weblog ping successful\n");
+	    else
+	      printf("Weblog ping failed\n");
+	  else 
+	    printf("XML-RPC message format error: boolean value expected\n");
+	else 
+	  printf("XML-RPC message format error: string value \"flerror\" expected\n");
+        if (!strcmp(s->member[1].name, "message"))
+	  if (s->member[1].value.__any)
+	    printf("%s\n", s->member[1].value.__any);
+	  else
+	    printf("XML-RPC message format error: string value expected\n");
+	else 
+	  printf("XML-RPC message format error: string value \"message\" expected\n");
+      }
+      else
+        printf("XML-RPC message format error: struct with two members expected\n");
+    }
+    else
+      printf("XML-RPC message format error: struct expected\n");
+  }
+  soap_end(soap);
+  soap_done(soap);
+  free(soap);
+  return 0;
+}
+
+int methodCall(struct soap *soap, const char *URL, struct methodCall *m, struct methodResponse *r)
+{ /* no namespaces */
+  soap->namespaces = NULL;
+  /* no SOAP encodingStyle */
+  soap->encodingStyle = NULL;
+  /* connect, send request, and receive response */
+  if (soap_connect(soap, URL, NULL)
+   || soap_begin_send(soap)
+   || soap_put_methodCall(soap, m, "methodCall", NULL)
+   || soap_end_send(soap)
+   || soap_begin_recv(soap)
+   || !soap_get_methodResponse(soap, r, "methodResponse", NULL)
+   || soap_end_recv(soap))
+    return soap_closesock(soap); /* closes socket and returns soap->error */
+  soap_closesock(soap);
+  return SOAP_OK;
+}
+
+/* Don't need a namespace table. We put an empty one here to avoid link errors */
+struct Namespace namespaces[] = { {NULL, NULL} };
diff --git a/samples/xml-rpc/xml-rpc-weblogs.cpp b/samples/xml-rpc/xml-rpc-weblogs.cpp
new file mode 100644
index 0000000..d1bf168
--- /dev/null
+++ b/samples/xml-rpc/xml-rpc-weblogs.cpp
@@ -0,0 +1,81 @@
+/*
+
+XML-RPC weblogUpdates.ping example in C++
+
+See http://xmlrpc.scripting.com/weblogsCom for more details.
+
+Requires xml-rpc.h and xml-rpc.cpp
+
+Compile:
+soapcpp2 xml-rpc.h
+cc xml-rpc-weblogs.cpp xml-rpc.cpp xml-rpc-io.cpp stdsoap2.cpp soapC.cpp
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "soapH.h"
+#include "xml-rpc-io.h"
+
+using namespace std;
+
+#define ENDPOINT "http://rpc.weblogs.com/RPC2"
+
+int main()
+{ soap *ctx = soap_new();
+  // define the weblogsUpdates.ping method
+  methodCall ping(ctx, ENDPOINT, "weblogsUpdates.ping");
+  // define and set the two parameters of the method
+  params input(ctx);
+  input[0] = "Scripting News";
+  input[1] = "http://www.scripting.com/";
+  // make the call
+  params output = ping(input);
+  // error?
+  if (ping.error())
+    soap_print_fault(ctx, stderr);
+  else if (output.empty())
+    cout << ping.fault() << endl;
+  else
+  { if (output[0].is_struct())
+    { if (output[0]["flerror"].is_false())
+        cout << "Success: ";
+      else
+        cout << "Failure: ";
+      cout << output[0]["message"] << endl;
+    }
+    else
+      cout << "Message format error:" << endl << output[0] << endl;
+  }
+  soap_end(ctx);
+  soap_done(ctx);
+  free(ctx);
+  return 0;
+}
+
+/* Don't need a namespace table. We put an empty one here to avoid link errors */
+struct Namespace namespaces[] = { {NULL, NULL} };
diff --git a/samples/xml-rpc/xml-rpc.cpp b/samples/xml-rpc/xml-rpc.cpp
new file mode 100644
index 0000000..014675d
--- /dev/null
+++ b/samples/xml-rpc/xml-rpc.cpp
@@ -0,0 +1,633 @@
+/*
+
+XML-RPC definitions for C++
+
+Note: 
+XML-RPC declarations are given in the gSOAP header file xml-rpc.h
+Iterators and iostream operators are declared in xml-rpc-iters.h
+
+Example calling sequence:
+
+// get XML-RPC serializers
+#include "soapH.h"
+#include "xml-rpc-io.h"
+
+// set up context
+soap *ctx = soap_new();
+// define method
+methodCall myMethod(ctx, "<endpoint-URL>", "<method-name>");
+// populate input parameters
+myMethod[0] = ...; // first param
+myMethod[1] = ...; // second param
+...
+// make the call and get the response parameters
+params output = myMethod();
+// error?
+if (myMethod.error())
+  soap_print_fault(ctx, stderr);
+else if (output.empty())
+  cout << myMethod.fault() << endl;
+else
+  for (params::iterator arg = output.begin(); arg != output.end(); ++arg)
+    cout << *arg << endl;
+// delete all
+soap_destroy(ctx);
+soap_end(ctx);
+soap_done(ctx);
+free(ctx);
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "soapH.H"
+
+value::value()
+{ }
+
+value::value(struct soap *soap)
+{ soap_default_value(soap, this);
+}
+
+value::value(struct soap *soap, struct _array &a)
+{ soap_default_value(soap, this);
+  *this = a;
+}
+
+value::value(struct soap *soap, _base64 &b)
+{ soap_default_value(soap, this);
+  *this = b;
+}
+
+value::value(struct soap *soap, bool b)
+{ soap_default_value(soap, this);
+  *this = b;
+}
+
+value::value(struct soap *soap, char *s)
+{ soap_default_value(soap, this);
+  *this = s;
+}
+
+value::value(struct soap *soap, double d)
+{ soap_default_value(soap, this);
+  *this = d;
+}
+
+value::value(struct soap *soap, int n)
+{ soap_default_value(soap, this);
+  *this = n;
+}
+
+value::value(struct soap *soap, struct _struct &r)
+{ soap_default_value(soap, this);
+  *this = r;
+}
+
+bool value::is_array() const
+{ return __type == SOAP_TYPE__array;
+}
+
+bool value::is_base64() const
+{ return __type == SOAP_TYPE__base64;
+}
+
+bool value::is_bool() const
+{ return __type == SOAP_TYPE__boolean;
+}
+
+bool value::is_double() const
+{ return __type == SOAP_TYPE__double;
+}
+
+bool value::is_false() const
+{ return __type == SOAP_TYPE__boolean && (bool)*(_boolean*)ref == false;
+}
+
+bool value::is_int() const
+{ return __type == SOAP_TYPE__int || __type == SOAP_TYPE__i4;
+}
+
+bool value::is_struct() const
+{ return __type == SOAP_TYPE__struct;
+}
+
+bool value::is_string() const
+{ return __type == SOAP_TYPE__string || (__any && *__any);
+}
+
+bool value::is_true() const
+{ return __type == SOAP_TYPE__boolean && (bool)*(_boolean*)ref == true;
+}
+
+value::operator struct _array&()
+{ if (__type == SOAP_TYPE__array)
+    return *(struct _array*)ref;
+  return *soap_new__array(soap, -1);
+}
+
+value::operator const struct _array&() const
+{ if (__type == SOAP_TYPE__array)
+    return *(const struct _array*)ref;
+  return *soap_new__array(soap, -1);
+}
+
+value::operator struct _base64&()
+{ if (__type == SOAP_TYPE__base64)
+    return *(struct _base64*)ref;
+  return *soap_new__base64(soap, -1);
+}
+
+value::operator const struct _base64&() const
+{ if (__type == SOAP_TYPE__base64)
+    return *(const struct _base64*)ref;
+  return *soap_new__base64(soap, -1);
+}
+
+value::operator char*()
+{ if (__type == SOAP_TYPE__string || __type == SOAP_TYPE__dateTime_DOTiso8601)
+    return (char*)ref;
+  if (__any)
+    return __any;
+  return "";
+}
+
+value::operator const char*() const
+{ if (__type == SOAP_TYPE__string || __type == SOAP_TYPE__dateTime_DOTiso8601)
+    return (const char*)ref;
+  if (__any)
+    return __any;
+  return "";
+}
+
+value::operator double() const
+{ if (__type == SOAP_TYPE__double)
+    return (double)*(_double*)ref;
+  return 0.0;
+}
+
+value::operator int() const
+{ if (__type == SOAP_TYPE__int)
+    return (int)*(_int*)ref;
+  if (__type == SOAP_TYPE__i4)
+    return (int)*(_i4*)ref;
+  return 0;
+}
+
+value::operator struct _struct&()
+{ if (__type == SOAP_TYPE__struct)
+    return *(struct _struct*)ref;
+  return *soap_new__struct(soap, -1);
+}
+
+value::operator const struct _struct&() const
+{ if (__type == SOAP_TYPE__struct)
+    return *(const struct _struct*)ref;
+  return *soap_new__struct(soap, -1);
+}
+
+struct value& value::operator[](int n)
+{ return ((struct _array&)*this)[n];
+}
+
+struct value& value::operator[](const char *s)
+{ return ((struct _struct&)*this)[s];
+}
+
+struct _array& value::operator=(struct _array& a)
+{ __type = SOAP_TYPE__array;
+  __any = NULL;
+  ref = &a;
+  return a;
+}
+
+_base64& value::operator=(_base64& b)
+{ __type = SOAP_TYPE__base64;
+  __any = NULL;
+  ref = &b;
+  return b;
+}
+
+bool value::operator=(bool b)
+{ __type = SOAP_TYPE__boolean;
+  __any = NULL;
+  ref = soap_malloc(soap, sizeof(_boolean));
+  *(_boolean*)ref = (_boolean)b;
+  return b;
+}
+
+char* value::operator=(char *s)
+{ __type = SOAP_TYPE__string;
+  __any = NULL;
+  ref = soap_strdup(soap, s);
+  return s;
+}
+
+double value::operator=(double d)
+{ __type = SOAP_TYPE__double;
+  __any = NULL;
+  ref = soap_malloc(soap, sizeof(_double));
+  *(_double*)ref = (_double)d;
+  return d;
+}
+
+int value::operator=(int n)
+{ __type = SOAP_TYPE__int;
+  __any = NULL;
+  ref = soap_malloc(soap, sizeof(_int));
+  *(_int*)ref = (_int)n;
+  return n;
+}
+
+struct _struct& value::operator=(struct _struct& r)
+{ __type = SOAP_TYPE__struct;
+  __any = NULL;
+  ref = &r;
+  return r;
+}
+
+time_t value::operator=(time_t t)
+{ __type = SOAP_TYPE__dateTime_DOTiso8601;
+  __any = NULL;
+  ref = soap_strdup(soap, soap_dateTime2s(soap, t));
+  return t;
+}
+
+_struct::_struct()
+{ }
+
+_struct::_struct(struct soap *soap)
+{ soap_default__struct(soap, this);
+}
+
+_struct::_struct(struct soap *soap, int len)
+{ soap_default__struct(soap, this);
+  __size = len;
+  member = (struct member*)soap_malloc(soap, __size * sizeof(struct member));
+  for (int i = 0; i < __size; i++)
+    soap_default_member(soap, &member[i]);
+}
+
+bool _struct::empty() const
+{ return __size == 0;
+}
+
+int _struct::size() const
+{ return __size;
+}
+
+struct value& _struct::operator[](const char *s)
+{ int i = 0;
+  if (!member)
+  { __size = 1;
+    member = (struct member*)soap_malloc(soap, sizeof(struct member));
+  }
+  else
+  { for (i = 0; i < __size; i++)
+    { if (!strcmp(member[i].name, s))
+        return member[i].value;
+    }
+    __size++;
+    struct member *newmember = (struct member*)soap_malloc(soap, __size * sizeof(struct member));
+    for (i = 0; i < __size - 1; i++)
+      newmember[i] = member[i];
+    soap_unlink(soap, member);
+    free(member);
+    member = newmember;
+  }
+  member[i].name = soap_strdup(soap, s);
+  soap_default_value(soap, &member[i].value);
+  return member[i].value;
+}
+
+_struct_iterator _struct::begin()
+{ _struct_iterator iter(this);
+  return iter;
+}
+
+_struct_iterator _struct::end()
+{ _struct_iterator iter(this);
+  iter += __size;
+  return iter;
+}
+
+_array::_array()
+{ }
+
+_array::_array(struct soap *soap)
+{ soap_default__array(soap, this);
+}
+
+_array::_array(struct soap *soap, int len)
+{ soap_default__array(soap, this);
+  data.__size = len;
+  data.value = (struct value*)soap_malloc(soap, data.__size * sizeof(struct value));
+  for (int i = 0; i < data.__size; i++)
+    soap_default_value(soap, &data.value[i]);
+}
+
+bool _array::empty() const
+{ return data.__size == 0;
+}
+
+int _array::size() const
+{ return data.__size;
+}
+
+struct value& _array::operator[](int n)
+{ if (!data.value)
+  { data.__size = n + 1;
+    data.value = (struct value*)soap_malloc(soap, data.__size * sizeof(struct value));
+    for (int i = 0; i < data.__size; i++)
+      soap_default_value(soap, &data.value[i]);
+  }
+  else if (data.__size <= n)
+  { int oldsize = data.__size;
+    data.__size = n + 1;
+    struct value *newvalue = (struct value*)soap_malloc(soap, data.__size * sizeof(struct value));
+    int i;
+    for (i = 0; i < oldsize; i++)
+      newvalue[i] = data.value[i];
+    for (; i < data.__size; i++)
+      soap_default_value(soap, &newvalue[i]);
+    soap_unlink(soap, data.value);
+    free(data.value);
+    data.value = newvalue;
+  }
+  return data.value[n];
+}
+
+_array_iterator _array::begin()
+{ _array_iterator iter(this);
+  return iter;
+}
+
+_array_iterator _array::end()
+{ _array_iterator iter(this);
+  iter += data.__size;
+  return iter;
+}
+
+_base64::_base64()
+{ }
+
+_base64::_base64(struct soap *soap)
+{ soap_default__base64(soap, this);
+}
+
+int _base64::size() const
+{ return __size;
+}
+
+unsigned char* _base64::ptr()
+{ return __ptr;
+}
+
+params::params()
+{ }
+
+params::params(struct soap *soap)
+{ soap_default_params(soap, this);
+}
+
+params::params(struct soap *soap, int len)
+{ soap_default_params(soap, this);
+  __size = len;
+  param = (struct param*)soap_malloc(soap, __size * sizeof(struct param));
+  for (int i = 0; i < __size; i++)
+    soap_default_param(soap, &param[i]);
+}
+
+bool params::empty() const
+{ return __size == 0;
+}
+
+int params::size() const
+{ return __size;
+}
+
+struct value& params::operator[](int n)
+{ if (!param)
+  { __size = n + 1;
+    param = (struct param*)soap_malloc(soap, __size * sizeof(struct param));
+    for (int i = 0; i < __size; i++)
+      soap_default_param(soap, &param[i]);
+  }
+  else if (__size <= n)
+  { int oldsize = __size;
+    __size = n + 1;
+    struct param *newparam = (struct param*)soap_malloc(soap, __size * sizeof(struct param));
+    int i;
+    for (i = 0; i < oldsize; i++)
+      newparam[i] = param[i];
+    for (; i < __size; i++)
+      soap_default_param(soap, &newparam[i]);
+    soap_unlink(soap, param);
+    free(param);
+    param = newparam;
+  }
+  return param[n].value;
+}
+
+params_iterator params::begin()
+{ params_iterator iter(this);
+  return iter;
+}
+
+params_iterator params::end()
+{ params_iterator iter(this);
+  iter += __size;
+  return iter;
+}
+
+methodCall::methodCall()
+{ }
+
+methodCall::methodCall(struct soap *soap, const char *endpoint, const char *name)
+{ soap_default_methodCall(soap, this);
+  methodName = soap_strdup(soap, name);
+  methodEndpoint = soap_strdup(soap, endpoint);
+  methodResponse = NULL;
+}
+
+struct value& methodCall::operator[](int n)
+{ return params[n];
+}
+
+struct params& methodCall::operator()()
+{ /* no namespaces */
+  soap->namespaces = NULL;
+  /* no SOAP encodingStyle */
+  soap->encodingStyle = NULL;
+  /* connect, send request, and receive response */
+  if (soap_connect(soap, methodEndpoint, NULL)
+   || soap_begin_send(soap)
+   || soap_put_methodCall(soap, this, "methodCall", NULL)
+   || soap_end_send(soap)
+   || soap_begin_recv(soap)
+   || !(methodResponse = soap_get_methodResponse(soap, methodResponse, "methodResponse", NULL))
+   || soap_end_recv(soap))
+    methodResponse = NULL;
+  soap_closesock(soap);
+  if (methodResponse && methodResponse->params)
+    return *methodResponse->params;
+  return *soap_new_params(soap, -1);
+}
+
+struct params& methodCall::operator()(const struct params& args)
+{ /* parameters */
+  params = args;
+  /* invoke */
+  return (*this)();
+}
+
+struct params& methodCall::response()
+{ if (!methodResponse)
+    methodResponse = soap_new_methodResponse(soap, -1);
+  if (!methodResponse->params)
+    methodResponse->params = soap_new_params(soap, -1);
+  return *methodResponse->params;
+}
+
+struct value& methodCall::fault()
+{ if (methodResponse && methodResponse->fault)
+    return methodResponse->fault->value;
+  return *soap_new_value(soap, -1);
+}
+
+int methodCall::error() const
+{ return soap->error;
+}
+
+methodResponse::methodResponse()
+{ }
+
+methodResponse::methodResponse(struct soap *soap)
+{ soap_default_methodResponse(soap, this);
+}
+
+_array_iterator::_array_iterator()
+{ value = start = NULL;
+}
+
+_array_iterator::_array_iterator(const struct _array* a)
+{ value = start = a->data.value;
+}
+
+bool _array_iterator::operator==(const _array_iterator& that) const
+{ return this->value == that.value;
+}
+
+bool _array_iterator::operator!=(const _array_iterator& that) const
+{ return this->value != that.value;
+}
+
+int _array_iterator::index() const
+{ return value - start;
+}
+
+struct value& _array_iterator::operator*() const
+{ return *value;
+}
+
+_array_iterator& _array_iterator::operator++()
+{ value++;
+  return *this;
+}
+
+_array_iterator& _array_iterator::operator+=(int step)
+{ value += step;
+  return *this;
+}
+
+_struct_iterator::_struct_iterator()
+{ member = NULL;
+}
+
+_struct_iterator::_struct_iterator(const struct _struct* s)
+{ member = s->member;
+}
+
+bool _struct_iterator::operator==(const _struct_iterator& that) const
+{ return this->member == that.member;
+}
+
+bool _struct_iterator::operator!=(const _struct_iterator& that) const
+{ return this->member != that.member;
+}
+
+const char* _struct_iterator::index() const
+{ return member->name;
+}
+
+struct value& _struct_iterator::operator*() const
+{ return member->value;
+}
+
+_struct_iterator& _struct_iterator::operator++()
+{ member++;
+  return *this;
+}
+
+_struct_iterator& _struct_iterator::operator+=(int step)
+{ member += step;
+  return *this;
+}
+
+params_iterator::params_iterator()
+{ start = param = NULL;
+}
+
+params_iterator::params_iterator(const struct params* s)
+{ start = param = s->param;
+}
+
+bool params_iterator::operator==(const params_iterator& that) const
+{ return this->param == that.param;
+}
+
+bool params_iterator::operator!=(const params_iterator& that) const
+{ return this->param != that.param;
+}
+
+int params_iterator::index() const
+{ return param - start;
+}
+
+struct value& params_iterator::operator*() const
+{ return param->value;
+}
+
+params_iterator& params_iterator::operator++()
+{ param++;
+  return *this;
+}
+
+params_iterator& params_iterator::operator+=(int step)
+{ param += step;
+  return *this;
+}
diff --git a/samples/xml-rpc/xml-rpc.h b/samples/xml-rpc/xml-rpc.h
new file mode 100644
index 0000000..90a6718
--- /dev/null
+++ b/samples/xml-rpc/xml-rpc.h
@@ -0,0 +1,253 @@
+/*
+
+XML-RPC binding for C or C++
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "xml-rpc-iters.h"	// deferred to C++ compiler
+
+/// for C++ only: external iterator class for structs
+extern class _struct_iterator;
+
+/// for C++ only: external iterator class for arrays
+extern class _array_iterator;
+
+/// for C++ only: external iterator class for parameters
+extern class params_iterator;
+
+/// Scalar <boolean> element
+
+typedef char		_boolean;	///< boolean values are 0 (false) or 1 (true)
+
+/// Scalar <double> element
+
+typedef double		_double;	///< double floating point value
+
+/// Scalar <i4> element
+
+typedef int		_i4;		///< 32bit int value
+
+/// Scalar <int> element
+
+typedef int		_int;		///< 32bit int value
+
+/// Scalar <string> element
+
+typedef char*		_string;	///< string value
+
+/// Scalar <dateTime.iso8601> element
+
+typedef char*		_dateTime_DOTiso8601;	///< ISO8601 date and time formatted string
+
+/// <base64> binary data element
+
+struct _base64
+{ unsigned char*	__ptr;		///< pointer to raw binary data block
+  int			__size;		///< size of raw binary data block
+// C++ function members, not available in C (when using stdsoap2 -c)
+public:
+  			_base64();
+  			_base64(struct soap*);
+  int			size() const;	///< byte size of data
+  unsigned char*	ptr();		///< pointer to data
+};
+
+/// <struct> element
+
+struct _struct
+{ int			__size;		///< number of members
+  struct member*	member;		///< pointer to member array
+// C++ function members, not available in C (when using stdsoap2 -c)
+public:
+  typedef _struct_iterator iterator;
+  			_struct();
+  			_struct(struct soap*);
+  			_struct(struct soap*, int);
+  extern bool		empty() const;	///< true when struct is empty
+  int			size() const;	///< number of accessors in struct
+  struct value&		operator[](const char*);///< struct accessor index
+  _struct_iterator	begin();	///< struct accessor iterator begin
+  _struct_iterator	end();		///< struct accessor iterator end
+  struct soap*		soap;		///< ref to soap struct that manages this type
+};
+
+/// <data> element
+
+struct data
+{ int			__size;		///< number of array elements
+  struct value*		value;		///< pointer to array elements
+};
+
+/// <array> element
+
+struct _array
+{ struct data		data;		///< data with values
+// C++ function members, not available in C (when using stdsoap2 -c)
+public:
+  typedef _array_iterator iterator;
+  			_array();
+  			_array(struct soap*);
+  			_array(struct soap*, int);
+  extern bool		empty() const;	///< true when array is empty
+  int			size() const;	///< number of array elements
+  struct value&		operator[](int);///< array index
+  _array_iterator	begin();	///< array iterator begin
+  _array_iterator	end();		///< array iterator end
+  struct soap*		soap;		///< ref to soap struct that manages this type
+};
+
+/// <value>
+
+/**
+The value element contains either string data stored in __any or an other type
+of data stored in a subelement. In case of a subelement, the __type member
+indicates the type of data pointed to by the ref member. For example, when
+__type = SOAP_TYPE__int then *(int*)ref is an integer and when __type =
+SOAP_TYPE__string (char*)ref is a string.
+*/
+struct value
+{ int			__type 0;	///< optional SOAP_TYPE_X, where X is a type name
+  void*			ref;		///< ref to data
+  char*			__any;		///< <value> string content, when present
+// C++ function members, not available in C (when using stdsoap2 -c)
+public:
+			value();
+			value(struct soap*);
+			value(struct soap*, struct _array&);
+			value(struct soap*, struct _base64&);
+			value(struct soap*, bool);
+			value(struct soap*, char*);
+			value(struct soap*, double);
+			value(struct soap*, int);
+			value(struct soap*, struct _struct&);
+			operator struct _array&();
+			operator const struct _array&() const;
+			operator struct _base64&();
+			operator const struct _base64&() const;
+			operator char*();
+			operator const char*() const;
+			operator double() const;
+			operator int() const;
+			operator struct _struct&();
+			operator const struct _struct&() const;
+  struct value&		operator[](int);
+  struct value&		operator[](const char*);
+  struct _array&	operator=(struct _array&);
+  struct _base64&	operator=(struct _base64&);
+  extern bool		operator=(bool);
+  char*			operator=(char*);
+  double		operator=(double);
+  int			operator=(int);
+  struct _struct&	operator=(struct _struct&);
+  time_t		operator=(time_t);
+  extern bool		is_array() const;	///< true if value is array type
+  extern bool		is_base64() const;	///< true if value is base64 type
+  extern bool		is_bool() const;	///< true if value is boolean type
+  extern bool		is_double() const;	///< true if value is double type
+  extern bool		is_false() const;	///< true if value is boolean false
+  extern bool		is_int() const;		///< true if value is int type
+  extern bool		is_string() const;	///< true if value is string type
+  extern bool		is_struct() const;	///< true if value is struct type
+  extern bool		is_true() const;	///< true if value is boolean true
+  struct soap*		soap;		///< ref to soap struct that manages this type
+};
+
+/// <member>
+
+struct member
+{ char*			name;		///< struct accessor name
+  struct value		value;		///< struct accessor value
+};
+
+/// <params>
+
+struct params
+{ int			__size;		///< number of parameters
+  struct param*		param;		///< pointer to array of parameters
+// C++ function members, not available in C (when using stdsoap2 -c)
+public:
+  typedef params_iterator iterator;
+  			params();
+  			params(struct soap*);
+  			params(struct soap*, int);
+  extern bool		empty() const;	///< true if no parameters
+  int			size() const;	///< number of parameters
+  struct value&		operator[](int);///< parameter index
+  params_iterator	begin();	///< struct accessor iterator begin
+  params_iterator	end();		///< struct accessor iterator end
+  struct soap*		soap;		///< ref to soap struct that manages this type
+};
+
+/// <param>
+
+struct param
+{ struct value		value;		///< parameter value
+// C++ function members, not available in C (when using stdsoap2 -c)
+public:
+  struct soap*		soap;		///< ref to soap struct that manages this type
+};
+
+/// <methodResponse>
+ 
+struct methodResponse
+{ struct params*	params;		///< response parameters
+  struct fault*		fault;		///< response fault
+public:
+  			methodResponse();
+  			methodResponse(struct soap*);
+  struct soap*		soap;		///< ref to soap struct that manages this type
+};
+  
+/// <methodCall>
+
+struct methodCall
+{ char*			methodName;	///< name of the method
+  struct params		params;		///< method request parameters
+// C++ function members, not available in C (when using stdsoap2 -c)
+private:
+  char*			methodEndpoint;	///< XML-RPC endpoint
+  struct methodResponse*methodResponse; ///< holds the response after the call
+public:
+  			methodCall();
+  			methodCall(struct soap*, const char*, const char*);
+  struct value&		operator[](int);///< method parameter accessor index
+  struct params&	operator()();	///< method invocation
+  struct params&	operator()(const struct params&);
+  					///< method invocation with param list
+  struct params&	response();	///< get last response
+  struct value&		fault();	///< fault value
+  int			error() const;	///< gSOAP error code
+  struct soap*		soap;		///< ref to soap struct that manages this type
+};
+
+/// <fault>
+
+struct fault
+{ struct value		value;		///< value of the fault
+};
diff --git a/soapcpp2 b/soapcpp2
new file mode 100755
index 0000000..7ae7080
--- /dev/null
+++ b/soapcpp2
Binary files differ
diff --git a/soapcpp2.exe b/soapcpp2.exe
new file mode 100755
index 0000000..d7ce862
--- /dev/null
+++ b/soapcpp2.exe
Binary files differ
diff --git a/soapcpp2_mac b/soapcpp2_mac
new file mode 100755
index 0000000..a34b7f7
--- /dev/null
+++ b/soapcpp2_mac
Binary files differ
diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 0000000..fbe7926
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,24 @@
+CC=gcc
+CPP=g++
+LIBS=/usr/lib/libl.a
+COFLAGS=-O1
+#COFLAGS=-g -DDEBUG
+CWFLAGS=
+CIFLAGS=
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+soapcpp2:	soapcpp2.h soapcpp2_yacc.o symbol2.o error2.o lex.yy.o init2.o soapcpp2.o
+		$(CC) $(CFLAGS) symbol2.o error2.o soapcpp2_yacc.o lex.yy.o init2.o soapcpp2.o $(LIBS) -o $@
+		cp soapcpp2 ../
+soapcpp2_yacc.c:	soapcpp2_yacc.y soapcpp2.h error2.h
+		bison -d -v soapcpp2_yacc.y
+		mv -f soapcpp2_yacc.tab.h soapcpp2_yacc.h
+		mv -f soapcpp2_yacc.tab.c soapcpp2_yacc.c
+lex.yy.c:	soapcpp2_yacc.h soapcpp2_yacc.c soapcpp2_lex.l
+		flex -l soapcpp2_lex.l
+.c.o:		soapcpp2.h soapcpp2_yacc.h error2.h
+		$(CC) $(CFLAGS) -DWITH_BISON -DWITH_FLEX -c $<
+clean:		
+		rm -f *.o
+distclean:		
+		rm -f soapcpp2 *.o lex.yy.* soapcpp2_yacc.h soapcpp2_yacc.c y.tab.* *.output soapcpp2 ../soapcpp2
diff --git a/src/MakefileMacOSX b/src/MakefileMacOSX
new file mode 100644
index 0000000..84e44fb
--- /dev/null
+++ b/src/MakefileMacOSX
@@ -0,0 +1,23 @@
+CC=gcc
+CPP=g++
+LIBS=/usr/lib/libl.a
+COFLAGS=-O1
+#COFLAGS=-g -DDEBUG
+CWFLAGS=-arch i386 -arch ppc
+CIFLAGS=
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+soapcpp2:	soapcpp2.h soapcpp2_yacc.o symbol2.o error2.o lex.yy.o init2.o soapcpp2.o
+		$(CC) $(CFLAGS) symbol2.o error2.o soapcpp2_yacc.o lex.yy.o init2.o soapcpp2.o $(LIBS) -o $@
+soapcpp2_yacc.c:	soapcpp2_yacc.y soapcpp2.h error2.h
+		bison -d -v soapcpp2_yacc.y
+		mv -f soapcpp2_yacc.tab.h soapcpp2_yacc.h
+		mv -f soapcpp2_yacc.tab.c soapcpp2_yacc.c
+lex.yy.c:	soapcpp2_yacc.h soapcpp2_yacc.c soapcpp2_lex.l
+		flex -l soapcpp2_lex.l
+.c.o:		soapcpp2.h soapcpp2_yacc.h error2.h
+		$(CC) $(CFLAGS) -DWITH_BISON -DWITH_FLEX -c $<
+clean:		
+		rm -f *.o
+distclean:		
+		rm -f soapcpp2 *.o lex.yy.* soapcpp2_yacc.h soapcpp2_yacc.c y.tab.* *.output soapcpp2
diff --git a/src/README.txt b/src/README.txt
new file mode 100644
index 0000000..6836413
--- /dev/null
+++ b/src/README.txt
@@ -0,0 +1,32 @@
+The soapcpp2 compiler source distribution contains the following files:
+
+README.txt	This file
+Makefile	Unix/linux makefile
+MakefileMacOSX	Mac OS X Makefile
+soapcpp2.h	Main header file
+soapcpp2.c	Main application
+symbol2.c	Symbol table handling and code generation module
+error2.h	Header file for error2.c
+error2.c	Error handling routines
+init2.c		Compiler symbol table initialization
+soapcpp2_lex.l	Flex/Lex tokens
+soapcpp2_yacc.y	Yacc/Bison grammar
+
+
+BUILD NOTES
+
+QNX
+===
+
+On QNX the bison.simple file is located in $QNX_HOST/usr/share/bison.simple
+Update your .profile to include:
+
+export BISON_SIMPLE=$QNX_HOST/usr/share/bison/bison.simple 
+export BISON_HAIRY=$QNX_HOST/usr/share/bison/bison.hairy 
+
+WIN32
+=====
+
+Bison 1.6 can crash on Win32 systems if YYINITDEPTH is too small Compile with
+/DYYINITDEPTH=1000
+
diff --git a/src/error2.c b/src/error2.c
new file mode 100644
index 0000000..421a050
--- /dev/null
+++ b/src/error2.c
@@ -0,0 +1,158 @@
+/*
+
+error2.c
+
+Error handling.
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2004 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "soapcpp2.h"
+#include "soapcpp2_yacc.h"
+
+#define	MAXERR 10
+
+extern char yytext[];	/* lexeme found by the lexical analyzer */
+
+static int lexerrno = 0;
+static int synerrno = 0;
+static int semerrno = 0;
+static int semwarno = 0;
+
+char errbuf[1024];	/* to hold error messages */
+
+/*
+yyerror - called by parser from an error production with nonterminal `error'
+*/
+yyerror(char *s)
+{	fprintf(stderr, "%s(%d): %s\n", filename, yylineno, s);
+}
+
+/*
+lexerror - called by lexical analyzer upon failure to recognize a token
+*/
+lexerror(const char *s)
+{	fprintf(stderr, "%s(%d): %s: %s\n", filename, yylineno, s, yytext);
+	if (lexerrno++ >= MAXERR)
+		execerror("too many syntactic errors, bailing out");
+}
+
+/*
+synerror - called by a semantic action in the yacc grammar
+*/
+synerror(const char *s)
+{	fprintf(stderr, "%s(%d): Syntax error: %s\n", filename, yylineno-1, s);
+	if (synerrno++ >= MAXERR)
+		execerror("too many syntactic errors, bailing out");
+}
+
+/*
+semerror - report semantic error from static checking
+*/
+semerror(const char *s)
+{	fprintf(stderr, "\n%s(%d): **ERROR**: %s\n\n", filename, yylineno, s);
+	if (semerrno++ >= MAXERR)
+		execerror("too many semantic errors, bailing out");
+}
+
+/*
+semwarn - report semantic warning from static checking
+*/
+semwarn(const char *s)
+{	fprintf(stderr, "\n**WARNING**: %s (detected at line %d in %s)\n\n", s, yylineno, filename);
+	semwarno++;
+}
+
+/*
+compliancewarn - report compliance warning
+*/
+compliancewarn(const char *s)
+{	fprintf(stderr, "Compliance warning: %s\n", s);
+}
+
+/*
+typerror - report type error (a semantic error)
+*/
+typerror(const char *s)
+{	fprintf(stderr, "%s(%d): Type error: %s\n", filename, yylineno, s);
+	if (semerrno++ >= MAXERR)
+		execerror("too many semantic errors, bailing out");
+}
+
+/*
+execerror - print error message and terminate execution
+*/
+execerror(const char *s)
+{	fprintf(stderr, "Critical error: %s\n", s);
+	exit(1);
+}
+
+/*
+progerror - called when check(expr) failed, i.e. upon programming error
+*/
+progerror(const char *s, const char *f, int l)
+{	fprintf(stderr, "Program failure: %s in file %s line %d\n", s, f, l);
+	exit(1);
+}
+
+/*
+errstat - show error statistics
+*/
+int errstat()
+{	if (!lexerrno && !synerrno && !semerrno)
+	{	fprintf(stderr, "\nCompilation successful ");
+		if (semwarno)
+			fprintf(stderr, "(%d warning%s)\n\n", semwarno, semwarno>1?"s":"");
+		else
+			fprintf(stderr, "\n\n");
+		return 0;
+	}
+	fprintf(stderr, "\nThere were errors:\n");
+	if (lexerrno)
+		fprintf(stderr, "%d lexical error%s\n", lexerrno, lexerrno>1?"s":"");
+	if (synerrno)
+		fprintf(stderr, "%d syntax error%s\n", synerrno, synerrno>1?"s":"");
+	if (semerrno)
+		fprintf(stderr, "%d semantic error%s\n", semerrno, semerrno>1?"s":"");
+	if (semwarno)
+		fprintf(stderr, "%d warning%s\n", semwarno, semwarno>1?"s":"");
+	fprintf(stderr, "\n");
+	return -1;
+}
diff --git a/src/error2.h b/src/error2.h
new file mode 100644
index 0000000..fe14576
--- /dev/null
+++ b/src/error2.h
@@ -0,0 +1,63 @@
+/*
+
+error2.h
+
+Error handling.
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2003 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+extern char errbuf[];
+
+#ifdef WIN32
+extern soapcpp2error(char*);
+#else
+extern yyerror(char*);
+#endif
+
+extern lexerror(const char*);
+extern synerror(const char *);
+extern semerror(const char *);
+extern semwarn(const char *);
+extern compliancewarn(const char *);
+extern typerror(const char*);
+extern execerror(const char*);
+extern progerror(const char*, const char*, int);
+extern errstat();
diff --git a/src/init2.c b/src/init2.c
new file mode 100644
index 0000000..3caddbd
--- /dev/null
+++ b/src/init2.c
@@ -0,0 +1,208 @@
+/*
+
+init2.c
+
+Symbol table initialization.
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2004 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "soapcpp2.h"
+#include "soapcpp2_yacc.h"
+
+typedef	struct Keyword
+{ char *s;	/* name */
+  Token t;	/* token */
+} Keyword;
+
+static Keyword keywords[] =
+{	"asm",		NONE,
+	"auto",		AUTO,
+	"bool",		BOOL,
+	"break",	BREAK,
+	"case",		CASE,
+	"catch",	NONE,
+	"char",		CHAR,
+	"class",	CLASS,
+	"const",	CONST,
+	"const_cast",	NONE,
+	"continue",	CONTINUE,
+	"default",	DEFAULT,
+	"delete",	NONE,
+	"do",		DO,
+	"double",	DOUBLE,
+	"dynamic_cast",	NONE,
+	"else",		ELSE,
+	"enum",		ENUM,
+	"errno",	NONE,
+	"explicit",	EXPLICIT,
+	"export",	NONE,
+	"extern",	EXTERN,
+	"false",	CFALSE,
+	"float",	FLOAT,
+	"for",		FOR,
+	"friend",	FRIEND,
+	"goto",		GOTO,
+	"if",		IF,
+	"inline",	INLINE,
+	"int",		INT,
+	"int8_t",	CHAR,
+	"int16_t",	SHORT,
+	"int32_t",	LONG,
+	"int64_t",	LLONG,
+	"long",		LONG,
+	"LONG64",	LLONG,
+	"mutable",	NONE,
+	"namespace",	NAMESPACE,
+	"new",		NONE,
+	"NULL",		null,
+	"operator",	OPERATOR,
+	"private",	PRIVATE,
+	"protected",	PROTECTED,
+	"public",	PUBLIC,
+	"register",	REGISTER,
+	"reinterpret_cast",
+			NONE,
+	"restrict",	NONE,
+	"return",	RETURN,
+	"short",	SHORT,
+	"signed",	SIGNED,
+	"size_t",	SIZE,
+	"sizeof",	SIZEOF,
+	"static",	STATIC,
+	"static_cast",	NONE,
+	"struct",	STRUCT,
+	"switch",	SWITCH,
+	"template",	TEMPLATE,
+	"this",		NONE,
+	"throw",	NONE,
+	"time_t",	TIME,
+	"true",		CTRUE,
+	"typedef",	TYPEDEF,
+	"typeid",	NONE,
+	"typename",	TYPENAME,
+	"ULONG64",	ULLONG,
+	"union",	UNION,
+	"unsigned",	UNSIGNED,
+	"using",	USING,
+	"virtual",	VIRTUAL,
+	"void",		VOID,
+	"volatile",	VOLATILE,
+	"wchar_t",	WCHAR,
+	"while",	WHILE,
+
+	"operator!",	NONE,
+	"operator~",	NONE,
+	"operator=",	NONE,
+	"operator+=",	NONE,
+	"operator-=",	NONE,
+	"operator*=",	NONE,
+	"operator/=",	NONE,
+	"operator%=",	NONE,
+	"operator&=",	NONE,
+	"operator^=",	NONE,
+	"operator|=",	NONE,
+	"operator<<=",	NONE,
+	"operator>>=",	NONE,
+	"operator||",	NONE,
+	"operator&&",	NONE,
+	"operator|",	NONE,
+	"operator^",	NONE,
+	"operator&",	NONE,
+	"operator==",	NONE,
+	"operator!=",	NONE,
+	"operator<",	NONE,
+	"operator<=",	NONE,
+	"operator>",	NONE,
+	"operator>=",	NONE,
+	"operator<<",	NONE,
+	"operator>>",	NONE,
+	"operator+",	NONE,
+	"operator-",	NONE,
+	"operator*",	NONE,
+	"operator/",	NONE,
+	"operator%",	NONE,
+	"operator++",	NONE,
+	"operator--",	NONE,
+	"operator->",	NONE,
+	"operator[]",	NONE,
+	"operator()",	NONE,
+
+	"mustUnderstand",	MUSTUNDERSTAND,
+
+	"SOAP_ENV__Header",	ID,
+	"dummy",		ID,
+	"soap_header",		ID,
+
+	"SOAP_ENV__Fault",	ID,
+	"SOAP_ENV__Code",	ID,
+	"SOAP_ENV__Subcode",	ID,
+	"SOAP_ENV__Reason",	ID,
+	"SOAP_ENV__Text",	ID,
+	"SOAP_ENV__Detail",	ID,
+	"SOAP_ENV__Value",	ID,
+	"SOAP_ENV__Node",	ID,
+	"SOAP_ENV__Role",	ID,
+	"faultcode",		ID,
+	"faultstring",		ID,
+	"faultactor",		ID,
+	"detail",		ID,
+	"__type",		ID,
+	"fault",		ID,
+	"__any",		ID,
+
+	"_QName",		TYPE,
+	"_XML",			TYPE,
+	"std::string",		TYPE,
+	"std::wstring",		TYPE,
+
+	"/*?*/",		NONE,
+
+	0,			0
+};
+
+/*
+init - initialize symbol table with predefined keywords
+*/
+init()
+{ struct Keyword *k;
+  for (k = keywords; k->s; k++)
+    install(k->s, k->t);
+}
diff --git a/src/soapcpp2.c b/src/soapcpp2.c
new file mode 100644
index 0000000..60ed854
--- /dev/null
+++ b/src/soapcpp2.c
@@ -0,0 +1,243 @@
+/*
+
+soapcpp2.c
+
+Main compiler.
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2006, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2006, Robert van Engelen, Genivia Inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "soapcpp2.h"
+
+extern int init();
+extern int yyparse();
+extern FILE *yyin;
+
+FILE *fmsg;		/* fd to flush compiler messages */
+
+int vflag = 0;		/* SOAP version, 0=not set, 1=1.1, 2=1.2 */
+int wflag = 0;		/* when set, don't generate WSDL and schema files */
+int Cflag = 0;		/* when set, generate only files for clients */
+int cflag = 0;		/* when set, generate files with .c extension */
+int aflag = 0;		/* when set, use value of SOAP Action to dispatch method at server side */
+int eflag = 0;		/* when set, use SOAP RPC encoding by default */
+int iflag = 0;		/* when set, generate new style proxy/object classes inherited from soap struct */
+int mflag = 0;		/* when set, generate code that requires array/binary classes to explicitly remove malloced array */
+int nflag = 0;		/* when set, names the namespaces global struct '%NAME%_namespaces */
+int lflag = 0;		/* when set, create library */
+int Lflag = 0;		/* when set, don't generate soapClientLib/soapServerLib */
+int Sflag = 0;		/* when set, generate only files for servers */
+int tflag = 0;		/* when set, generates typed messsages (with xsi:type attributes) */
+int xflag = 0;		/* when set, excludes imported types */
+
+int stop_flag = 0;
+
+char dirpath[1024];	/* directory path for generated source files */
+char *prefix = "soap";	/* file name prefix for generated source files */
+char filename[1024];	/* current file name */
+char *importpath = NULL;/* file import path */
+
+/*
+IMPORTANT:
+
+The terms and conditions of use of this software do not allow for the removal
+of the copyright notice from the main program for visual display. For
+integrations with other software, a similar copyright notice must be produced
+that is visible to users of the software.
+*/
+
+int
+main(int argc, char **argv)
+{	int i, g;
+	char *a, *s;
+	fmsg = stderr;
+	strcpy(filename, "<stdin>");
+	for (i = 1; i < argc; i++)
+	{	a = argv[i];
+		if (*a == '-'
+#ifdef WIN32
+		 || *a == '/'
+#endif
+		)
+		{	g = 1;
+			while (g && *++a)
+				switch (*a)
+				{	case 'C':
+						Cflag = 1;
+						break;
+					case 'c':
+						cflag = 1;
+						break;
+					case 'd':
+						a++;
+						g = 0;
+						if (*a)
+							strcpy(dirpath, a);
+						else if (i < argc && argv[++i])
+							strcpy(dirpath, argv[i]);
+						else
+							execerror("Option -d requires a directory path");
+						if (*dirpath && dirpath[strlen(dirpath)-1] != '/' && dirpath[strlen(dirpath)-1] != '\\')
+							strcat(dirpath, SOAP_PATHCAT);
+						break;
+					case 'e':
+						eflag = 1;
+						break;
+					case 'a':
+						aflag = 1;
+						break;
+					case '?':
+					case 'h':
+						fprintf(stderr, "Usage: soapcpp2 [-1|-2] [-C|-S] [-L] [-a] [-c] [-d path] [-e] [-h] [-i] [-I path"SOAP_PATHSEP"path"SOAP_PATHSEP"...] [-l] [-m] [-n] [-p name] [-t] [-v] [-w] [-x] [infile]\n\n");
+						fprintf(stderr, "\
+-1      generate SOAP 1.1 bindings\n\
+-2      generate SOAP 1.2 bindings\n\
+-C	generate client-side code only\n\
+-S	generate server-side code only\n\
+-L	don't generate soapClientLib/soapServerLib\n\
+-a	use value of SOAPAction HTTP header to dispatch method at server side\n\
+-c      generate C source code\n\
+-dpath  use path to save files\n\
+-e	generate SOAP RPC encoding style bindings\n\
+-h	display help info\n\
+-i      generate service proxies and objects inherited from soap struct\n\
+-Ipath  use path(s) for #import\n\
+-l      generate linkable modules (experimental)\n\
+-m      generate Matlab(tm) code for MEX compiler\n\
+-n      use service name to rename service functions and namespace table\n\
+-pname  save files with new prefix name instead of 'soap'\n\
+-t      generate code for fully xsi:type typed SOAP/XML messaging\n\
+-v	display version info\n\
+-w	don't generate WSDL and schema files\n\
+-x	don't generate sample XML message files\n\
+infile	header file to parse (or stdin)\n\
+\n");
+						exit(0);
+					case 'I':
+						a++;
+						g = 0;
+						s = NULL;
+						if (*a)
+							s = a;
+						else if (i < argc && argv[++i])
+							s = argv[i];
+						else
+							execerror("Option -I requires an import path");
+						if (importpath && s)
+						{	char *t	= emalloc(strlen(importpath) + strlen(s) + 2);
+							strcpy(t, importpath);
+							strcat(t, SOAP_PATHSEP);
+							strcat(t, s);
+							importpath = t;
+						}
+						else
+							importpath = s;
+						break;
+					case 'i':
+						iflag = 1;
+						break;
+					case 'm':
+						mflag = 1;
+						break;
+					case 'n':
+						nflag = 1;
+						break;
+					case 'l':
+						lflag = 1;
+						break;
+					case 'L':
+						Lflag = 1;
+						break;
+					case 'S':
+						Sflag = 1;
+						break;
+					case 't':
+						tflag = 1;
+						break;
+					case 'w':
+						wflag = 1;
+						break;
+					case 'x':
+						xflag = 1;
+						break;
+					case 'p':
+						a++;
+						g = 0;
+						if (*a)
+							prefix = a;
+						else if (i < argc && argv[++i])
+							prefix = argv[i];
+						else
+							execerror("Option -p requires an output file name prefix");
+						break;
+					case '1':
+						vflag = 1;
+						envURI = "http://schemas.xmlsoap.org/soap/envelope/";
+						encURI = "http://schemas.xmlsoap.org/soap/encoding/";
+						break;
+					case '2':
+						vflag = 2;
+						envURI = "http://www.w3.org/2003/05/soap-envelope";
+						encURI = "http://www.w3.org/2003/05/soap-encoding";
+						rpcURI = "http://www.w3.org/2003/05/soap-rpc";
+						break;
+					case 'v':
+						stop_flag = 1;
+						break;
+					default:
+            					fprintf(stderr, "soapcpp2: Unknown option %s\n", a);
+            					exit(1);
+				}
+		}
+		else if (!(yyin = fopen(argv[i], "r")))
+		{	sprintf(errbuf, "Cannot open file \"%s\" for reading", argv[i]);
+			execerror(errbuf);
+		}
+		else
+			strcpy(filename, argv[i]);
+	}
+	fprintf(fmsg, "\n**  The gSOAP Stub and Skeleton Compiler for C and C++ "VERSION"\n**  Copyright (C) 2000-2006, Robert van Engelen, Genivia Inc.\n**  All Rights Reserved. This product is provided \"as is\", without any warranty.\n**  The gSOAP compiler is released under one of the following three licenses:\n**  GPL, the gSOAP public license, or the commercial license by Genivia Inc.\n\n");
+	if (stop_flag)
+	  exit(0);
+	init();
+	if (yyparse())
+		synerror("skipping the remaining part of the input");
+	return errstat();
+}
diff --git a/src/soapcpp2.h b/src/soapcpp2.h
new file mode 100644
index 0000000..8eb5451
--- /dev/null
+++ b/src/soapcpp2.h
@@ -0,0 +1,386 @@
+/*
+
+soapcpp2.h
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2006, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2006 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <ctype.h>
+#include <time.h>
+#include "error2.h"
+
+#ifndef VERSION
+#define VERSION "2.7.6e" /* Current version */
+#endif
+
+#ifdef WIN32
+#ifndef WITH_BISON
+#define WITH_BISON
+#endif
+#endif
+
+/* #define DEBUG */ /* uncomment to debug */
+
+#ifdef DEBUG
+#define	check(expr, msg) ((expr) ? 1 : progerror(msg, __FILE__, __LINE__))
+#define DBGLOG(DBGCMD) { DBGCMD; }
+#else
+#define check(expr, msg) (expr, 1)
+#define DBGLOG(DBGCMD)
+#endif
+
+#ifdef WITH_BISON
+#ifdef WIN32_WITHOUT_SOLARIS_FLEX
+#define yyparse soapcpp2parse
+#define yylex soapcpp2lex
+#define yyerror soapcpp2error
+#define yylval soapcpp2lval
+#define yychar soapcpp2char
+#define yydebug soapcpp2debug
+#define yynerrs soapcpp2nerrs
+#define yylineno soapcpp2lineno
+#define yytext soapcpp2text
+#define yyin soapcpp2in
+#define yywrap soapcpp2wrap
+#endif
+#endif
+
+#ifdef WIN32
+#define SOAP_PATHCAT "\\"
+#define SOAP_PATHSEP ";"
+#define LONG64 __int64
+#else
+#define SOAP_PATHCAT "/"
+#define SOAP_PATHSEP ":"
+#define LONG64 long long
+#endif
+
+#if defined(WIN32)
+#define SOAP_LONG_FORMAT "%I64d"
+#define SOAP_ULONG_FORMAT "%I64u"
+#define SOAP_XLONG_FORMAT "%I64x"
+#elif defined(TRU64)
+#define SOAP_LONG_FORMAT "%ld"
+#define SOAP_ULONG_FORMAT "%lu"
+#define SOAP_XLONG_FORMAT "%lx"
+#endif
+
+#ifndef SOAP_LONG_FORMAT
+#define SOAP_LONG_FORMAT "%lld"		/* printf format for 64 bit ints */
+#endif
+#ifndef SOAP_ULONG_FORMAT
+#define SOAP_ULONG_FORMAT "%llu"	/* printf format for unsigned 64 bit ints */
+#endif
+#ifndef SOAP_XLONG_FORMAT
+#define SOAP_XLONG_FORMAT "%llx"	/* printf format for unsigned 64 bit hex ints */
+#endif
+
+extern int yylineno;
+
+typedef	enum Bool {False, True} Bool;
+
+typedef	int Token;
+
+typedef	enum Type
+{	Tnone,
+	Tvoid,		/* primitive types */
+	Tchar,
+	Twchar,
+	Tshort,
+	Tint,
+	Tlong,
+	Tllong,
+	Tfloat,
+	Tdouble,
+	Tuchar,
+	Tushort,
+	Tuint,
+	Tulong,
+	Tullong,
+	Tenum,
+	Ttime,
+	Tclass,		/* compound types */
+	Tstruct,
+	Tunion,
+	Tpointer,
+	Treference,
+	Tarray,
+	Ttemplate,
+	Tfun
+} Type;
+
+#define	TYPES (Tfun+1)	/* number of type (operators) enumerated above */
+
+typedef	enum Storage
+{	Snone		= 0,
+	Sauto		= 0x000001,
+	Sregister	= 0x000002,
+	Sstatic		= 0x000004,
+	Sextern		= 0x000008,
+	Stypedef	= 0x000010,
+	Svirtual	= 0x000020,
+	Sconst		= 0x000040,
+	Sfriend		= 0x000080,
+	Sinline		= 0x000100,
+	Sconstobj	= 0x000200,
+	Sabstract	= 0x000400,
+	SmustUnderstand	= 0x000800,
+	Sreturn		= 0x001000,
+	Sattribute	= 0x002000,
+	Sexplicit	= 0x004000,
+	Sprivate	= 0x010000,
+	Sprotected	= 0x020000
+} Storage;
+
+typedef	enum Level { INTERNAL, GLOBAL, PARAM, LOCAL } Level;
+
+#define mknone()	mktype(Tnone,     NULL, 0)
+#define mkvoid()	mktype(Tvoid,     NULL, 0)
+#define mkbool()	mktype(Tenum,     booltable, 2)
+#define mkchar()	mktype(Tchar,     NULL, 1)
+#define mkwchart()	mktype(Twchar,    NULL, 4)
+#define mkshort()	mktype(Tshort,    NULL, 2)
+#define mkint()		mktype(Tint,      NULL, 4)
+#define mklong()	mktype(Tlong,     NULL, 8)
+#define mkllong()	mktype(Tllong,    NULL, 8)
+#define mkfloat()	mktype(Tfloat,    NULL, 4)
+#define mkdouble()	mktype(Tdouble,   NULL, 8)
+#define mkuchar()	mktype(Tuchar,    NULL, 1)	/* unsigned char */
+#define mkushort()	mktype(Tushort,   NULL, 2)	/* unsigned short */
+#define mkuint()	mktype(Tuint,     NULL, 4)	/* unsigned int */
+#define mkulong()	mktype(Tulong,    NULL, 8)	/* unsigned long */
+#define mkullong()	mktype(Tullong,   NULL, 8)	/* unsigned long */
+#define mktimet()	mktype(Ttime,     NULL, 4)
+#define mkenum(t)	mktype(Tenum,	  t,    4)
+#define mkmask(t)	mktype(Tenum,	  t,    8)
+#define	mkpointer(t)	mktype(Tpointer,  t,    4)
+#define	mkreference(t)	mktype(Treference,t,    4)
+#define	mkclass(t, w)	mktype(Tclass,    t,    w)
+#define	mkstruct(t, w)	mktype(Tstruct,   t,    w)
+#define	mkunion(t, w)	mktype(Tunion,    t,    w)
+#define	mkarray(t, w)	mktype(Tarray,    t,    w)
+#define	mkfun(t)	mktype(Tfun,      t,    0)
+#define mkstring()	mkpointer(mkchar())
+
+typedef struct Symbol
+{	char	*name;
+	Token	token;
+	struct	Symbol *next;
+} Symbol;
+
+Symbol	*install(const char*, Token), *lookup(const char*), *gensym(const char*), *gensymidx(const char*, int);
+
+typedef	struct Tnode
+{	Type	type;
+	void	*ref;
+	Symbol	*id;	/* struct/class/union/enum name */
+	Symbol	*base;	/* base class name */
+	Symbol	*sym;	/* typedef name */
+	struct	Entry *response; /* funcs only: points to response struct */
+	int	width;
+	int	transient;
+	int	imports;
+	struct	Tnode *next;
+        Bool	generated;
+        Bool	wsdl;
+	int	num;
+	char	*pattern;
+	long	minLength;
+	long	maxLength;
+} Tnode;
+
+typedef	union Value {
+	LONG64	i;
+	double	r;
+	char	*s;
+} Value;
+
+typedef	struct IDinfo {
+	Tnode	*typ;
+	Storage	sto;
+	Bool	hasval;		/* if true, identifier is constant */
+	Value	val;		/* ... with this value */
+	int	offset;
+	long	minOccurs;
+	long	maxOccurs;
+} IDinfo;
+
+typedef	struct Entry {
+	Symbol	*sym;
+	IDinfo	info;
+	Level	level;
+	int	lineno;
+	struct	Entry *next;
+} Entry;
+
+typedef	struct Table {
+	Symbol	*sym;
+	Level	level;
+	Entry	*list;
+	struct	Table *prev;
+} Table;
+
+typedef struct FNinfo {
+	Tnode	*ret;
+	Table	*args;
+} FNinfo;
+
+
+typedef	struct Node {
+	Tnode	*typ;
+	Storage	sto;
+	Bool	hasval;		/* if true, this node has a constant value */
+	Value	val;		/* ... this is the value */
+	long	minOccurs;
+	long	maxOccurs;
+	char	*pattern;
+} Node;
+
+#define ACTION 0
+#define HDRIN 1	
+#define HDROUT 2
+#define MIMEIN 4
+#define MIMEOUT 8
+#define COMMENT 16
+#define ENCODING 32
+#define RESPONSE_ENCODING 64
+#define STYLE 128
+#define FAULT 256
+
+typedef struct Data
+{	struct Data *next;
+	char *name;
+	char *part;
+} Data;
+
+typedef struct Method
+{	struct Method *next;
+	char *name;
+	short mess; /* see #defines above */
+	char *part;
+} Method;
+
+typedef struct Service
+{	struct Service *next;
+	char *ns;
+	char *name;
+	char *port;
+	char *binding;
+	char *definitions;
+	char *transport;
+	char *URL;
+	char *executable;
+	char *import;
+	char *URI;
+	char *WSDL;
+	char *style;
+	char *encoding;
+	char *elementForm;
+	char *attributeForm;
+	char *documentation;
+	struct Method *list;
+	struct Data *data;
+} Service;
+
+typedef struct Pragma
+{	struct Pragma *next;
+	char *pragma;
+} Pragma;
+
+extern Entry *enter(Table*, Symbol*), *entry(Table*, Symbol*), *reenter(Table*, Symbol*), *enumentry(Symbol*);
+
+extern Table *mktable(Table*);
+
+extern Tnode *mkmethod(Tnode*, Table*);
+
+extern char *emalloc(unsigned int);
+
+extern Tnode *mktype(Type, void*, int);
+extern Tnode *mksymtype(Tnode*, Symbol*);
+extern Tnode *mktemplate(Tnode*, Symbol*);
+
+extern int is_transient(Tnode*);
+extern int is_response(Tnode*);
+
+extern Table *typetable, *enumtable, *classtable, *booltable, *templatetable;
+
+extern void compile(Table*);
+extern void freetable(Table*);
+extern Entry *unlinklast(Table*); 
+
+extern FILE *fmsg;
+
+extern int aflag;
+extern int vflag;
+extern int wflag;
+extern int cflag;
+extern int Cflag;
+extern int eflag;
+extern int iflag;
+extern int mflag;
+extern int nflag;
+extern int lflag;
+extern int Lflag;
+extern int Sflag;
+extern int tflag;
+extern int xflag;
+extern int is_module;
+extern char dirpath[1024];
+extern char filename[1024];
+extern char *prefix;
+extern char *importpath;
+extern int custom_header;
+extern int custom_fault;
+extern Pragma *pragmas;
+extern Service *services;
+extern char *namespaceid;
+extern int transient;
+extern int imports;
+extern int typeNO;
+
+extern char *envURI;
+extern char *encURI;
+extern char *rpcURI;
+extern char *xsiURI;
+extern char *xsdURI;
diff --git a/src/soapcpp2.sln b/src/soapcpp2.sln
new file mode 100644
index 0000000..866aeb3
--- /dev/null
+++ b/src/soapcpp2.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soapcpp2", "soapcpp2.vcproj", "{BDD1B293-CE39-4BEC-8E63-8B1621F3EB56}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{BDD1B293-CE39-4BEC-8E63-8B1621F3EB56}.Debug|Win32.ActiveCfg = Debug|Win32
+		{BDD1B293-CE39-4BEC-8E63-8B1621F3EB56}.Debug|Win32.Build.0 = Debug|Win32
+		{BDD1B293-CE39-4BEC-8E63-8B1621F3EB56}.Release|Win32.ActiveCfg = Release|Win32
+		{BDD1B293-CE39-4BEC-8E63-8B1621F3EB56}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/src/soapcpp2.vcproj b/src/soapcpp2.vcproj
new file mode 100644
index 0000000..26e79f6
--- /dev/null
+++ b/src/soapcpp2.vcproj
@@ -0,0 +1,274 @@
+<?xml version="1.0" encoding="Windows-1252"?>

+<VisualStudioProject

+	ProjectType="Visual C++"

+	Version="9.00"

+	Name="soapcpp2"

+	ProjectGUID="{BDD1B293-CE39-4BEC-8E63-8B1621F3EB56}"

+	RootNamespace="soapcpp2"

+	Keyword="Win32Proj"

+	TargetFrameworkVersion="131072"

+	>

+	<Platforms>

+		<Platform

+			Name="Win32"

+		/>

+	</Platforms>

+	<ToolFiles>

+	</ToolFiles>

+	<Configurations>

+		<Configuration

+			Name="Debug|Win32"

+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"

+			IntermediateDirectory="$(ConfigurationName)"

+			ConfigurationType="1"

+			CharacterSet="1"

+			>

+			<Tool

+				Name="VCPreBuildEventTool"

+			/>

+			<Tool

+				Name="VCCustomBuildTool"

+			/>

+			<Tool

+				Name="VCXMLDataGeneratorTool"

+			/>

+			<Tool

+				Name="VCWebServiceProxyGeneratorTool"

+			/>

+			<Tool

+				Name="VCMIDLTool"

+			/>

+			<Tool

+				Name="VCCLCompilerTool"

+				 

+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;YY_NEVER_INTERACTIVE;_CRT_SECURE_NO_WARNINGS"

+				 

+				 

+				DisableLanguageExtensions="true"

+				 

+				 

+			/>

+			<Tool

+				Name="VCManagedResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCPreLinkEventTool"

+			/>

+			<Tool

+				Name="VCLinkerTool"

+				AdditionalDependencies="kernel32.lib $(NoInherit)"

+				 

+				

+				SubSystem="1"

+				

+				

+				TargetMachine="1"

+			/>

+			<Tool

+				Name="VCALinkTool"

+			/>

+			<Tool

+				Name="VCManifestTool"

+			/>

+			<Tool

+				Name="VCXDCMakeTool"

+			/>

+			<Tool

+				Name="VCBscMakeTool"

+			/>

+			<Tool

+				Name="VCFxCopTool"

+			/>

+			<Tool

+				Name="VCAppVerifierTool"

+			/>

+			<Tool

+				Name="VCPostBuildEventTool"

+			/>

+		</Configuration>

+		<Configuration

+			Name="Release|Win32"

+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"

+			IntermediateDirectory="$(ConfigurationName)"

+			ConfigurationType="1"

+			CharacterSet="1"

+			 

+			>

+			<Tool

+				Name="VCPreBuildEventTool"

+			/>

+			<Tool

+				Name="VCCustomBuildTool"

+			/>

+			<Tool

+				Name="VCXMLDataGeneratorTool"

+			/>

+			<Tool

+				Name="VCWebServiceProxyGeneratorTool"

+			/>

+			<Tool

+				Name="VCMIDLTool"

+			/>

+			<Tool

+				Name="VCCLCompilerTool"

+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;YY_NEVER_INTERACTIVE;_CRT_SECURE_NO_WARNINGS"

+				 

+				DisableLanguageExtensions="true"

+				 

+			/>

+			<Tool

+				Name="VCManagedResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCPreLinkEventTool"

+			/>

+			<Tool

+				Name="VCLinkerTool"

+				AdditionalDependencies="kernel32.lib $(NoInherit)"

+				 

+				

+				SubSystem="1"

+				OptimizeReferences="2"

+				EnableCOMDATFolding="2"

+				

+				

+				TargetMachine="1"

+			/>

+			<Tool

+				Name="VCALinkTool"

+			/>

+			<Tool

+				Name="VCManifestTool"

+			/>

+			<Tool

+				Name="VCXDCMakeTool"

+			/>

+			<Tool

+				Name="VCBscMakeTool"

+			/>

+			<Tool

+				Name="VCFxCopTool"

+			/>

+			<Tool

+				Name="VCAppVerifierTool"

+			/>

+			<Tool

+				Name="VCPostBuildEventTool"

+			/>

+		</Configuration>

+	</Configurations>

+	<References>

+	</References>

+	<Files>

+		<Filter

+			Name="Source Files"

+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"

+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"

+			>

+			<File

+				RelativePath=".\error2.c"

+				>

+			</File>

+			<File

+				RelativePath=".\init2.c"

+				>

+			</File>

+			<File

+				RelativePath=".\lex.soapcpp2_lex.c"

+				>

+			</File>

+			<File

+				RelativePath=".\soapcpp2.c"

+				>

+			</File>

+			<File

+				RelativePath=".\soapcpp2_yacc.tab.c"

+				>

+			</File>

+			<File

+				RelativePath=".\symbol2.c"

+				>

+			</File>

+		</Filter>

+		<Filter

+			Name="Header Files"

+			Filter="h;hpp;hxx;hm;inl;inc;xsd"

+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"

+			>

+			<File

+				RelativePath=".\error2.h"

+				>

+			</File>

+			<File

+				RelativePath=".\soapcpp2.h"

+				>

+			</File>

+			<File

+				RelativePath=".\soapcpp2_yacc.h"

+				>

+			</File>

+		</Filter>

+		<Filter

+			Name="Resource Files"

+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"

+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"

+			>

+		</Filter>

+		<File

+			RelativePath=".\soapcpp2_lex.l"

+			>

+			<FileConfiguration

+				Name="Debug|Win32"

+				>

+				<Tool

+					Name="VCCustomBuildTool"

+					Description="Calling Flex"

+					CommandLine="flex -l -t  $(InputPath) &gt; lex.soapcpp2_lex.c"

+					Outputs="lex.soapcpp2_lex.c"

+				/>

+			</FileConfiguration>

+			<FileConfiguration

+				Name="Release|Win32"

+				>

+				<Tool

+					Name="VCCustomBuildTool"

+					Description="Calling Flex"

+					CommandLine="flex -l -t  $(InputPath) &gt; lex.soapcpp2_lex.c"

+					Outputs="lex.soapcpp2_lex.c"

+				/>

+			</FileConfiguration>

+		</File>

+		<File

+			RelativePath=".\soapcpp2_yacc.y"

+			>

+			<FileConfiguration

+				Name="Debug|Win32"

+				>

+				<Tool

+					Name="VCCustomBuildTool"

+					Description="Calling Bison"

+					CommandLine="bison -d -v $(InputPath)&#x0D;&#x0A;; copy soapcpp2_yacc.tab.h soapcpp2_yacc.h"

+					Outputs="soapcpp2_yacc.tab.c soapcpp2_yacc.h"

+				/>

+			</FileConfiguration>

+			<FileConfiguration

+				Name="Release|Win32"

+				>

+				<Tool

+					Name="VCCustomBuildTool"

+					Description="Calling Bison"

+					CommandLine="bison -d -v $(InputPath)&#x0D;&#x0A;; copy soapcpp2_yacc.tab.h soapcpp2_yacc.h"

+					Outputs="soapcpp2_yacc.tab.c soapcpp2_yacc.h"

+				/>

+			</FileConfiguration>

+		</File>

+	</Files>

+	<Globals>

+	</Globals>

+</VisualStudioProject>

diff --git a/src/soapcpp2_lex.l b/src/soapcpp2_lex.l
new file mode 100644
index 0000000..1f9a2f6
--- /dev/null
+++ b/src/soapcpp2_lex.l
@@ -0,0 +1,864 @@
+/*
+
+soapcpp2_lex.l
+
+Flex/Lex tokenizer.
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2004 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+%{
+#include "soapcpp2.h"
+#include "soapcpp2_yacc.h"
+#ifdef WITH_BISON
+YYSTYPE soapcpp2lval;
+#undef YY_INPUT
+#define YY_INPUT(buf, result, max_size) \
+	{ \
+	int c = getc(yyin); \
+	result = (c == EOF) ? YY_NULL : (buf[0] = c, 1); \
+	}
+#endif
+
+#ifndef WITH_LEX
+#define MAX_IMPORT_DEPTH 16
+static struct imported { struct imported *next; char name[1]; } *imported = NULL;
+static char fnstk[MAX_IMPORT_DEPTH][1024];
+static int lnstk[MAX_IMPORT_DEPTH];
+static YY_BUFFER_STATE instk[MAX_IMPORT_DEPTH];
+#endif
+int imports = 0;
+int is_module = 0;
+static Token install_id();
+static Token install_int();
+static Token install_hex();
+static Token install_num();
+static Token install_chr();
+static Token install_str();
+static Token install_pragma();
+static void directive(), option();
+static Token error_chr();
+static Token error_str();
+static int convchar(int*);
+static int hexchar(int*);
+static int octchar(int*);
+static void module(const char *name), import(const char *file);
+static void endimport();
+static int magic(const char *name);
+%}
+ws		[ \t\v\n\f\r\x1A\xA0]
+digit		[0-9]
+alpha		[a-zA-Z_]
+scope		::
+id		{alpha}({alpha}|{digit}|{scope})*
+int		{digit}+
+hex		0[xX][0-9a-fA-F]+
+num		{int}(\.{int}([Ee][+-]?{int})?|(\.{int})?[Ee][+-]?{int})
+chr		'(\\'|[^'\n])*'
+str		\"(\\\"|\\\n|[^"])*\"
+module		#module{ws}*{str}.*\n
+import		#import{ws}*{str}.*\n
+eof		<<EOF>>
+%x MLCOMMENT
+%%
+{ws}			{ /* skip white space */ }
+"/*"			{ BEGIN(MLCOMMENT); }
+<MLCOMMENT>.|\n		{ }
+<MLCOMMENT>"*/"		{ BEGIN(INITIAL); }
+<MLCOMMENT><<EOF>>	{ execerror("Unclosed multiline comment at the end of file"); }
+"//gsoapopt".*\n	{ option(); }
+"//gsoap".*\n		{ directive(); }
+"//".*\n		{ /* skip single line comment */ }
+"+="			{ return PA; }
+"-="			{ return NA; }
+"*="			{ return TA; }
+"/="			{ return DA; }
+"%="			{ return MA; }
+"&="			{ return AA; }
+"^="			{ return XA; }
+"|="			{ return OA; }
+"<<="			{ return LA; }
+">>="			{ return RA; }
+"||"			{ return OR; }
+"&&"			{ return AN; }
+"=="			{ return EQ; }
+"!="			{ return NE; }
+"<="			{ return LE; }
+">="			{ return GE; }
+"<<"			{ return LS; }
+">>"			{ return RS; }
+"++"			{ return PP; }
+"--"			{ return NN; }
+"->"			{ return AR; }
+[;,:=|^&<>+\-*/%!?~(){}\[\].@]	{ return yytext[0]; }
+{id}			{ return install_id(); }
+{int}			{ return install_int(); }
+{hex}			{ return install_hex(); }
+{num}			{ return install_num(); }
+{chr}			{ return install_chr(); }
+{str}			{ return install_str(); }
+{module}		{ char *s, buf[1024];
+			  s = strchr(yytext, '"');
+			  strcpy(buf, s+1);
+			  s = strchr(buf, '"');
+			  *s = '\0';
+			  module(buf);
+			}
+{import}		{ char *s, buf[1024];
+			  s = strchr(yytext, '"');
+			  strcpy(buf, s+1);
+			  s = strchr(buf, '"');
+			  *s = '\0';
+			  import(buf);
+			}
+#.*\n			{ return install_pragma(); }
+'[^'\n]*/\n		{ return error_chr(); }
+\"[^"\n]*/\n		{ return error_str(); }
+.			{ lexerror("Skipping unknown symbol"); }
+{eof}			{ /* in case Lex complains, remove this line */
+#ifndef WITH_LEX
+			  if (--imports < 0)
+			    yyterminate();
+			  else
+			  { yy_delete_buffer(YY_CURRENT_BUFFER);
+			    yy_switch_to_buffer(instk[imports]);
+			    strcpy(filename, fnstk[imports]);
+			    yylineno = lnstk[imports];
+			  }
+#endif
+			}
+%%
+
+/*
+	install_id - lookup identifier in symbol table. If found, return token
+	and symbol table entry. If not found, create entry in symbol table and
+	return ID token.
+*/ 
+static Token
+install_id()
+{	Symbol *p = lookup(yytext);
+	if (!p)
+		p = install(yytext, ID);
+	yylval.sym = p;
+	return p->token;
+}
+
+/*
+	install_int - convert digits to integer and return LNG token.
+*/
+static Token
+install_int()
+{
+	sscanf(yytext, SOAP_ULONG_FORMAT, &yylval.i);
+	return LNG;
+}
+
+/*
+	install_hex - convert hexadecimal digits to integer and return LNG
+*/
+static Token
+install_hex()
+{
+	sscanf(yytext, SOAP_XLONG_FORMAT, &yylval.i);
+	return LNG;
+}
+
+/*
+	install_num - convert digits to floating point number and return DBL
+*/
+static Token
+install_num()
+{	sscanf(yytext, "%lf", &yylval.r);
+	return DBL;
+}
+
+/*
+	install_chr - convert character constant and return CHR.
+*/
+static Token
+install_chr()
+{	int i = 2;
+	if (yytext[1] == '\\')
+		yylval.c = convchar(&i);
+	else	yylval.c = yytext[i-1];
+	if (yytext[i] != '\'')
+		lexerror("Illegal character constant");
+	return CHR;
+}
+
+/*
+	install_str - convert and store string in memory. Return STR.
+*/
+static Token
+install_str()
+{	int i, j = 0;
+	yylval.s = emalloc(yyleng-1);	/* yyleng = length(yytext) */
+	for (i = 1; i < yyleng-1; i++)
+		if (yytext[i] == '\\')
+		{	if (yytext[++i] != '\n')
+			{	yylval.s[j++] = convchar(&i);
+				i--;
+			}
+		}
+		else
+			yylval.s[j++] = yytext[i];
+	yylval.s[j] = '\0';
+	return STR;
+}
+
+/*
+	install_pragma - store pragma in string. Return PRAGMA.
+*/
+static Token
+install_pragma()
+{	yylval.s = emalloc(yyleng);	/* yyleng = length(yytext) */
+	strncpy(yylval.s, yytext, strlen(yytext)-1);
+	yylval.s[strlen(yytext)-1] = '\0';
+	return PRAGMA;
+}
+
+static void directive()
+{	int i, j, k;
+	char *s;
+	Service *sp;
+	Method *m;
+	Data *d;
+	int service;
+	for (i = 7; yytext[i]; i++)
+		if (yytext[i] > 32)
+			break;
+	for (j = i; yytext[j]; j++)
+		if (yytext[j] <= 32)
+			break;
+	if (i == j)
+		return;
+	s = (char*)emalloc(j-i+1);
+	strncpy(s, yytext+i, j-i);
+	s[j-i] = '\0';
+	for (sp = services; sp; sp = sp->next)
+		if (!strcmp(sp->ns, s))
+			break;
+	if (!sp)
+	{	sp = (Service*)emalloc(sizeof(Service));
+		sp->next = services;
+		sp->ns = s;
+		sp->name = NULL;
+		sp->port = NULL;
+		sp->binding = NULL;
+		sp->definitions = NULL;
+		sp->transport = NULL;
+		sp->URL = NULL;
+		sp->URI = NULL;
+		sp->WSDL = NULL;
+		sp->style = NULL;
+		sp->encoding = NULL;
+		sp->elementForm = NULL;
+		sp->attributeForm = NULL;
+		sp->executable = NULL;
+		sp->import = NULL;
+		sp->documentation = NULL;
+		sp->list = NULL;
+		sp->data = NULL;
+		services = sp;
+	}
+	for (i = j; yytext[i]; i++)
+		if (yytext[i] > 32)
+			break;
+	if (!strncmp(yytext+i, "service", 7) || !strncmp(yytext+i, "schema", 6))
+	{	service = strncmp(yytext+i, "schema", 6);
+		for (i += 7; yytext[i]; i++)
+			if (yytext[i] > 32)
+				break;
+		for (j = i; yytext[j]; j++)
+			if (yytext[j] <= 32)
+				break;
+		for (; yytext[j]; j++)
+			if (yytext[j] > 32)
+				break;
+		for (k = j; yytext[k]; k++)
+			if (yytext[k] <= 32)
+				break;
+		if (j == k)
+			return;
+		s = (char*)emalloc(k-j+1);
+		strncpy(s, yytext+j, k-j);
+		s[k-j] = '\0';
+		if (!strncmp(yytext+i, "name:", 5))
+		{	sp->name = s;
+			for (j = k; yytext[j]; j++)
+				if (yytext[j] > 32)
+					break;
+			for (k = j; yytext[k]; k++)
+				if (yytext[k] == 10 || yytext[k] == 13)
+					break;
+			if (j == k)
+				return;
+			s = (char*)emalloc(k-j+1);
+			strncpy(s, yytext+j, k-j);
+			s[k-j] = '\0';
+			sp->documentation = s;
+		}
+		else if (!strncmp(yytext+i, "type:", 5))
+			sp->port = s;
+		else if (!strncmp(yytext+i, "portType:", 9))
+			sp->port = s;
+		else if (!strncmp(yytext+i, "binding:", 8))
+			sp->binding = s;
+		else if (!strncmp(yytext+i, "definitions:", 12))
+			sp->definitions = s;
+		else if (!strncmp(yytext+i, "documentation:", 14))
+		{	for (k = j; yytext[k]; k++)
+				if (yytext[k] == 10 || yytext[k] == 13)
+					break;
+			if (j == k)
+				return;
+			s = (char*)emalloc(k-j+1);
+			strncpy(s, yytext+j, k-j);
+			s[k-j] = '\0';
+			sp->documentation = s;
+		}
+		else if (!strncmp(yytext+i, "transport:", 10))
+			sp->transport = s;
+		else if (!strncmp(yytext+i, "location:", 9) || !strncmp(yytext+i, "port:", 5))
+			sp->URL = s;
+		else if (!strncmp(yytext+i, "executable:", 11))
+			sp->executable = s;
+		else if (!strncmp(yytext+i, "namespace:", 10))
+		{	if (service)
+			{	if (!sp->URI)
+					sp->URI = s;
+				sp->WSDL = s;
+			}
+			else if (!strcmp(sp->ns, "SOAP-ENV"))
+				sp->URI = envURI = s;
+			else if (!strcmp(sp->ns, "SOAP-ENC"))
+				sp->URI = encURI = s;
+			else
+				sp->URI = s;
+		}
+		else if (!strncmp(yytext+i, "form:", 5))
+		{	sp->elementForm = s;
+			sp->attributeForm = s;
+		}
+		else if (!strncmp(yytext+i, "elementForm:", 12))
+			sp->elementForm = s;
+		else if (!strncmp(yytext+i, "attributeForm:", 14))
+			sp->attributeForm = s;
+		else if (!strncmp(yytext+i, "import:", 7))
+		{	if (!sp->URI)
+				sp->URI = s;
+			sp->import = s;
+		}
+		else if (!strncmp(yytext+i, "encoding:", 9))
+		{	if (!strcmp(s, "encoded"))
+				sp->encoding = "";
+			else
+				sp->encoding = s;
+		}
+		else if (!strncmp(yytext+i, "style:", 6))
+			sp->style = s;
+		else if (!strncmp(yytext+i, "method-style:", 13))
+		{	m = (Method*)emalloc(sizeof(Method));
+			m->name = s;
+			m->mess = STYLE;
+			m->part = NULL;
+			m->next = sp->list;
+			sp->list = m;
+			for (j = k; yytext[j]; j++)
+				if (yytext[j] > 32)
+					break;
+			for (k = j; yytext[k]; k++)
+				if (yytext[k] == 10 || yytext[k] == 13)
+					break;
+			if (j == k)
+				return;
+			s = (char*)emalloc(k-j+1);
+			strncpy(s, yytext+j, k-j);
+			s[k-j] = '\0';
+			m->part = s;
+		}
+		else if (!strncmp(yytext+i, "method-encoding:", 16))
+		{	m = (Method*)emalloc(sizeof(Method));
+			m->name = s;
+			m->mess = ENCODING;
+			m->part = NULL;
+			m->next = sp->list;
+			sp->list = m;
+			for (j = k; yytext[j]; j++)
+				if (yytext[j] > 32)
+					break;
+			for (k = j; yytext[k]; k++)
+				if (yytext[k] == 10 || yytext[k] == 13)
+					break;
+			if (j == k)
+				return;
+			s = (char*)emalloc(k-j+1);
+			strncpy(s, yytext+j, k-j);
+			s[k-j] = '\0';
+		 	if (strcmp(s, "encoded"))
+				m->part = s;
+			else
+				m->part = "";
+		}
+		else if (!strncmp(yytext+i, "method-response-encoding:", 25))
+		{	m = (Method*)emalloc(sizeof(Method));
+			m->name = s;
+			m->mess = RESPONSE_ENCODING;
+			m->part = NULL;
+			m->next = sp->list;
+			sp->list = m;
+			for (j = k; yytext[j]; j++)
+				if (yytext[j] > 32)
+					break;
+			for (k = j; yytext[k]; k++)
+				if (yytext[k] == 10 || yytext[k] == 13)
+					break;
+			if (j == k)
+				return;
+			s = (char*)emalloc(k-j+1);
+			strncpy(s, yytext+j, k-j);
+			s[k-j] = '\0';
+		 	if (strcmp(s, "encoded"))
+				m->part = s;
+			else
+				m->part = "";
+		}
+		else if (!strncmp(yytext+i, "method-documentation:", 21))
+		{	m = (Method*)emalloc(sizeof(Method));
+			m->name = s;
+			m->mess = COMMENT;
+			m->part = NULL;
+			m->next = sp->list;
+			sp->list = m;
+			for (j = k; yytext[j]; j++)
+				if (yytext[j] > 32)
+					break;
+			for (k = j; yytext[k]; k++)
+				if (yytext[k] == 10 || yytext[k] == 13)
+					break;
+			if (j == k)
+				return;
+			s = (char*)emalloc(k-j+1);
+			strncpy(s, yytext+j, k-j);
+			s[k-j] = '\0';
+			m->part = s;
+		}
+		else if (!strncmp(yytext+i, "method-action:", 14))
+		{	m = (Method*)emalloc(sizeof(Method));
+			m->name = s;
+			m->mess = ACTION;
+			m->part = NULL;
+			m->next = sp->list;
+			sp->list = m;
+			for (j = k; yytext[j]; j++)
+				if (yytext[j] > 32)
+					break;
+			for (k = j; yytext[k]; k++)
+				if (yytext[k] <= 32)
+					break;
+			if (j == k)
+				return;
+			s = (char*)emalloc(k-j+1);
+			strncpy(s, yytext+j, k-j);
+			s[k-j] = '\0';
+			m->part = s;
+		}
+		else if (!strncmp(yytext+i, "method-mime-type:", 17))
+		{	m = (Method*)emalloc(sizeof(Method));
+			m->name = s;
+			m->mess = MIMEIN | MIMEOUT;
+			m->part = NULL;
+			m->next = sp->list;
+			sp->list = m;
+			for (j = k; yytext[j]; j++)
+				if (yytext[j] > 32)
+					break;
+			for (k = j; yytext[k]; k++)
+				if (yytext[k] <= 32)
+					break;
+			if (j == k)
+				return;
+			s = (char*)emalloc(k-j+1);
+			strncpy(s, yytext+j, k-j);
+			s[k-j] = '\0';
+			m->part = s;
+		}
+		else if (!strncmp(yytext+i, "method-input-mime-type:", 23))
+		{	m = (Method*)emalloc(sizeof(Method));
+			m->name = s;
+			m->mess = MIMEIN;
+			m->part = NULL;
+			m->next = sp->list;
+			sp->list = m;
+			for (j = k; yytext[j]; j++)
+				if (yytext[j] > 32)
+					break;
+			for (k = j; yytext[k]; k++)
+				if (yytext[k] <= 32)
+					break;
+			if (j == k)
+				return;
+			s = (char*)emalloc(k-j+1);
+			strncpy(s, yytext+j, k-j);
+			s[k-j] = '\0';
+			m->part = s;
+		}
+		else if (!strncmp(yytext+i, "method-output-mime-type:", 24))
+		{	m = (Method*)emalloc(sizeof(Method));
+			m->name = s;
+			m->mess = MIMEOUT;
+			m->part = NULL;
+			m->next = sp->list;
+			sp->list = m;
+			for (j = k; yytext[j]; j++)
+				if (yytext[j] > 32)
+					break;
+			for (k = j; yytext[k]; k++)
+				if (yytext[k] <= 32)
+					break;
+			if (j == k)
+				return;
+			s = (char*)emalloc(k-j+1);
+			strncpy(s, yytext+j, k-j);
+			s[k-j] = '\0';
+			m->part = s;
+		}
+		else if (!strncmp(yytext+i, "method-header-part:", 19))
+		{	m = (Method*)emalloc(sizeof(Method));
+			m->name = s;
+			m->mess = HDRIN | HDROUT;
+			m->part = NULL;
+			m->next = sp->list;
+			sp->list = m;
+			for (j = k; yytext[j]; j++)
+				if (yytext[j] > 32)
+					break;
+			for (k = j; yytext[k]; k++)
+				if (yytext[k] <= 32)
+					break;
+			if (j == k)
+				return;
+			s = (char*)emalloc(k-j+1);
+			strncpy(s, yytext+j, k-j);
+			s[k-j] = '\0';
+			m->part = s;
+		}
+		else if (!strncmp(yytext+i, "method-input-header-part:", 25))
+		{	m = (Method*)emalloc(sizeof(Method));
+			m->name = s;
+			m->mess = HDRIN;
+			m->part = NULL;
+			m->next = sp->list;
+			sp->list = m;
+			for (j = k; yytext[j]; j++)
+				if (yytext[j] > 32)
+					break;
+			for (k = j; yytext[k]; k++)
+				if (yytext[k] <= 32)
+					break;
+			if (j == k)
+				return;
+			s = (char*)emalloc(k-j+1);
+			strncpy(s, yytext+j, k-j);
+			s[k-j] = '\0';
+			m->part = s;
+		}
+		else if (!strncmp(yytext+i, "method-output-header-part:", 26))
+		{	m = (Method*)emalloc(sizeof(Method));
+			m->name = s;
+			m->mess = HDROUT;
+			m->part = NULL;
+			m->next = sp->list;
+			sp->list = m;
+			for (j = k; yytext[j]; j++)
+				if (yytext[j] > 32)
+					break;
+			for (k = j; yytext[k]; k++)
+				if (yytext[k] <= 32)
+					break;
+			if (j == k)
+				return;
+			s = (char*)emalloc(k-j+1);
+			strncpy(s, yytext+j, k-j);
+			s[k-j] = '\0';
+			m->part = s;
+		}
+		else if (!strncmp(yytext+i, "method-fault:", 13))
+		{	m = (Method*)emalloc(sizeof(Method));
+			m->name = s;
+			m->mess = FAULT;
+			m->part = NULL;
+			m->next = sp->list;
+			sp->list = m;
+			for (j = k; yytext[j]; j++)
+				if (yytext[j] > 32)
+					break;
+			for (k = j; yytext[k]; k++)
+				if (yytext[k] <= 32)
+					break;
+			if (j == k)
+				return;
+			s = (char*)emalloc(k-j+1);
+			strncpy(s, yytext+j, k-j);
+			s[k-j] = '\0';
+			m->part = s;
+		}
+		else if (!strncmp(yytext+i, "type-documentation:", 19))
+		{	d = (Data*)emalloc(sizeof(Data));
+			d->name = s;
+			d->part = NULL;
+			d->next = sp->data;
+			sp->data = d;
+			for (j = k; yytext[j]; j++)
+				if (yytext[j] > 32)
+					break;
+			for (k = j; yytext[k]; k++)
+				if (yytext[k] == 10 || yytext[k] == 13)
+					break;
+			if (j == k)
+				return;
+			s = (char*)emalloc(k-j+1);
+			strncpy(s, yytext+j, k-j);
+			s[k-j] = '\0';
+			d->part = s;
+		}
+		else
+                {	sprintf(errbuf, "unrecognized gsoap directive: %s", yytext+i);
+			semwarn(errbuf);
+		}
+	}
+	else
+        {	sprintf(errbuf, "unrecognized gsoap directive: %s", yytext);
+		semwarn(errbuf);
+	}
+}
+
+static void option()
+{	int i;
+	if (imports)
+        {	sprintf(errbuf, "options directive: %s ignored in imported file(s)", yytext);
+		semwarn(errbuf);
+		return;
+	}
+	for (i = 10; yytext[i]; i++)
+		if (yytext[i] > 32)
+			break;
+	for (; yytext[i]; i++)
+		switch (yytext[i])
+		{	case 'c':
+				cflag = 1;
+				break;
+		 	case 'e':
+				eflag = 1;
+				break;
+		 	case 'n':
+				nflag = 1;
+				break;
+		 	case 'l':
+				lflag = 1;
+				break;
+		 	case 'w':
+				wflag = 1;
+				break;
+			default:
+				if (yytext[i] <= 32)
+					return;
+		}
+}
+
+/*
+	error_chr - lexical error in character constant. Return character 0 to
+	allow parsing to continue
+*/
+static Token
+error_chr()
+{	lexerror("Ending-' missing in character constant");
+	yylval.c = '\0';
+	return CHR;
+}
+
+/*
+	error_str - lexical error in string. Return empty string to allow
+	parsing to continue
+*/
+static Token
+error_str()
+{	lexerror("Ending-\" missing in string");
+	yylval.s = "";
+	return STR;
+}
+
+/*
+	Character conversion functions
+*/
+static int
+convchar(int *p)
+{	switch (yytext[(*p)++])
+	{	case 'a':	return '\a';
+		case 'b':	return '\b';
+		case 'f':	return '\f';
+		case 'n':	return '\n';
+		case 'r':	return '\r';
+		case 't':	return '\t';
+		case 'v':	return '\v';
+		case 'x':	return hexchar(p);
+		case '0':
+		case '1':
+		case '2':
+		case '3':
+		case '4':
+		case '5':
+		case '6':
+		case '7':	(*p)--;
+				return octchar(p);
+		default:	return yytext[*p-1];
+	}
+}
+
+static int
+hexchar(int *p)
+{	int i, d, c = 0;
+	for (i = 0; isxdigit(d = yytext[*p]) && i < 2; i++)
+	{	c = (c << 4) + (d <= '9' ? d - '0' : toupper(d) - '7');
+		(*p)++;
+	}
+	return c;
+}
+
+static int
+octchar(int *p)
+{	int i, d, c = 0;
+	for (i = 0; (d = yytext[*p]) >= '0' && d <= '7' && i < 3; i++)
+	{	c = (c << 3) + d - '0';
+		(*p)++;
+	}
+	return c;
+}
+
+static void module(const char *name)
+{ if (imports)
+  { if (!lflag)
+    { Pragma **pp;
+      char *s = emalloc(256);
+      sprintf(s, "#include \"%sH.h\"", name);
+      for (pp = &pragmas; *pp; pp = &(*pp)->next)
+        ;
+      *pp = (Pragma*)emalloc(sizeof(Pragma));
+      (*pp)->pragma = s;
+      (*pp)->next = NULL;
+      is_module = 1;
+      fprintf(stderr, "Importing module %s\n\n", name);
+    }
+  }
+  else
+  { lflag = 1;
+    typeNO = magic(name);
+    prefix = emalloc(strlen(name)+1);
+    strcpy(prefix, name);
+    fprintf(stderr, "Module %s magic number = %d\n\n", name, typeNO);
+  }
+}
+
+static int magic(const char *name)
+{ int i, n;
+  if (strlen(name) > 4)
+    semerror("#module name length must not exceed four characters");
+  n = 0;
+  for (i = 0; i < strlen(name); i++)
+    if (name[i] >= 'a' && name[i] <= 'z')
+      n = 26*n + name[i] - 'a';
+    else if (name[i] >= 'A' && name[i] <= 'Z')
+      n = 26*n + name[i] - 'A';
+    else
+      semerror("#module name must be alphabetic and the length must not exceed four characters");
+  return 4699*n + 153424;
+}
+
+#ifdef WITH_LEX
+static void import(const char *file)
+{ execerror("Cannot #import: soapcpp2 not compiled with flex");
+}
+#else
+static void import(const char *file)
+{ char buf[1024];
+  struct imported *p;
+  for (p = imported; p; p = p->next)
+    if (!strcmp(p->name, file))
+      return;
+  if (imports >= MAX_IMPORT_DEPTH)
+    execerror("Imports nested too deeply");
+  instk[imports] = YY_CURRENT_BUFFER;
+  strcpy(fnstk[imports], filename);
+  lnstk[imports] = yylineno;
+  imports++;
+  if (!(yyin = fopen(file, "r")))
+  { if (importpath)
+    { char *s, *t;
+      s = importpath;
+      do
+      { t = strstr(s, SOAP_PATHSEP);
+        if (t)
+        { strncpy(buf, s, t - s);
+	  buf[t - s] = '\0';
+	  s = t + sizeof(SOAP_PATHSEP) - 1;
+	}
+	else
+        { strcpy(buf, s);
+          s = NULL;
+	}
+        strcat(buf, "/");
+        strcat(buf, file);
+        yyin = fopen(buf, "r");
+      }
+      while (s && !yyin);
+    }
+    if (!yyin)
+    { sprintf(errbuf, "#import: Cannot open file \"%s\" for reading.\nHint: use option -I<path> (you can define multiple paths separated with '"SOAP_PATHSEP"')", file);
+      execerror(errbuf);
+    }
+  }
+  p = (struct imported*)malloc(sizeof(struct imported) + strlen(file));
+  strcpy(p->name, file);
+  p->next = imported;
+  imported = p;
+  strcpy(filename, file);
+  yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
+}
+#endif
diff --git a/src/soapcpp2_yacc.y b/src/soapcpp2_yacc.y
new file mode 100644
index 0000000..58f186c
--- /dev/null
+++ b/src/soapcpp2_yacc.y
@@ -0,0 +1,1804 @@
+/*
+
+soapcpp2_yacc.y
+
+Yacc/Bison grammar.
+
+Notes:
+
+Bison 1.6 can crash on Win32 systems if YYINITDEPTH is too small Compile with
+-DYYINITDEPTH=5000
+
+This grammar has one shift/reduce conflict related to the use of a class
+declaration with a base class (e.g. class Y : public X) and the use of a
+maxOccurs (class Y :10). Internally the conflict is resolved in favor of a
+shift by Bison/Yacc, which leads to the correct parsing behavior. Therefore,
+the warning can be ignored.
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2004 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+%{
+
+#include "soapcpp2.h"
+#ifdef WIN32
+extern int soapcpp2lex();
+#endif
+
+#define MAXNEST 16	/* max. nesting depth of scopes */
+
+struct Scope
+{	Table	*table;
+	Entry	*entry;
+	Node	node;
+	LONG64	val;
+	int	offset;
+	Bool	grow;	/* true if offset grows with declarations */
+	Bool	mask;	/* true if enum is mask */
+}	stack[MAXNEST],	/* stack of tables and offsets */
+	*sp;		/* current scope stack pointer */
+
+Table	*classtable = (Table*)0,
+	*enumtable = (Table*)0,
+	*typetable = (Table*)0,
+	*booltable = (Table*)0,
+	*templatetable = (Table*)0;
+
+char	*namespaceid = NULL;
+int	transient = 0;
+int	permission = 0;
+int	custom_header = 1;
+int	custom_fault = 1;
+Pragma	*pragmas = NULL;
+Tnode	*qname = NULL;
+Tnode	*xml = NULL;
+
+/* function prototypes for support routine section */
+static Entry	*undefined(Symbol*);
+static Tnode	*mgtype(Tnode*, Tnode*);
+static Node	op(const char*, Node, Node), iop(const char*, Node, Node), relop(const char*, Node, Node);
+static void	mkscope(Table*, int), enterscope(Table*, int), exitscope();
+static int	integer(Tnode*), real(Tnode*), numeric(Tnode*), pointer(Tnode*);
+static void	add_XML(), add_qname(), add_header(Table*), add_fault(Table*), add_response(Entry*, Entry*), add_result(Tnode*);
+extern char	*c_storage(Storage), *c_type(Tnode*), *c_ident(Tnode*);
+extern int	is_primitive_or_string(Tnode*), is_stdstr(Tnode*), is_binary(Tnode*);
+
+/* temporaries used in semantic rules */
+int	i;
+char	*s, *s1, *s2;
+Symbol	*sym;
+Entry	*p, *q;
+Tnode	*t;
+Node	tmp, c;
+Pragma	**pp;
+
+%}
+
+/* we expect one shift-reduce conflict */
+%expect 1
+/* remove this line if necessary to allow Yacc to proceed */
+
+%union
+{	Symbol	*sym;
+	LONG64	i;
+	double	r;
+	char	c;
+	char	*s;
+	Tnode	*typ;
+	Storage	sto;
+	Node	rec;
+	Entry	*e;
+}
+
+/* pragmas */
+%token	<s> PRAGMA
+/* keywords */
+%token	<sym> AUTO     DOUBLE  INT       STRUCT
+%token	<sym> BREAK    ELSE    LONG      SWITCH
+%token	<sym> CASE     ENUM    REGISTER  TYPEDEF
+%token	<sym> CHAR     EXTERN  RETURN    UNION
+%token	<sym> CONST    FLOAT   SHORT     UNSIGNED
+%token	<sym> CONTINUE FOR     SIGNED    VOID
+%token	<sym> DEFAULT  GOTO    SIZEOF    VOLATILE
+%token	<sym> DO       IF      STATIC    WHILE
+%token	<sym> CLASS    PRIVATE PROTECTED PUBLIC
+%token	<sym> VIRTUAL  INLINE  OPERATOR  LLONG
+%token	<sym> BOOL     CFALSE  CTRUE	 WCHAR
+%token	<sym> TIME     USING   NAMESPACE ULLONG
+%token	<sym> MUSTUNDERSTAND   SIZE      FRIEND
+%token	<sym> TEMPLATE EXPLICIT		 TYPENAME
+%token	<sym> RESTRICT null
+/* */
+%token	NONE
+/* identifiers (TYPE = typedef identifier) */
+%token	<sym> ID TYPE
+/* constants */
+%token	<i> LNG
+%token	<r> DBL
+%token	<c> CHR
+%token	<s> STR
+/* types and related */
+%type	<typ> type
+%type	<sto> store virtual constobj abstract
+%type	<e> fname struct class super
+%type	<sym> id arg name
+%type	<s> patt
+%type	<i> cint
+/* expressions and statements */
+%type	<rec> expr cexp oexp obex aexp abex rexp lexp pexp init spec tspec ptrs array arrayck texp qexp occurs
+/* terminals */
+%left	','
+%right	'=' PA NA TA DA MA AA XA OA LA RA  /* += -= *= /= %= &= ^= |= <<= >>= */
+%right	'?'
+%right	':'
+%left	OR		/* || */
+%left	AN		/* && */
+%left	'|'
+%left	'^'
+%left	'&'
+%left	EQ NE		/* == != */
+%left	'<' LE '>' GE	/* <= >= */
+%left	LS RS		/* << >> */
+%left	'+' '-'
+%left	'*' '/' '%'
+%left	AR		/* -> */
+%token	PP NN		/* ++ -- */
+
+%%
+
+/******************************************************************************\
+
+	Program syntax
+
+\******************************************************************************/
+
+prog	: s1 exts	{ if (lflag)
+    			  {	custom_header = 0;
+    			  	custom_fault = 0;
+			  }
+			  else
+			  {	add_header(sp->table);
+			  	add_fault(sp->table);
+			  }
+			  compile(sp->table);
+			  freetable(classtable);
+			  freetable(enumtable);
+			  freetable(typetable);
+			  freetable(booltable);
+			  freetable(templatetable);
+			}
+	;
+s1	: /* empty */	{ classtable = mktable((Table*)0);
+			  enumtable = mktable((Table*)0);
+			  typetable = mktable((Table*)0);
+			  booltable = mktable((Table*)0);
+			  templatetable = mktable((Table*)0);
+			  p = enter(booltable, lookup("false"));
+			  p->info.typ = mkint();
+			  p->info.val.i = 0;
+			  p = enter(booltable, lookup("true"));
+			  p->info.typ = mkint();
+			  p->info.val.i = 1;
+			  mkscope(mktable(mktable((Table*)0)), 0);
+			}
+	;
+exts	: NAMESPACE ID '{' exts1 '}'
+			{ namespaceid = $2->name; }
+	| exts1		{ namespaceid = NULL; }
+	;
+exts1	: /* empty */	{ if (!lflag)
+			  {	add_XML();
+				add_qname();
+			  }
+			}
+	| exts1 ext	{ }
+	;
+ext	: dclrs ';'	{ }
+	| pragma	{ }
+	| error ';'	{ synerror("input before ; skipped");
+			  while (sp > stack)
+			  {	freetable(sp->table);
+			  	exitscope();
+			  }
+			  yyerrok;
+			}
+	| t1		{ }
+	| t2		{ }
+	;
+pragma	: PRAGMA	{ if ($1[1] >= 'a' && $1[1] <= 'z')
+			  {	for (pp = &pragmas; *pp; pp = &(*pp)->next)
+			          ;
+				*pp = (Pragma*)emalloc(sizeof(Pragma));
+				(*pp)->pragma = (char*)emalloc(strlen($1)+1);
+				strcpy((*pp)->pragma, $1);
+				(*pp)->next = NULL;
+			  }
+			  else if ((i = atoi($1+2)) > 0)
+				yylineno = i;
+			  else
+			  {	sprintf(errbuf, "directive '%s' ignored (use #import to import files and/or use option -i)", $1);
+			  	semwarn(errbuf);
+			  }
+			}
+	;
+
+/******************************************************************************\
+
+	Declarations
+
+\******************************************************************************/
+
+decls	: /* empty */	{ transient &= ~6;
+			  permission = 0;
+			}
+	| dclrs ';' decls
+			{ }
+	| PRIVATE ':' t3 decls
+			{ }
+	| PROTECTED ':' t4 decls
+			{ }
+	| PUBLIC ':' t5 decls
+			{ }
+	| t1 decls t2 decls
+			{ }
+	;
+t1	: '['		{ transient |= 1;
+			}
+	;
+t2	: ']'		{ transient &= ~1;
+			}
+	;
+t3	:		{ permission = Sprivate;
+			}
+	;
+t4	:		{ permission = Sprotected;
+			}
+	;
+t5	:		{ permission = 0;
+			}
+	;
+dclrs	: spec		{ }
+	| spec dclr	{ }
+	| spec fdclr func
+			{ }
+	| constr func	{ }
+	| destr func	{ }
+	| dclrs ',' dclr{ }
+	| dclrs ',' fdclr func
+			{ }
+	;
+dclr	: ptrs ID arrayck occurs init
+			{ if (($3.sto & Stypedef) && sp->table->level == GLOBAL)
+			  {	if (($3.typ->type != Tstruct && $3.typ->type != Tunion && $3.typ->type != Tenum) || strcmp($2->name, $3.typ->id->name))
+
+				{	p = enter(typetable, $2);
+					p->info.typ = mksymtype($3.typ, $2);
+			  		if ($3.sto & Sextern)
+						p->info.typ->transient = -1;
+					else
+						p->info.typ->transient = $3.typ->transient;
+			  		p->info.sto = $3.sto;
+					p->info.typ->pattern = $4.pattern;
+					if ($4.minOccurs != -1)
+					{	p->info.typ->minLength = $4.minOccurs;
+					}
+					if ($4.maxOccurs > 1)
+						p->info.typ->maxLength = $4.maxOccurs;
+				}
+				$2->token = TYPE;
+			  }
+			  else
+			  {	p = enter(sp->table, $2);
+			  	p->info.typ = $3.typ;
+			  	p->info.sto = ($3.sto | permission);
+				if ($5.hasval)
+				{	p->info.hasval = True;
+					switch ($3.typ->type)
+					{	case Tchar:
+						case Tuchar:
+						case Tshort:
+						case Tushort:
+						case Tint:
+						case Tuint:
+						case Tlong:
+						case Tulong:
+						case Tllong:
+						case Tullong:
+						case Tenum:
+						case Ttime:
+							if ($5.typ->type == Tint || $5.typ->type == Tchar || $5.typ->type == Tenum)
+								sp->val = p->info.val.i = $5.val.i;
+							else
+							{	semerror("type error in initialization constant");
+								p->info.hasval = False;
+							}
+							break;
+						case Tfloat:
+						case Tdouble:
+							if ($5.typ->type == Tfloat || $5.typ->type == Tdouble)
+								p->info.val.r = $5.val.r;
+							else if ($5.typ->type == Tint)
+								p->info.val.r = (double)$5.val.i;
+							else
+							{	semerror("type error in initialization constant");
+								p->info.hasval = False;
+							}
+							break;
+						default:
+							if ($3.typ->type == Tpointer
+							 && ((Tnode*)$3.typ->ref)->type == Tchar
+							 && $5.typ->type == Tpointer
+							 && ((Tnode*)$5.typ->ref)->type == Tchar)
+								p->info.val.s = $5.val.s;
+							else if ($3.typ->type == Tpointer
+							      && ((Tnode*)$3.typ->ref)->id == lookup("std::string"))
+							      	p->info.val.s = $5.val.s;
+							else if ($3.typ->id == lookup("std::string"))
+							      	p->info.val.s = $5.val.s;
+							else if ($3.typ->type == Tpointer
+							      && $5.typ->type == Tint
+							      && $5.val.i == 0)
+								p->info.val.i = 0;
+							else
+							{	semerror("type error in initialization constant");
+								p->info.hasval = False;
+							}
+							break;
+					}
+				}
+				else
+					p->info.val.i = sp->val;
+			        if ($4.minOccurs < 0)
+			        {	if (($3.sto & Sattribute) || $3.typ->type == Tpointer || $3.typ->type == Ttemplate || !strncmp($2->name, "__size", 6))
+			        		p->info.minOccurs = 0;
+			        	else
+			        		p->info.minOccurs = 1;
+				}
+				else
+					p->info.minOccurs = $4.minOccurs;
+				p->info.maxOccurs = $4.maxOccurs;
+				if (sp->mask)
+					sp->val <<= 1;
+				else
+					sp->val++;
+			  	p->info.offset = sp->offset;
+				if ($3.sto & Sextern)
+					p->level = GLOBAL;
+				else if ($3.sto & Stypedef)
+					;
+			  	else if (sp->grow)
+					sp->offset += p->info.typ->width;
+				else if (p->info.typ->width > sp->offset)
+					sp->offset = p->info.typ->width;
+			  }
+			  sp->entry = p;
+			}
+	;
+fdclr	: ptrs name	{ if ($1.sto & Stypedef)
+			  {	sprintf(errbuf, "invalid typedef qualifier for '%s'", $2->name);
+				semwarn(errbuf);
+			  }
+			  p = enter(sp->table, $2);
+			  p->info.typ = $1.typ;
+			  p->info.sto = $1.sto;
+			  p->info.hasval = False;
+			  p->info.offset = sp->offset;
+			  if (sp->grow)
+				sp->offset += p->info.typ->width;
+			  else if (p->info.typ->width > sp->offset)
+				sp->offset = p->info.typ->width;
+			  sp->entry = p;
+			}
+	;
+id	: ID		{ $$ = $1; }
+	| TYPE		{ $$ = $1; }
+	;
+name	: ID		{ $$ = $1; }
+	| OPERATOR '!'	{ $$ = lookup("operator!"); }
+	| OPERATOR '~'	{ $$ = lookup("operator~"); }
+	| OPERATOR '='	{ $$ = lookup("operator="); }
+	| OPERATOR PA	{ $$ = lookup("operator+="); }
+	| OPERATOR NA	{ $$ = lookup("operator-="); }
+	| OPERATOR TA	{ $$ = lookup("operator*="); }
+	| OPERATOR DA	{ $$ = lookup("operator/="); }
+	| OPERATOR MA	{ $$ = lookup("operator%="); }
+	| OPERATOR AA	{ $$ = lookup("operator&="); }
+	| OPERATOR XA	{ $$ = lookup("operator^="); }
+	| OPERATOR OA	{ $$ = lookup("operator|="); }
+	| OPERATOR LA	{ $$ = lookup("operator<<="); }
+	| OPERATOR RA	{ $$ = lookup("operator>>="); }
+	| OPERATOR OR	{ $$ = lookup("operator||"); }
+	| OPERATOR AN	{ $$ = lookup("operator&&"); }
+	| OPERATOR '|'	{ $$ = lookup("operator|"); }
+	| OPERATOR '^'	{ $$ = lookup("operator^"); }
+	| OPERATOR '&'	{ $$ = lookup("operator&"); }
+	| OPERATOR EQ	{ $$ = lookup("operator=="); }
+	| OPERATOR NE	{ $$ = lookup("operator!="); }
+	| OPERATOR '<'	{ $$ = lookup("operator<"); }
+	| OPERATOR LE	{ $$ = lookup("operator<="); }
+	| OPERATOR '>'	{ $$ = lookup("operator>"); }
+	| OPERATOR GE	{ $$ = lookup("operator>="); }
+	| OPERATOR LS	{ $$ = lookup("operator<<"); }
+	| OPERATOR RS	{ $$ = lookup("operator>>"); }
+	| OPERATOR '+'	{ $$ = lookup("operator+"); }
+	| OPERATOR '-'	{ $$ = lookup("operator-"); }
+	| OPERATOR '*'	{ $$ = lookup("operator*"); }
+	| OPERATOR '/'	{ $$ = lookup("operator/"); }
+	| OPERATOR '%'	{ $$ = lookup("operator%"); }
+	| OPERATOR PP	{ $$ = lookup("operator++"); }
+	| OPERATOR NN	{ $$ = lookup("operator--"); }
+	| OPERATOR AR   { $$ = lookup("operator->"); }
+	| OPERATOR'['']'{ $$ = lookup("operator[]"); }
+	| OPERATOR'('')'{ $$ = lookup("operator()"); }
+	| OPERATOR texp { s1 = c_storage($2.sto);
+			  s2 = c_type($2.typ);
+			  s = (char*)emalloc(strlen(s1) + strlen(s2) + 10);
+			  strcpy(s, "operator ");
+			  strcat(s, s1);
+			  strcat(s, s2);
+			  $$ = lookup(s);
+			  if (!$$)
+				$$ = install(s, ID);
+			}
+	;
+constr	: TYPE		{ if (!(p = entry(classtable, $1)))
+			  	semerror("invalid constructor");
+			  sp->entry = enter(sp->table, $1);
+			  sp->entry->info.typ = mknone();
+			  sp->entry->info.sto = Snone;
+			  sp->entry->info.offset = sp->offset;
+			  sp->node.typ = mkvoid();
+			  sp->node.sto = Snone;
+			}
+	;
+destr	: virtual '~' TYPE
+			{ if (!(p = entry(classtable, $3)))
+			  	semerror("invalid destructor");
+			  s = (char*)emalloc(strlen($3->name) + 2);
+			  strcpy(s, "~");
+			  strcat(s, $3->name);
+			  sym = lookup(s);
+			  if (!sym)
+				sym = install(s, ID);
+			  sp->entry = enter(sp->table, sym);
+			  sp->entry->info.typ = mknone();
+			  sp->entry->info.sto = $1;
+			  sp->entry->info.offset = sp->offset;
+			  sp->node.typ = mkvoid();
+			  sp->node.sto = Snone;
+			}
+	;
+func	: fname '(' s6 fargso ')' constobj abstract
+			{ if ($1->level == GLOBAL)
+			  {	if (!($1->info.sto & Sextern) && sp->entry && sp->entry->info.typ->type == Tpointer && ((Tnode*)sp->entry->info.typ->ref)->type == Tchar)
+			  	{	sprintf(errbuf, "last output parameter of remote method function prototype '%s' is a pointer to a char which will only return one byte: use char** instead to return a string", $1->sym->name);
+					semwarn(errbuf);
+				}
+				if ($1->info.sto & Sextern)
+				 	$1->info.typ = mkmethod($1->info.typ, sp->table);
+			  	else if (sp->entry && (sp->entry->info.typ->type == Tpointer || sp->entry->info.typ->type == Treference || sp->entry->info.typ->type == Tarray || is_transient(sp->entry->info.typ)))
+				{	if ($1->info.typ->type == Tint)
+					{	sp->entry->info.sto = (Storage)((int)sp->entry->info.sto | (int)Sreturn);
+						$1->info.typ = mkfun(sp->entry);
+						$1->info.typ->id = $1->sym;
+						if (!is_transient(sp->entry->info.typ))
+							if (!is_response(sp->entry->info.typ))
+							{	if (!is_XML(sp->entry->info.typ))
+									add_response($1, sp->entry);
+							}
+							else
+								add_result(sp->entry->info.typ);
+					}
+					else
+					{	sprintf(errbuf, "return type of remote method function prototype '%s' must be integer", $1->sym->name);
+						semerror(errbuf);
+					}
+				}
+			  	else
+			  	{	sprintf(errbuf, "last output parameter of remote method function prototype '%s' is a return parameter and must be a pointer or reference", $1->sym->name);
+					semerror(errbuf);
+			  	}
+				if (!($1->info.sto & Sextern))
+			  	{	unlinklast(sp->table);
+			  		if ((p = entry(classtable, $1->sym)))
+					{	if ((Table*) p->info.typ->ref)
+						{	sprintf(errbuf, "remote method name clash: struct/class '%s' already declared at line %d", $1->sym->name, p->lineno);
+							semerror(errbuf);
+						}
+						else
+						{	p->info.typ->ref = sp->table;
+							p->info.typ->width = sp->offset;
+						}
+					}
+			  		else
+			  		{	p = enter(classtable, $1->sym);
+						p->info.typ = mkstruct(sp->table, sp->offset);
+						p->info.typ->id = $1->sym;
+			  		}
+			  	}
+			  }
+			  else if ($1->level == INTERNAL)
+			  {	$1->info.typ = mkmethod($1->info.typ, sp->table);
+				$1->info.sto = (Storage)((int)$1->info.sto | (int)$6 | (int)$7);
+			  	transient &= ~1;
+			  }
+			  exitscope();
+			}
+	;
+fname	:		{ $$ = sp->entry; }
+	;
+fargso	: /* empty */	{ }
+	| fargs		{ }
+	;
+fargs	: farg		{ }
+	| farg ',' fargs{ }
+	;
+farg	: tspec ptrs arg arrayck occurs init
+			{ if ($4.sto & Stypedef)
+			  	semwarn("typedef in function argument");
+			  p = enter(sp->table, $3);
+			  p->info.typ = $4.typ;
+			  p->info.sto = $4.sto;
+			  if ($5.minOccurs < 0)
+			  {	if (($4.sto & Sattribute) || $4.typ->type == Tpointer)
+			        	p->info.minOccurs = 0;
+			       	else
+			        	p->info.minOccurs = 1;
+			  }
+			  else
+				p->info.minOccurs = $5.minOccurs;
+			  p->info.maxOccurs = $5.maxOccurs;
+			  if ($6.hasval)
+			  {	p->info.hasval = True;
+				switch ($4.typ->type)
+				{	case Tchar:
+					case Tuchar:
+					case Tshort:
+					case Tushort:
+					case Tint:
+					case Tuint:
+					case Tlong:
+					case Tulong:
+					case Tenum:
+					case Ttime:
+						if ($6.typ->type == Tint || $6.typ->type == Tchar || $6.typ->type == Tenum)
+							sp->val = p->info.val.i = $6.val.i;
+						else
+						{	semerror("type error in initialization constant");
+							p->info.hasval = False;
+						}
+						break;
+					case Tfloat:
+					case Tdouble:
+						if ($6.typ->type == Tfloat || $6.typ->type == Tdouble)
+							p->info.val.r = $6.val.r;
+						else if ($6.typ->type == Tint)
+							p->info.val.r = (double)$6.val.i;
+						else
+						{	semerror("type error in initialization constant");
+							p->info.hasval = False;
+						}
+						break;
+					default:
+						if ($4.typ->type == Tpointer
+						 && ((Tnode*)$4.typ->ref)->type == Tchar
+						 && $6.typ->type == Tpointer
+						 && ((Tnode*)$6.typ->ref)->type == Tchar)
+							p->info.val.s = $6.val.s;
+						else if ($4.typ->type == Tpointer
+						      && ((Tnode*)$4.typ->ref)->id == lookup("std::string"))
+						      	p->info.val.s = $6.val.s;
+						else if ($4.typ->id == lookup("std::string"))
+						      	p->info.val.s = $6.val.s;
+						else if ($4.typ->type == Tpointer
+						      && $6.typ->type == Tint
+						      && $6.val.i == 0)
+							p->info.val.i = 0;
+						else
+						{	semerror("type error in initialization constant");
+							p->info.hasval = False;
+						}
+						break;
+				}
+			  }
+			  p->info.offset = sp->offset;
+			  if ($4.sto & Sextern)
+				p->level = GLOBAL;
+			  else if (sp->grow)
+				sp->offset += p->info.typ->width;
+			  else if (p->info.typ->width > sp->offset)
+				sp->offset = p->info.typ->width;
+			  sp->entry = p;
+			}
+	;
+arg	: /* empty */	{ if (sp->table->level != PARAM)
+			    $$ = gensymidx("param", ++sp->val);
+			  else if (eflag)
+				$$ = gensymidx("_param", ++sp->val);
+			  else
+				$$ = gensym("_param");
+			}
+	| ID		{ if (vflag != 1 && *$1->name == '_' && sp->table->level == GLOBAL)
+			  { sprintf(errbuf, "SOAP 1.2 does not support anonymous parameters '%s'", $1->name);
+			    semwarn(errbuf);
+			  }
+			  $$ = $1;
+			}
+	;
+
+/******************************************************************************\
+
+	Type specification
+
+\******************************************************************************/
+
+/* texp : type expression (subset of C) */
+texp	: tspec ptrs array
+			{ $$ = $3; }
+	| tspec ptrs ID array
+			{ $$ = $4; }
+	;
+spec	: /*empty */	{ $$.typ = mkint();
+			  $$.sto = Snone;
+			  sp->node = $$;
+			}
+	| store spec	{ $$.typ = $2.typ;
+			  $$.sto = (Storage)((int)$1 | (int)$2.sto);
+			  if (($$.sto & Sattribute) && !is_primitive_or_string($2.typ) && !is_stdstr($2.typ) && !is_binary($2.typ))
+			  {	semwarn("invalid attribute type");
+			  	$$.sto &= ~Sattribute;
+			  }
+			  sp->node = $$;
+			  if ($1 & Sextern)
+				transient = 0;
+			}
+	| type spec	{ if ($1->type == Tint)
+				switch ($2.typ->type)
+				{ case Tchar:	$$.typ = $2.typ; break;
+				  case Tshort:	$$.typ = $2.typ; break;
+				  case Tint:	$$.typ = $1; break;
+				  case Tlong:	$$.typ = $2.typ; break;
+				  case Tllong:	$$.typ = $2.typ; break;
+				  default:	semwarn("illegal use of 'signed'");
+						$$.typ = $2.typ;
+				}
+			  else if ($1->type == Tuint)
+				switch ($2.typ->type)
+				{ case Tchar:	$$.typ = mkuchar(); break;
+				  case Tshort:	$$.typ = mkushort(); break;
+				  case Tint:	$$.typ = $1; break;
+				  case Tlong:	$$.typ = mkulong(); break;
+				  case Tllong:	$$.typ = mkullong(); break;
+				  default:	semwarn("illegal use of 'unsigned'");
+						$$.typ = $2.typ;
+				}
+			  else if ($1->type == Tlong)
+				switch ($2.typ->type)
+				{ case Tint:	$$.typ = $1; break;
+				  case Tlong:	$$.typ = mkllong(); break;
+				  case Tuint:	$$.typ = mkulong(); break;
+				  case Tulong:	$$.typ = mkullong(); break;
+				  default:	semwarn("illegal use of 'long'");
+						$$.typ = $2.typ;
+				}
+			  else if ($1->type == Tulong)
+				switch ($2.typ->type)
+				{ case Tint:	$$.typ = $1; break;
+				  case Tlong:	$$.typ = mkullong(); break;
+				  case Tuint:	$$.typ = $1; break;
+				  case Tulong:	$$.typ = mkullong(); break;
+				  default:	semwarn("illegal use of 'long'");
+						$$.typ = $2.typ;
+				}
+			  else if ($2.typ->type == Tint)
+				$$.typ = $1;
+			  else
+			  	semwarn("invalid type (missing ';'?)");
+			  $$.sto = $2.sto;
+			  sp->node = $$;
+			}
+	;
+tspec	: store		{ $$.typ = mkint();
+			  $$.sto = $1;
+			  sp->node = $$;
+			  if ($1 & Sextern)
+				transient = 0;
+			}
+	| type		{ $$.typ = $1;
+			  $$.sto = Snone;
+			  sp->node = $$;
+			}
+	| store tspec	{ $$.typ = $2.typ;
+			  $$.sto = (Storage)((int)$1 | (int)$2.sto);
+			  if (($$.sto & Sattribute) && !is_primitive_or_string($2.typ) && !is_stdstr($2.typ) && !is_binary($2.typ))
+			  {	semwarn("invalid attribute type");
+			  	$$.sto &= ~Sattribute;
+			  }
+			  sp->node = $$;
+			  if ($1 & Sextern)
+				transient = 0;
+			}
+	| type tspec	{ if ($1->type == Tint)
+				switch ($2.typ->type)
+				{ case Tchar:	$$.typ = $2.typ; break;
+				  case Tshort:	$$.typ = $2.typ; break;
+				  case Tint:	$$.typ = $1; break;
+				  case Tlong:	$$.typ = $2.typ; break;
+				  case Tllong:	$$.typ = $2.typ; break;
+				  default:	semwarn("illegal use of 'signed'");
+						$$.typ = $2.typ;
+				}
+			  else if ($1->type == Tuint)
+				switch ($2.typ->type)
+				{ case Tchar:	$$.typ = mkuchar(); break;
+				  case Tshort:	$$.typ = mkushort(); break;
+				  case Tint:	$$.typ = $1; break;
+				  case Tlong:	$$.typ = mkulong(); break;
+				  case Tllong:	$$.typ = mkullong(); break;
+				  default:	semwarn("illegal use of 'unsigned'");
+						$$.typ = $2.typ;
+				}
+			  else if ($1->type == Tlong)
+				switch ($2.typ->type)
+				{ case Tint:	$$.typ = $1; break;
+				  case Tlong:	$$.typ = mkllong(); break;
+				  case Tuint:	$$.typ = mkulong(); break;
+				  case Tulong:	$$.typ = mkullong(); break;
+				  default:	semwarn("illegal use of 'long'");
+						$$.typ = $2.typ;
+				}
+			  else if ($1->type == Tulong)
+				switch ($2.typ->type)
+				{ case Tint:	$$.typ = $1; break;
+				  case Tlong:	$$.typ = mkullong(); break;
+				  case Tuint:	$$.typ = $1; break;
+				  case Tulong:	$$.typ = mkullong(); break;
+				  default:	semwarn("illegal use of 'long'");
+						$$.typ = $2.typ;
+				}
+			  else if ($2.typ->type == Tint)
+				$$.typ = $1;
+			  else
+			  	semwarn("invalid type");
+			  $$.sto = $2.sto;
+			  sp->node = $$;
+			}
+	;
+type	: VOID		{ $$ = mkvoid(); }
+	| BOOL		{ $$ = mkbool(); }
+	| CHAR		{ $$ = mkchar(); }
+	| WCHAR		{ $$ = mkwchart(); }
+	| SHORT		{ $$ = mkshort(); }
+	| INT		{ $$ = mkint(); }
+	| LONG		{ $$ = mklong(); }
+	| LLONG		{ $$ = mkllong(); }
+	| ULLONG	{ $$ = mkullong(); }
+	| SIZE		{ $$ = mkulong(); }
+	| FLOAT		{ $$ = mkfloat(); }
+	| DOUBLE	{ $$ = mkdouble(); }
+	| SIGNED	{ $$ = mkint(); }
+	| UNSIGNED	{ $$ = mkuint(); }
+	| TIME		{ $$ = mktimet(); }
+	| TEMPLATE '<' tname id '>' CLASS id
+			{ if (!(p = entry(templatetable, $7)))
+			  {	p = enter(templatetable, $7);
+			  	p->info.typ = mktemplate(NULL, $7);
+			  	$7->token = TYPE;
+			  }
+			  $$ = p->info.typ;
+			}
+	| CLASS '{' s2 decls '}'
+			{ sym = gensym("_Struct");
+			  sprintf(errbuf, "anonymous class will be named '%s'", sym->name);
+			  semwarn(errbuf);
+			  if ((p = entry(classtable, sym)))
+			  {	if (p->info.typ->ref || p->info.typ->type != Tclass)
+				{	sprintf(errbuf, "class '%s' already declared at line %d", sym->name, p->lineno);
+					semerror(errbuf);
+				}
+			  }
+			  else
+			  {	p = enter(classtable, sym);
+				p->info.typ = mkclass((Table*)0, 0);
+			  }
+			  sym->token = TYPE;
+			  sp->table->sym = sym;
+			  p->info.typ->ref = sp->table;
+			  p->info.typ->width = sp->offset;
+			  p->info.typ->id = sym;
+			  $$ = p->info.typ;
+			  exitscope();
+			}
+	| class '{' s2 decls '}'
+			{ p = reenter(classtable, $1->sym);
+			  sp->table->sym = p->sym;
+			  p->info.typ->ref = sp->table;
+			  p->info.typ->width = sp->offset;
+			  p->info.typ->id = p->sym;
+			  if (p->info.typ->base)
+			  	sp->table->prev = (Table*)entry(classtable, p->info.typ->base)->info.typ->ref;
+			  $$ = p->info.typ;
+			  exitscope();
+			}
+	| class ':' super '{' s2 decls '}'
+			{ p = reenter(classtable, $1->sym);
+			  sp->table->sym = p->sym;
+			  if (!$3)
+				semerror("invalid base class");
+			  else
+			  {	sp->table->prev = (Table*)$3->info.typ->ref;
+				if (!sp->table->prev && !$3->info.typ->transient)
+				{	sprintf(errbuf, "class '%s' has incomplete type", $3->sym->name);
+					semerror(errbuf);
+				}
+			  }
+			  p->info.typ->ref = sp->table;
+			  p->info.typ->width = sp->offset;
+			  p->info.typ->id = p->sym;
+			  p->info.typ->base = $3->info.typ->id;
+			  $$ = p->info.typ;
+			  exitscope();
+			}
+	| class		{ $1->info.typ->id = $1->sym;
+			  $$ = $1->info.typ;
+			}
+	| class ':' super
+			{ if (!$3)
+				semerror("invalid base class");
+			  else
+			  {	if (!$3->info.typ->ref && !$3->info.typ->transient)
+				{	sprintf(errbuf, "class '%s' has incomplete type", $3->sym->name);
+					semerror(errbuf);
+				}
+			  }
+			  $1->info.typ->id = $1->sym;
+			  $1->info.typ->base = $3->info.typ->id;
+			  $$ = $1->info.typ;
+			}
+	| STRUCT '{' s2 decls '}'
+			{ sym = gensym("_Struct");
+			  sprintf(errbuf, "anonymous struct will be named '%s'", sym->name);
+			  semwarn(errbuf);
+			  if ((p = entry(classtable, sym)))
+			  {	if (p->info.typ->ref || p->info.typ->type != Tstruct)
+				{	sprintf(errbuf, "struct '%s' already declared at line %d", sym->name, p->lineno);
+					semerror(errbuf);
+				}
+				else
+				{	p->info.typ->ref = sp->table;
+					p->info.typ->width = sp->offset;
+				}
+			  }
+			  else
+			  {	p = enter(classtable, sym);
+				p->info.typ = mkstruct(sp->table, sp->offset);
+			  }
+			  p->info.typ->id = sym;
+			  $$ = p->info.typ;
+			  exitscope();
+			}
+	| struct '{' s2 decls '}'
+			{ if ((p = entry(classtable, $1->sym)) && p->info.typ->ref)
+			  {	sprintf(errbuf, "struct '%s' already declared at line %d", $1->sym->name, p->lineno);
+				semerror(errbuf);
+			  }
+			  else
+			  {	p = reenter(classtable, $1->sym);
+			  	p->info.typ->ref = sp->table;
+			  	p->info.typ->width = sp->offset;
+			  	p->info.typ->id = p->sym;
+			  }
+			  $$ = p->info.typ;
+			  exitscope();
+			}
+	| STRUCT ID	{ if ((p = entry(classtable, $2)))
+			  {	if (p->info.typ->type == Tstruct)
+			  		$$ = p->info.typ;
+			  	else
+				{	sprintf(errbuf, "'struct %s' redeclaration %s", $2->name);
+			  		semerror(errbuf);
+			  		$$ = mkint();
+				}
+			  }
+			  else
+			  {	p = enter(classtable, $2);
+			  	$$ = p->info.typ = mkstruct((Table*)0, 0);
+				p->info.typ->id = $2;
+			  }
+			}
+	| STRUCT TYPE	{ if ((p = entry(classtable, $2)))
+			  {	if (p->info.typ->type == Tstruct)
+					$$ = p->info.typ;
+			  	else
+				{	sprintf(errbuf, "'struct %s' redeclaration %s", $2->name);
+			  		semerror(errbuf);
+			  		$$ = mkint();
+				}
+			  }
+			  else
+			  {	p = enter(classtable, $2);
+			  	$$ = p->info.typ = mkstruct((Table*)0, 0);
+				p->info.typ->id = $2;
+			  }
+			}
+	| UNION '{' s3 decls '}'
+			{ sym = gensym("_Union");
+			  sprintf(errbuf, "anonymous union will be named '%s'", sym->name);
+			  semwarn(errbuf);
+			  $$ = mkunion(sp->table, sp->offset);
+			  if ((p = entry(classtable, sym)))
+			  {	if ((Table*) p->info.typ->ref)
+				{	sprintf(errbuf, "union or struct '%s' already declared at line %d", sym->name, p->lineno);
+					semerror(errbuf);
+				}
+				else
+				{	p->info.typ->ref = sp->table;
+					p->info.typ->width = sp->offset;
+				}
+			  }
+			  else
+			  {	p = enter(classtable, sym);
+				p->info.typ = mkunion(sp->table, sp->offset);
+			  }
+			  p->info.typ->id = sym;
+			  $$ = p->info.typ;
+			  exitscope();
+			}
+	| UNION id '{' s3 decls '}'
+			{ if ((p = entry(classtable, $2)))
+			  {	if (p->info.typ->ref || p->info.typ->type != Tunion)
+			  	{	sprintf(errbuf, "union '%s' already declared at line %d", $2->name, p->lineno);
+					semerror(errbuf);
+			  		p->info.typ;
+				}
+				else
+				{	p = reenter(classtable, $2);
+					p->info.typ->ref = sp->table;
+					p->info.typ->width = sp->offset;
+				}
+			  }
+			  else
+			  {	p = enter(classtable, $2);
+				p->info.typ = mkunion(sp->table, sp->offset);
+			  }
+			  p->info.typ->id = $2;
+			  $$ = p->info.typ;
+			  exitscope();
+			}
+	| UNION ID	{ if ((p = entry(classtable, $2)))
+			  {	if (p->info.typ->type == Tunion)
+					$$ = p->info.typ;
+			  	else
+				{	sprintf(errbuf, "'union %s' redeclaration %s", $2->name);
+			  		semerror(errbuf);
+			  		$$ = mkint();
+				}
+			  }
+			  else
+			  {	p = enter(classtable, $2);
+			  	$$ = p->info.typ = mkunion((Table*) 0, 0);
+				p->info.typ->id = $2;
+			  }
+			}
+	| UNION TYPE	{ if ((p = entry(classtable, $2)))
+			  {	if (p->info.typ->type == Tunion)
+					$$ = p->info.typ;
+			  	else
+				{	sprintf(errbuf, "'union %s' redeclaration %s", $2->name);
+			  		semerror(errbuf);
+			  		$$ = mkint();
+				}
+			  }
+			  else
+			  {	p = enter(classtable, $2);
+			  	$$ = p->info.typ = mkunion((Table*) 0, 0);
+				p->info.typ->id = $2;
+			  }
+			}
+	| ENUM '{' s2 dclrs s5 '}'
+			{ sym = gensym("_Enum");
+			  sprintf(errbuf, "anonymous enum will be named '%s'", sym->name);
+			  semwarn(errbuf);
+			  if ((p = entry(enumtable, sym)))
+			  {	if ((Table*) p->info.typ->ref)
+				{	sprintf(errbuf, "enum '%s' already declared at line %d", sym->name, p->lineno);
+					semerror(errbuf);
+				}
+				else
+				{	p->info.typ->ref = sp->table;
+					p->info.typ->width = 4; /* 4 = enum */
+				}
+			  }
+			  else
+			  {	p = enter(enumtable, sym);
+				p->info.typ = mkenum(sp->table);
+			  }
+			  p->info.typ->id = sym;
+			  $$ = p->info.typ;
+			  exitscope();
+			}
+	| ENUM id '{' s2 dclrs s5 '}'
+			{ if ((p = entry(enumtable, $2)))
+			  {	if ((Table*) p->info.typ->ref)
+				{	sprintf(errbuf, "enum '%s' already declared at line %d", $2->name, p->lineno);
+					semerror(errbuf);
+				}
+				else
+				{	p->info.typ->ref = sp->table;
+					p->info.typ->width = 4; /* 4 = enum */
+				}
+			  }
+			  else
+			  {	p = enter(enumtable, $2);
+				p->info.typ = mkenum(sp->table);
+			  }
+			  p->info.typ->id = $2;
+			  $$ = p->info.typ;
+			  exitscope();
+			}
+	| ENUM '*' id '{' s4 dclrs s5 '}'
+			{ if ((p = entry(enumtable, $3)))
+			  {	if (p->info.typ->ref)
+				{	sprintf(errbuf, "enum '%s' already declared at line %d", $3->name, p->lineno);
+					semerror(errbuf);
+				}
+				else
+				{	p->info.typ->ref = sp->table;
+					p->info.typ->width = 8; /* 8 = mask */
+				}
+			  }
+			  else
+			  {	p = enter(enumtable, $3);
+				p->info.typ = mkmask(sp->table);
+			  }
+			  p->info.typ->id = $3;
+			  $$ = p->info.typ;
+			  exitscope();
+			}
+	| ENUM ID	{ if ((p = entry(enumtable, $2)))
+			  	$$ = p->info.typ;
+			  else
+			  {	p = enter(enumtable, $2);
+			  	$$ = p->info.typ = mkenum((Table*)0);
+				p->info.typ->id = $2;
+			  }
+			}
+	| ENUM TYPE	{ if ((p = entry(enumtable, $2)))
+				$$ = p->info.typ;
+			  else
+			  {	p = enter(enumtable, $2);
+			  	$$ = p->info.typ = mkenum((Table*)0);
+				p->info.typ->id = $2;
+			  }
+			}
+	| TYPE		{ if ((p = entry(typetable, $1)))
+				$$ = p->info.typ;
+			  else if ((p = entry(classtable, $1)))
+			  	$$ = p->info.typ;
+			  else if ((p = entry(enumtable, $1)))
+			  	$$ = p->info.typ;
+			  else if ($1 == lookup("std::string") || $1 == lookup("std::wstring"))
+			  {	p = enter(classtable, $1);
+				$$ = p->info.typ = mkclass((Table*)0, 0);
+			  	p->info.typ->id = $1;
+			  	p->info.typ->transient = -2;
+			  }
+			  else
+			  {	sprintf(errbuf, "unknown type '%s'", $1->name);
+				semerror(errbuf);
+				$$ = mkint();
+			  }
+			}
+	| TYPE '<' texp '>'
+			{ if ((p = entry(templatetable, $1)))
+				$$ = mktemplate($3.typ, $1);
+			  else
+			  {	sprintf(errbuf, "invalid template '%s'", $1->name);
+				semerror(errbuf);
+				$$ = mkint();
+			  }
+			}
+	;
+struct	: STRUCT id	{ if ((p = entry(classtable, $2)))
+			  {	if (p->info.typ->ref)
+				{	sprintf(errbuf, "struct '%s' already declared at line %d", $2->name, p->lineno);
+					semerror(errbuf);
+				}
+				else
+					p = reenter(classtable, $2);
+			  }
+			  else
+			  {	p = enter(classtable, $2);
+				p->info.typ = mkstruct((Table*)0, 0);
+			  }
+			  $$ = p;
+			}
+	;
+class	: CLASS id	{ if ((p = entry(classtable, $2)))
+			  {	if (p->info.typ->ref)
+				{	sprintf(errbuf, "class '%s' already declared at line %d", $2->name, p->lineno);
+					semerror(errbuf);
+				}
+				else
+					p = reenter(classtable, $2);
+			  }
+			  else
+			  {	p = enter(classtable, $2);
+				p->info.typ = mkclass((Table*)0, 0);
+				p->info.typ->id = p->sym;
+			  }
+			  $2->token = TYPE;
+			  $$ = p;
+			}
+	;
+tname	: CLASS		{ }
+	| TYPENAME	{ }
+	;
+super	: PROTECTED TYPE{ $$ = entry(classtable, $2); }
+	| PRIVATE TYPE	{ $$ = entry(classtable, $2); }
+	| PUBLIC TYPE	{ $$ = entry(classtable, $2); }
+	| TYPE		{ $$ = entry(classtable, $1); }
+	;
+s2	: /* empty */	{ if (transient == -2)
+			  	transient = 0;
+			  permission = 0;
+			  enterscope(mktable(NULL), 0);
+			  sp->entry = NULL;
+			}
+	;
+s3	: /* empty */	{ if (transient == -2)
+			  	transient = 0;
+			  permission = 0;
+			  enterscope(mktable(NULL), 0);
+			  sp->entry = NULL;
+			  sp->grow = False;
+			}
+	;
+s4	: /* empty */	{ enterscope(mktable(NULL), 0);
+			  sp->entry = NULL;
+			  sp->mask = True;
+			  sp->val = 1;
+			}
+	;
+s5	: /* empty */	{ }
+	| ','		{ }
+	;
+s6	: /* empty */	{ if (sp->table->level == INTERNAL)
+			  	transient |= 1;
+			  permission = 0;
+			  enterscope(mktable(NULL), 0);
+			  sp->entry = NULL;
+			  sp->table->level = PARAM;
+			}
+	;
+store	: AUTO		{ $$ = Sauto; }
+	| REGISTER	{ $$ = Sregister; }
+	| STATIC	{ $$ = Sstatic; }
+	| EXPLICIT	{ $$ = Sexplicit; }
+	| EXTERN	{ $$ = Sextern; transient = 1; }
+	| TYPEDEF	{ $$ = Stypedef; }
+	| VIRTUAL	{ $$ = Svirtual; }
+	| CONST		{ $$ = Sconst; }
+	| FRIEND	{ $$ = Sfriend; }
+	| INLINE	{ $$ = Sinline; }
+	| MUSTUNDERSTAND{ $$ = SmustUnderstand; }
+	| RETURN	{ $$ = Sreturn; }
+	| '@'		{ $$ = Sattribute;
+			  if (eflag)
+			   	semwarn("SOAP RPC encoding does not support XML attributes");
+			}
+	| VOLATILE	{ $$ = Sextern; transient = -2; }
+	;
+constobj: /* empty */	{ $$ = Snone; }
+	| CONST		{ $$ = Sconstobj; }
+	;
+abstract: /* empty */	{ $$ = Snone; }
+	| '=' LNG	{ $$ = Sabstract; }
+	;
+virtual : /* empty */	{ $$ = Snone; }
+	| VIRTUAL	{ $$ = Svirtual; }
+	;
+ptrs	: /* empty */	{ $$ = tmp = sp->node; }
+	| ptrs '*'	{ tmp.typ = mkpointer(tmp.typ);
+			  tmp.typ->transient = transient;
+			  $$ = tmp;
+			}
+	| ptrs '&'	{ tmp.typ = mkreference(tmp.typ);
+			  tmp.typ->transient = transient;
+			  $$ = tmp;
+			}
+	;
+array	: /* empty */ 	{ $$ = tmp;	/* tmp is inherited */
+			}
+	| '[' cexp ']' array
+			{ if ($4.typ->type == Tchar)
+			  {	sprintf(errbuf, "char["SOAP_LONG_FORMAT"] will be encoded as an array of "SOAP_LONG_FORMAT" bytes: use char* for strings", $2.val.i, $2.val.i);
+			  	semwarn(errbuf);
+			  }
+			  if ($2.hasval && $2.typ->type == Tint && $2.val.i > 0 && $4.typ->width > 0)
+				$$.typ = mkarray($4.typ, (int) $2.val.i * $4.typ->width);
+			  else
+			  {	$$.typ = mkarray($4.typ, 0);
+			  	semerror("undetermined array size");
+			  }
+			  $$.sto = $4.sto;
+			}
+	| '[' ']' array	{ $$.typ = mkpointer($3.typ); /* zero size array = pointer */
+			  $$.sto = $3.sto;
+			}
+	;
+arrayck	: array		{ if ($1.typ->type == Tstruct || $1.typ->type == Tclass)
+				if (!$1.typ->ref && !$1.typ->transient && !($1.sto & Stypedef))
+			   	{	sprintf(errbuf, "struct/class '%s' has incomplete type", $1.typ->id->name);
+					semerror(errbuf);
+				}
+			  $$ = $1;
+			}
+	;
+init	: /* empty */   { $$.hasval = False; }
+	| '=' cexp      { if ($2.hasval)
+			  {	$$.typ = $2.typ;
+				$$.hasval = True;
+				$$.val = $2.val;
+			  }
+			  else
+			  {	$$.hasval = False;
+				semerror("initialization expression not constant");
+			  }
+			}
+        ;
+occurs	: patt
+			{ $$.minOccurs = -1;
+			  $$.maxOccurs = 1;
+			  $$.pattern = $1;
+			}
+	| patt cint
+			{ $$.minOccurs = $2;
+			  $$.maxOccurs = 1;
+			  $$.pattern = $1;
+			}
+	| patt cint ':'
+			{ $$.minOccurs = $2;
+			  $$.maxOccurs = 1;
+			  $$.pattern = $1;
+			}
+	| patt cint ':' cint
+			{ $$.minOccurs = $2;
+			  $$.maxOccurs = $4;
+			  $$.pattern = $1;
+			}
+	| patt ':' cint
+			{ $$.minOccurs = -1;
+			  $$.maxOccurs = $3;
+			  $$.pattern = $1;
+			}
+	;
+patt	: /* empty */	{ $$ = NULL; }
+	| STR		{ $$ = $1; }
+	;
+cint	: LNG		{ $$ = $1; }
+	| '-' LNG	{ $$ = -$2; }
+	;
+
+/******************************************************************************\
+
+	Expressions
+
+\******************************************************************************/
+
+expr	: expr ',' expr	{ $$ = $3; }
+	| cexp		{ $$ = $1; }
+	;
+/* cexp : conditional expression */
+cexp	: obex '?' qexp ':' cexp
+			{ $$.typ = $3.typ;
+			  $$.sto = Snone;
+			  $$.hasval = False;
+			}
+	| oexp
+	;
+/* qexp : true-branch of ? : conditional expression */
+qexp	: expr		{ $$ = $1; }
+	;
+/* oexp : or-expression */
+oexp	: obex OR aexp	{ $$.hasval = False;
+			  $$.typ = mkint();
+			}
+	| aexp		{ $$ = $1; }
+	;
+obex	: oexp		{ $$ = $1; }
+	;
+/* aexp : and-expression */
+aexp	: abex AN rexp	{ $$.hasval = False;
+			  $$.typ = mkint();
+			}
+	| rexp		{ $$ = $1; }
+	;
+abex	: aexp		{ $$ = $1; }
+	;
+/* rexp : relational expression */
+rexp	: rexp '|' rexp	{ $$ = iop("|", $1, $3); }
+	| rexp '^' rexp	{ $$ = iop("^", $1, $3); }
+	| rexp '&' rexp	{ $$ = iop("&", $1, $3); }
+	| rexp EQ  rexp	{ $$ = relop("==", $1, $3); }
+	| rexp NE  rexp	{ $$ = relop("!=", $1, $3); }
+	| rexp '<' rexp	{ $$ = relop("<", $1, $3); }
+	| rexp LE  rexp	{ $$ = relop("<=", $1, $3); }
+	| rexp '>' rexp	{ $$ = relop(">", $1, $3); }
+	| rexp GE  rexp	{ $$ = relop(">=", $1, $3); }
+	| rexp LS  rexp	{ $$ = iop("<<", $1, $3); }
+	| rexp RS  rexp	{ $$ = iop(">>", $1, $3); }
+	| rexp '+' rexp	{ $$ = op("+", $1, $3); }
+	| rexp '-' rexp	{ $$ = op("-", $1, $3); }
+	| rexp '*' rexp	{ $$ = op("*", $1, $3); }
+	| rexp '/' rexp	{ $$ = op("/", $1, $3); }
+	| rexp '%' rexp	{ $$ = iop("%", $1, $3); }
+	| lexp		{ $$ = $1; }
+	;
+/* lexp : lvalue kind of expression with optional prefix contructs */
+lexp	: '!' lexp	{ if ($2.hasval)
+				$$.val.i = !$2.val.i;
+			  $$.typ = $2.typ;
+			  $$.hasval = $2.hasval;
+			}
+	| '~' lexp	{ if ($2.hasval)
+				$$.val.i = ~$2.val.i;
+			  $$.typ = $2.typ;
+			  $$.hasval = $2.hasval;
+			}
+	| '-' lexp	{ if ($2.hasval) {
+				if (integer($2.typ))
+					$$.val.i = -$2.val.i;
+				else if (real($2.typ))
+					$$.val.r = -$2.val.r;
+				else	typerror("string?");
+			  }
+			  $$.typ = $2.typ;
+			  $$.hasval = $2.hasval;
+			}
+	| '+' lexp	{ $$ = $2; }
+	| '*' lexp	{ if ($2.typ->type == Tpointer) {
+			  	$$.typ = (Tnode*) $2.typ->ref;
+			  } else
+			  	typerror("dereference of non-pointer type");
+			  $$.sto = Snone;
+			  $$.hasval = False;
+			}
+	| '&' lexp	{ $$.typ = mkpointer($2.typ);
+			  $$.sto = Snone;
+			  $$.hasval = False;
+			}
+	| SIZEOF '(' texp ')'
+			{ $$.hasval = True;
+			  $$.typ = mkint();
+			  $$.val.i = $3.typ->width;
+			}
+	| pexp		{ $$ = $1; }
+	;
+/* pexp : primitive expression with optional postfix constructs */
+pexp	: '(' expr ')'	{ $$ = $2; }
+	| ID		{ if ((p = enumentry($1)) == (Entry*) 0)
+				p = undefined($1);
+			  else
+			  	$$.hasval = True;
+			  $$.typ = p->info.typ;
+			  $$.val = p->info.val;
+			}
+	| LNG		{ $$.typ = mkint();
+			  $$.hasval = True;
+			  $$.val.i = $1;
+			}
+	| null		{ $$.typ = mkint();
+			  $$.hasval = True;
+			  $$.val.i = 0;
+			}
+	| DBL		{ $$.typ = mkfloat();
+			  $$.hasval = True;
+			  $$.val.r = $1;
+			}
+	| CHR		{ $$.typ = mkchar();
+			  $$.hasval = True;
+			  $$.val.i = $1;
+			}
+	| STR		{ $$.typ = mkstring();
+			  $$.hasval = True;
+			  $$.val.s = $1;
+			}
+	| CFALSE	{ $$.typ = mkbool();
+			  $$.hasval = True;
+			  $$.val.i = 0;
+			}
+	| CTRUE		{ $$.typ = mkbool();
+			  $$.hasval = True;
+			  $$.val.i = 1;
+			}
+	;
+
+%%
+
+/*
+ * ???
+ */
+int
+yywrap()
+{	return 1;
+}
+
+/******************************************************************************\
+
+	Support routines
+
+\******************************************************************************/
+
+static Node
+op(const char *op, Node p, Node q)
+{	Node	r;
+	Tnode	*typ;
+	r.typ = p.typ;
+	r.sto = Snone;
+	if (p.hasval && q.hasval) {
+		if (integer(p.typ) && integer(q.typ))
+			switch (op[0]) {
+			case '|':	r.val.i = p.val.i |  q.val.i; break;
+			case '^':	r.val.i = p.val.i ^  q.val.i; break;
+			case '&':	r.val.i = p.val.i &  q.val.i; break;
+			case '<':	r.val.i = p.val.i << q.val.i; break;
+			case '>':	r.val.i = p.val.i >> q.val.i; break;
+			case '+':	r.val.i = p.val.i +  q.val.i; break;
+			case '-':	r.val.i = p.val.i -  q.val.i; break;
+			case '*':	r.val.i = p.val.i *  q.val.i; break;
+			case '/':	r.val.i = p.val.i /  q.val.i; break;
+			case '%':	r.val.i = p.val.i %  q.val.i; break;
+			default:	typerror(op);
+			}
+		else if (real(p.typ) && real(q.typ))
+			switch (op[0]) {
+			case '+':	r.val.r = p.val.r + q.val.r; break;
+			case '-':	r.val.r = p.val.r - q.val.r; break;
+			case '*':	r.val.r = p.val.r * q.val.r; break;
+			case '/':	r.val.r = p.val.r / q.val.r; break;
+			default:	typerror(op);
+			}
+		else	semerror("illegal constant operation");
+		r.hasval = True;
+	} else {
+		typ = mgtype(p.typ, q.typ);
+		r.hasval = False;
+	}
+	return r;
+}
+
+static Node
+iop(const char *iop, Node p, Node q)
+{	if (integer(p.typ) && integer(q.typ))
+		return op(iop, p, q);
+	typerror("integer operands only");
+	return p;
+}
+
+static Node
+relop(const char *op, Node p, Node q)
+{	Node	r;
+	Tnode	*typ;
+	r.typ = mkint();
+	r.sto = Snone;
+	r.hasval = False;
+	if (p.typ->type != Tpointer || p.typ != q.typ)
+		typ = mgtype(p.typ, q.typ);
+	return r;
+}
+
+/******************************************************************************\
+
+	Scope management
+
+\******************************************************************************/
+
+/*
+mkscope - initialize scope stack with a new table and offset
+*/
+static void
+mkscope(Table *table, int offset)
+{	sp = stack-1;
+	enterscope(table, offset);
+}
+
+/*
+enterscope - enter a new scope by pushing a new table and offset on the stack
+*/
+static void
+enterscope(Table *table, int offset)
+{	if (++sp == stack+MAXNEST)
+		execerror("maximum scope depth exceeded");
+	sp->table = table;
+	sp->val = 0;
+	sp->offset = offset;
+	sp->grow = True;	/* by default, offset grows */
+	sp->mask = False;
+}
+
+/*
+exitscope - exit a scope by popping the table and offset from the stack
+*/
+static void
+exitscope()
+{	check(sp-- != stack, "exitscope() has no matching enterscope()");
+}
+
+/******************************************************************************\
+
+	Undefined symbol
+
+\******************************************************************************/
+
+static Entry*
+undefined(Symbol *sym)
+{	Entry	*p;
+	sprintf(errbuf, "undefined identifier '%s'", sym->name);
+	semwarn(errbuf);
+	p = enter(sp->table, sym);
+	p->level = GLOBAL;
+	p->info.typ = mkint();
+	p->info.sto = Sextern;
+	p->info.hasval = False;
+	return p;
+}
+
+/*
+mgtype - return most general type among two numerical types
+*/
+Tnode*
+mgtype(Tnode *typ1, Tnode *typ2)
+{	if (numeric(typ1) && numeric(typ2)) {
+		if (typ1->type < typ2->type)
+			return typ2;
+	} else	typerror("non-numeric type");
+	return typ1;
+}
+
+/******************************************************************************\
+
+	Type checks
+
+\******************************************************************************/
+
+static int
+integer(Tnode *typ)
+{	switch (typ->type) {
+	case Tchar:
+	case Tshort:
+	case Tint:
+	case Tlong:	return True;
+	}
+	return False;
+}
+
+static int
+real(Tnode *typ)
+{	switch (typ->type) {
+	case Tfloat:
+	case Tdouble:	return True;
+	}
+	return False;
+}
+
+static int
+numeric(Tnode *typ)
+{	return integer(typ) || real(typ);
+}
+
+static int
+pointer(Tnode *typ)
+{	return typ->type == Tpointer;
+}
+
+static void
+add_fault(Table *gt)
+{ Table *t;
+  Entry *p1, *p2, *p3, *p4;
+  Symbol *s1, *s2, *s3, *s4;
+  s1 = lookup("SOAP_ENV__Code");
+  p1 = entry(classtable, s1);
+  if (!p1 || !p1->info.typ->ref)
+  { t = mktable((Table*)0);
+    if (!p1)
+    { p1 = enter(classtable, s1);
+      p1->info.typ = mkstruct(t, 3*4);
+      p1->info.typ->id = s1;
+    }
+    else
+      p1->info.typ->ref = t;
+    p2 = enter(t, lookup("SOAP_ENV__Value"));
+    p2->info.typ = qname;
+    p2->info.minOccurs = 0;
+    p2 = enter(t, lookup("SOAP_ENV__Subcode"));
+    p2->info.typ = mkpointer(p1->info.typ);
+    p2->info.minOccurs = 0;
+  }
+  s2 = lookup("SOAP_ENV__Detail");
+  p2 = entry(classtable, s2);
+  if (!p2 || !p2->info.typ->ref)
+  { t = mktable((Table*)0);
+    if (!p2)
+    { p2 = enter(classtable, s2);
+      p2->info.typ = mkstruct(t, 3*4);
+      p2->info.typ->id = s2;
+    }
+    else
+      p2->info.typ->ref = t;
+    p3 = enter(t, lookup("__type"));
+    p3->info.typ = mkint();
+    p3->info.minOccurs = 0;
+    p3 = enter(t, lookup("fault"));
+    p3->info.typ = mkpointer(mkvoid());
+    p3->info.minOccurs = 0;
+    p3 = enter(t, lookup("__any"));
+    p3->info.typ = xml;
+    p3->info.minOccurs = 0;
+    custom_fault = 0;
+  }
+  s4 = lookup("SOAP_ENV__Reason");
+  p4 = entry(classtable, s4);
+  if (!p4 || !p4->info.typ->ref)
+  { t = mktable((Table*)0);
+    if (!p4)
+    { p4 = enter(classtable, s4);
+      p4->info.typ = mkstruct(t, 4);
+      p4->info.typ->id = s4;
+    }
+    else
+      p4->info.typ->ref = t;
+    p3 = enter(t, lookup("SOAP_ENV__Text"));
+    p3->info.typ = mkstring();
+    p3->info.minOccurs = 0;
+  }
+  s3 = lookup("SOAP_ENV__Fault");
+  p3 = entry(classtable, s3);
+  if (!p3)
+  { t = mktable(NULL);
+    p3 = enter(classtable, s3);
+    p3->info.typ = mkstruct(t, 9*4);
+    p3->info.typ->id = s3;
+    p3 = enter(t, lookup("faultcode"));
+    p3->info.typ = qname;
+    p3->info.minOccurs = 0;
+    p3 = enter(t, lookup("faultstring"));
+    p3->info.typ = mkstring();
+    p3->info.minOccurs = 0;
+    p3 = enter(t, lookup("faultactor"));
+    p3->info.typ = mkstring();
+    p3->info.minOccurs = 0;
+    p3 = enter(t, lookup("detail"));
+    p3->info.typ = mkpointer(p2->info.typ);
+    p3->info.minOccurs = 0;
+    p3 = enter(t, s1);
+    p3->info.typ = mkpointer(p1->info.typ);
+    p3->info.minOccurs = 0;
+    p3 = enter(t, s4);
+    p3->info.typ = mkpointer(p4->info.typ);
+    p3->info.minOccurs = 0;
+    p3 = enter(t, lookup("SOAP_ENV__Node"));
+    p3->info.typ = mkstring();
+    p3->info.minOccurs = 0;
+    p3 = enter(t, lookup("SOAP_ENV__Role"));
+    p3->info.typ = mkstring();
+    p3->info.minOccurs = 0;
+    p3 = enter(t, lookup("SOAP_ENV__Detail"));
+    p3->info.typ = mkpointer(p2->info.typ);
+    p3->info.minOccurs = 0;
+  }
+}
+
+static void
+add_XML()
+{ Symbol *s = lookup("_XML");
+  int tmp = imports;
+  imports = 0;
+  p = enter(typetable, s);
+  xml = p->info.typ = mksymtype(mkstring(), s);
+  p->info.sto = Stypedef;
+  imports = tmp;
+}
+
+static void
+add_qname()
+{ Symbol *s = lookup("_QName");
+  int tmp = imports;
+  p = enter(typetable, s);
+  qname = p->info.typ = mksymtype(mkstring(), s);
+  qname->imports = 0;
+  p->info.sto = Stypedef;
+  imports = tmp;
+}
+
+static void
+add_header(Table *gt)
+{ Table *t;
+  Entry *p;
+  Symbol *s = lookup("SOAP_ENV__Header");
+  p = entry(classtable, s);
+  if (!p)
+  { t = mktable((Table*)0);
+    p = enter(t, lookup("dummy"));
+    p->info.typ = mkpointer(mkvoid());
+    p = enter(classtable, s);
+    p->info.typ = mkstruct(t, 4);
+    p->info.typ->id = s;
+    custom_header = 0;
+  }
+}
+
+static void
+add_response(Entry *fun, Entry *ret)
+{ Table *t;
+  Entry *p, *q;
+  Symbol *s;
+  int n = strlen(fun->sym->name);
+  char *r = (char*)emalloc(n+9);
+  strcpy(r, fun->sym->name);
+  strcat(r, "Response");
+  if (!(s = lookup(r)))
+    s = install(r, ID);
+  free(r);
+  t = mktable((Table*)0);
+  q = enter(t, ret->sym);
+  q->info = ret->info;
+  if (q->info.typ->type == Treference)
+    q->info.typ = (Tnode*)q->info.typ->ref;
+  p = enter(classtable, s);
+  p->info.typ = mkstruct(t, 4);
+  p->info.typ->id = s;
+  fun->info.typ->response = p;
+}
+
+static void
+add_result(Tnode *typ)
+{ Entry *p;
+  if (!typ->ref || !((Tnode*)typ->ref)->ref)
+  { semwarn("response struct/class must be declared before used in function prototype");
+    return;
+  }
+  for (p = ((Table*)((Tnode*)typ->ref)->ref)->list; p; p = p->next)
+    if (p->info.sto & Sreturn)
+      return;
+  p = ((Table*)((Tnode*)typ->ref)->ref)->list;
+  if (p)
+    p->info.sto = (Storage)((int)p->info.sto | (int)Sreturn);
+}
diff --git a/src/symbol2.c b/src/symbol2.c
new file mode 100644
index 0000000..47e5a1c
--- /dev/null
+++ b/src/symbol2.c
@@ -0,0 +1,9858 @@
+/*
+
+symbol2.c
+
+Symbol table handling, type graph handling, and code generation.
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "soapcpp2.h"
+#include "soapcpp2_yacc.h"
+
+char *envURI = "http://schemas.xmlsoap.org/soap/envelope/";
+char *encURI = "http://schemas.xmlsoap.org/soap/encoding/";
+char *rpcURI = "http://www.w3.org/2003/05/soap-rpc";
+char *xsiURI = "http://www.w3.org/2001/XMLSchema-instance";
+char *xsdURI = "http://www.w3.org/2001/XMLSchema";
+char *tmpURI = "http://tempuri.org";
+
+static	Symbol *symlist = (Symbol*) 0;	/* pointer to linked list of symbols */
+static	Symbol *nslist = (Symbol*) 0;	/* pointer to linked list of namespace prefix symbols */
+
+static	Tnode *Tptr[TYPES];
+
+Service *services = NULL;
+
+FILE *fout, *fhead, *fclient, *fserver, *fheader, *flib, *fmatlab, *fmheader;
+
+int typeNO = 1;	/* unique no. assigned to all types */
+
+static int is_anytype_flag = 0; /* anytype is used */
+
+/*
+install - add new symbol
+*/
+Symbol *
+install(const char *name, Token token)
+{ Symbol *p;
+  p = (Symbol*)emalloc(sizeof(Symbol));
+  p->name = emalloc(strlen(name)+1);
+  strcpy(p->name, name);
+  p->token = token;
+  p->next = symlist;
+  symlist = p;
+  return p;
+}
+
+/*
+lookup - search for an identifier's name. If found, return pointer to symbol table entry. Return pointer 0 if not found.
+*/
+Symbol *
+lookup(const char *name)
+{ Symbol *p;
+  for (p = symlist; p; p = p->next)
+    if (!strcmp(p->name, name))
+      return p;
+  return NULL;
+}
+
+/*
+gensymidx - generate new symbol from base name and index
+*/
+Symbol *
+gensymidx(const char *base, int idx)
+{ char buf[1024];
+  Symbol *s;
+  sprintf(buf, "%s_%d", base, idx);
+  s = lookup(buf);
+  if (s)
+    return s;
+  return install(buf, ID);
+}
+
+/*
+gensym - generate new symbol from base name
+*/
+Symbol *
+gensym(const char *base)
+{ static int num = 1;
+  return gensymidx(base, num++);
+}
+
+/*
+mktable - make a new symbol table with a pointer to a previous table
+*/
+Table*
+mktable(Table *table)
+{	Table	*p;
+	p = (Table*)emalloc(sizeof(Table));
+	p->sym = lookup("/*?*/");
+	p->list = (Entry*) 0;
+	if (table == (Table*) 0)
+		p->level = INTERNAL;
+	else	p->level = table->level+1;
+	p->prev = table;
+	return p;
+}
+
+/*
+mkmethod - make a new method by calling mktype
+*/
+Tnode*
+mkmethod(Tnode *ret, Table *args)
+{	FNinfo *fn = (FNinfo*)emalloc(sizeof(FNinfo));
+	fn->ret = ret;
+	fn->args = args;
+	return mktype(Tfun, fn, 0);
+}
+
+/*
+freetable - free space by removing a table
+*/
+void
+freetable(Table *table)
+{	Entry	*p, *q;
+	if (table == (Table*) 0)
+		return;
+	for (p = table->list; p != (Entry*) 0; p = q) {
+		q = p->next;
+		free(p);
+	}
+	free(table);
+}
+
+/*
+unlinklast - unlink last entry added to table
+*/
+Entry *
+unlinklast(Table *table)
+{	Entry	**p, *q;
+	if (table == (Table*)0)
+		return (Entry*)0;
+	for (p = &table->list; *p != (Entry*)0 && (*p)->next != (Entry*)0;
+	     p = &(*p)->next);
+	q = *p;
+	*p = (Entry*)0;
+	return q;
+}
+
+/*
+enter - enter a symbol in a table. Error if already in the table
+*/
+Entry	*
+enter(table, sym)
+Table	*table;
+Symbol	*sym;
+{ Entry	*p, *q = NULL;
+  for (p = table->list; p; q = p, p = p->next)
+    if (p->sym == sym && p->info.typ->type != Tfun)
+    { sprintf(errbuf, "Duplicate declaration of %s (already declarared at line %d)", sym->name, p->lineno);
+      semerror(errbuf);
+      return p;
+    }
+  p = (Entry*)emalloc(sizeof(Entry));
+  p->sym = sym;
+  p->info.typ = NULL;
+  p->info.sto = Snone;
+  p->info.hasval = False;
+  p->info.minOccurs = 1;
+  p->info.maxOccurs = 1;
+  p->info.offset = 0;
+  p->level = table->level;
+  p->lineno = yylineno;
+  p->next = NULL;
+  if (!q)
+    table->list = p;
+  else
+    q->next = p;
+  return p;
+}
+
+/*
+entry - return pointer to table entry of a symbol
+*/
+Entry	*entry(table, sym)
+Table	*table;
+Symbol	*sym;
+{ Table	*t;
+  Entry	*p;
+  for (t = table; t; t = t->prev)
+    for (p = t->list; p; p = p->next)
+      if (p->sym == sym)
+	return p;
+  return NULL;
+}
+
+/*
+reenter - re-enter a symbol in a table.
+*/
+Entry	*
+reenter(table, sym)
+Table	*table;
+Symbol	*sym;
+{ Entry	*p, *q = NULL;
+  for (p = table->list; p; q = p, p = p->next)
+    if (p->sym == sym)
+      break;
+  if (p && p->next)
+  { if (q)
+      q->next = p->next;
+    else
+      table->list = p->next;
+    for (q = p->next; q->next; q = q->next)
+      ;
+    q->next = p;
+    p->next = NULL;
+  }
+  return p;
+}
+
+Entry *
+enumentry(Symbol *sym)
+{ Table	*t;
+  Entry	*p, *q;
+  for (t = enumtable; t; t = t->prev)
+    for (p = t->list; p; p = p->next)
+      if (q = entry(p->info.typ->ref, sym))
+	return q;
+  return NULL;
+}
+
+char *get_mxClassID(Tnode*);
+char *t_ident(Tnode*);
+char *c_ident(Tnode*);
+char *soap_type(Tnode*);
+char *c_storage(Storage);
+char *c_init(Entry*);
+char *c_type(Tnode*);
+char *c_type_id(Tnode*, char*);
+char *xsi_type_cond(Tnode*, int);
+char *xsi_type(Tnode*);
+char *xsi_type_cond_u(Tnode*, int);
+char *xsi_type_u(Tnode*);
+char *the_type(Tnode*);
+char *wsdl_type(Tnode*, char*);
+char *base_type(Tnode*, char*);
+char *xml_tag(Tnode*);
+char *ns_qualifiedElement(Tnode*);
+char *ns_qualifiedAttribute(Tnode*);
+char *ns_convert(char*);
+char *ns_add(char*, char*);
+char *ns_remove(char*);
+char *ns_remove1(char*);
+char *ns_remove2(char*);
+char *res_remove(char*);
+char *ns_overridden(Table*, Entry*);
+char *ns_name(char*);
+char *ns_cname(char*, char*);
+
+int has_class(Tnode*);
+int has_constructor(Tnode*);
+int has_destructor(Tnode*);
+int has_getter(Tnode*);
+int has_setter(Tnode*);
+int has_ns(Tnode*);
+int has_ns_t(Tnode*);
+int has_ns_eq(char*, char*);
+char *ns_of(char*);
+char *prefix_of(char*);
+int has_offset(Tnode*);
+int reflevel(Tnode *typ);
+Tnode* reftype(Tnode *typ);
+int is_response(Tnode*);
+Entry *get_response(Tnode*);
+int is_primitive_or_string(Tnode*);
+int is_primitive(Tnode*);
+Entry *is_discriminant(Tnode*);
+Entry *is_dynamic_array(Tnode*);
+int is_transient(Tnode*);
+int is_external(Tnode*);
+int is_binary(Tnode*);
+int is_hexBinary(Tnode*);
+int is_string(Tnode*);
+int is_wstring(Tnode*);
+int is_stdstring(Tnode*);
+int is_stdwstring(Tnode*);
+int is_stdstr(Tnode*);
+int is_typedef(Tnode*);
+int get_dimension(Tnode*);
+char *has_soapref(Tnode*);
+int is_document(const char*);
+int is_literal(const char*);
+int is_keyword(const char *);
+
+int is_repetition(Entry*);
+int is_choice(Entry*);
+int is_anytype(Entry*);
+
+char *xsi_type_Tarray(Tnode*);    
+char *xsi_type_Darray(Tnode*);    
+
+void matlab_def_table(Table*);
+void def_table(Table*);
+void out_generate(Tnode *);
+int no_of_var(Tnode*);
+char *pointer_stuff(Tnode*);
+void in_defs(Table*);
+void in_defs2(Table*);
+void out_defs(Table*);
+void mark_defs(Table*);
+void in_attach(Table*);
+void out_attach(Table*);
+void mark(Tnode*);
+void defaults(Tnode*);
+void soap_put(Tnode*);
+void soap_out(Tnode*);
+void soap_out_Darray(Tnode *);
+void soap_get(Tnode*);
+void soap_in(Tnode*); 
+void soap_in_Darray(Tnode *);
+void soap_instantiate_class(Tnode *);
+int get_Darraydims(Tnode *typ);
+
+void soap_serve(Table*);
+void generate_proto(Table*, Entry*);
+/*
+void generate_call(Table*, Entry*);
+void generate_server(Table*, Entry*);
+*/
+void generate_header(Table*);
+void generate_schema(Table*);
+void gen_schema(FILE*,Table*,char*,char*,int,int,char*,char*,char*,char*);
+void gen_type_documentation(FILE *fd, Table *t, Entry *p, char *ns, char *ns1);
+void gen_schema_elements_attributes(FILE *fd, Table *t, char *ns, char *ns1, char *encoding, char *style);
+void gen_schema_elements(FILE *fd, Tnode *p, char *ns, char *ns1);
+int gen_schema_element(FILE *fd, Entry *q, char *ns, char *ns1);
+void gen_schema_attributes(FILE *fd, Tnode *p, char *ns, char *ns1);
+void gen_wsdl(FILE*,Table*,char*,char*,char*,char*,char*,char*,char*);
+void gen_nsmap(FILE*,Symbol*,char*);
+
+void gen_proxy(FILE*,Table*,Symbol*,char*,char*,char*,char*,char*);
+void gen_object(FILE*,Table*,Symbol*,char*,char*,char*,char*,char*);
+void gen_proxy_header(FILE*,Table*,Symbol*,char*,char*,char*,char*,char*);
+void gen_proxy_code(FILE*,Table*,Symbol*,char*,char*,char*,char*,char*);
+void gen_object_header(FILE*,Table*,Symbol*,char*,char*,char*,char*,char*);
+void gen_object_code(FILE*,Table*,Symbol*,char*,char*,char*,char*,char*);
+void gen_method(FILE *fd, Table *table, Entry *method);
+void gen_params(FILE *fd, Table *params, Entry *result, int flag);
+void gen_call_method(FILE *fd, Table *table, Entry *method, char *name);
+void gen_serve_method(FILE *fd, Table *table, Entry *param, char *name);
+
+void gen_data(char*,Table*,char*,char*,char*,char*,char*,char*);
+FILE *gen_env(char*,char*,int,Table*,char*,char*,char*,char*,char*,char*);
+void gen_field(FILE*,int,Entry*,char*,char*,char*);
+void gen_val(FILE*,int,Tnode*,char*,char*,char*);
+void gen_atts(FILE*,Table*,char*);
+
+/*
+mktype - make a (new) type with a reference to additional information and the
+width in bytes required to store objects of that type. A pointer to the
+type is returned which can be compared to check if types are identical.
+*/
+Tnode *
+mktype(Type type, void *ref, int width)
+{	Tnode	*p;
+	int t = 0;
+	if (transient != -2 || type > Ttime)
+	  t = transient;
+	if (type != Tstruct && type != Tclass)
+	for (p = Tptr[type]; p != (Tnode*) 0; p = p->next)
+		if (p->ref == ref && p->sym == (Symbol*) 0 && p->width == width && p->transient == t)
+			return p;	/* type alrady exists in table */
+	p = (Tnode*)emalloc(sizeof(Tnode));	/* install new type */
+	p->type = type;
+	p->ref = ref;
+	p->id = lookup("/*?*/");
+	p->base = NULL;
+	p->sym = (Symbol*)0;
+	p->response = (Entry*)0;
+	p->width = width;
+	p->generated = False;
+	p->wsdl = False;
+	p->next = Tptr[type];
+	p->transient = t;
+	p->imports = imports;
+	p->pattern = NULL;
+	p->minLength = -1;
+	p->maxLength = -1;
+	p->num = typeNO++;
+	Tptr[type] = p;
+	return p;
+}
+
+Tnode *
+mksymtype(Tnode *typ, Symbol *sym)
+{	Tnode *p;
+	p = (Tnode*)emalloc(sizeof(Tnode));	/* install new type */
+	p->type = typ->type;
+	p->ref = typ->ref;
+	p->id = typ->id;
+	p->sym = sym;
+	p->response = (Entry*)0;
+	p->width = typ->width;
+	p->generated = True; /* copy of existing (generated) type */
+	p->wsdl = False;
+	p->next = Tptr[typ->type];
+	p->transient = transient;
+	p->imports = imports;
+	p->pattern = NULL;
+	p->minLength = -1;
+	p->maxLength = -1;
+	p->num = typeNO++;
+	Tptr[typ->type] = p;
+	return p;
+}
+
+Tnode *
+mktemplate(Tnode *typ, Symbol *id)
+{	Tnode *p;
+	for (p = Tptr[Ttemplate]; p; p = p->next)
+		if (p->ref == typ && p->id == id && p->transient == transient)
+			return p;	/* type alrady exists in table */
+	p = (Tnode*)emalloc(sizeof(Tnode));	/* install new type */
+	p->type = Ttemplate;
+	p->ref = typ;
+	p->id = id;
+	p->sym = NULL;
+	p->response = (Entry*)0;
+	p->width = 0;
+	p->generated = False; /* copy of existing (generated) type */
+	p->wsdl = False;
+	p->next = Tptr[Ttemplate];
+	p->transient = transient;
+	p->imports = imports;
+	p->pattern = NULL;
+	p->minLength = -1;
+	p->maxLength = -1;
+	p->num = typeNO++;
+	Tptr[Ttemplate] = p;
+	return p;
+}
+
+/*	DO NOT REMOVE OR ALTER (SEE LICENCE AGREEMENT AND COPYING.txt)	*/
+void
+copyrightnote(FILE *fd, char *fn)
+{ fprintf(fd, "/* %s\n   Generated by gSOAP "VERSION" from %s\n   Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.\n   This part of the software is released under one of the following licenses:\n   GPL, the gSOAP public license, or Genivia's license for commercial use.\n*/", fn, filename);
+}
+
+void
+banner(FILE *fd, const char *text)
+{ int i;
+  fprintf(fd, "\n\n/");
+  for (i = 0; i < 78; i++)
+    fputc('*', fd);
+  fprintf(fd, "\\\n *%76s*\n * %-75s*\n *%76s*\n\\", "", text, "");
+  for (i = 0; i < 78; i++)
+    fputc('*', fd);
+  fprintf(fd, "/\n");
+}
+
+void
+ident(FILE *fd, char *fn)
+{ time_t t = time(NULL), *p = &t;
+  char tmp[256];
+  strftime(tmp, 256, "%Y-%m-%d %H:%M:%S GMT", gmtime(p));
+  fprintf(fd, "\n\nSOAP_SOURCE_STAMP(\"@(#) %s ver "VERSION" %s\")\n", fn, tmp);
+}
+
+void
+compile(Table *table)
+{	Entry *p;
+	Tnode *typ;
+	Pragma *pragma;
+	int classflag = 0;
+	char *s;
+	char base[1024];
+	char soapStub[1024];
+	char soapH[1024];
+	char soapC[1024];
+	char soapClient[1024];
+	char soapServer[1024];
+	char soapClientLib[1024];
+	char soapServerLib[1024];
+	char pathsoapStub[1024];
+	char pathsoapH[1024];
+	char pathsoapC[1024];
+	char pathsoapClient[1024];
+	char pathsoapServer[1024];
+	char pathsoapClientLib[1024];
+	char pathsoapServerLib[1024];
+      	char soapMatlab[1024];
+      	char pathsoapMatlab[1024];
+  	char soapMatlabHdr[1024];
+      	char pathsoapMatlabHdr[1024];
+
+	if (*dirpath)
+	  fprintf(fmsg, "Using project directory path: %s\n", dirpath);
+
+	if (namespaceid)
+	{ prefix = namespaceid;
+	  fprintf(fmsg, "Using code namespace: %s\n", namespaceid);
+	}
+	strcpy(base, prefix);
+	if (cflag)
+		s = ".c";
+	else
+		s = ".cpp";
+
+  	strcpy(soapMatlab, base);
+  	strcat(soapMatlab, "Matlab.c");
+  	strcpy(pathsoapMatlab, dirpath);
+  	strcat(pathsoapMatlab, soapMatlab );
+  
+  	strcpy(soapMatlabHdr, base);
+  	strcat(soapMatlabHdr, "Matlab.h");
+  	strcpy(pathsoapMatlabHdr, dirpath);
+  	strcat(pathsoapMatlabHdr, soapMatlabHdr);
+
+	strcpy(soapStub, base);
+	strcat(soapStub, "Stub.h");
+	strcpy(pathsoapStub, dirpath);
+	strcat(pathsoapStub, soapStub);
+	strcpy(soapH, base);
+	strcat(soapH, "H.h");
+	strcpy(pathsoapH, dirpath);
+	strcat(pathsoapH, soapH);
+	strcpy(soapC, base);
+	strcat(soapC, "C");
+	strcat(soapC, s);
+	strcpy(pathsoapC, dirpath);
+	strcat(pathsoapC, soapC);
+	strcpy(soapClient, base);
+	strcat(soapClient, "Client");
+	strcat(soapClient, s);
+	strcpy(pathsoapClient, dirpath);
+	strcat(pathsoapClient, soapClient);
+	strcpy(soapServer, base);
+	strcat(soapServer, "Server");
+	strcat(soapServer, s);
+	strcpy(pathsoapServer, dirpath);
+	strcat(pathsoapServer, soapServer);
+	strcpy(soapClientLib, base);
+	strcat(soapClientLib, "ClientLib");
+	strcat(soapClientLib, s);
+	strcpy(pathsoapClientLib, dirpath);
+	strcat(pathsoapClientLib, soapClientLib);
+	strcpy(soapServerLib, base);
+	strcat(soapServerLib, "ServerLib");
+	strcat(soapServerLib, s);
+	strcpy(pathsoapServerLib, dirpath);
+	strcat(pathsoapServerLib, soapServerLib);
+
+	if (mflag)
+ 	{ fprintf(fmsg, "Saving %s\n", pathsoapMatlab);
+ 	  fmatlab=fopen(pathsoapMatlab, "w");
+ 	  if (!fmatlab)
+ 		execerror("Cannot write to file");
+ 	  copyrightnote(fmatlab, soapMatlab);
+ 	  fprintf(fmatlab,"\n#include \"%s\"\n", soapMatlabHdr);
+ 	  fprintf(fmsg, "Saving %s\n", pathsoapMatlabHdr);
+ 	  fmheader=fopen(pathsoapMatlabHdr, "w");
+ 	  if (!fmheader)
+		execerror("Cannot write to file");
+ 	  copyrightnote(fmheader, soapMatlabHdr);
+ 	  fprintf(fmheader,"\n#include \"mex.h\"\n#include \"%s\"\n", soapStub);
+	}
+
+	fprintf(fmsg, "Saving %s\n", pathsoapStub);
+	fheader=fopen(pathsoapStub, "w");
+	if (!fheader)
+		execerror("Cannot write to file");
+	copyrightnote(fheader, soapStub);
+	fprintf(fmsg, "Saving %s\n", pathsoapH);
+	fhead=fopen(pathsoapH,"w");
+	if (!fhead)
+		execerror("Cannot write to file");
+	copyrightnote(fhead, soapH);
+	fprintf(fmsg, "Saving %s\n", pathsoapC);
+	fout=fopen(pathsoapC,"w");
+	if (!fout)
+		execerror("Cannot write to file");
+	copyrightnote(fout, soapC);
+	if (!Sflag && !iflag)
+	{ fprintf(fmsg, "Saving %s\n", pathsoapClient);
+          fclient=fopen(pathsoapClient,"w");
+	  if (!fclient)
+		execerror("Cannot write to file");
+	  copyrightnote(fclient, soapClient);
+          fprintf(fclient,"\n#include \"%sH.h\"", prefix);
+	  if (cflag)
+	    fprintf(fclient,"\n#ifdef __cplusplus\nextern \"C\" {\n#endif");
+          if (namespaceid)
+            fprintf(fclient,"\n\nnamespace %s {", namespaceid);
+	  ident(fclient, soapClient);
+
+	  if (!Lflag)
+	  { flib=fopen(pathsoapClientLib,"w");
+	    if (!flib)
+		execerror("Cannot write to file");
+	    copyrightnote(flib, soapClientLib);
+	    fprintf(fmsg, "Saving %s\n", pathsoapClientLib);
+	    fprintf(flib, "\n#ifndef WITH_NOGLOBAL\n#define WITH_NOGLOBAL\n#endif");
+	    fprintf(flib, "\n#define SOAP_FMAC3 static");
+	    fprintf(flib, "\n#include \"%s\"", soapC);
+	    fprintf(flib, "\n#include \"%s\"", soapClient);
+	    fprintf(flib, "\n\n/* End of %s */\n", soapClientLib);
+	    fclose(flib);
+	  }
+	}
+	if (!Cflag && !iflag)
+	{ fprintf(fmsg, "Saving %s\n", pathsoapServer);
+          fserver=fopen(pathsoapServer,"w");
+	  if (!fserver)
+		execerror("Cannot write to file");
+	  copyrightnote(fserver, soapServer);
+          fprintf(fserver,"\n#include \"%sH.h\"", prefix);
+	  if (cflag)
+	    fprintf(fserver,"\n#ifdef __cplusplus\nextern \"C\" {\n#endif");
+          if (namespaceid)
+            fprintf(fserver,"\n\nnamespace %s {", namespaceid);
+	  ident(fserver, soapServer);
+
+	  if (!Lflag)
+	  { flib=fopen(pathsoapServerLib,"w");
+	    if (!flib)
+		execerror("Cannot write to file");
+	    copyrightnote(flib, soapServerLib);
+	    fprintf(fmsg, "Saving %s\n", pathsoapServerLib);
+	    fprintf(flib, "\n#ifndef WITH_NOGLOBAL\n#define WITH_NOGLOBAL\n#endif");
+	    fprintf(flib, "\n#define SOAP_FMAC3 static");
+	    fprintf(flib, "\n#include \"%s\"", soapC);
+	    fprintf(flib, "\n#include \"%s\"", soapServer);
+	    fprintf(flib, "\n\n/* End of %s */\n", soapServerLib);
+	    fclose(flib);
+	  }
+	}
+
+	fprintf(fhead,"\n\n#ifndef %sH_H\n#define %sH_H", prefix, prefix);
+	fprintf(fhead,"\n#include \"%s\"", soapStub);
+	if (cflag)
+	  fprintf(fhead,"\n#ifdef __cplusplus\nextern \"C\" {\n#endif");
+	if (namespaceid)
+	  fprintf(fhead,"\n\nnamespace %s {", namespaceid);
+	fprintf(fheader,"\n\n#ifndef %sStub_H\n#define %sStub_H", prefix, prefix);
+	for (pragma = pragmas; pragma; pragma = pragma->next)
+	  fprintf(fheader,"\n%s", pragma->pragma);
+	if (nflag)
+	  fprintf(fheader,"\n#define WITH_NONAMESPACES");
+	if (namespaceid)
+	{ fprintf(fheader,"\n#ifndef WITH_NOGLOBAL\n#define WITH_NOGLOBAL\n#endif");
+	}
+	fprintf(fheader,"\n#include \"stdsoap2.h\"");
+	if (cflag)
+	  fprintf(fheader,"\n#ifdef __cplusplus\nextern \"C\" {\n#endif");
+	if (namespaceid)
+	  fprintf(fheader,"\n\nnamespace %s {", namespaceid);
+	generate_header(table);
+	generate_schema(table);
+	fprintf(fout,"\n\n#include \"%sH.h\"", prefix);
+	if (cflag)
+	  fprintf(fout,"\n#ifdef __cplusplus\nextern \"C\" {\n#endif");
+	if (namespaceid)
+	  fprintf(fout,"\n\nnamespace %s {", namespaceid);
+	ident(fout, soapC);
+
+        if (!iflag)
+	  soap_serve(table);
+
+	fprintf(fhead, "\nSOAP_FMAC3 int SOAP_FMAC4 soap_ignore_element(struct soap*);");
+	fprintf(fhead, "\n#ifndef WITH_NOIDREF");
+	fprintf(fhead, "\nSOAP_FMAC3 int SOAP_FMAC4 soap_putindependent(struct soap*);");
+	fprintf(fhead, "\nSOAP_FMAC3 int SOAP_FMAC4 soap_getindependent(struct soap*);");
+	fprintf(fhead, "\nSOAP_FMAC3 void SOAP_FMAC4 soap_markelement(struct soap*, const void*, int);");
+	fprintf(fhead, "\nSOAP_FMAC3 int SOAP_FMAC4 soap_putelement(struct soap*, const void*, const char*, int, int);");
+	fprintf(fhead, "\nSOAP_FMAC3 void * SOAP_FMAC4 soap_getelement(struct soap*, int*);");
+	fprintf(fhead, "\n#endif");
+	if (!lflag)
+	{
+	fprintf(fout,"\n\n#ifndef WITH_NOGLOBAL");
+        if (entry(classtable, lookup("SOAP_ENV__Header"))->info.typ->type == Tstruct)
+	  fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_serializeheader(struct soap *soap)\n{\n\tif (soap->header)\n\t\tsoap_serialize_SOAP_ENV__Header(soap, soap->header);\n}");
+	else
+	  fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_serializeheader(struct soap *soap)\n{\n\tif (soap->header)\n\t\tsoap->header->soap_serialize(soap);\n}");
+	fprintf(fout,"\n\nSOAP_FMAC3 int SOAP_FMAC4 soap_putheader(struct soap *soap)\n{\n\tif (soap->header)\n\t{\tsoap->part = SOAP_IN_HEADER;\n\t\tsoap_out_SOAP_ENV__Header(soap, \"SOAP-ENV:Header\", 0, soap->header, NULL);\n\t\tsoap->part = SOAP_END_HEADER;\n\t}\n\treturn SOAP_OK;\n}");
+	fprintf(fout,"\n\nSOAP_FMAC3 int SOAP_FMAC4 soap_getheader(struct soap *soap)\n{\n\tsoap->part = SOAP_IN_HEADER;\n\tsoap->header = soap_in_SOAP_ENV__Header(soap, \"SOAP-ENV:Header\", NULL, NULL);\n\tsoap->part = SOAP_END_HEADER;\n\treturn soap->header == NULL;\n}");
+        if ((p = entry(classtable, lookup("SOAP_ENV__Fault")))->info.typ->type == Tstruct && !has_class(p->info.typ))
+	{ fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_fault(struct soap *soap)\n{\n\tif (!soap->fault)\n\t{\tsoap->fault = (struct SOAP_ENV__Fault*)soap_malloc(soap, sizeof(struct SOAP_ENV__Fault));\n\t\tsoap_default_SOAP_ENV__Fault(soap, soap->fault);\n\t}\n\tif (soap->version == 2 && !soap->fault->SOAP_ENV__Code)\n\t{\tsoap->fault->SOAP_ENV__Code = (struct SOAP_ENV__Code*)soap_malloc(soap, sizeof(struct SOAP_ENV__Code));\n\t\tsoap_default_SOAP_ENV__Code(soap, soap->fault->SOAP_ENV__Code);\n\t}\n\tif (soap->version == 2 && !soap->fault->SOAP_ENV__Reason)\n\t{\tsoap->fault->SOAP_ENV__Reason = (struct SOAP_ENV__Reason*)soap_malloc(soap, sizeof(struct SOAP_ENV__Reason));\n\t\tsoap_default_SOAP_ENV__Reason(soap, soap->fault->SOAP_ENV__Reason);\n\t}\n}");
+	  fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_serializefault(struct soap *soap)\n{\n\tif (soap->fault)\n\t\tsoap_serialize_SOAP_ENV__Fault(soap, soap->fault);\n}");
+	}
+	else
+	{ fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_fault(struct soap *soap)\n{\n\tif (!soap->fault)\n\t{\tsoap->fault = soap_new_SOAP_ENV__Fault(soap, -1);\n\t\tsoap->fault->soap_default(soap);\n\t}\n\tif (soap->version == 2 && !soap->fault->SOAP_ENV__Code)\n\t{\tsoap->fault->SOAP_ENV__Code = (struct SOAP_ENV__Code*)soap_malloc(soap, sizeof(struct SOAP_ENV__Code));\n\t\tsoap_default_SOAP_ENV__Code(soap, soap->fault->SOAP_ENV__Code);\n\t}\n\tif (soap->version == 2 && !soap->fault->SOAP_ENV__Reason)\n\t{\tsoap->fault->SOAP_ENV__Reason = (struct SOAP_ENV__Reason*)soap_malloc(soap, sizeof(struct SOAP_ENV__Reason));\n\t\tsoap_default_SOAP_ENV__Reason(soap, soap->fault->SOAP_ENV__Reason);\n\t}\n}");
+	  fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_serializefault(struct soap *soap)\n{\n\tsoap_fault(soap);\n\tif (soap->fault)\n\t\tsoap->fault->soap_serialize(soap);\n}");
+	}
+        if ((p = entry(classtable, lookup("SOAP_ENV__Fault")))->info.typ->type == Tstruct)
+	{ fprintf(fout,"\n\nSOAP_FMAC3 int SOAP_FMAC4 soap_putfault(struct soap *soap)\n{\n\tif (soap->fault)\n\t\treturn soap_put_SOAP_ENV__Fault(soap, soap->fault, \"SOAP-ENV:Fault\", NULL);\n\treturn SOAP_OK;\n}");
+	  fprintf(fout,"\n\nSOAP_FMAC3 int SOAP_FMAC4 soap_getfault(struct soap *soap)\n{\n\treturn (soap->fault = soap_get_SOAP_ENV__Fault(soap, NULL, \"SOAP-ENV:Fault\", NULL)) == NULL;\n}");
+	}
+	else
+	{ fprintf(fout,"\n\nSOAP_FMAC3 int SOAP_FMAC4 soap_putfault(struct soap *soap)\n{\n\tsoap_fault(soap);\n\tif (soap->fault)\n\t\treturn soap->fault->soap_put(soap, \"SOAP-ENV:Fault\", NULL);\n\treturn SOAP_EOM;\n}");
+	  fprintf(fout,"\n\nSOAP_FMAC3 int SOAP_FMAC4 soap_getfault(struct soap *soap)\n{\n\tsoap_fault(soap);\n\tif (soap->fault)\n\t\treturn soap->fault->soap_get(soap, \"SOAP-ENV:Fault\", NULL) == NULL;\n\treturn SOAP_EOM;\n}");
+	}
+	fprintf(fout,"\n\nSOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultcode(struct soap *soap)\n{\n\tsoap_fault(soap);\n\tif (soap->version == 2)\n\t\treturn (const char**)&soap->fault->SOAP_ENV__Code->SOAP_ENV__Value;\n\treturn (const char**)&soap->fault->faultcode;\n}");
+	fprintf(fout,"\n\nSOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultsubcode(struct soap *soap)\n{\n\tsoap_fault(soap);\n\tif (soap->version == 2)\n\t{\tif (!soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode)\n\t\t{\tsoap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode = (struct SOAP_ENV__Code*)soap_malloc(soap, sizeof(struct SOAP_ENV__Code));\n\t\t\tsoap_default_SOAP_ENV__Code(soap, soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode);\n\t\t}\n\t\treturn (const char**)&soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode->SOAP_ENV__Value;\n\t}\n\treturn (const char**)&soap->fault->faultcode;\n}");
+	fprintf(fout,"\n\nSOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultstring(struct soap *soap)\n{\n\tsoap_fault(soap);\n\tif (soap->version == 2)\n\t\treturn (const char**)&soap->fault->SOAP_ENV__Reason->SOAP_ENV__Text;\n\treturn (const char**)&soap->fault->faultstring;\n}");
+	fprintf(fout,"\n\nSOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultdetail(struct soap *soap)\n{\n\tsoap_fault(soap);");
+	if (has_detail_string())
+	  fprintf(fout,"\n\tif (soap->version == 1)\n\t{\tif (!soap->fault->detail)\n\t\t{\tsoap->fault->detail = (struct SOAP_ENV__Detail*)soap_malloc(soap, sizeof(struct SOAP_ENV__Detail));\n\t\t\tsoap_default_SOAP_ENV__Detail(soap, soap->fault->detail);\n\t\t}\n\t\treturn (const char**)&soap->fault->detail->__any;\n\t}");
+	if (has_Detail_string())
+	  fprintf(fout,"\n\tif (!soap->fault->SOAP_ENV__Detail)\n\t{\tsoap->fault->SOAP_ENV__Detail = (struct SOAP_ENV__Detail*)soap_malloc(soap, sizeof(struct SOAP_ENV__Detail));\n\t\tsoap_default_SOAP_ENV__Detail(soap, soap->fault->SOAP_ENV__Detail);\n\t}\n\treturn (const char**)&soap->fault->SOAP_ENV__Detail->__any;\n}");
+        else
+	  fprintf(fout,"\n\treturn NULL;\n}");
+	fprintf(fout,"\n\n#endif");
+
+	fprintf(fout,"\n\n#ifndef WITH_NOIDREF");
+	fprintf(fout,"\nSOAP_FMAC3 int SOAP_FMAC4 soap_getindependent(struct soap *soap)\n{");
+	fprintf(fout,"\n\tint t;\n\tfor (;;)");
+	fprintf(fout,"\n\t\tif (!soap_getelement(soap, &t))");
+        fprintf(fout,"\n\t\t\tif (soap->error || soap_ignore_element(soap))\n\t\t\t\tbreak;");
+        fprintf(fout,"\n\tif (soap->error == SOAP_NO_TAG || soap->error == SOAP_EOF)");
+        fprintf(fout,"\n\t\tsoap->error = SOAP_OK;");
+        fprintf(fout,"\n\treturn soap->error;");
+        fprintf(fout,"\n}\n#endif");
+
+        fprintf(fout,"\n\n#ifndef WITH_NOIDREF");
+	fprintf(fout,"\nSOAP_FMAC3 void * SOAP_FMAC4 soap_getelement(struct soap *soap, int *type)\n{");
+        fprintf(fout,"\n\tif (soap_peek_element(soap))\n\t\treturn NULL;");
+	fprintf(fout,"\n\tif (!*soap->id || !(*type = soap_lookup_type(soap, soap->id)))\n\t\t*type = soap_lookup_type(soap, soap->href);");
+	fprintf(fout,"\n\tswitch (*type)\n\t{");
+	DBGLOG(fprintf(stderr,"\n Calling in_defs( )."));
+	fflush(fout);
+	in_defs(table);
+	DBGLOG(fprintf(stderr,"\n Completed in_defs( )."));
+        fprintf(fout,"\n\tdefault:\n\t{\tconst char *t = soap->type;\n\t\tif (!*t)\n\t\t\tt = soap->tag;");
+	fflush(fout);
+	in_defs2(table);
+        fprintf(fout,"\n\t}\n\t}\n\tsoap->error = SOAP_TAG_MISMATCH;\n\treturn NULL;\n}\n#endif");
+
+	fprintf(fout,"\n\nSOAP_FMAC3 int SOAP_FMAC4 soap_ignore_element(struct soap *soap)\n{");
+	fprintf(fout,"\n\tif (!soap_peek_element(soap))");
+	fprintf(fout,"\n\t{\tint t;");
+	fprintf(fout,"\n\t\tif (soap->mustUnderstand && !soap->other)");
+	fprintf(fout,"\n\t\t\treturn soap->error = SOAP_MUSTUNDERSTAND;");
+	fprintf(fout,"\n\t\tif (((soap->mode & SOAP_XML_STRICT) && soap->part != SOAP_IN_HEADER) || !soap_match_tag(soap, soap->tag, \"SOAP-ENV:\"))\n\t\t\treturn soap->error = SOAP_TAG_MISMATCH;");
+	fprintf(fout,"\n\t\tif (!*soap->id || !soap_getelement(soap, &t))");
+	fprintf(fout,"\n\t\t{\tsoap->peeked = 0;");
+	fprintf(fout,"\n\t\t\tDBGLOG(TEST, SOAP_MESSAGE(fdebug, \"Unknown element '%%s' (level=%%u, %%d)\\n\", soap->tag, soap->level, soap->body));");
+	fprintf(fout,"\n\t\t\tif (soap->fignore)\n\t\t\t\tsoap->error = soap->fignore(soap, soap->tag);\n\t\t\telse\n\t\t\t\tsoap->error = SOAP_OK;");
+	fprintf(fout,"\n\t\t\tDBGLOG(TEST, if (!soap->error) SOAP_MESSAGE(fdebug, \"IGNORING element '%%s'\\n\", soap->tag));");
+	fprintf(fout,"\n\t\t\tif (!soap->error && soap->body)");
+	fprintf(fout,"\n\t\t\t{\tsoap->level++;");
+	fprintf(fout,"\n\t\t\t\twhile (!soap_ignore_element(soap))");
+	fprintf(fout,"\n\t\t\t\t\t;");
+	fprintf(fout,"\n\t\t\t\tif (soap->error == SOAP_NO_TAG)");
+	fprintf(fout,"\n\t\t\t\t\tsoap->error = soap_element_end_in(soap, NULL);");
+	fprintf(fout,"\n\t\t\t}");
+	fprintf(fout,"\n\t\t}");
+	fprintf(fout,"\n\t}");
+	fprintf(fout,"\n\treturn soap->error;");
+	fprintf(fout,"\n}");
+
+	fprintf(fout,"\n\n#ifndef WITH_NOIDREF");
+	fprintf(fout,"\nSOAP_FMAC3 int SOAP_FMAC4 soap_putindependent(struct soap *soap)\n{\n\tint i;\n\tstruct soap_plist *pp;");
+	fprintf(fout,"\n\tif (soap->version == 1 && soap->encodingStyle && !(soap->mode & (SOAP_XML_TREE | SOAP_XML_GRAPH)))");
+	fprintf(fout,"\n\t\tfor (i = 0; i < SOAP_PTRHASH; i++)");
+	fprintf(fout,"\n\t\t\tfor (pp = soap->pht[i]; pp; pp = pp->next)");
+	fprintf(fout,"\n\t\t\t\tif (pp->mark1 == 2 || pp->mark2 == 2)");
+	fprintf(fout,"\n\t\t\t\t\tif (soap_putelement(soap, pp->ptr, \"id\", pp->id, pp->type))\n\t\t\t\t\t\treturn soap->error;");
+	fprintf(fout,"\n\treturn SOAP_OK;\n}\n#endif");
+
+	fprintf(fout,"\n\n#ifndef WITH_NOIDREF");
+	fprintf(fout,"\nSOAP_FMAC3 int SOAP_FMAC4 soap_putelement(struct soap *soap, const void *ptr, const char *tag, int id, int type)\n{");
+	fprintf(fout,"\n\tswitch (type)\n\t{");
+	fflush(fout);
+        out_defs(table);
+	fprintf(fout,"\n\t}\n\treturn SOAP_OK;\n}\n#endif");
+
+	fprintf(fout,"\n\n#ifndef WITH_NOIDREF");
+	if (is_anytype_flag)
+	{ fprintf(fout,"\nSOAP_FMAC3 void SOAP_FMAC4 soap_markelement(struct soap *soap, const void *ptr, int type)\n{");
+	  fprintf(fout,"\n\t(void)soap; (void)ptr; (void)type; /* appease -Wall -Werror */");
+	  fprintf(fout,"\n\tswitch (type)\n\t{");
+	  fflush(fout);
+          mark_defs(table);
+          fprintf(fout,"\n\t}\n}");
+        }
+	else
+	{ fprintf(fout,"\nSOAP_FMAC3 void SOAP_FMAC4 soap_markelement(struct soap *soap, const void *ptr, int type)\n{");
+	  fprintf(fout,"\n\t(void)soap; (void)ptr; (void)type; /* appease -Wall -Werror */");
+          fprintf(fout,"\n}");
+	}
+	fprintf(fout,"\n#endif");
+
+	}
+	
+	classflag = 0;
+	for (p = classtable->list; p; p = p->next)
+	  if (p->info.typ->type == Tclass && p->info.typ->transient <= 0)
+	  { classflag = 1;
+	    break;
+	  }
+
+	if (classflag || Tptr[Ttemplate])
+	{
+	  if (cflag)
+	    semwarn("Option -c conflicts with the use of classes");
+	}
+
+	if (!cflag)
+	{
+	fprintf(fhead,"\n\nSOAP_FMAC3 void * SOAP_FMAC4 soap_instantiate(struct soap*, int, const char*, const char*, size_t*);");
+	if (!lflag)
+	{
+	fprintf(fout,"\n\nSOAP_FMAC3 void * SOAP_FMAC4 soap_instantiate(struct soap *soap, int t, const char *type, const char *arrayType, size_t *n)\n{\n\tswitch (t)\n\t{");
+	if (classtable)
+	  for (p = classtable->list; p; p = p->next)
+	    if ((p->info.typ->type == Tclass || p->info.typ->type == Tstruct) && !is_transient(p->info.typ) && !is_header_or_fault(p->info.typ))
+	      fprintf(fout,"\n\tcase %s:\n\t\treturn (void*)soap_instantiate_%s(soap, -1, type, arrayType, n);", soap_type(p->info.typ), c_ident(p->info.typ));
+	if (typetable)
+	  for (p = typetable->list; p; p = p->next)
+	    if ((p->info.typ->type == Tclass || p->info.typ->type == Tstruct) && !is_transient(p->info.typ) && !is_header_or_fault(p->info.typ))
+	      fprintf(fout,"\n\tcase %s:\n\t\treturn (void*)soap_instantiate_%s(soap, -1, type, arrayType, n);", soap_type(p->info.typ), c_ident(p->info.typ));
+	for (typ = Tptr[Ttemplate]; typ; typ = typ->next)
+	  if (typ->ref && !is_transient(typ))
+	    fprintf(fout,"\n\tcase %s:\n\t\treturn (void*)soap_instantiate_%s(soap, -1, type, arrayType, n);", soap_type(typ), c_ident(typ));
+
+	fprintf(fout,"\n\t}\n\treturn NULL;\n}");
+	}
+
+	fprintf(fhead,"\nSOAP_FMAC3 void SOAP_FMAC4 soap_fdelete(struct soap_clist*);");
+	if (!lflag)
+	{
+	fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_fdelete(struct soap_clist *p)");
+	fprintf(fout,"\n{\tswitch (p->type)\n\t{");
+	if (classtable)
+	  for (p = classtable->list; p; p = p->next)
+	    if ((p->info.typ->type == Tclass || p->info.typ->type == Tstruct) && !is_transient(p->info.typ))
+	    { fprintf(fout,"\n\tcase %s:", soap_type(p->info.typ));
+	      fprintf(fout,"\n\t\tif (p->size < 0)\n\t\t\tdelete (%s*)p->ptr;\n\t\telse\n\t\t\tdelete[] (%s*)p->ptr;\n\t\tbreak;", c_type(p->info.typ), c_type(p->info.typ));
+	    }
+	if (typetable)
+	  for (p = typetable->list; p; p = p->next)
+	    if (p->info.typ->type == Tclass || p->info.typ->type == Tstruct) /* && is_external(p->info.typ)) */
+	    { fprintf(fout,"\n\tcase %s:", soap_type(p->info.typ));
+	      fprintf(fout,"\n\t\tif (p->size < 0)\n\t\t\tdelete (%s*)p->ptr;\n\t\telse\n\t\t\tdelete[] (%s*)p->ptr;\n\t\tbreak;", c_type(p->info.typ), c_type(p->info.typ));
+	    }
+	for (typ = Tptr[Ttemplate]; typ; typ = typ->next)
+	  if (typ->ref && !is_transient(typ))
+	  { fprintf(fout,"\n\tcase %s:", soap_type(typ));
+	    fprintf(fout,"\n\t\tif (p->size < 0)\n\t\t\tdelete (%s*)p->ptr;\n\t\telse\n\t\t\tdelete[] (%s*)p->ptr;\n\t\tbreak;", c_type(typ), c_type(typ));
+	  }
+	fprintf(fout,"\n\t}");
+	fprintf(fout,"\n}");
+	}
+
+	fprintf(fhead,"\nSOAP_FMAC3 void* SOAP_FMAC4 soap_class_id_enter(struct soap*, const char*, void*, int, size_t, const char*, const char*);");
+	if (!lflag)
+	{
+	fprintf(fout,"\n\nSOAP_FMAC3 void* SOAP_FMAC4 soap_class_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, const char *type, const char *arrayType)");
+	fprintf(fout, "\n{\treturn soap_id_enter(soap, id, p, t, n, 0, type, arrayType, soap_instantiate);\n}");
+	}
+
+	if (Tptr[Ttemplate])
+	{
+	fprintf(fhead, "\n\nSOAP_FMAC3 void* SOAP_FMAC4 soap_container_id_forward(struct soap*, const char*, void*, size_t, int, int, size_t, unsigned int);");
+	if (!lflag)
+	{
+	fprintf(fout, "\n\nSOAP_FMAC3 void* SOAP_FMAC4 soap_container_id_forward(struct soap *soap, const char *href, void *p, size_t len, int st, int tt, size_t n, unsigned int k)");
+	fprintf(fout, "\n{\treturn soap_id_forward(soap, href, p, len, st, tt, n, k, soap_container_insert);\n}");
+	}
+
+	fprintf(fhead, "\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_container_insert(struct soap*, int, int, void*, size_t, const void*, size_t);");
+	if (!lflag)
+	{
+	fprintf(fout, "\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_container_insert(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)");
+	fprintf(fout, "\n{\tswitch (tt)\n\t{");
+	for (typ = Tptr[Ttemplate]; typ; typ = typ->next)
+	{ if (typ->ref && !is_transient(typ))
+	  { fprintf(fout, "\n\tcase %s:", soap_type(typ));
+	    fprintf(fout, "\n\t\tDBGLOG(TEST, SOAP_MESSAGE(fdebug, \"Container insert type=%%d in %%d location=%%p object=%%p len=%%lu\\n\", st, tt, p, q, (unsigned long)len));");
+            if (!strcmp(typ->id->name, "std::vector") || !strcmp(typ->id->name, "std::deque"))
+	      fprintf(fout, "\n\t\t(*(%s)p)[len] = *(%s)q;", c_type_id(typ, "*"), c_type_id(typ->ref, "*"));
+	    else
+	      fprintf(fout, "\n\t\t((%s)p)->insert(((%s)p)->end(), *(%s)q);", c_type_id(typ, "*"), c_type_id(typ, "*"), c_type_id(typ->ref, "*"));
+	    fprintf(fout, "\n\t\tbreak;");
+	  }
+	}
+	fprintf(fout, "\n\tdefault:\n\t\tDBGLOG(TEST, SOAP_MESSAGE(fdebug, \"Could not insert type=%%d in %%d\\n\", st, tt));");
+	fprintf(fout, "\n\t}");
+	fprintf(fout, "\n}");
+	}
+	}
+	}
+
+	DBGLOG(fprintf(stderr,"\n Calling def_table( )."));
+        def_table(table);
+	DBGLOG(fprintf(stderr,"\n Completed def_table( )."));
+	if (mflag)
+ 	{ DBGLOG(fprintf(stderr,"\n Calling matlab_def_table( )."));
+	  matlab_def_table(table);
+ 	  DBGLOG(fprintf(stderr,"\n Completed matlab_def_table( )."));
+ 	  fclose(fmatlab);
+ 	  fclose(fmheader);
+	}
+	if (namespaceid)
+	  fprintf(fout,"\n\n} // namespace %s\n", namespaceid);
+	if (cflag)
+	  fprintf(fout,"\n\n#ifdef __cplusplus\n}\n#endif");
+	fprintf(fout, "\n\n/* End of %s */\n", soapC);
+        fclose(fout);
+	if (namespaceid)
+	  fprintf(fhead,"\n\n} // namespace %s\n", namespaceid);
+	if (cflag)
+	  fprintf(fhead,"\n\n#ifdef __cplusplus\n}\n#endif");
+	fprintf(fhead, "\n\n#endif");
+	fprintf(fhead, "\n\n/* End of %s */\n", soapH);
+	fclose(fhead);
+	if (namespaceid)
+	  fprintf(fheader,"\n\n} // namespace %s\n", namespaceid);
+	if (cflag)
+	  fprintf(fheader,"\n\n#ifdef __cplusplus\n}\n#endif");
+	fprintf(fheader, "\n\n#endif");
+	fprintf(fheader, "\n\n/* End of %s */\n", soapStub);
+	fclose(fheader);
+
+	if (!Sflag && !iflag)
+	{ if (namespaceid)
+	    fprintf(fclient,"\n\n} // namespace %s\n", namespaceid);
+	  if (cflag)
+	    fprintf(fclient,"\n\n#ifdef __cplusplus\n}\n#endif");
+	  fprintf(fclient, "\n\n/* End of %s */\n", soapClient);
+          fclose(fclient);
+        }
+
+	if (!Cflag && !iflag)
+	{ if (namespaceid)
+	    fprintf(fserver,"\n\n} // namespace %s\n", namespaceid);
+	  if (cflag)
+	    fprintf(fserver,"\n\n#ifdef __cplusplus\n}\n#endif");
+	  fprintf(fserver, "\n\n/* End of %s */\n", soapServer);
+ 	  fclose(fserver);
+        }
+}
+
+void
+gen_class(FILE *fd, Tnode *typ)
+{ Entry *Eptr;
+  char *x;
+  x = xsi_type(typ);
+  if (!x || !*x)
+    x = wsdl_type(typ, "");
+  typ->generated = True;
+  if (is_volatile(typ))
+    fprintf(fd, "\n\n#if 0 /* volatile type: do no redeclare */\n");
+  else if (typ->ref)
+  { fprintf(fheader, "\n\n#ifndef %s", soap_type(typ));
+    fprintf(fheader, "\n#define %s (%d)\n",soap_type(typ),typ->num);	
+  }
+  else
+    fprintf(fd, "\n\n");
+  if (is_transient(typ) && typ->ref)
+    fprintf(fd, "/* Transient type: */\n");
+  else if (is_invisible(typ->id->name) && typ->ref)
+    fprintf(fd, "/* Operation wrapper: */\n");
+  else if (is_hexBinary(typ))
+    fprintf(fd, "/* hexBinary schema type: */\n");
+  else if (is_binary(typ))
+    fprintf(fd, "/* Base64 schema type: */\n");
+  else if (is_discriminant(typ))
+    fprintf(fd, "/* Choice: */\n");
+  else if (is_dynamic_array(typ))
+  { Eptr = ((Table*)typ->ref)->list;
+    if (!is_untyped(Eptr->info.typ) && (is_external(Eptr->info.typ->ref) && ((Tnode*)Eptr->info.typ->ref)->type == Tclass || has_external(Eptr->info.typ->ref)))
+    { sprintf(errbuf, "Field '%s' must be a pointer to an array of pointers to %s to prevent id-ref copying of %s instances containting an external object (declared at line %d)", Eptr->sym->name, c_type(Eptr->info.typ->ref), c_type(Eptr->info.typ->ref), Eptr->lineno);
+      semwarn(errbuf);
+    }
+    else if (!is_untyped(Eptr->info.typ) && (is_volatile(Eptr->info.typ->ref) && ((Tnode*)Eptr->info.typ->ref)->type == Tclass || has_volatile(Eptr->info.typ->ref)))
+    { sprintf(errbuf, "Field '%s' must be a pointer to an array of pointers to %s to prevent id-ref copying of %s instances containting a volatile object (declared at line %d)", Eptr->sym->name, c_type(Eptr->info.typ->ref), c_type(Eptr->info.typ->ref), Eptr->lineno);
+      semwarn(errbuf);
+    }
+    if (has_ns(typ) || is_untyped(typ))
+      fprintf(fd, "/* Sequence of %s schema type: */\n", x);
+    else
+    { if (!eflag)
+      { sprintf(errbuf, "array '%s' is not compliant with WS-I Basic Profile 1.0a, reason: SOAP encoded array", c_type(typ));
+        compliancewarn(errbuf);
+      }
+      fprintf(fd, "/* SOAP encoded array of %s schema type: */\n", x);
+    }
+  }
+  else if (is_primclass(typ))
+    fprintf(fd, "/* Primitive %s schema type: */\n", x);
+  else if (!strcmp(typ->id->name, "SOAP_ENV__Header"))
+    fprintf(fd, "/* SOAP Header: */\n");
+  else if (!strcmp(typ->id->name, "SOAP_ENV__Fault"))
+    fprintf(fd, "/* SOAP Fault: */\n");
+  else if (!strcmp(typ->id->name, "SOAP_ENV__Code"))
+    fprintf(fd, "/* SOAP Fault Code: */\n");
+  else if (x && *x && typ->ref)
+    fprintf(fd, "/* %s */\n", x);
+  fflush(fd);
+  if (typ->type == Tstruct)
+  {   DBGLOG(fprintf(stderr,"\nstruct %s\n", typ->id->name));
+      if (typ->ref)
+      { int permission = -1;
+        fprintf(fd, "struct %s\n{", typ->id->name );
+        for (Eptr = ((Table*)typ->ref)->list; Eptr; Eptr = Eptr->next)
+        { if (!cflag && permission != (Eptr->info.sto & (Sprivate | Sprotected)))
+          { if (Eptr->info.sto & Sprivate)
+              fprintf(fd, "\nprivate:");
+            else if (Eptr->info.sto & Sprotected)
+              fprintf(fd, "\nprotected:");
+            else
+              fprintf(fd, "\npublic:");
+	    permission = (Eptr->info.sto & (Sprivate | Sprotected));
+	  }
+	  if (cflag && Eptr->info.typ->type == Tfun)
+	    continue;
+	  if (cflag && (Eptr->info.sto & Stypedef))
+	    continue;
+	  fprintf(fd, "\n\t%s", c_storage(Eptr->info.sto));
+	  /*if (Eptr->info.typ->type == Tclass && !is_external(Eptr->info.typ) && Eptr->info.typ->generated == False || (Eptr->info.typ->type == Tpointer || Eptr->info.typ->type == Treference) && Eptr->info.typ->ref && ((Tnode*)Eptr->info.typ->ref)->type == Tclass && !is_external(Eptr->info.typ->ref) && ((Tnode*)Eptr->info.typ->ref)->generated == False)
+	    fprintf(fd, "class ");
+	  */
+	  if (Eptr->sym == typ->id) /* a hack to emit constructor in a struct */
+            ((FNinfo*)Eptr->info.typ->ref)->ret = mknone();
+          fprintf(fd, "%s", c_type_id(Eptr->info.typ,Eptr->sym->name));
+	  if (Eptr->info.sto & Sconstobj)
+	    fprintf(fd, " const;");
+	  else
+	    fprintf(fd, ";");
+	  if (Eptr->info.sto & Sreturn)
+	    fprintf(fd, "\t/* RPC return element */");
+	  if (is_external(Eptr->info.typ))
+	    fprintf(fd, "\t/* external */");
+	  if (is_transient(Eptr->info.typ))
+	    fprintf(fd, "\t/* transient */");
+	  if (Eptr->info.sto & Sattribute)
+	    if (Eptr->info.minOccurs >= 1)
+	      fprintf(fd, "\t/* required attribute of type %s */", wsdl_type(Eptr->info.typ, ""));
+            else
+	      fprintf(fd, "\t/* optional attribute of type %s */", wsdl_type(Eptr->info.typ, ""));
+	  if (Eptr->info.sto & (Sconst | Sprivate | Sprotected))
+	    fprintf(fd, "\t/* not serialized */");
+	  else if (Eptr->info.sto & SmustUnderstand)
+	    fprintf(fd, "\t/* mustUnderstand */");
+	  else if (!is_dynamic_array(typ) && is_repetition(Eptr))
+          { if (!is_untyped(Eptr->next->info.typ) && has_ns(Eptr->next->info.typ->ref) && (is_external(Eptr->next->info.typ->ref) && ((Tnode*)Eptr->next->info.typ->ref)->type == Tclass || has_external(Eptr->next->info.typ->ref)))
+            { sprintf(errbuf, "Field '%s' must be a pointer to an array of pointers to %s to prevent id-ref copying of %s instances containing an external object (declared at line %d)", Eptr->next->sym->name, c_type(Eptr->next->info.typ->ref), c_type(Eptr->next->info.typ->ref), Eptr->next->lineno);
+	      semwarn(errbuf);
+	    }
+            else if (!is_untyped(Eptr->next->info.typ) && has_ns(Eptr->next->info.typ->ref) && (is_volatile(Eptr->next->info.typ->ref) && ((Tnode*)Eptr->next->info.typ->ref)->type == Tclass || has_volatile(Eptr->next->info.typ->ref)))
+            { sprintf(errbuf, "Field '%s' must be a pointer to an array of pointers to %s to prevent id-ref copying of %s instances containing a volatile object (declared at line %d)", Eptr->next->sym->name, c_type(Eptr->next->info.typ->ref), c_type(Eptr->next->info.typ->ref), Eptr->next->lineno);
+	      semwarn(errbuf);
+	    }
+	    if (Eptr->info.maxOccurs > 1)
+	      fprintf(fd, "\t/* sequence of %ld to %ld elements <%s> */", Eptr->info.minOccurs, Eptr->info.maxOccurs, ns_convert(Eptr->next->sym->name));
+	    else
+	      fprintf(fd, "\t/* sequence of elements <%s> */", ns_convert(Eptr->next->sym->name));
+	  }
+	  else if (is_anytype(Eptr))
+	    fprintf(fd, "\t/* any type of element <%s> (defined below) */", ns_convert(Eptr->next->sym->name));
+	  else if (is_choice(Eptr))
+	    fprintf(fd, "\t/* union discriminant (of union defined below) */");
+	  else if (Eptr->info.typ->type != Tfun && !(Eptr->info.sto & (Sconst | Sprivate | Sprotected)) && !(Eptr->info.sto & Sattribute) && !is_transient(Eptr->info.typ) && !is_external(Eptr->info.typ) && strncmp(Eptr->sym->name, "__", 2))
+	  { if (Eptr->info.maxOccurs > 1)
+	      fprintf(fd, "\t/* sequence of %ld to %ld elements of type %s */", Eptr->info.minOccurs, Eptr->info.maxOccurs, wsdl_type(Eptr->info.typ, ""));
+	    else if (Eptr->info.minOccurs >= 1)
+	      fprintf(fd, "\t/* required element of type %s */", wsdl_type(Eptr->info.typ, ""));
+            else
+	      fprintf(fd, "\t/* optional element of type %s */", wsdl_type(Eptr->info.typ, ""));
+	  }
+	  if (!is_dynamic_array(typ) && !is_primclass(typ))
+	  { if (!strncmp(Eptr->sym->name, "__size", 6))
+	    { if (!Eptr->next || Eptr->next->info.typ->type != Tpointer)
+              { sprintf(errbuf, "Field '%s' is not followed by a pointer field in struct '%s'", Eptr->sym->name, typ->id->name);
+                semwarn(errbuf);
+	      }
+	    }
+	    else if (!strncmp(Eptr->sym->name, "__type", 6))
+	    { if (!Eptr->next || ((Eptr->next->info.typ->type != Tpointer || ((Tnode*)Eptr->next->info.typ->ref)->type != Tvoid)))
+              { sprintf(errbuf, "Field '%s' is not followed by a void pointer or union field in struct '%s'", Eptr->sym->name, typ->id->name);
+                semwarn(errbuf);
+	      }
+	    }
+	  }
+	}
+        fprintf(fd, "\n};");
+      }
+      else if (!is_transient(typ) && !is_external(typ) && !is_volatile(typ))
+      { sprintf(errbuf, "struct '%s' is empty", typ->id->name);
+        semwarn(errbuf);
+      }
+  }
+  else if (typ->type == Tclass)
+  { DBGLOG(fprintf(stderr,"\nclass %s\n", typ->id->name));
+    if (typ->ref)
+    { int permission = -1;
+      fprintf(fd,"class SOAP_CMAC %s", typ->id->name );
+      if (typ->base)
+        fprintf(fd," : public %s", typ->base->name);
+      fprintf(fd,"\n{");
+      for (Eptr = ((Table*)typ->ref)->list; Eptr; Eptr = Eptr->next)
+      { if (permission != (Eptr->info.sto & (Sprivate | Sprotected)))
+        { if (Eptr->info.sto & Sprivate)
+            fprintf(fd, "\nprivate:");
+          else if (Eptr->info.sto & Sprotected)
+            fprintf(fd, "\nprotected:");
+          else
+            fprintf(fd, "\npublic:");
+	  permission = (Eptr->info.sto & (Sprivate | Sprotected));
+	}
+        fprintf(fd,"\n\t%s", c_storage(Eptr->info.sto));
+	/* if (Eptr->info.typ->type == Tclass && !is_external(Eptr->info.typ) && Eptr->info.typ->generated == False || (Eptr->info.typ->type == Tpointer || Eptr->info.typ->type == Treference) && Eptr->info.typ->ref && ((Tnode*)Eptr->info.typ->ref)->type == Tclass && !is_external(Eptr->info.typ->ref) && ((Tnode*)Eptr->info.typ->ref)->generated == False)
+	  fprintf(fd, "class ");
+	*/
+	fprintf(fd,"%s", c_type_id(Eptr->info.typ,Eptr->sym->name));
+	if (Eptr->info.sto & Sconstobj)
+	  fprintf(fd, " const");
+	if (Eptr->info.sto & Sabstract)
+	  fprintf(fd, " = 0;");
+	else
+	  fprintf(fd, ";");
+	if (Eptr->info.sto & Sreturn)
+	   fprintf(fd, "\t/* RPC return element */");
+	 if (is_external(Eptr->info.typ))
+	   fprintf(fd, "\t/* external */");
+	 if (is_transient(Eptr->info.typ))
+	   fprintf(fd, "\t/* transient */");
+	 if (Eptr->info.sto & Sattribute)
+	   if (Eptr->info.minOccurs >= 1)
+	     fprintf(fd, "\t/* required attribute */");
+           else
+	     fprintf(fd, "\t/* optional attribute */");
+	 if (Eptr->info.sto & (Sconst | Sprivate | Sprotected))
+	   fprintf(fd, "\t/* not serialized */");
+	 else if (Eptr->info.sto & SmustUnderstand)
+	   fprintf(fd, "\t/* mustUnderstand */");
+	 else if (!is_dynamic_array(typ) && is_repetition(Eptr))
+         { if (!is_untyped(Eptr->next->info.typ) && has_ns(Eptr->next->info.typ->ref) && (is_external(Eptr->next->info.typ->ref) && ((Tnode*)Eptr->next->info.typ->ref)->type == Tclass || has_external(Eptr->next->info.typ->ref)))
+           { sprintf(errbuf, "Field '%s' must be a pointer to an array of pointers to %s to prevent id-ref copying of %s instances containing an external object (declared at line %d)", Eptr->next->sym->name, c_type(Eptr->next->info.typ->ref), c_type(Eptr->next->info.typ->ref), Eptr->next->lineno);
+	     semwarn(errbuf);
+	   }
+           else if (!is_untyped(Eptr->next->info.typ) && has_ns(Eptr->next->info.typ->ref) && (is_volatile(Eptr->next->info.typ->ref) && ((Tnode*)Eptr->next->info.typ->ref)->type == Tclass || has_volatile(Eptr->next->info.typ->ref)))
+           { sprintf(errbuf, "Field '%s' must be a pointer to an array of pointers to %s to prevent id-ref copying of %s instances containing a volatile object (declared at line %d)", Eptr->next->sym->name, c_type(Eptr->next->info.typ->ref), c_type(Eptr->next->info.typ->ref), Eptr->next->lineno);
+	     semwarn(errbuf);
+	   }
+	   if (Eptr->info.maxOccurs > 1)
+	     fprintf(fd, "\t/* sequence of %ld to %ld elements <%s> */", Eptr->info.minOccurs, Eptr->info.maxOccurs, ns_convert(Eptr->next->sym->name));
+	   else
+	     fprintf(fd, "\t/* sequence of elements <%s> */", ns_convert(Eptr->next->sym->name));
+	 }
+	 else if (is_anytype(Eptr))
+	   fprintf(fd, "\t/* any type of element <%s> (defined below) */", ns_convert(Eptr->next->sym->name));
+	 else if (is_choice(Eptr))
+	   fprintf(fd, "\t/* union discriminant (of union defined below) */");
+	 else if (Eptr->info.typ->type != Tfun && !(Eptr->info.sto & (Sconst | Sprivate | Sprotected)) && !(Eptr->info.sto & Sattribute) && !is_transient(Eptr->info.typ) && !is_external(Eptr->info.typ) && strncmp(Eptr->sym->name, "__", 2))
+	 { if (Eptr->info.maxOccurs > 1)
+	     fprintf(fd, "\t/* sequence of %ld to %ld elements */", Eptr->info.minOccurs, Eptr->info.maxOccurs);
+	   else if (Eptr->info.minOccurs >= 1)
+	     fprintf(fd, "\t/* required element of type %s */", wsdl_type(Eptr->info.typ, ""));
+           else
+	     fprintf(fd, "\t/* optional element of type %s */", wsdl_type(Eptr->info.typ, ""));
+	 }
+	 if (!is_dynamic_array(typ) && !is_primclass(typ))
+	 { if (!strncmp(Eptr->sym->name, "__size", 6))
+	   { if (!Eptr->next || Eptr->next->info.typ->type != Tpointer)
+             { sprintf(errbuf, "Field '%s' is not followed by a pointer field in struct '%s'", Eptr->sym->name, typ->id->name);
+               semwarn(errbuf);
+	     }
+	   }
+	   else if (!strncmp(Eptr->sym->name, "__type", 6))
+	   { if (!Eptr->next || ((Eptr->next->info.typ->type != Tpointer || ((Tnode*)Eptr->next->info.typ->ref)->type != Tvoid)))
+             { sprintf(errbuf, "Field '%s' is not followed by a void pointer or union field in struct '%s'", Eptr->sym->name, typ->id->name);
+               semwarn(errbuf);
+	     }
+	   }
+	 }
+      }
+      if (!is_transient(typ) && !is_volatile(typ))
+      { fprintf(fd,"\npublic:\n\tvirtual int soap_type() const { return %d; } /* = unique id %s */", typ->num, soap_type(typ));
+        fprintf(fd,"\n\tvirtual void soap_default(struct soap*);");
+        fprintf(fd,"\n\tvirtual void soap_serialize(struct soap*) const;");
+        fprintf(fd,"\n\tvirtual int soap_put(struct soap*, const char*, const char*) const;");
+        fprintf(fd,"\n\tvirtual int soap_out(struct soap*, const char*, int, const char*) const;");
+        fprintf(fd,"\n\tvirtual void *soap_get(struct soap*, const char*, const char*);");
+        fprintf(fd,"\n\tvirtual void *soap_in(struct soap*, const char*, const char*);");
+	if (!has_constructor(typ))
+	{ Table *t;
+	  Entry *p;
+	  int c = ':';
+	  fprintf(fd,"\n\t         %s() ", typ->id->name);
+          t = (Table*)typ->ref;
+	  if (t)
+          { for (p = t->list; p; p = p->next)
+	    { if (!(p->info.sto & Sconst) && p->info.typ->type == Tpointer)
+	      { fprintf(fd, "%c %s(NULL)", c, p->sym->name);
+	        c = ',';
+	      }
+	    }
+	  }
+	  fprintf(fd," { }");
+	}
+    if (!has_destructor(typ)) {
+      Table *t;
+	  Entry *p;
+	  fprintf(fd,"\n\tvirtual ~%s() { ", typ->id->name);
+      t = (Table*)typ->ref;
+	  if (t)
+          { for (p = t->list; p; p = p->next)
+	    { if (!(p->info.sto & Sconst) && p->info.typ->type == Tpointer)
+	      { fprintf(fd, "if(%s) delete %s;", p->sym->name, p->sym->name);
+	      }
+	    }
+	  }
+	  fprintf(fd," }");
+    }
+
+	/* the use of 'friend' causes problems linking static functions. Adding these friends could enable serializing protected/private members (which is not implemented)
+        fprintf(fd,"\n\tfriend %s *soap_instantiate_%s(struct soap*, int, const char*, const char*, size_t*);", typ->id->name, typ->id->name);
+        fprintf(fd,"\n\tfriend %s *soap_in_%s(struct soap*, const char*, %s*, const char*);", typ->id->name, typ->id->name, typ->id->name);
+        fprintf(fd,"\n\tfriend int soap_out_%s(struct soap*, const char*, int, const %s*, const char*);", typ->id->name, typ->id->name);
+        */
+      }
+    fprintf(fd,"\n};");
+    }
+    else if (!is_transient(typ) && !is_external(typ) && !is_volatile(typ))
+    { sprintf(errbuf, "class '%s' is empty", typ->id->name);
+      semwarn(errbuf);
+    }
+  }
+  else if (typ->type == Tunion)
+  { int i = 1;
+      if (typ->ref)
+      { fprintf(fd, "union %s\n{", typ->id->name);
+        for (Eptr = ((Table*)typ->ref)->list; Eptr; Eptr = Eptr->next)
+	{ fprintf(fd, "\n#define SOAP_UNION_%s_%s\t(%d)", c_ident(typ), Eptr->sym->name, i);
+	  i++;
+	  fprintf(fd, "\n\t%s", c_storage(Eptr->info.sto));
+          fprintf(fd, "%s;", c_type_id(Eptr->info.typ,Eptr->sym->name));
+	  if (Eptr->info.sto & (Sconst | Sprivate | Sprotected))
+	    fprintf(fd, "\t/* const field cannot be deserialized */");
+	  if (is_external(Eptr->info.typ))
+	    fprintf(fd, "\t/* external */");
+	  if (is_transient(Eptr->info.typ))
+	    fprintf(fd, "\t/* transient */");
+	  if (Eptr->info.sto & Sattribute)
+	  { fprintf(fd, "\t/* attribute not allowed in union */");
+            sprintf(errbuf, "union '%s' contains attribute declarations", typ->id->name);
+            semwarn(errbuf);
+	  }
+	  if (Eptr->info.sto & SmustUnderstand)
+	    fprintf(fd, "\t/* mustUnderstand */");
+	}
+        fprintf(fd, "\n};");
+      }
+      else if (!is_transient(typ) && !is_external(typ) && !is_volatile(typ))
+      { sprintf(errbuf, "union '%s' is empty", typ->id->name);
+        semwarn(errbuf);
+      }
+  }
+  if (is_volatile(typ))
+    fprintf(fd, "\n#endif");
+  else if (typ->ref)
+    fprintf(fd, "\n#endif");
+  fflush(fd);
+}
+
+void
+generate_header(Table *t)
+{ Entry *p, *q;
+  banner(fheader, "Enumerations");
+  fflush(fheader);
+  if (enumtable)
+    for (p = enumtable->list; p; p = p->next)
+    { char *x;
+      x = xsi_type(p->info.typ);
+      if (!x || !*x)
+        x = wsdl_type(p->info.typ, "");
+      if (is_imported(p->info.typ))
+        continue;
+      fprintf(fheader, "\n\n#ifndef %s", soap_type(p->info.typ));
+      fprintf(fheader, "\n#define %s (%d)",soap_type(p->info.typ),p->info.typ->num);	
+      if (is_mask(p->info.typ))
+        fprintf(fheader, "\n/* Bitmask %s */", x);
+      else
+        fprintf(fheader, "\n/* %s */", x);
+      fprintf(fheader, "\nenum %s {", p->info.typ->id->name);
+      if ((Table*)p->info.typ->ref)
+      { q = ((Table*)p->info.typ->ref)->list;
+        if (q)
+        { fprintf(fheader, "%s = "SOAP_LONG_FORMAT, q->sym->name, q->info.val.i);
+          for (q = q->next; q; q = q->next)
+            fprintf(fheader, ", %s = "SOAP_LONG_FORMAT, q->sym->name, q->info.val.i);
+        }
+      }
+      fprintf(fheader, "};\n#endif");
+    }
+  banner(fheader, "Classes and Structs");
+  fflush(fheader);
+  /* Obsolete: moved unions in classtable
+  if (uniontable)
+    for (p = uniontable->list; p; p = p->next)
+      if (!is_imported(p->info.typ))
+        gen_union(fheader, p->info.typ);
+  */
+  if (classtable)
+    for (p = classtable->list; p; p = p->next)
+      if (!is_imported(p->info.typ))
+        gen_class(fheader, p->info.typ);
+  banner(fheader, "Types with Custom Serializers");
+  fflush(fheader);
+  if (typetable)
+    for (p = typetable->list; p; p = p->next)
+    { if (is_external(p->info.typ) && !is_volatile(p->info.typ) && !is_imported(p->info.typ))
+      { fprintf(fheader, "\n#ifndef %s", soap_type(p->info.typ));
+	fprintf(fheader, "\n#define %s (%d)",soap_type(p->info.typ),p->info.typ->num);	
+        fprintf(fheader, "\n%s%s;", c_storage(p->info.sto), c_type_id(p->info.typ, p->sym->name));
+        fprintf(fheader, "\n#endif");
+      }
+    }
+  banner(fheader, "Typedefs");
+  fflush(fheader);
+  if (typetable)
+    for (p = typetable->list; p; p = p->next)
+    { if (!is_primitive_or_string(p->info.typ) && !is_external(p->info.typ) && !is_XML(p->info.typ) && !is_transient(p->info.typ) && !has_ns_t(p->info.typ) && !is_imported(p->info.typ) && !is_template(p->info.typ))
+      { sprintf(errbuf, "typedef '%s' is not namespace qualified: schema definition for '%s' in WSDL file output may be invalid", p->sym->name, p->sym->name);
+        semwarn(errbuf);
+      }
+      if (!is_external(p->info.typ) && !is_imported(p->info.typ))
+      { fprintf(fheader, "\n#ifndef %s", soap_type(p->info.typ));
+	fprintf(fheader, "\n#define %s (%d)",soap_type(p->info.typ),p->info.typ->num);	
+        fprintf(fheader,"\n%s%s;", c_storage(p->info.sto), c_type_id(p->info.typ, p->sym->name));
+        fprintf(fheader, "\n#endif\n");
+      }
+    }
+  banner(fheader, "Typedef Synonyms");
+  if (enumtable)
+    for (p = enumtable->list; p; p = p->next)
+      if (p->sym->token == TYPE)
+        fprintf(fheader, "\ntypedef %s %s;", c_type(p->info.typ), p->sym->name);
+  if (classtable)
+    for (p = classtable->list; p; p = p->next)
+      if ((p->info.typ->type == Tstruct || p->info.typ->type == Tunion) && p->sym->token == TYPE)
+        fprintf(fheader, "\ntypedef %s %s;", c_type(p->info.typ), p->sym->name);
+  banner(fheader, "Externals");
+  fflush(fheader);
+  if (t)
+    for (p = t->list; p; p = p->next)
+      if (p->info.typ->type != Tfun || p->info.sto & Sextern)
+      { fprintf(fheader,"\n\nextern %s", c_storage(p->info.sto));
+        fprintf(fheader,"%s;", c_type_id(p->info.typ, p->sym->name));
+      }
+  fflush(fheader);
+}
+
+void
+get_namespace_prefixes()
+{ Symbol *p, *q;
+  int i, n;
+  char *s, buf[256];
+  if (nslist)
+    return;
+  for (p = symlist; p; p = p->next)
+  { if (*p->name != '~')
+    { s = p->name;
+      while (*s == '_')
+	s++;
+      n = strlen(s) - 2;
+      for (i = 1; i < n; i++)
+      { if (s[i] == '_' && s[i+1] == '_' && s[i+2] && s[i+2] != '_')
+        { strncpy(buf, s, i);
+          buf[i] = '\0';
+	  if (!strcmp(buf, "SOAP_ENV") || !strcmp(buf, "SOAP_ENC") || !strcmp(buf, "xsd") || !strcmp(buf, "xsi") || !strcmp(buf, "xml") || !strncmp(buf, "soap_", 5))
+	    goto nsnext;
+          for (q = nslist; q; q = q->next)
+            if (!strcmp(q->name, buf))
+              goto nsnext;
+          q = (Symbol*)emalloc(sizeof(Symbol));
+          q->name = (char*)emalloc(i+1);
+	  strcpy(q->name, buf);
+	  q->name[i] = '\0';
+	  q->next = nslist;
+	  nslist = q;
+        }
+      }
+    }
+nsnext:
+    ;
+  }
+  q = (Symbol*)emalloc(sizeof(Symbol));
+  q->name = "xsd";
+  q->next = nslist;
+  nslist = q;
+  q = (Symbol*)emalloc(sizeof(Symbol));
+  q->name = "xsi";
+  q->next = nslist;
+  nslist = q;
+  q = (Symbol*)emalloc(sizeof(Symbol));
+  q->name = "SOAP-ENC";
+  q->next = nslist;
+  nslist = q;
+  q = (Symbol*)emalloc(sizeof(Symbol));
+  q->name = "SOAP-ENV";
+  q->next = nslist;
+  nslist = q;
+}
+
+void
+generate_schema(Table *t)
+{ Entry *p;
+  Symbol *ns, *ns1;
+  char *name = NULL;
+  char *URL = NULL;
+  char *executable = NULL;
+  char *URI = NULL;
+  char *style = NULL;
+  char *encoding = NULL;
+  char *import = NULL;
+  Service *sp;
+  char buf[1024];
+  FILE *fd;
+  get_namespace_prefixes();
+  for (ns = nslist; ns; ns = ns->next)
+  { if (!strcmp(ns->name, "SOAP-ENV") || !strcmp(ns->name, "SOAP-ENC") || !strcmp(ns->name, "xsi") || !strcmp(ns->name, "xsd"))
+      continue;
+    name = NULL;
+    URL = NULL;
+    executable = NULL;
+    URI = NULL;
+    style = NULL;
+    encoding = NULL;
+    import = NULL;
+    for (sp = services; sp; sp = sp->next)
+    { if (!strcmp(sp->ns, ns->name))
+	{	name = ns_cname(sp->name, NULL);
+		URL = sp->URL;
+		executable = sp->executable;
+		URI = sp->URI;
+		style = sp->style;
+		encoding = sp->encoding;
+		import = sp->import;
+		break;
+  	}
+    }
+    if (!URI)
+      URI = tmpURI;
+    if (is_document(style) && encoding && !*encoding)
+    {	semwarn("Cannot use document style with SOAP encoding");
+    	encoding = NULL;
+    }
+    if (!name)
+  	name = "Service";
+    if (!URL)
+  	URL = "http://localhost:80";
+    if (t)
+      for (p = t->list; p; p = p->next)
+      { if (p->info.typ->type == Tfun && !(p->info.sto & Sextern) && has_ns_eq(ns->name, p->sym->name))
+	{ if (name)
+	    fprintf(fmsg, "Using %s service name: %s\n", ns->name, name);
+	  if (style)
+	    fprintf(fmsg, "Using %s service style: %s\n", ns->name, style);
+	  else if (!eflag)
+	    fprintf(fmsg, "Using %s service style: document\n", ns->name);
+	  if (encoding && *encoding)
+	    fprintf(fmsg, "Using %s service encoding: %s\n", ns->name, encoding);
+	  else if (encoding && !*encoding)
+	    fprintf(fmsg, "Using %s service encoding: encoded\n", ns->name);
+	  else if (!eflag)
+	    fprintf(fmsg, "Using %s service encoding: literal\n", ns->name);
+	  if (URL)
+	    fprintf(fmsg, "Using %s service location: %s\n", ns->name, URL);
+	  if (executable)
+	    fprintf(fmsg, "Using %s service executable: %s\n", ns->name, executable);
+	  if (import)
+	    fprintf(fmsg, "Using %s schema import: %s\n", ns->name, import);
+	  else if (URI)
+	    fprintf(fmsg, "Using %s schema namespace: %s\n", ns->name, URI);
+          if (sp && sp->name)
+	    sprintf(buf, "%s%s.wsdl", dirpath, ns_cname(name, NULL));
+	  else
+	    sprintf(buf, "%s%s.wsdl", dirpath, ns_cname(ns->name, NULL));
+	  if (!wflag)
+	  { fprintf(fmsg, "Saving %s Web Service description\n", buf);
+            fd = fopen(buf, "w");
+	    if (!fd)
+	      execerror("Cannot write WSDL file");
+            gen_wsdl(fd, t, ns->name, name, URL, executable, URI, style, encoding);
+            fclose(fd);
+	  }
+	  if (!cflag)
+	  { if (iflag)
+            { if (!Sflag && sp && sp->name)
+              { char *name1 = ns_cname(sp->name, "Proxy");
+	        sprintf(buf, "%s%s%s.h", dirpath, prefix, name1);
+	        fprintf(fmsg, "Saving %s client proxy class\n", buf);
+                fd = fopen(buf, "w");
+	        if (!fd)
+	          execerror("Cannot write proxy class file");
+	        sprintf(buf, "%s%s.h", prefix, name1);
+	        copyrightnote(fd, buf);
+                gen_proxy_header(fd, t, ns, name1, URL, executable, URI, encoding);
+                fclose(fd);
+	        sprintf(buf, "%s%s%s.cpp", dirpath, prefix, name1);
+	        fprintf(fmsg, "Saving %s client proxy class\n", buf);
+                fd = fopen(buf, "w");
+	        if (!fd)
+	          execerror("Cannot write proxy class file");
+	        sprintf(buf, "%s%s.cpp", prefix, name1);
+	        copyrightnote(fd, buf);
+                gen_proxy_code(fd, t, ns, name1, URL, executable, URI, encoding);
+                fclose(fd);
+	      }
+              if (!Cflag && sp && sp->name)
+              { char *name1 = ns_cname(sp->name, "Service");
+	        sprintf(buf, "%s%s%s.h", dirpath, prefix, name1);
+	        fprintf(fmsg, "Saving %s service class\n", buf);
+                fd = fopen(buf, "w");
+	        if (!fd)
+	          execerror("Cannot write service class file");
+	        sprintf(buf, "%s%s.h", prefix, name1);
+	        copyrightnote(fd, buf);
+                gen_object_header(fd, t, ns, name1, URL, executable, URI, encoding);
+                fclose(fd);
+	        sprintf(buf, "%s%s%s.cpp", dirpath, prefix, name1);
+	        fprintf(fmsg, "Saving %s service class\n", buf);
+                fd = fopen(buf, "w");
+	        if (!fd)
+	          execerror("Cannot write service class file");
+	        sprintf(buf, "%s%s.cpp", prefix, name1);
+	        copyrightnote(fd, buf);
+                gen_object_code(fd, t, ns, name1, URL, executable, URI, encoding);
+                fclose(fd);
+	      }
+	    }
+	    else
+	    { if (!Sflag && sp && sp->name)
+	      { sprintf(buf, "%s%s%s.h", dirpath, prefix, ns_cname(name, "Proxy"));
+	        fprintf(fmsg, "Saving %s client proxy\n", buf);
+                fd = fopen(buf, "w");
+	        if (!fd)
+	          execerror("Cannot write proxy file");
+	        sprintf(buf, "%s%s.h", prefix, ns_cname(name, "Proxy"));
+	        copyrightnote(fd, buf);
+                gen_proxy(fd, t, ns, name, URL, executable, URI, encoding);
+                fclose(fd);
+	      }
+	      else if (!Sflag)
+	      { sprintf(buf, "%s%s.h", dirpath, ns_cname(prefix, "Proxy"));
+	        fprintf(fmsg, "Saving %s client proxy\n", buf);
+                fd = fopen(buf, "w");
+	        if (!fd)
+	          execerror("Cannot write proxy file");
+	        sprintf(buf, "%s.h", ns_cname(prefix, "Proxy"));
+	        copyrightnote(fd, buf);
+                gen_proxy(fd, t, ns, "Service", URL, executable, URI, encoding);
+                fclose(fd);
+	      }
+              if (!Cflag && sp && sp->name)
+	      { sprintf(buf, "%s%s%s.h", dirpath, prefix, ns_cname(name, "Object"));
+	        fprintf(fmsg, "Saving %s server object\n", buf);
+                fd = fopen(buf, "w");
+	        if (!fd)
+	          execerror("Cannot write server object file");
+	        sprintf(buf, "%s%s.h", prefix, ns_cname(name, "Object"));
+	        copyrightnote(fd, buf);
+                gen_object(fd, t, ns, name, URL, executable, URI, encoding);
+                fclose(fd);
+	      }
+	      else if (!Cflag)
+	      { sprintf(buf, "%s%s.h", dirpath, ns_cname(prefix, "Object"));
+	        fprintf(fmsg, "Saving %s server object\n", buf);
+                fd = fopen(buf, "w");
+	        if (!fd)
+	          execerror("Cannot write server object file");
+	        sprintf(buf, "%s.h", ns_cname(prefix, "Object"));
+	        copyrightnote(fd, buf);
+                gen_object(fd, t, ns, "Service", URL, executable, URI, encoding);
+                fclose(fd);
+	      }
+	    }
+	  }
+	  if (!xflag)
+	  { strcpy(buf, dirpath);
+            if (sp && sp->name)
+	      strcat(buf, ns_cname(name, NULL));
+	    else
+	      strcat(buf, ns_cname(ns->name, NULL));
+	    strcat(buf, ".");
+            gen_data(buf, t, ns->name, name, URL, executable, URI, encoding);
+	  }
+	  if (nflag)
+	    sprintf(buf, "%s%s.nsmap", dirpath, prefix, ns_cname(ns->name, NULL));
+          else if (sp && sp->name)
+	    sprintf(buf, "%s%s.nsmap", dirpath, ns_cname(name, NULL));
+          else
+	    sprintf(buf, "%s%s.nsmap", dirpath, ns_cname(ns->name, NULL));
+	  fprintf(fmsg, "Saving %s namespace mapping table\n", buf);
+          fd = fopen(buf, "w");
+	  if (!fd)
+	    execerror("Cannot write nsmap file");
+	  fprintf(fd, "\n#include \"%sH.h\"", prefix);
+ 	  if (nflag)
+	    fprintf(fd, "\nSOAP_NMAC struct Namespace %s_namespaces[] =\n", prefix);
+ 	  else
+ 	    fprintf(fd, "\nSOAP_NMAC struct Namespace namespaces[] =\n"); 
+	  gen_nsmap(fd, ns, URI);
+          fclose(fd);
+	  break;
+        }
+      }
+    if (!wflag && !import)
+    { sprintf(buf, "%s%s.xsd", dirpath, ns_convert(ns->name));
+      fprintf(fmsg, "Saving %s XML schema\n", buf);
+      fd = fopen(buf, "w");
+      if (!fd)
+        execerror("Cannot write schema file");
+      fprintf(fd, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+      if (t)
+        for (p = t->list; p; p = p->next)
+          if (p->info.typ->type == Tfun && !(p->info.sto & Sextern) && has_ns_eq(ns->name, p->sym->name))
+          { gen_schema(fd, t, ns->name, ns->name, 0, 1, URL, URI, style, encoding);
+	    break;
+          }
+      if (!t || !p)
+        gen_schema(fd, t, ns->name, ns->name, 0, 0, URL, URI, style, encoding);
+      fclose(fd);
+    }
+  }
+}
+
+int
+chkhdr(char *part)
+{ Entry *p;
+  p = entry(classtable, lookup("SOAP_ENV__Header"));
+  for (p = ((Table*)p->info.typ->ref)->list; p; p = p->next)
+    if (has_ns_eq(NULL, p->sym->name) && (!strcmp(part, p->sym->name) || is_eq_nons(part, p->sym->name)))
+      return 1;
+  sprintf(errbuf, "Cannot define method-header-part in WSDL: SOAP_ENV__Header \"%s\" field is not qualified", part);
+  semwarn(errbuf);
+  return 0;
+}      
+
+void
+gen_wsdl(FILE *fd, Table *t, char *ns, char *name, char *URL, char *executable, char *URI, char *style, char *encoding)
+{ Entry *p, *q, *r;
+  Symbol *s;
+  Service *sp, *sp2;
+  Method *m;
+  int mimein, mimeout;
+  char *action, *comment, *method_style = NULL, *method_encoding = NULL, *method_response_encoding = NULL;
+  char *binding;
+  fprintf(fd, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+  for (sp = services; sp; sp = sp->next)
+    if (!strcmp(sp->ns, ns))
+      break;
+  if (sp && sp->definitions)
+    fprintf(fd, "<definitions name=\"%s\"\n", sp->definitions);
+  else
+    fprintf(fd, "<definitions name=\"%s\"\n", name);
+  if (sp && sp->WSDL)
+    fprintf(fd, " targetNamespace=\"%s\"\n xmlns:tns=\"%s\"", sp->WSDL, sp->WSDL);
+  else
+    fprintf(fd, " targetNamespace=\"%s/%s.wsdl\"\n xmlns:tns=\"%s/%s.wsdl\"", URL, name, URL, name);
+  if (sp && sp->binding)
+    binding = ns_cname(sp->binding, NULL);
+  else
+    binding = name;
+  for (s = nslist; s; s = s->next)
+  { for (sp2 = services; sp2; sp2 = sp2->next)
+      if (!strcmp(sp2->ns, s->name) && sp2->URI)
+        break;
+    if (sp2)
+      fprintf(fd, "\n xmlns:%s=\"%s\"", ns_convert(s->name), sp2->URI);
+    else if (!strcmp(s->name, "SOAP-ENV"))
+      fprintf(fd, "\n xmlns:SOAP-ENV=\"%s\"", envURI);
+    else if (!strcmp(s->name, "SOAP-ENC"))
+      fprintf(fd, "\n xmlns:SOAP-ENC=\"%s\"", encURI);
+    else if (!strcmp(s->name, "xsi"))
+      fprintf(fd, "\n xmlns:xsi=\"%s\"", xsiURI);
+    else if (!strcmp(s->name, "xsd"))
+      fprintf(fd, "\n xmlns:xsd=\"%s\"", xsdURI);
+    else
+      fprintf(fd, "\n xmlns:%s=\"%s/%s.xsd\"", ns_convert(s->name), tmpURI, ns_convert(s->name));
+  }
+  if (is_soap12())
+    fprintf(fd, "\n xmlns:SOAP=\"http://schemas.xmlsoap.org/wsdl/soap12/\"");
+  else
+    fprintf(fd, "\n xmlns:SOAP=\"http://schemas.xmlsoap.org/wsdl/soap/\"");
+  fprintf(fd, "\n xmlns:MIME=\"http://schemas.xmlsoap.org/wsdl/mime/\"");
+  fprintf(fd, "\n xmlns:DIME=\"http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/\"");
+  fprintf(fd, "\n xmlns:WSDL=\"http://schemas.xmlsoap.org/wsdl/\"");
+  fprintf(fd, "\n xmlns=\"http://schemas.xmlsoap.org/wsdl/\">\n\n");
+  fprintf(fd, "<types>\n\n");
+  for (s = nslist; s; s = s->next)
+    gen_schema(fd, t, ns, s->name, !strcmp(s->name, ns), 1, URL, URI, style, encoding);
+  fprintf(fd, "</types>\n\n");
+  fflush(fd);
+  if (t)
+  { for (p = t->list; p; p = p->next)
+    { if (p->info.typ->type == Tfun && !(p->info.sto & Sextern) && has_ns_eq(ns, p->sym->name))
+      { mimein = 0;
+        mimeout = 0;
+	comment = NULL;
+        method_style = style;
+	method_encoding = encoding;
+	method_response_encoding = NULL;
+	if (sp)
+	{   for (m = sp->list; m; m = m->next)
+	    { if (is_eq_nons(m->name, p->sym->name))
+	      { if (m->mess&MIMEIN)
+		  mimein = 1;
+	        if (m->mess&MIMEOUT)
+		  mimeout = 1;
+                if (m->mess == ENCODING)
+	          method_encoding = m->part;
+                else if (m->mess == RESPONSE_ENCODING)
+	          method_response_encoding = m->part;
+                else if (m->mess == STYLE)
+	          method_style = m->part;
+	        else if (m->mess == COMMENT)
+	          comment = m->part;
+	      }
+	    }
+	}
+        if (!method_response_encoding)
+          method_response_encoding = method_encoding;
+	if (get_response(p->info.typ))
+          fprintf(fd, "<message name=\"%sRequest\">\n", ns_remove(p->sym->name));
+	else
+          fprintf(fd, "<message name=\"%s\">\n", ns_remove(p->sym->name));
+        fflush(fd);
+	if (is_document(method_style))
+	{ if (is_invisible(p->sym->name))
+	  { q = entry(classtable, p->sym);
+	    if (q)
+	    { q = ((Table*)q->info.typ->ref)->list;
+	      if (q)
+	      { if (is_invisible(q->sym->name))
+	        { r = entry(classtable, q->sym);
+		  if (r)
+		  { r = ((Table*)r->info.typ->ref)->list;
+		    if (r)
+		      fprintf(fd, " <part name=\"parameters\" element=\"%s\"/>\n", ns_add(r->sym->name, ns));
+		  }
+		}
+                else
+	          fprintf(fd, " <part name=\"parameters\" element=\"%s\"/>\n", ns_add(q->sym->name, ns));
+	      }
+	    }
+	  }
+	  else
+	    fprintf(fd, " <part name=\"parameters\" element=\"%s\"/>\n", ns_add(p->sym->name, ns));
+	}
+	else
+  	{ q = entry(classtable, p->sym);
+  	  if (q)
+	    for (q = ((Table*)q->info.typ->ref)->list; q; q = q->next)
+	    { if (!is_transient(q->info.typ) && !(q->info.sto & Sattribute) && q->info.typ->type != Tfun && !is_repetition(q) && !is_anytype(q))
+  	      { if (is_literal(method_encoding))
+	          fprintf(fd, " <part name=\"%s\" element=\"%s\"/>\n", ns_remove(q->sym->name), ns_add(q->sym->name, ns));
+	        else if (is_XML(q->info.typ))
+	          fprintf(fd, " <part name=\"parameters\" type=\"xsd:anyType\"/>\n");
+	        else
+	          fprintf(fd, " <part name=\"%s\" type=\"%s\"/>\n", ns_remove(q->sym->name), wsdl_type(q->info.typ, ns));
+	      }
+	    }
+	}
+	if (mimein)
+          fprintf(fd, " <part name=\"attachments\" type=\"xsd:base64Binary\"/>\n");
+        fprintf(fd, "</message>\n\n");
+        fflush(fd);
+	q = (Entry*)p->info.typ->ref;
+	if (q && is_transient(q->info.typ))
+	  ;
+	else if (q && !is_response(q->info.typ))
+        { fprintf(fd, "<message name=\"%sResponse\">\n", ns_remove(p->sym->name));
+	  if (is_document(method_style))
+	    fprintf(fd, " <part name=\"parameters\" element=\"%sResponse\"/>\n", ns_add(p->sym->name, ns));
+  	  else if (is_literal(method_response_encoding))
+	    fprintf(fd, " <part name=\"%s\" element=\"%s\"/>\n", ns_remove(q->sym->name), ns_add(q->sym->name, ns));
+	  else if (is_XML(q->info.typ->ref))
+	    fprintf(fd, " <part name=\"parameters\" type=\"xsd:anyType\"/>\n");
+	  else
+	    fprintf(fd, " <part name=\"%s\" type=\"%s\"/>\n", ns_remove(q->sym->name), wsdl_type(q->info.typ, ns));
+	  if (mimeout)
+            fprintf(fd, " <part name=\"attachments\" type=\"xsd:base64Binary\"/>\n");
+          fprintf(fd, "</message>\n\n");
+	}
+        else if (q && q->info.typ->wsdl == False)
+	{ q->info.typ->wsdl = True;
+	  fprintf(fd, "<message name=\"%s\">\n", ns_remove(((Tnode*)q->info.typ->ref)->id->name));
+	  if (is_document(method_style))
+	  { if (has_ns_eq(NULL, ((Entry*)p->info.typ->ref)->sym->name))
+	      fprintf(fd, " <part name=\"parameters\" element=\"%s\"/>\n", ns_convert(((Entry*)p->info.typ->ref)->sym->name));
+            else if (is_invisible(((Tnode*)q->info.typ->ref)->id->name))
+	    { r = ((Table*)((Tnode*)q->info.typ->ref)->ref)->list;
+	      if (r)
+	        fprintf(fd, " <part name=\"parameters\" element=\"%s\"/>\n", ns_add(r->sym->name, ns));
+	    }
+            else
+	      fprintf(fd, " <part name=\"parameters\" element=\"%s\"/>\n", ns_convert(((Tnode*)q->info.typ->ref)->id->name));
+	  }
+	  else
+	  { if (((Tnode*)q->info.typ->ref)->ref)
+	    { for (q = ((Table*)((Tnode*)q->info.typ->ref)->ref)->list; q; q = q->next)
+	      { if (!is_transient(q->info.typ) && !(q->info.sto & Sattribute) && q->info.typ->type != Tfun && !is_repetition(q) && !is_anytype(q))
+  	          if (is_literal(method_response_encoding))
+	            fprintf(fd, " <part name=\"%s\" element=\"%s\"/>\n", ns_remove(q->sym->name), ns_add(q->sym->name, ns));
+	          else if (is_XML(q->info.typ))
+	            fprintf(fd, " <part name=\"parameters\" type=\"xsd:anyType\"/>\n");
+	          else
+	            fprintf(fd, " <part name=\"%s\" type=\"%s\"/>\n", ns_remove(q->sym->name), wsdl_type(q->info.typ, ns));
+	      }
+	    }
+	  }
+	  if (mimeout)
+            fprintf(fd, " <part name=\"attachments\" type=\"xsd:base64Binary\"/>\n");
+          fprintf(fd, "</message>\n\n");
+	}
+        fflush(fd);
+      }
+    }
+    if (custom_header)
+    { Table *r;
+      fprintf(fd, "<message name=\"%sHeader\">\n", name);
+      r = entry(classtable, lookup("SOAP_ENV__Header"))->info.typ->ref;
+      if (r)
+        for (q = r->list; q; q = q->next)
+	  if (!is_transient(q->info.typ) && !(q->info.sto & Sattribute) && q->info.typ->type != Tfun && !is_repetition(q) && !is_anytype(q))
+	    fprintf(fd, " <part name=\"%s\" element=\"%s\"/>\n", ns_remove(q->sym->name), ns_add(q->sym->name, ns));
+      fprintf(fd, "</message>\n\n");
+    }
+    if (custom_fault)
+    { Table *r;
+      fprintf(fd, "<message name=\"%sFault\">\n", name);
+      r = entry(classtable, lookup("SOAP_ENV__Detail"))->info.typ->ref;
+      if (r)
+        for (q = r->list; q; q = q->next)
+	  if (!is_transient(q->info.typ) && !is_repetition(q) && !is_anytype(q) && !(q->info.sto & Sattribute) && q->info.typ->type != Tfun && has_ns_eq(NULL, q->sym->name))
+	    fprintf(fd, " <part name=\"%s\" element=\"%s\"/>\n", ns_remove(q->sym->name), ns_add(q->sym->name, ns));
+      fprintf(fd, "</message>\n\n");
+    }
+    if (sp)
+    { for (m = sp->list; m; m = m->next)
+      { if (m->mess&FAULT)
+        { Method *m2;
+	  int flag = 0;
+	  for (m2 = sp->list; m2 && m2 != m; m2 = m2->next)
+	    if (m2->mess&FAULT && !strcmp(m2->part, m->part))
+	      flag = 1;
+	  if (!flag)
+	  { if (typetable)
+              for (p = typetable->list; p; p = p->next)
+	        if ((m->mess&FAULT) && is_eq(m->part, p->info.typ->sym->name))
+	          break;
+	    if (!p && classtable) 
+              for (p = classtable->list; p; p = p->next)
+	        if ((m->mess&FAULT) && is_eq(m->part, p->info.typ->id->name))
+	          break;
+            if (p)
+            { fprintf(fd, "<message name=\"%sFault\">\n", ns_remove(m->part));
+              fprintf(fd, " <part name=\"fault\" element=\"%s\"/>\n", ns_convert(m->part));
+              fprintf(fd, "</message>\n\n");
+	    }
+	    else
+            { sprintf(errbuf, "//gsoap %s method-fault %s %s directive does not refer to class or typedef", sp->ns, m->name, m->part);
+              semwarn(errbuf);
+	    }
+	  }
+        }
+      }
+    }
+    fflush(fd);
+    if (sp && sp->port)
+      fprintf(fd, "<portType name=\"%s\">\n", sp->port);
+    else
+      fprintf(fd, "<portType name=\"%s\">\n", ns_cname(name, "PortType"));
+    for (p = t->list; p; p = p->next)
+    { if (p->info.typ->type == Tfun && !(p->info.sto & Sextern) && has_ns_eq(ns, p->sym->name))
+      { comment = NULL;
+	if (sp)
+	  for (m = sp->list; m; m = m->next)
+	    if (m->mess == COMMENT && is_eq_nons(m->name, p->sym->name))
+	      comment = m->part;
+        fprintf(fd, " <operation name=\"%s\">\n", ns_remove(p->sym->name));
+        if (comment)
+          fprintf(fd, "  <documentation>%s</documentation>\n", comment);
+        else
+          fprintf(fd, "  <documentation>Service definition of function %s</documentation>\n", p->sym->name);
+	if (get_response(p->info.typ))
+          fprintf(fd, "  <input message=\"tns:%sRequest\"/>\n", ns_remove(p->sym->name));
+	else
+          fprintf(fd, "  <input message=\"tns:%s\"/>\n", ns_remove(p->sym->name));
+	q = (Entry*)p->info.typ->ref;
+	if (q && is_transient(q->info.typ))
+	  ;
+	else if (q && !is_response(q->info.typ))
+	  fprintf(fd, "  <output message=\"tns:%sResponse\"/>\n", ns_remove(p->sym->name));
+        else if (q)
+	  fprintf(fd, "  <output message=\"tns:%s\"/>\n", ns_remove(((Tnode*)q->info.typ->ref)->id->name));
+	if (sp)
+	  for (m = sp->list; m; m = m->next)
+	    if ((m->mess&FAULT) && is_eq_nons(m->name, p->sym->name))
+	      fprintf(fd, "  <fault name=\"%s\" message=\"tns:%sFault\"/>\n", ns_remove(m->part), ns_remove(m->part));
+        fprintf(fd, " </operation>\n");
+      }
+    }
+    fprintf(fd, "</portType>\n\n");
+    fprintf(fd, "<binding name=\"%s\" ", binding);
+    if (is_document(style))
+      if (sp && sp->port)
+        fprintf(fd, "type=\"tns:%s\">\n <SOAP:binding style=\"document\"", sp->port);
+      else
+        fprintf(fd, "type=\"tns:%s\">\n <SOAP:binding style=\"document\"", ns_cname(name, "PortType"));
+    else
+      if (sp && sp->port)
+        fprintf(fd, "type=\"tns:%s\">\n <SOAP:binding style=\"rpc\"", sp->port);
+      else
+        fprintf(fd, "type=\"tns:%s\">\n <SOAP:binding style=\"rpc\"", ns_cname(name, "PortType"));
+    if (sp && sp->transport)
+      fprintf(fd, " transport=\"%s\"/>\n", sp->transport);
+    else
+      fprintf(fd, " transport=\"http://schemas.xmlsoap.org/soap/http\"/>\n");
+    fflush(fd);
+    for (p = t->list; p; p = p->next)
+    { if (p->info.typ->type == Tfun && !(p->info.sto & Sextern) && has_ns_eq(ns, p->sym->name))
+      { action = "";
+	  mimein = 0;
+	  mimeout = 0;
+          method_style = style;
+	  method_encoding = encoding;
+	  method_response_encoding = NULL;
+	  if (sp)
+	  { for (m = sp->list; m; m = m->next)
+	    { if (is_eq_nons(m->name, p->sym->name))
+	      { if (m->mess&MIMEIN)
+		  mimein = 1;
+	        if (m->mess&MIMEOUT)
+		  mimeout = 1;
+                if (m->mess == ENCODING)
+	          method_encoding = m->part;
+                else if (m->mess == RESPONSE_ENCODING)
+	          method_response_encoding = m->part;
+                else if (m->mess == STYLE)
+	          method_style = m->part;
+	        else if (m->mess == ACTION)
+	          action = m->part;
+	      }
+	    }
+	  }
+	if (!method_response_encoding)
+	  method_response_encoding = method_encoding;
+        fprintf(fd, " <operation name=\"%s\">\n", ns_remove(p->sym->name));
+        if (is_document(style))
+	{ if (is_document(method_style))
+          { if (is_soap12())
+	      fprintf(fd, "  <SOAP:operation/>\n");
+	    else if (*action == '"')
+	      fprintf(fd, "  <SOAP:operation soapAction=%s/>\n", action);
+            else
+	      fprintf(fd, "  <SOAP:operation soapAction=\"%s\"/>\n", action);
+	  }
+	  else if (is_soap12())
+            fprintf(fd, "  <SOAP:operation style=\"rpc\"/>\n");
+	  else if (*action == '"')
+            fprintf(fd, "  <SOAP:operation style=\"rpc\" soapAction=%s/>\n", action);
+          else
+            fprintf(fd, "  <SOAP:operation style=\"rpc\" soapAction=\"%s\"/>\n", action);
+	}
+        else
+	{ if (is_document(method_style))
+          { if (is_soap12())
+	      fprintf(fd, "  <SOAP:operation style=\"document\"/>\n");
+	    else if (*action == '"')
+	      fprintf(fd, "  <SOAP:operation style=\"document\" soapAction=%s/>\n", action);
+            else
+	      fprintf(fd, "  <SOAP:operation style=\"document\" soapAction=\"%s\"/>\n", action);
+	  }
+	  else if (is_soap12())
+            fprintf(fd, "  <SOAP:operation style=\"rpc\"/>\n");
+	  else if (*action == '"')
+            fprintf(fd, "  <SOAP:operation style=\"rpc\" soapAction=%s/>\n", action);
+          else
+            fprintf(fd, "  <SOAP:operation style=\"rpc\" soapAction=\"%s\"/>\n", action);
+	}
+	fprintf(fd, "  <input>\n");
+	if (mimein)
+	  fprintf(fd, "   <MIME:multipartRelated>\n    <MIME:part>\n");
+  	q = entry(classtable, p->sym);
+  	if (is_literal(method_encoding) || q && (q = (((Table*)q->info.typ->ref)->list)) && q && is_XML(q->info.typ))
+	{ if (is_document(method_style))
+	    fprintf(fd, "     <SOAP:body parts=\"parameters\" use=\"literal\"/>\n");
+          else
+	    fprintf(fd, "     <SOAP:body parts=\"parameters\" use=\"literal\" namespace=\"%s\"/>\n", URI);
+	}
+        else
+	{ if (encoding && *encoding)
+	    fprintf(fd, "     <SOAP:body use=\"encoded\" namespace=\"%s\" encodingStyle=\"%s\"/>\n", URI, encoding);
+          else if (method_encoding && *method_encoding)
+	    fprintf(fd, "     <SOAP:body use=\"encoded\" namespace=\"%s\" encodingStyle=\"%s\"/>\n", URI, method_encoding);
+          else
+	    fprintf(fd, "     <SOAP:body use=\"encoded\" namespace=\"%s\" encodingStyle=\"%s\"/>\n", URI, encURI);
+          if (!eflag)
+          { sprintf(errbuf, "operation '%s' is not compliant with WS-I Basic Profile 1.0a, reason: uses SOAP encoding", p->sym->name);
+            compliancewarn(errbuf);
+	  }
+	}
+	if (custom_header)
+	{ int f = 0;
+	  m = NULL;
+	  if (sp)
+	    for (m = sp->list; m; m = m->next)
+	      if (is_eq_nons(m->name, p->sym->name) && (m->mess&HDRIN))
+	      { f = 1;
+	        if (chkhdr(m->part))
+	          fprintf(fd, "     <SOAP:header use=\"literal\" message=\"tns:%sHeader\" part=\"%s\"/>\n", name, ns_remove(m->part));
+	      }
+	}
+	if (mimein)
+	{ if (sp)
+	  { for (m = sp->list; m; m = m->next)
+	    { if (is_eq_nons(m->name, p->sym->name) && (m->mess&MIMEIN))
+	        fprintf(fd, "    </MIME:part>\n    <MIME:part>\n     <MIME:content part=\"attachments\" type=\"%s\"/>\n", m->part);
+	    }
+	  }
+	  fprintf(fd, "    </MIME:part>\n   </MIME:multipartRelated>\n");
+	}
+	fprintf(fd, "  </input>\n");
+	q = (Entry*)p->info.typ->ref;
+	if (!q || !q->info.typ->ref)
+	{ fprintf(fd, " </operation>\n");
+	  continue;
+	}
+	fprintf(fd, "  <output>\n");
+	if (mimeout)
+	  fprintf(fd, "   <MIME:multipartRelated>\n    <MIME:part>\n");
+	if (is_literal(method_response_encoding) || is_XML(q->info.typ->ref))
+	{ if (is_document(method_style))
+	    fprintf(fd, "     <SOAP:body parts=\"parameters\" use=\"literal\"/>\n");
+          else
+	    fprintf(fd, "     <SOAP:body parts=\"parameters\" use=\"literal\" namespace=\"%s\"/>\n", URI);
+	}
+	else if (encoding && *encoding)
+	  fprintf(fd, "     <SOAP:body use=\"encoded\" namespace=\"%s\" encodingStyle=\"%s\"/>\n", URI, encoding);
+	else if (method_response_encoding && *method_response_encoding)
+	  fprintf(fd, "     <SOAP:body use=\"encoded\" namespace=\"%s\" encodingStyle=\"%s\"/>\n", URI, method_response_encoding);
+	else
+	  fprintf(fd, "     <SOAP:body use=\"encoded\" namespace=\"%s\" encodingStyle=\"%s\"/>\n", URI, encURI);
+	if (custom_header)
+	{ int f = 0;
+	  if (sp)
+	    for (m = sp->list; m; m = m->next)
+	      if (is_eq_nons(m->name, p->sym->name) && (m->mess&HDROUT))
+	      { f = 1;
+	        if (chkhdr(m->part))
+	          fprintf(fd, "     <SOAP:header use=\"literal\" message=\"tns:%sHeader\" part=\"%s\"/>\n", name, ns_remove(m->part));
+	      }
+	}
+	if (mimeout)
+	{ if (sp)
+	  { for (m = sp->list; m; m = m->next)
+	    { if (is_eq_nons(m->name, p->sym->name) && (m->mess&MIMEOUT))
+	        fprintf(fd, "    </MIME:part>\n    <MIME:part>\n     <MIME:content part=\"attachments\" type=\"%s\"/>\n", m->part);
+	    }
+	  }
+	  fprintf(fd, "    </MIME:part>\n   </MIME:multipartRelated>\n");
+	}
+	fprintf(fd, "  </output>\n");
+	if (sp)
+	  for (m = sp->list; m; m = m->next)
+	    if ((m->mess&FAULT) && is_eq_nons(m->name, p->sym->name))
+	      fprintf(fd, "  <fault name=\"%s\">\n   <SOAP:fault name=\"%s\" use=\"literal\"/>\n  </fault>\n", ns_remove(m->part), ns_remove(m->part));
+	fprintf(fd, " </operation>\n");
+        fflush(fd);
+      }
+    }
+    fprintf(fd, "</binding>\n\n");
+  }
+  fprintf(fd, "<service name=\"%s\">\n", name);
+  if (sp && sp->documentation)
+    fprintf(fd, " <documentation>%s</documentation>\n", sp->documentation);
+  else
+    fprintf(fd, " <documentation>gSOAP "VERSION" generated service definition</documentation>\n");
+  if (executable)
+    fprintf(fd, " <port name=\"%s\" binding=\"tns:%s\">\n  <SOAP:address location=\"%s/%s\"/>\n </port>\n</service>\n\n</definitions>\n", name, binding, URL, executable);
+  else
+    fprintf(fd, " <port name=\"%s\" binding=\"tns:%s\">\n  <SOAP:address location=\"%s\"/>\n </port>\n</service>\n\n</definitions>\n", name, binding, URL);
+}
+
+char *
+default_value(Entry *e, const char *a)
+{ Entry *q;
+  static char buf[1024];
+  buf[0] = '\0';
+  if (e->info.hasval)
+    switch (e->info.typ->type)
+    { case Tchar:
+      case Twchar:
+      case Tuchar:
+      case Tshort:
+      case Tushort:
+      case Tint:
+      case Tuint:
+      case Tlong:
+      case Tllong:
+      case Tulong:
+      case Tullong:
+        sprintf(buf, " %s=\""SOAP_LONG_FORMAT"\"", a, e->info.val.i);
+	break;
+      case Tfloat:
+      case Tdouble:
+        sprintf(buf, " %s=\"%f\"", a, e->info.val.r);
+	break;
+      case Ttime:
+        break; /* should get value? */
+      case Tenum:
+	for (q = ((Table*)e->info.typ->ref)->list; q; q = q->next)
+	  if (q->info.val.i == e->info.val.i)
+	  { sprintf(buf, " %s=\"%s\"", a, ns_convert(q->sym->name));
+	    break;
+	  }
+        break;
+      default:
+	if (e->info.val.s && strlen(e->info.val.s) < sizeof(buf)-12)
+          sprintf(buf, " %s=\"%s\"", a, e->info.val.s);
+	break;
+    }
+  return buf;
+}
+
+const char *nillable(long minOccurs)
+{ if (minOccurs)
+    return "false";
+  return "true";
+}
+
+void
+gen_schema(FILE *fd, Table *t, char *ns1, char *ns, int all, int wsdl, char *URL, char *URI, char *style, char *encoding)
+{ int i, d;
+  char cbuf[4];
+  Entry *p, *q, *r;
+  Tnode *n;
+  Symbol *s;
+  Service *sp, *sp2;
+  Method *m;
+  int flag;
+  if (!strcmp(ns, "SOAP-ENV") || !strcmp(ns, "SOAP-ENC") || !strcmp(ns, "xsi") || !strcmp(ns, "xsd"))
+    return;
+  for (sp = services; sp; sp = sp->next)
+    if (!strcmp(sp->ns, ns) && sp->URI)
+      break;
+  if (sp && sp->import)
+     return;
+  fprintf(fd, " <schema ");
+  if (sp)
+    fprintf(fd, "targetNamespace=\"%s\"", sp->URI);
+  else
+    fprintf(fd, "targetNamespace=\"%s/%s.xsd\"", tmpURI, ns_convert(ns));
+  for (s = nslist; s; s = s->next)
+  { for (sp2 = services; sp2; sp2 = sp2->next)
+      if (!strcmp(sp2->ns, s->name) && sp2->URI)
+        break;
+    if (sp2)
+      fprintf(fd, "\n  xmlns:%s=\"%s\"", ns_convert(s->name), sp2->URI);
+    else if (!strcmp(s->name, "SOAP-ENV"))
+      fprintf(fd, "\n  xmlns:SOAP-ENV=\"%s\"", envURI);
+    else if (!strcmp(s->name, "SOAP-ENC"))
+      fprintf(fd, "\n  xmlns:SOAP-ENC=\"%s\"", encURI);
+    else if (!strcmp(s->name, "xsi"))
+      fprintf(fd, "\n  xmlns:xsi=\"%s\"", xsiURI);
+    else if (!strcmp(s->name, "xsd"))
+      fprintf(fd, "\n  xmlns:xsd=\"%s\"", xsdURI);
+    else
+      fprintf(fd, "\n  xmlns:%s=\"%s/%s.xsd\"", ns_convert(s->name), tmpURI, ns_convert(s->name));
+  }
+  fprintf(fd, "\n  xmlns=\"%s\"\n", xsdURI);
+  if (sp && (sp->elementForm || sp->attributeForm))
+    fprintf(fd, "  elementFormDefault=\"%s\"\n  attributeFormDefault=\"%s\">\n", sp->elementForm?sp->elementForm:"unqualified", sp->attributeForm?sp->attributeForm:"unqualified");
+  else if (style && !strcmp(style, "document"))
+    fprintf(fd, "  elementFormDefault=\"qualified\"\n  attributeFormDefault=\"qualified\">\n");
+  else
+    fprintf(fd, "  elementFormDefault=\"unqualified\"\n  attributeFormDefault=\"unqualified\">\n");
+  fflush(fd);
+  flag = 0;
+  for (s = nslist; s; s = s->next)
+  { for (sp2 = services; sp2; sp2 = sp2->next)
+      if (!strcmp(sp2->ns, s->name) && sp2->import && sp2->URI)
+        break;
+    if (sp2)
+    { fprintf(fd, "  <import namespace=\"%s\"", sp2->URI);
+      if (strcmp(sp2->import, sp2->URI))
+        fprintf(fd, " schemaLocation=\"%s\"", sp2->import);
+      fprintf(fd, "/>\n");
+      if (!strcmp(sp2->URI, encURI))
+        flag = 1;
+    }
+  }
+  if (!flag)
+    fprintf(fd, "  <import namespace=\"%s\"/>", encURI);
+  fprintf(fd, "\n");
+  fflush(fd);
+  if (typetable)
+    for (p = typetable->list; p; p = p->next)
+    { if (p->info.typ->type != Ttemplate && !is_transient(p->info.typ) && (!is_external(p->info.typ) || is_volatile(p->info.typ)) && ((has_ns_eq(ns, p->sym->name))))
+      { /* omit the typedefs that are used for SOAP Fault details */
+        m = NULL;
+        for (sp2 = services; sp2 && !m; sp2 = sp2->next)
+	  for (m = sp2->list; m; m = m->next)
+	    if ((m->mess&FAULT) && m->part && is_eq(m->part, p->sym->name))
+	      break;
+        if (m)
+        { fprintf(fd, "  <!-- fault element -->\n");
+          fprintf(fd, "  <element name=\"%s\" type=\"%s\"/>\n", ns_remove(p->sym->name), base_type(p->info.typ, ns1));
+          continue;
+        }
+        if (is_primitive_or_string(p->info.typ) || p->info.typ->type == Tpointer && is_primitive_or_string(p->info.typ->ref))
+	{ fprintf(fd, "  <simpleType name=\"%s\">", ns_remove(p->sym->name));
+          gen_type_documentation(fd, t, p, ns, ns1);
+	  fprintf(fd, "   <restriction base=\"%s\">\n", base_type(p->info.typ, ns1));
+	  if (p->info.typ->pattern)
+            fprintf(fd, "    <pattern value=\"%s\"/>\n", p->info.typ->pattern);
+          if (is_primitive(p->info.typ) || p->info.typ->type == Tpointer && is_primitive(p->info.typ->ref))
+	  { if (p->info.typ->minLength != -1)
+              fprintf(fd, "    <minInclusive value=\"%d\"/>\n", p->info.typ->minLength);
+	    if (p->info.typ->maxLength != -1)
+              fprintf(fd, "    <maxInclusive value=\"%d\"/>\n", p->info.typ->maxLength);
+	  }
+	  else
+	  { if (p->info.typ->maxLength > 0 && p->info.typ->minLength == p->info.typ->maxLength)
+              fprintf(fd, "    <length value=\"%d\"/>\n", p->info.typ->minLength);
+	    else
+	    { if (p->info.typ->minLength > 0)
+                fprintf(fd, "    <minLength value=\"%d\"/>\n", p->info.typ->minLength);
+	      if (p->info.typ->maxLength > 0)
+                fprintf(fd, "    <maxLength value=\"%d\"/>\n", p->info.typ->maxLength);
+	    }
+	  }
+          fprintf(fd, "   </restriction>\n  </simpleType>\n");
+        }
+        else
+	{ fprintf(fd, "  <complexType name=\"%s\">", ns_remove(p->sym->name));
+	  gen_type_documentation(fd, t, p, ns, ns1);
+	  fprintf(fd, "   <complexContent>\n    <restriction base=\"%s\">\n", base_type(p->info.typ, ns1));
+          fprintf(fd, "    </restriction>\n   </complexContent>\n  </complexType>\n");
+        }
+      }
+    }
+  fflush(fd);
+  if (enumtable)
+    for (p = enumtable->list; p; p = p->next)
+    { if (!is_transient(p->info.typ) && (!has_ns(p->info.typ) && all || has_ns_eq(ns, p->sym->name)))
+      { if (is_mask(p->info.typ))
+        { fprintf(fd, "  <simpleType name=\"%s\">", wsdl_type(p->info.typ, NULL));
+          gen_type_documentation(fd, t, p, ns, ns1);
+          fprintf(fd, "   <list>\n    <restriction base=\"xsd:string\">\n");
+          if ((Table*)p->info.typ->ref)
+            for (q = ((Table*)p->info.typ->ref)->list; q; q = q->next)
+              fprintf(fd, "     <enumeration value=\"%s\"/>\n", ns_remove2(q->sym->name));
+          fprintf(fd, "    </restriction>\n   </list>\n  </simpleType>\n");
+	}
+	else
+	{ fprintf(fd, "  <simpleType name=\"%s\">", wsdl_type(p->info.typ, NULL));
+          gen_type_documentation(fd, t, p, ns, ns1);
+	  fprintf(fd, "   <restriction base=\"xsd:string\">\n");
+          if ((Table*)p->info.typ->ref)
+            for (q = ((Table*)p->info.typ->ref)->list; q; q = q->next)
+              fprintf(fd, "    <enumeration value=\"%s\"/>\n", ns_remove2(q->sym->name));
+          fprintf(fd, "   </restriction>\n  </simpleType>\n");
+        }
+      }
+    }
+  fflush(fd);
+  if (classtable)
+    for (p = classtable->list; p; p = p->next)
+    { for (q = t->list; q; q = q->next)
+        if (q->info.typ->type == Tfun && !(q->info.sto & Sextern) && p == get_response(q->info.typ))
+	  break;
+      /* omit the auto-generated and user-defined response struct/class (when necessary) */
+      if (!q)
+        for (q = t->list; q; q = q->next)
+          if (q->info.typ->type == Tfun && !(q->info.sto & Sextern) && !has_ns_eq(NULL, ((Entry*)q->info.typ->ref)->sym->name))
+          { r = entry(t, q->sym);
+            if (r && r->info.typ->ref && is_response(((Entry*)r->info.typ->ref)->info.typ) && p->info.typ == ((Entry*)r->info.typ->ref)->info.typ->ref)
+              break;
+	  }
+      if (q)
+        continue;
+      /* omit the classes that are used for SOAP Fault details */
+      m = NULL;
+      for (sp2 = services; sp2 && !m; sp2 = sp2->next)
+	for (m = sp2->list; m; m = m->next)
+	  if ((m->mess&FAULT) && m->part && is_eq(m->part, p->sym->name))
+	    break;
+      if (m)
+      { if (!has_ns(p->info.typ) && all || has_ns_eq(ns, p->sym->name))
+        { fprintf(fd, "  <!-- fault element -->\n");
+          fprintf(fd, "  <element name=\"%s\">\n   <complexType>\n    <sequence>\n", ns_remove(p->sym->name));
+	  gen_schema_elements(fd, p->info.typ, ns, ns1);
+          fprintf(fd, "    </sequence>\n");
+	  gen_schema_attributes(fd, p->info.typ, ns, ns1);
+          fprintf(fd, "   </complexType>\n  </element>\n");
+	}
+        continue;
+      }
+      if (p->info.typ->ref && is_binary(p->info.typ))
+      { if (!has_ns(p->info.typ) && all || has_ns_eq(ns, p->sym->name))
+	{ if (is_attachment(p->info.typ))
+	  { fprintf(fd, "  <complexType name=\"%s\">", ns_remove(p->sym->name));
+	    gen_type_documentation(fd, t, p, ns, ns1);
+	    fprintf(fd, "   <simpleContent>\n    <extension base=\"xsd:base64Binary\">\n");
+	    if (!eflag)
+              fprintf(fd, "     <attribute name=\"href\" type=\"xsd:anyURI\" use=\"optional\"/>\n");
+	    gen_schema_attributes(fd, p->info.typ, ns, ns1);
+            fprintf(fd, "    </extension>\n   </simpleContent>\n  </complexType>\n");
+	  }
+	  else
+	  { fprintf(fd, "  <simpleType name=\"%s\">", ns_remove(p->sym->name));
+	    gen_type_documentation(fd, t, p, ns, ns1);
+	    fprintf(fd, "   <restriction base=\"xsd:base64Binary\">\n");
+	    if (p->info.typ->maxLength > 0 && p->info.typ->minLength == p->info.typ->maxLength)
+              fprintf(fd, "    <length value=\"%d\"/>\n", p->info.typ->minLength);
+	    else
+	    { if (p->info.typ->minLength > 0)
+                fprintf(fd, "    <minLength value=\"%d\"/>\n", p->info.typ->minLength);
+	      if (p->info.typ->maxLength > 0)
+                fprintf(fd, "    <maxLength value=\"%d\"/>\n", p->info.typ->maxLength);
+	    }
+            fprintf(fd, "   </restriction>\n  </simpleType>\n");
+	  }
+        }
+      }
+      else if (p->info.typ->ref && !is_transient(p->info.typ) && is_primclass(p->info.typ))
+      { if ((!has_ns(p->info.typ) && all || has_ns_eq(ns, p->sym->name)))
+        { q = ((Table*)p->info.typ->ref)->list;
+	  if (q && strncmp(q->sym->name, "xsd__anyType", 12))
+	  { if (is_string(q->info.typ) || is_wstring(q->info.typ) || is_stdstring(q->info.typ) || is_stdwstring(q->info.typ))
+            { fprintf(fd, "  <complexType name=\"%s\" mixed=\"true\">", ns_remove(p->sym->name));
+	      gen_type_documentation(fd, t, p, ns, ns1);
+              fprintf(fd, "   <simpleContent>\n    <extension base=\"%s\">\n", wsdl_type(q->info.typ, ns1));
+	      gen_schema_attributes(fd, p->info.typ, ns, ns1);
+              fprintf(fd, "    </extension>\n   </simpleContent>\n  </complexType>\n");
+	    }
+	    else if (is_primitive(q->info.typ))
+            { fprintf(fd, "  <complexType name=\"%s\">", ns_remove(p->sym->name));
+	      gen_type_documentation(fd, t, p, ns, ns1);
+              fprintf(fd, "   <simpleContent>\n    <extension base=\"%s\">\n", wsdl_type(q->info.typ, ns1));
+	      gen_schema_attributes(fd, p->info.typ, ns, ns1);
+              fprintf(fd, "    </extension>\n   </simpleContent>\n  </complexType>\n");
+	    }
+	    else
+            { fprintf(fd, "  <complexType name=\"%s\">", ns_remove(p->sym->name));
+	      gen_type_documentation(fd, t, p, ns, ns1);
+              fprintf(fd, "   <complexContent>\n    <extension base=\"%s\">\n", wsdl_type(q->info.typ, ns1));
+	      gen_schema_attributes(fd, p->info.typ, ns, ns1);
+              fprintf(fd, "    </extension>\n   </complexContent>\n  </complexType>\n");
+	    }
+	  }
+        }
+      }
+      else if (p->info.typ->ref && !is_transient(p->info.typ))
+      { q = ((Table*)p->info.typ->ref)->list;
+        if (entry(t, p->sym) && (!q || !is_XML(q->info.typ)))
+          ;
+        else if (is_dynamic_array(p->info.typ))
+        { if (!has_ns(p->info.typ) && !is_untyped(p->info.typ))
+          { if (all)
+	      if (1 /* wsdl */)
+	      { d = get_Darraydims(p->info.typ)-1;
+	        for (i = 0; i < d; i++)
+	          cbuf[i] = ',';
+	        cbuf[i] = '\0';
+		if (q->info.maxOccurs == 1)
+	          fprintf(fd, "  <complexType name=\"%s\">\n   <complexContent>\n    <restriction base=\"SOAP-ENC:Array\">\n     <sequence>\n      <element name=\"%s\" type=\"%s\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n     </sequence>\n     <attribute ref=\"SOAP-ENC:arrayType\" WSDL:arrayType=\"%s[%s]\"/>\n    </restriction>\n   </complexContent>\n  </complexType>\n", wsdl_type(p->info.typ, NULL), q->sym->name[5]?ns_remove(q->sym->name+5):"item", wsdl_type(q->info.typ, ns1), wsdl_type(q->info.typ, ns1), cbuf);
+                else
+	          fprintf(fd, "  <complexType name=\"%s\">\n   <complexContent>\n    <restriction base=\"SOAP-ENC:Array\">\n     <sequence>\n      <element name=\"%s\" type=\"%s\" minOccurs=\"%ld\" maxOccurs=\"%ld\"/>\n     </sequence>\n     <attribute ref=\"SOAP-ENC:arrayType\" WSDL:arrayType=\"%s[%s]\"/>\n    </restriction>\n   </complexContent>\n  </complexType>\n", wsdl_type(p->info.typ, NULL), q->sym->name[5]?ns_remove(q->sym->name+5):"item", wsdl_type(q->info.typ, ns1), q->info.minOccurs, q->info.maxOccurs, wsdl_type(q->info.typ, ns1), cbuf);
+	      }
+              else
+		if (q->info.maxOccurs == 1)
+	          fprintf(fd, "  <complexType name=\"%s\">\n   <complexContent>\n    <restriction base=\"SOAP-ENC:Array\">\n     <sequence>\n      <element name=\"%s\" type=\"%s\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n     </sequence>\n    </restriction>\n   </complexContent>\n  </complexType>\n", wsdl_type(p->info.typ, NULL), q->sym->name[5]?ns_remove(q->sym->name+5):"item", wsdl_type(q->info.typ, ns1));
+                else
+	          fprintf(fd, "  <complexType name=\"%s\">\n   <complexContent>\n    <restriction base=\"SOAP-ENC:Array\">\n     <sequence>\n      <element name=\"%s\" type=\"%s\" minOccurs=\"%ld\" maxOccurs=\"%ld\"/>\n     </sequence>\n    </restriction>\n   </complexContent>\n  </complexType>\n", wsdl_type(p->info.typ, NULL), q->sym->name[5]?ns_remove(q->sym->name+5):"item", wsdl_type(q->info.typ, ns1),  q->info.minOccurs, q->info.maxOccurs);
+          }
+	  else if (p->info.typ->ref && ((Table*)p->info.typ->ref)->prev && !is_transient(entry(classtable, ((Table*)p->info.typ->ref)->prev->sym)->info.typ) && strncmp(((Table*)p->info.typ->ref)->prev->sym->name, "xsd__anyType", 12))
+	  { if (q->info.maxOccurs == 1)
+            { fprintf(fd, "  <complexType name=\"%s\">", ns_remove(p->sym->name));
+	      gen_type_documentation(fd, t, p, ns, ns1);
+              fprintf(fd, "   <complexContent>\n    <extension base=\"%s\">\n     <sequence>\n", ns_convert(((Table*)p->info.typ->ref)->prev->sym->name));
+	      fprintf(fd, "      <element name=\"%s\" type=\"%s\" minOccurs=\"0\" maxOccurs=\"unbounded\" nillable=\"true\"/>\n", q->sym->name[5]?ns_remove(q->sym->name+5):"item", wsdl_type(q->info.typ, ns1));
+              fprintf(fd, "     </sequence>\n    </extension>\n   </complexContent>\n");
+	      gen_schema_attributes(fd, p->info.typ, ns, ns1);
+              fprintf(fd, "  </complexType>\n");
+	    }
+	    else
+            { fprintf(fd, "  <complexType name=\"%s\">", ns_remove(p->sym->name));
+	      gen_type_documentation(fd, t, p, ns, ns1);
+              fprintf(fd, "   <complexContent>\n    <extension base=\"%s\">\n     <sequence>\n", ns_convert(((Table*)p->info.typ->ref)->prev->sym->name));
+	      fprintf(fd, "      <element name=\"%s\" type=\"%s\" minOccurs=\"%ld\" maxOccurs=\"%ld\" nillable=\"%s\"/>\n", q->sym->name[5]?ns_remove(q->sym->name+5):"item", wsdl_type(q->info.typ, ns1), q->info.minOccurs, q->info.maxOccurs, nillable(q->info.minOccurs));
+              fprintf(fd, "     </sequence>\n    </extension>\n   </complexContent>\n");
+	      gen_schema_attributes(fd, p->info.typ, ns, ns1);
+              fprintf(fd, "  </complexType>\n");
+	    }
+	  }
+	  else
+	  { if (q->info.maxOccurs == 1)
+	    { fprintf(fd, "  <complexType name=\"%s\">", ns_remove(p->sym->name));
+	      gen_type_documentation(fd, t, p, ns, ns1);
+	      fprintf(fd, "   <sequence>\n    <element name=\"%s\" type=\"%s\" minOccurs=\"0\" maxOccurs=\"unbounded\" nillable=\"true\"/>\n   </sequence>\n  </complexType>\n", q->sym->name[5]?ns_remove(q->sym->name+5):"item", wsdl_type(q->info.typ, ns1));
+	    }
+            else
+	    { fprintf(fd, "  <complexType name=\"%s\">", ns_remove(p->sym->name));
+	      gen_type_documentation(fd, t, p, ns, ns1);
+	      fprintf(fd, "   <sequence>\n    <element name=\"%s\" type=\"%s\" minOccurs=\"%ld\" maxOccurs=\"%ld\" nillable=\"%s\"/>\n   </sequence>\n  </complexType>\n", q->sym->name[5]?ns_remove(q->sym->name+5):"item", wsdl_type(q->info.typ, ns1), q->info.minOccurs, q->info.maxOccurs, nillable(q->info.minOccurs));
+	    }
+	  }
+	}
+        else if (is_discriminant(p->info.typ) && (!has_ns(p->info.typ) && all || has_ns_eq(ns, p->sym->name)))
+        { if (p->info.typ->ref)
+          { fprintf(fd, "  <complexType name=\"%s\">\n", ns_remove(p->sym->name));
+	    gen_schema_elements(fd, p->info.typ, ns, ns1);
+            fprintf(fd, "  </complexType>\n");
+	  }
+        }
+        else if (p->info.typ->type == Tstruct && (!has_ns(p->info.typ) && all || has_ns_eq(ns, p->sym->name)))
+        { if (p->info.typ->ref)
+          { fprintf(fd, "  <complexType name=\"%s\">", ns_remove(p->sym->name));
+	    gen_type_documentation(fd, t, p, ns, ns1);
+            fprintf(fd, "   <sequence>\n");
+	    gen_schema_elements(fd, p->info.typ, ns, ns1);
+            fprintf(fd, "   </sequence>\n");
+	    gen_schema_attributes(fd, p->info.typ, ns, ns1);
+            fprintf(fd, "  </complexType>\n");
+          }
+        }
+        else if (p->info.typ->type == Tclass && (!has_ns(p->info.typ) && all || has_ns_eq(ns, p->sym->name)))
+        { if (p->info.typ->ref)
+          { if (((Table*)p->info.typ->ref)->prev && !is_transient(entry(classtable, ((Table*)p->info.typ->ref)->prev->sym)->info.typ) && strncmp(((Table*)p->info.typ->ref)->prev->sym->name, "xsd__anyType", 12))
+            { fprintf(fd, "  <complexType name=\"%s\">", ns_remove(p->sym->name));
+	      gen_type_documentation(fd, t, p, ns, ns1);
+              fprintf(fd, "   <complexContent>\n    <extension base=\"%s\">\n     <sequence>\n", ns_convert(((Table*)p->info.typ->ref)->prev->sym->name));
+	      gen_schema_elements(fd, p->info.typ, ns, ns1);
+              fprintf(fd, "     </sequence>\n    </extension>\n   </complexContent>\n");
+	      gen_schema_attributes(fd, p->info.typ, ns, ns1);
+              fprintf(fd, "  </complexType>\n");
+	    }
+	    else
+            { fprintf(fd, "  <complexType name=\"%s\">", ns_remove(p->sym->name));
+	      gen_type_documentation(fd, t, p, ns, ns1);
+              fprintf(fd, "   <sequence>\n");
+	      gen_schema_elements(fd, p->info.typ, ns, ns1);
+              fprintf(fd, "   </sequence>\n");
+	      gen_schema_attributes(fd, p->info.typ, ns, ns1);
+              fprintf(fd, "  </complexType>\n");
+            }
+	  }
+        }
+      }
+    }
+  fflush(fd);
+  for (n = Tptr[Tarray]; n; n = n->next)
+  { if (is_transient(n))
+      continue;
+    else if (1 /* wsdl */)
+      fprintf(fd, "  <complexType name=\"%s\">\n   <complexContent>\n    <restriction base=\"SOAP-ENC:Array\">\n     <attribute ref=\"SOAP-ENC:arrayType\" WSDL:arrayType=\"%s[]\"/>\n    </restriction>\n   </complexContent>\n  </complexType>\n", c_ident(n), wsdl_type(n->ref, ns1));
+    else
+      fprintf(fd, "  <complexType name=\"%s\">\n   <complexContent>\n    <restriction base=\"SOAP-ENC:Array\">\n     <element name=\"item\" type=\"%s\" maxOccurs=\"unbounded\"/>\n    </restriction>\n   </complexContent>\n  </complexType>\n", c_ident(n), xsi_type(n->ref));
+    fflush(fd);
+  }
+  gen_schema_elements_attributes(fd, t, ns, ns1, style, encoding);
+  fprintf(fd, " </schema>\n\n");
+}
+
+void
+gen_schema_elements(FILE *fd, Tnode *p, char *ns, char *ns1)
+{ Entry *q;
+  for (q = ((Table*)p->ref)->list; q; q = q->next)
+    if (gen_schema_element(fd, q, ns, ns1))
+      q = q->next;
+}
+
+int
+gen_schema_element(FILE *fd, Entry *q, char *ns, char *ns1)
+{ char *s, *t;
+      if (is_transient(q->info.typ) || (q->info.sto & Sattribute) || q->info.typ->type == Tfun || q->info.typ->type == Tunion)
+        return 0;
+      if (is_repetition(q))
+      { t = ns_convert(q->next->sym->name);
+        if ((s = strchr(t, ':'))) /* && !has_ns_eq(ns, q->next->sym->name)) */
+	{ if (((Tnode*)q->next->info.typ->ref)->type == Tpointer)
+            if (q->info.maxOccurs == 1)
+	      fprintf(fd, "     <element ref=\"%s\" minOccurs=\"%ld\" maxOccurs=\"unbounded\" nillable=\"%s\"/>\n", t, q->info.minOccurs, nillable(q->info.minOccurs));
+            else
+	      fprintf(fd, "     <element ref=\"%s\" minOccurs=\"%ld\" maxOccurs=\"%ld\" nillable=\"%s\"/>\n", t, q->info.minOccurs, q->info.maxOccurs, nillable(q->info.minOccurs));
+            else
+          if (q->info.maxOccurs == 1)
+              fprintf(fd, "     <element ref=\"%s\" minOccurs=\"%ld\" maxOccurs=\"unbounded\"/>\n", t, q->info.minOccurs);
+	    else
+              fprintf(fd, "     <element ref=\"%s\" minOccurs=\"%ld\" maxOccurs=\"%ld\"/>\n", t, q->info.minOccurs, q->info.maxOccurs);
+	}
+	else
+	{ if (s) s++; else s = t;
+	  if (((Tnode*)q->next->info.typ->ref)->type == Tpointer)
+            if (q->info.maxOccurs == 1)
+	      fprintf(fd, "     <element name=\"%s\" type=\"%s\" minOccurs=\"%ld\" maxOccurs=\"unbounded\" nillable=\"%s\"/>\n", s, wsdl_type(q->next->info.typ->ref, ns1), q->info.minOccurs, nillable(q->info.minOccurs));
+            else
+	      fprintf(fd, "     <element name=\"%s\" type=\"%s\" minOccurs=\"%ld\" maxOccurs=\"%ld\" nillable=\"%s\"/>\n", s, wsdl_type(q->next->info.typ->ref, ns1), q->info.minOccurs, q->info.maxOccurs, nillable(q->info.minOccurs));
+          else
+            if (q->info.maxOccurs == 1)
+              fprintf(fd, "     <element name=\"%s\" type=\"%s\" minOccurs=\"%ld\" maxOccurs=\"unbounded\"/>\n", s, wsdl_type(q->next->info.typ->ref, ns1), q->info.minOccurs);
+	    else
+              fprintf(fd, "     <element name=\"%s\" type=\"%s\" minOccurs=\"%ld\" maxOccurs=\"%ld\"/>\n", s, wsdl_type(q->next->info.typ->ref, ns1), q->info.minOccurs, q->info.maxOccurs);
+	}
+        return 1;
+      }
+      else if (q->info.typ->type == Ttemplate || q->info.typ->type == Tpointer && ((Tnode*)q->info.typ->ref)->type == Ttemplate || q->info.typ->type == Treference && ((Tnode*)q->info.typ->ref)->type == Ttemplate)
+      { t = ns_convert(q->sym->name);
+        if ((s = strchr(t, ':'))) /* && !has_ns_eq(ns, q->sym->name)) */
+	{ if (((Tnode*)q->info.typ->ref)->type == Tpointer)
+            if (q->info.maxOccurs == 1)
+	      fprintf(fd, "     <element ref=\"%s\" minOccurs=\"%ld\" maxOccurs=\"unbounded\" nillable=\"%s\"/>\n", t, q->info.minOccurs, nillable(q->info.minOccurs));
+            else
+	      fprintf(fd, "     <element ref=\"%s\" minOccurs=\"%ld\" maxOccurs=\"%ld\" nillable=\"%s\"/>\n", t, q->info.minOccurs, q->info.maxOccurs, nillable(q->info.minOccurs));
+            else
+          if (q->info.maxOccurs == 1)
+              fprintf(fd, "     <element ref=\"%s\" minOccurs=\"%ld\" maxOccurs=\"unbounded\"/>\n", t, q->info.minOccurs);
+	    else
+              fprintf(fd, "     <element ref=\"%s\" minOccurs=\"%ld\" maxOccurs=\"%ld\"/>\n", t, q->info.minOccurs, q->info.maxOccurs);
+	}
+	else
+	{ if (s) s++; else s = t;
+	  if (((Tnode*)q->info.typ->ref)->type == Tpointer)
+            if (q->info.maxOccurs == 1)
+	      fprintf(fd, "     <element name=\"%s\" type=\"%s\" minOccurs=\"%ld\" maxOccurs=\"unbounded\" nillable=\"%s\"/>\n", s, wsdl_type(q->info.typ->ref, ns1), q->info.minOccurs, nillable(q->info.minOccurs));
+            else
+	      fprintf(fd, "     <element name=\"%s\" type=\"%s\" minOccurs=\"%ld\" maxOccurs=\"%ld\" nillable=\"%s\"/>\n", s, wsdl_type(q->info.typ->ref, ns1), q->info.minOccurs, q->info.maxOccurs, nillable(q->info.minOccurs));
+          else
+            if (q->info.maxOccurs == 1)
+              fprintf(fd, "     <element name=\"%s\" type=\"%s\" minOccurs=\"%ld\" maxOccurs=\"unbounded\"/>\n", s, wsdl_type(q->info.typ->ref, ns1), q->info.minOccurs);
+	    else
+              fprintf(fd, "     <element name=\"%s\" type=\"%s\" minOccurs=\"%ld\" maxOccurs=\"%ld\"/>\n", s, wsdl_type(q->info.typ->ref, ns1), q->info.minOccurs, q->info.maxOccurs);
+	}
+      }
+      else if (is_anytype(q)) /* ... maybe need to show all possible types rather than xsd:anyType */
+      { fprintf(fd, "     <element name=\"%s\" type=\"xsd:anyType\" minOccurs=\"%ld\" maxOccurs=\"%ld\" nillable=\"%s\"/>\n", ns_convert(q->next->sym->name), q->info.minOccurs, q->info.maxOccurs, nillable(q->info.minOccurs));
+        return 1;
+      }
+      else if (is_choice(q))
+      { if (q->info.minOccurs == 0)
+          fprintf(fd, "    <choice minOccurs=\"0\" maxOccurs=\"1\">\n");
+        else
+          fprintf(fd, "    <choice>\n");
+	if (q->next->info.typ->ref)
+	  gen_schema_elements(fd, q->next->info.typ, ns, ns1);
+        fprintf(fd, "    </choice>\n");
+        return 1;
+      }
+      else
+      { t = ns_convert(q->sym->name);
+        if ((s = strchr(t, ':'))) /* && !has_ns_eq(ns, q->sym->name)) */
+	{ if (q->info.typ->type == Tpointer || q->info.typ->type == Tarray || is_dynamic_array(q->info.typ))
+            fprintf(fd, "     <element ref=\"%s\" minOccurs=\"%ld\" maxOccurs=\"%ld\" nillable=\"%s\"%s/>\n", t, q->info.minOccurs, q->info.maxOccurs, nillable(q->info.minOccurs), default_value(q, "default"));
+          else
+            fprintf(fd, "     <element ref=\"%s\" minOccurs=\"%ld\" maxOccurs=\"%ld\"%s/>\n", t, q->info.minOccurs, q->info.maxOccurs, default_value(q, "default"));
+	}
+        else
+	{ if (s) s++; else s = t;
+	  if (q->info.typ->type == Tpointer || q->info.typ->type == Tarray || is_dynamic_array(q->info.typ))
+            fprintf(fd, "     <element name=\"%s\" type=\"%s\" minOccurs=\"%ld\" maxOccurs=\"%ld\" nillable=\"%s\"%s/>\n", s, wsdl_type(q->info.typ, ns1), q->info.minOccurs, q->info.maxOccurs, nillable(q->info.minOccurs), default_value(q, "default"));
+          else
+            fprintf(fd, "     <element name=\"%s\" type=\"%s\" minOccurs=\"%ld\" maxOccurs=\"%ld\"%s/>\n", s, wsdl_type(q->info.typ, ns1), q->info.minOccurs, q->info.maxOccurs, default_value(q, "default"));
+        }
+      }
+      fflush(fd);
+  return 0;
+}
+
+void
+gen_schema_elements_attributes(FILE *fd, Table *t, char *ns, char *ns1, char *style, char *encoding)
+{ Entry *p, *q, *e;
+  Table *r;
+  Service *sp;
+  Method *m;
+  char *method_style, *method_encoding, *method_response_encoding;
+  int all = !strcmp(ns, ns1);
+  r = mktable(NULL);
+  for (p = classtable->list; p; p = p->next)
+  { if (!p->info.typ->ref || /* is_invisible(p->info.typ->id->name) || */ is_transient(p->info.typ) || is_primclass(p->info.typ) || is_dynamic_array(p->info.typ))
+      continue;
+    for (q = ((Table*)p->info.typ->ref)->list; q; q = q->next)
+    { if (!is_repetition(q) && !is_anytype(q) && has_ns_eq(ns, q->sym->name) && !is_transient(q->info.typ) && q->info.typ->type != Tfun)
+      { e = entry(r, q->sym);
+        if (e)
+	{ if ((e->info.sto & Sattribute) != (q->info.sto & Sattribute)|| reftype(e->info.typ) != reftype(q->info.typ))
+          { sprintf(errbuf, "Field '%s' of type '%s' at line %d has a type that does not correspond to the required unique type '%s' defined for elements '<%s>' in the WSDL namespace based on literal encoding: use SOAP RPC encoding or rename or use a namespace qualifier", q->sym->name, c_type(q->info.typ), q->lineno, c_type(e->info.typ), ns_convert(q->sym->name));
+            semwarn(errbuf);
+	  }
+	}
+        else
+	{ if (q->info.sto & Sattribute)
+	    fprintf(fd, "  <attribute name=\"%s\" type=\"%s\"/>\n", ns_remove(q->sym->name), wsdl_type(q->info.typ, ns1));
+	  else	
+	    fprintf(fd, "  <element name=\"%s\" type=\"%s\"/>\n", ns_remove(q->sym->name), wsdl_type(q->info.typ, ns1));
+	  e = enter(r, q->sym);
+	  e->info = q->info;
+        }
+      }
+    }
+  }
+  if (t && all)
+  { for (p = t->list; p; p = p->next)
+    { if (p->info.typ->type == Tfun && !is_invisible(p->sym->name) && !(p->info.sto & Sextern) && has_ns_eq(ns, p->sym->name))
+      { method_encoding = encoding;
+	method_response_encoding = NULL;
+	method_style = style;
+	for (sp = services; sp; sp = sp->next)
+	  if (!strcmp(sp->ns, ns))
+	    for (m = sp->list; m; m = m->next)
+	      if (is_eq_nons(m->name, p->sym->name))
+                if (m->mess == ENCODING)
+	          method_encoding = m->part;
+                else if (m->mess == RESPONSE_ENCODING)
+	          method_response_encoding = m->part;
+                else if (m->mess == STYLE)
+	          method_style = m->part;
+	if (!eflag)
+	{ if (!method_response_encoding)
+            method_response_encoding = method_encoding;
+          q = entry(classtable, p->sym);
+          if (q)
+	  { if (is_document(method_style))
+            { fprintf(fd, "  <!-- operation request element -->\n");
+	      fprintf(fd, "  <element name=\"%s\">\n   <complexType>\n    <sequence>\n", ns_remove(p->sym->name));
+	      gen_schema_elements(fd, q->info.typ, ns, ns1);
+	      fprintf(fd, "    </sequence>\n");
+	      gen_schema_attributes(fd, q->info.typ, ns, ns1);
+	      fprintf(fd, "   </complexType>\n  </element>\n");
+	    }
+	    else if (is_literal(method_encoding))
+	    { for (q = ((Table*)q->info.typ->ref)->list; q; q = q->next)
+              { if (!is_repetition(q) && !is_anytype(q) && !has_ns_eq(NULL, q->sym->name) && !is_transient(q->info.typ) && q->info.typ->type != Tfun && !(q->info.sto & Sattribute))
+                { e = entry(r, q->sym);
+                  if (e)
+	          { if ((e->info.sto & Sattribute) != (q->info.sto & Sattribute)|| reftype(e->info.typ) != reftype(q->info.typ))
+                    { sprintf(errbuf, "Parameter '%s' of type '%s' at line %d has a type that does not correspond to the required unique type '%s' defined for elements '<%s>' in the WSDL namespace based on literal encoding: use SOAP RPC encoding or rename or use a namespace qualifier", q->sym->name, c_type(q->info.typ), q->lineno, c_type(e->info.typ), ns_convert(q->sym->name));
+                      semwarn(errbuf);
+	            }
+	          }
+                  else
+                  { fprintf(fd, "  <!-- operation request element -->\n");
+	            fprintf(fd, "  <element name=\"%s\" type=\"%s\"/>\n", ns_remove(q->sym->name), wsdl_type(q->info.typ, ns1));
+	            e = enter(r, q->sym);
+		    e->info = q->info;
+	          }
+	        }
+	      }
+	    }
+            q = (Entry*)p->info.typ->ref;
+            if (q && !is_transient(q->info.typ))
+            { if (!is_response(q->info.typ))
+	      { if (is_document(method_style))
+                { fprintf(fd, "  <!-- operation response element -->\n");
+	          fprintf(fd, "  <element name=\"%sResponse\">\n   <complexType>\n    <sequence>\n", ns_remove(p->sym->name));
+	          gen_schema_element(fd, q, ns, ns1);
+	          fprintf(fd, "    </sequence>\n");
+	          fprintf(fd, "   </complexType>\n  </element>\n");
+		}
+  	        else if (is_literal(method_response_encoding))
+                { e = entry(r, q->sym);
+                  if (e)
+	          { if ((e->info.sto & Sattribute) != (q->info.sto & Sattribute)|| reftype(e->info.typ) != reftype(q->info.typ))
+                    { sprintf(errbuf, "Qualified field '%s' has a type that does not correspond to the unique type '%s' defined for elements '<%s>'", q->sym->name, c_type(q->info.typ), ns_convert(q->sym->name));
+                      semwarn(errbuf);
+	            }
+	          }
+                  else
+                  { fprintf(fd, "  <!-- operation response element -->\n");
+	            fprintf(fd, "  <element name=\"%s\" type=\"%s\"/>\n", ns_remove(q->sym->name), wsdl_type(q->info.typ, ns1));
+	            e = enter(r, q->sym);
+		    e->info = q->info;
+	          }
+	        }
+	      }
+              else if (((Tnode*)q->info.typ->ref)->ref)
+	      { if (is_document(method_style))
+	        { if (!has_ns_eq(NULL, q->sym->name))
+		  { e = entry(r, ((Tnode*)q->info.typ->ref)->id);
+		    if (!e)
+                    { fprintf(fd, "  <!-- operation response element -->\n");
+		      fprintf(fd, "  <element name=\"%s\">\n   <complexType>\n    <sequence>\n", ns_remove(((Tnode*)q->info.typ->ref)->id->name));
+	              gen_schema_elements(fd, q->info.typ->ref, ns, ns1);
+	              fprintf(fd, "    </sequence>\n");
+	              gen_schema_attributes(fd, q->info.typ->ref, ns, ns1);
+	              fprintf(fd, "   </complexType>\n  </element>\n");
+		      e = enter(r, ((Tnode*)q->info.typ->ref)->id);
+		      e->info = q->info;
+		    }
+		  }
+		}
+		else if (is_literal(method_response_encoding))
+	        { for (q = ((Table*)((Tnode*)q->info.typ->ref)->ref)->list; q; q = q->next)
+  	          { if (!is_repetition(q) && !is_anytype(q) && !has_ns_eq(NULL, q->sym->name) && !is_transient(q->info.typ) && q->info.typ->type != Tfun && !(q->info.sto & Sattribute))
+                    { e = entry(r, q->sym);
+                      if (e)
+	              { if ((e->info.sto & Sattribute) != (q->info.sto & Sattribute)|| reftype(e->info.typ) != reftype(q->info.typ))
+                        { sprintf(errbuf, "Qualified field '%s' has a type that does not correspond to the unique type '%s' defined for elements '<%s>'", q->sym->name, c_type(q->info.typ), ns_convert(q->sym->name));
+                          semwarn(errbuf);
+	                }
+	              }
+                      else
+                      { fprintf(fd, "  <!-- operation response element -->\n");
+	                fprintf(fd, "  <element name=\"%s\" type=\"%s\"/>\n", ns_remove(q->sym->name), wsdl_type(q->info.typ, ns1));
+	                e = enter(r, q->sym);
+		        e->info = q->info;
+	              }
+	            }
+	          }
+	        }
+	      }
+            }
+          }
+        }
+      }
+    }
+  }
+  if (t)
+  { for (p = t->list; p; p = p->next)
+    { if (p->info.typ->type == Tfun && !(p->info.sto & Sextern) && !eflag)
+      { q = (Entry*)p->info.typ->ref;
+        if (q && !is_transient(q->info.typ))
+        { if (is_response(q->info.typ))
+	  { if (has_ns_eq(ns, q->sym->name))
+            { e = entry(r, q->sym);
+              if (!e)
+              { fprintf(fd, "  <!-- operation response element -->\n");
+	        fprintf(fd, "  <element name=\"%s\" type=\"%s\"/>\n", ns_remove(q->sym->name), wsdl_type(q->info.typ, ns1));
+	        e = enter(r, q->sym);
+		e->info = q->info;
+	      }
+	    }
+	  }
+        }
+      }
+    }
+  }
+  freetable(r);
+}
+
+void
+gen_schema_attributes(FILE *fd, Tnode *p, char *ns, char *ns1)
+{ Entry *q;
+  char *t, *s, *r;
+  for (q = ((Table*)p->ref)->list; q; q = q->next)
+  { if (q->info.sto & Sattribute)
+    { t = ns_convert(q->sym->name);
+      r = default_value(q, "value");
+      if ((s = strchr(t, ':')))
+      { if (r && *r)
+          fprintf(fd, "     <attribute ref=\"%s\" use=\"default\"%s/>\n", t, r);
+	else if (q->info.typ->type != Tpointer || q->info.minOccurs)
+          fprintf(fd, "     <attribute ref=\"%s\" use=\"required\"/>\n", t);
+	else
+          fprintf(fd, "     <attribute ref=\"%s\" use=\"optional\"/>\n", t);
+      }
+      else
+      { if (!s)
+          s = t;
+        else
+	  s++;
+	if (r && *r)
+          fprintf(fd, "     <attribute name=\"%s\" type=\"%s\" use=\"default\"%s/>\n", s, wsdl_type(q->info.typ, ns1), r);
+	else if (q->info.typ->type != Tpointer || q->info.minOccurs)
+          fprintf(fd, "     <attribute name=\"%s\" type=\"%s\" use=\"required\"/>\n", s, wsdl_type(q->info.typ, ns1));
+	else
+          fprintf(fd, "     <attribute name=\"%s\" type=\"%s\" use=\"optional\"/>\n", s, wsdl_type(q->info.typ, ns1));
+      }
+      fflush(fd);
+    }
+  }
+}
+
+void
+gen_type_documentation(FILE *fd, Table *t, Entry *p, char *ns, char *ns1)
+{ Service *sp;
+  Data *d;
+  fprintf(fd, "\n");
+  if (!p->sym)
+    return;
+  for (sp = services; sp; sp = sp->next)
+    if (!strcmp(sp->ns, ns))
+      for (d = sp->data; d; d = d->next)
+        if (is_eq_nons(d->name, p->sym->name))
+          fprintf(fd, "   <annotation>\n    <documentation>%s</documentation>\n   </annotation>\n", d->part);
+}
+
+void
+gen_nsmap(FILE *fd, Symbol *ns, char *URI)
+{ Symbol *ns1;
+  Service *sp;
+  fprintf(fd, "{\n");
+  for (ns1 = nslist; ns1; ns1 = ns1->next)
+    /* if (ns1 != ns) */
+    { for (sp = services; sp; sp = sp->next)
+        if (!strcmp(sp->ns, ns1->name) && sp->URI)
+	  break;
+        if (sp)
+        { if (!strcmp(ns1->name, "SOAP-ENV"))
+	    fprintf(fd, "\t{\"%s\", \"%s\", \"%s\", NULL},\n", ns_convert(ns1->name), sp->URI, envURI);
+          else if (!strcmp(ns1->name, "SOAP-ENC"))
+	    fprintf(fd, "\t{\"%s\", \"%s\", \"%s\", NULL},\n", ns_convert(ns1->name), sp->URI, encURI);
+          else
+	    fprintf(fd, "\t{\"%s\", \"%s\", NULL, NULL},\n", ns_convert(ns1->name), sp->URI);
+        }
+        else if (!strcmp(ns1->name, "SOAP-ENV"))
+	  fprintf(fd, "\t{\"SOAP-ENV\", \"%s\", \"http://www.w3.org/*/soap-envelope\", NULL},\n", envURI);
+        else if (!strcmp(ns1->name, "SOAP-ENC"))
+	  fprintf(fd, "\t{\"SOAP-ENC\", \"%s\", \"http://www.w3.org/*/soap-encoding\", NULL},\n", encURI);
+        else if (!strcmp(ns1->name, "xsi"))
+	  fprintf(fd, "\t{\"xsi\", \"%s\", \"http://www.w3.org/*/XMLSchema-instance\", NULL},\n", xsiURI);
+        else if (!strcmp(ns1->name, "xsd"))
+	  fprintf(fd, "\t{\"xsd\", \"%s\", \"http://www.w3.org/*/XMLSchema\", NULL},\n", xsdURI);
+        else
+	  fprintf(fd, "\t{\"%s\", \"%s/%s.xsd\", NULL, NULL},\n", ns_convert(ns1->name), tmpURI, ns_convert(ns1->name)); 
+    }
+    /* fprintf(fd, "\t{\"%s\", \"%s\"},\n", ns_convert(ns->name), URI); */
+    fprintf(fd, "\t{NULL, NULL, NULL, NULL}\n};\n");
+}
+
+void
+gen_proxy(FILE *fd, Table *table, Symbol *ns, char *name, char *URL, char *executable, char *URI, char *encoding)
+{ Entry *p, *q, *r;
+  Table *t, *output;
+  char *s;
+  Service *sp;
+  Method *m;
+  int flag;
+  char *name1;
+  name1 = emalloc(strlen(name)+1);
+  strcpy(name1, name);
+  for (s = name1+1; *s; s++)
+  { if (!isalnum(*s))
+    { *s = '\0';
+      break;
+    }
+  }
+  for (sp = services; sp; sp = sp->next)
+    if (!strcmp(sp->ns, ns->name))
+      break;
+  fprintf(fd, "\n\n#ifndef %s%s_H\n#define %s%s_H\n#include \"%sH.h\"", prefix, name1, prefix, name1, prefix);
+  if (nflag)
+    fprintf(fd, "\nextern SOAP_NMAC struct Namespace %s_namespaces[];", prefix);
+  if (namespaceid)
+    fprintf(fd,"\n\nnamespace %s {", namespaceid);
+  fprintf(fd, "\nclass %s\n{   public:\n\tstruct soap *soap;\n\tconst char *endpoint;\n", name1);
+  if (nflag)
+    fprintf(fd, "\t%s() { soap = soap_new(); if (soap) soap->namespaces = %s_namespaces; endpoint = \"%s\"; };\n", name1, prefix, URL);
+  else
+  { fprintf(fd, "\t%s()\n\t{ soap = soap_new(); endpoint = \"%s\"; if (soap && !soap->namespaces) { static const struct Namespace namespaces[] = \n", name1, URL);
+    gen_nsmap(fd, ns, URI);
+    fprintf(fd, "\tsoap->namespaces = namespaces; } };\n", name1, URL);
+  }
+  fprintf(fd, "\tvirtual ~%s() { if (soap) { soap_destroy(soap); soap_end(soap); soap_done(soap); soap_del(soap); } };\n", name1);
+  fflush(fd);
+  for (r = table->list; r; r = r->next)
+    if (r->info.typ->type == Tfun && !(r->info.sto & Sextern) && has_ns_eq(ns->name, r->sym->name))
+    { p = entry(table, r->sym);
+      if (p)
+        q = (Entry*)p->info.typ->ref;
+      else
+        fprintf(stderr, "Internal error: no table entry\n");
+      p = entry(classtable, r->sym);
+      if (!p)
+        fprintf(stderr, "Internal error: no parameter table entry\n");
+      output = (Table*)p->info.typ->ref;
+      /*
+      if ((s = strstr(r->sym->name, "__")))
+        s += 2;
+      else
+        s = r->sym->name;
+      fprintf(fd, "\tvirtual int %s(", s);
+      */
+      fprintf(fd, "\tvirtual int %s(", r->sym->name);
+      flag = 0;
+      for (t = output; t; t = t->prev)
+      { p = t->list;
+        if (p)
+        { fprintf(fd, "%s%s%s", c_storage(p->info.sto), c_type_id(p->info.typ, p->sym->name), c_init(p));
+          for (p = p->next; p; p = p->next)
+            fprintf(fd, ", %s%s%s", c_storage(p->info.sto), c_type_id(p->info.typ, p->sym->name), c_init(p));
+	  flag = 1;
+        }
+      }
+      if (is_transient(q->info.typ))
+        fprintf(fd,") { return soap ? soap_send_%s(soap, endpoint, NULL", r->sym->name);
+      else if (flag)
+        fprintf(fd,", %s%s) { return soap ? soap_call_%s(soap, endpoint, NULL", c_storage(q->info.sto), c_type_id(q->info.typ, q->sym->name), r->sym->name);
+      else
+        fprintf(fd,"%s%s) { return soap ? soap_call_%s(soap, endpoint, NULL", c_storage(q->info.sto), c_type_id(q->info.typ, q->sym->name), r->sym->name);
+      /* the action is now handled by the soap_call/soap_send operation when we pass NULL
+      m = NULL;
+      if (sp && (s = strstr(r->sym->name, "__")))
+        for (m = sp->list; m; m = m->next)
+          if (m->part && m->mess == ACTION && !strcmp(m->name, s+2))
+          { if (*m->part == '"')
+	      fprintf(fd, "%s", m->part);
+            else
+	      fprintf(fd, "\"%s\"", m->part);
+	    break;
+	  }
+      if (!m)
+        fprintf(fd, "NULL");
+      */
+      for (t = output; t; t = t->prev)
+        for (p = t->list; p; p = p->next)
+          fprintf(fd, ", %s", p->sym->name);
+      if (is_transient(q->info.typ))
+        fprintf(fd,") : SOAP_EOM; };\n");
+      else
+        fprintf(fd,", %s) : SOAP_EOM; };\n", q->sym->name);
+      fflush(fd);
+    }
+  fprintf(fd, "};");
+  if (namespaceid)
+    fprintf(fd,"\n\n} // namespace %s\n", namespaceid);
+  fprintf(fd, "\n#endif\n");
+}
+
+void
+gen_object(FILE *fd, Table *table, Symbol *ns, char *name, char *URL, char *executable, char *URI, char *encoding)
+{ char *s;
+  char *name1;
+  name1 = emalloc(strlen(name)+1);
+  strcpy(name1, name);
+  for (s = name1+1; *s; s++)
+  { if (!isalnum(*s))
+    { *s = '\0';
+      break;
+    }
+  }
+  fprintf(fd, "\n\n#ifndef %s%s_H\n#define %s%s_H\n#include \"%sH.h\"", prefix, name1, prefix, name1, prefix);
+  if (nflag)
+    fprintf(fd, "\nextern SOAP_NMAC struct Namespace %s_namespaces[];", prefix);
+  if (namespaceid)
+    fprintf(fd,"\n\nnamespace %s {", namespaceid);
+  fprintf(fd, "\nclass %s : public soap\n{    public:", name1);
+  if (nflag)
+    fprintf(fd, "\n\t%s()\n\t{ soap_init(this); this->namespaces = %s_namespaces; };", name1, prefix);
+  else
+  { fprintf(fd, "\n\t%s()\n\t{ static const struct Namespace namespaces[] =\n", name1);
+    gen_nsmap(fd, ns, URI);
+    fprintf(fd, "\tsoap_init(this); if (!this->namespaces) this->namespaces = namespaces; };");
+  }
+  fprintf(fd, "\n\tvirtual ~%s() { soap_destroy(this); soap_end(this); soap_done(this); };", name1);
+  if (nflag)
+    fprintf(fd, "\n\tvirtual\tint serve() { return %s_serve(this); };", prefix);
+  else
+    fprintf(fd, "\n\tvirtual\tint serve() { return soap_serve(this); };");
+  fprintf(fd, "\n};");
+  if (namespaceid)
+    fprintf(fd,"\n\n} // namespace %s\n", namespaceid);
+  fprintf(fd, "\n#endif\n");
+}
+
+void
+gen_proxy_header(FILE *fd, Table *table, Symbol *ns, char *name, char *URL, char *executable, char *URI, char *encoding)
+{ Entry *method;
+  fprintf(fd, "\n\n#ifndef %s%s_H\n#define %s%s_H\n#include \"%sH.h\"", prefix, name, prefix, name, prefix);
+  if (namespaceid)
+    fprintf(fd,"\n\nnamespace %s {", namespaceid);
+  fprintf(fd, "\n\nclass SOAP_CMAC %s : public soap\n{ public:", name);
+  fprintf(fd, "\n\t\t%s();", name);
+  fprintf(fd, "\n\t\t%s(soap_mode iomode);", name);
+  fprintf(fd, "\n\t\t%s(soap_mode imode, soap_mode omode);", name);
+  fprintf(fd, "\n\tvirtual ~%s();", name);
+  fprintf(fd, "\n\tvirtual\tvoid %s_init(soap_mode imode, soap_mode omode);", name);
+  for (method = table->list; method; method = method->next)
+    if (method->info.typ->type == Tfun && !(method->info.sto & Sextern))
+      gen_method(fd, table, method);
+  fprintf(fd, "\n\t\tconst char *soap_endpoint;");
+  fprintf(fd, "\n};");
+  if (namespaceid)
+    fprintf(fd,"\n\n} // namespace %s\n", namespaceid);
+  fprintf(fd, "\n#endif\n");
+}
+
+void
+gen_proxy_code(FILE *fd, Table *table, Symbol *ns, char *name, char *URL, char *executable, char *URI, char *encoding)
+{ Entry *method;
+  fprintf(fd, "\n\n#include \"%s%s.h\"", prefix, name);
+  if (namespaceid)
+    fprintf(fd,"\n\nnamespace %s {", namespaceid);
+  fprintf(fd, "\n\n%s::%s()\n{\t%s_init(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT);\n}", name, name, name);
+  fprintf(fd, "\n\n%s::%s(soap_mode iomode)\n{\t%s_init(iomode, iomode);\n}", name, name, name);
+  fprintf(fd, "\n\n%s::%s(soap_mode imode, soap_mode omode)\n{\t%s_init(imode, omode);\n}", name, name, name);
+  fprintf(fd, "\n\nvoid %s::%s_init(soap_mode imode, soap_mode omode)\n{\tsoap_init2(this, imode, omode);\n\tsoap_endpoint = NULL;\n\tstatic const struct Namespace namespaces[] =\n", name, name);
+  gen_nsmap(fd, ns, URI);
+  if (nflag)
+    fprintf(fd, "\tthis->namespaces = namespaces;\n};");
+  else
+    fprintf(fd, "\tif (!this->namespaces)\n\t\tthis->namespaces = namespaces;\n};");
+  fprintf(fd, "\n\n%s::~%s()\n{\tsoap_destroy(this);\n\tsoap_end(this);\n\tsoap_done(this);\n};", name, name);
+  for (method = table->list; method; method = method->next)
+    if (method->info.typ->type == Tfun && !(method->info.sto & Sextern) && !is_imported(method->info.typ))
+      gen_call_method(fd, table, method, name);
+  if (namespaceid)
+    fprintf(fd,"\n\n} // namespace %s\n", namespaceid);
+}
+
+void
+gen_object_header(FILE *fd, Table *table, Symbol *ns, char *name, char *URL, char *executable, char *URI, char *encoding)
+{ Entry *method;
+  fprintf(fd, "\n\n#ifndef %s%s_H\n#define %s%s_H\n#include \"%sH.h\"", prefix, name, prefix, name, prefix);
+  if (namespaceid)
+    fprintf(fd,"\n\nnamespace %s {", namespaceid);
+  fprintf(fd, "\nclass SOAP_CMAC %s : public soap\n{ public:", name);
+  fprintf(fd, "\n\t\t%s();", name);
+  fprintf(fd, "\n\t\t%s(soap_mode iomode);", name);
+  fprintf(fd, "\n\t\t%s(soap_mode imode, soap_mode omode);", name);
+  fprintf(fd, "\n\tvirtual ~%s();", name);
+  fprintf(fd, "\n\tvirtual\tvoid %s_init(soap_mode imode, soap_mode omode);", name);
+  fprintf(fd, "\n\tvirtual int serve();");
+  fprintf(fd, "\n\tvirtual int dispatch();");
+  for (method = table->list; method; method = method->next)
+    if (method->info.typ->type == Tfun && !(method->info.sto & Sextern))
+      gen_method(fd, table, method);
+  fprintf(fd, "\n};");
+  if (namespaceid)
+    fprintf(fd,"\n\n} // namespace %s\n", namespaceid);
+  fprintf(fd, "\n#endif\n");
+}
+
+void
+gen_method(FILE *fd, Table *table, Entry *method)
+{ Table *params;
+  Entry *result, *p; 
+  result = method->info.typ->ref;
+  p = entry(classtable, method->sym);
+  if (!p)
+    execerror("no table entry");
+  params = (Table*)p->info.typ->ref;
+  fprintf(fd, "\n\tvirtual int %s(", ns_cname(method->sym->name, NULL));
+  gen_params(fd, params, result, 0);
+  fprintf(fd, ";");
+}
+
+void
+gen_params(FILE *fd, Table *params, Entry *result, int flag)
+{ Entry *param;
+  for (param = params->list; param; param = param->next)
+    fprintf(fd, "%s%s%s", flag || param != params->list ? ", " : "", c_storage(param->info.sto), c_type_id(param->info.typ, param->sym->name));
+  if (is_transient(result->info.typ))
+    fprintf(fd, ")");
+  else
+    fprintf(fd, "%s%s%s)", flag || params->list ? ", " : "", c_storage(result->info.sto), c_type_id(result->info.typ, result->sym->name));
+}
+
+void
+gen_call_method(FILE *fd, Table *table, Entry *method, char *name)
+{ Service *sp;
+  Method *m;
+  char *style, *encoding;
+  char *xtag, *xtyp;
+  char *s, *action = NULL, *method_style = NULL, *method_encoding = NULL, *method_response_encoding = NULL;
+  Table *params;
+  Entry *param, *result, *p, *response = NULL; 
+  result = method->info.typ->ref;
+  p = entry(classtable, method->sym);
+  if (!p)
+    execerror("no table entry");
+  params = (Table*)p->info.typ->ref;
+  if (!is_response(result->info.typ) && !is_XML(result->info.typ))
+    response = get_response(method->info.typ);
+  if (name)
+  { fprintf(fd, "\n\nint %s::%s(", name, ns_cname(method->sym->name, NULL));
+    gen_params(fd, params, result, 0);
+  }
+  else if (!is_transient(result->info.typ))
+  { fprintf(fheader, "\n\nSOAP_FMAC5 int SOAP_FMAC6 soap_call_%s(struct soap *soap, const char *soap_endpoint, const char *soap_action", method->sym->name);
+    gen_params(fheader, params, result, 1);
+    fprintf(fd, "\n\nSOAP_FMAC5 int SOAP_FMAC6 soap_call_%s(struct soap *soap, const char *soap_endpoint, const char *soap_action", method->sym->name);
+    gen_params(fd, params, result, 1);
+  }
+  else
+  { fprintf(fheader, "\n\nSOAP_FMAC5 int SOAP_FMAC6 soap_send_%s(struct soap *soap, const char *soap_endpoint, const char *soap_action", method->sym->name);
+    gen_params(fheader, params, result, 1);
+    fprintf(fd, "\n\nSOAP_FMAC5 int SOAP_FMAC6 soap_send_%s(struct soap *soap, const char *soap_endpoint, const char *soap_action", method->sym->name);
+    gen_params(fd, params, result, 1);
+  }
+  if (name)
+    fprintf(fd, "\n{\tstruct soap *soap = this;\n");
+  else
+  { fprintf(fheader, ";");
+    fprintf(fd, "\n{");
+  }
+  fprintf(fd, "\tstruct %s soap_tmp_%s;", method->sym->name, method->sym->name);
+  if (!is_response(result->info.typ) && response)
+    fprintf(fd, "\n\tstruct %s *soap_tmp_%s;", c_ident(response->info.typ), c_ident(response->info.typ));
+  for (sp = services; sp; sp = sp->next)
+  { if (has_ns_eq(sp->ns, method->sym->name))
+    { style = sp->style;
+      encoding = sp->encoding;
+      method_style = style;
+      method_encoding = encoding;
+      method_response_encoding = NULL;
+      for (m = sp->list; m; m = m->next)
+        if (is_eq_nons(m->name, method->sym->name))
+          if (m->mess == ACTION)
+            action = m->part;
+          else if (m->mess == ENCODING)
+            method_encoding = m->part;
+          else if (m->mess == RESPONSE_ENCODING)
+            method_response_encoding = m->part;
+          else if (m->mess == STYLE)
+            method_style = m->part;
+      break;
+    }
+  }
+  if (name)
+    fprintf(fd, "\n\tconst char *soap_action = NULL;");
+  if (sp && sp->URL)
+    fprintf(fd, "\n\tif (!soap_endpoint)\n\t\tsoap_endpoint = \"%s\";", sp->URL);
+  if (action)
+  { if (name)
+      fprintf(fd, "\n\tsoap_action = ");
+    else
+      fprintf(fd, "\n\tif (!soap_action)\n\t\tsoap_action = ");
+    if (*action == '"')
+      fprintf(fd, "%s;", action);
+    else
+      fprintf(fd, "\"%s\";", action);
+  }
+  if (!method_response_encoding)
+    method_response_encoding = method_encoding;
+  if (sp && sp->URI && method_encoding)
+  { if (is_literal(method_encoding))
+      fprintf(fd, "\n\tsoap->encodingStyle = NULL;");
+    else if (method_encoding)
+      fprintf(fd, "\n\tsoap->encodingStyle = \"%s\";", method_encoding);
+  }
+  else if (!eflag)
+    fprintf(fd, "\n\tsoap->encodingStyle = NULL;");
+  for (param = params->list; param; param = param->next)
+  { if (param->info.typ->type == Tarray)
+      fprintf(fd, "\n\tmemcpy(soap_tmp_%s.%s, %s, sizeof(%s));", method->sym->name, param->sym->name, param->sym->name, c_type(param->info.typ));
+    else
+      fprintf(fd, "\n\tsoap_tmp_%s.%s = %s;", method->sym->name, param->sym->name, param->sym->name);
+  }	
+  fprintf(fd, "\n\tsoap_begin(soap);");
+  fprintf(fd, "\n\tsoap_serializeheader(soap);");
+  fprintf(fd, "\n\tsoap_serialize_%s(soap, &soap_tmp_%s);", method->sym->name, method->sym->name);
+  fprintf(fd, "\n\tif (soap_begin_count(soap))\n\t\treturn soap->error;");
+  fprintf(fd, "\n\tif (soap->mode & SOAP_IO_LENGTH)");
+  fprintf(fd, "\n\t{\tif (soap_envelope_begin_out(soap)");
+  fprintf(fd, "\n\t\t || soap_putheader(soap)");
+  fprintf(fd, "\n\t\t || soap_body_begin_out(soap)");
+  fprintf(fd, "\n\t\t || soap_put_%s(soap, &soap_tmp_%s, \"%s\", \"\")", method->sym->name,method->sym->name, ns_convert(method->sym->name)); 
+  fprintf(fd, "\n\t\t || soap_body_end_out(soap)");
+  fprintf(fd, "\n\t\t || soap_envelope_end_out(soap))");
+  fprintf(fd, "\n\t\t\t return soap->error;");
+  fprintf(fd, "\n\t}");
+  fprintf(fd, "\n\tif (soap_end_count(soap))\n\t\treturn soap->error;");
+  fprintf(fd, "\n\tif (soap_connect(soap, soap_endpoint, soap_action)");
+  fprintf(fd, "\n\t || soap_envelope_begin_out(soap)");
+  fprintf(fd, "\n\t || soap_putheader(soap)");
+  fprintf(fd, "\n\t || soap_body_begin_out(soap)");
+  fprintf(fd, "\n\t || soap_put_%s(soap, &soap_tmp_%s, \"%s\", \"\")", method->sym->name, method->sym->name, ns_convert(method->sym->name)); 
+  fprintf(fd, "\n\t || soap_body_end_out(soap)");
+  fprintf(fd, "\n\t || soap_envelope_end_out(soap)");
+  fprintf(fd, "\n\t || soap_end_send(soap))");
+  fprintf(fd, "\n\t\treturn soap_closesock(soap);");
+  if (is_transient(result->info.typ))
+  { fprintf(fd, "\n\treturn SOAP_OK;\n}");
+    if (name)
+      return;
+    fprintf(fheader, "\n\nSOAP_FMAC5 int SOAP_FMAC6 soap_recv_%s(struct soap *soap, ", method->sym->name);
+    fprintf(fd, "\n\nSOAP_FMAC5 int SOAP_FMAC6 soap_recv_%s(struct soap *soap, ", method->sym->name);
+    fprintf(fheader, "struct %s *%s);\n", method->sym->name, result->sym->name);
+    fprintf(fd, "struct %s *%s)\n{", method->sym->name, result->sym->name);
+    fprintf(fd, "\n\tsoap_default_%s(soap, %s);", method->sym->name, result->sym->name);
+    fprintf(fd, "\n\tsoap_begin(soap);");
+  }
+  else if (result->info.typ->type == Tarray)
+    fprintf(fd, "\n\tsoap_default_%s(soap, %s);", c_ident(result->info.typ), result->sym->name);
+  else if (result->info.typ->type == Treference && ((Tnode*)result->info.typ->ref)->type == Tclass && !is_external(result->info.typ->ref) && !is_volatile(result->info.typ->ref))
+    fprintf(fd, "\n\tif (!&%s)\n\t\treturn soap_closesock(soap);\n\t%s.soap_default(soap);", result->sym->name, result->sym->name);
+  else if (((Tnode*)result->info.typ->ref)->type == Tclass && !is_external(result->info.typ->ref) && !is_volatile(result->info.typ->ref))
+    fprintf(fd, "\n\tif (!%s)\n\t\treturn soap_closesock(soap);\n\t%s->soap_default(soap);", result->sym->name, result->sym->name);
+  else if (result->info.typ->type == Treference && ((Tnode*)result->info.typ->ref)->type == Tpointer)
+    fprintf(fd, "\n\t%s = NULL;", result->sym->name);
+  else if (((Tnode*)result->info.typ->ref)->type == Tpointer)
+    fprintf(fd, "\n\t*%s = NULL;", result->sym->name);
+  else if (result->info.typ->type == Treference)
+    fprintf(fd, "\n\tsoap_default_%s(soap, &%s);", c_ident((Tnode*)result->info.typ->ref), result->sym->name);
+  else if (!is_void(result->info.typ))
+    fprintf(fd, "\n\tsoap_default_%s(soap, %s);", c_ident((Tnode*)result->info.typ->ref), result->sym->name);
+  fprintf(fd,"\n\tif (soap_begin_recv(soap)");
+  fprintf(fd,"\n\t || soap_envelope_begin_in(soap)");
+  fprintf(fd,"\n\t || soap_recv_header(soap)");
+  fprintf(fd,"\n\t || soap_body_begin_in(soap))");
+  fprintf(fd,"\n\t\treturn soap_closesock(soap);");
+  if (is_transient(result->info.typ))
+  { fprintf(fd,"\n\tsoap_get_%s(soap, %s, \"%s\", NULL);", method->sym->name, result->sym->name, ns_convert(method->sym->name));
+    fprintf(fd,"\n\tif (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)\n\t\tsoap->error = SOAP_NO_METHOD;");
+    fprintf(fd,"\n\tif (soap->error");
+    fprintf(fd,"\n\t || soap_body_end_in(soap)");
+    fprintf(fd,"\n\t || soap_envelope_end_in(soap)");
+    fprintf(fd,"\n\t || soap_end_recv(soap))");
+    fprintf(fd,"\n\t\treturn soap_closesock(soap);");
+    fprintf(fd,"\n\treturn soap_closesock(soap);\n}");
+    fflush(fd);
+    return;
+  }
+  
+  if (has_ns_eq(NULL, result->sym->name))
+  { xtyp = xsi_type(result->info.typ);
+    xtag = ns_convert(result->sym->name);
+  }
+  else
+  { xtyp = "";
+    xtag = xml_tag(result->info.typ);
+  }
+  if (result->info.typ->type == Treference && ((Tnode *) result->info.typ->ref)->type == Tclass && !is_external(result->info.typ->ref) && !is_volatile(result->info.typ->ref) && !is_dynamic_array(result->info.typ->ref))
+    fprintf(fd,"\n\t%s.soap_get(soap, \"%s\", \"%s\");", result->sym->name, xtag, xtyp);
+  else if (result->info.typ->type == Tpointer && ((Tnode *) result->info.typ->ref)->type == Tclass && !is_external(result->info.typ->ref) && !is_volatile(result->info.typ->ref) && !is_dynamic_array(result->info.typ->ref))
+    fprintf(fd,"\n\t%s->soap_get(soap, \"%s\", \"%s\");", result->sym->name, xtag, xtyp);
+  else if (result->info.typ->type == Treference && ((Tnode *) result->info.typ->ref)->type == Tstruct && !is_external(result->info.typ->ref) && !is_volatile(result->info.typ->ref) && !is_dynamic_array(result->info.typ->ref))
+  { fprintf(fd,"\n\tsoap_get_%s(soap, &%s, \"%s\", \"%s\");", c_ident(result->info.typ->ref), result->sym->name, xtag, xtyp);
+  }
+  else if (result->info.typ->type == Tpointer && ((Tnode *) result->info.typ->ref)->type == Tstruct && !is_dynamic_array(result->info.typ->ref))
+  { 
+    fprintf(fd,"\n\tsoap_get_%s(soap, %s, \"%s\", \"%s\");", c_ident(result->info.typ->ref), result->sym->name, xtag, xtyp);
+  }
+  else if (result->info.typ->type == Tpointer && is_XML(result->info.typ->ref) && is_string(result->info.typ->ref))
+  { fprintf(fd,"\n\tsoap_inliteral(soap, NULL, %s);", result->sym->name);
+  }
+  else if (result->info.typ->type == Treference && is_XML(result->info.typ->ref) && is_string(result->info.typ->ref))
+  { fprintf(fd,"\n\tsoap_inliteral(soap, NULL, &%s);", result->sym->name);
+  }
+  else if (result->info.typ->type == Tpointer && is_XML(result->info.typ->ref) && is_wstring(result->info.typ->ref))
+  { fprintf(fd,"\n\tsoap_inwliteral(soap, NULL, %s);", result->sym->name);
+  }
+  else if (result->info.typ->type == Treference && is_XML(result->info.typ->ref) && is_wstring(result->info.typ->ref))
+  { fprintf(fd,"\n\tsoap_inwliteral(soap, NULL, &%s);", result->sym->name);
+  }
+  /* Note: the trouble with "" tags is that SOAP-ENV:Fault cannot be parsed. However, SOAP encoding does not care about the result struct name!
+  else if (response && !is_literal(method_response_encoding))
+  { fprintf(fd,"\n\tsoap_tmp_%s = soap_get_%s(soap, NULL, \"\", \"\");", c_ident(response->info.typ), c_ident(response->info.typ));
+  }
+  */
+  else if (response)
+  { fprintf(fd,"\n\tsoap_tmp_%s = soap_get_%s(soap, NULL, \"%s\", \"\");", c_ident(response->info.typ), c_ident(response->info.typ), xml_tag(response->info.typ));
+  }
+  else if (result->info.typ->type == Treference)
+  { fprintf(fd,"\n\tsoap_get_%s(soap, &%s, \"%s\", \"%s\");", c_ident(result->info.typ), result->sym->name, xtag, xtyp);
+  }
+  else
+  { fprintf(fd,"\n\tsoap_get_%s(soap, %s, \"%s\", \"%s\");", c_ident(result->info.typ), result->sym->name, xtag, xtyp);
+  }
+  fflush(fd);
+  fprintf(fd,"\n\tif (soap->error)");
+  fprintf(fd,"\n\t{\tif (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)\n\t\t\treturn soap_recv_fault(soap);");
+  fprintf(fd,"\n\t\treturn soap_closesock(soap);");
+  fprintf(fd,"\n\t}");
+  fprintf(fd,"\n\tif (soap_body_end_in(soap)");
+  fprintf(fd,"\n\t || soap_envelope_end_in(soap)");
+  fprintf(fd,"\n\t || soap_end_recv(soap))");
+  fprintf(fd,"\n\t\treturn soap_closesock(soap);");
+  if (!is_response(result->info.typ) && response)
+  { if (result->info.typ->type == Tarray)
+      fprintf(fd,"\n\tmemcpy(%s, soap_tmp_%s->%s", result->sym->name, c_ident(response->info.typ), result->sym->name, c_type(result->info.typ));
+    else if (result->info.typ->type == Treference)
+      fprintf(fd,"\n\t%s = soap_tmp_%s->%s;", result->sym->name, c_ident(response->info.typ), result->sym->name);
+    else if (!is_external(result->info.typ->ref))
+    { fprintf(fd,"\n\tif (%s && soap_tmp_%s->%s)", result->sym->name, c_ident(response->info.typ), result->sym->name);
+      fprintf(fd,"\n\t\t*%s = *soap_tmp_%s->%s;", result->sym->name, c_ident(response->info.typ), result->sym->name);
+    }
+  }
+  fprintf(fd,"\n\treturn soap_closesock(soap);");
+  fprintf(fd ,"\n}");
+  fflush(fd);
+}
+
+void
+gen_serve_method(FILE *fd, Table *table, Entry *param, char *name)
+{ Service *sp = NULL;
+  char *style, *encoding;
+  Entry *q,*pin, *pout, *response;
+  Table *t, *input;
+  char *xtag;
+  Method *m;
+  char *s, *method_style = NULL, *method_encoding = NULL, *method_response_encoding = NULL;
+  q = entry(table, param->sym);
+  if (!q)
+    execerror("no table entry");
+  pout = (Entry*)q->info.typ->ref;
+  if (!is_response(pout->info.typ))
+    response = get_response(param->info.typ);
+  if (name)
+    fprintf(fd, "\n\nstatic int serve_%s(%s *soap)", param->sym->name, name);
+  else
+  { fprintf(fheader, "\n\nSOAP_FMAC5 int SOAP_FMAC6 soap_serve_%s(struct soap*);",param->sym->name);
+    fprintf(fd, "\n\nSOAP_FMAC5 int SOAP_FMAC6 soap_serve_%s(struct soap *soap)",param->sym->name);
+  }
+  fprintf(fd, "\n{\tstruct %s soap_tmp_%s;", param->sym->name, param->sym->name);
+  for (sp = services; sp; sp = sp->next)
+    if (has_ns_eq(sp->ns, param->sym->name))
+    { style = sp->style;
+      encoding = sp->encoding;
+      method_style = style;
+      method_encoding = encoding;
+      method_response_encoding = NULL;
+      for (m = sp->list; m; m = m->next)
+	if (is_eq_nons(m->name, param->sym->name))
+	  if (m->mess == ENCODING)
+	    method_encoding = m->part;
+	  else if (m->mess == RESPONSE_ENCODING)
+	    method_response_encoding = m->part;
+	  else if (m->mess == STYLE)
+	    method_style = m->part;
+      break;
+    }
+  if (!method_response_encoding)
+    method_response_encoding = method_encoding;
+  fflush(fd);
+  if (!is_transient(pout->info.typ))
+  { if (pout->info.typ->type == Tarray)
+    { fprintf(fd,"\n\tstruct %s soap_tmp_%s;", c_ident(response->info.typ), c_ident(response->info.typ));
+      fprintf(fd,"\n\tsoap_default_%s(soap, &soap_tmp_%s);", c_ident(response->info.typ), c_ident(response->info.typ));
+    }
+    else if (((Tnode *)pout->info.typ->ref)->type == Tclass && !is_stdstring(pout->info.typ->ref) && !is_stdwstring(pout->info.typ->ref) && (is_external(pout->info.typ->ref) || is_volatile(pout->info.typ->ref) || is_typedef(pout->info.typ->ref)) && !is_dynamic_array(pout->info.typ->ref))
+    { fprintf(fd, "\n\t%s;", c_type_id((Tnode*)pout->info.typ->ref, pout->sym->name));
+      fprintf(fd,"\n\tsoap_default_%s(soap, &%s);", c_ident((Tnode*)pout->info.typ->ref), pout->sym->name);  
+    }
+    else if (((Tnode *)pout->info.typ->ref)->type == Tclass && !is_stdstring(pout->info.typ->ref) && !is_stdwstring(pout->info.typ->ref) && !is_dynamic_array(pout->info.typ->ref))
+    { fprintf(fd, "\n\t%s;", c_type_id((Tnode*)pout->info.typ->ref, pout->sym->name));
+      fprintf(fd,"\n\t%s.soap_default(soap);", pout->sym->name);
+    }
+    else if (((Tnode *)pout->info.typ->ref)->type == Tstruct && !is_dynamic_array(pout->info.typ->ref))
+    { fprintf(fd, "\n\t%s;", c_type_id((Tnode*)pout->info.typ->ref, pout->sym->name));
+      fprintf(fd,"\n\tsoap_default_%s(soap, &%s);", c_ident((Tnode *)pout->info.typ->ref), pout->sym->name);  
+    }
+    else if (pout->info.typ->type == Tpointer && !is_stdstring(pout->info.typ) && !is_stdwstring(pout->info.typ) && response)
+    { fprintf(fd,"\n\tstruct %s soap_tmp_%s;", c_ident(response->info.typ), c_ident(response->info.typ));
+      fprintf(fd,"\n\t%s soap_tmp_%s;", c_type(pout->info.typ->ref), c_ident(pout->info.typ->ref));
+      fprintf(fd,"\n\tsoap_default_%s(soap, &soap_tmp_%s);", c_ident(response->info.typ), c_ident(response->info.typ));
+      if (((Tnode*)pout->info.typ->ref)->type == Tclass && !is_external(pout->info.typ->ref) && !is_volatile(pout->info.typ->ref) && !is_typedef(pout->info.typ->ref))
+        fprintf(fd,"\n\tsoap_tmp_%s.soap_default(soap);", c_ident(pout->info.typ->ref));
+      else if (((Tnode*)pout->info.typ->ref)->type == Tpointer)
+        fprintf(fd,"\n\tsoap_tmp_%s = NULL;", c_ident(pout->info.typ->ref));
+      else
+        fprintf(fd,"\n\tsoap_default_%s(soap, &soap_tmp_%s);", c_ident(pout->info.typ->ref), c_ident(pout->info.typ->ref));
+      fprintf(fd,"\n\tsoap_tmp_%s.%s = &soap_tmp_%s;", c_ident(response->info.typ),pout->sym->name, c_ident(pout->info.typ->ref));
+    }
+    else if (response)
+    { fprintf(fd,"\n\tstruct %s soap_tmp_%s;", c_ident(response->info.typ), c_ident(response->info.typ));
+      fprintf(fd,"\n\tsoap_default_%s(soap, &soap_tmp_%s);", c_ident(response->info.typ), c_ident(response->info.typ));
+    }
+    else
+    { fprintf(fd,"\n\t%s soap_tmp_%s;", c_type(pout->info.typ->ref), c_ident(pout->info.typ->ref));
+      if (is_string(pout->info.typ->ref) || is_wstring(pout->info.typ->ref))
+        fprintf(fd,"\n\tsoap_tmp_%s = NULL;", c_ident(pout->info.typ->ref));
+      else
+        fprintf(fd,"\n\tsoap_default_%s(soap, &soap_tmp_%s);", c_ident(pout->info.typ->ref), c_ident(pout->info.typ->ref));
+    }
+  }
+  fprintf(fd,"\n\tsoap_default_%s(soap, &soap_tmp_%s);", param->sym->name, param->sym->name);
+  fflush(fd);
+  if (sp && sp->URI && method_response_encoding)
+  {     if (is_literal(method_response_encoding))
+          fprintf(fd, "\n\tsoap->encodingStyle = NULL;");
+        else if (sp->encoding)
+          fprintf(fd, "\n\tsoap->encodingStyle = \"%s\";", sp->encoding);
+	else if (method_response_encoding)
+	  fprintf(fd, "\n\tsoap->encodingStyle = \"%s\";", method_response_encoding);
+        else if (!eflag)
+          fprintf(fd, "\n\tsoap->encodingStyle = NULL;");
+  }
+  else if (!eflag)
+    fprintf(fd, "\n\tsoap->encodingStyle = NULL;");
+  fprintf(fd,"\n\tif (!soap_get_%s(soap, &soap_tmp_%s, \"%s\", NULL))", param->sym->name, param->sym->name, ns_convert(param->sym->name));
+  fprintf(fd,"\n\t\treturn soap->error;");
+  fprintf(fd,"\n\tif (soap_body_end_in(soap)");
+  fprintf(fd,"\n\t || soap_envelope_end_in(soap)");
+  fprintf(fd,"\n\t || soap_end_recv(soap))\n\t\treturn soap->error;");
+  if (name)
+    fprintf(fd, "\n\tsoap->error = soap->%s(", ns_cname(param->sym->name, NULL));
+  else
+    fprintf(fd, "\n\tsoap->error = %s(soap", param->sym->name);
+  fflush(fd);
+  q=entry(classtable, param->sym);
+  input=(Table*) q->info.typ->ref;
+  for (pin = input->list; pin; pin = pin->next)
+    fprintf(fd, "%ssoap_tmp_%s.%s", !name || pin != input->list ? ", " : "", param->sym->name, pin->sym->name);
+  if (is_transient(pout->info.typ))
+    fprintf(fd, ");");
+  else
+  { if (!name || input->list)
+      fprintf(fd, ", ");
+    if (pout->info.typ->type == Tarray)
+      fprintf(fd, "soap_tmp_%s.%s);", c_ident(response->info.typ), pout->sym->name);
+    else if (pout->info.typ->type == Treference && (((Tnode*)pout->info.typ->ref)->type == Tstruct || ((Tnode*)pout->info.typ->ref)->type == Tclass) && !is_stdstring(pout->info.typ->ref) && !is_stdwstring(pout->info.typ->ref) && !is_dynamic_array(pout->info.typ->ref))
+      fprintf(fd, "%s);", pout->sym->name);
+    else if ((((Tnode*)pout->info.typ->ref)->type == Tstruct || ((Tnode*)pout->info.typ->ref)->type == Tclass) && !is_stdstring(pout->info.typ->ref) && !is_stdwstring(pout->info.typ->ref) && !is_dynamic_array(pout->info.typ->ref))
+      fprintf(fd, "&%s);", pout->sym->name);
+    else if(pout->info.typ->type == Treference && response)
+      fprintf(fd, "soap_tmp_%s.%s);", c_ident(response->info.typ), pout->sym->name);
+    else if(pout->info.typ->type == Treference)
+      fprintf(fd, "soap_tmp_%s);", c_ident(pout->info.typ->ref));
+    else
+      fprintf(fd, "&soap_tmp_%s);", c_ident(pout->info.typ->ref));
+  }
+  fprintf(fd,"\n\tif (soap->error)\n\t\treturn soap->error;");
+  
+  if (!is_transient(pout->info.typ))
+  { fprintf(fd,"\n\tsoap_serializeheader(soap);");
+    if (pout->info.typ->type == Tarray)
+      fprintf(fd, "\n\tsoap_serialize_%s(soap, &soap_tmp_%s);", c_ident(response->info.typ), c_ident(response->info.typ));
+    else if (((Tnode *)pout->info.typ->ref)->type == Tclass && !is_stdstring(pout->info.typ->ref) && !is_stdwstring(pout->info.typ->ref) && (is_external(pout->info.typ->ref) || is_volatile(pout->info.typ->ref) || is_typedef(pout->info.typ->ref)) && !is_dynamic_array(pout->info.typ->ref))
+      fprintf(fd, "\n\tsoap_serialize_%s(soap, &%s);", c_ident((Tnode*)pout->info.typ->ref), pout->sym->name);
+    else if(((Tnode *)pout->info.typ->ref)->type == Tclass && !is_stdstring(pout->info.typ->ref) && !is_stdwstring(pout->info.typ->ref) && !is_dynamic_array(pout->info.typ->ref))
+      fprintf(fd, "\n\t%s.soap_serialize(soap);", pout->sym->name);
+    else if(((Tnode *)pout->info.typ->ref)->type == Tstruct && !is_dynamic_array(pout->info.typ->ref))
+      fprintf(fd, "\n\tsoap_serialize_%s(soap, &%s);", c_ident((Tnode*)pout->info.typ->ref), pout->sym->name);
+    else if (response)
+      fprintf(fd, "\n\tsoap_serialize_%s(soap, &soap_tmp_%s);", c_ident(response->info.typ), c_ident(response->info.typ));
+    else if (!is_XML(pout->info.typ->ref))
+      fprintf(fd, "\n\tsoap_serialize_%s(soap, &soap_tmp_%s);", c_ident(pout->info.typ->ref), c_ident(pout->info.typ->ref));
+    if (has_ns_eq(NULL, pout->sym->name))
+      xtag = ns_convert(pout->sym->name);
+    else
+      xtag = xml_tag(pout->info.typ);
+    fprintf(fd, "\n\tif (soap_begin_count(soap))\n\t\treturn soap->error;");
+    fprintf(fd, "\n\tif (soap->mode & SOAP_IO_LENGTH)");
+    fprintf(fd, "\n\t{\tif (soap_envelope_begin_out(soap)");
+    fprintf(fd,"\n\t\t || soap_putheader(soap)");
+    fprintf(fd,"\n\t\t || soap_body_begin_out(soap)");
+    if (pout->info.typ->type == Tarray)
+      fprintf(fd,"\n\t\t || soap_put_%s(soap, &soap_tmp_%s.%s, \"%s\", \"\")", c_ident(response->info.typ), c_ident(response->info.typ), pout->sym->name, xtag);
+    else if (((Tnode*)pout->info.typ->ref)->type == Tclass && !is_stdstring(pout->info.typ->ref) && !is_stdwstring(pout->info.typ->ref) && (is_external(pout->info.typ->ref) || is_volatile(pout->info.typ->ref) || is_typedef(pout->info.typ->ref)) && !is_dynamic_array(pout->info.typ->ref))
+      fprintf(fd, "\n\t\t || soap_put_%s(soap, &%s, \"%s\", \"\")", c_ident((Tnode*)pout->info.typ->ref), pout->sym->name, ns_convert(pout->sym->name));
+    else if (((Tnode*)pout->info.typ->ref)->type == Tclass && !is_stdstring(pout->info.typ->ref) && !is_stdwstring(pout->info.typ->ref) && !is_dynamic_array(pout->info.typ->ref))
+      fprintf(fd, "\n\t\t || %s.soap_put(soap, \"%s\", \"\")", pout->sym->name, xtag);
+    else if (((Tnode*)pout->info.typ->ref)->type == Tstruct && !is_dynamic_array(pout->info.typ->ref))
+      fprintf(fd, "\n\t\t || soap_put_%s(soap, &%s, \"%s\", \"\")", c_ident((Tnode*)pout->info.typ->ref), pout->sym->name, xtag);
+    else if (response)
+      fprintf(fd,"\n\t\t || soap_put_%s(soap, &soap_tmp_%s, \"%s\", \"\")", c_ident(response->info.typ), c_ident(response->info.typ), xml_tag(response->info.typ));
+    else if (is_XML(pout->info.typ->ref) && is_string(pout->info.typ->ref))
+      fprintf(fd,"\n\t\t || soap_outliteral(soap, \"%s\", &soap_tmp_%s)", ns_convert(pout->sym->name), c_ident(pout->info.typ->ref));
+    else if (is_XML(pout->info.typ->ref) && is_wstring(pout->info.typ->ref))
+      fprintf(fd,"\n\t\t || soap_outwliteral(soap, \"%s\", &soap_tmp_%s)", ns_convert(pout->sym->name), c_ident(pout->info.typ->ref));
+    else
+      fprintf(fd,"\n\t\t || soap_put_%s(soap, &soap_tmp_%s, \"%s\", \"\")", c_ident(pout->info.typ), c_ident(pout->info.typ->ref), ns_convert(pout->sym->name));
+    fprintf(fd,"\n\t\t || soap_body_end_out(soap)");
+    fprintf(fd,"\n\t\t || soap_envelope_end_out(soap))");
+    fprintf(fd,"\n\t\t\t return soap->error;");
+    fprintf(fd,"\n\t};");
+    fprintf(fd,"\n\tif (soap_end_count(soap)");
+    fprintf(fd,"\n\t || soap_response(soap, SOAP_OK)");
+    fprintf(fd,"\n\t || soap_envelope_begin_out(soap)");
+    fprintf(fd,"\n\t || soap_putheader(soap)");
+    fprintf(fd,"\n\t || soap_body_begin_out(soap)");
+    if (pout->info.typ->type == Tarray)
+      fprintf(fd,"\n\t || soap_put_%s(soap, &soap_tmp_%s.%s, \"%s\", \"\")", c_ident(response->info.typ), c_ident(response->info.typ), pout->sym->name, xtag);
+    else if (((Tnode *)pout->info.typ->ref)->type == Tclass && !is_stdstring(pout->info.typ->ref) && !is_stdwstring(pout->info.typ->ref) && (is_external(pout->info.typ->ref) || is_volatile(pout->info.typ->ref) || is_typedef(pout->info.typ->ref)) && !is_dynamic_array(pout->info.typ->ref))
+      fprintf(fd, "\n\t || soap_put_%s(soap, &%s, \"%s\", \"\")", c_ident((Tnode*)pout->info.typ->ref), pout->sym->name, ns_convert(pout->sym->name));
+    else if(((Tnode *)pout->info.typ->ref)->type == Tclass && !is_stdstring(pout->info.typ->ref) && !is_stdwstring(pout->info.typ->ref) && !is_dynamic_array(pout->info.typ->ref))
+      fprintf(fd, "\n\t || %s.soap_put(soap, \"%s\", \"\")", pout->sym->name, xtag);
+    else if(((Tnode *)pout->info.typ->ref)->type == Tstruct && !is_dynamic_array(pout->info.typ->ref))
+      fprintf(fd, "\n\t || soap_put_%s(soap, &%s, \"%s\", \"\")", c_ident((Tnode*)pout->info.typ->ref), pout->sym->name, xtag);
+    else if (response)
+      fprintf(fd,"\n\t || soap_put_%s(soap, &soap_tmp_%s, \"%s\", \"\")", c_ident(response->info.typ), c_ident(response->info.typ), xml_tag(response->info.typ));
+    else if (is_XML(pout->info.typ->ref) && is_string(pout->info.typ->ref))
+      fprintf(fd,"\n\t || soap_outliteral(soap, \"%s\", &soap_tmp_%s)", ns_convert(pout->sym->name), c_ident(pout->info.typ->ref));
+    else if (is_XML(pout->info.typ->ref) && is_wstring(pout->info.typ->ref))
+      fprintf(fd,"\n\t || soap_outwliteral(soap, \"%s\", &soap_tmp_%s)", ns_convert(pout->sym->name), c_ident(pout->info.typ->ref));
+    else
+      fprintf(fd,"\n\t || soap_put_%s(soap, &soap_tmp_%s, \"%s\", \"\")", c_ident(pout->info.typ), c_ident(pout->info.typ->ref), ns_convert(pout->sym->name));
+    fprintf(fd,"\n\t || soap_body_end_out(soap)");
+    fprintf(fd,"\n\t || soap_envelope_end_out(soap)");
+    fprintf(fd,"\n\t || soap_end_send(soap))");
+    fprintf(fd, "\n\t\treturn soap->error;");
+  }
+  fprintf(fd,"\n\treturn soap_closesock(soap);");
+  fprintf(fd,"\n}");
+  fflush(fd);
+}
+
+void
+gen_object_code(FILE *fd, Table *table, Symbol *ns, char *name, char *URL, char *executable, char *URI, char *encoding)
+{ Entry *method, *catch_method;
+  fprintf(fd, "\n\n#include \"%s%s.h\"", prefix, name);
+  if (namespaceid)
+    fprintf(fd,"\n\nnamespace %s {", namespaceid);
+  fprintf(fd, "\n\n%s::%s()\n{\t%s_init(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT);\n}", name, name, name);
+  fprintf(fd, "\n\n%s::%s(soap_mode iomode)\n{\t%s_init(iomode, iomode);\n}", name, name, name);
+  fprintf(fd, "\n\n%s::%s(soap_mode imode, soap_mode omode)\n{\t%s_init(imode, omode);\n}", name, name, name);
+  fprintf(fd, "\n\nvoid %s::%s_init(soap_mode imode, soap_mode omode)\n{\tstatic const struct Namespace namespaces[] =\n", name, name);
+  gen_nsmap(fd, ns, URI);
+  fprintf(fd, "\tsoap_init2(this, imode, omode);");
+  if (nflag)
+    fprintf(fd, "\n\tthis->namespaces = namespaces;\n};");
+  else
+    fprintf(fd, "\n\tif (!this->namespaces)\n\t\tthis->namespaces = namespaces;\n};");
+  fprintf(fd, "\n\n%s::~%s()\n{\tsoap_destroy(this);\n\tsoap_end(this);\n\tsoap_done(this);\n};", name, name);
+  fprintf(fd, "\n\nint %s::serve()", name);
+  fprintf(fd, "\n{\t\n#ifndef WITH_FASTCGI\n\tunsigned int k = this->max_keep_alive;\n#endif\n\tdo\n\t{\tsoap_begin(this);");
+  fprintf(fd,"\n#ifdef WITH_FASTCGI\n\t\tif (FCGI_Accept() < 0)\n\t\t{\n\t\t\tthis->error = SOAP_EOF;\n\t\t\treturn soap_send_fault(this);\n\t\t}\n#endif"
+);
+  fprintf(fd,"\n\n\t\tsoap_begin(this);");
+
+  fprintf(fd,"\n\n#ifndef WITH_FASTCGI\n\t\tif (!--k)\n\t\t\tthis->keep_alive = 0;\n#endif");
+  fprintf(fd,"\n\n\t\tif (soap_begin_recv(this))\n\t\t{\tif (this->error < SOAP_STOP)\n\t\t\t{\n#ifdef WITH_FASTCGI\n\t\t\t\tsoap_send_fault(this);\n#else \n\t\t\t\treturn soap_send_fault(this);\n#endif\n\t\t\t}\n\t\t\tsoap_closesock(this);\n\n\t\t\tcontinue;\n\t\t}");
+  fprintf(fd,"\n\n\t\tif (soap_envelope_begin_in(this)\n\t\t || soap_recv_header(this)\n\t\t || soap_body_begin_in(this)\n\t\t || dispatch() || (this->fserveloop && this->fserveloop(this)))\n\t\t{\n#ifdef WITH_FASTCGI\n\t\t\tsoap_send_fault(this);\n#else\n\t\t\treturn soap_send_fault(this);\n#endif\n\t\t}", nflag?prefix:"soap");
+  fprintf(fd,"\n\n#ifdef WITH_FASTCGI\n\t} while (1);\n#else\n\t} while (this->keep_alive);\n#endif");
+
+  fprintf(fd, "\n\treturn SOAP_OK;");
+  fprintf(fd, "\n}\n");
+  for (method = table->list; method; method = method->next)
+    if (method->info.typ->type == Tfun && !(method->info.sto & Sextern))
+      fprintf(fd, "\nstatic int serve_%s(%s*);", method->sym->name, name);
+  fprintf(fd, "\n\nint %s::dispatch()", name);
+  fprintf(fd, "\n{\tif (soap_peek_element(this))\n\t\treturn this->error;");
+  catch_method = NULL;
+  for (method = table->list; method; method = method->next)
+  { char *action = NULL;
+    if (method->info.typ->type == Tfun && !(method->info.sto & Sextern))
+    { if (aflag)
+      { Service *sp;
+        for (sp = services; sp; sp = sp->next)
+        { if (has_ns_eq(sp->ns, method->sym->name))
+	  { Method *m;
+	    for (m = sp->list; m; m = m->next)
+	    { if (is_eq_nons(m->name, method->sym->name))
+	      { if (m->mess == ACTION)
+	          action = m->part;
+	      }
+	    }
+  	  }
+        }
+      }
+      if (is_invisible(method->sym->name))
+      { Entry *param = entry(classtable, method->sym);
+        if (param)
+        { param = ((Table*)param->info.typ->ref)->list;
+          if (param)
+          { fprintf(fd, "\n\tif (!soap_match_tag(this, this->tag, \"%s\")", ns_convert(param->sym->name));
+	    if (action)
+              if (*action == '"')
+	        fprintf(fd, " && (!soap->action || !strcmp(soap->action, %s))", action);
+              else
+	        fprintf(fd, " && (!soap->action || !strcmp(soap->action, \"%s\"))", action);
+            fprintf(fd, ")\n\t\treturn serve_%s(this);", method->sym->name);
+          }
+        }
+	else
+	  catch_method = method;
+      }
+      else
+      { fprintf(fd, "\n\tif (!soap_match_tag(this, this->tag, \"%s\")", ns_convert(method->sym->name));
+	if (action)
+          if (*action == '"')
+	    fprintf(fd, " && (!soap->action || !strcmp(soap->action, %s))", action);
+          else
+	    fprintf(fd, " && (!soap->action || !strcmp(soap->action, \"%s\"))", action);
+        fprintf(fd, ")\n\t\treturn serve_%s(this);", method->sym->name);
+      }
+    }
+  }
+  if (catch_method)
+    fprintf(fd, "\n\treturn serve_%s(this);", catch_method->sym->name);
+  else
+    fprintf(fd, "\n\treturn this->error = SOAP_NO_METHOD;\n}");
+  for (method = table->list; method; method = method->next)
+    if (method->info.typ->type == Tfun && !(method->info.sto & Sextern) && !is_imported(method->info.typ))
+      gen_serve_method(fd, table, method, name);
+  if (namespaceid)
+    fprintf(fd,"\n\n} // namespace %s\n", namespaceid);
+}
+
+void
+gen_response_begin(FILE *fd, int n, char *s)
+{ if (!is_invisible(s))
+    fprintf(fd, "%*s<%sResponse>\n", n, "", s);
+}
+
+void
+gen_response_end(FILE *fd, int n, char *s)
+{ if (!is_invisible(s))
+    fprintf(fd, "%*s</%sResponse>\n", n, "", s);
+}
+
+void
+gen_element_begin(FILE *fd, int n, char *s, char *t)
+{ if (!is_invisible(s))
+  { if (tflag && t && *t)
+      fprintf(fd, "%*s<%s xsi:type=\"%s\"", n, "", s, t);
+    else
+      fprintf(fd, "%*s<%s", n, "", s);
+  }
+}
+
+void
+gen_element_end(FILE *fd, int n, char *s)
+{ if (!is_invisible(s))
+    fprintf(fd, "%*s</%s>\n", n, "", s);
+  else
+    fprintf(fd, "\n");
+}
+
+void
+gen_data(char *buf, Table *t, char *ns, char *name, char *URL, char *executable, char *URI, char *encoding)
+{ Entry *p, *q, *r;
+  FILE *fd;
+  char *method_encoding = NULL;
+  char *method_response_encoding = NULL;
+  if (t)
+  { for (p = t->list; p; p = p->next)
+      if (p->info.typ->type == Tfun && !(p->info.sto & Sextern) && has_ns_eq(ns, p->sym->name))
+      { Service *sp;
+        Method *m;
+	char *nse = ns_qualifiedElement(p->info.typ);
+	char *nsa = ns_qualifiedAttribute(p->info.typ);
+        method_encoding = encoding;
+	method_response_encoding = NULL;
+	for (sp = services; sp; sp = sp->next)
+	  if (!strcmp(sp->ns, ns))
+	    for (m = sp->list; m; m = m->next)
+	      if (is_eq_nons(m->name, p->sym->name))
+                if (m->mess == ENCODING)
+	          method_encoding = m->part;
+                else if (m->mess == RESPONSE_ENCODING)
+	          method_response_encoding = m->part;
+	if (!method_response_encoding)
+	  method_response_encoding = method_encoding;
+	/* request */
+        fd = gen_env(buf, ns_remove(p->sym->name), 0, t, ns, name, URL, executable, URI, method_encoding);
+	if (!fd)
+	  return;
+  	q = entry(classtable, p->sym);
+	gen_element_begin(fd, 2, ns_convert(p->sym->name), NULL);
+  	if (q)
+	{ if (!is_invisible(p->sym->name))
+	  { gen_atts(fd, q->info.typ->ref, nsa);
+            fprintf(fd, "\n");
+	  }
+	  for (q = ((Table*)q->info.typ->ref)->list; q; q = q->next)
+	    gen_field(fd, 3, q, nse, nsa, method_encoding);
+	}
+        gen_element_end(fd, 2, ns_convert(p->sym->name));
+        fprintf(fd, " </SOAP-ENV:Body>\n</SOAP-ENV:Envelope>\n");
+        fclose(fd);
+	/* response */
+	q = (Entry*)p->info.typ->ref;
+	if (q && !is_transient(q->info.typ))
+        { fd = gen_env(buf, ns_remove(p->sym->name), 1, t, ns, name, URL, executable, URI, method_response_encoding);
+	  if (!fd)
+	    return;
+	  if (q && !is_response(q->info.typ))
+	    if (is_XML(q->info.typ->ref))
+	    { gen_response_begin(fd, 2, ns_convert(p->sym->name));
+	      gen_response_end(fd, 2, ns_convert(p->sym->name));
+	    }
+	    else
+	    { gen_response_begin(fd, 2, ns_convert(p->sym->name));
+	      gen_field(fd, 3, q, nse, nsa, method_response_encoding);
+	      gen_response_end(fd, 2, ns_convert(p->sym->name));
+	    }
+          else if (q && q->info.typ->ref && ((Tnode*)q->info.typ->ref)->ref)
+          { char *xtag;
+	    nse = ns_qualifiedElement(q->info.typ->ref);
+	    nsa = ns_qualifiedAttribute(q->info.typ->ref);
+	    if (has_ns_eq(NULL, q->sym->name))
+              xtag = q->sym->name;
+            else
+              xtag = ((Tnode*)q->info.typ->ref)->id->name;
+	    gen_element_begin(fd, 2, ns_add(xtag, nse), NULL);
+	    if (!is_invisible(xtag))
+	    { gen_atts(fd, ((Tnode*)q->info.typ->ref)->ref, nsa);
+              fprintf(fd, "\n");
+	    }
+	    for (r = ((Table*)((Tnode*)q->info.typ->ref)->ref)->list; r; r = r->next)
+	      gen_field(fd, 3, r, nse, nsa, method_response_encoding);
+	    gen_element_end(fd, 2, ns_add(xtag, nse));
+	  }
+          fflush(fd);
+          fprintf(fd, " </SOAP-ENV:Body>\n</SOAP-ENV:Envelope>\n");
+          fclose(fd);
+	}
+      }
+  }
+}
+
+void
+gen_field(FILE *fd, int n, Entry *p, char *nse, char *nsa, char *encoding)
+{ Entry *q;
+  char *s, tmp[32];
+  int i, d;
+  if (!(p->info.sto & Sattribute) && !is_transient(p->info.typ) && p->info.typ->type != Tfun && strncmp(p->sym->name, "__size", 6) && strncmp(p->sym->name, "__type", 6) && strncmp(p->sym->name, "__union", 7))
+  { if (is_soap12() && (p->info.sto & Sreturn) && !is_literal(encoding))
+      fprintf(fd, "%*s<SOAP-RPC:result xmlns:SOAP-RPC=\"%s\">%s</SOAP-RPC:result>\n", n, "", rpcURI, ns_convert(p->sym->name));
+    if (is_XML(p->info.typ))
+    { gen_element_begin(fd, n, ns_add(p->sym->name, nse), NULL);
+      fprintf(fd, ">");
+      gen_element_end(fd, n, ns_add(p->sym->name, nse));
+    }
+    else
+    { if (!is_string(p->info.typ) && n >= 10 && (p->info.typ->type == Tpointer || p->info.typ->type == Treference))
+      { if (!is_invisible(p->sym->name))
+        { gen_element_begin(fd, n, ns_add(p->sym->name, nse), NULL);
+          fprintf(fd, " xsi:nil=\"true\">");
+        }
+      }
+      else if (p->info.typ->type == Tarray)
+      { i = ((Tnode*) p->info.typ->ref)->width;
+        if (i)
+        { i = p->info.typ->width / i;
+          if (i > 100)
+            i = 100;
+	}
+	gen_element_begin(fd, n, ns_add(p->sym->name, nse), "SOAP-ENC:Array");
+	fprintf(fd, " SOAP-ENC:arrayType=\"%s[%d]\">", xsi_type_Tarray(p->info.typ), i);
+        fflush(fd);
+	gen_val(fd, n, p->info.typ, nse, nsa, encoding);
+      }
+      else if (is_dynamic_array(p->info.typ) && !is_binary(p->info.typ))
+      { if (has_ns(p->info.typ) || is_untyped(p->info.typ))
+        { gen_element_begin(fd, n, ns_add(p->sym->name, nse), xsi_type(p->info.typ));
+          fprintf(fd, ">");
+	}
+        else
+	{ d = get_Darraydims(p->info.typ);
+	  if (d)
+	  { for (i = 0; i < d-1; i++)
+	    { tmp[2*i] = ',';
+	      tmp[2*i+1] = '1';
+	    }
+	    tmp[2*d-2] = '\0';
+	  }
+	  else
+	    *tmp = '\0';
+	  gen_element_begin(fd, n, ns_add(p->sym->name, nse), "SOAP-ENC:Array");
+	  if (((Table*)p->info.typ->ref)->list->info.minOccurs > 1)
+	    fprintf(fd, " SOAP-ENC:arrayType=\"%s[%ld%s]\">", wsdl_type(((Table*)p->info.typ->ref)->list->info.typ, ""), ((Table*)p->info.typ->ref)->list->info.minOccurs, tmp);
+	  else
+	    fprintf(fd, " SOAP-ENC:arrayType=\"%s[1%s]\">", wsdl_type(((Table*)p->info.typ->ref)->list->info.typ, ""), tmp);
+	}
+        fflush(fd);
+        gen_val(fd, n, p->info.typ, nse, nsa, encoding);
+      }
+      else if ((p->info.typ->type == Tpointer || p->info.typ->type == Treference) && is_dynamic_array(p->info.typ->ref) && !is_binary(p->info.typ->ref))
+      { if (has_ns(p->info.typ->ref) || is_untyped(p->info.typ->ref))
+        { gen_element_begin(fd, n, ns_add(p->sym->name, nse), xsi_type(p->info.typ->ref));
+	  fprintf(fd, ">");
+	}
+        else
+	{ d = get_Darraydims(p->info.typ->ref);
+	  if (d)
+	  { for (i = 0; i < d-1; i++)
+	    { tmp[2*i] = ',';
+	      tmp[2*i+1] = '1';
+	    }
+	    tmp[2*d-2] = '\0';
+	  }
+	  else
+	    *tmp = '\0';
+	  gen_element_begin(fd, n, ns_add(p->sym->name, nse), "SOAP-ENC:Array");
+	  if ((((Tnode*)p->info.typ->ref)->type == Tstruct || ((Tnode*)p->info.typ->ref)->type == Tclass) && ((Table*)((Tnode*)p->info.typ->ref)->ref)->list->info.minOccurs > 1)
+	    fprintf(fd, " SOAP-ENC:arrayType=\"%s[%ld%s]\">", wsdl_type(((Table*)((Tnode*)p->info.typ->ref)->ref)->list->info.typ, ""), ((Table*)((Tnode*)p->info.typ->ref)->ref)->list->info.minOccurs, tmp);
+	  else
+	    fprintf(fd, " SOAP-ENC:arrayType=\"%s[1%s]\">", wsdl_type(((Table*)((Tnode*)p->info.typ->ref)->ref)->list->info.typ, ""), tmp);
+	}
+        fflush(fd);
+        gen_val(fd, n, p->info.typ->ref, nse, nsa, encoding);
+      }
+      else if (p->info.typ->type == Tstruct || p->info.typ->type == Tclass)
+      { /*
+        if (!is_primclass(p->info.typ))
+        { char *nse1 = ns_qualifiedElement(p->info.typ);
+  	  char *nsa1 = ns_qualifiedAttribute(p->info.typ);
+	  if (nse1)
+	    nse = nse1;
+	  if (nsa1)
+	    nsa = nsa1;
+	}
+	*/
+        if (!is_invisible(p->sym->name))
+        { gen_element_begin(fd, n, ns_add(p->sym->name, nse), xsi_type_u(p->info.typ));
+          gen_atts(fd, p->info.typ->ref, nsa);
+        }
+      }
+      else if ((p->info.typ->type == Tpointer || p->info.typ->type == Treference)
+             && (((Tnode*)p->info.typ->ref)->type == Tstruct || ((Tnode*)p->info.typ->ref)->type == Tclass))
+      { /*
+        if (!is_primclass(p->info.typ->ref))
+        { char *nse1 = ns_qualifiedElement(p->info.typ->ref);
+	  char *nsa1 = ns_qualifiedAttribute(p->info.typ->ref);
+	  if (nse1)
+	    nse = nse1;
+	  if (nsa1)
+	    nsa = nsa1;
+	}
+	*/
+        if (!is_invisible(p->sym->name))
+        { gen_element_begin(fd, n, ns_add(p->sym->name, nse), xsi_type_u(p->info.typ));
+          gen_atts(fd, ((Tnode*)p->info.typ->ref)->ref, nsa);
+        }
+      }
+      else if (p->info.typ->type != Tunion)
+      { if (!is_invisible(p->sym->name))
+        { gen_element_begin(fd, n, ns_add(p->sym->name, nse), xsi_type_u(p->info.typ));
+	  fprintf(fd, ">");
+        }
+      }
+      switch (p->info.typ->type)
+      { case Tchar:
+        case Tshort:
+        case Tint:
+        case Tlong:
+        case Tllong:
+        case Tuchar:
+        case Tushort:
+        case Tuint:
+        case Tulong:
+        case Tullong:
+          if (p->info.hasval)
+	    fprintf(fd, SOAP_LONG_FORMAT, p->info.val.i);
+	  else
+	    fprintf(fd, "0");
+	  break;
+        case Tfloat:
+        case Tdouble:
+          if (p->info.hasval)
+	    fprintf(fd, "%f", p->info.val.r);
+	  else
+	    fprintf(fd, "0.0");
+          break;
+        case Tenum:
+	  if (p->info.hasval && p->info.typ->ref)
+	  { for (q = ((Table*)p->info.typ->ref)->list; q; q = q->next)
+	      if (p->info.val.i == q->info.val.i)
+	      { fprintf(fd, "%s", ns_remove2(q->sym->name));
+		break;
+	      }
+	  }
+	  else
+	    gen_val(fd, n+1, p->info.typ, nse, nsa, encoding);
+	  break;
+        case Tpointer:
+        case Treference:
+	  if (is_string(p->info.typ) || is_wstring(p->info.typ))
+	  { if (p->info.hasval)
+	      fprintf(fd, "%s", p->info.val.s);
+	    else
+	      gen_val(fd, n, p->info.typ, nse, nsa, encoding);
+	  }
+	  else if (!is_dynamic_array(p->info.typ->ref) && n < 10)
+	    gen_val(fd, n, p->info.typ->ref, nse, nsa, encoding);
+	  break;
+        case Tclass:
+	  if (is_stdstr(p->info.typ))
+	  { if (p->info.hasval)
+	      fprintf(fd, "%s", p->info.val.s);
+	    else
+	      gen_val(fd, n, p->info.typ, nse, nsa, encoding);
+	    break;
+	  }
+        case Tstruct:
+	  if (!is_dynamic_array(p->info.typ))
+	    gen_val(fd, n, p->info.typ, nse, nsa, encoding);
+	  break;
+        case Tunion:
+	  gen_val(fd, n, p->info.typ, nse, nsa, encoding);
+	  break;
+	case Ttemplate:
+	  gen_val(fd, n, p->info.typ, nse, nsa, encoding);
+	  break;
+        }
+        if (p->info.typ->type != Tunion)
+	  gen_element_end(fd, 0, ns_add(p->sym->name, nse));
+        fflush(fd);
+    }
+  }
+}
+
+void
+gen_atts(FILE *fd, Table *p, char *nsa)
+{ Entry *q, *r;
+  int i;
+  if (p)
+  for (q = p->list; q; q = q->next)
+    if (q->info.sto & Sattribute && !is_invisible(q->sym->name))
+    { fprintf(fd, " %s=\"", ns_add(q->sym->name, nsa));
+      switch (q->info.typ->type)
+      { case Tchar:
+        case Tshort:
+        case Tint:
+        case Tlong:
+        case Tllong:
+        case Tuchar:
+        case Tushort:
+        case Tuint:
+        case Tulong:
+        case Tullong:
+          if (q->info.hasval)
+	    fprintf(fd, SOAP_LONG_FORMAT, q->info.val.i);
+          else
+            fprintf(fd, "0");
+          break;
+        case Tfloat:
+        case Tdouble:
+          if (q->info.hasval)
+	    fprintf(fd, "%f", q->info.val.r);
+	  else
+	    fprintf(fd, "0.0");
+          break;
+        case Ttime:
+	  break; /* should print value? */
+        case Tenum:
+	  if (q->info.hasval && q->info.typ->ref)
+	  { for (r = ((Table*)q->info.typ->ref)->list; r; r = r->next)
+	      if (r->info.val.i == q->info.val.i)
+	      { fprintf(fd, "%s", ns_remove2(r->sym->name));
+		break;
+	      }
+	  }
+	  break;
+        case Tpointer:
+        case Treference:
+	  if (is_string(q->info.typ))
+	  { if (q->info.hasval)
+	      fprintf(fd, "%s", q->info.val.s);
+	    else if (q->info.typ->minLength > 0 && q->info.typ->minLength < 10000)
+	      for (i = 0; i < q->info.typ->minLength; i++)
+	        fprintf(fd, "X");
+	  }
+	  break;
+        case Tclass:
+	  if (is_stdstr(q->info.typ))
+	  { if (q->info.hasval)
+	      fprintf(fd, "%s", q->info.val.s);
+	    else if (q->info.typ->minLength > 0 && q->info.typ->minLength < 10000)
+	      for (i = 0; i < q->info.typ->minLength; i++)
+	        fprintf(fd, "X");
+          }
+      }
+      fprintf(fd, "\"");
+    }
+  fprintf(fd, ">");
+  fflush(fd);
+}
+
+void
+gen_val(FILE *fd, int n, Tnode *p, char *nse, char *nsa, char *encoding)
+{ Entry *q;
+  int i;
+  if (!is_transient(p) && p->type != Tfun && !is_XML(p)) 
+  { if (p->type == Tarray)
+    { i = ((Tnode*) p->ref)->width;
+      if (i)
+      { i = p->width / i;
+        if (i > 100)
+          i = 100;
+        fprintf(fd, "\n");
+        for (; i > 0; i--)
+        { fprintf(fd, "%*s<item>", n+1, "");
+          gen_val(fd, n+1, p->ref, nse, nsa, encoding);
+          fprintf(fd, "</item>\n");
+        }
+        fprintf(fd, "%*s", n, "");
+      }
+    }
+    else if (is_dynamic_array(p))
+    { if (!is_binary(p))
+      { fprintf(fd, "\n");
+        gen_field(fd, n+1, ((Table*)p->ref)->list, nse, nsa, encoding);
+        fprintf(fd, "%*s", n, "");
+      }
+    }
+    switch (p->type)
+    { case Tchar:
+      case Tshort:
+      case Tint:
+      case Tlong:
+      case Tllong:
+      case Tuchar:
+      case Tushort:
+      case Tuint:
+      case Tulong:
+      case Tullong:
+	fprintf(fd, "0");
+	break;
+      case Tfloat:
+      case Tdouble:
+	fprintf(fd, "0.0");
+        break;
+      case Tenum:
+        if (p->ref && (q = ((Table*)p->ref)->list))
+          fprintf(fd, "%s", ns_remove(q->sym->name));
+        else
+          fprintf(fd, "0");
+        break;
+      case Ttime:
+        { char tmp[256];
+          time_t t = time(NULL), *p = &t;
+          strftime(tmp, 256, "%Y-%m-%dT%H:%M:%SZ", gmtime(p));
+	  fprintf(fd, "%s", tmp);
+	}
+	break;
+      case Tpointer:
+      case Treference:
+	if (is_string(p) || is_wstring(p))
+	{ if (p->minLength > 0 && p->minLength < 10000)
+	    for (i = 0; i < p->minLength; i++)
+	      fprintf(fd, "X");
+	}
+        else if (n < 10)
+	  gen_val(fd, n, p->ref, nse, nsa, encoding);
+	break;
+      case Tclass:
+      case Tstruct:
+	if (!is_dynamic_array(p) && !is_primclass(p) && p->ref)
+        { nse = ns_qualifiedElement(p);
+  	  nsa = ns_qualifiedAttribute(p);
+	  fprintf(fd, "\n");
+	  for (q = ((Table*)p->ref)->list; q; q = q->next)
+	    gen_field(fd, n+1, q, nse, nsa, encoding);
+	  fprintf(fd, "%*s", n, "");
+        }
+        break;
+      case Tunion:
+        if (((Table*)p->ref)->list)
+          gen_field(fd, n, ((Table*)p->ref)->list, nse, nsa, encoding);
+	break;
+      case Ttemplate:
+	if (n < 10)
+          gen_val(fd, n, p->ref, nse, nsa, encoding);
+        break;
+    }
+  }
+}
+
+void
+gen_header(FILE *fd, char *method, int response, char *encoding)
+{ if (custom_header)
+  { Service *sp;
+    Method *m = NULL;
+    Entry *q;
+    Table *r;
+    fprintf(fd, " <SOAP-ENV:Header>\n");
+    r = entry(classtable, lookup("SOAP_ENV__Header"))->info.typ->ref;
+    if (r)
+    for (q = r->list; q; q = q->next)
+      if (!is_transient(q->info.typ) && !(q->info.sto & Sattribute) && q->info.typ->type != Tfun)
+      { for (sp = services; sp; sp = sp->next)
+          for (m = sp->list; m; m = m->next)
+	    if (is_eq(m->name, method) && (!strcmp(m->part, q->sym->name) || is_eq_nons(m->part, q->sym->name)) && (!response && (m->mess&HDRIN) || response && (m->mess&HDROUT)))
+	    { gen_field(fd, 2, q, NULL, NULL, encoding);
+	      break;
+            }
+      }
+    fprintf(fd, " </SOAP-ENV:Header>\n");
+  }
+}
+
+FILE *
+gen_env(char *buf, char *method, int response, Table *t, char *ns, char *name, char *URL, char *executable, char *URI, char *encoding)
+{ Symbol *s;
+  Service *sp = NULL;
+  char tmp[1024];
+  FILE *fd;
+  strcpy(tmp, buf);
+  strcpy(strrchr(tmp, '.')+1, method);
+  if (!response)
+  { strcat(tmp, ".req.xml");
+    fprintf(fmsg, "Saving %s sample SOAP/XML request\n", tmp);
+  }
+  else
+  { strcat(tmp, ".res.xml");
+    fprintf(fmsg, "Saving %s sample SOAP/XML response\n", tmp);
+  }
+  fd = fopen(tmp, "w");
+  if (!fd)
+    execerror("Cannot write XML file");
+  fprintf(fd, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+  fprintf(fd, "<SOAP-ENV:Envelope");
+  for (s = nslist; s; s = s->next)
+  { for (sp = services; sp; sp = sp->next)
+      if (!strcmp(sp->ns, s->name) && sp->URI)
+        break;
+    if (sp)
+      fprintf(fd, "\n xmlns:%s=\"%s\"", ns_convert(s->name), sp->URI);
+    else if (!strcmp(s->name, "SOAP-ENV"))
+      fprintf(fd, "\n xmlns:SOAP-ENV=\"%s\"", envURI);
+    else if (!strcmp(s->name, "SOAP-ENC"))
+      fprintf(fd, "\n xmlns:SOAP-ENC=\"%s\"", encURI);
+    else if (!strcmp(s->name, "xsi"))
+      fprintf(fd, "\n xmlns:xsi=\"%s\"", xsiURI);
+    else if (!strcmp(s->name, "xsd"))
+      fprintf(fd, "\n xmlns:xsd=\"%s\"", xsdURI);
+    else
+      fprintf(fd, "\n xmlns:%s=\"%s/%s.xsd\"", ns_convert(s->name), tmpURI, ns_convert(s->name));
+  }
+  fprintf(fd, ">\n");
+  gen_header(fd, method, response, encoding);
+  fprintf(fd, " <SOAP-ENV:Body");
+  if (eflag && !encoding)
+    fprintf(fd, " SOAP-ENV:encodingStyle=\"%s\"", encURI);
+  else if (encoding && !*encoding)
+    fprintf(fd, " SOAP-ENV:encodingStyle=\"%s\"", encURI);
+  else if (encoding && strcmp(encoding, "literal"))
+    fprintf(fd, " SOAP-ENV:encodingStyle=\"%s\"", encoding);
+  fprintf(fd, ">\n");
+  return fd;
+}
+
+char *
+emalloc(unsigned int n)
+{ char	*p;
+  if ((p = (char*)malloc(n)) == NULL)
+    execerror("out of memory");
+  return p;
+}
+
+void
+soap_serve(Table *table)
+{ int i=1;
+  Entry *method, *catch_method;
+  if (!Cflag)
+  {
+  fprintf(fserver,"\n\nSOAP_FMAC5 int SOAP_FMAC6 %s_serve(struct soap *soap)", nflag?prefix:"soap"); 
+
+  fprintf(fserver,"\n{\n#ifndef WITH_FASTCGI\n\tunsigned int k = soap->max_keep_alive;\n#endif\n\n\tdo\n\t{");
+  fprintf(fserver,"\n#ifdef WITH_FASTCGI\n\t\tif (FCGI_Accept() < 0)\n\t\t{\n\t\t\tsoap->error = SOAP_EOF;\n\t\t\treturn soap_send_fault(soap);\n\t\t}\n#endif");
+  fprintf(fserver,"\n\n\t\tsoap_begin(soap);");
+
+  fprintf(fserver,"\n\n#ifndef WITH_FASTCGI\n\t\tif (!--k)\n\t\t\tsoap->keep_alive = 0;\n#endif");
+  fprintf(fserver,"\n\n\t\tif (soap_begin_recv(soap))\n\t\t{\tif (soap->error < SOAP_STOP)\n\t\t\t{\n#ifdef WITH_FASTCGI\n\t\t\t\tsoap_send_fault(soap);\n#else \n\t\t\t\treturn soap_send_fault(soap);\n#endif\n\t\t\t}\n\t\t\tsoap_closesock(soap);\n\n\t\t\tcontinue;\n\t\t}");
+  fprintf(fserver,"\n\n\t\tif (soap_envelope_begin_in(soap)\n\t\t || soap_recv_header(soap)\n\t\t || soap_body_begin_in(soap)\n\t\t || %s_serve_request(soap)\n\t\t || (soap->fserveloop && soap->fserveloop(soap)))\n\t\t{\n#ifdef WITH_FASTCGI\n\t\t\tsoap_send_fault(soap);\n#else\n\t\t\treturn soap_send_fault(soap);\n#endif\n\t\t}", nflag?prefix:"soap");
+  fprintf(fserver,"\n\n#ifdef WITH_FASTCGI\n\t} while (1);\n#else\n\t} while (soap->keep_alive);\n#endif");
+
+  fprintf(fserver,"\n\treturn SOAP_OK;");
+  fprintf(fserver,"\n}");
+
+  fprintf(fserver,"\n\n#ifndef WITH_NOSERVEREQUEST\nSOAP_FMAC5 int SOAP_FMAC6 %s_serve_request(struct soap *soap)\n{", nflag?prefix:"soap");
+  fprintf(fserver, "\n\tsoap_peek_element(soap);");
+  catch_method = NULL;
+  for (method = table->list; method; method = method->next)
+  { char *action = NULL;
+    if (method->info.typ->type == Tfun && !(method->info.sto & Sextern))
+    { if (aflag)
+      { Service *sp;
+        for (sp = services; sp; sp = sp->next)
+        { if (has_ns_eq(sp->ns, method->sym->name))
+	  { Method *m;
+	    for (m = sp->list; m; m = m->next)
+	    { if (is_eq_nons(m->name, method->sym->name))
+	      { if (m->mess == ACTION)
+	          action = m->part;
+	      }
+	    }
+  	  }
+        }
+      }
+      if (is_invisible(method->sym->name))
+      { Entry *param = entry(classtable, method->sym);
+	if (param)
+	{ param = ((Table*)param->info.typ->ref)->list;
+	  if (param)
+          { fprintf(fserver,"\n\tif (!soap_match_tag(soap, soap->tag, \"%s\")", ns_convert(param->sym->name));
+	    if (action)
+              if (*action == '"')
+	        fprintf(fserver, " && (!soap->action || !strcmp(soap->action, %s))", action);
+              else
+	        fprintf(fserver, " && (!soap->action || !strcmp(soap->action, \"%s\"))", action);
+            fprintf(fserver,")\n\t\treturn soap_serve_%s(soap);", method->sym->name);
+	  }
+	  else
+	    catch_method = method;
+	}
+      }
+      else
+      { fprintf(fserver,"\n\tif (!soap_match_tag(soap, soap->tag, \"%s\")", ns_convert(method->sym->name));
+	if (action)
+          if (*action == '"')
+	    fprintf(fserver, " && (!soap->action || !strcmp(soap->action, %s))", action);
+          else
+	    fprintf(fserver, " && (!soap->action || !strcmp(soap->action, \"%s\"))", action);
+        fprintf(fserver,")\n\t\treturn soap_serve_%s(soap);", method->sym->name);
+      }
+    }
+  }
+  if (catch_method)
+    fprintf(fserver, "\n\treturn soap_serve_%s(soap);", catch_method->sym->name);
+  else
+    fprintf(fserver,"\n\treturn soap->error = SOAP_NO_METHOD;");
+
+  fprintf(fserver,"\n}\n#endif");
+
+  banner(fheader, "Service Operations");
+  for (method = table->list; method; method = method->next)
+    if (method->info.typ->type == Tfun && !(method->info.sto & Sextern))
+	generate_proto(table, method);
+  }
+
+  if (!Sflag)
+  { banner(fheader, "Stubs");
+    for (method = table->list; method; method = method->next)
+      if (method->info.typ->type == Tfun && !(method->info.sto & Sextern) && !is_imported(method->info.typ))
+	gen_call_method(fclient, table, method, NULL);
+  }
+
+  if (!Cflag)
+  { banner(fheader, "Skeletons");
+    fprintf(fheader, "\nSOAP_FMAC5 int SOAP_FMAC6 %s_serve(struct soap*);", nflag?prefix:"soap");
+    fprintf(fheader, "\n\nSOAP_FMAC5 int SOAP_FMAC6 %s_serve_request(struct soap*);", nflag?prefix:"soap");
+    for (method = table->list; method; method = method->next)
+      if (method->info.typ->type == Tfun && !(method->info.sto & Sextern) && !is_imported(method->info.typ))
+	gen_serve_method(fserver, table, method, NULL);
+  }
+}
+
+void
+generate_proto(Table *table, Entry *param)
+{ Entry *pin,*q,*pout;
+  Table *output,*t;
+  q=entry(table, param->sym);
+  if (q)
+    pout = (Entry*)q->info.typ->ref;
+  else
+    fprintf(stderr, "Internal error: no table entry\n");
+  q=entry(classtable, param->sym);
+  output=(Table*) q->info.typ->ref;
+  fprintf(fheader, "\n\nSOAP_FMAC5 int SOAP_FMAC6 %s(struct soap*",param->sym->name);
+  gen_params(fheader, output, pout, 1);
+  fprintf(fheader,";");
+}
+
+int
+is_qname(Tnode *p)
+{ return p->sym && is_string(p) && (is_eq(p->sym->name, "xsd__QName") || is_eq(p->sym->name, "QName"));
+}
+
+int
+is_stdqname(Tnode *p)
+{ return p->sym && is_stdstring(p) && (is_eq(p->sym->name, "xsd__QName") || is_eq(p->sym->name, "QName"));
+}
+
+int
+is_XML(Tnode *p)
+{ return p->sym && (is_string(p) || is_wstring(p)) && is_eq(p->sym->name, "XML") || (p->type == Tpointer || p->type == Treference) && is_XML(p->ref);
+}
+
+int
+is_response(Tnode *p)
+{ return (p->type == Tpointer || p->type == Treference) && p->ref && ((((Tnode*)p->ref)->type == Tstruct || ((Tnode*)p->ref)->type == Tclass) && !is_primclass(p->ref) && !is_dynamic_array(p->ref) && !is_stdstring(p->ref) && !is_stdwstring(p->ref));
+}
+
+Entry*
+get_response(Tnode *p)
+{ if (p->type == Tfun)
+    return p->response;
+  return 0;
+}
+
+int
+is_unmatched(Symbol *sym)
+{ return sym->name[0] == '_'
+      && sym->name[1] != '_'
+      && strncmp(sym->name, "_DOT", 4) 
+      && strncmp(sym->name, "_USCORE", 7)
+      && (strncmp(sym->name, "_x", 2) || !isxdigit(sym->name[2]) || !isxdigit(sym->name[3]) || !isxdigit(sym->name[4]) || !isxdigit(sym->name[5]));
+}
+
+int
+is_invisible(const char *name)
+{ return name[0] == '-' || name[0] == '_' && name[1] == '_' && strncmp(name, "__ptr", 5);
+}
+
+int
+is_element(Tnode *typ)
+{ if (typ->sym)
+    return is_unmatched(typ->sym);
+  if (typ->type == Tstruct || typ->type == Tclass)
+    return is_unmatched(typ->id);
+  return 0;
+}
+
+int
+is_untyped(Tnode *typ)
+{ Tnode *p;
+  if (typ->sym)
+    return is_unmatched(typ->sym);
+  if (typ->type == Tpointer || typ->type == Treference || typ->type == Tarray)
+    return is_untyped(typ->ref);
+  if (typ->type == Tstruct || typ->type == Tclass)
+    if (is_dynamic_array(typ) && !has_ns(typ) && !is_binary(typ))
+    { p = ((Table*)typ->ref)->list->info.typ->ref;
+        return is_untyped(p);
+    }
+    else
+      return is_unmatched(typ->id);
+  return 0;
+}
+
+int
+is_primclass(Tnode *typ)
+{ Table *t;
+  if (typ->type == Tstruct || typ->type == Tclass)
+  { if (!is_dynamic_array(typ))
+    { t = (Table*)typ->ref;
+      while (t)
+      { if (t->list && is_item(t->list))
+          break;
+	t = t->prev;
+      }
+      if (!t)
+        return 0;
+      t = (Table*)typ->ref;
+      while (t)
+      { Entry *p;
+        for (p = t->list; p; p = p->next)
+	  if (!is_item(p))
+	    if (p->info.typ->type != Tfun && !is_transient(p->info.typ) && p->info.sto != Sattribute && p->info.sto != Sprivate && p->info.sto != Sprotected)
+	      return 0;
+        t = t->prev;
+      }
+      return 1;
+    }
+  }
+  else if (typ->type == Tpointer || typ->type == Treference)
+    return is_primclass(typ->ref);
+  return 0;
+}
+
+int
+is_mask(Tnode *typ)
+{ return (typ->type == Tenum && typ->width == 8);
+}
+
+int
+is_void(Tnode *typ)
+{ if (!typ)
+    return 1;
+  if (typ->type == Tvoid)
+    return 1;
+  if (typ->type == Tpointer)
+    return is_void(typ->ref); 
+  if (typ->type == Treference)
+    return is_void(typ->ref); 
+  if (typ->type == Tarray)
+    return is_void(typ->ref); 
+  if (typ->type == Ttemplate)
+    return is_void(typ->ref); 
+  return 0;
+}
+
+int
+is_transient(Tnode *typ)
+{ if (!typ)
+    return 1;
+  if (is_external(typ) || is_volatile(typ))
+    return 0;
+  if (typ->transient)
+    return 1;
+  switch (typ->type)
+  { case Tpointer:
+    case Treference:
+    case Tarray:
+    case Ttemplate:
+      return is_transient(typ->ref);
+    case Tstruct:
+      return typ->id == lookup("soap");
+    case Tnone:
+    case Tvoid:
+      return 1;
+  }
+  return 0;
+}
+
+int
+is_imported(Tnode* typ)
+{ if (is_module || lflag)
+    return typ->imports > 0;
+  return 0;
+}
+
+int
+is_external(Tnode* typ)
+{ return typ->transient == -1;
+}
+
+int
+is_volatile(Tnode* typ)
+{ return typ->transient == -2;
+}
+
+int
+is_template(Tnode *p)
+{ if (p->type == Tpointer)
+    return is_template(p->ref);
+  return p->type == Ttemplate;
+}
+
+int
+is_repetition(Entry *p)
+{ if (p)
+    return p->next && p->next->info.typ->type == Tpointer && (p->info.typ->type == Tint || p->info.typ->type == Tuint) && !strncmp(p->sym->name, "__size", 6);
+  return 0;
+} 
+
+int
+is_item(Entry *p)
+{ if (p)
+    return !strcmp(p->sym->name, "__item");
+  return 0;
+}
+
+int
+is_choice(Entry *p)
+{ if (p)
+    if (p->next && p->next->info.typ->type == Tunion && p->info.typ->type == Tint && !strncmp(p->sym->name, "__union", 7))
+      return 1;
+  return 0;
+} 
+
+int
+is_anytype(Entry *p)
+{ if (p)
+    if (p->next && p->next->info.typ->type == Tpointer && ((Tnode*)p->next->info.typ->ref)->type == Tvoid && p->info.typ->type == Tint && !strncmp(p->sym->name, "__type", 6))
+    { is_anytype_flag = 1;
+      return 1;
+    }
+  return 0;
+} 
+
+int
+is_keyword(const char *name)
+{ Symbol *s = lookup(name);
+  if (s)
+    return s->token != ID;
+  return 0;
+}
+
+
+int
+has_ptr(Tnode *typ)
+{ Tnode	*p;
+  if (typ->type == Tpointer || typ->type == Treference)
+    return 0;
+  for (p = Tptr[Tpointer]; p; p = p->next)
+    if (p->ref == typ && p->transient != 1)
+      return 1;
+  return 0;
+}
+
+int
+has_detail_string()
+{ Entry *p = entry(classtable, lookup("SOAP_ENV__Fault"));
+  if (p && p->info.typ->ref && (p->info.typ->type == Tstruct || p->info.typ->type == Tclass))
+  { Entry *e = entry(p->info.typ->ref, lookup("detail"));
+    if (e && e->info.typ->ref && e->info.typ->type == Tpointer && ((Tnode*)e->info.typ->ref)->type == Tstruct)
+    { Entry *e2 = entry(((Tnode*)e->info.typ->ref)->ref, lookup("__any"));
+      return e2 && is_string(e2->info.typ);
+    }
+  }
+  return 0;
+}
+
+int
+has_Detail_string()
+{ Entry *p = entry(classtable, lookup("SOAP_ENV__Fault"));
+  if (p && p->info.typ->ref && (p->info.typ->type == Tstruct || p->info.typ->type == Tclass))
+  { Entry *e = entry(p->info.typ->ref, lookup("SOAP_ENV__Detail"));
+    if (e && e->info.typ->ref && e->info.typ->type == Tpointer && ((Tnode*)e->info.typ->ref)->type == Tstruct)
+    { Entry *e2 = entry(((Tnode*)e->info.typ->ref)->ref, lookup("__any"));
+      return e2 && is_string(e2->info.typ);
+    }
+  }
+  return 0;
+}
+
+int
+has_class(Tnode *typ)
+{ Entry *p;
+  if (typ->type == Tstruct && typ->ref)
+  { for (p = ((Table*)typ->ref)->list; p; p = p->next)
+    { if (p->info.sto & Stypedef)
+        continue;
+      if (p->info.typ->type == Tclass || p->info.typ->type == Ttemplate)
+        return 1;
+      if (p->info.typ->type == Tstruct && has_class(p->info.typ))
+        return 1;
+    }
+  }
+  return 0;
+}
+
+int
+has_external(Tnode *typ)
+{ Entry *p;
+  if ((typ->type == Tstruct || typ->type == Tclass) && typ->ref)
+  { for (p = ((Table*)typ->ref)->list; p; p = p->next)
+    { if (p->info.typ->type == Tstruct || p->info.typ->type == Tclass)
+      { if (is_external(p->info.typ) || has_external(p->info.typ))
+          return 1;
+      }
+    }
+  }
+  return 0;
+}
+
+int
+has_volatile(Tnode *typ)
+{ Entry *p;
+  if ((typ->type == Tstruct || typ->type == Tclass) && typ->ref)
+  { for (p = ((Table*)typ->ref)->list; p; p = p->next)
+    { if (p->info.typ->type == Tstruct || p->info.typ->type == Tclass)
+      { if (is_volatile(p->info.typ) || has_volatile(p->info.typ))
+          return 1;
+      }
+    }
+  }
+  return 0;
+}
+
+int
+has_ns(Tnode *typ)
+{ char *s;
+  if (typ->type == Tstruct || typ->type == Tclass || typ->type == Tenum)
+    return has_ns_eq(NULL, typ->id->name);
+  return 0;
+}
+
+int
+has_ns_t(Tnode *typ)
+{ char *s;
+  if (typ->sym)
+  { s = strstr(typ->sym->name + 1, "__");
+    if (!s)
+      s = strstr(typ->sym->name, "::");
+    return s && s[2] && s[2] != '_';
+  }
+  return has_ns(typ);
+}
+
+int
+is_eq_nons(const char *s, const char *t)
+{ int n, m;
+  char *r;
+  while (*s == '_')
+    s++;
+  while (*t == '_')
+    t++;
+  if (!*s || !*t)
+    return 0;
+  r = strstr(t, "__");
+  if (r)
+    t = r + 2;
+  for (n = strlen(s) - 1; n && s[n] == '_'; n--)
+    ;
+  for (m = strlen(t) - 1; m && t[m] == '_'; m--)
+    ;
+  if (n != m)
+    return 0;
+  return !strncmp(s, t, n + 1);
+}
+
+int
+is_eq(const char *s, const char *t)
+{ int n, m;
+  while (*s == '_')
+    s++;
+  while (*t == '_')
+    t++;
+  if (!*s || !*t)
+    return 0;
+  for (n = strlen(s) - 1; n && s[n] == '_'; n--)
+    ;
+  for (m = strlen(t) - 1; m && t[m] == '_'; m--)
+    ;
+  if (n != m)
+    return 0;
+  return !strncmp(s, t, n + 1);
+}
+
+int
+has_ns_eq(char *ns, char *s)
+{ int n;
+  while (*s == '_')
+    s++;
+  if (!ns)
+  { char *t = strstr(s + 1, "__");
+    if (!t)
+      t = strstr(s, "::");
+    return t && t[2] && t[2] != '_';
+  }
+  if ((n = strlen(ns)) < strlen(s))
+    return s[n] == '_' && s[n+1] == '_' && !strncmp(ns, s, n);
+  return 0;
+}
+
+char *
+ns_of(char *name)
+{ Service *sp;
+  for (sp = services; sp; sp = sp->next)
+    if (has_ns_eq(sp->ns, name))
+      break;
+  if (sp)
+    return sp->URI;
+  return NULL;
+}
+
+char *
+prefix_of(char *s)
+{ int n;
+  char *t;
+  while (*s == '_')
+    s++;
+  t = strstr(s + 1, "__");
+  if (!t)
+    t = strstr(s, "::");
+  if (t && t[2] && t[2] != '_')
+  { char *r  = (char*)emalloc(t - s + 1);
+    strncpy(r, s, t - s);
+    r[t - s] = '\0';
+    return r;
+  }
+  return s;
+}
+
+char *
+ns_overridden(Table *t, Entry *p)
+{ Entry *q;
+  Symbol *s = t->sym;
+  char *n;
+  if (s)
+    while (t = t->prev)
+      for (q = t->list; q; q = q->next)
+        if (!strcmp(q->sym->name, p->sym->name))
+        { n = (char*)emalloc(strlen(s->name)+strlen(p->sym->name)+2);
+	  strcpy(n, s->name);
+	  strcat(n, ".");
+	  strcat(n, p->sym->name);
+	  return ns_convert(n);
+        }
+  return ns_convert(p->sym->name);
+}
+
+char *
+ns_add_overridden(Table *t, Entry *p, char *ns)
+{ Entry *q;
+  Symbol *s = t->sym;
+  char *n;
+  if (s)
+    while (t = t->prev)
+      for (q = t->list; q; q = q->next)
+        if (!strcmp(q->sym->name, p->sym->name))
+        { n = (char*)emalloc(strlen(s->name)+strlen(p->sym->name)+2);
+	  strcpy(n, s->name);
+	  strcat(n, ".");
+	  strcat(n, p->sym->name);
+	  return ns_add(n, ns);
+        }
+  return ns_add(p->sym->name, ns);
+}
+
+
+char *
+c_ident(Tnode *typ)
+{ if (typ->sym && strcmp(typ->sym->name, "/*?*/"))
+    return typ->sym->name;
+  return t_ident(typ);
+}
+
+char *
+soap_type(Tnode *typ)
+{ char *s, *t = c_ident(typ);
+  if (namespaceid)
+  { s = (char*)emalloc(strlen(t) + strlen(namespaceid) + 12);
+    strcpy(s, "SOAP_TYPE_");
+    strcat(s, namespaceid);
+    strcat(s, "_");
+  }
+  else
+  { s = (char*)emalloc(strlen(t) + 11);
+    strcpy(s, "SOAP_TYPE_");
+  }
+  strcat(s, t);
+  return s;
+}
+
+/*t_ident gives the name of a type in identifier format*/
+char *
+t_ident(Tnode *typ)
+{ char *p, *q;
+  switch(typ->type)
+  {
+  case Tnone:
+    return "";
+  case Tvoid:
+    return "void";
+  case Tchar:
+    return "byte";
+  case Twchar:
+    return "wchar";
+  case Tshort:
+    return "short";
+  case Tint:
+    return "int";
+  case Tlong:
+    return "long";
+  case Tllong:
+    return "LONG64";
+  case Tfloat:
+    return "float";
+  case Tdouble:
+    return "double";
+  case Tuchar:
+    return "unsignedByte";
+  case Tushort:
+    return "unsignedShort";
+  case Tuint:
+    return "unsignedInt";
+  case Tulong:
+    return "unsignedLong";
+  case Tullong:
+    return "unsignedLONG64";
+  case Ttime:
+    return "time";
+  case Tstruct:
+  case Tclass:
+  case Tunion:
+  case Tenum:
+    if (typ->ref == booltable)
+      return "bool";
+    return res_remove(typ->id->name);
+  case Treference:
+    return c_ident(typ->ref);
+  case Tpointer:
+    if(((Tnode*)typ->ref)->type == Tchar) 
+	return "string";
+    if(((Tnode*)typ->ref)->type == Twchar) 
+	return "wstring";
+    p=(char*) emalloc((10+strlen(q = c_ident(typ->ref)))*sizeof(char));
+    strcpy(p,"PointerTo");
+    strcat(p,q);
+    return p;
+  case Tarray:
+    p=(char*) emalloc((16+strlen(c_ident(typ->ref)))*sizeof(char));
+    if (((Tnode*)typ->ref)->width)
+      sprintf(p, "Array%dOf%s",typ->width / ((Tnode*) typ->ref)->width,c_ident(typ->ref));
+    else
+      sprintf(p, "ArrayOf%s", c_ident(typ->ref));
+    return p;
+  case Ttemplate:
+    if (typ->ref)
+    { p=(char*) emalloc((11+strlen(res_remove(typ->id->name))+strlen(q = c_ident(typ->ref)))*sizeof(char));
+      strcpy(p, res_remove(typ->id->name));
+      strcat(p, "TemplateOf");
+      strcat(p, q);
+      return p;
+    }
+  case Tfun:
+    return "Function";
+  }
+  return "anyType";
+}
+
+void
+utf8(char **t, long c)
+{ if (c < 0x0080)
+    *(*t)++ = (char)c;
+  else
+  { if (c < 0x0800)
+      *(*t)++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+    else
+    { if (c < 0x010000)
+        *(*t)++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+      else
+      { if (c < 0x200000)
+          *(*t)++ = (char)(0xF0 | ((c >> 18) & 0x07));
+        else
+        { if (c < 0x04000000)
+            *(*t)++ = (char)(0xF8 | ((c >> 24) & 0x03));
+          else
+          { *(*t)++ = (char)(0xFC | ((c >> 30) & 0x01));
+            *(*t)++ = (char)(0x80 | ((c >> 24) & 0x3F));
+          }
+          *(*t)++ = (char)(0x80 | ((c >> 18) & 0x3F));
+        }     
+        *(*t)++ = (char)(0x80 | ((c >> 12) & 0x3F));
+      }
+      *(*t)++ = (char)(0x80 | ((c >> 6) & 0x3F));
+    }
+    *(*t)++ = (char)(0x80 | (c & 0x3F));
+  }
+  *(*t) = '\0';
+}
+
+char *
+ns_convert(char *tag)
+{ char *t, *s;
+  int i, n;
+  if (*tag == '_')
+  { if (!strncmp(tag, "__ptr", 5))
+      if (tag[5])
+        tag += 5;
+      else
+        tag = "item";
+    else if (strncmp(tag, "_DOT", 4) 
+          && strncmp(tag, "_USCORE", 7)
+          && (strncmp(tag, "_x", 2) || !isxdigit(tag[2]) || !isxdigit(tag[3]) || !isxdigit(tag[4]) || !isxdigit(tag[5])))
+      tag++; /* skip leading _ */
+  }
+  for (n = strlen(tag); n > 0; n--)
+    if (tag[n-1] != '_')
+      break;
+  s = t = (char*)emalloc(n+1);
+  for (i = 0; i < n; i++)
+  { if (tag[i] == '_')
+      if (tag[i+1] == '_')
+        break;
+      else if (!strncmp(tag+i, "_DOT", 4))
+      { *s++ = '.';
+        i += 3;
+      }
+      else if (!strncmp(tag+i, "_USCORE", 7))
+      { *s++ = '_';
+        i += 6;
+      }
+      else if (!strncmp(tag+i, "_x", 2) && isxdigit(tag[i+2]) && isxdigit(tag[i+3]) && isxdigit(tag[i+4]) && isxdigit(tag[i+5]))
+      { char d[5];
+	strncpy(d, tag+i+2, 4);
+	d[4] = '\0';
+        utf8(&s, strtoul(d, NULL, 16));
+        i += 5;
+      }
+      else
+        *s++ = '-';
+    else if (tag[i] == ':' && tag[i+1] == ':')
+      break;
+    else
+      *s++ = tag[i];
+  }
+  if (i < n)
+  { *s++ = ':';
+    for (i += 2; i < n; i++)
+      if (tag[i] == '_')
+        if (!strncmp(tag+i, "_DOT", 4))
+        { *s++ = '.';
+          i += 3;
+        }
+        else if (!strncmp(tag+i, "_USCORE", 7))
+        { *s++ = '_';
+          i += 6;
+        }
+        else if (!strncmp(tag+i, "_x", 2) && isxdigit(tag[i+2]) && isxdigit(tag[i+3]) && isxdigit(tag[i+4]) && isxdigit(tag[i+5]))
+        { char d[5];
+	  strncpy(d, tag+i+2, 4);
+	  d[4] = '\0';
+          utf8(&s, strtoul(d, NULL, 16));
+          i += 5;
+        }
+	else
+	  *s++ = '-';
+      else
+        *s++ = tag[i];
+  }
+  else
+  { /* consider adding default prefix when element/attributeFormDefault is qualified */
+  }
+  *s = '\0';
+  return t;
+}
+
+char *
+res_remove(char *tag)
+{ char *s, *t;
+  if (!(s = strchr(tag, ':')))
+    return tag;
+  s = emalloc(strlen(tag) + 1);
+  strcpy(s, tag);
+  while ((t = strchr(s, ':')))
+    *t = '_';
+  return s;
+}
+
+char *
+ns_qualifiedElement(Tnode *typ)
+{ Service *sp;
+  char *s = NULL;
+  if (typ->sym)
+    s = prefix_of(typ->sym->name);
+  if (!s && typ->id)
+    s = prefix_of(typ->id->name);
+  if (!s)
+    return NULL;
+  for (sp = services; sp; sp = sp->next)
+  { if (sp->elementForm && !strcmp(sp->ns, s))
+    { if (!strcmp(sp->elementForm, "qualified"))
+        return s;
+      return NULL;
+    }
+  }
+  for (sp = services; sp; sp = sp->next)
+    if (!strcmp(sp->ns, s))
+      if (sp->style && !strcmp(sp->style, "document"))
+        return s;
+  return NULL;
+}
+
+char *
+ns_qualifiedAttribute(Tnode *typ)
+{ Service *sp;
+  char *s = NULL;
+  if (typ->sym)
+    s = prefix_of(typ->sym->name);
+  if (!s && typ->id)
+    s = prefix_of(typ->id->name);
+  if (!s)
+    return NULL;
+  for (sp = services; sp; sp = sp->next)
+  { if (sp->attributeForm && !strcmp(sp->ns, s))
+    { if (!strcmp(sp->attributeForm, "qualified"))
+        return s;
+      return NULL;
+    }
+  }
+  for (sp = services; sp; sp = sp->next)
+    if (!strcmp(sp->ns, s))
+      if (sp->style && !strcmp(sp->style, "document"))
+        return s;
+  return NULL;
+}
+
+char *
+ns_add(char *tag, char *ns)
+{ char *t, *s = ns_convert(tag);
+  if (!ns || *s == '-' || (t = strchr(s, ':')))
+    return s;
+  t = emalloc(strlen(ns) + strlen(s) + 2);
+  strcpy(t, ns);
+  strcat(t, ":");
+  strcat(t, s);
+  return t;
+}
+
+char *
+ns_name(char *tag)
+{ char *t, *s = tag;
+  if (*s)
+    for (t = s + 1; *t; t++)
+      if (t[0] == '_' && t[1] == '_')
+      { s = t + 2;
+        t++;
+      }
+  return s;
+}
+
+char *
+ns_cname(char *tag, char *suffix)
+{ char *s, *t;
+  int i, n;
+  if (!tag)
+    return NULL;
+  t = ns_name(tag);
+  n = strlen(t);
+  if (suffix)
+    s = emalloc(n + strlen(suffix) + 2);
+  else
+    s = emalloc(n + 2);
+  for (i = 0; i < n; i++)
+  { if (!isalnum(t[i]))
+      s[i] = '_';
+    else
+      s[i] = t[i];
+  }
+  s[i] = '\0';
+  if (suffix)
+    strcat(s, suffix);
+  if (is_keyword(t))
+    strcat(s, "_");
+  return s;
+}
+
+char *
+ns_remove(char *tag)
+{ return ns_convert(ns_name(tag));
+}
+
+char *
+ns_remove1(char *tag)
+{ char *t, *s = tag;
+  int n = 2;
+  /* handle 'enum_xx__yy' generated by wsdl2h */
+  if (!strncmp(s, "enum_", 5))
+    n = 1;
+  if (*s)
+  { for (t = s + 1; *t && n; t++)
+      if (t[0] == '_' && t[1] == '_')
+      { s = t + 2;
+        t++;
+	n--;
+      }
+    if (n || (s[0] == '_' && s[1] != 'x') || !*s)
+      s = tag;
+  }
+  return s;
+}
+
+char *
+ns_remove2(char *tag)
+{ return ns_convert(ns_remove1(tag));
+}
+
+char *
+xsi_type_cond(Tnode *typ, int flag)
+{ if (flag)
+    return xsi_type(typ);
+  return "";
+}
+
+char *
+xsi_type_cond_u(Tnode *typ, int flag)
+{ if (flag && tflag)
+    return xsi_type(typ);
+  return "";
+}
+
+char *
+xsi_type_u(Tnode *typ)
+{ if (tflag)
+    return xsi_type(typ);
+  return "";
+}
+
+char *
+xsi_type(Tnode *typ)
+{ if (!typ)
+    return "NULL";
+  if (is_dynamic_array(typ) && !has_ns(typ))
+    return xsi_type_Darray(typ);
+  if (typ->type == Tarray)
+    return xsi_type_Tarray(typ);
+  if (is_untyped(typ))
+    return "";
+  if (typ->sym)
+    if (!strncmp(typ->sym->name, "SOAP_ENV__", 10))
+      return "";
+    else if (is_XML(typ))
+      return "xsd:anyType";
+    else if (typ->type != Ttemplate)
+      return ns_convert(typ->sym->name);
+  if (is_string(typ) || is_wstring(typ) || is_stdstring(typ) || is_stdwstring(typ))
+    return "xsd:string";
+  switch(typ->type){
+  case Tchar:
+    return "xsd:byte";
+  case Twchar:
+    return "wchar";
+  case Tshort:
+    return "xsd:short";
+  case Tint:
+    return "xsd:int";
+  case Tlong:
+  case Tllong:
+    return "xsd:long";
+  case Tfloat:
+    return "xsd:float";
+  case Tdouble:
+    return "xsd:double";
+  case Tuchar:
+    return "xsd:unsignedByte";
+  case Tushort:
+    return "xsd:unsignedShort";
+  case Tuint:
+    return "xsd:unsignedInt";
+  case Tulong:
+  case Tullong:
+    return "xsd:unsignedLong";
+  case Ttime:
+    return "xsd:dateTime";
+  case Tpointer:
+  case Treference:
+    return xsi_type(typ->ref);
+  case Tenum:
+    if (typ->ref == booltable)
+      return "xsd:boolean";
+  case Tstruct:
+  case Tclass:
+    if (!strncmp(typ->id->name, "SOAP_ENV__", 10))
+      return "";
+    return ns_convert(typ->id->name);
+  case Ttemplate:
+    if (typ->ref)
+      return xsi_type(typ->ref);
+  }
+  return "";
+}
+
+char *
+xml_tag(Tnode *typ)
+{ if (!typ)
+    return "NULL";
+  if (typ->type == Tpointer || typ->type == Treference)
+    return xml_tag(typ->ref);
+  if (typ->sym)
+    return ns_convert(typ->sym->name);
+  return the_type(typ);
+}
+
+char *
+wsdl_type(Tnode *typ, char *ns)
+{ if (!typ)
+    return "NULL";
+  /*
+  if (is_qname(typ) && ns)
+      return "xsd:QName";
+  */
+  if (typ->sym)
+    if (is_XML(typ))
+      return "xsd:anyType";
+    else if (ns)
+      return ns_convert(typ->sym->name);
+    else
+      return ns_remove(typ->sym->name);
+  return base_type(typ, ns);
+}
+
+char *
+base_type(Tnode *typ, char *ns)
+{ int d;
+  char *s, *t;
+  if (is_string(typ) || is_wstring(typ) || is_stdstring(typ) || is_stdwstring(typ))
+  { if (ns)
+      return "xsd:string";
+    return "string";
+  }
+  if (is_dynamic_array(typ) && !is_binary(typ) && !has_ns(typ) && !is_untyped(typ))
+  { s = ns_remove(wsdl_type(((Table*)typ->ref)->list->info.typ, NULL));
+    if (ns && *ns)
+    { t = (char*)emalloc(strlen(s)+strlen(ns_convert(ns))+13);
+      strcpy(t, ns_convert(ns));
+      strcat(t, ":");
+      strcat(t, "ArrayOf");
+    }
+    else
+    { t = (char*)emalloc(strlen(s)+12);
+      strcpy(t, "ArrayOf");
+    }
+    strcat(t, s);
+    d = get_Darraydims(typ);
+    if (d)
+      sprintf(t+strlen(t), "%dD", d);
+    return t;
+  }
+  switch (typ->type){
+  case Tchar :
+    if (ns)
+      return "xsd:byte";
+    return "byte";
+  case Twchar :
+    if (ns)
+      return "xsd:wchar";
+    return "wchar";
+  case Tshort :
+    if (ns)
+      return "xsd:short";
+    return "short";
+  case Tint  :
+    if (ns)
+      return "xsd:int";
+    return "int";
+  case Tlong  :
+  case Tllong  :
+    if (ns)
+      return "xsd:long";
+    return "long";
+  case Tfloat:
+    if (ns)
+      return "xsd:float";
+    return "float";
+  case Tdouble:
+    if (ns)
+      return "xsd:double";
+    return "double";
+  case Tuchar:
+    if (ns)
+      return "xsd:unsignedByte";
+    return "unsignedByte";
+  case Tushort:
+    if (ns)
+      return "xsd:unsignedShort";
+    return "unsignedShort";
+  case Tuint:
+    if (ns)
+      return "xsd:unsignedInt";
+    return "unsignedInt";
+  case Tulong:
+  case Tullong:
+    if (ns)
+      return "xsd:unsignedLong";
+    return "unsignedLong";
+  case Ttime:
+    if (ns)
+      return "xsd:dateTime";
+    return "dateTime";
+  case Tpointer:
+  case Treference:
+    return wsdl_type(typ->ref, ns);
+  case Tarray:
+    if (ns && *ns)
+    { s = (char*)emalloc((strlen(ns_convert(ns))+strlen(c_ident(typ))+2)*sizeof(char));
+      strcpy(s, ns_convert(ns));
+      strcat(s, ":");
+      strcat(s, c_ident(typ));
+      return s;
+    }
+    else
+      return c_ident(typ);
+  case Tenum:
+    if (typ->ref == booltable)
+    { if (ns)
+        return "xsd:boolean";
+      return "boolean";
+    }
+  case Tstruct:
+  case Tclass:
+    if (!has_ns(typ) && ns && *ns)
+    { s = (char*)emalloc((strlen(ns_convert(ns))+strlen(typ->id->name)+2)*sizeof(char));
+      strcpy(s, ns_convert(ns));
+      strcat(s, ":");
+      strcat(s, ns_convert(typ->id->name));
+      return s;
+    }
+    else if (ns)
+      return ns_convert(typ->id->name);
+    else
+      return ns_remove(typ->id->name);
+  case Tunion:
+    if (ns)
+      return "xsd:choice";
+    return "choice";
+  case Ttemplate:
+    if (typ->ref)
+      return wsdl_type(typ->ref, ns);
+  }
+  return "";
+}
+
+char *
+the_type(Tnode *typ)
+{ if (!typ)
+    return "NULL";
+  if (typ->type == Tarray || is_dynamic_array(typ) && !has_ns(typ) && !is_untyped(typ))
+    return "SOAP-ENC:Array";
+  if (is_string(typ) || is_wstring(typ) || is_stdstring(typ) || is_stdwstring(typ))
+    return "string";
+  switch (typ->type)
+  {
+  case Tchar:
+    return "byte";
+  case Twchar:
+    return "wchar";
+  case Tshort:
+    return "short";
+  case Tint :
+    return "int";
+  case Tlong :
+  case Tllong :
+    return "long";
+  case Tfloat:
+    return "float";
+  case Tdouble:
+    return "double";
+  case Tuchar:
+    return "unsignedByte";
+  case Tushort:
+    return "unsignedShort";
+  case Tuint:
+    return "unsignedInt";
+  case Tulong:
+  case Tullong:
+    return "unsignedLong";
+  case Ttime:
+    return "dateTime";
+  case Tpointer:
+  case Treference:
+    return the_type(typ->ref);
+  case Tarray:
+    return "SOAP-ENC:Array";
+  case Tenum:
+    if (typ->ref == booltable)
+      return "boolean";
+  case Tstruct:
+  case Tclass:
+    return ns_convert(typ->id->name);
+  }
+  return "";
+}
+
+/* c_type returns the type to be used in parameter declaration*/
+char *
+c_type(Tnode *typ)
+{
+  char *p, *q, tempBuf[10];
+  Tnode *temp;
+  if (typ==0)
+    return "NULL";
+  switch(typ->type){
+  case Tnone:
+    return "";
+  case Tvoid:
+    return "void";
+  case Tchar:
+    return "char";
+  case Twchar:
+    return "wchar_t";
+  case Tshort:
+    return "short";
+  case Tint  :
+    return "int";
+  case Tlong  :
+    return "long";
+  case Tllong  :
+    return "LONG64";
+  case Tfloat:
+    return "float";
+  case Tdouble:
+    return "double";
+  case Tuchar:
+    return "unsigned char";
+  case Tushort:
+    return "unsigned short";
+  case Tuint:
+    return "unsigned int";
+  case Tulong:
+    return "unsigned long";
+  case Tullong:
+    return "ULONG64";
+  case Ttime:
+    return "time_t";
+  case Tstruct:p=(char*) emalloc((8+strlen(typ->id->name)) *sizeof(char));
+    strcpy(p,"struct ");
+    strcat(p,typ->id->name);
+    break;
+  case Tclass:
+   p = typ->id->name;
+   break;
+  case Tunion: p=(char*) emalloc((7+strlen(typ->id->name)) *sizeof(char));
+    strcpy(p,"union ");
+    strcat(p,typ->id->name);
+    break;
+  case Tenum:
+    if (typ->ref == booltable)
+      return "bool";
+    p=(char*) emalloc((6+strlen(typ->id->name)) *sizeof(char));
+    strcpy(p,"enum ");
+    strcat(p,typ->id->name);
+    break;
+  case Tpointer:
+    p = c_type_id(typ->ref, "*");
+    break;
+  case Treference:
+    p = c_type_id(typ->ref, "&");
+    break;
+  case Tarray:
+    p=(char*) emalloc((12+strlen(q = c_type(typ->ref))) *sizeof(char));
+    temp = typ;
+    while(((Tnode*) (typ->ref))->type==Tarray){
+      typ = typ->ref;
+    }
+    if (((Tnode*)typ->ref)->type == Tpointer)
+      sprintf(p,"%s",c_type(typ->ref));
+    else
+      strcpy(p, q);
+    typ = temp;
+    if (((Tnode*) typ->ref)->width)
+    { sprintf(tempBuf,"[%d]",(typ->width / ((Tnode*) typ->ref)->width));
+      strcat(p,tempBuf);
+    }
+    break;
+  case Ttemplate:
+    if (typ->ref)
+    { p=(char*)emalloc((strlen(q = c_type(typ->ref))+strlen(typ->id->name)+4) *sizeof(char));
+      strcpy(p, typ->id->name);
+      strcat(p, "<");
+      strcat(p, q);
+      strcat(p, " >");
+      break;
+    }
+  default:
+    return "UnknownType";   
+  }
+  return p;
+}
+
+char *
+c_storage(Storage sto)
+{ char *p;
+  static char buf[256];
+  if (sto & Sconst)
+  { p = c_storage(sto & ~Sconst);
+    strcat(p, "const ");
+    return p;
+  }
+  if (sto & Sauto)
+  { p = c_storage(sto & ~Sauto);
+    strcat(p, "auto ");
+    return p;
+  }
+  if (sto & Sregister)
+  { p = c_storage(sto & ~Sregister);
+    strcat(p, "register ");
+    return p;
+  }
+  if (sto & Sstatic)
+  { p = c_storage(sto & ~Sstatic);
+    strcat(p, "static ");
+    return p;
+  }
+  if (sto & Sexplicit)
+  { p = c_storage(sto & ~Sexplicit);
+    strcat(p, "explicit ");
+    return p;
+  }
+  if (sto & Sextern)
+  { p = c_storage(sto & ~Sextern);
+    return p;
+  }
+  if (sto & Stypedef)
+  { p = c_storage(sto & ~Stypedef);
+    strcat(p, "typedef ");
+    return p;
+  }
+  if (sto & Svirtual)
+  { p = c_storage(sto & ~Svirtual);
+    strcat(p, "virtual ");
+    return p;
+  }
+  if (sto & Sfriend)
+  { p = c_storage(sto & ~Sfriend);
+    strcat(p, "friend ");
+    return p;
+  }
+  if (sto & Sinline)
+  { p = c_storage(sto & ~Sinline);
+    strcat(p, "inline ");
+    return p;
+  }
+  buf[0]= '\0';
+  return buf;
+}
+
+char *
+c_init(Entry *e)
+{ static char buf[1024];
+  buf[0] = '\0';
+  if (e->info.hasval)
+    switch (e->info.typ->type)
+    { case Tchar:
+      case Twchar:
+      case Tuchar:
+      case Tshort:
+      case Tushort:
+      case Tint:
+      case Tuint:
+      case Tlong:
+      case Tllong:
+      case Tulong:
+      case Tullong:
+      case Ttime:
+        sprintf(buf, " = "SOAP_LONG_FORMAT, e->info.val.i);
+	break;
+      case Tfloat:
+      case Tdouble:
+        sprintf(buf, " = %f", e->info.val.r);
+	break;
+      case Tenum:
+        sprintf(buf, " = (%s)"SOAP_LONG_FORMAT, c_type(e->info.typ), e->info.val.i);
+	break;
+      default:
+	if (e->info.val.s && strlen(e->info.val.s) < sizeof(buf)-6)
+          sprintf(buf, " = \"%s\"", e->info.val.s);
+	else if (e->info.typ->type == Tpointer)
+          sprintf(buf, " = NULL");
+	break;
+    }
+  return buf;
+}
+
+/* c_type_id returns the arraytype to be used in parameter declaration
+   Allows you to specify the identifier that acts acts as teh name of teh
+   type of array */
+char *
+c_type_id(Tnode *typ, char *ident)
+{
+  char *p,*q,tempBuf[10];
+  Tnode *temp;
+  Entry *e;
+  if (!typ)
+    return "NULL";
+  
+  switch(typ->type)
+  {
+  case Tnone:
+    p = ident;
+    break;
+  case Tvoid:
+    p = (char*)emalloc(6+strlen(ident));
+    strcpy(p, "void ");
+    strcat(p, ident);
+    break;
+  case Tchar:
+    p = (char*)emalloc(6+strlen(ident));
+    strcpy(p, "char ");
+    strcat(p, ident);
+    break;
+  case Twchar:
+    p = (char*)emalloc(9+strlen(ident));
+    strcpy(p, "wchar_t ");
+    strcat(p, ident);
+    break;
+  case Tshort:
+    p = (char*)emalloc(7+strlen(ident));
+    strcpy(p, "short ");
+    strcat(p, ident);
+    break;
+  case Tint  :
+    p = (char*)emalloc(5+strlen(ident));
+    strcpy(p, "int ");
+    strcat(p, ident);
+    break;
+  case Tlong  :
+    p = (char*)emalloc(6+strlen(ident));
+    strcpy(p, "long ");
+    strcat(p, ident);
+    break;
+  case Tllong  :
+    p = (char*)emalloc(8+strlen(ident));
+    strcpy(p, "LONG64 ");
+    strcat(p, ident);
+    break;
+  case Tfloat:
+    p = (char*)emalloc(7+strlen(ident));
+    strcpy(p, "float ");
+    strcat(p, ident);
+    break;
+  case Tdouble:
+    p = (char*)emalloc(8+strlen(ident));
+    strcpy(p, "double ");
+    strcat(p, ident);
+    break;
+  case Tuchar:
+    p = (char*)emalloc(15+strlen(ident));
+    strcpy(p, "unsigned char ");
+    strcat(p, ident);
+    break;
+  case Tushort:
+    p = (char*)emalloc(16+strlen(ident));
+    strcpy(p, "unsigned short ");
+    strcat(p, ident);
+    break;
+  case Tuint:
+    p = (char*)emalloc(14+strlen(ident));
+    strcpy(p, "unsigned int ");
+    strcat(p, ident);
+    break;
+  case Tulong:
+    p = (char*)emalloc(15+strlen(ident));
+    strcpy(p, "unsigned long ");
+    strcat(p, ident);
+    break;
+  case Tullong:
+    p = (char*)emalloc(9+strlen(ident));
+    strcpy(p, "ULONG64 ");
+    strcat(p, ident);
+    break;
+  case Ttime:
+    p = (char*)emalloc(8+strlen(ident));
+    strcpy(p, "time_t ");
+    strcat(p, ident);
+    break;
+  case Tstruct:
+    p=(char*) emalloc((9+strlen(typ->id->name)+strlen(ident)) *sizeof(char));
+    strcpy(p,"struct ");
+    strcat(p,typ->id->name);
+    strcat(p, " ");
+    strcat(p,ident);
+    break;
+  case Tclass:
+    if (!typ->generated)
+    { p=(char*) emalloc((8+strlen(typ->id->name)+strlen(ident)) *sizeof(char));
+      strcpy(p, "class ");
+      strcat(p, typ->id->name);
+      typ->generated = True;
+    }
+    else
+    { p=(char*) emalloc((2+strlen(typ->id->name)+strlen(ident)) *sizeof(char));
+      strcpy(p, typ->id->name);
+    }
+    strcat(p, " ");
+    strcat(p, ident);
+    break;
+  case Tunion:
+    p=(char*) emalloc((8+strlen(typ->id->name)+strlen(ident)) *sizeof(char));
+    strcpy(p,"union ");
+    strcat(p,typ->id->name);
+    strcat(p, " ");
+    strcat(p, ident);
+    break;
+  case Tenum:
+    if (typ->ref == booltable)
+    { p = (char*)emalloc((strlen(ident)+6)*sizeof(char));
+      strcpy(p, "bool ");
+      strcat(p, ident);
+      return p;
+    }
+    p=(char*) emalloc((7+strlen(typ->id->name)+strlen(ident)) *sizeof(char));
+    strcpy(p, "enum ");
+    strcat(p, typ->id->name);
+    strcat(p, " ");
+    strcat(p, ident);
+    break;
+  case Tpointer:
+    p = (char*)emalloc(strlen(ident)+2);
+    strcpy(p+1, ident);
+    p[0] = '*';
+    p = c_type_id(typ->ref, p);
+    break;
+  case Treference:
+    p = (char*)emalloc(strlen(ident)+2);
+    strcpy(p+1, ident);
+    p[0] = '&';
+    p = c_type_id(typ->ref, p);
+    break;
+  case Tarray:
+    temp = typ;
+    while(((Tnode*) (typ->ref))->type==Tarray){
+      typ = typ->ref;
+    }
+    p=(char*) emalloc((12+strlen(q = c_type_id(typ->ref, ident))) *sizeof(char));
+    strcpy(p, q);
+    typ = temp;
+    while(typ->type==Tarray){
+      if (((Tnode*) typ->ref)->width)
+      { sprintf(tempBuf,"[%d]",(typ->width / ((Tnode*) typ->ref)->width));
+        strcat(p,tempBuf);
+      }
+      typ = typ->ref;
+    }
+    /*if(((Tnode*) (typ->ref))->type==Tarray){
+      sprintf(p,"%s [%d]",c_type(typ->ref),(typ->width / ((Tnode*) typ->ref)->width));
+    }else
+    sprintf(p,"%s a[%d]",c_type(typ->ref),(typ->width /((Tnode*) typ->ref)->width));*/
+    break;
+  case Tfun:
+    if (strncmp(ident, "operator ", 9))
+      q = c_type_id(((FNinfo*)typ->ref)->ret, ident);
+    else
+      q = ident;
+    p = (char*)emalloc(1024);
+    strcpy(p, q);
+    strcat(p, "(");
+    for (e = ((FNinfo*)typ->ref)->args->list; e; e = e->next)
+    { strcat(p, c_storage(e->info.sto));
+      strcat(p, c_type_id(e->info.typ, e->sym->name));
+      strcat(p, c_init(e));
+      if (e->next)
+        strcat(p, ", ");
+    }
+    strcat(p, ")");
+    break;
+  case Ttemplate:
+    if (typ->ref)
+    { p=(char*)emalloc((strlen(q = c_type(typ->ref))+strlen(typ->id->name)+strlen(ident)+4) *sizeof(char));
+      strcpy(p, typ->id->name);
+      strcat(p, "<");
+      strcat(p, q);
+      strcat(p, " >");
+      strcat(p, ident);
+      break;
+    }
+  default:
+    return "UnknownType";   
+  }
+  return p;
+}
+
+char *
+xsi_type_Tarray(Tnode *typ)
+{ Tnode *t;
+  int cardinality;
+  char *p, *s;
+  t = typ->ref;
+  cardinality = 1;
+  while (t->type == Tarray || (is_dynamic_array(t) && !has_ns(t) && !is_untyped(typ)))
+  { if( t->type == Tarray)
+      t = t->ref;
+    else
+      t = ((Table*)t->ref)->list->info.typ->ref;
+    cardinality++;
+  }
+  s = xsi_type(t);
+  if (!*s)
+    s = wsdl_type(t, "");
+  p = (char*)emalloc(strlen(s)+cardinality+3);
+  strcpy(p, s);
+  if (cardinality > 1)
+  { strcat(p, "[");
+    for (; cardinality > 2; cardinality--)
+      strcat(p, ",");
+    strcat(p, "]");
+  }
+  /*
+  for (; cardinality; cardinality--)
+  { t = typ;
+    for (i = 1; i < cardinality; i++)
+      t = t->ref;
+    sprintf(temp,"[%d]",get_dimension(t));
+    strcat(p, temp);
+  }
+  */
+  return p;
+}
+
+char *
+xsi_type_Darray(Tnode *typ)
+{ Tnode *t;
+  int cardinality;
+  char *p, *s;
+  if (!typ->ref)
+    return "";
+  t = ((Table*)typ->ref)->list->info.typ->ref;
+  cardinality = 1;
+  while (t->type == Tarray || (is_dynamic_array(t) && !has_ns(t) && !is_untyped(typ)))
+  { if( t->type == Tarray)
+      t = t->ref;
+    else
+      t = ((Table*)t->ref)->list->info.typ->ref;
+    cardinality++;
+  }
+  s = xsi_type(t);
+  if (!*s)
+    s = wsdl_type(t, "");
+  p = (char*)emalloc(strlen(s)+cardinality*2+1);
+  strcpy(p, s);
+  if (cardinality > 1)
+  { strcat(p, "[");
+    for (; cardinality > 2; cardinality--)
+      strcat(p, ",");
+    strcat(p, "]");
+  }
+  return p;
+}
+
+void
+out_generate(Tnode *typ)
+{
+	if (is_transient(typ) || typ->type == Twchar || is_XML(typ) || is_void(typ))
+	  return;
+	if (is_imported(typ))
+	  return;
+	if (lflag && typ->type == Tint && !typ->sym)
+	{ fprintf(fhead,"\n\n#ifndef %s",soap_type(typ));	
+	  fprintf(fhead,"\n#define %s (%d)",soap_type(typ),typ->num);	
+	  fprintf(fhead,"\n#endif");	
+          fprintf(fhead,"\n\nSOAP_FMAC1 void SOAP_FMAC2 soap_default_int(struct soap*, int*);"); 
+          fprintf(fhead,"\nSOAP_FMAC1 int SOAP_FMAC2 soap_out_int(struct soap*, const char*, int, const int*, const char*);"); 
+          fprintf(fhead,"\nSOAP_FMAC1 int* SOAP_FMAC2 soap_in_int(struct soap*, const char*, int*, const char*);"); 
+	  return; /* do not generate int serializers in libs */
+	}
+	if (is_primitive(typ) || is_string(typ) || is_wstring(typ))
+	{	      /* typeNO++; */
+		      fprintf(fhead,"\n\n#ifndef %s",soap_type(typ));	
+		      fprintf(fhead,"\n#define %s (%d)",soap_type(typ),typ->num);	
+		      fprintf(fhead,"\n#endif");	
+			fflush(fhead);
+			defaults(typ);
+			mark(typ);
+			soap_put(typ);
+			soap_out(typ);
+			soap_get(typ);
+			soap_in(typ);
+	  return;
+	}
+        switch(typ->type)
+        {
+	  case Ttemplate:
+	  case Tenum:
+          case Tpointer:
+          case Tarray:
+          case Tstruct:
+	  case Tclass:
+          case Tunion:
+  			if (is_header_or_fault(typ) || is_body(typ))
+			{ fprintf(fhead,"\n\n#ifndef WITH_NOGLOBAL");
+			  fprintf(fout,"\n\n#ifndef WITH_NOGLOBAL");
+		        }
+		      fprintf(fhead,"\n\n#ifndef %s",soap_type(typ));	
+		      fprintf(fhead,"\n#define %s (%d)",soap_type(typ),typ->num);	
+		      fprintf(fhead,"\n#endif");	
+		      fflush(fhead);
+                      mark(typ);
+		      defaults(typ);	
+		      soap_put(typ);
+		      soap_out(typ);
+		      soap_get(typ);	
+		      soap_in(typ);
+		      if (typ->type == Tstruct || typ->type == Tclass || typ->type == Ttemplate)
+		        soap_instantiate_class(typ);
+  		      if (is_header_or_fault(typ) || is_body(typ))
+    		      { fprintf(fhead,"\n\n#endif");
+    		        fprintf(fout,"\n\n#endif");
+		      }
+                      break;
+              default:break;
+         }
+}
+
+void
+matlab_gen_sparseStruct(void)
+{
+  fprintf(fmheader,"\nstruct soapSparseArray{\n");
+  fprintf(fmheader,"  int *ir;\n");
+  fprintf(fmheader,"  int *jc;\n");
+  fprintf(fmheader,"  double *pr;\n");
+  fprintf(fmheader,"  int num_columns;\n");
+  fprintf(fmheader,"  int num_rows;\n");
+  fprintf(fmheader,"  int nzmax;\n");
+  fprintf(fmheader,"};\n");
+}
+
+void
+matlab_c_to_mx_sparse(void)
+{
+  fprintf(fmheader,"\nmxArray* c_to_mx_soapSparseArray(struct soapSparseArray);\n");
+  fprintf(fmatlab,"\nmxArray* c_to_mx_soapSparseArray(struct soapSparseArray a)\n");
+  fprintf(fmatlab,"{\n");
+  fprintf(fmatlab,"  mxArray *b;\n");
+  fprintf(fmatlab,"  b = mxCreateSparse(a.num_rows, a.num_columns, a.nzmax, mxREAL);\n");
+  fprintf(fmatlab,"  mxSetIr(b,a.ir);\n");
+  fprintf(fmatlab,"  mxSetJc(b,a.jc);\n");
+  fprintf(fmatlab,"  mxSetPr(b,a.pr);\n");
+  fprintf(fmatlab,"  return b;\n");
+  fprintf(fmatlab,"}\n");
+}
+
+void 
+matlab_mx_to_c_sparse(void)
+{
+  fprintf(fmheader,"\nmxArray* mx_to_c_soapSparseArray(const mxArray *, struct soapSparseArray *);\n");
+  fprintf(fmatlab,"\nmxArray* mx_to_c_soapSparseArray(const mxArray *a, struct soapSparseArray *b)\n");
+  fprintf(fmatlab,"{\n");
+  fprintf(fmatlab,"  if(!mxIsSparse(a))\n");
+  fprintf(fmatlab,"    {\n");
+  fprintf(fmatlab,"      mexErrMsgTxt(\"Input should be a sparse array.\");\n");
+  fprintf(fmatlab,"    }\n");
+  
+  fprintf(fmatlab,"  /* Get the starting positions of the data in the sparse array. */  \n");
+  fprintf(fmatlab,"  b->pr = mxGetPr(a);\n");
+  fprintf(fmatlab,"  b->ir = mxGetIr(a);\n");
+  fprintf(fmatlab,"  b->jc = mxGetJc(a);\n");
+  fprintf(fmatlab,"  b->num_columns = mxGetN(a);\n");
+  fprintf(fmatlab,"  b->num_rows = mxGetM(a);\n");
+  fprintf(fmatlab,"  b->nzmax = mxGetNzmax(a);\n");
+  fprintf(fmatlab,"}\n");
+}
+
+void
+matlab_mx_to_c_dynamicArray(typ)
+Tnode* typ;
+{  
+  int d,i;
+  Entry *p;
+
+  p = is_dynamic_array(typ);
+
+  fprintf(fmatlab,"{\n");  
+  fprintf(fmatlab,"\tint i, numdims;\n");
+  fprintf(fmatlab,"\tconst int *dims;\n");
+  fprintf(fmatlab,"\tdouble *temp;\n");
+  fprintf(fmatlab,"\tint size = 1;\n");
+  fprintf(fmatlab,"\tint ret;\n");
+  fprintf(fmatlab,"\tnumdims = mxGetNumberOfDimensions(a);\n");
+  fprintf(fmatlab,"\tdims = mxGetDimensions(a);\n");
+
+  d = get_Darraydims(typ);
+  fprintf(fmatlab,"\tif (numdims != %d)\n", d);
+  fprintf(fmatlab,"\t\tmexErrMsgTxt(\"Incompatible array specifications in C and mx.\");\n");
+  
+  /*
+  fprintf(fmatlab,"\tfor(i=0;i<numdims; i++) {\n");
+  fprintf(fmatlab,"\t  b->__size[i] = dims[i];\n");
+  fprintf(fmatlab,"\t}\n");
+  */
+
+  if((((Tnode *)p->info.typ->ref)->type != Tchar) && (((Tnode *)p->info.typ->ref)->type != Tuchar))
+    {
+      fprintf(fmatlab,"\ttemp = (double*)mxGetPr(a);\n");
+      fprintf(fmatlab,"\tif (!temp)\n\t\tmexErrMsgTxt(\"mx_to_c_ArrayOfdouble: Pointer to data is NULL\");\n");
+    }
+
+  fprintf(fmatlab,"\tfor (i = 0; i < numdims; i++) {\n");
+  fprintf(fmatlab,"\t\tif (b->__size[i] < dims[i])\n");
+  fprintf(fmatlab,"\t\t\tmexErrMsgTxt(\"Incompatible array dimensions in C and mx.\");\n");
+  fprintf(fmatlab,"\t\tsize *= dims[i];\n");
+  fprintf(fmatlab,"\t}\n");
+
+  if((((Tnode *)p->info.typ->ref)->type != Tchar) && (((Tnode *)p->info.typ->ref)->type != Tuchar))
+    { 
+      fprintf(fmatlab,"\tfor (i = 0; i < size; i++)\n");
+      fprintf(fmatlab,"\t\tb->__ptr[i] = (%s)*temp++;\n", c_type(p->info.typ->ref));
+    }
+  else
+    {
+      fprintf(fmatlab,"\tret = mxGetString(a, b->__ptr, size + 1);\n");
+      fprintf(fmatlab,"\tmexPrintf(\"ret = %%d, b->__ptr = %%s, size = %%d\", ret, b->__ptr, size);\n");
+    }
+  fprintf(fmatlab,"\n}\n");
+
+  fflush(fmatlab);
+}
+
+
+void
+matlab_c_to_mx_dynamicArray(typ)
+Tnode* typ;
+{  
+  int d,i;
+  Entry *p;
+
+  p = is_dynamic_array(typ);
+
+  fprintf(fmatlab,"{\n");  
+  fprintf(fmatlab,"\tmxArray *out;\n");
+  fprintf(fmatlab,"\t%s;\n",c_type_id(p->info.typ->ref,"*temp"));
+  d = get_Darraydims(typ);
+  fprintf(fmatlab,"\tint i;\n");
+
+  fprintf(fmatlab,"\tint ndim = %d, dims[%d] = {", d, d);
+  for (i = 0; i < d; i++)
+    { 
+      if(i==0)
+	fprintf(fmatlab,"a.__size[%d]",i);
+      else
+	fprintf(fmatlab,", a.__size[%d]",i);
+    }
+  fprintf(fmatlab,"};\n");
+
+  fprintf(fmatlab,"\tint size = ");
+   for (i = 0; i < d; i++)
+    { 
+      if(i==0)
+	fprintf(fmatlab,"dims[%d]",i);
+      else
+	fprintf(fmatlab,"*dims[%d]",i);
+    }
+   fprintf(fmatlab,";\n");
+   if((((Tnode *)p->info.typ->ref)->type != Tchar) && (((Tnode *)p->info.typ->ref)->type != Tuchar))
+     {
+       fprintf(fmatlab,"\tout = mxCreateNumericArray(ndim, dims, %s, mxREAL);\n",get_mxClassID(p->info.typ->ref));
+       fprintf(fmatlab,"\tif (!out)\n\t\tmexErrMsgTxt(\"Could not create mxArray.\");\n");
+       fprintf(fmatlab,"\ttemp = (%s) mxGetPr(out);\n",c_type_id(p->info.typ->ref,"*"));
+       fprintf(fmatlab,"\tif (!temp)\n\t\tmexErrMsgTxt(\"matlab_array_c_to_mx: Pointer to data is NULL\");\n");
+
+       fprintf(fmatlab,"\tfor (i = 0; i < size; i++)\n");
+       fprintf(fmatlab,"\t\t*temp++ = a.__ptr[i];\n");
+     }
+   else
+     {
+       fprintf(fmatlab,"\tout = mxCreateString(a.__ptr);\n");
+       fprintf(fmatlab,"\tif (!out)\n\t\tmexErrMsgTxt(\"Could not create mxArray.\");\n");
+     }
+  fprintf(fmatlab,"\treturn out;\n}\n");
+  fflush(fmatlab);
+}
+
+char* 
+get_mxClassID(Tnode* typ)
+{
+  
+  switch(typ->type)
+    {
+    case Tdouble: 
+      return "mxDOUBLE_CLASS";
+    case Tfloat:
+      return "mxSINGLE_CLASS";
+    case Tshort:
+      return "mxINT16_CLASS";
+    case Tushort:
+      return "mxUINT16_CLASS";
+    case Tint:
+      return "mxINT32_CLASS";
+    case Tuint:
+      return "mxUINT32_CLASS";
+    case Tlong:
+      return "mxINT32_CLASS";
+    case Tulong:
+      return "mxUINT32_CLASS";
+    case Tllong:
+      return "mxINT64_CLASS";
+    case Tullong:
+      return "mxUINT64_CLASS";
+    case Tchar:
+      return "mxCHAR_CLASS";
+    case Tuchar:
+      return "mxCHAR_CLASS";
+    default:
+      return "";
+    };
+}
+
+/*Function not in use.*/
+void 
+matlab_array_c_to_mx(typ)
+Tnode* typ;
+{
+  Tnode* temp;
+  int cardinality;
+  int d,i;
+  
+  fprintf(fmatlab,"{\n\tint rows, r, cols, c;\n");
+  fprintf(fmatlab,"\tmxArray* out;\n");
+  fprintf(fmatlab,"\tdouble* temp;\n");
+  d = get_dimension(typ);
+  fprintf(fmatlab,"\tint ndim = %d, dims[%d] = {",d,d);
+  temp=typ;
+  for(i=0;i<d; i++)
+    {
+      if(i==0)
+	fprintf(fmatlab,"%d",temp->width / ((Tnode*) temp->ref)->width);
+      else
+	fprintf(fmatlab,",%d",temp->width / ((Tnode*) temp->ref)->width);
+      temp=typ->ref;
+    }
+  fprintf(fmatlab,"};\n");
+
+  fprintf(fmatlab,"\tout = mxCreateNumericArray(ndim, dims, mxDOUBLE_CLASS, mxREAL);\n");
+  fprintf(fmatlab,"\ttemp = (double *) mxGetPr(out);\n");
+  fprintf(fmatlab,"\tif (!out)\n\t\tmexErrMsgTxt(\"Could not create mxArray.\");\n");
+  fprintf(fmatlab,"\tif (!temp)\n\t\tmexErrMsgTxt(\"matlab_array_c_to_mx: Pointer to data is NULL\");\n");
+  fprintf(fmatlab,"\trows = mxGetM(out);\n");
+  fprintf(fmatlab,"\tif (!rows)\n\t\tmexErrMsgTxt(\"matlab_array_c_to_mx: Data has zero rows\");\n");
+  fprintf(fmatlab,"\tcols = mxGetN(out);\n");
+  fprintf(fmatlab,"\tif (!cols)\n\t\tmexErrMsgTxt(\"matlab_array_c_to_mx: Data has zero columns\");\n");
+  fprintf(fmatlab,"\tfor (c = 0; c < cols; c++)\n");
+  fprintf(fmatlab,"\t\tfor (r = 0; r < rows; r++)\n");
+  fprintf(fmatlab,"\t\t\t*temp++ = z->a[r][c];\n");
+  fprintf(fmatlab,"\treturn out;\n}\n");
+  fflush(fmatlab);
+}
+
+
+void matlab_c_to_mx_pointer(typ)
+Tnode* typ;
+{
+  if (!typ->ref)
+    return;
+
+  /*  if(((Tnode*)typ->ref)->type == Tstruct)
+    {
+      fprintf(fmheader,"\nmxArray* c_to_mx_%s(%s);\n",c_ident(typ),c_type_id(typ, "*"));
+      fprintf(fmatlab,"\nmxArray* c_to_mx_%s(%s)\n",c_ident(typ),c_type_id(typ, "*a"));
+    }
+  else
+  {*/
+  fprintf(fmheader,"\nmxArray* c_to_mx_%s(%s);\n",c_ident(typ),c_type_id(typ, ""));
+  fprintf(fmatlab,"\nmxArray* c_to_mx_%s(%s)\n",c_ident(typ),c_type_id(typ, "a"));
+      /*  }*/
+  fprintf(fmatlab,"{\n");
+  fprintf(fmatlab,"\tmxArray  *fout;\n");
+  fprintf(fmatlab,"\tfout = c_to_mx_%s(*a);\n",c_ident(typ->ref));
+  fprintf(fmatlab,"\treturn fout;\n");
+  fprintf(fmatlab,"}\n");
+}
+
+void matlab_mx_to_c_pointer(typ)
+Tnode* typ;
+{
+  if (!typ->ref)
+    return;
+  fprintf(fmheader,"\nvoid mx_to_c_%s(const mxArray*,%s);\n",c_ident(typ),c_type_id(typ, "*"));
+  fprintf(fmatlab,"\nvoid mx_to_c_%s(const mxArray* a,%s)\n",c_ident(typ),c_type_id(typ, "*b"));
+  fprintf(fmatlab,"{\n\tmx_to_c_%s(a,*b);\n",c_ident(typ->ref));
+  fprintf(fmatlab,"\n}\n");
+}
+
+void func2(typ)
+Tnode* typ;
+{
+  Table *table,*t;
+  Entry *p;
+
+  fprintf(fmatlab,"\tif(!mxIsStruct(a))\n\t\tmexErrMsgTxt(\"Input must be a structure.\");\n");
+
+  table=(Table*)typ->ref;
+  for (t = table; t != (Table *) 0; t = t->prev) { 
+    for (p = t->list; p != (Entry*) 0; p = p->next) {
+      if (p->info.typ->type != Tfun && !is_void(p->info.typ) && !is_XML(p->info.typ))
+	{
+	  fprintf(fmatlab,"\t{mxArray *tmp = mxGetField(a,0,\"%s\");\n",p->sym->name);
+	  fprintf(fmatlab,"\tif (!tmp) {\n");
+	  fprintf(fmatlab,"\t\tmexErrMsgTxt(\"Above field is empty!\");\n\t}\n");   
+	  fprintf(fmatlab,"\tmx_to_c_%s(tmp,&(b->%s));}\n",c_ident(p->info.typ),p->sym->name);
+	}
+    }
+  }
+}
+
+void 
+matlab_mx_to_c_struct(typ)
+Tnode* typ;
+{
+  if (!typ->ref)
+    return;
+
+  
+  if (is_dynamic_array(typ))
+    {
+      fprintf(fmheader,"\nvoid mx_to_c_%s(const mxArray*, %s);\n",c_ident(typ),c_type_id(typ, "*"));
+      fprintf(fmatlab,"\nvoid mx_to_c_%s(const mxArray* a, %s)\n",c_ident(typ),c_type_id(typ, "*b"));
+      matlab_mx_to_c_dynamicArray(typ);
+      return;
+    }
+  else if(strstr(c_type_id(typ, ""),"soapSparseArray"))
+    {
+      return;
+    }
+
+  fprintf(fmheader,"\nvoid mx_to_c_%s(const mxArray*, %s);\n",c_ident(typ),c_type_id(typ, "*"));
+  fprintf(fmatlab,"\nvoid mx_to_c_%s(const mxArray* a, %s)\n",c_ident(typ),c_type_id(typ, "*b"));
+  fprintf(fmatlab,"{\n");
+  
+  func2(typ);
+  fprintf(fmatlab,"\n}\n");
+  
+  return;
+}
+
+
+
+void
+matlab_c_to_mx_struct(typ)
+Tnode* typ;
+{
+  Table *table,*t;
+  Entry *p;
+  int number_of_fields=0;
+
+  if (!typ->ref)
+    return;
+
+  if (is_dynamic_array(typ))
+    {
+      fprintf(fmheader,"\nmxArray* c_to_mx_%s(%s);\n",c_ident(typ),c_type_id(typ, ""));
+      fprintf(fmatlab,"\nmxArray* c_to_mx_%s(%s)\n",c_ident(typ),c_type_id(typ, "a"));
+      matlab_c_to_mx_dynamicArray(typ);
+      return;
+    }
+  else if(strstr(c_type_id(typ, ""),"soapSparseArray"))
+    {
+      return;
+    }
+  
+  fprintf(fmheader,"\nmxArray* c_to_mx_%s(%s);\n",c_ident(typ),c_type_id(typ, ""));
+  fprintf(fmatlab,"\nmxArray* c_to_mx_%s(%s)\n",c_ident(typ),c_type_id(typ, "a"));
+  table=(Table*)typ->ref;	
+  fprintf(fmatlab,"{\n\tconst char* fnames[] = {"); 
+  for (t = table; t != (Table *) 0; t = t->prev) { 
+    for (p = t->list; p != (Entry*) 0; p = p->next) {
+      if (p->info.typ->type != Tfun && !is_void(p->info.typ) && !is_XML(p->info.typ))
+	{
+	  if(number_of_fields)
+	    fprintf(fmatlab,",\"%s\"",p->sym->name);
+	  else 
+	    fprintf(fmatlab,"\"%s\"",p->sym->name);
+	  number_of_fields++;
+	}
+    }
+  }	
+  fprintf(fmatlab,"}; /* pointers to field names*/\n"); 
+  
+  fprintf(fmatlab,"\tint rows = 1, cols = 1;\n\tint index = 0;\n\tint number_of_fields = %d;\n\tmxArray *struct_array_ptr;\n",number_of_fields);
+  fprintf(fmatlab,"\t/* Create a 1x1 struct matrix for output  */\n");
+  fprintf(fmatlab,"\tstruct_array_ptr = mxCreateStructMatrix(rows, cols, number_of_fields, fnames);\n\tmexPrintf(\"6\");\n\tif(struct_array_ptr == NULL) {\n\t\tmexPrintf(\"COULDNT CREATE A MATRIX\");}\n\tmexPrintf(\"7\");\n");
+  
+  
+  for (t = table; t != (Table *) 0; t = t->prev) { 
+    for (p = t->list; p != (Entry*) 0; p = p->next) {
+      if (p->info.typ->type != Tfun && !is_void(p->info.typ) && !is_XML(p->info.typ))
+	{
+	  fprintf(fmatlab,"\t{mxArray *fout = c_to_mx_%s(a.%s);\n",c_ident(p->info.typ),p->sym->name);
+	  fprintf(fmatlab,"\tmxSetField(struct_array_ptr, index,\"%s\" , fout);}\n",p->sym->name);
+	}
+    }
+  }
+  fprintf(fmatlab,"\treturn struct_array_ptr;\n}\n");
+  return;
+}
+/*
+char*
+matlab_c_to_mx(typ)
+Tnode* typ;
+{
+
+  switch(typ->type)
+    {
+    case Tstruct:
+      break;
+    case Tarray:
+      matlab_array_c_to_mx(typ);break;
+    case Tpointer:
+      fprintf(fmheader,"\npointer in matlab_c_to_mx\n");break;
+    default:break;
+    }
+  
+  return NULL;
+}
+*/
+
+void
+matlab_c_to_mx_primitive(typ)
+Tnode *typ;
+{
+  fprintf(fmheader,"\nmxArray* c_to_mx_%s(%s);",c_ident(typ),c_type_id(typ, ""));
+  fprintf(fmatlab,"\nmxArray* c_to_mx_%s(%s)\n",c_ident(typ),c_type_id(typ, "a"));
+
+  fprintf(fmatlab,"{\n\tmxArray  *fout;\n");
+  if((typ->type == Tchar) || (typ->type == Tuchar))
+    {
+      fprintf(fmatlab,"\tchar buf[2];\n");
+      fprintf(fmatlab,"\tbuf[0] = a;\n");
+      fprintf(fmatlab,"\tbuf[1] = \'\\0\';\n");
+      fprintf(fmatlab,"\tfout = mxCreateString(buf);\n");
+      fprintf(fmatlab,"\tif (!fout)\n");
+      fprintf(fmatlab,"\t\tmexErrMsgTxt(\"Could not create mxArray.\");\n");
+    }
+  else
+    {
+      fprintf(fmatlab,"\tint ndim = 1, dims[1] = {1};\n");
+      fprintf(fmatlab,"\tfout = mxCreateNumericArray(ndim, dims, %s, mxREAL);\n",get_mxClassID(typ));
+      fprintf(fmatlab,"\t%s = (%s)mxGetPr(fout);\n",c_type_id(typ,"*temp"),c_type_id(typ,"*"));
+      fprintf(fmatlab,"\tif (!fout)\n");
+      fprintf(fmatlab,"\t\tmexErrMsgTxt(\"Could not create mxArray.\");\n");
+      fprintf(fmatlab,"\tif (!temp) \n");
+      fprintf(fmatlab,"\t\tmexErrMsgTxt(\"matlab_array_c_to_mx: Pointer to data is NULL\");\n");
+      fprintf(fmatlab,"\t*temp++= a;\n");
+    }
+  fprintf(fmatlab,"\treturn fout;\n}\n");
+}
+
+void
+matlab_mx_to_c_primitive(typ)
+Tnode *typ;
+{
+  fprintf(fmheader, "\nvoid mx_to_c_%s(const mxArray *, %s);\n",c_ident(typ),c_type_id(typ, "*"));
+  fprintf(fmatlab, "\nvoid mx_to_c_%s(const mxArray *a, %s)\n",c_ident(typ),c_type_id(typ, "*b"));
+  if((typ->type == Tchar) || (typ->type == Tuchar))
+    {
+      fprintf(fmatlab,"{\n\tint ret;\n");
+      fprintf(fmatlab,"\tchar buf[2];\n");
+      fprintf(fmatlab,"\tret = mxGetString(a, buf, 2);\n");
+      fprintf(fmatlab,"\tmexPrintf(\"ret = %%d, buf = %%s\", ret, buf);\n");
+      fprintf(fmatlab,"\t*b = buf[0];\n");
+    }
+  else
+    {
+      fprintf(fmatlab,"{\n\tdouble* data = (double*)mxGetData(a);\n");
+      fprintf(fmatlab,"\t*b = (%s)*data;\n",c_type(typ));
+    }
+      fprintf(fmatlab,"\n}\n");
+}
+
+void
+matlab_out_generate(typ)
+Tnode *typ;
+{
+
+  if (is_transient(typ) || typ->type == Twchar || is_XML(typ))
+    return;
+
+  /*
+  typeNO++;
+  if (typeNO>=1024)
+    execerror("Too many user-defined data types");
+    */
+
+  if(is_primitive(typ))
+    {
+      matlab_c_to_mx_primitive(typ);
+      matlab_mx_to_c_primitive(typ);
+      return;
+    }
+
+  switch(typ->type)
+    {
+    case Tstruct:
+      matlab_c_to_mx_struct(typ);
+      matlab_mx_to_c_struct(typ);
+      break;
+    case Tpointer:
+      matlab_c_to_mx_pointer(typ);
+      matlab_mx_to_c_pointer(typ);
+      break;
+    case Tarray:
+      break;
+    default:break;
+    }
+}
+
+/*his function is called first it first generates all routines
+  and then in the second pass calls all routines to generate
+  matlab_out for the table*/
+
+void
+func1(Table *table, Entry *param)
+{ 
+
+  Service *sp;
+  Entry *pin,*q,*pout,*response=NULL;
+  Tnode *temp;
+  Table *output,*t;
+  int cardinality, element_width, i, flag = 0;
+  q=entry(table, param->sym);
+  if (q)
+    pout = (Entry*)q->info.typ->ref;
+  else	fprintf(stderr, "Internal error: no table entry\n");
+  q=entry(classtable, param->sym);
+  output=(Table*) q->info.typ->ref;
+
+  if (!is_response(pout->info.typ))
+  { response = get_response(param->info.typ);
+  }
+  
+  fprintf(fmheader,"\n\toutside loop struct %s soap_tmp_%s;",param->sym->name,param->sym->name);
+  if (!is_response(pout->info.typ) && response)
+  { fprintf(fmheader,"\n\tif..inside loop struct %s *soap_tmp_%s;",c_ident(response->info.typ), c_ident(response->info.typ));
+  } 
+
+  fflush(fmheader);
+}
+
+void
+matlab_def_table(Table *table)
+{
+  Entry *q1,*q,*pout,*e,*response;
+  int i;
+  Tnode *p;
+  char temp[100];
+
+  /*  for (q1 = table->list; q1 != (Entry*) 0; q1 = q1->next)
+    if (q1->info.typ->type==Tfun)
+      func1(table, q1);
+  */
+
+  /* Sparse matrix code will be present by default */
+  matlab_gen_sparseStruct();
+  matlab_c_to_mx_sparse();
+  matlab_mx_to_c_sparse();  
+
+  for(i=0;i<TYPES;i++)
+    for(p=Tptr[i];p!=(Tnode*) 0;p=p->next)
+      {
+	/* This is generated for everything declared in the ".h" file. To make
+	   sure that it doesnt get generated for functions do a comparison with
+	   p->sym->name, so that its not generated for functions.
+	*/
+	if(is_XML(p))
+	  continue;
+	if(strstr(c_ident(p),"SOAP_ENV_") != NULL)
+	  continue;
+	
+	for(q = table->list; q != (Entry*) 0; q = q->next)
+	  {
+	    if(strcmp(c_ident(p),q->sym->name) == 0)
+	      break;
+	    
+
+	    e=entry(table, q->sym);
+	    if (e)
+	      pout = (Entry*)e->info.typ->ref;
+	    else	fprintf(stderr, "Internal error: no table entry\n");
+	    
+	    if (!is_response(pout->info.typ))
+	    { response = get_response(q->info.typ);
+	    }
+	    if (!is_response(pout->info.typ) && response)
+	    {
+	      if(strcmp(c_ident(p),c_ident(response->info.typ)) == 0)
+		 break;
+	    }
+	  }
+
+	if(q == (Entry*) 0)
+	  matlab_out_generate(p);	  
+      }
+}
+
+void
+def_table(Table *table)
+{ int i;  
+  Tnode *p; 
+  for (i = 0; i < TYPES; i++)
+    for (p = Tptr[i]; p; p = p->next)
+      out_generate(p);
+}
+
+         
+int 
+no_of_var(typ)
+Tnode * typ;
+{
+  Entry *p;
+  Table *t;
+  int i=0;
+  if(typ->type==Tstruct || typ->type==Tclass)
+    {
+      t=typ->ref;
+      for (p = t->list; p != (Entry*) 0; p = p->next) {
+	if(p->info.typ->type==Tpointer)
+	  i++;
+      }
+    }
+  if((((Tnode *)(typ->ref))->type==Tstruct) ||
+     (((Tnode *)(typ->ref))->type==Tclass) )
+    {
+      t=((Tnode*)(typ->ref))->ref;
+      for (p = t->list; p != (Entry*) 0; p = p->next) {
+	if(p->info.typ->type==Tpointer)
+	  i++;
+      }
+    }
+  return i;
+}      
+
+void
+in_defs(Table *table)
+{ int i;  
+  Tnode *p;
+  for (i = 0; i < TYPES; i++)
+  { for (p = Tptr[i]; p; p = p->next)
+    { if (!is_transient(p) && p->type != Twchar && p->type != Tfun && p->type != Treference && p->type != Tunion && !is_XML(p) && !is_header_or_fault(p) && !is_body(p) && !is_template(p))
+      { char *s = xsi_type(p);
+        if (!*s)
+          s = wsdl_type(p, "");
+	if (*s == '-')
+	  continue;
+	if (is_string(p))
+          fprintf(fout,"\n\tcase %s:\n\t{\tchar **s;\n\t\ts = soap_in_%s(soap, NULL, NULL, \"%s\");\n\t\treturn s ? *s : NULL;\n\t}", soap_type(p), c_ident(p), s);
+	else if (is_wstring(p))
+          fprintf(fout,"\n\tcase %s:\n\t{\twchar_t **s;\n\t\ts = soap_in_%s(soap, NULL, NULL, \"%s\");\n\t\treturn s ? *s : NULL;\n\t}", soap_type(p), c_ident(p), s);
+	else
+          fprintf(fout,"\n\tcase %s:\n\t\treturn soap_in_%s(soap, NULL, NULL, \"%s\");", soap_type(p), c_ident(p), s);
+      }
+    }
+  }
+}
+
+void
+in_defs2(Table *table)
+{ int i;
+  Tnode *p;
+  char *s;
+  for (i = 0; i < TYPES; i++)
+  { for (p = Tptr[i]; p; p = p->next)
+    { if (!is_transient(p) && !is_template(p) && p->type != Twchar && p->type != Tfun && p->type != Tpointer && p->type != Treference && p->type != Tunion && !is_XML(p) && !is_header_or_fault(p) && !is_body(p) || is_string(p) && !is_XML(p))
+      { s = xsi_type(p);
+	if (!*s)
+	  s = wsdl_type(p, "");
+	if (*s == '-')
+	  continue;
+	if (*s)
+	  if (is_dynamic_array(p) && !is_binary(p) && !has_ns(p) && !is_untyped(p))
+	    fprintf(fout,"\n\t\tif (*soap->arrayType && !soap_match_array(soap, \"%s\"))\n\t\t{\t*type = %s;\n\t\t\treturn soap_in_%s(soap, NULL, NULL, NULL);\n\t\t}", s, soap_type(p), c_ident(p));
+	  else if (is_string(p))
+	    fprintf(fout,"\n\t\tif (!soap_match_tag(soap, t, \"%s\"))\n\t\t{\tchar **s;\n\t\t\t*type = %s;\n\t\t\ts = soap_in_%s(soap, NULL, NULL, NULL);\n\t\t\treturn s ? *s : NULL;\n\t\t}", s, soap_type(p), c_ident(p));
+	  else if (is_wstring(p))
+	    fprintf(fout,"\n\t\tif (!soap_match_tag(soap, t, \"%s\"))\n\t\t{\twchar_t **s;\n\t\t\t*type = %s;\n\t\t\ts = soap_in_%s(soap, NULL, NULL, NULL);\n\t\t\treturn s ? *s : NULL;\n\t\t}", s, soap_type(p), c_ident(p));
+          else
+	    fprintf(fout,"\n\t\tif (!soap_match_tag(soap, t, \"%s\"))\n\t\t{\t*type = %s;\n\t\t\treturn soap_in_%s(soap, NULL, NULL, NULL);\n\t\t}", s, soap_type(p), c_ident(p));
+      }
+    }
+  }
+}
+
+void
+out_defs(Table *table)
+{ int i;  
+  char *s;
+  Tnode *p;
+  for (i = 0; i < TYPES; i++)
+  { for (p = Tptr[i]; p; p = p->next)
+    { if (is_transient(p) || is_template(p) || is_XML(p) || is_header_or_fault(p) || is_body(p))
+        continue;
+      if (is_element(p))
+      { s = wsdl_type(p, "");
+	if (*s == '-')
+	  continue;
+        if (p->type == Tarray)
+          fprintf(fout,"\n\tcase %s:\n\t\treturn soap_out_%s(soap, \"%s\", id, (%s)ptr, NULL);", soap_type(p),c_ident(p),s,c_type_id(p->ref, "(*)"));
+        else if(p->type == Tclass && !is_external(p) && !is_volatile(p) && !is_typedef(p))
+          fprintf(fout,"\n\tcase %s:\n\t\treturn ((%s)ptr)->soap_out(soap, \"%s\", id, NULL);", soap_type(p), c_type_id(p, "*"),s);
+        else if (is_string(p))
+          fprintf(fout,"\n\tcase %s:\n\t\treturn soap_out_string(soap, \"%s\", id, (char**)&ptr, NULL);", soap_type(p),s);
+        else if (is_wstring(p))
+          fprintf(fout,"\n\tcase %s:\n\t\treturn soap_out_wstring(soap, \"%s\", id, (wchar_t**)&ptr, NULL);", soap_type(p),s);
+        else if (p->type == Tpointer)
+          fprintf(fout,"\n\tcase %s:\n\t\treturn soap_out_%s(soap, \"%s\", id, (%s)ptr, NULL);", soap_type(p),c_ident(p),s,c_type_id(p, "const*"));
+        else if(p->type != Tnone && p->type != Ttemplate && p->type != Twchar && !is_void(p) && p->type != Tfun && p->type != Treference && p->type != Tunion)
+          fprintf(fout,"\n\tcase %s:\n\t\treturn soap_out_%s(soap, \"%s\", id, (const %s)ptr, NULL);", soap_type(p),c_ident(p),s,c_type_id(p, "*"));
+      }
+      else
+      { s = xsi_type(p);
+        if (!*s)
+          s = wsdl_type(p, "");
+        if (*s == '-')
+          continue;
+        if (p->type == Tarray)
+          fprintf(fout,"\n\tcase %s:\n\t\treturn soap_out_%s(soap, tag, id, (%s)ptr, \"%s\");", soap_type(p), c_ident(p),c_type_id(p->ref, "(*)"), s);
+        else if(p->type == Tclass && !is_external(p) && !is_volatile(p) && !is_typedef(p))
+          fprintf(fout,"\n\tcase %s:\n\t\treturn ((%s)ptr)->soap_out(soap, tag, id, \"%s\");", soap_type(p), c_type_id(p, "*"), s);
+        else if (is_string(p))
+          fprintf(fout,"\n\tcase %s:\n\t\treturn soap_out_string(soap, tag, id, (char**)&ptr, \"%s\");", soap_type(p), s);
+        else if (is_wstring(p))
+          fprintf(fout,"\n\tcase %s:\n\t\treturn soap_out_wstring(soap, tag, id, (wchar_t**)&ptr, \"%s\");", soap_type(p), s);
+        else if (p->type == Tpointer)
+          fprintf(fout,"\n\tcase %s:\n\t\treturn soap_out_%s(soap, tag, id, (%s)ptr, \"%s\");", soap_type(p), c_ident(p),c_type_id(p, "const*"), s);
+        else if(p->type != Tnone && p->type != Ttemplate && p->type != Twchar && !is_void(p) && p->type != Tfun && p->type != Treference && p->type != Tunion)
+          fprintf(fout,"\n\tcase %s:\n\t\treturn soap_out_%s(soap, tag, id, (const %s)ptr, \"%s\");", soap_type(p), c_ident(p),c_type_id(p, "*"), s);
+      }
+    }
+  }
+}
+
+void
+mark_defs(Table *table)
+{ int i;  
+  Tnode *p;
+  for (i = 0; i < TYPES; i++)
+  { for (p = Tptr[i]; p; p = p->next)
+    { if (is_transient(p) || is_template(p) || is_XML(p) || is_header_or_fault(p) || is_body(p) || is_void(p))
+        continue;
+      if (p->type == Tarray)
+        fprintf(fout,"\n\tcase %s:\n\t\tsoap_serialize_%s(soap, (%s)ptr);\n\t\tbreak;", soap_type(p), c_ident(p),c_type_id(p->ref, "(*)"));
+      else if(p->type == Tclass && !is_external(p) && !is_volatile(p) && !is_typedef(p))
+        fprintf(fout,"\n\tcase %s:\n\t\t((%s)ptr)->soap_serialize(soap);\n\t\tbreak;", soap_type(p), c_type_id(p, "*"));
+      else if (is_string(p))
+        fprintf(fout,"\n\tcase %s:\n\t\tsoap_serialize_string(soap, (char**)&ptr);\n\t\tbreak;", soap_type(p));
+      else if (is_wstring(p))
+        fprintf(fout,"\n\tcase %s:\n\t\tsoap_serialize_wstring(soap, (wchar_t**)&ptr);\n\t\tbreak;", soap_type(p));
+      else if (p->type == Tpointer)
+        fprintf(fout,"\n\tcase %s:\n\t\tsoap_serialize_%s(soap, (%s)ptr);\n\t\tbreak;", soap_type(p), c_ident(p),c_type_id(p, "const*"));
+      else if(p->type == Ttemplate && p->ref)
+        fprintf(fout,"\n\tcase %s:\n\t\tsoap_serialize_%s(soap, (const %s)ptr);\n\t\tbreak;", soap_type(p), c_ident(p),c_type_id(p, "*"));
+      else if(!is_primitive(p) && p->type != Tnone && p->type != Ttemplate && !is_void(p) && p->type != Tfun && p->type != Treference && p->type != Tunion)
+        fprintf(fout,"\n\tcase %s:\n\t\tsoap_serialize_%s(soap, (const %s)ptr);\n\t\tbreak;", soap_type(p), c_ident(p),c_type_id(p, "*"));
+    }
+  }
+}
+
+void
+in_attach(Table *table)
+{ int i;  
+  Tnode *p;
+  for (i = 0; i < TYPES; i++)
+    for (p = Tptr[i]; p; p = p->next)
+      if (is_attachment(p))
+        if (p->type == Tclass)
+	  fprintf(fout,"\n\t\tcase %s:\n\t\t{\t%s a;\n\t\t\ta = (%s)soap_class_id_enter(soap, soap->dime.id, NULL, %s, sizeof(%s), NULL, NULL);\n\t\t\tif (a)\n\t\t\t{\ta->__ptr = (unsigned char*)soap->dime.ptr;\n\t\t\t\ta->__size = soap->dime.size;\n\t\t\t\ta->id = (char*)soap->dime.id;\n\t\t\t\ta->type = (char*)soap->dime.type;\n\t\t\t\ta->options = (char*)soap->dime.options;\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn soap->error;\n\t\t\tbreak;\n\t\t}", soap_type(p), c_type_id(p, "*"), c_type_id(p, "*"), soap_type(p), c_type(p));
+	else
+	  fprintf(fout,"\n\t\tcase %s:\n\t\t{\t%s a;\n\t\t\ta = (%s)soap_id_enter(soap, soap->dime.id, NULL, %s, sizeof(%s), 0, NULL, NULL, NULL);\n\t\t\tif (!a)\n\t\t\t\treturn soap->error;\n\t\t\ta->__ptr = (unsigned char*)soap->dime.ptr;\n\t\t\ta->__size = soap->dime.size;\n\t\t\ta->id = (char*)soap->dime.id;\n\t\t\ta->type = (char*)soap->dime.type;\n\t\t\ta->options = (char*)soap->dime.options;\n\t\t\tbreak;\n\t\t}", soap_type(p), c_type_id(p, "*"), c_type_id(p, "*"), soap_type(p), c_type(p));
+      else if (is_binary(p) && !is_transient(p))
+        if (p->type == Tclass)
+	  fprintf(fout,"\n\t\tcase %s:\n\t\t{\t%s a;\n\t\t\ta = (%s)soap_class_id_enter(soap, soap->dime.id, NULL, %s, sizeof(%s), NULL, NULL);\n\t\t\tif (!a)\n\t\t\t\treturn soap->error;\n\t\t\ta->__ptr = (unsigned char*)soap->dime.ptr;\n\t\t\ta->__size = soap->dime.size;\n\t\t\tbreak;\n\t\t}", soap_type(p), c_type_id(p, "*"), c_type_id(p, "*"), soap_type(p), c_type(p));
+	else
+	  fprintf(fout,"\n\t\tcase %s:\n\t\t{\t%s a;\n\t\t\ta = (%s)soap_id_enter(soap, soap->dime.id, NULL, %s, sizeof(%s), 0, NULL, NULL, NULL);\n\t\t\tif (!a)\n\t\t\t\treturn soap->error;\n\t\t\ta->__ptr = (unsigned char*)soap->dime.ptr;\n\t\t\ta->__size = soap->dime.size;\n\t\t\tbreak;\n\t\t}", soap_type(p), c_type_id(p, "*"), c_type_id(p, "*"), soap_type(p), c_type(p));
+}
+
+void
+soap_instantiate_class(Tnode *typ)
+{ Table *Tptr;
+  Entry *Eptr;
+  int derclass = 0;
+  char *s;
+  
+  if (cflag)
+    return;
+
+  fprintf(fhead,"\nSOAP_FMAC5 %s * SOAP_FMAC6 soap_new_%s(struct soap*, int);", c_type(typ), c_ident(typ));
+  fprintf(fout,"\n\nSOAP_FMAC5 %s * SOAP_FMAC6 soap_new_%s(struct soap *soap, int n)\n{\treturn soap_instantiate_%s(soap, n, NULL, NULL, NULL);\n}", c_type(typ), c_ident(typ), c_ident(typ));
+  fprintf(fhead,"\nSOAP_FMAC5 void SOAP_FMAC6 soap_delete_%s(struct soap*, %s*);", c_ident(typ), c_type(typ));
+  fprintf(fhead,"\nSOAP_FMAC3 %s * SOAP_FMAC4 soap_instantiate_%s(struct soap*, int, const char*, const char*, size_t*);", c_type(typ), c_ident(typ));
+
+  fprintf(fout,"\n\nSOAP_FMAC5 void SOAP_FMAC6 soap_delete_%s(struct soap *soap, %s)\n{\tsoap_delete(soap, p);\n}", c_ident(typ), c_type_id(typ, "*p"));
+  fprintf(fout,"\n\nSOAP_FMAC3 %s * SOAP_FMAC4 soap_instantiate_%s(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)", c_type(typ), c_ident(typ));
+  fprintf(fout,"\n{");
+  fprintf(fout, "\n\tDBGLOG(TEST, SOAP_MESSAGE(fdebug, \"soap_instantiate_%s(%%d, %%s, %%s)\\n\", n, type?type:\"\", arrayType?arrayType:\"\"));", c_ident(typ));
+
+  fprintf(fout,"\n\tstruct soap_clist *cp = soap_link(soap, NULL, %s, n, soap_fdelete);", soap_type(typ));
+  fprintf(fout,"\n\tif (!cp)\n\t\treturn NULL;");
+  for (Eptr = classtable->list; Eptr; Eptr = Eptr->next)
+  {
+    Tptr = ((Table *) Eptr->info.typ->ref);
+    if(Tptr == ((Table *) typ->ref)){
+      continue;
+    }
+    
+    derclass = 0;
+    while(Tptr)
+    {
+      if(Tptr == typ->ref){
+	derclass = 1;
+      }
+
+      Tptr = Tptr->prev;
+    }
+
+    if(derclass == 1 && !is_transient(Eptr->info.typ)){
+      if (is_dynamic_array(Eptr->info.typ) && !is_binary(Eptr->info.typ) && !has_ns(Eptr->info.typ) && !is_untyped(Eptr->info.typ))
+        fprintf(fout,"\n\tif (arrayType && !soap_match_tag(soap, arrayType, \"%s\"))", xsi_type(Eptr->info.typ));
+      else
+        fprintf(fout,"\n\tif (type && !soap_match_tag(soap, type, \"%s\"))", the_type(Eptr->info.typ));
+      fprintf(fout,"\n\t{\tcp->type = %s;", soap_type(Eptr->info.typ));
+      fprintf(fout,"\n\t\tif (n < 0)");
+      fprintf(fout,"\n\t\t{\tcp->ptr = (void*)new %s;", c_type(Eptr->info.typ));
+      fprintf(fout,"\n\t\t\tif (size)\n\t\t\t\t*size = sizeof(%s);", c_type(Eptr->info.typ));
+      if ((s = has_soapref(Eptr->info.typ)))
+        fprintf(fout,"\n\t\t\t((%s*)cp->ptr)->%s = soap;", c_type(Eptr->info.typ), s);
+      fprintf(fout,"\n\t\t}\n\t\telse");
+      fprintf(fout,"\n\t\t{\tcp->ptr = (void*)new %s[n];", c_type(Eptr->info.typ));
+      fprintf(fout,"\n\t\t\tif (size)\n\t\t\t\t*size = n * sizeof(%s);", c_type(Eptr->info.typ));
+      if (s)
+        fprintf(fout,"\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\t((%s*)cp->ptr)[i].%s = soap;", c_type(Eptr->info.typ), s);
+      fprintf(fout,"\n\t\t}");
+      fprintf(fout,"\n\tDBGLOG(TEST, SOAP_MESSAGE(fdebug, \"Instantiated location=%%p\\n\", cp->ptr));");
+      fprintf(fout,"\n\t\treturn (%s*)cp->ptr;", c_type(Eptr->info.typ));
+      fprintf(fout,"\n\t}");
+
+      derclass = 0;
+    }
+  }
+
+  fprintf(fout,"\n\tif (n < 0)");
+  fprintf(fout,"\n\t{\tcp->ptr = (void*)new %s;", c_type(typ));
+  fprintf(fout,"\n\t\tif (size)\n\t\t\t*size = sizeof(%s);", c_type(typ));
+  if ((s = has_soapref(typ)))
+    fprintf(fout,"\n\t\t((%s*)cp->ptr)->%s = soap;", c_type(typ), s);
+  fprintf(fout,"\n\t}\n\telse");
+  fprintf(fout,"\n\t{\tcp->ptr = (void*)new %s[n];", c_type(typ));
+  fprintf(fout,"\n\t\tif (size)\n\t\t\t*size = n * sizeof(%s);", c_type(typ));
+  if (s)
+    fprintf(fout,"\n\t\tfor (int i = 0; i < n; i++)\n\t\t\t((%s*)cp->ptr)[i].%s = soap;", c_type(typ), s);
+  fprintf(fout,"\n\t}");
+  fprintf(fout,"\n\t\tDBGLOG(TEST, SOAP_MESSAGE(fdebug, \"Instantiated location=%%p\\n\", cp->ptr));");
+  fprintf(fout,"\n\treturn (%s*)cp->ptr;", c_type(typ));
+  
+  fprintf(fout,"\n}");
+
+  fprintf(fhead,"\nSOAP_FMAC3 void SOAP_FMAC4 soap_copy_%s(struct soap*, int, int, void*, size_t, const void*, size_t);", c_ident(typ));
+  fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_copy_%s(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)", c_ident(typ));
+  fprintf(fout,"\n{");
+  fprintf(fout,"\n\tDBGLOG(TEST, SOAP_MESSAGE(fdebug, \"Copying %s %%p -> %%p\\n\", q, p));", c_type(typ));
+  fprintf(fout,"\n\t*(%s*)p = *(%s*)q;\n}", c_type(typ), c_type(typ));
+}
+
+int
+get_dimension(Tnode *typ)
+{ if (((Tnode*)typ->ref)->width)
+    return typ->width / ((Tnode*) typ->ref)->width;
+  return 0;
+}
+
+
+void
+mark(Tnode *typ)
+{ int d;
+  Table *table,*t;
+  Entry *p;
+  Tnode* temp;
+  int cardinality;
+
+  if (is_primitive(typ))
+    return;
+
+  if (is_typedef(typ))
+  { fprintf(fhead,"\nSOAP_FMAC3 void SOAP_FMAC4 soap_serialize_%s(struct soap*, %s);",c_ident(typ),c_type_id(typ, "const*")); 
+    if (typ->type == Tclass && !is_stdstring(typ) && !is_stdwstring(typ) && !is_volatile(typ))
+      fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_serialize_%s(struct soap *soap, %s)\n{\ta->soap_serialize(soap);\n}",c_ident(typ),c_type_id(typ, "const*a")); 
+    else
+      fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_serialize_%s(struct soap *soap, %s)\n{\tsoap_serialize_%s(soap, a);\n}",c_ident(typ),c_type_id(typ, "const*a"),t_ident(typ)); 
+    return;
+  }
+
+  if ((p = is_dynamic_array(typ)))
+  { if (typ->type == Tclass && !is_volatile(typ))
+    { if (is_external(typ))
+          return;
+        fprintf(fout,"\n\nvoid %s::soap_serialize(struct soap *soap) const\n{",c_ident(typ));
+        if (is_binary(typ))
+	{ if (is_attachment(typ))
+          { fprintf(fout,"\n\tif (this->__ptr && !soap_array_reference(soap, this, (struct soap_array*)&this->__ptr, 1, %s))", soap_type(typ));
+            fprintf(fout,"\n\t\tif (this->id || this->type)\n\t\t\tsoap->mode |= SOAP_ENC_DIME;\n}");
+	  }
+          else
+            fprintf(fout,"\n\tif (this->__ptr)\n\t\tsoap_array_reference(soap, this, (struct soap_array*)&this->%s, 1, %s);\n}", p->sym->name, soap_type(typ));
+      fflush(fout);
+      return;
+	}
+	else
+	{
+      if (is_XML(p->info.typ->ref))
+      { fprintf(fout,"\n}");
+        return;
+      }
+      d = get_Darraydims(typ);
+      if (d)
+      { fprintf(fout,"\n\tif (this->%s && !soap_array_reference(soap, this, (struct soap_array*)&this->%s, %d, %s))", p->sym->name, p->sym->name, d, soap_type(typ));
+        fprintf(fout,"\n\t\tfor (int i = 0; i < soap_size(this->__size, %d); i++)", d);
+      }
+      else
+      { fprintf(fout,"\n\tif (this->%s && !soap_array_reference(soap, this, (struct soap_array*)&this->%s, 1, %s))", p->sym->name, p->sym->name, soap_type(typ));
+        fprintf(fout,"\n\t\tfor (int i = 0; i < this->__size; i++)");
+      }
+      fprintf(fout,"\n\t\t{");
+      if (has_ptr(p->info.typ->ref))
+        fprintf(fout,"\tsoap_embedded(soap, this->%s + i, %s);", p->sym->name, soap_type(p->info.typ->ref));
+      if (((Tnode*)p->info.typ->ref)->type == Tclass && !is_external(p->info.typ->ref) && !is_volatile(p->info.typ->ref) && !is_typedef(p->info.typ->ref))
+        fprintf(fout,"\n\t\t\tthis->%s[i].soap_serialize(soap);", p->sym->name);
+      else if (!is_primitive(p->info.typ->ref))
+        fprintf(fout,"\n\t\t\tsoap_serialize_%s(soap, this->%s + i);", c_ident(p->info.typ->ref), p->sym->name);
+      fprintf(fout,"\n\t\t}\n}");
+      return;
+      }
+    }
+    else
+    { if (is_external(typ))
+        { fprintf(fhead,"\nSOAP_FMAC1 void SOAP_FMAC2 soap_serialize_%s(struct soap*, %s);",c_ident(typ),c_type_id(typ, "const*")); 
+          return;
+	}
+        fprintf(fhead,"\nSOAP_FMAC3 void SOAP_FMAC4 soap_serialize_%s(struct soap*, %s);",c_ident(typ),c_type_id(typ, "const*")); 
+        fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_serialize_%s(struct soap *soap, %s)\n{",c_ident(typ),c_type_id(typ, "const*a")); 
+        if (is_binary(typ))
+	{ if (is_attachment(typ))
+          { fprintf(fout,"\n\tif (a->__ptr && !soap_array_reference(soap, a, (struct soap_array*)&a->__ptr, 1, %s))", soap_type(typ));
+            fprintf(fout,"\n\t\tif (a->id || a->type)\n\t\t\tsoap->mode |= SOAP_ENC_DIME;\n}");
+	  }
+          else
+            fprintf(fout,"\n\tif (a->__ptr)\n\t\tsoap_array_reference(soap, a, (struct soap_array*)&a->%s, 1, %s);\n}", p->sym->name, soap_type(typ));
+      fflush(fout);
+      return;
+	}
+	else
+	{
+      if (is_XML(p->info.typ->ref))
+      { fprintf(fout,"\n}");
+        return;
+      }
+      fprintf(fout,"\n\tint i;");
+      d = get_Darraydims(typ);
+      if (d)
+      { fprintf(fout,"\n\tif (a->%s && !soap_array_reference(soap, a, (struct soap_array*)&a->%s, %d, %s))", p->sym->name, p->sym->name, d, soap_type(typ));
+        fprintf(fout,"\n\t\tfor (i = 0; i < soap_size(a->__size, %d); i++)", d);
+      }
+      else
+      { fprintf(fout,"\n\tif (a->%s && !soap_array_reference(soap, a, (struct soap_array*)&a->%s, 1, %s))", p->sym->name, p->sym->name, soap_type(typ));
+        fprintf(fout,"\n\t\tfor (i = 0; i < a->__size; i++)");
+      }
+      fprintf(fout,"\n\t\t{");
+      if (has_ptr(p->info.typ->ref))
+        fprintf(fout,"\tsoap_embedded(soap, a->%s + i, %s);", p->sym->name, soap_type(p->info.typ->ref));
+      if (((Tnode*)p->info.typ->ref)->type == Tclass && !is_external(p->info.typ->ref) && !is_volatile(p->info.typ->ref) && !is_typedef(p->info.typ->ref))
+        fprintf(fout,"\n\t\t\ta->%s[i].soap_serialize(soap);", p->sym->name);
+      else if (!is_primitive(p->info.typ->ref))
+        fprintf(fout,"\n\t\t\tsoap_serialize_%s(soap, a->%s + i);", c_ident(p->info.typ->ref), p->sym->name);
+      fprintf(fout,"\n\t\t}\n}");
+      fflush(fout);
+      return;
+      }
+    }
+  }
+  if (is_stdstring(typ) || is_stdwstring(typ))
+  { fprintf(fhead,"\nSOAP_FMAC3 void SOAP_FMAC4 soap_serialize_%s(struct soap*, const %s);",c_ident(typ),c_type_id(typ, "*")); 
+    fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_serialize_%s(struct soap *soap, const %s)\n{\t(void)soap; (void)p; /* appease -Wall -Werror */\n}",c_ident(typ),c_type_id(typ, "*p")); 
+    return;
+  }
+  switch(typ->type)
+  {	
+    case Tclass:
+      if (!is_volatile(typ))
+      {
+      if (is_external(typ))
+      { fprintf(fhead,"\nSOAP_FMAC1 void SOAP_FMAC2 soap_serialize_%s(struct soap*, const %s);",c_ident(typ),c_type_id(typ, "*")); 
+        return;
+      }
+      table=(Table*)typ->ref;
+      fprintf(fout,"\n\nvoid %s::soap_serialize(struct soap *soap) const\n{", typ->id->name); 
+      fprintf(fout, "\n\t(void)soap; /* appease -Wall -Werror */");
+      for (t = table; t != (Table *) 0; t = t->prev)
+      { 
+	for (p = t->list; p != (Entry*) 0; p = p->next) {
+	  if (p->info.sto & (Sconst | Sprivate | Sprotected))
+	    fprintf(fout, "\n\t/* non-serializable %s skipped */", p->sym->name);
+	  else if (is_transient(p->info.typ))
+	    fprintf(fout, "\n\t/* transient %s skipped */", p->sym->name);
+	  else if (p->info.sto & Sattribute)
+	    ;
+	  else if (is_repetition(p))
+	  { 
+      if (!is_XML(p->next->info.typ)) {
+      fprintf(fout,"\n\tif (((%s*)this)->%s)", t->sym->name, p->next->sym->name);
+      fprintf(fout,"\n\t{\tint i;\n\t\tfor (i = 0; i < ((%s*)this)->%s; i++)\n\t\t{", t->sym->name, p->sym->name);
+      if (!is_invisible(p->next->sym->name))
+        if (has_ptr(p->next->info.typ->ref))
+          fprintf(fout,"\n\t\t\tsoap_embedded(soap, ((%s*)this)->%s + i, %s);", t->sym->name, p->next->sym->name, soap_type(p->next->info.typ->ref));
+      if (((Tnode*)p->next->info.typ->ref)->type == Tclass && !is_external(p->next->info.typ->ref) && !is_volatile(p->next->info.typ->ref) && !is_typedef(p->next->info.typ->ref))
+        fprintf(fout,"\n\t\t\t((%s*)this)->%s[i].soap_serialize(soap);", t->sym->name, p->next->sym->name);
+      else if (!is_primitive(p->next->info.typ->ref))
+        fprintf(fout,"\n\t\t\tsoap_serialize_%s(soap, ((%s*)this)->%s + i);", c_ident(p->next->info.typ->ref), t->sym->name, p->next->sym->name);
+      fprintf(fout,"\n\t\t}\n\t}");
+	  }
+          p = p->next;
+	  }
+	  else if (is_anytype(p))
+	  { fprintf(fout,"\n\tsoap_markelement(soap, this->%s, this->%s);", p->next->sym->name, p->sym->name);
+            p = p->next;
+	  }
+	  else if (is_choice(p))
+	  { fprintf(fout,"\n\tsoap_serialize_%s(soap, ((%s*)this)->%s, &((%s*)this)->%s);", c_ident(p->next->info.typ),t->sym->name,p->sym->name,t->sym->name,p->next->sym->name);
+            p = p->next;
+	  }
+	  else if(p->info.typ->type==Tarray)
+	    {
+              if (has_ptr(p->info.typ))
+	        fprintf(fout,"\n\tsoap_embedded(soap, ((%s*)this)->%s, %s);", t->sym->name, p->sym->name, soap_type(p->info.typ));
+	      fprintf(fout,"\n\tsoap_serialize_%s(soap, ((%s*)this)->%s);", c_ident(p->info.typ),t->sym->name, p->sym->name);
+	    }
+	  else if(p->info.typ->type==Tclass && !is_external(p->info.typ) && !is_volatile(p->info.typ) && !is_typedef(p->info.typ))
+	    {
+              if (has_ptr(p->info.typ))
+	        fprintf(fout,"\n\tsoap_embedded(soap, &((%s*)this)->%s, %s);", t->sym->name, p->sym->name, soap_type(p->info.typ));
+	      fprintf(fout,"\n\t((%s*)this)->%s.soap_serialize(soap);", t->sym->name, p->sym->name );
+	    }
+	  else if (p->info.typ->type != Tfun && !is_void(p->info.typ) && !is_XML(p->info.typ))
+	  {
+	    if (!is_template(p->info.typ))
+              if (has_ptr(p->info.typ))
+	        fprintf(fout,"\n\tsoap_embedded(soap, &((%s*)this)->%s, %s);", t->sym->name,p->sym->name, soap_type(p->info.typ));
+	    if (!is_primitive(p->info.typ))
+	      fprintf(fout,"\n\tsoap_serialize_%s(soap, &((%s*)this)->%s);", c_ident(p->info.typ),t->sym->name,p->sym->name);
+	  }
+	}
+      }
+      fprintf(fout,"\n}");	 
+      break;
+      }
+    case Tstruct:
+
+      if (is_external(typ) && !is_volatile(typ))
+      { fprintf(fhead,"\nSOAP_FMAC1 void SOAP_FMAC2 soap_serialize_%s(struct soap*, const %s);",c_ident(typ),c_type_id(typ, "*")); 
+        return;
+      }
+      fprintf(fhead,"\nSOAP_FMAC3 void SOAP_FMAC4 soap_serialize_%s(struct soap*, const %s);",c_ident(typ),c_type_id(typ, "*")); 
+      if (!typ->ref)
+        return;
+      fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_serialize_%s(struct soap *soap, const %s)\n{",c_ident(typ),c_type_id(typ, "*a")); 
+      /* DYNAMIC ARRAY */
+      
+      fprintf(fout, "\n\t(void)soap; (void)a; /* appease -Wall -Werror */");
+      table=(Table*)typ->ref;
+      for (t = table; t != (Table *) 0; t = t->prev) { 
+	for (p = t->list; p != (Entry*) 0; p = p->next) {
+	  if (p->info.sto & (Sconst | Sprivate | Sprotected))
+	    fprintf(fout, "\n\t/* non-serializable %s skipped */", p->sym->name);
+	  else if (is_transient(p->info.typ))
+	    fprintf(fout, "\n\t/* transient %s skipped */", p->sym->name);
+	  else if (p->info.sto & Sattribute)
+	    ;
+	  else if (is_repetition(p))
+	  { 
+      if (!is_XML(p->next->info.typ)) {
+      fprintf(fout,"\n\tif (a->%s)", p->next->sym->name);
+      fprintf(fout,"\n\t{\tint i;\n\t\tfor (i = 0; i < a->%s; i++)\n\t\t{", p->sym->name);
+      if (!is_invisible(p->next->sym->name))
+        if (has_ptr(p->next->info.typ->ref))
+          fprintf(fout,"\n\t\t\tsoap_embedded(soap, a->%s + i, %s);", p->next->sym->name, soap_type(p->next->info.typ->ref));
+      if (((Tnode*)p->next->info.typ->ref)->type == Tclass && !is_external(p->next->info.typ->ref) && !is_volatile(p->next->info.typ->ref) && !is_typedef(p->next->info.typ->ref))
+        fprintf(fout,"\n\t\t\ta->%s[i].soap_serialize(soap);", p->next->sym->name);
+      else if (!is_primitive(p->next->info.typ->ref))
+        fprintf(fout,"\n\t\t\tsoap_serialize_%s(soap, a->%s + i);", c_ident(p->next->info.typ->ref), p->next->sym->name);
+      fprintf(fout,"\n\t\t}\n\t}");
+	  }
+          p = p->next;
+	  }
+	  else if (is_anytype(p))
+	  { fprintf(fout,"\n\tsoap_markelement(soap, a->%s, a->%s);", p->next->sym->name, p->sym->name);
+            p = p->next;
+	  }
+	  else if (is_choice(p))
+	  { fprintf(fout,"\n\tsoap_serialize_%s(soap, a->%s, &a->%s);", c_ident(p->next->info.typ),p->sym->name,p->next->sym->name);
+            p = p->next;
+	  }
+	  else if(p->info.typ->type==Tarray)
+	    {
+              if (has_ptr(p->info.typ))
+	        fprintf(fout,"\n\tsoap_embedded(soap, a->%s, %s);", p->sym->name, soap_type(p->info.typ));
+	      fprintf(fout,"\n\tsoap_serialize_%s(soap, a->%s);", c_ident(p->info.typ),p->sym->name);
+	    }
+	  else if(p->info.typ->type == Tclass && !is_external(p->info.typ) && !is_volatile(p->info.typ) && !is_typedef(p->info.typ))
+	    {
+              if (has_ptr(p->info.typ))
+	        fprintf(fout,"\n\tsoap_embedded(soap, &a->%s, %s);", p->sym->name, soap_type(p->info.typ));
+	      fprintf(fout,"\n\ta->%s.soap_serialize(soap);",p->sym->name);
+	    }
+	  else if (p->info.typ->type != Tfun && !is_void(p->info.typ) && !is_XML(p->info.typ))
+	    {
+	      if (!is_template(p->info.typ))
+                if (has_ptr(p->info.typ))
+	          fprintf(fout,"\n\tsoap_embedded(soap, &a->%s, %s);", p->sym->name, soap_type(p->info.typ));
+	      if (!is_primitive(p->info.typ))
+	        fprintf(fout,"\n\tsoap_serialize_%s(soap, &a->%s);", c_ident(p->info.typ),p->sym->name);
+	    }
+	}
+      }
+      fprintf(fout,"\n}");	 
+      break;
+      
+    case Tunion:
+      if (is_external(typ) && !is_volatile(typ))
+      { fprintf(fhead, "\nSOAP_FMAC1 void SOAP_FMAC2 soap_serialize_%s(struct soap*, int, const %s);", c_ident(typ), c_type_id(typ, "*")); 
+        return;
+      }
+      table=(Table*)typ->ref;
+      fprintf(fhead, "\nSOAP_FMAC3 void SOAP_FMAC4 soap_serialize_%s(struct soap*, int, const %s);", c_ident(typ), c_type_id(typ, "*")); 
+      fprintf(fout, "\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_serialize_%s(struct soap *soap, int choice, const %s)\n{", c_ident(typ), c_type_id(typ, "*a")); 
+      fprintf(fout, "\n\t(void)soap; (void)a; /* appease -Wall -Werror */");
+      fprintf(fout, "\n\tswitch (choice)\n\t{");
+      for (t = table; t; t = t->prev)
+      { for (p = t->list; p; p = p->next)
+	{ if (p->info.sto & (Sconst | Sprivate | Sprotected))
+	    fprintf(fout, "\n\t/* non-serializable %s skipped */", p->sym->name);
+	  else if (is_transient(p->info.typ))
+	    fprintf(fout, "\n\t/* transient %s skipped */", p->sym->name);
+	  else if (p->info.sto & Sattribute)
+	    ;
+	  else if (is_repetition(p))
+	    ;
+	  else if (is_anytype(p))
+	    ;
+	  else if (p->info.typ->type==Tarray)
+	    {
+	      fprintf(fout, "\n\tcase SOAP_UNION_%s_%s:", c_ident(typ), p->sym->name);
+              if (has_ptr(p->info.typ))
+	        fprintf(fout,"\n\t\tsoap_embedded(soap, a->%s, %s);", p->sym->name, soap_type(p->info.typ));
+	      fprintf(fout,"\n\t\tsoap_serialize_%s(soap, a->%s);", c_ident(p->info.typ),p->sym->name);
+	      fprintf(fout, "\n\t\tbreak;");
+	    }
+	  else if(p->info.typ->type == Tclass && !is_external(p->info.typ) && !is_volatile(p->info.typ) && !is_typedef(p->info.typ))
+	    {
+	      fprintf(fout, "\n\tcase SOAP_UNION_%s_%s:", c_ident(typ), p->sym->name);
+              if (has_ptr(p->info.typ))
+	        fprintf(fout,"\n\t\tsoap_embedded(soap, &a->%s, %s);", p->sym->name, soap_type(p->info.typ));
+	      fprintf(fout,"\n\t\ta->%s.soap_serialize(soap);",p->sym->name);
+	      fprintf(fout, "\n\t\tbreak;");
+	    }
+	  else if (p->info.typ->type != Tfun && !is_void(p->info.typ) && !is_XML(p->info.typ))
+	    {
+	      fprintf(fout, "\n\tcase SOAP_UNION_%s_%s:", c_ident(typ), p->sym->name);
+              if (has_ptr(p->info.typ))
+	        fprintf(fout,"\n\t\tsoap_embedded(soap, &a->%s, %s);", p->sym->name, soap_type(p->info.typ));
+	      if (!is_primitive(p->info.typ))
+	        fprintf(fout,"\n\t\tsoap_serialize_%s(soap, &a->%s);", c_ident(p->info.typ),p->sym->name);
+	      fprintf(fout, "\n\t\tbreak;");
+	    }
+	}
+      }
+      fprintf(fout,"\n\t}\n}");	 
+      break;
+    case Tpointer:
+      if (((Tnode*)typ->ref)->type == Tclass && !is_external(typ->ref) && !is_volatile(typ->ref) && !is_typedef(typ->ref))
+      { if (is_external(typ))
+        { fprintf(fhead,"\nSOAP_FMAC1 void SOAP_FMAC2 soap_serialize_%s(struct soap*, %s);", c_ident(typ),c_type_id(typ, "const*"));
+          return;
+	}
+        fprintf(fhead,"\nSOAP_FMAC3 void SOAP_FMAC4 soap_serialize_%s(struct soap*, %s);", c_ident(typ),c_type_id(typ, "const*"));
+	fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_serialize_%s(struct soap *soap, %s)\n{", c_ident(typ),c_type_id(typ, "const*a"));
+	if (p = is_dynamic_array(typ->ref))
+        { d = get_Darraydims(typ->ref);
+          if (d)
+	    fprintf(fout,"\n\tif (*a)");
+	  else
+	    fprintf(fout,"\n\tif (*a)");
+	}
+	else
+	  fprintf(fout,"\n\tif (!soap_reference(soap, *a, %s))", soap_type(typ->ref));
+	fprintf(fout,"\n\t\t(*a)->soap_serialize(soap);\n}");
+	break;	
+      }
+      else
+      {
+        if (is_external(typ))
+	{ fprintf(fhead,"\nSOAP_FMAC1 void SOAP_FMAC2 soap_serialize_%s(struct soap*, %s);", c_ident(typ),c_type_id(typ, "const*"));
+          return;
+	}
+	fprintf(fhead,"\nSOAP_FMAC3 void SOAP_FMAC4 soap_serialize_%s(struct soap*, %s);", c_ident(typ),c_type_id(typ, "const*"));
+	fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_serialize_%s(struct soap *soap, %s)\n{", c_ident(typ),c_type_id(typ, "const*a"));
+	if (is_string(typ) || is_wstring(typ))
+	  fprintf(fout,"\n\tsoap_reference(soap, *a, %s);\n}", soap_type(typ));
+	else if (is_primitive(typ->ref))
+	  fprintf(fout,"\n\tsoap_reference(soap, *a, %s);\n}", soap_type(typ->ref));
+	else if (p = is_dynamic_array(typ->ref))
+        { d = get_Darraydims(typ->ref);
+          if (d)
+	    fprintf(fout,"\n\tif (*a)");
+	  else
+	    fprintf(fout,"\n\tif (*a)");
+	  fprintf(fout,"\n\t\tsoap_serialize_%s(soap, *a);\n}", c_ident(typ->ref));
+	}
+	else
+	{ fprintf(fout,"\n\tif (!soap_reference(soap, *a, %s))", soap_type(typ->ref));
+	  fprintf(fout,"\n\t\tsoap_serialize_%s(soap, *a);\n}", c_ident(typ->ref));
+	}
+	break;
+      }
+	
+    case Tarray :
+      if (is_external(typ))
+      { fprintf(fhead,"\nSOAP_FMAC1 void SOAP_FMAC2 soap_serialize_%s(struct soap*, %s);", c_ident(typ),c_type_id(typ, "const"));
+        return;
+      }
+      fprintf(fhead,"\nSOAP_FMAC3 void SOAP_FMAC4 soap_serialize_%s(struct soap*, %s);", c_ident(typ),c_type_id(typ, "const"));
+      fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_serialize_%s(struct soap *soap, %s)", c_ident(typ),c_type_id(typ, "const a"));
+      if (is_primitive(typ->ref))
+      { fprintf(fout, "\n{");
+        fprintf(fout, "\n\t(void)soap; (void)a; /* appease -Wall -Werror */");
+      }
+      else
+      { fprintf(fout,"\n{\tint i;");
+        fprintf(fout,"\n\tfor(i = 0; i < %d; i++)", get_dimension(typ));
+	
+        temp=typ->ref;;
+        cardinality = 1;
+        while(temp->type==Tarray)
+	{
+	  temp=temp->ref;
+	  cardinality++;
+	}
+        fprintf(fout,"\n\t{");
+        if (has_ptr(typ->ref))
+	{
+          fprintf(fout,"\tsoap_embedded(soap, a");
+          if(cardinality > 1)
+	    fprintf(fout,"[i]");
+          else
+	    fprintf(fout,"+i");
+          fprintf(fout,", %s);", soap_type(typ->ref));
+        }
+	if (((Tnode *)typ->ref)->type == Tclass && !is_external(typ->ref) && !is_volatile(typ->ref) && !is_typedef(typ->ref))
+      	{	fprintf(fout,"\n\ta[i].soap_serialize(soap)");
+	}
+	else if (!is_primitive(typ->ref))
+      	{	fprintf(fout,"\n\tsoap_serialize_%s(soap, a",c_ident(typ->ref));
+      		if(cardinality > 1){
+		fprintf(fout,"[i])");
+      		}else {
+	  	fprintf(fout,"+i)");
+      		}
+	}
+        fprintf(fout,";\n\t}");
+      }
+      fprintf(fout,"\n}");
+      break;	
+    case Ttemplate:
+      if (is_external(typ))
+      { fprintf(fhead,"\nSOAP_FMAC1 void SOAP_FMAC2 soap_serialize_%s(struct soap*, const %s);",c_ident(typ),c_type_id(typ, "*")); 
+        return;
+      }
+      fprintf(fhead,"\nSOAP_FMAC3 void SOAP_FMAC4 soap_serialize_%s(struct soap*, const %s);",c_ident(typ),c_type_id(typ, "*")); 
+      temp = typ->ref;
+      if (!temp)
+        return;
+      fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_serialize_%s(struct soap *soap, const %s)\n{",c_ident(typ),c_type_id(typ, "*a")); 
+      if (!is_primitive(temp) && !is_XML(temp) && temp->type != Tfun && !is_void(temp))
+      { fprintf(fout, "\n\tfor (%s::const_iterator i = a->begin(); i != a->end(); ++i)", c_type(typ));
+        if (temp->type==Tclass && !is_external(temp) && !is_volatile(temp) && !is_typedef(temp))
+	  fprintf(fout,"\n\t\t(*i).soap_serialize(soap);");
+        else
+          fprintf(fout,"\n\t\tsoap_serialize_%s(soap, &(*i));", c_ident(temp));
+      }
+      fprintf(fout, "\n}");
+    default:     break;
+    }
+}
+
+void
+defaults(typ)
+Tnode* typ;
+{ int i, d;
+  Table *table,*t;
+  Entry *p;
+  Tnode *temp;
+  char *s;
+  int cardinality;
+
+  if (typ->type == Tpointer && !is_string(typ))
+    return;
+
+  if (is_typedef(typ))
+  { fprintf(fhead,"\nSOAP_FMAC3 void SOAP_FMAC4 soap_default_%s(struct soap*, %s);",c_ident(typ),c_type_id(typ, "*")); 
+    if (typ->type == Tclass && !is_stdstring(typ) && !is_stdwstring(typ) && !is_volatile(typ))
+      fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_default_%s(struct soap *soap, %s)\n{\ta->%s::soap_default(soap);\n}",c_ident(typ),c_type_id(typ, "*a"),t_ident(typ)); 
+    else
+      fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_default_%s(struct soap *soap, %s)\n{\tsoap_default_%s(soap, a);\n}",c_ident(typ),c_type_id(typ, "*a"),t_ident(typ)); 
+    return;
+  }
+  if (p = is_dynamic_array(typ))
+  { if (typ->type == Tclass && !is_volatile(typ))
+    { if (is_external(typ))
+        return;
+        fprintf(fout,"\n\nvoid %s::soap_default(struct soap *soap)\n{", c_ident(typ)); 
+        if ((s = has_soapref(typ)))
+          fprintf(fout,"\n\tthis->%s = soap;", s);
+	d = get_Darraydims(typ);
+        if (d)
+	{ fprintf(fout,"\n\tthis->%s = NULL;", p->sym->name);
+	  for (i = 0; i < d; i++)
+	  { fprintf(fout,"\n\tthis->__size[%d] = 0;", i);
+            if (has_offset(typ) && (((Table*)typ->ref)->list->next->next->info.sto & Sconst) == 0)
+              fprintf(fout, "\n\tthis->__offset[%d] = 0;", i);
+	  }
+	}
+	else
+	{ fprintf(fout,"\n\tthis->__size = 0;\n\tthis->%s = NULL;", p->sym->name);
+          if (has_offset(typ) && (((Table*)typ->ref)->list->next->next->info.sto & Sconst) == 0)
+            fprintf(fout, "\n\tthis->__offset = 0;");
+	}
+	if (is_attachment(typ))
+          fprintf(fout,"\n\tthis->id = NULL;\n\tthis->type = NULL;\n\tthis->options = NULL;");
+        fprintf(fout,"\n}");
+      }
+      else
+      { if (is_external(typ))
+        { fprintf(fhead,"\nSOAP_FMAC1 void SOAP_FMAC2 soap_default_%s(struct soap*, %s);",c_ident(typ),c_type_id(typ, "*")); 
+          return;
+	}
+        fprintf(fhead,"\nSOAP_FMAC3 void SOAP_FMAC4 soap_default_%s(struct soap*, %s);",c_ident(typ),c_type_id(typ, "*")); 
+        fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_default_%s(struct soap *soap, %s)\n{", c_ident(typ),c_type_id(typ, "*a")); 
+        if ((s = has_soapref(typ)))
+          fprintf(fout,"\n\ta->%s = soap;", s);
+	d = get_Darraydims(typ);
+        if (d)
+	{ fprintf(fout,"\n\ta->%s = NULL;", p->sym->name);
+	  for (i = 0; i < d; i++)
+	  { fprintf(fout,"\n\ta->__size[%d] = 0;", i);
+            if (has_offset(typ) && (((Table*)typ->ref)->list->next->next->info.sto & Sconst) == 0)
+              fprintf(fout, "\n\ta->__offset[%d] = 0;", i);
+	  }
+	}
+	else
+	{ fprintf(fout,"\n\ta->__size = 0;\n\ta->%s = NULL;", p->sym->name);
+          if (has_offset(typ) && (((Table*)typ->ref)->list->next->next->info.sto & Sconst) == 0)
+            fprintf(fout, "\n\ta->__offset = 0;");
+	}
+	if (is_attachment(typ))
+          fprintf(fout,"\n\ta->id = NULL;\n\ta->type = NULL;\n\ta->options = NULL;");
+        fprintf(fout,"\n}");
+      }
+      fflush(fout);
+      return;
+  }
+  if (is_primitive(typ) || is_string(typ))
+  {   if (is_external(typ))
+      { fprintf(fhead,"\nSOAP_FMAC1 void SOAP_FMAC2 soap_default_%s(struct soap*, %s);",c_ident(typ),c_type_id(typ, "*"));
+        return;
+      }
+      fprintf(fhead,"\nSOAP_FMAC3 void SOAP_FMAC4 soap_default_%s(struct soap*, %s);",c_ident(typ),c_type_id(typ, "*"));
+      fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_default_%s(struct soap *soap, %s)\n{\t(void)soap; /* appease -Wall -Werror */\n#ifdef SOAP_DEFAULT_%s\n\t*a = SOAP_DEFAULT_%s;\n#else\n\t*a = (%s)0;\n#endif\n}",c_ident(typ),c_type_id(typ, "*a"), c_ident(typ), c_ident(typ), c_type(typ));
+      return;
+  }
+  if (is_stdstring(typ) || is_stdwstring(typ))
+  { fprintf(fhead,"\nSOAP_FMAC3 void SOAP_FMAC4 soap_default_%s(struct soap*, %s);",c_ident(typ),c_type_id(typ, "*")); 
+    fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_default_%s(struct soap *soap, %s)\n{\t(void)soap; /* appease -Wall -Werror */\n\tp->erase();\n}",c_ident(typ),c_type_id(typ, "*p")); 
+    return;
+  }
+  switch(typ->type)
+    {
+    case Tclass:
+      /* CLASS */
+      if (!is_volatile(typ))
+      {
+      if (is_external(typ))
+      { fprintf(fhead,"\nSOAP_FMAC1 void SOAP_FMAC2 soap_default_%s(struct soap*, %s);",c_ident(typ),c_type_id(typ, "*")); 
+        return;
+      }
+      table=(Table*)typ->ref;
+      fprintf(fout,"\n\nvoid %s::soap_default(struct soap *soap)\n{", typ->id->name ); 
+      if ((s = has_soapref(typ)))
+        fprintf(fout,"\n\tthis->%s = soap;", s);
+      else
+        fprintf(fout, "\n\t(void)soap; /* appease -Wall -Werror */");
+	
+      fflush(fout);
+      for (t = table; t != (Table *) 0; t = t->prev)
+      { for (p = t->list; p != (Entry*) 0; p = p->next)
+	  if (p->info.sto & Sconst)
+	    fprintf(fout, "\n\t/* non-serializable %s skipped */", p->sym->name);
+	  else if (is_transient(p->info.typ))
+	    fprintf(fout, "\n\t/* transient %s skipped */", p->sym->name);
+	  else if (is_choice(p))
+	  { fprintf(fout, "\n\t((%s*)this)->%s = 0;", t->sym->name, p->sym->name);
+	    p = p->next;
+	  }
+	  else if (is_repetition(p) || is_anytype(p))
+	  { fprintf(fout, "\n\t((%s*)this)->%s = 0;\n\t((%s*)this)->%s = NULL;", t->sym->name, p->sym->name, t->sym->name, p->next->sym->name);
+	    p = p->next;
+	  }
+	  else
+	  {
+	  if(p->info.typ->type==Tarray){
+	    fprintf(fout,"\n\tsoap_default_%s(soap, ((%s*)this)->%s);", c_ident(p->info.typ),t->sym->name,p->sym->name);
+	  }
+	  else if(p->info.typ->type==Tclass && !is_external(p->info.typ) && !is_volatile(p->info.typ) && !is_typedef(p->info.typ))
+	    fprintf(fout,"\n\t((%s*)this)->%s.%s::soap_default(soap);",t->sym->name, p->sym->name, c_ident(p->info.typ));
+	  else if (p->info.hasval)
+	  { if (p->info.typ->type == Tpointer && is_stdstring(p->info.typ->ref))
+	      fprintf(fout,"\n\tstatic std::string soap_tmp_%s(\"%s\");\n\t((%s*)this)->%s = &soap_tmp_%s;", p->sym->name, p->info.val.s, t->sym->name, p->sym->name, p->sym->name, p->sym->name);
+	    else
+	      fprintf(fout,"\n\t((%s*)this)->%s%s;", t->sym->name,p->sym->name,c_init(p));
+	  }
+	  else if (p->info.typ->type == Tpointer && (!is_string(p->info.typ) || is_XML(p->info.typ)))
+// ESL@TPN	    fprintf(fout,"\n\t((%s*)this)->%s = NULL;", t->sym->name,p->sym->name);
+	    fprintf(fout,"\n\tif(((%s*)this)->%s) delete ((%s*)this)->%s; ((%s*)this)->%s = NULL;", t->sym->name,p->sym->name, t->sym->name,p->sym->name, t->sym->name,p->sym->name);
+	  else if (p->info.typ->type != Tfun && !is_void(p->info.typ)) {
+	    fprintf(fout,"\n\tsoap_default_%s(soap, &((%s*)this)->%s);", c_ident(p->info.typ),t->sym->name,p->sym->name);
+	  }
+	}
+      }
+      fprintf(fout,"\n}");	 
+      fflush(fout);
+      break;
+      }
+      
+    case Tstruct:
+      table=(Table*)typ->ref;
+
+      if (is_external(typ) && !is_volatile(typ))
+      { fprintf(fhead,"\nSOAP_FMAC1 void SOAP_FMAC2 soap_default_%s(struct soap*, %s);",c_ident(typ),c_type_id(typ, "*")); 
+        return;
+      }
+      fprintf(fhead,"\nSOAP_FMAC3 void SOAP_FMAC4 soap_default_%s(struct soap*, %s);",c_ident(typ),c_type_id(typ, "*")); 
+      fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_default_%s(struct soap *soap, %s)\n{", c_ident(typ),c_type_id(typ, "*a")); 
+      fflush(fout);
+      if ((s = has_soapref(typ)))
+        fprintf(fout,"\n\ta->%s = soap;", s);
+      else
+        fprintf(fout, "\n\t(void)soap; (void)a; /* appease -Wall -Werror */");
+      for (t = table; t != (Table *) 0; t = t->prev)
+      { for (p = t->list; p != (Entry*) 0; p = p->next)
+	  if (p->info.sto & (Sconst | Sprivate | Sprotected))
+	    fprintf(fout, "\n\t/* non-serializable %s skipped */", p->sym->name);
+	  else if (is_transient(p->info.typ))
+	    fprintf(fout, "\n\t/* transient %s skipped */", p->sym->name);
+	  else if (is_choice(p))
+	  { fprintf(fout, "\n\ta->%s = 0;", p->sym->name);
+	    p = p->next;
+	  }
+	  else if (is_repetition(p) || is_anytype(p))
+	  { fprintf(fout, "\n\ta->%s = 0;\n\ta->%s = NULL;", p->sym->name, p->next->sym->name);
+	    p = p->next;
+	  }
+	  else
+	  {
+	  if (p->info.typ->type==Tarray)
+	    fprintf(fout,"\n\tsoap_default_%s(soap, a->%s);", c_ident(p->info.typ),p->sym->name);
+	  else if (p->info.typ->type==Tclass && !is_external(p->info.typ) && !is_volatile(p->info.typ) && !is_typedef(p->info.typ))
+	    fprintf(fout,"\n\ta->%s.%s::soap_default(soap);",p->sym->name, c_ident(p->info.typ));
+	  else if (p->info.hasval)
+	  { if (p->info.typ->type == Tpointer && is_stdstring(p->info.typ->ref))
+	      fprintf(fout,"\n\tstatic std::string soap_tmp_%s(\"%s\");\n\ta->%s = &soap_tmp_%s;", p->sym->name, p->info.val.s, p->sym->name, p->sym->name);
+	    else
+	      fprintf(fout,"\n\ta->%s%s;", p->sym->name,c_init(p));
+	  }
+	  else if (p->info.typ->type == Tpointer && (!is_string(p->info.typ) || is_XML(p->info.typ)))
+	    fprintf(fout,"\n\ta->%s = NULL;", p->sym->name);
+	  else if (p->info.typ->type != Tfun && !is_void(p->info.typ))
+	    fprintf(fout,"\n\tsoap_default_%s(soap, &a->%s);", c_ident(p->info.typ),p->sym->name);
+	}
+      }
+      fprintf(fout,"\n}");	 
+      fflush(fout);
+      break;
+      
+    case Tarray:
+      if (is_external(typ))
+      { fprintf(fhead,"\nSOAP_FMAC1 void SOAP_FMAC2 soap_default_%s(struct soap*, %s);",c_ident(typ),c_type(typ));
+        return;
+      }
+      fprintf(fhead,"\nSOAP_FMAC3 void SOAP_FMAC4 soap_default_%s(struct soap*, %s);",c_ident(typ),c_type(typ));
+      fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_default_%s(struct soap *soap, %s)\n{", c_ident(typ),c_type_id(typ, "a"));
+      fprintf(fout,"\n\tint i;");
+      fprintf(fout,"\n\t(void)soap; /* appease -Wall -Werror */");
+      fprintf(fout,"\n\tfor (i = 0; i < %d; i++)",get_dimension(typ));
+      temp = typ->ref;
+      cardinality = 1;
+      while(temp->type==Tarray)
+      {
+	  temp=temp->ref;
+	  cardinality++;
+      }
+      if (((Tnode *)typ->ref)->type == Tclass && !is_external(typ->ref) && !is_volatile(typ->ref))
+      {
+      	if (cardinality>1)
+		fprintf(fout,"a[i].%s::soap_default(soap)", t_ident(typ->ref));
+     	else
+		fprintf(fout,"(a+i)->soap_default(soap)");
+      }
+      else if (((Tnode*)typ->ref)->type == Tpointer)
+      	fprintf(fout,"\n\ta[i] = NULL");
+      else
+      {
+      	fprintf(fout,"\n\tsoap_default_%s(soap, a",c_ident(typ->ref));
+      	if (cardinality>1)
+		fprintf(fout,"[i])");
+     	 else
+		fprintf(fout,"+i)");
+      }
+      fprintf(fout,";\n}");
+      break;	
+      
+    case Ttemplate:
+      if (is_external(typ))
+      { fprintf(fhead,"\nSOAP_FMAC1 void SOAP_FMAC2 soap_default_%s(struct soap*, %s);",c_ident(typ),c_type_id(typ, "*"));
+        return;
+      }
+      fprintf(fhead,"\nSOAP_FMAC3 void SOAP_FMAC4 soap_default_%s(struct soap*, %s);",c_ident(typ),c_type_id(typ, "*"));
+      fprintf(fout,"\n\nSOAP_FMAC3 void SOAP_FMAC4 soap_default_%s(struct soap *soap, %s)\n{",c_ident(typ),c_type_id(typ, "*p"));
+      fprintf(fout,"\n\tp->clear();");
+      fprintf(fout,"\n}");
+      fflush(fout);
+      break;
+    default    :break;
+    }
+  
+}
+
+void
+soap_put(Tnode *typ)
+{ int d;
+  Entry *p;
+  char *ci = c_ident(typ);
+  char *ct = c_type(typ);
+  char *cta = c_type_id(typ, "a");
+  char *ctp = c_type_id(typ, "*");
+  char *ctpa = c_type_id(typ, "*a");
+  char *ctc = c_type_id(typ, "const");
+  char *ctca = c_type_id(typ, "const a");
+  char *ctcp = c_type_id(typ, "const*");
+  char *ctcpa = c_type_id(typ, "const*a");
+
+  if (typ->type == Ttemplate || typ->type == Tunion)
+    return;
+
+  if (typ->type == Tarray)
+  { fprintf(fhead,"\nSOAP_FMAC3 int SOAP_FMAC4 soap_put_%s(struct soap*, %s, const char*, const char*);", ci,ctc);
+    fprintf(fout,"\n\nSOAP_FMAC3 int SOAP_FMAC4 soap_put_%s(struct soap *soap, %s, const char *tag, const char *type)\n{", ci,ctca);
+  }
+  else if (typ->type == Tclass && !is_external(typ) && !is_volatile(typ) && !is_typedef(typ))
+    fprintf(fout,"\n\nint %s::soap_put(struct soap *soap, const char *tag, const  char *type) const\n{", ct);
+  else if (typ->type == Tpointer)
+  { fprintf(fhead,"\nSOAP_FMAC3 int SOAP_FMAC4 soap_put_%s(struct soap*, %s, const char*, const char*);", ci,ctcp);
+    fprintf(fout,"\n\nSOAP_FMAC3 int SOAP_FMAC4 soap_put_%s(struct soap *soap, %s, const char *tag, const char *type)\n{", ci,ctcpa);
+  }
+  else
+  { fprintf(fhead,"\nSOAP_FMAC3 int SOAP_FMAC4 soap_put_%s(struct soap*, const %s, const char*, const char*);", ci,ctp);
+    fprintf(fout,"\n\nSOAP_FMAC3 int SOAP_FMAC4 soap_put_%s(struct soap *soap, const %s, const char *tag, const char *type)\n{", ci,ctpa);
+  }
+  fflush(fout);
+    fprintf(fout,"\n\tregister int id = ");
+    if (is_invisible(typ->id->name))
+      fprintf(fout,"0;");
+    else if (p = is_dynamic_array(typ))
+    { d = get_Darraydims(typ);
+      if (typ->type == Tclass && !is_volatile(typ) && !is_typedef(typ))
+      { if (d)
+          fprintf(fout,"soap_embed(soap, (void*)this, (struct soap_array*)&this->%s, %d, tag, %s);", p->sym->name, d, soap_type(typ));
+        else
+          fprintf(fout,"soap_embed(soap, (void*)this, (struct soap_array*)&this->%s, 1, tag, %s);", p->sym->name, soap_type(typ));
+      }
+      else if (d)
+        fprintf(fout,"soap_embed(soap, (void*)a, (struct soap_array*)&a->%s, %d, tag, %s);", p->sym->name, d, soap_type(typ));
+      else
+        fprintf(fout,"soap_embed(soap, (void*)a, (struct soap_array*)&a->%s, 1, tag, %s);", p->sym->name, soap_type(typ));
+    }
+    else if (typ->type == Tclass && !is_external(typ) && !is_volatile(typ) && !is_typedef(typ))
+      fprintf(fout,"soap_embed(soap, (void*)this, NULL, 0, tag, %s);", soap_type(typ));
+    else
+      fprintf(fout,"soap_embed(soap, (void*)a, NULL, 0, tag, %s);", soap_type(typ));
+  if (typ->type == Tclass && !is_external(typ) && !is_volatile(typ) && !is_typedef(typ))
+    fprintf(fout,"\n\tif (this->soap_out(soap, tag, id, type))\n\t\treturn soap->error;");
+  else
+    fprintf(fout,"\n\tif (soap_out_%s(soap, tag, id, a, type))\n\t\treturn soap->error;", ci);
+  if (!is_invisible(typ->id->name))
+    fprintf(fout,"\n\treturn soap_putindependent(soap);\n}");
+  else
+    fprintf(fout,"\n\treturn SOAP_OK;\n}");
+  fflush(fout);
+}
+
+Entry *
+is_dynamic_array(Tnode *typ)
+{ Entry *p;
+  Table *t;
+  if ((typ->type == Tstruct || typ->type == Tclass) && typ->ref)
+  { for (t = (Table*)typ->ref; t; t = t->prev)
+    { p = t->list;
+      if (p && p->info.typ->type == Tpointer && !strncmp(p->sym->name, "__ptr", 5))
+        if (p->next && (p->next->info.typ->type == Tint || p->next->info.typ->type == Tulong || p->next->info.typ->type == Tarray && (((Tnode*)p->next->info.typ->ref)->type == Tint || ((Tnode*)p->next->info.typ->ref)->type == Tuint)) && !strcmp(p->next->sym->name, "__size"))
+	  return p;
+    }
+  }
+  return 0;
+}
+
+Entry *
+is_discriminant(Tnode *typ)
+{ Entry *p;
+  Table *t;
+  if ((typ->type == Tstruct || typ->type == Tclass) && typ->ref)
+  { for (t = (Table*)typ->ref; t; t = t->prev)
+    { p = t->list;
+      if (p && p->info.typ->type == Tint && !strncmp(p->sym->name, "__union", 7))
+        if (p->next && p->next->info.typ->type == Tunion && !p->next->next)
+	  return p;
+    }
+  }
+  return 0;
+}
+
+int
+get_Darraydims(Tnode *typ)
+{ Entry *p;
+  Table *t;
+  if ((typ->type == Tstruct || typ->type == Tclass) && typ->ref)
+  { for (t = (Table*)typ->ref; t; t = t->prev)
+    { p = t->list;
+      if (p && p->info.typ->type == Tpointer && !strncmp(p->sym->name, "__ptr", 5))
+        if (p->next && p->next->info.typ->type == Tarray && (((Tnode*)p->next->info.typ->ref)->type == Tint || ((Tnode*)p->next->info.typ->ref)->type == Tuint) && !strcmp(p->next->sym->name, "__size"))
+          return get_dimension(p->next->info.typ);
+    }
+  }
+  return 0;
+}
+
+int
+has_offset(Tnode *typ)
+{ Entry *p;
+  Table *t;
+  if (typ->type == Tstruct || typ->type == Tclass)
+  { for (t = (Table*)typ->ref; t; t = t->prev)
+    { for (p = t->list; p; p = p->next)
+      { if ((p->info.typ->type == Tint || p->info.typ->type == Tarray && ((Tnode*)p->info.typ->ref)->type == Tint) && !strcmp(p->sym->name, "__offset"))
+          return 1;
+      }
+    }
+  }
+  return 0;
+}
+
+int
+is_hexBinary(Tnode *typ)
+{ Entry *p;
+  Table *t;
+  int n = strlen(typ->id->name);
+  if ((typ->type == Tstruct || typ->type == Tclass) && n >= 9 && is_eq(typ->id->name + n - 9, "hexBinary"))
+  { for (t = (Table*)typ->ref; t; t = t->prev)
+    { p = t->list;
+      if (p && p->info.typ->type == Tpointer && ((Tnode*)p->info.typ->ref)->type == Tuchar && !strcmp(p->sym->name, "__ptr"))
+      { p = p->next;
+        return p && (p->info.typ->type == Tint || p->info.typ->type == Tuint) && !strcmp(p->sym->name, "__size");
+      }
+    }
+  }
+  return 0;
+}
+
+int
+is_binary(Tnode *typ)
+{ Entry *p;
+  Table *t;
+  if (!has_ns(typ) && !is_element(typ))
+    return 0;
+  if (typ->type == Tstruct || typ->type == Tclass) 
+  { for (t = (Table*)typ->ref; t; t = t->prev)
+    { p = t->list;
+      if (p && p->info.typ->type == Tpointer && ((Tnode*)p->info.typ->ref)->type == Tuchar && !strcmp(p->sym->name, "__ptr"))
+      { p = p->next;
+        return p && (p->info.typ->type == Tint || p->info.typ->type == Tuint) && !strcmp(p->sym->name, "__size");
+      }
+    }
+  }
+  return 0;
+}
+
+is_attachment(Tnode *typ)
+{ Entry *p;
+  Table *t;
+  if (!is_binary(typ) || is_transient(typ))
+    return 0;
+  for (t = (Table*)typ->ref; t; t = t->prev)
+  { for (p = t->list; p; p = p->next)
+    { if (is_string(p->info.typ) && !strcmp(p->sym->name, "id"))
+      { p = p->next;
+        if (!p || !is_string(p->info.typ) || strcmp(p->sym->name, "type"))
+          break;
+        p = p->next;
+        if (!p || !is_string(p->info.typ) || strcmp(p->sym->name, "options"))
+          break;
+        return 1;
+      }
+    }
+  }
+  return 0;
+}
+
+int
+is_header_or_fault(Tnode *typ)
+{ if (typ->type == Tpointer || typ->type == Treference)
+    return is_header_or_fault(typ->ref);
+  return (typ->type == Tstruct || typ->type == Tclass) && (!strcmp(typ->id->name, "SOAP_ENV__Header") || !strcmp(typ->id->name, "SOAP_ENV__Fault") || !strcmp(typ->id->name, "SOAP_ENV__Code") || !strcmp(typ->id->name, "SOAP_ENV__Detail") || !strcmp(typ->id->name, "SOAP_ENV__Reason"));
+}
+
+int
+is_body(Tnode *typ)
+{ if (typ->type == Tpointer || typ->type == Treference)
+    return is_body(typ->ref);
+  return (typ->type == Tstruct || typ->type == Tclass) && !strcmp(typ->id->name, "SOAP_ENV__Body");
+}
+
+int
+is_soap12()
+{ return !strcmp(envURI, "http://www.w3.org/2003/05/soap-envelope");
+}
+
+int
+is_document(const char *style)
+{ return !eflag && !style || style && !strcmp(style, "document");
+}
+
+int
+is_literal(const char *encoding)
+{ return !eflag && !encoding || encoding && !strcmp(encoding, "literal");
+}
+
+char *
+has_soapref(Tnode *typ)
+{ Entry *p;
+  Table *t;
+  if (typ->type == Tstruct || typ->type == Tclass) 
+  { for (t = (Table*)typ->ref; t; t = t->prev)
+    { for (p = t->list; p; p = p->next)
+        if (p->info.typ->type == Tpointer && ((Tnode*)p->info.typ->ref)->type == Tstruct && ((Tnode*)p->info.typ->ref)->id == lookup("soap"))
+          return p->sym->name;
+    }
+  }
+  return NULL;
+}
+
+int
+has_constructor(Tnode *typ)
+{ Entry *p, *q;
+  Table *t;
+  if (typ->type == Tclass) 
+    for (t = (Table*)typ->ref; t; t = t->prev)
+      for (p = t->list; p; p = p->next)
+        if (p->info.typ->type == Tfun && !strcmp(p->sym->name, typ->id->name) && ((FNinfo *)p->info.typ->ref)->ret->type == Tnone)
+	{ q = ((FNinfo*)p->info.typ->ref)->args->list;
+          if (!q)
+	    return 1;
+        }
+  return 0;
+}
+
+int
+has_destructor(Tnode *typ)
+{ Entry *p, *q;
+  Table *t;
+  if (typ->type == Tclass) 
+    for (t = (Table*)typ->ref; t; t = t->prev)
+      for (p = t->list; p; p = p->next)
+        if (p->info.typ->type == Tfun && *p->sym->name == '~')
+	  return 1;
+  return 0;
+}
+
+int
+has_getter(Tnode *typ)
+{ Entry *p, *q;
+  Table *t;
+  if (typ->type == Tclass) 
+    for (t = (Table*)typ->ref; t; t = t->prev)
+      for (p = t->list; p; p = p->next)
+        if (p->info.typ->type == Tfun && !strcmp(p->sym->name, "get") && ((FNinfo *)p->info.typ->ref)->ret->type == Tint)
+	{ q = ((FNinfo*)p->info.typ->ref)->args->list;
+          if (q && q->info.typ->type == Tpointer && ((Tnode*)q->info.typ->ref)->type == Tstruct && ((Tnode*)q->info.typ->ref)->id == lookup("soap"))
+	    return 1;
+        }
+  return 0;
+}
+
+int
+has_setter(Tnode *typ)
+{ Entry *p, *q;
+  Table *t;
+  if (typ->type == Tclass) 
+    for (t = (Table*)typ->ref; t; t = t->prev)
+      for (p = t->list; p; p = p->next)
+        if (p->info.typ->type == Tfun && !strcmp(p->sym->name, "set") && ((FNinfo *)p->info.typ->ref)->ret->type == Tint)
+	{ q = ((FNinfo*)p->info.typ->ref)->args->list;
+          if (q && q->info.typ->type == Tpointer && ((Tnode*)q->info.typ->ref)->type == Tstruct && ((Tnode*)q->info.typ->ref)->id == lookup("soap"))
+	    return 1;
+        }
+  return 0;
+}
+
+int
+is_primitive_or_string(Tnode *typ)
+{ return is_primitive(typ) || is_string(typ) || is_wstring(typ) || is_stdstring(typ) || is_stdwstring(typ); 
+}
+
+int
+is_primitive(Tnode *typ)
+{ return typ->type <= Ttime; 
+}
+
+int
+is_string(Tnode *typ)
+{ return typ->type == Tpointer && ((Tnode*)typ->ref)->type == Tchar;
+}
+
+int
+is_wstring(Tnode *typ)
+{ return typ->type == Tpointer && ((Tnode*)typ->ref)->type == Twchar;
+}
+
+int
+is_stdstring(Tnode *typ)
+{ return typ->type == Tclass && typ->id == lookup("std::string");
+}
+
+int
+is_stdwstring(Tnode *typ)
+{ return typ->type == Tclass && typ->id == lookup("std::wstring");
+}
+
+int
+is_stdstr(Tnode *typ)
+{ if (typ->type == Tpointer)
+    return is_stdstring(typ->ref) || is_stdwstring(typ->ref);
+  return is_stdstring(typ) || is_stdwstring(typ);
+}
+
+int
+is_typedef(Tnode *typ)
+{ return typ->sym && !is_transient(typ) && !is_external(typ);
+}
+
+int
+reflevel(Tnode *typ)
+{ int level;
+  for (level = 0; typ->type == Tpointer; level++)
+    typ = (Tnode*)typ->ref;
+  return level;
+}
+
+Tnode *
+reftype(Tnode *typ)
+{ while (typ->type == Tpointer || typ->type == Treference)
+    typ = typ->ref;
+  return typ;
+}
+
+void
+soap_set_attr(Tnode *typ, char *obj, char *name, char *tag)
+{ if (is_qname(typ))
+    fprintf(fout, "\n\tif (%s->%s)\n\t\tsoap_set_attr(soap, \"%s\", soap_QName2s(soap, %s->%s));", obj, name, tag, obj, name);
+  else if (is_string(typ))
+    fprintf(fout, "\n\tif (%s->%s)\n\t\tsoap_set_attr(soap, \"%s\", %s->%s);", obj, name, tag, obj, name);
+  else if (is_wstring(typ))
+    fprintf(fout, "\n\tif (%s->%s)\n\t\tsoap_set_attr(soap, \"%s\", soap_wchar2s(soap, %s->%s));", obj, name, tag, obj, name);
+  else if (is_stdqname(typ))
+    fprintf(fout, "\n\tif (!%s->%s.empty())\n\t\tsoap_set_attr(soap, \"%s\", soap_QName2s(soap, %s->%s.c_str()));", obj, name, tag, obj, name);
+  else if (is_stdstring(typ))
+    fprintf(fout, "\n\tif (!%s->%s.empty())\n\t\tsoap_set_attr(soap, \"%s\", %s->%s.c_str());", obj, name, tag, obj, name);
+  else if (is_stdwstring(typ))
+    fprintf(fout, "\n\tif (!%s->%s.empty())\n\t\tsoap_set_attr(soap, \"%s\", soap_wchar2s(soap, %s->%s.c_str()));", obj, name, tag, obj, name);
+  else if (typ->type == Tllong || typ->type == Tullong)
+    fprintf(fout, "\n\tsoap_set_attr(soap, \"%s\", soap_%s2s(soap, %s->%s));", tag, c_type(typ), obj, name);
+  else if (typ->type == Tenum)
+    fprintf(fout, "\n\tsoap_set_attr(soap, \"%s\", soap_%s2s(soap, %s->%s));", tag, c_ident(typ), obj, name);
+  else if (typ->type == Tpointer)
+  { Tnode *ptr = typ->ref;
+    fprintf(fout, "\n\tif (%s->%s)", obj, name);
+    if (ptr->type == Tllong || ptr->type == Tullong)
+      fprintf(fout, "\n\t\tsoap_set_attr(soap, \"%s\", soap_%s2s(soap, *%s->%s));", tag, c_type(ptr), obj, name);
+    else if (ptr->type == Tenum)
+      fprintf(fout, "\n\t\tsoap_set_attr(soap, \"%s\", soap_%s2s(soap, *%s->%s));", tag, c_ident(ptr), obj, name);
+    else if (is_stdqname(ptr))
+      fprintf(fout, "\n\t\tsoap_set_attr(soap, \"%s\", soap_QName2s(soap, %s->%s->c_str()));", tag, obj, name);
+    else if (is_stdstring(ptr))
+      fprintf(fout, "\n\t\tsoap_set_attr(soap, \"%s\", %s->%s->c_str());", tag, obj, name);
+    else if (is_stdwstring(ptr))
+      fprintf(fout, "\n\t\tsoap_set_attr(soap, \"%s\", soap_wchar2s(soap, %s->%s->c_str()));", tag, obj, name);
+    else if (is_primitive(ptr))
+      fprintf(fout, "\n\t\tsoap_set_attr(soap, \"%s\", soap_%s2s(soap, *%s->%s));", tag, the_type(ptr), obj, name);
+    else if (is_hexBinary(ptr))
+      fprintf(fout, "\n\t\tif (%s->%s->__ptr)\n\t\t\tsoap_set_attr(soap, \"%s\", soap_s2hex(soap, %s->%s->__ptr, NULL, %s->%s->__size));", obj, name, tag, obj, name, obj, name);
+    else if (is_binary(ptr))
+      fprintf(fout, "\n\t\tif (%s->%s->__ptr)\n\t\t\tsoap_set_attr(soap, \"%s\", soap_s2base64(soap, %s->%s->__ptr, NULL, %s->%s->__size));", obj, name, tag, obj, name, obj, name);
+    else
+    { sprintf(errbuf, "Field '%s' cannot be serialized as XML attribute", name);
+      semwarn(errbuf);
+    }
+  }
+  else if (is_primitive(typ))
+    fprintf(fout, "\n\tsoap_set_attr(soap, \"%s\", soap_%s2s(soap, %s->%s));", tag, the_type(typ), obj, name);
+  else if (is_hexBinary(typ))
+    fprintf(fout, "\n\tif (%s->%s.__ptr)\n\t\tsoap_set_attr(soap, \"%s\", soap_s2hex(soap, %s->%s.__ptr, NULL, %s->%s.__size));", obj, name, tag, obj, name, obj, name);
+  else if (is_binary(typ))
+    fprintf(fout, "\n\tif (%s->%s.__ptr)\n\t\tsoap_set_attr(soap, \"%s\", soap_s2base64(soap, %s->%s.__ptr, NULL, %s->%s.__size));", obj, name, tag, obj, name, obj, name);
+  else
+  { sprintf(errbuf, "Field '%s' cannot be serialized as XML attribute", name);
+    semwarn(errbuf);
+  }
+}
+
+void
+soap_attr_value(Entry *p, char *obj, char *name, char *tag)
+{ int flag = 0;
+  Tnode *typ = p->info.typ;
+  if (p->info.maxOccurs == 0)
+    flag = 2; /* prohibited */
+  else if (p->info.minOccurs >= 1 && !p->info.hasval)
+    flag = 1; /* required */
+  if (typ->type == Tllong || typ->type == Tullong)
+    fprintf(fout, "\n\tif (soap_s2%s(soap, soap_attr_value(soap, \"%s\", %d), &%s->%s))\n\t\treturn NULL;", c_type(typ), tag, flag, obj, name);
+  else if (typ->type == Tenum)
+    fprintf(fout, "\n\tif (soap_s2%s(soap, soap_attr_value(soap, \"%s\", %d), &%s->%s))\n\t\treturn NULL;", c_ident(typ), tag, flag, obj, name);
+  else if (is_qname(typ))
+    fprintf(fout, "\n\tif (soap_s2QName(soap, soap_attr_value(soap, \"%s\", %d), &%s->%s))\n\t\treturn NULL;", tag, flag, obj, name);
+  else if (is_string(typ))
+    fprintf(fout, "\n\tif (soap_s2string(soap, soap_attr_value(soap, \"%s\", %d), &%s->%s))\n\t\treturn NULL;", tag, flag, obj, name);
+  else if (is_wstring(typ))
+    fprintf(fout, "\n\tif (soap_s2wchar(soap, soap_attr_value(soap, \"%s\", %d), &%s->%s))\n\t\treturn NULL;", tag, flag, obj, name);
+  else if (is_stdqname(typ))
+    fprintf(fout, "\n\t{\tconst char *t = soap_attr_value(soap, \"%s\", %d);\n\t\tif (t)\n\t\t{\tchar *s;\n\t\t\tif (soap_s2QName(soap, t, &s))\n\t\t\t\treturn NULL;\n\t\t\t%s->%s.assign(s);\n\t\t}\n\t}", tag, flag, obj, name);
+  else if (is_stdstring(typ))
+    fprintf(fout, "\n\t{\tconst char *t = soap_attr_value(soap, \"%s\", %d);\n\t\tif (t)\n\t\t{\tchar *s;\n\t\t\tif (soap_s2string(soap, t, &s))\n\t\t\t\treturn NULL;\n\t\t\t%s->%s.assign(s);\n\t\t}\n\t}", tag, flag, obj, name);
+  else if (is_stdwstring(typ))
+    fprintf(fout, "\n\t{\tconst char *t = soap_attr_value(soap, \"%s\", %d);\n\t\tif (t)\n\t\t{\tchar *s;\n\t\t\tif (soap_s2wchar(soap, t, &s))\n\t\t\t\treturn NULL;\n\t\t\t%s->%s.assign(s);\n\t\t}\n\t}", tag, flag, obj, name);
+  else if (typ->type == Tpointer)
+  { Tnode *ptr = typ->ref;
+    fprintf(fout, "\n\t{\tconst char *t = soap_attr_value(soap, \"%s\", %d);\n\t\tif (t)", tag, flag);
+    fprintf(fout, "\n\t\t{\tif (!(%s->%s = (%s)soap_malloc(soap, sizeof(%s))))\n\t\t\t{\tsoap->error = SOAP_EOM;\n\t\t\t\treturn NULL;\n\t\t\t}", obj, name, c_type(typ), c_type(ptr));
+    if (ptr->type == Tllong || ptr->type == Tullong)
+      fprintf(fout, "\n\tif (soap_s2%s(soap, t, %s->%s))\n\t\treturn NULL;", c_type(ptr), obj, name);
+    else if (ptr->type == Tenum)
+      fprintf(fout, "\n\tif (soap_s2%s(soap, t, %s->%s))\n\t\treturn NULL;", c_ident(ptr), obj, name);
+    else if (is_stdqname(ptr))
+      fprintf(fout, "\n\tchar *s;\n\t\tif (soap_s2QName(soap, t, &s))\n\t\t\treturn NULL;\n\t\tif (s)\n\t\t{\t%s->%s = soap_new_std__string(soap, -1);\n\t\t\t%s->%s->assign(s);\n\t\t}", obj, name, obj, name);
+    else if (is_stdstring(ptr))
+      fprintf(fout, "\n\tchar *s;\n\t\tif (soap_s2string(soap, t, &s))\n\t\t\treturn NULL;\n\t\tif (s)\n\t\t{\t%s->%s = soap_new_std__string(soap, -1);\n\t\t\t%s->%s->assign(s);\n\t\t}", obj, name, obj, name);
+    else if (is_stdwstring(ptr))
+      fprintf(fout, "\n\twchar_t *s;\n\t\tif (soap_s2wchar(soap, t, &s))\n\t\t\treturn NULL;\n\t\tif (s)\n\t\t{\t%s->%s = soap_new_std__wstring(soap, -1);\n\t\t\t%s->%s->assign(s);\n\t\t}", obj, name, obj, name);
+    else if (is_hexBinary(ptr))
+      fprintf(fout, "\n\tif (!(%s->%s->__ptr = (unsigned char*)soap_hex2s(soap, soap_attr_value(soap, \"%s\", %d), NULL, 0, &%s->%s->__size)))\n\t\treturn NULL;", obj, name, tag, flag, obj, name);
+    else if (is_binary(ptr))
+      fprintf(fout, "\n\tif (!(%s->%s->__ptr = (unsigned char*)soap_base642s(soap, soap_attr_value(soap, \"%s\", %d), NULL, 0, &%s->%s->__size)))\n\t\treturn NULL;", obj, name, tag, flag, obj, name);
+    else
+      fprintf(fout, "\n\tif (soap_s2%s(soap, t, %s->%s))\n\t\treturn NULL;", the_type(ptr), obj, name);
+    fprintf(fout, "\n\t\t}\n\t}");
+  }
+  else if (is_hexBinary(typ))
+    fprintf(fout, "\n\tif (!(%s->%s.__ptr = (unsigned char*)soap_hex2s(soap, soap_attr_value(soap, \"%s\", %d), NULL, 0, &%s->%s.__size)))\n\t\treturn NULL;", obj, name, tag, flag, obj, name);
+  else if (is_binary(typ))
+    fprintf(fout, "\n\tif (!(%s->%s.__ptr = (unsigned char*)soap_base642s(soap, soap_attr_value(soap, \"%s\", %d), NULL, 0, &%s->%s.__size)))\n\t\treturn NULL;", obj, name, tag, flag, obj, name);
+  else if (is_primitive(typ))
+    fprintf(fout, "\n\tif (soap_s2%s(soap, soap_attr_value(soap, \"%s\", %d), &%s->%s))\n\t\treturn NULL;", the_type(typ), tag, flag, obj, name);
+}
+
+char *
+ptr_cast(Tnode *typ, char *name)
+{ char *s = c_type_id(typ, "*");
+  char *t = emalloc(strlen(s) + strlen(name) + 6);
+  sprintf(t, "((%s)%s)", s, name);
+  return t;
+}
+
+void
+soap_out(Tnode *typ)
+{ Table *table,*t;
+  Entry *p;
+  int cardinality,i,j,d;
+  Tnode *n;
+  char *nse = ns_qualifiedElement(typ);
+  char *nsa = ns_qualifiedAttribute(typ);
+
+  if (is_dynamic_array(typ))
+  { soap_out_Darray(typ);
+    return;
+  }
+  if (is_primitive(typ) && typ->type != Tenum)
+  { if (is_external(typ))
+    { fprintf(fhead,"\nSOAP_FMAC1 int SOAP_FMAC2 soap_out_%s(struct soap*, const char*, int, const %s, const char*);", c_ident(typ),c_type_id(typ, "*")); 
+      return;
+    }
+    fprintf(fhead,"\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap*, const char*, int, const %s, const char*);", c_ident(typ),c_type_id(typ, "*")); 
+    fprintf(fout,"\n\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap *soap, const char *tag, int id, const %s, const char *type)\n{", c_ident(typ),c_type_id(typ, "*a")); 
+    if (typ->type == Tllong || typ->type == Tullong)
+      fprintf(fout,"\n\treturn soap_out%s(soap, tag, id, a, type, %s);\n}", c_type(typ), soap_type(typ)); 
+    else
+      fprintf(fout,"\n\treturn soap_out%s(soap, tag, id, a, type, %s);\n}", the_type(typ), soap_type(typ)); 
+    return;
+  }
+  if (is_string(typ))
+  { if (is_external(typ))
+    { fprintf(fhead,"\nSOAP_FMAC1 int SOAP_FMAC2 soap_out_%s(struct soap*, const char*, int, char*const*, const char*);", c_ident(typ));
+      return;
+    }
+    fprintf(fhead,"\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap*, const char*, int, char*const*, const char*);", c_ident(typ));
+    fprintf(fout,"\n\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap *soap, const char *tag, int id, char *const*a, const char *type)\n{", c_ident(typ));
+    fprintf(fout,"\n\treturn soap_outstring(soap, tag, id, a, type, %s);\n}", soap_type(typ)); 
+    return;
+  }
+  if (is_wstring(typ))
+  { if (is_external(typ))
+    { fprintf(fhead,"\nSOAP_FMAC1 int SOAP_FMAC2 soap_out_%s(struct soap*, const char*, int, wchar_t*const*, const char*);", c_ident(typ));
+        return;
+    }
+    fprintf(fhead,"\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap*, const char*, int, wchar_t*const*, const char*);", c_ident(typ));
+    fprintf(fout,"\n\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap *soap, const char *tag, int id, wchar_t *const*a, const char *type)\n{", c_ident(typ));
+    fprintf(fout,"\n\treturn soap_outwstring(soap, tag, id, a, type, %s);\n}", soap_type(typ)); 
+    return;
+  }
+  if (is_stdstring(typ))
+  { fprintf(fhead,"\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap*, const char*, int, const std::string*, const char*);", c_ident(typ)); 
+    fprintf(fout,"\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap *soap, const char *tag, int id, const std::string *s, const char *type)\n{\n\tif (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, s, %s), type) || soap_string_out(soap, s->c_str(), 0) || soap_element_end_out(soap, tag))\n\t\treturn soap->error;\n\treturn SOAP_OK;\n}", c_ident(typ), soap_type(typ));
+    return;
+  }
+  if (is_stdstring(typ))
+  { fprintf(fhead,"\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap*, const char*, int, const std::string*, const char*);", c_ident(typ)); 
+    fprintf(fout,"\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap *soap, const char *tag, int id, const std::string *s, const char *type)\n{\n\tif (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, s, %s), type) || soap_string_out(soap, s->c_str(), 0) || soap_element_end_out(soap, tag))\n\t\treturn soap->error;\n\treturn SOAP_OK;\n}", c_ident(typ), soap_type(typ));
+    return;
+  }
+  if (is_stdwstring(typ))
+  { fprintf(fhead,"\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap*, const char*, int, const std::wstring*, const char*);", c_ident(typ)); 
+    fprintf(fout,"\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap *soap, const char *tag, int id, const std::wstring *s, const char *type)\n{\n\tif (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, s, %s), type) || soap_wstring_out(soap, s->c_str(), 0) || soap_element_end_out(soap, tag))\n\t\treturn soap->error;\n\treturn SOAP_OK;\n}", c_ident(typ), soap_type(typ));
+    return;
+  }
+  switch(typ->type)
+  { case Tstruct:
+      table=(Table*)typ->ref;
+      if (is_external(typ))
+      { fprintf(fhead,"\nSOAP_FMAC1 int SOAP_FMAC2 soap_out_%s(struct soap*, const char*, int, const %s, const char*);", c_ident(typ),c_type_id(typ, "*")); 
+        return;
+      }
+      fprintf(fhead,"\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap*, const char*, int, const %s, const char*);", c_ident(typ),c_type_id(typ, "*")); 
+      fprintf(fout,"\n\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap *soap, const char *tag, int id, const %s, const char *type)\n{", c_ident(typ),c_type_id(typ, "*a")); 
+      for (t = table; t; t = t->prev)
+      {	for (p = t->list; p; p = p->next)
+	{ if (p->info.sto & Sattribute)
+	    soap_set_attr(p->info.typ, "a", p->sym->name, ns_add(p->sym->name, nsa));
+	  else if (is_qname(p->info.typ))
+            fprintf(fout,"\n\tconst char *soap_tmp_%s = soap_QName2s(soap, a->%s);", p->sym->name, p->sym->name);
+	  else if (is_stdqname(p->info.typ))
+            fprintf(fout,"\n\tstd::string soap_tmp_%s(soap_QName2s(soap, a->%s.c_str()));", p->sym->name, p->sym->name);
+        }
+      }
+     if (is_primclass(typ))
+     {
+	for (table = (Table*)typ->ref; table; table = table->prev)
+	{ p = table->list;
+	  if (p && is_item(p))
+	    break;
+        }
+	  if ((p->info.sto & SmustUnderstand) && !(p->info.sto & (Sconst | Sprivate | Sprotected)) && !(p->info.sto & Sattribute) && !is_transient(p->info.typ) && !is_void(p->info.typ) && p->info.typ->type != Tfun)
+	    fprintf(fout, "\n\tsoap->mustUnderstand = 1;");
+	  if(p->info.typ->type==Tarray)
+	    fprintf(fout,"\n\treturn soap_out_%s(soap, tag, id, a->%s, \"%s\");", c_ident(p->info.typ), p->sym->name, xsi_type_u(typ));
+	  else if(p->info.typ->type==Tclass && !is_external(p->info.typ) && !is_volatile(p->info.typ) && !is_typedef(p->info.typ))
+	    fprintf(fout,"\n\treturn a->%s.soap_out(soap, tag, id, \"%s\");", p->sym->name,xsi_type_u(typ));
+	  else if (is_qname(p->info.typ))
+	    fprintf(fout,"\n\treturn soap_out_%s(soap, tag, id, (char*const*)&soap_tmp_%s, \"%s\");", c_ident(p->info.typ), p->sym->name, xsi_type_u(typ));
+	  else if (is_stdqname(p->info.typ))
+	    fprintf(fout,"\n\treturn soap_out_%s(soap, tag, id, &soap_tmp_%s, \"%s\");", c_ident(p->info.typ), p->sym->name, xsi_type_u(typ));
+	  else if (is_XML(p->info.typ) && is_string(p->info.typ))
+	    fprintf(fout,"\n\treturn soap_outliteral(soap, \"%s\", &a->%s);", ns_add(p->sym->name, nse),p->sym->name);
+	  else if (is_XML(p->info.typ) && is_wstring(p->info.typ))
+	    fprintf(fout,"\n\treturn soap_outwliteral(soap, \"%s\", &a->%s);", ns_add(p->sym->name, nse),p->sym->name);
+	  else if (p->info.typ->type != Tfun && !is_void(p->info.typ))
+	    fprintf(fout,"\n\treturn soap_out_%s(soap, tag, id, &a->%s, \"%s\");", c_ident(p->info.typ), p->sym->name, xsi_type_u(typ));
+	  else
+            fprintf(fout,"\n\treturn SOAP_OK;");	 
+      fprintf(fout,"\n}");	 
+   }
+   else
+   {  if (!is_invisible(typ->id->name))
+        fprintf(fout,"\n\tsoap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, %s), type);", soap_type(typ));
+      fflush(fout);
+      for (t = table; t; t = t->prev)
+      {	for (p = t->list; p; p = p->next)
+	{ if (p->info.sto & Sreturn)
+	  { if (p->info.typ->type == Tpointer)
+	      fprintf(fout,"\n\tif (a->%s)\n\t\tsoap_element_result(soap, \"%s\");", p->sym->name, ns_add(p->sym->name, nse));
+            else
+	      fprintf(fout,"\n\tsoap_element_result(soap, \"%s\");", ns_add(p->sym->name, nse));
+	  }
+	  if ((p->info.sto & SmustUnderstand) && !(p->info.sto & (Sconst | Sprivate | Sprotected)) && !is_transient(p->info.typ) && !is_void(p->info.typ) && p->info.typ->type != Tfun)
+	    fprintf(fout, "\n\tsoap->mustUnderstand = 1;");
+	  if (p->info.sto & (Sconst | Sprivate | Sprotected))
+	    fprintf(fout, "\n\t/* non-serializable %s skipped */", p->sym->name);
+	  else if (is_transient(p->info.typ))
+	    fprintf(fout, "\n\t/* transient %s skipped */", p->sym->name);
+	  else if (p->info.sto & Sattribute)
+	    ;
+	  else if (is_repetition(p))
+	  { fprintf(fout,"\n\tif (a->%s)", p->next->sym->name);
+            fprintf(fout,"\n\t{\tint i;\n\t\tfor (i = 0; i < a->%s; i++)", p->sym->name);
+            if (((Tnode*)p->next->info.typ->ref)->type == Tclass && !is_external(p->next->info.typ->ref) && !is_volatile(p->next->info.typ->ref) && !is_typedef(p->next->info.typ->ref))
+              fprintf(fout,"\n\t\t\ta->%s[i].soap_out(soap, \"%s\", -1, \"%s\");", p->next->sym->name, ns_add(p->next->sym->name, nse),xsi_type_cond_u(p->next->info.typ->ref, !has_ns_eq(NULL, p->next->sym->name)));
+            else if (is_XML(p->next->info.typ->ref) && is_string(p->next->info.typ->ref))
+	      fprintf(fout,"\n\t\t\tsoap_outliteral(soap, \"%s\", a->%s + i);", ns_add(p->next->sym->name, nse),p->next->sym->name);
+            else if (is_XML(p->next->info.typ->ref) && is_wstring(p->next->info.typ->ref))
+	      fprintf(fout,"\n\t\t\tsoap_outwliteral(soap, \"%s\", a->%s + i);", ns_add(p->next->sym->name, nse),p->next->sym->name);
+	    else
+              fprintf(fout,"\n\t\t\tsoap_out_%s(soap, \"%s\", -1, a->%s + i, \"%s\");", c_ident(p->next->info.typ->ref), ns_add(p->next->sym->name, nse), p->next->sym->name, xsi_type_cond_u(p->next->info.typ->ref, !has_ns_eq(NULL, p->next->sym->name)));
+            fprintf(fout,"\n\t}");
+            p = p->next;
+	  }
+	  else if (is_anytype(p))
+	  { fprintf(fout,"\n\tsoap_putelement(soap, a->%s, \"%s\", -1, a->%s);", p->next->sym->name, ns_add(p->next->sym->name, nse),p->sym->name);
+            p = p->next;
+	  }
+	  else if (is_choice(p))
+	  { fprintf(fout,"\n\tsoap_out_%s(soap, a->%s, &a->%s);", c_ident(p->next->info.typ),p->sym->name, p->next->sym->name);
+            p = p->next;
+	  }
+	  else if (p->info.typ->type==Tarray)
+	    fprintf(fout,"\n\tsoap_out_%s(soap, \"%s\", -1, a->%s, \"%s\");", c_ident(p->info.typ),ns_add(p->sym->name, nse),p->sym->name,xsi_type_cond_u(p->info.typ, !has_ns_eq(NULL, p->sym->name)));
+	  else if (p->info.typ->type==Tclass && !is_external(p->info.typ) && !is_volatile(p->info.typ) && !is_typedef(p->info.typ))
+	    fprintf(fout,"\n\ta->%s.soap_out(soap, \"%s\", -1, \"%s\");", p->sym->name,ns_add(p->sym->name, nse),xsi_type_cond_u(p->info.typ, !has_ns_eq(NULL, p->sym->name)));
+	  else if (is_qname(p->info.typ))
+	    fprintf(fout,"\n\tsoap_out_%s(soap, \"%s\", -1, (char*const*)&soap_tmp_%s, \"%s\");", c_ident(p->info.typ),ns_add(p->sym->name, nse),p->sym->name, xsi_type_cond_u(p->info.typ, !has_ns_eq(NULL, p->sym->name)));
+	  else if (is_stdqname(p->info.typ))
+	    fprintf(fout,"\n\tsoap_out_%s(soap, \"%s\", -1, &soap_tmp_%s, \"%s\");", c_ident(p->info.typ),ns_add(p->sym->name, nse),p->sym->name, xsi_type_cond_u(p->info.typ, !has_ns_eq(NULL, p->sym->name)));
+	  else if (is_XML(p->info.typ) && is_string(p->info.typ))
+	    fprintf(fout,"\n\tsoap_outliteral(soap, \"%s\", &a->%s);", ns_add(p->sym->name, nse),p->sym->name);
+	  else if (is_XML(p->info.typ) && is_wstring(p->info.typ))
+	    fprintf(fout,"\n\tsoap_outwliteral(soap, \"%s\", &a->%s);", ns_add(p->sym->name, nse),p->sym->name);
+	  else if (p->info.typ->type != Tfun && !is_void(p->info.typ))
+	    fprintf(fout,"\n\tsoap_out_%s(soap, \"%s\", -1, &a->%s, \"%s\");", c_ident(p->info.typ),ns_add(p->sym->name, nse),p->sym->name, xsi_type_cond_u(p->info.typ, !has_ns_eq(NULL, p->sym->name)));
+	}
+      }	
+      if (!is_invisible(typ->id->name))
+        fprintf(fout,"\n\tsoap_element_end_out(soap, tag);");
+      fprintf(fout,"\n\treturn SOAP_OK;\n}");	 
+    }
+    fflush(fout);
+    break;
+      
+    case Tclass:
+      table=(Table*)typ->ref;
+      if (!is_volatile(typ) && !is_typedef(typ))
+      { 
+        if (is_external(typ))
+        { fprintf(fhead,"\nSOAP_FMAC1 int SOAP_FMAC2 soap_out_%s(struct soap*, const char*, int, const %s, const char*);", c_ident(typ),c_type_id(typ, "*")); 
+          return;
+        }
+        fprintf(fout,"\n\nint %s::soap_out(struct soap *soap, const char *tag, int id, const char *type) const", typ->id->name); 
+        fprintf(fout,"\n{\n\treturn soap_out_%s(soap, tag, id, this, type);\n}", c_ident(typ)); 
+      }
+      fprintf(fhead,"\n\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap*, const char*, int, const %s, const char*);", c_ident(typ), c_type_id(typ, "*")); 
+      fprintf(fout,"\n\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap *soap, const char *tag, int id, const %s, const char *type)\n{", c_ident(typ), c_type_id(typ, "*a")); 
+      fflush(fout);
+      if (has_setter(typ))
+        fprintf(fout, "\n\t((%s)a)->set(soap);", c_type_id(typ, "*"));
+      for (t = table; t; t = t->prev)
+      {	for (p = t->list; p; p = p->next)
+	{ if (p->info.sto & Sattribute)
+	    soap_set_attr(p->info.typ, ptr_cast(typ, "a"), p->sym->name, ns_add(p->sym->name, nsa));
+	  else if (is_qname(p->info.typ))
+            fprintf(fout,"\n\tconst char *soap_tmp_%s = soap_QName2s(soap, a->%s);", p->sym->name, p->sym->name);
+	  else if (is_stdqname(p->info.typ))
+            fprintf(fout,"\n\tstd::string soap_tmp_%s(soap_QName2s(soap, a->%s.c_str()));", p->sym->name, p->sym->name);
+        }
+     }
+     if (is_primclass(typ))
+     {
+	for (t = table; t; t = t->prev)
+	{ p = t->list;
+	  if (p && is_item(p))
+	    break;
+        }
+	if (p->info.sto & Sreturn)
+	{ if (p->info.typ->type == Tpointer)
+	    fprintf(fout,"\n\tif (a->%s)\n\t\tsoap_element_result(soap, \"%s\");", p->sym->name, ns_add(p->sym->name, nse));
+          else
+	    fprintf(fout,"\n\tsoap_element_result(soap, \"%s\");", ns_add(p->sym->name, nse));
+	}
+	  if ((p->info.sto & SmustUnderstand) && !(p->info.sto & (Sconst | Sprivate | Sprotected)) && !(p->info.sto & Sattribute) && !is_transient(p->info.typ) && !is_void(p->info.typ) && p->info.typ->type != Tfun)
+	    fprintf(fout, "\n\tsoap->mustUnderstand = 1;");
+	  if (is_XML(p->info.typ) && is_string(p->info.typ))
+	    fprintf(fout,"\n\treturn soap_outliteral(soap, \"%s\", &(((%s*)a)->%s));", ns_add(p->sym->name, nse),t->sym->name,p->sym->name);
+	  else if (is_XML(p->info.typ) && is_wstring(p->info.typ))
+	    fprintf(fout,"\n\treturn soap_outwliteral(soap, \"%s\", &(((%s*)a)->%s));", ns_add(p->sym->name, nse),t->sym->name,p->sym->name);
+	  else if (table->prev)
+	  {
+	    if(p->info.typ->type==Tarray)
+	      fprintf(fout,"\n\treturn soap_out_%s(soap, tag, id, ((%s*)a)->%s, \"%s\");", c_ident(p->info.typ), t->sym->name,p->sym->name, xsi_type_u(typ));
+	    else if(p->info.typ->type==Tclass && !is_external(p->info.typ) && !is_volatile(p->info.typ) && !is_typedef(p->info.typ))
+	      fprintf(fout,"\n\treturn (((%s*)a)->%s).soap_out(soap, tag, id, \"%s\");", t->sym->name, p->sym->name,xsi_type_u(typ));
+	    else if (is_qname(p->info.typ))
+	      fprintf(fout,"\n\treturn soap_out_%s(soap, tag, id, (char*const*)&soap_tmp_%s, \"%s\");", c_ident(p->info.typ), p->sym->name, xsi_type_u(typ));
+	    else if (is_stdqname(p->info.typ))
+	      fprintf(fout,"\n\treturn soap_out_%s(soap, tag, id, &soap_tmp_%s, \"%s\");", c_ident(p->info.typ), p->sym->name, xsi_type_u(typ));
+	    else if (p->info.typ->type != Tfun && !is_void(p->info.typ))
+	      fprintf(fout,"\n\treturn soap_out_%s(soap, tag, id, &(((%s*)a)->%s), \"%s\");", c_ident(p->info.typ), t->sym->name,p->sym->name,xsi_type_u(typ));
+	    else
+              fprintf(fout,"\n\treturn SOAP_OK;");	 
+	  }
+	  else
+	  { if(p->info.typ->type==Tarray)
+	      fprintf(fout,"\n\treturn soap_out_%s(soap, tag, id, ((%s*)a)->%s, \"%s\");", c_ident(p->info.typ), t->sym->name,p->sym->name, xsi_type_u(typ));
+	    else if(p->info.typ->type==Tclass && !is_external(p->info.typ) && !is_volatile(p->info.typ) && !is_typedef(p->info.typ))
+	      fprintf(fout,"\n\treturn (((%s*)a)->%s).soap_out(soap, tag, id, \"%s\");", t->sym->name, p->sym->name,xsi_type_u(typ));
+	    else if (is_qname(p->info.typ))
+	      fprintf(fout,"\n\treturn soap_out_%s(soap, tag, id, (char*const*)&soap_tmp_%s, \"%s\");", c_ident(p->info.typ), p->sym->name, xsi_type_u(typ));
+	    else if (is_stdqname(p->info.typ))
+	      fprintf(fout,"\n\treturn soap_out_%s(soap, tag, id, &soap_tmp_%s, \"%s\");", c_ident(p->info.typ), p->sym->name, xsi_type_u(typ));
+	    else if (p->info.typ->type != Tfun && !is_void(p->info.typ))
+	      fprintf(fout,"\n\treturn soap_out_%s(soap, tag, id, &(((%s*)a)->%s), \"%s\");", c_ident(p->info.typ), t->sym->name,p->sym->name,xsi_type_u(typ));
+	    else
+              fprintf(fout,"\n\treturn SOAP_OK;");	 
+	  }
+       fprintf(fout,"\n}");	 
+     }
+     else
+     { if (!is_invisible(typ->id->name))
+         if (table && table->prev)
+           fprintf(fout,"\n\tsoap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, %s), \"%s\");", soap_type(typ), xsi_type(typ));
+         else
+           fprintf(fout,"\n\tsoap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, %s), type);", soap_type(typ));
+       fflush(fout);
+      
+      i=0;
+      /* Get the depth of the inheritance hierarchy */
+      for (t = table; t; t = t->prev)
+	i++;
+
+      /* Call routines to output the member data of the class */
+      /* Data members of the Base Classes are outputed first
+	 followed by the data members of the Derived classes.
+	 Overridden data members are output twice once for the base class
+	 they are defined in and once for the derived class that overwrites
+	 them */
+      
+      for (; i > 0; i--)
+      { t = table;
+	for (j = 0; j< i-1; j++)
+	  t = t->prev;
+	for (p = t->list; p != (Entry*) 0; p = p->next)
+	{ if ((p->info.sto & SmustUnderstand) && !(p->info.sto & (Sconst | Sprivate | Sprotected)) && !(p->info.sto & Sattribute) && !is_transient(p->info.typ) && !is_void(p->info.typ) && p->info.typ->type != Tfun)
+	    fprintf(fout, "\n\tsoap->mustUnderstand = 1;");
+	  if (is_item(p))
+	    ;
+	  else if (p->info.sto & (Sconst | Sprivate | Sprotected))
+	    fprintf(fout, "\n\t/* non-serializable %s skipped */", p->sym->name);
+	  else if (is_transient(p->info.typ))
+	    fprintf(fout, "\n\t/* transient %s skipped */", p->sym->name);
+	  else if (p->info.sto & Sattribute)
+	    ;
+	  else if (is_repetition(p))
+	  { fprintf(fout,"\n\tif (((%s*)a)->%s)", t->sym->name, p->next->sym->name);
+            fprintf(fout,"\n\t{\tint i;\n\t\tfor (i = 0; i < ((%s*)a)->%s; i++)", t->sym->name, p->sym->name);
+            if (((Tnode*)p->next->info.typ->ref)->type == Tclass && !is_external(p->next->info.typ->ref) && !is_volatile(p->next->info.typ->ref) && !is_typedef(p->next->info.typ->ref))
+              fprintf(fout,"\n\t\t\t((%s*)a)->%s[i].soap_out(soap, \"%s\", -1, \"%s\");", t->sym->name, p->next->sym->name, ns_add_overridden(t, p->next, nse),xsi_type_cond_u(p->next->info.typ->ref, !has_ns_eq(NULL, p->next->sym->name)));
+            else if (is_XML(p->next->info.typ->ref) && is_string(p->next->info.typ->ref))
+	      fprintf(fout,"\n\t\t\tsoap_outliteral(soap, \"%s\", ((%s*)a)->%s + i);", ns_add(p->next->sym->name, nse),t->sym->name, p->next->sym->name);
+            else if (is_XML(p->next->info.typ->ref) && is_wstring(p->next->info.typ->ref))
+              fprintf(fout,"\n\t\t\tsoap_outwliteral(soap, \"%s\", ((%s*a)->%s + i);", ns_add(p->next->sym->name, nse),t->sym->name, p->next->sym->name);
+            else
+              fprintf(fout,"\n\t\t\tsoap_out_%s(soap, \"%s\", -1, ((%s*)a)->%s + i, \"%s\");", c_ident(p->next->info.typ->ref), ns_add_overridden(t, p->next, nse), t->sym->name, p->next->sym->name, xsi_type_cond_u(p->next->info.typ->ref, !has_ns_eq(NULL, p->next->sym->name)));
+            fprintf(fout,"\n\t}");
+            p = p->next;
+	  }
+	  else if (is_anytype(p))
+	  { fprintf(fout,"\n\tsoap_putelement(soap, ((%s*)a)->%s, \"%s\", -1, ((%s*)a)->%s);", t->sym->name, p->next->sym->name, ns_add(p->sym->name, nse),t->sym->name,p->sym->name);
+            p = p->next;
+	  }
+	  else if (is_choice(p))
+	  { fprintf(fout,"\n\tsoap_out_%s(soap, ((%s*)a)->%s, &((%s*)a)->%s);", c_ident(p->next->info.typ), t->sym->name, p->sym->name, t->sym->name, p->next->sym->name);
+            p = p->next;
+	  }
+	  else if (p->info.typ->type==Tarray)
+	    fprintf(fout,"\n\tsoap_out_%s(soap, \"%s\", -1, ((%s*)a)->%s, \"%s\");", c_ident(p->info.typ),ns_add_overridden(t, p, nse), t->sym->name,p->sym->name, xsi_type_cond_u(p->info.typ, !has_ns_eq(NULL, p->sym->name)));
+	  else if (p->info.typ->type==Tclass && !is_external(p->info.typ) && !is_volatile(p->info.typ) && !is_typedef(p->info.typ))
+	    fprintf(fout,"\n\t(((%s*)a)->%s).soap_out(soap, \"%s\", -1, \"%s\");", t->sym->name, p->sym->name,ns_add_overridden(t, p, nse),xsi_type_cond_u(p->info.typ, !has_ns_eq(NULL, p->sym->name)));
+	  else if (is_qname(p->info.typ))
+	    fprintf(fout,"\n\tsoap_out_%s(soap, \"%s\", -1, (char*const*)&soap_tmp_%s, \"%s\");", c_ident(p->info.typ),ns_add_overridden(t, p, nse),p->sym->name, xsi_type_cond_u(p->info.typ, !has_ns_eq(NULL, p->sym->name)));
+	  else if (is_stdqname(p->info.typ))
+	    fprintf(fout,"\n\tsoap_out_%s(soap, \"%s\", -1, &soap_tmp_%s, \"%s\");", c_ident(p->info.typ),ns_add_overridden(t, p, nse),p->sym->name, xsi_type_cond_u(p->info.typ, !has_ns_eq(NULL, p->sym->name)));
+	  else if (is_XML(p->info.typ) && is_string(p->info.typ))
+	    fprintf(fout,"\n\tsoap_outliteral(soap, \"%s\", &(((%s*)a)->%s));", ns_add_overridden(t, p, nse),t->sym->name,p->sym->name);
+	  else if (is_XML(p->info.typ) && is_wstring(p->info.typ))
+	    fprintf(fout,"\n\tsoap_outwliteral(soap, \"%s\", &(((%s*)a)->%s));", ns_add_overridden(t, p, nse),t->sym->name,p->sym->name);
+	  else if (p->info.typ->type != Tfun && !is_void(p->info.typ))
+	    fprintf(fout,"\n\tsoap_out_%s(soap, \"%s\", -1, &(((%s*)a)->%s), \"%s\");", c_ident(p->info.typ),ns_add_overridden(t, p, nse), t->sym->name,p->sym->name,xsi_type_cond_u(p->info.typ, !has_ns_eq(NULL, p->sym->name)));
+  	  fflush(fout);
+	}
+       }
+       if (!is_invisible(typ->id->name))
+         fprintf(fout,"\n\tsoap_element_end_out(soap, tag);");
+       fprintf(fout,"\n\treturn SOAP_OK;\n}");	 
+      }
+      fflush(fout);
+      break;
+      
+    case Tunion:
+      if (is_external(typ))
+      { fprintf(fhead, "\nSOAP_FMAC1 int SOAP_FMAC2 soap_out_%s(struct soap*, int, const %s);", c_ident(typ), c_type_id(typ, "*")); 
+        return;
+      }
+      fprintf(fhead, "\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap*, int, const %s);", c_ident(typ), c_type_id(typ, "*")); 
+      fprintf(fout, "\n\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap *soap, int choice, const %s)\n{", c_ident(typ), c_type_id(typ, "*a")); 
+      table = (Table*)typ->ref;
+      fprintf(fout, "\n\tswitch (choice)\n\t{");
+      for (p = table->list; p; p = p->next)
+      { if (p->info.sto & (Sconst | Sprivate | Sprotected))
+	  fprintf(fout, "\n\t/* non-serializable %s skipped */", p->sym->name);
+	else if (is_transient(p->info.typ))
+	  fprintf(fout, "\n\t/* transient %s skipped */", p->sym->name);
+	else if (p->info.sto & Sattribute)
+	  ;
+	else if (is_repetition(p))
+	  ;
+	else if (is_anytype(p))
+	  ;
+	else if (p->info.typ->type == Tarray)
+	{ fprintf(fout, "\n\tcase SOAP_UNION_%s_%s:", c_ident(typ), p->sym->name);
+	  fprintf(fout, "\n\t\treturn soap_out_%s(soap, \"%s\", -1, a->%s, \"%s\");", c_ident(p->info.typ),ns_add(p->sym->name, nse),p->sym->name,xsi_type_cond_u(p->info.typ, !has_ns_eq(NULL, p->sym->name)));
+	}
+	else if (p->info.typ->type == Tclass && !is_external(p->info.typ) && !is_volatile(p->info.typ) && !is_typedef(p->info.typ))
+	{ fprintf(fout, "\n\tcase SOAP_UNION_%s_%s:", c_ident(typ), p->sym->name);
+	  fprintf(fout, "\n\t\treturn a->%s.soap_out(soap, \"%s\", -1, \"%s\");", p->sym->name,ns_add(p->sym->name, nse),xsi_type_cond_u(p->info.typ, !has_ns_eq(NULL, p->sym->name)));
+	}
+	else if (is_qname(p->info.typ) || is_stdqname(p->info.typ))
+	{ fprintf(fout, "\n\tcase SOAP_UNION_%s_%s:", c_ident(typ), p->sym->name);
+          fprintf(fout,"\n\t{\tconst char *soap_tmp_%s = soap_QName2s(soap, a->%s);", p->sym->name, p->sym->name);
+	  fprintf(fout,"\n\t\treturn soap_out_%s(soap, \"%s\", -1, (char*const*)&soap_tmp_%s, \"%s\");\n\t}", c_ident(p->info.typ),ns_add(p->sym->name, nse),p->sym->name, xsi_type_cond_u(p->info.typ, !has_ns_eq(NULL, p->sym->name)));
+	}
+	else if (is_XML(p->info.typ) && is_string(p->info.typ))
+	{ fprintf(fout, "\n\tcase SOAP_UNION_%s_%s:", c_ident(typ), p->sym->name);
+	  fprintf(fout,"\n\t\treturn soap_outliteral(soap, \"%s\", &a->%s);", ns_add(p->sym->name, nse),p->sym->name);
+	}
+	else if (is_XML(p->info.typ) && is_wstring(p->info.typ))
+	{ fprintf(fout, "\n\tcase SOAP_UNION_%s_%s:", c_ident(typ), p->sym->name);
+	  fprintf(fout,"\n\t\treturn soap_outwliteral(soap, \"%s\", &a->%s);", ns_add(p->sym->name, nse),p->sym->name);
+	}
+	else if (p->info.typ->type != Tfun && !is_void(p->info.typ))
+	{ fprintf(fout, "\n\tcase SOAP_UNION_%s_%s:", c_ident(typ), p->sym->name);
+	  fprintf(fout,"\n\t\treturn soap_out_%s(soap, \"%s\", -1, &a->%s, \"%s\");", c_ident(p->info.typ),ns_add(p->sym->name, nse),p->sym->name, xsi_type_cond_u(p->info.typ, !has_ns_eq(NULL, p->sym->name)));
+        }
+      }	
+      fprintf(fout, "\n\t}\n\treturn SOAP_OK;\n}");
+      fflush(fout);
+      break;
+
+    case Tpointer:
+      if (is_external(typ))
+      { fprintf(fhead,"\nSOAP_FMAC1 int SOAP_FMAC2 soap_out_%s(struct soap*, const char *, int, %s, const char *);", c_ident(typ),c_type_id(typ, "const*")); 
+        return;
+      }
+      fprintf(fhead,"\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap*, const char *, int, %s, const char *);", c_ident(typ),c_type_id(typ, "const*")); 
+      fprintf(fout,"\n\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap *soap, const char *tag, int id, %s, const char *type)\n{", c_ident(typ),c_type_id(typ, "const*a")); 
+      if (is_template(typ))
+      { fprintf(fout,"\n\tif (!*a)");
+        fprintf(fout,"\n\t\treturn soap_element_null(soap, tag, id, type);");
+        fprintf(fout,"\n\treturn soap_out_%s(soap, tag, id, *a, type);", c_ident(typ->ref));
+      }
+      else
+      { if (p = is_dynamic_array(typ->ref))
+        { d = get_Darraydims(typ->ref);
+	  if (d)
+            fprintf(fout,"\n\tid = soap_element_id(soap, tag, id, *a, (struct soap_array*)&(*a)->%s, %d, type, %s);", p->sym->name, d, soap_type(typ->ref));
+	  else
+            fprintf(fout,"\n\tid = soap_element_id(soap, tag, id, *a, (struct soap_array*)&(*a)->%s, 1, type, %s);", p->sym->name, soap_type(typ->ref));
+        }
+	else
+          fprintf(fout,"\n\tid = soap_element_id(soap, tag, id, *a, NULL, 0, type, %s);", soap_type(typ->ref));
+	fprintf(fout,"\n\tif (id < 0)\n\t\treturn soap->error;");
+        if(((Tnode *) typ->ref)->type == Tclass && !is_external(typ->ref) && !is_volatile(typ->ref) && !is_typedef(typ->ref))
+	  fprintf(fout,"\n\treturn (*a)->soap_out(soap, tag, id, type);", c_ident(typ->ref));
+        else
+	  fprintf(fout,"\n\treturn soap_out_%s(soap, tag, id, *a, type);",c_ident(typ->ref));
+      }
+      fprintf(fout,"\n}");
+      break;
+
+    case Tarray:
+      if (is_external(typ))
+      { fprintf(fhead,"\nSOAP_FMAC1 int SOAP_FMAC2 soap_out_%s(struct soap*, const char*, int, %s, const char*);", c_ident(typ),c_type_id(typ, "const")); 
+        return;
+      }
+      fprintf(fhead,"\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap*, const char*, int, %s, const char*);", c_ident(typ),c_type_id(typ, "const")); 
+      fprintf(fout,"\n\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap *soap, const char *tag, int id, %s, const char *type)\n{", c_ident(typ),c_type_id(typ, "const a")); 
+      fprintf(fout,"\n\tint i;");
+        fprintf(fout,"\n\tsoap_array_begin_out(soap, tag, soap_embedded_id(soap, id, a, %s), \"%s[%d]\", 0);", soap_type(typ), xsi_type_Tarray(typ), get_dimension(typ));
+      n=typ->ref;
+      cardinality = 1;
+      while(n->type==Tarray)
+	{
+	  n=n->ref;
+	  cardinality++;
+	}
+
+      fprintf(fout,"\n\tfor (i = 0; i < %d; i++)\n\t{",get_dimension(typ));
+     if (((Tnode *)typ->ref)->type == Tclass && !is_external(typ->ref) && !is_volatile(typ->ref) && !is_typedef(typ->ref))
+     { if(cardinality>1)
+         fprintf(fout,"\n\t\ta[i].soap_out(soap, \"item\", -1, \"%s\")", xsi_type_u(typ->ref));
+       else fprintf(fout,"\n\t\t(a+i)->soap_out(soap, \"item\", -1, \"%s\")", xsi_type_u(typ->ref));
+     }
+     else
+     { if(((Tnode *)typ->ref)->type != Tarray)
+       { if(((Tnode *)typ->ref)->type == Tpointer)
+	  fprintf(fout,"\n\t\tsoap->position = 1;\n\t\tsoap->positions[0] = i;\n\t\tsoap_out_%s(soap, \"item\", -1, a", c_ident(typ->ref));
+	 else
+	  fprintf(fout,"\n\t\tsoap_out_%s(soap, \"item\", -1, a",c_ident(typ->ref));
+       }
+       else
+         fprintf(fout,"\n\t\tsoap_out_%s(soap, \"item\", -1, a",c_ident(typ->ref));
+       if(cardinality>1)
+         fprintf(fout,"[i], \"%s\")", xsi_type_u(typ->ref));
+       else
+         fprintf(fout,"+i, \"%s\")", xsi_type_u(typ->ref));
+      }
+      if(((Tnode *)typ->ref)->type == Tpointer)
+        fprintf(fout,";\n\t}\n\tsoap->position = 0;\n\tsoap_element_end_out(soap, tag);");
+      else
+        fprintf(fout,";\n\t}\n\tsoap_element_end_out(soap, tag);");		
+      fprintf(fout,"\n\treturn SOAP_OK;\n}");
+      break;
+
+    case Tenum:
+      if (is_external(typ))
+      { fprintf(fhead, "\nSOAP_FMAC1 int SOAP_FMAC2 soap_out_%s(struct soap*, const char*, int, const %s, const char*);", c_ident(typ), c_type_id(typ, "*"));
+        return;
+      }
+      fprintf(fhead, "\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap*, const char*, int, const %s, const char*);", c_ident(typ), c_type_id(typ, "*"));
+      if (!is_typedef(typ))
+      { fprintf(fout, "\n\nstatic const struct soap_code_map soap_codes_%s[] =\n{", c_ident(typ));
+        for (t = (Table*)typ->ref; t; t = t->prev)
+        { for (p = t->list; p; p = p->next)
+	    fprintf(fout, "\t{ (long)%s, \"%s\" },\n", p->sym->name, ns_remove2(p->sym->name));
+        }	
+        fprintf(fout, "\t{ 0, NULL }\n");
+        fprintf(fout, "};");
+      }
+      if (!is_mask(typ))
+      { fprintf(fhead, "\n\nSOAP_FMAC3S const char* SOAP_FMAC4S soap_%s2s(struct soap*, %s);", c_ident(typ), c_type(typ));
+        fprintf(fout, "\n\nSOAP_FMAC3S const char* SOAP_FMAC4S soap_%s2s(struct soap *soap, %s)", c_ident(typ), c_type_id(typ, "n"));
+	if (is_typedef(typ))
+          fprintf(fout, "\n{\treturn soap_%s2s(soap, n);\n}", t_ident(typ));
+	else
+        { fprintf(fout, "\n{\tconst char *s = soap_str_code(soap_codes_%s, (long)n);", c_ident(typ));
+          fprintf(fout, "\n\tif (s)\n\t\treturn s;");
+          fprintf(fout, "\n\treturn soap_long2s(soap, (long)n);");
+          fprintf(fout, "\n}");
+        }
+      }
+      if (is_mask(typ))
+      { fprintf(fout, "\n\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap *soap, const char *tag, int id, const %s, const char *type)", c_ident(typ), c_type_id(typ, "*a"));
+        fprintf(fout, "\n{\tlong i;\n\tsoap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, %s), type);", soap_type(typ));
+        fprintf(fout, "\n\tfor (i = 1; i; i <<= 1)");
+        fprintf(fout, "\n\t\tswitch ((long)*a & i)\n\t\t{");
+        for (t = (Table*)typ->ref; t; t = t->prev)
+        { for (p = t->list; p; p = p->next)
+	    fprintf(fout, "\n\t\t\tcase "SOAP_LONG_FORMAT": soap_send(soap, \"%s \"); break;", p->info.val.i, ns_remove2(p->sym->name));
+        }	
+        fprintf(fout, "\n\t\t}");
+      }
+      else
+      { fprintf(fout, "\n\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap *soap, const char *tag, int id, const %s, const char *type)", c_ident(typ), c_type_id(typ, "*a"));
+        fprintf(fout, "\n{\tsoap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, %s), type);", soap_type(typ));
+        fprintf(fout, "\n\tsoap_send(soap, soap_%s2s(soap, *a));", c_ident(typ));
+      }
+      fprintf(fout, "\n\treturn soap_element_end_out(soap, tag);\n}");
+      break;
+    case Ttemplate:
+      if (is_external(typ))
+      { fprintf(fhead,"\nSOAP_FMAC1 int SOAP_FMAC2 soap_out_%s(struct soap*, const char*, int, const %s, const char*);", c_ident(typ),c_type_id(typ, "*"));
+        return;
+      }
+      fprintf(fhead,"\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap*, const char*, int, const %s, const char*);", c_ident(typ),c_type_id(typ, "*"));
+      n = typ->ref;
+      if (!n)
+        return;
+      fprintf(fout,"\n\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap *soap, const char *tag, int id, const %s, const char *type)\n{", c_ident(typ),c_type_id(typ, "*a")); 
+
+      fprintf(fout, "\n\tfor (%s::const_iterator i = a->begin(); i != a->end(); ++i)\n\t{", c_type(typ));
+      if (n->type==Tarray)
+	fprintf(fout,"\n\t\tif (soap_out_%s(soap, tag, id, *i, \"%s\"))", c_ident(n), xsi_type_u(typ));
+      else if (n->type==Tclass && !is_external(n) && !is_volatile(n) && !is_typedef(n))
+	fprintf(fout,"\n\t\tif ((*i).soap_out(soap, tag, id, \"%s\"))", xsi_type_u(typ));
+      else if (is_XML(n) && is_string(n))
+        fprintf(fout,"\n\t\tif (soap_outliteral(soap, \"%s\", &(*i)))", xsi_type_u(typ));
+      else if (is_XML(n) && is_wstring(n))
+        fprintf(fout,"\n\t\tif (soap_outwliteral(soap, \"%s\", &(*i)))", xsi_type_u(typ));
+      else if (n->type == Tenum && n->ref == booltable)
+	fprintf(fout,"\n\t\tbool b = (*i);\n\t\tif (soap_out_%s(soap, tag, id, &b, \"%s\"))", c_ident(n), xsi_type_u(typ));
+      else
+	fprintf(fout,"\n\t\tif (soap_out_%s(soap, tag, id, &(*i), \"%s\"))", c_ident(n), xsi_type_u(typ));
+      fprintf(fout, "\n\t\t\treturn soap->error;");
+      fprintf(fout, "\n\t}\n\treturn SOAP_OK;\n}");
+      break;
+    default: break;
+    }
+}	  
+
+void
+soap_out_Darray(Tnode *typ)
+{ int i, j, d = 0;
+  Table *t, *table;
+  Entry *p, *q;
+  char *nse = ns_qualifiedElement(typ);
+  char *nsa = ns_qualifiedAttribute(typ);
+  char *item;
+
+  table=(Table*)typ->ref;
+  fprintf(fhead,"\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap*, const char*, int, const %s, const char*);", c_ident(typ),c_type_id(typ, "*")); 
+      if (is_external(typ))
+        return;
+  if (typ->type == Tclass && !is_volatile(typ) && !is_typedef(typ))
+  { fprintf(fout,"\n\nint %s::soap_out(struct soap *soap, const char *tag, int id, const char *type) const", c_type(typ)); 
+    fprintf(fout,"\n{\treturn soap_out_%s(soap, tag, id, this, type);\n}", c_ident(typ)); 
+  }
+  fflush(fout);
+  fprintf(fout,"\n\nSOAP_FMAC3 int SOAP_FMAC4 soap_out_%s(struct soap *soap, const char *tag, int id, const %s, const char *type)\n{", c_ident(typ),c_type_id(typ, "*a")); 
+  if (has_setter(typ))
+    fprintf(fout, "\n\t((%s)a)->set(soap);", c_type_id(typ, "*"));
+  if (!is_binary(typ))
+  { d = get_Darraydims(typ);
+    if (d)
+      fprintf(fout,"\n\tint i, n = soap_size(a->__size, %d);", d);
+    else
+      fprintf(fout,"\n\tint i, n = a->__size;");
+  }
+  if (typ->type == Tclass)
+  { for (t = table; t; t = t->prev)
+    {	for (p = t->list; p; p = p->next)
+	{ if (p->info.sto & Sattribute)
+	    soap_set_attr(p->info.typ, ptr_cast(typ, "a"), p->sym->name, ns_add(p->sym->name, nsa));
+        }
+    }
+  }
+  else
+  { for (t = table; t; t = t->prev)
+    {	for (p = t->list; p; p = p->next)
+	{ if (p->info.sto & Sattribute)
+	    soap_set_attr(p->info.typ, "a", p->sym->name, ns_add(p->sym->name, nsa));
+        }
+    }
+  }
+  p = is_dynamic_array(typ);
+  if (p->sym->name[5])
+    item = ns_add(p->sym->name + 5, nse);
+  else
+    item = ns_add("item", nse);
+  q = table->list;
+  if (!has_ns(typ) && !is_untyped(typ) && !is_binary(typ))
+  { if (is_untyped(p->info.typ))
+    { if (has_offset(typ))
+        if (d)
+          fprintf(fout,"\n\tchar *t = soap_putsizesoffsets(soap, \"%s\", a->__size, a->__offset, %d);", wsdl_type(p->info.typ, "xsd"), d); 
+        else
+          fprintf(fout,"\n\tchar *t = soap_putsize(soap, \"%s\", n + a->__offset);", wsdl_type(p->info.typ, "xsd"));
+      else if (d)
+	fprintf(fout,"\n\tchar *t = soap_putsizes(soap, \"%s\", a->__size, %d);", wsdl_type(p->info.typ, "xsd"), d);
+      else
+        fprintf(fout,"\n\tchar *t = soap_putsize(soap, \"%s\", n);", wsdl_type(p->info.typ, "xsd"));
+    }
+    else
+    { if (has_offset(typ))
+        if (d)
+          fprintf(fout,"\n\tchar *t = soap_putsizesoffsets(soap, \"%s\", a->__size, a->__offset, %d);", xsi_type(typ), d);
+        else
+          fprintf(fout,"\n\tchar *t = soap_putsize(soap, \"%s\", n + a->__offset);",xsi_type(typ));
+      else if (d)
+        fprintf(fout,"\n\tchar *t = soap_putsizes(soap, \"%s\", a->__size, %d);", xsi_type(typ),d);
+      else
+        fprintf(fout,"\n\tchar *t = soap_putsize(soap, \"%s\", a->__size);" ,xsi_type(typ));
+    }
+  }
+  if (d)
+    fprintf(fout,"\n\tid = soap_element_id(soap, tag, id, a, (struct soap_array*)&a->%s, %d, type, %s);", p->sym->name, d, soap_type(typ));
+  else if (is_attachment(typ))
+    fprintf(fout,"\n\tid = soap_attachment(soap, tag, id, a, (struct soap_array*)&a->%s, a->id, a->type, a->options, 1, type, %s);", p->sym->name, soap_type(typ));
+  else
+    fprintf(fout,"\n\tid = soap_element_id(soap, tag, id, a, (struct soap_array*)&a->%s, 1, type, %s);", p->sym->name, soap_type(typ));
+  fprintf(fout,"\n\tif (id < 0)\n\t\treturn soap->error;");
+  if (has_ns(typ) || is_untyped(typ) || is_binary(typ))
+  { if (table->prev)
+      fprintf(fout,"\n\tsoap_element_begin_out(soap, tag, id, \"%s\");", xsi_type(typ));
+    else
+      fprintf(fout,"\n\tsoap_element_begin_out(soap, tag, id, type);");
+  }
+  else if (has_offset(typ))
+    if (d)
+      fprintf(fout,"\n\tsoap_array_begin_out(soap, tag, id, t, soap_putoffsets(soap, a->__offset, %d));", d);
+    else
+      fprintf(fout,"\n\tsoap_array_begin_out(soap, tag, id, t, soap_putoffset(soap, a->__offset));");
+  else
+    fprintf(fout,"\n\tsoap_array_begin_out(soap, tag, id, t, NULL);");
+  if (is_binary(typ) && !is_hexBinary(typ))
+    fprintf(fout, "\n\tsoap_putbase64(soap, a->__ptr, a->__size);");
+  else if (is_hexBinary(typ))
+    fprintf(fout, "\n\tsoap_puthex(soap, a->__ptr, a->__size);");
+  else
+  { fprintf(fout,"\n\tfor (i = 0; i < n; i++)\n\t{");
+    if (!has_ns(typ) && !is_untyped(typ))
+    { if (d)
+      { fprintf(fout,"\n\t\tsoap->position = %d;", d);
+        for (i = 0; i < d; i++)
+	{ fprintf(fout, "\n\t\tsoap->positions[%d] = i", i);
+          for (j = i+1; j < d; j++)
+	    fprintf(fout, "/a->__size[%d]", j);
+	  fprintf(fout, "%%a->__size[%d];", i);
+        }
+        if (is_XML(p->info.typ->ref) && is_string(p->info.typ->ref))
+          fprintf(fout,"\n\t\tsoap_outliteral(soap, \"%s\", &a->%s[i]);", item,p->sym->name);
+        else if (is_XML(p->info.typ->ref) && is_wstring(p->info.typ->ref))
+          fprintf(fout,"\n\t\tsoap_outwliteral(soap, \"%s\", &a->%s[i]);", item,p->sym->name);
+        else if (((Tnode *)p->info.typ->ref)->type == Tclass && !is_external(p->info.typ->ref) && !is_volatile(p->info.typ->ref) && !is_typedef(p->info.typ->ref))
+          fprintf(fout,"\n\t\ta->%s[i].soap_out(soap, \"item\", -1, \"%s\");", p->sym->name, xsi_type_u(((Tnode *)p->info.typ->ref)));
+	else
+	  fprintf(fout, "\n\t\tsoap_out_%s(soap, \"%s\", -1, &a->%s[i], \"%s\");",c_ident(((Tnode *)p->info.typ->ref)), item, p->sym->name, xsi_type_u(((Tnode *)p->info.typ->ref)));
+      }
+      else
+      { fprintf(fout,"\n\t\tsoap->position = 1;\n\t\tsoap->positions[0] = i;");
+        if (is_XML(p->info.typ->ref) && is_string(p->info.typ->ref))
+          fprintf(fout,"\n\t\tsoap_outliteral(soap, \"%s\", &a->%s[i]);", item,p->sym->name);
+        else if (is_XML(p->info.typ->ref) && is_wstring(p->info.typ->ref))
+          fprintf(fout,"\n\t\tsoap_outwliteral(soap, \"%s\", &a->%s[i]);", item,p->sym->name);
+        else if (((Tnode *)p->info.typ->ref)->type == Tclass && !is_external(p->info.typ->ref) && !is_volatile(p->info.typ->ref) && !is_typedef(p->info.typ->ref))
+          fprintf(fout,"\n\t\ta->%s[i].soap_out(soap, \"item\", -1, \"%s\");", p->sym->name, xsi_type_u(((Tnode *)p->info.typ->ref)));
+	else
+          fprintf(fout,"\n\t\tsoap_out_%s(soap, \"%s\", -1, &a->%s[i], \"%s\");",c_ident(((Tnode *)p->info.typ->ref)), item, p->sym->name,xsi_type_u(((Tnode *)p->info.typ->ref)));
+      }
+    }
+    else
+      fprintf(fout,"\n\t\tsoap_out_%s(soap, \"%s\", -1, &a->%s[i], \"%s\");",c_ident(((Tnode *)p->info.typ->ref)), 
+	item, p->sym->name, xsi_type_u(((Tnode *)p->info.typ->ref)));
+  }
+  if (is_binary(typ))
+    fprintf(fout,"\n\tsoap_element_end_out(soap, tag);");
+  else if (!has_ns(typ) && !is_untyped(typ))
+    fprintf(fout,"\n\t}\n\tsoap->position = 0;\n\tsoap_element_end_out(soap, tag);");
+  else
+    fprintf(fout,"\n\t}\n\tsoap_element_end_out(soap, tag);");
+  fprintf(fout,"\n\treturn SOAP_OK;\n}");	 
+}
+
+void
+soap_get(Tnode *typ)
+{
+  Tnode *temp;
+  
+  if (typ->type == Ttemplate || typ->type == Tunion)
+    return;
+
+  if(typ->type==Tarray)
+    {
+      /* ARRAY */
+      temp = typ;
+      while(temp->type == Tarray){
+	temp = temp->ref;
+      }
+      fprintf(fhead,"\nSOAP_FMAC3 %s * SOAP_FMAC4 soap_get_%s(struct soap*, %s, const char*, const char*);", c_type(temp),c_ident(typ),c_type(typ));
+      fprintf(fout,"\n\nSOAP_FMAC3 %s * SOAP_FMAC4 soap_get_%s(struct soap *soap, %s, const char *tag, const char *type)", c_type(temp),c_ident(typ),c_type_id(typ, "a"));
+      fprintf(fout,"\n{\t%s;",c_type_id(temp, "(*p)"));
+      fprintf(fout,"\n\tif ((p = soap_in_%s(soap, tag, a, type)))", c_ident(typ));
+    }
+  else if(typ->type==Tclass && !is_external(typ) && !is_volatile(typ) && !is_typedef(typ))
+    {
+      /* CLASS  */
+      fprintf(fout,"\n\nvoid *%s::soap_get(struct soap *soap, const char *tag, const char *type)", c_type(typ));
+      fprintf(fout,"\n{\n\treturn soap_get_%s(soap, this, tag, type);\n}", c_ident(typ));
+      fprintf(fhead,"\nSOAP_FMAC3 %s SOAP_FMAC4 soap_get_%s(struct soap*, %s, const char*, const char*);", c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*"));
+      fprintf(fout,"\n\nSOAP_FMAC3 %s SOAP_FMAC4 soap_get_%s(struct soap *soap, %s, const char *tag, const char *type)\n{", c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*p"));
+      fprintf(fout,"\n\tif ((p = soap_in_%s(soap, tag, p, type)))", c_ident(typ));
+    }
+  else 
+    {
+      fprintf(fhead,"\nSOAP_FMAC3 %s SOAP_FMAC4 soap_get_%s(struct soap*, %s, const char*, const char*);", c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*"));
+      fprintf(fout,"\n\nSOAP_FMAC3 %s SOAP_FMAC4 soap_get_%s(struct soap *soap, %s, const char *tag, const char *type)\n{", c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*p"));
+      fprintf(fout,"\n\tif ((p = soap_in_%s(soap, tag, p, type)))", c_ident(typ));
+    }
+  fprintf(fout,"\n\t\tsoap_getindependent(soap);");
+  fprintf(fout,"\n\treturn p;\n}");
+  fflush(fout);
+}
+
+void
+soap_in(Tnode *typ)
+{ Entry *p;
+  Table *table,*t;
+  int total,a, cardinality,i,j;
+  long k;
+  unsigned long m;
+  Tnode *n, *temp;
+  char *nse = ns_qualifiedElement(typ);
+  char *nsa = ns_qualifiedAttribute(typ);
+  if (is_dynamic_array(typ))
+  { soap_in_Darray(typ);
+    return;
+  }
+  if (is_primitive_or_string(typ) && typ->type != Tenum)
+  {
+      if (is_stdqname(typ))
+      { fprintf(fhead,"\nSOAP_FMAC3 std::string * SOAP_FMAC4 soap_in_%s(struct soap*, const char*, std::string*, const char*);", c_ident(typ));
+        fprintf(fout,"\n\nSOAP_FMAC1 std::string * SOAP_FMAC2 soap_in_%s(struct soap *soap, const char *tag, std::string *s, const char *type)\n{\n\tif (soap_element_begin_in(soap, tag, 1))\n\t\treturn NULL;\n\tif (!s)\n\t\ts = soap_new_std__string(soap, -1);\n\tif (soap->null)\n\t\tif (s)\n\t\t\ts->erase();\n\tif (*soap->type && soap_match_tag(soap, soap->type, type))\n\t{\tsoap->error = SOAP_TYPE;\n\t\treturn NULL;\n\t}", c_ident(typ));
+        fprintf(fout,"\n\tif (soap->body && !*soap->href)\n\t{\tchar *t;\n\t\ts = (std::string*)soap_class_id_enter(soap, soap->id, s, %s, sizeof(std::string), soap->type, soap->arrayType);\n\t\tif (s)\n\t\t\tif ((t = soap_string_in(soap, 2, %ld, %ld)))\n\t\t\t\ts->assign(t);\n\t\t\telse\n\t\t\t\treturn NULL;\n\t}\n\telse\n\t\ts = (std::string*)soap_id_forward(soap, soap->href, soap_class_id_enter(soap, soap->id, s, %s, sizeof(std::string), soap->type, soap->arrayType), 0, %s, 0, sizeof(std::string), 0, soap_copy_%s);\n\tif (soap->body && soap_element_end_in(soap, tag))\n\t\treturn NULL;\n\treturn s;\n}", soap_type(typ), typ->minLength, typ->maxLength, soap_type(typ), soap_type(typ), c_ident(typ));
+        return;
+      }
+      if (is_stdstring(typ))
+      { fprintf(fhead,"\nSOAP_FMAC3 std::string * SOAP_FMAC4 soap_in_%s(struct soap*, const char*, std::string*, const char*);", c_ident(typ));
+        fprintf(fout,"\n\nSOAP_FMAC1 std::string * SOAP_FMAC2 soap_in_%s(struct soap *soap, const char *tag, std::string *s, const char *type)\n{\n\tif (soap_element_begin_in(soap, tag, 1))\n\t\treturn NULL;\n\tif (!s)\n\t\ts = soap_new_std__string(soap, -1);\n\tif (soap->null)\n\t\tif (s)\n\t\t\ts->erase();\n\tif (*soap->type && soap_match_tag(soap, soap->type, type))\n\t{\tsoap->error = SOAP_TYPE;\n\t\treturn NULL;\n\t}", c_ident(typ));
+        fprintf(fout,"\n\tif (soap->body && !*soap->href)\n\t{\tchar *t;\n\t\ts = (std::string*)soap_class_id_enter(soap, soap->id, s, %s, sizeof(std::string), soap->type, soap->arrayType);\n\t\tif (s)\n\t\t\tif ((t = soap_string_in(soap, 1, %ld, %ld)))\n\t\t\t\ts->assign(t);\n\t\t\telse\n\t\t\t\treturn NULL;\n\t}\n\telse\n\t\ts = (std::string*)soap_id_forward(soap, soap->href, soap_class_id_enter(soap, soap->id, s, %s, sizeof(std::string), soap->type, soap->arrayType), 0, %s, 0, sizeof(std::string), 0, soap_copy_%s);\n\tif (soap->body && soap_element_end_in(soap, tag))\n\t\treturn NULL;\n\treturn s;\n}", soap_type(typ), typ->minLength, typ->maxLength, soap_type(typ), soap_type(typ), c_ident(typ));
+        return;
+      }
+      if (is_stdwstring(typ))
+      { fprintf(fhead,"\nSOAP_FMAC3 std::wstring * SOAP_FMAC4 soap_in_%s(struct soap*, const char*, std::wstring*, const char*);", c_ident(typ));
+        fprintf(fout,"\n\nSOAP_FMAC1 std::wstring * SOAP_FMAC2 soap_in_%s(struct soap *soap, const char *tag, std::wstring *s, const char *type)\n{\n\tif (soap_element_begin_in(soap, tag, 1))\n\t\treturn NULL;\n\tif (!s)\n\t\ts = soap_new_std__wstring(soap, -1);\n\tif (soap->null)\n\t\tif (s)\n\t\t\ts->erase();\n\tif (*soap->type && soap_match_tag(soap, soap->type, type))\n\t{\tsoap->error = SOAP_TYPE;\n\t\treturn NULL;\n\t}", c_ident(typ));
+        fprintf(fout,"\n\tif (soap->body && !*soap->href)\n\t{\twchar_t *t;\n\t\ts = (std::wstring*)soap_class_id_enter(soap, soap->id, s, %s, sizeof(std::wstring), soap->type, soap->arrayType);\n\t\tif (s)\n\t\t\tif ((t = soap_wstring_in(soap, 1, %ld, %ld)))\n\t\t\t\ts->assign(t);\n\t\t\telse\n\t\t\t\treturn NULL;\n\t}\n\telse\n\t\ts = (std::wstring*)soap_id_forward(soap, soap->href, soap_class_id_enter(soap, soap->id, s, %s, sizeof(std::wstring), soap->type, soap->arrayType), 0, %s, 0, sizeof(std::wstring), 0, soap_copy_%s);\n\tif (soap->body && soap_element_end_in(soap, tag))\n\t\treturn NULL;\n\treturn s;\n}", soap_type(typ), typ->minLength, typ->maxLength, soap_type(typ), soap_type(typ), c_ident(typ));
+        return;
+      }
+    if (is_external(typ))
+    { fprintf(fhead,"\nSOAP_FMAC1 %s * SOAP_FMAC2 soap_in_%s(struct soap*, const char*, %s, const char*);", c_type(typ), c_ident(typ),c_type_id(typ, "*")); 
+      return;
+    }
+    fprintf(fhead,"\nSOAP_FMAC3 %s * SOAP_FMAC4 soap_in_%s(struct soap*, const char*, %s, const char*);", c_type(typ), c_ident(typ),c_type_id(typ, "*")); 
+    fprintf(fout,"\n\nSOAP_FMAC3 %s * SOAP_FMAC4 soap_in_%s(struct soap *soap, const char *tag, %s, const char *type)\n{", c_type(typ), c_ident(typ),c_type_id(typ, "*a")); 
+    if (typ->type == Tllong || typ->type == Tullong)
+      fprintf(fout,"\n\treturn soap_in%s(soap, tag, a, type, %s);\n}", c_type(typ), soap_type(typ));
+    else if (is_wstring(typ))
+      fprintf(fout,"\n\treturn soap_inwstring(soap, tag, a, type, %s, %ld, %ld);\n}", soap_type(typ), typ->minLength, typ->maxLength);
+    else if (is_string(typ))
+      fprintf(fout,"\n\treturn soap_instring(soap, tag, a, type, %s, %d, %ld, %ld);\n}", soap_type(typ), is_qname(typ)+1, typ->minLength, typ->maxLength);
+    else
+      fprintf(fout,"\n\treturn soap_in%s(soap, tag, a, type, %s);\n}", the_type(typ), soap_type(typ));
+    fflush(fout);
+    return;
+  }
+  switch(typ->type)
+  { case Tstruct:
+      if (is_external(typ))
+      { fprintf(fhead,"\nSOAP_FMAC1 %s SOAP_FMAC2 soap_in_%s(struct soap*, const char*, %s, const char*);", c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*"));
+        return;
+      }
+      fprintf(fhead,"\nSOAP_FMAC3 %s SOAP_FMAC4 soap_in_%s(struct soap*, const char*, %s, const char*);", c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*"));
+      fprintf(fout,"\n\nSOAP_FMAC3 %s SOAP_FMAC4 soap_in_%s(struct soap *soap, const char *tag, %s, const char *type)\n{", c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*a"));
+      table = (Table *)typ->ref;
+      if (is_primclass(typ))
+      { fprintf(fout, "\n\tif (soap_element_begin_in(soap, tag, 1))\n\t\treturn NULL;");
+	if (has_class(typ))
+          fprintf(fout,"\n\tif (!(a = (%s)soap_class_id_enter(soap, soap->id, a, %s, sizeof(%s), soap->type, soap->arrayType)))\n\t\treturn NULL;", c_type_id(typ, "*"), soap_type(typ), c_type(typ));
+	else
+          fprintf(fout,"\n\tif (!(a = (%s)soap_id_enter(soap, soap->id, a, %s, sizeof(%s), 0, NULL, NULL, NULL)))\n\t\treturn NULL;", c_type_id(typ, "*"), soap_type(typ), c_type(typ));
+        fprintf(fout,"\n\tsoap_revert(soap);\n\t*soap->id = '\\0';");
+	/* fprintf(fout,"\n\tif (soap->alloced)"); */
+        fprintf(fout,"\n\tsoap_default_%s(soap, a);",c_ident(typ));
+          for (t = (Table*)typ->ref; t; t = t->prev)
+          { for (p = t->list; p; p = p->next) 
+	      if (p->info.sto & Sattribute)
+		soap_attr_value(p, "a", p->sym->name, ns_add(p->sym->name, nsa));
+	  }
+      fflush(fout);
+	for (table = (Table*)typ->ref; table; table = table->prev)
+	{ p = table->list;
+	  if (p && is_item(p))
+	    break;
+        }
+	    if (is_XML(p->info.typ) && is_string(p->info.typ))
+	    { fprintf(fout,"\n\tif (!soap_inliteral(soap, tag, &a->%s))", p->sym->name,xsi_type(typ));
+	    }
+	    else if (is_XML(p->info.typ) && is_wstring(p->info.typ))
+	    { fprintf(fout,"\n\tif (!soap_inwliteral(soap, tag, &a->%s))", p->sym->name,xsi_type(typ));
+	    }
+	    else if(p->info.typ->type==Tarray) {
+	      fprintf(fout,"\n\tif (!soap_in_%s(soap, tag, a->%s, \"%s\"))", c_ident(p->info.typ),p->sym->name,xsi_type(typ));
+	    }
+	    else if(p->info.typ->type==Tclass && !is_external(p->info.typ) && !is_volatile(p->info.typ) && !is_typedef(p->info.typ)) {
+	      fprintf(fout,"\n\tif (!a->%s.soap_in(soap, tag, \"%s\"))", p->sym->name,xsi_type(typ));
+	    }
+	    else if (p->info.typ->type != Tfun && !is_void(p->info.typ)) {
+	      fprintf(fout,"\n\tif (!soap_in_%s(soap, tag, &a->%s, \"%s\"))", c_ident(p->info.typ),p->sym->name,xsi_type(typ));
+	    }
+           fprintf(fout,"\n\t\treturn NULL;");
+           fprintf(fout, "\n\treturn a;\n}");
+      }
+      else
+      { a=0;
+        table = (Table *)typ->ref;
+	if (!is_discriminant(typ))
+        { for (t = table; t; t = t->prev)
+	    for (p = t->list; p; p = p->next)
+	    { if (!(p->info.sto & (Sconst | Sprivate | Sprotected)) && !(p->info.sto & Sattribute) && p->info.typ->type != Tfun && !is_void(p->info.typ) && !is_transient(p->info.typ) && !is_repetition(p) && !is_template(p->info.typ))
+	      { if (is_anytype(p) || is_choice(p))
+	          p = p->next;
+	        if (a==0)
+	        { fprintf(fout,"\n\tshort soap_flag_%s = %ld", p->sym->name, p->info.maxOccurs);
+	          a=1;
+                }
+	        else
+	          fprintf(fout,", soap_flag_%s = %ld", p->sym->name, p->info.maxOccurs);
+	      }
+	    }
+	    fprintf(fout,";");
+	  }
+          if (!is_invisible(typ->id->name))
+          { fprintf(fout,"\n\tif (soap_element_begin_in(soap, tag, 0))\n\t\treturn NULL;");
+            fprintf(fout,"\n\tif (*soap->type && soap_match_tag(soap, soap->type, type))");
+            fprintf(fout,"\n\t{\tsoap->error = SOAP_TYPE;");
+            fprintf(fout,"\n\t\treturn NULL;\n\t}");
+	  }
+	  if (has_class(typ))
+            fprintf(fout,"\n\ta = (%s)soap_class_id_enter(soap, soap->id, a, %s, sizeof(%s), soap->type, soap->arrayType);",c_type_id(typ, "*"), soap_type(typ), c_type(typ));
+	  else
+            fprintf(fout,"\n\ta = (%s)soap_id_enter(soap, soap->id, a, %s, sizeof(%s), 0, NULL, NULL, NULL);",c_type_id(typ, "*"), soap_type(typ), c_type(typ));
+	  fprintf(fout,"\n\tif (!a)\n\t\treturn NULL;");
+          /* fprintf(fout,"\n\tif (soap->alloced)"); */
+          fprintf(fout,"\n\tsoap_default_%s(soap, a);",c_ident(typ));
+          for (t = table; t; t = t->prev)
+          { for (p = t->list; p; p = p->next) 
+	      if (p->info.sto & Sattribute)
+		soap_attr_value(p, "a", p->sym->name, ns_add(p->sym->name, nsa));
+	  }
+        if (!is_invisible(typ->id->name))
+	  fprintf(fout,"\n\tif (soap->body && !*soap->href)\n\t{");
+	if (!is_discriminant(typ))
+          fprintf(fout,"\n\t\tfor (;;)\n\t\t{\tsoap->error = SOAP_TAG_MISMATCH;");
+        a=0;
+        for (t = table; t; t = t->prev)
+	{ for (p = t->list; p; p = p->next) 
+	  { if (p->info.sto & (Sconst | Sprivate | Sprotected))
+	      fprintf(fout, "\n\t\t/* non-serializable %s skipped */", p->sym->name);
+	    else if (is_transient(p->info.typ))
+	      fprintf(fout, "\n\t\t/* transient %s skipped */", p->sym->name);
+	    else if (p->info.sto & Sattribute)
+	      ;
+	    else if (is_repetition(p))
+	    { 
+              fprintf(fout,"\n\t\t\tif (soap_flag_%s && soap->error == SOAP_TAG_MISMATCH)",p->next->sym->name);
+              if (((Tnode*)p->next->info.typ->ref)->type == Tclass && !is_volatile(p->next->info.typ->ref))
+                fprintf(fout,"\n\t\t\t{\t%s;\n\t\t\t\t%s;\n\t\t\t\tq.soap_default(soap);\n\t\t\t\tsoap_new_block(soap);", c_type_id(p->next->info.typ, "p"), c_type_id(p->next->info.typ->ref, "q"));
+              else if (((Tnode*)p->next->info.typ->ref)->type == Tclass || has_class(p->next->info.typ->ref))
+                fprintf(fout,"\n\t\t\t{\t%s;\n\t\t\t\t%s;\n\t\t\t\tsoap_new_block(soap);", c_type_id(p->next->info.typ, "p"), c_type_id(p->next->info.typ->ref, "q"));
+              else
+                fprintf(fout,"\n\t\t\t{\t%s;\n\t\t\t\tsoap_new_block(soap);", c_type_id(p->next->info.typ, "p"));
+	      if (is_unmatched(p->next->sym))
+                fprintf(fout,"\n\t\t\t\tfor (a->%s = 0; !soap_element_begin_in(soap, NULL, 1); a->%s++)", p->sym->name, p->sym->name);
+	      else
+                fprintf(fout,"\n\t\t\t\tfor (a->%s = 0; !soap_element_begin_in(soap, \"%s\", 1); a->%s++)", p->sym->name,ns_add(p->next->sym->name, nse), p->sym->name);
+              fprintf(fout,"\n\t\t\t\t{\tp = (%s)soap_push_block(soap, sizeof(%s));", c_type(p->next->info.typ), c_type(p->next->info.typ->ref));
+              if (((Tnode*)p->next->info.typ->ref)->type == Tclass || has_class(p->next->info.typ->ref))
+                fprintf(fout,"\n\t\t\t\t\tmemcpy(p, &q, sizeof(%s));", c_type(p->next->info.typ->ref));
+              if (((Tnode*)p->next->info.typ->ref)->type == Tclass && !is_external(p->next->info.typ->ref) && !is_volatile(p->next->info.typ->ref) && !is_typedef(p->next->info.typ->ref))
+                fprintf(fout,"\n\t\t\t\t\tp->soap_default(soap);");
+              else if (((Tnode*)p->next->info.typ->ref)->type != Tpointer  && !is_XML(p->next->info.typ->ref))
+                fprintf(fout,"\n\t\t\t\t\tsoap_default_%s(soap, p);", c_ident(p->next->info.typ->ref));
+              else
+                fprintf(fout,"\n\t\t\t\t\t*p = NULL;");
+	      if (!is_invisible(p->next->sym->name))
+                fprintf(fout,"\n\t\t\t\t\tsoap_revert(soap);");
+	      if (is_unmatched(p->next->sym))
+	      { if (is_XML(p->next->info.typ->ref) && is_string(p->next->info.typ->ref))
+                  fprintf(fout,"\n\t\t\t\t\tif (soap_inliteral(soap, NULL, p))");
+                else if (is_XML(p->next->info.typ->ref) && is_wstring(p->next->info.typ->ref))
+                  fprintf(fout,"\n\t\t\t\t\tif (soap_inwliteral(soap, NULL, p))");
+                else
+                  fprintf(fout,"\n\t\t\t\t\tif (!soap_in_%s(soap, NULL, p, \"%s\"))", c_ident(p->next->info.typ->ref), xsi_type(p->next->info.typ->ref));
+	      }
+	      else
+	      { if (is_XML(p->next->info.typ->ref) && is_string(p->next->info.typ->ref))
+                  fprintf(fout,"\n\t\t\t\t\tif (soap_inliteral(soap, \"%s\", p))", ns_add(p->next->sym->name, nse));
+                else if (is_XML(p->next->info.typ->ref) && is_wstring(p->next->info.typ->ref))
+                  fprintf(fout,"\n\t\t\t\t\tif (soap_inwliteral(soap, \"%s\", p))", ns_add(p->next->sym->name, nse));
+                else
+                  fprintf(fout,"\n\t\t\t\t\tif (!soap_in_%s(soap, \"%s\", p, \"%s\"))", c_ident(p->next->info.typ->ref), ns_add(p->next->sym->name, nse), xsi_type(p->next->info.typ->ref));
+	      }
+              fprintf(fout,"\n\t\t\t\t\t\tbreak;");
+              fprintf(fout,"\n\t\t\t\t\tsoap_flag_%s = 0;", p->next->sym->name);
+              fprintf(fout,"\n\t\t\t\t}");
+              fprintf(fout,"\n\t\t\t\ta->%s = (%s)soap_save_block(soap, NULL, 1);", p->next->sym->name, c_type(p->next->info.typ));
+              fprintf(fout,"\n\t\t\t\tif (!soap_flag_%s && soap->error == SOAP_TAG_MISMATCH)\n\t\t\t\t\tcontinue;\n\t\t\t}", p->next->sym->name);
+            p = p->next;
+	  }
+	  else if (is_anytype(p))
+          { fprintf(fout,"\n\t\t\tif (soap_flag_%s && soap->error == SOAP_TAG_MISMATCH)",p->next->sym->name);
+	    fprintf(fout,"\n\t\t\t\tif ((a->%s = soap_getelement(soap, &a->%s)))", p->next->sym->name, p->sym->name);
+	    fprintf(fout,"\n\t\t\t\t{\tsoap_flag_%s = 0;", p->next->sym->name);
+	    fprintf(fout,"\n\t\t\t\t\tcontinue;");
+	    fprintf(fout,"\n\t\t\t\t}");
+            p = p->next;
+	  }
+          else if (is_discriminant(typ))
+          { fprintf(fout,"\n\t\tif (!soap_in_%s(soap, &a->%s, &a->%s))", c_ident(p->next->info.typ), p->sym->name, p->next->sym->name);
+            fprintf(fout,"\n\t\t\treturn NULL;");
+            break;
+	  }
+	  else if (is_choice(p))
+	  { fprintf(fout,"\n\t\t\tif (soap_flag_%s && soap->error == SOAP_TAG_MISMATCH)",p->next->sym->name);
+	    fprintf(fout,"\n\t\t\t\tif (soap_in_%s(soap, &a->%s, &a->%s))", c_ident(p->next->info.typ), p->sym->name, p->next->sym->name);
+	    fprintf(fout,"\n\t\t\t\t{\tsoap_flag_%s = 0;", p->next->sym->name);
+	    fprintf(fout,"\n\t\t\t\t\tcontinue;");
+	    fprintf(fout,"\n\t\t\t\t}");
+            p = p->next;
+	  }
+	  else
+	  { 
+	   if (!is_invisible(p->sym->name) && !is_primclass(typ) && p->info.typ->type != Tfun && !is_void(p->info.typ))
+	   { if (is_string(p->info.typ) || is_wstring(p->info.typ) || is_stdstr(p->info.typ))
+	       fprintf(fout,"\n\t\t\tif (soap_flag_%s && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))",p->sym->name);
+	     else if (is_template(p->info.typ))
+	       fprintf(fout,"\n\t\t\tif (soap->error == SOAP_TAG_MISMATCH)");
+             else
+	       fprintf(fout,"\n\t\t\tif (soap_flag_%s && soap->error == SOAP_TAG_MISMATCH)",p->sym->name);
+	   }
+	   if (is_unmatched(p->sym))
+	   {
+	    if (is_XML(p->info.typ) && is_string(p->info.typ)) {
+	      fprintf(fout,"\n\t\t\t\tif (soap_inliteral(soap, NULL, &a->%s))", p->sym->name);
+	    } else if (is_XML(p->info.typ) && is_wstring(p->info.typ)) {
+	      fprintf(fout,"\n\t\t\t\tif (soap_inwliteral(soap, NULL, &a->%s))", p->sym->name);
+	    } else if(p->info.typ->type==Tarray) {
+	      fprintf(fout,"\n\t\t\t\tif (soap_in_%s(soap, NULL, a->%s, \"%s\"))", c_ident(p->info.typ),p->sym->name,xsi_type(p->info.typ));
+	    } else if(p->info.typ->type==Tclass && !is_external(p->info.typ) && !is_volatile(p->info.typ) && !is_typedef(p->info.typ)) {
+	      fprintf(fout,"\n\t\t\t\tif (a->%s.soap_in(soap, NULL, \"%s\"))", p->sym->name,xsi_type(p->info.typ));
+	    } else if (p->info.typ->type != Tfun && !is_void(p->info.typ)) {
+	      fprintf(fout,"\n\t\t\t\tif (soap_in_%s(soap, NULL, &a->%s, \"%s\"))", c_ident(p->info.typ),p->sym->name,xsi_type(p->info.typ));
+	    }
+	   }
+	   else if (!is_invisible(p->sym->name))
+	   {
+	    if (is_XML(p->info.typ) && is_string(p->info.typ)) {
+	      fprintf(fout,"\n\t\t\t\tif (soap_inliteral(soap, \"%s\", &a->%s))", ns_add(p->sym->name, nse), p->sym->name);
+	    } else if (is_XML(p->info.typ) && is_wstring(p->info.typ)) {
+	      fprintf(fout,"\n\t\t\t\tif (soap_inwliteral(soap, \"%s\", &a->%s))", ns_add(p->sym->name, nse), p->sym->name);
+	    } else if(p->info.typ->type==Tarray) {
+	      fprintf(fout,"\n\t\t\t\tif (soap_in_%s(soap, \"%s\", a->%s, \"%s\"))", c_ident(p->info.typ),ns_add(p->sym->name, nse),p->sym->name,xsi_type(p->info.typ));
+	    } else if(p->info.typ->type==Tclass && !is_external(p->info.typ) && !is_volatile(p->info.typ) && !is_typedef(p->info.typ)) {
+	      fprintf(fout,"\n\t\t\t\tif (a->%s.soap_in(soap, \"%s\", \"%s\"))", p->sym->name,ns_add(p->sym->name, nse),xsi_type(p->info.typ));
+	    } else if (p->info.typ->type != Tfun && !is_void(p->info.typ)) {
+	      fprintf(fout,"\n\t\t\t\tif (soap_in_%s(soap, \"%s\", &a->%s, \"%s\"))", c_ident(p->info.typ),ns_add(p->sym->name, nse),p->sym->name,xsi_type(p->info.typ));
+	    }
+	   }
+	    if (!is_invisible(p->sym->name) && !is_primclass(typ) && p->info.typ->type != Tfun && !is_void(p->info.typ))
+	    { if (is_template(p->info.typ))
+	        fprintf(fout,"\n\t\t\t\t\tcontinue;");
+	      else
+	      { fprintf(fout,"\n\t\t\t\t{\tsoap_flag_%s--;", p->sym->name);
+	        fprintf(fout,"\n\t\t\t\t\tcontinue;");
+	        fprintf(fout,"\n\t\t\t\t}");
+	      }
+	    }
+	  }
+	  fflush(fout);
+	}
+      }
+      if (!is_discriminant(typ))
+      { for (t = table; t; t = t->prev)
+	{ for (p = t->list; p; p = p->next) 
+	  { if (is_repetition(p) || is_anytype(p) || is_choice(p))
+	    { p = p->next;
+	      continue;
+	    }
+	    if (is_invisible(p->sym->name)
+	      && !(p->info.sto & (Sconst | Sprivate | Sprotected)) && !is_transient(p->info.typ) && !(p->info.sto & Sattribute))
+	    { if (is_string(p->info.typ) || is_wstring(p->info.typ) || is_stdstr(p->info.typ))
+	        fprintf(fout,"\n\t\t\tif (soap_flag_%s && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))",p->sym->name);
+              else if (is_template(p->info.typ))
+	        fprintf(fout,"\n\t\t\tif (soap->error == SOAP_TAG_MISMATCH)");
+              else
+	        fprintf(fout,"\n\t\t\tif (soap_flag_%s && soap->error == SOAP_TAG_MISMATCH)",p->sym->name);
+	    if (is_XML(p->info.typ) && is_string(p->info.typ))
+	      fprintf(fout,"\n\t\t\t\tif (soap_inliteral(soap, \"%s\", &a->%s))", ns_add(p->sym->name, nse), p->sym->name);
+	    else if (is_XML(p->info.typ) && is_wstring(p->info.typ))
+	      fprintf(fout,"\n\t\t\t\tif (soap_inwliteral(soap, \"%s\", &a->%s))", ns_add(p->sym->name, nse), p->sym->name);
+	    else if(p->info.typ->type==Tarray)
+	      fprintf(fout,"\n\t\t\t\tif (soap_in_%s(soap, \"%s\", a->%s, \"%s\"))", c_ident(p->info.typ),ns_add(p->sym->name, nse),p->sym->name,xsi_type(p->info.typ));
+	    else if(p->info.typ->type==Tclass && !is_external(p->info.typ) && !is_volatile(p->info.typ) && !is_typedef(p->info.typ))
+	      fprintf(fout,"\n\t\t\t\tif (a->%s.soap_in(soap, \"%s\", \"%s\"))", p->sym->name,ns_add(p->sym->name, nse),xsi_type(p->info.typ));
+	    else if (p->info.typ->type != Tfun && !is_void(p->info.typ))
+	      fprintf(fout,"\n\t\t\t\tif (soap_in_%s(soap, \"%s\", &a->%s, \"%s\"))", c_ident(p->info.typ),ns_add(p->sym->name, nse),p->sym->name,xsi_type(p->info.typ));
+	    if (is_template(p->info.typ))
+	      fprintf(fout,"\n\t\t\t\t\tcontinue;");
+	    else
+	    { fprintf(fout,"\n\t\t\t\t{\tsoap_flag_%s--;", p->sym->name);
+	      fprintf(fout,"\n\t\t\t\t\tcontinue;");
+	      fprintf(fout,"\n\t\t\t\t}");
+	    }
+	   }
+	  }
+        }
+        fprintf(fout,"\n\t\t\tif (soap->error == SOAP_TAG_MISMATCH)");
+        fprintf(fout,"\n\t\t\t\tsoap->error = soap_ignore_element(soap);");
+        fprintf(fout,"\n\t\t\tif (soap->error == SOAP_NO_TAG)");
+        fprintf(fout,"\n\t\t\t\tbreak;");
+        fprintf(fout,"\n\t\t\tif (soap->error)\n\t\t\t\treturn NULL;");
+        fprintf(fout,"\n\t\t}");
+      }
+	a = 0;
+	if (table && !is_discriminant(typ))
+	{ for (p = table->list; p; p = p->next)
+	  { if (p->info.minOccurs > 0 && p->info.maxOccurs >= 0 && !(p->info.sto & (Sconst | Sprivate | Sprotected)) && !(p->info.sto & Sattribute) && p->info.typ->type != Tfun && !is_void(p->info.typ) && !is_transient(p->info.typ) && !is_template(p->info.typ) && !is_repetition(p) && !is_choice(p) && p->info.hasval == False)
+	    { if (is_item(p))
+	        continue;
+	      if (is_anytype(p))
+	        p = p->next;
+	      if (a==0)
+	      { fprintf(fout,"\n\t\tif ((soap->mode & SOAP_XML_STRICT) && (soap_flag_%s > %ld", p->sym->name, p->info.maxOccurs - p->info.minOccurs);
+	        a=1;
+              }
+	      else
+	        fprintf(fout," || soap_flag_%s > %ld", p->sym->name, p->info.maxOccurs - p->info.minOccurs);
+	    }
+	    else if (is_template(p->info.typ))
+	    { if (p->info.minOccurs > 1)
+	      { if (p->info.typ->type == Tpointer)
+	        { if (a==0)
+	          { fprintf(fout,"\n\t\tif ((soap->mode & SOAP_XML_STRICT) && (!a->%s || a->%s->size() < %ld", p->sym->name, p->sym->name, p->info.minOccurs);
+	            a=1;
+                  }
+	          else
+	            fprintf(fout," || !a->%s || a->%s->size() < %ld", p->sym->name, p->sym->name, p->info.minOccurs);
+	        }
+	        else
+	        { if (a==0)
+	          { fprintf(fout,"\n\t\tif ((soap->mode & SOAP_XML_STRICT) && (a->%s.size() < %ld", p->sym->name, p->info.minOccurs);
+	            a=1;
+                  }
+	          else
+	            fprintf(fout," || a->%s.size() < %ld", p->sym->name, p->info.minOccurs);
+	        }
+	      }
+	      if ( p->info.maxOccurs > 1)
+	      { if (p->info.typ->type == Tpointer)
+	        { if (a==0)
+	          { fprintf(fout,"\n\t\tif ((soap->mode & SOAP_XML_STRICT) && (a->%s && a->%s->size() > %ld)", p->sym->name, p->sym->name, p->info.maxOccurs);
+	            a=1;
+                  }
+	          else
+	            fprintf(fout," || (a->%s && a->%s->size() > %ld)", p->sym->name, p->sym->name, p->info.maxOccurs);
+	        }
+		else
+	        { if (a==0)
+	          { fprintf(fout,"\n\t\tif ((soap->mode & SOAP_XML_STRICT) && (a->%s.size() > %ld", p->sym->name, p->info.maxOccurs);
+	            a=1;
+                  }
+	          else
+	            fprintf(fout," || a->%s.size() > %ld", p->sym->name, p->info.maxOccurs);
+	        }
+	      }
+	    }
+	    else if (is_repetition(p))
+	    { if (p->info.minOccurs > 1)
+	      { if (a==0)
+	        { fprintf(fout,"\n\t\tif ((soap->mode & SOAP_XML_STRICT) && (a->%s < %ld", p->sym->name, p->info.minOccurs);
+	          a=1;
+                }
+	        else
+	          fprintf(fout," || a->%s < %ld", p->sym->name, p->info.minOccurs);
+	      }
+	      if (p->info.maxOccurs > 1)
+	      { if (a==0)
+	        { fprintf(fout,"\n\t\tif ((soap->mode & SOAP_XML_STRICT) && (a->%s > %ld", p->sym->name, p->info.maxOccurs);
+	          a=1;
+                }
+	        else
+	          fprintf(fout," || a->%s > %ld", p->sym->name, p->info.maxOccurs);
+	      }
+	      p = p->next;
+	    }
+	    else if (is_choice(p))
+	    { if (p->info.minOccurs != 0)
+	      { if (a==0)
+	        { fprintf(fout,"\n\t\tif ((soap->mode & SOAP_XML_STRICT) && (soap_flag_%s", p->next->sym->name);
+	          a=1;
+                }
+	        else
+	          fprintf(fout," || soap_flag_%s", p->next->sym->name);
+	      }
+	      p = p->next;
+	    }
+	  }
+	  if (a)
+	    fprintf(fout,"))\n\t\t{\tsoap->error = SOAP_OCCURS;\n\t\t\treturn NULL;\n\t\t}");
+	}
+        if (!is_invisible(typ->id->name))
+          fprintf(fout,"\n\t\tif (soap_element_end_in(soap, tag))\n\t\t\treturn NULL;");
+	  /*
+	  else
+            fprintf(fout,"\n\t\tsoap->error = SOAP_OK;");
+	  */
+          if (!is_invisible(typ->id->name))
+          { fprintf(fout,"\n\t}\n\telse\n\t{\t");
+	    if (has_class(typ))
+              fprintf(fout,"a = (%s)soap_id_forward(soap, soap->href, (void**)a, 0, %s, 0, sizeof(%s), 0, soap_copy_%s);",c_type_id(typ, "*"), soap_type(typ), c_type(typ), c_ident(typ));
+	    else
+              fprintf(fout,"a = (%s)soap_id_forward(soap, soap->href, (void**)a, 0, %s, 0, sizeof(%s), 0, NULL);",c_type_id(typ, "*"), soap_type(typ), c_type(typ));
+            fprintf(fout,"\n\t\tif (soap->body && soap_element_end_in(soap, tag))\n\t\t\treturn NULL;");
+            fprintf(fout, "\n\t}");
+	  }
+          fprintf(fout, "\n\treturn a;\n}");
+      }
+      break;
+    
+     case Tclass:
+      if (is_external(typ))
+      { fprintf(fhead,"\nSOAP_FMAC1 %s SOAP_FMAC2 soap_in_%s(struct soap*, const char*, %s, const char*);", c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*"));
+        return;
+      }
+      fprintf(fhead,"\nSOAP_FMAC3 %s SOAP_FMAC4 soap_in_%s(struct soap*, const char*, %s, const char*);", c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*"));
+      if (!is_volatile(typ) && !is_typedef(typ))
+      { fprintf(fout,"\n\nvoid *%s::soap_in(struct soap *soap, const char *tag, const char *type)", c_type(typ));
+	fprintf(fout,"\n{\treturn soap_in_%s(soap, tag, this, type);\n}",c_ident(typ));
+        fflush(fout);
+      }
+      fprintf(fout,"\n\nSOAP_FMAC3 %s SOAP_FMAC4 soap_in_%s(struct soap *soap, const char *tag, %s, const char *type)\n{", c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*a"));
+      if (is_primclass(typ))
+      {
+        fprintf(fout, "\n\tif (soap_element_begin_in(soap, tag, 1))\n\t\treturn NULL;");
+        fprintf(fout,"\n\tif (!(a = (%s)soap_class_id_enter(soap, soap->id, a, %s, sizeof(%s), soap->type, soap->arrayType)))\n\t{\tsoap->error = SOAP_TAG_MISMATCH;\n\t\treturn NULL;\n\t}", c_type_id(typ, "*"), soap_type(typ), c_type(typ));
+        fprintf(fout,"\n\tsoap_revert(soap);\n\t*soap->id = '\\0';");
+        fprintf(fout,"\n\tif (soap->alloced)");
+        fprintf(fout,"\n\t{\ta->soap_default(soap);",c_ident(typ));
+        fprintf(fout,"\n\t\tif (soap->clist->type != %s)", soap_type(typ));
+        fprintf(fout,"\n\t\t\treturn (%s)a->soap_in(soap, tag, type);", c_type_id(typ, "*"));
+        fprintf(fout,"\n\t}");
+          for (t = (Table*)typ->ref; t; t = t->prev)
+          { for (p = t->list; p; p = p->next) 
+	      if (p->info.sto & Sattribute)
+		soap_attr_value(p, ptr_cast(typ, "a"), p->sym->name, ns_add(p->sym->name, nsa));
+	  }
+      fflush(fout);
+	for (table = (Table*)typ->ref; table; table = table->prev)
+	{ p = table->list;
+	  if (p && is_item(p))
+	    break;
+        }
+	    if (is_XML(p->info.typ) && is_string(p->info.typ))
+	    { fprintf(fout,"\n\tif (!soap_inliteral(soap, tag, &(((%s*)a)->%s)))", table->sym->name,p->sym->name,xsi_type(typ));
+	    }
+	    else if (is_XML(p->info.typ) && is_wstring(p->info.typ))
+	    { fprintf(fout,"\n\tif (!soap_inwliteral(soap, tag, &(((%s*)a)->%s)))", table->sym->name,p->sym->name,xsi_type(typ));
+	    }
+	    else if(p->info.typ->type==Tarray) {
+	      fprintf(fout,"\n\tif (!soap_in_%s(soap, tag, ((%s*)a)->%s, \"%s\"))", c_ident(p->info.typ),table->sym->name,p->sym->name,xsi_type(typ));
+	    }
+	    else if(p->info.typ->type==Tclass && !is_external(p->info.typ) && !is_volatile(p->info.typ) && !is_typedef(p->info.typ)) {
+	      fprintf(fout,"\n\tif (!(((%s*)a)->%s).soap_in(soap, tag, \"%s\"))", table->sym->name,p->sym->name,xsi_type(typ));
+	    }
+	    else if (p->info.typ->type != Tfun && !is_void(p->info.typ)) {
+	      fprintf(fout,"\n\tif (!soap_in_%s(soap, tag, &(((%s*)a)->%s), \"%s\"))", c_ident(p->info.typ),table->sym->name,p->sym->name,xsi_type(typ));
+	    }
+           fprintf(fout,"\n\t\treturn NULL;");
+           if (has_getter(typ))
+             fprintf(fout,"\n\tif (a->get(soap))\n\t\treturn NULL;");
+           fprintf(fout,"\n\treturn a;\n}");
+      }
+      else
+      {
+        if (!is_invisible(typ->id->name))
+          fprintf(fout,"\n\tif (soap_element_begin_in(soap, tag, 0))\n\t\treturn NULL;");
+        fprintf(fout,"\n\ta = (%s)soap_class_id_enter(soap, soap->id, a, %s, sizeof(%s), soap->type, soap->arrayType);", c_type_id(typ, "*"), soap_type(typ), c_type(typ));
+        fprintf(fout,"\n\tif (!a)\n\t\treturn NULL;");
+        fprintf(fout,"\n\tif (soap->alloced)");
+	if (is_volatile(typ) || is_typedef(typ))
+          fprintf(fout,"\n\t{\tsoap_default_%s(soap, a);",c_ident(typ));
+	else
+          fprintf(fout,"\n\t{\ta->soap_default(soap);");
+        fprintf(fout,"\n\t\tif (soap->clist->type != %s)", soap_type(typ));
+        fprintf(fout,"\n\t\t{\tsoap_revert(soap);");
+        fprintf(fout,"\n\t\t\t*soap->id = '\\0';");
+	if (is_volatile(typ) || is_typedef(typ))
+          fprintf(fout,"\n\t\t\treturn soap_in_%s(soap, tag, a, type);", c_ident(typ));
+	else
+          fprintf(fout,"\n\t\t\treturn (%s)a->soap_in(soap, tag, type);", c_type_id(typ, "*"));
+        fprintf(fout,"\n\t\t}\n\t}");
+        table=(Table *)typ->ref;
+        for (t = table; t; t = t->prev)
+        { for (p = t->list; p; p = p->next) 
+	    if (p->info.sto & Sattribute)
+              soap_attr_value(p, ptr_cast(typ, "a"), p->sym->name, ns_add(p->sym->name, nsa));
+	}
+        fflush(fout);
+       
+      i=0;
+    if (!is_discriminant(typ))
+    { for (t = table; t; t = t->prev)
+	i++;
+      a=0;
+      for (; i > 0; i--)
+      { t = table;
+	for (j = 0; j < i-1; j++)
+	  t = t->prev;
+	for (p = t->list; p; p = p->next)
+	  { if (!(p->info.sto & (Sconst | Sprivate | Sprotected)) && !(p->info.sto & Sattribute) && p->info.typ->type != Tfun && !is_void(p->info.typ) && !is_transient(p->info.typ) && !is_repetition(p) && !is_template(p->info.typ))
+	    { if (is_anytype(p) || is_choice(p))
+	        p = p->next;
+	      if( a==0)
+	      { fprintf(fout,"\n\tshort soap_flag_%s%d = %ld", p->sym->name, i, p->info.maxOccurs);
+	        a = 1;
+              }
+	      else
+	        fprintf(fout,", soap_flag_%s%d = %ld", p->sym->name, i, p->info.maxOccurs);
+	    }
+	  }
+      }
+      fprintf(fout,";"); 
+    }
+      fflush(fout);
+      if (!is_invisible(typ->id->name))
+        fprintf(fout,"\n\tif (soap->body && !*soap->href)\n\t{");
+      if (!is_discriminant(typ))
+        fprintf(fout,"\n\t\tfor (;;)\n\t\t{\tsoap->error = SOAP_TAG_MISMATCH;"); 
+      table=(Table *)typ->ref;
+      a=0;
+      i=0;
+      for (t = table; t; t = t->prev)
+	i++;
+      for (; i > 0; i--)
+      { t = table;
+	for (j = 0; j < i-1; j++)
+	  t = t->prev;
+	for (p = t->list; p; p = p->next)
+	{ if (is_item(p))
+	    ;
+	  else if (p->info.sto & (Sconst | Sprivate | Sprotected))
+	    fprintf(fout, "\n\t\t\t/* non-serializable %s skipped */", p->sym->name);
+	  else if (is_transient(p->info.typ))
+	    fprintf(fout, "\n\t\t\t/* transient %s skipped */", p->sym->name);
+	  else if (p->info.sto & Sattribute)
+	    ;
+	  else if (is_repetition(p))
+	  { 
+            fprintf(fout,"\n\t\t\tif (soap_flag_%s%d && soap->error == SOAP_TAG_MISMATCH)",p->next->sym->name,i);
+            if (((Tnode*)p->next->info.typ->ref)->type == Tclass && !is_volatile(p->next->info.typ->ref))
+              fprintf(fout,"\n\t\t\t{\t%s;\n\t\t\t\t%s;\n\t\t\t\tq.soap_default(soap);\n\t\t\t\tsoap_new_block(soap);", c_type_id(p->next->info.typ, "p"), c_type_id(p->next->info.typ->ref, "q"));
+            else if (((Tnode*)p->next->info.typ->ref)->type == Tclass || has_class(p->next->info.typ->ref))
+              fprintf(fout,"\n\t\t\t{\t%s;\n\t\t\t\t%s;\n\t\t\t\tsoap_new_block(soap);", c_type_id(p->next->info.typ, "p"), c_type_id(p->next->info.typ->ref, "q"));
+            else
+              fprintf(fout,"\n\t\t\t{\t%s;\n\t\t\t\tsoap_new_block(soap);", c_type_id(p->next->info.typ, "p"));
+	    if (is_unmatched(p->next->sym))
+              fprintf(fout,"\n\t\t\t\tfor (((%s*)a)->%s = 0; !soap_element_begin_in(soap, NULL, 1); ((%s*)a)->%s++)", t->sym->name, p->sym->name, ns_add_overridden(t, p->next, nse), t->sym->name, p->sym->name);
+	    else
+              fprintf(fout,"\n\t\t\t\tfor (((%s*)a)->%s = 0; !soap_element_begin_in(soap, \"%s\", 1); ((%s*)a)->%s++)", t->sym->name, p->sym->name, ns_add_overridden(t, p->next, nse), t->sym->name, p->sym->name);
+            fprintf(fout,"\n\t\t\t\t{\tp = (%s)soap_push_block(soap, sizeof(%s));\n\t\t\t\t\tif (!p)\n\t\t\t\t\t\treturn NULL;", c_type(p->next->info.typ), c_type(p->next->info.typ->ref));
+            if (((Tnode*)p->next->info.typ->ref)->type == Tclass || has_class(p->next->info.typ->ref))
+              fprintf(fout,"\n\t\t\t\t\tmemcpy(p, &q, sizeof(%s));", c_type(p->next->info.typ->ref));
+            if (((Tnode*)p->next->info.typ->ref)->type == Tclass && !is_external(p->next->info.typ->ref) && !is_volatile(p->next->info.typ->ref) && !is_typedef(p->next->info.typ->ref))
+              fprintf(fout,"\n\t\t\t\t\tp->soap_default(soap);");
+            else if (((Tnode*)p->next->info.typ->ref)->type != Tpointer  && !is_XML(p->next->info.typ->ref))
+              fprintf(fout,"\n\t\t\t\t\tsoap_default_%s(soap, p);", c_ident(p->next->info.typ->ref));
+            else
+              fprintf(fout,"\n\t\t\t\t\t*p = NULL;");
+	    if (!is_invisible(p->next->sym->name))
+              fprintf(fout,"\n\t\t\t\t\tsoap_revert(soap);");
+	    if (is_unmatched(p->next->sym))
+            { if (is_XML(p->next->info.typ->ref) && is_string(p->next->info.typ->ref))
+                fprintf(fout,"\n\t\t\t\t\tif (soap_inliteral(soap, NULL, p))");
+              else if (is_XML(p->next->info.typ->ref) && is_wstring(p->next->info.typ->ref))
+                fprintf(fout,"\n\t\t\t\t\tif (soap_inwliteral(soap, NULL, p))");
+              else
+                fprintf(fout,"\n\t\t\t\t\tif (!soap_in_%s(soap, NULL, p, \"%s\"))", c_ident(p->next->info.typ->ref), xsi_type(p->next->info.typ->ref));
+	    }
+	    else
+            { if (is_XML(p->next->info.typ->ref) && is_string(p->next->info.typ->ref))
+                fprintf(fout,"\n\t\t\t\t\tif (soap_inliteral(soap, \"%s\", p))", ns_add_overridden(t, p->next, nse));
+              else if (is_XML(p->next->info.typ->ref) && is_wstring(p->next->info.typ->ref))
+                fprintf(fout,"\n\t\t\t\t\tif (soap_inwliteral(soap, \"%s\", p))", ns_add_overridden(t, p->next, nse));
+              else
+                fprintf(fout,"\n\t\t\t\t\tif (!soap_in_%s(soap, \"%s\", p, \"%s\"))", c_ident(p->next->info.typ->ref), ns_add_overridden(t, p->next, nse), xsi_type(p->next->info.typ->ref));
+	    }
+            fprintf(fout,"\n\t\t\t\t\t\tbreak;");
+            fprintf(fout,"\n\t\t\t\t\tsoap_flag_%s%d = 0;", p->next->sym->name, i);
+            fprintf(fout,"\n\t\t\t\t}");
+            fprintf(fout,"\n\t\t\t\t((%s*)a)->%s = (%s)soap_save_block(soap, NULL, 1);", t->sym->name, p->next->sym->name, c_type(p->next->info.typ));
+            fprintf(fout,"\n\t\t\t\tif (!soap_flag_%s%d && soap->error == SOAP_TAG_MISMATCH)\n\t\t\t\t\tcontinue;\n\t\t\t}", p->next->sym->name, i);
+          p = p->next;
+	  }
+	  else if (is_anytype(p))
+          { fprintf(fout,"\n\t\t\tif (soap_flag_%s%d && soap->error == SOAP_TAG_MISMATCH)",p->next->sym->name,i);
+	    fprintf(fout,"\n\t\t\t\tif ((((%s*)a)->%s = soap_getelement(soap, &((%s*)a)->%s)))", t->sym->name, p->next->sym->name, t->sym->name, p->sym->name);
+	    fprintf(fout,"\n\t\t\t\t{\tsoap_flag_%s%d = 0;", p->next->sym->name,i);
+	    fprintf(fout,"\n\t\t\t\t\tcontinue;");
+	    fprintf(fout,"\n\t\t\t\t}");
+            p = p->next;
+	  }
+          else if (is_discriminant(typ))
+          { fprintf(fout,"\n\t\tif (!soap_in_%s(soap, &a->%s, &a->%s))", c_ident(p->next->info.typ), p->sym->name, p->next->sym->name);
+            fprintf(fout,"\n\t\t\treturn NULL;");
+	    i = 0;
+            break;
+	  }
+	  else if (is_choice(p))
+          { fprintf(fout,"\n\t\t\tif (soap_flag_%s%d && soap->error == SOAP_TAG_MISMATCH)",p->next->sym->name,i);
+	    fprintf(fout,"\n\t\t\t\tif (soap_in_%s(soap, &((%s*)a)->%s, &((%s*)a)->%s))", c_ident(p->next->info.typ), t->sym->name, p->sym->name, t->sym->name, p->next->sym->name);
+	    fprintf(fout,"\n\t\t\t\t{\tsoap_flag_%s%d = 0;", p->next->sym->name,i);
+	    fprintf(fout,"\n\t\t\t\t\tcontinue;");
+	    fprintf(fout,"\n\t\t\t\t}");
+            p = p->next;
+	  }
+	  else
+	  {
+	    if (!is_invisible(p->sym->name) && !is_primclass(typ) && p->info.typ->type != Tfun && !is_void(p->info.typ))
+	   { if (is_string(p->info.typ) || is_wstring(p->info.typ) || is_stdstr(p->info.typ))
+	       fprintf(fout,"\n\t\t\tif (soap_flag_%s%d && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))",p->sym->name, i);
+             else if (is_template(p->info.typ))
+	      fprintf(fout,"\n\t\t\tif (soap->error == SOAP_TAG_MISMATCH)");
+	     else
+	       fprintf(fout,"\n\t\t\tif (soap_flag_%s%d && soap->error == SOAP_TAG_MISMATCH)",p->sym->name, i);
+	   }
+	   if (is_unmatched(p->sym))
+	   { 
+	    if (is_XML(p->info.typ) && is_string(p->info.typ)) {
+	      fprintf(fout,"\n\t\t\t\tif (soap_inliteral(soap, NULL, &(((%s*)a)->%s)))", t->sym->name, p->sym->name);
+	    } else if (is_XML(p->info.typ) && is_wstring(p->info.typ)) {
+	      fprintf(fout,"\n\t\t\t\tif (soap_inwliteral(soap, NULL, &(((%s*)a)->%s)))", t->sym->name, p->sym->name);
+	    }
+	    else if(p->info.typ->type==Tarray) {
+	      fprintf(fout,"\n\t\t\t\tif (soap_in_%s(soap, NULL, ((%s*)a)->%s, \"%s\"))", c_ident(p->info.typ),t->sym->name,p->sym->name,xsi_type(p->info.typ));
+	    } else if(p->info.typ->type==Tclass && !is_external(p->info.typ) && !is_volatile(p->info.typ) && !is_typedef(p->info.typ)) {
+	      fprintf(fout,"\n\t\t\t\tif ((((%s*)a)->%s).soap_in(soap, NULL, \"%s\"))", t->sym->name,p->sym->name,xsi_type(p->info.typ));
+	    } else if (p->info.typ->type != Tfun && !is_void(p->info.typ)) {
+	      fprintf(fout,"\n\t\t\t\tif (soap_in_%s(soap, NULL, &(((%s*)a)->%s), \"%s\"))", c_ident(p->info.typ),t->sym->name,p->sym->name,xsi_type(p->info.typ));
+	    }
+           }
+	   else if (!is_invisible(p->sym->name))
+	   { 
+	    if (is_XML(p->info.typ) && is_string(p->info.typ)) {
+	      fprintf(fout,"\n\t\t\t\tif (soap_inliteral(soap, \"%s\", &(((%s*)a)->%s)))", ns_add_overridden(t, p, nse), t->sym->name,p->sym->name);
+	    } else if (is_XML(p->info.typ) && is_wstring(p->info.typ)) {
+	      fprintf(fout,"\n\t\t\t\tif (soap_inwliteral(soap, \"%s\", &(((%s*)a)->%s)))", ns_add_overridden(t, p, nse), t->sym->name,p->sym->name);
+	    }
+	    else if(p->info.typ->type==Tarray) {
+	      fprintf(fout,"\n\t\t\t\tif (soap_in_%s(soap, \"%s\", ((%s*)a)->%s, \"%s\"))", c_ident(p->info.typ),ns_add_overridden(t, p, nse),t->sym->name,p->sym->name,xsi_type(p->info.typ));
+	    } else if(p->info.typ->type==Tclass && !is_external(p->info.typ) && !is_volatile(p->info.typ) && !is_typedef(p->info.typ)) {
+	      fprintf(fout,"\n\t\t\t\tif ((((%s*)a)->%s).soap_in(soap, \"%s\", \"%s\"))", t->sym->name,p->sym->name,ns_add_overridden(t, p, nse),xsi_type(p->info.typ));
+	    } else if (p->info.typ->type != Tfun && !is_void(p->info.typ)) {
+	      fprintf(fout,"\n\t\t\t\tif (soap_in_%s(soap, \"%s\", &(((%s*)a)->%s), \"%s\"))", c_ident(p->info.typ),ns_add_overridden(t, p, nse),t->sym->name,p->sym->name,xsi_type(p->info.typ));
+	    }
+           }
+	    if (!is_invisible(p->sym->name) && !is_primclass(typ) && p->info.typ->type != Tfun && !is_void(p->info.typ))
+	    { if (is_template(p->info.typ))
+	        fprintf(fout,"\n\t\t\t\t\tcontinue;");
+	      else
+	      { fprintf(fout,"\n\t\t\t\t{\tsoap_flag_%s%d--;", p->sym->name, i);
+	        fprintf(fout,"\n\t\t\t\t\tcontinue;");
+	        fprintf(fout,"\n\t\t\t\t}");
+	      }
+	    }
+	    fflush(fout);
+	  }
+        }
+      }
+    if (!is_discriminant(typ))
+    {
+      i=0;
+      for (t = table; t; t = t->prev)
+	i++;
+      for (; i > 0; i--)
+      { t = table;
+	for (j = 0; j < i-1; j++)
+	  t = t->prev;
+        for (p = t->list; p; p = p->next)
+	  { if (is_repetition(p) || is_anytype(p) || is_choice(p))
+	    { p = p->next;
+	      continue;
+	    }
+	    if (is_invisible(p->sym->name)
+	      && !(p->info.sto & (Sconst | Sprivate | Sprotected)) && !is_transient(p->info.typ) && !(p->info.sto & Sattribute))
+	    { if (is_string(p->info.typ) || is_wstring(p->info.typ) || is_stdstr(p->info.typ))
+	       fprintf(fout,"\n\t\t\tif (soap_flag_%s%d && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))",p->sym->name, i);
+             else if (is_template(p->info.typ))
+	       fprintf(fout,"\n\t\t\tif (soap->error == SOAP_TAG_MISMATCH)");
+             else
+	       fprintf(fout,"\n\t\t\tif (soap_flag_%s%d && soap->error == SOAP_TAG_MISMATCH)",p->sym->name, i);
+	    if (is_XML(p->info.typ) && is_string(p->info.typ)) {
+	      fprintf(fout,"\n\t\t\t\tif (soap_inliteral(soap, \"%s\", &(((%s*)a)->%s)))", ns_add_overridden(t, p, nse), t->sym->name,p->sym->name);
+	    } else if (is_XML(p->info.typ) && is_wstring(p->info.typ)) {
+	      fprintf(fout,"\n\t\t\t\tif (soap_inwliteral(soap, \"%s\", &(((%s*)a)->%s)))", ns_add_overridden(t, p, nse), t->sym->name,p->sym->name);
+	    }
+	    else if(p->info.typ->type==Tarray) {
+	      fprintf(fout,"\n\t\t\t\tif (soap_in_%s(soap, \"%s\", ((%s*)a)->%s, \"%s\"))", c_ident(p->info.typ),ns_add_overridden(t, p, nse),t->sym->name,p->sym->name,xsi_type(p->info.typ));
+	    } else if(p->info.typ->type==Tclass && !is_external(p->info.typ) && !is_volatile(p->info.typ) && !is_typedef(p->info.typ)) {
+	      fprintf(fout,"\n\t\t\t\tif ((((%s*)a)->%s).soap_in(soap, \"%s\", \"%s\"))", t->sym->name,p->sym->name,ns_add_overridden(t, p, nse),xsi_type(p->info.typ));
+	    } else if (p->info.typ->type != Tfun && !is_void(p->info.typ)) {
+	      fprintf(fout,"\n\t\t\t\tif (soap_in_%s(soap, \"%s\", &(((%s*)a)->%s), \"%s\"))", c_ident(p->info.typ),ns_add_overridden(t, p, nse),t->sym->name,p->sym->name,xsi_type(p->info.typ));
+	    }
+	   if (is_template(p->info.typ))
+	      fprintf(fout,"\n\t\t\t\t\tcontinue;");
+	   else
+	   { fprintf(fout,"\n\t\t\t\t{\tsoap_flag_%s%d--;", p->sym->name, i);
+	     fprintf(fout,"\n\t\t\t\t\tcontinue;");
+	     fprintf(fout,"\n\t\t\t\t}");
+	   }
+	  }
+	 }
+      }
+      fprintf(fout,"\n\t\t\tif (soap->error == SOAP_TAG_MISMATCH)");
+      fprintf(fout,"\n\t\t\t\tsoap->error = soap_ignore_element(soap);");
+      fprintf(fout,"\n\t\t\tif (soap->error == SOAP_NO_TAG)");
+      fprintf(fout,"\n\t\t\t\tbreak;");
+      fprintf(fout,"\n\t\t\tif (soap->error)\n\t\t\t\treturn NULL;");
+      fprintf(fout,"\n\t\t}");
+      for (t = table; t; t = t->prev)
+	i++;
+      a=0;
+      for (; i > 0; i--)
+      { t = table;
+	for (j = 0; j < i-1; j++)
+	  t = t->prev;
+	for (p = t->list; p; p = p->next)
+	  { if (p->info.minOccurs > 0 && p->info.maxOccurs >= 0 && !(p->info.sto & (Sconst | Sprivate | Sprotected)) && !(p->info.sto & Sattribute) && p->info.typ->type != Tfun && !is_void(p->info.typ) && !is_transient(p->info.typ) && !is_template(p->info.typ) && !is_repetition(p) && !is_choice(p) && p->info.hasval == False)
+	    { if (is_item(p))
+	        continue;
+	      if (is_anytype(p))
+	        p = p->next;
+	      if (a==0)
+	      { fprintf(fout,"\n\t\tif ((soap->mode & SOAP_XML_STRICT) && (soap_flag_%s%d > %ld", p->sym->name, i, p->info.maxOccurs - p->info.minOccurs);
+	        a=1;
+              }
+	      else
+	        fprintf(fout," || soap_flag_%s%d > %ld", p->sym->name, i, p->info.maxOccurs - p->info.minOccurs);
+	    }
+	    else if (is_template(p->info.typ))
+	    { if (p->info.minOccurs > 1)
+	      { if (p->info.typ->type == Tpointer)
+	        { if (a==0)
+	          { fprintf(fout,"\n\t\tif ((soap->mode & SOAP_XML_STRICT) && (!((%s*)a)->%s || ((%s*)a)->%s->size() < %ld", t->sym->name, p->sym->name, t->sym->name, p->sym->name, p->info.minOccurs);
+	            a=1;
+                  }
+	          else
+	            fprintf(fout," || !((%s*)a)->%s || ((%s*)a)->%s->size() < %ld", t->sym->name, p->sym->name, t->sym->name, p->sym->name, p->info.minOccurs);
+	        }
+	        else
+	        { if (a==0)
+	          { fprintf(fout,"\n\t\tif ((soap->mode & SOAP_XML_STRICT) && (((%s*)a)->%s.size() < %ld", t->sym->name, p->sym->name, p->info.minOccurs);
+	            a=1;
+                  }
+	          else
+	            fprintf(fout," || ((%s*)a)->%s.size() < %ld", t->sym->name, p->sym->name, p->info.minOccurs);
+	        }
+	      }
+	      if ( p->info.maxOccurs > 1)
+	      { if (p->info.typ->type == Tpointer)
+	        { if (a==0)
+	          { fprintf(fout,"\n\t\tif ((soap->mode & SOAP_XML_STRICT) && ((((%s*)a)->%s && ((%s*)a)->%s->size() > %ld)", t->sym->name, p->sym->name, t->sym->name, p->sym->name, p->info.maxOccurs);
+	            a=1;
+                  }
+	          else
+	            fprintf(fout," || (((%s*)a)->%s && ((%s*)a)->%s->size() > %ld)", t->sym->name, p->sym->name, t->sym->name, p->sym->name, p->info.maxOccurs);
+	        }
+		else
+	        { if (a==0)
+	          { fprintf(fout,"\n\t\tif ((soap->mode & SOAP_XML_STRICT) && (((%s*)a)->%s.size() > %ld", t->sym->name, p->sym->name, p->info.maxOccurs);
+	            a=1;
+                  }
+	          else
+	            fprintf(fout," || ((%s*)a)->%s.size() > %ld", t->sym->name, p->sym->name, p->info.maxOccurs);
+	        }
+	      }
+	    }
+	    else if (is_repetition(p))
+	    { if (p->info.minOccurs > 1)
+	      { if (a==0)
+	        { fprintf(fout,"\n\t\tif ((soap->mode & SOAP_XML_STRICT) && (((%s*)a)->%s < %ld", t->sym->name, p->sym->name, p->info.minOccurs);
+	          a=1;
+                }
+	        else
+	          fprintf(fout," || ((%s*)a)->%s < %ld", t->sym->name, p->sym->name, p->info.minOccurs);
+	      }
+	      if (p->info.maxOccurs > 1)
+	      { if (a==0)
+	        { fprintf(fout,"\n\t\tif ((soap->mode & SOAP_XML_STRICT) && (((%s*)a)->%s > %ld", t->sym->name, p->sym->name, p->info.maxOccurs);
+	          a=1;
+                }
+	        else
+	          fprintf(fout," || ((%s*)a)->%s > %ld", t->sym->name, p->sym->name, p->info.maxOccurs);
+	      }
+	      p = p->next;
+	    }
+	    else if (is_choice(p))
+	    { if (p->info.minOccurs != 0)
+	      { if (a==0)
+	        { fprintf(fout,"\n\t\tif ((soap->mode & SOAP_XML_STRICT) && (soap_flag_%s%d", p->next->sym->name, i);
+	          a=1;
+                }
+	        else
+	          fprintf(fout," || soap_flag_%s%d", p->next->sym->name, i);
+	      }
+	      p = p->next;
+	    }
+	  }
+      }
+      if (a)
+        fprintf(fout,"))\n\t\t{\tsoap->error = SOAP_OCCURS;\n\t\t\treturn NULL;\n\t\t}");
+    }
+      if (has_getter(typ))
+        fprintf(fout,"\n\t\tif (a->get(soap))\n\t\t\treturn NULL;");
+      if (!is_invisible(typ->id->name))
+      { fprintf(fout, "\n\t\tif (soap_element_end_in(soap, tag))\n\t\t\treturn NULL;");
+        fprintf(fout,"\n\t}\n\telse\n\t{\ta = (%s)soap_id_forward(soap, soap->href, (void**)a, 0, %s, 0, sizeof(%s), 0, soap_copy_%s);",c_type_id(typ, "*"), soap_type(typ), c_type(typ), c_ident(typ));
+        fprintf(fout, "\n\t\tif (soap->body && soap_element_end_in(soap, tag))\n\t\t\treturn NULL;");
+        fprintf(fout, "\n\t}");
+      }
+      fprintf(fout,"\n\treturn a;\n}");
+      }
+
+      break;   
+           
+    case Tunion:
+      if (is_external(typ))
+      { fprintf(fhead, "\nSOAP_FMAC1 %s SOAP_FMAC2 soap_in_%s(struct soap*, int*, %s);", c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*"));
+        return;
+      }
+      fprintf(fhead, "\nSOAP_FMAC3 %s SOAP_FMAC4 soap_in_%s(struct soap*, int*, %s);", c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*"));
+      fprintf(fout, "\n\nSOAP_FMAC3 %s SOAP_FMAC4 soap_in_%s(struct soap *soap, int *choice, %s)\n{", c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*a"));
+      fprintf(fout, "\tsoap->error = SOAP_TAG_MISMATCH;");
+      table = (Table *)typ->ref;
+      for (p = table->list; p; p = p->next) 
+	{ if (p->info.sto & (Sconst | Sprivate | Sprotected))
+	    fprintf(fout, "\n\t/* non-serializable %s skipped */", p->sym->name);
+	  else if (is_transient(p->info.typ))
+	    fprintf(fout, "\n\t/* transient %s skipped */", p->sym->name);
+	  else if (p->info.sto & Sattribute)
+	    ;
+	  else if (is_repetition(p))
+	    ;
+	  else if (is_anytype(p))
+	    ;
+	  else
+	  { if (is_unmatched(p->sym))
+	    { if (is_XML(p->info.typ) && is_string(p->info.typ))
+	        fprintf(fout, "\n\tif (soap->error == SOAP_TAG_MISMATCH && soap_inliteral(soap, NULL, &a->%s))", p->sym->name);
+	      else if (is_XML(p->info.typ) && is_wstring(p->info.typ))
+	        fprintf(fout, "\n\tif (soap->error == SOAP_TAG_MISMATCH && soap_inwliteral(soap, NULL, &a->%s))", p->sym->name);
+	      else if (p->info.typ->type == Tarray)
+	        fprintf(fout, "\n\tif (soap->error == SOAP_TAG_MISMATCH && soap_in_%s(soap, NULL, a->%s, \"%s\"))", c_ident(p->info.typ),p->sym->name,xsi_type(p->info.typ));
+	      else if (p->info.typ->type == Tclass && !is_external(p->info.typ) && !is_volatile(p->info.typ) && !is_typedef(p->info.typ))
+	        fprintf(fout, "\n\tif (soap->error == SOAP_TAG_MISMATCH && a->%s.soap_in(soap, NULL, \"%s\"))", p->sym->name,xsi_type(p->info.typ));
+	      else if (p->info.typ->type != Tfun && !is_void(p->info.typ))
+	      { if (p->info.typ->type == Tpointer)
+	          fprintf(fout, "\n\ta->%s = NULL;", p->sym->name);
+	        fprintf(fout, "\n\tif (soap->error == SOAP_TAG_MISMATCH && soap_in_%s(soap, NULL, &a->%s, \"%s\"))", c_ident(p->info.typ),p->sym->name,xsi_type(p->info.typ));
+	      }
+	    }
+	    else
+	    { if (is_XML(p->info.typ) && is_string(p->info.typ))
+	        fprintf(fout, "\n\tif (soap->error == SOAP_TAG_MISMATCH && soap_inliteral(soap, \"%s\", &a->%s))", ns_add(p->sym->name, nse), p->sym->name);
+	      else if (is_XML(p->info.typ) && is_wstring(p->info.typ))
+	        fprintf(fout, "\n\tif (soap->error == SOAP_TAG_MISMATCH && soap_inwliteral(soap, \"%s\", &a->%s))", ns_add(p->sym->name, nse), p->sym->name);
+	      else if (p->info.typ->type == Tarray)
+	        fprintf(fout, "\n\tif (soap->error == SOAP_TAG_MISMATCH && soap_in_%s(soap, \"%s\", a->%s, \"%s\"))", c_ident(p->info.typ),ns_add(p->sym->name, nse),p->sym->name,xsi_type(p->info.typ));
+	      else if (p->info.typ->type == Tclass && !is_external(p->info.typ) && !is_volatile(p->info.typ) && !is_typedef(p->info.typ))
+	        fprintf(fout, "\n\tif (soap->error == SOAP_TAG_MISMATCH && a->%s.soap_in(soap, \"%s\", \"%s\"))", p->sym->name,ns_add(p->sym->name, nse),xsi_type(p->info.typ));
+	      else if (p->info.typ->type != Tfun && !is_void(p->info.typ))
+	      { if (p->info.typ->type == Tpointer)
+	          fprintf(fout, "\n\ta->%s = NULL;", p->sym->name);
+	        fprintf(fout, "\n\tif (soap->error == SOAP_TAG_MISMATCH && soap_in_%s(soap, \"%s\", &a->%s, \"%s\"))", c_ident(p->info.typ),ns_add(p->sym->name, nse),p->sym->name,xsi_type(p->info.typ));
+	      }
+	    }
+	    fprintf(fout, "\n\t{\t*choice = SOAP_UNION_%s_%s;", c_ident(typ), p->sym->name);
+	    fprintf(fout, "\n\t\treturn a;");
+	    fprintf(fout, "\n\t}");
+	    fflush(fout);
+	  }
+        }
+      fprintf(fout, "\n\t*choice = 0;\n\tif (!soap->error)\n\t\tsoap->error = SOAP_TAG_MISMATCH;\n\treturn NULL;\n}");
+      break;
+ 
+    case Tpointer:
+      
+      if (is_external(typ))
+      { fprintf(fhead,"\nSOAP_FMAC1 %s SOAP_FMAC2 soap_in_%s(struct soap*, const char*, %s, const char*);", c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*"));
+        return;
+      }
+      fprintf(fhead,"\nSOAP_FMAC3 %s SOAP_FMAC4 soap_in_%s(struct soap*, const char*, %s, const char*);", c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*"));
+      fprintf(fout,"\n\nSOAP_FMAC3 %s SOAP_FMAC4 soap_in_%s(struct soap *soap, const char *tag, %s, const char *type)\n{", c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*a"));
+      fprintf(fout,"\n\tif (soap_element_begin_in(soap, tag, 1))");
+      fprintf(fout,"\n\t\treturn NULL;");
+
+      if (is_template(typ))
+      { fprintf(fout,"\n\tsoap_revert(soap);");
+	fprintf(fout,"\n\tif (!a)\n\t\tif (!(a = (%s)soap_malloc(soap, sizeof(%s))))\n\t\t\treturn NULL;", c_type_id(typ, "*"), c_type(typ));
+	fprintf(fout,"\n\tif (!(*a = soap_in_%s(soap, tag, *a, type)))\n\t\treturn NULL;", c_ident(typ->ref));
+	fprintf(fout,"\n\treturn a;\n}");
+      }
+      else if(((Tnode *) typ->ref)->type == Tclass && !is_external(typ->ref) && !is_volatile(typ->ref) && !is_typedef(typ->ref))
+      {
+	fprintf(fout,"\n\tif (!a)\n\t\tif (!(a = (%s)soap_malloc(soap, sizeof(%s))))\n\t\t\treturn NULL;", c_type_id(typ, "*"), c_type(typ));
+	fprintf(fout,"\n\t*a = NULL;\n\tif (!soap->null && *soap->href != '#')");
+	fprintf(fout,"\n\t{\tsoap_revert(soap);");
+	fprintf(fout, "\n\t\tif (!(*a = (%s)soap_instantiate_%s(soap, -1, soap->type, soap->arrayType, NULL)))", c_type(typ), c_ident(typ->ref));
+	fprintf(fout, "\n\t\t\treturn NULL;");
+	fprintf(fout, "\n\t\t(*a)->soap_default(soap);");
+	fprintf(fout, "\n\t\tif (!(*a)->soap_in(soap, tag, NULL))"); 
+	fprintf(fout, "\n\t\t\treturn NULL;");
+	fprintf(fout,"\n\t}\n\telse\n\t{\ta = (%s)soap_id_lookup(soap, soap->href, (void**)a, %s, sizeof(%s), %d);", c_type_id(typ, "*"), soap_type(typ->ref), c_type(typ->ref), reflevel(typ->ref) );
+	fprintf(fout,"\n\t\tif (soap->body && soap_element_end_in(soap, tag))\n\t\t\treturn NULL;");
+	fprintf(fout,"\n\t}\n\treturn a;\n}");
+      }
+      else
+      {
+	fprintf(fout,"\n\tif (!a)\n\t\tif (!(a = (%s)soap_malloc(soap, sizeof(%s))))\n\t\t\treturn NULL;", c_type_id(typ, "*"), c_type(typ));
+	fprintf(fout,"\n\t*a = NULL;\n\tif (!soap->null && *soap->href != '#')");
+	fprintf(fout,"\n\t{\tsoap_revert(soap);");
+	fprintf(fout,"\n\t\tif (!(*a = soap_in_%s(soap, tag, *a, type)))", c_ident(typ->ref));
+	fprintf(fout,"\n\t\t\treturn NULL;");
+
+	fprintf(fout,"\n\t}\n\telse\n\t{\ta = (%s)soap_id_lookup(soap, soap->href, (void**)a, %s, sizeof(%s), %d);", c_type_id(typ, "*"), soap_type(typ->ref), c_type(typ->ref), reflevel(typ->ref) );
+	fprintf(fout,"\n\t\tif (soap->body && soap_element_end_in(soap, tag))\n\t\t\treturn NULL;");
+	fprintf(fout,"\n\t}\n\treturn a;\n}");
+      }
+    
+      break;
+  
+    case Tarray:
+      temp = typ;
+      while(temp->type == Tarray){
+	temp = temp->ref;
+      }
+      if (is_external(typ))
+      { fprintf(fhead,"\nSOAP_FMAC1 %s SOAP_FMAC2 soap_in_%s(struct soap*, const char*, %s, const char*);",c_type_id(temp, "*"),c_ident(typ),c_type(typ));  
+        return;
+      }
+      fprintf(fhead,"\nSOAP_FMAC3 %s SOAP_FMAC4 soap_in_%s(struct soap*, const char*, %s, const char*);",c_type_id(temp, "*"),c_ident(typ),c_type(typ));  
+      fprintf(fout,"\n\nSOAP_FMAC3 %s SOAP_FMAC4 soap_in_%s(struct soap *soap, const char *tag, %s, const char *type)\n{",c_type_id(temp, "*"),c_ident(typ),c_type_id(typ, "a"));  
+      fprintf(fout,"\n\tif (soap_element_begin_in(soap, tag, 0))");
+      fprintf(fout,"\n\t\treturn NULL;");
+      fprintf(fout,"\n\tif (soap_match_array(soap, type))");
+      fprintf(fout,"\n\t{\tsoap->error = SOAP_TYPE;\n\t\treturn NULL;\n\t}");
+      fprintf(fout,"\n\ta = (%s)soap_id_enter(soap, soap->id, a, %s, sizeof(%s), 0, NULL, NULL, NULL);", c_type_id(typ->ref, "(*)"), soap_type(typ), c_type(typ));
+      fprintf(fout,"\n\tif (!a)\n\t\treturn NULL;");
+      fprintf(fout,"\n\tsoap_default_%s(soap, a);",c_ident(typ));
+      fprintf(fout,"\n\tif (soap->body && !*soap->href)");
+      total=get_dimension(typ);  
+      n=typ->ref;
+      cardinality = 1;
+      while(n->type==Tarray)
+	{
+	  total=total*get_dimension(n);
+	  n = n->ref;
+	  cardinality++;
+	}
+      fprintf(fout,"\n\t{\tint i;\n\t\tfor (i = 0; i < %d; i++)",get_dimension(typ));
+  fprintf(fout,"\n\t\t{\tsoap_peek_element(soap);\n\t\t\tif (soap->position)\n\t\t\t{\ti = soap->positions[0];\n\t\t\t\tif (i < 0 || i >= %d)\n\t\t\t\t{\tsoap->error = SOAP_IOB;\n\t\t\t\t\treturn NULL;\n\t\t\t\t}\n\t\t\t}", get_dimension(typ));
+	fprintf(fout,"\n\t\t\tif (!soap_in_%s(soap, NULL, a", c_ident(typ->ref));
+
+      if(cardinality > 1){
+	fprintf(fout,"[i]");
+      }else {
+	fprintf(fout,"+i");
+      }
+      fprintf(fout,", \"%s\"))", xsi_type(typ->ref));
+      fprintf(fout,"\n\t\t\t{\tif (soap->error != SOAP_NO_TAG)\n\t\t\t\t\treturn NULL;");
+      fprintf(fout,"\n\t\t\t\tsoap->error = SOAP_OK;");
+      fprintf(fout,"\n\t\t\t\tbreak;");
+      fprintf(fout,"\n\t\t\t}");
+      fprintf(fout,"\n\t\t}");
+      fprintf(fout,"\n\t\tif (soap->mode & SOAP_C_NOIOB)\n\t\t\twhile (soap_element_end_in(soap, tag) == SOAP_SYNTAX_ERROR)\n\t\t\t{\tsoap->peeked = 1;\n\t\t\t\tsoap_ignore_element(soap);\n\t\t\t}");
+      fprintf(fout,"\n\t\telse if (soap_element_end_in(soap, tag))\n\t\t{\tif (soap->error == SOAP_SYNTAX_ERROR)\n\t\t\t\tsoap->error = SOAP_IOB;\n\t\t\treturn NULL;\n\t\t}");
+      fprintf(fout,"\n\t}\n\telse\n\t{\ta = (%s)soap_id_forward(soap, soap->href, (void**)soap_id_enter(soap, soap->id, a, %s, sizeof(%s), 0, NULL, NULL, NULL), 0, %s, 0, sizeof(%s), 0, NULL);", c_type_id(typ->ref, "(*)"), soap_type(typ), c_type(typ), soap_type(typ), c_type(typ));
+      fprintf(fout,"\n\t\tif (soap->body && soap_element_end_in(soap, tag))\n\t\t\treturn NULL;");
+      fprintf(fout,"\n\t}\n\treturn (%s)a;\n}", c_type_id(temp, "*"));
+      break;
+
+    case Tenum:
+      if (is_external(typ))
+      { fprintf(fhead,"\nSOAP_FMAC1 %s SOAP_FMAC2 soap_in_%s(struct soap*, const char*, %s, const char*);",c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*"));  
+        return;
+      }
+      fprintf(fhead,"\nSOAP_FMAC3 %s SOAP_FMAC4 soap_in_%s(struct soap*, const char*, %s, const char*);",c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*"));  
+      if (!is_mask(typ))
+      { fprintf(fhead,"\n\nSOAP_FMAC3S int SOAP_FMAC4S soap_s2%s(struct soap*, const char*, %s);",c_ident(typ),c_type_id(typ, "*"));  
+        fprintf(fout,"\n\nSOAP_FMAC3S int SOAP_FMAC4S soap_s2%s(struct soap *soap, const char *s, %s)\n{\n\t",c_ident(typ),c_type_id(typ, "*a"));  
+	if (is_typedef(typ))
+	  fprintf(fout, "return soap_s2%s(soap, s, a);\n}", t_ident(typ));
+	else
+	{ fprintf(fout, "const struct soap_code_map *map;");
+          t = (Table*)typ->ref;
+          if (t && t->list && strstr(ns_remove1(t->list->sym->name), "__"))
+	    fprintf(fout, "\n\tchar *t;");
+	  fprintf(fout, "\n\tif (!s)\n\t\treturn SOAP_OK;");
+          if (t && t->list && strstr(ns_remove1(t->list->sym->name), "__"))
+	  { fprintf(fout, "\n\tsoap_s2QName(soap, s, &t);");
+	    fprintf(fout, "\n\tmap = soap_code(soap_codes_%s, t);", c_ident(typ));
+          } 
+          else
+	    fprintf(fout, "\n\tmap = soap_code(soap_codes_%s, s);", c_ident(typ));
+	  m = 0;
+          for (t = (Table*)typ->ref; t; t = t->prev)
+            for (p = t->list; p; p = p->next)
+	      if (p->info.val.i > m)
+	        m = p->info.val.i;
+	  if (typ->ref == booltable)
+	    fprintf(fout, "\n\tif (map)\n\t\t*a = (%s)(map->code != 0);\n\telse\n\t{\tlong n;\n\t\tif (soap_s2long(soap, s, &n) || ((soap->mode & SOAP_XML_STRICT) && (n < 0 || n > %lu)))\n\t\t\treturn soap->error = SOAP_TYPE;\n\t\t*a = (%s)(n != 0);\n\t}\n\treturn SOAP_OK;\n}", c_type(typ), m, c_type(typ));
+	  else
+	    fprintf(fout, "\n\tif (map)\n\t\t*a = (%s)map->code;\n\telse\n\t{\tlong n;\n\t\tif (soap_s2long(soap, s, &n) || ((soap->mode & SOAP_XML_STRICT) && (n < 0 || n > %lu)))\n\t\t\treturn soap->error = SOAP_TYPE;\n\t\t*a = (%s)n;\n\t}\n\treturn SOAP_OK;\n}", c_type(typ), m, c_type(typ));
+        }
+      }
+      fprintf(fout,"\n\nSOAP_FMAC3 %s SOAP_FMAC4 soap_in_%s(struct soap *soap, const char *tag, %s, const char *type)\n{",c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*a"));  
+      if (is_mask(typ))
+        fprintf(fout,"\n\tconst char *s;\n\tLONG64 i;");
+      fprintf(fout,"\n\tif (soap_element_begin_in(soap, tag, 0))");
+      fprintf(fout,"\n\t\treturn NULL;");
+      if (typ->sym)
+      { fprintf(fout,"\n\tif (*soap->type && soap_match_tag(soap, soap->type, type) && soap_match_tag(soap, soap->type, \"%s\"))", base_type(typ, ""));
+      }
+      else
+        fprintf(fout,"\n\tif (*soap->type && soap_match_tag(soap, soap->type, type))");
+      fprintf(fout,"\n\t{\tsoap->error = SOAP_TYPE;\n\t\treturn NULL;\n\t}");
+      fprintf(fout,"\n\ta = (%s)soap_id_enter(soap, soap->id, a, %s, sizeof(%s), 0, NULL, NULL, NULL);", c_type_id(typ, "*"), soap_type(typ), c_type(typ));
+      fprintf(fout,"\n\tif (!a)\n\t\treturn NULL;");
+      fprintf(fout,"\n\tif (soap->body && !*soap->href)\n\t{");
+      if (is_mask(typ))
+      { fprintf(fout,"\ti = 0;\n\t\twhile (*(s = soap_token(soap)))\n\t\t\t");
+        for (t = (Table*)typ->ref; t; t = t->prev)
+        { for (p = t->list; p; p = p->next)
+	    fprintf(fout, "if (!strcmp(s, \"%s\"))\n\t\t\t\ti |= (LONG64)%s;\n\t\t\telse ", ns_remove2(p->sym->name), p->sym->name);
+        }	
+        fprintf(fout, "\n\t\t\t{\tsoap->error = SOAP_TYPE;\n\t\t\t\treturn NULL;\n\t\t\t}");
+        fprintf(fout, "\n\t\t*a = (%s)i;", c_type(typ));
+        fprintf(fout, "\n\t\tif (soap_element_end_in(soap, tag))\n\t\t\treturn NULL;", c_type(typ));
+      }
+      else
+        fprintf(fout,"\tif (!a || soap_s2%s(soap, soap_value(soap), a) || soap_element_end_in(soap, tag))\n\t\t\treturn NULL;", c_ident(typ));
+      fprintf(fout, "\n\t}\n\telse\n\t{\ta = (%s)soap_id_forward(soap, soap->href, (void**)a, 0, %s, 0, sizeof(%s), 0, NULL);", c_type_id(typ, "*"), soap_type(typ), c_type(typ));
+      fprintf(fout, "\n\t\tif (soap->body && soap_element_end_in(soap, tag))\n\t\t\treturn NULL;");
+      fprintf(fout,"\n\t}\n\treturn a;\n}");
+      break;
+
+    case Ttemplate:
+      if (is_external(typ))
+      { fprintf(fhead,"\nSOAP_FMAC1 %s SOAP_FMAC2 soap_in_%s(struct soap*, const char*, %s, const char*);", c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*")); 
+        return;
+      }
+      fprintf(fhead,"\nSOAP_FMAC3 %s SOAP_FMAC4 soap_in_%s(struct soap*, const char*, %s, const char*);", c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*")); 
+      fprintf(fout, "\n\nSOAP_FMAC3 %s SOAP_FMAC4 soap_in_%s(struct soap *soap, const char *tag, %s, const char *type)\n{", c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*a")); 
+      n = typ->ref;
+      fprintf(fout, "\n\tif (soap_element_begin_in(soap, tag, 1))\n\t\treturn NULL;");
+      fprintf(fout, "\n\tif (!a && !(a = soap_new_%s(soap, -1)))\n\t\treturn NULL;", c_ident(typ));
+      /* fprintf(fout, "\n\t%s::iterator i;\n\t;", c_type(typ)); */
+      fprintf(fout, "\n\t%s;\n\t%s;", c_type_id(n, "n"), c_type_id(n, "*p"));
+      fprintf(fout, "\n\tdo");
+      fprintf(fout, "\n\t{\tsoap_revert(soap);");
+      fprintf(fout, "\n\t\tif (*soap->id || *soap->href)");
+      fprintf(fout, "\n\t\t{\tif (!soap_container_id_forward(soap, *soap->id?soap->id:soap->href, a, (size_t)a->size(), %s, %s, sizeof(%s), %d))\n\t\t\t\tbreak;\n\t\t\t", soap_type(reftype(n)), soap_type(typ), c_type(reftype(n)), reflevel(n));
+      if (is_XML(n) && is_string(n))
+        fprintf(fout, "if (!(p = soap_inliteral(soap, tag, NULL)))", xsi_type(n));
+      else if (is_XML(n) && is_wstring(n))
+        fprintf(fout, "if (!(p = soap_inwliteral(soap, tag, NULL)))", xsi_type(n));
+      else if (n->type==Tarray)
+        fprintf(fout, "if (!(p = soap_in_%s(soap, tag, NULL, \"%s\")))", c_ident(n),xsi_type(n));
+      else if (n->type != Tfun && !is_void(n))
+        fprintf(fout, "if (!(p = soap_in_%s(soap, tag, NULL, \"%s\")))", c_ident(n),xsi_type(n));
+      fprintf(fout, "\n\t\t\t\tbreak;");
+      fprintf(fout, "\n\t\t}\n\t\telse\n\t\t{\t");
+      if (n->type == Tpointer)
+	fprintf(fout,"n = NULL;");
+      else if (n->type == Tarray)
+	fprintf(fout,"soap_default_%s(soap, &n);", c_ident(n));
+      else if(n->type==Tclass && !is_external(n) && !is_volatile(n) && !is_typedef(n))
+	fprintf(fout,"n.soap_default(soap);");
+      else if (n->type != Tfun && !is_void(n) && !is_XML(n))
+        fprintf(fout,"soap_default_%s(soap, &n);", c_ident(n));
+      if (is_XML(n) && is_string(n))
+        fprintf(fout, "\n\t\t\tif (!soap_inliteral(soap, tag, &n))", xsi_type(n));
+      else if (is_XML(n) && is_wstring(n))
+        fprintf(fout, "\n\t\t\tif (!soap_inwliteral(soap, tag, &n))", xsi_type(n));
+      else if (n->type==Tarray)
+        fprintf(fout, "\n\t\t\tif (!soap_in_%s(soap, tag, &n, \"%s\"))", c_ident(n),xsi_type(n));
+      else if (n->type != Tfun && !is_void(n))
+        fprintf(fout, "\n\t\t\tif (!soap_in_%s(soap, tag, &n, \"%s\"))", c_ident(n),xsi_type(n));
+      fprintf(fout, "\n\t\t\t\tbreak;");
+      if (!strcmp(typ->id->name, "std::vector") || !strcmp(typ->id->name, "std::deque"))
+        fprintf(fout, "\n\t\t}\n\t\ta->push_back(n);");
+      else
+        fprintf(fout, "\n\t\t\ta->insert(a->end(), n);\n\t\t}");
+      fprintf(fout, "\n\t}\n\twhile (!soap_element_begin_in(soap, tag, 1));");
+      fprintf(fout, "\n\tif (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)\n\t{\tsoap->error = SOAP_OK;\n\t\treturn a;\n\t}\n\treturn NULL;\n}");
+      break;
+    default: break;
+    }
+  fflush(fout);
+}
+
+
+void
+soap_in_Darray(Tnode *typ)
+{ int i, j, d;
+  Entry *p, *q;
+  Table *t, *table;
+  char *nsa = ns_qualifiedAttribute(typ);
+
+  table=(Table *)typ->ref;
+  q = table->list;
+  p = is_dynamic_array(typ);
+  d = get_Darraydims(typ);
+  
+  if (is_external(typ))
+  { fprintf(fhead,"\nSOAP_FMAC1 %s SOAP_FMAC2 soap_in_%s(struct soap*, const char*, %s, const char*);", c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*"));
+    return;
+  }
+  fprintf(fhead,"\nSOAP_FMAC3 %s SOAP_FMAC4 soap_in_%s(struct soap*, const char*, %s, const char*);", c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*"));
+  if (typ->type == Tclass && !is_volatile(typ) && !is_typedef(typ))
+  { fprintf(fout,"\n\nvoid *%s::soap_in(struct soap *soap, const char *tag, const char *type)", c_type(typ));
+    fprintf(fout,"\n{\treturn soap_in_%s(soap, tag, this, type);\n}", c_ident(typ));
+  }
+  fflush(fout);
+  fprintf(fout,"\n\nSOAP_FMAC3 %s SOAP_FMAC4 soap_in_%s(struct soap *soap, const char *tag, %s, const char *type)", c_type_id(typ, "*"),c_ident(typ),c_type_id(typ, "*a"));
+  if ((has_ns(typ) || is_untyped(typ)) && is_binary(typ))
+    fprintf(fout,"\n{");
+  else if (d)
+    fprintf(fout,"\n{\tint i, j, n;\n\t%s;", c_type_id(p->info.typ, "p"));
+  else
+    fprintf(fout,"\n{\tint i, j;\n\t%s;", c_type_id(p->info.typ, "p"));
+  fprintf(fout,"\n\tif (soap_element_begin_in(soap, tag, 1))\n\t\treturn NULL;");
+  if (has_ns(typ) || is_untyped(typ))
+    if (is_hexBinary(typ))
+      fprintf(fout,"\n\tif (*soap->type && soap_match_tag(soap, soap->type, type) && soap_match_tag(soap, soap->type, \":hexBinary\"))");
+    else if (is_binary(typ))
+      fprintf(fout,"\n\tif (*soap->type && soap_match_tag(soap, soap->type, type) && soap_match_tag(soap, soap->type, \":base64Binary\") && soap_match_tag(soap, soap->type, \":base64\"))");
+    else
+      fprintf(fout,"\n\tif (*soap->type && soap_match_tag(soap, soap->type, type))");
+  else
+    fprintf(fout,"\n\tif (soap_match_array(soap, type))");
+  fprintf(fout,"\n\t{\tsoap->error = SOAP_TYPE;\n\t\treturn NULL;\n\t}");
+  if (typ->type == Tclass)
+  { fprintf(fout,"\n\ta = (%s)soap_class_id_enter(soap, soap->id, a, %s, sizeof(%s), soap->type, soap->arrayType);",c_type_id(typ, "*"), soap_type(typ), c_type(typ)); 
+    fprintf(fout,"\n\tif (!a)\n\t\treturn NULL;");
+    fprintf(fout,"\n\tif (soap->alloced)\n\t\ta->soap_default(soap);");
+    for (t = (Table*)typ->ref; t; t = t->prev)
+    { for (p = t->list; p; p = p->next) 
+	if (p->info.sto & Sattribute)
+          soap_attr_value(p, ptr_cast(typ, "a"), p->sym->name, ns_add(p->sym->name, nsa));
+    }
+  }
+  else
+  { fprintf(fout,"\n\ta = (%s)soap_id_enter(soap, soap->id, a, %s, sizeof(%s), 0, NULL, NULL, NULL);",c_type_id(typ, "*"), soap_type(typ), c_type(typ));
+    fprintf(fout,"\n\tif (!a)\n\t\treturn NULL;");
+    /*fprintf(fout,"\n\tif (soap->alloced)");*/
+    fprintf(fout,"\n\tsoap_default_%s(soap, a);", c_ident(typ));
+    for (t = (Table*)typ->ref; t; t = t->prev)
+    { for (p = t->list; p; p = p->next) 
+	if (p->info.sto & Sattribute)
+          soap_attr_value(p, "a", p->sym->name, ns_add(p->sym->name, nsa));
+    }
+  }
+  fprintf(fout,"\n\tif (soap->body && !*soap->href)\n\t{");
+  p = is_dynamic_array(typ);
+  if ((has_ns(typ) || is_untyped(typ)) && is_binary(typ))
+  { if (is_hexBinary(typ))
+      fprintf(fout,"\n\t\ta->__ptr = soap_gethex(soap, &a->__size);");
+    else
+    { fprintf(fout,"\n\t\ta->__ptr = soap_getbase64(soap, &a->__size, 0);");
+      if (is_attachment(typ))
+        fprintf(fout,"\n\t\tif (soap_xop_forward(soap, &a->__ptr, &a->__size, &a->id, &a->type, &a->options))\n\t\t\treturn NULL;");
+    }
+    fprintf(fout,"\n\t\tif ((!a->__ptr && soap->error) || soap_element_end_in(soap, tag))\n\t\t\treturn NULL;");
+  }
+  else
+  { if (d)
+    { fprintf(fout,"\n\t\tn = soap_getsizes(soap->arraySize, a->__size, %d);", d);
+      if (has_offset(typ))
+        fprintf(fout,"\n\t\tn -= j = soap_getoffsets(soap->arrayOffset, a->__size, a->__offset, %d);", d);
+      else
+        fprintf(fout,"\n\t\tn -= j = soap_getoffsets(soap->arrayOffset, a->__size, NULL, %d);", d);
+      if (p->info.minOccurs > 1)
+        fprintf(fout,"\n\t\tif ((soap->mode & SOAP_XML_STRICT) && n >= 0 && n < %ld)\n\t\t{\tsoap->error = SOAP_OCCURS;\n\t\t\treturn NULL;\n\t\t}", p->info.minOccurs);
+      if (p->info.maxOccurs > 1)
+        fprintf(fout,"\n\t\tif ((soap->mode & SOAP_XML_STRICT) && n > %ld)\n\t\t{\tsoap->error = SOAP_OCCURS;\n\t\t\treturn NULL;\n\t\t}", p->info.maxOccurs);
+      fprintf(fout,"\n\t\tif (n >= 0)");
+      if (((Tnode*)p->info.typ->ref)->type == Tclass)
+      { fprintf(fout,"\n\t\t{\ta->%s = soap_new_%s(soap, n);", p->sym->name, c_ident(p->info.typ->ref));
+        if (!is_external(p->info.typ->ref) && !is_volatile(p->info.typ->ref) && !is_typedef(p->info.typ->ref))
+          fprintf(fout, "\n\t\t\tfor (i = 0; i < n; i++)\n\t\t\t\t(a->%s+i)->%s::soap_default(soap);", p->sym->name, c_type(p->info.typ->ref));
+        else if (((Tnode*)p->info.typ->ref)->type == Tpointer)
+          fprintf(fout, "\n\t\t\tfor (i = 0; i < n; i++)\n\t\t\t\tsoap_default_%s(soap, a->%s+i);", c_ident(p->info.typ->ref), p->sym->name);
+      }
+      else if (has_class(p->info.typ->ref))
+      { fprintf(fout,"\n\t\t{\ta->%s = soap_new_%s(soap, n);", p->sym->name, c_ident(p->info.typ->ref));
+        fprintf(fout, "\n\t\t\tfor (i = 0; i < n; i++)\n\t\t\t\tsoap_default_%s(soap, a->%s+i);", c_ident(p->info.typ->ref), p->sym->name);
+      }
+      else
+      { fprintf(fout,"\n\t\t{\ta->%s = (%s)soap_malloc(soap, n*sizeof(%s));", p->sym->name, c_type_id(p->info.typ->ref, "*"),  c_type(p->info.typ->ref));
+        if (((Tnode*)p->info.typ->ref)->type == Tpointer)
+          fprintf(fout, "\n\t\t\tfor (i = 0; i < n; i++)\n\t\t\t\ta->%s[i] = NULL;", p->sym->name);
+	else if (!is_XML(p->info.typ->ref))
+          fprintf(fout, "\n\t\t\tfor (i = 0; i < n; i++)\n\t\t\t\tsoap_default_%s(soap, a->%s+i);", c_ident(p->info.typ->ref), p->sym->name);
+      }
+      fprintf(fout,"\n\t\t\tfor (i = 0; i < n; i++)");
+      fprintf(fout,"\n\t\t\t{\tsoap_peek_element(soap);\n\t\t\t\tif (soap->position == %d)", d);
+      fprintf(fout,"\n\t\t\t\t{\ti = ");
+	for (i = 0; i < d; i++)
+	{ fprintf(fout,"soap->positions[%d]", i);
+	  for (j = 1; j < d-i; j++)
+	    fprintf(fout,"*a->__size[%d]", j);
+	  if (i < d-1)
+	    fprintf(fout,"+");
+	}
+	fprintf(fout,"-j;");
+	fprintf(fout,"\n\t\t\t\t\tif (i < 0 || i >= n)\n\t\t\t\t\t{\tsoap->error = SOAP_IOB;\n\t\t\t\t\t\treturn NULL;\n\t\t\t\t\t}\n\t\t\t\t}");
+        fprintf(fout,"\n\t\t\t\tif (!soap_in_%s(soap, NULL, a->%s + i, \"%s\"))", c_ident(p->info.typ->ref), p->sym->name, xsi_type(p->info.typ->ref));
+      fprintf(fout,"\n\t\t\t\t{\tif (soap->error != SOAP_NO_TAG)\n\t\t\t\t\t\treturn NULL;");
+      fprintf(fout,"\n\t\t\t\t\tsoap->error = SOAP_OK;");
+      fprintf(fout,"\n\t\t\t\t\tbreak;");
+      fprintf(fout,"\n\t\t\t\t}");
+    }
+    else
+    { fprintf(fout,"\n\t\ta->__size = soap_getsize(soap->arraySize, soap->arrayOffset, &j);");
+      if (has_offset(typ) && (p->next->next->info.sto & Sconst) == 0)
+      { fprintf(fout,"\n\t\ta->__offset = j;");
+      }
+      if (p->info.minOccurs > 1)
+        fprintf(fout,"\n\t\tif ((soap->mode & SOAP_XML_STRICT) && a->__size >= 0 && a->__size < %ld)\n\t\t{\tsoap->error = SOAP_OCCURS;\n\t\t\treturn NULL;\n\t\t}", p->info.minOccurs);
+      if (p->info.maxOccurs > 1)
+        fprintf(fout,"\n\t\tif ((soap->mode & SOAP_XML_STRICT) && a->__size > %ld)\n\t\t{\tsoap->error = SOAP_OCCURS;\n\t\t\treturn NULL;\n\t\t}", p->info.maxOccurs);
+      fprintf(fout,"\n\t\tif (a->__size >= 0)");
+      if (((Tnode*)p->info.typ->ref)->type == Tclass)
+      { fprintf(fout,"\n\t\t{\ta->%s = soap_new_%s(soap, a->__size);", p->sym->name, c_ident(p->info.typ->ref));
+        if (!is_external(p->info.typ->ref) && !is_volatile(p->info.typ->ref) && !is_typedef(p->info.typ->ref))
+          fprintf(fout, "\n\t\t\tfor (i = 0; i < a->__size; i++)\n\t\t\t\t(a->%s+i)->%s::soap_default(soap);", p->sym->name, c_type(p->info.typ->ref));
+        else
+          fprintf(fout, "\n\t\t\tfor (i = 0; i < a->__size; i++)\n\t\t\t\tsoap_default_%s(soap, a->%s+i);", c_ident(p->info.typ->ref), p->sym->name);
+      }
+      else if (has_class(p->info.typ->ref))
+      { fprintf(fout,"\n\t\t{\ta->%s = soap_new_%s(soap, a->__size);", p->sym->name, c_ident(p->info.typ->ref));
+        fprintf(fout, "\n\t\t\tfor (i = 0; i < a->__size; i++)\n\t\t\t\tsoap_default_%s(soap, a->%s+i);", c_ident(p->info.typ->ref), p->sym->name);
+      }
+      else
+      { fprintf(fout,"\n\t\t{\ta->%s = (%s)soap_malloc(soap, sizeof(%s) * a->__size);", p->sym->name, c_type_id(p->info.typ->ref, "*"),  c_type(p->info.typ->ref));
+	if (((Tnode*)p->info.typ->ref)->type == Tpointer)
+          fprintf(fout, "\n\t\t\tfor (i = 0; i < a->__size; i++)\n\t\t\t\ta->%s[i] = NULL;", p->sym->name);
+	else if (!is_XML(p->info.typ->ref))
+          fprintf(fout, "\n\t\t\tfor (i = 0; i < a->__size; i++)\n\t\t\t\tsoap_default_%s(soap, a->%s+i);", c_ident(p->info.typ->ref), p->sym->name);
+      }
+      fprintf(fout,"\n\t\t\tfor (i = 0; i < a->__size; i++)");
+      fprintf(fout,"\n\t\t\t{\tsoap_peek_element(soap);\n\t\t\t\tif (soap->position)\n\t\t\t\t{\ti = soap->positions[0]-j;\n\t\t\t\t\tif (i < 0 || i >= a->__size)\n\t\t\t\t\t{\tsoap->error = SOAP_IOB;\n\t\t\t\t\t\treturn NULL;\n\t\t\t\t\t}\n\t\t\t\t}");
+      if (is_XML(p->info.typ->ref) && is_string(p->info.typ->ref))
+        fprintf(fout,"\n\t\t\t\tif (!soap_inliteral(soap, NULL, a->%s + i))", p->sym->name);
+      else if (is_XML(p->info.typ->ref) && is_wstring(p->info.typ->ref))
+        fprintf(fout,"\n\t\t\t\tif (!soap_inwliteral(soap, NULL, a->%s + i))", p->sym->name);
+      else
+        fprintf(fout,"\n\t\t\t\tif (!soap_in_%s(soap, NULL, a->%s + i, \"%s\"))", c_ident(p->info.typ->ref), p->sym->name, xsi_type(p->info.typ->ref));
+      fprintf(fout,"\n\t\t\t\t{\tif (soap->error != SOAP_NO_TAG)\n\t\t\t\t\t\treturn NULL;");
+      fprintf(fout,"\n\t\t\t\t\tsoap->error = SOAP_OK;");
+      fprintf(fout,"\n\t\t\t\t\tbreak;");
+      fprintf(fout,"\n\t\t\t\t}");
+    }
+    fprintf(fout,"\n\t\t\t}\n\t\t}\n\t\telse");
+    if (((Tnode*)p->info.typ->ref)->type == Tclass || has_class(p->info.typ->ref))
+      fprintf(fout,"\n\t\t{\t%s;\n\t\t\tsoap_new_block(soap);", c_type_id(p->info.typ->ref, "q"));
+    else
+      fprintf(fout,"\n\t\t{\tsoap_new_block(soap);");
+    if (p->info.maxOccurs > 1)
+    { if (d)
+        fprintf(fout,"\n\t\t\tfor (a->__size[0] = 0; a->__size[0] <= %ld; a->__size[0]++)", p->info.maxOccurs);
+      else
+        fprintf(fout,"\n\t\t\tfor (a->__size = 0; a->__size <= %ld; a->__size++)", p->info.maxOccurs);
+    }
+    else
+    { if (d)
+        fprintf(fout,"\n\t\t\tfor (a->__size[0] = 0; ; a->__size[0]++)");
+      else
+        fprintf(fout,"\n\t\t\tfor (a->__size = 0; ; a->__size++)");
+    }
+    fprintf(fout,"\n\t\t\t{\tp = (%s)soap_push_block(soap, sizeof(%s));\n\t\t\t\tif (!p)\n\t\t\t\t\treturn NULL;", c_type(p->info.typ), c_type(p->info.typ->ref));
+    if (((Tnode*)p->info.typ->ref)->type == Tclass || has_class(p->info.typ->ref))
+      fprintf(fout,"\n\t\t\t\tmemcpy(p, &q, sizeof(%s));", c_type(p->info.typ->ref));
+    if (((Tnode*)p->info.typ->ref)->type == Tclass && !is_external(p->info.typ->ref) && !is_volatile(p->info.typ->ref) && !is_typedef(p->info.typ->ref))
+      fprintf(fout,"\n\t\t\t\tp->soap_default(soap);");
+    else if (((Tnode*)p->info.typ->ref)->type == Tpointer)
+      fprintf(fout,"\n\t\t\t\t*p = NULL;");
+    else if (!is_XML(p->info.typ->ref))
+      fprintf(fout,"\n\t\t\t\tsoap_default_%s(soap, p);", c_ident(p->info.typ->ref));
+    if (is_XML(p->info.typ->ref) && is_string(p->info.typ->ref))
+      fprintf(fout,"\n\t\t\t\tif (!soap_inliteral(soap, NULL, p))");
+    else if (is_XML(p->info.typ->ref) && is_wstring(p->info.typ->ref))
+      fprintf(fout,"\n\t\t\t\tif (!soap_inwliteral(soap, NULL, p))");
+    else
+      fprintf(fout,"\n\t\t\t\tif (!soap_in_%s(soap, NULL, p, \"%s\"))", c_ident(p->info.typ->ref), xsi_type(p->info.typ->ref));
+    fprintf(fout,"\n\t\t\t\t{\tif (soap->error != SOAP_NO_TAG)\n\t\t\t\t\t\treturn NULL;");
+    fprintf(fout,"\n\t\t\t\t\tsoap->error = SOAP_OK;");
+    fprintf(fout,"\n\t\t\t\t\tbreak;");
+    fprintf(fout,"\n\t\t\t\t}");
+    fprintf(fout,"\n\t\t\t}");
+    fprintf(fout,"\n\t\t\tsoap_pop_block(soap);");
+    if (p->info.minOccurs > 1)
+      fprintf(fout,"\n\t\t\tif ((soap->mode & SOAP_XML_STRICT) && a->__size < %ld)\n\t\t\t{\tsoap->error = SOAP_OCCURS;\n\t\t\t\treturn NULL;\n\t\t\t}", p->info.minOccurs);
+    if (p->info.maxOccurs > 1)
+      fprintf(fout,"\n\t\t\tif ((soap->mode & SOAP_XML_STRICT) && a->__size > %ld)\n\t\t\t{\tsoap->error = SOAP_OCCURS;\n\t\t\t\treturn NULL;\n\t\t\t}", p->info.maxOccurs);
+    if (((Tnode*)p->info.typ->ref)->type == Tclass || has_class(p->info.typ->ref))
+      fprintf(fout,"\n\t\t\tif (soap->blist->size)\n\t\t\t\ta->%s = soap_new_%s(soap, soap->blist->size/sizeof(%s));\n\t\t\telse\n\t\t\t\ta->%s = NULL;", p->sym->name, c_ident(p->info.typ->ref), c_type(p->info.typ->ref), p->sym->name);
+    else
+      fprintf(fout,"\n\t\t\ta->%s = (%s)soap_malloc(soap, soap->blist->size);", p->sym->name, c_type(p->info.typ));
+    fprintf(fout,"\n\t\t\tsoap_save_block(soap, (char*)a->%s, 1);", p->sym->name);
+    fprintf(fout,"\n\t\t}");
+    fprintf(fout,"\n\t\tif (soap_element_end_in(soap, tag))\n\t\t\treturn NULL;");
+  }
+  if (has_getter(typ))
+    fprintf(fout,"\n\t\tif (a->get(soap))\n\t\t\treturn NULL;");
+  fprintf(fout,"\n\t}\n\telse\n\t{\t");
+  if (is_attachment(typ))
+    fprintf(fout,"if (*soap->href != '#')\n\t\t{\tif (soap_dime_forward(soap, &a->__ptr, &a->__size, &a->id, &a->type, &a->options))\n\t\t\t\treturn NULL;\n\t\t}\n\t\telse\n\t\t\t");
+  if (typ->type == Tclass)
+    fprintf(fout,"a = (%s)soap_id_forward(soap, soap->href, (void**)a, 0, %s, 0, sizeof(%s), 0, soap_copy_%s);", c_type_id(typ, "*"), soap_type(typ), c_type(typ), c_ident(typ));
+  else
+    fprintf(fout,"a = (%s)soap_id_forward(soap, soap->href, (void**)a, 0, %s, 0, sizeof(%s), 0, NULL);", c_type_id(typ, "*"), soap_type(typ), c_type(typ));
+  fprintf(fout,"\n\t\tif (soap->body && soap_element_end_in(soap, tag))\n\t\t\treturn NULL;");
+  fprintf(fout,"\n\t}");
+  fprintf(fout,"\n\treturn a;\n}");
+}
+
diff --git a/stdsoap2.c b/stdsoap2.c
new file mode 100644
index 0000000..dbed460
--- /dev/null
+++ b/stdsoap2.c
@@ -0,0 +1,13448 @@
+/*
+
+stdsoap2.c[pp] 2.7.6e
+
+gSOAP runtime
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+Contributors:
+
+Wind River Systems Inc., for the following additions under gSOAP public license:
+  - vxWorks compatible	(#define VXWORKS)
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+Installation note:
+
+Win32 build needs winsock.dll (Visual C++ "wsock32.lib")
+To do this in Visual C++ 6.0, go to "Project", "settings", select the "Link"
+tab (the project file needs to be selected in the file view) and add
+"wsock32.lib" to the "Object/library modules" entry
+
+On Mac OS X with gcc (GCC) 3.1 20020420 (prerelease) you MUST compile with
+-fstack_check when using -O2 because gcc 3.1 has a bug that smashes the stack
+when locally allocated data exceeds 64K.
+
+*/
+
+#ifdef AS400
+# pragma convert(819)	/* EBCDIC to ASCII */
+#endif
+
+#include "stdsoap2.h"
+
+#ifdef __cplusplus
+SOAP_SOURCE_STAMP("@(#) stdsoap2.cpp ver 2.7.6e 2006-02-18 12:00:00 GMT")
+extern "C" {
+#else
+SOAP_SOURCE_STAMP("@(#) stdsoap2.c ver 2.7.6e 2006-02-18 12:00:00 GMT")
+#endif
+
+/* 8bit character representing unknown/nonrepresentable character data (e.g. not supported by current locale with multibyte support enabled) */
+#ifndef SOAP_UNKNOWN_CHAR
+#define SOAP_UNKNOWN_CHAR (127)
+#endif
+
+/*      EOF=-1 */
+#define SOAP_LT (soap_wchar)(-2) /* XML character '<' */
+#define SOAP_TT (soap_wchar)(-3) /* XML character '</' */
+#define SOAP_GT (soap_wchar)(-4) /* XML character '>' */
+#define SOAP_QT (soap_wchar)(-5) /* XML character '"' */
+#define SOAP_AP (soap_wchar)(-6) /* XML character ''' */
+
+#define soap_blank(c)		((c) >= 0 && (c) <= 32)
+#define soap_notblank(c)	((c) > 32)
+#define soap_hash_ptr(p)	(((unsigned long)(p) >> 3) & (SOAP_PTRHASH - 1))
+
+#ifdef SOAP_DEBUG
+static void soap_init_logs(struct soap*);
+static void soap_close_logfile(struct soap*, int);
+static void soap_set_logfile(struct soap*, int, const char*);
+static void soap_free_mht(struct soap*);
+static void soap_track_unlink(struct soap*, const void*);
+#endif
+
+#ifndef PALM_2
+static int soap_set_error(struct soap*, const char*, const char*, const char*, const char*, int);
+static int soap_copy_fault(struct soap*, const char*, const char*, const char*, const char*);
+static int soap_getattrval(struct soap*, char*, size_t, soap_wchar);
+#endif
+
+#ifndef PALM_1
+static soap_wchar soap_char(struct soap*);
+static soap_wchar soap_get_pi(struct soap*);
+static int soap_isxdigit(int);
+static void *fplugin(struct soap*, const char*);
+#ifndef WITH_NOIDREF
+static void soap_update_ptrs(struct soap*, char*, char*, char*, char*);
+static int soap_has_copies(struct soap*, const char*, const char*);
+static void soap_init_iht(struct soap*);
+static void soap_free_iht(struct soap*);
+static void soap_init_pht(struct soap*);
+static void soap_free_pht(struct soap*);
+#endif
+#endif
+
+#ifndef WITH_LEAN
+static const char *soap_set_validation_fault(struct soap*, const char*, const char*);
+static int soap_isnumeric(struct soap*, const char*);
+static time_t soap_timegm(struct tm*);
+static struct soap_nlist *soap_lookup_ns(struct soap *soap, const char *tag, size_t n);
+static struct soap_nlist *soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized);
+static void soap_pop_ns(struct soap *soap);
+static void soap_utilize_ns(struct soap *soap, const char *tag, size_t n);
+#endif
+
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart *soap_new_multipart(struct soap*, struct soap_multipart**, struct soap_multipart**, char*, size_t);
+static int soap_putdimefield(struct soap*, const char*, size_t);
+static char *soap_getdimefield(struct soap*, size_t);
+static void soap_select_mime_boundary(struct soap*);
+static int soap_valid_mime_boundary(struct soap*);
+static int soap_match_cid(struct soap*, const char*, const char*);
+static void soap_resolve_attachment(struct soap*, struct soap_multipart*);
+#endif
+#endif
+
+#ifdef WITH_GZIP
+static int soap_getgziphdr(struct soap*);
+#endif
+
+#ifdef WITH_OPENSSL
+static int ssl_init_done = 0;
+static int ssl_auth_init(struct soap*);
+static int ssl_verify_callback(int, X509_STORE_CTX*);
+static int ssl_password(char*, int, int, void *);
+static const char *ssl_error(struct soap*, int);
+/* This callback is included for future references. It should not be deleted
+static DH *ssl_tmp_dh(SSL*, int, int);
+*/
+#endif
+
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char *soap_decode(char*, size_t, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar soap_getchunkchar(struct soap*);
+static const char *http_error(struct soap*, int);
+static int http_post(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
+static int http_get(struct soap*);
+static int http_send_header(struct soap*, const char*);
+static int http_post_header(struct soap*, const char*, const char*);
+static int http_response(struct soap*, int, size_t);
+static int http_parse(struct soap*);
+static int http_parse_header(struct soap*, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int fsend(struct soap*, const char*, size_t);
+static size_t frecv(struct soap*, char*, size_t);
+static int tcp_init(struct soap*);
+static const char *tcp_error(struct soap*);
+#ifndef WITH_IPV6
+static int tcp_gethost(struct soap*, const char *addr, struct in_addr *inaddr);
+#endif
+static int tcp_connect(struct soap*, const char *endpoint, const char *host, int port);
+static int tcp_accept(struct soap*, int, struct sockaddr*, int*);
+static int tcp_disconnect(struct soap*);
+static int tcp_closesocket(struct soap*, SOAP_SOCKET);
+static int tcp_shutdownsocket(struct soap*, SOAP_SOCKET, int);
+static const char *soap_strerror(struct soap*);
+#endif
+#endif
+
+#if defined(PALM) && !defined(PALM_2)
+unsigned short errno;
+#endif
+
+#ifndef PALM_1
+static const char soap_env1[42] = "http://schemas.xmlsoap.org/soap/envelope/";
+static const char soap_enc1[42] = "http://schemas.xmlsoap.org/soap/encoding/";
+static const char soap_env2[40] = "http://www.w3.org/2003/05/soap-envelope";
+static const char soap_enc2[40] = "http://www.w3.org/2003/05/soap-encoding";
+static const char soap_rpc[35] = "http://www.w3.org/2003/05/soap-rpc";
+#endif
+
+#ifndef PALM_1
+const struct soap_double_nan soap_double_nan = {0xFFFFFFFF, 0xFFFFFFFF};
+static const char soap_base64o[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+static const char soap_base64i[81] = "\76XXX\77\64\65\66\67\70\71\72\73\74\75XXXXXXX\00\01\02\03\04\05\06\07\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31XXXXXX\32\33\34\35\36\37\40\41\42\43\44\45\46\47\50\51\52\53\54\55\56\57\60\61\62\63";
+#endif
+
+#ifndef WITH_LEAN
+static const char soap_indent[11] = "\n\t\t\t\t\t\t\t\t\t";
+/* Alternative indentation form for SOAP_XML_INDENT:
+static const char soap_indent[21] = "\n                   ";
+*/
+#endif
+
+static const char soap_padding[4] = "\0\0\0";
+#define SOAP_STR_PADDING (soap_padding)
+#define SOAP_STR_EOS (soap_padding)
+#define SOAP_NON_NULL (soap_padding)
+
+#ifndef WITH_LEAN
+static const struct soap_code_map html_entity_codes[] = /* entities for XHTML parsing */
+{ { 160, "nbsp" },
+  { 161, "iexcl" },
+  { 162, "cent" },
+  { 163, "pound" },
+  { 164, "curren" },
+  { 165, "yen" },
+  { 166, "brvbar" },
+  { 167, "sect" },
+  { 168, "uml" },
+  { 169, "copy" },
+  { 170, "ordf" },
+  { 171, "laquo" },
+  { 172, "not" },
+  { 173, "shy" },
+  { 174, "reg" },
+  { 175, "macr" },
+  { 176, "deg" },
+  { 177, "plusmn" },
+  { 178, "sup2" },
+  { 179, "sup3" },
+  { 180, "acute" },
+  { 181, "micro" },
+  { 182, "para" },
+  { 183, "middot" },
+  { 184, "cedil" },
+  { 185, "sup1" },
+  { 186, "ordm" },
+  { 187, "raquo" },
+  { 188, "frac14" },
+  { 189, "frac12" },
+  { 190, "frac34" },
+  { 191, "iquest" },
+  { 192, "Agrave" },
+  { 193, "Aacute" },
+  { 194, "Acirc" },
+  { 195, "Atilde" },
+  { 196, "Auml" },
+  { 197, "Aring" },
+  { 198, "AElig" },
+  { 199, "Ccedil" },
+  { 200, "Egrave" },
+  { 201, "Eacute" },
+  { 202, "Ecirc" },
+  { 203, "Euml" },
+  { 204, "Igrave" },
+  { 205, "Iacute" },
+  { 206, "Icirc" },
+  { 207, "Iuml" },
+  { 208, "ETH" },
+  { 209, "Ntilde" },
+  { 210, "Ograve" },
+  { 211, "Oacute" },
+  { 212, "Ocirc" },
+  { 213, "Otilde" },
+  { 214, "Ouml" },
+  { 215, "times" },
+  { 216, "Oslash" },
+  { 217, "Ugrave" },
+  { 218, "Uacute" },
+  { 219, "Ucirc" },
+  { 220, "Uuml" },
+  { 221, "Yacute" },
+  { 222, "THORN" },
+  { 223, "szlig" },
+  { 224, "agrave" },
+  { 225, "aacute" },
+  { 226, "acirc" },
+  { 227, "atilde" },
+  { 228, "auml" },
+  { 229, "aring" },
+  { 230, "aelig" },
+  { 231, "ccedil" },
+  { 232, "egrave" },
+  { 233, "eacute" },
+  { 234, "ecirc" },
+  { 235, "euml" },
+  { 236, "igrave" },
+  { 237, "iacute" },
+  { 238, "icirc" },
+  { 239, "iuml" },
+  { 240, "eth" },
+  { 241, "ntilde" },
+  { 242, "ograve" },
+  { 243, "oacute" },
+  { 244, "ocirc" },
+  { 245, "otilde" },
+  { 246, "ouml" },
+  { 247, "divide" },
+  { 248, "oslash" },
+  { 249, "ugrave" },
+  { 250, "uacute" },
+  { 251, "ucirc" },
+  { 252, "uuml" },
+  { 253, "yacute" },
+  { 254, "thorn" },
+  { 255, "yuml" },
+  {   0, NULL }
+};
+#endif
+
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+static const struct soap_code_map h_error_codes[] =
+{
+#ifdef HOST_NOT_FOUND   
+  { HOST_NOT_FOUND, "Host not found" },
+#endif
+#ifdef TRY_AGAIN
+  { TRY_AGAIN, "Try Again" },
+#endif
+#ifdef NO_RECOVERY  
+  { NO_RECOVERY, "No Recovery" },
+#endif
+#ifdef NO_DATA
+  { NO_DATA, "No Data" },
+#endif
+#ifdef NO_ADDRESS
+  { NO_ADDRESS, "No Address" },
+#endif
+  { 0, NULL }
+};
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+static const struct soap_code_map h_http_error_codes[] =
+{ { 201, "Created" },
+  { 202, "Accepted" },
+  { 203, "Non-Authoritative Information" },
+  { 204, "No Content" },
+  { 205, "Reset Content" },
+  { 206, "Partial Content" },
+  { 300, "Multiple Choices" },
+  { 301, "Moved Permanently" },
+  { 302, "Found" },
+  { 303, "See Other" },
+  { 304, "Not Modified" },
+  { 305, "Use Proxy" },
+  { 307, "Temporary Redirect" },
+  { 400, "Bad Request" },
+  { 401, "Unauthorized" },
+  { 402, "Payment Required" },
+  { 403, "Forbidden" },
+  { 404, "Not Found" },
+  { 405, "Method Not Allowed" },
+  { 406, "Not Acceptable" },
+  { 407, "Proxy Authentication Required" },
+  { 408, "Request Time-out" },
+  { 409, "Conflict" },
+  { 410, "Gone" },
+  { 411, "Length Required" },
+  { 412, "Precondition Failed" },
+  { 413, "Request Entity Too Large" },
+  { 414, "Request-URI Too Large" },
+  { 415, "Unsupported Media Type" },
+  { 416, "Requested range not satisfiable" },
+  { 417, "Expectation Failed" },
+  { 500, "Internal Server Error" },
+  { 501, "Not Implemented" },
+  { 502, "Bad Gateway" },
+  { 503, "Service Unavailable" },
+  { 504, "Gateway Time-out" },
+  { 505, "HTTP Version not supported" },
+  {   0, NULL }
+};
+#endif
+#endif
+
+#ifdef WITH_OPENSSL
+static const struct soap_code_map h_ssl_error_codes[] =
+{
+#define _SSL_ERROR(e) { e, #e }
+  _SSL_ERROR(SSL_ERROR_SSL),
+  _SSL_ERROR(SSL_ERROR_ZERO_RETURN),
+  _SSL_ERROR(SSL_ERROR_WANT_READ),
+  _SSL_ERROR(SSL_ERROR_WANT_WRITE),
+  _SSL_ERROR(SSL_ERROR_WANT_CONNECT),
+  _SSL_ERROR(SSL_ERROR_WANT_X509_LOOKUP),
+  _SSL_ERROR(SSL_ERROR_SYSCALL),
+  { 0, NULL }
+};
+#endif
+
+#ifndef WITH_LEANER
+static const struct soap_code_map mime_codes[] =
+{ { SOAP_MIME_7BIT,		"7bit" },
+  { SOAP_MIME_8BIT,		"8bit" },
+  { SOAP_MIME_BINARY,		"binary" },
+  { SOAP_MIME_QUOTED_PRINTABLE, "quoted-printable" },
+  { SOAP_MIME_BASE64,		"base64" },
+  { SOAP_MIME_IETF_TOKEN,	"ietf-token" },
+  { SOAP_MIME_X_TOKEN,		"x-token" },
+  { 0,				NULL }
+};
+#endif
+
+#ifdef WIN32
+static int tcp_done = 0;
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+fsend(struct soap *soap, const char *s, size_t n)
+{ register int nwritten;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  if (soap->os)
+  { soap->os->write(s, n);
+    if (soap->os->good())
+      return SOAP_OK;
+    return SOAP_EOF;
+  }
+#endif
+  while (n)
+  { if (soap_valid_socket(soap->socket))
+    { 
+#ifndef WITH_LEAN
+      if (soap->send_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->send_timeout > 0)
+        { timeout.tv_sec = soap->send_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->send_timeout/1000000;
+          timeout.tv_usec = -soap->send_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { register int r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            return SOAP_EOF;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+          { soap->errnum = soap_socket_errno;
+            return SOAP_EOF;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+        nwritten = SSL_write(soap->ssl, s, n);
+      else if (soap->bio)
+        nwritten = BIO_write(soap->bio, s, n);
+      else
+#endif
+#ifdef WITH_UDP
+      if ((soap->omode & SOAP_IO_UDP))
+      { if (soap->peerlen)
+	  nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+        else
+	  nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	/* retry and back-off algorithm */
+	/* TODO: this is not very clear from specs so verify and limit conditions under which we should loop (e.g. ENOBUFS) */
+	if (nwritten < 0)
+        { struct timeval timeout;
+          fd_set fd;
+	  int udp_repeat;
+	  int udp_delay;
+          if ((soap->connect_flags & SO_BROADCAST))
+	    udp_repeat = 3; /* SOAP-over-UDP MULTICAST_UDP_REPEAT - 1 */
+          else
+	    udp_repeat = 1; /* SOAP-over-UDP UNICAST_UDP_REPEAT - 1 */
+	  udp_delay = (soap_random % 201) + 50; /* UDP_MIN_DELAY .. UDP_MAX_DELAY */
+	  do
+          { timeout.tv_sec = 0;
+            timeout.tv_usec = 1000 * udp_delay; /* ms */
+            FD_ZERO(&fd);
+            FD_SET((SOAP_SOCKET)soap->socket, &fd);
+            select((SOAP_SOCKET)(soap->socket + 1), NULL, NULL, &fd, &timeout);
+	    if (soap->peerlen)
+	      nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+            else
+	      nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	    udp_delay <<= 1;
+	    if (udp_delay > 500) /* UDP_UPPER_DELAY */
+	      udp_delay = 500;
+	  }
+	  while (nwritten < 0 && --udp_repeat > 0);
+	}
+      }
+      else
+#endif
+#if !defined(PALM) && !defined(AS400)
+        nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+#else
+        nwritten = send((SOAP_SOCKET)soap->socket, (void*)s, n, soap->socket_flags);
+#endif
+      if (nwritten <= 0)
+      {
+#ifdef WITH_OPENSSL
+	int err;
+        if (soap->ssl && (err = SSL_get_error(soap->ssl, nwritten)) != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return SOAP_EOF;
+#endif
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EWOULDBLOCK && soap_socket_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_socket_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    else
+    {
+#ifdef WITH_FASTCGI
+      nwritten = fwrite((void*)s, 1, n, stdout);
+      fflush(stdout);
+#else
+#ifdef UNDER_CE
+      nwritten = fwrite(s, 1, n, soap->sendfd);
+#else
+#ifdef VXWORKS
+#ifdef WMW_RPM_IO
+      if (soap->rpmreqid)
+        nwritten = (httpBlockPut(soap->rpmreqid, s, n) == 0) ? n : -1; 
+      else
+#endif
+        nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w"));
+#else
+      nwritten = write((SOAP_SOCKET)soap->sendfd, s, n);
+#endif
+#endif
+#endif
+      if (nwritten <= 0)
+      { if (soap_errno != SOAP_EINTR && soap_errno != SOAP_EWOULDBLOCK && soap_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    n -= nwritten;
+    s += nwritten;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_raw(struct soap *soap, const char *s, size_t n)
+{ if (!n)
+    return SOAP_OK;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { soap->count += n;
+#ifndef WITH_LEANER
+    if (soap->fpreparesend && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+  if (soap->mode & SOAP_IO)
+  { register size_t i = SOAP_BUFLEN - soap->bufidx;
+    while (n >= i)
+    { memcpy(soap->buf + soap->bufidx, s, i);
+      soap->bufidx = SOAP_BUFLEN;
+      if (soap_flush(soap))
+        return soap->error;
+      s += i;
+      n -= i;
+      i = SOAP_BUFLEN;
+    }
+    memcpy(soap->buf + soap->bufidx, s, n);
+    soap->bufidx += n;
+    return SOAP_OK;
+  }
+  return soap_flush_raw(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush(struct soap *soap)
+{ register int n = soap->bufidx;
+  if (n)
+  { soap->bufidx = 0;
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { soap->d_stream.next_in = (Byte*)soap->buf;
+      soap->d_stream.avail_in = (unsigned int)n;
+#ifdef WITH_GZIP
+      soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)n);
+#endif
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating %u bytes\n", soap->d_stream.avail_in));
+        if (deflate(&soap->d_stream, Z_NO_FLUSH) != Z_OK)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+          return soap->error = SOAP_ZLIB_ERROR;
+        }
+        if (!soap->d_stream.avail_out)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN))
+            return soap->error;
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (soap->d_stream.avail_in);
+    }
+    else
+#endif
+      return soap_flush_raw(soap, soap->buf, n);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush_raw(struct soap *soap, const char *s, size_t n)
+{ if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+  { register char *t;
+    if (!(t = (char*)soap_push_block(soap, n)))
+      return soap->error = SOAP_EOM;
+    memcpy(t, s, n);
+#ifndef WITH_LEANER
+    if (soap->fpreparesend)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+  { char t[16];
+    sprintf(t, "\r\n%lX\r\n" + (soap->chunksize ? 0 : 2), (unsigned long)n);
+    DBGMSG(SENT, t, strlen(t));
+    if ((soap->error = soap->fsend(soap, t, strlen(t))))
+      return soap->error;
+    soap->chunksize += n;
+  }
+  DBGMSG(SENT, s, n);
+#endif
+  return soap->error = soap->fsend(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send(struct soap *soap, const char *s)
+{ if (s)
+    return soap_send_raw(soap, s, strlen(s));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send2(struct soap *soap, const char *s1, const char *s2)
+{ if (soap_send(soap, s1))
+    return soap->error;
+  return soap_send(soap, s2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send3(struct soap *soap, const char *s1, const char *s2, const char *s3)
+{ if (soap_send(soap, s1)
+   || soap_send(soap, s2))
+    return soap->error;
+  return soap_send(soap, s3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static size_t
+frecv(struct soap *soap, char *s, size_t n)
+{ register int r;
+  soap->errnum = 0;
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+  if (soap->is)
+  { if (soap->is->good())
+      return soap->is->read(s, n).gcount();
+    return 0;
+  }
+#endif
+  if (soap_valid_socket(soap->socket))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->recv_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->recv_timeout > 0)
+        { timeout.tv_sec = soap->recv_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->recv_timeout/1000000;
+          timeout.tv_usec = -soap->recv_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+	  { soap->errnum = 0;
+            return 0;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+	  { soap->errnum = soap_socket_errno;
+            return 0;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+      { int err;
+	r = SSL_read(soap->ssl, s, n);
+        if (r > 0)
+          return (size_t)r;
+	err = SSL_get_error(soap->ssl, r);
+	if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return 0;
+      }
+      else if (soap->bio)
+      { r = BIO_read(soap->bio, s, n);
+        if (r > 0)
+          return (size_t)r;
+        return 0;
+      }
+      else
+#endif
+      { 
+#ifdef WITH_UDP
+        if ((soap->omode & SOAP_IO_UDP))
+        { SOAP_SOCKLEN_T k = (SOAP_SOCKLEN_T)sizeof(soap->peer);
+	  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+          r = recvfrom((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, &k);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+	  soap->peerlen = (size_t)k;
+#ifndef WITH_IPV6
+          soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+          soap->port = (int)ntohs(soap->peer.sin_port);
+#endif
+        }
+	else
+#endif
+          r = recv((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+        if (r >= 0)
+          return (size_t)r;
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN && soap_socket_errno != SOAP_EWOULDBLOCK)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#ifndef WITH_LEAN
+      { struct timeval timeout;
+        fd_set fd;
+        timeout.tv_sec = 0;
+        timeout.tv_usec = 10000;
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+#ifdef WITH_OPENSSL
+        if (soap->ssl && SSL_get_error(soap->ssl, r) == SSL_ERROR_WANT_WRITE)
+          r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+        else
+          r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#else
+        r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#endif
+        if (r < 0 && soap_socket_errno != SOAP_EINTR)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#endif
+    }
+  }
+#ifdef WITH_FASTCGI
+  return fread(s, 1, n, stdin);
+#else
+#ifdef UNDER_CE
+  return fread(s, 1, n, soap->recvfd);
+#else
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    r = httpBlockRead(soap->rpmreqid, s, n);
+  else
+#endif
+  r = read((SOAP_SOCKET)soap->recvfd, s, n);
+  if (r >= 0)
+    return (size_t)r;
+  soap->errnum = soap_errno;
+  return 0;
+#endif
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar
+soap_getchunkchar(struct soap *soap)
+{ if (soap->bufidx < soap->buflen)
+    return soap->buf[soap->bufidx++];
+  soap->bufidx = 0;
+  soap->buflen = soap->chunkbuflen = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)soap->buflen, soap->socket));
+  DBGMSG(RECV, soap->buf, soap->buflen);
+  if (soap->buflen)
+    return soap->buf[soap->bufidx++];
+  return EOF;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+soap_isxdigit(int c)
+{ return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f');
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_raw(struct soap *soap)
+{ register size_t ret;
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { if (soap->d_stream.next_out == Z_NULL)
+      return EOF;
+    if (soap->d_stream.avail_in || !soap->d_stream.avail_out)
+    { register int r;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflating\n"));
+      soap->d_stream.next_out = (Byte*)soap->buf;
+      soap->d_stream.avail_out = SOAP_BUFLEN;
+      r = inflate(&soap->d_stream, Z_NO_FLUSH);
+      if (r == Z_OK || r == Z_STREAM_END)
+      { soap->bufidx = 0;
+        soap->buflen = SOAP_BUFLEN - soap->d_stream.avail_out;
+        if (soap->zlib_in == SOAP_ZLIB_GZIP)
+          soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+        if (r == Z_STREAM_END)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+          soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+          soap->d_stream.next_out = Z_NULL;
+        }
+        if (soap->buflen)
+        { soap->count += soap->buflen;
+          return SOAP_OK;
+        }
+      }
+      else if (r != Z_BUF_ERROR)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate error: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        soap->d_stream.next_out = Z_NULL;
+	soap->error = SOAP_ZLIB_ERROR;
+        return EOF;
+      }
+    }
+zlib_again:
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK && !soap->chunksize)
+    { memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+      soap->buflen = soap->z_buflen;
+    }
+  }
+#endif
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) /* read HTTP chunked transfer */
+  { 
+chunk_again:
+    if (soap->chunksize)
+    { soap->buflen = ret = soap->frecv(soap, soap->buf, soap->chunksize > SOAP_BUFLEN ? SOAP_BUFLEN : soap->chunksize);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk: read %u bytes\n", (unsigned int)ret));
+      DBGMSG(RECV, soap->buf, ret);
+      soap->bufidx = 0;
+      soap->chunksize -= ret;
+    }
+    else
+    { register soap_wchar c;
+      char *t, tmp[8];
+      t = tmp;
+      if (!soap->chunkbuflen)
+      { soap->chunkbuflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes (chunked) from socket %d\n", (unsigned int)ret, soap->socket));
+        DBGMSG(RECV, soap->buf, ret);
+        soap->bufidx = 0;
+        if (!ret)
+          return soap->ahead = EOF;
+      }
+      else
+        soap->bufidx = soap->buflen;
+      soap->buflen = soap->chunkbuflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk size (idx=%u len=%u)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen));
+      while (!soap_isxdigit((int)(c = soap_getchunkchar(soap))))
+        if ((int)c == EOF)
+	  return soap->ahead = EOF;
+      do
+        *t++ = (char)c;
+      while (soap_isxdigit((int)(c = soap_getchunkchar(soap))) && t - tmp < 7);
+      while ((int)c != EOF && c != '\n')
+        c = soap_getchunkchar(soap);
+      if ((int)c == EOF)
+        return soap->ahead = EOF;
+      *t = '\0';
+      soap->chunksize = soap_strtoul(tmp, &t, 16);
+      if (!soap->chunksize)
+      { soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of chunked message\n"));
+	while ((int)c != EOF && c != '\n')
+          c = soap_getchunkchar(soap);
+        return soap->ahead = EOF;
+      }
+      soap->buflen = soap->bufidx + soap->chunksize;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving buf len to idx=%u len=%u (%s)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen, tmp));
+      if (soap->buflen > soap->chunkbuflen)
+      { soap->buflen = soap->chunkbuflen;
+        soap->chunksize -= soap->buflen - soap->bufidx;
+        soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Passed end of buffer for chunked HTTP (%u bytes left)\n", (unsigned int)(soap->buflen - soap->bufidx)));
+      }
+      else if (soap->chunkbuflen)
+        soap->chunksize = 0;
+      ret = soap->buflen - soap->bufidx;
+      if (!ret)
+        goto chunk_again;
+    }
+  }
+  else
+#endif
+  { soap->bufidx = 0;
+    soap->buflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)ret, soap->socket));
+    DBGMSG(RECV, soap->buf, ret);
+  }
+#ifndef WITH_LEANER
+  if (soap->fpreparerecv && (soap->error = soap->fpreparerecv(soap, soap->buf, ret)))
+    return soap->error;
+#endif
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { register int r;
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = (unsigned int)ret;
+    soap->d_stream.next_out = (Byte*)soap->buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    r = inflate(&soap->d_stream, Z_NO_FLUSH);
+    if (r == Z_OK || r == Z_STREAM_END)
+    { soap->bufidx = 0;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = ret = SOAP_BUFLEN - soap->d_stream.avail_out;
+      if (soap->zlib_in == SOAP_ZLIB_GZIP)
+        soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %u bytes\n", (unsigned int)ret));
+      if (!ret)
+        goto zlib_again;
+      if (r == Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+        soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+        soap->d_stream.next_out = Z_NULL;
+      }
+    }
+    else
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to inflate: (%d) %s\n", r, soap->d_stream.msg?soap->d_stream.msg:""));
+      soap->d_stream.next_out = Z_NULL;
+      soap->error = SOAP_ZLIB_ERROR;
+      return EOF;
+    }
+  }
+#endif
+  soap->count += ret;
+  return !ret;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap->dime.buflen)
+    { char *s;
+      int i;
+      unsigned char tmp[12];
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME hdr for chunked DIME is in buffer\n"));
+      soap->count += soap->dime.buflen - soap->buflen;
+      soap->buflen = soap->dime.buflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Skip padding (%ld bytes)\n", -(long)soap->dime.size&3));
+      for (i = -(long)soap->dime.size&3; i > 0; i--)
+      { soap->bufidx++;
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME hdr for next chunk\n"));
+      s = (char*)tmp;
+      for (i = 12; i > 0; i--)
+      { *s++ = soap->buf[soap->bufidx++];
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      soap->dime.flags = tmp[0] & 0x7;
+      soap->dime.size = ((size_t)tmp[8] << 24) | ((size_t)tmp[9] << 16) | ((size_t)tmp[10] << 8) | ((size_t)tmp[11]);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME chunk (%u bytes)\n", (unsigned int)soap->dime.size));
+      if (soap->dime.flags & SOAP_DIME_CF)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "More chunking\n"));
+        soap->dime.chunksize = soap->dime.size;
+        if (soap->buflen - soap->bufidx >= soap->dime.size)
+        { soap->dime.buflen = soap->buflen;
+          soap->buflen = soap->bufidx + soap->dime.chunksize;
+        }
+        else
+          soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      }
+      else
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Last chunk\n"));
+        soap->dime.buflen = 0;
+        soap->dime.chunksize = 0;
+      }
+      soap->count = soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%u bytes remaining\n", (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+    if (soap->dime.chunksize)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get next DIME hdr for chunked DIME (%u bytes chunk)\n", (unsigned int)soap->dime.chunksize));
+      if (soap_recv_raw(soap))
+        return EOF;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->count -= soap->buflen - soap->bufidx - soap->dime.chunksize;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%lu bytes remaining, count=%u\n", (unsigned long)(soap->buflen-soap->bufidx), (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+  }
+#endif
+  return soap_recv_raw(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getchar(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+    return c;
+  }
+  return soap_get1(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const struct soap_code_map*
+SOAP_FMAC2
+soap_code(const struct soap_code_map *map, const char *str)
+{ if (str)
+  { while (map->string)
+    { if (!strcmp(str, map->string)) /* case sensitive */
+        return map;
+      map++;
+    }
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_int_code(const struct soap_code_map *map, const char *str, long other)
+{ while (map->string)
+  { if (!soap_tag_cmp(str, map->string)) /* case insensitive */
+      return map->code;
+    map++;
+  }
+  return other;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_str_code(const struct soap_code_map *map, long code)
+{ while (map->code != code && map->string)
+    map++;
+  return map->string;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_char(struct soap *soap)
+{ char tmp[8];
+  register int i;
+  register soap_wchar c;
+  register char *s = tmp;
+  for (i = 0; i < 7; i++)
+  { c = soap_get1(soap);
+    if (c == ';' || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+  }
+  *s = '\0';
+  if (*tmp == '#')
+  { if (tmp[1] == 'x' || tmp[1] == 'X')
+      return soap_strtol(tmp + 2, NULL, 16);
+    return atol(tmp + 1);
+  }
+  if (!strcmp(tmp, "lt"))
+    return '<';
+  if (!strcmp(tmp, "gt"))
+    return '>';
+  if (!strcmp(tmp, "amp"))
+    return '&';
+  if (!strcmp(tmp, "quot"))
+    return '"';
+  if (!strcmp(tmp, "apos"))
+    return '\'';
+#ifndef WITH_LEAN
+  return (soap_wchar)soap_int_code(html_entity_codes, tmp, SOAP_UNKNOWN_CHAR);
+#else
+  return SOAP_UNKNOWN_CHAR; /* use this to represent unknown code */
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get0(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx];
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get1(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx++];
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_get(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+  }
+  else
+    c = soap_get1(soap);
+  for (;;)
+  { if (soap->cdata)
+    { if (c == ']')
+      { c = soap_get1(soap);
+        if (c == ']')
+        { soap->cdata = 0;
+          soap_get1(soap); /* skip > */
+          c = soap_get1(soap);
+        }
+	else
+        { soap_revget1(soap);
+          return ']';
+        }
+      }
+      else
+        return c;
+    }
+    switch (c)
+    { case '<':
+        do c = soap_get1(soap);
+        while (soap_blank(c));
+        if (c == '!' || c == '?' || c == '%')
+        { register int k = 1;
+	  if (c == '!')
+          { c = soap_get1(soap);
+            if (c == '[')
+            { do c = soap_get1(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                break;
+              soap->cdata = 1;
+              c = soap_get1(soap);
+	      continue;
+            }
+            if (c == '-' && (c = soap_get1(soap)) == '-')
+            { do
+              { c = soap_get1(soap);
+                if (c == '-' && (c = soap_get1(soap)) == '-')
+                  break;
+              } while ((int)c != EOF);
+            }
+          }
+	  else if (c == '?')
+            c = soap_get_pi(soap);
+          while ((int)c != EOF)
+          { if (c == '<')
+	      k++;
+	    else if (c == '>')
+	    { if (--k <= 0)
+	        break;
+	    }
+	    c = soap_get1(soap);
+	  }
+	  if ((int)c == EOF)
+	    break;
+          c = soap_get1(soap);
+          continue;
+        }
+        if (c == '/')
+          return SOAP_TT;
+        soap_revget1(soap);
+        return SOAP_LT;
+      case '>':
+        return SOAP_GT;
+      case '"':
+        return SOAP_QT;
+      case '\'':
+        return SOAP_AP;
+      case '&':
+        return soap_char(soap) | 0x80000000;
+    }
+    break;
+  }
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_get_pi(struct soap *soap)
+{ char buf[64];
+  register char *s = buf;
+  register int i = sizeof(buf);
+  register soap_wchar c = soap_getchar(soap);
+  /* This is a quick way to parse XML PI and we could use a callback instead to
+   * enable applications to intercept processing instructions */
+  while ((int)c != EOF && c != '?')
+  { if (--i > 0)
+    { if (soap_blank(c))
+        c = ' ';
+      *s++ = (char)c;
+    }
+    c = soap_getchar(soap);
+  }
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML PI <?%s?>\n", buf));
+  if (!strncmp(buf, "xml ", 4))
+  { s = strstr(buf, " encoding=");
+    if (s && s[10])
+    { if (!soap_tag_cmp(s + 11, "iso-8859-1*")
+       || !soap_tag_cmp(s + 11, "latin1*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to latin1 encoding\n"));
+        soap->mode |= SOAP_ENC_LATIN;
+      }
+      else if (!soap_tag_cmp(s + 11, "utf-8*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to utf-8 encoding\n"));
+        soap->mode &= ~SOAP_ENC_LATIN;
+      }
+    }
+  }
+  if ((int)c != EOF)
+    c = soap_getchar(soap);
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_move(struct soap *soap, long n)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving %ld bytes forward\n", (long)n));
+  for (; n > 0; n--)
+    if ((int)soap_getchar(soap) == EOF)
+      return SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_tell(struct soap *soap)
+{ return soap->count - soap->buflen + soap->bufidx - (soap->ahead != 0);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pututf8(struct soap *soap, register unsigned long c)
+{ char tmp[16];
+  if (c > 0 && c < 0x80)
+  { *tmp = (char)c;
+    return soap_send_raw(soap, tmp, 1);
+  }
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { register char *t = tmp;
+    if (c < 0x0800)
+      *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+    else
+    { if (c < 0x010000)
+        *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+      else
+      { if (c < 0x200000)
+          *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+        else
+        { if (c < 0x04000000)
+            *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+          else
+          { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+            *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+        }     
+        *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+      }
+      *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+    }
+    *t++ = (char)(0x80 | (c & 0x3F));
+    *t = '\0';
+  }
+  else
+#endif
+    sprintf(tmp, "&#%lu;", c);
+  return soap_send(soap, tmp);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getutf8(struct soap *soap)
+{ register soap_wchar c, c1, c2, c3, c4;
+  c = soap->ahead;
+  if (c > 0xFF)
+  { soap->ahead = 0;
+    return c;
+  }
+again:
+  c = soap_get(soap);
+  if (c < 0x80 || (soap->mode & SOAP_ENC_LATIN))
+    return c;
+  c1 = soap_get1(soap);
+  if (c1 < 0x80)
+  { soap_revget1(soap); /* doesn't look like this is UTF8 */
+    return c;
+  }
+  c1 &= 0x3F;
+  if (c < 0xE0)
+    return ((soap_wchar)(c & 0x1F) << 6) | c1;
+  c2 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c == 0xEF && c1 == 0x3B && c2 == 0x3F)	/* ignore UTF-8 BOM */
+    goto again;
+  if (c < 0xF0)
+    return ((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2;
+  c3 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xF8)
+    return ((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3;
+  c4 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xFC)
+    return ((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4;
+  return ((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(soap_get1(soap) & 0x3F);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthex(struct soap *soap, const unsigned char *s, int n)
+{ char d[2];
+  register int i;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2hex(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (i = 0; i < n; i++)
+  { register int m = *s++;
+    d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0'));
+    m &= 0x0F;
+    d[1] = (char)(m + (m > 9 ? '7' : '0'));
+    if (soap_send_raw(soap, d, 2))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_gethex(struct soap *soap, int *n)
+{
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_hex2s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register char *s;
+    register int i, k;
+    if (soap_append_lab(soap, NULL, 0))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = soap->lablen;
+    for (i = 0; i < k; i++)
+    { register char d1, d2;
+      register soap_wchar c;
+      c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = (int)(soap->lablen - k + i);
+        p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	if (p)
+	  memcpy(p, soap->labbuf, soap->lablen - k + i);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, SOAP_BLKLEN);
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register char d1, d2;
+      register soap_wchar c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap_end_block(soap);
+	  soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = soap_size_block(soap, i);
+        p = (unsigned char*)soap_save_block(soap, NULL, 0);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putbase64(struct soap *soap, const unsigned char *s, int n)
+{ register int i;
+  register unsigned long m;
+  char d[4];
+  if (!s)
+    return SOAP_OK;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2base64(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      d[i] = '=';
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_getbase64(struct soap *soap, int *n, int malloc_flag)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_base642s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register int i, k;
+    register char *s;
+    if (soap_append_lab(soap, NULL, 2))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = 3 * (soap->lablen / 3);
+    if (!s)
+      return NULL;
+    for (i = 0; i < k - 2; i += 3)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+            *n = (int)(soap->lablen - k + i);
+          p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	  if (p)
+	    memcpy(p, soap->labbuf, soap->lablen - k + i);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, 3 * SOAP_BLKLEN); /* must be multiple of 3 */
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          i *= 3;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n = (int)soap_size_block(soap, i);
+          p = (unsigned char*)soap_save_block(soap, NULL, 0);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_xop_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ /* Check MTOM xop:Include element (within hex/base64Binary) */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  int body = soap->body; /* should save type too? */
+  if (!soap_peek_element(soap))
+  { if (!soap_element_begin_in(soap, "xop:Include", 0) && *soap->href)
+    { if (soap_dime_forward(soap, ptr, size, id, type, options))
+        return soap->error;
+    }
+    if (soap->body && soap_element_end_in(soap, NULL))
+      return soap->error;
+  }
+  soap->body = body;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_dime_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ struct soap_xlist *xp = (struct soap_xlist*)SOAP_MALLOC(soap, sizeof(struct soap_xlist));
+  *ptr = NULL;
+  *size = 0;
+  *id = soap_strdup(soap, soap->href);
+  *type = NULL;
+  *options = NULL;
+  if (!xp)
+    return soap->error = SOAP_EOM;
+  xp->next = soap->xlist;
+  xp->ptr = ptr;
+  xp->size = size;
+  xp->id = *id;
+  xp->type = type;
+  xp->options = options;
+  soap->xlist = xp;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_strdup(struct soap *soap, const char *s)
+{ char *t = NULL;
+  if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1)))
+    strcpy(t, s);
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_new_block(struct soap *soap)
+{ struct soap_blist *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New block sequence (prev=%p)\n", soap->blist));
+  if (!(p = (struct soap_blist*)SOAP_MALLOC(soap, sizeof(struct soap_blist))))
+    return SOAP_EOM;   
+  p->next = soap->blist; 
+  p->ptr = NULL;
+  p->size = 0;
+  soap->blist = p;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_push_block(struct soap *soap, size_t n)
+{ char *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block of %u bytes (%u bytes total)\n", (unsigned int)n, (unsigned int)soap->blist->size + (unsigned int)n));
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(char*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  *(char**)p = soap->blist->ptr;
+  *(size_t*)(p + sizeof(char*)) = n;
+  soap->blist->ptr = p;
+  soap->blist->size += n;
+  return p + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_block(struct soap *soap)
+{ char *p;
+  if (!soap->blist->ptr)
+    return;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block\n"));
+  p = soap->blist->ptr;
+  soap->blist->size -= *(size_t*)(p + sizeof(char*));
+  soap->blist->ptr = *(char**)p;
+  SOAP_FREE(soap, p);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_update_ptrs(struct soap *soap, char *start, char *end, char *p1, char *p2)
+{ int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+#ifndef WITH_LEANER
+  register struct soap_xlist *xp;
+#endif
+  register void *p, **q;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr && (char*)ip->ptr >= start && (char*)ip->ptr < end)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", ip->id, ip->ptr, (char*)ip->ptr + (p1-p2)));
+        ip->ptr = (char*)ip->ptr + (p1-p2);
+      }
+      for (q = &ip->link; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Link update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (q = &ip->copy; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy chain update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (fp = ip->flist; fp; fp = fp->next)
+      { if ((char*)fp->ptr >= start && (char*)fp->ptr < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy list update id='%s' %p\n", ip->id, fp));
+          fp->ptr = (char*)fp->ptr + (p1-p2);
+        }
+      }
+    }
+  }
+#ifndef WITH_LEANER
+  for (xp = soap->xlist; xp; xp = xp->next)
+  { if (xp->ptr && (char*)xp->ptr >= start && (char*)xp->ptr < end)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", xp->id?xp->id:"", xp->ptr, (char*)xp->ptr + (p1-p2)));
+      xp->ptr = (unsigned char**)((char*)xp->ptr + (p1-p2));
+      xp->size = (int*)((char*)xp->size + (p1-p2));
+      xp->type = (char**)((char*)xp->type + (p1-p2));
+      xp->options = (char**)((char*)xp->options + (p1-p2));
+    }
+  }
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static int
+soap_has_copies(struct soap *soap, register const char *start, register const char *end)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  register const char *p;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { for (p = (const char*)ip->copy; p; p = *(const char**)p)
+        if (p >= start && p < end)
+          return SOAP_ERR;
+      for (fp = ip->flist; fp; fp = fp->next)
+        if ((const char*)fp->ptr >= start && (const char*)fp->ptr < end)
+	  return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_resolve(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  short flag;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr)
+      { register void *p, **q, *r;
+        q = (void**)ip->link;
+        ip->link = NULL;
+        r = ip->ptr;
+        DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing link chain to resolve id='%s'\n", ip->id));
+        while (q)
+        { p = *q;
+          *q = r;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "... link %p -> %p\n", q, r));
+          q = (void**)p;
+        }
+      }
+      else if (*ip->id == '#')
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Missing data for id='%s'\n", ip->id));
+        strcpy(soap->id, ip->id + 1);
+        return soap->error = SOAP_MISSING_ID;
+      }
+    }
+  }
+  do
+  { flag = 0;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution phase\n"));
+    for (i = 0; i < SOAP_IDHASH; i++)
+    { for (ip = soap->iht[i]; ip; ip = ip->next)
+      { if (ip->ptr && !soap_has_copies(soap, (const char*)ip->ptr, (const char*)ip->ptr + ip->size))
+        { if (ip->copy)
+          { register void *p, **q = (void**)ip->copy;
+            DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing copy chain to resolve id='%s'\n", ip->id));
+            ip->copy = NULL;
+            do
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... copy %p -> %p (%u bytes)\n", ip->ptr, q, (unsigned int)ip->size));
+	      p = *q;
+              memcpy(q, ip->ptr, ip->size);
+              q = (void**)p;
+            } while (q);
+	    flag = 1;
+	  }
+          for (fp = ip->flist; fp; fp = ip->flist)
+          { register unsigned int k = fp->level;
+	    register void *p = ip->ptr;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data type=%d location=%p level=%u,%u id='%s'\n", ip->type, p, ip->level, fp->level, ip->id));
+	    while (ip->level < k)
+            { register void **q = (void**)soap_malloc(soap, sizeof(void*));  
+	      if (!q)
+	        return soap->error;
+	      *q = p;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level, new location=%p holds=%p...\n", q, *q));
+              p = (void*)q;
+              k--;
+            }
+	    if (fp->fcopy)
+	      fp->fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    else
+	      soap_fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    ip->flist = fp->next;
+	    SOAP_FREE(soap, fp);
+	    flag = 1;
+	  }
+        }
+      }
+    }
+  } while (flag);
+#ifdef SOAP_DEBUG
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->copy || ip->flist)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution error: forwarded data for id='%s' could not be propagated, please report this problem to the developers\n", ip->id));
+      }
+    }
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution done\n"));
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_size_block(struct soap *soap, size_t n)
+{ if (soap->blist->ptr)
+  { soap->blist->size -= *(size_t*)(soap->blist->ptr + sizeof(char*)) - n;
+    *(size_t*)(soap->blist->ptr + sizeof(char*)) = n;
+  }
+  return soap->blist->size;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_first_block(struct soap *soap)
+{ char *p, *q, *r;
+  p = soap->blist->ptr;
+  if (!p)
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "First block\n"));
+  r = NULL;
+  do
+  { q = *(char**)p;
+    *(char**)p = r;
+    r = p;
+    p = q;
+  } while (p);
+  soap->blist->ptr = r;
+  return r + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_next_block(struct soap *soap)
+{ char *p;
+  p = soap->blist->ptr;
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n"));
+    soap->blist->ptr = *(char**)p;
+    SOAP_FREE(soap, p);
+    if (soap->blist->ptr)
+      return soap->blist->ptr + sizeof(char*) + sizeof(size_t);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_block_size(struct soap *soap)
+{ return *(size_t*)(soap->blist->ptr + sizeof(char*));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end_block(struct soap *soap)
+{ struct soap_blist *bp;
+  char *p, *q;
+  bp = soap->blist;
+  if (bp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of block sequence, free all remaining blocks\n"));
+    for (p = bp->ptr; p; p = q)
+    { q = *(char**)p;
+      SOAP_FREE(soap, p);
+    }
+    soap->blist = bp->next;
+    SOAP_FREE(soap, bp);
+  }
+  DBGLOG(TEST, if (soap->blist) SOAP_MESSAGE(fdebug, "Restore previous block sequence\n"));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_save_block(struct soap *soap, char *p, int flag)
+{ register size_t n;
+  register char *q, *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Save all blocks in contiguous memory space of %u bytes (%p->%p)\n", (unsigned int)soap->blist->size, soap->blist->ptr, p));
+  if (soap->blist->size)
+  { if (!p)
+      p = (char*)soap_malloc(soap, soap->blist->size);
+    if (p)
+    { for (s = p, q = soap_first_block(soap); q; q = soap_next_block(soap))
+      { n = soap_block_size(soap);
+#ifndef WITH_NOIDREF
+        if (flag)
+	  soap_update_ptrs(soap, q, q + n, s, q);
+#endif
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy %u bytes from %p to %p\n", (unsigned int)n, q, s));
+        memcpy(s, q, n);
+        s += n;
+      }
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  soap_end_block(soap);
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsize(struct soap *soap, const char *type, int size)
+{ return soap_putsizes(soap, type, &size, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizes(struct soap *soap, const char *type, const int *size, int dim)
+{ return soap_putsizesoffsets(soap, type, size, NULL, dim);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim)
+{ int i;
+  if (!type)
+    return NULL;
+  if (soap->version == 2)
+  { sprintf(soap->type, "%s[%d", type, size[0]);
+    for (i = 1; i < dim; i++)
+      sprintf(soap->type + strlen(soap->type), " %d", size[i]);
+  }
+  else
+  { if (offset)
+    { sprintf(soap->type, "%s[%d", type, size[0] + offset[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i] + offset[i]);
+    }
+    else
+    { sprintf(soap->type, "%s[%d", type, size[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i]);
+    }
+    strcat(soap->type, "]");
+  }
+  return soap->type;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffset(struct soap *soap, int offset)
+{ return soap_putoffsets(soap, &offset, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffsets(struct soap *soap, const int *offset, int dim)
+{ register int i;
+  sprintf(soap->arrayOffset, "[%d", offset[0]);
+  for (i = 1; i < dim; i++)
+    sprintf(soap->arrayOffset + strlen(soap->arrayOffset), ",%d", offset[i]);
+  strcat(soap->arrayOffset, "]");
+  return soap->arrayOffset;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_size(const int *size, int dim)
+{ register int i, n = size[0];
+  for (i = 1; i < dim; i++)
+    n *= size[i];
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getoffsets(const char *attr, const int *size, int *offset, int dim)
+{ register int i, j = 0;
+  if (offset)
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += offset[i] = (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  else
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  return j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsize(const char *attr1, const char *attr2, int *j)
+{ register int n, k;
+  char *s;
+  *j = 0;
+  if (!*attr1)
+    return -1;
+  if (*attr1 == '[')
+    attr1++;
+  n = 1;
+  for (;;)
+  { k = (int)soap_strtol(attr1, &s, 10);
+    n *= k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE || s == attr1)
+      return -1;
+    attr1 = strchr(s, ',');
+    if (!attr1)
+      attr1 = strchr(s, ' ');
+    if (attr2 && *attr2)
+    { attr2++;
+      *j *= k;
+      k = (int)soap_strtol(attr2, &s, 10);
+      *j += k;
+      if (k < 0)
+        return -1;
+      attr2 = s;
+    }
+    if (!attr1)
+      break;
+    attr1++;
+  }
+  return n - *j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsizes(const char *attr, int *size, int dim)
+{ register int i, k, n;
+  if (!*attr)
+    return -1;
+  i = strlen(attr);
+  n = 1;
+  do
+  { for (i = i-1; i >= 0; i--)
+      if (attr[i] == '[' || attr[i] == ',' || attr[i] == ' ')
+        break;
+    k = (int)atol(attr + i + 1);
+    n *= size[--dim] = k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE)
+      return -1;
+  } while (i >= 0 && attr[i] != '[');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getposition(const char *attr, int *pos)
+{ register int i, n;
+  if (!*attr)
+    return -1;
+  n = 0;
+  i = 1;
+  do
+  { pos[n++] = (int)atol(attr + i);
+    while (attr[i] && attr[i] != ',' && attr[i] != ']')
+      i++;
+    if (attr[i] == ',')
+      i++;
+  } while (n < SOAP_MAXDIMS && attr[i] && attr[i] != ']');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_push_namespace(struct soap *soap, const char *id, const char *ns)
+{ register struct soap_nlist *np;
+  register struct Namespace *p;
+  register short i = -1;
+  register size_t n, k;
+  n = strlen(id);
+  k = strlen(ns) + 1;
+  p = soap->local_namespaces;
+  if (p)
+  { for (i = 0; p->id; p++, i++)
+    { if (p->ns && !strcmp(ns, p->ns))
+      { if (p->out)
+        { SOAP_FREE(soap, p->out);
+          p->out = NULL;
+        }
+        break;
+      }
+      if (p->out)
+      { if (!strcmp(ns, p->out))
+          break;
+      }
+      else if (p->in)
+      { if (!soap_tag_cmp(ns, p->in))
+        { if ((p->out = (char*)SOAP_MALLOC(soap, k)))
+            strcpy(p->out, ns);
+          break;
+        }
+      }
+    }
+    if (!p || !p->id)
+      i = -1;
+  }
+  if (i >= 0)
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k);
+  if (!np)
+    return soap->error = SOAP_EOM;
+  np->next = soap->nlist;
+  soap->nlist = np;
+  np->level = soap->level;
+  np->index = i;
+  strcpy(np->id, id);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns));
+  if (i < 0)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push NOT OK: no match found for '%s' in namespace mapping table (added to stack anyway)\n", ns));
+  }
+  else
+  { np->ns = NULL;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push OK ('%s' matches '%s' in namespace table)\n", id, p->id));
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_namespace(struct soap *soap)
+{ register struct soap_nlist *np;
+  while (soap->nlist && soap->nlist->level >= soap->level)
+  { np = soap->nlist->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Popped namespace binding (level=%u) '%s'\n", soap->level, soap->nlist->id));
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_namespace(struct soap *soap, const char *id1, const char *id2, int n1, int n2) 
+{ register struct soap_nlist *np = soap->nlist;
+  while (np && (strncmp(np->id, id1, n1) || np->id[n1]))
+    np = np->next;
+  if (np)
+  { if (np->index < 0
+     || (soap->local_namespaces[np->index].id
+      && (strncmp(soap->local_namespaces[np->index].id, id2, n2)
+       || soap->local_namespaces[np->index].id[n2])))
+      return SOAP_NAMESPACE;
+    return SOAP_OK;
+  }
+  if (n1 == 3 && n1 == n2 && !strcmp(id1, "xml") && !strcmp(id1, id2))
+    return SOAP_OK;
+  return SOAP_SYNTAX_ERROR; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_current_namespace(struct soap *soap, const char *tag)
+{ register struct soap_nlist *np;
+  register const char *s;
+  np = soap->nlist;
+  if (!(s = strchr(tag, ':')))
+  { while (np && *np->id) /* find default namespace, if present */
+      np = np->next;
+  }
+  else
+  { while (np && (strncmp(np->id, tag, s - tag) || np->id[s - tag]))
+      np = np->next;
+    if (!np)
+      soap->error = SOAP_NAMESPACE;
+  }
+  if (np)
+  { if (np->index >= 0)
+      return soap->namespaces[np->index].ns;
+    if (np->ns)
+      return soap_strdup(soap, np->ns);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_tag_cmp(const char *s, const char *t)
+{ for (;;)
+  { register int c1 = *s;
+    register int c2 = *t;
+    if (!c1 || c1 == '"')
+      break;
+    if (c2 != '-')
+    { if (c1 != c2)
+      { if (c1 >= 'A' && c1 <= 'Z')
+          c1 += 'a' - 'A';
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+      }
+      if (c1 != c2)
+      { if (c2 != '*')
+          return 1;
+	c2 = *++t;
+        if (!c2)
+	  return 0;
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+        for (;;)
+        { c1 = *s;
+	  if (!c1 || c1 == '"')
+	    break;
+	  if (c1 >= 'A' && c1 <= 'Z')
+            c1 += 'a' - 'A';
+          if (c1 == c2 && !soap_tag_cmp(s + 1, t + 1))
+            return 0;
+	  s++;
+        }
+        break;
+      }
+    }
+    s++;
+    t++;
+  }
+  if (*t == '*' && !t[1])
+    return 0;
+  return *t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_tag(struct soap *soap, const char *tag1, const char *tag2)
+{ register const char *s, *t;
+  if (!tag1 || !tag2 || !*tag2)
+    return SOAP_OK;
+  s = strchr(tag1, ':');
+  t = strchr(tag2, ':');
+  if (t)
+  { if (s)
+    { if (t[1] && SOAP_STRCMP(s + 1, t + 1))
+        return SOAP_TAG_MISMATCH;
+      if (t != tag2 && soap_match_namespace(soap, tag1, tag2, s - tag1, t - tag2))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+        return SOAP_TAG_MISMATCH;
+      }
+    } 
+    else if (SOAP_STRCMP(tag1, t + 1))
+      return SOAP_TAG_MISMATCH;
+    else if (t != tag2 && soap_match_namespace(soap, tag1, tag2, 0, t - tag2))
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+      return SOAP_TAG_MISMATCH;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags and (default) namespaces match: '%s' '%s'\n", tag1, tag2));
+    return SOAP_OK;
+  }
+  if (s)
+  { if (SOAP_STRCMP(s + 1, tag2))
+      return SOAP_TAG_MISMATCH;
+  }
+  else if (SOAP_STRCMP(tag1, tag2))
+    return SOAP_TAG_MISMATCH;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags match: '%s' '%s'\n", tag1, tag2));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_array(struct soap *soap, const char *type)
+{ if (*soap->arrayType)
+    if (soap_match_tag(soap, soap->arrayType, type)
+     && soap_match_tag(soap, soap->arrayType, "xsd:anyType")
+     && soap_match_tag(soap, soap->arrayType, "xsd:ur-type")
+    )
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array type mismatch: '%s' '%s'\n", soap->arrayType, type));
+      return SOAP_TAG_MISMATCH;
+    }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************\
+ *
+ *	SSL
+ *
+\******************************************************************************/
+
+#ifdef WITH_OPENSSL
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_rand()
+{ unsigned char buf[4];
+  if (!ssl_init_done)
+    soap_ssl_init();
+  RAND_pseudo_bytes(buf, 4);
+  return *(int*)buf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *dhfile, const char *randfile, const char *sid)
+{ int err;
+  soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  if (dhfile)
+  { soap->dhfile = dhfile;
+    soap->rsa = 0;
+  }
+  else
+  { soap->dhfile = NULL;
+    soap->rsa = 1;
+  }
+  soap->randfile = randfile;
+  soap->require_client_auth = (flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION);
+  if (!(err = soap->fsslauth(soap)))
+  { if (sid)
+      SSL_CTX_set_session_id_context(soap->ctx, (unsigned char*)sid, strlen(sid));
+  }
+  return err; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_client_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *randfile)
+{ soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  soap->dhfile = NULL;
+  soap->rsa = 0;
+  soap->randfile = randfile;
+  soap->require_server_auth = (flags & SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION);
+  return soap->fsslauth(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_ssl_init()
+{ /* Note: for MT systems, the main program MUST call soap_ssl_init() before any threads are started */
+  if (!ssl_init_done)
+  { ssl_init_done = 1;
+    SSL_library_init();
+#ifndef WITH_LEAN
+    SSL_load_error_strings();
+#endif
+    if (!RAND_load_file("/dev/urandom", 1024))
+    { char buf[1024];
+      RAND_seed(buf, sizeof(buf));
+      while (!RAND_status())
+      { int r = rand();
+        RAND_seed(&r, sizeof(int));
+      }
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static const char *
+ssl_error(struct soap *soap, int ret)
+{ int err = SSL_get_error(soap->ssl, ret);
+  const char *msg = soap_str_code(h_ssl_error_codes, err);
+  if (msg)
+    strcpy(soap->msgbuf, msg);
+  else
+    return ERR_error_string(err, soap->msgbuf);
+  if (ERR_peek_error())
+  { unsigned long r;
+    strcat(soap->msgbuf, "\n");
+    while ((r = ERR_get_error()))
+      ERR_error_string_n(r, soap->msgbuf + strlen(soap->msgbuf), sizeof(soap->msgbuf) - strlen(soap->msgbuf));
+  } 
+  else
+  { switch (ret)
+    { case 0:
+        strcpy(soap->msgbuf, "EOF was observed that violates the protocol. The client probably provided invalid authentication information.");
+        break;
+      case -1:
+        sprintf(soap->msgbuf, "Error observed by underlying BIO: %s", strerror(errno));  
+        break;
+    }
+  }
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_password(char *buf, int num, int rwflag, void *userdata)
+{ if (num < (int)strlen((char*)userdata) + 1)
+    return 0;
+  return strlen(strcpy(buf, (char*)userdata));
+}
+#endif
+
+/******************************************************************************/
+/* This callback is included for future references. It should not be deleted
+#ifndef PALM_2
+static DH *
+ssl_tmp_dh(SSL *ssl, int is_export, int keylength)
+{ static DH *dh512 = NULL;
+  static DH *dh1024 = NULL;
+  DH *dh;
+  switch (keylength)
+  { case 512:
+      if (!dh512)
+      { BIO *bio = BIO_new_file("dh512.pem", "r");
+        if (bio)
+        { dh512 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+          return dh512;
+        }
+      }
+      else
+        return dh512;
+    default:
+      if (!dh1024)
+      { BIO *bio = BIO_new_file("dh1024.pem", "r");
+        if (bio)
+        { dh1024 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+        }
+      }
+      dh = dh1024;
+  }
+  return dh;
+}
+#endif
+*/
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_auth_init(struct soap *soap)
+{ if (!ssl_init_done)
+    soap_ssl_init();
+  if (!soap->ctx)
+  { if (!(soap->ctx = SSL_CTX_new(SSLv23_method())))
+      return soap_set_receiver_error(soap, "SSL error", "Can't setup context", SOAP_SSL_ERROR);
+  }
+  if (soap->randfile)
+  { if (!RAND_load_file(soap->randfile, -1))
+      return soap_set_receiver_error(soap, "SSL error", "Can't load randomness", SOAP_SSL_ERROR);
+  }
+  if (soap->cafile || soap->capath)
+  { if (!SSL_CTX_load_verify_locations(soap->ctx, soap->cafile, soap->capath))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read CA file and directory", SOAP_SSL_ERROR);
+    if (soap->cafile && soap->require_client_auth)
+      SSL_CTX_set_client_CA_list(soap->ctx, SSL_load_client_CA_file(soap->cafile));
+  }
+  if (!SSL_CTX_set_default_verify_paths(soap->ctx))
+    return soap_set_receiver_error(soap, "SSL error", "Can't read default CA file and/or directory", SOAP_SSL_ERROR);
+/* See below */
+  if (soap->keyfile)
+  { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read certificate key file", SOAP_SSL_ERROR);
+    if (soap->password)
+    { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+      SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+    }
+    if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+  }
+/* Suggested alternative approach to check cafile first before the key file:
+  if (soap->password)
+  { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+    SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+  }
+  if (!soap->cafile || !SSL_CTX_use_certificate_chain_file(soap->ctx, soap->cafile))
+  { if (soap->keyfile)
+    { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read certificate or key file", SOAP_SSL_ERROR);
+      if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+    }
+  }
+*/
+  if (soap->rsa)
+  { RSA *rsa = RSA_generate_key(1024, RSA_F4, NULL, NULL);
+    if (!SSL_CTX_set_tmp_rsa(soap->ctx, rsa))
+    { if (rsa)
+        RSA_free(rsa);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set RSA key", SOAP_SSL_ERROR);
+    }
+    RSA_free(rsa);
+  }
+  else if (soap->dhfile)
+  { DH *dh = 0;
+    BIO *bio;
+    bio = BIO_new_file(soap->dhfile, "r");
+    if (!bio)
+      return soap_set_receiver_error(soap, "SSL error", "Can't read DH file", SOAP_SSL_ERROR);
+    dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+    BIO_free(bio);
+    if (SSL_CTX_set_tmp_dh(soap->ctx, dh) < 0)
+    { if (dh)
+        DH_free(dh);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set DH parameters", SOAP_SSL_ERROR);
+    }
+    DH_free(dh);
+  }
+  SSL_CTX_set_options(soap->ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2);
+  SSL_CTX_set_verify(soap->ctx, soap->require_client_auth ? (SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT) : soap->require_server_auth ? SSL_VERIFY_PEER : SSL_VERIFY_NONE, soap->fsslverify);
+#if (OPENSSL_VERSION_NUMBER < 0x00905100L)
+  SSL_CTX_set_verify_depth(soap->ctx, 1); 
+#else
+  SSL_CTX_set_verify_depth(soap->ctx, 9); 
+#endif  
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_verify_callback(int ok, X509_STORE_CTX *store)
+{
+#ifdef SOAP_DEBUG
+  if (!ok) 
+  { char data[256];
+    X509 *cert = X509_STORE_CTX_get_current_cert(store);
+    fprintf(stderr, "SSL verify error or warning with certificate at depth %d: %s\n", X509_STORE_CTX_get_error_depth(store), X509_verify_cert_error_string(X509_STORE_CTX_get_error(store)));
+    X509_NAME_oneline(X509_get_issuer_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate issuer %s\n", data);
+    X509_NAME_oneline(X509_get_subject_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate subject %s\n", data);
+  }
+#endif
+  /* Note: return 1 to continue, but unsafe progress will be terminated by SSL */
+  return ok;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_accept(struct soap *soap)
+{ BIO *bio;
+  int i, r;
+  if (!soap_valid_socket(soap->socket))
+    return soap_set_receiver_error(soap, "SSL error", "No socket in soap_ssl_accept()", SOAP_SSL_ERROR);
+  if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    return SOAP_INVALID_SOCKET;
+  if (!soap->ssl)
+  { soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+      return soap_set_receiver_error(soap, "SSL error", "SSL_new() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+  }
+  else
+    SSL_clear(soap->ssl);
+  soap->imode |= SOAP_ENC_SSL;
+  soap->omode |= SOAP_ENC_SSL;
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&nonblocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)|O_NONBLOCK);
+#endif
+  bio = BIO_new_socket((SOAP_SOCKET)soap->socket, BIO_NOCLOSE);
+  SSL_set_bio(soap->ssl, bio, bio);
+  i = 100; /* 100 * 0.1 ms retries */
+  while ((r = SSL_accept(soap->ssl)) <= 0)
+  { int err = SSL_get_error(soap->ssl, r);
+    if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE)
+    { struct timeval timeout;
+      fd_set fd;
+      if (i-- <= 0)
+        break;
+      timeout.tv_sec = 0;
+      timeout.tv_usec = 100000;
+      FD_ZERO(&fd);
+      FD_SET((SOAP_SOCKET)soap->socket, &fd);
+      r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+      if (r < 0 && soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        return SOAP_EOF;
+      }
+    }
+    else
+    { soap->errnum = err;
+      break;
+    }
+  }
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&blocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+  if (r <= 0)
+  { soap_set_receiver_error(soap, ssl_error(soap, r), "SSL_accept() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+    soap_closesock(soap);
+    return SOAP_SSL_ERROR;
+  }
+  if (soap->require_client_auth)
+  { X509 *peer;
+    int err;
+    if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    peer = SSL_get_peer_certificate(soap->ssl);
+    if (!peer)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    X509_free(peer);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#endif /* WITH_OPENSSL */
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_init(struct soap *soap)
+{ soap->errmode = 1;
+#ifdef WIN32
+  if (tcp_done)
+    return 0;
+  else
+  { WSADATA w;
+    if (WSAStartup(MAKEWORD(1, 1), &w))
+      return -1;
+    tcp_done = 1;
+  }
+#endif
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_done(struct soap *soap)
+{ 
+#ifdef SOAP_DEBUG
+  int i;
+#endif
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  while (soap->clist)
+  { struct soap_clist *p = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = p;
+  }
+  soap->keep_alive = 0; /* to force close the socket */
+  soap_closesock(soap);
+#ifdef WITH_COOKIES
+  soap_free_cookies(soap);
+#endif
+  while (soap->plugins)
+  { register struct soap_plugin *p = soap->plugins->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Removing plugin '%s'\n", soap->plugins->id));
+    if (soap->plugins->fcopy || soap->state == SOAP_INIT)
+      soap->plugins->fdelete(soap, soap->plugins);
+    SOAP_FREE(soap, soap->plugins);
+    soap->plugins = p;
+  }
+  soap->fplugin = fplugin;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+#ifdef WITH_OPENSSL
+  if (soap->session)
+  { SSL_SESSION_free(soap->session);
+    soap->session = NULL;
+  }
+#endif
+  if (soap->state == SOAP_INIT)
+  { if (soap_valid_socket(soap->master))
+    { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+      soap->master = SOAP_INVALID_SOCKET;
+    }
+#ifdef WITH_OPENSSL
+    if (soap->ctx)
+    { SSL_CTX_free(soap->ctx);
+      soap->ctx = NULL;
+    }
+#endif
+  }
+#ifdef SOAP_DEBUG
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free logfiles\n"));
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { if (soap->logfile[i])
+    { SOAP_FREE(soap, (void*)soap->logfile[i]);
+      soap->logfile[i] = NULL;
+    }
+    soap_close_logfile(soap, i);
+  }
+  soap_free_mht(soap);
+  soap->state = 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_cleanup(struct soap *soap)
+{ soap_done(soap);
+#ifdef WIN32
+  if (!tcp_done)
+    return;
+  tcp_done = 0;
+  WSACleanup();
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+tcp_error(struct soap *soap)
+{ register const char *msg = NULL;
+  switch (soap->errmode)
+  { case 0:
+      msg = soap_strerror(soap);
+      break;
+    case 1:
+      msg = "WSAStartup failed";
+      break;
+    case 2:
+    {
+#ifndef WITH_LEAN
+      msg = soap_str_code(h_error_codes, soap->errnum);
+      if (!msg)
+#endif
+      { sprintf(soap->msgbuf, "TCP/UDP IP error %d", soap->errnum);
+        msg = soap->msgbuf;
+      }
+    }
+  }
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static const char*
+http_error(struct soap *soap, int status)
+{ register const char *msg = SOAP_STR_EOS;
+#ifndef WITH_LEAN
+  msg = soap_str_code(h_http_error_codes, status);
+  if (!msg)
+    msg = SOAP_STR_EOS;
+#endif
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_IPV6
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr)
+{ soap_int32 iadd = -1;
+  struct hostent hostent, *host = &hostent;
+#ifdef VXWORKS
+  int hostint;
+  /* inet_addr(), and hostGetByName() expect "char *"; addr is a "const char *". */
+  iadd = inet_addr((char*)addr);
+#else
+#if defined(_AIXVERSION_431) || defined(TRU64)
+  struct hostent_data ht_data;
+#endif
+#ifdef AS400
+  iadd = inet_addr((void*)addr);
+#else
+  iadd = inet_addr(addr);
+#endif
+#endif
+  if (iadd != -1)
+  { memcpy(inaddr, &iadd, sizeof(iadd));
+    return SOAP_OK;
+  }
+#if defined(__GLIBC__)
+  if (gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &host, &soap->errnum) < 0)
+    host = NULL;
+#elif defined(_AIXVERSION_431) || defined(TRU64)
+  memset((void*)&ht_data, 0, sizeof(ht_data));
+  if (gethostbyname_r(addr, &hostent, &ht_data) < 0)
+  { host = NULL;
+    soap->errnum = h_errno;
+  }
+#elif defined(HAVE_GETHOSTBYNAME_R)
+  host = gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &soap->errnum);
+#elif defined(VXWORKS)
+  /* If the DNS resolver library resolvLib has been configured in the vxWorks
+   * image, a query for the host IP address is sent to the DNS server, if the
+   * name was not found in the local host table. */
+  hostint = hostGetByName((char*)addr);
+  if (hostint == ERROR)
+  { host = NULL;
+    soap->errnum = soap_errno; 
+  }
+#else
+#ifdef AS400
+  if (!(host = gethostbyname((void*)addr)))
+    soap->errnum = h_errno;
+#else
+  if (!(host = gethostbyname(addr)))
+    soap->errnum = h_errno;
+#endif
+#endif
+  if (!host)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Host name not found\n"));
+    return SOAP_ERR;
+  }
+#ifdef VXWORKS
+  inaddr->s_addr = hostint;
+#else
+  memcpy(inaddr, host->h_addr, host->h_length);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_connect(struct soap *soap, const char *endpoint, const char *host, int port)
+{
+#ifdef WITH_IPV6
+  struct addrinfo hints, *res, *ressave;
+  int err;
+#endif
+  register int fd;
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->socket))
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+  soap->socket = SOAP_INVALID_SOCKET;
+  if (tcp_init(soap))
+  { soap->errnum = 0;
+    soap_set_sender_error(soap, tcp_error(soap), "TCP init failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->errmode = 0;
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+    err = getaddrinfo(soap->proxy_host, soap_int2s(soap, soap->proxy_port), &hints, &res);
+  else
+    err = getaddrinfo(host, soap_int2s(soap, port), &hints, &res);
+  if (err)
+  { soap_set_sender_error(soap, gai_strerror(err), "getaddrinfo failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  ressave = res;
+again:
+  fd = (int)socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+  soap->errmode = 0;
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    fd = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    fd = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  if (fd < 0)
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "socket failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_flags & SO_LINGER)
+  { struct linger linger;
+    memset((void*)&linger, 0, sizeof(linger));
+    linger.l_onoff = 1;
+    linger.l_linger = 0;
+    if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+    { soap->errnum = soap_socket_errno;
+      soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  if ((soap->connect_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, soap->connect_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (soap->keep_alive && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)fd, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Opening socket %d to host='%s' port=%d\n", fd, host, port));
+#ifndef WITH_IPV6
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+  { if (soap->fresolve(soap, soap->proxy_host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get proxy host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)soap->proxy_port);
+  }
+  else
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)port);
+  }
+  soap->errmode = 0;
+  if ((soap->omode & SOAP_IO_UDP))
+    return fd;
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking)); /* modified to use fd */
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+  else
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  for (;;)
+  { 
+#ifdef WITH_IPV6
+    if (connect((SOAP_SOCKET)fd, res->ai_addr, res->ai_addrlen))
+#else
+    if (connect((SOAP_SOCKET)fd, (struct sockaddr*)&soap->peer, sizeof(soap->peer)))
+#endif
+    { 
+#ifndef WITH_LEAN
+      if (soap->connect_timeout && (soap_socket_errno == SOAP_EINPROGRESS || soap_socket_errno == SOAP_EWOULDBLOCK))
+      { struct timeval timeout;
+        SOAP_SOCKLEN_T k;
+        fd_set fds;
+        if (soap->connect_timeout > 0)
+        { timeout.tv_sec = soap->connect_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->connect_timeout/1000000;
+          timeout.tv_usec = -soap->connect_timeout%1000000;
+        }
+        FD_ZERO(&fds);
+        FD_SET((SOAP_SOCKET)fd, &fds);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(fd + 1), NULL, &fds, NULL, &timeout);
+          if (r > 0)
+	    break;
+          if (!r)
+          { soap->errnum = 0;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+            soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+            soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+	k = (SOAP_SOCKLEN_T)sizeof(soap->errnum);
+        if (!getsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_ERROR, (char*)&soap->errnum, &k) && !soap->errnum)	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+          break;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap->errnum = soap_socket_errno;
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      else
+#endif
+#ifdef WITH_IPV6
+      if (res->ai_next)
+      { res = res->ai_next;
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        goto again;
+      }
+      else
+#endif
+      if (soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }  
+    else
+      break;
+  }
+#ifdef WITH_IPV6
+  soap->peerlen = 0; /* IPv6: already connected so use send() */
+  freeaddrinfo(ressave);
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  soap->socket = fd;
+  soap->imode &= ~SOAP_ENC_SSL;
+  soap->omode &= ~SOAP_ENC_SSL;
+  if (!strncmp(endpoint, "https:", 6))
+  {
+#ifdef WITH_OPENSSL
+    BIO *bio;
+    int r;
+    if (soap->proxy_host)
+    { short v;
+      unsigned int k = soap->omode; /* make sure we only parse HTTP */
+      size_t n = soap->count; /* save the content length */
+      char *userid, *passwd;
+      soap->omode &= ~SOAP_ENC; /* mask IO and ENC */
+      soap->omode |= SOAP_IO_BUFFER;
+      soap_begin_send(soap);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connecting to proxy server\n"));
+      sprintf(soap->tmpbuf, "CONNECT %s:%d HTTP/%s", host, port, soap->http_version);
+      if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+#ifndef WITH_LEAN
+      if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+      { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+        strcpy(soap->tmpbuf, "Basic ");
+        soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+        if ((soap->error = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+        { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return soap->error;
+        }
+      }
+#endif
+      if ((soap->error = soap->fposthdr(soap, NULL, NULL))
+       || soap_flush(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->omode = k;
+      k = soap->imode;
+      soap->imode &= ~SOAP_ENC; /* mask IO and ENC */
+      v = soap->version; /* preserve */
+      userid = soap->userid; /* preserve */
+      passwd = soap->passwd; /* preserve */
+      if (soap_begin_recv(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->userid = userid; /* restore */
+      soap->passwd = passwd; /* restore */
+      soap->version = v; /* restore */
+      soap->imode = k; /* restore */
+      soap->count = n; /* restore */
+      soap_begin_send(soap);
+    }
+    if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    { soap_set_sender_error(soap, "SSL error", "SSL authentication failed in tcp_connect(): check password, key file, and ca file.", SOAP_SSL_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+    { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      soap->error = SOAP_SSL_ERROR;
+      return SOAP_INVALID_SOCKET;
+    }
+    if (soap->session)
+    { if (!strcmp(soap->session_host, host) && soap->session_port == port)
+        SSL_set_session(soap->ssl, soap->session);
+      SSL_SESSION_free(soap->session);
+      soap->session = NULL;
+    }
+    soap->imode |= SOAP_ENC_SSL;
+    soap->omode |= SOAP_ENC_SSL;
+    bio = BIO_new_socket((SOAP_SOCKET)fd, BIO_NOCLOSE);
+    SSL_set_bio(soap->ssl, bio, bio);
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#if defined(WIN32)
+    { u_long nonblocking = 1;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+    }
+#elif defined(VXWORKS)
+    { u_long nonblocking = 1;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+#endif
+    for (;;)
+    { if ((r = SSL_connect(soap->ssl)) <= 0)
+      { int err = SSL_get_error(soap->ssl, r);
+        if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+        { soap_set_sender_error(soap, ssl_error(soap, r), "SSL connect failed in tcp_connect()", SOAP_SSL_ERROR);
+          soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (soap->connect_timeout)
+        { struct timeval timeout;
+          fd_set fds;
+          if (soap->connect_timeout > 0)
+          { timeout.tv_sec = soap->connect_timeout;
+            timeout.tv_usec = 0;
+          }
+          else
+          { timeout.tv_sec = -soap->connect_timeout/1000000;
+            timeout.tv_usec = -soap->connect_timeout%1000000;
+          }
+          FD_ZERO(&fds);
+          FD_SET((SOAP_SOCKET)fd, &fds);
+          for (;;)
+          { int r = select((SOAP_SOCKET)(fd + 1), &fds, NULL, &fds, &timeout);
+            if (r > 0)
+	      break;
+            if (!r)
+            { soap->errnum = 0;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+              soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+              soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+              return SOAP_INVALID_SOCKET;
+            }
+          }
+	  continue;
+        }
+      }
+      break;
+    }
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#ifdef WIN32
+    { u_long blocking = 0;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+    }
+#elif defined(VXWORKS)
+    { u_long blocking = 0;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+    if (soap->require_server_auth)
+    { X509 *peer;
+      int err;
+      if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+      { soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      peer = SSL_get_peer_certificate(soap->ssl);
+      if (!peer)
+      { soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      X509_NAME_get_text_by_NID(X509_get_subject_name(peer), NID_commonName, soap->msgbuf, sizeof(soap->msgbuf));
+      X509_free(peer);
+      if (soap_tag_cmp(soap->msgbuf, host))
+      { soap_set_sender_error(soap, "SSL error", "SSL certificate host name mismatch in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+#else
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    soap->error = SOAP_SSL_ERROR;
+    return SOAP_INVALID_SOCKET;
+#endif
+  }
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_bind(struct soap *soap, const char *host, int port, int backlog)
+{
+#ifdef WITH_IPV6
+  struct addrinfo *addrinfo = NULL;
+  struct addrinfo hints;
+  struct addrinfo res;
+  int err;
+#endif
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->master))
+  { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+    soap->master = SOAP_INVALID_SOCKET;
+  }
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 1;
+  if (tcp_init(soap))
+  { soap_set_receiver_error(soap, tcp_error(soap), "TCP init failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  hints.ai_flags = AI_PASSIVE;
+  soap->errmode = 2;
+  err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo);
+  if (addrinfo)
+  { res = *addrinfo;
+    soap->peer = *((struct sockaddr_storage*)addrinfo->ai_addr);
+    soap->peerlen = addrinfo->ai_addrlen;
+    res.ai_addr = (struct sockaddr*)&soap->peer;
+    res.ai_addrlen = soap->peerlen;
+    freeaddrinfo(addrinfo);
+  }
+  if (err)
+  { soap_set_receiver_error(soap, gai_strerror(err), "getaddrinfo failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->master = socket(res.ai_family, res.ai_socktype, res.ai_protocol);
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->master = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    soap->master = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  soap->errmode = 0;
+  if (!soap_valid_socket(soap->master))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "socket failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->socket = soap->master;
+#endif
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)soap->master, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(soap->master, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->bind_flags && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, soap->bind_flags, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->master, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+#ifdef WITH_IPV6
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, res.ai_addr, res.ai_addrlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+#else
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (host)
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_receiver_error(soap, tcp_error(soap), "get host by name failed in soap_bind()", SOAP_TCP_ERROR);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  else
+    soap->peer.sin_addr.s_addr = htonl(INADDR_ANY);
+  soap->peer.sin_port = htons((short)port);
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, (struct sockaddr*)&soap->peer, soap->peerlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+  if (!(soap->omode & SOAP_IO_UDP) && listen((SOAP_SOCKET)soap->master, backlog))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "listen failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+  return soap->master;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_poll(struct soap *soap)
+{ 
+#ifndef WITH_LEAN
+  struct timeval timeout;
+  fd_set rfd, sfd, xfd;
+  int r;
+  timeout.tv_sec = 0;
+  timeout.tv_usec = 0;
+  FD_ZERO(&rfd);
+  FD_ZERO(&sfd);
+  FD_ZERO(&xfd);
+  if (soap_valid_socket(soap->socket))
+  { FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &xfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, &xfd, &timeout);
+    if (r > 0 && FD_ISSET((SOAP_SOCKET)soap->socket, &xfd))
+      r = -1;
+  }
+  else if (soap_valid_socket(soap->master))
+  { FD_SET((SOAP_SOCKET)soap->master, &sfd);
+    r = select((SOAP_SOCKET)(soap->master + 1), NULL, &sfd, NULL, &timeout);
+  }
+  else
+    return SOAP_OK;
+  if (r > 0)
+  {
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+    {
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || SSL_peek(soap->ssl, soap->tmpbuf, 1) > 0))
+        return SOAP_OK;
+    }
+    else
+#endif
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) > 0))
+        return SOAP_OK;
+  }
+  else if (r < 0)
+  { soap->errnum = soap_socket_errno;
+    if ((soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) && soap_socket_errno != SOAP_EINTR)
+    { soap_set_receiver_error(soap, tcp_error(soap), "select failed in soap_poll()", SOAP_TCP_ERROR);
+      return soap->error = SOAP_TCP_ERROR;
+    }
+  }
+  else
+    soap->errnum = 0;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Polling: other end down on socket=%d select=%d\n", soap->socket, r));
+  return SOAP_EOF;
+#else
+  return SOAP_OK;
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_accept(struct soap *soap, int s, struct sockaddr *a, int *n)
+{ int fd;
+  fd = (int)accept((SOAP_SOCKET)s, a, (SOAP_SOCKLEN_T*)n);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, FD_CLOEXEC);
+#endif
+#endif
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_accept(struct soap *soap)
+{ int n = (int)sizeof(soap->peer);
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  soap->error = SOAP_OK;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    return soap->socket = soap->master;
+#endif
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 0;
+  soap->keep_alive = 0;
+  if (soap_valid_socket(soap->master))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->accept_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->accept_timeout > 0)
+        { timeout.tv_sec = soap->accept_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->accept_timeout/1000000;
+          timeout.tv_usec = -soap->accept_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->master, &fd);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(soap->master + 1), &fd, &fd, NULL, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            soap_set_receiver_error(soap, "Timeout", "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            soap_closesock(soap);
+            soap_set_sender_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+#if defined(WIN32)
+	{ u_long nonblocking = 1;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &nonblocking);
+        }
+#elif defined(VXWORKS)
+        { u_long nonblocking = 1;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&nonblocking));
+        }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)|O_NONBLOCK);
+#endif
+      }
+      else
+#if defined(WIN32)
+      { u_long blocking = 0;
+        ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+      }
+#elif defined(VXWORKS)
+      { u_long blocking = 0;
+        ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+      }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+      soap->socket = soap->faccept(soap, soap->master, (struct sockaddr*)&soap->peer, &n);
+      soap->peerlen = (size_t)n;
+      if (soap_valid_socket(soap->socket))
+      {
+#ifdef WITH_IPV6
+/* Use soap->host to store the numeric form of the remote host */
+        getnameinfo((struct sockaddr*)&soap->peer, n, soap->host, sizeof(soap->host), NULL, 0, NI_NUMERICHOST | NI_NUMERICSERV); 
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d from %s\n", soap->socket, soap->host));
+        soap->ip = 0; /* info stored in soap->peer and soap->host */
+        soap->port = 0; /* info stored in soap->peer and soap->host */
+#else
+        soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+        soap->port = (int)ntohs(soap->peer.sin_port); /* does not return port number on some systems */
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d at port %d from IP %d.%d.%d.%d\n", soap->socket, soap->port, (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF));
+#endif
+#ifndef WITH_LEAN
+	if (soap->accept_flags & SO_LINGER)
+        { struct linger linger;
+          memset((void*)&linger, 0, sizeof(linger));
+          linger.l_onoff = 1;
+          linger.l_linger = 0;
+	  if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+          { soap->errnum = soap_socket_errno;
+	    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in soap_accept()", SOAP_TCP_ERROR);
+	    soap_closesock(soap);
+            return SOAP_INVALID_SOCKET;
+	  }
+        }
+        if ((soap->accept_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, soap->accept_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#ifdef TCP_NODELAY
+        if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->socket, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#endif
+#endif
+        if (soap->accept_timeout)
+        {
+#if defined(WIN32)
+          u_long blocking = 0;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+          ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+#elif defined(VXWORKS)
+          u_long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+          ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)(&blocking));
+#elif defined(PALM)
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL,0)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL,0)&~O_NONBLOCK);
+#elif defined(SYMBIAN)
+          long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, 0/*FIONBIO*/, &blocking);
+#else
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+	}
+        soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+        return soap->socket;
+      }
+      if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept failed from %s\n", soap->host));
+        soap->errnum = soap_socket_errno;
+        soap_set_receiver_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+	soap_closesock(soap);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+  }
+  else
+  { soap->errnum = 0;
+    soap_set_receiver_error(soap, tcp_error(soap), "no master socket in soap_accept()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_disconnect(struct soap *soap)
+{
+#ifdef WITH_OPENSSL
+  if (soap->ssl)
+  { int r, s = 0;
+    if (soap->session)
+      SSL_SESSION_free(soap->session);
+    if (*soap->host)
+    { soap->session = SSL_get1_session(soap->ssl);
+      if (soap->session)
+      { strcpy(soap->session_host, soap->host);
+        soap->session_port = soap->port;
+      }
+    }
+    r = SSL_shutdown(soap->ssl);
+    if (r != 1)
+    { s = ERR_get_error();
+      if (s)
+      { if (soap_valid_socket(soap->socket))
+        { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1);
+          soap->socket = SOAP_INVALID_SOCKET;
+        }
+        r = SSL_shutdown(soap->ssl);
+      }
+    }
+    DBGLOG(TEST, if (s) SOAP_MESSAGE(fdebug, "Shutdown failed: %d\n", SSL_get_error(soap->ssl, r)));
+    SSL_free(soap->ssl);
+    soap->ssl = NULL;
+    if (s)
+      return SOAP_SSL_ERROR;
+    ERR_remove_state(0);
+  }
+#endif
+  if (soap_valid_socket(soap->socket) && !(soap->omode & SOAP_IO_UDP))
+  { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 2);
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+    soap->socket = SOAP_INVALID_SOCKET;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_closesocket(struct soap *soap, SOAP_SOCKET fd)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Close socket %d\n", (int)fd));
+  return closesocket(fd);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_shutdownsocket(struct soap *soap, SOAP_SOCKET fd, int how)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Shutdown socket %d how=%d\n", (int)fd, how));
+  return shutdown(fd, how);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_closesock(struct soap *soap)
+{ register int status = soap->error;
+  if (status == SOAP_EOF || status == SOAP_TCP_ERROR || status == SOAP_SSL_ERROR || !soap->keep_alive)
+  { if (soap->fclose && (soap->error = soap->fclose(soap)))
+      return soap->error;
+    soap->keep_alive = 0;
+  }
+#ifdef WITH_ZLIB
+  if (soap->zlib_state == SOAP_ZLIB_DEFLATE)
+    deflateEnd(&soap->d_stream);
+  else if (soap->zlib_state == SOAP_ZLIB_INFLATE)
+    inflateEnd(&soap->d_stream);
+  soap->zlib_state = SOAP_ZLIB_NONE;
+#endif
+  return soap->error = status;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_hash(register const char *s)
+{ register size_t h = 0;
+  while (*s)
+    h = 65599*h + *s++;
+  return h % SOAP_IDHASH;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_pht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing pointer hashtable\n"));
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new1(soap_mode mode)
+{ return soap_new2(mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new()
+{ return soap_new2(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new2(soap_mode imode, soap_mode omode)
+{ struct soap *soap = (struct soap*)malloc(sizeof(struct soap));
+  if (soap)
+    soap_init2(soap, imode, omode);
+  return soap;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_del(struct soap *soap)
+{ free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_pht(struct soap *soap)
+{ register struct soap_pblk *pb, *next;
+  register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free pointer hashtable\n"));
+  for (pb = soap->pblk; pb; pb = next)
+  { next = pb->next;
+    SOAP_FREE(soap, pb);
+  }
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type)
+{ register int i;
+  struct soap_plist *pp;
+  if (soap->version != 1)
+    soap->encoding = 1;
+  if (a)
+    i = soap_array_pointer_lookup(soap, p, a, n, type, &pp);
+  else
+    i = soap_pointer_lookup(soap, p, type, &pp);
+  if (i)
+  { if (soap_is_embedded(soap, pp)
+     || soap_is_single(soap, pp))
+      return 0;
+    soap_set_embedded(soap, pp);
+  }
+  return i;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_lookup(struct soap *soap, const void *p, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (p)
+  { for (pp = soap->pht[soap_hash_ptr(p)]; pp; pp = pp->next)
+    { if (pp->ptr == p && pp->type == type)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d id=%d\n", p, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d: not found\n", p, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_enter(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register int h;
+  register struct soap_plist *pp;
+  if (!soap->pblk || soap->pidx >= SOAP_PTRBLK)
+  { register struct soap_pblk *pb = (struct soap_pblk*)SOAP_MALLOC(soap, sizeof(struct soap_pblk));
+    if (!pb)
+    { soap->error = SOAP_EOM;
+      return 0;
+    }
+    pb->next = soap->pblk;
+    soap->pblk = pb;
+    soap->pidx = 0;
+  }
+  *ppp = pp = &soap->pblk->plist[soap->pidx++];
+  if (a)
+    h = soap_hash_ptr(a->__ptr);
+  else
+    h = soap_hash_ptr(p);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pointer enter location=%p array=%p size=%d dim=%d type=%d id=%d\n", p, a?a->__ptr:NULL, a?a->__size:0, n, type, soap->idnum+1));
+  pp->next = soap->pht[h];
+  pp->type = type;
+  pp->mark1 = 0;
+  pp->mark2 = 0;
+  pp->ptr = p;
+  pp->array = a;
+  soap->pht[h] = pp;
+  pp->id = ++soap->idnum;
+  return pp->id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_pointer_lookup(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (!p || !a->__ptr)
+    return 0;
+  for (pp = soap->pht[soap_hash_ptr(a->__ptr)]; pp; pp = pp->next)
+  { if (pp->type == type && pp->array && pp->array->__ptr == a->__ptr)
+    { register int i;
+      for (i = 0; i < n; i++)
+        if (((const int*)&pp->array->__size)[i] != ((const int*)&a->__size)[i])
+	  break;
+      if (i == n)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d id=%d\n", a->__ptr, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d: not found\n", a->__ptr, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_count(struct soap *soap)
+{ soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) || (soap->omode & SOAP_ENC_DIME))
+    soap->mode = soap->omode | SOAP_IO_LENGTH | SOAP_ENC_DIME;
+  else
+#endif
+  { soap->mode = soap->omode;
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE
+     || (((soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_ENC_XML))
+#ifndef WITH_LEANER
+      && !soap->fpreparesend
+#endif
+      ))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    else
+      soap->mode |= SOAP_IO_LENGTH;
+  }
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (!(soap->mode & SOAP_ENC_DIME))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+    soap->mode |= SOAP_ENC_MIME;
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+  soap->dime.list = soap->dime.last;	/* keep track of last DIME attachment */
+#endif
+  soap->count = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->part = SOAP_BEGIN;
+  soap->idnum = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin count phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+#ifndef WITH_LEANER
+  soap->dime.count = 0; /* count # of attachments */
+  soap->dime.size = 0; /* accumulate total size of attachments */
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+    return soap->error = soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_count(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->fpreparefinal)
+    return soap->error = soap->fpreparefinal(soap);
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of count phase\n"));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_send(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+  soap->mode = soap->omode | (soap->mode & (SOAP_IO_LENGTH | SOAP_ENC_DIME));
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+#ifdef WITH_UDP
+  if ((soap->mode & SOAP_IO_UDP))
+  { soap->mode |= SOAP_ENC_XML;
+    if (soap->count > SOAP_BUFLEN)
+      return soap->error = SOAP_UDP_ERROR;
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_FLUSH && soap_valid_socket(soap->socket))
+  { if (soap->count || (soap->mode & SOAP_IO_LENGTH) || (soap->mode & SOAP_ENC_XML))
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+  soap->mode &= ~SOAP_IO_LENGTH;
+  if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap_new_block(soap);
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+  { soap->mode |= SOAP_ENC_MIME;
+    soap->mode &= ~SOAP_ENC_DIME;
+  }
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket)) /* Set win32 stdout or soap->sendfd to BINARY, e.g. to support DIME */
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->sendfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->sendfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#endif
+  if (soap->mode & SOAP_IO)
+  { soap->bufidx = 0;
+    soap->buflen = 0;
+  }
+  soap->chunksize = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+#ifdef WITH_ZLIB
+  soap->z_ratio_out = 1.0;
+  if ((soap->mode & SOAP_ENC_ZLIB) && soap->zlib_state != SOAP_ZLIB_DEFLATE)
+  {
+#ifdef WITH_GZIP
+    memcpy(soap->z_buf, "\37\213\10\0\0\0\0\0\0\377", 10);
+    soap->d_stream.next_out = (Byte*)soap->z_buf + 10;
+    soap->d_stream.avail_out = SOAP_BUFLEN - 10;
+    soap->z_crc = crc32(0L, NULL, 0);
+    if (deflateInit2(&soap->d_stream, soap->z_level, Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY) != Z_OK)
+#else
+    soap->d_stream.next_out = (Byte*)soap->z_buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    if (deflateInit(&soap->d_stream, soap->z_level) != Z_OK)
+#endif
+      return soap->error = SOAP_ZLIB_ERROR;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflate initialized\n"));
+    soap->zlib_state = SOAP_ZLIB_DEFLATE;
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin send phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+  soap->part = SOAP_BEGIN;
+#ifndef WITH_LEANER
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_embedded(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { pp->mark1 = 1;
+    pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded %p type=%d mark set to 1\n", p, t));
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_reference(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (!p || (soap->mode & SOAP_XML_TREE))
+    return 1;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (soap_pointer_enter(soap, p, NULL, 0, t, &pp))
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  else
+    return 1;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reference %p type=%d (%d %d)\n", p, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_reference(struct soap *soap, const void *p, const struct soap_array *a, int n, int t)
+{ register int i;
+  struct soap_plist *pp;
+  if (!p || !a->__ptr)
+    return 1;
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (i)
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (!soap_pointer_enter(soap, p, a, n, t, &pp))
+    return 1;
+  else
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array reference %p ptr=%p dim=%d type=%d (%d %d)\n", p, a->__ptr, n, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embedded_id(struct soap *soap, int id, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap->mode & SOAP_XML_TREE)
+    return id;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id %p type=%d id=%d\n", p, t, id));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (id < 0)
+    { id = soap_pointer_lookup(soap, p, t, &pp);
+      if (id)
+      { if (soap->mode & SOAP_IO_LENGTH)
+          pp->mark1 = 2;
+        else
+          pp->mark2 = 2;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id multiref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+      }
+      return -1;
+    }
+    return id;
+  }
+  if (id < 0)
+    id = soap_pointer_lookup(soap, p, t, &pp);
+  else if (id && !soap_pointer_lookup(soap, p, t, &pp))
+    return 0;
+  if (id && pp)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      pp->mark1 = 1;
+    else
+      pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id embedded ref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+  }
+  return id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Is embedded? %d %d\n", (int)pp->mark1, (int)pp->mark2));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      return pp->mark1 != 0;
+    return pp->mark2 != 0;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 1;
+  return pp->mark2 == 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_single(struct soap *soap, struct soap_plist *pp)
+{ if (soap->part == SOAP_IN_HEADER)
+    return 1;
+  if (!pp)
+    return 0;
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 0;
+  return pp->mark2 == 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return;
+  if (soap->mode & SOAP_IO_LENGTH)
+    pp->mark1 = 1;
+  else
+    pp->mark2 = 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attachment(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, const char *aid, const char *atype, const char *aoptions, int n, const char *type, int t) 
+{ struct soap_plist *pp;
+  int i;
+  if (!p || !a->__ptr || (!aid && !atype))
+    return soap_element_id(soap, tag, id, p, a, n, type, t);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Attachment tag='%s' id='%s' (%d) type='%s'\n", tag, aid?aid:"", id, atype?atype:""));
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (!i)
+  { i = soap_pointer_enter(soap, p, a, n, t, &pp);
+    if (!i)
+    { soap->error = SOAP_EOM;
+      return -1;
+    }
+  }
+  if (id <= 0)
+    id = i;
+  if (!aid)
+  { sprintf(soap->tmpbuf, soap->dime_id_format, id);
+    aid = soap_strdup(soap, soap->tmpbuf);
+  }
+  /* Add MTOM xop:Include element when necessary */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  if ((soap->mode & SOAP_ENC_MTOM) && strcmp(tag, "xop:Include"))
+  { if (soap_element_begin_out(soap, tag, 0, type)
+     || soap_element_href(soap, "xop:Include", 0, "href", aid)
+     || soap_element_end_out(soap, tag))
+      return soap->error;
+  }
+  else if (soap_element_href(soap, tag, 0, "href", aid))
+    return soap->error;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { if (pp->mark1 != 3)
+    { struct soap_multipart *content;
+      if (soap->mode & SOAP_ENC_MTOM)
+        content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, (char*)a->__ptr, a->__size);
+      else
+        content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, (char*)a->__ptr, a->__size);
+      if (!content)
+      { soap->error = SOAP_EOM;
+        return -1;
+      }
+      if (!strncmp(aid, "cid:", 4)) /* RFC 2111 */
+      { if (soap->mode & SOAP_ENC_MTOM)
+        { char *s = (char*)soap_malloc(soap, strlen(aid) - 1);
+	  if (s)
+	  { *s = '<';
+	    strcpy(s + 1, aid + 4);
+	    strcat(s, ">");
+	    content->id = s;
+          }
+        }
+        else
+          content->id = aid + 4;
+      }
+      else
+        content->id = aid;
+      content->type = atype;
+      content->options = aoptions;
+      content->encoding = SOAP_MIME_BINARY;
+      pp->mark1 = 3;
+    }
+  }
+  else
+    pp->mark2 = 3;
+  return -1;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_iht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+    soap->iht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_iht(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip, *p;
+  register struct soap_flist *fp, *fq;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = p)
+    { for (fp = ip->flist; fp; fp = fq)
+      { fq = fp->next;
+        SOAP_FREE(soap, fp);
+      }
+      p = ip->next;
+      SOAP_FREE(soap, ip);
+    }
+    soap->iht[i] = NULL;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_lookup(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  for (ip = soap->iht[soap_hash(id)]; ip; ip = ip->next)
+    if (!strcmp(ip->id, id))
+      return ip;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_enter(struct soap *soap, const char *id)
+{ register size_t h;
+  register struct soap_ilist *ip;
+  ip = (struct soap_ilist*)SOAP_MALLOC(soap, sizeof(struct soap_ilist) + strlen(id));
+  if (ip)
+  { h = soap_hash(id);
+    strcpy(ip->id, id);
+    ip->next = soap->iht[h];
+    soap->iht[h] = ip;
+    return ip;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_malloc(struct soap *soap, size_t n)
+{ register char *p;
+  if (!n)
+    return (void*)SOAP_NON_NULL;
+  if (!soap)
+    return SOAP_MALLOC(soap, n);
+  n += (-(long)n) & (sizeof(void*)-1); /* align at 4-, 8- or 16-byte boundary */
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(void*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  /* keep chain of alloced cells for later destruction */
+  soap->alloced = 1;
+  *(void**)(p + n) = soap->alist;
+  *(size_t*)(p + n + sizeof(void*)) = n;
+  soap->alist = p + n;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_mht(struct soap *soap)
+{ register int i;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->mht[i] = NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_free_mht(struct soap *soap)
+{ register int i;
+  register struct soap_mlist *mp, *mq;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+  { for (mp = soap->mht[i]; mp; mp = mq)
+    { mq = mp->next;
+      if (mp->live)
+        fprintf(stderr, "%s(%d): malloc() = %p not freed (memory leak or forgot to call soap_end()?)\n", mp->file, mp->line, mp->ptr);
+      free(mp);
+    }
+    soap->mht[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_track_malloc(struct soap *soap, const char *file, int line, size_t size)
+{ register void *p = malloc(size);
+  if (soap)
+  { register int h = soap_hash_ptr(p);
+    register struct soap_mlist *mp = (struct soap_mlist*)malloc(sizeof(struct soap_mlist));
+    if (soap->fdebug[SOAP_INDEX_TEST])
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): malloc(%lu) = %p\n", file, line, (unsigned long)size, p));
+    mp->next = soap->mht[h];
+    mp->ptr = p;
+    mp->file = file;
+    mp->line = line;
+    mp->live = 1;
+    soap->mht[h] = mp;
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_track_free(struct soap *soap, const char *file, int line, void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+  { if (mp->live)
+    { free(p);
+      if (soap->fdebug[SOAP_INDEX_TEST])
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): free(%p)\n", file, line, p));
+      mp->live = 0;
+    }
+    else
+      fprintf(stderr, "%s(%d): free(%p) double free of pointer malloced at %s(%d)\n", file, line, p, mp->file, mp->line);
+  }
+  else
+    fprintf(stderr, "%s(%d): free(%p) pointer not malloced\n", file, line, p);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_track_unlink(struct soap *soap, const void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+    mp->live = 0;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_dealloc(struct soap *soap, void *p)
+{ if (!soap)
+    return;
+  if (p)
+  { register char **q;
+    for (q = (char**)&soap->alist; *q; q = *(char***)q)
+    { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+      { *q = **(char***)q;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Freed data at %p\n", p));
+        SOAP_FREE(soap, p);
+        return;
+      }
+    }
+    soap_delete(soap, p);
+  }
+  else
+  { register char *q;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free all soap_malloc() data\n"));
+    while (soap->alist)
+    { q = (char*)soap->alist;
+      soap->alist = *(void**)q;
+      q -= *(size_t*)(q + sizeof(void*));
+      SOAP_FREE(soap, q);
+    }
+  }
+  /* we must assume these were deallocated: */
+  soap->action = NULL;
+  soap->fault = NULL;
+  soap->header = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->authrealm = NULL;
+#ifndef WITH_LEANER
+  soap_clr_mime(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_delete(struct soap *soap, void *p)
+{ register struct soap_clist **cp;
+  if (soap_check_state(soap))
+    return;
+  cp = &soap->clist;
+  if (p)
+  { while (*cp)
+    { if (p == (*cp)->ptr)
+      { register struct soap_clist *q = *cp;
+        *cp = q->next;
+        q->fdelete(q);
+        SOAP_FREE(soap, q);
+        return;
+      }
+      cp = &(*cp)->next;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: address not in list\n", p));
+  }
+  else
+  { while (*cp)
+    { register struct soap_clist *q = *cp;
+      *cp = q->next;
+      if (q->ptr == (void*)soap->fault)
+        soap->fault = NULL; /* this was deallocated */
+      else if (q->ptr == (void*)soap->header)
+        soap->header = NULL; /* this was deallocated */
+      q->fdelete(q);
+      SOAP_FREE(soap, q);
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_clist *
+SOAP_FMAC2
+soap_link(struct soap *soap, void *p, int t, int n, void (*fdelete)(struct soap_clist*))
+{ register struct soap_clist *cp;
+  if ((cp = (struct soap_clist*)SOAP_MALLOC(soap, sizeof(struct soap_clist))))
+  { cp->next = soap->clist;
+    cp->type = t;
+    cp->size = n; 
+    cp->ptr = p;
+    cp->fdelete = fdelete;
+    soap->clist = cp;
+  }
+  return cp;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_unlink(struct soap *soap, const void *p)
+{ register char **q;
+  register struct soap_clist **cp;
+  if (!soap || !p)
+    return;
+  for (q = (char**)&soap->alist; *q; q = *(char***)q)
+  { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+    { *q = **(char***)q;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked data %p\n", p));
+#ifdef SOAP_DEBUG
+      soap_track_unlink(soap, p);
+#endif
+      return;
+    }
+  }
+  for (cp = &soap->clist; *cp; cp = &(*cp)->next)
+  { if (p == (*cp)->ptr)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked class instance %p\n", p));
+      q = (char**)*cp;
+      *cp = (*cp)->next;
+      SOAP_FREE(soap, q);
+      return;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_lookup_type(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  if (id && *id)
+  { ip = soap_lookup(soap, id);
+    if (ip)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup id='%s' type=%d\n", id, ip->type));
+      return ip->type;
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "lookup type id='%s' NOT FOUND! Need to get it from xsi:type\n", id));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, unsigned int k)
+{ struct soap_ilist *ip;
+  void **q;
+  if (!p || !id || !*id)
+    return p;
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding first href='%s' type=%d %p (%u bytes)\n", id, t, p, (unsigned int)n));
+    ip->type = t;
+    ip->size = n; 
+    ip->link = p;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->ptr = NULL;
+    ip->level = k;
+    *p = NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolved href='%s' type=%d location=%p (%u bytes)\n", id, t, ip->ptr, (unsigned int)n));
+    if (ip->type != t)
+    { strcpy(soap->id, id);
+      soap->error = SOAP_HREF;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility: id type=%d href type=%d\n", ip->type, t));
+      return NULL;
+    }
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      if (!q)
+        return NULL;
+      *p = (void*)q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    *p = ip->ptr;
+  }
+  else if (ip->level > k)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving level %u pointers to href='%s'\n", ip->level, id));
+    while (ip->level > k)
+    { void *s, **r = &ip->link;
+      q = (void**)ip->link;
+      while (q)
+      { *r = (void*)soap_malloc(soap, sizeof(void*));
+        s = *q;
+        *q = *r;
+        r = (void**)*r;
+        q = (void**)s;
+      }
+      *r = NULL;
+      ip->size = n; 
+      ip->copy = NULL;
+      ip->level = ip->level - 1;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarded href='%s' type=%d location=%p (%u bytes)\n", id, t, p, (unsigned int)n));
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      *p = q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_forward(struct soap *soap, const char *href, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t))
+{ struct soap_ilist *ip;
+  if (!p || !href || !*href)
+    return p;
+  ip = soap_lookup(soap, href); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, href); /* new hash table entry for string id */
+    ip->type = st;
+    ip->size = n;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->ptr = NULL;
+    ip->level = 0;
+    ip->flist = NULL;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry href='%s' type=%d size=%lu level=%d location=%p\n", href, st, (unsigned long)n, k, p));
+  }
+  else if (ip->type != st || (ip->level == k && ip->size != n))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", href, ip->type, (unsigned long)ip->size, k, st, (unsigned long)n));
+    strcpy(soap->id, href);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  if (fcopy || n < sizeof(void*) || *href != '#')
+  { register struct soap_flist *fp = (struct soap_flist*)SOAP_MALLOC(soap, sizeof(struct soap_flist));
+    if (!fp)
+    { soap->error = SOAP_EOM;
+      return NULL;
+    }
+    fp->next = ip->flist;
+    fp->type = tt;
+    fp->ptr = p;
+    fp->level = k;
+    fp->len = len;
+    if (fcopy)
+      fp->fcopy = fcopy;
+    else
+      fp->fcopy = soap_fcopy;
+    ip->flist = fp;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding type=%d (target type=%d) size=%lu location=%p level=%u len=%lu href='%s'\n", st, tt, (unsigned long)n, p, k, (unsigned long)len, href));
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding copying address %p for type=%d href='%s'\n", p, st, href));
+    *(void**)p = ip->copy;
+    ip->copy = p;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*))
+{
+#ifndef WITH_NOIDREF
+  struct soap_ilist *ip;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Enter id='%s' type=%d loc=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  soap->alloced = 0;
+  if (!p)
+  { if (finstantiate)
+      p = finstantiate(soap, t, type, arrayType, &n);
+    else
+      p = soap_malloc(soap, n);
+    if (p)
+      soap->alloced = 1;
+  }
+#ifndef WITH_NOIDREF
+  if (!id || !*id)
+#endif
+    return p;
+#ifndef WITH_NOIDREF
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Lookup entry id='%s for location=%p'\n", id, p));
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    ip->type = t;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry id='%s' type=%d size=%lu level=%u location=%p\n", id, t, (unsigned long)n, k, p));
+  }
+  else if ((ip->type != t || (ip->level == k && ip->size != n)) && (ip->copy || ip->flist))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", id, ip->type, (unsigned long)ip->size, k, t, (unsigned long)n));
+    strcpy(soap->id, id);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Multiply defined id='%s'\n", id));
+    strcpy(soap->id, id);
+    soap->error = SOAP_DUPLICATE_ID;
+    return NULL;
+  }
+  else 
+  { ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update entry id='%s' type=%d location=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  }
+  return ip->ptr;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{ DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Copying data type=%d (target type=%d) %p -> %p (%lu bytes)\n", st, tt, q, p, (unsigned long)n));
+  memcpy(p, q, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_send(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->dime.list)
+  { /* SOAP body referenced attachments must appear first */
+    soap->dime.last->next = soap->dime.first;
+    soap->dime.first = soap->dime.list->next;
+    soap->dime.list->next = NULL;
+    soap->dime.last = soap->dime.list;
+  }
+  if (soap_putdime(soap) || soap_putmime(soap))
+    return soap->error;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End send\n"));
+  if (soap->mode & SOAP_IO) /* need to flush the remaining data in buffer */
+  { if (soap_flush(soap))
+#ifdef WITH_ZLIB
+    { if (soap->mode & SOAP_ENC_ZLIB && soap->zlib_state == SOAP_ZLIB_DEFLATE)
+      { soap->zlib_state = SOAP_ZLIB_NONE;
+        deflateEnd(&soap->d_stream);
+      }
+      return soap->error;
+    }
+#else
+      return soap->error;
+#endif
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { int r;
+      soap->d_stream.avail_in = 0;
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating remainder\n"));
+        r = deflate(&soap->d_stream, Z_FINISH);
+        if (soap->d_stream.avail_out != SOAP_BUFLEN)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN - soap->d_stream.avail_out))
+          { soap->zlib_state = SOAP_ZLIB_NONE;
+            deflateEnd(&soap->d_stream);
+            return soap->error;
+	  }
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (r == Z_OK);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+      soap->z_ratio_out = (float)soap->d_stream.total_out / (float)soap->d_stream.total_in;
+      soap->mode &= ~SOAP_ENC_ZLIB;
+      soap->zlib_state = SOAP_ZLIB_NONE;
+      if (deflateEnd(&soap->d_stream) != Z_OK || r != Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to end deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+#ifdef WITH_GZIP
+      soap->z_buf[0] = soap->z_crc & 0xFF;
+      soap->z_buf[1] = (soap->z_crc >> 8) & 0xFF;
+      soap->z_buf[2] = (soap->z_crc >> 16) & 0xFF;
+      soap->z_buf[3] = (soap->z_crc >> 24) & 0xFF;
+      soap->z_buf[4] = soap->d_stream.total_in & 0xFF;
+      soap->z_buf[5] = (soap->d_stream.total_in >> 8) & 0xFF;
+      soap->z_buf[6] = (soap->d_stream.total_in >> 16) & 0xFF;
+      soap->z_buf[7] = (soap->d_stream.total_in >> 24) & 0xFF;
+      if (soap_flush_raw(soap, soap->z_buf, 8))
+        return soap->error;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip crc32=%lu\n", (unsigned long)soap->z_crc));
+#endif
+    }
+#endif
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    { char *p;
+#ifndef WITH_NOHTTP
+      if (!(soap->mode & SOAP_ENC_XML))
+      { soap->mode--;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending buffered message of length %u\n", (unsigned int)soap->blist->size));
+        if (soap->status >= SOAP_POST)
+          soap->error = soap->fpost(soap, soap->endpoint, soap->host, soap->port, soap->path, soap->action, soap->blist->size);
+        else if (soap->status != SOAP_STOP)
+          soap->error = soap->fresponse(soap, soap->status, soap->blist->size);
+        if (soap->error || soap_flush(soap))
+          return soap->error;
+        soap->mode++;
+      }
+#endif
+      for (p = soap_first_block(soap); p; p = soap_next_block(soap))
+      { DBGMSG(SENT, p, soap_block_size(soap));
+        if ((soap->error = soap->fsend(soap, p, soap_block_size(soap))))
+        { soap_end_block(soap);
+          return soap->error;
+        }
+      }
+      soap_end_block(soap);
+    }
+#ifndef WITH_LEANER
+    else if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { DBGMSG(SENT, "\r\n0\r\n\r\n", 7);
+      if ((soap->error = soap->fsend(soap, "\r\n0\r\n\r\n", 7)))
+        return soap->error;
+    }
+#endif
+  }
+#ifdef WITH_TCPFIN
+#ifdef WITH_OPENSSL
+  if (!soap->ssl && soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#else
+  if (soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#endif
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of send phase\n"));
+  soap->omode &= ~SOAP_XML_SEC;
+  soap->count = 0;
+  soap->part = SOAP_END;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_recv(struct soap *soap)
+{ soap->part = SOAP_END;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) && soap_getdime(soap))
+    return soap->error;
+  soap->dime.list = soap->dime.first;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  if ((soap->mode & SOAP_ENC_MIME) && soap_getmime(soap))
+    return soap->error;
+  soap->mime.list = soap->mime.first;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "End of receive message ok\n"));
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { soap->mode &= ~SOAP_ENC_ZLIB;
+    memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+    soap->bufidx = (char*)soap->d_stream.next_in - soap->z_buf;
+    soap->buflen = soap->z_buflen;
+    soap->zlib_state = SOAP_ZLIB_NONE;
+    if (inflateEnd(&soap->d_stream) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+#ifdef WITH_GZIP
+    if (soap->zlib_in == SOAP_ZLIB_GZIP)
+    { soap_wchar c;
+      short i;
+      for (i = 0; i < 8; i++)
+      { if ((int)(c = soap_getchar(soap)) == EOF)
+          return soap->error = SOAP_EOF;
+        soap->z_buf[i] = (char)c;
+      }
+      if (soap->z_crc != ((uLong)(unsigned char)soap->z_buf[0] | ((uLong)(unsigned char)soap->z_buf[1] << 8) | ((uLong)(unsigned char)soap->z_buf[2] << 16) | ((uLong)(unsigned char)soap->z_buf[3] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: crc check failed, message corrupted? (crc32=%lu)\n", (unsigned long)soap->z_crc));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+      if (soap->d_stream.total_out != ((uLong)(unsigned char)soap->z_buf[4] | ((uLong)(unsigned char)soap->z_buf[5] << 8) | ((uLong)(unsigned char)soap->z_buf[6] << 16) | ((uLong)(unsigned char)soap->z_buf[7] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: incorrect message length\n"));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+    }
+#endif
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    while ((int)soap_getchar(soap) != EOF) /* advance to last chunk */
+      ;
+  if (soap->fdisconnect && (soap->error = soap->fdisconnect(soap)))
+    return soap->error;
+#ifndef WITH_NOIDREF
+  return soap_resolve(soap);
+#else
+#ifndef WITH_LEANER
+  if (soap->xlist)
+  { if (soap->mode & SOAP_ENC_MTOM)
+      return soap->error = SOAP_MIME_HREF;
+    return soap->error = SOAP_DIME_HREF;
+  }
+#endif
+  return SOAP_OK;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free(struct soap *soap)
+{ register struct Namespace *ns;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free namespace stack\n"));
+  while (soap->nlist)
+  { register struct soap_nlist *np = soap->nlist->next;
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free any remaining temp blocks\n"));
+  while (soap->blist)
+    soap_end_block(soap);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute storage\n"));
+  while (soap->attributes)
+  { register struct soap_attribute *tp = soap->attributes->next;
+    if (soap->attributes->value)
+      SOAP_FREE(soap, soap->attributes->value);
+    SOAP_FREE(soap, soap->attributes);
+    soap->attributes = tp;
+  }
+#ifdef WITH_FAST
+  if (soap->labbuf)
+    SOAP_FREE(soap, soap->labbuf);
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  ns = soap->local_namespaces;
+  if (ns)
+  { for (; ns->id; ns++)
+    { if (ns->out)
+      { if (soap->encodingStyle == ns->out)
+          soap->encodingStyle = SOAP_STR_EOS;
+        SOAP_FREE(soap, ns->out);
+        ns->out = NULL;
+      }
+      if (soap->encodingStyle == ns->ns)
+        soap->encodingStyle = SOAP_STR_EOS;
+    }
+    SOAP_FREE(soap, soap->local_namespaces);
+    soap->local_namespaces = NULL;
+  }
+#ifndef WITH_LEANER
+  while (soap->xlist)
+  { struct soap_xlist *xp = soap->xlist->next;
+    SOAP_FREE(soap, soap->xlist);
+    soap->xlist = xp;
+  }
+#endif
+#ifndef WITH_NOIDREF
+  soap_free_pht(soap);
+  soap_free_iht(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_logs(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { soap->logfile[i] = NULL;
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEAN) || defined(SOAP_DEBUG)
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_open_logfile(struct soap *soap, int i)
+{ if (soap->logfile[i])
+    soap->fdebug[i] = fopen(soap->logfile[i], i < 2 ? "ab" : "a");
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_close_logfile(struct soap *soap, int i)
+{ if (soap->fdebug[i])
+  { fclose(soap->fdebug[i]);
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_close_logfiles(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+    soap_close_logfile(soap, i);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_set_logfile(struct soap *soap, int i, const char *logfile)
+{ char *s = NULL;
+  soap_close_logfile(soap, i);
+  if (soap->logfile[i])
+    SOAP_FREE(soap, (void*)soap->logfile[i]);
+  if (logfile)
+    if ((s = (char*)SOAP_MALLOC(soap, strlen(logfile) + 1)))
+      strcpy(s, logfile);
+  soap->logfile[i] = s;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_recv_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_RECV, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_sent_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_SENT, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_test_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_TEST, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy(struct soap *soap)
+{ return soap_copy_context((struct soap*)malloc(sizeof(struct soap)), soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy_context(struct soap *copy, struct soap *soap)
+{ if (soap_check_state(soap))
+    return NULL;
+  if (copy)
+  { register struct soap_plugin *p;
+    memcpy(copy, soap, sizeof(struct soap));
+    copy->state = SOAP_COPY;
+    copy->user = NULL;
+    copy->error = SOAP_OK;
+    copy->userid = NULL;
+    copy->passwd = NULL;
+    copy->nlist = NULL;
+    copy->blist = NULL;
+    copy->clist = NULL;
+    copy->alist = NULL;
+    copy->attributes = NULL;
+#ifdef WITH_FAST
+    copy->labbuf = NULL;
+    copy->lablen = 0;
+    copy->labidx = 0;
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_mht(copy);
+#endif
+    copy->local_namespaces = NULL;
+#ifndef WITH_NOIDREF
+    soap_init_iht(copy);
+    soap_init_pht(copy);
+#endif
+    copy->header = NULL;
+    copy->fault = NULL;
+    copy->action = NULL;
+#ifndef WITH_LEAN
+#ifdef WITH_COOKIES
+    copy->cookies = soap_copy_cookies(copy);
+#else
+    copy->cookies = NULL;
+#endif
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_logs(copy);
+    soap_set_recv_logfile(copy, soap->logfile[SOAP_INDEX_RECV]);
+    soap_set_sent_logfile(copy, soap->logfile[SOAP_INDEX_SENT]);
+    soap_set_test_logfile(copy, soap->logfile[SOAP_INDEX_TEST]);
+#endif
+    copy->plugins = NULL;
+    for (p = soap->plugins; p; p = p->next)
+    { register struct soap_plugin *q = (struct soap_plugin*)SOAP_MALLOC(copy, sizeof(struct soap_plugin));
+      if (!q)
+        return NULL;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying plugin '%s'\n", p->id));
+      *q = *p;
+      if (p->fcopy && (soap->error = p->fcopy(copy, q, p)))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not copy plugin '%s'\n", p->id));
+        SOAP_FREE(copy, q);
+        return NULL;
+      }
+      q->next = copy->plugins;
+      copy->plugins = q;
+    }
+  }
+  else
+    soap->error = SOAP_EOM;
+  return copy;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init(struct soap *soap)
+{ soap->state = SOAP_INIT;
+  soap->version = 0;
+  soap_imode(soap, SOAP_IO_DEFAULT);
+  soap_omode(soap, SOAP_IO_DEFAULT);
+  soap->plugins = NULL;
+  soap->user = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+  soap->fconnect = NULL;
+  soap->fdisconnect = NULL;
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+  soap->fplugin = fplugin;
+#ifndef WITH_LEANER
+  soap->fdimereadopen = NULL;
+  soap->fdimewriteopen = NULL;
+  soap->fdimereadclose = NULL;
+  soap->fdimewriteclose = NULL;
+  soap->fdimeread = NULL;
+  soap->fdimewrite = NULL;
+#endif
+  soap->float_format = "%.8g"; /* .8 preserves single FP precision as much as possible, but might not be very efficient */
+  soap->double_format = "%.17lg"; /* .17 preserves double FP precision as much as possible, but might not be very efficient */
+  soap->dime_id_format = "cid:id%d"; /* default DIME id format */
+  soap->http_version = "1.1";
+  soap->actor = NULL;
+  soap->max_keep_alive = SOAP_MAXKEEPALIVE;
+  soap->keep_alive = 0;
+  soap->recv_timeout = 0;
+  soap->send_timeout = 0;
+  soap->connect_timeout = 0;
+  soap->accept_timeout = 0;
+  soap->socket_flags = 0;
+  soap->connect_flags = 0;
+  soap->bind_flags = 0;
+  soap->accept_flags = 0;
+  soap->ip = 0;
+#ifdef WITH_FAST
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  soap->encodingStyle = SOAP_STR_EOS;
+#ifndef WITH_NONAMESPACES
+  soap->namespaces = namespaces;
+#else
+  soap->namespaces = NULL;
+#endif
+  soap->local_namespaces = NULL;
+  soap->nlist = NULL;
+  soap->blist = NULL;
+  soap->clist = NULL;
+  soap->alist = NULL;
+  soap->attributes = NULL;
+  soap->header = NULL;
+  soap->fault = NULL;
+  soap->master = SOAP_INVALID_SOCKET;
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->os = NULL;
+  soap->is = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifndef UNDER_CE
+  soap->recvfd = 0;
+  soap->sendfd = 1;
+#else
+  soap->recvfd = stdin;
+  soap->sendfd = stdout;
+#endif 
+  soap->host[0] = '\0';
+  soap->port = 0;
+  soap->action = NULL;
+  soap->proxy_host = NULL;
+  soap->proxy_port = 8080;
+  soap->proxy_userid = NULL;
+  soap->proxy_passwd = NULL;
+  soap->authrealm = NULL;
+  soap->prolog = NULL;
+#ifdef WITH_OPENSSL
+  if (!ssl_init_done)
+    soap_ssl_init();
+  soap->fsslauth = ssl_auth_init;
+  soap->fsslverify = ssl_verify_callback;
+  soap->bio = NULL;
+  soap->ssl = NULL;
+  soap->ctx = NULL;
+  soap->require_server_auth = 0;
+  soap->require_client_auth = 0;
+  soap->rsa = 0;
+  soap->keyfile = NULL;
+  soap->password = NULL;
+  soap->dhfile = NULL;
+  soap->cafile = NULL;
+  soap->capath = NULL;
+  soap->crlfile = NULL;
+  soap->randfile = NULL;
+  soap->session = NULL;
+#endif
+#ifdef WITH_ZLIB
+  soap->zlib_state = SOAP_ZLIB_NONE;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.zalloc = NULL;
+  soap->d_stream.zfree = NULL;
+  soap->d_stream.opaque = NULL;
+  soap->z_level = 6;
+#endif
+#ifndef WITH_LEAN
+  soap->c14ninclude = NULL;
+  soap->c14nexclude = NULL;
+  soap->cookies = NULL;
+  soap->cookie_domain = NULL;
+  soap->cookie_path = NULL;
+  soap->cookie_max = 32;
+#endif
+#ifdef SOAP_DEBUG
+  soap_init_mht(soap);
+  soap_init_logs(soap);
+  soap_set_recv_logfile(soap, "RECV.log");
+  soap_set_sent_logfile(soap, "SENT.log");
+  soap_set_test_logfile(soap, NULL);
+#endif
+#ifdef WMW_RPM_IO
+  soap->rpmreqid = NULL;
+#endif
+#ifdef PALM
+  palmNetLibOpen();
+#endif
+#ifndef WITH_NOIDREF
+  soap_init_iht(soap);
+  soap_init_pht(soap);
+#endif
+  soap_begin(soap);
+#ifdef SOAP_DEBUG
+  soap_set_test_logfile(soap, "TEST.log");
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init1(struct soap *soap, soap_mode mode)
+{ soap_init2(soap, mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init2(struct soap *soap, soap_mode imode, soap_mode omode)
+{ soap_init(soap);
+  soap_imode(soap, imode);
+  soap_omode(soap, omode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_begin(struct soap *soap)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing\n"));
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+  soap->null = 0;
+  soap->position = 0;
+  soap->encoding = 0;
+  soap->mustUnderstand = 0;
+  soap->mode = 0;
+  soap->ns = 0;
+  soap->part = SOAP_END;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  soap->error = SOAP_OK;
+  soap->peeked = 0;
+  soap->ahead = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+  soap->endpoint[0] = '\0';
+#ifndef WITH_LEANER
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+#endif
+  soap_free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end(struct soap *soap)
+{ register struct soap_clist *cp;
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  soap_dealloc(soap, NULL);
+  while (soap->clist)
+  { cp = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = cp;
+  }
+  soap_closesock(soap);
+#ifdef SOAP_DEBUG
+  soap_close_logfiles(soap);
+#endif
+#ifdef PALM
+  palmNetLibClose();
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_namespaces(struct soap *soap, struct Namespace *p)
+{ register struct Namespace *ns = soap->local_namespaces;
+  register struct soap_nlist *np, *nq, *nr;
+  register unsigned int level = soap->level;
+  soap->namespaces = p;
+  soap->local_namespaces = NULL;
+  soap_set_local_namespaces(soap);
+  /* reverse the namespace list */
+  np = soap->nlist;
+  soap->nlist = NULL;
+  if (np)
+  { nq = np->next;
+    np->next = NULL;
+    while (nq)
+    { nr = nq->next;
+      nq->next = np;
+      np = nq;
+      nq = nr;
+    }
+  }
+  /* then push on new stack */
+  while (np)
+  { register const char *s;
+    soap->level = np->level; /* preserve element nesting level */
+    s = np->ns;
+    if (!s && np->index >= 0 && ns)
+    { s = ns[np->index].out;
+      if (!s)
+        s = ns[np->index].ns;
+    }
+    if (s && soap_push_namespace(soap, np->id, s))
+      return soap->error;
+    nq = np;
+    np = np->next;
+    SOAP_FREE(soap, nq);
+  }
+  if (ns)
+  { register int i;
+    for (i = 0; ns[i].id; i++)
+    { if (ns[i].out)
+      { SOAP_FREE(soap, ns[i].out);
+        ns[i].out = NULL;
+      }
+    }
+    SOAP_FREE(soap, ns);
+  }
+  soap->level = level; /* restore level */
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_local_namespaces(struct soap *soap)
+{ if (soap->namespaces && !soap->local_namespaces)
+  { register const struct Namespace *ns1;
+    register struct Namespace *ns2;
+    register size_t n = 1;
+    for (ns1 = soap->namespaces; ns1->id; ns1++)
+      n++;
+    n *= sizeof(struct Namespace);
+    ns2 = (struct Namespace*)SOAP_MALLOC(soap, n);
+    if (ns2)
+    { memcpy(ns2, soap->namespaces, n);
+      if (ns2[0].ns)
+      { if (!strcmp(ns2[0].ns, soap_env1))
+          soap->version = 1;
+        else
+          soap->version = 2;
+      }
+      soap->local_namespaces = ns2;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+#ifndef PALM_1
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_strsearch(const char *big, const char *little)
+{ size_t n = strlen(little);
+  const char *s = big;
+  while (s) 
+  { if (!strncmp(s, little, n) && (s[n] == '\0' || s[n] == ' '))
+      return s;
+    s = strchr(s, ' ');
+    if (s)
+      s++;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_lookup_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np;
+  for (np = soap->nlist; np; np = np->next)
+  { if (!strncmp(np->id, tag, n) && !np->id[n])
+      return np;
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized)
+{ register struct soap_nlist *np;
+  size_t n, k;
+  if (soap_strsearch(soap->c14nexclude, id))
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns?ns:""));
+  if (!utilized)
+  { for (np = soap->nlist; np; np = np->next)
+    { if (!strcmp(np->id, id) && (!np->ns || !strcmp(np->ns, ns)))
+        break;
+    }
+    if (np)
+    { if (np->index == 1)
+        utilized = np->index;
+      else
+        return NULL;
+    }
+  }
+  n = strlen(id);
+  if (ns)
+    k = strlen(ns);
+  else
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k + 1);
+  if (!np)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  np->next = soap->nlist;
+  soap->nlist = np;
+  strcpy(np->id, id);
+  if (ns)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+  }
+  else
+    np->ns = NULL;
+  np->level = soap->level;
+  np->index = utilized;
+  return np;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_utilize_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np = soap_lookup_ns(soap, tag, n);
+  if (np)
+  { if (np->index == 0)
+      soap_push_ns(soap, np->id, np->ns, 1);
+  }
+  else
+  { strncpy(soap->tmpbuf, tag, n);
+    soap->tmpbuf[n] = '\0';
+    soap_push_ns(soap, soap->tmpbuf, NULL, 1);
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_pop_ns(struct soap *soap)
+{ soap_pop_namespace(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element(struct soap *soap, const char *tag, int id, const char *type)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element begin tag='%s' id='%d' type='%s'\n", tag, id, type?type:""));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->soap = soap;
+    elt->next = NULL;
+    elt->prnt = soap->dom;
+    elt->name = soap_strdup(soap, tag);
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->nstr = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->node = NULL;
+    elt->type = 0;
+    elt->head = NULL;
+    elt->tail = NULL;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+  }
+  else
+  {
+#endif
+    soap->level++;
+#ifndef WITH_LEAN
+    if (!soap->ns)
+    { if (!(soap->mode & SOAP_XML_CANONICAL)
+       && soap_send(soap, soap->prolog ? soap->prolog : "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"))
+        return soap->error;
+    }
+    else if (soap->mode & SOAP_XML_INDENT)
+    { if (soap->ns == 1 && soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+      soap->body = 1;
+    }
+#endif
+    if (soap_send_raw(soap, "<", 1)
+     || soap_send(soap, tag))
+      return soap->error;
+#ifdef WITH_DOM
+  }
+#endif
+  if (!soap->ns)
+  { struct Namespace *ns;
+    for (ns = soap->local_namespaces; ns && ns->id; ns++)
+    { if (*ns->id && (ns->out || ns->ns))
+      { sprintf(soap->tmpbuf, "xmlns:%s", ns->id);
+        if (soap_attribute(soap, soap->tmpbuf, ns->out ? ns->out : ns->ns))
+          return soap->error;
+      }
+    }   
+  }
+  soap->ns = 1; /* start with 0 or 2, but should be one to continue */
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { const char *s = strchr(tag, ':');
+    if (s)
+      soap_utilize_ns(soap, tag, s - tag);
+  }
+#endif
+  if (id > 0)
+  { sprintf(soap->tmpbuf, "_%d", id);
+    if (soap_attribute(soap, "id", soap->tmpbuf))
+      return soap->error;
+  }
+  if (type && *type)
+  { if (soap_attribute(soap, "xsi:type", type))
+      return soap->error;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { const char *s = strchr(type, ':');
+      if (s)
+        soap_utilize_ns(soap, type, s - type);
+    }
+#endif
+  }
+  if (soap->null && soap->position > 0)
+  { int i;
+    sprintf(soap->tmpbuf, "[%d", soap->positions[0]);
+    for (i = 1; i < soap->position; i++)
+      sprintf(soap->tmpbuf + strlen(soap->tmpbuf), ",%d", soap->positions[i]);
+    strcat(soap->tmpbuf, "]");
+    if (soap_attribute(soap, "SOAP-ENC:position", soap->tmpbuf))
+      return soap->error;
+  }
+  if (soap->mustUnderstand)
+  { if (soap->actor && *soap->actor)
+    { if (soap_attribute(soap, soap->version == 2 ? "SOAP-ENV:role" : "SOAP-ENV:actor", soap->actor))
+        return soap->error;
+    }
+    if (soap_attribute(soap, "SOAP-ENV:mustUnderstand", soap->version == 2 ? "true" : "1"))
+      return soap->error;
+    soap->mustUnderstand = 0;
+  }
+  if (soap->encoding)
+  { if (soap->encodingStyle && soap->local_namespaces)
+    { if (!*soap->encodingStyle)
+      { if (soap->local_namespaces[1].out)
+          soap->encodingStyle = soap->local_namespaces[1].out;
+        else
+          soap->encodingStyle = soap->local_namespaces[1].ns;
+      }
+      if (soap_attribute(soap, "SOAP-ENV:encodingStyle", soap->encodingStyle))
+        return soap->error;
+    }
+    soap->encoding = 0;
+  }
+  soap->null = 0;
+  soap->position = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_out(struct soap *soap, const char *tag, int id, const char *type)
+{ if (*tag == '-')
+    return SOAP_OK;
+  if (soap_element(soap, tag, id, type))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRRCHR
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_strrchr(const char *s, int t)
+{ register char *r = NULL;
+  while (*s)
+    if (*s++ == t)
+      r = (char*)s - 1;
+  return r;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOL
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_strtol(const char *s, char **t, int b)
+{ register long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { short neg = 0;
+    if (*s == '-')
+    { s++;
+      neg = 1;
+    }
+    else if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 214748364 && (n > 214748364 || c >= '8'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+    if (neg)
+      n = -n;
+  }
+  else /* b == 16 and value is always positive */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x07FFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOUL
+SOAP_FMAC1
+unsigned long
+SOAP_FMAC2
+soap_strtoul(const char *s, char **t, int b)
+{ unsigned long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 429496729 && (n > 429496729 || c >= '6'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+  }
+  else /* b == 16 */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x0FFFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_begin_out(struct soap *soap, const char *tag, int id, const char *type, const char *offset)
+{ if (soap_element(soap, tag, id, "SOAP-ENC:Array"))
+    return soap->error;
+  if (soap->version == 2)
+  { const char *s;
+    s = soap_strrchr(type, '[');
+    if ((size_t)(s - type) < sizeof(soap->tmpbuf))
+    { strncpy(soap->tmpbuf, type, s - type);
+      soap->tmpbuf[s - type] = '\0';
+      if (type && *type && (soap_attribute(soap, "SOAP-ENC:itemType", soap->tmpbuf)))
+        return soap->error;
+      if (s && (soap_attribute(soap, "SOAP-ENC:arraySize", s + 1)))
+        return soap->error;
+    }
+  }
+  else
+  { if (offset && (soap_attribute(soap, "SOAP-ENC:offset", offset)))
+      return soap->error;
+    if (type && *type && (soap_attribute(soap, "SOAP-ENC:arrayType", type)))
+      return soap->error;
+  }
+#ifndef WITH_LEAN
+  if (type && *type && (soap->mode & SOAP_XML_CANONICAL))
+  { const char *s = strchr(type, ':');
+    if (s)
+      soap_utilize_ns(soap, type, s - type);
+  }
+#endif
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_start_end_out(struct soap *soap, const char *tag)
+{ register struct soap_attribute *tp;
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att;
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { att = &soap->dom->atts;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible)
+      { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+	if (!*att)
+	  return soap->error = SOAP_EOM;
+	(*att)->next = NULL;
+        (*att)->nstr = NULL;
+        (*att)->name = soap_strdup(soap, tp->name);
+        (*att)->data = soap_strdup(soap, tp->value);
+        (*att)->wide = NULL;
+        (*att)->soap = soap;
+        tp->visible = 0;
+      }
+    }
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { struct soap_nlist *np;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible && tp->name)
+      { const char *s = strchr(tp->name, ':');
+        if (s)
+          soap_utilize_ns(soap, tp->name, s - tp->name);
+      }
+    }
+    for (np = soap->nlist; np; np = np->next)
+    { if (np->index == 1 && np->ns)
+      { sprintf(soap->tmpbuf, "xmlns:%s", np->id);
+        soap_set_attr(soap, soap->tmpbuf, np->ns);
+        np->index = 2;
+      }
+    }
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible)
+    { if (soap_send(soap, " ") || soap_send(soap, tp->name))
+        return soap->error;
+      if (tp->visible == 2 && tp->value)
+        if (soap_send_raw(soap, "=\"", 2)
+	 || soap_string_out(soap, tp->value, 1)
+	 || soap_send_raw(soap, "\"", 1))
+          return soap->error;
+      tp->visible = 0;
+    }
+  }
+  if (tag)
+  { 
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { if (soap_send_raw(soap, ">", 1)
+       || soap_element_end_out(soap, tag))
+        return soap->error;
+    }
+    else
+#endif
+    soap->level--;	/* decrement level just before /> */
+    if (soap_send_raw(soap, "/>", 2))
+      return soap->error;
+    return SOAP_OK;
+  }
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_out(struct soap *soap, const char *tag)
+{ if (*tag == '-')
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element ending tag='%s'\n", tag));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+    soap_pop_ns(soap);
+  if (soap->mode & SOAP_XML_INDENT)
+  { if (!soap->body)
+    { if (soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+    }
+    soap->body = 0;
+  }
+#endif
+  if (soap_send_raw(soap, "</", 2)
+   || soap_send(soap, tag))
+    return soap->error;
+  soap->level--;	/* decrement level just before > */
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_ref(struct soap *soap, const char *tag, int id, int href)
+{ register int n = 0;
+  if (soap->version == 2)
+    n = 1;
+  sprintf(soap->href, "#_%d", href);
+  return soap_element_href(soap, tag, id, "href" + n, soap->href + n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_href(struct soap *soap, const char *tag, int id, const char *ref, const char *val)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element '%s' reference %s='%s'\n", tag, ref, val));
+  if (soap_element(soap, tag, id, NULL)
+   || soap_attribute(soap, ref, val)
+   || soap_element_start_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_null(struct soap *soap, const char *tag, int id, const char *type)
+{ struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (tp->visible)
+      break;
+  if (tp || (soap->version == 2 && soap->position > 0) || id > 0 || (soap->mode & SOAP_XML_NIL))
+  { if (soap_element(soap, tag, id, type))
+      return soap->error;
+    if (soap->part != SOAP_IN_HEADER && soap->encodingStyle)
+      if (soap_attribute(soap, "xsi:nil", "true"))
+        return soap->error;
+    return soap_element_start_end_out(soap, tag);
+  }
+  soap->null = 1;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_id(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, int n, const char *type, int t) 
+{ if (!p || (a && !a->__ptr))
+  { soap_element_null(soap, tag, id, type);
+    return -1;
+  }
+#ifndef WITH_NOIDREF
+  if (soap->mode & SOAP_XML_TREE)
+    return 0;
+  if (id < 0)
+  { struct soap_plist *pp;
+    if (a)
+      id = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+    else
+      id = soap_pointer_lookup(soap, p, t, &pp);
+    if (id)
+    { if (soap_is_embedded(soap, pp))
+      { soap_element_ref(soap, tag, 0, id);
+        return -1;
+      }
+      if (soap_is_single(soap, pp))
+        return 0;
+      soap_set_embedded(soap, pp);
+    }
+  }
+  return id;
+#else
+  return 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_result(struct soap *soap, const char *tag)
+{ if (soap->version == 2 && soap->encodingStyle)
+    if (soap_element(soap, "SOAP-RPC:result", 0, NULL)
+     || soap_attribute(soap, "xmlns:SOAP-RPC", soap_rpc)
+     || soap_element_start_end_out(soap, NULL)
+     || soap_string_out(soap, tag, 0)
+     || soap_element_end_out(soap, "SOAP-RPC:result"))
+      return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attribute(struct soap *soap, const char *name, const char *value)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+    a->next = soap->dom->atts;
+    a->nstr = NULL;
+    a->name = soap_strdup(soap, name);
+    a->data = soap_strdup(soap, value);
+    a->wide = NULL;
+    a->soap = soap;
+    soap->dom->atts = a;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { /* TODO: consider using this code to handle default namespace
+    if (!strncmp(name, "xmlns", 5) && (name[5] == ':' || name[5] == '\0'))
+    { if (name[5] == ':')
+        soap_push_ns(soap, name + 6, value, 0);
+      else
+        soap_push_ns(soap, "", value, 0);
+    }
+    */
+    if (!strncmp(name, "xmlns:", 6))
+      soap_push_ns(soap, name + 6, value, 0);
+    else if (soap_set_attr(soap, name, value))
+      return soap->error;
+  }
+  else
+#endif
+  { if (soap_send(soap, " ") || soap_send(soap, name))
+      return soap->error;
+    if (value)
+      if (soap_send_raw(soap, "=\"", 2)
+       || soap_string_out(soap, value, 1)
+       || soap_send_raw(soap, "\"", 1))
+        return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_in(struct soap *soap, const char *tag, int nillable)
+{ if (!soap_peek_element(soap))
+  { if (soap->other)
+      return soap->error = SOAP_TAG_MISMATCH;
+    if (tag && *tag == '-')
+      return SOAP_OK;
+    if (!(soap->error = soap_match_tag(soap, soap->tag, tag)))
+    { soap->peeked = 0;
+      if (soap->body)
+        soap->level++;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"" ));
+      if (!nillable && soap->null && (soap->mode & SOAP_XML_STRICT))
+        return soap->error = SOAP_NULL;
+    }
+  }
+  else if (soap->error == SOAP_NO_TAG && tag && *tag == '-')
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_in(struct soap *soap, const char *tag)  
+{ register soap_wchar c;
+  register char *s;
+  register const char *t;
+  register int n = 0;
+  if (tag && *tag == '-')
+    return SOAP_OK;
+  soap->level--;
+  soap_pop_namespace(soap);
+#ifdef WITH_DOM
+  /* this whitespace or mixed content is not insignificant for DOM */
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!soap->peeked && !soap_string_in(soap, 3, -1, -1))
+      return soap->error;
+    if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  if (soap->peeked)
+  { if (soap->error == SOAP_NO_TAG)
+      soap->error = SOAP_OK;
+    if (*soap->tag)
+      n++;
+    soap->peeked = 0;
+  }
+  do
+  { while (((c = soap_get(soap)) != SOAP_TT))
+    { if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      if (c == SOAP_LT)
+        n++;
+      else if (c == '/')
+      { c = soap_get(soap);
+        if (c == SOAP_GT)
+	  n--;
+        else
+	  soap_unget(soap, c);
+      }
+    }
+  } while (n--);
+  s = soap->tag;
+  while (soap_notblank(c = soap_get(soap)))
+    *s++ = (char)c;
+  *s = '\0';
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  while (soap_blank(c))
+    c = soap_get(soap);
+  if (c != SOAP_GT)
+    return soap->error = SOAP_SYNTAX_ERROR;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:""));
+  if (!tag || !*tag)
+    return SOAP_OK;
+  if ((s = strchr(soap->tag, ':')))
+    s++;
+  else
+    s = soap->tag;
+  if ((t = strchr(tag, ':')))
+    t++;
+  else
+    t = tag;
+  if (!SOAP_STRCMP(s, t))
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element tag name does not match\n"));
+  return soap->error = SOAP_SYNTAX_ERROR;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_attr_value(struct soap *soap, const char *name, int flag)
+{ register struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (!soap_match_tag(soap, tp->name, name))
+      break;
+  if (tp && tp->visible == 2)
+  { if (flag == 2 && (soap->mode & SOAP_XML_STRICT))
+      soap->error = SOAP_PROHIBITED;
+    else
+      return tp->value;
+  }
+  else if (flag == 1 && (soap->mode & SOAP_XML_STRICT))
+    soap->error = SOAP_REQUIRED;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_attr(struct soap *soap, const char *name, const char *value)
+{ register struct soap_attribute *tp;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set attribute %s='%s'\n", name, value?value:""));
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (!strcmp(tp->name, name))
+      break;
+  }
+  if (!tp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute %s\n", name));
+    if (!(tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(name))))
+      return soap->error = SOAP_EOM;
+    tp->ns = NULL;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { struct soap_attribute **tpp = &soap->attributes;
+      const char *s = strchr(name, ':');
+      if (!strncmp(name, "xmlns", 5))
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) || strcmp((*tpp)->name + 5, name + 5) > 0)
+            break;
+      }
+      else if (!s)
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) && ((*tpp)->ns || strcmp((*tpp)->name, name) > 0))
+            break;
+      }
+      else
+      { int k;
+        for (; *tpp; tpp = &(*tpp)->next)
+	{ if (!strncmp((*tpp)->name, "xmlns:", 6) && !strncmp((*tpp)->name + 6, name, s - name) && !(*tpp)->name[6 + s - name])
+	  { if (!tp->ns)
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Canonicalization: prefix %s=%p(%s)\n", name, (*tpp)->ns, (*tpp)->ns));
+	      tp->ns = (*tpp)->ns;
+	    }
+	  }
+          else if (strncmp((*tpp)->name, "xmlns", 5) && (*tpp)->ns && tp->ns && ((k = strcmp((*tpp)->ns, tp->ns)) > 0 || (!k && strcmp((*tpp)->name, name) > 0)))
+            break;
+        }
+      }
+      tp->next = *tpp;
+      *tpp = tp;
+    }
+    else
+#endif
+    { tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    strcpy(tp->name, name);
+    tp->value = NULL;
+  }
+  else if (tp->visible)
+  { return SOAP_OK;
+  }
+  else if (value && tp->value && tp->size <= strlen(value))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute value of %s (free %p)\n", name, tp->value));
+    SOAP_FREE(soap, tp->value);
+    tp->value = NULL;
+    tp->ns = NULL;
+  }
+  if (value)
+  { if (!tp->value)
+    { tp->size = strlen(value) + 1;
+      if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+        return soap->error = SOAP_EOM;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute value of %s (%p)\n", tp->name, tp->value));
+    }
+    strcpy(tp->value, value);
+    if (!strncmp(tp->name, "xmlns:", 6))
+      tp->ns = tp->value;
+    tp->visible = 2;
+#ifndef WITH_LEAN
+    if (!strcmp(name, "wsu:Id"))
+    { soap->part = SOAP_BEGIN_SECURITY;
+      strncpy(soap->id, value, sizeof(soap->id));
+      soap->id[sizeof(soap->id)-1] = '\0';
+    }
+#endif
+  }
+  else
+    tp->visible = 1;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_attr(struct soap *soap)
+{ register struct soap_attribute *tp;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_CANONICAL))
+  { while (soap->attributes)
+    { tp = soap->attributes->next;
+      SOAP_FREE(soap, soap->attributes->value);
+      SOAP_FREE(soap, soap->attributes);
+      soap->attributes = tp;
+    }
+  }
+  else
+#endif
+  { for (tp = soap->attributes; tp; tp = tp->next)
+      tp->visible = 0;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d)
+{ register size_t i;
+  for (i = 0; i < n; i++)
+  { register soap_wchar c = soap_get(soap);
+    switch (c)
+    {
+    case SOAP_TT:
+      *s++ = '<';
+      soap_unget(soap, '/');
+      break;
+    case SOAP_LT:
+      *s++ = '<';
+      break;
+    case SOAP_GT:
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '>';
+      break;
+    case SOAP_QT:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '"';
+      break;
+    case SOAP_AP:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '\'';
+      break;
+    case '\t':
+    case '\n':
+    case '\r':
+    case ' ':
+    case '/':
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+    default:
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+  }
+  return soap->error = SOAP_EOM;
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_store_lab(struct soap *soap, const char *s, size_t n)
+{ soap->labidx = 0;
+  return soap_append_lab(soap, s, n);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_append_lab(struct soap *soap, const char *s, size_t n)
+{ if (soap->labidx + n >= soap->lablen)
+  { register char *t = soap->labbuf;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enlarging look-aside buffer to append data, old size=%lu", (unsigned long)soap->lablen));
+    if (soap->lablen == 0)
+      soap->lablen = SOAP_LABLEN;
+    while (soap->labidx + n >= soap->lablen)
+      soap->lablen <<= 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, ", new size=%lu\n", (unsigned long)soap->lablen));
+    soap->labbuf = (char*)SOAP_MALLOC(soap, soap->lablen);
+    if (!soap->labbuf)
+    { if (t)
+        SOAP_FREE(soap, t);
+      return soap->error = SOAP_EOM;
+    }
+    if (t)
+    { memcpy(soap->labbuf, t, soap->labidx);
+      SOAP_FREE(soap, t);
+    }
+  }
+  if (s)
+  { memcpy(soap->labbuf + soap->labidx, s, n);
+    soap->labidx += n;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_peek_element(struct soap *soap)
+{
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att = NULL;
+  register char *lead = NULL;
+#endif
+  register struct soap_attribute *tp;
+  const char *t;
+  register char *s;
+  register soap_wchar c;
+  register int i;
+  if (soap->peeked)
+  { if (!*soap->tag)
+      return soap->error = SOAP_NO_TAG;
+    return SOAP_OK;
+  }
+  soap->peeked = 1;
+  c = soap_getutf8(soap);
+#ifdef WITH_DOM
+  /* whitespace leading to start tag is not insignificant for DOM */
+  if (soap_blank(c))
+  { soap->labidx = 0;
+    do
+    { if (soap_append_lab(soap, NULL, 0))
+        return SOAP_EOM;
+      s = soap->labbuf + soap->labidx;
+      i = soap->lablen - soap->labidx;
+      soap->labidx = soap->lablen;
+      while (soap_blank(c) && i--)
+      { *s++ = c;
+        c = soap_getutf8(soap);
+      }
+    }
+    while (soap_blank(c));
+    *s = '\0';
+    lead = soap_strdup(soap, soap->labbuf);
+  }
+#else
+  while (soap_blank(c))
+    c = soap_getutf8(soap);
+#endif
+  if (c != SOAP_LT)
+  { *soap->tag = '\0';
+    if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, c);
+#ifdef WITH_DOM
+    /* whitespace leading to end tag is not insignificant for DOM */
+    if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+      soap->dom->tail = soap_strdup(soap, lead);
+#endif
+    return soap->error = SOAP_NO_TAG;
+  }
+  s = soap->tag;
+  do c = soap_get1(soap);
+  while (soap_blank(c));
+  i = sizeof(soap->tag);
+  while (c != '>' && c != '/' && soap_notblank(c))
+  { if (--i > 0)
+      *s++ = (char)c;
+    c = soap_get1(soap);
+  }
+  while (soap_blank(c))
+    c = soap_get1(soap);
+  *s = '\0';
+  soap->id[0] = '\0';
+  soap->href[0] = '\0';
+  soap->type[0] = '\0';
+  soap->arrayType[0] = '\0';
+  soap->arraySize[0] = '\0';
+  soap->arrayOffset[0] = '\0';
+  soap->other = 0;
+  soap->root = -1;
+  soap->position = 0;
+  soap->null = 0;
+  soap->mustUnderstand = 0;
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt;
+    elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->next = NULL;
+    elt->nstr = NULL;
+    elt->name = soap_strdup(soap, soap->tag);
+    elt->prnt = soap->dom;
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->type = 0;
+    elt->node = NULL;
+    elt->head = lead;
+    elt->tail = NULL;
+    elt->soap = soap;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+    att = &elt->atts;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+    tp->visible = 0;
+  while ((int)c != EOF && c != '>' && c != '/')
+  { s = soap->tmpbuf;
+    i = sizeof(soap->tmpbuf);
+    while (c != '=' && c != '>' && c != '/' && soap_notblank(c))
+    { if (--i > 0)
+        *s++ = (char)c;
+      c = soap_get1(soap);
+    }
+    *s = '\0';
+    if (i == sizeof(soap->tmpbuf))
+      return soap->error = SOAP_SYNTAX_ERROR;
+#ifdef WITH_DOM
+    /* add attribute name to dom */
+    if (att)
+    { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+       if (!*att)
+         return soap->error = SOAP_EOM;
+       (*att)->next = NULL;
+       (*att)->nstr = NULL;
+       (*att)->name = soap_strdup(soap, soap->tmpbuf);
+       (*att)->data = NULL;
+       (*att)->wide = NULL;
+       (*att)->soap = soap;
+    }
+#endif
+    if (!strncmp(soap->tmpbuf, "xmlns", 5))
+    { if (soap->tmpbuf[5] == ':')
+      { soap->tmpbuf[5] = '\0';
+        t = soap->tmpbuf + 6;
+      }
+      else if (soap->tmpbuf[5])
+        t = NULL;
+      else
+        t = SOAP_STR_EOS;
+    }
+    else
+      t = NULL;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (!SOAP_STRCMP(tp->name, soap->tmpbuf))
+        break;
+    }
+    if (!tp)
+    { tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(soap->tmpbuf));
+      if (!tp)
+        return soap->error = SOAP_EOM;
+      strcpy(tp->name, soap->tmpbuf);
+      tp->value = NULL;
+      tp->size = 0;
+      tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    while (soap_blank(c))
+      c = soap_get1(soap);
+    if (c == '=')
+    { do c = soap_getutf8(soap);
+      while (soap_blank(c));
+      if (c != SOAP_QT && c != SOAP_AP)
+      { soap_unget(soap, c);
+        c = ' '; /* blank delimiter */
+      }
+      if (soap_getattrval(soap, tp->value, tp->size, c))
+      {
+#ifdef WITH_FAST
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+	if (soap_store_lab(soap, tp->value, tp->size))
+	  return soap->error;
+	if (tp->value)
+	  SOAP_FREE(soap, tp->value);
+	for (;;)
+	{ if (soap_getattrval(soap, soap->labbuf + soap->labidx, soap->lablen - soap->labidx, c))
+	  { if (soap->error != SOAP_EOM)
+	      return soap->error;
+            soap->error = SOAP_OK;
+	    soap->labidx = soap->lablen;
+	    if (soap_append_lab(soap, NULL, 0))
+	      return soap->error;
+	  }
+	  else
+	    break;
+	}
+	if (soap->labidx)
+          tp->size = soap->lablen;
+	else
+	{ tp->size = strlen(soap->labbuf) + 1;
+          if (tp->size < SOAP_LABLEN)
+	    tp->size = SOAP_LABLEN;
+        }
+	if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+	  return soap->error = SOAP_EOM;
+        strcpy(tp->value, soap->labbuf);
+#else
+	size_t n;
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+        if (soap_new_block(soap))
+          return soap->error;
+        for (;;)
+        { if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+            return soap->error;
+          if (soap_getattrval(soap, s, SOAP_BLKLEN, c))
+          { if (soap->error != SOAP_EOM)
+              return soap->error;
+            soap->error = SOAP_OK;
+          }
+          else
+            break;
+        }
+	n = tp->size + soap->blist->size;
+        if (!(s = (char*)SOAP_MALLOC(soap, n)))
+          return soap->error = SOAP_EOM;
+        if (tp->value)
+        { memcpy(s, tp->value, tp->size);
+          SOAP_FREE(soap, tp->value);
+        }
+        soap_save_block(soap, s + tp->size, 0);
+        tp->value = s;
+        tp->size = n;
+#endif
+      }
+      do c = soap_get1(soap);
+      while (soap_blank(c));
+      tp->visible = 2; /* seen this attribute w/ value */
+#ifdef WITH_DOM
+      if (att)
+        (*att)->data = soap_strdup(soap, tp->value);
+#endif
+    }
+    else
+      tp->visible = 1; /* seen this attribute w/o value */
+#ifdef WITH_DOM
+    if (att)
+      att = &(*att)->next;
+#endif
+    if (t && tp->value)
+    { if (soap_push_namespace(soap, t, tp->value))
+        return soap->error;
+      tp->visible = 0;
+    }
+  }
+#ifdef WITH_DOM
+  if (att)
+  { soap->dom->nstr = soap_current_namespace(soap, soap->tag);
+    for (att = &soap->dom->atts; *att; att = &(*att)->next)
+      (*att)->nstr = soap_current_namespace(soap, (*att)->name);
+  }
+#endif
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  if (!(soap->body = (c != '/')))
+    do c = soap_get1(soap);
+    while (soap_blank(c));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { if (!soap->body && soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible && tp->value)
+    { if (!strcmp(tp->name, "id"))
+      { *soap->id = '#';
+        strncpy(soap->id + 1, tp->value, sizeof(soap->id) - 2);
+        soap->id[sizeof(soap->id)-1] = '\0';
+      }
+      else if (!strcmp(tp->name, "href"))
+      { strncpy(soap->href, tp->value, sizeof(soap->href) - 1);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if ((soap->version == 2 || (soap->mode & SOAP_XML_GRAPH)) && !strcmp(tp->name, "ref"))
+      { *soap->href = '#';
+        strncpy(soap->href + 1, tp->value, sizeof(soap->href) - 2);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if (!soap_match_tag(soap, tp->name, "xsi:type"))
+      { strncpy(soap->type, tp->value, sizeof(soap->type) - 1);
+        soap->type[sizeof(soap->type)-1] = '\0';
+      }
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arrayType"))
+      { s = soap_strrchr(tp->value, '[');
+        if (s && (size_t)(s - tp->value) < sizeof(soap->arrayType))
+        { strncpy(soap->arrayType, tp->value, s - tp->value);
+          soap->arrayType[s - tp->value] = '\0';
+          strncpy(soap->arraySize, s, sizeof(soap->arraySize) - 1);
+        }
+        else
+          strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+        soap->arraySize[sizeof(soap->arrayType)-1] = '\0';
+        soap->arrayType[sizeof(soap->arrayType)-1] = '\0';
+      }
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:itemType"))
+        strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arraySize"))
+        strncpy(soap->arraySize, tp->value, sizeof(soap->arraySize) - 1);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:offset"))
+        strncpy(soap->arrayOffset, tp->value, sizeof(soap->arrayOffset));
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:position"))
+        soap->position = soap_getposition(tp->value, soap->positions);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:root"))
+        soap->root = ((!strcmp(tp->value, "1") || !strcmp(tp->value, "true")));
+      else if ((soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENV:actor"))
+            || (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENV:role")))
+      { if ((!soap->actor || strcmp(soap->actor, tp->value))
+         && strcmp(tp->value, "http://schemas.xmlsoap.org/soap/actor/next")
+         && strcmp(tp->value, "http://www.w3.org/2003/05/soap-envelope/role/next"))
+          soap->other = 1;
+      }
+      else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:mustUnderstand")
+            && (!strcmp(tp->value, "1") || !strcmp(tp->value, "true")))
+        soap->mustUnderstand = 1;
+      else if ((!soap_match_tag(soap, tp->name, "xsi:null")
+             || !soap_match_tag(soap, tp->name, "xsi:nil"))
+            && (!strcmp(tp->value, "1")
+             || !strcmp(tp->value, "true")))
+        soap->null = 1;
+    }
+  }
+  return soap->error = SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_retry(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_revert(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_revert(struct soap *soap)
+{ if (!soap->peeked)
+  { soap->peeked = 1;
+    if (soap->body)
+      soap->level--;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reverting last element (level=%u)\n", soap->level));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_string_out(struct soap *soap, const char *s, int flag)
+{ register const char *t;
+  register soap_wchar c;
+  register soap_wchar mask = 0xFFFFFF80UL;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_strdup(soap, s);
+    return SOAP_OK;
+  }
+#endif
+  if (soap->mode & SOAP_C_UTFSTRING)
+    mask = 0;
+  t = s;
+  while ((c = *t++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#x9;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xA;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 13:
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xD;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '&':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&amp;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '<':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&lt;", 4))
+        return soap->error;
+      s = t;
+      break;
+    case '>':
+      if (!flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&gt;", 4))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case '"':
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&quot;", 6))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    default:
+#ifndef WITH_LEANER
+#ifdef HAVE_MBTOWC
+      if (soap->mode & SOAP_C_MBSTRING)
+      { wchar_t wc;
+        register int m = mbtowc(&wc, t - 1, MB_CUR_MAX);
+        if (m > 0 && wc != c)
+        { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, wc))
+            return soap->error;
+	  s = t += m - 1;
+	  continue;
+        }
+      }
+#endif
+#endif
+      if (c & mask)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, (unsigned char)c))
+          return soap->error;
+        s = t;
+      }
+    }
+  }
+  return soap_send_raw(soap, s, t - s - 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_string_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ register char *s;
+  char *t = NULL;
+  register size_t i;
+  register long l = 0;
+  register int n = 0;
+  register int m = 0;
+  register soap_wchar c;
+#if !defined(WITH_LEANER) && defined(HAVE_WCTOMB)
+  char buf[MB_LEN_MAX > 8 ? MB_LEN_MAX : 8];
+#else
+  char buf[8];
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+#ifndef WITH_LEAN
+      t = soap->tmpbuf;
+      t[0] = '<';
+      strncpy(t + 1, soap->tag, sizeof(soap->tmpbuf) - 1);
+      strncat(t, ">", sizeof(soap->tmpbuf));
+      m = strlen(soap->tag) + 2;
+#endif
+    }
+  }
+#ifdef WITH_CDATA
+  if (!flag)
+  { register int state = 0;
+#ifdef WITH_FAST
+    soap->labidx = 0;			/* use look-aside buffer */
+#else
+    if (soap_new_block(soap))
+      return NULL;
+#endif
+    for (;;)
+    { 
+#ifdef WITH_FAST
+      register size_t k;
+      if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+        return NULL;
+      s = soap->labbuf + soap->labidx;	/* space to populate */
+      k = soap->lablen - soap->labidx;	/* number of bytes available */
+      soap->labidx = soap->lablen;	/* claim this space */
+#else
+      register size_t k = SOAP_BLKLEN;
+      if (!(s = (char*)soap_push_block(soap, k)))
+        return NULL;
+#endif
+      for (i = 0; i < k; i++)
+      { if (m > 0)
+        { *s++ = *t++;	/* copy multibyte characters */
+	  m--;
+          continue;
+        }
+        c = soap_getchar(soap);
+	if ((int)c == EOF)
+          goto end;
+        if (c >= 0x80 && !(soap->mode & SOAP_ENC_LATIN))
+        { soap_unget(soap, c);
+	  c = soap_getutf8(soap);
+	  if (soap->mode & SOAP_C_UTFSTRING)
+          { if ((c & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+            { c &= 0x7FFFFFFF;
+              t = buf;
+              if (c < 0x0800)
+                *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+              else
+              { if (c < 0x010000)
+                  *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+                else
+                { if (c < 0x200000)
+                    *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+                  else
+                  { if (c < 0x04000000)
+                      *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                    else
+                    { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                      *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                    }
+                    *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+                  }     
+                  *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+              }
+              *t++ = (char)(0x80 | (c & 0x3F));
+	      m = (int)(t - buf) - 1;
+              t = buf;
+              *s++ = *t++;
+              continue;
+	    }
+          }
+        }
+	switch (state)
+        { case 1:
+            if (c == ']')
+	      state = 4;
+	    *s++ = c;
+	    continue;
+	  case 2:
+	    if (c == '-')
+              state = 6;
+	    *s++ = c;
+	    continue;
+	  case 3:
+	    if (c == '?')
+	      state = 8;
+	    *s++ = c;
+	    continue;
+          /* CDATA */
+	  case 4:
+	    if (c == ']')
+              state = 5;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+	  case 5:
+	    if (c == '>')
+	      state = 0;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+          /* comment */
+          case 6:
+            if (c == '-')
+	      state = 7;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          case 7:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          /* PI */
+	  case 8:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 3;
+	    *s++ = c;
+	    continue;
+        }
+        switch (c)
+        {
+        case '/':
+          if (n > 0)
+          { c = soap_getchar(soap);
+            if (c == '>')
+              n--;
+            soap_unget(soap, c);
+          }
+          *s++ = '/';
+          break;
+        case '<':
+	  c = soap_getchar(soap);
+	  if (c == '/')
+	  { if (n == 0)
+	    { c = SOAP_TT;
+	      goto end;
+	    }
+	    n--;
+	  }
+	  else if (c == '!')
+	  { c = soap_getchar(soap);
+	    if (c == '[')
+            { do c = soap_getchar(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                 goto end;
+	      t = (char*)"![CDATA[";
+	      m = 8;
+	      state = 1;
+	    }
+            else if (c == '-')
+	    { if ((c = soap_getchar(soap)) == '-')
+	        state = 2;
+	      t = (char*)"!-";
+	      m = 2;
+	      soap_unget(soap, c);
+	    }
+	    else
+	    { t = (char*)"!";
+	      m = 1;
+	      soap_unget(soap, c);
+	    }
+	    *s++ = '<';
+	    break;
+	  }
+	  else if (c == '?')
+	    state = 3;
+	  else
+	    n++;
+          soap_unget(soap, c);
+          *s++ = '<';
+          break;
+        case '>':
+          *s++ = '>';
+          break;
+        case '"':
+          *s++ = '"';
+          break;
+        default:
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+          if (soap->mode & SOAP_C_MBSTRING)
+          { m = wctomb(buf, c & 0x7FFFFFFF);
+            if (m >= 1 && m <= (int)MB_CUR_MAX)
+            { t = buf;
+              *s++ = *t++;
+              m--;
+            }
+            else
+            { *s++ = SOAP_UNKNOWN_CHAR;
+	      m = 0;
+	    }
+          }
+          else
+#endif
+#endif
+            *s++ = (char)(c & 0xFF);
+        }
+	l++;
+        if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+        { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+          soap->error = SOAP_LENGTH;
+          return NULL;
+        }
+      }
+    }
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;			/* use look-aside buffer */
+#else
+  if (soap_new_block(soap))
+    return NULL;
+#endif
+  for (;;)
+  { 
+#ifdef WITH_FAST
+    register size_t k;
+    if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+      return NULL;
+    s = soap->labbuf + soap->labidx;	/* space to populate */
+    k = soap->lablen - soap->labidx;	/* number of bytes available */
+    soap->labidx = soap->lablen;	/* claim this space */
+#else
+    register size_t k = SOAP_BLKLEN;
+    if (!(s = (char*)soap_push_block(soap, k)))
+      return NULL;
+#endif
+    for (i = 0; i < k; i++)
+    { if (m > 0)
+      { *s++ = *t++;	/* copy multibyte characters */
+        m--;
+        continue;
+      }
+      if (soap->mode & SOAP_C_UTFSTRING)
+      { if (((c = soap_get(soap)) & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+        { c &= 0x7FFFFFFF;
+          t = buf;
+          if (c < 0x0800)
+            *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+          else
+          { if (c < 0x010000)
+              *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+            else
+            { if (c < 0x200000)
+                *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+              else
+              { if (c < 0x04000000)
+                  *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                else
+                { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                  *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+              }     
+              *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+            }
+            *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+          }
+          *t++ = (char)(0x80 | (c & 0x3F));
+	  m = (int)(t - buf) - 1;
+          t = buf;
+          *s++ = *t++;
+          continue;
+        }
+      }
+      else
+        c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        t = (char*)"/";
+	m = 1;
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_get(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<' | 0x80000000:
+        if (flag)
+          *s++ = '<';
+        else
+        { *s++ = '&';
+          t = (char*)"lt;";
+	  m = 3;
+        }
+        break;
+      case '>' | 0x80000000:
+        if (flag)
+          *s++ = '>';
+        else
+        { *s++ = '&';
+          t = (char*)"gt;";
+	  m = 3;
+        }
+        break;
+      case '&' | 0x80000000:
+        if (flag)
+          *s++ = '&';
+        else
+        { *s++ = '&';
+          t = (char*)"amp;";
+	  m = 4;
+        }
+        break;
+      case '"' | 0x80000000:
+        if (flag)
+          *s++ = '"';
+        else
+        { *s++ = '&';
+          t = (char*)"quot;";
+	  m = 5;
+        }
+        break;
+      case '\'' | 0x80000000:
+        if (flag)
+          *s++ = '\'';
+        else
+        { *s++ = '&';
+          t = (char*)"apos;";
+	  m = 5;
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+        if (soap->mode & SOAP_C_MBSTRING)
+        { m = wctomb(buf, c & 0x7FFFFFFF);
+          if (m >= 1 && m <= (int)MB_CUR_MAX)
+          { t = buf;
+            *s++ = *t++;
+            m--;
+          }
+          else
+          { *s++ = SOAP_UNKNOWN_CHAR;
+	    m = 0;
+	  }
+        }
+        else
+#endif
+#endif
+          *s++ = (char)(c & 0xFF);
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+#ifdef WITH_FAST
+  t = soap_strdup(soap, soap->labbuf);
+#else
+  soap_size_block(soap, i+1);
+  t = soap_save_block(soap, NULL, 0);
+#endif
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (flag == 3)
+      soap->dom->tail = t;
+    else
+      soap->dom->data = t;
+  }
+#endif
+  if (flag == 2)
+    if (soap_s2QName(soap, t, &t))
+      return NULL;
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_wstring_out(struct soap *soap, const wchar_t *s, int flag)
+{ const char *t;
+  char tmp;
+  register soap_wchar c;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { wchar_t *r = (wchar_t*)s;
+    int n = 1;
+    while (*r++)
+      n++;
+    soap->dom->wide = r = (wchar_t*)soap_malloc(soap, n * sizeof(wchar_t));
+    while (n--)
+      *r++ = *s++;
+    return SOAP_OK;
+  }
+#endif
+  while ((c = *s++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+        t = "&#x9;";
+      else
+        t = "\t";
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+        t = "&#xA;";
+      else
+        t = "\n";
+      break;
+    case 13:
+      t = "&#xD;";
+      break;
+    case '&':
+      t = "&amp;";
+      break;
+    case '<':
+      t = "&lt;";
+      break;
+    case '>':
+      if (flag)
+        t = ">";
+      else
+	t = "&gt;";
+      break;
+    case '"':
+      if (flag)
+        t = "&quot;";
+      else
+        t = "\"";
+      break;
+    default:
+      if (c > 0 && c < 0x80)
+      { tmp = (char)c;
+        if (soap_send_raw(soap, &tmp, 1))
+          return soap->error;
+      }
+      else if (soap_pututf8(soap, (unsigned long)c))
+        return soap->error;
+      continue;
+    }
+    if (soap_send(soap, t))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t *
+SOAP_FMAC2
+soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ wchar_t *s;
+  register int i, n = 0;
+  register long l = 0;
+  register soap_wchar c;
+  const char *t = NULL;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading wide string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+    }
+  }
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { if (!(s = (wchar_t*)soap_push_block(soap, sizeof(wchar_t)*SOAP_BLKLEN)))
+      return NULL;
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { if (t)
+      { *s++ = (wchar_t)*t++;
+        if (!*t)
+          t = NULL;
+        continue;
+      }
+      c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        soap_unget(soap, '/');
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_getutf8(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<':
+        if (flag)
+          *s++ = (soap_wchar)'<';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "lt;";
+        }
+        break;
+      case '>':
+        if (flag)
+          *s++ = (soap_wchar)'>';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "gt;";
+        }
+        break;
+      case '"':
+        if (flag)
+          *s++ = (soap_wchar)'"';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "quot;";
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+        *s++ = (wchar_t)c & 0x7FFFFFFF;
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+  soap_size_block(soap, sizeof(wchar_t) * (i + 1));
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+  s = (wchar_t*)soap_save_block(soap, NULL, 0);
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->wide = s;
+#endif
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_int2s(struct soap *soap, int n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outint(struct soap *soap, const char *tag, int id, const int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2int(struct soap *soap, const char *s, int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (int)soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int *
+SOAP_FMAC2
+soap_inint(struct soap *soap, const char *tag, int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (int*)soap_id_enter(soap, soap->id, p, t, sizeof(int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(int), 0, NULL);
+  else if (p)
+  { if (soap_s2int(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_long2s(struct soap *soap, long n)
+{ sprintf(soap->tmpbuf, "%ld", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outlong(struct soap *soap, const char *tag, int id, const long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2long(struct soap *soap, const char *s, long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+long *
+SOAP_FMAC2
+soap_inlong(struct soap *soap, const char *tag, long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (long*)soap_id_enter(soap, soap->id, p, t, sizeof(long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(long), 0, NULL);
+  else if (p)
+  { if (soap_s2long(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_LONG642s(struct soap *soap, LONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_LONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outLONG64(struct soap *soap, const char *tag, int id, const LONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_LONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2LONG64(struct soap *soap, const char *s, LONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOLL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoll(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_LONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+LONG64 *
+SOAP_FMAC2
+soap_inLONG64(struct soap *soap, const char *tag, LONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (LONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(LONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (LONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(LONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2LONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_byte2s(struct soap *soap, char n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outbyte(struct soap *soap, const char *tag, int id, const char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2byte(struct soap *soap, const char *s, char *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -128 || n > 127)
+      soap->error = SOAP_TYPE;
+    *p = (char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_inbyte(struct soap *soap, const char *tag, char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (char*)soap_id_enter(soap, soap->id, p, t, sizeof(char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(char), 0, NULL);
+  else if (p)
+  { if (soap_s2byte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_short2s(struct soap *soap, short n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outshort(struct soap *soap, const char *tag, int id, const short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2short(struct soap *soap, const char *s, short *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -32768 || n > 32767)
+      soap->error = SOAP_TYPE;
+    *p = (short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+short *
+SOAP_FMAC2
+soap_inshort(struct soap *soap, const char *tag, short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (short*)soap_id_enter(soap, soap->id, p, t, sizeof(short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(short), 0, NULL);
+  else if (p)
+  { if (soap_s2short(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_float2s(struct soap *soap, float n)
+{ const char *s;
+  if (soap_isnan((double)n))
+    s = "NaN";
+  else if (soap_ispinff(n))
+    s = "INF";
+  else if (soap_isninff(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->float_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outfloat(struct soap *soap, const char *tag, int id, const float *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_float2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2float(struct soap *soap, const char *s, float *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = FLT_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = FLT_NAN;
+    else
+    {
+/* On some systems, strtof appears to be broken or doesn't link: use with caution */
+#if defined(HAVE_STRTOF)
+      char *r;
+      *p = strtof((char*)s, &r);
+      if (*r)
+#elif defined(HAVE_STRTOD)
+      char *r;
+      *p = (float)strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%g", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static int soap_isnumeric(struct soap *soap, const char *type)
+{ if (soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":float")
+   && soap_match_tag(soap, soap->type, ":double")
+   && soap_match_tag(soap, soap->type, ":decimal")
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return SOAP_ERR;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+float *
+SOAP_FMAC2
+soap_infloat(struct soap *soap, const char *tag, float *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (float*)soap_id_enter(soap, soap->id, p, t, sizeof(float), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (float*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(float), 0, NULL);
+  else if (p)
+  { if (soap_s2float(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_double2s(struct soap *soap, double n)
+{ const char *s;
+  if (soap_isnan(n))
+    s = "NaN";
+  else if (soap_ispinfd(n))
+    s = "INF";
+  else if (soap_isninfd(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->double_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdouble(struct soap *soap, const char *tag, int id, const double *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_double2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2double(struct soap *soap, const char *s, double *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = DBL_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = DBL_NAN;
+    else
+    {
+#ifdef HAVE_STRTOD
+      char *r;
+      *p = strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%lg", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+double *
+SOAP_FMAC2
+soap_indouble(struct soap *soap, const char *tag, double *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (double*)soap_id_enter(soap, soap->id, p, t, sizeof(double), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (double*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(double), 0, NULL);
+  else if (p)
+  { if (soap_s2double(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedByte2s(struct soap *soap, unsigned char n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedByte(struct soap *soap, const char *tag, int id, const unsigned char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedByte(struct soap *soap, const char *s, unsigned char *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 255)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned char *
+SOAP_FMAC2
+soap_inunsignedByte(struct soap *soap, const char *tag, unsigned char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned char*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned char), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedByte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedShort2s(struct soap *soap, unsigned short n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedShort(struct soap *soap, const char *tag, int id, const unsigned short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedShort(struct soap *soap, const char *s, unsigned short *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 65535)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned short *
+SOAP_FMAC2
+soap_inunsignedShort(struct soap *soap, const char *tag, unsigned short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned short*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned short), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedShort(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedInt2s(struct soap *soap, unsigned int n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedInt(struct soap *soap, const char *tag, int id, const unsigned int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedInt(struct soap *soap, const char *s, unsigned int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (unsigned int)soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned int *
+SOAP_FMAC2
+soap_inunsignedInt(struct soap *soap, const char *tag, unsigned int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned int*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned int), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedInt(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedLong2s(struct soap *soap, unsigned long n)
+{ sprintf(soap->tmpbuf, "%lu", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedLong(struct soap *soap, const char *tag, int id, const unsigned long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedLong(struct soap *soap, const char *s, unsigned long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned long *
+SOAP_FMAC2
+soap_inunsignedLong(struct soap *soap, const char *tag, unsigned long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned long*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned long), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedLong(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_ULONG642s(struct soap *soap, ULONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_ULONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outULONG64(struct soap *soap, const char *tag, int id, const ULONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_ULONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2ULONG64(struct soap *soap, const char *s, ULONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOULL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoull(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_ULONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+ULONG64 *
+SOAP_FMAC2
+soap_inULONG64(struct soap *soap, const char *tag, ULONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (ULONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(ULONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (ULONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(ULONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2ULONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2string(struct soap *soap, const char *s, char **t)
+{ *t = NULL;
+  if (s)
+  { if (!(*t = soap_strdup(soap, s)))
+      return soap->error = SOAP_EOM;
+    if (!(soap->mode & (SOAP_ENC_LATIN | SOAP_C_UTFSTRING)))
+    { /* TODO: consider truncating UTF8 to ASCII for regular XML attribute strings? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2QName(struct soap *soap, const char *s, char **t)
+{ if (s)
+  { struct soap_nlist *np;
+    const char *p;
+    if (!strncmp(s, "xml:", 4))
+    { *t = soap_strdup(soap, s);
+      return SOAP_OK;
+    }
+    np = soap->nlist;
+    p = strchr(s, ':');
+    if (p)
+    { register int n = p - s;
+      while (np && (strncmp(np->id, s, n) || np->id[n]))
+        np = np->next;
+      p++;
+    }
+    else
+    { while (np && *np->id)
+        np = np->next;
+      p = s;
+    }
+    if (np)
+    { if (np->index >= 0 && soap->local_namespaces)
+      { register const char *q = soap->local_namespaces[np->index].id;
+        if (q)
+        { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(q) + 2)))
+            sprintf(*t, "%s:%s", q, p);
+          return SOAP_OK;
+        }
+      }
+      if (np->ns)
+      { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(np->ns) + 4)))
+          sprintf(*t, "\"%s\":%s", np->ns, p);
+        return SOAP_OK;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined (index=%d, URI=%s)\n", s, np->index, np->ns?np->ns:""));
+      return soap->error = SOAP_NAMESPACE; 
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined, assuming empty namespace\n", s));
+    if ((*t = (char*)soap_malloc(soap, strlen(p) + 4)))
+      sprintf(*t, "\"\":%s", p);
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_QName2s(struct soap *soap, const char *s)
+{ struct Namespace *p;
+  char *t;
+  int n;
+  if (!s || *s != '"')
+  {
+#ifndef WITH_LEAN
+    if (s && (soap->mode & SOAP_XML_CANONICAL))
+    { t = (char*)strchr(s, ':');
+      if (t)
+        soap_utilize_ns(soap, s, t - s);
+    }
+#endif
+    return s;
+  }
+  s++;
+  if ((p = soap->local_namespaces))
+  { for (; p->id; p++)
+    { if (p->ns)
+        if (!soap_tag_cmp(s, p->ns))
+          break;
+      if (p->in)
+        if (!soap_tag_cmp(s, p->in))
+          break;
+    }
+    if (p && p->id)
+    { s = strchr(s, '"');
+      if (s)
+      { t = (char*)soap_malloc(soap, strlen(p->id) + strlen(s));
+        strcpy(t, p->id);
+	strcat(t, s + 1);
+        return t;
+      }
+    }
+  }
+  t = (char*)strchr(s, '"');
+  if (t)
+    n = t - s;
+  else
+    n = 0;
+  t = soap_strdup(soap, s);
+  t[n] = '\0';
+  sprintf(soap->tmpbuf, "xmlns:_%d", soap->idnum++);
+  soap_set_attr(soap, soap->tmpbuf, t);
+  s = strchr(s, '"');
+  if (s)
+  { t = (char*)soap_malloc(soap, strlen(soap->tmpbuf) + strlen(s) - 6);
+    strcpy(t, soap->tmpbuf + 6);
+    strcat(t, s + 1);
+  }
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2wchar(struct soap *soap, const char *s, wchar_t **t)
+{ wchar_t *r;
+  if (!s)
+    *t = NULL;
+  else
+  { *t = r = (wchar_t*)soap_malloc(soap, sizeof(wchar_t) * (strlen(s) + 1));
+    if (!r)
+      return soap->error;
+    if (soap->mode & SOAP_ENC_LATIN)
+    { while (*s)
+        *r++ = (wchar_t)*s++;
+    }
+    else
+    { /* Convert UTF8 to wchar */
+      while (*s)
+      { register soap_wchar c, c1, c2, c3, c4;
+        c = *s++;
+        if (c < 0x80)
+	  *r++ = (wchar_t)c;
+	else
+        { c1 = (soap_wchar)*s++ & 0x3F;
+          if (c < 0xE0)
+            *r++ = (wchar_t)(((soap_wchar)(c & 0x1F) << 6) | c1);
+          else
+	  { c2 = (soap_wchar)*s++ & 0x3F;
+            if (c < 0xF0)
+              *r++ = (wchar_t)(((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2);
+            else
+	    { c3 = (soap_wchar)*s++ & 0x3F;
+              if (c < 0xF8)
+                *r++ = (wchar_t)(((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3);
+              else
+	      { c4 = (soap_wchar)*s++ & 0x3F;
+                if (c < 0xFC)
+                  *r++ = (wchar_t)(((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4);
+                else
+		  *r++ = (wchar_t)(((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(*s++ & 0x3F));
+              }
+            }
+          }
+        }
+      }
+    }
+    *r = L'\0';
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_wchar2s(struct soap *soap, const wchar_t *s)
+{ register soap_wchar c;
+  register char *r, *t;
+  const wchar_t *q = s;
+  size_t n = 0;
+  while ((c = *q++))
+  { if (c > 0 && c < 0x80)
+      n++;
+    else
+      n += 6;
+  }
+  r = t = (char*)soap_malloc(soap, n + 1);
+  if (r)
+  { /* Convert wchar to UTF8 */
+    while ((c = *s++))
+    { if (c > 0 && c < 0x80)
+        *t++ = (char)c;
+      else
+      { if (c < 0x0800)
+          *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+        else
+        { if (c < 0x010000)
+            *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+          else
+          { if (c < 0x200000)
+              *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+            else
+            { if (c < 0x04000000)
+                *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+              else
+              { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+              }
+              *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+            }     
+            *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+        }
+        *t++ = (char)(0x80 | (c & 0x3F));
+      }
+    }
+    *t = '\0';
+  }
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outstring(struct soap *soap, const char *tag, int id, char *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_string_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_instring(struct soap *soap, const char *tag, char **p, const char *type, int t, int flag, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_string_in(soap, flag, minlen, maxlen);
+    if (!*p || !(char*)soap_id_enter(soap, soap->id, *p, t, sizeof(char*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (char**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(char**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwstring(struct soap *soap, const char *tag, int id, wchar_t *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_wstring_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type, int t, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_wstring_in(soap, 1, minlen, maxlen);
+    if (!*p || !(wchar_t*)soap_id_enter(soap, soap->id, *p, t, sizeof(wchar_t*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (wchar_t**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(wchar_t**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static time_t
+soap_timegm(struct tm *T)
+{
+#if defined(HAVE_TIMEGM)
+  return timegm(T);
+#else
+  time_t t, g, z;
+#ifdef HAVE_GMTIME_R
+  struct tm tm, *tmp = &tm;
+#else
+  struct tm *tmp;
+#endif
+  t = mktime(T);
+  if (t == -1)
+    return -1;
+#ifdef HAVE_GMTIME_R
+  gmtime_r(&t, tmp);
+#else
+  tmp = gmtime(&t);
+#endif
+  tmp->tm_isdst = 0;
+  g = mktime(tmp);
+  if (g == -1)
+    return -1;
+  z = g - t;
+  return t - z;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_dateTime2s(struct soap *soap, time_t n)
+{ struct tm T, *pT = &T;
+#if defined(HAVE_GMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PGMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_PGMTIME)
+  if (gmtime(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GMTIME)
+  if ((pT = gmtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GETTIMEOFDAY)
+  struct timezone tz;
+  memset((void*)&tz, 0, sizeof(tz));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+#endif
+#elif defined(HAVE_FTIME)
+  struct timeb t;
+  memset((void*)&t, 0, sizeof(t));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+  /* The following defines were added for VxWorks*/
+# elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf+strlen(soap->tmpbuf), "%+03d:%02d", t.timezone/60, abs(t.timezone)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+# endif
+#elif defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#else
+  if ((pT = localtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#endif
+  else
+    strcpy(soap->tmpbuf, "1969-12-31T23:59:59Z");
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdateTime(struct soap *soap, const char *tag, int id, const time_t *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_dateTime2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2dateTime(struct soap *soap, const char *s, time_t *p)
+{ if (s)
+  { struct tm T;
+    char zone[16];
+    const char *t;
+    memset((void*)&T, 0, sizeof(T));
+    zone[sizeof(zone)-1] = '\0';
+    if (strchr(s, '-'))
+      t = "%d-%d-%dT%d:%d:%d%15s";
+    else if (strchr(s, ':'))
+      t = "%4d%2d%2dT%d:%d:%d%15s";
+    else /* parse non-XSD-standard alternative ISO 8601 format */
+      t = "%4d%2d%2dT%2d%2d%2d%15s";
+    sscanf(s, t, &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, zone);
+    if (T.tm_year == 1)
+      T.tm_year = 70;
+    else
+      T.tm_year -= 1900;
+    T.tm_mon--;
+    if (*zone)
+    { if (*zone == '.')
+      { for (s = zone + 1; *s; s++)
+          if (*s < '0' || *s > '9')
+            break;
+      }
+      else
+        s = zone;
+      if (*s == '+' || *s == '-')
+      { int h = 0, m = 0;
+        if (s[3] == ':')
+	{ sscanf(s, "%d:%d", &h, &m);
+	  if (h < 0)
+	    m = -m;
+	}
+	else
+	{ m = (int)atol(s);
+	  h = m / 100;
+	  m = m % 100;
+	}
+        T.tm_hour -= h;
+        T.tm_min -= m;
+      }
+      T.tm_isdst = 0;
+      *p = soap_timegm(&T);
+    }
+    else
+    { T.tm_isdst = -1;
+      *p = mktime(&T); /* no time zone: suppose it is localtime? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+time_t *
+SOAP_FMAC2
+soap_indateTime(struct soap *soap, const char *tag, time_t *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":dateTime"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (time_t*)soap_id_enter(soap, soap->id, p, t, sizeof(time_t), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (time_t*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(time_t), 0, NULL);
+  else if (p)
+  { if (soap_s2dateTime(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outliteral(struct soap *soap, const char *tag, char *const*p)
+{ int i;
+  const char *t = NULL;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p && *p)
+  { if (soap_send(soap, *p))
+      return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_inliteral(struct soap *soap, const char *tag, char **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_string_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwliteral(struct soap *soap, const char *tag, wchar_t *const*p)
+{ int i;
+  const char *t = NULL;
+  wchar_t c;
+  const wchar_t *s;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p)
+  { s = *p;
+    while ((c = *s++))
+      if (soap_pututf8(soap, (unsigned char)c))
+        return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwliteral(struct soap *soap, const char *tag, wchar_t **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_wstring_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_token(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF || soap_blank(c))
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_value(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  for (s--; i > 0; i--, s--)
+    if (!soap_blank(*s))
+      break;
+  s[1] = '\0';
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->data = soap_strdup(soap, soap->tmpbuf);
+#endif
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEANER) || !defined(WITH_NOHTTP)
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getline(struct soap *soap, char *s, int len)
+{ int i = len;
+  soap_wchar c = 0;
+  for (;;)
+  { while (--i > 0)
+    { c = soap_getchar(soap);
+      if (c == '\r' || c == '\n')
+        break;
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+    if (c != '\n')
+      c = soap_getchar(soap); /* got \r, now get \n */
+    if (c == '\n')
+    { *s = '\0';
+      if (i+1 == len) /* empty line: end of HTTP/MIME header */
+        break;
+      c = soap_unget(soap, soap_getchar(soap));
+      if (c != ' ' && c != '\t') /* HTTP line continuation? */
+        break;
+    }
+    else if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static size_t
+soap_count_attachments(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  register struct soap_multipart *content;
+  register size_t count = soap->count;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the message size with attachments, current count=%lu\n", (unsigned long)count));
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of DIME attachments\n"));
+    for (content = soap->dime.first; content; content = content->next)
+    { count += 12 + ((content->size+3)&(~3));
+      if (content->id)
+        count += ((strlen(content->id)+3)&(~3));
+      if (content->type)
+        count += ((strlen(content->type)+3)&(~3));
+      if (content->options)
+        count += ((((unsigned char)content->options[2] << 8) | ((unsigned char)content->options[3]))+7)&(~3);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of DIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary)
+  { register size_t n = strlen(soap->mime.boundary);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of MIME attachments\n"));
+    for (content = soap->mime.first; content; content = content->next)
+    { register const char *s;
+      /* count \r\n--boundary\r\n */
+      count += 6 + n;
+      /* count Content-Type: ...\r\n */
+      if (content->type)
+        count += 16 + strlen(content->type);
+      /* count Content-Transfer-Encoding: ...\r\n */
+      s = soap_str_code(mime_codes, content->encoding);
+      if (s)
+        count += 29 + strlen(s);
+      /* count Content-ID: ...\r\n */
+      if (content->id)
+        count += 14 + strlen(content->id);
+      /* count Content-Location: ...\r\n */
+      if (content->location)
+        count += 20 + strlen(content->location);
+      /* count Content-Description: ...\r\n */
+      if (content->description)
+        count += 23 + strlen(content->location);
+      /* count \r\n...content */
+      count += 2 + content->size;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of MIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+    /* count \r\n--boundary-- */
+    count += 6 + n;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New count is %lu bytes\n", (unsigned long)count));
+  return count;
+#else
+  return soap->count;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_putdimefield(struct soap *soap, const char *s, size_t n)
+{ if (soap_send_raw(soap, s, n))
+    return soap->error;
+  return soap_send_raw(soap, SOAP_STR_PADDING, -(long)n&3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_dime_option(struct soap *soap, unsigned short optype, const char *option)
+{ size_t n;
+  char *s = NULL;
+  if (option)
+  { n = strlen(option);
+    s = (char*)soap_malloc(soap, n + 5);
+    if (s)
+    { s[0] = optype >> 8;
+      s[1] = optype & 0xFF;
+      s[2] = n >> 8;
+      s[3] = n & 0xFF;
+      strcpy(s + 4, option);
+    }
+  }
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdimehdr(struct soap *soap)
+{ unsigned char tmp[12];
+  size_t optlen = 0, idlen = 0, typelen = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Put DIME header id='%s'\n", soap->dime.id?soap->dime.id:""));
+  if (soap->dime.options)
+    optlen = (((unsigned char)soap->dime.options[2] << 8) | ((unsigned char)soap->dime.options[3])) + 4;
+  if (soap->dime.id)
+    idlen = strlen(soap->dime.id);
+  if (soap->dime.type)
+    typelen = strlen(soap->dime.type);
+  tmp[0] = SOAP_DIME_VERSION | (soap->dime.flags & 0x7);
+  tmp[1] = soap->dime.flags & 0xF0;
+  tmp[2] = optlen >> 8;
+  tmp[3] = optlen & 0xFF;
+  tmp[4] = idlen >> 8;
+  tmp[5] = idlen & 0xFF;
+  tmp[6] = typelen >> 8;
+  tmp[7] = typelen & 0xFF;
+  tmp[8] = soap->dime.size >> 24;
+  tmp[9] = (soap->dime.size >> 16) & 0xFF;
+  tmp[10] = (soap->dime.size >> 8) & 0xFF;
+  tmp[11] = soap->dime.size & 0xFF;
+  if (soap_send_raw(soap, (char*)tmp, 12)
+   || soap_putdimefield(soap, soap->dime.options, optlen)
+   || soap_putdimefield(soap, soap->dime.id, idlen)
+   || soap_putdimefield(soap, soap->dime.type, typelen))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return SOAP_OK;
+  for (content = soap->dime.first; content; content = content->next)
+  { void *handle;
+    soap->dime.size = content->size;
+    soap->dime.id = content->id;
+    soap->dime.type = content->type;
+    soap->dime.options = content->options;
+    soap->dime.flags = SOAP_DIME_VERSION | SOAP_DIME_MEDIA;
+    if (soap->fdimereadopen && ((handle = soap->fdimereadopen(soap, (void*)content->ptr, content->id, content->type, content->options)) || soap->error))
+    { size_t size = content->size;
+      if (!handle)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadopen failed\n"));
+        return soap->error;
+      }
+      if (!content->size && ((soap->mode & SOAP_ENC_XML) || (soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_IO) == SOAP_IO_STORE))
+      { size_t chunksize = sizeof(soap->tmpbuf);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked streaming DIME\n"));
+        do 
+        { size = soap->fdimeread(soap, handle, soap->tmpbuf, chunksize);
+          DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread returned %lu bytes\n", (unsigned long)size));
+          if (size < chunksize)
+ 	  { soap->dime.flags &= ~SOAP_DIME_CF;
+            if (!content->next)
+              soap->dime.flags |= SOAP_DIME_ME;
+	  }
+          else
+            soap->dime.flags |= SOAP_DIME_CF;
+	  soap->dime.size = size;
+          if (soap_putdimehdr(soap)
+	   || soap_putdimefield(soap, soap->tmpbuf, size))
+            break;
+          if (soap->dime.id)
+ 	  { soap->dime.flags &= ~(SOAP_DIME_MB | SOAP_DIME_MEDIA);
+            soap->dime.id = NULL;
+            soap->dime.type = NULL;
+            soap->dime.options = NULL;
+          }  
+        } while (size >= chunksize);
+      }
+      else
+      { if (!content->next)
+          soap->dime.flags |= SOAP_DIME_ME;
+        if (soap_putdimehdr(soap))
+          return soap->error;
+        do
+        { size_t bufsize;
+	  if (size < sizeof(soap->tmpbuf))
+            bufsize = size;
+          else
+            bufsize = sizeof(soap->tmpbuf);
+          if (!(bufsize = soap->fdimeread(soap, handle, soap->tmpbuf, bufsize)))
+          { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread failed: insufficient data (%lu bytes remaining from %lu bytes)\n", (unsigned long)size, (unsigned long)soap->dime.size));
+            soap->error = SOAP_EOF;
+	    break;
+          }
+          if (soap_send_raw(soap, soap->tmpbuf, bufsize))
+            break;
+          size -= bufsize;
+        } while (size);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+        soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+      if (soap->fdimereadclose)
+        soap->fdimereadclose(soap, handle);
+    }
+    else
+    { if (!content->next)
+        soap->dime.flags |= SOAP_DIME_ME;
+      if (soap_putdimehdr(soap)
+       || soap_putdimefield(soap, (char*)content->ptr, content->size))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static char *
+soap_getdimefield(struct soap *soap, size_t n)
+{ register soap_wchar c;
+  register int i;
+  register char *s;
+  char *p = NULL;
+  if (n)
+  { p = (char*)soap_malloc(soap, n + 1);
+    if (p)
+    { s = p;
+      for (i = n; i > 0; i--)
+      { if ((int)(c = soap_get1(soap)) == EOF)
+        { soap->error = SOAP_EOF;
+          return NULL;
+        }
+        *s++ = (char)c;
+      }
+      *s = '\0';
+      if ((soap->error = soap_move(soap, -(long)n&3)))
+        return NULL;
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdimehdr(struct soap *soap)
+{ register soap_wchar c;
+  register char *s;
+  register int i;
+  unsigned char tmp[12];
+  size_t optlen, idlen, typelen;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return soap->error = SOAP_DIME_END;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME header\n"));
+  if (soap->dime.buflen || soap->dime.chunksize)
+  { if (soap_move(soap, (long)(soap->dime.size - soap_tell(soap))))
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, soap_getchar(soap)); /* skip padding and get hdr */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... From chunked\n"));
+    return SOAP_OK;
+  }
+  s = (char*)tmp;
+  for (i = 12; i > 0; i--)
+  { if ((int)(c = soap_getchar(soap)) == EOF)
+      return soap->error = SOAP_EOF;
+    *s++ = (char)c;
+  }
+  if ((tmp[0] & 0xF8) != SOAP_DIME_VERSION)
+    return soap->error = SOAP_DIME_MISMATCH;
+  soap->dime.flags = (tmp[0] & 0x7) | (tmp[1] & 0xF0);
+  optlen = (tmp[2] << 8) | tmp[3];
+  idlen = (tmp[4] << 8) | tmp[5];
+  typelen = (tmp[6] << 8) | tmp[7];
+  soap->dime.size = (tmp[8] << 24) | (tmp[9] << 16) | (tmp[10] << 8) | tmp[11];
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME size=%lu flags=0x%X\n", (unsigned long)soap->dime.size, soap->dime.flags));
+  if (!(soap->dime.options = soap_getdimefield(soap, optlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.id = soap_getdimefield(soap, idlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.type = soap_getdimefield(soap, typelen)) && soap->error)
+    return soap->error;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME id=%s, type=%s, options=%s\n", soap->dime.id?soap->dime.id:"", soap->dime.type?soap->dime.type:"", soap->dime.options?soap->dime.options+4:""));
+  if (soap->dime.flags & SOAP_DIME_ME)
+    soap->mode &= ~SOAP_ENC_DIME;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdime(struct soap *soap)
+{ while (soap->dime.flags & SOAP_DIME_CF)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap_move(soap, soap->dime.size))
+      return soap->error = SOAP_EOF;
+  }
+  if (soap_move(soap, ((soap->dime.size+3)&(~3))-soap_tell(soap)))
+    return soap->error = SOAP_EOF;
+  for (;;)
+  { register struct soap_multipart *content;
+    if (soap_getdimehdr(soap))
+      break;
+    if (soap->fdimewriteopen && ((soap->dime.ptr = (char*)soap->fdimewriteopen(soap, soap->dime.id, soap->dime.type, soap->dime.options)) || soap->error))
+    { const char *id, *type, *options;
+      size_t size, n;
+      if (!soap->dime.ptr)
+        return soap->error;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      for (;;)
+      { size = soap->dime.size;
+        for (;;)
+        { n = soap->buflen - soap->bufidx;
+          if (size < n)
+            n = size;
+          if ((soap->error = soap->fdimewrite(soap, (void*)soap->dime.ptr, soap->buf + soap->bufidx, n)))
+            break;
+	  size -= n;
+	  if (!size)
+	  { soap->bufidx += n;
+	    break;
+	  }
+	  if (soap_recv(soap))
+          { soap->error = SOAP_EOF;
+	    goto end;
+          }
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+        { soap->error = SOAP_EOF;
+	  break;
+        }
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          break;
+      }
+end:
+      if (soap->fdimewriteclose)
+        soap->fdimewriteclose(soap, (void*)soap->dime.ptr);
+      soap->dime.size = 0;
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else if (soap->dime.flags & SOAP_DIME_CF)
+    { const char *id, *type, *options;
+      register soap_wchar c;
+      register char *s;
+      register int i;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      if (soap_new_block(soap))
+        return SOAP_EOM;
+      for (;;)
+      { s = (char*)soap_push_block(soap, soap->dime.size);
+        if (!s)
+          return soap->error = SOAP_EOM;
+        for (i = soap->dime.size; i > 0; i--)
+        { if ((int)(c = soap_get1(soap)) == EOF)
+            return soap->error = SOAP_EOF;
+          *s++ = (char)c;
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+          return soap->error = SOAP_EOF;
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          return soap->error;
+      }
+      soap->dime.size = soap->blist->size++; /* allocate one more for '\0' */
+      if (!(soap->dime.ptr = soap_save_block(soap, NULL, 0)))
+        return soap->error;
+      soap->dime.ptr[soap->dime.size] = '\0'; /* force 0-terminated */
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else
+      soap->dime.ptr = soap_getdimefield(soap, soap->dime.size);
+    content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, soap->dime.ptr, soap->dime.size);
+    if (!content)
+      return soap->error = SOAP_EOM;
+    content->id = soap->dime.id;
+    content->type = soap->dime.type;
+    content->options = soap->dime.options;
+    soap_resolve_attachment(soap, content);
+    if (soap->error)
+      return soap->error;
+  }
+  if (soap->error != SOAP_DIME_END)
+    return soap->error;
+  return soap->error = SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmimehdr(struct soap *soap)
+{ struct soap_multipart *content;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  while (!*soap->msgbuf);
+  if (soap->msgbuf[0] == '-' && soap->msgbuf[1] == '-')
+  { char *s = soap->msgbuf + strlen(soap->msgbuf) - 1;
+    /* remove white space */
+    while (soap_blank(*s))
+      s--;
+    s[1] = '\0';
+    if (soap->mime.boundary)
+    { if (strcmp(soap->msgbuf + 2, soap->mime.boundary))
+        return soap->error = SOAP_MIME_ERROR;
+    }
+    else
+      soap->mime.boundary = soap_strdup(soap, soap->msgbuf + 2);
+    if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  if (soap_set_mime_attachment(soap, NULL, 0, SOAP_MIME_NONE, NULL, NULL, NULL, NULL))
+    return soap->error = SOAP_EOM;
+  content = soap->mime.last;
+  for (;;)
+  { register char *key = soap->msgbuf;
+    register char *val;
+    if (!*key)
+      break;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "MIME header: %s\n", key));
+    val = strchr(soap->msgbuf, ':');
+    if (val)
+    { *val = '\0';
+      do val++;
+      while (*val && *val <= 32);
+      if (!soap_tag_cmp(key, "Content-ID"))
+        content->id = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Location"))
+        content->location = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Disposition"))
+        content->id = soap_strdup(soap, soap_get_header_attribute(soap, val, "name"));
+      else if (!soap_tag_cmp(key, "Content-Type"))
+        content->type = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Description"))
+        content->description = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Transfer-Encoding"))
+        content->encoding = (enum soap_mime_encoding)soap_int_code(mime_codes, val, (long)SOAP_MIME_NONE);
+    }
+    if (soap_getline(soap, key, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmime(struct soap *soap)
+{ register soap_wchar c = 0;
+  if (!soap->mime.last)
+    return SOAP_OK;
+  for (;;)
+  { register size_t i, m = 0;
+    register char *s, *t = NULL;
+    struct soap_multipart *content = soap->mime.last;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Parsing MIME content id=%s type=%s\n", content->id?content->id:"", content->type?content->type:""));
+    if (soap_new_block(soap))
+      return soap->error = SOAP_EOM;
+    for (;;)
+    { register short flag = 0;
+      if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+        return soap->error = SOAP_EOM;
+      for (i = 0; i < SOAP_BLKLEN; i++)
+      { if (m > 0)
+        { *s++ = *t++;
+	  m--;
+	}
+	else
+        { if (!flag)
+	  { c = soap_get1(soap);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	  }
+	  if (flag || c == '\r')
+	  { t = soap->tmpbuf;
+	    memset(t, 0, sizeof(soap->tmpbuf));
+            strcpy(t, "\n--");
+            if (soap->mime.boundary)
+	      strncat(t, soap->mime.boundary, sizeof(soap->tmpbuf)-4);
+	    do c = soap_getchar(soap);
+	    while (c == *t++);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	    if (!*--t)
+	      goto end;
+	    *t = (char)c;
+	    flag = (c == '\r');
+	    m = t - soap->tmpbuf + 1 - flag;
+	    t = soap->tmpbuf;
+	    c = '\r';
+	  }
+	  *s++ = (char)c;
+        }
+      }
+    }
+end:
+    *s = '\0'; /* force 0-terminated */
+    content->size = soap_size_block(soap, i+1)-1;
+    content->ptr = soap_save_block(soap, NULL, 0);
+    soap_resolve_attachment(soap, content);
+    if (c == '-' && soap_getchar(soap) == '-')
+      break;
+    while (c != '\r' && (int)c != EOF && soap_blank(c))
+      c = soap_getchar(soap);
+    if (c != '\r' || soap_getchar(soap) != '\n')
+      return soap->error = SOAP_MIME_ERROR;
+    if (soap_getmimehdr(soap))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_match_cid(struct soap *soap, const char *s, const char *t)
+{ register size_t n;
+  if (!s)
+    return 1;
+  if (!strcmp(s, t))
+    return 0;
+  if (!strncmp(s, "cid:", 4))
+    s += 4;
+  n = strlen(t);
+  if (*t == '<')
+  { t++;
+    n -= 2;
+  }
+  if (!strncmp(s, t, n) && !s[n])
+    return 0;
+  soap_decode(soap->tmpbuf, sizeof(soap->tmpbuf), s, SOAP_STR_EOS);
+  if (!strncmp(soap->tmpbuf, t, n) && !soap->tmpbuf[n])
+    return 0;
+  return 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_resolve_attachment(struct soap *soap, struct soap_multipart *content)
+{ if (content->id)
+  { register struct soap_xlist **xp = &soap->xlist;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving attachment data for id=%s\n", content->id));
+    while (*xp)
+    { register struct soap_xlist *xq = *xp;
+      if (!soap_match_cid(soap, xq->id, content->id))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Found matching attachment %s for content id=%s\n", xq->id, content->id));
+	*xp = xq->next;
+        *xq->ptr = (unsigned char*)content->ptr;
+        *xq->size = (int)content->size;
+        *xq->type = (char*)content->type;
+	if (content->options)
+          *xq->options = (char*)content->options;
+        else
+          *xq->options = (char*)content->description;
+	SOAP_FREE(soap, xq);
+      }
+      else
+        xp = &(*xp)->next;
+    }
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmimehdr(struct soap *soap, struct soap_multipart *content)
+{ const char *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "MIME attachment type=%s\n", content->type?content->type:""));
+  if (soap_send3(soap, "\r\n--", soap->mime.boundary, "\r\n"))
+    return soap->error;
+  if (content->type && soap_send3(soap, "Content-Type: ", content->type, "\r\n"))
+    return soap->error;
+  s = soap_str_code(mime_codes, content->encoding);
+  if (s && soap_send3(soap, "Content-Transfer-Encoding: ", s, "\r\n"))
+    return soap->error;
+  if (content->id && soap_send3(soap, "Content-ID: ", content->id, "\r\n"))
+    return soap->error;
+  if (content->location && soap_send3(soap, "Content-Location: ", content->location, "\r\n"))
+    return soap->error;
+  if (content->description && soap_send3(soap, "Content-Description: ", content->description, "\r\n"))
+    return soap->error;
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_MIME) || !soap->mime.boundary)
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending MIME attachments\n"));
+  for (content = soap->mime.first; content; content = content->next)
+    if (soap_putmimehdr(soap, content)
+     || soap_send_raw(soap, content->ptr, content->size))
+      return soap->error;
+  return soap_send3(soap, "\r\n--", soap->mime.boundary, "--");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_dime(struct soap *soap)
+{ soap->omode |= SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_mime(struct soap *soap, const char *boundary, const char *start)
+{ soap->omode |= SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = soap_strdup(soap, boundary);
+  soap->mime.start = soap_strdup(soap, start);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_dime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_mime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart*
+soap_new_multipart(struct soap *soap, struct soap_multipart **first, struct soap_multipart **last, char *ptr, size_t size)
+{ struct soap_multipart *content;
+  content = (struct soap_multipart*)soap_malloc(soap, sizeof(struct soap_multipart));
+  if (content)
+  { content->next = NULL;
+    content->ptr = ptr;
+    content->size = size;
+    content->id = NULL;
+    content->type = NULL;
+    content->options = NULL;
+    content->encoding = SOAP_MIME_NONE;
+    content->location = NULL;
+    content->description = NULL;
+    if (!*first)
+      *first = content;
+    if (*last)
+      (*last)->next = content;
+    *last = content;
+  }
+  return content;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_dime_attachment(struct soap *soap, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->options = soap_dime_option(soap, optype, option);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_mime_attachment(struct soap *soap, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->encoding = encoding;
+  content->location = soap_strdup(soap, location);
+  content->description = soap_strdup(soap, description);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap_multipart*
+SOAP_FMAC2
+soap_next_multipart(struct soap_multipart *content)
+{ if (content)
+    return content->next;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_select_mime_boundary(struct soap *soap)
+{ while (!soap->mime.boundary || soap_valid_mime_boundary(soap))
+  { register char *s = soap->mime.boundary;
+    register size_t n = 0;
+    if (s)
+      n = strlen(s);
+    if (n < 16)
+    { n = 64;
+      s = soap->mime.boundary = (char*)soap_malloc(soap, n + 1);
+      if (!s)
+        return;
+    }
+    strcpy(s, "==");
+    s += 2;
+    n -= 4;
+    while (n)
+    { *s++ = soap_base64o[soap_random & 0x3F];
+      n--;
+    }
+    strcpy(s, "==");
+  }
+  if (!soap->mime.start)
+    soap->mime.start = "<SOAP-ENV:Envelope>";
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_valid_mime_boundary(struct soap *soap)
+{ register struct soap_multipart *content;
+  register size_t k = strlen(soap->mime.boundary);
+  for (content = soap->mime.first; content; content = content->next)
+  { if (content->ptr && content->size >= k)
+    { register const char *p = (const char*)content->ptr; 
+      register size_t i;
+      for (i = 0; i < content->size - k; i++, p++)
+        if (!strncmp(p, soap->mime.boundary, k))
+          return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	HTTP cookie handling
+ *
+\******************************************************************************/
+
+#ifdef WITH_COOKIES
+/******************************************************************************/
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_encode_cookie(const char *s, char *t, size_t len)
+{ register int c;
+  register size_t n = len;
+  while ((c = *s++) && --n > 0)
+  { if (c > ' ' && c < 128 && !strchr("()<>@,;:\\\"/[]?={}", c))
+      *t++ = c;
+    else if (n > 2)
+    { *t++ = '%';
+      *t++ = (c >> 4) + (c > 159 ? '7' : '0');
+      c &= 0xF;
+      *t++ = c + (c > 9 ? '7' : '0');
+      n -= 2;
+    }
+    else
+      break;
+  }
+  *t = '\0';
+  return len - n;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  size_t n;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (*path == '/')
+    path++;
+  n = strlen(path);
+  for (p = soap->cookies; p; p = p->next)
+    if (!strcmp(p->name, name)
+     && domain
+     && p->domain
+     && !strcmp(p->domain, domain)
+     && !strncmp(p->path, path, n))
+      break;
+  return p;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_set_cookie(struct soap *soap, const char *name, const char *value, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  int n;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set cookie: %s=%s domain=%s path=%s\n", name, value?value:"", domain?domain:"", path?path:""));
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return NULL;
+  }
+  if (*path == '/')
+    path++;
+  q = soap_cookie(soap, name, domain, path);
+  if (!q)
+  { if ((q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+    { if ((q->name = (char*)SOAP_MALLOC(soap, strlen(name)+1)))
+        strcpy(q->name, name);
+      q->value = NULL;
+      q->domain = NULL;
+      q->path = NULL;
+      q->expire = -1;
+      q->version = 0;
+      q->secure = 0;
+      q->modified = 0;
+      for (p = &soap->cookies, n = soap->cookie_max; *p && n; p = &(*p)->next, n--)
+        if (!strcmp((*p)->name, name) && (*p)->path && strcmp((*p)->path, path) < 0)
+          break;
+      if (n)
+      { q->next = *p;
+        *p = q;
+      }
+      else
+      { SOAP_FREE(soap, q->name);
+        SOAP_FREE(soap, q);
+        q = NULL;
+      }
+    }
+  }
+  else
+    q->modified = 1;
+  if (q)
+  { if (q->value)
+    { SOAP_FREE(soap, q->value);
+      q->value = NULL;
+    }
+    if (q->domain)
+    { SOAP_FREE(soap, q->domain);
+      q->domain = NULL;
+    }
+    if (q->path)
+    { SOAP_FREE(soap, q->path);
+      q->path = NULL;
+    }
+    if (value && *value && (q->value = (char*)SOAP_MALLOC(soap, strlen(value)+1)))
+      strcpy(q->value, value);
+    if (domain && *domain && (q->domain = (char*)SOAP_MALLOC(soap, strlen(domain)+1)))
+      strcpy(q->domain, domain);
+    if (path && *path && (q->path = (char*)SOAP_MALLOC(soap, strlen(path)+1)))
+      strcpy(q->path, path);
+    q->session = 1;
+    q->env = 0;
+  }
+  return q;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!domain)
+  { soap_set_receiver_error(soap, "Cookie domain not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (*path == '/')
+    path++;
+  for (p = &soap->cookies, q = *p; q; q = *p)
+    if (!strcmp(q->name, name) && !strcmp(q->domain, domain) && !strncmp(q->path, path, strlen(q->path)))
+    { if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+      p = &q->next;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_env_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)) && p->env)
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_cookie_expire(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->expire;
+  return -1;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_expire(struct soap *soap, const char *name, long expire, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->expire = expire;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 1;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_clr_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 0;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putsetcookies(struct soap *soap)
+{ struct soap_cookie *p;
+  char *s, tmp[4096];
+  const char *t;
+  for (p = soap->cookies; p; p = p->next)
+  { if (p->modified || !p->env)
+    { s = tmp;
+      if (p->name)
+        s += soap_encode_cookie(p->name, s, tmp-s+4064);
+      if (p->value && *p->value)
+      { *s++ = '=';
+        s += soap_encode_cookie(p->value, s, tmp-s+4064);
+      }
+      if (p->domain && (int)strlen(p->domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", p->domain);
+      else if (soap->cookie_domain && (int)strlen(soap->cookie_domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", soap->cookie_domain);
+      strcat(s, ";Path=\"/");
+      if (p->path)
+        t = p->path;
+      else
+        t = soap->cookie_path;
+      if (t)
+      { if (*t == '/')
+          t++;
+        if ((int)strlen(t) < tmp-s+4064)
+          strcat(s, t);
+      }
+      s += strlen(s);
+      *s++ = '"';
+      if (p->version > 0)
+        sprintf(s, ";Version=%u", p->version);
+      if (p->expire >= 0)
+        sprintf(s, ";Max-Age=%ld", p->expire);
+      if (p->secure)
+        strcat(s, ";Secure");
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set-Cookie: %s\n", tmp));
+      if ((soap->error = soap->fposthdr(soap, "Set-Cookie", tmp)))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putcookies(struct soap *soap, const char *domain, const char *path, int secure)
+{ struct soap_cookie **p, *q;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  char *s, tmp[4096];
+  p = &soap->cookies;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending cookies for domain=%s path=%s\n", domain, path));
+  if (*path == '/')
+    path++;
+  while ((q = *p))
+  { if (q->expire && now > q->expire)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie %s expired\n", q->name));
+      SOAP_FREE(soap, q->name);
+      if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+    { size_t domlen = 0;
+      if (q->domain)
+      { const char *s = strchr(q->domain, ':');
+        if (s)
+	  domlen = s - q->domain;
+	else
+          domlen = strlen(q->domain);
+      }
+      if ((!q->domain || !strncmp(q->domain, domain, domlen))
+          && (!q->path || !strncmp(q->path, path, strlen(q->path)))
+          && (!q->secure || secure))
+      { s = tmp;
+        if (q->version != version)
+        { sprintf(s, "$Version=%u;", q->version);
+          version = q->version;
+        }
+        if (q->name)
+          s += soap_encode_cookie(q->name, s, tmp-s+4080);
+        if (q->value && *q->value)
+        { *s++ = '=';
+          s += soap_encode_cookie(q->value, s, tmp-s+4080);
+        }
+        if (q->path && (int)strlen(q->path) < tmp-s+4080)
+        { sprintf(s, ";$Path=\"/%s\"", (*q->path == '/' ? q->path + 1 : q->path));
+          s += strlen(s);
+        }
+        if (q->domain && (int)strlen(q->domain) < tmp-s+4080)
+          sprintf(s, ";$Domain=\"%s\"", q->domain);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie: %s\n", tmp));
+        if ((soap->error = soap->fposthdr(soap, "Cookie", tmp)))
+          return soap->error;
+      }
+      p = &q->next;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_getcookies(struct soap *soap, const char *val)
+{ struct soap_cookie *p = NULL, *q;
+  const char *s;
+  char *t, tmp[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  char *domain = NULL;
+  char *path = NULL;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  if (!val)
+    return;
+  s = val;
+  while (*s)
+  { s = soap_decode_key(tmp, sizeof(tmp), s);
+    if (!soap_tag_cmp(tmp, "$Version"))
+    { if ((s = soap_decode_val(tmp, sizeof(tmp), s)))
+      { if (p)
+          p->version = (int)atol(tmp);
+        else
+          version = (int)atol(tmp);
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Path"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->path)
+          SOAP_FREE(soap, p->path);
+        p->path = t;
+      }
+      else
+      { if (path)
+          SOAP_FREE(soap, path);
+        path = t;
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Domain"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->domain)
+          SOAP_FREE(soap, p->domain);
+	p->domain = t;
+      }
+      else
+      { if (domain)
+          SOAP_FREE(soap, domain);
+        domain = t;
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Path"))
+    { if (p->path)
+        SOAP_FREE(soap, p->path);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->path = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->path, tmp);
+      }
+      else
+        p->path = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Domain"))
+    { if (p->domain)
+        SOAP_FREE(soap, p->domain);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->domain = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->domain, tmp);
+      }
+      else
+        p->domain = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Version"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->version = (unsigned int)atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Max-Age"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->expire = now + atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Expires"))
+    { struct tm T;
+      char a[3]; 
+      static const char mns[] = "anebarprayunulugepctovec";
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (strlen(tmp) > 20)
+      { memset((void*)&T, 0, sizeof(T));
+        a[0] = tmp[4];
+        a[1] = tmp[5];
+        a[2] = '\0';
+        T.tm_mday = (int)atol(a);
+        a[0] = tmp[8];
+        a[1] = tmp[9];
+        T.tm_mon = (strstr(mns, a) - mns) / 2;
+        a[0] = tmp[11];
+        a[1] = tmp[12];
+        T.tm_year = 100 + (int)atol(a);
+        a[0] = tmp[13];
+        a[1] = tmp[14];
+        T.tm_hour = (int)atol(a);
+        a[0] = tmp[16];
+        a[1] = tmp[17];
+        T.tm_min = (int)atol(a);
+        a[0] = tmp[19];
+        a[1] = tmp[20];
+        T.tm_sec = (int)atol(a);
+        p->expire = soap_timegm(&T);
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Secure"))
+      p->secure = 1;
+    else
+    { if (p)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+        if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+        { q->version = p->version;
+          q->expire = p->expire;
+          q->secure = p->secure;
+          q->env = 1;
+        }
+        if (p->name)
+          SOAP_FREE(soap, p->name);
+        if (p->value)
+          SOAP_FREE(soap, p->value);
+        if (p->domain)
+          SOAP_FREE(soap, p->domain);
+        if (p->path)
+          SOAP_FREE(soap, p->path);
+        SOAP_FREE(soap, p);
+      }
+      if ((p = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      { p->name = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+        strcpy(p->name, tmp);
+        s = soap_decode_val(tmp, sizeof(tmp), s);
+        if (*tmp)
+        { p->value = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+          strcpy(p->value, tmp);
+        }
+        else
+          p->value = NULL;
+        p->domain = domain;
+        p->path = path;
+        p->expire = 0;
+        p->secure = 0;
+        p->version = version;
+      }
+    }
+  }
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+    if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+    { q->version = p->version;
+      q->expire = p->expire;
+      q->secure = p->secure;
+      q->env = 1;
+    }
+    if (p->name)
+      SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+  if (domain)
+    SOAP_FREE(soap, domain);
+  if (path)
+    SOAP_FREE(soap, path);
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getenv_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  const char *s;
+  char key[4096], val[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  if (!(s = getenv("HTTP_COOKIE")))
+    return SOAP_ERR;
+  do
+  { s = soap_decode_key(key, sizeof(key), s);
+    s = soap_decode_val(val, sizeof(val), s);
+    p = soap_set_cookie(soap, key, val, NULL, NULL);
+    if (p)
+      p->env = 1;
+  } while (*s);
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_copy_cookies(struct soap *soap)
+{ struct soap_cookie *p, **q, *r;
+  q = &r;
+  for (p = soap->cookies; p; p = p->next)
+  { if (!(*q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      return r;
+    **q = *p;
+    if (p->name)
+    { if (((*q)->name = (char*)SOAP_MALLOC(soap, strlen(p->name)+1)))
+        strcpy((*q)->name, p->name);
+    }
+    if (p->value)
+    { if (((*q)->value = (char*)SOAP_MALLOC(soap, strlen(p->value)+1)))
+        strcpy((*q)->value, p->value);
+    }
+    if (p->domain)
+    { if (((*q)->domain = (char*)SOAP_MALLOC(soap, strlen(p->domain)+1)))
+        strcpy((*q)->domain, p->domain);
+    }
+    if (p->path)
+    { if (((*q)->path = (char*)SOAP_MALLOC(soap, strlen(p->path)+1)))
+        strcpy((*q)->path, p->path);
+    }
+    q = &(*q)->next;
+  }
+  *q = NULL;
+  return r;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  for (p = soap->cookies; p; p = soap->cookies)
+  { soap->cookies = p->next;
+    SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+}
+
+/******************************************************************************/
+#endif /* WITH_COOKIES */
+
+/******************************************************************************/
+#ifdef WITH_GZIP
+#ifndef PALM_1
+static int
+soap_getgziphdr(struct soap *soap)
+{ int i;
+  soap_wchar c, f = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get gzip header\n"));
+  for (i = 0; i < 9; i++)
+  { if ((int)(c = soap_get1(soap) == EOF))
+      return soap->error = SOAP_EOF;
+    if (i == 2)
+      f = c;
+  }
+  if (f & 0x04) /* FEXTRA */
+  { for (i = soap_get1(soap) | (soap_get1(soap) << 8); i; i--)
+      if ((int)soap_get1(soap) == EOF)
+        return soap->error = SOAP_EOF;
+  }
+  if (f & 0x08) /* FNAME */
+    do
+      c = soap_get1(soap);
+    while (c && (int)c != EOF);
+  if ((int)c != EOF && (f & 0x10)) /* FCOMMENT */
+    do
+      c = soap_get1(soap);
+    while (c && (int)f != EOF);
+  if ((int)c != EOF && (f & 0x01)) /* FHCRC */
+  { if ((int)(c = soap_get1(soap)) != EOF)
+      c = soap_get1(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_recv(struct soap *soap)
+{ soap_wchar c;
+  soap->error = SOAP_OK;
+  soap_free(soap);
+  soap_set_local_namespaces(soap);
+  soap->version = 0;	/* don't assume we're parsing SOAP content by default */
+#ifndef WITH_NOIDREF
+  soap_free_iht(soap);
+#endif
+  if ((soap->imode & SOAP_IO) == SOAP_IO_CHUNK)
+    soap->omode |= SOAP_IO_CHUNK;
+  soap->imode &= ~SOAP_IO;
+  soap->mode = soap->imode;
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  soap->ahead = 0;
+  soap->peeked = 0;
+  soap->level = 0;
+  soap->part = SOAP_BEGIN;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  *soap->endpoint = '\0';
+  soap->action = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket))
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->recvfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->recvfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#ifdef WITH_ZLIB
+  soap->mode &= ~SOAP_ENC_ZLIB;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.next_in = Z_NULL;
+  soap->d_stream.avail_in = 0;
+  soap->d_stream.next_out = (Byte*)soap->buf;
+  soap->d_stream.avail_out = SOAP_BUFLEN;
+  soap->z_ratio_in = 1.0;
+#endif
+#ifndef WITH_LEANER
+  if (soap->fprepareinit)
+    soap->fprepareinit(soap);
+#endif
+  c = soap_getchar(soap);
+#ifdef WITH_GZIP
+  if (c == 0x1F)
+  { if (soap_getgziphdr(soap))
+      return soap->error;
+    if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+    soap->zlib_state = SOAP_ZLIB_INFLATE;
+    soap->mode |= SOAP_ENC_ZLIB;
+    soap->zlib_in = SOAP_ZLIB_GZIP;
+    soap->z_crc = crc32(0L, NULL, 0);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    /* should not chunk over plain transport, so why bother to check? */
+    /* if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) */
+    /*   soap->z_buflen = soap->bufidx; */
+    /* else */
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+    soap->z_buflen = soap->buflen;
+    soap->buflen = soap->bufidx;
+    c = soap_getchar(soap);
+  }  
+#endif
+#ifndef WITH_LEANER
+  if (c == '-' && soap_get0(soap) == '-')
+    soap->mode |= SOAP_ENC_MIME;
+  else if ((c & 0xFFFC) == (SOAP_DIME_VERSION | SOAP_DIME_MB) && (soap_get0(soap) & 0xFFF0) == 0x20)
+    soap->mode |= SOAP_ENC_DIME;
+  else
+#endif
+  { while (soap_blank(c))
+      c = soap_getchar(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  soap_unget(soap, c);
+#ifndef WITH_NOHTTP
+  /* if not XML or (start of)BOM or MIME/DIME/ZLIB, assume HTTP header */
+  if (c != '<' && c != 0xEF && !(soap->mode & (SOAP_ENC_MIME | SOAP_ENC_DIME | SOAP_ENC_ZLIB)))
+  { soap->mode &= ~SOAP_IO;
+    soap->error = soap->fparse(soap);
+    if (soap->error && soap->error < SOAP_STOP)
+    { soap->keep_alive = 0; /* force close later */
+      return soap->error;
+    }
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { soap->chunkbuflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+      soap->chunksize = 0;
+    }
+#ifndef WITH_LEANER
+    else if (soap->fpreparerecv && soap->buflen != soap->bufidx)
+      soap->fpreparerecv(soap, soap->buf + soap->bufidx, soap->buflen - soap->bufidx);
+#endif
+#ifdef WITH_ZLIB
+    if (soap->zlib_in != SOAP_ZLIB_NONE)
+    { /* fparse should not use soap_unget to push back last char */
+#ifdef WITH_GZIP
+      c = soap_get1(soap);
+      if (c == 0x1F)
+      { if (soap_getgziphdr(soap))
+          return soap->error;
+        if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        soap->z_crc = crc32(0L, NULL, 0);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+      }
+      else
+      { soap_revget1(soap);
+#else
+      {
+#endif
+        if (inflateInit(&soap->d_stream) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate initialized\n"));
+      }
+      soap->mode |= SOAP_ENC_ZLIB;
+      memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+      soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+      soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+    }
+#endif
+    if (soap->error)
+    { if (soap->error == SOAP_FORM && soap->fform)
+      { soap->error = soap->fform(soap);
+        if (soap->error == SOAP_OK)
+          soap->error = SOAP_STOP; /* prevents further processing */
+      }
+      return soap->error;
+    }
+  }
+#endif
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_MIME)
+  { if (soap_getmimehdr(soap))
+      return soap->error;
+    if (soap_get_header_attribute(soap, soap->mime.first->type, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+  }
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap->dime.flags & SOAP_DIME_CF)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked DIME SOAP message\n"));
+      soap->dime.chunksize = soap->dime.size;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+    }
+    soap->count = soap->buflen - soap->bufidx;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse(struct soap *soap)
+{ char header[SOAP_HDRLEN], *s;
+  unsigned short get = 0, status = 0, k = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Waiting for HTTP request/response...\n"));
+  *soap->endpoint = '\0';
+  soap->length = 0;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->action = NULL;
+  soap->authrealm = NULL;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP status: %s\n", soap->msgbuf));
+    for (;;)
+    { if (soap_getline(soap, header, SOAP_HDRLEN))
+      { if (soap->error == SOAP_EOF)
+	{ soap->error = SOAP_OK;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "EOF in HTTP header, continue anyway\n"));
+	  break;
+	}
+        return soap->error;
+      }
+      if (!*header)
+        break;
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP header: %s\n", header));
+      s = strchr(header, ':');
+      if (s)
+      { *s = '\0';
+        do s++;
+        while (*s && *s <= 32);
+        if ((soap->error = soap->fparsehdr(soap, header, s)))
+        { if (soap->error < SOAP_STOP)
+	    return soap->error;
+	  status = soap->error;
+	  soap->error = SOAP_OK;
+        }
+      }
+    }
+    if ((s = strchr(soap->msgbuf, ' ')))
+    { k = (unsigned short)soap_strtoul(s, &s, 10);
+      if (!soap_blank(*s))
+        k = 0;
+    }
+    else
+      k = 0;
+  } while (k == 100);
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Finished HTTP header parsing\n"));
+  s = strstr(soap->msgbuf, "HTTP/");
+  if (s && s[7] != '1')
+  { if (soap->keep_alive == 1)
+      soap->keep_alive = 0;
+    if (k == 0 && (soap->omode & SOAP_IO) == SOAP_IO_CHUNK) /* k == 0 for HTTP request */
+    { soap->imode |= SOAP_IO_CHUNK;
+      soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE;
+    }
+  }
+  if (soap->keep_alive < 0)
+    soap->keep_alive = 1;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Keep alive connection = %d\n", soap->keep_alive));
+  if (s && (((get = !strncmp(soap->msgbuf, "GET ", 4))) || !strncmp(soap->msgbuf, "POST ", 5)))
+  { size_t m = strlen(soap->endpoint);
+    size_t n = m + (s - soap->msgbuf) - 5 - (!get);
+    if (n >= sizeof(soap->endpoint))
+      n = sizeof(soap->endpoint) - 1;
+    strncpy(soap->path, soap->msgbuf + 4 + (!get), n - m);
+    soap->path[n - m] = '\0';
+    strcat(soap->endpoint, soap->path);
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Target endpoint='%s'\n", soap->endpoint));
+    if (get)
+    { soap->error = soap->fget(soap);
+      if (soap->error == SOAP_OK)
+        soap->error = SOAP_STOP; /* prevents further processing */
+      return soap->error;
+    }
+    if (status)
+      return soap->error = status;
+    return SOAP_OK;
+  }
+  if (k == 0 || (k >= 200 && k <= 299) || k == 400 || k == 500)
+    return SOAP_OK;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP error %d\n", k));
+  return soap_set_receiver_error(soap, "HTTP error", soap->msgbuf, k);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse_header(struct soap *soap, const char *key, const char *val)
+{ if (!soap_tag_cmp(key, "Host"))
+  { 
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+      strcpy(soap->endpoint, "https://");
+    else
+#endif
+      strcpy(soap->endpoint, "http://");
+    strncat(soap->endpoint, val, sizeof(soap->endpoint) - 8);
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifndef WITH_LEANER
+  else if (!soap_tag_cmp(key, "Content-Type"))
+  { if (soap_get_header_attribute(soap, val, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+    else if (soap_get_header_attribute(soap, val, "multipart/related")
+          || soap_get_header_attribute(soap, val, "multipart/form-data"))
+    { soap->mime.boundary = soap_strdup(soap, soap_get_header_attribute(soap, val, "boundary"));
+      soap->mime.start = soap_strdup(soap, soap_get_header_attribute(soap, val, "start"));
+      soap->mode |= SOAP_ENC_MIME;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Content-Length"))
+    soap->length = soap_strtoul(val, NULL, 10);
+  else if (!soap_tag_cmp(key, "Content-Encoding"))
+  { if (!soap_tag_cmp(val, "deflate"))
+#ifdef WITH_ZLIB
+      soap->zlib_in = SOAP_ZLIB_DEFLATE;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+    else if (!soap_tag_cmp(val, "gzip"))
+#ifdef WITH_GZIP
+      soap->zlib_in = SOAP_ZLIB_GZIP;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+  }
+#ifdef WITH_ZLIB
+  else if (!soap_tag_cmp(key, "Accept-Encoding"))
+  {
+#ifdef WITH_GZIP
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "gzip"))
+      soap->zlib_out = SOAP_ZLIB_GZIP;
+    else
+#endif
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "deflate"))
+      soap->zlib_out = SOAP_ZLIB_DEFLATE;
+    else
+      soap->zlib_out = SOAP_ZLIB_NONE;
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Transfer-Encoding"))
+  { soap->mode &= ~SOAP_IO;
+    if (!soap_tag_cmp(val, "chunked"))
+      soap->mode |= SOAP_IO_CHUNK;
+  }
+  else if (!soap_tag_cmp(key, "Connection"))
+  { if (!soap_tag_cmp(val, "keep-alive"))
+      soap->keep_alive = -soap->keep_alive;
+    else if (!soap_tag_cmp(val, "close"))
+      soap->keep_alive = 0;
+  }
+#ifndef WITH_LEAN
+  else if (!soap_tag_cmp(key, "Authorization"))
+  { if (!soap_tag_cmp(val, "Basic *"))
+    { int n;
+      char *s;
+      soap_base642s(soap, val + 6, soap->tmpbuf, sizeof(soap->tmpbuf) - 1, &n);
+      soap->tmpbuf[n] = '\0';
+      if ((s = strchr(soap->tmpbuf, ':')))
+      { *s = '\0';
+	soap->userid = soap_strdup(soap, soap->tmpbuf);
+	soap->passwd = soap_strdup(soap, s + 1);
+      }
+    }
+  }
+  else if (!soap_tag_cmp(key, "WWW-Authenticate"))
+    soap->authrealm = soap_strdup(soap, soap_get_header_attribute(soap, val + 6, "realm"));
+  else if (!soap_tag_cmp(key, "Expect"))
+  { if (!soap_tag_cmp(val, "100-continue"))
+    { if ((soap->error = soap->fposthdr(soap, "HTTP/1.1 100 Continue", NULL))
+       || (soap->error = soap->fposthdr(soap, NULL, NULL)))
+        return soap->error;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "SOAPAction"))
+  { if (*val == '"')
+    { soap->action = soap_strdup(soap, val + 1);
+      soap->action[strlen(soap->action) - 1] = '\0';
+    }
+  }
+  else if (!soap_tag_cmp(key, "Location"))
+  { strncpy(soap->endpoint, val, sizeof(soap->endpoint));
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifdef WITH_COOKIES
+  else if (!soap_tag_cmp(key, "Cookie") || !soap_tag_cmp(key, "Set-Cookie"))
+    soap_getcookies(soap, val);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_get_header_attribute(struct soap *soap, const char *line, const char *key)
+{ register const char *s = line;
+  if (s)
+  { while (*s)
+    { register short flag;
+      s = soap_decode_key(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      flag = soap_tag_cmp(soap->tmpbuf, key);
+      s = soap_decode_val(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      if (!flag)
+        return soap->tmpbuf;
+    }
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_key(char *buf, size_t len, const char *val)
+{ return soap_decode(buf, len, val, "=,;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_val(char *buf, size_t len, const char *val)
+{ if (*val != '=')
+  { *buf = '\0';
+    return val;
+  }
+  return soap_decode(buf, len, val + 1, ",;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char*
+soap_decode(char *buf, size_t len, const char *val, const char *sep)
+{ const char *s;
+  char *t = buf;
+  for (s = val; *s; s++)
+    if (*s != ' ' && *s != '\t' && !strchr(sep, *s))
+      break;
+  if (*s == '"')
+  { s++;
+    while (*s && *s != '"' && --len)
+      *t++ = *s++;
+  }
+  else
+  { while (soap_notblank(*s) && !strchr(sep, *s) && --len)
+    { if (*s == '%')
+      { *t++ = ((s[1] >= 'A' ? (s[1] & 0x7) + 9 : s[1] - '0') << 4)
+              + (s[2] >= 'A' ? (s[2] & 0x7) + 9 : s[2] - '0');
+        s += 3;
+      }
+      else
+        *t++ = *s++;
+    }
+  }
+  *t = '\0';
+  while (*s && !strchr(sep, *s))
+    s++;
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_out(struct soap *soap)
+{
+#ifndef WITH_LEANER
+  size_t n = 0;
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->mime.start)
+  { const char *s;
+    if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+      s = "application/dime";
+    else if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+    sprintf(soap->tmpbuf, "--%s\r\nContent-Type: %s\r\nContent-Transfer-Encoding: binary\r\nContent-ID: %s\r\n\r\n", soap->mime.boundary, s, soap->mime.start);
+    n = strlen(soap->tmpbuf);
+    if (soap_send_raw(soap, soap->tmpbuf, n))
+      return soap->error;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    soap->dime.size = soap->count;	/* DIME in MIME correction */
+  if (!(soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME))
+  { if (soap_putdimehdr(soap))
+      return soap->error;
+  }
+#endif
+  soap->part = SOAP_IN_ENVELOPE;
+  return soap_element_begin_out(soap, "SOAP-ENV:Envelope", 0, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Envelope"))
+    return soap->error;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { soap->dime.size = soap->count - soap->dime.size;	/* DIME in MIME correction */
+    sprintf(soap->id, soap->dime_id_format, 0);
+    soap->dime.id = soap->id;
+    if (soap->local_namespaces)
+    { if (soap->local_namespaces[0].out)
+        soap->dime.type = (char*)soap->local_namespaces[0].out;
+      else
+        soap->dime.type = (char*)soap->local_namespaces[0].ns;
+    }
+    soap->dime.options = NULL;
+    soap->dime.flags = SOAP_DIME_MB | SOAP_DIME_ABSURI;
+    if (!soap->dime.first)
+      soap->dime.flags |= SOAP_DIME_ME;
+    soap->count += 12 + ((strlen(soap->dime.id)+3)&(~3)) + ((strlen(soap->dime.type)+3)&(~3));
+  }
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+    return soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+#endif
+  soap->part = SOAP_END_ENVELOPE;
+  return SOAP_OK;
+} 
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_in(struct soap *soap)
+{ register struct Namespace *p;
+  soap->part = SOAP_IN_ENVELOPE;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Envelope", 0))
+    return soap->error = SOAP_VERSIONMISMATCH;
+  p = soap->local_namespaces;
+  if (p)
+  { const char *ns = p[0].out;
+    if (!ns)
+      ns = p[0].ns;
+    if (!strcmp(ns, soap_env1))
+    { soap->version = 1; /* make sure we use SOAP 1.1 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc1))))
+        strcpy(p[1].out, soap_enc1);
+    }
+    else if (!strcmp(ns, soap_env2))
+    { soap->version = 2; /* make sure we use SOAP 1.2 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc2))))
+        strcpy(p[1].out, soap_enc2);
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_in(struct soap *soap)
+{ soap->part = SOAP_END_ENVELOPE;
+  return soap_element_end_in(soap, "SOAP-ENV:Envelope");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_out(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap->version == 1)
+    soap->encoding = 1;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_SEC) && soap_set_attr(soap, "wsu:Id", "Body"))
+    return soap->error;
+#endif
+  if (soap_element(soap, "SOAP-ENV:Body", 0, NULL))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Body"))
+    return soap->error;
+  soap->part = SOAP_END_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_in(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Body", 0))
+    return soap->error;
+  if (!soap->body)
+    soap->part = SOAP_NO_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_in(struct soap *soap)
+{ if (soap->part == SOAP_NO_BODY)
+    return SOAP_OK;
+  soap->part = SOAP_END_BODY;
+  return soap_element_end_in(soap, "SOAP-ENV:Body");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_header(struct soap *soap)
+{ if (soap_getheader(soap) && soap->error == SOAP_TAG_MISMATCH)
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_endpoint(struct soap *soap, const char *endpoint)
+{ register const char *s;
+  register size_t i, n;
+  soap->endpoint[0] = '\0';
+  soap->host[0] = '\0';
+  soap->path[0] = '/';
+  soap->path[1] = '\0';
+  soap->port = 80;
+  if (!endpoint || !*endpoint)
+    return;
+  if (!strncmp(endpoint, "https:", 6))
+    soap->port = 443;
+  strncpy(soap->endpoint, endpoint, sizeof(soap->endpoint) - 1);
+  s = strchr(endpoint, ':');
+  if (s && s[1] == '/' && s[2] == '/')
+    s += 3;
+  else
+    s = endpoint;
+  n = strlen(s);
+  if (n >= sizeof(soap->host))
+    n = sizeof(soap->host) - 1;
+#ifdef WITH_IPV6
+  if (s[0] == '[')
+  { s++;
+    for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == ']')
+      { s++;
+        break; 
+      }
+    }
+  }
+  else
+  { for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == '/' || s[i] == ':')
+        break; 
+    }
+  }
+#else
+  for (i = 0; i < n; i++)
+  { soap->host[i] = s[i];
+    if (s[i] == '/' || s[i] == ':')
+      break; 
+  }
+#endif
+  soap->host[i] = '\0';
+  if (s[i] == ':')
+  { soap->port = (int)atol(s + i + 1);
+    for (i++; i < n; i++)
+      if (s[i] == '/')
+        break;
+  }
+  if (s[i])
+  { strncpy(soap->path, s + i, sizeof(soap->path));
+    soap->path[sizeof(soap->path) - 1] = '\0';
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect(struct soap *soap, const char *endpoint, const char *action)
+{ return soap_connect_command(soap, SOAP_POST, endpoint, action);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect_command(struct soap *soap, int http_command, const char *endpoint, const char *action)
+{ char host[sizeof(soap->host)];
+  int port;
+  size_t count;
+  soap->error = SOAP_OK;
+  strcpy(host, soap->host); /* save to compare */
+  port = soap->port; /* save to compare */
+  soap_set_endpoint(soap, endpoint);
+#ifndef WITH_LEANER
+  if (soap->fconnect)
+  { if ((soap->error = soap->fconnect(soap, endpoint, soap->host, soap->port)))
+      return soap->error;
+  }
+  else
+#endif
+  if (soap->fopen && *soap->host)
+  { soap->status = http_command;
+    if (!soap->keep_alive || !soap_valid_socket(soap->socket) || strcmp(soap->host, host) || soap->port != port || !soap->fpoll || soap->fpoll(soap))
+    { soap->keep_alive = 0; /* to force close */
+      soap->omode &= ~SOAP_IO_UDP; /* to force close */
+      soap_closesock(soap);
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Connect/reconnect to host='%s' path='%s' port=%d\n", soap->host, soap->path, soap->port));
+#ifdef WITH_UDP
+      if (!strncmp(endpoint, "soap.udp:", 9))
+        soap->omode |= SOAP_IO_UDP;
+#endif
+      soap->socket = soap->fopen(soap, endpoint, soap->host, soap->port);
+      if (soap->error)
+        return soap->error;
+      soap->keep_alive = ((soap->omode & SOAP_IO_KEEPALIVE) != 0);
+    }
+  }
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML) && endpoint)
+  { unsigned int k = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((k & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fpost(soap, endpoint, soap->host, soap->port, soap->path, action, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((k & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = k;
+  }
+  else if (action)
+    soap->action = soap_strdup(soap, action);
+  if (http_command != SOAP_POST)
+    return soap_end_send(soap);
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2base64(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register int i;
+  register unsigned long m;
+  register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, (n + 2) / 3 * 4 + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (!s)
+    return p;
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    t += 4;
+  }
+  t[0] = '\0';
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      t[i] = '=';
+    t[4] = '\0';
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_base642s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register int i, j, c;
+  register unsigned long m;
+  register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = (strlen(s) + 3) / 4 * 3;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  if (n)
+    *n = 0;
+  for (;;)
+  { for (i = 0; i < SOAP_BLKLEN; i++)
+    { m = 0;
+      j = 0;
+      while (j < 4)
+      { c = *s++;
+        if (c == '=' || !c)
+        { i *= 3;
+          switch (j)
+          { case 2:
+              *t++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *t++ = (char)((m >> 10) & 0xFF);
+              *t++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n += i;
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      }
+      *t++ = (char)((m >> 16) & 0xFF);
+      *t++ = (char)((m >> 8) & 0xFF);
+      *t++ = (char)(m & 0xFF);
+      if (l < 3)
+      { if (n)
+	  *n += i;
+        return p;
+      }
+      l -= 3;
+    }
+    if (n)
+      *n += 3 * SOAP_BLKLEN;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2hex(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, 2 * n + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (s)
+  { for (; n > 0; n--)
+    { register int m = *s++;
+      *t++ = (char)((m >> 4) + (m > 159 ? 'a' - 10 : '0'));
+      m &= 0x0F;
+      *t++ = (char)(m + (m > 9 ? 'a' - 10 : '0'));
+    }
+  }
+  *t++ = '\0';
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_hex2s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = strlen(s) / 2;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  while (l)
+  { register int d1, d2;
+    d1 = *s++;
+    if (!d1)
+      break;
+    d2 = *s++;
+    if (!d2)
+      break;
+    *t++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    l--;
+  }
+  if (n)
+    *n = t - p;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthttphdr(struct soap *soap, int status, size_t count)
+{ register const char *s = NULL;
+  register int err = SOAP_OK;
+#ifndef WITH_LEANER
+  register const char *r = NULL;
+#endif
+  if (status == SOAP_FILE && soap->http_content)
+    s = soap->http_content;
+  else if (status == SOAP_HTML)
+    s = "text/html; charset=utf-8";
+  else if (count || ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK))
+  { if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+  }
+#ifndef WITH_LEANER
+  if (soap->mode & (SOAP_ENC_DIME | SOAP_ENC_MTOM))
+  { if (soap->mode & SOAP_ENC_MTOM)
+    { r = s;
+      s = "application/xop+xml; charset=utf-8";
+    }
+    else
+      s = "application/dime";
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->status != SOAP_GET)
+  { register const char *t = strchr(s, ';');
+    sprintf(soap->tmpbuf, "multipart/related; boundary=\"%s\"; type=\"", soap->mime.boundary);
+    if (t)
+      strncat(soap->tmpbuf, s, t - s);
+    else
+      strcat(soap->tmpbuf, s);
+    if (soap->mime.start)
+    { strcat(soap->tmpbuf, "\"; start=\"");
+      strcat(soap->tmpbuf, soap->mime.start);
+    }
+    strcat(soap->tmpbuf, "\"");
+    if (r)
+    { strcat(soap->tmpbuf, "; start-info=\"");
+      strcat(soap->tmpbuf, r);
+      strcat(soap->tmpbuf, "\"");
+    }
+    s = soap->tmpbuf;
+  }
+#endif
+  if (s && (err = soap->fposthdr(soap, "Content-Type", s)))
+    return err;
+#ifdef WITH_ZLIB
+  if (soap->omode & SOAP_ENC_ZLIB)
+  {
+#ifdef WITH_GZIP
+    err = soap->fposthdr(soap, "Content-Encoding", "gzip");
+#else
+    err = soap->fposthdr(soap, "Content-Encoding", "deflate");
+#endif
+    if (err)
+      return err;
+  }
+#endif
+#ifndef WITH_LEANER
+  if ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK)
+    err = soap->fposthdr(soap, "Transfer-Encoding", "chunked");
+  else
+#endif
+  if (soap->status != SOAP_GET)
+  { sprintf(soap->tmpbuf, "%lu", (unsigned long)count);
+    err = soap->fposthdr(soap, "Content-Length", soap->tmpbuf);
+  }
+  if (err)
+    return err;
+  return soap->fposthdr(soap, "Connection", soap->keep_alive ? "keep-alive" : "close");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_get(struct soap *soap)
+{ return SOAP_GET_METHOD;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post(struct soap *soap, const char *endpoint, const char *host, int port, const char *path, const char *action, size_t count)
+{ register const char *s;
+  register int err;
+  if (soap->status == SOAP_GET)
+    s = "GET";
+  else
+    s = "POST";
+#ifdef PALM
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)) && strncmp(endpoint, "_beam:", 6) && strncmp(endpoint, "_local:", 7) && strncmp(endpoint, "_btobex:", 8))
+#else
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)))
+#endif
+    return SOAP_OK;
+  if (soap->proxy_host && strncmp(endpoint, "https:", 6))
+    sprintf(soap->tmpbuf, "%s %s HTTP/%s", s, endpoint, soap->http_version);
+  else
+    sprintf(soap->tmpbuf, "%s /%s HTTP/%s", s, (*path == '/' ? path + 1 : path), soap->http_version);
+  if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+    return err;
+  if (port != 80)
+    sprintf(soap->tmpbuf, "%s:%d", host, port);
+  else
+    strcpy(soap->tmpbuf, host); 
+  if ((err = soap->fposthdr(soap, "Host", soap->tmpbuf))
+   || (err = soap->fposthdr(soap, "User-Agent", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, SOAP_OK, count)))
+    return err;
+#ifdef WITH_ZLIB
+#ifdef WITH_GZIP
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "gzip, deflate")))
+#else
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "deflate")))
+#endif
+    return err;
+#endif
+#ifndef WITH_LEAN
+  if (soap->userid && soap->passwd && strlen(soap->userid) + strlen(soap->passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Authorization", soap->tmpbuf)))
+      return err;
+  }
+  if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+      return err;
+  }
+#endif
+#ifdef WITH_COOKIES
+#ifdef WITH_OPENSSL
+  if (soap_putcookies(soap, host, path, soap->ssl != NULL))
+    return soap->error;
+#else
+  if (soap_putcookies(soap, host, path, 0))
+    return soap->error;
+#endif
+#endif
+  if (action && soap->version == 1)
+  { sprintf(soap->tmpbuf, "\"%s\"", action);
+    if ((err = soap->fposthdr(soap, "SOAPAction", soap->tmpbuf)))
+      return err;
+  }
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_send_header(struct soap *soap, const char *s)
+{ register const char *t;
+  do
+  { t = strchr(s, '\n'); /* disallow \n in HTTP headers */
+    if (!t)
+      t = s + strlen(s);
+    if (soap_send_raw(soap, s, t - s))
+      return soap->error;
+    s = t + 1;
+  } while (*t);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post_header(struct soap *soap, const char *key, const char *val)
+{ if (key)
+  { if (http_send_header(soap, key))
+      return soap->error;
+    if (val && (soap_send_raw(soap, ": ", 2) || http_send_header(soap, val)))
+      return soap->error;
+  }
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_response(struct soap *soap, int status, size_t count)
+{ register int err;
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    httpOutputEnable(soap->rpmreqid);
+#endif
+  if (!status || status == SOAP_HTML || status == SOAP_FILE)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "OK 200\n"));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s 200 OK", soap->http_version);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", "200 OK")))
+      return err;
+  }
+  else if (status > 200 && status < 600)
+  { sprintf(soap->tmpbuf, "HTTP/%s %d %s", soap->http_version, status, http_error(soap, status));
+    if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      return err;
+#ifndef WITH_LEAN 
+    if (status == 401)
+    { sprintf(soap->tmpbuf, "Basic realm=\"%s\"", soap->authrealm ? soap->authrealm : "gSOAP Web Service");
+      if ((err = soap->fposthdr(soap, "WWW-Authenticate", soap->tmpbuf)))
+        return err;
+    }
+    else if ((status >= 301 && status <= 303) || status == 307)
+    { if ((err = soap->fposthdr(soap, "Location", soap->endpoint)))
+        return err;
+    }
+#endif
+  }
+  else
+  { const char *s = *soap_faultcode(soap);
+    if (soap->version == 2 && !strcmp(s, "SOAP-ENV:Sender"))
+      s = "400 Bad Request";
+    else
+      s = "500 Internal Server Error";
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error %s (status=%d)\n", s, status));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s %s", soap->http_version, s);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", s)))
+      return err;
+  }
+  if ((err = soap->fposthdr(soap, "Server", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, status, count)))
+    return err;
+#ifdef WITH_COOKIES
+  if (soap_putsetcookies(soap))
+    return soap->error;
+#endif
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_response(struct soap *soap, int status)
+{ register size_t count;
+  if (!(soap->omode & (SOAP_ENC_XML | SOAP_IO_STORE /* this tests for chunking too */))
+   && (status == SOAP_HTML || status == SOAP_FILE))
+  { soap->omode &= ~SOAP_IO;
+    soap->omode |= SOAP_IO_STORE;
+  }
+  soap->status = status;
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML))
+  { register int n = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((n & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fresponse(soap, status, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((n & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = n;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static const char*
+soap_set_validation_fault(struct soap *soap, const char *s, const char *t)
+{ if (*soap->tag)
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s in element <%s>", s, t?t:SOAP_STR_EOS, soap->tag);
+  else
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s", s, t?t:SOAP_STR_EOS);
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_fault(struct soap *soap)
+{ const char **c = soap_faultcode(soap);
+  const char **s = soap_faultstring(soap);
+  if (!*c && !*s && soap->fseterror)
+    soap->fseterror(soap, c, s);
+  if (!*c)
+  { if (soap->version == 2)
+      *c = "SOAP-ENV:Sender";
+    else
+      *c = "SOAP-ENV:Client";
+  }
+  if (*s)
+    return;
+  switch (soap->error)
+  {
+#ifndef WITH_LEAN
+    case SOAP_CLI_FAULT:
+      *s = "Client fault";
+      break;
+    case SOAP_SVR_FAULT:
+      *s = "Server fault";
+      break;
+    case SOAP_TAG_MISMATCH:
+      *s = soap_set_validation_fault(soap, "tag name or namespace mismatch", NULL);
+      break;
+    case SOAP_TYPE:
+      *s = soap_set_validation_fault(soap, "data type mismatch ", soap->type);
+      break;
+    case SOAP_SYNTAX_ERROR:
+      *s = "Well-formedness violation";
+      break;
+    case SOAP_NO_TAG:
+      *s = "No XML element tag";
+      break;
+    case SOAP_MUSTUNDERSTAND:
+      *c = "SOAP-ENV:MustUnderstand";
+      sprintf(soap->msgbuf, "The data in element '%s' must be understood but cannot be handled", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_VERSIONMISMATCH:
+      *c = "SOAP-ENV:VersionMismatch";
+      *s = "SOAP version mismatch or invalid SOAP message";
+      break;
+    case SOAP_DATAENCODINGUNKNOWN:
+      *c = "SOAP-ENV:DataEncodingUnknown";
+      *s = "Unsupported SOAP data encoding";
+      break;
+    case SOAP_NAMESPACE:
+      *s = soap_set_validation_fault(soap, "namespace mismatch", NULL);
+      break;
+    case SOAP_USER_ERROR:
+      *s = "User error";
+      break;
+    case SOAP_FATAL_ERROR:
+      *s = "Fatal error";
+      break;
+    case SOAP_NO_METHOD:
+      sprintf(soap->msgbuf, "Method '%s' not implemented: method name or namespace not recognized", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_GET_METHOD:
+      *s = "HTTP GET method not implemented";
+      break;
+    case SOAP_EOM:
+      *s = "Out of memory";
+      break;
+    case SOAP_IOB:
+      *s = "Array index out of bounds";
+      break;
+    case SOAP_NULL:
+      *s = soap_set_validation_fault(soap, "nil not allowed", NULL);
+      break;
+    case SOAP_DUPLICATE_ID:
+      *s = soap_set_validation_fault(soap, "multiple definitions of id ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:DuplicateID";
+      break;
+    case SOAP_MISSING_ID:
+      *s = soap_set_validation_fault(soap, "missing id for ref ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:MissingID";
+      break;
+    case SOAP_HREF:
+      *s = soap_set_validation_fault(soap, "incompatible object ref ", soap->id);
+      break;
+    case SOAP_FAULT:
+      break;
+#ifndef WITH_NOIO
+    case SOAP_UDP_ERROR:
+      *s = "Message too large for UDP packet";
+      break;
+    case SOAP_TCP_ERROR:
+      *s = tcp_error(soap);
+      break;
+#endif
+    case SOAP_HTTP_ERROR:
+      *s = "HTTP error";
+      break;
+    case SOAP_SSL_ERROR:
+#ifdef WITH_OPENSSL
+      *s = "SSL error";
+#else
+      *s = "OpenSSL not installed: recompile with -DWITH_OPENSSL";
+#endif
+      break;
+    case SOAP_PLUGIN_ERROR:
+      *s = "Plugin registry error";
+      break;
+    case SOAP_DIME_ERROR:
+      *s = "DIME format error";
+      break;
+    case SOAP_DIME_HREF:
+      *s = "DIME href to missing attachment";
+      break;
+    case SOAP_DIME_MISMATCH:
+      *s = "DIME version/transmission error";
+      break;
+    case SOAP_DIME_END:
+      *s = "End of DIME error";
+      break;
+    case SOAP_MIME_ERROR:
+      *s = "MIME format error";
+      break;
+    case SOAP_MIME_HREF:
+      *s = "MIME href to missing attachment";
+      break;
+    case SOAP_MIME_END:
+      *s = "End of MIME error";
+      break;
+    case SOAP_ZLIB_ERROR:
+#ifdef WITH_ZLIB
+      sprintf(soap->msgbuf, "Zlib/gzip error: '%s'", soap->d_stream.msg?soap->d_stream.msg:"");
+      *s = soap->msgbuf;
+#else
+      *s = "Zlib/gzip not installed for (de)compression: recompile with -DWITH_GZIP";
+#endif
+      break;
+    case SOAP_REQUIRED:
+      *s = soap_set_validation_fault(soap, "missing required attribute", NULL);
+      break;
+    case SOAP_PROHIBITED:
+      *s = soap_set_validation_fault(soap, "prohibited attribute present", NULL);
+      break;
+    case SOAP_OCCURS:
+      *s = soap_set_validation_fault(soap, "min/maxOccurs violation", NULL);
+      break;
+    case SOAP_LENGTH:
+      *s = soap_set_validation_fault(soap, "content length violation", NULL);
+      break;
+    case SOAP_STOP:
+      *s = "Stopped: no response sent";
+      break;
+#endif
+    case SOAP_EOF:
+#ifndef WITH_NOIO
+      sprintf(soap->msgbuf, "End of file or no input: '%s'", soap_strerror(soap));
+      *s = soap->msgbuf;
+      break;
+#else
+      *s = "End of file or no input";
+      break;
+#endif
+    default:
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+      if (soap->error > 200 && soap->error < 600)
+      { sprintf(soap->msgbuf, "HTTP Error: %d %s", soap->error, http_error(soap, soap->error));
+        *s = soap->msgbuf;
+      }
+      else
+#endif
+#endif
+      { sprintf(soap->msgbuf, "Error %d", soap->error);
+        *s = soap->msgbuf;
+      }
+    }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_fault(struct soap *soap)
+{ register int status = soap->error;
+  int r = 1;
+  if (status == SOAP_STOP)
+    return status;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Sending back fault struct for error code %d\n", soap->error));
+  soap->keep_alive = 0; /* to terminate connection */
+  soap_set_fault(soap);
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+  if (soap_valid_socket(soap->socket))
+  { struct timeval timeout;
+    fd_set rfd, sfd;
+    timeout.tv_sec = 0;
+    timeout.tv_usec = 0;
+    FD_ZERO(&rfd);
+    FD_ZERO(&sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, NULL, &timeout);
+    if (r > 0)
+    { if (!FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       || (FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        && recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) < 0))
+        r = 0;
+    }
+  }
+#endif
+#endif
+  if ((status != SOAP_EOF || (!soap->recv_timeout && !soap->send_timeout)) && r > 0)
+  { soap->error = SOAP_OK;
+    soap_serializeheader(soap);
+    soap_serializefault(soap);
+    soap_begin_count(soap);
+    if (soap->mode & SOAP_IO_LENGTH)
+    { soap_envelope_begin_out(soap);
+      soap_putheader(soap);
+      soap_body_begin_out(soap);
+      soap_putfault(soap);
+      soap_body_end_out(soap);
+      soap_envelope_end_out(soap);
+    }
+    soap_end_count(soap);
+    if (soap_response(soap, status)
+     || soap_envelope_begin_out(soap)
+     || soap_putheader(soap)
+     || soap_body_begin_out(soap)
+     || soap_putfault(soap)
+     || soap_body_end_out(soap)
+     || soap_envelope_end_out(soap))
+      return soap_closesock(soap);
+    soap_end_send(soap);
+  }
+  soap->error = status;
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_fault(struct soap *soap)
+{ register int status = soap->error;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Receiving SOAP Fault\n"));
+  soap->error = SOAP_OK;
+  if (soap_getfault(soap))
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Error: soap_get_soapfault() failed. Is this a SOAP message at all?\n"));
+    *soap_faultcode(soap) = (soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client");
+    soap->error = status;
+    soap_set_fault(soap);
+  }
+  else
+  { register const char *s = *soap_faultcode(soap);
+    if (!soap_match_tag(soap, s, "SOAP-ENV:Server") || !soap_match_tag(soap, s, "SOAP-ENV:Receiver"))
+      status = SOAP_SVR_FAULT; 
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:Client") || !soap_match_tag(soap, s, "SOAP-ENV:Sender"))
+      status = SOAP_CLI_FAULT;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:MustUnderstand"))
+      status = SOAP_MUSTUNDERSTAND;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:VersionMismatch"))
+      status = SOAP_VERSIONMISMATCH;
+    else
+    { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Fault code %s\n", s));
+      status = SOAP_FAULT;
+    }
+    if (soap_body_end_in(soap)
+     || soap_envelope_end_in(soap)
+     || soap_end_recv(soap))
+      return soap_closesock(soap);
+    soap->error = status;
+  }
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_empty_response(struct soap *soap)
+{ soap->count = 0;
+  if (soap_response(soap, SOAP_OK) || soap_end_send(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_empty_response(struct soap *soap)
+{ if (soap_begin_recv(soap) || soap_end_recv(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+soap_strerror(struct soap *soap)
+{ register int err = soap->errnum;
+  if (err)
+  {
+#ifndef WIN32
+    return strerror(err);
+#else
+    FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, (LPTSTR)&soap->errorstr, sizeof(soap->errorstr), NULL);
+    return soap->errorstr;
+#endif
+  }
+  return "Operation interrupted or timed out";
+}
+#endif
+#endif 
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_set_error(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail, int soaperror)
+{ *soap_faultcode(soap) = faultcode;
+  if (faultsubcode)
+    *soap_faultsubcode(soap) = faultsubcode;
+  *soap_faultstring(soap) = faultstring;
+  if (faultdetail && *faultdetail)
+  { register const char **s = soap_faultdetail(soap);
+    if (s)
+      *s = faultdetail;
+  }
+  return soap->error = soaperror;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_sender_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_receiver_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_copy_fault(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ char *r = NULL, *s = NULL, *t = NULL;
+  if (faultsubcode)
+    r = soap_strdup(soap, faultsubcode);
+  if (faultstring)
+    s = soap_strdup(soap, faultstring);
+  if (faultdetail)
+    t = soap_strdup(soap, faultdetail);
+  return soap_set_error(soap, faultcode, r, s, t, SOAP_FAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_sender_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_receiver_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault(struct soap *soap, FILE *fd)
+{ if (soap_check_state(soap))
+    fprintf(fd, "Error: soap struct not initialized\n");
+  else if (soap->error)
+  { const char *c, *v = NULL, *s, **d;
+    d = soap_faultcode(soap);
+    if (!*d)
+      soap_set_fault(soap);
+    c = *d;
+    if (soap->version == 2)
+      v = *soap_faultsubcode(soap);
+    s = *soap_faultstring(soap);
+    d = soap_faultdetail(soap);
+    fprintf(fd, "%s%d fault: %s [%s]\n\"%s\"\nDetail: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, c, v ? v : "no subcode", s ? s : "[no reason]", d && *d ? *d : "[no detail]");
+  }
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault_location(struct soap *soap, FILE *fd)
+{ 
+#ifndef WITH_LEAN
+  int i, j, c1, c2;
+  if (soap->error && soap->buflen > 0)
+  { i = (int)soap->bufidx - 1;
+    if (i <= 0)
+      i = 0;
+    c1 = soap->buf[i];
+    soap->buf[i] = '\0';
+    if ((int)soap->buflen >= i + 1024)
+      j = i + 1023;
+    else
+      j = (int)soap->buflen - 1;
+    c2 = soap->buf[j];
+    soap->buf[j] = '\0';
+    fprintf(fd, "%s%c\n** HERE **\n", soap->buf, c1);
+    if (soap->bufidx < soap->buflen)
+      fprintf(fd, "%s\n", soap->buf + soap->bufidx);
+    soap->buf[i] = c1;
+    soap->buf[j] = c2;
+  }
+#endif
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void *arg)
+{ register struct soap_plugin *p;
+  register int r;
+  if (!(p = (struct soap_plugin*)SOAP_MALLOC(soap, sizeof(struct soap_plugin))))
+    return soap->error = SOAP_EOM;
+  p->id = NULL;
+  p->data = NULL;
+  p->fcopy = NULL;
+  p->fdelete = NULL;
+  r = fcreate(soap, p, arg);
+  if (!r && p->fdelete)
+  { p->next = soap->plugins;
+    soap->plugins = p;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Registered '%s' plugin\n", p->id));
+    return SOAP_OK;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not register plugin '%s': plugin returned error %d (or fdelete callback not set)\n", p->id?p->id:"?", r));
+  SOAP_FREE(soap, p);
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static void *
+fplugin(struct soap *soap, const char *id)
+{ register struct soap_plugin *p;
+  for (p = soap->plugins; p; p = p->next)
+    if (p->id == id || !strcmp(p->id, id))
+      return p->data;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void *
+SOAP_FMAC2
+soap_lookup_plugin(struct soap *soap, const char *id)
+{ return soap->fplugin(soap, id);
+}
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap()
+{ soap_init(this);
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	C++ soap struct methods
+ *
+\******************************************************************************/
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode mode)
+{ soap_init1(this, mode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode imode, soap_mode omode)
+{ soap_init2(this, imode, omode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(struct soap& soap)
+{ soap_copy_context(this, &soap);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::~soap()
+{ soap_destroy(this);
+  soap_end(this);
+  soap_done(this);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/stdsoap2.cpp b/stdsoap2.cpp
new file mode 100644
index 0000000..f099298
--- /dev/null
+++ b/stdsoap2.cpp
@@ -0,0 +1,13448 @@
+/*
+
+stdsoap2.c[pp] 2.7.6e
+
+gSOAP runtime
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+Contributors:
+
+Wind River Systems Inc., for the following additions under gSOAP public license:
+  - vxWorks compatible	(#define VXWORKS)
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+Installation note:
+
+Win32 build needs winsock.dll (Visual C++ "wsock32.lib")
+To do this in Visual C++ 6.0, go to "Project", "settings", select the "Link"
+tab (the project file needs to be selected in the file view) and add
+"wsock32.lib" to the "Object/library modules" entry
+
+On Mac OS X with gcc (GCC) 3.1 20020420 (prerelease) you MUST compile with
+-fstack_check when using -O2 because gcc 3.1 has a bug that smashes the stack
+when locally allocated data exceeds 64K.
+
+*/
+
+#ifdef AS400
+# pragma convert(819)	/* EBCDIC to ASCII */
+#endif
+
+#include "stdsoap2.h"
+
+#ifdef __cplusplus
+SOAP_SOURCE_STAMP("@(#) stdsoap2.cpp ver 2.7.6e 2006-02-18 12:00:00 GMT")
+extern "C" {
+#else
+SOAP_SOURCE_STAMP("@(#) stdsoap2.c ver 2.7.6e 2006-02-18 12:00:00 GMT")
+#endif
+
+/* 8bit character representing unknown/nonrepresentable character data (e.g. not supported by current locale with multibyte support enabled) */
+#ifndef SOAP_UNKNOWN_CHAR
+#define SOAP_UNKNOWN_CHAR (127)
+#endif
+
+/*      EOF=-1 */
+#define SOAP_LT (soap_wchar)(-2) /* XML character '<' */
+#define SOAP_TT (soap_wchar)(-3) /* XML character '</' */
+#define SOAP_GT (soap_wchar)(-4) /* XML character '>' */
+#define SOAP_QT (soap_wchar)(-5) /* XML character '"' */
+#define SOAP_AP (soap_wchar)(-6) /* XML character ''' */
+
+#define soap_blank(c)		((c) >= 0 && (c) <= 32)
+#define soap_notblank(c)	((c) > 32)
+#define soap_hash_ptr(p)	(((unsigned long)(p) >> 3) & (SOAP_PTRHASH - 1))
+
+#ifdef SOAP_DEBUG
+static void soap_init_logs(struct soap*);
+static void soap_close_logfile(struct soap*, int);
+static void soap_set_logfile(struct soap*, int, const char*);
+static void soap_free_mht(struct soap*);
+static void soap_track_unlink(struct soap*, const void*);
+#endif
+
+#ifndef PALM_2
+static int soap_set_error(struct soap*, const char*, const char*, const char*, const char*, int);
+static int soap_copy_fault(struct soap*, const char*, const char*, const char*, const char*);
+static int soap_getattrval(struct soap*, char*, size_t, soap_wchar);
+#endif
+
+#ifndef PALM_1
+static soap_wchar soap_char(struct soap*);
+static soap_wchar soap_get_pi(struct soap*);
+static int soap_isxdigit(int);
+static void *fplugin(struct soap*, const char*);
+#ifndef WITH_NOIDREF
+static void soap_update_ptrs(struct soap*, char*, char*, char*, char*);
+static int soap_has_copies(struct soap*, const char*, const char*);
+static void soap_init_iht(struct soap*);
+static void soap_free_iht(struct soap*);
+static void soap_init_pht(struct soap*);
+static void soap_free_pht(struct soap*);
+#endif
+#endif
+
+#ifndef WITH_LEAN
+static const char *soap_set_validation_fault(struct soap*, const char*, const char*);
+static int soap_isnumeric(struct soap*, const char*);
+static time_t soap_timegm(struct tm*);
+static struct soap_nlist *soap_lookup_ns(struct soap *soap, const char *tag, size_t n);
+static struct soap_nlist *soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized);
+static void soap_pop_ns(struct soap *soap);
+static void soap_utilize_ns(struct soap *soap, const char *tag, size_t n);
+#endif
+
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart *soap_new_multipart(struct soap*, struct soap_multipart**, struct soap_multipart**, char*, size_t);
+static int soap_putdimefield(struct soap*, const char*, size_t);
+static char *soap_getdimefield(struct soap*, size_t);
+static void soap_select_mime_boundary(struct soap*);
+static int soap_valid_mime_boundary(struct soap*);
+static int soap_match_cid(struct soap*, const char*, const char*);
+static void soap_resolve_attachment(struct soap*, struct soap_multipart*);
+#endif
+#endif
+
+#ifdef WITH_GZIP
+static int soap_getgziphdr(struct soap*);
+#endif
+
+#ifdef WITH_OPENSSL
+static int ssl_init_done = 0;
+static int ssl_auth_init(struct soap*);
+static int ssl_verify_callback(int, X509_STORE_CTX*);
+static int ssl_password(char*, int, int, void *);
+static const char *ssl_error(struct soap*, int);
+/* This callback is included for future references. It should not be deleted
+static DH *ssl_tmp_dh(SSL*, int, int);
+*/
+#endif
+
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char *soap_decode(char*, size_t, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar soap_getchunkchar(struct soap*);
+static const char *http_error(struct soap*, int);
+static int http_post(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
+static int http_get(struct soap*);
+static int http_send_header(struct soap*, const char*);
+static int http_post_header(struct soap*, const char*, const char*);
+static int http_response(struct soap*, int, size_t);
+static int http_parse(struct soap*);
+static int http_parse_header(struct soap*, const char*, const char*);
+#endif
+#endif
+
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int fsend(struct soap*, const char*, size_t);
+static size_t frecv(struct soap*, char*, size_t);
+static int tcp_init(struct soap*);
+static const char *tcp_error(struct soap*);
+#ifndef WITH_IPV6
+static int tcp_gethost(struct soap*, const char *addr, struct in_addr *inaddr);
+#endif
+static int tcp_connect(struct soap*, const char *endpoint, const char *host, int port);
+static int tcp_accept(struct soap*, int, struct sockaddr*, int*);
+static int tcp_disconnect(struct soap*);
+static int tcp_closesocket(struct soap*, SOAP_SOCKET);
+static int tcp_shutdownsocket(struct soap*, SOAP_SOCKET, int);
+static const char *soap_strerror(struct soap*);
+#endif
+#endif
+
+#if defined(PALM) && !defined(PALM_2)
+unsigned short errno;
+#endif
+
+#ifndef PALM_1
+static const char soap_env1[42] = "http://schemas.xmlsoap.org/soap/envelope/";
+static const char soap_enc1[42] = "http://schemas.xmlsoap.org/soap/encoding/";
+static const char soap_env2[40] = "http://www.w3.org/2003/05/soap-envelope";
+static const char soap_enc2[40] = "http://www.w3.org/2003/05/soap-encoding";
+static const char soap_rpc[35] = "http://www.w3.org/2003/05/soap-rpc";
+#endif
+
+#ifndef PALM_1
+const struct soap_double_nan soap_double_nan = {0xFFFFFFFF, 0xFFFFFFFF};
+static const char soap_base64o[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+static const char soap_base64i[81] = "\76XXX\77\64\65\66\67\70\71\72\73\74\75XXXXXXX\00\01\02\03\04\05\06\07\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31XXXXXX\32\33\34\35\36\37\40\41\42\43\44\45\46\47\50\51\52\53\54\55\56\57\60\61\62\63";
+#endif
+
+#ifndef WITH_LEAN
+static const char soap_indent[11] = "\n\t\t\t\t\t\t\t\t\t";
+/* Alternative indentation form for SOAP_XML_INDENT:
+static const char soap_indent[21] = "\n                   ";
+*/
+#endif
+
+static const char soap_padding[4] = "\0\0\0";
+#define SOAP_STR_PADDING (soap_padding)
+#define SOAP_STR_EOS (soap_padding)
+#define SOAP_NON_NULL (soap_padding)
+
+#ifndef WITH_LEAN
+static const struct soap_code_map html_entity_codes[] = /* entities for XHTML parsing */
+{ { 160, "nbsp" },
+  { 161, "iexcl" },
+  { 162, "cent" },
+  { 163, "pound" },
+  { 164, "curren" },
+  { 165, "yen" },
+  { 166, "brvbar" },
+  { 167, "sect" },
+  { 168, "uml" },
+  { 169, "copy" },
+  { 170, "ordf" },
+  { 171, "laquo" },
+  { 172, "not" },
+  { 173, "shy" },
+  { 174, "reg" },
+  { 175, "macr" },
+  { 176, "deg" },
+  { 177, "plusmn" },
+  { 178, "sup2" },
+  { 179, "sup3" },
+  { 180, "acute" },
+  { 181, "micro" },
+  { 182, "para" },
+  { 183, "middot" },
+  { 184, "cedil" },
+  { 185, "sup1" },
+  { 186, "ordm" },
+  { 187, "raquo" },
+  { 188, "frac14" },
+  { 189, "frac12" },
+  { 190, "frac34" },
+  { 191, "iquest" },
+  { 192, "Agrave" },
+  { 193, "Aacute" },
+  { 194, "Acirc" },
+  { 195, "Atilde" },
+  { 196, "Auml" },
+  { 197, "Aring" },
+  { 198, "AElig" },
+  { 199, "Ccedil" },
+  { 200, "Egrave" },
+  { 201, "Eacute" },
+  { 202, "Ecirc" },
+  { 203, "Euml" },
+  { 204, "Igrave" },
+  { 205, "Iacute" },
+  { 206, "Icirc" },
+  { 207, "Iuml" },
+  { 208, "ETH" },
+  { 209, "Ntilde" },
+  { 210, "Ograve" },
+  { 211, "Oacute" },
+  { 212, "Ocirc" },
+  { 213, "Otilde" },
+  { 214, "Ouml" },
+  { 215, "times" },
+  { 216, "Oslash" },
+  { 217, "Ugrave" },
+  { 218, "Uacute" },
+  { 219, "Ucirc" },
+  { 220, "Uuml" },
+  { 221, "Yacute" },
+  { 222, "THORN" },
+  { 223, "szlig" },
+  { 224, "agrave" },
+  { 225, "aacute" },
+  { 226, "acirc" },
+  { 227, "atilde" },
+  { 228, "auml" },
+  { 229, "aring" },
+  { 230, "aelig" },
+  { 231, "ccedil" },
+  { 232, "egrave" },
+  { 233, "eacute" },
+  { 234, "ecirc" },
+  { 235, "euml" },
+  { 236, "igrave" },
+  { 237, "iacute" },
+  { 238, "icirc" },
+  { 239, "iuml" },
+  { 240, "eth" },
+  { 241, "ntilde" },
+  { 242, "ograve" },
+  { 243, "oacute" },
+  { 244, "ocirc" },
+  { 245, "otilde" },
+  { 246, "ouml" },
+  { 247, "divide" },
+  { 248, "oslash" },
+  { 249, "ugrave" },
+  { 250, "uacute" },
+  { 251, "ucirc" },
+  { 252, "uuml" },
+  { 253, "yacute" },
+  { 254, "thorn" },
+  { 255, "yuml" },
+  {   0, NULL }
+};
+#endif
+
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+static const struct soap_code_map h_error_codes[] =
+{
+#ifdef HOST_NOT_FOUND   
+  { HOST_NOT_FOUND, "Host not found" },
+#endif
+#ifdef TRY_AGAIN
+  { TRY_AGAIN, "Try Again" },
+#endif
+#ifdef NO_RECOVERY  
+  { NO_RECOVERY, "No Recovery" },
+#endif
+#ifdef NO_DATA
+  { NO_DATA, "No Data" },
+#endif
+#ifdef NO_ADDRESS
+  { NO_ADDRESS, "No Address" },
+#endif
+  { 0, NULL }
+};
+#endif
+#endif
+
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+static const struct soap_code_map h_http_error_codes[] =
+{ { 201, "Created" },
+  { 202, "Accepted" },
+  { 203, "Non-Authoritative Information" },
+  { 204, "No Content" },
+  { 205, "Reset Content" },
+  { 206, "Partial Content" },
+  { 300, "Multiple Choices" },
+  { 301, "Moved Permanently" },
+  { 302, "Found" },
+  { 303, "See Other" },
+  { 304, "Not Modified" },
+  { 305, "Use Proxy" },
+  { 307, "Temporary Redirect" },
+  { 400, "Bad Request" },
+  { 401, "Unauthorized" },
+  { 402, "Payment Required" },
+  { 403, "Forbidden" },
+  { 404, "Not Found" },
+  { 405, "Method Not Allowed" },
+  { 406, "Not Acceptable" },
+  { 407, "Proxy Authentication Required" },
+  { 408, "Request Time-out" },
+  { 409, "Conflict" },
+  { 410, "Gone" },
+  { 411, "Length Required" },
+  { 412, "Precondition Failed" },
+  { 413, "Request Entity Too Large" },
+  { 414, "Request-URI Too Large" },
+  { 415, "Unsupported Media Type" },
+  { 416, "Requested range not satisfiable" },
+  { 417, "Expectation Failed" },
+  { 500, "Internal Server Error" },
+  { 501, "Not Implemented" },
+  { 502, "Bad Gateway" },
+  { 503, "Service Unavailable" },
+  { 504, "Gateway Time-out" },
+  { 505, "HTTP Version not supported" },
+  {   0, NULL }
+};
+#endif
+#endif
+
+#ifdef WITH_OPENSSL
+static const struct soap_code_map h_ssl_error_codes[] =
+{
+#define _SSL_ERROR(e) { e, #e }
+  _SSL_ERROR(SSL_ERROR_SSL),
+  _SSL_ERROR(SSL_ERROR_ZERO_RETURN),
+  _SSL_ERROR(SSL_ERROR_WANT_READ),
+  _SSL_ERROR(SSL_ERROR_WANT_WRITE),
+  _SSL_ERROR(SSL_ERROR_WANT_CONNECT),
+  _SSL_ERROR(SSL_ERROR_WANT_X509_LOOKUP),
+  _SSL_ERROR(SSL_ERROR_SYSCALL),
+  { 0, NULL }
+};
+#endif
+
+#ifndef WITH_LEANER
+static const struct soap_code_map mime_codes[] =
+{ { SOAP_MIME_7BIT,		"7bit" },
+  { SOAP_MIME_8BIT,		"8bit" },
+  { SOAP_MIME_BINARY,		"binary" },
+  { SOAP_MIME_QUOTED_PRINTABLE, "quoted-printable" },
+  { SOAP_MIME_BASE64,		"base64" },
+  { SOAP_MIME_IETF_TOKEN,	"ietf-token" },
+  { SOAP_MIME_X_TOKEN,		"x-token" },
+  { 0,				NULL }
+};
+#endif
+
+#ifdef WIN32
+static int tcp_done = 0;
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+fsend(struct soap *soap, const char *s, size_t n)
+{ register int nwritten;
+#if defined(__cplusplus)  && (!defined(WITH_LEAN) || defined(UNDER_CE))
+  if (soap->os)
+  { soap->os->write(s, n);
+    if (soap->os->good())
+      return SOAP_OK;
+    return SOAP_EOF;
+  }
+#endif
+  while (n)
+  { if (soap_valid_socket(soap->socket))
+    { 
+#ifndef WITH_LEAN
+      if (soap->send_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->send_timeout > 0)
+        { timeout.tv_sec = soap->send_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->send_timeout/1000000;
+          timeout.tv_usec = -soap->send_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { register int r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            return SOAP_EOF;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+          { soap->errnum = soap_socket_errno;
+            return SOAP_EOF;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+        nwritten = SSL_write(soap->ssl, s, n);
+      else if (soap->bio)
+        nwritten = BIO_write(soap->bio, s, n);
+      else
+#endif
+#ifdef WITH_UDP
+      if ((soap->omode & SOAP_IO_UDP))
+      { if (soap->peerlen)
+	  nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+        else
+	  nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	/* retry and back-off algorithm */
+	/* TODO: this is not very clear from specs so verify and limit conditions under which we should loop (e.g. ENOBUFS) */
+	if (nwritten < 0)
+        { struct timeval timeout;
+          fd_set fd;
+	  int udp_repeat;
+	  int udp_delay;
+          if ((soap->connect_flags & SO_BROADCAST))
+	    udp_repeat = 3; /* SOAP-over-UDP MULTICAST_UDP_REPEAT - 1 */
+          else
+	    udp_repeat = 1; /* SOAP-over-UDP UNICAST_UDP_REPEAT - 1 */
+	  udp_delay = (soap_random % 201) + 50; /* UDP_MIN_DELAY .. UDP_MAX_DELAY */
+	  do
+          { timeout.tv_sec = 0;
+            timeout.tv_usec = 1000 * udp_delay; /* ms */
+            FD_ZERO(&fd);
+            FD_SET((SOAP_SOCKET)soap->socket, &fd);
+            select((SOAP_SOCKET)(soap->socket + 1), NULL, NULL, &fd, &timeout);
+	    if (soap->peerlen)
+	      nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen);
+            else
+	      nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+	    udp_delay <<= 1;
+	    if (udp_delay > 500) /* UDP_UPPER_DELAY */
+	      udp_delay = 500;
+	  }
+	  while (nwritten < 0 && --udp_repeat > 0);
+	}
+      }
+      else
+#endif
+#if !defined(PALM) && !defined(AS400)
+        nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+#else
+        nwritten = send((SOAP_SOCKET)soap->socket, (void*)s, n, soap->socket_flags);
+#endif
+      if (nwritten <= 0)
+      {
+#ifdef WITH_OPENSSL
+	int err;
+        if (soap->ssl && (err = SSL_get_error(soap->ssl, nwritten)) != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return SOAP_EOF;
+#endif
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EWOULDBLOCK && soap_socket_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_socket_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    else
+    {
+#ifdef WITH_FASTCGI
+      nwritten = fwrite((void*)s, 1, n, stdout);
+      fflush(stdout);
+#else
+#ifdef UNDER_CE
+      nwritten = fwrite(s, 1, n, soap->sendfd);
+#else
+#ifdef VXWORKS
+#ifdef WMW_RPM_IO
+      if (soap->rpmreqid)
+        nwritten = (httpBlockPut(soap->rpmreqid, s, n) == 0) ? n : -1; 
+      else
+#endif
+        nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w"));
+#else
+      nwritten = write((SOAP_SOCKET)soap->sendfd, s, n);
+#endif
+#endif
+#endif
+      if (nwritten <= 0)
+      { if (soap_errno != SOAP_EINTR && soap_errno != SOAP_EWOULDBLOCK && soap_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    n -= nwritten;
+    s += nwritten;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_raw(struct soap *soap, const char *s, size_t n)
+{ if (!n)
+    return SOAP_OK;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { soap->count += n;
+#ifndef WITH_LEANER
+    if (soap->fpreparesend && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+  if (soap->mode & SOAP_IO)
+  { register size_t i = SOAP_BUFLEN - soap->bufidx;
+    while (n >= i)
+    { memcpy(soap->buf + soap->bufidx, s, i);
+      soap->bufidx = SOAP_BUFLEN;
+      if (soap_flush(soap))
+        return soap->error;
+      s += i;
+      n -= i;
+      i = SOAP_BUFLEN;
+    }
+    memcpy(soap->buf + soap->bufidx, s, n);
+    soap->bufidx += n;
+    return SOAP_OK;
+  }
+  return soap_flush_raw(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush(struct soap *soap)
+{ register int n = soap->bufidx;
+  if (n)
+  { soap->bufidx = 0;
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { soap->d_stream.next_in = (Byte*)soap->buf;
+      soap->d_stream.avail_in = (unsigned int)n;
+#ifdef WITH_GZIP
+      soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)n);
+#endif
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating %u bytes\n", soap->d_stream.avail_in));
+        if (deflate(&soap->d_stream, Z_NO_FLUSH) != Z_OK)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+          return soap->error = SOAP_ZLIB_ERROR;
+        }
+        if (!soap->d_stream.avail_out)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN))
+            return soap->error;
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (soap->d_stream.avail_in);
+    }
+    else
+#endif
+      return soap_flush_raw(soap, soap->buf, n);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush_raw(struct soap *soap, const char *s, size_t n)
+{ if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+  { register char *t;
+    if (!(t = (char*)soap_push_block(soap, n)))
+      return soap->error = SOAP_EOM;
+    memcpy(t, s, n);
+#ifndef WITH_LEANER
+    if (soap->fpreparesend)
+      return soap->error = soap->fpreparesend(soap, s, n);
+#endif
+    return SOAP_OK;
+  }
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+  { char t[16];
+    sprintf(t, "\r\n%lX\r\n" + (soap->chunksize ? 0 : 2), (unsigned long)n);
+    DBGMSG(SENT, t, strlen(t));
+    if ((soap->error = soap->fsend(soap, t, strlen(t))))
+      return soap->error;
+    soap->chunksize += n;
+  }
+  DBGMSG(SENT, s, n);
+#endif
+  return soap->error = soap->fsend(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send(struct soap *soap, const char *s)
+{ if (s)
+    return soap_send_raw(soap, s, strlen(s));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send2(struct soap *soap, const char *s1, const char *s2)
+{ if (soap_send(soap, s1))
+    return soap->error;
+  return soap_send(soap, s2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send3(struct soap *soap, const char *s1, const char *s2, const char *s3)
+{ if (soap_send(soap, s1)
+   || soap_send(soap, s2))
+    return soap->error;
+  return soap_send(soap, s3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static size_t
+frecv(struct soap *soap, char *s, size_t n)
+{ register int r;
+  soap->errnum = 0;
+#if defined(__cplusplus) && (!defined(WITH_LEAN) || defined(UNDER_CE))
+  if (soap->is)
+  { if (soap->is->good())
+      return soap->is->read(s, n).gcount();
+    return 0;
+  }
+#endif
+  if (soap_valid_socket(soap->socket))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->recv_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->recv_timeout > 0)
+        { timeout.tv_sec = soap->recv_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->recv_timeout/1000000;
+          timeout.tv_usec = -soap->recv_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+	  { soap->errnum = 0;
+            return 0;
+          }
+          if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+	  { soap->errnum = soap_socket_errno;
+            return 0;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+      { int err;
+	r = SSL_read(soap->ssl, s, n);
+        if (r > 0)
+          return (size_t)r;
+	err = SSL_get_error(soap->ssl, r);
+	if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return 0;
+      }
+      else if (soap->bio)
+      { r = BIO_read(soap->bio, s, n);
+        if (r > 0)
+          return (size_t)r;
+        return 0;
+      }
+      else
+#endif
+      { 
+#ifdef WITH_UDP
+        if ((soap->omode & SOAP_IO_UDP))
+        { SOAP_SOCKLEN_T k = (SOAP_SOCKLEN_T)sizeof(soap->peer);
+	  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+          r = recvfrom((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, &k);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+	  soap->peerlen = (size_t)k;
+#ifndef WITH_IPV6
+          soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+          soap->port = (int)ntohs(soap->peer.sin_port);
+#endif
+        }
+	else
+#endif
+          r = recv((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+        if (r >= 0)
+          return (size_t)r;
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN && soap_socket_errno != SOAP_EWOULDBLOCK)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#ifndef WITH_LEAN
+      { struct timeval timeout;
+        fd_set fd;
+        timeout.tv_sec = 0;
+        timeout.tv_usec = 10000;
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+#ifdef WITH_OPENSSL
+        if (soap->ssl && SSL_get_error(soap->ssl, r) == SSL_ERROR_WANT_WRITE)
+          r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+        else
+          r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#else
+        r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+#endif
+        if (r < 0 && soap_socket_errno != SOAP_EINTR)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#endif
+    }
+  }
+#ifdef WITH_FASTCGI
+  return fread(s, 1, n, stdin);
+#else
+#ifdef UNDER_CE
+  return fread(s, 1, n, soap->recvfd);
+#else
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    r = httpBlockRead(soap->rpmreqid, s, n);
+  else
+#endif
+  r = read((SOAP_SOCKET)soap->recvfd, s, n);
+  if (r >= 0)
+    return (size_t)r;
+  soap->errnum = soap_errno;
+  return 0;
+#endif
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static soap_wchar
+soap_getchunkchar(struct soap *soap)
+{ if (soap->bufidx < soap->buflen)
+    return soap->buf[soap->bufidx++];
+  soap->bufidx = 0;
+  soap->buflen = soap->chunkbuflen = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)soap->buflen, soap->socket));
+  DBGMSG(RECV, soap->buf, soap->buflen);
+  if (soap->buflen)
+    return soap->buf[soap->bufidx++];
+  return EOF;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+soap_isxdigit(int c)
+{ return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f');
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_raw(struct soap *soap)
+{ register size_t ret;
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { if (soap->d_stream.next_out == Z_NULL)
+      return EOF;
+    if (soap->d_stream.avail_in || !soap->d_stream.avail_out)
+    { register int r;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflating\n"));
+      soap->d_stream.next_out = (Byte*)soap->buf;
+      soap->d_stream.avail_out = SOAP_BUFLEN;
+      r = inflate(&soap->d_stream, Z_NO_FLUSH);
+      if (r == Z_OK || r == Z_STREAM_END)
+      { soap->bufidx = 0;
+        soap->buflen = SOAP_BUFLEN - soap->d_stream.avail_out;
+        if (soap->zlib_in == SOAP_ZLIB_GZIP)
+          soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+        if (r == Z_STREAM_END)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+          soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+          soap->d_stream.next_out = Z_NULL;
+        }
+        if (soap->buflen)
+        { soap->count += soap->buflen;
+          return SOAP_OK;
+        }
+      }
+      else if (r != Z_BUF_ERROR)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate error: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        soap->d_stream.next_out = Z_NULL;
+	soap->error = SOAP_ZLIB_ERROR;
+        return EOF;
+      }
+    }
+zlib_again:
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK && !soap->chunksize)
+    { memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+      soap->buflen = soap->z_buflen;
+    }
+  }
+#endif
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) /* read HTTP chunked transfer */
+  { 
+chunk_again:
+    if (soap->chunksize)
+    { soap->buflen = ret = soap->frecv(soap, soap->buf, soap->chunksize > SOAP_BUFLEN ? SOAP_BUFLEN : soap->chunksize);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk: read %u bytes\n", (unsigned int)ret));
+      DBGMSG(RECV, soap->buf, ret);
+      soap->bufidx = 0;
+      soap->chunksize -= ret;
+    }
+    else
+    { register soap_wchar c;
+      char *t, tmp[8];
+      t = tmp;
+      if (!soap->chunkbuflen)
+      { soap->chunkbuflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes (chunked) from socket %d\n", (unsigned int)ret, soap->socket));
+        DBGMSG(RECV, soap->buf, ret);
+        soap->bufidx = 0;
+        if (!ret)
+          return soap->ahead = EOF;
+      }
+      else
+        soap->bufidx = soap->buflen;
+      soap->buflen = soap->chunkbuflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk size (idx=%u len=%u)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen));
+      while (!soap_isxdigit((int)(c = soap_getchunkchar(soap))))
+        if ((int)c == EOF)
+	  return soap->ahead = EOF;
+      do
+        *t++ = (char)c;
+      while (soap_isxdigit((int)(c = soap_getchunkchar(soap))) && t - tmp < 7);
+      while ((int)c != EOF && c != '\n')
+        c = soap_getchunkchar(soap);
+      if ((int)c == EOF)
+        return soap->ahead = EOF;
+      *t = '\0';
+      soap->chunksize = soap_strtoul(tmp, &t, 16);
+      if (!soap->chunksize)
+      { soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of chunked message\n"));
+	while ((int)c != EOF && c != '\n')
+          c = soap_getchunkchar(soap);
+        return soap->ahead = EOF;
+      }
+      soap->buflen = soap->bufidx + soap->chunksize;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving buf len to idx=%u len=%u (%s)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen, tmp));
+      if (soap->buflen > soap->chunkbuflen)
+      { soap->buflen = soap->chunkbuflen;
+        soap->chunksize -= soap->buflen - soap->bufidx;
+        soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Passed end of buffer for chunked HTTP (%u bytes left)\n", (unsigned int)(soap->buflen - soap->bufidx)));
+      }
+      else if (soap->chunkbuflen)
+        soap->chunksize = 0;
+      ret = soap->buflen - soap->bufidx;
+      if (!ret)
+        goto chunk_again;
+    }
+  }
+  else
+#endif
+  { soap->bufidx = 0;
+    soap->buflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)ret, soap->socket));
+    DBGMSG(RECV, soap->buf, ret);
+  }
+#ifndef WITH_LEANER
+  if (soap->fpreparerecv && (soap->error = soap->fpreparerecv(soap, soap->buf, ret)))
+    return soap->error;
+#endif
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { register int r;
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = (unsigned int)ret;
+    soap->d_stream.next_out = (Byte*)soap->buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    r = inflate(&soap->d_stream, Z_NO_FLUSH);
+    if (r == Z_OK || r == Z_STREAM_END)
+    { soap->bufidx = 0;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = ret = SOAP_BUFLEN - soap->d_stream.avail_out;
+      if (soap->zlib_in == SOAP_ZLIB_GZIP)
+        soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %u bytes\n", (unsigned int)ret));
+      if (!ret)
+        goto zlib_again;
+      if (r == Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+        soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+        soap->d_stream.next_out = Z_NULL;
+      }
+    }
+    else
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to inflate: (%d) %s\n", r, soap->d_stream.msg?soap->d_stream.msg:""));
+      soap->d_stream.next_out = Z_NULL;
+      soap->error = SOAP_ZLIB_ERROR;
+      return EOF;
+    }
+  }
+#endif
+  soap->count += ret;
+  return !ret;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap->dime.buflen)
+    { char *s;
+      int i;
+      unsigned char tmp[12];
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME hdr for chunked DIME is in buffer\n"));
+      soap->count += soap->dime.buflen - soap->buflen;
+      soap->buflen = soap->dime.buflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Skip padding (%ld bytes)\n", -(long)soap->dime.size&3));
+      for (i = -(long)soap->dime.size&3; i > 0; i--)
+      { soap->bufidx++;
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME hdr for next chunk\n"));
+      s = (char*)tmp;
+      for (i = 12; i > 0; i--)
+      { *s++ = soap->buf[soap->bufidx++];
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      soap->dime.flags = tmp[0] & 0x7;
+      soap->dime.size = ((size_t)tmp[8] << 24) | ((size_t)tmp[9] << 16) | ((size_t)tmp[10] << 8) | ((size_t)tmp[11]);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME chunk (%u bytes)\n", (unsigned int)soap->dime.size));
+      if (soap->dime.flags & SOAP_DIME_CF)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "More chunking\n"));
+        soap->dime.chunksize = soap->dime.size;
+        if (soap->buflen - soap->bufidx >= soap->dime.size)
+        { soap->dime.buflen = soap->buflen;
+          soap->buflen = soap->bufidx + soap->dime.chunksize;
+        }
+        else
+          soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      }
+      else
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Last chunk\n"));
+        soap->dime.buflen = 0;
+        soap->dime.chunksize = 0;
+      }
+      soap->count = soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%u bytes remaining\n", (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+    if (soap->dime.chunksize)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get next DIME hdr for chunked DIME (%u bytes chunk)\n", (unsigned int)soap->dime.chunksize));
+      if (soap_recv_raw(soap))
+        return EOF;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->count -= soap->buflen - soap->bufidx - soap->dime.chunksize;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%lu bytes remaining, count=%u\n", (unsigned long)(soap->buflen-soap->bufidx), (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+  }
+#endif
+  return soap_recv_raw(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getchar(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+    return c;
+  }
+  return soap_get1(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const struct soap_code_map*
+SOAP_FMAC2
+soap_code(const struct soap_code_map *map, const char *str)
+{ if (str)
+  { while (map->string)
+    { if (!strcmp(str, map->string)) /* case sensitive */
+        return map;
+      map++;
+    }
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_int_code(const struct soap_code_map *map, const char *str, long other)
+{ while (map->string)
+  { if (!soap_tag_cmp(str, map->string)) /* case insensitive */
+      return map->code;
+    map++;
+  }
+  return other;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_str_code(const struct soap_code_map *map, long code)
+{ while (map->code != code && map->string)
+    map++;
+  return map->string;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_char(struct soap *soap)
+{ char tmp[8];
+  register int i;
+  register soap_wchar c;
+  register char *s = tmp;
+  for (i = 0; i < 7; i++)
+  { c = soap_get1(soap);
+    if (c == ';' || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+  }
+  *s = '\0';
+  if (*tmp == '#')
+  { if (tmp[1] == 'x' || tmp[1] == 'X')
+      return soap_strtol(tmp + 2, NULL, 16);
+    return atol(tmp + 1);
+  }
+  if (!strcmp(tmp, "lt"))
+    return '<';
+  if (!strcmp(tmp, "gt"))
+    return '>';
+  if (!strcmp(tmp, "amp"))
+    return '&';
+  if (!strcmp(tmp, "quot"))
+    return '"';
+  if (!strcmp(tmp, "apos"))
+    return '\'';
+#ifndef WITH_LEAN
+  return (soap_wchar)soap_int_code(html_entity_codes, tmp, SOAP_UNKNOWN_CHAR);
+#else
+  return SOAP_UNKNOWN_CHAR; /* use this to represent unknown code */
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get0(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx];
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_LEAN
+soap_wchar
+soap_get1(struct soap *soap)
+{ if (soap->bufidx >= soap->buflen && soap_recv(soap))
+    return EOF;
+  return (unsigned char)soap->buf[soap->bufidx++];
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_get(struct soap *soap)
+{ register soap_wchar c;
+  c = soap->ahead;
+  if (c)
+  { if (c != EOF)
+      soap->ahead = 0;
+  }
+  else
+    c = soap_get1(soap);
+  for (;;)
+  { if (soap->cdata)
+    { if (c == ']')
+      { c = soap_get1(soap);
+        if (c == ']')
+        { soap->cdata = 0;
+          soap_get1(soap); /* skip > */
+          c = soap_get1(soap);
+        }
+	else
+        { soap_revget1(soap);
+          return ']';
+        }
+      }
+      else
+        return c;
+    }
+    switch (c)
+    { case '<':
+        do c = soap_get1(soap);
+        while (soap_blank(c));
+        if (c == '!' || c == '?' || c == '%')
+        { register int k = 1;
+	  if (c == '!')
+          { c = soap_get1(soap);
+            if (c == '[')
+            { do c = soap_get1(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                break;
+              soap->cdata = 1;
+              c = soap_get1(soap);
+	      continue;
+            }
+            if (c == '-' && (c = soap_get1(soap)) == '-')
+            { do
+              { c = soap_get1(soap);
+                if (c == '-' && (c = soap_get1(soap)) == '-')
+                  break;
+              } while ((int)c != EOF);
+            }
+          }
+	  else if (c == '?')
+            c = soap_get_pi(soap);
+          while ((int)c != EOF)
+          { if (c == '<')
+	      k++;
+	    else if (c == '>')
+	    { if (--k <= 0)
+	        break;
+	    }
+	    c = soap_get1(soap);
+	  }
+	  if ((int)c == EOF)
+	    break;
+          c = soap_get1(soap);
+          continue;
+        }
+        if (c == '/')
+          return SOAP_TT;
+        soap_revget1(soap);
+        return SOAP_LT;
+      case '>':
+        return SOAP_GT;
+      case '"':
+        return SOAP_QT;
+      case '\'':
+        return SOAP_AP;
+      case '&':
+        return soap_char(soap) | 0x80000000;
+    }
+    break;
+  }
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static soap_wchar
+soap_get_pi(struct soap *soap)
+{ char buf[64];
+  register char *s = buf;
+  register int i = sizeof(buf);
+  register soap_wchar c = soap_getchar(soap);
+  /* This is a quick way to parse XML PI and we could use a callback instead to
+   * enable applications to intercept processing instructions */
+  while ((int)c != EOF && c != '?')
+  { if (--i > 0)
+    { if (soap_blank(c))
+        c = ' ';
+      *s++ = (char)c;
+    }
+    c = soap_getchar(soap);
+  }
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML PI <?%s?>\n", buf));
+  if (!strncmp(buf, "xml ", 4))
+  { s = strstr(buf, " encoding=");
+    if (s && s[10])
+    { if (!soap_tag_cmp(s + 11, "iso-8859-1*")
+       || !soap_tag_cmp(s + 11, "latin1*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to latin1 encoding\n"));
+        soap->mode |= SOAP_ENC_LATIN;
+      }
+      else if (!soap_tag_cmp(s + 11, "utf-8*"))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to utf-8 encoding\n"));
+        soap->mode &= ~SOAP_ENC_LATIN;
+      }
+    }
+  }
+  if ((int)c != EOF)
+    c = soap_getchar(soap);
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_move(struct soap *soap, long n)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving %ld bytes forward\n", (long)n));
+  for (; n > 0; n--)
+    if ((int)soap_getchar(soap) == EOF)
+      return SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_tell(struct soap *soap)
+{ return soap->count - soap->buflen + soap->bufidx - (soap->ahead != 0);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pututf8(struct soap *soap, register unsigned long c)
+{ char tmp[16];
+  if (c > 0 && c < 0x80)
+  { *tmp = (char)c;
+    return soap_send_raw(soap, tmp, 1);
+  }
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { register char *t = tmp;
+    if (c < 0x0800)
+      *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+    else
+    { if (c < 0x010000)
+        *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+      else
+      { if (c < 0x200000)
+          *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+        else
+        { if (c < 0x04000000)
+            *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+          else
+          { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+            *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+        }     
+        *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+      }
+      *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+    }
+    *t++ = (char)(0x80 | (c & 0x3F));
+    *t = '\0';
+  }
+  else
+#endif
+    sprintf(tmp, "&#%lu;", c);
+  return soap_send(soap, tmp);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+soap_wchar
+SOAP_FMAC2
+soap_getutf8(struct soap *soap)
+{ register soap_wchar c, c1, c2, c3, c4;
+  c = soap->ahead;
+  if (c > 0xFF)
+  { soap->ahead = 0;
+    return c;
+  }
+again:
+  c = soap_get(soap);
+  if (c < 0x80 || (soap->mode & SOAP_ENC_LATIN))
+    return c;
+  c1 = soap_get1(soap);
+  if (c1 < 0x80)
+  { soap_revget1(soap); /* doesn't look like this is UTF8 */
+    return c;
+  }
+  c1 &= 0x3F;
+  if (c < 0xE0)
+    return ((soap_wchar)(c & 0x1F) << 6) | c1;
+  c2 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c == 0xEF && c1 == 0x3B && c2 == 0x3F)	/* ignore UTF-8 BOM */
+    goto again;
+  if (c < 0xF0)
+    return ((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2;
+  c3 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xF8)
+    return ((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3;
+  c4 = (soap_wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xFC)
+    return ((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4;
+  return ((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(soap_get1(soap) & 0x3F);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthex(struct soap *soap, const unsigned char *s, int n)
+{ char d[2];
+  register int i;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2hex(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (i = 0; i < n; i++)
+  { register int m = *s++;
+    d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0'));
+    m &= 0x0F;
+    d[1] = (char)(m + (m > 9 ? '7' : '0'));
+    if (soap_send_raw(soap, d, 2))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_gethex(struct soap *soap, int *n)
+{
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_hex2s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register char *s;
+    register int i, k;
+    if (soap_append_lab(soap, NULL, 0))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = soap->lablen;
+    for (i = 0; i < k; i++)
+    { register char d1, d2;
+      register soap_wchar c;
+      c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = (int)(soap->lablen - k + i);
+        p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	if (p)
+	  memcpy(p, soap->labbuf, soap->lablen - k + i);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, SOAP_BLKLEN);
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register char d1, d2;
+      register soap_wchar c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+	if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap_end_block(soap);
+	  soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = soap_size_block(soap, i);
+        p = (unsigned char*)soap_save_block(soap, NULL, 0);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putbase64(struct soap *soap, const unsigned char *s, int n)
+{ register int i;
+  register unsigned long m;
+  char d[4];
+  if (!s)
+    return SOAP_OK;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!(soap->dom->data = soap_s2base64(soap, s, NULL, n)))
+      return soap->error;
+    return SOAP_OK;
+  }
+#endif
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      d[i] = '=';
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_getbase64(struct soap *soap, int *n, int malloc_flag)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_string_in(soap, 0, -1, -1);
+    return (unsigned char*)soap_base642s(soap, soap->dom->data, NULL, 0, n);
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register int i, k;
+    register char *s;
+    if (soap_append_lab(soap, NULL, 2))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = 3 * (soap->lablen / 3);
+    if (!s)
+      return NULL;
+    for (i = 0; i < k - 2; i += 3)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+            *n = (int)(soap->lablen - k + i);
+          p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+	  if (p)
+	    memcpy(p, soap->labbuf, soap->lablen - k + i);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, 3 * SOAP_BLKLEN); /* must be multiple of 3 */
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register soap_wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          i *= 3;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n = (int)soap_size_block(soap, i);
+          p = (unsigned char*)soap_save_block(soap, NULL, 0);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
+              ;
+	  }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_xop_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ /* Check MTOM xop:Include element (within hex/base64Binary) */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  int body = soap->body; /* should save type too? */
+  if (!soap_peek_element(soap))
+  { if (!soap_element_begin_in(soap, "xop:Include", 0) && *soap->href)
+    { if (soap_dime_forward(soap, ptr, size, id, type, options))
+        return soap->error;
+    }
+    if (soap->body && soap_element_end_in(soap, NULL))
+      return soap->error;
+  }
+  soap->body = body;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_dime_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
+{ struct soap_xlist *xp = (struct soap_xlist*)SOAP_MALLOC(soap, sizeof(struct soap_xlist));
+  *ptr = NULL;
+  *size = 0;
+  *id = soap_strdup(soap, soap->href);
+  *type = NULL;
+  *options = NULL;
+  if (!xp)
+    return soap->error = SOAP_EOM;
+  xp->next = soap->xlist;
+  xp->ptr = ptr;
+  xp->size = size;
+  xp->id = *id;
+  xp->type = type;
+  xp->options = options;
+  soap->xlist = xp;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_strdup(struct soap *soap, const char *s)
+{ char *t = NULL;
+  if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1)))
+    strcpy(t, s);
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_new_block(struct soap *soap)
+{ struct soap_blist *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New block sequence (prev=%p)\n", soap->blist));
+  if (!(p = (struct soap_blist*)SOAP_MALLOC(soap, sizeof(struct soap_blist))))
+    return SOAP_EOM;   
+  p->next = soap->blist; 
+  p->ptr = NULL;
+  p->size = 0;
+  soap->blist = p;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_push_block(struct soap *soap, size_t n)
+{ char *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block of %u bytes (%u bytes total)\n", (unsigned int)n, (unsigned int)soap->blist->size + (unsigned int)n));
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(char*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  *(char**)p = soap->blist->ptr;
+  *(size_t*)(p + sizeof(char*)) = n;
+  soap->blist->ptr = p;
+  soap->blist->size += n;
+  return p + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_block(struct soap *soap)
+{ char *p;
+  if (!soap->blist->ptr)
+    return;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block\n"));
+  p = soap->blist->ptr;
+  soap->blist->size -= *(size_t*)(p + sizeof(char*));
+  soap->blist->ptr = *(char**)p;
+  SOAP_FREE(soap, p);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_update_ptrs(struct soap *soap, char *start, char *end, char *p1, char *p2)
+{ int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+#ifndef WITH_LEANER
+  register struct soap_xlist *xp;
+#endif
+  register void *p, **q;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr && (char*)ip->ptr >= start && (char*)ip->ptr < end)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", ip->id, ip->ptr, (char*)ip->ptr + (p1-p2)));
+        ip->ptr = (char*)ip->ptr + (p1-p2);
+      }
+      for (q = &ip->link; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Link update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (q = &ip->copy; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy chain update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + (p1-p2);
+        }
+      }
+      for (fp = ip->flist; fp; fp = fp->next)
+      { if ((char*)fp->ptr >= start && (char*)fp->ptr < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy list update id='%s' %p\n", ip->id, fp));
+          fp->ptr = (char*)fp->ptr + (p1-p2);
+        }
+      }
+    }
+  }
+#ifndef WITH_LEANER
+  for (xp = soap->xlist; xp; xp = xp->next)
+  { if (xp->ptr && (char*)xp->ptr >= start && (char*)xp->ptr < end)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", xp->id?xp->id:"", xp->ptr, (char*)xp->ptr + (p1-p2)));
+      xp->ptr = (unsigned char**)((char*)xp->ptr + (p1-p2));
+      xp->size = (int*)((char*)xp->size + (p1-p2));
+      xp->type = (char**)((char*)xp->type + (p1-p2));
+      xp->options = (char**)((char*)xp->options + (p1-p2));
+    }
+  }
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static int
+soap_has_copies(struct soap *soap, register const char *start, register const char *end)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  register const char *p;
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { for (p = (const char*)ip->copy; p; p = *(const char**)p)
+        if (p >= start && p < end)
+          return SOAP_ERR;
+      for (fp = ip->flist; fp; fp = fp->next)
+        if ((const char*)fp->ptr >= start && (const char*)fp->ptr < end)
+	  return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_resolve(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip;
+  register struct soap_flist *fp;
+  short flag;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr)
+      { register void *p, **q, *r;
+        q = (void**)ip->link;
+        ip->link = NULL;
+        r = ip->ptr;
+        DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing link chain to resolve id='%s'\n", ip->id));
+        while (q)
+        { p = *q;
+          *q = r;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "... link %p -> %p\n", q, r));
+          q = (void**)p;
+        }
+      }
+      else if (*ip->id == '#')
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Missing data for id='%s'\n", ip->id));
+        strcpy(soap->id, ip->id + 1);
+        return soap->error = SOAP_MISSING_ID;
+      }
+    }
+  }
+  do
+  { flag = 0;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution phase\n"));
+    for (i = 0; i < SOAP_IDHASH; i++)
+    { for (ip = soap->iht[i]; ip; ip = ip->next)
+      { if (ip->ptr && !soap_has_copies(soap, (const char*)ip->ptr, (const char*)ip->ptr + ip->size))
+        { if (ip->copy)
+          { register void *p, **q = (void**)ip->copy;
+            DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing copy chain to resolve id='%s'\n", ip->id));
+            ip->copy = NULL;
+            do
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... copy %p -> %p (%u bytes)\n", ip->ptr, q, (unsigned int)ip->size));
+	      p = *q;
+              memcpy(q, ip->ptr, ip->size);
+              q = (void**)p;
+            } while (q);
+	    flag = 1;
+	  }
+          for (fp = ip->flist; fp; fp = ip->flist)
+          { register unsigned int k = fp->level;
+	    register void *p = ip->ptr;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data type=%d location=%p level=%u,%u id='%s'\n", ip->type, p, ip->level, fp->level, ip->id));
+	    while (ip->level < k)
+            { register void **q = (void**)soap_malloc(soap, sizeof(void*));  
+	      if (!q)
+	        return soap->error;
+	      *q = p;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level, new location=%p holds=%p...\n", q, *q));
+              p = (void*)q;
+              k--;
+            }
+	    if (fp->fcopy)
+	      fp->fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    else
+	      soap_fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size);
+	    ip->flist = fp->next;
+	    SOAP_FREE(soap, fp);
+	    flag = 1;
+	  }
+        }
+      }
+    }
+  } while (flag);
+#ifdef SOAP_DEBUG
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->copy || ip->flist)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution error: forwarded data for id='%s' could not be propagated, please report this problem to the developers\n", ip->id));
+      }
+    }
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution done\n"));
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_size_block(struct soap *soap, size_t n)
+{ if (soap->blist->ptr)
+  { soap->blist->size -= *(size_t*)(soap->blist->ptr + sizeof(char*)) - n;
+    *(size_t*)(soap->blist->ptr + sizeof(char*)) = n;
+  }
+  return soap->blist->size;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_first_block(struct soap *soap)
+{ char *p, *q, *r;
+  p = soap->blist->ptr;
+  if (!p)
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "First block\n"));
+  r = NULL;
+  do
+  { q = *(char**)p;
+    *(char**)p = r;
+    r = p;
+    p = q;
+  } while (p);
+  soap->blist->ptr = r;
+  return r + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_next_block(struct soap *soap)
+{ char *p;
+  p = soap->blist->ptr;
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n"));
+    soap->blist->ptr = *(char**)p;
+    SOAP_FREE(soap, p);
+    if (soap->blist->ptr)
+      return soap->blist->ptr + sizeof(char*) + sizeof(size_t);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_block_size(struct soap *soap)
+{ return *(size_t*)(soap->blist->ptr + sizeof(char*));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end_block(struct soap *soap)
+{ struct soap_blist *bp;
+  char *p, *q;
+  bp = soap->blist;
+  if (bp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of block sequence, free all remaining blocks\n"));
+    for (p = bp->ptr; p; p = q)
+    { q = *(char**)p;
+      SOAP_FREE(soap, p);
+    }
+    soap->blist = bp->next;
+    SOAP_FREE(soap, bp);
+  }
+  DBGLOG(TEST, if (soap->blist) SOAP_MESSAGE(fdebug, "Restore previous block sequence\n"));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_save_block(struct soap *soap, char *p, int flag)
+{ register size_t n;
+  register char *q, *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Save all blocks in contiguous memory space of %u bytes (%p->%p)\n", (unsigned int)soap->blist->size, soap->blist->ptr, p));
+  if (soap->blist->size)
+  { if (!p)
+      p = (char*)soap_malloc(soap, soap->blist->size);
+    if (p)
+    { for (s = p, q = soap_first_block(soap); q; q = soap_next_block(soap))
+      { n = soap_block_size(soap);
+#ifndef WITH_NOIDREF
+        if (flag)
+	  soap_update_ptrs(soap, q, q + n, s, q);
+#endif
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy %u bytes from %p to %p\n", (unsigned int)n, q, s));
+        memcpy(s, q, n);
+        s += n;
+      }
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  soap_end_block(soap);
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsize(struct soap *soap, const char *type, int size)
+{ return soap_putsizes(soap, type, &size, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizes(struct soap *soap, const char *type, const int *size, int dim)
+{ return soap_putsizesoffsets(soap, type, size, NULL, dim);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim)
+{ int i;
+  if (!type)
+    return NULL;
+  if (soap->version == 2)
+  { sprintf(soap->type, "%s[%d", type, size[0]);
+    for (i = 1; i < dim; i++)
+      sprintf(soap->type + strlen(soap->type), " %d", size[i]);
+  }
+  else
+  { if (offset)
+    { sprintf(soap->type, "%s[%d", type, size[0] + offset[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i] + offset[i]);
+    }
+    else
+    { sprintf(soap->type, "%s[%d", type, size[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i]);
+    }
+    strcat(soap->type, "]");
+  }
+  return soap->type;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffset(struct soap *soap, int offset)
+{ return soap_putoffsets(soap, &offset, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffsets(struct soap *soap, const int *offset, int dim)
+{ register int i;
+  sprintf(soap->arrayOffset, "[%d", offset[0]);
+  for (i = 1; i < dim; i++)
+    sprintf(soap->arrayOffset + strlen(soap->arrayOffset), ",%d", offset[i]);
+  strcat(soap->arrayOffset, "]");
+  return soap->arrayOffset;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_size(const int *size, int dim)
+{ register int i, n = size[0];
+  for (i = 1; i < dim; i++)
+    n *= size[i];
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getoffsets(const char *attr, const int *size, int *offset, int dim)
+{ register int i, j = 0;
+  if (offset)
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += offset[i] = (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  else
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  return j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsize(const char *attr1, const char *attr2, int *j)
+{ register int n, k;
+  char *s;
+  *j = 0;
+  if (!*attr1)
+    return -1;
+  if (*attr1 == '[')
+    attr1++;
+  n = 1;
+  for (;;)
+  { k = (int)soap_strtol(attr1, &s, 10);
+    n *= k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE || s == attr1)
+      return -1;
+    attr1 = strchr(s, ',');
+    if (!attr1)
+      attr1 = strchr(s, ' ');
+    if (attr2 && *attr2)
+    { attr2++;
+      *j *= k;
+      k = (int)soap_strtol(attr2, &s, 10);
+      *j += k;
+      if (k < 0)
+        return -1;
+      attr2 = s;
+    }
+    if (!attr1)
+      break;
+    attr1++;
+  }
+  return n - *j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsizes(const char *attr, int *size, int dim)
+{ register int i, k, n;
+  if (!*attr)
+    return -1;
+  i = strlen(attr);
+  n = 1;
+  do
+  { for (i = i-1; i >= 0; i--)
+      if (attr[i] == '[' || attr[i] == ',' || attr[i] == ' ')
+        break;
+    k = (int)atol(attr + i + 1);
+    n *= size[--dim] = k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE)
+      return -1;
+  } while (i >= 0 && attr[i] != '[');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getposition(const char *attr, int *pos)
+{ register int i, n;
+  if (!*attr)
+    return -1;
+  n = 0;
+  i = 1;
+  do
+  { pos[n++] = (int)atol(attr + i);
+    while (attr[i] && attr[i] != ',' && attr[i] != ']')
+      i++;
+    if (attr[i] == ',')
+      i++;
+  } while (n < SOAP_MAXDIMS && attr[i] && attr[i] != ']');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_push_namespace(struct soap *soap, const char *id, const char *ns)
+{ register struct soap_nlist *np;
+  register struct Namespace *p;
+  register short i = -1;
+  register size_t n, k;
+  n = strlen(id);
+  k = strlen(ns) + 1;
+  p = soap->local_namespaces;
+  if (p)
+  { for (i = 0; p->id; p++, i++)
+    { if (p->ns && !strcmp(ns, p->ns))
+      { if (p->out)
+        { SOAP_FREE(soap, p->out);
+          p->out = NULL;
+        }
+        break;
+      }
+      if (p->out)
+      { if (!strcmp(ns, p->out))
+          break;
+      }
+      else if (p->in)
+      { if (!soap_tag_cmp(ns, p->in))
+        { if ((p->out = (char*)SOAP_MALLOC(soap, k)))
+            strcpy(p->out, ns);
+          break;
+        }
+      }
+    }
+    if (!p || !p->id)
+      i = -1;
+  }
+  if (i >= 0)
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k);
+  if (!np)
+    return soap->error = SOAP_EOM;
+  np->next = soap->nlist;
+  soap->nlist = np;
+  np->level = soap->level;
+  np->index = i;
+  strcpy(np->id, id);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns));
+  if (i < 0)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push NOT OK: no match found for '%s' in namespace mapping table (added to stack anyway)\n", ns));
+  }
+  else
+  { np->ns = NULL;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push OK ('%s' matches '%s' in namespace table)\n", id, p->id));
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_namespace(struct soap *soap)
+{ register struct soap_nlist *np;
+  while (soap->nlist && soap->nlist->level >= soap->level)
+  { np = soap->nlist->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Popped namespace binding (level=%u) '%s'\n", soap->level, soap->nlist->id));
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_namespace(struct soap *soap, const char *id1, const char *id2, int n1, int n2) 
+{ register struct soap_nlist *np = soap->nlist;
+  while (np && (strncmp(np->id, id1, n1) || np->id[n1]))
+    np = np->next;
+  if (np)
+  { if (np->index < 0
+     || (soap->local_namespaces[np->index].id
+      && (strncmp(soap->local_namespaces[np->index].id, id2, n2)
+       || soap->local_namespaces[np->index].id[n2])))
+      return SOAP_NAMESPACE;
+    return SOAP_OK;
+  }
+  if (n1 == 3 && n1 == n2 && !strcmp(id1, "xml") && !strcmp(id1, id2))
+    return SOAP_OK;
+  return SOAP_SYNTAX_ERROR; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_current_namespace(struct soap *soap, const char *tag)
+{ register struct soap_nlist *np;
+  register const char *s;
+  np = soap->nlist;
+  if (!(s = strchr(tag, ':')))
+  { while (np && *np->id) /* find default namespace, if present */
+      np = np->next;
+  }
+  else
+  { while (np && (strncmp(np->id, tag, s - tag) || np->id[s - tag]))
+      np = np->next;
+    if (!np)
+      soap->error = SOAP_NAMESPACE;
+  }
+  if (np)
+  { if (np->index >= 0)
+      return soap->namespaces[np->index].ns;
+    if (np->ns)
+      return soap_strdup(soap, np->ns);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_tag_cmp(const char *s, const char *t)
+{ for (;;)
+  { register int c1 = *s;
+    register int c2 = *t;
+    if (!c1 || c1 == '"')
+      break;
+    if (c2 != '-')
+    { if (c1 != c2)
+      { if (c1 >= 'A' && c1 <= 'Z')
+          c1 += 'a' - 'A';
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+      }
+      if (c1 != c2)
+      { if (c2 != '*')
+          return 1;
+	c2 = *++t;
+        if (!c2)
+	  return 0;
+        if (c2 >= 'A' && c2 <= 'Z')
+          c2 += 'a' - 'A';
+        for (;;)
+        { c1 = *s;
+	  if (!c1 || c1 == '"')
+	    break;
+	  if (c1 >= 'A' && c1 <= 'Z')
+            c1 += 'a' - 'A';
+          if (c1 == c2 && !soap_tag_cmp(s + 1, t + 1))
+            return 0;
+	  s++;
+        }
+        break;
+      }
+    }
+    s++;
+    t++;
+  }
+  if (*t == '*' && !t[1])
+    return 0;
+  return *t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_tag(struct soap *soap, const char *tag1, const char *tag2)
+{ register const char *s, *t;
+  if (!tag1 || !tag2 || !*tag2)
+    return SOAP_OK;
+  s = strchr(tag1, ':');
+  t = strchr(tag2, ':');
+  if (t)
+  { if (s)
+    { if (t[1] && SOAP_STRCMP(s + 1, t + 1))
+        return SOAP_TAG_MISMATCH;
+      if (t != tag2 && soap_match_namespace(soap, tag1, tag2, s - tag1, t - tag2))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+        return SOAP_TAG_MISMATCH;
+      }
+    } 
+    else if (SOAP_STRCMP(tag1, t + 1))
+      return SOAP_TAG_MISMATCH;
+    else if (t != tag2 && soap_match_namespace(soap, tag1, tag2, 0, t - tag2))
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+      return SOAP_TAG_MISMATCH;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags and (default) namespaces match: '%s' '%s'\n", tag1, tag2));
+    return SOAP_OK;
+  }
+  if (s)
+  { if (SOAP_STRCMP(s + 1, tag2))
+      return SOAP_TAG_MISMATCH;
+  }
+  else if (SOAP_STRCMP(tag1, tag2))
+    return SOAP_TAG_MISMATCH;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags match: '%s' '%s'\n", tag1, tag2));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_array(struct soap *soap, const char *type)
+{ if (*soap->arrayType)
+    if (soap_match_tag(soap, soap->arrayType, type)
+     && soap_match_tag(soap, soap->arrayType, "xsd:anyType")
+     && soap_match_tag(soap, soap->arrayType, "xsd:ur-type")
+    )
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array type mismatch: '%s' '%s'\n", soap->arrayType, type));
+      return SOAP_TAG_MISMATCH;
+    }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************\
+ *
+ *	SSL
+ *
+\******************************************************************************/
+
+#ifdef WITH_OPENSSL
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_rand()
+{ unsigned char buf[4];
+  if (!ssl_init_done)
+    soap_ssl_init();
+  RAND_pseudo_bytes(buf, 4);
+  return *(int*)buf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *dhfile, const char *randfile, const char *sid)
+{ int err;
+  soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  if (dhfile)
+  { soap->dhfile = dhfile;
+    soap->rsa = 0;
+  }
+  else
+  { soap->dhfile = NULL;
+    soap->rsa = 1;
+  }
+  soap->randfile = randfile;
+  soap->require_client_auth = (flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION);
+  if (!(err = soap->fsslauth(soap)))
+  { if (sid)
+      SSL_CTX_set_session_id_context(soap->ctx, (unsigned char*)sid, strlen(sid));
+  }
+  return err; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_client_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *randfile)
+{ soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  soap->dhfile = NULL;
+  soap->rsa = 0;
+  soap->randfile = randfile;
+  soap->require_server_auth = (flags & SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION);
+  return soap->fsslauth(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_ssl_init()
+{ /* Note: for MT systems, the main program MUST call soap_ssl_init() before any threads are started */
+  if (!ssl_init_done)
+  { ssl_init_done = 1;
+    SSL_library_init();
+#ifndef WITH_LEAN
+    SSL_load_error_strings();
+#endif
+    if (!RAND_load_file("/dev/urandom", 1024))
+    { char buf[1024];
+      RAND_seed(buf, sizeof(buf));
+      while (!RAND_status())
+      { int r = rand();
+        RAND_seed(&r, sizeof(int));
+      }
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static const char *
+ssl_error(struct soap *soap, int ret)
+{ int err = SSL_get_error(soap->ssl, ret);
+  const char *msg = soap_str_code(h_ssl_error_codes, err);
+  if (msg)
+    strcpy(soap->msgbuf, msg);
+  else
+    return ERR_error_string(err, soap->msgbuf);
+  if (ERR_peek_error())
+  { unsigned long r;
+    strcat(soap->msgbuf, "\n");
+    while ((r = ERR_get_error()))
+      ERR_error_string_n(r, soap->msgbuf + strlen(soap->msgbuf), sizeof(soap->msgbuf) - strlen(soap->msgbuf));
+  } 
+  else
+  { switch (ret)
+    { case 0:
+        strcpy(soap->msgbuf, "EOF was observed that violates the protocol. The client probably provided invalid authentication information.");
+        break;
+      case -1:
+        sprintf(soap->msgbuf, "Error observed by underlying BIO: %s", strerror(errno));  
+        break;
+    }
+  }
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_password(char *buf, int num, int rwflag, void *userdata)
+{ if (num < (int)strlen((char*)userdata) + 1)
+    return 0;
+  return strlen(strcpy(buf, (char*)userdata));
+}
+#endif
+
+/******************************************************************************/
+/* This callback is included for future references. It should not be deleted
+#ifndef PALM_2
+static DH *
+ssl_tmp_dh(SSL *ssl, int is_export, int keylength)
+{ static DH *dh512 = NULL;
+  static DH *dh1024 = NULL;
+  DH *dh;
+  switch (keylength)
+  { case 512:
+      if (!dh512)
+      { BIO *bio = BIO_new_file("dh512.pem", "r");
+        if (bio)
+        { dh512 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+          return dh512;
+        }
+      }
+      else
+        return dh512;
+    default:
+      if (!dh1024)
+      { BIO *bio = BIO_new_file("dh1024.pem", "r");
+        if (bio)
+        { dh1024 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+        }
+      }
+      dh = dh1024;
+  }
+  return dh;
+}
+#endif
+*/
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_auth_init(struct soap *soap)
+{ if (!ssl_init_done)
+    soap_ssl_init();
+  if (!soap->ctx)
+  { if (!(soap->ctx = SSL_CTX_new(SSLv23_method())))
+      return soap_set_receiver_error(soap, "SSL error", "Can't setup context", SOAP_SSL_ERROR);
+  }
+  if (soap->randfile)
+  { if (!RAND_load_file(soap->randfile, -1))
+      return soap_set_receiver_error(soap, "SSL error", "Can't load randomness", SOAP_SSL_ERROR);
+  }
+  if (soap->cafile || soap->capath)
+  { if (!SSL_CTX_load_verify_locations(soap->ctx, soap->cafile, soap->capath))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read CA file and directory", SOAP_SSL_ERROR);
+    if (soap->cafile && soap->require_client_auth)
+      SSL_CTX_set_client_CA_list(soap->ctx, SSL_load_client_CA_file(soap->cafile));
+  }
+  if (!SSL_CTX_set_default_verify_paths(soap->ctx))
+    return soap_set_receiver_error(soap, "SSL error", "Can't read default CA file and/or directory", SOAP_SSL_ERROR);
+/* See below */
+  if (soap->keyfile)
+  { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read certificate key file", SOAP_SSL_ERROR);
+    if (soap->password)
+    { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+      SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+    }
+    if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+  }
+/* Suggested alternative approach to check cafile first before the key file:
+  if (soap->password)
+  { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+    SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+  }
+  if (!soap->cafile || !SSL_CTX_use_certificate_chain_file(soap->ctx, soap->cafile))
+  { if (soap->keyfile)
+    { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read certificate or key file", SOAP_SSL_ERROR);
+      if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+    }
+  }
+*/
+  if (soap->rsa)
+  { RSA *rsa = RSA_generate_key(1024, RSA_F4, NULL, NULL);
+    if (!SSL_CTX_set_tmp_rsa(soap->ctx, rsa))
+    { if (rsa)
+        RSA_free(rsa);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set RSA key", SOAP_SSL_ERROR);
+    }
+    RSA_free(rsa);
+  }
+  else if (soap->dhfile)
+  { DH *dh = 0;
+    BIO *bio;
+    bio = BIO_new_file(soap->dhfile, "r");
+    if (!bio)
+      return soap_set_receiver_error(soap, "SSL error", "Can't read DH file", SOAP_SSL_ERROR);
+    dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+    BIO_free(bio);
+    if (SSL_CTX_set_tmp_dh(soap->ctx, dh) < 0)
+    { if (dh)
+        DH_free(dh);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set DH parameters", SOAP_SSL_ERROR);
+    }
+    DH_free(dh);
+  }
+  SSL_CTX_set_options(soap->ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2);
+  SSL_CTX_set_verify(soap->ctx, soap->require_client_auth ? (SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT) : soap->require_server_auth ? SSL_VERIFY_PEER : SSL_VERIFY_NONE, soap->fsslverify);
+#if (OPENSSL_VERSION_NUMBER < 0x00905100L)
+  SSL_CTX_set_verify_depth(soap->ctx, 1); 
+#else
+  SSL_CTX_set_verify_depth(soap->ctx, 9); 
+#endif  
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_verify_callback(int ok, X509_STORE_CTX *store)
+{
+#ifdef SOAP_DEBUG
+  if (!ok) 
+  { char data[256];
+    X509 *cert = X509_STORE_CTX_get_current_cert(store);
+    fprintf(stderr, "SSL verify error or warning with certificate at depth %d: %s\n", X509_STORE_CTX_get_error_depth(store), X509_verify_cert_error_string(X509_STORE_CTX_get_error(store)));
+    X509_NAME_oneline(X509_get_issuer_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate issuer %s\n", data);
+    X509_NAME_oneline(X509_get_subject_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate subject %s\n", data);
+  }
+#endif
+  /* Note: return 1 to continue, but unsafe progress will be terminated by SSL */
+  return ok;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_accept(struct soap *soap)
+{ BIO *bio;
+  int i, r;
+  if (!soap_valid_socket(soap->socket))
+    return soap_set_receiver_error(soap, "SSL error", "No socket in soap_ssl_accept()", SOAP_SSL_ERROR);
+  if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    return SOAP_INVALID_SOCKET;
+  if (!soap->ssl)
+  { soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+      return soap_set_receiver_error(soap, "SSL error", "SSL_new() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+  }
+  else
+    SSL_clear(soap->ssl);
+  soap->imode |= SOAP_ENC_SSL;
+  soap->omode |= SOAP_ENC_SSL;
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&nonblocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)|O_NONBLOCK);
+#endif
+  bio = BIO_new_socket((SOAP_SOCKET)soap->socket, BIO_NOCLOSE);
+  SSL_set_bio(soap->ssl, bio, bio);
+  i = 100; /* 100 * 0.1 ms retries */
+  while ((r = SSL_accept(soap->ssl)) <= 0)
+  { int err = SSL_get_error(soap->ssl, r);
+    if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE)
+    { struct timeval timeout;
+      fd_set fd;
+      if (i-- <= 0)
+        break;
+      timeout.tv_sec = 0;
+      timeout.tv_usec = 100000;
+      FD_ZERO(&fd);
+      FD_SET((SOAP_SOCKET)soap->socket, &fd);
+      r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+      if (r < 0 && soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        return SOAP_EOF;
+      }
+    }
+    else
+    { soap->errnum = err;
+      break;
+    }
+  }
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&blocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+  if (r <= 0)
+  { soap_set_receiver_error(soap, ssl_error(soap, r), "SSL_accept() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+    soap_closesock(soap);
+    return SOAP_SSL_ERROR;
+  }
+  if (soap->require_client_auth)
+  { X509 *peer;
+    int err;
+    if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    peer = SSL_get_peer_certificate(soap->ssl);
+    if (!peer)
+    { soap_closesock(soap);
+      return soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in soap_ssl_accept()", SOAP_SSL_ERROR);
+    }
+    X509_free(peer);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#endif /* WITH_OPENSSL */
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_init(struct soap *soap)
+{ soap->errmode = 1;
+#ifdef WIN32
+  if (tcp_done)
+    return 0;
+  else
+  { WSADATA w;
+    if (WSAStartup(MAKEWORD(1, 1), &w))
+      return -1;
+    tcp_done = 1;
+  }
+#endif
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_done(struct soap *soap)
+{ 
+#ifdef SOAP_DEBUG
+  int i;
+#endif
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  while (soap->clist)
+  { struct soap_clist *p = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = p;
+  }
+  soap->keep_alive = 0; /* to force close the socket */
+  soap_closesock(soap);
+#ifdef WITH_COOKIES
+  soap_free_cookies(soap);
+#endif
+  while (soap->plugins)
+  { register struct soap_plugin *p = soap->plugins->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Removing plugin '%s'\n", soap->plugins->id));
+    if (soap->plugins->fcopy || soap->state == SOAP_INIT)
+      soap->plugins->fdelete(soap, soap->plugins);
+    SOAP_FREE(soap, soap->plugins);
+    soap->plugins = p;
+  }
+  soap->fplugin = fplugin;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+#ifdef WITH_OPENSSL
+  if (soap->session)
+  { SSL_SESSION_free(soap->session);
+    soap->session = NULL;
+  }
+#endif
+  if (soap->state == SOAP_INIT)
+  { if (soap_valid_socket(soap->master))
+    { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+      soap->master = SOAP_INVALID_SOCKET;
+    }
+#ifdef WITH_OPENSSL
+    if (soap->ctx)
+    { SSL_CTX_free(soap->ctx);
+      soap->ctx = NULL;
+    }
+#endif
+  }
+#ifdef SOAP_DEBUG
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free logfiles\n"));
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { if (soap->logfile[i])
+    { SOAP_FREE(soap, (void*)soap->logfile[i]);
+      soap->logfile[i] = NULL;
+    }
+    soap_close_logfile(soap, i);
+  }
+  soap_free_mht(soap);
+  soap->state = 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_cleanup(struct soap *soap)
+{ soap_done(soap);
+#ifdef WIN32
+  if (!tcp_done)
+    return;
+  tcp_done = 0;
+  WSACleanup();
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+tcp_error(struct soap *soap)
+{ register const char *msg = NULL;
+  switch (soap->errmode)
+  { case 0:
+      msg = soap_strerror(soap);
+      break;
+    case 1:
+      msg = "WSAStartup failed";
+      break;
+    case 2:
+    {
+#ifndef WITH_LEAN
+      msg = soap_str_code(h_error_codes, soap->errnum);
+      if (!msg)
+#endif
+      { sprintf(soap->msgbuf, "TCP/UDP IP error %d", soap->errnum);
+        msg = soap->msgbuf;
+      }
+    }
+  }
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static const char*
+http_error(struct soap *soap, int status)
+{ register const char *msg = SOAP_STR_EOS;
+#ifndef WITH_LEAN
+  msg = soap_str_code(h_http_error_codes, status);
+  if (!msg)
+    msg = SOAP_STR_EOS;
+#endif
+  return msg;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_IPV6
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr)
+{ soap_int32 iadd = -1;
+  struct hostent hostent, *host = &hostent;
+#ifdef VXWORKS
+  int hostint;
+  /* inet_addr(), and hostGetByName() expect "char *"; addr is a "const char *". */
+  iadd = inet_addr((char*)addr);
+#else
+#if defined(_AIXVERSION_431) || defined(TRU64)
+  struct hostent_data ht_data;
+#endif
+#ifdef AS400
+  iadd = inet_addr((void*)addr);
+#else
+  iadd = inet_addr(addr);
+#endif
+#endif
+  if (iadd != -1)
+  { memcpy(inaddr, &iadd, sizeof(iadd));
+    return SOAP_OK;
+  }
+#if defined(__GLIBC__)
+  if (gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &host, &soap->errnum) < 0)
+    host = NULL;
+#elif defined(_AIXVERSION_431) || defined(TRU64)
+  memset((void*)&ht_data, 0, sizeof(ht_data));
+  if (gethostbyname_r(addr, &hostent, &ht_data) < 0)
+  { host = NULL;
+    soap->errnum = h_errno;
+  }
+#elif defined(HAVE_GETHOSTBYNAME_R)
+  host = gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &soap->errnum);
+#elif defined(VXWORKS)
+  /* If the DNS resolver library resolvLib has been configured in the vxWorks
+   * image, a query for the host IP address is sent to the DNS server, if the
+   * name was not found in the local host table. */
+  hostint = hostGetByName((char*)addr);
+  if (hostint == ERROR)
+  { host = NULL;
+    soap->errnum = soap_errno; 
+  }
+#else
+#ifdef AS400
+  if (!(host = gethostbyname((void*)addr)))
+    soap->errnum = h_errno;
+#else
+  if (!(host = gethostbyname(addr)))
+    soap->errnum = h_errno;
+#endif
+#endif
+  if (!host)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Host name not found\n"));
+    return SOAP_ERR;
+  }
+#ifdef VXWORKS
+  inaddr->s_addr = hostint;
+#else
+  memcpy(inaddr, host->h_addr, host->h_length);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_connect(struct soap *soap, const char *endpoint, const char *host, int port)
+{
+#ifdef WITH_IPV6
+  struct addrinfo hints, *res, *ressave;
+  int err;
+#endif
+  register int fd;
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->socket))
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+  soap->socket = SOAP_INVALID_SOCKET;
+  if (tcp_init(soap))
+  { soap->errnum = 0;
+    soap_set_sender_error(soap, tcp_error(soap), "TCP init failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->errmode = 0;
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+    err = getaddrinfo(soap->proxy_host, soap_int2s(soap, soap->proxy_port), &hints, &res);
+  else
+    err = getaddrinfo(host, soap_int2s(soap, port), &hints, &res);
+  if (err)
+  { soap_set_sender_error(soap, gai_strerror(err), "getaddrinfo failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  ressave = res;
+again:
+  fd = (int)socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+  soap->errmode = 0;
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    fd = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    fd = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  if (fd < 0)
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "socket failed in tcp_connect()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_flags & SO_LINGER)
+  { struct linger linger;
+    memset((void*)&linger, 0, sizeof(linger));
+    linger.l_onoff = 1;
+    linger.l_linger = 0;
+    if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+    { soap->errnum = soap_socket_errno;
+      soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  if ((soap->connect_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, soap->connect_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (soap->keep_alive && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)fd, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in tcp_connect()", SOAP_TCP_ERROR);
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Opening socket %d to host='%s' port=%d\n", fd, host, port));
+#ifndef WITH_IPV6
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+  { if (soap->fresolve(soap, soap->proxy_host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get proxy host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)soap->proxy_port);
+  }
+  else
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "get host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->peer.sin_port = htons((short)port);
+  }
+  soap->errmode = 0;
+  if ((soap->omode & SOAP_IO_UDP))
+    return fd;
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+  }
+#elif defined(VXWORKS)
+  { u_long nonblocking = 1;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking)); /* modified to use fd */
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+  else
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  for (;;)
+  { 
+#ifdef WITH_IPV6
+    if (connect((SOAP_SOCKET)fd, res->ai_addr, res->ai_addrlen))
+#else
+    if (connect((SOAP_SOCKET)fd, (struct sockaddr*)&soap->peer, sizeof(soap->peer)))
+#endif
+    { 
+#ifndef WITH_LEAN
+      if (soap->connect_timeout && (soap_socket_errno == SOAP_EINPROGRESS || soap_socket_errno == SOAP_EWOULDBLOCK))
+      { struct timeval timeout;
+        SOAP_SOCKLEN_T k;
+        fd_set fds;
+        if (soap->connect_timeout > 0)
+        { timeout.tv_sec = soap->connect_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->connect_timeout/1000000;
+          timeout.tv_usec = -soap->connect_timeout%1000000;
+        }
+        FD_ZERO(&fds);
+        FD_SET((SOAP_SOCKET)fd, &fds);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(fd + 1), NULL, &fds, NULL, &timeout);
+          if (r > 0)
+	    break;
+          if (!r)
+          { soap->errnum = 0;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+            soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+            soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+	k = (SOAP_SOCKLEN_T)sizeof(soap->errnum);
+        if (!getsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_ERROR, (char*)&soap->errnum, &k) && !soap->errnum)	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+          break;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap->errnum = soap_socket_errno;
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      else
+#endif
+#ifdef WITH_IPV6
+      if (res->ai_next)
+      { res = res->ai_next;
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        goto again;
+      }
+      else
+#endif
+      if (soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }  
+    else
+      break;
+  }
+#ifdef WITH_IPV6
+  soap->peerlen = 0; /* IPv6: already connected so use send() */
+  freeaddrinfo(ressave);
+#endif
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+#elif defined(VXWORKS)
+  { u_long blocking = 0;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+  }
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  soap->socket = fd;
+  soap->imode &= ~SOAP_ENC_SSL;
+  soap->omode &= ~SOAP_ENC_SSL;
+  if (!strncmp(endpoint, "https:", 6))
+  {
+#ifdef WITH_OPENSSL
+    BIO *bio;
+    int r;
+    if (soap->proxy_host)
+    { short v;
+      unsigned int k = soap->omode; /* make sure we only parse HTTP */
+      size_t n = soap->count; /* save the content length */
+      char *userid, *passwd;
+      soap->omode &= ~SOAP_ENC; /* mask IO and ENC */
+      soap->omode |= SOAP_IO_BUFFER;
+      soap_begin_send(soap);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connecting to proxy server\n"));
+      sprintf(soap->tmpbuf, "CONNECT %s:%d HTTP/%s", host, port, soap->http_version);
+      if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+#ifndef WITH_LEAN
+      if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+      { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+        strcpy(soap->tmpbuf, "Basic ");
+        soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+        if ((soap->error = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+        { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return soap->error;
+        }
+      }
+#endif
+      if ((soap->error = soap->fposthdr(soap, NULL, NULL))
+       || soap_flush(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->omode = k;
+      k = soap->imode;
+      soap->imode &= ~SOAP_ENC; /* mask IO and ENC */
+      v = soap->version; /* preserve */
+      userid = soap->userid; /* preserve */
+      passwd = soap->passwd; /* preserve */
+      if (soap_begin_recv(soap))
+      { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      soap->userid = userid; /* restore */
+      soap->passwd = passwd; /* restore */
+      soap->version = v; /* restore */
+      soap->imode = k; /* restore */
+      soap->count = n; /* restore */
+      soap_begin_send(soap);
+    }
+    if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    { soap_set_sender_error(soap, "SSL error", "SSL authentication failed in tcp_connect(): check password, key file, and ca file.", SOAP_SSL_ERROR);
+      soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      return SOAP_INVALID_SOCKET;
+    }
+    soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+    { soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+      soap->error = SOAP_SSL_ERROR;
+      return SOAP_INVALID_SOCKET;
+    }
+    if (soap->session)
+    { if (!strcmp(soap->session_host, host) && soap->session_port == port)
+        SSL_set_session(soap->ssl, soap->session);
+      SSL_SESSION_free(soap->session);
+      soap->session = NULL;
+    }
+    soap->imode |= SOAP_ENC_SSL;
+    soap->omode |= SOAP_ENC_SSL;
+    bio = BIO_new_socket((SOAP_SOCKET)fd, BIO_NOCLOSE);
+    SSL_set_bio(soap->ssl, bio, bio);
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#if defined(WIN32)
+    { u_long nonblocking = 1;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+    }
+#elif defined(VXWORKS)
+    { u_long nonblocking = 1;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+#endif
+    for (;;)
+    { if ((r = SSL_connect(soap->ssl)) <= 0)
+      { int err = SSL_get_error(soap->ssl, r);
+        if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+        { soap_set_sender_error(soap, ssl_error(soap, r), "SSL connect failed in tcp_connect()", SOAP_SSL_ERROR);
+          soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (soap->connect_timeout)
+        { struct timeval timeout;
+          fd_set fds;
+          if (soap->connect_timeout > 0)
+          { timeout.tv_sec = soap->connect_timeout;
+            timeout.tv_usec = 0;
+          }
+          else
+          { timeout.tv_sec = -soap->connect_timeout/1000000;
+            timeout.tv_usec = -soap->connect_timeout%1000000;
+          }
+          FD_ZERO(&fds);
+          FD_SET((SOAP_SOCKET)fd, &fds);
+          for (;;)
+          { int r = select((SOAP_SOCKET)(fd + 1), &fds, NULL, &fds, &timeout);
+            if (r > 0)
+	      break;
+            if (!r)
+            { soap->errnum = 0;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+              soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR);
+              soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+              return SOAP_INVALID_SOCKET;
+            }
+          }
+	  continue;
+        }
+      }
+      break;
+    }
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#ifdef WIN32
+    { u_long blocking = 0;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+    }
+#elif defined(VXWORKS)
+    { u_long blocking = 0;
+      ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking));
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+    if (soap->require_server_auth)
+    { X509 *peer;
+      int err;
+      if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+      { soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      peer = SSL_get_peer_certificate(soap->ssl);
+      if (!peer)
+      { soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+      X509_NAME_get_text_by_NID(X509_get_subject_name(peer), NID_commonName, soap->msgbuf, sizeof(soap->msgbuf));
+      X509_free(peer);
+      if (soap_tag_cmp(soap->msgbuf, host))
+      { soap_set_sender_error(soap, "SSL error", "SSL certificate host name mismatch in tcp_connect()", SOAP_SSL_ERROR);
+        soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+#else
+    soap->fclosesocket(soap, (SOAP_SOCKET)fd);
+    soap->error = SOAP_SSL_ERROR;
+    return SOAP_INVALID_SOCKET;
+#endif
+  }
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_bind(struct soap *soap, const char *host, int port, int backlog)
+{
+#ifdef WITH_IPV6
+  struct addrinfo *addrinfo = NULL;
+  struct addrinfo hints;
+  struct addrinfo res;
+  int err;
+#endif
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->master))
+  { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
+    soap->master = SOAP_INVALID_SOCKET;
+  }
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 1;
+  if (tcp_init(soap))
+  { soap_set_receiver_error(soap, tcp_error(soap), "TCP init failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_IPV6
+  memset((void*)&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+#endif
+    hints.ai_socktype = SOCK_STREAM;
+  hints.ai_flags = AI_PASSIVE;
+  soap->errmode = 2;
+  err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo);
+  if (addrinfo)
+  { res = *addrinfo;
+    soap->peer = *((struct sockaddr_storage*)addrinfo->ai_addr);
+    soap->peerlen = addrinfo->ai_addrlen;
+    res.ai_addr = (struct sockaddr*)&soap->peer;
+    res.ai_addrlen = soap->peerlen;
+    freeaddrinfo(addrinfo);
+  }
+  if (err)
+  { soap_set_receiver_error(soap, gai_strerror(err), "getaddrinfo failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  soap->master = socket(res.ai_family, res.ai_socktype, res.ai_protocol);
+#else
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->master = (int)socket(AF_INET, SOCK_DGRAM, 0);
+  else
+#endif
+    soap->master = (int)socket(AF_INET, SOCK_STREAM, 0);
+#endif
+  soap->errmode = 0;
+  if (!soap_valid_socket(soap->master))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "socket failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    soap->socket = soap->master;
+#endif
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)soap->master, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(soap->master, F_SETFD, 1);
+#endif
+#endif
+#ifndef WITH_LEAN
+  if (soap->bind_flags && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, soap->bind_flags, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#ifdef TCP_NODELAY
+  if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->master, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+#endif
+#ifdef WITH_IPV6
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, res.ai_addr, res.ai_addrlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+#else
+  soap->peerlen = sizeof(soap->peer);
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->peer.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (host)
+  { if (soap->fresolve(soap, host, &soap->peer.sin_addr))
+    { soap_set_receiver_error(soap, tcp_error(soap), "get host by name failed in soap_bind()", SOAP_TCP_ERROR);
+      return SOAP_INVALID_SOCKET;
+    }
+  }
+  else
+    soap->peer.sin_addr.s_addr = htonl(INADDR_ANY);
+  soap->peer.sin_port = htons((short)port);
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, (struct sockaddr*)&soap->peer, soap->peerlen))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+#endif
+  if (!(soap->omode & SOAP_IO_UDP) && listen((SOAP_SOCKET)soap->master, backlog))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "listen failed in soap_bind()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }  
+  return soap->master;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_poll(struct soap *soap)
+{ 
+#ifndef WITH_LEAN
+  struct timeval timeout;
+  fd_set rfd, sfd, xfd;
+  int r;
+  timeout.tv_sec = 0;
+  timeout.tv_usec = 0;
+  FD_ZERO(&rfd);
+  FD_ZERO(&sfd);
+  FD_ZERO(&xfd);
+  if (soap_valid_socket(soap->socket))
+  { FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &xfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, &xfd, &timeout);
+    if (r > 0 && FD_ISSET((SOAP_SOCKET)soap->socket, &xfd))
+      r = -1;
+  }
+  else if (soap_valid_socket(soap->master))
+  { FD_SET((SOAP_SOCKET)soap->master, &sfd);
+    r = select((SOAP_SOCKET)(soap->master + 1), NULL, &sfd, NULL, &timeout);
+  }
+  else
+    return SOAP_OK;
+  if (r > 0)
+  {
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+    {
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || SSL_peek(soap->ssl, soap->tmpbuf, 1) > 0))
+        return SOAP_OK;
+    }
+    else
+#endif
+      if (soap_valid_socket(soap->socket)
+       && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        || recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) > 0))
+        return SOAP_OK;
+  }
+  else if (r < 0)
+  { soap->errnum = soap_socket_errno;
+    if ((soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) && soap_socket_errno != SOAP_EINTR)
+    { soap_set_receiver_error(soap, tcp_error(soap), "select failed in soap_poll()", SOAP_TCP_ERROR);
+      return soap->error = SOAP_TCP_ERROR;
+    }
+  }
+  else
+    soap->errnum = 0;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Polling: other end down on socket=%d select=%d\n", soap->socket, r));
+  return SOAP_EOF;
+#else
+  return SOAP_OK;
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_accept(struct soap *soap, int s, struct sockaddr *a, int *n)
+{ int fd;
+  fd = (int)accept((SOAP_SOCKET)s, a, (SOAP_SOCKLEN_T*)n);	/* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */
+#ifdef SOCKET_CLOSE_ON_EXEC
+#ifdef WIN32
+#ifndef UNDER_CE
+  SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0);
+#endif
+#else
+  fcntl(fd, F_SETFD, FD_CLOEXEC);
+#endif
+#endif
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_accept(struct soap *soap)
+{ int n = (int)sizeof(soap->peer);
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  soap->error = SOAP_OK;
+#ifdef WITH_UDP
+  if ((soap->omode & SOAP_IO_UDP))
+    return soap->socket = soap->master;
+#endif
+  memset((void*)&soap->peer, 0, sizeof(soap->peer));
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 0;
+  soap->keep_alive = 0;
+  if (soap_valid_socket(soap->master))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->accept_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->accept_timeout > 0)
+        { timeout.tv_sec = soap->accept_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->accept_timeout/1000000;
+          timeout.tv_usec = -soap->accept_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->master, &fd);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(soap->master + 1), &fd, &fd, NULL, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            soap_set_receiver_error(soap, "Timeout", "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            soap_closesock(soap);
+            soap_set_sender_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return SOAP_INVALID_SOCKET;
+          }
+        }
+#if defined(WIN32)
+	{ u_long nonblocking = 1;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &nonblocking);
+        }
+#elif defined(VXWORKS)
+        { u_long nonblocking = 1;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&nonblocking));
+        }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)|O_NONBLOCK);
+#endif
+      }
+      else
+#if defined(WIN32)
+      { u_long blocking = 0;
+        ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+      }
+#elif defined(VXWORKS)
+      { u_long blocking = 0;
+        ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+      }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+      soap->socket = soap->faccept(soap, soap->master, (struct sockaddr*)&soap->peer, &n);
+      soap->peerlen = (size_t)n;
+      if (soap_valid_socket(soap->socket))
+      {
+#ifdef WITH_IPV6
+/* Use soap->host to store the numeric form of the remote host */
+        getnameinfo((struct sockaddr*)&soap->peer, n, soap->host, sizeof(soap->host), NULL, 0, NI_NUMERICHOST | NI_NUMERICSERV); 
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d from %s\n", soap->socket, soap->host));
+        soap->ip = 0; /* info stored in soap->peer and soap->host */
+        soap->port = 0; /* info stored in soap->peer and soap->host */
+#else
+        soap->ip = ntohl(soap->peer.sin_addr.s_addr);
+        soap->port = (int)ntohs(soap->peer.sin_port); /* does not return port number on some systems */
+        DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d at port %d from IP %d.%d.%d.%d\n", soap->socket, soap->port, (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF));
+#endif
+#ifndef WITH_LEAN
+	if (soap->accept_flags & SO_LINGER)
+        { struct linger linger;
+          memset((void*)&linger, 0, sizeof(linger));
+          linger.l_onoff = 1;
+          linger.l_linger = 0;
+	  if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+          { soap->errnum = soap_socket_errno;
+	    soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in soap_accept()", SOAP_TCP_ERROR);
+	    soap_closesock(soap);
+            return SOAP_INVALID_SOCKET;
+	  }
+        }
+        if ((soap->accept_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, soap->accept_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#ifdef TCP_NODELAY
+        if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->socket, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_accept()", SOAP_TCP_ERROR);
+	  soap_closesock(soap);
+          return SOAP_INVALID_SOCKET;
+        }
+#endif
+#endif
+        if (soap->accept_timeout)
+        {
+#if defined(WIN32)
+          u_long blocking = 0;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+          ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+#elif defined(VXWORKS)
+          u_long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking));
+          ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)(&blocking));
+#elif defined(PALM)
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL,0)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL,0)&~O_NONBLOCK);
+#elif defined(SYMBIAN)
+          long blocking = 0;
+          ioctl((SOAP_SOCKET)soap->master, 0/*FIONBIO*/, &blocking);
+#else
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+	}
+        soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+        return soap->socket;
+      }
+      if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept failed from %s\n", soap->host));
+        soap->errnum = soap_socket_errno;
+        soap_set_receiver_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR);
+	soap_closesock(soap);
+        return SOAP_INVALID_SOCKET;
+      }
+    }
+  }
+  else
+  { soap->errnum = 0;
+    soap_set_receiver_error(soap, tcp_error(soap), "no master socket in soap_accept()", SOAP_TCP_ERROR);
+    return SOAP_INVALID_SOCKET;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_disconnect(struct soap *soap)
+{
+#ifdef WITH_OPENSSL
+  if (soap->ssl)
+  { int r, s = 0;
+    if (soap->session)
+      SSL_SESSION_free(soap->session);
+    if (*soap->host)
+    { soap->session = SSL_get1_session(soap->ssl);
+      if (soap->session)
+      { strcpy(soap->session_host, soap->host);
+        soap->session_port = soap->port;
+      }
+    }
+    r = SSL_shutdown(soap->ssl);
+    if (r != 1)
+    { s = ERR_get_error();
+      if (s)
+      { if (soap_valid_socket(soap->socket))
+        { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1);
+          soap->socket = SOAP_INVALID_SOCKET;
+        }
+        r = SSL_shutdown(soap->ssl);
+      }
+    }
+    DBGLOG(TEST, if (s) SOAP_MESSAGE(fdebug, "Shutdown failed: %d\n", SSL_get_error(soap->ssl, r)));
+    SSL_free(soap->ssl);
+    soap->ssl = NULL;
+    if (s)
+      return SOAP_SSL_ERROR;
+    ERR_remove_state(0);
+  }
+#endif
+  if (soap_valid_socket(soap->socket) && !(soap->omode & SOAP_IO_UDP))
+  { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 2);
+    soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
+    soap->socket = SOAP_INVALID_SOCKET;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_closesocket(struct soap *soap, SOAP_SOCKET fd)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Close socket %d\n", (int)fd));
+  return closesocket(fd);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static int
+tcp_shutdownsocket(struct soap *soap, SOAP_SOCKET fd, int how)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Shutdown socket %d how=%d\n", (int)fd, how));
+  return shutdown(fd, how);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_closesock(struct soap *soap)
+{ register int status = soap->error;
+  if (status == SOAP_EOF || status == SOAP_TCP_ERROR || status == SOAP_SSL_ERROR || !soap->keep_alive)
+  { if (soap->fclose && (soap->error = soap->fclose(soap)))
+      return soap->error;
+    soap->keep_alive = 0;
+  }
+#ifdef WITH_ZLIB
+  if (soap->zlib_state == SOAP_ZLIB_DEFLATE)
+    deflateEnd(&soap->d_stream);
+  else if (soap->zlib_state == SOAP_ZLIB_INFLATE)
+    inflateEnd(&soap->d_stream);
+  soap->zlib_state = SOAP_ZLIB_NONE;
+#endif
+  return soap->error = status;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_hash(register const char *s)
+{ register size_t h = 0;
+  while (*s)
+    h = 65599*h + *s++;
+  return h % SOAP_IDHASH;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_pht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing pointer hashtable\n"));
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new1(soap_mode mode)
+{ return soap_new2(mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new()
+{ return soap_new2(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new2(soap_mode imode, soap_mode omode)
+{ struct soap *soap = (struct soap*)malloc(sizeof(struct soap));
+  if (soap)
+    soap_init2(soap, imode, omode);
+  return soap;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_del(struct soap *soap)
+{ free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_pht(struct soap *soap)
+{ register struct soap_pblk *pb, *next;
+  register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free pointer hashtable\n"));
+  for (pb = soap->pblk; pb; pb = next)
+  { next = pb->next;
+    SOAP_FREE(soap, pb);
+  }
+  soap->pblk = NULL;
+  soap->pidx = 0;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type)
+{ register int i;
+  struct soap_plist *pp;
+  if (soap->version != 1)
+    soap->encoding = 1;
+  if (a)
+    i = soap_array_pointer_lookup(soap, p, a, n, type, &pp);
+  else
+    i = soap_pointer_lookup(soap, p, type, &pp);
+  if (i)
+  { if (soap_is_embedded(soap, pp)
+     || soap_is_single(soap, pp))
+      return 0;
+    soap_set_embedded(soap, pp);
+  }
+  return i;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_lookup(struct soap *soap, const void *p, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (p)
+  { for (pp = soap->pht[soap_hash_ptr(p)]; pp; pp = pp->next)
+    { if (pp->ptr == p && pp->type == type)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d id=%d\n", p, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d: not found\n", p, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_enter(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register int h;
+  register struct soap_plist *pp;
+  if (!soap->pblk || soap->pidx >= SOAP_PTRBLK)
+  { register struct soap_pblk *pb = (struct soap_pblk*)SOAP_MALLOC(soap, sizeof(struct soap_pblk));
+    if (!pb)
+    { soap->error = SOAP_EOM;
+      return 0;
+    }
+    pb->next = soap->pblk;
+    soap->pblk = pb;
+    soap->pidx = 0;
+  }
+  *ppp = pp = &soap->pblk->plist[soap->pidx++];
+  if (a)
+    h = soap_hash_ptr(a->__ptr);
+  else
+    h = soap_hash_ptr(p);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pointer enter location=%p array=%p size=%d dim=%d type=%d id=%d\n", p, a?a->__ptr:NULL, a?a->__size:0, n, type, soap->idnum+1));
+  pp->next = soap->pht[h];
+  pp->type = type;
+  pp->mark1 = 0;
+  pp->mark2 = 0;
+  pp->ptr = p;
+  pp->array = a;
+  soap->pht[h] = pp;
+  pp->id = ++soap->idnum;
+  return pp->id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_pointer_lookup(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (!p || !a->__ptr)
+    return 0;
+  for (pp = soap->pht[soap_hash_ptr(a->__ptr)]; pp; pp = pp->next)
+  { if (pp->type == type && pp->array && pp->array->__ptr == a->__ptr)
+    { register int i;
+      for (i = 0; i < n; i++)
+        if (((const int*)&pp->array->__size)[i] != ((const int*)&a->__size)[i])
+	  break;
+      if (i == n)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d id=%d\n", a->__ptr, type, pp->id));
+        return pp->id;
+      }
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d: not found\n", a->__ptr, type));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_count(struct soap *soap)
+{ soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) || (soap->omode & SOAP_ENC_DIME))
+    soap->mode = soap->omode | SOAP_IO_LENGTH | SOAP_ENC_DIME;
+  else
+#endif
+  { soap->mode = soap->omode;
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE
+     || (((soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_ENC_XML))
+#ifndef WITH_LEANER
+      && !soap->fpreparesend
+#endif
+      ))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    else
+      soap->mode |= SOAP_IO_LENGTH;
+  }
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (!(soap->mode & SOAP_ENC_DIME))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+    soap->mode |= SOAP_ENC_MIME;
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+  soap->dime.list = soap->dime.last;	/* keep track of last DIME attachment */
+#endif
+  soap->count = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->part = SOAP_BEGIN;
+  soap->idnum = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin count phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+#ifndef WITH_LEANER
+  soap->dime.count = 0; /* count # of attachments */
+  soap->dime.size = 0; /* accumulate total size of attachments */
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
+    return soap->error = soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_count(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->fpreparefinal)
+    return soap->error = soap->fpreparefinal(soap);
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of count phase\n"));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_send(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+  soap->mode = soap->omode | (soap->mode & (SOAP_IO_LENGTH | SOAP_ENC_DIME));
+#ifdef WITH_ZLIB
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+#endif
+#ifdef WITH_UDP
+  if ((soap->mode & SOAP_IO_UDP))
+  { soap->mode |= SOAP_ENC_XML;
+    if (soap->count > SOAP_BUFLEN)
+      return soap->error = SOAP_UDP_ERROR;
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_FLUSH && soap_valid_socket(soap->socket))
+  { if (soap->count || (soap->mode & SOAP_IO_LENGTH) || (soap->mode & SOAP_ENC_XML))
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+  soap->mode &= ~SOAP_IO_LENGTH;
+  if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap_new_block(soap);
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH))
+    soap->mode |= SOAP_XML_TREE;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME))
+  { soap->mode |= SOAP_ENC_MIME;
+    soap->mode &= ~SOAP_ENC_DIME;
+  }
+  else
+    soap->mode &= ~SOAP_ENC_MTOM;
+  if (soap->mode & SOAP_ENC_MIME)
+    soap_select_mime_boundary(soap);
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket)) /* Set win32 stdout or soap->sendfd to BINARY, e.g. to support DIME */
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->sendfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->sendfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#endif
+  if (soap->mode & SOAP_IO)
+  { soap->bufidx = 0;
+    soap->buflen = 0;
+  }
+  soap->chunksize = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+#ifdef WITH_ZLIB
+  soap->z_ratio_out = 1.0;
+  if ((soap->mode & SOAP_ENC_ZLIB) && soap->zlib_state != SOAP_ZLIB_DEFLATE)
+  {
+#ifdef WITH_GZIP
+    memcpy(soap->z_buf, "\37\213\10\0\0\0\0\0\0\377", 10);
+    soap->d_stream.next_out = (Byte*)soap->z_buf + 10;
+    soap->d_stream.avail_out = SOAP_BUFLEN - 10;
+    soap->z_crc = crc32(0L, NULL, 0);
+    if (deflateInit2(&soap->d_stream, soap->z_level, Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY) != Z_OK)
+#else
+    soap->d_stream.next_out = (Byte*)soap->z_buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    if (deflateInit(&soap->d_stream, soap->z_level) != Z_OK)
+#endif
+      return soap->error = SOAP_ZLIB_ERROR;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflate initialized\n"));
+    soap->zlib_state = SOAP_ZLIB_DEFLATE;
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin send phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+  soap->part = SOAP_BEGIN;
+#ifndef WITH_LEANER
+  if (soap->fprepareinit && (soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap->fprepareinit(soap);   
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_embedded(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { pp->mark1 = 1;
+    pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded %p type=%d mark set to 1\n", p, t));
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_reference(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  if (!p || (soap->mode & SOAP_XML_TREE))
+    return 1;
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (soap_pointer_enter(soap, p, NULL, 0, t, &pp))
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  else
+    return 1;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reference %p type=%d (%d %d)\n", p, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_reference(struct soap *soap, const void *p, const struct soap_array *a, int n, int t)
+{ register int i;
+  struct soap_plist *pp;
+  if (!p || !a->__ptr)
+    return 1;
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (i)
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (!soap_pointer_enter(soap, p, a, n, t, &pp))
+    return 1;
+  else
+  { pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array reference %p ptr=%p dim=%d type=%d (%d %d)\n", p, a->__ptr, n, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embedded_id(struct soap *soap, int id, const void *p, int t)
+{ struct soap_plist *pp;
+  if (soap->mode & SOAP_XML_TREE)
+    return id;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id %p type=%d id=%d\n", p, t, id));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (id < 0)
+    { id = soap_pointer_lookup(soap, p, t, &pp);
+      if (id)
+      { if (soap->mode & SOAP_IO_LENGTH)
+          pp->mark1 = 2;
+        else
+          pp->mark2 = 2;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id multiref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+      }
+      return -1;
+    }
+    return id;
+  }
+  if (id < 0)
+    id = soap_pointer_lookup(soap, p, t, &pp);
+  else if (id && !soap_pointer_lookup(soap, p, t, &pp))
+    return 0;
+  if (id && pp)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      pp->mark1 = 1;
+    else
+      pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id embedded ref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+  }
+  return id;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Is embedded? %d %d\n", (int)pp->mark1, (int)pp->mark2));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      return pp->mark1 != 0;
+    return pp->mark2 != 0;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 1;
+  return pp->mark2 == 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_single(struct soap *soap, struct soap_plist *pp)
+{ if (soap->part == SOAP_IN_HEADER)
+    return 1;
+  if (!pp)
+    return 0;
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 0;
+  return pp->mark2 == 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return;
+  if (soap->mode & SOAP_IO_LENGTH)
+    pp->mark1 = 1;
+  else
+    pp->mark2 = 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attachment(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, const char *aid, const char *atype, const char *aoptions, int n, const char *type, int t) 
+{ struct soap_plist *pp;
+  int i;
+  if (!p || !a->__ptr || (!aid && !atype))
+    return soap_element_id(soap, tag, id, p, a, n, type, t);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Attachment tag='%s' id='%s' (%d) type='%s'\n", tag, aid?aid:"", id, atype?atype:""));
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (!i)
+  { i = soap_pointer_enter(soap, p, a, n, t, &pp);
+    if (!i)
+    { soap->error = SOAP_EOM;
+      return -1;
+    }
+  }
+  if (id <= 0)
+    id = i;
+  if (!aid)
+  { sprintf(soap->tmpbuf, soap->dime_id_format, id);
+    aid = soap_strdup(soap, soap->tmpbuf);
+  }
+  /* Add MTOM xop:Include element when necessary */
+  /* TODO: this code to be obsoleted with new import/xop.h conventions */
+  if ((soap->mode & SOAP_ENC_MTOM) && strcmp(tag, "xop:Include"))
+  { if (soap_element_begin_out(soap, tag, 0, type)
+     || soap_element_href(soap, "xop:Include", 0, "href", aid)
+     || soap_element_end_out(soap, tag))
+      return soap->error;
+  }
+  else if (soap_element_href(soap, tag, 0, "href", aid))
+    return soap->error;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { if (pp->mark1 != 3)
+    { struct soap_multipart *content;
+      if (soap->mode & SOAP_ENC_MTOM)
+        content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, (char*)a->__ptr, a->__size);
+      else
+        content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, (char*)a->__ptr, a->__size);
+      if (!content)
+      { soap->error = SOAP_EOM;
+        return -1;
+      }
+      if (!strncmp(aid, "cid:", 4)) /* RFC 2111 */
+      { if (soap->mode & SOAP_ENC_MTOM)
+        { char *s = (char*)soap_malloc(soap, strlen(aid) - 1);
+	  if (s)
+	  { *s = '<';
+	    strcpy(s + 1, aid + 4);
+	    strcat(s, ">");
+	    content->id = s;
+          }
+        }
+        else
+          content->id = aid + 4;
+      }
+      else
+        content->id = aid;
+      content->type = atype;
+      content->options = aoptions;
+      content->encoding = SOAP_MIME_BINARY;
+      pp->mark1 = 3;
+    }
+  }
+  else
+    pp->mark2 = 3;
+  return -1;
+}
+#endif
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_init_iht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+    soap->iht[i] = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_1
+static void
+soap_free_iht(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip, *p;
+  register struct soap_flist *fp, *fq;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = p)
+    { for (fp = ip->flist; fp; fp = fq)
+      { fq = fp->next;
+        SOAP_FREE(soap, fp);
+      }
+      p = ip->next;
+      SOAP_FREE(soap, ip);
+    }
+    soap->iht[i] = NULL;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_lookup(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  for (ip = soap->iht[soap_hash(id)]; ip; ip = ip->next)
+    if (!strcmp(ip->id, id))
+      return ip;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_enter(struct soap *soap, const char *id)
+{ register size_t h;
+  register struct soap_ilist *ip;
+  ip = (struct soap_ilist*)SOAP_MALLOC(soap, sizeof(struct soap_ilist) + strlen(id));
+  if (ip)
+  { h = soap_hash(id);
+    strcpy(ip->id, id);
+    ip->next = soap->iht[h];
+    soap->iht[h] = ip;
+    return ip;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_malloc(struct soap *soap, size_t n)
+{ register char *p;
+  if (!n)
+    return (void*)SOAP_NON_NULL;
+  if (!soap)
+    return SOAP_MALLOC(soap, n);
+  n += (-(long)n) & (sizeof(void*)-1); /* align at 4-, 8- or 16-byte boundary */
+  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(void*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  /* keep chain of alloced cells for later destruction */
+  soap->alloced = 1;
+  *(void**)(p + n) = soap->alist;
+  *(size_t*)(p + n + sizeof(void*)) = n;
+  soap->alist = p + n;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_mht(struct soap *soap)
+{ register int i;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+    soap->mht[i] = NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_free_mht(struct soap *soap)
+{ register int i;
+  register struct soap_mlist *mp, *mq;
+  for (i = 0; i < (int)SOAP_PTRHASH; i++)
+  { for (mp = soap->mht[i]; mp; mp = mq)
+    { mq = mp->next;
+      if (mp->live)
+        fprintf(stderr, "%s(%d): malloc() = %p not freed (memory leak or forgot to call soap_end()?)\n", mp->file, mp->line, mp->ptr);
+      free(mp);
+    }
+    soap->mht[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_track_malloc(struct soap *soap, const char *file, int line, size_t size)
+{ register void *p = malloc(size);
+  if (soap)
+  { register int h = soap_hash_ptr(p);
+    register struct soap_mlist *mp = (struct soap_mlist*)malloc(sizeof(struct soap_mlist));
+    if (soap->fdebug[SOAP_INDEX_TEST])
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): malloc(%lu) = %p\n", file, line, (unsigned long)size, p));
+    mp->next = soap->mht[h];
+    mp->ptr = p;
+    mp->file = file;
+    mp->line = line;
+    mp->live = 1;
+    soap->mht[h] = mp;
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_track_free(struct soap *soap, const char *file, int line, void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+  { if (mp->live)
+    { free(p);
+      if (soap->fdebug[SOAP_INDEX_TEST])
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): free(%p)\n", file, line, p));
+      mp->live = 0;
+    }
+    else
+      fprintf(stderr, "%s(%d): free(%p) double free of pointer malloced at %s(%d)\n", file, line, p, mp->file, mp->line);
+  }
+  else
+    fprintf(stderr, "%s(%d): free(%p) pointer not malloced\n", file, line, p);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_track_unlink(struct soap *soap, const void *p)
+{ register int h = soap_hash_ptr(p);
+  register struct soap_mlist *mp;
+  for (mp = soap->mht[h]; mp; mp = mp->next)
+    if (mp->ptr == p)
+      break;
+  if (mp)
+    mp->live = 0;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_dealloc(struct soap *soap, void *p)
+{ if (!soap)
+    return;
+  if (p)
+  { register char **q;
+    for (q = (char**)&soap->alist; *q; q = *(char***)q)
+    { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+      { *q = **(char***)q;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Freed data at %p\n", p));
+        SOAP_FREE(soap, p);
+        return;
+      }
+    }
+    soap_delete(soap, p);
+  }
+  else
+  { register char *q;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free all soap_malloc() data\n"));
+    while (soap->alist)
+    { q = (char*)soap->alist;
+      soap->alist = *(void**)q;
+      q -= *(size_t*)(q + sizeof(void*));
+      SOAP_FREE(soap, q);
+    }
+  }
+  /* we must assume these were deallocated: */
+  soap->action = NULL;
+  soap->fault = NULL;
+  soap->header = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->authrealm = NULL;
+#ifndef WITH_LEANER
+  soap_clr_mime(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_delete(struct soap *soap, void *p)
+{ register struct soap_clist **cp;
+  if (soap_check_state(soap))
+    return;
+  cp = &soap->clist;
+  if (p)
+  { while (*cp)
+    { if (p == (*cp)->ptr)
+      { register struct soap_clist *q = *cp;
+        *cp = q->next;
+        q->fdelete(q);
+        SOAP_FREE(soap, q);
+        return;
+      }
+      cp = &(*cp)->next;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: address not in list\n", p));
+  }
+  else
+  { while (*cp)
+    { register struct soap_clist *q = *cp;
+      *cp = q->next;
+      if (q->ptr == (void*)soap->fault)
+        soap->fault = NULL; /* this was deallocated */
+      else if (q->ptr == (void*)soap->header)
+        soap->header = NULL; /* this was deallocated */
+      q->fdelete(q);
+      SOAP_FREE(soap, q);
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_clist *
+SOAP_FMAC2
+soap_link(struct soap *soap, void *p, int t, int n, void (*fdelete)(struct soap_clist*))
+{ register struct soap_clist *cp;
+  if ((cp = (struct soap_clist*)SOAP_MALLOC(soap, sizeof(struct soap_clist))))
+  { cp->next = soap->clist;
+    cp->type = t;
+    cp->size = n; 
+    cp->ptr = p;
+    cp->fdelete = fdelete;
+    soap->clist = cp;
+  }
+  return cp;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_unlink(struct soap *soap, const void *p)
+{ register char **q;
+  register struct soap_clist **cp;
+  if (!soap || !p)
+    return;
+  for (q = (char**)&soap->alist; *q; q = *(char***)q)
+  { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+    { *q = **(char***)q;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked data %p\n", p));
+#ifdef SOAP_DEBUG
+      soap_track_unlink(soap, p);
+#endif
+      return;
+    }
+  }
+  for (cp = &soap->clist; *cp; cp = &(*cp)->next)
+  { if (p == (*cp)->ptr)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked class instance %p\n", p));
+      q = (char**)*cp;
+      *cp = (*cp)->next;
+      SOAP_FREE(soap, q);
+      return;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_lookup_type(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  if (id && *id)
+  { ip = soap_lookup(soap, id);
+    if (ip)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup id='%s' type=%d\n", id, ip->type));
+      return ip->type;
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "lookup type id='%s' NOT FOUND! Need to get it from xsi:type\n", id));
+  return 0;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, unsigned int k)
+{ struct soap_ilist *ip;
+  void **q;
+  if (!p || !id || !*id)
+    return p;
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding first href='%s' type=%d %p (%u bytes)\n", id, t, p, (unsigned int)n));
+    ip->type = t;
+    ip->size = n; 
+    ip->link = p;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->ptr = NULL;
+    ip->level = k;
+    *p = NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolved href='%s' type=%d location=%p (%u bytes)\n", id, t, ip->ptr, (unsigned int)n));
+    if (ip->type != t)
+    { strcpy(soap->id, id);
+      soap->error = SOAP_HREF;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility: id type=%d href type=%d\n", ip->type, t));
+      return NULL;
+    }
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      if (!q)
+        return NULL;
+      *p = (void*)q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    *p = ip->ptr;
+  }
+  else if (ip->level > k)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving level %u pointers to href='%s'\n", ip->level, id));
+    while (ip->level > k)
+    { void *s, **r = &ip->link;
+      q = (void**)ip->link;
+      while (q)
+      { *r = (void*)soap_malloc(soap, sizeof(void*));
+        s = *q;
+        *q = *r;
+        r = (void**)*r;
+        q = (void**)s;
+      }
+      *r = NULL;
+      ip->size = n; 
+      ip->copy = NULL;
+      ip->level = ip->level - 1;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarded href='%s' type=%d location=%p (%u bytes)\n", id, t, p, (unsigned int)n));
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      *p = q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIDREF
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_forward(struct soap *soap, const char *href, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t))
+{ struct soap_ilist *ip;
+  if (!p || !href || !*href)
+    return p;
+  ip = soap_lookup(soap, href); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, href); /* new hash table entry for string id */
+    ip->type = st;
+    ip->size = n;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->ptr = NULL;
+    ip->level = 0;
+    ip->flist = NULL;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry href='%s' type=%d size=%lu level=%d location=%p\n", href, st, (unsigned long)n, k, p));
+  }
+  else if (ip->type != st || (ip->level == k && ip->size != n))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", href, ip->type, (unsigned long)ip->size, k, st, (unsigned long)n));
+    strcpy(soap->id, href);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  if (fcopy || n < sizeof(void*) || *href != '#')
+  { register struct soap_flist *fp = (struct soap_flist*)SOAP_MALLOC(soap, sizeof(struct soap_flist));
+    if (!fp)
+    { soap->error = SOAP_EOM;
+      return NULL;
+    }
+    fp->next = ip->flist;
+    fp->type = tt;
+    fp->ptr = p;
+    fp->level = k;
+    fp->len = len;
+    if (fcopy)
+      fp->fcopy = fcopy;
+    else
+      fp->fcopy = soap_fcopy;
+    ip->flist = fp;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding type=%d (target type=%d) size=%lu location=%p level=%u len=%lu href='%s'\n", st, tt, (unsigned long)n, p, k, (unsigned long)len, href));
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding copying address %p for type=%d href='%s'\n", p, st, href));
+    *(void**)p = ip->copy;
+    ip->copy = p;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*))
+{
+#ifndef WITH_NOIDREF
+  struct soap_ilist *ip;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Enter id='%s' type=%d loc=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  soap->alloced = 0;
+  if (!p)
+  { if (finstantiate)
+      p = finstantiate(soap, t, type, arrayType, &n);
+    else
+      p = soap_malloc(soap, n);
+    if (p)
+      soap->alloced = 1;
+  }
+#ifndef WITH_NOIDREF
+  if (!id || !*id)
+#endif
+    return p;
+#ifndef WITH_NOIDREF
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Lookup entry id='%s for location=%p'\n", id, p));
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    ip->type = t;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry id='%s' type=%d size=%lu level=%u location=%p\n", id, t, (unsigned long)n, k, p));
+  }
+  else if ((ip->type != t || (ip->level == k && ip->size != n)) && (ip->copy || ip->flist))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", id, ip->type, (unsigned long)ip->size, k, t, (unsigned long)n));
+    strcpy(soap->id, id);
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Multiply defined id='%s'\n", id));
+    strcpy(soap->id, id);
+    soap->error = SOAP_DUPLICATE_ID;
+    return NULL;
+  }
+  else 
+  { ip->size = n;
+    ip->ptr = p;
+    ip->level = k;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update entry id='%s' type=%d location=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k));
+  }
+  return ip->ptr;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
+{ DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Copying data type=%d (target type=%d) %p -> %p (%lu bytes)\n", st, tt, q, p, (unsigned long)n));
+  memcpy(p, q, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_send(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->dime.list)
+  { /* SOAP body referenced attachments must appear first */
+    soap->dime.last->next = soap->dime.first;
+    soap->dime.first = soap->dime.list->next;
+    soap->dime.list->next = NULL;
+    soap->dime.last = soap->dime.list;
+  }
+  if (soap_putdime(soap) || soap_putmime(soap))
+    return soap->error;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End send\n"));
+  if (soap->mode & SOAP_IO) /* need to flush the remaining data in buffer */
+  { if (soap_flush(soap))
+#ifdef WITH_ZLIB
+    { if (soap->mode & SOAP_ENC_ZLIB && soap->zlib_state == SOAP_ZLIB_DEFLATE)
+      { soap->zlib_state = SOAP_ZLIB_NONE;
+        deflateEnd(&soap->d_stream);
+      }
+      return soap->error;
+    }
+#else
+      return soap->error;
+#endif
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { int r;
+      soap->d_stream.avail_in = 0;
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating remainder\n"));
+        r = deflate(&soap->d_stream, Z_FINISH);
+        if (soap->d_stream.avail_out != SOAP_BUFLEN)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN - soap->d_stream.avail_out))
+          { soap->zlib_state = SOAP_ZLIB_NONE;
+            deflateEnd(&soap->d_stream);
+            return soap->error;
+	  }
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (r == Z_OK);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+      soap->z_ratio_out = (float)soap->d_stream.total_out / (float)soap->d_stream.total_in;
+      soap->mode &= ~SOAP_ENC_ZLIB;
+      soap->zlib_state = SOAP_ZLIB_NONE;
+      if (deflateEnd(&soap->d_stream) != Z_OK || r != Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to end deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+#ifdef WITH_GZIP
+      soap->z_buf[0] = soap->z_crc & 0xFF;
+      soap->z_buf[1] = (soap->z_crc >> 8) & 0xFF;
+      soap->z_buf[2] = (soap->z_crc >> 16) & 0xFF;
+      soap->z_buf[3] = (soap->z_crc >> 24) & 0xFF;
+      soap->z_buf[4] = soap->d_stream.total_in & 0xFF;
+      soap->z_buf[5] = (soap->d_stream.total_in >> 8) & 0xFF;
+      soap->z_buf[6] = (soap->d_stream.total_in >> 16) & 0xFF;
+      soap->z_buf[7] = (soap->d_stream.total_in >> 24) & 0xFF;
+      if (soap_flush_raw(soap, soap->z_buf, 8))
+        return soap->error;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip crc32=%lu\n", (unsigned long)soap->z_crc));
+#endif
+    }
+#endif
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    { char *p;
+#ifndef WITH_NOHTTP
+      if (!(soap->mode & SOAP_ENC_XML))
+      { soap->mode--;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending buffered message of length %u\n", (unsigned int)soap->blist->size));
+        if (soap->status >= SOAP_POST)
+          soap->error = soap->fpost(soap, soap->endpoint, soap->host, soap->port, soap->path, soap->action, soap->blist->size);
+        else if (soap->status != SOAP_STOP)
+          soap->error = soap->fresponse(soap, soap->status, soap->blist->size);
+        if (soap->error || soap_flush(soap))
+          return soap->error;
+        soap->mode++;
+      }
+#endif
+      for (p = soap_first_block(soap); p; p = soap_next_block(soap))
+      { DBGMSG(SENT, p, soap_block_size(soap));
+        if ((soap->error = soap->fsend(soap, p, soap_block_size(soap))))
+        { soap_end_block(soap);
+          return soap->error;
+        }
+      }
+      soap_end_block(soap);
+    }
+#ifndef WITH_LEANER
+    else if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { DBGMSG(SENT, "\r\n0\r\n\r\n", 7);
+      if ((soap->error = soap->fsend(soap, "\r\n0\r\n\r\n", 7)))
+        return soap->error;
+    }
+#endif
+  }
+#ifdef WITH_TCPFIN
+#ifdef WITH_OPENSSL
+  if (!soap->ssl && soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#else
+  if (soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP))
+    soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#endif
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of send phase\n"));
+  soap->omode &= ~SOAP_XML_SEC;
+  soap->count = 0;
+  soap->part = SOAP_END;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_recv(struct soap *soap)
+{ soap->part = SOAP_END;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_ENC_DIME) && soap_getdime(soap))
+    return soap->error;
+  soap->dime.list = soap->dime.first;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  if ((soap->mode & SOAP_ENC_MIME) && soap_getmime(soap))
+    return soap->error;
+  soap->mime.list = soap->mime.first;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "End of receive message ok\n"));
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { soap->mode &= ~SOAP_ENC_ZLIB;
+    memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+    soap->bufidx = (char*)soap->d_stream.next_in - soap->z_buf;
+    soap->buflen = soap->z_buflen;
+    soap->zlib_state = SOAP_ZLIB_NONE;
+    if (inflateEnd(&soap->d_stream) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+#ifdef WITH_GZIP
+    if (soap->zlib_in == SOAP_ZLIB_GZIP)
+    { soap_wchar c;
+      short i;
+      for (i = 0; i < 8; i++)
+      { if ((int)(c = soap_getchar(soap)) == EOF)
+          return soap->error = SOAP_EOF;
+        soap->z_buf[i] = (char)c;
+      }
+      if (soap->z_crc != ((uLong)(unsigned char)soap->z_buf[0] | ((uLong)(unsigned char)soap->z_buf[1] << 8) | ((uLong)(unsigned char)soap->z_buf[2] << 16) | ((uLong)(unsigned char)soap->z_buf[3] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: crc check failed, message corrupted? (crc32=%lu)\n", (unsigned long)soap->z_crc));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+      if (soap->d_stream.total_out != ((uLong)(unsigned char)soap->z_buf[4] | ((uLong)(unsigned char)soap->z_buf[5] << 8) | ((uLong)(unsigned char)soap->z_buf[6] << 16) | ((uLong)(unsigned char)soap->z_buf[7] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: incorrect message length\n"));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+    }
+#endif
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    while ((int)soap_getchar(soap) != EOF) /* advance to last chunk */
+      ;
+  if (soap->fdisconnect && (soap->error = soap->fdisconnect(soap)))
+    return soap->error;
+#ifndef WITH_NOIDREF
+  return soap_resolve(soap);
+#else
+#ifndef WITH_LEANER
+  if (soap->xlist)
+  { if (soap->mode & SOAP_ENC_MTOM)
+      return soap->error = SOAP_MIME_HREF;
+    return soap->error = SOAP_DIME_HREF;
+  }
+#endif
+  return SOAP_OK;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free(struct soap *soap)
+{ register struct Namespace *ns;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free namespace stack\n"));
+  while (soap->nlist)
+  { register struct soap_nlist *np = soap->nlist->next;
+    SOAP_FREE(soap, soap->nlist);
+    soap->nlist = np;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free any remaining temp blocks\n"));
+  while (soap->blist)
+    soap_end_block(soap);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute storage\n"));
+  while (soap->attributes)
+  { register struct soap_attribute *tp = soap->attributes->next;
+    if (soap->attributes->value)
+      SOAP_FREE(soap, soap->attributes->value);
+    SOAP_FREE(soap, soap->attributes);
+    soap->attributes = tp;
+  }
+#ifdef WITH_FAST
+  if (soap->labbuf)
+    SOAP_FREE(soap, soap->labbuf);
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  ns = soap->local_namespaces;
+  if (ns)
+  { for (; ns->id; ns++)
+    { if (ns->out)
+      { if (soap->encodingStyle == ns->out)
+          soap->encodingStyle = SOAP_STR_EOS;
+        SOAP_FREE(soap, ns->out);
+        ns->out = NULL;
+      }
+      if (soap->encodingStyle == ns->ns)
+        soap->encodingStyle = SOAP_STR_EOS;
+    }
+    SOAP_FREE(soap, soap->local_namespaces);
+    soap->local_namespaces = NULL;
+  }
+#ifndef WITH_LEANER
+  while (soap->xlist)
+  { struct soap_xlist *xp = soap->xlist->next;
+    SOAP_FREE(soap, soap->xlist);
+    soap->xlist = xp;
+  }
+#endif
+#ifndef WITH_NOIDREF
+  soap_free_pht(soap);
+  soap_free_iht(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_init_logs(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { soap->logfile[i] = NULL;
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEAN) || defined(SOAP_DEBUG)
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_open_logfile(struct soap *soap, int i)
+{ if (soap->logfile[i])
+    soap->fdebug[i] = fopen(soap->logfile[i], i < 2 ? "ab" : "a");
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_close_logfile(struct soap *soap, int i)
+{ if (soap->fdebug[i])
+  { fclose(soap->fdebug[i]);
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_close_logfiles(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+    soap_close_logfile(soap, i);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+static void
+soap_set_logfile(struct soap *soap, int i, const char *logfile)
+{ char *s = NULL;
+  soap_close_logfile(soap, i);
+  if (soap->logfile[i])
+    SOAP_FREE(soap, (void*)soap->logfile[i]);
+  if (logfile)
+    if ((s = (char*)SOAP_MALLOC(soap, strlen(logfile) + 1)))
+      strcpy(s, logfile);
+  soap->logfile[i] = s;
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_recv_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_RECV, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_sent_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_SENT, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifdef SOAP_DEBUG
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_test_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_TEST, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy(struct soap *soap)
+{ return soap_copy_context((struct soap*)malloc(sizeof(struct soap)), soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy_context(struct soap *copy, struct soap *soap)
+{ if (soap_check_state(soap))
+    return NULL;
+  if (copy)
+  { register struct soap_plugin *p;
+    memcpy(copy, soap, sizeof(struct soap));
+    copy->state = SOAP_COPY;
+    copy->user = NULL;
+    copy->error = SOAP_OK;
+    copy->userid = NULL;
+    copy->passwd = NULL;
+    copy->nlist = NULL;
+    copy->blist = NULL;
+    copy->clist = NULL;
+    copy->alist = NULL;
+    copy->attributes = NULL;
+#ifdef WITH_FAST
+    copy->labbuf = NULL;
+    copy->lablen = 0;
+    copy->labidx = 0;
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_mht(copy);
+#endif
+    copy->local_namespaces = NULL;
+#ifndef WITH_NOIDREF
+    soap_init_iht(copy);
+    soap_init_pht(copy);
+#endif
+    copy->header = NULL;
+    copy->fault = NULL;
+    copy->action = NULL;
+#ifndef WITH_LEAN
+#ifdef WITH_COOKIES
+    copy->cookies = soap_copy_cookies(copy);
+#else
+    copy->cookies = NULL;
+#endif
+#endif
+#ifdef SOAP_DEBUG
+    soap_init_logs(copy);
+    soap_set_recv_logfile(copy, soap->logfile[SOAP_INDEX_RECV]);
+    soap_set_sent_logfile(copy, soap->logfile[SOAP_INDEX_SENT]);
+    soap_set_test_logfile(copy, soap->logfile[SOAP_INDEX_TEST]);
+#endif
+    copy->plugins = NULL;
+    for (p = soap->plugins; p; p = p->next)
+    { register struct soap_plugin *q = (struct soap_plugin*)SOAP_MALLOC(copy, sizeof(struct soap_plugin));
+      if (!q)
+        return NULL;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying plugin '%s'\n", p->id));
+      *q = *p;
+      if (p->fcopy && (soap->error = p->fcopy(copy, q, p)))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not copy plugin '%s'\n", p->id));
+        SOAP_FREE(copy, q);
+        return NULL;
+      }
+      q->next = copy->plugins;
+      copy->plugins = q;
+    }
+  }
+  else
+    soap->error = SOAP_EOM;
+  return copy;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init(struct soap *soap)
+{ soap->state = SOAP_INIT;
+  soap->version = 0;
+  soap_imode(soap, SOAP_IO_DEFAULT);
+  soap_omode(soap, SOAP_IO_DEFAULT);
+  soap->plugins = NULL;
+  soap->user = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+#ifndef WITH_NOHTTP
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fform = NULL;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#endif
+  soap->fconnect = NULL;
+  soap->fdisconnect = NULL;
+#ifndef WITH_NOIO
+#ifndef WITH_IPV6
+  soap->fresolve = tcp_gethost;
+#else
+  soap->fresolve = NULL;
+#endif
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fclosesocket = tcp_closesocket;
+  soap->fshutdownsocket = tcp_shutdownsocket;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+  soap->fpoll = soap_poll;
+#else
+  soap->fopen = NULL;
+  soap->fclose = NULL;
+  soap->fpoll = NULL;
+#endif
+#ifndef WITH_LEANER
+  soap->fprepareinit = NULL;
+  soap->fpreparesend = NULL;
+  soap->fpreparerecv = NULL;
+  soap->fpreparefinal = NULL;
+#endif
+  soap->fseterror = NULL;
+  soap->fignore = NULL;
+  soap->fserveloop = NULL;
+  soap->fplugin = fplugin;
+#ifndef WITH_LEANER
+  soap->fdimereadopen = NULL;
+  soap->fdimewriteopen = NULL;
+  soap->fdimereadclose = NULL;
+  soap->fdimewriteclose = NULL;
+  soap->fdimeread = NULL;
+  soap->fdimewrite = NULL;
+#endif
+  soap->float_format = "%.8g"; /* .8 preserves single FP precision as much as possible, but might not be very efficient */
+  soap->double_format = "%.17lg"; /* .17 preserves double FP precision as much as possible, but might not be very efficient */
+  soap->dime_id_format = "cid:id%d"; /* default DIME id format */
+  soap->http_version = "1.1";
+  soap->actor = NULL;
+  soap->max_keep_alive = SOAP_MAXKEEPALIVE;
+  soap->keep_alive = 0;
+  soap->recv_timeout = 0;
+  soap->send_timeout = 0;
+  soap->connect_timeout = 0;
+  soap->accept_timeout = 0;
+  soap->socket_flags = 0;
+  soap->connect_flags = 0;
+  soap->bind_flags = 0;
+  soap->accept_flags = 0;
+  soap->ip = 0;
+#ifdef WITH_FAST
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#endif
+  soap->encodingStyle = SOAP_STR_EOS;
+#ifndef WITH_NONAMESPACES
+  soap->namespaces = namespaces;
+#else
+  soap->namespaces = NULL;
+#endif
+  soap->local_namespaces = NULL;
+  soap->nlist = NULL;
+  soap->blist = NULL;
+  soap->clist = NULL;
+  soap->alist = NULL;
+  soap->attributes = NULL;
+  soap->header = NULL;
+  soap->fault = NULL;
+  soap->master = SOAP_INVALID_SOCKET;
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->os = NULL;
+  soap->is = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifndef UNDER_CE
+  soap->recvfd = 0;
+  soap->sendfd = 1;
+#else
+  soap->recvfd = stdin;
+  soap->sendfd = stdout;
+#endif 
+  soap->host[0] = '\0';
+  soap->port = 0;
+  soap->action = NULL;
+  soap->proxy_host = NULL;
+  soap->proxy_port = 8080;
+  soap->proxy_userid = NULL;
+  soap->proxy_passwd = NULL;
+  soap->authrealm = NULL;
+  soap->prolog = NULL;
+#ifdef WITH_OPENSSL
+  if (!ssl_init_done)
+    soap_ssl_init();
+  soap->fsslauth = ssl_auth_init;
+  soap->fsslverify = ssl_verify_callback;
+  soap->bio = NULL;
+  soap->ssl = NULL;
+  soap->ctx = NULL;
+  soap->require_server_auth = 0;
+  soap->require_client_auth = 0;
+  soap->rsa = 0;
+  soap->keyfile = NULL;
+  soap->password = NULL;
+  soap->dhfile = NULL;
+  soap->cafile = NULL;
+  soap->capath = NULL;
+  soap->crlfile = NULL;
+  soap->randfile = NULL;
+  soap->session = NULL;
+#endif
+#ifdef WITH_ZLIB
+  soap->zlib_state = SOAP_ZLIB_NONE;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.zalloc = NULL;
+  soap->d_stream.zfree = NULL;
+  soap->d_stream.opaque = NULL;
+  soap->z_level = 6;
+#endif
+#ifndef WITH_LEAN
+  soap->c14ninclude = NULL;
+  soap->c14nexclude = NULL;
+  soap->cookies = NULL;
+  soap->cookie_domain = NULL;
+  soap->cookie_path = NULL;
+  soap->cookie_max = 32;
+#endif
+#ifdef SOAP_DEBUG
+  soap_init_mht(soap);
+  soap_init_logs(soap);
+  soap_set_recv_logfile(soap, "RECV.log");
+  soap_set_sent_logfile(soap, "SENT.log");
+  soap_set_test_logfile(soap, NULL);
+#endif
+#ifdef WMW_RPM_IO
+  soap->rpmreqid = NULL;
+#endif
+#ifdef PALM
+  palmNetLibOpen();
+#endif
+#ifndef WITH_NOIDREF
+  soap_init_iht(soap);
+  soap_init_pht(soap);
+#endif
+  soap_begin(soap);
+#ifdef SOAP_DEBUG
+  soap_set_test_logfile(soap, "TEST.log");
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init1(struct soap *soap, soap_mode mode)
+{ soap_init2(soap, mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init2(struct soap *soap, soap_mode imode, soap_mode omode)
+{ soap_init(soap);
+  soap_imode(soap, imode);
+  soap_omode(soap, omode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_begin(struct soap *soap)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing\n"));
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+  soap->null = 0;
+  soap->position = 0;
+  soap->encoding = 0;
+  soap->mustUnderstand = 0;
+  soap->mode = 0;
+  soap->ns = 0;
+  soap->part = SOAP_END;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  soap->error = SOAP_OK;
+  soap->peeked = 0;
+  soap->ahead = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+  soap->endpoint[0] = '\0';
+#ifndef WITH_LEANER
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+#endif
+  soap_free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end(struct soap *soap)
+{ register struct soap_clist *cp;
+  if (soap_check_state(soap))
+    return;
+  soap_free(soap);
+  soap_dealloc(soap, NULL);
+  while (soap->clist)
+  { cp = soap->clist->next;
+    SOAP_FREE(soap, soap->clist);
+    soap->clist = cp;
+  }
+  soap_closesock(soap);
+#ifdef SOAP_DEBUG
+  soap_close_logfiles(soap);
+#endif
+#ifdef PALM
+  palmNetLibClose();
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_namespaces(struct soap *soap, struct Namespace *p)
+{ register struct Namespace *ns = soap->local_namespaces;
+  register struct soap_nlist *np, *nq, *nr;
+  register unsigned int level = soap->level;
+  soap->namespaces = p;
+  soap->local_namespaces = NULL;
+  soap_set_local_namespaces(soap);
+  /* reverse the namespace list */
+  np = soap->nlist;
+  soap->nlist = NULL;
+  if (np)
+  { nq = np->next;
+    np->next = NULL;
+    while (nq)
+    { nr = nq->next;
+      nq->next = np;
+      np = nq;
+      nq = nr;
+    }
+  }
+  /* then push on new stack */
+  while (np)
+  { register const char *s;
+    soap->level = np->level; /* preserve element nesting level */
+    s = np->ns;
+    if (!s && np->index >= 0 && ns)
+    { s = ns[np->index].out;
+      if (!s)
+        s = ns[np->index].ns;
+    }
+    if (s && soap_push_namespace(soap, np->id, s))
+      return soap->error;
+    nq = np;
+    np = np->next;
+    SOAP_FREE(soap, nq);
+  }
+  if (ns)
+  { register int i;
+    for (i = 0; ns[i].id; i++)
+    { if (ns[i].out)
+      { SOAP_FREE(soap, ns[i].out);
+        ns[i].out = NULL;
+      }
+    }
+    SOAP_FREE(soap, ns);
+  }
+  soap->level = level; /* restore level */
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_local_namespaces(struct soap *soap)
+{ if (soap->namespaces && !soap->local_namespaces)
+  { register const struct Namespace *ns1;
+    register struct Namespace *ns2;
+    register size_t n = 1;
+    for (ns1 = soap->namespaces; ns1->id; ns1++)
+      n++;
+    n *= sizeof(struct Namespace);
+    ns2 = (struct Namespace*)SOAP_MALLOC(soap, n);
+    if (ns2)
+    { memcpy(ns2, soap->namespaces, n);
+      if (ns2[0].ns)
+      { if (!strcmp(ns2[0].ns, soap_env1))
+          soap->version = 1;
+        else
+          soap->version = 2;
+      }
+      soap->local_namespaces = ns2;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+#ifndef PALM_1
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_strsearch(const char *big, const char *little)
+{ size_t n = strlen(little);
+  const char *s = big;
+  while (s) 
+  { if (!strncmp(s, little, n) && (s[n] == '\0' || s[n] == ' '))
+      return s;
+    s = strchr(s, ' ');
+    if (s)
+      s++;
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_lookup_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np;
+  for (np = soap->nlist; np; np = np->next)
+  { if (!strncmp(np->id, tag, n) && !np->id[n])
+      return np;
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static struct soap_nlist *
+soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized)
+{ register struct soap_nlist *np;
+  size_t n, k;
+  if (soap_strsearch(soap->c14nexclude, id))
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns?ns:""));
+  if (!utilized)
+  { for (np = soap->nlist; np; np = np->next)
+    { if (!strcmp(np->id, id) && (!np->ns || !strcmp(np->ns, ns)))
+        break;
+    }
+    if (np)
+    { if (np->index == 1)
+        utilized = np->index;
+      else
+        return NULL;
+    }
+  }
+  n = strlen(id);
+  if (ns)
+    k = strlen(ns);
+  else
+    k = 0;
+  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k + 1);
+  if (!np)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  np->next = soap->nlist;
+  soap->nlist = np;
+  strcpy(np->id, id);
+  if (ns)
+  { np->ns = np->id + n + 1;
+    strcpy(np->ns, ns);
+  }
+  else
+    np->ns = NULL;
+  np->level = soap->level;
+  np->index = utilized;
+  return np;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_utilize_ns(struct soap *soap, const char *tag, size_t n)
+{ register struct soap_nlist *np = soap_lookup_ns(soap, tag, n);
+  if (np)
+  { if (np->index == 0)
+      soap_push_ns(soap, np->id, np->ns, 1);
+  }
+  else
+  { strncpy(soap->tmpbuf, tag, n);
+    soap->tmpbuf[n] = '\0';
+    soap_push_ns(soap, soap->tmpbuf, NULL, 1);
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_pop_ns(struct soap *soap)
+{ soap_pop_namespace(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element(struct soap *soap, const char *tag, int id, const char *type)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element begin tag='%s' id='%d' type='%s'\n", tag, id, type?type:""));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->soap = soap;
+    elt->next = NULL;
+    elt->prnt = soap->dom;
+    elt->name = soap_strdup(soap, tag);
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->nstr = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->node = NULL;
+    elt->type = 0;
+    elt->head = NULL;
+    elt->tail = NULL;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+  }
+  else
+  {
+#endif
+    soap->level++;
+#ifndef WITH_LEAN
+    if (!soap->ns)
+    { if (!(soap->mode & SOAP_XML_CANONICAL)
+       && soap_send(soap, soap->prolog ? soap->prolog : "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"))
+        return soap->error;
+    }
+    else if (soap->mode & SOAP_XML_INDENT)
+    { if (soap->ns == 1 && soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+      soap->body = 1;
+    }
+#endif
+    if (soap_send_raw(soap, "<", 1)
+     || soap_send(soap, tag))
+      return soap->error;
+#ifdef WITH_DOM
+  }
+#endif
+  if (!soap->ns)
+  { struct Namespace *ns;
+    for (ns = soap->local_namespaces; ns && ns->id; ns++)
+    { if (*ns->id && (ns->out || ns->ns))
+      { sprintf(soap->tmpbuf, "xmlns:%s", ns->id);
+        if (soap_attribute(soap, soap->tmpbuf, ns->out ? ns->out : ns->ns))
+          return soap->error;
+      }
+    }   
+  }
+  soap->ns = 1; /* start with 0 or 2, but should be one to continue */
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { const char *s = strchr(tag, ':');
+    if (s)
+      soap_utilize_ns(soap, tag, s - tag);
+  }
+#endif
+  if (id > 0)
+  { sprintf(soap->tmpbuf, "_%d", id);
+    if (soap_attribute(soap, "id", soap->tmpbuf))
+      return soap->error;
+  }
+  if (type && *type)
+  { if (soap_attribute(soap, "xsi:type", type))
+      return soap->error;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { const char *s = strchr(type, ':');
+      if (s)
+        soap_utilize_ns(soap, type, s - type);
+    }
+#endif
+  }
+  if (soap->null && soap->position > 0)
+  { int i;
+    sprintf(soap->tmpbuf, "[%d", soap->positions[0]);
+    for (i = 1; i < soap->position; i++)
+      sprintf(soap->tmpbuf + strlen(soap->tmpbuf), ",%d", soap->positions[i]);
+    strcat(soap->tmpbuf, "]");
+    if (soap_attribute(soap, "SOAP-ENC:position", soap->tmpbuf))
+      return soap->error;
+  }
+  if (soap->mustUnderstand)
+  { if (soap->actor && *soap->actor)
+    { if (soap_attribute(soap, soap->version == 2 ? "SOAP-ENV:role" : "SOAP-ENV:actor", soap->actor))
+        return soap->error;
+    }
+    if (soap_attribute(soap, "SOAP-ENV:mustUnderstand", soap->version == 2 ? "true" : "1"))
+      return soap->error;
+    soap->mustUnderstand = 0;
+  }
+  if (soap->encoding)
+  { if (soap->encodingStyle && soap->local_namespaces)
+    { if (!*soap->encodingStyle)
+      { if (soap->local_namespaces[1].out)
+          soap->encodingStyle = soap->local_namespaces[1].out;
+        else
+          soap->encodingStyle = soap->local_namespaces[1].ns;
+      }
+      if (soap_attribute(soap, "SOAP-ENV:encodingStyle", soap->encodingStyle))
+        return soap->error;
+    }
+    soap->encoding = 0;
+  }
+  soap->null = 0;
+  soap->position = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_out(struct soap *soap, const char *tag, int id, const char *type)
+{ if (*tag == '-')
+    return SOAP_OK;
+  if (soap_element(soap, tag, id, type))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRRCHR
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_strrchr(const char *s, int t)
+{ register char *r = NULL;
+  while (*s)
+    if (*s++ == t)
+      r = (char*)s - 1;
+  return r;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOL
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_strtol(const char *s, char **t, int b)
+{ register long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { short neg = 0;
+    if (*s == '-')
+    { s++;
+      neg = 1;
+    }
+    else if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 214748364 && (n > 214748364 || c >= '8'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+    if (neg)
+      n = -n;
+  }
+  else /* b == 16 and value is always positive */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x07FFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOUL
+SOAP_FMAC1
+unsigned long
+SOAP_FMAC2
+soap_strtoul(const char *s, char **t, int b)
+{ unsigned long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n >= 429496729 && (n > 429496729 || c >= '6'))
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+  }
+  else /* b == 16 */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x0FFFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_begin_out(struct soap *soap, const char *tag, int id, const char *type, const char *offset)
+{ if (soap_element(soap, tag, id, "SOAP-ENC:Array"))
+    return soap->error;
+  if (soap->version == 2)
+  { const char *s;
+    s = soap_strrchr(type, '[');
+    if ((size_t)(s - type) < sizeof(soap->tmpbuf))
+    { strncpy(soap->tmpbuf, type, s - type);
+      soap->tmpbuf[s - type] = '\0';
+      if (type && *type && (soap_attribute(soap, "SOAP-ENC:itemType", soap->tmpbuf)))
+        return soap->error;
+      if (s && (soap_attribute(soap, "SOAP-ENC:arraySize", s + 1)))
+        return soap->error;
+    }
+  }
+  else
+  { if (offset && (soap_attribute(soap, "SOAP-ENC:offset", offset)))
+      return soap->error;
+    if (type && *type && (soap_attribute(soap, "SOAP-ENC:arrayType", type)))
+      return soap->error;
+  }
+#ifndef WITH_LEAN
+  if (type && *type && (soap->mode & SOAP_XML_CANONICAL))
+  { const char *s = strchr(type, ':');
+    if (s)
+      soap_utilize_ns(soap, type, s - type);
+  }
+#endif
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_start_end_out(struct soap *soap, const char *tag)
+{ register struct soap_attribute *tp;
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att;
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { att = &soap->dom->atts;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible)
+      { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+	if (!*att)
+	  return soap->error = SOAP_EOM;
+	(*att)->next = NULL;
+        (*att)->nstr = NULL;
+        (*att)->name = soap_strdup(soap, tp->name);
+        (*att)->data = soap_strdup(soap, tp->value);
+        (*att)->wide = NULL;
+        (*att)->soap = soap;
+        tp->visible = 0;
+      }
+    }
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { struct soap_nlist *np;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible && tp->name)
+      { const char *s = strchr(tp->name, ':');
+        if (s)
+          soap_utilize_ns(soap, tp->name, s - tp->name);
+      }
+    }
+    for (np = soap->nlist; np; np = np->next)
+    { if (np->index == 1 && np->ns)
+      { sprintf(soap->tmpbuf, "xmlns:%s", np->id);
+        soap_set_attr(soap, soap->tmpbuf, np->ns);
+        np->index = 2;
+      }
+    }
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible)
+    { if (soap_send(soap, " ") || soap_send(soap, tp->name))
+        return soap->error;
+      if (tp->visible == 2 && tp->value)
+        if (soap_send_raw(soap, "=\"", 2)
+	 || soap_string_out(soap, tp->value, 1)
+	 || soap_send_raw(soap, "\"", 1))
+          return soap->error;
+      tp->visible = 0;
+    }
+  }
+  if (tag)
+  { 
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { if (soap_send_raw(soap, ">", 1)
+       || soap_element_end_out(soap, tag))
+        return soap->error;
+    }
+    else
+#endif
+    soap->level--;	/* decrement level just before /> */
+    if (soap_send_raw(soap, "/>", 2))
+      return soap->error;
+    return SOAP_OK;
+  }
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_out(struct soap *soap, const char *tag)
+{ if (*tag == '-')
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element ending tag='%s'\n", tag));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+    soap_pop_ns(soap);
+  if (soap->mode & SOAP_XML_INDENT)
+  { if (!soap->body)
+    { if (soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
+        return soap->error;
+    }
+    soap->body = 0;
+  }
+#endif
+  if (soap_send_raw(soap, "</", 2)
+   || soap_send(soap, tag))
+    return soap->error;
+  soap->level--;	/* decrement level just before > */
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_ref(struct soap *soap, const char *tag, int id, int href)
+{ register int n = 0;
+  if (soap->version == 2)
+    n = 1;
+  sprintf(soap->href, "#_%d", href);
+  return soap_element_href(soap, tag, id, "href" + n, soap->href + n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_href(struct soap *soap, const char *tag, int id, const char *ref, const char *val)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element '%s' reference %s='%s'\n", tag, ref, val));
+  if (soap_element(soap, tag, id, NULL)
+   || soap_attribute(soap, ref, val)
+   || soap_element_start_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_null(struct soap *soap, const char *tag, int id, const char *type)
+{ struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (tp->visible)
+      break;
+  if (tp || (soap->version == 2 && soap->position > 0) || id > 0 || (soap->mode & SOAP_XML_NIL))
+  { if (soap_element(soap, tag, id, type))
+      return soap->error;
+    if (soap->part != SOAP_IN_HEADER && soap->encodingStyle)
+      if (soap_attribute(soap, "xsi:nil", "true"))
+        return soap->error;
+    return soap_element_start_end_out(soap, tag);
+  }
+  soap->null = 1;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_id(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, int n, const char *type, int t) 
+{ if (!p || (a && !a->__ptr))
+  { soap_element_null(soap, tag, id, type);
+    return -1;
+  }
+#ifndef WITH_NOIDREF
+  if (soap->mode & SOAP_XML_TREE)
+    return 0;
+  if (id < 0)
+  { struct soap_plist *pp;
+    if (a)
+      id = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+    else
+      id = soap_pointer_lookup(soap, p, t, &pp);
+    if (id)
+    { if (soap_is_embedded(soap, pp))
+      { soap_element_ref(soap, tag, 0, id);
+        return -1;
+      }
+      if (soap_is_single(soap, pp))
+        return 0;
+      soap_set_embedded(soap, pp);
+    }
+  }
+  return id;
+#else
+  return 0;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_result(struct soap *soap, const char *tag)
+{ if (soap->version == 2 && soap->encodingStyle)
+    if (soap_element(soap, "SOAP-RPC:result", 0, NULL)
+     || soap_attribute(soap, "xmlns:SOAP-RPC", soap_rpc)
+     || soap_element_start_end_out(soap, NULL)
+     || soap_string_out(soap, tag, 0)
+     || soap_element_end_out(soap, "SOAP-RPC:result"))
+      return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attribute(struct soap *soap, const char *name, const char *value)
+{ 
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+    a->next = soap->dom->atts;
+    a->nstr = NULL;
+    a->name = soap_strdup(soap, name);
+    a->data = soap_strdup(soap, value);
+    a->wide = NULL;
+    a->soap = soap;
+    soap->dom->atts = a;
+    return SOAP_OK;
+  }
+#endif
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { /* TODO: consider using this code to handle default namespace
+    if (!strncmp(name, "xmlns", 5) && (name[5] == ':' || name[5] == '\0'))
+    { if (name[5] == ':')
+        soap_push_ns(soap, name + 6, value, 0);
+      else
+        soap_push_ns(soap, "", value, 0);
+    }
+    */
+    if (!strncmp(name, "xmlns:", 6))
+      soap_push_ns(soap, name + 6, value, 0);
+    else if (soap_set_attr(soap, name, value))
+      return soap->error;
+  }
+  else
+#endif
+  { if (soap_send(soap, " ") || soap_send(soap, name))
+      return soap->error;
+    if (value)
+      if (soap_send_raw(soap, "=\"", 2)
+       || soap_string_out(soap, value, 1)
+       || soap_send_raw(soap, "\"", 1))
+        return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_in(struct soap *soap, const char *tag, int nillable)
+{ if (!soap_peek_element(soap))
+  { if (soap->other)
+      return soap->error = SOAP_TAG_MISMATCH;
+    if (tag && *tag == '-')
+      return SOAP_OK;
+    if (!(soap->error = soap_match_tag(soap, soap->tag, tag)))
+    { soap->peeked = 0;
+      if (soap->body)
+        soap->level++;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"" ));
+      if (!nillable && soap->null && (soap->mode & SOAP_XML_STRICT))
+        return soap->error = SOAP_NULL;
+    }
+  }
+  else if (soap->error == SOAP_NO_TAG && tag && *tag == '-')
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_in(struct soap *soap, const char *tag)  
+{ register soap_wchar c;
+  register char *s;
+  register const char *t;
+  register int n = 0;
+  if (tag && *tag == '-')
+    return SOAP_OK;
+  soap->level--;
+  soap_pop_namespace(soap);
+#ifdef WITH_DOM
+  /* this whitespace or mixed content is not insignificant for DOM */
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (!soap->peeked && !soap_string_in(soap, 3, -1, -1))
+      return soap->error;
+    if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  if (soap->peeked)
+  { if (soap->error == SOAP_NO_TAG)
+      soap->error = SOAP_OK;
+    if (*soap->tag)
+      n++;
+    soap->peeked = 0;
+  }
+  do
+  { while (((c = soap_get(soap)) != SOAP_TT))
+    { if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      if (c == SOAP_LT)
+        n++;
+      else if (c == '/')
+      { c = soap_get(soap);
+        if (c == SOAP_GT)
+	  n--;
+        else
+	  soap_unget(soap, c);
+      }
+    }
+  } while (n--);
+  s = soap->tag;
+  while (soap_notblank(c = soap_get(soap)))
+    *s++ = (char)c;
+  *s = '\0';
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  while (soap_blank(c))
+    c = soap_get(soap);
+  if (c != SOAP_GT)
+    return soap->error = SOAP_SYNTAX_ERROR;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:""));
+  if (!tag || !*tag)
+    return SOAP_OK;
+  if ((s = strchr(soap->tag, ':')))
+    s++;
+  else
+    s = soap->tag;
+  if ((t = strchr(tag, ':')))
+    t++;
+  else
+    t = tag;
+  if (!SOAP_STRCMP(s, t))
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element tag name does not match\n"));
+  return soap->error = SOAP_SYNTAX_ERROR;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_attr_value(struct soap *soap, const char *name, int flag)
+{ register struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (!soap_match_tag(soap, tp->name, name))
+      break;
+  if (tp && tp->visible == 2)
+  { if (flag == 2 && (soap->mode & SOAP_XML_STRICT))
+      soap->error = SOAP_PROHIBITED;
+    else
+      return tp->value;
+  }
+  else if (flag == 1 && (soap->mode & SOAP_XML_STRICT))
+    soap->error = SOAP_REQUIRED;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_attr(struct soap *soap, const char *name, const char *value)
+{ register struct soap_attribute *tp;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set attribute %s='%s'\n", name, value?value:""));
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (!strcmp(tp->name, name))
+      break;
+  }
+  if (!tp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute %s\n", name));
+    if (!(tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(name))))
+      return soap->error = SOAP_EOM;
+    tp->ns = NULL;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { struct soap_attribute **tpp = &soap->attributes;
+      const char *s = strchr(name, ':');
+      if (!strncmp(name, "xmlns", 5))
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) || strcmp((*tpp)->name + 5, name + 5) > 0)
+            break;
+      }
+      else if (!s)
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) && ((*tpp)->ns || strcmp((*tpp)->name, name) > 0))
+            break;
+      }
+      else
+      { int k;
+        for (; *tpp; tpp = &(*tpp)->next)
+	{ if (!strncmp((*tpp)->name, "xmlns:", 6) && !strncmp((*tpp)->name + 6, name, s - name) && !(*tpp)->name[6 + s - name])
+	  { if (!tp->ns)
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Canonicalization: prefix %s=%p(%s)\n", name, (*tpp)->ns, (*tpp)->ns));
+	      tp->ns = (*tpp)->ns;
+	    }
+	  }
+          else if (strncmp((*tpp)->name, "xmlns", 5) && (*tpp)->ns && tp->ns && ((k = strcmp((*tpp)->ns, tp->ns)) > 0 || (!k && strcmp((*tpp)->name, name) > 0)))
+            break;
+        }
+      }
+      tp->next = *tpp;
+      *tpp = tp;
+    }
+    else
+#endif
+    { tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    strcpy(tp->name, name);
+    tp->value = NULL;
+  }
+  else if (tp->visible)
+  { return SOAP_OK;
+  }
+  else if (value && tp->value && tp->size <= strlen(value))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute value of %s (free %p)\n", name, tp->value));
+    SOAP_FREE(soap, tp->value);
+    tp->value = NULL;
+    tp->ns = NULL;
+  }
+  if (value)
+  { if (!tp->value)
+    { tp->size = strlen(value) + 1;
+      if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+        return soap->error = SOAP_EOM;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute value of %s (%p)\n", tp->name, tp->value));
+    }
+    strcpy(tp->value, value);
+    if (!strncmp(tp->name, "xmlns:", 6))
+      tp->ns = tp->value;
+    tp->visible = 2;
+#ifndef WITH_LEAN
+    if (!strcmp(name, "wsu:Id"))
+    { soap->part = SOAP_BEGIN_SECURITY;
+      strncpy(soap->id, value, sizeof(soap->id));
+      soap->id[sizeof(soap->id)-1] = '\0';
+    }
+#endif
+  }
+  else
+    tp->visible = 1;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_attr(struct soap *soap)
+{ register struct soap_attribute *tp;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_CANONICAL))
+  { while (soap->attributes)
+    { tp = soap->attributes->next;
+      SOAP_FREE(soap, soap->attributes->value);
+      SOAP_FREE(soap, soap->attributes);
+      soap->attributes = tp;
+    }
+  }
+  else
+#endif
+  { for (tp = soap->attributes; tp; tp = tp->next)
+      tp->visible = 0;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d)
+{ register size_t i;
+  for (i = 0; i < n; i++)
+  { register soap_wchar c = soap_get(soap);
+    switch (c)
+    {
+    case SOAP_TT:
+      *s++ = '<';
+      soap_unget(soap, '/');
+      break;
+    case SOAP_LT:
+      *s++ = '<';
+      break;
+    case SOAP_GT:
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '>';
+      break;
+    case SOAP_QT:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '"';
+      break;
+    case SOAP_AP:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '\'';
+      break;
+    case '\t':
+    case '\n':
+    case '\r':
+    case ' ':
+    case '/':
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+    default:
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+  }
+  return soap->error = SOAP_EOM;
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_store_lab(struct soap *soap, const char *s, size_t n)
+{ soap->labidx = 0;
+  return soap_append_lab(soap, s, n);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_append_lab(struct soap *soap, const char *s, size_t n)
+{ if (soap->labidx + n >= soap->lablen)
+  { register char *t = soap->labbuf;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enlarging look-aside buffer to append data, old size=%lu", (unsigned long)soap->lablen));
+    if (soap->lablen == 0)
+      soap->lablen = SOAP_LABLEN;
+    while (soap->labidx + n >= soap->lablen)
+      soap->lablen <<= 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, ", new size=%lu\n", (unsigned long)soap->lablen));
+    soap->labbuf = (char*)SOAP_MALLOC(soap, soap->lablen);
+    if (!soap->labbuf)
+    { if (t)
+        SOAP_FREE(soap, t);
+      return soap->error = SOAP_EOM;
+    }
+    if (t)
+    { memcpy(soap->labbuf, t, soap->labidx);
+      SOAP_FREE(soap, t);
+    }
+  }
+  if (s)
+  { memcpy(soap->labbuf + soap->labidx, s, n);
+    soap->labidx += n;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_peek_element(struct soap *soap)
+{
+#ifdef WITH_DOM
+  register struct soap_dom_attribute **att = NULL;
+  register char *lead = NULL;
+#endif
+  register struct soap_attribute *tp;
+  const char *t;
+  register char *s;
+  register soap_wchar c;
+  register int i;
+  if (soap->peeked)
+  { if (!*soap->tag)
+      return soap->error = SOAP_NO_TAG;
+    return SOAP_OK;
+  }
+  soap->peeked = 1;
+  c = soap_getutf8(soap);
+#ifdef WITH_DOM
+  /* whitespace leading to start tag is not insignificant for DOM */
+  if (soap_blank(c))
+  { soap->labidx = 0;
+    do
+    { if (soap_append_lab(soap, NULL, 0))
+        return SOAP_EOM;
+      s = soap->labbuf + soap->labidx;
+      i = soap->lablen - soap->labidx;
+      soap->labidx = soap->lablen;
+      while (soap_blank(c) && i--)
+      { *s++ = c;
+        c = soap_getutf8(soap);
+      }
+    }
+    while (soap_blank(c));
+    *s = '\0';
+    lead = soap_strdup(soap, soap->labbuf);
+  }
+#else
+  while (soap_blank(c))
+    c = soap_getutf8(soap);
+#endif
+  if (c != SOAP_LT)
+  { *soap->tag = '\0';
+    if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, c);
+#ifdef WITH_DOM
+    /* whitespace leading to end tag is not insignificant for DOM */
+    if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+      soap->dom->tail = soap_strdup(soap, lead);
+#endif
+    return soap->error = SOAP_NO_TAG;
+  }
+  s = soap->tag;
+  do c = soap_get1(soap);
+  while (soap_blank(c));
+  i = sizeof(soap->tag);
+  while (c != '>' && c != '/' && soap_notblank(c))
+  { if (--i > 0)
+      *s++ = (char)c;
+    c = soap_get1(soap);
+  }
+  while (soap_blank(c))
+    c = soap_get1(soap);
+  *s = '\0';
+  soap->id[0] = '\0';
+  soap->href[0] = '\0';
+  soap->type[0] = '\0';
+  soap->arrayType[0] = '\0';
+  soap->arraySize[0] = '\0';
+  soap->arrayOffset[0] = '\0';
+  soap->other = 0;
+  soap->root = -1;
+  soap->position = 0;
+  soap->null = 0;
+  soap->mustUnderstand = 0;
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *elt;
+    elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    if (!elt)
+      return soap->error = SOAP_EOM;
+    elt->next = NULL;
+    elt->nstr = NULL;
+    elt->name = soap_strdup(soap, soap->tag);
+    elt->prnt = soap->dom;
+    elt->elts = NULL;
+    elt->atts = NULL;
+    elt->data = NULL;
+    elt->wide = NULL;
+    elt->type = 0;
+    elt->node = NULL;
+    elt->head = lead;
+    elt->tail = NULL;
+    elt->soap = soap;
+    if (soap->dom)
+    { struct soap_dom_element *p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = elt;
+      }
+      else
+        soap->dom->elts = elt;
+    }
+    soap->dom = elt;
+    att = &elt->atts;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+    tp->visible = 0;
+  while ((int)c != EOF && c != '>' && c != '/')
+  { s = soap->tmpbuf;
+    i = sizeof(soap->tmpbuf);
+    while (c != '=' && c != '>' && c != '/' && soap_notblank(c))
+    { if (--i > 0)
+        *s++ = (char)c;
+      c = soap_get1(soap);
+    }
+    *s = '\0';
+    if (i == sizeof(soap->tmpbuf))
+      return soap->error = SOAP_SYNTAX_ERROR;
+#ifdef WITH_DOM
+    /* add attribute name to dom */
+    if (att)
+    { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+       if (!*att)
+         return soap->error = SOAP_EOM;
+       (*att)->next = NULL;
+       (*att)->nstr = NULL;
+       (*att)->name = soap_strdup(soap, soap->tmpbuf);
+       (*att)->data = NULL;
+       (*att)->wide = NULL;
+       (*att)->soap = soap;
+    }
+#endif
+    if (!strncmp(soap->tmpbuf, "xmlns", 5))
+    { if (soap->tmpbuf[5] == ':')
+      { soap->tmpbuf[5] = '\0';
+        t = soap->tmpbuf + 6;
+      }
+      else if (soap->tmpbuf[5])
+        t = NULL;
+      else
+        t = SOAP_STR_EOS;
+    }
+    else
+      t = NULL;
+    for (tp = soap->attributes; tp; tp = tp->next)
+    { if (!SOAP_STRCMP(tp->name, soap->tmpbuf))
+        break;
+    }
+    if (!tp)
+    { tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(soap->tmpbuf));
+      if (!tp)
+        return soap->error = SOAP_EOM;
+      strcpy(tp->name, soap->tmpbuf);
+      tp->value = NULL;
+      tp->size = 0;
+      tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    while (soap_blank(c))
+      c = soap_get1(soap);
+    if (c == '=')
+    { do c = soap_getutf8(soap);
+      while (soap_blank(c));
+      if (c != SOAP_QT && c != SOAP_AP)
+      { soap_unget(soap, c);
+        c = ' '; /* blank delimiter */
+      }
+      if (soap_getattrval(soap, tp->value, tp->size, c))
+      {
+#ifdef WITH_FAST
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+	if (soap_store_lab(soap, tp->value, tp->size))
+	  return soap->error;
+	if (tp->value)
+	  SOAP_FREE(soap, tp->value);
+	for (;;)
+	{ if (soap_getattrval(soap, soap->labbuf + soap->labidx, soap->lablen - soap->labidx, c))
+	  { if (soap->error != SOAP_EOM)
+	      return soap->error;
+            soap->error = SOAP_OK;
+	    soap->labidx = soap->lablen;
+	    if (soap_append_lab(soap, NULL, 0))
+	      return soap->error;
+	  }
+	  else
+	    break;
+	}
+	if (soap->labidx)
+          tp->size = soap->lablen;
+	else
+	{ tp->size = strlen(soap->labbuf) + 1;
+          if (tp->size < SOAP_LABLEN)
+	    tp->size = SOAP_LABLEN;
+        }
+	if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size)))
+	  return soap->error = SOAP_EOM;
+        strcpy(tp->value, soap->labbuf);
+#else
+	size_t n;
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+        if (soap_new_block(soap))
+          return soap->error;
+        for (;;)
+        { if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+            return soap->error;
+          if (soap_getattrval(soap, s, SOAP_BLKLEN, c))
+          { if (soap->error != SOAP_EOM)
+              return soap->error;
+            soap->error = SOAP_OK;
+          }
+          else
+            break;
+        }
+	n = tp->size + soap->blist->size;
+        if (!(s = (char*)SOAP_MALLOC(soap, n)))
+          return soap->error = SOAP_EOM;
+        if (tp->value)
+        { memcpy(s, tp->value, tp->size);
+          SOAP_FREE(soap, tp->value);
+        }
+        soap_save_block(soap, s + tp->size, 0);
+        tp->value = s;
+        tp->size = n;
+#endif
+      }
+      do c = soap_get1(soap);
+      while (soap_blank(c));
+      tp->visible = 2; /* seen this attribute w/ value */
+#ifdef WITH_DOM
+      if (att)
+        (*att)->data = soap_strdup(soap, tp->value);
+#endif
+    }
+    else
+      tp->visible = 1; /* seen this attribute w/o value */
+#ifdef WITH_DOM
+    if (att)
+      att = &(*att)->next;
+#endif
+    if (t && tp->value)
+    { if (soap_push_namespace(soap, t, tp->value))
+        return soap->error;
+      tp->visible = 0;
+    }
+  }
+#ifdef WITH_DOM
+  if (att)
+  { soap->dom->nstr = soap_current_namespace(soap, soap->tag);
+    for (att = &soap->dom->atts; *att; att = &(*att)->next)
+      (*att)->nstr = soap_current_namespace(soap, (*att)->name);
+  }
+#endif
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  if (!(soap->body = (c != '/')))
+    do c = soap_get1(soap);
+    while (soap_blank(c));
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { if (!soap->body && soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+  }
+#endif
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible && tp->value)
+    { if (!strcmp(tp->name, "id"))
+      { *soap->id = '#';
+        strncpy(soap->id + 1, tp->value, sizeof(soap->id) - 2);
+        soap->id[sizeof(soap->id)-1] = '\0';
+      }
+      else if (!strcmp(tp->name, "href"))
+      { strncpy(soap->href, tp->value, sizeof(soap->href) - 1);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if ((soap->version == 2 || (soap->mode & SOAP_XML_GRAPH)) && !strcmp(tp->name, "ref"))
+      { *soap->href = '#';
+        strncpy(soap->href + 1, tp->value, sizeof(soap->href) - 2);
+        soap->href[sizeof(soap->href)-1] = '\0';
+      }
+      else if (!soap_match_tag(soap, tp->name, "xsi:type"))
+      { strncpy(soap->type, tp->value, sizeof(soap->type) - 1);
+        soap->type[sizeof(soap->type)-1] = '\0';
+      }
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arrayType"))
+      { s = soap_strrchr(tp->value, '[');
+        if (s && (size_t)(s - tp->value) < sizeof(soap->arrayType))
+        { strncpy(soap->arrayType, tp->value, s - tp->value);
+          soap->arrayType[s - tp->value] = '\0';
+          strncpy(soap->arraySize, s, sizeof(soap->arraySize) - 1);
+        }
+        else
+          strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+        soap->arraySize[sizeof(soap->arrayType)-1] = '\0';
+        soap->arrayType[sizeof(soap->arrayType)-1] = '\0';
+      }
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:itemType"))
+        strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arraySize"))
+        strncpy(soap->arraySize, tp->value, sizeof(soap->arraySize) - 1);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:offset"))
+        strncpy(soap->arrayOffset, tp->value, sizeof(soap->arrayOffset));
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:position"))
+        soap->position = soap_getposition(tp->value, soap->positions);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:root"))
+        soap->root = ((!strcmp(tp->value, "1") || !strcmp(tp->value, "true")));
+      else if ((soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENV:actor"))
+            || (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENV:role")))
+      { if ((!soap->actor || strcmp(soap->actor, tp->value))
+         && strcmp(tp->value, "http://schemas.xmlsoap.org/soap/actor/next")
+         && strcmp(tp->value, "http://www.w3.org/2003/05/soap-envelope/role/next"))
+          soap->other = 1;
+      }
+      else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:mustUnderstand")
+            && (!strcmp(tp->value, "1") || !strcmp(tp->value, "true")))
+        soap->mustUnderstand = 1;
+      else if ((!soap_match_tag(soap, tp->name, "xsi:null")
+             || !soap_match_tag(soap, tp->name, "xsi:nil"))
+            && (!strcmp(tp->value, "1")
+             || !strcmp(tp->value, "true")))
+        soap->null = 1;
+    }
+  }
+  return soap->error = SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_retry(struct soap *soap)
+{ soap->error = SOAP_OK;
+  soap_revert(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_revert(struct soap *soap)
+{ if (!soap->peeked)
+  { soap->peeked = 1;
+    if (soap->body)
+      soap->level--;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reverting last element (level=%u)\n", soap->level));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_string_out(struct soap *soap, const char *s, int flag)
+{ register const char *t;
+  register soap_wchar c;
+  register soap_wchar mask = 0xFFFFFF80UL;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_strdup(soap, s);
+    return SOAP_OK;
+  }
+#endif
+  if (soap->mode & SOAP_C_UTFSTRING)
+    mask = 0;
+  t = s;
+  while ((c = *t++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#x9;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xA;", 5))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case 13:
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xD;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '&':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&amp;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '<':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&lt;", 4))
+        return soap->error;
+      s = t;
+      break;
+    case '>':
+      if (!flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&gt;", 4))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    case '"':
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&quot;", 6))
+	  return soap->error;
+        s = t;
+      }
+      break;
+    default:
+#ifndef WITH_LEANER
+#ifdef HAVE_MBTOWC
+      if (soap->mode & SOAP_C_MBSTRING)
+      { wchar_t wc;
+        register int m = mbtowc(&wc, t - 1, MB_CUR_MAX);
+        if (m > 0 && wc != c)
+        { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, wc))
+            return soap->error;
+	  s = t += m - 1;
+	  continue;
+        }
+      }
+#endif
+#endif
+      if (c & mask)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, (unsigned char)c))
+          return soap->error;
+        s = t;
+      }
+    }
+  }
+  return soap_send_raw(soap, s, t - s - 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_string_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ register char *s;
+  char *t = NULL;
+  register size_t i;
+  register long l = 0;
+  register int n = 0;
+  register int m = 0;
+  register soap_wchar c;
+#if !defined(WITH_LEANER) && defined(HAVE_WCTOMB)
+  char buf[MB_LEN_MAX > 8 ? MB_LEN_MAX : 8];
+#else
+  char buf[8];
+#endif
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+#ifndef WITH_LEAN
+      t = soap->tmpbuf;
+      t[0] = '<';
+      strncpy(t + 1, soap->tag, sizeof(soap->tmpbuf) - 1);
+      strncat(t, ">", sizeof(soap->tmpbuf));
+      m = strlen(soap->tag) + 2;
+#endif
+    }
+  }
+#ifdef WITH_CDATA
+  if (!flag)
+  { register int state = 0;
+#ifdef WITH_FAST
+    soap->labidx = 0;			/* use look-aside buffer */
+#else
+    if (soap_new_block(soap))
+      return NULL;
+#endif
+    for (;;)
+    { 
+#ifdef WITH_FAST
+      register size_t k;
+      if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+        return NULL;
+      s = soap->labbuf + soap->labidx;	/* space to populate */
+      k = soap->lablen - soap->labidx;	/* number of bytes available */
+      soap->labidx = soap->lablen;	/* claim this space */
+#else
+      register size_t k = SOAP_BLKLEN;
+      if (!(s = (char*)soap_push_block(soap, k)))
+        return NULL;
+#endif
+      for (i = 0; i < k; i++)
+      { if (m > 0)
+        { *s++ = *t++;	/* copy multibyte characters */
+	  m--;
+          continue;
+        }
+        c = soap_getchar(soap);
+	if ((int)c == EOF)
+          goto end;
+        if (c >= 0x80 && !(soap->mode & SOAP_ENC_LATIN))
+        { soap_unget(soap, c);
+	  c = soap_getutf8(soap);
+	  if (soap->mode & SOAP_C_UTFSTRING)
+          { if ((c & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+            { c &= 0x7FFFFFFF;
+              t = buf;
+              if (c < 0x0800)
+                *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+              else
+              { if (c < 0x010000)
+                  *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+                else
+                { if (c < 0x200000)
+                    *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+                  else
+                  { if (c < 0x04000000)
+                      *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                    else
+                    { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                      *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                    }
+                    *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+                  }     
+                  *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+              }
+              *t++ = (char)(0x80 | (c & 0x3F));
+	      m = (int)(t - buf) - 1;
+              t = buf;
+              *s++ = *t++;
+              continue;
+	    }
+          }
+        }
+	switch (state)
+        { case 1:
+            if (c == ']')
+	      state = 4;
+	    *s++ = c;
+	    continue;
+	  case 2:
+	    if (c == '-')
+              state = 6;
+	    *s++ = c;
+	    continue;
+	  case 3:
+	    if (c == '?')
+	      state = 8;
+	    *s++ = c;
+	    continue;
+          /* CDATA */
+	  case 4:
+	    if (c == ']')
+              state = 5;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+	  case 5:
+	    if (c == '>')
+	      state = 0;
+	    else
+	      state = 1;
+	    *s++ = c;
+	    continue;
+          /* comment */
+          case 6:
+            if (c == '-')
+	      state = 7;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          case 7:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 2;
+	    *s++ = c;
+	    continue;
+          /* PI */
+	  case 8:
+            if (c == '>')
+	      state = 0;
+	    else
+	      state = 3;
+	    *s++ = c;
+	    continue;
+        }
+        switch (c)
+        {
+        case '/':
+          if (n > 0)
+          { c = soap_getchar(soap);
+            if (c == '>')
+              n--;
+            soap_unget(soap, c);
+          }
+          *s++ = '/';
+          break;
+        case '<':
+	  c = soap_getchar(soap);
+	  if (c == '/')
+	  { if (n == 0)
+	    { c = SOAP_TT;
+	      goto end;
+	    }
+	    n--;
+	  }
+	  else if (c == '!')
+	  { c = soap_getchar(soap);
+	    if (c == '[')
+            { do c = soap_getchar(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                 goto end;
+	      t = (char*)"![CDATA[";
+	      m = 8;
+	      state = 1;
+	    }
+            else if (c == '-')
+	    { if ((c = soap_getchar(soap)) == '-')
+	        state = 2;
+	      t = (char*)"!-";
+	      m = 2;
+	      soap_unget(soap, c);
+	    }
+	    else
+	    { t = (char*)"!";
+	      m = 1;
+	      soap_unget(soap, c);
+	    }
+	    *s++ = '<';
+	    break;
+	  }
+	  else if (c == '?')
+	    state = 3;
+	  else
+	    n++;
+          soap_unget(soap, c);
+          *s++ = '<';
+          break;
+        case '>':
+          *s++ = '>';
+          break;
+        case '"':
+          *s++ = '"';
+          break;
+        default:
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+          if (soap->mode & SOAP_C_MBSTRING)
+          { m = wctomb(buf, c & 0x7FFFFFFF);
+            if (m >= 1 && m <= (int)MB_CUR_MAX)
+            { t = buf;
+              *s++ = *t++;
+              m--;
+            }
+            else
+            { *s++ = SOAP_UNKNOWN_CHAR;
+	      m = 0;
+	    }
+          }
+          else
+#endif
+#endif
+            *s++ = (char)(c & 0xFF);
+        }
+	l++;
+        if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+        { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+          soap->error = SOAP_LENGTH;
+          return NULL;
+        }
+      }
+    }
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;			/* use look-aside buffer */
+#else
+  if (soap_new_block(soap))
+    return NULL;
+#endif
+  for (;;)
+  { 
+#ifdef WITH_FAST
+    register size_t k;
+    if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
+      return NULL;
+    s = soap->labbuf + soap->labidx;	/* space to populate */
+    k = soap->lablen - soap->labidx;	/* number of bytes available */
+    soap->labidx = soap->lablen;	/* claim this space */
+#else
+    register size_t k = SOAP_BLKLEN;
+    if (!(s = (char*)soap_push_block(soap, k)))
+      return NULL;
+#endif
+    for (i = 0; i < k; i++)
+    { if (m > 0)
+      { *s++ = *t++;	/* copy multibyte characters */
+        m--;
+        continue;
+      }
+      if (soap->mode & SOAP_C_UTFSTRING)
+      { if (((c = soap_get(soap)) & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP)
+        { c &= 0x7FFFFFFF;
+          t = buf;
+          if (c < 0x0800)
+            *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+          else
+          { if (c < 0x010000)
+              *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+            else
+            { if (c < 0x200000)
+                *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+              else
+              { if (c < 0x04000000)
+                  *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                else
+                { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                  *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+              }     
+              *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+            }
+            *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+          }
+          *t++ = (char)(0x80 | (c & 0x3F));
+	  m = (int)(t - buf) - 1;
+          t = buf;
+          *s++ = *t++;
+          continue;
+        }
+      }
+      else
+        c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        t = (char*)"/";
+	m = 1;
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_get(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<' | 0x80000000:
+        if (flag)
+          *s++ = '<';
+        else
+        { *s++ = '&';
+          t = (char*)"lt;";
+	  m = 3;
+        }
+        break;
+      case '>' | 0x80000000:
+        if (flag)
+          *s++ = '>';
+        else
+        { *s++ = '&';
+          t = (char*)"gt;";
+	  m = 3;
+        }
+        break;
+      case '&' | 0x80000000:
+        if (flag)
+          *s++ = '&';
+        else
+        { *s++ = '&';
+          t = (char*)"amp;";
+	  m = 4;
+        }
+        break;
+      case '"' | 0x80000000:
+        if (flag)
+          *s++ = '"';
+        else
+        { *s++ = '&';
+          t = (char*)"quot;";
+	  m = 5;
+        }
+        break;
+      case '\'' | 0x80000000:
+        if (flag)
+          *s++ = '\'';
+        else
+        { *s++ = '&';
+          t = (char*)"apos;";
+	  m = 5;
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+#ifndef WITH_LEANER
+#ifdef HAVE_WCTOMB
+        if (soap->mode & SOAP_C_MBSTRING)
+        { m = wctomb(buf, c & 0x7FFFFFFF);
+          if (m >= 1 && m <= (int)MB_CUR_MAX)
+          { t = buf;
+            *s++ = *t++;
+            m--;
+          }
+          else
+          { *s++ = SOAP_UNKNOWN_CHAR;
+	    m = 0;
+	  }
+        }
+        else
+#endif
+#endif
+          *s++ = (char)(c & 0xFF);
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+#ifdef WITH_FAST
+  t = soap_strdup(soap, soap->labbuf);
+#else
+  soap_size_block(soap, i+1);
+  t = soap_save_block(soap, NULL, 0);
+#endif
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (flag == 3)
+      soap->dom->tail = t;
+    else
+      soap->dom->data = t;
+  }
+#endif
+  if (flag == 2)
+    if (soap_s2QName(soap, t, &t))
+      return NULL;
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_wstring_out(struct soap *soap, const wchar_t *s, int flag)
+{ const char *t;
+  char tmp;
+  register soap_wchar c;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { wchar_t *r = (wchar_t*)s;
+    int n = 1;
+    while (*r++)
+      n++;
+    soap->dom->wide = r = (wchar_t*)soap_malloc(soap, n * sizeof(wchar_t));
+    while (n--)
+      *r++ = *s++;
+    return SOAP_OK;
+  }
+#endif
+  while ((c = *s++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+        t = "&#x9;";
+      else
+        t = "\t";
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+        t = "&#xA;";
+      else
+        t = "\n";
+      break;
+    case 13:
+      t = "&#xD;";
+      break;
+    case '&':
+      t = "&amp;";
+      break;
+    case '<':
+      t = "&lt;";
+      break;
+    case '>':
+      if (flag)
+        t = ">";
+      else
+	t = "&gt;";
+      break;
+    case '"':
+      if (flag)
+        t = "&quot;";
+      else
+        t = "\"";
+      break;
+    default:
+      if (c > 0 && c < 0x80)
+      { tmp = (char)c;
+        if (soap_send_raw(soap, &tmp, 1))
+          return soap->error;
+      }
+      else if (soap_pututf8(soap, (unsigned long)c))
+        return soap->error;
+      continue;
+    }
+    if (soap_send(soap, t))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t *
+SOAP_FMAC2
+soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen)
+{ wchar_t *s;
+  register int i, n = 0;
+  register long l = 0;
+  register soap_wchar c;
+  const char *t = NULL;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading wide string content\n"));
+  if (soap->peeked)
+  { if (!soap->body)
+      return NULL;
+    if (*soap->tag)
+    { n = 1;
+      soap->peeked = 0;
+    }
+  }
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { if (!(s = (wchar_t*)soap_push_block(soap, sizeof(wchar_t)*SOAP_BLKLEN)))
+      return NULL;
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { if (t)
+      { *s++ = (wchar_t)*t++;
+        if (!*t)
+          t = NULL;
+        continue;
+      }
+      c = soap_getutf8(soap);
+      switch (c)
+      {
+      case SOAP_TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        soap_unget(soap, '/');
+        break;
+      case SOAP_LT:
+        n++;
+        *s++ = '<';
+        break;
+      case SOAP_GT:
+        *s++ = '>';
+        break;
+      case SOAP_QT:
+        *s++ = '"';
+        break;
+      case SOAP_AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_getutf8(soap);
+          if (c == SOAP_GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<':
+        if (flag)
+          *s++ = (soap_wchar)'<';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "lt;";
+        }
+        break;
+      case '>':
+        if (flag)
+          *s++ = (soap_wchar)'>';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "gt;";
+        }
+        break;
+      case '"':
+        if (flag)
+          *s++ = (soap_wchar)'"';
+        else
+        { *s++ = (soap_wchar)'&';
+          t = "quot;";
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+        *s++ = (wchar_t)c & 0x7FFFFFFF;
+      }
+      l++;
+      if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
+        soap->error = SOAP_LENGTH;
+        return NULL;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+  soap_size_block(soap, sizeof(wchar_t) * (i + 1));
+  if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
+    soap->error = SOAP_LENGTH;
+    return NULL;
+  }
+  s = (wchar_t*)soap_save_block(soap, NULL, 0);
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->wide = s;
+#endif
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_int2s(struct soap *soap, int n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outint(struct soap *soap, const char *tag, int id, const int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2int(struct soap *soap, const char *s, int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (int)soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int *
+SOAP_FMAC2
+soap_inint(struct soap *soap, const char *tag, int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (int*)soap_id_enter(soap, soap->id, p, t, sizeof(int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(int), 0, NULL);
+  else if (p)
+  { if (soap_s2int(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_long2s(struct soap *soap, long n)
+{ sprintf(soap->tmpbuf, "%ld", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outlong(struct soap *soap, const char *tag, int id, const long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2long(struct soap *soap, const char *s, long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtol(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+long *
+SOAP_FMAC2
+soap_inlong(struct soap *soap, const char *tag, long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (long*)soap_id_enter(soap, soap->id, p, t, sizeof(long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(long), 0, NULL);
+  else if (p)
+  { if (soap_s2long(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_LONG642s(struct soap *soap, LONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_LONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outLONG64(struct soap *soap, const char *tag, int id, const LONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_LONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2LONG64(struct soap *soap, const char *s, LONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOLL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoll(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_LONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+LONG64 *
+SOAP_FMAC2
+soap_inLONG64(struct soap *soap, const char *tag, LONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (LONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(LONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (LONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(LONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2LONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_byte2s(struct soap *soap, char n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outbyte(struct soap *soap, const char *tag, int id, const char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2byte(struct soap *soap, const char *s, char *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -128 || n > 127)
+      soap->error = SOAP_TYPE;
+    *p = (char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_inbyte(struct soap *soap, const char *tag, char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (char*)soap_id_enter(soap, soap->id, p, t, sizeof(char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(char), 0, NULL);
+  else if (p)
+  { if (soap_s2byte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_short2s(struct soap *soap, short n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outshort(struct soap *soap, const char *tag, int id, const short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, (long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2short(struct soap *soap, const char *s, short *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (s == r || *r || n < -32768 || n > 32767)
+      soap->error = SOAP_TYPE;
+    *p = (short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+short *
+SOAP_FMAC2
+soap_inshort(struct soap *soap, const char *tag, short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (short*)soap_id_enter(soap, soap->id, p, t, sizeof(short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(short), 0, NULL);
+  else if (p)
+  { if (soap_s2short(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_float2s(struct soap *soap, float n)
+{ const char *s;
+  if (soap_isnan((double)n))
+    s = "NaN";
+  else if (soap_ispinff(n))
+    s = "INF";
+  else if (soap_isninff(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->float_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outfloat(struct soap *soap, const char *tag, int id, const float *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_float2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2float(struct soap *soap, const char *s, float *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = FLT_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = FLT_NAN;
+    else
+    {
+/* On some systems, strtof appears to be broken or doesn't link: use with caution */
+#if defined(HAVE_STRTOF)
+      char *r;
+      *p = strtof((char*)s, &r);
+      if (*r)
+#elif defined(HAVE_STRTOD)
+      char *r;
+      *p = (float)strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%g", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static int soap_isnumeric(struct soap *soap, const char *type)
+{ if (soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":float")
+   && soap_match_tag(soap, soap->type, ":double")
+   && soap_match_tag(soap, soap->type, ":decimal")
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return SOAP_ERR;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+float *
+SOAP_FMAC2
+soap_infloat(struct soap *soap, const char *tag, float *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (float*)soap_id_enter(soap, soap->id, p, t, sizeof(float), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (float*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(float), 0, NULL);
+  else if (p)
+  { if (soap_s2float(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_double2s(struct soap *soap, double n)
+{ const char *s;
+  if (soap_isnan(n))
+    s = "NaN";
+  else if (soap_ispinfd(n))
+    s = "INF";
+  else if (soap_isninfd(n))
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->double_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdouble(struct soap *soap, const char *tag, int id, const double *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_double2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2double(struct soap *soap, const char *s, double *p)
+{ if (s)
+  { if (!*s)
+      return soap->error = SOAP_TYPE;
+    if (!soap_tag_cmp(s, "INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = DBL_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = DBL_NAN;
+    else
+    {
+#ifdef HAVE_STRTOD
+      char *r;
+      *p = strtod(s, &r);
+      if (*r)
+#endif
+#ifdef HAVE_SSCANF
+        if (sscanf(s, "%lg", p) != 1)
+          soap->error = SOAP_TYPE;
+#else
+        soap->error = SOAP_TYPE;
+#endif
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+double *
+SOAP_FMAC2
+soap_indouble(struct soap *soap, const char *tag, double *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+#endif
+  p = (double*)soap_id_enter(soap, soap->id, p, t, sizeof(double), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (double*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(double), 0, NULL);
+  else if (p)
+  { if (soap_s2double(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedByte2s(struct soap *soap, unsigned char n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedByte(struct soap *soap, const char *tag, int id, const unsigned char *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedByte(struct soap *soap, const char *s, unsigned char *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 255)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned char)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned char *
+SOAP_FMAC2
+soap_inunsignedByte(struct soap *soap, const char *tag, unsigned char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned char*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned char), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned char), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedByte(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedShort2s(struct soap *soap, unsigned short n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedShort(struct soap *soap, const char *tag, int id, const unsigned short *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedShort(struct soap *soap, const char *s, unsigned short *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (s == r || *r || n > 65535)
+      soap->error = SOAP_TYPE;
+    *p = (unsigned short)n;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned short *
+SOAP_FMAC2
+soap_inunsignedShort(struct soap *soap, const char *tag, unsigned short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned short*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned short), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned short), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedShort(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedInt2s(struct soap *soap, unsigned int n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedInt(struct soap *soap, const char *tag, int id, const unsigned int *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedInt(struct soap *soap, const char *s, unsigned int *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = (unsigned int)soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned int *
+SOAP_FMAC2
+soap_inunsignedInt(struct soap *soap, const char *tag, unsigned int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned int*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned int), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned int), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedInt(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedLong2s(struct soap *soap, unsigned long n)
+{ sprintf(soap->tmpbuf, "%lu", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedLong(struct soap *soap, const char *tag, int id, const unsigned long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedLong(struct soap *soap, const char *s, unsigned long *p)
+{ if (s)
+  { char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = soap_strtoul(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+     || soap_errno == SOAP_ERANGE
+#endif
+#endif
+    )
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned long *
+SOAP_FMAC2
+soap_inunsignedLong(struct soap *soap, const char *tag, unsigned long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+#ifndef WITH_LEAN
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+#endif
+  p = (unsigned long*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned long), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (unsigned long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned long), 0, NULL);
+  else if (p)
+  { if (soap_s2unsignedLong(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_ULONG642s(struct soap *soap, ULONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_ULONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outULONG64(struct soap *soap, const char *tag, int id, const ULONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_ULONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2ULONG64(struct soap *soap, const char *s, ULONG64 *p)
+{ if (s)
+  {
+#ifdef HAVE_STRTOULL
+    char *r;
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+    soap_reset_errno;
+#endif
+#endif
+    *p = strtoull(s, &r, 10);
+    if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+       || soap_errno == SOAP_ERANGE
+#endif
+#endif
+      )
+#else
+# ifdef HAVE_SSCANF
+    if (sscanf(s, SOAP_ULONG_FORMAT, p) != 1)
+# endif
+#endif
+      soap->error = SOAP_TYPE;
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+ULONG64 *
+SOAP_FMAC2
+soap_inULONG64(struct soap *soap, const char *tag, ULONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (ULONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(ULONG64), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (ULONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(ULONG64), 0, NULL);
+  else if (p)
+  { if (soap_s2ULONG64(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2string(struct soap *soap, const char *s, char **t)
+{ *t = NULL;
+  if (s)
+  { if (!(*t = soap_strdup(soap, s)))
+      return soap->error = SOAP_EOM;
+    if (!(soap->mode & (SOAP_ENC_LATIN | SOAP_C_UTFSTRING)))
+    { /* TODO: consider truncating UTF8 to ASCII for regular XML attribute strings? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2QName(struct soap *soap, const char *s, char **t)
+{ if (s)
+  { struct soap_nlist *np;
+    const char *p;
+    if (!strncmp(s, "xml:", 4))
+    { *t = soap_strdup(soap, s);
+      return SOAP_OK;
+    }
+    np = soap->nlist;
+    p = strchr(s, ':');
+    if (p)
+    { register int n = p - s;
+      while (np && (strncmp(np->id, s, n) || np->id[n]))
+        np = np->next;
+      p++;
+    }
+    else
+    { while (np && *np->id)
+        np = np->next;
+      p = s;
+    }
+    if (np)
+    { if (np->index >= 0 && soap->local_namespaces)
+      { register const char *q = soap->local_namespaces[np->index].id;
+        if (q)
+        { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(q) + 2)))
+            sprintf(*t, "%s:%s", q, p);
+          return SOAP_OK;
+        }
+      }
+      if (np->ns)
+      { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(np->ns) + 4)))
+          sprintf(*t, "\"%s\":%s", np->ns, p);
+        return SOAP_OK;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined (index=%d, URI=%s)\n", s, np->index, np->ns?np->ns:""));
+      return soap->error = SOAP_NAMESPACE; 
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined, assuming empty namespace\n", s));
+    if ((*t = (char*)soap_malloc(soap, strlen(p) + 4)))
+      sprintf(*t, "\"\":%s", p);
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_QName2s(struct soap *soap, const char *s)
+{ struct Namespace *p;
+  char *t;
+  int n;
+  if (!s || *s != '"')
+  {
+#ifndef WITH_LEAN
+    if (s && (soap->mode & SOAP_XML_CANONICAL))
+    { t = (char*)strchr(s, ':');
+      if (t)
+        soap_utilize_ns(soap, s, t - s);
+    }
+#endif
+    return s;
+  }
+  s++;
+  if ((p = soap->local_namespaces))
+  { for (; p->id; p++)
+    { if (p->ns)
+        if (!soap_tag_cmp(s, p->ns))
+          break;
+      if (p->in)
+        if (!soap_tag_cmp(s, p->in))
+          break;
+    }
+    if (p && p->id)
+    { s = strchr(s, '"');
+      if (s)
+      { t = (char*)soap_malloc(soap, strlen(p->id) + strlen(s));
+        strcpy(t, p->id);
+	strcat(t, s + 1);
+        return t;
+      }
+    }
+  }
+  t = (char*)strchr(s, '"');
+  if (t)
+    n = t - s;
+  else
+    n = 0;
+  t = soap_strdup(soap, s);
+  t[n] = '\0';
+  sprintf(soap->tmpbuf, "xmlns:_%d", soap->idnum++);
+  soap_set_attr(soap, soap->tmpbuf, t);
+  s = strchr(s, '"');
+  if (s)
+  { t = (char*)soap_malloc(soap, strlen(soap->tmpbuf) + strlen(s) - 6);
+    strcpy(t, soap->tmpbuf + 6);
+    strcat(t, s + 1);
+  }
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2wchar(struct soap *soap, const char *s, wchar_t **t)
+{ wchar_t *r;
+  if (!s)
+    *t = NULL;
+  else
+  { *t = r = (wchar_t*)soap_malloc(soap, sizeof(wchar_t) * (strlen(s) + 1));
+    if (!r)
+      return soap->error;
+    if (soap->mode & SOAP_ENC_LATIN)
+    { while (*s)
+        *r++ = (wchar_t)*s++;
+    }
+    else
+    { /* Convert UTF8 to wchar */
+      while (*s)
+      { register soap_wchar c, c1, c2, c3, c4;
+        c = *s++;
+        if (c < 0x80)
+	  *r++ = (wchar_t)c;
+	else
+        { c1 = (soap_wchar)*s++ & 0x3F;
+          if (c < 0xE0)
+            *r++ = (wchar_t)(((soap_wchar)(c & 0x1F) << 6) | c1);
+          else
+	  { c2 = (soap_wchar)*s++ & 0x3F;
+            if (c < 0xF0)
+              *r++ = (wchar_t)(((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2);
+            else
+	    { c3 = (soap_wchar)*s++ & 0x3F;
+              if (c < 0xF8)
+                *r++ = (wchar_t)(((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3);
+              else
+	      { c4 = (soap_wchar)*s++ & 0x3F;
+                if (c < 0xFC)
+                  *r++ = (wchar_t)(((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4);
+                else
+		  *r++ = (wchar_t)(((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(*s++ & 0x3F));
+              }
+            }
+          }
+        }
+      }
+    }
+    *r = L'\0';
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_wchar2s(struct soap *soap, const wchar_t *s)
+{ register soap_wchar c;
+  register char *r, *t;
+  const wchar_t *q = s;
+  size_t n = 0;
+  while ((c = *q++))
+  { if (c > 0 && c < 0x80)
+      n++;
+    else
+      n += 6;
+  }
+  r = t = (char*)soap_malloc(soap, n + 1);
+  if (r)
+  { /* Convert wchar to UTF8 */
+    while ((c = *s++))
+    { if (c > 0 && c < 0x80)
+        *t++ = (char)c;
+      else
+      { if (c < 0x0800)
+          *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+        else
+        { if (c < 0x010000)
+            *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+          else
+          { if (c < 0x200000)
+              *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+            else
+            { if (c < 0x04000000)
+                *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+              else
+              { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+              }
+              *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+            }     
+            *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+        }
+        *t++ = (char)(0x80 | (c & 0x3F));
+      }
+    }
+    *t = '\0';
+  }
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outstring(struct soap *soap, const char *tag, int id, char *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_string_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_instring(struct soap *soap, const char *tag, char **p, const char *type, int t, int flag, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_string_in(soap, flag, minlen, maxlen);
+    if (!*p || !(char*)soap_id_enter(soap, soap->id, *p, t, sizeof(char*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (char**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(char**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwstring(struct soap *soap, const char *tag, int id, wchar_t *const*p, const char *type, int n) 
+{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+  if (id < 0
+   || soap_element_begin_out(soap, tag, id, type)
+   || soap_wstring_out(soap, *p, 0)
+   || soap_element_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type, int t, long minlen, long maxlen)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+  { *p = soap_wstring_in(soap, 1, minlen, maxlen);
+    if (!*p || !(wchar_t*)soap_id_enter(soap, soap->id, *p, t, sizeof(wchar_t*), 0, NULL, NULL, NULL))
+      return NULL;
+  }
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (*soap->href)
+    p = (wchar_t**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(wchar_t**), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static time_t
+soap_timegm(struct tm *T)
+{
+#if defined(HAVE_TIMEGM)
+  return timegm(T);
+#else
+  time_t t, g, z;
+#ifdef HAVE_GMTIME_R
+  struct tm tm, *tmp = &tm;
+#else
+  struct tm *tmp;
+#endif
+  t = mktime(T);
+  if (t == -1)
+    return -1;
+#ifdef HAVE_GMTIME_R
+  gmtime_r(&t, tmp);
+#else
+  tmp = gmtime(&t);
+#endif
+  tmp->tm_isdst = 0;
+  g = mktime(tmp);
+  if (g == -1)
+    return -1;
+  z = g - t;
+  return t - z;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_dateTime2s(struct soap *soap, time_t n)
+{ struct tm T, *pT = &T;
+#if defined(HAVE_GMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PGMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_PGMTIME)
+  if (gmtime(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GMTIME)
+  if ((pT = gmtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GETTIMEOFDAY)
+  struct timezone tz;
+  memset((void*)&tz, 0, sizeof(tz));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { struct timeval tv;
+    gettimeofday(&tv, &tz);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60);
+  }
+#endif
+#elif defined(HAVE_FTIME)
+  struct timeb t;
+  memset((void*)&t, 0, sizeof(t));
+# if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+  /* The following defines were added for VxWorks*/
+# elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf+strlen(soap->tmpbuf), "%+03d:%02d", t.timezone/60, abs(t.timezone)%60);
+  }
+# else
+  if ((pT = localtime(&n)))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60);
+  }
+# endif
+#elif defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#else
+  if ((pT = localtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#endif
+  else
+    strcpy(soap->tmpbuf, "1969-12-31T23:59:59Z");
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdateTime(struct soap *soap, const char *tag, int id, const time_t *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_dateTime2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2dateTime(struct soap *soap, const char *s, time_t *p)
+{ if (s)
+  { struct tm T;
+    char zone[16];
+    const char *t;
+    memset((void*)&T, 0, sizeof(T));
+    zone[sizeof(zone)-1] = '\0';
+    if (strchr(s, '-'))
+      t = "%d-%d-%dT%d:%d:%d%15s";
+    else if (strchr(s, ':'))
+      t = "%4d%2d%2dT%d:%d:%d%15s";
+    else /* parse non-XSD-standard alternative ISO 8601 format */
+      t = "%4d%2d%2dT%2d%2d%2d%15s";
+    sscanf(s, t, &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, zone);
+    if (T.tm_year == 1)
+      T.tm_year = 70;
+    else
+      T.tm_year -= 1900;
+    T.tm_mon--;
+    if (*zone)
+    { if (*zone == '.')
+      { for (s = zone + 1; *s; s++)
+          if (*s < '0' || *s > '9')
+            break;
+      }
+      else
+        s = zone;
+      if (*s == '+' || *s == '-')
+      { int h = 0, m = 0;
+        if (s[3] == ':')
+	{ sscanf(s, "%d:%d", &h, &m);
+	  if (h < 0)
+	    m = -m;
+	}
+	else
+	{ m = (int)atol(s);
+	  h = m / 100;
+	  m = m % 100;
+	}
+        T.tm_hour -= h;
+        T.tm_min -= m;
+      }
+      T.tm_isdst = 0;
+      *p = soap_timegm(&T);
+    }
+    else
+    { T.tm_isdst = -1;
+      *p = mktime(&T); /* no time zone: suppose it is localtime? */
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+time_t *
+SOAP_FMAC2
+soap_indateTime(struct soap *soap, const char *tag, time_t *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag, 0))
+    return NULL;
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":dateTime"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (time_t*)soap_id_enter(soap, soap->id, p, t, sizeof(time_t), 0, NULL, NULL, NULL);
+  if (*soap->href)
+    p = (time_t*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(time_t), 0, NULL);
+  else if (p)
+  { if (soap_s2dateTime(soap, soap_value(soap), p))
+      return NULL;
+  }
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outliteral(struct soap *soap, const char *tag, char *const*p)
+{ int i;
+  const char *t = NULL;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p && *p)
+  { if (soap_send(soap, *p))
+      return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_inliteral(struct soap *soap, const char *tag, char **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_string_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (char*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwliteral(struct soap *soap, const char *tag, wchar_t *const*p)
+{ int i;
+  const char *t = NULL;
+  wchar_t c;
+  const wchar_t *s;
+  if (tag && *tag != '-')
+  { if (soap->local_namespaces && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p)
+  { s = *p;
+    while ((c = *s++))
+      if (soap_pututf8(soap, (unsigned char)c))
+        return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwliteral(struct soap *soap, const char *tag, wchar_t **p)
+{ if (soap_element_begin_in(soap, tag, 1))
+  { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
+      return NULL;
+    soap->error = SOAP_OK;
+  }
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->body)
+    *p = soap_wstring_in(soap, 0, -1, -1);
+  else if (soap->null)
+    *p = NULL;
+  else
+    *p = (wchar_t*)SOAP_STR_EOS;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_token(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF || soap_blank(c))
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  *s = '\0';
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_value(struct soap *soap)
+{ register size_t i;
+  register soap_wchar c = 0;
+  register char *s = soap->tmpbuf;
+  if (!soap->body)
+    return SOAP_STR_EOS;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { if (c == SOAP_TT || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+    c = soap_get(soap);
+  }
+  for (s--; i > 0; i--, s--)
+    if (!soap_blank(*s))
+      break;
+  s[1] = '\0';
+  if ((int)c == EOF || c == SOAP_TT)
+    soap_unget(soap, c);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf));
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+    soap->dom->data = soap_strdup(soap, soap->tmpbuf);
+#endif
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_LEANER) || !defined(WITH_NOHTTP)
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getline(struct soap *soap, char *s, int len)
+{ int i = len;
+  soap_wchar c = 0;
+  for (;;)
+  { while (--i > 0)
+    { c = soap_getchar(soap);
+      if (c == '\r' || c == '\n')
+        break;
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+    if (c != '\n')
+      c = soap_getchar(soap); /* got \r, now get \n */
+    if (c == '\n')
+    { *s = '\0';
+      if (i+1 == len) /* empty line: end of HTTP/MIME header */
+        break;
+      c = soap_unget(soap, soap_getchar(soap));
+      if (c != ' ' && c != '\t') /* HTTP line continuation? */
+        break;
+    }
+    else if ((int)c == EOF)
+      return soap->error = SOAP_EOF;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static size_t
+soap_count_attachments(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  register struct soap_multipart *content;
+  register size_t count = soap->count;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the message size with attachments, current count=%lu\n", (unsigned long)count));
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of DIME attachments\n"));
+    for (content = soap->dime.first; content; content = content->next)
+    { count += 12 + ((content->size+3)&(~3));
+      if (content->id)
+        count += ((strlen(content->id)+3)&(~3));
+      if (content->type)
+        count += ((strlen(content->type)+3)&(~3));
+      if (content->options)
+        count += ((((unsigned char)content->options[2] << 8) | ((unsigned char)content->options[3]))+7)&(~3);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of DIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary)
+  { register size_t n = strlen(soap->mime.boundary);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of MIME attachments\n"));
+    for (content = soap->mime.first; content; content = content->next)
+    { register const char *s;
+      /* count \r\n--boundary\r\n */
+      count += 6 + n;
+      /* count Content-Type: ...\r\n */
+      if (content->type)
+        count += 16 + strlen(content->type);
+      /* count Content-Transfer-Encoding: ...\r\n */
+      s = soap_str_code(mime_codes, content->encoding);
+      if (s)
+        count += 29 + strlen(s);
+      /* count Content-ID: ...\r\n */
+      if (content->id)
+        count += 14 + strlen(content->id);
+      /* count Content-Location: ...\r\n */
+      if (content->location)
+        count += 20 + strlen(content->location);
+      /* count Content-Description: ...\r\n */
+      if (content->description)
+        count += 23 + strlen(content->location);
+      /* count \r\n...content */
+      count += 2 + content->size;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of MIME attachment content is %lu bytes\n", (unsigned long)content->size));
+    }
+    /* count \r\n--boundary-- */
+    count += 6 + n;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New count is %lu bytes\n", (unsigned long)count));
+  return count;
+#else
+  return soap->count;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_putdimefield(struct soap *soap, const char *s, size_t n)
+{ if (soap_send_raw(soap, s, n))
+    return soap->error;
+  return soap_send_raw(soap, SOAP_STR_PADDING, -(long)n&3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_dime_option(struct soap *soap, unsigned short optype, const char *option)
+{ size_t n;
+  char *s = NULL;
+  if (option)
+  { n = strlen(option);
+    s = (char*)soap_malloc(soap, n + 5);
+    if (s)
+    { s[0] = optype >> 8;
+      s[1] = optype & 0xFF;
+      s[2] = n >> 8;
+      s[3] = n & 0xFF;
+      strcpy(s + 4, option);
+    }
+  }
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdimehdr(struct soap *soap)
+{ unsigned char tmp[12];
+  size_t optlen = 0, idlen = 0, typelen = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Put DIME header id='%s'\n", soap->dime.id?soap->dime.id:""));
+  if (soap->dime.options)
+    optlen = (((unsigned char)soap->dime.options[2] << 8) | ((unsigned char)soap->dime.options[3])) + 4;
+  if (soap->dime.id)
+    idlen = strlen(soap->dime.id);
+  if (soap->dime.type)
+    typelen = strlen(soap->dime.type);
+  tmp[0] = SOAP_DIME_VERSION | (soap->dime.flags & 0x7);
+  tmp[1] = soap->dime.flags & 0xF0;
+  tmp[2] = optlen >> 8;
+  tmp[3] = optlen & 0xFF;
+  tmp[4] = idlen >> 8;
+  tmp[5] = idlen & 0xFF;
+  tmp[6] = typelen >> 8;
+  tmp[7] = typelen & 0xFF;
+  tmp[8] = soap->dime.size >> 24;
+  tmp[9] = (soap->dime.size >> 16) & 0xFF;
+  tmp[10] = (soap->dime.size >> 8) & 0xFF;
+  tmp[11] = soap->dime.size & 0xFF;
+  if (soap_send_raw(soap, (char*)tmp, 12)
+   || soap_putdimefield(soap, soap->dime.options, optlen)
+   || soap_putdimefield(soap, soap->dime.id, idlen)
+   || soap_putdimefield(soap, soap->dime.type, typelen))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return SOAP_OK;
+  for (content = soap->dime.first; content; content = content->next)
+  { void *handle;
+    soap->dime.size = content->size;
+    soap->dime.id = content->id;
+    soap->dime.type = content->type;
+    soap->dime.options = content->options;
+    soap->dime.flags = SOAP_DIME_VERSION | SOAP_DIME_MEDIA;
+    if (soap->fdimereadopen && ((handle = soap->fdimereadopen(soap, (void*)content->ptr, content->id, content->type, content->options)) || soap->error))
+    { size_t size = content->size;
+      if (!handle)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadopen failed\n"));
+        return soap->error;
+      }
+      if (!content->size && ((soap->mode & SOAP_ENC_XML) || (soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_IO) == SOAP_IO_STORE))
+      { size_t chunksize = sizeof(soap->tmpbuf);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked streaming DIME\n"));
+        do 
+        { size = soap->fdimeread(soap, handle, soap->tmpbuf, chunksize);
+          DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread returned %lu bytes\n", (unsigned long)size));
+          if (size < chunksize)
+ 	  { soap->dime.flags &= ~SOAP_DIME_CF;
+            if (!content->next)
+              soap->dime.flags |= SOAP_DIME_ME;
+	  }
+          else
+            soap->dime.flags |= SOAP_DIME_CF;
+	  soap->dime.size = size;
+          if (soap_putdimehdr(soap)
+	   || soap_putdimefield(soap, soap->tmpbuf, size))
+            break;
+          if (soap->dime.id)
+ 	  { soap->dime.flags &= ~(SOAP_DIME_MB | SOAP_DIME_MEDIA);
+            soap->dime.id = NULL;
+            soap->dime.type = NULL;
+            soap->dime.options = NULL;
+          }  
+        } while (size >= chunksize);
+      }
+      else
+      { if (!content->next)
+          soap->dime.flags |= SOAP_DIME_ME;
+        if (soap_putdimehdr(soap))
+          return soap->error;
+        do
+        { size_t bufsize;
+	  if (size < sizeof(soap->tmpbuf))
+            bufsize = size;
+          else
+            bufsize = sizeof(soap->tmpbuf);
+          if (!(bufsize = soap->fdimeread(soap, handle, soap->tmpbuf, bufsize)))
+          { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread failed: insufficient data (%lu bytes remaining from %lu bytes)\n", (unsigned long)size, (unsigned long)soap->dime.size));
+            soap->error = SOAP_EOF;
+	    break;
+          }
+          if (soap_send_raw(soap, soap->tmpbuf, bufsize))
+            break;
+          size -= bufsize;
+        } while (size);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+        soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+      if (soap->fdimereadclose)
+        soap->fdimereadclose(soap, handle);
+    }
+    else
+    { if (!content->next)
+        soap->dime.flags |= SOAP_DIME_ME;
+      if (soap_putdimehdr(soap)
+       || soap_putdimefield(soap, (char*)content->ptr, content->size))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static char *
+soap_getdimefield(struct soap *soap, size_t n)
+{ register soap_wchar c;
+  register int i;
+  register char *s;
+  char *p = NULL;
+  if (n)
+  { p = (char*)soap_malloc(soap, n + 1);
+    if (p)
+    { s = p;
+      for (i = n; i > 0; i--)
+      { if ((int)(c = soap_get1(soap)) == EOF)
+        { soap->error = SOAP_EOF;
+          return NULL;
+        }
+        *s++ = (char)c;
+      }
+      *s = '\0';
+      if ((soap->error = soap_move(soap, -(long)n&3)))
+        return NULL;
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdimehdr(struct soap *soap)
+{ register soap_wchar c;
+  register char *s;
+  register int i;
+  unsigned char tmp[12];
+  size_t optlen, idlen, typelen;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return soap->error = SOAP_DIME_END;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME header\n"));
+  if (soap->dime.buflen || soap->dime.chunksize)
+  { if (soap_move(soap, (long)(soap->dime.size - soap_tell(soap))))
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, soap_getchar(soap)); /* skip padding and get hdr */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... From chunked\n"));
+    return SOAP_OK;
+  }
+  s = (char*)tmp;
+  for (i = 12; i > 0; i--)
+  { if ((int)(c = soap_getchar(soap)) == EOF)
+      return soap->error = SOAP_EOF;
+    *s++ = (char)c;
+  }
+  if ((tmp[0] & 0xF8) != SOAP_DIME_VERSION)
+    return soap->error = SOAP_DIME_MISMATCH;
+  soap->dime.flags = (tmp[0] & 0x7) | (tmp[1] & 0xF0);
+  optlen = (tmp[2] << 8) | tmp[3];
+  idlen = (tmp[4] << 8) | tmp[5];
+  typelen = (tmp[6] << 8) | tmp[7];
+  soap->dime.size = (tmp[8] << 24) | (tmp[9] << 16) | (tmp[10] << 8) | tmp[11];
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME size=%lu flags=0x%X\n", (unsigned long)soap->dime.size, soap->dime.flags));
+  if (!(soap->dime.options = soap_getdimefield(soap, optlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.id = soap_getdimefield(soap, idlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime.type = soap_getdimefield(soap, typelen)) && soap->error)
+    return soap->error;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME id=%s, type=%s, options=%s\n", soap->dime.id?soap->dime.id:"", soap->dime.type?soap->dime.type:"", soap->dime.options?soap->dime.options+4:""));
+  if (soap->dime.flags & SOAP_DIME_ME)
+    soap->mode &= ~SOAP_ENC_DIME;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdime(struct soap *soap)
+{ while (soap->dime.flags & SOAP_DIME_CF)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap_move(soap, soap->dime.size))
+      return soap->error = SOAP_EOF;
+  }
+  if (soap_move(soap, ((soap->dime.size+3)&(~3))-soap_tell(soap)))
+    return soap->error = SOAP_EOF;
+  for (;;)
+  { register struct soap_multipart *content;
+    if (soap_getdimehdr(soap))
+      break;
+    if (soap->fdimewriteopen && ((soap->dime.ptr = (char*)soap->fdimewriteopen(soap, soap->dime.id, soap->dime.type, soap->dime.options)) || soap->error))
+    { const char *id, *type, *options;
+      size_t size, n;
+      if (!soap->dime.ptr)
+        return soap->error;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      for (;;)
+      { size = soap->dime.size;
+        for (;;)
+        { n = soap->buflen - soap->bufidx;
+          if (size < n)
+            n = size;
+          if ((soap->error = soap->fdimewrite(soap, (void*)soap->dime.ptr, soap->buf + soap->bufidx, n)))
+            break;
+	  size -= n;
+	  if (!size)
+	  { soap->bufidx += n;
+	    break;
+	  }
+	  if (soap_recv(soap))
+          { soap->error = SOAP_EOF;
+	    goto end;
+          }
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+        { soap->error = SOAP_EOF;
+	  break;
+        }
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          break;
+      }
+end:
+      if (soap->fdimewriteclose)
+        soap->fdimewriteclose(soap, (void*)soap->dime.ptr);
+      soap->dime.size = 0;
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else if (soap->dime.flags & SOAP_DIME_CF)
+    { const char *id, *type, *options;
+      register soap_wchar c;
+      register char *s;
+      register int i;
+      id = soap->dime.id;
+      type = soap->dime.type;
+      options = soap->dime.options;
+      if (soap_new_block(soap))
+        return SOAP_EOM;
+      for (;;)
+      { s = (char*)soap_push_block(soap, soap->dime.size);
+        if (!s)
+          return soap->error = SOAP_EOM;
+        for (i = soap->dime.size; i > 0; i--)
+        { if ((int)(c = soap_get1(soap)) == EOF)
+            return soap->error = SOAP_EOF;
+          *s++ = (char)c;
+        }
+        if (soap_move(soap, -(long)soap->dime.size&3))
+          return soap->error = SOAP_EOF;
+        if (!(soap->dime.flags & SOAP_DIME_CF))
+          break;
+        if (soap_getdimehdr(soap))
+          return soap->error;
+      }
+      soap->dime.size = soap->blist->size++; /* allocate one more for '\0' */
+      if (!(soap->dime.ptr = soap_save_block(soap, NULL, 0)))
+        return soap->error;
+      soap->dime.ptr[soap->dime.size] = '\0'; /* force 0-terminated */
+      soap->dime.id = id;
+      soap->dime.type = type;
+      soap->dime.options = options;
+    }
+    else
+      soap->dime.ptr = soap_getdimefield(soap, soap->dime.size);
+    content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, soap->dime.ptr, soap->dime.size);
+    if (!content)
+      return soap->error = SOAP_EOM;
+    content->id = soap->dime.id;
+    content->type = soap->dime.type;
+    content->options = soap->dime.options;
+    soap_resolve_attachment(soap, content);
+    if (soap->error)
+      return soap->error;
+  }
+  if (soap->error != SOAP_DIME_END)
+    return soap->error;
+  return soap->error = SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmimehdr(struct soap *soap)
+{ struct soap_multipart *content;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  while (!*soap->msgbuf);
+  if (soap->msgbuf[0] == '-' && soap->msgbuf[1] == '-')
+  { char *s = soap->msgbuf + strlen(soap->msgbuf) - 1;
+    /* remove white space */
+    while (soap_blank(*s))
+      s--;
+    s[1] = '\0';
+    if (soap->mime.boundary)
+    { if (strcmp(soap->msgbuf + 2, soap->mime.boundary))
+        return soap->error = SOAP_MIME_ERROR;
+    }
+    else
+      soap->mime.boundary = soap_strdup(soap, soap->msgbuf + 2);
+    if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  if (soap_set_mime_attachment(soap, NULL, 0, SOAP_MIME_NONE, NULL, NULL, NULL, NULL))
+    return soap->error = SOAP_EOM;
+  content = soap->mime.last;
+  for (;;)
+  { register char *key = soap->msgbuf;
+    register char *val;
+    if (!*key)
+      break;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "MIME header: %s\n", key));
+    val = strchr(soap->msgbuf, ':');
+    if (val)
+    { *val = '\0';
+      do val++;
+      while (*val && *val <= 32);
+      if (!soap_tag_cmp(key, "Content-ID"))
+        content->id = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Location"))
+        content->location = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Disposition"))
+        content->id = soap_strdup(soap, soap_get_header_attribute(soap, val, "name"));
+      else if (!soap_tag_cmp(key, "Content-Type"))
+        content->type = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Description"))
+        content->description = soap_strdup(soap, val);
+      else if (!soap_tag_cmp(key, "Content-Transfer-Encoding"))
+        content->encoding = (enum soap_mime_encoding)soap_int_code(mime_codes, val, (long)SOAP_MIME_NONE);
+    }
+    if (soap_getline(soap, key, sizeof(soap->msgbuf)))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getmime(struct soap *soap)
+{ register soap_wchar c = 0;
+  if (!soap->mime.last)
+    return SOAP_OK;
+  for (;;)
+  { register size_t i, m = 0;
+    register char *s, *t = NULL;
+    struct soap_multipart *content = soap->mime.last;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Parsing MIME content id=%s type=%s\n", content->id?content->id:"", content->type?content->type:""));
+    if (soap_new_block(soap))
+      return soap->error = SOAP_EOM;
+    for (;;)
+    { register short flag = 0;
+      if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+        return soap->error = SOAP_EOM;
+      for (i = 0; i < SOAP_BLKLEN; i++)
+      { if (m > 0)
+        { *s++ = *t++;
+	  m--;
+	}
+	else
+        { if (!flag)
+	  { c = soap_get1(soap);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	  }
+	  if (flag || c == '\r')
+	  { t = soap->tmpbuf;
+	    memset(t, 0, sizeof(soap->tmpbuf));
+            strcpy(t, "\n--");
+            if (soap->mime.boundary)
+	      strncat(t, soap->mime.boundary, sizeof(soap->tmpbuf)-4);
+	    do c = soap_getchar(soap);
+	    while (c == *t++);
+	    if ((int)c == EOF)
+	      return soap->error = SOAP_EOF;
+	    if (!*--t)
+	      goto end;
+	    *t = (char)c;
+	    flag = (c == '\r');
+	    m = t - soap->tmpbuf + 1 - flag;
+	    t = soap->tmpbuf;
+	    c = '\r';
+	  }
+	  *s++ = (char)c;
+        }
+      }
+    }
+end:
+    *s = '\0'; /* force 0-terminated */
+    content->size = soap_size_block(soap, i+1)-1;
+    content->ptr = soap_save_block(soap, NULL, 0);
+    soap_resolve_attachment(soap, content);
+    if (c == '-' && soap_getchar(soap) == '-')
+      break;
+    while (c != '\r' && (int)c != EOF && soap_blank(c))
+      c = soap_getchar(soap);
+    if (c != '\r' || soap_getchar(soap) != '\n')
+      return soap->error = SOAP_MIME_ERROR;
+    if (soap_getmimehdr(soap))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_match_cid(struct soap *soap, const char *s, const char *t)
+{ register size_t n;
+  if (!s)
+    return 1;
+  if (!strcmp(s, t))
+    return 0;
+  if (!strncmp(s, "cid:", 4))
+    s += 4;
+  n = strlen(t);
+  if (*t == '<')
+  { t++;
+    n -= 2;
+  }
+  if (!strncmp(s, t, n) && !s[n])
+    return 0;
+  soap_decode(soap->tmpbuf, sizeof(soap->tmpbuf), s, SOAP_STR_EOS);
+  if (!strncmp(soap->tmpbuf, t, n) && !soap->tmpbuf[n])
+    return 0;
+  return 1;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_resolve_attachment(struct soap *soap, struct soap_multipart *content)
+{ if (content->id)
+  { register struct soap_xlist **xp = &soap->xlist;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving attachment data for id=%s\n", content->id));
+    while (*xp)
+    { register struct soap_xlist *xq = *xp;
+      if (!soap_match_cid(soap, xq->id, content->id))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Found matching attachment %s for content id=%s\n", xq->id, content->id));
+	*xp = xq->next;
+        *xq->ptr = (unsigned char*)content->ptr;
+        *xq->size = (int)content->size;
+        *xq->type = (char*)content->type;
+	if (content->options)
+          *xq->options = (char*)content->options;
+        else
+          *xq->options = (char*)content->description;
+	SOAP_FREE(soap, xq);
+      }
+      else
+        xp = &(*xp)->next;
+    }
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmimehdr(struct soap *soap, struct soap_multipart *content)
+{ const char *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "MIME attachment type=%s\n", content->type?content->type:""));
+  if (soap_send3(soap, "\r\n--", soap->mime.boundary, "\r\n"))
+    return soap->error;
+  if (content->type && soap_send3(soap, "Content-Type: ", content->type, "\r\n"))
+    return soap->error;
+  s = soap_str_code(mime_codes, content->encoding);
+  if (s && soap_send3(soap, "Content-Transfer-Encoding: ", s, "\r\n"))
+    return soap->error;
+  if (content->id && soap_send3(soap, "Content-ID: ", content->id, "\r\n"))
+    return soap->error;
+  if (content->location && soap_send3(soap, "Content-Location: ", content->location, "\r\n"))
+    return soap->error;
+  if (content->description && soap_send3(soap, "Content-Description: ", content->description, "\r\n"))
+    return soap->error;
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putmime(struct soap *soap)
+{ struct soap_multipart *content;
+  if (!(soap->mode & SOAP_ENC_MIME) || !soap->mime.boundary)
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending MIME attachments\n"));
+  for (content = soap->mime.first; content; content = content->next)
+    if (soap_putmimehdr(soap, content)
+     || soap_send_raw(soap, content->ptr, content->size))
+      return soap->error;
+  return soap_send3(soap, "\r\n--", soap->mime.boundary, "--");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_dime(struct soap *soap)
+{ soap->omode |= SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_mime(struct soap *soap, const char *boundary, const char *start)
+{ soap->omode |= SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = soap_strdup(soap, boundary);
+  soap->mime.start = soap_strdup(soap, start);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_dime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_DIME;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_mime(struct soap *soap)
+{ soap->omode &= ~SOAP_ENC_MIME;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static struct soap_multipart*
+soap_new_multipart(struct soap *soap, struct soap_multipart **first, struct soap_multipart **last, char *ptr, size_t size)
+{ struct soap_multipart *content;
+  content = (struct soap_multipart*)soap_malloc(soap, sizeof(struct soap_multipart));
+  if (content)
+  { content->next = NULL;
+    content->ptr = ptr;
+    content->size = size;
+    content->id = NULL;
+    content->type = NULL;
+    content->options = NULL;
+    content->encoding = SOAP_MIME_NONE;
+    content->location = NULL;
+    content->description = NULL;
+    if (!*first)
+      *first = content;
+    if (*last)
+      (*last)->next = content;
+    *last = content;
+  }
+  return content;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_dime_attachment(struct soap *soap, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->options = soap_dime_option(soap, optype, option);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_mime_attachment(struct soap *soap, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description)
+{ struct soap_multipart *content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, ptr, size);
+  if (!content)
+    return SOAP_EOM;
+  content->id = soap_strdup(soap, id);
+  content->type = soap_strdup(soap, type);
+  content->encoding = encoding;
+  content->location = soap_strdup(soap, location);
+  content->description = soap_strdup(soap, description);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap_multipart*
+SOAP_FMAC2
+soap_next_multipart(struct soap_multipart *content)
+{ if (content)
+    return content->next;
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static void
+soap_select_mime_boundary(struct soap *soap)
+{ while (!soap->mime.boundary || soap_valid_mime_boundary(soap))
+  { register char *s = soap->mime.boundary;
+    register size_t n = 0;
+    if (s)
+      n = strlen(s);
+    if (n < 16)
+    { n = 64;
+      s = soap->mime.boundary = (char*)soap_malloc(soap, n + 1);
+      if (!s)
+        return;
+    }
+    strcpy(s, "==");
+    s += 2;
+    n -= 4;
+    while (n)
+    { *s++ = soap_base64o[soap_random & 0x3F];
+      n--;
+    }
+    strcpy(s, "==");
+  }
+  if (!soap->mime.start)
+    soap->mime.start = "<SOAP-ENV:Envelope>";
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_valid_mime_boundary(struct soap *soap)
+{ register struct soap_multipart *content;
+  register size_t k = strlen(soap->mime.boundary);
+  for (content = soap->mime.first; content; content = content->next)
+  { if (content->ptr && content->size >= k)
+    { register const char *p = (const char*)content->ptr; 
+      register size_t i;
+      for (i = 0; i < content->size - k; i++, p++)
+        if (!strncmp(p, soap->mime.boundary, k))
+          return SOAP_ERR;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	HTTP cookie handling
+ *
+\******************************************************************************/
+
+#ifdef WITH_COOKIES
+/******************************************************************************/
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_encode_cookie(const char *s, char *t, size_t len)
+{ register int c;
+  register size_t n = len;
+  while ((c = *s++) && --n > 0)
+  { if (c > ' ' && c < 128 && !strchr("()<>@,;:\\\"/[]?={}", c))
+      *t++ = c;
+    else if (n > 2)
+    { *t++ = '%';
+      *t++ = (c >> 4) + (c > 159 ? '7' : '0');
+      c &= 0xF;
+      *t++ = c + (c > 9 ? '7' : '0');
+      n -= 2;
+    }
+    else
+      break;
+  }
+  *t = '\0';
+  return len - n;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  size_t n;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (*path == '/')
+    path++;
+  n = strlen(path);
+  for (p = soap->cookies; p; p = p->next)
+    if (!strcmp(p->name, name)
+     && domain
+     && p->domain
+     && !strcmp(p->domain, domain)
+     && !strncmp(p->path, path, n))
+      break;
+  return p;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_set_cookie(struct soap *soap, const char *name, const char *value, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  int n;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set cookie: %s=%s domain=%s path=%s\n", name, value?value:"", domain?domain:"", path?path:""));
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return NULL;
+  }
+  if (*path == '/')
+    path++;
+  q = soap_cookie(soap, name, domain, path);
+  if (!q)
+  { if ((q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+    { if ((q->name = (char*)SOAP_MALLOC(soap, strlen(name)+1)))
+        strcpy(q->name, name);
+      q->value = NULL;
+      q->domain = NULL;
+      q->path = NULL;
+      q->expire = -1;
+      q->version = 0;
+      q->secure = 0;
+      q->modified = 0;
+      for (p = &soap->cookies, n = soap->cookie_max; *p && n; p = &(*p)->next, n--)
+        if (!strcmp((*p)->name, name) && (*p)->path && strcmp((*p)->path, path) < 0)
+          break;
+      if (n)
+      { q->next = *p;
+        *p = q;
+      }
+      else
+      { SOAP_FREE(soap, q->name);
+        SOAP_FREE(soap, q);
+        q = NULL;
+      }
+    }
+  }
+  else
+    q->modified = 1;
+  if (q)
+  { if (q->value)
+    { SOAP_FREE(soap, q->value);
+      q->value = NULL;
+    }
+    if (q->domain)
+    { SOAP_FREE(soap, q->domain);
+      q->domain = NULL;
+    }
+    if (q->path)
+    { SOAP_FREE(soap, q->path);
+      q->path = NULL;
+    }
+    if (value && *value && (q->value = (char*)SOAP_MALLOC(soap, strlen(value)+1)))
+      strcpy(q->value, value);
+    if (domain && *domain && (q->domain = (char*)SOAP_MALLOC(soap, strlen(domain)+1)))
+      strcpy(q->domain, domain);
+    if (path && *path && (q->path = (char*)SOAP_MALLOC(soap, strlen(path)+1)))
+      strcpy(q->path, path);
+    q->session = 1;
+    q->env = 0;
+  }
+  return q;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!domain)
+  { soap_set_receiver_error(soap, "Cookie domain not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (*path == '/')
+    path++;
+  for (p = &soap->cookies, q = *p; q; q = *p)
+    if (!strcmp(q->name, name) && !strcmp(q->domain, domain) && !strncmp(q->path, path, strlen(q->path)))
+    { if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+      p = &q->next;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_env_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)) && p->env)
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_cookie_expire(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->expire;
+  return -1;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_expire(struct soap *soap, const char *name, long expire, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->expire = expire;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 1;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_clr_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 0;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putsetcookies(struct soap *soap)
+{ struct soap_cookie *p;
+  char *s, tmp[4096];
+  const char *t;
+  for (p = soap->cookies; p; p = p->next)
+  { if (p->modified || !p->env)
+    { s = tmp;
+      if (p->name)
+        s += soap_encode_cookie(p->name, s, tmp-s+4064);
+      if (p->value && *p->value)
+      { *s++ = '=';
+        s += soap_encode_cookie(p->value, s, tmp-s+4064);
+      }
+      if (p->domain && (int)strlen(p->domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", p->domain);
+      else if (soap->cookie_domain && (int)strlen(soap->cookie_domain) < tmp-s+4064)
+        sprintf(s, ";Domain=\"%s\"", soap->cookie_domain);
+      strcat(s, ";Path=\"/");
+      if (p->path)
+        t = p->path;
+      else
+        t = soap->cookie_path;
+      if (t)
+      { if (*t == '/')
+          t++;
+        if ((int)strlen(t) < tmp-s+4064)
+          strcat(s, t);
+      }
+      s += strlen(s);
+      *s++ = '"';
+      if (p->version > 0)
+        sprintf(s, ";Version=%u", p->version);
+      if (p->expire >= 0)
+        sprintf(s, ";Max-Age=%ld", p->expire);
+      if (p->secure)
+        strcat(s, ";Secure");
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set-Cookie: %s\n", tmp));
+      if ((soap->error = soap->fposthdr(soap, "Set-Cookie", tmp)))
+        return soap->error;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putcookies(struct soap *soap, const char *domain, const char *path, int secure)
+{ struct soap_cookie **p, *q;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  char *s, tmp[4096];
+  p = &soap->cookies;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending cookies for domain=%s path=%s\n", domain, path));
+  if (*path == '/')
+    path++;
+  while ((q = *p))
+  { if (q->expire && now > q->expire)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie %s expired\n", q->name));
+      SOAP_FREE(soap, q->name);
+      if (q->value)
+        SOAP_FREE(soap, q->value);
+      if (q->domain)
+        SOAP_FREE(soap, q->domain);
+      if (q->path)
+        SOAP_FREE(soap, q->path);
+      *p = q->next;
+      SOAP_FREE(soap, q);
+    }
+    else
+    { size_t domlen = 0;
+      if (q->domain)
+      { const char *s = strchr(q->domain, ':');
+        if (s)
+	  domlen = s - q->domain;
+	else
+          domlen = strlen(q->domain);
+      }
+      if ((!q->domain || !strncmp(q->domain, domain, domlen))
+          && (!q->path || !strncmp(q->path, path, strlen(q->path)))
+          && (!q->secure || secure))
+      { s = tmp;
+        if (q->version != version)
+        { sprintf(s, "$Version=%u;", q->version);
+          version = q->version;
+        }
+        if (q->name)
+          s += soap_encode_cookie(q->name, s, tmp-s+4080);
+        if (q->value && *q->value)
+        { *s++ = '=';
+          s += soap_encode_cookie(q->value, s, tmp-s+4080);
+        }
+        if (q->path && (int)strlen(q->path) < tmp-s+4080)
+        { sprintf(s, ";$Path=\"/%s\"", (*q->path == '/' ? q->path + 1 : q->path));
+          s += strlen(s);
+        }
+        if (q->domain && (int)strlen(q->domain) < tmp-s+4080)
+          sprintf(s, ";$Domain=\"%s\"", q->domain);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie: %s\n", tmp));
+        if ((soap->error = soap->fposthdr(soap, "Cookie", tmp)))
+          return soap->error;
+      }
+      p = &q->next;
+    }
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_getcookies(struct soap *soap, const char *val)
+{ struct soap_cookie *p = NULL, *q;
+  const char *s;
+  char *t, tmp[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  char *domain = NULL;
+  char *path = NULL;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  if (!val)
+    return;
+  s = val;
+  while (*s)
+  { s = soap_decode_key(tmp, sizeof(tmp), s);
+    if (!soap_tag_cmp(tmp, "$Version"))
+    { if ((s = soap_decode_val(tmp, sizeof(tmp), s)))
+      { if (p)
+          p->version = (int)atol(tmp);
+        else
+          version = (int)atol(tmp);
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Path"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->path)
+          SOAP_FREE(soap, p->path);
+        p->path = t;
+      }
+      else
+      { if (path)
+          SOAP_FREE(soap, path);
+        path = t;
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Domain"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->domain)
+          SOAP_FREE(soap, p->domain);
+	p->domain = t;
+      }
+      else
+      { if (domain)
+          SOAP_FREE(soap, domain);
+        domain = t;
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Path"))
+    { if (p->path)
+        SOAP_FREE(soap, p->path);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->path = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->path, tmp);
+      }
+      else
+        p->path = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Domain"))
+    { if (p->domain)
+        SOAP_FREE(soap, p->domain);
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((p->domain = (char*)SOAP_MALLOC(soap, strlen(tmp)+1)))
+          strcpy(p->domain, tmp);
+      }
+      else
+        p->domain = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Version"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->version = (unsigned int)atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Max-Age"))
+    { s = soap_decode_val(tmp, sizeof(tmp), s);
+      p->expire = now + atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Expires"))
+    { struct tm T;
+      char a[3]; 
+      static const char mns[] = "anebarprayunulugepctovec";
+      s = soap_decode_val(tmp, sizeof(tmp), s);
+      if (strlen(tmp) > 20)
+      { memset((void*)&T, 0, sizeof(T));
+        a[0] = tmp[4];
+        a[1] = tmp[5];
+        a[2] = '\0';
+        T.tm_mday = (int)atol(a);
+        a[0] = tmp[8];
+        a[1] = tmp[9];
+        T.tm_mon = (strstr(mns, a) - mns) / 2;
+        a[0] = tmp[11];
+        a[1] = tmp[12];
+        T.tm_year = 100 + (int)atol(a);
+        a[0] = tmp[13];
+        a[1] = tmp[14];
+        T.tm_hour = (int)atol(a);
+        a[0] = tmp[16];
+        a[1] = tmp[17];
+        T.tm_min = (int)atol(a);
+        a[0] = tmp[19];
+        a[1] = tmp[20];
+        T.tm_sec = (int)atol(a);
+        p->expire = soap_timegm(&T);
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Secure"))
+      p->secure = 1;
+    else
+    { if (p)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+        if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+        { q->version = p->version;
+          q->expire = p->expire;
+          q->secure = p->secure;
+          q->env = 1;
+        }
+        if (p->name)
+          SOAP_FREE(soap, p->name);
+        if (p->value)
+          SOAP_FREE(soap, p->value);
+        if (p->domain)
+          SOAP_FREE(soap, p->domain);
+        if (p->path)
+          SOAP_FREE(soap, p->path);
+        SOAP_FREE(soap, p);
+      }
+      if ((p = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      { p->name = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+        strcpy(p->name, tmp);
+        s = soap_decode_val(tmp, sizeof(tmp), s);
+        if (*tmp)
+        { p->value = (char*)SOAP_MALLOC(soap, strlen(tmp)+1);
+          strcpy(p->value, tmp);
+        }
+        else
+          p->value = NULL;
+        p->domain = domain;
+        p->path = path;
+        p->expire = 0;
+        p->secure = 0;
+        p->version = version;
+      }
+    }
+  }
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+    if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+    { q->version = p->version;
+      q->expire = p->expire;
+      q->secure = p->secure;
+      q->env = 1;
+    }
+    if (p->name)
+      SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+  if (domain)
+    SOAP_FREE(soap, domain);
+  if (path)
+    SOAP_FREE(soap, path);
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getenv_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  const char *s;
+  char key[4096], val[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  if (!(s = getenv("HTTP_COOKIE")))
+    return SOAP_ERR;
+  do
+  { s = soap_decode_key(key, sizeof(key), s);
+    s = soap_decode_val(val, sizeof(val), s);
+    p = soap_set_cookie(soap, key, val, NULL, NULL);
+    if (p)
+      p->env = 1;
+  } while (*s);
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_copy_cookies(struct soap *soap)
+{ struct soap_cookie *p, **q, *r;
+  q = &r;
+  for (p = soap->cookies; p; p = p->next)
+  { if (!(*q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie))))
+      return r;
+    **q = *p;
+    if (p->name)
+    { if (((*q)->name = (char*)SOAP_MALLOC(soap, strlen(p->name)+1)))
+        strcpy((*q)->name, p->name);
+    }
+    if (p->value)
+    { if (((*q)->value = (char*)SOAP_MALLOC(soap, strlen(p->value)+1)))
+        strcpy((*q)->value, p->value);
+    }
+    if (p->domain)
+    { if (((*q)->domain = (char*)SOAP_MALLOC(soap, strlen(p->domain)+1)))
+        strcpy((*q)->domain, p->domain);
+    }
+    if (p->path)
+    { if (((*q)->path = (char*)SOAP_MALLOC(soap, strlen(p->path)+1)))
+        strcpy((*q)->path, p->path);
+    }
+    q = &(*q)->next;
+  }
+  *q = NULL;
+  return r;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  for (p = soap->cookies; p; p = soap->cookies)
+  { soap->cookies = p->next;
+    SOAP_FREE(soap, p->name);
+    if (p->value)
+      SOAP_FREE(soap, p->value);
+    if (p->domain)
+      SOAP_FREE(soap, p->domain);
+    if (p->path)
+      SOAP_FREE(soap, p->path);
+    SOAP_FREE(soap, p);
+  }
+}
+
+/******************************************************************************/
+#endif /* WITH_COOKIES */
+
+/******************************************************************************/
+#ifdef WITH_GZIP
+#ifndef PALM_1
+static int
+soap_getgziphdr(struct soap *soap)
+{ int i;
+  soap_wchar c, f = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get gzip header\n"));
+  for (i = 0; i < 9; i++)
+  { if ((int)(c = soap_get1(soap) == EOF))
+      return soap->error = SOAP_EOF;
+    if (i == 2)
+      f = c;
+  }
+  if (f & 0x04) /* FEXTRA */
+  { for (i = soap_get1(soap) | (soap_get1(soap) << 8); i; i--)
+      if ((int)soap_get1(soap) == EOF)
+        return soap->error = SOAP_EOF;
+  }
+  if (f & 0x08) /* FNAME */
+    do
+      c = soap_get1(soap);
+    while (c && (int)c != EOF);
+  if ((int)c != EOF && (f & 0x10)) /* FCOMMENT */
+    do
+      c = soap_get1(soap);
+    while (c && (int)f != EOF);
+  if ((int)c != EOF && (f & 0x01)) /* FHCRC */
+  { if ((int)(c = soap_get1(soap)) != EOF)
+      c = soap_get1(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_recv(struct soap *soap)
+{ soap_wchar c;
+  soap->error = SOAP_OK;
+  soap_free(soap);
+  soap_set_local_namespaces(soap);
+  soap->version = 0;	/* don't assume we're parsing SOAP content by default */
+#ifndef WITH_NOIDREF
+  soap_free_iht(soap);
+#endif
+  if ((soap->imode & SOAP_IO) == SOAP_IO_CHUNK)
+    soap->omode |= SOAP_IO_CHUNK;
+  soap->imode &= ~SOAP_IO;
+  soap->mode = soap->imode;
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  soap->ahead = 0;
+  soap->peeked = 0;
+  soap->level = 0;
+  soap->part = SOAP_BEGIN;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  *soap->endpoint = '\0';
+  soap->action = NULL;
+#ifndef WITH_LEANER
+  soap->dom = NULL;
+  soap->dime.chunksize = 0;
+  soap->dime.buflen = 0;
+  soap->dime.list = NULL;
+  soap->dime.first = NULL;
+  soap->dime.last = NULL;
+  soap->mime.list = NULL;
+  soap->mime.first = NULL;
+  soap->mime.last = NULL;
+  soap->mime.boundary = NULL;
+  soap->mime.start = NULL;
+  soap->xlist = NULL;
+#endif
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket))
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->recvfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->recvfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#ifdef WITH_ZLIB
+  soap->mode &= ~SOAP_ENC_ZLIB;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.next_in = Z_NULL;
+  soap->d_stream.avail_in = 0;
+  soap->d_stream.next_out = (Byte*)soap->buf;
+  soap->d_stream.avail_out = SOAP_BUFLEN;
+  soap->z_ratio_in = 1.0;
+#endif
+#ifndef WITH_LEANER
+  if (soap->fprepareinit)
+    soap->fprepareinit(soap);
+#endif
+  c = soap_getchar(soap);
+#ifdef WITH_GZIP
+  if (c == 0x1F)
+  { if (soap_getgziphdr(soap))
+      return soap->error;
+    if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+    soap->zlib_state = SOAP_ZLIB_INFLATE;
+    soap->mode |= SOAP_ENC_ZLIB;
+    soap->zlib_in = SOAP_ZLIB_GZIP;
+    soap->z_crc = crc32(0L, NULL, 0);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    /* should not chunk over plain transport, so why bother to check? */
+    /* if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) */
+    /*   soap->z_buflen = soap->bufidx; */
+    /* else */
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+    soap->z_buflen = soap->buflen;
+    soap->buflen = soap->bufidx;
+    c = soap_getchar(soap);
+  }  
+#endif
+#ifndef WITH_LEANER
+  if (c == '-' && soap_get0(soap) == '-')
+    soap->mode |= SOAP_ENC_MIME;
+  else if ((c & 0xFFFC) == (SOAP_DIME_VERSION | SOAP_DIME_MB) && (soap_get0(soap) & 0xFFF0) == 0x20)
+    soap->mode |= SOAP_ENC_DIME;
+  else
+#endif
+  { while (soap_blank(c))
+      c = soap_getchar(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  soap_unget(soap, c);
+#ifndef WITH_NOHTTP
+  /* if not XML or (start of)BOM or MIME/DIME/ZLIB, assume HTTP header */
+  if (c != '<' && c != 0xEF && !(soap->mode & (SOAP_ENC_MIME | SOAP_ENC_DIME | SOAP_ENC_ZLIB)))
+  { soap->mode &= ~SOAP_IO;
+    soap->error = soap->fparse(soap);
+    if (soap->error && soap->error < SOAP_STOP)
+    { soap->keep_alive = 0; /* force close later */
+      return soap->error;
+    }
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { soap->chunkbuflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+      soap->chunksize = 0;
+    }
+#ifndef WITH_LEANER
+    else if (soap->fpreparerecv && soap->buflen != soap->bufidx)
+      soap->fpreparerecv(soap, soap->buf + soap->bufidx, soap->buflen - soap->bufidx);
+#endif
+#ifdef WITH_ZLIB
+    if (soap->zlib_in != SOAP_ZLIB_NONE)
+    { /* fparse should not use soap_unget to push back last char */
+#ifdef WITH_GZIP
+      c = soap_get1(soap);
+      if (c == 0x1F)
+      { if (soap_getgziphdr(soap))
+          return soap->error;
+        if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        soap->z_crc = crc32(0L, NULL, 0);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+      }
+      else
+      { soap_revget1(soap);
+#else
+      {
+#endif
+        if (inflateInit(&soap->d_stream) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate initialized\n"));
+      }
+      soap->mode |= SOAP_ENC_ZLIB;
+      memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+      soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+      soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+    }
+#endif
+    if (soap->error)
+    { if (soap->error == SOAP_FORM && soap->fform)
+      { soap->error = soap->fform(soap);
+        if (soap->error == SOAP_OK)
+          soap->error = SOAP_STOP; /* prevents further processing */
+      }
+      return soap->error;
+    }
+  }
+#endif
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_MIME)
+  { if (soap_getmimehdr(soap))
+      return soap->error;
+    if (soap_get_header_attribute(soap, soap->mime.first->type, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+  }
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap->dime.flags & SOAP_DIME_CF)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked DIME SOAP message\n"));
+      soap->dime.chunksize = soap->dime.size;
+      if (soap->buflen - soap->bufidx >= soap->dime.chunksize)
+      { soap->dime.buflen = soap->buflen;
+        soap->buflen = soap->bufidx + soap->dime.chunksize;
+      }
+      else
+        soap->dime.chunksize -= soap->buflen - soap->bufidx;
+    }
+    soap->count = soap->buflen - soap->bufidx;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse(struct soap *soap)
+{ char header[SOAP_HDRLEN], *s;
+  unsigned short get = 0, status = 0, k = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Waiting for HTTP request/response...\n"));
+  *soap->endpoint = '\0';
+  soap->length = 0;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->action = NULL;
+  soap->authrealm = NULL;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return soap->error;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP status: %s\n", soap->msgbuf));
+    for (;;)
+    { if (soap_getline(soap, header, SOAP_HDRLEN))
+      { if (soap->error == SOAP_EOF)
+	{ soap->error = SOAP_OK;
+          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "EOF in HTTP header, continue anyway\n"));
+	  break;
+	}
+        return soap->error;
+      }
+      if (!*header)
+        break;
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP header: %s\n", header));
+      s = strchr(header, ':');
+      if (s)
+      { *s = '\0';
+        do s++;
+        while (*s && *s <= 32);
+        if ((soap->error = soap->fparsehdr(soap, header, s)))
+        { if (soap->error < SOAP_STOP)
+	    return soap->error;
+	  status = soap->error;
+	  soap->error = SOAP_OK;
+        }
+      }
+    }
+    if ((s = strchr(soap->msgbuf, ' ')))
+    { k = (unsigned short)soap_strtoul(s, &s, 10);
+      if (!soap_blank(*s))
+        k = 0;
+    }
+    else
+      k = 0;
+  } while (k == 100);
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Finished HTTP header parsing\n"));
+  s = strstr(soap->msgbuf, "HTTP/");
+  if (s && s[7] != '1')
+  { if (soap->keep_alive == 1)
+      soap->keep_alive = 0;
+    if (k == 0 && (soap->omode & SOAP_IO) == SOAP_IO_CHUNK) /* k == 0 for HTTP request */
+    { soap->imode |= SOAP_IO_CHUNK;
+      soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE;
+    }
+  }
+  if (soap->keep_alive < 0)
+    soap->keep_alive = 1;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Keep alive connection = %d\n", soap->keep_alive));
+  if (s && (((get = !strncmp(soap->msgbuf, "GET ", 4))) || !strncmp(soap->msgbuf, "POST ", 5)))
+  { size_t m = strlen(soap->endpoint);
+    size_t n = m + (s - soap->msgbuf) - 5 - (!get);
+    if (n >= sizeof(soap->endpoint))
+      n = sizeof(soap->endpoint) - 1;
+    strncpy(soap->path, soap->msgbuf + 4 + (!get), n - m);
+    soap->path[n - m] = '\0';
+    strcat(soap->endpoint, soap->path);
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Target endpoint='%s'\n", soap->endpoint));
+    if (get)
+    { soap->error = soap->fget(soap);
+      if (soap->error == SOAP_OK)
+        soap->error = SOAP_STOP; /* prevents further processing */
+      return soap->error;
+    }
+    if (status)
+      return soap->error = status;
+    return SOAP_OK;
+  }
+  if (k == 0 || (k >= 200 && k <= 299) || k == 400 || k == 500)
+    return SOAP_OK;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP error %d\n", k));
+  return soap_set_receiver_error(soap, "HTTP error", soap->msgbuf, k);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_parse_header(struct soap *soap, const char *key, const char *val)
+{ if (!soap_tag_cmp(key, "Host"))
+  { 
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+      strcpy(soap->endpoint, "https://");
+    else
+#endif
+      strcpy(soap->endpoint, "http://");
+    strncat(soap->endpoint, val, sizeof(soap->endpoint) - 8);
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifndef WITH_LEANER
+  else if (!soap_tag_cmp(key, "Content-Type"))
+  { if (soap_get_header_attribute(soap, val, "application/dime"))
+      soap->mode |= SOAP_ENC_DIME;
+    else if (soap_get_header_attribute(soap, val, "multipart/related")
+          || soap_get_header_attribute(soap, val, "multipart/form-data"))
+    { soap->mime.boundary = soap_strdup(soap, soap_get_header_attribute(soap, val, "boundary"));
+      soap->mime.start = soap_strdup(soap, soap_get_header_attribute(soap, val, "start"));
+      soap->mode |= SOAP_ENC_MIME;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Content-Length"))
+    soap->length = soap_strtoul(val, NULL, 10);
+  else if (!soap_tag_cmp(key, "Content-Encoding"))
+  { if (!soap_tag_cmp(val, "deflate"))
+#ifdef WITH_ZLIB
+      soap->zlib_in = SOAP_ZLIB_DEFLATE;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+    else if (!soap_tag_cmp(val, "gzip"))
+#ifdef WITH_GZIP
+      soap->zlib_in = SOAP_ZLIB_GZIP;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+  }
+#ifdef WITH_ZLIB
+  else if (!soap_tag_cmp(key, "Accept-Encoding"))
+  {
+#ifdef WITH_GZIP
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "gzip"))
+      soap->zlib_out = SOAP_ZLIB_GZIP;
+    else
+#endif
+    if (strchr(val, '*') || soap_get_header_attribute(soap, val, "deflate"))
+      soap->zlib_out = SOAP_ZLIB_DEFLATE;
+    else
+      soap->zlib_out = SOAP_ZLIB_NONE;
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Transfer-Encoding"))
+  { soap->mode &= ~SOAP_IO;
+    if (!soap_tag_cmp(val, "chunked"))
+      soap->mode |= SOAP_IO_CHUNK;
+  }
+  else if (!soap_tag_cmp(key, "Connection"))
+  { if (!soap_tag_cmp(val, "keep-alive"))
+      soap->keep_alive = -soap->keep_alive;
+    else if (!soap_tag_cmp(val, "close"))
+      soap->keep_alive = 0;
+  }
+#ifndef WITH_LEAN
+  else if (!soap_tag_cmp(key, "Authorization"))
+  { if (!soap_tag_cmp(val, "Basic *"))
+    { int n;
+      char *s;
+      soap_base642s(soap, val + 6, soap->tmpbuf, sizeof(soap->tmpbuf) - 1, &n);
+      soap->tmpbuf[n] = '\0';
+      if ((s = strchr(soap->tmpbuf, ':')))
+      { *s = '\0';
+	soap->userid = soap_strdup(soap, soap->tmpbuf);
+	soap->passwd = soap_strdup(soap, s + 1);
+      }
+    }
+  }
+  else if (!soap_tag_cmp(key, "WWW-Authenticate"))
+    soap->authrealm = soap_strdup(soap, soap_get_header_attribute(soap, val + 6, "realm"));
+  else if (!soap_tag_cmp(key, "Expect"))
+  { if (!soap_tag_cmp(val, "100-continue"))
+    { if ((soap->error = soap->fposthdr(soap, "HTTP/1.1 100 Continue", NULL))
+       || (soap->error = soap->fposthdr(soap, NULL, NULL)))
+        return soap->error;
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "SOAPAction"))
+  { if (*val == '"')
+    { soap->action = soap_strdup(soap, val + 1);
+      soap->action[strlen(soap->action) - 1] = '\0';
+    }
+  }
+  else if (!soap_tag_cmp(key, "Location"))
+  { strncpy(soap->endpoint, val, sizeof(soap->endpoint));
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+#ifdef WITH_COOKIES
+  else if (!soap_tag_cmp(key, "Cookie") || !soap_tag_cmp(key, "Set-Cookie"))
+    soap_getcookies(soap, val);
+#endif
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_get_header_attribute(struct soap *soap, const char *line, const char *key)
+{ register const char *s = line;
+  if (s)
+  { while (*s)
+    { register short flag;
+      s = soap_decode_key(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      flag = soap_tag_cmp(soap->tmpbuf, key);
+      s = soap_decode_val(soap->tmpbuf, sizeof(soap->tmpbuf), s);
+      if (!flag)
+        return soap->tmpbuf;
+    }
+  }
+  return NULL;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_key(char *buf, size_t len, const char *val)
+{ return soap_decode(buf, len, val, "=,;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_val(char *buf, size_t len, const char *val)
+{ if (*val != '=')
+  { *buf = '\0';
+    return val;
+  }
+  return soap_decode(buf, len, val + 1, ",;");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
+#ifndef PALM_1
+static const char*
+soap_decode(char *buf, size_t len, const char *val, const char *sep)
+{ const char *s;
+  char *t = buf;
+  for (s = val; *s; s++)
+    if (*s != ' ' && *s != '\t' && !strchr(sep, *s))
+      break;
+  if (*s == '"')
+  { s++;
+    while (*s && *s != '"' && --len)
+      *t++ = *s++;
+  }
+  else
+  { while (soap_notblank(*s) && !strchr(sep, *s) && --len)
+    { if (*s == '%')
+      { *t++ = ((s[1] >= 'A' ? (s[1] & 0x7) + 9 : s[1] - '0') << 4)
+              + (s[2] >= 'A' ? (s[2] & 0x7) + 9 : s[2] - '0');
+        s += 3;
+      }
+      else
+        *t++ = *s++;
+    }
+  }
+  *t = '\0';
+  while (*s && !strchr(sep, *s))
+    s++;
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_out(struct soap *soap)
+{
+#ifndef WITH_LEANER
+  size_t n = 0;
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->mime.start)
+  { const char *s;
+    if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+      s = "application/dime";
+    else if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+    sprintf(soap->tmpbuf, "--%s\r\nContent-Type: %s\r\nContent-Transfer-Encoding: binary\r\nContent-ID: %s\r\n\r\n", soap->mime.boundary, s, soap->mime.start);
+    n = strlen(soap->tmpbuf);
+    if (soap_send_raw(soap, soap->tmpbuf, n))
+      return soap->error;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    soap->dime.size = soap->count;	/* DIME in MIME correction */
+  if (!(soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME))
+  { if (soap_putdimehdr(soap))
+      return soap->error;
+  }
+#endif
+  soap->part = SOAP_IN_ENVELOPE;
+  return soap_element_begin_out(soap, "SOAP-ENV:Envelope", 0, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Envelope"))
+    return soap->error;
+#ifndef WITH_LEANER
+  if ((soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+  { soap->dime.size = soap->count - soap->dime.size;	/* DIME in MIME correction */
+    sprintf(soap->id, soap->dime_id_format, 0);
+    soap->dime.id = soap->id;
+    if (soap->local_namespaces)
+    { if (soap->local_namespaces[0].out)
+        soap->dime.type = (char*)soap->local_namespaces[0].out;
+      else
+        soap->dime.type = (char*)soap->local_namespaces[0].ns;
+    }
+    soap->dime.options = NULL;
+    soap->dime.flags = SOAP_DIME_MB | SOAP_DIME_ABSURI;
+    if (!soap->dime.first)
+      soap->dime.flags |= SOAP_DIME_ME;
+    soap->count += 12 + ((strlen(soap->dime.id)+3)&(~3)) + ((strlen(soap->dime.type)+3)&(~3));
+  }
+  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
+    return soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
+#endif
+  soap->part = SOAP_END_ENVELOPE;
+  return SOAP_OK;
+} 
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_in(struct soap *soap)
+{ register struct Namespace *p;
+  soap->part = SOAP_IN_ENVELOPE;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Envelope", 0))
+    return soap->error = SOAP_VERSIONMISMATCH;
+  p = soap->local_namespaces;
+  if (p)
+  { const char *ns = p[0].out;
+    if (!ns)
+      ns = p[0].ns;
+    if (!strcmp(ns, soap_env1))
+    { soap->version = 1; /* make sure we use SOAP 1.1 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc1))))
+        strcpy(p[1].out, soap_enc1);
+    }
+    else if (!strcmp(ns, soap_env2))
+    { soap->version = 2; /* make sure we use SOAP 1.2 */
+      if (p[1].out)
+        SOAP_FREE(soap, p[1].out);
+      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc2))))
+        strcpy(p[1].out, soap_enc2);
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_in(struct soap *soap)
+{ soap->part = SOAP_END_ENVELOPE;
+  return soap_element_end_in(soap, "SOAP-ENV:Envelope");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_out(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap->version == 1)
+    soap->encoding = 1;
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_XML_SEC) && soap_set_attr(soap, "wsu:Id", "Body"))
+    return soap->error;
+#endif
+  if (soap_element(soap, "SOAP-ENV:Body", 0, NULL))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Body"))
+    return soap->error;
+  soap->part = SOAP_END_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_in(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Body", 0))
+    return soap->error;
+  if (!soap->body)
+    soap->part = SOAP_NO_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_in(struct soap *soap)
+{ if (soap->part == SOAP_NO_BODY)
+    return SOAP_OK;
+  soap->part = SOAP_END_BODY;
+  return soap_element_end_in(soap, "SOAP-ENV:Body");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_header(struct soap *soap)
+{ if (soap_getheader(soap) && soap->error == SOAP_TAG_MISMATCH)
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_endpoint(struct soap *soap, const char *endpoint)
+{ register const char *s;
+  register size_t i, n;
+  soap->endpoint[0] = '\0';
+  soap->host[0] = '\0';
+  soap->path[0] = '/';
+  soap->path[1] = '\0';
+  soap->port = 80;
+  if (!endpoint || !*endpoint)
+    return;
+  if (!strncmp(endpoint, "https:", 6))
+    soap->port = 443;
+  strncpy(soap->endpoint, endpoint, sizeof(soap->endpoint) - 1);
+  s = strchr(endpoint, ':');
+  if (s && s[1] == '/' && s[2] == '/')
+    s += 3;
+  else
+    s = endpoint;
+  n = strlen(s);
+  if (n >= sizeof(soap->host))
+    n = sizeof(soap->host) - 1;
+#ifdef WITH_IPV6
+  if (s[0] == '[')
+  { s++;
+    for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == ']')
+      { s++;
+        break; 
+      }
+    }
+  }
+  else
+  { for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == '/' || s[i] == ':')
+        break; 
+    }
+  }
+#else
+  for (i = 0; i < n; i++)
+  { soap->host[i] = s[i];
+    if (s[i] == '/' || s[i] == ':')
+      break; 
+  }
+#endif
+  soap->host[i] = '\0';
+  if (s[i] == ':')
+  { soap->port = (int)atol(s + i + 1);
+    for (i++; i < n; i++)
+      if (s[i] == '/')
+        break;
+  }
+  if (s[i])
+  { strncpy(soap->path, s + i, sizeof(soap->path));
+    soap->path[sizeof(soap->path) - 1] = '\0';
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect(struct soap *soap, const char *endpoint, const char *action)
+{ return soap_connect_command(soap, SOAP_POST, endpoint, action);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect_command(struct soap *soap, int http_command, const char *endpoint, const char *action)
+{ char host[sizeof(soap->host)];
+  int port;
+  size_t count;
+  soap->error = SOAP_OK;
+  strcpy(host, soap->host); /* save to compare */
+  port = soap->port; /* save to compare */
+  soap_set_endpoint(soap, endpoint);
+#ifndef WITH_LEANER
+  if (soap->fconnect)
+  { if ((soap->error = soap->fconnect(soap, endpoint, soap->host, soap->port)))
+      return soap->error;
+  }
+  else
+#endif
+  if (soap->fopen && *soap->host)
+  { soap->status = http_command;
+    if (!soap->keep_alive || !soap_valid_socket(soap->socket) || strcmp(soap->host, host) || soap->port != port || !soap->fpoll || soap->fpoll(soap))
+    { soap->keep_alive = 0; /* to force close */
+      soap->omode &= ~SOAP_IO_UDP; /* to force close */
+      soap_closesock(soap);
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Connect/reconnect to host='%s' path='%s' port=%d\n", soap->host, soap->path, soap->port));
+#ifdef WITH_UDP
+      if (!strncmp(endpoint, "soap.udp:", 9))
+        soap->omode |= SOAP_IO_UDP;
+#endif
+      soap->socket = soap->fopen(soap, endpoint, soap->host, soap->port);
+      if (soap->error)
+        return soap->error;
+      soap->keep_alive = ((soap->omode & SOAP_IO_KEEPALIVE) != 0);
+    }
+  }
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML) && endpoint)
+  { unsigned int k = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((k & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fpost(soap, endpoint, soap->host, soap->port, soap->path, action, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((k & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = k;
+  }
+  else if (action)
+    soap->action = soap_strdup(soap, action);
+  if (http_command != SOAP_POST)
+    return soap_end_send(soap);
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2base64(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register int i;
+  register unsigned long m;
+  register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, (n + 2) / 3 * 4 + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (!s)
+    return p;
+  for (; n > 2; n -= 3, s += 3)
+  { m = s[0];
+    m = (m << 8) | s[1];
+    m = (m << 8) | s[2];
+    for (i = 4; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    t += 4;
+  }
+  t[0] = '\0';
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      t[i] = '=';
+    t[4] = '\0';
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_base642s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register int i, j, c;
+  register unsigned long m;
+  register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = (strlen(s) + 3) / 4 * 3;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  if (n)
+    *n = 0;
+  for (;;)
+  { for (i = 0; i < SOAP_BLKLEN; i++)
+    { m = 0;
+      j = 0;
+      while (j < 4)
+      { c = *s++;
+        if (c == '=' || !c)
+        { i *= 3;
+          switch (j)
+          { case 2:
+              *t++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *t++ = (char)((m >> 10) & 0xFF);
+              *t++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+	    *n += i;
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      }
+      *t++ = (char)((m >> 16) & 0xFF);
+      *t++ = (char)((m >> 8) & 0xFF);
+      *t++ = (char)(m & 0xFF);
+      if (l < 3)
+      { if (n)
+	  *n += i;
+        return p;
+      }
+      l -= 3;
+    }
+    if (n)
+      *n += 3 * SOAP_BLKLEN;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_s2hex(struct soap *soap, const unsigned char *s, char *t, int n)
+{ register char *p;
+  if (!t)
+    t = (char*)soap_malloc(soap, 2 * n + 1);
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  t[0] = '\0';
+  if (s)
+  { for (; n > 0; n--)
+    { register int m = *s++;
+      *t++ = (char)((m >> 4) + (m > 159 ? 'a' - 10 : '0'));
+      m &= 0x0F;
+      *t++ = (char)(m + (m > 9 ? 'a' - 10 : '0'));
+    }
+  }
+  *t++ = '\0';
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_hex2s(struct soap *soap, const char *s, char *t, size_t l, int *n)
+{ register const char *p;
+  if (!s || !*s)
+  { if (n)
+      *n = 0;
+    if (soap->error)
+      return NULL;
+    return SOAP_NON_NULL;
+  }
+  if (!t)
+  { l = strlen(s) / 2;
+    t = (char*)soap_malloc(soap, l);
+  }
+  if (!t)
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  p = t;
+  while (l)
+  { register int d1, d2;
+    d1 = *s++;
+    if (!d1)
+      break;
+    d2 = *s++;
+    if (!d2)
+      break;
+    *t++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    l--;
+  }
+  if (n)
+    *n = t - p;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthttphdr(struct soap *soap, int status, size_t count)
+{ register const char *s = NULL;
+  register int err = SOAP_OK;
+#ifndef WITH_LEANER
+  register const char *r = NULL;
+#endif
+  if (status == SOAP_FILE && soap->http_content)
+    s = soap->http_content;
+  else if (status == SOAP_HTML)
+    s = "text/html; charset=utf-8";
+  else if (count || ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK))
+  { if (soap->version == 2)
+      s = "application/soap+xml; charset=utf-8";
+    else
+      s = "text/xml; charset=utf-8";
+  }
+#ifndef WITH_LEANER
+  if (soap->mode & (SOAP_ENC_DIME | SOAP_ENC_MTOM))
+  { if (soap->mode & SOAP_ENC_MTOM)
+    { r = s;
+      s = "application/xop+xml; charset=utf-8";
+    }
+    else
+      s = "application/dime";
+  }
+  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->status != SOAP_GET)
+  { register const char *t = strchr(s, ';');
+    sprintf(soap->tmpbuf, "multipart/related; boundary=\"%s\"; type=\"", soap->mime.boundary);
+    if (t)
+      strncat(soap->tmpbuf, s, t - s);
+    else
+      strcat(soap->tmpbuf, s);
+    if (soap->mime.start)
+    { strcat(soap->tmpbuf, "\"; start=\"");
+      strcat(soap->tmpbuf, soap->mime.start);
+    }
+    strcat(soap->tmpbuf, "\"");
+    if (r)
+    { strcat(soap->tmpbuf, "; start-info=\"");
+      strcat(soap->tmpbuf, r);
+      strcat(soap->tmpbuf, "\"");
+    }
+    s = soap->tmpbuf;
+  }
+#endif
+  if (s && (err = soap->fposthdr(soap, "Content-Type", s)))
+    return err;
+#ifdef WITH_ZLIB
+  if (soap->omode & SOAP_ENC_ZLIB)
+  {
+#ifdef WITH_GZIP
+    err = soap->fposthdr(soap, "Content-Encoding", "gzip");
+#else
+    err = soap->fposthdr(soap, "Content-Encoding", "deflate");
+#endif
+    if (err)
+      return err;
+  }
+#endif
+#ifndef WITH_LEANER
+  if ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK)
+    err = soap->fposthdr(soap, "Transfer-Encoding", "chunked");
+  else
+#endif
+  if (soap->status != SOAP_GET)
+  { sprintf(soap->tmpbuf, "%lu", (unsigned long)count);
+    err = soap->fposthdr(soap, "Content-Length", soap->tmpbuf);
+  }
+  if (err)
+    return err;
+  return soap->fposthdr(soap, "Connection", soap->keep_alive ? "keep-alive" : "close");
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_get(struct soap *soap)
+{ return SOAP_GET_METHOD;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post(struct soap *soap, const char *endpoint, const char *host, int port, const char *path, const char *action, size_t count)
+{ register const char *s;
+  register int err;
+  if (soap->status == SOAP_GET)
+    s = "GET";
+  else
+    s = "POST";
+#ifdef PALM
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)) && strncmp(endpoint, "_beam:", 6) && strncmp(endpoint, "_local:", 7) && strncmp(endpoint, "_btobex:", 8))
+#else
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)))
+#endif
+    return SOAP_OK;
+  if (soap->proxy_host && strncmp(endpoint, "https:", 6))
+    sprintf(soap->tmpbuf, "%s %s HTTP/%s", s, endpoint, soap->http_version);
+  else
+    sprintf(soap->tmpbuf, "%s /%s HTTP/%s", s, (*path == '/' ? path + 1 : path), soap->http_version);
+  if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+    return err;
+  if (port != 80)
+    sprintf(soap->tmpbuf, "%s:%d", host, port);
+  else
+    strcpy(soap->tmpbuf, host); 
+  if ((err = soap->fposthdr(soap, "Host", soap->tmpbuf))
+   || (err = soap->fposthdr(soap, "User-Agent", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, SOAP_OK, count)))
+    return err;
+#ifdef WITH_ZLIB
+#ifdef WITH_GZIP
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "gzip, deflate")))
+#else
+  if ((err = soap->fposthdr(soap, "Accept-Encoding", "deflate")))
+#endif
+    return err;
+#endif
+#ifndef WITH_LEAN
+  if (soap->userid && soap->passwd && strlen(soap->userid) + strlen(soap->passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Authorization", soap->tmpbuf)))
+      return err;
+  }
+  if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+      return err;
+  }
+#endif
+#ifdef WITH_COOKIES
+#ifdef WITH_OPENSSL
+  if (soap_putcookies(soap, host, path, soap->ssl != NULL))
+    return soap->error;
+#else
+  if (soap_putcookies(soap, host, path, 0))
+    return soap->error;
+#endif
+#endif
+  if (action && soap->version == 1)
+  { sprintf(soap->tmpbuf, "\"%s\"", action);
+    if ((err = soap->fposthdr(soap, "SOAPAction", soap->tmpbuf)))
+      return err;
+  }
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_send_header(struct soap *soap, const char *s)
+{ register const char *t;
+  do
+  { t = strchr(s, '\n'); /* disallow \n in HTTP headers */
+    if (!t)
+      t = s + strlen(s);
+    if (soap_send_raw(soap, s, t - s))
+      return soap->error;
+    s = t + 1;
+  } while (*t);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_post_header(struct soap *soap, const char *key, const char *val)
+{ if (key)
+  { if (http_send_header(soap, key))
+      return soap->error;
+    if (val && (soap_send_raw(soap, ": ", 2) || http_send_header(soap, val)))
+      return soap->error;
+  }
+  return soap_send_raw(soap, "\r\n", 2);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+static int
+http_response(struct soap *soap, int status, size_t count)
+{ register int err;
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+    httpOutputEnable(soap->rpmreqid);
+#endif
+  if (!status || status == SOAP_HTML || status == SOAP_FILE)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "OK 200\n"));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s 200 OK", soap->http_version);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", "200 OK")))
+      return err;
+  }
+  else if (status > 200 && status < 600)
+  { sprintf(soap->tmpbuf, "HTTP/%s %d %s", soap->http_version, status, http_error(soap, status));
+    if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      return err;
+#ifndef WITH_LEAN 
+    if (status == 401)
+    { sprintf(soap->tmpbuf, "Basic realm=\"%s\"", soap->authrealm ? soap->authrealm : "gSOAP Web Service");
+      if ((err = soap->fposthdr(soap, "WWW-Authenticate", soap->tmpbuf)))
+        return err;
+    }
+    else if ((status >= 301 && status <= 303) || status == 307)
+    { if ((err = soap->fposthdr(soap, "Location", soap->endpoint)))
+        return err;
+    }
+#endif
+  }
+  else
+  { const char *s = *soap_faultcode(soap);
+    if (soap->version == 2 && !strcmp(s, "SOAP-ENV:Sender"))
+      s = "400 Bad Request";
+    else
+      s = "500 Internal Server Error";
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error %s (status=%d)\n", s, status));
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+#endif
+    { sprintf(soap->tmpbuf, "HTTP/%s %s", soap->http_version, s);
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return err;
+    }
+    else if ((err = soap->fposthdr(soap, "Status", s)))
+      return err;
+  }
+  if ((err = soap->fposthdr(soap, "Server", "gSOAP/2.7"))
+   || (err = soap_puthttphdr(soap, status, count)))
+    return err;
+#ifdef WITH_COOKIES
+  if (soap_putsetcookies(soap))
+    return soap->error;
+#endif
+  return soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_response(struct soap *soap, int status)
+{ register size_t count;
+  if (!(soap->omode & (SOAP_ENC_XML | SOAP_IO_STORE /* this tests for chunking too */))
+   && (status == SOAP_HTML || status == SOAP_FILE))
+  { soap->omode &= ~SOAP_IO;
+    soap->omode |= SOAP_IO_STORE;
+  }
+  soap->status = status;
+  count = soap_count_attachments(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+#ifndef WITH_NOHTTP
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML))
+  { register int n = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((n & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fresponse(soap, status, count)))
+      return soap->error;
+#ifndef WITH_LEANER
+    if ((n & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+#endif
+    soap->mode = n;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static const char*
+soap_set_validation_fault(struct soap *soap, const char *s, const char *t)
+{ if (*soap->tag)
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s in element <%s>", s, t?t:SOAP_STR_EOS, soap->tag);
+  else
+    sprintf(soap->msgbuf, "Validation constraint violation: %s%s", s, t?t:SOAP_STR_EOS);
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_fault(struct soap *soap)
+{ const char **c = soap_faultcode(soap);
+  const char **s = soap_faultstring(soap);
+  if (!*c && !*s && soap->fseterror)
+    soap->fseterror(soap, c, s);
+  if (!*c)
+  { if (soap->version == 2)
+      *c = "SOAP-ENV:Sender";
+    else
+      *c = "SOAP-ENV:Client";
+  }
+  if (*s)
+    return;
+  switch (soap->error)
+  {
+#ifndef WITH_LEAN
+    case SOAP_CLI_FAULT:
+      *s = "Client fault";
+      break;
+    case SOAP_SVR_FAULT:
+      *s = "Server fault";
+      break;
+    case SOAP_TAG_MISMATCH:
+      *s = soap_set_validation_fault(soap, "tag name or namespace mismatch", NULL);
+      break;
+    case SOAP_TYPE:
+      *s = soap_set_validation_fault(soap, "data type mismatch ", soap->type);
+      break;
+    case SOAP_SYNTAX_ERROR:
+      *s = "Well-formedness violation";
+      break;
+    case SOAP_NO_TAG:
+      *s = "No XML element tag";
+      break;
+    case SOAP_MUSTUNDERSTAND:
+      *c = "SOAP-ENV:MustUnderstand";
+      sprintf(soap->msgbuf, "The data in element '%s' must be understood but cannot be handled", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_VERSIONMISMATCH:
+      *c = "SOAP-ENV:VersionMismatch";
+      *s = "SOAP version mismatch or invalid SOAP message";
+      break;
+    case SOAP_DATAENCODINGUNKNOWN:
+      *c = "SOAP-ENV:DataEncodingUnknown";
+      *s = "Unsupported SOAP data encoding";
+      break;
+    case SOAP_NAMESPACE:
+      *s = soap_set_validation_fault(soap, "namespace mismatch", NULL);
+      break;
+    case SOAP_USER_ERROR:
+      *s = "User error";
+      break;
+    case SOAP_FATAL_ERROR:
+      *s = "Fatal error";
+      break;
+    case SOAP_NO_METHOD:
+      sprintf(soap->msgbuf, "Method '%s' not implemented: method name or namespace not recognized", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_GET_METHOD:
+      *s = "HTTP GET method not implemented";
+      break;
+    case SOAP_EOM:
+      *s = "Out of memory";
+      break;
+    case SOAP_IOB:
+      *s = "Array index out of bounds";
+      break;
+    case SOAP_NULL:
+      *s = soap_set_validation_fault(soap, "nil not allowed", NULL);
+      break;
+    case SOAP_DUPLICATE_ID:
+      *s = soap_set_validation_fault(soap, "multiple definitions of id ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:DuplicateID";
+      break;
+    case SOAP_MISSING_ID:
+      *s = soap_set_validation_fault(soap, "missing id for ref ", soap->id);
+      if (soap->version == 2)
+        *soap_faultsubcode(soap) = "SOAP-ENC:MissingID";
+      break;
+    case SOAP_HREF:
+      *s = soap_set_validation_fault(soap, "incompatible object ref ", soap->id);
+      break;
+    case SOAP_FAULT:
+      break;
+#ifndef WITH_NOIO
+    case SOAP_UDP_ERROR:
+      *s = "Message too large for UDP packet";
+      break;
+    case SOAP_TCP_ERROR:
+      *s = tcp_error(soap);
+      break;
+#endif
+    case SOAP_HTTP_ERROR:
+      *s = "HTTP error";
+      break;
+    case SOAP_SSL_ERROR:
+#ifdef WITH_OPENSSL
+      *s = "SSL error";
+#else
+      *s = "OpenSSL not installed: recompile with -DWITH_OPENSSL";
+#endif
+      break;
+    case SOAP_PLUGIN_ERROR:
+      *s = "Plugin registry error";
+      break;
+    case SOAP_DIME_ERROR:
+      *s = "DIME format error";
+      break;
+    case SOAP_DIME_HREF:
+      *s = "DIME href to missing attachment";
+      break;
+    case SOAP_DIME_MISMATCH:
+      *s = "DIME version/transmission error";
+      break;
+    case SOAP_DIME_END:
+      *s = "End of DIME error";
+      break;
+    case SOAP_MIME_ERROR:
+      *s = "MIME format error";
+      break;
+    case SOAP_MIME_HREF:
+      *s = "MIME href to missing attachment";
+      break;
+    case SOAP_MIME_END:
+      *s = "End of MIME error";
+      break;
+    case SOAP_ZLIB_ERROR:
+#ifdef WITH_ZLIB
+      sprintf(soap->msgbuf, "Zlib/gzip error: '%s'", soap->d_stream.msg?soap->d_stream.msg:"");
+      *s = soap->msgbuf;
+#else
+      *s = "Zlib/gzip not installed for (de)compression: recompile with -DWITH_GZIP";
+#endif
+      break;
+    case SOAP_REQUIRED:
+      *s = soap_set_validation_fault(soap, "missing required attribute", NULL);
+      break;
+    case SOAP_PROHIBITED:
+      *s = soap_set_validation_fault(soap, "prohibited attribute present", NULL);
+      break;
+    case SOAP_OCCURS:
+      *s = soap_set_validation_fault(soap, "min/maxOccurs violation", NULL);
+      break;
+    case SOAP_LENGTH:
+      *s = soap_set_validation_fault(soap, "content length violation", NULL);
+      break;
+    case SOAP_STOP:
+      *s = "Stopped: no response sent";
+      break;
+#endif
+    case SOAP_EOF:
+#ifndef WITH_NOIO
+      sprintf(soap->msgbuf, "End of file or no input: '%s'", soap_strerror(soap));
+      *s = soap->msgbuf;
+      break;
+#else
+      *s = "End of file or no input";
+      break;
+#endif
+    default:
+#ifndef WITH_NOHTTP
+#ifndef WITH_LEAN
+      if (soap->error > 200 && soap->error < 600)
+      { sprintf(soap->msgbuf, "HTTP Error: %d %s", soap->error, http_error(soap, soap->error));
+        *s = soap->msgbuf;
+      }
+      else
+#endif
+#endif
+      { sprintf(soap->msgbuf, "Error %d", soap->error);
+        *s = soap->msgbuf;
+      }
+    }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_fault(struct soap *soap)
+{ register int status = soap->error;
+  int r = 1;
+  if (status == SOAP_STOP)
+    return status;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Sending back fault struct for error code %d\n", soap->error));
+  soap->keep_alive = 0; /* to terminate connection */
+  soap_set_fault(soap);
+#ifndef WITH_NOIO
+#ifndef WITH_LEAN
+  if (soap_valid_socket(soap->socket))
+  { struct timeval timeout;
+    fd_set rfd, sfd;
+    timeout.tv_sec = 0;
+    timeout.tv_usec = 0;
+    FD_ZERO(&rfd);
+    FD_ZERO(&sfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &rfd);
+    FD_SET((SOAP_SOCKET)soap->socket, &sfd);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, NULL, &timeout);
+    if (r > 0)
+    { if (!FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
+       || (FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
+        && recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) < 0))
+        r = 0;
+    }
+  }
+#endif
+#endif
+  if ((status != SOAP_EOF || (!soap->recv_timeout && !soap->send_timeout)) && r > 0)
+  { soap->error = SOAP_OK;
+    soap_serializeheader(soap);
+    soap_serializefault(soap);
+    soap_begin_count(soap);
+    if (soap->mode & SOAP_IO_LENGTH)
+    { soap_envelope_begin_out(soap);
+      soap_putheader(soap);
+      soap_body_begin_out(soap);
+      soap_putfault(soap);
+      soap_body_end_out(soap);
+      soap_envelope_end_out(soap);
+    }
+    soap_end_count(soap);
+    if (soap_response(soap, status)
+     || soap_envelope_begin_out(soap)
+     || soap_putheader(soap)
+     || soap_body_begin_out(soap)
+     || soap_putfault(soap)
+     || soap_body_end_out(soap)
+     || soap_envelope_end_out(soap))
+      return soap_closesock(soap);
+    soap_end_send(soap);
+  }
+  soap->error = status;
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_fault(struct soap *soap)
+{ register int status = soap->error;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Receiving SOAP Fault\n"));
+  soap->error = SOAP_OK;
+  if (soap_getfault(soap))
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Error: soap_get_soapfault() failed. Is this a SOAP message at all?\n"));
+    *soap_faultcode(soap) = (soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client");
+    soap->error = status;
+    soap_set_fault(soap);
+  }
+  else
+  { register const char *s = *soap_faultcode(soap);
+    if (!soap_match_tag(soap, s, "SOAP-ENV:Server") || !soap_match_tag(soap, s, "SOAP-ENV:Receiver"))
+      status = SOAP_SVR_FAULT; 
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:Client") || !soap_match_tag(soap, s, "SOAP-ENV:Sender"))
+      status = SOAP_CLI_FAULT;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:MustUnderstand"))
+      status = SOAP_MUSTUNDERSTAND;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:VersionMismatch"))
+      status = SOAP_VERSIONMISMATCH;
+    else
+    { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Fault code %s\n", s));
+      status = SOAP_FAULT;
+    }
+    if (soap_body_end_in(soap)
+     || soap_envelope_end_in(soap)
+     || soap_end_recv(soap))
+      return soap_closesock(soap);
+    soap->error = status;
+  }
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_empty_response(struct soap *soap)
+{ soap->count = 0;
+  if (soap_response(soap, SOAP_OK) || soap_end_send(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOHTTP
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_empty_response(struct soap *soap)
+{ if (soap_begin_recv(soap) || soap_end_recv(soap))
+    return soap_closesock(soap);
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_NOIO
+#ifndef PALM_1
+static const char*
+soap_strerror(struct soap *soap)
+{ register int err = soap->errnum;
+  if (err)
+  {
+#ifndef WIN32
+    return strerror(err);
+#else
+    FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, (LPTSTR)&soap->errorstr, sizeof(soap->errorstr), NULL);
+    return soap->errorstr;
+#endif
+  }
+  return "Operation interrupted or timed out";
+}
+#endif
+#endif 
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_set_error(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail, int soaperror)
+{ *soap_faultcode(soap) = faultcode;
+  if (faultsubcode)
+    *soap_faultsubcode(soap) = faultsubcode;
+  *soap_faultstring(soap) = faultstring;
+  if (faultdetail && *faultdetail)
+  { register const char **s = soap_faultdetail(soap);
+    if (s)
+      *s = faultdetail;
+  }
+  return soap->error = soaperror;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_sender_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_receiver_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", NULL, faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_copy_fault(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ char *r = NULL, *s = NULL, *t = NULL;
+  if (faultsubcode)
+    r = soap_strdup(soap, faultsubcode);
+  if (faultstring)
+    s = soap_strdup(soap, faultstring);
+  if (faultdetail)
+    t = soap_strdup(soap, faultdetail);
+  return soap_set_error(soap, faultcode, r, s, t, SOAP_FAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_sender_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_receiver_fault_subcode(soap, NULL, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultsubcode, faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault(struct soap *soap, FILE *fd)
+{ if (soap_check_state(soap))
+    fprintf(fd, "Error: soap struct not initialized\n");
+  else if (soap->error)
+  { const char *c, *v = NULL, *s, **d;
+    d = soap_faultcode(soap);
+    if (!*d)
+      soap_set_fault(soap);
+    c = *d;
+    if (soap->version == 2)
+      v = *soap_faultsubcode(soap);
+    s = *soap_faultstring(soap);
+    d = soap_faultdetail(soap);
+    fprintf(fd, "%s%d fault: %s [%s]\n\"%s\"\nDetail: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, c, v ? v : "no subcode", s ? s : "[no reason]", d && *d ? *d : "[no detail]");
+  }
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault_location(struct soap *soap, FILE *fd)
+{ 
+#ifndef WITH_LEAN
+  int i, j, c1, c2;
+  if (soap->error && soap->buflen > 0)
+  { i = (int)soap->bufidx - 1;
+    if (i <= 0)
+      i = 0;
+    c1 = soap->buf[i];
+    soap->buf[i] = '\0';
+    if ((int)soap->buflen >= i + 1024)
+      j = i + 1023;
+    else
+      j = (int)soap->buflen - 1;
+    c2 = soap->buf[j];
+    soap->buf[j] = '\0';
+    fprintf(fd, "%s%c\n** HERE **\n", soap->buf, c1);
+    if (soap->bufidx < soap->buflen)
+      fprintf(fd, "%s\n", soap->buf + soap->bufidx);
+    soap->buf[i] = c1;
+    soap->buf[j] = c2;
+  }
+#endif
+}
+#endif
+#endif
+ 
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void *arg)
+{ register struct soap_plugin *p;
+  register int r;
+  if (!(p = (struct soap_plugin*)SOAP_MALLOC(soap, sizeof(struct soap_plugin))))
+    return soap->error = SOAP_EOM;
+  p->id = NULL;
+  p->data = NULL;
+  p->fcopy = NULL;
+  p->fdelete = NULL;
+  r = fcreate(soap, p, arg);
+  if (!r && p->fdelete)
+  { p->next = soap->plugins;
+    soap->plugins = p;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Registered '%s' plugin\n", p->id));
+    return SOAP_OK;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not register plugin '%s': plugin returned error %d (or fdelete callback not set)\n", p->id?p->id:"?", r));
+  SOAP_FREE(soap, p);
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static void *
+fplugin(struct soap *soap, const char *id)
+{ register struct soap_plugin *p;
+  for (p = soap->plugins; p; p = p->next)
+    if (p->id == id || !strcmp(p->id, id))
+      return p->data;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void *
+SOAP_FMAC2
+soap_lookup_plugin(struct soap *soap, const char *id)
+{ return soap->fplugin(soap, id);
+}
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap()
+{ soap_init(this);
+}
+#endif
+#endif
+
+/******************************************************************************\
+ *
+ *	C++ soap struct methods
+ *
+\******************************************************************************/
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode mode)
+{ soap_init1(this, mode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(soap_mode imode, soap_mode omode)
+{ soap_init2(this, imode, omode);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::soap(struct soap& soap)
+{ soap_copy_context(this, &soap);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+#ifndef WITH_LEAN
+soap::~soap()
+{ soap_destroy(this);
+  soap_end(this);
+  soap_done(this);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/stdsoap2.h b/stdsoap2.h
new file mode 100644
index 0000000..0c259c9
--- /dev/null
+++ b/stdsoap2.h
@@ -0,0 +1,2104 @@
+/*
+
+stdsoap2.h 2.7.6e
+
+gSOAP runtime
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL, the gSOAP public license, or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+Contributors:
+
+Wind River Systems, Inc., for the following additions (marked WR[...]):
+  - vxWorks compatible
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(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.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#ifdef WITH_SOAPDEFS_H
+# include "soapdefs.h"		/* include user-defined stuff */
+#endif
+
+#ifndef _THREAD_SAFE
+# define _THREAD_SAFE
+#endif
+
+#ifndef OPENSERVER
+# ifndef _REENTRANT
+#  define _REENTRANT
+# endif
+#endif
+
+#ifndef SOAP_FMAC1	/* stdsoap2.h declaration macro */
+# define SOAP_FMAC1
+#endif
+
+#ifndef SOAP_FMAC2	/* stdsoap2.h declaration macro */
+# define SOAP_FMAC2
+#endif
+
+#ifndef SOAP_FMAC3	/* (de)serializer declaration macro */
+# define SOAP_FMAC3
+#endif
+
+#ifndef SOAP_FMAC3S	/* string converter for (de)serializer declaration macro */
+# define SOAP_FMAC3S SOAP_FMAC3
+#endif
+
+#ifndef SOAP_FMAC4	/* (de)serializer declaration macro */
+# define SOAP_FMAC4
+#endif
+
+#ifndef SOAP_FMAC4S	/* string converter for (de)serializer declaration macro */
+# define SOAP_FMAC4S SOAP_FMAC4
+#endif
+
+#ifndef SOAP_FMAC5	/* stub/skeleton declaration macro */
+# define SOAP_FMAC5
+#endif
+
+#ifndef SOAP_FMAC6	/* stub/skeleton declaration macro */
+# define SOAP_FMAC6
+#endif
+
+#ifndef SOAP_CMAC	/* class declaration macro */
+# define SOAP_CMAC
+#endif
+
+#ifndef SOAP_NMAC	/* namespace table declaration macro */
+# define SOAP_NMAC
+#endif
+
+#ifndef SOAP_SOURCE_STAMP
+# define SOAP_SOURCE_STAMP(str)
+#endif
+
+/* gSOAP 2.7.4 and higher: fast look-aside buffering is stable */
+#ifndef WITH_FAST
+# define WITH_FAST
+#endif
+
+#ifdef WITH_LEANER
+# ifndef WITH_LEAN
+#  define WITH_LEAN
+# endif
+#endif
+
+#ifdef WITH_LEAN
+# ifdef WITH_COOKIES
+#  error "Cannot build WITH_LEAN code WITH_COOKIES enabled"
+# endif
+#endif
+
+#ifndef STDSOAP_H
+#define STDSOAP_H
+
+#if defined(__vxworks) || defined(__VXWORKS__)
+# define VXWORKS
+#endif
+
+#ifdef _WIN32
+# ifndef WIN32
+#  define WIN32
+# endif
+#endif
+
+#ifdef UNDER_CE
+# ifndef WIN32
+#  define WIN32
+# endif
+#endif
+
+#ifdef __BORLANDC__
+# ifdef __WIN32__
+#  ifndef WIN32
+#   define WIN32
+#  endif
+# endif
+#endif
+
+#ifdef __CYGWIN__
+# ifndef CYGWIN
+#  define CYGWIN
+# endif
+#endif
+
+#ifdef __SYMBIAN32__ 
+# define SYMBIAN
+# undef WIN32
+#endif
+
+#if defined(__palmos__) || defined(PALM_GCC) || defined(__PALMOS_TRAPS__)
+# ifndef PALM
+#  define PALM
+# endif
+#endif
+
+#if defined(__hpux)
+# ifndef HP_UX
+#  define HP_UX
+# endif
+#endif
+
+#if defined(__alpha) && !defined(__VMS)
+# ifndef TRU64
+#  define TRU64 
+# endif
+#endif
+
+#ifdef __MVS__
+# ifndef OS390
+#  define OS390
+# endif
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+# ifdef WITH_OPENSSL
+#  ifndef HAVE_OPENSSL_SSL_H
+#   undef WITH_OPENSSL
+#  endif
+# endif
+#else
+# if defined(UNDER_CE)
+#  define WITH_LEAN
+#  define HAVE_SSCANF
+# elif defined(WIN32)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define SOAP_LONG_FORMAT "%I64d"
+#  define SOAP_ULONG_FORMAT "%I64u"
+# elif defined(CYGWIN)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(__APPLE__)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_TIMEGM
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(_AIXVERSION_431)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(HP_UX)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(FREEBSD) || defined(__FreeBSD__)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_STRTOLL
+#  define HAVE_STRTOULL
+#  define HAVE_GETTIMEOFDAY
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define SOAP_LONG_FORMAT "%qd"
+#  define SOAP_ULONG_FORMAT "%qu"
+# elif defined(__VMS)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(__GLIBC__) || defined(__GNU__)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_STRTOLL
+#  define HAVE_STRTOULL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_TIMEGM
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define HAVE_ISNAN
+# elif defined(TRU64)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_STRTOLL
+#  define HAVE_STRTOULL
+#  define HAVE_GETTIMEOFDAY
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define __USE_STD_IOSTREAM
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+#  define SOAP_LONG_FORMAT "%ld"
+#  define SOAP_ULONG_FORMAT "%lu"
+# elif defined(MAC_CARBON)
+#  define WITH_NOIO
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GETHOSTBYNAME_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(PALM)
+#  define WITH_LEAN
+#  define HAVE_STRTOD   /* strtod() is defined in palmFunctions.h */
+#  include <stdlib.h>	/* Needs to be included before unix headers */
+#  include <sys_types.h>
+#  define IGNORE_STDIO_STUBS
+#  include <StdIOPalm.h>
+#  define O_NONBLOCK FNONBIO
+#  include <sys_socket.h>
+#  include "palmFunctions.h"
+# elif defined(SYMBIAN)
+#  define WITH_LEAN
+#  define WITH_NONAMESPACES
+#  define HAVE_STRTOD	/* use STRTOD since sscanf doesn't seem to work */
+#  include <e32def.h>
+#  include <sys/ioctl.h>
+# elif defined(VXWORKS)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_PGMTIME_R
+#  define HAVE_PLOCALTIME_R
+#  define HAVE_MKTIME
+# elif defined(OS390)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# elif defined(AS400)
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# else
+/* Default asumptions on supported functions */
+#  define HAVE_STRRCHR
+#  define HAVE_STRTOD
+#  define HAVE_SSCANF
+#  define HAVE_STRTOL
+#  define HAVE_STRTOUL
+#  define HAVE_SYS_TIMEB_H
+#  define HAVE_FTIME
+#  define HAVE_RAND_R
+#  define HAVE_GETHOSTBYNAME_R
+#  define HAVE_GMTIME_R
+#  define HAVE_LOCALTIME_R
+#  define HAVE_WCTOMB
+#  define HAVE_MBTOWC
+# endif
+#endif
+
+
+/************************************************/
+/* TPN (Jumper) specific definitions            */
+/************************************************/
+// We do not use wide-characters and these are not available on Android NDK
+#ifdef HAVE_WCTOMB
+#undef HAVE_WCTOMB
+#endif
+#ifdef HAVE_MBTOWC
+#undef HAVE_MBTOWC
+#endif
+// It uses wrong signature for android. Disable because we don't use networking anyway
+#ifdef HAVE_GETHOSTBYNAME_R
+#undef HAVE_GETHOSTBYNAME_R
+#endif
+/***********************************************/
+
+
+/* QNX does not have a working version of strtof */
+#if defined(__QNX__) || defined(QNX)
+# undef HAVE_STRTOF
+#endif
+
+#ifndef SOAP_LONG_FORMAT
+# define SOAP_LONG_FORMAT "%lld"	/* printf format for 64 bit ints */
+#endif
+
+#ifndef SOAP_ULONG_FORMAT
+# define SOAP_ULONG_FORMAT "%llu"	/* printf format for unsigned 64 bit ints */
+#endif
+
+#ifndef WITH_NOSTDLIB
+# include <stdlib.h>
+# ifndef PALM
+#  include <stdio.h>
+#  include <string.h>
+# endif
+# include <ctype.h>
+# include <limits.h>
+#endif
+
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+# include <string>
+# include <iostream>
+#endif
+
+#ifdef WITH_NOHTTP
+# ifndef WITH_NOIO
+////#  define WITH_NOIO     JCB+ESL TO DO !!!!: added the comment to make this work. This is very strange though!!
+#  undef WITH_COOKIES
+# endif
+#endif
+
+#ifndef UNDER_CE
+# ifndef PALM
+#  ifndef WITH_NOIO
+#   include <errno.h>
+#   include <sys/types.h>
+#  endif
+#  ifndef WITH_LEAN
+#   ifdef HAVE_SYS_TIMEB_H
+#    include <sys/timeb.h>		/* for ftime() */
+#   endif
+#   include <time.h>
+#  endif
+# endif
+#endif
+
+#ifdef OPENSERVER
+# include <sys/socket.h>
+# include <sys/stream.h>
+# include <sys/protosw.h>
+  extern int h_errno;
+#endif
+
+#ifndef WITH_NOIO
+# ifndef WIN32
+#  ifndef PALM
+#   include <sys/socket.h>
+#   ifdef VXWORKS
+#    include <sockLib.h>
+#    include <selectLib.h>
+#   endif
+#   ifndef VXWORKS
+#    ifndef SYMBIAN
+#     include <strings.h>
+#    endif
+#   endif
+#   ifdef SUN_OS
+#    include <sys/stream.h>		/* SUN */
+#    include <sys/socketvar.h>		/* SUN < 2.8 (?) */
+#   endif
+#   ifdef VXWORKS
+#    ifdef _WRS_KERNEL
+#     include <sys/times.h>
+#    endif
+#   else
+#    include <sys/time.h>
+#   endif
+#   include <netinet/in.h>
+#   ifdef OS390
+#    include <netinet/tcp_var.h>
+#   else
+#    include <netinet/tcp.h>          /* TCP_NODELAY */
+#   endif
+#   include <arpa/inet.h>
+#  endif
+# endif
+#endif
+
+#ifdef WITH_FASTCGI
+# include <fcgi_stdio.h>
+#endif
+
+#ifdef WITH_OPENSSL
+# define OPENSSL_NO_KRB5
+# include <openssl/ssl.h>
+# include <openssl/err.h>
+# include <openssl/rand.h>
+# ifndef ALLOW_OLD_VERSIONS
+#  if (OPENSSL_VERSION_NUMBER < 0x00905100L)
+#   error "Must use OpenSSL 0.9.6 or later"
+#  endif
+# endif
+#endif
+
+#ifdef WITH_GZIP
+# ifndef WITH_ZLIB
+#  define WITH_ZLIB
+# endif
+#endif
+
+#ifdef WITH_CASEINSENSITIVETAGS
+# define SOAP_STRCMP soap_tag_cmp	/* case insensitve XML element/attribute names */
+#else
+# define SOAP_STRCMP strcmp		/* case sensitive XML element/attribute names */
+#endif
+
+#ifdef WITH_ZLIB
+# include <zlib.h>
+#endif
+
+#ifndef WITH_NOSTDLIB
+# ifndef PALM
+#  include <math.h>	/* for isnan() */
+# endif
+#endif
+
+/* #define DEBUG */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and messages (in file TEST.log) */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef WIN32
+# ifndef UNDER_CE
+#  include <io.h>
+#  include <fcntl.h>
+# endif
+//# include <winsock.h>
+# include <winsock2.h> /* Alternative: use winsock2 (not available with eVC) */
+# ifdef WITH_IPV6
+#  include <ws2tcpip.h>
+#  include <wspiapi.h>
+# endif
+#else
+# ifdef VXWORKS
+#  include <hostLib.h>
+#  include <ioctl.h>
+#  include <ioLib.h>
+# endif
+# ifndef WITH_NOIO
+#  ifndef PALM
+#   include <netdb.h>
+#   include <netinet/in.h>
+#   include <unistd.h>
+#   include <fcntl.h>
+#  endif
+# endif
+#endif
+
+/* Portability: define SOAP_SOCKLEN_T */
+#ifndef SOAP_SOCKLEN_T
+#if defined(_AIX)
+# define SOAP_SOCKLEN_T socklen_t
+#elif defined(SOCKLEN_T)
+# define SOAP_SOCKLEN_T SOCKLEN_T
+#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) || defined(FREEBSD) || defined(__FreeBSD__) || defined(__QNX__) || defined(QNX)
+# define SOAP_SOCKLEN_T socklen_t
+#elif defined(IRIX) || defined(WIN32) || defined(__APPLE__) || defined(HP_UX) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS)
+# define SOAP_SOCKLEN_T int
+#else
+# define SOAP_SOCKLEN_T size_t
+#endif
+#endif // !SOAP_SOCKLEN_T
+
+#ifndef SOAP_SOCKET
+# ifdef WIN32
+#  define SOAP_SOCKET SOCKET
+# else
+#  define SOAP_SOCKET int
+#  define closesocket(n) close(n)
+# endif
+#endif
+
+#define SOAP_INVALID_SOCKET (-1)
+#define soap_valid_socket(n) ((n) != SOAP_INVALID_SOCKET)
+
+#if defined(SYMBIAN)
+# define LONG64 long
+# define ULONG64 unsigned LONG64
+#elif !defined(WIN32) || defined(__GLIBC__) || defined(__GNU__)
+# ifndef LONG64
+#  define LONG64 long long
+#  define ULONG64 unsigned LONG64
+# endif
+#elif defined(UNDER_CE)
+# define LONG64 __int64
+# define ULONG64 unsigned LONG64
+#elif defined(__BORLANDC__)
+# define LONG64 __int64
+# define ULONG64 unsigned LONG64
+#endif
+
+#if defined(WIN32)
+# define soap_int32 __int32
+#elif defined(SYMBIAN)
+# define soap_int32 long
+#elif defined(PALM)
+# define soap_int32 Int32
+#else
+# define soap_int32 int32_t
+#endif
+
+#ifdef WIN32
+# define SOAP_ERANGE ERANGE
+# define SOAP_EINTR WSAEINTR
+# define SOAP_EAGAIN WSAEWOULDBLOCK
+# define SOAP_EWOULDBLOCK WSAEWOULDBLOCK
+# define SOAP_EINPROGRESS WSAEINPROGRESS
+#else
+# define SOAP_ERANGE ERANGE
+# define SOAP_EINTR EINTR
+# define SOAP_EAGAIN EAGAIN
+# ifdef SYMBIAN
+#  define SOAP_EWOULDBLOCK 9898
+#  define SOAP_EINPROGRESS 9899
+# else
+#  define SOAP_EWOULDBLOCK EWOULDBLOCK
+#  define SOAP_EINPROGRESS EINPROGRESS
+# endif
+#endif
+
+#ifdef WIN32
+# ifdef UNDER_CE
+#  define soap_errno GetLastError()
+#  define soap_socket_errno GetLastError()
+#  define soap_reset_errno SetLastError(0)
+# else
+#  define soap_errno GetLastError()
+#  define soap_socket_errno WSAGetLastError()
+#  define soap_reset_errno SetLastError(0)
+# endif
+#else
+# ifndef WITH_NOIO
+#  define soap_errno errno
+#  define soap_socket_errno errno
+#  define soap_reset_errno (errno = 0)
+# else
+#  define soap_errno 0
+#  define soap_socket_errno 0
+#  define soap_reset_errno
+# endif
+#endif
+
+#ifndef SOAP_BUFLEN
+# ifdef WITH_UDP
+#  define SOAP_BUFLEN (65536) /* max UDP packet size */
+# else
+#  ifndef WITH_LEAN
+#   define SOAP_BUFLEN (65536) /* buffer length for socket packets, also used by gethostbyname_r so don't make this too small */
+#  else
+#   define SOAP_BUFLEN  (2048)
+#  endif
+# endif
+#endif
+#ifndef SOAP_LABLEN
+# define SOAP_LABLEN     (64) /* initial look-aside buffer length */
+#endif
+#ifndef SOAP_PTRBLK
+# define SOAP_PTRBLK     (32) /* block allocation for pointer hash table chains */
+#endif
+#ifndef SOAP_PTRHASH
+# ifndef WITH_LEAN
+#  define SOAP_PTRHASH (1024) /* size of pointer analysis hash table (must be power of 2) */
+# else
+#  define SOAP_PTRHASH   (32)
+# endif
+#endif
+#ifndef SOAP_IDHASH
+# ifndef WITH_LEAN
+#  define SOAP_IDHASH  (1999) /* prime size of hash table for parsed id/ref */
+# else
+#  define SOAP_IDHASH    (19) /* 19, 199 */
+# endif
+#endif
+#ifndef SOAP_BLKLEN
+# ifndef WITH_LEAN
+#  define SOAP_BLKLEN   (256) /* size of blocks to collect long strings and XML attributes */
+# else
+#  define SOAP_BLKLEN    (32)
+# endif
+#endif
+#ifndef SOAP_TAGLEN
+# ifndef WITH_LEAN
+#  define SOAP_TAGLEN  (1024) /* maximum length of XML element tag/attribute name or host/path name + 1 */
+# else
+#  define SOAP_TAGLEN    (64)
+# endif
+#endif
+#ifndef SOAP_HDRLEN
+# ifndef WITH_LEAN
+#  define SOAP_HDRLEN  (8192) /* maximum length of HTTP header line (must be >4096 to read cookies) */
+# else
+#  define SOAP_HDRLEN  (1024)
+# endif
+#endif
+#ifndef SOAP_MAXDIMS
+# ifndef WITH_LEAN
+#  define SOAP_MAXDIMS	 (16) /* maximum array dimensions (array nestings) must be less than 64 to protect soap->tmpbuf */
+# else
+#  define SOAP_MAXDIMS	  (4)
+# endif
+#endif
+
+#ifndef SOAP_MAXLOGS
+# define SOAP_MAXLOGS	  (3) /* max number of debug logs per struct soap environment */
+# define SOAP_INDEX_RECV  (0)
+# define SOAP_INDEX_SENT  (1)
+# define SOAP_INDEX_TEST  (2)
+#endif
+
+#ifndef SOAP_MAXKEEPALIVE
+# define SOAP_MAXKEEPALIVE (100) /* max iterations to keep server connection alive */
+#endif
+
+#ifndef SOAP_MAXARRAYSIZE
+# define SOAP_MAXARRAYSIZE (100000) /* "trusted" max size of inbound SOAP array for compound array allocation */
+#endif
+
+#ifdef VXWORKS
+# ifdef __INCmathh 
+#  include <private/mathP.h>
+#  ifndef HAVE_ISNAN
+#   define HAVE_ISNAN
+#  endif
+#  define soap_isnan(num) isNan(num)
+# endif
+#endif
+
+#ifdef WIN32 
+# include <float.h>
+# ifndef HAVE_ISNAN
+#  define HAVE_ISNAN
+# endif
+# define soap_isnan(num) _isnan(num)
+#endif
+
+#ifdef SUN_OS
+# define soap_isnan(n) isnan(n)
+#endif
+
+#if !defined(HAVE_ISNAN) && (defined(_MATH_H) || defined(_MATH_INCLUDED))
+# define HAVE_ISNAN
+#endif
+
+#ifndef soap_isnan
+# ifdef HAVE_ISNAN
+#  define soap_isnan(n) isnan(n)
+# else
+#  define soap_isnan(_) (0)
+# endif
+#endif
+
+extern const struct soap_double_nan { unsigned int n1, n2; } soap_double_nan;
+
+#ifdef VXWORKS
+# ifndef FLT_MAX
+#  define FLT_MAX _ARCH_FLT_MAX
+# endif
+# ifndef DBL_MAX
+#  define DBL_MAX _ARCH_DBL_MAX
+# endif
+#endif
+
+#ifndef FLT_NAN
+# ifdef HAVE_ISNAN
+#  define FLT_NAN (*(float*)(void*)&soap_double_nan)
+# else
+#  define FLT_NAN (0.0)
+# endif
+#endif
+
+#ifndef FLT_PINFTY
+# if defined(FLT_MAX)
+#  define FLT_PINFTY FLT_MAX
+# elif defined(HUGE_VALF)
+#  define FLT_PINFTY (float)HUGE_VALF
+# elif defined(HUGE_VAL)
+#  define FLT_PINFTY (float)HUGE_VAL
+# elif defined(FLOAT_MAX)
+#  define FLT_PINFTY FLOAT_MAX
+# else
+#  define FLT_PINFTY (3.40282347e+38F)
+# endif
+#endif
+
+#ifndef FLT_NINFTY
+# define FLT_NINFTY (-FLT_PINFTY)
+#endif
+
+#ifndef DBL_NAN
+# ifdef HAVE_ISNAN
+#  define DBL_NAN (*(double*)(void*)&soap_double_nan)
+# else
+#  define DBL_NAN (0.0)
+# endif
+#endif
+
+#ifndef DBL_PINFTY
+# if defined(DBL_MAX)
+#  define DBL_PINFTY DBL_MAX
+# elif defined(HUGE_VALF)
+#  define DBL_PINFTY (double)HUGE_VALF
+# elif defined(HUGE_VAL)
+#  define DBL_PINFTY (double)HUGE_VAL
+# elif defined(DOUBLE_MAX)
+#  define DBL_PINFTY DOUBLE_MAX
+# else
+#  define DBL_PINFTY (1.7976931348623157e+308)
+# endif
+#endif
+
+#ifndef DBL_NINFTY
+# define DBL_NINFTY (-DBL_PINFTY)
+#endif
+
+#define soap_ispinfd(n) ((n) >= DBL_PINFTY)
+#define soap_ispinff(n) ((n) >= FLT_PINFTY)
+#define soap_isninfd(n) ((n) <= DBL_NINFTY)
+#define soap_isninff(n) ((n) <= FLT_NINFTY)
+
+/* gSOAP error codes */
+
+#define SOAP_EOF			EOF
+#define SOAP_ERR			EOF
+#define SOAP_OK				0
+#define SOAP_CLI_FAULT			1
+#define SOAP_SVR_FAULT			2
+#define SOAP_TAG_MISMATCH		3
+#define SOAP_TYPE			4
+#define SOAP_SYNTAX_ERROR		5
+#define SOAP_NO_TAG			6
+#define SOAP_IOB			7
+#define SOAP_MUSTUNDERSTAND		8
+#define SOAP_NAMESPACE			9
+#define SOAP_USER_ERROR			10
+#define SOAP_FATAL_ERROR		11
+#define SOAP_FAULT			12
+#define SOAP_NO_METHOD			13
+#define SOAP_GET_METHOD			14
+#define SOAP_EOM			15
+#define SOAP_NULL			16
+#define SOAP_DUPLICATE_ID		17
+#define SOAP_MISSING_ID			18
+#define SOAP_HREF			19
+#define SOAP_UDP_ERROR			20
+#define SOAP_TCP_ERROR			21
+#define SOAP_HTTP_ERROR			22
+#define SOAP_SSL_ERROR			23
+#define SOAP_ZLIB_ERROR			24
+#define SOAP_DIME_ERROR			25
+#define SOAP_DIME_HREF			26
+#define SOAP_DIME_MISMATCH		27
+#define SOAP_DIME_END			28
+#define SOAP_MIME_ERROR			29
+#define SOAP_MIME_HREF			30
+#define SOAP_MIME_END			31
+#define SOAP_VERSIONMISMATCH		32
+#define SOAP_PLUGIN_ERROR		33
+#define SOAP_DATAENCODINGUNKNOWN	34
+#define SOAP_REQUIRED			35
+#define SOAP_PROHIBITED			36
+#define SOAP_OCCURS			37
+#define SOAP_LENGTH			38
+
+#define soap_xml_error_check(e) ((e) == SOAP_TAG_MISMATCH || (e) == SOAP_TAG_END || (e) == SOAP_SYNTAX_ERROR || (e) == SOAP_NAMESPACE || (e) == SOAP_DUPLICATE_ID || (e) == SOAP_MISSING_ID || (e) == SOAP_REQUIRED || (e) == SOAP_PROHIBITED || (e) == SOAP_OCCURS || (e) == SOAP_LENGTH || (e) == SOAP_NULL || (e) == SOAP_HREF)
+#define soap_soap_error_check(e) ((e) == SOAP_CLI_FAULT || (e) == SOAP_SVR_FAULT || (e) == SOAP_VERSIONMISMATCH || (e) == SOAP_MUSTUNDERSTAND || (e) == SOAP_FAULT || (e) == SOAP_NO_METHOD)
+#define soap_tcp_error_check(e) ((e) == SOAP_EOF || (e) == SOAP_TCP_ERROR)
+#define soap_ssl_error_check(e) ((e) == SOAP_SSL_ERROR)
+#define soap_zlib_error_check(e) ((e) == SOAP_ZLIB_ERROR)
+#define soap_http_error_check(e) ((e) == SOAP_HTTP_ERROR || (e) == SOAP_GET_METHOD || ((e) >= 100 && (e) < 600))
+
+/* gSOAP HTTP response status codes 100 to 599 are reserved */
+
+/* Codes 600 to 999 are user definable */
+
+/* Exceptional gSOAP HTTP response status codes >= 1000 */
+
+#define SOAP_STOP		1000	/* No HTTP response */
+#define SOAP_FORM		1001	/* Form request/response */
+#define SOAP_HTML		1002	/* Custom HTML response */
+#define SOAP_FILE		1003	/* Custom file-based response */
+
+/* gSOAP HTTP method codes */
+
+#define SOAP_POST		2000
+#define SOAP_GET		2001
+
+/* gSOAP DIME */
+
+#define SOAP_DIME_CF		0x01
+#define SOAP_DIME_ME		0x02
+#define SOAP_DIME_MB		0x04
+#define SOAP_DIME_VERSION	0x08 /* DIME version 1 */
+#define SOAP_DIME_MEDIA		0x10
+#define SOAP_DIME_ABSURI	0x20
+
+/* gSOAP ZLIB */
+
+#define SOAP_ZLIB_NONE		0x00
+#define SOAP_ZLIB_DEFLATE	0x01
+#define SOAP_ZLIB_INFLATE	0x02
+#define SOAP_ZLIB_GZIP		0x02
+
+/* gSOAP transport, connection, and content encoding modes */
+
+typedef soap_int32 soap_mode;
+
+#define SOAP_IO			0x00000003	/* IO mask */
+#define SOAP_IO_FLUSH		0x00000000	/* flush output immediately, no buffering */
+#define SOAP_IO_BUFFER		0x00000001	/* buffer output in packets of size SOAP_BUFLEN */
+#define SOAP_IO_STORE		0x00000002	/* store entire output to determine length for transport */
+#define SOAP_IO_CHUNK		0x00000003	/* use HTTP chunked transfer AND buffer packets */
+
+#define SOAP_IO_UDP		0x00000004
+#define SOAP_IO_LENGTH		0x00000008
+#define SOAP_IO_KEEPALIVE	0x00000010
+
+#define SOAP_ENC_LATIN		0x00800020	/* iso-8859-1 encoding */
+#define SOAP_ENC_XML		0x00000040	/* plain XML encoding, no HTTP header */
+#define SOAP_ENC_DIME		0x00000080
+#define SOAP_ENC_MIME		0x00000100
+#define SOAP_ENC_MTOM		0x00000200
+#define SOAP_ENC_ZLIB		0x00000400
+#define SOAP_ENC_SSL		0x00000800
+
+#define SOAP_ENC		0x00000FFF	/* IO and ENC mask */
+
+#define SOAP_XML_STRICT		0x00001000	/* strict validation */
+#define SOAP_XML_INDENT		0x00002000
+#define SOAP_XML_CANONICAL	0x00004000	/* EXC C14N canonical XML */
+#define SOAP_XML_TREE		0x00008000
+#define SOAP_XML_GRAPH		0x00010000
+#define SOAP_XML_NIL		0x00020000
+#define SOAP_XML_DOM		0x00040000
+#define SOAP_XML_SEC		0x00080000	/* reserved for WS security */
+
+#define SOAP_C_NOIOB		0x00100000
+#define SOAP_C_UTFSTRING	0x00200000
+#define SOAP_C_MBSTRING		0x00400000
+
+#define SOAP_DOM_TREE		0x01000000
+#define SOAP_DOM_NODE		0x02000000
+#define SOAP_DOM_ASIS		0x04000000
+
+#define SOAP_IO_DEFAULT		SOAP_IO_FLUSH
+
+/* SSL client/server authentication settings */
+
+#define SOAP_SSL_NO_AUTHENTICATION		0x00	/* for testing purposes */
+#define SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION	0x01	/* client requires server to authenticate */
+#define SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION	0x02	/* server requires client to authenticate */
+
+#define SOAP_SSL_DEFAULT			SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION
+
+/* state */
+
+#define SOAP_INIT	1
+#define SOAP_COPY	2
+
+#define soap_check_state(soap) (!(soap) || ((soap)->state != SOAP_INIT && (soap)->state != SOAP_COPY))
+
+/* part */
+
+#define SOAP_BEGIN		0
+#define SOAP_IN_ENVELOPE	2
+#define SOAP_IN_HEADER		3
+#define SOAP_END_HEADER		4
+#define SOAP_NO_BODY		5
+#define SOAP_IN_BODY		6
+#define SOAP_END_BODY		7
+#define SOAP_END_ENVELOPE	8
+#define SOAP_END		9
+#define SOAP_BEGIN_SECURITY	10
+#define SOAP_IN_SECURITY	11
+#define SOAP_END_SECURITY	12
+
+/* DEBUG macros */
+#ifdef SOAP_DEBUG
+# define SOAP_MALLOC(soap, size) soap_track_malloc(soap, __FILE__, __LINE__, size)
+# define SOAP_FREE(soap, ptr) soap_track_free(soap, __FILE__, __LINE__, ptr)
+#endif
+
+#ifndef SOAP_MALLOC			/* use libc malloc */
+# define SOAP_MALLOC(soap, size) malloc(size)
+#endif
+
+#ifndef SOAP_FREE			/* use libc free */
+# define SOAP_FREE(soap, ptr) free(ptr)
+#endif
+
+#ifdef SOAP_DEBUG
+# ifndef SOAP_MESSAGE
+#  define SOAP_MESSAGE fprintf
+# endif
+# ifndef DBGLOG
+#  define DBGLOG(DBGFILE, CMD) \
+{ if (soap)\
+  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
+      soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\
+    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
+    { FILE *fdebug = soap->fdebug[SOAP_INDEX_##DBGFILE];\
+      CMD;\
+      fflush(fdebug);\
+    }\
+  }\
+}
+# endif
+# ifndef DBGMSG
+#  define DBGMSG(DBGFILE, MSG, LEN) \
+{ if (soap)\
+  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
+      soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\
+    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
+    { fwrite((MSG), 1, (LEN), soap->fdebug[SOAP_INDEX_##DBGFILE]);\
+      fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\
+    }\
+  }\
+}
+# endif
+# ifndef DGBFUN
+#  define DBGFUN(FNAME) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s()\n", __FILE__, __LINE__, FNAME))
+#  define DBGFUN1(FNAME, FMT, ARG) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT")\n", __FILE__, __LINE__, FNAME, (ARG)))
+#  define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2)))
+#  define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2", "FMT3")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2), (ARG3)))
+# endif
+# ifndef DBGHEX
+#  define DBGHEX(DBGFILE, MSG, LEN) \
+{ if (soap)\
+  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
+      soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\
+    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
+    { int i; char *s;\
+      for (s = (char*)(MSG), i = (LEN); i; i--)\
+        fprintf(soap->fdebug[SOAP_INDEX_##DBGFILE], "%2.2hhX  ", *s++);\
+      fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\
+    }\
+  }\
+}
+# endif
+#else
+# define DBGLOG(DBGFILE, CMD)
+# define DBGMSG(DBGFILE, MSG, LEN)
+# define DBGFUN(FNAME)
+# define DBGFUN1(FNAME, FMT, ARG)
+# define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2)
+# define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3)
+# define DBGHEX(DBGFILE, MSG, LEN)
+#endif
+
+/* UCS-4 requires 32 bits (0-7FFFFFFF, the sign bit is used by gSOAP to distinguish XML entities) */
+typedef soap_int32 soap_wchar;
+
+/* namespace table row */
+struct Namespace
+{ const char *id;
+  const char *ns;
+  const char *in;
+  char *out;
+};
+
+/* namespace stack */
+struct soap_nlist
+{ struct soap_nlist *next;
+  unsigned int level; /* nesting depth level */
+  short index; /* corresponding entry in ns mapping table */
+  char *ns; /* only set when parsed ns URI is not in the ns mapping table */
+  char id[1]; /* the actual string value flows into the allocated region below this struct */
+};
+
+/* block stack for nested block allocations */
+struct soap_blist
+{ struct soap_blist *next;
+  char *ptr;
+  size_t size;
+};
+
+/* array layout */
+struct soap_array
+{ void *__ptr;
+  int __size;
+};
+
+/* pointer serialization management */
+struct soap_plist
+{ struct soap_plist *next;
+  const void *ptr;
+  const struct soap_array *array;
+  int type;
+  int id;
+  char mark1;
+  char mark2;
+};
+
+/* block allocation for pointer serialization management */
+struct soap_pblk
+{ struct soap_pblk *next;
+  struct soap_plist plist[SOAP_PTRBLK];
+};
+
+#ifdef SOAP_DEBUG
+/* malloc/free tracking for debugging */
+struct soap_mlist
+{ struct soap_mlist *next;
+  const void *ptr;
+  const char *file;
+  int line;
+  short live;
+};
+#endif
+
+/* class allocation list */
+struct soap_clist
+{ struct soap_clist *next;
+  void *ptr;
+  int type;
+  int size;
+  void (*fdelete)(struct soap_clist*);
+};
+
+/* attributes */
+struct soap_attribute
+{ struct soap_attribute *next;
+  char *value;
+  size_t size;
+  char *ns;
+  short visible;
+  char name[1]; /* the actual name string flows into the allocated region below this struct */
+};
+
+struct soap_cookie
+{ struct soap_cookie *next;
+  char *name;
+  char *value;
+  char *domain;
+  char *path;
+  long expire;		/* client-side: local time to expire; server-side: seconds to expire */
+  unsigned int version;
+  short secure;
+  short session;	/* server-side */
+  short env;		/* server-side: got cookie from client and should not be (re)send */
+  short modified;	/* server-side: client cookie was modified and should be send */
+};
+
+#ifdef __cplusplus
+SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*);
+
+class soap_multipart_iterator
+{ public:
+  struct soap_multipart *content;
+  bool operator==(const soap_multipart_iterator& iter) const
+    { return content == iter.content; }
+  bool operator!=(const soap_multipart_iterator& iter) const
+    { return content != iter.content; }
+  struct soap_multipart &operator*() const
+    { return *content; }
+  soap_multipart_iterator &operator++()
+    { content = soap_next_multipart(content); return *this; }
+  soap_multipart_iterator() : content(NULL)
+    { }
+  soap_multipart_iterator(struct soap_multipart *p) : content(p)
+    { }
+};
+#endif
+
+#ifndef WITH_LEANER
+struct soap_dime
+{ size_t count;
+  size_t size;
+  size_t chunksize;
+  size_t buflen;
+  char flags;
+  char *ptr;
+  const char *id;
+  const char *type;
+  const char *options;
+  struct soap_multipart *list;		/* list of DIME attachments received */
+  struct soap_multipart *first, *last;	/* temporary in/out queue */
+#ifdef __cplusplus
+  soap_multipart_iterator begin()
+    { soap_multipart_iterator iter(list); return iter; };
+  soap_multipart_iterator end()
+    { soap_multipart_iterator iter(NULL); return iter; };
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+struct soap_mime
+{ char *boundary;			/* MIME boundary */
+  const char *start;			/* MIME start ID */
+  struct soap_multipart *list;		/* list of MIME attachments received */
+  struct soap_multipart *first, *last;	/* temporary in/out queue */
+#ifdef __cplusplus
+  soap_multipart_iterator begin()
+    { soap_multipart_iterator iter(list); return iter; };
+  soap_multipart_iterator end()
+    { soap_multipart_iterator iter(NULL); return iter; };
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+/* RFC2045 MIME content transfer encodings */
+enum soap_mime_encoding
+{ SOAP_MIME_NONE,
+  SOAP_MIME_7BIT,
+  SOAP_MIME_8BIT,
+  SOAP_MIME_BINARY,
+  SOAP_MIME_QUOTED_PRINTABLE,
+  SOAP_MIME_BASE64,
+  SOAP_MIME_IETF_TOKEN,
+  SOAP_MIME_X_TOKEN
+};
+#endif
+
+#ifndef WITH_LEANER
+/* DIME/MIME multipart list */
+struct soap_multipart
+{ struct soap_multipart *next;
+  char *ptr;				/* points to raw data content */
+  size_t size;				/* size of data content */
+  const char *id;			/* DIME/MIME content ID or form data name */
+  const char *type;			/* DIME/MIME type (MIME type format) */
+  const char *options;			/* DIME options */
+  enum soap_mime_encoding encoding;	/* MIME Content-Transfer-Encoding */
+  const char *location;			/* MIME Content-Location (optional) */
+  const char *description;		/* MIME Content-Description (optional) */
+#ifdef __cplusplus
+  typedef soap_multipart_iterator iterator;
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+/* attachment DIME and MTOM XOP forwarding */
+struct soap_xlist
+{ struct soap_xlist *next;
+  unsigned char **ptr;
+  int *size;
+  char *id;
+  char **type;
+  char **options;
+};
+#endif
+
+/******************************************************************************/
+
+#ifndef WITH_LEANER
+#ifdef __cplusplus
+class soap_dom_attribute_iterator
+{ public:
+  struct soap_dom_attribute *att;
+  const char *nstr;
+  const char *name;
+  bool operator==(const soap_dom_attribute_iterator&) const;
+  bool operator!=(const soap_dom_attribute_iterator&) const;
+  struct soap_dom_attribute &operator*() const;
+  soap_dom_attribute_iterator &operator++();
+  soap_dom_attribute_iterator();
+  soap_dom_attribute_iterator(struct soap_dom_attribute*);
+  ~soap_dom_attribute_iterator();
+};
+#endif
+#endif
+
+#ifndef WITH_LEANER
+struct soap_dom_attribute
+{ struct soap_dom_attribute *next;
+  const char *nstr;
+  char *name;
+  char *data;
+  wchar_t *wide;
+  struct soap *soap;
+#ifdef __cplusplus
+  typedef soap_dom_attribute_iterator iterator;
+  struct soap_dom_attribute &set(const char *nstr, const char *name);	/* set namespace and name */
+  struct soap_dom_attribute &set(const char *data);		/* set data */
+  soap_dom_attribute_iterator begin();
+  soap_dom_attribute_iterator end();
+  soap_dom_attribute_iterator find(const char *nstr, const char *name);
+  void unlink();
+  soap_dom_attribute();
+  soap_dom_attribute(struct soap *soap);
+  soap_dom_attribute(struct soap *soap, const char *nstr, const char *name, const char *data);
+  ~soap_dom_attribute();
+#endif
+};
+#endif
+
+#ifndef WITH_LEANER
+#ifdef __cplusplus
+class soap_dom_element_iterator
+{ public:
+  struct soap_dom_element *elt;
+  const char *nstr;
+  const char *name;
+  int type;
+  bool operator==(const soap_dom_element_iterator&) const;
+  bool operator!=(const soap_dom_element_iterator&) const;
+  struct soap_dom_element &operator*() const;
+  soap_dom_element_iterator &operator++();
+  soap_dom_element_iterator();
+  soap_dom_element_iterator(struct soap_dom_element*);
+  ~soap_dom_element_iterator();
+};
+#endif
+#endif
+
+#ifndef WITH_LEANER
+struct soap_dom_element
+{ struct soap_dom_element *next;	/* next sibling */
+  struct soap_dom_element *prnt;	/* parent */
+  struct soap_dom_element *elts;	/* list of child elements */
+  struct soap_dom_attribute *atts;	/* list of attributes */
+  const char *nstr;			/* namespace string */
+  char *name;				/* element tag name */
+  char *data;				/* element content data (with SOAP_C_UTFSTRING flag set) */
+  wchar_t *wide;			/* element content data */
+  int type;				/* optional: serialized C/C++ data type */
+  void *node;				/* optional: pointer to serialized C/C++ data */
+  char *head;				/* leading whitespace to start tag */
+  char *tail;				/* leading whitespace to end tag */
+  struct soap *soap;			/* soap context that manages this node */
+#ifdef __cplusplus
+  typedef soap_dom_element_iterator iterator;
+  struct soap_dom_element &set(const char *nstr, const char *name);
+  struct soap_dom_element &set(const char *data);
+  struct soap_dom_element &set(void *node, int type);
+  struct soap_dom_element &add(struct soap_dom_element*);
+  struct soap_dom_element &add(struct soap_dom_element&);
+  struct soap_dom_element &add(struct soap_dom_attribute*);
+  struct soap_dom_element &add(struct soap_dom_attribute&);
+  soap_dom_element_iterator begin();
+  soap_dom_element_iterator end();
+  soap_dom_element_iterator find(const char *nstr, const char *name);
+  soap_dom_element_iterator find(int type);
+  void unlink();
+  soap_dom_element();
+  soap_dom_element(struct soap *soap);
+  soap_dom_element(struct soap *soap, const char *nstr, const char *name);
+  soap_dom_element(struct soap *soap, const char *nstr, const char *name, const char *data);
+  soap_dom_element(struct soap *soap, const char *nstr, const char *name, void *node, int type);
+  ~soap_dom_element();
+#endif
+};
+SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_dom_next_element(struct soap_dom_element *elt);
+SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_dom_next_attribute(struct soap_dom_attribute *att);
+#endif
+
+#if defined(__cplusplus) && !defined(WITH_LEAN)
+}
+extern std::ostream &operator<<(std::ostream&, const struct soap_dom_element&);
+extern std::istream &operator>>(std::istream&, struct soap_dom_element&);
+extern "C" {
+#endif
+
+/******************************************************************************/
+
+struct soap
+{ short state;			/* 0 = uninitialized, 1 = initialized, 2 = copy of another soap struct */
+  short version;		/* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table) */
+  soap_mode mode;
+  soap_mode imode;
+  soap_mode omode;
+  const char *float_format;	/* user-definable format string for floats (<1024 chars) */
+  const char *double_format;	/* user-definable format string for doubles (<1024 chars) */
+  const char *dime_id_format;	/* user-definable format string for integer DIME id (<SOAP_TAGLEN chars) */
+  const char *http_version;	/* HTTP version used "1.0" or "1.1" */
+  const char *http_content;	/* optional custom response content type (with SOAP_FILE) */
+  const char *encodingStyle;	/* default = NULL which means that SOAP encoding is used */
+  const char *actor;		/* SOAP-ENV:actor or role attribute value */
+  int recv_timeout;		/* when > 0, gives socket recv timeout in seconds, < 0 in usec */
+  int send_timeout;		/* when > 0, gives socket send timeout in seconds, < 0 in usec */
+  int connect_timeout;		/* when > 0, gives socket connect() timeout in seconds, < 0 in usec */
+  int accept_timeout;		/* when > 0, gives socket accept() timeout in seconds, < 0 in usec */
+  int socket_flags;		/* socket recv() and send() flags, e.g. set to MSG_NOSIGNAL to disable sigpipe */
+  int connect_flags;		/* connect() SOL_SOCKET sockopt flags, e.g. set to SO_DEBUG to debug socket */
+  int bind_flags;		/* bind() SOL_SOCKET sockopt flags, e.g. set to SO_REUSEADDR to enable reuse */
+  int accept_flags;		/* accept() SOL_SOCKET sockopt flags */
+  const struct Namespace *namespaces;	/* Pointer to global namespace mapping table */
+  struct Namespace *local_namespaces;	/* Local namespace mapping table */
+  struct soap_nlist *nlist;	/* namespace stack */
+  struct soap_blist *blist;	/* block allocation stack */
+  struct soap_clist *clist;	/* class instance allocation list */
+  void *alist;			/* memory allocation (malloc) list */
+  struct soap_ilist *iht[SOAP_IDHASH];
+  struct soap_plist *pht[SOAP_PTRHASH];
+  struct soap_pblk *pblk;	/* plist block allocation */
+  short pidx;			/* plist block allocation */
+  struct SOAP_ENV__Header *header;
+  struct SOAP_ENV__Fault *fault;
+  int idnum;
+  void *user;			/* to pass user-defined data */
+  struct soap_plugin *plugins;	/* linked list of plug-in data */
+  char *userid;			/* HTTP Basic authorization userid */
+  char *passwd;			/* HTTP Basic authorization passwd */
+  int (*fpost)(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
+  int (*fget)(struct soap*);
+  int (*fform)(struct soap*);
+  int (*fposthdr)(struct soap*, const char*, const char*);
+  int (*fresponse)(struct soap*, int, size_t);
+  int (*fparse)(struct soap*);
+  int (*fparsehdr)(struct soap*, const char*, const char*);
+  int (*fresolve)(struct soap*, const char*, struct in_addr* inaddr);
+  int (*fconnect)(struct soap*, const char*, const char*, int);
+  int (*fdisconnect)(struct soap*);
+  int (*fclosesocket)(struct soap*, SOAP_SOCKET);
+  int (*fshutdownsocket)(struct soap*, SOAP_SOCKET, int);
+  int (*fopen)(struct soap*, const char*, const char*, int);
+  int (*faccept)(struct soap*, int, struct sockaddr*, int *n);
+  int (*fclose)(struct soap*);
+  int (*fsend)(struct soap*, const char*, size_t);
+  size_t (*frecv)(struct soap*, char*, size_t);
+  int (*fpoll)(struct soap*);
+  void (*fseterror)(struct soap*, const char **c, const char **s);
+  int (*fignore)(struct soap*, const char*);
+  int (*fserveloop)(struct soap*);
+  void *(*fplugin)(struct soap*, const char*);
+#ifndef WITH_LEANER
+  int (*fprepareinit)(struct soap*);
+  int (*fpreparesend)(struct soap*, const char*, size_t);
+  int (*fpreparerecv)(struct soap*, const char*, size_t);
+  int (*fpreparefinal)(struct soap*);
+  void *(*fdimereadopen)(struct soap*, void*, const char*, const char*, const char*);
+  void *(*fdimewriteopen)(struct soap*, const char*, const char*, const char*);
+  void (*fdimereadclose)(struct soap*, void*);
+  void (*fdimewriteclose)(struct soap*, void*);
+  size_t (*fdimeread)(struct soap*, void*, char*, size_t);
+  int (*fdimewrite)(struct soap*, void*, const char*, size_t);
+#endif
+  int master;
+  int socket;
+#if defined(__cplusplus) && (!defined(WITH_LEAN) || defined(UNDER_CE))
+  std::ostream *os;
+  std::istream *is;
+#else
+  void *os;	/* preserve alignment */
+  void *is;	/* preserve alignment */
+#endif
+#ifndef UNDER_CE
+  int sendfd;
+  int recvfd;
+#else
+  FILE *sendfd;
+  FILE *recvfd;
+#endif
+#ifdef WIN32
+  char errorstr[256];	/* buf for FormatMessage() */
+#endif
+  size_t bufidx;	/* index in soap.buf[] */
+  size_t buflen;	/* length of soap.buf[] content */
+  soap_wchar ahead;	/* parser lookahead */
+  short cdata;		/* CDATA parser state */
+  short body;		/* parsed XML element has a body or not */
+  unsigned int level;	/* XML nesting level */
+  size_t count;		/* message length counter */
+  size_t length;	/* message length as set by HTTP header */
+#ifdef WITH_FAST
+  char *labbuf;		/* look-aside buffer */
+  size_t lablen;	/* look-aside buffer allocated length */
+  size_t labidx;	/* look-aside buffer index to available part */
+#endif
+  char buf[SOAP_BUFLEN];/* send and receive buffer */
+  char tmpbuf[1024];	/* in/output buffer for HTTP headers, simpleType values, attribute names, and DIME >=1024 bytes */
+  char msgbuf[1024];	/* output buffer for (error) messages <=1024 bytes */
+  char tag[SOAP_TAGLEN];
+  char id[SOAP_TAGLEN];
+  char href[SOAP_TAGLEN];
+  char type[SOAP_TAGLEN];
+  char arrayType[SOAP_TAGLEN];
+  char arraySize[SOAP_TAGLEN];
+  char arrayOffset[SOAP_TAGLEN];
+  short other;
+  short position;
+  int positions[SOAP_MAXDIMS];
+  short root;
+  struct soap_attribute *attributes;	/* attribute list */
+  short encoding;	/* when set, output encodingStyle */
+  short mustUnderstand;	/* a mustUnderstand element was parsed or is output */
+  short keep_alive;	/* connection should be kept open */
+  short null;		/* parsed XML is xsi:nil */
+  short ns;		/* when not set, output full xmlns bindings */
+  short part;		/* parsing state */
+  short alloced;
+  short peeked;
+  size_t chunksize;
+  size_t chunkbuflen;
+  char endpoint[SOAP_TAGLEN];
+  char path[SOAP_TAGLEN];
+  char host[SOAP_TAGLEN];
+  char *action;
+  char *authrealm;		/* HTTP authentication realm */
+  char *prolog;			/* XML declaration prolog */
+  unsigned long ip;		/* IP number */
+  int port;			/* port number */
+  unsigned int max_keep_alive;
+  const char *proxy_host;	/* Proxy Server host name */
+  int proxy_port;		/* Proxy Server port (default = 8080) */
+  const char *proxy_userid;	/* Proxy Authorization user name */
+  const char *proxy_passwd;	/* Proxy Authorization password */
+  int status;			/* -1 when request, else error code to be returned by server */
+  int error;
+  int errmode;
+  int errnum;
+#ifndef WITH_LEANER
+  struct soap_dom_element *dom;
+  struct soap_dime dime;
+  struct soap_mime mime;
+  struct soap_xlist *xlist;
+#endif
+#if !defined(WITH_LEAN) || defined(SOAP_DEBUG)
+  const char *logfile[SOAP_MAXLOGS];
+  FILE *fdebug[SOAP_MAXLOGS];
+  struct soap_mlist *mht[SOAP_PTRHASH];
+#endif
+#ifndef WITH_LEAN
+  const char *c14ninclude;
+  const char *c14nexclude;
+  struct soap_cookie *cookies;
+  const char *cookie_domain;
+  const char *cookie_path;
+  int cookie_max;
+#endif
+#ifndef WITH_NOIO
+#ifdef WITH_IPV6
+  struct sockaddr_storage peer;	/* IPv6: set by soap_accept and by UDP recv */
+#else
+  struct sockaddr_in peer;	/* IPv4: set by soap_connect/soap_accept and by UDP recv */
+#endif
+  size_t peerlen;
+#endif
+#ifdef WITH_OPENSSL
+  int (*fsslauth)(struct soap*);
+  int (*fsslverify)(int, X509_STORE_CTX*);
+  BIO *bio;
+  SSL *ssl;
+  SSL_CTX *ctx;
+  short require_server_auth;
+  short require_client_auth;
+  short rsa;			/* when set, use RSA instead of DH */
+  const char *keyfile;
+  const char *password;
+  const char *dhfile;
+  const char *cafile;
+  const char *capath;
+  const char *crlfile;
+  const char *randfile;
+  SSL_SESSION *session;
+  char session_host[SOAP_TAGLEN];
+  int session_port;
+#endif
+#ifdef WITH_ZLIB
+  short zlib_state;		/* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_INFLATE */
+  short zlib_in;		/* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */
+  short zlib_out;		/* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */
+  z_stream d_stream;		/* decompression stream */
+  char z_buf[SOAP_BUFLEN];	/* buffer */
+  size_t z_buflen;
+  unsigned short z_level;	/* compression level to be used (0=none, 1=fast to 9=best) */
+  uLong z_crc;			/* internal gzip crc */
+  float z_ratio_in;		/* detected compression ratio compressed_length/length of inbound message */
+  float z_ratio_out;		/* detected compression ratio compressed_length/length of outbound message */
+#endif
+#ifdef WMW_RPM_IO
+  void *rpmreqid;
+#endif
+#ifndef WITH_LEAN
+#ifdef __cplusplus
+  soap();
+  soap(soap_mode);
+  soap(soap_mode, soap_mode);
+  soap(struct soap&);
+  ~soap();
+#endif
+#endif
+};
+
+struct soap_code_map
+{ long code;
+  const char *string;
+};
+
+/* forwarding list */
+struct soap_flist
+{ struct soap_flist *next;
+  int type;
+  void *ptr;
+  unsigned int level;
+  size_t len;
+  void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t);
+};
+
+/* id-ref forwarding list */
+struct soap_ilist
+{ struct soap_ilist *next;
+  int type;
+  size_t size;
+  void *link;
+  void *copy;
+  struct soap_flist *flist;
+  void *ptr;
+  unsigned int level;
+  char id[1]; /* the actual id string value flows into the allocated region below this struct */
+};
+
+struct soap_plugin
+{ struct soap_plugin *next;
+  const char *id;
+  void *data;
+  int (*fcopy)(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src);
+  void (*fdelete)(struct soap *soap, struct soap_plugin *p); /* should delete fields of plugin only and not free(p) */
+};
+
+#ifndef WITH_NONAMESPACES
+extern SOAP_NMAC struct Namespace namespaces[];
+#endif
+
+#ifndef WITH_LEAN
+# define soap_get0(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx])
+# define soap_get1(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx++])
+#else
+soap_wchar soap_get0(struct soap*);
+soap_wchar soap_get1(struct soap*);
+#endif
+
+#define soap_revget1(soap) ((soap)->bufidx--)
+#define soap_unget(soap, c) ((soap)->ahead = c)
+#define soap_register_plugin(soap, plugin) soap_register_plugin_arg(soap, plugin, NULL)
+#define soap_imode(soap, n) ((soap)->mode = (soap)->imode = (n))
+#define soap_set_imode(soap, n) ((soap)->imode |= (n))
+#define soap_clr_imode(soap, n) ((soap)->imode &= ~(n))
+#define soap_omode(soap, n) ((soap)->mode = (soap)->omode = (n))
+#define soap_set_omode(soap, n) ((soap)->omode |= (n))
+#define soap_clr_omode(soap, n) ((soap)->omode &= ~(n))
+#define soap_set_mode(soap, n) ((soap)->imode |= (n), (soap)->omode |= (n))
+#define soap_clr_mode(soap, n) ((soap)->imode &= ~(n), (soap)->omode &= ~(n))
+#define soap_destroy(soap) soap_delete((soap), NULL)
+
+#ifdef HAVE_STRRCHR
+# define soap_strrchr(s, t) strrchr(s, t)
+#else
+ SOAP_FMAC1 char* SOAP_FMAC2 soap_strrchr(const char *s, int t);
+#endif
+
+#ifdef HAVE_STRTOL
+# define soap_strtol(s, t, b) strtol(s, t, b)
+#else
+ SOAP_FMAC1 long SOAP_FMAC2 soap_strtol(const char *s, char **t, int b);
+#endif
+
+#ifdef HAVE_STRTOUL
+# define soap_strtoul(s, t, b) strtoul(s, t, b)
+#else
+ SOAP_FMAC1 unsigned long SOAP_FMAC2 soap_strtoul(const char *s, char **t, int b);
+#endif
+
+#if defined(WITH_OPENSSL)
+# define soap_random soap_rand()
+SOAP_FMAC1 int SOAP_FMAC2 soap_rand();
+#elif defined(HAVE_RANDOM)
+# define soap_random (int)random()
+#else
+# define soap_random rand()
+#endif
+
+#ifdef WITH_NOIDREF
+# define soap_embedded(s, p, t) (0)
+# define soap_id_lookup(s, i, p, t, n, k) (p)
+# define soap_id_forward(s, h, p, len, st, tt, n, k, fc) (p)
+# define soap_reference(s, a, t) (1)
+# define soap_array_reference(s, p, a, n, t) (1)
+# define soap_embed(s, p, a, n, t, pp) (0)
+# define soap_embedded_id(s, i, p, t) (i)
+# define soap_is_embedded(s, p) (0)
+# define soap_is_single(s, p) (1)
+# define soap_lookup_type(s, i) (0)
+# define soap_getindependent(s) (0)
+# define soap_putindependent(s) (0)
+# define soap_getelement(s, n) (n)
+# define soap_putelement(s, p, t, i, n) (0)
+# define soap_markelement(s, p, n) (0)
+#endif
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_fault(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultcode(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultsubcode(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultstring(struct soap*);
+SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultdetail(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_serializeheader(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putheader(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getheader(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_serializefault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putfault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getfault(struct soap*);
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_ssl_init();
+SOAP_FMAC1 int SOAP_FMAC2 soap_poll(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_connect_command(struct soap*, int, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_connect(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_bind(struct soap*, const char*, int, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_accept(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_accept(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_server_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_client_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_puthttphdr(struct soap*, int status, size_t count);
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_get_header_attribute(struct soap*, const char*, const char*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_key(char*, size_t, const char*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_val(char*, size_t, const char*);
+
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_hash(const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_endpoint(struct soap*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_flush_raw(struct soap*, const char*, size_t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_flush(struct soap*);
+SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_get(struct soap*);
+SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getchar(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_tag_cmp(const char*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_fault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault_subcode(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault_subcode(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_sender_error(struct soap*, const char*, const char*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_receiver_error(struct soap*, const char*, const char*, int);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_send_raw(struct soap*, const char*, size_t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_raw(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_send(struct soap*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_send2(struct soap*, const char*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_send3(struct soap*, const char*, const char*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_pututf8(struct soap*, unsigned long);
+SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getutf8(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_putbase64(struct soap*, const unsigned char*, int);
+SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_getbase64(struct soap*, int*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_puthex(struct soap*, const unsigned char*, int);
+SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_gethex(struct soap*, int*);
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_xop_forward(struct soap*, unsigned char**, int*, char**, char**, char**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_dime_forward(struct soap*, unsigned char**, int*, char**, char**, char**);
+#endif
+
+#ifndef WITH_NOIDREF
+SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup_id(struct soap*, void *p, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup(struct soap*, const void *p, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_enter(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_array_pointer_lookup(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type);
+SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_lookup(struct soap*, const char*);
+SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_enter(struct soap*, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_resolve(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_embedded(struct soap*, const void *p, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_reference(struct soap*, const void *p, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_array_reference(struct soap*, const void *p, const struct soap_array *a, int n, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_embedded_id(struct soap*, int id, const void *p, int t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_is_embedded(struct soap*, struct soap_plist*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_is_single(struct soap*, struct soap_plist*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_embedded(struct soap*, struct soap_plist*);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_begin_count(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_end_count(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_begin_send(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_end_send(struct soap*);
+
+SOAP_FMAC1 const struct soap_code_map* SOAP_FMAC2 soap_code(const struct soap_code_map*, const char *str);
+SOAP_FMAC1 long SOAP_FMAC2 soap_int_code(const struct soap_code_map*, const char *str, long other);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_str_code(const struct soap_code_map*, long code);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_getline(struct soap*, char*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_begin_recv(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_end_recv(struct soap*);
+
+SOAP_FMAC1 void* SOAP_FMAC2 soap_malloc(struct soap*, size_t);
+SOAP_FMAC1 void SOAP_FMAC2 soap_dealloc(struct soap*, void*);
+SOAP_FMAC1 struct soap_clist * SOAP_FMAC2 soap_link(struct soap*, void*, int, int, void (*fdelete)(struct soap_clist*));
+SOAP_FMAC1 void SOAP_FMAC2 soap_unlink(struct soap*, const void*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_free(struct soap*);
+
+SOAP_FMAC1 void* SOAP_FMAC2 soap_track_malloc(struct soap*, const char*, int, size_t);
+SOAP_FMAC1 void SOAP_FMAC2 soap_track_free(struct soap*, const char*, int, void*);
+
+#ifndef WITH_NOIDREF
+SOAP_FMAC1 int SOAP_FMAC2 soap_lookup_type(struct soap*, const char *id);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_id_lookup(struct soap*, const char *id, void **p, int t, size_t n, unsigned int k);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_id_forward(struct soap*, const char *id, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void(*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t));
+#endif
+SOAP_FMAC1 void* SOAP_FMAC2 soap_id_enter(struct soap*, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*));
+SOAP_FMAC1 void SOAP_FMAC2 soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t, const void *q, size_t n);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_size(const int *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getoffsets(const char *, const int *, int *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getsize(const char *, const char *, int *);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getsizes(const char *, int *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getposition(const char *, int *);
+
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putsize(struct soap*, const char *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizesoffsets(struct soap*, const char *, const int *, const int *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizes(struct soap*, const char *, const int *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffset(struct soap*, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffsets(struct soap*, const int *, int);
+ 
+SOAP_FMAC1 int SOAP_FMAC2 soap_closesock(struct soap*);
+
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new(void);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new1(soap_mode);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new2(soap_mode, soap_mode);
+SOAP_FMAC1 void SOAP_FMAC2 soap_del(struct soap*);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy(struct soap*);
+SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy_context(struct soap*, struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_init(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_init1(struct soap*, soap_mode);
+SOAP_FMAC1 void SOAP_FMAC2 soap_init2(struct soap*, soap_mode, soap_mode);
+SOAP_FMAC1 void SOAP_FMAC2 soap_done(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_cleanup(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_begin(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_end(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_delete(struct soap*, void*);
+
+#ifdef SOAP_DEBUG
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_recv_logfile(struct soap*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_sent_logfile(struct soap*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_test_logfile(struct soap*, const char*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_close_logfiles(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_open_logfile(struct soap*, int);
+#endif
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_token(struct soap*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_value(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_match_tag(struct soap*, const char*, const char *);
+SOAP_FMAC1 int SOAP_FMAC2 soap_match_array(struct soap*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_element(struct soap*, const char*, int, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_out(struct soap*, const char *tag, int id, const char *type);
+SOAP_FMAC1 int SOAP_FMAC2 soap_array_begin_out(struct soap*, const char *tag, int id, const char *type, const char *offset);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_ref(struct soap*, const char *tag, int id, int href);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_href(struct soap*, const char *tag, int id, const char *ref, const char *val);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_null(struct soap*, const char *tag, int id, const char *type);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_id(struct soap*, const char *tag, int id, const void *p, const struct soap_array *a, int d, const char *type, int n);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_result(struct soap*, const char *tag);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_out(struct soap*, const char *tag);
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_start_end_out(struct soap*, const char *tag);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_attribute(struct soap*, const char*, const char*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_in(struct soap*, const char *tag, int nillable);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_in(struct soap*, const char *tag);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_peek_element(struct soap*);
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_retry(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_revert(struct soap*);
+
+SOAP_FMAC1 char* SOAP_FMAC2 soap_strdup(struct soap*, const char*);
+SOAP_FMAC1 const char * SOAP_FMAC2 soap_strsearch(const char *big, const char *little);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_string_out(struct soap*, const char *s, int flag);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_string_in(struct soap*, int, long, long);
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_wstring_out(struct soap*, const wchar_t *s, int flag);
+SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstring_in(struct soap*, int, long, long);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_match_namespace(struct soap*, const char *, const char*, int n1, int n2);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_namespaces(struct soap*, struct Namespace*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_local_namespaces(struct soap*);
+
+SOAP_FMAC1 void SOAP_FMAC2 soap_pop_namespace(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_push_namespace(struct soap*, const char *,const char *);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_current_namespace(struct soap *soap, const char *tag);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_store_lab(struct soap*, const char*, size_t);
+SOAP_FMAC1 int SOAP_FMAC2 soap_append_lab(struct soap*, const char*, size_t);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_new_block(struct soap*);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_push_block(struct soap*, size_t);
+SOAP_FMAC1 void SOAP_FMAC2 soap_pop_block(struct soap*);
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_size_block(struct soap*, size_t);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_first_block(struct soap*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_next_block(struct soap*);
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_block_size(struct soap*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_save_block(struct soap*, char*, int);
+SOAP_FMAC1 void SOAP_FMAC2 soap_end_block(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_out(struct soap*);
+SOAP_FMAC1 int soap_envelope_end_out(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_in(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_end_in(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_out(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_out(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_in(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_in(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_header(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_response(struct soap*, int);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_send_empty_response(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_empty_response(struct soap*);
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_send_fault(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_recv_fault(struct soap*);
+
+#ifndef WITH_NOSTDLIB
+SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault(struct soap*, FILE*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault_location(struct soap*, FILE*);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2byte(struct soap*, const char*, char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2short(struct soap*, const char*, short*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2int(struct soap*, const char*, int*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2long(struct soap*, const char*, long*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2LONG64(struct soap*, const char*, LONG64*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2float(struct soap*, const char*, float*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2double(struct soap*, const char*, double*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedByte(struct soap*, const char*, unsigned char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedShort(struct soap*, const char*, unsigned short*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedInt(struct soap*, const char*, unsigned int*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedLong(struct soap*, const char*, unsigned long*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2ULONG64(struct soap*, const char*, ULONG64*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2string(struct soap*, const char*, char**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2QName(struct soap*, const char*, char**);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2wchar(struct soap*, const char*, wchar_t**);
+SOAP_FMAC1 int SOAP_FMAC2 soap_s2dateTime(struct soap*, const char*, time_t*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_s2base64(struct soap*, const unsigned char*, char*, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_s2hex(struct soap*, const unsigned char*, char*, int);
+#endif
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_byte2s(struct soap*, char);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_short2s(struct soap*, short);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_int2s(struct soap*, int);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_long2s(struct soap*, long);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_LONG642s(struct soap*, LONG64);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_float2s(struct soap*, float);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_double2s(struct soap*, double);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedByte2s(struct soap*, unsigned char);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedShort2s(struct soap*, unsigned short);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedInt2s(struct soap*, unsigned int);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedLong2s(struct soap*, unsigned long);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_ULONG642s(struct soap*, ULONG64);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_QName2s(struct soap*, const char*);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_wchar2s(struct soap*, const wchar_t*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_dateTime2s(struct soap*, time_t);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_base642s(struct soap*, const char*, char*, size_t, int*);
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_hex2s(struct soap*, const char*, char*, size_t, int*);
+#endif
+
+
+SOAP_FMAC1 int* SOAP_FMAC2 soap_inint(struct soap*, const char *tag, int *p, const char *, int);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_inbyte(struct soap*, const char *tag, char *p, const char *, int);
+SOAP_FMAC1 long* SOAP_FMAC2 soap_inlong(struct soap*, const char *tag, long *p, const char *, int);
+SOAP_FMAC1 LONG64* SOAP_FMAC2 soap_inLONG64(struct soap*, const char *tag, LONG64 *p, const char *, int);
+SOAP_FMAC1 short* SOAP_FMAC2 soap_inshort(struct soap*, const char *tag, short *p, const char *, int);
+SOAP_FMAC1 float* SOAP_FMAC2 soap_infloat(struct soap*, const char *tag, float *p, const char *, int);
+SOAP_FMAC1 double* SOAP_FMAC2 soap_indouble(struct soap*, const char *tag, double *p, const char *, int);
+SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_inunsignedByte(struct soap*, const char *tag, unsigned char *p, const char *, int);
+SOAP_FMAC1 unsigned short* SOAP_FMAC2 soap_inunsignedShort(struct soap*, const char *tag, unsigned short *p, const char *, int);
+SOAP_FMAC1 unsigned int* SOAP_FMAC2 soap_inunsignedInt(struct soap*, const char *tag, unsigned int *p, const char *, int);
+SOAP_FMAC1 unsigned long* SOAP_FMAC2 soap_inunsignedLong(struct soap*, const char *tag, unsigned long *p, const char *, int);
+SOAP_FMAC1 ULONG64* SOAP_FMAC2 soap_inULONG64(struct soap*, const char *tag, ULONG64 *p, const char *, int);
+SOAP_FMAC1 char** SOAP_FMAC2 soap_instring(struct soap*, const char *tag, char **p, const char *, int, int, long, long);
+SOAP_FMAC1 char** SOAP_FMAC2 soap_inliteral(struct soap*, const char *tag, char **p);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 time_t* SOAP_FMAC2 soap_indateTime(struct soap*, const char *tag, time_t *p, const char *, int);
+#endif
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwstring(struct soap*, const char *tag, wchar_t **p, const char *, int, long, long);
+SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwliteral(struct soap*, const char *tag, wchar_t **p);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_outbyte(struct soap*, const char *tag, int id, const char *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outshort(struct soap*, const char *tag, int id, const short *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outint(struct soap*, const char *tag, int id, const int *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outlong(struct soap*, const char *tag, int id, const long *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outLONG64(struct soap*, const char *tag, int id, const LONG64 *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outfloat(struct soap*, const char *tag, int id, const float *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outdouble(struct soap*, const char *tag, int id, const double *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedByte(struct soap*, const char *tag, int id, const unsigned char *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedShort(struct soap*, const char *tag, int id, const unsigned short *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedInt(struct soap*, const char *tag, int id, const unsigned int *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedLong(struct soap*, const char *tag, int id, const unsigned long *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outULONG64(struct soap*, const char *tag, int id, const ULONG64 *p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outstring(struct soap*, const char *tag, int id, char *const*p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outliteral(struct soap*, const char *tag, char *const*p);
+
+#ifndef WITH_LEAN
+SOAP_FMAC1 int SOAP_FMAC2 soap_outdateTime(struct soap*, const char *tag, int id, const time_t *p, const char *, int);
+#endif
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_outwstring(struct soap*, const char *tag, int id, wchar_t *const*p, const char *, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_outwliteral(struct soap*, const char *tag, wchar_t *const*p);
+#endif
+
+#ifndef WITH_LEANER
+SOAP_FMAC1 int SOAP_FMAC2 soap_attachment(struct soap *, const char*, int, const void*, const struct soap_array*, const char*, const char*, const char*, int, const char*, int);
+SOAP_FMAC1 int SOAP_FMAC2 soap_move(struct soap*, long);
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_tell(struct soap*);
+SOAP_FMAC1 char* SOAP_FMAC2 soap_dime_option(struct soap*, unsigned short, const char*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getdimehdr(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getdime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putdimehdr(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putdime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getmimehdr(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_getmime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putmimehdr(struct soap*, struct soap_multipart*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_putmime(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_dime(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_set_mime(struct soap*, const char *boundary, const char *start);
+SOAP_FMAC1 void SOAP_FMAC2 soap_clr_dime(struct soap*);
+SOAP_FMAC1 void SOAP_FMAC2 soap_clr_mime(struct soap*);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_dime_attachment(struct soap*, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_mime_attachment(struct soap*, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description);
+SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*);
+#endif
+
+SOAP_FMAC1 int SOAP_FMAC2 soap_register_plugin_arg(struct soap*, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void*);
+SOAP_FMAC1 void* SOAP_FMAC2 soap_lookup_plugin(struct soap*, const char*);
+
+SOAP_FMAC1 const char* SOAP_FMAC2 soap_attr_value(struct soap *soap, const char *name, int flag);
+SOAP_FMAC1 int SOAP_FMAC2 soap_set_attr(struct soap *soap, const char *name, const char *value);
+SOAP_FMAC1 void SOAP_FMAC2 soap_clr_attr(struct soap *soap);
+
+#ifdef WITH_COOKIES
+SOAP_FMAC1 size_t SOAP_FMAC2 soap_encode_cookie(const char*, char*, size_t);
+SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_set_cookie(struct soap*, const char*, const char*, const char*, const char*);
+SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_cookie(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern char* SOAP_FMAC2 soap_cookie_value(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern char* SOAP_FMAC2 soap_env_cookie_value(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern long SOAP_FMAC2 soap_cookie_expire(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_expire(struct soap*, const char*, long, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_session(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_clr_cookie_session(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern void SOAP_FMAC2 soap_clr_cookie(struct soap*, const char*, const char*, const char*);
+SOAP_FMAC1 extern int SOAP_FMAC2 soap_getenv_cookies(struct soap*);
+SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_copy_cookies(struct soap*);
+SOAP_FMAC1 extern void SOAP_FMAC2 soap_free_cookies(struct soap*);
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif
+
diff --git a/typemap.dat b/typemap.dat
new file mode 100644
index 0000000..b79d8c7
--- /dev/null
+++ b/typemap.dat
@@ -0,0 +1,172 @@
+#	typemap.dat
+#
+#	Use this file to define namespace prefix and type bindings for
+#	the generated header files by the 'wsdl2h' tool.  typemap.dat is the
+#	default file processed by 'wsdl2h' to customize its output. You can use
+#	wsdl2h option -t to specify an alternate file.
+#
+#	XML namespace prefix bindings can be provided to override the default
+#	choice of the ns1, ns2, ... prefixes generated by wsdl2h.  It is highly
+#	recommended to provide namespace prefixes for your project's XML
+#	namespaces. In this way, changes to the WSDL (or newer releases of
+#	wsdl2h) will have a minimal impact on coding.
+#	Bindings for namespace prefixes are of the form:
+#		prefix = "URI"
+#
+#	Type bindings can by provided to bind XML schema types to C/C++ types
+#	for your project.
+#	Type bindings are of the form:
+#		prefix__type = declaration | use | ptr-use
+#	where 'declaration' introduces the type in the header file, 'use'
+#	specifies how the type is used directly, 'ptr-use' specifies how the
+#	type is used as a pointer type.
+#	For example:
+#		xsd__string = | char* | char*
+#	After enabling this line, all XSD strings will be mapped to char*. Note
+#	that the 'declaration' part is empty in this case.
+#
+#	Member data and functions can be provided to extend a generated struct
+#	or class.
+#	Class and struct extensions are of the form:
+#		prefix__type = $ member-declaration
+#	For example, to add a constructor and destructor to class myns__record:
+#		myns__record = $ myns__record();
+#		myns__record = $ ~myns__record();
+#	
+#	Any other material to be included in the generated header file can be
+#	provided by enclosing the text within brackets [ and ]. Brackets MUST
+#	appear at the start of a new line.
+#	For example, to include a note:
+#[
+#// TODO: Don't forget to bind the namespace prefixes!
+#]
+#	This comment appears as the first line in the generated header file.
+#
+#-------------------------------------------------------------------------------
+#gSOAP XML Web services tools
+#Copyright (C) 2004-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+#This software is released under one of the following two licenses:
+#GPL or Genivia's license for commercial use.
+#-------------------------------------------------------------------------------
+#GPL license.
+#
+#This program is free software; you can redistribute it and/or modify it under
+#the terms of the GNU General Public License as published by the Free Software
+#Foundation; either version 2 of the License, or (at your option) any later
+#version.
+#
+#This program is distributed in the hope that it will be useful, but WITHOUT ANY
+#WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+#PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+#You should have received a copy of the GNU General Public License along with
+#this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+#Place, Suite 330, Boston, MA 02111-1307 USA
+#
+#Author contact information:
+#engelen@genivia.com / engelen@acm.org
+#-------------------------------------------------------------------------------
+#A commercial use license is available from Genivia, Inc., contact@genivia.com
+#-------------------------------------------------------------------------------
+
+[
+// Reminder: Modify typemap.dat to customize the header file generated by wsdl2h
+]
+
+#	For WhiteMesa interoperability testing round 2:
+
+i	= "http://www.soapinterop.org/"
+s	= "http://www.soapinterop.org/xsd"
+
+#	Amazon Web Services:
+
+aws	= "urn:PI/DevCentral/SoapService"
+
+#	Mappoint Web services:
+
+mpt	= "http://s.mappoint.net/mappoint-30/"
+
+#	MTOM xop and xmime are imported from xop.h, xmime.h, and xmlmime.h:
+
+xop	= <http://www.w3.org/2004/08/xop/include>
+xmime	= <http://www.w3.org/2004/06/xmlmime>
+xmlmime	= <http://www.w3.org/2004/11/xmlmime>
+
+#	xmime/xmlmime:contentType attribute is juts a string:
+
+_xmime__contentType	= | char* | char*
+_xmlmime__contentType	= | char* | char*
+
+#	WS-Addressing (2003 and 2004 schemas)
+#	See import/wsa.h and import/wsa3.h for definitions and code examples
+
+wsa	= <http://schemas.xmlsoap.org/ws/2004/08/addressing>
+wsa3	= <http://schemas.xmlsoap.org/ws/2003/03/addressing>
+
+#	WS-Policy
+
+wsp	= <http://schemas.xmlsoap.org/ws/2004/09/policy>
+
+#	wsse 2004 and old wsse 2002 schema
+
+wsse	= <http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd>
+wsse2	= <http://schemas.xmlsoap.org/ws/2002/12/secext>
+
+#	wsu 2004
+
+wsu	= <http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd>
+
+_wsu__Id		= | char*
+_wsu__Created		= | time_t
+_wsu__Expires		= | time_t
+
+wsu__AttributedDateTime	= | time_t
+wsu__AttributedURI	= | char*
+
+#	Bindings for ds and xenc for WS-Security protocols:
+
+ds	= <http://www.w3.org/2000/09/xmldsig#>
+xenc	= <http://www.w3.org/2001/04/xmlenc#>
+
+#	xlink
+
+xlink	= <http://www.w3.org/1999/xlink>
+
+_xlink__actuate		= | char*
+_xlink__arcrole		= | char*
+_xlink__from		= | char*
+_xlink__href		= | char*
+_xlink__label		= | char*
+_xlink__role		= | char*
+_xlink__show		= | char*
+_xlink__to		= | char*
+_xlink__title		= | char*
+_xlink__type		= | char*
+
+#	wsrp
+
+wsrp	= <http://schemas.xmlsoap.org/rp/>
+
+#	Remember: type bindings are given on a single line.
+#	Example XML schema and C/C++ type bindings:
+
+xsd__int	= | int
+
+#	With SOAP encoded arrays, the SOAP-ENC:arrayType attribute is defined
+#	but we really don't need it because we never use it
+
+SOAP_ENC__arrayType	= | char* | char*
+
+#	To use regular char* strings instead of std::string, use:
+
+# xsd__string	= | char* | char*
+
+#	To use regular char* strings serialized with xsi:type attributes, use:
+
+# xsd__string	= typedef char *xsd__string; | xsd__string | xsd__string
+
+#	More examples:
+
+# xsd__boolean = enum xsd__boolean { false_, true_ }; | enum xsd__boolean
+
+# xsd__base64Binary = class xsd__base64Binary { unsigned char *__ptr; int __size; }; | xsd__base64Binary | xsd__base64Binary
diff --git a/uddi2/Doxyfile b/uddi2/Doxyfile
new file mode 100644
index 0000000..0ff00da
--- /dev/null
+++ b/uddi2/Doxyfile
@@ -0,0 +1,259 @@
+# Doxyfile 1.3.8
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME           = "gSOAP UDDI v2"
+PROJECT_NUMBER         = 
+OUTPUT_DIRECTORY       = 
+CREATE_SUBDIRS         = NO
+OUTPUT_LANGUAGE        = English
+USE_WINDOWS_ENCODING   = NO
+BRIEF_MEMBER_DESC      = YES
+REPEAT_BRIEF           = YES
+ABBREVIATE_BRIEF       = "The $name class" \
+                         "The $name widget" \
+                         "The $name file" \
+                         is \
+                         provides \
+                         specifies \
+                         contains \
+                         represents \
+                         a \
+                         an \
+                         the
+ALWAYS_DETAILED_SEC    = NO
+INLINE_INHERITED_MEMB  = NO
+FULL_PATH_NAMES        = YES
+STRIP_FROM_PATH        = /Applications/
+STRIP_FROM_INC_PATH    = 
+SHORT_NAMES            = NO
+JAVADOC_AUTOBRIEF      = NO
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP         = NO
+INHERIT_DOCS           = YES
+DISTRIBUTE_GROUP_DOC   = NO
+TAB_SIZE               = 8
+ALIASES                = 
+OPTIMIZE_OUTPUT_FOR_C  = NO
+OPTIMIZE_OUTPUT_JAVA   = NO
+SUBGROUPING            = YES
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL            = YES
+EXTRACT_PRIVATE        = YES
+EXTRACT_STATIC         = YES
+EXTRACT_LOCAL_CLASSES  = YES
+EXTRACT_LOCAL_METHODS  = NO
+HIDE_UNDOC_MEMBERS     = NO
+HIDE_UNDOC_CLASSES     = NO
+HIDE_FRIEND_COMPOUNDS  = NO
+HIDE_IN_BODY_DOCS      = NO
+INTERNAL_DOCS          = NO
+CASE_SENSE_NAMES       = NO
+HIDE_SCOPE_NAMES       = NO
+SHOW_INCLUDE_FILES     = YES
+INLINE_INFO            = YES
+SORT_MEMBER_DOCS       = YES
+SORT_BRIEF_DOCS        = NO
+SORT_BY_SCOPE_NAME     = NO
+GENERATE_TODOLIST      = YES
+GENERATE_TESTLIST      = YES
+GENERATE_BUGLIST       = YES
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS       = 
+MAX_INITIALIZER_LINES  = 30
+SHOW_USED_FILES        = YES
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET                  = NO
+WARNINGS               = YES
+WARN_IF_UNDOCUMENTED   = YES
+WARN_IF_DOC_ERROR      = YES
+WARN_FORMAT            = "$file:$line: $text"
+WARN_LOGFILE           = 
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT                  = uddi_v2.h
+FILE_PATTERNS          = *.c \
+                         *.cc \
+                         *.cxx \
+                         *.cpp \
+                         *.c++ \
+                         *.java \
+                         *.ii \
+                         *.ixx \
+                         *.ipp \
+                         *.i++ \
+                         *.inl \
+                         *.h \
+                         *.hh \
+                         *.hxx \
+                         *.hpp \
+                         *.h++ \
+                         *.idl \
+                         *.odl \
+                         *.cs \
+                         *.php \
+                         *.php3 \
+                         *.inc \
+                         *.m \
+                         *.mm \
+                         *.C \
+                         *.CC \
+                         *.C++ \
+                         *.II \
+                         *.I++ \
+                         *.H \
+                         *.HH \
+                         *.H++ \
+                         *.CS \
+                         *.PHP \
+                         *.PHP3 \
+                         *.M \
+                         *.MM
+RECURSIVE              = NO
+EXCLUDE                = 
+EXCLUDE_SYMLINKS       = NO
+EXCLUDE_PATTERNS       = 
+EXAMPLE_PATH           = 
+EXAMPLE_PATTERNS       = *
+EXAMPLE_RECURSIVE      = NO
+IMAGE_PATH             = 
+INPUT_FILTER           = 
+FILTER_PATTERNS        = 
+FILTER_SOURCE_FILES    = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER         = NO
+INLINE_SOURCES         = NO
+STRIP_CODE_COMMENTS    = YES
+REFERENCED_BY_RELATION = NO
+REFERENCES_RELATION    = NO
+VERBATIM_HEADERS       = NO
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX     = NO
+COLS_IN_ALPHA_INDEX    = 5
+IGNORE_PREFIX          = 
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML          = YES
+HTML_OUTPUT            = html
+HTML_FILE_EXTENSION    = .html
+HTML_HEADER            = 
+HTML_FOOTER            = 
+HTML_STYLESHEET        = 
+HTML_ALIGN_MEMBERS     = YES
+GENERATE_HTMLHELP      = NO
+CHM_FILE               = 
+HHC_LOCATION           = 
+GENERATE_CHI           = NO
+BINARY_TOC             = NO
+TOC_EXPAND             = NO
+DISABLE_INDEX          = NO
+ENUM_VALUES_PER_LINE   = 4
+GENERATE_TREEVIEW      = YES
+TREEVIEW_WIDTH         = 250
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX         = NO
+LATEX_OUTPUT           = latex
+LATEX_CMD_NAME         = latex
+MAKEINDEX_CMD_NAME     = makeindex
+COMPACT_LATEX          = NO
+PAPER_TYPE             = a4wide
+EXTRA_PACKAGES         = 
+LATEX_HEADER           = 
+PDF_HYPERLINKS         = NO
+USE_PDFLATEX           = NO
+LATEX_BATCHMODE        = NO
+LATEX_HIDE_INDICES     = NO
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF           = NO
+RTF_OUTPUT             = rtf
+COMPACT_RTF            = NO
+RTF_HYPERLINKS         = NO
+RTF_STYLESHEET_FILE    = 
+RTF_EXTENSIONS_FILE    = 
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN           = NO
+MAN_OUTPUT             = man
+MAN_EXTENSION          = .3
+MAN_LINKS              = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML           = NO
+XML_OUTPUT             = xml
+XML_SCHEMA             = 
+XML_DTD                = 
+XML_PROGRAMLISTING     = YES
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF   = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD       = NO
+PERLMOD_LATEX          = NO
+PERLMOD_PRETTY         = YES
+PERLMOD_MAKEVAR_PREFIX = 
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING   = YES
+MACRO_EXPANSION        = NO
+EXPAND_ONLY_PREDEF     = NO
+SEARCH_INCLUDES        = YES
+INCLUDE_PATH           = 
+INCLUDE_FILE_PATTERNS  = 
+PREDEFINED             = 
+EXPAND_AS_DEFINED      = 
+SKIP_FUNCTION_MACROS   = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+TAGFILES               = 
+GENERATE_TAGFILE       = 
+ALLEXTERNALS           = NO
+EXTERNAL_GROUPS        = YES
+PERL_PATH              = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS         = YES
+HIDE_UNDOC_RELATIONS   = YES
+HAVE_DOT               = NO
+CLASS_GRAPH            = YES
+COLLABORATION_GRAPH    = YES
+UML_LOOK               = NO
+TEMPLATE_RELATIONS     = NO
+INCLUDE_GRAPH          = YES
+INCLUDED_BY_GRAPH      = YES
+CALL_GRAPH             = NO
+GRAPHICAL_HIERARCHY    = YES
+DOT_IMAGE_FORMAT       = png
+DOT_PATH               = /Applications/Doxygen.app/Contents/Resources/
+DOTFILE_DIRS           = 
+MAX_DOT_GRAPH_WIDTH    = 1024
+MAX_DOT_GRAPH_HEIGHT   = 1024
+MAX_DOT_GRAPH_DEPTH    = 1000
+GENERATE_LEGEND        = YES
+DOT_CLEANUP            = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine   
+#---------------------------------------------------------------------------
+SEARCHENGINE           = NO
diff --git a/uddi2/Makefile b/uddi2/Makefile
new file mode 100644
index 0000000..02792c8
--- /dev/null
+++ b/uddi2/Makefile
@@ -0,0 +1,47 @@
+.SUFFIXES: .wsdl .xsd
+WSDL2H=../wsdl2h
+SOAPCPP=../soapcpp2
+CC=gcc
+CPP=g++
+LIBS=
+#COFLAGS=-g -DDEBUG -fstack-check
+COFLAGS=-O1
+CWFLAGS=-Wall
+CIFLAGS=-I..
+CMFLAGS=-DWITH_NONAMESPACES
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+all:			example1 example2
+example1:		example1.cpp inqClientLib.o inquire_v2.o stdsoap2.o envC.o
+			$(CPP) $(CFLAGS) -o example1 example1.cpp inqClientLib.o inquire_v2.o stdsoap2.o envC.o
+example2:		example2.cpp inqClientLib.o inquire_v2.o stdsoap2.o envC.o
+			$(CPP) $(CFLAGS) -o example2 example2.cpp inqClientLib.o inquire_v2.o stdsoap2.o envC.o
+example3:		example3.cpp pubClientLib.o publish_v2.o ../stdsoap2.cpp envC.o
+			$(CPP) $(CFLAGS) -DWITH_OPENSSL -o example3 example3.cpp pubClientLib.o publish_v2.o ../stdsoap2.cpp envC.o -lssl -lcrypto
+uddiClientLib.cpp:	uddi_v2.h inquire_v2.h publish_v2.h
+			$(SOAPCPP) -I.. -p uddi uddi_v2.h
+			$(SOAPCPP) -I.. -p inq inquire_v2.h
+			$(SOAPCPP) -I.. -p pub publish_v2.h
+inqClientLib.cpp:	inquire_v2.h
+			$(SOAPCPP) -I.. -p inq inquire_v2.h
+pubClientLib.cpp:	publish_v2.h
+			$(SOAPCPP) -I.. -p pub publish_v2.h
+envC.cpp:
+			echo '' > env.h
+			$(SOAPCPP) -I.. -p env env.h
+stdsoap2.o:		../stdsoap2.cpp
+			$(CPP) $(CFLAGS) -c $<
+.c.o:
+			$(CPP) $(CFLAGS) -c $<
+.cpp.o:
+			$(CPP) $(CFLAGS) -c $<
+uddi_v2.h:		inquire_v2.wsdl publish_v2.wsdl uddi_v2.xsd uddi2-typemap.dat
+			$(WSDL2H) -tuddi2-typemap.dat -ouddi_v2.h inquire_v2.wsdl publish_v2.wsdl
+inquire_v2.h:		inquire_v2.wsdl uddi_v2.xsd uddi2-typemap.dat
+			$(WSDL2H) -tuddi2-typemap.dat inquire_v2.wsdl
+publish_v2.h:		publish_v2.wsdl uddi_v2.xsd uddi2-typemap.dat
+			$(WSDL2H) -tuddi2-typemap.dat publish_v2.wsdl
+clean:		
+			rm -f *.o *.log *.xml *.nsmap *Stub.h *Proxy.h *Object.h inqC*.cpp inqS*.cpp pubC*.cpp pubS*.cpp uddiC*.cpp uddiS*.cpp env*.h env*.cpp
+distclean:		
+			rm -f *.o *.log *.xml *.nsmap *Stub.h *Proxy.h *Object.h inqC*.cpp inqS*.cpp pubC*.cpp pubS*.cpp uddiC*.cpp uddiS*.cpp env*.h env*.cpp
+			rm -f example1 example2 example3
diff --git a/uddi2/README.txt b/uddi2/README.txt
new file mode 100644
index 0000000..489c519
--- /dev/null
+++ b/uddi2/README.txt
@@ -0,0 +1,39 @@
+gSOAP UDDI v2
+
+See directory doc/index.html (from the gSOAP installation root) for
+documentation and examples of the UDDI v2 API generated with gSOAP and
+Doxygen. The API is written in C++. However, wsdl2h option -c can be used to
+generate C code serializers for UDDI v2 but you will have to program at a much
+lower level.
+
+The API implementation supports UDDI v2 inquiry and publish operations.
+
+A Makefile is included to build two example C++ clients, example1 and example2,
+to search services and businesses, respectively.
+
+Code can be generated for the inquiry API, publish API, and both combined. To
+do so, run wsdl2h on inquire_v2.wsdl and/or publish_v2.wsdl
+
+COMPILATION
+
+The build steps are generally as follows:
+
+# Run wsdl2h with mapping specified in uddi2-typemap.dat on the UDDI WSDL(s):
+$ wsdl2h -tuddi2-typemap.dat -ouddi_v2.h inquire_v2.wsdl publish_v2.wsdl
+
+# Run soapcpp2 on the generated .h file (-puddi saves sources as uddiXYZ):
+$ soapcpp2 -I.. -puddi uddi_v2.h
+
+# Complete the build:
+$ g++ -DWITH_NONAMESPACES -I.. -o main main.cpp inquire_v2.cpp publish_v2.cpp uddiC.cpp uddiClient.cpp ../stdsoap2.cpp
+
+# To avoid link errors combining multiple services, replace the last step with:
+$ echo '' > env.h
+$ soapcpp2 -I.. -penv env.h
+$ g++ -DWITH_NONAMESPACES -I.. -o main main.cpp inquire_v2.cpp publish_v2.cpp uddiClientLib.cpp ../stdsoap2.cpp
+
+USING DOXYGEN
+
+To generate documentation, use Doxygen on the generated header file, e.g.
+uddi_v2.h. Part of the documentation is included in the uddi2-typemap.dat
+file, which was used to generate the header file(s) with wsdl2h.
diff --git a/uddi2/cacerts.pem b/uddi2/cacerts.pem
new file mode 100644
index 0000000..1983d88
--- /dev/null
+++ b/uddi2/cacerts.pem
@@ -0,0 +1,4354 @@
+ABAecom (sub., Am. Bankers Assn.) Root CA
+=========================================
+MD5 Fingerprint: 82:12:F7:89:E1:0B:91:60:A4:B6:22:9F:94:68:11:92
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIID+DCCAuCgAwIBAgIRANAeQJAAACdLAAAAAQAAAAQwDQYJKoZIhvcNAQEFBQAw
+gYwxCzAJBgNVBAYTAlVTMQ0wCwYDVQQIEwRVdGFoMRcwFQYDVQQHEw5TYWx0IExh
+a2UgQ2l0eTEYMBYGA1UEChMPWGNlcnQgRVogYnkgRFNUMRgwFgYDVQQDEw9YY2Vy
+dCBFWiBieSBEU1QxITAfBgkqhkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTAe
+Fw05OTA3MTQxNjE0MThaFw0wOTA3MTExNjE0MThaMIGMMQswCQYDVQQGEwJVUzEN
+MAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxGDAWBgNVBAoT
+D1hjZXJ0IEVaIGJ5IERTVDEYMBYGA1UEAxMPWGNlcnQgRVogYnkgRFNUMSEwHwYJ
+KoZIhvcNAQkBFhJjYUBkaWdzaWd0cnVzdC5jb20wggEiMA0GCSqGSIb3DQEBAQUA
+A4IBDwAwggEKAoIBAQCtVBjetL/3reh0qu2LfI/C1HUa1YS5tmL8ie/kl2GS+x24
+4VpHNJ6eBiL70+o4y7iLB/caoBd3B1owHNQpOCDXJ0DYUJNDv9IYoil2BXKqa7Zp
+mKt5Hhxl9WqL/MUWqqJy2mDtTm4ZJXoKHTDjUJtCPETrobAgHtsCfv49H7/QAIrb
+QHamGKUVp1e2UsIBF5h3j4qBxhq0airmr6nWAKzP2BVJfNsbof6B+of505DBAsD5
+0ELpkWglX8a/hznplQBgKL+DLMDnXrbXNhbnYId26OcnsiUNi3rlqh3lWc3OCw5v
+xsic4xDZhTnTt5v6xrp8dNJddVardKSiUb9SfO5xAgMBAAGjUzBRMA8GA1UdEwEB
+/wQFMAMBAf8wHwYDVR0jBBgwFoAUCCBsZuuBCmxc1bWmPEHdHJaRJ3cwHQYDVR0O
+BBYEFAggbGbrgQpsXNW1pjxB3RyWkSd3MA0GCSqGSIb3DQEBBQUAA4IBAQBah1iP
+Lat2IWtUDNnxQfZOzSue4x+boy1/2St9WMhnpCn16ezVvZY/o3P4xFs2fNBjLDQ5
+m0i4PW/2FMWeY+anNG7T6DOzxzwYbiOuQ5KZP5jFaTDxNjutuTCC1rZZFpYCCykS
+YbQRifcML5SQhZgonFNsfmPdc/QZ/0qB0bJSI/08SjTOWhvgUIrtT4GV2GDn5MQN
+u1g+WPdOaG8+Z8nLepcWJ+xCYRR2uwDF6wg9FX9LtiJdhzuQ9PPA/jez6dliDMDD
+Wa9gvR8N26E0HzDEPYutsB0Ek+1f1eS/IDAE9EjpMwHRLpAnUrOb3jocq6mXf5vr
+wo3CbezcE9NGxXl8
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            d0:1e:40:90:00:00:27:4b:00:00:00:01:00:00:00:04
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, ST=Utah, L=Salt Lake City, O=Xcert EZ by DST, CN=Xcert EZ by DST/Email=ca@digsigtrust.com
+        Validity
+            Not Before: Jul 14 16:14:18 1999 GMT
+            Not After : Jul 11 16:14:18 2009 GMT
+        Subject: C=US, ST=Utah, L=Salt Lake City, O=Xcert EZ by DST, CN=Xcert EZ by DST/Email=ca@digsigtrust.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:ad:54:18:de:b4:bf:f7:ad:e8:74:aa:ed:8b:7c:
+                    8f:c2:d4:75:1a:d5:84:b9:b6:62:fc:89:ef:e4:97:
+                    61:92:fb:1d:b8:e1:5a:47:34:9e:9e:06:22:fb:d3:
+                    ea:38:cb:b8:8b:07:f7:1a:a0:17:77:07:5a:30:1c:
+                    d4:29:38:20:d7:27:40:d8:50:93:43:bf:d2:18:a2:
+                    29:76:05:72:aa:6b:b6:69:98:ab:79:1e:1c:65:f5:
+                    6a:8b:fc:c5:16:aa:a2:72:da:60:ed:4e:6e:19:25:
+                    7a:0a:1d:30:e3:50:9b:42:3c:44:eb:a1:b0:20:1e:
+                    db:02:7e:fe:3d:1f:bf:d0:00:8a:db:40:76:a6:18:
+                    a5:15:a7:57:b6:52:c2:01:17:98:77:8f:8a:81:c6:
+                    1a:b4:6a:2a:e6:af:a9:d6:00:ac:cf:d8:15:49:7c:
+                    db:1b:a1:fe:81:fa:87:f9:d3:90:c1:02:c0:f9:d0:
+                    42:e9:91:68:25:5f:c6:bf:87:39:e9:95:00:60:28:
+                    bf:83:2c:c0:e7:5e:b6:d7:36:16:e7:60:87:76:e8:
+                    e7:27:b2:25:0d:8b:7a:e5:aa:1d:e5:59:cd:ce:0b:
+                    0e:6f:c6:c8:9c:e3:10:d9:85:39:d3:b7:9b:fa:c6:
+                    ba:7c:74:d2:5d:75:56:ab:74:a4:a2:51:bf:52:7c:
+                    ee:71
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+            X509v3 Authority Key Identifier: 
+                keyid:08:20:6C:66:EB:81:0A:6C:5C:D5:B5:A6:3C:41:DD:1C:96:91:27:77
+
+            X509v3 Subject Key Identifier: 
+                08:20:6C:66:EB:81:0A:6C:5C:D5:B5:A6:3C:41:DD:1C:96:91:27:77
+    Signature Algorithm: sha1WithRSAEncryption
+        5a:87:58:8f:2d:ab:76:21:6b:54:0c:d9:f1:41:f6:4e:cd:2b:
+        9e:e3:1f:9b:a3:2d:7f:d9:2b:7d:58:c8:67:a4:29:f5:e9:ec:
+        d5:bd:96:3f:a3:73:f8:c4:5b:36:7c:d0:63:2c:34:39:9b:48:
+        b8:3d:6f:f6:14:c5:9e:63:e6:a7:34:6e:d3:e8:33:b3:c7:3c:
+        18:6e:23:ae:43:92:99:3f:98:c5:69:30:f1:36:3b:ad:b9:30:
+        82:d6:b6:59:16:96:02:0b:29:12:61:b4:11:89:f7:0c:2f:94:
+        90:85:98:28:9c:53:6c:7e:63:dd:73:f4:19:ff:4a:81:d1:b2:
+        52:23:fd:3c:4a:34:ce:5a:1b:e0:50:8a:ed:4f:81:95:d8:60:
+        e7:e4:c4:0d:bb:58:3e:58:f7:4e:68:6f:3e:67:c9:cb:7a:97:
+        16:27:ec:42:61:14:76:bb:00:c5:eb:08:3d:15:7f:4b:b6:22:
+        5d:87:3b:90:f4:f3:c0:fe:37:b3:e9:d9:62:0c:c0:c3:59:af:
+        60:bd:1f:0d:db:a1:34:1f:30:c4:3d:8b:ad:b0:1d:04:93:ed:
+        5f:d5:e4:bf:20:30:04:f4:48:e9:33:01:d1:2e:90:27:52:b3:
+        9b:de:3a:1c:ab:a9:97:7f:9b:eb:c2:8d:c2:6d:ec:dc:13:d3:
+        46:c5:79:7c
+
+ANX Network CA by DST
+=====================
+MD5 Fingerprint: A8:ED:DE:EB:93:88:66:D8:2F:C3:BD:1D:BE:45:BE:4D
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDTTCCAragAwIBAgIENm6ibzANBgkqhkiG9w0BAQUFADBSMQswCQYDVQQGEwJV
+UzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMR0wGwYDVQQL
+ExREU1QgKEFOWCBOZXR3b3JrKSBDQTAeFw05ODEyMDkxNTQ2NDhaFw0xODEyMDkx
+NjE2NDhaMFIxCzAJBgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVy
+ZSBUcnVzdCBDby4xHTAbBgNVBAsTFERTVCAoQU5YIE5ldHdvcmspIENBMIGdMA0G
+CSqGSIb3DQEBAQUAA4GLADCBhwKBgQC0SBGAWKDVpZkP9jcsRLZu0XzzKmueEbaI
+IwRccSWeahJ3EW6/aDllqPay9qIYsokVoGe3eowiSGv2hDQftsr3G3LL8ltI04ce
+InYTBLSsbJZ/5w4IyTJRMC3VgOghZ7rzXggkLAdZnZAa7kbJtaQelrRBkdR/0o04
+JrBvQ24JfQIBA6OCATAwggEsMBEGCWCGSAGG+EIBAQQEAwIABzB0BgNVHR8EbTBr
+MGmgZ6BlpGMwYTELMAkGA1UEBhMCVVMxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0
+dXJlIFRydXN0IENvLjEdMBsGA1UECxMURFNUIChBTlggTmV0d29yaykgQ0ExDTAL
+BgNVBAMTBENSTDEwKwYDVR0QBCQwIoAPMTk5ODEyMDkxNTQ2NDhagQ8yMDE4MTIw
+OTE1NDY0OFowCwYDVR0PBAQDAgEGMB8GA1UdIwQYMBaAFIwWVXDMFgpTZMKlhKqz
+ZBdDP4I2MB0GA1UdDgQWBBSMFlVwzBYKU2TCpYSqs2QXQz+CNjAMBgNVHRMEBTAD
+AQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4GB
+AEklyWCxDF+pORDTxTRVfc95wynr3vnCQPnoVsXwL+z02exIUbhjOF6TbhiWhbnK
+UJykuOpmJmiThW9vTHHQvnoLPDG5975pnhDX0UDorBZxq66rOOFwscqSFuBdhaYY
+gAYAnOGmGEJRp2hoWe8mlF+tMQz+KR4XAYQ3W+gSMqNd
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 913220207 (0x366ea26f)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Digital Signature Trust Co., OU=DST (ANX Network) CA
+        Validity
+            Not Before: Dec  9 15:46:48 1998 GMT
+            Not After : Dec  9 16:16:48 2018 GMT
+        Subject: C=US, O=Digital Signature Trust Co., OU=DST (ANX Network) CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b4:48:11:80:58:a0:d5:a5:99:0f:f6:37:2c:44:
+                    b6:6e:d1:7c:f3:2a:6b:9e:11:b6:88:23:04:5c:71:
+                    25:9e:6a:12:77:11:6e:bf:68:39:65:a8:f6:b2:f6:
+                    a2:18:b2:89:15:a0:67:b7:7a:8c:22:48:6b:f6:84:
+                    34:1f:b6:ca:f7:1b:72:cb:f2:5b:48:d3:87:1e:22:
+                    76:13:04:b4:ac:6c:96:7f:e7:0e:08:c9:32:51:30:
+                    2d:d5:80:e8:21:67:ba:f3:5e:08:24:2c:07:59:9d:
+                    90:1a:ee:46:c9:b5:a4:1e:96:b4:41:91:d4:7f:d2:
+                    8d:38:26:b0:6f:43:6e:09:7d
+                Exponent: 3 (0x3)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Digital Signature Trust Co./OU=DST (ANX Network) CA/CN=CRL1
+
+            X509v3 Private Key Usage Period: 
+                Not Before: Dec  9 15:46:48 1998 GMT, Not After: Dec  9 15:46:48 2018 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:8C:16:55:70:CC:16:0A:53:64:C2:A5:84:AA:B3:64:17:43:3F:82:36
+
+            X509v3 Subject Key Identifier: 
+                8C:16:55:70:CC:16:0A:53:64:C2:A5:84:AA:B3:64:17:43:3F:82:36
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0
+..V4.0....
+    Signature Algorithm: sha1WithRSAEncryption
+        49:25:c9:60:b1:0c:5f:a9:39:10:d3:c5:34:55:7d:cf:79:c3:
+        29:eb:de:f9:c2:40:f9:e8:56:c5:f0:2f:ec:f4:d9:ec:48:51:
+        b8:63:38:5e:93:6e:18:96:85:b9:ca:50:9c:a4:b8:ea:66:26:
+        68:93:85:6f:6f:4c:71:d0:be:7a:0b:3c:31:b9:f7:be:69:9e:
+        10:d7:d1:40:e8:ac:16:71:ab:ae:ab:38:e1:70:b1:ca:92:16:
+        e0:5d:85:a6:18:80:06:00:9c:e1:a6:18:42:51:a7:68:68:59:
+        ef:26:94:5f:ad:31:0c:fe:29:1e:17:01:84:37:5b:e8:12:32:
+        a3:5d
+
+American Express CA
+===================
+MD5 Fingerprint: 1C:D5:8E:82:BE:70:55:8E:39:61:DF:AD:51:DB:6B:A0
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICkDCCAfkCAgCNMA0GCSqGSIb3DQEBBAUAMIGPMQswCQYDVQQGEwJVUzEnMCUG
+A1UEChMeQW1lcmljYW4gRXhwcmVzcyBDb21wYW55LCBJbmMuMSYwJAYDVQQLEx1B
+bWVyaWNhbiBFeHByZXNzIFRlY2hub2xvZ2llczEvMC0GA1UEAxMmQW1lcmljYW4g
+RXhwcmVzcyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNOTgwODE0MjIwMTAwWhcN
+MDYwODE0MjM1OTAwWjCBjzELMAkGA1UEBhMCVVMxJzAlBgNVBAoTHkFtZXJpY2Fu
+IEV4cHJlc3MgQ29tcGFueSwgSW5jLjEmMCQGA1UECxMdQW1lcmljYW4gRXhwcmVz
+cyBUZWNobm9sb2dpZXMxLzAtBgNVBAMTJkFtZXJpY2FuIEV4cHJlc3MgQ2VydGlm
+aWNhdGUgQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJ8kmS
+hcr9FSm1BrZE7PyIo/KGzv8UTyQckvnCI8HOQ99dNMi4FOzVKnCRSZXXVs2U8amT
+0Ggi3E19oApyKkfqJfCFAF82VGHPC/k3Wmed6R/pZD9wlWGn0DAC3iYopGYDBOkw
++48zB/lvYYeictvzaHhjZlmpybdm4RWySDYs+QIDAQABMA0GCSqGSIb3DQEBBAUA
+A4GBAGgXYrhzi0xs60qlPqvlnS7SzYoHV/PGWZd2Fxf4Uo4nk9hY2Chs9KIEeorC
+diSxArTfKPL386infiNIYYj0EWiuJl32oUtTJWrYKhQCDuCHIG6eGVxzkAsj4jGX
+Iz/VIqLTBnvaN/XXtUFEF3pFAtmFRWbWjsfwegyZYiJpW+3S
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 141 (0x8d)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=US, O=American Express Company, Inc., OU=American Express Technologies, CN=American Express Certificate Authority
+        Validity
+            Not Before: Aug 14 22:01:00 1998 GMT
+            Not After : Aug 14 23:59:00 2006 GMT
+        Subject: C=US, O=American Express Company, Inc., OU=American Express Technologies, CN=American Express Certificate Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:c9:f2:49:92:85:ca:fd:15:29:b5:06:b6:44:ec:
+                    fc:88:a3:f2:86:ce:ff:14:4f:24:1c:92:f9:c2:23:
+                    c1:ce:43:df:5d:34:c8:b8:14:ec:d5:2a:70:91:49:
+                    95:d7:56:cd:94:f1:a9:93:d0:68:22:dc:4d:7d:a0:
+                    0a:72:2a:47:ea:25:f0:85:00:5f:36:54:61:cf:0b:
+                    f9:37:5a:67:9d:e9:1f:e9:64:3f:70:95:61:a7:d0:
+                    30:02:de:26:28:a4:66:03:04:e9:30:fb:8f:33:07:
+                    f9:6f:61:87:a2:72:db:f3:68:78:63:66:59:a9:c9:
+                    b7:66:e1:15:b2:48:36:2c:f9
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        68:17:62:b8:73:8b:4c:6c:eb:4a:a5:3e:ab:e5:9d:2e:d2:cd:
+        8a:07:57:f3:c6:59:97:76:17:17:f8:52:8e:27:93:d8:58:d8:
+        28:6c:f4:a2:04:7a:8a:c2:76:24:b1:02:b4:df:28:f2:f7:f3:
+        a8:a7:7e:23:48:61:88:f4:11:68:ae:26:5d:f6:a1:4b:53:25:
+        6a:d8:2a:14:02:0e:e0:87:20:6e:9e:19:5c:73:90:0b:23:e2:
+        31:97:23:3f:d5:22:a2:d3:06:7b:da:37:f5:d7:b5:41:44:17:
+        7a:45:02:d9:85:45:66:d6:8e:c7:f0:7a:0c:99:62:22:69:5b:
+        ed:d2
+
+American Express Global CA
+==========================
+MD5 Fingerprint: 63:1B:66:93:8C:F3:66:CB:3C:79:57:DC:05:49:EA:DB
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEBDCCAuygAwIBAgICAIUwDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNVBAYTAlVT
+MScwJQYDVQQKEx5BbWVyaWNhbiBFeHByZXNzIENvbXBhbnksIEluYy4xJjAkBgNV
+BAsTHUFtZXJpY2FuIEV4cHJlc3MgVGVjaG5vbG9naWVzMTYwNAYDVQQDEy1BbWVy
+aWNhbiBFeHByZXNzIEdsb2JhbCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNOTgw
+ODE0MTkwNjAwWhcNMTMwODE0MjM1OTAwWjCBljELMAkGA1UEBhMCVVMxJzAlBgNV
+BAoTHkFtZXJpY2FuIEV4cHJlc3MgQ29tcGFueSwgSW5jLjEmMCQGA1UECxMdQW1l
+cmljYW4gRXhwcmVzcyBUZWNobm9sb2dpZXMxNjA0BgNVBAMTLUFtZXJpY2FuIEV4
+cHJlc3MgR2xvYmFsIENlcnRpZmljYXRlIEF1dGhvcml0eTCCASIwDQYJKoZIhvcN
+AQEBBQADggEPADCCAQoCggEBAPAkJmYu++tKc3FTiUfLJjxTkpRMysKFtQ34w1e9
+Lyofahi3V68MABb6oLaQpvcaoS5mJsdoo4qTaWa1RlYtHYLqkAwKIsKJUI0F89Sr
+c0HwzxKsKLRvFJSWWUuekHWG3+JH6+HpT0N+h8onGGaetcFAZX38YW+tm3LPqV7Y
+8/nabpEQ+ky16n4g3qk5L/WI5IpvNcYgnCuGRjMK/DFVpWusFkDpzTVZbzIEw3u1
+D3t3cPNIuypSgs6vKW3xEW9t5gcAAe+a8yYNpnkTZ6/4qxx1rJG1a75AsN6cDLFp
+hRlxkRNFyt/R/eayypaDedvFuKpbepALeFY+xteflEgR9a0CAwEAAaNaMFgwEgYD
+VR0TAQH/BAgwBgEB/wIBBTAOBgNVHQ8BAf8EBAMCAQYwFwYDVR0gBBAwDjAMBgoq
+hkiG+Q8KAQUBMBkGA1UdDgQSBBBXRzV7NicRqAj8L0Yl6yRpMA0GCSqGSIb3DQEB
+BQUAA4IBAQDHYUWoinG5vjTpIXshzVYTmNUwY+kYqkuSFb8LHbvskmnFLsNhi+gw
+RcsQRsFzOFyLGdIr80DrfHKzLh4n43WVihybLsSVBYZy0FX0oZJSeVzb9Pjc5dcS
+sUDHPIbkMWVKyjfG3nZXGWlMRmn8Kq0WN3qTrPchSy3766lQy8HRQAjaA2mHpzde
+VcHF7cTjjgwml5tcV0ty4/IDBdACOyYDQJCevgtbSQx48dVMVSng9v1MA6lUAjLR
+V1qFrEPtWzsWX6C/NdtLnnvo/+cNPDuom0lBRvVzTv+SZSGDE1Vx60k8f4gawhIo
+JaFGS0E3l3/sjvHUoZbCILZerakcHhGg
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 133 (0x85)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=American Express Company, Inc., OU=American Express Technologies, CN=American Express Global Certificate Authority
+        Validity
+            Not Before: Aug 14 19:06:00 1998 GMT
+            Not After : Aug 14 23:59:00 2013 GMT
+        Subject: C=US, O=American Express Company, Inc., OU=American Express Technologies, CN=American Express Global Certificate Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:f0:24:26:66:2e:fb:eb:4a:73:71:53:89:47:cb:
+                    26:3c:53:92:94:4c:ca:c2:85:b5:0d:f8:c3:57:bd:
+                    2f:2a:1f:6a:18:b7:57:af:0c:00:16:fa:a0:b6:90:
+                    a6:f7:1a:a1:2e:66:26:c7:68:a3:8a:93:69:66:b5:
+                    46:56:2d:1d:82:ea:90:0c:0a:22:c2:89:50:8d:05:
+                    f3:d4:ab:73:41:f0:cf:12:ac:28:b4:6f:14:94:96:
+                    59:4b:9e:90:75:86:df:e2:47:eb:e1:e9:4f:43:7e:
+                    87:ca:27:18:66:9e:b5:c1:40:65:7d:fc:61:6f:ad:
+                    9b:72:cf:a9:5e:d8:f3:f9:da:6e:91:10:fa:4c:b5:
+                    ea:7e:20:de:a9:39:2f:f5:88:e4:8a:6f:35:c6:20:
+                    9c:2b:86:46:33:0a:fc:31:55:a5:6b:ac:16:40:e9:
+                    cd:35:59:6f:32:04:c3:7b:b5:0f:7b:77:70:f3:48:
+                    bb:2a:52:82:ce:af:29:6d:f1:11:6f:6d:e6:07:00:
+                    01:ef:9a:f3:26:0d:a6:79:13:67:af:f8:ab:1c:75:
+                    ac:91:b5:6b:be:40:b0:de:9c:0c:b1:69:85:19:71:
+                    91:13:45:ca:df:d1:fd:e6:b2:ca:96:83:79:db:c5:
+                    b8:aa:5b:7a:90:0b:78:56:3e:c6:d7:9f:94:48:11:
+                    f5:ad
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE, pathlen:5
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Certificate Policies: 
+                Policy: 1.2.840.113807.10.1.5.1
+
+            X509v3 Subject Key Identifier: 
+                57:47:35:7B:36:27:11:A8:08:FC:2F:46:25:EB:24:69
+    Signature Algorithm: sha1WithRSAEncryption
+        c7:61:45:a8:8a:71:b9:be:34:e9:21:7b:21:cd:56:13:98:d5:
+        30:63:e9:18:aa:4b:92:15:bf:0b:1d:bb:ec:92:69:c5:2e:c3:
+        61:8b:e8:30:45:cb:10:46:c1:73:38:5c:8b:19:d2:2b:f3:40:
+        eb:7c:72:b3:2e:1e:27:e3:75:95:8a:1c:9b:2e:c4:95:05:86:
+        72:d0:55:f4:a1:92:52:79:5c:db:f4:f8:dc:e5:d7:12:b1:40:
+        c7:3c:86:e4:31:65:4a:ca:37:c6:de:76:57:19:69:4c:46:69:
+        fc:2a:ad:16:37:7a:93:ac:f7:21:4b:2d:fb:eb:a9:50:cb:c1:
+        d1:40:08:da:03:69:87:a7:37:5e:55:c1:c5:ed:c4:e3:8e:0c:
+        26:97:9b:5c:57:4b:72:e3:f2:03:05:d0:02:3b:26:03:40:90:
+        9e:be:0b:5b:49:0c:78:f1:d5:4c:55:29:e0:f6:fd:4c:03:a9:
+        54:02:32:d1:57:5a:85:ac:43:ed:5b:3b:16:5f:a0:bf:35:db:
+        4b:9e:7b:e8:ff:e7:0d:3c:3b:a8:9b:49:41:46:f5:73:4e:ff:
+        92:65:21:83:13:55:71:eb:49:3c:7f:88:1a:c2:12:28:25:a1:
+        46:4b:41:37:97:7f:ec:8e:f1:d4:a1:96:c2:20:b6:5e:ad:a9:
+        1c:1e:11:a0
+
+BelSign Object Publishing CA
+============================
+MD5 Fingerprint: 8A:02:F8:DF:B8:E1:84:9F:5A:C2:60:24:65:D1:73:FB
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDAzCCAmygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBuzELMAkGA1UEBhMCQkUx
+ETAPBgNVBAcTCEJydXNzZWxzMRMwEQYDVQQKEwpCZWxTaWduIE5WMTgwNgYDVQQL
+Ey9CZWxTaWduIE9iamVjdCBQdWJsaXNoaW5nIENlcnRpZmljYXRlIEF1dGhvcml0
+eTElMCMGA1UEAxMcQmVsU2lnbiBPYmplY3QgUHVibGlzaGluZyBDQTEjMCEGCSqG
+SIb3DQEJARYUd2VibWFzdGVyQGJlbHNpZ24uYmUwHhcNOTcwOTE5MjIwMzAwWhcN
+MDcwOTE5MjIwMzAwWjCBuzELMAkGA1UEBhMCQkUxETAPBgNVBAcTCEJydXNzZWxz
+MRMwEQYDVQQKEwpCZWxTaWduIE5WMTgwNgYDVQQLEy9CZWxTaWduIE9iamVjdCBQ
+dWJsaXNoaW5nIENlcnRpZmljYXRlIEF1dGhvcml0eTElMCMGA1UEAxMcQmVsU2ln
+biBPYmplY3QgUHVibGlzaGluZyBDQTEjMCEGCSqGSIb3DQEJARYUd2VibWFzdGVy
+QGJlbHNpZ24uYmUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMQuH7a/7oJA
+3fm3LkHVngWxWtAmfGJVA5v8y2HeS+/+6Jn+h7mIz5DaDwk8dt8Xl7bLPyVF/bS8
+WAC+sFq2FIeP7mdkrR2Ig7tnn2VhAFgIgFCfgMkx9iqQHC33SmwQ9iNDXTgJYIhX
+As0WbBj8zfuSKnfQnpOjXYhk0Mj4XVRRAgMBAAGjFTATMBEGCWCGSAGG+EIBAQQE
+AwIABzANBgkqhkiG9w0BAQQFAAOBgQBjdhd8lvBTpV0BHFPOKcJ+daxMDaIIc7Rq
+Mf0CBhSZ3FQEpL/IloafMUMyJVf2hfYluze+oXkjyVcGJXFrRU/49AJAFoIir1Tq
+Mij2De6ZuksIUQ9uhiMhTC0liIHELg7xEyw4ipUCJMM6lWPkk45IuwhHcl+u5jpa
+R9Zxxp6aUg==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, L=Brussels, O=BelSign NV, OU=BelSign Object Publishing Certificate Authority, CN=BelSign Object Publishing CA/Email=webmaster@belsign.be
+        Validity
+            Not Before: Sep 19 22:03:00 1997 GMT
+            Not After : Sep 19 22:03:00 2007 GMT
+        Subject: C=BE, L=Brussels, O=BelSign NV, OU=BelSign Object Publishing Certificate Authority, CN=BelSign Object Publishing CA/Email=webmaster@belsign.be
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:c4:2e:1f:b6:bf:ee:82:40:dd:f9:b7:2e:41:d5:
+                    9e:05:b1:5a:d0:26:7c:62:55:03:9b:fc:cb:61:de:
+                    4b:ef:fe:e8:99:fe:87:b9:88:cf:90:da:0f:09:3c:
+                    76:df:17:97:b6:cb:3f:25:45:fd:b4:bc:58:00:be:
+                    b0:5a:b6:14:87:8f:ee:67:64:ad:1d:88:83:bb:67:
+                    9f:65:61:00:58:08:80:50:9f:80:c9:31:f6:2a:90:
+                    1c:2d:f7:4a:6c:10:f6:23:43:5d:38:09:60:88:57:
+                    02:cd:16:6c:18:fc:cd:fb:92:2a:77:d0:9e:93:a3:
+                    5d:88:64:d0:c8:f8:5d:54:51
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+    Signature Algorithm: md5WithRSAEncryption
+        63:76:17:7c:96:f0:53:a5:5d:01:1c:53:ce:29:c2:7e:75:ac:
+        4c:0d:a2:08:73:b4:6a:31:fd:02:06:14:99:dc:54:04:a4:bf:
+        c8:96:86:9f:31:43:32:25:57:f6:85:f6:25:bb:37:be:a1:79:
+        23:c9:57:06:25:71:6b:45:4f:f8:f4:02:40:16:82:22:af:54:
+        ea:32:28:f6:0d:ee:99:ba:4b:08:51:0f:6e:86:23:21:4c:2d:
+        25:88:81:c4:2e:0e:f1:13:2c:38:8a:95:02:24:c3:3a:95:63:
+        e4:93:8e:48:bb:08:47:72:5f:ae:e6:3a:5a:47:d6:71:c6:9e:
+        9a:52
+
+BelSign Secure Server CA
+========================
+MD5 Fingerprint: 3D:5E:82:C6:D9:AD:D9:8B:93:6B:0C:10:B9:49:0A:B1
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIC8zCCAlygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBszELMAkGA1UEBhMCQkUx
+ETAPBgNVBAcTCEJydXNzZWxzMRMwEQYDVQQKEwpCZWxTaWduIE5WMTQwMgYDVQQL
+EytCZWxTaWduIFNlY3VyZSBTZXJ2ZXIgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MSEw
+HwYDVQQDExhCZWxTaWduIFNlY3VyZSBTZXJ2ZXIgQ0ExIzAhBgkqhkiG9w0BCQEW
+FHdlYm1hc3RlckBiZWxzaWduLmJlMB4XDTk3MDcxNjIyMDA1NFoXDTA3MDcxNjIy
+MDA1NFowgbMxCzAJBgNVBAYTAkJFMREwDwYDVQQHEwhCcnVzc2VsczETMBEGA1UE
+ChMKQmVsU2lnbiBOVjE0MDIGA1UECxMrQmVsU2lnbiBTZWN1cmUgU2VydmVyIENl
+cnRpZmljYXRlIEF1dGhvcml0eTEhMB8GA1UEAxMYQmVsU2lnbiBTZWN1cmUgU2Vy
+dmVyIENBMSMwIQYJKoZIhvcNAQkBFhR3ZWJtYXN0ZXJAYmVsc2lnbi5iZTCBnzAN
+BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1gESeJL4BEJ/yccig/x8R3AwK0kLPjZA
+kCjaIXODU/LE0RZAwFP/rqbGJLMnbaWzPTl3XagG9ubpvGMRTgZlcAqdk/miQIt/
+SoQOjRax1swIZBIM4ChLyKWEkBf7EUYu1qeFGMsYrmOasFgG9ADP+MQJGjUMofnu
+Sv1t3v4mpTsCAwEAAaMVMBMwEQYJYIZIAYb4QgEBBAQDAgCgMA0GCSqGSIb3DQEB
+BAUAA4GBAGw9mcMF4h3K5S2qaIWLQDEgZhNo5lg6idCNdbLFYth9go/32TKBd/Y1
+W4UpzmeyubwrGXjP84f9RvGVdbIJVwMwwXrNckdxgMp9ncllPEcRIn36BwsoeKGT
+6AVFSOIyMko96FMcELfHc4wHUOH5yStTQfWDjeUJOUqOA2KqQGOL
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, L=Brussels, O=BelSign NV, OU=BelSign Secure Server Certificate Authority, CN=BelSign Secure Server CA/Email=webmaster@belsign.be
+        Validity
+            Not Before: Jul 16 22:00:54 1997 GMT
+            Not After : Jul 16 22:00:54 2007 GMT
+        Subject: C=BE, L=Brussels, O=BelSign NV, OU=BelSign Secure Server Certificate Authority, CN=BelSign Secure Server CA/Email=webmaster@belsign.be
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d6:01:12:78:92:f8:04:42:7f:c9:c7:22:83:fc:
+                    7c:47:70:30:2b:49:0b:3e:36:40:90:28:da:21:73:
+                    83:53:f2:c4:d1:16:40:c0:53:ff:ae:a6:c6:24:b3:
+                    27:6d:a5:b3:3d:39:77:5d:a8:06:f6:e6:e9:bc:63:
+                    11:4e:06:65:70:0a:9d:93:f9:a2:40:8b:7f:4a:84:
+                    0e:8d:16:b1:d6:cc:08:64:12:0c:e0:28:4b:c8:a5:
+                    84:90:17:fb:11:46:2e:d6:a7:85:18:cb:18:ae:63:
+                    9a:b0:58:06:f4:00:cf:f8:c4:09:1a:35:0c:a1:f9:
+                    ee:4a:fd:6d:de:fe:26:a5:3b
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL Client, S/MIME
+    Signature Algorithm: md5WithRSAEncryption
+        6c:3d:99:c3:05:e2:1d:ca:e5:2d:aa:68:85:8b:40:31:20:66:
+        13:68:e6:58:3a:89:d0:8d:75:b2:c5:62:d8:7d:82:8f:f7:d9:
+        32:81:77:f6:35:5b:85:29:ce:67:b2:b9:bc:2b:19:78:cf:f3:
+        87:fd:46:f1:95:75:b2:09:57:03:30:c1:7a:cd:72:47:71:80:
+        ca:7d:9d:c9:65:3c:47:11:22:7d:fa:07:0b:28:78:a1:93:e8:
+        05:45:48:e2:32:32:4a:3d:e8:53:1c:10:b7:c7:73:8c:07:50:
+        e1:f9:c9:2b:53:41:f5:83:8d:e5:09:39:4a:8e:03:62:aa:40:
+        63:8b
+
+Deutsche Telekom AG Root CA
+===========================
+MD5 Fingerprint: 77:DE:04:94:77:D0:0C:5F:A7:B1:F4:30:18:87:FB:55
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICjjCCAfegAwIBAgIBBjANBgkqhkiG9w0BAQQFADBtMQswCQYDVQQGEwJERTEc
+MBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEdMBsGA1UECxMUVGVsZVNlYyBU
+cnVzdCBDZW50ZXIxITAfBgNVBAMTGERldXRzY2hlIFRlbGVrb20gUm9vdCBDQTAe
+Fw05ODEyMDkwOTExMDBaFw0wNDEyMDkyMzU5MDBaMG0xCzAJBgNVBAYTAkRFMRww
+GgYDVQQKExNEZXV0c2NoZSBUZWxla29tIEFHMR0wGwYDVQQLExRUZWxlU2VjIFRy
+dXN0IENlbnRlcjEhMB8GA1UEAxMYRGV1dHNjaGUgVGVsZWtvbSBSb290IENBMIGf
+MA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDdBSz5BbO5EtdpcffqVjAIVxRDe7sa
+nG0vV2HX4vVEa+42QZb2ZM7hwbK5pBQEmFDocPiONZp9ScFhHVmu2gYYlX2tzuyp
+vtEYD0CRdiqj5f3+iRX0V/fgVdp1rQD0LME1zLRDJlViRC4BJZyKW/DB0AA1eP41
+3pRAZHiDocw5iQIDAQABoz4wPDAPBgNVHRMECDAGAQH/AgEFMA4GA1UdDwEB/wQE
+AwIBBjAZBgNVHQ4EEgQQLIdZH4sTgLL5hp0+En5YljANBgkqhkiG9w0BAQQFAAOB
+gQAP/nO1B4hvoAuJ6spQH5TelCsLJ15P9RyVJtqMllStGZE3Q12ryYuzzW+YOT3t
+3TXjcbftE5OD6IblKTMTE7w1e/0oL3BZ1dO0jSgTWTvI1XT5RcIHYKq4GFT5pWj/
+1wXVj7YFMS5BSvQQH2BHGguLGU2SVyDS71AZ6M3QcLy8Ng==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 6 (0x6)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=DE, O=Deutsche Telekom AG, OU=TeleSec Trust Center, CN=Deutsche Telekom Root CA
+        Validity
+            Not Before: Dec  9 09:11:00 1998 GMT
+            Not After : Dec  9 23:59:00 2004 GMT
+        Subject: C=DE, O=Deutsche Telekom AG, OU=TeleSec Trust Center, CN=Deutsche Telekom Root CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:dd:05:2c:f9:05:b3:b9:12:d7:69:71:f7:ea:56:
+                    30:08:57:14:43:7b:bb:1a:9c:6d:2f:57:61:d7:e2:
+                    f5:44:6b:ee:36:41:96:f6:64:ce:e1:c1:b2:b9:a4:
+                    14:04:98:50:e8:70:f8:8e:35:9a:7d:49:c1:61:1d:
+                    59:ae:da:06:18:95:7d:ad:ce:ec:a9:be:d1:18:0f:
+                    40:91:76:2a:a3:e5:fd:fe:89:15:f4:57:f7:e0:55:
+                    da:75:ad:00:f4:2c:c1:35:cc:b4:43:26:55:62:44:
+                    2e:01:25:9c:8a:5b:f0:c1:d0:00:35:78:fe:35:de:
+                    94:40:64:78:83:a1:cc:39:89
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: 
+                CA:TRUE, pathlen:5
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Subject Key Identifier: 
+                2C:87:59:1F:8B:13:80:B2:F9:86:9D:3E:12:7E:58:96
+    Signature Algorithm: md5WithRSAEncryption
+        0f:fe:73:b5:07:88:6f:a0:0b:89:ea:ca:50:1f:94:de:94:2b:
+        0b:27:5e:4f:f5:1c:95:26:da:8c:96:54:ad:19:91:37:43:5d:
+        ab:c9:8b:b3:cd:6f:98:39:3d:ed:dd:35:e3:71:b7:ed:13:93:
+        83:e8:86:e5:29:33:13:13:bc:35:7b:fd:28:2f:70:59:d5:d3:
+        b4:8d:28:13:59:3b:c8:d5:74:f9:45:c2:07:60:aa:b8:18:54:
+        f9:a5:68:ff:d7:05:d5:8f:b6:05:31:2e:41:4a:f4:10:1f:60:
+        47:1a:0b:8b:19:4d:92:57:20:d2:ef:50:19:e8:cd:d0:70:bc:
+        bc:36
+
+Digital Signature Trust Co. Global CA 1
+=======================================
+MD5 Fingerprint: 25:7A:BA:83:2E:B6:A2:0B:DA:FE:F5:02:0F:08:D7:AD
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDKTCCApKgAwIBAgIENnAVljANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJV
+UzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQL
+EwhEU1RDQSBFMTAeFw05ODEyMTAxODEwMjNaFw0xODEyMTAxODQwMjNaMEYxCzAJ
+BgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4x
+ETAPBgNVBAsTCERTVENBIEUxMIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQCg
+bIGpzzQeJN3+hijM3oMv+V7UQtLodGBmE5gGHKlREmlvMVW5SXIACH7TpWJENySZ
+j9mDSI+ZbZUTu0M7LklOiDfBu1h//uG9+LthzfNHwJmm8fOR6Hh8AMthyUQncWlV
+Sn5JTe2io74CTADKAqjuAQIxZA9SLRN0dja1erQtcQIBA6OCASQwggEgMBEGCWCG
+SAGG+EIBAQQEAwIABzBoBgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMx
+JDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UECxMI
+RFNUQ0EgRTExDTALBgNVBAMTBENSTDEwKwYDVR0QBCQwIoAPMTk5ODEyMTAxODEw
+MjNagQ8yMDE4MTIxMDE4MTAyM1owCwYDVR0PBAQDAgEGMB8GA1UdIwQYMBaAFGp5
+fpFpRhgTCgJ3pVlbYJglDqL4MB0GA1UdDgQWBBRqeX6RaUYYEwoCd6VZW2CYJQ6i
++DAMBgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqG
+SIb3DQEBBQUAA4GBACIS2Hod3IEGtgllsofIH160L+nEHvI8wbsEkBFKg05+k7lN
+QseSJqBcNJo4cvj9axY+IO6CizEqkzaFI4iKPANo08kJD038bKTaKHKTDomAsH3+
+gG9lbRgzl4vCa4nuYD3Im+9/KzJic5PLPON74nZ4RbyhkwS7hp86W0N6w4pl
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 913315222 (0x36701596)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Digital Signature Trust Co., OU=DSTCA E1
+        Validity
+            Not Before: Dec 10 18:10:23 1998 GMT
+            Not After : Dec 10 18:40:23 2018 GMT
+        Subject: C=US, O=Digital Signature Trust Co., OU=DSTCA E1
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:a0:6c:81:a9:cf:34:1e:24:dd:fe:86:28:cc:de:
+                    83:2f:f9:5e:d4:42:d2:e8:74:60:66:13:98:06:1c:
+                    a9:51:12:69:6f:31:55:b9:49:72:00:08:7e:d3:a5:
+                    62:44:37:24:99:8f:d9:83:48:8f:99:6d:95:13:bb:
+                    43:3b:2e:49:4e:88:37:c1:bb:58:7f:fe:e1:bd:f8:
+                    bb:61:cd:f3:47:c0:99:a6:f1:f3:91:e8:78:7c:00:
+                    cb:61:c9:44:27:71:69:55:4a:7e:49:4d:ed:a2:a3:
+                    be:02:4c:00:ca:02:a8:ee:01:02:31:64:0f:52:2d:
+                    13:74:76:36:b5:7a:b4:2d:71
+                Exponent: 3 (0x3)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Digital Signature Trust Co./OU=DSTCA E1/CN=CRL1
+
+            X509v3 Private Key Usage Period: 
+                Not Before: Dec 10 18:10:23 1998 GMT, Not After: Dec 10 18:10:23 2018 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:6A:79:7E:91:69:46:18:13:0A:02:77:A5:59:5B:60:98:25:0E:A2:F8
+
+            X509v3 Subject Key Identifier: 
+                6A:79:7E:91:69:46:18:13:0A:02:77:A5:59:5B:60:98:25:0E:A2:F8
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0
+..V4.0....
+    Signature Algorithm: sha1WithRSAEncryption
+        22:12:d8:7a:1d:dc:81:06:b6:09:65:b2:87:c8:1f:5e:b4:2f:
+        e9:c4:1e:f2:3c:c1:bb:04:90:11:4a:83:4e:7e:93:b9:4d:42:
+        c7:92:26:a0:5c:34:9a:38:72:f8:fd:6b:16:3e:20:ee:82:8b:
+        31:2a:93:36:85:23:88:8a:3c:03:68:d3:c9:09:0f:4d:fc:6c:
+        a4:da:28:72:93:0e:89:80:b0:7d:fe:80:6f:65:6d:18:33:97:
+        8b:c2:6b:89:ee:60:3d:c8:9b:ef:7f:2b:32:62:73:93:cb:3c:
+        e3:7b:e2:76:78:45:bc:a1:93:04:bb:86:9f:3a:5b:43:7a:c3:
+        8a:65
+
+Digital Signature Trust Co. Global CA 2
+=======================================
+MD5 Fingerprint: 6C:C9:A7:6E:47:F1:0C:E3:53:3B:78:4C:4D:C2:6A:C5
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIID2DCCAsACEQDQHkCLAAACfAAAAAIAAAABMA0GCSqGSIb3DQEBBQUAMIGpMQsw
+CQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENp
+dHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UE
+CxMIRFNUQ0EgWDExFjAUBgNVBAMTDURTVCBSb290Q0EgWDExITAfBgkqhkiG9w0B
+CQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTAeFw05ODEyMDExODE4NTVaFw0wODExMjgx
+ODE4NTVaMIGpMQswCQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMO
+U2FsdCBMYWtlIENpdHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0
+IENvLjERMA8GA1UECxMIRFNUQ0EgWDExFjAUBgNVBAMTDURTVCBSb290Q0EgWDEx
+ITAfBgkqhkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTCCASIwDQYJKoZIhvcN
+AQEBBQADggEPADCCAQoCggEBANLGJrbnpT3BxGjVUG9TxW9JEwm4ryxIjRRqoxdf
+WvnTLnUv2Chi0ZMv/E3Uq4flCMeZ55I/db3rJbQVwZsZPdJEjdd0IG03Ao9pk1uK
+xBmd9LIO/BZsubEFkoPRhSxglD5FVaDZqwgh5mDoO3TymVBRaNADLbGAvqPYUrBE
+zUNKcI5YhZXhTizWLUFv1oTnyJhEykfbLCSlaSbPa7gnYsP0yXqSI+0TZ4KuRS5F
+5X5yP4WdlGIQ5jyRoa13AOAV7POEgHJ6jm5gl8ckWRA0g1vhpaRptlc1HHhZxtMv
+OnNn7pTKBBMFYgZwI7P0fO5F2WQLW0mqpEPOJsREEmy43XkCAwEAATANBgkqhkiG
+9w0BAQUFAAOCAQEAojeyP2n714Z5VEkxlTMr89EJFEliYIalsBHiUMIdBlc+Legz
+ZL6bqq1fG03UmZWii5rJYnK1aerZWKs17RWiQ9a2vAd5ZWRzfdd5ynvVWlHG4VME
+lo04z6MXrDlxawHDi1M8Y+nuecDkvpIyZHqzH5eUYr3qsiAVlfuX8ngvYzZAOONG
+Dx3drJXK50uQe7FLqdTF65raqtWjlBRGjS0f8zrWkzr2Pnn86Oawde3uPclwx12q
+gUtGJRzHbBXjlU4PqjI3lAoXJJIThFjSY28r9+ZbYgsTF7ANUkz+/m9c4pFuHf2k
+Ytdo+o56T9II2pPc8JIRetDccpMMc5NihWjQ9A==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            d0:1e:40:8b:00:00:02:7c:00:00:00:02:00:00:00:01
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=DSTCA X1, CN=DST RootCA X1/Email=ca@digsigtrust.com
+        Validity
+            Not Before: Dec  1 18:18:55 1998 GMT
+            Not After : Nov 28 18:18:55 2008 GMT
+        Subject: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=DSTCA X1, CN=DST RootCA X1/Email=ca@digsigtrust.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:d2:c6:26:b6:e7:a5:3d:c1:c4:68:d5:50:6f:53:
+                    c5:6f:49:13:09:b8:af:2c:48:8d:14:6a:a3:17:5f:
+                    5a:f9:d3:2e:75:2f:d8:28:62:d1:93:2f:fc:4d:d4:
+                    ab:87:e5:08:c7:99:e7:92:3f:75:bd:eb:25:b4:15:
+                    c1:9b:19:3d:d2:44:8d:d7:74:20:6d:37:02:8f:69:
+                    93:5b:8a:c4:19:9d:f4:b2:0e:fc:16:6c:b9:b1:05:
+                    92:83:d1:85:2c:60:94:3e:45:55:a0:d9:ab:08:21:
+                    e6:60:e8:3b:74:f2:99:50:51:68:d0:03:2d:b1:80:
+                    be:a3:d8:52:b0:44:cd:43:4a:70:8e:58:85:95:e1:
+                    4e:2c:d6:2d:41:6f:d6:84:e7:c8:98:44:ca:47:db:
+                    2c:24:a5:69:26:cf:6b:b8:27:62:c3:f4:c9:7a:92:
+                    23:ed:13:67:82:ae:45:2e:45:e5:7e:72:3f:85:9d:
+                    94:62:10:e6:3c:91:a1:ad:77:00:e0:15:ec:f3:84:
+                    80:72:7a:8e:6e:60:97:c7:24:59:10:34:83:5b:e1:
+                    a5:a4:69:b6:57:35:1c:78:59:c6:d3:2f:3a:73:67:
+                    ee:94:ca:04:13:05:62:06:70:23:b3:f4:7c:ee:45:
+                    d9:64:0b:5b:49:aa:a4:43:ce:26:c4:44:12:6c:b8:
+                    dd:79
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        a2:37:b2:3f:69:fb:d7:86:79:54:49:31:95:33:2b:f3:d1:09:
+        14:49:62:60:86:a5:b0:11:e2:50:c2:1d:06:57:3e:2d:e8:33:
+        64:be:9b:aa:ad:5f:1b:4d:d4:99:95:a2:8b:9a:c9:62:72:b5:
+        69:ea:d9:58:ab:35:ed:15:a2:43:d6:b6:bc:07:79:65:64:73:
+        7d:d7:79:ca:7b:d5:5a:51:c6:e1:53:04:96:8d:38:cf:a3:17:
+        ac:39:71:6b:01:c3:8b:53:3c:63:e9:ee:79:c0:e4:be:92:32:
+        64:7a:b3:1f:97:94:62:bd:ea:b2:20:15:95:fb:97:f2:78:2f:
+        63:36:40:38:e3:46:0f:1d:dd:ac:95:ca:e7:4b:90:7b:b1:4b:
+        a9:d4:c5:eb:9a:da:aa:d5:a3:94:14:46:8d:2d:1f:f3:3a:d6:
+        93:3a:f6:3e:79:fc:e8:e6:b0:75:ed:ee:3d:c9:70:c7:5d:aa:
+        81:4b:46:25:1c:c7:6c:15:e3:95:4e:0f:aa:32:37:94:0a:17:
+        24:92:13:84:58:d2:63:6f:2b:f7:e6:5b:62:0b:13:17:b0:0d:
+        52:4c:fe:fe:6f:5c:e2:91:6e:1d:fd:a4:62:d7:68:fa:8e:7a:
+        4f:d2:08:da:93:dc:f0:92:11:7a:d0:dc:72:93:0c:73:93:62:
+        85:68:d0:f4
+
+Digital Signature Trust Co. Global CA 3
+=======================================
+MD5 Fingerprint: 93:C2:8E:11:7B:D4:F3:03:19:BD:28:75:13:4A:45:4A
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDKTCCApKgAwIBAgIENm7TzjANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJV
+UzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQL
+EwhEU1RDQSBFMjAeFw05ODEyMDkxOTE3MjZaFw0xODEyMDkxOTQ3MjZaMEYxCzAJ
+BgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4x
+ETAPBgNVBAsTCERTVENBIEUyMIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQC/
+k48Xku8zExjrEH9OFr//Bo8qhbxe+SSmJIi2A7fBw18DW9Fvrn5C6mYjuGODVvso
+LeE4i7TuqAHhzhy2iCoiRoX7n6dwqUcUP87eZfCocfdPJmyMvMa1795JJ/9IKn3o
+TQPMx7JSxhcxEzu1TdvIxPbDDyQq2gyd55FbgM2UnQIBA6OCASQwggEgMBEGCWCG
+SAGG+EIBAQQEAwIABzBoBgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMx
+JDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UECxMI
+RFNUQ0EgRTIxDTALBgNVBAMTBENSTDEwKwYDVR0QBCQwIoAPMTk5ODEyMDkxOTE3
+MjZagQ8yMDE4MTIwOTE5MTcyNlowCwYDVR0PBAQDAgEGMB8GA1UdIwQYMBaAFB6C
+TShlgDzJQW6sNS5ay97u+DlbMB0GA1UdDgQWBBQegk0oZYA8yUFurDUuWsve7vg5
+WzAMBgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqG
+SIb3DQEBBQUAA4GBAEeNg61i8tuwnkUiBbmi1gMOOHLnnvx75pO2mqWilMg0HZHR
+xdf0CiUPPXiBng+xZ8SQTGPdXqfiup/1902lMXucKS1M/mQ+7LZT/uqb7YLbdHVL
+B3luHtgZg3Pe9T7Qtd7nS2h9Qy4qIOF+oHhEngj1mPnHfxsb1gYgAlihw6ID
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 913232846 (0x366ed3ce)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Digital Signature Trust Co., OU=DSTCA E2
+        Validity
+            Not Before: Dec  9 19:17:26 1998 GMT
+            Not After : Dec  9 19:47:26 2018 GMT
+        Subject: C=US, O=Digital Signature Trust Co., OU=DSTCA E2
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:bf:93:8f:17:92:ef:33:13:18:eb:10:7f:4e:16:
+                    bf:ff:06:8f:2a:85:bc:5e:f9:24:a6:24:88:b6:03:
+                    b7:c1:c3:5f:03:5b:d1:6f:ae:7e:42:ea:66:23:b8:
+                    63:83:56:fb:28:2d:e1:38:8b:b4:ee:a8:01:e1:ce:
+                    1c:b6:88:2a:22:46:85:fb:9f:a7:70:a9:47:14:3f:
+                    ce:de:65:f0:a8:71:f7:4f:26:6c:8c:bc:c6:b5:ef:
+                    de:49:27:ff:48:2a:7d:e8:4d:03:cc:c7:b2:52:c6:
+                    17:31:13:3b:b5:4d:db:c8:c4:f6:c3:0f:24:2a:da:
+                    0c:9d:e7:91:5b:80:cd:94:9d
+                Exponent: 3 (0x3)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Digital Signature Trust Co./OU=DSTCA E2/CN=CRL1
+
+            X509v3 Private Key Usage Period: 
+                Not Before: Dec  9 19:17:26 1998 GMT, Not After: Dec  9 19:17:26 2018 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:1E:82:4D:28:65:80:3C:C9:41:6E:AC:35:2E:5A:CB:DE:EE:F8:39:5B
+
+            X509v3 Subject Key Identifier: 
+                1E:82:4D:28:65:80:3C:C9:41:6E:AC:35:2E:5A:CB:DE:EE:F8:39:5B
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0
+..V4.0....
+    Signature Algorithm: sha1WithRSAEncryption
+        47:8d:83:ad:62:f2:db:b0:9e:45:22:05:b9:a2:d6:03:0e:38:
+        72:e7:9e:fc:7b:e6:93:b6:9a:a5:a2:94:c8:34:1d:91:d1:c5:
+        d7:f4:0a:25:0f:3d:78:81:9e:0f:b1:67:c4:90:4c:63:dd:5e:
+        a7:e2:ba:9f:f5:f7:4d:a5:31:7b:9c:29:2d:4c:fe:64:3e:ec:
+        b6:53:fe:ea:9b:ed:82:db:74:75:4b:07:79:6e:1e:d8:19:83:
+        73:de:f5:3e:d0:b5:de:e7:4b:68:7d:43:2e:2a:20:e1:7e:a0:
+        78:44:9e:08:f5:98:f9:c7:7f:1b:1b:d6:06:20:02:58:a1:c3:
+        a2:03
+
+Digital Signature Trust Co. Global CA 4
+=======================================
+MD5 Fingerprint: CD:3B:3D:62:5B:09:B8:09:36:87:9E:12:2F:71:64:BA
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIID2DCCAsACEQDQHkCLAAB3bQAAAAEAAAAEMA0GCSqGSIb3DQEBBQUAMIGpMQsw
+CQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENp
+dHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UE
+CxMIRFNUQ0EgWDIxFjAUBgNVBAMTDURTVCBSb290Q0EgWDIxITAfBgkqhkiG9w0B
+CQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTAeFw05ODExMzAyMjQ2MTZaFw0wODExMjcy
+MjQ2MTZaMIGpMQswCQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMO
+U2FsdCBMYWtlIENpdHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0
+IENvLjERMA8GA1UECxMIRFNUQ0EgWDIxFjAUBgNVBAMTDURTVCBSb290Q0EgWDIx
+ITAfBgkqhkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTCCASIwDQYJKoZIhvcN
+AQEBBQADggEPADCCAQoCggEBANx18IzAdZaawGIfJvfE4Zrq4FZzW5nNAUSoCLbV
+p9oaBBg5kkp4o4HC9Xd6ULRw/5qrxsfKboNPQpj7Jgva3G3WqZlVUmfpKAOS3OWw
+BZoPFflrWXJW8vo5/Kpo7g8fEIMv/J36F5bdguPmRX3AS4BEH+0s4IT9kVySVGkl
+5WJp3OXuAFK9MwutdQKFp2RQLcUZGTDAJtvJ0/0uma1ZtQtN1EGuhUhDWdy3qOKi
+3sOP17ihYqZoUFLkzzGnlIXan0YyF1bl8utmPRL/Q9uY73fPy4GNNLHGUEom0eQ+
+QVCvbK4iNC7Va26Dunm4dmVI2gkpZGMiuftHdoWMhkTLCdsCAwEAATANBgkqhkiG
+9w0BAQUFAAOCAQEAtTYOXeFhKFoRZcA/gwN5Tb4opgsHAlKFzfiR0BBstWogWxyQ
+2TA8xkieil5k+aFxd+8EJx8H6+Qm93N0yUQYGmbT4EOvkTvRyyzYdFQ6HE3K1GjN
+I3wdEJ5F6fYAbqbNGf9PLCmPV03Ed5K+4EwJ+11EhmYhqLkyolbV6YyDfFk/xPEL
+553snr2cGA4+wjl5KLcDDQjLxufZATdQEOzMYRZA1K8xdHv8PzGn0EdzMzkbzE5q
+10mDEQb+64JYMzJM8FasHpwvVpp7wUocpf1VNs78lk30sPDst2yC7S8xmUJMqbIN
+uBVd8d+6ybVK1GSYsyapMMj9puyrliGtf8J4tg==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            d0:1e:40:8b:00:00:77:6d:00:00:00:01:00:00:00:04
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=DSTCA X2, CN=DST RootCA X2/Email=ca@digsigtrust.com
+        Validity
+            Not Before: Nov 30 22:46:16 1998 GMT
+            Not After : Nov 27 22:46:16 2008 GMT
+        Subject: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=DSTCA X2, CN=DST RootCA X2/Email=ca@digsigtrust.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:dc:75:f0:8c:c0:75:96:9a:c0:62:1f:26:f7:c4:
+                    e1:9a:ea:e0:56:73:5b:99:cd:01:44:a8:08:b6:d5:
+                    a7:da:1a:04:18:39:92:4a:78:a3:81:c2:f5:77:7a:
+                    50:b4:70:ff:9a:ab:c6:c7:ca:6e:83:4f:42:98:fb:
+                    26:0b:da:dc:6d:d6:a9:99:55:52:67:e9:28:03:92:
+                    dc:e5:b0:05:9a:0f:15:f9:6b:59:72:56:f2:fa:39:
+                    fc:aa:68:ee:0f:1f:10:83:2f:fc:9d:fa:17:96:dd:
+                    82:e3:e6:45:7d:c0:4b:80:44:1f:ed:2c:e0:84:fd:
+                    91:5c:92:54:69:25:e5:62:69:dc:e5:ee:00:52:bd:
+                    33:0b:ad:75:02:85:a7:64:50:2d:c5:19:19:30:c0:
+                    26:db:c9:d3:fd:2e:99:ad:59:b5:0b:4d:d4:41:ae:
+                    85:48:43:59:dc:b7:a8:e2:a2:de:c3:8f:d7:b8:a1:
+                    62:a6:68:50:52:e4:cf:31:a7:94:85:da:9f:46:32:
+                    17:56:e5:f2:eb:66:3d:12:ff:43:db:98:ef:77:cf:
+                    cb:81:8d:34:b1:c6:50:4a:26:d1:e4:3e:41:50:af:
+                    6c:ae:22:34:2e:d5:6b:6e:83:ba:79:b8:76:65:48:
+                    da:09:29:64:63:22:b9:fb:47:76:85:8c:86:44:cb:
+                    09:db
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        b5:36:0e:5d:e1:61:28:5a:11:65:c0:3f:83:03:79:4d:be:28:
+        a6:0b:07:02:52:85:cd:f8:91:d0:10:6c:b5:6a:20:5b:1c:90:
+        d9:30:3c:c6:48:9e:8a:5e:64:f9:a1:71:77:ef:04:27:1f:07:
+        eb:e4:26:f7:73:74:c9:44:18:1a:66:d3:e0:43:af:91:3b:d1:
+        cb:2c:d8:74:54:3a:1c:4d:ca:d4:68:cd:23:7c:1d:10:9e:45:
+        e9:f6:00:6e:a6:cd:19:ff:4f:2c:29:8f:57:4d:c4:77:92:be:
+        e0:4c:09:fb:5d:44:86:66:21:a8:b9:32:a2:56:d5:e9:8c:83:
+        7c:59:3f:c4:f1:0b:e7:9d:ec:9e:bd:9c:18:0e:3e:c2:39:79:
+        28:b7:03:0d:08:cb:c6:e7:d9:01:37:50:10:ec:cc:61:16:40:
+        d4:af:31:74:7b:fc:3f:31:a7:d0:47:73:33:39:1b:cc:4e:6a:
+        d7:49:83:11:06:fe:eb:82:58:33:32:4c:f0:56:ac:1e:9c:2f:
+        56:9a:7b:c1:4a:1c:a5:fd:55:36:ce:fc:96:4d:f4:b0:f0:ec:
+        b7:6c:82:ed:2f:31:99:42:4c:a9:b2:0d:b8:15:5d:f1:df:ba:
+        c9:b5:4a:d4:64:98:b3:26:a9:30:c8:fd:a6:ec:ab:96:21:ad:
+        7f:c2:78:b6
+
+Entrust Worldwide by DST
+========================
+MD5 Fingerprint: B4:65:22:0A:7C:AD:DF:41:B7:D5:44:D5:AD:FA:9A:75
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDRzCCArCgAwIBAgIENm3FGDANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJV
+UzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRswGQYDVQQL
+ExJEU1QtRW50cnVzdCBHVEkgQ0EwHhcNOTgxMjA5MDAwMjI0WhcNMTgxMjA5MDAz
+MjI0WjBQMQswCQYDVQQGEwJVUzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUg
+VHJ1c3QgQ28uMRswGQYDVQQLExJEU1QtRW50cnVzdCBHVEkgQ0EwgZ0wDQYJKoZI
+hvcNAQEBBQADgYsAMIGHAoGBALYd90uNDxPjEvUJ/gYyDq9MQfV91Ec9KgrfgwXe
+3n3mAxb2UTrLRxpKrX7E/R20vnSKeN0Lg460hBPE+/htKa6h4Q8PQ+O1XmBp+oOU
+/Hnm3Hbt0UQrjv0Su/4XdxcMie2n71F9xO04wzujevviTaBgtfL9E2XTxuw/vjWc
+PSLvAgEDo4IBLjCCASowEQYJYIZIAYb4QgEBBAQDAgAHMHIGA1UdHwRrMGkwZ6Bl
+oGOkYTBfMQswCQYDVQQGEwJVUzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUg
+VHJ1c3QgQ28uMRswGQYDVQQLExJEU1QtRW50cnVzdCBHVEkgQ0ExDTALBgNVBAMT
+BENSTDEwKwYDVR0QBCQwIoAPMTk5ODEyMDkwMDAyMjRagQ8yMDE4MTIwOTAwMDIy
+NFowCwYDVR0PBAQDAgEGMB8GA1UdIwQYMBaAFJOaRMrQeFOAKUkE38evMz+ZdV+u
+MB0GA1UdDgQWBBSTmkTK0HhTgClJBN/HrzM/mXVfrjAMBgNVHRMEBTADAQH/MBkG
+CSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4GBAGSJzAOn
+3AryWCDn/RegKHLNh7DNmLUkR2MzMRAQsu+KV3KuTAPgZ5+sYEOEIsGpo+Wxp94J
+1M8NeEYjW49Je/4TIpeU6nJI4SwgeJbpZkUZywllY2E/0UmYsXYQVdVjSmZLpAdr
+3nt/ueaTWxoCW4AO3Y0Y1Iqjwmjxo+AY0U5M
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 913163544 (0x366dc518)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Digital Signature Trust Co., OU=DST-Entrust GTI CA
+        Validity
+            Not Before: Dec  9 00:02:24 1998 GMT
+            Not After : Dec  9 00:32:24 2018 GMT
+        Subject: C=US, O=Digital Signature Trust Co., OU=DST-Entrust GTI CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b6:1d:f7:4b:8d:0f:13:e3:12:f5:09:fe:06:32:
+                    0e:af:4c:41:f5:7d:d4:47:3d:2a:0a:df:83:05:de:
+                    de:7d:e6:03:16:f6:51:3a:cb:47:1a:4a:ad:7e:c4:
+                    fd:1d:b4:be:74:8a:78:dd:0b:83:8e:b4:84:13:c4:
+                    fb:f8:6d:29:ae:a1:e1:0f:0f:43:e3:b5:5e:60:69:
+                    fa:83:94:fc:79:e6:dc:76:ed:d1:44:2b:8e:fd:12:
+                    bb:fe:17:77:17:0c:89:ed:a7:ef:51:7d:c4:ed:38:
+                    c3:3b:a3:7a:fb:e2:4d:a0:60:b5:f2:fd:13:65:d3:
+                    c6:ec:3f:be:35:9c:3d:22:ef
+                Exponent: 3 (0x3)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Digital Signature Trust Co./OU=DST-Entrust GTI CA/CN=CRL1
+
+            X509v3 Private Key Usage Period: 
+                Not Before: Dec  9 00:02:24 1998 GMT, Not After: Dec  9 00:02:24 2018 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:93:9A:44:CA:D0:78:53:80:29:49:04:DF:C7:AF:33:3F:99:75:5F:AE
+
+            X509v3 Subject Key Identifier: 
+                93:9A:44:CA:D0:78:53:80:29:49:04:DF:C7:AF:33:3F:99:75:5F:AE
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0
+..V4.0....
+    Signature Algorithm: sha1WithRSAEncryption
+        64:89:cc:03:a7:dc:0a:f2:58:20:e7:fd:17:a0:28:72:cd:87:
+        b0:cd:98:b5:24:47:63:33:31:10:10:b2:ef:8a:57:72:ae:4c:
+        03:e0:67:9f:ac:60:43:84:22:c1:a9:a3:e5:b1:a7:de:09:d4:
+        cf:0d:78:46:23:5b:8f:49:7b:fe:13:22:97:94:ea:72:48:e1:
+        2c:20:78:96:e9:66:45:19:cb:09:65:63:61:3f:d1:49:98:b1:
+        76:10:55:d5:63:4a:66:4b:a4:07:6b:de:7b:7f:b9:e6:93:5b:
+        1a:02:5b:80:0e:dd:8d:18:d4:8a:a3:c2:68:f1:a3:e0:18:d1:
+        4e:4c
+
+Entrust.net Premium 2048 Secure Server CA
+=========================================
+MD5 Fingerprint: BA:21:EA:20:D6:DD:DB:8F:C1:57:8B:40:AD:A1:FC:FC
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEXDCCA0SgAwIBAgIEOGO5ZjANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChML
+RW50cnVzdC5uZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBp
+bmNvcnAuIGJ5IHJlZi4gKGxpbWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5
+IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNVBAMTKkVudHJ1c3QubmV0IENlcnRp
+ZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQxNzUwNTFaFw0xOTEy
+MjQxODIwNTFaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3d3d3
+LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxp
+YWIuKTElMCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEG
+A1UEAxMqRW50cnVzdC5uZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgp
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArU1LqRKGsuqjIAcVFmQq
+K0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOLGp18EzoOH1u3Hs/lJBQe
+sYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSrhRSGlVuX
+MlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVT
+XTzWnLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/
+HoZdenoVve8AjhUiVBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH
+4QIDAQABo3QwcjARBglghkgBhvhCAQEEBAMCAAcwHwYDVR0jBBgwFoAUVeSB0RGA
+vtiJuQijMfmhJAkWuXAwHQYDVR0OBBYEFFXkgdERgL7YibkIozH5oSQJFrlwMB0G
+CSqGSIb2fQdBAAQQMA4bCFY1LjA6NC4wAwIEkDANBgkqhkiG9w0BAQUFAAOCAQEA
+WUesIYSKF8mciVMeuoCFGsY8Tj6xnLZ8xpJdGGQC49MGCBFhfGPjK50xA3B20qMo
+oPS7mmNz7W3lKtvtFKkrxjYR0CvrB4ul2p5cGZ1WEvVUKcgF7bISKo30Axv/55IQ
+h7A6tcOdBTcSo8f0FbnVpDkWm1M6I5HxqIKiaohowXkCIryqptau37AUX7iH0N18
+f3v/rxzP5tsHrV7bhZ3QKw0z2wTR5klAEyt2+z7pnIkPFc4YsIV4IU9rTw76NmfN
+B/L/CNDi3tm/Kq+4h4YhPATKt5Rof8886ZjXOP/swNlQ8C5LWK5Gb9Auw2DaclVy
+vUxFnmG6v4SBkgPR0ml8xQ==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 946059622 (0x3863b966)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: O=Entrust.net, OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Certification Authority (2048)
+        Validity
+            Not Before: Dec 24 17:50:51 1999 GMT
+            Not After : Dec 24 18:20:51 2019 GMT
+        Subject: O=Entrust.net, OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Certification Authority (2048)
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:ad:4d:4b:a9:12:86:b2:ea:a3:20:07:15:16:64:
+                    2a:2b:4b:d1:bf:0b:4a:4d:8e:ed:80:76:a5:67:b7:
+                    78:40:c0:73:42:c8:68:c0:db:53:2b:dd:5e:b8:76:
+                    98:35:93:8b:1a:9d:7c:13:3a:0e:1f:5b:b7:1e:cf:
+                    e5:24:14:1e:b1:81:a9:8d:7d:b8:cc:6b:4b:03:f1:
+                    02:0c:dc:ab:a5:40:24:00:7f:74:94:a1:9d:08:29:
+                    b3:88:0b:f5:87:77:9d:55:cd:e4:c3:7e:d7:6a:64:
+                    ab:85:14:86:95:5b:97:32:50:6f:3d:c8:ba:66:0c:
+                    e3:fc:bd:b8:49:c1:76:89:49:19:fd:c0:a8:bd:89:
+                    a3:67:2f:c6:9f:bc:71:19:60:b8:2d:e9:2c:c9:90:
+                    76:66:7b:94:e2:af:78:d6:65:53:5d:3c:d6:9c:b2:
+                    cf:29:03:f9:2f:a4:50:b2:d4:48:ce:05:32:55:8a:
+                    fd:b2:64:4c:0e:e4:98:07:75:db:7f:df:b9:08:55:
+                    60:85:30:29:f9:7b:48:a4:69:86:e3:35:3f:1e:86:
+                    5d:7a:7a:15:bd:ef:00:8e:15:22:54:17:00:90:26:
+                    93:bc:0e:49:68:91:bf:f8:47:d3:9d:95:42:c1:0e:
+                    4d:df:6f:26:cf:c3:18:21:62:66:43:70:d6:d5:c0:
+                    07:e1
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 Authority Key Identifier: 
+                keyid:55:E4:81:D1:11:80:BE:D8:89:B9:08:A3:31:F9:A1:24:09:16:B9:70
+
+            X509v3 Subject Key Identifier: 
+                55:E4:81:D1:11:80:BE:D8:89:B9:08:A3:31:F9:A1:24:09:16:B9:70
+            1.2.840.113533.7.65.0: 
+                0...V5.0:4.0....
+    Signature Algorithm: sha1WithRSAEncryption
+        59:47:ac:21:84:8a:17:c9:9c:89:53:1e:ba:80:85:1a:c6:3c:
+        4e:3e:b1:9c:b6:7c:c6:92:5d:18:64:02:e3:d3:06:08:11:61:
+        7c:63:e3:2b:9d:31:03:70:76:d2:a3:28:a0:f4:bb:9a:63:73:
+        ed:6d:e5:2a:db:ed:14:a9:2b:c6:36:11:d0:2b:eb:07:8b:a5:
+        da:9e:5c:19:9d:56:12:f5:54:29:c8:05:ed:b2:12:2a:8d:f4:
+        03:1b:ff:e7:92:10:87:b0:3a:b5:c3:9d:05:37:12:a3:c7:f4:
+        15:b9:d5:a4:39:16:9b:53:3a:23:91:f1:a8:82:a2:6a:88:68:
+        c1:79:02:22:bc:aa:a6:d6:ae:df:b0:14:5f:b8:87:d0:dd:7c:
+        7f:7b:ff:af:1c:cf:e6:db:07:ad:5e:db:85:9d:d0:2b:0d:33:
+        db:04:d1:e6:49:40:13:2b:76:fb:3e:e9:9c:89:0f:15:ce:18:
+        b0:85:78:21:4f:6b:4f:0e:fa:36:67:cd:07:f2:ff:08:d0:e2:
+        de:d9:bf:2a:af:b8:87:86:21:3c:04:ca:b7:94:68:7f:cf:3c:
+        e9:98:d7:38:ff:ec:c0:d9:50:f0:2e:4b:58:ae:46:6f:d0:2e:
+        c3:60:da:72:55:72:bd:4c:45:9e:61:ba:bf:84:81:92:03:d1:
+        d2:69:7c:c5
+
+Entrust.net Secure Personal CA
+==============================
+MD5 Fingerprint: 0C:41:2F:13:5B:A0:54:F5:96:66:2D:7E:CD:0E:03:F4
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIE7TCCBFagAwIBAgIEOAOR7jANBgkqhkiG9w0BAQQFADCByTELMAkGA1UEBhMC
+VVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MUgwRgYDVQQLFD93d3cuZW50cnVzdC5u
+ZXQvQ2xpZW50X0NBX0luZm8vQ1BTIGluY29ycC4gYnkgcmVmLiBsaW1pdHMgbGlh
+Yi4xJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNV
+BAMTKkVudHJ1c3QubmV0IENsaWVudCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAe
+Fw05OTEwMTIxOTI0MzBaFw0xOTEwMTIxOTU0MzBaMIHJMQswCQYDVQQGEwJVUzEU
+MBIGA1UEChMLRW50cnVzdC5uZXQxSDBGBgNVBAsUP3d3dy5lbnRydXN0Lm5ldC9D
+bGllbnRfQ0FfSW5mby9DUFMgaW5jb3JwLiBieSByZWYuIGxpbWl0cyBsaWFiLjEl
+MCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMq
+RW50cnVzdC5uZXQgQ2xpZW50IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGdMA0G
+CSqGSIb3DQEBAQUAA4GLADCBhwKBgQDIOpleMRffrCdvkHvkGf9FozTC28GoT/Bo
+6oT9n3V5z8GKUZSvx1cDR2SerYIbWtp/N3hHuzeYEpbOxhN979IMMFGpOZ5V+Pux
+5zDeg7K6PvHViTs7hbqqdCz+PzFur5GVbgbUB01LLFZHGARS2g4Qk79jkJvh34zm
+AqTmT173iwIBA6OCAeAwggHcMBEGCWCGSAGG+EIBAQQEAwIABzCCASIGA1UdHwSC
+ARkwggEVMIHkoIHhoIHepIHbMIHYMQswCQYDVQQGEwJVUzEUMBIGA1UEChMLRW50
+cnVzdC5uZXQxSDBGBgNVBAsUP3d3dy5lbnRydXN0Lm5ldC9DbGllbnRfQ0FfSW5m
+by9DUFMgaW5jb3JwLiBieSByZWYuIGxpbWl0cyBsaWFiLjElMCMGA1UECxMcKGMp
+IDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMqRW50cnVzdC5uZXQg
+Q2xpZW50IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCyg
+KqAohiZodHRwOi8vd3d3LmVudHJ1c3QubmV0L0NSTC9DbGllbnQxLmNybDArBgNV
+HRAEJDAigA8xOTk5MTAxMjE5MjQzMFqBDzIwMTkxMDEyMTkyNDMwWjALBgNVHQ8E
+BAMCAQYwHwYDVR0jBBgwFoAUxPucKXuXzUyW/O5bs8qZdIuV6kwwHQYDVR0OBBYE
+FMT7nCl7l81MlvzuW7PKmXSLlepMMAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EA
+BAwwChsEVjQuMAMCBJAwDQYJKoZIhvcNAQEEBQADgYEAP66K8ddmAwWePvrqHEa7
+pFuPeJoSSJn59DXeDDYHAmsQOokUgZwxpnyyQbJq5wcBoUv5nyU7lsqZwz6hURzz
+wy5E97BnRqqS5TvaHBkUODDV4qIxJS7x7EU47fgGWANzYrAQMY9Av2TgXD7FTx/a
+EkP/TOYGJqibGapEPHayXOw=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 939758062 (0x380391ee)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=US, O=Entrust.net, OU=www.entrust.net/Client_CA_Info/CPS incorp. by ref. limits liab., OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Client Certification Authority
+        Validity
+            Not Before: Oct 12 19:24:30 1999 GMT
+            Not After : Oct 12 19:54:30 2019 GMT
+        Subject: C=US, O=Entrust.net, OU=www.entrust.net/Client_CA_Info/CPS incorp. by ref. limits liab., OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Client Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:c8:3a:99:5e:31:17:df:ac:27:6f:90:7b:e4:19:
+                    ff:45:a3:34:c2:db:c1:a8:4f:f0:68:ea:84:fd:9f:
+                    75:79:cf:c1:8a:51:94:af:c7:57:03:47:64:9e:ad:
+                    82:1b:5a:da:7f:37:78:47:bb:37:98:12:96:ce:c6:
+                    13:7d:ef:d2:0c:30:51:a9:39:9e:55:f8:fb:b1:e7:
+                    30:de:83:b2:ba:3e:f1:d5:89:3b:3b:85:ba:aa:74:
+                    2c:fe:3f:31:6e:af:91:95:6e:06:d4:07:4d:4b:2c:
+                    56:47:18:04:52:da:0e:10:93:bf:63:90:9b:e1:df:
+                    8c:e6:02:a4:e6:4f:5e:f7:8b
+                Exponent: 3 (0x3)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Entrust.net/OU=www.entrust.net/Client_CA_Info/CPS incorp. by ref. limits liab./OU=(c) 1999 Entrust.net Limited/CN=Entrust.net Client Certification Authority/CN=CRL1
+                URI:http://www.entrust.net/CRL/Client1.crl
+
+            X509v3 Private Key Usage Period: 
+                Not Before: Oct 12 19:24:30 1999 GMT, Not After: Oct 12 19:24:30 2019 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:C4:FB:9C:29:7B:97:CD:4C:96:FC:EE:5B:B3:CA:99:74:8B:95:EA:4C
+
+            X509v3 Subject Key Identifier: 
+                C4:FB:9C:29:7B:97:CD:4C:96:FC:EE:5B:B3:CA:99:74:8B:95:EA:4C
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0
+..V4.0....
+    Signature Algorithm: md5WithRSAEncryption
+        3f:ae:8a:f1:d7:66:03:05:9e:3e:fa:ea:1c:46:bb:a4:5b:8f:
+        78:9a:12:48:99:f9:f4:35:de:0c:36:07:02:6b:10:3a:89:14:
+        81:9c:31:a6:7c:b2:41:b2:6a:e7:07:01:a1:4b:f9:9f:25:3b:
+        96:ca:99:c3:3e:a1:51:1c:f3:c3:2e:44:f7:b0:67:46:aa:92:
+        e5:3b:da:1c:19:14:38:30:d5:e2:a2:31:25:2e:f1:ec:45:38:
+        ed:f8:06:58:03:73:62:b0:10:31:8f:40:bf:64:e0:5c:3e:c5:
+        4f:1f:da:12:43:ff:4c:e6:06:26:a8:9b:19:aa:44:3c:76:b2:
+        5c:ec
+
+Entrust.net Secure Server CA
+============================
+MD5 Fingerprint: DF:F2:80:73:CC:F1:E6:61:73:FC:F5:42:E9:C5:7C:EE
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMC
+VVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5u
+ZXQvQ1BTIGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMc
+KGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDE6MDgGA1UEAxMxRW50cnVzdC5u
+ZXQgU2VjdXJlIFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05OTA1
+MjUxNjA5NDBaFw0xOTA1MjUxNjM5NDBaMIHDMQswCQYDVQQGEwJVUzEUMBIGA1UE
+ChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5j
+b3JwLiBieSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBF
+bnRydXN0Lm5ldCBMaW1pdGVkMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUg
+U2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGdMA0GCSqGSIb3DQEBAQUA
+A4GLADCBhwKBgQDNKIM0VBuJ8w+vN5Ex/68xYMmo6LIQaO2f55M28Qpku0f1BBc/
+I0dNxScZgSYMVHINiC3ZH5oSn7yzcdOAGT9HZnuMNSjSuQrfJNqc1lB5gXpa0zf3
+wkrYKZImZNHkmGw6AIr1NJtl+O3jEP/9uElY3KDegjlrgbEWGWG5VLbmQwIBA6OC
+AdcwggHTMBEGCWCGSAGG+EIBAQQEAwIABzCCARkGA1UdHwSCARAwggEMMIHeoIHb
+oIHYpIHVMIHSMQswCQYDVQQGEwJVUzEUMBIGA1UEChMLRW50cnVzdC5uZXQxOzA5
+BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5jb3JwLiBieSByZWYuIChsaW1p
+dHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBFbnRydXN0Lm5ldCBMaW1pdGVk
+MTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENlcnRpZmljYXRp
+b24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCmgJ6AlhiNodHRwOi8vd3d3LmVu
+dHJ1c3QubmV0L0NSTC9uZXQxLmNybDArBgNVHRAEJDAigA8xOTk5MDUyNTE2MDk0
+MFqBDzIwMTkwNTI1MTYwOTQwWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAU8Bdi
+E1U9s/8KAGv7UISX8+1i0BowHQYDVR0OBBYEFPAXYhNVPbP/CgBr+1CEl/PtYtAa
+MAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EABAwwChsEVjQuMAMCBJAwDQYJKoZI
+hvcNAQEFBQADgYEAkNwwAvpkdMKnCqV8IY00F6j7Rw7/JXyNEwr75Ji174z4xRAN
+95K+8cPV1ZVqBLssziY2ZcgxxufuP+NXdYR6Ee9GTxj005i7qIcyunL2POI9n9cd
+2cNgQ4xYDiKWL2KjLB+6rQXvqzJ4h6BUcxm1XAX5Uj5tLUUL9wqT6u0G+bI=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 927650371 (0x374ad243)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Entrust.net, OU=www.entrust.net/CPS incorp. by ref. (limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Secure Server Certification Authority
+        Validity
+            Not Before: May 25 16:09:40 1999 GMT
+            Not After : May 25 16:39:40 2019 GMT
+        Subject: C=US, O=Entrust.net, OU=www.entrust.net/CPS incorp. by ref. (limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Secure Server Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:cd:28:83:34:54:1b:89:f3:0f:af:37:91:31:ff:
+                    af:31:60:c9:a8:e8:b2:10:68:ed:9f:e7:93:36:f1:
+                    0a:64:bb:47:f5:04:17:3f:23:47:4d:c5:27:19:81:
+                    26:0c:54:72:0d:88:2d:d9:1f:9a:12:9f:bc:b3:71:
+                    d3:80:19:3f:47:66:7b:8c:35:28:d2:b9:0a:df:24:
+                    da:9c:d6:50:79:81:7a:5a:d3:37:f7:c2:4a:d8:29:
+                    92:26:64:d1:e4:98:6c:3a:00:8a:f5:34:9b:65:f8:
+                    ed:e3:10:ff:fd:b8:49:58:dc:a0:de:82:39:6b:81:
+                    b1:16:19:61:b9:54:b6:e6:43
+                Exponent: 3 (0x3)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Entrust.net/OU=www.entrust.net/CPS incorp. by ref. (limits liab.)/OU=(c) 1999 Entrust.net Limited/CN=Entrust.net Secure Server Certification Authority/CN=CRL1
+                URI:http://www.entrust.net/CRL/net1.crl
+
+            X509v3 Private Key Usage Period: 
+                Not Before: May 25 16:09:40 1999 GMT, Not After: May 25 16:09:40 2019 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:F0:17:62:13:55:3D:B3:FF:0A:00:6B:FB:50:84:97:F3:ED:62:D0:1A
+
+            X509v3 Subject Key Identifier: 
+                F0:17:62:13:55:3D:B3:FF:0A:00:6B:FB:50:84:97:F3:ED:62:D0:1A
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0
+..V4.0....
+    Signature Algorithm: sha1WithRSAEncryption
+        90:dc:30:02:fa:64:74:c2:a7:0a:a5:7c:21:8d:34:17:a8:fb:
+        47:0e:ff:25:7c:8d:13:0a:fb:e4:98:b5:ef:8c:f8:c5:10:0d:
+        f7:92:be:f1:c3:d5:d5:95:6a:04:bb:2c:ce:26:36:65:c8:31:
+        c6:e7:ee:3f:e3:57:75:84:7a:11:ef:46:4f:18:f4:d3:98:bb:
+        a8:87:32:ba:72:f6:3c:e2:3d:9f:d7:1d:d9:c3:60:43:8c:58:
+        0e:22:96:2f:62:a3:2c:1f:ba:ad:05:ef:ab:32:78:87:a0:54:
+        73:19:b5:5c:05:f9:52:3e:6d:2d:45:0b:f7:0a:93:ea:ed:06:
+        f9:b2
+
+Equifax Premium CA
+==================
+MD5 Fingerprint: A9:E9:A8:9D:0E:73:E3:B1:2F:37:0D:E8:48:3F:86:ED
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDIzCCAoygAwIBAgIENeHvHjANBgkqhkiG9w0BAQUFADBPMQswCQYDVQQGEwJV
+UzEQMA4GA1UEChMHRXF1aWZheDEuMCwGA1UECxMlRXF1aWZheCBQcmVtaXVtIENl
+cnRpZmljYXRlIEF1dGhvcml0eTAeFw05ODA4MjQyMjU0MjNaFw0xODA4MjQyMjU0
+MjNaME8xCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFcXVpZmF4MS4wLAYDVQQLEyVF
+cXVpZmF4IFByZW1pdW0gQ2VydGlmaWNhdGUgQXV0aG9yaXR5MIGfMA0GCSqGSIb3
+DQEBAQUAA4GNADCBiQKBgQDOoQaOBswIC8GGqN4g1Q0O0Q3En+pq2bPCMkdAb4qI
+pAm9OCwd5svmpPM269rrvPxkswf2Lbyqzp8ZSGhK/PWiRX4JEPWPs0lcIwY56hOL
+uAvNkR12X9k3oUT7X5DyZ7PNGJlDH3YSawLylYM4Q8L2YjTKyXhdX9LYupr/vhBg
+WwIDAQABo4IBCjCCAQYwcQYDVR0fBGowaDBmoGSgYqRgMF4xCzAJBgNVBAYTAlVT
+MRAwDgYDVQQKEwdFcXVpZmF4MS4wLAYDVQQLEyVFcXVpZmF4IFByZW1pdW0gQ2Vy
+dGlmaWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIw
+MTgwODI0MjI1NDIzWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUFe6yKFmrbuX4
+z4uB9CThrj91G5gwHQYDVR0OBBYEFBXusihZq27l+M+LgfQk4a4/dRuYMAwGA1Ud
+EwQFMAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEB
+BQUAA4GBAL0LnCepA9so3JipS9DRjqeoGlqR4Jzx9xh8LiKeNh/JqLXNRkpu+jUH
+G4YI65/iqPmdQS06rlxctl80BOv8KmCw+3TkhellOJbuFcfGd2MSvYpoH6tsfdrK
+XBPO6snrCVzFc+cSAdXZUwee4A+W8Iu0u0VIn4bFGVWgy5bFA/xI
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 903999262 (0x35e1ef1e)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Equifax, OU=Equifax Premium Certificate Authority
+        Validity
+            Not Before: Aug 24 22:54:23 1998 GMT
+            Not After : Aug 24 22:54:23 2018 GMT
+        Subject: C=US, O=Equifax, OU=Equifax Premium Certificate Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:ce:a1:06:8e:06:cc:08:0b:c1:86:a8:de:20:d5:
+                    0d:0e:d1:0d:c4:9f:ea:6a:d9:b3:c2:32:47:40:6f:
+                    8a:88:a4:09:bd:38:2c:1d:e6:cb:e6:a4:f3:36:eb:
+                    da:eb:bc:fc:64:b3:07:f6:2d:bc:aa:ce:9f:19:48:
+                    68:4a:fc:f5:a2:45:7e:09:10:f5:8f:b3:49:5c:23:
+                    06:39:ea:13:8b:b8:0b:cd:91:1d:76:5f:d9:37:a1:
+                    44:fb:5f:90:f2:67:b3:cd:18:99:43:1f:76:12:6b:
+                    02:f2:95:83:38:43:c2:f6:62:34:ca:c9:78:5d:5f:
+                    d2:d8:ba:9a:ff:be:10:60:5b
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Equifax/OU=Equifax Premium Certificate Authority/CN=CRL1
+
+            X509v3 Private Key Usage Period: 
+                Not After: Aug 24 22:54:23 2018 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:15:EE:B2:28:59:AB:6E:E5:F8:CF:8B:81:F4:24:E1:AE:3F:75:1B:98
+
+            X509v3 Subject Key Identifier: 
+                15:EE:B2:28:59:AB:6E:E5:F8:CF:8B:81:F4:24:E1:AE:3F:75:1B:98
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0...V3.0c....
+    Signature Algorithm: sha1WithRSAEncryption
+        bd:0b:9c:27:a9:03:db:28:dc:98:a9:4b:d0:d1:8e:a7:a8:1a:
+        5a:91:e0:9c:f1:f7:18:7c:2e:22:9e:36:1f:c9:a8:b5:cd:46:
+        4a:6e:fa:35:07:1b:86:08:eb:9f:e2:a8:f9:9d:41:2d:3a:ae:
+        5c:5c:b6:5f:34:04:eb:fc:2a:60:b0:fb:74:e4:85:e9:65:38:
+        96:ee:15:c7:c6:77:63:12:bd:8a:68:1f:ab:6c:7d:da:ca:5c:
+        13:ce:ea:c9:eb:09:5c:c5:73:e7:12:01:d5:d9:53:07:9e:e0:
+        0f:96:f0:8b:b4:bb:45:48:9f:86:c5:19:55:a0:cb:96:c5:03:
+        fc:48
+
+Equifax Secure CA
+=================
+MD5 Fingerprint: 67:CB:9D:C0:13:24:8A:82:9B:B2:17:1E:D1:1B:EC:D4
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
+UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy
+dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1
+MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx
+dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B
+AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f
+BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A
+cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC
+AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ
+MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm
+aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw
+ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj
+IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF
+MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA
+A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y
+7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh
+1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 903804111 (0x35def4cf)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Equifax, OU=Equifax Secure Certificate Authority
+        Validity
+            Not Before: Aug 22 16:41:51 1998 GMT
+            Not After : Aug 22 16:41:51 2018 GMT
+        Subject: C=US, O=Equifax, OU=Equifax Secure Certificate Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:c1:5d:b1:58:67:08:62:ee:a0:9a:2d:1f:08:6d:
+                    91:14:68:98:0a:1e:fe:da:04:6f:13:84:62:21:c3:
+                    d1:7c:ce:9f:05:e0:b8:01:f0:4e:34:ec:e2:8a:95:
+                    04:64:ac:f1:6b:53:5f:05:b3:cb:67:80:bf:42:02:
+                    8e:fe:dd:01:09:ec:e1:00:14:4f:fc:fb:f0:0c:dd:
+                    43:ba:5b:2b:e1:1f:80:70:99:15:57:93:16:f1:0f:
+                    97:6a:b7:c2:68:23:1c:cc:4d:59:30:ac:51:1e:3b:
+                    af:2b:d6:ee:63:45:7b:c5:d9:5f:50:d2:e3:50:0f:
+                    3a:88:e7:bf:14:fd:e0:c7:b9
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority/CN=CRL1
+
+            X509v3 Private Key Usage Period: 
+                Not After: Aug 22 16:41:51 2018 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:48:E6:68:F9:2B:D2:B2:95:D7:47:D8:23:20:10:4F:33:98:90:9F:D4
+
+            X509v3 Subject Key Identifier: 
+                48:E6:68:F9:2B:D2:B2:95:D7:47:D8:23:20:10:4F:33:98:90:9F:D4
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0...V3.0c....
+    Signature Algorithm: sha1WithRSAEncryption
+        58:ce:29:ea:fc:f7:de:b5:ce:02:b9:17:b5:85:d1:b9:e3:e0:
+        95:cc:25:31:0d:00:a6:92:6e:7f:b6:92:63:9e:50:95:d1:9a:
+        6f:e4:11:de:63:85:6e:98:ee:a8:ff:5a:c8:d3:55:b2:66:71:
+        57:de:c0:21:eb:3d:2a:a7:23:49:01:04:86:42:7b:fc:ee:7f:
+        a2:16:52:b5:67:67:d3:40:db:3b:26:58:b2:28:77:3d:ae:14:
+        77:61:d6:fa:2a:66:27:a0:0d:fa:a7:73:5c:ea:70:f1:94:21:
+        65:44:5f:fa:fc:ef:29:68:a9:a2:87:79:ef:79:ef:4f:ac:07:
+        77:38
+
+GTE CyberTrust Global Root
+==========================
+MD5 Fingerprint: CA:3D:D3:68:F1:03:5C:D0:32:FA:B8:2B:59:E8:5A:DB
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICWjCCAcMCAgGlMA0GCSqGSIb3DQEBBAUAMHUxCzAJBgNVBAYTAlVTMRgwFgYD
+VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv
+bHV0aW9ucywgSW5jLjEjMCEGA1UEAxMaR1RFIEN5YmVyVHJ1c3QgR2xvYmFsIFJv
+b3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEzMjM1OTAwWjB1MQswCQYDVQQGEwJV
+UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQLEx5HVEUgQ3liZXJU
+cnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0IEds
+b2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrH
+iM3dFw4usJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTS
+r41tiGeA5u2ylc9yMcqlHHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1Yh0X4
+04Wqk2kmhXBIgD8SFcd5tB8FLztimQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAG3r
+GwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMWM4ETCJ57NE7fQMh017l9
+3PR2VX2bY1QY6fDq81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OFNMQkpw0P
+lZPvy5TYnh+dXIVtx6quTx8itc2VrbqnzPmrC3p/
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 421 (0x1a5)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Global Root
+        Validity
+            Not Before: Aug 13 00:29:00 1998 GMT
+            Not After : Aug 13 23:59:00 2018 GMT
+        Subject: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Global Root
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:95:0f:a0:b6:f0:50:9c:e8:7a:c7:88:cd:dd:17:
+                    0e:2e:b0:94:d0:1b:3d:0e:f6:94:c0:8a:94:c7:06:
+                    c8:90:97:c8:b8:64:1a:7a:7e:6c:3c:53:e1:37:28:
+                    73:60:7f:b2:97:53:07:9f:53:f9:6d:58:94:d2:af:
+                    8d:6d:88:67:80:e6:ed:b2:95:cf:72:31:ca:a5:1c:
+                    72:ba:5c:02:e7:64:42:e7:f9:a9:2c:d6:3a:0d:ac:
+                    8d:42:aa:24:01:39:e6:9c:3f:01:85:57:0d:58:87:
+                    45:f8:d3:85:aa:93:69:26:85:70:48:80:3f:12:15:
+                    c7:79:b4:1f:05:2f:3b:62:99
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        6d:eb:1b:09:e9:5e:d9:51:db:67:22:61:a4:2a:3c:48:77:e3:
+        a0:7c:a6:de:73:a2:14:03:85:3d:fb:ab:0e:30:c5:83:16:33:
+        81:13:08:9e:7b:34:4e:df:40:c8:74:d7:b9:7d:dc:f4:76:55:
+        7d:9b:63:54:18:e9:f0:ea:f3:5c:b1:d9:8b:42:1e:b9:c0:95:
+        4e:ba:fa:d5:e2:7c:f5:68:61:bf:8e:ec:05:97:5f:5b:b0:d7:
+        a3:85:34:c4:24:a7:0d:0f:95:93:ef:cb:94:d8:9e:1f:9d:5c:
+        85:6d:c7:aa:ae:4f:1f:22:b5:cd:95:ad:ba:a7:cc:f9:ab:0b:
+        7a:7f
+
+GTE CyberTrust Japan Root CA
+============================
+MD5 Fingerprint: DE:AB:FF:43:2A:65:37:06:9B:28:B5:7A:E8:84:D3:8E
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICETCCAXoCAU4wDQYJKoZIhvcNAQEEBQAwUTELMAkGA1UEBhMCSlAxHzAdBgNV
+BAoTFkN5YmVyVHJ1c3QgSmFwYW4sIEluYy4xITAfBgNVBAMTGEN5YmVyVHJ1c3Qg
+SkFQQU4gUm9vdCBDQTAeFw05ODA4MDQwNzU3MDBaFw0wMzA4MDQyMzU5MDBaMFEx
+CzAJBgNVBAYTAkpQMR8wHQYDVQQKExZDeWJlclRydXN0IEphcGFuLCBJbmMuMSEw
+HwYDVQQDExhDeWJlclRydXN0IEpBUEFOIFJvb3QgQ0EwgZ8wDQYJKoZIhvcNAQEB
+BQADgY0AMIGJAoGBALet/MpHEHaJ/Wes5HMGfIFLHda1fA5Hr+ymVHWoxP1lr+fI
+sbFsNDWN97lkVygLIVredP7ceC6GRhJMfxEf3JO9X75mmIa4t+xtSdOQ2eF5AFZo
+uq1sHyw7H8ksjEOwBELqgXOmzjN1RQ2KRXIvqldV5AfDQ+J1Og+8PNCEzrrvAgMB
+AAEwDQYJKoZIhvcNAQEEBQADgYEAt6ZkowyAPBzE2O5BO+WGpJ5gXdYBMqhqZC0g
+cEC6ck5m+gdlTgOOC/1W4K07IKcy+rISHoDfHuN6GMxX2+bJNGDvdesQFtCkLnDY
+JCO4pXdzQvkHOt0BbAiTBzUmECVgKf8J5WSfabkWSfNc3SRjRpMNsFM2dbxIILsZ
+to/QIv0=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 78 (0x4e)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=JP, O=CyberTrust Japan, Inc., CN=CyberTrust JAPAN Root CA
+        Validity
+            Not Before: Aug  4 07:57:00 1998 GMT
+            Not After : Aug  4 23:59:00 2003 GMT
+        Subject: C=JP, O=CyberTrust Japan, Inc., CN=CyberTrust JAPAN Root CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b7:ad:fc:ca:47:10:76:89:fd:67:ac:e4:73:06:
+                    7c:81:4b:1d:d6:b5:7c:0e:47:af:ec:a6:54:75:a8:
+                    c4:fd:65:af:e7:c8:b1:b1:6c:34:35:8d:f7:b9:64:
+                    57:28:0b:21:5a:de:74:fe:dc:78:2e:86:46:12:4c:
+                    7f:11:1f:dc:93:bd:5f:be:66:98:86:b8:b7:ec:6d:
+                    49:d3:90:d9:e1:79:00:56:68:ba:ad:6c:1f:2c:3b:
+                    1f:c9:2c:8c:43:b0:04:42:ea:81:73:a6:ce:33:75:
+                    45:0d:8a:45:72:2f:aa:57:55:e4:07:c3:43:e2:75:
+                    3a:0f:bc:3c:d0:84:ce:ba:ef
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        b7:a6:64:a3:0c:80:3c:1c:c4:d8:ee:41:3b:e5:86:a4:9e:60:
+        5d:d6:01:32:a8:6a:64:2d:20:70:40:ba:72:4e:66:fa:07:65:
+        4e:03:8e:0b:fd:56:e0:ad:3b:20:a7:32:fa:b2:12:1e:80:df:
+        1e:e3:7a:18:cc:57:db:e6:c9:34:60:ef:75:eb:10:16:d0:a4:
+        2e:70:d8:24:23:b8:a5:77:73:42:f9:07:3a:dd:01:6c:08:93:
+        07:35:26:10:25:60:29:ff:09:e5:64:9f:69:b9:16:49:f3:5c:
+        dd:24:63:46:93:0d:b0:53:36:75:bc:48:20:bb:19:b6:8f:d0:
+        22:fd
+
+GTE CyberTrust Japan Secure Server CA
+=====================================
+MD5 Fingerprint: DD:0D:0D:B4:78:4B:7D:CE:30:0A:A6:35:C6:AB:4C:88
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICIzCCAYwCAU8wDQYJKoZIhvcNAQEEBQAwWjELMAkGA1UEBhMCSlAxHzAdBgNV
+BAoTFkN5YmVyVHJ1c3QgSmFwYW4sIEluYy4xKjAoBgNVBAMTIUN5YmVyVHJ1c3Qg
+SkFQQU4gU2VjdXJlIFNlcnZlciBDQTAeFw05ODA4MDQwODA2MzJaFw0wMzA4MDQy
+MzU5MDBaMFoxCzAJBgNVBAYTAkpQMR8wHQYDVQQKExZDeWJlclRydXN0IEphcGFu
+LCBJbmMuMSowKAYDVQQDEyFDeWJlclRydXN0IEpBUEFOIFNlY3VyZSBTZXJ2ZXIg
+Q0EwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKwmo6G4b2rALBL52zEFkuf9
++tSBtLjVKtWQ+vBDZfwSFcrs27lh3jNjN0+vADx/kjcbGHPlnzyI8RoTRP558sMm
+lQ8L8J4UByFsV8Jdw+JRsM2LX81fhjj4eZc57Oi/Ui6xXqqprozt7tfIty4xi7Q5
+kjt8gScHGgFEL0lzILbJAgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAaB17Eu5aeSkx
+ygGsi1CpJ5ksAPw4Ghz/wtXwE/4bpzn1gBTrUfrAjXuEG1musTVRbqE+1xvsoJ7f
+4KWCluOxP9io8ct5gI738ESZfhT1I6MR42hLBTZuiOOrhqo4UwNCO9O5+eC/BenT
+X8NKp7b9t12QSfiasq1mpoIAk65g/yA=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 79 (0x4f)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=JP, O=CyberTrust Japan, Inc., CN=CyberTrust JAPAN Secure Server CA
+        Validity
+            Not Before: Aug  4 08:06:32 1998 GMT
+            Not After : Aug  4 23:59:00 2003 GMT
+        Subject: C=JP, O=CyberTrust Japan, Inc., CN=CyberTrust JAPAN Secure Server CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:ac:26:a3:a1:b8:6f:6a:c0:2c:12:f9:db:31:05:
+                    92:e7:fd:fa:d4:81:b4:b8:d5:2a:d5:90:fa:f0:43:
+                    65:fc:12:15:ca:ec:db:b9:61:de:33:63:37:4f:af:
+                    00:3c:7f:92:37:1b:18:73:e5:9f:3c:88:f1:1a:13:
+                    44:fe:79:f2:c3:26:95:0f:0b:f0:9e:14:07:21:6c:
+                    57:c2:5d:c3:e2:51:b0:cd:8b:5f:cd:5f:86:38:f8:
+                    79:97:39:ec:e8:bf:52:2e:b1:5e:aa:a9:ae:8c:ed:
+                    ee:d7:c8:b7:2e:31:8b:b4:39:92:3b:7c:81:27:07:
+                    1a:01:44:2f:49:73:20:b6:c9
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        68:1d:7b:12:ee:5a:79:29:31:ca:01:ac:8b:50:a9:27:99:2c:
+        00:fc:38:1a:1c:ff:c2:d5:f0:13:fe:1b:a7:39:f5:80:14:eb:
+        51:fa:c0:8d:7b:84:1b:59:ae:b1:35:51:6e:a1:3e:d7:1b:ec:
+        a0:9e:df:e0:a5:82:96:e3:b1:3f:d8:a8:f1:cb:79:80:8e:f7:
+        f0:44:99:7e:14:f5:23:a3:11:e3:68:4b:05:36:6e:88:e3:ab:
+        86:aa:38:53:03:42:3b:d3:b9:f9:e0:bf:05:e9:d3:5f:c3:4a:
+        a7:b6:fd:b7:5d:90:49:f8:9a:b2:ad:66:a6:82:00:93:ae:60:
+        ff:20
+
+GTE CyberTrust Root 2
+=====================
+MD5 Fingerprint: BA:ED:17:57:9A:4B:FF:7C:F9:C9:1F:A2:CD:1A:D6:87
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICUDCCAbkCAgGbMA0GCSqGSIb3DQEBBAUAMHAxCzAJBgNVBAYTAlVTMRgwFgYD
+VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv
+bHV0aW9ucywgSW5jLjEeMBwGA1UEAxMVR1RFIEN5YmVyVHJ1c3QgUm9vdCAyMB4X
+DTk4MDgxMTExMzUwN1oXDTA4MDgxMTExMjIxNlowcDELMAkGA1UEBhMCVVMxGDAW
+BgNVBAoTD0dURSBDb3Jwb3JhdGlvbjEnMCUGA1UECxMeR1RFIEN5YmVyVHJ1c3Qg
+U29sdXRpb25zLCBJbmMuMR4wHAYDVQQDExVHVEUgQ3liZXJUcnVzdCBSb290IDIw
+gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANksTE4vaRoj41a6886EwAnAefFE
+XzMfFZF/iogouCRFzI8YzR900bWPcUzWMfZzloSUQMWpg2Akfa9vNLdLTMIJgDtF
+BJ7EPMQndXsADKFkR7UUXYJLUTpYu0RMPdPlBjjoYVyYeLuAs5zacoJioN+cX+v5
+T3fCzGAYAGs0giWzAgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAo2SRbxDt526iQkCU
+eM74FAjR+kOF60bNkhTQ7y4tNjkY2brJJ4gp6UgXb/jBqshhbS39QC11QzCXOfgU
+ZL1v72OoK0LfsloNJex7N9jOkSmCFvnoYqLhdsQCfd0li5jh9g1gjPZZkEBRRNHC
++xkkHhc5a3QhFTPWVdeCHnAsJ6g=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 411 (0x19b)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 2
+        Validity
+            Not Before: Aug 11 11:35:07 1998 GMT
+            Not After : Aug 11 11:22:16 2008 GMT
+        Subject: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 2
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d9:2c:4c:4e:2f:69:1a:23:e3:56:ba:f3:ce:84:
+                    c0:09:c0:79:f1:44:5f:33:1f:15:91:7f:8a:88:28:
+                    b8:24:45:cc:8f:18:cd:1f:74:d1:b5:8f:71:4c:d6:
+                    31:f6:73:96:84:94:40:c5:a9:83:60:24:7d:af:6f:
+                    34:b7:4b:4c:c2:09:80:3b:45:04:9e:c4:3c:c4:27:
+                    75:7b:00:0c:a1:64:47:b5:14:5d:82:4b:51:3a:58:
+                    bb:44:4c:3d:d3:e5:06:38:e8:61:5c:98:78:bb:80:
+                    b3:9c:da:72:82:62:a0:df:9c:5f:eb:f9:4f:77:c2:
+                    cc:60:18:00:6b:34:82:25:b3
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        a3:64:91:6f:10:ed:e7:6e:a2:42:40:94:78:ce:f8:14:08:d1:
+        fa:43:85:eb:46:cd:92:14:d0:ef:2e:2d:36:39:18:d9:ba:c9:
+        27:88:29:e9:48:17:6f:f8:c1:aa:c8:61:6d:2d:fd:40:2d:75:
+        43:30:97:39:f8:14:64:bd:6f:ef:63:a8:2b:42:df:b2:5a:0d:
+        25:ec:7b:37:d8:ce:91:29:82:16:f9:e8:62:a2:e1:76:c4:02:
+        7d:dd:25:8b:98:e1:f6:0d:60:8c:f6:59:90:40:51:44:d1:c2:
+        fb:19:24:1e:17:39:6b:74:21:15:33:d6:55:d7:82:1e:70:2c:
+        27:a8
+
+GTE CyberTrust Root 3
+=====================
+MD5 Fingerprint: DB:81:96:57:AE:64:61:EF:77:A7:83:C4:51:24:3C:87
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICUDCCAbkCAgGXMA0GCSqGSIb3DQEBBQUAMHAxCzAJBgNVBAYTAlVTMRgwFgYD
+VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv
+bHV0aW9ucywgSW5jLjEeMBwGA1UEAxMVR1RFIEN5YmVyVHJ1c3QgUm9vdCAzMB4X
+DTk4MDgxMDE5NTkwOFoXDTA4MDgxMDE5MzYzOVowcDELMAkGA1UEBhMCVVMxGDAW
+BgNVBAoTD0dURSBDb3Jwb3JhdGlvbjEnMCUGA1UECxMeR1RFIEN5YmVyVHJ1c3Qg
+U29sdXRpb25zLCBJbmMuMR4wHAYDVQQDExVHVEUgQ3liZXJUcnVzdCBSb290IDMw
+gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOHzsSsLztwU2TSXYlASVmOETFP6
+wIXP+sHdD955E39T+6oOYN3iYr/G7k6ZNKpoQzWZ+KP982O9AVRqnrI6lix7eCjG
+WrWNGhUY/eOMLqJQCVtx1g21GB8ZjgQpk5N4q18U53NC8gMMV6IbUDsLu1ngoDoD
+7icbWky5sAjKuRqJAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAheutlCAG6bKiazvy
+ZuvjS7gSJgXl9JGo3IfcmPSUwfRhvdWcbFFzlV7QvdfmRdw8z0aE1ee57ORnY24A
+KHdxXUoF6bl8hszCRLveKUja6t29F58dUQGo6BResVf3/9qPzpX+Le0yEnf/fGph
+la4xcgYI8PnzDY7i76hTXZEDg94=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 407 (0x197)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 3
+        Validity
+            Not Before: Aug 10 19:59:08 1998 GMT
+            Not After : Aug 10 19:36:39 2008 GMT
+        Subject: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 3
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:e1:f3:b1:2b:0b:ce:dc:14:d9:34:97:62:50:12:
+                    56:63:84:4c:53:fa:c0:85:cf:fa:c1:dd:0f:de:79:
+                    13:7f:53:fb:aa:0e:60:dd:e2:62:bf:c6:ee:4e:99:
+                    34:aa:68:43:35:99:f8:a3:fd:f3:63:bd:01:54:6a:
+                    9e:b2:3a:96:2c:7b:78:28:c6:5a:b5:8d:1a:15:18:
+                    fd:e3:8c:2e:a2:50:09:5b:71:d6:0d:b5:18:1f:19:
+                    8e:04:29:93:93:78:ab:5f:14:e7:73:42:f2:03:0c:
+                    57:a2:1b:50:3b:0b:bb:59:e0:a0:3a:03:ee:27:1b:
+                    5a:4c:b9:b0:08:ca:b9:1a:89
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        85:eb:ad:94:20:06:e9:b2:a2:6b:3b:f2:66:eb:e3:4b:b8:12:
+        26:05:e5:f4:91:a8:dc:87:dc:98:f4:94:c1:f4:61:bd:d5:9c:
+        6c:51:73:95:5e:d0:bd:d7:e6:45:dc:3c:cf:46:84:d5:e7:b9:
+        ec:e4:67:63:6e:00:28:77:71:5d:4a:05:e9:b9:7c:86:cc:c2:
+        44:bb:de:29:48:da:ea:dd:bd:17:9f:1d:51:01:a8:e8:14:5e:
+        b1:57:f7:ff:da:8f:ce:95:fe:2d:ed:32:12:77:ff:7c:6a:61:
+        95:ae:31:72:06:08:f0:f9:f3:0d:8e:e2:ef:a8:53:5d:91:03:
+        83:de
+
+GTE CyberTrust Root 4
+=====================
+MD5 Fingerprint: 33:43:02:B1:B9:E0:73:B1:B1:20:CA:CB:C7:84:03:50
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDVTCCAj0CAgGoMA0GCSqGSIb3DQEBBQUAMHAxCzAJBgNVBAYTAlVTMRgwFgYD
+VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv
+bHV0aW9ucywgSW5jLjEeMBwGA1UEAxMVR1RFIEN5YmVyVHJ1c3QgUm9vdCA0MB4X
+DTk4MDgxMzEzNTEwMFoXDTEzMDgxMzIzNTkwMFowcDELMAkGA1UEBhMCVVMxGDAW
+BgNVBAoTD0dURSBDb3Jwb3JhdGlvbjEnMCUGA1UECxMeR1RFIEN5YmVyVHJ1c3Qg
+U29sdXRpb25zLCBJbmMuMR4wHAYDVQQDExVHVEUgQ3liZXJUcnVzdCBSb290IDQw
+ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6nSJuf9pmPDlCsaMqb9P3
+vK6sMVrXEZBHuZ0ZLvnzGyKgw+GnusT8XgqUS5haSybkH/Tc8/6OiNxsLXx3hyZQ
+wF5OqCih6hdpT03GAQ7amg0GViYVtqRdejWvje14Uob5OKuzAdPaBZaxtlCrwKGu
+F1P6QzkgcWUj223Etu2YRYPX0vbiqWv7+XXM78WrcZY16N+OkZuoEHUft84Tjmuz
+lneXGpEvxyxpmfAPKmgAmHZEG4wo0uuO9IO0f6QlXmw72cZo1WG41F4xB7VbkDVS
+V3sXIO0tuB6OiDk+Usvf8FyxZbulErSQY79xnTLB2r9QSpW+BjrEK+vNmHZETQvl
+AgMBAAEwDQYJKoZIhvcNAQEFBQADggEBAEOvHIfJSbpliTRJPOoHO0eiedSgO5Bs
+3n+oVMPoTEAyvMjsHOXZrEC6/Iw/wnOc9GTq36ntTlvIAWDuOW1DJ/N/qgjS/k5v
+FDJNfeQ0gKU1xNZGULQ7oC1lH09lfjQoLcCndn0xyQ0zFvYgGSARULsDzHBtlrfv
+TKfaNhXPu03UltyITWyY7blz/ihXoO1k+AqBKXP29pcyhzm0ge/ZTRoHNPe6QjXe
+V9xc1vfF6wonDIGmwtBoTv2SW0iD9haKjzZb7TFsP0F6cfeSPzGkCkBM84biYcE8
+SYEtpbjvupcPvCsdm4ny0o4eTYbywqv2LZnAGyoNobZP+SxYTT19Nwo=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 424 (0x1a8)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 4
+        Validity
+            Not Before: Aug 13 13:51:00 1998 GMT
+            Not After : Aug 13 23:59:00 2013 GMT
+        Subject: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 4
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:ba:9d:22:6e:7f:da:66:3c:39:42:b1:a3:2a:6f:
+                    d3:f7:bc:ae:ac:31:5a:d7:11:90:47:b9:9d:19:2e:
+                    f9:f3:1b:22:a0:c3:e1:a7:ba:c4:fc:5e:0a:94:4b:
+                    98:5a:4b:26:e4:1f:f4:dc:f3:fe:8e:88:dc:6c:2d:
+                    7c:77:87:26:50:c0:5e:4e:a8:28:a1:ea:17:69:4f:
+                    4d:c6:01:0e:da:9a:0d:06:56:26:15:b6:a4:5d:7a:
+                    35:af:8d:ed:78:52:86:f9:38:ab:b3:01:d3:da:05:
+                    96:b1:b6:50:ab:c0:a1:ae:17:53:fa:43:39:20:71:
+                    65:23:db:6d:c4:b6:ed:98:45:83:d7:d2:f6:e2:a9:
+                    6b:fb:f9:75:cc:ef:c5:ab:71:96:35:e8:df:8e:91:
+                    9b:a8:10:75:1f:b7:ce:13:8e:6b:b3:96:77:97:1a:
+                    91:2f:c7:2c:69:99:f0:0f:2a:68:00:98:76:44:1b:
+                    8c:28:d2:eb:8e:f4:83:b4:7f:a4:25:5e:6c:3b:d9:
+                    c6:68:d5:61:b8:d4:5e:31:07:b5:5b:90:35:52:57:
+                    7b:17:20:ed:2d:b8:1e:8e:88:39:3e:52:cb:df:f0:
+                    5c:b1:65:bb:a5:12:b4:90:63:bf:71:9d:32:c1:da:
+                    bf:50:4a:95:be:06:3a:c4:2b:eb:cd:98:76:44:4d:
+                    0b:e5
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        43:af:1c:87:c9:49:ba:65:89:34:49:3c:ea:07:3b:47:a2:79:
+        d4:a0:3b:90:6c:de:7f:a8:54:c3:e8:4c:40:32:bc:c8:ec:1c:
+        e5:d9:ac:40:ba:fc:8c:3f:c2:73:9c:f4:64:ea:df:a9:ed:4e:
+        5b:c8:01:60:ee:39:6d:43:27:f3:7f:aa:08:d2:fe:4e:6f:14:
+        32:4d:7d:e4:34:80:a5:35:c4:d6:46:50:b4:3b:a0:2d:65:1f:
+        4f:65:7e:34:28:2d:c0:a7:76:7d:31:c9:0d:33:16:f6:20:19:
+        20:11:50:bb:03:cc:70:6d:96:b7:ef:4c:a7:da:36:15:cf:bb:
+        4d:d4:96:dc:88:4d:6c:98:ed:b9:73:fe:28:57:a0:ed:64:f8:
+        0a:81:29:73:f6:f6:97:32:87:39:b4:81:ef:d9:4d:1a:07:34:
+        f7:ba:42:35:de:57:dc:5c:d6:f7:c5:eb:0a:27:0c:81:a6:c2:
+        d0:68:4e:fd:92:5b:48:83:f6:16:8a:8f:36:5b:ed:31:6c:3f:
+        41:7a:71:f7:92:3f:31:a4:0a:40:4c:f3:86:e2:61:c1:3c:49:
+        81:2d:a5:b8:ef:ba:97:0f:bc:2b:1d:9b:89:f2:d2:8e:1e:4d:
+        86:f2:c2:ab:f6:2d:99:c0:1b:2a:0d:a1:b6:4f:f9:2c:58:4d:
+        3d:7d:37:0a
+
+GTE CyberTrust Root 5
+=====================
+MD5 Fingerprint: 7D:6C:86:E4:FC:4D:D1:0B:00:BA:22:BB:4E:7C:6A:8E
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDtjCCAp6gAwIBAgICAbYwDQYJKoZIhvcNAQEFBQAwcDELMAkGA1UEBhMCVVMx
+GDAWBgNVBAoTD0dURSBDb3Jwb3JhdGlvbjEnMCUGA1UECxMeR1RFIEN5YmVyVHJ1
+c3QgU29sdXRpb25zLCBJbmMuMR4wHAYDVQQDExVHVEUgQ3liZXJUcnVzdCBSb290
+IDUwHhcNOTgwODE0MTQ1MDAwWhcNMTMwODE0MjM1OTAwWjBwMQswCQYDVQQGEwJV
+UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQLEx5HVEUgQ3liZXJU
+cnVzdCBTb2x1dGlvbnMsIEluYy4xHjAcBgNVBAMTFUdURSBDeWJlclRydXN0IFJv
+b3QgNTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALwSbj+KfHqXAewe
+uzlaAvR4RKJIG457SVJ6uHtHs6+Um2+7lvoramVcuByUc76/iQoigO5X/IwFu3Cf
+lzkE2qOHXKjlyq/AM5rVN1xLrOSA0KYjYPv9ci6UncfOwgQy73hgXe2thw9FZR48
+mgqavl0dmezn8tHGehfZrZtUln/EfGC/haoVNR1A2hG87FQhKC0joajwzy3N3fx+
+D17hZQdWywe00lboXjHMGGPEhtIthc+Tkqtt/mg5+95zvYb45EZ66p8My/QZ/mO8
+0Sx7iDM29uThnAxTgWAc2i6rlqkWiBNQmbK9Vd8VMH7o5Zj7cH5stQf8/Ea30O03
+ln4y/iECAwEAAaNaMFgwEgYDVR0TAQH/BAgwBgEB/wIBBTAOBgNVHQ8BAf8EBAMC
+AQYwFwYDVR0gBBAwDjAMBgoqhkiG+GMBAgEDMBkGA1UdDgQSBBB2CkkhOEyf3vjE
+ScdxcZGdMA0GCSqGSIb3DQEBBQUAA4IBAQBBOtQYW9q43iEc4Y4J5fFoNP/elvQH
+9ac886xKsZv6kvqb7eYyIapKdsXcTzjl39WG5NXIdn2Y17HNj021kSNsi4rr6nzv
+FJTExvAfSi0ycWMrY5EmAgm2gB3t4sy4f9uHY8jh0GwmsTUdQGYQG82VVBgzYewT
+T9oT95mvPtDPjqZyorPDBZrJJ32SzH5SjbOrcG2eiZ9N6xp1wpiq1QIW1wyKvyXk
+6y28mOlYOBl8uTf+2+KZCHMGx5eDan0QAS8yuRcFSmXmL86+XlOmgumaUwqEdC2D
+ysiUFnZflGEo8IWnObvXi9moshMdVAk0JH0ggX1mfqKQdFwQxr3sqxvC
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 438 (0x1b6)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 5
+        Validity
+            Not Before: Aug 14 14:50:00 1998 GMT
+            Not After : Aug 14 23:59:00 2013 GMT
+        Subject: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 5
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:bc:12:6e:3f:8a:7c:7a:97:01:ec:1e:bb:39:5a:
+                    02:f4:78:44:a2:48:1b:8e:7b:49:52:7a:b8:7b:47:
+                    b3:af:94:9b:6f:bb:96:fa:2b:6a:65:5c:b8:1c:94:
+                    73:be:bf:89:0a:22:80:ee:57:fc:8c:05:bb:70:9f:
+                    97:39:04:da:a3:87:5c:a8:e5:ca:af:c0:33:9a:d5:
+                    37:5c:4b:ac:e4:80:d0:a6:23:60:fb:fd:72:2e:94:
+                    9d:c7:ce:c2:04:32:ef:78:60:5d:ed:ad:87:0f:45:
+                    65:1e:3c:9a:0a:9a:be:5d:1d:99:ec:e7:f2:d1:c6:
+                    7a:17:d9:ad:9b:54:96:7f:c4:7c:60:bf:85:aa:15:
+                    35:1d:40:da:11:bc:ec:54:21:28:2d:23:a1:a8:f0:
+                    cf:2d:cd:dd:fc:7e:0f:5e:e1:65:07:56:cb:07:b4:
+                    d2:56:e8:5e:31:cc:18:63:c4:86:d2:2d:85:cf:93:
+                    92:ab:6d:fe:68:39:fb:de:73:bd:86:f8:e4:46:7a:
+                    ea:9f:0c:cb:f4:19:fe:63:bc:d1:2c:7b:88:33:36:
+                    f6:e4:e1:9c:0c:53:81:60:1c:da:2e:ab:96:a9:16:
+                    88:13:50:99:b2:bd:55:df:15:30:7e:e8:e5:98:fb:
+                    70:7e:6c:b5:07:fc:fc:46:b7:d0:ed:37:96:7e:32:
+                    fe:21
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE, pathlen:5
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Certificate Policies: 
+                Policy: 1.2.840.113763.1.2.1.3
+
+            X509v3 Subject Key Identifier: 
+                76:0A:49:21:38:4C:9F:DE:F8:C4:49:C7:71:71:91:9D
+    Signature Algorithm: sha1WithRSAEncryption
+        41:3a:d4:18:5b:da:b8:de:21:1c:e1:8e:09:e5:f1:68:34:ff:
+        de:96:f4:07:f5:a7:3c:f3:ac:4a:b1:9b:fa:92:fa:9b:ed:e6:
+        32:21:aa:4a:76:c5:dc:4f:38:e5:df:d5:86:e4:d5:c8:76:7d:
+        98:d7:b1:cd:8f:4d:b5:91:23:6c:8b:8a:eb:ea:7c:ef:14:94:
+        c4:c6:f0:1f:4a:2d:32:71:63:2b:63:91:26:02:09:b6:80:1d:
+        ed:e2:cc:b8:7f:db:87:63:c8:e1:d0:6c:26:b1:35:1d:40:66:
+        10:1b:cd:95:54:18:33:61:ec:13:4f:da:13:f7:99:af:3e:d0:
+        cf:8e:a6:72:a2:b3:c3:05:9a:c9:27:7d:92:cc:7e:52:8d:b3:
+        ab:70:6d:9e:89:9f:4d:eb:1a:75:c2:98:aa:d5:02:16:d7:0c:
+        8a:bf:25:e4:eb:2d:bc:98:e9:58:38:19:7c:b9:37:fe:db:e2:
+        99:08:73:06:c7:97:83:6a:7d:10:01:2f:32:b9:17:05:4a:65:
+        e6:2f:ce:be:5e:53:a6:82:e9:9a:53:0a:84:74:2d:83:ca:c8:
+        94:16:76:5f:94:61:28:f0:85:a7:39:bb:d7:8b:d9:a8:b2:13:
+        1d:54:09:34:24:7d:20:81:7d:66:7e:a2:90:74:5c:10:c6:bd:
+        ec:ab:1b:c2
+
+GTE CyberTrust Root CA
+======================
+MD5 Fingerprint: C4:D7:F0:B2:A3:C5:7D:61:67:F0:04:CD:43:D3:BA:58
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIB+jCCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD
+VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv
+b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV
+UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU
+cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC45k+625h8cXyv
+RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M
+ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5
+1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz
+dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl
+IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy
+bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 419 (0x1a3)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=US, O=GTE Corporation, CN=GTE CyberTrust Root
+        Validity
+            Not Before: Feb 23 23:01:00 1996 GMT
+            Not After : Feb 23 23:59:00 2006 GMT
+        Subject: C=US, O=GTE Corporation, CN=GTE CyberTrust Root
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b8:e6:4f:ba:db:98:7c:71:7c:af:44:b7:d3:0f:
+                    46:d9:64:e5:93:c1:42:8e:c7:ba:49:8d:35:2d:7a:
+                    e7:8b:bd:e5:05:31:59:c6:b1:2f:0a:0c:fb:9f:a7:
+                    3f:a2:09:66:84:56:1e:37:29:1b:87:e9:7e:0c:ca:
+                    9a:9f:a5:7f:f5:15:94:a3:d5:a2:46:82:d8:68:4c:
+                    d1:37:15:06:68:af:bd:f8:b0:b3:f0:29:f5:95:5a:
+                    09:16:61:77:0a:22:25:d4:4f:45:aa:c7:bd:e5:96:
+                    df:f9:d4:a8:8e:42:cc:24:c0:1e:91:27:4a:b5:6d:
+                    06:80:63:39:c4:a2:5e:38:03
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        12:b3:75:c6:5f:1d:e1:61:55:80:00:d4:81:4b:7b:31:0f:23:
+        63:e7:3d:f3:03:f9:f4:36:a8:bb:d9:e3:a5:97:4d:ea:2b:29:
+        e0:d6:6a:73:81:e6:c0:89:a3:d3:f1:e0:a5:a5:22:37:9a:63:
+        c2:48:20:b4:db:72:e3:c8:f6:d9:7c:be:b1:af:53:da:14:b4:
+        21:b8:d6:d5:96:e3:fe:4e:0c:59:62:b6:9a:4a:f9:42:dd:8c:
+        6f:81:a9:71:ff:f4:0a:72:6d:6d:44:0e:9d:f3:74:74:a8:d5:
+        34:49:e9:5e:9e:e9:b4:7a:e1:e5:5a:1f:84:30:9c:d3:9f:a5:
+        25:d8
+
+GlobalSign Partners CA
+======================
+MD5 Fingerprint: 3C:75:CD:4C:BD:A9:D0:8A:79:4F:50:16:37:84:F4:2B
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDnjCCAoagAwIBAgILAgAAAAAA1ni50a8wDQYJKoZIhvcNAQEEBQAwVzELMAkG
+A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
+b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05OTAxMjgxMjAw
+MDBaFw0wOTAxMjgxMjAwMDBaMF8xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
+YWxTaWduIG52LXNhMRQwEgYDVQQLEwtQYXJ0bmVycyBDQTEfMB0GA1UEAxMWR2xv
+YmFsU2lnbiBQYXJ0bmVycyBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBANIs+DKsShJ6N8gpkaWujG4eDsA0M4jlM3EWHHiEaMMYNFAuFj6xlIJPsZqf
+APjGETXGaXuYAq0ABohs50wzKACIJ0Yfh7NxdWO8MruI3mYYDlAGk7T2vBQ3MD0i
+3z3/dX7ZChrFn7P80KyzCHqJ0wHoAFznSgs9TXsmordiBovaRt2TFz8/WwJLC7aI
+IBGSAK27xy7U40Wu9YlafI2krYVkMsAnjMbyioCShiRWWY10aKKDQrOePVBBhm8g
+bvb9ztMZ4zLMj+2aXm0fKPVSrG4YXvg90ZLlumwBiEsK8i3eZTMFQqBMqjF2vv2/
+gXj5cRxGXi0VlS0wWY5MQdFiqz0CAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgAGMB0G
+A1UdDgQWBBRDJI1wFQhiVZxPDEAXXYZeD6JM+zAfBgNVHSMEGDAWgBRge2YaRQ2X
+yolQL30EzTSo//z9SzAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBBAUAA4IB
+AQBm7bSIaRGZgiGDrKFti5uErQ8tyB6Mynt+rarUjt4H1p5Fx6W4nAc5YCVVGsBP
+GeXPFylJiRg1ZuXrKEBOV8mvs+S4IAWjO5VQkUmUKX0s5YhBpUWIXp2CJ/fS71u1
+T5++/jVlLFVkn+FR2iJhd7pYTo/GeVlZbjCAok+QbiELrdBoOZAQm+0iZW8eETjm
+f4zS8zltR9Uh6Op1OkHRrfYWnV0LIb3zH2MGJR3BHzVxLOsgGdXBsOw95W/tAgc/
+E3tmktZEwZj3X1CLelvCb22w0fjldKBAN6MlD+Q9ymQxk5BcMHu5OTGaXkzNuUFP
+UOQ9OK7IZtnHO11RR6ybq/Kt
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            02:00:00:00:00:00:d6:78:b9:d1:af
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
+        Validity
+            Not Before: Jan 28 12:00:00 1999 GMT
+            Not After : Jan 28 12:00:00 2009 GMT
+        Subject: C=BE, O=GlobalSign nv-sa, OU=Partners CA, CN=GlobalSign Partners CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:d2:2c:f8:32:ac:4a:12:7a:37:c8:29:91:a5:ae:
+                    8c:6e:1e:0e:c0:34:33:88:e5:33:71:16:1c:78:84:
+                    68:c3:18:34:50:2e:16:3e:b1:94:82:4f:b1:9a:9f:
+                    00:f8:c6:11:35:c6:69:7b:98:02:ad:00:06:88:6c:
+                    e7:4c:33:28:00:88:27:46:1f:87:b3:71:75:63:bc:
+                    32:bb:88:de:66:18:0e:50:06:93:b4:f6:bc:14:37:
+                    30:3d:22:df:3d:ff:75:7e:d9:0a:1a:c5:9f:b3:fc:
+                    d0:ac:b3:08:7a:89:d3:01:e8:00:5c:e7:4a:0b:3d:
+                    4d:7b:26:a2:b7:62:06:8b:da:46:dd:93:17:3f:3f:
+                    5b:02:4b:0b:b6:88:20:11:92:00:ad:bb:c7:2e:d4:
+                    e3:45:ae:f5:89:5a:7c:8d:a4:ad:85:64:32:c0:27:
+                    8c:c6:f2:8a:80:92:86:24:56:59:8d:74:68:a2:83:
+                    42:b3:9e:3d:50:41:86:6f:20:6e:f6:fd:ce:d3:19:
+                    e3:32:cc:8f:ed:9a:5e:6d:1f:28:f5:52:ac:6e:18:
+                    5e:f8:3d:d1:92:e5:ba:6c:01:88:4b:0a:f2:2d:de:
+                    65:33:05:42:a0:4c:aa:31:76:be:fd:bf:81:78:f9:
+                    71:1c:46:5e:2d:15:95:2d:30:59:8e:4c:41:d1:62:
+                    ab:3d
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Subject Key Identifier: 
+                43:24:8D:70:15:08:62:55:9C:4F:0C:40:17:5D:86:5E:0F:A2:4C:FB
+            X509v3 Authority Key Identifier: 
+                keyid:60:7B:66:1A:45:0D:97:CA:89:50:2F:7D:04:CD:34:A8:FF:FC:FD:4B
+
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        66:ed:b4:88:69:11:99:82:21:83:ac:a1:6d:8b:9b:84:ad:0f:
+        2d:c8:1e:8c:ca:7b:7e:ad:aa:d4:8e:de:07:d6:9e:45:c7:a5:
+        b8:9c:07:39:60:25:55:1a:c0:4f:19:e5:cf:17:29:49:89:18:
+        35:66:e5:eb:28:40:4e:57:c9:af:b3:e4:b8:20:05:a3:3b:95:
+        50:91:49:94:29:7d:2c:e5:88:41:a5:45:88:5e:9d:82:27:f7:
+        d2:ef:5b:b5:4f:9f:be:fe:35:65:2c:55:64:9f:e1:51:da:22:
+        61:77:ba:58:4e:8f:c6:79:59:59:6e:30:80:a2:4f:90:6e:21:
+        0b:ad:d0:68:39:90:10:9b:ed:22:65:6f:1e:11:38:e6:7f:8c:
+        d2:f3:39:6d:47:d5:21:e8:ea:75:3a:41:d1:ad:f6:16:9d:5d:
+        0b:21:bd:f3:1f:63:06:25:1d:c1:1f:35:71:2c:eb:20:19:d5:
+        c1:b0:ec:3d:e5:6f:ed:02:07:3f:13:7b:66:92:d6:44:c1:98:
+        f7:5f:50:8b:7a:5b:c2:6f:6d:b0:d1:f8:e5:74:a0:40:37:a3:
+        25:0f:e4:3d:ca:64:31:93:90:5c:30:7b:b9:39:31:9a:5e:4c:
+        cd:b9:41:4f:50:e4:3d:38:ae:c8:66:d9:c7:3b:5d:51:47:ac:
+        9b:ab:f2:ad
+
+GlobalSign Primary Class 1 CA
+=============================
+MD5 Fingerprint: 5C:AC:59:01:A4:86:53:CB:10:66:B5:D6:D6:71:FF:01
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDrDCCApSgAwIBAgILAgAAAAAA1ni4N88wDQYJKoZIhvcNAQEEBQAwVzELMAkG
+A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
+b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MTUxMjAw
+MDBaFw0wOTAxMjgxMjAwMDBaMG0xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
+YWxTaWduIG52LXNhMRswGQYDVQQLExJQcmltYXJ5IENsYXNzIDEgQ0ExJjAkBgNV
+BAMTHUdsb2JhbFNpZ24gUHJpbWFyeSBDbGFzcyAxIENBMIIBIjANBgkqhkiG9w0B
+AQEFAAOCAQ8AMIIBCgKCAQEAvSA1R9Eo1gijEjkjRw29cCFSDlcxlaY0V2vsfkN5
+wwZSSM28taGZvdgfMrzP125ybS53IpCCTkuPmgwBQprZcFm2nR/mY9EMrR1O+IWB
++a7vn6ZSYUR5GnVF4GFWRW1CjD1yy6akErea9dZg0GBQs46mpuy09BLNf6jO77Ph
+hTD+csTm53eznlhB1lGDiAfGtmlPNt7RC0g/vdafIXRkbycGPkv9Dqabv6RIV4yQ
+7okYCwKBGL5n/lNgiCe6o3M0S1pWtN5zBe2Yll3sSudA/EsJYuvQ4zFPhdF6q1ln
+K/uID+uqg701/WEn7GYOQlf3acIM7/xqwm5J2o9BOK5IqQIDAQABo2MwYTAOBgNV
+HQ8BAf8EBAMCAAYwHQYDVR0OBBYEFPzgZvZaNZnrQB7SuB5DvJiOH4rDMB8GA1Ud
+IwQYMBaAFGB7ZhpFDZfKiVAvfQTNNKj//P1LMA8GA1UdEwEB/wQFMAMBAf8wDQYJ
+KoZIhvcNAQEEBQADggEBAJujCETO8pCdcfMyswVqterPKZjeVT6gFn0GekTWr9L6
+E1iM+BzHqx20G+9paJhcCDmP4Pf7SMwh57gz2wWqNCRsSuXpe2Deg7MfCr5BdfzM
+MEi3wSYdBDOqtnjtKsu6VpcybvcxlS5G8hTuJ8f3Yom5XFrTOIpk9Te08bM0ctXV
+IT1L13iT1zFmNR6j2EdJbxyt4YB/+JgkbHOsDsIadwKjJge3x2tdvILVKkgdY89Q
+Mqb7HBhHFQpbDFw4JJoEmKgISF98NIdjqy2NTAB3lBt2uvUWGKMVry+U9ikAdsEV
+F9PpN0121MtLKVkkrNpKoOpj3l9Usfrz0UXLxWS0cyE=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            02:00:00:00:00:00:d6:78:b8:37:cf
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
+        Validity
+            Not Before: Sep 15 12:00:00 1998 GMT
+            Not After : Jan 28 12:00:00 2009 GMT
+        Subject: C=BE, O=GlobalSign nv-sa, OU=Primary Class 1 CA, CN=GlobalSign Primary Class 1 CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:bd:20:35:47:d1:28:d6:08:a3:12:39:23:47:0d:
+                    bd:70:21:52:0e:57:31:95:a6:34:57:6b:ec:7e:43:
+                    79:c3:06:52:48:cd:bc:b5:a1:99:bd:d8:1f:32:bc:
+                    cf:d7:6e:72:6d:2e:77:22:90:82:4e:4b:8f:9a:0c:
+                    01:42:9a:d9:70:59:b6:9d:1f:e6:63:d1:0c:ad:1d:
+                    4e:f8:85:81:f9:ae:ef:9f:a6:52:61:44:79:1a:75:
+                    45:e0:61:56:45:6d:42:8c:3d:72:cb:a6:a4:12:b7:
+                    9a:f5:d6:60:d0:60:50:b3:8e:a6:a6:ec:b4:f4:12:
+                    cd:7f:a8:ce:ef:b3:e1:85:30:fe:72:c4:e6:e7:77:
+                    b3:9e:58:41:d6:51:83:88:07:c6:b6:69:4f:36:de:
+                    d1:0b:48:3f:bd:d6:9f:21:74:64:6f:27:06:3e:4b:
+                    fd:0e:a6:9b:bf:a4:48:57:8c:90:ee:89:18:0b:02:
+                    81:18:be:67:fe:53:60:88:27:ba:a3:73:34:4b:5a:
+                    56:b4:de:73:05:ed:98:96:5d:ec:4a:e7:40:fc:4b:
+                    09:62:eb:d0:e3:31:4f:85:d1:7a:ab:59:67:2b:fb:
+                    88:0f:eb:aa:83:bd:35:fd:61:27:ec:66:0e:42:57:
+                    f7:69:c2:0c:ef:fc:6a:c2:6e:49:da:8f:41:38:ae:
+                    48:a9
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Subject Key Identifier: 
+                FC:E0:66:F6:5A:35:99:EB:40:1E:D2:B8:1E:43:BC:98:8E:1F:8A:C3
+            X509v3 Authority Key Identifier: 
+                keyid:60:7B:66:1A:45:0D:97:CA:89:50:2F:7D:04:CD:34:A8:FF:FC:FD:4B
+
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        9b:a3:08:44:ce:f2:90:9d:71:f3:32:b3:05:6a:b5:ea:cf:29:
+        98:de:55:3e:a0:16:7d:06:7a:44:d6:af:d2:fa:13:58:8c:f8:
+        1c:c7:ab:1d:b4:1b:ef:69:68:98:5c:08:39:8f:e0:f7:fb:48:
+        cc:21:e7:b8:33:db:05:aa:34:24:6c:4a:e5:e9:7b:60:de:83:
+        b3:1f:0a:be:41:75:fc:cc:30:48:b7:c1:26:1d:04:33:aa:b6:
+        78:ed:2a:cb:ba:56:97:32:6e:f7:31:95:2e:46:f2:14:ee:27:
+        c7:f7:62:89:b9:5c:5a:d3:38:8a:64:f5:37:b4:f1:b3:34:72:
+        d5:d5:21:3d:4b:d7:78:93:d7:31:66:35:1e:a3:d8:47:49:6f:
+        1c:ad:e1:80:7f:f8:98:24:6c:73:ac:0e:c2:1a:77:02:a3:26:
+        07:b7:c7:6b:5d:bc:82:d5:2a:48:1d:63:cf:50:32:a6:fb:1c:
+        18:47:15:0a:5b:0c:5c:38:24:9a:04:98:a8:08:48:5f:7c:34:
+        87:63:ab:2d:8d:4c:00:77:94:1b:76:ba:f5:16:18:a3:15:af:
+        2f:94:f6:29:00:76:c1:15:17:d3:e9:37:4d:76:d4:cb:4b:29:
+        59:24:ac:da:4a:a0:ea:63:de:5f:54:b1:fa:f3:d1:45:cb:c5:
+        64:b4:73:21
+
+GlobalSign Primary Class 2 CA
+=============================
+MD5 Fingerprint: A9:A9:42:59:7E:BE:5A:94:E4:2C:C6:8B:1C:2A:44:B6
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDrDCCApSgAwIBAgILAgAAAAAA1ni4jY0wDQYJKoZIhvcNAQEEBQAwVzELMAkG
+A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
+b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05OTAxMjgxMjAw
+MDBaFw0wOTAxMjgxMjAwMDBaMG0xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
+YWxTaWduIG52LXNhMRswGQYDVQQLExJQcmltYXJ5IENsYXNzIDIgQ0ExJjAkBgNV
+BAMTHUdsb2JhbFNpZ24gUHJpbWFyeSBDbGFzcyAyIENBMIIBIjANBgkqhkiG9w0B
+AQEFAAOCAQ8AMIIBCgKCAQEAkoz+7/RFjhdBbvzYvyFvqwadUsEsAJ0/joW4f0qP
+vaBjKspJJ65agvR04lWS/8LRqnmitvrVnYIET8ayxl5jpzq62O7rim+ftrsoQcAi
++05IGgaS17/Xz7nZvThPOw1EblVB/vwJ29i/844h8egStfYTpdPGTJMisAL/7h0M
+xKhrT3VoVujcKBJQ96gknS4kOfsJBd7lo2RJIdBofnEwkbFg4Dn0UPh6TZgAa3x5
+uk7OSuK6Nh23xTYVlZxkQupfxLr1QAW+4TpZvYSnGbjeTVNQzgfR0lHT7w2BbObn
+bctdfD98zOxPgycl/3BQ9oNZdYQGZlgs3omNAKZJ+aVDdwIDAQABo2MwYTAOBgNV
+HQ8BAf8EBAMCAAYwHQYDVR0OBBYEFHznsrEs3rGna+l2DOGj/U5sx7n2MB8GA1Ud
+IwQYMBaAFGB7ZhpFDZfKiVAvfQTNNKj//P1LMA8GA1UdEwEB/wQFMAMBAf8wDQYJ
+KoZIhvcNAQEEBQADggEBAGPdWc6KeaqYnU7FiWQ3foqTZy8Q6m8nw413bfJcVpQZ
+GmlgMEZdj/JtRTyONZd8L7hR4uiJvYjPJxwINFyIwWgk25GF5M/7+0ON6CUBG8QO
+9wBCSIYfJAhYWoyN8mtHLGiRsWlC/Q2NySbmkoamZG6Sxc4+PH1x4yOkq8fVqKnf
+gqc76IbVw08Y40TQ4NzzxWgu/qUvBYTIfkdCU2uHSv4y/14+cIy3qBXMF8L/RuzQ
+7C20bhIoqflA6evUZpdTqWlVwKmqsi7N0Wn0vvi7fGnuVKbbnvtapj7+mu+UUUt1
+7tjU4ZrxAlYTiQ6nQouWi4UMG4W+Jq6rppm8IvFz30I=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            02:00:00:00:00:00:d6:78:b8:8d:8d
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
+        Validity
+            Not Before: Jan 28 12:00:00 1999 GMT
+            Not After : Jan 28 12:00:00 2009 GMT
+        Subject: C=BE, O=GlobalSign nv-sa, OU=Primary Class 2 CA, CN=GlobalSign Primary Class 2 CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:92:8c:fe:ef:f4:45:8e:17:41:6e:fc:d8:bf:21:
+                    6f:ab:06:9d:52:c1:2c:00:9d:3f:8e:85:b8:7f:4a:
+                    8f:bd:a0:63:2a:ca:49:27:ae:5a:82:f4:74:e2:55:
+                    92:ff:c2:d1:aa:79:a2:b6:fa:d5:9d:82:04:4f:c6:
+                    b2:c6:5e:63:a7:3a:ba:d8:ee:eb:8a:6f:9f:b6:bb:
+                    28:41:c0:22:fb:4e:48:1a:06:92:d7:bf:d7:cf:b9:
+                    d9:bd:38:4f:3b:0d:44:6e:55:41:fe:fc:09:db:d8:
+                    bf:f3:8e:21:f1:e8:12:b5:f6:13:a5:d3:c6:4c:93:
+                    22:b0:02:ff:ee:1d:0c:c4:a8:6b:4f:75:68:56:e8:
+                    dc:28:12:50:f7:a8:24:9d:2e:24:39:fb:09:05:de:
+                    e5:a3:64:49:21:d0:68:7e:71:30:91:b1:60:e0:39:
+                    f4:50:f8:7a:4d:98:00:6b:7c:79:ba:4e:ce:4a:e2:
+                    ba:36:1d:b7:c5:36:15:95:9c:64:42:ea:5f:c4:ba:
+                    f5:40:05:be:e1:3a:59:bd:84:a7:19:b8:de:4d:53:
+                    50:ce:07:d1:d2:51:d3:ef:0d:81:6c:e6:e7:6d:cb:
+                    5d:7c:3f:7c:cc:ec:4f:83:27:25:ff:70:50:f6:83:
+                    59:75:84:06:66:58:2c:de:89:8d:00:a6:49:f9:a5:
+                    43:77
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Subject Key Identifier: 
+                7C:E7:B2:B1:2C:DE:B1:A7:6B:E9:76:0C:E1:A3:FD:4E:6C:C7:B9:F6
+            X509v3 Authority Key Identifier: 
+                keyid:60:7B:66:1A:45:0D:97:CA:89:50:2F:7D:04:CD:34:A8:FF:FC:FD:4B
+
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        63:dd:59:ce:8a:79:aa:98:9d:4e:c5:89:64:37:7e:8a:93:67:
+        2f:10:ea:6f:27:c3:8d:77:6d:f2:5c:56:94:19:1a:69:60:30:
+        46:5d:8f:f2:6d:45:3c:8e:35:97:7c:2f:b8:51:e2:e8:89:bd:
+        88:cf:27:1c:08:34:5c:88:c1:68:24:db:91:85:e4:cf:fb:fb:
+        43:8d:e8:25:01:1b:c4:0e:f7:00:42:48:86:1f:24:08:58:5a:
+        8c:8d:f2:6b:47:2c:68:91:b1:69:42:fd:0d:8d:c9:26:e6:92:
+        86:a6:64:6e:92:c5:ce:3e:3c:7d:71:e3:23:a4:ab:c7:d5:a8:
+        a9:df:82:a7:3b:e8:86:d5:c3:4f:18:e3:44:d0:e0:dc:f3:c5:
+        68:2e:fe:a5:2f:05:84:c8:7e:47:42:53:6b:87:4a:fe:32:ff:
+        5e:3e:70:8c:b7:a8:15:cc:17:c2:ff:46:ec:d0:ec:2d:b4:6e:
+        12:28:a9:f9:40:e9:eb:d4:66:97:53:a9:69:55:c0:a9:aa:b2:
+        2e:cd:d1:69:f4:be:f8:bb:7c:69:ee:54:a6:db:9e:fb:5a:a6:
+        3e:fe:9a:ef:94:51:4b:75:ee:d8:d4:e1:9a:f1:02:56:13:89:
+        0e:a7:42:8b:96:8b:85:0c:1b:85:be:26:ae:ab:a6:99:bc:22:
+        f1:73:df:42
+
+GlobalSign Primary Class 3 CA
+=============================
+MD5 Fingerprint: 98:12:A3:4B:95:A9:96:64:94:E7:50:8C:3E:E1:83:5A
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDrDCCApSgAwIBAgILAgAAAAAA1ni41sMwDQYJKoZIhvcNAQEEBQAwVzELMAkG
+A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
+b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05OTAxMjgxMjAw
+MDBaFw0wOTAxMjgxMjAwMDBaMG0xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
+YWxTaWduIG52LXNhMRswGQYDVQQLExJQcmltYXJ5IENsYXNzIDMgQ0ExJjAkBgNV
+BAMTHUdsb2JhbFNpZ24gUHJpbWFyeSBDbGFzcyAzIENBMIIBIjANBgkqhkiG9w0B
+AQEFAAOCAQ8AMIIBCgKCAQEAkV5WZdbAwAScv0fEXHt6MQH5WJaZ4xyEL9xWj631
+WYHVQ2ZdWpOMdcqp5xHBURAUYMks1HuvxneGq3onrm+VuQvKtkb7fhr0DRRt0slO
+sq7wVPZcQEw2SHToVIxlZhCnvSu3II0FSa14fdIkI1Dj8LR5mwE5/6870y3u4UmN
+jS88akFFL5vjPeES5JF1ns+gPjySgW+KLhjc4PKMjP2H2Qf0QJTJTk9D32dWb70D
+UHyZZ6S5PJFsAm6E1vxG98xvGD4X8O8LZBZX5qyG8UiqQ8HJJ3hzREXihX26/7Ph
++xsFpEs7mRIlAVAUaq9d6sgM7uTa7EuLXGgTldzDtTA61wIDAQABo2MwYTAOBgNV
+HQ8BAf8EBAMCAAYwHQYDVR0OBBYEFMw2zBe0RZEv7c87MEh3+7UUmb7jMB8GA1Ud
+IwQYMBaAFGB7ZhpFDZfKiVAvfQTNNKj//P1LMA8GA1UdEwEB/wQFMAMBAf8wDQYJ
+KoZIhvcNAQEEBQADggEBAFeyVMy9lRdkYIm2U5EMRZLDPahsw8yyGPV4QXTYfaMn
+r3cNWT6UHWn6idMMvRoB9D/o4Hcagiha5mLXt+M2yQ6feuPC08xZiQzvFovwNnci
+yqS2t8FCZwFAY8znOGSHWxSWZnstFO69SW3/d9DiTlvTgMJND8q4nYGXpzRux+Oc
+SOW0qkX19mVMSPISwtKTjMIVJPMrUv/jCK64btYsEs85yxIq56l7X5g9o+HMpmOJ
+XH0xdfnV1l3y0NQ9355xqA7c5CCXeOZ/U6QNUU+OOwOuow1aTcN55zVYcELJXqFe
+tNkio0RTNaTQz3OAxc+fVph2+RRMd4eCydx+XTTVNnU=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            02:00:00:00:00:00:d6:78:b8:d6:c3
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
+        Validity
+            Not Before: Jan 28 12:00:00 1999 GMT
+            Not After : Jan 28 12:00:00 2009 GMT
+        Subject: C=BE, O=GlobalSign nv-sa, OU=Primary Class 3 CA, CN=GlobalSign Primary Class 3 CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:91:5e:56:65:d6:c0:c0:04:9c:bf:47:c4:5c:7b:
+                    7a:31:01:f9:58:96:99:e3:1c:84:2f:dc:56:8f:ad:
+                    f5:59:81:d5:43:66:5d:5a:93:8c:75:ca:a9:e7:11:
+                    c1:51:10:14:60:c9:2c:d4:7b:af:c6:77:86:ab:7a:
+                    27:ae:6f:95:b9:0b:ca:b6:46:fb:7e:1a:f4:0d:14:
+                    6d:d2:c9:4e:b2:ae:f0:54:f6:5c:40:4c:36:48:74:
+                    e8:54:8c:65:66:10:a7:bd:2b:b7:20:8d:05:49:ad:
+                    78:7d:d2:24:23:50:e3:f0:b4:79:9b:01:39:ff:af:
+                    3b:d3:2d:ee:e1:49:8d:8d:2f:3c:6a:41:45:2f:9b:
+                    e3:3d:e1:12:e4:91:75:9e:cf:a0:3e:3c:92:81:6f:
+                    8a:2e:18:dc:e0:f2:8c:8c:fd:87:d9:07:f4:40:94:
+                    c9:4e:4f:43:df:67:56:6f:bd:03:50:7c:99:67:a4:
+                    b9:3c:91:6c:02:6e:84:d6:fc:46:f7:cc:6f:18:3e:
+                    17:f0:ef:0b:64:16:57:e6:ac:86:f1:48:aa:43:c1:
+                    c9:27:78:73:44:45:e2:85:7d:ba:ff:b3:e1:fb:1b:
+                    05:a4:4b:3b:99:12:25:01:50:14:6a:af:5d:ea:c8:
+                    0c:ee:e4:da:ec:4b:8b:5c:68:13:95:dc:c3:b5:30:
+                    3a:d7
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Subject Key Identifier: 
+                CC:36:CC:17:B4:45:91:2F:ED:CF:3B:30:48:77:FB:B5:14:99:BE:E3
+            X509v3 Authority Key Identifier: 
+                keyid:60:7B:66:1A:45:0D:97:CA:89:50:2F:7D:04:CD:34:A8:FF:FC:FD:4B
+
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        57:b2:54:cc:bd:95:17:64:60:89:b6:53:91:0c:45:92:c3:3d:
+        a8:6c:c3:cc:b2:18:f5:78:41:74:d8:7d:a3:27:af:77:0d:59:
+        3e:94:1d:69:fa:89:d3:0c:bd:1a:01:f4:3f:e8:e0:77:1a:82:
+        28:5a:e6:62:d7:b7:e3:36:c9:0e:9f:7a:e3:c2:d3:cc:59:89:
+        0c:ef:16:8b:f0:36:77:22:ca:a4:b6:b7:c1:42:67:01:40:63:
+        cc:e7:38:64:87:5b:14:96:66:7b:2d:14:ee:bd:49:6d:ff:77:
+        d0:e2:4e:5b:d3:80:c2:4d:0f:ca:b8:9d:81:97:a7:34:6e:c7:
+        e3:9c:48:e5:b4:aa:45:f5:f6:65:4c:48:f2:12:c2:d2:93:8c:
+        c2:15:24:f3:2b:52:ff:e3:08:ae:b8:6e:d6:2c:12:cf:39:cb:
+        12:2a:e7:a9:7b:5f:98:3d:a3:e1:cc:a6:63:89:5c:7d:31:75:
+        f9:d5:d6:5d:f2:d0:d4:3d:df:9e:71:a8:0e:dc:e4:20:97:78:
+        e6:7f:53:a4:0d:51:4f:8e:3b:03:ae:a3:0d:5a:4d:c3:79:e7:
+        35:58:70:42:c9:5e:a1:5e:b4:d9:22:a3:44:53:35:a4:d0:cf:
+        73:80:c5:cf:9f:56:98:76:f9:14:4c:77:87:82:c9:dc:7e:5d:
+        34:d5:36:75
+
+GlobalSign Root CA
+==================
+MD5 Fingerprint: AB:BF:EA:E3:6B:29:A6:CC:A6:78:35:99:EF:AD:2B:80
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDdTCCAl2gAwIBAgILAgAAAAAA1ni3lAUwDQYJKoZIhvcNAQEEBQAwVzELMAkG
+A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
+b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAw
+MDBaFw0xNDAxMjgxMjAwMDBaMFcxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
+YWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYDVQQDExJHbG9iYWxT
+aWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDaDuaZ
+jc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavp
+xy0Sy6scTHAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp
+1Wrjsok6Vjk4bwY8iGlbKk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdG
+snUOhugZitVtbNV4FpWi6cgKOOvyJBNPc1STE4U6G7weNLWLBYy5d4ux2x8gkasJ
+U26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrXgzT/LCrBbBlDSgeF59N8
+9iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIABjAdBgNVHQ4EFgQU
+YHtmGkUNl8qJUC99BM00qP/8/UswDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0B
+AQQFAAOCAQEArqqf/LfSyx9fOSkoGJ40yWxPbxrwZKJwSk8ThptgKJ7ogUmYfQq7
+5bCdPTbbjwVR/wkxKh/diXeeDy5slQTthsu0AD+EAk2AaioteAuubyuig0SDH81Q
+gkwkr733pbTIWg/050deSY43lv6aiAU62cDbKYfmGZZHpzqmjIs8d/5GY6dT2iHR
+rH5Jokvmw2dZL7OKDrssvamqQnw1wdh/1acxOk5jQzmvCLBhNIzTmKlDNPYPhyk7
+ncJWWJh3w/cbrPad+D6qp1RF8PX51TFl/mtYnHGzHtdS6jIX/EBgHcl5JLL2bP2o
+Zg6C3ZjL2sJETy6ge/L3ayx2EYRGinij4w==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            02:00:00:00:00:00:d6:78:b7:94:05
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
+        Validity
+            Not Before: Sep  1 12:00:00 1998 GMT
+            Not After : Jan 28 12:00:00 2014 GMT
+        Subject: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:da:0e:e6:99:8d:ce:a3:e3:4f:8a:7e:fb:f1:8b:
+                    83:25:6b:ea:48:1f:f1:2a:b0:b9:95:11:04:bd:f0:
+                    63:d1:e2:67:66:cf:1c:dd:cf:1b:48:2b:ee:8d:89:
+                    8e:9a:af:29:80:65:ab:e9:c7:2d:12:cb:ab:1c:4c:
+                    70:07:a1:3d:0a:30:cd:15:8d:4f:f8:dd:d4:8c:50:
+                    15:1c:ef:50:ee:c4:2e:f7:fc:e9:52:f2:91:7d:e0:
+                    6d:d5:35:30:8e:5e:43:73:f2:41:e9:d5:6a:e3:b2:
+                    89:3a:56:39:38:6f:06:3c:88:69:5b:2a:4d:c5:a7:
+                    54:b8:6c:89:cc:9b:f9:3c:ca:e5:fd:89:f5:12:3c:
+                    92:78:96:d6:dc:74:6e:93:44:61:d1:8d:c7:46:b2:
+                    75:0e:86:e8:19:8a:d5:6d:6c:d5:78:16:95:a2:e9:
+                    c8:0a:38:eb:f2:24:13:4f:73:54:93:13:85:3a:1b:
+                    bc:1e:34:b5:8b:05:8c:b9:77:8b:b1:db:1f:20:91:
+                    ab:09:53:6e:90:ce:7b:37:74:b9:70:47:91:22:51:
+                    63:16:79:ae:b1:ae:41:26:08:c8:19:2b:d1:46:aa:
+                    48:d6:64:2a:d7:83:34:ff:2c:2a:c1:6c:19:43:4a:
+                    07:85:e7:d3:7c:f6:21:68:ef:ea:f2:52:9f:7f:93:
+                    90:cf
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Subject Key Identifier: 
+                60:7B:66:1A:45:0D:97:CA:89:50:2F:7D:04:CD:34:A8:FF:FC:FD:4B
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        ae:aa:9f:fc:b7:d2:cb:1f:5f:39:29:28:18:9e:34:c9:6c:4f:
+        6f:1a:f0:64:a2:70:4a:4f:13:86:9b:60:28:9e:e8:81:49:98:
+        7d:0a:bb:e5:b0:9d:3d:36:db:8f:05:51:ff:09:31:2a:1f:dd:
+        89:77:9e:0f:2e:6c:95:04:ed:86:cb:b4:00:3f:84:02:4d:80:
+        6a:2a:2d:78:0b:ae:6f:2b:a2:83:44:83:1f:cd:50:82:4c:24:
+        af:bd:f7:a5:b4:c8:5a:0f:f4:e7:47:5e:49:8e:37:96:fe:9a:
+        88:05:3a:d9:c0:db:29:87:e6:19:96:47:a7:3a:a6:8c:8b:3c:
+        77:fe:46:63:a7:53:da:21:d1:ac:7e:49:a2:4b:e6:c3:67:59:
+        2f:b3:8a:0e:bb:2c:bd:a9:aa:42:7c:35:c1:d8:7f:d5:a7:31:
+        3a:4e:63:43:39:af:08:b0:61:34:8c:d3:98:a9:43:34:f6:0f:
+        87:29:3b:9d:c2:56:58:98:77:c3:f7:1b:ac:f6:9d:f8:3e:aa:
+        a7:54:45:f0:f5:f9:d5:31:65:fe:6b:58:9c:71:b3:1e:d7:52:
+        ea:32:17:fc:40:60:1d:c9:79:24:b2:f6:6c:fd:a8:66:0e:82:
+        dd:98:cb:da:c2:44:4f:2e:a0:7b:f2:f7:6b:2c:76:11:84:46:
+        8a:78:a3:e3
+
+National Retail Federation by DST
+=================================
+MD5 Fingerprint: AD:8E:0F:9E:01:6B:A0:C5:74:D5:0C:D3:68:65:4F:1E
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEAjCCAuoCEQDQHkCKAAACfAAAAAMAAAABMA0GCSqGSIb3DQEBBQUAMIG+MQsw
+CQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENp
+dHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjEjMCEGA1UE
+CxMaTmF0aW9uYWwgUmV0YWlsIEZlZGVyYXRpb24xGTAXBgNVBAMTEERTVCAoTlJG
+KSBSb290Q0ExITAfBgkqhkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTAeFw05
+ODEyMTExNjE0MTZaFw0wODEyMDgxNjE0MTZaMIG+MQswCQYDVQQGEwJ1czENMAsG
+A1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxJDAiBgNVBAoTG0Rp
+Z2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjEjMCEGA1UECxMaTmF0aW9uYWwgUmV0
+YWlsIEZlZGVyYXRpb24xGTAXBgNVBAMTEERTVCAoTlJGKSBSb290Q0ExITAfBgkq
+hkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTCCASIwDQYJKoZIhvcNAQEBBQAD
+ggEPADCCAQoCggEBANmsm3f6UNPM3LlArLlyagCHI/wPliHQJq/k4rVf+tOmfSEw
+LswXgo+YdPxnpKbfiJeiQin1p9sRk/teIzDCqrwi50Eb5e0l3sg/295XRXhARoOy
+1Ro93w9FbdVjAnXYL8Zuq5WRdDcNy00JXNHUWzra3Q7Ia5nY1TnM34VVxJJTAqPh
+94DJcKPa3DPEf6JHCBw1lh+hAxwwg/TEzP+Yw7BGRKLAv63b0oH2TJgsp14k84bK
+Y9W6ffCawErQG1ju7Klnz2kCbCLAYCws0cgg6sgt+92cu8tRTNznVwQ7VJsRpTJ0
+7HQB85AVWy98LJNluWZntIGINeWekRh/gahByMsCAwEAATANBgkqhkiG9w0BAQUF
+AAOCAQEAhF4LO+ygjRyb0DwdcWnkGn9kvoFlYcWMatd8AHTgemJV7SR84GHj8t0U
+5hFugw7h6qmegK2aIL/gV37V0LWEYy3ZGOS9GzUsXq5hdqpnhTs44TGBHzF/5tf4
+W9K7Y3mGxIzF3gqu19H8AXT/trYNYoFnHLsm+CSA4Fxe2KSKOo99y/+So/18qTJp
+B1hYYUKZUgOxOD3GcW9s8uh9BqrBfFPLGi2IT8mpp6xpb/ekH9h0gfVKv7FVt9N3
+OKdvwkrI4nOJ01dy4UMvcjz2H7f4BEpuwemUF+SXF/QOE4ZvjavoXy20/2zWorQf
+7LmUaqoSTxrd9Xe1JYzyigrx/FJbWA==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            d0:1e:40:8a:00:00:02:7c:00:00:00:03:00:00:00:01
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=National Retail Federation, CN=DST (NRF) RootCA/Email=ca@digsigtrust.com
+        Validity
+            Not Before: Dec 11 16:14:16 1998 GMT
+            Not After : Dec  8 16:14:16 2008 GMT
+        Subject: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=National Retail Federation, CN=DST (NRF) RootCA/Email=ca@digsigtrust.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:d9:ac:9b:77:fa:50:d3:cc:dc:b9:40:ac:b9:72:
+                    6a:00:87:23:fc:0f:96:21:d0:26:af:e4:e2:b5:5f:
+                    fa:d3:a6:7d:21:30:2e:cc:17:82:8f:98:74:fc:67:
+                    a4:a6:df:88:97:a2:42:29:f5:a7:db:11:93:fb:5e:
+                    23:30:c2:aa:bc:22:e7:41:1b:e5:ed:25:de:c8:3f:
+                    db:de:57:45:78:40:46:83:b2:d5:1a:3d:df:0f:45:
+                    6d:d5:63:02:75:d8:2f:c6:6e:ab:95:91:74:37:0d:
+                    cb:4d:09:5c:d1:d4:5b:3a:da:dd:0e:c8:6b:99:d8:
+                    d5:39:cc:df:85:55:c4:92:53:02:a3:e1:f7:80:c9:
+                    70:a3:da:dc:33:c4:7f:a2:47:08:1c:35:96:1f:a1:
+                    03:1c:30:83:f4:c4:cc:ff:98:c3:b0:46:44:a2:c0:
+                    bf:ad:db:d2:81:f6:4c:98:2c:a7:5e:24:f3:86:ca:
+                    63:d5:ba:7d:f0:9a:c0:4a:d0:1b:58:ee:ec:a9:67:
+                    cf:69:02:6c:22:c0:60:2c:2c:d1:c8:20:ea:c8:2d:
+                    fb:dd:9c:bb:cb:51:4c:dc:e7:57:04:3b:54:9b:11:
+                    a5:32:74:ec:74:01:f3:90:15:5b:2f:7c:2c:93:65:
+                    b9:66:67:b4:81:88:35:e5:9e:91:18:7f:81:a8:41:
+                    c8:cb
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        84:5e:0b:3b:ec:a0:8d:1c:9b:d0:3c:1d:71:69:e4:1a:7f:64:
+        be:81:65:61:c5:8c:6a:d7:7c:00:74:e0:7a:62:55:ed:24:7c:
+        e0:61:e3:f2:dd:14:e6:11:6e:83:0e:e1:ea:a9:9e:80:ad:9a:
+        20:bf:e0:57:7e:d5:d0:b5:84:63:2d:d9:18:e4:bd:1b:35:2c:
+        5e:ae:61:76:aa:67:85:3b:38:e1:31:81:1f:31:7f:e6:d7:f8:
+        5b:d2:bb:63:79:86:c4:8c:c5:de:0a:ae:d7:d1:fc:01:74:ff:
+        b6:b6:0d:62:81:67:1c:bb:26:f8:24:80:e0:5c:5e:d8:a4:8a:
+        3a:8f:7d:cb:ff:92:a3:fd:7c:a9:32:69:07:58:58:61:42:99:
+        52:03:b1:38:3d:c6:71:6f:6c:f2:e8:7d:06:aa:c1:7c:53:cb:
+        1a:2d:88:4f:c9:a9:a7:ac:69:6f:f7:a4:1f:d8:74:81:f5:4a:
+        bf:b1:55:b7:d3:77:38:a7:6f:c2:4a:c8:e2:73:89:d3:57:72:
+        e1:43:2f:72:3c:f6:1f:b7:f8:04:4a:6e:c1:e9:94:17:e4:97:
+        17:f4:0e:13:86:6f:8d:ab:e8:5f:2d:b4:ff:6c:d6:a2:b4:1f:
+        ec:b9:94:6a:aa:12:4f:1a:dd:f5:77:b5:25:8c:f2:8a:0a:f1:
+        fc:52:5b:58
+
+TC TrustCenter, Germany, Class 1 CA
+===================================
+MD5 Fingerprint: 64:3F:F8:3E:52:14:4A:59:BA:93:56:04:0B:23:02:D1
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIENTCCA56gAwIBAgIBAjANBgkqhkiG9w0BAQQFADCBvDELMAkGA1UEBhMCREUx
+EDAOBgNVBAgTB0hhbWJ1cmcxEDAOBgNVBAcTB0hhbWJ1cmcxOjA4BgNVBAoTMVRD
+IFRydXN0Q2VudGVyIGZvciBTZWN1cml0eSBpbiBEYXRhIE5ldHdvcmtzIEdtYkgx
+IjAgBgNVBAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDEgQ0ExKTAnBgkqhkiG9w0B
+CQEWGmNlcnRpZmljYXRlQHRydXN0Y2VudGVyLmRlMB4XDTk4MDMwOTEzNTYzM1oX
+DTA1MTIzMTEzNTYzM1owgbwxCzAJBgNVBAYTAkRFMRAwDgYDVQQIEwdIYW1idXJn
+MRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFUQyBUcnVzdENlbnRlciBmb3Ig
+U2VjdXJpdHkgaW4gRGF0YSBOZXR3b3JrcyBHbWJIMSIwIAYDVQQLExlUQyBUcnVz
+dENlbnRlciBDbGFzcyAxIENBMSkwJwYJKoZIhvcNAQkBFhpjZXJ0aWZpY2F0ZUB0
+cnVzdGNlbnRlci5kZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAsCnrtHaz
+rte2W7Re573jsZxJBFdboavZfxMb/bphq9jncd8tAJRdUUh9I+91YoSQPAofWRF0
+L46Apf0wAj0pUs1yGkkhnLzLUo5IoWOWyBCFMGlXdEXAWobG1T3gaFd9MWokjUWX
+PjF+aGYybiRt7DI2yUHK8DFEyKNhyhugNh8CAwEAAaOCAUMwggE/MEAGCWCGSAGG
++EIBAwQzFjFodHRwczovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL2NoZWNr
+LXJldi5jZ2k/MEAGCWCGSAGG+EIBBAQzFjFodHRwczovL3d3dy50cnVzdGNlbnRl
+ci5kZS9jZ2ktYmluL2NoZWNrLXJldi5jZ2k/MDwGCWCGSAGG+EIBBwQvFi1odHRw
+czovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL1JlbmV3LmNnaT8wPgYJYIZI
+AYb4QgEIBDEWL2h0dHA6Ly93d3cudHJ1c3RjZW50ZXIuZGUvZ3VpZGVsaW5lcy9p
+bmRleC5odG1sMCgGCWCGSAGG+EIBDQQbFhlUQyBUcnVzdENlbnRlciBDbGFzcyAx
+IENBMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQQFAAOBgQAFQlImpAwn
+AUSsXCUowkRCVAi5HcU+bFlmxLNOUKf4+JZ1oZZ16BY4oM1dbvp5pxt7HR7DALlm
+vlrWYg/n8nu470zgwD9Zrjm3hAmeq/GpLmtp4q3M8up4CQUgOEJxGH7Hspfm1QIF
+BlajX/GqwsRP/vfvFg+d7KqFzz0pJPEEzQ==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 2 (0x2)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 1 CA/Email=certificate@trustcenter.de
+        Validity
+            Not Before: Mar  9 13:56:33 1998 GMT
+            Not After : Dec 31 13:56:33 2005 GMT
+        Subject: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 1 CA/Email=certificate@trustcenter.de
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b0:29:eb:b4:76:b3:ae:d7:b6:5b:b4:5e:e7:bd:
+                    e3:b1:9c:49:04:57:5b:a1:ab:d9:7f:13:1b:fd:ba:
+                    61:ab:d8:e7:71:df:2d:00:94:5d:51:48:7d:23:ef:
+                    75:62:84:90:3c:0a:1f:59:11:74:2f:8e:80:a5:fd:
+                    30:02:3d:29:52:cd:72:1a:49:21:9c:bc:cb:52:8e:
+                    48:a1:63:96:c8:10:85:30:69:57:74:45:c0:5a:86:
+                    c6:d5:3d:e0:68:57:7d:31:6a:24:8d:45:97:3e:31:
+                    7e:68:66:32:6e:24:6d:ec:32:36:c9:41:ca:f0:31:
+                    44:c8:a3:61:ca:1b:a0:36:1f
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape CA Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape Renewal Url: 
+                https://www.trustcenter.de/cgi-bin/Renew.cgi?
+            Netscape CA Policy Url: 
+                http://www.trustcenter.de/guidelines/index.html
+            Netscape Comment: 
+                TC TrustCenter Class 1 CA
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+    Signature Algorithm: md5WithRSAEncryption
+        05:42:52:26:a4:0c:27:01:44:ac:5c:25:28:c2:44:42:54:08:
+        b9:1d:c5:3e:6c:59:66:c4:b3:4e:50:a7:f8:f8:96:75:a1:96:
+        75:e8:16:38:a0:cd:5d:6e:fa:79:a7:1b:7b:1d:1e:c3:00:b9:
+        66:be:5a:d6:62:0f:e7:f2:7b:b8:ef:4c:e0:c0:3f:59:ae:39:
+        b7:84:09:9e:ab:f1:a9:2e:6b:69:e2:ad:cc:f2:ea:78:09:05:
+        20:38:42:71:18:7e:c7:b2:97:e6:d5:02:05:06:56:a3:5f:f1:
+        aa:c2:c4:4f:fe:f7:ef:16:0f:9d:ec:aa:85:cf:3d:29:24:f1:
+        04:cd
+
+TC TrustCenter, Germany, Class 2 CA
+===================================
+MD5 Fingerprint: E1:E9:96:53:77:E1:F0:38:A0:02:AB:94:C6:95:7B:FC
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIENTCCA56gAwIBAgIBAzANBgkqhkiG9w0BAQQFADCBvDELMAkGA1UEBhMCREUx
+EDAOBgNVBAgTB0hhbWJ1cmcxEDAOBgNVBAcTB0hhbWJ1cmcxOjA4BgNVBAoTMVRD
+IFRydXN0Q2VudGVyIGZvciBTZWN1cml0eSBpbiBEYXRhIE5ldHdvcmtzIEdtYkgx
+IjAgBgNVBAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDIgQ0ExKTAnBgkqhkiG9w0B
+CQEWGmNlcnRpZmljYXRlQHRydXN0Y2VudGVyLmRlMB4XDTk4MDMwOTEzNTc0NFoX
+DTA1MTIzMTEzNTc0NFowgbwxCzAJBgNVBAYTAkRFMRAwDgYDVQQIEwdIYW1idXJn
+MRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFUQyBUcnVzdENlbnRlciBmb3Ig
+U2VjdXJpdHkgaW4gRGF0YSBOZXR3b3JrcyBHbWJIMSIwIAYDVQQLExlUQyBUcnVz
+dENlbnRlciBDbGFzcyAyIENBMSkwJwYJKoZIhvcNAQkBFhpjZXJ0aWZpY2F0ZUB0
+cnVzdGNlbnRlci5kZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA2jjo7TIA
+KXGDAQ2/jAHc2satOaSpii/Vi1xoX1DGYvVmvcqRIuyqHVHXPbNRsoNOXctJsPBM
+VeVrLceFCzAckk6C1MoC7fdvvtzg4xS4BVPymvRWi1qehZPRtIJWrk27qEtXFrz+
++Fie+CmNsHvNeMlPrItnDPGc+/xXm1dcTw0CAwEAAaOCAUMwggE/MEAGCWCGSAGG
++EIBAwQzFjFodHRwczovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL2NoZWNr
+LXJldi5jZ2k/MEAGCWCGSAGG+EIBBAQzFjFodHRwczovL3d3dy50cnVzdGNlbnRl
+ci5kZS9jZ2ktYmluL2NoZWNrLXJldi5jZ2k/MDwGCWCGSAGG+EIBBwQvFi1odHRw
+czovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL1JlbmV3LmNnaT8wPgYJYIZI
+AYb4QgEIBDEWL2h0dHA6Ly93d3cudHJ1c3RjZW50ZXIuZGUvZ3VpZGVsaW5lcy9p
+bmRleC5odG1sMCgGCWCGSAGG+EIBDQQbFhlUQyBUcnVzdENlbnRlciBDbGFzcyAy
+IENBMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQQFAAOBgQCJG/Tv6Tji
+bAz2zW9JzinM+6YP+Y0+lUbW/EcyibLIBmF60ucNEwKUC9mLVkf0u+fFX3v0Y0yu
+fDTqDaKpsyyF8+P+J1QQkrCPksGYQhhwSNtOLOsNJGjk0fe+Cakph7vo2tw+o4hC
+MfXR43+u2I4AWnSYsE/G/yN7XHMAeMnbTg==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 3 (0x3)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 2 CA/Email=certificate@trustcenter.de
+        Validity
+            Not Before: Mar  9 13:57:44 1998 GMT
+            Not After : Dec 31 13:57:44 2005 GMT
+        Subject: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 2 CA/Email=certificate@trustcenter.de
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:da:38:e8:ed:32:00:29:71:83:01:0d:bf:8c:01:
+                    dc:da:c6:ad:39:a4:a9:8a:2f:d5:8b:5c:68:5f:50:
+                    c6:62:f5:66:bd:ca:91:22:ec:aa:1d:51:d7:3d:b3:
+                    51:b2:83:4e:5d:cb:49:b0:f0:4c:55:e5:6b:2d:c7:
+                    85:0b:30:1c:92:4e:82:d4:ca:02:ed:f7:6f:be:dc:
+                    e0:e3:14:b8:05:53:f2:9a:f4:56:8b:5a:9e:85:93:
+                    d1:b4:82:56:ae:4d:bb:a8:4b:57:16:bc:fe:f8:58:
+                    9e:f8:29:8d:b0:7b:cd:78:c9:4f:ac:8b:67:0c:f1:
+                    9c:fb:fc:57:9b:57:5c:4f:0d
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape CA Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape Renewal Url: 
+                https://www.trustcenter.de/cgi-bin/Renew.cgi?
+            Netscape CA Policy Url: 
+                http://www.trustcenter.de/guidelines/index.html
+            Netscape Comment: 
+                TC TrustCenter Class 2 CA
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+    Signature Algorithm: md5WithRSAEncryption
+        89:1b:f4:ef:e9:38:e2:6c:0c:f6:cd:6f:49:ce:29:cc:fb:a6:
+        0f:f9:8d:3e:95:46:d6:fc:47:32:89:b2:c8:06:61:7a:d2:e7:
+        0d:13:02:94:0b:d9:8b:56:47:f4:bb:e7:c5:5f:7b:f4:63:4c:
+        ae:7c:34:ea:0d:a2:a9:b3:2c:85:f3:e3:fe:27:54:10:92:b0:
+        8f:92:c1:98:42:18:70:48:db:4e:2c:eb:0d:24:68:e4:d1:f7:
+        be:09:a9:29:87:bb:e8:da:dc:3e:a3:88:42:31:f5:d1:e3:7f:
+        ae:d8:8e:00:5a:74:98:b0:4f:c6:ff:23:7b:5c:73:00:78:c9:
+        db:4e
+
+TC TrustCenter, Germany, Class 3 CA
+===================================
+MD5 Fingerprint: 62:AB:B6:15:4A:B4:B0:16:77:FF:AE:CF:16:16:2B:8C
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIENTCCA56gAwIBAgIBBDANBgkqhkiG9w0BAQQFADCBvDELMAkGA1UEBhMCREUx
+EDAOBgNVBAgTB0hhbWJ1cmcxEDAOBgNVBAcTB0hhbWJ1cmcxOjA4BgNVBAoTMVRD
+IFRydXN0Q2VudGVyIGZvciBTZWN1cml0eSBpbiBEYXRhIE5ldHdvcmtzIEdtYkgx
+IjAgBgNVBAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDMgQ0ExKTAnBgkqhkiG9w0B
+CQEWGmNlcnRpZmljYXRlQHRydXN0Y2VudGVyLmRlMB4XDTk4MDMwOTEzNTg0OVoX
+DTA1MTIzMTEzNTg0OVowgbwxCzAJBgNVBAYTAkRFMRAwDgYDVQQIEwdIYW1idXJn
+MRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFUQyBUcnVzdENlbnRlciBmb3Ig
+U2VjdXJpdHkgaW4gRGF0YSBOZXR3b3JrcyBHbWJIMSIwIAYDVQQLExlUQyBUcnVz
+dENlbnRlciBDbGFzcyAzIENBMSkwJwYJKoZIhvcNAQkBFhpjZXJ0aWZpY2F0ZUB0
+cnVzdGNlbnRlci5kZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAtrTBNQUu
+DY3soEBqHA4nplCSa1AbB94u53bM4Nr8hKhejGNqK03ZTgJ2EcEL8o15ygC28bAO
+1/ukFz2vq2l6lie/rzOhmipZqsS1NwjyEqUxtkP1MpZxKCirjSiG37vu4wx9MNbD
+UquPXSeca8Cj5wVrV0lEs27qZM/SjnpQd3cCAwEAAaOCAUMwggE/MEAGCWCGSAGG
++EIBAwQzFjFodHRwczovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL2NoZWNr
+LXJldi5jZ2k/MEAGCWCGSAGG+EIBBAQzFjFodHRwczovL3d3dy50cnVzdGNlbnRl
+ci5kZS9jZ2ktYmluL2NoZWNrLXJldi5jZ2k/MDwGCWCGSAGG+EIBBwQvFi1odHRw
+czovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL1JlbmV3LmNnaT8wPgYJYIZI
+AYb4QgEIBDEWL2h0dHA6Ly93d3cudHJ1c3RjZW50ZXIuZGUvZ3VpZGVsaW5lcy9p
+bmRleC5odG1sMCgGCWCGSAGG+EIBDQQbFhlUQyBUcnVzdENlbnRlciBDbGFzcyAz
+IENBMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQQFAAOBgQCEhlBieaAn
+4SW6CbE0DxMJ7S3Ko+aV+TCszRelzj2Xnex8jyZ/wGHKIveR3Tw2WZqbdfe85Mjt
+7AK2IqfzLPHIknhttu7FKOyAIE+5awjnL6eGHn2xCJ9UuQA3PKDYGsiWHPQyFJw5
+lbfu8ENJwl7oy3lvU7/7SYos2EvZVfIScA==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 4 (0x4)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 3 CA/Email=certificate@trustcenter.de
+        Validity
+            Not Before: Mar  9 13:58:49 1998 GMT
+            Not After : Dec 31 13:58:49 2005 GMT
+        Subject: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 3 CA/Email=certificate@trustcenter.de
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b6:b4:c1:35:05:2e:0d:8d:ec:a0:40:6a:1c:0e:
+                    27:a6:50:92:6b:50:1b:07:de:2e:e7:76:cc:e0:da:
+                    fc:84:a8:5e:8c:63:6a:2b:4d:d9:4e:02:76:11:c1:
+                    0b:f2:8d:79:ca:00:b6:f1:b0:0e:d7:fb:a4:17:3d:
+                    af:ab:69:7a:96:27:bf:af:33:a1:9a:2a:59:aa:c4:
+                    b5:37:08:f2:12:a5:31:b6:43:f5:32:96:71:28:28:
+                    ab:8d:28:86:df:bb:ee:e3:0c:7d:30:d6:c3:52:ab:
+                    8f:5d:27:9c:6b:c0:a3:e7:05:6b:57:49:44:b3:6e:
+                    ea:64:cf:d2:8e:7a:50:77:77
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape CA Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape Renewal Url: 
+                https://www.trustcenter.de/cgi-bin/Renew.cgi?
+            Netscape CA Policy Url: 
+                http://www.trustcenter.de/guidelines/index.html
+            Netscape Comment: 
+                TC TrustCenter Class 3 CA
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+    Signature Algorithm: md5WithRSAEncryption
+        84:86:50:62:79:a0:27:e1:25:ba:09:b1:34:0f:13:09:ed:2d:
+        ca:a3:e6:95:f9:30:ac:cd:17:a5:ce:3d:97:9d:ec:7c:8f:26:
+        7f:c0:61:ca:22:f7:91:dd:3c:36:59:9a:9b:75:f7:bc:e4:c8:
+        ed:ec:02:b6:22:a7:f3:2c:f1:c8:92:78:6d:b6:ee:c5:28:ec:
+        80:20:4f:b9:6b:08:e7:2f:a7:86:1e:7d:b1:08:9f:54:b9:00:
+        37:3c:a0:d8:1a:c8:96:1c:f4:32:14:9c:39:95:b7:ee:f0:43:
+        49:c2:5e:e8:cb:79:6f:53:bf:fb:49:8a:2c:d8:4b:d9:55:f2:
+        12:70
+
+TC TrustCenter, Germany, Class 4 CA
+===================================
+MD5 Fingerprint: BF:AF:EC:C4:DA:F9:30:F9:CA:35:CA:25:E4:3F:8D:89
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIENTCCA56gAwIBAgIBBTANBgkqhkiG9w0BAQQFADCBvDELMAkGA1UEBhMCREUx
+EDAOBgNVBAgTB0hhbWJ1cmcxEDAOBgNVBAcTB0hhbWJ1cmcxOjA4BgNVBAoTMVRD
+IFRydXN0Q2VudGVyIGZvciBTZWN1cml0eSBpbiBEYXRhIE5ldHdvcmtzIEdtYkgx
+IjAgBgNVBAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDQgQ0ExKTAnBgkqhkiG9w0B
+CQEWGmNlcnRpZmljYXRlQHRydXN0Y2VudGVyLmRlMB4XDTk4MDMwOTE0MDAyMFoX
+DTA1MTIzMTE0MDAyMFowgbwxCzAJBgNVBAYTAkRFMRAwDgYDVQQIEwdIYW1idXJn
+MRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFUQyBUcnVzdENlbnRlciBmb3Ig
+U2VjdXJpdHkgaW4gRGF0YSBOZXR3b3JrcyBHbWJIMSIwIAYDVQQLExlUQyBUcnVz
+dENlbnRlciBDbGFzcyA0IENBMSkwJwYJKoZIhvcNAQkBFhpjZXJ0aWZpY2F0ZUB0
+cnVzdGNlbnRlci5kZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAvy9j1jZ7
+sg3TVfVkbOYlXca0yBS6JTiD61ZipVWpZaP0I5nCS7nQzVRnpqOgo6kzK3bkva13
+su1cEnTDxbYPUppyk0OQYmYVD0Wl3eDduG9AblfBeXKjYKq6dh0SiVNa/AK+4QkT
+xUov3D2LGa3XiyRF+0z0zVw1HSlMUfPybFUCAwEAAaOCAUMwggE/MEAGCWCGSAGG
++EIBAwQzFjFodHRwczovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL2NoZWNr
+LXJldi5jZ2k/MEAGCWCGSAGG+EIBBAQzFjFodHRwczovL3d3dy50cnVzdGNlbnRl
+ci5kZS9jZ2ktYmluL2NoZWNrLXJldi5jZ2k/MDwGCWCGSAGG+EIBBwQvFi1odHRw
+czovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL1JlbmV3LmNnaT8wPgYJYIZI
+AYb4QgEIBDEWL2h0dHA6Ly93d3cudHJ1c3RjZW50ZXIuZGUvZ3VpZGVsaW5lcy9p
+bmRleC5odG1sMCgGCWCGSAGG+EIBDQQbFhlUQyBUcnVzdENlbnRlciBDbGFzcyA0
+IENBMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQQFAAOBgQCUaBQbJZ4p
+mbGyI9JEs5Wf0Z5VBN3jL4IzVZZ3GZ0rnmUc+orjx48l/LEeVUYPj/9PNy+kdlmm
+ZOvVFnC93ZUzDKQNJOtkULRDEfJDvg1xmCLsAa/s98dcccN1kVgZ6N2g9LTxvBBK
+85O0Bkm7H2bSvXRH4Zr569erbR+64R0s2g==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 5 (0x5)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 4 CA/Email=certificate@trustcenter.de
+        Validity
+            Not Before: Mar  9 14:00:20 1998 GMT
+            Not After : Dec 31 14:00:20 2005 GMT
+        Subject: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 4 CA/Email=certificate@trustcenter.de
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:bf:2f:63:d6:36:7b:b2:0d:d3:55:f5:64:6c:e6:
+                    25:5d:c6:b4:c8:14:ba:25:38:83:eb:56:62:a5:55:
+                    a9:65:a3:f4:23:99:c2:4b:b9:d0:cd:54:67:a6:a3:
+                    a0:a3:a9:33:2b:76:e4:bd:ad:77:b2:ed:5c:12:74:
+                    c3:c5:b6:0f:52:9a:72:93:43:90:62:66:15:0f:45:
+                    a5:dd:e0:dd:b8:6f:40:6e:57:c1:79:72:a3:60:aa:
+                    ba:76:1d:12:89:53:5a:fc:02:be:e1:09:13:c5:4a:
+                    2f:dc:3d:8b:19:ad:d7:8b:24:45:fb:4c:f4:cd:5c:
+                    35:1d:29:4c:51:f3:f2:6c:55
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape CA Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape Renewal Url: 
+                https://www.trustcenter.de/cgi-bin/Renew.cgi?
+            Netscape CA Policy Url: 
+                http://www.trustcenter.de/guidelines/index.html
+            Netscape Comment: 
+                TC TrustCenter Class 4 CA
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+    Signature Algorithm: md5WithRSAEncryption
+        94:68:14:1b:25:9e:29:99:b1:b2:23:d2:44:b3:95:9f:d1:9e:
+        55:04:dd:e3:2f:82:33:55:96:77:19:9d:2b:9e:65:1c:fa:8a:
+        e3:c7:8f:25:fc:b1:1e:55:46:0f:8f:ff:4f:37:2f:a4:76:59:
+        a6:64:eb:d5:16:70:bd:dd:95:33:0c:a4:0d:24:eb:64:50:b4:
+        43:11:f2:43:be:0d:71:98:22:ec:01:af:ec:f7:c7:5c:71:c3:
+        75:91:58:19:e8:dd:a0:f4:b4:f1:bc:10:4a:f3:93:b4:06:49:
+        bb:1f:66:d2:bd:74:47:e1:9a:f9:eb:d7:ab:6d:1f:ba:e1:1d:
+        2c:da
+
+Thawte Personal Basic CA
+========================
+MD5 Fingerprint: E6:0B:D2:C9:CA:2D:88:DB:1A:71:0E:4B:78:EB:02:41
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDITCCAoqgAwIBAgIBADANBgkqhkiG9w0BAQQFADCByzELMAkGA1UEBhMCWkEx
+FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYD
+VQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT
+ZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFBlcnNvbmFsIEJhc2lj
+IENBMSgwJgYJKoZIhvcNAQkBFhlwZXJzb25hbC1iYXNpY0B0aGF3dGUuY29tMB4X
+DTk2MDEwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgcsxCzAJBgNVBAYTAlpBMRUw
+EwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEaMBgGA1UE
+ChMRVGhhd3RlIENvbnN1bHRpbmcxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2Vy
+dmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQZXJzb25hbCBCYXNpYyBD
+QTEoMCYGCSqGSIb3DQEJARYZcGVyc29uYWwtYmFzaWNAdGhhd3RlLmNvbTCBnzAN
+BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAvLyTU23AUE+CFeZIlDWmWr5vQvoPR+53
+dXLdjUmbllegeNTKP1GzaQuRdhciB5dqxFGTS+CN7zeVoQxN2jSQHReJl+A1OFdK
+wPQIcOk8RHtQfmGakOMj04gRRif1CwcOu93RfyAKiLlWCy4cgNrx454p7xS9CkT7
+G1sY0b8jkyECAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQQF
+AAOBgQAt4plrsD16iddZopQBHyvdEktTwq1/qqcAXJFAVyVKOKqEcLnZgA+le1z7
+c8a914phXAPjLSeoF+CEhULcXpvGt7Jtu3Sv5D/Lp7ew4F2+eIMllNLbgQ95B21P
+9DkVWlIBe94y1k049hJcBlDfBVu9FEuh3ym6O0GN92NWod8isQ==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 0 (0x0)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Basic CA/Email=personal-basic@thawte.com
+        Validity
+            Not Before: Jan  1 00:00:00 1996 GMT
+            Not After : Dec 31 23:59:59 2020 GMT
+        Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Basic CA/Email=personal-basic@thawte.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:bc:bc:93:53:6d:c0:50:4f:82:15:e6:48:94:35:
+                    a6:5a:be:6f:42:fa:0f:47:ee:77:75:72:dd:8d:49:
+                    9b:96:57:a0:78:d4:ca:3f:51:b3:69:0b:91:76:17:
+                    22:07:97:6a:c4:51:93:4b:e0:8d:ef:37:95:a1:0c:
+                    4d:da:34:90:1d:17:89:97:e0:35:38:57:4a:c0:f4:
+                    08:70:e9:3c:44:7b:50:7e:61:9a:90:e3:23:d3:88:
+                    11:46:27:f5:0b:07:0e:bb:dd:d1:7f:20:0a:88:b9:
+                    56:0b:2e:1c:80:da:f1:e3:9e:29:ef:14:bd:0a:44:
+                    fb:1b:5b:18:d1:bf:23:93:21
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        2d:e2:99:6b:b0:3d:7a:89:d7:59:a2:94:01:1f:2b:dd:12:4b:
+        53:c2:ad:7f:aa:a7:00:5c:91:40:57:25:4a:38:aa:84:70:b9:
+        d9:80:0f:a5:7b:5c:fb:73:c6:bd:d7:8a:61:5c:03:e3:2d:27:
+        a8:17:e0:84:85:42:dc:5e:9b:c6:b7:b2:6d:bb:74:af:e4:3f:
+        cb:a7:b7:b0:e0:5d:be:78:83:25:94:d2:db:81:0f:79:07:6d:
+        4f:f4:39:15:5a:52:01:7b:de:32:d6:4d:38:f6:12:5c:06:50:
+        df:05:5b:bd:14:4b:a1:df:29:ba:3b:41:8d:f7:63:56:a1:df:
+        22:b1
+
+Thawte Personal Freemail CA
+===========================
+MD5 Fingerprint: 1E:74:C3:86:3C:0C:35:C5:3E:C2:7F:EF:3C:AA:3C:D9
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDLTCCApagAwIBAgIBADANBgkqhkiG9w0BAQQFADCB0TELMAkGA1UEBhMCWkEx
+FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYD
+VQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT
+ZXJ2aWNlcyBEaXZpc2lvbjEkMCIGA1UEAxMbVGhhd3RlIFBlcnNvbmFsIEZyZWVt
+YWlsIENBMSswKQYJKoZIhvcNAQkBFhxwZXJzb25hbC1mcmVlbWFpbEB0aGF3dGUu
+Y29tMB4XDTk2MDEwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgdExCzAJBgNVBAYT
+AlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEa
+MBgGA1UEChMRVGhhd3RlIENvbnN1bHRpbmcxKDAmBgNVBAsTH0NlcnRpZmljYXRp
+b24gU2VydmljZXMgRGl2aXNpb24xJDAiBgNVBAMTG1RoYXd0ZSBQZXJzb25hbCBG
+cmVlbWFpbCBDQTErMCkGCSqGSIb3DQEJARYccGVyc29uYWwtZnJlZW1haWxAdGhh
+d3RlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1GnX1LCUZFtx6UfY
+DFG26nKRsIRefS0Nj3sS34UldSh0OkIsYyeflXtL734Zhx2G6qPduc6WZBrCFG5E
+rHzmj+hND3EfQDimAKOHePb5lIZererAXnbr2RSjXW56fAylS1V/Bhkpf56aJtVq
+uzgkCGqYx7Hao5iR/Xnb5VrEHLkCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zAN
+BgkqhkiG9w0BAQQFAAOBgQDH7JJ+Tvj1lqVnYiqk8E0RYNBvjWBYYawmu1I1XAjP
+MPuoSpaKH2JCI4wXD/S6ZJwXrEcp352YXtJsYHFcoqzceePnbgBHH7UNKOgCneSa
+/RP0ptl8sfjcXyMmCZGAc9AUG95DqYMl8uacLxXK/qarigd1iwzdUYRr5PjRznei
+gQ==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 0 (0x0)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Freemail CA/Email=personal-freemail@thawte.com
+        Validity
+            Not Before: Jan  1 00:00:00 1996 GMT
+            Not After : Dec 31 23:59:59 2020 GMT
+        Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Freemail CA/Email=personal-freemail@thawte.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d4:69:d7:d4:b0:94:64:5b:71:e9:47:d8:0c:51:
+                    b6:ea:72:91:b0:84:5e:7d:2d:0d:8f:7b:12:df:85:
+                    25:75:28:74:3a:42:2c:63:27:9f:95:7b:4b:ef:7e:
+                    19:87:1d:86:ea:a3:dd:b9:ce:96:64:1a:c2:14:6e:
+                    44:ac:7c:e6:8f:e8:4d:0f:71:1f:40:38:a6:00:a3:
+                    87:78:f6:f9:94:86:5e:ad:ea:c0:5e:76:eb:d9:14:
+                    a3:5d:6e:7a:7c:0c:a5:4b:55:7f:06:19:29:7f:9e:
+                    9a:26:d5:6a:bb:38:24:08:6a:98:c7:b1:da:a3:98:
+                    91:fd:79:db:e5:5a:c4:1c:b9
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        c7:ec:92:7e:4e:f8:f5:96:a5:67:62:2a:a4:f0:4d:11:60:d0:
+        6f:8d:60:58:61:ac:26:bb:52:35:5c:08:cf:30:fb:a8:4a:96:
+        8a:1f:62:42:23:8c:17:0f:f4:ba:64:9c:17:ac:47:29:df:9d:
+        98:5e:d2:6c:60:71:5c:a2:ac:dc:79:e3:e7:6e:00:47:1f:b5:
+        0d:28:e8:02:9d:e4:9a:fd:13:f4:a6:d9:7c:b1:f8:dc:5f:23:
+        26:09:91:80:73:d0:14:1b:de:43:a9:83:25:f2:e6:9c:2f:15:
+        ca:fe:a6:ab:8a:07:75:8b:0c:dd:51:84:6b:e4:f8:d1:ce:77:
+        a2:81
+
+Thawte Personal Premium CA
+==========================
+MD5 Fingerprint: 3A:B2:DE:22:9A:20:93:49:F9:ED:C8:D2:8A:E7:68:0D
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDKTCCApKgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBzzELMAkGA1UEBhMCWkEx
+FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYD
+VQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT
+ZXJ2aWNlcyBEaXZpc2lvbjEjMCEGA1UEAxMaVGhhd3RlIFBlcnNvbmFsIFByZW1p
+dW0gQ0ExKjAoBgkqhkiG9w0BCQEWG3BlcnNvbmFsLXByZW1pdW1AdGhhd3RlLmNv
+bTAeFw05NjAxMDEwMDAwMDBaFw0yMDEyMzEyMzU5NTlaMIHPMQswCQYDVQQGEwJa
+QTEVMBMGA1UECBMMV2VzdGVybiBDYXBlMRIwEAYDVQQHEwlDYXBlIFRvd24xGjAY
+BgNVBAoTEVRoYXd0ZSBDb25zdWx0aW5nMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9u
+IFNlcnZpY2VzIERpdmlzaW9uMSMwIQYDVQQDExpUaGF3dGUgUGVyc29uYWwgUHJl
+bWl1bSBDQTEqMCgGCSqGSIb3DQEJARYbcGVyc29uYWwtcHJlbWl1bUB0aGF3dGUu
+Y29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJZtn4B0TPuYwu8KHvE0Vs
+Bd/eJxZRNkERbGw77f4QfRKe5ZtCmv5gMcNmt3M6SK5O0DI3lIi1DbbZ8/JE2dWI
+Et12TfIa/G8jHnrx2JhFTgcQ7xZC0EN1bUre4qrJMf8fAHB8Zs8QJQi6+u4A6UYD
+ZicRFTuqW/KY3TZCstqIdQIDAQABoxMwETAPBgNVHRMBAf8EBTADAQH/MA0GCSqG
+SIb3DQEBBAUAA4GBAGk2ifc0KjNyL2071CKyuG+axTZmDhs8obF1Wub9NdP4qPIH
+b4Vnjt4rueIXsDqg8A6iAJrf8xQVbrvIhVqYgPn/vnQdPfP+MCXRNzRn+qVxeTBh
+KXLA4CxM+1bkOqhv5TJZUtt1KFBZDPgLGeSs2a+WjS9Q2wfD6h+rM+D1KzGJ
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 0 (0x0)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Premium CA/Email=personal-premium@thawte.com
+        Validity
+            Not Before: Jan  1 00:00:00 1996 GMT
+            Not After : Dec 31 23:59:59 2020 GMT
+        Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Premium CA/Email=personal-premium@thawte.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:c9:66:d9:f8:07:44:cf:b9:8c:2e:f0:a1:ef:13:
+                    45:6c:05:df:de:27:16:51:36:41:11:6c:6c:3b:ed:
+                    fe:10:7d:12:9e:e5:9b:42:9a:fe:60:31:c3:66:b7:
+                    73:3a:48:ae:4e:d0:32:37:94:88:b5:0d:b6:d9:f3:
+                    f2:44:d9:d5:88:12:dd:76:4d:f2:1a:fc:6f:23:1e:
+                    7a:f1:d8:98:45:4e:07:10:ef:16:42:d0:43:75:6d:
+                    4a:de:e2:aa:c9:31:ff:1f:00:70:7c:66:cf:10:25:
+                    08:ba:fa:ee:00:e9:46:03:66:27:11:15:3b:aa:5b:
+                    f2:98:dd:36:42:b2:da:88:75
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        69:36:89:f7:34:2a:33:72:2f:6d:3b:d4:22:b2:b8:6f:9a:c5:
+        36:66:0e:1b:3c:a1:b1:75:5a:e6:fd:35:d3:f8:a8:f2:07:6f:
+        85:67:8e:de:2b:b9:e2:17:b0:3a:a0:f0:0e:a2:00:9a:df:f3:
+        14:15:6e:bb:c8:85:5a:98:80:f9:ff:be:74:1d:3d:f3:fe:30:
+        25:d1:37:34:67:fa:a5:71:79:30:61:29:72:c0:e0:2c:4c:fb:
+        56:e4:3a:a8:6f:e5:32:59:52:db:75:28:50:59:0c:f8:0b:19:
+        e4:ac:d9:af:96:8d:2f:50:db:07:c3:ea:1f:ab:33:e0:f5:2b:
+        31:89
+
+Thawte Premium Server CA
+========================
+MD5 Fingerprint: 06:9F:69:79:16:66:90:02:1B:8C:8C:A2:C3:07:6F:3A
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkEx
+FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
+VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
+biBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFByZW1pdW0gU2Vy
+dmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZlckB0aGF3dGUuY29t
+MB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYTAlpB
+MRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsG
+A1UEChMUVGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRp
+b24gU2VydmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNl
+cnZlciBDQTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNv
+bTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2aovXwlue2oFBYo847kkE
+VdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIhUdib0GfQ
+ug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j+ao6hnO2RlNYyIkFvYMR
+uHM/qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG
+9w0BAQQFAAOBgQAmSCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUI
+hfzJATj/Tb7yFkJD57taRvvBxhEf8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JM
+pAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7tUCemDaYj+bvLpgcUQg==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Premium Server CA/Email=premium-server@thawte.com
+        Validity
+            Not Before: Aug  1 00:00:00 1996 GMT
+            Not After : Dec 31 23:59:59 2020 GMT
+        Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Premium Server CA/Email=premium-server@thawte.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d2:36:36:6a:8b:d7:c2:5b:9e:da:81:41:62:8f:
+                    38:ee:49:04:55:d6:d0:ef:1c:1b:95:16:47:ef:18:
+                    48:35:3a:52:f4:2b:6a:06:8f:3b:2f:ea:56:e3:af:
+                    86:8d:9e:17:f7:9e:b4:65:75:02:4d:ef:cb:09:a2:
+                    21:51:d8:9b:d0:67:d0:ba:0d:92:06:14:73:d4:93:
+                    cb:97:2a:00:9c:5c:4e:0c:bc:fa:15:52:fc:f2:44:
+                    6e:da:11:4a:6e:08:9f:2f:2d:e3:f9:aa:3a:86:73:
+                    b6:46:53:58:c8:89:05:bd:83:11:b8:73:3f:aa:07:
+                    8d:f4:42:4d:e7:40:9d:1c:37
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        26:48:2c:16:c2:58:fa:e8:16:74:0c:aa:aa:5f:54:3f:f2:d7:
+        c9:78:60:5e:5e:6e:37:63:22:77:36:7e:b2:17:c4:34:b9:f5:
+        08:85:fc:c9:01:38:ff:4d:be:f2:16:42:43:e7:bb:5a:46:fb:
+        c1:c6:11:1f:f1:4a:b0:28:46:c9:c3:c4:42:7d:bc:fa:ab:59:
+        6e:d5:b7:51:88:11:e3:a4:85:19:6b:82:4c:a4:0c:12:ad:e9:
+        a4:ae:3f:f1:c3:49:65:9a:8c:c5:c8:3e:25:b7:94:99:bb:92:
+        32:71:07:f0:86:5e:ed:50:27:a6:0d:a6:23:f9:bb:cb:a6:07:
+        14:42
+
+Thawte Server CA
+================
+MD5 Fingerprint: C5:70:C4:A2:ED:53:78:0C:C8:10:53:81:64:CB:D0:1D
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDEzCCAnygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBxDELMAkGA1UEBhMCWkEx
+FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
+VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
+biBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEm
+MCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wHhcNOTYwODAx
+MDAwMDAwWhcNMjAxMjMxMjM1OTU5WjCBxDELMAkGA1UEBhMCWkExFTATBgNVBAgT
+DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3
+dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNl
+cyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3
+DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQAD
+gY0AMIGJAoGBANOkUG7I/1Zr5s9dtuoMaHVHoqrC2oQl/Kj0R1HahbUgdJSGHg91
+yekIYfUGbTBuFRkC6VLAYttNmZ7iagxEOM3+vuNkCXDF/rFrKbYvScg71CcEJRCX
+L+eQbcAoQpnXTEPew/UhbVSfXcNY4cDk2VuwuNy0e982OsK1ZiIS1ocNAgMBAAGj
+EzARMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAB/pMaVz7lcxG
+7oWDTSEwjsrZqG9JGubaUeNgcGyEYRGhGshIPllDfU+VPaGLtwtimHp1it2ITk6e
+QNuozDJ0uW8NxuOzRAvZim+aKZuZGCg70eNAKJpaPNW15yAbi8qkq43pUdniTCxZ
+qdq5snUb9kLy78fyGPmJvKP/iiMucEc=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Server CA/Email=server-certs@thawte.com
+        Validity
+            Not Before: Aug  1 00:00:00 1996 GMT
+            Not After : Dec 31 23:59:59 2020 GMT
+        Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Server CA/Email=server-certs@thawte.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d3:a4:50:6e:c8:ff:56:6b:e6:cf:5d:b6:ea:0c:
+                    68:75:47:a2:aa:c2:da:84:25:fc:a8:f4:47:51:da:
+                    85:b5:20:74:94:86:1e:0f:75:c9:e9:08:61:f5:06:
+                    6d:30:6e:15:19:02:e9:52:c0:62:db:4d:99:9e:e2:
+                    6a:0c:44:38:cd:fe:be:e3:64:09:70:c5:fe:b1:6b:
+                    29:b6:2f:49:c8:3b:d4:27:04:25:10:97:2f:e7:90:
+                    6d:c0:28:42:99:d7:4c:43:de:c3:f5:21:6d:54:9f:
+                    5d:c3:58:e1:c0:e4:d9:5b:b0:b8:dc:b4:7b:df:36:
+                    3a:c2:b5:66:22:12:d6:87:0d
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        07:fa:4c:69:5c:fb:95:cc:46:ee:85:83:4d:21:30:8e:ca:d9:
+        a8:6f:49:1a:e6:da:51:e3:60:70:6c:84:61:11:a1:1a:c8:48:
+        3e:59:43:7d:4f:95:3d:a1:8b:b7:0b:62:98:7a:75:8a:dd:88:
+        4e:4e:9e:40:db:a8:cc:32:74:b9:6f:0d:c6:e3:b3:44:0b:d9:
+        8a:6f:9a:29:9b:99:18:28:3b:d1:e3:40:28:9a:5a:3c:d5:b5:
+        e7:20:1b:8b:ca:a4:ab:8d:e9:51:d9:e2:4c:2c:59:a9:da:b9:
+        b2:75:1b:f6:42:f2:ef:c7:f2:18:f9:89:bc:a3:ff:8a:23:2e:
+        70:47
+
+Thawte Universal CA Root
+========================
+MD5 Fingerprint: 17:AF:71:16:52:7B:73:65:22:05:29:28:84:71:9D:13
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIRIjCCCQoCAQAwDQYJKoZIhvcNAQEFBQAwVzEPMA0GA1UEChMGVGhhd3RlMSEw
+HwYDVQQLExhUaGF3dGUgVW5pdmVyc2FsIENBIFJvb3QxITAfBgNVBAMTGFRoYXd0
+ZSBVbml2ZXJzYWwgQ0EgUm9vdDAeFw05OTEyMDUxMzU2MDVaFw0zNzA0MDMxMzU2
+MDVaMFcxDzANBgNVBAoTBlRoYXd0ZTEhMB8GA1UECxMYVGhhd3RlIFVuaXZlcnNh
+bCBDQSBSb290MSEwHwYDVQQDExhUaGF3dGUgVW5pdmVyc2FsIENBIFJvb3Qwgggi
+MA0GCSqGSIb3DQEBAQUAA4IIDwAwgggKAoIIAQDiiQVtw3+tpok6/7vHzZ03seHS
+IR6bYSoV53tXT1U80Lv52T0+przstK1TmhYC6wty/Yryj0QFxevT5b22RDnm+0e/
+ap4KlRjiaOLWltYhrYj99Rf109pCpZDtKZWWdTrah6HU9dOH3gVipuNmdJLPpby7
+32j/cXVWQVk16zNaZlHy0qMKwYzOc1wRby2MlYyRsf3P5a1WlcyFkoOQVUHJwnft
++aN0QgpoCPPQ0WX9Zyw0/yR/53nIBzslV92kDJg9vuDMGWXb8lSir0LUneKuhCMl
+CTMStWoedsSL2UkAbF66H/Ib2mfKJ6qjRCMbg4LO8qsz7VSk3MmrWWXROA7BPhtn
+j9Z1AeBVIt12d+yO3fTPeSJtuVcD9ZkIpzw+NPvEF64jWM0k8yPKagIolAGBNLRs
+a66LGsOj0gk8FlT1Nl8k459KoeJkxhbDpoF6JDZHjsFeDvv5FXgE1g5Z2Z1YZmLS
+lCkyMsh4uWb2tVbhbMYUS5ZSWZECJGpVR9c/tiMaYHeXLuJAr54EV56tEcXJQ3Dv
+SLRerBxpLi6C1VuLvoK+GRRe5w0ix1Eb/x6b8TCPcTEGszQnj196ZoJPii0Tq0LP
+IVael45mNg+Wm+Ur9AKpKmqMLMTDuHAsLSkeP1B3Hm0qVORVCpE4ocW1ZqJ2Wu4P
+v7Rn4ShuD+E2oYLRv9R34cRnMpN4yOdUU/4jeeZozCaQ9hBjXSpvkS2kczJRIfK7
+Fd+qJAhIBt6hnia/uoO/fKTIoIy90v+8hGknEyQYxEUYIyZeGBTKLoiHYqNT5iG3
+uIV7moW7FSZy+Ln3anQPST+SvqkFt5knv78JF0uZTK0REHzfdDH2jyZfqoiuOFfI
+VS3T+9gbUZm+JRs6usB9G+3O0km5z/PFfYmQgdhpSCAQo/jvklEYMosRGMA/G4VW
+zlfJ8oJkxt8CCS5KES+xJ203UvDwFmHxZ43fh3Kvh9rP+1CUbtSUheuKLOoh9ZZK
+RNXgzmp0RE3QBdOHFe020KSLZlVwk+5HBsF+LqUYeWfzKIXxcPcOg6R+VJ5adjLL
+ZRu4zfvIKAPSVJHRp8WFQwgXdqXmL2cI2KGigi0M+MGvY9RQd21rRkpBhdWQX3kt
+xOzXEYdAiuFo4mT4VTL7b5Ms2nfZIcEX5TYsTn6Qf6yUKzJnvjhQdriuQbnXIcUJ
+TGDIo1HENJtXN9/LyTNXi+v7dp8ZTcVqHypFrivtL42npQDLBPolYi50SBvKKoy6
+27Z+9rsCfKnD21h4ob/w/hoQVRHO6GlOlmXGFwPWB2iMVIKuHCJVP/H0CZcowEb3
+TgslHfcH1wkdOhhXODvoMwbnj3hGHlv1BrbsuKYN8boTS9YYIN1pM0ozFa64yJiK
+JyyTvC377jO/ZuZNurabBlVgl0u8RM1+9KHYqi/AAighFmJ42whU8vz0NOPGjxxD
+V86QGkvcLjsokYk/eto1HY4s7kns9DOtyVOojJ8EUz4kHFLJEvliV6O87izrQHwg
+I3ArlflzF4rRwRxpprc4mmf3cB16WgxAz2IPhTzCAk5+tfbFKimEsx83KuGqckLE
+7Wsaj5IcXb7R8lvyq6qp0vW4pEErK5FuEkjKmNg3jcjtADC1tgROfpzahOzA+nvl
+HYikU0awlORcG6ElLA9IUneXCWzsWxgzgwLlgn7NhSEwEf0nT8/kHuw/pVds6Sow
+GSqI5cNpOKtvOXF/hOFBw+HMKokgUi6DD2w5P0stFqwt8CSsAHP0m7MGPwW4FIUf
+q55cPJ5inQ5tO4AJ/ALqopd0ysf541bhw8qlpprAkOAkElPSwovavu0CQ15n4YmY
+ee7LqsrDG9znpUalfGsWh7ZaKNfbJzxepb22Ud0fQ887Jsg6jSVhwUn0PBvJROqv
+HMIrlAEqDjDRW4srR+XD0QQDmw45LNYn1OZwWtl1zyrYyQAF5BOI7MM5+4dhMDZD
+A8ienKIGwi/F/PCAY7FUBKBMqS7G9XZ62NDk1JQR5RW1eAbcuICPmakgMz0QhUxl
+Cco+WF5gk5qqYl3AUQYcXWCgDZxLQ/anFiGkh6rywS7ukjC4nt/fEAGLhglw2Gyo
+t1AeFpa092f9NTohkCoyxwB7TQcQCbkvc9gYfmeZBE8G/FDHhZudQJ2zljf6pdyy
+ck7vTgks/ZH9Tfe7pqE+q3uiA0CmqVUn4vr5Gc6HdarxdTbz87iR+JHDi3UTjkxl
+mhY5auU06HqWWX81sAD9W2n8Qyb69Shu/ofZfiT7tKCCblSi/66/YrT0cgHCy5hH
+mOFMtReAgM6PpijuHkVq+9/xHfxaO9bq9GwdYklXO4qPhurwUwTOnBZo/7q5/IgP
+R/cCRHJAuMo7LVOd3DxWjFl7aBosjXG7bADHGs5vQJKxoy8P2UTyo3Aunu4OrjLQ
+Oz6LB+rmebNcKeJ9a6he+Vox6AiWoowDmEbxuH2QVCbtdmL+numabl7JScdcNFMp
+VNns5EbhgDt12d/7edWH8bqe6xnOTFJz5luHriVPOXnMxrj5EHvs8JtxpAWg0ynT
+Tn8f9C0oeMxVlXsekS/MVhhzi7LbvGkH5tDYT+2i/1iFo23gSlO3Z32NDFxbe3co
+AjVEegTTKEPIazAXXTK4KTW6dto7FEp2GFik+JI8nk0zb0ZrCNkxSGjd9PskVjSy
+z2lmvkjSimYizfJpzcJTE0UpQSLWXZgftqSyo8LuAi9RG9yDpOxwJajUCGEyb+Sh
+gS58Y3L6KWW8cETPXQIDAQABMA0GCSqGSIb3DQEBBQUAA4IIAQBVmjRqIgZpCUUz
+x66pXMcJTpuGvEGQ1JRS9s0jKZRLIs3ovf6dzVLyve2rh8mrq0YEtL2iPyIwR1DA
+S4x2DwP1ktKxLcR6NZzJc4frpp/eD3ON03+Z2LqPb8Tzvhqui6KUNpDi5euNBfT8
+Zd+V8cSUTRdW1588j1A853e/lYYmZPtq/8ba6YyuQrtp5TPG2OkNxlUhScEMtKP5
+m0tc3oNPQQPOKnloOH3wVEkg9bYQ/wjcM2aWm/8G3gCe185WQ5pR/HDN9vBRo7fN
+tFyFYs1xt8YrIyvdw25AQvo3/zcc9npXlIeFI9fUycdfwU0vyQ3XXOycJe6eMIKR
+lnK4dR34CWhXl7ItS+4l7HokKe5y1JwT26vcAwrYShTJCFdEXaG1U4A08hSXz1Le
+og6KEOkU79BgvmGh8SVd1RhzP5MQypbus0DS26NVz1dapQ5PdUff6veQmm31cC4d
+FBw3ZARZULDccoZvnDc9XSivc1Xv0u4kdHQT79zbMUn7P2P10wg+M6XnnQreUyxR
+jmfbm0FlQVC91KSWbIe8EuCUx9PA5MtzWACD4awnhdadU51cvQo+A0OcDJH1bXv4
+QHJ1qxF2kSvhxqofcGl2cBUJ/pPQ1i23FWqbZ1y0aZ8lpn2K+30iqXHyzk6MuCEt
+3v5BcQ3/nexzprsHT4gOWEcufqnCx3jdunqeTuAwTmNvhdQgQen6/kNF5/uverLO
+pAUdIppYht/kzkyp/tgWpW/72M5We/XWIO/kR81jJP+5vvFIo8EBcua9wK3tJg3K
+NJ/8Ai0gTwUgriE9DMIgPD/wBITcz4n9uSWRjtBD5rMgq1wt1UCeoEvY9LLMffFY
+Co6H7YisNpbkVqARivKa0LNXozS7Gas44XRrIsQxzgHVGzbjHjhMM5PfQONZV06s
+bnseWj3FHVusyBCCNQIisvx16BCRjcR9eJNHnhydrGtiAliM1hwj1q94woCcpKok
+VBS1FJjG+CsaJMtxMgrimw5pa91+jGTRLmPvDn+xPohMnVXlyW4XBLdB/72KQcsl
+MW9Edz9HsfyBiAeOBUkgtxHZaQMqA525M4Sa399640Zzo9iijFMZiFVMdLj2RIQr
+0RQtTjkukmj/afyFYhvrVU/vJYRiRZnW2E5vP1MIfR0GlYGAf09OdDaYteKHcJjc
+1/XcUhXmxtZ5ljl/j5XPq4BTrRsLRUAO1Bi9LN6Kd3b98kRHxiHQ5HTw2BgFyHww
+csff8bv8AjCp9EImWQ2TBYKhc+005ThdzVCQ/pT8E7y9/KiiiKdzxLKo0V2IxAKi
+evEEyf6MdMnvHWRBn6welmdkrKsoQced98CYG24HwmR9WoNmVig2nOf7HHcOKKDE
+92t5OQQghMdXk7wboOq860LlqBH+/KxlzP34KIj0pZrlc1HgqJsNA3dO5eCYs4ja
+febGnnwUZsEuU0qSBzegfuk9CeQVfM/9uEGl755mncReBx2H+EGt6ucv0kFjGDf5
+FONN0OX3Q/0V4/k2cwYm3wFPqcNO3iBGd5i0eiQrO3UrTliNm12kxxagvDKIP6GD
+8wDI+NhY6WNdTCu18HJB2Kt3N9ZydK62NpzIpoNJS+DJVgspvgAwy93WyEKKANns
+FdE0cfJbZIf2J9K364awkL8p2yGeNozjIC+VI1FsG8Kk1ebYAkNnoP6bUANEf7vk
+ctXR5NqPkhRk+10UEBJKlQbJZQgpyiGjJjgRySffcGcE/cpIMn9jskV0MVBPh9kg
+cNIhcLHWEJ0zXXiDkW1Vguza5GJjx4FG1xllcipDGZC41yNNTBzgRKlmZ6zucXkn
+Jnhtcg71XUsjtXx8ZekXxjoLDd1eHlHDhrjsf8cnSqVG6GotGcGHo8uZk4dkolUU
+TLdDpZPX59JOeUDKZZlGPT96gHqIaswe5WszRvRQwNUfCbjNii6hJ+tdc6foawrl
+V4IqsPziVFJW8KupEsYjlgcknOC8RqW0IATaCZNj5dQuwn7FMe21FXSGF7mz8yaK
+HQJq2ho/6LrxBG2UUVTiWrRZgx1g0C1zzAe1Joz518aIke+Az10PoWDLRdRCItGx
+cB390LcwkDrGSG1n5TLaj9vjqOMdICWiHOFMuaT2xj9cWA27xrJ3ARaRnxcGDbdA
+PsyPjpxL4J1+mx4Fq4gi+tMoG1cUZEo+JCw4TSFpAHMu0FUtdPIV6JRDPkAqxsa5
+alveoswYUFRdTiqFbPaSiykZfufqSuAiKyW892bPd5pBdPI8FA10afVQg83NLyHb
+IkaK0PdRGpVX8gWLGhntO0XoNsJufvtXIgAfBlOprpPGj3EqMUWS545t5pkiwIP8
+79xXZndPojYx+6ETjeXKo5V9AQxkcDtTQmiAx7udqAA1aZgMqGfYQ+Wqz5XgUZWk
+Fz9CnbgEztN5ecjTihYykuDXou7XN0wvrLh7vkX28RgznHs3piTZvECrAOnDN4ur
+2LbzXoFOsBRrBz4f7ML2RCKVu7Pmb9b5cGW6CoNlqg4TL4MTI1OLQBb6zi/8TQT4
+69isxTbCFVdIOOxVs7Qeuq3SQgYXDXPIV6a+lk2p8sD7eiEc9clwqYKQtfEM1HkQ
+voGm6VxhnHd5mqTDNyZXN8lSLPoI/9BfxmHA9Ha+/N5Oz6tRmXHH33701s8GVhkT
+UwttdFlIGZtTBS2dMlTT5SxTi2Q+1GR744AJFMz+FkZja3Fp+PnLJ/aIVLxFs84C
+yJTuQFv5QgLC/7DYLOsof17JJgGZpw==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 0 (0x0)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: O=Thawte, OU=Thawte Universal CA Root, CN=Thawte Universal CA Root
+        Validity
+            Not Before: Dec  5 13:56:05 1999 GMT
+            Not After : Apr  3 13:56:05 2037 GMT
+        Subject: O=Thawte, OU=Thawte Universal CA Root, CN=Thawte Universal CA Root
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (16384 bit)
+                Modulus (16384 bit):
+                    00:e2:89:05:6d:c3:7f:ad:a6:89:3a:ff:bb:c7:cd:
+                    9d:37:b1:e1:d2:21:1e:9b:61:2a:15:e7:7b:57:4f:
+                    55:3c:d0:bb:f9:d9:3d:3e:a6:bc:ec:b4:ad:53:9a:
+                    16:02:eb:0b:72:fd:8a:f2:8f:44:05:c5:eb:d3:e5:
+                    bd:b6:44:39:e6:fb:47:bf:6a:9e:0a:95:18:e2:68:
+                    e2:d6:96:d6:21:ad:88:fd:f5:17:f5:d3:da:42:a5:
+                    90:ed:29:95:96:75:3a:da:87:a1:d4:f5:d3:87:de:
+                    05:62:a6:e3:66:74:92:cf:a5:bc:bb:df:68:ff:71:
+                    75:56:41:59:35:eb:33:5a:66:51:f2:d2:a3:0a:c1:
+                    8c:ce:73:5c:11:6f:2d:8c:95:8c:91:b1:fd:cf:e5:
+                    ad:56:95:cc:85:92:83:90:55:41:c9:c2:77:ed:f9:
+                    a3:74:42:0a:68:08:f3:d0:d1:65:fd:67:2c:34:ff:
+                    24:7f:e7:79:c8:07:3b:25:57:dd:a4:0c:98:3d:be:
+                    e0:cc:19:65:db:f2:54:a2:af:42:d4:9d:e2:ae:84:
+                    23:25:09:33:12:b5:6a:1e:76:c4:8b:d9:49:00:6c:
+                    5e:ba:1f:f2:1b:da:67:ca:27:aa:a3:44:23:1b:83:
+                    82:ce:f2:ab:33:ed:54:a4:dc:c9:ab:59:65:d1:38:
+                    0e:c1:3e:1b:67:8f:d6:75:01:e0:55:22:dd:76:77:
+                    ec:8e:dd:f4:cf:79:22:6d:b9:57:03:f5:99:08:a7:
+                    3c:3e:34:fb:c4:17:ae:23:58:cd:24:f3:23:ca:6a:
+                    02:28:94:01:81:34:b4:6c:6b:ae:8b:1a:c3:a3:d2:
+                    09:3c:16:54:f5:36:5f:24:e3:9f:4a:a1:e2:64:c6:
+                    16:c3:a6:81:7a:24:36:47:8e:c1:5e:0e:fb:f9:15:
+                    78:04:d6:0e:59:d9:9d:58:66:62:d2:94:29:32:32:
+                    c8:78:b9:66:f6:b5:56:e1:6c:c6:14:4b:96:52:59:
+                    91:02:24:6a:55:47:d7:3f:b6:23:1a:60:77:97:2e:
+                    e2:40:af:9e:04:57:9e:ad:11:c5:c9:43:70:ef:48:
+                    b4:5e:ac:1c:69:2e:2e:82:d5:5b:8b:be:82:be:19:
+                    14:5e:e7:0d:22:c7:51:1b:ff:1e:9b:f1:30:8f:71:
+                    31:06:b3:34:27:8f:5f:7a:66:82:4f:8a:2d:13:ab:
+                    42:cf:21:56:9e:97:8e:66:36:0f:96:9b:e5:2b:f4:
+                    02:a9:2a:6a:8c:2c:c4:c3:b8:70:2c:2d:29:1e:3f:
+                    50:77:1e:6d:2a:54:e4:55:0a:91:38:a1:c5:b5:66:
+                    a2:76:5a:ee:0f:bf:b4:67:e1:28:6e:0f:e1:36:a1:
+                    82:d1:bf:d4:77:e1:c4:67:32:93:78:c8:e7:54:53:
+                    fe:23:79:e6:68:cc:26:90:f6:10:63:5d:2a:6f:91:
+                    2d:a4:73:32:51:21:f2:bb:15:df:aa:24:08:48:06:
+                    de:a1:9e:26:bf:ba:83:bf:7c:a4:c8:a0:8c:bd:d2:
+                    ff:bc:84:69:27:13:24:18:c4:45:18:23:26:5e:18:
+                    14:ca:2e:88:87:62:a3:53:e6:21:b7:b8:85:7b:9a:
+                    85:bb:15:26:72:f8:b9:f7:6a:74:0f:49:3f:92:be:
+                    a9:05:b7:99:27:bf:bf:09:17:4b:99:4c:ad:11:10:
+                    7c:df:74:31:f6:8f:26:5f:aa:88:ae:38:57:c8:55:
+                    2d:d3:fb:d8:1b:51:99:be:25:1b:3a:ba:c0:7d:1b:
+                    ed:ce:d2:49:b9:cf:f3:c5:7d:89:90:81:d8:69:48:
+                    20:10:a3:f8:ef:92:51:18:32:8b:11:18:c0:3f:1b:
+                    85:56:ce:57:c9:f2:82:64:c6:df:02:09:2e:4a:11:
+                    2f:b1:27:6d:37:52:f0:f0:16:61:f1:67:8d:df:87:
+                    72:af:87:da:cf:fb:50:94:6e:d4:94:85:eb:8a:2c:
+                    ea:21:f5:96:4a:44:d5:e0:ce:6a:74:44:4d:d0:05:
+                    d3:87:15:ed:36:d0:a4:8b:66:55:70:93:ee:47:06:
+                    c1:7e:2e:a5:18:79:67:f3:28:85:f1:70:f7:0e:83:
+                    a4:7e:54:9e:5a:76:32:cb:65:1b:b8:cd:fb:c8:28:
+                    03:d2:54:91:d1:a7:c5:85:43:08:17:76:a5:e6:2f:
+                    67:08:d8:a1:a2:82:2d:0c:f8:c1:af:63:d4:50:77:
+                    6d:6b:46:4a:41:85:d5:90:5f:79:2d:c4:ec:d7:11:
+                    87:40:8a:e1:68:e2:64:f8:55:32:fb:6f:93:2c:da:
+                    77:d9:21:c1:17:e5:36:2c:4e:7e:90:7f:ac:94:2b:
+                    32:67:be:38:50:76:b8:ae:41:b9:d7:21:c5:09:4c:
+                    60:c8:a3:51:c4:34:9b:57:37:df:cb:c9:33:57:8b:
+                    eb:fb:76:9f:19:4d:c5:6a:1f:2a:45:ae:2b:ed:2f:
+                    8d:a7:a5:00:cb:04:fa:25:62:2e:74:48:1b:ca:2a:
+                    8c:ba:db:b6:7e:f6:bb:02:7c:a9:c3:db:58:78:a1:
+                    bf:f0:fe:1a:10:55:11:ce:e8:69:4e:96:65:c6:17:
+                    03:d6:07:68:8c:54:82:ae:1c:22:55:3f:f1:f4:09:
+                    97:28:c0:46:f7:4e:0b:25:1d:f7:07:d7:09:1d:3a:
+                    18:57:38:3b:e8:33:06:e7:8f:78:46:1e:5b:f5:06:
+                    b6:ec:b8:a6:0d:f1:ba:13:4b:d6:18:20:dd:69:33:
+                    4a:33:15:ae:b8:c8:98:8a:27:2c:93:bc:2d:fb:ee:
+                    33:bf:66:e6:4d:ba:b6:9b:06:55:60:97:4b:bc:44:
+                    cd:7e:f4:a1:d8:aa:2f:c0:02:28:21:16:62:78:db:
+                    08:54:f2:fc:f4:34:e3:c6:8f:1c:43:57:ce:90:1a:
+                    4b:dc:2e:3b:28:91:89:3f:7a:da:35:1d:8e:2c:ee:
+                    49:ec:f4:33:ad:c9:53:a8:8c:9f:04:53:3e:24:1c:
+                    52:c9:12:f9:62:57:a3:bc:ee:2c:eb:40:7c:20:23:
+                    70:2b:95:f9:73:17:8a:d1:c1:1c:69:a6:b7:38:9a:
+                    67:f7:70:1d:7a:5a:0c:40:cf:62:0f:85:3c:c2:02:
+                    4e:7e:b5:f6:c5:2a:29:84:b3:1f:37:2a:e1:aa:72:
+                    42:c4:ed:6b:1a:8f:92:1c:5d:be:d1:f2:5b:f2:ab:
+                    aa:a9:d2:f5:b8:a4:41:2b:2b:91:6e:12:48:ca:98:
+                    d8:37:8d:c8:ed:00:30:b5:b6:04:4e:7e:9c:da:84:
+                    ec:c0:fa:7b:e5:1d:88:a4:53:46:b0:94:e4:5c:1b:
+                    a1:25:2c:0f:48:52:77:97:09:6c:ec:5b:18:33:83:
+                    02:e5:82:7e:cd:85:21:30:11:fd:27:4f:cf:e4:1e:
+                    ec:3f:a5:57:6c:e9:2a:30:19:2a:88:e5:c3:69:38:
+                    ab:6f:39:71:7f:84:e1:41:c3:e1:cc:2a:89:20:52:
+                    2e:83:0f:6c:39:3f:4b:2d:16:ac:2d:f0:24:ac:00:
+                    73:f4:9b:b3:06:3f:05:b8:14:85:1f:ab:9e:5c:3c:
+                    9e:62:9d:0e:6d:3b:80:09:fc:02:ea:a2:97:74:ca:
+                    c7:f9:e3:56:e1:c3:ca:a5:a6:9a:c0:90:e0:24:12:
+                    53:d2:c2:8b:da:be:ed:02:43:5e:67:e1:89:98:79:
+                    ee:cb:aa:ca:c3:1b:dc:e7:a5:46:a5:7c:6b:16:87:
+                    b6:5a:28:d7:db:27:3c:5e:a5:bd:b6:51:dd:1f:43:
+                    cf:3b:26:c8:3a:8d:25:61:c1:49:f4:3c:1b:c9:44:
+                    ea:af:1c:c2:2b:94:01:2a:0e:30:d1:5b:8b:2b:47:
+                    e5:c3:d1:04:03:9b:0e:39:2c:d6:27:d4:e6:70:5a:
+                    d9:75:cf:2a:d8:c9:00:05:e4:13:88:ec:c3:39:fb:
+                    87:61:30:36:43:03:c8:9e:9c:a2:06:c2:2f:c5:fc:
+                    f0:80:63:b1:54:04:a0:4c:a9:2e:c6:f5:76:7a:d8:
+                    d0:e4:d4:94:11:e5:15:b5:78:06:dc:b8:80:8f:99:
+                    a9:20:33:3d:10:85:4c:65:09:ca:3e:58:5e:60:93:
+                    9a:aa:62:5d:c0:51:06:1c:5d:60:a0:0d:9c:4b:43:
+                    f6:a7:16:21:a4:87:aa:f2:c1:2e:ee:92:30:b8:9e:
+                    df:df:10:01:8b:86:09:70:d8:6c:a8:b7:50:1e:16:
+                    96:b4:f7:67:fd:35:3a:21:90:2a:32:c7:00:7b:4d:
+                    07:10:09:b9:2f:73:d8:18:7e:67:99:04:4f:06:fc:
+                    50:c7:85:9b:9d:40:9d:b3:96:37:fa:a5:dc:b2:72:
+                    4e:ef:4e:09:2c:fd:91:fd:4d:f7:bb:a6:a1:3e:ab:
+                    7b:a2:03:40:a6:a9:55:27:e2:fa:f9:19:ce:87:75:
+                    aa:f1:75:36:f3:f3:b8:91:f8:91:c3:8b:75:13:8e:
+                    4c:65:9a:16:39:6a:e5:34:e8:7a:96:59:7f:35:b0:
+                    00:fd:5b:69:fc:43:26:fa:f5:28:6e:fe:87:d9:7e:
+                    24:fb:b4:a0:82:6e:54:a2:ff:ae:bf:62:b4:f4:72:
+                    01:c2:cb:98:47:98:e1:4c:b5:17:80:80:ce:8f:a6:
+                    28:ee:1e:45:6a:fb:df:f1:1d:fc:5a:3b:d6:ea:f4:
+                    6c:1d:62:49:57:3b:8a:8f:86:ea:f0:53:04:ce:9c:
+                    16:68:ff:ba:b9:fc:88:0f:47:f7:02:44:72:40:b8:
+                    ca:3b:2d:53:9d:dc:3c:56:8c:59:7b:68:1a:2c:8d:
+                    71:bb:6c:00:c7:1a:ce:6f:40:92:b1:a3:2f:0f:d9:
+                    44:f2:a3:70:2e:9e:ee:0e:ae:32:d0:3b:3e:8b:07:
+                    ea:e6:79:b3:5c:29:e2:7d:6b:a8:5e:f9:5a:31:e8:
+                    08:96:a2:8c:03:98:46:f1:b8:7d:90:54:26:ed:76:
+                    62:fe:9e:e9:9a:6e:5e:c9:49:c7:5c:34:53:29:54:
+                    d9:ec:e4:46:e1:80:3b:75:d9:df:fb:79:d5:87:f1:
+                    ba:9e:eb:19:ce:4c:52:73:e6:5b:87:ae:25:4f:39:
+                    79:cc:c6:b8:f9:10:7b:ec:f0:9b:71:a4:05:a0:d3:
+                    29:d3:4e:7f:1f:f4:2d:28:78:cc:55:95:7b:1e:91:
+                    2f:cc:56:18:73:8b:b2:db:bc:69:07:e6:d0:d8:4f:
+                    ed:a2:ff:58:85:a3:6d:e0:4a:53:b7:67:7d:8d:0c:
+                    5c:5b:7b:77:28:02:35:44:7a:04:d3:28:43:c8:6b:
+                    30:17:5d:32:b8:29:35:ba:76:da:3b:14:4a:76:18:
+                    58:a4:f8:92:3c:9e:4d:33:6f:46:6b:08:d9:31:48:
+                    68:dd:f4:fb:24:56:34:b2:cf:69:66:be:48:d2:8a:
+                    66:22:cd:f2:69:cd:c2:53:13:45:29:41:22:d6:5d:
+                    98:1f:b6:a4:b2:a3:c2:ee:02:2f:51:1b:dc:83:a4:
+                    ec:70:25:a8:d4:08:61:32:6f:e4:a1:81:2e:7c:63:
+                    72:fa:29:65:bc:70:44:cf:5d
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        55:9a:34:6a:22:06:69:09:45:33:c7:ae:a9:5c:c7:09:4e:9b:
+        86:bc:41:90:d4:94:52:f6:cd:23:29:94:4b:22:cd:e8:bd:fe:
+        9d:cd:52:f2:bd:ed:ab:87:c9:ab:ab:46:04:b4:bd:a2:3f:22:
+        30:47:50:c0:4b:8c:76:0f:03:f5:92:d2:b1:2d:c4:7a:35:9c:
+        c9:73:87:eb:a6:9f:de:0f:73:8d:d3:7f:99:d8:ba:8f:6f:c4:
+        f3:be:1a:ae:8b:a2:94:36:90:e2:e5:eb:8d:05:f4:fc:65:df:
+        95:f1:c4:94:4d:17:56:d7:9f:3c:8f:50:3c:e7:77:bf:95:86:
+        26:64:fb:6a:ff:c6:da:e9:8c:ae:42:bb:69:e5:33:c6:d8:e9:
+        0d:c6:55:21:49:c1:0c:b4:a3:f9:9b:4b:5c:de:83:4f:41:03:
+        ce:2a:79:68:38:7d:f0:54:49:20:f5:b6:10:ff:08:dc:33:66:
+        96:9b:ff:06:de:00:9e:d7:ce:56:43:9a:51:fc:70:cd:f6:f0:
+        51:a3:b7:cd:b4:5c:85:62:cd:71:b7:c6:2b:23:2b:dd:c3:6e:
+        40:42:fa:37:ff:37:1c:f6:7a:57:94:87:85:23:d7:d4:c9:c7:
+        5f:c1:4d:2f:c9:0d:d7:5c:ec:9c:25:ee:9e:30:82:91:96:72:
+        b8:75:1d:f8:09:68:57:97:b2:2d:4b:ee:25:ec:7a:24:29:ee:
+        72:d4:9c:13:db:ab:dc:03:0a:d8:4a:14:c9:08:57:44:5d:a1:
+        b5:53:80:34:f2:14:97:cf:52:de:a2:0e:8a:10:e9:14:ef:d0:
+        60:be:61:a1:f1:25:5d:d5:18:73:3f:93:10:ca:96:ee:b3:40:
+        d2:db:a3:55:cf:57:5a:a5:0e:4f:75:47:df:ea:f7:90:9a:6d:
+        f5:70:2e:1d:14:1c:37:64:04:59:50:b0:dc:72:86:6f:9c:37:
+        3d:5d:28:af:73:55:ef:d2:ee:24:74:74:13:ef:dc:db:31:49:
+        fb:3f:63:f5:d3:08:3e:33:a5:e7:9d:0a:de:53:2c:51:8e:67:
+        db:9b:41:65:41:50:bd:d4:a4:96:6c:87:bc:12:e0:94:c7:d3:
+        c0:e4:cb:73:58:00:83:e1:ac:27:85:d6:9d:53:9d:5c:bd:0a:
+        3e:03:43:9c:0c:91:f5:6d:7b:f8:40:72:75:ab:11:76:91:2b:
+        e1:c6:aa:1f:70:69:76:70:15:09:fe:93:d0:d6:2d:b7:15:6a:
+        9b:67:5c:b4:69:9f:25:a6:7d:8a:fb:7d:22:a9:71:f2:ce:4e:
+        8c:b8:21:2d:de:fe:41:71:0d:ff:9d:ec:73:a6:bb:07:4f:88:
+        0e:58:47:2e:7e:a9:c2:c7:78:dd:ba:7a:9e:4e:e0:30:4e:63:
+        6f:85:d4:20:41:e9:fa:fe:43:45:e7:fb:af:7a:b2:ce:a4:05:
+        1d:22:9a:58:86:df:e4:ce:4c:a9:fe:d8:16:a5:6f:fb:d8:ce:
+        56:7b:f5:d6:20:ef:e4:47:cd:63:24:ff:b9:be:f1:48:a3:c1:
+        01:72:e6:bd:c0:ad:ed:26:0d:ca:34:9f:fc:02:2d:20:4f:05:
+        20:ae:21:3d:0c:c2:20:3c:3f:f0:04:84:dc:cf:89:fd:b9:25:
+        91:8e:d0:43:e6:b3:20:ab:5c:2d:d5:40:9e:a0:4b:d8:f4:b2:
+        cc:7d:f1:58:0a:8e:87:ed:88:ac:36:96:e4:56:a0:11:8a:f2:
+        9a:d0:b3:57:a3:34:bb:19:ab:38:e1:74:6b:22:c4:31:ce:01:
+        d5:1b:36:e3:1e:38:4c:33:93:df:40:e3:59:57:4e:ac:6e:7b:
+        1e:5a:3d:c5:1d:5b:ac:c8:10:82:35:02:22:b2:fc:75:e8:10:
+        91:8d:c4:7d:78:93:47:9e:1c:9d:ac:6b:62:02:58:8c:d6:1c:
+        23:d6:af:78:c2:80:9c:a4:aa:24:54:14:b5:14:98:c6:f8:2b:
+        1a:24:cb:71:32:0a:e2:9b:0e:69:6b:dd:7e:8c:64:d1:2e:63:
+        ef:0e:7f:b1:3e:88:4c:9d:55:e5:c9:6e:17:04:b7:41:ff:bd:
+        8a:41:cb:25:31:6f:44:77:3f:47:b1:fc:81:88:07:8e:05:49:
+        20:b7:11:d9:69:03:2a:03:9d:b9:33:84:9a:df:df:7a:e3:46:
+        73:a3:d8:a2:8c:53:19:88:55:4c:74:b8:f6:44:84:2b:d1:14:
+        2d:4e:39:2e:92:68:ff:69:fc:85:62:1b:eb:55:4f:ef:25:84:
+        62:45:99:d6:d8:4e:6f:3f:53:08:7d:1d:06:95:81:80:7f:4f:
+        4e:74:36:98:b5:e2:87:70:98:dc:d7:f5:dc:52:15:e6:c6:d6:
+        79:96:39:7f:8f:95:cf:ab:80:53:ad:1b:0b:45:40:0e:d4:18:
+        bd:2c:de:8a:77:76:fd:f2:44:47:c6:21:d0:e4:74:f0:d8:18:
+        05:c8:7c:30:72:c7:df:f1:bb:fc:02:30:a9:f4:42:26:59:0d:
+        93:05:82:a1:73:ed:34:e5:38:5d:cd:50:90:fe:94:fc:13:bc:
+        bd:fc:a8:a2:88:a7:73:c4:b2:a8:d1:5d:88:c4:02:a2:7a:f1:
+        04:c9:fe:8c:74:c9:ef:1d:64:41:9f:ac:1e:96:67:64:ac:ab:
+        28:41:c7:9d:f7:c0:98:1b:6e:07:c2:64:7d:5a:83:66:56:28:
+        36:9c:e7:fb:1c:77:0e:28:a0:c4:f7:6b:79:39:04:20:84:c7:
+        57:93:bc:1b:a0:ea:bc:eb:42:e5:a8:11:fe:fc:ac:65:cc:fd:
+        f8:28:88:f4:a5:9a:e5:73:51:e0:a8:9b:0d:03:77:4e:e5:e0:
+        98:b3:88:da:7d:e6:c6:9e:7c:14:66:c1:2e:53:4a:92:07:37:
+        a0:7e:e9:3d:09:e4:15:7c:cf:fd:b8:41:a5:ef:9e:66:9d:c4:
+        5e:07:1d:87:f8:41:ad:ea:e7:2f:d2:41:63:18:37:f9:14:e3:
+        4d:d0:e5:f7:43:fd:15:e3:f9:36:73:06:26:df:01:4f:a9:c3:
+        4e:de:20:46:77:98:b4:7a:24:2b:3b:75:2b:4e:58:8d:9b:5d:
+        a4:c7:16:a0:bc:32:88:3f:a1:83:f3:00:c8:f8:d8:58:e9:63:
+        5d:4c:2b:b5:f0:72:41:d8:ab:77:37:d6:72:74:ae:b6:36:9c:
+        c8:a6:83:49:4b:e0:c9:56:0b:29:be:00:30:cb:dd:d6:c8:42:
+        8a:00:d9:ec:15:d1:34:71:f2:5b:64:87:f6:27:d2:b7:eb:86:
+        b0:90:bf:29:db:21:9e:36:8c:e3:20:2f:95:23:51:6c:1b:c2:
+        a4:d5:e6:d8:02:43:67:a0:fe:9b:50:03:44:7f:bb:e4:72:d5:
+        d1:e4:da:8f:92:14:64:fb:5d:14:10:12:4a:95:06:c9:65:08:
+        29:ca:21:a3:26:38:11:c9:27:df:70:67:04:fd:ca:48:32:7f:
+        63:b2:45:74:31:50:4f:87:d9:20:70:d2:21:70:b1:d6:10:9d:
+        33:5d:78:83:91:6d:55:82:ec:da:e4:62:63:c7:81:46:d7:19:
+        65:72:2a:43:19:90:b8:d7:23:4d:4c:1c:e0:44:a9:66:67:ac:
+        ee:71:79:27:26:78:6d:72:0e:f5:5d:4b:23:b5:7c:7c:65:e9:
+        17:c6:3a:0b:0d:dd:5e:1e:51:c3:86:b8:ec:7f:c7:27:4a:a5:
+        46:e8:6a:2d:19:c1:87:a3:cb:99:93:87:64:a2:55:14:4c:b7:
+        43:a5:93:d7:e7:d2:4e:79:40:ca:65:99:46:3d:3f:7a:80:7a:
+        88:6a:cc:1e:e5:6b:33:46:f4:50:c0:d5:1f:09:b8:cd:8a:2e:
+        a1:27:eb:5d:73:a7:e8:6b:0a:e5:57:82:2a:b0:fc:e2:54:52:
+        56:f0:ab:a9:12:c6:23:96:07:24:9c:e0:bc:46:a5:b4:20:04:
+        da:09:93:63:e5:d4:2e:c2:7e:c5:31:ed:b5:15:74:86:17:b9:
+        b3:f3:26:8a:1d:02:6a:da:1a:3f:e8:ba:f1:04:6d:94:51:54:
+        e2:5a:b4:59:83:1d:60:d0:2d:73:cc:07:b5:26:8c:f9:d7:c6:
+        88:91:ef:80:cf:5d:0f:a1:60:cb:45:d4:42:22:d1:b1:70:1d:
+        fd:d0:b7:30:90:3a:c6:48:6d:67:e5:32:da:8f:db:e3:a8:e3:
+        1d:20:25:a2:1c:e1:4c:b9:a4:f6:c6:3f:5c:58:0d:bb:c6:b2:
+        77:01:16:91:9f:17:06:0d:b7:40:3e:cc:8f:8e:9c:4b:e0:9d:
+        7e:9b:1e:05:ab:88:22:fa:d3:28:1b:57:14:64:4a:3e:24:2c:
+        38:4d:21:69:00:73:2e:d0:55:2d:74:f2:15:e8:94:43:3e:40:
+        2a:c6:c6:b9:6a:5b:de:a2:cc:18:50:54:5d:4e:2a:85:6c:f6:
+        92:8b:29:19:7e:e7:ea:4a:e0:22:2b:25:bc:f7:66:cf:77:9a:
+        41:74:f2:3c:14:0d:74:69:f5:50:83:cd:cd:2f:21:db:22:46:
+        8a:d0:f7:51:1a:95:57:f2:05:8b:1a:19:ed:3b:45:e8:36:c2:
+        6e:7e:fb:57:22:00:1f:06:53:a9:ae:93:c6:8f:71:2a:31:45:
+        92:e7:8e:6d:e6:99:22:c0:83:fc:ef:dc:57:66:77:4f:a2:36:
+        31:fb:a1:13:8d:e5:ca:a3:95:7d:01:0c:64:70:3b:53:42:68:
+        80:c7:bb:9d:a8:00:35:69:98:0c:a8:67:d8:43:e5:aa:cf:95:
+        e0:51:95:a4:17:3f:42:9d:b8:04:ce:d3:79:79:c8:d3:8a:16:
+        32:92:e0:d7:a2:ee:d7:37:4c:2f:ac:b8:7b:be:45:f6:f1:18:
+        33:9c:7b:37:a6:24:d9:bc:40:ab:00:e9:c3:37:8b:ab:d8:b6:
+        f3:5e:81:4e:b0:14:6b:07:3e:1f:ec:c2:f6:44:22:95:bb:b3:
+        e6:6f:d6:f9:70:65:ba:0a:83:65:aa:0e:13:2f:83:13:23:53:
+        8b:40:16:fa:ce:2f:fc:4d:04:f8:eb:d8:ac:c5:36:c2:15:57:
+        48:38:ec:55:b3:b4:1e:ba:ad:d2:42:06:17:0d:73:c8:57:a6:
+        be:96:4d:a9:f2:c0:fb:7a:21:1c:f5:c9:70:a9:82:90:b5:f1:
+        0c:d4:79:10:be:81:a6:e9:5c:61:9c:77:79:9a:a4:c3:37:26:
+        57:37:c9:52:2c:fa:08:ff:d0:5f:c6:61:c0:f4:76:be:fc:de:
+        4e:cf:ab:51:99:71:c7:df:7e:f4:d6:cf:06:56:19:13:53:0b:
+        6d:74:59:48:19:9b:53:05:2d:9d:32:54:d3:e5:2c:53:8b:64:
+        3e:d4:64:7b:e3:80:09:14:cc:fe:16:46:63:6b:71:69:f8:f9:
+        cb:27:f6:88:54:bc:45:b3:ce:02:c8:94:ee:40:5b:f9:42:02:
+        c2:ff:b0:d8:2c:eb:28:7f:5e:c9:26:01:99:a7
+
+UPS Document Exchange by DST
+============================
+MD5 Fingerprint: 78:A5:FB:10:4B:E4:63:2E:D2:6B:FB:F2:B6:C2:4B:8E
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIID+DCCAuACEQDQHkCLAAACfAAAAAcAAAABMA0GCSqGSIb3DQEBBQUAMIG5MQsw
+CQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENp
+dHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjEeMBwGA1UE
+CxMVVW5pdGVkIFBhcmNlbCBTZXJ2aWNlMRkwFwYDVQQDExBEU1QgKFVQUykgUm9v
+dENBMSEwHwYJKoZIhvcNAQkBFhJjYUBkaWdzaWd0cnVzdC5jb20wHhcNOTgxMjEw
+MDAyNTQ2WhcNMDgxMjA3MDAyNTQ2WjCBuTELMAkGA1UEBhMCdXMxDTALBgNVBAgT
+BFV0YWgxFzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR5MSQwIgYDVQQKExtEaWdpdGFs
+IFNpZ25hdHVyZSBUcnVzdCBDby4xHjAcBgNVBAsTFVVuaXRlZCBQYXJjZWwgU2Vy
+dmljZTEZMBcGA1UEAxMQRFNUIChVUFMpIFJvb3RDQTEhMB8GCSqGSIb3DQEJARYS
+Y2FAZGlnc2lndHJ1c3QuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
+AQEA7xfsrynm2SsnwNt7JJ9m9ASjwq0KyrDNhCuqN/OAoWDvQo/lXXdfV0JU3Svb
+YbJxXpN7b1/rJCvnpPLr8XOzC431Wdcy36yQjk4xuiVNtgym8eWvDOHlb1IDFcHf
+vn5KpqYYRnA/76dNqNz1dNlhekA8oZQo6sKUiMs3FQUZPJViuhwt+yiM0ciekjxb
+EVQ7eNlHO5stSuY+e2vf9PYFzyj2upg2AJ48N4UKnN63pIXFY/23YhRtFx7MioCF
+QjIRsCHinXfJgBZBnuvlFIl/t8O8T8Gfh5uW7GP2+ZBWDpWjIwqMZNqbuxx3sExd
+5sjo9X15LVckP8zjPSyYzxKfFwIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQC7OI4E
+IiZYDiFEVsy9WXwpaMtcD8iGVD+BeKetj8xG9xxUuHktW3IFaugh0OwdHf6kNFG+
+7u3OzJwWaOJddXMIQzGRahArEMJLafjJrZio/bjv9qvwXyHvy4VrCe0vSGa1YHLA
+6KDHmNsO9xtzjTQICnvFd2KqMCObsB6LgJhU3AWHs6liWfyLtxWarETszzUa9w8u
+XZJLAch77qA37eQdgg2ZQUMXrdTVyuP5fReiAdAwD0C53LkEgmmDtvkP+gaS96j0
+1hcc8F5/xCnI5uHi/zZoIVGu/6m6hJKtinsz2JDSwXltMzM5dKwbOHGfLAeQ6h3g
+04lfy+8UjSdUpb1G
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            d0:1e:40:8b:00:00:02:7c:00:00:00:07:00:00:00:01
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=United Parcel Service, CN=DST (UPS) RootCA/Email=ca@digsigtrust.com
+        Validity
+            Not Before: Dec 10 00:25:46 1998 GMT
+            Not After : Dec  7 00:25:46 2008 GMT
+        Subject: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=United Parcel Service, CN=DST (UPS) RootCA/Email=ca@digsigtrust.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:ef:17:ec:af:29:e6:d9:2b:27:c0:db:7b:24:9f:
+                    66:f4:04:a3:c2:ad:0a:ca:b0:cd:84:2b:aa:37:f3:
+                    80:a1:60:ef:42:8f:e5:5d:77:5f:57:42:54:dd:2b:
+                    db:61:b2:71:5e:93:7b:6f:5f:eb:24:2b:e7:a4:f2:
+                    eb:f1:73:b3:0b:8d:f5:59:d7:32:df:ac:90:8e:4e:
+                    31:ba:25:4d:b6:0c:a6:f1:e5:af:0c:e1:e5:6f:52:
+                    03:15:c1:df:be:7e:4a:a6:a6:18:46:70:3f:ef:a7:
+                    4d:a8:dc:f5:74:d9:61:7a:40:3c:a1:94:28:ea:c2:
+                    94:88:cb:37:15:05:19:3c:95:62:ba:1c:2d:fb:28:
+                    8c:d1:c8:9e:92:3c:5b:11:54:3b:78:d9:47:3b:9b:
+                    2d:4a:e6:3e:7b:6b:df:f4:f6:05:cf:28:f6:ba:98:
+                    36:00:9e:3c:37:85:0a:9c:de:b7:a4:85:c5:63:fd:
+                    b7:62:14:6d:17:1e:cc:8a:80:85:42:32:11:b0:21:
+                    e2:9d:77:c9:80:16:41:9e:eb:e5:14:89:7f:b7:c3:
+                    bc:4f:c1:9f:87:9b:96:ec:63:f6:f9:90:56:0e:95:
+                    a3:23:0a:8c:64:da:9b:bb:1c:77:b0:4c:5d:e6:c8:
+                    e8:f5:7d:79:2d:57:24:3f:cc:e3:3d:2c:98:cf:12:
+                    9f:17
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        bb:38:8e:04:22:26:58:0e:21:44:56:cc:bd:59:7c:29:68:cb:
+        5c:0f:c8:86:54:3f:81:78:a7:ad:8f:cc:46:f7:1c:54:b8:79:
+        2d:5b:72:05:6a:e8:21:d0:ec:1d:1d:fe:a4:34:51:be:ee:ed:
+        ce:cc:9c:16:68:e2:5d:75:73:08:43:31:91:6a:10:2b:10:c2:
+        4b:69:f8:c9:ad:98:a8:fd:b8:ef:f6:ab:f0:5f:21:ef:cb:85:
+        6b:09:ed:2f:48:66:b5:60:72:c0:e8:a0:c7:98:db:0e:f7:1b:
+        73:8d:34:08:0a:7b:c5:77:62:aa:30:23:9b:b0:1e:8b:80:98:
+        54:dc:05:87:b3:a9:62:59:fc:8b:b7:15:9a:ac:44:ec:cf:35:
+        1a:f7:0f:2e:5d:92:4b:01:c8:7b:ee:a0:37:ed:e4:1d:82:0d:
+        99:41:43:17:ad:d4:d5:ca:e3:f9:7d:17:a2:01:d0:30:0f:40:
+        b9:dc:b9:04:82:69:83:b6:f9:0f:fa:06:92:f7:a8:f4:d6:17:
+        1c:f0:5e:7f:c4:29:c8:e6:e1:e2:ff:36:68:21:51:ae:ff:a9:
+        ba:84:92:ad:8a:7b:33:d8:90:d2:c1:79:6d:33:33:39:74:ac:
+        1b:38:71:9f:2c:07:90:ea:1d:e0:d3:89:5f:cb:ef:14:8d:27:
+        54:a5:bd:46
+
+ValiCert Class 1 VA
+===================
+MD5 Fingerprint: 65:58:AB:15:AD:57:6C:1E:A8:A7:B5:69:AC:BF:FF:EB
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
+IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
+BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
+aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
+9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNTIyMjM0OFoXDTE5MDYy
+NTIyMjM0OFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
+azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
+YXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
+Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
+cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDYWYJ6ibiWuqYvaG9Y
+LqdUHAZu9OqNSLwxlBfw8068srg1knaw0KWlAdcAAxIiGQj4/xEjm84H9b9pGib+
+TunRf50sQB1ZaG6m+FiwnRqP0z/x3BkGgagO4DrdyFNFCQbmD3DD+kCmDuJWBQ8Y
+TfwggtFzVXSNdnKgHZ0dwN0/cQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFBoPUn0
+LBwGlN+VYH+Wexf+T3GtZMjdd9LvWVXoP+iOBSoh8gfStadS/pyxtuJbdxdA6nLW
+I8sogTLDAHkY7FkXicnGah5xyf23dKUlRWnFSKsZ4UWKJWsZ7uW7EvV/96aNUcPw
+nXS3qT6gpf+2SQMT2iLM7XGCK5nPOrf1LXLI
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 1 Policy Validation Authority, CN=http://www.valicert.com//Email=info@valicert.com
+        Validity
+            Not Before: Jun 25 22:23:48 1999 GMT
+            Not After : Jun 25 22:23:48 2019 GMT
+        Subject: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 1 Policy Validation Authority, CN=http://www.valicert.com//Email=info@valicert.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d8:59:82:7a:89:b8:96:ba:a6:2f:68:6f:58:2e:
+                    a7:54:1c:06:6e:f4:ea:8d:48:bc:31:94:17:f0:f3:
+                    4e:bc:b2:b8:35:92:76:b0:d0:a5:a5:01:d7:00:03:
+                    12:22:19:08:f8:ff:11:23:9b:ce:07:f5:bf:69:1a:
+                    26:fe:4e:e9:d1:7f:9d:2c:40:1d:59:68:6e:a6:f8:
+                    58:b0:9d:1a:8f:d3:3f:f1:dc:19:06:81:a8:0e:e0:
+                    3a:dd:c8:53:45:09:06:e6:0f:70:c3:fa:40:a6:0e:
+                    e2:56:05:0f:18:4d:fc:20:82:d1:73:55:74:8d:76:
+                    72:a0:1d:9d:1d:c0:dd:3f:71
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        50:68:3d:49:f4:2c:1c:06:94:df:95:60:7f:96:7b:17:fe:4f:
+        71:ad:64:c8:dd:77:d2:ef:59:55:e8:3f:e8:8e:05:2a:21:f2:
+        07:d2:b5:a7:52:fe:9c:b1:b6:e2:5b:77:17:40:ea:72:d6:23:
+        cb:28:81:32:c3:00:79:18:ec:59:17:89:c9:c6:6a:1e:71:c9:
+        fd:b7:74:a5:25:45:69:c5:48:ab:19:e1:45:8a:25:6b:19:ee:
+        e5:bb:12:f5:7f:f7:a6:8d:51:c3:f0:9d:74:b7:a9:3e:a0:a5:
+        ff:b6:49:03:13:da:22:cc:ed:71:82:2b:99:cf:3a:b7:f5:2d:
+        72:c8
+
+ValiCert Class 2 VA
+===================
+MD5 Fingerprint: A9:23:75:9B:BA:49:36:6E:31:C2:DB:F2:E7:66:BA:87
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
+IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
+BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
+aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
+9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMTk1NFoXDTE5MDYy
+NjAwMTk1NFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
+azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
+YXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
+Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
+cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDOOnHK5avIWZJV16vY
+dA757tn2VUdZZUcOBVXc65g2PFxTXdMwzzjsvUGJ7SVCCSRrCl6zfN1SLUzm1NZ9
+WlmpZdRJEy0kTRxQb7XBhVQ7/nHk01xC+YDgkRoKWzk2Z/M/VXwbP7RfZHM047QS
+v4dk+NoS/zcnwbNDu+97bi5p9wIDAQABMA0GCSqGSIb3DQEBBQUAA4GBADt/UG9v
+UJSZSWI4OB9L+KXIPqeCgfYrx+jFzug6EILLGACOTb2oWH+heQC1u+mNr0HZDzTu
+IYEZoDJJKPTEjlbVUjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMMj4QssxsodyamEwC
+W/POuZ6lcg5Ktz885hZo+L7tdEy8W9ViH0Pd
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 2 Policy Validation Authority, CN=http://www.valicert.com//Email=info@valicert.com
+        Validity
+            Not Before: Jun 26 00:19:54 1999 GMT
+            Not After : Jun 26 00:19:54 2019 GMT
+        Subject: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 2 Policy Validation Authority, CN=http://www.valicert.com//Email=info@valicert.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:ce:3a:71:ca:e5:ab:c8:59:92:55:d7:ab:d8:74:
+                    0e:f9:ee:d9:f6:55:47:59:65:47:0e:05:55:dc:eb:
+                    98:36:3c:5c:53:5d:d3:30:cf:38:ec:bd:41:89:ed:
+                    25:42:09:24:6b:0a:5e:b3:7c:dd:52:2d:4c:e6:d4:
+                    d6:7d:5a:59:a9:65:d4:49:13:2d:24:4d:1c:50:6f:
+                    b5:c1:85:54:3b:fe:71:e4:d3:5c:42:f9:80:e0:91:
+                    1a:0a:5b:39:36:67:f3:3f:55:7c:1b:3f:b4:5f:64:
+                    73:34:e3:b4:12:bf:87:64:f8:da:12:ff:37:27:c1:
+                    b3:43:bb:ef:7b:6e:2e:69:f7
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        3b:7f:50:6f:6f:50:94:99:49:62:38:38:1f:4b:f8:a5:c8:3e:
+        a7:82:81:f6:2b:c7:e8:c5:ce:e8:3a:10:82:cb:18:00:8e:4d:
+        bd:a8:58:7f:a1:79:00:b5:bb:e9:8d:af:41:d9:0f:34:ee:21:
+        81:19:a0:32:49:28:f4:c4:8e:56:d5:52:33:fd:50:d5:7e:99:
+        6c:03:e4:c9:4c:fc:cb:6c:ab:66:b3:4a:21:8c:e5:b5:0c:32:
+        3e:10:b2:cc:6c:a1:dc:9a:98:4c:02:5b:f3:ce:b9:9e:a5:72:
+        0e:4a:b7:3f:3c:e6:16:68:f8:be:ed:74:4c:bc:5b:d5:62:1f:
+        43:dd
+
+ValiCert Class 3 VA
+===================
+MD5 Fingerprint: A2:6F:53:B7:EE:40:DB:4A:68:E7:FA:18:D9:10:4B:72
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
+IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
+BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
+aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
+9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMjIzM1oXDTE5MDYy
+NjAwMjIzM1owgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
+azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
+YXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
+Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
+cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDjmFGWHOjVsQaBalfD
+cnWTq8+epvzzFlLWLU2fNUSoLgRNB0mKOCn1dzfnt6td3zZxFJmP3MKS8edgkpfs
+2Ejcv8ECIMYkpChMMFp2bbFc893enhBxoYjHW5tBbcqwuI4V7q0zK89HBFx1cQqY
+JJgpp0lZpd34t0NiYfPT4tBVPwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFa7AliE
+Zwgs3x/be0kz9dNnnfS0ChCzycUs4pJqcXgn8nCDQtM+z6lU9PHYkhaM0QTLS6vJ
+n0WuPIqpsHEzXcjFV9+vqDWzf4mH6eglkrh/hXqu1rweN1gqZ8mRzyqBPu3GOd/A
+PhmcGcwTTYJBtYze4D1gCCAPRX5ron+jjBXu
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 3 Policy Validation Authority, CN=http://www.valicert.com//Email=info@valicert.com
+        Validity
+            Not Before: Jun 26 00:22:33 1999 GMT
+            Not After : Jun 26 00:22:33 2019 GMT
+        Subject: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 3 Policy Validation Authority, CN=http://www.valicert.com//Email=info@valicert.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:e3:98:51:96:1c:e8:d5:b1:06:81:6a:57:c3:72:
+                    75:93:ab:cf:9e:a6:fc:f3:16:52:d6:2d:4d:9f:35:
+                    44:a8:2e:04:4d:07:49:8a:38:29:f5:77:37:e7:b7:
+                    ab:5d:df:36:71:14:99:8f:dc:c2:92:f1:e7:60:92:
+                    97:ec:d8:48:dc:bf:c1:02:20:c6:24:a4:28:4c:30:
+                    5a:76:6d:b1:5c:f3:dd:de:9e:10:71:a1:88:c7:5b:
+                    9b:41:6d:ca:b0:b8:8e:15:ee:ad:33:2b:cf:47:04:
+                    5c:75:71:0a:98:24:98:29:a7:49:59:a5:dd:f8:b7:
+                    43:62:61:f3:d3:e2:d0:55:3f
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        56:bb:02:58:84:67:08:2c:df:1f:db:7b:49:33:f5:d3:67:9d:
+        f4:b4:0a:10:b3:c9:c5:2c:e2:92:6a:71:78:27:f2:70:83:42:
+        d3:3e:cf:a9:54:f4:f1:d8:92:16:8c:d1:04:cb:4b:ab:c9:9f:
+        45:ae:3c:8a:a9:b0:71:33:5d:c8:c5:57:df:af:a8:35:b3:7f:
+        89:87:e9:e8:25:92:b8:7f:85:7a:ae:d6:bc:1e:37:58:2a:67:
+        c9:91:cf:2a:81:3e:ed:c6:39:df:c0:3e:19:9c:19:cc:13:4d:
+        82:41:b5:8c:de:e0:3d:60:08:20:0f:45:7e:6b:a2:7f:a3:8c:
+        15:ee
+
+VeriSign Class 4 Primary CA
+===========================
+MD5 Fingerprint: 1B:D1:AD:17:8B:7F:22:13:24:F5:26:E2:5D:4E:B9:10
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICMTCCAZoCBQKmAAABMA0GCSqGSIb3DQEBAgUAMF8xCzAJBgNVBAYTAlVTMRcw
+FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgNCBQdWJsaWMg
+UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NjAxMjkwMDAwMDBa
+Fw05OTEyMzEyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2ln
+biwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgNCBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZp
+Y2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0LJ1
+9njQrlpQ9OlQqZ+M1++RlHDo0iSQdomF1t+s5gEXMoDwnZNHvJplnR+Xrr/phnVj
+IIm9gFidBAydqMEk6QvlMXi9/C0MN2qeeIDpRnX57aP7E3vIwUzSo+/1PLBij0pd
+O92VZ48TucE81qcmm+zDO3rZTbxtm+gVAePwR6kCAwEAATANBgkqhkiG9w0BAQIF
+AAOBgQBT3dPwnCR+QKri/AAa19oM/DJhuBUNlvP6Vxt/M3yv6ZiaYch6s7f/sdyZ
+g9ysEvxwyR84Qu1E9oAuW2szaayc01znX1oYx7EteQSWQZGZQbE8DbqEOcY7l/Am
+yY7uvcxClf8exwI/VAx49byqYHwCaejcrOICdmHEPgPq0ook0Q==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            02:a6:00:00:01
+        Signature Algorithm: md2WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 4 Public Primary Certification Authority
+        Validity
+            Not Before: Jan 29 00:00:00 1996 GMT
+            Not After : Dec 31 23:59:59 1999 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 4 Public Primary Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d0:b2:75:f6:78:d0:ae:5a:50:f4:e9:50:a9:9f:
+                    8c:d7:ef:91:94:70:e8:d2:24:90:76:89:85:d6:df:
+                    ac:e6:01:17:32:80:f0:9d:93:47:bc:9a:65:9d:1f:
+                    97:ae:bf:e9:86:75:63:20:89:bd:80:58:9d:04:0c:
+                    9d:a8:c1:24:e9:0b:e5:31:78:bd:fc:2d:0c:37:6a:
+                    9e:78:80:e9:46:75:f9:ed:a3:fb:13:7b:c8:c1:4c:
+                    d2:a3:ef:f5:3c:b0:62:8f:4a:5d:3b:dd:95:67:8f:
+                    13:b9:c1:3c:d6:a7:26:9b:ec:c3:3b:7a:d9:4d:bc:
+                    6d:9b:e8:15:01:e3:f0:47:a9
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md2WithRSAEncryption
+        53:dd:d3:f0:9c:24:7e:40:aa:e2:fc:00:1a:d7:da:0c:fc:32:
+        61:b8:15:0d:96:f3:fa:57:1b:7f:33:7c:af:e9:98:9a:61:c8:
+        7a:b3:b7:ff:b1:dc:99:83:dc:ac:12:fc:70:c9:1f:38:42:ed:
+        44:f6:80:2e:5b:6b:33:69:ac:9c:d3:5c:e7:5f:5a:18:c7:b1:
+        2d:79:04:96:41:91:99:41:b1:3c:0d:ba:84:39:c6:3b:97:f0:
+        26:c9:8e:ee:bd:cc:42:95:ff:1e:c7:02:3f:54:0c:78:f5:bc:
+        aa:60:7c:02:69:e8:dc:ac:e2:02:76:61:c4:3e:03:ea:d2:8a:
+        24:d1
+
+Verisign Class 1 Public Primary Certification Authority
+=======================================================
+MD5 Fingerprint: 97:60:E8:57:5F:D3:50:47:E5:43:0C:94:36:8A:B0:62
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICPTCCAaYCEQDNun9W8N/kvFT+IqyzcqpVMA0GCSqGSIb3DQEBAgUAMF8xCzAJ
+BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xh
+c3MgMSBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05
+NjAxMjkwMDAwMDBaFw0yODA4MDEyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYD
+VQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMSBQdWJsaWMgUHJp
+bWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOB
+jQAwgYkCgYEA5Rm/baNWYS2ZSHH2Z965jeu3noaACpEO+jglr0aIguVzqKCbJF0N
+H8xlbgyw0FaEGIeaBpsQoXPftFg5a27B9hXVqKg/qhIGjTGsf7A01480Z4gJzRQR
+4k5FVmkfeAKA2txHkSm7NsljXMXg1y2He6G3MrB7MLoqLzGq7qNn2tsCAwEAATAN
+BgkqhkiG9w0BAQIFAAOBgQBMP7iLxmjf7kMzDl3ppssHhE16M/+SG/Q2rdiVIjZo
+EWx8QszznC7EBz8UsA9P/5CSdvnivErpj82ggAr3xSnxgiJduLHdgSOjeyUVRjB5
+FvjqBUuUfx3CHMjjt/QQQDwTw18fU+hI5Ia0e6E1sHslurjTjqs/OJ0ANACY89Fx
+lA==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            cd:ba:7f:56:f0:df:e4:bc:54:fe:22:ac:b3:72:aa:55
+        Signature Algorithm: md2WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 1 Public Primary Certification Authority
+        Validity
+            Not Before: Jan 29 00:00:00 1996 GMT
+            Not After : Aug  1 23:59:59 2028 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 1 Public Primary Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:e5:19:bf:6d:a3:56:61:2d:99:48:71:f6:67:de:
+                    b9:8d:eb:b7:9e:86:80:0a:91:0e:fa:38:25:af:46:
+                    88:82:e5:73:a8:a0:9b:24:5d:0d:1f:cc:65:6e:0c:
+                    b0:d0:56:84:18:87:9a:06:9b:10:a1:73:df:b4:58:
+                    39:6b:6e:c1:f6:15:d5:a8:a8:3f:aa:12:06:8d:31:
+                    ac:7f:b0:34:d7:8f:34:67:88:09:cd:14:11:e2:4e:
+                    45:56:69:1f:78:02:80:da:dc:47:91:29:bb:36:c9:
+                    63:5c:c5:e0:d7:2d:87:7b:a1:b7:32:b0:7b:30:ba:
+                    2a:2f:31:aa:ee:a3:67:da:db
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md2WithRSAEncryption
+        4c:3f:b8:8b:c6:68:df:ee:43:33:0e:5d:e9:a6:cb:07:84:4d:
+        7a:33:ff:92:1b:f4:36:ad:d8:95:22:36:68:11:6c:7c:42:cc:
+        f3:9c:2e:c4:07:3f:14:b0:0f:4f:ff:90:92:76:f9:e2:bc:4a:
+        e9:8f:cd:a0:80:0a:f7:c5:29:f1:82:22:5d:b8:b1:dd:81:23:
+        a3:7b:25:15:46:30:79:16:f8:ea:05:4b:94:7f:1d:c2:1c:c8:
+        e3:b7:f4:10:40:3c:13:c3:5f:1f:53:e8:48:e4:86:b4:7b:a1:
+        35:b0:7b:25:ba:b8:d3:8e:ab:3f:38:9d:00:34:00:98:f3:d1:
+        71:94
+
+Verisign Class 1 Public Primary Certification Authority - G2
+============================================================
+MD5 Fingerprint: F2:7D:E9:54:E4:A3:22:0D:76:9F:E7:0B:BB:B3:24:2B
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDAjCCAmsCEDnKVIn+UCIy/jLZ2/sbhBkwDQYJKoZIhvcNAQEFBQAwgcExCzAJ
+BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh
+c3MgMSBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy
+MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp
+emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X
+DTk4MDUxODAwMDAwMFoXDTE4MDUxODIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw
+FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMSBQdWJsaWMg
+UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo
+YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5
+MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB
+AQUAA4GNADCBiQKBgQCq0Lq+Fi24g9TK0g+8djHKlNgdk4xWArzZbxpvUjZudVYK
+VdPfQ4chEWWKfo+9Id5rMj8bhDSVBZ1BNeuS65bdqlk/AVNtmU/t5eIqWpDBucSm
+Fc/IReumXY6cPvBkJHalzasab7bYe1FhbqZ/h8jit+U03EGI6glAvnOSPWvndQID
+AQABMA0GCSqGSIb3DQEBBQUAA4GBAIv3GhDOdlwHq4OZ3BeAbzQ5XZg+a3Is4cei
+e0ApuXiIukzFo2penm574/ICQQxmvq37rqIUzpLzojSLtLK2JPLl1eDI5WJthHvL
+vrsDi3xXyvA3qZCviu4Dvh0onNkmdqDNxJ1O8K4HFtW+r1cIatCgQkJCHvQgzKV4
+gpUmOIpH
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            39:ca:54:89:fe:50:22:32:fe:32:d9:db:fb:1b:84:19
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 1 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Validity
+            Not Before: May 18 00:00:00 1998 GMT
+            Not After : May 18 23:59:59 2018 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 1 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:aa:d0:ba:be:16:2d:b8:83:d4:ca:d2:0f:bc:76:
+                    31:ca:94:d8:1d:93:8c:56:02:bc:d9:6f:1a:6f:52:
+                    36:6e:75:56:0a:55:d3:df:43:87:21:11:65:8a:7e:
+                    8f:bd:21:de:6b:32:3f:1b:84:34:95:05:9d:41:35:
+                    eb:92:eb:96:dd:aa:59:3f:01:53:6d:99:4f:ed:e5:
+                    e2:2a:5a:90:c1:b9:c4:a6:15:cf:c8:45:eb:a6:5d:
+                    8e:9c:3e:f0:64:24:76:a5:cd:ab:1a:6f:b6:d8:7b:
+                    51:61:6e:a6:7f:87:c8:e2:b7:e5:34:dc:41:88:ea:
+                    09:40:be:73:92:3d:6b:e7:75
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        8b:f7:1a:10:ce:76:5c:07:ab:83:99:dc:17:80:6f:34:39:5d:
+        98:3e:6b:72:2c:e1:c7:a2:7b:40:29:b9:78:88:ba:4c:c5:a3:
+        6a:5e:9e:6e:7b:e3:f2:02:41:0c:66:be:ad:fb:ae:a2:14:ce:
+        92:f3:a2:34:8b:b4:b2:b6:24:f2:e5:d5:e0:c8:e5:62:6d:84:
+        7b:cb:be:bb:03:8b:7c:57:ca:f0:37:a9:90:af:8a:ee:03:be:
+        1d:28:9c:d9:26:76:a0:cd:c4:9d:4e:f0:ae:07:16:d5:be:af:
+        57:08:6a:d0:a0:42:42:42:1e:f4:20:cc:a5:78:82:95:26:38:
+        8a:47
+
+Verisign Class 1 Public Primary Certification Authority - G3
+============================================================
+MD5 Fingerprint: B1:47:BC:18:57:D1:18:A0:78:2D:EC:71:E8:2A:95:73
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEGjCCAwICEQCLW3VWhFSFCwDPrzhIzrGkMA0GCSqGSIb3DQEBBQUAMIHKMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl
+cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu
+LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT
+aWduIENsYXNzIDEgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
+dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD
+VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT
+aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ
+bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu
+IENsYXNzIDEgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
+LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN2E1Lm0+afY8wR4
+nN493GwTFtl63SRRZsDHJlkNrAYIwpTRMx/wgzUfbhvI3qpuFU5UJ+/EbRrsC+MO
+8ESlV8dAWB6jRx9x7GD2bZTIGDnt/kIYVt/kTEkQeE4BdjVjEjbdZrwBBDajVWjV
+ojYJrKshJlQGrT/KFOCsyq0GHZXi+J3x4GD/wn91K0zM2v6HmSHquv4+VNfSWXjb
+PG7PoBMAGrgnoeS+Z5bKoMWznN3JdZ7rMJpfo83ZrngZPyPpXNspva1VyBtUjGP2
+6KbqxzcSXKMpHgLZ2x87tNcPVkeBFQRKr4Mn0cVYiMHd9qqnoxjaaKptEVHhv2Vr
+n5Z20T0CAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAq2aN17O6x5q25lXQBfGfMY1a
+qtmqRiYPce2lrVNWYgFHKkTp/j90CxObufRNG7LRX7K20ohcs5/Ny9Sn2WCVhDr4
+wTcdYcrnsMXlkdpUpqwxga6X3s0IrLjAl4B/bnKk52kTlWUfxJM8/XmPBNQ+T+r3
+ns7NZ3xPZQL/kYVUc8f/NveGLezQXk//EZ9yBta4GvFMDSZl4kSAHsef493oCtrs
+pSCAaWihT37ha88HQfqDjrw43bAuEbFrskLMmrz5SCJ5ShkPshw+IHTZasO+8ih4
+E1Z5T21Q6huwtVexN2ZYI/PcD98Kh8TvhgXVOBRgmaNL3gaWcSzy27YfpO8/7g==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            8b:5b:75:56:84:54:85:0b:00:cf:af:38:48:ce:b1:a4
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 1 Public Primary Certification Authority - G3
+        Validity
+            Not Before: Oct  1 00:00:00 1999 GMT
+            Not After : Jul 16 23:59:59 2036 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 1 Public Primary Certification Authority - G3
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:dd:84:d4:b9:b4:f9:a7:d8:f3:04:78:9c:de:3d:
+                    dc:6c:13:16:d9:7a:dd:24:51:66:c0:c7:26:59:0d:
+                    ac:06:08:c2:94:d1:33:1f:f0:83:35:1f:6e:1b:c8:
+                    de:aa:6e:15:4e:54:27:ef:c4:6d:1a:ec:0b:e3:0e:
+                    f0:44:a5:57:c7:40:58:1e:a3:47:1f:71:ec:60:f6:
+                    6d:94:c8:18:39:ed:fe:42:18:56:df:e4:4c:49:10:
+                    78:4e:01:76:35:63:12:36:dd:66:bc:01:04:36:a3:
+                    55:68:d5:a2:36:09:ac:ab:21:26:54:06:ad:3f:ca:
+                    14:e0:ac:ca:ad:06:1d:95:e2:f8:9d:f1:e0:60:ff:
+                    c2:7f:75:2b:4c:cc:da:fe:87:99:21:ea:ba:fe:3e:
+                    54:d7:d2:59:78:db:3c:6e:cf:a0:13:00:1a:b8:27:
+                    a1:e4:be:67:96:ca:a0:c5:b3:9c:dd:c9:75:9e:eb:
+                    30:9a:5f:a3:cd:d9:ae:78:19:3f:23:e9:5c:db:29:
+                    bd:ad:55:c8:1b:54:8c:63:f6:e8:a6:ea:c7:37:12:
+                    5c:a3:29:1e:02:d9:db:1f:3b:b4:d7:0f:56:47:81:
+                    15:04:4a:af:83:27:d1:c5:58:88:c1:dd:f6:aa:a7:
+                    a3:18:da:68:aa:6d:11:51:e1:bf:65:6b:9f:96:76:
+                    d1:3d
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        ab:66:8d:d7:b3:ba:c7:9a:b6:e6:55:d0:05:f1:9f:31:8d:5a:
+        aa:d9:aa:46:26:0f:71:ed:a5:ad:53:56:62:01:47:2a:44:e9:
+        fe:3f:74:0b:13:9b:b9:f4:4d:1b:b2:d1:5f:b2:b6:d2:88:5c:
+        b3:9f:cd:cb:d4:a7:d9:60:95:84:3a:f8:c1:37:1d:61:ca:e7:
+        b0:c5:e5:91:da:54:a6:ac:31:81:ae:97:de:cd:08:ac:b8:c0:
+        97:80:7f:6e:72:a4:e7:69:13:95:65:1f:c4:93:3c:fd:79:8f:
+        04:d4:3e:4f:ea:f7:9e:ce:cd:67:7c:4f:65:02:ff:91:85:54:
+        73:c7:ff:36:f7:86:2d:ec:d0:5e:4f:ff:11:9f:72:06:d6:b8:
+        1a:f1:4c:0d:26:65:e2:44:80:1e:c7:9f:e3:dd:e8:0a:da:ec:
+        a5:20:80:69:68:a1:4f:7e:e1:6b:cf:07:41:fa:83:8e:bc:38:
+        dd:b0:2e:11:b1:6b:b2:42:cc:9a:bc:f9:48:22:79:4a:19:0f:
+        b2:1c:3e:20:74:d9:6a:c3:be:f2:28:78:13:56:79:4f:6d:50:
+        ea:1b:b0:b5:57:b1:37:66:58:23:f3:dc:0f:df:0a:87:c4:ef:
+        86:05:d5:38:14:60:99:a3:4b:de:06:96:71:2c:f2:db:b6:1f:
+        a4:ef:3f:ee
+
+Verisign Class 2 Public Primary Certification Authority
+=======================================================
+MD5 Fingerprint: B3:9C:25:B1:C3:2E:32:53:80:15:30:9D:4D:02:77:3E
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICPDCCAaUCEC0b/EoXjaOR6+f/9YtFvgswDQYJKoZIhvcNAQECBQAwXzELMAkG
+A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
+cyAyIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
+MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
+BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAyIFB1YmxpYyBQcmlt
+YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
+ADCBiQKBgQC2WoujDWojg4BrzzmH9CETMwZMJaLtVRKXxaeAufqDwSCg+i8VDXyh
+YGt+eSz6Bg86rvYbb7HS/y8oUl+DfUvEerf4Zh+AVPy3wo5ZShRXRtGak75BkQO7
+FYCTXOvnzAhsPz6zSvz/S2wj1VCCJkQZjiPDceoZJEcEnnW/yKYAHwIDAQABMA0G
+CSqGSIb3DQEBAgUAA4GBAIobK/o5wXTXXtgZZKJYSi034DNHD6zt96rbHuSLBlxg
+J8pFUs4W7z8GZOeUaHxgMxURaa+dYo2jA1Rrpr7l7gUYYAS/QoD90KioHgE796Nc
+r6Pc5iaAIzy4RHT3Cq5Ji2F4zCS/iIqnDupzGUH9TQPwiNHleI2lKk/2lw0Xd8rY
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            2d:1b:fc:4a:17:8d:a3:91:eb:e7:ff:f5:8b:45:be:0b
+        Signature Algorithm: md2WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 2 Public Primary Certification Authority
+        Validity
+            Not Before: Jan 29 00:00:00 1996 GMT
+            Not After : Aug  1 23:59:59 2028 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 2 Public Primary Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b6:5a:8b:a3:0d:6a:23:83:80:6b:cf:39:87:f4:
+                    21:13:33:06:4c:25:a2:ed:55:12:97:c5:a7:80:b9:
+                    fa:83:c1:20:a0:fa:2f:15:0d:7c:a1:60:6b:7e:79:
+                    2c:fa:06:0f:3a:ae:f6:1b:6f:b1:d2:ff:2f:28:52:
+                    5f:83:7d:4b:c4:7a:b7:f8:66:1f:80:54:fc:b7:c2:
+                    8e:59:4a:14:57:46:d1:9a:93:be:41:91:03:bb:15:
+                    80:93:5c:eb:e7:cc:08:6c:3f:3e:b3:4a:fc:ff:4b:
+                    6c:23:d5:50:82:26:44:19:8e:23:c3:71:ea:19:24:
+                    47:04:9e:75:bf:c8:a6:00:1f
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md2WithRSAEncryption
+        8a:1b:2b:fa:39:c1:74:d7:5e:d8:19:64:a2:58:4a:2d:37:e0:
+        33:47:0f:ac:ed:f7:aa:db:1e:e4:8b:06:5c:60:27:ca:45:52:
+        ce:16:ef:3f:06:64:e7:94:68:7c:60:33:15:11:69:af:9d:62:
+        8d:a3:03:54:6b:a6:be:e5:ee:05:18:60:04:bf:42:80:fd:d0:
+        a8:a8:1e:01:3b:f7:a3:5c:af:a3:dc:e6:26:80:23:3c:b8:44:
+        74:f7:0a:ae:49:8b:61:78:cc:24:bf:88:8a:a7:0e:ea:73:19:
+        41:fd:4d:03:f0:88:d1:e5:78:8d:a5:2a:4f:f6:97:0d:17:77:
+        ca:d8
+
+Verisign Class 2 Public Primary Certification Authority - G2
+============================================================
+MD5 Fingerprint: 2D:BB:E5:25:D3:D1:65:82:3A:B7:0E:FA:E6:EB:E2:E1
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDAzCCAmwCEQC5L2DMiJ+hekYJuFtwbIqvMA0GCSqGSIb3DQEBBQUAMIHBMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xPDA6BgNVBAsTM0Ns
+YXNzIDIgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBH
+MjE6MDgGA1UECxMxKGMpIDE5OTggVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0aG9y
+aXplZCB1c2Ugb25seTEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazAe
+Fw05ODA1MTgwMDAwMDBaFw0yODA4MDEyMzU5NTlaMIHBMQswCQYDVQQGEwJVUzEX
+MBUGA1UEChMOVmVyaVNpZ24sIEluYy4xPDA6BgNVBAsTM0NsYXNzIDIgUHVibGlj
+IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjE6MDgGA1UECxMx
+KGMpIDE5OTggVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25s
+eTEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazCBnzANBgkqhkiG9w0B
+AQEFAAOBjQAwgYkCgYEAp4gBIXQs5xoD8JjhlzwPIQjxnNuX6Zr8wgQGE75fUsjM
+HiwSViy4AWkszJkfrbCWrnkE8hM5wXuYuggs6MKEEyyqaekJ9MepAqRCwiNPStjw
+DqL7MWzJ5m+ZJwf15vRMeJ5t60aG+rmGyVTyssSv1EYcWskVMP8NbPUtDm3Of3cC
+AwEAATANBgkqhkiG9w0BAQUFAAOBgQByLvl/0fFx+8Se9sVeUYpAmLho+Jscg9ji
+nb3/7aHmZuovCfTK1+qlK5X2JGCGTUQug6XELaDTrnhpb3LabK4I8GOSN+a7xDAX
+rXfMSTWqz9iP0b63GJZHc2pUIjRkLbYWm1lbtFFZOrMLFPQS32eg9K0yZF6xRnIn
+jBJ7xUS0rg==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            b9:2f:60:cc:88:9f:a1:7a:46:09:b8:5b:70:6c:8a:af
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 2 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Validity
+            Not Before: May 18 00:00:00 1998 GMT
+            Not After : Aug  1 23:59:59 2028 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 2 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:a7:88:01:21:74:2c:e7:1a:03:f0:98:e1:97:3c:
+                    0f:21:08:f1:9c:db:97:e9:9a:fc:c2:04:06:13:be:
+                    5f:52:c8:cc:1e:2c:12:56:2c:b8:01:69:2c:cc:99:
+                    1f:ad:b0:96:ae:79:04:f2:13:39:c1:7b:98:ba:08:
+                    2c:e8:c2:84:13:2c:aa:69:e9:09:f4:c7:a9:02:a4:
+                    42:c2:23:4f:4a:d8:f0:0e:a2:fb:31:6c:c9:e6:6f:
+                    99:27:07:f5:e6:f4:4c:78:9e:6d:eb:46:86:fa:b9:
+                    86:c9:54:f2:b2:c4:af:d4:46:1c:5a:c9:15:30:ff:
+                    0d:6c:f5:2d:0e:6d:ce:7f:77
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        72:2e:f9:7f:d1:f1:71:fb:c4:9e:f6:c5:5e:51:8a:40:98:b8:
+        68:f8:9b:1c:83:d8:e2:9d:bd:ff:ed:a1:e6:66:ea:2f:09:f4:
+        ca:d7:ea:a5:2b:95:f6:24:60:86:4d:44:2e:83:a5:c4:2d:a0:
+        d3:ae:78:69:6f:72:da:6c:ae:08:f0:63:92:37:e6:bb:c4:30:
+        17:ad:77:cc:49:35:aa:cf:d8:8f:d1:be:b7:18:96:47:73:6a:
+        54:22:34:64:2d:b6:16:9b:59:5b:b4:51:59:3a:b3:0b:14:f4:
+        12:df:67:a0:f4:ad:32:64:5e:b1:46:72:27:8c:12:7b:c5:44:
+        b4:ae
+
+Verisign Class 2 Public Primary Certification Authority - G3
+============================================================
+MD5 Fingerprint: F8:BE:C4:63:22:C9:A8:46:74:8B:B8:1D:1E:4A:2B:F6
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEGTCCAwECEGFwy0mMX5hFKeewptlQW3owDQYJKoZIhvcNAQEFBQAwgcoxCzAJ
+BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVy
+aVNpZ24gVHJ1c3QgTmV0d29yazE6MDgGA1UECxMxKGMpIDE5OTkgVmVyaVNpZ24s
+IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTFFMEMGA1UEAxM8VmVyaVNp
+Z24gQ2xhc3MgMiBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0
+eSAtIEczMB4XDTk5MTAwMTAwMDAwMFoXDTM2MDcxNjIzNTk1OVowgcoxCzAJBgNV
+BAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVyaVNp
+Z24gVHJ1c3QgTmV0d29yazE6MDgGA1UECxMxKGMpIDE5OTkgVmVyaVNpZ24sIElu
+Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTFFMEMGA1UEAxM8VmVyaVNpZ24g
+Q2xhc3MgMiBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAt
+IEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArwoNwtUs22e5LeWU
+J92lvuCwTY+zYVY81nzD9M0+hsuiiOLh2KRpxbXiv8GmR1BeRjmL1Za6tW8UvxDO
+JxOeBUebMXoT2B/Z0wI3i60sR/COgQanDTAM6/c8DyAd3HJG7qUCyFvDyVZpTMUY
+wZF7C9UTAJu878NIPkZgIIUq1ZC2zYugzDLdt/1AVbJQHFauzI13TccgTacxdu9o
+koqQHgiBVrKtaaNS0MscxCM9H5n+TOgWY47GCI72MfbS+uV23bUckqNJzc0BzWjN
+qWm6o+sdDZykIKbBoMXRRkwXbdKsZj+WjOCE1Db/IlnF+RFgqF8EffIa9iVCYQ/E
+Srg+iQIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQA0JhU8wI1NQ0kdvekhktdmnLfe
+xbjQ5F1fdiLAJvmEOjr5jLX77GDx6M4EsMjdpwOPMPOY36TmpDHf0xwLRtxyID+u
+7gU8pDM/CzmscHhzS5kr3zDCVLCoO1Wh/hYozUK9dG6A2ydEp85EXdQbkJgNHkKU
+sQAsBNB0owIFImNjzYO1+8FtYmtpdf1dcEG59b98377BMnMiIYtYgXsVkXq642RI
+sH/7NiXaldDxJBQX3RiAa0YjOVT1jmIJBB2UkKab5iXiQkWquJCtvgiPqQtCGJTP
+cjnhsUPgKM+351psE2tJs//jGHyJizNdrDPXp/naOlXJWBD5qu9ats9LS98q
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            61:70:cb:49:8c:5f:98:45:29:e7:b0:a6:d9:50:5b:7a
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 2 Public Primary Certification Authority - G3
+        Validity
+            Not Before: Oct  1 00:00:00 1999 GMT
+            Not After : Jul 16 23:59:59 2036 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 2 Public Primary Certification Authority - G3
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:af:0a:0d:c2:d5:2c:db:67:b9:2d:e5:94:27:dd:
+                    a5:be:e0:b0:4d:8f:b3:61:56:3c:d6:7c:c3:f4:cd:
+                    3e:86:cb:a2:88:e2:e1:d8:a4:69:c5:b5:e2:bf:c1:
+                    a6:47:50:5e:46:39:8b:d5:96:ba:b5:6f:14:bf:10:
+                    ce:27:13:9e:05:47:9b:31:7a:13:d8:1f:d9:d3:02:
+                    37:8b:ad:2c:47:f0:8e:81:06:a7:0d:30:0c:eb:f7:
+                    3c:0f:20:1d:dc:72:46:ee:a5:02:c8:5b:c3:c9:56:
+                    69:4c:c5:18:c1:91:7b:0b:d5:13:00:9b:bc:ef:c3:
+                    48:3e:46:60:20:85:2a:d5:90:b6:cd:8b:a0:cc:32:
+                    dd:b7:fd:40:55:b2:50:1c:56:ae:cc:8d:77:4d:c7:
+                    20:4d:a7:31:76:ef:68:92:8a:90:1e:08:81:56:b2:
+                    ad:69:a3:52:d0:cb:1c:c4:23:3d:1f:99:fe:4c:e8:
+                    16:63:8e:c6:08:8e:f6:31:f6:d2:fa:e5:76:dd:b5:
+                    1c:92:a3:49:cd:cd:01:cd:68:cd:a9:69:ba:a3:eb:
+                    1d:0d:9c:a4:20:a6:c1:a0:c5:d1:46:4c:17:6d:d2:
+                    ac:66:3f:96:8c:e0:84:d4:36:ff:22:59:c5:f9:11:
+                    60:a8:5f:04:7d:f2:1a:f6:25:42:61:0f:c4:4a:b8:
+                    3e:89
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        34:26:15:3c:c0:8d:4d:43:49:1d:bd:e9:21:92:d7:66:9c:b7:
+        de:c5:b8:d0:e4:5d:5f:76:22:c0:26:f9:84:3a:3a:f9:8c:b5:
+        fb:ec:60:f1:e8:ce:04:b0:c8:dd:a7:03:8f:30:f3:98:df:a4:
+        e6:a4:31:df:d3:1c:0b:46:dc:72:20:3f:ae:ee:05:3c:a4:33:
+        3f:0b:39:ac:70:78:73:4b:99:2b:df:30:c2:54:b0:a8:3b:55:
+        a1:fe:16:28:cd:42:bd:74:6e:80:db:27:44:a7:ce:44:5d:d4:
+        1b:90:98:0d:1e:42:94:b1:00:2c:04:d0:74:a3:02:05:22:63:
+        63:cd:83:b5:fb:c1:6d:62:6b:69:75:fd:5d:70:41:b9:f5:bf:
+        7c:df:be:c1:32:73:22:21:8b:58:81:7b:15:91:7a:ba:e3:64:
+        48:b0:7f:fb:36:25:da:95:d0:f1:24:14:17:dd:18:80:6b:46:
+        23:39:54:f5:8e:62:09:04:1d:94:90:a6:9b:e6:25:e2:42:45:
+        aa:b8:90:ad:be:08:8f:a9:0b:42:18:94:cf:72:39:e1:b1:43:
+        e0:28:cf:b7:e7:5a:6c:13:6b:49:b3:ff:e3:18:7c:89:8b:33:
+        5d:ac:33:d7:a7:f9:da:3a:55:c9:58:10:f9:aa:ef:5a:b6:cf:
+        4b:4b:df:2a
+
+Verisign Class 3 Public Primary Certification Authority
+=======================================================
+MD5 Fingerprint: 10:FC:63:5D:F6:26:3E:0D:F3:25:BE:5F:79:CD:67:67
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG
+A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
+cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
+MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
+BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt
+YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
+ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE
+BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is
+I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G
+CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do
+lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc
+AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            70:ba:e4:1d:10:d9:29:34:b6:38:ca:7b:03:cc:ba:bf
+        Signature Algorithm: md2WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority
+        Validity
+            Not Before: Jan 29 00:00:00 1996 GMT
+            Not After : Aug  1 23:59:59 2028 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:c9:5c:59:9e:f2:1b:8a:01:14:b4:10:df:04:40:
+                    db:e3:57:af:6a:45:40:8f:84:0c:0b:d1:33:d9:d9:
+                    11:cf:ee:02:58:1f:25:f7:2a:a8:44:05:aa:ec:03:
+                    1f:78:7f:9e:93:b9:9a:00:aa:23:7d:d6:ac:85:a2:
+                    63:45:c7:72:27:cc:f4:4c:c6:75:71:d2:39:ef:4f:
+                    42:f0:75:df:0a:90:c6:8e:20:6f:98:0f:f8:ac:23:
+                    5f:70:29:36:a4:c9:86:e7:b1:9a:20:cb:53:a5:85:
+                    e7:3d:be:7d:9a:fe:24:45:33:dc:76:15:ed:0f:a2:
+                    71:64:4c:65:2e:81:68:45:a7
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md2WithRSAEncryption
+        bb:4c:12:2b:cf:2c:26:00:4f:14:13:dd:a6:fb:fc:0a:11:84:
+        8c:f3:28:1c:67:92:2f:7c:b6:c5:fa:df:f0:e8:95:bc:1d:8f:
+        6c:2c:a8:51:cc:73:d8:a4:c0:53:f0:4e:d6:26:c0:76:01:57:
+        81:92:5e:21:f1:d1:b1:ff:e7:d0:21:58:cd:69:17:e3:44:1c:
+        9c:19:44:39:89:5c:dc:9c:00:0f:56:8d:02:99:ed:a2:90:45:
+        4c:e4:bb:10:a4:3d:f0:32:03:0e:f1:ce:f8:e8:c9:51:8c:e6:
+        62:9f:e6:9f:c0:7d:b7:72:9c:c9:36:3a:6b:9f:4e:a8:ff:64:
+        0d:64
+
+Verisign Class 3 Public Primary Certification Authority - G2
+============================================================
+MD5 Fingerprint: A2:33:9B:4C:74:78:73:D4:6C:E7:C1:F3:8D:CB:5C:E9
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJ
+BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh
+c3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy
+MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp
+emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X
+DTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw
+FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMg
+UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo
+YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5
+MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB
+AQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCOFoUgRm1HP9SFIIThbbP4
+pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71lSk8UOg0
+13gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwID
+AQABMA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSk
+U01UbSuvDV1Ai2TT1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7i
+F6YM40AIOw7n60RzKprxaZLvcRTDOaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpY
+oJ2daZH9
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            7d:d9:fe:07:cf:a8:1e:b7:10:79:67:fb:a7:89:34:c6
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Validity
+            Not Before: May 18 00:00:00 1998 GMT
+            Not After : Aug  1 23:59:59 2028 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:cc:5e:d1:11:5d:5c:69:d0:ab:d3:b9:6a:4c:99:
+                    1f:59:98:30:8e:16:85:20:46:6d:47:3f:d4:85:20:
+                    84:e1:6d:b3:f8:a4:ed:0c:f1:17:0f:3b:f9:a7:f9:
+                    25:d7:c1:cf:84:63:f2:7c:63:cf:a2:47:f2:c6:5b:
+                    33:8e:64:40:04:68:c1:80:b9:64:1c:45:77:c7:d8:
+                    6e:f5:95:29:3c:50:e8:34:d7:78:1f:a8:ba:6d:43:
+                    91:95:8f:45:57:5e:7e:c5:fb:ca:a4:04:eb:ea:97:
+                    37:54:30:6f:bb:01:47:32:33:cd:dc:57:9b:64:69:
+                    61:f8:9b:1d:1c:89:4f:5c:67
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        51:4d:cd:be:5c:cb:98:19:9c:15:b2:01:39:78:2e:4d:0f:67:
+        70:70:99:c6:10:5a:94:a4:53:4d:54:6d:2b:af:0d:5d:40:8b:
+        64:d3:d7:ee:de:56:61:92:5f:a6:c4:1d:10:61:36:d3:2c:27:
+        3c:e8:29:09:b9:11:64:74:cc:b5:73:9f:1c:48:a9:bc:61:01:
+        ee:e2:17:a6:0c:e3:40:08:3b:0e:e7:eb:44:73:2a:9a:f1:69:
+        92:ef:71:14:c3:39:ac:71:a7:91:09:6f:e4:71:06:b3:ba:59:
+        57:26:79:00:f6:f8:0d:a2:33:30:28:d4:aa:58:a0:9d:9d:69:
+        91:fd
+
+Verisign Class 3 Public Primary Certification Authority - G3
+============================================================
+MD5 Fingerprint: CD:68:B6:A7:C7:C4:CE:75:E0:1D:4F:57:44:61:92:09
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl
+cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu
+LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT
+aWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
+dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD
+VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT
+aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ
+bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu
+IENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
+LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMu6nFL8eB8aHm8b
+N3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1EUGO+i2t
+KmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGu
+kxUccLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBm
+CC+Vk7+qRy+oRpfwEuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJ
+Xwzw3sJ2zq/3avL6QaaiMxTJ5Xpj055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWu
+imi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAERSWwauSCPc/L8my/uRan2Te
+2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5fj267Cz3qWhMe
+DGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC
+/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565p
+F4ErWjfJXir0xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGt
+TxzhT5yvDwyd93gN2PQ1VoDat20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            9b:7e:06:49:a3:3e:62:b9:d5:ee:90:48:71:29:ef:57
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 3 Public Primary Certification Authority - G3
+        Validity
+            Not Before: Oct  1 00:00:00 1999 GMT
+            Not After : Jul 16 23:59:59 2036 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 3 Public Primary Certification Authority - G3
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:cb:ba:9c:52:fc:78:1f:1a:1e:6f:1b:37:73:bd:
+                    f8:c9:6b:94:12:30:4f:f0:36:47:f5:d0:91:0a:f5:
+                    17:c8:a5:61:c1:16:40:4d:fb:8a:61:90:e5:76:20:
+                    c1:11:06:7d:ab:2c:6e:a6:f5:11:41:8e:fa:2d:ad:
+                    2a:61:59:a4:67:26:4c:d0:e8:bc:52:5b:70:20:04:
+                    58:d1:7a:c9:a4:69:bc:83:17:64:ad:05:8b:bc:d0:
+                    58:ce:8d:8c:f5:eb:f0:42:49:0b:9d:97:27:67:32:
+                    6e:e1:ae:93:15:1c:70:bc:20:4d:2f:18:de:92:88:
+                    e8:6c:85:57:11:1a:e9:7e:e3:26:11:54:a2:45:96:
+                    55:83:ca:30:89:e8:dc:d8:a3:ed:2a:80:3f:7f:79:
+                    65:57:3e:15:20:66:08:2f:95:93:bf:aa:47:2f:a8:
+                    46:97:f0:12:e2:fe:c2:0a:2b:51:e6:76:e6:b7:46:
+                    b7:e2:0d:a6:cc:a8:c3:4c:59:55:89:e6:e8:53:5c:
+                    1c:ea:9d:f0:62:16:0b:a7:c9:5f:0c:f0:de:c2:76:
+                    ce:af:f7:6a:f2:fa:41:a6:a2:33:14:c9:e5:7a:63:
+                    d3:9e:62:37:d5:85:65:9e:0e:e6:53:24:74:1b:5e:
+                    1d:12:53:5b:c7:2c:e7:83:49:3b:15:ae:8a:68:b9:
+                    57:97
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        11:14:96:c1:ab:92:08:f7:3f:2f:c9:b2:fe:e4:5a:9f:64:de:
+        db:21:4f:86:99:34:76:36:57:dd:d0:15:2f:c5:ad:7f:15:1f:
+        37:62:73:3e:d4:e7:5f:ce:17:03:db:35:fa:2b:db:ae:60:09:
+        5f:1e:5f:8f:6e:bb:0b:3d:ea:5a:13:1e:0c:60:6f:b5:c0:b5:
+        23:22:2e:07:0b:cb:a9:74:cb:47:bb:1d:c1:d7:a5:6b:cc:2f:
+        d2:42:fd:49:dd:a7:89:cf:53:ba:da:00:5a:28:bf:82:df:f8:
+        ba:13:1d:50:86:82:fd:8e:30:8f:29:46:b0:1e:3d:35:da:38:
+        62:16:18:4a:ad:e6:b6:51:6c:de:af:62:eb:01:d0:1e:24:fe:
+        7a:8f:12:1a:12:68:b8:fb:66:99:14:14:45:5c:ae:e7:ae:69:
+        17:81:2b:5a:37:c9:5e:2a:f4:c6:e2:a1:5c:54:9b:a6:54:00:
+        cf:f0:f1:c1:c7:98:30:1a:3b:36:16:db:a3:6e:ea:fd:ad:b2:
+        c2:da:ef:02:47:13:8a:c0:f1:b3:31:ad:4f:1c:e1:4f:9c:af:
+        0f:0c:9d:f7:78:0d:d8:f4:35:56:80:da:b7:6d:17:8f:9d:1e:
+        81:64:e1:fe:c5:45:ba:ad:6b:b9:0a:7a:4e:4f:4b:84:ee:4b:
+        f1:7d:dd:11
+
+Verisign Class 4 Public Primary Certification Authority - G2
+============================================================
+MD5 Fingerprint: 26:6D:2C:19:98:B6:70:68:38:50:54:19:EC:90:34:60
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDAjCCAmsCEDKIjprS9esTR/h/xCA3JfgwDQYJKoZIhvcNAQEFBQAwgcExCzAJ
+BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh
+c3MgNCBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy
+MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp
+emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X
+DTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw
+FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgNCBQdWJsaWMg
+UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo
+YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5
+MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB
+AQUAA4GNADCBiQKBgQC68OTP+cSuhVS5B1f5j8V/aBH4xBewRNzjMHPVKmIquNDM
+HO0oW369atyzkSTKQWI8/AIBvxwWMZQFl3Zuoq29YRdsTjCG8FE3KlDHqGKB3FtK
+qsGgtG7rL+VXxbErQHDbWk2hjh+9Ax/YA9SPTJlxvOKCzFjomDqG04Y48wApHwID
+AQABMA0GCSqGSIb3DQEBBQUAA4GBAIWMEsGnuVAVess+rLhDityq3RS6iYF+ATwj
+cSGIL4LcY/oCRaxFWdcqWERbt5+BO5JoPeI3JPV7bI92NZYJqFmduc4jq3TWg/0y
+cyfYaT5DdPauxYma51N86Xv2S/PBZYPejYqcPIiNOVn8qj8ijaHBZlCBckztImRP
+T8qAkbYp
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            32:88:8e:9a:d2:f5:eb:13:47:f8:7f:c4:20:37:25:f8
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 4 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Validity
+            Not Before: May 18 00:00:00 1998 GMT
+            Not After : Aug  1 23:59:59 2028 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 4 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:ba:f0:e4:cf:f9:c4:ae:85:54:b9:07:57:f9:8f:
+                    c5:7f:68:11:f8:c4:17:b0:44:dc:e3:30:73:d5:2a:
+                    62:2a:b8:d0:cc:1c:ed:28:5b:7e:bd:6a:dc:b3:91:
+                    24:ca:41:62:3c:fc:02:01:bf:1c:16:31:94:05:97:
+                    76:6e:a2:ad:bd:61:17:6c:4e:30:86:f0:51:37:2a:
+                    50:c7:a8:62:81:dc:5b:4a:aa:c1:a0:b4:6e:eb:2f:
+                    e5:57:c5:b1:2b:40:70:db:5a:4d:a1:8e:1f:bd:03:
+                    1f:d8:03:d4:8f:4c:99:71:bc:e2:82:cc:58:e8:98:
+                    3a:86:d3:86:38:f3:00:29:1f
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        85:8c:12:c1:a7:b9:50:15:7a:cb:3e:ac:b8:43:8a:dc:aa:dd:
+        14:ba:89:81:7e:01:3c:23:71:21:88:2f:82:dc:63:fa:02:45:
+        ac:45:59:d7:2a:58:44:5b:b7:9f:81:3b:92:68:3d:e2:37:24:
+        f5:7b:6c:8f:76:35:96:09:a8:59:9d:b9:ce:23:ab:74:d6:83:
+        fd:32:73:27:d8:69:3e:43:74:f6:ae:c5:89:9a:e7:53:7c:e9:
+        7b:f6:4b:f3:c1:65:83:de:8d:8a:9c:3c:88:8d:39:59:fc:aa:
+        3f:22:8d:a1:c1:66:50:81:72:4c:ed:22:64:4f:4f:ca:80:91:
+        b6:29
+
+Verisign Class 4 Public Primary Certification Authority - G3
+============================================================
+MD5 Fingerprint: DB:C8:F2:27:2E:B1:EA:6A:29:23:5D:FE:56:3E:33:DF
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl
+cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu
+LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT
+aWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
+dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD
+VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT
+aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ
+bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu
+IENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
+LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK3LpRFpxlmr8Y+1
+GQ9Wzsy1HyDkniYlS+BzZYlZ3tCD5PUPtbut8XzoIfzk6AzufEUiGXaStBO3IFsJ
++mGuqPKljYXCKtbeZjbSmwL0qJJgfJxptI8kHtCGUvYynEFYHiK9zUVilQhu0Gbd
+U6LM8BDcVHOLBKFGMzNcF0C5nk3T875Vg+ixiY5afJqWIpA7iCXy0lOIAgwLePLm
+NxdLMEYH5IBtptiWLugs+BGzOA1mppvqySNb247i8xOOGlktqgLw7KSHZtzBP/XY
+ufTsgsbSPZUd5cBPhMnZo0QoBmrXRazwa2rvTl/4EYIeOGM0ZlDUPpNz+jDDZq3/
+ky2X7wMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAj/ola09b5KROJ1WrIhVZPMq1
+CtRK26vdoV9TxaBXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXttmhwwjIDLk5Mq
+g6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKm
+fjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c
+2NU8Qh0XwRJdRTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/
+bLvSHgCwIe34QWKCudiyxLtGUPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            ec:a0:a7:8b:6e:75:6a:01:cf:c4:7c:cc:2f:94:5e:d7
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 4 Public Primary Certification Authority - G3
+        Validity
+            Not Before: Oct  1 00:00:00 1999 GMT
+            Not After : Jul 16 23:59:59 2036 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 4 Public Primary Certification Authority - G3
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:ad:cb:a5:11:69:c6:59:ab:f1:8f:b5:19:0f:56:
+                    ce:cc:b5:1f:20:e4:9e:26:25:4b:e0:73:65:89:59:
+                    de:d0:83:e4:f5:0f:b5:bb:ad:f1:7c:e8:21:fc:e4:
+                    e8:0c:ee:7c:45:22:19:76:92:b4:13:b7:20:5b:09:
+                    fa:61:ae:a8:f2:a5:8d:85:c2:2a:d6:de:66:36:d2:
+                    9b:02:f4:a8:92:60:7c:9c:69:b4:8f:24:1e:d0:86:
+                    52:f6:32:9c:41:58:1e:22:bd:cd:45:62:95:08:6e:
+                    d0:66:dd:53:a2:cc:f0:10:dc:54:73:8b:04:a1:46:
+                    33:33:5c:17:40:b9:9e:4d:d3:f3:be:55:83:e8:b1:
+                    89:8e:5a:7c:9a:96:22:90:3b:88:25:f2:d2:53:88:
+                    02:0c:0b:78:f2:e6:37:17:4b:30:46:07:e4:80:6d:
+                    a6:d8:96:2e:e8:2c:f8:11:b3:38:0d:66:a6:9b:ea:
+                    c9:23:5b:db:8e:e2:f3:13:8e:1a:59:2d:aa:02:f0:
+                    ec:a4:87:66:dc:c1:3f:f5:d8:b9:f4:ec:82:c6:d2:
+                    3d:95:1d:e5:c0:4f:84:c9:d9:a3:44:28:06:6a:d7:
+                    45:ac:f0:6b:6a:ef:4e:5f:f8:11:82:1e:38:63:34:
+                    66:50:d4:3e:93:73:fa:30:c3:66:ad:ff:93:2d:97:
+                    ef:03
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        8f:fa:25:6b:4f:5b:e4:a4:4e:27:55:ab:22:15:59:3c:ca:b5:
+        0a:d4:4a:db:ab:dd:a1:5f:53:c5:a0:57:39:c2:ce:47:2b:be:
+        3a:c8:56:bf:c2:d9:27:10:3a:b1:05:3c:c0:77:31:bb:3a:d3:
+        05:7b:6d:9a:1c:30:8c:80:cb:93:93:2a:83:ab:05:51:82:02:
+        00:11:67:6b:f3:88:61:47:5f:03:93:d5:5b:0d:e0:f1:d4:a1:
+        32:35:85:b2:3a:db:b0:82:ab:d1:cb:0a:bc:4f:8c:5b:c5:4b:
+        00:3b:1f:2a:82:a6:7e:36:85:dc:7e:3c:67:00:b5:e4:3b:52:
+        e0:a8:eb:5d:15:f9:c6:6d:f0:ad:1d:0e:85:b7:a9:9a:73:14:
+        5a:5b:8f:41:28:c0:d5:e8:2d:4d:a4:5e:cd:aa:d9:ed:ce:dc:
+        d8:d5:3c:42:1d:17:c1:12:5d:45:38:c3:38:f3:fc:85:2e:83:
+        46:48:b2:d7:20:5f:92:36:8f:e7:79:0f:98:5e:99:e8:f0:d0:
+        a4:bb:f5:53:bd:2a:ce:59:b0:af:6e:7f:6c:bb:d2:1e:00:b0:
+        21:ed:f8:41:62:82:b9:d8:b2:c4:bb:46:50:f3:31:c5:8f:01:
+        a8:74:eb:f5:78:27:da:e7:f7:66:43:f3:9e:83:3e:20:aa:c3:
+        35:60:91:ce
+
+Verisign/RSA Commercial CA
+==========================
+MD5 Fingerprint: 5A:0B:DD:42:9E:B2:B4:62:97:32:7F:7F:0A:AA:9A:39
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICIzCCAZACBQJBAAAWMA0GCSqGSIb3DQEBAgUAMFwxCzAJBgNVBAYTAlVTMSAw
+HgYDVQQKExdSU0EgRGF0YSBTZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVy
+Y2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NDExMDQxODU4MzRaFw05
+OTExMDMxODU4MzRaMFwxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdSU0EgRGF0YSBT
+ZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVyY2lhbCBDZXJ0aWZpY2F0aW9u
+IEF1dGhvcml0eTCBmzANBgkqhkiG9w0BAQEFAAOBiQAwgYUCfgCk+4Fie84QJ93o
+975sbsZwmdu41QUDaSiCnHJ/lj+O7Kwpkj+KFPhCdr69XQO5kNTQvAayUTNfxMK/
+touPmbZiImDd298ggrTKoi8tUO2UMt7gVY3UaOLgTNLNBRYulWZcYVI4HlGogqHE
+7yXpCuaLK44xZtn42f29O2nZ6wIDAQABMA0GCSqGSIb3DQEBAgUAA34AdrW2EP4j
+9/dZYkuwX5zBaLxJu7NJbyFHXSudVMQAKD+YufKKg5tgf+tQx6sFEC097TgCwaVI
+0v5loMC86qYjFmZsGySp8+x5NRhPJsjjr1BKx6cxa9B8GJ1Qv6km+iYrRpwUqbtb
+MJhCKLVLU7tDCZJAuqiqWqTGtotXTcU=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            02:41:00:00:16
+        Signature Algorithm: md2WithRSAEncryption
+        Issuer: C=US, O=RSA Data Security, Inc., OU=Commercial Certification Authority
+        Validity
+            Not Before: Nov  4 18:58:34 1994 GMT
+            Not After : Nov  3 18:58:34 1999 GMT
+        Subject: C=US, O=RSA Data Security, Inc., OU=Commercial Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1000 bit)
+                Modulus (1000 bit):
+                    00:a4:fb:81:62:7b:ce:10:27:dd:e8:f7:be:6c:6e:
+                    c6:70:99:db:b8:d5:05:03:69:28:82:9c:72:7f:96:
+                    3f:8e:ec:ac:29:92:3f:8a:14:f8:42:76:be:bd:5d:
+                    03:b9:90:d4:d0:bc:06:b2:51:33:5f:c4:c2:bf:b6:
+                    8b:8f:99:b6:62:22:60:dd:db:df:20:82:b4:ca:a2:
+                    2f:2d:50:ed:94:32:de:e0:55:8d:d4:68:e2:e0:4c:
+                    d2:cd:05:16:2e:95:66:5c:61:52:38:1e:51:a8:82:
+                    a1:c4:ef:25:e9:0a:e6:8b:2b:8e:31:66:d9:f8:d9:
+                    fd:bd:3b:69:d9:eb
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md2WithRSAEncryption
+        76:b5:b6:10:fe:23:f7:f7:59:62:4b:b0:5f:9c:c1:68:bc:49:
+        bb:b3:49:6f:21:47:5d:2b:9d:54:c4:00:28:3f:98:b9:f2:8a:
+        83:9b:60:7f:eb:50:c7:ab:05:10:2d:3d:ed:38:02:c1:a5:48:
+        d2:fe:65:a0:c0:bc:ea:a6:23:16:66:6c:1b:24:a9:f3:ec:79:
+        35:18:4f:26:c8:e3:af:50:4a:c7:a7:31:6b:d0:7c:18:9d:50:
+        bf:a9:26:fa:26:2b:46:9c:14:a9:bb:5b:30:98:42:28:b5:4b:
+        53:bb:43:09:92:40:ba:a8:aa:5a:a4:c6:b6:8b:57:4d:c5
+
+Verisign/RSA Secure Server CA
+=============================
+MD5 Fingerprint: 74:7B:82:03:43:F0:00:9E:6B:B3:EC:47:BF:85:A5:93
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICNDCCAaECEAKtZn5ORf5eV288mBle3cAwDQYJKoZIhvcNAQECBQAwXzELMAkG
+A1UEBhMCVVMxIDAeBgNVBAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYD
+VQQLEyVTZWN1cmUgU2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk0
+MTEwOTAwMDAwMFoXDTEwMDEwNzIzNTk1OVowXzELMAkGA1UEBhMCVVMxIDAeBgNV
+BAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYDVQQLEyVTZWN1cmUgU2Vy
+dmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGbMA0GCSqGSIb3DQEBAQUAA4GJ
+ADCBhQJ+AJLOesGugz5aqomDV6wlAXYMra6OLDfO6zV4ZFQD5YRAUcm/jwjiioII
+0haGN1XpsSECrXZogZoFokvJSyVmIlZsiAeP94FZbYQHZXATcXY+m3dM41CJVphI
+uR2nKRoTLkoRWZweFdVJVCxzOmmCsZc5nG1wZ0jl3S3WyB57AgMBAAEwDQYJKoZI
+hvcNAQECBQADfgBl3X7hsuyw4jrg7HFGmhkRuNPHoLQDQCYCPgmc4RKz0Vr2N6W3
+YQO2WxZpO8ZECAyIUwxrl0nHPjXcbLm7qt9cuzovk2C2qUtN8iD3zV9/ZHuO3ABc
+1/p3yjkWWW8O6tO1g39NTUJWdrTJXwT4OPjr0l91X817/OWOgHz8UA==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            02:ad:66:7e:4e:45:fe:5e:57:6f:3c:98:19:5e:dd:c0
+        Signature Algorithm: md2WithRSAEncryption
+        Issuer: C=US, O=RSA Data Security, Inc., OU=Secure Server Certification Authority
+        Validity
+            Not Before: Nov  9 00:00:00 1994 GMT
+            Not After : Jan  7 23:59:59 2010 GMT
+        Subject: C=US, O=RSA Data Security, Inc., OU=Secure Server Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1000 bit)
+                Modulus (1000 bit):
+                    00:92:ce:7a:c1:ae:83:3e:5a:aa:89:83:57:ac:25:
+                    01:76:0c:ad:ae:8e:2c:37:ce:eb:35:78:64:54:03:
+                    e5:84:40:51:c9:bf:8f:08:e2:8a:82:08:d2:16:86:
+                    37:55:e9:b1:21:02:ad:76:68:81:9a:05:a2:4b:c9:
+                    4b:25:66:22:56:6c:88:07:8f:f7:81:59:6d:84:07:
+                    65:70:13:71:76:3e:9b:77:4c:e3:50:89:56:98:48:
+                    b9:1d:a7:29:1a:13:2e:4a:11:59:9c:1e:15:d5:49:
+                    54:2c:73:3a:69:82:b1:97:39:9c:6d:70:67:48:e5:
+                    dd:2d:d6:c8:1e:7b
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md2WithRSAEncryption
+        65:dd:7e:e1:b2:ec:b0:e2:3a:e0:ec:71:46:9a:19:11:b8:d3:
+        c7:a0:b4:03:40:26:02:3e:09:9c:e1:12:b3:d1:5a:f6:37:a5:
+        b7:61:03:b6:5b:16:69:3b:c6:44:08:0c:88:53:0c:6b:97:49:
+        c7:3e:35:dc:6c:b9:bb:aa:df:5c:bb:3a:2f:93:60:b6:a9:4b:
+        4d:f2:20:f7:cd:5f:7f:64:7b:8e:dc:00:5c:d7:fa:77:ca:39:
+        16:59:6f:0e:ea:d3:b5:83:7f:4d:4d:42:56:76:b4:c9:5f:04:
+        f8:38:f8:eb:d2:5f:75:5f:cd:7b:fc:e5:8e:80:7c:fc:50
diff --git a/uddi2/example1.cpp b/uddi2/example1.cpp
new file mode 100644
index 0000000..6a351cd
--- /dev/null
+++ b/uddi2/example1.cpp
@@ -0,0 +1,86 @@
+/*
+
+example1.cpp
+
+Example UDDI V2 Client
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2004-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "inqH.h"
+
+int main(int argc, char **argv)
+{ 
+  char *search_string = "magic";
+
+  if (argc > 1)
+    search_string = argv[1];
+
+  // Create a gSOAP context
+  struct soap *soap = soap_new();
+
+  // Create an object to find a business
+  uddi2__find_USCOREservice fs(soap, search_string);
+
+  // Send the request
+  uddi2__serviceList *sl = fs.send("http://uddi.xmethods.net/inquire");
+
+  // Check if result is OK
+  if (!sl)
+    soap_print_fault(soap, stderr);
+
+  // If OK, report the service name(s) and unique identification keys
+  else if (sl->serviceInfos)
+  {
+    std::cout << "Search results on " << search_string << ":" << std::endl << std::endl;
+
+    for (std::vector<uddi2__serviceInfo*>::const_iterator si = sl->serviceInfos->serviceInfo.begin(); si != sl->serviceInfos->serviceInfo.end(); ++si)
+    {
+      // Report serviceKey and businessKey
+      std::cout << "serviceKey=" << (*si)->serviceKey << std::endl << "businessKey=" << (*si)->businessKey << std::endl;
+
+      // Report names
+      for (std::vector<uddi2__name*>::const_iterator n = (*si)->name.begin(); n != (*si)->name.end(); ++n)
+        std::cout << "name=" << (*n)->__item << std::endl;
+
+      std::cout << std::endl;
+    }
+  }
+
+  // Remove deserialized objects
+  soap_destroy(soap);
+
+  // Remove temporary data
+  soap_end(soap);
+
+  // Detach and free context
+  soap_done(soap);
+  free(soap);
+
+  return 0;
+}
diff --git a/uddi2/example2.cpp b/uddi2/example2.cpp
new file mode 100644
index 0000000..5b0b5af
--- /dev/null
+++ b/uddi2/example2.cpp
@@ -0,0 +1,86 @@
+/*
+
+example2.cpp
+
+Example UDDI V2 Client
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2004-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "inqH.h"
+
+int main(int argc, char **argv)
+{ 
+  char *search_string = "xmethods";
+
+  if (argc > 1)
+    search_string = argv[1];
+
+  // Create a gSOAP context
+  struct soap *soap = soap_new();
+
+  // Create an object to find a business
+  uddi2__find_USCOREbusiness fb(soap, search_string);
+
+  // Send the request
+  uddi2__businessList *bl = fb.send("http://uddi.xmethods.net/inquire");
+
+  // Check if result is OK
+  if (!bl)
+    soap_print_fault(soap, stderr);
+
+  // If OK, report the business name(s) and unique identification keys
+  else if (bl->businessInfos)
+  {
+    std::cout << "Search results on " << search_string << ":" << std::endl << std::endl;
+
+    for (std::vector<uddi2__businessInfo*>::const_iterator bi = bl->businessInfos->businessInfo.begin(); bi != bl->businessInfos->businessInfo.end(); ++bi)
+    {
+      // Report businessKey
+      std::cout << "businessKey=" << (*bi)->businessKey << std::endl;
+
+      // Report names
+      for (std::vector<uddi2__name*>::const_iterator n = (*bi)->name.begin(); n != (*bi)->name.end(); ++n)
+        std::cout << "name=" << (*n)->__item << std::endl;
+
+      std::cout << std::endl;
+    }
+  }
+
+  // Remove deserialized objects
+  soap_destroy(soap);
+
+  // Remove temporary data
+  soap_end(soap);
+
+  // Detach and free context
+  soap_done(soap);
+  free(soap);
+
+  return 0;
+}
diff --git a/uddi2/example3.cpp b/uddi2/example3.cpp
new file mode 100644
index 0000000..c56267f
--- /dev/null
+++ b/uddi2/example3.cpp
@@ -0,0 +1,178 @@
+/*
+
+example3.cpp
+
+Example UDDI V2 Client
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2004-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "pubH.h"
+
+const char *server = "https://uddi.xmethods.net/publish";
+
+const char *userid = "..."; // user ID to access UDDI server
+const char *passwd = "..."; // password to access UDDI server
+
+int main(int argc, char **argv)
+{ 
+  // Create a gSOAP context
+  struct soap *soap = soap_new();
+
+  // Setup SSL context (optional) to verify server's credentials
+  if (soap_ssl_client_context(soap, SOAP_SSL_DEFAULT, NULL, NULL, "cacerts.pem", NULL, NULL))
+  { 
+    soap_print_fault(soap, stderr);
+    exit(1);
+  }
+
+  // Step 1: Get an authorization token from the UDDI server
+  uddi2__get_USCOREauthToken get_authToken(soap, userid, passwd);
+  uddi2__authToken *authToken = get_authToken.send(server);
+
+  // Check if authorized
+  if (!authToken)
+  {
+    soap_print_fault(soap, stderr);
+    exit(1);
+  }
+
+  // Authorization info provided by server for this session
+  char *authInfo = authToken->authInfo;
+
+  // Step 2: Create a tModel for the WSDL to be published
+  uddi2__tModel tModel;
+  tModel.soap_default(soap);
+
+  // Create the tModel and service name
+  tModel.name = soap_new_uddi2__name(soap, -1);
+  tModel.name->__item = "...";
+  tModel.name->xml__lang_ = "en";
+
+  // Create XMethods description elements (see http://www.xmethods.net/ve2/UDDI.po)
+  uddi2__description *description = soap_new_uddi2__description(soap, 6);
+  description[0].__item = "SHORT DESCRIPTION: ...";
+  description[0].xml__lang_ = "en";
+  description[1].__item = "SHORT DESCRIPTION: ...";
+  description[1].xml__lang_ = "en";
+  description[2].__item = "USAGE NOTES: ...";
+  description[2].xml__lang_ = "en";
+  description[3].__item = "HOMEPAGE URL: ...";
+  description[3].xml__lang_ = "en";
+  description[4].__item = "CONTACT EMAIL: ...";
+  description[4].xml__lang_ = "en";
+  description[5].__item = "IMPLEMENTATION: ...";
+  description[5].xml__lang_ = "en";
+
+  // Add the four description elements to the tModel
+  tModel.description.push_back(description + 0);
+  tModel.description.push_back(description + 1);
+  tModel.description.push_back(description + 2);
+  tModel.description.push_back(description + 4);
+
+  // Add an overviewDoc element with description and overviewURL
+  tModel.overviewDoc = soap_new_uddi2__overviewDoc(soap, -1);
+  tModel.overviewDoc->soap_default(soap);
+  tModel.overviewDoc->description.push_back(soap_new_uddi2__description(soap, -1));
+  tModel.overviewDoc->description[0]->__item = "WSDL source document";
+  tModel.overviewDoc->description[0]->xml__lang_ = "en";
+  tModel.overviewDoc->overviewURL = "http://.../my.wsdl#bindingName";
+
+  // Omit identifier bag
+  tModel.identifierBag = NULL;
+
+  // Add a category with a WSDL-specific keyedReference
+  tModel.categoryBag = soap_new_uddi2__categoryBag(soap, -1);
+  tModel.categoryBag->soap_default(soap);
+  tModel.categoryBag->keyedReference.push_back(soap_new_uddi2__keyedReference(soap, -1));
+  tModel.categoryBag->keyedReference[0]->tModelKey = "...";
+  tModel.categoryBag->keyedReference[0]->keyName = "uddi-org:types";
+  tModel.categoryBag->keyedReference[0]->keyValue = "wsdlSpec";
+
+  tModel.authorizedName = "...";
+  tModel.operator_ = "...";
+  tModel.tModelKey = "...";
+
+  // Save the tModel
+  uddi2__save_USCOREtModel save_tModel(soap, tModel);
+  uddi2__tModelDetail *tModelDetail = save_tModel.send(server, authInfo);
+
+  // Step 3: Create a new service to be published
+  uddi2__businessService service;
+  service.soap_default(soap);
+
+  // Service name is the tModel name (XMethods)
+  service.name.push_back(tModel.name);
+
+  // Add two description elements to the service
+  service.description.push_back(description + 4);
+  service.description.push_back(description + 5);
+
+  // Create binding template
+  uddi2__bindingTemplate bindingTemplate;
+  bindingTemplate.soap_default(soap);
+  bindingTemplate.tModelInstanceDetails = soap_new_uddi2__tModelInstanceDetails(soap, -1);
+  bindingTemplate.tModelInstanceDetails->tModelInstanceInfo.push_back(soap_new_uddi2__tModelInstanceInfo(soap, -1));
+  bindingTemplate.tModelInstanceDetails->tModelInstanceInfo[0]->instanceDetails = NULL;
+  bindingTemplate.tModelInstanceDetails->tModelInstanceInfo[0]->tModelKey = tModel.tModelKey;
+  bindingTemplate.accessPoint = soap_new_uddi2__accessPoint(soap, -1);
+  bindingTemplate.accessPoint->__item = "...";
+  bindingTemplate.accessPoint->URLType = uddi2__URLType__http;
+  bindingTemplate.hostingRedirector = NULL;
+  bindingTemplate.serviceKey = "...";
+  bindingTemplate.bindingKey = "...";
+
+  // Add binding Template to service
+  service.bindingTemplates = soap_new_uddi2__bindingTemplates(soap, -1);
+  service.bindingTemplates->soap_default(soap);
+  service.bindingTemplates->bindingTemplate.push_back(&bindingTemplate);
+
+  service.categoryBag = NULL;
+  service.serviceKey = "...";
+  service.businessKey = "...";
+
+  // Save the service
+  uddi2__save_USCOREservice save_service(soap, service);
+  uddi2__serviceDetail *serviceDetail = save_service.send(server, authInfo);
+
+  // Step 4: Discard authorization token
+  uddi2__discard_USCOREauthToken discard_authToken(soap, authInfo);
+  uddi2__dispositionReport *dispositionReport = discard_authToken.send(server);
+
+  // Remove deserialized objects
+  soap_destroy(soap);
+
+  // Remove temporary data
+  soap_end(soap);
+
+  // Detach and free context
+  soap_done(soap);
+  free(soap);
+
+  return 0;
+}
diff --git a/uddi2/inquire_v2.cpp b/uddi2/inquire_v2.cpp
new file mode 100644
index 0000000..c505953
--- /dev/null
+++ b/uddi2/inquire_v2.cpp
@@ -0,0 +1,551 @@
+/*
+
+inquire_v2.cpp
+
+UDDI V2 Inquiry Interface
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2004-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "inqH.h"
+#define SOAP_NMAC static
+#define uddiH_H
+#include "InquireSoap.nsmap"
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_binding
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__find_USCOREbinding::uddi2__find_USCOREbinding(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__find_USCOREbinding::uddi2__find_USCOREbinding(struct soap *soap, const char *tModelKey)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  // Create a new UDDI tModelKey
+  this->tModelBag = soap_new_uddi2__tModelBag(soap, -1);
+  this->tModelBag->soap_default(soap);
+  this->tModelBag->tModelKey.push_back(soap_strdup(soap, tModelKey));
+
+  this->generic = "2.0";
+}
+
+uddi2__find_USCOREbinding::uddi2__find_USCOREbinding(struct soap *soap, std::vector<char*> tModelKeys)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  // Create a new UDDI tModelKey Bag
+  this->tModelBag = soap_new_uddi2__tModelBag(soap, -1);
+  this->tModelBag->soap_default(soap);
+  this->tModelBag->tModelKey = tModelKeys;
+
+  this->generic = "2.0";
+}
+
+uddi2__bindingDetail *uddi2__find_USCOREbinding::send(const char *endpoint)
+{
+  // Allocate result
+  uddi2__bindingDetail *result = soap_new_uddi2__bindingDetail(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___inq2__find_USCOREbinding(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+} 
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_business
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness(struct soap *soap, const char *name)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  // Create a new UDDI name
+  uddi2__name *uname = soap_new_uddi2__name(soap, -1);
+  uname->soap_default(soap);
+  uname->__item = soap_strdup(soap, name);
+  this->name.push_back(uname);
+
+  this->generic = "2.0";
+}
+
+uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness(struct soap *soap, std::vector<uddi2__keyedReference*> keyedReferences)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  // Create a new UDDI tModelBag
+  this->categoryBag = soap_new_uddi2__categoryBag(soap, -1);
+  this->categoryBag->soap_default(soap);
+  this->categoryBag->keyedReference = keyedReferences;
+
+  this->generic = "2.0";
+}
+
+uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness(struct soap *soap, std::vector<char*> tModelKeys)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  // Create a new UDDI tModelBag
+  this->tModelBag = soap_new_uddi2__tModelBag(soap, -1);
+  this->tModelBag->soap_default(soap);
+  this->tModelBag->tModelKey = tModelKeys;
+
+  this->generic = "2.0";
+}
+
+uddi2__businessList *uddi2__find_USCOREbusiness::send(const char *endpoint)
+{
+  // Allocate result
+  uddi2__businessList *result = soap_new_uddi2__businessList(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___inq2__find_USCOREbusiness(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+} 
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_relatedBusinesses
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__find_USCORErelatedBusinesses::uddi2__find_USCORErelatedBusinesses(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__find_USCORErelatedBusinesses::uddi2__find_USCORErelatedBusinesses(struct soap *soap, const char *businessKey)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->businessKey = soap_strdup(soap, businessKey);
+
+  this->generic = "2.0";
+}
+
+uddi2__relatedBusinessesList *uddi2__find_USCORErelatedBusinesses::send(const char *endpoint)
+{
+  // Allocate result
+  uddi2__relatedBusinessesList *result = soap_new_uddi2__relatedBusinessesList(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___inq2__find_USCORErelatedBusinesses(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+} 
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_service
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__find_USCOREservice::uddi2__find_USCOREservice(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__find_USCOREservice::uddi2__find_USCOREservice(struct soap *soap, const char *name)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  // Create a new UDDI name
+  uddi2__name *uname = soap_new_uddi2__name(soap, -1);
+  uname->soap_default(soap);
+  uname->__item = soap_strdup(soap, name);
+  this->name.push_back(uname);
+
+  this->generic = "2.0";
+}
+
+uddi2__find_USCOREservice::uddi2__find_USCOREservice(struct soap *soap, std::vector<uddi2__keyedReference*> keyedReferences)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  // Create a new UDDI tModelBag
+  this->categoryBag = soap_new_uddi2__categoryBag(soap, -1);
+  this->categoryBag->soap_default(soap);
+  this->categoryBag->keyedReference = keyedReferences;
+
+  this->generic = "2.0";
+}
+
+uddi2__find_USCOREservice::uddi2__find_USCOREservice(struct soap *soap, std::vector<char*> tModelKeys)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  // Create a new UDDI tModelBag
+  this->tModelBag = soap_new_uddi2__tModelBag(soap, -1);
+  this->tModelBag->soap_default(soap);
+  this->tModelBag->tModelKey = tModelKeys;
+
+  this->generic = "2.0";
+}
+
+uddi2__serviceList* uddi2__find_USCOREservice::send(const char *endpoint)
+{
+  // Allocate result
+  uddi2__serviceList *result = soap_new_uddi2__serviceList(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___inq2__find_USCOREservice(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+} 
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_tModel
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__find_USCOREtModel::uddi2__find_USCOREtModel(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__find_USCOREtModel::uddi2__find_USCOREtModel(struct soap *soap, const char *name)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  // Create a new UDDI name
+  this->name = soap_new_uddi2__name(soap, -1);
+  this->name->soap_default(soap);
+  this->name->__item = soap_strdup(soap, name);
+
+  this->generic = "2.0";
+}
+
+uddi2__find_USCOREtModel::uddi2__find_USCOREtModel(struct soap *soap, std::vector<uddi2__keyedReference*> keyedReferences)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  // Create a new UDDI tModelBag
+  this->categoryBag = soap_new_uddi2__categoryBag(soap, -1);
+  this->categoryBag->soap_default(soap);
+  this->categoryBag->keyedReference = keyedReferences;
+
+  this->generic = "2.0";
+}
+
+uddi2__tModelList* uddi2__find_USCOREtModel::send(const char *endpoint)
+{
+  // Allocate result
+  uddi2__tModelList *result = soap_new_uddi2__tModelList(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___inq2__find_USCOREtModel(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+} 
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_bindingDetail
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__get_USCOREbindingDetail::uddi2__get_USCOREbindingDetail(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__get_USCOREbindingDetail::uddi2__get_USCOREbindingDetail(struct soap *soap, const char *bindingKey)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->bindingKey.push_back(soap_strdup(soap, bindingKey));
+
+  this->generic = "2.0";
+}
+
+uddi2__get_USCOREbindingDetail::uddi2__get_USCOREbindingDetail(struct soap *soap, std::vector<char*> bindingKeys)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->bindingKey = bindingKeys;
+
+  this->generic = "2.0";
+}
+
+uddi2__bindingDetail *uddi2__get_USCOREbindingDetail::send(const char *endpoint)
+{
+  // Allocate result
+  uddi2__bindingDetail *result = soap_new_uddi2__bindingDetail(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___inq2__get_USCOREbindingDetail(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+} 
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_businessDetail
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__get_USCOREbusinessDetail::uddi2__get_USCOREbusinessDetail(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__get_USCOREbusinessDetail::uddi2__get_USCOREbusinessDetail(struct soap *soap, const char *businessKey)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->businessKey.push_back(soap_strdup(soap, businessKey));
+
+  this->generic = "2.0";
+}
+
+uddi2__get_USCOREbusinessDetail::uddi2__get_USCOREbusinessDetail(struct soap *soap, std::vector<char*> businessKeys)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->businessKey = businessKeys;
+
+  this->generic = "2.0";
+}
+
+uddi2__businessDetail *uddi2__get_USCOREbusinessDetail::send(const char *endpoint)
+{
+  // Allocate result
+  uddi2__businessDetail *result = soap_new_uddi2__businessDetail(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___inq2__get_USCOREbusinessDetail(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+} 
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_businessDetailExt
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__get_USCOREbusinessDetailExt::uddi2__get_USCOREbusinessDetailExt(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__get_USCOREbusinessDetailExt::uddi2__get_USCOREbusinessDetailExt(struct soap *soap, const char *businessKey)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->businessKey.push_back(soap_strdup(soap, businessKey));
+
+  this->generic = "2.0";
+}
+
+uddi2__get_USCOREbusinessDetailExt::uddi2__get_USCOREbusinessDetailExt(struct soap *soap, std::vector<char*> businessKeys)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->businessKey = businessKeys;
+
+  this->generic = "2.0";
+}
+
+uddi2__businessDetailExt *uddi2__get_USCOREbusinessDetailExt::send(const char *endpoint)
+{
+  // Allocate result
+  uddi2__businessDetailExt *result = soap_new_uddi2__businessDetailExt(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___inq2__get_USCOREbusinessDetailExt(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+} 
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_serviceDetail
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__get_USCOREserviceDetail::uddi2__get_USCOREserviceDetail(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__get_USCOREserviceDetail::uddi2__get_USCOREserviceDetail(struct soap *soap, const char *serviceKey)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->serviceKey.push_back(soap_strdup(soap, serviceKey));
+
+  this->generic = "2.0";
+}
+
+uddi2__get_USCOREserviceDetail::uddi2__get_USCOREserviceDetail(struct soap *soap, std::vector<char*> serviceKeys)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->serviceKey = serviceKeys;
+
+  this->generic = "2.0";
+}
+
+uddi2__serviceDetail *uddi2__get_USCOREserviceDetail::send(const char *endpoint)
+{
+  // Allocate result
+  uddi2__serviceDetail *result = soap_new_uddi2__serviceDetail(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___inq2__get_USCOREserviceDetail(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+} 
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_tModelDetail
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__get_USCOREtModelDetail::uddi2__get_USCOREtModelDetail(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__get_USCOREtModelDetail::uddi2__get_USCOREtModelDetail(struct soap *soap, const char *tModelKey)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->tModelKey.push_back(soap_strdup(soap, tModelKey));
+
+  this->generic = "2.0";
+}
+
+uddi2__get_USCOREtModelDetail::uddi2__get_USCOREtModelDetail(struct soap *soap, std::vector<char*> tModelKeys)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->tModelKey = tModelKeys;
+
+  this->generic = "2.0";
+}
+
+uddi2__tModelDetail *uddi2__get_USCOREtModelDetail::send(const char *endpoint)
+{
+  // Allocate result
+  uddi2__tModelDetail *result = soap_new_uddi2__tModelDetail(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___inq2__get_USCOREtModelDetail(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+} 
+
diff --git a/uddi2/inquire_v2.h b/uddi2/inquire_v2.h
new file mode 100644
index 0000000..fea659a
--- /dev/null
+++ b/uddi2/inquire_v2.h
@@ -0,0 +1,3754 @@
+/** @mainpage gSOAP UDDI v2
+
+Universal Description, Discovery and Integration, or UDDI, is the name of a
+group of web-based registries that expose information about a business or other
+entity and its technical interfaces.
+
+See the UDDI v2 specification @url http://uddi.org/pubs/ProgrammersAPI_v2.htm
+for more details.
+
+@section UDDI2_CLASSES Classes
+
+See Related Pages for examples.
+
+UDDI Inquire classes
+
+- @ref uddi2__find_USCOREbinding
+- @ref uddi2__find_USCOREbusiness
+- @ref uddi2__find_USCORErelatedBusinesses
+- @ref uddi2__find_USCOREservice
+- @ref uddi2__find_USCOREtModel
+- @ref uddi2__get_USCOREbindingDetail
+- @ref uddi2__get_USCOREbusinessDetail
+- @ref uddi2__get_USCOREbusinessDetailExt
+- @ref uddi2__get_USCOREserviceDetail
+- @ref uddi2__get_USCOREtModelDetail
+
+UDDI Publish classes
+
+- @ref uddi2__add_USCOREpublisherAssertions
+- @ref uddi2__delete_USCOREbinding
+- @ref uddi2__delete_USCOREbusiness
+- @ref uddi2__delete_USCOREservice
+- @ref uddi2__delete_USCOREtModel
+- @ref uddi2__delete_USCOREpublisherAssertions
+- @ref uddi2__discard_USCOREauthToken
+- @ref uddi2__get_USCOREassertionStatusReport
+- @ref uddi2__get_USCOREauthToken
+- @ref uddi2__get_USCOREpublisherAssertions
+- @ref uddi2__get_USCOREregisteredInfo
+- @ref uddi2__save_USCOREbinding
+- @ref uddi2__save_USCOREbusiness
+- @ref uddi2__save_USCOREservice
+- @ref uddi2__save_USCOREtModel
+- @ref uddi2__set_USCOREpublisherAssertions
+
+@section UDDI2_BINDINGS Binding Reference
+
+- @ref InquireSoap
+- @ref PublishSoap
+
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_binding
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__find_USCOREbinding
+@brief
+
+Represents a request to locate bindings that meet the specified requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137712
+*/
+
+/**
+@fn uddi2__find_USCOREbinding::uddi2__find_USCOREbinding(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREbinding class.
+*/
+
+/**
+@fn uddi2__find_USCOREbinding::uddi2__find_USCOREbinding(struct soap *soap, const char *tModelKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKey string
+
+Creates an instance of the find_USCOREbinding class using the specified tModel
+key.
+*/
+
+/**
+@fn uddi2__find_USCOREbinding::uddi2__find_USCOREbinding(struct soap *soap, std::vector<char*> tModelKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKeys collection of tModel key strings
+
+Creates an instance of the find_USCOREbinding class using the specified tModel
+keys.
+*/
+
+/**
+@fn uddi2__bindingDetail* uddi2__find_USCOREbinding::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__bindingDetail object or NULL on error
+
+Send a request to a UDDI server to find binding details.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_business
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__find_USCOREbusiness
+@brief
+
+Represents a request to locate businesses that meet specific requirements. When
+the send method is called, the instance returns a uddi2__businessList object
+that contains a list of business that matched the search criteria.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137713
+
+See also @ref example2.
+*/
+
+/**
+@fn uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREbusiness class.
+*/
+
+/**
+@fn uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness(struct soap *soap, const char *name)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREbusiness class using the specified name
+of the requested business.
+*/
+
+/**
+@fn uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness(struct soap *soap, std::vector<uddi2__keyedReference*> keyedReferences)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREbusiness class using the specified
+category references.
+*/
+
+/**
+@fn uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness(struct soap *soap, std::vector<char*> tModelKeys)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREbusiness class using the specified tModel
+keys.
+*/
+
+/**
+@fn uddi2__businessList *uddi2__find_USCOREbusiness::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__businessList object or NULL on error
+
+Send a request to a UDDI server to find a list of businesses.
+
+See also @ref example2.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_relatedBusinesses
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__find_USCORErelatedBusinesses
+@brief
+
+Represents a request to locate businesses that are related to a specific
+business. When the send method is called, the instance returns a
+uddi2__relatedBusinessList object that contains a list of business that matched
+the relationship set.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137714
+*/
+
+/**
+@fn uddi2__find_USCORErelatedBusinesses::uddi2__find_USCORErelatedBusinesses(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCORErelatedBusiness class.
+*/
+
+/**
+@fn uddi2__find_USCORErelatedBusinesses::uddi2__find_USCORErelatedBusinesses(struct soap *soap, const char *businessKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKey string
+
+Creates an instance of the find_USCORErelatedBusiness class using the specified
+business key.
+*/
+
+/**
+@fn uddi2__relatedBusinessesList *uddi2__find_USCORErelatedBusinesses::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__relatedBusinessList object or NULL on error
+
+Send a request to a UDDI server to find a list of related businesses.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_service
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__find_USCOREservice
+@brief
+
+Represents a request to locate services that meet the specified requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137715
+
+See also @ref example1.
+*/
+
+/**
+@fn uddi2__find_USCOREservice::uddi2__find_USCOREservice(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREservice class.
+*/
+
+/**
+@fn uddi2__find_USCOREservice::uddi2__find_USCOREservice(struct soap *soap, const char *name)
+@brief
+@param[in] soap gSOAP context
+@param[in] name of the service
+
+Creates an instance of the find_USCOREservice class using the specified name.
+*/
+
+/**
+@fn uddi2__find_USCOREservice::uddi2__find_USCOREservice(struct soap *soap, std::vector<uddi2__keyedReference*> keyedReferences)
+@brief
+@param[in] soap gSOAP context
+@param[in] keyedReferences collection of category keys
+
+Creates an instance of the find_USCOREservice class using the specified
+category keys.
+*/
+
+/**
+@fn uddi2__find_USCOREservice::uddi2__find_USCOREservice(struct soap *soap, std::vector<char*> tModelKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKeys collection of tModel key strings
+
+Creates an instance of the find_USCOREservice class using the specified tModel
+keys.
+*/
+
+/**
+@fn uddi2__serviceList* uddi2__find_USCOREservice::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__serviceList object or NULL on error
+
+Send a request to a UDDI server to find a list of services.
+
+See also @ref example1.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_tModel
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__find_USCOREtModel
+@brief
+
+Represents a request to locate a list of tModel entries that match a set of
+specific criteria. The result of a search is a uddi2__tModelList object that
+contains information about registered tModel data that matches the criteria.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137716
+*/
+
+/**
+@fn uddi2__find_USCOREtModel::uddi2__find_USCOREtModel(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREtModel class.
+*/
+
+/**
+@fn uddi2__find_USCOREtModel::uddi2__find_USCOREtModel(struct soap *soap, const char *name)
+@brief
+@param[in] soap gSOAP context
+@param[in] name of the tModel
+
+Creates an instance of the find_USCOREtModel class using the specified tModel
+name.
+*/
+
+/**
+@fn uddi2__find_USCOREtModel::uddi2__find_USCOREtModel(struct soap *soap, std::vector<uddi2__keyedReference*> keyedReferences)
+@brief
+@param[in] soap gSOAP context
+@param[in] keyedReferences collection of category keys
+
+Creates an instance of the find_USCOREtModel class using the specified category
+keys.
+*/
+
+/**
+@fn uddi2__tModelList* uddi2__find_USCOREtModel::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__tModelList object or NULL on error
+
+Send a request to a UDDI server to find a tModelList.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_bindingDetail
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREbindingDetail
+@brief
+
+Represents a request to get binding details from a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137717
+*/
+
+/**
+@fn uddi2__get_USCOREbindingDetail::uddi2__get_USCOREbindingDetail(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREbindingDetail class.
+*/
+
+/**
+@fn uddi2__get_USCOREbindingDetail::uddi2__get_USCOREbindingDetail(struct soap *soap, const char *bindingKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] bindingKey string
+
+Creates an instance of the get_USCOREbindingDetail class using the specified
+binding key.
+*/
+
+/**
+@fn uddi2__get_USCOREbindingDetail::uddi2__get_USCOREbindingDetail(struct soap *soap, std::vector<char*> bindingKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] bindingKeys collection of key strings
+
+Creates an instance of the get_USCOREbindingDetail class using the specified
+collection of binding keys.
+*/
+
+/**
+@fn uddi2__bindingDetail* uddi2__get_USCOREbindingDetail::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__bindingDetail object or NULL on error
+
+Send a request to a UDDI server to get the binding details.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_businessDetail
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREbusinessDetail
+@brief
+
+Represents a request to get business details from a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137718 
+*/
+
+/**
+@fn uddi2__get_USCOREbusinessDetail::uddi2__get_USCOREbusinessDetail(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREbusinessDetail class.
+*/
+
+/**
+@fn uddi2__get_USCOREbusinessDetail::uddi2__get_USCOREbusinessDetail(struct soap *soap, const char *businessKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKey string
+
+Creates an instance of the get_USCOREbusinessDetail class using the specified
+business key.
+*/
+
+/**
+@fn uddi2__get_USCOREbusinessDetail::uddi2__get_USCOREbusinessDetail(struct soap *soap, std::vector<char*> businessKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKeys collection of key strings
+
+Creates an instance of the get_USCOREbusinessDetail class using the specified
+collection of business keys.
+*/
+
+/**
+@fn uddi2__businessDetail* uddi2__get_USCOREbusinessDetail::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__businessDetail object or NULL on error
+
+Send a request to a UDDI server to get the business details.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_businessDetailExt
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREbusinessDetailExt
+@brief
+
+Represents a request to get business details from a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137719
+*/
+
+/**
+@fn uddi2__get_USCOREbusinessDetailExt::uddi2__get_USCOREbusinessDetailExt(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREbusinessDetailExt class.
+*/
+
+/**
+@fn uddi2__get_USCOREbusinessDetailExt::uddi2__get_USCOREbusinessDetailExt(struct soap *soap, const char *businessKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKey string
+
+Creates an instance of the get_USCOREbusinessDetailExt class using the specified
+business key.
+*/
+
+/**
+@fn uddi2__get_USCOREbusinessDetailExt::uddi2__get_USCOREbusinessDetailExt(struct soap *soap, std::vector<char*> businessKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKeys collection of key strings
+
+Creates an instance of the get_USCOREbusinessDetailExt class using the specified
+collection of business keys.
+*/
+
+/**
+@fn uddi2__businessDetailExt* uddi2__get_USCOREbusinessDetailExt::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__businessDetailExt object or NULL on error
+
+Send a request to a UDDI server to get the business details.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_serviceDetail
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREserviceDetail
+@brief
+
+Represents a request to get service details from a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137720
+*/
+
+/**
+@fn uddi2__get_USCOREserviceDetail::uddi2__get_USCOREserviceDetail(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREserviceDetail class.
+*/
+
+/**
+@fn uddi2__get_USCOREserviceDetail::uddi2__get_USCOREserviceDetail(struct soap *soap, const char *serviceKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] serviceKey string
+
+Creates an instance of the get_USCOREserviceDetail class using the specified
+service key.
+*/
+
+/**
+@fn uddi2__get_USCOREserviceDetail::uddi2__get_USCOREserviceDetail(struct soap *soap, std::vector<char*> serviceKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] serviceKeys collection of key strings
+
+Creates an instance of the get_USCOREserviceDetail class using the specified
+collection of service keys.
+*/
+
+/**
+@fn uddi2__serviceDetail* uddi2__get_USCOREserviceDetail::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__serviceDetail object or NULL on error
+
+Send a request to a UDDI server to get the service details.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_tModelDetail
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREtModelDetail
+@brief
+
+Represents a request to get tModel details from a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137721
+*/
+
+/**
+@fn uddi2__get_USCOREtModelDetail::uddi2__get_USCOREtModelDetail(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREtModelDetail class.
+*/
+
+/**
+@fn uddi2__get_USCOREtModelDetail::uddi2__get_USCOREtModelDetail(struct soap *soap, const char *tModelKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKey string
+
+Creates an instance of the get_USCOREtModelDetail class using the specified
+tModel key.
+*/
+
+/**
+@fn uddi2__get_USCOREtModelDetail::uddi2__get_USCOREtModelDetail(struct soap *soap, std::vector<char*> tModelKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKeys collection of key strings
+
+Creates an instance of the get_USCOREtModelDetail class using the specified
+collection of tModel keys.
+*/
+
+/**
+@fn uddi2__tModelDetail* uddi2__get_USCOREtModelDetail::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__tModelDetail object or NULL on error
+
+Send a request to a UDDI server to get the tModel details.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:add_publisherAssertions
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__add_USCOREpublisherAssertions
+@brief
+
+Represents a request to add one or more publisher assertions to the assertion
+collection for an individual publisher.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137731
+*/
+
+/**
+@fn uddi2__add_USCOREpublisherAssertions::uddi2__add_USCOREpublisherAssertions(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the add_USCOREpublisherAssertions class.
+*/
+
+/**
+@fn uddi2__add_USCOREpublisherAssertions::uddi2__add_USCOREpublisherAssertions(struct soap *soap, std::vector<uddi2__publisherAssertion*> publisherAssertions)
+@brief
+@param[in] soap gSOAP context
+@param[in] publisherAssertions collection of publisher assertions
+
+Creates an instance of the add_USCOREpublisherAssertions class using the
+specified publisher assertions.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__add_USCOREpublisherAssertions::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI server to add one or more publisher assertions to the
+assertion collection for an individual publisher.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_binding
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__delete_USCOREbinding
+@brief
+
+Represents a request to delete a binding that meets the specified requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137732
+*/
+
+/**
+@fn uddi2__delete_USCOREbinding::uddi2__delete_USCOREbinding(struct soap *soap)
+@brief
+
+Creates an instance of the delete_USCOREbinding class.
+*/
+
+/**
+@fn uddi2__delete_USCOREbinding::uddi2__delete_USCOREbinding(struct soap *soap, const char *bindingKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] bindingKey a binding key string
+
+Creates an instance of the delete_USCOREbinding class.
+*/
+
+/**
+@fn uddi2__delete_USCOREbinding::uddi2__delete_USCOREbinding(struct soap *soap, std::vector<char*> bindingKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] bindingKeys collection of binding keys
+
+Creates an instance of the delete_USCOREbinding class using the specified
+binding keys.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__delete_USCOREbinding::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI service to delete a binding that meets the specified
+requirements.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_business
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__delete_USCOREbusiness
+@brief
+
+Represents a request to delete a business that meets the specified requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137733
+*/
+
+/**
+@fn uddi2__delete_USCOREbusiness::uddi2__delete_USCOREbusiness(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the delete_USCOREbusiness class.
+*/
+
+/**
+@fn uddi2__delete_USCOREbusiness::uddi2__delete_USCOREbusiness(struct soap *soap, const char *businessKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKey a business key string
+
+Creates an instance of the delete_USCOREbusiness class using the specified
+business key.
+*/
+
+/**
+@fn uddi2__delete_USCOREbusiness::uddi2__delete_USCOREbusiness(struct soap *soap, std::vector<char*> businessKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKeys collection of business keys
+
+Creates an instance of the delete_USCOREbusiness class using the specified
+business keys.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__delete_USCOREbusiness::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI service to delete a business that meets the specified
+requirements.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_service
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__delete_USCOREservice
+@brief
+
+Represents a request to delete a service that meets the specified requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137735
+*/
+
+/**
+@fn uddi2__delete_USCOREservice::uddi2__delete_USCOREservice(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the delete_USCOREservice class.
+*/
+
+/**
+@fn uddi2__delete_USCOREservice::uddi2__delete_USCOREservice(struct soap *soap, const char *serviceKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] serviceKey a service key string
+
+Creates an instance of the delete_USCOREservice class using the specified
+service key.
+*/
+
+/**
+@fn uddi2__delete_USCOREservice::uddi2__delete_USCOREservice(struct soap *soap, std::vector<char*> serviceKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] serviceKeys collection of service keys
+
+Creates an instance of the delete_USCOREservice class using the specified
+service keys.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__delete_USCOREservice::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI service to delete a service that meets the specified
+requirements.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_tModel
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__delete_USCOREtModel
+@brief
+
+Represents a request to delete a tModel that meets the specified requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137736
+*/
+
+/**
+@fn uddi2__delete_USCOREtModel::uddi2__delete_USCOREtModel(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the delete_USCOREtModel class.
+*/
+
+/**
+@fn uddi2__delete_USCOREtModel::uddi2__delete_USCOREtModel(struct soap *soap, const char *tModelKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKey a tModel key string
+
+Creates an instance of the delete_USCOREtModel class using the specified
+tModel key.
+*/
+
+/**
+@fn uddi2__delete_USCOREtModel::uddi2__delete_USCOREtModel(struct soap *soap, std::vector<char*> tModelKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKeys collection of tModel keys
+
+Creates an instance of the delete_USCOREtModel class using the specified
+tModel keys.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__delete_USCOREtModel::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI service to delete a tModel that meets the specified
+requirements.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_publisherAssertions
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__delete_USCOREpublisherAssertions
+@brief
+
+Represents a request to delete publisher assertions meeting the specified
+requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137734
+*/
+
+/**
+@fn uddi2__delete_USCOREpublisherAssertions::uddi2__delete_USCOREpublisherAssertions(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the delete_USCOREpublisherAssertions class.
+*/
+
+/**
+@fn uddi2__delete_USCOREpublisherAssertions::uddi2__delete_USCOREpublisherAssertions(struct soap *soap, std::vector<uddi2__publisherAssertion*> publisherAssertions)
+@brief
+@param[in] soap gSOAP context
+@param[in] publisherAssertions a collection of publisher assertions
+
+Creates an instance of the delete_USCOREpublisherAssertions class using the
+specified collection of publisher assertions.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__delete_USCOREpublisherAssertions::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI service to delete publisher assertions meeting the
+specified requirements.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:discard_authToken
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__discard_USCOREauthToken
+@brief
+
+Represents a request to discard an authorization token obtained with the
+get_USCOREauthToken class.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137737
+*/
+
+/**
+@fn uddi2__discard_USCOREauthToken::uddi2__discard_USCOREauthToken(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the delete_USCOREauthToken class.
+*/
+
+/**
+@fn uddi2__discard_USCOREauthToken::uddi2__discard_USCOREauthToken(struct soap *soap, const char *authInfo)
+@brief
+@param[in] soap gSOAP context
+@param[in] authInfo authorization token provided by the UDDI server
+
+Creates an instance of the delete_USCOREauthToken class using the specified
+authentication token string.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__discard_USCOREauthToken::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI service to discard an authentication token.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_assertionStatusReport
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREassertionStatusReport
+@brief
+
+Provides the ability to determine the status of current and outstanding
+publisher assertions. The results can be restricted by setting the
+completionStatus property.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137738
+*/
+
+/**
+@fn uddi2__get_USCOREassertionStatusReport::uddi2__get_USCOREassertionStatusReport(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREassertionStatusReport class.
+*/
+
+/**
+@fn uddi2__get_USCOREassertionStatusReport::uddi2__get_USCOREassertionStatusReport(struct soap *soap, const char *completionStatus)
+@brief
+@param[in] soap gSOAP context
+@param[in] completionStatus completion status string
+
+Creates an instance of the get_USCOREassertionStatusReport class using the
+specified completion status.
+*/
+
+/**
+@fn uddi2__assertionStatusReport *uddi2__get_USCOREassertionStatusReport::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__assertionStatusReport object or NULL on error
+
+Send a request to a UDDI service to get the status of current and outstanding
+publisher assertions.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_authToken
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREauthToken
+@brief
+
+Represents a request to obtain an authorization token, which is represented by
+the uddi2__authToken class.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137739
+*/
+
+/**
+@fn uddi2__get_USCOREauthToken::uddi2__get_USCOREauthToken(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREauthToken class.
+*/
+
+/**
+@fn uddi2__get_USCOREauthToken::uddi2__get_USCOREauthToken(struct soap *soap, const char *userid, const char *passwd)
+@brief
+@param[in] soap gSOAP context
+@param[in] userid the user ID string
+@param[in] passwd the password string
+
+Creates an instance of the get_USCOREauthToken class using the specified user
+ID and password.
+*/
+
+/**
+@fn uddi2__authToken *uddi2__get_USCOREauthToken::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__authToken object or NULL on error
+
+Send a request to a UDDI service to get a authorization token given a user
+ID and password.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_publisherAssertions
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREpublisherAssertions
+@brief
+
+Represents a request to obtain the full set of publisher assertions that are
+associated with an individual publisher.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137740
+*/
+
+/**
+@fn uddi2__get_USCOREpublisherAssertions::uddi2__get_USCOREpublisherAssertions(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREpublisherAssetions class.
+*/
+
+/**
+@fn uddi2__publisherAssertions *uddi2__get_USCOREpublisherAssertions::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__publisherAssertions object or NULL on error
+
+Send a request to a UDDI service to get publisher assertions.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_registeredInfo
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREregisteredInfo
+@brief
+
+Represents a request to get all registered business entities and tModels
+controlled by an individual.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137741
+*/
+
+/**
+@fn uddi2__get_USCOREregisteredInfo::uddi2__get_USCOREregisteredInfo(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREregisteredInfo class.
+*/
+
+/**
+@fn uddi2__registeredInfo *uddi2__get_USCOREregisteredInfo::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__registeredInfo object or NULL on error
+
+Send a request to a UDDI service to get all registered business entities and
+tModels controlled by an individual.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:save_binding
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__save_USCOREbinding
+@brief
+
+Represents a request to post binding information on a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137742
+*/
+
+/**
+@fn uddi2__save_USCOREbinding::uddi2__save_USCOREbinding(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the save_USCOREbinding class.
+*/
+
+/**
+@fn uddi2__save_USCOREbinding::uddi2__save_USCOREbinding(struct soap *soap, uddi2__bindingTemplate &bindingTemplate)
+@brief
+@param[in] soap gSOAP context
+@param[in] bindingTemplate binding template
+
+Creates an instance of the save_USCOREbinding class using the specified binding
+template.
+*/
+
+/**
+@fn uddi2__save_USCOREbinding::uddi2__save_USCOREbinding(struct soap *soap, std::vector<uddi2__bindingTemplate*> bindingTemplates)
+@brief
+@param[in] soap gSOAP context
+@param[in] bindingTemplates collection of binding templates
+
+Creates an instance of the save_USCOREbinding class using the specified binding
+templates.
+*/
+
+/**
+@fn uddi2__bindingDetail *uddi2__save_USCOREbinding::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__bindingDetail object or NULL on error
+
+Send a request to a UDDI server to post binding information on the server.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:save_business
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__save_USCOREbusiness
+@brief
+
+Represents a request to post business information on a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137743
+*/
+
+/**
+@fn uddi2__save_USCOREbusiness::uddi2__save_USCOREbusiness(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the save_USCOREbusiness class.
+*/
+
+/**
+@fn uddi2__save_USCOREbusiness::uddi2__save_USCOREbusiness(struct soap *soap, uddi2__businessEntity &businessEntity)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessEntity business entity
+
+Creates an instance of the save_USCOREbusiness class using the specified
+business entity.
+*/
+
+/**
+@fn uddi2__save_USCOREbusiness::uddi2__save_USCOREbusiness(struct soap *soap, std::vector<uddi2__businessEntity*> businessEntities)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessEntities collection of business entities
+
+Creates an instance of the save_USCOREbusiness class using the specified
+business entities.
+*/
+
+/**
+@fn uddi2__businessDetail *uddi2__save_USCOREbusiness::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__businessDetail object or NULL on error
+
+Send a request to a UDDI server to post business information on the server.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:save_service
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__save_USCOREservice
+@brief
+
+Represents a request to post service information on a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137744
+*/
+
+/**
+@fn uddi2__save_USCOREservice::uddi2__save_USCOREservice(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the save_USCOREservice class.
+*/
+
+/**
+@fn uddi2__save_USCOREservice::uddi2__save_USCOREservice(struct soap *soap, uddi2__businessService &businessService)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessService business service
+
+Creates an instance of the save_USCOREservice class using the specified
+service.
+*/
+
+/**
+@fn uddi2__save_USCOREservice::uddi2__save_USCOREservice(struct soap *soap, std::vector<uddi2__businessService*> businessServices)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessServices collection of business services
+
+Creates an instance of the save_USCOREservice class using the specified
+services.
+*/
+
+/**
+@fn uddi2__serviceDetail *uddi2__save_USCOREservice::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__serviceDetail object or NULL on error
+
+Send a request to a UDDI server to post service information on the server.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:save_tModel
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__save_USCOREtModel
+@brief
+
+Represents a request to post tModel information on a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137745
+*/
+
+/**
+@fn uddi2__save_USCOREtModel::uddi2__save_USCOREtModel(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the save_USCOREtModel class.
+*/
+
+/**
+@fn uddi2__save_USCOREtModel::uddi2__save_USCOREtModel(struct soap *soap, uddi2__tModel &tModel)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModel a tModel
+
+Creates an instance of the save_USCOREtModel class using the specified
+tModel.
+*/
+
+/**
+@fn uddi2__save_USCOREtModel::uddi2__save_USCOREtModel(struct soap *soap, std::vector<uddi2__tModel*> tModels)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModels collection of tModels
+
+Creates an instance of the save_USCOREtModel class using the specified
+tModels.
+*/
+
+/**
+@fn uddi2__tModelDetail *uddi2__save_USCOREtModel::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__tModelDetail object or NULL on error
+
+Send a request to a UDDI server to post tModel information on the server.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:set_publisherAssertions
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__set_USCOREpublisherAssertions
+@brief
+
+Represents a request to modify the existing publisher assertions for an
+individual publisher.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137746
+*/
+
+/**
+@fn uddi2__set_USCOREpublisherAssertions::uddi2__set_USCOREpublisherAssertions(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the set_USCOREpublisherAssertions class.
+*/
+
+/**
+@fn uddi2__set_USCOREpublisherAssertions::uddi2__set_USCOREpublisherAssertions(struct soap *soap, std::vector<uddi2__publisherAssertion*> publisherAssertions)
+@brief
+@param[in] soap gSOAP context
+@param[in] publisherAssertions collection of publisher assertions
+
+Creates an instance of the set_USCOREpublisherAssertions class using the
+specified collection of publisher assertions.
+*/
+
+/**
+@fn uddi2__publisherAssertions *uddi2__set_USCOREpublisherAssertions::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__publisherAssertions object or NULL on error
+
+Send a request to a UDDI server to post tModel information on the server.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Code Examples
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@page example1 Code Example 1: Finding a service
+
+This example shows you how to find Web services. In this case, the example
+finds Web services with names that begin with the word "magic".
+
+@code
+#include "inqH.h"
+
+int main(int argc, char **argv)
+{ 
+  char *search_string = "magic";
+
+  if (argc > 1)
+    search_string = argv[1];
+
+  // Create a gSOAP context
+  struct soap *soap = soap_new();
+
+  // Create an object to find a business
+  uddi2__find_USCOREservice fs(soap, search_string);
+
+  // Send the request
+  uddi2__serviceList *sl = fs.send("http://uddi.xmethods.net/inquire");
+
+  // Check if result is OK
+  if (!sl)
+    soap_print_fault(soap, stderr);
+
+  // If OK, report the service name(s) and unique identification keys
+  else if (sl->serviceInfos)
+  {
+    std::cout << "Search results on " << search_string << ":" << std::endl << std::endl;
+
+    for (std::vector<uddi2__serviceInfo*>::const_iterator si = sl->serviceInfos->serviceInfo.begin(); si != sl->serviceInfos->serviceInfo.end(); ++si)
+    {
+      // Report serviceKey and businessKey
+      std::cout << "serviceKey=" << (*si)->serviceKey << std::endl << "businessKey=" << (*si)->businessKey << std::endl;
+
+      // Report names
+      for (std::vector<uddi2__name*>::const_iterator n = (*si)->name.begin(); n != (*si)->name.end(); ++n)
+        std::cout << "name=" << (*n)->__item << std::endl;
+
+      std::cout << std::endl;
+    }
+  }
+
+  // Remove deserialized objects
+  soap_destroy(soap);
+
+  // Remove temporary data
+  soap_end(soap);
+
+  // Detach and free context
+  soap_done(soap);
+  free(soap);
+
+  return 0;
+}
+@endcode
+
+To compile:
+- wsdl2h -tuddi2-typemap.dat inquire_v2.wsdl
+- soapcpp2 -I.. -pinq inquire_v2.h
+- g++ -DWITH_NONAMESPACES -I.. -o example1 example1.cpp inquire_v2.cpp inqC.cpp inqClient.cpp ../stdsoap2.cpp
+*/
+
+/**
+@page example2 Code Example 2: Finding a business
+
+This example shows you how to find a business from a UDDI server.
+
+@code
+#include "inqH.h"
+
+int main(int argc, char **argv)
+{ 
+  char *search_string = "xmethods";
+
+  if (argc > 1)
+    search_string = argv[1];
+
+  // Create a gSOAP context
+  struct soap *soap = soap_new();
+
+  // Create an object to find a business
+  uddi2__find_USCOREbusiness fb(soap, search_string);
+
+  // Send the request
+  uddi2__businessList *bl = fb.send("http://uddi.xmethods.net/inquire");
+
+  // Check if result is OK
+  if (!bl)
+    soap_print_fault(soap, stderr);
+
+  // If OK, report the business name(s) and unique identification keys
+  else if (bl->businessInfos)
+  {
+    std::cout << "Search results on " << search_string << ":" << std::endl << std::endl;
+
+    for (std::vector<uddi2__businessInfo*>::const_iterator bi = bl->businessInfos->businessInfo.begin(); bi != bl->businessInfos->businessInfo.end(); ++bi)
+    {
+      // Report businessKey
+      std::cout << "businessKey=" << (*bi)->businessKey << std::endl;
+
+      // Report names
+      for (std::vector<uddi2__name*>::const_iterator n = (*bi)->name.begin(); n != (*bi)->name.end(); ++n)
+        std::cout << "name=" << (*n)->__item << std::endl;
+
+      std::cout << std::endl;
+    }
+  }
+
+  // Remove deserialized objects
+  soap_destroy(soap);
+
+  // Remove temporary data
+  soap_end(soap);
+
+  // Detach and free context
+  soap_done(soap);
+  free(soap);
+
+  return 0;
+}
+@endcode
+
+To compile:
+- wsdl2h -tuddi2-typemap.dat inquire_v2.wsdl
+- soapcpp2 -I.. -pinq inquire_v2.h
+- g++ -DWITH_NONAMESPACES -I.. -o example2 example2.cpp inquire_v2.cpp inqC.cpp inqClient.cpp ../stdsoap2.cpp
+*/
+/**
+@page example3 Code Example 3: Publishing a WSDL and service on XMethods
+
+This example shows you how to publish a Web service. In this case, the example
+template code obtains an authorization token, saves the tModel with the WSDL
+URL in the server, and saves the business service information in the server.
+
+@code
+#include "pubH.h"
+
+const char *server = "https://uddi.xmethods.net/publish";
+
+const char *userid = "..."; // user ID to access UDDI server
+const char *passwd = "..."; // password to access UDDI server
+
+int main(int argc, char **argv)
+{ 
+  // Create a gSOAP context
+  struct soap *soap = soap_new();
+
+  // Setup SSL context (optional) to verify server's credentials
+  if (soap_ssl_client_context(soap, SOAP_SSL_DEFAULT, NULL, NULL, "cacerts.pem", NULL, NULL))
+  { 
+    soap_print_fault(soap, stderr);
+    exit(1);
+  }
+
+  // Step 1: Get an authorization token from the UDDI server
+  uddi2__get_USCOREauthToken get_authToken(soap, userid, passwd);
+  uddi2__authToken *authToken = get_authToken.send(server);
+
+  // Check if authorized
+  if (!authToken)
+  {
+    soap_print_fault(soap, stderr);
+    exit(1);
+  }
+
+  // Authorization info provided by server for this session
+  char *authInfo = authToken->authInfo;
+
+  // Step 2: Create a tModel for the WSDL to be published
+  uddi2__tModel tModel;
+  tModel.soap_default(soap);
+
+  // Create the tModel and service name
+  tModel.name = soap_new_uddi2__name(soap, -1);
+  tModel.name->__item = "...";
+  tModel.name->xml__lang_ = "en";
+
+  // Create XMethods description elements (see http://www.xmethods.net/ve2/UDDI.po)
+  uddi2__description *description = soap_new_uddi2__description(soap, 6);
+  description[0].__item = "SHORT DESCRIPTION: ...";
+  description[0].xml__lang_ = "en";
+  description[1].__item = "SHORT DESCRIPTION: ...";
+  description[1].xml__lang_ = "en";
+  description[2].__item = "USAGE NOTES: ...";
+  description[2].xml__lang_ = "en";
+  description[3].__item = "HOMEPAGE URL: ...";
+  description[3].xml__lang_ = "en";
+  description[4].__item = "CONTACT EMAIL: ...";
+  description[4].xml__lang_ = "en";
+  description[5].__item = "IMPLEMENTATION: ...";
+  description[5].xml__lang_ = "en";
+
+  // Add the four description elements to the tModel
+  tModel.description.push_back(description + 0);
+  tModel.description.push_back(description + 1);
+  tModel.description.push_back(description + 2);
+  tModel.description.push_back(description + 4);
+
+  // Add an overviewDoc element with description and overviewURL
+  tModel.overviewDoc = soap_new_uddi2__overviewDoc(soap, -1);
+  tModel.overviewDoc->soap_default(soap);
+  tModel.overviewDoc->description.push_back(soap_new_uddi2__description(soap, -1));
+  tModel.overviewDoc->description[0]->__item = "WSDL source document";
+  tModel.overviewDoc->description[0]->xml__lang_ = "en";
+  tModel.overviewDoc->overviewURL = "http://.../my.wsdl#bindingName";
+
+  // Omit identifier bag
+  tModel.identifierBag = NULL;
+
+  // Add a category with a WSDL-specific keyedReference
+  tModel.categoryBag = soap_new_uddi2__categoryBag(soap, -1);
+  tModel.categoryBag->soap_default(soap);
+  tModel.categoryBag->keyedReference.push_back(soap_new_uddi2__keyedReference(soap, -1));
+  tModel.categoryBag->keyedReference[0]->tModelKey = "...";
+  tModel.categoryBag->keyedReference[0]->keyName = "uddi-org:types";
+  tModel.categoryBag->keyedReference[0]->keyValue = "wsdlSpec";
+
+  tModel.authorizedName = "...";
+  tModel.operator_ = "...";
+  tModel.tModelKey = "...";
+
+  // Save the tModel
+  uddi2__save_USCOREtModel save_tModel(soap, tModel);
+  uddi2__tModelDetail *tModelDetail = save_tModel.send(server, authInfo);
+
+  // Step 3: Create a new service to be published
+  uddi2__businessService service;
+  service.soap_default(soap);
+
+  // Service name is the tModel name (XMethods)
+  service.name.push_back(tModel.name);
+
+  // Add two description elements to the service
+  service.description.push_back(description + 4);
+  service.description.push_back(description + 5);
+
+  // Create binding template
+  uddi2__bindingTemplate bindingTemplate;
+  bindingTemplate.soap_default(soap);
+  bindingTemplate.tModelInstanceDetails = soap_new_uddi2__tModelInstanceDetails(soap, -1);
+  bindingTemplate.tModelInstanceDetails->tModelInstanceInfo.push_back(soap_new_uddi2__tModelInstanceInfo(soap, -1));
+  bindingTemplate.tModelInstanceDetails->tModelInstanceInfo[0]->instanceDetails = NULL;
+  bindingTemplate.tModelInstanceDetails->tModelInstanceInfo[0]->tModelKey = tModel.tModelKey;
+  bindingTemplate.accessPoint = soap_new_uddi2__accessPoint(soap, -1);
+  bindingTemplate.accessPoint->__item = "...";
+  bindingTemplate.accessPoint->URLType = uddi2__URLType__http;
+  bindingTemplate.hostingRedirector = NULL;
+  bindingTemplate.serviceKey = "...";
+  bindingTemplate.bindingKey = "...";
+
+  // Add binding Template to service
+  service.bindingTemplates = soap_new_uddi2__bindingTemplates(soap, -1);
+  service.bindingTemplates->soap_default(soap);
+  service.bindingTemplates->bindingTemplate.push_back(&bindingTemplate);
+
+  service.categoryBag = NULL;
+  service.serviceKey = "...";
+  service.businessKey = "...";
+
+  // Save the service
+  uddi2__save_USCOREservice save_service(soap, service);
+  uddi2__serviceDetail *serviceDetail = save_service.send(server, authInfo);
+
+  // Step 4: Discard authorization token
+  uddi2__discard_USCOREauthToken discard_authToken(soap, authInfo);
+  uddi2__dispositionReport *dispositionReport = discard_authToken.send(server);
+
+  // Remove deserialized objects
+  soap_destroy(soap);
+
+  // Remove temporary data
+  soap_end(soap);
+
+  // Detach and free context
+  soap_done(soap);
+  free(soap);
+
+  return 0;
+}
+@endcode
+To compile:
+- wsdl2h -tuddi2-typemap.dat publish_v2.wsdl
+- soapcpp2 -I.. -ppub publish_v2.h
+- g++ -DWITH_OPENSSL -DWITH_NONAMESPACES -I.. -o example3 example3.cpp publish_v2.cpp pubC.cpp pubClient.cpp ../stdsoap2.cpp
+*/
+/* inquire_v2.h
+   Generated by wsdl2h 1.2.0 from inquire_v2.wsdl and uddi2-typemap.dat
+   2005-04-24 00:29:41 GMT
+   Copyright (C) 2001-2005 Robert van Engelen, Genivia Inc. All Rights Reserved.
+   This part of the software is released under one of the following licenses:
+   GPL or Genivia's license for commercial use.
+*/
+
+/* NOTE:
+
+ - Compile this file with soapcpp2 to complete the code generation process.
+ - Use wsdl2h option -l to view the software license terms.
+ - Use wsdl2h options -c and -s to generate pure C code or C++ code without STL.
+ - To build with STL, stlvector.h from the gSOAP distribution must be in the
+   current directory. Or use soapcpp2 option -I<path> with path to stlvector.h.
+ - Use typemap.dat to control schema namespace bindings and type mappings.
+   It is strongly recommended to customize the names of the namespace prefixes
+   generated by wsdl2h. To do so, modify the prefix bindings in the Namespaces
+   section below and add the modified lines to typemap.dat to rerun wsdl2h.
+ - Use Doxygen (www.doxygen.org) to browse this file.
+
+*/
+
+/******************************************************************************\
+ *                                                                            *
+ * urn:uddi-org:inquiry_v2                                                    *
+ *                                                                            *
+\******************************************************************************/
+
+/* WSDL Documentation:
+
+
+		Copyright (c) 2000 - 2002 by Accenture, Ariba, Inc., Commerce One, Inc. 
+		Fujitsu Limited, Hewlett-Packard Company, i2 Technologies, Inc., 
+		Intel Corporation, International Business Machines Corporation,  
+		Microsoft Corporation, Oracle Corporation, SAP AG, Sun Microsystems, Inc., 
+		and VeriSign, Inc.  All Rights Reserved.
+		
+		WSDL Service Interface for UDDI Inquiry API V2.0    
+		
+		This WSDL document defines the inquiry API calls for interacting with 
+		the UDDI registry.  The complete UDDI API specification is available
+		at http://www.uddi.org/specification.html.
+	
+*/
+
+//gsoapopt w
+
+#import "stlvector.h"
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Namespaces                                                          *
+ *                                                                            *
+\******************************************************************************/
+
+
+/* NOTE:
+
+It is strongly recommended to customize the names of the namespace prefixes
+generated by wsdl2h. To do so, modify the prefix bindings below and add the
+modified lines to typemap.dat to rerun wsdl2h:
+
+inq2 = "urn:uddi-org:inquiry_v2"
+uddi2 = urn:uddi-org:api_v2
+
+*/
+
+//gsoap inq2  schema namespace:	urn:uddi-org:inquiry_v2
+//gsoap uddi2 schema namespace:	urn:uddi-org:api_v2
+//gsoap inq2  schema form:	unqualified
+//gsoap uddi2 schema elementForm:	qualified
+//gsoap uddi2 schema attributeForm:	unqualified
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Types                                                               *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Primitive built-in type "xs:NMTOKEN"
+typedef char* xsd__NMTOKEN;
+
+/// Built-in attribute "xml:lang"
+typedef char* xml__lang;
+
+class uddi2__accessPoint;
+class uddi2__address;
+class uddi2__addressLine;
+class uddi2__assertionStatusItem;
+class uddi2__bindingTemplate;
+class uddi2__bindingTemplates;
+class uddi2__businessEntity;
+class uddi2__businessEntityExt;
+class uddi2__businessInfo;
+class uddi2__businessInfos;
+class uddi2__businessService;
+class uddi2__businessServices;
+class uddi2__categoryBag;
+class uddi2__contact;
+class uddi2__contacts;
+class uddi2__description;
+class uddi2__discoveryURL;
+class uddi2__discoveryURLs;
+class uddi2__dispositionReport;
+class uddi2__email;
+class uddi2__errInfo;
+class uddi2__findQualifiers;
+class uddi2__hostingRedirector;
+class uddi2__identifierBag;
+class uddi2__instanceDetails;
+class uddi2__keyedReference;
+class uddi2__keysOwned;
+class uddi2__name;
+class uddi2__overviewDoc;
+class uddi2__phone;
+class uddi2__publisherAssertion;
+class uddi2__relatedBusinessInfo;
+class uddi2__relatedBusinessInfos;
+class uddi2__result;
+class uddi2__serviceInfo;
+class uddi2__serviceInfos;
+class uddi2__sharedRelationships;
+class uddi2__tModel;
+class uddi2__tModelBag;
+class uddi2__tModelInfo;
+class uddi2__tModelInfos;
+class uddi2__tModelInstanceDetails;
+class uddi2__tModelInstanceInfo;
+class uddi2__add_USCOREpublisherAssertions;
+class uddi2__delete_USCOREbinding;
+class uddi2__delete_USCOREbusiness;
+class uddi2__delete_USCOREpublisherAssertions;
+class uddi2__delete_USCOREservice;
+class uddi2__delete_USCOREtModel;
+class uddi2__discard_USCOREauthToken;
+class uddi2__find_USCOREbinding;
+class uddi2__find_USCOREbusiness;
+class uddi2__find_USCORErelatedBusinesses;
+class uddi2__find_USCOREservice;
+class uddi2__find_USCOREtModel;
+class uddi2__get_USCOREassertionStatusReport;
+class uddi2__get_USCOREauthToken;
+class uddi2__get_USCOREbindingDetail;
+class uddi2__get_USCOREbusinessDetail;
+class uddi2__get_USCOREbusinessDetailExt;
+class uddi2__get_USCOREpublisherAssertions;
+class uddi2__get_USCOREregisteredInfo;
+class uddi2__get_USCOREserviceDetail;
+class uddi2__get_USCOREtModelDetail;
+class uddi2__save_USCOREbinding;
+class uddi2__save_USCOREbusiness;
+class uddi2__save_USCOREservice;
+class uddi2__save_USCOREtModel;
+class uddi2__set_USCOREpublisherAssertions;
+class uddi2__validate_USCOREvalues;
+class uddi2__assertionStatusReport;
+class uddi2__authToken;
+class uddi2__bindingDetail;
+class uddi2__businessDetail;
+class uddi2__businessDetailExt;
+class uddi2__businessList;
+class uddi2__publisherAssertions;
+class uddi2__registeredInfo;
+class uddi2__relatedBusinessesList;
+class uddi2__serviceDetail;
+class uddi2__serviceList;
+class uddi2__tModelDetail;
+class uddi2__tModelList;
+
+/// Schema "urn:uddi-org:api_v2":bindingKey simpleType restriction of xs:string
+
+typedef char* uddi2__bindingKey;
+
+/// Schema "urn:uddi-org:api_v2":businessKey simpleType restriction of xs:string
+
+typedef char* uddi2__businessKey;
+
+/// Schema "urn:uddi-org:api_v2":serviceKey simpleType restriction of xs:string
+
+typedef char* uddi2__serviceKey;
+
+/// Schema "urn:uddi-org:api_v2":tModelKey simpleType restriction of xs:string
+
+typedef char* uddi2__tModelKey;
+
+/// Schema "urn:uddi-org:api_v2":direction simpleType restriction of xs:NMTOKEN
+
+/// Note: enum values are prefixed with 'uddi2__direction' to avoid name clashes, please use wsdl2h option -e to omit this prefix
+enum uddi2__direction
+{	uddi2__direction__fromKey,	///< xs:NMTOKEN value="fromKey"
+	uddi2__direction__toKey,	///< xs:NMTOKEN value="toKey"
+};
+
+/// Schema "urn:uddi-org:api_v2":truncated simpleType restriction of xs:NMTOKEN
+
+/// Note: enum values are prefixed with 'uddi2__truncated' to avoid name clashes, please use wsdl2h option -e to omit this prefix
+enum uddi2__truncated
+{	uddi2__truncated__true_,	///< xs:NMTOKEN value="true"
+	uddi2__truncated__false_,	///< xs:NMTOKEN value="false"
+};
+
+/// Schema "urn:uddi-org:api_v2":URLType simpleType restriction of xs:NMTOKEN
+
+/// Note: enum values are prefixed with 'uddi2__URLType' to avoid name clashes, please use wsdl2h option -e to omit this prefix
+enum uddi2__URLType
+{	uddi2__URLType__mailto,	///< xs:NMTOKEN value="mailto"
+	uddi2__URLType__http,	///< xs:NMTOKEN value="http"
+	uddi2__URLType__https,	///< xs:NMTOKEN value="https"
+	uddi2__URLType__ftp,	///< xs:NMTOKEN value="ftp"
+	uddi2__URLType__fax,	///< xs:NMTOKEN value="fax"
+	uddi2__URLType__phone,	///< xs:NMTOKEN value="phone"
+	uddi2__URLType__other,	///< xs:NMTOKEN value="other"
+};
+
+/// Schema "urn:uddi-org:api_v2":keyType simpleType restriction of xs:NMTOKEN
+
+/// Note: enum values are prefixed with 'uddi2__keyType' to avoid name clashes, please use wsdl2h option -e to omit this prefix
+enum uddi2__keyType
+{	uddi2__keyType__businessKey,	///< xs:NMTOKEN value="businessKey"
+	uddi2__keyType__tModelKey,	///< xs:NMTOKEN value="tModelKey"
+	uddi2__keyType__serviceKey,	///< xs:NMTOKEN value="serviceKey"
+	uddi2__keyType__bindingKey,	///< xs:NMTOKEN value="bindingKey"
+};
+
+/// Schema urn:uddi-org:api_v2:"address"
+
+class uddi2__address
+{ public:
+/// Vector of uddi2__addressLine* with length 0..unbounded
+    std::vector<uddi2__addressLine*    > addressLine                    0;
+/// Attribute useType of type xs:string
+   @char*                                useType                        0;	///< Optional attribute
+/// Attribute sortCode of type xs:string
+   @char*                                sortCode                       0;	///< Optional attribute
+/// Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey
+   @uddi2__tModelKey                     tModelKey                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"assertionStatusItem"
+
+class uddi2__assertionStatusItem
+{ public:
+/// Element reference "urn:uddi-org:api_v2":fromKey
+    uddi2__businessKey                   fromKey                        1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":toKey
+    uddi2__businessKey                   toKey                          1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":keyedReference
+    uddi2__keyedReference*               keyedReference                 1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":keysOwned
+    uddi2__keysOwned*                    keysOwned                      1;	///< Required element
+/// Attribute completionStatus of type xs:string
+   @char*                                completionStatus               1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"bindingTemplate"
+
+class uddi2__bindingTemplate
+{ public:
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":tModelInstanceDetails
+    uddi2__tModelInstanceDetails*        tModelInstanceDetails          1;	///< Required element
+// CHOICE OF ELEMENTS:
+/// Element reference "urn:uddi-org:api_v2":accessPoint
+    uddi2__accessPoint*                  accessPoint                    1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":hostingRedirector
+    uddi2__hostingRedirector*            hostingRedirector              1;	///< Required element
+// END CHOICE
+/// Attribute serviceKey of type "urn:uddi-org:api_v2":serviceKey
+   @uddi2__serviceKey                    serviceKey                     0;	///< Optional attribute
+/// Attribute bindingKey of type "urn:uddi-org:api_v2":bindingKey
+   @uddi2__bindingKey                    bindingKey                     1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"bindingTemplates"
+
+class uddi2__bindingTemplates
+{ public:
+/// Vector of uddi2__bindingTemplate* with length 0..unbounded
+    std::vector<uddi2__bindingTemplate*> bindingTemplate                0;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessEntity"
+
+class uddi2__businessEntity
+{ public:
+/// Element reference "urn:uddi-org:api_v2":discoveryURLs
+    uddi2__discoveryURLs*                discoveryURLs                  0;	///< Optional element
+/// Vector of uddi2__name* with length 0..unbounded
+    std::vector<uddi2__name*           > name                           1;
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":contacts
+    uddi2__contacts*                     contacts                       0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":businessServices
+    uddi2__businessServices*             businessServices               0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":identifierBag
+    uddi2__identifierBag*                identifierBag                  0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":categoryBag
+    uddi2__categoryBag*                  categoryBag                    0;	///< Optional element
+/// Attribute businessKey of type "urn:uddi-org:api_v2":businessKey
+   @uddi2__businessKey                   businessKey                    1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      0;	///< Optional attribute
+/// Attribute authorizedName of type xs:string
+   @char*                                authorizedName                 0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessEntityExt"
+
+class uddi2__businessEntityExt
+{ public:
+/// Element reference "urn:uddi-org:api_v2":businessEntity
+    uddi2__businessEntity*               businessEntity                 1;	///< Required element
+// TODO: <any namespace="##other" minOccurs="0" maxOccurs="unbounded">
+//       Schema extensibility is user-definable
+//       Consult the protocol documentation to insert declarations here:
+    _XML                                 __any                         ;	///< Catch any element content in XML string
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessInfo"
+
+class uddi2__businessInfo
+{ public:
+/// Vector of uddi2__name* with length 0..unbounded
+    std::vector<uddi2__name*           > name                           1;
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":serviceInfos
+    uddi2__serviceInfos*                 serviceInfos                   1;	///< Required element
+/// Attribute businessKey of type "urn:uddi-org:api_v2":businessKey
+   @uddi2__businessKey                   businessKey                    1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessInfos"
+
+class uddi2__businessInfos
+{ public:
+/// Vector of uddi2__businessInfo* with length 0..unbounded
+    std::vector<uddi2__businessInfo*   > businessInfo                   0;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessService"
+
+class uddi2__businessService
+{ public:
+/// Vector of uddi2__name* with length 0..unbounded
+    std::vector<uddi2__name*           > name                           0;
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":bindingTemplates
+    uddi2__bindingTemplates*             bindingTemplates               0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":categoryBag
+    uddi2__categoryBag*                  categoryBag                    0;	///< Optional element
+/// Attribute serviceKey of type "urn:uddi-org:api_v2":serviceKey
+   @uddi2__serviceKey                    serviceKey                     1;	///< Required attribute
+/// Attribute businessKey of type "urn:uddi-org:api_v2":businessKey
+   @uddi2__businessKey                   businessKey                    0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessServices"
+
+class uddi2__businessServices
+{ public:
+/// Vector of uddi2__businessService* with length 0..unbounded
+    std::vector<uddi2__businessService*> businessService                0;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"categoryBag"
+
+class uddi2__categoryBag
+{ public:
+/// Vector of uddi2__keyedReference* with length 0..unbounded
+    std::vector<uddi2__keyedReference* > keyedReference                 1;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"contact"
+
+class uddi2__contact
+{ public:
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":personName
+    char*                                personName                     1;	///< Required element
+/// Vector of uddi2__phone* with length 0..unbounded
+    std::vector<uddi2__phone*          > phone                          0;
+/// Vector of uddi2__email* with length 0..unbounded
+    std::vector<uddi2__email*          > email                          0;
+/// Vector of uddi2__address* with length 0..unbounded
+    std::vector<uddi2__address*        > address                        0;
+/// Attribute useType of type xs:string
+   @char*                                useType                        0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"contacts"
+
+class uddi2__contacts
+{ public:
+/// Vector of uddi2__contact* with length 0..unbounded
+    std::vector<uddi2__contact*        > contact                        1;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"discoveryURLs"
+
+class uddi2__discoveryURLs
+{ public:
+/// Vector of uddi2__discoveryURL* with length 0..unbounded
+    std::vector<uddi2__discoveryURL*   > discoveryURL                   1;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"dispositionReport"
+
+class uddi2__dispositionReport
+{ public:
+/// Vector of uddi2__result* with length 0..unbounded
+    std::vector<uddi2__result*         > result                         1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"findQualifiers"
+
+class uddi2__findQualifiers
+{ public:
+/// Vector of char* with length 0..unbounded
+    std::vector<char*                  > findQualifier                  0;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"hostingRedirector"
+
+class uddi2__hostingRedirector
+{ public:
+/// Attribute bindingKey of type "urn:uddi-org:api_v2":bindingKey
+   @uddi2__bindingKey                    bindingKey                     1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"identifierBag"
+
+class uddi2__identifierBag
+{ public:
+/// Vector of uddi2__keyedReference* with length 0..unbounded
+    std::vector<uddi2__keyedReference* > keyedReference                 1;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"instanceDetails"
+
+class uddi2__instanceDetails
+{ public:
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":overviewDoc
+    uddi2__overviewDoc*                  overviewDoc                    0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":instanceParms
+    char*                                instanceParms                  0;	///< Optional element
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"keyedReference"
+
+class uddi2__keyedReference
+{ public:
+/// Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey
+   @uddi2__tModelKey                     tModelKey                      0;	///< Optional attribute
+/// Attribute keyName of type xs:string
+   @char*                                keyName                        0;	///< Optional attribute
+/// Attribute keyValue of type xs:string
+   @char*                                keyValue                       1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"keysOwned"
+
+class uddi2__keysOwned
+{ public:
+/// Element reference "urn:uddi-org:api_v2":fromKey
+    uddi2__businessKey                   fromKey                        0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":toKey
+    uddi2__businessKey                   toKey                          0;	///< Optional element
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"overviewDoc"
+
+class uddi2__overviewDoc
+{ public:
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":overviewURL
+    char*                                overviewURL                    0;	///< Optional element
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"publisherAssertion"
+
+class uddi2__publisherAssertion
+{ public:
+/// Element reference "urn:uddi-org:api_v2":fromKey
+    uddi2__businessKey                   fromKey                        1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":toKey
+    uddi2__businessKey                   toKey                          1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":keyedReference
+    uddi2__keyedReference*               keyedReference                 1;	///< Required element
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"relatedBusinessInfo"
+
+class uddi2__relatedBusinessInfo
+{ public:
+/// Element reference "urn:uddi-org:api_v2":businessKey
+    uddi2__businessKey                   businessKey                    1;	///< Required element
+/// Vector of uddi2__name* with length 0..unbounded
+    std::vector<uddi2__name*           > name                           1;
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Vector of uddi2__sharedRelationships* with length 0..2
+    std::vector<uddi2__sharedRelationships*> sharedRelationships            1:2;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"relatedBusinessInfos"
+
+class uddi2__relatedBusinessInfos
+{ public:
+/// Vector of uddi2__relatedBusinessInfo* with length 0..unbounded
+    std::vector<uddi2__relatedBusinessInfo*> relatedBusinessInfo            0;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"result"
+
+class uddi2__result
+{ public:
+/// Element reference "urn:uddi-org:api_v2":errInfo
+    uddi2__errInfo*                      errInfo                        0;	///< Optional element
+/// Attribute keyType of type "urn:uddi-org:api_v2":keyType
+   @enum uddi2__keyType*                 keyType                        0;	///< Optional attribute
+/// Attribute errno of type xs:int
+   @int                                  errno_                         1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"serviceInfo"
+
+class uddi2__serviceInfo
+{ public:
+/// Vector of uddi2__name* with length 0..unbounded
+    std::vector<uddi2__name*           > name                           0;
+/// Attribute serviceKey of type "urn:uddi-org:api_v2":serviceKey
+   @uddi2__serviceKey                    serviceKey                     1;	///< Required attribute
+/// Attribute businessKey of type "urn:uddi-org:api_v2":businessKey
+   @uddi2__businessKey                   businessKey                    1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"serviceInfos"
+
+class uddi2__serviceInfos
+{ public:
+/// Vector of uddi2__serviceInfo* with length 0..unbounded
+    std::vector<uddi2__serviceInfo*    > serviceInfo                    0;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"sharedRelationships"
+
+class uddi2__sharedRelationships
+{ public:
+/// Vector of uddi2__keyedReference* with length 0..unbounded
+    std::vector<uddi2__keyedReference* > keyedReference                 1;
+/// Attribute direction of type "urn:uddi-org:api_v2":direction
+   @enum uddi2__direction                direction                      1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"tModel"
+
+class uddi2__tModel
+{ public:
+/// Element reference "urn:uddi-org:api_v2":name
+    uddi2__name*                         name                           1;	///< Required element
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":overviewDoc
+    uddi2__overviewDoc*                  overviewDoc                    0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":identifierBag
+    uddi2__identifierBag*                identifierBag                  0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":categoryBag
+    uddi2__categoryBag*                  categoryBag                    0;	///< Optional element
+/// Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey
+   @uddi2__tModelKey                     tModelKey                      1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      0;	///< Optional attribute
+/// Attribute authorizedName of type xs:string
+   @char*                                authorizedName                 0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"tModelBag"
+
+class uddi2__tModelBag
+{ public:
+/// Vector of uddi2__tModelKey with length 0..unbounded
+    std::vector<uddi2__tModelKey       > tModelKey                      1;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"tModelInfo"
+
+class uddi2__tModelInfo
+{ public:
+/// Element reference "urn:uddi-org:api_v2":name
+    uddi2__name*                         name                           1;	///< Required element
+/// Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey
+   @uddi2__tModelKey                     tModelKey                      1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"tModelInfos"
+
+class uddi2__tModelInfos
+{ public:
+/// Vector of uddi2__tModelInfo* with length 0..unbounded
+    std::vector<uddi2__tModelInfo*     > tModelInfo                     0;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"tModelInstanceDetails"
+
+class uddi2__tModelInstanceDetails
+{ public:
+/// Vector of uddi2__tModelInstanceInfo* with length 0..unbounded
+    std::vector<uddi2__tModelInstanceInfo*> tModelInstanceInfo             0;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"tModelInstanceInfo"
+
+class uddi2__tModelInstanceInfo
+{ public:
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":instanceDetails
+    uddi2__instanceDetails*              instanceDetails                0;	///< Optional element
+/// Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey
+   @uddi2__tModelKey                     tModelKey                      1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"add_publisherAssertions"
+
+class uddi2__add_USCOREpublisherAssertions
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__publisherAssertion* with length 0..unbounded
+    std::vector<uddi2__publisherAssertion*> publisherAssertion             1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__add_USCOREpublisherAssertions(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__add_USCOREpublisherAssertions(struct soap*, std::vector<uddi2__publisherAssertion*> publisherAssertions);
+/// Member declared in uddi2-typemap.dat
+    uddi2__dispositionReport* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"delete_binding"
+
+class uddi2__delete_USCOREbinding
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__bindingKey with length 0..unbounded
+    std::vector<uddi2__bindingKey      > bindingKey                     1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREbinding(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREbinding(struct soap*, const char *bindingKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREbinding(struct soap*, std::vector<char*> bindingKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__dispositionReport* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"delete_business"
+
+class uddi2__delete_USCOREbusiness
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__businessKey with length 0..unbounded
+    std::vector<uddi2__businessKey     > businessKey                    1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREbusiness(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREbusiness(struct soap*, const char *businessKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREbusiness(struct soap*, std::vector<char*> businessKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__dispositionReport* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"delete_publisherAssertions"
+
+class uddi2__delete_USCOREpublisherAssertions
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__publisherAssertion* with length 0..unbounded
+    std::vector<uddi2__publisherAssertion*> publisherAssertion             1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREpublisherAssertions(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREpublisherAssertions(struct soap*, std::vector<uddi2__publisherAssertion*> publisherAssertions);
+/// Member declared in uddi2-typemap.dat
+    uddi2__dispositionReport* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"delete_service"
+
+class uddi2__delete_USCOREservice
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__serviceKey with length 0..unbounded
+    std::vector<uddi2__serviceKey      > serviceKey                     1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREservice(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREservice(struct soap*, const char *serviceKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREservice(struct soap*, std::vector<char*> serviceKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__dispositionReport* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"delete_tModel"
+
+class uddi2__delete_USCOREtModel
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__tModelKey with length 0..unbounded
+    std::vector<uddi2__tModelKey       > tModelKey                      1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREtModel(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREtModel(struct soap*, const char *tModelKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREtModel(struct soap*, std::vector<char*> tModelKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__dispositionReport* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"discard_authToken"
+
+class uddi2__discard_USCOREauthToken
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__discard_USCOREauthToken(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__discard_USCOREauthToken(struct soap*, const char *authInfo);
+/// Member declared in uddi2-typemap.dat
+    uddi2__dispositionReport* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"find_binding"
+
+class uddi2__find_USCOREbinding
+{ public:
+/// Element reference "urn:uddi-org:api_v2":findQualifiers
+    uddi2__findQualifiers*               findQualifiers                 0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":tModelBag
+    uddi2__tModelBag*                    tModelBag                      1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute maxRows of type xs:int
+   @int*                                 maxRows                        0;	///< Optional attribute
+/// Attribute serviceKey of type "urn:uddi-org:api_v2":serviceKey
+   @uddi2__serviceKey                    serviceKey                     1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREbinding(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREbinding(struct soap*, const char *tModelKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREbinding(struct soap*, std::vector<char*> tModelKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__bindingDetail *send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"find_business"
+
+class uddi2__find_USCOREbusiness
+{ public:
+/// Element reference "urn:uddi-org:api_v2":findQualifiers
+    uddi2__findQualifiers*               findQualifiers                 0;	///< Optional element
+/// Vector of uddi2__name* with length 0..unbounded
+    std::vector<uddi2__name*           > name                           0;
+/// Element reference "urn:uddi-org:api_v2":identifierBag
+    uddi2__identifierBag*                identifierBag                  0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":categoryBag
+    uddi2__categoryBag*                  categoryBag                    0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":tModelBag
+    uddi2__tModelBag*                    tModelBag                      0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":discoveryURLs
+    uddi2__discoveryURLs*                discoveryURLs                  0;	///< Optional element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute maxRows of type xs:int
+   @int*                                 maxRows                        0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREbusiness(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREbusiness(struct soap*, const char *name);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREbusiness(struct soap*, std::vector<char*> tModelKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREbusiness(struct soap*, std::vector<uddi2__keyedReference*> keyedReferences);
+/// Member declared in uddi2-typemap.dat
+    uddi2__businessList *send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"find_relatedBusinesses"
+
+class uddi2__find_USCORErelatedBusinesses
+{ public:
+/// Element reference "urn:uddi-org:api_v2":findQualifiers
+    uddi2__findQualifiers*               findQualifiers                 0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":businessKey
+    uddi2__businessKey                   businessKey                    1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":keyedReference
+    uddi2__keyedReference*               keyedReference                 0;	///< Optional element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute maxRows of type xs:int
+   @int*                                 maxRows                        0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCORErelatedBusinesses(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCORErelatedBusinesses(struct soap*, const char *businessKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__relatedBusinessesList *send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"find_service"
+
+class uddi2__find_USCOREservice
+{ public:
+/// Element reference "urn:uddi-org:api_v2":findQualifiers
+    uddi2__findQualifiers*               findQualifiers                 0;	///< Optional element
+/// Vector of uddi2__name* with length 0..unbounded
+    std::vector<uddi2__name*           > name                           0;
+/// Element reference "urn:uddi-org:api_v2":categoryBag
+    uddi2__categoryBag*                  categoryBag                    0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":tModelBag
+    uddi2__tModelBag*                    tModelBag                      0;	///< Optional element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute maxRows of type xs:int
+   @int*                                 maxRows                        0;	///< Optional attribute
+/// Attribute businessKey of type "urn:uddi-org:api_v2":businessKey
+   @uddi2__businessKey                   businessKey                    0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREservice(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREservice(struct soap*, const char *name);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREservice(struct soap*, std::vector<char*> tModelKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREservice(struct soap*, std::vector<uddi2__keyedReference*> keyedReferences);
+/// Member declared in uddi2-typemap.dat
+    uddi2__serviceList* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"find_tModel"
+
+class uddi2__find_USCOREtModel
+{ public:
+/// Element reference "urn:uddi-org:api_v2":findQualifiers
+    uddi2__findQualifiers*               findQualifiers                 0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":name
+    uddi2__name*                         name                           0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":identifierBag
+    uddi2__identifierBag*                identifierBag                  0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":categoryBag
+    uddi2__categoryBag*                  categoryBag                    0;	///< Optional element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute maxRows of type xs:int
+   @int*                                 maxRows                        0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREtModel(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREtModel(struct soap*, const char *name);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREtModel(struct soap*, std::vector<uddi2__keyedReference*> keyedReferences);
+/// Member declared in uddi2-typemap.dat
+    uddi2__tModelList* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_assertionStatusReport"
+
+class uddi2__get_USCOREassertionStatusReport
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":completionStatus
+    char*                                completionStatus               0;	///< Optional element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREassertionStatusReport(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREassertionStatusReport(struct soap*, const char *completionStatus);
+/// Member declared in uddi2-typemap.dat
+    uddi2__assertionStatusReport* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_authToken"
+
+class uddi2__get_USCOREauthToken
+{ public:
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute userID of type xs:string
+   @char*                                userID                         1;	///< Required attribute
+/// Attribute cred of type xs:string
+   @char*                                cred                           1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREauthToken(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREauthToken(struct soap*, const char *userid, const char *passwd);
+/// Member declared in uddi2-typemap.dat
+    uddi2__authToken* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_bindingDetail"
+
+class uddi2__get_USCOREbindingDetail
+{ public:
+/// Vector of uddi2__bindingKey with length 0..unbounded
+    std::vector<uddi2__bindingKey      > bindingKey                     1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbindingDetail(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbindingDetail(struct soap*, const char *bindingKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbindingDetail(struct soap*, std::vector<char*> bindingKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__bindingDetail* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_businessDetail"
+
+class uddi2__get_USCOREbusinessDetail
+{ public:
+/// Vector of uddi2__businessKey with length 0..unbounded
+    std::vector<uddi2__businessKey     > businessKey                    1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbusinessDetail(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbusinessDetail(struct soap*, const char *businessKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbusinessDetail(struct soap*, std::vector<char*> businessKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__businessDetail* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_businessDetailExt"
+
+class uddi2__get_USCOREbusinessDetailExt
+{ public:
+/// Vector of uddi2__businessKey with length 0..unbounded
+    std::vector<uddi2__businessKey     > businessKey                    1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbusinessDetailExt(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbusinessDetailExt(struct soap*, const char *businessKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbusinessDetailExt(struct soap*, std::vector<char*> businessKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__businessDetailExt* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_publisherAssertions"
+
+class uddi2__get_USCOREpublisherAssertions
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREpublisherAssertions(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__publisherAssertions* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_registeredInfo"
+
+class uddi2__get_USCOREregisteredInfo
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREregisteredInfo(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__registeredInfo* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_serviceDetail"
+
+class uddi2__get_USCOREserviceDetail
+{ public:
+/// Vector of uddi2__serviceKey with length 0..unbounded
+    std::vector<uddi2__serviceKey      > serviceKey                     1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREserviceDetail(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREserviceDetail(struct soap*, const char *serviceKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREserviceDetail(struct soap*, std::vector<char*> serviceKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__serviceDetail* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_tModelDetail"
+
+class uddi2__get_USCOREtModelDetail
+{ public:
+/// Vector of uddi2__tModelKey with length 0..unbounded
+    std::vector<uddi2__tModelKey       > tModelKey                      1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREtModelDetail(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREtModelDetail(struct soap*, const char *tModelKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREtModelDetail(struct soap*, std::vector<char*> tModelKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__tModelDetail* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"save_binding"
+
+class uddi2__save_USCOREbinding
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__bindingTemplate* with length 0..unbounded
+    std::vector<uddi2__bindingTemplate*> bindingTemplate                1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREbinding(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREbinding(struct soap*, uddi2__bindingTemplate &bindingTemplate);
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREbinding(struct soap*, std::vector<uddi2__bindingTemplate*> bindingTemplates);
+/// Member declared in uddi2-typemap.dat
+    uddi2__bindingDetail* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"save_business"
+
+class uddi2__save_USCOREbusiness
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__businessEntity* with length 0..unbounded
+    std::vector<uddi2__businessEntity* > businessEntity                 0;
+/// Vector of char* with length 0..unbounded
+    std::vector<char*                  > uploadRegister                 0;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREbusiness(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREbusiness(struct soap*, uddi2__businessEntity &businessEntity);
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREbusiness(struct soap*, std::vector<uddi2__businessEntity*> businessEntities);
+/// Member declared in uddi2-typemap.dat
+    uddi2__businessDetail* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"save_service"
+
+class uddi2__save_USCOREservice
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__businessService* with length 0..unbounded
+    std::vector<uddi2__businessService*> businessService                1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREservice(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREservice(struct soap*, uddi2__businessService &businessService);
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREservice(struct soap*, std::vector<uddi2__businessService*> businessServices);
+/// Member declared in uddi2-typemap.dat
+    uddi2__serviceDetail* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"save_tModel"
+
+class uddi2__save_USCOREtModel
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__tModel* with length 0..unbounded
+    std::vector<uddi2__tModel*         > tModel                         0;
+/// Vector of char* with length 0..unbounded
+    std::vector<char*                  > uploadRegister                 0;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREtModel(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREtModel(struct soap*, uddi2__tModel &tModel);
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREtModel(struct soap*, std::vector<uddi2__tModel*> tModels);
+/// Member declared in uddi2-typemap.dat
+    uddi2__tModelDetail* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"set_publisherAssertions"
+
+class uddi2__set_USCOREpublisherAssertions
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__publisherAssertion* with length 0..unbounded
+    std::vector<uddi2__publisherAssertion*> publisherAssertion             0;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__set_USCOREpublisherAssertions(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__set_USCOREpublisherAssertions(struct soap*, std::vector<uddi2__publisherAssertion*> publisherAssertions);
+/// Member declared in uddi2-typemap.dat
+    uddi2__publisherAssertions* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"validate_values"
+
+class uddi2__validate_USCOREvalues
+{ public:
+// CHOICE OF ELEMENTS:
+/// Vector of uddi2__businessEntity* with length 0..unbounded
+    std::vector<uddi2__businessEntity* > businessEntity                 0;
+/// Vector of uddi2__businessService* with length 0..unbounded
+    std::vector<uddi2__businessService*> businessService                0;
+/// Vector of uddi2__tModel* with length 0..unbounded
+    std::vector<uddi2__tModel*         > tModel                         0;
+// END CHOICE
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"assertionStatusReport"
+
+class uddi2__assertionStatusReport
+{ public:
+/// Vector of uddi2__assertionStatusItem* with length 0..unbounded
+    std::vector<uddi2__assertionStatusItem*> assertionStatusItem            0;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"authToken"
+
+class uddi2__authToken
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"bindingDetail"
+
+class uddi2__bindingDetail
+{ public:
+/// Vector of uddi2__bindingTemplate* with length 0..unbounded
+    std::vector<uddi2__bindingTemplate*> bindingTemplate                0;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessDetail"
+
+class uddi2__businessDetail
+{ public:
+/// Vector of uddi2__businessEntity* with length 0..unbounded
+    std::vector<uddi2__businessEntity* > businessEntity                 0;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessDetailExt"
+
+class uddi2__businessDetailExt
+{ public:
+/// Vector of uddi2__businessEntityExt* with length 0..unbounded
+    std::vector<uddi2__businessEntityExt*> businessEntityExt              1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessList"
+
+class uddi2__businessList
+{ public:
+/// Element reference "urn:uddi-org:api_v2":businessInfos
+    uddi2__businessInfos*                businessInfos                  1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"publisherAssertions"
+
+class uddi2__publisherAssertions
+{ public:
+/// Vector of uddi2__publisherAssertion* with length 0..unbounded
+    std::vector<uddi2__publisherAssertion*> publisherAssertion             0;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute authorizedName of type xs:string
+   @char*                                authorizedName                 1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"registeredInfo"
+
+class uddi2__registeredInfo
+{ public:
+/// Element reference "urn:uddi-org:api_v2":businessInfos
+    uddi2__businessInfos*                businessInfos                  1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":tModelInfos
+    uddi2__tModelInfos*                  tModelInfos                    1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"relatedBusinessesList"
+
+class uddi2__relatedBusinessesList
+{ public:
+/// Element reference "urn:uddi-org:api_v2":businessKey
+    uddi2__businessKey                   businessKey                    1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":relatedBusinessInfos
+    uddi2__relatedBusinessInfos*         relatedBusinessInfos           1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"serviceDetail"
+
+class uddi2__serviceDetail
+{ public:
+/// Vector of uddi2__businessService* with length 0..unbounded
+    std::vector<uddi2__businessService*> businessService                0;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"serviceList"
+
+class uddi2__serviceList
+{ public:
+/// Element reference "urn:uddi-org:api_v2":serviceInfos
+    uddi2__serviceInfos*                 serviceInfos                   1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"tModelDetail"
+
+class uddi2__tModelDetail
+{ public:
+/// Vector of uddi2__tModel* with length 0..unbounded
+    std::vector<uddi2__tModel*         > tModel                         1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"tModelList"
+
+class uddi2__tModelList
+{ public:
+/// Element reference "urn:uddi-org:api_v2":tModelInfos
+    uddi2__tModelInfos*                  tModelInfos                    1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"accessPoint"
+
+class uddi2__accessPoint
+{ public:
+    char*                                __item                        ;
+/// Attribute URLType of type "urn:uddi-org:api_v2":URLType
+   @enum uddi2__URLType                  URLType                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"addressLine"
+
+class uddi2__addressLine
+{ public:
+    char*                                __item                        ;
+/// Attribute keyName of type xs:string
+   @char*                                keyName                        0;	///< Optional attribute
+/// Attribute keyValue of type xs:string
+   @char*                                keyValue                       0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"description"
+
+class uddi2__description
+{ public:
+    char*                                __item                        ;
+/// Attribute reference xml:lang
+   @xml__lang                            xml__lang_                     0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"discoveryURL"
+
+class uddi2__discoveryURL
+{ public:
+    char*                                __item                        ;
+/// Attribute useType of type xs:string
+   @char*                                useType                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"email"
+
+class uddi2__email
+{ public:
+    char*                                __item                        ;
+/// Attribute useType of type xs:string
+   @char*                                useType                        0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"errInfo"
+
+class uddi2__errInfo
+{ public:
+    char*                                __item                        ;
+/// Attribute errCode of type xs:string
+   @char*                                errCode                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"name"
+
+class uddi2__name
+{ public:
+    char*                                __item                        ;
+/// Attribute reference xml:lang
+   @xml__lang                            xml__lang_                     0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"phone"
+
+class uddi2__phone
+{ public:
+    char*                                __item                        ;
+/// Attribute useType of type xs:string
+   @char*                                useType                        0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/******************************************************************************\
+ *                                                                            *
+ * Services                                                                   *
+ *                                                                            *
+\******************************************************************************/
+
+//gsoap inq2 service name:	InquireSoap 
+//gsoap inq2 service type:	Inquire 
+//gsoap inq2 service namespace:	urn:uddi-org:inquiry_v2 
+
+/** @mainpage UDDI_Inquiry_API_V2 Definitions
+
+@section UDDI_Inquiry_API_V2_documentation Documentation
+
+		Copyright (c) 2000 - 2002 by Accenture, Ariba, Inc., Commerce One, Inc. 
+		Fujitsu Limited, Hewlett-Packard Company, i2 Technologies, Inc., 
+		Intel Corporation, International Business Machines Corporation,  
+		Microsoft Corporation, Oracle Corporation, SAP AG, Sun Microsystems, Inc., 
+		and VeriSign, Inc.  All Rights Reserved.
+		
+		WSDL Service Interface for UDDI Inquiry API V2.0    
+		
+		This WSDL document defines the inquiry API calls for interacting with 
+		the UDDI registry.  The complete UDDI API specification is available
+		at http://www.uddi.org/specification.html.
+	
+
+@section UDDI_Inquiry_API_V2_bindings Bindings
+  - @ref InquireSoap
+
+*/
+
+/**
+
+@page InquireSoap Binding "InquireSoap"
+
+@section InquireSoap_operations Operations of Binding  "InquireSoap"
+  - @ref __inq2__find_USCOREbinding
+  - @ref __inq2__find_USCOREbusiness
+  - @ref __inq2__find_USCORErelatedBusinesses
+  - @ref __inq2__find_USCOREservice
+  - @ref __inq2__find_USCOREtModel
+  - @ref __inq2__get_USCOREbindingDetail
+  - @ref __inq2__get_USCOREbusinessDetail
+  - @ref __inq2__get_USCOREbusinessDetailExt
+  - @ref __inq2__get_USCOREserviceDetail
+  - @ref __inq2__get_USCOREtModelDetail
+
+@section InquireSoap_ports Endpoints of Binding  "InquireSoap"
+
+*/
+
+/******************************************************************************\
+ *                                                                            *
+ * SOAP Fault Detail                                                          *
+ *                                                                            *
+\******************************************************************************/
+
+/// The SOAP Fault Detail element contains one of the following types serialized
+// in the __type and fault fields of the SOAP_ENV__Detail struct (see docs)
+class _dispositionReport
+{ public:
+    uddi2__dispositionReport*           uddi2__dispositionReport_;
+    struct soap                         *soap                          ;
+};
+
+/******************************************************************************\
+ *                                                                            *
+ * InquireSoap                                                                *
+ *                                                                            *
+\******************************************************************************/
+
+
+/******************************************************************************\
+ *                                                                            *
+ * __inq2__find_USCOREbinding                                                 *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__inq2__find_USCOREbinding" of service binding "InquireSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="find_binding"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___inq2__find_USCOREbinding(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__find_USCOREbinding*          uddi2__find_USCOREbinding_,
+    // response parameters:
+    uddi2__bindingDetail*               uddi2__bindingDetail_
+  );
+@endcode
+
+C++ proxy class (defined in soapInquireSoapProxy.h):
+  class InquireSoap;
+
+*/
+
+//gsoap inq2 service method-style:	find_USCOREbinding document
+//gsoap inq2 service method-encoding:	find_USCOREbinding literal
+//gsoap inq2 service method-action:	find_USCOREbinding find_binding
+//gsoap inq2 service method-fault:	find_USCOREbinding _dispositionReport
+int __inq2__find_USCOREbinding(
+    uddi2__find_USCOREbinding*          uddi2__find_USCOREbinding_,
+    uddi2__bindingDetail*               uddi2__bindingDetail_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __inq2__find_USCOREbusiness                                                *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__inq2__find_USCOREbusiness" of service binding "InquireSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="find_business"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___inq2__find_USCOREbusiness(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__find_USCOREbusiness*         uddi2__find_USCOREbusiness_,
+    // response parameters:
+    uddi2__businessList*                uddi2__businessList_
+  );
+@endcode
+
+C++ proxy class (defined in soapInquireSoapProxy.h):
+  class InquireSoap;
+
+*/
+
+//gsoap inq2 service method-style:	find_USCOREbusiness document
+//gsoap inq2 service method-encoding:	find_USCOREbusiness literal
+//gsoap inq2 service method-action:	find_USCOREbusiness find_business
+//gsoap inq2 service method-fault:	find_USCOREbusiness _dispositionReport
+int __inq2__find_USCOREbusiness(
+    uddi2__find_USCOREbusiness*         uddi2__find_USCOREbusiness_,
+    uddi2__businessList*                uddi2__businessList_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __inq2__find_USCORErelatedBusinesses                                       *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__inq2__find_USCORErelatedBusinesses" of service binding "InquireSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="find_relatedBusinesses"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___inq2__find_USCORErelatedBusinesses(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__find_USCORErelatedBusinesses* uddi2__find_USCORErelatedBusinesses_,
+    // response parameters:
+    uddi2__relatedBusinessesList*       uddi2__relatedBusinessesList_
+  );
+@endcode
+
+C++ proxy class (defined in soapInquireSoapProxy.h):
+  class InquireSoap;
+
+*/
+
+//gsoap inq2 service method-style:	find_USCORErelatedBusinesses document
+//gsoap inq2 service method-encoding:	find_USCORErelatedBusinesses literal
+//gsoap inq2 service method-action:	find_USCORErelatedBusinesses find_relatedBusinesses
+//gsoap inq2 service method-fault:	find_USCORErelatedBusinesses _dispositionReport
+int __inq2__find_USCORErelatedBusinesses(
+    uddi2__find_USCORErelatedBusinesses* uddi2__find_USCORErelatedBusinesses_,
+    uddi2__relatedBusinessesList*       uddi2__relatedBusinessesList_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __inq2__find_USCOREservice                                                 *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__inq2__find_USCOREservice" of service binding "InquireSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="find_service"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___inq2__find_USCOREservice(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__find_USCOREservice*          uddi2__find_USCOREservice_,
+    // response parameters:
+    uddi2__serviceList*                 uddi2__serviceList_
+  );
+@endcode
+
+C++ proxy class (defined in soapInquireSoapProxy.h):
+  class InquireSoap;
+
+*/
+
+//gsoap inq2 service method-style:	find_USCOREservice document
+//gsoap inq2 service method-encoding:	find_USCOREservice literal
+//gsoap inq2 service method-action:	find_USCOREservice find_service
+//gsoap inq2 service method-fault:	find_USCOREservice _dispositionReport
+int __inq2__find_USCOREservice(
+    uddi2__find_USCOREservice*          uddi2__find_USCOREservice_,
+    uddi2__serviceList*                 uddi2__serviceList_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __inq2__find_USCOREtModel                                                  *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__inq2__find_USCOREtModel" of service binding "InquireSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="find_tModel"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___inq2__find_USCOREtModel(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__find_USCOREtModel*           uddi2__find_USCOREtModel_,
+    // response parameters:
+    uddi2__tModelList*                  uddi2__tModelList_
+  );
+@endcode
+
+C++ proxy class (defined in soapInquireSoapProxy.h):
+  class InquireSoap;
+
+*/
+
+//gsoap inq2 service method-style:	find_USCOREtModel document
+//gsoap inq2 service method-encoding:	find_USCOREtModel literal
+//gsoap inq2 service method-action:	find_USCOREtModel find_tModel
+//gsoap inq2 service method-fault:	find_USCOREtModel _dispositionReport
+int __inq2__find_USCOREtModel(
+    uddi2__find_USCOREtModel*           uddi2__find_USCOREtModel_,
+    uddi2__tModelList*                  uddi2__tModelList_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __inq2__get_USCOREbindingDetail                                            *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__inq2__get_USCOREbindingDetail" of service binding "InquireSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="get_bindingDetail"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___inq2__get_USCOREbindingDetail(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__get_USCOREbindingDetail*     uddi2__get_USCOREbindingDetail_,
+    // response parameters:
+    uddi2__bindingDetail*               uddi2__bindingDetail_
+  );
+@endcode
+
+C++ proxy class (defined in soapInquireSoapProxy.h):
+  class InquireSoap;
+
+*/
+
+//gsoap inq2 service method-style:	get_USCOREbindingDetail document
+//gsoap inq2 service method-encoding:	get_USCOREbindingDetail literal
+//gsoap inq2 service method-action:	get_USCOREbindingDetail get_bindingDetail
+//gsoap inq2 service method-fault:	get_USCOREbindingDetail _dispositionReport
+int __inq2__get_USCOREbindingDetail(
+    uddi2__get_USCOREbindingDetail*     uddi2__get_USCOREbindingDetail_,
+    uddi2__bindingDetail*               uddi2__bindingDetail_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __inq2__get_USCOREbusinessDetail                                           *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__inq2__get_USCOREbusinessDetail" of service binding "InquireSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="get_businessDetail"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___inq2__get_USCOREbusinessDetail(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__get_USCOREbusinessDetail*    uddi2__get_USCOREbusinessDetail_,
+    // response parameters:
+    uddi2__businessDetail*              uddi2__businessDetail_
+  );
+@endcode
+
+C++ proxy class (defined in soapInquireSoapProxy.h):
+  class InquireSoap;
+
+*/
+
+//gsoap inq2 service method-style:	get_USCOREbusinessDetail document
+//gsoap inq2 service method-encoding:	get_USCOREbusinessDetail literal
+//gsoap inq2 service method-action:	get_USCOREbusinessDetail get_businessDetail
+//gsoap inq2 service method-fault:	get_USCOREbusinessDetail _dispositionReport
+int __inq2__get_USCOREbusinessDetail(
+    uddi2__get_USCOREbusinessDetail*    uddi2__get_USCOREbusinessDetail_,
+    uddi2__businessDetail*              uddi2__businessDetail_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __inq2__get_USCOREbusinessDetailExt                                        *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__inq2__get_USCOREbusinessDetailExt" of service binding "InquireSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="get_businessDetailExt"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___inq2__get_USCOREbusinessDetailExt(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__get_USCOREbusinessDetailExt* uddi2__get_USCOREbusinessDetailExt_,
+    // response parameters:
+    uddi2__businessDetailExt*           uddi2__businessDetailExt_
+  );
+@endcode
+
+C++ proxy class (defined in soapInquireSoapProxy.h):
+  class InquireSoap;
+
+*/
+
+//gsoap inq2 service method-style:	get_USCOREbusinessDetailExt document
+//gsoap inq2 service method-encoding:	get_USCOREbusinessDetailExt literal
+//gsoap inq2 service method-action:	get_USCOREbusinessDetailExt get_businessDetailExt
+//gsoap inq2 service method-fault:	get_USCOREbusinessDetailExt _dispositionReport
+int __inq2__get_USCOREbusinessDetailExt(
+    uddi2__get_USCOREbusinessDetailExt* uddi2__get_USCOREbusinessDetailExt_,
+    uddi2__businessDetailExt*           uddi2__businessDetailExt_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __inq2__get_USCOREserviceDetail                                            *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__inq2__get_USCOREserviceDetail" of service binding "InquireSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="get_serviceDetail"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___inq2__get_USCOREserviceDetail(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__get_USCOREserviceDetail*     uddi2__get_USCOREserviceDetail_,
+    // response parameters:
+    uddi2__serviceDetail*               uddi2__serviceDetail_
+  );
+@endcode
+
+C++ proxy class (defined in soapInquireSoapProxy.h):
+  class InquireSoap;
+
+*/
+
+//gsoap inq2 service method-style:	get_USCOREserviceDetail document
+//gsoap inq2 service method-encoding:	get_USCOREserviceDetail literal
+//gsoap inq2 service method-action:	get_USCOREserviceDetail get_serviceDetail
+//gsoap inq2 service method-fault:	get_USCOREserviceDetail _dispositionReport
+int __inq2__get_USCOREserviceDetail(
+    uddi2__get_USCOREserviceDetail*     uddi2__get_USCOREserviceDetail_,
+    uddi2__serviceDetail*               uddi2__serviceDetail_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __inq2__get_USCOREtModelDetail                                             *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__inq2__get_USCOREtModelDetail" of service binding "InquireSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="get_tModelDetail"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___inq2__get_USCOREtModelDetail(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__get_USCOREtModelDetail*      uddi2__get_USCOREtModelDetail_,
+    // response parameters:
+    uddi2__tModelDetail*                uddi2__tModelDetail_
+  );
+@endcode
+
+C++ proxy class (defined in soapInquireSoapProxy.h):
+  class InquireSoap;
+
+*/
+
+//gsoap inq2 service method-style:	get_USCOREtModelDetail document
+//gsoap inq2 service method-encoding:	get_USCOREtModelDetail literal
+//gsoap inq2 service method-action:	get_USCOREtModelDetail get_tModelDetail
+//gsoap inq2 service method-fault:	get_USCOREtModelDetail _dispositionReport
+int __inq2__get_USCOREtModelDetail(
+    uddi2__get_USCOREtModelDetail*      uddi2__get_USCOREtModelDetail_,
+    uddi2__tModelDetail*                uddi2__tModelDetail_ ///< response parameter
+);
+
+/* End of inquire_v2.h */
diff --git a/uddi2/inquire_v2.wsdl b/uddi2/inquire_v2.wsdl
new file mode 100644
index 0000000..49abe1b
--- /dev/null
+++ b/uddi2/inquire_v2.wsdl
@@ -0,0 +1,261 @@
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:uddi-org:inquiry_v2" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:uddi="urn:uddi-org:api_v2" targetNamespace="urn:uddi-org:inquiry_v2" name="UDDI_Inquiry_API_V2">
+	<documentation>
+		Copyright (c) 2000 - 2002 by Accenture, Ariba, Inc., Commerce One, Inc. 
+		Fujitsu Limited, Hewlett-Packard Company, i2 Technologies, Inc., 
+		Intel Corporation, International Business Machines Corporation,  
+		Microsoft Corporation, Oracle Corporation, SAP AG, Sun Microsystems, Inc., 
+		and VeriSign, Inc.  All Rights Reserved.
+		
+		WSDL Service Interface for UDDI Inquiry API V2.0    
+		
+		This WSDL document defines the inquiry API calls for interacting with 
+		the UDDI registry.  The complete UDDI API specification is available
+		at http://www.uddi.org/specification.html.
+	</documentation>
+	<types>
+		<xsd:schema targetNamespace="urn:uddi-org:inquiry_v2" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+			<xsd:import namespace="urn:uddi-org:api_v2" schemaLocation="uddi_v2.xsd"/>
+		</xsd:schema>
+	</types>
+	<message name="bindingDetail">
+		<part name="body" element="uddi:bindingDetail"/>
+	</message>
+	<message name="businessDetail">
+		<part name="body" element="uddi:businessDetail"/>
+	</message>
+	<message name="businessDetailExt">
+		<part name="body" element="uddi:businessDetailExt"/>
+	</message>
+	<message name="businessList">
+		<part name="body" element="uddi:businessList"/>
+	</message>
+	<message name="dispositionReport">
+		<part name="body" element="uddi:dispositionReport"/>
+	</message>
+	<message name="find_binding">
+		<part name="body" element="uddi:find_binding"/>
+	</message>
+	<message name="find_business">
+		<part name="body" element="uddi:find_business"/>
+	</message>
+	<message name="find_relatedBusinesses">
+		<part name="body" element="uddi:find_relatedBusinesses"/>
+	</message>
+	<message name="find_service">
+		<part name="body" element="uddi:find_service"/>
+	</message>
+	<message name="find_tModel">
+		<part name="body" element="uddi:find_tModel"/>
+	</message>
+	<message name="get_bindingDetail">
+		<part name="body" element="uddi:get_bindingDetail"/>
+	</message>
+	<message name="get_businessDetail">
+		<part name="body" element="uddi:get_businessDetail"/>
+	</message>
+	<message name="get_businessDetailExt">
+		<part name="body" element="uddi:get_businessDetailExt"/>
+	</message>
+	<message name="get_serviceDetail">
+		<part name="body" element="uddi:get_serviceDetail"/>
+	</message>
+	<message name="get_tModelDetail">
+		<part name="body" element="uddi:get_tModelDetail"/>
+	</message>
+	<message name="relatedBusinessesList">
+		<part name="body" element="uddi:relatedBusinessesList"/>
+	</message>
+	<message name="serviceDetail">
+		<part name="body" element="uddi:serviceDetail"/>
+	</message>
+	<message name="serviceList">
+		<part name="body" element="uddi:serviceList"/>
+	</message>
+	<message name="tModelDetail">
+		<part name="body" element="uddi:tModelDetail"/>
+	</message>
+	<message name="tModelList">
+		<part name="body" element="uddi:tModelList"/>
+	</message>
+	<portType name="Inquire">
+		<documentation>
+			This portType defines all of the UDDI inquiry operations.
+	  </documentation>
+		<operation name="find_binding">
+			<input message="tns:find_binding"/>
+			<output message="tns:bindingDetail"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+		<operation name="find_business">
+			<input message="tns:find_business"/>
+			<output message="tns:businessList"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+		<operation name="find_relatedBusinesses">
+			<input message="tns:find_relatedBusinesses"/>
+			<output message="tns:relatedBusinessesList"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+		<operation name="find_service">
+			<input message="tns:find_service"/>
+			<output message="tns:serviceList"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+		<operation name="find_tModel">
+			<input message="tns:find_tModel"/>
+			<output message="tns:tModelList"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+		<operation name="get_bindingDetail">
+			<input message="tns:get_bindingDetail"/>
+			<output message="tns:bindingDetail"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+		<operation name="get_businessDetail">
+			<input message="tns:get_businessDetail"/>
+			<output message="tns:businessDetail"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+		<operation name="get_businessDetailExt">
+			<input message="tns:get_businessDetailExt"/>
+			<output message="tns:businessDetailExt"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+		<operation name="get_serviceDetail">
+			<input message="tns:get_serviceDetail"/>
+			<output message="tns:serviceDetail"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+		<operation name="get_tModelDetail">
+			<input message="tns:get_tModelDetail"/>
+			<output message="tns:tModelDetail"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+	</portType>
+	<binding name="InquireSoap" type="tns:Inquire">
+		<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+		<documentation>
+		  This is the SOAP binding for the UDDI inquiry operations.
+		</documentation>
+		<operation name="find_binding">
+			<soap:operation soapAction="find_binding" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="find_business">
+			<soap:operation soapAction="find_business" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="find_relatedBusinesses">
+			<soap:operation soapAction="find_relatedBusinesses" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="find_service">
+			<soap:operation soapAction="find_service" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="find_tModel">
+			<soap:operation soapAction="find_tModel" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="get_bindingDetail">
+			<soap:operation soapAction="get_bindingDetail" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="get_businessDetail">
+			<soap:operation soapAction="get_businessDetail" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="get_businessDetailExt">
+			<soap:operation soapAction="get_businessDetailExt" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="get_serviceDetail">
+			<soap:operation soapAction="get_serviceDetail" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="get_tModelDetail">
+			<soap:operation soapAction="get_tModelDetail" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+	</binding>
+</definitions>
diff --git a/uddi2/pubH.h b/uddi2/pubH.h
new file mode 100644
index 0000000..a7b0bf3
--- /dev/null
+++ b/uddi2/pubH.h
@@ -0,0 +1,2727 @@
+/* pubH.h
+   Generated by gSOAP 2.7.1 from publish_v2.h
+   Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+   This part of the software is released under one of the following licenses:
+   GPL, the gSOAP public license, or Genivia's license for commercial use.
+*/
+#ifndef pubH_H
+#define pubH_H
+#include "pubStub.h"
+
+SOAP_BEGIN_NAMESPACE(pub)
+SOAP_FMAC3 int SOAP_FMAC4 soap_ignore_element(struct soap*);
+#ifndef WITH_NOIDREF
+SOAP_FMAC3 int SOAP_FMAC4 soap_putindependent(struct soap*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_getindependent(struct soap*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_markelement(struct soap*, const void*, int);
+SOAP_FMAC3 int SOAP_FMAC4 soap_putelement(struct soap*, const void*, const char*, int, int);
+SOAP_FMAC3 void * SOAP_FMAC4 soap_getelement(struct soap*, int*);
+#endif
+SOAP_FMAC3 int SOAP_FMAC4 soap_resolve_attachments(struct soap*);
+
+SOAP_FMAC3 void * SOAP_FMAC4 soap_instantiate(struct soap*, int, const char*, const char*, size_t*);
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_fdelete(struct soap_clist*);
+
+SOAP_FMAC3 void* SOAP_FMAC4 soap_class_id_enter(struct soap*, const char*, void*, int, size_t, const char*, const char*);
+
+SOAP_FMAC3 void* SOAP_FMAC4 soap_container_id_forward(struct soap*, const char*, void*, int, int, size_t, unsigned int);
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_container_insert(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_byte
+#define SOAP_TYPE_byte (2)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_byte(struct soap*, char *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_byte(struct soap*, const char *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_byte(struct soap*, const char*, int, const char *, const char*);
+SOAP_FMAC3 char * SOAP_FMAC4 soap_get_byte(struct soap*, char *, const char*, const char*);
+SOAP_FMAC3 char * SOAP_FMAC4 soap_in_byte(struct soap*, const char*, char *, const char*);
+
+#ifndef SOAP_TYPE_int
+#define SOAP_TYPE_int (1)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_int(struct soap*, int *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_int(struct soap*, const int *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_int(struct soap*, const char*, int, const int *, const char*);
+SOAP_FMAC3 int * SOAP_FMAC4 soap_get_int(struct soap*, int *, const char*, const char*);
+SOAP_FMAC3 int * SOAP_FMAC4 soap_in_int(struct soap*, const char*, int *, const char*);
+
+#ifndef SOAP_TYPE_uddi2__keyType
+#define SOAP_TYPE_uddi2__keyType (99)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_uddi2__keyType(struct soap*, enum uddi2__keyType *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_uddi2__keyType(struct soap*, const enum uddi2__keyType *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__keyType(struct soap*, const char*, int, const enum uddi2__keyType *, const char*);
+
+SOAP_FMAC3S const char* SOAP_FMAC4S soap_uddi2__keyType2s(struct soap*, enum uddi2__keyType);
+SOAP_FMAC3 enum uddi2__keyType * SOAP_FMAC4 soap_get_uddi2__keyType(struct soap*, enum uddi2__keyType *, const char*, const char*);
+SOAP_FMAC3 enum uddi2__keyType * SOAP_FMAC4 soap_in_uddi2__keyType(struct soap*, const char*, enum uddi2__keyType *, const char*);
+
+SOAP_FMAC3S int SOAP_FMAC4S soap_s2uddi2__keyType(struct soap*, const char*, enum uddi2__keyType *);
+
+#ifndef SOAP_TYPE_uddi2__URLType
+#define SOAP_TYPE_uddi2__URLType (98)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_uddi2__URLType(struct soap*, enum uddi2__URLType *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_uddi2__URLType(struct soap*, const enum uddi2__URLType *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__URLType(struct soap*, const char*, int, const enum uddi2__URLType *, const char*);
+
+SOAP_FMAC3S const char* SOAP_FMAC4S soap_uddi2__URLType2s(struct soap*, enum uddi2__URLType);
+SOAP_FMAC3 enum uddi2__URLType * SOAP_FMAC4 soap_get_uddi2__URLType(struct soap*, enum uddi2__URLType *, const char*, const char*);
+SOAP_FMAC3 enum uddi2__URLType * SOAP_FMAC4 soap_in_uddi2__URLType(struct soap*, const char*, enum uddi2__URLType *, const char*);
+
+SOAP_FMAC3S int SOAP_FMAC4S soap_s2uddi2__URLType(struct soap*, const char*, enum uddi2__URLType *);
+
+#ifndef SOAP_TYPE_uddi2__truncated
+#define SOAP_TYPE_uddi2__truncated (97)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_uddi2__truncated(struct soap*, enum uddi2__truncated *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_uddi2__truncated(struct soap*, const enum uddi2__truncated *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__truncated(struct soap*, const char*, int, const enum uddi2__truncated *, const char*);
+
+SOAP_FMAC3S const char* SOAP_FMAC4S soap_uddi2__truncated2s(struct soap*, enum uddi2__truncated);
+SOAP_FMAC3 enum uddi2__truncated * SOAP_FMAC4 soap_get_uddi2__truncated(struct soap*, enum uddi2__truncated *, const char*, const char*);
+SOAP_FMAC3 enum uddi2__truncated * SOAP_FMAC4 soap_in_uddi2__truncated(struct soap*, const char*, enum uddi2__truncated *, const char*);
+
+SOAP_FMAC3S int SOAP_FMAC4S soap_s2uddi2__truncated(struct soap*, const char*, enum uddi2__truncated *);
+
+#ifndef SOAP_TYPE_uddi2__direction
+#define SOAP_TYPE_uddi2__direction (96)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_uddi2__direction(struct soap*, enum uddi2__direction *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_uddi2__direction(struct soap*, const enum uddi2__direction *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__direction(struct soap*, const char*, int, const enum uddi2__direction *, const char*);
+
+SOAP_FMAC3S const char* SOAP_FMAC4S soap_uddi2__direction2s(struct soap*, enum uddi2__direction);
+SOAP_FMAC3 enum uddi2__direction * SOAP_FMAC4 soap_get_uddi2__direction(struct soap*, enum uddi2__direction *, const char*, const char*);
+SOAP_FMAC3 enum uddi2__direction * SOAP_FMAC4 soap_in_uddi2__direction(struct soap*, const char*, enum uddi2__direction *, const char*);
+
+SOAP_FMAC3S int SOAP_FMAC4S soap_s2uddi2__direction(struct soap*, const char*, enum uddi2__direction *);
+
+#ifndef SOAP_TYPE__dispositionReport
+#define SOAP_TYPE__dispositionReport (306)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out__dispositionReport(struct soap*, const char*, int, const _dispositionReport *, const char*);
+SOAP_FMAC3 _dispositionReport * SOAP_FMAC4 soap_get__dispositionReport(struct soap*, _dispositionReport *, const char*, const char*);
+SOAP_FMAC3 _dispositionReport * SOAP_FMAC4 soap_in__dispositionReport(struct soap*, const char*, _dispositionReport *, const char*);
+
+SOAP_FMAC5 _dispositionReport * SOAP_FMAC6 soap_new__dispositionReport(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete__dispositionReport(struct soap*, _dispositionReport*);
+SOAP_FMAC5 _dispositionReport * SOAP_FMAC6 soap_instantiate__dispositionReport(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy__dispositionReport(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__tModelList
+#define SOAP_TYPE_uddi2__tModelList (91)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__tModelList(struct soap*, const char*, int, const uddi2__tModelList *, const char*);
+SOAP_FMAC3 uddi2__tModelList * SOAP_FMAC4 soap_get_uddi2__tModelList(struct soap*, uddi2__tModelList *, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelList * SOAP_FMAC4 soap_in_uddi2__tModelList(struct soap*, const char*, uddi2__tModelList *, const char*);
+
+SOAP_FMAC5 uddi2__tModelList * SOAP_FMAC6 soap_new_uddi2__tModelList(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__tModelList(struct soap*, uddi2__tModelList*);
+SOAP_FMAC5 uddi2__tModelList * SOAP_FMAC6 soap_instantiate_uddi2__tModelList(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__tModelList(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__tModelDetail
+#define SOAP_TYPE_uddi2__tModelDetail (90)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__tModelDetail(struct soap*, const char*, int, const uddi2__tModelDetail *, const char*);
+SOAP_FMAC3 uddi2__tModelDetail * SOAP_FMAC4 soap_get_uddi2__tModelDetail(struct soap*, uddi2__tModelDetail *, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelDetail * SOAP_FMAC4 soap_in_uddi2__tModelDetail(struct soap*, const char*, uddi2__tModelDetail *, const char*);
+
+SOAP_FMAC5 uddi2__tModelDetail * SOAP_FMAC6 soap_new_uddi2__tModelDetail(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__tModelDetail(struct soap*, uddi2__tModelDetail*);
+SOAP_FMAC5 uddi2__tModelDetail * SOAP_FMAC6 soap_instantiate_uddi2__tModelDetail(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__tModelDetail(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__serviceList
+#define SOAP_TYPE_uddi2__serviceList (89)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__serviceList(struct soap*, const char*, int, const uddi2__serviceList *, const char*);
+SOAP_FMAC3 uddi2__serviceList * SOAP_FMAC4 soap_get_uddi2__serviceList(struct soap*, uddi2__serviceList *, const char*, const char*);
+SOAP_FMAC3 uddi2__serviceList * SOAP_FMAC4 soap_in_uddi2__serviceList(struct soap*, const char*, uddi2__serviceList *, const char*);
+
+SOAP_FMAC5 uddi2__serviceList * SOAP_FMAC6 soap_new_uddi2__serviceList(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__serviceList(struct soap*, uddi2__serviceList*);
+SOAP_FMAC5 uddi2__serviceList * SOAP_FMAC6 soap_instantiate_uddi2__serviceList(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__serviceList(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__serviceDetail
+#define SOAP_TYPE_uddi2__serviceDetail (88)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__serviceDetail(struct soap*, const char*, int, const uddi2__serviceDetail *, const char*);
+SOAP_FMAC3 uddi2__serviceDetail * SOAP_FMAC4 soap_get_uddi2__serviceDetail(struct soap*, uddi2__serviceDetail *, const char*, const char*);
+SOAP_FMAC3 uddi2__serviceDetail * SOAP_FMAC4 soap_in_uddi2__serviceDetail(struct soap*, const char*, uddi2__serviceDetail *, const char*);
+
+SOAP_FMAC5 uddi2__serviceDetail * SOAP_FMAC6 soap_new_uddi2__serviceDetail(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__serviceDetail(struct soap*, uddi2__serviceDetail*);
+SOAP_FMAC5 uddi2__serviceDetail * SOAP_FMAC6 soap_instantiate_uddi2__serviceDetail(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__serviceDetail(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__relatedBusinessesList
+#define SOAP_TYPE_uddi2__relatedBusinessesList (87)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__relatedBusinessesList(struct soap*, const char*, int, const uddi2__relatedBusinessesList *, const char*);
+SOAP_FMAC3 uddi2__relatedBusinessesList * SOAP_FMAC4 soap_get_uddi2__relatedBusinessesList(struct soap*, uddi2__relatedBusinessesList *, const char*, const char*);
+SOAP_FMAC3 uddi2__relatedBusinessesList * SOAP_FMAC4 soap_in_uddi2__relatedBusinessesList(struct soap*, const char*, uddi2__relatedBusinessesList *, const char*);
+
+SOAP_FMAC5 uddi2__relatedBusinessesList * SOAP_FMAC6 soap_new_uddi2__relatedBusinessesList(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__relatedBusinessesList(struct soap*, uddi2__relatedBusinessesList*);
+SOAP_FMAC5 uddi2__relatedBusinessesList * SOAP_FMAC6 soap_instantiate_uddi2__relatedBusinessesList(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__relatedBusinessesList(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__registeredInfo
+#define SOAP_TYPE_uddi2__registeredInfo (86)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__registeredInfo(struct soap*, const char*, int, const uddi2__registeredInfo *, const char*);
+SOAP_FMAC3 uddi2__registeredInfo * SOAP_FMAC4 soap_get_uddi2__registeredInfo(struct soap*, uddi2__registeredInfo *, const char*, const char*);
+SOAP_FMAC3 uddi2__registeredInfo * SOAP_FMAC4 soap_in_uddi2__registeredInfo(struct soap*, const char*, uddi2__registeredInfo *, const char*);
+
+SOAP_FMAC5 uddi2__registeredInfo * SOAP_FMAC6 soap_new_uddi2__registeredInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__registeredInfo(struct soap*, uddi2__registeredInfo*);
+SOAP_FMAC5 uddi2__registeredInfo * SOAP_FMAC6 soap_instantiate_uddi2__registeredInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__registeredInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__publisherAssertions
+#define SOAP_TYPE_uddi2__publisherAssertions (85)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__publisherAssertions(struct soap*, const char*, int, const uddi2__publisherAssertions *, const char*);
+SOAP_FMAC3 uddi2__publisherAssertions * SOAP_FMAC4 soap_get_uddi2__publisherAssertions(struct soap*, uddi2__publisherAssertions *, const char*, const char*);
+SOAP_FMAC3 uddi2__publisherAssertions * SOAP_FMAC4 soap_in_uddi2__publisherAssertions(struct soap*, const char*, uddi2__publisherAssertions *, const char*);
+
+SOAP_FMAC5 uddi2__publisherAssertions * SOAP_FMAC6 soap_new_uddi2__publisherAssertions(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__publisherAssertions(struct soap*, uddi2__publisherAssertions*);
+SOAP_FMAC5 uddi2__publisherAssertions * SOAP_FMAC6 soap_instantiate_uddi2__publisherAssertions(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__publisherAssertions(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__businessList
+#define SOAP_TYPE_uddi2__businessList (84)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__businessList(struct soap*, const char*, int, const uddi2__businessList *, const char*);
+SOAP_FMAC3 uddi2__businessList * SOAP_FMAC4 soap_get_uddi2__businessList(struct soap*, uddi2__businessList *, const char*, const char*);
+SOAP_FMAC3 uddi2__businessList * SOAP_FMAC4 soap_in_uddi2__businessList(struct soap*, const char*, uddi2__businessList *, const char*);
+
+SOAP_FMAC5 uddi2__businessList * SOAP_FMAC6 soap_new_uddi2__businessList(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__businessList(struct soap*, uddi2__businessList*);
+SOAP_FMAC5 uddi2__businessList * SOAP_FMAC6 soap_instantiate_uddi2__businessList(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__businessList(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__businessDetailExt
+#define SOAP_TYPE_uddi2__businessDetailExt (83)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__businessDetailExt(struct soap*, const char*, int, const uddi2__businessDetailExt *, const char*);
+SOAP_FMAC3 uddi2__businessDetailExt * SOAP_FMAC4 soap_get_uddi2__businessDetailExt(struct soap*, uddi2__businessDetailExt *, const char*, const char*);
+SOAP_FMAC3 uddi2__businessDetailExt * SOAP_FMAC4 soap_in_uddi2__businessDetailExt(struct soap*, const char*, uddi2__businessDetailExt *, const char*);
+
+SOAP_FMAC5 uddi2__businessDetailExt * SOAP_FMAC6 soap_new_uddi2__businessDetailExt(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__businessDetailExt(struct soap*, uddi2__businessDetailExt*);
+SOAP_FMAC5 uddi2__businessDetailExt * SOAP_FMAC6 soap_instantiate_uddi2__businessDetailExt(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__businessDetailExt(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__businessDetail
+#define SOAP_TYPE_uddi2__businessDetail (82)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__businessDetail(struct soap*, const char*, int, const uddi2__businessDetail *, const char*);
+SOAP_FMAC3 uddi2__businessDetail * SOAP_FMAC4 soap_get_uddi2__businessDetail(struct soap*, uddi2__businessDetail *, const char*, const char*);
+SOAP_FMAC3 uddi2__businessDetail * SOAP_FMAC4 soap_in_uddi2__businessDetail(struct soap*, const char*, uddi2__businessDetail *, const char*);
+
+SOAP_FMAC5 uddi2__businessDetail * SOAP_FMAC6 soap_new_uddi2__businessDetail(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__businessDetail(struct soap*, uddi2__businessDetail*);
+SOAP_FMAC5 uddi2__businessDetail * SOAP_FMAC6 soap_instantiate_uddi2__businessDetail(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__businessDetail(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__bindingDetail
+#define SOAP_TYPE_uddi2__bindingDetail (81)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__bindingDetail(struct soap*, const char*, int, const uddi2__bindingDetail *, const char*);
+SOAP_FMAC3 uddi2__bindingDetail * SOAP_FMAC4 soap_get_uddi2__bindingDetail(struct soap*, uddi2__bindingDetail *, const char*, const char*);
+SOAP_FMAC3 uddi2__bindingDetail * SOAP_FMAC4 soap_in_uddi2__bindingDetail(struct soap*, const char*, uddi2__bindingDetail *, const char*);
+
+SOAP_FMAC5 uddi2__bindingDetail * SOAP_FMAC6 soap_new_uddi2__bindingDetail(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__bindingDetail(struct soap*, uddi2__bindingDetail*);
+SOAP_FMAC5 uddi2__bindingDetail * SOAP_FMAC6 soap_instantiate_uddi2__bindingDetail(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__bindingDetail(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__authToken
+#define SOAP_TYPE_uddi2__authToken (80)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__authToken(struct soap*, const char*, int, const uddi2__authToken *, const char*);
+SOAP_FMAC3 uddi2__authToken * SOAP_FMAC4 soap_get_uddi2__authToken(struct soap*, uddi2__authToken *, const char*, const char*);
+SOAP_FMAC3 uddi2__authToken * SOAP_FMAC4 soap_in_uddi2__authToken(struct soap*, const char*, uddi2__authToken *, const char*);
+
+SOAP_FMAC5 uddi2__authToken * SOAP_FMAC6 soap_new_uddi2__authToken(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__authToken(struct soap*, uddi2__authToken*);
+SOAP_FMAC5 uddi2__authToken * SOAP_FMAC6 soap_instantiate_uddi2__authToken(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__authToken(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__assertionStatusReport
+#define SOAP_TYPE_uddi2__assertionStatusReport (79)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__assertionStatusReport(struct soap*, const char*, int, const uddi2__assertionStatusReport *, const char*);
+SOAP_FMAC3 uddi2__assertionStatusReport * SOAP_FMAC4 soap_get_uddi2__assertionStatusReport(struct soap*, uddi2__assertionStatusReport *, const char*, const char*);
+SOAP_FMAC3 uddi2__assertionStatusReport * SOAP_FMAC4 soap_in_uddi2__assertionStatusReport(struct soap*, const char*, uddi2__assertionStatusReport *, const char*);
+
+SOAP_FMAC5 uddi2__assertionStatusReport * SOAP_FMAC6 soap_new_uddi2__assertionStatusReport(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__assertionStatusReport(struct soap*, uddi2__assertionStatusReport*);
+SOAP_FMAC5 uddi2__assertionStatusReport * SOAP_FMAC6 soap_instantiate_uddi2__assertionStatusReport(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__assertionStatusReport(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__validate_USCOREvalues
+#define SOAP_TYPE_uddi2__validate_USCOREvalues (78)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__validate_USCOREvalues(struct soap*, const char*, int, const uddi2__validate_USCOREvalues *, const char*);
+SOAP_FMAC3 uddi2__validate_USCOREvalues * SOAP_FMAC4 soap_get_uddi2__validate_USCOREvalues(struct soap*, uddi2__validate_USCOREvalues *, const char*, const char*);
+SOAP_FMAC3 uddi2__validate_USCOREvalues * SOAP_FMAC4 soap_in_uddi2__validate_USCOREvalues(struct soap*, const char*, uddi2__validate_USCOREvalues *, const char*);
+
+SOAP_FMAC5 uddi2__validate_USCOREvalues * SOAP_FMAC6 soap_new_uddi2__validate_USCOREvalues(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__validate_USCOREvalues(struct soap*, uddi2__validate_USCOREvalues*);
+SOAP_FMAC5 uddi2__validate_USCOREvalues * SOAP_FMAC6 soap_instantiate_uddi2__validate_USCOREvalues(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__validate_USCOREvalues(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__set_USCOREpublisherAssertions
+#define SOAP_TYPE_uddi2__set_USCOREpublisherAssertions (77)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__set_USCOREpublisherAssertions(struct soap*, const char*, int, const uddi2__set_USCOREpublisherAssertions *, const char*);
+SOAP_FMAC3 uddi2__set_USCOREpublisherAssertions * SOAP_FMAC4 soap_get_uddi2__set_USCOREpublisherAssertions(struct soap*, uddi2__set_USCOREpublisherAssertions *, const char*, const char*);
+SOAP_FMAC3 uddi2__set_USCOREpublisherAssertions * SOAP_FMAC4 soap_in_uddi2__set_USCOREpublisherAssertions(struct soap*, const char*, uddi2__set_USCOREpublisherAssertions *, const char*);
+
+SOAP_FMAC5 uddi2__set_USCOREpublisherAssertions * SOAP_FMAC6 soap_new_uddi2__set_USCOREpublisherAssertions(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__set_USCOREpublisherAssertions(struct soap*, uddi2__set_USCOREpublisherAssertions*);
+SOAP_FMAC5 uddi2__set_USCOREpublisherAssertions * SOAP_FMAC6 soap_instantiate_uddi2__set_USCOREpublisherAssertions(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__set_USCOREpublisherAssertions(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__save_USCOREtModel
+#define SOAP_TYPE_uddi2__save_USCOREtModel (76)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__save_USCOREtModel(struct soap*, const char*, int, const uddi2__save_USCOREtModel *, const char*);
+SOAP_FMAC3 uddi2__save_USCOREtModel * SOAP_FMAC4 soap_get_uddi2__save_USCOREtModel(struct soap*, uddi2__save_USCOREtModel *, const char*, const char*);
+SOAP_FMAC3 uddi2__save_USCOREtModel * SOAP_FMAC4 soap_in_uddi2__save_USCOREtModel(struct soap*, const char*, uddi2__save_USCOREtModel *, const char*);
+
+SOAP_FMAC5 uddi2__save_USCOREtModel * SOAP_FMAC6 soap_new_uddi2__save_USCOREtModel(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__save_USCOREtModel(struct soap*, uddi2__save_USCOREtModel*);
+SOAP_FMAC5 uddi2__save_USCOREtModel * SOAP_FMAC6 soap_instantiate_uddi2__save_USCOREtModel(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__save_USCOREtModel(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__save_USCOREservice
+#define SOAP_TYPE_uddi2__save_USCOREservice (75)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__save_USCOREservice(struct soap*, const char*, int, const uddi2__save_USCOREservice *, const char*);
+SOAP_FMAC3 uddi2__save_USCOREservice * SOAP_FMAC4 soap_get_uddi2__save_USCOREservice(struct soap*, uddi2__save_USCOREservice *, const char*, const char*);
+SOAP_FMAC3 uddi2__save_USCOREservice * SOAP_FMAC4 soap_in_uddi2__save_USCOREservice(struct soap*, const char*, uddi2__save_USCOREservice *, const char*);
+
+SOAP_FMAC5 uddi2__save_USCOREservice * SOAP_FMAC6 soap_new_uddi2__save_USCOREservice(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__save_USCOREservice(struct soap*, uddi2__save_USCOREservice*);
+SOAP_FMAC5 uddi2__save_USCOREservice * SOAP_FMAC6 soap_instantiate_uddi2__save_USCOREservice(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__save_USCOREservice(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__save_USCOREbusiness
+#define SOAP_TYPE_uddi2__save_USCOREbusiness (74)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__save_USCOREbusiness(struct soap*, const char*, int, const uddi2__save_USCOREbusiness *, const char*);
+SOAP_FMAC3 uddi2__save_USCOREbusiness * SOAP_FMAC4 soap_get_uddi2__save_USCOREbusiness(struct soap*, uddi2__save_USCOREbusiness *, const char*, const char*);
+SOAP_FMAC3 uddi2__save_USCOREbusiness * SOAP_FMAC4 soap_in_uddi2__save_USCOREbusiness(struct soap*, const char*, uddi2__save_USCOREbusiness *, const char*);
+
+SOAP_FMAC5 uddi2__save_USCOREbusiness * SOAP_FMAC6 soap_new_uddi2__save_USCOREbusiness(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__save_USCOREbusiness(struct soap*, uddi2__save_USCOREbusiness*);
+SOAP_FMAC5 uddi2__save_USCOREbusiness * SOAP_FMAC6 soap_instantiate_uddi2__save_USCOREbusiness(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__save_USCOREbusiness(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__save_USCOREbinding
+#define SOAP_TYPE_uddi2__save_USCOREbinding (73)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__save_USCOREbinding(struct soap*, const char*, int, const uddi2__save_USCOREbinding *, const char*);
+SOAP_FMAC3 uddi2__save_USCOREbinding * SOAP_FMAC4 soap_get_uddi2__save_USCOREbinding(struct soap*, uddi2__save_USCOREbinding *, const char*, const char*);
+SOAP_FMAC3 uddi2__save_USCOREbinding * SOAP_FMAC4 soap_in_uddi2__save_USCOREbinding(struct soap*, const char*, uddi2__save_USCOREbinding *, const char*);
+
+SOAP_FMAC5 uddi2__save_USCOREbinding * SOAP_FMAC6 soap_new_uddi2__save_USCOREbinding(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__save_USCOREbinding(struct soap*, uddi2__save_USCOREbinding*);
+SOAP_FMAC5 uddi2__save_USCOREbinding * SOAP_FMAC6 soap_instantiate_uddi2__save_USCOREbinding(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__save_USCOREbinding(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__get_USCOREtModelDetail
+#define SOAP_TYPE_uddi2__get_USCOREtModelDetail (72)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__get_USCOREtModelDetail(struct soap*, const char*, int, const uddi2__get_USCOREtModelDetail *, const char*);
+SOAP_FMAC3 uddi2__get_USCOREtModelDetail * SOAP_FMAC4 soap_get_uddi2__get_USCOREtModelDetail(struct soap*, uddi2__get_USCOREtModelDetail *, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREtModelDetail * SOAP_FMAC4 soap_in_uddi2__get_USCOREtModelDetail(struct soap*, const char*, uddi2__get_USCOREtModelDetail *, const char*);
+
+SOAP_FMAC5 uddi2__get_USCOREtModelDetail * SOAP_FMAC6 soap_new_uddi2__get_USCOREtModelDetail(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__get_USCOREtModelDetail(struct soap*, uddi2__get_USCOREtModelDetail*);
+SOAP_FMAC5 uddi2__get_USCOREtModelDetail * SOAP_FMAC6 soap_instantiate_uddi2__get_USCOREtModelDetail(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__get_USCOREtModelDetail(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__get_USCOREserviceDetail
+#define SOAP_TYPE_uddi2__get_USCOREserviceDetail (71)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__get_USCOREserviceDetail(struct soap*, const char*, int, const uddi2__get_USCOREserviceDetail *, const char*);
+SOAP_FMAC3 uddi2__get_USCOREserviceDetail * SOAP_FMAC4 soap_get_uddi2__get_USCOREserviceDetail(struct soap*, uddi2__get_USCOREserviceDetail *, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREserviceDetail * SOAP_FMAC4 soap_in_uddi2__get_USCOREserviceDetail(struct soap*, const char*, uddi2__get_USCOREserviceDetail *, const char*);
+
+SOAP_FMAC5 uddi2__get_USCOREserviceDetail * SOAP_FMAC6 soap_new_uddi2__get_USCOREserviceDetail(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__get_USCOREserviceDetail(struct soap*, uddi2__get_USCOREserviceDetail*);
+SOAP_FMAC5 uddi2__get_USCOREserviceDetail * SOAP_FMAC6 soap_instantiate_uddi2__get_USCOREserviceDetail(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__get_USCOREserviceDetail(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__get_USCOREregisteredInfo
+#define SOAP_TYPE_uddi2__get_USCOREregisteredInfo (70)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__get_USCOREregisteredInfo(struct soap*, const char*, int, const uddi2__get_USCOREregisteredInfo *, const char*);
+SOAP_FMAC3 uddi2__get_USCOREregisteredInfo * SOAP_FMAC4 soap_get_uddi2__get_USCOREregisteredInfo(struct soap*, uddi2__get_USCOREregisteredInfo *, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREregisteredInfo * SOAP_FMAC4 soap_in_uddi2__get_USCOREregisteredInfo(struct soap*, const char*, uddi2__get_USCOREregisteredInfo *, const char*);
+
+SOAP_FMAC5 uddi2__get_USCOREregisteredInfo * SOAP_FMAC6 soap_new_uddi2__get_USCOREregisteredInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__get_USCOREregisteredInfo(struct soap*, uddi2__get_USCOREregisteredInfo*);
+SOAP_FMAC5 uddi2__get_USCOREregisteredInfo * SOAP_FMAC6 soap_instantiate_uddi2__get_USCOREregisteredInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__get_USCOREregisteredInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__get_USCOREpublisherAssertions
+#define SOAP_TYPE_uddi2__get_USCOREpublisherAssertions (69)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__get_USCOREpublisherAssertions(struct soap*, const char*, int, const uddi2__get_USCOREpublisherAssertions *, const char*);
+SOAP_FMAC3 uddi2__get_USCOREpublisherAssertions * SOAP_FMAC4 soap_get_uddi2__get_USCOREpublisherAssertions(struct soap*, uddi2__get_USCOREpublisherAssertions *, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREpublisherAssertions * SOAP_FMAC4 soap_in_uddi2__get_USCOREpublisherAssertions(struct soap*, const char*, uddi2__get_USCOREpublisherAssertions *, const char*);
+
+SOAP_FMAC5 uddi2__get_USCOREpublisherAssertions * SOAP_FMAC6 soap_new_uddi2__get_USCOREpublisherAssertions(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__get_USCOREpublisherAssertions(struct soap*, uddi2__get_USCOREpublisherAssertions*);
+SOAP_FMAC5 uddi2__get_USCOREpublisherAssertions * SOAP_FMAC6 soap_instantiate_uddi2__get_USCOREpublisherAssertions(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__get_USCOREpublisherAssertions(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__get_USCOREbusinessDetailExt
+#define SOAP_TYPE_uddi2__get_USCOREbusinessDetailExt (68)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__get_USCOREbusinessDetailExt(struct soap*, const char*, int, const uddi2__get_USCOREbusinessDetailExt *, const char*);
+SOAP_FMAC3 uddi2__get_USCOREbusinessDetailExt * SOAP_FMAC4 soap_get_uddi2__get_USCOREbusinessDetailExt(struct soap*, uddi2__get_USCOREbusinessDetailExt *, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREbusinessDetailExt * SOAP_FMAC4 soap_in_uddi2__get_USCOREbusinessDetailExt(struct soap*, const char*, uddi2__get_USCOREbusinessDetailExt *, const char*);
+
+SOAP_FMAC5 uddi2__get_USCOREbusinessDetailExt * SOAP_FMAC6 soap_new_uddi2__get_USCOREbusinessDetailExt(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__get_USCOREbusinessDetailExt(struct soap*, uddi2__get_USCOREbusinessDetailExt*);
+SOAP_FMAC5 uddi2__get_USCOREbusinessDetailExt * SOAP_FMAC6 soap_instantiate_uddi2__get_USCOREbusinessDetailExt(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__get_USCOREbusinessDetailExt(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__get_USCOREbusinessDetail
+#define SOAP_TYPE_uddi2__get_USCOREbusinessDetail (67)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__get_USCOREbusinessDetail(struct soap*, const char*, int, const uddi2__get_USCOREbusinessDetail *, const char*);
+SOAP_FMAC3 uddi2__get_USCOREbusinessDetail * SOAP_FMAC4 soap_get_uddi2__get_USCOREbusinessDetail(struct soap*, uddi2__get_USCOREbusinessDetail *, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREbusinessDetail * SOAP_FMAC4 soap_in_uddi2__get_USCOREbusinessDetail(struct soap*, const char*, uddi2__get_USCOREbusinessDetail *, const char*);
+
+SOAP_FMAC5 uddi2__get_USCOREbusinessDetail * SOAP_FMAC6 soap_new_uddi2__get_USCOREbusinessDetail(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__get_USCOREbusinessDetail(struct soap*, uddi2__get_USCOREbusinessDetail*);
+SOAP_FMAC5 uddi2__get_USCOREbusinessDetail * SOAP_FMAC6 soap_instantiate_uddi2__get_USCOREbusinessDetail(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__get_USCOREbusinessDetail(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__get_USCOREbindingDetail
+#define SOAP_TYPE_uddi2__get_USCOREbindingDetail (66)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__get_USCOREbindingDetail(struct soap*, const char*, int, const uddi2__get_USCOREbindingDetail *, const char*);
+SOAP_FMAC3 uddi2__get_USCOREbindingDetail * SOAP_FMAC4 soap_get_uddi2__get_USCOREbindingDetail(struct soap*, uddi2__get_USCOREbindingDetail *, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREbindingDetail * SOAP_FMAC4 soap_in_uddi2__get_USCOREbindingDetail(struct soap*, const char*, uddi2__get_USCOREbindingDetail *, const char*);
+
+SOAP_FMAC5 uddi2__get_USCOREbindingDetail * SOAP_FMAC6 soap_new_uddi2__get_USCOREbindingDetail(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__get_USCOREbindingDetail(struct soap*, uddi2__get_USCOREbindingDetail*);
+SOAP_FMAC5 uddi2__get_USCOREbindingDetail * SOAP_FMAC6 soap_instantiate_uddi2__get_USCOREbindingDetail(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__get_USCOREbindingDetail(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__get_USCOREauthToken
+#define SOAP_TYPE_uddi2__get_USCOREauthToken (65)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__get_USCOREauthToken(struct soap*, const char*, int, const uddi2__get_USCOREauthToken *, const char*);
+SOAP_FMAC3 uddi2__get_USCOREauthToken * SOAP_FMAC4 soap_get_uddi2__get_USCOREauthToken(struct soap*, uddi2__get_USCOREauthToken *, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREauthToken * SOAP_FMAC4 soap_in_uddi2__get_USCOREauthToken(struct soap*, const char*, uddi2__get_USCOREauthToken *, const char*);
+
+SOAP_FMAC5 uddi2__get_USCOREauthToken * SOAP_FMAC6 soap_new_uddi2__get_USCOREauthToken(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__get_USCOREauthToken(struct soap*, uddi2__get_USCOREauthToken*);
+SOAP_FMAC5 uddi2__get_USCOREauthToken * SOAP_FMAC6 soap_instantiate_uddi2__get_USCOREauthToken(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__get_USCOREauthToken(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__get_USCOREassertionStatusReport
+#define SOAP_TYPE_uddi2__get_USCOREassertionStatusReport (64)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__get_USCOREassertionStatusReport(struct soap*, const char*, int, const uddi2__get_USCOREassertionStatusReport *, const char*);
+SOAP_FMAC3 uddi2__get_USCOREassertionStatusReport * SOAP_FMAC4 soap_get_uddi2__get_USCOREassertionStatusReport(struct soap*, uddi2__get_USCOREassertionStatusReport *, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREassertionStatusReport * SOAP_FMAC4 soap_in_uddi2__get_USCOREassertionStatusReport(struct soap*, const char*, uddi2__get_USCOREassertionStatusReport *, const char*);
+
+SOAP_FMAC5 uddi2__get_USCOREassertionStatusReport * SOAP_FMAC6 soap_new_uddi2__get_USCOREassertionStatusReport(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__get_USCOREassertionStatusReport(struct soap*, uddi2__get_USCOREassertionStatusReport*);
+SOAP_FMAC5 uddi2__get_USCOREassertionStatusReport * SOAP_FMAC6 soap_instantiate_uddi2__get_USCOREassertionStatusReport(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__get_USCOREassertionStatusReport(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__find_USCOREtModel
+#define SOAP_TYPE_uddi2__find_USCOREtModel (63)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__find_USCOREtModel(struct soap*, const char*, int, const uddi2__find_USCOREtModel *, const char*);
+SOAP_FMAC3 uddi2__find_USCOREtModel * SOAP_FMAC4 soap_get_uddi2__find_USCOREtModel(struct soap*, uddi2__find_USCOREtModel *, const char*, const char*);
+SOAP_FMAC3 uddi2__find_USCOREtModel * SOAP_FMAC4 soap_in_uddi2__find_USCOREtModel(struct soap*, const char*, uddi2__find_USCOREtModel *, const char*);
+
+SOAP_FMAC5 uddi2__find_USCOREtModel * SOAP_FMAC6 soap_new_uddi2__find_USCOREtModel(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__find_USCOREtModel(struct soap*, uddi2__find_USCOREtModel*);
+SOAP_FMAC5 uddi2__find_USCOREtModel * SOAP_FMAC6 soap_instantiate_uddi2__find_USCOREtModel(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__find_USCOREtModel(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__find_USCOREservice
+#define SOAP_TYPE_uddi2__find_USCOREservice (62)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__find_USCOREservice(struct soap*, const char*, int, const uddi2__find_USCOREservice *, const char*);
+SOAP_FMAC3 uddi2__find_USCOREservice * SOAP_FMAC4 soap_get_uddi2__find_USCOREservice(struct soap*, uddi2__find_USCOREservice *, const char*, const char*);
+SOAP_FMAC3 uddi2__find_USCOREservice * SOAP_FMAC4 soap_in_uddi2__find_USCOREservice(struct soap*, const char*, uddi2__find_USCOREservice *, const char*);
+
+SOAP_FMAC5 uddi2__find_USCOREservice * SOAP_FMAC6 soap_new_uddi2__find_USCOREservice(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__find_USCOREservice(struct soap*, uddi2__find_USCOREservice*);
+SOAP_FMAC5 uddi2__find_USCOREservice * SOAP_FMAC6 soap_instantiate_uddi2__find_USCOREservice(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__find_USCOREservice(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__find_USCORErelatedBusinesses
+#define SOAP_TYPE_uddi2__find_USCORErelatedBusinesses (61)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__find_USCORErelatedBusinesses(struct soap*, const char*, int, const uddi2__find_USCORErelatedBusinesses *, const char*);
+SOAP_FMAC3 uddi2__find_USCORErelatedBusinesses * SOAP_FMAC4 soap_get_uddi2__find_USCORErelatedBusinesses(struct soap*, uddi2__find_USCORErelatedBusinesses *, const char*, const char*);
+SOAP_FMAC3 uddi2__find_USCORErelatedBusinesses * SOAP_FMAC4 soap_in_uddi2__find_USCORErelatedBusinesses(struct soap*, const char*, uddi2__find_USCORErelatedBusinesses *, const char*);
+
+SOAP_FMAC5 uddi2__find_USCORErelatedBusinesses * SOAP_FMAC6 soap_new_uddi2__find_USCORErelatedBusinesses(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__find_USCORErelatedBusinesses(struct soap*, uddi2__find_USCORErelatedBusinesses*);
+SOAP_FMAC5 uddi2__find_USCORErelatedBusinesses * SOAP_FMAC6 soap_instantiate_uddi2__find_USCORErelatedBusinesses(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__find_USCORErelatedBusinesses(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__find_USCOREbusiness
+#define SOAP_TYPE_uddi2__find_USCOREbusiness (60)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__find_USCOREbusiness(struct soap*, const char*, int, const uddi2__find_USCOREbusiness *, const char*);
+SOAP_FMAC3 uddi2__find_USCOREbusiness * SOAP_FMAC4 soap_get_uddi2__find_USCOREbusiness(struct soap*, uddi2__find_USCOREbusiness *, const char*, const char*);
+SOAP_FMAC3 uddi2__find_USCOREbusiness * SOAP_FMAC4 soap_in_uddi2__find_USCOREbusiness(struct soap*, const char*, uddi2__find_USCOREbusiness *, const char*);
+
+SOAP_FMAC5 uddi2__find_USCOREbusiness * SOAP_FMAC6 soap_new_uddi2__find_USCOREbusiness(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__find_USCOREbusiness(struct soap*, uddi2__find_USCOREbusiness*);
+SOAP_FMAC5 uddi2__find_USCOREbusiness * SOAP_FMAC6 soap_instantiate_uddi2__find_USCOREbusiness(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__find_USCOREbusiness(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__find_USCOREbinding
+#define SOAP_TYPE_uddi2__find_USCOREbinding (59)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__find_USCOREbinding(struct soap*, const char*, int, const uddi2__find_USCOREbinding *, const char*);
+SOAP_FMAC3 uddi2__find_USCOREbinding * SOAP_FMAC4 soap_get_uddi2__find_USCOREbinding(struct soap*, uddi2__find_USCOREbinding *, const char*, const char*);
+SOAP_FMAC3 uddi2__find_USCOREbinding * SOAP_FMAC4 soap_in_uddi2__find_USCOREbinding(struct soap*, const char*, uddi2__find_USCOREbinding *, const char*);
+
+SOAP_FMAC5 uddi2__find_USCOREbinding * SOAP_FMAC6 soap_new_uddi2__find_USCOREbinding(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__find_USCOREbinding(struct soap*, uddi2__find_USCOREbinding*);
+SOAP_FMAC5 uddi2__find_USCOREbinding * SOAP_FMAC6 soap_instantiate_uddi2__find_USCOREbinding(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__find_USCOREbinding(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__discard_USCOREauthToken
+#define SOAP_TYPE_uddi2__discard_USCOREauthToken (58)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__discard_USCOREauthToken(struct soap*, const char*, int, const uddi2__discard_USCOREauthToken *, const char*);
+SOAP_FMAC3 uddi2__discard_USCOREauthToken * SOAP_FMAC4 soap_get_uddi2__discard_USCOREauthToken(struct soap*, uddi2__discard_USCOREauthToken *, const char*, const char*);
+SOAP_FMAC3 uddi2__discard_USCOREauthToken * SOAP_FMAC4 soap_in_uddi2__discard_USCOREauthToken(struct soap*, const char*, uddi2__discard_USCOREauthToken *, const char*);
+
+SOAP_FMAC5 uddi2__discard_USCOREauthToken * SOAP_FMAC6 soap_new_uddi2__discard_USCOREauthToken(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__discard_USCOREauthToken(struct soap*, uddi2__discard_USCOREauthToken*);
+SOAP_FMAC5 uddi2__discard_USCOREauthToken * SOAP_FMAC6 soap_instantiate_uddi2__discard_USCOREauthToken(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__discard_USCOREauthToken(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__delete_USCOREtModel
+#define SOAP_TYPE_uddi2__delete_USCOREtModel (57)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__delete_USCOREtModel(struct soap*, const char*, int, const uddi2__delete_USCOREtModel *, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREtModel * SOAP_FMAC4 soap_get_uddi2__delete_USCOREtModel(struct soap*, uddi2__delete_USCOREtModel *, const char*, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREtModel * SOAP_FMAC4 soap_in_uddi2__delete_USCOREtModel(struct soap*, const char*, uddi2__delete_USCOREtModel *, const char*);
+
+SOAP_FMAC5 uddi2__delete_USCOREtModel * SOAP_FMAC6 soap_new_uddi2__delete_USCOREtModel(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__delete_USCOREtModel(struct soap*, uddi2__delete_USCOREtModel*);
+SOAP_FMAC5 uddi2__delete_USCOREtModel * SOAP_FMAC6 soap_instantiate_uddi2__delete_USCOREtModel(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__delete_USCOREtModel(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__delete_USCOREservice
+#define SOAP_TYPE_uddi2__delete_USCOREservice (56)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__delete_USCOREservice(struct soap*, const char*, int, const uddi2__delete_USCOREservice *, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREservice * SOAP_FMAC4 soap_get_uddi2__delete_USCOREservice(struct soap*, uddi2__delete_USCOREservice *, const char*, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREservice * SOAP_FMAC4 soap_in_uddi2__delete_USCOREservice(struct soap*, const char*, uddi2__delete_USCOREservice *, const char*);
+
+SOAP_FMAC5 uddi2__delete_USCOREservice * SOAP_FMAC6 soap_new_uddi2__delete_USCOREservice(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__delete_USCOREservice(struct soap*, uddi2__delete_USCOREservice*);
+SOAP_FMAC5 uddi2__delete_USCOREservice * SOAP_FMAC6 soap_instantiate_uddi2__delete_USCOREservice(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__delete_USCOREservice(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__delete_USCOREpublisherAssertions
+#define SOAP_TYPE_uddi2__delete_USCOREpublisherAssertions (55)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__delete_USCOREpublisherAssertions(struct soap*, const char*, int, const uddi2__delete_USCOREpublisherAssertions *, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREpublisherAssertions * SOAP_FMAC4 soap_get_uddi2__delete_USCOREpublisherAssertions(struct soap*, uddi2__delete_USCOREpublisherAssertions *, const char*, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREpublisherAssertions * SOAP_FMAC4 soap_in_uddi2__delete_USCOREpublisherAssertions(struct soap*, const char*, uddi2__delete_USCOREpublisherAssertions *, const char*);
+
+SOAP_FMAC5 uddi2__delete_USCOREpublisherAssertions * SOAP_FMAC6 soap_new_uddi2__delete_USCOREpublisherAssertions(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__delete_USCOREpublisherAssertions(struct soap*, uddi2__delete_USCOREpublisherAssertions*);
+SOAP_FMAC5 uddi2__delete_USCOREpublisherAssertions * SOAP_FMAC6 soap_instantiate_uddi2__delete_USCOREpublisherAssertions(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__delete_USCOREpublisherAssertions(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__delete_USCOREbusiness
+#define SOAP_TYPE_uddi2__delete_USCOREbusiness (54)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__delete_USCOREbusiness(struct soap*, const char*, int, const uddi2__delete_USCOREbusiness *, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREbusiness * SOAP_FMAC4 soap_get_uddi2__delete_USCOREbusiness(struct soap*, uddi2__delete_USCOREbusiness *, const char*, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREbusiness * SOAP_FMAC4 soap_in_uddi2__delete_USCOREbusiness(struct soap*, const char*, uddi2__delete_USCOREbusiness *, const char*);
+
+SOAP_FMAC5 uddi2__delete_USCOREbusiness * SOAP_FMAC6 soap_new_uddi2__delete_USCOREbusiness(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__delete_USCOREbusiness(struct soap*, uddi2__delete_USCOREbusiness*);
+SOAP_FMAC5 uddi2__delete_USCOREbusiness * SOAP_FMAC6 soap_instantiate_uddi2__delete_USCOREbusiness(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__delete_USCOREbusiness(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__delete_USCOREbinding
+#define SOAP_TYPE_uddi2__delete_USCOREbinding (53)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__delete_USCOREbinding(struct soap*, const char*, int, const uddi2__delete_USCOREbinding *, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREbinding * SOAP_FMAC4 soap_get_uddi2__delete_USCOREbinding(struct soap*, uddi2__delete_USCOREbinding *, const char*, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREbinding * SOAP_FMAC4 soap_in_uddi2__delete_USCOREbinding(struct soap*, const char*, uddi2__delete_USCOREbinding *, const char*);
+
+SOAP_FMAC5 uddi2__delete_USCOREbinding * SOAP_FMAC6 soap_new_uddi2__delete_USCOREbinding(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__delete_USCOREbinding(struct soap*, uddi2__delete_USCOREbinding*);
+SOAP_FMAC5 uddi2__delete_USCOREbinding * SOAP_FMAC6 soap_instantiate_uddi2__delete_USCOREbinding(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__delete_USCOREbinding(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__add_USCOREpublisherAssertions
+#define SOAP_TYPE_uddi2__add_USCOREpublisherAssertions (52)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__add_USCOREpublisherAssertions(struct soap*, const char*, int, const uddi2__add_USCOREpublisherAssertions *, const char*);
+SOAP_FMAC3 uddi2__add_USCOREpublisherAssertions * SOAP_FMAC4 soap_get_uddi2__add_USCOREpublisherAssertions(struct soap*, uddi2__add_USCOREpublisherAssertions *, const char*, const char*);
+SOAP_FMAC3 uddi2__add_USCOREpublisherAssertions * SOAP_FMAC4 soap_in_uddi2__add_USCOREpublisherAssertions(struct soap*, const char*, uddi2__add_USCOREpublisherAssertions *, const char*);
+
+SOAP_FMAC5 uddi2__add_USCOREpublisherAssertions * SOAP_FMAC6 soap_new_uddi2__add_USCOREpublisherAssertions(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__add_USCOREpublisherAssertions(struct soap*, uddi2__add_USCOREpublisherAssertions*);
+SOAP_FMAC5 uddi2__add_USCOREpublisherAssertions * SOAP_FMAC6 soap_instantiate_uddi2__add_USCOREpublisherAssertions(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__add_USCOREpublisherAssertions(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__tModelInstanceInfo
+#define SOAP_TYPE_uddi2__tModelInstanceInfo (51)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__tModelInstanceInfo(struct soap*, const char*, int, const uddi2__tModelInstanceInfo *, const char*);
+SOAP_FMAC3 uddi2__tModelInstanceInfo * SOAP_FMAC4 soap_get_uddi2__tModelInstanceInfo(struct soap*, uddi2__tModelInstanceInfo *, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelInstanceInfo * SOAP_FMAC4 soap_in_uddi2__tModelInstanceInfo(struct soap*, const char*, uddi2__tModelInstanceInfo *, const char*);
+
+SOAP_FMAC5 uddi2__tModelInstanceInfo * SOAP_FMAC6 soap_new_uddi2__tModelInstanceInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__tModelInstanceInfo(struct soap*, uddi2__tModelInstanceInfo*);
+SOAP_FMAC5 uddi2__tModelInstanceInfo * SOAP_FMAC6 soap_instantiate_uddi2__tModelInstanceInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__tModelInstanceInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__tModelInstanceDetails
+#define SOAP_TYPE_uddi2__tModelInstanceDetails (50)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__tModelInstanceDetails(struct soap*, const char*, int, const uddi2__tModelInstanceDetails *, const char*);
+SOAP_FMAC3 uddi2__tModelInstanceDetails * SOAP_FMAC4 soap_get_uddi2__tModelInstanceDetails(struct soap*, uddi2__tModelInstanceDetails *, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelInstanceDetails * SOAP_FMAC4 soap_in_uddi2__tModelInstanceDetails(struct soap*, const char*, uddi2__tModelInstanceDetails *, const char*);
+
+SOAP_FMAC5 uddi2__tModelInstanceDetails * SOAP_FMAC6 soap_new_uddi2__tModelInstanceDetails(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__tModelInstanceDetails(struct soap*, uddi2__tModelInstanceDetails*);
+SOAP_FMAC5 uddi2__tModelInstanceDetails * SOAP_FMAC6 soap_instantiate_uddi2__tModelInstanceDetails(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__tModelInstanceDetails(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__tModelInfos
+#define SOAP_TYPE_uddi2__tModelInfos (49)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__tModelInfos(struct soap*, const char*, int, const uddi2__tModelInfos *, const char*);
+SOAP_FMAC3 uddi2__tModelInfos * SOAP_FMAC4 soap_get_uddi2__tModelInfos(struct soap*, uddi2__tModelInfos *, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelInfos * SOAP_FMAC4 soap_in_uddi2__tModelInfos(struct soap*, const char*, uddi2__tModelInfos *, const char*);
+
+SOAP_FMAC5 uddi2__tModelInfos * SOAP_FMAC6 soap_new_uddi2__tModelInfos(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__tModelInfos(struct soap*, uddi2__tModelInfos*);
+SOAP_FMAC5 uddi2__tModelInfos * SOAP_FMAC6 soap_instantiate_uddi2__tModelInfos(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__tModelInfos(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__tModelInfo
+#define SOAP_TYPE_uddi2__tModelInfo (48)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__tModelInfo(struct soap*, const char*, int, const uddi2__tModelInfo *, const char*);
+SOAP_FMAC3 uddi2__tModelInfo * SOAP_FMAC4 soap_get_uddi2__tModelInfo(struct soap*, uddi2__tModelInfo *, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelInfo * SOAP_FMAC4 soap_in_uddi2__tModelInfo(struct soap*, const char*, uddi2__tModelInfo *, const char*);
+
+SOAP_FMAC5 uddi2__tModelInfo * SOAP_FMAC6 soap_new_uddi2__tModelInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__tModelInfo(struct soap*, uddi2__tModelInfo*);
+SOAP_FMAC5 uddi2__tModelInfo * SOAP_FMAC6 soap_instantiate_uddi2__tModelInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__tModelInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__tModelBag
+#define SOAP_TYPE_uddi2__tModelBag (47)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__tModelBag(struct soap*, const char*, int, const uddi2__tModelBag *, const char*);
+SOAP_FMAC3 uddi2__tModelBag * SOAP_FMAC4 soap_get_uddi2__tModelBag(struct soap*, uddi2__tModelBag *, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelBag * SOAP_FMAC4 soap_in_uddi2__tModelBag(struct soap*, const char*, uddi2__tModelBag *, const char*);
+
+SOAP_FMAC5 uddi2__tModelBag * SOAP_FMAC6 soap_new_uddi2__tModelBag(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__tModelBag(struct soap*, uddi2__tModelBag*);
+SOAP_FMAC5 uddi2__tModelBag * SOAP_FMAC6 soap_instantiate_uddi2__tModelBag(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__tModelBag(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__tModel
+#define SOAP_TYPE_uddi2__tModel (46)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__tModel(struct soap*, const char*, int, const uddi2__tModel *, const char*);
+SOAP_FMAC3 uddi2__tModel * SOAP_FMAC4 soap_get_uddi2__tModel(struct soap*, uddi2__tModel *, const char*, const char*);
+SOAP_FMAC3 uddi2__tModel * SOAP_FMAC4 soap_in_uddi2__tModel(struct soap*, const char*, uddi2__tModel *, const char*);
+
+SOAP_FMAC5 uddi2__tModel * SOAP_FMAC6 soap_new_uddi2__tModel(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__tModel(struct soap*, uddi2__tModel*);
+SOAP_FMAC5 uddi2__tModel * SOAP_FMAC6 soap_instantiate_uddi2__tModel(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__tModel(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__sharedRelationships
+#define SOAP_TYPE_uddi2__sharedRelationships (45)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__sharedRelationships(struct soap*, const char*, int, const uddi2__sharedRelationships *, const char*);
+SOAP_FMAC3 uddi2__sharedRelationships * SOAP_FMAC4 soap_get_uddi2__sharedRelationships(struct soap*, uddi2__sharedRelationships *, const char*, const char*);
+SOAP_FMAC3 uddi2__sharedRelationships * SOAP_FMAC4 soap_in_uddi2__sharedRelationships(struct soap*, const char*, uddi2__sharedRelationships *, const char*);
+
+SOAP_FMAC5 uddi2__sharedRelationships * SOAP_FMAC6 soap_new_uddi2__sharedRelationships(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__sharedRelationships(struct soap*, uddi2__sharedRelationships*);
+SOAP_FMAC5 uddi2__sharedRelationships * SOAP_FMAC6 soap_instantiate_uddi2__sharedRelationships(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__sharedRelationships(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__serviceInfos
+#define SOAP_TYPE_uddi2__serviceInfos (44)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__serviceInfos(struct soap*, const char*, int, const uddi2__serviceInfos *, const char*);
+SOAP_FMAC3 uddi2__serviceInfos * SOAP_FMAC4 soap_get_uddi2__serviceInfos(struct soap*, uddi2__serviceInfos *, const char*, const char*);
+SOAP_FMAC3 uddi2__serviceInfos * SOAP_FMAC4 soap_in_uddi2__serviceInfos(struct soap*, const char*, uddi2__serviceInfos *, const char*);
+
+SOAP_FMAC5 uddi2__serviceInfos * SOAP_FMAC6 soap_new_uddi2__serviceInfos(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__serviceInfos(struct soap*, uddi2__serviceInfos*);
+SOAP_FMAC5 uddi2__serviceInfos * SOAP_FMAC6 soap_instantiate_uddi2__serviceInfos(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__serviceInfos(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__serviceInfo
+#define SOAP_TYPE_uddi2__serviceInfo (43)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__serviceInfo(struct soap*, const char*, int, const uddi2__serviceInfo *, const char*);
+SOAP_FMAC3 uddi2__serviceInfo * SOAP_FMAC4 soap_get_uddi2__serviceInfo(struct soap*, uddi2__serviceInfo *, const char*, const char*);
+SOAP_FMAC3 uddi2__serviceInfo * SOAP_FMAC4 soap_in_uddi2__serviceInfo(struct soap*, const char*, uddi2__serviceInfo *, const char*);
+
+SOAP_FMAC5 uddi2__serviceInfo * SOAP_FMAC6 soap_new_uddi2__serviceInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__serviceInfo(struct soap*, uddi2__serviceInfo*);
+SOAP_FMAC5 uddi2__serviceInfo * SOAP_FMAC6 soap_instantiate_uddi2__serviceInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__serviceInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__result
+#define SOAP_TYPE_uddi2__result (42)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__result(struct soap*, const char*, int, const uddi2__result *, const char*);
+SOAP_FMAC3 uddi2__result * SOAP_FMAC4 soap_get_uddi2__result(struct soap*, uddi2__result *, const char*, const char*);
+SOAP_FMAC3 uddi2__result * SOAP_FMAC4 soap_in_uddi2__result(struct soap*, const char*, uddi2__result *, const char*);
+
+SOAP_FMAC5 uddi2__result * SOAP_FMAC6 soap_new_uddi2__result(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__result(struct soap*, uddi2__result*);
+SOAP_FMAC5 uddi2__result * SOAP_FMAC6 soap_instantiate_uddi2__result(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__result(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__relatedBusinessInfos
+#define SOAP_TYPE_uddi2__relatedBusinessInfos (41)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__relatedBusinessInfos(struct soap*, const char*, int, const uddi2__relatedBusinessInfos *, const char*);
+SOAP_FMAC3 uddi2__relatedBusinessInfos * SOAP_FMAC4 soap_get_uddi2__relatedBusinessInfos(struct soap*, uddi2__relatedBusinessInfos *, const char*, const char*);
+SOAP_FMAC3 uddi2__relatedBusinessInfos * SOAP_FMAC4 soap_in_uddi2__relatedBusinessInfos(struct soap*, const char*, uddi2__relatedBusinessInfos *, const char*);
+
+SOAP_FMAC5 uddi2__relatedBusinessInfos * SOAP_FMAC6 soap_new_uddi2__relatedBusinessInfos(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__relatedBusinessInfos(struct soap*, uddi2__relatedBusinessInfos*);
+SOAP_FMAC5 uddi2__relatedBusinessInfos * SOAP_FMAC6 soap_instantiate_uddi2__relatedBusinessInfos(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__relatedBusinessInfos(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__relatedBusinessInfo
+#define SOAP_TYPE_uddi2__relatedBusinessInfo (40)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__relatedBusinessInfo(struct soap*, const char*, int, const uddi2__relatedBusinessInfo *, const char*);
+SOAP_FMAC3 uddi2__relatedBusinessInfo * SOAP_FMAC4 soap_get_uddi2__relatedBusinessInfo(struct soap*, uddi2__relatedBusinessInfo *, const char*, const char*);
+SOAP_FMAC3 uddi2__relatedBusinessInfo * SOAP_FMAC4 soap_in_uddi2__relatedBusinessInfo(struct soap*, const char*, uddi2__relatedBusinessInfo *, const char*);
+
+SOAP_FMAC5 uddi2__relatedBusinessInfo * SOAP_FMAC6 soap_new_uddi2__relatedBusinessInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__relatedBusinessInfo(struct soap*, uddi2__relatedBusinessInfo*);
+SOAP_FMAC5 uddi2__relatedBusinessInfo * SOAP_FMAC6 soap_instantiate_uddi2__relatedBusinessInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__relatedBusinessInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__publisherAssertion
+#define SOAP_TYPE_uddi2__publisherAssertion (39)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__publisherAssertion(struct soap*, const char*, int, const uddi2__publisherAssertion *, const char*);
+SOAP_FMAC3 uddi2__publisherAssertion * SOAP_FMAC4 soap_get_uddi2__publisherAssertion(struct soap*, uddi2__publisherAssertion *, const char*, const char*);
+SOAP_FMAC3 uddi2__publisherAssertion * SOAP_FMAC4 soap_in_uddi2__publisherAssertion(struct soap*, const char*, uddi2__publisherAssertion *, const char*);
+
+SOAP_FMAC5 uddi2__publisherAssertion * SOAP_FMAC6 soap_new_uddi2__publisherAssertion(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__publisherAssertion(struct soap*, uddi2__publisherAssertion*);
+SOAP_FMAC5 uddi2__publisherAssertion * SOAP_FMAC6 soap_instantiate_uddi2__publisherAssertion(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__publisherAssertion(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__phone
+#define SOAP_TYPE_uddi2__phone (38)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__phone(struct soap*, const char*, int, const uddi2__phone *, const char*);
+SOAP_FMAC3 uddi2__phone * SOAP_FMAC4 soap_get_uddi2__phone(struct soap*, uddi2__phone *, const char*, const char*);
+SOAP_FMAC3 uddi2__phone * SOAP_FMAC4 soap_in_uddi2__phone(struct soap*, const char*, uddi2__phone *, const char*);
+
+SOAP_FMAC5 uddi2__phone * SOAP_FMAC6 soap_new_uddi2__phone(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__phone(struct soap*, uddi2__phone*);
+SOAP_FMAC5 uddi2__phone * SOAP_FMAC6 soap_instantiate_uddi2__phone(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__phone(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__overviewDoc
+#define SOAP_TYPE_uddi2__overviewDoc (37)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__overviewDoc(struct soap*, const char*, int, const uddi2__overviewDoc *, const char*);
+SOAP_FMAC3 uddi2__overviewDoc * SOAP_FMAC4 soap_get_uddi2__overviewDoc(struct soap*, uddi2__overviewDoc *, const char*, const char*);
+SOAP_FMAC3 uddi2__overviewDoc * SOAP_FMAC4 soap_in_uddi2__overviewDoc(struct soap*, const char*, uddi2__overviewDoc *, const char*);
+
+SOAP_FMAC5 uddi2__overviewDoc * SOAP_FMAC6 soap_new_uddi2__overviewDoc(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__overviewDoc(struct soap*, uddi2__overviewDoc*);
+SOAP_FMAC5 uddi2__overviewDoc * SOAP_FMAC6 soap_instantiate_uddi2__overviewDoc(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__overviewDoc(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__name
+#define SOAP_TYPE_uddi2__name (36)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__name(struct soap*, const char*, int, const uddi2__name *, const char*);
+SOAP_FMAC3 uddi2__name * SOAP_FMAC4 soap_get_uddi2__name(struct soap*, uddi2__name *, const char*, const char*);
+SOAP_FMAC3 uddi2__name * SOAP_FMAC4 soap_in_uddi2__name(struct soap*, const char*, uddi2__name *, const char*);
+
+SOAP_FMAC5 uddi2__name * SOAP_FMAC6 soap_new_uddi2__name(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__name(struct soap*, uddi2__name*);
+SOAP_FMAC5 uddi2__name * SOAP_FMAC6 soap_instantiate_uddi2__name(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__name(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__keysOwned
+#define SOAP_TYPE_uddi2__keysOwned (35)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__keysOwned(struct soap*, const char*, int, const uddi2__keysOwned *, const char*);
+SOAP_FMAC3 uddi2__keysOwned * SOAP_FMAC4 soap_get_uddi2__keysOwned(struct soap*, uddi2__keysOwned *, const char*, const char*);
+SOAP_FMAC3 uddi2__keysOwned * SOAP_FMAC4 soap_in_uddi2__keysOwned(struct soap*, const char*, uddi2__keysOwned *, const char*);
+
+SOAP_FMAC5 uddi2__keysOwned * SOAP_FMAC6 soap_new_uddi2__keysOwned(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__keysOwned(struct soap*, uddi2__keysOwned*);
+SOAP_FMAC5 uddi2__keysOwned * SOAP_FMAC6 soap_instantiate_uddi2__keysOwned(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__keysOwned(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__keyedReference
+#define SOAP_TYPE_uddi2__keyedReference (34)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__keyedReference(struct soap*, const char*, int, const uddi2__keyedReference *, const char*);
+SOAP_FMAC3 uddi2__keyedReference * SOAP_FMAC4 soap_get_uddi2__keyedReference(struct soap*, uddi2__keyedReference *, const char*, const char*);
+SOAP_FMAC3 uddi2__keyedReference * SOAP_FMAC4 soap_in_uddi2__keyedReference(struct soap*, const char*, uddi2__keyedReference *, const char*);
+
+SOAP_FMAC5 uddi2__keyedReference * SOAP_FMAC6 soap_new_uddi2__keyedReference(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__keyedReference(struct soap*, uddi2__keyedReference*);
+SOAP_FMAC5 uddi2__keyedReference * SOAP_FMAC6 soap_instantiate_uddi2__keyedReference(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__keyedReference(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__instanceDetails
+#define SOAP_TYPE_uddi2__instanceDetails (33)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__instanceDetails(struct soap*, const char*, int, const uddi2__instanceDetails *, const char*);
+SOAP_FMAC3 uddi2__instanceDetails * SOAP_FMAC4 soap_get_uddi2__instanceDetails(struct soap*, uddi2__instanceDetails *, const char*, const char*);
+SOAP_FMAC3 uddi2__instanceDetails * SOAP_FMAC4 soap_in_uddi2__instanceDetails(struct soap*, const char*, uddi2__instanceDetails *, const char*);
+
+SOAP_FMAC5 uddi2__instanceDetails * SOAP_FMAC6 soap_new_uddi2__instanceDetails(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__instanceDetails(struct soap*, uddi2__instanceDetails*);
+SOAP_FMAC5 uddi2__instanceDetails * SOAP_FMAC6 soap_instantiate_uddi2__instanceDetails(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__instanceDetails(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__identifierBag
+#define SOAP_TYPE_uddi2__identifierBag (32)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__identifierBag(struct soap*, const char*, int, const uddi2__identifierBag *, const char*);
+SOAP_FMAC3 uddi2__identifierBag * SOAP_FMAC4 soap_get_uddi2__identifierBag(struct soap*, uddi2__identifierBag *, const char*, const char*);
+SOAP_FMAC3 uddi2__identifierBag * SOAP_FMAC4 soap_in_uddi2__identifierBag(struct soap*, const char*, uddi2__identifierBag *, const char*);
+
+SOAP_FMAC5 uddi2__identifierBag * SOAP_FMAC6 soap_new_uddi2__identifierBag(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__identifierBag(struct soap*, uddi2__identifierBag*);
+SOAP_FMAC5 uddi2__identifierBag * SOAP_FMAC6 soap_instantiate_uddi2__identifierBag(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__identifierBag(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__hostingRedirector
+#define SOAP_TYPE_uddi2__hostingRedirector (31)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__hostingRedirector(struct soap*, const char*, int, const uddi2__hostingRedirector *, const char*);
+SOAP_FMAC3 uddi2__hostingRedirector * SOAP_FMAC4 soap_get_uddi2__hostingRedirector(struct soap*, uddi2__hostingRedirector *, const char*, const char*);
+SOAP_FMAC3 uddi2__hostingRedirector * SOAP_FMAC4 soap_in_uddi2__hostingRedirector(struct soap*, const char*, uddi2__hostingRedirector *, const char*);
+
+SOAP_FMAC5 uddi2__hostingRedirector * SOAP_FMAC6 soap_new_uddi2__hostingRedirector(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__hostingRedirector(struct soap*, uddi2__hostingRedirector*);
+SOAP_FMAC5 uddi2__hostingRedirector * SOAP_FMAC6 soap_instantiate_uddi2__hostingRedirector(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__hostingRedirector(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__findQualifiers
+#define SOAP_TYPE_uddi2__findQualifiers (30)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__findQualifiers(struct soap*, const char*, int, const uddi2__findQualifiers *, const char*);
+SOAP_FMAC3 uddi2__findQualifiers * SOAP_FMAC4 soap_get_uddi2__findQualifiers(struct soap*, uddi2__findQualifiers *, const char*, const char*);
+SOAP_FMAC3 uddi2__findQualifiers * SOAP_FMAC4 soap_in_uddi2__findQualifiers(struct soap*, const char*, uddi2__findQualifiers *, const char*);
+
+SOAP_FMAC5 uddi2__findQualifiers * SOAP_FMAC6 soap_new_uddi2__findQualifiers(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__findQualifiers(struct soap*, uddi2__findQualifiers*);
+SOAP_FMAC5 uddi2__findQualifiers * SOAP_FMAC6 soap_instantiate_uddi2__findQualifiers(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__findQualifiers(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__errInfo
+#define SOAP_TYPE_uddi2__errInfo (29)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__errInfo(struct soap*, const char*, int, const uddi2__errInfo *, const char*);
+SOAP_FMAC3 uddi2__errInfo * SOAP_FMAC4 soap_get_uddi2__errInfo(struct soap*, uddi2__errInfo *, const char*, const char*);
+SOAP_FMAC3 uddi2__errInfo * SOAP_FMAC4 soap_in_uddi2__errInfo(struct soap*, const char*, uddi2__errInfo *, const char*);
+
+SOAP_FMAC5 uddi2__errInfo * SOAP_FMAC6 soap_new_uddi2__errInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__errInfo(struct soap*, uddi2__errInfo*);
+SOAP_FMAC5 uddi2__errInfo * SOAP_FMAC6 soap_instantiate_uddi2__errInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__errInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__email
+#define SOAP_TYPE_uddi2__email (28)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__email(struct soap*, const char*, int, const uddi2__email *, const char*);
+SOAP_FMAC3 uddi2__email * SOAP_FMAC4 soap_get_uddi2__email(struct soap*, uddi2__email *, const char*, const char*);
+SOAP_FMAC3 uddi2__email * SOAP_FMAC4 soap_in_uddi2__email(struct soap*, const char*, uddi2__email *, const char*);
+
+SOAP_FMAC5 uddi2__email * SOAP_FMAC6 soap_new_uddi2__email(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__email(struct soap*, uddi2__email*);
+SOAP_FMAC5 uddi2__email * SOAP_FMAC6 soap_instantiate_uddi2__email(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__email(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__dispositionReport
+#define SOAP_TYPE_uddi2__dispositionReport (27)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__dispositionReport(struct soap*, const char*, int, const uddi2__dispositionReport *, const char*);
+SOAP_FMAC3 uddi2__dispositionReport * SOAP_FMAC4 soap_get_uddi2__dispositionReport(struct soap*, uddi2__dispositionReport *, const char*, const char*);
+SOAP_FMAC3 uddi2__dispositionReport * SOAP_FMAC4 soap_in_uddi2__dispositionReport(struct soap*, const char*, uddi2__dispositionReport *, const char*);
+
+SOAP_FMAC5 uddi2__dispositionReport * SOAP_FMAC6 soap_new_uddi2__dispositionReport(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__dispositionReport(struct soap*, uddi2__dispositionReport*);
+SOAP_FMAC5 uddi2__dispositionReport * SOAP_FMAC6 soap_instantiate_uddi2__dispositionReport(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__dispositionReport(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__discoveryURLs
+#define SOAP_TYPE_uddi2__discoveryURLs (26)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__discoveryURLs(struct soap*, const char*, int, const uddi2__discoveryURLs *, const char*);
+SOAP_FMAC3 uddi2__discoveryURLs * SOAP_FMAC4 soap_get_uddi2__discoveryURLs(struct soap*, uddi2__discoveryURLs *, const char*, const char*);
+SOAP_FMAC3 uddi2__discoveryURLs * SOAP_FMAC4 soap_in_uddi2__discoveryURLs(struct soap*, const char*, uddi2__discoveryURLs *, const char*);
+
+SOAP_FMAC5 uddi2__discoveryURLs * SOAP_FMAC6 soap_new_uddi2__discoveryURLs(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__discoveryURLs(struct soap*, uddi2__discoveryURLs*);
+SOAP_FMAC5 uddi2__discoveryURLs * SOAP_FMAC6 soap_instantiate_uddi2__discoveryURLs(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__discoveryURLs(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__discoveryURL
+#define SOAP_TYPE_uddi2__discoveryURL (25)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__discoveryURL(struct soap*, const char*, int, const uddi2__discoveryURL *, const char*);
+SOAP_FMAC3 uddi2__discoveryURL * SOAP_FMAC4 soap_get_uddi2__discoveryURL(struct soap*, uddi2__discoveryURL *, const char*, const char*);
+SOAP_FMAC3 uddi2__discoveryURL * SOAP_FMAC4 soap_in_uddi2__discoveryURL(struct soap*, const char*, uddi2__discoveryURL *, const char*);
+
+SOAP_FMAC5 uddi2__discoveryURL * SOAP_FMAC6 soap_new_uddi2__discoveryURL(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__discoveryURL(struct soap*, uddi2__discoveryURL*);
+SOAP_FMAC5 uddi2__discoveryURL * SOAP_FMAC6 soap_instantiate_uddi2__discoveryURL(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__discoveryURL(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__description
+#define SOAP_TYPE_uddi2__description (24)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__description(struct soap*, const char*, int, const uddi2__description *, const char*);
+SOAP_FMAC3 uddi2__description * SOAP_FMAC4 soap_get_uddi2__description(struct soap*, uddi2__description *, const char*, const char*);
+SOAP_FMAC3 uddi2__description * SOAP_FMAC4 soap_in_uddi2__description(struct soap*, const char*, uddi2__description *, const char*);
+
+SOAP_FMAC5 uddi2__description * SOAP_FMAC6 soap_new_uddi2__description(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__description(struct soap*, uddi2__description*);
+SOAP_FMAC5 uddi2__description * SOAP_FMAC6 soap_instantiate_uddi2__description(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__description(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__contacts
+#define SOAP_TYPE_uddi2__contacts (23)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__contacts(struct soap*, const char*, int, const uddi2__contacts *, const char*);
+SOAP_FMAC3 uddi2__contacts * SOAP_FMAC4 soap_get_uddi2__contacts(struct soap*, uddi2__contacts *, const char*, const char*);
+SOAP_FMAC3 uddi2__contacts * SOAP_FMAC4 soap_in_uddi2__contacts(struct soap*, const char*, uddi2__contacts *, const char*);
+
+SOAP_FMAC5 uddi2__contacts * SOAP_FMAC6 soap_new_uddi2__contacts(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__contacts(struct soap*, uddi2__contacts*);
+SOAP_FMAC5 uddi2__contacts * SOAP_FMAC6 soap_instantiate_uddi2__contacts(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__contacts(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__contact
+#define SOAP_TYPE_uddi2__contact (22)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__contact(struct soap*, const char*, int, const uddi2__contact *, const char*);
+SOAP_FMAC3 uddi2__contact * SOAP_FMAC4 soap_get_uddi2__contact(struct soap*, uddi2__contact *, const char*, const char*);
+SOAP_FMAC3 uddi2__contact * SOAP_FMAC4 soap_in_uddi2__contact(struct soap*, const char*, uddi2__contact *, const char*);
+
+SOAP_FMAC5 uddi2__contact * SOAP_FMAC6 soap_new_uddi2__contact(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__contact(struct soap*, uddi2__contact*);
+SOAP_FMAC5 uddi2__contact * SOAP_FMAC6 soap_instantiate_uddi2__contact(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__contact(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__categoryBag
+#define SOAP_TYPE_uddi2__categoryBag (21)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__categoryBag(struct soap*, const char*, int, const uddi2__categoryBag *, const char*);
+SOAP_FMAC3 uddi2__categoryBag * SOAP_FMAC4 soap_get_uddi2__categoryBag(struct soap*, uddi2__categoryBag *, const char*, const char*);
+SOAP_FMAC3 uddi2__categoryBag * SOAP_FMAC4 soap_in_uddi2__categoryBag(struct soap*, const char*, uddi2__categoryBag *, const char*);
+
+SOAP_FMAC5 uddi2__categoryBag * SOAP_FMAC6 soap_new_uddi2__categoryBag(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__categoryBag(struct soap*, uddi2__categoryBag*);
+SOAP_FMAC5 uddi2__categoryBag * SOAP_FMAC6 soap_instantiate_uddi2__categoryBag(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__categoryBag(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__businessServices
+#define SOAP_TYPE_uddi2__businessServices (20)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__businessServices(struct soap*, const char*, int, const uddi2__businessServices *, const char*);
+SOAP_FMAC3 uddi2__businessServices * SOAP_FMAC4 soap_get_uddi2__businessServices(struct soap*, uddi2__businessServices *, const char*, const char*);
+SOAP_FMAC3 uddi2__businessServices * SOAP_FMAC4 soap_in_uddi2__businessServices(struct soap*, const char*, uddi2__businessServices *, const char*);
+
+SOAP_FMAC5 uddi2__businessServices * SOAP_FMAC6 soap_new_uddi2__businessServices(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__businessServices(struct soap*, uddi2__businessServices*);
+SOAP_FMAC5 uddi2__businessServices * SOAP_FMAC6 soap_instantiate_uddi2__businessServices(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__businessServices(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__businessService
+#define SOAP_TYPE_uddi2__businessService (19)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__businessService(struct soap*, const char*, int, const uddi2__businessService *, const char*);
+SOAP_FMAC3 uddi2__businessService * SOAP_FMAC4 soap_get_uddi2__businessService(struct soap*, uddi2__businessService *, const char*, const char*);
+SOAP_FMAC3 uddi2__businessService * SOAP_FMAC4 soap_in_uddi2__businessService(struct soap*, const char*, uddi2__businessService *, const char*);
+
+SOAP_FMAC5 uddi2__businessService * SOAP_FMAC6 soap_new_uddi2__businessService(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__businessService(struct soap*, uddi2__businessService*);
+SOAP_FMAC5 uddi2__businessService * SOAP_FMAC6 soap_instantiate_uddi2__businessService(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__businessService(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__businessInfos
+#define SOAP_TYPE_uddi2__businessInfos (18)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__businessInfos(struct soap*, const char*, int, const uddi2__businessInfos *, const char*);
+SOAP_FMAC3 uddi2__businessInfos * SOAP_FMAC4 soap_get_uddi2__businessInfos(struct soap*, uddi2__businessInfos *, const char*, const char*);
+SOAP_FMAC3 uddi2__businessInfos * SOAP_FMAC4 soap_in_uddi2__businessInfos(struct soap*, const char*, uddi2__businessInfos *, const char*);
+
+SOAP_FMAC5 uddi2__businessInfos * SOAP_FMAC6 soap_new_uddi2__businessInfos(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__businessInfos(struct soap*, uddi2__businessInfos*);
+SOAP_FMAC5 uddi2__businessInfos * SOAP_FMAC6 soap_instantiate_uddi2__businessInfos(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__businessInfos(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__businessInfo
+#define SOAP_TYPE_uddi2__businessInfo (17)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__businessInfo(struct soap*, const char*, int, const uddi2__businessInfo *, const char*);
+SOAP_FMAC3 uddi2__businessInfo * SOAP_FMAC4 soap_get_uddi2__businessInfo(struct soap*, uddi2__businessInfo *, const char*, const char*);
+SOAP_FMAC3 uddi2__businessInfo * SOAP_FMAC4 soap_in_uddi2__businessInfo(struct soap*, const char*, uddi2__businessInfo *, const char*);
+
+SOAP_FMAC5 uddi2__businessInfo * SOAP_FMAC6 soap_new_uddi2__businessInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__businessInfo(struct soap*, uddi2__businessInfo*);
+SOAP_FMAC5 uddi2__businessInfo * SOAP_FMAC6 soap_instantiate_uddi2__businessInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__businessInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__businessEntityExt
+#define SOAP_TYPE_uddi2__businessEntityExt (16)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__businessEntityExt(struct soap*, const char*, int, const uddi2__businessEntityExt *, const char*);
+SOAP_FMAC3 uddi2__businessEntityExt * SOAP_FMAC4 soap_get_uddi2__businessEntityExt(struct soap*, uddi2__businessEntityExt *, const char*, const char*);
+SOAP_FMAC3 uddi2__businessEntityExt * SOAP_FMAC4 soap_in_uddi2__businessEntityExt(struct soap*, const char*, uddi2__businessEntityExt *, const char*);
+
+SOAP_FMAC5 uddi2__businessEntityExt * SOAP_FMAC6 soap_new_uddi2__businessEntityExt(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__businessEntityExt(struct soap*, uddi2__businessEntityExt*);
+SOAP_FMAC5 uddi2__businessEntityExt * SOAP_FMAC6 soap_instantiate_uddi2__businessEntityExt(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__businessEntityExt(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__businessEntity
+#define SOAP_TYPE_uddi2__businessEntity (15)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__businessEntity(struct soap*, const char*, int, const uddi2__businessEntity *, const char*);
+SOAP_FMAC3 uddi2__businessEntity * SOAP_FMAC4 soap_get_uddi2__businessEntity(struct soap*, uddi2__businessEntity *, const char*, const char*);
+SOAP_FMAC3 uddi2__businessEntity * SOAP_FMAC4 soap_in_uddi2__businessEntity(struct soap*, const char*, uddi2__businessEntity *, const char*);
+
+SOAP_FMAC5 uddi2__businessEntity * SOAP_FMAC6 soap_new_uddi2__businessEntity(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__businessEntity(struct soap*, uddi2__businessEntity*);
+SOAP_FMAC5 uddi2__businessEntity * SOAP_FMAC6 soap_instantiate_uddi2__businessEntity(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__businessEntity(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__bindingTemplates
+#define SOAP_TYPE_uddi2__bindingTemplates (14)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__bindingTemplates(struct soap*, const char*, int, const uddi2__bindingTemplates *, const char*);
+SOAP_FMAC3 uddi2__bindingTemplates * SOAP_FMAC4 soap_get_uddi2__bindingTemplates(struct soap*, uddi2__bindingTemplates *, const char*, const char*);
+SOAP_FMAC3 uddi2__bindingTemplates * SOAP_FMAC4 soap_in_uddi2__bindingTemplates(struct soap*, const char*, uddi2__bindingTemplates *, const char*);
+
+SOAP_FMAC5 uddi2__bindingTemplates * SOAP_FMAC6 soap_new_uddi2__bindingTemplates(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__bindingTemplates(struct soap*, uddi2__bindingTemplates*);
+SOAP_FMAC5 uddi2__bindingTemplates * SOAP_FMAC6 soap_instantiate_uddi2__bindingTemplates(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__bindingTemplates(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__bindingTemplate
+#define SOAP_TYPE_uddi2__bindingTemplate (13)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__bindingTemplate(struct soap*, const char*, int, const uddi2__bindingTemplate *, const char*);
+SOAP_FMAC3 uddi2__bindingTemplate * SOAP_FMAC4 soap_get_uddi2__bindingTemplate(struct soap*, uddi2__bindingTemplate *, const char*, const char*);
+SOAP_FMAC3 uddi2__bindingTemplate * SOAP_FMAC4 soap_in_uddi2__bindingTemplate(struct soap*, const char*, uddi2__bindingTemplate *, const char*);
+
+SOAP_FMAC5 uddi2__bindingTemplate * SOAP_FMAC6 soap_new_uddi2__bindingTemplate(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__bindingTemplate(struct soap*, uddi2__bindingTemplate*);
+SOAP_FMAC5 uddi2__bindingTemplate * SOAP_FMAC6 soap_instantiate_uddi2__bindingTemplate(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__bindingTemplate(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__assertionStatusItem
+#define SOAP_TYPE_uddi2__assertionStatusItem (12)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__assertionStatusItem(struct soap*, const char*, int, const uddi2__assertionStatusItem *, const char*);
+SOAP_FMAC3 uddi2__assertionStatusItem * SOAP_FMAC4 soap_get_uddi2__assertionStatusItem(struct soap*, uddi2__assertionStatusItem *, const char*, const char*);
+SOAP_FMAC3 uddi2__assertionStatusItem * SOAP_FMAC4 soap_in_uddi2__assertionStatusItem(struct soap*, const char*, uddi2__assertionStatusItem *, const char*);
+
+SOAP_FMAC5 uddi2__assertionStatusItem * SOAP_FMAC6 soap_new_uddi2__assertionStatusItem(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__assertionStatusItem(struct soap*, uddi2__assertionStatusItem*);
+SOAP_FMAC5 uddi2__assertionStatusItem * SOAP_FMAC6 soap_instantiate_uddi2__assertionStatusItem(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__assertionStatusItem(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__addressLine
+#define SOAP_TYPE_uddi2__addressLine (11)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__addressLine(struct soap*, const char*, int, const uddi2__addressLine *, const char*);
+SOAP_FMAC3 uddi2__addressLine * SOAP_FMAC4 soap_get_uddi2__addressLine(struct soap*, uddi2__addressLine *, const char*, const char*);
+SOAP_FMAC3 uddi2__addressLine * SOAP_FMAC4 soap_in_uddi2__addressLine(struct soap*, const char*, uddi2__addressLine *, const char*);
+
+SOAP_FMAC5 uddi2__addressLine * SOAP_FMAC6 soap_new_uddi2__addressLine(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__addressLine(struct soap*, uddi2__addressLine*);
+SOAP_FMAC5 uddi2__addressLine * SOAP_FMAC6 soap_instantiate_uddi2__addressLine(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__addressLine(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__address
+#define SOAP_TYPE_uddi2__address (10)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__address(struct soap*, const char*, int, const uddi2__address *, const char*);
+SOAP_FMAC3 uddi2__address * SOAP_FMAC4 soap_get_uddi2__address(struct soap*, uddi2__address *, const char*, const char*);
+SOAP_FMAC3 uddi2__address * SOAP_FMAC4 soap_in_uddi2__address(struct soap*, const char*, uddi2__address *, const char*);
+
+SOAP_FMAC5 uddi2__address * SOAP_FMAC6 soap_new_uddi2__address(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__address(struct soap*, uddi2__address*);
+SOAP_FMAC5 uddi2__address * SOAP_FMAC6 soap_instantiate_uddi2__address(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__address(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__accessPoint
+#define SOAP_TYPE_uddi2__accessPoint (9)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__accessPoint(struct soap*, const char*, int, const uddi2__accessPoint *, const char*);
+SOAP_FMAC3 uddi2__accessPoint * SOAP_FMAC4 soap_get_uddi2__accessPoint(struct soap*, uddi2__accessPoint *, const char*, const char*);
+SOAP_FMAC3 uddi2__accessPoint * SOAP_FMAC4 soap_in_uddi2__accessPoint(struct soap*, const char*, uddi2__accessPoint *, const char*);
+
+SOAP_FMAC5 uddi2__accessPoint * SOAP_FMAC6 soap_new_uddi2__accessPoint(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__accessPoint(struct soap*, uddi2__accessPoint*);
+SOAP_FMAC5 uddi2__accessPoint * SOAP_FMAC6 soap_instantiate_uddi2__accessPoint(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__accessPoint(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef WITH_NOGLOBAL
+
+#ifndef SOAP_TYPE_SOAP_ENV__Fault
+#define SOAP_TYPE_SOAP_ENV__Fault (359)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Fault(struct soap*, const struct SOAP_ENV__Fault *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Fault(struct soap*, struct SOAP_ENV__Fault *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Fault(struct soap*, const struct SOAP_ENV__Fault *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Fault(struct soap*, const char*, int, const struct SOAP_ENV__Fault *, const char*);
+SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_get_SOAP_ENV__Fault(struct soap*, struct SOAP_ENV__Fault *, const char*, const char*);
+SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_in_SOAP_ENV__Fault(struct soap*, const char*, struct SOAP_ENV__Fault *, const char*);
+
+#endif
+
+#ifndef WITH_NOGLOBAL
+
+#ifndef SOAP_TYPE_SOAP_ENV__Detail
+#define SOAP_TYPE_SOAP_ENV__Detail (358)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Detail(struct soap*, const struct SOAP_ENV__Detail *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Detail(struct soap*, const struct SOAP_ENV__Detail *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Detail(struct soap*, const char*, int, const struct SOAP_ENV__Detail *, const char*);
+SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_get_SOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *, const char*, const char*);
+SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_in_SOAP_ENV__Detail(struct soap*, const char*, struct SOAP_ENV__Detail *, const char*);
+
+#endif
+
+#ifndef WITH_NOGLOBAL
+
+#ifndef SOAP_TYPE_SOAP_ENV__Code
+#define SOAP_TYPE_SOAP_ENV__Code (357)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Code(struct soap*, const struct SOAP_ENV__Code *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Code(struct soap*, const struct SOAP_ENV__Code *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Code(struct soap*, const char*, int, const struct SOAP_ENV__Code *, const char*);
+SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_get_SOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *, const char*, const char*);
+SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_in_SOAP_ENV__Code(struct soap*, const char*, struct SOAP_ENV__Code *, const char*);
+
+#endif
+
+#ifndef WITH_NOGLOBAL
+
+#ifndef SOAP_TYPE_SOAP_ENV__Header
+#define SOAP_TYPE_SOAP_ENV__Header (356)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Header(struct soap*, const struct SOAP_ENV__Header *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Header(struct soap*, struct SOAP_ENV__Header *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Header(struct soap*, const struct SOAP_ENV__Header *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Header(struct soap*, const char*, int, const struct SOAP_ENV__Header *, const char*);
+SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_get_SOAP_ENV__Header(struct soap*, struct SOAP_ENV__Header *, const char*, const char*);
+SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_in_SOAP_ENV__Header(struct soap*, const char*, struct SOAP_ENV__Header *, const char*);
+
+#endif
+
+#ifndef SOAP_TYPE___pub2__set_USCOREpublisherAssertions
+#define SOAP_TYPE___pub2__set_USCOREpublisherAssertions (354)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__set_USCOREpublisherAssertions(struct soap*, const struct __pub2__set_USCOREpublisherAssertions *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__set_USCOREpublisherAssertions(struct soap*, struct __pub2__set_USCOREpublisherAssertions *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__set_USCOREpublisherAssertions(struct soap*, const struct __pub2__set_USCOREpublisherAssertions *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__set_USCOREpublisherAssertions(struct soap*, const char*, int, const struct __pub2__set_USCOREpublisherAssertions *, const char*);
+SOAP_FMAC3 struct __pub2__set_USCOREpublisherAssertions * SOAP_FMAC4 soap_get___pub2__set_USCOREpublisherAssertions(struct soap*, struct __pub2__set_USCOREpublisherAssertions *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__set_USCOREpublisherAssertions * SOAP_FMAC4 soap_in___pub2__set_USCOREpublisherAssertions(struct soap*, const char*, struct __pub2__set_USCOREpublisherAssertions *, const char*);
+
+#ifndef SOAP_TYPE___pub2__save_USCOREtModel
+#define SOAP_TYPE___pub2__save_USCOREtModel (351)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__save_USCOREtModel(struct soap*, const struct __pub2__save_USCOREtModel *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__save_USCOREtModel(struct soap*, struct __pub2__save_USCOREtModel *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__save_USCOREtModel(struct soap*, const struct __pub2__save_USCOREtModel *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__save_USCOREtModel(struct soap*, const char*, int, const struct __pub2__save_USCOREtModel *, const char*);
+SOAP_FMAC3 struct __pub2__save_USCOREtModel * SOAP_FMAC4 soap_get___pub2__save_USCOREtModel(struct soap*, struct __pub2__save_USCOREtModel *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__save_USCOREtModel * SOAP_FMAC4 soap_in___pub2__save_USCOREtModel(struct soap*, const char*, struct __pub2__save_USCOREtModel *, const char*);
+
+#ifndef SOAP_TYPE___pub2__save_USCOREservice
+#define SOAP_TYPE___pub2__save_USCOREservice (348)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__save_USCOREservice(struct soap*, const struct __pub2__save_USCOREservice *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__save_USCOREservice(struct soap*, struct __pub2__save_USCOREservice *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__save_USCOREservice(struct soap*, const struct __pub2__save_USCOREservice *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__save_USCOREservice(struct soap*, const char*, int, const struct __pub2__save_USCOREservice *, const char*);
+SOAP_FMAC3 struct __pub2__save_USCOREservice * SOAP_FMAC4 soap_get___pub2__save_USCOREservice(struct soap*, struct __pub2__save_USCOREservice *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__save_USCOREservice * SOAP_FMAC4 soap_in___pub2__save_USCOREservice(struct soap*, const char*, struct __pub2__save_USCOREservice *, const char*);
+
+#ifndef SOAP_TYPE___pub2__save_USCOREbusiness
+#define SOAP_TYPE___pub2__save_USCOREbusiness (345)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__save_USCOREbusiness(struct soap*, const struct __pub2__save_USCOREbusiness *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__save_USCOREbusiness(struct soap*, struct __pub2__save_USCOREbusiness *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__save_USCOREbusiness(struct soap*, const struct __pub2__save_USCOREbusiness *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__save_USCOREbusiness(struct soap*, const char*, int, const struct __pub2__save_USCOREbusiness *, const char*);
+SOAP_FMAC3 struct __pub2__save_USCOREbusiness * SOAP_FMAC4 soap_get___pub2__save_USCOREbusiness(struct soap*, struct __pub2__save_USCOREbusiness *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__save_USCOREbusiness * SOAP_FMAC4 soap_in___pub2__save_USCOREbusiness(struct soap*, const char*, struct __pub2__save_USCOREbusiness *, const char*);
+
+#ifndef SOAP_TYPE___pub2__save_USCOREbinding
+#define SOAP_TYPE___pub2__save_USCOREbinding (342)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__save_USCOREbinding(struct soap*, const struct __pub2__save_USCOREbinding *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__save_USCOREbinding(struct soap*, struct __pub2__save_USCOREbinding *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__save_USCOREbinding(struct soap*, const struct __pub2__save_USCOREbinding *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__save_USCOREbinding(struct soap*, const char*, int, const struct __pub2__save_USCOREbinding *, const char*);
+SOAP_FMAC3 struct __pub2__save_USCOREbinding * SOAP_FMAC4 soap_get___pub2__save_USCOREbinding(struct soap*, struct __pub2__save_USCOREbinding *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__save_USCOREbinding * SOAP_FMAC4 soap_in___pub2__save_USCOREbinding(struct soap*, const char*, struct __pub2__save_USCOREbinding *, const char*);
+
+#ifndef SOAP_TYPE___pub2__get_USCOREregisteredInfo
+#define SOAP_TYPE___pub2__get_USCOREregisteredInfo (339)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__get_USCOREregisteredInfo(struct soap*, const struct __pub2__get_USCOREregisteredInfo *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__get_USCOREregisteredInfo(struct soap*, struct __pub2__get_USCOREregisteredInfo *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__get_USCOREregisteredInfo(struct soap*, const struct __pub2__get_USCOREregisteredInfo *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__get_USCOREregisteredInfo(struct soap*, const char*, int, const struct __pub2__get_USCOREregisteredInfo *, const char*);
+SOAP_FMAC3 struct __pub2__get_USCOREregisteredInfo * SOAP_FMAC4 soap_get___pub2__get_USCOREregisteredInfo(struct soap*, struct __pub2__get_USCOREregisteredInfo *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__get_USCOREregisteredInfo * SOAP_FMAC4 soap_in___pub2__get_USCOREregisteredInfo(struct soap*, const char*, struct __pub2__get_USCOREregisteredInfo *, const char*);
+
+#ifndef SOAP_TYPE___pub2__get_USCOREpublisherAssertions
+#define SOAP_TYPE___pub2__get_USCOREpublisherAssertions (336)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__get_USCOREpublisherAssertions(struct soap*, const struct __pub2__get_USCOREpublisherAssertions *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__get_USCOREpublisherAssertions(struct soap*, struct __pub2__get_USCOREpublisherAssertions *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__get_USCOREpublisherAssertions(struct soap*, const struct __pub2__get_USCOREpublisherAssertions *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__get_USCOREpublisherAssertions(struct soap*, const char*, int, const struct __pub2__get_USCOREpublisherAssertions *, const char*);
+SOAP_FMAC3 struct __pub2__get_USCOREpublisherAssertions * SOAP_FMAC4 soap_get___pub2__get_USCOREpublisherAssertions(struct soap*, struct __pub2__get_USCOREpublisherAssertions *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__get_USCOREpublisherAssertions * SOAP_FMAC4 soap_in___pub2__get_USCOREpublisherAssertions(struct soap*, const char*, struct __pub2__get_USCOREpublisherAssertions *, const char*);
+
+#ifndef SOAP_TYPE___pub2__get_USCOREauthToken
+#define SOAP_TYPE___pub2__get_USCOREauthToken (333)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__get_USCOREauthToken(struct soap*, const struct __pub2__get_USCOREauthToken *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__get_USCOREauthToken(struct soap*, struct __pub2__get_USCOREauthToken *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__get_USCOREauthToken(struct soap*, const struct __pub2__get_USCOREauthToken *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__get_USCOREauthToken(struct soap*, const char*, int, const struct __pub2__get_USCOREauthToken *, const char*);
+SOAP_FMAC3 struct __pub2__get_USCOREauthToken * SOAP_FMAC4 soap_get___pub2__get_USCOREauthToken(struct soap*, struct __pub2__get_USCOREauthToken *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__get_USCOREauthToken * SOAP_FMAC4 soap_in___pub2__get_USCOREauthToken(struct soap*, const char*, struct __pub2__get_USCOREauthToken *, const char*);
+
+#ifndef SOAP_TYPE___pub2__get_USCOREassertionStatusReport
+#define SOAP_TYPE___pub2__get_USCOREassertionStatusReport (330)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__get_USCOREassertionStatusReport(struct soap*, const struct __pub2__get_USCOREassertionStatusReport *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__get_USCOREassertionStatusReport(struct soap*, struct __pub2__get_USCOREassertionStatusReport *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__get_USCOREassertionStatusReport(struct soap*, const struct __pub2__get_USCOREassertionStatusReport *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__get_USCOREassertionStatusReport(struct soap*, const char*, int, const struct __pub2__get_USCOREassertionStatusReport *, const char*);
+SOAP_FMAC3 struct __pub2__get_USCOREassertionStatusReport * SOAP_FMAC4 soap_get___pub2__get_USCOREassertionStatusReport(struct soap*, struct __pub2__get_USCOREassertionStatusReport *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__get_USCOREassertionStatusReport * SOAP_FMAC4 soap_in___pub2__get_USCOREassertionStatusReport(struct soap*, const char*, struct __pub2__get_USCOREassertionStatusReport *, const char*);
+
+#ifndef SOAP_TYPE___pub2__discard_USCOREauthToken
+#define SOAP_TYPE___pub2__discard_USCOREauthToken (327)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__discard_USCOREauthToken(struct soap*, const struct __pub2__discard_USCOREauthToken *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__discard_USCOREauthToken(struct soap*, struct __pub2__discard_USCOREauthToken *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__discard_USCOREauthToken(struct soap*, const struct __pub2__discard_USCOREauthToken *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__discard_USCOREauthToken(struct soap*, const char*, int, const struct __pub2__discard_USCOREauthToken *, const char*);
+SOAP_FMAC3 struct __pub2__discard_USCOREauthToken * SOAP_FMAC4 soap_get___pub2__discard_USCOREauthToken(struct soap*, struct __pub2__discard_USCOREauthToken *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__discard_USCOREauthToken * SOAP_FMAC4 soap_in___pub2__discard_USCOREauthToken(struct soap*, const char*, struct __pub2__discard_USCOREauthToken *, const char*);
+
+#ifndef SOAP_TYPE___pub2__delete_USCOREtModel
+#define SOAP_TYPE___pub2__delete_USCOREtModel (324)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__delete_USCOREtModel(struct soap*, const struct __pub2__delete_USCOREtModel *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__delete_USCOREtModel(struct soap*, struct __pub2__delete_USCOREtModel *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__delete_USCOREtModel(struct soap*, const struct __pub2__delete_USCOREtModel *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__delete_USCOREtModel(struct soap*, const char*, int, const struct __pub2__delete_USCOREtModel *, const char*);
+SOAP_FMAC3 struct __pub2__delete_USCOREtModel * SOAP_FMAC4 soap_get___pub2__delete_USCOREtModel(struct soap*, struct __pub2__delete_USCOREtModel *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__delete_USCOREtModel * SOAP_FMAC4 soap_in___pub2__delete_USCOREtModel(struct soap*, const char*, struct __pub2__delete_USCOREtModel *, const char*);
+
+#ifndef SOAP_TYPE___pub2__delete_USCOREservice
+#define SOAP_TYPE___pub2__delete_USCOREservice (321)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__delete_USCOREservice(struct soap*, const struct __pub2__delete_USCOREservice *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__delete_USCOREservice(struct soap*, struct __pub2__delete_USCOREservice *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__delete_USCOREservice(struct soap*, const struct __pub2__delete_USCOREservice *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__delete_USCOREservice(struct soap*, const char*, int, const struct __pub2__delete_USCOREservice *, const char*);
+SOAP_FMAC3 struct __pub2__delete_USCOREservice * SOAP_FMAC4 soap_get___pub2__delete_USCOREservice(struct soap*, struct __pub2__delete_USCOREservice *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__delete_USCOREservice * SOAP_FMAC4 soap_in___pub2__delete_USCOREservice(struct soap*, const char*, struct __pub2__delete_USCOREservice *, const char*);
+
+#ifndef SOAP_TYPE___pub2__delete_USCOREpublisherAssertions
+#define SOAP_TYPE___pub2__delete_USCOREpublisherAssertions (318)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__delete_USCOREpublisherAssertions(struct soap*, const struct __pub2__delete_USCOREpublisherAssertions *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__delete_USCOREpublisherAssertions(struct soap*, struct __pub2__delete_USCOREpublisherAssertions *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__delete_USCOREpublisherAssertions(struct soap*, const struct __pub2__delete_USCOREpublisherAssertions *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__delete_USCOREpublisherAssertions(struct soap*, const char*, int, const struct __pub2__delete_USCOREpublisherAssertions *, const char*);
+SOAP_FMAC3 struct __pub2__delete_USCOREpublisherAssertions * SOAP_FMAC4 soap_get___pub2__delete_USCOREpublisherAssertions(struct soap*, struct __pub2__delete_USCOREpublisherAssertions *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__delete_USCOREpublisherAssertions * SOAP_FMAC4 soap_in___pub2__delete_USCOREpublisherAssertions(struct soap*, const char*, struct __pub2__delete_USCOREpublisherAssertions *, const char*);
+
+#ifndef SOAP_TYPE___pub2__delete_USCOREbusiness
+#define SOAP_TYPE___pub2__delete_USCOREbusiness (315)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__delete_USCOREbusiness(struct soap*, const struct __pub2__delete_USCOREbusiness *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__delete_USCOREbusiness(struct soap*, struct __pub2__delete_USCOREbusiness *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__delete_USCOREbusiness(struct soap*, const struct __pub2__delete_USCOREbusiness *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__delete_USCOREbusiness(struct soap*, const char*, int, const struct __pub2__delete_USCOREbusiness *, const char*);
+SOAP_FMAC3 struct __pub2__delete_USCOREbusiness * SOAP_FMAC4 soap_get___pub2__delete_USCOREbusiness(struct soap*, struct __pub2__delete_USCOREbusiness *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__delete_USCOREbusiness * SOAP_FMAC4 soap_in___pub2__delete_USCOREbusiness(struct soap*, const char*, struct __pub2__delete_USCOREbusiness *, const char*);
+
+#ifndef SOAP_TYPE___pub2__delete_USCOREbinding
+#define SOAP_TYPE___pub2__delete_USCOREbinding (312)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__delete_USCOREbinding(struct soap*, const struct __pub2__delete_USCOREbinding *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__delete_USCOREbinding(struct soap*, struct __pub2__delete_USCOREbinding *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__delete_USCOREbinding(struct soap*, const struct __pub2__delete_USCOREbinding *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__delete_USCOREbinding(struct soap*, const char*, int, const struct __pub2__delete_USCOREbinding *, const char*);
+SOAP_FMAC3 struct __pub2__delete_USCOREbinding * SOAP_FMAC4 soap_get___pub2__delete_USCOREbinding(struct soap*, struct __pub2__delete_USCOREbinding *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__delete_USCOREbinding * SOAP_FMAC4 soap_in___pub2__delete_USCOREbinding(struct soap*, const char*, struct __pub2__delete_USCOREbinding *, const char*);
+
+#ifndef SOAP_TYPE___pub2__add_USCOREpublisherAssertions
+#define SOAP_TYPE___pub2__add_USCOREpublisherAssertions (309)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__add_USCOREpublisherAssertions(struct soap*, const struct __pub2__add_USCOREpublisherAssertions *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__add_USCOREpublisherAssertions(struct soap*, struct __pub2__add_USCOREpublisherAssertions *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__add_USCOREpublisherAssertions(struct soap*, const struct __pub2__add_USCOREpublisherAssertions *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__add_USCOREpublisherAssertions(struct soap*, const char*, int, const struct __pub2__add_USCOREpublisherAssertions *, const char*);
+SOAP_FMAC3 struct __pub2__add_USCOREpublisherAssertions * SOAP_FMAC4 soap_get___pub2__add_USCOREpublisherAssertions(struct soap*, struct __pub2__add_USCOREpublisherAssertions *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__add_USCOREpublisherAssertions * SOAP_FMAC4 soap_in___pub2__add_USCOREpublisherAssertions(struct soap*, const char*, struct __pub2__add_USCOREpublisherAssertions *, const char*);
+
+#ifndef WITH_NOGLOBAL
+
+#ifndef SOAP_TYPE_PointerToSOAP_ENV__Code
+#define SOAP_TYPE_PointerToSOAP_ENV__Code (361)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Code(struct soap*, const char *, int, struct SOAP_ENV__Code *const*, const char *);
+SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code **, const char*, const char*);
+SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Code(struct soap*, const char*, struct SOAP_ENV__Code **, const char*);
+
+#endif
+
+#ifndef WITH_NOGLOBAL
+
+#ifndef SOAP_TYPE_PointerToSOAP_ENV__Detail
+#define SOAP_TYPE_PointerToSOAP_ENV__Detail (360)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Detail(struct soap*, const char *, int, struct SOAP_ENV__Detail *const*, const char *);
+SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail **, const char*, const char*);
+SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Detail(struct soap*, const char*, struct SOAP_ENV__Detail **, const char*);
+
+#endif
+
+#ifndef SOAP_TYPE_PointerTouddi2__set_USCOREpublisherAssertions
+#define SOAP_TYPE_PointerTouddi2__set_USCOREpublisherAssertions (352)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__set_USCOREpublisherAssertions(struct soap*, uddi2__set_USCOREpublisherAssertions *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__set_USCOREpublisherAssertions(struct soap*, uddi2__set_USCOREpublisherAssertions *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__set_USCOREpublisherAssertions(struct soap*, const char *, int, uddi2__set_USCOREpublisherAssertions *const*, const char *);
+SOAP_FMAC3 uddi2__set_USCOREpublisherAssertions ** SOAP_FMAC4 soap_get_PointerTouddi2__set_USCOREpublisherAssertions(struct soap*, uddi2__set_USCOREpublisherAssertions **, const char*, const char*);
+SOAP_FMAC3 uddi2__set_USCOREpublisherAssertions ** SOAP_FMAC4 soap_in_PointerTouddi2__set_USCOREpublisherAssertions(struct soap*, const char*, uddi2__set_USCOREpublisherAssertions **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__save_USCOREtModel
+#define SOAP_TYPE_PointerTouddi2__save_USCOREtModel (349)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__save_USCOREtModel(struct soap*, uddi2__save_USCOREtModel *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__save_USCOREtModel(struct soap*, uddi2__save_USCOREtModel *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__save_USCOREtModel(struct soap*, const char *, int, uddi2__save_USCOREtModel *const*, const char *);
+SOAP_FMAC3 uddi2__save_USCOREtModel ** SOAP_FMAC4 soap_get_PointerTouddi2__save_USCOREtModel(struct soap*, uddi2__save_USCOREtModel **, const char*, const char*);
+SOAP_FMAC3 uddi2__save_USCOREtModel ** SOAP_FMAC4 soap_in_PointerTouddi2__save_USCOREtModel(struct soap*, const char*, uddi2__save_USCOREtModel **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__save_USCOREservice
+#define SOAP_TYPE_PointerTouddi2__save_USCOREservice (346)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__save_USCOREservice(struct soap*, uddi2__save_USCOREservice *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__save_USCOREservice(struct soap*, uddi2__save_USCOREservice *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__save_USCOREservice(struct soap*, const char *, int, uddi2__save_USCOREservice *const*, const char *);
+SOAP_FMAC3 uddi2__save_USCOREservice ** SOAP_FMAC4 soap_get_PointerTouddi2__save_USCOREservice(struct soap*, uddi2__save_USCOREservice **, const char*, const char*);
+SOAP_FMAC3 uddi2__save_USCOREservice ** SOAP_FMAC4 soap_in_PointerTouddi2__save_USCOREservice(struct soap*, const char*, uddi2__save_USCOREservice **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__save_USCOREbusiness
+#define SOAP_TYPE_PointerTouddi2__save_USCOREbusiness (343)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__save_USCOREbusiness(struct soap*, uddi2__save_USCOREbusiness *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__save_USCOREbusiness(struct soap*, uddi2__save_USCOREbusiness *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__save_USCOREbusiness(struct soap*, const char *, int, uddi2__save_USCOREbusiness *const*, const char *);
+SOAP_FMAC3 uddi2__save_USCOREbusiness ** SOAP_FMAC4 soap_get_PointerTouddi2__save_USCOREbusiness(struct soap*, uddi2__save_USCOREbusiness **, const char*, const char*);
+SOAP_FMAC3 uddi2__save_USCOREbusiness ** SOAP_FMAC4 soap_in_PointerTouddi2__save_USCOREbusiness(struct soap*, const char*, uddi2__save_USCOREbusiness **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__save_USCOREbinding
+#define SOAP_TYPE_PointerTouddi2__save_USCOREbinding (340)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__save_USCOREbinding(struct soap*, uddi2__save_USCOREbinding *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__save_USCOREbinding(struct soap*, uddi2__save_USCOREbinding *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__save_USCOREbinding(struct soap*, const char *, int, uddi2__save_USCOREbinding *const*, const char *);
+SOAP_FMAC3 uddi2__save_USCOREbinding ** SOAP_FMAC4 soap_get_PointerTouddi2__save_USCOREbinding(struct soap*, uddi2__save_USCOREbinding **, const char*, const char*);
+SOAP_FMAC3 uddi2__save_USCOREbinding ** SOAP_FMAC4 soap_in_PointerTouddi2__save_USCOREbinding(struct soap*, const char*, uddi2__save_USCOREbinding **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__get_USCOREregisteredInfo
+#define SOAP_TYPE_PointerTouddi2__get_USCOREregisteredInfo (337)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__get_USCOREregisteredInfo(struct soap*, uddi2__get_USCOREregisteredInfo *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__get_USCOREregisteredInfo(struct soap*, uddi2__get_USCOREregisteredInfo *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__get_USCOREregisteredInfo(struct soap*, const char *, int, uddi2__get_USCOREregisteredInfo *const*, const char *);
+SOAP_FMAC3 uddi2__get_USCOREregisteredInfo ** SOAP_FMAC4 soap_get_PointerTouddi2__get_USCOREregisteredInfo(struct soap*, uddi2__get_USCOREregisteredInfo **, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREregisteredInfo ** SOAP_FMAC4 soap_in_PointerTouddi2__get_USCOREregisteredInfo(struct soap*, const char*, uddi2__get_USCOREregisteredInfo **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__get_USCOREpublisherAssertions
+#define SOAP_TYPE_PointerTouddi2__get_USCOREpublisherAssertions (334)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__get_USCOREpublisherAssertions(struct soap*, uddi2__get_USCOREpublisherAssertions *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__get_USCOREpublisherAssertions(struct soap*, uddi2__get_USCOREpublisherAssertions *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__get_USCOREpublisherAssertions(struct soap*, const char *, int, uddi2__get_USCOREpublisherAssertions *const*, const char *);
+SOAP_FMAC3 uddi2__get_USCOREpublisherAssertions ** SOAP_FMAC4 soap_get_PointerTouddi2__get_USCOREpublisherAssertions(struct soap*, uddi2__get_USCOREpublisherAssertions **, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREpublisherAssertions ** SOAP_FMAC4 soap_in_PointerTouddi2__get_USCOREpublisherAssertions(struct soap*, const char*, uddi2__get_USCOREpublisherAssertions **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__get_USCOREauthToken
+#define SOAP_TYPE_PointerTouddi2__get_USCOREauthToken (331)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__get_USCOREauthToken(struct soap*, uddi2__get_USCOREauthToken *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__get_USCOREauthToken(struct soap*, uddi2__get_USCOREauthToken *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__get_USCOREauthToken(struct soap*, const char *, int, uddi2__get_USCOREauthToken *const*, const char *);
+SOAP_FMAC3 uddi2__get_USCOREauthToken ** SOAP_FMAC4 soap_get_PointerTouddi2__get_USCOREauthToken(struct soap*, uddi2__get_USCOREauthToken **, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREauthToken ** SOAP_FMAC4 soap_in_PointerTouddi2__get_USCOREauthToken(struct soap*, const char*, uddi2__get_USCOREauthToken **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__get_USCOREassertionStatusReport
+#define SOAP_TYPE_PointerTouddi2__get_USCOREassertionStatusReport (328)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__get_USCOREassertionStatusReport(struct soap*, uddi2__get_USCOREassertionStatusReport *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__get_USCOREassertionStatusReport(struct soap*, uddi2__get_USCOREassertionStatusReport *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__get_USCOREassertionStatusReport(struct soap*, const char *, int, uddi2__get_USCOREassertionStatusReport *const*, const char *);
+SOAP_FMAC3 uddi2__get_USCOREassertionStatusReport ** SOAP_FMAC4 soap_get_PointerTouddi2__get_USCOREassertionStatusReport(struct soap*, uddi2__get_USCOREassertionStatusReport **, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREassertionStatusReport ** SOAP_FMAC4 soap_in_PointerTouddi2__get_USCOREassertionStatusReport(struct soap*, const char*, uddi2__get_USCOREassertionStatusReport **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__discard_USCOREauthToken
+#define SOAP_TYPE_PointerTouddi2__discard_USCOREauthToken (325)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__discard_USCOREauthToken(struct soap*, uddi2__discard_USCOREauthToken *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__discard_USCOREauthToken(struct soap*, uddi2__discard_USCOREauthToken *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__discard_USCOREauthToken(struct soap*, const char *, int, uddi2__discard_USCOREauthToken *const*, const char *);
+SOAP_FMAC3 uddi2__discard_USCOREauthToken ** SOAP_FMAC4 soap_get_PointerTouddi2__discard_USCOREauthToken(struct soap*, uddi2__discard_USCOREauthToken **, const char*, const char*);
+SOAP_FMAC3 uddi2__discard_USCOREauthToken ** SOAP_FMAC4 soap_in_PointerTouddi2__discard_USCOREauthToken(struct soap*, const char*, uddi2__discard_USCOREauthToken **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__delete_USCOREtModel
+#define SOAP_TYPE_PointerTouddi2__delete_USCOREtModel (322)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__delete_USCOREtModel(struct soap*, uddi2__delete_USCOREtModel *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__delete_USCOREtModel(struct soap*, uddi2__delete_USCOREtModel *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__delete_USCOREtModel(struct soap*, const char *, int, uddi2__delete_USCOREtModel *const*, const char *);
+SOAP_FMAC3 uddi2__delete_USCOREtModel ** SOAP_FMAC4 soap_get_PointerTouddi2__delete_USCOREtModel(struct soap*, uddi2__delete_USCOREtModel **, const char*, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREtModel ** SOAP_FMAC4 soap_in_PointerTouddi2__delete_USCOREtModel(struct soap*, const char*, uddi2__delete_USCOREtModel **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__delete_USCOREservice
+#define SOAP_TYPE_PointerTouddi2__delete_USCOREservice (319)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__delete_USCOREservice(struct soap*, uddi2__delete_USCOREservice *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__delete_USCOREservice(struct soap*, uddi2__delete_USCOREservice *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__delete_USCOREservice(struct soap*, const char *, int, uddi2__delete_USCOREservice *const*, const char *);
+SOAP_FMAC3 uddi2__delete_USCOREservice ** SOAP_FMAC4 soap_get_PointerTouddi2__delete_USCOREservice(struct soap*, uddi2__delete_USCOREservice **, const char*, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREservice ** SOAP_FMAC4 soap_in_PointerTouddi2__delete_USCOREservice(struct soap*, const char*, uddi2__delete_USCOREservice **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__delete_USCOREpublisherAssertions
+#define SOAP_TYPE_PointerTouddi2__delete_USCOREpublisherAssertions (316)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__delete_USCOREpublisherAssertions(struct soap*, uddi2__delete_USCOREpublisherAssertions *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__delete_USCOREpublisherAssertions(struct soap*, uddi2__delete_USCOREpublisherAssertions *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__delete_USCOREpublisherAssertions(struct soap*, const char *, int, uddi2__delete_USCOREpublisherAssertions *const*, const char *);
+SOAP_FMAC3 uddi2__delete_USCOREpublisherAssertions ** SOAP_FMAC4 soap_get_PointerTouddi2__delete_USCOREpublisherAssertions(struct soap*, uddi2__delete_USCOREpublisherAssertions **, const char*, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREpublisherAssertions ** SOAP_FMAC4 soap_in_PointerTouddi2__delete_USCOREpublisherAssertions(struct soap*, const char*, uddi2__delete_USCOREpublisherAssertions **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__delete_USCOREbusiness
+#define SOAP_TYPE_PointerTouddi2__delete_USCOREbusiness (313)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__delete_USCOREbusiness(struct soap*, uddi2__delete_USCOREbusiness *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__delete_USCOREbusiness(struct soap*, uddi2__delete_USCOREbusiness *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__delete_USCOREbusiness(struct soap*, const char *, int, uddi2__delete_USCOREbusiness *const*, const char *);
+SOAP_FMAC3 uddi2__delete_USCOREbusiness ** SOAP_FMAC4 soap_get_PointerTouddi2__delete_USCOREbusiness(struct soap*, uddi2__delete_USCOREbusiness **, const char*, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREbusiness ** SOAP_FMAC4 soap_in_PointerTouddi2__delete_USCOREbusiness(struct soap*, const char*, uddi2__delete_USCOREbusiness **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__delete_USCOREbinding
+#define SOAP_TYPE_PointerTouddi2__delete_USCOREbinding (310)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__delete_USCOREbinding(struct soap*, uddi2__delete_USCOREbinding *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__delete_USCOREbinding(struct soap*, uddi2__delete_USCOREbinding *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__delete_USCOREbinding(struct soap*, const char *, int, uddi2__delete_USCOREbinding *const*, const char *);
+SOAP_FMAC3 uddi2__delete_USCOREbinding ** SOAP_FMAC4 soap_get_PointerTouddi2__delete_USCOREbinding(struct soap*, uddi2__delete_USCOREbinding **, const char*, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREbinding ** SOAP_FMAC4 soap_in_PointerTouddi2__delete_USCOREbinding(struct soap*, const char*, uddi2__delete_USCOREbinding **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__add_USCOREpublisherAssertions
+#define SOAP_TYPE_PointerTouddi2__add_USCOREpublisherAssertions (307)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__add_USCOREpublisherAssertions(struct soap*, uddi2__add_USCOREpublisherAssertions *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__add_USCOREpublisherAssertions(struct soap*, uddi2__add_USCOREpublisherAssertions *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__add_USCOREpublisherAssertions(struct soap*, const char *, int, uddi2__add_USCOREpublisherAssertions *const*, const char *);
+SOAP_FMAC3 uddi2__add_USCOREpublisherAssertions ** SOAP_FMAC4 soap_get_PointerTouddi2__add_USCOREpublisherAssertions(struct soap*, uddi2__add_USCOREpublisherAssertions **, const char*, const char*);
+SOAP_FMAC3 uddi2__add_USCOREpublisherAssertions ** SOAP_FMAC4 soap_in_PointerTouddi2__add_USCOREpublisherAssertions(struct soap*, const char*, uddi2__add_USCOREpublisherAssertions **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__relatedBusinessInfos
+#define SOAP_TYPE_PointerTouddi2__relatedBusinessInfos (305)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__relatedBusinessInfos(struct soap*, uddi2__relatedBusinessInfos *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__relatedBusinessInfos(struct soap*, uddi2__relatedBusinessInfos *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__relatedBusinessInfos(struct soap*, const char *, int, uddi2__relatedBusinessInfos *const*, const char *);
+SOAP_FMAC3 uddi2__relatedBusinessInfos ** SOAP_FMAC4 soap_get_PointerTouddi2__relatedBusinessInfos(struct soap*, uddi2__relatedBusinessInfos **, const char*, const char*);
+SOAP_FMAC3 uddi2__relatedBusinessInfos ** SOAP_FMAC4 soap_in_PointerTouddi2__relatedBusinessInfos(struct soap*, const char*, uddi2__relatedBusinessInfos **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__tModelInfos
+#define SOAP_TYPE_PointerTouddi2__tModelInfos (304)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__tModelInfos(struct soap*, uddi2__tModelInfos *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__tModelInfos(struct soap*, uddi2__tModelInfos *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__tModelInfos(struct soap*, const char *, int, uddi2__tModelInfos *const*, const char *);
+SOAP_FMAC3 uddi2__tModelInfos ** SOAP_FMAC4 soap_get_PointerTouddi2__tModelInfos(struct soap*, uddi2__tModelInfos **, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelInfos ** SOAP_FMAC4 soap_in_PointerTouddi2__tModelInfos(struct soap*, const char*, uddi2__tModelInfos **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__businessInfos
+#define SOAP_TYPE_PointerTouddi2__businessInfos (303)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__businessInfos(struct soap*, uddi2__businessInfos *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__businessInfos(struct soap*, uddi2__businessInfos *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__businessInfos(struct soap*, const char *, int, uddi2__businessInfos *const*, const char *);
+SOAP_FMAC3 uddi2__businessInfos ** SOAP_FMAC4 soap_get_PointerTouddi2__businessInfos(struct soap*, uddi2__businessInfos **, const char*, const char*);
+SOAP_FMAC3 uddi2__businessInfos ** SOAP_FMAC4 soap_in_PointerTouddi2__businessInfos(struct soap*, const char*, uddi2__businessInfos **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__businessEntityExt
+#define SOAP_TYPE_PointerTouddi2__businessEntityExt (301)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__businessEntityExt(struct soap*, uddi2__businessEntityExt *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__businessEntityExt(struct soap*, uddi2__businessEntityExt *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__businessEntityExt(struct soap*, const char *, int, uddi2__businessEntityExt *const*, const char *);
+SOAP_FMAC3 uddi2__businessEntityExt ** SOAP_FMAC4 soap_get_PointerTouddi2__businessEntityExt(struct soap*, uddi2__businessEntityExt **, const char*, const char*);
+SOAP_FMAC3 uddi2__businessEntityExt ** SOAP_FMAC4 soap_in_PointerTouddi2__businessEntityExt(struct soap*, const char*, uddi2__businessEntityExt **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__assertionStatusItem
+#define SOAP_TYPE_PointerTouddi2__assertionStatusItem (299)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__assertionStatusItem(struct soap*, uddi2__assertionStatusItem *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__assertionStatusItem(struct soap*, uddi2__assertionStatusItem *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__assertionStatusItem(struct soap*, const char *, int, uddi2__assertionStatusItem *const*, const char *);
+SOAP_FMAC3 uddi2__assertionStatusItem ** SOAP_FMAC4 soap_get_PointerTouddi2__assertionStatusItem(struct soap*, uddi2__assertionStatusItem **, const char*, const char*);
+SOAP_FMAC3 uddi2__assertionStatusItem ** SOAP_FMAC4 soap_in_PointerTouddi2__assertionStatusItem(struct soap*, const char*, uddi2__assertionStatusItem **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__tModel
+#define SOAP_TYPE_PointerTouddi2__tModel (287)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__tModel(struct soap*, uddi2__tModel *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__tModel(struct soap*, uddi2__tModel *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__tModel(struct soap*, const char *, int, uddi2__tModel *const*, const char *);
+SOAP_FMAC3 uddi2__tModel ** SOAP_FMAC4 soap_get_PointerTouddi2__tModel(struct soap*, uddi2__tModel **, const char*, const char*);
+SOAP_FMAC3 uddi2__tModel ** SOAP_FMAC4 soap_in_PointerTouddi2__tModel(struct soap*, const char*, uddi2__tModel **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__tModelDetail
+#define SOAP_TYPE_PointerTouddi2__tModelDetail (263)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__tModelDetail(struct soap*, uddi2__tModelDetail *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__tModelDetail(struct soap*, uddi2__tModelDetail *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__tModelDetail(struct soap*, const char *, int, uddi2__tModelDetail *const*, const char *);
+SOAP_FMAC3 uddi2__tModelDetail ** SOAP_FMAC4 soap_get_PointerTouddi2__tModelDetail(struct soap*, uddi2__tModelDetail **, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelDetail ** SOAP_FMAC4 soap_in_PointerTouddi2__tModelDetail(struct soap*, const char*, uddi2__tModelDetail **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__serviceDetail
+#define SOAP_TYPE_PointerTouddi2__serviceDetail (258)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__serviceDetail(struct soap*, uddi2__serviceDetail *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__serviceDetail(struct soap*, uddi2__serviceDetail *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__serviceDetail(struct soap*, const char *, int, uddi2__serviceDetail *const*, const char *);
+SOAP_FMAC3 uddi2__serviceDetail ** SOAP_FMAC4 soap_get_PointerTouddi2__serviceDetail(struct soap*, uddi2__serviceDetail **, const char*, const char*);
+SOAP_FMAC3 uddi2__serviceDetail ** SOAP_FMAC4 soap_in_PointerTouddi2__serviceDetail(struct soap*, const char*, uddi2__serviceDetail **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__registeredInfo
+#define SOAP_TYPE_PointerTouddi2__registeredInfo (253)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__registeredInfo(struct soap*, uddi2__registeredInfo *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__registeredInfo(struct soap*, uddi2__registeredInfo *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__registeredInfo(struct soap*, const char *, int, uddi2__registeredInfo *const*, const char *);
+SOAP_FMAC3 uddi2__registeredInfo ** SOAP_FMAC4 soap_get_PointerTouddi2__registeredInfo(struct soap*, uddi2__registeredInfo **, const char*, const char*);
+SOAP_FMAC3 uddi2__registeredInfo ** SOAP_FMAC4 soap_in_PointerTouddi2__registeredInfo(struct soap*, const char*, uddi2__registeredInfo **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__publisherAssertions
+#define SOAP_TYPE_PointerTouddi2__publisherAssertions (250)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__publisherAssertions(struct soap*, uddi2__publisherAssertions *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__publisherAssertions(struct soap*, uddi2__publisherAssertions *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__publisherAssertions(struct soap*, const char *, int, uddi2__publisherAssertions *const*, const char *);
+SOAP_FMAC3 uddi2__publisherAssertions ** SOAP_FMAC4 soap_get_PointerTouddi2__publisherAssertions(struct soap*, uddi2__publisherAssertions **, const char*, const char*);
+SOAP_FMAC3 uddi2__publisherAssertions ** SOAP_FMAC4 soap_in_PointerTouddi2__publisherAssertions(struct soap*, const char*, uddi2__publisherAssertions **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__businessDetailExt
+#define SOAP_TYPE_PointerTouddi2__businessDetailExt (247)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__businessDetailExt(struct soap*, uddi2__businessDetailExt *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__businessDetailExt(struct soap*, uddi2__businessDetailExt *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__businessDetailExt(struct soap*, const char *, int, uddi2__businessDetailExt *const*, const char *);
+SOAP_FMAC3 uddi2__businessDetailExt ** SOAP_FMAC4 soap_get_PointerTouddi2__businessDetailExt(struct soap*, uddi2__businessDetailExt **, const char*, const char*);
+SOAP_FMAC3 uddi2__businessDetailExt ** SOAP_FMAC4 soap_in_PointerTouddi2__businessDetailExt(struct soap*, const char*, uddi2__businessDetailExt **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__businessDetail
+#define SOAP_TYPE_PointerTouddi2__businessDetail (242)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__businessDetail(struct soap*, uddi2__businessDetail *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__businessDetail(struct soap*, uddi2__businessDetail *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__businessDetail(struct soap*, const char *, int, uddi2__businessDetail *const*, const char *);
+SOAP_FMAC3 uddi2__businessDetail ** SOAP_FMAC4 soap_get_PointerTouddi2__businessDetail(struct soap*, uddi2__businessDetail **, const char*, const char*);
+SOAP_FMAC3 uddi2__businessDetail ** SOAP_FMAC4 soap_in_PointerTouddi2__businessDetail(struct soap*, const char*, uddi2__businessDetail **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__authToken
+#define SOAP_TYPE_PointerTouddi2__authToken (233)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__authToken(struct soap*, uddi2__authToken *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__authToken(struct soap*, uddi2__authToken *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__authToken(struct soap*, const char *, int, uddi2__authToken *const*, const char *);
+SOAP_FMAC3 uddi2__authToken ** SOAP_FMAC4 soap_get_PointerTouddi2__authToken(struct soap*, uddi2__authToken **, const char*, const char*);
+SOAP_FMAC3 uddi2__authToken ** SOAP_FMAC4 soap_in_PointerTouddi2__authToken(struct soap*, const char*, uddi2__authToken **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__assertionStatusReport
+#define SOAP_TYPE_PointerTouddi2__assertionStatusReport (229)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__assertionStatusReport(struct soap*, uddi2__assertionStatusReport *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__assertionStatusReport(struct soap*, uddi2__assertionStatusReport *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__assertionStatusReport(struct soap*, const char *, int, uddi2__assertionStatusReport *const*, const char *);
+SOAP_FMAC3 uddi2__assertionStatusReport ** SOAP_FMAC4 soap_get_PointerTouddi2__assertionStatusReport(struct soap*, uddi2__assertionStatusReport **, const char*, const char*);
+SOAP_FMAC3 uddi2__assertionStatusReport ** SOAP_FMAC4 soap_in_PointerTouddi2__assertionStatusReport(struct soap*, const char*, uddi2__assertionStatusReport **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__tModelList
+#define SOAP_TYPE_PointerTouddi2__tModelList (225)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__tModelList(struct soap*, uddi2__tModelList *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__tModelList(struct soap*, uddi2__tModelList *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__tModelList(struct soap*, const char *, int, uddi2__tModelList *const*, const char *);
+SOAP_FMAC3 uddi2__tModelList ** SOAP_FMAC4 soap_get_PointerTouddi2__tModelList(struct soap*, uddi2__tModelList **, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelList ** SOAP_FMAC4 soap_in_PointerTouddi2__tModelList(struct soap*, const char*, uddi2__tModelList **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__serviceList
+#define SOAP_TYPE_PointerTouddi2__serviceList (220)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__serviceList(struct soap*, uddi2__serviceList *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__serviceList(struct soap*, uddi2__serviceList *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__serviceList(struct soap*, const char *, int, uddi2__serviceList *const*, const char *);
+SOAP_FMAC3 uddi2__serviceList ** SOAP_FMAC4 soap_get_PointerTouddi2__serviceList(struct soap*, uddi2__serviceList **, const char*, const char*);
+SOAP_FMAC3 uddi2__serviceList ** SOAP_FMAC4 soap_in_PointerTouddi2__serviceList(struct soap*, const char*, uddi2__serviceList **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__relatedBusinessesList
+#define SOAP_TYPE_PointerTouddi2__relatedBusinessesList (214)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__relatedBusinessesList(struct soap*, uddi2__relatedBusinessesList *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__relatedBusinessesList(struct soap*, uddi2__relatedBusinessesList *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__relatedBusinessesList(struct soap*, const char *, int, uddi2__relatedBusinessesList *const*, const char *);
+SOAP_FMAC3 uddi2__relatedBusinessesList ** SOAP_FMAC4 soap_get_PointerTouddi2__relatedBusinessesList(struct soap*, uddi2__relatedBusinessesList **, const char*, const char*);
+SOAP_FMAC3 uddi2__relatedBusinessesList ** SOAP_FMAC4 soap_in_PointerTouddi2__relatedBusinessesList(struct soap*, const char*, uddi2__relatedBusinessesList **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__businessList
+#define SOAP_TYPE_PointerTouddi2__businessList (210)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__businessList(struct soap*, uddi2__businessList *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__businessList(struct soap*, uddi2__businessList *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__businessList(struct soap*, const char *, int, uddi2__businessList *const*, const char *);
+SOAP_FMAC3 uddi2__businessList ** SOAP_FMAC4 soap_get_PointerTouddi2__businessList(struct soap*, uddi2__businessList **, const char*, const char*);
+SOAP_FMAC3 uddi2__businessList ** SOAP_FMAC4 soap_in_PointerTouddi2__businessList(struct soap*, const char*, uddi2__businessList **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__bindingDetail
+#define SOAP_TYPE_PointerTouddi2__bindingDetail (202)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__bindingDetail(struct soap*, uddi2__bindingDetail *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__bindingDetail(struct soap*, uddi2__bindingDetail *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__bindingDetail(struct soap*, const char *, int, uddi2__bindingDetail *const*, const char *);
+SOAP_FMAC3 uddi2__bindingDetail ** SOAP_FMAC4 soap_get_PointerTouddi2__bindingDetail(struct soap*, uddi2__bindingDetail **, const char*, const char*);
+SOAP_FMAC3 uddi2__bindingDetail ** SOAP_FMAC4 soap_in_PointerTouddi2__bindingDetail(struct soap*, const char*, uddi2__bindingDetail **, const char*);
+
+#ifndef SOAP_TYPE_PointerToint
+#define SOAP_TYPE_PointerToint (198)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToint(struct soap*, int *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToint(struct soap*, int *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToint(struct soap*, const char *, int, int *const*, const char *);
+SOAP_FMAC3 int ** SOAP_FMAC4 soap_get_PointerToint(struct soap*, int **, const char*, const char*);
+SOAP_FMAC3 int ** SOAP_FMAC4 soap_in_PointerToint(struct soap*, const char*, int **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__tModelBag
+#define SOAP_TYPE_PointerTouddi2__tModelBag (197)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__tModelBag(struct soap*, uddi2__tModelBag *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__tModelBag(struct soap*, uddi2__tModelBag *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__tModelBag(struct soap*, const char *, int, uddi2__tModelBag *const*, const char *);
+SOAP_FMAC3 uddi2__tModelBag ** SOAP_FMAC4 soap_get_PointerTouddi2__tModelBag(struct soap*, uddi2__tModelBag **, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelBag ** SOAP_FMAC4 soap_in_PointerTouddi2__tModelBag(struct soap*, const char*, uddi2__tModelBag **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__findQualifiers
+#define SOAP_TYPE_PointerTouddi2__findQualifiers (196)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__findQualifiers(struct soap*, uddi2__findQualifiers *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__findQualifiers(struct soap*, uddi2__findQualifiers *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__findQualifiers(struct soap*, const char *, int, uddi2__findQualifiers *const*, const char *);
+SOAP_FMAC3 uddi2__findQualifiers ** SOAP_FMAC4 soap_get_PointerTouddi2__findQualifiers(struct soap*, uddi2__findQualifiers **, const char*, const char*);
+SOAP_FMAC3 uddi2__findQualifiers ** SOAP_FMAC4 soap_in_PointerTouddi2__findQualifiers(struct soap*, const char*, uddi2__findQualifiers **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__dispositionReport
+#define SOAP_TYPE_PointerTouddi2__dispositionReport (166)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__dispositionReport(struct soap*, uddi2__dispositionReport *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__dispositionReport(struct soap*, uddi2__dispositionReport *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__dispositionReport(struct soap*, const char *, int, uddi2__dispositionReport *const*, const char *);
+SOAP_FMAC3 uddi2__dispositionReport ** SOAP_FMAC4 soap_get_PointerTouddi2__dispositionReport(struct soap*, uddi2__dispositionReport **, const char*, const char*);
+SOAP_FMAC3 uddi2__dispositionReport ** SOAP_FMAC4 soap_in_PointerTouddi2__dispositionReport(struct soap*, const char*, uddi2__dispositionReport **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__publisherAssertion
+#define SOAP_TYPE_PointerTouddi2__publisherAssertion (157)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__publisherAssertion(struct soap*, uddi2__publisherAssertion *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__publisherAssertion(struct soap*, uddi2__publisherAssertion *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__publisherAssertion(struct soap*, const char *, int, uddi2__publisherAssertion *const*, const char *);
+SOAP_FMAC3 uddi2__publisherAssertion ** SOAP_FMAC4 soap_get_PointerTouddi2__publisherAssertion(struct soap*, uddi2__publisherAssertion **, const char*, const char*);
+SOAP_FMAC3 uddi2__publisherAssertion ** SOAP_FMAC4 soap_in_PointerTouddi2__publisherAssertion(struct soap*, const char*, uddi2__publisherAssertion **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__instanceDetails
+#define SOAP_TYPE_PointerTouddi2__instanceDetails (156)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__instanceDetails(struct soap*, uddi2__instanceDetails *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__instanceDetails(struct soap*, uddi2__instanceDetails *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__instanceDetails(struct soap*, const char *, int, uddi2__instanceDetails *const*, const char *);
+SOAP_FMAC3 uddi2__instanceDetails ** SOAP_FMAC4 soap_get_PointerTouddi2__instanceDetails(struct soap*, uddi2__instanceDetails **, const char*, const char*);
+SOAP_FMAC3 uddi2__instanceDetails ** SOAP_FMAC4 soap_in_PointerTouddi2__instanceDetails(struct soap*, const char*, uddi2__instanceDetails **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__tModelInstanceInfo
+#define SOAP_TYPE_PointerTouddi2__tModelInstanceInfo (154)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__tModelInstanceInfo(struct soap*, uddi2__tModelInstanceInfo *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__tModelInstanceInfo(struct soap*, uddi2__tModelInstanceInfo *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__tModelInstanceInfo(struct soap*, const char *, int, uddi2__tModelInstanceInfo *const*, const char *);
+SOAP_FMAC3 uddi2__tModelInstanceInfo ** SOAP_FMAC4 soap_get_PointerTouddi2__tModelInstanceInfo(struct soap*, uddi2__tModelInstanceInfo **, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelInstanceInfo ** SOAP_FMAC4 soap_in_PointerTouddi2__tModelInstanceInfo(struct soap*, const char*, uddi2__tModelInstanceInfo **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__tModelInfo
+#define SOAP_TYPE_PointerTouddi2__tModelInfo (152)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__tModelInfo(struct soap*, uddi2__tModelInfo *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__tModelInfo(struct soap*, uddi2__tModelInfo *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__tModelInfo(struct soap*, const char *, int, uddi2__tModelInfo *const*, const char *);
+SOAP_FMAC3 uddi2__tModelInfo ** SOAP_FMAC4 soap_get_PointerTouddi2__tModelInfo(struct soap*, uddi2__tModelInfo **, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelInfo ** SOAP_FMAC4 soap_in_PointerTouddi2__tModelInfo(struct soap*, const char*, uddi2__tModelInfo **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__serviceInfo
+#define SOAP_TYPE_PointerTouddi2__serviceInfo (149)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__serviceInfo(struct soap*, uddi2__serviceInfo *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__serviceInfo(struct soap*, uddi2__serviceInfo *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__serviceInfo(struct soap*, const char *, int, uddi2__serviceInfo *const*, const char *);
+SOAP_FMAC3 uddi2__serviceInfo ** SOAP_FMAC4 soap_get_PointerTouddi2__serviceInfo(struct soap*, uddi2__serviceInfo **, const char*, const char*);
+SOAP_FMAC3 uddi2__serviceInfo ** SOAP_FMAC4 soap_in_PointerTouddi2__serviceInfo(struct soap*, const char*, uddi2__serviceInfo **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__keyType
+#define SOAP_TYPE_PointerTouddi2__keyType (148)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__keyType(struct soap*, enum uddi2__keyType *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__keyType(struct soap*, enum uddi2__keyType *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__keyType(struct soap*, const char *, int, enum uddi2__keyType *const*, const char *);
+SOAP_FMAC3 enum uddi2__keyType ** SOAP_FMAC4 soap_get_PointerTouddi2__keyType(struct soap*, enum uddi2__keyType **, const char*, const char*);
+SOAP_FMAC3 enum uddi2__keyType ** SOAP_FMAC4 soap_in_PointerTouddi2__keyType(struct soap*, const char*, enum uddi2__keyType **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__errInfo
+#define SOAP_TYPE_PointerTouddi2__errInfo (147)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__errInfo(struct soap*, uddi2__errInfo *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__errInfo(struct soap*, uddi2__errInfo *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__errInfo(struct soap*, const char *, int, uddi2__errInfo *const*, const char *);
+SOAP_FMAC3 uddi2__errInfo ** SOAP_FMAC4 soap_get_PointerTouddi2__errInfo(struct soap*, uddi2__errInfo **, const char*, const char*);
+SOAP_FMAC3 uddi2__errInfo ** SOAP_FMAC4 soap_in_PointerTouddi2__errInfo(struct soap*, const char*, uddi2__errInfo **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__relatedBusinessInfo
+#define SOAP_TYPE_PointerTouddi2__relatedBusinessInfo (145)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__relatedBusinessInfo(struct soap*, uddi2__relatedBusinessInfo *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__relatedBusinessInfo(struct soap*, uddi2__relatedBusinessInfo *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__relatedBusinessInfo(struct soap*, const char *, int, uddi2__relatedBusinessInfo *const*, const char *);
+SOAP_FMAC3 uddi2__relatedBusinessInfo ** SOAP_FMAC4 soap_get_PointerTouddi2__relatedBusinessInfo(struct soap*, uddi2__relatedBusinessInfo **, const char*, const char*);
+SOAP_FMAC3 uddi2__relatedBusinessInfo ** SOAP_FMAC4 soap_in_PointerTouddi2__relatedBusinessInfo(struct soap*, const char*, uddi2__relatedBusinessInfo **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__sharedRelationships
+#define SOAP_TYPE_PointerTouddi2__sharedRelationships (143)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__sharedRelationships(struct soap*, uddi2__sharedRelationships *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__sharedRelationships(struct soap*, uddi2__sharedRelationships *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__sharedRelationships(struct soap*, const char *, int, uddi2__sharedRelationships *const*, const char *);
+SOAP_FMAC3 uddi2__sharedRelationships ** SOAP_FMAC4 soap_get_PointerTouddi2__sharedRelationships(struct soap*, uddi2__sharedRelationships **, const char*, const char*);
+SOAP_FMAC3 uddi2__sharedRelationships ** SOAP_FMAC4 soap_in_PointerTouddi2__sharedRelationships(struct soap*, const char*, uddi2__sharedRelationships **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__overviewDoc
+#define SOAP_TYPE_PointerTouddi2__overviewDoc (142)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__overviewDoc(struct soap*, uddi2__overviewDoc *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__overviewDoc(struct soap*, uddi2__overviewDoc *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__overviewDoc(struct soap*, const char *, int, uddi2__overviewDoc *const*, const char *);
+SOAP_FMAC3 uddi2__overviewDoc ** SOAP_FMAC4 soap_get_PointerTouddi2__overviewDoc(struct soap*, uddi2__overviewDoc **, const char*, const char*);
+SOAP_FMAC3 uddi2__overviewDoc ** SOAP_FMAC4 soap_in_PointerTouddi2__overviewDoc(struct soap*, const char*, uddi2__overviewDoc **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__truncated
+#define SOAP_TYPE_PointerTouddi2__truncated (140)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__truncated(struct soap*, enum uddi2__truncated *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__truncated(struct soap*, enum uddi2__truncated *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__truncated(struct soap*, const char *, int, enum uddi2__truncated *const*, const char *);
+SOAP_FMAC3 enum uddi2__truncated ** SOAP_FMAC4 soap_get_PointerTouddi2__truncated(struct soap*, enum uddi2__truncated **, const char*, const char*);
+SOAP_FMAC3 enum uddi2__truncated ** SOAP_FMAC4 soap_in_PointerTouddi2__truncated(struct soap*, const char*, enum uddi2__truncated **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__result
+#define SOAP_TYPE_PointerTouddi2__result (138)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__result(struct soap*, uddi2__result *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__result(struct soap*, uddi2__result *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__result(struct soap*, const char *, int, uddi2__result *const*, const char *);
+SOAP_FMAC3 uddi2__result ** SOAP_FMAC4 soap_get_PointerTouddi2__result(struct soap*, uddi2__result **, const char*, const char*);
+SOAP_FMAC3 uddi2__result ** SOAP_FMAC4 soap_in_PointerTouddi2__result(struct soap*, const char*, uddi2__result **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__discoveryURL
+#define SOAP_TYPE_PointerTouddi2__discoveryURL (136)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__discoveryURL(struct soap*, uddi2__discoveryURL *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__discoveryURL(struct soap*, uddi2__discoveryURL *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__discoveryURL(struct soap*, const char *, int, uddi2__discoveryURL *const*, const char *);
+SOAP_FMAC3 uddi2__discoveryURL ** SOAP_FMAC4 soap_get_PointerTouddi2__discoveryURL(struct soap*, uddi2__discoveryURL **, const char*, const char*);
+SOAP_FMAC3 uddi2__discoveryURL ** SOAP_FMAC4 soap_in_PointerTouddi2__discoveryURL(struct soap*, const char*, uddi2__discoveryURL **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__contact
+#define SOAP_TYPE_PointerTouddi2__contact (134)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__contact(struct soap*, uddi2__contact *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__contact(struct soap*, uddi2__contact *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__contact(struct soap*, const char *, int, uddi2__contact *const*, const char *);
+SOAP_FMAC3 uddi2__contact ** SOAP_FMAC4 soap_get_PointerTouddi2__contact(struct soap*, uddi2__contact **, const char*, const char*);
+SOAP_FMAC3 uddi2__contact ** SOAP_FMAC4 soap_in_PointerTouddi2__contact(struct soap*, const char*, uddi2__contact **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__address
+#define SOAP_TYPE_PointerTouddi2__address (132)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__address(struct soap*, uddi2__address *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__address(struct soap*, uddi2__address *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__address(struct soap*, const char *, int, uddi2__address *const*, const char *);
+SOAP_FMAC3 uddi2__address ** SOAP_FMAC4 soap_get_PointerTouddi2__address(struct soap*, uddi2__address **, const char*, const char*);
+SOAP_FMAC3 uddi2__address ** SOAP_FMAC4 soap_in_PointerTouddi2__address(struct soap*, const char*, uddi2__address **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__email
+#define SOAP_TYPE_PointerTouddi2__email (130)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__email(struct soap*, uddi2__email *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__email(struct soap*, uddi2__email *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__email(struct soap*, const char *, int, uddi2__email *const*, const char *);
+SOAP_FMAC3 uddi2__email ** SOAP_FMAC4 soap_get_PointerTouddi2__email(struct soap*, uddi2__email **, const char*, const char*);
+SOAP_FMAC3 uddi2__email ** SOAP_FMAC4 soap_in_PointerTouddi2__email(struct soap*, const char*, uddi2__email **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__phone
+#define SOAP_TYPE_PointerTouddi2__phone (128)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__phone(struct soap*, uddi2__phone *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__phone(struct soap*, uddi2__phone *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__phone(struct soap*, const char *, int, uddi2__phone *const*, const char *);
+SOAP_FMAC3 uddi2__phone ** SOAP_FMAC4 soap_get_PointerTouddi2__phone(struct soap*, uddi2__phone **, const char*, const char*);
+SOAP_FMAC3 uddi2__phone ** SOAP_FMAC4 soap_in_PointerTouddi2__phone(struct soap*, const char*, uddi2__phone **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__businessService
+#define SOAP_TYPE_PointerTouddi2__businessService (125)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__businessService(struct soap*, uddi2__businessService *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__businessService(struct soap*, uddi2__businessService *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__businessService(struct soap*, const char *, int, uddi2__businessService *const*, const char *);
+SOAP_FMAC3 uddi2__businessService ** SOAP_FMAC4 soap_get_PointerTouddi2__businessService(struct soap*, uddi2__businessService **, const char*, const char*);
+SOAP_FMAC3 uddi2__businessService ** SOAP_FMAC4 soap_in_PointerTouddi2__businessService(struct soap*, const char*, uddi2__businessService **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__bindingTemplates
+#define SOAP_TYPE_PointerTouddi2__bindingTemplates (124)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__bindingTemplates(struct soap*, uddi2__bindingTemplates *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__bindingTemplates(struct soap*, uddi2__bindingTemplates *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__bindingTemplates(struct soap*, const char *, int, uddi2__bindingTemplates *const*, const char *);
+SOAP_FMAC3 uddi2__bindingTemplates ** SOAP_FMAC4 soap_get_PointerTouddi2__bindingTemplates(struct soap*, uddi2__bindingTemplates **, const char*, const char*);
+SOAP_FMAC3 uddi2__bindingTemplates ** SOAP_FMAC4 soap_in_PointerTouddi2__bindingTemplates(struct soap*, const char*, uddi2__bindingTemplates **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__businessInfo
+#define SOAP_TYPE_PointerTouddi2__businessInfo (122)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__businessInfo(struct soap*, uddi2__businessInfo *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__businessInfo(struct soap*, uddi2__businessInfo *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__businessInfo(struct soap*, const char *, int, uddi2__businessInfo *const*, const char *);
+SOAP_FMAC3 uddi2__businessInfo ** SOAP_FMAC4 soap_get_PointerTouddi2__businessInfo(struct soap*, uddi2__businessInfo **, const char*, const char*);
+SOAP_FMAC3 uddi2__businessInfo ** SOAP_FMAC4 soap_in_PointerTouddi2__businessInfo(struct soap*, const char*, uddi2__businessInfo **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__serviceInfos
+#define SOAP_TYPE_PointerTouddi2__serviceInfos (121)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__serviceInfos(struct soap*, uddi2__serviceInfos *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__serviceInfos(struct soap*, uddi2__serviceInfos *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__serviceInfos(struct soap*, const char *, int, uddi2__serviceInfos *const*, const char *);
+SOAP_FMAC3 uddi2__serviceInfos ** SOAP_FMAC4 soap_get_PointerTouddi2__serviceInfos(struct soap*, uddi2__serviceInfos **, const char*, const char*);
+SOAP_FMAC3 uddi2__serviceInfos ** SOAP_FMAC4 soap_in_PointerTouddi2__serviceInfos(struct soap*, const char*, uddi2__serviceInfos **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__businessEntity
+#define SOAP_TYPE_PointerTouddi2__businessEntity (120)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__businessEntity(struct soap*, uddi2__businessEntity *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__businessEntity(struct soap*, uddi2__businessEntity *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__businessEntity(struct soap*, const char *, int, uddi2__businessEntity *const*, const char *);
+SOAP_FMAC3 uddi2__businessEntity ** SOAP_FMAC4 soap_get_PointerTouddi2__businessEntity(struct soap*, uddi2__businessEntity **, const char*, const char*);
+SOAP_FMAC3 uddi2__businessEntity ** SOAP_FMAC4 soap_in_PointerTouddi2__businessEntity(struct soap*, const char*, uddi2__businessEntity **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__categoryBag
+#define SOAP_TYPE_PointerTouddi2__categoryBag (119)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__categoryBag(struct soap*, uddi2__categoryBag *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__categoryBag(struct soap*, uddi2__categoryBag *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__categoryBag(struct soap*, const char *, int, uddi2__categoryBag *const*, const char *);
+SOAP_FMAC3 uddi2__categoryBag ** SOAP_FMAC4 soap_get_PointerTouddi2__categoryBag(struct soap*, uddi2__categoryBag **, const char*, const char*);
+SOAP_FMAC3 uddi2__categoryBag ** SOAP_FMAC4 soap_in_PointerTouddi2__categoryBag(struct soap*, const char*, uddi2__categoryBag **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__identifierBag
+#define SOAP_TYPE_PointerTouddi2__identifierBag (118)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__identifierBag(struct soap*, uddi2__identifierBag *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__identifierBag(struct soap*, uddi2__identifierBag *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__identifierBag(struct soap*, const char *, int, uddi2__identifierBag *const*, const char *);
+SOAP_FMAC3 uddi2__identifierBag ** SOAP_FMAC4 soap_get_PointerTouddi2__identifierBag(struct soap*, uddi2__identifierBag **, const char*, const char*);
+SOAP_FMAC3 uddi2__identifierBag ** SOAP_FMAC4 soap_in_PointerTouddi2__identifierBag(struct soap*, const char*, uddi2__identifierBag **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__businessServices
+#define SOAP_TYPE_PointerTouddi2__businessServices (117)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__businessServices(struct soap*, uddi2__businessServices *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__businessServices(struct soap*, uddi2__businessServices *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__businessServices(struct soap*, const char *, int, uddi2__businessServices *const*, const char *);
+SOAP_FMAC3 uddi2__businessServices ** SOAP_FMAC4 soap_get_PointerTouddi2__businessServices(struct soap*, uddi2__businessServices **, const char*, const char*);
+SOAP_FMAC3 uddi2__businessServices ** SOAP_FMAC4 soap_in_PointerTouddi2__businessServices(struct soap*, const char*, uddi2__businessServices **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__contacts
+#define SOAP_TYPE_PointerTouddi2__contacts (116)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__contacts(struct soap*, uddi2__contacts *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__contacts(struct soap*, uddi2__contacts *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__contacts(struct soap*, const char *, int, uddi2__contacts *const*, const char *);
+SOAP_FMAC3 uddi2__contacts ** SOAP_FMAC4 soap_get_PointerTouddi2__contacts(struct soap*, uddi2__contacts **, const char*, const char*);
+SOAP_FMAC3 uddi2__contacts ** SOAP_FMAC4 soap_in_PointerTouddi2__contacts(struct soap*, const char*, uddi2__contacts **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__name
+#define SOAP_TYPE_PointerTouddi2__name (114)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__name(struct soap*, uddi2__name *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__name(struct soap*, uddi2__name *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__name(struct soap*, const char *, int, uddi2__name *const*, const char *);
+SOAP_FMAC3 uddi2__name ** SOAP_FMAC4 soap_get_PointerTouddi2__name(struct soap*, uddi2__name **, const char*, const char*);
+SOAP_FMAC3 uddi2__name ** SOAP_FMAC4 soap_in_PointerTouddi2__name(struct soap*, const char*, uddi2__name **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__discoveryURLs
+#define SOAP_TYPE_PointerTouddi2__discoveryURLs (113)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__discoveryURLs(struct soap*, uddi2__discoveryURLs *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__discoveryURLs(struct soap*, uddi2__discoveryURLs *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__discoveryURLs(struct soap*, const char *, int, uddi2__discoveryURLs *const*, const char *);
+SOAP_FMAC3 uddi2__discoveryURLs ** SOAP_FMAC4 soap_get_PointerTouddi2__discoveryURLs(struct soap*, uddi2__discoveryURLs **, const char*, const char*);
+SOAP_FMAC3 uddi2__discoveryURLs ** SOAP_FMAC4 soap_in_PointerTouddi2__discoveryURLs(struct soap*, const char*, uddi2__discoveryURLs **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__bindingTemplate
+#define SOAP_TYPE_PointerTouddi2__bindingTemplate (111)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__bindingTemplate(struct soap*, uddi2__bindingTemplate *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__bindingTemplate(struct soap*, uddi2__bindingTemplate *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__bindingTemplate(struct soap*, const char *, int, uddi2__bindingTemplate *const*, const char *);
+SOAP_FMAC3 uddi2__bindingTemplate ** SOAP_FMAC4 soap_get_PointerTouddi2__bindingTemplate(struct soap*, uddi2__bindingTemplate **, const char*, const char*);
+SOAP_FMAC3 uddi2__bindingTemplate ** SOAP_FMAC4 soap_in_PointerTouddi2__bindingTemplate(struct soap*, const char*, uddi2__bindingTemplate **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__hostingRedirector
+#define SOAP_TYPE_PointerTouddi2__hostingRedirector (110)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__hostingRedirector(struct soap*, uddi2__hostingRedirector *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__hostingRedirector(struct soap*, uddi2__hostingRedirector *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__hostingRedirector(struct soap*, const char *, int, uddi2__hostingRedirector *const*, const char *);
+SOAP_FMAC3 uddi2__hostingRedirector ** SOAP_FMAC4 soap_get_PointerTouddi2__hostingRedirector(struct soap*, uddi2__hostingRedirector **, const char*, const char*);
+SOAP_FMAC3 uddi2__hostingRedirector ** SOAP_FMAC4 soap_in_PointerTouddi2__hostingRedirector(struct soap*, const char*, uddi2__hostingRedirector **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__accessPoint
+#define SOAP_TYPE_PointerTouddi2__accessPoint (109)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__accessPoint(struct soap*, uddi2__accessPoint *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__accessPoint(struct soap*, uddi2__accessPoint *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__accessPoint(struct soap*, const char *, int, uddi2__accessPoint *const*, const char *);
+SOAP_FMAC3 uddi2__accessPoint ** SOAP_FMAC4 soap_get_PointerTouddi2__accessPoint(struct soap*, uddi2__accessPoint **, const char*, const char*);
+SOAP_FMAC3 uddi2__accessPoint ** SOAP_FMAC4 soap_in_PointerTouddi2__accessPoint(struct soap*, const char*, uddi2__accessPoint **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__tModelInstanceDetails
+#define SOAP_TYPE_PointerTouddi2__tModelInstanceDetails (108)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__tModelInstanceDetails(struct soap*, uddi2__tModelInstanceDetails *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__tModelInstanceDetails(struct soap*, uddi2__tModelInstanceDetails *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__tModelInstanceDetails(struct soap*, const char *, int, uddi2__tModelInstanceDetails *const*, const char *);
+SOAP_FMAC3 uddi2__tModelInstanceDetails ** SOAP_FMAC4 soap_get_PointerTouddi2__tModelInstanceDetails(struct soap*, uddi2__tModelInstanceDetails **, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelInstanceDetails ** SOAP_FMAC4 soap_in_PointerTouddi2__tModelInstanceDetails(struct soap*, const char*, uddi2__tModelInstanceDetails **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__description
+#define SOAP_TYPE_PointerTouddi2__description (106)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__description(struct soap*, uddi2__description *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__description(struct soap*, uddi2__description *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__description(struct soap*, const char *, int, uddi2__description *const*, const char *);
+SOAP_FMAC3 uddi2__description ** SOAP_FMAC4 soap_get_PointerTouddi2__description(struct soap*, uddi2__description **, const char*, const char*);
+SOAP_FMAC3 uddi2__description ** SOAP_FMAC4 soap_in_PointerTouddi2__description(struct soap*, const char*, uddi2__description **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__keysOwned
+#define SOAP_TYPE_PointerTouddi2__keysOwned (105)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__keysOwned(struct soap*, uddi2__keysOwned *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__keysOwned(struct soap*, uddi2__keysOwned *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__keysOwned(struct soap*, const char *, int, uddi2__keysOwned *const*, const char *);
+SOAP_FMAC3 uddi2__keysOwned ** SOAP_FMAC4 soap_get_PointerTouddi2__keysOwned(struct soap*, uddi2__keysOwned **, const char*, const char*);
+SOAP_FMAC3 uddi2__keysOwned ** SOAP_FMAC4 soap_in_PointerTouddi2__keysOwned(struct soap*, const char*, uddi2__keysOwned **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__keyedReference
+#define SOAP_TYPE_PointerTouddi2__keyedReference (104)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__keyedReference(struct soap*, uddi2__keyedReference *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__keyedReference(struct soap*, uddi2__keyedReference *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__keyedReference(struct soap*, const char *, int, uddi2__keyedReference *const*, const char *);
+SOAP_FMAC3 uddi2__keyedReference ** SOAP_FMAC4 soap_get_PointerTouddi2__keyedReference(struct soap*, uddi2__keyedReference **, const char*, const char*);
+SOAP_FMAC3 uddi2__keyedReference ** SOAP_FMAC4 soap_in_PointerTouddi2__keyedReference(struct soap*, const char*, uddi2__keyedReference **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__addressLine
+#define SOAP_TYPE_PointerTouddi2__addressLine (100)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__addressLine(struct soap*, uddi2__addressLine *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__addressLine(struct soap*, uddi2__addressLine *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__addressLine(struct soap*, const char *, int, uddi2__addressLine *const*, const char *);
+SOAP_FMAC3 uddi2__addressLine ** SOAP_FMAC4 soap_get_PointerTouddi2__addressLine(struct soap*, uddi2__addressLine **, const char*, const char*);
+SOAP_FMAC3 uddi2__addressLine ** SOAP_FMAC4 soap_in_PointerTouddi2__addressLine(struct soap*, const char*, uddi2__addressLine **, const char*);
+
+#ifndef SOAP_TYPE_uddi2__tModelKey
+#define SOAP_TYPE_uddi2__tModelKey (95)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_uddi2__tModelKey(struct soap*, char **);
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_uddi2__tModelKey(struct soap*, char *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_uddi2__tModelKey(struct soap*, char *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__tModelKey(struct soap*, const char*, int, char*const*, const char*);
+SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_uddi2__tModelKey(struct soap*, char **, const char*, const char*);
+SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_uddi2__tModelKey(struct soap*, const char*, char **, const char*);
+
+#ifndef SOAP_TYPE_uddi2__serviceKey
+#define SOAP_TYPE_uddi2__serviceKey (94)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_uddi2__serviceKey(struct soap*, char **);
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_uddi2__serviceKey(struct soap*, char *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_uddi2__serviceKey(struct soap*, char *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__serviceKey(struct soap*, const char*, int, char*const*, const char*);
+SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_uddi2__serviceKey(struct soap*, char **, const char*, const char*);
+SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_uddi2__serviceKey(struct soap*, const char*, char **, const char*);
+
+#ifndef SOAP_TYPE_uddi2__businessKey
+#define SOAP_TYPE_uddi2__businessKey (93)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_uddi2__businessKey(struct soap*, char **);
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_uddi2__businessKey(struct soap*, char *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_uddi2__businessKey(struct soap*, char *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__businessKey(struct soap*, const char*, int, char*const*, const char*);
+SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_uddi2__businessKey(struct soap*, char **, const char*, const char*);
+SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_uddi2__businessKey(struct soap*, const char*, char **, const char*);
+
+#ifndef SOAP_TYPE_uddi2__bindingKey
+#define SOAP_TYPE_uddi2__bindingKey (92)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_uddi2__bindingKey(struct soap*, char **);
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_uddi2__bindingKey(struct soap*, char *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_uddi2__bindingKey(struct soap*, char *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__bindingKey(struct soap*, const char*, int, char*const*, const char*);
+SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_uddi2__bindingKey(struct soap*, char **, const char*, const char*);
+SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_uddi2__bindingKey(struct soap*, const char*, char **, const char*);
+
+#ifndef SOAP_TYPE_xml__lang
+#define SOAP_TYPE_xml__lang (8)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_xml__lang(struct soap*, char **);
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_xml__lang(struct soap*, char *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_xml__lang(struct soap*, char *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_xml__lang(struct soap*, const char*, int, char*const*, const char*);
+SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_xml__lang(struct soap*, char **, const char*, const char*);
+SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_xml__lang(struct soap*, const char*, char **, const char*);
+
+#ifndef SOAP_TYPE_xsd__NMTOKEN
+#define SOAP_TYPE_xsd__NMTOKEN (7)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_xsd__NMTOKEN(struct soap*, char **);
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_xsd__NMTOKEN(struct soap*, char *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_xsd__NMTOKEN(struct soap*, char *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_xsd__NMTOKEN(struct soap*, const char*, int, char*const*, const char*);
+SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_xsd__NMTOKEN(struct soap*, char **, const char*, const char*);
+SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_xsd__NMTOKEN(struct soap*, const char*, char **, const char*);
+
+#ifndef SOAP_TYPE__QName
+#define SOAP_TYPE__QName (5)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default__QName(struct soap*, char **);
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize__QName(struct soap*, char *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put__QName(struct soap*, char *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out__QName(struct soap*, const char*, int, char*const*, const char*);
+SOAP_FMAC3 char ** SOAP_FMAC4 soap_get__QName(struct soap*, char **, const char*, const char*);
+SOAP_FMAC3 char * * SOAP_FMAC4 soap_in__QName(struct soap*, const char*, char **, const char*);
+
+#ifndef SOAP_TYPE_string
+#define SOAP_TYPE_string (3)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_string(struct soap*, char **);
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_string(struct soap*, char *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_string(struct soap*, char *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_string(struct soap*, const char*, int, char*const*, const char*);
+SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_string(struct soap*, char **, const char*, const char*);
+SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_string(struct soap*, const char*, char **, const char*);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__businessEntityExt
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__businessEntityExt (302)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__businessEntityExt(struct soap*, const std::vector<uddi2__businessEntityExt * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__businessEntityExt(struct soap*, std::vector<uddi2__businessEntityExt * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__businessEntityExt(struct soap*, const std::vector<uddi2__businessEntityExt * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__businessEntityExt(struct soap*, const char*, int, const std::vector<uddi2__businessEntityExt * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__businessEntityExt * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__businessEntityExt(struct soap*, std::vector<uddi2__businessEntityExt * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__businessEntityExt * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__businessEntityExt(struct soap*, const char*, std::vector<uddi2__businessEntityExt * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__businessEntityExt * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__businessEntityExt(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__businessEntityExt(struct soap*, std::vector<uddi2__businessEntityExt * >*);
+SOAP_FMAC5 std::vector<uddi2__businessEntityExt * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__businessEntityExt(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__businessEntityExt(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__assertionStatusItem
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__assertionStatusItem (300)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__assertionStatusItem(struct soap*, const std::vector<uddi2__assertionStatusItem * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__assertionStatusItem(struct soap*, std::vector<uddi2__assertionStatusItem * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__assertionStatusItem(struct soap*, const std::vector<uddi2__assertionStatusItem * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__assertionStatusItem(struct soap*, const char*, int, const std::vector<uddi2__assertionStatusItem * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__assertionStatusItem * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__assertionStatusItem(struct soap*, std::vector<uddi2__assertionStatusItem * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__assertionStatusItem * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__assertionStatusItem(struct soap*, const char*, std::vector<uddi2__assertionStatusItem * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__assertionStatusItem * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__assertionStatusItem(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__assertionStatusItem(struct soap*, std::vector<uddi2__assertionStatusItem * >*);
+SOAP_FMAC5 std::vector<uddi2__assertionStatusItem * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__assertionStatusItem(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__assertionStatusItem(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__tModel
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__tModel (288)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__tModel(struct soap*, const std::vector<uddi2__tModel * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__tModel(struct soap*, std::vector<uddi2__tModel * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__tModel(struct soap*, const std::vector<uddi2__tModel * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__tModel(struct soap*, const char*, int, const std::vector<uddi2__tModel * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__tModel * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__tModel(struct soap*, std::vector<uddi2__tModel * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__tModel * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__tModel(struct soap*, const char*, std::vector<uddi2__tModel * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__tModel * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__tModel(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__tModel(struct soap*, std::vector<uddi2__tModel * >*);
+SOAP_FMAC5 std::vector<uddi2__tModel * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__tModel(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__tModel(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__businessEntity
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__businessEntity (272)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__businessEntity(struct soap*, const std::vector<uddi2__businessEntity * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__businessEntity(struct soap*, std::vector<uddi2__businessEntity * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__businessEntity(struct soap*, const std::vector<uddi2__businessEntity * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__businessEntity(struct soap*, const char*, int, const std::vector<uddi2__businessEntity * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__businessEntity * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__businessEntity(struct soap*, std::vector<uddi2__businessEntity * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__businessEntity * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__businessEntity(struct soap*, const char*, std::vector<uddi2__businessEntity * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__businessEntity * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__businessEntity(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__businessEntity(struct soap*, std::vector<uddi2__businessEntity * >*);
+SOAP_FMAC5 std::vector<uddi2__businessEntity * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__businessEntity(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__businessEntity(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfuddi2__serviceKey
+#define SOAP_TYPE_std__vectorTemplateOfuddi2__serviceKey (184)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfuddi2__serviceKey(struct soap*, const std::vector<char * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfuddi2__serviceKey(struct soap*, std::vector<char * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfuddi2__serviceKey(struct soap*, const std::vector<char * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfuddi2__serviceKey(struct soap*, const char*, int, const std::vector<char * >*, const char*);
+SOAP_FMAC3 std::vector<char * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfuddi2__serviceKey(struct soap*, std::vector<char * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<char * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfuddi2__serviceKey(struct soap*, const char*, std::vector<char * >*, const char*);
+
+SOAP_FMAC5 std::vector<char * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfuddi2__serviceKey(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfuddi2__serviceKey(struct soap*, std::vector<char * >*);
+SOAP_FMAC5 std::vector<char * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfuddi2__serviceKey(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfuddi2__serviceKey(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfuddi2__businessKey
+#define SOAP_TYPE_std__vectorTemplateOfuddi2__businessKey (176)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfuddi2__businessKey(struct soap*, const std::vector<char * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfuddi2__businessKey(struct soap*, std::vector<char * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfuddi2__businessKey(struct soap*, const std::vector<char * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfuddi2__businessKey(struct soap*, const char*, int, const std::vector<char * >*, const char*);
+SOAP_FMAC3 std::vector<char * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfuddi2__businessKey(struct soap*, std::vector<char * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<char * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfuddi2__businessKey(struct soap*, const char*, std::vector<char * >*, const char*);
+
+SOAP_FMAC5 std::vector<char * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfuddi2__businessKey(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfuddi2__businessKey(struct soap*, std::vector<char * >*);
+SOAP_FMAC5 std::vector<char * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfuddi2__businessKey(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfuddi2__businessKey(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfuddi2__bindingKey
+#define SOAP_TYPE_std__vectorTemplateOfuddi2__bindingKey (170)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfuddi2__bindingKey(struct soap*, const std::vector<char * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfuddi2__bindingKey(struct soap*, std::vector<char * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfuddi2__bindingKey(struct soap*, const std::vector<char * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfuddi2__bindingKey(struct soap*, const char*, int, const std::vector<char * >*, const char*);
+SOAP_FMAC3 std::vector<char * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfuddi2__bindingKey(struct soap*, std::vector<char * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<char * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfuddi2__bindingKey(struct soap*, const char*, std::vector<char * >*, const char*);
+
+SOAP_FMAC5 std::vector<char * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfuddi2__bindingKey(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfuddi2__bindingKey(struct soap*, std::vector<char * >*);
+SOAP_FMAC5 std::vector<char * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfuddi2__bindingKey(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfuddi2__bindingKey(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__publisherAssertion
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__publisherAssertion (158)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__publisherAssertion(struct soap*, const std::vector<uddi2__publisherAssertion * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__publisherAssertion(struct soap*, std::vector<uddi2__publisherAssertion * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__publisherAssertion(struct soap*, const std::vector<uddi2__publisherAssertion * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__publisherAssertion(struct soap*, const char*, int, const std::vector<uddi2__publisherAssertion * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__publisherAssertion * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__publisherAssertion(struct soap*, std::vector<uddi2__publisherAssertion * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__publisherAssertion * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__publisherAssertion(struct soap*, const char*, std::vector<uddi2__publisherAssertion * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__publisherAssertion * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__publisherAssertion(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__publisherAssertion(struct soap*, std::vector<uddi2__publisherAssertion * >*);
+SOAP_FMAC5 std::vector<uddi2__publisherAssertion * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__publisherAssertion(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__publisherAssertion(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__tModelInstanceInfo
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__tModelInstanceInfo (155)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__tModelInstanceInfo(struct soap*, const std::vector<uddi2__tModelInstanceInfo * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__tModelInstanceInfo(struct soap*, std::vector<uddi2__tModelInstanceInfo * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__tModelInstanceInfo(struct soap*, const std::vector<uddi2__tModelInstanceInfo * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__tModelInstanceInfo(struct soap*, const char*, int, const std::vector<uddi2__tModelInstanceInfo * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__tModelInstanceInfo * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__tModelInstanceInfo(struct soap*, std::vector<uddi2__tModelInstanceInfo * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__tModelInstanceInfo * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__tModelInstanceInfo(struct soap*, const char*, std::vector<uddi2__tModelInstanceInfo * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__tModelInstanceInfo * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__tModelInstanceInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__tModelInstanceInfo(struct soap*, std::vector<uddi2__tModelInstanceInfo * >*);
+SOAP_FMAC5 std::vector<uddi2__tModelInstanceInfo * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__tModelInstanceInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__tModelInstanceInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__tModelInfo
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__tModelInfo (153)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__tModelInfo(struct soap*, const std::vector<uddi2__tModelInfo * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__tModelInfo(struct soap*, std::vector<uddi2__tModelInfo * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__tModelInfo(struct soap*, const std::vector<uddi2__tModelInfo * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__tModelInfo(struct soap*, const char*, int, const std::vector<uddi2__tModelInfo * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__tModelInfo * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__tModelInfo(struct soap*, std::vector<uddi2__tModelInfo * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__tModelInfo * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__tModelInfo(struct soap*, const char*, std::vector<uddi2__tModelInfo * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__tModelInfo * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__tModelInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__tModelInfo(struct soap*, std::vector<uddi2__tModelInfo * >*);
+SOAP_FMAC5 std::vector<uddi2__tModelInfo * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__tModelInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__tModelInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfuddi2__tModelKey
+#define SOAP_TYPE_std__vectorTemplateOfuddi2__tModelKey (151)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfuddi2__tModelKey(struct soap*, const std::vector<char * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfuddi2__tModelKey(struct soap*, std::vector<char * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfuddi2__tModelKey(struct soap*, const std::vector<char * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfuddi2__tModelKey(struct soap*, const char*, int, const std::vector<char * >*, const char*);
+SOAP_FMAC3 std::vector<char * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfuddi2__tModelKey(struct soap*, std::vector<char * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<char * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfuddi2__tModelKey(struct soap*, const char*, std::vector<char * >*, const char*);
+
+SOAP_FMAC5 std::vector<char * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfuddi2__tModelKey(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfuddi2__tModelKey(struct soap*, std::vector<char * >*);
+SOAP_FMAC5 std::vector<char * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfuddi2__tModelKey(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfuddi2__tModelKey(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__serviceInfo
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__serviceInfo (150)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__serviceInfo(struct soap*, const std::vector<uddi2__serviceInfo * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__serviceInfo(struct soap*, std::vector<uddi2__serviceInfo * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__serviceInfo(struct soap*, const std::vector<uddi2__serviceInfo * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__serviceInfo(struct soap*, const char*, int, const std::vector<uddi2__serviceInfo * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__serviceInfo * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__serviceInfo(struct soap*, std::vector<uddi2__serviceInfo * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__serviceInfo * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__serviceInfo(struct soap*, const char*, std::vector<uddi2__serviceInfo * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__serviceInfo * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__serviceInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__serviceInfo(struct soap*, std::vector<uddi2__serviceInfo * >*);
+SOAP_FMAC5 std::vector<uddi2__serviceInfo * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__serviceInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__serviceInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__relatedBusinessInfo
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__relatedBusinessInfo (146)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__relatedBusinessInfo(struct soap*, const std::vector<uddi2__relatedBusinessInfo * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__relatedBusinessInfo(struct soap*, std::vector<uddi2__relatedBusinessInfo * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__relatedBusinessInfo(struct soap*, const std::vector<uddi2__relatedBusinessInfo * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__relatedBusinessInfo(struct soap*, const char*, int, const std::vector<uddi2__relatedBusinessInfo * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__relatedBusinessInfo * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__relatedBusinessInfo(struct soap*, std::vector<uddi2__relatedBusinessInfo * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__relatedBusinessInfo * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__relatedBusinessInfo(struct soap*, const char*, std::vector<uddi2__relatedBusinessInfo * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__relatedBusinessInfo * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__relatedBusinessInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__relatedBusinessInfo(struct soap*, std::vector<uddi2__relatedBusinessInfo * >*);
+SOAP_FMAC5 std::vector<uddi2__relatedBusinessInfo * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__relatedBusinessInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__relatedBusinessInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__sharedRelationships
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__sharedRelationships (144)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__sharedRelationships(struct soap*, const std::vector<uddi2__sharedRelationships * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__sharedRelationships(struct soap*, std::vector<uddi2__sharedRelationships * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__sharedRelationships(struct soap*, const std::vector<uddi2__sharedRelationships * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__sharedRelationships(struct soap*, const char*, int, const std::vector<uddi2__sharedRelationships * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__sharedRelationships * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__sharedRelationships(struct soap*, std::vector<uddi2__sharedRelationships * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__sharedRelationships * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__sharedRelationships(struct soap*, const char*, std::vector<uddi2__sharedRelationships * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__sharedRelationships * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__sharedRelationships(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__sharedRelationships(struct soap*, std::vector<uddi2__sharedRelationships * >*);
+SOAP_FMAC5 std::vector<uddi2__sharedRelationships * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__sharedRelationships(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__sharedRelationships(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfstring
+#define SOAP_TYPE_std__vectorTemplateOfstring (141)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfstring(struct soap*, const std::vector<char * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfstring(struct soap*, std::vector<char * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfstring(struct soap*, const std::vector<char * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfstring(struct soap*, const char*, int, const std::vector<char * >*, const char*);
+SOAP_FMAC3 std::vector<char * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfstring(struct soap*, std::vector<char * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<char * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfstring(struct soap*, const char*, std::vector<char * >*, const char*);
+
+SOAP_FMAC5 std::vector<char * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfstring(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfstring(struct soap*, std::vector<char * >*);
+SOAP_FMAC5 std::vector<char * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfstring(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfstring(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__result
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__result (139)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__result(struct soap*, const std::vector<uddi2__result * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__result(struct soap*, std::vector<uddi2__result * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__result(struct soap*, const std::vector<uddi2__result * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__result(struct soap*, const char*, int, const std::vector<uddi2__result * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__result * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__result(struct soap*, std::vector<uddi2__result * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__result * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__result(struct soap*, const char*, std::vector<uddi2__result * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__result * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__result(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__result(struct soap*, std::vector<uddi2__result * >*);
+SOAP_FMAC5 std::vector<uddi2__result * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__result(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__result(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__discoveryURL
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__discoveryURL (137)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__discoveryURL(struct soap*, const std::vector<uddi2__discoveryURL * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__discoveryURL(struct soap*, std::vector<uddi2__discoveryURL * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__discoveryURL(struct soap*, const std::vector<uddi2__discoveryURL * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__discoveryURL(struct soap*, const char*, int, const std::vector<uddi2__discoveryURL * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__discoveryURL * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__discoveryURL(struct soap*, std::vector<uddi2__discoveryURL * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__discoveryURL * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__discoveryURL(struct soap*, const char*, std::vector<uddi2__discoveryURL * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__discoveryURL * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__discoveryURL(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__discoveryURL(struct soap*, std::vector<uddi2__discoveryURL * >*);
+SOAP_FMAC5 std::vector<uddi2__discoveryURL * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__discoveryURL(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__discoveryURL(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__contact
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__contact (135)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__contact(struct soap*, const std::vector<uddi2__contact * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__contact(struct soap*, std::vector<uddi2__contact * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__contact(struct soap*, const std::vector<uddi2__contact * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__contact(struct soap*, const char*, int, const std::vector<uddi2__contact * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__contact * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__contact(struct soap*, std::vector<uddi2__contact * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__contact * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__contact(struct soap*, const char*, std::vector<uddi2__contact * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__contact * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__contact(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__contact(struct soap*, std::vector<uddi2__contact * >*);
+SOAP_FMAC5 std::vector<uddi2__contact * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__contact(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__contact(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__address
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__address (133)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__address(struct soap*, const std::vector<uddi2__address * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__address(struct soap*, std::vector<uddi2__address * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__address(struct soap*, const std::vector<uddi2__address * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__address(struct soap*, const char*, int, const std::vector<uddi2__address * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__address * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__address(struct soap*, std::vector<uddi2__address * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__address * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__address(struct soap*, const char*, std::vector<uddi2__address * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__address * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__address(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__address(struct soap*, std::vector<uddi2__address * >*);
+SOAP_FMAC5 std::vector<uddi2__address * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__address(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__address(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__email
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__email (131)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__email(struct soap*, const std::vector<uddi2__email * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__email(struct soap*, std::vector<uddi2__email * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__email(struct soap*, const std::vector<uddi2__email * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__email(struct soap*, const char*, int, const std::vector<uddi2__email * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__email * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__email(struct soap*, std::vector<uddi2__email * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__email * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__email(struct soap*, const char*, std::vector<uddi2__email * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__email * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__email(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__email(struct soap*, std::vector<uddi2__email * >*);
+SOAP_FMAC5 std::vector<uddi2__email * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__email(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__email(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__phone
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__phone (129)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__phone(struct soap*, const std::vector<uddi2__phone * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__phone(struct soap*, std::vector<uddi2__phone * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__phone(struct soap*, const std::vector<uddi2__phone * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__phone(struct soap*, const char*, int, const std::vector<uddi2__phone * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__phone * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__phone(struct soap*, std::vector<uddi2__phone * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__phone * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__phone(struct soap*, const char*, std::vector<uddi2__phone * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__phone * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__phone(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__phone(struct soap*, std::vector<uddi2__phone * >*);
+SOAP_FMAC5 std::vector<uddi2__phone * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__phone(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__phone(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__keyedReference
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__keyedReference (127)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__keyedReference(struct soap*, const std::vector<uddi2__keyedReference * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__keyedReference(struct soap*, std::vector<uddi2__keyedReference * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__keyedReference(struct soap*, const std::vector<uddi2__keyedReference * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__keyedReference(struct soap*, const char*, int, const std::vector<uddi2__keyedReference * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__keyedReference * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__keyedReference(struct soap*, std::vector<uddi2__keyedReference * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__keyedReference * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__keyedReference(struct soap*, const char*, std::vector<uddi2__keyedReference * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__keyedReference * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__keyedReference(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__keyedReference(struct soap*, std::vector<uddi2__keyedReference * >*);
+SOAP_FMAC5 std::vector<uddi2__keyedReference * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__keyedReference(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__keyedReference(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__businessService
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__businessService (126)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__businessService(struct soap*, const std::vector<uddi2__businessService * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__businessService(struct soap*, std::vector<uddi2__businessService * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__businessService(struct soap*, const std::vector<uddi2__businessService * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__businessService(struct soap*, const char*, int, const std::vector<uddi2__businessService * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__businessService * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__businessService(struct soap*, std::vector<uddi2__businessService * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__businessService * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__businessService(struct soap*, const char*, std::vector<uddi2__businessService * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__businessService * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__businessService(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__businessService(struct soap*, std::vector<uddi2__businessService * >*);
+SOAP_FMAC5 std::vector<uddi2__businessService * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__businessService(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__businessService(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__businessInfo
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__businessInfo (123)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__businessInfo(struct soap*, const std::vector<uddi2__businessInfo * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__businessInfo(struct soap*, std::vector<uddi2__businessInfo * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__businessInfo(struct soap*, const std::vector<uddi2__businessInfo * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__businessInfo(struct soap*, const char*, int, const std::vector<uddi2__businessInfo * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__businessInfo * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__businessInfo(struct soap*, std::vector<uddi2__businessInfo * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__businessInfo * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__businessInfo(struct soap*, const char*, std::vector<uddi2__businessInfo * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__businessInfo * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__businessInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__businessInfo(struct soap*, std::vector<uddi2__businessInfo * >*);
+SOAP_FMAC5 std::vector<uddi2__businessInfo * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__businessInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__businessInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__name
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__name (115)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__name(struct soap*, const std::vector<uddi2__name * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__name(struct soap*, std::vector<uddi2__name * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__name(struct soap*, const std::vector<uddi2__name * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__name(struct soap*, const char*, int, const std::vector<uddi2__name * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__name * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__name(struct soap*, std::vector<uddi2__name * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__name * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__name(struct soap*, const char*, std::vector<uddi2__name * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__name * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__name(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__name(struct soap*, std::vector<uddi2__name * >*);
+SOAP_FMAC5 std::vector<uddi2__name * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__name(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__name(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__bindingTemplate
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__bindingTemplate (112)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__bindingTemplate(struct soap*, const std::vector<uddi2__bindingTemplate * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__bindingTemplate(struct soap*, std::vector<uddi2__bindingTemplate * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__bindingTemplate(struct soap*, const std::vector<uddi2__bindingTemplate * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__bindingTemplate(struct soap*, const char*, int, const std::vector<uddi2__bindingTemplate * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__bindingTemplate * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__bindingTemplate(struct soap*, std::vector<uddi2__bindingTemplate * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__bindingTemplate * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__bindingTemplate(struct soap*, const char*, std::vector<uddi2__bindingTemplate * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__bindingTemplate * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__bindingTemplate(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__bindingTemplate(struct soap*, std::vector<uddi2__bindingTemplate * >*);
+SOAP_FMAC5 std::vector<uddi2__bindingTemplate * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__bindingTemplate(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__bindingTemplate(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__description
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__description (107)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__description(struct soap*, const std::vector<uddi2__description * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__description(struct soap*, std::vector<uddi2__description * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__description(struct soap*, const std::vector<uddi2__description * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__description(struct soap*, const char*, int, const std::vector<uddi2__description * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__description * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__description(struct soap*, std::vector<uddi2__description * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__description * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__description(struct soap*, const char*, std::vector<uddi2__description * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__description * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__description(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__description(struct soap*, std::vector<uddi2__description * >*);
+SOAP_FMAC5 std::vector<uddi2__description * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__description(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__description(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__addressLine
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__addressLine (101)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__addressLine(struct soap*, const std::vector<uddi2__addressLine * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__addressLine(struct soap*, std::vector<uddi2__addressLine * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__addressLine(struct soap*, const std::vector<uddi2__addressLine * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__addressLine(struct soap*, const char*, int, const std::vector<uddi2__addressLine * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__addressLine * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__addressLine(struct soap*, std::vector<uddi2__addressLine * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__addressLine * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__addressLine(struct soap*, const char*, std::vector<uddi2__addressLine * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__addressLine * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__addressLine(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__addressLine(struct soap*, std::vector<uddi2__addressLine * >*);
+SOAP_FMAC5 std::vector<uddi2__addressLine * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__addressLine(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__addressLine(struct soap*, int, int, void*, const void*, size_t);
+
+SOAP_END_NAMESPACE(pub)
+
+#endif
+
+/* End of pubH.h */
diff --git a/uddi2/publish_v2.cpp b/uddi2/publish_v2.cpp
new file mode 100644
index 0000000..113fae1
--- /dev/null
+++ b/uddi2/publish_v2.cpp
@@ -0,0 +1,734 @@
+/*
+
+publish_v2.cpp
+
+UDDI V2 Publish Interface
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2004-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+#include "pubH.h"
+#define SOAP_NMAC static
+#define uddiH_H
+#include "PublishSoap.nsmap"
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:add_publisherAssertions
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__add_USCOREpublisherAssertions::uddi2__add_USCOREpublisherAssertions(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__add_USCOREpublisherAssertions::uddi2__add_USCOREpublisherAssertions(struct soap *soap, std::vector<uddi2__publisherAssertion*> publisherAssertions)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->publisherAssertion = publisherAssertions;
+
+  this->generic = "2.0";
+}
+
+uddi2__dispositionReport *uddi2__add_USCOREpublisherAssertions::send(const char *endpoint, char *authInfo)
+{
+  // Set authorization token
+  this->authInfo = authInfo;
+
+  // Allocate result
+  uddi2__dispositionReport *result = soap_new_uddi2__dispositionReport(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___pub2__add_USCOREpublisherAssertions(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+} 
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_binding
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__delete_USCOREbinding::uddi2__delete_USCOREbinding(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__delete_USCOREbinding::uddi2__delete_USCOREbinding(struct soap *soap, const char *bindingKey)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->bindingKey.push_back(soap_strdup(soap, bindingKey));
+
+  this->generic = "2.0";
+}
+
+uddi2__delete_USCOREbinding::uddi2__delete_USCOREbinding(struct soap *soap, std::vector<char*> bindingKeys)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->bindingKey = bindingKeys;
+
+  this->generic = "2.0";
+}
+
+uddi2__dispositionReport *uddi2__delete_USCOREbinding::send(const char *endpoint, char *authInfo)
+{
+  // Set authorization token
+  this->authInfo = authInfo;
+
+  // Allocate result
+  uddi2__dispositionReport *result = soap_new_uddi2__dispositionReport(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___pub2__delete_USCOREbinding(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_business
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__delete_USCOREbusiness::uddi2__delete_USCOREbusiness(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__delete_USCOREbusiness::uddi2__delete_USCOREbusiness(struct soap *soap, const char *businessKey)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->businessKey.push_back(soap_strdup(soap, businessKey));
+
+  this->generic = "2.0";
+}
+
+uddi2__delete_USCOREbusiness::uddi2__delete_USCOREbusiness(struct soap *soap, std::vector<char*> businessKeys)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->businessKey = businessKeys;
+
+  this->generic = "2.0";
+}
+
+uddi2__dispositionReport *uddi2__delete_USCOREbusiness::send(const char *endpoint, char *authInfo)
+{
+  // Set authorization token
+  this->authInfo = authInfo;
+
+  // Allocate result
+  uddi2__dispositionReport *result = soap_new_uddi2__dispositionReport(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___pub2__delete_USCOREbusiness(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_service
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__delete_USCOREservice::uddi2__delete_USCOREservice(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__delete_USCOREservice::uddi2__delete_USCOREservice(struct soap *soap, const char *serviceKey)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->serviceKey.push_back(soap_strdup(soap, serviceKey));
+
+  this->generic = "2.0";
+}
+
+uddi2__delete_USCOREservice::uddi2__delete_USCOREservice(struct soap *soap, std::vector<char*> serviceKeys)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->serviceKey = serviceKeys;
+
+  this->generic = "2.0";
+}
+
+uddi2__dispositionReport *uddi2__delete_USCOREservice::send(const char *endpoint, char *authInfo)
+{
+  // Set authorization token
+  this->authInfo = authInfo;
+
+  // Allocate result
+  uddi2__dispositionReport *result = soap_new_uddi2__dispositionReport(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___pub2__delete_USCOREservice(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_tModel
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__delete_USCOREtModel::uddi2__delete_USCOREtModel(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__delete_USCOREtModel::uddi2__delete_USCOREtModel(struct soap *soap, const char *tModelKey)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->tModelKey.push_back(soap_strdup(soap, tModelKey));
+
+  this->generic = "2.0";
+}
+
+uddi2__delete_USCOREtModel::uddi2__delete_USCOREtModel(struct soap *soap, std::vector<char*> tModelKeys)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->tModelKey = tModelKeys;
+
+  this->generic = "2.0";
+}
+
+uddi2__dispositionReport *uddi2__delete_USCOREtModel::send(const char *endpoint, char *authInfo)
+{
+  // Set authorization token
+  this->authInfo = authInfo;
+
+  // Allocate result
+  uddi2__dispositionReport *result = soap_new_uddi2__dispositionReport(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___pub2__delete_USCOREtModel(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_publisherAssertions
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__delete_USCOREpublisherAssertions::uddi2__delete_USCOREpublisherAssertions(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__delete_USCOREpublisherAssertions::uddi2__delete_USCOREpublisherAssertions(struct soap *soap, std::vector<uddi2__publisherAssertion*> publisherAssertions)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->publisherAssertion = publisherAssertions;
+
+  this->generic = "2.0";
+}
+
+uddi2__dispositionReport *uddi2__delete_USCOREpublisherAssertions::send(const char *endpoint, char *authInfo)
+{
+  // Set authorization token
+  this->authInfo = authInfo;
+
+  // Allocate result
+  uddi2__dispositionReport *result = soap_new_uddi2__dispositionReport(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___pub2__delete_USCOREpublisherAssertions(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:discard_authToken
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__discard_USCOREauthToken::uddi2__discard_USCOREauthToken(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__discard_USCOREauthToken::uddi2__discard_USCOREauthToken(struct soap *soap, const char *authInfo)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->authInfo = soap_strdup(soap, authInfo);
+
+  this->generic = "2.0";
+}
+
+uddi2__dispositionReport *uddi2__discard_USCOREauthToken::send(const char *endpoint)
+{
+  // Allocate result
+  uddi2__dispositionReport *result = soap_new_uddi2__dispositionReport(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___pub2__discard_USCOREauthToken(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_assertionStatusReport
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__get_USCOREassertionStatusReport::uddi2__get_USCOREassertionStatusReport(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__get_USCOREassertionStatusReport::uddi2__get_USCOREassertionStatusReport(struct soap *soap, const char *completionStatus)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->completionStatus = soap_strdup(soap, completionStatus);
+
+  this->generic = "2.0";
+}
+
+uddi2__assertionStatusReport *uddi2__get_USCOREassertionStatusReport::send(const char *endpoint, char *authInfo)
+{
+  // Set authorization token
+  this->authInfo = authInfo;
+
+  // Allocate result
+  uddi2__assertionStatusReport *result = soap_new_uddi2__assertionStatusReport(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___pub2__get_USCOREassertionStatusReport(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_authToken
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__get_USCOREauthToken::uddi2__get_USCOREauthToken(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__get_USCOREauthToken::uddi2__get_USCOREauthToken(struct soap *soap, const char *userid, const char *passwd)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->userID = soap_strdup(soap, userid);
+  this->cred = soap_strdup(soap, passwd);
+
+  this->generic = "2.0";
+}
+
+uddi2__authToken *uddi2__get_USCOREauthToken::send(const char *endpoint)
+{
+  // Allocate result
+  uddi2__authToken *result = soap_new_uddi2__authToken(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___pub2__get_USCOREauthToken(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_publisherAssertions
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__get_USCOREpublisherAssertions::uddi2__get_USCOREpublisherAssertions(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__publisherAssertions *uddi2__get_USCOREpublisherAssertions::send(const char *endpoint, char *authInfo)
+{
+  // Set authorization token
+  this->authInfo = authInfo;
+
+  // Allocate result
+  uddi2__publisherAssertions *result = soap_new_uddi2__publisherAssertions(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___pub2__get_USCOREpublisherAssertions(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_registeredInfo
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__get_USCOREregisteredInfo::uddi2__get_USCOREregisteredInfo(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__registeredInfo *uddi2__get_USCOREregisteredInfo::send(const char *endpoint, char *authInfo)
+{
+  // Set authorization token
+  this->authInfo = authInfo;
+
+  // Allocate result
+  uddi2__registeredInfo *result = soap_new_uddi2__registeredInfo(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___pub2__get_USCOREregisteredInfo(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:save_binding
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__save_USCOREbinding::uddi2__save_USCOREbinding(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__save_USCOREbinding::uddi2__save_USCOREbinding(struct soap *soap, uddi2__bindingTemplate &bindingTemplate)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->bindingTemplate.push_back(&bindingTemplate);
+
+  this->generic = "2.0";
+}
+
+uddi2__save_USCOREbinding::uddi2__save_USCOREbinding(struct soap *soap, std::vector<uddi2__bindingTemplate*> bindingTemplates)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->bindingTemplate = bindingTemplates;
+
+  this->generic = "2.0";
+}
+
+uddi2__bindingDetail *uddi2__save_USCOREbinding::send(const char *endpoint, char *authInfo)
+{
+  // Set authorization token
+  this->authInfo = authInfo;
+
+  // Allocate result
+  uddi2__bindingDetail *result = soap_new_uddi2__bindingDetail(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___pub2__save_USCOREbinding(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:save_business
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__save_USCOREbusiness::uddi2__save_USCOREbusiness(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__save_USCOREbusiness::uddi2__save_USCOREbusiness(struct soap *soap, uddi2__businessEntity &businessEntity)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->businessEntity.push_back(&businessEntity);
+
+  this->generic = "2.0";
+}
+
+uddi2__save_USCOREbusiness::uddi2__save_USCOREbusiness(struct soap *soap, std::vector<uddi2__businessEntity*> businessEntities)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->businessEntity = businessEntities;
+
+  this->generic = "2.0";
+}
+
+uddi2__businessDetail *uddi2__save_USCOREbusiness::send(const char *endpoint, char *authInfo)
+{
+  // Set authorization token
+  this->authInfo = authInfo;
+
+  // Allocate result
+  uddi2__businessDetail *result = soap_new_uddi2__businessDetail(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___pub2__save_USCOREbusiness(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:save_service
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__save_USCOREservice::uddi2__save_USCOREservice(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__save_USCOREservice::uddi2__save_USCOREservice(struct soap *soap, uddi2__businessService &businessService)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->businessService.push_back(&businessService);
+
+  this->generic = "2.0";
+}
+
+uddi2__save_USCOREservice::uddi2__save_USCOREservice(struct soap *soap, std::vector<uddi2__businessService*> businessServices)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->businessService = businessServices;
+
+  this->generic = "2.0";
+}
+
+uddi2__serviceDetail *uddi2__save_USCOREservice::send(const char *endpoint, char *authInfo)
+{
+  // Set authorization token
+  this->authInfo = authInfo;
+
+  // Allocate result
+  uddi2__serviceDetail *result = soap_new_uddi2__serviceDetail(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___pub2__save_USCOREservice(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:save_tModel
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__save_USCOREtModel::uddi2__save_USCOREtModel(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__save_USCOREtModel::uddi2__save_USCOREtModel(struct soap *soap, uddi2__tModel &tModel)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->tModel.push_back(&tModel);
+
+  this->generic = "2.0";
+}
+
+uddi2__save_USCOREtModel::uddi2__save_USCOREtModel(struct soap *soap, std::vector<uddi2__tModel*> tModels)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->tModel = tModels;
+
+  this->generic = "2.0";
+}
+
+uddi2__tModelDetail *uddi2__save_USCOREtModel::send(const char *endpoint, char *authInfo)
+{
+  // Set authorization token
+  this->authInfo = authInfo;
+
+  // Allocate result
+  uddi2__tModelDetail *result = soap_new_uddi2__tModelDetail(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___pub2__save_USCOREtModel(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:set_publisherAssertions
+//
+////////////////////////////////////////////////////////////////////////////////
+
+uddi2__set_USCOREpublisherAssertions::uddi2__set_USCOREpublisherAssertions(struct soap *soap)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->generic = "2.0";
+}
+
+uddi2__set_USCOREpublisherAssertions::uddi2__set_USCOREpublisherAssertions(struct soap *soap, std::vector<uddi2__publisherAssertion*> publisherAssertions)
+{
+  // Initialize this object and associate it with the gSOAP context
+  soap_default(soap);
+
+  this->publisherAssertion = publisherAssertions;
+
+  this->generic = "2.0";
+}
+
+uddi2__publisherAssertions *uddi2__set_USCOREpublisherAssertions::send(const char *endpoint, char *authInfo)
+{
+  // Set authorization token
+  this->authInfo = authInfo;
+
+  // Allocate result
+  uddi2__publisherAssertions *result = soap_new_uddi2__publisherAssertions(soap, -1);
+
+  // Invoke the wrapper
+  soap_set_namespaces(soap, namespaces);
+  if (soap_call___pub2__set_USCOREpublisherAssertions(soap, endpoint, NULL, this, result))
+    return NULL;
+
+  return result;
+}
+
diff --git a/uddi2/publish_v2.h b/uddi2/publish_v2.h
new file mode 100644
index 0000000..3137329
--- /dev/null
+++ b/uddi2/publish_v2.h
@@ -0,0 +1,4018 @@
+/** @mainpage gSOAP UDDI v2
+
+Universal Description, Discovery and Integration, or UDDI, is the name of a
+group of web-based registries that expose information about a business or other
+entity and its technical interfaces.
+
+See the UDDI v2 specification @url http://uddi.org/pubs/ProgrammersAPI_v2.htm
+for more details.
+
+@section UDDI2_CLASSES Classes
+
+See Related Pages for examples.
+
+UDDI Inquire classes
+
+- @ref uddi2__find_USCOREbinding
+- @ref uddi2__find_USCOREbusiness
+- @ref uddi2__find_USCORErelatedBusinesses
+- @ref uddi2__find_USCOREservice
+- @ref uddi2__find_USCOREtModel
+- @ref uddi2__get_USCOREbindingDetail
+- @ref uddi2__get_USCOREbusinessDetail
+- @ref uddi2__get_USCOREbusinessDetailExt
+- @ref uddi2__get_USCOREserviceDetail
+- @ref uddi2__get_USCOREtModelDetail
+
+UDDI Publish classes
+
+- @ref uddi2__add_USCOREpublisherAssertions
+- @ref uddi2__delete_USCOREbinding
+- @ref uddi2__delete_USCOREbusiness
+- @ref uddi2__delete_USCOREservice
+- @ref uddi2__delete_USCOREtModel
+- @ref uddi2__delete_USCOREpublisherAssertions
+- @ref uddi2__discard_USCOREauthToken
+- @ref uddi2__get_USCOREassertionStatusReport
+- @ref uddi2__get_USCOREauthToken
+- @ref uddi2__get_USCOREpublisherAssertions
+- @ref uddi2__get_USCOREregisteredInfo
+- @ref uddi2__save_USCOREbinding
+- @ref uddi2__save_USCOREbusiness
+- @ref uddi2__save_USCOREservice
+- @ref uddi2__save_USCOREtModel
+- @ref uddi2__set_USCOREpublisherAssertions
+
+@section UDDI2_BINDINGS Binding Reference
+
+- @ref InquireSoap
+- @ref PublishSoap
+
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_binding
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__find_USCOREbinding
+@brief
+
+Represents a request to locate bindings that meet the specified requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137712
+*/
+
+/**
+@fn uddi2__find_USCOREbinding::uddi2__find_USCOREbinding(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREbinding class.
+*/
+
+/**
+@fn uddi2__find_USCOREbinding::uddi2__find_USCOREbinding(struct soap *soap, const char *tModelKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKey string
+
+Creates an instance of the find_USCOREbinding class using the specified tModel
+key.
+*/
+
+/**
+@fn uddi2__find_USCOREbinding::uddi2__find_USCOREbinding(struct soap *soap, std::vector<char*> tModelKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKeys collection of tModel key strings
+
+Creates an instance of the find_USCOREbinding class using the specified tModel
+keys.
+*/
+
+/**
+@fn uddi2__bindingDetail* uddi2__find_USCOREbinding::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__bindingDetail object or NULL on error
+
+Send a request to a UDDI server to find binding details.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_business
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__find_USCOREbusiness
+@brief
+
+Represents a request to locate businesses that meet specific requirements. When
+the send method is called, the instance returns a uddi2__businessList object
+that contains a list of business that matched the search criteria.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137713
+
+See also @ref example2.
+*/
+
+/**
+@fn uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREbusiness class.
+*/
+
+/**
+@fn uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness(struct soap *soap, const char *name)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREbusiness class using the specified name
+of the requested business.
+*/
+
+/**
+@fn uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness(struct soap *soap, std::vector<uddi2__keyedReference*> keyedReferences)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREbusiness class using the specified
+category references.
+*/
+
+/**
+@fn uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness(struct soap *soap, std::vector<char*> tModelKeys)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREbusiness class using the specified tModel
+keys.
+*/
+
+/**
+@fn uddi2__businessList *uddi2__find_USCOREbusiness::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__businessList object or NULL on error
+
+Send a request to a UDDI server to find a list of businesses.
+
+See also @ref example2.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_relatedBusinesses
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__find_USCORErelatedBusinesses
+@brief
+
+Represents a request to locate businesses that are related to a specific
+business. When the send method is called, the instance returns a
+uddi2__relatedBusinessList object that contains a list of business that matched
+the relationship set.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137714
+*/
+
+/**
+@fn uddi2__find_USCORErelatedBusinesses::uddi2__find_USCORErelatedBusinesses(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCORErelatedBusiness class.
+*/
+
+/**
+@fn uddi2__find_USCORErelatedBusinesses::uddi2__find_USCORErelatedBusinesses(struct soap *soap, const char *businessKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKey string
+
+Creates an instance of the find_USCORErelatedBusiness class using the specified
+business key.
+*/
+
+/**
+@fn uddi2__relatedBusinessesList *uddi2__find_USCORErelatedBusinesses::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__relatedBusinessList object or NULL on error
+
+Send a request to a UDDI server to find a list of related businesses.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_service
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__find_USCOREservice
+@brief
+
+Represents a request to locate services that meet the specified requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137715
+
+See also @ref example1.
+*/
+
+/**
+@fn uddi2__find_USCOREservice::uddi2__find_USCOREservice(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREservice class.
+*/
+
+/**
+@fn uddi2__find_USCOREservice::uddi2__find_USCOREservice(struct soap *soap, const char *name)
+@brief
+@param[in] soap gSOAP context
+@param[in] name of the service
+
+Creates an instance of the find_USCOREservice class using the specified name.
+*/
+
+/**
+@fn uddi2__find_USCOREservice::uddi2__find_USCOREservice(struct soap *soap, std::vector<uddi2__keyedReference*> keyedReferences)
+@brief
+@param[in] soap gSOAP context
+@param[in] keyedReferences collection of category keys
+
+Creates an instance of the find_USCOREservice class using the specified
+category keys.
+*/
+
+/**
+@fn uddi2__find_USCOREservice::uddi2__find_USCOREservice(struct soap *soap, std::vector<char*> tModelKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKeys collection of tModel key strings
+
+Creates an instance of the find_USCOREservice class using the specified tModel
+keys.
+*/
+
+/**
+@fn uddi2__serviceList* uddi2__find_USCOREservice::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__serviceList object or NULL on error
+
+Send a request to a UDDI server to find a list of services.
+
+See also @ref example1.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_tModel
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__find_USCOREtModel
+@brief
+
+Represents a request to locate a list of tModel entries that match a set of
+specific criteria. The result of a search is a uddi2__tModelList object that
+contains information about registered tModel data that matches the criteria.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137716
+*/
+
+/**
+@fn uddi2__find_USCOREtModel::uddi2__find_USCOREtModel(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREtModel class.
+*/
+
+/**
+@fn uddi2__find_USCOREtModel::uddi2__find_USCOREtModel(struct soap *soap, const char *name)
+@brief
+@param[in] soap gSOAP context
+@param[in] name of the tModel
+
+Creates an instance of the find_USCOREtModel class using the specified tModel
+name.
+*/
+
+/**
+@fn uddi2__find_USCOREtModel::uddi2__find_USCOREtModel(struct soap *soap, std::vector<uddi2__keyedReference*> keyedReferences)
+@brief
+@param[in] soap gSOAP context
+@param[in] keyedReferences collection of category keys
+
+Creates an instance of the find_USCOREtModel class using the specified category
+keys.
+*/
+
+/**
+@fn uddi2__tModelList* uddi2__find_USCOREtModel::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__tModelList object or NULL on error
+
+Send a request to a UDDI server to find a tModelList.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_bindingDetail
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREbindingDetail
+@brief
+
+Represents a request to get binding details from a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137717
+*/
+
+/**
+@fn uddi2__get_USCOREbindingDetail::uddi2__get_USCOREbindingDetail(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREbindingDetail class.
+*/
+
+/**
+@fn uddi2__get_USCOREbindingDetail::uddi2__get_USCOREbindingDetail(struct soap *soap, const char *bindingKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] bindingKey string
+
+Creates an instance of the get_USCOREbindingDetail class using the specified
+binding key.
+*/
+
+/**
+@fn uddi2__get_USCOREbindingDetail::uddi2__get_USCOREbindingDetail(struct soap *soap, std::vector<char*> bindingKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] bindingKeys collection of key strings
+
+Creates an instance of the get_USCOREbindingDetail class using the specified
+collection of binding keys.
+*/
+
+/**
+@fn uddi2__bindingDetail* uddi2__get_USCOREbindingDetail::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__bindingDetail object or NULL on error
+
+Send a request to a UDDI server to get the binding details.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_businessDetail
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREbusinessDetail
+@brief
+
+Represents a request to get business details from a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137718 
+*/
+
+/**
+@fn uddi2__get_USCOREbusinessDetail::uddi2__get_USCOREbusinessDetail(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREbusinessDetail class.
+*/
+
+/**
+@fn uddi2__get_USCOREbusinessDetail::uddi2__get_USCOREbusinessDetail(struct soap *soap, const char *businessKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKey string
+
+Creates an instance of the get_USCOREbusinessDetail class using the specified
+business key.
+*/
+
+/**
+@fn uddi2__get_USCOREbusinessDetail::uddi2__get_USCOREbusinessDetail(struct soap *soap, std::vector<char*> businessKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKeys collection of key strings
+
+Creates an instance of the get_USCOREbusinessDetail class using the specified
+collection of business keys.
+*/
+
+/**
+@fn uddi2__businessDetail* uddi2__get_USCOREbusinessDetail::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__businessDetail object or NULL on error
+
+Send a request to a UDDI server to get the business details.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_businessDetailExt
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREbusinessDetailExt
+@brief
+
+Represents a request to get business details from a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137719
+*/
+
+/**
+@fn uddi2__get_USCOREbusinessDetailExt::uddi2__get_USCOREbusinessDetailExt(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREbusinessDetailExt class.
+*/
+
+/**
+@fn uddi2__get_USCOREbusinessDetailExt::uddi2__get_USCOREbusinessDetailExt(struct soap *soap, const char *businessKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKey string
+
+Creates an instance of the get_USCOREbusinessDetailExt class using the specified
+business key.
+*/
+
+/**
+@fn uddi2__get_USCOREbusinessDetailExt::uddi2__get_USCOREbusinessDetailExt(struct soap *soap, std::vector<char*> businessKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKeys collection of key strings
+
+Creates an instance of the get_USCOREbusinessDetailExt class using the specified
+collection of business keys.
+*/
+
+/**
+@fn uddi2__businessDetailExt* uddi2__get_USCOREbusinessDetailExt::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__businessDetailExt object or NULL on error
+
+Send a request to a UDDI server to get the business details.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_serviceDetail
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREserviceDetail
+@brief
+
+Represents a request to get service details from a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137720
+*/
+
+/**
+@fn uddi2__get_USCOREserviceDetail::uddi2__get_USCOREserviceDetail(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREserviceDetail class.
+*/
+
+/**
+@fn uddi2__get_USCOREserviceDetail::uddi2__get_USCOREserviceDetail(struct soap *soap, const char *serviceKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] serviceKey string
+
+Creates an instance of the get_USCOREserviceDetail class using the specified
+service key.
+*/
+
+/**
+@fn uddi2__get_USCOREserviceDetail::uddi2__get_USCOREserviceDetail(struct soap *soap, std::vector<char*> serviceKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] serviceKeys collection of key strings
+
+Creates an instance of the get_USCOREserviceDetail class using the specified
+collection of service keys.
+*/
+
+/**
+@fn uddi2__serviceDetail* uddi2__get_USCOREserviceDetail::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__serviceDetail object or NULL on error
+
+Send a request to a UDDI server to get the service details.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_tModelDetail
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREtModelDetail
+@brief
+
+Represents a request to get tModel details from a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137721
+*/
+
+/**
+@fn uddi2__get_USCOREtModelDetail::uddi2__get_USCOREtModelDetail(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREtModelDetail class.
+*/
+
+/**
+@fn uddi2__get_USCOREtModelDetail::uddi2__get_USCOREtModelDetail(struct soap *soap, const char *tModelKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKey string
+
+Creates an instance of the get_USCOREtModelDetail class using the specified
+tModel key.
+*/
+
+/**
+@fn uddi2__get_USCOREtModelDetail::uddi2__get_USCOREtModelDetail(struct soap *soap, std::vector<char*> tModelKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKeys collection of key strings
+
+Creates an instance of the get_USCOREtModelDetail class using the specified
+collection of tModel keys.
+*/
+
+/**
+@fn uddi2__tModelDetail* uddi2__get_USCOREtModelDetail::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__tModelDetail object or NULL on error
+
+Send a request to a UDDI server to get the tModel details.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:add_publisherAssertions
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__add_USCOREpublisherAssertions
+@brief
+
+Represents a request to add one or more publisher assertions to the assertion
+collection for an individual publisher.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137731
+*/
+
+/**
+@fn uddi2__add_USCOREpublisherAssertions::uddi2__add_USCOREpublisherAssertions(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the add_USCOREpublisherAssertions class.
+*/
+
+/**
+@fn uddi2__add_USCOREpublisherAssertions::uddi2__add_USCOREpublisherAssertions(struct soap *soap, std::vector<uddi2__publisherAssertion*> publisherAssertions)
+@brief
+@param[in] soap gSOAP context
+@param[in] publisherAssertions collection of publisher assertions
+
+Creates an instance of the add_USCOREpublisherAssertions class using the
+specified publisher assertions.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__add_USCOREpublisherAssertions::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI server to add one or more publisher assertions to the
+assertion collection for an individual publisher.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_binding
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__delete_USCOREbinding
+@brief
+
+Represents a request to delete a binding that meets the specified requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137732
+*/
+
+/**
+@fn uddi2__delete_USCOREbinding::uddi2__delete_USCOREbinding(struct soap *soap)
+@brief
+
+Creates an instance of the delete_USCOREbinding class.
+*/
+
+/**
+@fn uddi2__delete_USCOREbinding::uddi2__delete_USCOREbinding(struct soap *soap, const char *bindingKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] bindingKey a binding key string
+
+Creates an instance of the delete_USCOREbinding class.
+*/
+
+/**
+@fn uddi2__delete_USCOREbinding::uddi2__delete_USCOREbinding(struct soap *soap, std::vector<char*> bindingKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] bindingKeys collection of binding keys
+
+Creates an instance of the delete_USCOREbinding class using the specified
+binding keys.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__delete_USCOREbinding::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI service to delete a binding that meets the specified
+requirements.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_business
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__delete_USCOREbusiness
+@brief
+
+Represents a request to delete a business that meets the specified requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137733
+*/
+
+/**
+@fn uddi2__delete_USCOREbusiness::uddi2__delete_USCOREbusiness(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the delete_USCOREbusiness class.
+*/
+
+/**
+@fn uddi2__delete_USCOREbusiness::uddi2__delete_USCOREbusiness(struct soap *soap, const char *businessKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKey a business key string
+
+Creates an instance of the delete_USCOREbusiness class using the specified
+business key.
+*/
+
+/**
+@fn uddi2__delete_USCOREbusiness::uddi2__delete_USCOREbusiness(struct soap *soap, std::vector<char*> businessKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKeys collection of business keys
+
+Creates an instance of the delete_USCOREbusiness class using the specified
+business keys.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__delete_USCOREbusiness::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI service to delete a business that meets the specified
+requirements.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_service
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__delete_USCOREservice
+@brief
+
+Represents a request to delete a service that meets the specified requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137735
+*/
+
+/**
+@fn uddi2__delete_USCOREservice::uddi2__delete_USCOREservice(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the delete_USCOREservice class.
+*/
+
+/**
+@fn uddi2__delete_USCOREservice::uddi2__delete_USCOREservice(struct soap *soap, const char *serviceKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] serviceKey a service key string
+
+Creates an instance of the delete_USCOREservice class using the specified
+service key.
+*/
+
+/**
+@fn uddi2__delete_USCOREservice::uddi2__delete_USCOREservice(struct soap *soap, std::vector<char*> serviceKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] serviceKeys collection of service keys
+
+Creates an instance of the delete_USCOREservice class using the specified
+service keys.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__delete_USCOREservice::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI service to delete a service that meets the specified
+requirements.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_tModel
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__delete_USCOREtModel
+@brief
+
+Represents a request to delete a tModel that meets the specified requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137736
+*/
+
+/**
+@fn uddi2__delete_USCOREtModel::uddi2__delete_USCOREtModel(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the delete_USCOREtModel class.
+*/
+
+/**
+@fn uddi2__delete_USCOREtModel::uddi2__delete_USCOREtModel(struct soap *soap, const char *tModelKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKey a tModel key string
+
+Creates an instance of the delete_USCOREtModel class using the specified
+tModel key.
+*/
+
+/**
+@fn uddi2__delete_USCOREtModel::uddi2__delete_USCOREtModel(struct soap *soap, std::vector<char*> tModelKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKeys collection of tModel keys
+
+Creates an instance of the delete_USCOREtModel class using the specified
+tModel keys.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__delete_USCOREtModel::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI service to delete a tModel that meets the specified
+requirements.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_publisherAssertions
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__delete_USCOREpublisherAssertions
+@brief
+
+Represents a request to delete publisher assertions meeting the specified
+requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137734
+*/
+
+/**
+@fn uddi2__delete_USCOREpublisherAssertions::uddi2__delete_USCOREpublisherAssertions(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the delete_USCOREpublisherAssertions class.
+*/
+
+/**
+@fn uddi2__delete_USCOREpublisherAssertions::uddi2__delete_USCOREpublisherAssertions(struct soap *soap, std::vector<uddi2__publisherAssertion*> publisherAssertions)
+@brief
+@param[in] soap gSOAP context
+@param[in] publisherAssertions a collection of publisher assertions
+
+Creates an instance of the delete_USCOREpublisherAssertions class using the
+specified collection of publisher assertions.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__delete_USCOREpublisherAssertions::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI service to delete publisher assertions meeting the
+specified requirements.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:discard_authToken
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__discard_USCOREauthToken
+@brief
+
+Represents a request to discard an authorization token obtained with the
+get_USCOREauthToken class.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137737
+*/
+
+/**
+@fn uddi2__discard_USCOREauthToken::uddi2__discard_USCOREauthToken(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the delete_USCOREauthToken class.
+*/
+
+/**
+@fn uddi2__discard_USCOREauthToken::uddi2__discard_USCOREauthToken(struct soap *soap, const char *authInfo)
+@brief
+@param[in] soap gSOAP context
+@param[in] authInfo authorization token provided by the UDDI server
+
+Creates an instance of the delete_USCOREauthToken class using the specified
+authentication token string.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__discard_USCOREauthToken::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI service to discard an authentication token.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_assertionStatusReport
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREassertionStatusReport
+@brief
+
+Provides the ability to determine the status of current and outstanding
+publisher assertions. The results can be restricted by setting the
+completionStatus property.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137738
+*/
+
+/**
+@fn uddi2__get_USCOREassertionStatusReport::uddi2__get_USCOREassertionStatusReport(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREassertionStatusReport class.
+*/
+
+/**
+@fn uddi2__get_USCOREassertionStatusReport::uddi2__get_USCOREassertionStatusReport(struct soap *soap, const char *completionStatus)
+@brief
+@param[in] soap gSOAP context
+@param[in] completionStatus completion status string
+
+Creates an instance of the get_USCOREassertionStatusReport class using the
+specified completion status.
+*/
+
+/**
+@fn uddi2__assertionStatusReport *uddi2__get_USCOREassertionStatusReport::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__assertionStatusReport object or NULL on error
+
+Send a request to a UDDI service to get the status of current and outstanding
+publisher assertions.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_authToken
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREauthToken
+@brief
+
+Represents a request to obtain an authorization token, which is represented by
+the uddi2__authToken class.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137739
+*/
+
+/**
+@fn uddi2__get_USCOREauthToken::uddi2__get_USCOREauthToken(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREauthToken class.
+*/
+
+/**
+@fn uddi2__get_USCOREauthToken::uddi2__get_USCOREauthToken(struct soap *soap, const char *userid, const char *passwd)
+@brief
+@param[in] soap gSOAP context
+@param[in] userid the user ID string
+@param[in] passwd the password string
+
+Creates an instance of the get_USCOREauthToken class using the specified user
+ID and password.
+*/
+
+/**
+@fn uddi2__authToken *uddi2__get_USCOREauthToken::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__authToken object or NULL on error
+
+Send a request to a UDDI service to get a authorization token given a user
+ID and password.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_publisherAssertions
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREpublisherAssertions
+@brief
+
+Represents a request to obtain the full set of publisher assertions that are
+associated with an individual publisher.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137740
+*/
+
+/**
+@fn uddi2__get_USCOREpublisherAssertions::uddi2__get_USCOREpublisherAssertions(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREpublisherAssetions class.
+*/
+
+/**
+@fn uddi2__publisherAssertions *uddi2__get_USCOREpublisherAssertions::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__publisherAssertions object or NULL on error
+
+Send a request to a UDDI service to get publisher assertions.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_registeredInfo
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREregisteredInfo
+@brief
+
+Represents a request to get all registered business entities and tModels
+controlled by an individual.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137741
+*/
+
+/**
+@fn uddi2__get_USCOREregisteredInfo::uddi2__get_USCOREregisteredInfo(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREregisteredInfo class.
+*/
+
+/**
+@fn uddi2__registeredInfo *uddi2__get_USCOREregisteredInfo::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__registeredInfo object or NULL on error
+
+Send a request to a UDDI service to get all registered business entities and
+tModels controlled by an individual.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:save_binding
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__save_USCOREbinding
+@brief
+
+Represents a request to post binding information on a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137742
+*/
+
+/**
+@fn uddi2__save_USCOREbinding::uddi2__save_USCOREbinding(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the save_USCOREbinding class.
+*/
+
+/**
+@fn uddi2__save_USCOREbinding::uddi2__save_USCOREbinding(struct soap *soap, uddi2__bindingTemplate &bindingTemplate)
+@brief
+@param[in] soap gSOAP context
+@param[in] bindingTemplate binding template
+
+Creates an instance of the save_USCOREbinding class using the specified binding
+template.
+*/
+
+/**
+@fn uddi2__save_USCOREbinding::uddi2__save_USCOREbinding(struct soap *soap, std::vector<uddi2__bindingTemplate*> bindingTemplates)
+@brief
+@param[in] soap gSOAP context
+@param[in] bindingTemplates collection of binding templates
+
+Creates an instance of the save_USCOREbinding class using the specified binding
+templates.
+*/
+
+/**
+@fn uddi2__bindingDetail *uddi2__save_USCOREbinding::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__bindingDetail object or NULL on error
+
+Send a request to a UDDI server to post binding information on the server.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:save_business
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__save_USCOREbusiness
+@brief
+
+Represents a request to post business information on a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137743
+*/
+
+/**
+@fn uddi2__save_USCOREbusiness::uddi2__save_USCOREbusiness(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the save_USCOREbusiness class.
+*/
+
+/**
+@fn uddi2__save_USCOREbusiness::uddi2__save_USCOREbusiness(struct soap *soap, uddi2__businessEntity &businessEntity)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessEntity business entity
+
+Creates an instance of the save_USCOREbusiness class using the specified
+business entity.
+*/
+
+/**
+@fn uddi2__save_USCOREbusiness::uddi2__save_USCOREbusiness(struct soap *soap, std::vector<uddi2__businessEntity*> businessEntities)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessEntities collection of business entities
+
+Creates an instance of the save_USCOREbusiness class using the specified
+business entities.
+*/
+
+/**
+@fn uddi2__businessDetail *uddi2__save_USCOREbusiness::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__businessDetail object or NULL on error
+
+Send a request to a UDDI server to post business information on the server.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:save_service
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__save_USCOREservice
+@brief
+
+Represents a request to post service information on a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137744
+*/
+
+/**
+@fn uddi2__save_USCOREservice::uddi2__save_USCOREservice(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the save_USCOREservice class.
+*/
+
+/**
+@fn uddi2__save_USCOREservice::uddi2__save_USCOREservice(struct soap *soap, uddi2__businessService &businessService)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessService business service
+
+Creates an instance of the save_USCOREservice class using the specified
+service.
+*/
+
+/**
+@fn uddi2__save_USCOREservice::uddi2__save_USCOREservice(struct soap *soap, std::vector<uddi2__businessService*> businessServices)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessServices collection of business services
+
+Creates an instance of the save_USCOREservice class using the specified
+services.
+*/
+
+/**
+@fn uddi2__serviceDetail *uddi2__save_USCOREservice::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__serviceDetail object or NULL on error
+
+Send a request to a UDDI server to post service information on the server.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:save_tModel
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__save_USCOREtModel
+@brief
+
+Represents a request to post tModel information on a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137745
+*/
+
+/**
+@fn uddi2__save_USCOREtModel::uddi2__save_USCOREtModel(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the save_USCOREtModel class.
+*/
+
+/**
+@fn uddi2__save_USCOREtModel::uddi2__save_USCOREtModel(struct soap *soap, uddi2__tModel &tModel)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModel a tModel
+
+Creates an instance of the save_USCOREtModel class using the specified
+tModel.
+*/
+
+/**
+@fn uddi2__save_USCOREtModel::uddi2__save_USCOREtModel(struct soap *soap, std::vector<uddi2__tModel*> tModels)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModels collection of tModels
+
+Creates an instance of the save_USCOREtModel class using the specified
+tModels.
+*/
+
+/**
+@fn uddi2__tModelDetail *uddi2__save_USCOREtModel::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__tModelDetail object or NULL on error
+
+Send a request to a UDDI server to post tModel information on the server.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:set_publisherAssertions
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__set_USCOREpublisherAssertions
+@brief
+
+Represents a request to modify the existing publisher assertions for an
+individual publisher.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137746
+*/
+
+/**
+@fn uddi2__set_USCOREpublisherAssertions::uddi2__set_USCOREpublisherAssertions(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the set_USCOREpublisherAssertions class.
+*/
+
+/**
+@fn uddi2__set_USCOREpublisherAssertions::uddi2__set_USCOREpublisherAssertions(struct soap *soap, std::vector<uddi2__publisherAssertion*> publisherAssertions)
+@brief
+@param[in] soap gSOAP context
+@param[in] publisherAssertions collection of publisher assertions
+
+Creates an instance of the set_USCOREpublisherAssertions class using the
+specified collection of publisher assertions.
+*/
+
+/**
+@fn uddi2__publisherAssertions *uddi2__set_USCOREpublisherAssertions::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__publisherAssertions object or NULL on error
+
+Send a request to a UDDI server to post tModel information on the server.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Code Examples
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@page example1 Code Example 1: Finding a service
+
+This example shows you how to find Web services. In this case, the example
+finds Web services with names that begin with the word "magic".
+
+@code
+#include "inqH.h"
+
+int main(int argc, char **argv)
+{ 
+  char *search_string = "magic";
+
+  if (argc > 1)
+    search_string = argv[1];
+
+  // Create a gSOAP context
+  struct soap *soap = soap_new();
+
+  // Create an object to find a business
+  uddi2__find_USCOREservice fs(soap, search_string);
+
+  // Send the request
+  uddi2__serviceList *sl = fs.send("http://uddi.xmethods.net/inquire");
+
+  // Check if result is OK
+  if (!sl)
+    soap_print_fault(soap, stderr);
+
+  // If OK, report the service name(s) and unique identification keys
+  else if (sl->serviceInfos)
+  {
+    std::cout << "Search results on " << search_string << ":" << std::endl << std::endl;
+
+    for (std::vector<uddi2__serviceInfo*>::const_iterator si = sl->serviceInfos->serviceInfo.begin(); si != sl->serviceInfos->serviceInfo.end(); ++si)
+    {
+      // Report serviceKey and businessKey
+      std::cout << "serviceKey=" << (*si)->serviceKey << std::endl << "businessKey=" << (*si)->businessKey << std::endl;
+
+      // Report names
+      for (std::vector<uddi2__name*>::const_iterator n = (*si)->name.begin(); n != (*si)->name.end(); ++n)
+        std::cout << "name=" << (*n)->__item << std::endl;
+
+      std::cout << std::endl;
+    }
+  }
+
+  // Remove deserialized objects
+  soap_destroy(soap);
+
+  // Remove temporary data
+  soap_end(soap);
+
+  // Detach and free context
+  soap_done(soap);
+  free(soap);
+
+  return 0;
+}
+@endcode
+
+To compile:
+- wsdl2h -tuddi2-typemap.dat inquire_v2.wsdl
+- soapcpp2 -I.. -pinq inquire_v2.h
+- g++ -DWITH_NONAMESPACES -I.. -o example1 example1.cpp inquire_v2.cpp inqC.cpp inqClient.cpp ../stdsoap2.cpp
+*/
+
+/**
+@page example2 Code Example 2: Finding a business
+
+This example shows you how to find a business from a UDDI server.
+
+@code
+#include "inqH.h"
+
+int main(int argc, char **argv)
+{ 
+  char *search_string = "xmethods";
+
+  if (argc > 1)
+    search_string = argv[1];
+
+  // Create a gSOAP context
+  struct soap *soap = soap_new();
+
+  // Create an object to find a business
+  uddi2__find_USCOREbusiness fb(soap, search_string);
+
+  // Send the request
+  uddi2__businessList *bl = fb.send("http://uddi.xmethods.net/inquire");
+
+  // Check if result is OK
+  if (!bl)
+    soap_print_fault(soap, stderr);
+
+  // If OK, report the business name(s) and unique identification keys
+  else if (bl->businessInfos)
+  {
+    std::cout << "Search results on " << search_string << ":" << std::endl << std::endl;
+
+    for (std::vector<uddi2__businessInfo*>::const_iterator bi = bl->businessInfos->businessInfo.begin(); bi != bl->businessInfos->businessInfo.end(); ++bi)
+    {
+      // Report businessKey
+      std::cout << "businessKey=" << (*bi)->businessKey << std::endl;
+
+      // Report names
+      for (std::vector<uddi2__name*>::const_iterator n = (*bi)->name.begin(); n != (*bi)->name.end(); ++n)
+        std::cout << "name=" << (*n)->__item << std::endl;
+
+      std::cout << std::endl;
+    }
+  }
+
+  // Remove deserialized objects
+  soap_destroy(soap);
+
+  // Remove temporary data
+  soap_end(soap);
+
+  // Detach and free context
+  soap_done(soap);
+  free(soap);
+
+  return 0;
+}
+@endcode
+
+To compile:
+- wsdl2h -tuddi2-typemap.dat inquire_v2.wsdl
+- soapcpp2 -I.. -pinq inquire_v2.h
+- g++ -DWITH_NONAMESPACES -I.. -o example2 example2.cpp inquire_v2.cpp inqC.cpp inqClient.cpp ../stdsoap2.cpp
+*/
+/**
+@page example3 Code Example 3: Publishing a WSDL and service on XMethods
+
+This example shows you how to publish a Web service. In this case, the example
+template code obtains an authorization token, saves the tModel with the WSDL
+URL in the server, and saves the business service information in the server.
+
+@code
+#include "pubH.h"
+
+const char *server = "https://uddi.xmethods.net/publish";
+
+const char *userid = "..."; // user ID to access UDDI server
+const char *passwd = "..."; // password to access UDDI server
+
+int main(int argc, char **argv)
+{ 
+  // Create a gSOAP context
+  struct soap *soap = soap_new();
+
+  // Setup SSL context (optional) to verify server's credentials
+  if (soap_ssl_client_context(soap, SOAP_SSL_DEFAULT, NULL, NULL, "cacerts.pem", NULL, NULL))
+  { 
+    soap_print_fault(soap, stderr);
+    exit(1);
+  }
+
+  // Step 1: Get an authorization token from the UDDI server
+  uddi2__get_USCOREauthToken get_authToken(soap, userid, passwd);
+  uddi2__authToken *authToken = get_authToken.send(server);
+
+  // Check if authorized
+  if (!authToken)
+  {
+    soap_print_fault(soap, stderr);
+    exit(1);
+  }
+
+  // Authorization info provided by server for this session
+  char *authInfo = authToken->authInfo;
+
+  // Step 2: Create a tModel for the WSDL to be published
+  uddi2__tModel tModel;
+  tModel.soap_default(soap);
+
+  // Create the tModel and service name
+  tModel.name = soap_new_uddi2__name(soap, -1);
+  tModel.name->__item = "...";
+  tModel.name->xml__lang_ = "en";
+
+  // Create XMethods description elements (see http://www.xmethods.net/ve2/UDDI.po)
+  uddi2__description *description = soap_new_uddi2__description(soap, 6);
+  description[0].__item = "SHORT DESCRIPTION: ...";
+  description[0].xml__lang_ = "en";
+  description[1].__item = "SHORT DESCRIPTION: ...";
+  description[1].xml__lang_ = "en";
+  description[2].__item = "USAGE NOTES: ...";
+  description[2].xml__lang_ = "en";
+  description[3].__item = "HOMEPAGE URL: ...";
+  description[3].xml__lang_ = "en";
+  description[4].__item = "CONTACT EMAIL: ...";
+  description[4].xml__lang_ = "en";
+  description[5].__item = "IMPLEMENTATION: ...";
+  description[5].xml__lang_ = "en";
+
+  // Add the four description elements to the tModel
+  tModel.description.push_back(description + 0);
+  tModel.description.push_back(description + 1);
+  tModel.description.push_back(description + 2);
+  tModel.description.push_back(description + 4);
+
+  // Add an overviewDoc element with description and overviewURL
+  tModel.overviewDoc = soap_new_uddi2__overviewDoc(soap, -1);
+  tModel.overviewDoc->soap_default(soap);
+  tModel.overviewDoc->description.push_back(soap_new_uddi2__description(soap, -1));
+  tModel.overviewDoc->description[0]->__item = "WSDL source document";
+  tModel.overviewDoc->description[0]->xml__lang_ = "en";
+  tModel.overviewDoc->overviewURL = "http://.../my.wsdl#bindingName";
+
+  // Omit identifier bag
+  tModel.identifierBag = NULL;
+
+  // Add a category with a WSDL-specific keyedReference
+  tModel.categoryBag = soap_new_uddi2__categoryBag(soap, -1);
+  tModel.categoryBag->soap_default(soap);
+  tModel.categoryBag->keyedReference.push_back(soap_new_uddi2__keyedReference(soap, -1));
+  tModel.categoryBag->keyedReference[0]->tModelKey = "...";
+  tModel.categoryBag->keyedReference[0]->keyName = "uddi-org:types";
+  tModel.categoryBag->keyedReference[0]->keyValue = "wsdlSpec";
+
+  tModel.authorizedName = "...";
+  tModel.operator_ = "...";
+  tModel.tModelKey = "...";
+
+  // Save the tModel
+  uddi2__save_USCOREtModel save_tModel(soap, tModel);
+  uddi2__tModelDetail *tModelDetail = save_tModel.send(server, authInfo);
+
+  // Step 3: Create a new service to be published
+  uddi2__businessService service;
+  service.soap_default(soap);
+
+  // Service name is the tModel name (XMethods)
+  service.name.push_back(tModel.name);
+
+  // Add two description elements to the service
+  service.description.push_back(description + 4);
+  service.description.push_back(description + 5);
+
+  // Create binding template
+  uddi2__bindingTemplate bindingTemplate;
+  bindingTemplate.soap_default(soap);
+  bindingTemplate.tModelInstanceDetails = soap_new_uddi2__tModelInstanceDetails(soap, -1);
+  bindingTemplate.tModelInstanceDetails->tModelInstanceInfo.push_back(soap_new_uddi2__tModelInstanceInfo(soap, -1));
+  bindingTemplate.tModelInstanceDetails->tModelInstanceInfo[0]->instanceDetails = NULL;
+  bindingTemplate.tModelInstanceDetails->tModelInstanceInfo[0]->tModelKey = tModel.tModelKey;
+  bindingTemplate.accessPoint = soap_new_uddi2__accessPoint(soap, -1);
+  bindingTemplate.accessPoint->__item = "...";
+  bindingTemplate.accessPoint->URLType = uddi2__URLType__http;
+  bindingTemplate.hostingRedirector = NULL;
+  bindingTemplate.serviceKey = "...";
+  bindingTemplate.bindingKey = "...";
+
+  // Add binding Template to service
+  service.bindingTemplates = soap_new_uddi2__bindingTemplates(soap, -1);
+  service.bindingTemplates->soap_default(soap);
+  service.bindingTemplates->bindingTemplate.push_back(&bindingTemplate);
+
+  service.categoryBag = NULL;
+  service.serviceKey = "...";
+  service.businessKey = "...";
+
+  // Save the service
+  uddi2__save_USCOREservice save_service(soap, service);
+  uddi2__serviceDetail *serviceDetail = save_service.send(server, authInfo);
+
+  // Step 4: Discard authorization token
+  uddi2__discard_USCOREauthToken discard_authToken(soap, authInfo);
+  uddi2__dispositionReport *dispositionReport = discard_authToken.send(server);
+
+  // Remove deserialized objects
+  soap_destroy(soap);
+
+  // Remove temporary data
+  soap_end(soap);
+
+  // Detach and free context
+  soap_done(soap);
+  free(soap);
+
+  return 0;
+}
+@endcode
+To compile:
+- wsdl2h -tuddi2-typemap.dat publish_v2.wsdl
+- soapcpp2 -I.. -ppub publish_v2.h
+- g++ -DWITH_OPENSSL -DWITH_NONAMESPACES -I.. -o example3 example3.cpp publish_v2.cpp pubC.cpp pubClient.cpp ../stdsoap2.cpp
+*/
+/* publish_v2.h
+   Generated by wsdl2h 1.2.0 from publish_v2.wsdl and uddi2-typemap.dat
+   2005-04-24 00:29:41 GMT
+   Copyright (C) 2001-2005 Robert van Engelen, Genivia Inc. All Rights Reserved.
+   This part of the software is released under one of the following licenses:
+   GPL or Genivia's license for commercial use.
+*/
+
+/* NOTE:
+
+ - Compile this file with soapcpp2 to complete the code generation process.
+ - Use wsdl2h option -l to view the software license terms.
+ - Use wsdl2h options -c and -s to generate pure C code or C++ code without STL.
+ - To build with STL, stlvector.h from the gSOAP distribution must be in the
+   current directory. Or use soapcpp2 option -I<path> with path to stlvector.h.
+ - Use typemap.dat to control schema namespace bindings and type mappings.
+   It is strongly recommended to customize the names of the namespace prefixes
+   generated by wsdl2h. To do so, modify the prefix bindings in the Namespaces
+   section below and add the modified lines to typemap.dat to rerun wsdl2h.
+ - Use Doxygen (www.doxygen.org) to browse this file.
+
+*/
+
+/******************************************************************************\
+ *                                                                            *
+ * urn:uddi-org:publication_v2                                                *
+ *                                                                            *
+\******************************************************************************/
+
+/* WSDL Documentation:
+
+
+		Copyright (c) 2000 - 2002 by Accenture, Ariba, Inc., Commerce One, Inc. 
+		Fujitsu Limited, Hewlett-Packard Company, i2 Technologies, Inc., 
+		Intel Corporation, International Business Machines Corporation,  
+		Microsoft Corporation, Oracle Corporation, SAP AG, Sun Microsystems, Inc., 
+		and VeriSign, Inc.  All Rights Reserved.
+		
+		WSDL Service Interface for UDDI Publication API V2.0
+		
+		This WSDL document defines the publication API calls for interacting with 
+		the UDDI registry.  The complete UDDI API specification is available
+		at http://www.uddi.org/specification.html.
+	
+*/
+
+//gsoapopt w
+
+#import "stlvector.h"
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Namespaces                                                          *
+ *                                                                            *
+\******************************************************************************/
+
+
+/* NOTE:
+
+It is strongly recommended to customize the names of the namespace prefixes
+generated by wsdl2h. To do so, modify the prefix bindings below and add the
+modified lines to typemap.dat to rerun wsdl2h:
+
+pub2 = "urn:uddi-org:publication_v2"
+uddi2 = urn:uddi-org:api_v2
+
+*/
+
+//gsoap pub2  schema namespace:	urn:uddi-org:publication_v2
+//gsoap uddi2 schema namespace:	urn:uddi-org:api_v2
+//gsoap pub2  schema form:	unqualified
+//gsoap uddi2 schema elementForm:	qualified
+//gsoap uddi2 schema attributeForm:	unqualified
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Types                                                               *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Primitive built-in type "xs:NMTOKEN"
+typedef char* xsd__NMTOKEN;
+
+/// Built-in attribute "xml:lang"
+typedef char* xml__lang;
+
+class uddi2__accessPoint;
+class uddi2__address;
+class uddi2__addressLine;
+class uddi2__assertionStatusItem;
+class uddi2__bindingTemplate;
+class uddi2__bindingTemplates;
+class uddi2__businessEntity;
+class uddi2__businessEntityExt;
+class uddi2__businessInfo;
+class uddi2__businessInfos;
+class uddi2__businessService;
+class uddi2__businessServices;
+class uddi2__categoryBag;
+class uddi2__contact;
+class uddi2__contacts;
+class uddi2__description;
+class uddi2__discoveryURL;
+class uddi2__discoveryURLs;
+class uddi2__dispositionReport;
+class uddi2__email;
+class uddi2__errInfo;
+class uddi2__findQualifiers;
+class uddi2__hostingRedirector;
+class uddi2__identifierBag;
+class uddi2__instanceDetails;
+class uddi2__keyedReference;
+class uddi2__keysOwned;
+class uddi2__name;
+class uddi2__overviewDoc;
+class uddi2__phone;
+class uddi2__publisherAssertion;
+class uddi2__relatedBusinessInfo;
+class uddi2__relatedBusinessInfos;
+class uddi2__result;
+class uddi2__serviceInfo;
+class uddi2__serviceInfos;
+class uddi2__sharedRelationships;
+class uddi2__tModel;
+class uddi2__tModelBag;
+class uddi2__tModelInfo;
+class uddi2__tModelInfos;
+class uddi2__tModelInstanceDetails;
+class uddi2__tModelInstanceInfo;
+class uddi2__add_USCOREpublisherAssertions;
+class uddi2__delete_USCOREbinding;
+class uddi2__delete_USCOREbusiness;
+class uddi2__delete_USCOREpublisherAssertions;
+class uddi2__delete_USCOREservice;
+class uddi2__delete_USCOREtModel;
+class uddi2__discard_USCOREauthToken;
+class uddi2__find_USCOREbinding;
+class uddi2__find_USCOREbusiness;
+class uddi2__find_USCORErelatedBusinesses;
+class uddi2__find_USCOREservice;
+class uddi2__find_USCOREtModel;
+class uddi2__get_USCOREassertionStatusReport;
+class uddi2__get_USCOREauthToken;
+class uddi2__get_USCOREbindingDetail;
+class uddi2__get_USCOREbusinessDetail;
+class uddi2__get_USCOREbusinessDetailExt;
+class uddi2__get_USCOREpublisherAssertions;
+class uddi2__get_USCOREregisteredInfo;
+class uddi2__get_USCOREserviceDetail;
+class uddi2__get_USCOREtModelDetail;
+class uddi2__save_USCOREbinding;
+class uddi2__save_USCOREbusiness;
+class uddi2__save_USCOREservice;
+class uddi2__save_USCOREtModel;
+class uddi2__set_USCOREpublisherAssertions;
+class uddi2__validate_USCOREvalues;
+class uddi2__assertionStatusReport;
+class uddi2__authToken;
+class uddi2__bindingDetail;
+class uddi2__businessDetail;
+class uddi2__businessDetailExt;
+class uddi2__businessList;
+class uddi2__publisherAssertions;
+class uddi2__registeredInfo;
+class uddi2__relatedBusinessesList;
+class uddi2__serviceDetail;
+class uddi2__serviceList;
+class uddi2__tModelDetail;
+class uddi2__tModelList;
+
+/// Schema "urn:uddi-org:api_v2":bindingKey simpleType restriction of xs:string
+
+typedef char* uddi2__bindingKey;
+
+/// Schema "urn:uddi-org:api_v2":businessKey simpleType restriction of xs:string
+
+typedef char* uddi2__businessKey;
+
+/// Schema "urn:uddi-org:api_v2":serviceKey simpleType restriction of xs:string
+
+typedef char* uddi2__serviceKey;
+
+/// Schema "urn:uddi-org:api_v2":tModelKey simpleType restriction of xs:string
+
+typedef char* uddi2__tModelKey;
+
+/// Schema "urn:uddi-org:api_v2":direction simpleType restriction of xs:NMTOKEN
+
+/// Note: enum values are prefixed with 'uddi2__direction' to avoid name clashes, please use wsdl2h option -e to omit this prefix
+enum uddi2__direction
+{	uddi2__direction__fromKey,	///< xs:NMTOKEN value="fromKey"
+	uddi2__direction__toKey,	///< xs:NMTOKEN value="toKey"
+};
+
+/// Schema "urn:uddi-org:api_v2":truncated simpleType restriction of xs:NMTOKEN
+
+/// Note: enum values are prefixed with 'uddi2__truncated' to avoid name clashes, please use wsdl2h option -e to omit this prefix
+enum uddi2__truncated
+{	uddi2__truncated__true_,	///< xs:NMTOKEN value="true"
+	uddi2__truncated__false_,	///< xs:NMTOKEN value="false"
+};
+
+/// Schema "urn:uddi-org:api_v2":URLType simpleType restriction of xs:NMTOKEN
+
+/// Note: enum values are prefixed with 'uddi2__URLType' to avoid name clashes, please use wsdl2h option -e to omit this prefix
+enum uddi2__URLType
+{	uddi2__URLType__mailto,	///< xs:NMTOKEN value="mailto"
+	uddi2__URLType__http,	///< xs:NMTOKEN value="http"
+	uddi2__URLType__https,	///< xs:NMTOKEN value="https"
+	uddi2__URLType__ftp,	///< xs:NMTOKEN value="ftp"
+	uddi2__URLType__fax,	///< xs:NMTOKEN value="fax"
+	uddi2__URLType__phone,	///< xs:NMTOKEN value="phone"
+	uddi2__URLType__other,	///< xs:NMTOKEN value="other"
+};
+
+/// Schema "urn:uddi-org:api_v2":keyType simpleType restriction of xs:NMTOKEN
+
+/// Note: enum values are prefixed with 'uddi2__keyType' to avoid name clashes, please use wsdl2h option -e to omit this prefix
+enum uddi2__keyType
+{	uddi2__keyType__businessKey,	///< xs:NMTOKEN value="businessKey"
+	uddi2__keyType__tModelKey,	///< xs:NMTOKEN value="tModelKey"
+	uddi2__keyType__serviceKey,	///< xs:NMTOKEN value="serviceKey"
+	uddi2__keyType__bindingKey,	///< xs:NMTOKEN value="bindingKey"
+};
+
+/// Schema urn:uddi-org:api_v2:"address"
+
+class uddi2__address
+{ public:
+/// Vector of uddi2__addressLine* with length 0..unbounded
+    std::vector<uddi2__addressLine*    > addressLine                    0;
+/// Attribute useType of type xs:string
+   @char*                                useType                        0;	///< Optional attribute
+/// Attribute sortCode of type xs:string
+   @char*                                sortCode                       0;	///< Optional attribute
+/// Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey
+   @uddi2__tModelKey                     tModelKey                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"assertionStatusItem"
+
+class uddi2__assertionStatusItem
+{ public:
+/// Element reference "urn:uddi-org:api_v2":fromKey
+    uddi2__businessKey                   fromKey                        1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":toKey
+    uddi2__businessKey                   toKey                          1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":keyedReference
+    uddi2__keyedReference*               keyedReference                 1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":keysOwned
+    uddi2__keysOwned*                    keysOwned                      1;	///< Required element
+/// Attribute completionStatus of type xs:string
+   @char*                                completionStatus               1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"bindingTemplate"
+
+class uddi2__bindingTemplate
+{ public:
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":tModelInstanceDetails
+    uddi2__tModelInstanceDetails*        tModelInstanceDetails          1;	///< Required element
+// CHOICE OF ELEMENTS:
+/// Element reference "urn:uddi-org:api_v2":accessPoint
+    uddi2__accessPoint*                  accessPoint                    1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":hostingRedirector
+    uddi2__hostingRedirector*            hostingRedirector              1;	///< Required element
+// END CHOICE
+/// Attribute serviceKey of type "urn:uddi-org:api_v2":serviceKey
+   @uddi2__serviceKey                    serviceKey                     0;	///< Optional attribute
+/// Attribute bindingKey of type "urn:uddi-org:api_v2":bindingKey
+   @uddi2__bindingKey                    bindingKey                     1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"bindingTemplates"
+
+class uddi2__bindingTemplates
+{ public:
+/// Vector of uddi2__bindingTemplate* with length 0..unbounded
+    std::vector<uddi2__bindingTemplate*> bindingTemplate                0;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessEntity"
+
+class uddi2__businessEntity
+{ public:
+/// Element reference "urn:uddi-org:api_v2":discoveryURLs
+    uddi2__discoveryURLs*                discoveryURLs                  0;	///< Optional element
+/// Vector of uddi2__name* with length 0..unbounded
+    std::vector<uddi2__name*           > name                           1;
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":contacts
+    uddi2__contacts*                     contacts                       0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":businessServices
+    uddi2__businessServices*             businessServices               0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":identifierBag
+    uddi2__identifierBag*                identifierBag                  0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":categoryBag
+    uddi2__categoryBag*                  categoryBag                    0;	///< Optional element
+/// Attribute businessKey of type "urn:uddi-org:api_v2":businessKey
+   @uddi2__businessKey                   businessKey                    1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      0;	///< Optional attribute
+/// Attribute authorizedName of type xs:string
+   @char*                                authorizedName                 0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessEntityExt"
+
+class uddi2__businessEntityExt
+{ public:
+/// Element reference "urn:uddi-org:api_v2":businessEntity
+    uddi2__businessEntity*               businessEntity                 1;	///< Required element
+// TODO: <any namespace="##other" minOccurs="0" maxOccurs="unbounded">
+//       Schema extensibility is user-definable
+//       Consult the protocol documentation to insert declarations here:
+    _XML                                 __any                         ;	///< Catch any element content in XML string
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessInfo"
+
+class uddi2__businessInfo
+{ public:
+/// Vector of uddi2__name* with length 0..unbounded
+    std::vector<uddi2__name*           > name                           1;
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":serviceInfos
+    uddi2__serviceInfos*                 serviceInfos                   1;	///< Required element
+/// Attribute businessKey of type "urn:uddi-org:api_v2":businessKey
+   @uddi2__businessKey                   businessKey                    1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessInfos"
+
+class uddi2__businessInfos
+{ public:
+/// Vector of uddi2__businessInfo* with length 0..unbounded
+    std::vector<uddi2__businessInfo*   > businessInfo                   0;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessService"
+
+class uddi2__businessService
+{ public:
+/// Vector of uddi2__name* with length 0..unbounded
+    std::vector<uddi2__name*           > name                           0;
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":bindingTemplates
+    uddi2__bindingTemplates*             bindingTemplates               0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":categoryBag
+    uddi2__categoryBag*                  categoryBag                    0;	///< Optional element
+/// Attribute serviceKey of type "urn:uddi-org:api_v2":serviceKey
+   @uddi2__serviceKey                    serviceKey                     1;	///< Required attribute
+/// Attribute businessKey of type "urn:uddi-org:api_v2":businessKey
+   @uddi2__businessKey                   businessKey                    0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessServices"
+
+class uddi2__businessServices
+{ public:
+/// Vector of uddi2__businessService* with length 0..unbounded
+    std::vector<uddi2__businessService*> businessService                0;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"categoryBag"
+
+class uddi2__categoryBag
+{ public:
+/// Vector of uddi2__keyedReference* with length 0..unbounded
+    std::vector<uddi2__keyedReference* > keyedReference                 1;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"contact"
+
+class uddi2__contact
+{ public:
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":personName
+    char*                                personName                     1;	///< Required element
+/// Vector of uddi2__phone* with length 0..unbounded
+    std::vector<uddi2__phone*          > phone                          0;
+/// Vector of uddi2__email* with length 0..unbounded
+    std::vector<uddi2__email*          > email                          0;
+/// Vector of uddi2__address* with length 0..unbounded
+    std::vector<uddi2__address*        > address                        0;
+/// Attribute useType of type xs:string
+   @char*                                useType                        0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"contacts"
+
+class uddi2__contacts
+{ public:
+/// Vector of uddi2__contact* with length 0..unbounded
+    std::vector<uddi2__contact*        > contact                        1;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"discoveryURLs"
+
+class uddi2__discoveryURLs
+{ public:
+/// Vector of uddi2__discoveryURL* with length 0..unbounded
+    std::vector<uddi2__discoveryURL*   > discoveryURL                   1;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"dispositionReport"
+
+class uddi2__dispositionReport
+{ public:
+/// Vector of uddi2__result* with length 0..unbounded
+    std::vector<uddi2__result*         > result                         1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"findQualifiers"
+
+class uddi2__findQualifiers
+{ public:
+/// Vector of char* with length 0..unbounded
+    std::vector<char*                  > findQualifier                  0;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"hostingRedirector"
+
+class uddi2__hostingRedirector
+{ public:
+/// Attribute bindingKey of type "urn:uddi-org:api_v2":bindingKey
+   @uddi2__bindingKey                    bindingKey                     1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"identifierBag"
+
+class uddi2__identifierBag
+{ public:
+/// Vector of uddi2__keyedReference* with length 0..unbounded
+    std::vector<uddi2__keyedReference* > keyedReference                 1;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"instanceDetails"
+
+class uddi2__instanceDetails
+{ public:
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":overviewDoc
+    uddi2__overviewDoc*                  overviewDoc                    0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":instanceParms
+    char*                                instanceParms                  0;	///< Optional element
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"keyedReference"
+
+class uddi2__keyedReference
+{ public:
+/// Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey
+   @uddi2__tModelKey                     tModelKey                      0;	///< Optional attribute
+/// Attribute keyName of type xs:string
+   @char*                                keyName                        0;	///< Optional attribute
+/// Attribute keyValue of type xs:string
+   @char*                                keyValue                       1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"keysOwned"
+
+class uddi2__keysOwned
+{ public:
+/// Element reference "urn:uddi-org:api_v2":fromKey
+    uddi2__businessKey                   fromKey                        0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":toKey
+    uddi2__businessKey                   toKey                          0;	///< Optional element
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"overviewDoc"
+
+class uddi2__overviewDoc
+{ public:
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":overviewURL
+    char*                                overviewURL                    0;	///< Optional element
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"publisherAssertion"
+
+class uddi2__publisherAssertion
+{ public:
+/// Element reference "urn:uddi-org:api_v2":fromKey
+    uddi2__businessKey                   fromKey                        1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":toKey
+    uddi2__businessKey                   toKey                          1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":keyedReference
+    uddi2__keyedReference*               keyedReference                 1;	///< Required element
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"relatedBusinessInfo"
+
+class uddi2__relatedBusinessInfo
+{ public:
+/// Element reference "urn:uddi-org:api_v2":businessKey
+    uddi2__businessKey                   businessKey                    1;	///< Required element
+/// Vector of uddi2__name* with length 0..unbounded
+    std::vector<uddi2__name*           > name                           1;
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Vector of uddi2__sharedRelationships* with length 0..2
+    std::vector<uddi2__sharedRelationships*> sharedRelationships            1:2;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"relatedBusinessInfos"
+
+class uddi2__relatedBusinessInfos
+{ public:
+/// Vector of uddi2__relatedBusinessInfo* with length 0..unbounded
+    std::vector<uddi2__relatedBusinessInfo*> relatedBusinessInfo            0;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"result"
+
+class uddi2__result
+{ public:
+/// Element reference "urn:uddi-org:api_v2":errInfo
+    uddi2__errInfo*                      errInfo                        0;	///< Optional element
+/// Attribute keyType of type "urn:uddi-org:api_v2":keyType
+   @enum uddi2__keyType*                 keyType                        0;	///< Optional attribute
+/// Attribute errno of type xs:int
+   @int                                  errno_                         1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"serviceInfo"
+
+class uddi2__serviceInfo
+{ public:
+/// Vector of uddi2__name* with length 0..unbounded
+    std::vector<uddi2__name*           > name                           0;
+/// Attribute serviceKey of type "urn:uddi-org:api_v2":serviceKey
+   @uddi2__serviceKey                    serviceKey                     1;	///< Required attribute
+/// Attribute businessKey of type "urn:uddi-org:api_v2":businessKey
+   @uddi2__businessKey                   businessKey                    1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"serviceInfos"
+
+class uddi2__serviceInfos
+{ public:
+/// Vector of uddi2__serviceInfo* with length 0..unbounded
+    std::vector<uddi2__serviceInfo*    > serviceInfo                    0;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"sharedRelationships"
+
+class uddi2__sharedRelationships
+{ public:
+/// Vector of uddi2__keyedReference* with length 0..unbounded
+    std::vector<uddi2__keyedReference* > keyedReference                 1;
+/// Attribute direction of type "urn:uddi-org:api_v2":direction
+   @enum uddi2__direction                direction                      1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"tModel"
+
+class uddi2__tModel
+{ public:
+/// Element reference "urn:uddi-org:api_v2":name
+    uddi2__name*                         name                           1;	///< Required element
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":overviewDoc
+    uddi2__overviewDoc*                  overviewDoc                    0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":identifierBag
+    uddi2__identifierBag*                identifierBag                  0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":categoryBag
+    uddi2__categoryBag*                  categoryBag                    0;	///< Optional element
+/// Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey
+   @uddi2__tModelKey                     tModelKey                      1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      0;	///< Optional attribute
+/// Attribute authorizedName of type xs:string
+   @char*                                authorizedName                 0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"tModelBag"
+
+class uddi2__tModelBag
+{ public:
+/// Vector of uddi2__tModelKey with length 0..unbounded
+    std::vector<uddi2__tModelKey       > tModelKey                      1;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"tModelInfo"
+
+class uddi2__tModelInfo
+{ public:
+/// Element reference "urn:uddi-org:api_v2":name
+    uddi2__name*                         name                           1;	///< Required element
+/// Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey
+   @uddi2__tModelKey                     tModelKey                      1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"tModelInfos"
+
+class uddi2__tModelInfos
+{ public:
+/// Vector of uddi2__tModelInfo* with length 0..unbounded
+    std::vector<uddi2__tModelInfo*     > tModelInfo                     0;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"tModelInstanceDetails"
+
+class uddi2__tModelInstanceDetails
+{ public:
+/// Vector of uddi2__tModelInstanceInfo* with length 0..unbounded
+    std::vector<uddi2__tModelInstanceInfo*> tModelInstanceInfo             0;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"tModelInstanceInfo"
+
+class uddi2__tModelInstanceInfo
+{ public:
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":instanceDetails
+    uddi2__instanceDetails*              instanceDetails                0;	///< Optional element
+/// Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey
+   @uddi2__tModelKey                     tModelKey                      1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"add_publisherAssertions"
+
+class uddi2__add_USCOREpublisherAssertions
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__publisherAssertion* with length 0..unbounded
+    std::vector<uddi2__publisherAssertion*> publisherAssertion             1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__add_USCOREpublisherAssertions(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__add_USCOREpublisherAssertions(struct soap*, std::vector<uddi2__publisherAssertion*> publisherAssertions);
+/// Member declared in uddi2-typemap.dat
+    uddi2__dispositionReport* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"delete_binding"
+
+class uddi2__delete_USCOREbinding
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__bindingKey with length 0..unbounded
+    std::vector<uddi2__bindingKey      > bindingKey                     1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREbinding(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREbinding(struct soap*, const char *bindingKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREbinding(struct soap*, std::vector<char*> bindingKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__dispositionReport* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"delete_business"
+
+class uddi2__delete_USCOREbusiness
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__businessKey with length 0..unbounded
+    std::vector<uddi2__businessKey     > businessKey                    1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREbusiness(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREbusiness(struct soap*, const char *businessKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREbusiness(struct soap*, std::vector<char*> businessKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__dispositionReport* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"delete_publisherAssertions"
+
+class uddi2__delete_USCOREpublisherAssertions
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__publisherAssertion* with length 0..unbounded
+    std::vector<uddi2__publisherAssertion*> publisherAssertion             1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREpublisherAssertions(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREpublisherAssertions(struct soap*, std::vector<uddi2__publisherAssertion*> publisherAssertions);
+/// Member declared in uddi2-typemap.dat
+    uddi2__dispositionReport* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"delete_service"
+
+class uddi2__delete_USCOREservice
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__serviceKey with length 0..unbounded
+    std::vector<uddi2__serviceKey      > serviceKey                     1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREservice(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREservice(struct soap*, const char *serviceKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREservice(struct soap*, std::vector<char*> serviceKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__dispositionReport* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"delete_tModel"
+
+class uddi2__delete_USCOREtModel
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__tModelKey with length 0..unbounded
+    std::vector<uddi2__tModelKey       > tModelKey                      1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREtModel(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREtModel(struct soap*, const char *tModelKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREtModel(struct soap*, std::vector<char*> tModelKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__dispositionReport* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"discard_authToken"
+
+class uddi2__discard_USCOREauthToken
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__discard_USCOREauthToken(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__discard_USCOREauthToken(struct soap*, const char *authInfo);
+/// Member declared in uddi2-typemap.dat
+    uddi2__dispositionReport* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"find_binding"
+
+class uddi2__find_USCOREbinding
+{ public:
+/// Element reference "urn:uddi-org:api_v2":findQualifiers
+    uddi2__findQualifiers*               findQualifiers                 0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":tModelBag
+    uddi2__tModelBag*                    tModelBag                      1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute maxRows of type xs:int
+   @int*                                 maxRows                        0;	///< Optional attribute
+/// Attribute serviceKey of type "urn:uddi-org:api_v2":serviceKey
+   @uddi2__serviceKey                    serviceKey                     1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREbinding(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREbinding(struct soap*, const char *tModelKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREbinding(struct soap*, std::vector<char*> tModelKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__bindingDetail *send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"find_business"
+
+class uddi2__find_USCOREbusiness
+{ public:
+/// Element reference "urn:uddi-org:api_v2":findQualifiers
+    uddi2__findQualifiers*               findQualifiers                 0;	///< Optional element
+/// Vector of uddi2__name* with length 0..unbounded
+    std::vector<uddi2__name*           > name                           0;
+/// Element reference "urn:uddi-org:api_v2":identifierBag
+    uddi2__identifierBag*                identifierBag                  0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":categoryBag
+    uddi2__categoryBag*                  categoryBag                    0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":tModelBag
+    uddi2__tModelBag*                    tModelBag                      0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":discoveryURLs
+    uddi2__discoveryURLs*                discoveryURLs                  0;	///< Optional element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute maxRows of type xs:int
+   @int*                                 maxRows                        0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREbusiness(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREbusiness(struct soap*, const char *name);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREbusiness(struct soap*, std::vector<char*> tModelKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREbusiness(struct soap*, std::vector<uddi2__keyedReference*> keyedReferences);
+/// Member declared in uddi2-typemap.dat
+    uddi2__businessList *send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"find_relatedBusinesses"
+
+class uddi2__find_USCORErelatedBusinesses
+{ public:
+/// Element reference "urn:uddi-org:api_v2":findQualifiers
+    uddi2__findQualifiers*               findQualifiers                 0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":businessKey
+    uddi2__businessKey                   businessKey                    1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":keyedReference
+    uddi2__keyedReference*               keyedReference                 0;	///< Optional element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute maxRows of type xs:int
+   @int*                                 maxRows                        0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCORErelatedBusinesses(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCORErelatedBusinesses(struct soap*, const char *businessKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__relatedBusinessesList *send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"find_service"
+
+class uddi2__find_USCOREservice
+{ public:
+/// Element reference "urn:uddi-org:api_v2":findQualifiers
+    uddi2__findQualifiers*               findQualifiers                 0;	///< Optional element
+/// Vector of uddi2__name* with length 0..unbounded
+    std::vector<uddi2__name*           > name                           0;
+/// Element reference "urn:uddi-org:api_v2":categoryBag
+    uddi2__categoryBag*                  categoryBag                    0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":tModelBag
+    uddi2__tModelBag*                    tModelBag                      0;	///< Optional element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute maxRows of type xs:int
+   @int*                                 maxRows                        0;	///< Optional attribute
+/// Attribute businessKey of type "urn:uddi-org:api_v2":businessKey
+   @uddi2__businessKey                   businessKey                    0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREservice(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREservice(struct soap*, const char *name);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREservice(struct soap*, std::vector<char*> tModelKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREservice(struct soap*, std::vector<uddi2__keyedReference*> keyedReferences);
+/// Member declared in uddi2-typemap.dat
+    uddi2__serviceList* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"find_tModel"
+
+class uddi2__find_USCOREtModel
+{ public:
+/// Element reference "urn:uddi-org:api_v2":findQualifiers
+    uddi2__findQualifiers*               findQualifiers                 0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":name
+    uddi2__name*                         name                           0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":identifierBag
+    uddi2__identifierBag*                identifierBag                  0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":categoryBag
+    uddi2__categoryBag*                  categoryBag                    0;	///< Optional element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute maxRows of type xs:int
+   @int*                                 maxRows                        0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREtModel(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREtModel(struct soap*, const char *name);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREtModel(struct soap*, std::vector<uddi2__keyedReference*> keyedReferences);
+/// Member declared in uddi2-typemap.dat
+    uddi2__tModelList* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_assertionStatusReport"
+
+class uddi2__get_USCOREassertionStatusReport
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":completionStatus
+    char*                                completionStatus               0;	///< Optional element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREassertionStatusReport(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREassertionStatusReport(struct soap*, const char *completionStatus);
+/// Member declared in uddi2-typemap.dat
+    uddi2__assertionStatusReport* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_authToken"
+
+class uddi2__get_USCOREauthToken
+{ public:
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute userID of type xs:string
+   @char*                                userID                         1;	///< Required attribute
+/// Attribute cred of type xs:string
+   @char*                                cred                           1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREauthToken(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREauthToken(struct soap*, const char *userid, const char *passwd);
+/// Member declared in uddi2-typemap.dat
+    uddi2__authToken* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_bindingDetail"
+
+class uddi2__get_USCOREbindingDetail
+{ public:
+/// Vector of uddi2__bindingKey with length 0..unbounded
+    std::vector<uddi2__bindingKey      > bindingKey                     1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbindingDetail(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbindingDetail(struct soap*, const char *bindingKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbindingDetail(struct soap*, std::vector<char*> bindingKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__bindingDetail* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_businessDetail"
+
+class uddi2__get_USCOREbusinessDetail
+{ public:
+/// Vector of uddi2__businessKey with length 0..unbounded
+    std::vector<uddi2__businessKey     > businessKey                    1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbusinessDetail(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbusinessDetail(struct soap*, const char *businessKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbusinessDetail(struct soap*, std::vector<char*> businessKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__businessDetail* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_businessDetailExt"
+
+class uddi2__get_USCOREbusinessDetailExt
+{ public:
+/// Vector of uddi2__businessKey with length 0..unbounded
+    std::vector<uddi2__businessKey     > businessKey                    1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbusinessDetailExt(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbusinessDetailExt(struct soap*, const char *businessKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbusinessDetailExt(struct soap*, std::vector<char*> businessKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__businessDetailExt* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_publisherAssertions"
+
+class uddi2__get_USCOREpublisherAssertions
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREpublisherAssertions(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__publisherAssertions* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_registeredInfo"
+
+class uddi2__get_USCOREregisteredInfo
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREregisteredInfo(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__registeredInfo* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_serviceDetail"
+
+class uddi2__get_USCOREserviceDetail
+{ public:
+/// Vector of uddi2__serviceKey with length 0..unbounded
+    std::vector<uddi2__serviceKey      > serviceKey                     1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREserviceDetail(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREserviceDetail(struct soap*, const char *serviceKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREserviceDetail(struct soap*, std::vector<char*> serviceKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__serviceDetail* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_tModelDetail"
+
+class uddi2__get_USCOREtModelDetail
+{ public:
+/// Vector of uddi2__tModelKey with length 0..unbounded
+    std::vector<uddi2__tModelKey       > tModelKey                      1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREtModelDetail(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREtModelDetail(struct soap*, const char *tModelKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREtModelDetail(struct soap*, std::vector<char*> tModelKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__tModelDetail* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"save_binding"
+
+class uddi2__save_USCOREbinding
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__bindingTemplate* with length 0..unbounded
+    std::vector<uddi2__bindingTemplate*> bindingTemplate                1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREbinding(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREbinding(struct soap*, uddi2__bindingTemplate &bindingTemplate);
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREbinding(struct soap*, std::vector<uddi2__bindingTemplate*> bindingTemplates);
+/// Member declared in uddi2-typemap.dat
+    uddi2__bindingDetail* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"save_business"
+
+class uddi2__save_USCOREbusiness
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__businessEntity* with length 0..unbounded
+    std::vector<uddi2__businessEntity* > businessEntity                 0;
+/// Vector of char* with length 0..unbounded
+    std::vector<char*                  > uploadRegister                 0;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREbusiness(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREbusiness(struct soap*, uddi2__businessEntity &businessEntity);
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREbusiness(struct soap*, std::vector<uddi2__businessEntity*> businessEntities);
+/// Member declared in uddi2-typemap.dat
+    uddi2__businessDetail* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"save_service"
+
+class uddi2__save_USCOREservice
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__businessService* with length 0..unbounded
+    std::vector<uddi2__businessService*> businessService                1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREservice(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREservice(struct soap*, uddi2__businessService &businessService);
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREservice(struct soap*, std::vector<uddi2__businessService*> businessServices);
+/// Member declared in uddi2-typemap.dat
+    uddi2__serviceDetail* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"save_tModel"
+
+class uddi2__save_USCOREtModel
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__tModel* with length 0..unbounded
+    std::vector<uddi2__tModel*         > tModel                         0;
+/// Vector of char* with length 0..unbounded
+    std::vector<char*                  > uploadRegister                 0;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREtModel(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREtModel(struct soap*, uddi2__tModel &tModel);
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREtModel(struct soap*, std::vector<uddi2__tModel*> tModels);
+/// Member declared in uddi2-typemap.dat
+    uddi2__tModelDetail* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"set_publisherAssertions"
+
+class uddi2__set_USCOREpublisherAssertions
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__publisherAssertion* with length 0..unbounded
+    std::vector<uddi2__publisherAssertion*> publisherAssertion             0;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__set_USCOREpublisherAssertions(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__set_USCOREpublisherAssertions(struct soap*, std::vector<uddi2__publisherAssertion*> publisherAssertions);
+/// Member declared in uddi2-typemap.dat
+    uddi2__publisherAssertions* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"validate_values"
+
+class uddi2__validate_USCOREvalues
+{ public:
+// CHOICE OF ELEMENTS:
+/// Vector of uddi2__businessEntity* with length 0..unbounded
+    std::vector<uddi2__businessEntity* > businessEntity                 0;
+/// Vector of uddi2__businessService* with length 0..unbounded
+    std::vector<uddi2__businessService*> businessService                0;
+/// Vector of uddi2__tModel* with length 0..unbounded
+    std::vector<uddi2__tModel*         > tModel                         0;
+// END CHOICE
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"assertionStatusReport"
+
+class uddi2__assertionStatusReport
+{ public:
+/// Vector of uddi2__assertionStatusItem* with length 0..unbounded
+    std::vector<uddi2__assertionStatusItem*> assertionStatusItem            0;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"authToken"
+
+class uddi2__authToken
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"bindingDetail"
+
+class uddi2__bindingDetail
+{ public:
+/// Vector of uddi2__bindingTemplate* with length 0..unbounded
+    std::vector<uddi2__bindingTemplate*> bindingTemplate                0;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessDetail"
+
+class uddi2__businessDetail
+{ public:
+/// Vector of uddi2__businessEntity* with length 0..unbounded
+    std::vector<uddi2__businessEntity* > businessEntity                 0;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessDetailExt"
+
+class uddi2__businessDetailExt
+{ public:
+/// Vector of uddi2__businessEntityExt* with length 0..unbounded
+    std::vector<uddi2__businessEntityExt*> businessEntityExt              1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessList"
+
+class uddi2__businessList
+{ public:
+/// Element reference "urn:uddi-org:api_v2":businessInfos
+    uddi2__businessInfos*                businessInfos                  1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"publisherAssertions"
+
+class uddi2__publisherAssertions
+{ public:
+/// Vector of uddi2__publisherAssertion* with length 0..unbounded
+    std::vector<uddi2__publisherAssertion*> publisherAssertion             0;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute authorizedName of type xs:string
+   @char*                                authorizedName                 1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"registeredInfo"
+
+class uddi2__registeredInfo
+{ public:
+/// Element reference "urn:uddi-org:api_v2":businessInfos
+    uddi2__businessInfos*                businessInfos                  1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":tModelInfos
+    uddi2__tModelInfos*                  tModelInfos                    1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"relatedBusinessesList"
+
+class uddi2__relatedBusinessesList
+{ public:
+/// Element reference "urn:uddi-org:api_v2":businessKey
+    uddi2__businessKey                   businessKey                    1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":relatedBusinessInfos
+    uddi2__relatedBusinessInfos*         relatedBusinessInfos           1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"serviceDetail"
+
+class uddi2__serviceDetail
+{ public:
+/// Vector of uddi2__businessService* with length 0..unbounded
+    std::vector<uddi2__businessService*> businessService                0;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"serviceList"
+
+class uddi2__serviceList
+{ public:
+/// Element reference "urn:uddi-org:api_v2":serviceInfos
+    uddi2__serviceInfos*                 serviceInfos                   1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"tModelDetail"
+
+class uddi2__tModelDetail
+{ public:
+/// Vector of uddi2__tModel* with length 0..unbounded
+    std::vector<uddi2__tModel*         > tModel                         1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"tModelList"
+
+class uddi2__tModelList
+{ public:
+/// Element reference "urn:uddi-org:api_v2":tModelInfos
+    uddi2__tModelInfos*                  tModelInfos                    1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"accessPoint"
+
+class uddi2__accessPoint
+{ public:
+    char*                                __item                        ;
+/// Attribute URLType of type "urn:uddi-org:api_v2":URLType
+   @enum uddi2__URLType                  URLType                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"addressLine"
+
+class uddi2__addressLine
+{ public:
+    char*                                __item                        ;
+/// Attribute keyName of type xs:string
+   @char*                                keyName                        0;	///< Optional attribute
+/// Attribute keyValue of type xs:string
+   @char*                                keyValue                       0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"description"
+
+class uddi2__description
+{ public:
+    char*                                __item                        ;
+/// Attribute reference xml:lang
+   @xml__lang                            xml__lang_                     0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"discoveryURL"
+
+class uddi2__discoveryURL
+{ public:
+    char*                                __item                        ;
+/// Attribute useType of type xs:string
+   @char*                                useType                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"email"
+
+class uddi2__email
+{ public:
+    char*                                __item                        ;
+/// Attribute useType of type xs:string
+   @char*                                useType                        0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"errInfo"
+
+class uddi2__errInfo
+{ public:
+    char*                                __item                        ;
+/// Attribute errCode of type xs:string
+   @char*                                errCode                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"name"
+
+class uddi2__name
+{ public:
+    char*                                __item                        ;
+/// Attribute reference xml:lang
+   @xml__lang                            xml__lang_                     0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"phone"
+
+class uddi2__phone
+{ public:
+    char*                                __item                        ;
+/// Attribute useType of type xs:string
+   @char*                                useType                        0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/******************************************************************************\
+ *                                                                            *
+ * Services                                                                   *
+ *                                                                            *
+\******************************************************************************/
+
+//gsoap pub2 service name:	PublishSoap 
+//gsoap pub2 service type:	Publish 
+//gsoap pub2 service namespace:	urn:uddi-org:publication_v2 
+
+/** @mainpage UDDI_Publication_API_V2 Definitions
+
+@section UDDI_Publication_API_V2_documentation Documentation
+
+		Copyright (c) 2000 - 2002 by Accenture, Ariba, Inc., Commerce One, Inc. 
+		Fujitsu Limited, Hewlett-Packard Company, i2 Technologies, Inc., 
+		Intel Corporation, International Business Machines Corporation,  
+		Microsoft Corporation, Oracle Corporation, SAP AG, Sun Microsystems, Inc., 
+		and VeriSign, Inc.  All Rights Reserved.
+		
+		WSDL Service Interface for UDDI Publication API V2.0
+		
+		This WSDL document defines the publication API calls for interacting with 
+		the UDDI registry.  The complete UDDI API specification is available
+		at http://www.uddi.org/specification.html.
+	
+
+@section UDDI_Publication_API_V2_bindings Bindings
+  - @ref PublishSoap
+
+*/
+
+/**
+
+@page PublishSoap Binding "PublishSoap"
+
+@section PublishSoap_operations Operations of Binding  "PublishSoap"
+  - @ref __pub2__add_USCOREpublisherAssertions
+  - @ref __pub2__delete_USCOREbinding
+  - @ref __pub2__delete_USCOREbusiness
+  - @ref __pub2__delete_USCOREpublisherAssertions
+  - @ref __pub2__delete_USCOREservice
+  - @ref __pub2__delete_USCOREtModel
+  - @ref __pub2__discard_USCOREauthToken
+  - @ref __pub2__get_USCOREassertionStatusReport
+  - @ref __pub2__get_USCOREauthToken
+  - @ref __pub2__get_USCOREpublisherAssertions
+  - @ref __pub2__get_USCOREregisteredInfo
+  - @ref __pub2__save_USCOREbinding
+  - @ref __pub2__save_USCOREbusiness
+  - @ref __pub2__save_USCOREservice
+  - @ref __pub2__save_USCOREtModel
+  - @ref __pub2__set_USCOREpublisherAssertions
+
+@section PublishSoap_ports Endpoints of Binding  "PublishSoap"
+
+*/
+
+/******************************************************************************\
+ *                                                                            *
+ * SOAP Fault Detail                                                          *
+ *                                                                            *
+\******************************************************************************/
+
+/// The SOAP Fault Detail element contains one of the following types serialized
+// in the __type and fault fields of the SOAP_ENV__Detail struct (see docs)
+class _dispositionReport
+{ public:
+    uddi2__dispositionReport*           uddi2__dispositionReport_;
+    struct soap                         *soap                          ;
+};
+
+/******************************************************************************\
+ *                                                                            *
+ * PublishSoap                                                                *
+ *                                                                            *
+\******************************************************************************/
+
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__add_USCOREpublisherAssertions                                      *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__add_USCOREpublisherAssertions" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="add_publisherAssertions"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__add_USCOREpublisherAssertions(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__add_USCOREpublisherAssertions* uddi2__add_USCOREpublisherAssertions_,
+    // response parameters:
+    uddi2__dispositionReport*           uddi2__dispositionReport_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	add_USCOREpublisherAssertions document
+//gsoap pub2 service method-encoding:	add_USCOREpublisherAssertions literal
+//gsoap pub2 service method-action:	add_USCOREpublisherAssertions add_publisherAssertions
+//gsoap pub2 service method-fault:	add_USCOREpublisherAssertions _dispositionReport
+int __pub2__add_USCOREpublisherAssertions(
+    uddi2__add_USCOREpublisherAssertions* uddi2__add_USCOREpublisherAssertions_,
+    uddi2__dispositionReport*           uddi2__dispositionReport_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__delete_USCOREbinding                                               *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__delete_USCOREbinding" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="delete_binding"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__delete_USCOREbinding(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__delete_USCOREbinding*        uddi2__delete_USCOREbinding_,
+    // response parameters:
+    uddi2__dispositionReport*           uddi2__dispositionReport_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	delete_USCOREbinding document
+//gsoap pub2 service method-encoding:	delete_USCOREbinding literal
+//gsoap pub2 service method-action:	delete_USCOREbinding delete_binding
+//gsoap pub2 service method-fault:	delete_USCOREbinding _dispositionReport
+int __pub2__delete_USCOREbinding(
+    uddi2__delete_USCOREbinding*        uddi2__delete_USCOREbinding_,
+    uddi2__dispositionReport*           uddi2__dispositionReport_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__delete_USCOREbusiness                                              *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__delete_USCOREbusiness" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="delete_business"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__delete_USCOREbusiness(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__delete_USCOREbusiness*       uddi2__delete_USCOREbusiness_,
+    // response parameters:
+    uddi2__dispositionReport*           uddi2__dispositionReport_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	delete_USCOREbusiness document
+//gsoap pub2 service method-encoding:	delete_USCOREbusiness literal
+//gsoap pub2 service method-action:	delete_USCOREbusiness delete_business
+//gsoap pub2 service method-fault:	delete_USCOREbusiness _dispositionReport
+int __pub2__delete_USCOREbusiness(
+    uddi2__delete_USCOREbusiness*       uddi2__delete_USCOREbusiness_,
+    uddi2__dispositionReport*           uddi2__dispositionReport_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__delete_USCOREpublisherAssertions                                   *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__delete_USCOREpublisherAssertions" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="delete_publisherAssertions"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__delete_USCOREpublisherAssertions(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__delete_USCOREpublisherAssertions* uddi2__delete_USCOREpublisherAssertions_,
+    // response parameters:
+    uddi2__dispositionReport*           uddi2__dispositionReport_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	delete_USCOREpublisherAssertions document
+//gsoap pub2 service method-encoding:	delete_USCOREpublisherAssertions literal
+//gsoap pub2 service method-action:	delete_USCOREpublisherAssertions delete_publisherAssertions
+//gsoap pub2 service method-fault:	delete_USCOREpublisherAssertions _dispositionReport
+int __pub2__delete_USCOREpublisherAssertions(
+    uddi2__delete_USCOREpublisherAssertions* uddi2__delete_USCOREpublisherAssertions_,
+    uddi2__dispositionReport*           uddi2__dispositionReport_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__delete_USCOREservice                                               *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__delete_USCOREservice" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="delete_service"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__delete_USCOREservice(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__delete_USCOREservice*        uddi2__delete_USCOREservice_,
+    // response parameters:
+    uddi2__dispositionReport*           uddi2__dispositionReport_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	delete_USCOREservice document
+//gsoap pub2 service method-encoding:	delete_USCOREservice literal
+//gsoap pub2 service method-action:	delete_USCOREservice delete_service
+//gsoap pub2 service method-fault:	delete_USCOREservice _dispositionReport
+int __pub2__delete_USCOREservice(
+    uddi2__delete_USCOREservice*        uddi2__delete_USCOREservice_,
+    uddi2__dispositionReport*           uddi2__dispositionReport_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__delete_USCOREtModel                                                *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__delete_USCOREtModel" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="delete_tModel"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__delete_USCOREtModel(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__delete_USCOREtModel*         uddi2__delete_USCOREtModel_,
+    // response parameters:
+    uddi2__dispositionReport*           uddi2__dispositionReport_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	delete_USCOREtModel document
+//gsoap pub2 service method-encoding:	delete_USCOREtModel literal
+//gsoap pub2 service method-action:	delete_USCOREtModel delete_tModel
+//gsoap pub2 service method-fault:	delete_USCOREtModel _dispositionReport
+int __pub2__delete_USCOREtModel(
+    uddi2__delete_USCOREtModel*         uddi2__delete_USCOREtModel_,
+    uddi2__dispositionReport*           uddi2__dispositionReport_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__discard_USCOREauthToken                                            *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__discard_USCOREauthToken" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="discard_authToken"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__discard_USCOREauthToken(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__discard_USCOREauthToken*     uddi2__discard_USCOREauthToken_,
+    // response parameters:
+    uddi2__dispositionReport*           uddi2__dispositionReport_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	discard_USCOREauthToken document
+//gsoap pub2 service method-encoding:	discard_USCOREauthToken literal
+//gsoap pub2 service method-action:	discard_USCOREauthToken discard_authToken
+//gsoap pub2 service method-fault:	discard_USCOREauthToken _dispositionReport
+int __pub2__discard_USCOREauthToken(
+    uddi2__discard_USCOREauthToken*     uddi2__discard_USCOREauthToken_,
+    uddi2__dispositionReport*           uddi2__dispositionReport_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__get_USCOREassertionStatusReport                                    *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__get_USCOREassertionStatusReport" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="get_assertionStatusReport"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__get_USCOREassertionStatusReport(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__get_USCOREassertionStatusReport* uddi2__get_USCOREassertionStatusReport_,
+    // response parameters:
+    uddi2__assertionStatusReport*       uddi2__assertionStatusReport_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	get_USCOREassertionStatusReport document
+//gsoap pub2 service method-encoding:	get_USCOREassertionStatusReport literal
+//gsoap pub2 service method-action:	get_USCOREassertionStatusReport get_assertionStatusReport
+//gsoap pub2 service method-fault:	get_USCOREassertionStatusReport _dispositionReport
+int __pub2__get_USCOREassertionStatusReport(
+    uddi2__get_USCOREassertionStatusReport* uddi2__get_USCOREassertionStatusReport_,
+    uddi2__assertionStatusReport*       uddi2__assertionStatusReport_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__get_USCOREauthToken                                                *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__get_USCOREauthToken" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="get_authToken"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__get_USCOREauthToken(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__get_USCOREauthToken*         uddi2__get_USCOREauthToken_,
+    // response parameters:
+    uddi2__authToken*                   uddi2__authToken_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	get_USCOREauthToken document
+//gsoap pub2 service method-encoding:	get_USCOREauthToken literal
+//gsoap pub2 service method-action:	get_USCOREauthToken get_authToken
+//gsoap pub2 service method-fault:	get_USCOREauthToken _dispositionReport
+int __pub2__get_USCOREauthToken(
+    uddi2__get_USCOREauthToken*         uddi2__get_USCOREauthToken_,
+    uddi2__authToken*                   uddi2__authToken_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__get_USCOREpublisherAssertions                                      *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__get_USCOREpublisherAssertions" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="get_publisherAssertions"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__get_USCOREpublisherAssertions(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__get_USCOREpublisherAssertions* uddi2__get_USCOREpublisherAssertions_,
+    // response parameters:
+    uddi2__publisherAssertions*         uddi2__publisherAssertions_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	get_USCOREpublisherAssertions document
+//gsoap pub2 service method-encoding:	get_USCOREpublisherAssertions literal
+//gsoap pub2 service method-action:	get_USCOREpublisherAssertions get_publisherAssertions
+//gsoap pub2 service method-fault:	get_USCOREpublisherAssertions _dispositionReport
+int __pub2__get_USCOREpublisherAssertions(
+    uddi2__get_USCOREpublisherAssertions* uddi2__get_USCOREpublisherAssertions_,
+    uddi2__publisherAssertions*         uddi2__publisherAssertions_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__get_USCOREregisteredInfo                                           *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__get_USCOREregisteredInfo" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="get_registeredInfo"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__get_USCOREregisteredInfo(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__get_USCOREregisteredInfo*    uddi2__get_USCOREregisteredInfo_,
+    // response parameters:
+    uddi2__registeredInfo*              uddi2__registeredInfo_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	get_USCOREregisteredInfo document
+//gsoap pub2 service method-encoding:	get_USCOREregisteredInfo literal
+//gsoap pub2 service method-action:	get_USCOREregisteredInfo get_registeredInfo
+//gsoap pub2 service method-fault:	get_USCOREregisteredInfo _dispositionReport
+int __pub2__get_USCOREregisteredInfo(
+    uddi2__get_USCOREregisteredInfo*    uddi2__get_USCOREregisteredInfo_,
+    uddi2__registeredInfo*              uddi2__registeredInfo_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__save_USCOREbinding                                                 *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__save_USCOREbinding" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="save_binding"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__save_USCOREbinding(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__save_USCOREbinding*          uddi2__save_USCOREbinding_,
+    // response parameters:
+    uddi2__bindingDetail*               uddi2__bindingDetail_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	save_USCOREbinding document
+//gsoap pub2 service method-encoding:	save_USCOREbinding literal
+//gsoap pub2 service method-action:	save_USCOREbinding save_binding
+//gsoap pub2 service method-fault:	save_USCOREbinding _dispositionReport
+int __pub2__save_USCOREbinding(
+    uddi2__save_USCOREbinding*          uddi2__save_USCOREbinding_,
+    uddi2__bindingDetail*               uddi2__bindingDetail_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__save_USCOREbusiness                                                *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__save_USCOREbusiness" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="save_business"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__save_USCOREbusiness(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__save_USCOREbusiness*         uddi2__save_USCOREbusiness_,
+    // response parameters:
+    uddi2__businessDetail*              uddi2__businessDetail_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	save_USCOREbusiness document
+//gsoap pub2 service method-encoding:	save_USCOREbusiness literal
+//gsoap pub2 service method-action:	save_USCOREbusiness save_business
+//gsoap pub2 service method-fault:	save_USCOREbusiness _dispositionReport
+int __pub2__save_USCOREbusiness(
+    uddi2__save_USCOREbusiness*         uddi2__save_USCOREbusiness_,
+    uddi2__businessDetail*              uddi2__businessDetail_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__save_USCOREservice                                                 *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__save_USCOREservice" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="save_service"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__save_USCOREservice(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__save_USCOREservice*          uddi2__save_USCOREservice_,
+    // response parameters:
+    uddi2__serviceDetail*               uddi2__serviceDetail_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	save_USCOREservice document
+//gsoap pub2 service method-encoding:	save_USCOREservice literal
+//gsoap pub2 service method-action:	save_USCOREservice save_service
+//gsoap pub2 service method-fault:	save_USCOREservice _dispositionReport
+int __pub2__save_USCOREservice(
+    uddi2__save_USCOREservice*          uddi2__save_USCOREservice_,
+    uddi2__serviceDetail*               uddi2__serviceDetail_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__save_USCOREtModel                                                  *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__save_USCOREtModel" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="save_tModel"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__save_USCOREtModel(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__save_USCOREtModel*           uddi2__save_USCOREtModel_,
+    // response parameters:
+    uddi2__tModelDetail*                uddi2__tModelDetail_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	save_USCOREtModel document
+//gsoap pub2 service method-encoding:	save_USCOREtModel literal
+//gsoap pub2 service method-action:	save_USCOREtModel save_tModel
+//gsoap pub2 service method-fault:	save_USCOREtModel _dispositionReport
+int __pub2__save_USCOREtModel(
+    uddi2__save_USCOREtModel*           uddi2__save_USCOREtModel_,
+    uddi2__tModelDetail*                uddi2__tModelDetail_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__set_USCOREpublisherAssertions                                      *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__set_USCOREpublisherAssertions" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="set_publisherAssertions"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__set_USCOREpublisherAssertions(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__set_USCOREpublisherAssertions* uddi2__set_USCOREpublisherAssertions_,
+    // response parameters:
+    uddi2__publisherAssertions*         uddi2__publisherAssertions_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	set_USCOREpublisherAssertions document
+//gsoap pub2 service method-encoding:	set_USCOREpublisherAssertions literal
+//gsoap pub2 service method-action:	set_USCOREpublisherAssertions set_publisherAssertions
+//gsoap pub2 service method-fault:	set_USCOREpublisherAssertions _dispositionReport
+int __pub2__set_USCOREpublisherAssertions(
+    uddi2__set_USCOREpublisherAssertions* uddi2__set_USCOREpublisherAssertions_,
+    uddi2__publisherAssertions*         uddi2__publisherAssertions_ ///< response parameter
+);
+
+/* End of publish_v2.h */
diff --git a/uddi2/publish_v2.wsdl b/uddi2/publish_v2.wsdl
new file mode 100644
index 0000000..9f1ac41
--- /dev/null
+++ b/uddi2/publish_v2.wsdl
@@ -0,0 +1,378 @@
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:uddi-org:publication_v2" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:uddi="urn:uddi-org:api_v2" targetNamespace="urn:uddi-org:publication_v2" name="UDDI_Publication_API_V2">
+	<documentation>
+		Copyright (c) 2000 - 2002 by Accenture, Ariba, Inc., Commerce One, Inc. 
+		Fujitsu Limited, Hewlett-Packard Company, i2 Technologies, Inc., 
+		Intel Corporation, International Business Machines Corporation,  
+		Microsoft Corporation, Oracle Corporation, SAP AG, Sun Microsystems, Inc., 
+		and VeriSign, Inc.  All Rights Reserved.
+		
+		WSDL Service Interface for UDDI Publication API V2.0
+		
+		This WSDL document defines the publication API calls for interacting with 
+		the UDDI registry.  The complete UDDI API specification is available
+		at http://www.uddi.org/specification.html.
+	</documentation> 
+	<types>
+		<xsd:schema targetNamespace="urn:uddi-org:publication_v2" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+			<xsd:import namespace="urn:uddi-org:api_v2" schemaLocation="uddi_v2.xsd"/>
+		</xsd:schema>
+	</types>
+	<message name="add_publisherAssertions">
+		<part name="body" element="uddi:add_publisherAssertions"/>
+	</message>
+	<message name="assertionStatusReport">
+		<part name="body" element="uddi:assertionStatusReport"/>
+	</message>
+	<message name="authToken">
+		<part name="body" element="uddi:authToken"/>
+	</message>
+	<message name="bindingDetail">
+		<part name="body" element="uddi:bindingDetail"/>
+	</message>
+	<message name="businessDetail">
+		<part name="body" element="uddi:businessDetail"/>
+	</message>
+	<message name="delete_binding">
+		<part name="body" element="uddi:delete_binding"/>
+	</message>
+	<message name="delete_business">
+		<part name="body" element="uddi:delete_business"/>
+	</message>
+	<message name="delete_publisherAssertions">
+		<part name="body" element="uddi:delete_publisherAssertions"/>
+	</message>
+	<message name="delete_service">
+		<part name="body" element="uddi:delete_service"/>
+	</message>
+	<message name="delete_tModel">
+		<part name="body" element="uddi:delete_tModel"/>
+	</message>
+	<message name="discard_authToken">
+		<part name="body" element="uddi:discard_authToken"/>
+	</message>
+	<message name="dispositionReport">
+		<part name="body" element="uddi:dispositionReport"/>
+	</message>
+	<message name="get_assertionStatusReport">
+		<part name="body" element="uddi:get_assertionStatusReport"/>
+	</message>
+	<message name="get_authToken">
+		<part name="body" element="uddi:get_authToken"/>
+	</message>
+	<message name="get_publisherAssertions">
+		<part name="body" element="uddi:get_publisherAssertions"/>
+	</message>
+	<message name="get_registeredInfo">
+		<part name="body" element="uddi:get_registeredInfo"/>
+	</message>
+	<message name="publisherAssertions">
+		<part name="body" element="uddi:publisherAssertions"/>
+	</message>
+	<message name="registeredInfo">
+		<part name="body" element="uddi:registeredInfo"/>
+	</message>
+	<message name="save_binding">
+		<part name="body" element="uddi:save_binding"/>
+	</message>
+	<message name="save_business">
+		<part name="body" element="uddi:save_business"/>
+	</message>
+	<message name="save_service">
+		<part name="body" element="uddi:save_service"/>
+	</message>
+	<message name="save_tModel">
+		<part name="body" element="uddi:save_tModel"/>
+	</message>
+	<message name="serviceDetail">
+		<part name="body" element="uddi:serviceDetail"/>
+	</message>
+	<message name="set_publisherAssertions">
+		<part name="body" element="uddi:set_publisherAssertions"/>
+	</message>
+	<message name="tModelDetail">
+		<part name="body" element="uddi:tModelDetail"/>
+	</message>
+	<portType name="Publish">
+		<documentation>
+			This portType defines all of the UDDI publish operations.
+	  </documentation>
+		<operation name="add_publisherAssertions">
+			<input message="tns:add_publisherAssertions"/>
+			<output message="tns:dispositionReport"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+		<operation name="delete_binding">
+			<input message="tns:delete_binding"/>
+			<output message="tns:dispositionReport"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+		<operation name="delete_business">
+			<input message="tns:delete_business"/>
+			<output message="tns:dispositionReport"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+		<operation name="delete_publisherAssertions">
+			<input message="tns:delete_publisherAssertions"/>
+			<output message="tns:dispositionReport"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+		<operation name="delete_service">
+			<input message="tns:delete_service"/>
+			<output message="tns:dispositionReport"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+		<operation name="delete_tModel">
+			<input message="tns:delete_tModel"/>
+			<output message="tns:dispositionReport"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+		<operation name="discard_authToken">
+			<input message="tns:discard_authToken"/>
+			<output message="tns:dispositionReport"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+		<operation name="get_assertionStatusReport">
+			<input message="tns:get_assertionStatusReport"/>
+			<output message="tns:assertionStatusReport"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+		<operation name="get_authToken">
+			<input message="tns:get_authToken"/>
+			<output message="tns:authToken"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+		<operation name="get_publisherAssertions">
+			<input message="tns:get_publisherAssertions"/>
+			<output message="tns:publisherAssertions"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+		<operation name="get_registeredInfo">
+			<input message="tns:get_registeredInfo"/>
+			<output message="tns:registeredInfo"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+		<operation name="save_binding">
+			<input message="tns:save_binding"/>
+			<output message="tns:bindingDetail"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+		<operation name="save_business">
+			<input message="tns:save_business"/>
+			<output message="tns:businessDetail"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+		<operation name="save_service">
+			<input message="tns:save_service"/>
+			<output message="tns:serviceDetail"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+		<operation name="save_tModel">
+			<input message="tns:save_tModel"/>
+			<output message="tns:tModelDetail"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+		<operation name="set_publisherAssertions">
+			<input message="tns:set_publisherAssertions"/>
+			<output message="tns:publisherAssertions"/>
+			<fault name="error" message="tns:dispositionReport"/>
+		</operation>
+	</portType>
+	<binding name="PublishSoap" type="tns:Publish">
+		<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+		<documentation>
+		  This is the SOAP binding for the UDDI publish operations.
+		</documentation>
+		<operation name="add_publisherAssertions">
+			<soap:operation soapAction="add_publisherAssertions" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="delete_binding">
+			<soap:operation soapAction="delete_binding" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="delete_business">
+			<soap:operation soapAction="delete_business" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="delete_publisherAssertions">
+			<soap:operation soapAction="delete_publisherAssertions" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="delete_service">
+			<soap:operation soapAction="delete_service" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="delete_tModel">
+			<soap:operation soapAction="delete_tModel" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="discard_authToken">
+			<soap:operation soapAction="discard_authToken" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="get_assertionStatusReport">
+			<soap:operation soapAction="get_assertionStatusReport" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="get_authToken">
+			<soap:operation soapAction="get_authToken" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="get_publisherAssertions">
+			<soap:operation soapAction="get_publisherAssertions" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="get_registeredInfo">
+			<soap:operation soapAction="get_registeredInfo" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="save_binding">
+			<soap:operation soapAction="save_binding" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="save_business">
+			<soap:operation soapAction="save_business" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="save_service">
+			<soap:operation soapAction="save_service" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="save_tModel">
+			<soap:operation soapAction="save_tModel" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="set_publisherAssertions">
+			<soap:operation soapAction="set_publisherAssertions" style="document"/>
+			<input>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</input>
+			<output>
+				<soap:body parts="body" use="literal" namespace="urn:uddi-org:api_v2"/>
+			</output>
+			<fault name="error">
+				<soap:fault name="error" use="literal"/>
+			</fault>
+		</operation>
+	</binding>
+</definitions>
diff --git a/uddi2/uddi2-typemap.dat b/uddi2/uddi2-typemap.dat
new file mode 100644
index 0000000..22047c0
--- /dev/null
+++ b/uddi2/uddi2-typemap.dat
@@ -0,0 +1,1956 @@
+#	uddi2map.dat
+#
+#	gSOAP type map bindings for UDDI v2 to run the gSOAP WSDL tool 'wsdl2h'
+#
+#	Included full documentation and examples of the gSOAP UDDI v2 API
+#
+#-------------------------------------------------------------------------------
+#gSOAP XML Web services tools
+#Copyright (C) 2004-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+#This software is released under one of the following two licenses:
+#GPL or Genivia's license for commercial use.
+#-------------------------------------------------------------------------------
+#GPL license.
+#
+#This program is free software; you can redistribute it and/or modify it under
+#the terms of the GNU General Public License as published by the Free Software
+#Foundation; either version 2 of the License, or (at your option) any later
+#version.
+#
+#This program is distributed in the hope that it will be useful, but WITHOUT ANY
+#WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+#PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+#You should have received a copy of the GNU General Public License along with
+#this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+#Place, Suite 330, Boston, MA 02111-1307 USA
+#
+#Author contact information:
+#engelen@genivia.com / engelen@acm.org
+#-------------------------------------------------------------------------------
+#A commercial use license is available from Genivia, Inc., contact@genivia.com
+#-------------------------------------------------------------------------------
+
+[
+/** @mainpage gSOAP UDDI v2
+
+Universal Description, Discovery and Integration, or UDDI, is the name of a
+group of web-based registries that expose information about a business or other
+entity and its technical interfaces.
+
+See the UDDI v2 specification @url http://uddi.org/pubs/ProgrammersAPI_v2.htm
+for more details.
+
+@section UDDI2_CLASSES Classes
+
+See Related Pages for examples.
+
+UDDI Inquire classes
+
+- @ref uddi2__find_USCOREbinding
+- @ref uddi2__find_USCOREbusiness
+- @ref uddi2__find_USCORErelatedBusinesses
+- @ref uddi2__find_USCOREservice
+- @ref uddi2__find_USCOREtModel
+- @ref uddi2__get_USCOREbindingDetail
+- @ref uddi2__get_USCOREbusinessDetail
+- @ref uddi2__get_USCOREbusinessDetailExt
+- @ref uddi2__get_USCOREserviceDetail
+- @ref uddi2__get_USCOREtModelDetail
+
+UDDI Publish classes
+
+- @ref uddi2__add_USCOREpublisherAssertions
+- @ref uddi2__delete_USCOREbinding
+- @ref uddi2__delete_USCOREbusiness
+- @ref uddi2__delete_USCOREservice
+- @ref uddi2__delete_USCOREtModel
+- @ref uddi2__delete_USCOREpublisherAssertions
+- @ref uddi2__discard_USCOREauthToken
+- @ref uddi2__get_USCOREassertionStatusReport
+- @ref uddi2__get_USCOREauthToken
+- @ref uddi2__get_USCOREpublisherAssertions
+- @ref uddi2__get_USCOREregisteredInfo
+- @ref uddi2__save_USCOREbinding
+- @ref uddi2__save_USCOREbusiness
+- @ref uddi2__save_USCOREservice
+- @ref uddi2__save_USCOREtModel
+- @ref uddi2__set_USCOREpublisherAssertions
+
+@section UDDI2_BINDINGS Binding Reference
+
+- @ref InquireSoap
+- @ref PublishSoap
+
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_binding
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__find_USCOREbinding
+@brief
+
+Represents a request to locate bindings that meet the specified requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137712
+*/
+
+/**
+@fn uddi2__find_USCOREbinding::uddi2__find_USCOREbinding(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREbinding class.
+*/
+
+/**
+@fn uddi2__find_USCOREbinding::uddi2__find_USCOREbinding(struct soap *soap, const char *tModelKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKey string
+
+Creates an instance of the find_USCOREbinding class using the specified tModel
+key.
+*/
+
+/**
+@fn uddi2__find_USCOREbinding::uddi2__find_USCOREbinding(struct soap *soap, std::vector<char*> tModelKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKeys collection of tModel key strings
+
+Creates an instance of the find_USCOREbinding class using the specified tModel
+keys.
+*/
+
+/**
+@fn uddi2__bindingDetail* uddi2__find_USCOREbinding::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__bindingDetail object or NULL on error
+
+Send a request to a UDDI server to find binding details.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_business
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__find_USCOREbusiness
+@brief
+
+Represents a request to locate businesses that meet specific requirements. When
+the send method is called, the instance returns a uddi2__businessList object
+that contains a list of business that matched the search criteria.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137713
+
+See also @ref example2.
+*/
+
+/**
+@fn uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREbusiness class.
+*/
+
+/**
+@fn uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness(struct soap *soap, const char *name)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREbusiness class using the specified name
+of the requested business.
+*/
+
+/**
+@fn uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness(struct soap *soap, std::vector<uddi2__keyedReference*> keyedReferences)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREbusiness class using the specified
+category references.
+*/
+
+/**
+@fn uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness(struct soap *soap, std::vector<char*> tModelKeys)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREbusiness class using the specified tModel
+keys.
+*/
+
+/**
+@fn uddi2__businessList *uddi2__find_USCOREbusiness::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__businessList object or NULL on error
+
+Send a request to a UDDI server to find a list of businesses.
+
+See also @ref example2.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_relatedBusinesses
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__find_USCORErelatedBusinesses
+@brief
+
+Represents a request to locate businesses that are related to a specific
+business. When the send method is called, the instance returns a
+uddi2__relatedBusinessList object that contains a list of business that matched
+the relationship set.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137714
+*/
+
+/**
+@fn uddi2__find_USCORErelatedBusinesses::uddi2__find_USCORErelatedBusinesses(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCORErelatedBusiness class.
+*/
+
+/**
+@fn uddi2__find_USCORErelatedBusinesses::uddi2__find_USCORErelatedBusinesses(struct soap *soap, const char *businessKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKey string
+
+Creates an instance of the find_USCORErelatedBusiness class using the specified
+business key.
+*/
+
+/**
+@fn uddi2__relatedBusinessesList *uddi2__find_USCORErelatedBusinesses::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__relatedBusinessList object or NULL on error
+
+Send a request to a UDDI server to find a list of related businesses.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_service
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__find_USCOREservice
+@brief
+
+Represents a request to locate services that meet the specified requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137715
+
+See also @ref example1.
+*/
+
+/**
+@fn uddi2__find_USCOREservice::uddi2__find_USCOREservice(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREservice class.
+*/
+
+/**
+@fn uddi2__find_USCOREservice::uddi2__find_USCOREservice(struct soap *soap, const char *name)
+@brief
+@param[in] soap gSOAP context
+@param[in] name of the service
+
+Creates an instance of the find_USCOREservice class using the specified name.
+*/
+
+/**
+@fn uddi2__find_USCOREservice::uddi2__find_USCOREservice(struct soap *soap, std::vector<uddi2__keyedReference*> keyedReferences)
+@brief
+@param[in] soap gSOAP context
+@param[in] keyedReferences collection of category keys
+
+Creates an instance of the find_USCOREservice class using the specified
+category keys.
+*/
+
+/**
+@fn uddi2__find_USCOREservice::uddi2__find_USCOREservice(struct soap *soap, std::vector<char*> tModelKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKeys collection of tModel key strings
+
+Creates an instance of the find_USCOREservice class using the specified tModel
+keys.
+*/
+
+/**
+@fn uddi2__serviceList* uddi2__find_USCOREservice::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__serviceList object or NULL on error
+
+Send a request to a UDDI server to find a list of services.
+
+See also @ref example1.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_tModel
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__find_USCOREtModel
+@brief
+
+Represents a request to locate a list of tModel entries that match a set of
+specific criteria. The result of a search is a uddi2__tModelList object that
+contains information about registered tModel data that matches the criteria.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137716
+*/
+
+/**
+@fn uddi2__find_USCOREtModel::uddi2__find_USCOREtModel(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREtModel class.
+*/
+
+/**
+@fn uddi2__find_USCOREtModel::uddi2__find_USCOREtModel(struct soap *soap, const char *name)
+@brief
+@param[in] soap gSOAP context
+@param[in] name of the tModel
+
+Creates an instance of the find_USCOREtModel class using the specified tModel
+name.
+*/
+
+/**
+@fn uddi2__find_USCOREtModel::uddi2__find_USCOREtModel(struct soap *soap, std::vector<uddi2__keyedReference*> keyedReferences)
+@brief
+@param[in] soap gSOAP context
+@param[in] keyedReferences collection of category keys
+
+Creates an instance of the find_USCOREtModel class using the specified category
+keys.
+*/
+
+/**
+@fn uddi2__tModelList* uddi2__find_USCOREtModel::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__tModelList object or NULL on error
+
+Send a request to a UDDI server to find a tModelList.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_bindingDetail
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREbindingDetail
+@brief
+
+Represents a request to get binding details from a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137717
+*/
+
+/**
+@fn uddi2__get_USCOREbindingDetail::uddi2__get_USCOREbindingDetail(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREbindingDetail class.
+*/
+
+/**
+@fn uddi2__get_USCOREbindingDetail::uddi2__get_USCOREbindingDetail(struct soap *soap, const char *bindingKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] bindingKey string
+
+Creates an instance of the get_USCOREbindingDetail class using the specified
+binding key.
+*/
+
+/**
+@fn uddi2__get_USCOREbindingDetail::uddi2__get_USCOREbindingDetail(struct soap *soap, std::vector<char*> bindingKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] bindingKeys collection of key strings
+
+Creates an instance of the get_USCOREbindingDetail class using the specified
+collection of binding keys.
+*/
+
+/**
+@fn uddi2__bindingDetail* uddi2__get_USCOREbindingDetail::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__bindingDetail object or NULL on error
+
+Send a request to a UDDI server to get the binding details.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_businessDetail
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREbusinessDetail
+@brief
+
+Represents a request to get business details from a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137718 
+*/
+
+/**
+@fn uddi2__get_USCOREbusinessDetail::uddi2__get_USCOREbusinessDetail(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREbusinessDetail class.
+*/
+
+/**
+@fn uddi2__get_USCOREbusinessDetail::uddi2__get_USCOREbusinessDetail(struct soap *soap, const char *businessKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKey string
+
+Creates an instance of the get_USCOREbusinessDetail class using the specified
+business key.
+*/
+
+/**
+@fn uddi2__get_USCOREbusinessDetail::uddi2__get_USCOREbusinessDetail(struct soap *soap, std::vector<char*> businessKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKeys collection of key strings
+
+Creates an instance of the get_USCOREbusinessDetail class using the specified
+collection of business keys.
+*/
+
+/**
+@fn uddi2__businessDetail* uddi2__get_USCOREbusinessDetail::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__businessDetail object or NULL on error
+
+Send a request to a UDDI server to get the business details.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_businessDetailExt
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREbusinessDetailExt
+@brief
+
+Represents a request to get business details from a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137719
+*/
+
+/**
+@fn uddi2__get_USCOREbusinessDetailExt::uddi2__get_USCOREbusinessDetailExt(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREbusinessDetailExt class.
+*/
+
+/**
+@fn uddi2__get_USCOREbusinessDetailExt::uddi2__get_USCOREbusinessDetailExt(struct soap *soap, const char *businessKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKey string
+
+Creates an instance of the get_USCOREbusinessDetailExt class using the specified
+business key.
+*/
+
+/**
+@fn uddi2__get_USCOREbusinessDetailExt::uddi2__get_USCOREbusinessDetailExt(struct soap *soap, std::vector<char*> businessKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKeys collection of key strings
+
+Creates an instance of the get_USCOREbusinessDetailExt class using the specified
+collection of business keys.
+*/
+
+/**
+@fn uddi2__businessDetailExt* uddi2__get_USCOREbusinessDetailExt::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__businessDetailExt object or NULL on error
+
+Send a request to a UDDI server to get the business details.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_serviceDetail
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREserviceDetail
+@brief
+
+Represents a request to get service details from a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137720
+*/
+
+/**
+@fn uddi2__get_USCOREserviceDetail::uddi2__get_USCOREserviceDetail(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREserviceDetail class.
+*/
+
+/**
+@fn uddi2__get_USCOREserviceDetail::uddi2__get_USCOREserviceDetail(struct soap *soap, const char *serviceKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] serviceKey string
+
+Creates an instance of the get_USCOREserviceDetail class using the specified
+service key.
+*/
+
+/**
+@fn uddi2__get_USCOREserviceDetail::uddi2__get_USCOREserviceDetail(struct soap *soap, std::vector<char*> serviceKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] serviceKeys collection of key strings
+
+Creates an instance of the get_USCOREserviceDetail class using the specified
+collection of service keys.
+*/
+
+/**
+@fn uddi2__serviceDetail* uddi2__get_USCOREserviceDetail::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__serviceDetail object or NULL on error
+
+Send a request to a UDDI server to get the service details.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_tModelDetail
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREtModelDetail
+@brief
+
+Represents a request to get tModel details from a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137721
+*/
+
+/**
+@fn uddi2__get_USCOREtModelDetail::uddi2__get_USCOREtModelDetail(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREtModelDetail class.
+*/
+
+/**
+@fn uddi2__get_USCOREtModelDetail::uddi2__get_USCOREtModelDetail(struct soap *soap, const char *tModelKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKey string
+
+Creates an instance of the get_USCOREtModelDetail class using the specified
+tModel key.
+*/
+
+/**
+@fn uddi2__get_USCOREtModelDetail::uddi2__get_USCOREtModelDetail(struct soap *soap, std::vector<char*> tModelKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKeys collection of key strings
+
+Creates an instance of the get_USCOREtModelDetail class using the specified
+collection of tModel keys.
+*/
+
+/**
+@fn uddi2__tModelDetail* uddi2__get_USCOREtModelDetail::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__tModelDetail object or NULL on error
+
+Send a request to a UDDI server to get the tModel details.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:add_publisherAssertions
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__add_USCOREpublisherAssertions
+@brief
+
+Represents a request to add one or more publisher assertions to the assertion
+collection for an individual publisher.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137731
+*/
+
+/**
+@fn uddi2__add_USCOREpublisherAssertions::uddi2__add_USCOREpublisherAssertions(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the add_USCOREpublisherAssertions class.
+*/
+
+/**
+@fn uddi2__add_USCOREpublisherAssertions::uddi2__add_USCOREpublisherAssertions(struct soap *soap, std::vector<uddi2__publisherAssertion*> publisherAssertions)
+@brief
+@param[in] soap gSOAP context
+@param[in] publisherAssertions collection of publisher assertions
+
+Creates an instance of the add_USCOREpublisherAssertions class using the
+specified publisher assertions.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__add_USCOREpublisherAssertions::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI server to add one or more publisher assertions to the
+assertion collection for an individual publisher.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_binding
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__delete_USCOREbinding
+@brief
+
+Represents a request to delete a binding that meets the specified requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137732
+*/
+
+/**
+@fn uddi2__delete_USCOREbinding::uddi2__delete_USCOREbinding(struct soap *soap)
+@brief
+
+Creates an instance of the delete_USCOREbinding class.
+*/
+
+/**
+@fn uddi2__delete_USCOREbinding::uddi2__delete_USCOREbinding(struct soap *soap, const char *bindingKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] bindingKey a binding key string
+
+Creates an instance of the delete_USCOREbinding class.
+*/
+
+/**
+@fn uddi2__delete_USCOREbinding::uddi2__delete_USCOREbinding(struct soap *soap, std::vector<char*> bindingKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] bindingKeys collection of binding keys
+
+Creates an instance of the delete_USCOREbinding class using the specified
+binding keys.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__delete_USCOREbinding::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI service to delete a binding that meets the specified
+requirements.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_business
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__delete_USCOREbusiness
+@brief
+
+Represents a request to delete a business that meets the specified requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137733
+*/
+
+/**
+@fn uddi2__delete_USCOREbusiness::uddi2__delete_USCOREbusiness(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the delete_USCOREbusiness class.
+*/
+
+/**
+@fn uddi2__delete_USCOREbusiness::uddi2__delete_USCOREbusiness(struct soap *soap, const char *businessKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKey a business key string
+
+Creates an instance of the delete_USCOREbusiness class using the specified
+business key.
+*/
+
+/**
+@fn uddi2__delete_USCOREbusiness::uddi2__delete_USCOREbusiness(struct soap *soap, std::vector<char*> businessKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKeys collection of business keys
+
+Creates an instance of the delete_USCOREbusiness class using the specified
+business keys.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__delete_USCOREbusiness::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI service to delete a business that meets the specified
+requirements.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_service
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__delete_USCOREservice
+@brief
+
+Represents a request to delete a service that meets the specified requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137735
+*/
+
+/**
+@fn uddi2__delete_USCOREservice::uddi2__delete_USCOREservice(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the delete_USCOREservice class.
+*/
+
+/**
+@fn uddi2__delete_USCOREservice::uddi2__delete_USCOREservice(struct soap *soap, const char *serviceKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] serviceKey a service key string
+
+Creates an instance of the delete_USCOREservice class using the specified
+service key.
+*/
+
+/**
+@fn uddi2__delete_USCOREservice::uddi2__delete_USCOREservice(struct soap *soap, std::vector<char*> serviceKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] serviceKeys collection of service keys
+
+Creates an instance of the delete_USCOREservice class using the specified
+service keys.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__delete_USCOREservice::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI service to delete a service that meets the specified
+requirements.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_tModel
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__delete_USCOREtModel
+@brief
+
+Represents a request to delete a tModel that meets the specified requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137736
+*/
+
+/**
+@fn uddi2__delete_USCOREtModel::uddi2__delete_USCOREtModel(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the delete_USCOREtModel class.
+*/
+
+/**
+@fn uddi2__delete_USCOREtModel::uddi2__delete_USCOREtModel(struct soap *soap, const char *tModelKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKey a tModel key string
+
+Creates an instance of the delete_USCOREtModel class using the specified
+tModel key.
+*/
+
+/**
+@fn uddi2__delete_USCOREtModel::uddi2__delete_USCOREtModel(struct soap *soap, std::vector<char*> tModelKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKeys collection of tModel keys
+
+Creates an instance of the delete_USCOREtModel class using the specified
+tModel keys.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__delete_USCOREtModel::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI service to delete a tModel that meets the specified
+requirements.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_publisherAssertions
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__delete_USCOREpublisherAssertions
+@brief
+
+Represents a request to delete publisher assertions meeting the specified
+requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137734
+*/
+
+/**
+@fn uddi2__delete_USCOREpublisherAssertions::uddi2__delete_USCOREpublisherAssertions(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the delete_USCOREpublisherAssertions class.
+*/
+
+/**
+@fn uddi2__delete_USCOREpublisherAssertions::uddi2__delete_USCOREpublisherAssertions(struct soap *soap, std::vector<uddi2__publisherAssertion*> publisherAssertions)
+@brief
+@param[in] soap gSOAP context
+@param[in] publisherAssertions a collection of publisher assertions
+
+Creates an instance of the delete_USCOREpublisherAssertions class using the
+specified collection of publisher assertions.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__delete_USCOREpublisherAssertions::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI service to delete publisher assertions meeting the
+specified requirements.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:discard_authToken
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__discard_USCOREauthToken
+@brief
+
+Represents a request to discard an authorization token obtained with the
+get_USCOREauthToken class.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137737
+*/
+
+/**
+@fn uddi2__discard_USCOREauthToken::uddi2__discard_USCOREauthToken(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the delete_USCOREauthToken class.
+*/
+
+/**
+@fn uddi2__discard_USCOREauthToken::uddi2__discard_USCOREauthToken(struct soap *soap, const char *authInfo)
+@brief
+@param[in] soap gSOAP context
+@param[in] authInfo authorization token provided by the UDDI server
+
+Creates an instance of the delete_USCOREauthToken class using the specified
+authentication token string.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__discard_USCOREauthToken::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI service to discard an authentication token.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_assertionStatusReport
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREassertionStatusReport
+@brief
+
+Provides the ability to determine the status of current and outstanding
+publisher assertions. The results can be restricted by setting the
+completionStatus property.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137738
+*/
+
+/**
+@fn uddi2__get_USCOREassertionStatusReport::uddi2__get_USCOREassertionStatusReport(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREassertionStatusReport class.
+*/
+
+/**
+@fn uddi2__get_USCOREassertionStatusReport::uddi2__get_USCOREassertionStatusReport(struct soap *soap, const char *completionStatus)
+@brief
+@param[in] soap gSOAP context
+@param[in] completionStatus completion status string
+
+Creates an instance of the get_USCOREassertionStatusReport class using the
+specified completion status.
+*/
+
+/**
+@fn uddi2__assertionStatusReport *uddi2__get_USCOREassertionStatusReport::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__assertionStatusReport object or NULL on error
+
+Send a request to a UDDI service to get the status of current and outstanding
+publisher assertions.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_authToken
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREauthToken
+@brief
+
+Represents a request to obtain an authorization token, which is represented by
+the uddi2__authToken class.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137739
+*/
+
+/**
+@fn uddi2__get_USCOREauthToken::uddi2__get_USCOREauthToken(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREauthToken class.
+*/
+
+/**
+@fn uddi2__get_USCOREauthToken::uddi2__get_USCOREauthToken(struct soap *soap, const char *userid, const char *passwd)
+@brief
+@param[in] soap gSOAP context
+@param[in] userid the user ID string
+@param[in] passwd the password string
+
+Creates an instance of the get_USCOREauthToken class using the specified user
+ID and password.
+*/
+
+/**
+@fn uddi2__authToken *uddi2__get_USCOREauthToken::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__authToken object or NULL on error
+
+Send a request to a UDDI service to get a authorization token given a user
+ID and password.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_publisherAssertions
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREpublisherAssertions
+@brief
+
+Represents a request to obtain the full set of publisher assertions that are
+associated with an individual publisher.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137740
+*/
+
+/**
+@fn uddi2__get_USCOREpublisherAssertions::uddi2__get_USCOREpublisherAssertions(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREpublisherAssetions class.
+*/
+
+/**
+@fn uddi2__publisherAssertions *uddi2__get_USCOREpublisherAssertions::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__publisherAssertions object or NULL on error
+
+Send a request to a UDDI service to get publisher assertions.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_registeredInfo
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREregisteredInfo
+@brief
+
+Represents a request to get all registered business entities and tModels
+controlled by an individual.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137741
+*/
+
+/**
+@fn uddi2__get_USCOREregisteredInfo::uddi2__get_USCOREregisteredInfo(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREregisteredInfo class.
+*/
+
+/**
+@fn uddi2__registeredInfo *uddi2__get_USCOREregisteredInfo::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__registeredInfo object or NULL on error
+
+Send a request to a UDDI service to get all registered business entities and
+tModels controlled by an individual.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:save_binding
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__save_USCOREbinding
+@brief
+
+Represents a request to post binding information on a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137742
+*/
+
+/**
+@fn uddi2__save_USCOREbinding::uddi2__save_USCOREbinding(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the save_USCOREbinding class.
+*/
+
+/**
+@fn uddi2__save_USCOREbinding::uddi2__save_USCOREbinding(struct soap *soap, uddi2__bindingTemplate &bindingTemplate)
+@brief
+@param[in] soap gSOAP context
+@param[in] bindingTemplate binding template
+
+Creates an instance of the save_USCOREbinding class using the specified binding
+template.
+*/
+
+/**
+@fn uddi2__save_USCOREbinding::uddi2__save_USCOREbinding(struct soap *soap, std::vector<uddi2__bindingTemplate*> bindingTemplates)
+@brief
+@param[in] soap gSOAP context
+@param[in] bindingTemplates collection of binding templates
+
+Creates an instance of the save_USCOREbinding class using the specified binding
+templates.
+*/
+
+/**
+@fn uddi2__bindingDetail *uddi2__save_USCOREbinding::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__bindingDetail object or NULL on error
+
+Send a request to a UDDI server to post binding information on the server.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:save_business
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__save_USCOREbusiness
+@brief
+
+Represents a request to post business information on a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137743
+*/
+
+/**
+@fn uddi2__save_USCOREbusiness::uddi2__save_USCOREbusiness(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the save_USCOREbusiness class.
+*/
+
+/**
+@fn uddi2__save_USCOREbusiness::uddi2__save_USCOREbusiness(struct soap *soap, uddi2__businessEntity &businessEntity)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessEntity business entity
+
+Creates an instance of the save_USCOREbusiness class using the specified
+business entity.
+*/
+
+/**
+@fn uddi2__save_USCOREbusiness::uddi2__save_USCOREbusiness(struct soap *soap, std::vector<uddi2__businessEntity*> businessEntities)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessEntities collection of business entities
+
+Creates an instance of the save_USCOREbusiness class using the specified
+business entities.
+*/
+
+/**
+@fn uddi2__businessDetail *uddi2__save_USCOREbusiness::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__businessDetail object or NULL on error
+
+Send a request to a UDDI server to post business information on the server.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:save_service
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__save_USCOREservice
+@brief
+
+Represents a request to post service information on a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137744
+*/
+
+/**
+@fn uddi2__save_USCOREservice::uddi2__save_USCOREservice(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the save_USCOREservice class.
+*/
+
+/**
+@fn uddi2__save_USCOREservice::uddi2__save_USCOREservice(struct soap *soap, uddi2__businessService &businessService)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessService business service
+
+Creates an instance of the save_USCOREservice class using the specified
+service.
+*/
+
+/**
+@fn uddi2__save_USCOREservice::uddi2__save_USCOREservice(struct soap *soap, std::vector<uddi2__businessService*> businessServices)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessServices collection of business services
+
+Creates an instance of the save_USCOREservice class using the specified
+services.
+*/
+
+/**
+@fn uddi2__serviceDetail *uddi2__save_USCOREservice::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__serviceDetail object or NULL on error
+
+Send a request to a UDDI server to post service information on the server.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:save_tModel
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__save_USCOREtModel
+@brief
+
+Represents a request to post tModel information on a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137745
+*/
+
+/**
+@fn uddi2__save_USCOREtModel::uddi2__save_USCOREtModel(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the save_USCOREtModel class.
+*/
+
+/**
+@fn uddi2__save_USCOREtModel::uddi2__save_USCOREtModel(struct soap *soap, uddi2__tModel &tModel)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModel a tModel
+
+Creates an instance of the save_USCOREtModel class using the specified
+tModel.
+*/
+
+/**
+@fn uddi2__save_USCOREtModel::uddi2__save_USCOREtModel(struct soap *soap, std::vector<uddi2__tModel*> tModels)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModels collection of tModels
+
+Creates an instance of the save_USCOREtModel class using the specified
+tModels.
+*/
+
+/**
+@fn uddi2__tModelDetail *uddi2__save_USCOREtModel::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__tModelDetail object or NULL on error
+
+Send a request to a UDDI server to post tModel information on the server.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:set_publisherAssertions
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__set_USCOREpublisherAssertions
+@brief
+
+Represents a request to modify the existing publisher assertions for an
+individual publisher.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137746
+*/
+
+/**
+@fn uddi2__set_USCOREpublisherAssertions::uddi2__set_USCOREpublisherAssertions(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the set_USCOREpublisherAssertions class.
+*/
+
+/**
+@fn uddi2__set_USCOREpublisherAssertions::uddi2__set_USCOREpublisherAssertions(struct soap *soap, std::vector<uddi2__publisherAssertion*> publisherAssertions)
+@brief
+@param[in] soap gSOAP context
+@param[in] publisherAssertions collection of publisher assertions
+
+Creates an instance of the set_USCOREpublisherAssertions class using the
+specified collection of publisher assertions.
+*/
+
+/**
+@fn uddi2__publisherAssertions *uddi2__set_USCOREpublisherAssertions::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__publisherAssertions object or NULL on error
+
+Send a request to a UDDI server to post tModel information on the server.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Code Examples
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@page example1 Code Example 1: Finding a service
+
+This example shows you how to find Web services. In this case, the example
+finds Web services with names that begin with the word "magic".
+
+@code
+#include "inqH.h"
+
+int main(int argc, char **argv)
+{ 
+  char *search_string = "magic";
+
+  if (argc > 1)
+    search_string = argv[1];
+
+  // Create a gSOAP context
+  struct soap *soap = soap_new();
+
+  // Create an object to find a business
+  uddi2__find_USCOREservice fs(soap, search_string);
+
+  // Send the request
+  uddi2__serviceList *sl = fs.send("http://uddi.xmethods.net/inquire");
+
+  // Check if result is OK
+  if (!sl)
+    soap_print_fault(soap, stderr);
+
+  // If OK, report the service name(s) and unique identification keys
+  else if (sl->serviceInfos)
+  {
+    std::cout << "Search results on " << search_string << ":" << std::endl << std::endl;
+
+    for (std::vector<uddi2__serviceInfo*>::const_iterator si = sl->serviceInfos->serviceInfo.begin(); si != sl->serviceInfos->serviceInfo.end(); ++si)
+    {
+      // Report serviceKey and businessKey
+      std::cout << "serviceKey=" << (*si)->serviceKey << std::endl << "businessKey=" << (*si)->businessKey << std::endl;
+
+      // Report names
+      for (std::vector<uddi2__name*>::const_iterator n = (*si)->name.begin(); n != (*si)->name.end(); ++n)
+        std::cout << "name=" << (*n)->__item << std::endl;
+
+      std::cout << std::endl;
+    }
+  }
+
+  // Remove deserialized objects
+  soap_destroy(soap);
+
+  // Remove temporary data
+  soap_end(soap);
+
+  // Detach and free context
+  soap_done(soap);
+  free(soap);
+
+  return 0;
+}
+@endcode
+
+To compile:
+- wsdl2h -tuddi2-typemap.dat inquire_v2.wsdl
+- soapcpp2 -I.. -pinq inquire_v2.h
+- g++ -DWITH_NONAMESPACES -I.. -o example1 example1.cpp inquire_v2.cpp inqC.cpp inqClient.cpp ../stdsoap2.cpp
+*/
+
+/**
+@page example2 Code Example 2: Finding a business
+
+This example shows you how to find a business from a UDDI server.
+
+@code
+#include "inqH.h"
+
+int main(int argc, char **argv)
+{ 
+  char *search_string = "xmethods";
+
+  if (argc > 1)
+    search_string = argv[1];
+
+  // Create a gSOAP context
+  struct soap *soap = soap_new();
+
+  // Create an object to find a business
+  uddi2__find_USCOREbusiness fb(soap, search_string);
+
+  // Send the request
+  uddi2__businessList *bl = fb.send("http://uddi.xmethods.net/inquire");
+
+  // Check if result is OK
+  if (!bl)
+    soap_print_fault(soap, stderr);
+
+  // If OK, report the business name(s) and unique identification keys
+  else if (bl->businessInfos)
+  {
+    std::cout << "Search results on " << search_string << ":" << std::endl << std::endl;
+
+    for (std::vector<uddi2__businessInfo*>::const_iterator bi = bl->businessInfos->businessInfo.begin(); bi != bl->businessInfos->businessInfo.end(); ++bi)
+    {
+      // Report businessKey
+      std::cout << "businessKey=" << (*bi)->businessKey << std::endl;
+
+      // Report names
+      for (std::vector<uddi2__name*>::const_iterator n = (*bi)->name.begin(); n != (*bi)->name.end(); ++n)
+        std::cout << "name=" << (*n)->__item << std::endl;
+
+      std::cout << std::endl;
+    }
+  }
+
+  // Remove deserialized objects
+  soap_destroy(soap);
+
+  // Remove temporary data
+  soap_end(soap);
+
+  // Detach and free context
+  soap_done(soap);
+  free(soap);
+
+  return 0;
+}
+@endcode
+
+To compile:
+- wsdl2h -tuddi2-typemap.dat inquire_v2.wsdl
+- soapcpp2 -I.. -pinq inquire_v2.h
+- g++ -DWITH_NONAMESPACES -I.. -o example2 example2.cpp inquire_v2.cpp inqC.cpp inqClient.cpp ../stdsoap2.cpp
+*/
+/**
+@page example3 Code Example 3: Publishing a WSDL and service on XMethods
+
+This example shows you how to publish a Web service. In this case, the example
+template code obtains an authorization token, saves the tModel with the WSDL
+URL in the server, and saves the business service information in the server.
+
+@code
+#include "pubH.h"
+
+const char *server = "https://uddi.xmethods.net/publish";
+
+const char *userid = "..."; // user ID to access UDDI server
+const char *passwd = "..."; // password to access UDDI server
+
+int main(int argc, char **argv)
+{ 
+  // Create a gSOAP context
+  struct soap *soap = soap_new();
+
+  // Setup SSL context (optional) to verify server's credentials
+  if (soap_ssl_client_context(soap, SOAP_SSL_DEFAULT, NULL, NULL, "cacerts.pem", NULL, NULL))
+  { 
+    soap_print_fault(soap, stderr);
+    exit(1);
+  }
+
+  // Step 1: Get an authorization token from the UDDI server
+  uddi2__get_USCOREauthToken get_authToken(soap, userid, passwd);
+  uddi2__authToken *authToken = get_authToken.send(server);
+
+  // Check if authorized
+  if (!authToken)
+  {
+    soap_print_fault(soap, stderr);
+    exit(1);
+  }
+
+  // Authorization info provided by server for this session
+  char *authInfo = authToken->authInfo;
+
+  // Step 2: Create a tModel for the WSDL to be published
+  uddi2__tModel tModel;
+  tModel.soap_default(soap);
+
+  // Create the tModel and service name
+  tModel.name = soap_new_uddi2__name(soap, -1);
+  tModel.name->__item = "...";
+  tModel.name->xml__lang_ = "en";
+
+  // Create XMethods description elements (see http://www.xmethods.net/ve2/UDDI.po)
+  uddi2__description *description = soap_new_uddi2__description(soap, 6);
+  description[0].__item = "SHORT DESCRIPTION: ...";
+  description[0].xml__lang_ = "en";
+  description[1].__item = "SHORT DESCRIPTION: ...";
+  description[1].xml__lang_ = "en";
+  description[2].__item = "USAGE NOTES: ...";
+  description[2].xml__lang_ = "en";
+  description[3].__item = "HOMEPAGE URL: ...";
+  description[3].xml__lang_ = "en";
+  description[4].__item = "CONTACT EMAIL: ...";
+  description[4].xml__lang_ = "en";
+  description[5].__item = "IMPLEMENTATION: ...";
+  description[5].xml__lang_ = "en";
+
+  // Add the four description elements to the tModel
+  tModel.description.push_back(description + 0);
+  tModel.description.push_back(description + 1);
+  tModel.description.push_back(description + 2);
+  tModel.description.push_back(description + 4);
+
+  // Add an overviewDoc element with description and overviewURL
+  tModel.overviewDoc = soap_new_uddi2__overviewDoc(soap, -1);
+  tModel.overviewDoc->soap_default(soap);
+  tModel.overviewDoc->description.push_back(soap_new_uddi2__description(soap, -1));
+  tModel.overviewDoc->description[0]->__item = "WSDL source document";
+  tModel.overviewDoc->description[0]->xml__lang_ = "en";
+  tModel.overviewDoc->overviewURL = "http://.../my.wsdl#bindingName";
+
+  // Omit identifier bag
+  tModel.identifierBag = NULL;
+
+  // Add a category with a WSDL-specific keyedReference
+  tModel.categoryBag = soap_new_uddi2__categoryBag(soap, -1);
+  tModel.categoryBag->soap_default(soap);
+  tModel.categoryBag->keyedReference.push_back(soap_new_uddi2__keyedReference(soap, -1));
+  tModel.categoryBag->keyedReference[0]->tModelKey = "...";
+  tModel.categoryBag->keyedReference[0]->keyName = "uddi-org:types";
+  tModel.categoryBag->keyedReference[0]->keyValue = "wsdlSpec";
+
+  tModel.authorizedName = "...";
+  tModel.operator_ = "...";
+  tModel.tModelKey = "...";
+
+  // Save the tModel
+  uddi2__save_USCOREtModel save_tModel(soap, tModel);
+  uddi2__tModelDetail *tModelDetail = save_tModel.send(server, authInfo);
+
+  // Step 3: Create a new service to be published
+  uddi2__businessService service;
+  service.soap_default(soap);
+
+  // Service name is the tModel name (XMethods)
+  service.name.push_back(tModel.name);
+
+  // Add two description elements to the service
+  service.description.push_back(description + 4);
+  service.description.push_back(description + 5);
+
+  // Create binding template
+  uddi2__bindingTemplate bindingTemplate;
+  bindingTemplate.soap_default(soap);
+  bindingTemplate.tModelInstanceDetails = soap_new_uddi2__tModelInstanceDetails(soap, -1);
+  bindingTemplate.tModelInstanceDetails->tModelInstanceInfo.push_back(soap_new_uddi2__tModelInstanceInfo(soap, -1));
+  bindingTemplate.tModelInstanceDetails->tModelInstanceInfo[0]->instanceDetails = NULL;
+  bindingTemplate.tModelInstanceDetails->tModelInstanceInfo[0]->tModelKey = tModel.tModelKey;
+  bindingTemplate.accessPoint = soap_new_uddi2__accessPoint(soap, -1);
+  bindingTemplate.accessPoint->__item = "...";
+  bindingTemplate.accessPoint->URLType = uddi2__URLType__http;
+  bindingTemplate.hostingRedirector = NULL;
+  bindingTemplate.serviceKey = "...";
+  bindingTemplate.bindingKey = "...";
+
+  // Add binding Template to service
+  service.bindingTemplates = soap_new_uddi2__bindingTemplates(soap, -1);
+  service.bindingTemplates->soap_default(soap);
+  service.bindingTemplates->bindingTemplate.push_back(&bindingTemplate);
+
+  service.categoryBag = NULL;
+  service.serviceKey = "...";
+  service.businessKey = "...";
+
+  // Save the service
+  uddi2__save_USCOREservice save_service(soap, service);
+  uddi2__serviceDetail *serviceDetail = save_service.send(server, authInfo);
+
+  // Step 4: Discard authorization token
+  uddi2__discard_USCOREauthToken discard_authToken(soap, authInfo);
+  uddi2__dispositionReport *dispositionReport = discard_authToken.send(server);
+
+  // Remove deserialized objects
+  soap_destroy(soap);
+
+  // Remove temporary data
+  soap_end(soap);
+
+  // Detach and free context
+  soap_done(soap);
+  free(soap);
+
+  return 0;
+}
+@endcode
+To compile:
+- wsdl2h -tuddi2-typemap.dat publish_v2.wsdl
+- soapcpp2 -I.. -ppub publish_v2.h
+- g++ -DWITH_OPENSSL -DWITH_NONAMESPACES -I.. -o example3 example3.cpp publish_v2.cpp pubC.cpp pubClient.cpp ../stdsoap2.cpp
+*/
+]
+
+################################################################################
+#
+#	UDDI v2 XML namespaces
+#
+################################################################################
+
+inq2	= "urn:uddi-org:inquiry_v2"
+pub2	= "urn:uddi-org:publication_v2"
+uddi2	= "urn:uddi-org:api_v2"
+
+################################################################################
+#
+#	Type Definitions
+#
+################################################################################
+
+#	Use regular C strings only:
+
+xsd__string	= | char* | char*
+
+################################################################################
+#
+#	Class/Struct Extensions
+#
+################################################################################
+
+#	uddi2:find_binding object extended with con/de-structors and send()
+
+uddi2__find_USCOREbinding = $ uddi2__find_USCOREbinding(struct soap*);
+
+uddi2__find_USCOREbinding = $ uddi2__find_USCOREbinding(struct soap*, const char *tModelKey);
+
+uddi2__find_USCOREbinding = $ uddi2__find_USCOREbinding(struct soap*, std::vector<char*> tModelKeys);
+
+uddi2__find_USCOREbinding = $ uddi2__bindingDetail *send(const char *endpoint);
+
+#	uddi2:find_business object extended with con/de-structors and send()
+
+uddi2__find_USCOREbusiness = $ uddi2__find_USCOREbusiness(struct soap*);
+
+uddi2__find_USCOREbusiness = $ uddi2__find_USCOREbusiness(struct soap*, const char *name);
+
+uddi2__find_USCOREbusiness = $ uddi2__find_USCOREbusiness(struct soap*, std::vector<char*> tModelKeys);
+
+uddi2__find_USCOREbusiness = $ uddi2__find_USCOREbusiness(struct soap*, std::vector<uddi2__keyedReference*> keyedReferences);
+
+uddi2__find_USCOREbusiness = $ uddi2__businessList *send(const char *endpoint);
+
+#	uddi2:find_relatedBusinesses object extended with con/de-structors and send()
+
+uddi2__find_USCORErelatedBusinesses = $ uddi2__find_USCORErelatedBusinesses(struct soap*);
+
+uddi2__find_USCORErelatedBusinesses = $ uddi2__find_USCORErelatedBusinesses(struct soap*, const char *businessKey);
+
+uddi2__find_USCORErelatedBusinesses = $ uddi2__relatedBusinessesList *send(const char *endpoint);
+
+#	uddi2:find_service object extended with con/de-structors and send()
+
+uddi2__find_USCOREservice = $ uddi2__find_USCOREservice(struct soap*);
+
+uddi2__find_USCOREservice = $ uddi2__find_USCOREservice(struct soap*, const char *name);
+
+uddi2__find_USCOREservice = $ uddi2__find_USCOREservice(struct soap*, std::vector<char*> tModelKeys);
+
+uddi2__find_USCOREservice = $ uddi2__find_USCOREservice(struct soap*, std::vector<uddi2__keyedReference*> keyedReferences);
+
+uddi2__find_USCOREservice = $ uddi2__serviceList* send(const char *endpoint);
+
+#	uddi2:find_tModel object extended with con/de-structors and send()
+
+uddi2__find_USCOREtModel = $ uddi2__find_USCOREtModel(struct soap*);
+
+uddi2__find_USCOREtModel = $ uddi2__find_USCOREtModel(struct soap*, const char *name);
+
+uddi2__find_USCOREtModel = $ uddi2__find_USCOREtModel(struct soap*, std::vector<uddi2__keyedReference*> keyedReferences);
+
+uddi2__find_USCOREtModel = $ uddi2__tModelList* send(const char *endpoint);
+
+#	uddi2:get_bindingDetail object extended with con/de-structors and send()
+
+uddi2__get_USCOREbindingDetail = $ uddi2__get_USCOREbindingDetail(struct soap*);
+
+uddi2__get_USCOREbindingDetail = $ uddi2__get_USCOREbindingDetail(struct soap*, const char *bindingKey);
+
+uddi2__get_USCOREbindingDetail = $ uddi2__get_USCOREbindingDetail(struct soap*, std::vector<char*> bindingKeys);
+
+uddi2__get_USCOREbindingDetail = $ uddi2__bindingDetail* send(const char *endpoint);
+
+#	uddi2:get_businessDetail object extended with con/de-structors and send()
+
+uddi2__get_USCOREbusinessDetail = $ uddi2__get_USCOREbusinessDetail(struct soap*);
+
+uddi2__get_USCOREbusinessDetail = $ uddi2__get_USCOREbusinessDetail(struct soap*, const char *businessKey);
+
+uddi2__get_USCOREbusinessDetail = $ uddi2__get_USCOREbusinessDetail(struct soap*, std::vector<char*> businessKeys);
+
+uddi2__get_USCOREbusinessDetail = $ uddi2__businessDetail* send(const char *endpoint);
+
+#	uddi2:get_businessDetailExt object extended with con/de-structors and send()
+
+uddi2__get_USCOREbusinessDetailExt = $ uddi2__get_USCOREbusinessDetailExt(struct soap*);
+
+uddi2__get_USCOREbusinessDetailExt = $ uddi2__get_USCOREbusinessDetailExt(struct soap*, const char *businessKey);
+
+uddi2__get_USCOREbusinessDetailExt = $ uddi2__get_USCOREbusinessDetailExt(struct soap*, std::vector<char*> businessKeys);
+
+uddi2__get_USCOREbusinessDetailExt = $ uddi2__businessDetailExt* send(const char *endpoint);
+
+#	uddi2:get_serviceDetail object extended with con/de-structors and send()
+
+uddi2__get_USCOREserviceDetail = $ uddi2__get_USCOREserviceDetail(struct soap*);
+
+uddi2__get_USCOREserviceDetail = $ uddi2__get_USCOREserviceDetail(struct soap*, const char *serviceKey);
+
+uddi2__get_USCOREserviceDetail = $ uddi2__get_USCOREserviceDetail(struct soap*, std::vector<char*> serviceKeys);
+
+uddi2__get_USCOREserviceDetail = $ uddi2__serviceDetail* send(const char *endpoint);
+
+#	uddi2:get_tModelDetail object extended with con/de-structors and send()
+
+uddi2__get_USCOREtModelDetail = $ uddi2__get_USCOREtModelDetail(struct soap*);
+
+uddi2__get_USCOREtModelDetail = $ uddi2__get_USCOREtModelDetail(struct soap*, const char *tModelKey);
+
+uddi2__get_USCOREtModelDetail = $ uddi2__get_USCOREtModelDetail(struct soap*, std::vector<char*> tModelKeys);
+
+uddi2__get_USCOREtModelDetail = $ uddi2__tModelDetail* send(const char *endpoint);
+
+#	uddi2:add_publisherAssertions object extended with con/de-structors and send()
+
+uddi2__add_USCOREpublisherAssertions = $ uddi2__add_USCOREpublisherAssertions(struct soap*);
+
+uddi2__add_USCOREpublisherAssertions = $ uddi2__add_USCOREpublisherAssertions(struct soap*, std::vector<uddi2__publisherAssertion*> publisherAssertions);
+
+uddi2__add_USCOREpublisherAssertions = $ uddi2__dispositionReport* send(const char *endpoint, char *authInfo);
+
+#	uddi2:delete_binding object extended with con/de-structors and send()
+
+uddi2__delete_USCOREbinding = $ uddi2__delete_USCOREbinding(struct soap*);
+
+uddi2__delete_USCOREbinding = $ uddi2__delete_USCOREbinding(struct soap*, const char *bindingKey);
+
+uddi2__delete_USCOREbinding = $ uddi2__delete_USCOREbinding(struct soap*, std::vector<char*> bindingKeys);
+
+uddi2__delete_USCOREbinding = $ uddi2__dispositionReport* send(const char *endpoint, char *authInfo);
+
+#	uddi2:delete_business object extended with con/de-structors and send()
+
+uddi2__delete_USCOREbusiness = $ uddi2__delete_USCOREbusiness(struct soap*);
+
+uddi2__delete_USCOREbusiness = $ uddi2__delete_USCOREbusiness(struct soap*, const char *businessKey);
+
+uddi2__delete_USCOREbusiness = $ uddi2__delete_USCOREbusiness(struct soap*, std::vector<char*> businessKeys);
+
+uddi2__delete_USCOREbusiness = $ uddi2__dispositionReport* send(const char *endpoint, char *authInfo);
+
+#	uddi2:delete_service object extended with con/de-structors and send()
+
+uddi2__delete_USCOREservice = $ uddi2__delete_USCOREservice(struct soap*);
+
+uddi2__delete_USCOREservice = $ uddi2__delete_USCOREservice(struct soap*, const char *serviceKey);
+
+uddi2__delete_USCOREservice = $ uddi2__delete_USCOREservice(struct soap*, std::vector<char*> serviceKeys);
+
+uddi2__delete_USCOREservice = $ uddi2__dispositionReport* send(const char *endpoint, char *authInfo);
+
+#	uddi2:delete_tModel object extended with con/de-structors and send()
+
+uddi2__delete_USCOREtModel = $ uddi2__delete_USCOREtModel(struct soap*);
+
+uddi2__delete_USCOREtModel = $ uddi2__delete_USCOREtModel(struct soap*, const char *tModelKey);
+
+uddi2__delete_USCOREtModel = $ uddi2__delete_USCOREtModel(struct soap*, std::vector<char*> tModelKeys);
+
+uddi2__delete_USCOREtModel = $ uddi2__dispositionReport* send(const char *endpoint, char *authInfo);
+
+#	uddi2:delete_publisherAssertions object extended with con/de-structors and send()
+
+uddi2__delete_USCOREpublisherAssertions = $ uddi2__delete_USCOREpublisherAssertions(struct soap*);
+
+uddi2__delete_USCOREpublisherAssertions = $ uddi2__delete_USCOREpublisherAssertions(struct soap*, std::vector<uddi2__publisherAssertion*> publisherAssertions);
+
+uddi2__delete_USCOREpublisherAssertions = $ uddi2__dispositionReport* send(const char *endpoint, char *authInfo);
+
+#	uddi2:discard_authToken object extended with con/de-structors and send()
+
+uddi2__discard_USCOREauthToken = $ uddi2__discard_USCOREauthToken(struct soap*);
+
+uddi2__discard_USCOREauthToken = $ uddi2__discard_USCOREauthToken(struct soap*, const char *authInfo);
+
+uddi2__discard_USCOREauthToken = $ uddi2__dispositionReport* send(const char *endpoint);
+
+#	uddi2:get_assertionStatusReport object extended with con/de-structors and send()
+
+uddi2__get_USCOREassertionStatusReport = $ uddi2__get_USCOREassertionStatusReport(struct soap*);
+
+uddi2__get_USCOREassertionStatusReport = $ uddi2__get_USCOREassertionStatusReport(struct soap*, const char *completionStatus);
+
+uddi2__get_USCOREassertionStatusReport = $ uddi2__assertionStatusReport* send(const char *endpoint, char *authInfo);
+
+#	uddi2:get_authToken object extended with con/de-structors and send()
+
+uddi2__get_USCOREauthToken = $ uddi2__get_USCOREauthToken(struct soap*);
+
+uddi2__get_USCOREauthToken = $ uddi2__get_USCOREauthToken(struct soap*, const char *userid, const char *passwd);
+
+uddi2__get_USCOREauthToken = $ uddi2__authToken* send(const char *endpoint);
+
+#	uddi2:get_publisherAssertions object extended with con/de-structors and send()
+
+uddi2__get_USCOREpublisherAssertions = $ uddi2__get_USCOREpublisherAssertions(struct soap*);
+
+uddi2__get_USCOREpublisherAssertions = $ uddi2__publisherAssertions* send(const char *endpoint, char *authInfo);
+
+#	uddi2:get_registeredInfo object extended with con/de-structors and send()
+
+uddi2__get_USCOREregisteredInfo = $ uddi2__get_USCOREregisteredInfo(struct soap*);
+
+uddi2__get_USCOREregisteredInfo = $ uddi2__registeredInfo* send(const char *endpoint, char *authInfo);
+
+#	uddi2:save_binding object extended with con/de-structors and send()
+
+uddi2__save_USCOREbinding = $ uddi2__save_USCOREbinding(struct soap*);
+
+uddi2__save_USCOREbinding = $ uddi2__save_USCOREbinding(struct soap*, uddi2__bindingTemplate &bindingTemplate);
+
+uddi2__save_USCOREbinding = $ uddi2__save_USCOREbinding(struct soap*, std::vector<uddi2__bindingTemplate*> bindingTemplates);
+
+uddi2__save_USCOREbinding = $ uddi2__bindingDetail* send(const char *endpoint, char *authInfo);
+
+#	uddi2:save_business object extended with con/de-structors and send()
+
+uddi2__save_USCOREbusiness = $ uddi2__save_USCOREbusiness(struct soap*);
+
+uddi2__save_USCOREbusiness = $ uddi2__save_USCOREbusiness(struct soap*, uddi2__businessEntity &businessEntity);
+
+uddi2__save_USCOREbusiness = $ uddi2__save_USCOREbusiness(struct soap*, std::vector<uddi2__businessEntity*> businessEntities);
+
+uddi2__save_USCOREbusiness = $ uddi2__businessDetail* send(const char *endpoint, char *authInfo);
+
+#	uddi2:save_service object extended with con/de-structors and send()
+
+uddi2__save_USCOREservice = $ uddi2__save_USCOREservice(struct soap*);
+
+uddi2__save_USCOREservice = $ uddi2__save_USCOREservice(struct soap*, uddi2__businessService &businessService);
+
+uddi2__save_USCOREservice = $ uddi2__save_USCOREservice(struct soap*, std::vector<uddi2__businessService*> businessServices);
+
+uddi2__save_USCOREservice = $ uddi2__serviceDetail* send(const char *endpoint, char *authInfo);
+
+#	uddi2:save_tModel object extended with con/de-structors and send()
+
+uddi2__save_USCOREtModel = $ uddi2__save_USCOREtModel(struct soap*);
+
+uddi2__save_USCOREtModel = $ uddi2__save_USCOREtModel(struct soap*, uddi2__tModel &tModel);
+
+uddi2__save_USCOREtModel = $ uddi2__save_USCOREtModel(struct soap*, std::vector<uddi2__tModel*> tModels);
+
+uddi2__save_USCOREtModel = $ uddi2__tModelDetail* send(const char *endpoint, char *authInfo);
+
+#	uddi2:set_publisherAssertions object extended with con/de-structors and send()
+
+uddi2__set_USCOREpublisherAssertions = $ uddi2__set_USCOREpublisherAssertions(struct soap*);
+
+uddi2__set_USCOREpublisherAssertions = $ uddi2__set_USCOREpublisherAssertions(struct soap*, std::vector<uddi2__publisherAssertion*> publisherAssertions);
+
+uddi2__set_USCOREpublisherAssertions = $ uddi2__publisherAssertions* send(const char *endpoint, char *authInfo);
+
diff --git a/uddi2/uddiH.h b/uddi2/uddiH.h
new file mode 100644
index 0000000..9477053
--- /dev/null
+++ b/uddi2/uddiH.h
@@ -0,0 +1,2917 @@
+/* uddiH.h
+   Generated by gSOAP 2.7.1 from uddi_v2.h
+   Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+   This part of the software is released under one of the following licenses:
+   GPL, the gSOAP public license, or Genivia's license for commercial use.
+*/
+#ifndef uddiH_H
+#define uddiH_H
+#include "uddiStub.h"
+
+SOAP_BEGIN_NAMESPACE(uddi)
+SOAP_FMAC3 int SOAP_FMAC4 soap_ignore_element(struct soap*);
+#ifndef WITH_NOIDREF
+SOAP_FMAC3 int SOAP_FMAC4 soap_putindependent(struct soap*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_getindependent(struct soap*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_markelement(struct soap*, const void*, int);
+SOAP_FMAC3 int SOAP_FMAC4 soap_putelement(struct soap*, const void*, const char*, int, int);
+SOAP_FMAC3 void * SOAP_FMAC4 soap_getelement(struct soap*, int*);
+#endif
+SOAP_FMAC3 int SOAP_FMAC4 soap_resolve_attachments(struct soap*);
+
+SOAP_FMAC3 void * SOAP_FMAC4 soap_instantiate(struct soap*, int, const char*, const char*, size_t*);
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_fdelete(struct soap_clist*);
+
+SOAP_FMAC3 void* SOAP_FMAC4 soap_class_id_enter(struct soap*, const char*, void*, int, size_t, const char*, const char*);
+
+SOAP_FMAC3 void* SOAP_FMAC4 soap_container_id_forward(struct soap*, const char*, void*, int, int, size_t, unsigned int);
+
+SOAP_FMAC3 void SOAP_FMAC4 soap_container_insert(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_byte
+#define SOAP_TYPE_byte (2)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_byte(struct soap*, char *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_byte(struct soap*, const char *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_byte(struct soap*, const char*, int, const char *, const char*);
+SOAP_FMAC3 char * SOAP_FMAC4 soap_get_byte(struct soap*, char *, const char*, const char*);
+SOAP_FMAC3 char * SOAP_FMAC4 soap_in_byte(struct soap*, const char*, char *, const char*);
+
+#ifndef SOAP_TYPE_int
+#define SOAP_TYPE_int (1)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_int(struct soap*, int *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_int(struct soap*, const int *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_int(struct soap*, const char*, int, const int *, const char*);
+SOAP_FMAC3 int * SOAP_FMAC4 soap_get_int(struct soap*, int *, const char*, const char*);
+SOAP_FMAC3 int * SOAP_FMAC4 soap_in_int(struct soap*, const char*, int *, const char*);
+
+#ifndef SOAP_TYPE_uddi2__keyType
+#define SOAP_TYPE_uddi2__keyType (99)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_uddi2__keyType(struct soap*, enum uddi2__keyType *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_uddi2__keyType(struct soap*, const enum uddi2__keyType *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__keyType(struct soap*, const char*, int, const enum uddi2__keyType *, const char*);
+
+SOAP_FMAC3S const char* SOAP_FMAC4S soap_uddi2__keyType2s(struct soap*, enum uddi2__keyType);
+SOAP_FMAC3 enum uddi2__keyType * SOAP_FMAC4 soap_get_uddi2__keyType(struct soap*, enum uddi2__keyType *, const char*, const char*);
+SOAP_FMAC3 enum uddi2__keyType * SOAP_FMAC4 soap_in_uddi2__keyType(struct soap*, const char*, enum uddi2__keyType *, const char*);
+
+SOAP_FMAC3S int SOAP_FMAC4S soap_s2uddi2__keyType(struct soap*, const char*, enum uddi2__keyType *);
+
+#ifndef SOAP_TYPE_uddi2__URLType
+#define SOAP_TYPE_uddi2__URLType (98)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_uddi2__URLType(struct soap*, enum uddi2__URLType *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_uddi2__URLType(struct soap*, const enum uddi2__URLType *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__URLType(struct soap*, const char*, int, const enum uddi2__URLType *, const char*);
+
+SOAP_FMAC3S const char* SOAP_FMAC4S soap_uddi2__URLType2s(struct soap*, enum uddi2__URLType);
+SOAP_FMAC3 enum uddi2__URLType * SOAP_FMAC4 soap_get_uddi2__URLType(struct soap*, enum uddi2__URLType *, const char*, const char*);
+SOAP_FMAC3 enum uddi2__URLType * SOAP_FMAC4 soap_in_uddi2__URLType(struct soap*, const char*, enum uddi2__URLType *, const char*);
+
+SOAP_FMAC3S int SOAP_FMAC4S soap_s2uddi2__URLType(struct soap*, const char*, enum uddi2__URLType *);
+
+#ifndef SOAP_TYPE_uddi2__truncated
+#define SOAP_TYPE_uddi2__truncated (97)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_uddi2__truncated(struct soap*, enum uddi2__truncated *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_uddi2__truncated(struct soap*, const enum uddi2__truncated *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__truncated(struct soap*, const char*, int, const enum uddi2__truncated *, const char*);
+
+SOAP_FMAC3S const char* SOAP_FMAC4S soap_uddi2__truncated2s(struct soap*, enum uddi2__truncated);
+SOAP_FMAC3 enum uddi2__truncated * SOAP_FMAC4 soap_get_uddi2__truncated(struct soap*, enum uddi2__truncated *, const char*, const char*);
+SOAP_FMAC3 enum uddi2__truncated * SOAP_FMAC4 soap_in_uddi2__truncated(struct soap*, const char*, enum uddi2__truncated *, const char*);
+
+SOAP_FMAC3S int SOAP_FMAC4S soap_s2uddi2__truncated(struct soap*, const char*, enum uddi2__truncated *);
+
+#ifndef SOAP_TYPE_uddi2__direction
+#define SOAP_TYPE_uddi2__direction (96)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_uddi2__direction(struct soap*, enum uddi2__direction *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_uddi2__direction(struct soap*, const enum uddi2__direction *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__direction(struct soap*, const char*, int, const enum uddi2__direction *, const char*);
+
+SOAP_FMAC3S const char* SOAP_FMAC4S soap_uddi2__direction2s(struct soap*, enum uddi2__direction);
+SOAP_FMAC3 enum uddi2__direction * SOAP_FMAC4 soap_get_uddi2__direction(struct soap*, enum uddi2__direction *, const char*, const char*);
+SOAP_FMAC3 enum uddi2__direction * SOAP_FMAC4 soap_in_uddi2__direction(struct soap*, const char*, enum uddi2__direction *, const char*);
+
+SOAP_FMAC3S int SOAP_FMAC4S soap_s2uddi2__direction(struct soap*, const char*, enum uddi2__direction *);
+
+#ifndef SOAP_TYPE__dispositionReport
+#define SOAP_TYPE__dispositionReport (306)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out__dispositionReport(struct soap*, const char*, int, const _dispositionReport *, const char*);
+SOAP_FMAC3 _dispositionReport * SOAP_FMAC4 soap_get__dispositionReport(struct soap*, _dispositionReport *, const char*, const char*);
+SOAP_FMAC3 _dispositionReport * SOAP_FMAC4 soap_in__dispositionReport(struct soap*, const char*, _dispositionReport *, const char*);
+
+SOAP_FMAC5 _dispositionReport * SOAP_FMAC6 soap_new__dispositionReport(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete__dispositionReport(struct soap*, _dispositionReport*);
+SOAP_FMAC5 _dispositionReport * SOAP_FMAC6 soap_instantiate__dispositionReport(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy__dispositionReport(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__tModelList
+#define SOAP_TYPE_uddi2__tModelList (91)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__tModelList(struct soap*, const char*, int, const uddi2__tModelList *, const char*);
+SOAP_FMAC3 uddi2__tModelList * SOAP_FMAC4 soap_get_uddi2__tModelList(struct soap*, uddi2__tModelList *, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelList * SOAP_FMAC4 soap_in_uddi2__tModelList(struct soap*, const char*, uddi2__tModelList *, const char*);
+
+SOAP_FMAC5 uddi2__tModelList * SOAP_FMAC6 soap_new_uddi2__tModelList(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__tModelList(struct soap*, uddi2__tModelList*);
+SOAP_FMAC5 uddi2__tModelList * SOAP_FMAC6 soap_instantiate_uddi2__tModelList(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__tModelList(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__tModelDetail
+#define SOAP_TYPE_uddi2__tModelDetail (90)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__tModelDetail(struct soap*, const char*, int, const uddi2__tModelDetail *, const char*);
+SOAP_FMAC3 uddi2__tModelDetail * SOAP_FMAC4 soap_get_uddi2__tModelDetail(struct soap*, uddi2__tModelDetail *, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelDetail * SOAP_FMAC4 soap_in_uddi2__tModelDetail(struct soap*, const char*, uddi2__tModelDetail *, const char*);
+
+SOAP_FMAC5 uddi2__tModelDetail * SOAP_FMAC6 soap_new_uddi2__tModelDetail(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__tModelDetail(struct soap*, uddi2__tModelDetail*);
+SOAP_FMAC5 uddi2__tModelDetail * SOAP_FMAC6 soap_instantiate_uddi2__tModelDetail(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__tModelDetail(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__serviceList
+#define SOAP_TYPE_uddi2__serviceList (89)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__serviceList(struct soap*, const char*, int, const uddi2__serviceList *, const char*);
+SOAP_FMAC3 uddi2__serviceList * SOAP_FMAC4 soap_get_uddi2__serviceList(struct soap*, uddi2__serviceList *, const char*, const char*);
+SOAP_FMAC3 uddi2__serviceList * SOAP_FMAC4 soap_in_uddi2__serviceList(struct soap*, const char*, uddi2__serviceList *, const char*);
+
+SOAP_FMAC5 uddi2__serviceList * SOAP_FMAC6 soap_new_uddi2__serviceList(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__serviceList(struct soap*, uddi2__serviceList*);
+SOAP_FMAC5 uddi2__serviceList * SOAP_FMAC6 soap_instantiate_uddi2__serviceList(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__serviceList(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__serviceDetail
+#define SOAP_TYPE_uddi2__serviceDetail (88)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__serviceDetail(struct soap*, const char*, int, const uddi2__serviceDetail *, const char*);
+SOAP_FMAC3 uddi2__serviceDetail * SOAP_FMAC4 soap_get_uddi2__serviceDetail(struct soap*, uddi2__serviceDetail *, const char*, const char*);
+SOAP_FMAC3 uddi2__serviceDetail * SOAP_FMAC4 soap_in_uddi2__serviceDetail(struct soap*, const char*, uddi2__serviceDetail *, const char*);
+
+SOAP_FMAC5 uddi2__serviceDetail * SOAP_FMAC6 soap_new_uddi2__serviceDetail(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__serviceDetail(struct soap*, uddi2__serviceDetail*);
+SOAP_FMAC5 uddi2__serviceDetail * SOAP_FMAC6 soap_instantiate_uddi2__serviceDetail(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__serviceDetail(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__relatedBusinessesList
+#define SOAP_TYPE_uddi2__relatedBusinessesList (87)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__relatedBusinessesList(struct soap*, const char*, int, const uddi2__relatedBusinessesList *, const char*);
+SOAP_FMAC3 uddi2__relatedBusinessesList * SOAP_FMAC4 soap_get_uddi2__relatedBusinessesList(struct soap*, uddi2__relatedBusinessesList *, const char*, const char*);
+SOAP_FMAC3 uddi2__relatedBusinessesList * SOAP_FMAC4 soap_in_uddi2__relatedBusinessesList(struct soap*, const char*, uddi2__relatedBusinessesList *, const char*);
+
+SOAP_FMAC5 uddi2__relatedBusinessesList * SOAP_FMAC6 soap_new_uddi2__relatedBusinessesList(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__relatedBusinessesList(struct soap*, uddi2__relatedBusinessesList*);
+SOAP_FMAC5 uddi2__relatedBusinessesList * SOAP_FMAC6 soap_instantiate_uddi2__relatedBusinessesList(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__relatedBusinessesList(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__registeredInfo
+#define SOAP_TYPE_uddi2__registeredInfo (86)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__registeredInfo(struct soap*, const char*, int, const uddi2__registeredInfo *, const char*);
+SOAP_FMAC3 uddi2__registeredInfo * SOAP_FMAC4 soap_get_uddi2__registeredInfo(struct soap*, uddi2__registeredInfo *, const char*, const char*);
+SOAP_FMAC3 uddi2__registeredInfo * SOAP_FMAC4 soap_in_uddi2__registeredInfo(struct soap*, const char*, uddi2__registeredInfo *, const char*);
+
+SOAP_FMAC5 uddi2__registeredInfo * SOAP_FMAC6 soap_new_uddi2__registeredInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__registeredInfo(struct soap*, uddi2__registeredInfo*);
+SOAP_FMAC5 uddi2__registeredInfo * SOAP_FMAC6 soap_instantiate_uddi2__registeredInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__registeredInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__publisherAssertions
+#define SOAP_TYPE_uddi2__publisherAssertions (85)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__publisherAssertions(struct soap*, const char*, int, const uddi2__publisherAssertions *, const char*);
+SOAP_FMAC3 uddi2__publisherAssertions * SOAP_FMAC4 soap_get_uddi2__publisherAssertions(struct soap*, uddi2__publisherAssertions *, const char*, const char*);
+SOAP_FMAC3 uddi2__publisherAssertions * SOAP_FMAC4 soap_in_uddi2__publisherAssertions(struct soap*, const char*, uddi2__publisherAssertions *, const char*);
+
+SOAP_FMAC5 uddi2__publisherAssertions * SOAP_FMAC6 soap_new_uddi2__publisherAssertions(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__publisherAssertions(struct soap*, uddi2__publisherAssertions*);
+SOAP_FMAC5 uddi2__publisherAssertions * SOAP_FMAC6 soap_instantiate_uddi2__publisherAssertions(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__publisherAssertions(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__businessList
+#define SOAP_TYPE_uddi2__businessList (84)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__businessList(struct soap*, const char*, int, const uddi2__businessList *, const char*);
+SOAP_FMAC3 uddi2__businessList * SOAP_FMAC4 soap_get_uddi2__businessList(struct soap*, uddi2__businessList *, const char*, const char*);
+SOAP_FMAC3 uddi2__businessList * SOAP_FMAC4 soap_in_uddi2__businessList(struct soap*, const char*, uddi2__businessList *, const char*);
+
+SOAP_FMAC5 uddi2__businessList * SOAP_FMAC6 soap_new_uddi2__businessList(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__businessList(struct soap*, uddi2__businessList*);
+SOAP_FMAC5 uddi2__businessList * SOAP_FMAC6 soap_instantiate_uddi2__businessList(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__businessList(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__businessDetailExt
+#define SOAP_TYPE_uddi2__businessDetailExt (83)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__businessDetailExt(struct soap*, const char*, int, const uddi2__businessDetailExt *, const char*);
+SOAP_FMAC3 uddi2__businessDetailExt * SOAP_FMAC4 soap_get_uddi2__businessDetailExt(struct soap*, uddi2__businessDetailExt *, const char*, const char*);
+SOAP_FMAC3 uddi2__businessDetailExt * SOAP_FMAC4 soap_in_uddi2__businessDetailExt(struct soap*, const char*, uddi2__businessDetailExt *, const char*);
+
+SOAP_FMAC5 uddi2__businessDetailExt * SOAP_FMAC6 soap_new_uddi2__businessDetailExt(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__businessDetailExt(struct soap*, uddi2__businessDetailExt*);
+SOAP_FMAC5 uddi2__businessDetailExt * SOAP_FMAC6 soap_instantiate_uddi2__businessDetailExt(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__businessDetailExt(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__businessDetail
+#define SOAP_TYPE_uddi2__businessDetail (82)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__businessDetail(struct soap*, const char*, int, const uddi2__businessDetail *, const char*);
+SOAP_FMAC3 uddi2__businessDetail * SOAP_FMAC4 soap_get_uddi2__businessDetail(struct soap*, uddi2__businessDetail *, const char*, const char*);
+SOAP_FMAC3 uddi2__businessDetail * SOAP_FMAC4 soap_in_uddi2__businessDetail(struct soap*, const char*, uddi2__businessDetail *, const char*);
+
+SOAP_FMAC5 uddi2__businessDetail * SOAP_FMAC6 soap_new_uddi2__businessDetail(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__businessDetail(struct soap*, uddi2__businessDetail*);
+SOAP_FMAC5 uddi2__businessDetail * SOAP_FMAC6 soap_instantiate_uddi2__businessDetail(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__businessDetail(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__bindingDetail
+#define SOAP_TYPE_uddi2__bindingDetail (81)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__bindingDetail(struct soap*, const char*, int, const uddi2__bindingDetail *, const char*);
+SOAP_FMAC3 uddi2__bindingDetail * SOAP_FMAC4 soap_get_uddi2__bindingDetail(struct soap*, uddi2__bindingDetail *, const char*, const char*);
+SOAP_FMAC3 uddi2__bindingDetail * SOAP_FMAC4 soap_in_uddi2__bindingDetail(struct soap*, const char*, uddi2__bindingDetail *, const char*);
+
+SOAP_FMAC5 uddi2__bindingDetail * SOAP_FMAC6 soap_new_uddi2__bindingDetail(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__bindingDetail(struct soap*, uddi2__bindingDetail*);
+SOAP_FMAC5 uddi2__bindingDetail * SOAP_FMAC6 soap_instantiate_uddi2__bindingDetail(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__bindingDetail(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__authToken
+#define SOAP_TYPE_uddi2__authToken (80)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__authToken(struct soap*, const char*, int, const uddi2__authToken *, const char*);
+SOAP_FMAC3 uddi2__authToken * SOAP_FMAC4 soap_get_uddi2__authToken(struct soap*, uddi2__authToken *, const char*, const char*);
+SOAP_FMAC3 uddi2__authToken * SOAP_FMAC4 soap_in_uddi2__authToken(struct soap*, const char*, uddi2__authToken *, const char*);
+
+SOAP_FMAC5 uddi2__authToken * SOAP_FMAC6 soap_new_uddi2__authToken(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__authToken(struct soap*, uddi2__authToken*);
+SOAP_FMAC5 uddi2__authToken * SOAP_FMAC6 soap_instantiate_uddi2__authToken(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__authToken(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__assertionStatusReport
+#define SOAP_TYPE_uddi2__assertionStatusReport (79)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__assertionStatusReport(struct soap*, const char*, int, const uddi2__assertionStatusReport *, const char*);
+SOAP_FMAC3 uddi2__assertionStatusReport * SOAP_FMAC4 soap_get_uddi2__assertionStatusReport(struct soap*, uddi2__assertionStatusReport *, const char*, const char*);
+SOAP_FMAC3 uddi2__assertionStatusReport * SOAP_FMAC4 soap_in_uddi2__assertionStatusReport(struct soap*, const char*, uddi2__assertionStatusReport *, const char*);
+
+SOAP_FMAC5 uddi2__assertionStatusReport * SOAP_FMAC6 soap_new_uddi2__assertionStatusReport(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__assertionStatusReport(struct soap*, uddi2__assertionStatusReport*);
+SOAP_FMAC5 uddi2__assertionStatusReport * SOAP_FMAC6 soap_instantiate_uddi2__assertionStatusReport(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__assertionStatusReport(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__validate_USCOREvalues
+#define SOAP_TYPE_uddi2__validate_USCOREvalues (78)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__validate_USCOREvalues(struct soap*, const char*, int, const uddi2__validate_USCOREvalues *, const char*);
+SOAP_FMAC3 uddi2__validate_USCOREvalues * SOAP_FMAC4 soap_get_uddi2__validate_USCOREvalues(struct soap*, uddi2__validate_USCOREvalues *, const char*, const char*);
+SOAP_FMAC3 uddi2__validate_USCOREvalues * SOAP_FMAC4 soap_in_uddi2__validate_USCOREvalues(struct soap*, const char*, uddi2__validate_USCOREvalues *, const char*);
+
+SOAP_FMAC5 uddi2__validate_USCOREvalues * SOAP_FMAC6 soap_new_uddi2__validate_USCOREvalues(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__validate_USCOREvalues(struct soap*, uddi2__validate_USCOREvalues*);
+SOAP_FMAC5 uddi2__validate_USCOREvalues * SOAP_FMAC6 soap_instantiate_uddi2__validate_USCOREvalues(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__validate_USCOREvalues(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__set_USCOREpublisherAssertions
+#define SOAP_TYPE_uddi2__set_USCOREpublisherAssertions (77)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__set_USCOREpublisherAssertions(struct soap*, const char*, int, const uddi2__set_USCOREpublisherAssertions *, const char*);
+SOAP_FMAC3 uddi2__set_USCOREpublisherAssertions * SOAP_FMAC4 soap_get_uddi2__set_USCOREpublisherAssertions(struct soap*, uddi2__set_USCOREpublisherAssertions *, const char*, const char*);
+SOAP_FMAC3 uddi2__set_USCOREpublisherAssertions * SOAP_FMAC4 soap_in_uddi2__set_USCOREpublisherAssertions(struct soap*, const char*, uddi2__set_USCOREpublisherAssertions *, const char*);
+
+SOAP_FMAC5 uddi2__set_USCOREpublisherAssertions * SOAP_FMAC6 soap_new_uddi2__set_USCOREpublisherAssertions(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__set_USCOREpublisherAssertions(struct soap*, uddi2__set_USCOREpublisherAssertions*);
+SOAP_FMAC5 uddi2__set_USCOREpublisherAssertions * SOAP_FMAC6 soap_instantiate_uddi2__set_USCOREpublisherAssertions(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__set_USCOREpublisherAssertions(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__save_USCOREtModel
+#define SOAP_TYPE_uddi2__save_USCOREtModel (76)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__save_USCOREtModel(struct soap*, const char*, int, const uddi2__save_USCOREtModel *, const char*);
+SOAP_FMAC3 uddi2__save_USCOREtModel * SOAP_FMAC4 soap_get_uddi2__save_USCOREtModel(struct soap*, uddi2__save_USCOREtModel *, const char*, const char*);
+SOAP_FMAC3 uddi2__save_USCOREtModel * SOAP_FMAC4 soap_in_uddi2__save_USCOREtModel(struct soap*, const char*, uddi2__save_USCOREtModel *, const char*);
+
+SOAP_FMAC5 uddi2__save_USCOREtModel * SOAP_FMAC6 soap_new_uddi2__save_USCOREtModel(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__save_USCOREtModel(struct soap*, uddi2__save_USCOREtModel*);
+SOAP_FMAC5 uddi2__save_USCOREtModel * SOAP_FMAC6 soap_instantiate_uddi2__save_USCOREtModel(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__save_USCOREtModel(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__save_USCOREservice
+#define SOAP_TYPE_uddi2__save_USCOREservice (75)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__save_USCOREservice(struct soap*, const char*, int, const uddi2__save_USCOREservice *, const char*);
+SOAP_FMAC3 uddi2__save_USCOREservice * SOAP_FMAC4 soap_get_uddi2__save_USCOREservice(struct soap*, uddi2__save_USCOREservice *, const char*, const char*);
+SOAP_FMAC3 uddi2__save_USCOREservice * SOAP_FMAC4 soap_in_uddi2__save_USCOREservice(struct soap*, const char*, uddi2__save_USCOREservice *, const char*);
+
+SOAP_FMAC5 uddi2__save_USCOREservice * SOAP_FMAC6 soap_new_uddi2__save_USCOREservice(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__save_USCOREservice(struct soap*, uddi2__save_USCOREservice*);
+SOAP_FMAC5 uddi2__save_USCOREservice * SOAP_FMAC6 soap_instantiate_uddi2__save_USCOREservice(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__save_USCOREservice(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__save_USCOREbusiness
+#define SOAP_TYPE_uddi2__save_USCOREbusiness (74)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__save_USCOREbusiness(struct soap*, const char*, int, const uddi2__save_USCOREbusiness *, const char*);
+SOAP_FMAC3 uddi2__save_USCOREbusiness * SOAP_FMAC4 soap_get_uddi2__save_USCOREbusiness(struct soap*, uddi2__save_USCOREbusiness *, const char*, const char*);
+SOAP_FMAC3 uddi2__save_USCOREbusiness * SOAP_FMAC4 soap_in_uddi2__save_USCOREbusiness(struct soap*, const char*, uddi2__save_USCOREbusiness *, const char*);
+
+SOAP_FMAC5 uddi2__save_USCOREbusiness * SOAP_FMAC6 soap_new_uddi2__save_USCOREbusiness(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__save_USCOREbusiness(struct soap*, uddi2__save_USCOREbusiness*);
+SOAP_FMAC5 uddi2__save_USCOREbusiness * SOAP_FMAC6 soap_instantiate_uddi2__save_USCOREbusiness(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__save_USCOREbusiness(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__save_USCOREbinding
+#define SOAP_TYPE_uddi2__save_USCOREbinding (73)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__save_USCOREbinding(struct soap*, const char*, int, const uddi2__save_USCOREbinding *, const char*);
+SOAP_FMAC3 uddi2__save_USCOREbinding * SOAP_FMAC4 soap_get_uddi2__save_USCOREbinding(struct soap*, uddi2__save_USCOREbinding *, const char*, const char*);
+SOAP_FMAC3 uddi2__save_USCOREbinding * SOAP_FMAC4 soap_in_uddi2__save_USCOREbinding(struct soap*, const char*, uddi2__save_USCOREbinding *, const char*);
+
+SOAP_FMAC5 uddi2__save_USCOREbinding * SOAP_FMAC6 soap_new_uddi2__save_USCOREbinding(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__save_USCOREbinding(struct soap*, uddi2__save_USCOREbinding*);
+SOAP_FMAC5 uddi2__save_USCOREbinding * SOAP_FMAC6 soap_instantiate_uddi2__save_USCOREbinding(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__save_USCOREbinding(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__get_USCOREtModelDetail
+#define SOAP_TYPE_uddi2__get_USCOREtModelDetail (72)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__get_USCOREtModelDetail(struct soap*, const char*, int, const uddi2__get_USCOREtModelDetail *, const char*);
+SOAP_FMAC3 uddi2__get_USCOREtModelDetail * SOAP_FMAC4 soap_get_uddi2__get_USCOREtModelDetail(struct soap*, uddi2__get_USCOREtModelDetail *, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREtModelDetail * SOAP_FMAC4 soap_in_uddi2__get_USCOREtModelDetail(struct soap*, const char*, uddi2__get_USCOREtModelDetail *, const char*);
+
+SOAP_FMAC5 uddi2__get_USCOREtModelDetail * SOAP_FMAC6 soap_new_uddi2__get_USCOREtModelDetail(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__get_USCOREtModelDetail(struct soap*, uddi2__get_USCOREtModelDetail*);
+SOAP_FMAC5 uddi2__get_USCOREtModelDetail * SOAP_FMAC6 soap_instantiate_uddi2__get_USCOREtModelDetail(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__get_USCOREtModelDetail(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__get_USCOREserviceDetail
+#define SOAP_TYPE_uddi2__get_USCOREserviceDetail (71)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__get_USCOREserviceDetail(struct soap*, const char*, int, const uddi2__get_USCOREserviceDetail *, const char*);
+SOAP_FMAC3 uddi2__get_USCOREserviceDetail * SOAP_FMAC4 soap_get_uddi2__get_USCOREserviceDetail(struct soap*, uddi2__get_USCOREserviceDetail *, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREserviceDetail * SOAP_FMAC4 soap_in_uddi2__get_USCOREserviceDetail(struct soap*, const char*, uddi2__get_USCOREserviceDetail *, const char*);
+
+SOAP_FMAC5 uddi2__get_USCOREserviceDetail * SOAP_FMAC6 soap_new_uddi2__get_USCOREserviceDetail(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__get_USCOREserviceDetail(struct soap*, uddi2__get_USCOREserviceDetail*);
+SOAP_FMAC5 uddi2__get_USCOREserviceDetail * SOAP_FMAC6 soap_instantiate_uddi2__get_USCOREserviceDetail(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__get_USCOREserviceDetail(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__get_USCOREregisteredInfo
+#define SOAP_TYPE_uddi2__get_USCOREregisteredInfo (70)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__get_USCOREregisteredInfo(struct soap*, const char*, int, const uddi2__get_USCOREregisteredInfo *, const char*);
+SOAP_FMAC3 uddi2__get_USCOREregisteredInfo * SOAP_FMAC4 soap_get_uddi2__get_USCOREregisteredInfo(struct soap*, uddi2__get_USCOREregisteredInfo *, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREregisteredInfo * SOAP_FMAC4 soap_in_uddi2__get_USCOREregisteredInfo(struct soap*, const char*, uddi2__get_USCOREregisteredInfo *, const char*);
+
+SOAP_FMAC5 uddi2__get_USCOREregisteredInfo * SOAP_FMAC6 soap_new_uddi2__get_USCOREregisteredInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__get_USCOREregisteredInfo(struct soap*, uddi2__get_USCOREregisteredInfo*);
+SOAP_FMAC5 uddi2__get_USCOREregisteredInfo * SOAP_FMAC6 soap_instantiate_uddi2__get_USCOREregisteredInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__get_USCOREregisteredInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__get_USCOREpublisherAssertions
+#define SOAP_TYPE_uddi2__get_USCOREpublisherAssertions (69)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__get_USCOREpublisherAssertions(struct soap*, const char*, int, const uddi2__get_USCOREpublisherAssertions *, const char*);
+SOAP_FMAC3 uddi2__get_USCOREpublisherAssertions * SOAP_FMAC4 soap_get_uddi2__get_USCOREpublisherAssertions(struct soap*, uddi2__get_USCOREpublisherAssertions *, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREpublisherAssertions * SOAP_FMAC4 soap_in_uddi2__get_USCOREpublisherAssertions(struct soap*, const char*, uddi2__get_USCOREpublisherAssertions *, const char*);
+
+SOAP_FMAC5 uddi2__get_USCOREpublisherAssertions * SOAP_FMAC6 soap_new_uddi2__get_USCOREpublisherAssertions(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__get_USCOREpublisherAssertions(struct soap*, uddi2__get_USCOREpublisherAssertions*);
+SOAP_FMAC5 uddi2__get_USCOREpublisherAssertions * SOAP_FMAC6 soap_instantiate_uddi2__get_USCOREpublisherAssertions(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__get_USCOREpublisherAssertions(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__get_USCOREbusinessDetailExt
+#define SOAP_TYPE_uddi2__get_USCOREbusinessDetailExt (68)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__get_USCOREbusinessDetailExt(struct soap*, const char*, int, const uddi2__get_USCOREbusinessDetailExt *, const char*);
+SOAP_FMAC3 uddi2__get_USCOREbusinessDetailExt * SOAP_FMAC4 soap_get_uddi2__get_USCOREbusinessDetailExt(struct soap*, uddi2__get_USCOREbusinessDetailExt *, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREbusinessDetailExt * SOAP_FMAC4 soap_in_uddi2__get_USCOREbusinessDetailExt(struct soap*, const char*, uddi2__get_USCOREbusinessDetailExt *, const char*);
+
+SOAP_FMAC5 uddi2__get_USCOREbusinessDetailExt * SOAP_FMAC6 soap_new_uddi2__get_USCOREbusinessDetailExt(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__get_USCOREbusinessDetailExt(struct soap*, uddi2__get_USCOREbusinessDetailExt*);
+SOAP_FMAC5 uddi2__get_USCOREbusinessDetailExt * SOAP_FMAC6 soap_instantiate_uddi2__get_USCOREbusinessDetailExt(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__get_USCOREbusinessDetailExt(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__get_USCOREbusinessDetail
+#define SOAP_TYPE_uddi2__get_USCOREbusinessDetail (67)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__get_USCOREbusinessDetail(struct soap*, const char*, int, const uddi2__get_USCOREbusinessDetail *, const char*);
+SOAP_FMAC3 uddi2__get_USCOREbusinessDetail * SOAP_FMAC4 soap_get_uddi2__get_USCOREbusinessDetail(struct soap*, uddi2__get_USCOREbusinessDetail *, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREbusinessDetail * SOAP_FMAC4 soap_in_uddi2__get_USCOREbusinessDetail(struct soap*, const char*, uddi2__get_USCOREbusinessDetail *, const char*);
+
+SOAP_FMAC5 uddi2__get_USCOREbusinessDetail * SOAP_FMAC6 soap_new_uddi2__get_USCOREbusinessDetail(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__get_USCOREbusinessDetail(struct soap*, uddi2__get_USCOREbusinessDetail*);
+SOAP_FMAC5 uddi2__get_USCOREbusinessDetail * SOAP_FMAC6 soap_instantiate_uddi2__get_USCOREbusinessDetail(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__get_USCOREbusinessDetail(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__get_USCOREbindingDetail
+#define SOAP_TYPE_uddi2__get_USCOREbindingDetail (66)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__get_USCOREbindingDetail(struct soap*, const char*, int, const uddi2__get_USCOREbindingDetail *, const char*);
+SOAP_FMAC3 uddi2__get_USCOREbindingDetail * SOAP_FMAC4 soap_get_uddi2__get_USCOREbindingDetail(struct soap*, uddi2__get_USCOREbindingDetail *, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREbindingDetail * SOAP_FMAC4 soap_in_uddi2__get_USCOREbindingDetail(struct soap*, const char*, uddi2__get_USCOREbindingDetail *, const char*);
+
+SOAP_FMAC5 uddi2__get_USCOREbindingDetail * SOAP_FMAC6 soap_new_uddi2__get_USCOREbindingDetail(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__get_USCOREbindingDetail(struct soap*, uddi2__get_USCOREbindingDetail*);
+SOAP_FMAC5 uddi2__get_USCOREbindingDetail * SOAP_FMAC6 soap_instantiate_uddi2__get_USCOREbindingDetail(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__get_USCOREbindingDetail(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__get_USCOREauthToken
+#define SOAP_TYPE_uddi2__get_USCOREauthToken (65)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__get_USCOREauthToken(struct soap*, const char*, int, const uddi2__get_USCOREauthToken *, const char*);
+SOAP_FMAC3 uddi2__get_USCOREauthToken * SOAP_FMAC4 soap_get_uddi2__get_USCOREauthToken(struct soap*, uddi2__get_USCOREauthToken *, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREauthToken * SOAP_FMAC4 soap_in_uddi2__get_USCOREauthToken(struct soap*, const char*, uddi2__get_USCOREauthToken *, const char*);
+
+SOAP_FMAC5 uddi2__get_USCOREauthToken * SOAP_FMAC6 soap_new_uddi2__get_USCOREauthToken(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__get_USCOREauthToken(struct soap*, uddi2__get_USCOREauthToken*);
+SOAP_FMAC5 uddi2__get_USCOREauthToken * SOAP_FMAC6 soap_instantiate_uddi2__get_USCOREauthToken(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__get_USCOREauthToken(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__get_USCOREassertionStatusReport
+#define SOAP_TYPE_uddi2__get_USCOREassertionStatusReport (64)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__get_USCOREassertionStatusReport(struct soap*, const char*, int, const uddi2__get_USCOREassertionStatusReport *, const char*);
+SOAP_FMAC3 uddi2__get_USCOREassertionStatusReport * SOAP_FMAC4 soap_get_uddi2__get_USCOREassertionStatusReport(struct soap*, uddi2__get_USCOREassertionStatusReport *, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREassertionStatusReport * SOAP_FMAC4 soap_in_uddi2__get_USCOREassertionStatusReport(struct soap*, const char*, uddi2__get_USCOREassertionStatusReport *, const char*);
+
+SOAP_FMAC5 uddi2__get_USCOREassertionStatusReport * SOAP_FMAC6 soap_new_uddi2__get_USCOREassertionStatusReport(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__get_USCOREassertionStatusReport(struct soap*, uddi2__get_USCOREassertionStatusReport*);
+SOAP_FMAC5 uddi2__get_USCOREassertionStatusReport * SOAP_FMAC6 soap_instantiate_uddi2__get_USCOREassertionStatusReport(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__get_USCOREassertionStatusReport(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__find_USCOREtModel
+#define SOAP_TYPE_uddi2__find_USCOREtModel (63)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__find_USCOREtModel(struct soap*, const char*, int, const uddi2__find_USCOREtModel *, const char*);
+SOAP_FMAC3 uddi2__find_USCOREtModel * SOAP_FMAC4 soap_get_uddi2__find_USCOREtModel(struct soap*, uddi2__find_USCOREtModel *, const char*, const char*);
+SOAP_FMAC3 uddi2__find_USCOREtModel * SOAP_FMAC4 soap_in_uddi2__find_USCOREtModel(struct soap*, const char*, uddi2__find_USCOREtModel *, const char*);
+
+SOAP_FMAC5 uddi2__find_USCOREtModel * SOAP_FMAC6 soap_new_uddi2__find_USCOREtModel(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__find_USCOREtModel(struct soap*, uddi2__find_USCOREtModel*);
+SOAP_FMAC5 uddi2__find_USCOREtModel * SOAP_FMAC6 soap_instantiate_uddi2__find_USCOREtModel(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__find_USCOREtModel(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__find_USCOREservice
+#define SOAP_TYPE_uddi2__find_USCOREservice (62)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__find_USCOREservice(struct soap*, const char*, int, const uddi2__find_USCOREservice *, const char*);
+SOAP_FMAC3 uddi2__find_USCOREservice * SOAP_FMAC4 soap_get_uddi2__find_USCOREservice(struct soap*, uddi2__find_USCOREservice *, const char*, const char*);
+SOAP_FMAC3 uddi2__find_USCOREservice * SOAP_FMAC4 soap_in_uddi2__find_USCOREservice(struct soap*, const char*, uddi2__find_USCOREservice *, const char*);
+
+SOAP_FMAC5 uddi2__find_USCOREservice * SOAP_FMAC6 soap_new_uddi2__find_USCOREservice(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__find_USCOREservice(struct soap*, uddi2__find_USCOREservice*);
+SOAP_FMAC5 uddi2__find_USCOREservice * SOAP_FMAC6 soap_instantiate_uddi2__find_USCOREservice(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__find_USCOREservice(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__find_USCORErelatedBusinesses
+#define SOAP_TYPE_uddi2__find_USCORErelatedBusinesses (61)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__find_USCORErelatedBusinesses(struct soap*, const char*, int, const uddi2__find_USCORErelatedBusinesses *, const char*);
+SOAP_FMAC3 uddi2__find_USCORErelatedBusinesses * SOAP_FMAC4 soap_get_uddi2__find_USCORErelatedBusinesses(struct soap*, uddi2__find_USCORErelatedBusinesses *, const char*, const char*);
+SOAP_FMAC3 uddi2__find_USCORErelatedBusinesses * SOAP_FMAC4 soap_in_uddi2__find_USCORErelatedBusinesses(struct soap*, const char*, uddi2__find_USCORErelatedBusinesses *, const char*);
+
+SOAP_FMAC5 uddi2__find_USCORErelatedBusinesses * SOAP_FMAC6 soap_new_uddi2__find_USCORErelatedBusinesses(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__find_USCORErelatedBusinesses(struct soap*, uddi2__find_USCORErelatedBusinesses*);
+SOAP_FMAC5 uddi2__find_USCORErelatedBusinesses * SOAP_FMAC6 soap_instantiate_uddi2__find_USCORErelatedBusinesses(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__find_USCORErelatedBusinesses(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__find_USCOREbusiness
+#define SOAP_TYPE_uddi2__find_USCOREbusiness (60)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__find_USCOREbusiness(struct soap*, const char*, int, const uddi2__find_USCOREbusiness *, const char*);
+SOAP_FMAC3 uddi2__find_USCOREbusiness * SOAP_FMAC4 soap_get_uddi2__find_USCOREbusiness(struct soap*, uddi2__find_USCOREbusiness *, const char*, const char*);
+SOAP_FMAC3 uddi2__find_USCOREbusiness * SOAP_FMAC4 soap_in_uddi2__find_USCOREbusiness(struct soap*, const char*, uddi2__find_USCOREbusiness *, const char*);
+
+SOAP_FMAC5 uddi2__find_USCOREbusiness * SOAP_FMAC6 soap_new_uddi2__find_USCOREbusiness(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__find_USCOREbusiness(struct soap*, uddi2__find_USCOREbusiness*);
+SOAP_FMAC5 uddi2__find_USCOREbusiness * SOAP_FMAC6 soap_instantiate_uddi2__find_USCOREbusiness(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__find_USCOREbusiness(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__find_USCOREbinding
+#define SOAP_TYPE_uddi2__find_USCOREbinding (59)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__find_USCOREbinding(struct soap*, const char*, int, const uddi2__find_USCOREbinding *, const char*);
+SOAP_FMAC3 uddi2__find_USCOREbinding * SOAP_FMAC4 soap_get_uddi2__find_USCOREbinding(struct soap*, uddi2__find_USCOREbinding *, const char*, const char*);
+SOAP_FMAC3 uddi2__find_USCOREbinding * SOAP_FMAC4 soap_in_uddi2__find_USCOREbinding(struct soap*, const char*, uddi2__find_USCOREbinding *, const char*);
+
+SOAP_FMAC5 uddi2__find_USCOREbinding * SOAP_FMAC6 soap_new_uddi2__find_USCOREbinding(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__find_USCOREbinding(struct soap*, uddi2__find_USCOREbinding*);
+SOAP_FMAC5 uddi2__find_USCOREbinding * SOAP_FMAC6 soap_instantiate_uddi2__find_USCOREbinding(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__find_USCOREbinding(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__discard_USCOREauthToken
+#define SOAP_TYPE_uddi2__discard_USCOREauthToken (58)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__discard_USCOREauthToken(struct soap*, const char*, int, const uddi2__discard_USCOREauthToken *, const char*);
+SOAP_FMAC3 uddi2__discard_USCOREauthToken * SOAP_FMAC4 soap_get_uddi2__discard_USCOREauthToken(struct soap*, uddi2__discard_USCOREauthToken *, const char*, const char*);
+SOAP_FMAC3 uddi2__discard_USCOREauthToken * SOAP_FMAC4 soap_in_uddi2__discard_USCOREauthToken(struct soap*, const char*, uddi2__discard_USCOREauthToken *, const char*);
+
+SOAP_FMAC5 uddi2__discard_USCOREauthToken * SOAP_FMAC6 soap_new_uddi2__discard_USCOREauthToken(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__discard_USCOREauthToken(struct soap*, uddi2__discard_USCOREauthToken*);
+SOAP_FMAC5 uddi2__discard_USCOREauthToken * SOAP_FMAC6 soap_instantiate_uddi2__discard_USCOREauthToken(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__discard_USCOREauthToken(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__delete_USCOREtModel
+#define SOAP_TYPE_uddi2__delete_USCOREtModel (57)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__delete_USCOREtModel(struct soap*, const char*, int, const uddi2__delete_USCOREtModel *, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREtModel * SOAP_FMAC4 soap_get_uddi2__delete_USCOREtModel(struct soap*, uddi2__delete_USCOREtModel *, const char*, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREtModel * SOAP_FMAC4 soap_in_uddi2__delete_USCOREtModel(struct soap*, const char*, uddi2__delete_USCOREtModel *, const char*);
+
+SOAP_FMAC5 uddi2__delete_USCOREtModel * SOAP_FMAC6 soap_new_uddi2__delete_USCOREtModel(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__delete_USCOREtModel(struct soap*, uddi2__delete_USCOREtModel*);
+SOAP_FMAC5 uddi2__delete_USCOREtModel * SOAP_FMAC6 soap_instantiate_uddi2__delete_USCOREtModel(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__delete_USCOREtModel(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__delete_USCOREservice
+#define SOAP_TYPE_uddi2__delete_USCOREservice (56)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__delete_USCOREservice(struct soap*, const char*, int, const uddi2__delete_USCOREservice *, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREservice * SOAP_FMAC4 soap_get_uddi2__delete_USCOREservice(struct soap*, uddi2__delete_USCOREservice *, const char*, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREservice * SOAP_FMAC4 soap_in_uddi2__delete_USCOREservice(struct soap*, const char*, uddi2__delete_USCOREservice *, const char*);
+
+SOAP_FMAC5 uddi2__delete_USCOREservice * SOAP_FMAC6 soap_new_uddi2__delete_USCOREservice(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__delete_USCOREservice(struct soap*, uddi2__delete_USCOREservice*);
+SOAP_FMAC5 uddi2__delete_USCOREservice * SOAP_FMAC6 soap_instantiate_uddi2__delete_USCOREservice(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__delete_USCOREservice(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__delete_USCOREpublisherAssertions
+#define SOAP_TYPE_uddi2__delete_USCOREpublisherAssertions (55)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__delete_USCOREpublisherAssertions(struct soap*, const char*, int, const uddi2__delete_USCOREpublisherAssertions *, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREpublisherAssertions * SOAP_FMAC4 soap_get_uddi2__delete_USCOREpublisherAssertions(struct soap*, uddi2__delete_USCOREpublisherAssertions *, const char*, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREpublisherAssertions * SOAP_FMAC4 soap_in_uddi2__delete_USCOREpublisherAssertions(struct soap*, const char*, uddi2__delete_USCOREpublisherAssertions *, const char*);
+
+SOAP_FMAC5 uddi2__delete_USCOREpublisherAssertions * SOAP_FMAC6 soap_new_uddi2__delete_USCOREpublisherAssertions(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__delete_USCOREpublisherAssertions(struct soap*, uddi2__delete_USCOREpublisherAssertions*);
+SOAP_FMAC5 uddi2__delete_USCOREpublisherAssertions * SOAP_FMAC6 soap_instantiate_uddi2__delete_USCOREpublisherAssertions(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__delete_USCOREpublisherAssertions(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__delete_USCOREbusiness
+#define SOAP_TYPE_uddi2__delete_USCOREbusiness (54)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__delete_USCOREbusiness(struct soap*, const char*, int, const uddi2__delete_USCOREbusiness *, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREbusiness * SOAP_FMAC4 soap_get_uddi2__delete_USCOREbusiness(struct soap*, uddi2__delete_USCOREbusiness *, const char*, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREbusiness * SOAP_FMAC4 soap_in_uddi2__delete_USCOREbusiness(struct soap*, const char*, uddi2__delete_USCOREbusiness *, const char*);
+
+SOAP_FMAC5 uddi2__delete_USCOREbusiness * SOAP_FMAC6 soap_new_uddi2__delete_USCOREbusiness(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__delete_USCOREbusiness(struct soap*, uddi2__delete_USCOREbusiness*);
+SOAP_FMAC5 uddi2__delete_USCOREbusiness * SOAP_FMAC6 soap_instantiate_uddi2__delete_USCOREbusiness(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__delete_USCOREbusiness(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__delete_USCOREbinding
+#define SOAP_TYPE_uddi2__delete_USCOREbinding (53)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__delete_USCOREbinding(struct soap*, const char*, int, const uddi2__delete_USCOREbinding *, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREbinding * SOAP_FMAC4 soap_get_uddi2__delete_USCOREbinding(struct soap*, uddi2__delete_USCOREbinding *, const char*, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREbinding * SOAP_FMAC4 soap_in_uddi2__delete_USCOREbinding(struct soap*, const char*, uddi2__delete_USCOREbinding *, const char*);
+
+SOAP_FMAC5 uddi2__delete_USCOREbinding * SOAP_FMAC6 soap_new_uddi2__delete_USCOREbinding(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__delete_USCOREbinding(struct soap*, uddi2__delete_USCOREbinding*);
+SOAP_FMAC5 uddi2__delete_USCOREbinding * SOAP_FMAC6 soap_instantiate_uddi2__delete_USCOREbinding(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__delete_USCOREbinding(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__add_USCOREpublisherAssertions
+#define SOAP_TYPE_uddi2__add_USCOREpublisherAssertions (52)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__add_USCOREpublisherAssertions(struct soap*, const char*, int, const uddi2__add_USCOREpublisherAssertions *, const char*);
+SOAP_FMAC3 uddi2__add_USCOREpublisherAssertions * SOAP_FMAC4 soap_get_uddi2__add_USCOREpublisherAssertions(struct soap*, uddi2__add_USCOREpublisherAssertions *, const char*, const char*);
+SOAP_FMAC3 uddi2__add_USCOREpublisherAssertions * SOAP_FMAC4 soap_in_uddi2__add_USCOREpublisherAssertions(struct soap*, const char*, uddi2__add_USCOREpublisherAssertions *, const char*);
+
+SOAP_FMAC5 uddi2__add_USCOREpublisherAssertions * SOAP_FMAC6 soap_new_uddi2__add_USCOREpublisherAssertions(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__add_USCOREpublisherAssertions(struct soap*, uddi2__add_USCOREpublisherAssertions*);
+SOAP_FMAC5 uddi2__add_USCOREpublisherAssertions * SOAP_FMAC6 soap_instantiate_uddi2__add_USCOREpublisherAssertions(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__add_USCOREpublisherAssertions(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__tModelInstanceInfo
+#define SOAP_TYPE_uddi2__tModelInstanceInfo (51)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__tModelInstanceInfo(struct soap*, const char*, int, const uddi2__tModelInstanceInfo *, const char*);
+SOAP_FMAC3 uddi2__tModelInstanceInfo * SOAP_FMAC4 soap_get_uddi2__tModelInstanceInfo(struct soap*, uddi2__tModelInstanceInfo *, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelInstanceInfo * SOAP_FMAC4 soap_in_uddi2__tModelInstanceInfo(struct soap*, const char*, uddi2__tModelInstanceInfo *, const char*);
+
+SOAP_FMAC5 uddi2__tModelInstanceInfo * SOAP_FMAC6 soap_new_uddi2__tModelInstanceInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__tModelInstanceInfo(struct soap*, uddi2__tModelInstanceInfo*);
+SOAP_FMAC5 uddi2__tModelInstanceInfo * SOAP_FMAC6 soap_instantiate_uddi2__tModelInstanceInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__tModelInstanceInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__tModelInstanceDetails
+#define SOAP_TYPE_uddi2__tModelInstanceDetails (50)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__tModelInstanceDetails(struct soap*, const char*, int, const uddi2__tModelInstanceDetails *, const char*);
+SOAP_FMAC3 uddi2__tModelInstanceDetails * SOAP_FMAC4 soap_get_uddi2__tModelInstanceDetails(struct soap*, uddi2__tModelInstanceDetails *, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelInstanceDetails * SOAP_FMAC4 soap_in_uddi2__tModelInstanceDetails(struct soap*, const char*, uddi2__tModelInstanceDetails *, const char*);
+
+SOAP_FMAC5 uddi2__tModelInstanceDetails * SOAP_FMAC6 soap_new_uddi2__tModelInstanceDetails(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__tModelInstanceDetails(struct soap*, uddi2__tModelInstanceDetails*);
+SOAP_FMAC5 uddi2__tModelInstanceDetails * SOAP_FMAC6 soap_instantiate_uddi2__tModelInstanceDetails(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__tModelInstanceDetails(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__tModelInfos
+#define SOAP_TYPE_uddi2__tModelInfos (49)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__tModelInfos(struct soap*, const char*, int, const uddi2__tModelInfos *, const char*);
+SOAP_FMAC3 uddi2__tModelInfos * SOAP_FMAC4 soap_get_uddi2__tModelInfos(struct soap*, uddi2__tModelInfos *, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelInfos * SOAP_FMAC4 soap_in_uddi2__tModelInfos(struct soap*, const char*, uddi2__tModelInfos *, const char*);
+
+SOAP_FMAC5 uddi2__tModelInfos * SOAP_FMAC6 soap_new_uddi2__tModelInfos(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__tModelInfos(struct soap*, uddi2__tModelInfos*);
+SOAP_FMAC5 uddi2__tModelInfos * SOAP_FMAC6 soap_instantiate_uddi2__tModelInfos(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__tModelInfos(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__tModelInfo
+#define SOAP_TYPE_uddi2__tModelInfo (48)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__tModelInfo(struct soap*, const char*, int, const uddi2__tModelInfo *, const char*);
+SOAP_FMAC3 uddi2__tModelInfo * SOAP_FMAC4 soap_get_uddi2__tModelInfo(struct soap*, uddi2__tModelInfo *, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelInfo * SOAP_FMAC4 soap_in_uddi2__tModelInfo(struct soap*, const char*, uddi2__tModelInfo *, const char*);
+
+SOAP_FMAC5 uddi2__tModelInfo * SOAP_FMAC6 soap_new_uddi2__tModelInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__tModelInfo(struct soap*, uddi2__tModelInfo*);
+SOAP_FMAC5 uddi2__tModelInfo * SOAP_FMAC6 soap_instantiate_uddi2__tModelInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__tModelInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__tModelBag
+#define SOAP_TYPE_uddi2__tModelBag (47)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__tModelBag(struct soap*, const char*, int, const uddi2__tModelBag *, const char*);
+SOAP_FMAC3 uddi2__tModelBag * SOAP_FMAC4 soap_get_uddi2__tModelBag(struct soap*, uddi2__tModelBag *, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelBag * SOAP_FMAC4 soap_in_uddi2__tModelBag(struct soap*, const char*, uddi2__tModelBag *, const char*);
+
+SOAP_FMAC5 uddi2__tModelBag * SOAP_FMAC6 soap_new_uddi2__tModelBag(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__tModelBag(struct soap*, uddi2__tModelBag*);
+SOAP_FMAC5 uddi2__tModelBag * SOAP_FMAC6 soap_instantiate_uddi2__tModelBag(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__tModelBag(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__tModel
+#define SOAP_TYPE_uddi2__tModel (46)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__tModel(struct soap*, const char*, int, const uddi2__tModel *, const char*);
+SOAP_FMAC3 uddi2__tModel * SOAP_FMAC4 soap_get_uddi2__tModel(struct soap*, uddi2__tModel *, const char*, const char*);
+SOAP_FMAC3 uddi2__tModel * SOAP_FMAC4 soap_in_uddi2__tModel(struct soap*, const char*, uddi2__tModel *, const char*);
+
+SOAP_FMAC5 uddi2__tModel * SOAP_FMAC6 soap_new_uddi2__tModel(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__tModel(struct soap*, uddi2__tModel*);
+SOAP_FMAC5 uddi2__tModel * SOAP_FMAC6 soap_instantiate_uddi2__tModel(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__tModel(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__sharedRelationships
+#define SOAP_TYPE_uddi2__sharedRelationships (45)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__sharedRelationships(struct soap*, const char*, int, const uddi2__sharedRelationships *, const char*);
+SOAP_FMAC3 uddi2__sharedRelationships * SOAP_FMAC4 soap_get_uddi2__sharedRelationships(struct soap*, uddi2__sharedRelationships *, const char*, const char*);
+SOAP_FMAC3 uddi2__sharedRelationships * SOAP_FMAC4 soap_in_uddi2__sharedRelationships(struct soap*, const char*, uddi2__sharedRelationships *, const char*);
+
+SOAP_FMAC5 uddi2__sharedRelationships * SOAP_FMAC6 soap_new_uddi2__sharedRelationships(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__sharedRelationships(struct soap*, uddi2__sharedRelationships*);
+SOAP_FMAC5 uddi2__sharedRelationships * SOAP_FMAC6 soap_instantiate_uddi2__sharedRelationships(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__sharedRelationships(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__serviceInfos
+#define SOAP_TYPE_uddi2__serviceInfos (44)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__serviceInfos(struct soap*, const char*, int, const uddi2__serviceInfos *, const char*);
+SOAP_FMAC3 uddi2__serviceInfos * SOAP_FMAC4 soap_get_uddi2__serviceInfos(struct soap*, uddi2__serviceInfos *, const char*, const char*);
+SOAP_FMAC3 uddi2__serviceInfos * SOAP_FMAC4 soap_in_uddi2__serviceInfos(struct soap*, const char*, uddi2__serviceInfos *, const char*);
+
+SOAP_FMAC5 uddi2__serviceInfos * SOAP_FMAC6 soap_new_uddi2__serviceInfos(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__serviceInfos(struct soap*, uddi2__serviceInfos*);
+SOAP_FMAC5 uddi2__serviceInfos * SOAP_FMAC6 soap_instantiate_uddi2__serviceInfos(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__serviceInfos(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__serviceInfo
+#define SOAP_TYPE_uddi2__serviceInfo (43)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__serviceInfo(struct soap*, const char*, int, const uddi2__serviceInfo *, const char*);
+SOAP_FMAC3 uddi2__serviceInfo * SOAP_FMAC4 soap_get_uddi2__serviceInfo(struct soap*, uddi2__serviceInfo *, const char*, const char*);
+SOAP_FMAC3 uddi2__serviceInfo * SOAP_FMAC4 soap_in_uddi2__serviceInfo(struct soap*, const char*, uddi2__serviceInfo *, const char*);
+
+SOAP_FMAC5 uddi2__serviceInfo * SOAP_FMAC6 soap_new_uddi2__serviceInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__serviceInfo(struct soap*, uddi2__serviceInfo*);
+SOAP_FMAC5 uddi2__serviceInfo * SOAP_FMAC6 soap_instantiate_uddi2__serviceInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__serviceInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__result
+#define SOAP_TYPE_uddi2__result (42)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__result(struct soap*, const char*, int, const uddi2__result *, const char*);
+SOAP_FMAC3 uddi2__result * SOAP_FMAC4 soap_get_uddi2__result(struct soap*, uddi2__result *, const char*, const char*);
+SOAP_FMAC3 uddi2__result * SOAP_FMAC4 soap_in_uddi2__result(struct soap*, const char*, uddi2__result *, const char*);
+
+SOAP_FMAC5 uddi2__result * SOAP_FMAC6 soap_new_uddi2__result(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__result(struct soap*, uddi2__result*);
+SOAP_FMAC5 uddi2__result * SOAP_FMAC6 soap_instantiate_uddi2__result(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__result(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__relatedBusinessInfos
+#define SOAP_TYPE_uddi2__relatedBusinessInfos (41)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__relatedBusinessInfos(struct soap*, const char*, int, const uddi2__relatedBusinessInfos *, const char*);
+SOAP_FMAC3 uddi2__relatedBusinessInfos * SOAP_FMAC4 soap_get_uddi2__relatedBusinessInfos(struct soap*, uddi2__relatedBusinessInfos *, const char*, const char*);
+SOAP_FMAC3 uddi2__relatedBusinessInfos * SOAP_FMAC4 soap_in_uddi2__relatedBusinessInfos(struct soap*, const char*, uddi2__relatedBusinessInfos *, const char*);
+
+SOAP_FMAC5 uddi2__relatedBusinessInfos * SOAP_FMAC6 soap_new_uddi2__relatedBusinessInfos(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__relatedBusinessInfos(struct soap*, uddi2__relatedBusinessInfos*);
+SOAP_FMAC5 uddi2__relatedBusinessInfos * SOAP_FMAC6 soap_instantiate_uddi2__relatedBusinessInfos(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__relatedBusinessInfos(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__relatedBusinessInfo
+#define SOAP_TYPE_uddi2__relatedBusinessInfo (40)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__relatedBusinessInfo(struct soap*, const char*, int, const uddi2__relatedBusinessInfo *, const char*);
+SOAP_FMAC3 uddi2__relatedBusinessInfo * SOAP_FMAC4 soap_get_uddi2__relatedBusinessInfo(struct soap*, uddi2__relatedBusinessInfo *, const char*, const char*);
+SOAP_FMAC3 uddi2__relatedBusinessInfo * SOAP_FMAC4 soap_in_uddi2__relatedBusinessInfo(struct soap*, const char*, uddi2__relatedBusinessInfo *, const char*);
+
+SOAP_FMAC5 uddi2__relatedBusinessInfo * SOAP_FMAC6 soap_new_uddi2__relatedBusinessInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__relatedBusinessInfo(struct soap*, uddi2__relatedBusinessInfo*);
+SOAP_FMAC5 uddi2__relatedBusinessInfo * SOAP_FMAC6 soap_instantiate_uddi2__relatedBusinessInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__relatedBusinessInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__publisherAssertion
+#define SOAP_TYPE_uddi2__publisherAssertion (39)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__publisherAssertion(struct soap*, const char*, int, const uddi2__publisherAssertion *, const char*);
+SOAP_FMAC3 uddi2__publisherAssertion * SOAP_FMAC4 soap_get_uddi2__publisherAssertion(struct soap*, uddi2__publisherAssertion *, const char*, const char*);
+SOAP_FMAC3 uddi2__publisherAssertion * SOAP_FMAC4 soap_in_uddi2__publisherAssertion(struct soap*, const char*, uddi2__publisherAssertion *, const char*);
+
+SOAP_FMAC5 uddi2__publisherAssertion * SOAP_FMAC6 soap_new_uddi2__publisherAssertion(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__publisherAssertion(struct soap*, uddi2__publisherAssertion*);
+SOAP_FMAC5 uddi2__publisherAssertion * SOAP_FMAC6 soap_instantiate_uddi2__publisherAssertion(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__publisherAssertion(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__phone
+#define SOAP_TYPE_uddi2__phone (38)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__phone(struct soap*, const char*, int, const uddi2__phone *, const char*);
+SOAP_FMAC3 uddi2__phone * SOAP_FMAC4 soap_get_uddi2__phone(struct soap*, uddi2__phone *, const char*, const char*);
+SOAP_FMAC3 uddi2__phone * SOAP_FMAC4 soap_in_uddi2__phone(struct soap*, const char*, uddi2__phone *, const char*);
+
+SOAP_FMAC5 uddi2__phone * SOAP_FMAC6 soap_new_uddi2__phone(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__phone(struct soap*, uddi2__phone*);
+SOAP_FMAC5 uddi2__phone * SOAP_FMAC6 soap_instantiate_uddi2__phone(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__phone(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__overviewDoc
+#define SOAP_TYPE_uddi2__overviewDoc (37)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__overviewDoc(struct soap*, const char*, int, const uddi2__overviewDoc *, const char*);
+SOAP_FMAC3 uddi2__overviewDoc * SOAP_FMAC4 soap_get_uddi2__overviewDoc(struct soap*, uddi2__overviewDoc *, const char*, const char*);
+SOAP_FMAC3 uddi2__overviewDoc * SOAP_FMAC4 soap_in_uddi2__overviewDoc(struct soap*, const char*, uddi2__overviewDoc *, const char*);
+
+SOAP_FMAC5 uddi2__overviewDoc * SOAP_FMAC6 soap_new_uddi2__overviewDoc(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__overviewDoc(struct soap*, uddi2__overviewDoc*);
+SOAP_FMAC5 uddi2__overviewDoc * SOAP_FMAC6 soap_instantiate_uddi2__overviewDoc(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__overviewDoc(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__name
+#define SOAP_TYPE_uddi2__name (36)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__name(struct soap*, const char*, int, const uddi2__name *, const char*);
+SOAP_FMAC3 uddi2__name * SOAP_FMAC4 soap_get_uddi2__name(struct soap*, uddi2__name *, const char*, const char*);
+SOAP_FMAC3 uddi2__name * SOAP_FMAC4 soap_in_uddi2__name(struct soap*, const char*, uddi2__name *, const char*);
+
+SOAP_FMAC5 uddi2__name * SOAP_FMAC6 soap_new_uddi2__name(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__name(struct soap*, uddi2__name*);
+SOAP_FMAC5 uddi2__name * SOAP_FMAC6 soap_instantiate_uddi2__name(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__name(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__keysOwned
+#define SOAP_TYPE_uddi2__keysOwned (35)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__keysOwned(struct soap*, const char*, int, const uddi2__keysOwned *, const char*);
+SOAP_FMAC3 uddi2__keysOwned * SOAP_FMAC4 soap_get_uddi2__keysOwned(struct soap*, uddi2__keysOwned *, const char*, const char*);
+SOAP_FMAC3 uddi2__keysOwned * SOAP_FMAC4 soap_in_uddi2__keysOwned(struct soap*, const char*, uddi2__keysOwned *, const char*);
+
+SOAP_FMAC5 uddi2__keysOwned * SOAP_FMAC6 soap_new_uddi2__keysOwned(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__keysOwned(struct soap*, uddi2__keysOwned*);
+SOAP_FMAC5 uddi2__keysOwned * SOAP_FMAC6 soap_instantiate_uddi2__keysOwned(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__keysOwned(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__keyedReference
+#define SOAP_TYPE_uddi2__keyedReference (34)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__keyedReference(struct soap*, const char*, int, const uddi2__keyedReference *, const char*);
+SOAP_FMAC3 uddi2__keyedReference * SOAP_FMAC4 soap_get_uddi2__keyedReference(struct soap*, uddi2__keyedReference *, const char*, const char*);
+SOAP_FMAC3 uddi2__keyedReference * SOAP_FMAC4 soap_in_uddi2__keyedReference(struct soap*, const char*, uddi2__keyedReference *, const char*);
+
+SOAP_FMAC5 uddi2__keyedReference * SOAP_FMAC6 soap_new_uddi2__keyedReference(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__keyedReference(struct soap*, uddi2__keyedReference*);
+SOAP_FMAC5 uddi2__keyedReference * SOAP_FMAC6 soap_instantiate_uddi2__keyedReference(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__keyedReference(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__instanceDetails
+#define SOAP_TYPE_uddi2__instanceDetails (33)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__instanceDetails(struct soap*, const char*, int, const uddi2__instanceDetails *, const char*);
+SOAP_FMAC3 uddi2__instanceDetails * SOAP_FMAC4 soap_get_uddi2__instanceDetails(struct soap*, uddi2__instanceDetails *, const char*, const char*);
+SOAP_FMAC3 uddi2__instanceDetails * SOAP_FMAC4 soap_in_uddi2__instanceDetails(struct soap*, const char*, uddi2__instanceDetails *, const char*);
+
+SOAP_FMAC5 uddi2__instanceDetails * SOAP_FMAC6 soap_new_uddi2__instanceDetails(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__instanceDetails(struct soap*, uddi2__instanceDetails*);
+SOAP_FMAC5 uddi2__instanceDetails * SOAP_FMAC6 soap_instantiate_uddi2__instanceDetails(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__instanceDetails(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__identifierBag
+#define SOAP_TYPE_uddi2__identifierBag (32)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__identifierBag(struct soap*, const char*, int, const uddi2__identifierBag *, const char*);
+SOAP_FMAC3 uddi2__identifierBag * SOAP_FMAC4 soap_get_uddi2__identifierBag(struct soap*, uddi2__identifierBag *, const char*, const char*);
+SOAP_FMAC3 uddi2__identifierBag * SOAP_FMAC4 soap_in_uddi2__identifierBag(struct soap*, const char*, uddi2__identifierBag *, const char*);
+
+SOAP_FMAC5 uddi2__identifierBag * SOAP_FMAC6 soap_new_uddi2__identifierBag(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__identifierBag(struct soap*, uddi2__identifierBag*);
+SOAP_FMAC5 uddi2__identifierBag * SOAP_FMAC6 soap_instantiate_uddi2__identifierBag(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__identifierBag(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__hostingRedirector
+#define SOAP_TYPE_uddi2__hostingRedirector (31)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__hostingRedirector(struct soap*, const char*, int, const uddi2__hostingRedirector *, const char*);
+SOAP_FMAC3 uddi2__hostingRedirector * SOAP_FMAC4 soap_get_uddi2__hostingRedirector(struct soap*, uddi2__hostingRedirector *, const char*, const char*);
+SOAP_FMAC3 uddi2__hostingRedirector * SOAP_FMAC4 soap_in_uddi2__hostingRedirector(struct soap*, const char*, uddi2__hostingRedirector *, const char*);
+
+SOAP_FMAC5 uddi2__hostingRedirector * SOAP_FMAC6 soap_new_uddi2__hostingRedirector(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__hostingRedirector(struct soap*, uddi2__hostingRedirector*);
+SOAP_FMAC5 uddi2__hostingRedirector * SOAP_FMAC6 soap_instantiate_uddi2__hostingRedirector(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__hostingRedirector(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__findQualifiers
+#define SOAP_TYPE_uddi2__findQualifiers (30)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__findQualifiers(struct soap*, const char*, int, const uddi2__findQualifiers *, const char*);
+SOAP_FMAC3 uddi2__findQualifiers * SOAP_FMAC4 soap_get_uddi2__findQualifiers(struct soap*, uddi2__findQualifiers *, const char*, const char*);
+SOAP_FMAC3 uddi2__findQualifiers * SOAP_FMAC4 soap_in_uddi2__findQualifiers(struct soap*, const char*, uddi2__findQualifiers *, const char*);
+
+SOAP_FMAC5 uddi2__findQualifiers * SOAP_FMAC6 soap_new_uddi2__findQualifiers(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__findQualifiers(struct soap*, uddi2__findQualifiers*);
+SOAP_FMAC5 uddi2__findQualifiers * SOAP_FMAC6 soap_instantiate_uddi2__findQualifiers(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__findQualifiers(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__errInfo
+#define SOAP_TYPE_uddi2__errInfo (29)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__errInfo(struct soap*, const char*, int, const uddi2__errInfo *, const char*);
+SOAP_FMAC3 uddi2__errInfo * SOAP_FMAC4 soap_get_uddi2__errInfo(struct soap*, uddi2__errInfo *, const char*, const char*);
+SOAP_FMAC3 uddi2__errInfo * SOAP_FMAC4 soap_in_uddi2__errInfo(struct soap*, const char*, uddi2__errInfo *, const char*);
+
+SOAP_FMAC5 uddi2__errInfo * SOAP_FMAC6 soap_new_uddi2__errInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__errInfo(struct soap*, uddi2__errInfo*);
+SOAP_FMAC5 uddi2__errInfo * SOAP_FMAC6 soap_instantiate_uddi2__errInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__errInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__email
+#define SOAP_TYPE_uddi2__email (28)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__email(struct soap*, const char*, int, const uddi2__email *, const char*);
+SOAP_FMAC3 uddi2__email * SOAP_FMAC4 soap_get_uddi2__email(struct soap*, uddi2__email *, const char*, const char*);
+SOAP_FMAC3 uddi2__email * SOAP_FMAC4 soap_in_uddi2__email(struct soap*, const char*, uddi2__email *, const char*);
+
+SOAP_FMAC5 uddi2__email * SOAP_FMAC6 soap_new_uddi2__email(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__email(struct soap*, uddi2__email*);
+SOAP_FMAC5 uddi2__email * SOAP_FMAC6 soap_instantiate_uddi2__email(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__email(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__dispositionReport
+#define SOAP_TYPE_uddi2__dispositionReport (27)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__dispositionReport(struct soap*, const char*, int, const uddi2__dispositionReport *, const char*);
+SOAP_FMAC3 uddi2__dispositionReport * SOAP_FMAC4 soap_get_uddi2__dispositionReport(struct soap*, uddi2__dispositionReport *, const char*, const char*);
+SOAP_FMAC3 uddi2__dispositionReport * SOAP_FMAC4 soap_in_uddi2__dispositionReport(struct soap*, const char*, uddi2__dispositionReport *, const char*);
+
+SOAP_FMAC5 uddi2__dispositionReport * SOAP_FMAC6 soap_new_uddi2__dispositionReport(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__dispositionReport(struct soap*, uddi2__dispositionReport*);
+SOAP_FMAC5 uddi2__dispositionReport * SOAP_FMAC6 soap_instantiate_uddi2__dispositionReport(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__dispositionReport(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__discoveryURLs
+#define SOAP_TYPE_uddi2__discoveryURLs (26)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__discoveryURLs(struct soap*, const char*, int, const uddi2__discoveryURLs *, const char*);
+SOAP_FMAC3 uddi2__discoveryURLs * SOAP_FMAC4 soap_get_uddi2__discoveryURLs(struct soap*, uddi2__discoveryURLs *, const char*, const char*);
+SOAP_FMAC3 uddi2__discoveryURLs * SOAP_FMAC4 soap_in_uddi2__discoveryURLs(struct soap*, const char*, uddi2__discoveryURLs *, const char*);
+
+SOAP_FMAC5 uddi2__discoveryURLs * SOAP_FMAC6 soap_new_uddi2__discoveryURLs(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__discoveryURLs(struct soap*, uddi2__discoveryURLs*);
+SOAP_FMAC5 uddi2__discoveryURLs * SOAP_FMAC6 soap_instantiate_uddi2__discoveryURLs(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__discoveryURLs(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__discoveryURL
+#define SOAP_TYPE_uddi2__discoveryURL (25)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__discoveryURL(struct soap*, const char*, int, const uddi2__discoveryURL *, const char*);
+SOAP_FMAC3 uddi2__discoveryURL * SOAP_FMAC4 soap_get_uddi2__discoveryURL(struct soap*, uddi2__discoveryURL *, const char*, const char*);
+SOAP_FMAC3 uddi2__discoveryURL * SOAP_FMAC4 soap_in_uddi2__discoveryURL(struct soap*, const char*, uddi2__discoveryURL *, const char*);
+
+SOAP_FMAC5 uddi2__discoveryURL * SOAP_FMAC6 soap_new_uddi2__discoveryURL(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__discoveryURL(struct soap*, uddi2__discoveryURL*);
+SOAP_FMAC5 uddi2__discoveryURL * SOAP_FMAC6 soap_instantiate_uddi2__discoveryURL(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__discoveryURL(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__description
+#define SOAP_TYPE_uddi2__description (24)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__description(struct soap*, const char*, int, const uddi2__description *, const char*);
+SOAP_FMAC3 uddi2__description * SOAP_FMAC4 soap_get_uddi2__description(struct soap*, uddi2__description *, const char*, const char*);
+SOAP_FMAC3 uddi2__description * SOAP_FMAC4 soap_in_uddi2__description(struct soap*, const char*, uddi2__description *, const char*);
+
+SOAP_FMAC5 uddi2__description * SOAP_FMAC6 soap_new_uddi2__description(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__description(struct soap*, uddi2__description*);
+SOAP_FMAC5 uddi2__description * SOAP_FMAC6 soap_instantiate_uddi2__description(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__description(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__contacts
+#define SOAP_TYPE_uddi2__contacts (23)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__contacts(struct soap*, const char*, int, const uddi2__contacts *, const char*);
+SOAP_FMAC3 uddi2__contacts * SOAP_FMAC4 soap_get_uddi2__contacts(struct soap*, uddi2__contacts *, const char*, const char*);
+SOAP_FMAC3 uddi2__contacts * SOAP_FMAC4 soap_in_uddi2__contacts(struct soap*, const char*, uddi2__contacts *, const char*);
+
+SOAP_FMAC5 uddi2__contacts * SOAP_FMAC6 soap_new_uddi2__contacts(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__contacts(struct soap*, uddi2__contacts*);
+SOAP_FMAC5 uddi2__contacts * SOAP_FMAC6 soap_instantiate_uddi2__contacts(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__contacts(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__contact
+#define SOAP_TYPE_uddi2__contact (22)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__contact(struct soap*, const char*, int, const uddi2__contact *, const char*);
+SOAP_FMAC3 uddi2__contact * SOAP_FMAC4 soap_get_uddi2__contact(struct soap*, uddi2__contact *, const char*, const char*);
+SOAP_FMAC3 uddi2__contact * SOAP_FMAC4 soap_in_uddi2__contact(struct soap*, const char*, uddi2__contact *, const char*);
+
+SOAP_FMAC5 uddi2__contact * SOAP_FMAC6 soap_new_uddi2__contact(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__contact(struct soap*, uddi2__contact*);
+SOAP_FMAC5 uddi2__contact * SOAP_FMAC6 soap_instantiate_uddi2__contact(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__contact(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__categoryBag
+#define SOAP_TYPE_uddi2__categoryBag (21)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__categoryBag(struct soap*, const char*, int, const uddi2__categoryBag *, const char*);
+SOAP_FMAC3 uddi2__categoryBag * SOAP_FMAC4 soap_get_uddi2__categoryBag(struct soap*, uddi2__categoryBag *, const char*, const char*);
+SOAP_FMAC3 uddi2__categoryBag * SOAP_FMAC4 soap_in_uddi2__categoryBag(struct soap*, const char*, uddi2__categoryBag *, const char*);
+
+SOAP_FMAC5 uddi2__categoryBag * SOAP_FMAC6 soap_new_uddi2__categoryBag(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__categoryBag(struct soap*, uddi2__categoryBag*);
+SOAP_FMAC5 uddi2__categoryBag * SOAP_FMAC6 soap_instantiate_uddi2__categoryBag(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__categoryBag(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__businessServices
+#define SOAP_TYPE_uddi2__businessServices (20)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__businessServices(struct soap*, const char*, int, const uddi2__businessServices *, const char*);
+SOAP_FMAC3 uddi2__businessServices * SOAP_FMAC4 soap_get_uddi2__businessServices(struct soap*, uddi2__businessServices *, const char*, const char*);
+SOAP_FMAC3 uddi2__businessServices * SOAP_FMAC4 soap_in_uddi2__businessServices(struct soap*, const char*, uddi2__businessServices *, const char*);
+
+SOAP_FMAC5 uddi2__businessServices * SOAP_FMAC6 soap_new_uddi2__businessServices(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__businessServices(struct soap*, uddi2__businessServices*);
+SOAP_FMAC5 uddi2__businessServices * SOAP_FMAC6 soap_instantiate_uddi2__businessServices(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__businessServices(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__businessService
+#define SOAP_TYPE_uddi2__businessService (19)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__businessService(struct soap*, const char*, int, const uddi2__businessService *, const char*);
+SOAP_FMAC3 uddi2__businessService * SOAP_FMAC4 soap_get_uddi2__businessService(struct soap*, uddi2__businessService *, const char*, const char*);
+SOAP_FMAC3 uddi2__businessService * SOAP_FMAC4 soap_in_uddi2__businessService(struct soap*, const char*, uddi2__businessService *, const char*);
+
+SOAP_FMAC5 uddi2__businessService * SOAP_FMAC6 soap_new_uddi2__businessService(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__businessService(struct soap*, uddi2__businessService*);
+SOAP_FMAC5 uddi2__businessService * SOAP_FMAC6 soap_instantiate_uddi2__businessService(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__businessService(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__businessInfos
+#define SOAP_TYPE_uddi2__businessInfos (18)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__businessInfos(struct soap*, const char*, int, const uddi2__businessInfos *, const char*);
+SOAP_FMAC3 uddi2__businessInfos * SOAP_FMAC4 soap_get_uddi2__businessInfos(struct soap*, uddi2__businessInfos *, const char*, const char*);
+SOAP_FMAC3 uddi2__businessInfos * SOAP_FMAC4 soap_in_uddi2__businessInfos(struct soap*, const char*, uddi2__businessInfos *, const char*);
+
+SOAP_FMAC5 uddi2__businessInfos * SOAP_FMAC6 soap_new_uddi2__businessInfos(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__businessInfos(struct soap*, uddi2__businessInfos*);
+SOAP_FMAC5 uddi2__businessInfos * SOAP_FMAC6 soap_instantiate_uddi2__businessInfos(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__businessInfos(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__businessInfo
+#define SOAP_TYPE_uddi2__businessInfo (17)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__businessInfo(struct soap*, const char*, int, const uddi2__businessInfo *, const char*);
+SOAP_FMAC3 uddi2__businessInfo * SOAP_FMAC4 soap_get_uddi2__businessInfo(struct soap*, uddi2__businessInfo *, const char*, const char*);
+SOAP_FMAC3 uddi2__businessInfo * SOAP_FMAC4 soap_in_uddi2__businessInfo(struct soap*, const char*, uddi2__businessInfo *, const char*);
+
+SOAP_FMAC5 uddi2__businessInfo * SOAP_FMAC6 soap_new_uddi2__businessInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__businessInfo(struct soap*, uddi2__businessInfo*);
+SOAP_FMAC5 uddi2__businessInfo * SOAP_FMAC6 soap_instantiate_uddi2__businessInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__businessInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__businessEntityExt
+#define SOAP_TYPE_uddi2__businessEntityExt (16)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__businessEntityExt(struct soap*, const char*, int, const uddi2__businessEntityExt *, const char*);
+SOAP_FMAC3 uddi2__businessEntityExt * SOAP_FMAC4 soap_get_uddi2__businessEntityExt(struct soap*, uddi2__businessEntityExt *, const char*, const char*);
+SOAP_FMAC3 uddi2__businessEntityExt * SOAP_FMAC4 soap_in_uddi2__businessEntityExt(struct soap*, const char*, uddi2__businessEntityExt *, const char*);
+
+SOAP_FMAC5 uddi2__businessEntityExt * SOAP_FMAC6 soap_new_uddi2__businessEntityExt(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__businessEntityExt(struct soap*, uddi2__businessEntityExt*);
+SOAP_FMAC5 uddi2__businessEntityExt * SOAP_FMAC6 soap_instantiate_uddi2__businessEntityExt(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__businessEntityExt(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__businessEntity
+#define SOAP_TYPE_uddi2__businessEntity (15)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__businessEntity(struct soap*, const char*, int, const uddi2__businessEntity *, const char*);
+SOAP_FMAC3 uddi2__businessEntity * SOAP_FMAC4 soap_get_uddi2__businessEntity(struct soap*, uddi2__businessEntity *, const char*, const char*);
+SOAP_FMAC3 uddi2__businessEntity * SOAP_FMAC4 soap_in_uddi2__businessEntity(struct soap*, const char*, uddi2__businessEntity *, const char*);
+
+SOAP_FMAC5 uddi2__businessEntity * SOAP_FMAC6 soap_new_uddi2__businessEntity(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__businessEntity(struct soap*, uddi2__businessEntity*);
+SOAP_FMAC5 uddi2__businessEntity * SOAP_FMAC6 soap_instantiate_uddi2__businessEntity(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__businessEntity(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__bindingTemplates
+#define SOAP_TYPE_uddi2__bindingTemplates (14)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__bindingTemplates(struct soap*, const char*, int, const uddi2__bindingTemplates *, const char*);
+SOAP_FMAC3 uddi2__bindingTemplates * SOAP_FMAC4 soap_get_uddi2__bindingTemplates(struct soap*, uddi2__bindingTemplates *, const char*, const char*);
+SOAP_FMAC3 uddi2__bindingTemplates * SOAP_FMAC4 soap_in_uddi2__bindingTemplates(struct soap*, const char*, uddi2__bindingTemplates *, const char*);
+
+SOAP_FMAC5 uddi2__bindingTemplates * SOAP_FMAC6 soap_new_uddi2__bindingTemplates(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__bindingTemplates(struct soap*, uddi2__bindingTemplates*);
+SOAP_FMAC5 uddi2__bindingTemplates * SOAP_FMAC6 soap_instantiate_uddi2__bindingTemplates(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__bindingTemplates(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__bindingTemplate
+#define SOAP_TYPE_uddi2__bindingTemplate (13)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__bindingTemplate(struct soap*, const char*, int, const uddi2__bindingTemplate *, const char*);
+SOAP_FMAC3 uddi2__bindingTemplate * SOAP_FMAC4 soap_get_uddi2__bindingTemplate(struct soap*, uddi2__bindingTemplate *, const char*, const char*);
+SOAP_FMAC3 uddi2__bindingTemplate * SOAP_FMAC4 soap_in_uddi2__bindingTemplate(struct soap*, const char*, uddi2__bindingTemplate *, const char*);
+
+SOAP_FMAC5 uddi2__bindingTemplate * SOAP_FMAC6 soap_new_uddi2__bindingTemplate(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__bindingTemplate(struct soap*, uddi2__bindingTemplate*);
+SOAP_FMAC5 uddi2__bindingTemplate * SOAP_FMAC6 soap_instantiate_uddi2__bindingTemplate(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__bindingTemplate(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__assertionStatusItem
+#define SOAP_TYPE_uddi2__assertionStatusItem (12)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__assertionStatusItem(struct soap*, const char*, int, const uddi2__assertionStatusItem *, const char*);
+SOAP_FMAC3 uddi2__assertionStatusItem * SOAP_FMAC4 soap_get_uddi2__assertionStatusItem(struct soap*, uddi2__assertionStatusItem *, const char*, const char*);
+SOAP_FMAC3 uddi2__assertionStatusItem * SOAP_FMAC4 soap_in_uddi2__assertionStatusItem(struct soap*, const char*, uddi2__assertionStatusItem *, const char*);
+
+SOAP_FMAC5 uddi2__assertionStatusItem * SOAP_FMAC6 soap_new_uddi2__assertionStatusItem(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__assertionStatusItem(struct soap*, uddi2__assertionStatusItem*);
+SOAP_FMAC5 uddi2__assertionStatusItem * SOAP_FMAC6 soap_instantiate_uddi2__assertionStatusItem(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__assertionStatusItem(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__addressLine
+#define SOAP_TYPE_uddi2__addressLine (11)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__addressLine(struct soap*, const char*, int, const uddi2__addressLine *, const char*);
+SOAP_FMAC3 uddi2__addressLine * SOAP_FMAC4 soap_get_uddi2__addressLine(struct soap*, uddi2__addressLine *, const char*, const char*);
+SOAP_FMAC3 uddi2__addressLine * SOAP_FMAC4 soap_in_uddi2__addressLine(struct soap*, const char*, uddi2__addressLine *, const char*);
+
+SOAP_FMAC5 uddi2__addressLine * SOAP_FMAC6 soap_new_uddi2__addressLine(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__addressLine(struct soap*, uddi2__addressLine*);
+SOAP_FMAC5 uddi2__addressLine * SOAP_FMAC6 soap_instantiate_uddi2__addressLine(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__addressLine(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__address
+#define SOAP_TYPE_uddi2__address (10)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__address(struct soap*, const char*, int, const uddi2__address *, const char*);
+SOAP_FMAC3 uddi2__address * SOAP_FMAC4 soap_get_uddi2__address(struct soap*, uddi2__address *, const char*, const char*);
+SOAP_FMAC3 uddi2__address * SOAP_FMAC4 soap_in_uddi2__address(struct soap*, const char*, uddi2__address *, const char*);
+
+SOAP_FMAC5 uddi2__address * SOAP_FMAC6 soap_new_uddi2__address(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__address(struct soap*, uddi2__address*);
+SOAP_FMAC5 uddi2__address * SOAP_FMAC6 soap_instantiate_uddi2__address(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__address(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_uddi2__accessPoint
+#define SOAP_TYPE_uddi2__accessPoint (9)
+#endif
+
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__accessPoint(struct soap*, const char*, int, const uddi2__accessPoint *, const char*);
+SOAP_FMAC3 uddi2__accessPoint * SOAP_FMAC4 soap_get_uddi2__accessPoint(struct soap*, uddi2__accessPoint *, const char*, const char*);
+SOAP_FMAC3 uddi2__accessPoint * SOAP_FMAC4 soap_in_uddi2__accessPoint(struct soap*, const char*, uddi2__accessPoint *, const char*);
+
+SOAP_FMAC5 uddi2__accessPoint * SOAP_FMAC6 soap_new_uddi2__accessPoint(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_uddi2__accessPoint(struct soap*, uddi2__accessPoint*);
+SOAP_FMAC5 uddi2__accessPoint * SOAP_FMAC6 soap_instantiate_uddi2__accessPoint(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_uddi2__accessPoint(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef WITH_NOGLOBAL
+
+#ifndef SOAP_TYPE_SOAP_ENV__Fault
+#define SOAP_TYPE_SOAP_ENV__Fault (389)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Fault(struct soap*, const struct SOAP_ENV__Fault *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Fault(struct soap*, struct SOAP_ENV__Fault *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Fault(struct soap*, const struct SOAP_ENV__Fault *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Fault(struct soap*, const char*, int, const struct SOAP_ENV__Fault *, const char*);
+SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_get_SOAP_ENV__Fault(struct soap*, struct SOAP_ENV__Fault *, const char*, const char*);
+SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_in_SOAP_ENV__Fault(struct soap*, const char*, struct SOAP_ENV__Fault *, const char*);
+
+#endif
+
+#ifndef WITH_NOGLOBAL
+
+#ifndef SOAP_TYPE_SOAP_ENV__Detail
+#define SOAP_TYPE_SOAP_ENV__Detail (388)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Detail(struct soap*, const struct SOAP_ENV__Detail *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Detail(struct soap*, const struct SOAP_ENV__Detail *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Detail(struct soap*, const char*, int, const struct SOAP_ENV__Detail *, const char*);
+SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_get_SOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *, const char*, const char*);
+SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_in_SOAP_ENV__Detail(struct soap*, const char*, struct SOAP_ENV__Detail *, const char*);
+
+#endif
+
+#ifndef WITH_NOGLOBAL
+
+#ifndef SOAP_TYPE_SOAP_ENV__Code
+#define SOAP_TYPE_SOAP_ENV__Code (387)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Code(struct soap*, const struct SOAP_ENV__Code *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Code(struct soap*, const struct SOAP_ENV__Code *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Code(struct soap*, const char*, int, const struct SOAP_ENV__Code *, const char*);
+SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_get_SOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *, const char*, const char*);
+SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_in_SOAP_ENV__Code(struct soap*, const char*, struct SOAP_ENV__Code *, const char*);
+
+#endif
+
+#ifndef WITH_NOGLOBAL
+
+#ifndef SOAP_TYPE_SOAP_ENV__Header
+#define SOAP_TYPE_SOAP_ENV__Header (386)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Header(struct soap*, const struct SOAP_ENV__Header *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Header(struct soap*, struct SOAP_ENV__Header *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Header(struct soap*, const struct SOAP_ENV__Header *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Header(struct soap*, const char*, int, const struct SOAP_ENV__Header *, const char*);
+SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_get_SOAP_ENV__Header(struct soap*, struct SOAP_ENV__Header *, const char*, const char*);
+SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_in_SOAP_ENV__Header(struct soap*, const char*, struct SOAP_ENV__Header *, const char*);
+
+#endif
+
+#ifndef SOAP_TYPE___pub2__set_USCOREpublisherAssertions
+#define SOAP_TYPE___pub2__set_USCOREpublisherAssertions (384)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__set_USCOREpublisherAssertions(struct soap*, const struct __pub2__set_USCOREpublisherAssertions *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__set_USCOREpublisherAssertions(struct soap*, struct __pub2__set_USCOREpublisherAssertions *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__set_USCOREpublisherAssertions(struct soap*, const struct __pub2__set_USCOREpublisherAssertions *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__set_USCOREpublisherAssertions(struct soap*, const char*, int, const struct __pub2__set_USCOREpublisherAssertions *, const char*);
+SOAP_FMAC3 struct __pub2__set_USCOREpublisherAssertions * SOAP_FMAC4 soap_get___pub2__set_USCOREpublisherAssertions(struct soap*, struct __pub2__set_USCOREpublisherAssertions *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__set_USCOREpublisherAssertions * SOAP_FMAC4 soap_in___pub2__set_USCOREpublisherAssertions(struct soap*, const char*, struct __pub2__set_USCOREpublisherAssertions *, const char*);
+
+#ifndef SOAP_TYPE___pub2__save_USCOREtModel
+#define SOAP_TYPE___pub2__save_USCOREtModel (381)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__save_USCOREtModel(struct soap*, const struct __pub2__save_USCOREtModel *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__save_USCOREtModel(struct soap*, struct __pub2__save_USCOREtModel *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__save_USCOREtModel(struct soap*, const struct __pub2__save_USCOREtModel *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__save_USCOREtModel(struct soap*, const char*, int, const struct __pub2__save_USCOREtModel *, const char*);
+SOAP_FMAC3 struct __pub2__save_USCOREtModel * SOAP_FMAC4 soap_get___pub2__save_USCOREtModel(struct soap*, struct __pub2__save_USCOREtModel *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__save_USCOREtModel * SOAP_FMAC4 soap_in___pub2__save_USCOREtModel(struct soap*, const char*, struct __pub2__save_USCOREtModel *, const char*);
+
+#ifndef SOAP_TYPE___pub2__save_USCOREservice
+#define SOAP_TYPE___pub2__save_USCOREservice (378)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__save_USCOREservice(struct soap*, const struct __pub2__save_USCOREservice *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__save_USCOREservice(struct soap*, struct __pub2__save_USCOREservice *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__save_USCOREservice(struct soap*, const struct __pub2__save_USCOREservice *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__save_USCOREservice(struct soap*, const char*, int, const struct __pub2__save_USCOREservice *, const char*);
+SOAP_FMAC3 struct __pub2__save_USCOREservice * SOAP_FMAC4 soap_get___pub2__save_USCOREservice(struct soap*, struct __pub2__save_USCOREservice *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__save_USCOREservice * SOAP_FMAC4 soap_in___pub2__save_USCOREservice(struct soap*, const char*, struct __pub2__save_USCOREservice *, const char*);
+
+#ifndef SOAP_TYPE___pub2__save_USCOREbusiness
+#define SOAP_TYPE___pub2__save_USCOREbusiness (375)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__save_USCOREbusiness(struct soap*, const struct __pub2__save_USCOREbusiness *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__save_USCOREbusiness(struct soap*, struct __pub2__save_USCOREbusiness *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__save_USCOREbusiness(struct soap*, const struct __pub2__save_USCOREbusiness *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__save_USCOREbusiness(struct soap*, const char*, int, const struct __pub2__save_USCOREbusiness *, const char*);
+SOAP_FMAC3 struct __pub2__save_USCOREbusiness * SOAP_FMAC4 soap_get___pub2__save_USCOREbusiness(struct soap*, struct __pub2__save_USCOREbusiness *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__save_USCOREbusiness * SOAP_FMAC4 soap_in___pub2__save_USCOREbusiness(struct soap*, const char*, struct __pub2__save_USCOREbusiness *, const char*);
+
+#ifndef SOAP_TYPE___pub2__save_USCOREbinding
+#define SOAP_TYPE___pub2__save_USCOREbinding (372)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__save_USCOREbinding(struct soap*, const struct __pub2__save_USCOREbinding *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__save_USCOREbinding(struct soap*, struct __pub2__save_USCOREbinding *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__save_USCOREbinding(struct soap*, const struct __pub2__save_USCOREbinding *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__save_USCOREbinding(struct soap*, const char*, int, const struct __pub2__save_USCOREbinding *, const char*);
+SOAP_FMAC3 struct __pub2__save_USCOREbinding * SOAP_FMAC4 soap_get___pub2__save_USCOREbinding(struct soap*, struct __pub2__save_USCOREbinding *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__save_USCOREbinding * SOAP_FMAC4 soap_in___pub2__save_USCOREbinding(struct soap*, const char*, struct __pub2__save_USCOREbinding *, const char*);
+
+#ifndef SOAP_TYPE___pub2__get_USCOREregisteredInfo
+#define SOAP_TYPE___pub2__get_USCOREregisteredInfo (369)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__get_USCOREregisteredInfo(struct soap*, const struct __pub2__get_USCOREregisteredInfo *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__get_USCOREregisteredInfo(struct soap*, struct __pub2__get_USCOREregisteredInfo *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__get_USCOREregisteredInfo(struct soap*, const struct __pub2__get_USCOREregisteredInfo *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__get_USCOREregisteredInfo(struct soap*, const char*, int, const struct __pub2__get_USCOREregisteredInfo *, const char*);
+SOAP_FMAC3 struct __pub2__get_USCOREregisteredInfo * SOAP_FMAC4 soap_get___pub2__get_USCOREregisteredInfo(struct soap*, struct __pub2__get_USCOREregisteredInfo *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__get_USCOREregisteredInfo * SOAP_FMAC4 soap_in___pub2__get_USCOREregisteredInfo(struct soap*, const char*, struct __pub2__get_USCOREregisteredInfo *, const char*);
+
+#ifndef SOAP_TYPE___pub2__get_USCOREpublisherAssertions
+#define SOAP_TYPE___pub2__get_USCOREpublisherAssertions (366)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__get_USCOREpublisherAssertions(struct soap*, const struct __pub2__get_USCOREpublisherAssertions *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__get_USCOREpublisherAssertions(struct soap*, struct __pub2__get_USCOREpublisherAssertions *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__get_USCOREpublisherAssertions(struct soap*, const struct __pub2__get_USCOREpublisherAssertions *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__get_USCOREpublisherAssertions(struct soap*, const char*, int, const struct __pub2__get_USCOREpublisherAssertions *, const char*);
+SOAP_FMAC3 struct __pub2__get_USCOREpublisherAssertions * SOAP_FMAC4 soap_get___pub2__get_USCOREpublisherAssertions(struct soap*, struct __pub2__get_USCOREpublisherAssertions *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__get_USCOREpublisherAssertions * SOAP_FMAC4 soap_in___pub2__get_USCOREpublisherAssertions(struct soap*, const char*, struct __pub2__get_USCOREpublisherAssertions *, const char*);
+
+#ifndef SOAP_TYPE___pub2__get_USCOREauthToken
+#define SOAP_TYPE___pub2__get_USCOREauthToken (363)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__get_USCOREauthToken(struct soap*, const struct __pub2__get_USCOREauthToken *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__get_USCOREauthToken(struct soap*, struct __pub2__get_USCOREauthToken *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__get_USCOREauthToken(struct soap*, const struct __pub2__get_USCOREauthToken *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__get_USCOREauthToken(struct soap*, const char*, int, const struct __pub2__get_USCOREauthToken *, const char*);
+SOAP_FMAC3 struct __pub2__get_USCOREauthToken * SOAP_FMAC4 soap_get___pub2__get_USCOREauthToken(struct soap*, struct __pub2__get_USCOREauthToken *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__get_USCOREauthToken * SOAP_FMAC4 soap_in___pub2__get_USCOREauthToken(struct soap*, const char*, struct __pub2__get_USCOREauthToken *, const char*);
+
+#ifndef SOAP_TYPE___pub2__get_USCOREassertionStatusReport
+#define SOAP_TYPE___pub2__get_USCOREassertionStatusReport (360)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__get_USCOREassertionStatusReport(struct soap*, const struct __pub2__get_USCOREassertionStatusReport *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__get_USCOREassertionStatusReport(struct soap*, struct __pub2__get_USCOREassertionStatusReport *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__get_USCOREassertionStatusReport(struct soap*, const struct __pub2__get_USCOREassertionStatusReport *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__get_USCOREassertionStatusReport(struct soap*, const char*, int, const struct __pub2__get_USCOREassertionStatusReport *, const char*);
+SOAP_FMAC3 struct __pub2__get_USCOREassertionStatusReport * SOAP_FMAC4 soap_get___pub2__get_USCOREassertionStatusReport(struct soap*, struct __pub2__get_USCOREassertionStatusReport *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__get_USCOREassertionStatusReport * SOAP_FMAC4 soap_in___pub2__get_USCOREassertionStatusReport(struct soap*, const char*, struct __pub2__get_USCOREassertionStatusReport *, const char*);
+
+#ifndef SOAP_TYPE___pub2__discard_USCOREauthToken
+#define SOAP_TYPE___pub2__discard_USCOREauthToken (357)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__discard_USCOREauthToken(struct soap*, const struct __pub2__discard_USCOREauthToken *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__discard_USCOREauthToken(struct soap*, struct __pub2__discard_USCOREauthToken *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__discard_USCOREauthToken(struct soap*, const struct __pub2__discard_USCOREauthToken *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__discard_USCOREauthToken(struct soap*, const char*, int, const struct __pub2__discard_USCOREauthToken *, const char*);
+SOAP_FMAC3 struct __pub2__discard_USCOREauthToken * SOAP_FMAC4 soap_get___pub2__discard_USCOREauthToken(struct soap*, struct __pub2__discard_USCOREauthToken *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__discard_USCOREauthToken * SOAP_FMAC4 soap_in___pub2__discard_USCOREauthToken(struct soap*, const char*, struct __pub2__discard_USCOREauthToken *, const char*);
+
+#ifndef SOAP_TYPE___pub2__delete_USCOREtModel
+#define SOAP_TYPE___pub2__delete_USCOREtModel (354)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__delete_USCOREtModel(struct soap*, const struct __pub2__delete_USCOREtModel *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__delete_USCOREtModel(struct soap*, struct __pub2__delete_USCOREtModel *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__delete_USCOREtModel(struct soap*, const struct __pub2__delete_USCOREtModel *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__delete_USCOREtModel(struct soap*, const char*, int, const struct __pub2__delete_USCOREtModel *, const char*);
+SOAP_FMAC3 struct __pub2__delete_USCOREtModel * SOAP_FMAC4 soap_get___pub2__delete_USCOREtModel(struct soap*, struct __pub2__delete_USCOREtModel *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__delete_USCOREtModel * SOAP_FMAC4 soap_in___pub2__delete_USCOREtModel(struct soap*, const char*, struct __pub2__delete_USCOREtModel *, const char*);
+
+#ifndef SOAP_TYPE___pub2__delete_USCOREservice
+#define SOAP_TYPE___pub2__delete_USCOREservice (351)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__delete_USCOREservice(struct soap*, const struct __pub2__delete_USCOREservice *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__delete_USCOREservice(struct soap*, struct __pub2__delete_USCOREservice *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__delete_USCOREservice(struct soap*, const struct __pub2__delete_USCOREservice *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__delete_USCOREservice(struct soap*, const char*, int, const struct __pub2__delete_USCOREservice *, const char*);
+SOAP_FMAC3 struct __pub2__delete_USCOREservice * SOAP_FMAC4 soap_get___pub2__delete_USCOREservice(struct soap*, struct __pub2__delete_USCOREservice *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__delete_USCOREservice * SOAP_FMAC4 soap_in___pub2__delete_USCOREservice(struct soap*, const char*, struct __pub2__delete_USCOREservice *, const char*);
+
+#ifndef SOAP_TYPE___pub2__delete_USCOREpublisherAssertions
+#define SOAP_TYPE___pub2__delete_USCOREpublisherAssertions (348)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__delete_USCOREpublisherAssertions(struct soap*, const struct __pub2__delete_USCOREpublisherAssertions *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__delete_USCOREpublisherAssertions(struct soap*, struct __pub2__delete_USCOREpublisherAssertions *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__delete_USCOREpublisherAssertions(struct soap*, const struct __pub2__delete_USCOREpublisherAssertions *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__delete_USCOREpublisherAssertions(struct soap*, const char*, int, const struct __pub2__delete_USCOREpublisherAssertions *, const char*);
+SOAP_FMAC3 struct __pub2__delete_USCOREpublisherAssertions * SOAP_FMAC4 soap_get___pub2__delete_USCOREpublisherAssertions(struct soap*, struct __pub2__delete_USCOREpublisherAssertions *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__delete_USCOREpublisherAssertions * SOAP_FMAC4 soap_in___pub2__delete_USCOREpublisherAssertions(struct soap*, const char*, struct __pub2__delete_USCOREpublisherAssertions *, const char*);
+
+#ifndef SOAP_TYPE___pub2__delete_USCOREbusiness
+#define SOAP_TYPE___pub2__delete_USCOREbusiness (345)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__delete_USCOREbusiness(struct soap*, const struct __pub2__delete_USCOREbusiness *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__delete_USCOREbusiness(struct soap*, struct __pub2__delete_USCOREbusiness *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__delete_USCOREbusiness(struct soap*, const struct __pub2__delete_USCOREbusiness *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__delete_USCOREbusiness(struct soap*, const char*, int, const struct __pub2__delete_USCOREbusiness *, const char*);
+SOAP_FMAC3 struct __pub2__delete_USCOREbusiness * SOAP_FMAC4 soap_get___pub2__delete_USCOREbusiness(struct soap*, struct __pub2__delete_USCOREbusiness *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__delete_USCOREbusiness * SOAP_FMAC4 soap_in___pub2__delete_USCOREbusiness(struct soap*, const char*, struct __pub2__delete_USCOREbusiness *, const char*);
+
+#ifndef SOAP_TYPE___pub2__delete_USCOREbinding
+#define SOAP_TYPE___pub2__delete_USCOREbinding (342)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__delete_USCOREbinding(struct soap*, const struct __pub2__delete_USCOREbinding *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__delete_USCOREbinding(struct soap*, struct __pub2__delete_USCOREbinding *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__delete_USCOREbinding(struct soap*, const struct __pub2__delete_USCOREbinding *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__delete_USCOREbinding(struct soap*, const char*, int, const struct __pub2__delete_USCOREbinding *, const char*);
+SOAP_FMAC3 struct __pub2__delete_USCOREbinding * SOAP_FMAC4 soap_get___pub2__delete_USCOREbinding(struct soap*, struct __pub2__delete_USCOREbinding *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__delete_USCOREbinding * SOAP_FMAC4 soap_in___pub2__delete_USCOREbinding(struct soap*, const char*, struct __pub2__delete_USCOREbinding *, const char*);
+
+#ifndef SOAP_TYPE___pub2__add_USCOREpublisherAssertions
+#define SOAP_TYPE___pub2__add_USCOREpublisherAssertions (339)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___pub2__add_USCOREpublisherAssertions(struct soap*, const struct __pub2__add_USCOREpublisherAssertions *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___pub2__add_USCOREpublisherAssertions(struct soap*, struct __pub2__add_USCOREpublisherAssertions *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___pub2__add_USCOREpublisherAssertions(struct soap*, const struct __pub2__add_USCOREpublisherAssertions *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___pub2__add_USCOREpublisherAssertions(struct soap*, const char*, int, const struct __pub2__add_USCOREpublisherAssertions *, const char*);
+SOAP_FMAC3 struct __pub2__add_USCOREpublisherAssertions * SOAP_FMAC4 soap_get___pub2__add_USCOREpublisherAssertions(struct soap*, struct __pub2__add_USCOREpublisherAssertions *, const char*, const char*);
+SOAP_FMAC3 struct __pub2__add_USCOREpublisherAssertions * SOAP_FMAC4 soap_in___pub2__add_USCOREpublisherAssertions(struct soap*, const char*, struct __pub2__add_USCOREpublisherAssertions *, const char*);
+
+#ifndef SOAP_TYPE___inq2__get_USCOREtModelDetail
+#define SOAP_TYPE___inq2__get_USCOREtModelDetail (336)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___inq2__get_USCOREtModelDetail(struct soap*, const struct __inq2__get_USCOREtModelDetail *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___inq2__get_USCOREtModelDetail(struct soap*, struct __inq2__get_USCOREtModelDetail *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___inq2__get_USCOREtModelDetail(struct soap*, const struct __inq2__get_USCOREtModelDetail *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___inq2__get_USCOREtModelDetail(struct soap*, const char*, int, const struct __inq2__get_USCOREtModelDetail *, const char*);
+SOAP_FMAC3 struct __inq2__get_USCOREtModelDetail * SOAP_FMAC4 soap_get___inq2__get_USCOREtModelDetail(struct soap*, struct __inq2__get_USCOREtModelDetail *, const char*, const char*);
+SOAP_FMAC3 struct __inq2__get_USCOREtModelDetail * SOAP_FMAC4 soap_in___inq2__get_USCOREtModelDetail(struct soap*, const char*, struct __inq2__get_USCOREtModelDetail *, const char*);
+
+#ifndef SOAP_TYPE___inq2__get_USCOREserviceDetail
+#define SOAP_TYPE___inq2__get_USCOREserviceDetail (333)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___inq2__get_USCOREserviceDetail(struct soap*, const struct __inq2__get_USCOREserviceDetail *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___inq2__get_USCOREserviceDetail(struct soap*, struct __inq2__get_USCOREserviceDetail *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___inq2__get_USCOREserviceDetail(struct soap*, const struct __inq2__get_USCOREserviceDetail *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___inq2__get_USCOREserviceDetail(struct soap*, const char*, int, const struct __inq2__get_USCOREserviceDetail *, const char*);
+SOAP_FMAC3 struct __inq2__get_USCOREserviceDetail * SOAP_FMAC4 soap_get___inq2__get_USCOREserviceDetail(struct soap*, struct __inq2__get_USCOREserviceDetail *, const char*, const char*);
+SOAP_FMAC3 struct __inq2__get_USCOREserviceDetail * SOAP_FMAC4 soap_in___inq2__get_USCOREserviceDetail(struct soap*, const char*, struct __inq2__get_USCOREserviceDetail *, const char*);
+
+#ifndef SOAP_TYPE___inq2__get_USCOREbusinessDetailExt
+#define SOAP_TYPE___inq2__get_USCOREbusinessDetailExt (330)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___inq2__get_USCOREbusinessDetailExt(struct soap*, const struct __inq2__get_USCOREbusinessDetailExt *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___inq2__get_USCOREbusinessDetailExt(struct soap*, struct __inq2__get_USCOREbusinessDetailExt *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___inq2__get_USCOREbusinessDetailExt(struct soap*, const struct __inq2__get_USCOREbusinessDetailExt *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___inq2__get_USCOREbusinessDetailExt(struct soap*, const char*, int, const struct __inq2__get_USCOREbusinessDetailExt *, const char*);
+SOAP_FMAC3 struct __inq2__get_USCOREbusinessDetailExt * SOAP_FMAC4 soap_get___inq2__get_USCOREbusinessDetailExt(struct soap*, struct __inq2__get_USCOREbusinessDetailExt *, const char*, const char*);
+SOAP_FMAC3 struct __inq2__get_USCOREbusinessDetailExt * SOAP_FMAC4 soap_in___inq2__get_USCOREbusinessDetailExt(struct soap*, const char*, struct __inq2__get_USCOREbusinessDetailExt *, const char*);
+
+#ifndef SOAP_TYPE___inq2__get_USCOREbusinessDetail
+#define SOAP_TYPE___inq2__get_USCOREbusinessDetail (327)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___inq2__get_USCOREbusinessDetail(struct soap*, const struct __inq2__get_USCOREbusinessDetail *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___inq2__get_USCOREbusinessDetail(struct soap*, struct __inq2__get_USCOREbusinessDetail *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___inq2__get_USCOREbusinessDetail(struct soap*, const struct __inq2__get_USCOREbusinessDetail *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___inq2__get_USCOREbusinessDetail(struct soap*, const char*, int, const struct __inq2__get_USCOREbusinessDetail *, const char*);
+SOAP_FMAC3 struct __inq2__get_USCOREbusinessDetail * SOAP_FMAC4 soap_get___inq2__get_USCOREbusinessDetail(struct soap*, struct __inq2__get_USCOREbusinessDetail *, const char*, const char*);
+SOAP_FMAC3 struct __inq2__get_USCOREbusinessDetail * SOAP_FMAC4 soap_in___inq2__get_USCOREbusinessDetail(struct soap*, const char*, struct __inq2__get_USCOREbusinessDetail *, const char*);
+
+#ifndef SOAP_TYPE___inq2__get_USCOREbindingDetail
+#define SOAP_TYPE___inq2__get_USCOREbindingDetail (324)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___inq2__get_USCOREbindingDetail(struct soap*, const struct __inq2__get_USCOREbindingDetail *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___inq2__get_USCOREbindingDetail(struct soap*, struct __inq2__get_USCOREbindingDetail *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___inq2__get_USCOREbindingDetail(struct soap*, const struct __inq2__get_USCOREbindingDetail *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___inq2__get_USCOREbindingDetail(struct soap*, const char*, int, const struct __inq2__get_USCOREbindingDetail *, const char*);
+SOAP_FMAC3 struct __inq2__get_USCOREbindingDetail * SOAP_FMAC4 soap_get___inq2__get_USCOREbindingDetail(struct soap*, struct __inq2__get_USCOREbindingDetail *, const char*, const char*);
+SOAP_FMAC3 struct __inq2__get_USCOREbindingDetail * SOAP_FMAC4 soap_in___inq2__get_USCOREbindingDetail(struct soap*, const char*, struct __inq2__get_USCOREbindingDetail *, const char*);
+
+#ifndef SOAP_TYPE___inq2__find_USCOREtModel
+#define SOAP_TYPE___inq2__find_USCOREtModel (321)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___inq2__find_USCOREtModel(struct soap*, const struct __inq2__find_USCOREtModel *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___inq2__find_USCOREtModel(struct soap*, struct __inq2__find_USCOREtModel *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___inq2__find_USCOREtModel(struct soap*, const struct __inq2__find_USCOREtModel *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___inq2__find_USCOREtModel(struct soap*, const char*, int, const struct __inq2__find_USCOREtModel *, const char*);
+SOAP_FMAC3 struct __inq2__find_USCOREtModel * SOAP_FMAC4 soap_get___inq2__find_USCOREtModel(struct soap*, struct __inq2__find_USCOREtModel *, const char*, const char*);
+SOAP_FMAC3 struct __inq2__find_USCOREtModel * SOAP_FMAC4 soap_in___inq2__find_USCOREtModel(struct soap*, const char*, struct __inq2__find_USCOREtModel *, const char*);
+
+#ifndef SOAP_TYPE___inq2__find_USCOREservice
+#define SOAP_TYPE___inq2__find_USCOREservice (318)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___inq2__find_USCOREservice(struct soap*, const struct __inq2__find_USCOREservice *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___inq2__find_USCOREservice(struct soap*, struct __inq2__find_USCOREservice *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___inq2__find_USCOREservice(struct soap*, const struct __inq2__find_USCOREservice *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___inq2__find_USCOREservice(struct soap*, const char*, int, const struct __inq2__find_USCOREservice *, const char*);
+SOAP_FMAC3 struct __inq2__find_USCOREservice * SOAP_FMAC4 soap_get___inq2__find_USCOREservice(struct soap*, struct __inq2__find_USCOREservice *, const char*, const char*);
+SOAP_FMAC3 struct __inq2__find_USCOREservice * SOAP_FMAC4 soap_in___inq2__find_USCOREservice(struct soap*, const char*, struct __inq2__find_USCOREservice *, const char*);
+
+#ifndef SOAP_TYPE___inq2__find_USCORErelatedBusinesses
+#define SOAP_TYPE___inq2__find_USCORErelatedBusinesses (315)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___inq2__find_USCORErelatedBusinesses(struct soap*, const struct __inq2__find_USCORErelatedBusinesses *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___inq2__find_USCORErelatedBusinesses(struct soap*, struct __inq2__find_USCORErelatedBusinesses *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___inq2__find_USCORErelatedBusinesses(struct soap*, const struct __inq2__find_USCORErelatedBusinesses *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___inq2__find_USCORErelatedBusinesses(struct soap*, const char*, int, const struct __inq2__find_USCORErelatedBusinesses *, const char*);
+SOAP_FMAC3 struct __inq2__find_USCORErelatedBusinesses * SOAP_FMAC4 soap_get___inq2__find_USCORErelatedBusinesses(struct soap*, struct __inq2__find_USCORErelatedBusinesses *, const char*, const char*);
+SOAP_FMAC3 struct __inq2__find_USCORErelatedBusinesses * SOAP_FMAC4 soap_in___inq2__find_USCORErelatedBusinesses(struct soap*, const char*, struct __inq2__find_USCORErelatedBusinesses *, const char*);
+
+#ifndef SOAP_TYPE___inq2__find_USCOREbusiness
+#define SOAP_TYPE___inq2__find_USCOREbusiness (312)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___inq2__find_USCOREbusiness(struct soap*, const struct __inq2__find_USCOREbusiness *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___inq2__find_USCOREbusiness(struct soap*, struct __inq2__find_USCOREbusiness *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___inq2__find_USCOREbusiness(struct soap*, const struct __inq2__find_USCOREbusiness *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___inq2__find_USCOREbusiness(struct soap*, const char*, int, const struct __inq2__find_USCOREbusiness *, const char*);
+SOAP_FMAC3 struct __inq2__find_USCOREbusiness * SOAP_FMAC4 soap_get___inq2__find_USCOREbusiness(struct soap*, struct __inq2__find_USCOREbusiness *, const char*, const char*);
+SOAP_FMAC3 struct __inq2__find_USCOREbusiness * SOAP_FMAC4 soap_in___inq2__find_USCOREbusiness(struct soap*, const char*, struct __inq2__find_USCOREbusiness *, const char*);
+
+#ifndef SOAP_TYPE___inq2__find_USCOREbinding
+#define SOAP_TYPE___inq2__find_USCOREbinding (309)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___inq2__find_USCOREbinding(struct soap*, const struct __inq2__find_USCOREbinding *);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default___inq2__find_USCOREbinding(struct soap*, struct __inq2__find_USCOREbinding *);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put___inq2__find_USCOREbinding(struct soap*, const struct __inq2__find_USCOREbinding *, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out___inq2__find_USCOREbinding(struct soap*, const char*, int, const struct __inq2__find_USCOREbinding *, const char*);
+SOAP_FMAC3 struct __inq2__find_USCOREbinding * SOAP_FMAC4 soap_get___inq2__find_USCOREbinding(struct soap*, struct __inq2__find_USCOREbinding *, const char*, const char*);
+SOAP_FMAC3 struct __inq2__find_USCOREbinding * SOAP_FMAC4 soap_in___inq2__find_USCOREbinding(struct soap*, const char*, struct __inq2__find_USCOREbinding *, const char*);
+
+#ifndef WITH_NOGLOBAL
+
+#ifndef SOAP_TYPE_PointerToSOAP_ENV__Code
+#define SOAP_TYPE_PointerToSOAP_ENV__Code (391)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Code(struct soap*, const char *, int, struct SOAP_ENV__Code *const*, const char *);
+SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code **, const char*, const char*);
+SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Code(struct soap*, const char*, struct SOAP_ENV__Code **, const char*);
+
+#endif
+
+#ifndef WITH_NOGLOBAL
+
+#ifndef SOAP_TYPE_PointerToSOAP_ENV__Detail
+#define SOAP_TYPE_PointerToSOAP_ENV__Detail (390)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Detail(struct soap*, const char *, int, struct SOAP_ENV__Detail *const*, const char *);
+SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail **, const char*, const char*);
+SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Detail(struct soap*, const char*, struct SOAP_ENV__Detail **, const char*);
+
+#endif
+
+#ifndef SOAP_TYPE_PointerTouddi2__set_USCOREpublisherAssertions
+#define SOAP_TYPE_PointerTouddi2__set_USCOREpublisherAssertions (382)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__set_USCOREpublisherAssertions(struct soap*, uddi2__set_USCOREpublisherAssertions *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__set_USCOREpublisherAssertions(struct soap*, uddi2__set_USCOREpublisherAssertions *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__set_USCOREpublisherAssertions(struct soap*, const char *, int, uddi2__set_USCOREpublisherAssertions *const*, const char *);
+SOAP_FMAC3 uddi2__set_USCOREpublisherAssertions ** SOAP_FMAC4 soap_get_PointerTouddi2__set_USCOREpublisherAssertions(struct soap*, uddi2__set_USCOREpublisherAssertions **, const char*, const char*);
+SOAP_FMAC3 uddi2__set_USCOREpublisherAssertions ** SOAP_FMAC4 soap_in_PointerTouddi2__set_USCOREpublisherAssertions(struct soap*, const char*, uddi2__set_USCOREpublisherAssertions **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__save_USCOREtModel
+#define SOAP_TYPE_PointerTouddi2__save_USCOREtModel (379)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__save_USCOREtModel(struct soap*, uddi2__save_USCOREtModel *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__save_USCOREtModel(struct soap*, uddi2__save_USCOREtModel *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__save_USCOREtModel(struct soap*, const char *, int, uddi2__save_USCOREtModel *const*, const char *);
+SOAP_FMAC3 uddi2__save_USCOREtModel ** SOAP_FMAC4 soap_get_PointerTouddi2__save_USCOREtModel(struct soap*, uddi2__save_USCOREtModel **, const char*, const char*);
+SOAP_FMAC3 uddi2__save_USCOREtModel ** SOAP_FMAC4 soap_in_PointerTouddi2__save_USCOREtModel(struct soap*, const char*, uddi2__save_USCOREtModel **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__save_USCOREservice
+#define SOAP_TYPE_PointerTouddi2__save_USCOREservice (376)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__save_USCOREservice(struct soap*, uddi2__save_USCOREservice *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__save_USCOREservice(struct soap*, uddi2__save_USCOREservice *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__save_USCOREservice(struct soap*, const char *, int, uddi2__save_USCOREservice *const*, const char *);
+SOAP_FMAC3 uddi2__save_USCOREservice ** SOAP_FMAC4 soap_get_PointerTouddi2__save_USCOREservice(struct soap*, uddi2__save_USCOREservice **, const char*, const char*);
+SOAP_FMAC3 uddi2__save_USCOREservice ** SOAP_FMAC4 soap_in_PointerTouddi2__save_USCOREservice(struct soap*, const char*, uddi2__save_USCOREservice **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__save_USCOREbusiness
+#define SOAP_TYPE_PointerTouddi2__save_USCOREbusiness (373)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__save_USCOREbusiness(struct soap*, uddi2__save_USCOREbusiness *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__save_USCOREbusiness(struct soap*, uddi2__save_USCOREbusiness *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__save_USCOREbusiness(struct soap*, const char *, int, uddi2__save_USCOREbusiness *const*, const char *);
+SOAP_FMAC3 uddi2__save_USCOREbusiness ** SOAP_FMAC4 soap_get_PointerTouddi2__save_USCOREbusiness(struct soap*, uddi2__save_USCOREbusiness **, const char*, const char*);
+SOAP_FMAC3 uddi2__save_USCOREbusiness ** SOAP_FMAC4 soap_in_PointerTouddi2__save_USCOREbusiness(struct soap*, const char*, uddi2__save_USCOREbusiness **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__save_USCOREbinding
+#define SOAP_TYPE_PointerTouddi2__save_USCOREbinding (370)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__save_USCOREbinding(struct soap*, uddi2__save_USCOREbinding *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__save_USCOREbinding(struct soap*, uddi2__save_USCOREbinding *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__save_USCOREbinding(struct soap*, const char *, int, uddi2__save_USCOREbinding *const*, const char *);
+SOAP_FMAC3 uddi2__save_USCOREbinding ** SOAP_FMAC4 soap_get_PointerTouddi2__save_USCOREbinding(struct soap*, uddi2__save_USCOREbinding **, const char*, const char*);
+SOAP_FMAC3 uddi2__save_USCOREbinding ** SOAP_FMAC4 soap_in_PointerTouddi2__save_USCOREbinding(struct soap*, const char*, uddi2__save_USCOREbinding **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__get_USCOREregisteredInfo
+#define SOAP_TYPE_PointerTouddi2__get_USCOREregisteredInfo (367)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__get_USCOREregisteredInfo(struct soap*, uddi2__get_USCOREregisteredInfo *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__get_USCOREregisteredInfo(struct soap*, uddi2__get_USCOREregisteredInfo *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__get_USCOREregisteredInfo(struct soap*, const char *, int, uddi2__get_USCOREregisteredInfo *const*, const char *);
+SOAP_FMAC3 uddi2__get_USCOREregisteredInfo ** SOAP_FMAC4 soap_get_PointerTouddi2__get_USCOREregisteredInfo(struct soap*, uddi2__get_USCOREregisteredInfo **, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREregisteredInfo ** SOAP_FMAC4 soap_in_PointerTouddi2__get_USCOREregisteredInfo(struct soap*, const char*, uddi2__get_USCOREregisteredInfo **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__get_USCOREpublisherAssertions
+#define SOAP_TYPE_PointerTouddi2__get_USCOREpublisherAssertions (364)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__get_USCOREpublisherAssertions(struct soap*, uddi2__get_USCOREpublisherAssertions *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__get_USCOREpublisherAssertions(struct soap*, uddi2__get_USCOREpublisherAssertions *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__get_USCOREpublisherAssertions(struct soap*, const char *, int, uddi2__get_USCOREpublisherAssertions *const*, const char *);
+SOAP_FMAC3 uddi2__get_USCOREpublisherAssertions ** SOAP_FMAC4 soap_get_PointerTouddi2__get_USCOREpublisherAssertions(struct soap*, uddi2__get_USCOREpublisherAssertions **, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREpublisherAssertions ** SOAP_FMAC4 soap_in_PointerTouddi2__get_USCOREpublisherAssertions(struct soap*, const char*, uddi2__get_USCOREpublisherAssertions **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__get_USCOREauthToken
+#define SOAP_TYPE_PointerTouddi2__get_USCOREauthToken (361)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__get_USCOREauthToken(struct soap*, uddi2__get_USCOREauthToken *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__get_USCOREauthToken(struct soap*, uddi2__get_USCOREauthToken *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__get_USCOREauthToken(struct soap*, const char *, int, uddi2__get_USCOREauthToken *const*, const char *);
+SOAP_FMAC3 uddi2__get_USCOREauthToken ** SOAP_FMAC4 soap_get_PointerTouddi2__get_USCOREauthToken(struct soap*, uddi2__get_USCOREauthToken **, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREauthToken ** SOAP_FMAC4 soap_in_PointerTouddi2__get_USCOREauthToken(struct soap*, const char*, uddi2__get_USCOREauthToken **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__get_USCOREassertionStatusReport
+#define SOAP_TYPE_PointerTouddi2__get_USCOREassertionStatusReport (358)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__get_USCOREassertionStatusReport(struct soap*, uddi2__get_USCOREassertionStatusReport *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__get_USCOREassertionStatusReport(struct soap*, uddi2__get_USCOREassertionStatusReport *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__get_USCOREassertionStatusReport(struct soap*, const char *, int, uddi2__get_USCOREassertionStatusReport *const*, const char *);
+SOAP_FMAC3 uddi2__get_USCOREassertionStatusReport ** SOAP_FMAC4 soap_get_PointerTouddi2__get_USCOREassertionStatusReport(struct soap*, uddi2__get_USCOREassertionStatusReport **, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREassertionStatusReport ** SOAP_FMAC4 soap_in_PointerTouddi2__get_USCOREassertionStatusReport(struct soap*, const char*, uddi2__get_USCOREassertionStatusReport **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__discard_USCOREauthToken
+#define SOAP_TYPE_PointerTouddi2__discard_USCOREauthToken (355)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__discard_USCOREauthToken(struct soap*, uddi2__discard_USCOREauthToken *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__discard_USCOREauthToken(struct soap*, uddi2__discard_USCOREauthToken *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__discard_USCOREauthToken(struct soap*, const char *, int, uddi2__discard_USCOREauthToken *const*, const char *);
+SOAP_FMAC3 uddi2__discard_USCOREauthToken ** SOAP_FMAC4 soap_get_PointerTouddi2__discard_USCOREauthToken(struct soap*, uddi2__discard_USCOREauthToken **, const char*, const char*);
+SOAP_FMAC3 uddi2__discard_USCOREauthToken ** SOAP_FMAC4 soap_in_PointerTouddi2__discard_USCOREauthToken(struct soap*, const char*, uddi2__discard_USCOREauthToken **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__delete_USCOREtModel
+#define SOAP_TYPE_PointerTouddi2__delete_USCOREtModel (352)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__delete_USCOREtModel(struct soap*, uddi2__delete_USCOREtModel *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__delete_USCOREtModel(struct soap*, uddi2__delete_USCOREtModel *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__delete_USCOREtModel(struct soap*, const char *, int, uddi2__delete_USCOREtModel *const*, const char *);
+SOAP_FMAC3 uddi2__delete_USCOREtModel ** SOAP_FMAC4 soap_get_PointerTouddi2__delete_USCOREtModel(struct soap*, uddi2__delete_USCOREtModel **, const char*, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREtModel ** SOAP_FMAC4 soap_in_PointerTouddi2__delete_USCOREtModel(struct soap*, const char*, uddi2__delete_USCOREtModel **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__delete_USCOREservice
+#define SOAP_TYPE_PointerTouddi2__delete_USCOREservice (349)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__delete_USCOREservice(struct soap*, uddi2__delete_USCOREservice *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__delete_USCOREservice(struct soap*, uddi2__delete_USCOREservice *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__delete_USCOREservice(struct soap*, const char *, int, uddi2__delete_USCOREservice *const*, const char *);
+SOAP_FMAC3 uddi2__delete_USCOREservice ** SOAP_FMAC4 soap_get_PointerTouddi2__delete_USCOREservice(struct soap*, uddi2__delete_USCOREservice **, const char*, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREservice ** SOAP_FMAC4 soap_in_PointerTouddi2__delete_USCOREservice(struct soap*, const char*, uddi2__delete_USCOREservice **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__delete_USCOREpublisherAssertions
+#define SOAP_TYPE_PointerTouddi2__delete_USCOREpublisherAssertions (346)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__delete_USCOREpublisherAssertions(struct soap*, uddi2__delete_USCOREpublisherAssertions *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__delete_USCOREpublisherAssertions(struct soap*, uddi2__delete_USCOREpublisherAssertions *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__delete_USCOREpublisherAssertions(struct soap*, const char *, int, uddi2__delete_USCOREpublisherAssertions *const*, const char *);
+SOAP_FMAC3 uddi2__delete_USCOREpublisherAssertions ** SOAP_FMAC4 soap_get_PointerTouddi2__delete_USCOREpublisherAssertions(struct soap*, uddi2__delete_USCOREpublisherAssertions **, const char*, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREpublisherAssertions ** SOAP_FMAC4 soap_in_PointerTouddi2__delete_USCOREpublisherAssertions(struct soap*, const char*, uddi2__delete_USCOREpublisherAssertions **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__delete_USCOREbusiness
+#define SOAP_TYPE_PointerTouddi2__delete_USCOREbusiness (343)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__delete_USCOREbusiness(struct soap*, uddi2__delete_USCOREbusiness *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__delete_USCOREbusiness(struct soap*, uddi2__delete_USCOREbusiness *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__delete_USCOREbusiness(struct soap*, const char *, int, uddi2__delete_USCOREbusiness *const*, const char *);
+SOAP_FMAC3 uddi2__delete_USCOREbusiness ** SOAP_FMAC4 soap_get_PointerTouddi2__delete_USCOREbusiness(struct soap*, uddi2__delete_USCOREbusiness **, const char*, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREbusiness ** SOAP_FMAC4 soap_in_PointerTouddi2__delete_USCOREbusiness(struct soap*, const char*, uddi2__delete_USCOREbusiness **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__delete_USCOREbinding
+#define SOAP_TYPE_PointerTouddi2__delete_USCOREbinding (340)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__delete_USCOREbinding(struct soap*, uddi2__delete_USCOREbinding *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__delete_USCOREbinding(struct soap*, uddi2__delete_USCOREbinding *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__delete_USCOREbinding(struct soap*, const char *, int, uddi2__delete_USCOREbinding *const*, const char *);
+SOAP_FMAC3 uddi2__delete_USCOREbinding ** SOAP_FMAC4 soap_get_PointerTouddi2__delete_USCOREbinding(struct soap*, uddi2__delete_USCOREbinding **, const char*, const char*);
+SOAP_FMAC3 uddi2__delete_USCOREbinding ** SOAP_FMAC4 soap_in_PointerTouddi2__delete_USCOREbinding(struct soap*, const char*, uddi2__delete_USCOREbinding **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__add_USCOREpublisherAssertions
+#define SOAP_TYPE_PointerTouddi2__add_USCOREpublisherAssertions (337)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__add_USCOREpublisherAssertions(struct soap*, uddi2__add_USCOREpublisherAssertions *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__add_USCOREpublisherAssertions(struct soap*, uddi2__add_USCOREpublisherAssertions *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__add_USCOREpublisherAssertions(struct soap*, const char *, int, uddi2__add_USCOREpublisherAssertions *const*, const char *);
+SOAP_FMAC3 uddi2__add_USCOREpublisherAssertions ** SOAP_FMAC4 soap_get_PointerTouddi2__add_USCOREpublisherAssertions(struct soap*, uddi2__add_USCOREpublisherAssertions **, const char*, const char*);
+SOAP_FMAC3 uddi2__add_USCOREpublisherAssertions ** SOAP_FMAC4 soap_in_PointerTouddi2__add_USCOREpublisherAssertions(struct soap*, const char*, uddi2__add_USCOREpublisherAssertions **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__get_USCOREtModelDetail
+#define SOAP_TYPE_PointerTouddi2__get_USCOREtModelDetail (334)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__get_USCOREtModelDetail(struct soap*, uddi2__get_USCOREtModelDetail *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__get_USCOREtModelDetail(struct soap*, uddi2__get_USCOREtModelDetail *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__get_USCOREtModelDetail(struct soap*, const char *, int, uddi2__get_USCOREtModelDetail *const*, const char *);
+SOAP_FMAC3 uddi2__get_USCOREtModelDetail ** SOAP_FMAC4 soap_get_PointerTouddi2__get_USCOREtModelDetail(struct soap*, uddi2__get_USCOREtModelDetail **, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREtModelDetail ** SOAP_FMAC4 soap_in_PointerTouddi2__get_USCOREtModelDetail(struct soap*, const char*, uddi2__get_USCOREtModelDetail **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__get_USCOREserviceDetail
+#define SOAP_TYPE_PointerTouddi2__get_USCOREserviceDetail (331)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__get_USCOREserviceDetail(struct soap*, uddi2__get_USCOREserviceDetail *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__get_USCOREserviceDetail(struct soap*, uddi2__get_USCOREserviceDetail *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__get_USCOREserviceDetail(struct soap*, const char *, int, uddi2__get_USCOREserviceDetail *const*, const char *);
+SOAP_FMAC3 uddi2__get_USCOREserviceDetail ** SOAP_FMAC4 soap_get_PointerTouddi2__get_USCOREserviceDetail(struct soap*, uddi2__get_USCOREserviceDetail **, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREserviceDetail ** SOAP_FMAC4 soap_in_PointerTouddi2__get_USCOREserviceDetail(struct soap*, const char*, uddi2__get_USCOREserviceDetail **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__get_USCOREbusinessDetailExt
+#define SOAP_TYPE_PointerTouddi2__get_USCOREbusinessDetailExt (328)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__get_USCOREbusinessDetailExt(struct soap*, uddi2__get_USCOREbusinessDetailExt *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__get_USCOREbusinessDetailExt(struct soap*, uddi2__get_USCOREbusinessDetailExt *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__get_USCOREbusinessDetailExt(struct soap*, const char *, int, uddi2__get_USCOREbusinessDetailExt *const*, const char *);
+SOAP_FMAC3 uddi2__get_USCOREbusinessDetailExt ** SOAP_FMAC4 soap_get_PointerTouddi2__get_USCOREbusinessDetailExt(struct soap*, uddi2__get_USCOREbusinessDetailExt **, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREbusinessDetailExt ** SOAP_FMAC4 soap_in_PointerTouddi2__get_USCOREbusinessDetailExt(struct soap*, const char*, uddi2__get_USCOREbusinessDetailExt **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__get_USCOREbusinessDetail
+#define SOAP_TYPE_PointerTouddi2__get_USCOREbusinessDetail (325)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__get_USCOREbusinessDetail(struct soap*, uddi2__get_USCOREbusinessDetail *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__get_USCOREbusinessDetail(struct soap*, uddi2__get_USCOREbusinessDetail *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__get_USCOREbusinessDetail(struct soap*, const char *, int, uddi2__get_USCOREbusinessDetail *const*, const char *);
+SOAP_FMAC3 uddi2__get_USCOREbusinessDetail ** SOAP_FMAC4 soap_get_PointerTouddi2__get_USCOREbusinessDetail(struct soap*, uddi2__get_USCOREbusinessDetail **, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREbusinessDetail ** SOAP_FMAC4 soap_in_PointerTouddi2__get_USCOREbusinessDetail(struct soap*, const char*, uddi2__get_USCOREbusinessDetail **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__get_USCOREbindingDetail
+#define SOAP_TYPE_PointerTouddi2__get_USCOREbindingDetail (322)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__get_USCOREbindingDetail(struct soap*, uddi2__get_USCOREbindingDetail *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__get_USCOREbindingDetail(struct soap*, uddi2__get_USCOREbindingDetail *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__get_USCOREbindingDetail(struct soap*, const char *, int, uddi2__get_USCOREbindingDetail *const*, const char *);
+SOAP_FMAC3 uddi2__get_USCOREbindingDetail ** SOAP_FMAC4 soap_get_PointerTouddi2__get_USCOREbindingDetail(struct soap*, uddi2__get_USCOREbindingDetail **, const char*, const char*);
+SOAP_FMAC3 uddi2__get_USCOREbindingDetail ** SOAP_FMAC4 soap_in_PointerTouddi2__get_USCOREbindingDetail(struct soap*, const char*, uddi2__get_USCOREbindingDetail **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__find_USCOREtModel
+#define SOAP_TYPE_PointerTouddi2__find_USCOREtModel (319)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__find_USCOREtModel(struct soap*, uddi2__find_USCOREtModel *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__find_USCOREtModel(struct soap*, uddi2__find_USCOREtModel *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__find_USCOREtModel(struct soap*, const char *, int, uddi2__find_USCOREtModel *const*, const char *);
+SOAP_FMAC3 uddi2__find_USCOREtModel ** SOAP_FMAC4 soap_get_PointerTouddi2__find_USCOREtModel(struct soap*, uddi2__find_USCOREtModel **, const char*, const char*);
+SOAP_FMAC3 uddi2__find_USCOREtModel ** SOAP_FMAC4 soap_in_PointerTouddi2__find_USCOREtModel(struct soap*, const char*, uddi2__find_USCOREtModel **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__find_USCOREservice
+#define SOAP_TYPE_PointerTouddi2__find_USCOREservice (316)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__find_USCOREservice(struct soap*, uddi2__find_USCOREservice *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__find_USCOREservice(struct soap*, uddi2__find_USCOREservice *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__find_USCOREservice(struct soap*, const char *, int, uddi2__find_USCOREservice *const*, const char *);
+SOAP_FMAC3 uddi2__find_USCOREservice ** SOAP_FMAC4 soap_get_PointerTouddi2__find_USCOREservice(struct soap*, uddi2__find_USCOREservice **, const char*, const char*);
+SOAP_FMAC3 uddi2__find_USCOREservice ** SOAP_FMAC4 soap_in_PointerTouddi2__find_USCOREservice(struct soap*, const char*, uddi2__find_USCOREservice **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__find_USCORErelatedBusinesses
+#define SOAP_TYPE_PointerTouddi2__find_USCORErelatedBusinesses (313)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__find_USCORErelatedBusinesses(struct soap*, uddi2__find_USCORErelatedBusinesses *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__find_USCORErelatedBusinesses(struct soap*, uddi2__find_USCORErelatedBusinesses *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__find_USCORErelatedBusinesses(struct soap*, const char *, int, uddi2__find_USCORErelatedBusinesses *const*, const char *);
+SOAP_FMAC3 uddi2__find_USCORErelatedBusinesses ** SOAP_FMAC4 soap_get_PointerTouddi2__find_USCORErelatedBusinesses(struct soap*, uddi2__find_USCORErelatedBusinesses **, const char*, const char*);
+SOAP_FMAC3 uddi2__find_USCORErelatedBusinesses ** SOAP_FMAC4 soap_in_PointerTouddi2__find_USCORErelatedBusinesses(struct soap*, const char*, uddi2__find_USCORErelatedBusinesses **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__find_USCOREbusiness
+#define SOAP_TYPE_PointerTouddi2__find_USCOREbusiness (310)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__find_USCOREbusiness(struct soap*, uddi2__find_USCOREbusiness *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__find_USCOREbusiness(struct soap*, uddi2__find_USCOREbusiness *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__find_USCOREbusiness(struct soap*, const char *, int, uddi2__find_USCOREbusiness *const*, const char *);
+SOAP_FMAC3 uddi2__find_USCOREbusiness ** SOAP_FMAC4 soap_get_PointerTouddi2__find_USCOREbusiness(struct soap*, uddi2__find_USCOREbusiness **, const char*, const char*);
+SOAP_FMAC3 uddi2__find_USCOREbusiness ** SOAP_FMAC4 soap_in_PointerTouddi2__find_USCOREbusiness(struct soap*, const char*, uddi2__find_USCOREbusiness **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__find_USCOREbinding
+#define SOAP_TYPE_PointerTouddi2__find_USCOREbinding (307)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__find_USCOREbinding(struct soap*, uddi2__find_USCOREbinding *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__find_USCOREbinding(struct soap*, uddi2__find_USCOREbinding *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__find_USCOREbinding(struct soap*, const char *, int, uddi2__find_USCOREbinding *const*, const char *);
+SOAP_FMAC3 uddi2__find_USCOREbinding ** SOAP_FMAC4 soap_get_PointerTouddi2__find_USCOREbinding(struct soap*, uddi2__find_USCOREbinding **, const char*, const char*);
+SOAP_FMAC3 uddi2__find_USCOREbinding ** SOAP_FMAC4 soap_in_PointerTouddi2__find_USCOREbinding(struct soap*, const char*, uddi2__find_USCOREbinding **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__relatedBusinessInfos
+#define SOAP_TYPE_PointerTouddi2__relatedBusinessInfos (305)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__relatedBusinessInfos(struct soap*, uddi2__relatedBusinessInfos *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__relatedBusinessInfos(struct soap*, uddi2__relatedBusinessInfos *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__relatedBusinessInfos(struct soap*, const char *, int, uddi2__relatedBusinessInfos *const*, const char *);
+SOAP_FMAC3 uddi2__relatedBusinessInfos ** SOAP_FMAC4 soap_get_PointerTouddi2__relatedBusinessInfos(struct soap*, uddi2__relatedBusinessInfos **, const char*, const char*);
+SOAP_FMAC3 uddi2__relatedBusinessInfos ** SOAP_FMAC4 soap_in_PointerTouddi2__relatedBusinessInfos(struct soap*, const char*, uddi2__relatedBusinessInfos **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__tModelInfos
+#define SOAP_TYPE_PointerTouddi2__tModelInfos (304)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__tModelInfos(struct soap*, uddi2__tModelInfos *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__tModelInfos(struct soap*, uddi2__tModelInfos *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__tModelInfos(struct soap*, const char *, int, uddi2__tModelInfos *const*, const char *);
+SOAP_FMAC3 uddi2__tModelInfos ** SOAP_FMAC4 soap_get_PointerTouddi2__tModelInfos(struct soap*, uddi2__tModelInfos **, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelInfos ** SOAP_FMAC4 soap_in_PointerTouddi2__tModelInfos(struct soap*, const char*, uddi2__tModelInfos **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__businessInfos
+#define SOAP_TYPE_PointerTouddi2__businessInfos (303)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__businessInfos(struct soap*, uddi2__businessInfos *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__businessInfos(struct soap*, uddi2__businessInfos *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__businessInfos(struct soap*, const char *, int, uddi2__businessInfos *const*, const char *);
+SOAP_FMAC3 uddi2__businessInfos ** SOAP_FMAC4 soap_get_PointerTouddi2__businessInfos(struct soap*, uddi2__businessInfos **, const char*, const char*);
+SOAP_FMAC3 uddi2__businessInfos ** SOAP_FMAC4 soap_in_PointerTouddi2__businessInfos(struct soap*, const char*, uddi2__businessInfos **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__businessEntityExt
+#define SOAP_TYPE_PointerTouddi2__businessEntityExt (301)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__businessEntityExt(struct soap*, uddi2__businessEntityExt *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__businessEntityExt(struct soap*, uddi2__businessEntityExt *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__businessEntityExt(struct soap*, const char *, int, uddi2__businessEntityExt *const*, const char *);
+SOAP_FMAC3 uddi2__businessEntityExt ** SOAP_FMAC4 soap_get_PointerTouddi2__businessEntityExt(struct soap*, uddi2__businessEntityExt **, const char*, const char*);
+SOAP_FMAC3 uddi2__businessEntityExt ** SOAP_FMAC4 soap_in_PointerTouddi2__businessEntityExt(struct soap*, const char*, uddi2__businessEntityExt **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__assertionStatusItem
+#define SOAP_TYPE_PointerTouddi2__assertionStatusItem (299)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__assertionStatusItem(struct soap*, uddi2__assertionStatusItem *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__assertionStatusItem(struct soap*, uddi2__assertionStatusItem *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__assertionStatusItem(struct soap*, const char *, int, uddi2__assertionStatusItem *const*, const char *);
+SOAP_FMAC3 uddi2__assertionStatusItem ** SOAP_FMAC4 soap_get_PointerTouddi2__assertionStatusItem(struct soap*, uddi2__assertionStatusItem **, const char*, const char*);
+SOAP_FMAC3 uddi2__assertionStatusItem ** SOAP_FMAC4 soap_in_PointerTouddi2__assertionStatusItem(struct soap*, const char*, uddi2__assertionStatusItem **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__tModel
+#define SOAP_TYPE_PointerTouddi2__tModel (287)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__tModel(struct soap*, uddi2__tModel *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__tModel(struct soap*, uddi2__tModel *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__tModel(struct soap*, const char *, int, uddi2__tModel *const*, const char *);
+SOAP_FMAC3 uddi2__tModel ** SOAP_FMAC4 soap_get_PointerTouddi2__tModel(struct soap*, uddi2__tModel **, const char*, const char*);
+SOAP_FMAC3 uddi2__tModel ** SOAP_FMAC4 soap_in_PointerTouddi2__tModel(struct soap*, const char*, uddi2__tModel **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__tModelDetail
+#define SOAP_TYPE_PointerTouddi2__tModelDetail (263)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__tModelDetail(struct soap*, uddi2__tModelDetail *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__tModelDetail(struct soap*, uddi2__tModelDetail *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__tModelDetail(struct soap*, const char *, int, uddi2__tModelDetail *const*, const char *);
+SOAP_FMAC3 uddi2__tModelDetail ** SOAP_FMAC4 soap_get_PointerTouddi2__tModelDetail(struct soap*, uddi2__tModelDetail **, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelDetail ** SOAP_FMAC4 soap_in_PointerTouddi2__tModelDetail(struct soap*, const char*, uddi2__tModelDetail **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__serviceDetail
+#define SOAP_TYPE_PointerTouddi2__serviceDetail (258)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__serviceDetail(struct soap*, uddi2__serviceDetail *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__serviceDetail(struct soap*, uddi2__serviceDetail *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__serviceDetail(struct soap*, const char *, int, uddi2__serviceDetail *const*, const char *);
+SOAP_FMAC3 uddi2__serviceDetail ** SOAP_FMAC4 soap_get_PointerTouddi2__serviceDetail(struct soap*, uddi2__serviceDetail **, const char*, const char*);
+SOAP_FMAC3 uddi2__serviceDetail ** SOAP_FMAC4 soap_in_PointerTouddi2__serviceDetail(struct soap*, const char*, uddi2__serviceDetail **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__registeredInfo
+#define SOAP_TYPE_PointerTouddi2__registeredInfo (253)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__registeredInfo(struct soap*, uddi2__registeredInfo *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__registeredInfo(struct soap*, uddi2__registeredInfo *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__registeredInfo(struct soap*, const char *, int, uddi2__registeredInfo *const*, const char *);
+SOAP_FMAC3 uddi2__registeredInfo ** SOAP_FMAC4 soap_get_PointerTouddi2__registeredInfo(struct soap*, uddi2__registeredInfo **, const char*, const char*);
+SOAP_FMAC3 uddi2__registeredInfo ** SOAP_FMAC4 soap_in_PointerTouddi2__registeredInfo(struct soap*, const char*, uddi2__registeredInfo **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__publisherAssertions
+#define SOAP_TYPE_PointerTouddi2__publisherAssertions (250)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__publisherAssertions(struct soap*, uddi2__publisherAssertions *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__publisherAssertions(struct soap*, uddi2__publisherAssertions *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__publisherAssertions(struct soap*, const char *, int, uddi2__publisherAssertions *const*, const char *);
+SOAP_FMAC3 uddi2__publisherAssertions ** SOAP_FMAC4 soap_get_PointerTouddi2__publisherAssertions(struct soap*, uddi2__publisherAssertions **, const char*, const char*);
+SOAP_FMAC3 uddi2__publisherAssertions ** SOAP_FMAC4 soap_in_PointerTouddi2__publisherAssertions(struct soap*, const char*, uddi2__publisherAssertions **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__businessDetailExt
+#define SOAP_TYPE_PointerTouddi2__businessDetailExt (247)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__businessDetailExt(struct soap*, uddi2__businessDetailExt *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__businessDetailExt(struct soap*, uddi2__businessDetailExt *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__businessDetailExt(struct soap*, const char *, int, uddi2__businessDetailExt *const*, const char *);
+SOAP_FMAC3 uddi2__businessDetailExt ** SOAP_FMAC4 soap_get_PointerTouddi2__businessDetailExt(struct soap*, uddi2__businessDetailExt **, const char*, const char*);
+SOAP_FMAC3 uddi2__businessDetailExt ** SOAP_FMAC4 soap_in_PointerTouddi2__businessDetailExt(struct soap*, const char*, uddi2__businessDetailExt **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__businessDetail
+#define SOAP_TYPE_PointerTouddi2__businessDetail (242)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__businessDetail(struct soap*, uddi2__businessDetail *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__businessDetail(struct soap*, uddi2__businessDetail *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__businessDetail(struct soap*, const char *, int, uddi2__businessDetail *const*, const char *);
+SOAP_FMAC3 uddi2__businessDetail ** SOAP_FMAC4 soap_get_PointerTouddi2__businessDetail(struct soap*, uddi2__businessDetail **, const char*, const char*);
+SOAP_FMAC3 uddi2__businessDetail ** SOAP_FMAC4 soap_in_PointerTouddi2__businessDetail(struct soap*, const char*, uddi2__businessDetail **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__authToken
+#define SOAP_TYPE_PointerTouddi2__authToken (233)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__authToken(struct soap*, uddi2__authToken *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__authToken(struct soap*, uddi2__authToken *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__authToken(struct soap*, const char *, int, uddi2__authToken *const*, const char *);
+SOAP_FMAC3 uddi2__authToken ** SOAP_FMAC4 soap_get_PointerTouddi2__authToken(struct soap*, uddi2__authToken **, const char*, const char*);
+SOAP_FMAC3 uddi2__authToken ** SOAP_FMAC4 soap_in_PointerTouddi2__authToken(struct soap*, const char*, uddi2__authToken **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__assertionStatusReport
+#define SOAP_TYPE_PointerTouddi2__assertionStatusReport (229)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__assertionStatusReport(struct soap*, uddi2__assertionStatusReport *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__assertionStatusReport(struct soap*, uddi2__assertionStatusReport *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__assertionStatusReport(struct soap*, const char *, int, uddi2__assertionStatusReport *const*, const char *);
+SOAP_FMAC3 uddi2__assertionStatusReport ** SOAP_FMAC4 soap_get_PointerTouddi2__assertionStatusReport(struct soap*, uddi2__assertionStatusReport **, const char*, const char*);
+SOAP_FMAC3 uddi2__assertionStatusReport ** SOAP_FMAC4 soap_in_PointerTouddi2__assertionStatusReport(struct soap*, const char*, uddi2__assertionStatusReport **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__tModelList
+#define SOAP_TYPE_PointerTouddi2__tModelList (225)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__tModelList(struct soap*, uddi2__tModelList *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__tModelList(struct soap*, uddi2__tModelList *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__tModelList(struct soap*, const char *, int, uddi2__tModelList *const*, const char *);
+SOAP_FMAC3 uddi2__tModelList ** SOAP_FMAC4 soap_get_PointerTouddi2__tModelList(struct soap*, uddi2__tModelList **, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelList ** SOAP_FMAC4 soap_in_PointerTouddi2__tModelList(struct soap*, const char*, uddi2__tModelList **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__serviceList
+#define SOAP_TYPE_PointerTouddi2__serviceList (220)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__serviceList(struct soap*, uddi2__serviceList *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__serviceList(struct soap*, uddi2__serviceList *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__serviceList(struct soap*, const char *, int, uddi2__serviceList *const*, const char *);
+SOAP_FMAC3 uddi2__serviceList ** SOAP_FMAC4 soap_get_PointerTouddi2__serviceList(struct soap*, uddi2__serviceList **, const char*, const char*);
+SOAP_FMAC3 uddi2__serviceList ** SOAP_FMAC4 soap_in_PointerTouddi2__serviceList(struct soap*, const char*, uddi2__serviceList **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__relatedBusinessesList
+#define SOAP_TYPE_PointerTouddi2__relatedBusinessesList (214)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__relatedBusinessesList(struct soap*, uddi2__relatedBusinessesList *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__relatedBusinessesList(struct soap*, uddi2__relatedBusinessesList *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__relatedBusinessesList(struct soap*, const char *, int, uddi2__relatedBusinessesList *const*, const char *);
+SOAP_FMAC3 uddi2__relatedBusinessesList ** SOAP_FMAC4 soap_get_PointerTouddi2__relatedBusinessesList(struct soap*, uddi2__relatedBusinessesList **, const char*, const char*);
+SOAP_FMAC3 uddi2__relatedBusinessesList ** SOAP_FMAC4 soap_in_PointerTouddi2__relatedBusinessesList(struct soap*, const char*, uddi2__relatedBusinessesList **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__businessList
+#define SOAP_TYPE_PointerTouddi2__businessList (210)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__businessList(struct soap*, uddi2__businessList *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__businessList(struct soap*, uddi2__businessList *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__businessList(struct soap*, const char *, int, uddi2__businessList *const*, const char *);
+SOAP_FMAC3 uddi2__businessList ** SOAP_FMAC4 soap_get_PointerTouddi2__businessList(struct soap*, uddi2__businessList **, const char*, const char*);
+SOAP_FMAC3 uddi2__businessList ** SOAP_FMAC4 soap_in_PointerTouddi2__businessList(struct soap*, const char*, uddi2__businessList **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__bindingDetail
+#define SOAP_TYPE_PointerTouddi2__bindingDetail (202)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__bindingDetail(struct soap*, uddi2__bindingDetail *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__bindingDetail(struct soap*, uddi2__bindingDetail *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__bindingDetail(struct soap*, const char *, int, uddi2__bindingDetail *const*, const char *);
+SOAP_FMAC3 uddi2__bindingDetail ** SOAP_FMAC4 soap_get_PointerTouddi2__bindingDetail(struct soap*, uddi2__bindingDetail **, const char*, const char*);
+SOAP_FMAC3 uddi2__bindingDetail ** SOAP_FMAC4 soap_in_PointerTouddi2__bindingDetail(struct soap*, const char*, uddi2__bindingDetail **, const char*);
+
+#ifndef SOAP_TYPE_PointerToint
+#define SOAP_TYPE_PointerToint (198)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToint(struct soap*, int *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToint(struct soap*, int *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToint(struct soap*, const char *, int, int *const*, const char *);
+SOAP_FMAC3 int ** SOAP_FMAC4 soap_get_PointerToint(struct soap*, int **, const char*, const char*);
+SOAP_FMAC3 int ** SOAP_FMAC4 soap_in_PointerToint(struct soap*, const char*, int **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__tModelBag
+#define SOAP_TYPE_PointerTouddi2__tModelBag (197)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__tModelBag(struct soap*, uddi2__tModelBag *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__tModelBag(struct soap*, uddi2__tModelBag *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__tModelBag(struct soap*, const char *, int, uddi2__tModelBag *const*, const char *);
+SOAP_FMAC3 uddi2__tModelBag ** SOAP_FMAC4 soap_get_PointerTouddi2__tModelBag(struct soap*, uddi2__tModelBag **, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelBag ** SOAP_FMAC4 soap_in_PointerTouddi2__tModelBag(struct soap*, const char*, uddi2__tModelBag **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__findQualifiers
+#define SOAP_TYPE_PointerTouddi2__findQualifiers (196)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__findQualifiers(struct soap*, uddi2__findQualifiers *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__findQualifiers(struct soap*, uddi2__findQualifiers *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__findQualifiers(struct soap*, const char *, int, uddi2__findQualifiers *const*, const char *);
+SOAP_FMAC3 uddi2__findQualifiers ** SOAP_FMAC4 soap_get_PointerTouddi2__findQualifiers(struct soap*, uddi2__findQualifiers **, const char*, const char*);
+SOAP_FMAC3 uddi2__findQualifiers ** SOAP_FMAC4 soap_in_PointerTouddi2__findQualifiers(struct soap*, const char*, uddi2__findQualifiers **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__dispositionReport
+#define SOAP_TYPE_PointerTouddi2__dispositionReport (166)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__dispositionReport(struct soap*, uddi2__dispositionReport *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__dispositionReport(struct soap*, uddi2__dispositionReport *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__dispositionReport(struct soap*, const char *, int, uddi2__dispositionReport *const*, const char *);
+SOAP_FMAC3 uddi2__dispositionReport ** SOAP_FMAC4 soap_get_PointerTouddi2__dispositionReport(struct soap*, uddi2__dispositionReport **, const char*, const char*);
+SOAP_FMAC3 uddi2__dispositionReport ** SOAP_FMAC4 soap_in_PointerTouddi2__dispositionReport(struct soap*, const char*, uddi2__dispositionReport **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__publisherAssertion
+#define SOAP_TYPE_PointerTouddi2__publisherAssertion (157)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__publisherAssertion(struct soap*, uddi2__publisherAssertion *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__publisherAssertion(struct soap*, uddi2__publisherAssertion *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__publisherAssertion(struct soap*, const char *, int, uddi2__publisherAssertion *const*, const char *);
+SOAP_FMAC3 uddi2__publisherAssertion ** SOAP_FMAC4 soap_get_PointerTouddi2__publisherAssertion(struct soap*, uddi2__publisherAssertion **, const char*, const char*);
+SOAP_FMAC3 uddi2__publisherAssertion ** SOAP_FMAC4 soap_in_PointerTouddi2__publisherAssertion(struct soap*, const char*, uddi2__publisherAssertion **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__instanceDetails
+#define SOAP_TYPE_PointerTouddi2__instanceDetails (156)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__instanceDetails(struct soap*, uddi2__instanceDetails *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__instanceDetails(struct soap*, uddi2__instanceDetails *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__instanceDetails(struct soap*, const char *, int, uddi2__instanceDetails *const*, const char *);
+SOAP_FMAC3 uddi2__instanceDetails ** SOAP_FMAC4 soap_get_PointerTouddi2__instanceDetails(struct soap*, uddi2__instanceDetails **, const char*, const char*);
+SOAP_FMAC3 uddi2__instanceDetails ** SOAP_FMAC4 soap_in_PointerTouddi2__instanceDetails(struct soap*, const char*, uddi2__instanceDetails **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__tModelInstanceInfo
+#define SOAP_TYPE_PointerTouddi2__tModelInstanceInfo (154)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__tModelInstanceInfo(struct soap*, uddi2__tModelInstanceInfo *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__tModelInstanceInfo(struct soap*, uddi2__tModelInstanceInfo *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__tModelInstanceInfo(struct soap*, const char *, int, uddi2__tModelInstanceInfo *const*, const char *);
+SOAP_FMAC3 uddi2__tModelInstanceInfo ** SOAP_FMAC4 soap_get_PointerTouddi2__tModelInstanceInfo(struct soap*, uddi2__tModelInstanceInfo **, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelInstanceInfo ** SOAP_FMAC4 soap_in_PointerTouddi2__tModelInstanceInfo(struct soap*, const char*, uddi2__tModelInstanceInfo **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__tModelInfo
+#define SOAP_TYPE_PointerTouddi2__tModelInfo (152)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__tModelInfo(struct soap*, uddi2__tModelInfo *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__tModelInfo(struct soap*, uddi2__tModelInfo *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__tModelInfo(struct soap*, const char *, int, uddi2__tModelInfo *const*, const char *);
+SOAP_FMAC3 uddi2__tModelInfo ** SOAP_FMAC4 soap_get_PointerTouddi2__tModelInfo(struct soap*, uddi2__tModelInfo **, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelInfo ** SOAP_FMAC4 soap_in_PointerTouddi2__tModelInfo(struct soap*, const char*, uddi2__tModelInfo **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__serviceInfo
+#define SOAP_TYPE_PointerTouddi2__serviceInfo (149)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__serviceInfo(struct soap*, uddi2__serviceInfo *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__serviceInfo(struct soap*, uddi2__serviceInfo *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__serviceInfo(struct soap*, const char *, int, uddi2__serviceInfo *const*, const char *);
+SOAP_FMAC3 uddi2__serviceInfo ** SOAP_FMAC4 soap_get_PointerTouddi2__serviceInfo(struct soap*, uddi2__serviceInfo **, const char*, const char*);
+SOAP_FMAC3 uddi2__serviceInfo ** SOAP_FMAC4 soap_in_PointerTouddi2__serviceInfo(struct soap*, const char*, uddi2__serviceInfo **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__keyType
+#define SOAP_TYPE_PointerTouddi2__keyType (148)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__keyType(struct soap*, enum uddi2__keyType *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__keyType(struct soap*, enum uddi2__keyType *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__keyType(struct soap*, const char *, int, enum uddi2__keyType *const*, const char *);
+SOAP_FMAC3 enum uddi2__keyType ** SOAP_FMAC4 soap_get_PointerTouddi2__keyType(struct soap*, enum uddi2__keyType **, const char*, const char*);
+SOAP_FMAC3 enum uddi2__keyType ** SOAP_FMAC4 soap_in_PointerTouddi2__keyType(struct soap*, const char*, enum uddi2__keyType **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__errInfo
+#define SOAP_TYPE_PointerTouddi2__errInfo (147)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__errInfo(struct soap*, uddi2__errInfo *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__errInfo(struct soap*, uddi2__errInfo *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__errInfo(struct soap*, const char *, int, uddi2__errInfo *const*, const char *);
+SOAP_FMAC3 uddi2__errInfo ** SOAP_FMAC4 soap_get_PointerTouddi2__errInfo(struct soap*, uddi2__errInfo **, const char*, const char*);
+SOAP_FMAC3 uddi2__errInfo ** SOAP_FMAC4 soap_in_PointerTouddi2__errInfo(struct soap*, const char*, uddi2__errInfo **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__relatedBusinessInfo
+#define SOAP_TYPE_PointerTouddi2__relatedBusinessInfo (145)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__relatedBusinessInfo(struct soap*, uddi2__relatedBusinessInfo *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__relatedBusinessInfo(struct soap*, uddi2__relatedBusinessInfo *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__relatedBusinessInfo(struct soap*, const char *, int, uddi2__relatedBusinessInfo *const*, const char *);
+SOAP_FMAC3 uddi2__relatedBusinessInfo ** SOAP_FMAC4 soap_get_PointerTouddi2__relatedBusinessInfo(struct soap*, uddi2__relatedBusinessInfo **, const char*, const char*);
+SOAP_FMAC3 uddi2__relatedBusinessInfo ** SOAP_FMAC4 soap_in_PointerTouddi2__relatedBusinessInfo(struct soap*, const char*, uddi2__relatedBusinessInfo **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__sharedRelationships
+#define SOAP_TYPE_PointerTouddi2__sharedRelationships (143)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__sharedRelationships(struct soap*, uddi2__sharedRelationships *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__sharedRelationships(struct soap*, uddi2__sharedRelationships *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__sharedRelationships(struct soap*, const char *, int, uddi2__sharedRelationships *const*, const char *);
+SOAP_FMAC3 uddi2__sharedRelationships ** SOAP_FMAC4 soap_get_PointerTouddi2__sharedRelationships(struct soap*, uddi2__sharedRelationships **, const char*, const char*);
+SOAP_FMAC3 uddi2__sharedRelationships ** SOAP_FMAC4 soap_in_PointerTouddi2__sharedRelationships(struct soap*, const char*, uddi2__sharedRelationships **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__overviewDoc
+#define SOAP_TYPE_PointerTouddi2__overviewDoc (142)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__overviewDoc(struct soap*, uddi2__overviewDoc *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__overviewDoc(struct soap*, uddi2__overviewDoc *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__overviewDoc(struct soap*, const char *, int, uddi2__overviewDoc *const*, const char *);
+SOAP_FMAC3 uddi2__overviewDoc ** SOAP_FMAC4 soap_get_PointerTouddi2__overviewDoc(struct soap*, uddi2__overviewDoc **, const char*, const char*);
+SOAP_FMAC3 uddi2__overviewDoc ** SOAP_FMAC4 soap_in_PointerTouddi2__overviewDoc(struct soap*, const char*, uddi2__overviewDoc **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__truncated
+#define SOAP_TYPE_PointerTouddi2__truncated (140)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__truncated(struct soap*, enum uddi2__truncated *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__truncated(struct soap*, enum uddi2__truncated *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__truncated(struct soap*, const char *, int, enum uddi2__truncated *const*, const char *);
+SOAP_FMAC3 enum uddi2__truncated ** SOAP_FMAC4 soap_get_PointerTouddi2__truncated(struct soap*, enum uddi2__truncated **, const char*, const char*);
+SOAP_FMAC3 enum uddi2__truncated ** SOAP_FMAC4 soap_in_PointerTouddi2__truncated(struct soap*, const char*, enum uddi2__truncated **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__result
+#define SOAP_TYPE_PointerTouddi2__result (138)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__result(struct soap*, uddi2__result *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__result(struct soap*, uddi2__result *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__result(struct soap*, const char *, int, uddi2__result *const*, const char *);
+SOAP_FMAC3 uddi2__result ** SOAP_FMAC4 soap_get_PointerTouddi2__result(struct soap*, uddi2__result **, const char*, const char*);
+SOAP_FMAC3 uddi2__result ** SOAP_FMAC4 soap_in_PointerTouddi2__result(struct soap*, const char*, uddi2__result **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__discoveryURL
+#define SOAP_TYPE_PointerTouddi2__discoveryURL (136)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__discoveryURL(struct soap*, uddi2__discoveryURL *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__discoveryURL(struct soap*, uddi2__discoveryURL *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__discoveryURL(struct soap*, const char *, int, uddi2__discoveryURL *const*, const char *);
+SOAP_FMAC3 uddi2__discoveryURL ** SOAP_FMAC4 soap_get_PointerTouddi2__discoveryURL(struct soap*, uddi2__discoveryURL **, const char*, const char*);
+SOAP_FMAC3 uddi2__discoveryURL ** SOAP_FMAC4 soap_in_PointerTouddi2__discoveryURL(struct soap*, const char*, uddi2__discoveryURL **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__contact
+#define SOAP_TYPE_PointerTouddi2__contact (134)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__contact(struct soap*, uddi2__contact *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__contact(struct soap*, uddi2__contact *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__contact(struct soap*, const char *, int, uddi2__contact *const*, const char *);
+SOAP_FMAC3 uddi2__contact ** SOAP_FMAC4 soap_get_PointerTouddi2__contact(struct soap*, uddi2__contact **, const char*, const char*);
+SOAP_FMAC3 uddi2__contact ** SOAP_FMAC4 soap_in_PointerTouddi2__contact(struct soap*, const char*, uddi2__contact **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__address
+#define SOAP_TYPE_PointerTouddi2__address (132)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__address(struct soap*, uddi2__address *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__address(struct soap*, uddi2__address *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__address(struct soap*, const char *, int, uddi2__address *const*, const char *);
+SOAP_FMAC3 uddi2__address ** SOAP_FMAC4 soap_get_PointerTouddi2__address(struct soap*, uddi2__address **, const char*, const char*);
+SOAP_FMAC3 uddi2__address ** SOAP_FMAC4 soap_in_PointerTouddi2__address(struct soap*, const char*, uddi2__address **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__email
+#define SOAP_TYPE_PointerTouddi2__email (130)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__email(struct soap*, uddi2__email *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__email(struct soap*, uddi2__email *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__email(struct soap*, const char *, int, uddi2__email *const*, const char *);
+SOAP_FMAC3 uddi2__email ** SOAP_FMAC4 soap_get_PointerTouddi2__email(struct soap*, uddi2__email **, const char*, const char*);
+SOAP_FMAC3 uddi2__email ** SOAP_FMAC4 soap_in_PointerTouddi2__email(struct soap*, const char*, uddi2__email **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__phone
+#define SOAP_TYPE_PointerTouddi2__phone (128)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__phone(struct soap*, uddi2__phone *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__phone(struct soap*, uddi2__phone *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__phone(struct soap*, const char *, int, uddi2__phone *const*, const char *);
+SOAP_FMAC3 uddi2__phone ** SOAP_FMAC4 soap_get_PointerTouddi2__phone(struct soap*, uddi2__phone **, const char*, const char*);
+SOAP_FMAC3 uddi2__phone ** SOAP_FMAC4 soap_in_PointerTouddi2__phone(struct soap*, const char*, uddi2__phone **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__businessService
+#define SOAP_TYPE_PointerTouddi2__businessService (125)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__businessService(struct soap*, uddi2__businessService *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__businessService(struct soap*, uddi2__businessService *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__businessService(struct soap*, const char *, int, uddi2__businessService *const*, const char *);
+SOAP_FMAC3 uddi2__businessService ** SOAP_FMAC4 soap_get_PointerTouddi2__businessService(struct soap*, uddi2__businessService **, const char*, const char*);
+SOAP_FMAC3 uddi2__businessService ** SOAP_FMAC4 soap_in_PointerTouddi2__businessService(struct soap*, const char*, uddi2__businessService **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__bindingTemplates
+#define SOAP_TYPE_PointerTouddi2__bindingTemplates (124)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__bindingTemplates(struct soap*, uddi2__bindingTemplates *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__bindingTemplates(struct soap*, uddi2__bindingTemplates *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__bindingTemplates(struct soap*, const char *, int, uddi2__bindingTemplates *const*, const char *);
+SOAP_FMAC3 uddi2__bindingTemplates ** SOAP_FMAC4 soap_get_PointerTouddi2__bindingTemplates(struct soap*, uddi2__bindingTemplates **, const char*, const char*);
+SOAP_FMAC3 uddi2__bindingTemplates ** SOAP_FMAC4 soap_in_PointerTouddi2__bindingTemplates(struct soap*, const char*, uddi2__bindingTemplates **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__businessInfo
+#define SOAP_TYPE_PointerTouddi2__businessInfo (122)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__businessInfo(struct soap*, uddi2__businessInfo *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__businessInfo(struct soap*, uddi2__businessInfo *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__businessInfo(struct soap*, const char *, int, uddi2__businessInfo *const*, const char *);
+SOAP_FMAC3 uddi2__businessInfo ** SOAP_FMAC4 soap_get_PointerTouddi2__businessInfo(struct soap*, uddi2__businessInfo **, const char*, const char*);
+SOAP_FMAC3 uddi2__businessInfo ** SOAP_FMAC4 soap_in_PointerTouddi2__businessInfo(struct soap*, const char*, uddi2__businessInfo **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__serviceInfos
+#define SOAP_TYPE_PointerTouddi2__serviceInfos (121)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__serviceInfos(struct soap*, uddi2__serviceInfos *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__serviceInfos(struct soap*, uddi2__serviceInfos *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__serviceInfos(struct soap*, const char *, int, uddi2__serviceInfos *const*, const char *);
+SOAP_FMAC3 uddi2__serviceInfos ** SOAP_FMAC4 soap_get_PointerTouddi2__serviceInfos(struct soap*, uddi2__serviceInfos **, const char*, const char*);
+SOAP_FMAC3 uddi2__serviceInfos ** SOAP_FMAC4 soap_in_PointerTouddi2__serviceInfos(struct soap*, const char*, uddi2__serviceInfos **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__businessEntity
+#define SOAP_TYPE_PointerTouddi2__businessEntity (120)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__businessEntity(struct soap*, uddi2__businessEntity *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__businessEntity(struct soap*, uddi2__businessEntity *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__businessEntity(struct soap*, const char *, int, uddi2__businessEntity *const*, const char *);
+SOAP_FMAC3 uddi2__businessEntity ** SOAP_FMAC4 soap_get_PointerTouddi2__businessEntity(struct soap*, uddi2__businessEntity **, const char*, const char*);
+SOAP_FMAC3 uddi2__businessEntity ** SOAP_FMAC4 soap_in_PointerTouddi2__businessEntity(struct soap*, const char*, uddi2__businessEntity **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__categoryBag
+#define SOAP_TYPE_PointerTouddi2__categoryBag (119)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__categoryBag(struct soap*, uddi2__categoryBag *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__categoryBag(struct soap*, uddi2__categoryBag *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__categoryBag(struct soap*, const char *, int, uddi2__categoryBag *const*, const char *);
+SOAP_FMAC3 uddi2__categoryBag ** SOAP_FMAC4 soap_get_PointerTouddi2__categoryBag(struct soap*, uddi2__categoryBag **, const char*, const char*);
+SOAP_FMAC3 uddi2__categoryBag ** SOAP_FMAC4 soap_in_PointerTouddi2__categoryBag(struct soap*, const char*, uddi2__categoryBag **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__identifierBag
+#define SOAP_TYPE_PointerTouddi2__identifierBag (118)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__identifierBag(struct soap*, uddi2__identifierBag *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__identifierBag(struct soap*, uddi2__identifierBag *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__identifierBag(struct soap*, const char *, int, uddi2__identifierBag *const*, const char *);
+SOAP_FMAC3 uddi2__identifierBag ** SOAP_FMAC4 soap_get_PointerTouddi2__identifierBag(struct soap*, uddi2__identifierBag **, const char*, const char*);
+SOAP_FMAC3 uddi2__identifierBag ** SOAP_FMAC4 soap_in_PointerTouddi2__identifierBag(struct soap*, const char*, uddi2__identifierBag **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__businessServices
+#define SOAP_TYPE_PointerTouddi2__businessServices (117)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__businessServices(struct soap*, uddi2__businessServices *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__businessServices(struct soap*, uddi2__businessServices *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__businessServices(struct soap*, const char *, int, uddi2__businessServices *const*, const char *);
+SOAP_FMAC3 uddi2__businessServices ** SOAP_FMAC4 soap_get_PointerTouddi2__businessServices(struct soap*, uddi2__businessServices **, const char*, const char*);
+SOAP_FMAC3 uddi2__businessServices ** SOAP_FMAC4 soap_in_PointerTouddi2__businessServices(struct soap*, const char*, uddi2__businessServices **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__contacts
+#define SOAP_TYPE_PointerTouddi2__contacts (116)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__contacts(struct soap*, uddi2__contacts *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__contacts(struct soap*, uddi2__contacts *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__contacts(struct soap*, const char *, int, uddi2__contacts *const*, const char *);
+SOAP_FMAC3 uddi2__contacts ** SOAP_FMAC4 soap_get_PointerTouddi2__contacts(struct soap*, uddi2__contacts **, const char*, const char*);
+SOAP_FMAC3 uddi2__contacts ** SOAP_FMAC4 soap_in_PointerTouddi2__contacts(struct soap*, const char*, uddi2__contacts **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__name
+#define SOAP_TYPE_PointerTouddi2__name (114)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__name(struct soap*, uddi2__name *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__name(struct soap*, uddi2__name *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__name(struct soap*, const char *, int, uddi2__name *const*, const char *);
+SOAP_FMAC3 uddi2__name ** SOAP_FMAC4 soap_get_PointerTouddi2__name(struct soap*, uddi2__name **, const char*, const char*);
+SOAP_FMAC3 uddi2__name ** SOAP_FMAC4 soap_in_PointerTouddi2__name(struct soap*, const char*, uddi2__name **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__discoveryURLs
+#define SOAP_TYPE_PointerTouddi2__discoveryURLs (113)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__discoveryURLs(struct soap*, uddi2__discoveryURLs *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__discoveryURLs(struct soap*, uddi2__discoveryURLs *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__discoveryURLs(struct soap*, const char *, int, uddi2__discoveryURLs *const*, const char *);
+SOAP_FMAC3 uddi2__discoveryURLs ** SOAP_FMAC4 soap_get_PointerTouddi2__discoveryURLs(struct soap*, uddi2__discoveryURLs **, const char*, const char*);
+SOAP_FMAC3 uddi2__discoveryURLs ** SOAP_FMAC4 soap_in_PointerTouddi2__discoveryURLs(struct soap*, const char*, uddi2__discoveryURLs **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__bindingTemplate
+#define SOAP_TYPE_PointerTouddi2__bindingTemplate (111)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__bindingTemplate(struct soap*, uddi2__bindingTemplate *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__bindingTemplate(struct soap*, uddi2__bindingTemplate *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__bindingTemplate(struct soap*, const char *, int, uddi2__bindingTemplate *const*, const char *);
+SOAP_FMAC3 uddi2__bindingTemplate ** SOAP_FMAC4 soap_get_PointerTouddi2__bindingTemplate(struct soap*, uddi2__bindingTemplate **, const char*, const char*);
+SOAP_FMAC3 uddi2__bindingTemplate ** SOAP_FMAC4 soap_in_PointerTouddi2__bindingTemplate(struct soap*, const char*, uddi2__bindingTemplate **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__hostingRedirector
+#define SOAP_TYPE_PointerTouddi2__hostingRedirector (110)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__hostingRedirector(struct soap*, uddi2__hostingRedirector *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__hostingRedirector(struct soap*, uddi2__hostingRedirector *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__hostingRedirector(struct soap*, const char *, int, uddi2__hostingRedirector *const*, const char *);
+SOAP_FMAC3 uddi2__hostingRedirector ** SOAP_FMAC4 soap_get_PointerTouddi2__hostingRedirector(struct soap*, uddi2__hostingRedirector **, const char*, const char*);
+SOAP_FMAC3 uddi2__hostingRedirector ** SOAP_FMAC4 soap_in_PointerTouddi2__hostingRedirector(struct soap*, const char*, uddi2__hostingRedirector **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__accessPoint
+#define SOAP_TYPE_PointerTouddi2__accessPoint (109)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__accessPoint(struct soap*, uddi2__accessPoint *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__accessPoint(struct soap*, uddi2__accessPoint *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__accessPoint(struct soap*, const char *, int, uddi2__accessPoint *const*, const char *);
+SOAP_FMAC3 uddi2__accessPoint ** SOAP_FMAC4 soap_get_PointerTouddi2__accessPoint(struct soap*, uddi2__accessPoint **, const char*, const char*);
+SOAP_FMAC3 uddi2__accessPoint ** SOAP_FMAC4 soap_in_PointerTouddi2__accessPoint(struct soap*, const char*, uddi2__accessPoint **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__tModelInstanceDetails
+#define SOAP_TYPE_PointerTouddi2__tModelInstanceDetails (108)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__tModelInstanceDetails(struct soap*, uddi2__tModelInstanceDetails *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__tModelInstanceDetails(struct soap*, uddi2__tModelInstanceDetails *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__tModelInstanceDetails(struct soap*, const char *, int, uddi2__tModelInstanceDetails *const*, const char *);
+SOAP_FMAC3 uddi2__tModelInstanceDetails ** SOAP_FMAC4 soap_get_PointerTouddi2__tModelInstanceDetails(struct soap*, uddi2__tModelInstanceDetails **, const char*, const char*);
+SOAP_FMAC3 uddi2__tModelInstanceDetails ** SOAP_FMAC4 soap_in_PointerTouddi2__tModelInstanceDetails(struct soap*, const char*, uddi2__tModelInstanceDetails **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__description
+#define SOAP_TYPE_PointerTouddi2__description (106)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__description(struct soap*, uddi2__description *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__description(struct soap*, uddi2__description *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__description(struct soap*, const char *, int, uddi2__description *const*, const char *);
+SOAP_FMAC3 uddi2__description ** SOAP_FMAC4 soap_get_PointerTouddi2__description(struct soap*, uddi2__description **, const char*, const char*);
+SOAP_FMAC3 uddi2__description ** SOAP_FMAC4 soap_in_PointerTouddi2__description(struct soap*, const char*, uddi2__description **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__keysOwned
+#define SOAP_TYPE_PointerTouddi2__keysOwned (105)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__keysOwned(struct soap*, uddi2__keysOwned *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__keysOwned(struct soap*, uddi2__keysOwned *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__keysOwned(struct soap*, const char *, int, uddi2__keysOwned *const*, const char *);
+SOAP_FMAC3 uddi2__keysOwned ** SOAP_FMAC4 soap_get_PointerTouddi2__keysOwned(struct soap*, uddi2__keysOwned **, const char*, const char*);
+SOAP_FMAC3 uddi2__keysOwned ** SOAP_FMAC4 soap_in_PointerTouddi2__keysOwned(struct soap*, const char*, uddi2__keysOwned **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__keyedReference
+#define SOAP_TYPE_PointerTouddi2__keyedReference (104)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__keyedReference(struct soap*, uddi2__keyedReference *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__keyedReference(struct soap*, uddi2__keyedReference *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__keyedReference(struct soap*, const char *, int, uddi2__keyedReference *const*, const char *);
+SOAP_FMAC3 uddi2__keyedReference ** SOAP_FMAC4 soap_get_PointerTouddi2__keyedReference(struct soap*, uddi2__keyedReference **, const char*, const char*);
+SOAP_FMAC3 uddi2__keyedReference ** SOAP_FMAC4 soap_in_PointerTouddi2__keyedReference(struct soap*, const char*, uddi2__keyedReference **, const char*);
+
+#ifndef SOAP_TYPE_PointerTouddi2__addressLine
+#define SOAP_TYPE_PointerTouddi2__addressLine (100)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTouddi2__addressLine(struct soap*, uddi2__addressLine *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTouddi2__addressLine(struct soap*, uddi2__addressLine *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTouddi2__addressLine(struct soap*, const char *, int, uddi2__addressLine *const*, const char *);
+SOAP_FMAC3 uddi2__addressLine ** SOAP_FMAC4 soap_get_PointerTouddi2__addressLine(struct soap*, uddi2__addressLine **, const char*, const char*);
+SOAP_FMAC3 uddi2__addressLine ** SOAP_FMAC4 soap_in_PointerTouddi2__addressLine(struct soap*, const char*, uddi2__addressLine **, const char*);
+
+#ifndef SOAP_TYPE_uddi2__tModelKey
+#define SOAP_TYPE_uddi2__tModelKey (95)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_uddi2__tModelKey(struct soap*, char **);
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_uddi2__tModelKey(struct soap*, char *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_uddi2__tModelKey(struct soap*, char *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__tModelKey(struct soap*, const char*, int, char*const*, const char*);
+SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_uddi2__tModelKey(struct soap*, char **, const char*, const char*);
+SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_uddi2__tModelKey(struct soap*, const char*, char **, const char*);
+
+#ifndef SOAP_TYPE_uddi2__serviceKey
+#define SOAP_TYPE_uddi2__serviceKey (94)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_uddi2__serviceKey(struct soap*, char **);
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_uddi2__serviceKey(struct soap*, char *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_uddi2__serviceKey(struct soap*, char *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__serviceKey(struct soap*, const char*, int, char*const*, const char*);
+SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_uddi2__serviceKey(struct soap*, char **, const char*, const char*);
+SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_uddi2__serviceKey(struct soap*, const char*, char **, const char*);
+
+#ifndef SOAP_TYPE_uddi2__businessKey
+#define SOAP_TYPE_uddi2__businessKey (93)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_uddi2__businessKey(struct soap*, char **);
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_uddi2__businessKey(struct soap*, char *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_uddi2__businessKey(struct soap*, char *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__businessKey(struct soap*, const char*, int, char*const*, const char*);
+SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_uddi2__businessKey(struct soap*, char **, const char*, const char*);
+SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_uddi2__businessKey(struct soap*, const char*, char **, const char*);
+
+#ifndef SOAP_TYPE_uddi2__bindingKey
+#define SOAP_TYPE_uddi2__bindingKey (92)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_uddi2__bindingKey(struct soap*, char **);
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_uddi2__bindingKey(struct soap*, char *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_uddi2__bindingKey(struct soap*, char *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_uddi2__bindingKey(struct soap*, const char*, int, char*const*, const char*);
+SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_uddi2__bindingKey(struct soap*, char **, const char*, const char*);
+SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_uddi2__bindingKey(struct soap*, const char*, char **, const char*);
+
+#ifndef SOAP_TYPE_xml__lang
+#define SOAP_TYPE_xml__lang (8)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_xml__lang(struct soap*, char **);
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_xml__lang(struct soap*, char *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_xml__lang(struct soap*, char *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_xml__lang(struct soap*, const char*, int, char*const*, const char*);
+SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_xml__lang(struct soap*, char **, const char*, const char*);
+SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_xml__lang(struct soap*, const char*, char **, const char*);
+
+#ifndef SOAP_TYPE_xsd__NMTOKEN
+#define SOAP_TYPE_xsd__NMTOKEN (7)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_xsd__NMTOKEN(struct soap*, char **);
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_xsd__NMTOKEN(struct soap*, char *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_xsd__NMTOKEN(struct soap*, char *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_xsd__NMTOKEN(struct soap*, const char*, int, char*const*, const char*);
+SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_xsd__NMTOKEN(struct soap*, char **, const char*, const char*);
+SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_xsd__NMTOKEN(struct soap*, const char*, char **, const char*);
+
+#ifndef SOAP_TYPE__QName
+#define SOAP_TYPE__QName (5)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default__QName(struct soap*, char **);
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize__QName(struct soap*, char *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put__QName(struct soap*, char *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out__QName(struct soap*, const char*, int, char*const*, const char*);
+SOAP_FMAC3 char ** SOAP_FMAC4 soap_get__QName(struct soap*, char **, const char*, const char*);
+SOAP_FMAC3 char * * SOAP_FMAC4 soap_in__QName(struct soap*, const char*, char **, const char*);
+
+#ifndef SOAP_TYPE_string
+#define SOAP_TYPE_string (3)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_string(struct soap*, char **);
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_string(struct soap*, char *const*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_string(struct soap*, char *const*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_string(struct soap*, const char*, int, char*const*, const char*);
+SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_string(struct soap*, char **, const char*, const char*);
+SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_string(struct soap*, const char*, char **, const char*);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__businessEntityExt
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__businessEntityExt (302)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__businessEntityExt(struct soap*, const std::vector<uddi2__businessEntityExt * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__businessEntityExt(struct soap*, std::vector<uddi2__businessEntityExt * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__businessEntityExt(struct soap*, const std::vector<uddi2__businessEntityExt * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__businessEntityExt(struct soap*, const char*, int, const std::vector<uddi2__businessEntityExt * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__businessEntityExt * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__businessEntityExt(struct soap*, std::vector<uddi2__businessEntityExt * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__businessEntityExt * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__businessEntityExt(struct soap*, const char*, std::vector<uddi2__businessEntityExt * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__businessEntityExt * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__businessEntityExt(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__businessEntityExt(struct soap*, std::vector<uddi2__businessEntityExt * >*);
+SOAP_FMAC5 std::vector<uddi2__businessEntityExt * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__businessEntityExt(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__businessEntityExt(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__assertionStatusItem
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__assertionStatusItem (300)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__assertionStatusItem(struct soap*, const std::vector<uddi2__assertionStatusItem * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__assertionStatusItem(struct soap*, std::vector<uddi2__assertionStatusItem * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__assertionStatusItem(struct soap*, const std::vector<uddi2__assertionStatusItem * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__assertionStatusItem(struct soap*, const char*, int, const std::vector<uddi2__assertionStatusItem * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__assertionStatusItem * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__assertionStatusItem(struct soap*, std::vector<uddi2__assertionStatusItem * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__assertionStatusItem * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__assertionStatusItem(struct soap*, const char*, std::vector<uddi2__assertionStatusItem * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__assertionStatusItem * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__assertionStatusItem(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__assertionStatusItem(struct soap*, std::vector<uddi2__assertionStatusItem * >*);
+SOAP_FMAC5 std::vector<uddi2__assertionStatusItem * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__assertionStatusItem(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__assertionStatusItem(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__tModel
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__tModel (288)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__tModel(struct soap*, const std::vector<uddi2__tModel * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__tModel(struct soap*, std::vector<uddi2__tModel * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__tModel(struct soap*, const std::vector<uddi2__tModel * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__tModel(struct soap*, const char*, int, const std::vector<uddi2__tModel * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__tModel * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__tModel(struct soap*, std::vector<uddi2__tModel * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__tModel * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__tModel(struct soap*, const char*, std::vector<uddi2__tModel * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__tModel * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__tModel(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__tModel(struct soap*, std::vector<uddi2__tModel * >*);
+SOAP_FMAC5 std::vector<uddi2__tModel * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__tModel(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__tModel(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__businessEntity
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__businessEntity (272)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__businessEntity(struct soap*, const std::vector<uddi2__businessEntity * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__businessEntity(struct soap*, std::vector<uddi2__businessEntity * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__businessEntity(struct soap*, const std::vector<uddi2__businessEntity * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__businessEntity(struct soap*, const char*, int, const std::vector<uddi2__businessEntity * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__businessEntity * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__businessEntity(struct soap*, std::vector<uddi2__businessEntity * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__businessEntity * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__businessEntity(struct soap*, const char*, std::vector<uddi2__businessEntity * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__businessEntity * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__businessEntity(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__businessEntity(struct soap*, std::vector<uddi2__businessEntity * >*);
+SOAP_FMAC5 std::vector<uddi2__businessEntity * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__businessEntity(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__businessEntity(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfuddi2__serviceKey
+#define SOAP_TYPE_std__vectorTemplateOfuddi2__serviceKey (184)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfuddi2__serviceKey(struct soap*, const std::vector<char * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfuddi2__serviceKey(struct soap*, std::vector<char * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfuddi2__serviceKey(struct soap*, const std::vector<char * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfuddi2__serviceKey(struct soap*, const char*, int, const std::vector<char * >*, const char*);
+SOAP_FMAC3 std::vector<char * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfuddi2__serviceKey(struct soap*, std::vector<char * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<char * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfuddi2__serviceKey(struct soap*, const char*, std::vector<char * >*, const char*);
+
+SOAP_FMAC5 std::vector<char * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfuddi2__serviceKey(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfuddi2__serviceKey(struct soap*, std::vector<char * >*);
+SOAP_FMAC5 std::vector<char * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfuddi2__serviceKey(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfuddi2__serviceKey(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfuddi2__businessKey
+#define SOAP_TYPE_std__vectorTemplateOfuddi2__businessKey (176)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfuddi2__businessKey(struct soap*, const std::vector<char * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfuddi2__businessKey(struct soap*, std::vector<char * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfuddi2__businessKey(struct soap*, const std::vector<char * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfuddi2__businessKey(struct soap*, const char*, int, const std::vector<char * >*, const char*);
+SOAP_FMAC3 std::vector<char * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfuddi2__businessKey(struct soap*, std::vector<char * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<char * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfuddi2__businessKey(struct soap*, const char*, std::vector<char * >*, const char*);
+
+SOAP_FMAC5 std::vector<char * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfuddi2__businessKey(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfuddi2__businessKey(struct soap*, std::vector<char * >*);
+SOAP_FMAC5 std::vector<char * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfuddi2__businessKey(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfuddi2__businessKey(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfuddi2__bindingKey
+#define SOAP_TYPE_std__vectorTemplateOfuddi2__bindingKey (170)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfuddi2__bindingKey(struct soap*, const std::vector<char * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfuddi2__bindingKey(struct soap*, std::vector<char * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfuddi2__bindingKey(struct soap*, const std::vector<char * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfuddi2__bindingKey(struct soap*, const char*, int, const std::vector<char * >*, const char*);
+SOAP_FMAC3 std::vector<char * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfuddi2__bindingKey(struct soap*, std::vector<char * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<char * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfuddi2__bindingKey(struct soap*, const char*, std::vector<char * >*, const char*);
+
+SOAP_FMAC5 std::vector<char * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfuddi2__bindingKey(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfuddi2__bindingKey(struct soap*, std::vector<char * >*);
+SOAP_FMAC5 std::vector<char * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfuddi2__bindingKey(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfuddi2__bindingKey(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__publisherAssertion
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__publisherAssertion (158)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__publisherAssertion(struct soap*, const std::vector<uddi2__publisherAssertion * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__publisherAssertion(struct soap*, std::vector<uddi2__publisherAssertion * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__publisherAssertion(struct soap*, const std::vector<uddi2__publisherAssertion * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__publisherAssertion(struct soap*, const char*, int, const std::vector<uddi2__publisherAssertion * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__publisherAssertion * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__publisherAssertion(struct soap*, std::vector<uddi2__publisherAssertion * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__publisherAssertion * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__publisherAssertion(struct soap*, const char*, std::vector<uddi2__publisherAssertion * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__publisherAssertion * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__publisherAssertion(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__publisherAssertion(struct soap*, std::vector<uddi2__publisherAssertion * >*);
+SOAP_FMAC5 std::vector<uddi2__publisherAssertion * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__publisherAssertion(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__publisherAssertion(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__tModelInstanceInfo
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__tModelInstanceInfo (155)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__tModelInstanceInfo(struct soap*, const std::vector<uddi2__tModelInstanceInfo * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__tModelInstanceInfo(struct soap*, std::vector<uddi2__tModelInstanceInfo * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__tModelInstanceInfo(struct soap*, const std::vector<uddi2__tModelInstanceInfo * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__tModelInstanceInfo(struct soap*, const char*, int, const std::vector<uddi2__tModelInstanceInfo * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__tModelInstanceInfo * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__tModelInstanceInfo(struct soap*, std::vector<uddi2__tModelInstanceInfo * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__tModelInstanceInfo * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__tModelInstanceInfo(struct soap*, const char*, std::vector<uddi2__tModelInstanceInfo * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__tModelInstanceInfo * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__tModelInstanceInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__tModelInstanceInfo(struct soap*, std::vector<uddi2__tModelInstanceInfo * >*);
+SOAP_FMAC5 std::vector<uddi2__tModelInstanceInfo * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__tModelInstanceInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__tModelInstanceInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__tModelInfo
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__tModelInfo (153)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__tModelInfo(struct soap*, const std::vector<uddi2__tModelInfo * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__tModelInfo(struct soap*, std::vector<uddi2__tModelInfo * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__tModelInfo(struct soap*, const std::vector<uddi2__tModelInfo * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__tModelInfo(struct soap*, const char*, int, const std::vector<uddi2__tModelInfo * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__tModelInfo * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__tModelInfo(struct soap*, std::vector<uddi2__tModelInfo * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__tModelInfo * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__tModelInfo(struct soap*, const char*, std::vector<uddi2__tModelInfo * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__tModelInfo * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__tModelInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__tModelInfo(struct soap*, std::vector<uddi2__tModelInfo * >*);
+SOAP_FMAC5 std::vector<uddi2__tModelInfo * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__tModelInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__tModelInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfuddi2__tModelKey
+#define SOAP_TYPE_std__vectorTemplateOfuddi2__tModelKey (151)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfuddi2__tModelKey(struct soap*, const std::vector<char * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfuddi2__tModelKey(struct soap*, std::vector<char * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfuddi2__tModelKey(struct soap*, const std::vector<char * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfuddi2__tModelKey(struct soap*, const char*, int, const std::vector<char * >*, const char*);
+SOAP_FMAC3 std::vector<char * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfuddi2__tModelKey(struct soap*, std::vector<char * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<char * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfuddi2__tModelKey(struct soap*, const char*, std::vector<char * >*, const char*);
+
+SOAP_FMAC5 std::vector<char * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfuddi2__tModelKey(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfuddi2__tModelKey(struct soap*, std::vector<char * >*);
+SOAP_FMAC5 std::vector<char * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfuddi2__tModelKey(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfuddi2__tModelKey(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__serviceInfo
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__serviceInfo (150)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__serviceInfo(struct soap*, const std::vector<uddi2__serviceInfo * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__serviceInfo(struct soap*, std::vector<uddi2__serviceInfo * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__serviceInfo(struct soap*, const std::vector<uddi2__serviceInfo * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__serviceInfo(struct soap*, const char*, int, const std::vector<uddi2__serviceInfo * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__serviceInfo * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__serviceInfo(struct soap*, std::vector<uddi2__serviceInfo * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__serviceInfo * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__serviceInfo(struct soap*, const char*, std::vector<uddi2__serviceInfo * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__serviceInfo * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__serviceInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__serviceInfo(struct soap*, std::vector<uddi2__serviceInfo * >*);
+SOAP_FMAC5 std::vector<uddi2__serviceInfo * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__serviceInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__serviceInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__relatedBusinessInfo
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__relatedBusinessInfo (146)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__relatedBusinessInfo(struct soap*, const std::vector<uddi2__relatedBusinessInfo * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__relatedBusinessInfo(struct soap*, std::vector<uddi2__relatedBusinessInfo * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__relatedBusinessInfo(struct soap*, const std::vector<uddi2__relatedBusinessInfo * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__relatedBusinessInfo(struct soap*, const char*, int, const std::vector<uddi2__relatedBusinessInfo * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__relatedBusinessInfo * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__relatedBusinessInfo(struct soap*, std::vector<uddi2__relatedBusinessInfo * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__relatedBusinessInfo * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__relatedBusinessInfo(struct soap*, const char*, std::vector<uddi2__relatedBusinessInfo * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__relatedBusinessInfo * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__relatedBusinessInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__relatedBusinessInfo(struct soap*, std::vector<uddi2__relatedBusinessInfo * >*);
+SOAP_FMAC5 std::vector<uddi2__relatedBusinessInfo * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__relatedBusinessInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__relatedBusinessInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__sharedRelationships
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__sharedRelationships (144)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__sharedRelationships(struct soap*, const std::vector<uddi2__sharedRelationships * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__sharedRelationships(struct soap*, std::vector<uddi2__sharedRelationships * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__sharedRelationships(struct soap*, const std::vector<uddi2__sharedRelationships * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__sharedRelationships(struct soap*, const char*, int, const std::vector<uddi2__sharedRelationships * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__sharedRelationships * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__sharedRelationships(struct soap*, std::vector<uddi2__sharedRelationships * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__sharedRelationships * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__sharedRelationships(struct soap*, const char*, std::vector<uddi2__sharedRelationships * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__sharedRelationships * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__sharedRelationships(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__sharedRelationships(struct soap*, std::vector<uddi2__sharedRelationships * >*);
+SOAP_FMAC5 std::vector<uddi2__sharedRelationships * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__sharedRelationships(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__sharedRelationships(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfstring
+#define SOAP_TYPE_std__vectorTemplateOfstring (141)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfstring(struct soap*, const std::vector<char * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfstring(struct soap*, std::vector<char * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfstring(struct soap*, const std::vector<char * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfstring(struct soap*, const char*, int, const std::vector<char * >*, const char*);
+SOAP_FMAC3 std::vector<char * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfstring(struct soap*, std::vector<char * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<char * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfstring(struct soap*, const char*, std::vector<char * >*, const char*);
+
+SOAP_FMAC5 std::vector<char * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfstring(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfstring(struct soap*, std::vector<char * >*);
+SOAP_FMAC5 std::vector<char * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfstring(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfstring(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__result
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__result (139)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__result(struct soap*, const std::vector<uddi2__result * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__result(struct soap*, std::vector<uddi2__result * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__result(struct soap*, const std::vector<uddi2__result * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__result(struct soap*, const char*, int, const std::vector<uddi2__result * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__result * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__result(struct soap*, std::vector<uddi2__result * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__result * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__result(struct soap*, const char*, std::vector<uddi2__result * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__result * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__result(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__result(struct soap*, std::vector<uddi2__result * >*);
+SOAP_FMAC5 std::vector<uddi2__result * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__result(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__result(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__discoveryURL
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__discoveryURL (137)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__discoveryURL(struct soap*, const std::vector<uddi2__discoveryURL * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__discoveryURL(struct soap*, std::vector<uddi2__discoveryURL * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__discoveryURL(struct soap*, const std::vector<uddi2__discoveryURL * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__discoveryURL(struct soap*, const char*, int, const std::vector<uddi2__discoveryURL * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__discoveryURL * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__discoveryURL(struct soap*, std::vector<uddi2__discoveryURL * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__discoveryURL * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__discoveryURL(struct soap*, const char*, std::vector<uddi2__discoveryURL * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__discoveryURL * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__discoveryURL(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__discoveryURL(struct soap*, std::vector<uddi2__discoveryURL * >*);
+SOAP_FMAC5 std::vector<uddi2__discoveryURL * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__discoveryURL(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__discoveryURL(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__contact
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__contact (135)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__contact(struct soap*, const std::vector<uddi2__contact * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__contact(struct soap*, std::vector<uddi2__contact * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__contact(struct soap*, const std::vector<uddi2__contact * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__contact(struct soap*, const char*, int, const std::vector<uddi2__contact * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__contact * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__contact(struct soap*, std::vector<uddi2__contact * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__contact * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__contact(struct soap*, const char*, std::vector<uddi2__contact * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__contact * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__contact(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__contact(struct soap*, std::vector<uddi2__contact * >*);
+SOAP_FMAC5 std::vector<uddi2__contact * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__contact(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__contact(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__address
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__address (133)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__address(struct soap*, const std::vector<uddi2__address * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__address(struct soap*, std::vector<uddi2__address * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__address(struct soap*, const std::vector<uddi2__address * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__address(struct soap*, const char*, int, const std::vector<uddi2__address * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__address * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__address(struct soap*, std::vector<uddi2__address * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__address * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__address(struct soap*, const char*, std::vector<uddi2__address * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__address * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__address(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__address(struct soap*, std::vector<uddi2__address * >*);
+SOAP_FMAC5 std::vector<uddi2__address * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__address(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__address(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__email
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__email (131)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__email(struct soap*, const std::vector<uddi2__email * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__email(struct soap*, std::vector<uddi2__email * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__email(struct soap*, const std::vector<uddi2__email * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__email(struct soap*, const char*, int, const std::vector<uddi2__email * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__email * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__email(struct soap*, std::vector<uddi2__email * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__email * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__email(struct soap*, const char*, std::vector<uddi2__email * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__email * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__email(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__email(struct soap*, std::vector<uddi2__email * >*);
+SOAP_FMAC5 std::vector<uddi2__email * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__email(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__email(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__phone
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__phone (129)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__phone(struct soap*, const std::vector<uddi2__phone * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__phone(struct soap*, std::vector<uddi2__phone * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__phone(struct soap*, const std::vector<uddi2__phone * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__phone(struct soap*, const char*, int, const std::vector<uddi2__phone * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__phone * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__phone(struct soap*, std::vector<uddi2__phone * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__phone * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__phone(struct soap*, const char*, std::vector<uddi2__phone * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__phone * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__phone(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__phone(struct soap*, std::vector<uddi2__phone * >*);
+SOAP_FMAC5 std::vector<uddi2__phone * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__phone(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__phone(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__keyedReference
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__keyedReference (127)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__keyedReference(struct soap*, const std::vector<uddi2__keyedReference * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__keyedReference(struct soap*, std::vector<uddi2__keyedReference * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__keyedReference(struct soap*, const std::vector<uddi2__keyedReference * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__keyedReference(struct soap*, const char*, int, const std::vector<uddi2__keyedReference * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__keyedReference * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__keyedReference(struct soap*, std::vector<uddi2__keyedReference * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__keyedReference * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__keyedReference(struct soap*, const char*, std::vector<uddi2__keyedReference * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__keyedReference * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__keyedReference(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__keyedReference(struct soap*, std::vector<uddi2__keyedReference * >*);
+SOAP_FMAC5 std::vector<uddi2__keyedReference * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__keyedReference(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__keyedReference(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__businessService
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__businessService (126)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__businessService(struct soap*, const std::vector<uddi2__businessService * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__businessService(struct soap*, std::vector<uddi2__businessService * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__businessService(struct soap*, const std::vector<uddi2__businessService * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__businessService(struct soap*, const char*, int, const std::vector<uddi2__businessService * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__businessService * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__businessService(struct soap*, std::vector<uddi2__businessService * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__businessService * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__businessService(struct soap*, const char*, std::vector<uddi2__businessService * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__businessService * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__businessService(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__businessService(struct soap*, std::vector<uddi2__businessService * >*);
+SOAP_FMAC5 std::vector<uddi2__businessService * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__businessService(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__businessService(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__businessInfo
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__businessInfo (123)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__businessInfo(struct soap*, const std::vector<uddi2__businessInfo * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__businessInfo(struct soap*, std::vector<uddi2__businessInfo * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__businessInfo(struct soap*, const std::vector<uddi2__businessInfo * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__businessInfo(struct soap*, const char*, int, const std::vector<uddi2__businessInfo * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__businessInfo * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__businessInfo(struct soap*, std::vector<uddi2__businessInfo * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__businessInfo * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__businessInfo(struct soap*, const char*, std::vector<uddi2__businessInfo * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__businessInfo * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__businessInfo(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__businessInfo(struct soap*, std::vector<uddi2__businessInfo * >*);
+SOAP_FMAC5 std::vector<uddi2__businessInfo * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__businessInfo(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__businessInfo(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__name
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__name (115)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__name(struct soap*, const std::vector<uddi2__name * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__name(struct soap*, std::vector<uddi2__name * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__name(struct soap*, const std::vector<uddi2__name * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__name(struct soap*, const char*, int, const std::vector<uddi2__name * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__name * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__name(struct soap*, std::vector<uddi2__name * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__name * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__name(struct soap*, const char*, std::vector<uddi2__name * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__name * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__name(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__name(struct soap*, std::vector<uddi2__name * >*);
+SOAP_FMAC5 std::vector<uddi2__name * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__name(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__name(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__bindingTemplate
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__bindingTemplate (112)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__bindingTemplate(struct soap*, const std::vector<uddi2__bindingTemplate * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__bindingTemplate(struct soap*, std::vector<uddi2__bindingTemplate * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__bindingTemplate(struct soap*, const std::vector<uddi2__bindingTemplate * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__bindingTemplate(struct soap*, const char*, int, const std::vector<uddi2__bindingTemplate * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__bindingTemplate * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__bindingTemplate(struct soap*, std::vector<uddi2__bindingTemplate * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__bindingTemplate * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__bindingTemplate(struct soap*, const char*, std::vector<uddi2__bindingTemplate * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__bindingTemplate * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__bindingTemplate(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__bindingTemplate(struct soap*, std::vector<uddi2__bindingTemplate * >*);
+SOAP_FMAC5 std::vector<uddi2__bindingTemplate * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__bindingTemplate(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__bindingTemplate(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__description
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__description (107)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__description(struct soap*, const std::vector<uddi2__description * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__description(struct soap*, std::vector<uddi2__description * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__description(struct soap*, const std::vector<uddi2__description * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__description(struct soap*, const char*, int, const std::vector<uddi2__description * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__description * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__description(struct soap*, std::vector<uddi2__description * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__description * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__description(struct soap*, const char*, std::vector<uddi2__description * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__description * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__description(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__description(struct soap*, std::vector<uddi2__description * >*);
+SOAP_FMAC5 std::vector<uddi2__description * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__description(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__description(struct soap*, int, int, void*, const void*, size_t);
+
+#ifndef SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__addressLine
+#define SOAP_TYPE_std__vectorTemplateOfPointerTouddi2__addressLine (101)
+#endif
+SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTouddi2__addressLine(struct soap*, const std::vector<uddi2__addressLine * >*);
+SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTouddi2__addressLine(struct soap*, std::vector<uddi2__addressLine * >*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__vectorTemplateOfPointerTouddi2__addressLine(struct soap*, const std::vector<uddi2__addressLine * >*, const char*, const char*);
+SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTouddi2__addressLine(struct soap*, const char*, int, const std::vector<uddi2__addressLine * >*, const char*);
+SOAP_FMAC3 std::vector<uddi2__addressLine * >* SOAP_FMAC4 soap_get_std__vectorTemplateOfPointerTouddi2__addressLine(struct soap*, std::vector<uddi2__addressLine * >*, const char*, const char*);
+SOAP_FMAC3 std::vector<uddi2__addressLine * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTouddi2__addressLine(struct soap*, const char*, std::vector<uddi2__addressLine * >*, const char*);
+
+SOAP_FMAC5 std::vector<uddi2__addressLine * > * SOAP_FMAC6 soap_new_std__vectorTemplateOfPointerTouddi2__addressLine(struct soap*, int);
+
+SOAP_FMAC5 void SOAP_FMAC6 soap_delete_std__vectorTemplateOfPointerTouddi2__addressLine(struct soap*, std::vector<uddi2__addressLine * >*);
+SOAP_FMAC5 std::vector<uddi2__addressLine * > * SOAP_FMAC6 soap_instantiate_std__vectorTemplateOfPointerTouddi2__addressLine(struct soap*, int, const char*, const char*, size_t*);
+SOAP_FMAC5 void SOAP_FMAC6 soap_copy_std__vectorTemplateOfPointerTouddi2__addressLine(struct soap*, int, int, void*, const void*, size_t);
+
+SOAP_END_NAMESPACE(uddi)
+
+#endif
+
+/* End of uddiH.h */
diff --git a/uddi2/uddi_v2.h b/uddi2/uddi_v2.h
new file mode 100644
index 0000000..abc6ea0
--- /dev/null
+++ b/uddi2/uddi_v2.h
@@ -0,0 +1,4450 @@
+/** @mainpage gSOAP UDDI v2
+
+Universal Description, Discovery and Integration, or UDDI, is the name of a
+group of web-based registries that expose information about a business or other
+entity and its technical interfaces.
+
+See the UDDI v2 specification @url http://uddi.org/pubs/ProgrammersAPI_v2.htm
+for more details.
+
+@section UDDI2_CLASSES Classes
+
+See Related Pages for examples.
+
+UDDI Inquire classes
+
+- @ref uddi2__find_USCOREbinding
+- @ref uddi2__find_USCOREbusiness
+- @ref uddi2__find_USCORErelatedBusinesses
+- @ref uddi2__find_USCOREservice
+- @ref uddi2__find_USCOREtModel
+- @ref uddi2__get_USCOREbindingDetail
+- @ref uddi2__get_USCOREbusinessDetail
+- @ref uddi2__get_USCOREbusinessDetailExt
+- @ref uddi2__get_USCOREserviceDetail
+- @ref uddi2__get_USCOREtModelDetail
+
+UDDI Publish classes
+
+- @ref uddi2__add_USCOREpublisherAssertions
+- @ref uddi2__delete_USCOREbinding
+- @ref uddi2__delete_USCOREbusiness
+- @ref uddi2__delete_USCOREservice
+- @ref uddi2__delete_USCOREtModel
+- @ref uddi2__delete_USCOREpublisherAssertions
+- @ref uddi2__discard_USCOREauthToken
+- @ref uddi2__get_USCOREassertionStatusReport
+- @ref uddi2__get_USCOREauthToken
+- @ref uddi2__get_USCOREpublisherAssertions
+- @ref uddi2__get_USCOREregisteredInfo
+- @ref uddi2__save_USCOREbinding
+- @ref uddi2__save_USCOREbusiness
+- @ref uddi2__save_USCOREservice
+- @ref uddi2__save_USCOREtModel
+- @ref uddi2__set_USCOREpublisherAssertions
+
+@section UDDI2_BINDINGS Binding Reference
+
+- @ref InquireSoap
+- @ref PublishSoap
+
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_binding
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__find_USCOREbinding
+@brief
+
+Represents a request to locate bindings that meet the specified requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137712
+*/
+
+/**
+@fn uddi2__find_USCOREbinding::uddi2__find_USCOREbinding(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREbinding class.
+*/
+
+/**
+@fn uddi2__find_USCOREbinding::uddi2__find_USCOREbinding(struct soap *soap, const char *tModelKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKey string
+
+Creates an instance of the find_USCOREbinding class using the specified tModel
+key.
+*/
+
+/**
+@fn uddi2__find_USCOREbinding::uddi2__find_USCOREbinding(struct soap *soap, std::vector<char*> tModelKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKeys collection of tModel key strings
+
+Creates an instance of the find_USCOREbinding class using the specified tModel
+keys.
+*/
+
+/**
+@fn uddi2__bindingDetail* uddi2__find_USCOREbinding::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__bindingDetail object or NULL on error
+
+Send a request to a UDDI server to find binding details.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_business
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__find_USCOREbusiness
+@brief
+
+Represents a request to locate businesses that meet specific requirements. When
+the send method is called, the instance returns a uddi2__businessList object
+that contains a list of business that matched the search criteria.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137713
+
+See also @ref example2.
+*/
+
+/**
+@fn uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREbusiness class.
+*/
+
+/**
+@fn uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness(struct soap *soap, const char *name)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREbusiness class using the specified name
+of the requested business.
+*/
+
+/**
+@fn uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness(struct soap *soap, std::vector<uddi2__keyedReference*> keyedReferences)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREbusiness class using the specified
+category references.
+*/
+
+/**
+@fn uddi2__find_USCOREbusiness::uddi2__find_USCOREbusiness(struct soap *soap, std::vector<char*> tModelKeys)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREbusiness class using the specified tModel
+keys.
+*/
+
+/**
+@fn uddi2__businessList *uddi2__find_USCOREbusiness::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__businessList object or NULL on error
+
+Send a request to a UDDI server to find a list of businesses.
+
+See also @ref example2.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_relatedBusinesses
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__find_USCORErelatedBusinesses
+@brief
+
+Represents a request to locate businesses that are related to a specific
+business. When the send method is called, the instance returns a
+uddi2__relatedBusinessList object that contains a list of business that matched
+the relationship set.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137714
+*/
+
+/**
+@fn uddi2__find_USCORErelatedBusinesses::uddi2__find_USCORErelatedBusinesses(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCORErelatedBusiness class.
+*/
+
+/**
+@fn uddi2__find_USCORErelatedBusinesses::uddi2__find_USCORErelatedBusinesses(struct soap *soap, const char *businessKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKey string
+
+Creates an instance of the find_USCORErelatedBusiness class using the specified
+business key.
+*/
+
+/**
+@fn uddi2__relatedBusinessesList *uddi2__find_USCORErelatedBusinesses::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__relatedBusinessList object or NULL on error
+
+Send a request to a UDDI server to find a list of related businesses.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_service
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__find_USCOREservice
+@brief
+
+Represents a request to locate services that meet the specified requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137715
+
+See also @ref example1.
+*/
+
+/**
+@fn uddi2__find_USCOREservice::uddi2__find_USCOREservice(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREservice class.
+*/
+
+/**
+@fn uddi2__find_USCOREservice::uddi2__find_USCOREservice(struct soap *soap, const char *name)
+@brief
+@param[in] soap gSOAP context
+@param[in] name of the service
+
+Creates an instance of the find_USCOREservice class using the specified name.
+*/
+
+/**
+@fn uddi2__find_USCOREservice::uddi2__find_USCOREservice(struct soap *soap, std::vector<uddi2__keyedReference*> keyedReferences)
+@brief
+@param[in] soap gSOAP context
+@param[in] keyedReferences collection of category keys
+
+Creates an instance of the find_USCOREservice class using the specified
+category keys.
+*/
+
+/**
+@fn uddi2__find_USCOREservice::uddi2__find_USCOREservice(struct soap *soap, std::vector<char*> tModelKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKeys collection of tModel key strings
+
+Creates an instance of the find_USCOREservice class using the specified tModel
+keys.
+*/
+
+/**
+@fn uddi2__serviceList* uddi2__find_USCOREservice::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__serviceList object or NULL on error
+
+Send a request to a UDDI server to find a list of services.
+
+See also @ref example1.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:find_tModel
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__find_USCOREtModel
+@brief
+
+Represents a request to locate a list of tModel entries that match a set of
+specific criteria. The result of a search is a uddi2__tModelList object that
+contains information about registered tModel data that matches the criteria.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137716
+*/
+
+/**
+@fn uddi2__find_USCOREtModel::uddi2__find_USCOREtModel(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the find_USCOREtModel class.
+*/
+
+/**
+@fn uddi2__find_USCOREtModel::uddi2__find_USCOREtModel(struct soap *soap, const char *name)
+@brief
+@param[in] soap gSOAP context
+@param[in] name of the tModel
+
+Creates an instance of the find_USCOREtModel class using the specified tModel
+name.
+*/
+
+/**
+@fn uddi2__find_USCOREtModel::uddi2__find_USCOREtModel(struct soap *soap, std::vector<uddi2__keyedReference*> keyedReferences)
+@brief
+@param[in] soap gSOAP context
+@param[in] keyedReferences collection of category keys
+
+Creates an instance of the find_USCOREtModel class using the specified category
+keys.
+*/
+
+/**
+@fn uddi2__tModelList* uddi2__find_USCOREtModel::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__tModelList object or NULL on error
+
+Send a request to a UDDI server to find a tModelList.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_bindingDetail
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREbindingDetail
+@brief
+
+Represents a request to get binding details from a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137717
+*/
+
+/**
+@fn uddi2__get_USCOREbindingDetail::uddi2__get_USCOREbindingDetail(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREbindingDetail class.
+*/
+
+/**
+@fn uddi2__get_USCOREbindingDetail::uddi2__get_USCOREbindingDetail(struct soap *soap, const char *bindingKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] bindingKey string
+
+Creates an instance of the get_USCOREbindingDetail class using the specified
+binding key.
+*/
+
+/**
+@fn uddi2__get_USCOREbindingDetail::uddi2__get_USCOREbindingDetail(struct soap *soap, std::vector<char*> bindingKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] bindingKeys collection of key strings
+
+Creates an instance of the get_USCOREbindingDetail class using the specified
+collection of binding keys.
+*/
+
+/**
+@fn uddi2__bindingDetail* uddi2__get_USCOREbindingDetail::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__bindingDetail object or NULL on error
+
+Send a request to a UDDI server to get the binding details.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_businessDetail
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREbusinessDetail
+@brief
+
+Represents a request to get business details from a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137718 
+*/
+
+/**
+@fn uddi2__get_USCOREbusinessDetail::uddi2__get_USCOREbusinessDetail(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREbusinessDetail class.
+*/
+
+/**
+@fn uddi2__get_USCOREbusinessDetail::uddi2__get_USCOREbusinessDetail(struct soap *soap, const char *businessKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKey string
+
+Creates an instance of the get_USCOREbusinessDetail class using the specified
+business key.
+*/
+
+/**
+@fn uddi2__get_USCOREbusinessDetail::uddi2__get_USCOREbusinessDetail(struct soap *soap, std::vector<char*> businessKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKeys collection of key strings
+
+Creates an instance of the get_USCOREbusinessDetail class using the specified
+collection of business keys.
+*/
+
+/**
+@fn uddi2__businessDetail* uddi2__get_USCOREbusinessDetail::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__businessDetail object or NULL on error
+
+Send a request to a UDDI server to get the business details.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_businessDetailExt
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREbusinessDetailExt
+@brief
+
+Represents a request to get business details from a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137719
+*/
+
+/**
+@fn uddi2__get_USCOREbusinessDetailExt::uddi2__get_USCOREbusinessDetailExt(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREbusinessDetailExt class.
+*/
+
+/**
+@fn uddi2__get_USCOREbusinessDetailExt::uddi2__get_USCOREbusinessDetailExt(struct soap *soap, const char *businessKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKey string
+
+Creates an instance of the get_USCOREbusinessDetailExt class using the specified
+business key.
+*/
+
+/**
+@fn uddi2__get_USCOREbusinessDetailExt::uddi2__get_USCOREbusinessDetailExt(struct soap *soap, std::vector<char*> businessKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKeys collection of key strings
+
+Creates an instance of the get_USCOREbusinessDetailExt class using the specified
+collection of business keys.
+*/
+
+/**
+@fn uddi2__businessDetailExt* uddi2__get_USCOREbusinessDetailExt::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__businessDetailExt object or NULL on error
+
+Send a request to a UDDI server to get the business details.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_serviceDetail
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREserviceDetail
+@brief
+
+Represents a request to get service details from a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137720
+*/
+
+/**
+@fn uddi2__get_USCOREserviceDetail::uddi2__get_USCOREserviceDetail(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREserviceDetail class.
+*/
+
+/**
+@fn uddi2__get_USCOREserviceDetail::uddi2__get_USCOREserviceDetail(struct soap *soap, const char *serviceKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] serviceKey string
+
+Creates an instance of the get_USCOREserviceDetail class using the specified
+service key.
+*/
+
+/**
+@fn uddi2__get_USCOREserviceDetail::uddi2__get_USCOREserviceDetail(struct soap *soap, std::vector<char*> serviceKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] serviceKeys collection of key strings
+
+Creates an instance of the get_USCOREserviceDetail class using the specified
+collection of service keys.
+*/
+
+/**
+@fn uddi2__serviceDetail* uddi2__get_USCOREserviceDetail::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__serviceDetail object or NULL on error
+
+Send a request to a UDDI server to get the service details.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_tModelDetail
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREtModelDetail
+@brief
+
+Represents a request to get tModel details from a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137721
+*/
+
+/**
+@fn uddi2__get_USCOREtModelDetail::uddi2__get_USCOREtModelDetail(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREtModelDetail class.
+*/
+
+/**
+@fn uddi2__get_USCOREtModelDetail::uddi2__get_USCOREtModelDetail(struct soap *soap, const char *tModelKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKey string
+
+Creates an instance of the get_USCOREtModelDetail class using the specified
+tModel key.
+*/
+
+/**
+@fn uddi2__get_USCOREtModelDetail::uddi2__get_USCOREtModelDetail(struct soap *soap, std::vector<char*> tModelKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKeys collection of key strings
+
+Creates an instance of the get_USCOREtModelDetail class using the specified
+collection of tModel keys.
+*/
+
+/**
+@fn uddi2__tModelDetail* uddi2__get_USCOREtModelDetail::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__tModelDetail object or NULL on error
+
+Send a request to a UDDI server to get the tModel details.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:add_publisherAssertions
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__add_USCOREpublisherAssertions
+@brief
+
+Represents a request to add one or more publisher assertions to the assertion
+collection for an individual publisher.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137731
+*/
+
+/**
+@fn uddi2__add_USCOREpublisherAssertions::uddi2__add_USCOREpublisherAssertions(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the add_USCOREpublisherAssertions class.
+*/
+
+/**
+@fn uddi2__add_USCOREpublisherAssertions::uddi2__add_USCOREpublisherAssertions(struct soap *soap, std::vector<uddi2__publisherAssertion*> publisherAssertions)
+@brief
+@param[in] soap gSOAP context
+@param[in] publisherAssertions collection of publisher assertions
+
+Creates an instance of the add_USCOREpublisherAssertions class using the
+specified publisher assertions.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__add_USCOREpublisherAssertions::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI server to add one or more publisher assertions to the
+assertion collection for an individual publisher.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_binding
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__delete_USCOREbinding
+@brief
+
+Represents a request to delete a binding that meets the specified requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137732
+*/
+
+/**
+@fn uddi2__delete_USCOREbinding::uddi2__delete_USCOREbinding(struct soap *soap)
+@brief
+
+Creates an instance of the delete_USCOREbinding class.
+*/
+
+/**
+@fn uddi2__delete_USCOREbinding::uddi2__delete_USCOREbinding(struct soap *soap, const char *bindingKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] bindingKey a binding key string
+
+Creates an instance of the delete_USCOREbinding class.
+*/
+
+/**
+@fn uddi2__delete_USCOREbinding::uddi2__delete_USCOREbinding(struct soap *soap, std::vector<char*> bindingKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] bindingKeys collection of binding keys
+
+Creates an instance of the delete_USCOREbinding class using the specified
+binding keys.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__delete_USCOREbinding::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI service to delete a binding that meets the specified
+requirements.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_business
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__delete_USCOREbusiness
+@brief
+
+Represents a request to delete a business that meets the specified requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137733
+*/
+
+/**
+@fn uddi2__delete_USCOREbusiness::uddi2__delete_USCOREbusiness(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the delete_USCOREbusiness class.
+*/
+
+/**
+@fn uddi2__delete_USCOREbusiness::uddi2__delete_USCOREbusiness(struct soap *soap, const char *businessKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKey a business key string
+
+Creates an instance of the delete_USCOREbusiness class using the specified
+business key.
+*/
+
+/**
+@fn uddi2__delete_USCOREbusiness::uddi2__delete_USCOREbusiness(struct soap *soap, std::vector<char*> businessKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessKeys collection of business keys
+
+Creates an instance of the delete_USCOREbusiness class using the specified
+business keys.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__delete_USCOREbusiness::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI service to delete a business that meets the specified
+requirements.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_service
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__delete_USCOREservice
+@brief
+
+Represents a request to delete a service that meets the specified requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137735
+*/
+
+/**
+@fn uddi2__delete_USCOREservice::uddi2__delete_USCOREservice(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the delete_USCOREservice class.
+*/
+
+/**
+@fn uddi2__delete_USCOREservice::uddi2__delete_USCOREservice(struct soap *soap, const char *serviceKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] serviceKey a service key string
+
+Creates an instance of the delete_USCOREservice class using the specified
+service key.
+*/
+
+/**
+@fn uddi2__delete_USCOREservice::uddi2__delete_USCOREservice(struct soap *soap, std::vector<char*> serviceKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] serviceKeys collection of service keys
+
+Creates an instance of the delete_USCOREservice class using the specified
+service keys.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__delete_USCOREservice::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI service to delete a service that meets the specified
+requirements.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_tModel
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__delete_USCOREtModel
+@brief
+
+Represents a request to delete a tModel that meets the specified requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137736
+*/
+
+/**
+@fn uddi2__delete_USCOREtModel::uddi2__delete_USCOREtModel(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the delete_USCOREtModel class.
+*/
+
+/**
+@fn uddi2__delete_USCOREtModel::uddi2__delete_USCOREtModel(struct soap *soap, const char *tModelKey)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKey a tModel key string
+
+Creates an instance of the delete_USCOREtModel class using the specified
+tModel key.
+*/
+
+/**
+@fn uddi2__delete_USCOREtModel::uddi2__delete_USCOREtModel(struct soap *soap, std::vector<char*> tModelKeys)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModelKeys collection of tModel keys
+
+Creates an instance of the delete_USCOREtModel class using the specified
+tModel keys.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__delete_USCOREtModel::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI service to delete a tModel that meets the specified
+requirements.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:delete_publisherAssertions
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__delete_USCOREpublisherAssertions
+@brief
+
+Represents a request to delete publisher assertions meeting the specified
+requirements.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137734
+*/
+
+/**
+@fn uddi2__delete_USCOREpublisherAssertions::uddi2__delete_USCOREpublisherAssertions(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the delete_USCOREpublisherAssertions class.
+*/
+
+/**
+@fn uddi2__delete_USCOREpublisherAssertions::uddi2__delete_USCOREpublisherAssertions(struct soap *soap, std::vector<uddi2__publisherAssertion*> publisherAssertions)
+@brief
+@param[in] soap gSOAP context
+@param[in] publisherAssertions a collection of publisher assertions
+
+Creates an instance of the delete_USCOREpublisherAssertions class using the
+specified collection of publisher assertions.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__delete_USCOREpublisherAssertions::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI service to delete publisher assertions meeting the
+specified requirements.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:discard_authToken
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__discard_USCOREauthToken
+@brief
+
+Represents a request to discard an authorization token obtained with the
+get_USCOREauthToken class.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137737
+*/
+
+/**
+@fn uddi2__discard_USCOREauthToken::uddi2__discard_USCOREauthToken(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the delete_USCOREauthToken class.
+*/
+
+/**
+@fn uddi2__discard_USCOREauthToken::uddi2__discard_USCOREauthToken(struct soap *soap, const char *authInfo)
+@brief
+@param[in] soap gSOAP context
+@param[in] authInfo authorization token provided by the UDDI server
+
+Creates an instance of the delete_USCOREauthToken class using the specified
+authentication token string.
+*/
+
+/**
+@fn uddi2__dispositionReport *uddi2__discard_USCOREauthToken::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__dispositionReport object or NULL on error
+
+Send a request to a UDDI service to discard an authentication token.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_assertionStatusReport
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREassertionStatusReport
+@brief
+
+Provides the ability to determine the status of current and outstanding
+publisher assertions. The results can be restricted by setting the
+completionStatus property.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137738
+*/
+
+/**
+@fn uddi2__get_USCOREassertionStatusReport::uddi2__get_USCOREassertionStatusReport(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREassertionStatusReport class.
+*/
+
+/**
+@fn uddi2__get_USCOREassertionStatusReport::uddi2__get_USCOREassertionStatusReport(struct soap *soap, const char *completionStatus)
+@brief
+@param[in] soap gSOAP context
+@param[in] completionStatus completion status string
+
+Creates an instance of the get_USCOREassertionStatusReport class using the
+specified completion status.
+*/
+
+/**
+@fn uddi2__assertionStatusReport *uddi2__get_USCOREassertionStatusReport::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__assertionStatusReport object or NULL on error
+
+Send a request to a UDDI service to get the status of current and outstanding
+publisher assertions.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_authToken
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREauthToken
+@brief
+
+Represents a request to obtain an authorization token, which is represented by
+the uddi2__authToken class.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137739
+*/
+
+/**
+@fn uddi2__get_USCOREauthToken::uddi2__get_USCOREauthToken(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREauthToken class.
+*/
+
+/**
+@fn uddi2__get_USCOREauthToken::uddi2__get_USCOREauthToken(struct soap *soap, const char *userid, const char *passwd)
+@brief
+@param[in] soap gSOAP context
+@param[in] userid the user ID string
+@param[in] passwd the password string
+
+Creates an instance of the get_USCOREauthToken class using the specified user
+ID and password.
+*/
+
+/**
+@fn uddi2__authToken *uddi2__get_USCOREauthToken::send(const char *endpoint)
+@brief
+@param[in] endpoint URL of the UDDI server
+@return A pointer to a uddi2__authToken object or NULL on error
+
+Send a request to a UDDI service to get a authorization token given a user
+ID and password.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_publisherAssertions
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREpublisherAssertions
+@brief
+
+Represents a request to obtain the full set of publisher assertions that are
+associated with an individual publisher.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137740
+*/
+
+/**
+@fn uddi2__get_USCOREpublisherAssertions::uddi2__get_USCOREpublisherAssertions(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREpublisherAssetions class.
+*/
+
+/**
+@fn uddi2__publisherAssertions *uddi2__get_USCOREpublisherAssertions::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__publisherAssertions object or NULL on error
+
+Send a request to a UDDI service to get publisher assertions.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:get_registeredInfo
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__get_USCOREregisteredInfo
+@brief
+
+Represents a request to get all registered business entities and tModels
+controlled by an individual.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137741
+*/
+
+/**
+@fn uddi2__get_USCOREregisteredInfo::uddi2__get_USCOREregisteredInfo(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the get_USCOREregisteredInfo class.
+*/
+
+/**
+@fn uddi2__registeredInfo *uddi2__get_USCOREregisteredInfo::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__registeredInfo object or NULL on error
+
+Send a request to a UDDI service to get all registered business entities and
+tModels controlled by an individual.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:save_binding
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__save_USCOREbinding
+@brief
+
+Represents a request to post binding information on a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137742
+*/
+
+/**
+@fn uddi2__save_USCOREbinding::uddi2__save_USCOREbinding(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the save_USCOREbinding class.
+*/
+
+/**
+@fn uddi2__save_USCOREbinding::uddi2__save_USCOREbinding(struct soap *soap, uddi2__bindingTemplate &bindingTemplate)
+@brief
+@param[in] soap gSOAP context
+@param[in] bindingTemplate binding template
+
+Creates an instance of the save_USCOREbinding class using the specified binding
+template.
+*/
+
+/**
+@fn uddi2__save_USCOREbinding::uddi2__save_USCOREbinding(struct soap *soap, std::vector<uddi2__bindingTemplate*> bindingTemplates)
+@brief
+@param[in] soap gSOAP context
+@param[in] bindingTemplates collection of binding templates
+
+Creates an instance of the save_USCOREbinding class using the specified binding
+templates.
+*/
+
+/**
+@fn uddi2__bindingDetail *uddi2__save_USCOREbinding::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__bindingDetail object or NULL on error
+
+Send a request to a UDDI server to post binding information on the server.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:save_business
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__save_USCOREbusiness
+@brief
+
+Represents a request to post business information on a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137743
+*/
+
+/**
+@fn uddi2__save_USCOREbusiness::uddi2__save_USCOREbusiness(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the save_USCOREbusiness class.
+*/
+
+/**
+@fn uddi2__save_USCOREbusiness::uddi2__save_USCOREbusiness(struct soap *soap, uddi2__businessEntity &businessEntity)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessEntity business entity
+
+Creates an instance of the save_USCOREbusiness class using the specified
+business entity.
+*/
+
+/**
+@fn uddi2__save_USCOREbusiness::uddi2__save_USCOREbusiness(struct soap *soap, std::vector<uddi2__businessEntity*> businessEntities)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessEntities collection of business entities
+
+Creates an instance of the save_USCOREbusiness class using the specified
+business entities.
+*/
+
+/**
+@fn uddi2__businessDetail *uddi2__save_USCOREbusiness::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__businessDetail object or NULL on error
+
+Send a request to a UDDI server to post business information on the server.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:save_service
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__save_USCOREservice
+@brief
+
+Represents a request to post service information on a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137744
+*/
+
+/**
+@fn uddi2__save_USCOREservice::uddi2__save_USCOREservice(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the save_USCOREservice class.
+*/
+
+/**
+@fn uddi2__save_USCOREservice::uddi2__save_USCOREservice(struct soap *soap, uddi2__businessService &businessService)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessService business service
+
+Creates an instance of the save_USCOREservice class using the specified
+service.
+*/
+
+/**
+@fn uddi2__save_USCOREservice::uddi2__save_USCOREservice(struct soap *soap, std::vector<uddi2__businessService*> businessServices)
+@brief
+@param[in] soap gSOAP context
+@param[in] businessServices collection of business services
+
+Creates an instance of the save_USCOREservice class using the specified
+services.
+*/
+
+/**
+@fn uddi2__serviceDetail *uddi2__save_USCOREservice::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__serviceDetail object or NULL on error
+
+Send a request to a UDDI server to post service information on the server.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:save_tModel
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__save_USCOREtModel
+@brief
+
+Represents a request to post tModel information on a UDDI server.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137745
+*/
+
+/**
+@fn uddi2__save_USCOREtModel::uddi2__save_USCOREtModel(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the save_USCOREtModel class.
+*/
+
+/**
+@fn uddi2__save_USCOREtModel::uddi2__save_USCOREtModel(struct soap *soap, uddi2__tModel &tModel)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModel a tModel
+
+Creates an instance of the save_USCOREtModel class using the specified
+tModel.
+*/
+
+/**
+@fn uddi2__save_USCOREtModel::uddi2__save_USCOREtModel(struct soap *soap, std::vector<uddi2__tModel*> tModels)
+@brief
+@param[in] soap gSOAP context
+@param[in] tModels collection of tModels
+
+Creates an instance of the save_USCOREtModel class using the specified
+tModels.
+*/
+
+/**
+@fn uddi2__tModelDetail *uddi2__save_USCOREtModel::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__tModelDetail object or NULL on error
+
+Send a request to a UDDI server to post tModel information on the server.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	uddi2:set_publisherAssertions
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@class uddi2__set_USCOREpublisherAssertions
+@brief
+
+Represents a request to modify the existing publisher assertions for an
+individual publisher.
+
+See @url http://uddi.org/pubs/ProgrammersAPI_v2.htm#_Toc25137746
+*/
+
+/**
+@fn uddi2__set_USCOREpublisherAssertions::uddi2__set_USCOREpublisherAssertions(struct soap *soap)
+@brief
+@param[in] soap gSOAP context
+
+Creates an instance of the set_USCOREpublisherAssertions class.
+*/
+
+/**
+@fn uddi2__set_USCOREpublisherAssertions::uddi2__set_USCOREpublisherAssertions(struct soap *soap, std::vector<uddi2__publisherAssertion*> publisherAssertions)
+@brief
+@param[in] soap gSOAP context
+@param[in] publisherAssertions collection of publisher assertions
+
+Creates an instance of the set_USCOREpublisherAssertions class using the
+specified collection of publisher assertions.
+*/
+
+/**
+@fn uddi2__publisherAssertions *uddi2__set_USCOREpublisherAssertions::send(const char *endpoint, char *authInfo)
+@brief
+@param[in] endpoint URL of the UDDI server
+@param[in] authInfo authorization token provided by the UDDI server
+@return A pointer to a uddi2__publisherAssertions object or NULL on error
+
+Send a request to a UDDI server to post tModel information on the server.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Code Examples
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+@page example1 Code Example 1: Finding a service
+
+This example shows you how to find Web services. In this case, the example
+finds Web services with names that begin with the word "magic".
+
+@code
+#include "inqH.h"
+
+int main(int argc, char **argv)
+{ 
+  char *search_string = "magic";
+
+  if (argc > 1)
+    search_string = argv[1];
+
+  // Create a gSOAP context
+  struct soap *soap = soap_new();
+
+  // Create an object to find a business
+  uddi2__find_USCOREservice fs(soap, search_string);
+
+  // Send the request
+  uddi2__serviceList *sl = fs.send("http://uddi.xmethods.net/inquire");
+
+  // Check if result is OK
+  if (!sl)
+    soap_print_fault(soap, stderr);
+
+  // If OK, report the service name(s) and unique identification keys
+  else if (sl->serviceInfos)
+  {
+    std::cout << "Search results on " << search_string << ":" << std::endl << std::endl;
+
+    for (std::vector<uddi2__serviceInfo*>::const_iterator si = sl->serviceInfos->serviceInfo.begin(); si != sl->serviceInfos->serviceInfo.end(); ++si)
+    {
+      // Report serviceKey and businessKey
+      std::cout << "serviceKey=" << (*si)->serviceKey << std::endl << "businessKey=" << (*si)->businessKey << std::endl;
+
+      // Report names
+      for (std::vector<uddi2__name*>::const_iterator n = (*si)->name.begin(); n != (*si)->name.end(); ++n)
+        std::cout << "name=" << (*n)->__item << std::endl;
+
+      std::cout << std::endl;
+    }
+  }
+
+  // Remove deserialized objects
+  soap_destroy(soap);
+
+  // Remove temporary data
+  soap_end(soap);
+
+  // Detach and free context
+  soap_done(soap);
+  free(soap);
+
+  return 0;
+}
+@endcode
+
+To compile:
+- wsdl2h -tuddi2-typemap.dat inquire_v2.wsdl
+- soapcpp2 -I.. -pinq inquire_v2.h
+- g++ -DWITH_NONAMESPACES -I.. -o example1 example1.cpp inquire_v2.cpp inqC.cpp inqClient.cpp ../stdsoap2.cpp
+*/
+
+/**
+@page example2 Code Example 2: Finding a business
+
+This example shows you how to find a business from a UDDI server.
+
+@code
+#include "inqH.h"
+
+int main(int argc, char **argv)
+{ 
+  char *search_string = "xmethods";
+
+  if (argc > 1)
+    search_string = argv[1];
+
+  // Create a gSOAP context
+  struct soap *soap = soap_new();
+
+  // Create an object to find a business
+  uddi2__find_USCOREbusiness fb(soap, search_string);
+
+  // Send the request
+  uddi2__businessList *bl = fb.send("http://uddi.xmethods.net/inquire");
+
+  // Check if result is OK
+  if (!bl)
+    soap_print_fault(soap, stderr);
+
+  // If OK, report the business name(s) and unique identification keys
+  else if (bl->businessInfos)
+  {
+    std::cout << "Search results on " << search_string << ":" << std::endl << std::endl;
+
+    for (std::vector<uddi2__businessInfo*>::const_iterator bi = bl->businessInfos->businessInfo.begin(); bi != bl->businessInfos->businessInfo.end(); ++bi)
+    {
+      // Report businessKey
+      std::cout << "businessKey=" << (*bi)->businessKey << std::endl;
+
+      // Report names
+      for (std::vector<uddi2__name*>::const_iterator n = (*bi)->name.begin(); n != (*bi)->name.end(); ++n)
+        std::cout << "name=" << (*n)->__item << std::endl;
+
+      std::cout << std::endl;
+    }
+  }
+
+  // Remove deserialized objects
+  soap_destroy(soap);
+
+  // Remove temporary data
+  soap_end(soap);
+
+  // Detach and free context
+  soap_done(soap);
+  free(soap);
+
+  return 0;
+}
+@endcode
+
+To compile:
+- wsdl2h -tuddi2-typemap.dat inquire_v2.wsdl
+- soapcpp2 -I.. -pinq inquire_v2.h
+- g++ -DWITH_NONAMESPACES -I.. -o example2 example2.cpp inquire_v2.cpp inqC.cpp inqClient.cpp ../stdsoap2.cpp
+*/
+/**
+@page example3 Code Example 3: Publishing a WSDL and service on XMethods
+
+This example shows you how to publish a Web service. In this case, the example
+template code obtains an authorization token, saves the tModel with the WSDL
+URL in the server, and saves the business service information in the server.
+
+@code
+#include "pubH.h"
+
+const char *server = "https://uddi.xmethods.net/publish";
+
+const char *userid = "..."; // user ID to access UDDI server
+const char *passwd = "..."; // password to access UDDI server
+
+int main(int argc, char **argv)
+{ 
+  // Create a gSOAP context
+  struct soap *soap = soap_new();
+
+  // Setup SSL context (optional) to verify server's credentials
+  if (soap_ssl_client_context(soap, SOAP_SSL_DEFAULT, NULL, NULL, "cacerts.pem", NULL, NULL))
+  { 
+    soap_print_fault(soap, stderr);
+    exit(1);
+  }
+
+  // Step 1: Get an authorization token from the UDDI server
+  uddi2__get_USCOREauthToken get_authToken(soap, userid, passwd);
+  uddi2__authToken *authToken = get_authToken.send(server);
+
+  // Check if authorized
+  if (!authToken)
+  {
+    soap_print_fault(soap, stderr);
+    exit(1);
+  }
+
+  // Authorization info provided by server for this session
+  char *authInfo = authToken->authInfo;
+
+  // Step 2: Create a tModel for the WSDL to be published
+  uddi2__tModel tModel;
+  tModel.soap_default(soap);
+
+  // Create the tModel and service name
+  tModel.name = soap_new_uddi2__name(soap, -1);
+  tModel.name->__item = "...";
+  tModel.name->xml__lang_ = "en";
+
+  // Create XMethods description elements (see http://www.xmethods.net/ve2/UDDI.po)
+  uddi2__description *description = soap_new_uddi2__description(soap, 6);
+  description[0].__item = "SHORT DESCRIPTION: ...";
+  description[0].xml__lang_ = "en";
+  description[1].__item = "SHORT DESCRIPTION: ...";
+  description[1].xml__lang_ = "en";
+  description[2].__item = "USAGE NOTES: ...";
+  description[2].xml__lang_ = "en";
+  description[3].__item = "HOMEPAGE URL: ...";
+  description[3].xml__lang_ = "en";
+  description[4].__item = "CONTACT EMAIL: ...";
+  description[4].xml__lang_ = "en";
+  description[5].__item = "IMPLEMENTATION: ...";
+  description[5].xml__lang_ = "en";
+
+  // Add the four description elements to the tModel
+  tModel.description.push_back(description + 0);
+  tModel.description.push_back(description + 1);
+  tModel.description.push_back(description + 2);
+  tModel.description.push_back(description + 4);
+
+  // Add an overviewDoc element with description and overviewURL
+  tModel.overviewDoc = soap_new_uddi2__overviewDoc(soap, -1);
+  tModel.overviewDoc->soap_default(soap);
+  tModel.overviewDoc->description.push_back(soap_new_uddi2__description(soap, -1));
+  tModel.overviewDoc->description[0]->__item = "WSDL source document";
+  tModel.overviewDoc->description[0]->xml__lang_ = "en";
+  tModel.overviewDoc->overviewURL = "http://.../my.wsdl#bindingName";
+
+  // Omit identifier bag
+  tModel.identifierBag = NULL;
+
+  // Add a category with a WSDL-specific keyedReference
+  tModel.categoryBag = soap_new_uddi2__categoryBag(soap, -1);
+  tModel.categoryBag->soap_default(soap);
+  tModel.categoryBag->keyedReference.push_back(soap_new_uddi2__keyedReference(soap, -1));
+  tModel.categoryBag->keyedReference[0]->tModelKey = "...";
+  tModel.categoryBag->keyedReference[0]->keyName = "uddi-org:types";
+  tModel.categoryBag->keyedReference[0]->keyValue = "wsdlSpec";
+
+  tModel.authorizedName = "...";
+  tModel.operator_ = "...";
+  tModel.tModelKey = "...";
+
+  // Save the tModel
+  uddi2__save_USCOREtModel save_tModel(soap, tModel);
+  uddi2__tModelDetail *tModelDetail = save_tModel.send(server, authInfo);
+
+  // Step 3: Create a new service to be published
+  uddi2__businessService service;
+  service.soap_default(soap);
+
+  // Service name is the tModel name (XMethods)
+  service.name.push_back(tModel.name);
+
+  // Add two description elements to the service
+  service.description.push_back(description + 4);
+  service.description.push_back(description + 5);
+
+  // Create binding template
+  uddi2__bindingTemplate bindingTemplate;
+  bindingTemplate.soap_default(soap);
+  bindingTemplate.tModelInstanceDetails = soap_new_uddi2__tModelInstanceDetails(soap, -1);
+  bindingTemplate.tModelInstanceDetails->tModelInstanceInfo.push_back(soap_new_uddi2__tModelInstanceInfo(soap, -1));
+  bindingTemplate.tModelInstanceDetails->tModelInstanceInfo[0]->instanceDetails = NULL;
+  bindingTemplate.tModelInstanceDetails->tModelInstanceInfo[0]->tModelKey = tModel.tModelKey;
+  bindingTemplate.accessPoint = soap_new_uddi2__accessPoint(soap, -1);
+  bindingTemplate.accessPoint->__item = "...";
+  bindingTemplate.accessPoint->URLType = uddi2__URLType__http;
+  bindingTemplate.hostingRedirector = NULL;
+  bindingTemplate.serviceKey = "...";
+  bindingTemplate.bindingKey = "...";
+
+  // Add binding Template to service
+  service.bindingTemplates = soap_new_uddi2__bindingTemplates(soap, -1);
+  service.bindingTemplates->soap_default(soap);
+  service.bindingTemplates->bindingTemplate.push_back(&bindingTemplate);
+
+  service.categoryBag = NULL;
+  service.serviceKey = "...";
+  service.businessKey = "...";
+
+  // Save the service
+  uddi2__save_USCOREservice save_service(soap, service);
+  uddi2__serviceDetail *serviceDetail = save_service.send(server, authInfo);
+
+  // Step 4: Discard authorization token
+  uddi2__discard_USCOREauthToken discard_authToken(soap, authInfo);
+  uddi2__dispositionReport *dispositionReport = discard_authToken.send(server);
+
+  // Remove deserialized objects
+  soap_destroy(soap);
+
+  // Remove temporary data
+  soap_end(soap);
+
+  // Detach and free context
+  soap_done(soap);
+  free(soap);
+
+  return 0;
+}
+@endcode
+To compile:
+- wsdl2h -tuddi2-typemap.dat publish_v2.wsdl
+- soapcpp2 -I.. -ppub publish_v2.h
+- g++ -DWITH_OPENSSL -DWITH_NONAMESPACES -I.. -o example3 example3.cpp publish_v2.cpp pubC.cpp pubClient.cpp ../stdsoap2.cpp
+*/
+/* uddi_v2.h
+   Generated by wsdl2h 1.2.0 from inquire_v2.wsdl publish_v2.wsdl and uddi2-typemap.dat
+   2005-04-24 00:29:41 GMT
+   Copyright (C) 2001-2005 Robert van Engelen, Genivia Inc. All Rights Reserved.
+   This part of the software is released under one of the following licenses:
+   GPL or Genivia's license for commercial use.
+*/
+
+/* NOTE:
+
+ - Compile this file with soapcpp2 to complete the code generation process.
+ - Use wsdl2h option -l to view the software license terms.
+ - Use wsdl2h options -c and -s to generate pure C code or C++ code without STL.
+ - To build with STL, stlvector.h from the gSOAP distribution must be in the
+   current directory. Or use soapcpp2 option -I<path> with path to stlvector.h.
+ - Use typemap.dat to control schema namespace bindings and type mappings.
+   It is strongly recommended to customize the names of the namespace prefixes
+   generated by wsdl2h. To do so, modify the prefix bindings in the Namespaces
+   section below and add the modified lines to typemap.dat to rerun wsdl2h.
+ - Use Doxygen (www.doxygen.org) to browse this file.
+
+*/
+
+/******************************************************************************\
+ *                                                                            *
+ *                                                                            *
+ *                                                                            *
+\******************************************************************************/
+
+//gsoapopt w
+
+#import "stlvector.h"
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Namespaces                                                          *
+ *                                                                            *
+\******************************************************************************/
+
+
+/* NOTE:
+
+It is strongly recommended to customize the names of the namespace prefixes
+generated by wsdl2h. To do so, modify the prefix bindings below and add the
+modified lines to typemap.dat to rerun wsdl2h:
+
+inq2 = urn:uddi-org:inquiry_v2
+uddi2 = urn:uddi-org:api_v2
+pub2 = urn:uddi-org:publication_v2
+
+*/
+
+//gsoap inq2  schema namespace:	urn:uddi-org:inquiry_v2
+//gsoap uddi2 schema namespace:	urn:uddi-org:api_v2
+//gsoap pub2  schema namespace:	urn:uddi-org:publication_v2
+//gsoap inq2  schema form:	unqualified
+//gsoap uddi2 schema elementForm:	qualified
+//gsoap uddi2 schema attributeForm:	unqualified
+//gsoap pub2  schema form:	unqualified
+
+/******************************************************************************\
+ *                                                                            *
+ * Schema Types                                                               *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Primitive built-in type "xs:NMTOKEN"
+typedef char* xsd__NMTOKEN;
+
+/// Built-in attribute "xml:lang"
+typedef char* xml__lang;
+
+class uddi2__accessPoint;
+class uddi2__address;
+class uddi2__addressLine;
+class uddi2__assertionStatusItem;
+class uddi2__bindingTemplate;
+class uddi2__bindingTemplates;
+class uddi2__businessEntity;
+class uddi2__businessEntityExt;
+class uddi2__businessInfo;
+class uddi2__businessInfos;
+class uddi2__businessService;
+class uddi2__businessServices;
+class uddi2__categoryBag;
+class uddi2__contact;
+class uddi2__contacts;
+class uddi2__description;
+class uddi2__discoveryURL;
+class uddi2__discoveryURLs;
+class uddi2__dispositionReport;
+class uddi2__email;
+class uddi2__errInfo;
+class uddi2__findQualifiers;
+class uddi2__hostingRedirector;
+class uddi2__identifierBag;
+class uddi2__instanceDetails;
+class uddi2__keyedReference;
+class uddi2__keysOwned;
+class uddi2__name;
+class uddi2__overviewDoc;
+class uddi2__phone;
+class uddi2__publisherAssertion;
+class uddi2__relatedBusinessInfo;
+class uddi2__relatedBusinessInfos;
+class uddi2__result;
+class uddi2__serviceInfo;
+class uddi2__serviceInfos;
+class uddi2__sharedRelationships;
+class uddi2__tModel;
+class uddi2__tModelBag;
+class uddi2__tModelInfo;
+class uddi2__tModelInfos;
+class uddi2__tModelInstanceDetails;
+class uddi2__tModelInstanceInfo;
+class uddi2__add_USCOREpublisherAssertions;
+class uddi2__delete_USCOREbinding;
+class uddi2__delete_USCOREbusiness;
+class uddi2__delete_USCOREpublisherAssertions;
+class uddi2__delete_USCOREservice;
+class uddi2__delete_USCOREtModel;
+class uddi2__discard_USCOREauthToken;
+class uddi2__find_USCOREbinding;
+class uddi2__find_USCOREbusiness;
+class uddi2__find_USCORErelatedBusinesses;
+class uddi2__find_USCOREservice;
+class uddi2__find_USCOREtModel;
+class uddi2__get_USCOREassertionStatusReport;
+class uddi2__get_USCOREauthToken;
+class uddi2__get_USCOREbindingDetail;
+class uddi2__get_USCOREbusinessDetail;
+class uddi2__get_USCOREbusinessDetailExt;
+class uddi2__get_USCOREpublisherAssertions;
+class uddi2__get_USCOREregisteredInfo;
+class uddi2__get_USCOREserviceDetail;
+class uddi2__get_USCOREtModelDetail;
+class uddi2__save_USCOREbinding;
+class uddi2__save_USCOREbusiness;
+class uddi2__save_USCOREservice;
+class uddi2__save_USCOREtModel;
+class uddi2__set_USCOREpublisherAssertions;
+class uddi2__validate_USCOREvalues;
+class uddi2__assertionStatusReport;
+class uddi2__authToken;
+class uddi2__bindingDetail;
+class uddi2__businessDetail;
+class uddi2__businessDetailExt;
+class uddi2__businessList;
+class uddi2__publisherAssertions;
+class uddi2__registeredInfo;
+class uddi2__relatedBusinessesList;
+class uddi2__serviceDetail;
+class uddi2__serviceList;
+class uddi2__tModelDetail;
+class uddi2__tModelList;
+
+/// Schema "urn:uddi-org:api_v2":bindingKey simpleType restriction of xs:string
+
+typedef char* uddi2__bindingKey;
+
+/// Schema "urn:uddi-org:api_v2":businessKey simpleType restriction of xs:string
+
+typedef char* uddi2__businessKey;
+
+/// Schema "urn:uddi-org:api_v2":serviceKey simpleType restriction of xs:string
+
+typedef char* uddi2__serviceKey;
+
+/// Schema "urn:uddi-org:api_v2":tModelKey simpleType restriction of xs:string
+
+typedef char* uddi2__tModelKey;
+
+/// Schema "urn:uddi-org:api_v2":direction simpleType restriction of xs:NMTOKEN
+
+/// Note: enum values are prefixed with 'uddi2__direction' to avoid name clashes, please use wsdl2h option -e to omit this prefix
+enum uddi2__direction
+{	uddi2__direction__fromKey,	///< xs:NMTOKEN value="fromKey"
+	uddi2__direction__toKey,	///< xs:NMTOKEN value="toKey"
+};
+
+/// Schema "urn:uddi-org:api_v2":truncated simpleType restriction of xs:NMTOKEN
+
+/// Note: enum values are prefixed with 'uddi2__truncated' to avoid name clashes, please use wsdl2h option -e to omit this prefix
+enum uddi2__truncated
+{	uddi2__truncated__true_,	///< xs:NMTOKEN value="true"
+	uddi2__truncated__false_,	///< xs:NMTOKEN value="false"
+};
+
+/// Schema "urn:uddi-org:api_v2":URLType simpleType restriction of xs:NMTOKEN
+
+/// Note: enum values are prefixed with 'uddi2__URLType' to avoid name clashes, please use wsdl2h option -e to omit this prefix
+enum uddi2__URLType
+{	uddi2__URLType__mailto,	///< xs:NMTOKEN value="mailto"
+	uddi2__URLType__http,	///< xs:NMTOKEN value="http"
+	uddi2__URLType__https,	///< xs:NMTOKEN value="https"
+	uddi2__URLType__ftp,	///< xs:NMTOKEN value="ftp"
+	uddi2__URLType__fax,	///< xs:NMTOKEN value="fax"
+	uddi2__URLType__phone,	///< xs:NMTOKEN value="phone"
+	uddi2__URLType__other,	///< xs:NMTOKEN value="other"
+};
+
+/// Schema "urn:uddi-org:api_v2":keyType simpleType restriction of xs:NMTOKEN
+
+/// Note: enum values are prefixed with 'uddi2__keyType' to avoid name clashes, please use wsdl2h option -e to omit this prefix
+enum uddi2__keyType
+{	uddi2__keyType__businessKey,	///< xs:NMTOKEN value="businessKey"
+	uddi2__keyType__tModelKey,	///< xs:NMTOKEN value="tModelKey"
+	uddi2__keyType__serviceKey,	///< xs:NMTOKEN value="serviceKey"
+	uddi2__keyType__bindingKey,	///< xs:NMTOKEN value="bindingKey"
+};
+
+/// Schema urn:uddi-org:api_v2:"address"
+
+class uddi2__address
+{ public:
+/// Vector of uddi2__addressLine* with length 0..unbounded
+    std::vector<uddi2__addressLine*    > addressLine                    0;
+/// Attribute useType of type xs:string
+   @char*                                useType                        0;	///< Optional attribute
+/// Attribute sortCode of type xs:string
+   @char*                                sortCode                       0;	///< Optional attribute
+/// Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey
+   @uddi2__tModelKey                     tModelKey                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"assertionStatusItem"
+
+class uddi2__assertionStatusItem
+{ public:
+/// Element reference "urn:uddi-org:api_v2":fromKey
+    uddi2__businessKey                   fromKey                        1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":toKey
+    uddi2__businessKey                   toKey                          1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":keyedReference
+    uddi2__keyedReference*               keyedReference                 1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":keysOwned
+    uddi2__keysOwned*                    keysOwned                      1;	///< Required element
+/// Attribute completionStatus of type xs:string
+   @char*                                completionStatus               1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"bindingTemplate"
+
+class uddi2__bindingTemplate
+{ public:
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":tModelInstanceDetails
+    uddi2__tModelInstanceDetails*        tModelInstanceDetails          1;	///< Required element
+// CHOICE OF ELEMENTS:
+/// Element reference "urn:uddi-org:api_v2":accessPoint
+    uddi2__accessPoint*                  accessPoint                    1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":hostingRedirector
+    uddi2__hostingRedirector*            hostingRedirector              1;	///< Required element
+// END CHOICE
+/// Attribute serviceKey of type "urn:uddi-org:api_v2":serviceKey
+   @uddi2__serviceKey                    serviceKey                     0;	///< Optional attribute
+/// Attribute bindingKey of type "urn:uddi-org:api_v2":bindingKey
+   @uddi2__bindingKey                    bindingKey                     1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"bindingTemplates"
+
+class uddi2__bindingTemplates
+{ public:
+/// Vector of uddi2__bindingTemplate* with length 0..unbounded
+    std::vector<uddi2__bindingTemplate*> bindingTemplate                0;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessEntity"
+
+class uddi2__businessEntity
+{ public:
+/// Element reference "urn:uddi-org:api_v2":discoveryURLs
+    uddi2__discoveryURLs*                discoveryURLs                  0;	///< Optional element
+/// Vector of uddi2__name* with length 0..unbounded
+    std::vector<uddi2__name*           > name                           1;
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":contacts
+    uddi2__contacts*                     contacts                       0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":businessServices
+    uddi2__businessServices*             businessServices               0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":identifierBag
+    uddi2__identifierBag*                identifierBag                  0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":categoryBag
+    uddi2__categoryBag*                  categoryBag                    0;	///< Optional element
+/// Attribute businessKey of type "urn:uddi-org:api_v2":businessKey
+   @uddi2__businessKey                   businessKey                    1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      0;	///< Optional attribute
+/// Attribute authorizedName of type xs:string
+   @char*                                authorizedName                 0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessEntityExt"
+
+class uddi2__businessEntityExt
+{ public:
+/// Element reference "urn:uddi-org:api_v2":businessEntity
+    uddi2__businessEntity*               businessEntity                 1;	///< Required element
+// TODO: <any namespace="##other" minOccurs="0" maxOccurs="unbounded">
+//       Schema extensibility is user-definable
+//       Consult the protocol documentation to insert declarations here:
+    _XML                                 __any                         ;	///< Catch any element content in XML string
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessInfo"
+
+class uddi2__businessInfo
+{ public:
+/// Vector of uddi2__name* with length 0..unbounded
+    std::vector<uddi2__name*           > name                           1;
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":serviceInfos
+    uddi2__serviceInfos*                 serviceInfos                   1;	///< Required element
+/// Attribute businessKey of type "urn:uddi-org:api_v2":businessKey
+   @uddi2__businessKey                   businessKey                    1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessInfos"
+
+class uddi2__businessInfos
+{ public:
+/// Vector of uddi2__businessInfo* with length 0..unbounded
+    std::vector<uddi2__businessInfo*   > businessInfo                   0;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessService"
+
+class uddi2__businessService
+{ public:
+/// Vector of uddi2__name* with length 0..unbounded
+    std::vector<uddi2__name*           > name                           0;
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":bindingTemplates
+    uddi2__bindingTemplates*             bindingTemplates               0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":categoryBag
+    uddi2__categoryBag*                  categoryBag                    0;	///< Optional element
+/// Attribute serviceKey of type "urn:uddi-org:api_v2":serviceKey
+   @uddi2__serviceKey                    serviceKey                     1;	///< Required attribute
+/// Attribute businessKey of type "urn:uddi-org:api_v2":businessKey
+   @uddi2__businessKey                   businessKey                    0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessServices"
+
+class uddi2__businessServices
+{ public:
+/// Vector of uddi2__businessService* with length 0..unbounded
+    std::vector<uddi2__businessService*> businessService                0;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"categoryBag"
+
+class uddi2__categoryBag
+{ public:
+/// Vector of uddi2__keyedReference* with length 0..unbounded
+    std::vector<uddi2__keyedReference* > keyedReference                 1;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"contact"
+
+class uddi2__contact
+{ public:
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":personName
+    char*                                personName                     1;	///< Required element
+/// Vector of uddi2__phone* with length 0..unbounded
+    std::vector<uddi2__phone*          > phone                          0;
+/// Vector of uddi2__email* with length 0..unbounded
+    std::vector<uddi2__email*          > email                          0;
+/// Vector of uddi2__address* with length 0..unbounded
+    std::vector<uddi2__address*        > address                        0;
+/// Attribute useType of type xs:string
+   @char*                                useType                        0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"contacts"
+
+class uddi2__contacts
+{ public:
+/// Vector of uddi2__contact* with length 0..unbounded
+    std::vector<uddi2__contact*        > contact                        1;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"discoveryURLs"
+
+class uddi2__discoveryURLs
+{ public:
+/// Vector of uddi2__discoveryURL* with length 0..unbounded
+    std::vector<uddi2__discoveryURL*   > discoveryURL                   1;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"dispositionReport"
+
+class uddi2__dispositionReport
+{ public:
+/// Vector of uddi2__result* with length 0..unbounded
+    std::vector<uddi2__result*         > result                         1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"findQualifiers"
+
+class uddi2__findQualifiers
+{ public:
+/// Vector of char* with length 0..unbounded
+    std::vector<char*                  > findQualifier                  0;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"hostingRedirector"
+
+class uddi2__hostingRedirector
+{ public:
+/// Attribute bindingKey of type "urn:uddi-org:api_v2":bindingKey
+   @uddi2__bindingKey                    bindingKey                     1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"identifierBag"
+
+class uddi2__identifierBag
+{ public:
+/// Vector of uddi2__keyedReference* with length 0..unbounded
+    std::vector<uddi2__keyedReference* > keyedReference                 1;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"instanceDetails"
+
+class uddi2__instanceDetails
+{ public:
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":overviewDoc
+    uddi2__overviewDoc*                  overviewDoc                    0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":instanceParms
+    char*                                instanceParms                  0;	///< Optional element
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"keyedReference"
+
+class uddi2__keyedReference
+{ public:
+/// Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey
+   @uddi2__tModelKey                     tModelKey                      0;	///< Optional attribute
+/// Attribute keyName of type xs:string
+   @char*                                keyName                        0;	///< Optional attribute
+/// Attribute keyValue of type xs:string
+   @char*                                keyValue                       1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"keysOwned"
+
+class uddi2__keysOwned
+{ public:
+/// Element reference "urn:uddi-org:api_v2":fromKey
+    uddi2__businessKey                   fromKey                        0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":toKey
+    uddi2__businessKey                   toKey                          0;	///< Optional element
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"overviewDoc"
+
+class uddi2__overviewDoc
+{ public:
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":overviewURL
+    char*                                overviewURL                    0;	///< Optional element
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"publisherAssertion"
+
+class uddi2__publisherAssertion
+{ public:
+/// Element reference "urn:uddi-org:api_v2":fromKey
+    uddi2__businessKey                   fromKey                        1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":toKey
+    uddi2__businessKey                   toKey                          1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":keyedReference
+    uddi2__keyedReference*               keyedReference                 1;	///< Required element
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"relatedBusinessInfo"
+
+class uddi2__relatedBusinessInfo
+{ public:
+/// Element reference "urn:uddi-org:api_v2":businessKey
+    uddi2__businessKey                   businessKey                    1;	///< Required element
+/// Vector of uddi2__name* with length 0..unbounded
+    std::vector<uddi2__name*           > name                           1;
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Vector of uddi2__sharedRelationships* with length 0..2
+    std::vector<uddi2__sharedRelationships*> sharedRelationships            1:2;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"relatedBusinessInfos"
+
+class uddi2__relatedBusinessInfos
+{ public:
+/// Vector of uddi2__relatedBusinessInfo* with length 0..unbounded
+    std::vector<uddi2__relatedBusinessInfo*> relatedBusinessInfo            0;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"result"
+
+class uddi2__result
+{ public:
+/// Element reference "urn:uddi-org:api_v2":errInfo
+    uddi2__errInfo*                      errInfo                        0;	///< Optional element
+/// Attribute keyType of type "urn:uddi-org:api_v2":keyType
+   @enum uddi2__keyType*                 keyType                        0;	///< Optional attribute
+/// Attribute errno of type xs:int
+   @int                                  errno_                         1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"serviceInfo"
+
+class uddi2__serviceInfo
+{ public:
+/// Vector of uddi2__name* with length 0..unbounded
+    std::vector<uddi2__name*           > name                           0;
+/// Attribute serviceKey of type "urn:uddi-org:api_v2":serviceKey
+   @uddi2__serviceKey                    serviceKey                     1;	///< Required attribute
+/// Attribute businessKey of type "urn:uddi-org:api_v2":businessKey
+   @uddi2__businessKey                   businessKey                    1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"serviceInfos"
+
+class uddi2__serviceInfos
+{ public:
+/// Vector of uddi2__serviceInfo* with length 0..unbounded
+    std::vector<uddi2__serviceInfo*    > serviceInfo                    0;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"sharedRelationships"
+
+class uddi2__sharedRelationships
+{ public:
+/// Vector of uddi2__keyedReference* with length 0..unbounded
+    std::vector<uddi2__keyedReference* > keyedReference                 1;
+/// Attribute direction of type "urn:uddi-org:api_v2":direction
+   @enum uddi2__direction                direction                      1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"tModel"
+
+class uddi2__tModel
+{ public:
+/// Element reference "urn:uddi-org:api_v2":name
+    uddi2__name*                         name                           1;	///< Required element
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":overviewDoc
+    uddi2__overviewDoc*                  overviewDoc                    0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":identifierBag
+    uddi2__identifierBag*                identifierBag                  0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":categoryBag
+    uddi2__categoryBag*                  categoryBag                    0;	///< Optional element
+/// Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey
+   @uddi2__tModelKey                     tModelKey                      1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      0;	///< Optional attribute
+/// Attribute authorizedName of type xs:string
+   @char*                                authorizedName                 0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"tModelBag"
+
+class uddi2__tModelBag
+{ public:
+/// Vector of uddi2__tModelKey with length 0..unbounded
+    std::vector<uddi2__tModelKey       > tModelKey                      1;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"tModelInfo"
+
+class uddi2__tModelInfo
+{ public:
+/// Element reference "urn:uddi-org:api_v2":name
+    uddi2__name*                         name                           1;	///< Required element
+/// Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey
+   @uddi2__tModelKey                     tModelKey                      1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"tModelInfos"
+
+class uddi2__tModelInfos
+{ public:
+/// Vector of uddi2__tModelInfo* with length 0..unbounded
+    std::vector<uddi2__tModelInfo*     > tModelInfo                     0;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"tModelInstanceDetails"
+
+class uddi2__tModelInstanceDetails
+{ public:
+/// Vector of uddi2__tModelInstanceInfo* with length 0..unbounded
+    std::vector<uddi2__tModelInstanceInfo*> tModelInstanceInfo             0;
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"tModelInstanceInfo"
+
+class uddi2__tModelInstanceInfo
+{ public:
+/// Vector of uddi2__description* with length 0..unbounded
+    std::vector<uddi2__description*    > description                    0;
+/// Element reference "urn:uddi-org:api_v2":instanceDetails
+    uddi2__instanceDetails*              instanceDetails                0;	///< Optional element
+/// Attribute tModelKey of type "urn:uddi-org:api_v2":tModelKey
+   @uddi2__tModelKey                     tModelKey                      1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"add_publisherAssertions"
+
+class uddi2__add_USCOREpublisherAssertions
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__publisherAssertion* with length 0..unbounded
+    std::vector<uddi2__publisherAssertion*> publisherAssertion             1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__add_USCOREpublisherAssertions(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__add_USCOREpublisherAssertions(struct soap*, std::vector<uddi2__publisherAssertion*> publisherAssertions);
+/// Member declared in uddi2-typemap.dat
+    uddi2__dispositionReport* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"delete_binding"
+
+class uddi2__delete_USCOREbinding
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__bindingKey with length 0..unbounded
+    std::vector<uddi2__bindingKey      > bindingKey                     1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREbinding(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREbinding(struct soap*, const char *bindingKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREbinding(struct soap*, std::vector<char*> bindingKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__dispositionReport* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"delete_business"
+
+class uddi2__delete_USCOREbusiness
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__businessKey with length 0..unbounded
+    std::vector<uddi2__businessKey     > businessKey                    1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREbusiness(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREbusiness(struct soap*, const char *businessKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREbusiness(struct soap*, std::vector<char*> businessKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__dispositionReport* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"delete_publisherAssertions"
+
+class uddi2__delete_USCOREpublisherAssertions
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__publisherAssertion* with length 0..unbounded
+    std::vector<uddi2__publisherAssertion*> publisherAssertion             1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREpublisherAssertions(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREpublisherAssertions(struct soap*, std::vector<uddi2__publisherAssertion*> publisherAssertions);
+/// Member declared in uddi2-typemap.dat
+    uddi2__dispositionReport* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"delete_service"
+
+class uddi2__delete_USCOREservice
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__serviceKey with length 0..unbounded
+    std::vector<uddi2__serviceKey      > serviceKey                     1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREservice(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREservice(struct soap*, const char *serviceKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREservice(struct soap*, std::vector<char*> serviceKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__dispositionReport* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"delete_tModel"
+
+class uddi2__delete_USCOREtModel
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__tModelKey with length 0..unbounded
+    std::vector<uddi2__tModelKey       > tModelKey                      1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREtModel(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREtModel(struct soap*, const char *tModelKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__delete_USCOREtModel(struct soap*, std::vector<char*> tModelKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__dispositionReport* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"discard_authToken"
+
+class uddi2__discard_USCOREauthToken
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__discard_USCOREauthToken(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__discard_USCOREauthToken(struct soap*, const char *authInfo);
+/// Member declared in uddi2-typemap.dat
+    uddi2__dispositionReport* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"find_binding"
+
+class uddi2__find_USCOREbinding
+{ public:
+/// Element reference "urn:uddi-org:api_v2":findQualifiers
+    uddi2__findQualifiers*               findQualifiers                 0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":tModelBag
+    uddi2__tModelBag*                    tModelBag                      1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute maxRows of type xs:int
+   @int*                                 maxRows                        0;	///< Optional attribute
+/// Attribute serviceKey of type "urn:uddi-org:api_v2":serviceKey
+   @uddi2__serviceKey                    serviceKey                     1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREbinding(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREbinding(struct soap*, const char *tModelKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREbinding(struct soap*, std::vector<char*> tModelKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__bindingDetail *send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"find_business"
+
+class uddi2__find_USCOREbusiness
+{ public:
+/// Element reference "urn:uddi-org:api_v2":findQualifiers
+    uddi2__findQualifiers*               findQualifiers                 0;	///< Optional element
+/// Vector of uddi2__name* with length 0..unbounded
+    std::vector<uddi2__name*           > name                           0;
+/// Element reference "urn:uddi-org:api_v2":identifierBag
+    uddi2__identifierBag*                identifierBag                  0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":categoryBag
+    uddi2__categoryBag*                  categoryBag                    0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":tModelBag
+    uddi2__tModelBag*                    tModelBag                      0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":discoveryURLs
+    uddi2__discoveryURLs*                discoveryURLs                  0;	///< Optional element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute maxRows of type xs:int
+   @int*                                 maxRows                        0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREbusiness(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREbusiness(struct soap*, const char *name);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREbusiness(struct soap*, std::vector<char*> tModelKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREbusiness(struct soap*, std::vector<uddi2__keyedReference*> keyedReferences);
+/// Member declared in uddi2-typemap.dat
+    uddi2__businessList *send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"find_relatedBusinesses"
+
+class uddi2__find_USCORErelatedBusinesses
+{ public:
+/// Element reference "urn:uddi-org:api_v2":findQualifiers
+    uddi2__findQualifiers*               findQualifiers                 0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":businessKey
+    uddi2__businessKey                   businessKey                    1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":keyedReference
+    uddi2__keyedReference*               keyedReference                 0;	///< Optional element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute maxRows of type xs:int
+   @int*                                 maxRows                        0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCORErelatedBusinesses(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCORErelatedBusinesses(struct soap*, const char *businessKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__relatedBusinessesList *send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"find_service"
+
+class uddi2__find_USCOREservice
+{ public:
+/// Element reference "urn:uddi-org:api_v2":findQualifiers
+    uddi2__findQualifiers*               findQualifiers                 0;	///< Optional element
+/// Vector of uddi2__name* with length 0..unbounded
+    std::vector<uddi2__name*           > name                           0;
+/// Element reference "urn:uddi-org:api_v2":categoryBag
+    uddi2__categoryBag*                  categoryBag                    0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":tModelBag
+    uddi2__tModelBag*                    tModelBag                      0;	///< Optional element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute maxRows of type xs:int
+   @int*                                 maxRows                        0;	///< Optional attribute
+/// Attribute businessKey of type "urn:uddi-org:api_v2":businessKey
+   @uddi2__businessKey                   businessKey                    0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREservice(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREservice(struct soap*, const char *name);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREservice(struct soap*, std::vector<char*> tModelKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREservice(struct soap*, std::vector<uddi2__keyedReference*> keyedReferences);
+/// Member declared in uddi2-typemap.dat
+    uddi2__serviceList* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"find_tModel"
+
+class uddi2__find_USCOREtModel
+{ public:
+/// Element reference "urn:uddi-org:api_v2":findQualifiers
+    uddi2__findQualifiers*               findQualifiers                 0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":name
+    uddi2__name*                         name                           0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":identifierBag
+    uddi2__identifierBag*                identifierBag                  0;	///< Optional element
+/// Element reference "urn:uddi-org:api_v2":categoryBag
+    uddi2__categoryBag*                  categoryBag                    0;	///< Optional element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute maxRows of type xs:int
+   @int*                                 maxRows                        0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREtModel(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREtModel(struct soap*, const char *name);
+/// Member declared in uddi2-typemap.dat
+    uddi2__find_USCOREtModel(struct soap*, std::vector<uddi2__keyedReference*> keyedReferences);
+/// Member declared in uddi2-typemap.dat
+    uddi2__tModelList* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_assertionStatusReport"
+
+class uddi2__get_USCOREassertionStatusReport
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":completionStatus
+    char*                                completionStatus               0;	///< Optional element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREassertionStatusReport(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREassertionStatusReport(struct soap*, const char *completionStatus);
+/// Member declared in uddi2-typemap.dat
+    uddi2__assertionStatusReport* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_authToken"
+
+class uddi2__get_USCOREauthToken
+{ public:
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute userID of type xs:string
+   @char*                                userID                         1;	///< Required attribute
+/// Attribute cred of type xs:string
+   @char*                                cred                           1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREauthToken(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREauthToken(struct soap*, const char *userid, const char *passwd);
+/// Member declared in uddi2-typemap.dat
+    uddi2__authToken* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_bindingDetail"
+
+class uddi2__get_USCOREbindingDetail
+{ public:
+/// Vector of uddi2__bindingKey with length 0..unbounded
+    std::vector<uddi2__bindingKey      > bindingKey                     1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbindingDetail(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbindingDetail(struct soap*, const char *bindingKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbindingDetail(struct soap*, std::vector<char*> bindingKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__bindingDetail* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_businessDetail"
+
+class uddi2__get_USCOREbusinessDetail
+{ public:
+/// Vector of uddi2__businessKey with length 0..unbounded
+    std::vector<uddi2__businessKey     > businessKey                    1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbusinessDetail(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbusinessDetail(struct soap*, const char *businessKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbusinessDetail(struct soap*, std::vector<char*> businessKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__businessDetail* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_businessDetailExt"
+
+class uddi2__get_USCOREbusinessDetailExt
+{ public:
+/// Vector of uddi2__businessKey with length 0..unbounded
+    std::vector<uddi2__businessKey     > businessKey                    1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbusinessDetailExt(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbusinessDetailExt(struct soap*, const char *businessKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREbusinessDetailExt(struct soap*, std::vector<char*> businessKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__businessDetailExt* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_publisherAssertions"
+
+class uddi2__get_USCOREpublisherAssertions
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREpublisherAssertions(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__publisherAssertions* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_registeredInfo"
+
+class uddi2__get_USCOREregisteredInfo
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREregisteredInfo(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__registeredInfo* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_serviceDetail"
+
+class uddi2__get_USCOREserviceDetail
+{ public:
+/// Vector of uddi2__serviceKey with length 0..unbounded
+    std::vector<uddi2__serviceKey      > serviceKey                     1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREserviceDetail(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREserviceDetail(struct soap*, const char *serviceKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREserviceDetail(struct soap*, std::vector<char*> serviceKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__serviceDetail* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"get_tModelDetail"
+
+class uddi2__get_USCOREtModelDetail
+{ public:
+/// Vector of uddi2__tModelKey with length 0..unbounded
+    std::vector<uddi2__tModelKey       > tModelKey                      1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREtModelDetail(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREtModelDetail(struct soap*, const char *tModelKey);
+/// Member declared in uddi2-typemap.dat
+    uddi2__get_USCOREtModelDetail(struct soap*, std::vector<char*> tModelKeys);
+/// Member declared in uddi2-typemap.dat
+    uddi2__tModelDetail* send(const char *endpoint);
+};
+
+/// Schema urn:uddi-org:api_v2:"save_binding"
+
+class uddi2__save_USCOREbinding
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__bindingTemplate* with length 0..unbounded
+    std::vector<uddi2__bindingTemplate*> bindingTemplate                1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREbinding(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREbinding(struct soap*, uddi2__bindingTemplate &bindingTemplate);
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREbinding(struct soap*, std::vector<uddi2__bindingTemplate*> bindingTemplates);
+/// Member declared in uddi2-typemap.dat
+    uddi2__bindingDetail* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"save_business"
+
+class uddi2__save_USCOREbusiness
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__businessEntity* with length 0..unbounded
+    std::vector<uddi2__businessEntity* > businessEntity                 0;
+/// Vector of char* with length 0..unbounded
+    std::vector<char*                  > uploadRegister                 0;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREbusiness(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREbusiness(struct soap*, uddi2__businessEntity &businessEntity);
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREbusiness(struct soap*, std::vector<uddi2__businessEntity*> businessEntities);
+/// Member declared in uddi2-typemap.dat
+    uddi2__businessDetail* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"save_service"
+
+class uddi2__save_USCOREservice
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__businessService* with length 0..unbounded
+    std::vector<uddi2__businessService*> businessService                1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREservice(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREservice(struct soap*, uddi2__businessService &businessService);
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREservice(struct soap*, std::vector<uddi2__businessService*> businessServices);
+/// Member declared in uddi2-typemap.dat
+    uddi2__serviceDetail* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"save_tModel"
+
+class uddi2__save_USCOREtModel
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__tModel* with length 0..unbounded
+    std::vector<uddi2__tModel*         > tModel                         0;
+/// Vector of char* with length 0..unbounded
+    std::vector<char*                  > uploadRegister                 0;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREtModel(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREtModel(struct soap*, uddi2__tModel &tModel);
+/// Member declared in uddi2-typemap.dat
+    uddi2__save_USCOREtModel(struct soap*, std::vector<uddi2__tModel*> tModels);
+/// Member declared in uddi2-typemap.dat
+    uddi2__tModelDetail* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"set_publisherAssertions"
+
+class uddi2__set_USCOREpublisherAssertions
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Vector of uddi2__publisherAssertion* with length 0..unbounded
+    std::vector<uddi2__publisherAssertion*> publisherAssertion             0;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+/// Member declared in uddi2-typemap.dat
+    uddi2__set_USCOREpublisherAssertions(struct soap*);
+/// Member declared in uddi2-typemap.dat
+    uddi2__set_USCOREpublisherAssertions(struct soap*, std::vector<uddi2__publisherAssertion*> publisherAssertions);
+/// Member declared in uddi2-typemap.dat
+    uddi2__publisherAssertions* send(const char *endpoint, char *authInfo);
+};
+
+/// Schema urn:uddi-org:api_v2:"validate_values"
+
+class uddi2__validate_USCOREvalues
+{ public:
+// CHOICE OF ELEMENTS:
+/// Vector of uddi2__businessEntity* with length 0..unbounded
+    std::vector<uddi2__businessEntity* > businessEntity                 0;
+/// Vector of uddi2__businessService* with length 0..unbounded
+    std::vector<uddi2__businessService*> businessService                0;
+/// Vector of uddi2__tModel* with length 0..unbounded
+    std::vector<uddi2__tModel*         > tModel                         0;
+// END CHOICE
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"assertionStatusReport"
+
+class uddi2__assertionStatusReport
+{ public:
+/// Vector of uddi2__assertionStatusItem* with length 0..unbounded
+    std::vector<uddi2__assertionStatusItem*> assertionStatusItem            0;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"authToken"
+
+class uddi2__authToken
+{ public:
+/// Element reference "urn:uddi-org:api_v2":authInfo
+    char*                                authInfo                       1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"bindingDetail"
+
+class uddi2__bindingDetail
+{ public:
+/// Vector of uddi2__bindingTemplate* with length 0..unbounded
+    std::vector<uddi2__bindingTemplate*> bindingTemplate                0;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessDetail"
+
+class uddi2__businessDetail
+{ public:
+/// Vector of uddi2__businessEntity* with length 0..unbounded
+    std::vector<uddi2__businessEntity* > businessEntity                 0;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessDetailExt"
+
+class uddi2__businessDetailExt
+{ public:
+/// Vector of uddi2__businessEntityExt* with length 0..unbounded
+    std::vector<uddi2__businessEntityExt*> businessEntityExt              1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"businessList"
+
+class uddi2__businessList
+{ public:
+/// Element reference "urn:uddi-org:api_v2":businessInfos
+    uddi2__businessInfos*                businessInfos                  1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"publisherAssertions"
+
+class uddi2__publisherAssertions
+{ public:
+/// Vector of uddi2__publisherAssertion* with length 0..unbounded
+    std::vector<uddi2__publisherAssertion*> publisherAssertion             0;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute authorizedName of type xs:string
+   @char*                                authorizedName                 1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"registeredInfo"
+
+class uddi2__registeredInfo
+{ public:
+/// Element reference "urn:uddi-org:api_v2":businessInfos
+    uddi2__businessInfos*                businessInfos                  1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":tModelInfos
+    uddi2__tModelInfos*                  tModelInfos                    1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"relatedBusinessesList"
+
+class uddi2__relatedBusinessesList
+{ public:
+/// Element reference "urn:uddi-org:api_v2":businessKey
+    uddi2__businessKey                   businessKey                    1;	///< Required element
+/// Element reference "urn:uddi-org:api_v2":relatedBusinessInfos
+    uddi2__relatedBusinessInfos*         relatedBusinessInfos           1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"serviceDetail"
+
+class uddi2__serviceDetail
+{ public:
+/// Vector of uddi2__businessService* with length 0..unbounded
+    std::vector<uddi2__businessService*> businessService                0;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"serviceList"
+
+class uddi2__serviceList
+{ public:
+/// Element reference "urn:uddi-org:api_v2":serviceInfos
+    uddi2__serviceInfos*                 serviceInfos                   1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"tModelDetail"
+
+class uddi2__tModelDetail
+{ public:
+/// Vector of uddi2__tModel* with length 0..unbounded
+    std::vector<uddi2__tModel*         > tModel                         1;
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"tModelList"
+
+class uddi2__tModelList
+{ public:
+/// Element reference "urn:uddi-org:api_v2":tModelInfos
+    uddi2__tModelInfos*                  tModelInfos                    1;	///< Required element
+/// Attribute generic of type xs:string
+   @char*                                generic                        1;	///< Required attribute
+/// Attribute operator of type xs:string
+   @char*                                operator_                      1;	///< Required attribute
+/// Attribute truncated of type "urn:uddi-org:api_v2":truncated
+   @enum uddi2__truncated*               truncated                      0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"accessPoint"
+
+class uddi2__accessPoint
+{ public:
+    char*                                __item                        ;
+/// Attribute URLType of type "urn:uddi-org:api_v2":URLType
+   @enum uddi2__URLType                  URLType                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"addressLine"
+
+class uddi2__addressLine
+{ public:
+    char*                                __item                        ;
+/// Attribute keyName of type xs:string
+   @char*                                keyName                        0;	///< Optional attribute
+/// Attribute keyValue of type xs:string
+   @char*                                keyValue                       0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"description"
+
+class uddi2__description
+{ public:
+    char*                                __item                        ;
+/// Attribute reference xml:lang
+   @xml__lang                            xml__lang_                     0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"discoveryURL"
+
+class uddi2__discoveryURL
+{ public:
+    char*                                __item                        ;
+/// Attribute useType of type xs:string
+   @char*                                useType                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"email"
+
+class uddi2__email
+{ public:
+    char*                                __item                        ;
+/// Attribute useType of type xs:string
+   @char*                                useType                        0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"errInfo"
+
+class uddi2__errInfo
+{ public:
+    char*                                __item                        ;
+/// Attribute errCode of type xs:string
+   @char*                                errCode                        1;	///< Required attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"name"
+
+class uddi2__name
+{ public:
+    char*                                __item                        ;
+/// Attribute reference xml:lang
+   @xml__lang                            xml__lang_                     0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/// Schema urn:uddi-org:api_v2:"phone"
+
+class uddi2__phone
+{ public:
+    char*                                __item                        ;
+/// Attribute useType of type xs:string
+   @char*                                useType                        0;	///< Optional attribute
+/// A handle to the soap struct context that manages this class instance
+    struct soap                         *soap                          ;
+};
+
+/******************************************************************************\
+ *                                                                            *
+ * Services                                                                   *
+ *                                                                            *
+\******************************************************************************/
+
+//gsoap inq2 service name:	InquireSoap 
+//gsoap inq2 service type:	Inquire 
+//gsoap inq2 service namespace:	urn:uddi-org:inquiry_v2 
+//gsoap pub2 service name:	PublishSoap 
+//gsoap pub2 service type:	Publish 
+//gsoap pub2 service namespace:	urn:uddi-org:publication_v2 
+
+/** @mainpage Service Definitions
+
+@section Service_bindings Bindings
+  - @ref InquireSoap
+  - @ref PublishSoap
+
+*/
+
+/**
+
+@page InquireSoap Binding "InquireSoap"
+
+@section InquireSoap_operations Operations of Binding  "InquireSoap"
+  - @ref __inq2__find_USCOREbinding
+  - @ref __inq2__find_USCOREbusiness
+  - @ref __inq2__find_USCORErelatedBusinesses
+  - @ref __inq2__find_USCOREservice
+  - @ref __inq2__find_USCOREtModel
+  - @ref __inq2__get_USCOREbindingDetail
+  - @ref __inq2__get_USCOREbusinessDetail
+  - @ref __inq2__get_USCOREbusinessDetailExt
+  - @ref __inq2__get_USCOREserviceDetail
+  - @ref __inq2__get_USCOREtModelDetail
+
+@section InquireSoap_ports Endpoints of Binding  "InquireSoap"
+
+*/
+
+/**
+
+@page PublishSoap Binding "PublishSoap"
+
+@section PublishSoap_operations Operations of Binding  "PublishSoap"
+  - @ref __pub2__add_USCOREpublisherAssertions
+  - @ref __pub2__delete_USCOREbinding
+  - @ref __pub2__delete_USCOREbusiness
+  - @ref __pub2__delete_USCOREpublisherAssertions
+  - @ref __pub2__delete_USCOREservice
+  - @ref __pub2__delete_USCOREtModel
+  - @ref __pub2__discard_USCOREauthToken
+  - @ref __pub2__get_USCOREassertionStatusReport
+  - @ref __pub2__get_USCOREauthToken
+  - @ref __pub2__get_USCOREpublisherAssertions
+  - @ref __pub2__get_USCOREregisteredInfo
+  - @ref __pub2__save_USCOREbinding
+  - @ref __pub2__save_USCOREbusiness
+  - @ref __pub2__save_USCOREservice
+  - @ref __pub2__save_USCOREtModel
+  - @ref __pub2__set_USCOREpublisherAssertions
+
+@section PublishSoap_ports Endpoints of Binding  "PublishSoap"
+
+*/
+
+/******************************************************************************\
+ *                                                                            *
+ * SOAP Fault Detail                                                          *
+ *                                                                            *
+\******************************************************************************/
+
+/// The SOAP Fault Detail element contains one of the following types serialized
+// in the __type and fault fields of the SOAP_ENV__Detail struct (see docs)
+class _dispositionReport
+{ public:
+    uddi2__dispositionReport*           uddi2__dispositionReport_;
+    struct soap                         *soap                          ;
+};
+
+/******************************************************************************\
+ *                                                                            *
+ * InquireSoap                                                                *
+ *                                                                            *
+\******************************************************************************/
+
+
+/******************************************************************************\
+ *                                                                            *
+ * __inq2__find_USCOREbinding                                                 *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__inq2__find_USCOREbinding" of service binding "InquireSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="find_binding"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___inq2__find_USCOREbinding(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__find_USCOREbinding*          uddi2__find_USCOREbinding_,
+    // response parameters:
+    uddi2__bindingDetail*               uddi2__bindingDetail_
+  );
+@endcode
+
+C++ proxy class (defined in soapInquireSoapProxy.h):
+  class InquireSoap;
+
+*/
+
+//gsoap inq2 service method-style:	find_USCOREbinding document
+//gsoap inq2 service method-encoding:	find_USCOREbinding literal
+//gsoap inq2 service method-action:	find_USCOREbinding find_binding
+//gsoap inq2 service method-fault:	find_USCOREbinding _dispositionReport
+int __inq2__find_USCOREbinding(
+    uddi2__find_USCOREbinding*          uddi2__find_USCOREbinding_,
+    uddi2__bindingDetail*               uddi2__bindingDetail_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __inq2__find_USCOREbusiness                                                *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__inq2__find_USCOREbusiness" of service binding "InquireSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="find_business"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___inq2__find_USCOREbusiness(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__find_USCOREbusiness*         uddi2__find_USCOREbusiness_,
+    // response parameters:
+    uddi2__businessList*                uddi2__businessList_
+  );
+@endcode
+
+C++ proxy class (defined in soapInquireSoapProxy.h):
+  class InquireSoap;
+
+*/
+
+//gsoap inq2 service method-style:	find_USCOREbusiness document
+//gsoap inq2 service method-encoding:	find_USCOREbusiness literal
+//gsoap inq2 service method-action:	find_USCOREbusiness find_business
+//gsoap inq2 service method-fault:	find_USCOREbusiness _dispositionReport
+int __inq2__find_USCOREbusiness(
+    uddi2__find_USCOREbusiness*         uddi2__find_USCOREbusiness_,
+    uddi2__businessList*                uddi2__businessList_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __inq2__find_USCORErelatedBusinesses                                       *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__inq2__find_USCORErelatedBusinesses" of service binding "InquireSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="find_relatedBusinesses"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___inq2__find_USCORErelatedBusinesses(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__find_USCORErelatedBusinesses* uddi2__find_USCORErelatedBusinesses_,
+    // response parameters:
+    uddi2__relatedBusinessesList*       uddi2__relatedBusinessesList_
+  );
+@endcode
+
+C++ proxy class (defined in soapInquireSoapProxy.h):
+  class InquireSoap;
+
+*/
+
+//gsoap inq2 service method-style:	find_USCORErelatedBusinesses document
+//gsoap inq2 service method-encoding:	find_USCORErelatedBusinesses literal
+//gsoap inq2 service method-action:	find_USCORErelatedBusinesses find_relatedBusinesses
+//gsoap inq2 service method-fault:	find_USCORErelatedBusinesses _dispositionReport
+int __inq2__find_USCORErelatedBusinesses(
+    uddi2__find_USCORErelatedBusinesses* uddi2__find_USCORErelatedBusinesses_,
+    uddi2__relatedBusinessesList*       uddi2__relatedBusinessesList_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __inq2__find_USCOREservice                                                 *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__inq2__find_USCOREservice" of service binding "InquireSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="find_service"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___inq2__find_USCOREservice(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__find_USCOREservice*          uddi2__find_USCOREservice_,
+    // response parameters:
+    uddi2__serviceList*                 uddi2__serviceList_
+  );
+@endcode
+
+C++ proxy class (defined in soapInquireSoapProxy.h):
+  class InquireSoap;
+
+*/
+
+//gsoap inq2 service method-style:	find_USCOREservice document
+//gsoap inq2 service method-encoding:	find_USCOREservice literal
+//gsoap inq2 service method-action:	find_USCOREservice find_service
+//gsoap inq2 service method-fault:	find_USCOREservice _dispositionReport
+int __inq2__find_USCOREservice(
+    uddi2__find_USCOREservice*          uddi2__find_USCOREservice_,
+    uddi2__serviceList*                 uddi2__serviceList_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __inq2__find_USCOREtModel                                                  *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__inq2__find_USCOREtModel" of service binding "InquireSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="find_tModel"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___inq2__find_USCOREtModel(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__find_USCOREtModel*           uddi2__find_USCOREtModel_,
+    // response parameters:
+    uddi2__tModelList*                  uddi2__tModelList_
+  );
+@endcode
+
+C++ proxy class (defined in soapInquireSoapProxy.h):
+  class InquireSoap;
+
+*/
+
+//gsoap inq2 service method-style:	find_USCOREtModel document
+//gsoap inq2 service method-encoding:	find_USCOREtModel literal
+//gsoap inq2 service method-action:	find_USCOREtModel find_tModel
+//gsoap inq2 service method-fault:	find_USCOREtModel _dispositionReport
+int __inq2__find_USCOREtModel(
+    uddi2__find_USCOREtModel*           uddi2__find_USCOREtModel_,
+    uddi2__tModelList*                  uddi2__tModelList_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __inq2__get_USCOREbindingDetail                                            *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__inq2__get_USCOREbindingDetail" of service binding "InquireSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="get_bindingDetail"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___inq2__get_USCOREbindingDetail(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__get_USCOREbindingDetail*     uddi2__get_USCOREbindingDetail_,
+    // response parameters:
+    uddi2__bindingDetail*               uddi2__bindingDetail_
+  );
+@endcode
+
+C++ proxy class (defined in soapInquireSoapProxy.h):
+  class InquireSoap;
+
+*/
+
+//gsoap inq2 service method-style:	get_USCOREbindingDetail document
+//gsoap inq2 service method-encoding:	get_USCOREbindingDetail literal
+//gsoap inq2 service method-action:	get_USCOREbindingDetail get_bindingDetail
+//gsoap inq2 service method-fault:	get_USCOREbindingDetail _dispositionReport
+int __inq2__get_USCOREbindingDetail(
+    uddi2__get_USCOREbindingDetail*     uddi2__get_USCOREbindingDetail_,
+    uddi2__bindingDetail*               uddi2__bindingDetail_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __inq2__get_USCOREbusinessDetail                                           *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__inq2__get_USCOREbusinessDetail" of service binding "InquireSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="get_businessDetail"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___inq2__get_USCOREbusinessDetail(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__get_USCOREbusinessDetail*    uddi2__get_USCOREbusinessDetail_,
+    // response parameters:
+    uddi2__businessDetail*              uddi2__businessDetail_
+  );
+@endcode
+
+C++ proxy class (defined in soapInquireSoapProxy.h):
+  class InquireSoap;
+
+*/
+
+//gsoap inq2 service method-style:	get_USCOREbusinessDetail document
+//gsoap inq2 service method-encoding:	get_USCOREbusinessDetail literal
+//gsoap inq2 service method-action:	get_USCOREbusinessDetail get_businessDetail
+//gsoap inq2 service method-fault:	get_USCOREbusinessDetail _dispositionReport
+int __inq2__get_USCOREbusinessDetail(
+    uddi2__get_USCOREbusinessDetail*    uddi2__get_USCOREbusinessDetail_,
+    uddi2__businessDetail*              uddi2__businessDetail_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __inq2__get_USCOREbusinessDetailExt                                        *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__inq2__get_USCOREbusinessDetailExt" of service binding "InquireSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="get_businessDetailExt"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___inq2__get_USCOREbusinessDetailExt(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__get_USCOREbusinessDetailExt* uddi2__get_USCOREbusinessDetailExt_,
+    // response parameters:
+    uddi2__businessDetailExt*           uddi2__businessDetailExt_
+  );
+@endcode
+
+C++ proxy class (defined in soapInquireSoapProxy.h):
+  class InquireSoap;
+
+*/
+
+//gsoap inq2 service method-style:	get_USCOREbusinessDetailExt document
+//gsoap inq2 service method-encoding:	get_USCOREbusinessDetailExt literal
+//gsoap inq2 service method-action:	get_USCOREbusinessDetailExt get_businessDetailExt
+//gsoap inq2 service method-fault:	get_USCOREbusinessDetailExt _dispositionReport
+int __inq2__get_USCOREbusinessDetailExt(
+    uddi2__get_USCOREbusinessDetailExt* uddi2__get_USCOREbusinessDetailExt_,
+    uddi2__businessDetailExt*           uddi2__businessDetailExt_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __inq2__get_USCOREserviceDetail                                            *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__inq2__get_USCOREserviceDetail" of service binding "InquireSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="get_serviceDetail"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___inq2__get_USCOREserviceDetail(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__get_USCOREserviceDetail*     uddi2__get_USCOREserviceDetail_,
+    // response parameters:
+    uddi2__serviceDetail*               uddi2__serviceDetail_
+  );
+@endcode
+
+C++ proxy class (defined in soapInquireSoapProxy.h):
+  class InquireSoap;
+
+*/
+
+//gsoap inq2 service method-style:	get_USCOREserviceDetail document
+//gsoap inq2 service method-encoding:	get_USCOREserviceDetail literal
+//gsoap inq2 service method-action:	get_USCOREserviceDetail get_serviceDetail
+//gsoap inq2 service method-fault:	get_USCOREserviceDetail _dispositionReport
+int __inq2__get_USCOREserviceDetail(
+    uddi2__get_USCOREserviceDetail*     uddi2__get_USCOREserviceDetail_,
+    uddi2__serviceDetail*               uddi2__serviceDetail_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __inq2__get_USCOREtModelDetail                                             *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__inq2__get_USCOREtModelDetail" of service binding "InquireSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="get_tModelDetail"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___inq2__get_USCOREtModelDetail(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__get_USCOREtModelDetail*      uddi2__get_USCOREtModelDetail_,
+    // response parameters:
+    uddi2__tModelDetail*                uddi2__tModelDetail_
+  );
+@endcode
+
+C++ proxy class (defined in soapInquireSoapProxy.h):
+  class InquireSoap;
+
+*/
+
+//gsoap inq2 service method-style:	get_USCOREtModelDetail document
+//gsoap inq2 service method-encoding:	get_USCOREtModelDetail literal
+//gsoap inq2 service method-action:	get_USCOREtModelDetail get_tModelDetail
+//gsoap inq2 service method-fault:	get_USCOREtModelDetail _dispositionReport
+int __inq2__get_USCOREtModelDetail(
+    uddi2__get_USCOREtModelDetail*      uddi2__get_USCOREtModelDetail_,
+    uddi2__tModelDetail*                uddi2__tModelDetail_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * PublishSoap                                                                *
+ *                                                                            *
+\******************************************************************************/
+
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__add_USCOREpublisherAssertions                                      *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__add_USCOREpublisherAssertions" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="add_publisherAssertions"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__add_USCOREpublisherAssertions(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__add_USCOREpublisherAssertions* uddi2__add_USCOREpublisherAssertions_,
+    // response parameters:
+    uddi2__dispositionReport*           uddi2__dispositionReport_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	add_USCOREpublisherAssertions document
+//gsoap pub2 service method-encoding:	add_USCOREpublisherAssertions literal
+//gsoap pub2 service method-action:	add_USCOREpublisherAssertions add_publisherAssertions
+//gsoap pub2 service method-fault:	add_USCOREpublisherAssertions _dispositionReport
+int __pub2__add_USCOREpublisherAssertions(
+    uddi2__add_USCOREpublisherAssertions* uddi2__add_USCOREpublisherAssertions_,
+    uddi2__dispositionReport*           uddi2__dispositionReport_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__delete_USCOREbinding                                               *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__delete_USCOREbinding" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="delete_binding"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__delete_USCOREbinding(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__delete_USCOREbinding*        uddi2__delete_USCOREbinding_,
+    // response parameters:
+    uddi2__dispositionReport*           uddi2__dispositionReport_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	delete_USCOREbinding document
+//gsoap pub2 service method-encoding:	delete_USCOREbinding literal
+//gsoap pub2 service method-action:	delete_USCOREbinding delete_binding
+//gsoap pub2 service method-fault:	delete_USCOREbinding _dispositionReport
+int __pub2__delete_USCOREbinding(
+    uddi2__delete_USCOREbinding*        uddi2__delete_USCOREbinding_,
+    uddi2__dispositionReport*           uddi2__dispositionReport_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__delete_USCOREbusiness                                              *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__delete_USCOREbusiness" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="delete_business"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__delete_USCOREbusiness(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__delete_USCOREbusiness*       uddi2__delete_USCOREbusiness_,
+    // response parameters:
+    uddi2__dispositionReport*           uddi2__dispositionReport_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	delete_USCOREbusiness document
+//gsoap pub2 service method-encoding:	delete_USCOREbusiness literal
+//gsoap pub2 service method-action:	delete_USCOREbusiness delete_business
+//gsoap pub2 service method-fault:	delete_USCOREbusiness _dispositionReport
+int __pub2__delete_USCOREbusiness(
+    uddi2__delete_USCOREbusiness*       uddi2__delete_USCOREbusiness_,
+    uddi2__dispositionReport*           uddi2__dispositionReport_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__delete_USCOREpublisherAssertions                                   *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__delete_USCOREpublisherAssertions" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="delete_publisherAssertions"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__delete_USCOREpublisherAssertions(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__delete_USCOREpublisherAssertions* uddi2__delete_USCOREpublisherAssertions_,
+    // response parameters:
+    uddi2__dispositionReport*           uddi2__dispositionReport_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	delete_USCOREpublisherAssertions document
+//gsoap pub2 service method-encoding:	delete_USCOREpublisherAssertions literal
+//gsoap pub2 service method-action:	delete_USCOREpublisherAssertions delete_publisherAssertions
+//gsoap pub2 service method-fault:	delete_USCOREpublisherAssertions _dispositionReport
+int __pub2__delete_USCOREpublisherAssertions(
+    uddi2__delete_USCOREpublisherAssertions* uddi2__delete_USCOREpublisherAssertions_,
+    uddi2__dispositionReport*           uddi2__dispositionReport_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__delete_USCOREservice                                               *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__delete_USCOREservice" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="delete_service"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__delete_USCOREservice(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__delete_USCOREservice*        uddi2__delete_USCOREservice_,
+    // response parameters:
+    uddi2__dispositionReport*           uddi2__dispositionReport_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	delete_USCOREservice document
+//gsoap pub2 service method-encoding:	delete_USCOREservice literal
+//gsoap pub2 service method-action:	delete_USCOREservice delete_service
+//gsoap pub2 service method-fault:	delete_USCOREservice _dispositionReport
+int __pub2__delete_USCOREservice(
+    uddi2__delete_USCOREservice*        uddi2__delete_USCOREservice_,
+    uddi2__dispositionReport*           uddi2__dispositionReport_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__delete_USCOREtModel                                                *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__delete_USCOREtModel" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="delete_tModel"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__delete_USCOREtModel(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__delete_USCOREtModel*         uddi2__delete_USCOREtModel_,
+    // response parameters:
+    uddi2__dispositionReport*           uddi2__dispositionReport_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	delete_USCOREtModel document
+//gsoap pub2 service method-encoding:	delete_USCOREtModel literal
+//gsoap pub2 service method-action:	delete_USCOREtModel delete_tModel
+//gsoap pub2 service method-fault:	delete_USCOREtModel _dispositionReport
+int __pub2__delete_USCOREtModel(
+    uddi2__delete_USCOREtModel*         uddi2__delete_USCOREtModel_,
+    uddi2__dispositionReport*           uddi2__dispositionReport_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__discard_USCOREauthToken                                            *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__discard_USCOREauthToken" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="discard_authToken"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__discard_USCOREauthToken(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__discard_USCOREauthToken*     uddi2__discard_USCOREauthToken_,
+    // response parameters:
+    uddi2__dispositionReport*           uddi2__dispositionReport_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	discard_USCOREauthToken document
+//gsoap pub2 service method-encoding:	discard_USCOREauthToken literal
+//gsoap pub2 service method-action:	discard_USCOREauthToken discard_authToken
+//gsoap pub2 service method-fault:	discard_USCOREauthToken _dispositionReport
+int __pub2__discard_USCOREauthToken(
+    uddi2__discard_USCOREauthToken*     uddi2__discard_USCOREauthToken_,
+    uddi2__dispositionReport*           uddi2__dispositionReport_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__get_USCOREassertionStatusReport                                    *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__get_USCOREassertionStatusReport" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="get_assertionStatusReport"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__get_USCOREassertionStatusReport(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__get_USCOREassertionStatusReport* uddi2__get_USCOREassertionStatusReport_,
+    // response parameters:
+    uddi2__assertionStatusReport*       uddi2__assertionStatusReport_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	get_USCOREassertionStatusReport document
+//gsoap pub2 service method-encoding:	get_USCOREassertionStatusReport literal
+//gsoap pub2 service method-action:	get_USCOREassertionStatusReport get_assertionStatusReport
+//gsoap pub2 service method-fault:	get_USCOREassertionStatusReport _dispositionReport
+int __pub2__get_USCOREassertionStatusReport(
+    uddi2__get_USCOREassertionStatusReport* uddi2__get_USCOREassertionStatusReport_,
+    uddi2__assertionStatusReport*       uddi2__assertionStatusReport_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__get_USCOREauthToken                                                *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__get_USCOREauthToken" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="get_authToken"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__get_USCOREauthToken(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__get_USCOREauthToken*         uddi2__get_USCOREauthToken_,
+    // response parameters:
+    uddi2__authToken*                   uddi2__authToken_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	get_USCOREauthToken document
+//gsoap pub2 service method-encoding:	get_USCOREauthToken literal
+//gsoap pub2 service method-action:	get_USCOREauthToken get_authToken
+//gsoap pub2 service method-fault:	get_USCOREauthToken _dispositionReport
+int __pub2__get_USCOREauthToken(
+    uddi2__get_USCOREauthToken*         uddi2__get_USCOREauthToken_,
+    uddi2__authToken*                   uddi2__authToken_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__get_USCOREpublisherAssertions                                      *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__get_USCOREpublisherAssertions" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="get_publisherAssertions"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__get_USCOREpublisherAssertions(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__get_USCOREpublisherAssertions* uddi2__get_USCOREpublisherAssertions_,
+    // response parameters:
+    uddi2__publisherAssertions*         uddi2__publisherAssertions_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	get_USCOREpublisherAssertions document
+//gsoap pub2 service method-encoding:	get_USCOREpublisherAssertions literal
+//gsoap pub2 service method-action:	get_USCOREpublisherAssertions get_publisherAssertions
+//gsoap pub2 service method-fault:	get_USCOREpublisherAssertions _dispositionReport
+int __pub2__get_USCOREpublisherAssertions(
+    uddi2__get_USCOREpublisherAssertions* uddi2__get_USCOREpublisherAssertions_,
+    uddi2__publisherAssertions*         uddi2__publisherAssertions_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__get_USCOREregisteredInfo                                           *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__get_USCOREregisteredInfo" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="get_registeredInfo"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__get_USCOREregisteredInfo(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__get_USCOREregisteredInfo*    uddi2__get_USCOREregisteredInfo_,
+    // response parameters:
+    uddi2__registeredInfo*              uddi2__registeredInfo_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	get_USCOREregisteredInfo document
+//gsoap pub2 service method-encoding:	get_USCOREregisteredInfo literal
+//gsoap pub2 service method-action:	get_USCOREregisteredInfo get_registeredInfo
+//gsoap pub2 service method-fault:	get_USCOREregisteredInfo _dispositionReport
+int __pub2__get_USCOREregisteredInfo(
+    uddi2__get_USCOREregisteredInfo*    uddi2__get_USCOREregisteredInfo_,
+    uddi2__registeredInfo*              uddi2__registeredInfo_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__save_USCOREbinding                                                 *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__save_USCOREbinding" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="save_binding"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__save_USCOREbinding(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__save_USCOREbinding*          uddi2__save_USCOREbinding_,
+    // response parameters:
+    uddi2__bindingDetail*               uddi2__bindingDetail_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	save_USCOREbinding document
+//gsoap pub2 service method-encoding:	save_USCOREbinding literal
+//gsoap pub2 service method-action:	save_USCOREbinding save_binding
+//gsoap pub2 service method-fault:	save_USCOREbinding _dispositionReport
+int __pub2__save_USCOREbinding(
+    uddi2__save_USCOREbinding*          uddi2__save_USCOREbinding_,
+    uddi2__bindingDetail*               uddi2__bindingDetail_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__save_USCOREbusiness                                                *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__save_USCOREbusiness" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="save_business"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__save_USCOREbusiness(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__save_USCOREbusiness*         uddi2__save_USCOREbusiness_,
+    // response parameters:
+    uddi2__businessDetail*              uddi2__businessDetail_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	save_USCOREbusiness document
+//gsoap pub2 service method-encoding:	save_USCOREbusiness literal
+//gsoap pub2 service method-action:	save_USCOREbusiness save_business
+//gsoap pub2 service method-fault:	save_USCOREbusiness _dispositionReport
+int __pub2__save_USCOREbusiness(
+    uddi2__save_USCOREbusiness*         uddi2__save_USCOREbusiness_,
+    uddi2__businessDetail*              uddi2__businessDetail_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__save_USCOREservice                                                 *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__save_USCOREservice" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="save_service"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__save_USCOREservice(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__save_USCOREservice*          uddi2__save_USCOREservice_,
+    // response parameters:
+    uddi2__serviceDetail*               uddi2__serviceDetail_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	save_USCOREservice document
+//gsoap pub2 service method-encoding:	save_USCOREservice literal
+//gsoap pub2 service method-action:	save_USCOREservice save_service
+//gsoap pub2 service method-fault:	save_USCOREservice _dispositionReport
+int __pub2__save_USCOREservice(
+    uddi2__save_USCOREservice*          uddi2__save_USCOREservice_,
+    uddi2__serviceDetail*               uddi2__serviceDetail_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__save_USCOREtModel                                                  *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__save_USCOREtModel" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="save_tModel"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__save_USCOREtModel(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__save_USCOREtModel*           uddi2__save_USCOREtModel_,
+    // response parameters:
+    uddi2__tModelDetail*                uddi2__tModelDetail_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	save_USCOREtModel document
+//gsoap pub2 service method-encoding:	save_USCOREtModel literal
+//gsoap pub2 service method-action:	save_USCOREtModel save_tModel
+//gsoap pub2 service method-fault:	save_USCOREtModel _dispositionReport
+int __pub2__save_USCOREtModel(
+    uddi2__save_USCOREtModel*           uddi2__save_USCOREtModel_,
+    uddi2__tModelDetail*                uddi2__tModelDetail_ ///< response parameter
+);
+
+/******************************************************************************\
+ *                                                                            *
+ * __pub2__set_USCOREpublisherAssertions                                      *
+ *                                                                            *
+\******************************************************************************/
+
+
+/// Operation "__pub2__set_USCOREpublisherAssertions" of service binding "PublishSoap"
+
+/**
+
+Operation details:
+
+  - SOAP document/literal style
+  - SOAP action="set_publisherAssertions"
+  - SOAP Fault: _dispositionReport
+
+C stub function (defined in soapClient.c[pp]):
+@code
+  int soap_call___pub2__set_USCOREpublisherAssertions(struct soap *soap,
+    NULL, // char *endpoint = NULL selects default endpoint for this operation
+    NULL, // char *action = NULL selects default action for this operation
+    // request parameters:
+    uddi2__set_USCOREpublisherAssertions* uddi2__set_USCOREpublisherAssertions_,
+    // response parameters:
+    uddi2__publisherAssertions*         uddi2__publisherAssertions_
+  );
+@endcode
+
+C++ proxy class (defined in soapPublishSoapProxy.h):
+  class PublishSoap;
+
+*/
+
+//gsoap pub2 service method-style:	set_USCOREpublisherAssertions document
+//gsoap pub2 service method-encoding:	set_USCOREpublisherAssertions literal
+//gsoap pub2 service method-action:	set_USCOREpublisherAssertions set_publisherAssertions
+//gsoap pub2 service method-fault:	set_USCOREpublisherAssertions _dispositionReport
+int __pub2__set_USCOREpublisherAssertions(
+    uddi2__set_USCOREpublisherAssertions* uddi2__set_USCOREpublisherAssertions_,
+    uddi2__publisherAssertions*         uddi2__publisherAssertions_ ///< response parameter
+);
+
+/* End of uddi_v2.h */
diff --git a/uddi2/uddi_v2.xsd b/uddi2/uddi_v2.xsd
new file mode 100644
index 0000000..06622f4
--- /dev/null
+++ b/uddi2/uddi_v2.xsd
@@ -0,0 +1,752 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema targetNamespace="urn:uddi-org:api_v2" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:uddi="urn:uddi-org:api_v2" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.03" id="uddi">
+	<!-- 
+    Copyright (c) 2000 - 2002 by Accenture, Ariba, Inc., Commerce One, Inc. 
+    Fujitsu Limited, Hewlett-Packard Company, i2 Technologies, Inc., 
+    Intel Corporation, International Business Machines Corporation,  
+    Microsoft Corporation, Oracle Corporation, SAP AG, Sun Microsystems, Inc., 
+    and VeriSign, Inc.  All Rights Reserved.
+    
+    Copyright (c) OASIS Open 2002. All Rights Reserved.
+     -->
+	<xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+	<!-- Attribute type definitions -->
+	<xsd:simpleType name="bindingKey">
+		<xsd:restriction base="string"/>
+	</xsd:simpleType>
+	<xsd:simpleType name="businessKey">
+		<xsd:restriction base="string"/>
+	</xsd:simpleType>
+	<xsd:simpleType name="serviceKey">
+		<xsd:restriction base="string"/>
+	</xsd:simpleType>
+	<xsd:simpleType name="tModelKey">
+		<xsd:restriction base="string"/>
+	</xsd:simpleType>
+	<xsd:simpleType name="direction">
+		<xsd:restriction base="NMTOKEN">
+			<xsd:enumeration value="fromKey"/>
+			<xsd:enumeration value="toKey"/>
+		</xsd:restriction>
+	</xsd:simpleType>
+	<xsd:simpleType name="truncated">
+		<xsd:restriction base="NMTOKEN">
+			<xsd:enumeration value="true"/>
+			<xsd:enumeration value="false"/>
+		</xsd:restriction>
+	</xsd:simpleType>
+	<xsd:simpleType name="URLType">
+		<xsd:restriction base="NMTOKEN">
+			<xsd:enumeration value="mailto"/>
+			<xsd:enumeration value="http"/>
+			<xsd:enumeration value="https"/>
+			<xsd:enumeration value="ftp"/>
+			<xsd:enumeration value="fax"/>
+			<xsd:enumeration value="phone"/>
+			<xsd:enumeration value="other"/>
+		</xsd:restriction>
+	</xsd:simpleType>
+	<xsd:simpleType name="keyType">
+		<xsd:restriction base="NMTOKEN">
+			<xsd:enumeration value="businessKey"/>
+			<xsd:enumeration value="tModelKey"/>
+			<xsd:enumeration value="serviceKey"/>
+			<xsd:enumeration value="bindingKey"/>
+		</xsd:restriction>
+	</xsd:simpleType>
+	<!-- Type and element definitions for registry content -->
+	<xsd:element name="accessPoint" type="uddi:accessPoint"/>
+	<xsd:complexType name="accessPoint">
+		<xsd:simpleContent>
+			<xsd:extension base="string">
+				<xsd:attribute name="URLType" type="uddi:URLType" use="required"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<xsd:element name="address" type="uddi:address"/>
+	<xsd:complexType name="address">
+		<xsd:sequence>
+			<xsd:element ref="uddi:addressLine" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="useType" type="string" use="optional"/>
+		<xsd:attribute name="sortCode" type="string" use="optional"/>
+		<xsd:attribute name="tModelKey" type="uddi:tModelKey" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="addressLine" type="uddi:addressLine"/>
+	<xsd:complexType name="addressLine">
+		<xsd:simpleContent>
+			<xsd:extension base="string">
+				<xsd:attribute name="keyName" type="string" use="optional"/>
+				<xsd:attribute name="keyValue" type="string" use="optional"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<xsd:element name="assertionStatusItem" type="uddi:assertionStatusItem"/>
+	<xsd:complexType name="assertionStatusItem">
+		<xsd:sequence>
+			<xsd:element ref="uddi:fromKey"/>
+			<xsd:element ref="uddi:toKey"/>
+			<xsd:element ref="uddi:keyedReference"/>
+			<xsd:element ref="uddi:keysOwned"/>
+		</xsd:sequence>
+		<xsd:attribute name="completionStatus" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="authInfo" type="string"/>
+	<xsd:element name="bindingKey" type="uddi:bindingKey"/>
+	<xsd:element name="bindingTemplate" type="uddi:bindingTemplate"/>
+	<xsd:complexType name="bindingTemplate">
+		<xsd:sequence>
+			<xsd:element ref="uddi:description" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:choice>
+				<xsd:element ref="uddi:accessPoint"/>
+				<xsd:element ref="uddi:hostingRedirector"/>
+			</xsd:choice>
+			<xsd:element ref="uddi:tModelInstanceDetails"/>
+		</xsd:sequence>
+		<xsd:attribute name="serviceKey" type="uddi:serviceKey" use="optional"/>
+		<xsd:attribute name="bindingKey" type="uddi:bindingKey" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="bindingTemplates" type="uddi:bindingTemplates"/>
+	<xsd:complexType name="bindingTemplates">
+		<xsd:sequence>
+			<xsd:element ref="uddi:bindingTemplate" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="businessEntity" type="uddi:businessEntity"/>
+	<xsd:complexType name="businessEntity">
+		<xsd:sequence>
+			<xsd:element ref="uddi:discoveryURLs" minOccurs="0"/>
+			<xsd:element ref="uddi:name" maxOccurs="unbounded"/>
+			<xsd:element ref="uddi:description" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="uddi:contacts" minOccurs="0"/>
+			<xsd:element ref="uddi:businessServices" minOccurs="0"/>
+			<xsd:element ref="uddi:identifierBag" minOccurs="0"/>
+			<xsd:element ref="uddi:categoryBag" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="businessKey" type="uddi:businessKey" use="required"/>
+		<xsd:attribute name="operator" type="string" use="optional"/>
+		<xsd:attribute name="authorizedName" type="string" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="businessEntityExt" type="uddi:businessEntityExt"/>
+	<xsd:complexType name="businessEntityExt">
+		<xsd:sequence>
+			<xsd:element ref="uddi:businessEntity"/>
+			<xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="businessInfo" type="uddi:businessInfo"/>
+	<xsd:complexType name="businessInfo">
+		<xsd:sequence>
+			<xsd:element ref="uddi:name" maxOccurs="unbounded"/>
+			<xsd:element ref="uddi:description" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="uddi:serviceInfos"/>
+		</xsd:sequence>
+		<xsd:attribute name="businessKey" type="uddi:businessKey" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="businessInfos" type="uddi:businessInfos"/>
+	<xsd:complexType name="businessInfos">
+		<xsd:sequence>
+			<xsd:element ref="uddi:businessInfo" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="businessKey" type="uddi:businessKey"/>
+	<xsd:element name="businessService" type="uddi:businessService"/>
+	<xsd:complexType name="businessService">
+		<xsd:sequence>
+			<xsd:element ref="uddi:name" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="uddi:description" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="uddi:bindingTemplates" minOccurs="0"/>
+			<xsd:element ref="uddi:categoryBag" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="serviceKey" type="uddi:serviceKey" use="required"/>
+		<xsd:attribute name="businessKey" type="uddi:businessKey" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="businessServices" type="uddi:businessServices"/>
+	<xsd:complexType name="businessServices">
+		<xsd:sequence>
+			<xsd:element ref="uddi:businessService" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="categoryBag" type="uddi:categoryBag"/>
+	<xsd:complexType name="categoryBag">
+		<xsd:sequence>
+			<xsd:element ref="uddi:keyedReference" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="completionStatus" type="string"/>
+	<xsd:element name="contact" type="uddi:contact"/>
+	<xsd:complexType name="contact">
+		<xsd:sequence>
+			<xsd:element ref="uddi:description" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="uddi:personName"/>
+			<xsd:element ref="uddi:phone" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="uddi:email" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="uddi:address" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="useType" type="string" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="contacts" type="uddi:contacts"/>
+	<xsd:complexType name="contacts">
+		<xsd:sequence>
+			<xsd:element ref="uddi:contact" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="description" type="uddi:description"/>
+	<xsd:complexType name="description">
+		<xsd:simpleContent>
+			<xsd:extension base="string">
+				<xsd:attribute ref="xml:lang"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<xsd:element name="discoveryURL" type="uddi:discoveryURL"/>
+	<xsd:complexType name="discoveryURL">
+		<xsd:simpleContent>
+			<xsd:extension base="string">
+				<xsd:attribute name="useType" type="string" use="required"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<xsd:element name="discoveryURLs" type="uddi:discoveryURLs"/>
+	<xsd:complexType name="discoveryURLs">
+		<xsd:sequence>
+			<xsd:element ref="uddi:discoveryURL" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="dispositionReport" type="uddi:dispositionReport"/>
+	<xsd:complexType name="dispositionReport">
+		<xsd:sequence>
+			<xsd:element ref="uddi:result" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+		<xsd:attribute name="operator" type="string" use="required"/>
+		<xsd:attribute name="truncated" type="uddi:truncated" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="email" type="uddi:email"/>
+	<xsd:complexType name="email">
+		<xsd:simpleContent>
+			<xsd:extension base="string">
+				<xsd:attribute name="useType" type="string" use="optional"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<xsd:element name="errInfo" type="uddi:errInfo"/>
+	<xsd:complexType name="errInfo">
+		<xsd:simpleContent>
+			<xsd:extension base="string">
+				<xsd:attribute name="errCode" type="string" use="required"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<xsd:element name="findQualifier" type="string"/>
+	<xsd:element name="findQualifiers" type="uddi:findQualifiers"/>
+	<xsd:complexType name="findQualifiers">
+		<xsd:sequence>
+			<xsd:element ref="uddi:findQualifier" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="fromKey" type="uddi:businessKey"/>
+	<xsd:element name="hostingRedirector" type="uddi:hostingRedirector"/>
+	<xsd:complexType name="hostingRedirector">
+		<xsd:attribute name="bindingKey" type="uddi:bindingKey" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="identifierBag" type="uddi:identifierBag"/>
+	<xsd:complexType name="identifierBag">
+		<xsd:sequence>
+			<xsd:element ref="uddi:keyedReference" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="instanceDetails" type="uddi:instanceDetails"/>
+	<xsd:complexType name="instanceDetails">
+		<xsd:sequence>
+			<xsd:element ref="uddi:description" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="uddi:overviewDoc" minOccurs="0"/>
+			<xsd:element ref="uddi:instanceParms" minOccurs="0"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="instanceParms" type="string"/>
+	<xsd:element name="keyedReference" type="uddi:keyedReference"/>
+	<xsd:complexType name="keyedReference">
+		<xsd:attribute name="tModelKey" type="uddi:tModelKey" use="optional"/>
+		<xsd:attribute name="keyName" type="string" use="optional"/>
+		<xsd:attribute name="keyValue" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="keysOwned" type="uddi:keysOwned"/>
+	<xsd:complexType name="keysOwned">
+		<xsd:sequence>
+			<xsd:element ref="uddi:fromKey" minOccurs="0"/>
+			<xsd:element ref="uddi:toKey" minOccurs="0"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="name" type="uddi:name"/>
+	<xsd:complexType name="name">
+		<xsd:simpleContent>
+			<xsd:extension base="string">
+				<xsd:attribute ref="xml:lang" use="optional"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<xsd:element name="overviewDoc" type="uddi:overviewDoc"/>
+	<xsd:complexType name="overviewDoc">
+		<xsd:sequence>
+			<xsd:element ref="uddi:description" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="uddi:overviewURL" minOccurs="0"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="overviewURL" type="string"/>
+	<xsd:element name="personName" type="string"/>
+	<xsd:element name="phone" type="uddi:phone"/>
+	<xsd:complexType name="phone">
+		<xsd:simpleContent>
+			<xsd:extension base="string">
+				<xsd:attribute name="useType" type="string" use="optional"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<xsd:element name="publisherAssertion" type="uddi:publisherAssertion"/>
+	<xsd:complexType name="publisherAssertion">
+		<xsd:sequence>
+			<xsd:element ref="uddi:fromKey"/>
+			<xsd:element ref="uddi:toKey"/>
+			<xsd:element ref="uddi:keyedReference"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="relatedBusinessInfo" type="uddi:relatedBusinessInfo"/>
+	<xsd:complexType name="relatedBusinessInfo">
+		<xsd:sequence>
+			<xsd:element ref="uddi:businessKey"/>
+			<xsd:element ref="uddi:name" maxOccurs="unbounded"/>
+			<xsd:element ref="uddi:description" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="uddi:sharedRelationships" maxOccurs="2"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="relatedBusinessInfos" type="uddi:relatedBusinessInfos"/>
+	<xsd:complexType name="relatedBusinessInfos">
+		<xsd:sequence>
+			<xsd:element ref="uddi:relatedBusinessInfo" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="result" type="uddi:result"/>
+	<xsd:complexType name="result">
+		<xsd:sequence>
+			<xsd:element ref="uddi:errInfo" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="keyType" type="uddi:keyType" use="optional"/>
+		<xsd:attribute name="errno" type="int" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="serviceInfo" type="uddi:serviceInfo"/>
+	<xsd:complexType name="serviceInfo">
+		<xsd:sequence>
+			<xsd:element ref="uddi:name" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="serviceKey" type="uddi:serviceKey" use="required"/>
+		<xsd:attribute name="businessKey" type="uddi:businessKey" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="serviceInfos" type="uddi:serviceInfos"/>
+	<xsd:complexType name="serviceInfos">
+		<xsd:sequence>
+			<xsd:element ref="uddi:serviceInfo" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="serviceKey" type="uddi:serviceKey"/>
+	<xsd:element name="sharedRelationships" type="uddi:sharedRelationships"/>
+	<xsd:complexType name="sharedRelationships">
+		<xsd:sequence>
+			<xsd:element ref="uddi:keyedReference" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="direction" type="uddi:direction" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="tModel" type="uddi:tModel"/>
+	<xsd:complexType name="tModel">
+		<xsd:sequence>
+			<xsd:element ref="uddi:name"/>
+			<xsd:element ref="uddi:description" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="uddi:overviewDoc" minOccurs="0"/>
+			<xsd:element ref="uddi:identifierBag" minOccurs="0"/>
+			<xsd:element ref="uddi:categoryBag" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="tModelKey" type="uddi:tModelKey" use="required"/>
+		<xsd:attribute name="operator" type="string" use="optional"/>
+		<xsd:attribute name="authorizedName" type="string" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="tModelBag" type="uddi:tModelBag"/>
+	<xsd:complexType name="tModelBag">
+		<xsd:sequence>
+			<xsd:element ref="uddi:tModelKey" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="tModelInfo" type="uddi:tModelInfo"/>
+	<xsd:complexType name="tModelInfo">
+		<xsd:sequence>
+			<xsd:element ref="uddi:name"/>
+		</xsd:sequence>
+		<xsd:attribute name="tModelKey" type="uddi:tModelKey" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="tModelInfos" type="uddi:tModelInfos"/>
+	<xsd:complexType name="tModelInfos">
+		<xsd:sequence>
+			<xsd:element ref="uddi:tModelInfo" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="tModelInstanceDetails" type="uddi:tModelInstanceDetails"/>
+	<xsd:complexType name="tModelInstanceDetails">
+		<xsd:sequence>
+			<xsd:element ref="uddi:tModelInstanceInfo" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="tModelInstanceInfo" type="uddi:tModelInstanceInfo"/>
+	<xsd:complexType name="tModelInstanceInfo">
+		<xsd:sequence>
+			<xsd:element ref="uddi:description" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="uddi:instanceDetails" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="tModelKey" type="uddi:tModelKey" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="tModelKey" type="uddi:tModelKey"/>
+	<xsd:element name="toKey" type="uddi:businessKey"/>
+	<xsd:element name="uploadRegister" type="string"/>
+	<!-- Type and element definitions for input messages -->
+	<xsd:element name="add_publisherAssertions" type="uddi:add_publisherAssertions"/>
+	<xsd:complexType name="add_publisherAssertions">
+		<xsd:sequence>
+			<xsd:element ref="uddi:authInfo"/>
+			<xsd:element ref="uddi:publisherAssertion" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="delete_binding" type="uddi:delete_binding"/>
+	<xsd:complexType name="delete_binding">
+		<xsd:sequence>
+			<xsd:element ref="uddi:authInfo"/>
+			<xsd:element ref="uddi:bindingKey" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="delete_business" type="uddi:delete_business"/>
+	<xsd:complexType name="delete_business">
+		<xsd:sequence>
+			<xsd:element ref="uddi:authInfo"/>
+			<xsd:element ref="uddi:businessKey" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="delete_publisherAssertions" type="uddi:delete_publisherAssertions"/>
+	<xsd:complexType name="delete_publisherAssertions">
+		<xsd:sequence>
+			<xsd:element ref="uddi:authInfo"/>
+			<xsd:element ref="uddi:publisherAssertion" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="delete_service" type="uddi:delete_service"/>
+	<xsd:complexType name="delete_service">
+		<xsd:sequence>
+			<xsd:element ref="uddi:authInfo"/>
+			<xsd:element ref="uddi:serviceKey" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="delete_tModel" type="uddi:delete_tModel"/>
+	<xsd:complexType name="delete_tModel">
+		<xsd:sequence>
+			<xsd:element ref="uddi:authInfo"/>
+			<xsd:element ref="uddi:tModelKey" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="discard_authToken" type="uddi:discard_authToken"/>
+	<xsd:complexType name="discard_authToken">
+		<xsd:sequence>
+			<xsd:element ref="uddi:authInfo"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="find_binding" type="uddi:find_binding"/>
+	<xsd:complexType name="find_binding">
+		<xsd:sequence>
+			<xsd:element ref="uddi:findQualifiers" minOccurs="0"/>
+			<xsd:element ref="uddi:tModelBag"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+		<xsd:attribute name="maxRows" type="int" use="optional"/>
+		<xsd:attribute name="serviceKey" type="uddi:serviceKey" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="find_business" type="uddi:find_business"/>
+	<xsd:complexType name="find_business">
+		<xsd:sequence>
+			<xsd:element ref="uddi:findQualifiers" minOccurs="0"/>
+			<xsd:element ref="uddi:name" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="uddi:identifierBag" minOccurs="0"/>
+			<xsd:element ref="uddi:categoryBag" minOccurs="0"/>
+			<xsd:element ref="uddi:tModelBag" minOccurs="0"/>
+			<xsd:element ref="uddi:discoveryURLs" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+		<xsd:attribute name="maxRows" type="int" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="find_relatedBusinesses" type="uddi:find_relatedBusinesses"/>
+	<xsd:complexType name="find_relatedBusinesses">
+		<xsd:sequence>
+			<xsd:element ref="uddi:findQualifiers" minOccurs="0"/>
+			<xsd:element ref="uddi:businessKey"/>
+			<xsd:element ref="uddi:keyedReference" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+		<xsd:attribute name="maxRows" type="int" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="find_service" type="uddi:find_service"/>
+	<xsd:complexType name="find_service">
+		<xsd:sequence>
+			<xsd:element ref="uddi:findQualifiers" minOccurs="0"/>
+			<xsd:element ref="uddi:name" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="uddi:categoryBag" minOccurs="0"/>
+			<xsd:element ref="uddi:tModelBag" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+		<xsd:attribute name="maxRows" type="int" use="optional"/>
+		<xsd:attribute name="businessKey" type="uddi:businessKey" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="find_tModel" type="uddi:find_tModel"/>
+	<xsd:complexType name="find_tModel">
+		<xsd:sequence>
+			<xsd:element ref="uddi:findQualifiers" minOccurs="0"/>
+			<xsd:element ref="uddi:name" minOccurs="0"/>
+			<xsd:element ref="uddi:identifierBag" minOccurs="0"/>
+			<xsd:element ref="uddi:categoryBag" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+		<xsd:attribute name="maxRows" type="int" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="get_assertionStatusReport" type="uddi:get_assertionStatusReport"/>
+	<xsd:complexType name="get_assertionStatusReport">
+		<xsd:sequence>
+			<xsd:element ref="uddi:authInfo"/>
+			<xsd:element ref="uddi:completionStatus" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="get_authToken" type="uddi:get_authToken"/>
+	<xsd:complexType name="get_authToken">
+		<xsd:attribute name="generic" type="string" use="required"/>
+		<xsd:attribute name="userID" type="string" use="required"/>
+		<xsd:attribute name="cred" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="get_bindingDetail" type="uddi:get_bindingDetail"/>
+	<xsd:complexType name="get_bindingDetail">
+		<xsd:sequence>
+			<xsd:element ref="uddi:bindingKey" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="get_businessDetail" type="uddi:get_businessDetail"/>
+	<xsd:complexType name="get_businessDetail">
+		<xsd:sequence>
+			<xsd:element ref="uddi:businessKey" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="get_businessDetailExt" type="uddi:get_businessDetailExt"/>
+	<xsd:complexType name="get_businessDetailExt">
+		<xsd:sequence>
+			<xsd:element ref="uddi:businessKey" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="get_publisherAssertions" type="uddi:get_publisherAssertions"/>
+	<xsd:complexType name="get_publisherAssertions">
+		<xsd:sequence>
+			<xsd:element ref="uddi:authInfo"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="get_registeredInfo" type="uddi:get_registeredInfo"/>
+	<xsd:complexType name="get_registeredInfo">
+		<xsd:sequence>
+			<xsd:element ref="uddi:authInfo"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="get_serviceDetail" type="uddi:get_serviceDetail"/>
+	<xsd:complexType name="get_serviceDetail">
+		<xsd:sequence>
+			<xsd:element ref="uddi:serviceKey" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="get_tModelDetail" type="uddi:get_tModelDetail"/>
+	<xsd:complexType name="get_tModelDetail">
+		<xsd:sequence>
+			<xsd:element ref="uddi:tModelKey" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="save_binding" type="uddi:save_binding"/>
+	<xsd:complexType name="save_binding">
+		<xsd:sequence>
+			<xsd:element ref="uddi:authInfo"/>
+			<xsd:element ref="uddi:bindingTemplate" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="save_business" type="uddi:save_business"/>
+	<xsd:complexType name="save_business">
+		<xsd:sequence>
+			<xsd:element ref="uddi:authInfo"/>
+			<xsd:element ref="uddi:businessEntity" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="uddi:uploadRegister" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="save_service" type="uddi:save_service"/>
+	<xsd:complexType name="save_service">
+		<xsd:sequence>
+			<xsd:element ref="uddi:authInfo"/>
+			<xsd:element ref="uddi:businessService" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="save_tModel" type="uddi:save_tModel"/>
+	<xsd:complexType name="save_tModel">
+		<xsd:sequence>
+			<xsd:element ref="uddi:authInfo"/>
+			<xsd:element ref="uddi:tModel" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="uddi:uploadRegister" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="set_publisherAssertions" type="uddi:set_publisherAssertions"/>
+	<xsd:complexType name="set_publisherAssertions">
+		<xsd:sequence>
+			<xsd:element ref="uddi:authInfo"/>
+			<xsd:element ref="uddi:publisherAssertion" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="validate_values" type="uddi:validate_values"/>
+	<xsd:complexType name="validate_values">
+		<xsd:choice>
+			<xsd:element ref="uddi:businessEntity" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="uddi:businessService" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="uddi:tModel" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:choice>
+		<xsd:attribute name="generic" type="string" use="required"/>
+	</xsd:complexType>
+	<!-- Type and element definitions for response messages -->
+	<xsd:element name="assertionStatusReport" type="uddi:assertionStatusReport"/>
+	<xsd:complexType name="assertionStatusReport">
+		<xsd:sequence>
+			<xsd:element ref="uddi:assertionStatusItem" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+		<xsd:attribute name="operator" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="authToken" type="uddi:authToken"/>
+	<xsd:complexType name="authToken">
+		<xsd:sequence>
+			<xsd:element ref="uddi:authInfo"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+		<xsd:attribute name="operator" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="bindingDetail" type="uddi:bindingDetail"/>
+	<xsd:complexType name="bindingDetail">
+		<xsd:sequence>
+			<xsd:element ref="uddi:bindingTemplate" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+		<xsd:attribute name="operator" type="string" use="required"/>
+		<xsd:attribute name="truncated" type="uddi:truncated" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="businessDetail" type="uddi:businessDetail"/>
+	<xsd:complexType name="businessDetail">
+		<xsd:sequence>
+			<xsd:element ref="uddi:businessEntity" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+		<xsd:attribute name="operator" type="string" use="required"/>
+		<xsd:attribute name="truncated" type="uddi:truncated" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="businessDetailExt" type="uddi:businessDetailExt"/>
+	<xsd:complexType name="businessDetailExt">
+		<xsd:sequence>
+			<xsd:element ref="uddi:businessEntityExt" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+		<xsd:attribute name="operator" type="string" use="required"/>
+		<xsd:attribute name="truncated" type="uddi:truncated" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="businessList" type="uddi:businessList"/>
+	<xsd:complexType name="businessList">
+		<xsd:sequence>
+			<xsd:element ref="uddi:businessInfos"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+		<xsd:attribute name="operator" type="string" use="required"/>
+		<xsd:attribute name="truncated" type="uddi:truncated" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="publisherAssertions" type="uddi:publisherAssertions"/>
+	<xsd:complexType name="publisherAssertions">
+		<xsd:sequence>
+			<xsd:element ref="uddi:publisherAssertion" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+		<xsd:attribute name="operator" type="string" use="required"/>
+		<xsd:attribute name="authorizedName" type="string" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="registeredInfo" type="uddi:registeredInfo"/>
+	<xsd:complexType name="registeredInfo">
+		<xsd:sequence>
+			<xsd:element ref="uddi:businessInfos"/>
+			<xsd:element ref="uddi:tModelInfos"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+		<xsd:attribute name="operator" type="string" use="required"/>
+		<xsd:attribute name="truncated" type="uddi:truncated" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="relatedBusinessesList" type="uddi:relatedBusinessesList"/>
+	<xsd:complexType name="relatedBusinessesList">
+		<xsd:sequence>
+			<xsd:element ref="uddi:businessKey"/>
+			<xsd:element ref="uddi:relatedBusinessInfos"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+		<xsd:attribute name="operator" type="string" use="required"/>
+		<xsd:attribute name="truncated" type="uddi:truncated" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="serviceDetail" type="uddi:serviceDetail"/>
+	<xsd:complexType name="serviceDetail">
+		<xsd:sequence>
+			<xsd:element ref="uddi:businessService" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+		<xsd:attribute name="operator" type="string" use="required"/>
+		<xsd:attribute name="truncated" type="uddi:truncated" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="serviceList" type="uddi:serviceList"/>
+	<xsd:complexType name="serviceList">
+		<xsd:sequence>
+			<xsd:element ref="uddi:serviceInfos"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+		<xsd:attribute name="operator" type="string" use="required"/>
+		<xsd:attribute name="truncated" type="uddi:truncated" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="tModelDetail" type="uddi:tModelDetail"/>
+	<xsd:complexType name="tModelDetail">
+		<xsd:sequence>
+			<xsd:element ref="uddi:tModel" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+		<xsd:attribute name="operator" type="string" use="required"/>
+		<xsd:attribute name="truncated" type="uddi:truncated" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="tModelList" type="uddi:tModelList"/>
+	<xsd:complexType name="tModelList">
+		<xsd:sequence>
+			<xsd:element ref="uddi:tModelInfos"/>
+		</xsd:sequence>
+		<xsd:attribute name="generic" type="string" use="required"/>
+		<xsd:attribute name="operator" type="string" use="required"/>
+		<xsd:attribute name="truncated" type="uddi:truncated" use="optional"/>
+	</xsd:complexType>
+</xsd:schema>
diff --git a/wsdl/Makefile b/wsdl/Makefile
new file mode 100644
index 0000000..2aead93
--- /dev/null
+++ b/wsdl/Makefile
@@ -0,0 +1,42 @@
+GSOAP=../soapcpp2
+SOAPH=../stdsoap2.h
+SOAPC=../stdsoap2.c
+SOAPCPP=../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=/usr/lib/libl.a -lm
+COFLAGS=-O1
+#COFLAGS=-DDEBUG -g
+CWFLAGS=-Wall
+CIFLAGS=-I..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+wsdl2h:		wsdlC.o wsdl.o schema.o soap.o mime.o types.o service.o wsdl2h.cpp $(SOAPCPP)
+		$(CPP) $(CFLAGS) -o wsdl2h wsdl2h.cpp wsdlC.o wsdl.o schema.o soap.o mime.o types.o service.o $(SOAPCPP) $(LIBS)
+		cp -f wsdl2h ..
+wsdlC.o:	wsdlC.cpp
+		$(CPP) -c $(CFLAGS) wsdlC.cpp
+wsdlC.cpp:	schema.h soap.h mime.h http.h wsdl.h includes.h imports.h
+		$(GSOAP) -CS -pwsdl wsdl.h
+types.o:	types.h types.cpp
+		$(CPP) -c $(CFLAGS) types.cpp
+service.o:	types.h service.h service.cpp
+		$(CPP) -c $(CFLAGS) service.cpp
+wsdl.o:		wsdl.h wsdl.cpp includes.h imports.h
+		$(CPP) -c $(CFLAGS) wsdl.cpp
+schema.o:	schema.h schema.cpp includes.h imports.h
+		$(CPP) -c $(CFLAGS) schema.cpp
+soap.o:		soap.h soap.cpp includes.h imports.h
+		$(CPP) -c $(CFLAGS) soap.cpp
+mime.o:		mime.h mime.cpp includes.h imports.h
+		$(CPP) -c $(CFLAGS) mime.cpp
+secure:
+		touch wsdl2h.cpp
+		make wsdl2h_secure
+wsdl2h_secure:	wsdlC.o wsdl.cpp schema.cpp soap.o mime.o types.o service.o wsdl2h.cpp $(SOAPCPP)
+		$(CPP) $(CFLAGS) -DWITH_OPENSSL -o wsdl2h wsdl2h.cpp wsdlC.o wsdl.cpp schema.cpp soap.o mime.o types.o service.o $(SOAPCPP) -lcrypto -lssl
+		cp -f wsdl2h ..
+clean:		
+		rm -f *.o wsdlH.h wsdlStub.h wsdlC.cpp wsdlClient.cpp wsdlServer.cpp wsdlClientLib.cpp wsdlServerLib.cpp
+distclean:		
+		rm -f *.o *.wsdl. *.xsd *.xml *.nsmap wsdl2h wsdlH.h wsdlStub.h wsdlC.cpp wsdlClient.cpp wsdlServer.cpp wsdlClientLib.cpp wsdlServerLib.cpp
diff --git a/wsdl/MakefileSolaris b/wsdl/MakefileSolaris
new file mode 100644
index 0000000..2ebe65d
--- /dev/null
+++ b/wsdl/MakefileSolaris
@@ -0,0 +1,40 @@
+GSOAP=../soapcpp2
+SOAPH=../stdsoap2.h
+SOAPC=../stdsoap2.c
+SOAPCPP=../stdsoap2.cpp
+CC=gcc
+CPP=g++
+LIBS=-lxnet -lnsl -lsocket
+COFLAGS=-O1
+CWFLAGS=-Wall
+CIFLAGS=-I..
+CMFLAGS=
+CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
+wsdl2h:		wsdlC.o wsdl.o schema.o soap.o mime.o types.o service.o wsdl2h.cpp $(SOAPCPP)
+		$(CPP) -s $(CFLAGS) -o wsdl2h wsdl2h.cpp wsdlC.o wsdl.o schema.o soap.o mime.o types.o service.o $(SOAPCPP) $(LIBS)
+		cp -f wsdl2h ..
+wsdlC.o:	schema.h soap.h mime.h dime.h http.h wsdl.h includes.h imports.h
+		$(GSOAP) -SC -pwsdl wsdl.h
+		$(CPP) -c $(CFLAGS) wsdlC.cpp
+types.o:	types.h types.cpp
+		$(CPP) -c $(CFLAGS) types.cpp
+service.o:	types.h service.h service.cpp
+		$(CPP) -c $(CFLAGS) service.cpp
+wsdl.o:		wsdl.h wsdl.cpp includes.h imports.h
+		$(CPP) -c $(CFLAGS) wsdl.cpp
+schema.o:	schema.h schema.cpp includes.h imports.h
+		$(CPP) -c $(CFLAGS) schema.cpp
+soap.o:		soap.h soap.cpp includes.h imports.h
+		$(CPP) -c $(CFLAGS) soap.cpp
+mime.o:		mime.h mime.cpp includes.h imports.h
+		$(CPP) -c $(CFLAGS) mime.cpp
+secure:
+		touch wsdl2h.cpp
+		make wsdl2h_secure
+wsdl2h_secure:	wsdlC.o wsdl.cpp schema.cpp soap.o mime.o types.o service.o wsdl2h.cpp $(SOAPCPP)
+		$(CPP) $(CFLAGS) -DWITH_OPENSSL -o wsdl2h wsdl2h.cpp wsdlC.o wsdl.cpp schema.cpp soap.o mime.o types.o service.o $(SOAPCPP) -lcrypto -lssl $(LIBS)
+		cp -f wsdl2h ..
+clean:		
+		rm -f *.o wsdlH.h wsdlStub.h wsdlC.cpp wsdlClient.cpp wsdlServer.cpp wsdlClientLib.cpp wsdlServerLib.cpp
+distclean:		
+		rm -f *.o *.wsdl. *.xsd *.xml *.nsmap wsdl2h wsdlH.h wsdlStub.h wsdlC.cpp wsdlClient.cpp wsdlServer.cpp wsdlClientLib.cpp wsdlServerLib.cpp
diff --git a/wsdl/README.txt b/wsdl/README.txt
new file mode 100644
index 0000000..327539e
--- /dev/null
+++ b/wsdl/README.txt
@@ -0,0 +1,179 @@
+The gSOAP WSDL parser 'wsdl2h'
+
+INSTRUCTIONS
+
+The gSOAP WSDL parser converts one or more WSDLs into a gSOAP header file for
+processing with the gSOAP soapcpp2 compiler to generate client stubs/proxies
+and server skeletons/objects to access services or build new services.
+
+For example:
+
+$ wsdl2h -o XMethodsQuery.h http://www.xmethods.net/wsdl/query.wsdl
+
+This generates the XMethodsQuery.h header file with Web service operations
+and C++ data types. This header file is intended to be processed with soapcpp2
+to generate the stub and/or skeleton code.
+
+You need to have stlvector.h present in the current directory (stlvector.h is
+in the package) to support STL vectors. To build without STL, use option -s:
+
+$ wsdl2h -s -o XMethodsQuery.h http://www.xmethods.net/wsdl/query.wsdl
+
+Or to build a pure C application, use option -c:
+
+$ wsdl2h -c -o XMethodsQuery.h http://www.xmethods.net/wsdl/query.wsdl
+
+Other useful options to control the output are -e and -y (see below).
+
+The above commands are to be followed by the soapcpp2 compilation phase:
+
+$ soapcpp2 -C XMethodsQuery.h
+
+Where option -C indicates client-side only files (soapcpp2 generates both
+client and server stubs and skeletons by default).
+
+The generated XMethodsQuery.h includes the definitions of data types and
+service operations of the XMethods Query Web service. To develop a C++ client
+application, you can use the generated 'soapXMethodsQuerySoapProxy' class and
+'XMethodsQuerySoap.nsmap' XML namespace table to access the Web service. Both
+need to be '#include'd in your source. Then compile and link the soapC.cpp,
+soapClient.cpp, and stdsoap2.cpp sources to complete the build. More
+information on this process can be found in the gSOAP documentation.
+
+When parsing a WSDL, the output file name is the WSDL input file name with
+extension '.h' instead of '.wsdl'. When an input file is absent or a WSDL file
+from a Web location is accessed, the header output will be produced on the
+standard output. Input may also consist of schema files, which is useful when
+you to need to generate code for serializing schema instances.
+
+USING A TYPEMAP FILE TO CONTROL THE OUTPUT
+
+The typemap.dat file can be used to define namespace prefix and type bindings
+for the generated header files by the 'wsdl2h' tool. The typemap.dat is the
+default file processed by 'wsdl2h' to customize its output. You can use wsdl2h
+option -t to specify an alternate file.
+
+XML namespace prefix bindings can be provided to override the default choice of
+the ns1, ns2, ... prefixes generated by 'wsdl2h'.  It is highly recommended to
+provide namespace prefixes for your project's XML namespaces. In this way,
+changes to the WSDL (or newer releases of wsdl2h) will have a minimal impact on
+coding.
+
+Bindings for namespace prefixes are of the form:
+	prefix = "URI"
+
+For example, to bind the 'google' prefix to the Google API's namespace:
+	google = "urn:GoogleSearch"
+
+Type bindings can by provided to bind XML schema types to C/C++ types for your
+project.
+
+Type bindings are of the form:
+	prefix__type = declaration | use | ptr-use
+where 'declaration' introduces the type in the header file, 'use' specifies how
+the type is used directly, 'ptr-use' specifies how the type is used as a
+pointer type.
+
+For example:
+	xsd__string = | char* | char*
+After enabling this line, all XSD strings will be mapped to char* and since
+char* is already a pointer type, the 'ptr-use' part is the same as 'use' part.
+Note that the 'declaration' part is empty in these cases.
+
+Member data and functions can be provided to extend a generated struct or
+class.
+
+Class and struct extensions are of the form:
+	prefix__type = $ member-declaration
+
+For example, to add a constructor and destructor to class myns__record:
+	myns__record = $ myns__record();
+	myns__record = $ ~myns__record();
+	
+Any other material to be included in the generated header file can be provided
+by enclosing the text within brackets [ and ]. Brackets MUST appear at the
+start of a new line.
+
+For example, to include a note:
+[
+// TODO: Don't forget to bind the namespace prefixes!
+]
+This comment appears as the first line in the generated header file.
+
+INPUT FORMATS
+
+wsdl2h reads from standard input or the files provided at the command line:
+
+wsdl2h [options] [-o outfile.h] [infile1.wsdl infile2.wsdl infile3.xsd ... ]
+
+Valid input file formats are .wsdl and .xsd (schema) files.
+
+Multiple wsdl and schema files can be given, which results in a consolidated
+header file with all definitions combined.
+
+OUTPUT FORMAT
+
+The output file is a gSOAP-formatted header file. The header file syntax is
+augmented with annotations reflecting WSDL and schema-specific bindings and
+validation constraints.
+
+We suggest the use of Doxygen (www.doxygen.org) to produce documented for the
+generated header file. However, we STRONGLY recommend user to inspect the
+generated header file first for warnings and other annotations (which do not
+appear in Doxygen's output) indicating potential problems.
+
+Note that Doxygen's license model does not infinge on your ownership of the
+generated gSOAP source code output when you purchased a commercial license.
+
+COMMAND LINE OPTIONS
+
+-a      generate indexed struct names for local elements with anonymous types
+-c      generate C source code
+-d      use DOM to populate xs:any and xsd:anyType elements
+-e      don't qualify enum names
+-f      generate flat C++ class hierarchy
+-g      generate global top-level element declarations
+-h      display help info
+-Ipath  use path to find files
+-l      include license information in output
+-m      use xsd.h module to import primitive types
+-nname  use name as the base namespace prefix instead of 'ns'
+-Nname  use name as the base namespace prefix for service namespaces
+-ofile  output to file
+-p      create polymorphic types with C++ inheritance with base xsd__anyType
+-rhost:port
+        connect via proxy host and port
+-s      don't generate STL code (no std::string and no std::vector)
+-tfile  use type map file instead of the default file typemap.dat
+-u      don't generate unions
+-v      verbose output
+-w      always wrap response parameters in a response struct (<=1.1.4 behavior)
+-x      don't generate _XML any/anyAttribute extensibility elements
+-y      generate typedef synonyms for structs and enums
+infile.wsdl infile.xsd http://www... list of input sources (if none use stdin)
+
+DOCUMENTATION
+
+See soapdoc2.pdf for documentation.
+
+INSTALLATION
+
+Type 'make' in the 'wsdl' directory to build wsdl2h. You must first install the
+gSOAP package and build the gSOAP compiler soapcpp2 to rebuild the wsdl2h WSDL
+parser.
+
+USING SSL FOR HTTPS TRANSFER OF WSDL FILES
+
+You must build the WSDL parser with 'make secure' to build an SSL-enabled
+version of wsdl2h that can access HTTPS secure sites.
+
+LICENSE
+
+The gSOAP WSDL parser 'wsdl2h' and source code are released under the GPL.
+See gpl.txt for more details. A commercial license is available from Genivia.
+Please visit http://genivia.com/Products/gsoap/contract.html
+
+COPYRIGHT NOTICE
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2005, Robert van Engelen, Genivia, Inc. All Rights Reserved.
diff --git a/wsdl/dime.h b/wsdl/dime.h
new file mode 100644
index 0000000..eced324
--- /dev/null
+++ b/wsdl/dime.h
@@ -0,0 +1,45 @@
+/*
+
+dime.h
+
+WSDL/DIME binding schema
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+*/
+
+//gsoap dime schema documentation:	WSDL/DIME binding schema
+//gsoap dime schema namespace:		http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/
+
+#import "imports.h"
+
+class dime__message
+{ public:
+	@xsd__anyURI			layout;
+//	@xsd__boolean			wsdl__required;
+};
diff --git a/wsdl/gpl.txt b/wsdl/gpl.txt
new file mode 100644
index 0000000..b34237a
--- /dev/null
+++ b/wsdl/gpl.txt
@@ -0,0 +1,309 @@
+The GNU General Public License (GPL)
+
+Version 2, June 1991
+
+Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite
+330, Boston, MA 02111-1307 USA
+
+Everyone is permitted to copy and distribute verbatim copies of this license
+document, but changing it is not allowed.
+
+Preamble
+
+The licenses for most software are designed to take away your freedom to share
+and change it. By contrast, the GNU General Public License is intended to
+guarantee your freedom to share and change free software--to make sure the
+software is free for all its users. This General Public License applies to most
+of the Free Software Foundation's software and to any other program whose
+authors commit to using it. (Some other Free Software Foundation software is
+covered by the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+When we speak of free software, we are referring to freedom, not price. Our
+General Public Licenses are designed to make sure that you have the freedom to
+distribute copies of free software (and charge for this service if you wish),
+that you receive source code or can get it if you want it, that you can change
+the software or use pieces of it in new free programs; and that you know you
+can do these things.
+
+To protect your rights, we need to make restrictions that forbid anyone to deny
+you these rights or to ask you to surrender the rights. These restrictions
+translate to certain responsibilities for you if you distribute copies of the
+software, or if you modify it.
+
+For example, if you distribute copies of such a program, whether gratis or for
+a fee, you must give the recipients all the rights that you have. You must make
+sure that they, too, receive or can get the source code. And you must show them
+these terms so they know their rights.
+
+We protect your rights with two steps: (1) copyright the software, and (2)
+offer you this license which gives you legal permission to copy, distribute
+and/or modify the software.
+
+Also, for each author's protection and ours, we want to make certain that
+everyone understands that there is no warranty for this free software. If the
+software is modified by someone else and passed on, we want its recipients to
+know that what they have is not the original, so that any problems introduced
+by others will not reflect on the original authors' reputations.
+
+Finally, any free program is threatened constantly by software patents. We wish
+to avoid the danger that redistributors of a free program will individually
+obtain patent licenses, in effect making the program proprietary.  To prevent
+this, we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+The precise terms and conditions for copying, distribution and modification
+follow.
+
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+0. This License applies to any program or other work which contains a notice
+placed by the copyright holder saying it may be distributed under the terms of
+this General Public License. The "Program", below, refers to any such program
+or work, and a "work based on the Program" means either the Program or any
+derivative work under copyright law: that is to say, a work containing the
+Program or a portion of it, either verbatim or with modifications and/or
+translated into another language. (Hereinafter, translation is included without
+limitation in the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not covered by
+this License; they are outside its scope. The act of running the Program is not
+restricted, and the output from the Program is covered only if its contents
+constitute a work based on the Program (independent of having been made by
+running the Program). Whether that is true depends on what the Program does.
+
+1. You may copy and distribute verbatim copies of the Program's source code as
+you receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice and
+disclaimer of warranty; keep intact all the notices that refer to this License
+and to the absence of any warranty; and give any other recipients of the
+Program a copy of this License along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and you may
+at your option offer warranty protection in exchange for a fee.
+
+2. You may modify your copy or copies of the Program or any portion of it, thus
+forming a work based on the Program, and copy and distribute such modifications
+or work under the terms of Section 1 above, provided that you also meet all of
+these conditions:
+
+a) You must cause the modified files to carry prominent notices stating that
+you changed the files and the date of any change.
+
+b) You must cause any work that you distribute or publish, that in whole or in
+part contains or is derived from the Program or any part thereof, to be
+licensed as a whole at no charge to all third parties under the terms of this
+License.
+
+c) If the modified program normally reads commands interactively when run, you
+must cause it, when started running for such interactive use in the most
+ordinary way, to print or display an announcement including an appropriate
+copyright notice and a notice that there is no warranty (or else, saying that
+you provide a warranty) and that users may redistribute the program under these
+conditions, and telling the user how to view a copy of this License.
+(Exception: if the Program itself is interactive but does not normally print
+such an announcement, your work based on the Program is not required to print
+an announcement.)
+
+These requirements apply to the modified work as a whole. If identifiable
+sections of that work are not derived from the Program, and can be reasonably
+considered independent and separate works in themselves, then this License, and
+its terms, do not apply to those sections when you distribute them as separate
+works. But when you distribute the same sections as part of a whole which is a
+work based on the Program, the distribution of the whole must be on the terms
+of this License, whose permissions for other licensees extend to the entire
+whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest your
+rights to work written entirely by you; rather, the intent is to exercise the
+right to control the distribution of derivative or collective works based on
+the Program.
+
+In addition, mere aggregation of another work not based on the Program with the
+Program (or with a work based on the Program) on a volume of a storage or
+distribution medium does not bring the other work under the scope of this
+License.
+
+3. You may copy and distribute the Program (or a work based on it, under
+Section 2) in object code or executable form under the terms of Sections 1 and
+2 above provided that you also do one of the following:
+
+a) Accompany it with the complete corresponding machine-readable source code,
+which must be distributed under the terms of Sections 1 and 2 above on a medium
+customarily used for software interchange; or,
+
+b) Accompany it with a written offer, valid for at least three years, to give
+any third party, for a charge no more than your cost of physically performing
+source distribution, a complete machine-readable copy of the corresponding
+source code, to be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange; or,
+
+c) Accompany it with the information you received as to the offer to distribute
+corresponding source code. (This alternative is allowed only for noncommercial
+distribution and only if you received the program in object code or executable
+form with such an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for making
+modifications to it. For an executable work, complete source code means all the
+source code for all modules it contains, plus any associated interface
+definition files, plus the scripts used to control compilation and installation
+of the executable. However, as a special exception, the source code distributed
+need not include anything that is normally distributed (in either source or
+binary form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component itself
+accompanies the executable.
+
+If distribution of executable or object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the source
+code from the same place counts as distribution of the source code, even though
+third parties are not compelled to copy the source along with the object code.
+
+4. You may not copy, modify, sublicense, or distribute the Program except as
+expressly provided under this License. Any attempt otherwise to copy, modify,
+sublicense or distribute the Program is void, and will automatically terminate
+your rights under this License. However, parties who have received copies, or
+rights, from you under this License will not have their licenses terminated so
+long as such parties remain in full compliance.
+
+5. You are not required to accept this License, since you have not signed it.
+However, nothing else grants you permission to modify or distribute the Program
+or its derivative works. These actions are prohibited by law if you do not
+accept this License. Therefore, by modifying or distributing the Program (or
+any work based on the Program), you indicate your acceptance of this License to
+do so, and all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+6. Each time you redistribute the Program (or any work based on the Program),
+the recipient automatically receives a license from the original licensor to
+copy, distribute or modify the Program subject to these terms and conditions.
+You may not impose any further restrictions on the recipients' exercise of the
+rights granted herein. You are not responsible for enforcing compliance by
+third parties to this License.
+
+7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues), conditions
+are imposed on you (whether by court order, agreement or otherwise) that
+contradict the conditions of this License, they do not excuse you from the
+conditions of this License. If you cannot distribute so as to satisfy
+simultaneously your obligations under this License and any other pertinent
+obligations, then as a consequence you may not distribute the Program at all.
+For example, if a patent license would not permit royalty-free redistribution
+of the Program by all those who receive copies directly or indirectly through
+you, then the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply and
+the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any patents or
+other property right claims or to contest validity of any such claims; this
+section has the sole purpose of protecting the integrity of the free software
+distribution system, which is implemented by public license practices. Many
+people have made generous contributions to the wide range of software
+distributed through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing to
+distribute software through any other system and a licensee cannot impose that
+choice.
+
+This section is intended to make thoroughly clear what is believed to be a
+consequence of the rest of this License.
+
+8. If the distribution and/or use of the Program is restricted in certain
+countries either by patents or by copyrighted interfaces, the original
+copyright holder who places the Program under this License may add an explicit
+geographical distribution limitation excluding those countries, so that
+distribution is permitted only in or among countries not thus excluded.  In
+such case, this License incorporates the limitation as if written in the body
+of this License.
+
+9. The Free Software Foundation may publish revised and/or new versions of the
+General Public License from time to time. Such new versions will be similar in
+spirit to the present version, but may differ in detail to address new problems
+or concerns.
+
+Each version is given a distinguishing version number. If the Program specifies
+a version number of this License which applies to it and "any later version",
+you have the option of following the terms and conditions either of that
+version or of any later version published by the Free Software Foundation.  If
+the Program does not specify a version number of this License, you may choose
+any version ever published by the Free Software Foundation.
+
+10. If you wish to incorporate parts of the Program into other free programs
+whose distribution conditions are different, write to the author to ask for
+permission. For software which is copyrighted by the Free Software Foundation,
+write to the Free Software Foundation; we sometimes make exceptions for this.
+Our decision will be guided by the two goals of preserving the free status of
+all derivatives of our free software and of promoting the sharing and reuse of
+software generally.
+
+NO WARRANTY
+
+11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
+THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
+STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
+PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
+PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU
+ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
+ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE
+PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
+INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
+BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
+OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+END OF TERMS AND CONDITIONS
+
+How to Apply These Terms to Your New Programs
+
+If you develop a new program, and you want it to be of the greatest possible
+use to the public, the best way to achieve this is to make it free software
+which everyone can redistribute and change under these terms.
+
+To do so, attach the following notices to the program. It is safest to attach
+them to the start of each source file to most effectively convey the exclusion
+of warranty; and each file should have at least the "copyright" line and a
+pointer to where the full notice is found.
+
+gSOAP XML Web services tools
+Copyright (C) 2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Also add information on how to contact you by electronic and paper mail:
+engelen@genivia.com / engelen@acm.org
+
+If the program is interactive, make it output a short notice like this when it
+starts in an interactive mode:
+
+gSOAP version X.Y.Z, Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc.
+gSOAP comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is
+free software, and you are welcome to redistribute it under certain conditions;
+type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may be
+called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may consider
+it more useful to permit linking proprietary applications with the library. If
+this is what you want to do, use the GNU Library General Public License instead
+of this License.
diff --git a/wsdl/gwsdl.h b/wsdl/gwsdl.h
new file mode 100644
index 0000000..a9f8491
--- /dev/null
+++ b/wsdl/gwsdl.h
@@ -0,0 +1,74 @@
+/*
+
+gwsdl.h
+
+OGSI GWSDL binding schema interface
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+*/
+
+//gsoap gwsdl schema documentation:	OGSI GWSDL binding schema
+//gsoap gwsdl schema namespace:		http://www.gridforum.org/namespaces/2003/03/gridWSDLExtensions
+//gsoap sd schema namespace:		http://www.gridforum.org/namespaces/2003/03/serviceData
+
+#import "schema.h"
+
+class wsdl__operation;
+
+enum sd__mutability { static_, constant, extendable, mutable_ };
+
+class sd__serviceData
+{ public:
+	@xsd__NMTOKEN			name;
+	@xsd__QName			type;
+	@xsd__boolean			nillable		= false;
+	@xsd__string			minOccurs;		// xsd:nonNegativeInteger
+	@xsd__string			maxOccurs;		// xsd:nonNegativeInteger|unbounded
+	@enum sd__mutability		mutability		= extendable;
+	@xsd__boolean			modifiable		= false;
+	/* has any content */
+  public:
+};
+
+class sd__staticServiceDataValues
+{ public:
+	int				__type; /* any content, probably should use DOM */
+	void*				_any;
+};
+
+class gwsdl__portType
+{ public:
+	@xsd__NMTOKEN			name;
+	@xsd__QName			extends;		// actually a list of QNames
+	xsd__string			documentation;		// <wsdl:documentation>?
+	std::vector<wsdl__operation*>	operation;		// <wsdl:operation>*
+	std::vector<sd__serviceData>	sd__serviceData_;
+	sd__staticServiceDataValues	*sd__staticServiceDataValues_;
+  public:
+};
diff --git a/wsdl/http.h b/wsdl/http.h
new file mode 100644
index 0000000..0e4495e
--- /dev/null
+++ b/wsdl/http.h
@@ -0,0 +1,54 @@
+/*
+
+http.h
+
+WSDL/HTTP binding schema interface
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+*/
+
+//gsoap http schema documentation:	WSDL/HTTP binding schema
+//gsoap http schema namespace:		http://schemas.xmlsoap.org/wsdl/http/
+
+#import "imports.h"
+
+class http__address
+{ public:
+	@xsd__anyURI		location;
+};
+
+class http__binding
+{ public:
+	@xsd__NMTOKEN		verb;
+};
+
+class http__operation
+{ public:
+	@xsd__anyURI		location;
+};
diff --git a/wsdl/imports.h b/wsdl/imports.h
new file mode 100644
index 0000000..1b0ab8a
--- /dev/null
+++ b/wsdl/imports.h
@@ -0,0 +1,50 @@
+/*
+
+imports.h
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+*/
+
+#import "../import/stlvector.h"
+
+typedef char	*xsd__anyURI,
+		*xsd__ID,
+		*xsd__NCName,
+		*xsd__NMTOKEN,
+		*xsd__NMTOKENS,
+		*xsd__QName,
+		*xsd__string;
+typedef bool	xsd__boolean;
+
+extern class ostream;
+extern class istream;
+
+#include "includes.h"
+
+extern class SetOfString;
diff --git a/wsdl/includes.h b/wsdl/includes.h
new file mode 100644
index 0000000..a7348a4
--- /dev/null
+++ b/wsdl/includes.h
@@ -0,0 +1,126 @@
+/*
+
+includes.h
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2006, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+*/
+
+#ifndef INCLUDES_H
+#define INCLUDES_H
+
+#include "stdsoap2.h"
+
+#undef VERSION
+#define VERSION "1.2.6e"
+
+#include <utility>
+#include <iterator>
+#include <vector>
+#include <set>
+#include <map>
+
+using namespace std;
+
+struct ltstr
+{ bool operator()(const char *s1, const char *s2) const
+  { return strcmp(s1, s2) < 0;
+  }
+}; 
+
+typedef set<const char*, ltstr> SetOfString;
+
+typedef pair<const char*, const char*> Pair;
+
+struct ltpair
+{ bool operator()(Pair s1, Pair s2) const
+  { int cmp = strcmp(s1.first, s2.first);
+    if (cmp)
+      return cmp < 0;
+    return strcmp(s1.second, s2.second) < 0;
+  }
+};
+
+typedef map<const char*, const char*, ltstr> MapOfStringToString;
+
+typedef map<Pair, const char*, ltpair> MapOfPairToString;
+
+typedef map<const char*, size_t, ltstr> MapOfStringToNum;
+
+typedef vector<const char*> VectorOfString;
+
+extern int aflag,
+	   cflag,
+	   dflag,
+	   eflag,
+	   fflag,
+	   gflag,
+	   iflag,
+	   lflag,
+	   mflag,
+	   pflag,
+	   sflag,
+	   uflag,
+	   vflag,
+	   wflag,
+	   xflag,
+	   yflag,
+	   zflag;
+
+extern FILE *stream;
+
+extern SetOfString exturis;
+
+extern int infiles;
+extern char *infile[100], *outfile, *mapfile, *proxy_host, *import_path;
+
+extern int proxy_port;
+
+extern const char *service_prefix;
+extern const char *schema_prefix;
+
+extern char elementformat[];
+extern char pointerformat[];
+extern char attributeformat[];
+extern char vectorformat[];
+extern char pointervectorformat[];
+extern char arrayformat[];
+extern char sizeformat[];
+extern char offsetformat[];
+extern char choiceformat[];
+extern char schemaformat[];
+extern char serviceformat[];
+extern char paraformat[];
+extern char anonformat[];
+extern char copyrightnotice[];
+extern char licensenotice[];
+
+extern void *emalloc(size_t size);
+extern char *estrdup(const char *s);
+
+#endif
diff --git a/wsdl/mime.cpp b/wsdl/mime.cpp
new file mode 100644
index 0000000..c9effb7
--- /dev/null
+++ b/wsdl/mime.cpp
@@ -0,0 +1,68 @@
+/*
+
+mime.cpp
+
+WSDL/MIME binding schema
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2006, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+*/
+
+#include "wsdlH.h"		// cannot include "schemaH.h"
+
+using namespace std;
+
+extern const char *qname_token(const char*, const char*);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	mime:multipartRelated
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int mime__multipartRelated::traverse(wsdl__definitions& definitions)
+{ if (vflag)
+    cerr << "Analyzing mime multpartRelated " << endl;
+  for (vector<mime__part>::iterator pt = part.begin(); pt != part.end(); ++pt)
+    (*pt).traverse(definitions);
+  return SOAP_OK;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	mime:part
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int mime__part::traverse(wsdl__definitions& definitions)
+{ if (vflag)
+    cerr << "Analyzing mime part " << endl;
+  for (vector<soap__header>::iterator hd = soap__header_.begin(); hd != soap__header_.end(); ++hd)
+    (*hd).traverse(definitions);
+  return SOAP_OK;
+}
diff --git a/wsdl/mime.h b/wsdl/mime.h
new file mode 100644
index 0000000..583f2f1
--- /dev/null
+++ b/wsdl/mime.h
@@ -0,0 +1,62 @@
+/*
+
+mime.h
+
+WSDL/MIME binding schema
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+*/
+
+//gsoap mime schema documentation:	WSDL/MIME binding schema
+//gsoap mime schema namespace:		http://schemas.xmlsoap.org/wsdl/mime/
+
+#import "imports.h"
+#import "soap.h"
+
+class mime__content
+{ public:
+ 	@xsd__NMTOKEN			part;
+	@xsd__string			type;
+};
+
+class mime__part
+{ public:
+	soap__body			*soap__body_;
+	std::vector<soap__header>	soap__header_;
+	std::vector<mime__content>	content;
+  public:
+  	int				traverse(wsdl__definitions&);
+};
+
+class mime__multipartRelated
+{ public:
+	std::vector<mime__part>		part;
+  public:
+  	int				traverse(wsdl__definitions&);
+};
diff --git a/wsdl/schema.cpp b/wsdl/schema.cpp
new file mode 100644
index 0000000..7526cc3
--- /dev/null
+++ b/wsdl/schema.cpp
@@ -0,0 +1,1566 @@
+/*
+
+schema.cpp
+
+XSD binding schema implementation
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2006, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+*/
+
+#include "wsdlH.h"		// cannot include "schemaH.h"
+
+using namespace std;
+
+extern int warn_ignore(struct soap*, const char*);
+extern const char *qname_token(const char*, const char*);
+extern int is_builtin_qname(const char*);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	schema
+//
+////////////////////////////////////////////////////////////////////////////////
+
+xs__schema::xs__schema()
+{ soap = soap_new1(SOAP_XML_TREE | SOAP_C_UTFSTRING);
+#ifdef WITH_OPENSSL
+  soap_ssl_client_context(soap, SOAP_SSL_NO_AUTHENTICATION, NULL, NULL, NULL, NULL, NULL);
+#endif
+#ifdef WITH_NONAMESPACES
+  soap_set_namespaces(soap, namespaces);
+#endif
+  soap_default(soap);
+  soap->fignore = warn_ignore;
+  soap->encodingStyle = NULL;
+  soap->proxy_host = proxy_host;
+  soap->proxy_port = proxy_port;
+  targetNamespace = NULL;
+  version = NULL;
+  updated = false;
+  location = NULL;
+  redirs = 0;
+}
+
+xs__schema::xs__schema(struct soap *copy)
+{ soap = soap_copy(copy);
+  soap_default(soap);
+  soap->fignore = warn_ignore;
+  soap->encodingStyle = NULL;
+  targetNamespace = NULL;
+  version = NULL;
+  updated = false;
+  location = NULL;
+  redirs = 0;
+}
+
+xs__schema::xs__schema(struct soap *copy, const char *cwd, const char *loc)
+{ soap = soap_copy(copy);
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->recvfd = 0;
+  soap->sendfd = 1;
+  /* no longer required, since we keep the host name:
+  strcpy(soap->host, copy->host);
+  */
+  soap_default(soap);
+  soap->fignore = warn_ignore;
+  soap->encodingStyle = NULL;
+  targetNamespace = NULL;
+  version = NULL;
+  updated = false;
+  location = NULL;
+  redirs = 0;
+  read(cwd, loc);
+}
+
+xs__schema::~xs__schema()
+{ }
+
+int xs__schema::get(struct soap *soap)
+{ return preprocess();
+}
+
+int xs__schema::preprocess()
+{ // process include, but should check if not already included?
+  // NOTE: includes are context sensitive (take context info), so keep including
+  for (vector<xs__include>::iterator in = include.begin(); in != include.end(); ++in)
+  { (*in).preprocess(*this); // read schema and recurse over <include>
+    if ((*in).schemaPtr())
+      insert(*(*in).schemaPtr());
+  }
+  for (vector<xs__redefine>::iterator re = redefine.begin(); re != redefine.end(); ++re)
+  { (*re).preprocess(*this); // read schema and recurse over <redefine>
+    if ((*re).schemaPtr())
+      insert(*(*re).schemaPtr());
+  }
+  return SOAP_OK;
+}
+
+int xs__schema::insert(xs__schema& schema)
+{ bool found;
+  if (targetNamespace && schema.targetNamespace && strcmp(targetNamespace, schema.targetNamespace))
+    fprintf(stderr, "Warning: attempt to include schema with unequal targetNamespace '%s' in schema '%s'\n", schema.targetNamespace, targetNamespace);
+  if (elementFormDefault != schema.elementFormDefault)
+    fprintf(stderr, "Warning: attempt to include schema with unequal elementFormDefault in schema '%s'\n", targetNamespace?targetNamespace:"");
+  if (attributeFormDefault != schema.attributeFormDefault)
+    fprintf(stderr, "Warning: attempt to include schema with unequal attributeFormDefault in schema '%s'\n", targetNamespace?targetNamespace:"");
+  // insert imports, but only add imports with new namespace
+  for (vector<xs__import>::const_iterator im = schema.import.begin(); im != schema.import.end(); ++im)
+  { found = false;
+    if ((*im).namespace_)
+    { for (vector<xs__import>::const_iterator i = import.begin(); i != import.end(); ++i)
+      { if ((*i).namespace_ && !strcmp((*im).namespace_, (*i).namespace_))
+        { found = true;
+          break;
+        }
+      }
+    }
+    if (!found)
+      import.push_back(*im);
+  }
+  // insert attributes, but only add attributes with new name
+  for (vector<xs__attribute>::const_iterator at = schema.attribute.begin(); at != schema.attribute.end(); ++at)
+  { found = false;
+    if ((*at).name)
+    { for (vector<xs__attribute>::const_iterator a = attribute.begin(); a != attribute.end(); ++a)
+      { if ((*a).name && !strcmp((*at).name, (*a).name))
+        { found = true;
+          if ((*at).type && (*a).type && strcmp((*at).type, (*a).type))
+            fprintf(stderr, "Warning: attempt to redefine attribute '%s' with type '%s' in schema '%s'\n", (*at).name, (*at).type, targetNamespace?targetNamespace:"");
+          break;
+        }
+      }
+    }
+    if (!found)
+      attribute.push_back(*at);
+  }
+  // insert elements, but only add elements with new name
+  for (vector<xs__element>::const_iterator el = schema.element.begin(); el != schema.element.end(); ++el)
+  { found = false;
+    if ((*el).name)
+    { for (vector<xs__element>::const_iterator e = element.begin(); e != element.end(); ++e)
+      { if ((*e).name && !strcmp((*el).name, (*e).name))
+        { found = true;
+          if ((*el).type && (*e).type && strcmp((*el).type, (*e).type))
+            fprintf(stderr, "Warning: attempt to redefine element '%s' with type '%s' in schema '%s'\n", (*el).name, (*el).type, targetNamespace?targetNamespace:"");
+          break;
+        }
+      }
+    }
+    if (!found)
+      element.push_back(*el);
+  }
+  // insert groups, but only add groups with new name
+  for (vector<xs__group>::const_iterator gp = schema.group.begin(); gp != schema.group.end(); ++gp)
+  { found = false;
+    if ((*gp).name)
+    { for (vector<xs__group>::const_iterator g = group.begin(); g != group.end(); ++g)
+      { if ((*g).name && !strcmp((*gp).name, (*g).name))
+        { found = true;
+          break;
+        }
+      }
+    }
+    if (!found)
+      group.push_back(*gp);
+  }
+  // insert attributeGroups, but only add attributeGroups with new name
+  for (vector<xs__attributeGroup>::const_iterator ag = schema.attributeGroup.begin(); ag != schema.attributeGroup.end(); ++ag)
+  { found = false;
+    if ((*ag).name)
+    { for (vector<xs__attributeGroup>::const_iterator g = attributeGroup.begin(); g != attributeGroup.end(); ++g)
+      { if ((*g).name && !strcmp((*ag).name, (*g).name))
+        { found = true;
+          break;
+        }
+      }
+    }
+    if (!found)
+      attributeGroup.push_back(*ag);
+  }
+  // insert simpleTypes, but only add simpleTypes with new name
+  for (vector<xs__simpleType>::const_iterator st = schema.simpleType.begin(); st != schema.simpleType.end(); ++st)
+  { found = false;
+    if ((*st).name)
+    { for (vector<xs__simpleType>::const_iterator s = simpleType.begin(); s != simpleType.end(); ++s)
+      { if ((*s).name && !strcmp((*st).name, (*s).name))
+        { found = true;
+          break;
+        }
+      }
+    }
+    if (!found)
+      simpleType.push_back(*st);
+  }
+  // insert complexTypes, but only add complexTypes with new name
+  for (vector<xs__complexType>::const_iterator ct = schema.complexType.begin(); ct != schema.complexType.end(); ++ct)
+  { found = false;
+    if ((*ct).name)
+    { for (vector<xs__complexType>::const_iterator c = complexType.begin(); c != complexType.end(); ++c)
+      { if ((*c).name && !strcmp((*ct).name, (*c).name))
+        { found = true;
+          break;
+        }
+      }
+    }
+    if (!found)
+      complexType.push_back(*ct);
+  }
+  return SOAP_OK;
+}
+
+int xs__schema::traverse()
+{ if (vflag)
+    cerr << "Analyzing schema " << (targetNamespace?targetNamespace:"") << endl;
+  if (updated)
+    return SOAP_OK;
+  updated = true;
+  if (!targetNamespace)
+  { if (vflag)
+      fprintf(stderr, "Warning: Schema has no targetNamespace\n");
+    targetNamespace = "";
+  }
+  // process import
+  for (vector<xs__import>::iterator im = import.begin(); im != import.end(); ++im)
+    (*im).traverse(*this);
+  // process attributes
+  for (vector<xs__attribute>::iterator at = attribute.begin(); at != attribute.end(); ++at)
+    (*at).traverse(*this);
+  // process elements, check conflicts with complexTypes
+  for (vector<xs__element>::iterator el = element.begin(); el != element.end(); ++el)
+  { (*el).traverse(*this);
+    if ((*el).name)
+    { for (vector<xs__simpleType>::iterator st = simpleType.begin(); st != simpleType.end(); ++st)
+      { if ((*st).name && !strcmp((*el).name, (*st).name))
+        { const char *token = qname_token((*el).type, targetNamespace);
+          if (!token || strcmp((*st).name, token))
+            fprintf(stderr, "Warning: top-level element name and simpleType name '%s' clash in schema '%s'\n", (*el).name, targetNamespace?targetNamespace:"");
+        }
+      }
+      for (vector<xs__complexType>::iterator ct = complexType.begin(); ct != complexType.end(); ++ct)
+      { if ((*ct).name && !strcmp((*el).name, (*ct).name))
+        { const char *token = qname_token((*el).type, targetNamespace);
+          if (!token || strcmp((*ct).name, token))
+            fprintf(stderr, "Warning: top-level element name and complexType name '%s' clash in schema '%s'\n", (*el).name, targetNamespace?targetNamespace:"");
+        }
+      }
+    }
+  }
+  // process simpleTypes, check conflicts with complexTypes
+  for (vector<xs__simpleType>::iterator st = simpleType.begin(); st != simpleType.end(); ++st)
+  { (*st).traverse(*this);
+    if ((*st).name)
+    { for (vector<xs__complexType>::iterator ct = complexType.begin(); ct != complexType.end(); ++ct)
+        if ((*ct).name && !strcmp((*st).name, (*ct).name))
+          fprintf(stderr, "Warning: top-level simpleType name and complexType name '%s' clash in schema '%s'\n", (*st).name, targetNamespace?targetNamespace:"");
+    }
+  }
+  // process complexTypes
+  for (vector<xs__complexType>::iterator ct = complexType.begin(); ct != complexType.end(); ++ct)
+    (*ct).traverse(*this);
+  // process groups
+  for (vector<xs__group>::iterator gp = group.begin(); gp != group.end(); ++gp)
+    (*gp).traverse(*this);
+  // process attributeGroups
+  for (vector<xs__attributeGroup>::iterator ag = attributeGroup.begin(); ag != attributeGroup.end(); ++ag)
+    (*ag).traverse(*this);
+  if (vflag)
+    cerr << "End of schema " << (targetNamespace?targetNamespace:"") << endl;
+  return SOAP_OK;
+}
+
+int xs__schema::read(const char *cwd, const char *loc)
+{ if (vflag)
+    fprintf(stderr, "Opening schema '%s' from '%s'\n", loc?loc:"", cwd?cwd:"");
+  if (loc)
+  { if (!strncmp(loc, "http://", 7) || !strncmp(loc, "https://", 8))
+    { fprintf(stderr, "Connecting to '%s' to retrieve schema... ", loc);
+      location = soap_strdup(soap, loc);
+      if (soap_connect_command(soap, SOAP_GET, location, NULL))
+      { fprintf(stderr, "connection failed\n");
+        exit(1);
+      }
+      fprintf(stderr, "connected, receiving...\n");
+    }
+    else if (cwd && (!strncmp(cwd, "http://", 7) || !strncmp(cwd, "https://", 8)))
+    { char *s;
+      location = (char*)soap_malloc(soap, strlen(cwd) + strlen(loc) + 2);
+      strcpy(location, cwd);
+      s = strrchr(location, '/');
+      if (s)
+        *s = '\0';
+      strcat(location, "/");
+      strcat(location, loc);
+      fprintf(stderr, "Connecting to '%s' to retrieve relative '%s' schema... ", location, loc);
+      if (soap_connect_command(soap, SOAP_GET, location, NULL))
+      { fprintf(stderr, "connection failed\n");
+        exit(1);
+      }
+      fprintf(stderr, "connected, receiving...\n");
+    }
+    else
+    { soap->recvfd = open(loc, O_RDONLY, 0);
+      if (soap->recvfd < 0)
+      { if (cwd)
+        { char *s;
+          location = (char*)soap_malloc(soap, strlen(cwd) + strlen(loc) + 2);
+          strcpy(location, cwd);
+          s = strrchr(location, '/');
+          if (s)
+            *s = '\0';
+          strcat(location, "/");
+          strcat(location, loc);
+          soap->recvfd = open(location, O_RDONLY, 0);
+	}
+        if (soap->recvfd < 0 && import_path)
+        { location = (char*)soap_malloc(soap, strlen(import_path) + strlen(loc) + 2);
+          strcpy(location, import_path);
+          strcat(location, "/");
+          strcat(location, loc);
+          soap->recvfd = open(location, O_RDONLY, 0);
+        }
+        if (soap->recvfd < 0)
+        { fprintf(stderr, "Cannot open '%s' to retrieve schema\n", loc);
+          exit(1);
+        }
+      }
+      else
+        location = soap_strdup(soap, loc);
+      fprintf(stderr, "Reading schema file '%s'\n", location);
+    }
+  }
+  if (!soap_begin_recv(soap))
+    this->soap_in(soap, "xs:schema", NULL);
+  if ((soap->error >= 301 && soap->error <= 303) || soap->error == 307) // HTTP redirect, socket was closed
+  { int r = SOAP_ERR;
+    fprintf(stderr, "Redirected to '%s'\n", soap->endpoint);
+    if (redirs++ < 10)
+      r = read(cwd, soap->endpoint);
+    else
+      fprintf(stderr, "Max redirects exceeded\n");
+    redirs--;
+    return r;
+  }
+  if (soap->error)
+  { fprintf(stderr, "An error occurred while parsing schema from '%s'\n", loc?loc:"");
+    soap_print_fault(soap, stderr);
+    soap_print_fault_location(soap, stderr);
+    exit(1);
+  }
+  soap_end_recv(soap);
+  if (soap->recvfd >= 0)
+  { close(soap->recvfd);
+    soap->recvfd = -1;
+  }
+  else
+    soap_closesock(soap);
+  return SOAP_OK;
+}
+
+void xs__schema::sourceLocation(const char *loc)
+{ location = soap_strdup(soap, loc);
+}
+
+const char *xs__schema::sourceLocation()
+{ return location;
+}
+
+int xs__schema::error()
+{ return soap->error;
+}
+
+void xs__schema::print_fault()
+{ soap_print_fault(soap, stderr);
+  soap_print_fault_location(soap, stderr);
+}
+
+void xs__schema::builtinType(const char *type)
+{ builtinTypeSet.insert(type);
+}
+
+void xs__schema::builtinElement(const char *element)
+{ builtinElementSet.insert(element);
+}
+
+void xs__schema::builtinAttribute(const char *attribute)
+{ builtinAttributeSet.insert(attribute);
+}
+
+const SetOfString& xs__schema::builtinTypes() const
+{ return builtinTypeSet;
+}
+
+const SetOfString& xs__schema::builtinElements() const
+{ return builtinElementSet;
+}
+
+const SetOfString& xs__schema::builtinAttributes() const
+{ return builtinAttributeSet;
+}
+
+xs__include::xs__include()
+{ schemaLocation = NULL;
+  schemaRef = NULL;
+}
+
+int xs__include::preprocess(xs__schema &schema)
+{ if (vflag)
+    cerr << "Preprocessing schema include " << (schemaLocation?schemaLocation:"") << endl;
+  if (!schemaRef)
+    if (schemaLocation)
+      schemaRef = new xs__schema(schema.soap, schema.sourceLocation(), schemaLocation);
+  return SOAP_OK;
+}
+
+int xs__include::traverse(xs__schema &schema)
+{ return SOAP_OK;
+}
+
+void xs__include::schemaPtr(xs__schema *schema)
+{ schemaRef = schema;
+}
+
+xs__schema *xs__include::schemaPtr() const
+{ return schemaRef;
+}
+
+xs__redefine::xs__redefine()
+{ schemaLocation = NULL;
+  schemaRef = NULL;
+}
+
+int xs__redefine::preprocess(xs__schema &schema)
+{ if (vflag)
+    cerr << "Preprocessing schema redefine " << (schemaLocation?schemaLocation:"") << endl;
+  if (!schemaRef)
+  { if (schemaLocation)
+    { schemaRef = new xs__schema(schema.soap, schema.sourceLocation(), schemaLocation);
+      for (vector<xs__group>::iterator gp = schemaRef->group.begin(); gp != schemaRef->group.end(); ++gp)
+      { if ((*gp).name)
+        { for (vector<xs__group>::const_iterator g = group.begin(); g != group.end(); ++g)
+          { if ((*g).name && !strcmp((*gp).name, (*g).name))
+            { *gp = *g;
+              break;
+            }
+          }
+        }
+      }
+      for (vector<xs__attributeGroup>::iterator ag = schemaRef->attributeGroup.begin(); ag != schemaRef->attributeGroup.end(); ++ag)
+      { if ((*ag).name)
+        { for (vector<xs__attributeGroup>::const_iterator g = attributeGroup.begin(); g != attributeGroup.end(); ++g)
+          { if ((*g).name && !strcmp((*ag).name, (*g).name))
+            { *ag = *g;
+              break;
+            }
+          }
+        }
+      }
+      for (vector<xs__simpleType>::iterator st = schemaRef->simpleType.begin(); st != schemaRef->simpleType.end(); ++st)
+      { if ((*st).name)
+        { for (vector<xs__simpleType>::const_iterator s = simpleType.begin(); s != simpleType.end(); ++s)
+          { if ((*s).name && !strcmp((*st).name, (*s).name))
+            { *st = *s;
+              break;
+            }
+          }
+        }
+      }
+      for (vector<xs__complexType>::iterator ct = schemaRef->complexType.begin(); ct != schemaRef->complexType.end(); ++ct)
+      { if ((*ct).name)
+        { for (vector<xs__complexType>::const_iterator c = complexType.begin(); c != complexType.end(); ++c)
+          { if ((*c).name && !strcmp((*ct).name, (*c).name))
+            { *ct = *c;
+              break;
+            }
+          }
+        }
+      }
+    }
+  }
+  return SOAP_OK;
+}
+
+int xs__redefine::traverse(xs__schema &schema)
+{ return SOAP_OK;
+}
+
+void xs__redefine::schemaPtr(xs__schema *schema)
+{ schemaRef = schema;
+}
+
+xs__schema *xs__redefine::schemaPtr() const
+{ return schemaRef;
+}
+
+xs__import::xs__import()
+{ namespace_ = NULL;
+  schemaLocation = NULL;
+  schemaRef = NULL;
+}
+
+int xs__import::traverse(xs__schema &schema)
+{ if (vflag)
+    cerr << "Analyzing schema import " << (namespace_?namespace_:"") << endl;
+  if (!schemaRef)
+  { bool found = false;
+    if (namespace_)
+    { for (SetOfString::const_iterator i = exturis.begin(); i != exturis.end(); ++i)
+      { if (!soap_tag_cmp(namespace_, *i))
+        { found = true;
+          break;
+        }
+      }
+    }
+    else
+      fprintf(stderr, "Warning: no namespace in <import>\n");
+    if (!found && !iflag) // don't import any of the schemas in the .nsmap table (or when -i option is used)
+    { const char *s = schemaLocation;
+      if (!s)
+        s = namespace_;
+      schemaRef = new xs__schema(schema.soap, schema.sourceLocation(), s);
+      if (schemaPtr())
+      { if (!schemaPtr()->targetNamespace || !*schemaPtr()->targetNamespace)
+          schemaPtr()->targetNamespace = namespace_;
+        else if (!namespace_ || strcmp(schemaPtr()->targetNamespace, namespace_))
+          fprintf(stderr, "Warning: schema import '%s' with schema targetNamespace '%s' mismatch\n", namespace_?namespace_:"", schemaPtr()->targetNamespace);
+        schemaPtr()->traverse();
+      }
+    }
+  }
+  return SOAP_OK;
+}
+
+void xs__import::schemaPtr(xs__schema *schema)
+{ schemaRef = schema;
+}
+
+xs__schema *xs__import::schemaPtr() const
+{ return schemaRef;
+}
+
+xs__attribute::xs__attribute()
+{ schemaRef = NULL;
+  attributeRef = NULL;
+  simpleTypeRef = NULL;
+}
+
+int xs__attribute::traverse(xs__schema &schema)
+{ if (vflag)
+    cerr << "Analyzing schema attribute " << (name?name:"") << endl;
+  schemaRef = &schema;
+  const char *token = qname_token(ref, schema.targetNamespace);
+  attributeRef = NULL;
+  if (token)
+  { for (vector<xs__attribute>::iterator i = schema.attribute.begin(); i != schema.attribute.end(); ++i)
+      if (!strcmp((*i).name, token))
+      { attributeRef = &(*i);
+        if (vflag)
+          cerr << "Found attribute " << (name?name:"") << " ref " << (token?token:"") << endl;
+        break;
+      }
+  }
+  else
+  { for (vector<xs__import>::iterator i = schema.import.begin(); i != schema.import.end(); ++i)
+    { xs__schema *s = (*i).schemaPtr();
+      if (s)
+      { token = qname_token(ref, s->targetNamespace);
+        if (token)
+        { for (vector<xs__attribute>::iterator j = s->attribute.begin(); j != s->attribute.end(); ++j)
+            if (!strcmp((*j).name, token))
+            { attributeRef = &(*j);
+              if (vflag)
+                cerr << "Found attribute " << (name?name:"") << " ref " << (token?token:"") << endl;
+              break;
+            }
+          break;
+        }
+      }
+    }
+  }
+  if (simpleType)
+  { simpleType->traverse(schema);
+    simpleTypeRef = simpleType;
+  }
+  else
+  { token = qname_token(type, schema.targetNamespace);
+    simpleTypeRef = NULL;
+    if (token)
+    { for (vector<xs__simpleType>::iterator i = schema.simpleType.begin(); i != schema.simpleType.end(); ++i)
+        if (!strcmp((*i).name, token))
+        { simpleTypeRef = &(*i);
+          if (vflag)
+            cerr << "Found attribute " << (name?name:"") << " type " << (token?token:"") << endl;
+          break;
+        }
+    }
+    else
+    { for (vector<xs__import>::iterator i = schema.import.begin(); i != schema.import.end(); ++i)
+      { xs__schema *s = (*i).schemaPtr();
+        if (s)
+        { token = qname_token(type, s->targetNamespace);
+          if (token)
+          { for (vector<xs__simpleType>::iterator j = s->simpleType.begin(); j != s->simpleType.end(); ++j)
+              if (!strcmp((*j).name, token))
+              { simpleTypeRef = &(*j);
+                if (vflag)
+                  cerr << "Found attribute " << (name?name:"") << " type " << (token?token:"") << endl;
+                break;
+              }
+            break;
+          }
+        }
+      }
+    }
+  }
+  if (!attributeRef && !simpleTypeRef)
+  { if (ref)
+    { if (is_builtin_qname(ref))
+        schema.builtinAttribute(ref);
+      else
+        cerr << "Warning: could not find attribute '" << (name?name:"") << "' ref '" << ref << "' in schema " << (schema.targetNamespace?schema.targetNamespace:"") << endl;
+    }
+    else if (type)
+    { if (is_builtin_qname(type))
+        schema.builtinType(type);
+      else
+        cerr << "Warning: could not find attribute '" << (name?name:"") << "' type '" << type << "' in schema " << (schema.targetNamespace?schema.targetNamespace:"") << endl;
+    }
+  }
+  return SOAP_OK;
+}
+
+void xs__attribute::schemaPtr(xs__schema *schema)
+{ schemaRef = schema;
+}
+
+xs__schema* xs__attribute::schemaPtr() const
+{ return schemaRef;
+}
+
+void xs__attribute::attributePtr(xs__attribute *attribute)
+{ attributeRef = attribute;
+}
+
+void xs__attribute::simpleTypePtr(xs__simpleType *simpleType)
+{ simpleTypeRef = simpleType;
+}
+
+xs__attribute *xs__attribute::attributePtr() const
+{ return attributeRef;
+}
+
+xs__simpleType *xs__attribute::simpleTypePtr() const
+{ return simpleTypeRef;
+}
+
+xs__element::xs__element()
+{ schemaRef = NULL;
+  elementRef = NULL;
+  simpleTypeRef = NULL;
+  complexTypeRef = NULL;
+}
+
+int xs__element::traverse(xs__schema &schema)
+{ if (vflag)
+    cerr << "Analyzing schema element " << (name?name:"") << endl;
+  schemaRef = &schema;
+  const char *token = qname_token(ref, schema.targetNamespace);
+  elementRef = NULL;
+  if (token)
+  { for (vector<xs__element>::iterator i = schema.element.begin(); i != schema.element.end(); ++i)
+      if (!strcmp((*i).name, token))
+      { elementRef = &(*i);
+        if (vflag)
+          cerr << "Found element " << (name?name:"") << " ref " << (token?token:"") << endl;
+        break;
+      }
+  }
+  else
+  { for (vector<xs__import>::const_iterator i = schema.import.begin(); i != schema.import.end(); ++i)
+    { xs__schema *s = (*i).schemaPtr();
+      if (s)
+      { token = qname_token(ref, s->targetNamespace);
+        if (token)
+        { for (vector<xs__element>::iterator j = s->element.begin(); j != s->element.end(); ++j)
+          { if (!strcmp((*j).name, token))
+            { elementRef = &(*j);
+              if (vflag)
+                cerr << "Found element " << (name?name:"") << " ref " << (token?token:"") << endl;
+              break;
+            }
+	  }
+          break;
+        }
+      }
+    }
+  }
+  if (simpleType)
+  { simpleType->traverse(schema);
+    simpleTypeRef = simpleType;
+  }
+  else
+  { token = qname_token(type, schema.targetNamespace);
+    simpleTypeRef = NULL;
+    if (token)
+    { for (vector<xs__simpleType>::iterator i = schema.simpleType.begin(); i != schema.simpleType.end(); ++i)
+        if (!strcmp((*i).name, token))
+        { simpleTypeRef = &(*i);
+          if (vflag)
+            cerr << "Found element " << (name?name:"") << " simpleType " << (token?token:"") << endl;
+          break;
+        }
+    }
+    else
+    { for (vector<xs__import>::const_iterator i = schema.import.begin(); i != schema.import.end(); ++i)
+      { xs__schema *s = (*i).schemaPtr();
+        if (s)
+        { token = qname_token(type, s->targetNamespace);
+          if (token)
+          { for (vector<xs__simpleType>::iterator j = s->simpleType.begin(); j != s->simpleType.end(); ++j)
+            { if (!strcmp((*j).name, token))
+              { simpleTypeRef = &(*j);
+                if (vflag)
+                  cerr << "Found element " << (name?name:"") << " simpleType " << (token?token:"") << endl;
+                break;
+              }
+	    }
+            break;
+          }
+        }
+      }
+    }
+  }
+  if (complexType)
+  { complexType->traverse(schema);
+    complexTypeRef = complexType;
+  }
+  else
+  { token = qname_token(type, schema.targetNamespace);
+    complexTypeRef = NULL;
+    if (token)
+    { for (vector<xs__complexType>::iterator i = schema.complexType.begin(); i != schema.complexType.end(); ++i)
+        if (!strcmp((*i).name, token))
+        { complexTypeRef = &(*i);
+          if (vflag)
+            cerr << "Found element " << (name?name:"") << " complexType " << (token?token:"") << endl;
+          break;
+        }
+    }
+    else
+    { for (vector<xs__import>::const_iterator i = schema.import.begin(); i != schema.import.end(); ++i)
+      { xs__schema *s = (*i).schemaPtr();
+        if (s)
+        { token = qname_token(type, s->targetNamespace);
+          if (token)
+          { for (vector<xs__complexType>::iterator j = s->complexType.begin(); j != s->complexType.end(); ++j)
+            { if (!strcmp((*j).name, token))
+              { complexTypeRef = &(*j);
+                if (vflag)
+                  cerr << "Found element " << (name?name:"") << " complexType " << (token?token:"") << endl;
+                break;
+              }
+	    }
+            break;
+          }
+        }
+      }
+    }
+  }
+  token = qname_token(substitutionGroup, schema.targetNamespace);
+  if (token)
+  { for (vector<xs__element>::iterator i = schema.element.begin(); i != schema.element.end(); ++i)
+      if (!strcmp((*i).name, token))
+      { (*i).substitutions.push_back(this);
+        if (vflag)
+          cerr << "Found substitutionGroup element " << (name?name:"") << " for abstract element " << (token?token:"") << endl;
+        break;
+      }
+  }
+  else
+  { for (vector<xs__import>::const_iterator i = schema.import.begin(); i != schema.import.end(); ++i)
+    { xs__schema *s = (*i).schemaPtr();
+      if (s)
+      { token = qname_token(substitutionGroup, s->targetNamespace);
+        if (token)
+        { for (vector<xs__element>::iterator j = s->element.begin(); j != s->element.end(); ++j)
+          { if (!strcmp((*j).name, token))
+            { (*j).substitutions.push_back(this);
+              if (vflag)
+                cerr << "Found substitutionGroup element " << (name?name:"") << " for abstract element " << (token?token:"") << endl;
+              break;
+            }
+	  }
+          break;
+        }
+      }
+    }
+  }
+  if (!elementRef && !simpleTypeRef && !complexTypeRef)
+  { if (ref)
+    { if (is_builtin_qname(ref))
+        schema.builtinElement(ref);
+      else
+        cerr << "Warning: could not find element '" << (name?name:"") << "' ref '" << ref << "' in schema " << (schema.targetNamespace?schema.targetNamespace:"") << endl;
+    }
+    else if (type)
+    { if (is_builtin_qname(type))
+        schema.builtinType(type);
+      else
+        cerr << "Warning: could not find element '" << (name?name:"") << "' type '" << type << "' in schema " << (schema.targetNamespace?schema.targetNamespace:"") << endl;
+    }
+  }
+  return SOAP_OK;
+}
+
+void xs__element::schemaPtr(xs__schema *schema)
+{ schemaRef = schema;
+}
+
+xs__schema* xs__element::schemaPtr() const
+{ return schemaRef;
+}
+
+void xs__element::elementPtr(xs__element *element)
+{ elementRef = element;
+}
+
+void xs__element::simpleTypePtr(xs__simpleType *simpleType)
+{ simpleTypeRef = simpleType;
+}
+
+void xs__element::complexTypePtr(xs__complexType *complexType)
+{ complexTypeRef = complexType;
+}
+
+xs__element *xs__element::elementPtr() const
+{ return elementRef;
+}
+
+const std::vector<xs__element*>* xs__element::substitutionsPtr() const
+{ return &substitutions;
+}
+
+xs__simpleType *xs__element::simpleTypePtr() const
+{ return simpleTypeRef;
+}
+
+xs__complexType *xs__element::complexTypePtr() const
+{ return complexTypeRef;
+}
+
+xs__simpleType::xs__simpleType()
+{ level = 0;
+}
+
+int xs__simpleType::traverse(xs__schema &schema)
+{ if (vflag)
+    cerr << "Analyzing schema simpleType " << (name?name:"") << endl;
+  schemaRef = &schema;
+  if (list)
+    list->traverse(schema);
+  else if (restriction)
+    restriction->traverse(schema);
+  else if (union_)
+    union_->traverse(schema);
+  return SOAP_OK;
+}
+
+void xs__simpleType::schemaPtr(xs__schema *schema)
+{ schemaRef = schema;
+}
+
+xs__schema *xs__simpleType::schemaPtr() const
+{ return schemaRef;
+}
+
+int xs__simpleType::baseLevel()
+{ if (!level)
+  { if (restriction)
+    { level = -1;
+      if (restriction->simpleTypePtr())
+        level = restriction->simpleTypePtr()->baseLevel() + 1;
+      else
+        level = 2;
+    }
+    else if (list && list->restriction)
+    { level = -1;
+      if (list->restriction->simpleTypePtr())
+        level = list->restriction->simpleTypePtr()->baseLevel() + 1;
+      else
+        level = 2;
+    }
+    else
+      level = 1;
+  }
+  else if (level < 0)
+  { cerr << "Cyclic restriction/extension base dependency" << endl;
+  }
+  return level;
+}
+
+xs__complexType::xs__complexType()
+{ level = 0;
+}
+
+int xs__complexType::traverse(xs__schema &schema)
+{ if (vflag)
+    cerr << "Analyzing schema complexType " << (name?name:"") << endl;
+  schemaRef = &schema;
+  if (simpleContent)
+    simpleContent->traverse(schema);
+  else if (complexContent)
+    complexContent->traverse(schema);
+  else if (all)
+    all->traverse(schema);
+  else if (choice)
+    choice->traverse(schema);
+  else if (sequence)
+    sequence->traverse(schema);
+  else if (any)
+    any->traverse(schema);
+  for (vector<xs__attribute>::iterator at = attribute.begin(); at != attribute.end(); ++at)
+    (*at).traverse(schema);
+  for (vector<xs__attributeGroup>::iterator ag = attributeGroup.begin(); ag != attributeGroup.end(); ++ag)
+    (*ag).traverse(schema);
+  return SOAP_OK;
+}
+
+void xs__complexType::schemaPtr(xs__schema *schema)
+{ schemaRef = schema;
+}
+
+xs__schema *xs__complexType::schemaPtr() const
+{ return schemaRef;
+}
+
+int xs__complexType::baseLevel()
+{ if (!level)
+  { if (simpleContent)
+    { if (simpleContent->restriction)
+      { level = -1;
+        if (simpleContent->restriction->simpleTypePtr())
+          level = simpleContent->restriction->simpleTypePtr()->baseLevel() + 1;
+        else if (simpleContent->restriction->complexTypePtr())
+          level = simpleContent->restriction->complexTypePtr()->baseLevel() + 1;
+        else
+          level = 2;
+      }
+      else if (simpleContent->extension)
+      { level = -1;
+        if (simpleContent->extension->simpleTypePtr())
+          level = simpleContent->extension->simpleTypePtr()->baseLevel() + 1;
+        else if (simpleContent->extension->complexTypePtr())
+          level = simpleContent->extension->complexTypePtr()->baseLevel() + 1;
+        else
+          level = 2;
+      }
+    }
+    else if (complexContent)
+    { if (complexContent->restriction)
+      { level = -1;
+        if (complexContent->restriction->simpleTypePtr())
+          level = complexContent->restriction->simpleTypePtr()->baseLevel() + 1;
+        else if (complexContent->restriction->complexTypePtr())
+          level = complexContent->restriction->complexTypePtr()->baseLevel() + 1;
+        else
+          level = 2;
+      }
+      else if (complexContent->extension)
+      { level = -1;
+        if (complexContent->extension->simpleTypePtr())
+          level = complexContent->extension->simpleTypePtr()->baseLevel() + 1;
+        else if (complexContent->extension->complexTypePtr())
+          level = complexContent->extension->complexTypePtr()->baseLevel() + 1;
+        else
+          level = 2;
+      }
+    }
+    else
+      level = 1;
+  }
+  else if (level < 0)
+  { cerr << "Cyclic restriction/extension base dependency" << endl;
+  }
+  return level;
+}
+
+int xs__simpleContent::traverse(xs__schema &schema)
+{ if (vflag)
+    cerr << "Analyzing schema simpleContent" << endl;
+  if (extension)
+    extension->traverse(schema);
+  else if (restriction)
+    restriction->traverse(schema);
+  return SOAP_OK;
+}
+
+int xs__complexContent::traverse(xs__schema &schema)
+{ if (vflag)
+    cerr << "Analyzing schema complexContent" << endl;
+  if (extension)
+    extension->traverse(schema);
+  else if (restriction)
+    restriction->traverse(schema);
+  return SOAP_OK;
+}
+
+xs__extension::xs__extension()
+{ simpleTypeRef = NULL;
+  complexTypeRef = NULL;
+}
+
+int xs__extension::traverse(xs__schema &schema)
+{ if (vflag)
+    cerr << "Analyzing schema extension " << (base?base:"") << endl;
+  if (group)
+    group->traverse(schema);
+  else if (all)
+    all->traverse(schema);
+  else if (choice)
+    choice->traverse(schema);
+  else if (sequence)
+    sequence->traverse(schema);
+  for (vector<xs__attribute>::iterator at = attribute.begin(); at != attribute.end(); ++at)
+    (*at).traverse(schema);
+  for (vector<xs__attributeGroup>::iterator ag = attributeGroup.begin(); ag != attributeGroup.end(); ++ag)
+    (*ag).traverse(schema);
+  const char *token = qname_token(base, schema.targetNamespace);
+  simpleTypeRef = NULL;
+  if (token)
+  { for (vector<xs__simpleType>::iterator i = schema.simpleType.begin(); i != schema.simpleType.end(); ++i)
+      if (!strcmp((*i).name, token))
+      { simpleTypeRef = &(*i);
+        if (vflag)
+          cerr << "Found extension base type " << (token?token:"") << endl;
+        break;
+      }
+  }
+  else
+  { for (vector<xs__import>::const_iterator i = schema.import.begin(); i != schema.import.end(); ++i)
+    { xs__schema *s = (*i).schemaPtr();
+      if (s)
+      { token = qname_token(base, s->targetNamespace);
+        if (token)
+        { for (vector<xs__simpleType>::iterator j = s->simpleType.begin(); j != s->simpleType.end(); ++j)
+            if (!strcmp((*j).name, token))
+            { simpleTypeRef = &(*j);
+              if (vflag)
+                cerr << "Found extension base type " << (token?token:"") << endl;
+              break;
+            }
+          break;
+        }
+      }
+    }
+  }
+  token = qname_token(base, schema.targetNamespace);
+  complexTypeRef = NULL;
+  if (token)
+  { for (vector<xs__complexType>::iterator i = schema.complexType.begin(); i != schema.complexType.end(); ++i)
+      if (!strcmp((*i).name, token))
+      { complexTypeRef = &(*i);
+        if (vflag)
+          cerr << "Found extension base type " << (token?token:"") << endl;
+        break;
+      }
+  }
+  else
+  { for (vector<xs__import>::const_iterator i = schema.import.begin(); i != schema.import.end(); ++i)
+    { xs__schema *s = (*i).schemaPtr();
+      if (s)
+      { token = qname_token(base, s->targetNamespace);
+        if (token)
+        { for (vector<xs__complexType>::iterator j = s->complexType.begin(); j != s->complexType.end(); ++j)
+            if (!strcmp((*j).name, token))
+            { complexTypeRef = &(*j);
+              if (vflag)
+                cerr << "Found extension base type " << (token?token:"") << endl;
+              break;
+            }
+          break;
+        }
+      }
+    }
+  }
+  if (!simpleTypeRef && !complexTypeRef)
+  { if (base)
+    { if (is_builtin_qname(base))
+        schema.builtinType(base);
+      else
+        cerr << "Warning: could not find extension base type '" << base << "' in schema " << (schema.targetNamespace?schema.targetNamespace:"") << endl;
+    }
+    else
+      cerr << "Extension has no base" << endl;
+  }
+  return SOAP_OK;
+}
+
+void xs__extension::simpleTypePtr(xs__simpleType *simpleType)
+{ simpleTypeRef = simpleType;
+}
+
+void xs__extension::complexTypePtr(xs__complexType *complexType)
+{ complexTypeRef = complexType;
+}
+
+xs__simpleType *xs__extension::simpleTypePtr() const
+{ return simpleTypeRef;
+}
+
+xs__complexType *xs__extension::complexTypePtr() const
+{ return complexTypeRef;
+}
+
+xs__restriction::xs__restriction()
+{ simpleTypeRef = NULL;
+  complexTypeRef = NULL;
+}
+
+int xs__restriction::traverse(xs__schema &schema)
+{ if (vflag)
+    cerr << "Analyzing schema restriction " << (base?base:"") << endl;
+  if (group)
+    group->traverse(schema);
+  else if (all)
+    all->traverse(schema);
+  else if (choice)
+    choice->traverse(schema);
+  else if (sequence)
+    sequence->traverse(schema);
+  else
+  { for (vector<xs__enumeration>::iterator en = enumeration.begin(); en != enumeration.end(); ++en)
+      (*en).traverse(schema);
+    for (vector<xs__pattern>::iterator pn = pattern.begin(); pn != pattern.end(); ++pn)
+      (*pn).traverse(schema);
+  }
+  for (vector<xs__attribute>::iterator at = attribute.begin(); at != attribute.end(); ++at)
+    (*at).traverse(schema);
+  const char *token = qname_token(base, schema.targetNamespace);
+  simpleTypeRef = NULL;
+  if (token)
+  { for (vector<xs__simpleType>::iterator i = schema.simpleType.begin(); i != schema.simpleType.end(); ++i)
+      if (!strcmp((*i).name, token))
+      { simpleTypeRef = &(*i);
+        if (vflag)
+          cerr << "Found restriction base type " << (token?token:"") << endl;
+        break;
+      }
+  }
+  else
+  { for (vector<xs__import>::const_iterator i = schema.import.begin(); i != schema.import.end(); ++i)
+    { xs__schema *s = (*i).schemaPtr();
+      if (s)
+      { token = qname_token(base, s->targetNamespace);
+        if (token)
+        { for (vector<xs__simpleType>::iterator j = s->simpleType.begin(); j != s->simpleType.end(); ++j)
+            if (!strcmp((*j).name, token))
+            { simpleTypeRef = &(*j);
+              if (vflag)
+                cerr << "Found restriction base type " << (token?token:"") << endl;
+              break;
+            }
+          break;
+        }
+      }
+    }
+  }
+  token = qname_token(base, schema.targetNamespace);
+  complexTypeRef = NULL;
+  if (token)
+  { for (vector<xs__complexType>::iterator i = schema.complexType.begin(); i != schema.complexType.end(); ++i)
+      if (!strcmp((*i).name, token))
+      { complexTypeRef = &(*i);
+        if (vflag)
+          cerr << "Found restriction base type " << (token?token:"") << endl;
+        break;
+      }
+  }
+  else
+  { for (vector<xs__import>::const_iterator i = schema.import.begin(); i != schema.import.end(); ++i)
+    { xs__schema *s = (*i).schemaPtr();
+      if (s)
+      { token = qname_token(base, s->targetNamespace);
+        if (token)
+        { for (vector<xs__complexType>::iterator j = s->complexType.begin(); j != s->complexType.end(); ++j)
+            if (!strcmp((*j).name, token))
+            { complexTypeRef = &(*j);
+              if (vflag)
+                cerr << "Found restriction base type " << (token?token:"") << endl;
+              break;
+            }
+          break;
+        }
+      }
+    }
+  }
+  if (!simpleTypeRef && !complexTypeRef)
+  { if (base)
+    { if (is_builtin_qname(base))
+        schema.builtinType(base);
+      else
+        cerr << "Warning: could not find restriction base type '" << base << "' in schema " << (schema.targetNamespace?schema.targetNamespace:"") << endl;
+    }
+    else
+      cerr << "Restriction has no base" << endl;
+  }
+  return SOAP_OK;
+}
+
+void xs__restriction::simpleTypePtr(xs__simpleType *simpleType)
+{ simpleTypeRef = simpleType;
+}
+
+void xs__restriction::complexTypePtr(xs__complexType *complexType)
+{ complexTypeRef = complexType;
+}
+
+xs__simpleType *xs__restriction::simpleTypePtr() const
+{ return simpleTypeRef;
+}
+
+xs__complexType *xs__restriction::complexTypePtr() const
+{ return complexTypeRef;
+}
+
+xs__list::xs__list()
+{ itemTypeRef = NULL;
+}
+
+int xs__list::traverse(xs__schema &schema)
+{ if (vflag)
+    cerr << "Analyzing schema list" << endl;
+  if (restriction)
+    restriction->traverse(schema);
+  for (vector<xs__simpleType>::iterator i = simpleType.begin(); i != simpleType.end(); ++i)
+    (*i).traverse(schema);
+  itemTypeRef = NULL;
+  const char *token = qname_token(itemType, schema.targetNamespace);
+  if (token)
+  { for (vector<xs__simpleType>::iterator i = schema.simpleType.begin(); i != schema.simpleType.end(); ++i)
+      if (!strcmp((*i).name, token))
+      { itemTypeRef = &(*i);
+        if (vflag)
+          cerr << "Found list itemType " << (token?token:"") << endl;
+        break;
+      }
+  }
+  else
+  { for (vector<xs__import>::const_iterator i = schema.import.begin(); i != schema.import.end(); ++i)
+    { xs__schema *s = (*i).schemaPtr();
+      if (s)
+      { token = qname_token(itemType, s->targetNamespace);
+        if (token)
+        { for (vector<xs__simpleType>::iterator j = s->simpleType.begin(); j != s->simpleType.end(); ++j)
+            if (!strcmp((*j).name, token))
+            { itemTypeRef = &(*j);
+              if (vflag)
+                cerr << "Found list itemType " << (token?token:"") << endl;
+              break;
+            }
+          break;
+        }
+      }
+    }
+  }
+  if (itemType && !itemTypeRef)
+  { if (is_builtin_qname(itemType))
+      schema.builtinType(itemType);
+    else
+      cerr << "Warning: could not find list itemType '" << itemType << "' in schema " << (schema.targetNamespace?schema.targetNamespace:"") << endl;
+  }
+  return SOAP_OK;
+}
+
+void xs__list::itemTypePtr(xs__simpleType *simpleType)
+{ itemTypeRef = simpleType;
+}
+
+xs__simpleType *xs__list::itemTypePtr() const
+{ return itemTypeRef;
+}
+
+int xs__union::traverse(xs__schema &schema)
+{ if (vflag)
+    cerr << "Analyzing schema union" << endl;
+  for (vector<xs__simpleType>::iterator i = simpleType.begin(); i != simpleType.end(); ++i)
+    (*i).traverse(schema);
+  return SOAP_OK;
+}
+
+int xs__all::traverse(xs__schema &schema)
+{ if (vflag)
+    cerr << "Analyzing schema all" << endl;
+  for (vector<xs__element>::iterator i = element.begin(); i != element.end(); ++i)
+    (*i).traverse(schema);
+  return SOAP_OK;
+}
+
+xs__choice::xs__choice()
+{ schemaRef = NULL;
+}
+
+int xs__choice::traverse(xs__schema &schema)
+{ if (vflag)
+    cerr << "Analyzing schema choice" << endl;
+  schemaRef = &schema;
+  for (vector<xs__element>::iterator el = element.begin(); el != element.end(); ++el)
+    (*el).traverse(schema);
+  for (vector<xs__group>::iterator gp = group.begin(); gp != group.end(); ++gp)
+    (*gp).traverse(schema);
+  for (vector<xs__sequence*>::iterator sq = sequence.begin(); sq != sequence.end(); ++sq)
+    (*sq)->traverse(schema);
+  for (vector<xs__any>::iterator an = any.begin(); an != any.end(); ++an)
+    (*an).traverse(schema);
+  return SOAP_OK;
+}
+
+void xs__choice::schemaPtr(xs__schema *schema)
+{ schemaRef = schema;
+}
+
+xs__schema *xs__choice::schemaPtr() const
+{ return schemaRef;
+}
+
+int xs__sequence::traverse(xs__schema &schema)
+{ if (vflag)
+    cerr << "Analyzing schema sequence" << endl;
+  for (vector<xs__element>::iterator el = element.begin(); el != element.end(); ++el)
+    (*el).traverse(schema);
+  for (vector<xs__group>::iterator gp = group.begin(); gp != group.end(); ++gp)
+    (*gp).traverse(schema);
+  for (vector<xs__choice>::iterator ch = choice.begin(); ch != choice.end(); ++ch)
+    (*ch).traverse(schema);
+  for (vector<xs__sequence*>::iterator sq = sequence.begin(); sq != sequence.end(); ++sq)
+    (*sq)->traverse(schema);
+  for (vector<xs__any>::iterator an = any.begin(); an != any.end(); ++an)
+    (*an).traverse(schema);
+  return SOAP_OK;
+}
+
+xs__attributeGroup::xs__attributeGroup()
+{ schemaRef = NULL;
+  attributeGroupRef = NULL;
+}
+
+int xs__attributeGroup::traverse(xs__schema& schema)
+{ if (vflag)
+    cerr << "attributeGroup" << endl;
+  schemaRef = &schema;
+  for (vector<xs__attribute>::iterator at = attribute.begin(); at != attribute.end(); ++at)
+    (*at).traverse(schema);
+  for (vector<xs__attributeGroup>::iterator ag = attributeGroup.begin(); ag != attributeGroup.end(); ++ag)
+    (*ag).traverse(schema);
+  attributeGroupRef = NULL;
+  if (ref)
+  { const char *token = qname_token(ref, schema.targetNamespace);
+    if (token)
+    { for (vector<xs__attributeGroup>::iterator i = schema.attributeGroup.begin(); i != schema.attributeGroup.end(); ++i)
+        if (!strcmp((*i).name, token))
+        { attributeGroupRef = &(*i);
+          if (vflag)
+              cerr << "Found attributeGroup " << (name?name:"") << " ref " << (token?token:"") << endl;
+          break;
+        }
+    }
+    else
+    { for (vector<xs__import>::const_iterator i = schema.import.begin(); i != schema.import.end(); ++i)
+      { xs__schema *s = (*i).schemaPtr();
+        if (s)
+        { token = qname_token(ref, s->targetNamespace);
+          if (token)
+          { for (vector<xs__attributeGroup>::iterator j = s->attributeGroup.begin(); j != s->attributeGroup.end(); ++j)
+              if (!strcmp((*j).name, token))
+              { attributeGroupRef = &(*j);
+                if (vflag)
+                    cerr << "Found attribute Group " << (name?name:"") << " ref " << (token?token:"") << endl;
+                break;
+              }
+            break;
+          }
+        }
+      }
+    }
+    if (!attributeGroupRef)
+      cerr << "Warning: could not find attributeGroup '" << (name?name:"") << "' ref '" << (ref?ref:"") << "' in schema " << (schema.targetNamespace?schema.targetNamespace:"") << endl;
+  }
+  return SOAP_OK;
+}
+
+void xs__attributeGroup::schemaPtr(xs__schema *schema)
+{ schemaRef = schema;
+}
+
+void xs__attributeGroup::attributeGroupPtr(xs__attributeGroup *attributeGroup)
+{ attributeGroupRef = attributeGroup;
+}
+
+xs__schema *xs__attributeGroup::schemaPtr() const
+{ return schemaRef;
+}
+
+xs__attributeGroup *xs__attributeGroup::attributeGroupPtr() const
+{ return attributeGroupRef;
+}
+
+int xs__any::traverse(xs__schema &schema)
+{ if (vflag)
+    cerr << "Analyzing schema any" << endl;
+  for (vector<xs__element>::iterator i = element.begin(); i != element.end(); ++i)
+    (*i).traverse(schema);
+  return SOAP_OK;
+}
+
+xs__group::xs__group()
+{ schemaRef = NULL;
+  groupRef = NULL;
+}
+
+int xs__group::traverse(xs__schema &schema)
+{ if (vflag)
+    cerr << "Analyzing schema group" << endl;
+  schemaRef = &schema;
+  if (all)
+    all->traverse(schema);
+  else if (choice)
+    choice->traverse(schema);
+  else if (sequence)
+    sequence->traverse(schema);
+  groupRef = NULL;
+  if (ref)
+  { const char *token = qname_token(ref, schema.targetNamespace);
+    if (token)
+    { for (vector<xs__group>::iterator i = schema.group.begin(); i != schema.group.end(); ++i)
+        if (!strcmp((*i).name, token))
+        { groupRef = &(*i);
+          if (vflag)
+              cerr << "Found group " << (name?name:"") << " ref " << (token?token:"") << endl;
+          break;
+        }
+    }
+    else
+    { for (vector<xs__import>::const_iterator i = schema.import.begin(); i != schema.import.end(); ++i)
+      { xs__schema *s = (*i).schemaPtr();
+        if (s)
+        { token = qname_token(ref, s->targetNamespace);
+          if (token)
+          { for (vector<xs__group>::iterator j = s->group.begin(); j != s->group.end(); ++j)
+              if (!strcmp((*j).name, token))
+              { groupRef = &(*j);
+                if (vflag)
+                    cerr << "Found group " << (name?name:"") << " ref " << (token?token:"") << endl;
+                break;
+              }
+            break;
+          }
+        }
+      }
+    }
+    if (!groupRef)
+      cerr << "Warning: could not find group '" << (name?name:"") << "' ref '" << (ref?ref:"") << "' in schema " << (schema.targetNamespace?schema.targetNamespace:"") << endl;
+  }
+  return SOAP_OK;
+}
+
+void xs__group::schemaPtr(xs__schema *schema)
+{ schemaRef = schema;
+}
+
+xs__schema* xs__group::schemaPtr() const
+{ return schemaRef;
+}
+
+void xs__group::groupPtr(xs__group *group)
+{ groupRef = group;
+}
+
+xs__group* xs__group::groupPtr() const
+{ return groupRef;
+}
+
+int xs__enumeration::traverse(xs__schema &schema)
+{ if (vflag)
+    cerr << "Analyzing schema enumeration" << endl;
+  return SOAP_OK;
+}
+
+int xs__pattern::traverse(xs__schema &schema)
+{ if (vflag)
+    cerr << "Analyzing schema pattern" << endl;
+  return SOAP_OK;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	I/O
+//
+////////////////////////////////////////////////////////////////////////////////
+
+ostream &operator<<(ostream &o, const xs__schema &e)
+{ if (!e.soap)
+  { struct soap soap;
+    soap_init2(&soap, SOAP_IO_DEFAULT, SOAP_XML_TREE | SOAP_C_UTFSTRING);
+#ifdef WITH_NONAMESPACES
+    soap_set_namespaces(&soap, namespaces);
+#endif
+    e.soap_serialize(&soap);
+    soap_begin_send(&soap);
+    e.soap_out(&soap, "xs:schema", 0, NULL);
+    soap_end_send(&soap);
+    soap_end(&soap);
+    soap_done(&soap);
+  }
+  else
+  { ostream *os = e.soap->os;
+    e.soap->os = &o;
+    e.soap_serialize(e.soap);
+    soap_begin_send(e.soap);
+    e.soap_out(e.soap, "xs:schema", 0, NULL);
+    soap_end_send(e.soap);
+    e.soap->os = os;
+  }
+  return o;
+}
+
+istream &operator>>(istream &i, xs__schema &e)
+{ if (!e.soap)
+    e.soap = soap_new();
+#ifdef WITH_NONAMESPACES
+  soap_set_namespaces(e.soap, namespaces);
+#endif
+  istream *is = e.soap->is;
+  e.soap->is = &i;
+  if (soap_begin_recv(e.soap)
+   || !e.soap_in(e.soap, "xs:schema", NULL)
+   || soap_end_recv(e.soap))
+  { // handle error? Note: e.soap->error is set and app should check
+  }
+  e.soap->is = is;
+  return i;
+}
+
diff --git a/wsdl/schema.h b/wsdl/schema.h
new file mode 100644
index 0000000..d4f3692
--- /dev/null
+++ b/wsdl/schema.h
@@ -0,0 +1,488 @@
+/*
+
+schema.h
+
+XSD binding schema interface
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2006, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+*/
+
+//gsoap xs schema documentation:	XSD binding schema
+//gsoap xs schema namespace:		http://www.w3.org/2000/10/XMLSchema
+//gsoap xs schema elementForm:		qualified
+//gsoap xs schema attributeForm:	unqualified
+
+/* For the wsdl:arrayType attribute to support old style SOAP arrays: */
+//gsoap wsdl schema namespace:		http://schemas.xmlsoap.org/wsdl/
+
+#import "imports.h"
+
+class xs__schema;			// forward declaration
+class xs__simpleType;			// forward declaration
+class xs__complexType;			// forward declaration
+class xs__extension;			// forward declaration
+class xs__restriction;			// forward declaration
+class xs__sequence;			// forward declaration
+class xs__choice;			// forward declaration
+class xs__list;				// forward declaration
+class xs__union;			// forward declaration
+
+class xs__annotation
+{ public:
+	char				*documentation;
+};
+
+class xs__element
+{ public:
+	// @xsd__ID			id;
+	@xsd__NCName			name;
+	@xsd__QName			ref;
+	@xsd__QName			type;
+	@xsd__string			default_;
+	@xsd__string			fixed;
+	@xsd__boolean			nillable		= false;
+	@xsd__boolean			abstract		= false;
+	@xsd__QName			substitutionGroup;
+	@xsd__string			minOccurs;		// xsd:nonNegativeInteger
+	@xsd__string			maxOccurs;		// xsd:nonNegativeInteger|unbounded
+	xs__annotation			*annotation;
+	xs__simpleType			*simpleType;		// choice
+	xs__complexType			*complexType;		// choice
+  private:
+	xs__schema			*schemaRef;		// schema to which this belongs
+  	xs__element			*elementRef;		// traverse() finds ref
+  	xs__simpleType			*simpleTypeRef;		// traverse() finds type or = simpleType above
+  	xs__complexType			*complexTypeRef;	// traverse() finds type or = complexType above
+	std::vector<xs__element*>	substitutions;		// traverse() finds substitutionGroup elements for this abstract element
+  public:
+					xs__element();
+  	int				traverse(xs__schema&);
+	void				schemaPtr(xs__schema*);
+	void				elementPtr(xs__element*);
+	void				simpleTypePtr(xs__simpleType*);
+	void				complexTypePtr(xs__complexType*);
+	xs__schema			*schemaPtr() const;
+	xs__element			*elementPtr() const;
+	xs__simpleType			*simpleTypePtr() const;
+	xs__complexType			*complexTypePtr() const;
+	const std::vector<xs__element*>	*substitutionsPtr() const;
+};
+
+enum xs__attribute_use { optional, prohibited, required, default_, fixed_ };
+
+class xs__attribute
+{ public:
+	@xsd__NCName			name;
+	@xsd__QName			ref;
+	@xsd__QName			type;
+	@enum xs__attribute_use		use			= optional;
+	@xsd__string			value;
+	@xsd__QName			value_;			// also get QName value if attribute type is QName
+	@xsd__QName			wsdl__arrayType;	// extensibility attribute added to simplify WSDL parsing
+	xs__annotation			*annotation;
+	xs__simpleType			*simpleType;
+  private:
+	xs__schema			*schemaRef;		// schema to which this belongs
+  	xs__attribute			*attributeRef;		// traverse() finds ref
+  	xs__simpleType			*simpleTypeRef;		// traverse() finds type or = simpleType above
+  public:
+					xs__attribute();
+  	int				traverse(xs__schema&);
+	void				schemaPtr(xs__schema*);
+	void				attributePtr(xs__attribute*);
+	void				simpleTypePtr(xs__simpleType*);
+	xs__schema			*schemaPtr() const;
+	xs__attribute			*attributePtr() const;
+	xs__simpleType			*simpleTypePtr() const;
+};
+
+class xs__all
+{ public:
+	std::vector<xs__element>	element;
+  public:
+  	int				traverse(xs__schema&);
+};
+
+enum xs__processContents { strict, skip, lax };
+
+typedef char *xs__namespaceList;	// "##any" or "##other" or list of URI, "##targetNamespace", "##local"
+
+class xs__any
+{ public:
+	@xs__namespaceList		namespace_		= "##any";
+	@enum xs__processContents	processContents		= strict;
+	@xsd__string			minOccurs;		// xsd:nonNegativeInteger
+	@xsd__string			maxOccurs;		// xsd:nonNegativeInteger|unbounded
+	std::vector<xs__element>	element;
+  public:
+  	int				traverse(xs__schema&);
+};
+
+class xs__group
+{ public:
+	@xsd__NCName			name;
+	@xsd__QName			ref;
+	xs__annotation			*annotation;
+	xs__all				*all;			// choice
+	xs__choice			*choice;		// choice
+	xs__sequence			*sequence;		// choice
+  private:
+	xs__schema			*schemaRef;		// schema to which this belongs
+  	xs__group			*groupRef;		// traverse() finds ref
+  public:
+  					xs__group();
+  	int				traverse(xs__schema&);
+	void				schemaPtr(xs__schema*);
+	void				groupPtr(xs__group*);
+	xs__schema			*schemaPtr() const;
+	xs__group			*groupPtr() const;
+};
+
+class xs__choice
+{ public:
+	@xsd__string			minOccurs;		// xsd:nonNegativeInteger
+	@xsd__string			maxOccurs;		// xsd:nonNegativeInteger|unbounded
+	std::vector<xs__element>	element;
+	std::vector<xs__group>		group;
+	//std::vector<xs__choice>		choice;
+	std::vector<xs__sequence*>	sequence;
+	std::vector<xs__any>		any;
+	xs__annotation			*annotation;
+  private:
+	xs__schema			*schemaRef;		// schema to which this belongs
+  public:
+					xs__choice();
+  	int				traverse(xs__schema&);
+	void				schemaPtr(xs__schema*);
+	xs__schema			*schemaPtr() const;
+};
+
+class xs__sequence
+{ public:
+	@xsd__string			minOccurs;		// xsd:nonNegativeInteger
+	@xsd__string			maxOccurs;		// xsd:nonNegativeInteger|unbounded
+	std::vector<xs__element>	element;
+	std::vector<xs__group>		group;
+	std::vector<xs__choice>		choice;
+	std::vector<xs__sequence*>	sequence;
+	std::vector<xs__any>		any;
+	xs__annotation			*annotation;
+  public:
+  	int				traverse(xs__schema&);
+};
+
+class xs__anyAttribute
+{ public:
+	@xs__namespaceList		namespace_		= "##any";
+	@enum xs__processContents	processContents		= strict;
+};
+
+class xs__attributeGroup
+{ public:
+	@xsd__NCName			name;
+	@xsd__QName			ref;
+	xs__annotation			*annotation;
+	std::vector<xs__attribute>	attribute;
+	std::vector<xs__attributeGroup>	attributeGroup;
+	xs__anyAttribute		*anyAttribute;
+  private:
+	xs__schema			*schemaRef;
+  	xs__attributeGroup		*attributeGroupRef;
+  public:
+					xs__attributeGroup();
+  	int				traverse(xs__schema&);
+	void				schemaPtr(xs__schema*);
+	void				attributeGroupPtr(xs__attributeGroup*);
+	xs__schema			*schemaPtr() const;
+	xs__attributeGroup		*attributeGroupPtr() const;
+};
+
+class xs__enumeration
+{ public:
+	@xsd__string			value;
+	@xsd__QName			value_;	// also get QName value if base type is QName
+	xs__annotation			*annotation;
+  public:
+  	int				traverse(xs__schema&);
+};
+
+class xs__pattern
+{ public:
+	@xsd__string			value;
+  public:
+  	int				traverse(xs__schema&);
+};
+
+class xs__simpleContent
+{ public:
+	xs__extension			*extension;	// choice
+ 	xs__restriction			*restriction;	// choice
+  public:
+  	int				traverse(xs__schema&);
+};
+
+class xs__simpleType
+{ public:
+	@xsd__NMTOKEN			name;
+	xs__annotation			*annotation;
+ 	xs__restriction			*restriction;	// choice
+ 	xs__list			*list;		// choice
+ 	xs__union			*union_;	// choice
+  private:
+	xs__schema			*schemaRef;
+	int				level;
+  public:
+					xs__simpleType();
+  	int				traverse(xs__schema&);
+	void				schemaPtr(xs__schema*);
+	xs__schema			*schemaPtr() const;
+	int				baseLevel();
+};
+
+class xs__extension
+{ public:
+	@xsd__QName			base;
+	xs__group			*group;
+	xs__all				*all;
+	xs__choice			*choice;
+	xs__sequence			*sequence;
+	std::vector<xs__attribute>	attribute;
+	std::vector<xs__attributeGroup>	attributeGroup;
+	xs__anyAttribute		*anyAttribute;
+  private:
+  	xs__simpleType			*simpleTypeRef;		// traverse() finds type
+  	xs__complexType			*complexTypeRef;	// traverse() finds type
+  public:
+					xs__extension();
+  	int				traverse(xs__schema&);
+	void				simpleTypePtr(xs__simpleType*);
+	void				complexTypePtr(xs__complexType*);
+	xs__simpleType			*simpleTypePtr() const;
+	xs__complexType			*complexTypePtr() const;
+};
+
+class xs__length
+{ public:
+	@xsd__string			value;
+	@xsd__boolean			fixed;
+};
+
+class xs__whiteSpace
+{ public:
+	@xsd__string			value;
+};
+
+class xs__restriction
+{ public:
+	@xsd__QName			base;
+	xs__group			*group;		// not used in <simpleType><restriction>
+	xs__all				*all;		// not used in <simpleType><restriction>
+	xs__choice			*choice;	// not used in <simpleType><restriction>
+	xs__sequence			*sequence;	// not used in <simpleType><restriction>
+	std::vector<xs__attribute>	attribute;	// not used in <simpleType><restriction>
+	xs__anyAttribute		*anyAttribute;	// not used in <simpleType><restriction>
+	std::vector<xs__enumeration>	enumeration;
+	std::vector<xs__pattern>	pattern;
+	xs__whiteSpace			*whiteSpace;
+	xs__length			*length;
+	xs__length			*minLength;
+	xs__length			*maxLength;
+	xs__length			*precision;		// 2000 schema
+	xs__length			*scale;			// 2000 schema
+	xs__length			*totalDigits;		// 2001 schema
+	xs__length			*fractionDigits;	// 2001 schema
+	xs__length			*minInclusive;
+	xs__length			*maxInclusive;
+	xs__length			*minExclusive;
+	xs__length			*maxExclusive;
+	xs__annotation			*annotation;
+  private:
+  	xs__simpleType			*simpleTypeRef;		// traverse() finds type
+  	xs__complexType			*complexTypeRef;	// traverse() finds type
+  public:
+					xs__restriction();
+  	int				traverse(xs__schema&);
+	void				simpleTypePtr(xs__simpleType*);
+	void				complexTypePtr(xs__complexType*);
+	xs__simpleType			*simpleTypePtr() const;
+	xs__complexType			*complexTypePtr() const;
+};
+
+class xs__list
+{ public:
+	@xsd__QName			itemType;
+ 	xs__restriction			*restriction;	// choice
+	std::vector<xs__simpleType>	simpleType;	// choice
+  private:
+  	xs__simpleType			*itemTypeRef;
+  public:
+					xs__list();
+  	int				traverse(xs__schema&);
+	void				itemTypePtr(xs__simpleType*);
+	xs__simpleType			*itemTypePtr() const;
+};
+
+class xs__union
+{ public:
+	@xsd__NMTOKENS			memberTypes;	// check if NMTOKENS is ok???
+	std::vector<xs__simpleType>	simpleType;
+  public:
+  	int				traverse(xs__schema&);
+};
+
+class xs__complexContent
+{ public:
+	@xsd__boolean			mixed			= false;
+	xs__extension			*extension;
+ 	xs__restriction			*restriction;
+  public:
+  	int				traverse(xs__schema&);
+};
+
+class xs__complexType
+{ public:
+	@xsd__NMTOKEN			name;
+	@xsd__boolean			abstract		= false;
+	@xsd__boolean			mixed			= false;
+	xs__annotation			*annotation;
+	xs__simpleContent		*simpleContent;
+	xs__complexContent		*complexContent;
+	xs__all				*all;
+	xs__choice			*choice;
+	xs__sequence			*sequence;
+	xs__any				*any;
+	std::vector<xs__attribute>	attribute;
+	std::vector<xs__attributeGroup>	attributeGroup;
+	xs__anyAttribute		*anyAttribute;
+  private:
+	xs__schema			*schemaRef;
+  	int				level;
+  public:
+					xs__complexType();
+  	int				traverse(xs__schema&);
+	void				schemaPtr(xs__schema*);
+	xs__schema			*schemaPtr() const;
+	int				baseLevel();
+};
+
+class xs__import
+{ public:
+	@xsd__anyURI			namespace_;
+	@xsd__anyURI			schemaLocation;
+  private:
+  	xs__schema			*schemaRef;		// set by WSDL parser or via schemaLocation
+  public:
+					xs__import();
+  	int				traverse(xs__schema&);
+	void				schemaPtr(xs__schema*);
+	xs__schema			*schemaPtr() const;
+};
+
+class xs__include
+{ public:
+	@xsd__anyURI			schemaLocation;
+  private:
+  	xs__schema			*schemaRef;
+  public:
+					xs__include();
+  	int				preprocess(xs__schema&);
+  	int				traverse(xs__schema&);
+	void				schemaPtr(xs__schema*);
+	xs__schema			*schemaPtr() const;
+};
+	
+class xs__redefine
+{ public:
+	@xsd__anyURI			schemaLocation;
+	std::vector<xs__group>		group;
+	std::vector<xs__attributeGroup>	attributeGroup;
+	std::vector<xs__simpleType>	simpleType;
+	std::vector<xs__complexType>	complexType;
+  private:
+  	xs__schema			*schemaRef;
+  public:
+					xs__redefine();
+  	int				preprocess(xs__schema&);
+  	int				traverse(xs__schema&);
+	void				schemaPtr(xs__schema*);
+	xs__schema			*schemaPtr() const;
+};
+	
+enum xs__formChoice { unqualified, qualified };
+
+class xs__schema
+{ public:
+	@xsd__anyURI			targetNamespace;
+	@xsd__string			version;
+	@enum xs__formChoice		attributeFormDefault	= unqualified;
+	@enum xs__formChoice		elementFormDefault	= unqualified;
+	std::vector<xs__include>	include;
+	std::vector<xs__redefine>	redefine;
+	std::vector<xs__import>		import;
+	std::vector<xs__attribute>	attribute;
+	std::vector<xs__element>	element;
+	std::vector<xs__group>		group;
+	std::vector<xs__attributeGroup>	attributeGroup;
+	std::vector<xs__simpleType>	simpleType;
+	std::vector<xs__complexType>	complexType;
+  	struct soap			*soap;
+  private:
+	bool				updated;
+	char*				location;
+	int				redirs;
+	SetOfString			builtinTypeSet;
+	SetOfString			builtinElementSet;
+	SetOfString			builtinAttributeSet;
+  public:
+					xs__schema();
+					xs__schema(struct soap*);
+					xs__schema(struct soap*, const char*, const char*);
+	virtual				~xs__schema();
+	int				get(struct soap*);	// gSOAP getter is triggered after parsing
+	int				preprocess();
+	int				insert(xs__schema&);
+	int				traverse();
+	int				read(const char*, const char*);
+	void				sourceLocation(const char*);
+	const char*			sourceLocation();
+	int				error();
+	void				print_fault();
+	void				builtinType(const char*);
+	void				builtinElement(const char*);
+	void				builtinAttribute(const char*);
+	const SetOfString&		builtinTypes() const;
+	const SetOfString&		builtinElements() const;
+	const SetOfString&		builtinAttributes() const;
+	friend ostream&			operator<<(ostream&, const xs__schema&);
+	friend istream&			operator>>(istream&, xs__schema&);
+};
+
+extern ostream &operator<<(ostream &o, const xs__schema &e);
+extern istream &operator>>(istream &i, xs__schema &e);
+
diff --git a/wsdl/service.cpp b/wsdl/service.cpp
new file mode 100644
index 0000000..b1f361d
--- /dev/null
+++ b/wsdl/service.cpp
@@ -0,0 +1,1472 @@
+/*
+
+service.cpp
+
+Service structures.
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This part of the software is released under one of the following licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+TODO:	consider adding support for non-SOAP HTTP operations
+        add headerfault output definitions
+
+*/
+
+#include "types.h"
+#include "service.h"
+
+static void comment(const char *start, const char *middle, const char *end, const char *text);
+static void page(const char *page, const char *title, const char *text);
+static void section(const char *section, const char *title, const char *text);
+static void banner(const char*);
+static void ident();
+static void text(const char*);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Definitions methods
+//
+////////////////////////////////////////////////////////////////////////////////
+
+Definitions::Definitions()
+{ }
+
+void Definitions::collect(const wsdl__definitions &definitions)
+{ // Collect information: analyze WSDL definitions and imported definitions
+  analyze(definitions);
+  for (vector<wsdl__import>::const_iterator import = definitions.import.begin(); import != definitions.import.end(); ++import)
+    if ((*import).definitionsPtr())
+      analyze(*(*import).definitionsPtr());
+}
+
+void Definitions::analyze(const wsdl__definitions &definitions)
+{ // Analyze WSDL and build Service information
+  for (vector<wsdl__binding>::const_iterator binding = definitions.binding.begin(); binding != definitions.binding.end(); ++binding)
+  { // /definitions/binding/documentation
+    const char *binding_documentation = (*binding).documentation;
+    // /definitions/binding/soap:binding
+    soap__binding *soap__binding_ = (*binding).soap__binding_;
+    // /definitions/binding/soap:binding/@transport
+    const char *soap__binding_transport = NULL;
+    if (soap__binding_)
+      soap__binding_transport = soap__binding_->transport;
+    // /definitions/binding/soap:binding/@style
+    soap__styleChoice soap__binding_style = rpc;
+    if (soap__binding_ && soap__binding_->style)
+      soap__binding_style = *soap__binding_->style;
+    // /definitions/binding/http:binding
+    http__binding *http__binding_ = (*binding).http__binding_;
+    const char *http__binding_verb = NULL;
+    if (http__binding_)
+       http__binding_verb = http__binding_->verb;
+    // /definitions/binding/operation*
+    for (vector<wsdl__binding_operation>::const_iterator operation = (*binding).operation.begin(); operation != (*binding).operation.end(); ++operation)
+    { // /definitions/portType/operation/ associated with /definitions/binding/operation
+      wsdl__operation *wsdl__operation_ = (*operation).operationPtr();
+      // /definitions/binding/operation/soap:operation
+      soap__operation *soap__operation_ = (*operation).soap__operation_;
+      // /definitions/binding/operation/soap:operation/@style
+      soap__styleChoice soap__operation_style = soap__binding_style;
+      if (soap__operation_ && soap__operation_->style)
+        soap__operation_style = *soap__operation_->style;
+      // /definitions/binding/operation/http:operation
+      http__operation *http__operation_ = (*operation).http__operation_;
+      // /definitions/binding/operation/http:operation/@location
+      const char *http__operation_location = NULL;
+      if (http__operation_)
+        http__operation_location = http__operation_->location;
+      // /definitions/binding/operation/input
+      wsdl__ext_input *ext_input = (*operation).input;
+      // /definitions/binding/operation/output
+      wsdl__ext_output *ext_output = (*operation).output;
+      // /definitions/portType/operation
+      if (wsdl__operation_)
+      { wsdl__input *input = wsdl__operation_->input;
+        wsdl__output *output = wsdl__operation_->output;
+        if (http__operation_)
+        { // TODO: HTTP operation
+        }
+        else if (input && ext_input)
+	{ soap__body *input_body = ext_input->soap__body_;
+	  if (ext_input->mime__multipartRelated_)
+	  { for (vector<mime__part>::const_iterator part = ext_input->mime__multipartRelated_->part.begin(); part != ext_input->mime__multipartRelated_->part.end(); ++part)
+	      if ((*part).soap__body_)
+	      { input_body = (*part).soap__body_;
+	        break;
+	      }
+	  }
+          // MUST have an input, otherwise can't generate a service operation
+          if (input_body)
+          { const char *URI;
+            if (soap__operation_style == rpc)
+              URI = input_body->namespace_;
+            else
+              URI = definitions.targetNamespace;
+            if (URI)
+            { const char *prefix = types.nsprefix(NULL, URI);
+              const char *name = types.aname(NULL, NULL, (*binding).name); // name of service is binding name
+              Service *s = services[prefix];
+              if (!s)
+              { s = services[prefix] = new Service();
+                s->prefix = prefix;
+                s->URI = URI;
+                s->name = name;
+                s->transport = soap__binding_transport;
+                if ((*binding).portTypePtr())
+                  s->type = types.aname(NULL, NULL, (*binding).portTypePtr()->name);
+                else
+                  s->type = NULL;
+              }
+              for (vector<wsdl__service>::const_iterator service = definitions.service.begin(); service != definitions.service.end(); ++service)
+              { for (vector<wsdl__port>::const_iterator port = (*service).port.begin(); port != (*service).port.end(); ++port)
+                { if ((*port).bindingPtr() == &(*binding))
+                  { if ((*port).soap__address_)
+                      s->location.insert((*port).soap__address_->location);
+                    // TODO: HTTP address for HTTP operations
+                    // if ((*port).http__address_)
+                      // http__address_location = http__address_->location;
+                    if ((*service).documentation)
+                      s->service_documentation[(*service).name] = (*service).documentation;
+                    if ((*port).documentation && (*port).name)
+                      s->port_documentation[(*port).name] = (*port).documentation;
+                    if (binding_documentation)
+                      s->binding_documentation[(*binding).name] = binding_documentation;
+                  }
+                }
+              }
+              Operation *o = new Operation();
+              o->name = types.aname(NULL, NULL, wsdl__operation_->name);
+              o->prefix = prefix;
+              o->URI = URI;
+              o->style = soap__operation_style;
+              o->documentation = wsdl__operation_->documentation;
+              o->operation_documentation = (*operation).documentation;
+              o->parameterOrder = wsdl__operation_->parameterOrder;
+              if ((*operation).soap__operation_)
+                o->soapAction = (*operation).soap__operation_->soapAction;
+              else
+              { o->soapAction = "";
+                // determine if we use SOAP 1.2 in which case soapAction is absent, this is a bit of a hack due to the lack of WSDL1.1/SOAP1.2 support and better alternatives
+                for (Namespace *p = definitions.soap->local_namespaces; p && p->id; p++)
+                { if (p->out && !strcmp(p->id, "soap") && !strcmp(p->out, "http://schemas.xmlsoap.org/wsdl/soap12/"))
+                  { o->soapAction = NULL;
+                    break;
+                  }
+                }
+              }
+              o->input = new Message();
+              o->input->name = (*operation).name; // RPC uses operation/@name
+              if (soap__operation_style == rpc && !input_body->namespace_)
+              { o->input->URI = "";
+                fprintf(stderr, "Error: no soap:body namespace attribute\n");
+              }
+              else
+                o->input->URI = input_body->namespace_;
+              o->input->use = input_body->use;
+              o->input->encodingStyle = input_body->encodingStyle;
+              o->input->message = input->messagePtr();
+              o->input->part = NULL;
+	      o->input->multipartRelated = ext_input->mime__multipartRelated_;
+	      o->input->content = NULL;
+	      if (ext_input->mime__multipartRelated_ && !ext_input->mime__multipartRelated_->part.empty())
+                o->input->header = ext_input->mime__multipartRelated_->part.front().soap__header_;
+	      else
+                o->input->header = ext_input->soap__header_;
+	      if (ext_input->mime__multipartRelated_ && !ext_input->mime__multipartRelated_->part.empty() && ext_input->mime__multipartRelated_->part.front().soap__body_)
+	        o->input->body_parts = ext_input->mime__multipartRelated_->part.front().soap__body_->parts;
+              else
+	        o->input->body_parts = input_body->parts;
+	      if (ext_input->dime__message_)
+	        o->input->layout = ext_input->dime__message_->layout;
+	      else
+	        o->input->layout = NULL;
+              o->input->documentation = input->documentation;
+              o->input->ext_documentation = ext_input->documentation;
+              if (soap__operation_style == document)
+                o->input_name = types.oname("__", o->URI, o->input->name);
+              else
+                o->input_name = types.oname(NULL, o->input->URI, o->input->name);
+              if (output && ext_output)
+	      { soap__body *output_body = ext_output->soap__body_;
+                if (ext_output->mime__multipartRelated_)
+	        { for (vector<mime__part>::const_iterator part = ext_output->mime__multipartRelated_->part.begin(); part != ext_output->mime__multipartRelated_->part.end(); ++part)
+	            if ((*part).soap__body_)
+	            { output_body = (*part).soap__body_;
+	              break;
+	            }
+		}
+		if (ext_output->mime__content_)
+                { o->output = new Message();
+                  o->output->name = NULL;
+                  o->output->URI = NULL;
+                  o->output->encodingStyle = NULL;
+                  o->output->body_parts = NULL;
+                  o->output->part = NULL;
+                  o->output->multipartRelated = NULL;
+                  o->output->content = ext_output->mime__content_;
+                  o->output->message = output->messagePtr();
+                  o->output->layout = NULL;
+                  o->output->documentation = output->documentation;
+                  o->output->ext_documentation = ext_output->documentation;
+		}
+		else if (output_body)
+                { o->output = new Message();
+                  o->output->name = (*operation).name; // RPC uses operation/@name with suffix 'Response' as set below
+                  o->output->use = output_body->use;
+                  // the code below is a hack around the RPC encoded response message element tag mismatch with Axis:
+                  if (!output_body->namespace_ || output_body->use == encoded)
+                    o->output->URI = o->input->URI; // encoded seems (?) to require the request's namespace
+                  else
+                    o->output->URI = output_body->namespace_;
+                  o->output->encodingStyle = output_body->encodingStyle;
+                  o->output->message = output->messagePtr();
+                  o->output->part = NULL;
+	          o->output->multipartRelated = ext_output->mime__multipartRelated_;
+                  o->output->content = NULL;
+	          if (ext_output->mime__multipartRelated_ && !ext_output->mime__multipartRelated_->part.empty())
+                    o->output->header = ext_output->mime__multipartRelated_->part.front().soap__header_;
+	          else
+                    o->output->header = ext_output->soap__header_;
+	          if (ext_output->mime__multipartRelated_ && !ext_output->mime__multipartRelated_->part.empty() && ext_output->mime__multipartRelated_->part.front().soap__body_)
+	            o->output->body_parts = ext_output->mime__multipartRelated_->part.front().soap__body_->parts;
+                  else
+	            o->output->body_parts = output_body->parts;
+	          if (ext_output->dime__message_)
+	            o->output->layout = ext_output->dime__message_->layout;
+	          else
+	            o->output->layout = NULL;
+                  o->output->documentation = output->documentation;
+                  o->output->ext_documentation = ext_output->documentation;
+                  char *s = (char*)soap_malloc(definitions.soap, strlen(o->output->name) + 9);
+                  strcpy(s, o->output->name);
+                  strcat(s, "Response");
+                  if (soap__operation_style == document)
+                    o->output_name = types.oname("__", o->URI, s);
+                  else
+                    o->output_name = types.oname(NULL, o->output->URI, s);
+	        }
+              }
+              else
+              { o->output_name = NULL;
+                o->output = NULL;
+              }
+              // collect input headers and headerfaults
+              if (ext_input)
+              { const vector<soap__header> *soap__header_ = NULL;
+		// check if soap header is in mime:multipartRelated
+	        if (ext_input->mime__multipartRelated_)
+                { for (vector<mime__part>::const_iterator part = ext_input->mime__multipartRelated_->part.begin(); part != ext_input->mime__multipartRelated_->part.end(); ++part)
+                  if (!(*part).soap__header_.empty())
+                  { soap__header_ = &(*part).soap__header_;
+		    break;
+		  }
+		}
+		if (!soap__header_)
+		  soap__header_ = &ext_input->soap__header_;
+	        for (vector<soap__header>::const_iterator header = soap__header_->begin(); header != soap__header_->end(); ++header)
+                { Message *h = new Message();
+                  h->message = (*header).messagePtr();
+	          h->body_parts = NULL;
+                  h->part = (*header).partPtr();
+                  h->URI = (*header).namespace_;
+                  if (h->part && h->part->element)
+                    h->name = types.aname(NULL, NULL, h->part->element);
+                  else if (h->URI && h->part && h->part->name && h->part->type)
+                    h->name = types.aname(NULL, h->URI, h->part->name);
+                  else
+                  { fprintf(stderr, "Error in SOAP Header part definition: input part '%s' missing?\n", h->part && h->part->name ? h->part->name : "?");
+                    h->name = "";
+                  }
+                  h->encodingStyle = (*header).encodingStyle;
+                  h->use = (*header).use;
+		  h->multipartRelated = NULL;
+		  h->content = NULL;
+		  h->layout = NULL;
+                  h->ext_documentation = NULL;	// TODO: add document content
+                  h->documentation = NULL;		// TODO: add document content
+                  s->header[h->name] = h;
+                  for (vector<soap__headerfault>::const_iterator headerfault = (*header).headerfault.begin(); headerfault != (*header).headerfault.end(); ++headerfault)
+                  { // TODO: complete headerfault processing. This is rarely used.
+                  }
+                }
+              }
+              // collect output headers and headerfaults
+              if (ext_output)
+              { const vector<soap__header> *soap__header_ = NULL;
+		// check if soap header is in mime:multipartRelated
+	        if (ext_output->mime__multipartRelated_)
+                { for (vector<mime__part>::const_iterator part = ext_output->mime__multipartRelated_->part.begin(); part != ext_output->mime__multipartRelated_->part.end(); ++part)
+                  if (!(*part).soap__header_.empty())
+                  { soap__header_ = &(*part).soap__header_;
+		    break;
+		  }
+		}
+		if (!soap__header_)
+		  soap__header_ = &ext_output->soap__header_;
+                for (vector<soap__header>::const_iterator header = soap__header_->begin(); header != soap__header_->end(); ++header)
+                { Message *h = new Message();
+                  h->message = (*header).messagePtr();
+	          h->body_parts = NULL;
+    	          h->part = (*header).partPtr();
+    	          h->URI = (*header).namespace_;
+    	          if (h->part && h->part->element)
+    	            h->name = types.aname(NULL, NULL, h->part->element);
+    	          else if (h->URI && h->part && h->part->name && h->part->type)
+    	            h->name = types.aname(NULL, h->URI, h->part->name);
+    	          else
+                  { fprintf(stderr, "Error in SOAP Header part definition: output part '%s' missing?\n", h->part && h->part->name ? h->part->name : "?");
+    	            h->name = "";
+    	          }
+    	          h->encodingStyle = (*header).encodingStyle;
+    	          h->use = (*header).use;
+		  h->multipartRelated = NULL;
+		  h->content = NULL;
+		  h->layout = NULL;
+    	          h->ext_documentation = NULL;	// TODO: add document content
+    	          h->documentation = NULL;	// TODO: add document content
+    	          s->header[h->name] = h;
+    	          for (vector<soap__headerfault>::const_iterator headerfault = (*header).headerfault.begin(); headerfault != (*header).headerfault.end(); ++headerfault)
+    	          { // TODO: complete headerfault processing. This is rarely used.
+    	          }
+    	        }
+    	      }
+    	      // collect faults
+              for (vector<wsdl__ext_fault>::const_iterator ext_fault = (*operation).fault.begin(); ext_fault != (*operation).fault.end(); ++ext_fault)
+    	      { if ((*ext_fault).soap__fault_ && (*ext_fault).messagePtr())
+    	        { Message *f = new Message();
+    	          f->message = (*ext_fault).messagePtr();
+	          f->body_parts = NULL;
+    	          f->part = NULL;
+    	          f->encodingStyle = (*ext_fault).soap__fault_->encodingStyle;
+    	          f->URI = (*ext_fault).soap__fault_->namespace_;
+    	          f->use = (*ext_fault).soap__fault_->use;
+		  f->multipartRelated = NULL;
+		  f->content = NULL;
+		  f->layout = NULL;
+    	          f->ext_documentation = (*ext_fault).documentation;
+                  f->name = types.aname("_", f->URI, f->message->name);
+    	          f->documentation = f->message->documentation;
+    	          o->fault.push_back(f);
+    	          s->fault[f->name] = f;
+    	        }
+    	        else
+    	          fprintf(stderr, "Error: no wsdl:definitions/binding/operation/fault/soap:fault\n");
+    	      }
+    	      s->operation.push_back(o);
+            }
+    	    else
+    	      fprintf(stderr, "Warning: no SOAP RPC operation namespace, operations will be ignored\n");
+          }
+          else
+            fprintf(stderr, "Error: no wsdl:definitions/binding/operation/input/soap:body\n");
+        }
+        else
+          fprintf(stderr, "Error: no wsdl:definitions/portType/operation/input\n");
+      }
+      else
+        fprintf(stderr, "Error: no wsdl:definitions/portType/operation\n");
+    }
+  }
+}
+
+void Definitions::compile(const wsdl__definitions& definitions)
+{ // compile the definitions and generate gSOAP header file
+  const char *defs;
+  if (definitions.name)
+    defs = types.aname(NULL, NULL, definitions.name);
+  else
+    defs = "Service";
+  ident();
+  fprintf(stream, "/* NOTE:\n\n - Compile this file with soapcpp2 to complete the code generation process.\n - Use soapcpp2 option -I to specify paths for #import\n   To build with STL, 'stlvector.h' is imported from 'import' dir in package.\n - Use wsdl2h options -c and -s to generate pure C code or C++ code without STL.\n - Use 'typemap.dat' to control schema namespace bindings and type mappings.\n   It is strongly recommended to customize the names of the namespace prefixes\n   generated by wsdl2h. To do so, modify the prefix bindings in the Namespaces\n   section below and add the modified lines to 'typemap.dat' to rerun wsdl2h.\n - Use Doxygen (www.doxygen.org) to browse this file.\n - Use wsdl2h option -l to view the software license terms.\n\n*/\n");
+  banner(definitions.targetNamespace?definitions.targetNamespace:"targetNamespace");
+  // copy documentation from WSDL definitions
+  if (definitions.documentation)
+  { fprintf(stream, "/* WSDL Documentation:\n\n");
+    text(definitions.documentation);
+    fprintf(stream, "*/\n\n");
+  }
+  if (lflag)
+  { banner("License");
+    fprintf(stream, "/*\n%s*/\n\n", licensenotice);
+  }
+  // gsoap compiler options: 'w' disables WSDL/schema output to avoid file collisions
+  if (cflag)
+    fprintf(stream, "//gsoapopt cw\n");
+  else
+    fprintf(stream, "//gsoapopt w\n");
+  banner("Import");
+  if (dflag)
+  { if (import_path)
+      fprintf(stream, "#import \"%s/dom.h\"\n", import_path);
+    else
+      fprintf(stream, "#import \"dom.h\"\n");
+  }
+  if (!cflag && !sflag)
+  { if (import_path)
+      fprintf(stream, "#import \"%s/stlvector.h\"\n", import_path);
+    else
+      fprintf(stream, "#import \"stlvector.h\"\n");
+  }
+  if (mflag)
+  { if (import_path)
+      fprintf(stream, "#import \"%s/", import_path);
+    else
+      fprintf(stream, "#import \"");
+    fprintf(stream, "xsd.h\"\t// import primitive XSD types.\n", import_path);
+  }
+  for (SetOfString::const_iterator u = exturis.begin(); u != exturis.end(); ++u)
+  { bool found = false;
+    size_t n = strlen(*u);
+    for (SetOfString::const_iterator i = definitions.builtinTypes().begin(); i != definitions.builtinTypes().end(); ++i)
+    { if (**i == '"' && !strncmp(*u, *i + 1, n))
+      { found = true;
+	break;
+      }
+    }
+    if (!found)
+      for (SetOfString::const_iterator j = definitions.builtinElements().begin(); j != definitions.builtinElements().end(); ++j)
+      { if (**j == '"' && !strncmp(*u, *j + 1, n))
+        { found = true;
+	  break;
+        }
+      }
+    if (!found)
+      for (SetOfString::const_iterator k = definitions.builtinAttributes().begin(); k != definitions.builtinAttributes().end(); ++k)
+      { if (**k == '"' && !strncmp(*u, *k + 1, n))
+        { found = true;
+	  break;
+        }
+      }
+    if (found)
+    { if (import_path)
+        fprintf(stream, "#import \"%s/%s.h\"\t// %s = <%s>\n", import_path, types.nsprefix(NULL, *u), types.nsprefix(NULL, *u), *u);
+      else
+        fprintf(stream, "#import \"%s.h\"\t// %s = <%s>\n", types.nsprefix(NULL, *u), types.nsprefix(NULL, *u), *u);
+    }
+  }
+  banner("Schema Namespaces");
+  // determine if we must use SOAP 1.2, this is a bit of a hack due to the lack of WSDL1.1/SOAP1.2 support and better alternatives
+  for (Namespace *p = definitions.soap->local_namespaces; p && p->id; p++)
+  { // p->out is set to the actual namespace name that matches the p->in pattern
+    if (p->out && !strcmp(p->id, "soap") && !strcmp(p->out, "http://schemas.xmlsoap.org/wsdl/soap12/"))
+    { fprintf(stream, "// This service uses SOAP 1.2 namespaces:\n");
+      fprintf(stream, schemaformat, "SOAP-ENV", "namespace", "http://www.w3.org/2003/05/soap-envelope");
+      fprintf(stream, schemaformat, "SOAP-ENC", "namespace", "http://www.w3.org/2003/05/soap-encoding");
+      break;
+    }
+  }
+  if (definitions.types)
+  { fprintf(stream, "\n/* NOTE:\n\nIt is strongly recommended to customize the names of the namespace prefixes\ngenerated by wsdl2h. To do so, modify the prefix bindings below and add the\nmodified lines to typemap.dat to rerun wsdl2h:\n\n");
+    if (definitions.targetNamespace && *definitions.targetNamespace)
+      fprintf(stream, "%s = \"%s\"\n", types.nsprefix(service_prefix, definitions.targetNamespace), definitions.targetNamespace);
+    for (vector<xs__schema*>::const_iterator schema1 = definitions.types->xs__schema_.begin(); schema1 != definitions.types->xs__schema_.end(); ++schema1)
+      if (!definitions.targetNamespace || strcmp((*schema1)->targetNamespace, definitions.targetNamespace))
+        fprintf(stream, "%s = \"%s\"\n", types.nsprefix(NULL, (*schema1)->targetNamespace), (*schema1)->targetNamespace);
+    fprintf(stream, "\n*/\n\n");
+    for (vector<xs__schema*>::const_iterator schema2 = definitions.types->xs__schema_.begin(); schema2 != definitions.types->xs__schema_.end(); ++schema2)
+      fprintf(stream, schemaformat, types.nsprefix(NULL, (*schema2)->targetNamespace), "namespace", (*schema2)->targetNamespace);
+    for (vector<xs__schema*>::const_iterator schema3 = definitions.types->xs__schema_.begin(); schema3 != definitions.types->xs__schema_.end(); ++schema3)
+    { if ((*schema3)->elementFormDefault == (*schema3)->attributeFormDefault)
+        fprintf(stream, schemaformat, types.nsprefix(NULL, (*schema3)->targetNamespace), "form", (*schema3)->elementFormDefault == qualified ? "qualified" : "unqualified");
+      else
+      { fprintf(stream, schemaformat, types.nsprefix(NULL, (*schema3)->targetNamespace), "elementForm", (*schema3)->elementFormDefault == qualified ? "qualified" : "unqualified");
+        fprintf(stream, schemaformat, types.nsprefix(NULL, (*schema3)->targetNamespace), "attributeForm", (*schema3)->attributeFormDefault == qualified ? "qualified" : "unqualified");
+      }
+    }
+  }
+  banner("Schema Types");
+  // generate the prototypes first: these should allow use before def, e.g. class names then generate the defs
+  // check if xsd:anyType is used
+  if (!cflag && !pflag)
+  { for (SetOfString::const_iterator i = definitions.builtinTypes().begin(); i != definitions.builtinTypes().end(); ++i)
+    { if (!cflag && !strcmp(*i, "xs:anyType"))
+      { pflag = 1;
+        break;
+      }
+    }
+  }
+  // define xsd:anyType first, if used
+  if (!cflag && pflag)
+  { const char *s, *t;
+    t = types.cname(NULL, NULL, "xs:anyType");
+    s = types.deftypemap[t];
+    if (s)
+    { if (*s)
+      { if (!mflag)
+          fprintf(stream, "%s\n", s);
+      }
+      s = types.usetypemap[t];
+      if (s)
+      { if (mflag)
+          fprintf(stream, "//  xsd.h must define type: %s\n", s);
+        types.knames.insert(s);
+      }
+    }
+    else
+    { fprintf(stderr, "Error: no xsd__anyType defined in type map\n");
+      pflag = 0;
+    }
+  }
+  // produce built-in primitive types, limited to the ones that are used only
+  for (SetOfString::const_iterator i = definitions.builtinTypes().begin(); i != definitions.builtinTypes().end(); ++i)
+  { const char *s, *t;
+    if (!cflag && pflag && !strcmp(*i, "xs:anyType"))
+      continue;
+    t = types.cname(NULL, NULL, *i);
+    s = types.deftypemap[t];
+    if (s)
+    { if (*s)
+      { if (**i == '"')
+	  fprintf(stream, "\n/// Imported type %s from typemap %s.\n", *i, mapfile?mapfile:"");
+        else
+	  fprintf(stream, "\n/// Built-in type \"%s\".\n", *i);
+	if (mflag)
+          fprintf(stream, "//  (declaration removed by option -m) ");
+        types.format(s);
+      }
+      s = types.usetypemap[t];
+      if (s && *s)
+      { if (mflag && **i != '"')
+          fprintf(stream, "\n//  xsd.h must define type: %s\n", s);
+        if (types.knames.find(s) == types.knames.end())
+          types.knames.insert(s);
+      }
+    }
+    else
+    { s = types.tname(NULL, NULL, "xsd:string");
+      if (!mflag)
+      { if (**i == '"')
+          fprintf(stream, "\n// Imported type %s defined by %s\n", *i, t);
+        else
+        { fprintf(stream, "\n/// Primitive built-in type \"%s\"\n", *i);
+          fprintf(stream, "typedef %s %s;\n", s, t);
+        }
+      }
+      else if (**i == '"')
+        fprintf(stream, "\n//  Imported type %s defined by %s\n", *i, t);
+      else
+        fprintf(stream, "\n//  xsd.h must define type: %s\n", t);
+      types.deftname(TYPEDEF, NULL, strchr(s, '*') != NULL, NULL, NULL, *i);
+    }
+    if (pflag && !strncmp(*i, "xs:", 3))		// only xsi types are polymorph
+    { s = types.aname(NULL, NULL, *i);
+      if (!mflag)
+      { fprintf(stream, "\n/// Class wrapper for built-in type \"%s\" derived from xsd__anyType\n", *i);
+        fprintf(stream, "class %s : public xsd__anyType\n{ public:\n", s);
+        fprintf(stream, elementformat, types.tname(NULL, NULL, *i), "__item;");
+        fprintf(stream, "\n};\n");
+      }
+      types.knames.insert(s);
+    }
+  }
+  // produce built-in primitive elements, limited to the ones that are used only
+  for (SetOfString::const_iterator j = definitions.builtinElements().begin(); j != definitions.builtinElements().end(); ++j)
+  { const char *s, *t;
+    t = types.cname("_", NULL, *j);
+    s = types.deftypemap[t];
+    if (s)
+    { if (*s)
+      { if (**j == '"')
+	  fprintf(stream, "\n/// Imported element %s from typemap %s.\n", *j, mapfile?mapfile:"");
+        else
+	  fprintf(stream, "\n/// Built-in element \"%s\".\n", *j);
+	if (mflag)
+          fprintf(stream, "//  (declaration removed by option -m) ");
+        types.format(s);
+      }
+      s = types.usetypemap[t];
+      if (s && *s)
+      { if (mflag && **j != '"')
+          fprintf(stream, "\n//  xsd.h must define element: %s\n", s);
+        if (types.knames.find(s) == types.knames.end())
+          types.knames.insert(s);
+      }
+    }
+    else
+    { if (!mflag)
+      { if (**j == '"')
+	  fprintf(stream, "\n// Imported element %s declared as %s\n", *j, t);
+        else
+	{ fprintf(stream, "\n/// Built-in element \"%s\".\n", *j);
+          fprintf(stream, "typedef _XML %s;\n", t);
+        }
+      }
+      else if (**j == '"')
+	fprintf(stream, "\n//  Imported element %s declared as %s\n", *j, t);
+      else
+        fprintf(stream, "\n//  xsd.h must define element: %s\n", t);
+      types.deftname(TYPEDEF, NULL, true, NULL, NULL, *j);	// already pointer
+    }
+  }
+  // produce built-in primitive attributes, limited to the ones that are used only
+  for (SetOfString::const_iterator k = definitions.builtinAttributes().begin(); k != definitions.builtinAttributes().end(); ++k)
+  { const char *s, *t;
+    t = types.cname("_", NULL, *k);
+    s = types.deftypemap[t];
+    if (s)
+    { if (*s)
+      { if (**k == '"')
+	  fprintf(stream, "\n/// Imported attribute %s from typemap %s.\n", *k, mapfile?mapfile:"");
+        else
+	  fprintf(stream, "\n/// Built-in attribute \"%s\".\n", *k);
+	if (mflag)
+          fprintf(stream, "//  (declaration removed by option -m) ");
+        types.format(s);
+      }
+      s = types.usetypemap[t];
+      if (s && *s)
+      { if (mflag && **k != '"')
+          fprintf(stream, "\n//  xsd.h must define attribute: %s\n", s);
+        if (types.knames.find(s) == types.knames.end())
+          types.knames.insert(s);
+      }
+    }
+    else
+    { s = types.tname(NULL, NULL, "xsd:string");
+      if (!mflag)
+      { if (**k == '"')
+          fprintf(stream, "\n// Imported attribute %s declared as %s\n", *k, t);
+        else
+        { fprintf(stream, "\n/// Built-in attribute \"%s\".\n", *k);
+          fprintf(stream, "typedef %s %s;\n", s, t);
+        }
+      }
+      else if (**k == '"')
+        fprintf(stream, "//  Imported attribute %s declared as %s\n", *k, t);
+      else
+        fprintf(stream, "//  xsd.h must define attribute: %s\n", t);
+      types.deftname(TYPEDEF, NULL, strchr(s, '*') != NULL, NULL, NULL, *k);
+    }
+  }
+  // produce types
+  // define class/struct types first
+  if (definitions.types)
+  { comment("Definitions", defs, "types", definitions.types->documentation);
+    fprintf(stream, "\n");
+    for (vector<xs__schema*>::const_iterator schema4 = definitions.types->xs__schema_.begin(); schema4 != definitions.types->xs__schema_.end(); ++schema4)
+    { for (vector<xs__complexType>::const_iterator complexType = (*schema4)->complexType.begin(); complexType != (*schema4)->complexType.end(); ++complexType)
+        types.define((*schema4)->targetNamespace, NULL, *complexType);
+      for (vector<xs__element>::const_iterator element = (*schema4)->element.begin(); element != (*schema4)->element.end(); ++element)
+      { if (!(*element).type)
+        { if ((*element).complexTypePtr())
+            types.define((*schema4)->targetNamespace, (*element).name, *(*element).complexTypePtr());
+	  else
+          { fprintf(stream, "\n/// Element \"%s\":%s.\n", (*schema4)->targetNamespace, (*element).name);
+            if (gflag)
+	    { const char *t = types.deftname(TYPEDEF, NULL, false, "_", (*schema4)->targetNamespace, (*element).name);
+  	      fprintf(stream, "typedef _XML %s;\n", t);
+	    }
+	    else
+	    { const char *s = types.cname("_", (*schema4)->targetNamespace, (*element).name);
+              types.ptrtypemap[s] = types.usetypemap[s] = "_XML";
+	      fprintf(stream, "/// Note: use wsdl2h option -g to generate this global element declaration.\n");
+	    }
+	  }
+        }
+      }
+    }  
+    // visit types with lowest base level first
+    int baseLevel = 1;
+    bool found;
+    do
+    { found = (baseLevel == 1);
+      for (vector<xs__schema*>::iterator schema = definitions.types->xs__schema_.begin(); schema != definitions.types->xs__schema_.end(); ++schema)
+      { for (vector<xs__simpleType>::iterator simpleType = (*schema)->simpleType.begin(); simpleType != (*schema)->simpleType.end(); ++simpleType)
+        { if ((*simpleType).baseLevel() == baseLevel)
+          { found = true;
+            types.gen((*schema)->targetNamespace, NULL, *simpleType, false);
+          }
+        }
+        for (vector<xs__element>::iterator element = (*schema)->element.begin(); element != (*schema)->element.end(); ++element)
+        { if (!(*element).type && (*element).simpleTypePtr() && (*element).simpleTypePtr()->baseLevel() == baseLevel)
+          { found = true;
+	    if ((*element).type)
+	      fprintf(stream, "/// Element \"%s\":%s of simpleType %s.\n", (*schema)->targetNamespace, (*element).name, (*element).type);
+	    types.document((*element).annotation);
+            types.gen((*schema)->targetNamespace, (*element).name, *(*element).simpleTypePtr(), false);
+          }
+          if (!(*element).type && (*element).complexTypePtr() && (*element).complexTypePtr()->baseLevel() == baseLevel)
+            found = true;
+        }
+        for (vector<xs__attribute>::const_iterator attribute = (*schema)->attribute.begin(); attribute != (*schema)->attribute.end(); ++attribute)
+        { if (!(*attribute).type && (*attribute).simpleTypePtr() && (*attribute).simpleTypePtr()->baseLevel() == baseLevel)
+          { found = true;
+	    if ((*attribute).type)
+	      fprintf(stream, "/// Attribute \"%s\":%s of simpleType %s.\n", (*schema)->targetNamespace, (*attribute).name, (*attribute).type);
+	    types.document((*attribute).annotation);
+            types.gen((*schema)->targetNamespace, (*attribute).name, *(*attribute).simpleTypePtr(), false); // URI = NULL won't generate type in schema (type without namespace qualifier)
+          }
+        }
+        for (vector<xs__complexType>::iterator complexType = (*schema)->complexType.begin(); complexType != (*schema)->complexType.end(); ++complexType)
+        { if ((*complexType).baseLevel() == baseLevel)
+            found = true;
+        }
+      }
+      ++baseLevel;
+    } while (found);
+    // generate complex type defs. Problem: what if a simpleType restriction/extension depends on a complexType simpleContent restriction/extension?
+    int maxLevel = baseLevel;
+    for (baseLevel = 1; baseLevel < maxLevel; ++baseLevel)
+    { for (vector<xs__schema*>::iterator schema = definitions.types->xs__schema_.begin(); schema != definitions.types->xs__schema_.end(); ++schema)
+      { for (vector<xs__complexType>::iterator complexType = (*schema)->complexType.begin(); complexType != (*schema)->complexType.end(); ++complexType)
+        { if ((*complexType).baseLevel() == baseLevel)
+            types.gen((*schema)->targetNamespace, NULL, *complexType, false);
+        }
+        for (vector<xs__element>::iterator element = (*schema)->element.begin(); element != (*schema)->element.end(); ++element)
+        { if (!(*element).type && (*element).complexTypePtr() && (*element).complexTypePtr()->baseLevel() == baseLevel)
+	  { fprintf(stream, "\n\n/// Element \"%s\":%s of complexType.\n", (*schema)->targetNamespace, (*element).name);
+	    types.document((*element).annotation);
+            types.gen((*schema)->targetNamespace, (*element).name, *(*element).complexTypePtr(), false);
+	  }
+        }
+      }
+    }
+    // option to consider: generate local complexTypes iteratively
+    /*
+    for (MapOfStringToType::const_iterator local = types.locals.begin(); local != types.locals.end(); ++local)
+    { types.gen(NULL, (*local).first, *(*local).second);
+    }
+    */
+    for (vector<xs__schema*>::iterator schema = definitions.types->xs__schema_.begin(); schema != definitions.types->xs__schema_.end(); ++schema)
+    { for (vector<xs__element>::iterator element = (*schema)->element.begin(); element != (*schema)->element.end(); ++element)
+      { if ((*element).name && (*element).type)
+        { fprintf(stream, "\n/// Element \"%s\":%s of type %s.\n", (*schema)->targetNamespace, (*element).name, (*element).type);
+          types.document((*element).annotation);
+          if (!types.is_defined("_", (*schema)->targetNamespace, (*element).name))
+          { const char *s = types.tname(NULL, NULL, (*element).type);
+            const char *t = types.deftname(TYPEDEF, NULL, false, "_", (*schema)->targetNamespace, (*element).name);
+  	    if (gflag)
+  	    { if (strncmp(s, "char", 4) && strchr(s, '*')) // don't want pointer typedef, unless char*
+  	      { size_t n = strlen(s);
+  	        char *r = (char*)malloc(n);
+  	        strncpy(r, s, n - 1);
+  	        r[n - 1] = '\0';
+  	        fprintf(stream, "typedef %s %s;\n", r, t);
+  	        free(r);
+  	      }
+  	      else
+  	        fprintf(stream, "typedef %s %s;\n", s, t);
+  	    }
+  	    else
+              fprintf(stream, "/// Note: use wsdl2h option -g to generate this global element declaration.\n");
+          }
+	  else
+	  { const char *s = types.cname("_", (*schema)->targetNamespace, (*element).name);
+            const char *t = types.deftypemap[s];
+	    if (t && *t)
+	    { fprintf(stream, "/// Imported element %s from typemap %s.\n", s, mapfile?mapfile:"");
+	      types.format(t);
+	    }
+	    else
+              fprintf(stream, "// '%s' element definition intentionally left blank.\n", types.cname("_", (*schema)->targetNamespace, (*element).name));
+          }
+        }
+      }
+      for (vector<xs__attribute>::iterator attribute = (*schema)->attribute.begin(); attribute != (*schema)->attribute.end(); ++attribute)
+      { if ((*attribute).name && (*attribute).type)
+        { fprintf(stream, "\n/// Attribute \"%s\":%s of simpleType %s.\n", (*schema)->targetNamespace, (*attribute).name, (*attribute).type);
+          types.document((*attribute).annotation);
+          if (!types.is_defined("_", (*schema)->targetNamespace, (*attribute).name))
+          { const char *s = types.tname(NULL, NULL, (*attribute).type);
+            const char *t = types.deftname(TYPEDEF, NULL, false, "_", (*schema)->targetNamespace, (*attribute).name);
+  	    if (gflag)
+  	    { if (strncmp(s, "char", 4) && strchr(s, '*')) // don't want pointer typedef, unless char*
+  	      { size_t n = strlen(s);
+  	        char *r = (char*)malloc(n);
+  	        strncpy(r, s, n - 1);
+  	        r[n - 1] = '\0';
+  	        fprintf(stream, "typedef %s %s;\n", r, t);
+  	        free(r);
+  	      }
+  	      else
+  	        fprintf(stream, "typedef %s %s;\n", s, t);
+  	    }
+  	    else
+              fprintf(stream, "/// Note: use wsdl2h option -g to generate this global attribute declaration.\n");
+          }
+	  else
+	  { const char *s = types.cname("_", (*schema)->targetNamespace, (*attribute).name);
+            const char *t = types.deftypemap[s];
+	    if (t && *t)
+	    { fprintf(stream, "/// Imported attribute %s from typemap %s.\n", s, mapfile?mapfile:"");
+	      types.format(t);
+	    }
+	    else
+              fprintf(stream, "// '%s' attribute definition intentionally left blank.\n", types.cname("_", (*schema)->targetNamespace, (*attribute).name));
+	  }
+        }
+      }
+    }
+  }
+  collect(definitions);
+  if (!services.empty())
+  { banner("Services");
+    for (MapOfStringToService::const_iterator service1 = services.begin(); service1 != services.end(); ++service1)
+    { Service *sv = (*service1).second;
+      if (sv && sv->prefix)
+      { fprintf(stream, "\n");
+        if (sv->name)
+          fprintf(stream, serviceformat, sv->prefix, "name", sv->name, "");
+        if (sv->type)
+          fprintf(stream, serviceformat, sv->prefix, "type", sv->type, "");
+        for (SetOfString::const_iterator port = sv->location.begin(); port != sv->location.end(); ++port)
+          fprintf(stream, serviceformat, sv->prefix, "port", (*port), "");
+        if (sv->URI)
+          fprintf(stream, serviceformat, sv->prefix, "namespace", sv->URI, "");
+        if (sv->transport)
+          fprintf(stream, serviceformat, sv->prefix, "transport", sv->transport, "");
+      }
+    }
+    fprintf(stream, "\n/** @mainpage %s Definitions\n", definitions.name?definitions.name:"Service");
+    if (definitions.documentation)
+    { section(defs, "_documentation Documentation", NULL);
+      text(definitions.documentation);
+    }
+    if (definitions.types && definitions.types->documentation)
+    { section(defs, "_types Types", NULL);
+      text(definitions.types->documentation);
+    }
+    section(defs, "_bindings Bindings", NULL);
+    for (MapOfStringToService::const_iterator service2 = services.begin(); service2 != services.end(); ++service2)
+    { Service *sv = (*service2).second;
+      if (sv && sv->name)
+        fprintf(stream, "  - @ref %s\n", sv->name);
+    }
+    fprintf(stream, "\n*/\n");
+    for (MapOfStringToService::const_iterator service3 = services.begin(); service3 != services.end(); ++service3)
+    { Service *sv = (*service3).second;
+      if (sv && sv->name)
+      { fprintf(stream, "\n/**\n");
+        page(sv->name, " Binding", sv->name);
+        for (MapOfStringToString::const_iterator service_doc = sv->service_documentation.begin(); service_doc != sv->service_documentation.end(); ++service_doc)
+        { const char *name = types.aname(NULL, NULL, (*service_doc).first);
+	  section(name, "_service Service Documentation", (*service_doc).first);
+          text((*service_doc).second);
+        }
+        for (MapOfStringToString::const_iterator port_doc = sv->port_documentation.begin(); port_doc != sv->port_documentation.end(); ++port_doc)
+        { const char *name = types.aname(NULL, NULL, (*port_doc).first);
+          section(name, "_port Port Documentation", (*port_doc).first);
+          text((*port_doc).second);
+        }
+        for (MapOfStringToString::const_iterator binding_doc = sv->binding_documentation.begin(); binding_doc != sv->binding_documentation.end(); ++binding_doc)
+        { const char *name = types.aname(NULL, NULL, (*binding_doc).first);
+          section(name, "_binding Binding Documentation", (*binding_doc).first);
+          text((*binding_doc).second);
+        }
+        section(sv->name, "_operations Operations of Binding ", sv->name);
+        for (vector<Operation*>::const_iterator op = sv->operation.begin(); op != sv->operation.end(); ++op)
+        { if (*op && (*op)->input_name)
+            fprintf(stream, "  - @ref %s\n", (*op)->input_name);
+        }
+        section((*sv).name, "_ports Endpoints of Binding ", sv->name);
+        for (SetOfString::const_iterator port = sv->location.begin(); port != sv->location.end(); ++port)
+          fprintf(stream, "  - %s\n", *port);
+        fprintf(stream, "\n*/\n");
+      }
+    }
+  }
+  generate();
+  fprintf(stream, "\n/* End of %s */\n", outfile?outfile:"file");
+}
+
+void Definitions::generate()
+{ MapOfStringToMessage headers;
+  MapOfStringToMessage faults;
+  for (MapOfStringToService::const_iterator service1 = services.begin(); service1 != services.end(); ++service1)
+  { if ((*service1).second)
+    { for (MapOfStringToMessage::const_iterator header = (*service1).second->header.begin(); header != (*service1).second->header.end(); ++header)
+        headers[(*header).first] = (*header).second;
+      for (MapOfStringToMessage::const_iterator fault = (*service1).second->fault.begin(); fault != (*service1).second->fault.end(); ++fault)
+        faults[(*fault).first] = (*fault).second;
+    }
+  }
+  // Generate SOAP Header definition
+  if (!headers.empty())
+  { banner("SOAP Header");
+    fprintf(stream, "/**\n\nThe SOAP Header is part of the gSOAP context and its content is accessed\nthrough the soap.header variable. You may have to set the soap.actor variable\nto serialize SOAP Headers with SOAP-ENV:actor or SOAP-ENV:role attributes.\n\n*/\n");
+    fprintf(stream, "struct SOAP_ENV__Header\n{\n");
+    for (MapOfStringToMessage::const_iterator header = headers.begin(); header != headers.end(); ++header)
+    { if ((*header).second->URI && !types.uris[(*header).second->URI])
+        fprintf(stream, schemaformat, types.nsprefix(NULL, (*header).second->URI), "namespace", (*header).second->URI);
+      comment("Header", (*header).first, "WSDL", (*header).second->ext_documentation);
+      comment("Header", (*header).first, "SOAP", (*header).second->documentation);
+      if ((*header).second->part && (*header).second->part->elementPtr())
+      { fprintf(stream, "/// \"%s\" SOAP Header part element\n", (*header).second->part->name);
+        types.gen(NULL, *(*header).second->part->elementPtr());
+      }
+      else if ((*header).second->part && (*header).second->part->type)
+      { fprintf(stream, elementformat, "mustUnderstand", "// must be understood by receiver");
+        fprintf(stream, "\n");
+        fprintf(stream, elementformat, types.pname(true, NULL, NULL, (*header).second->part->type), (*header).first);
+        fprintf(stream, ";\n");
+      }
+      else
+      { fprintf(stream, elementformat, "mustUnderstand", "// must be understood by receiver");
+        fprintf(stream, "\n");
+        if ((*header).second->part && (*header).second->part->element)
+	  fprintf(stream, pointerformat, types.pname(true, NULL, NULL, (*header).second->part->element), (*header).first);
+        else
+	  fprintf(stream, pointerformat, (*header).first, (*header).first);
+        fprintf(stream, ";\t///< TODO: Check element type (imported type)\n");
+      }
+    }
+    fprintf(stream, "\n};\n");
+  }
+  // Generate Fault detail element definitions
+  for (MapOfStringToMessage::const_iterator fault = faults.begin(); fault != faults.end(); ++fault)
+  { banner("SOAP Fault Detail");
+    fprintf(stream, "/// The SOAP Fault Detail element contains one of the following types serialized\n// in the __type and fault fields of the SOAP_ENV__Detail struct (see docs)\n");
+    if ((*fault).second->URI && !types.uris[(*fault).second->URI])
+      fprintf(stream, schemaformat, types.nsprefix(NULL, (*fault).second->URI), "namespace", (*fault).second->URI);
+    comment("Fault", (*fault).first, "WSDL", (*fault).second->ext_documentation);
+    comment("Fault", (*fault).first, "SOAP", (*fault).second->documentation);
+    if (cflag)
+      fprintf(stream, "struct %s\n{\n", (*fault).first);
+    else
+      fprintf(stream, "class %s\n{ public:", (*fault).first);
+    (*fault).second->generate(types, ";", false, true, false);
+    if (!cflag)
+    { fprintf(stream, "\n");
+      fprintf(stream, pointerformat, "struct soap", "soap");
+      fprintf(stream, ";");
+    }
+    fprintf(stream, "\n};\n");
+  }
+  /* The SOAP Fault struct below is autogenerated by soapcpp2 (kept here for future mods)
+  if (!mflag && !faults.empty())
+  { fprintf(stream, "struct SOAP_ENV__Code\n{\n"); 
+    fprintf(stream, elementformat, "_QName", "SOAP_ENV__Value");
+    fprintf(stream, ";\n");
+    fprintf(stream, pointerformat, "char", "SOAP_ENV__Node");
+    fprintf(stream, ";\n");
+    fprintf(stream, pointerformat, "char", "SOAP_ENV__Role");
+    fprintf(stream, ";\n};\n");
+    fprintf(stream, "struct SOAP_ENV__Detail\n{\n"); 
+    fprintf(stream, elementformat, "int", "__type");
+    fprintf(stream, ";\n");
+    fprintf(stream, pointerformat, "void", "fault");
+    fprintf(stream, ";\n");
+    fprintf(stream, elementformat, "_XML", "__any");
+    fprintf(stream, ";\n};\n");
+    fprintf(stream, "struct SOAP_ENV__Fault\n{\n"); 
+    fprintf(stream, elementformat, "_QName", "faultcode");
+    fprintf(stream, ";\n");
+    fprintf(stream, pointerformat, "char", "faultstring");
+    fprintf(stream, ";\n");
+    fprintf(stream, pointerformat, "char", "faultactor");
+    fprintf(stream, ";\n");
+    fprintf(stream, pointerformat, "struct SOAP_ENV__Detail", "detail");
+    fprintf(stream, ";\n");
+    fprintf(stream, pointerformat, "struct SOAP_ENV__Code", "SOAP_ENV__Code");
+    fprintf(stream, ";\n");
+    fprintf(stream, pointerformat, "char", "SOAP_ENV__Reason");
+    fprintf(stream, ";\n");
+    fprintf(stream, pointerformat, "struct SOAP_ENV__Detail", "SOAP_ENV__Detail");
+    fprintf(stream, ";\n};\n");
+  }
+  */
+  for (MapOfStringToService::const_iterator service2 = services.begin(); service2 != services.end(); ++service2)
+    if ((*service2).second)
+      (*service2).second->generate(types);
+} 
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Service methods
+//
+////////////////////////////////////////////////////////////////////////////////
+
+Service::Service()
+{ prefix = NULL;
+  URI = NULL;
+  name = NULL;
+  type = NULL;
+  transport = NULL;
+}
+
+void Service::generate(Types& types)
+{ if (name)
+    banner(name);
+  for (vector<Operation*>::const_iterator op2 = operation.begin(); op2 != operation.end(); ++op2)
+  { if (*op2 && (*op2)->input)
+    { bool flag = false, anonymous = (*op2)->parameterOrder != NULL;
+      banner((*op2)->input_name);
+      if ((*op2)->output && (*op2)->output_name)
+      { if ((*op2)->style == document)
+          flag = (*op2)->output->message && (*op2)->output->message->part.size() == 1;
+        else if (!wflag)
+          flag = (*op2)->output->message && (*op2)->output->use == encoded && (*op2)->output->message->part.size() == 1 && !(*(*op2)->output->message->part.begin()).simpleTypePtr() && !(*(*op2)->output->message->part.begin()).complexTypePtr();
+        if (flag && (*op2)->input->message && (*(*op2)->output->message->part.begin()).element)
+          for (vector<wsdl__part>::const_iterator part = (*op2)->input->message->part.begin(); part != (*op2)->input->message->part.end(); ++part)
+            if ((*part).element && !strcmp((*part).element, (*(*op2)->output->message->part.begin()).element))
+              flag = false;
+	if (!flag)
+        { fprintf(stream, "/// Operation response struct \"%s\" of service binding \"%s\" operation \"%s\"\n", (*op2)->output_name, name, (*op2)->input_name);
+          fprintf(stream, "struct %s\n{", (*op2)->output_name);
+          (*op2)->output->generate(types, ";", anonymous, true, false);
+          fprintf(stream, "\n};\n");
+        }
+      }
+      fprintf(stream, "\n/// Operation \"%s\" of service binding \"%s\"\n\n/**\n\nOperation details:\n\n", (*op2)->input_name, name);
+      if ((*op2)->documentation)
+        text((*op2)->documentation);
+      if ((*op2)->operation_documentation)
+        text((*op2)->operation_documentation);
+      if ((*op2)->input->documentation)
+      { fprintf(stream, "Input request:\n");
+	text((*op2)->input->documentation);
+      }
+      if ((*op2)->input->ext_documentation)
+      { fprintf(stream, "Input request:\n");
+        text((*op2)->input->ext_documentation);
+      }
+      if ((*op2)->output)
+      { if ((*op2)->output->documentation)
+        { fprintf(stream, "Output response:\n");
+	  text((*op2)->output->documentation);
+	}
+        if ((*op2)->output->ext_documentation)
+        { fprintf(stream, "Output response:\n");
+	  text((*op2)->output->ext_documentation);
+        }
+      }
+      if ((*op2)->output)
+      { if ((*op2)->output->content)
+	{ fprintf(stream, "  - Response has MIME content '%s'\n", ((*op2)->output->content->type?(*op2)->output->content->type:"?"));
+	  fprintf(stream, "    TODO: this form of MIME content response is not automatically handled.\n    Use one-way request and implement code to parse response.\n");
+        }
+      }
+      else
+	fprintf(stream, "  - One-way message\n");
+      if ((*op2)->style == document)
+        fprintf(stream, "  - SOAP document/literal style\n");
+      else
+      { if ((*op2)->input->use == literal)
+          fprintf(stream, "  - SOAP RPC literal style\n");
+        else if ((*op2)->input->encodingStyle)
+          fprintf(stream, "  - SOAP RPC encodingStyle=\"%s\"\n", (*op2)->input->encodingStyle);
+        else
+          fprintf(stream, "  - SOAP RPC encoded\n");
+      }
+      if ((*op2)->output)
+      { if ((*op2)->input->use != (*op2)->output->use)
+        { if ((*op2)->output->use == literal)
+            fprintf(stream, "  - SOAP RPC literal response\n");
+          else if ((*op2)->output->encodingStyle)
+            fprintf(stream, "  - SOAP RPC response encodingStyle=\"%s\"\n", (*op2)->output->encodingStyle);
+          else
+            fprintf(stream, "  - SOAP RPC encoded response\n");
+        }
+      }
+      if ((*op2)->soapAction)
+      { if (*(*op2)->soapAction)
+          fprintf(stream, "  - SOAP action=\"%s\"\n", (*op2)->soapAction);
+      }
+      for (vector<Message*>::const_iterator message = (*op2)->fault.begin(); message != (*op2)->fault.end(); ++message)
+      { if ((*message)->message && (*message)->message->name)
+          fprintf(stream, "  - SOAP Fault: %s\n", (*message)->name);
+      }
+      if (!(*op2)->input->header.empty())
+        fprintf(stream, "  - Request message has mandatory header part(s):\n");
+      for (vector<soap__header>::const_iterator inputheader = (*op2)->input->header.begin(); inputheader != (*op2)->input->header.end(); ++inputheader)
+      { if ((*inputheader).part)
+        { if ((*inputheader).use == encoded && (*inputheader).namespace_)
+            fprintf(stream, "    - %s\n", types.aname(NULL, (*inputheader).namespace_, (*inputheader).part));
+          else if ((*inputheader).partPtr() && (*inputheader).partPtr()->element)
+            fprintf(stream, "    - %s\n", types.aname(NULL, NULL, (*inputheader).partPtr()->element));
+        }
+      }
+      if ((*op2)->input->multipartRelated)
+      { int k = 2;
+        fprintf(stream, "  - Request message has MIME multipart/related attachments:\n");
+        for (vector<mime__part>::const_iterator part = (*op2)->input->multipartRelated->part.begin(); part != (*op2)->input->multipartRelated->part.end(); ++part)
+	{ if ((*part).soap__body_)
+          { fprintf(stream, "    -# MIME attachment with SOAP Body and mandatory header part(s):\n");
+            for (vector<soap__header>::const_iterator header = (*part).soap__header_.begin(); header != (*part).soap__header_.end(); ++header)
+            { if ((*header).part)
+              { if ((*header).use == encoded && (*header).namespace_)
+                  fprintf(stream, "       - %s\n", types.aname(NULL, (*header).namespace_, (*header).part));
+                else if ((*header).partPtr() && (*header).partPtr()->element)
+                  fprintf(stream, "       - %s\n", types.aname(NULL, NULL, (*header).partPtr()->element));
+              }
+	    }
+	  }
+          else
+          { fprintf(stream, "    -# MIME attachment %d:\n", k++);
+	    for (vector<mime__content>::const_iterator content = (*part).content.begin(); content != (*part).content.end(); ++content)
+	      fprintf(stream, "       - part=\"%s\" type=\"%s\"\n", (*content).part?(*content).part:"", (*content).type?(*content).type:"");
+	  }
+        }
+      }
+      if ((*op2)->input->layout)
+        fprintf(stream, "  - Request message has DIME attachments in compliance with %s\n", (*op2)->input->layout);
+      if ((*op2)->output)
+      { if (!(*op2)->output->header.empty())
+          fprintf(stream, "  - Response message has mandatory header part(s):\n");
+        for (vector<soap__header>::const_iterator outputheader = (*op2)->output->header.begin(); outputheader != (*op2)->output->header.end(); ++outputheader)
+        { if ((*outputheader).part)
+          { if ((*outputheader).use == encoded && (*outputheader).namespace_)
+              fprintf(stream, "    - %s\n", types.aname(NULL, (*outputheader).namespace_, (*outputheader).part));
+            else if ((*outputheader).partPtr() && (*outputheader).partPtr()->element)
+              fprintf(stream, "    - %s\n", types.aname(NULL, NULL, (*outputheader).partPtr()->element));
+          }
+        }
+      }
+      if ((*op2)->output && (*op2)->output_name && (*op2)->output->multipartRelated)
+      { int k = 2;
+        fprintf(stream, "  - Response message has MIME multipart/related attachments\n");
+        for (vector<mime__part>::const_iterator part = (*op2)->output->multipartRelated->part.begin(); part != (*op2)->output->multipartRelated->part.end(); ++part)
+	{ if ((*part).soap__body_)
+          { fprintf(stream, "    -# MIME attachment with SOAP Body and mandatory header part(s):\n");
+            for (vector<soap__header>::const_iterator header = (*part).soap__header_.begin(); header != (*part).soap__header_.end(); ++header)
+            { if ((*header).part)
+              { if ((*header).use == encoded && (*header).namespace_)
+                  fprintf(stream, "       - %s\n", types.aname(NULL, (*header).namespace_, (*header).part));
+                else if ((*header).partPtr() && (*header).partPtr()->element)
+                  fprintf(stream, "       - %s\n", types.aname(NULL, NULL, (*header).partPtr()->element));
+              }
+	    }
+	  }
+          else
+          { fprintf(stream, "    -# MIME attachment %d:\n", k++);
+            for (vector<mime__content>::const_iterator content = (*part).content.begin(); content != (*part).content.end(); ++content)
+	      fprintf(stream, "       - part=\"%s\" type=\"%s\"\n", (*content).part?(*content).part:"", (*content).type?(*content).type:"");
+	  }
+        }
+      }
+      if ((*op2)->output && (*op2)->output_name && (*op2)->output->layout)
+        fprintf(stream, "  - Response message has DIME attachments in compliance with %s\n", (*op2)->output->layout);
+      fprintf(stream, "\nC stub function (defined in soapClient.c[pp] after running soapcpp2):\n@code\n  int soap_call_%s(struct soap *soap,\n    NULL, // char *endpoint = NULL selects default endpoint for this operation\n    NULL, // char *action = NULL selects default action for this operation\n    // request parameters:", (*op2)->input_name);
+      (*op2)->input->generate(types, ",", false, false, false);
+      fprintf(stream, "\n    // response parameters:");
+      if ((*op2)->output && (*op2)->output_name)
+      { if (flag)
+        { if ((*op2)->style == document)
+	  { // Shortcut: do not generate wrapper struct
+            (*op2)->output->generate(types, "", false, false, true);
+          }
+          else if ((*(*op2)->output->message->part.begin()).name)
+	  { fprintf(stream, "\n");
+            fprintf(stream, anonymous ? anonformat : paraformat, types.tname(NULL, NULL, (*(*op2)->output->message->part.begin()).type), cflag ? "*" : "&", types.aname(NULL, NULL, (*(*op2)->output->message->part.begin()).name), "");
+	  }
+	}
+        else
+          fprintf(stream, "\n    struct %s%s", (*op2)->output_name, cflag ? "*" : "&");
+      }
+      fprintf(stream, "\n  );\n@endcode\n\n");
+      if (!cflag)
+      { fprintf(stream, "C++ proxy class (defined in soap%sProxy.h):\n", name);
+        fprintf(stream, "  class %s;\n\n", name);
+      }
+      fprintf(stream, "*/\n\n");
+      (*op2)->generate(types);
+    }
+  }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Operation methods
+//
+////////////////////////////////////////////////////////////////////////////////
+
+void Operation::generate(Types &types)
+{ bool flag = false, anonymous = parameterOrder != NULL;
+  const char *method_name = strstr(input_name + 1, "__") + 2;
+  if (!method_name)
+    method_name = input_name;
+  if (style == document)
+    fprintf(stream, serviceformat, prefix, "method-style", method_name, "document");
+  else
+    fprintf(stream, serviceformat, prefix, "method-style", method_name, "rpc");
+  if (input->use == literal)
+    fprintf(stream, serviceformat, prefix, "method-encoding", method_name, "literal");
+  else if (input->encodingStyle)
+    fprintf(stream, serviceformat, prefix, "method-encoding", method_name, input->encodingStyle);
+  else
+    fprintf(stream, serviceformat, prefix, "method-encoding", method_name, "encoded");
+  if (output)
+  { if (input->use != output->use)
+    { if (output->use == literal)
+        fprintf(stream, serviceformat, prefix, "method-response-encoding", method_name, "literal");
+      else if (output->encodingStyle)
+        fprintf(stream, serviceformat, prefix, "method-response-encoding", method_name, output->encodingStyle);
+      else
+        fprintf(stream, serviceformat, prefix, "method-response-encoding", method_name, "encoded");
+    }
+    if (style == rpc && input->URI && output->URI && strcmp(input->URI, output->URI))
+      fprintf(stream, schemaformat, types.nsprefix(NULL, output->URI), "namespace", output->URI);
+  }
+  if (soapAction)
+  { if (*soapAction)
+      fprintf(stream, serviceformat, prefix, "method-action", method_name, soapAction);
+    else
+      fprintf(stream, serviceformat, prefix, "method-action", method_name, "\"\"");
+  }
+  for (vector<Message*>::const_iterator message = fault.begin(); message != fault.end(); ++message)
+  { if ((*message)->message && (*message)->message->name)
+      fprintf(stream, serviceformat, prefix, "method-fault", method_name, (*message)->name);
+  }
+  if (input->multipartRelated)
+  { for (vector<mime__part>::const_iterator inputmime = input->multipartRelated->part.begin(); inputmime != input->multipartRelated->part.end(); ++inputmime)
+    { for (vector<soap__header>::const_iterator inputheader = (*inputmime).soap__header_.begin(); inputheader != (*inputmime).soap__header_.end(); ++inputheader)
+      { if ((*inputheader).part)
+        { if ((*inputheader).use == encoded && (*inputheader).namespace_)
+            fprintf(stream, serviceformat, prefix, "method-input-header-part", method_name, types.aname(NULL, (*inputheader).namespace_, (*inputheader).part));
+          else if ((*inputheader).partPtr() && (*inputheader).partPtr()->element)
+            fprintf(stream, serviceformat, prefix, "method-input-header-part", method_name, types.aname(NULL, NULL, (*inputheader).partPtr()->element));
+        }
+      }
+      for (vector<mime__content>::const_iterator content = (*inputmime).content.begin(); content != (*inputmime).content.end(); ++content)
+        if ((*content).type)
+          fprintf(stream, serviceformat, prefix, "method-input-mime-type", method_name, (*content).type);
+    }
+  }
+  // TODO: add headerfault directives
+  for (vector<soap__header>::const_iterator inputheader = input->header.begin(); inputheader != input->header.end(); ++inputheader)
+  { if ((*inputheader).part)
+    { if ((*inputheader).use == encoded && (*inputheader).namespace_)
+        fprintf(stream, serviceformat, prefix, "method-input-header-part", method_name, types.aname(NULL, (*inputheader).namespace_, (*inputheader).part));
+      else if ((*inputheader).partPtr() && (*inputheader).partPtr()->element)
+        fprintf(stream, serviceformat, prefix, "method-input-header-part", method_name, types.aname(NULL, NULL, (*inputheader).partPtr()->element));
+    }
+  }
+  if (output)
+  { if (output->multipartRelated)
+    { for (vector<mime__part>::const_iterator outputmime = output->multipartRelated->part.begin(); outputmime != output->multipartRelated->part.end(); ++outputmime)
+      { for (vector<soap__header>::const_iterator outputheader = (*outputmime).soap__header_.begin(); outputheader != (*outputmime).soap__header_.end(); ++outputheader)
+        { if ((*outputheader).part)
+          { if ((*outputheader).use == encoded && (*outputheader).namespace_)
+              fprintf(stream, serviceformat, prefix, "method-output-header-part", method_name, types.aname(NULL, (*outputheader).namespace_, (*outputheader).part));
+            else if ((*outputheader).partPtr() && (*outputheader).partPtr()->element)
+              fprintf(stream, serviceformat, prefix, "method-output-header-part", method_name, types.aname(NULL, NULL, (*outputheader).partPtr()->element));
+          }
+        }
+        for (vector<mime__content>::const_iterator content = (*outputmime).content.begin(); content != (*outputmime).content.end(); ++content)
+          if ((*content).type)
+            fprintf(stream, serviceformat, prefix, "method-output-mime-type", method_name, (*content).type);
+      }
+    }
+    for (vector<soap__header>::const_iterator outputheader = output->header.begin(); outputheader != output->header.end(); ++outputheader)
+    { if ((*outputheader).part)
+      { if ((*outputheader).use == encoded && (*outputheader).namespace_)
+          fprintf(stream, serviceformat, prefix, "method-output-header-part", method_name, types.aname(NULL, (*outputheader).namespace_, (*outputheader).part));
+        else if ((*outputheader).partPtr() && (*outputheader).partPtr()->element)
+          fprintf(stream, serviceformat, prefix, "method-output-header-part", method_name, types.aname(NULL, NULL, (*outputheader).partPtr()->element));
+      }
+    }
+  }
+  if (output_name)
+  { if (style == document)
+      flag = output->message && output->message->part.size() == 1;
+    else if (!wflag)
+      flag = output->message && output->use == encoded && output->message->part.size() == 1 && !(*output->message->part.begin()).simpleTypePtr() && !(*output->message->part.begin()).complexTypePtr();
+    if (flag && input->message && (*output->message->part.begin()).element)
+      for (vector<wsdl__part>::const_iterator part = input->message->part.begin(); part != input->message->part.end(); ++part)
+        if ((*part).element && !strcmp((*part).element, (*output->message->part.begin()).element))
+          flag = false;
+  }
+  fprintf(stream, "int %s(", input_name);
+  input->generate(types, ",", anonymous, true, false);
+  if (output_name)
+  { if (flag)
+    { if (style == document)
+      { // Shortcut: do not generate wrapper struct
+        output->generate(types, "", anonymous, true, true);
+      }
+      else if ((*output->message->part.begin()).name)
+      { fprintf(stream, "\n");
+        fprintf(stream, anonymous ? anonformat : paraformat, types.tname(NULL, NULL, (*output->message->part.begin()).type), cflag ? "*" : "&", types.aname(NULL, NULL, (*output->message->part.begin()).name), "");
+        fprintf(stream, "\t///< Response parameter");
+      }
+    }
+    else
+    { fprintf(stream, "\n    struct %-28s%s", output_name, cflag ? "*" : "&");
+      fprintf(stream, "\t///< Response struct parameter");
+    }
+    fprintf(stream, "\n);\n");
+  }
+  else
+    fprintf(stream, "\n    void\t///< One-way message: no response parameter\n);\n");
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Message methods
+//
+////////////////////////////////////////////////////////////////////////////////
+
+void Message::generate(Types &types, const char *sep, bool anonymous, bool remark, bool response)
+{ if (message)
+  { for (vector<wsdl__part>::const_iterator part = message->part.begin(); part != message->part.end(); ++part)
+    { if (!(*part).name)
+        fprintf(stderr, "Error: no part name in message '%s'\n", message->name?message->name:"");
+      else if (!body_parts || soap_strsearch(body_parts, (*part).name))
+      { if (remark && (*part).documentation)
+          comment("", (*part).name, "parameter", (*part).documentation);
+        else
+          fprintf(stream, "\n");
+	if ((*part).element)
+        { if ((*part).elementPtr())
+          { const char *name, *type, *URI;
+            name = (*part).elementPtr()->name;
+            /* comment out to use a type that refers to an element defined with typedef */
+            if ((*part).elementPtr()->type)
+              type = (*part).elementPtr()->type;
+            else
+            /* */
+              type = name;
+            if ((*part).elementPtr()->schemaPtr())
+              URI = (*part).elementPtr()->schemaPtr()->targetNamespace;
+            else
+              URI = NULL;
+	    if (response)
+            { const char *t = types.tname(NULL, URI, type);
+	      fprintf(stream, anonymous ? anonformat : paraformat, t, strchr(t, '*') != NULL ? " " : cflag ? "*" : "&", types.aname(NULL, URI, name), sep);
+	      if (remark)
+	        fprintf(stream, "\t///< Response parameter");
+	    }
+	    else
+            { fprintf(stream, anonymous ? anonformat : paraformat, types.pname(false, NULL, URI, type), " ", types.aname(NULL, URI, name), sep);
+	      if (remark && *sep == ',')
+	        fprintf(stream, "\t///< Request parameter");
+	    }
+          }
+	  else
+          { fprintf(stream, anonymous ? anonformat : paraformat, types.pname(false, NULL, NULL, (*part).element), " ", types.aname(NULL, NULL, (*part).element), sep);
+	    if (remark)
+              fprintf(stream, "\t///< TODO: Check element type (imported type)");
+	  }
+	}
+        else if ((*part).type)
+        { if (use == literal)
+            fprintf(stderr, "Warning: part '%s' uses literal style and must refer to an element rather than a type\n", (*part).name);
+	  if (response)
+          { const char *t = types.tname(NULL, NULL, (*part).type);
+	    fprintf(stream, anonymous ? anonformat : paraformat, t, strchr(t, '*') != NULL ? " " : cflag ? "*" : "&", types.aname(NULL, NULL, (*part).name), sep);
+	    if (remark)
+              fprintf(stream, "\t///< Response parameter");
+	  }
+          else
+	  { fprintf(stream, anonymous ? anonformat : paraformat, types.pname(false, NULL, NULL, (*part).type), " ", types.aname(NULL, NULL, (*part).name), sep);
+	    if (remark && *sep == ',')
+              fprintf(stream, "\t///< Request parameter");
+	  }
+        }
+        else
+          fprintf(stderr, "Error: no wsdl:definitions/message/part/@type in part '%s'\n", (*part).name);
+      }
+    }
+  }
+  else
+    fprintf(stderr, "Error: no wsdl:definitions/message\n");
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Miscellaneous
+//
+////////////////////////////////////////////////////////////////////////////////
+
+static void comment(const char *start, const char *middle, const char *end, const char *text)
+{ if (text)
+  { if (strchr(text, '\r') || strchr(text, '\n'))
+      fprintf(stream, "\n/** %s %s %s documentation:\n%s\n*/\n\n", start, middle, end, text);
+    else
+      fprintf(stream, "\n/// %s %s %s: %s\n", start, middle, end, text);
+  }
+}
+
+static void page(const char *page, const char *title, const char *text)
+{ if (text)
+    fprintf(stream, "\n@page %s%s \"%s\"\n", page, title, text);
+  else
+    fprintf(stream, "\n@page %s%s\n", page, title);
+}
+
+static void section(const char *section, const char *title, const char *text)
+{ if (text)
+    fprintf(stream, "\n@section %s%s \"%s\"\n", section, title, text);
+  else
+    fprintf(stream, "\n@section %s%s\n", section, title);
+}
+
+static void banner(const char *text)
+{ int i;
+  fprintf(stream, "\n/");
+  for (i = 0; i < 78; i++)
+    fputc('*', stream);
+  fprintf(stream, "\\\n *%76s*\n * %-75s*\n *%76s*\n\\", "", text, "");
+  for (i = 0; i < 78; i++)
+    fputc('*', stream);
+  fprintf(stream, "/\n\n");
+}
+
+static void ident()
+{ time_t t = time(NULL), *p = &t;
+  char tmp[256];
+  int i;
+  strftime(tmp, 256, "%Y-%m-%d %H:%M:%S GMT", gmtime(p));
+  fprintf(stream, "/* %s\n   Generated by wsdl2h "VERSION" from ", outfile?outfile:"");
+  if (infiles)
+  { for (i = 0; i < infiles; i++)
+      fprintf(stream, "%s ", infile[i]);
+  }
+  else
+    fprintf(stream, "(stdin) ");
+  fprintf(stream, "and %s\n   %s\n   Copyright (C) 2001-2005 Robert van Engelen, Genivia Inc. All Rights Reserved.\n   This part of the software is released under one of the following licenses:\n   GPL or Genivia's license for commercial use.\n*/\n\n", mapfile, tmp);
+}
+
+static void text(const char *text)
+{ const char *s = text;
+  if (!s)
+    return;
+  while (*s)
+  { switch (*s)
+    { case '\n':
+      case '\t':
+      case ' ':
+	fputc(*s, stream);
+        break;
+      case '/':
+	fputc(*s, stream);
+        if (s[1] == '*')
+	  fputc(' ', stream);
+        break;
+      case '*':
+	fputc(*s, stream);
+        if (s[1] == '/')
+	  fputc(' ', stream);
+        break;
+      default:
+        if (*s > 32)
+	  fputc(*s, stream);
+    }
+    s++;
+  }
+  fputc('\n', stream);
+}
diff --git a/wsdl/service.h b/wsdl/service.h
new file mode 100644
index 0000000..69c2e9d
--- /dev/null
+++ b/wsdl/service.h
@@ -0,0 +1,113 @@
+/*
+
+service.h
+
+Service structures.
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+*/
+
+#ifndef SERVICE_H
+#define SERVICE_H
+
+#include "includes.h"
+#include "wsdlH.h"
+
+class Message
+{ public:
+    const char *name;
+    const char *URI;
+    soap__useChoice use;
+    const char *encodingStyle;
+    wsdl__message *message;
+    const char *body_parts;
+    wsdl__part *part;
+    vector<soap__header> header;
+    mime__multipartRelated *multipartRelated;	// MIME
+    mime__content *content;			// MIME
+    const char *layout;				// DIME
+    const char *documentation;
+    const char *ext_documentation;
+    void generate(Types&, const char *sep, bool anonymous, bool remark, bool response);
+};
+
+typedef map<const char*, Message*, ltstr> MapOfStringToMessage;
+
+class Operation
+{ public:
+    const char *prefix;
+    const char *URI;
+    const char *name;
+    soap__styleChoice style;
+    const char *parameterOrder;
+    const char *soapAction;
+    const char *input_name;
+    const char *output_name;
+    Message *input; 			// name, use, and parts
+    Message *output;			// name, use, and parts
+    vector<Message*> fault;
+    const char *documentation;
+    const char *operation_documentation;
+    void generate(Types&);
+};
+
+class Service
+{ public:
+    const char *prefix;			// a gSOAP service has a unique namespace
+    const char *URI;
+    const char *name;			// binding name
+    const char *type;			// portType
+    const char *transport;		// binding transport
+    SetOfString location;		// WSDL may specify multiple locations via <Port> -> <Binding>
+    vector<Operation*> operation;
+    MapOfStringToMessage header;
+    MapOfStringToMessage headerfault;
+    MapOfStringToMessage fault;
+    MapOfStringToString service_documentation;
+    MapOfStringToString port_documentation;
+    MapOfStringToString binding_documentation;
+    Service();
+    void generate(Types&);
+};
+
+typedef map<const char*, Service*, ltstr> MapOfStringToService;
+
+class Definitions
+{ public:
+    Types types;				// to process schema type information
+    MapOfStringToService services;		// service information gathered
+    Definitions();
+    void collect(const wsdl__definitions&);
+    void compile(const wsdl__definitions&);
+  private:
+    void analyze(const wsdl__definitions&);
+    void generate();
+};
+
+#endif
diff --git a/wsdl/soap.cpp b/wsdl/soap.cpp
new file mode 100644
index 0000000..1157014
--- /dev/null
+++ b/wsdl/soap.cpp
@@ -0,0 +1,187 @@
+/*
+
+soap.cpp
+
+WSDL/SOAP binding schema
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2006, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+*/
+
+#include "wsdlH.h"		// cannot include "schemaH.h"
+
+using namespace std;
+
+extern const char *qname_token(const char*, const char*);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	soap:header
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int soap__header::traverse(wsdl__definitions& definitions)
+{ if (vflag)
+    cerr << "Analyzing soap header " << endl;
+  messageRef = NULL;
+  partRef = NULL;
+  const char *token = qname_token(message, definitions.targetNamespace);
+  if (token)
+  { for (vector<wsdl__message>::iterator message = definitions.message.begin(); message != definitions.message.end(); ++message)
+    { if ((*message).name && !strcmp((*message).name, token))
+      { messageRef = &(*message);
+        if (vflag)
+	  cerr << "Found header part " << (part?part:"") << " message " << (token?token:"") << endl;
+        break;
+      }
+    }
+  }
+  else
+  { for (vector<wsdl__import>::iterator import = definitions.import.begin(); import != definitions.import.end(); ++import)
+    { wsdl__definitions *importdefinitions = (*import).definitionsPtr();
+      if (importdefinitions)
+      { token = qname_token(message, importdefinitions->targetNamespace);
+        if (token)
+        { for (vector<wsdl__message>::iterator message = importdefinitions->message.begin(); message != importdefinitions->message.end(); ++message)
+          { if ((*message).name && !strcmp((*message).name, token))
+            { messageRef = &(*message);
+              if (vflag)
+	        cerr << "Found header part " << (part?part:"") << " message " << (token?token:"") << endl;
+              break;
+            }
+          }
+	}
+      }
+    }
+  }
+  if (messageRef)
+  { if (part)
+    { for (vector<wsdl__part>::iterator pt = messageRef->part.begin(); pt != messageRef->part.end(); ++pt)
+        if ((*pt).name && !strcmp((*pt).name, part))
+	{ partRef = &(*pt);
+	  break;
+        }
+    }
+    if (!partRef)
+      cerr << "Warning: soap header has no matching part in message " << (message?message:"") << " in WSDL definitions " << definitions.name << " namespace " << (definitions.targetNamespace?definitions.targetNamespace:"") << endl;
+  }
+  else
+    cerr << "Warning: could not find header part " << (part?part:"") << " message " << (message?message:"") << " in WSDL definitions " << definitions.name << " namespace " << (definitions.targetNamespace?definitions.targetNamespace:"") << endl;
+  for (vector<soap__headerfault>::iterator i = headerfault.begin(); i != headerfault.end(); ++i)
+    (*i).traverse(definitions);
+  return SOAP_OK;
+}
+
+void soap__header::messagePtr(wsdl__message *message)
+{ messageRef = message;
+}
+
+wsdl__message *soap__header::messagePtr() const
+{ return messageRef;
+}
+
+void soap__header::partPtr(wsdl__part *part)
+{ partRef = part;
+}
+
+wsdl__part *soap__header::partPtr() const
+{ return partRef;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	soap:headerfault
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int soap__headerfault::traverse(wsdl__definitions& definitions)
+{ if (vflag)
+    cerr << "Analyzing soap headerfault " << endl;
+  messageRef = NULL;
+  partRef = NULL;
+  const char *token = qname_token(message, definitions.targetNamespace);
+  if (token)
+  { for (vector<wsdl__message>::iterator message = definitions.message.begin(); message != definitions.message.end(); ++message)
+    { if ((*message).name && !strcmp((*message).name, token))
+      { messageRef = &(*message);
+        if (vflag)
+	  cerr << "Found headerfault part " << (part?part:"") << " message " << (token?token:"") << endl;
+        break;
+      }
+    }
+  }
+  else
+  { for (vector<wsdl__import>::iterator import = definitions.import.begin(); import != definitions.import.end(); ++import)
+    { wsdl__definitions *importdefinitions = (*import).definitionsPtr();
+      if (importdefinitions)
+      { token = qname_token(message, importdefinitions->targetNamespace);
+        if (token)
+        { for (vector<wsdl__message>::iterator message = importdefinitions->message.begin(); message != importdefinitions->message.end(); ++message)
+          { if ((*message).name && !strcmp((*message).name, token))
+            { messageRef = &(*message);
+              if (vflag)
+	        cerr << "Found headerfault part " << (part?part:"") << " message " << (token?token:"") << endl;
+              break;
+            }
+          }
+	}
+      }
+    }
+  }
+  if (messageRef)
+  { if (part)
+    { for (vector<wsdl__part>::iterator pt = messageRef->part.begin(); pt != messageRef->part.end(); ++pt)
+        if ((*pt).name && !strcmp((*pt).name, part))
+	{ partRef = &(*pt);
+	  break;
+        }
+    }
+    if (!partRef)
+      cerr << "Warning: soap headerfault has no matching part in message " << (message?message:"") << " in WSDL definitions " << definitions.name << " namespace " << (definitions.targetNamespace?definitions.targetNamespace:"") << endl;
+  }
+  else
+    cerr << "Warning: could not find headerfault part " << (part?part:"") << " message " << (message?message:"") << " in WSDL definitions " << definitions.name << " namespace " << (definitions.targetNamespace?definitions.targetNamespace:"") << endl;
+  return SOAP_OK;
+}
+
+void soap__headerfault::messagePtr(wsdl__message *message)
+{ messageRef = message;
+}
+
+wsdl__message *soap__headerfault::messagePtr() const
+{ return messageRef;
+}
+
+void soap__headerfault::partPtr(wsdl__part *part)
+{ partRef = part;
+}
+
+wsdl__part *soap__headerfault::partPtr() const
+{ return partRef;
+}
+
diff --git a/wsdl/soap.h b/wsdl/soap.h
new file mode 100644
index 0000000..147ca68
--- /dev/null
+++ b/wsdl/soap.h
@@ -0,0 +1,117 @@
+/*
+
+soap.h
+
+WSDL/SOAP binding schema
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+*/
+
+//gsoap soap schema documentation:	WSDL/SOAP binding schema
+//gsoap soap schema namespace:		http://schemas.xmlsoap.org/wsdl/soap/
+
+#import "imports.h"
+
+class wsdl__definitions;		// forward declaration
+class wsdl__message;			// forward declaration
+class wsdl__part;			// forward declaration
+
+enum soap__styleChoice { rpc, document };
+
+class soap__binding
+{ public:
+	@xsd__anyURI			transport;
+ 	@enum soap__styleChoice		*style;
+};
+
+class soap__operation
+{ public:
+	@xsd__anyURI			soapAction;
+	@enum soap__styleChoice		*style;
+};
+
+enum soap__useChoice { literal, encoded };
+
+class soap__body
+{ public:
+	@xsd__anyURI			encodingStyle;
+ 	@xsd__NMTOKENS			parts;
+	@enum soap__useChoice		use;
+	@xsd__anyURI			namespace_;
+};
+
+class soap__fault
+{ public:
+	@xsd__NMTOKEN			name;
+	@xsd__anyURI			encodingStyle;
+	@enum soap__useChoice		use;
+	@xsd__anyURI			namespace_;
+};
+
+class soap__headerfault
+{ public:
+	@xsd__QName			message;
+ 	@xsd__NMTOKEN			part;
+	@enum soap__useChoice		use;
+	@xsd__anyURI			encodingStyle;
+	@xsd__anyURI			namespace_;
+  private:
+  	wsdl__message			*messageRef;
+  	wsdl__part			*partRef;
+  public:
+  	int				traverse(wsdl__definitions&);
+	void				messagePtr(wsdl__message*);
+	void				partPtr(wsdl__part*);
+	wsdl__message			*messagePtr() const;
+	wsdl__part			*partPtr() const;
+};
+
+class soap__header
+{ public:
+	@xsd__QName			message;
+ 	@xsd__NMTOKEN			part;
+	@enum soap__useChoice		use;
+	@xsd__anyURI			encodingStyle;
+	@xsd__anyURI			namespace_;
+	std::vector<soap__headerfault>	headerfault;		// <soap:headerfault>*
+  private:
+  	wsdl__message			*messageRef;
+  	wsdl__part			*partRef;
+  public:
+  	int				traverse(wsdl__definitions&);
+	void				messagePtr(wsdl__message*);
+	void				partPtr(wsdl__part*);
+	wsdl__message			*messagePtr() const;
+	wsdl__part			*partPtr() const;
+};
+
+class soap__address
+{ public:
+	@xsd__anyURI			location;
+};
diff --git a/wsdl/typemap.dat b/wsdl/typemap.dat
new file mode 100644
index 0000000..b79d8c7
--- /dev/null
+++ b/wsdl/typemap.dat
@@ -0,0 +1,172 @@
+#	typemap.dat
+#
+#	Use this file to define namespace prefix and type bindings for
+#	the generated header files by the 'wsdl2h' tool.  typemap.dat is the
+#	default file processed by 'wsdl2h' to customize its output. You can use
+#	wsdl2h option -t to specify an alternate file.
+#
+#	XML namespace prefix bindings can be provided to override the default
+#	choice of the ns1, ns2, ... prefixes generated by wsdl2h.  It is highly
+#	recommended to provide namespace prefixes for your project's XML
+#	namespaces. In this way, changes to the WSDL (or newer releases of
+#	wsdl2h) will have a minimal impact on coding.
+#	Bindings for namespace prefixes are of the form:
+#		prefix = "URI"
+#
+#	Type bindings can by provided to bind XML schema types to C/C++ types
+#	for your project.
+#	Type bindings are of the form:
+#		prefix__type = declaration | use | ptr-use
+#	where 'declaration' introduces the type in the header file, 'use'
+#	specifies how the type is used directly, 'ptr-use' specifies how the
+#	type is used as a pointer type.
+#	For example:
+#		xsd__string = | char* | char*
+#	After enabling this line, all XSD strings will be mapped to char*. Note
+#	that the 'declaration' part is empty in this case.
+#
+#	Member data and functions can be provided to extend a generated struct
+#	or class.
+#	Class and struct extensions are of the form:
+#		prefix__type = $ member-declaration
+#	For example, to add a constructor and destructor to class myns__record:
+#		myns__record = $ myns__record();
+#		myns__record = $ ~myns__record();
+#	
+#	Any other material to be included in the generated header file can be
+#	provided by enclosing the text within brackets [ and ]. Brackets MUST
+#	appear at the start of a new line.
+#	For example, to include a note:
+#[
+#// TODO: Don't forget to bind the namespace prefixes!
+#]
+#	This comment appears as the first line in the generated header file.
+#
+#-------------------------------------------------------------------------------
+#gSOAP XML Web services tools
+#Copyright (C) 2004-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+#This software is released under one of the following two licenses:
+#GPL or Genivia's license for commercial use.
+#-------------------------------------------------------------------------------
+#GPL license.
+#
+#This program is free software; you can redistribute it and/or modify it under
+#the terms of the GNU General Public License as published by the Free Software
+#Foundation; either version 2 of the License, or (at your option) any later
+#version.
+#
+#This program is distributed in the hope that it will be useful, but WITHOUT ANY
+#WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+#PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+#You should have received a copy of the GNU General Public License along with
+#this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+#Place, Suite 330, Boston, MA 02111-1307 USA
+#
+#Author contact information:
+#engelen@genivia.com / engelen@acm.org
+#-------------------------------------------------------------------------------
+#A commercial use license is available from Genivia, Inc., contact@genivia.com
+#-------------------------------------------------------------------------------
+
+[
+// Reminder: Modify typemap.dat to customize the header file generated by wsdl2h
+]
+
+#	For WhiteMesa interoperability testing round 2:
+
+i	= "http://www.soapinterop.org/"
+s	= "http://www.soapinterop.org/xsd"
+
+#	Amazon Web Services:
+
+aws	= "urn:PI/DevCentral/SoapService"
+
+#	Mappoint Web services:
+
+mpt	= "http://s.mappoint.net/mappoint-30/"
+
+#	MTOM xop and xmime are imported from xop.h, xmime.h, and xmlmime.h:
+
+xop	= <http://www.w3.org/2004/08/xop/include>
+xmime	= <http://www.w3.org/2004/06/xmlmime>
+xmlmime	= <http://www.w3.org/2004/11/xmlmime>
+
+#	xmime/xmlmime:contentType attribute is juts a string:
+
+_xmime__contentType	= | char* | char*
+_xmlmime__contentType	= | char* | char*
+
+#	WS-Addressing (2003 and 2004 schemas)
+#	See import/wsa.h and import/wsa3.h for definitions and code examples
+
+wsa	= <http://schemas.xmlsoap.org/ws/2004/08/addressing>
+wsa3	= <http://schemas.xmlsoap.org/ws/2003/03/addressing>
+
+#	WS-Policy
+
+wsp	= <http://schemas.xmlsoap.org/ws/2004/09/policy>
+
+#	wsse 2004 and old wsse 2002 schema
+
+wsse	= <http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd>
+wsse2	= <http://schemas.xmlsoap.org/ws/2002/12/secext>
+
+#	wsu 2004
+
+wsu	= <http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd>
+
+_wsu__Id		= | char*
+_wsu__Created		= | time_t
+_wsu__Expires		= | time_t
+
+wsu__AttributedDateTime	= | time_t
+wsu__AttributedURI	= | char*
+
+#	Bindings for ds and xenc for WS-Security protocols:
+
+ds	= <http://www.w3.org/2000/09/xmldsig#>
+xenc	= <http://www.w3.org/2001/04/xmlenc#>
+
+#	xlink
+
+xlink	= <http://www.w3.org/1999/xlink>
+
+_xlink__actuate		= | char*
+_xlink__arcrole		= | char*
+_xlink__from		= | char*
+_xlink__href		= | char*
+_xlink__label		= | char*
+_xlink__role		= | char*
+_xlink__show		= | char*
+_xlink__to		= | char*
+_xlink__title		= | char*
+_xlink__type		= | char*
+
+#	wsrp
+
+wsrp	= <http://schemas.xmlsoap.org/rp/>
+
+#	Remember: type bindings are given on a single line.
+#	Example XML schema and C/C++ type bindings:
+
+xsd__int	= | int
+
+#	With SOAP encoded arrays, the SOAP-ENC:arrayType attribute is defined
+#	but we really don't need it because we never use it
+
+SOAP_ENC__arrayType	= | char* | char*
+
+#	To use regular char* strings instead of std::string, use:
+
+# xsd__string	= | char* | char*
+
+#	To use regular char* strings serialized with xsi:type attributes, use:
+
+# xsd__string	= typedef char *xsd__string; | xsd__string | xsd__string
+
+#	More examples:
+
+# xsd__boolean = enum xsd__boolean { false_, true_ }; | enum xsd__boolean
+
+# xsd__base64Binary = class xsd__base64Binary { unsigned char *__ptr; int __size; }; | xsd__base64Binary | xsd__base64Binary
diff --git a/wsdl/types.cpp b/wsdl/types.cpp
new file mode 100644
index 0000000..1c7e69e
--- /dev/null
+++ b/wsdl/types.cpp
@@ -0,0 +1,2411 @@
+/*
+
+types.cpp
+
+WSDL parser and converter to gSOAP header file format
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2006, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+*/
+
+#include "types.h"
+
+static char *getline(char *s, size_t n, FILE *fd);
+static const char *nonblank(const char *s);
+static const char *fill(char *t, int n, const char *s, int e);
+static const char *utf8(char *t, const char *s);
+static const char *cstring(const char *s);
+static const char *xstring(const char *s);
+static bool is_integer(const char *s);
+static void documentation(const char *text);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Keywords and reserved words
+//
+////////////////////////////////////////////////////////////////////////////////
+
+static const char *keywords[] =
+{ "and",
+  "asm",
+  "auto",
+  "bool",
+  "break",
+  "case",
+  "catch",
+  "char",
+  "class",
+  "const",
+  "const_cast",
+  "continue",
+  "default",
+  "delete",
+  "do",
+  "double",
+  "dynamic_cast",
+  "else",	
+  "enum",
+  "errno",
+  "explicit",
+  "export",
+  "extern",
+  "false",
+  "FILE",
+  "float",
+  "for",
+  "friend",
+  "goto",
+  "if",
+  "inline",
+  "int",
+  "long",
+  "LONG64",
+  "max",
+  "min",
+  "mustUnderstand",
+  "mutable",
+  "namespace",
+  "new",
+  "not",
+  "NULL",
+  "operator",
+  "or",
+  "private",
+  "protected",
+  "public",
+  "_QName",
+  "register",
+  "reinterpret_cast",
+  "restrict",
+  "return",
+  "short",
+  "signed",
+  "size_t",
+  "sizeof",
+  "static",
+  "static_cast",
+  "struct",
+  "switch",
+  "template",
+  "this",
+  "throw",
+  "time_t",
+  "true",
+  "typedef",
+  "typeid",
+  "typename",
+  "ULONG64",
+  "union",
+  "unsigned",
+  "using",
+  "virtual",
+  "void",
+  "volatile",
+  "wchar_t",
+  "while",
+  "XML",
+  "_XML",
+  "xor",
+};
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Types methods
+//
+////////////////////////////////////////////////////////////////////////////////
+
+Types::Types()
+{ init();
+}
+
+int Types::read(const char *file)
+{ FILE *fd = fopen(file, "r");
+  char buf[1024], xsd[1024], def[1024], use[1024], ptr[1024], uri[1024];
+  const char *s;
+  short copy = 0;
+  if (!fd)
+  { fprintf(stderr, "Cannot open file '%s'\n", file);
+    return SOAP_EOF;
+  }
+  fprintf(stderr, "Reading type map file '%s'\n\n", file);
+  while (getline(buf, sizeof(buf), fd))
+  { s = buf;
+    if (copy)
+    { if (*s == ']')
+        copy = 0;
+      else
+        fprintf(stream, "%s\n", buf);
+    }
+    else if (*s == '[')
+      copy = 1;
+    else if (*s && *s != '#')
+    { s = fill(xsd, sizeof(xsd), s, '=');
+      if (strstr(xsd, "__"))
+      { s = fill(def, sizeof(def), s, '|');
+        s = fill(use, sizeof(use), s, '|');
+        s = fill(ptr, sizeof(ptr), s, '|');
+        if (*xsd)
+        { s = estrdup(xsd);
+	  if (*def == '$')
+	  { const char *t = modtypemap[s];
+	    if (t)
+	    { char *r = (char*)emalloc(strlen(t) + strlen(def) + 1);
+	      strcpy(r, t);
+	      strcat(r, def);
+	      free((void*)modtypemap[s]);
+	      modtypemap[s] = r;
+	    }
+	    else
+	      modtypemap[s] = estrdup(def);
+	  }
+          else
+	  { if (*def)
+              deftypemap[s] = estrdup(def);
+            else
+              deftypemap[s] = "";
+            if (*use)
+              usetypemap[s] = estrdup(use);
+	    else
+              usetypemap[s] = estrdup(xsd);
+            if (*ptr)
+              ptrtypemap[s] = estrdup(ptr);
+          }
+        }
+      }
+      else if (*xsd)
+      { s = fill(uri, sizeof(uri), s, 0);
+        if (uri[0] == '"')
+        { uri[strlen(uri) - 1] = '\0';
+          nsprefix(xsd, estrdup(uri + 1));
+        }
+        else if (uri[0] == '<')
+        { uri[strlen(uri) - 1] = '\0';
+	  char *s = estrdup(uri + 1);
+	  nsprefix(xsd, s);
+	  exturis.insert(s);
+        }
+        else
+          nsprefix(xsd, estrdup(uri));
+      }
+    }
+  }
+  fclose(fd);
+  return SOAP_OK;
+}
+
+void Types::init()
+{ snum = 1;
+  unum = 1;
+  gnum = 1;
+  with_union = false;
+  fake_union = false;
+  knames.insert(keywords, keywords + sizeof(keywords)/sizeof(char*));
+  if (cflag)
+  { deftypemap["xsd__ur_type"] = "";
+    if (dflag)
+    { usetypemap["xsd__ur_type"] = "xsd__anyType";
+      ptrtypemap["xsd__ur_type"] = "xsd__anyType*";
+    }
+    else
+    { usetypemap["xsd__ur_type"] = "_XML";
+      ptrtypemap["xsd__ur_type"] = "_XML";
+    }
+  }
+  else
+  { deftypemap["xsd__ur_type"] = "class xsd__ur_type { _XML __item; struct soap *soap; };";
+    usetypemap["xsd__ur_type"] = "xsd__ur_type";
+  }
+  if (cflag)
+  { deftypemap["xsd__anyType"] = "";
+    if (dflag)
+    { usetypemap["xsd__anyType"] = "xsd__anyType";
+      ptrtypemap["xsd__anyType"] = "xsd__anyType*";
+    }
+    else
+    { usetypemap["xsd__anyType"] = "_XML";
+      ptrtypemap["xsd__anyType"] = "_XML";
+    }
+  }
+  else
+  { deftypemap["xsd__anyType"] = "class xsd__anyType { _XML __item; struct soap *soap; };";
+    usetypemap["xsd__anyType"] = "xsd__anyType*";
+  }
+  if (cflag)
+  { deftypemap["xsd__base64Binary"] = "struct xsd__base64Binary\n{\tunsigned char *__ptr;\n\tint __size;\n\tchar *id, *type, *options; /* NOTE: for DIME and MTOM XOP attachments only */\n};";
+    usetypemap["xsd__base64Binary"] = "struct xsd__base64Binary";
+  }
+  else
+  { deftypemap["xsd__base64Binary"] = "class xsd__base64Binary\n{\tunsigned char *__ptr;\n\tint __size;\n\tchar *id, *type, *options; /* NOTE: for DIME and MTOM XOP attachments only */\n\tstruct soap *soap;\n};";
+    usetypemap["xsd__base64Binary"] = "xsd__base64Binary";
+  }
+  if (cflag)
+  { if (eflag)
+      deftypemap["xsd__boolean"] = "enum xsd__boolean { false_, true_ };";
+    else
+      deftypemap["xsd__boolean"] = "enum xsd__boolean { xsd__boolean__false_, xsd__boolean__true_ };";
+    usetypemap["xsd__boolean"] = "enum xsd__boolean";
+  }
+  else
+  { deftypemap["xsd__boolean"] = "";
+    usetypemap["xsd__boolean"] = "bool";
+  }
+  deftypemap["xsd__byte"] = "";
+  usetypemap["xsd__byte"] = "char";
+  ptrtypemap["xsd__byte"] = "short*"; // avoid char*
+  deftypemap["xsd__dateTime"] = "";
+  usetypemap["xsd__dateTime"] = "time_t";
+  deftypemap["xsd__double"] = "";
+  usetypemap["xsd__double"] = "double";
+  deftypemap["xsd__float"] = "";
+  usetypemap["xsd__float"] = "float";
+  if (cflag)
+  { deftypemap["xsd__hexBinary"] = "struct xsd__hexBinary { unsigned char *__ptr; int __size; };";
+    usetypemap["xsd__hexBinary"] = "struct xsd__hexBinary";
+  }
+  else
+  { deftypemap["xsd__hexBinary"] = "class xsd__hexBinary { unsigned char *__ptr; int __size; };";
+    usetypemap["xsd__hexBinary"] = "xsd__hexBinary";
+  }
+  deftypemap["xsd__int"] = "";
+  usetypemap["xsd__int"] = "int";
+  deftypemap["xsd__long"] = "";
+  usetypemap["xsd__long"] = "LONG64";
+  deftypemap["xsd__short"] = "";
+  usetypemap["xsd__short"] = "short";
+  if (cflag || sflag)
+  { deftypemap["xsd__string"] = "";
+    usetypemap["xsd__string"] = "char*";
+  }
+  else
+  { deftypemap["xsd__string"] = "";
+    usetypemap["xsd__string"] = "std::string";
+  }
+  deftypemap["xsd__unsignedByte"] = "";
+  usetypemap["xsd__unsignedByte"] = "unsigned char";
+  ptrtypemap["xsd__unsignedByte"] = "unsigned short*"; // avoid unsigned char*
+  deftypemap["xsd__unsignedInt"] = "";
+  usetypemap["xsd__unsignedInt"] = "unsigned int";
+  deftypemap["xsd__unsignedLong"] = "";
+  usetypemap["xsd__unsignedLong"] = "ULONG64";
+  deftypemap["xsd__unsignedShort"] = "";
+  usetypemap["xsd__unsignedShort"] = "unsigned short";
+  if (cflag)
+  { deftypemap["SOAP_ENC__base64Binary"] = "struct SOAP_ENC__base64Binary { unsigned char *__ptr; int __size; };";
+    usetypemap["SOAP_ENC__base64Binary"] = "struct SOAP_ENC__base64Binary";
+  }
+  else
+  { deftypemap["SOAP_ENC__base64Binary"] = "class SOAP_ENC__base64Binary { unsigned char *__ptr; int __size; };";
+    usetypemap["SOAP_ENC__base64Binary"] = "SOAP_ENC__base64Binary";
+  }
+  if (cflag)
+  { deftypemap["SOAP_ENC__boolean"] = "enum SOAP_ENC__boolean { false_, true_ };";
+    usetypemap["SOAP_ENC__boolean"] = "enum SOAP_ENC__boolean";
+  }
+  else
+  { deftypemap["SOAP_ENC__boolean"] = "";
+    usetypemap["SOAP_ENC__boolean"] = "bool";
+  }
+  deftypemap["SOAP_ENC__byte"] = "";
+  usetypemap["SOAP_ENC__byte"] = "char";
+  deftypemap["SOAP_ENC__dateTime"] = "";
+  usetypemap["SOAP_ENC__dateTime"] = "time_t";
+  deftypemap["SOAP_ENC__double"] = "";
+  usetypemap["SOAP_ENC__double"] = "double";
+  deftypemap["SOAP_ENC__float"] = "";
+  usetypemap["SOAP_ENC__float"] = "float";
+  if (cflag)
+  { deftypemap["SOAP_ENC__hexBinary"] = "struct SOAP_ENC__hexBinary { unsigned char *__ptr; int __size; };";
+    usetypemap["SOAP_ENC__hexBinary"] = "struct SOAP_ENC__hexBinary";
+  }
+  else
+  { deftypemap["SOAP_ENC__hexBinary"] = "class SOAP_ENC__hexBinary { unsigned char *__ptr; int __size; };";
+    usetypemap["SOAP_ENC__hexBinary"] = "SOAP_ENC__hexBinary";
+  }
+  deftypemap["SOAP_ENC__int"] = "";
+  usetypemap["SOAP_ENC__int"] = "int";
+  deftypemap["SOAP_ENC__long"] = "";
+  usetypemap["SOAP_ENC__long"] = "LONG64";
+  deftypemap["SOAP_ENC__short"] = "";
+  usetypemap["SOAP_ENC__short"] = "short";
+  ptrtypemap["SOAP_ENC__short"] = "int*";
+  if (cflag || sflag)
+  { deftypemap["SOAP_ENC__string"] = "";
+    usetypemap["SOAP_ENC__string"] = "char*";
+  }
+  else
+  { deftypemap["SOAP_ENC__string"] = "";
+    usetypemap["SOAP_ENC__string"] = "std::string";
+  }
+  deftypemap["SOAP_ENC__unsignedByte"] = "";
+  usetypemap["SOAP_ENC__unsignedByte"] = "unsigned char";
+  ptrtypemap["SOAP_ENC__unsignedByte"] = "unsigned short*";
+  deftypemap["SOAP_ENC__unsignedInt"] = "";
+  usetypemap["SOAP_ENC__unsignedInt"] = "unsigned long";
+  deftypemap["SOAP_ENC__unsignedLong"] = "";
+  usetypemap["SOAP_ENC__unsignedLong"] = "ULONG64";
+  deftypemap["SOAP_ENC__unsignedShort"] = "";
+  usetypemap["SOAP_ENC__unsignedShort"] = "unsigned short";
+  deftypemap["SOAP_ENC__Array"] = "";
+  if (read(mapfile))
+    fprintf(stderr, "Problem reading type map file %s.\nUsing internal type definitions for %s instead.\n\n", mapfile, cflag?"C":"C++");
+}
+
+const char *Types::nsprefix(const char *prefix, const char *URI)
+{ if (URI)
+  { const char *s = uris[URI];
+    if (!s)
+    { size_t n;
+      if (!prefix || !*prefix || *prefix == '_')
+        s = schema_prefix;
+      else
+        s = estrdup(prefix);
+      if (!syms[s])
+        n = syms[s] = 1;
+      else
+        n = ++syms[s];
+      if (n != 1 || !prefix || !*prefix || *prefix == '_')
+      { char *t = (char*)emalloc(strlen(s) + 16);
+        sprintf(t, "%s%lu", s, (unsigned long)n);
+	s = t;
+      }
+      uris[URI] = s;
+      if (vflag)
+        fprintf(stderr, "namespace prefix %s = \"%s\"\n", s, URI);
+    }
+    return s;
+  }
+  return NULL;
+}
+
+// Find a C name for a QName. If the name has no qualifier, use URI. Suggest prefix for URI
+const char *Types::fname(const char *prefix, const char *URI, const char *qname, SetOfString *reserved, enum Lookup lookup)
+{ char buf[1024], *t;
+  const char *p, *s, *name;
+  if (!qname)
+  { fprintf(stream, "// Warning: internal error, undefined qname in fname()\n");
+    qname = "?";
+  }
+  s = strrchr(qname, ':');
+  if (s)
+  { name = s + 1;
+    if (*qname == '"')
+    { t = (char*)emalloc(s - qname - 1);
+      strncpy(t, qname + 1, s - qname - 2);
+      t[s - qname - 2] = '\0';
+      URI = t;
+    }
+    else if (!strncmp(qname, "xs:", 3))	// this hack is necessary since the nsmap table defines "xs" for "xsd"
+    { s = "xsd";
+      URI = NULL;
+    }
+    else
+    { t = (char*)emalloc(s - qname + 1);
+      strncpy(t, qname, s - qname);
+      t[s - qname] = '\0';
+      s = t;
+      URI = NULL;
+    }
+  }
+  else
+    name = qname;
+  if (URI)
+    p = nsprefix(prefix, URI);
+  else if (s)
+    p = s;
+  else
+    p = "";
+  if (lookup == LOOKUP)
+  { s = qnames[Pair(p,name)];
+    if (s)
+      return s;
+  }
+  t = buf;
+  if (!prefix || *prefix)
+  { s = p;
+    if (prefix && *prefix == '_') // ensures ns prefix starts with _...
+    { strcpy(t, prefix);
+      t += strlen(prefix);
+    }
+    if (s && *s)
+    { for (; *s; s++)
+      { if (isalnum(*s))
+          *t++ = *s;
+        else if (*s == '-' && s != p)
+          *t++ = '_';
+        else if (*s == '_')
+        { strcpy(t, "_USCORE");
+          t += 7;
+        }
+        else
+	{ s = utf8(t, s);
+          t += 6;
+        }
+      }
+      if (!prefix || *prefix != '*')
+      { *t++ = '_';
+        *t++ = '_';
+      }
+    }
+    else if (isdigit(*name))
+      *t++ = '_';
+  }
+  for (s = name; *s; s++)
+  { if (isalnum(*s))
+      *t++ = *s;
+    else if (*s == '-' && s != name)
+      *t++ = '_';
+    else if (*s == '_')
+    { strcpy(t, "_USCORE");
+      t += 7;
+    }
+    else
+    { s = utf8(t, s);
+      t += 6;
+    }
+  }
+  *t = '\0';
+  while (knames.find(buf) != knames.end() || (reserved && reserved->find(buf) != reserved->end()))
+  { *t++ = '_';
+    *t = '\0';
+  }
+  if (isalpha(*buf) || *buf == '_')
+  { t = (char*)emalloc(strlen(buf) + 1);
+    strcpy(t, buf);
+  }
+  else
+  { t = (char*)emalloc(strlen(buf) + 2);
+    *t = '_';
+    strcpy(t + 1, buf);
+  }
+  if (lookup == LOOKUP)
+    qnames[Pair(p,name)] = t;
+  /*
+  cerr << "[DEFINED " << p << ":" << name << "=" << t << "]" << endl;
+  for (MapOfPairToString::const_iterator i = qnames.begin(); i != qnames.end(); ++i)
+    cerr << "(" << (*i).first.first << "," << (*i).first.second << ") = " << (*i).second << endl;
+  */
+  return t;
+}
+
+bool Types::is_defined(const char *prefix, const char *URI, const char *qname)
+{ const char *t = fname(prefix, URI, qname, NULL, LOOKUP);
+  return usetypemap[t] != NULL;
+}
+
+const char *Types::aname(const char *prefix, const char *URI, const char *qname)
+{ return fname(prefix, URI, qname, NULL, NOLOOKUP);
+}
+
+const char *Types::cname(const char *prefix, const char *URI, const char *qname)
+{ return fname(prefix, URI, qname, NULL, LOOKUP);
+}
+
+const char *Types::tname(const char *prefix, const char *URI, const char *qname)
+{ const char *s, *t = cname(prefix, URI, qname);
+  s = usetypemap[t];
+  if (!s)
+  { s = t;
+    fprintf(stream, "// Warning: internal error, undefined qname '%s' for type '%s'\n", qname?qname:"", t);
+  }
+  return s;
+}
+
+const char *Types::tnameptr(bool flag, const char *prefix, const char *URI, const char *qname)
+{ const char *s = pname(flag, prefix, URI, qname);
+  if (flag)
+  { if (!strncmp(s, "char*", 5))
+      return "char**";
+    if (!strchr(s, '*'))
+    { char *r = (char*)emalloc(strlen(s) + 2);
+      strcpy(r, s);
+      strcat(r, "*");
+      return r;
+    }
+  }
+  return s;
+}
+
+const char *Types::pname(bool flag, const char *prefix, const char *URI, const char *qname)
+{ const char *r, *s, *t = cname(prefix, URI, qname);
+  if (flag)
+  { s = ptrtypemap[t];
+    if (!s)
+    { s = usetypemap[t];
+      if (!s || !*s)
+      { s = t;
+        fprintf(stream, "// Warning: internal error, undefined: %s %s\n", qname, t);
+      }
+      r = s;
+      do
+      { r = strchr(r + 1, '*');
+        if (r && *(r-1) != '/' && *(r+1) != '/')
+	  break;
+      } while (r);
+      if (!r)	// already pointer?
+      { char *p = (char*)emalloc(strlen(s) + 2);
+        strcpy(p, s);
+        strcat(p, "*");
+        s = p;
+      }
+      ptrtypemap[t] = s;
+    }
+  }
+  else
+    s = usetypemap[t];
+  if (!s)
+  { s = t;
+    fprintf(stream, "// Warning: internal error, undefined: %s %s\n", qname, t);
+  }
+  return s;
+}
+
+const char *Types::deftname(enum Type type, const char *pointer, bool is_pointer, const char *prefix, const char *URI, const char *qname)
+{ char buf[1024];
+  const char *q = NULL, *t = fname(prefix, URI, qname, NULL, LOOKUP);
+  char *s;
+  if (deftypemap[t])
+    return NULL;
+  switch (type)
+  { case ENUM:
+      q = "enum";
+      if (yflag)
+        knames.insert(t);
+      break;
+    case STRUCT:
+      q = "struct";
+      if (yflag)
+        knames.insert(t);
+      break;
+    case CLASS:
+    case TYPEDEF:
+      knames.insert(t);
+    default:
+      break;
+  }
+  if (q)
+  { strcpy(buf, q);
+    strcat(buf, " ");
+  }
+  else
+    buf[0] = '\0';
+  strcat(buf, t);
+  if (pointer)
+    strcat(buf, pointer);
+  s = (char*)emalloc(strlen(buf) + 1);
+  strcpy(s, buf);
+  usetypemap[t] = s;
+  if (pointer || is_pointer)
+    ptrtypemap[t] = s;
+  return t;
+}
+
+// get enumeration value. URI/type refers to the enum simpleType.
+const char *Types::ename(const char *type, const char *value)
+{ const char *s = enames[Pair(type,value)];
+  if (!s)
+  { s = fname(NULL, NULL, value, &rnames, NOLOOKUP);
+    if (!eflag && *type)
+    { // Add prefix to enum
+      char *buf = (char*)emalloc(strlen(type) + strlen(s) + 3);
+      if (s[0] == '_' && s[1] != 'x')		// _xXXXX is OK here
+        sprintf(buf, "%s_%s", type, s);
+      else
+        sprintf(buf, "%s__%s", type, s);
+      s = buf;
+    }
+    else
+      rnames.insert(s);
+    enames[Pair(type,value)] = s;
+  }
+  return s;
+}
+
+// get operation name
+const char *Types::oname(const char *prefix, const char *URI, const char *qname)
+{ const char *s = fname(prefix, URI, qname, NULL, LOOKUP);
+  if (s && usetypemap[s])
+  { // Avoid name clash with structs/classes of the same name
+    onames.insert(s);
+  }
+  s = fname(prefix, URI, qname, &onames, NOLOOKUP);
+  onames.insert(s);
+  return s;
+}
+
+// generate struct name
+const char *Types::sname(const char *URI, const char *name)
+{ const char *s;
+  char *t;
+  if (!aflag && name)
+  { size_t len = 0;
+    for (VectorOfString::const_iterator i = scope.begin(); i != scope.end(); ++i)
+      len += strlen(*i) + 1;
+    t = (char*)emalloc(len + strlen(name) + 1);
+    *t = '\0';
+    for (VectorOfString::const_iterator j = scope.begin(); j != scope.end(); ++j)
+    { strcat(t, *j);
+      strcat(t, "-");
+    }
+    strcat(t, name);
+    s = fname("_", URI, t, &rnames, NOLOOKUP);
+    rnames.insert(s);
+  }
+  else if (URI)
+  { s = nsprefix(NULL, URI);
+    t = (char*)emalloc(strlen(s) + 16);
+    sprintf(t, "_%s__struct_%d", s, snum++);
+    s = t;
+  }
+  else
+  { t = (char*)emalloc(16);
+    sprintf(t, "struct_%d", snum++);
+    s = t;
+  }
+  return s;
+}
+
+// generate union name
+const char *Types::uname(const char *URI)
+{ const char *s;
+  char *t;
+  if (!aflag)
+  { size_t len = 0;
+    for (VectorOfString::const_iterator i = scope.begin(); i != scope.end(); ++i)
+      len += strlen(*i) + 1;
+    t = (char*)emalloc(len + 6);
+    strcpy(t, "union");
+    for (VectorOfString::const_iterator j = scope.begin(); j != scope.end(); ++j)
+    { strcat(t, "-");
+      strcat(t, *j);
+    }
+    s = fname("_", URI, t, &rnames, NOLOOKUP);
+    rnames.insert(s);
+  }
+  else if (URI)
+  { s = nsprefix(NULL, URI);
+    t = (char*)emalloc(strlen(s) + 16);
+    sprintf(t, "_%s__union_%d", s, unum++);
+    s = t;
+  }
+  else
+  { t = (char*)emalloc(16);
+    sprintf(t, "_union_%d", unum++);
+    s = t;
+  }
+  return s;
+}
+
+// generate enum name
+const char *Types::gname(const char *URI, const char *name)
+{ const char *s;
+  char *t;
+  if (!aflag && name)
+  { size_t len = 0;
+    for (VectorOfString::const_iterator i = scope.begin(); i != scope.end(); ++i)
+      len += strlen(*i) + 1;
+    t = (char*)emalloc(len + strlen(name) + 1);
+    *t = '\0';
+    for (VectorOfString::const_iterator j = scope.begin(); j != scope.end(); ++j)
+    { strcat(t, *j);
+      strcat(t, "-");
+    }
+    strcat(t, name);
+    s = fname("_", URI, t, &rnames, NOLOOKUP);
+    rnames.insert(s);
+  }
+  else if (URI)
+  { s = nsprefix(NULL, URI);
+    t = (char*)emalloc(strlen(s) + 16);
+    sprintf(t, "_%s__enum_%d", s, gnum++);
+    s = t;
+  }
+  else
+  { t = (char*)emalloc(16);
+    sprintf(t, "enum_%d", gnum++);
+    s = t;
+  }
+  return s;
+}
+
+// check if nillable or minOccurs=0 (and no default value is present)
+bool Types::is_nillable(const xs__element& element)
+{ return !element.default_ && (element.nillable || (element.minOccurs && !strcmp(element.minOccurs, "0")));
+}
+
+bool Types::is_basetype(const char *type)
+{ if (!strcmp(type, "xs:anyType")
+   || !strcmp(tname(NULL, NULL, type), "std::string"))
+    return false;
+  return !strncmp(type, "xs:", 3) || !strncmp(type, "SOAP-ENC:", 9);
+}
+
+void Types::define(const char *URI, const char *name, const xs__complexType& complexType)
+{ // generate prototype for structs/classes and store name
+  const char *prefix = NULL;
+  if (complexType.name)
+    name = complexType.name;
+  else
+    prefix = "_";
+  if (complexType.complexContent && complexType.complexContent->restriction && !strcmp(complexType.complexContent->restriction->base, "SOAP-ENC:Array"))
+  { if (strcmp(schema_prefix, "ns"))
+      prefix = "*";
+    else
+      prefix = "";
+  }
+  if (cflag)
+  { const char *t = deftname(STRUCT, "*", true, prefix, URI, name);
+    if (t)
+    { if (yflag)
+        fprintf(stream, "\n/// Typedef synonym for struct %s.\ntypedef struct %s %s;\n", t, t, t);
+    }
+    else if (name)
+    { t = deftypemap[cname(prefix, URI, name)];
+      if (t)
+      { fprintf(stream, "\n/// Imported complexType \"%s\":%s from typemap %s.\n", URI, name, mapfile?mapfile:"");
+        document(complexType.annotation);
+        if (*t)
+	  format(t);
+        else
+	  fprintf(stream, "// complexType definition intentionally left blank.\n");
+      }
+    }
+  }
+  else 
+  { const char *t = deftname(CLASS, "*", true, prefix, URI, name);
+    if (t)
+      fprintf(stream, "\n//  Forward declaration of class %s.\nclass %s;\n", t, t);
+    else if (name)
+    { t = deftypemap[cname(prefix, URI, name)];
+      if (t)
+      { fprintf(stream, "\n/// Imported complexType \"%s\":%s from typemap %s.\n", URI, name, mapfile?mapfile:"");
+        document(complexType.annotation);
+        if (*t)
+	  format(t);
+        else
+	  fprintf(stream, "// complexType definition intentionally left blank.\n");
+      }
+    }
+  }
+}
+
+void Types::gen(const char *URI, const char *name, const xs__simpleType& simpleType, bool anonymous)
+{ const char *t = NULL;
+  const char *prefix = NULL;
+  if (simpleType.name)
+    name = simpleType.name;
+  else
+    prefix = "_";
+  if (!anonymous)
+  { t = deftypemap[cname(NULL, URI, name)];
+    if (t)
+    { fprintf(stream, "\n/// Imported simpleType \"%s\":%s from typemap %s.\n", URI, name, mapfile?mapfile:"");
+      document(simpleType.annotation);
+      if (*t)
+	format(t);
+      else
+	fprintf(stream, "// simpleType definition intentionally left blank.\n");
+      return;
+    }
+  }
+  if (simpleType.restriction && simpleType.restriction->base)
+  { if (!anonymous)
+      fprintf(stream, "\n/// \"%s\":%s is a simpleType restriction of %s.\n", URI?URI:"", name, simpleType.restriction->base);
+    document(simpleType.annotation);
+    document(simpleType.restriction->annotation);
+    if (!simpleType.restriction->enumeration.empty())
+    { bool is_numeric = true; // check if all enumeration values are numeric
+      bool is_qname = !strcmp(simpleType.restriction->base, "xs:QName");
+      if (!anonymous)
+      { t = deftname(ENUM, NULL, false, prefix, URI, name);
+        if (t && !eflag)
+          fprintf(stream, "/// Note: enum values are prefixed with '%s' to avoid name clashes, please use wsdl2h option -e to omit this prefix\n", t);
+      }
+      else
+        t = gname(URI, name);
+      if (!anonymous)
+        fprintf(stream, "enum %s\n{\n", t);
+      else
+        fprintf(stream, "    enum %s\n    {\n", t);
+      for (vector<xs__enumeration>::const_iterator enumeration1 = simpleType.restriction->enumeration.begin(); enumeration1 != simpleType.restriction->enumeration.end(); ++enumeration1)
+      { const char *s;
+        if ((s = (*enumeration1).value))
+	  is_numeric &= is_integer(s);
+      }
+      SetOfString enumvals;
+      for (vector<xs__enumeration>::const_iterator enumeration2 = simpleType.restriction->enumeration.begin(); enumeration2 != simpleType.restriction->enumeration.end(); ++enumeration2)
+      { const char *s;
+        document((*enumeration2).annotation);
+        if ((s = (*enumeration2).value))
+	{ if (!enumvals.count(s))
+	  { enumvals.insert(s);
+	    if (is_numeric)
+              fprintf(stream, "\t%s = %s,\t///< %s value=\"%s\"\n", ename(t, s), s, simpleType.restriction->base, s);
+            else if (is_qname && (*enumeration2).value_)
+              fprintf(stream, "\t%s,\t///< %s value=\"%s\"\n", ename(t, (*enumeration2).value_), simpleType.restriction->base, (*enumeration2).value_);
+            else
+              fprintf(stream, "\t%s,\t///< %s value=\"%s\"\n", ename(t, s), simpleType.restriction->base, s);
+	  }
+	}
+        else
+          fprintf(stream, "//\tunrecognized: enumeration '%s' has no value\n", name?name:"");
+      }
+      if (!anonymous)
+      { fprintf(stream, "};\n");
+        if (yflag)
+	  fprintf(stream, "/// Typedef synonym for enum %s.\ntypedef enum %s %s;\n", t, t, t);
+        if (pflag)
+        { const char *s = aname(prefix, URI, name);
+	  knames.insert(s);
+          s = aname(prefix, URI, name);
+          fprintf(stream, "\n/// Class wrapper\n");
+          fprintf(stream, "class %s : public xsd__anyType\n{ public:\n", s);
+          fprintf(stream, elementformat, tname(prefix, URI, name), "__item;");
+	  modify(s);
+          fprintf(stream, "\n};\n");
+        }
+      }
+      else
+        fprintf(stream, "    }\n");
+    }
+    else
+    { if (simpleType.restriction->length && simpleType.restriction->length->value)
+        fprintf(stream, "/// Length of this string is exactly %s characters\n", simpleType.restriction->length->value);
+      else
+      { const char *a = NULL, *b = NULL;
+        if (simpleType.restriction->minLength)
+          a = simpleType.restriction->minLength->value;
+        if (simpleType.restriction->maxLength)
+          b = simpleType.restriction->maxLength->value;
+        if (a || b)
+          fprintf(stream, "/// Length of this string is within %s..%s characters\n", a?a:"0", b?b:"");
+      }
+      if (simpleType.restriction->precision && simpleType.restriction->precision->value)
+        fprintf(stream, "/// %sprecision is %s\n", simpleType.restriction->precision->fixed?"fixed ":"", simpleType.restriction->precision->value);
+      if (simpleType.restriction->scale && simpleType.restriction->scale->value)
+        fprintf(stream, "/// %sscale is %s\n", simpleType.restriction->scale->fixed?"fixed ":"", simpleType.restriction->scale->value);
+      if (simpleType.restriction->totalDigits && simpleType.restriction->totalDigits->value)
+        fprintf(stream, "/// %snumber of total digits is %s\n", simpleType.restriction->totalDigits->fixed?"fixed ":"", simpleType.restriction->totalDigits->value);
+      if (simpleType.restriction->fractionDigits && simpleType.restriction->fractionDigits->value)
+        fprintf(stream, "/// %snumber of fraction digits is %s\n", simpleType.restriction->fractionDigits->fixed?"fixed ":"", simpleType.restriction->fractionDigits->value);
+      for (vector<xs__pattern>::const_iterator pattern1 = simpleType.restriction->pattern.begin(); pattern1 != simpleType.restriction->pattern.end(); ++pattern1)
+        fprintf(stream, "/// Content pattern is \"%s\"\n", xstring((*pattern1).value));
+      const char *ai = NULL, *ae = NULL, *bi = NULL, *be = NULL;
+      if (simpleType.restriction->minInclusive)
+        ai = simpleType.restriction->minInclusive->value;
+      else if (simpleType.restriction->minExclusive)
+        ae = simpleType.restriction->minExclusive->value;
+      if (simpleType.restriction->maxInclusive)
+        bi = simpleType.restriction->maxInclusive->value;
+      else if (simpleType.restriction->maxExclusive)
+        be = simpleType.restriction->maxExclusive->value;
+      if (ai || ae || bi || be)
+      { fprintf(stream, "/// Value range is ");
+        if (ai)
+	  fprintf(stream, "[%s..", ai);
+        else if (ae)
+	  fprintf(stream, "(%s..", ae);
+        else
+	  fprintf(stream, "[-INF..");
+        if (bi)
+	  fprintf(stream, "%s]\n", bi);
+        else if (be)
+	  fprintf(stream, "%s)\n", be);
+        else
+	  fprintf(stream, "INF]\n");
+      }
+      if (!simpleType.restriction->attribute.empty())
+      { fprintf(stderr, "\nWarning: simpleType '%s' should not have attributes\n", name?name:"");
+      }
+      const char *s = tname(NULL, NULL, simpleType.restriction->base);
+      if (!anonymous)
+      { bool is_ptr = false;
+	is_ptr = (strchr(s, '*') != NULL) || (s == pname(true, NULL, NULL, simpleType.restriction->base));
+        t = deftname(TYPEDEF, NULL, is_ptr, prefix, URI, name);
+        if (t)
+	  fprintf(stream, "typedef %s %s", s, t);
+      }
+      else
+      { t = "";
+        fprintf(stream, elementformat, s, "");
+        fprintf(stream, "\n");
+      }
+      if (t)
+      { if (!anonymous && !simpleType.restriction->pattern.empty())
+        { fprintf(stream, " \"");
+          for (vector<xs__pattern>::const_iterator pattern2 = simpleType.restriction->pattern.begin(); pattern2 != simpleType.restriction->pattern.end(); ++pattern2)
+          { if (pattern2 != simpleType.restriction->pattern.begin())
+              fprintf(stream, "|");
+            fprintf(stream, "%s", xstring((*pattern2).value));
+          }
+          fprintf(stream, "\"");
+        }
+	// add range info only when type is numeric
+	bool is_numeric = false;
+	if (!strncmp(s, "unsigned ", 9))
+	  s += 9;
+	if (strstr("char short int LONG64 float double ", s))
+	  is_numeric = true;
+        if (!anonymous && simpleType.restriction->minLength && simpleType.restriction->minLength->value)
+          fprintf(stream, " %s", simpleType.restriction->minLength->value);
+        else if (is_numeric && !anonymous && simpleType.restriction->minInclusive && simpleType.restriction->minInclusive->value && is_integer(simpleType.restriction->minInclusive->value))
+          fprintf(stream, " %s", simpleType.restriction->minInclusive->value);
+        if (!anonymous && simpleType.restriction->maxLength && simpleType.restriction->maxLength->value)
+          fprintf(stream, ":%s", simpleType.restriction->maxLength->value);
+        else if (is_numeric && !anonymous && simpleType.restriction->maxInclusive && simpleType.restriction->maxInclusive->value && is_integer(simpleType.restriction->maxInclusive->value))
+          fprintf(stream, ":%s", simpleType.restriction->maxInclusive->value);
+        if (!anonymous)
+        { fprintf(stream, ";\n");
+          if (pflag)
+          { const char *s = aname(prefix, URI, name);
+	    knames.insert(s);
+            s = aname(prefix, URI, name);
+            fprintf(stream, "\n/// Class wrapper\n");
+            fprintf(stream, "class %s : public xsd__anyType\n{ public:\n", s);
+            fprintf(stream, elementformat, tname(prefix, URI, name), "__item;");
+	    modify(s);
+            fprintf(stream, "\n};\n");
+          }
+        }
+      }
+    }
+  }
+  else if (simpleType.list)
+  { if (simpleType.list->restriction && simpleType.list->restriction->base)
+    { if (!anonymous)
+        fprintf(stream, "\n/// \"%s\":%s is a simpleType list restriction of %s.\n", URI?URI:"", name, simpleType.list->restriction->base);
+      document(simpleType.annotation);
+      if (!anonymous)
+      { t = deftname(ENUM, NULL, false, prefix, URI, name);
+	if (t)
+	  fprintf(stream, "enum * %s\n{\n", t);
+      }
+      else
+      { t = "";
+	fprintf(stream, "enum *\n{\n");
+      }
+      if (t)
+      { for (vector<xs__enumeration>::const_iterator enumeration = simpleType.list->restriction->enumeration.begin(); enumeration != simpleType.list->restriction->enumeration.end(); ++enumeration)
+        { if ((*enumeration).value)
+          { if (!strcmp(simpleType.list->restriction->base, "xs:QName") && (*enumeration).value_)
+              fprintf(stream, "\t%s,\t///< %s value=\"%s\"\n", ename(t, (*enumeration).value_), simpleType.list->restriction->base, (*enumeration).value_);
+	    else
+              fprintf(stream, "\t%s,\t///< %s value=\"%s\"\n", ename(t, (*enumeration).value), simpleType.list->restriction->base, (*enumeration).value);
+	  }
+          else
+            fprintf(stream, "//\tunrecognized: bitmask enumeration '%s' has no value\n", t);
+        }
+        if (!anonymous)
+        { fprintf(stream, "};\n");
+          if (yflag)
+	    fprintf(stream, "/// Typedef synonym for enum %s.\ntypedef enum %s %s;\n", t, t, t);
+          if (pflag)
+          { const char *s = aname(prefix, URI, name);
+	    knames.insert(s);
+            s = aname(prefix, URI, name);
+            fprintf(stream, "\n/// Class wrapper\n");
+            fprintf(stream, "class %s : public xsd__anyType\n{ public:\n", s);
+            fprintf(stream, elementformat, tname(prefix, URI, name), "__item;");
+	    modify(s);
+            fprintf(stream, "\n};\n");
+          }
+        }
+        else
+          fprintf(stream, "}\n");
+      }
+    }
+    else if (simpleType.list->itemType)
+    { const xs__simpleType *p = simpleType.list->itemTypePtr();
+      if (p && p->restriction && p->restriction->base && !p->restriction->enumeration.empty() && p->restriction->enumeration.size() <= 64)
+      { if (!anonymous)
+          fprintf(stream, "\n/// \"%s\":%s is a simpleType list of %s.\n", URI?URI:"", name, simpleType.list->itemType);
+        document(simpleType.annotation);
+        if (!anonymous)
+        { t = deftname(ENUM, NULL, false, prefix, URI, name);
+	  if (t)
+	    fprintf(stream, "enum * %s\n{\n", t);
+        }
+        else
+        { t = "";
+	  fprintf(stream, "enum *\n{\n");
+        }
+        if (t)
+	{ for (vector<xs__enumeration>::const_iterator enumeration = p->restriction->enumeration.begin(); enumeration != p->restriction->enumeration.end(); ++enumeration)
+          { if ((*enumeration).value)
+              fprintf(stream, "\t%s,\t///< %s value=\"%s\"\n", ename(t, (*enumeration).value), p->restriction->base, (*enumeration).value);
+            else
+              fprintf(stream, "//\tunrecognized: bitmask enumeration '%s' has no value\n", t);
+          }
+          if (!anonymous)
+          { fprintf(stream, "};\n");
+            if (yflag)
+	      fprintf(stream, "/// Typedef synonym for enum %s.\ntypedef enum %s %s;\n", t, t, t);
+            if (pflag)
+            { const char *s = aname(prefix, URI, name);
+	      knames.insert(s);
+              s = aname(prefix, URI, name);
+              fprintf(stream, "\n/// Class wrapper.\n");
+              fprintf(stream, "class %s : public xsd__anyType\n{ public:\n", s);
+              fprintf(stream, elementformat, tname(prefix, URI, name), "__item;");
+	      modify(s);
+              fprintf(stream, "\n};\n");
+            }
+          }
+          else
+            fprintf(stream, "}\n");
+        }
+      }
+      else
+      { const char *s = tname(NULL, NULL, "xsd:string");
+        if (!anonymous)
+        { fprintf(stream, "\n/// \"%s\":%s is a simpleType containing a whitespace separated list of %s.\n", URI?URI:"", name, simpleType.list->itemType);
+          t = deftname(TYPEDEF, NULL, strchr(s, '*') != NULL, prefix, URI, name);
+	}
+        document(simpleType.annotation);
+        if (t)
+          fprintf(stream, "typedef %s %s;\n", s, t);
+        else
+        { fprintf(stream, elementformat, s, "");
+          fprintf(stream, "\n");
+        }
+      }
+    }
+    else
+    { if (!anonymous)
+        fprintf(stream, "\n/// \"%s\":%s is a simpleType list.\n", URI?URI:"", name);
+      document(simpleType.annotation);
+      if (!anonymous)
+      { t = deftname(ENUM, NULL, false, prefix, URI, name);
+        if (t && !eflag)
+          fprintf(stream, "/// Note: enum values are prefixed with '%s' to avoid name clashes, please use wsdl2h option -e to omit this prefix\n", t);
+      }
+      else
+        t = "";
+      if (t)
+      { fprintf(stream, "enum * %s\n{\n", t);
+        for (vector<xs__simpleType>::const_iterator simple = simpleType.list->simpleType.begin(); simple != simpleType.list->simpleType.end(); ++simple)
+        { if ((*simple).restriction && (*simple).restriction->base)
+          { for (vector<xs__enumeration>::const_iterator enumeration = (*simple).restriction->enumeration.begin(); enumeration != (*simple).restriction->enumeration.end(); ++enumeration)
+            { if ((*enumeration).value)
+                fprintf(stream, "\t%s,\t///< %s value=\"%s\"\n", ename(t, (*enumeration).value), (*simple).restriction->base, (*enumeration).value);
+              else
+                fprintf(stream, "//\tunrecognized: bitmask enumeration '%s' has no value\n", t);
+            }
+          }
+        }
+        if (!anonymous)
+        { fprintf(stream, "};\n");
+          if (yflag)
+	    fprintf(stream, "/// Typedef synonym for enum %s.\ntypedef enum %s %s;\n", t, t, t);
+          if (pflag)
+          { const char *s = aname(prefix, URI, name);
+	    knames.insert(s);
+            s = aname(prefix, URI, name);
+            fprintf(stream, "\n/// Class wrapper.\n");
+            fprintf(stream, "class %s : public xsd__anyType\n{ public:\n", s);
+            fprintf(stream, elementformat, tname(prefix, URI, name), "__item;");
+	    modify(s);
+            fprintf(stream, "\n};\n");
+          }
+        }
+        else
+          fprintf(stream, "}\n");
+      }
+    }
+  }
+  else if (simpleType.union_)
+  { if (simpleType.union_->memberTypes)
+    { const char *s = tname(NULL, NULL, "xsd:string");
+      if (!anonymous)
+        t = deftname(TYPEDEF, NULL, strchr(s, '*') != NULL, prefix, URI, name);
+      fprintf(stream, "\n/// union of values \"%s\"\n", simpleType.union_->memberTypes);
+      if (t)
+        fprintf(stream, "typedef %s %s;\n", s, t);
+      else
+      { fprintf(stream, elementformat, s, "");
+        fprintf(stream, "\n");
+      }
+    }
+    else if (!simpleType.union_->simpleType.empty())
+    { const char *s = tname(NULL, NULL, "xsd:string");
+      fprintf(stream, "\n");
+      if (!anonymous)
+        t = deftname(TYPEDEF, NULL, strchr(s, '*') != NULL, prefix, URI, name);
+      for (vector<xs__simpleType>::const_iterator simpleType1 = simpleType.union_->simpleType.begin(); simpleType1 != simpleType.union_->simpleType.end(); ++simpleType1)
+        if ((*simpleType1).restriction)
+	{ fprintf(stream, "/// union of values from \"%s\"\n", (*simpleType1).restriction->base);
+          // TODO: are there any other types we should report here?
+        }
+      if (t)
+        fprintf(stream, "typedef %s %s;\n", s, t);
+      else
+      { fprintf(stream, elementformat, s, "");
+        fprintf(stream, "\n");
+      }
+    }
+    else
+      fprintf(stream, "//\tunrecognized\n");
+  }
+  else
+    fprintf(stream, "//\tunrecognized simpleType\n");
+}
+
+void Types::gen(const char *URI, const char *name, const xs__complexType& complexType, bool anonymous)
+{ const char *t = NULL;
+  bool soapflag = false;
+  if (complexType.name)
+    name = complexType.name;
+  if (anonymous && name)
+    t = sname(URI, name);
+  else if (name)
+  { t = cname(NULL, URI, name);
+    if (deftypemap[t])
+      return;
+  }
+  if (name)
+    scope.push_back(name);
+  if (complexType.simpleContent)
+  { if (!anonymous)
+      fprintf(stream, "\n/// \"%s\":%s is a%s complexType with simpleContent.\n", URI?URI:"", name, complexType.abstract?"n abstract":"");
+    document(complexType.annotation);
+    if (complexType.simpleContent->restriction)
+    { if (anonymous)
+        fprintf(stream, "    struct %s\n    {\n", t);
+      else if (cflag)
+        fprintf(stream, "struct %s\n{\n", t);
+      else if (pflag)
+        fprintf(stream, "class %s : public xsd__anyType\n{ public:\n", t);
+      else
+        fprintf(stream, "class %s\n{ public:\n", t);
+      const char *base = "xs:string";
+      const xs__complexType *complextype = &complexType; 
+      do
+      { if (!complextype->simpleContent)
+          break;
+        if (complextype->simpleContent->restriction)
+        { if (complextype->simpleContent->restriction->complexTypePtr())
+	    complextype = complextype->simpleContent->restriction->complexTypePtr();
+	  else
+          { base = complextype->simpleContent->restriction->base;   
+	    break;
+	  }
+	}
+        else if (complextype->simpleContent->extension)
+        { if (complextype->simpleContent->extension->complexTypePtr())
+	    complextype = complextype->simpleContent->extension->complexTypePtr();
+          else
+          { base = complextype->simpleContent->extension->base;   
+	    break;
+          }
+	}
+	else
+	  break;
+      }
+      while (complextype);
+      fprintf(stream, "/// __item wraps '%s' simpleContent.\n", base);
+      fprintf(stream, elementformat, tname(NULL, NULL, base), "__item");
+      fprintf(stream, ";\n");
+      gen(URI, complexType.simpleContent->restriction->attribute);
+      if (complexType.simpleContent->restriction->anyAttribute)
+        gen(URI, *complexType.simpleContent->restriction->anyAttribute);
+    }
+    else if (complexType.simpleContent->extension)
+    { if (cflag || fflag || anonymous)
+      { if (anonymous)
+          fprintf(stream, "    struct %s\n    {\n", t);
+        else if (cflag)
+          fprintf(stream, "struct %s\n{\n", t);
+        else if (pflag)
+          fprintf(stream, "class %s : public xsd__anyType\n{ public:\n", t);
+        else
+          fprintf(stream, "class %s\n{ public:\n", t);
+        const char *base = "xs:string";
+        const xs__complexType *p = &complexType; 
+        do
+        { if (!p->simpleContent)
+            break;
+          if (p->simpleContent->restriction)
+          { if (p->simpleContent->restriction->complexTypePtr())
+	      p = p->simpleContent->restriction->complexTypePtr();
+	    else
+            { base = p->simpleContent->restriction->base;   
+	      break;
+	    }
+	  }
+          else if (p->simpleContent->extension)
+          { if (p->simpleContent->extension->complexTypePtr())
+	      p = p->simpleContent->extension->complexTypePtr();
+            else
+            { base = p->simpleContent->extension->base;   
+	      break;
+            }
+	  }
+	  else
+	    break;
+        }
+        while (p);
+        fprintf(stream, "/// __item wraps '%s' simpleContent.\n", base);
+        fprintf(stream, elementformat, tname(NULL, NULL, base), "__item");
+        fprintf(stream, ";\n");
+        p = &complexType; 
+        bool flag = true;
+        do
+        { if (!p->simpleContent)
+            break;
+          if (p->simpleContent->restriction)
+          { gen(URI, p->simpleContent->restriction->attribute);
+            if (p->simpleContent->restriction->anyAttribute && flag)
+              gen(URI, *p->simpleContent->restriction->anyAttribute);
+	    break;
+	  }
+          else if (p->simpleContent->extension)
+          { gen(URI, p->simpleContent->extension->attribute);
+            gen(URI, p->simpleContent->extension->attributeGroup);
+            if (p->simpleContent->extension->anyAttribute && flag)
+            { gen(URI, *p->simpleContent->extension->anyAttribute);
+	      flag = false;
+	    }
+            if (p->simpleContent->extension->complexTypePtr())
+	      p = p->simpleContent->extension->complexTypePtr();
+            else
+	      break;
+	  }
+	  else
+	    break;
+        }
+        while (p);
+      }
+      else
+      { if (
+        /* TODO: should add check for base type == class
+	  complexType.simpleContent->extension->simpleTypePtr()
+	  ||
+	*/
+	  complexType.simpleContent->extension->complexTypePtr())
+	{ fprintf(stream, "class %s : public %s\n{ public:\n", t, cname(NULL, NULL, complexType.simpleContent->extension->base));
+	  soapflag = true;
+	}
+        else
+	{ if (pflag)
+            fprintf(stream, "class %s : public xsd__anyType\n{ public:\n", t);
+          else
+            fprintf(stream, "class %s\n{ public:\n", t);
+          fprintf(stream, "/// __item wraps '%s' simpleContent.\n", complexType.simpleContent->extension->base);
+          fprintf(stream, elementformat, tname(NULL, NULL, complexType.simpleContent->extension->base), "__item");
+          fprintf(stream, ";\n");
+	}
+        gen(URI, complexType.simpleContent->extension->attribute);
+        gen(URI, complexType.simpleContent->extension->attributeGroup);
+        if (complexType.simpleContent->extension->anyAttribute)
+          gen(URI, *complexType.simpleContent->extension->anyAttribute);
+      }
+    }
+    else
+      fprintf(stream, "//\tunrecognized\n");
+  }
+  else if (complexType.complexContent)
+  { if (complexType.complexContent->restriction)
+    { if (!anonymous)
+        fprintf(stream, "\n/// \"%s\":%s is a%s complexType with complexContent restriction of %s.\n", URI?URI:"", name, complexType.abstract?"n abstract":"", complexType.complexContent->restriction->base);
+      document(complexType.annotation);
+      if (!strcmp(complexType.complexContent->restriction->base, "SOAP-ENC:Array"))
+      { char *item = NULL, *type = NULL;
+	if (!complexType.complexContent->restriction->attribute.empty())
+	{ xs__attribute& attribute = complexType.complexContent->restriction->attribute.front();
+	  if (attribute.wsdl__arrayType)
+	  { type = (char*)malloc(strlen(attribute.wsdl__arrayType)+1);
+	    strcpy(type, attribute.wsdl__arrayType);
+	  }
+	}
+        if (complexType.complexContent->restriction->sequence && !complexType.complexContent->restriction->sequence->element.empty())
+	{ xs__element& element = complexType.complexContent->restriction->sequence->element.front();
+	  if (!type)
+	  { type = (char*)malloc(strlen(element.type)+1);
+	    strcpy(type, element.type);
+	  }
+	  item = element.name;
+	}
+	gen_soap_array(name, t, item, type);
+	if (type)
+	  free(type);
+      }
+      else
+      { if (anonymous)
+          fprintf(stream, "    struct %s\n    {\n", t);
+        else if (cflag)
+          fprintf(stream, "struct %s\n{\n", t);
+        else if (pflag)
+          fprintf(stream, "class %s : public xsd__anyType\n{ public:\n", t);
+        else
+          fprintf(stream, "class %s\n{ public:\n", t);
+	if (!complexType.mixed)
+        { if (complexType.complexContent->restriction->group)
+            gen(URI, *complexType.complexContent->restriction->group);
+          if (complexType.complexContent->restriction->all)
+            gen(URI, *complexType.complexContent->restriction->all);
+          if (complexType.complexContent->restriction->sequence)
+            gen(URI, *complexType.complexContent->restriction->sequence);
+          if (complexType.complexContent->restriction->choice)
+            gen(URI, name, *complexType.complexContent->restriction->choice);
+        }
+	else
+        { fprintf(stream, "/// TODO: mixed complexType/complexContent is user-definable.\n//       Consult the protocol documentation to change or insert declarations.\n");
+          fprintf(stream, elementformat, "_XML", "__any");
+          fprintf(stream, ";\t///< Catch any element content in XML string\n");
+        }
+        gen(URI, complexType.complexContent->restriction->attribute);
+      }
+    }
+    else if (complexType.complexContent->extension)
+    { if (!anonymous)
+        fprintf(stream, "\n/// \"%s\":%s is a%s complexType with complexContent extension of %s.\n", URI?URI:"", name, complexType.abstract?"n abstract":"", complexType.complexContent->extension->base);
+      document(complexType.annotation);
+      if (anonymous)
+        fprintf(stream, "    struct %s\n    {\n", t);
+      else if (cflag)
+        fprintf(stream, "struct %s\n{\n", t);
+      else if (fflag)
+        fprintf(stream, "class %s\n{ public:\n", t);
+      else // TODO: what to do if base class is in another namespace and elements must be qualified in XML payload?
+      { fprintf(stream, "class %s : public %s\n{ public:\n", t, cname(NULL, NULL, complexType.complexContent->extension->base));
+        soapflag = true;
+      }
+      xs__complexType *p = complexType.complexContent->extension->complexTypePtr();
+      while (p)
+      { const char *pURI = p->schemaPtr()->targetNamespace;
+        const char *b = cname(NULL, pURI, p->name);
+        static int nesting = 0;
+	if (cflag || fflag || anonymous)
+          fprintf(stream, "/// INHERITED FROM %s:\n", b);
+        else if (nesting == 0)
+          fprintf(stream, "/*  INHERITED FROM %s:\n", b);
+        else
+          fprintf(stream, "    INHERITED FROM %s:\n", b);
+	nesting++;
+        if (p->complexContent && p->complexContent->extension)
+        { if (p->complexContent->extension->group)
+            gen(pURI, *p->complexContent->extension->group); // schema URI?
+          if (p->complexContent->extension->all)
+            gen(pURI, *p->complexContent->extension->all);
+          if (p->complexContent->extension->sequence)
+            gen(pURI, *p->complexContent->extension->sequence);
+          if (p->complexContent->extension->choice)
+            gen(pURI, p->name, *p->complexContent->extension->choice);
+          gen(pURI, p->complexContent->extension->attribute);
+          gen(pURI, p->complexContent->extension->attributeGroup);
+          if (p->complexContent->extension->anyAttribute)
+            gen(pURI, *p->complexContent->extension->anyAttribute);
+	  p = p->complexContent->extension->complexTypePtr();
+          modify(b);
+	  nesting--;
+	  if (cflag || fflag || anonymous)
+	    fprintf(stream, "//  END OF INHERITED\n");
+	  else if (nesting == 0)
+	    fprintf(stream, "    END OF INHERITED */\n");
+	  else
+	    fprintf(stream, "    END OF INHERITED\n");
+        }
+	else
+        { if (p->all)
+            gen(pURI, p->all->element); // what about schema URI?
+          else if (p->choice)
+	    gen(pURI, p->name, *p->choice);
+          else if (p->all)
+            gen(pURI, *p->all);
+          else if (p->sequence)
+            gen(pURI, *p->sequence);
+          else if (p->any)
+            gen(pURI, *p->any);
+          gen(pURI, p->attribute);
+          gen(pURI, p->attributeGroup);
+	  if (p->anyAttribute)
+            gen(pURI, *p->anyAttribute);
+          modify(b);
+	  nesting--;
+	  if (cflag || fflag || anonymous)
+	    fprintf(stream, "//  END OF INHERITED\n");
+	  else if (nesting == 0)
+	    fprintf(stream, "    END OF INHERITED */\n");
+	  else
+	    fprintf(stream, "    END OF INHERITED\n");
+	  break;
+        }
+      }
+      if (complexType.complexContent->extension->group)
+        gen(URI, *complexType.complexContent->extension->group);
+      if (complexType.complexContent->extension->all)
+        gen(URI, *complexType.complexContent->extension->all);
+      if (complexType.complexContent->extension->sequence)
+        gen(URI, *complexType.complexContent->extension->sequence);
+      if (complexType.complexContent->extension->choice)
+        gen(URI, name, *complexType.complexContent->extension->choice);
+      gen(URI, complexType.complexContent->extension->attribute);
+      gen(URI, complexType.complexContent->extension->attributeGroup);
+      if (complexType.complexContent->extension->anyAttribute)
+        gen(URI, *complexType.complexContent->extension->anyAttribute);
+    }
+    else
+      fprintf(stream, "//\tunrecognized\n");
+  }
+  else
+  { if (!anonymous)
+      fprintf(stream, "\n/// \"%s\":%s is a%s complexType.\n", URI?URI:"", name, complexType.abstract?"n abstract":"");
+    document(complexType.annotation);
+    if (anonymous)
+      fprintf(stream, "    struct %s\n    {\n", t);
+    else if (cflag)
+      fprintf(stream, "struct %s\n{\n", t);
+    else if (pflag)
+      fprintf(stream, "class %s : public xsd__anyType\n{ public:\n", t);
+    else
+      fprintf(stream, "class %s\n{ public:\n", t);
+    if (complexType.all)
+      gen(URI, *complexType.all);
+    else if (complexType.choice)
+      gen(URI, name, *complexType.choice);
+    else if (complexType.sequence)
+      gen(URI, *complexType.sequence);
+    else if (complexType.any)
+      gen(URI, *complexType.any);
+  }
+  gen(URI, complexType.attribute);
+  gen(URI, complexType.attributeGroup);
+  if (complexType.anyAttribute)
+    gen(URI, *complexType.anyAttribute);
+  if (!anonymous)
+  { if (!cflag && !pflag && !soapflag)
+    { if (!complexType.complexContent || !complexType.complexContent->extension || !complexType.complexContent->extension->complexTypePtr())
+      { fprintf(stream, "/// A handle to the soap struct that manages this instance (automatically set)\n");
+        fprintf(stream, pointerformat, "struct soap", "soap");
+        fprintf(stream, ";\n");
+      }
+    }
+    modify(t);
+    fprintf(stream, "};\n");
+  }
+  scope.pop_back();
+}
+
+void Types::gen(const char *URI, const vector<xs__attribute>& attributes)
+{ for (vector<xs__attribute>::const_iterator attribute = attributes.begin(); attribute != attributes.end(); ++attribute)
+    gen(URI, *attribute);
+}
+
+void Types::gen(const char *URI, const xs__attribute& attribute)
+{ const char *name, *type, *nameURI = NULL, *typeURI = NULL;
+  name = attribute.name;
+  type = attribute.type;
+  bool is_optional = attribute.use != required && attribute.use != default_;
+  document(attribute.annotation);
+  if (!URI || strcmp(URI, attribute.schemaPtr()->targetNamespace))
+    nameURI = attribute.schemaPtr()->targetNamespace;
+  if (attribute.attributePtr()) // attribute ref
+  { name = attribute.attributePtr()->name;
+    if (attribute.schemaPtr() != attribute.attributePtr()->schemaPtr())
+      nameURI = attribute.attributePtr()->schemaPtr()->targetNamespace;
+    if (attribute.attributePtr()->type)
+    { type = attribute.attributePtr()->type;
+    }
+    else
+    { type = name;
+      typeURI = attribute.attributePtr()->schemaPtr()->targetNamespace;
+    }
+    fprintf(stream, "/// Attribute reference %s.\n", attribute.ref);
+    document(attribute.attributePtr()->annotation);
+    fprintf(stream, attributeformat, pname(is_optional, NULL, typeURI, type), aname(NULL, nameURI, name)); // make sure no name - type clash
+  }
+  else if (name && type)
+  { fprintf(stream, "/// Attribute %s of type %s.\n", name, type);
+    fprintf(stream, attributeformat, pname(is_optional, NULL, NULL, type), aname(NULL, nameURI, name)); // make sure no name - type clash
+  }
+  else if (name && attribute.simpleTypePtr())
+  { fprintf(stream, "@");
+    gen(URI, name, *attribute.simpleTypePtr(), true);
+    fprintf(stream, elementformat, "", aname(NULL, nameURI, name));
+  }
+  else if (attribute.ref)
+  { fprintf(stream, "/// Attribute reference %s.\n", attribute.ref);
+    fprintf(stream, attributeformat, pname(is_optional, NULL, NULL, attribute.ref), aname(NULL, NULL, attribute.ref));
+  }
+  else
+  { fprintf(stream, "/// Warning: attribute '%s' has no type or ref. Assuming string content.\n", name?name:"");
+    fprintf(stream, attributeformat, tname(NULL, NULL, "xs:string"), aname(NULL, nameURI, name));
+  }
+  switch (attribute.use)
+  { case optional:
+    case default_:
+    case fixed_:	// is this correct???
+      fprintf(stream, " 0");
+      break;
+    case prohibited:
+      fprintf(stream, " 0:0");
+      break;
+    case required:
+      fprintf(stream, " 1");
+      break;
+  }
+  if (attribute.value)
+  { if (type)
+    { const char *t = tname(NULL, NULL, type);
+      if (!strncmp(t, "unsigned ", 9))
+        t += 9;
+      if (!strcmp(t, "bool")
+       || !strcmp(t, "char")
+       || !strcmp(t, "double")
+       || !strcmp(t, "float")
+       || !strcmp(t, "int")
+       || !strcmp(t, "long")
+       || !strcmp(t, "LONG64")
+       || !strcmp(t, "short")
+       || !strcmp(t, "ULONG64"))
+        fprintf(stream, " = %s", attribute.value);
+      else if (!strcmp(t, "char*")
+            || !strcmp(t, "char *"))	// not elegant
+        fprintf(stream, " = \"%s\"", cstring(attribute.value));
+      else if (!strncmp(t, "enum ", 5))
+        fprintf(stream, " = %s", ename(t + 5, attribute.value));
+      else if (!strcmp(t, "std::string")
+            || !strcmp(t, "std::string*")
+	    || !strcmp(t, "std::string *"))	// not elegant
+        fprintf(stream, " = \"%s\"", cstring(attribute.value));
+      else if (!strcmp(t, "xsd__QName") && attribute.value_)	// QName is in value_
+        fprintf(stream, " = \"%s\"", cstring(attribute.value_));
+    }
+    fprintf(stream, ";\t///< Default value=\"%s\".\n", attribute.value);
+  }
+  else if (attribute.use == required)
+    fprintf(stream, ";\t///< Required attribute.\n");
+  else if (attribute.use == prohibited)
+    fprintf(stream, ";\t///< Prohibited attribute.\n");
+  else
+    fprintf(stream, ";\t///< Optional attribute.\n");
+}
+
+void Types::gen(const char *URI, const vector<xs__attributeGroup>& attributeGroups)
+{ for (vector<xs__attributeGroup>::const_iterator attributeGroup = attributeGroups.begin(); attributeGroup != attributeGroups.end(); ++attributeGroup)
+  { if ((*attributeGroup).attributeGroupPtr()) // attributeGroup ref
+    { if ((*attributeGroup).schemaPtr() == (*attributeGroup).attributeGroupPtr()->schemaPtr())
+      { gen(URI, (*attributeGroup).attributeGroupPtr()->attribute);
+        gen(URI, (*attributeGroup).attributeGroupPtr()->attributeGroup);
+      }
+      else
+      { gen((*attributeGroup).attributeGroupPtr()->schemaPtr()->targetNamespace, (*attributeGroup).attributeGroupPtr()->attribute);
+        gen((*attributeGroup).attributeGroupPtr()->schemaPtr()->targetNamespace, (*attributeGroup).attributeGroupPtr()->attributeGroup);
+      }
+      if ((*attributeGroup).attributeGroupPtr()->anyAttribute)
+        gen(URI, *(*attributeGroup).attributeGroupPtr()->anyAttribute);
+    }
+    else
+    { gen(URI, (*attributeGroup).attribute);
+      gen(URI, (*attributeGroup).attributeGroup);
+      if ((*attributeGroup).anyAttribute)
+        gen(URI, *(*attributeGroup).anyAttribute);
+    }
+  }
+}
+
+void Types::gen(const char *URI, const vector<xs__all>& alls)
+{ for (vector<xs__all>::const_iterator all = alls.begin(); all != alls.end(); ++all)
+    gen(URI, *all);
+}
+
+void Types::gen(const char *URI, const xs__all& all)
+{ bool tmp_union1 = with_union;
+  bool tmp_union2 = fake_union;
+  with_union = false;
+  fake_union = false;
+  gen(URI, all.element);
+  with_union = tmp_union1;
+  fake_union = tmp_union2;
+}
+
+void Types::gen(const char *URI, const vector<xs__sequence>& sequences)
+{ for (vector<xs__sequence>::const_iterator sequence = sequences.begin(); sequence != sequences.end(); ++sequence)
+    gen(URI, *sequence);
+}
+
+void Types::gen(const char *URI, const vector<xs__sequence*>& sequences)
+{ for (vector<xs__sequence*>::const_iterator sequence = sequences.begin(); sequence != sequences.end(); ++sequence)
+    gen(URI, **sequence);
+}
+
+void Types::gen(const char *URI, const xs__sequence& sequence)
+{ bool tmp_union1 = with_union;
+  bool tmp_union2 = fake_union;
+  with_union = false;
+  fake_union = false;
+  document(sequence.annotation);
+  gen(URI, sequence.element);
+  gen(URI, sequence.group);
+  gen(URI, sequence.choice);
+  gen(URI, sequence.sequence);
+  gen(URI, sequence.any);
+  with_union = tmp_union1;
+  fake_union = tmp_union2;
+}
+
+void Types::gen(const char *URI, const vector<xs__element>& elements)
+{ for (vector<xs__element>::const_iterator element = elements.begin(); element != elements.end(); ++element)
+    gen(URI, *element);
+}
+
+void Types::gen(const char *URI, const xs__element& element)
+{ const char *name, *type, *nameURI = NULL, *typeURI = NULL;
+  name = element.name;
+  type = element.type;
+  document(element.annotation);
+  if (!URI || strcmp(URI, element.schemaPtr()->targetNamespace))
+    nameURI = element.schemaPtr()->targetNamespace;
+  if (element.elementPtr()) // element ref
+  { name = element.elementPtr()->name;
+    if (element.schemaPtr() != element.elementPtr()->schemaPtr())
+      nameURI = element.elementPtr()->schemaPtr()->targetNamespace;
+    if (element.elementPtr()->type)
+    { type = element.elementPtr()->type;
+    }
+    else if (element.elementPtr()->schemaPtr())
+    { type = name;
+      typeURI = element.elementPtr()->schemaPtr()->targetNamespace;
+    }
+    else
+      type = name;
+    document(element.elementPtr()->annotation);
+    if (element.elementPtr()->abstract)
+    { fprintf(stream, "/// Reference %s to abstract element.\n", element.ref);
+      gen_substitutions(URI, element);
+    }
+    else if (element.maxOccurs && strcmp(element.maxOccurs, "1")) // maxOccurs != "1"
+    { const char *s = tnameptr(cflag && !zflag, NULL, typeURI, type);
+      if (cflag || sflag)
+      { fprintf(stream, "/// Size of the dynamic array of %s is %s..%s\n", s, element.minOccurs ? element.minOccurs : "1", element.maxOccurs);
+        fprintf(stream, sizeformat, "int", aname(NULL, NULL, name));
+        if (is_integer(element.maxOccurs))
+	  fprintf(stream, " %s:%s", element.minOccurs ? element.minOccurs : "1", element.maxOccurs);
+	fprintf(stream, ";\n");
+	if (cflag && !zflag)
+        { fprintf(stream, "/// Array of length %s..%s\n", element.minOccurs ? element.minOccurs : "1", element.maxOccurs);
+	  fprintf(stream, elementformat, s, aname(NULL, nameURI, name));
+	}
+	else
+        { fprintf(stream, "/// Pointer to array of length %s..%s\n", element.minOccurs ? element.minOccurs : "1", element.maxOccurs);
+	  fprintf(stream, pointerformat, s, aname(NULL, nameURI, name));
+	}
+      }
+      else
+      { fprintf(stream, "/// Vector of %s with length %s..%s\n", s, element.minOccurs ? element.minOccurs : "1", element.maxOccurs);
+	if (with_union)
+          fprintf(stream, pointervectorformat, s, aname(NULL, nameURI, name));
+	else
+          fprintf(stream, vectorformat, s, aname(NULL, nameURI, name));
+      }
+    }
+    else
+    { fprintf(stream, "/// Element reference %s.\n", element.ref);
+      document(element.elementPtr()->annotation);
+      fprintf(stream, elementformat, pname(fake_union || is_nillable(element), NULL, typeURI, type), aname(NULL, nameURI, name));
+    }
+  }
+  else if (name && type)
+  { if (element.abstract)
+    { fprintf(stream, "/// Abstract element %s of type %s.\n", name, type);
+      gen_substitutions(URI, element);
+    }
+    else if (element.maxOccurs && strcmp(element.maxOccurs, "1")) // maxOccurs != "1"
+    { const char *s = tnameptr(cflag && !zflag, NULL, NULL, type);
+      if (cflag || sflag)
+      { fprintf(stream, "/// Size of array of %s is %s..%s\n", s, element.minOccurs ? element.minOccurs : "1", element.maxOccurs);
+        fprintf(stream, sizeformat, "int", aname(NULL, NULL, name));
+        if (is_integer(element.maxOccurs))
+	  fprintf(stream, " %s:%s", element.minOccurs ? element.minOccurs : "1", element.maxOccurs);
+	fprintf(stream, ";\n");
+	if (cflag && !zflag)
+        { fprintf(stream, "/// Array of length %s..%s\n", element.minOccurs ? element.minOccurs : "1", element.maxOccurs);
+	  fprintf(stream, elementformat, s, aname(NULL, nameURI, name));
+	}
+	else
+        { fprintf(stream, "/// Pointer to array of length %s..%s\n", element.minOccurs ? element.minOccurs : "1", element.maxOccurs);
+	  fprintf(stream, pointerformat, s, aname(NULL, nameURI, name));
+        }
+      }
+      else
+      { fprintf(stream, "/// Vector of %s with length %s..%s\n", s, element.minOccurs ? element.minOccurs : "1", element.maxOccurs);
+	if (with_union)
+	  fprintf(stream, pointervectorformat, s, aname(NULL, nameURI, name));
+	else
+	  fprintf(stream, vectorformat, s, aname(NULL, nameURI, name));
+      }
+    }
+    else
+    { fprintf(stream, "/// Element %s of type %s.\n", name, type);
+      fprintf(stream, elementformat, pname(fake_union || is_nillable(element), NULL, NULL, type), aname(NULL, nameURI, name));
+    }
+  }
+  else if (name && element.simpleTypePtr())
+  { document(element.simpleTypePtr()->annotation);
+    if (element.maxOccurs && strcmp(element.maxOccurs, "1")) // maxOccurs != "1"
+    { fprintf(stream, "/// Size of %s array is %s..%s\n", name, element.minOccurs ? element.minOccurs : "1", element.maxOccurs);
+      fprintf(stream, sizeformat, "int", aname(NULL, NULL, name));
+      if (is_integer(element.maxOccurs))
+        fprintf(stream, " %s:%s", element.minOccurs ? element.minOccurs : "1", element.maxOccurs);
+      fprintf(stream, ";\n");
+    }
+    gen(URI, name, *element.simpleTypePtr(), true);
+    if (is_nillable(element)
+     || element.maxOccurs && strcmp(element.maxOccurs, "1")) // maxOccurs != "1"
+      fprintf(stream, pointerformat, "", aname(NULL, nameURI, name));
+    else
+      fprintf(stream, elementformat, "", aname(NULL, nameURI, name));
+  }
+  else if (name && element.complexTypePtr())
+  { if (element.maxOccurs && strcmp(element.maxOccurs, "1")) // maxOccurs != "1"
+    { fprintf(stream, "/// Size of %s array is %s..%s\n", name, element.minOccurs ? element.minOccurs : "1", element.maxOccurs);
+      fprintf(stream, sizeformat, "int", aname(NULL, NULL, name));
+      if (is_integer(element.maxOccurs))
+        fprintf(stream, " %s:%s", element.minOccurs ? element.minOccurs : "1", element.maxOccurs);
+      fprintf(stream, ";\n");
+    }
+    gen(URI, name, *element.complexTypePtr(), true);
+    if (is_nillable(element)
+     || element.maxOccurs && strcmp(element.maxOccurs, "1")) // maxOccurs != "1"
+      fprintf(stream, pointerformat, "}", aname(NULL, nameURI, name));
+    else
+      fprintf(stream, elementformat, "}", aname(NULL, nameURI, name));
+  }
+  else if (element.ref)
+  { fprintf(stream, "/// Element reference %s.\n", element.ref);
+    fprintf(stream, elementformat, tname(NULL, NULL, element.ref), aname(NULL, NULL, element.ref));
+  }
+  else if (name)
+  { fprintf(stream, "/// Warning: element '%s' has no type or ref. Assuming XML content.\n", name?name:"");
+    if (element.maxOccurs && strcmp(element.maxOccurs, "1")) // maxOccurs != "1"
+    { if (cflag || sflag)
+      { fprintf(stream, sizeformat, "int", aname(NULL, NULL, name));
+        if (is_integer(element.maxOccurs))
+	  fprintf(stream, " %s:%s", element.minOccurs ? element.minOccurs : "1", element.maxOccurs);
+	fprintf(stream, ";\n");
+        fprintf(stream, "/// Pointer to array of XML.\n");
+	fprintf(stream, pointerformat, "_XML", aname(NULL, nameURI, name));
+      }
+      else
+      { fprintf(stream, "/// Vector of XML with length %s..%s\n", element.minOccurs ? element.minOccurs : "1", element.maxOccurs);
+	if (with_union)
+	  fprintf(stream, pointervectorformat, "_XML", aname(NULL, nameURI, name));
+	else
+	  fprintf(stream, vectorformat, "_XML", aname(NULL, nameURI, name));
+      }
+    }
+    else
+      fprintf(stream, elementformat, "_XML", aname(NULL, nameURI, name));
+  }
+  else
+    fprintf(stream, "/// Warning: element has no type or ref.");
+  if (!element.abstract && !(element.elementPtr() && element.elementPtr()->abstract))
+  { if (!element.minOccurs && !element.nillable && !element.default_)
+      fprintf(stream, " 1");
+    else if (element.minOccurs)
+      fprintf(stream, " %s", element.minOccurs);
+    if (element.maxOccurs && strcmp(element.maxOccurs, "1") && is_integer(element.maxOccurs))
+      fprintf(stream, ":%s", element.maxOccurs);
+    if (element.default_)
+    { // determine whether the element can be assigned a default value, this is dependent on the choice of mapping for primitive types
+      if (type)
+      { const char *t = tname(NULL, NULL, type);
+        if (!strncmp(t, "unsigned ", 9))
+          t += 9;
+        if (!strcmp(t, "bool")
+         || !strcmp(t, "char")
+         || !strcmp(t, "double")
+         || !strcmp(t, "float")
+         || !strcmp(t, "int")
+         || !strcmp(t, "long")
+         || !strcmp(t, "LONG64")
+         || !strcmp(t, "short")
+         || !strcmp(t, "ULONG64"))
+          fprintf(stream, " = %s", element.default_);
+        else if (!strcmp(t, "char*")
+              || !strcmp(t, "char *"))	// not elegant
+          fprintf(stream, " = \"%s\"", element.default_);
+        else if (!strncmp(t, "enum ", 5))
+          fprintf(stream, " = %s", ename(t + 5, element.default_));
+        else if (!strcmp(t, "std::string") || !strcmp(t, "std::string*") || !strcmp(t, "std::string *"))	// not elegant
+          fprintf(stream, " = \"%s\"", element.default_);
+      }
+      fprintf(stream, ";\t///< Default value=\"%s\".\n", element.default_);
+    }
+    else if (element.nillable)
+      fprintf(stream, ";\t///< Nullable pointer.\n");
+    else if ((!element.minOccurs || !strcmp(element.minOccurs, "1")) && (!element.maxOccurs || !strcmp(element.maxOccurs, "1")))
+      fprintf(stream, ";\t///< Required element.\n");
+    else if (element.minOccurs && !strcmp(element.minOccurs, "0") && (!element.maxOccurs || !strcmp(element.maxOccurs, "1")))
+      fprintf(stream, ";\t///< Optional element.\n");
+    else
+      fprintf(stream, ";\n");
+  }
+}
+
+void Types::gen(const char *URI, const vector<xs__group>& groups)
+{ for (vector<xs__group>::const_iterator group = groups.begin(); group != groups.end(); ++group)
+    gen(URI, *group);
+}
+
+void Types::gen(const char *URI, const xs__group& group)
+{ if (group.groupPtr())
+  { if (group.schemaPtr() == group.groupPtr()->schemaPtr())
+      gen(URI, *group.groupPtr());
+    else
+      gen(group.groupPtr()->schemaPtr()->targetNamespace, *group.groupPtr());
+  }
+  else if (group.all)
+    gen(URI, group.all->element);
+  else if (group.sequence)
+    gen(URI, group.sequence->element);
+  else if (group.choice)
+    gen(URI, NULL, *group.choice);
+}
+
+void Types::gen(const char *URI, const vector<xs__choice>& choices)
+{ for (vector<xs__choice>::const_iterator choice = choices.begin(); choice != choices.end(); ++choice)
+    gen(URI, NULL, *choice);
+}
+
+void Types::gen(const char *URI, const char *name, const xs__choice& choice)
+{ const char *r = NULL, *s = NULL, *t = NULL;
+  bool use_union = !uflag;
+  bool wrap_union = false;
+  bool tmp_union;
+  if (!URI && choice.schemaPtr())
+    URI = choice.schemaPtr()->targetNamespace;
+  fprintf(stream, "/// CHOICE OF ELEMENTS FOR choice");
+  document(choice.annotation);
+  if (choice.minOccurs)
+    fprintf(stream, " minOccurs=\"%s\"", choice.minOccurs);
+  if (choice.maxOccurs)
+    fprintf(stream, " maxOccurs=\"%s\"", choice.maxOccurs);
+  fprintf(stream, "\n");
+  if (!choice.group.empty() || !choice.sequence.empty())
+    use_union = false;
+  else if (cflag || sflag)
+  { for (vector<xs__element>::const_iterator el = choice.element.begin(); el != choice.element.end(); el++)
+    { if ((*el).maxOccurs && strcmp((*el).maxOccurs, "1"))
+      { use_union = false;
+        break;
+      }
+    }
+  }
+  if (use_union)
+  { t = uname(URI);
+    s = strstr(t, "__union");
+    if (s)
+      r = s + 7;
+    if (!r || !*r)
+    { r = t;
+      s = "__union";
+    }
+    if (choice.maxOccurs && strcmp(choice.maxOccurs, "1"))
+    { if (with_union)
+      { // Generate a wrapper when we need a union within a union
+        wrap_union = true;
+        fprintf(stream, "    struct __%s\n    {\n", t);
+      }
+      fprintf(stream, sizeformat, "int", r);
+      if (choice.minOccurs)
+        fprintf(stream, " %s", choice.minOccurs);
+      if (choice.maxOccurs && strcmp(choice.maxOccurs, "1") && is_integer(choice.maxOccurs))
+        fprintf(stream, ":%s", choice.maxOccurs);
+      fprintf(stream, ";\n    struct _%s\n    {\n", t);
+    }
+    if (!with_union || wrap_union)
+    { fprintf(stream, choiceformat, "int", r);
+      if (choice.minOccurs)
+        fprintf(stream, " %s", choice.minOccurs);
+      fprintf(stream, ";\t///< Union %s selector: set to SOAP_UNION_%s_<fieldname>%s\n", t, t, choice.minOccurs && !strcmp(choice.minOccurs, "0") ? " or 0" : "");
+      if (name)
+        fprintf(stream, "/// Union for choice in %s\n", tname(NULL, URI, name));
+      fprintf(stream, "    union %s\n    {\n", t);
+    }
+    tmp_union = with_union;
+    with_union = true;
+  }
+  else
+  { tmp_union = fake_union;
+    fake_union = true;
+  }
+  gen(URI, choice.element);
+  gen(URI, choice.group);
+  gen(URI, choice.sequence);	// TODO: check potential name conflicts
+  gen(URI, choice.any);
+  if (use_union)
+  { with_union = tmp_union;
+    if (!with_union || wrap_union)
+      fprintf(stream, elementformat, "}", s+2);
+    if (choice.maxOccurs && strcmp(choice.maxOccurs, "1"))
+    { fprintf(stream, ";\n");
+      fprintf(stream, pointerformat, "}", s);
+    }
+    fprintf(stream, ";\n");
+    if (wrap_union)
+    { fprintf(stream, elementformat, "}", s);
+      fprintf(stream, ";\n");
+    }
+  }
+  else
+    fake_union = tmp_union;
+  fprintf(stream, "//  END OF CHOICE\n");
+}
+
+void Types::gen(const char *URI, const vector<xs__any>& anys)
+{ for (vector<xs__any>::const_iterator any = anys.begin(); any != anys.end(); ++any)
+    gen(URI, *any);
+}
+
+void Types::gen(const char *URI, const xs__any& any)
+{ fprintf(stream, "/// TODO: <any");
+  if (any.namespace_)
+    fprintf(stream, " namespace=\"%s\"", any.namespace_);
+  if (any.minOccurs)
+    fprintf(stream, " minOccurs=\"%s\"", any.minOccurs);
+  if (any.maxOccurs)
+    fprintf(stream, " maxOccurs=\"%s\"", any.maxOccurs);
+  fprintf(stream, ">\n///       Schema extensibility is user-definable.\n///       Consult the protocol documentation to change and/or insert declarations.\n///       Use wsdl2h option -x to remove this element.\n///       Use wsdl2h option -d to use DOM.\n");
+  if (dflag)
+  { fprintf(stream, pointerformat, "xsd__anyType", "__any");
+    fprintf(stream, ";\t///< Catch any element content in DOM.\n");
+  }
+  else if (!xflag)
+  { fprintf(stream, elementformat, "_XML", "__any");
+    fprintf(stream, ";\t///< Catch any element content in XML string.\n");
+  }
+}
+
+void Types::gen(const char *URI, const xs__anyAttribute& anyAttribute)
+{ fprintf(stream, "/// TODO: <anyAttribute");
+  if (anyAttribute.namespace_)
+    fprintf(stream, " namespace=\"%s\"", anyAttribute.namespace_);
+  fprintf(stream, ">\n///       Schema extensibility is user-definable.\n///       Consult the protocol documentation to change and/or insert declarations.\n///       Use wsdl2h option -x to remove this attribute.\n");
+  if (!xflag)
+  { fprintf(stream, attributeformat, "_XML", "__anyAttribute");
+    fprintf(stream, ";\t///< Catch any attribute content in XML string.\n");
+  }
+}
+
+void Types::gen_soap_array(const char *name, const char *t, const char *item, char *type)
+{ char *dims = NULL, size[8];
+  *size = '\0';
+  if (type)
+    dims = strrchr(type, '[');
+  if (dims)
+    *dims++ = '\0';
+  fprintf(stream, "/// SOAP encoded array of %s\n", type ? type : "xs:anyType");
+  if (cflag)
+    fprintf(stream, "struct %s\n{\n", t);
+  else if (pflag)
+    fprintf(stream, "class %s : public xsd__anyType\n{ public:\n", t);
+  else
+    fprintf(stream, "class %s\n{ public:\n", t);
+  if (dims)
+  { char *s = strchr(dims, ']');
+    if (s && s != dims)
+      sprintf(size, "[%d]", (int)(s - dims + 1));
+  }
+  if (type)
+  { if (strchr(type, '[') != NULL)
+    { gen_soap_array(NULL, "", item, type);
+      fprintf(stream, arrayformat, "}", item ? aname(NULL, NULL, item) : "");
+      fprintf(stream, ";\n");
+    }
+    else
+    { const char *s = pname(!is_basetype(type), NULL, NULL, type);
+      fprintf(stream, "/// Pointer to array of %s.\n", s);
+      fprintf(stream, arrayformat, s, item ? aname(NULL, NULL, item) : "");
+      fprintf(stream, ";\n");
+    }
+    if (*size)
+      fprintf(stream, "/// Size of the multidimensional dynamic array with dimensions=%s\n", size);
+    else 
+      fprintf(stream, "/// Size of the dynamic array.\n");
+    fprintf(stream, sizeformat, "int", size);
+    fprintf(stream, ";\n/// Offset for partially transmitted arrays (uncomment only when required).\n");
+    fprintf(stream, offsetformat, "int", size);
+    fprintf(stream, ";\n");
+  }
+  else
+  { // TODO: handle generic SOAP array? E.g. as an array of anyType
+    fprintf(stream, "// TODO: handle generic SOAP-ENC:Array (array of anyType)\n");
+  }
+}
+
+void Types::gen_substitutions(const char *URI, const xs__element &element)
+{ const std::vector<xs__element*> *substitutions;
+  const char *name;
+  const char *r = NULL, *s = NULL;
+  bool use_union = !uflag;
+  bool wrap_union = false;
+  bool tmp_union;
+  if (!URI && element.schemaPtr())
+    URI = element.schemaPtr()->targetNamespace;
+  if (element.elementPtr())
+  { name = element.elementPtr()->name;
+    substitutions = element.elementPtr()->substitutionsPtr();
+  }
+  else
+  { name = element.name;
+    substitutions = element.substitutionsPtr();
+  }
+  fprintf(stream, "/// CHOICE OF ELEMENTS FOR substitutionGroup=\"%s\"", name);
+  if (element.minOccurs)
+    fprintf(stream, " minOccurs=\"%s\"", element.minOccurs);
+  if (element.maxOccurs)
+    fprintf(stream, " maxOccurs=\"%s\"", element.maxOccurs);
+  fprintf(stream, " with elements");
+  for (std::vector<xs__element*>::const_iterator i1 = substitutions->begin(); i1 != substitutions->end(); ++i1)
+    fprintf(stream, " %s", (*i1)->name);
+  fprintf(stream, "\n");
+  if (use_union)
+  { const char *t = uname(URI);
+    s = strstr(t, "__union");
+    if (!s)
+      s = "__union";
+    r = aname(NULL, NULL, name);
+    if (element.maxOccurs && strcmp(element.maxOccurs, "1"))
+    { if (with_union)
+      { // Generate a wrapper when we need a union within a union
+        wrap_union = true;
+        fprintf(stream, "    struct __%s\n    {\n", t);
+      }
+      fprintf(stream, sizeformat, "int", r);
+      if (element.minOccurs)
+        fprintf(stream, " %s", element.minOccurs);
+      if (element.maxOccurs && strcmp(element.maxOccurs, "1") && is_integer(element.maxOccurs))
+        fprintf(stream, ":%s", element.maxOccurs);
+      fprintf(stream, ";\n    struct _%s\n    {\n", t);
+    }
+    if (!with_union || wrap_union)
+    { fprintf(stream, choiceformat, "int", r);
+      if (element.minOccurs)
+        fprintf(stream, " %s", element.minOccurs);
+      fprintf(stream, ";\t///< Union %s selector: set to SOAP_UNION_%s_<fieldname>%s\n", t, t, element.minOccurs && !strcmp(element.minOccurs, "0") ? " or 0" : "");
+      fprintf(stream, "/// Union for substitutionGroup=\"%s\"\n", name);
+      fprintf(stream, "    union %s\n    {\n", t);
+    }
+    tmp_union = with_union;
+    with_union = true;
+  }
+  else
+  { tmp_union = fake_union;
+    fake_union = true;
+  }
+  for (vector<xs__element*>::const_iterator i2 = substitutions->begin(); i2 != substitutions->end(); ++i2)
+     gen(URI, *(*i2));
+  if (use_union)
+  { with_union = tmp_union;
+    if (!with_union || wrap_union)
+      fprintf(stream, elementformat, "}", s);
+    if (element.maxOccurs && strcmp(element.maxOccurs, "1"))
+    { fprintf(stream, ";\n");
+      fprintf(stream, pointerformat, "}", s);
+    }
+    fprintf(stream, ";\n");
+    if (wrap_union)
+    { fprintf(stream, elementformat, "}", s);
+      fprintf(stream, ";\n");
+    }
+  }
+  else
+    fake_union = tmp_union;
+  fprintf(stream, "//  END OF CHOICE\n");
+}
+
+void Types::document(const xs__annotation *annotation)
+{ if (annotation && annotation->documentation)
+  { fprintf(stream, "/// @brief");
+    documentation(annotation->documentation);
+  }
+}
+
+void Types::modify(const char *name)
+{ // TODO: consider support removal of elements/attributes with ns__X = $- Y
+  const char *s = modtypemap[name];
+  if (s)
+  { while (*s)
+    { if (*s++ == '$')
+        fprintf(stream, "/// Member declared in %s\n   ", mapfile);
+      s = format(s);
+    }
+  }
+}
+
+const char* Types::format(const char *text)
+{ const char *s = text;
+  if (!s)
+    return NULL;
+  while (*s && *s != '$')
+  { if (*s == '\\')
+    { switch (s[1])
+      { case 'n': 
+          fputc('\n', stream);
+	  break;
+        case 't': 
+          fputc('\t', stream);
+	  break;
+        default:
+          fputc(s[1], stream);
+      }
+      s++;
+    }
+    else
+      fputc(*s, stream);
+    s++;
+  }
+  fputc('\n', stream);
+  return s;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Type map file parsing
+//
+////////////////////////////////////////////////////////////////////////////////
+
+static char *getline(char *s, size_t n, FILE *fd)
+{ int c;
+  char *t = s;
+  if (n)
+    n--;
+  for (;;)
+  { c = fgetc(fd);
+    if (c == '\r')
+      continue;
+    if (c == '\\')
+    { c = fgetc(fd);
+      if (c == '\r')
+        c = fgetc(fd);
+      if (c < ' ')
+        continue;
+      if (n)
+      { *t++ = '\\';
+        n--;
+      }
+    }
+    if (c == '\n' || c == EOF)
+      break;
+    if (n)
+    { *t++ = c;
+      n--;
+    }
+  }
+  *t++ = '\0';
+  if (!*s && c == EOF)
+    return NULL;
+  return s;
+}
+
+static const char *nonblank(const char *s)
+{ while (*s && isspace(*s))
+    s++;
+  return s;
+}
+
+static const char *fill(char *t, int n, const char *s, int e)
+{ int i = n;
+  s = nonblank(s);
+  while (*s && *s != e && --i)
+    *t++ = *s++;
+  while (*s && *s != e)
+    s++;
+  if (*s)
+    s++;
+  i = n - i;
+  while (isspace(*--t) && i--)
+    ;
+  t[1] = '\0';
+  return s;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Miscellaneous
+//
+////////////////////////////////////////////////////////////////////////////////
+
+static const char *utf8(char *t, const char *s)
+{ unsigned int c = 0;
+  int c1, c2, c3, c4;
+  c = (unsigned char)*s;
+  if (c >= 0x80)
+  { c1 = *++s;
+    if (c1 < 0x80)
+      s--;
+    else
+    { c1 &= 0x3F;
+      if (c < 0xE0)
+        c = ((c & 0x1F) << 6) | c1;
+      else
+      { c2 = *++s & 0x3F;
+        if (c < 0xF0)
+          c = ((c & 0x0F) << 12) | (c1 << 6) | c2;
+        else
+	{ c3 = *++s & 0x3F;
+          if (c < 0xF8)
+            c = ((c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3;
+          else
+	  { c4 = *++s & 0x3F;
+            if (c < 0xFC)
+              c = ((c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4;
+            else
+              c = ((c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | *++s & 0x3F;
+          }
+        }
+      }
+    }
+  }
+  sprintf(t, "_x%.4x", c);
+  return s;
+}
+
+static const char *cstring(const char *s)
+{ size_t n;
+  char *t;
+  const char *r;
+  for (n = 0, r = s; *r; n++, r++)
+    if (*r == '"' || *r == '\\')
+      n++;
+    else if (*r < 32)
+      n += 3;
+  r = t = (char*)emalloc(n + 1);
+  for (; *s; s++)
+  { if (*s == '"' || *s == '\\')
+    { *t++ = '\\';
+      *t++ = *s;
+    }
+    else if (*s < 32)
+    { sprintf(t, "\\%03o", (unsigned int)(unsigned char)*s);
+      t += 4;
+    }
+    else
+      *t++ = *s;
+  }
+  *t = '\0';
+  return r;
+}
+
+static const char *xstring(const char *s)
+{ size_t n;
+  char *t;
+  const char *r;
+  for (n = 0, r = s; *r; n++, r++)
+  { if (*r < 32 || *r >= 127)
+      n += 4;
+    else if (*r == '<' || *r == '>')
+      n += 3;
+    else if (*r == '&')
+      n += 4;
+    else if (*r == '"')
+      n += 5;
+  }
+  r = t = (char*)emalloc(n + 1);
+  for (; *s; s++)
+  { if (*s < 32 || *s >= 127)
+    { sprintf(t, "&#%.2x;", (unsigned char)*s);
+      t += 5;
+    }
+    else if (*s == '<')
+    { strcpy(t, "&lt;");
+      t += 4;
+    }
+    else if (*s == '>')
+    { strcpy(t, "&gt;");
+      t += 4;
+    }
+    else if (*s == '&')
+    { strcpy(t, "&amp;");
+      t += 5;
+    }
+    else if (*s == '"')
+    { strcpy(t, "&quot;");
+      t += 6;
+    }
+    else
+      *t++ = *s;
+  }
+  *t = '\0';
+  return r;
+}
+
+static bool is_integer(const char *s)
+{ if ((*s == '-' || *s == '+') && s[1])
+    s++;
+  while (*s && isdigit(*s))
+    s++;
+  return *s == '\0';
+}
+
+static void documentation(const char *text)
+{ const char *s = text;
+  bool flag = true;
+  if (!s)
+    return;
+  while (*s)
+  { switch (*s)
+    { case '\n':
+      case '\t':
+      case ' ':
+	flag = true;
+        break;
+      default:
+        if (*s > 32)
+	{ if (flag)
+	  { fputc(' ', stream);
+	    flag = false;
+          }
+	  fputc(*s, stream);
+        }
+    }
+    s++;
+  }
+  fputc('\n', stream);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Allocation
+//
+////////////////////////////////////////////////////////////////////////////////
+
+void *emalloc(size_t size)
+{ void *p = malloc(size);
+  if (!p)
+  { fprintf(stderr, "Error: Malloc failed\n");
+    exit(1);
+  }
+  return p;
+}
+
+char *estrdup(const char *s)
+{ char *t = (char*)emalloc(strlen(s) + 1);
+  strcpy(t, s);
+  return t;
+}
diff --git a/wsdl/types.h b/wsdl/types.h
new file mode 100644
index 0000000..a50b242
--- /dev/null
+++ b/wsdl/types.h
@@ -0,0 +1,113 @@
+/*
+
+types.h
+
+WSDL parser and converter to gSOAP header file format
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+*/
+
+#ifndef TYPES_H
+#define TYPES_H
+
+#include "includes.h"
+#include "wsdlH.h"
+
+enum Type { NONE, CLASS, ENUM, STRUCT, TYPEDEF };
+
+enum Lookup { NOLOOKUP, LOOKUP };
+
+class Types
+{ public:
+    SetOfString		knames;	// keywords, reserved words, class names, and typedefs
+    MapOfStringToString modtypemap;
+    MapOfStringToString deftypemap;
+    MapOfStringToString usetypemap;
+    MapOfStringToString ptrtypemap;
+    MapOfPairToString	qnames;	// (URI,name) -> name
+    MapOfStringToString	uris;	// URI -> prefix
+    MapOfStringToNum	syms;	// prefix -> count (ns1, ns2, ...)
+    SetOfString		rnames;	// reserved symbolic names to avoid clashes
+    SetOfString		onames;	// service operator names
+    MapOfPairToString	enames;	// enum symbolic names
+    VectorOfString	scope;	// de-anonymizer stack
+    int snum; // struct name index, TODO: consider map of URI to count per URI
+    int unum; // union name index, TODO: consider map of URI to count per URI
+    int gnum; // enum name index, TODO: consider map of URI to count per URI
+    bool with_union;
+    bool fake_union;
+    Types();
+    void init();
+    int read(const char *file);
+  private:
+    const char *fname(const char *prefix, const char *URI, const char *qname, SetOfString *reserved, enum Lookup lookup);
+  public:
+    const char *aname(const char *prefix, const char *URI, const char *qname);
+    const char *cname(const char *prefix, const char *URI, const char *qname);
+    const char *tname(const char *prefix, const char *URI, const char *qname);
+    const char *tnameptr(bool, const char *prefix, const char *URI, const char *qname);
+    const char *pname(bool flag, const char *prefix, const char *URI, const char *qname);
+    const char *oname(const char *prefix, const char *URI, const char *qname);
+    const char *ename(const char *type, const char *value);
+    const char *sname(const char *URI, const char *name);
+    const char *gname(const char *URI, const char *name);
+    const char *uname(const char *URI);
+    const char *nsprefix(const char *prefix, const char *URI);
+    const char *deftname(enum Type type, const char *pointer, bool is_pointer, const char *prefix, const char *URI, const char *qname);
+    bool is_defined(const char *prefix, const char *URI, const char *qname);
+    bool is_nillable(const xs__element& element);
+    bool is_basetype(const char *type);
+    void define(const char *URI, const char *name, const xs__complexType&);
+    void gen(const char *URI, const vector<xs__attribute>&);
+    void gen(const char *URI, const vector<xs__attributeGroup>&);
+    void gen(const char *URI, const vector<xs__all>&);
+    void gen(const char *URI, const vector<xs__sequence>&);
+    void gen(const char *URI, const vector<xs__sequence*>&);
+    void gen(const char *URI, const vector<xs__element>&);
+    void gen(const char *URI, const vector<xs__group>&);
+    void gen(const char *URI, const vector<xs__choice>&);
+    void gen(const char *URI, const vector<xs__any>&);
+    void gen(const char *URI, const char *name, const xs__simpleType&, bool anonymous);
+    void gen(const char *URI, const char *name, const xs__complexType&, bool anonymous);
+    void gen(const char *URI, const xs__attribute&);
+    void gen(const char *URI, const xs__all&);
+    void gen(const char *URI, const xs__sequence&);
+    void gen(const char *URI, const xs__element&);
+    void gen(const char *URI, const xs__group&);
+    void gen(const char *URI, const char *name, const xs__choice&);
+    void gen(const char *URI, const xs__any&);
+    void gen(const char *URI, const xs__anyAttribute&);
+    void gen_soap_array(const char *name, const char *t, const char *item, char *type);
+    void gen_substitutions(const char *URI, const xs__element &element);
+    void document(const xs__annotation*);
+    void modify(const char *name);
+    const char *format(const char *text);
+};
+
+#endif
diff --git a/wsdl/wsdl.cpp b/wsdl/wsdl.cpp
new file mode 100644
index 0000000..f80e157
--- /dev/null
+++ b/wsdl/wsdl.cpp
@@ -0,0 +1,1134 @@
+/*
+
+wsdl.cpp
+
+WSDL 1.1 binding schema implementation
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2006, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+*/
+
+#include "wsdlH.h"
+
+using namespace std;
+
+const char *qname_token(const char *QName, const char *URI)
+{ if (QName && URI && *QName == '"') // QNames are stored in the format "URI":name, unless the URI is in the nsmap
+  { int n = strlen(URI);
+    if (!strncmp(QName + 1, URI, n) && QName[n + 1] == '"')
+      return QName + n + 3;
+  }
+  else if (QName && (!URI || !*URI) && *QName != '"' && !strchr(QName, ':')) // Empty namespace
+    return QName;
+  return NULL;
+}
+
+int is_builtin_qname(const char *QName)
+{ if (iflag)
+    return 1;
+  if (QName)
+  { if (*QName != '"')
+      return 1;	// if the QName does not start with a ", it must be in the nsmap
+    const char *s = strchr(QName + 1, '"');
+    if (s)
+    { size_t n = s - QName - 1;
+      for (SetOfString::const_iterator i = exturis.begin(); i != exturis.end(); ++i)
+        if (strlen(*i) == n && !strncmp(QName + 1, *i, n))
+          return 1; // QName is in exturis
+    }
+  }
+  return 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	wsdl
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int warn_ignore(struct soap*, const char*);
+int show_ignore(struct soap*, const char*);
+
+wsdl__definitions::wsdl__definitions()
+{ soap = soap_new1(SOAP_XML_TREE | SOAP_C_UTFSTRING);
+#ifdef WITH_OPENSSL
+  soap_ssl_client_context(soap, SOAP_SSL_NO_AUTHENTICATION, NULL, NULL, NULL, NULL, NULL);
+#endif
+#ifdef WITH_NONAMESPACES
+  soap_set_namespaces(soap, namespaces);
+#endif
+  soap_default(soap);
+  if (vflag)
+    soap->fignore = show_ignore;
+  else
+    soap->fignore = warn_ignore;
+  soap->encodingStyle = NULL;
+  soap->proxy_host = proxy_host;
+  soap->proxy_port = proxy_port;
+  name = NULL;
+  targetNamespace = "";
+  documentation = NULL;
+  types = NULL;
+  updated = false;
+  redirs = 0;
+}
+
+wsdl__definitions::wsdl__definitions(struct soap *copy, const char *cwd, const char *loc)
+{ soap = soap_copy(copy);
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->recvfd = 0;
+  soap->sendfd = 1;
+  strcpy(soap->host, copy->host);
+  soap_default(soap);
+  soap->fignore = warn_ignore;
+  soap->encodingStyle = NULL;
+  updated = false;
+  redirs = 0;
+  read(cwd, loc);
+}
+
+wsdl__definitions::~wsdl__definitions()
+{ soap_destroy(soap);
+  soap_end(soap);
+  soap_done(soap);
+  free(soap);
+}
+
+int wsdl__definitions::get(struct soap *soap)
+{ return preprocess();
+}
+
+int wsdl__definitions::read(int num, char **loc)
+{ if (num <= 0)
+    return read((const char*)NULL, (const char*)NULL);
+  if (num == 1)
+    return read((const char*)NULL, loc[0]);
+  wsdl__import im;
+  im.namespace_ = NULL;
+  for (int i = 0; i < num; i++)
+  { im.location = loc[i];
+    import.push_back(im);
+  }
+  return preprocess();
+}
+
+int wsdl__definitions::read(const char *cwd, const char *loc)
+{ if (vflag)
+    fprintf(stderr, "Opening WSDL/XSD '%s' from '%s'\n", loc?loc:"", cwd?cwd:"");
+  if (loc)
+  { if (!strncmp(loc, "http://", 7) || !strncmp(loc, "https://", 8))
+    { fprintf(stderr, "Connecting to '%s' to retrieve WSDL/XSD... ", loc);
+      location = soap_strdup(soap, loc);
+      if (soap_connect_command(soap, SOAP_GET, location, NULL))
+      { fprintf(stderr, "connection failed\n");
+        soap_print_fault(soap, stderr);
+        exit(1);
+      }
+      fprintf(stderr, "connected, receiving...\n");
+    }
+    else if (cwd && (!strncmp(cwd, "http://", 7) || !strncmp(cwd, "https://", 8)))
+    { char *s;
+      location = (char*)soap_malloc(soap, strlen(cwd) + strlen(loc) + 2);
+      strcpy(location, cwd);
+      s = strrchr(location, '/');
+      if (s)
+        *s = '\0';
+      strcat(location, "/");
+      strcat(location, loc);
+      fprintf(stderr, "Connecting to '%s' to retrieve relative '%s' WSDL/XSD... ", location, loc);
+      if (soap_connect_command(soap, SOAP_GET, location, NULL))
+      { fprintf(stderr, "connection failed\n");
+        exit(1);
+      }
+      fprintf(stderr, "connected, receiving...\n");
+    }
+    else
+    { soap->recvfd = open(loc, O_RDONLY, 0);
+      if (soap->recvfd < 0)
+      { if (cwd)
+        { char *s;
+          location = (char*)soap_malloc(soap, strlen(cwd) + strlen(loc) + 2);
+          strcpy(location, cwd);
+          s = strrchr(location, '/');
+          if (s)
+            *s = '\0';
+          strcat(location, "/");
+          strcat(location, loc);
+          soap->recvfd = open(location, O_RDONLY, 0);
+        }
+        if (soap->recvfd < 0 && import_path)
+        { location = (char*)soap_malloc(soap, strlen(import_path) + strlen(loc) + 2);
+          strcpy(location, import_path);
+          strcat(location, "/");
+          strcat(location, loc);
+          soap->recvfd = open(location, O_RDONLY, 0);
+	}
+        if (soap->recvfd < 0)
+	{ fprintf(stderr, "Cannot open '%s'\n", loc);
+          exit(1);
+        }
+      }
+      else
+        location = soap_strdup(soap, loc);
+      fprintf(stderr, "Reading file '%s'\n", location);
+    }
+  }
+  if (!soap_begin_recv(soap))
+    this->soap_in(soap, "wsdl:definitions", NULL);
+  if (soap->error)
+  { // deal with sloppy WSDLs that import schemas at the top level rather than importing them in <types>
+    if (soap->error == SOAP_TAG_MISMATCH && soap->level == 0)
+    { soap_retry(soap);
+      xs__schema *schema = new xs__schema(soap);
+      schema->soap_in(soap, "xs:schema", NULL);
+      if (soap->error)
+      { fprintf(stderr, "An error occurred while parsing WSDL or XSD from '%s'\n", loc?loc:"");
+        soap_print_fault(soap, stderr);
+        soap_print_fault_location(soap, stderr);
+        exit(1);
+      }
+      name = NULL;
+      targetNamespace = schema->targetNamespace;
+      if (vflag)
+        cerr << "Found schema " << (targetNamespace?targetNamespace:"") << " when expecting WSDL" << endl;
+      types = new wsdl__types();
+      types->documentation = NULL;
+      types->xs__schema_.push_back(schema);
+    }
+    else if ((soap->error >= 301 && soap->error <= 303) || soap->error == 307) // HTTP redirect, socket was closed
+    { int r = SOAP_ERR;
+      fprintf(stderr, "Redirected to '%s'\n", soap->endpoint);
+      if (redirs++ < 10)
+        r = read(cwd, soap->endpoint);
+      else
+        fprintf(stderr, "Max redirects exceeded\n");
+      redirs--;
+      return r;
+    }
+    else
+    { fprintf(stderr, "An error occurred while parsing WSDL from '%s'\n", loc?loc:"");
+      soap_print_fault(soap, stderr);
+      soap_print_fault_location(soap, stderr);
+      exit(1);
+    }
+  }
+  if (vflag)
+    fprintf(stderr, "Done reading '%s'\n", loc);
+  soap_end_recv(soap);
+  if (soap->recvfd >= 0)
+  { close(soap->recvfd);
+    soap->recvfd = -1;
+  }
+  else
+    soap_closesock(soap);
+  return SOAP_OK;
+}
+
+int wsdl__definitions::preprocess()
+{ // process import
+  for (vector<wsdl__import>::iterator im1 = import.begin(); im1 != import.end(); ++im1)
+    (*im1).preprocess(*this);
+  // merge nested imported WSDLs into single import list
+again:
+  for (vector<wsdl__import>::iterator im2 = import.begin(); im2 != import.end(); ++im2)
+  { if ((*im2).definitionsPtr())
+    { for (vector<wsdl__import>::iterator i = (*im2).definitionsPtr()->import.begin(); i != (*im2).definitionsPtr()->import.end(); ++i)
+      { bool found = false;
+        for (vector<wsdl__import>::iterator j = import.begin(); j != import.end(); ++j)
+        { if (((*i).definitionsPtr() == (*j).definitionsPtr())
+	   || ((*i).location && (*j).location && !strcmp((*i).location, (*j).location)))
+          { found = true;
+	    break;
+	  }
+        }
+        if (!found)
+        { if (vflag)
+	    cerr << "Adding imported WSDL " << ((*i).location?(*i).location:"") << " to " << (name?name:"") << " namespace " << (targetNamespace?targetNamespace:"") << endl;
+	  import.push_back(*i);
+          goto again;
+        }
+      }
+    }
+  }
+  // merge <types>
+  for (vector<wsdl__import>::iterator im3 = import.begin(); im3 != import.end(); ++im3)
+  { if ((*im3).definitionsPtr() && (*im3).definitionsPtr()->types)
+    { if (!types)
+      { types = soap_new_wsdl__types(soap, -1);
+        types->soap_default(soap);
+      }
+      // merge <types>, check for duplicates, add namespaces for sloppy imports
+      for (vector<xs__schema*>::const_iterator i = (*im3).definitionsPtr()->types->xs__schema_.begin(); i != (*im3).definitionsPtr()->types->xs__schema_.end(); ++i)
+      { bool found = false;
+	if (!(*i)->targetNamespace)
+          cerr << "Warning: Schema without namespace, assigning " << (targetNamespace?targetNamespace:"") << endl;
+	if (!(*i)->targetNamespace)
+	  (*i)->targetNamespace = targetNamespace;
+	else
+	{ for (vector<xs__schema*>::const_iterator j = types->xs__schema_.begin(); j != types->xs__schema_.end(); ++j)
+	  { if ((*j)->targetNamespace && !strcmp((*i)->targetNamespace, (*j)->targetNamespace))
+	    { found = true;
+	      break;
+	    }
+	  }
+	}
+	if (!found)
+        { if (vflag)
+	    cerr << "Adding schema " << ((*i)->targetNamespace?(*i)->targetNamespace:"") << " to types in WSDL " << (name?name:"") << " namespace " << (targetNamespace?targetNamespace:"") << endl;
+	  types->xs__schema_.push_back(*i);
+	}
+      }
+    }
+  }
+  if (types)
+    types->preprocess(*this);
+  return SOAP_OK;
+}
+
+int wsdl__definitions::traverse()
+{ if (vflag)
+    cerr << "Analyzing wsdl definitions '" << (name?name:"") << "' targetNamespace " << (targetNamespace?targetNamespace:"?") << endl;
+  if (updated)
+    return SOAP_OK;
+  updated = true;
+  if (!targetNamespace)
+  { if (vflag)
+      fprintf(stderr, "Warning: WSDL '%s' has no targetNamespace\n", name?name:"");
+    targetNamespace = "";
+  }
+  // process import first
+  for (vector<wsdl__import>::iterator im = import.begin(); im != import.end(); ++im)
+    (*im).traverse(*this);
+  // then process the types
+  if (types)
+    types->traverse(*this);
+  // process messages before portTypes
+  for (vector<wsdl__message>::iterator mg = message.begin(); mg != message.end(); ++mg)
+    (*mg).traverse(*this);
+  // process portTypes before bindings
+  for (vector<wsdl__portType>::iterator pt = portType.begin(); pt != portType.end(); ++pt)
+    (*pt).traverse(*this);
+  // process bindings
+  for (vector<wsdl__binding>::iterator bg = binding.begin(); bg != binding.end(); ++bg)
+    (*bg).traverse(*this);
+  // process services
+  for (vector<wsdl__service>::iterator sv = service.begin(); sv != service.end(); ++sv)
+    (*sv).traverse(*this);
+  if (vflag)
+    cerr << "End of wsdl definitions '" << (name?name:"") << "' targetNamespace " << (targetNamespace?targetNamespace:"?") << endl;
+  return SOAP_OK;
+}
+
+const char *wsdl__definitions::sourceLocation()
+{ return location;
+}
+
+int wsdl__definitions::error()
+{ return soap->error;
+}
+
+void wsdl__definitions::print_fault()
+{ soap_print_fault(soap, stderr);
+  soap_print_fault_location(soap, stderr);
+}
+
+void wsdl__definitions::builtinType(const char *type)
+{ builtinTypeSet.insert(type);
+}
+
+void wsdl__definitions::builtinTypes(const SetOfString& types)
+{ for (SetOfString::const_iterator tp = types.begin(); tp != types.end(); ++tp)
+    builtinTypeSet.insert(*tp);
+}
+
+void wsdl__definitions::builtinElement(const char *element)
+{ builtinElementSet.insert(element);
+}
+
+void wsdl__definitions::builtinElements(const SetOfString& elements)
+{ for (SetOfString::const_iterator el = elements.begin(); el != elements.end(); ++el)
+   builtinElementSet.insert(*el);
+}
+
+void wsdl__definitions::builtinAttribute(const char *attribute)
+{ builtinAttributeSet.insert(attribute);
+}
+
+void wsdl__definitions::builtinAttributes(const SetOfString& attributes)
+{ for (SetOfString::const_iterator at = attributes.begin(); at != attributes.end(); ++at)
+    builtinAttributeSet.insert(*at);
+}
+
+const SetOfString& wsdl__definitions::builtinTypes() const
+{ return builtinTypeSet;
+}
+
+const SetOfString& wsdl__definitions::builtinElements() const
+{ return builtinElementSet;
+}
+
+const SetOfString& wsdl__definitions::builtinAttributes() const
+{ return builtinAttributeSet;
+}
+
+int wsdl__service::traverse(wsdl__definitions& definitions)
+{ if (vflag)
+    cerr << "Analyzing wsdl service " << (name?name:"") << endl;
+  // process ports
+  for (vector<wsdl__port>::iterator i = port.begin(); i != port.end(); ++i)
+    (*i).traverse(definitions);
+  return SOAP_OK;
+}
+
+wsdl__port::wsdl__port()
+{ bindingRef = NULL;
+}
+
+int wsdl__port::traverse(wsdl__definitions& definitions)
+{ if (vflag)
+    cerr << "Analyzing wsdl port" << endl;
+  // search binding name
+  const char *token = qname_token(binding, definitions.targetNamespace);
+  bindingRef = NULL;
+  if (token)
+  { for (vector<wsdl__binding>::iterator binding = definitions.binding.begin(); binding != definitions.binding.end(); ++binding)
+    { if ((*binding).name && !strcmp((*binding).name, token))
+      { bindingRef = &(*binding);
+        if (vflag)
+	  cerr << "Found port " << (name?name:"") << " binding " << (token?token:"") << endl;
+        break;
+      }
+    }
+  }
+  else
+  { for (vector<wsdl__import>::iterator import = definitions.import.begin(); import != definitions.import.end(); ++import)
+    { wsdl__definitions *importdefinitions = (*import).definitionsPtr();
+      if (importdefinitions)
+      { token = qname_token(binding, importdefinitions->targetNamespace);
+        if (token)
+        { for (vector<wsdl__binding>::iterator binding = importdefinitions->binding.begin(); binding != importdefinitions->binding.end(); ++binding)
+          { if ((*binding).name && !strcmp((*binding).name, token))
+            { bindingRef = &(*binding);
+              if (vflag)
+	        cerr << "Found port " << (name?name:"") << " binding " << (token?token:"") << endl;
+              break;
+            }
+          }
+	}
+      }
+    }
+  }
+  if (!bindingRef)
+    cerr << "Warning: no port '" << (name?name:"") << "' binding '" << (binding?binding:"") << "' in WSDL definitions '" << (definitions.name?definitions.name:"") << "' namespace " << (definitions.targetNamespace?definitions.targetNamespace:"") << endl;
+  return SOAP_OK;
+}
+
+void wsdl__port::bindingPtr(wsdl__binding *binding)
+{ bindingRef = binding;
+}
+
+wsdl__binding *wsdl__port::bindingPtr() const
+{ return bindingRef;
+}
+
+wsdl__binding::wsdl__binding()
+{ portTypeRef = NULL;
+}
+
+int wsdl__binding::traverse(wsdl__definitions& definitions)
+{ if (vflag)
+    cerr << "Analyzing wsdl bindings" << endl;
+  const char *token = qname_token(type, definitions.targetNamespace);
+  portTypeRef = NULL;
+  if (token)
+  { for (vector<wsdl__portType>::iterator portType = definitions.portType.begin(); portType != definitions.portType.end(); ++portType)
+    { if ((*portType).name && !strcmp((*portType).name, token))
+      { portTypeRef = &(*portType);
+        if (vflag)
+	  cerr << "Found binding " << (name?name:"") << " portType " << (token?token:"") << endl;
+        break;
+      }
+    }
+  }
+  else
+  { for (vector<wsdl__import>::iterator import = definitions.import.begin(); import != definitions.import.end(); ++import)
+    { wsdl__definitions *importdefinitions = (*import).definitionsPtr();
+      if (importdefinitions)
+      { token = qname_token(type, importdefinitions->targetNamespace);
+        if (token)
+        { for (vector<wsdl__portType>::iterator portType = importdefinitions->portType.begin(); portType != importdefinitions->portType.end(); ++portType)
+          { if ((*portType).name && !strcmp((*portType).name, token))
+            { portTypeRef = &(*portType);
+              if (vflag)
+	        cerr << "Found binding " << (name?name:"") << " portType " << (token?token:"") << endl;
+              break;
+            }
+          }
+	}
+      }
+    }
+  }
+  if (!portTypeRef)
+    cerr << "Warning: no binding '" << (name?name:"") << "' portType '" << (type?type:"") << "' in WSDL definitions '" << (definitions.name?definitions.name:"") << "' namespace " << (definitions.targetNamespace?definitions.targetNamespace:"") << endl;
+  for (vector<wsdl__binding_operation>::iterator i = operation.begin(); i != operation.end(); ++i)
+    (*i).traverse(definitions, portTypeRef);
+  return SOAP_OK;
+}
+
+void wsdl__binding::portTypePtr(wsdl__portType *portType)
+{ portTypeRef = portType;
+}
+
+wsdl__portType *wsdl__binding::portTypePtr() const
+{ return portTypeRef;
+}
+
+wsdl__binding_operation::wsdl__binding_operation()
+{ operationRef = NULL;
+}
+
+int wsdl__binding_operation::traverse(wsdl__definitions& definitions, wsdl__portType *portTypeRef)
+{ if (vflag)
+    cerr << "Analyzing wsdl binding operation" << endl;
+  if (input)
+    input->traverse(definitions);
+  if (output)
+    output->traverse(definitions);
+  for (vector<wsdl__ext_fault>::iterator i = fault.begin(); i != fault.end(); ++i)
+    (*i).traverse(definitions);
+  operationRef = NULL;
+  if (name && portTypeRef)
+  { for (vector<wsdl__operation>::iterator i = portTypeRef->operation.begin(); i != portTypeRef->operation.end(); ++i)
+    { if ((*i).name && !strcmp((*i).name, name))
+      { operationRef = &(*i);
+        if (vflag)
+          cerr << "Found operation " << (name?name:"") << endl;
+        break;
+      }
+    }
+  }
+  if (!operationRef)
+    cerr << "Warning: no operation '" << (name?name:"") << "' in WSDL definitions '" << (definitions.name?definitions.name:"") << "' namespace " << (definitions.targetNamespace?definitions.targetNamespace:"") << endl;
+  else
+  { for (vector<wsdl__ext_fault>::iterator i = fault.begin(); i != fault.end(); ++i)
+    { if ((*i).name)
+      { for (vector<wsdl__fault>::iterator j = operationRef->fault.begin(); j != operationRef->fault.end(); ++j)
+        { if ((*j).name && !strcmp((*j).name, (*i).name))
+          { (*i).messagePtr((*j).messagePtr());
+            if (vflag)
+              cerr << "Found fault " << ((*j).name?(*j).name:"") << " message " << endl;
+            break;
+          }
+        }
+      }
+      else if ((*i).soap__fault_ && (*i).soap__fault_->name) // try the soap:fault name, this is not elegant, but neither is WSDL 1.1 
+      { for (vector<wsdl__fault>::iterator j = operationRef->fault.begin(); j != operationRef->fault.end(); ++j)
+        { if ((*j).name && !strcmp((*j).name, (*i).soap__fault_->name))
+          { (*i).messagePtr((*j).messagePtr());
+            if (vflag)
+              cerr << "Found fault " << ((*j).name?(*j).name:"") << " message " << endl;
+            break;
+          }
+        }
+      }
+      if (!(*i).messagePtr())
+        cerr << "Warning: no soap:fault message in WSDL definitions '" << (definitions.name?definitions.name:"") << "' operation '" << (name?name:"") << "' namespace " << (definitions.targetNamespace?definitions.targetNamespace:"") << endl;
+    }
+  }
+  return SOAP_OK;
+}
+
+void wsdl__binding_operation::operationPtr(wsdl__operation *operation)
+{ operationRef = operation;
+}
+
+wsdl__operation *wsdl__binding_operation::operationPtr() const
+{ return operationRef;
+}
+
+int wsdl__ext_input::traverse(wsdl__definitions& definitions)
+{ if (vflag)
+    cerr << "Analyzing wsdl ext input" << endl;
+  for (vector<soap__header>::iterator hd = soap__header_.begin(); hd != soap__header_.end(); ++hd)
+    (*hd).traverse(definitions);
+  if (mime__multipartRelated_)
+    mime__multipartRelated_->traverse(definitions);
+  return SOAP_OK;
+}
+
+int wsdl__ext_output::traverse(wsdl__definitions& definitions)
+{ if (vflag)
+    cerr << "Analyzing wsdl ext output" << endl;
+  for (vector<soap__header>::iterator hd = soap__header_.begin(); hd != soap__header_.end(); ++hd)
+    (*hd).traverse(definitions);
+  if (mime__multipartRelated_)
+    mime__multipartRelated_->traverse(definitions);
+  return SOAP_OK;
+}
+
+wsdl__ext_fault::wsdl__ext_fault()
+{ messageRef = NULL;
+}
+
+int wsdl__ext_fault::traverse(wsdl__definitions& definitions)
+{ if (vflag)
+    cerr << "Analyzing wsdl ext fault" << endl;
+  messageRef = NULL;
+  return SOAP_OK;
+}
+
+void wsdl__ext_fault::messagePtr(wsdl__message *message)
+{ messageRef = message;
+}
+
+wsdl__message *wsdl__ext_fault::messagePtr() const
+{ return messageRef;
+}
+
+int wsdl__portType::traverse(wsdl__definitions& definitions)
+{ if (vflag)
+    cerr << "Analyzing wsdl portType" << endl;
+  for (vector<wsdl__operation>::iterator i = operation.begin(); i != operation.end(); ++i)
+    (*i).traverse(definitions);
+  return SOAP_OK;
+}
+
+int wsdl__operation::traverse(wsdl__definitions& definitions)
+{ if (vflag)
+    cerr << "Analyzing wsdl operation" << endl;
+  if (input)
+    input->traverse(definitions);
+  if (output)
+    output->traverse(definitions);
+  for (vector<wsdl__fault>::iterator i = fault.begin(); i != fault.end(); ++i)
+    (*i).traverse(definitions);
+  return SOAP_OK;
+}
+
+wsdl__input::wsdl__input()
+{ messageRef = NULL;
+}
+
+int wsdl__input::traverse(wsdl__definitions& definitions)
+{ if (vflag)
+    cerr << "Analyzing wsdl input" << endl;
+  const char *token = qname_token(message, definitions.targetNamespace);
+  messageRef = NULL;
+  if (token)
+  { for (vector<wsdl__message>::iterator message = definitions.message.begin(); message != definitions.message.end(); ++message)
+    { if ((*message).name && !strcmp((*message).name, token))
+      { messageRef = &(*message);
+        if (vflag)
+	  cerr << "Found input " << (name?name:"") << " message " << (token?token:"") << endl;
+        break;
+      }
+    }
+  }
+  else
+  { for (vector<wsdl__import>::iterator import = definitions.import.begin(); import != definitions.import.end(); ++import)
+    { wsdl__definitions *importdefinitions = (*import).definitionsPtr();
+      if (importdefinitions)
+      { token = qname_token(message, importdefinitions->targetNamespace);
+        if (token)
+        { for (vector<wsdl__message>::iterator message = importdefinitions->message.begin(); message != importdefinitions->message.end(); ++message)
+          { if ((*message).name && !strcmp((*message).name, token))
+            { messageRef = &(*message);
+              if (vflag)
+	        cerr << "Found input " << (name?name:"") << " message " << (token?token:"") << endl;
+              break;
+            }
+          }
+	}
+      }
+    }
+  }
+  if (!messageRef)
+    cerr << "Warning: no input '" << (name?name:"") << "' message '" << (message?message:"") << "' in WSDL definitions '" << (definitions.name?definitions.name:"") << "' namespace " << (definitions.targetNamespace?definitions.targetNamespace:"") << endl;
+  return SOAP_OK;
+}
+
+void wsdl__input::messagePtr(wsdl__message *message)
+{ messageRef = message;
+}
+
+wsdl__message *wsdl__input::messagePtr() const
+{ return messageRef;
+}
+
+wsdl__output::wsdl__output()
+{ messageRef = NULL;
+}
+
+int wsdl__output::traverse(wsdl__definitions& definitions)
+{ if (vflag)
+    cerr << "Analyzing wsdl output" << endl;
+  const char *token = qname_token(message, definitions.targetNamespace);
+  messageRef = NULL;
+  if (token)
+  { for (vector<wsdl__message>::iterator message = definitions.message.begin(); message != definitions.message.end(); ++message)
+    { if ((*message).name && !strcmp((*message).name, token))
+      { messageRef = &(*message);
+        if (vflag)
+	  cerr << "Found output " << (name?name:"") << " message " << (token?token:"") << endl;
+        break;
+      }
+    }
+  }
+  else
+  { for (vector<wsdl__import>::iterator import = definitions.import.begin(); import != definitions.import.end(); ++import)
+    { wsdl__definitions *importdefinitions = (*import).definitionsPtr();
+      if (importdefinitions)
+      { token = qname_token(message, importdefinitions->targetNamespace);
+        if (token)
+        { for (vector<wsdl__message>::iterator message = importdefinitions->message.begin(); message != importdefinitions->message.end(); ++message)
+          { if ((*message).name && !strcmp((*message).name, token))
+            { messageRef = &(*message);
+              if (vflag)
+	        cerr << "Found output " << (name?name:"") << " message " << (token?token:"") << endl;
+              break;
+            }
+          }
+	}
+      }
+    }
+  }
+  if (!messageRef)
+    cerr << "Warning: no output '" << (name?name:"") << "' message '" << (message?message:"") << "' in WSDL definitions '" << (definitions.name?definitions.name:"") << "' namespace " << (definitions.targetNamespace?definitions.targetNamespace:"") << endl;
+  return SOAP_OK;
+}
+
+void wsdl__output::messagePtr(wsdl__message *message)
+{ messageRef = message;
+}
+
+wsdl__message *wsdl__output::messagePtr() const
+{ return messageRef;
+}
+
+wsdl__fault::wsdl__fault()
+{ messageRef = NULL;
+}
+
+int wsdl__fault::traverse(wsdl__definitions& definitions)
+{ if (vflag)
+    cerr << "Analyzing wsdl fault" << endl;
+  const char *token = qname_token(message, definitions.targetNamespace);
+  messageRef = NULL;
+  if (token)
+  { for (vector<wsdl__message>::iterator message = definitions.message.begin(); message != definitions.message.end(); ++message)
+    { if ((*message).name && !strcmp((*message).name, token))
+      { messageRef = &(*message);
+        if (vflag)
+	  cerr << "Found fault " << (name?name:"") << " message " << (token?token:"") << endl;
+        break;
+      }
+    }
+  }
+  else
+  { for (vector<wsdl__import>::iterator import = definitions.import.begin(); import != definitions.import.end(); ++import)
+    { wsdl__definitions *importdefinitions = (*import).definitionsPtr();
+      if (importdefinitions)
+      { token = qname_token(message, importdefinitions->targetNamespace);
+        if (token)
+        { for (vector<wsdl__message>::iterator message = importdefinitions->message.begin(); message != importdefinitions->message.end(); ++message)
+          { if ((*message).name && !strcmp((*message).name, token))
+            { messageRef = &(*message);
+              if (vflag)
+	        cerr << "Found output " << (name?name:"") << " message " << (token?token:"") << endl;
+              break;
+            }
+          }
+	}
+      }
+    }
+  }
+  if (!messageRef)
+    cerr << "Warning: no fault '" << (name?name:"") << "' message '" << (message?message:"") << "' in WSDL definitions '" << (definitions.name?definitions.name:"") << "' namespace " << (definitions.targetNamespace?definitions.targetNamespace:"") << endl;
+  return SOAP_OK;
+}
+
+void wsdl__fault::messagePtr(wsdl__message *message)
+{ messageRef = message;
+}
+
+wsdl__message *wsdl__fault::messagePtr() const
+{ return messageRef;
+}
+
+int wsdl__message::traverse(wsdl__definitions& definitions)
+{ if (vflag)
+    cerr << "Analyzing wsdl message" << endl;
+  for (vector<wsdl__part>::iterator i = part.begin(); i != part.end(); ++i)
+    (*i).traverse(definitions);
+  return SOAP_OK;
+}
+
+wsdl__part::wsdl__part()
+{ elementRef = NULL;
+  simpleTypeRef = NULL;
+  complexTypeRef = NULL;
+}
+
+int wsdl__part::traverse(wsdl__definitions& definitions)
+{ if (vflag)
+    cerr << "Analyzing wsdl part" << endl;
+  elementRef = NULL;
+  simpleTypeRef = NULL;
+  complexTypeRef = NULL;
+  if (definitions.types)
+  { for (vector<xs__schema*>::iterator schema = definitions.types->xs__schema_.begin(); schema != definitions.types->xs__schema_.end(); ++schema)
+    { const char *token = qname_token(element, (*schema)->targetNamespace);
+      if (token)
+      { for (vector<xs__element>::iterator element = (*schema)->element.begin(); element != (*schema)->element.end(); ++element)
+        { if ((*element).name && !strcmp((*element).name, token))
+          { elementRef = &(*element);
+            if (vflag)
+	      cerr << "Found part " << (name?name:"") << " element " << (token?token:"") << endl;
+            break;
+          }
+        }
+      }
+      token = qname_token(type, (*schema)->targetNamespace);
+      if (token)
+      { for (vector<xs__simpleType>::iterator simpleType = (*schema)->simpleType.begin(); simpleType != (*schema)->simpleType.end(); ++simpleType)
+        { if ((*simpleType).name && !strcmp((*simpleType).name, token))
+          { simpleTypeRef = &(*simpleType);
+            if (vflag)
+              cerr << "Found part " << (name?name:"") << " simpleType " << (token?token:"") << endl;
+            break;
+          }
+        }
+      }
+      token = qname_token(type, (*schema)->targetNamespace);
+      if (token)
+      { for (vector<xs__complexType>::iterator complexType = (*schema)->complexType.begin(); complexType != (*schema)->complexType.end(); ++complexType)
+        { if ((*complexType).name && !strcmp((*complexType).name, token))
+          { complexTypeRef = &(*complexType);
+            if (vflag)
+	      cerr << "Found part " << (name?name:"") << " complexType " << (token?token:"") << endl;
+            break;
+          }
+        }
+      }
+    }
+  }
+  if (!elementRef && !simpleTypeRef && !complexTypeRef)
+  { if (element)
+    { if (is_builtin_qname(element))
+	definitions.builtinElement(element);
+      else
+        cerr << "Warning: no part '" << (name?name:"") << "' element '" << element << "' in WSDL definitions '" << (definitions.name?definitions.name:"") << "' namespace " << (definitions.targetNamespace?definitions.targetNamespace:"") << endl;
+    }
+    else if (type)
+    { if (is_builtin_qname(type))
+	definitions.builtinType(type);
+      else
+        cerr << "Warning: no part '" << (name?name:"") << "' type '" << type << "' in WSDL definitions '" << (definitions.name?definitions.name:"") << "' namespace " << (definitions.targetNamespace?definitions.targetNamespace:"") << endl;
+    }
+    else
+      cerr << "Warning: no part '" << (name?name:"") << "' element or type in WSDL definitions '" << (definitions.name?definitions.name:"") << "' namespace " << (definitions.targetNamespace?definitions.targetNamespace:"") << endl;
+  }
+  return SOAP_OK;
+}
+
+void wsdl__part::elementPtr(xs__element *element)
+{ elementRef = element;
+}
+
+void wsdl__part::simpleTypePtr(xs__simpleType *simpleType)
+{ simpleTypeRef = simpleType;
+}
+
+void wsdl__part::complexTypePtr(xs__complexType *complexType)
+{ complexTypeRef = complexType;
+}
+
+xs__element *wsdl__part::elementPtr() const
+{ return elementRef;
+}
+
+xs__simpleType *wsdl__part::simpleTypePtr() const
+{ return simpleTypeRef;
+}
+
+xs__complexType *wsdl__part::complexTypePtr() const
+{ return complexTypeRef;
+}
+
+int wsdl__types::preprocess(wsdl__definitions& definitions)
+{ if (vflag)
+    cerr << "Preprocessing wsdl types" << endl;
+  // set the location of each schema in <types> to the WSDL's location
+  for (vector<xs__schema*>::iterator schema0 = xs__schema_.begin(); schema0 != xs__schema_.end(); ++schema0)
+  { if (!(*schema0)->sourceLocation())
+      (*schema0)->sourceLocation(definitions.sourceLocation());
+  }
+again:
+  // link imported schemas, need to repeat when <types> is extended with new imported schema (from inside another schema, etc.)
+  for (vector<xs__schema*>::iterator schema1 = xs__schema_.begin(); schema1 != xs__schema_.end(); ++schema1)
+  { for (vector<xs__import>::iterator import = (*schema1)->import.begin(); import != (*schema1)->import.end(); ++import)
+    { if ((*import).namespace_ && !(*import).schemaPtr())
+      { for (vector<xs__schema*>::const_iterator schema2 = xs__schema_.begin(); schema2 != xs__schema_.end(); ++schema2)
+        { if ((*schema2)->targetNamespace && !strcmp((*import).namespace_, (*schema2)->targetNamespace))
+          { (*import).schemaPtr(*schema2);
+	    break;
+	  }
+	}
+      }
+    }
+  }
+  // if a schema is imported but not in <types> then get it
+  for (vector<xs__schema*>::iterator schema2 = xs__schema_.begin(); schema2 != xs__schema_.end(); ++schema2)
+  { for (vector<xs__import>::iterator import = (*schema2)->import.begin(); import != (*schema2)->import.end(); ++import)
+    { bool found = false;
+      if ((*import).namespace_)
+      { if ((*import).schemaPtr())
+	  found = true;
+        else
+	{ for (vector<xs__schema*>::const_iterator schema3 = xs__schema_.begin(); schema3 != xs__schema_.end(); ++schema3)
+          { if ((*schema3)->targetNamespace && !strcmp((*import).namespace_, (*schema3)->targetNamespace))
+            { found = true;
+	      break;
+	    }
+	  }
+	}
+	if (!found)
+	{ for (SetOfString::const_iterator i = exturis.begin(); i != exturis.end(); ++i)
+	  { if (!soap_tag_cmp((*import).namespace_, *i))
+            { found = true;
+	      break;
+            }
+          }
+        }
+      }
+      if (!found && !iflag) // don't import any of the schemas in the .nsmap table (or when -i option is used)
+      { xs__schema *importschema;
+        importschema = (*import).schemaPtr();
+	if (!importschema)
+        { const char *s = (*import).schemaLocation;
+	  if (!s)
+	    s = (*import).namespace_;
+	  importschema = new xs__schema(definitions.soap, (*schema2)->sourceLocation(), s);
+	  if (!importschema->targetNamespace)
+	    importschema->targetNamespace = (*import).namespace_;
+	  else if ((*import).namespace_ && strcmp(importschema->targetNamespace, (*import).namespace_))
+	    cerr << "Schema import namespace " << ((*import).namespace_?(*import).namespace_:"") << " does not correspond to imported targetNamespace " << importschema->targetNamespace << endl;
+	}
+        for (vector<xs__schema*>::const_iterator schema3 = xs__schema_.begin(); schema3 != xs__schema_.end(); ++schema3)
+        { if ((*schema3)->targetNamespace && !strcmp((*import).namespace_, (*schema3)->targetNamespace))
+          { found = true;
+	    (*import).schemaPtr(*schema3);
+	    break;
+	  }
+	}
+	if (!found)
+	{ (*import).schemaPtr(importschema);
+	  xs__schema_.push_back(importschema);
+	  goto again;
+	}
+      }
+    }
+  }
+  return SOAP_OK;
+}
+
+int wsdl__types::traverse(wsdl__definitions& definitions)
+{ if (vflag)
+    cerr << "Analyzing wsdl types" << endl;
+  for (vector<xs__schema*>::iterator schema3 = xs__schema_.begin(); schema3 != xs__schema_.end(); ++schema3)
+  { // artificially extend the <import> of each schema to include others so when we traverse schemas we can resolve references
+    for (vector<xs__schema*>::iterator importschema = xs__schema_.begin(); importschema != xs__schema_.end(); ++importschema)
+    { if (schema3 != importschema && (*importschema)->targetNamespace)
+      { xs__import *import = new xs__import();
+        import->namespace_ = (*importschema)->targetNamespace;
+        import->schemaPtr(*importschema);
+        (*schema3)->import.push_back(*import);
+      }
+    }
+    // check and report
+    for (vector<xs__import>::iterator import = (*schema3)->import.begin(); import != (*schema3)->import.end(); ++import)
+    { if ((*import).namespace_)
+      { bool found = false;
+        for (vector<xs__schema*>::const_iterator importschema = xs__schema_.begin(); importschema != xs__schema_.end(); ++importschema)
+	{ if ((*importschema)->targetNamespace && !strcmp((*import).namespace_, (*importschema)->targetNamespace))
+          { found = true;
+	    break;
+	  }
+        }
+	if (!found && vflag)
+	  cerr << "Schema import namespace " << (*import).namespace_ << " refers to a known external Schema" << endl;
+      }
+      else
+        cerr << "Warning: Schema import " << ((*import).schemaLocation ? (*import).schemaLocation : "") << " has no namespace" << endl;
+    }
+  }
+  // traverse the schemas
+  for (vector<xs__schema*>::iterator schema4 = xs__schema_.begin(); schema4 != xs__schema_.end(); ++schema4)
+    (*schema4)->traverse();
+  // find all built-in types, elements, and attributes
+  for (vector<xs__schema*>::iterator schema5 = xs__schema_.begin(); schema5 != xs__schema_.end(); ++schema5)
+  { if (vflag)
+      for (SetOfString::const_iterator i = (*schema5)->builtinTypes().begin(); i != (*schema5)->builtinTypes().end(); ++i)
+        cerr << "Found built-in schema type: " << (*i) << endl;
+    definitions.builtinTypes((*schema5)->builtinTypes());
+    definitions.builtinElements((*schema5)->builtinElements());
+    definitions.builtinAttributes((*schema5)->builtinAttributes());
+  }
+  return SOAP_OK;
+}
+
+int wsdl__import::preprocess(wsdl__definitions& definitions)
+{ bool found = false;
+  if (vflag)
+    cerr << "Preprocess wsdl import " << (location?location:"") << endl;
+  definitionsRef = NULL;
+  if (namespace_)
+  { for (SetOfString::const_iterator i = exturis.begin(); i != exturis.end(); ++i)
+    { if (!soap_tag_cmp(namespace_, *i))
+      { found = true;
+        break;
+      }
+    }
+  }
+  if (!found && location)
+  { // parse imported definitions
+    definitionsRef = new wsdl__definitions(definitions.soap, definitions.sourceLocation(), location);
+    if (!definitionsRef)
+      return SOAP_EOF;
+    if (!namespace_)
+      namespace_ = definitionsRef->targetNamespace;
+    else if (!definitionsRef->targetNamespace || !*definitionsRef->targetNamespace)
+      definitionsRef->targetNamespace = namespace_;
+    else if (strcmp(namespace_, definitionsRef->targetNamespace))
+      cerr << "Error: WSDL definitions/import " << location << " namespace " << namespace_ << " does not match imported targetNamespace " << definitionsRef->targetNamespace << endl;
+  }
+  else if (!found)
+    cerr << "WSDL definitions/import has no location attribute" << endl;
+  return SOAP_OK;
+}
+
+int wsdl__import::traverse(wsdl__definitions& definitions)
+{ if (vflag)
+    cerr << "Analyzing wsdl import " << (location?location:"") << endl;
+  if (definitionsRef)
+  { for (vector<wsdl__message>::iterator mg = definitionsRef->message.begin(); mg != definitionsRef->message.end(); ++mg)
+      (*mg).traverse(definitions);
+    // process portTypes before bindings
+    for (vector<wsdl__portType>::iterator pt = definitionsRef->portType.begin(); pt != definitionsRef->portType.end(); ++pt)
+      (*pt).traverse(definitions);
+    // process bindings
+    for (vector<wsdl__binding>::iterator bg = definitionsRef->binding.begin(); bg != definitionsRef->binding.end(); ++bg)
+      (*bg).traverse(definitions);
+    // process services
+    for (vector<wsdl__service>::iterator sv = definitionsRef->service.begin(); sv != definitionsRef->service.end(); ++sv)
+      (*sv).traverse(definitions);
+  }
+  return SOAP_OK;
+}
+
+void wsdl__import::definitionsPtr(wsdl__definitions *definitions)
+{ definitionsRef = definitions;
+}
+
+wsdl__definitions *wsdl__import::definitionsPtr() const
+{ return definitionsRef;
+}
+
+wsdl__import::wsdl__import()
+{ definitionsRef = NULL;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	streams
+//
+////////////////////////////////////////////////////////////////////////////////
+
+ostream &operator<<(ostream &o, const wsdl__definitions &e)
+{ if (!e.soap)
+  { struct soap soap;
+    soap_init2(&soap, SOAP_IO_DEFAULT, SOAP_XML_TREE | SOAP_C_UTFSTRING);
+#ifdef WITH_NONAMESPACES
+    soap_set_namespaces(&soap, namespaces);
+#endif
+    e.soap_serialize(&soap);
+    soap_begin_send(&soap);
+    e.soap_out(&soap, "wsdl:definitions", 0, NULL);
+    soap_end_send(&soap);
+    soap_destroy(&soap);
+    soap_end(&soap);
+    soap_done(&soap);
+  }
+  else
+  { ostream *os = e.soap->os;
+    e.soap->os = &o;
+    e.soap_serialize(e.soap);
+    soap_begin_send(e.soap);
+    e.soap_out(e.soap, "wsdl:definitions", 0, NULL);
+    soap_end_send(e.soap);
+    e.soap->os = os;
+  }
+  return o;
+}
+
+istream &operator>>(istream &i, wsdl__definitions &e)
+{ if (!e.soap)
+    e.soap = soap_new1(SOAP_XML_TREE | SOAP_C_UTFSTRING);
+#ifdef WITH_NONAMESPACES
+  soap_set_namespaces(e.soap, namespaces);
+#endif
+  istream *is = e.soap->is;
+  e.soap->is = &i;
+  if (soap_begin_recv(e.soap)
+   || !e.soap_in(e.soap, "wsdl:definitions", NULL)
+   || soap_end_recv(e.soap))
+  { // handle error? Note: e.soap->error is set and app should check
+  }
+  e.soap->is = is;
+  return i;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Miscellaneous
+//
+////////////////////////////////////////////////////////////////////////////////
+
+int warn_ignore(struct soap *soap, const char *tag)
+{ // We don't warn if the omitted element was an annotation or a documentation in an unexpected place
+  if (soap_match_tag(soap, tag, "xs:annotation") && soap_match_tag(soap, tag, "xs:documentation"))
+    fprintf(stderr, "Warning: element '%s' at level %d was not recognized and will be ignored\n", tag, soap->level);
+  return SOAP_OK;
+}
+
+int show_ignore(struct soap *soap, const char *tag)
+{ warn_ignore(soap, tag);
+  soap_print_fault_location(soap, stderr);
+  return SOAP_OK;
+}
+
diff --git a/wsdl/wsdl.h b/wsdl/wsdl.h
new file mode 100644
index 0000000..b711dbd
--- /dev/null
+++ b/wsdl/wsdl.h
@@ -0,0 +1,314 @@
+/*
+
+wsdl.h
+
+WSDL 1.1 binding schema interface
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2001-2006, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+*/
+
+//gsoapopt w
+
+//gsoap wsdl schema documentation:	WSDL 1.1 binding schema
+//gsoap wsdl schema namespace:		http://schemas.xmlsoap.org/wsdl/
+//gsoap wsdl schema elementForm:	qualified
+//gsoap wsdl schema attributeForm:	unqualified
+
+#import "imports.h"
+#import "schema.h"
+#import "soap.h"
+#import "mime.h"
+#import "dime.h"
+#import "http.h"
+#import "gwsdl.h"
+
+class wsdl__definitions;		// forward declaration
+
+class wsdl__import
+{ public:
+	@xsd__anyURI			namespace_;
+	@xsd__anyURI			location;
+  private:
+  	wsdl__definitions		*definitionsRef;
+  public:
+					wsdl__import();
+	int				preprocess(wsdl__definitions&);
+  	int				traverse(wsdl__definitions&);
+	void				definitionsPtr(wsdl__definitions*);
+	wsdl__definitions		*definitionsPtr() const;
+};
+
+class wsdl__types
+{ public:
+	xsd__string			documentation;		// <wsdl:documentation>?
+	std::vector<xs__schema*>	xs__schema_; 		// <xs:schema>*
+  public:
+	int				preprocess(wsdl__definitions&);
+	int				traverse(wsdl__definitions&);
+};
+
+class wsdl__part
+{ public:
+	@xsd__NMTOKEN			name;
+	@xsd__QName			element;
+	@xsd__QName			type;
+	xsd__string			documentation;		// <wsdl:documentation>?
+  private:
+  	xs__element			*elementRef;		// traverse() finds element
+  	xs__simpleType			*simpleTypeRef;		// traverse() finds simpleType
+  	xs__complexType			*complexTypeRef;	// traverse() finds complexType
+  public:
+					wsdl__part();
+  	int				traverse(wsdl__definitions&);
+	void				elementPtr(xs__element*);
+	void				simpleTypePtr(xs__simpleType*);
+	void				complexTypePtr(xs__complexType*);
+	xs__element			*elementPtr() const;
+	xs__simpleType			*simpleTypePtr() const;
+	xs__complexType			*complexTypePtr() const;
+};
+
+class wsdl__message
+{ public:
+	@xsd__NMTOKEN			name;
+	xsd__string			documentation;		// <wsdl:documentation>?
+	std::vector<wsdl__part>		part;			// <wsdl:part>*
+  public:
+  	int				traverse(wsdl__definitions&);
+};
+
+class wsdl__input
+{ public:
+	@xsd__NMTOKEN			name;
+	@xsd__QName			message;
+	xsd__string			documentation;		// <wsdl:documentation>?
+  private:
+  	wsdl__message			*messageRef;		// traverse() finds message
+  public:
+  					wsdl__input();
+  	int				traverse(wsdl__definitions&);
+	void				messagePtr(wsdl__message*);
+	wsdl__message			*messagePtr() const;
+};
+
+class wsdl__output
+{ public:
+	@xsd__NMTOKEN			name;
+	@xsd__QName			message;
+	xsd__string			documentation;		// <wsdl:documentation>?
+  private:
+  	wsdl__message			*messageRef;		// traverse() finds message
+  public:
+					wsdl__output();
+  	int				traverse(wsdl__definitions&);
+	void				messagePtr(wsdl__message*);
+	wsdl__message			*messagePtr() const;
+};
+
+class wsdl__fault
+{ public:
+	@xsd__NMTOKEN			name;
+	@xsd__QName			message;
+	xsd__string			documentation;		// <wsdl:documentation>?
+  private:
+  	wsdl__message			*messageRef;		// traverse() finds message
+  public:
+  					wsdl__fault();
+  	int				traverse(wsdl__definitions&);
+	void				messagePtr(wsdl__message*);
+	wsdl__message			*messagePtr() const;
+};
+
+class wsdl__operation
+{ public:
+	@xsd__NMTOKEN			name;
+	@xsd__string			parameterOrder;
+	xsd__string			documentation;		// <wsdl:documentation>?
+	wsdl__input			*input;			// <wsdl:input>?
+	wsdl__output			*output;		// <wsdl:output>?
+	std::vector<wsdl__fault>	fault;			// <wsdl:fault>*
+  public:
+  	int				traverse(wsdl__definitions&);
+};
+
+class wsdl__portType
+{ public:
+	@xsd__NMTOKEN			name;
+	xsd__string			documentation;		// <wsdl:documentation>?
+	std::vector<wsdl__operation>	operation;		// <wsdl:operation>*
+  public:
+  	int				traverse(wsdl__definitions&);
+};	
+
+class wsdl__ext_input			// extensibility element
+{ public:
+	xsd__string			documentation;		// <wsdl:documentation>?
+	dime__message			*dime__message_;	// <dime:message>?
+	soap__body			*soap__body_;		// <soap:body>?
+	mime__multipartRelated		*mime__multipartRelated_;// <mime:multipartRelated>?
+	mime__content			*mime__content_;	// <mime:content>?
+	std::vector<soap__header>	soap__header_;		// <soap:header>*
+  public:
+  	int				traverse(wsdl__definitions&);
+};
+
+class wsdl__ext_output			// extensibility element
+{ public:
+	xsd__string			documentation;		// <wsdl:documentation>?
+	dime__message			*dime__message_;	// <dime:message>?
+	soap__body			*soap__body_;		// <soap:body>?
+	mime__multipartRelated		*mime__multipartRelated_;// <mime:multipartRelated>?
+	mime__content			*mime__content_;	// <mime:content>?
+	std::vector<soap__header>	soap__header_;		// <soap:header>*
+  public:
+  	int				traverse(wsdl__definitions&);
+};
+
+class wsdl__ext_fault			// extensibility element
+{ public:
+	@xsd__NMTOKEN			name;
+	xsd__string			documentation;		// <wsdl:documentation>?
+	soap__fault			*soap__fault_;		// <soap:fault>?
+  private:
+  	wsdl__message			*messageRef;
+  public:
+  					wsdl__ext_fault();
+  	int				traverse(wsdl__definitions&);
+	void				messagePtr(wsdl__message*);
+	wsdl__message			*messagePtr() const;
+};
+
+class wsdl__binding_operation
+{ public:
+	@xsd__NMTOKEN			name;
+	xsd__string			documentation;		// <wsdl:documentation>?
+	soap__operation			*soap__operation_;	// <soap:operation>?
+	http__operation			*http__operation_;	// <http:operation>?
+	wsdl__ext_input			*input;			// <wsdl:input>?
+	wsdl__ext_output		*output;		// <wsdl:output>?
+	std::vector<wsdl__ext_fault>	fault;			// <wsdl:fault>*
+  private:
+  	wsdl__operation			*operationRef;		// traverse() finds operation in <wsdl:portType>
+  public:
+  					wsdl__binding_operation();
+  	int				traverse(wsdl__definitions&, wsdl__portType*);
+	void				operationPtr(wsdl__operation*);
+	wsdl__operation			*operationPtr() const;
+};
+
+class wsdl__binding
+{ public:
+	@xsd__NMTOKEN			name;
+	@xsd__QName			type;
+	xsd__string			documentation;		// <wsdl:documentation>?
+	soap__binding			*soap__binding_;	// <soap:binding>?
+	http__binding			*http__binding_;	// <http:binding>?
+	std::vector<wsdl__binding_operation>
+					operation;		// <wsdl:operation>*
+  private:
+	wsdl__portType			*portTypeRef;		// traverse() finds portType
+  public:
+					wsdl__binding();
+	int				traverse(wsdl__definitions&);
+	void				portTypePtr(wsdl__portType*);
+	wsdl__portType			*portTypePtr() const;
+};
+
+class wsdl__port
+{ public:
+	@xsd__NMTOKEN			name;
+	@xsd__QName			binding;
+	xsd__string			documentation;		// <wsdl:documentation>?
+	soap__address			*soap__address_;	// <soap:address>?
+	http__address			*http__address_;	// <http:address>?
+  private:
+	wsdl__binding			*bindingRef;		// traverse() finds binding
+  public:
+  					wsdl__port();
+	int				traverse(wsdl__definitions&);
+	void				bindingPtr(wsdl__binding*);
+	wsdl__binding			*bindingPtr() const;
+};
+
+class wsdl__service
+{ public:
+	@xsd__NMTOKEN			name;
+	xsd__string			documentation;		// <wsdl:documentation>?
+	std::vector<wsdl__port>		port;			// <wsdl:port>*
+  public:
+	int				traverse(wsdl__definitions&);
+};
+
+class wsdl__definitions
+{ public:
+	@xsd__NMTOKEN			name;
+	@xsd__anyURI			targetNamespace		= "";
+	@xsd__NMTOKEN			version;
+	std::vector<wsdl__import>	import;			// <wsdl:import>*
+	xsd__string			documentation;		// <wsdl:documentation>?
+	wsdl__types			*types;			// <wsdl:types>?
+	std::vector<wsdl__message>	message;		// <wsdl:message>*
+	std::vector<wsdl__portType>	portType;		// <wsdl:portType>*
+	std::vector<wsdl__binding>	binding;		// <wsdl:binding>*
+	std::vector<wsdl__service>	service;		// <wsdl:service>*
+	std::vector<gwsdl__portType>	gwsdl__portType_;	// <gwsdl:portType>* For the moment, we will hardcode this which makes it easier to access. WSDL 1.1 does not allow this to be extended anyway
+	struct soap			*soap;
+  private:
+	bool				updated;
+	char*				location;
+	int				redirs;
+	SetOfString			builtinTypeSet;
+	SetOfString			builtinElementSet;
+	SetOfString			builtinAttributeSet;
+  public:
+					wsdl__definitions();
+					wsdl__definitions(struct soap*, const char*, const char*);
+	virtual				~wsdl__definitions();
+	int				get(struct soap*);	// gSOAP getter is triggered after parsing
+	int				preprocess();
+	int				traverse();
+	int				read(int, char**);
+	int				read(const char *cwd, const char*);
+	const char*			sourceLocation();
+	int				error();
+	void				print_fault();
+	void				builtinType(const char*);
+	void				builtinTypes(const SetOfString&);
+	void				builtinElement(const char*);
+	void				builtinElements(const SetOfString&);
+	void				builtinAttribute(const char*);
+	void				builtinAttributes(const SetOfString&);
+	const SetOfString&		builtinTypes() const;
+	const SetOfString&		builtinElements() const;
+	const SetOfString&		builtinAttributes() const;
+	friend ostream&			operator<<(ostream&, const wsdl__definitions&);
+	friend istream&			operator>>(istream&, wsdl__definitions&);
+};
+
+extern ostream &operator<<(ostream &o, const wsdl__definitions &e);
+extern istream &operator>>(istream &i, wsdl__definitions &e);
diff --git a/wsdl/wsdl2h.cpp b/wsdl/wsdl2h.cpp
new file mode 100644
index 0000000..a67aba0
--- /dev/null
+++ b/wsdl/wsdl2h.cpp
@@ -0,0 +1,410 @@
+/*
+
+wsdl2h.cpp
+
+WSDL parser and converter to gSOAP header file format
+
+--------------------------------------------------------------------------------
+gSOAP XML Web services tools
+Copyright (C) 2000-2006, Robert van Engelen, Genivia Inc. All Rights Reserved.
+This software is released under one of the following two licenses:
+GPL or Genivia's license for commercial use.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+A commercial use license is available from Genivia, Inc., contact@genivia.com
+--------------------------------------------------------------------------------
+
+Build:
+	soapcpp2 -ipwsdl wsdl.h
+	g++ -o wsdl2h wsdl2h.cpp types.cpp service.cpp wsdl.cpp schema.cpp wsdlC.cpp stdsoap2.cpp
+	
+TODO:
+	Resolve relative versus absolute import paths for reading imported WSDL/schema (use URL local addresses)
+	Do not generate abstract complexTypes, but include defs in derived types
+	Handle simpleType derivation from base64
+	Option to define base class for all classes, e.g. -b xsd__anyType
+	Look into improving xs:any
+
+*/
+
+#include "includes.h"
+#include "types.h"
+#include "service.h"
+
+static void init();
+static void options(int argc, char **argv);
+
+int aflag = 0,
+    cflag = 0,
+    dflag = 0,
+    eflag = 0,
+    fflag = 0,
+    gflag = 0,
+    iflag = 0,
+    lflag = 0,
+    mflag = 0,
+    pflag = 0,
+    sflag = 0,
+    uflag = 0,
+    vflag = 0,
+    wflag = 0,
+    xflag = 0,
+    yflag = 0,
+    zflag = 0;
+
+int infiles = 0;
+char *infile[100],
+     *outfile = NULL,
+     *mapfile = "typemap.dat",
+     *proxy_host = NULL,
+     *import_path = NULL;
+
+int proxy_port = 8080;
+
+FILE *stream = stdout;
+
+SetOfString exturis;
+
+const char *service_prefix = NULL;
+const char *schema_prefix = "ns";
+
+char elementformat[]       = "    %-35s  %-30s";
+char pointerformat[]       = "    %-35s *%-30s";
+char attributeformat[]     = "   @%-35s  %-30s";
+char vectorformat[]        = "    std::vector<%-23s> %-30s";
+char pointervectorformat[] = "    std::vector<%-22s> *%-30s";
+char arrayformat[]         = "    %-35s *__ptr%-25s";
+char sizeformat[]          = "    %-35s  __size%-24s";
+char offsetformat[]        = "//  %-35s  __offset%-22s";
+char choiceformat[]        = "    %-35s  __union%-23s";
+char schemaformat[]        = "//gsoap %-5s schema %s:\t%s\n";
+char serviceformat[]       = "//gsoap %-4s service %s:\t%s %s\n";
+char paraformat[]          = "    %-35s%s%s%s";
+char anonformat[]          = "    %-35s%s_%s%s";
+
+char copyrightnotice[] = "\n**  The gSOAP WSDL parser for C and C++ "VERSION"\n**  Copyright (C) 2000-2006 Robert van Engelen, Genivia Inc.\n**  All Rights Reserved. This product is provided \"as is\", without any warranty.\n**  The gSOAP WSDL parser is released under one of the following two licenses:\n**  GPL or the commercial license by Genivia Inc. Use option -l for more info.\n\n";
+
+char licensenotice[]   = "\
+--------------------------------------------------------------------------------\n\
+gSOAP XML Web services tools\n\
+Copyright (C) 2000-2006, Robert van Engelen, Genivia Inc. All Rights Reserved.\n\
+\n\
+This software is released under one of the following two licenses:\n\
+GPL or Genivia's license for commercial use.\n\
+\n\
+GPL license.\n\
+\n\
+This program is free software; you can redistribute it and/or modify it under\n\
+the terms of the GNU General Public License as published by the Free Software\n\
+Foundation; either version 2 of the License, or (at your option) any later\n\
+version.\n\
+\n\
+This program is distributed in the hope that it will be useful, but WITHOUT ANY\n\
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A\n\
+PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\
+\n\
+You should have received a copy of the GNU General Public License along with\n\
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple\n\
+Place, Suite 330, Boston, MA 02111-1307 USA\n\
+\n\
+Author contact information:\n\
+engelen@genivia.com / engelen@acm.org\n\
+--------------------------------------------------------------------------------\n\
+A commercial use license is available from Genivia, Inc., contact@genivia.com\n\
+--------------------------------------------------------------------------------\n";
+
+int main(int argc, char **argv)
+{ init();
+  options(argc, argv);
+  fprintf(stderr, copyrightnotice);
+  if (lflag)
+  { fprintf(stderr, licensenotice);
+    if (!infiles)
+      exit(0);
+  }
+  wsdl__definitions definitions;
+  if (infiles)
+  { if (!outfile)
+    { if (strncmp(infile[0], "http://", 7) && strncmp(infile[0], "https://", 8))
+      { const char *s = strrchr(infile[0], '.');
+        if (s && (!strcmp(s, ".wsdl") || !strcmp(s, ".gwsdl") || !strcmp(s, ".xsd")))
+        { outfile = estrdup(infile[0]);
+          outfile[s - infile[0] + 1] = 'h';
+          outfile[s - infile[0] + 2] = '\0';
+        }
+        else
+        { outfile = (char*)emalloc(strlen(infile[0]) + 3);
+          strcpy(outfile, infile[0]);
+          strcat(outfile, ".h");
+        }
+      }
+    }
+  }
+  if (outfile)
+  { stream = fopen(outfile, "w");
+    if (!stream)
+    { fprintf(stderr, "Cannot write to %s\n", outfile);
+      exit(1);
+    }
+    fprintf(stderr, "Saving %s\n\n", outfile);
+  }
+  Definitions def;
+  definitions.read(infiles, infile);
+  if (definitions.error())
+  { definitions.print_fault();
+    exit(1);
+  }
+  definitions.traverse();
+  def.compile(definitions);
+  if (outfile)
+  { fclose(stream);
+    fprintf(stderr, "\nTo complete the process, compile with:\nsoapcpp2 %s\n\n", outfile);
+  }
+  return 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Initialization
+//
+////////////////////////////////////////////////////////////////////////////////
+
+static void init()
+{ struct Namespace *p = namespaces;
+  if (p)
+  { for (; p->id; p++)
+    { if (p->in && *p->in)
+        exturis.insert(p->in);
+      if (p->ns && *p->ns)
+        exturis.insert(p->ns);
+    }
+  }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Parse command line options
+//
+////////////////////////////////////////////////////////////////////////////////
+
+static void options(int argc, char **argv)
+{ int i;
+  infiles = 0;
+  for (i = 1; i < argc; i++)
+  { char *a = argv[i];
+    if (*a == '-'
+#ifdef WIN32
+     || *a == '/'
+#endif
+    )
+    { int g = 1;
+      while (g && *++a)
+      { switch (*a)
+        { case 'a':
+            aflag = 1;
+       	    break;
+          case 'c':
+            cflag = 1;
+       	    break;
+	  case 'd':
+	    dflag = 1;
+	    break;
+	  case 'e':
+	    eflag = 1;
+	    break;
+	  case 'f':
+	    fflag = 1;
+	    break;
+	  case 'g':
+	    gflag = 1;
+	    break;
+	  case 'i':
+	    iflag = 1;
+	    break;
+          case 'I':
+            a++;
+            g = 0;
+            if (*a)
+              import_path = a;
+            else if (i < argc && argv[++i])
+              import_path = argv[i];
+            else
+              fprintf(stderr, "wsdl2h: Option -I requires a path argument");
+	    break;
+	  case 'l':
+	    lflag = 1;
+	    break;
+	  case 'm':
+	    mflag = 1;
+	    break;
+          case 'n':
+            a++;
+            g = 0;
+            if (*a)
+              schema_prefix = a;
+            else if (i < argc && argv[++i])
+              schema_prefix = argv[i];
+            else
+              fprintf(stderr, "wsdl2h: Option -n requires a prefix name argument");
+	    break;
+          case 'N':
+            a++;
+            g = 0;
+            if (*a)
+              service_prefix = a;
+            else if (i < argc && argv[++i])
+              service_prefix = argv[i];
+            else
+              fprintf(stderr, "wsdl2h: Option -N requires a prefix name argument");
+	    break;
+          case 'o':
+            a++;
+            g = 0;
+            if (*a)
+              outfile = a;
+            else if (i < argc && argv[++i])
+              outfile = argv[i];
+            else
+              fprintf(stderr, "wsdl2h: Option -o requires an output file argument");
+	    break;
+	  case 'p':
+	    pflag = 1;
+	    break;
+	  case 'r':
+            a++;
+            g = 0;
+            if (*a)
+              proxy_host = a;
+            else if (i < argc && argv[++i])
+              proxy_host = argv[i];
+            else
+              fprintf(stderr, "wsdl2h: Option -r requires a proxy host:port argument");
+            if (proxy_host)
+	    { char *s = (char*)emalloc(strlen(proxy_host + 1));
+	      strcpy(s, proxy_host);
+	      proxy_host = s;
+	      s = strchr(proxy_host, ':');
+	      if (s)
+	      { proxy_port = soap_strtol(s + 1, NULL, 10);
+	        *s = '\0';
+	      }
+	    }
+	    break;
+	  case 's':
+	    sflag = 1;
+	    break;
+          case 't':
+            a++;
+            g = 0;
+            if (*a)
+              mapfile = a;
+            else if (i < argc && argv[++i])
+              mapfile = argv[i];
+            else
+              fprintf(stderr, "wsdl2h: Option -t requires a type map file argument");
+	    break;
+	  case 'u':
+	    uflag = 1;
+	    break;
+	  case 'v':
+	    vflag = 1;
+	    break;
+	  case 'w':
+	    wflag = 1;
+	    break;
+	  case 'x':
+	    xflag = 1;
+	    break;
+	  case 'y':
+	    yflag = 1;
+	    break;
+	  case 'z':
+	    zflag = 1;
+	    break;
+          case '?':
+          case 'h':
+            fprintf(stderr, "Usage: wsdl2h [-a] [-c] [-d] [-e] [-f] [-g] [-h] [-I path] [-l] [-m] [-n name] [-N name] [-p] [-r proxyhost:port] [-s] [-t typemapfile.dat] [-u] [-v] [-w] [-x] [-y] [-z] [-o outfile.h] infile.wsdl infile.xsd http://www... ...\n\n");
+            fprintf(stderr, "\
+-a      generate indexed struct names for local elements with anonymous types\n\
+-c      generate C source code\n\
+-d      use DOM to populate xs:any and xsd:anyType elements\n\
+-e      don't qualify enum names\n\
+-f      generate flat C++ class hierarchy\n\
+-g      generate global top-level element declarations\n\
+-h      display help info\n\
+-Ipath  use path to find files\n\
+-l      include license information in output\n\
+-m      use xsd.h module to import primitive types\n\
+-nname  use name as the base namespace prefix instead of 'ns'\n\
+-Nname  use name as the base namespace prefix for service namespaces\n\
+-ofile  output to file\n\
+-p      create polymorphic types with C++ inheritance with base xsd__anyType\n\
+-rhost:port\n\
+        connect via proxy host and port\n\
+-s      don't generate STL code (no std::string and no std::vector)\n\
+-tfile  use type map file instead of the default file typemap.dat\n\
+-u      don't generate unions\n\
+-v      verbose output\n\
+-w      always wrap response parameters in a response struct (<=1.1.4 behavior)\n\
+-x      don't generate _XML any/anyAttribute extensibility elements\n\
+-y      generate typedef synonyms for structs and enums\n\
+-z      generate pointer-based arrays for backward compatibility < gSOAP 2.7.6e\n\
+infile.wsdl infile.xsd http://www... list of input sources (if none use stdin)\n\
+\n");
+            exit(0);
+          default:
+            fprintf(stderr, "wsdl2h: Unknown option %s\n", a);
+            exit(1);
+        }
+      }
+    }
+    else
+    { infile[infiles++] = argv[i];
+      if (infiles >= 100)
+      { fprintf(stderr, "wsdl2h: too many files\n");
+        exit(1);
+      }
+    }
+  }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//	Namespaces
+//
+////////////////////////////////////////////////////////////////////////////////
+
+struct Namespace namespaces[] =
+{
+  {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/", "http://www.w3.org/*/soap-envelope"},
+  {"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/", "http://www.w3.org/*/soap-encoding"},
+  {"xsi", "http://www.w3.org/2001/XMLSchema-instance"},
+  {"xsd", ""}, // http://www.w3.org/2001/XMLSchema"}, // don't use this, it might conflict with xs
+  {"xml", "http://www.w3.org/XML/1998/namespace"},
+  {"xs", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema" },
+  {"http", "http://schemas.xmlsoap.org/wsdl/http/"},
+  {"soap", "http://schemas.xmlsoap.org/wsdl/soap/", "http://schemas.xmlsoap.org/wsdl/soap*/"},
+  {"mime", "http://schemas.xmlsoap.org/wsdl/mime/"},
+  {"dime", "http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/", "http://schemas.xmlsoap.org/ws/*/dime/wsdl/"},
+  {"wsdl", "http://schemas.xmlsoap.org/wsdl/"},
+  {"gwsdl", "http://www.gridforum.org/namespaces/2003/03/gridWSDLExtensions"},
+  {"sd", "http://www.gridforum.org/namespaces/2003/03/serviceData"},
+  {NULL, NULL}
+};
diff --git a/wsdl2h.exe b/wsdl2h.exe
new file mode 100755
index 0000000..e4a061e
--- /dev/null
+++ b/wsdl2h.exe
Binary files differ